diff --git a/node_modules/.bin/_mocha b/node_modules/.bin/_mocha deleted file mode 120000 index f2a54ffd..00000000 --- a/node_modules/.bin/_mocha +++ /dev/null @@ -1 +0,0 @@ -../mocha/bin/_mocha \ No newline at end of file diff --git a/node_modules/.bin/express b/node_modules/.bin/express deleted file mode 120000 index b741d99c..00000000 --- a/node_modules/.bin/express +++ /dev/null @@ -1 +0,0 @@ -../express/bin/express \ No newline at end of file diff --git a/node_modules/.bin/gulp b/node_modules/.bin/gulp deleted file mode 120000 index 5de73328..00000000 --- a/node_modules/.bin/gulp +++ /dev/null @@ -1 +0,0 @@ -../gulp/bin/gulp.js \ No newline at end of file diff --git a/node_modules/.bin/jade b/node_modules/.bin/jade deleted file mode 120000 index 65a3bac6..00000000 --- a/node_modules/.bin/jade +++ /dev/null @@ -1 +0,0 @@ -../jade/bin/jade.js \ No newline at end of file diff --git a/node_modules/.bin/mocha b/node_modules/.bin/mocha deleted file mode 120000 index 43c668d9..00000000 --- a/node_modules/.bin/mocha +++ /dev/null @@ -1 +0,0 @@ -../mocha/bin/mocha \ No newline at end of file diff --git a/node_modules/consolidate/.npmignore b/node_modules/consolidate/.npmignore deleted file mode 100644 index f1250e58..00000000 --- a/node_modules/consolidate/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/node_modules/consolidate/History.md b/node_modules/consolidate/History.md deleted file mode 100644 index 66908b31..00000000 --- a/node_modules/consolidate/History.md +++ /dev/null @@ -1,86 +0,0 @@ - -0.10.0 / 2013-11-23 -================== - - * add lodash support - * add nunjucks support - -0.9.1 / 2013-04-29 -================== - - * Update ECT version - * Added support for Handlebars helpers with test. - * Invalidates built-in dust cache if caching disabled - -0.9.0 / 2013-03-28 -================== - - * dust-helpers support, latest version of dust - * Re-add doT - global leaks fixed - * improving templayed support - -0.8.0 / 2013-01-23 -================== - - * add templayed support - * add `then-jade` as an alternative to `jade` - -0.7.0 / 2012-12-28 -================== - - * add atpl support - -0.6.0 2012-12-22 -================== - - * add partials support - * add support for toffee templates - * remove dot it still leaks and the author has not fixed it - -0.5.0 / 2012-10-29 -================== - - * add `mote` support - * add support to `dust` partials - * add support for `ECT` - * add support for rendering without file - * add support for `JUST` - * improve Haml-Coffee caching. - -0.4.0 / 2012-07-30 -================== - - * add doT support [sannis] - * add mustache support [ForbesLindesay] - * add walrus support [kagd] - -0.3.1 / 2012-06-28 -================== - - * add QEJS support - * add underscore support - * change whiskers to use pre-defined `.__express` - * remove engines. Closes #37 - * remove kernel, cannot comply with our caching - -0.3.0 / 2012-04-18 -================== - - * Added partials loading for whiskers [gsf] - * Added dustjs-linkedin support - -0.2.0 / 2012-04-04 -================== - - * Added support for dust [fatjonny] - * Added handlebars support [jstewmon] - -0.1.0 / 2012-01-03 -================== - - * Added support for several more engines - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/consolidate/Makefile b/node_modules/consolidate/Makefile deleted file mode 100644 index 2bc56b4c..00000000 --- a/node_modules/consolidate/Makefile +++ /dev/null @@ -1,9 +0,0 @@ - -REPORTER = spec - -test: - @./node_modules/.bin/mocha \ - --slow 30 \ - --reporter $(REPORTER) - -.PHONY: test \ No newline at end of file diff --git a/node_modules/consolidate/Readme.md b/node_modules/consolidate/Readme.md deleted file mode 100644 index d43647e1..00000000 --- a/node_modules/consolidate/Readme.md +++ /dev/null @@ -1,155 +0,0 @@ -# Consolidate.js - - Template engine consolidation library. - -## Installation - - $ npm install consolidate - -## Supported template engines - - - [atpl](https://github.com/soywiz/atpl.js) - - [dust](https://github.com/akdubya/dustjs) [(website)](http://akdubya.github.com/dustjs/) - - [eco](https://github.com/sstephenson/eco) - - [ect](https://github.com/baryshev/ect) [(website)](http://ectjs.com/) - - [ejs](https://github.com/visionmedia/ejs) - - [haml](https://github.com/visionmedia/haml.js) [(website)](http://haml-lang.com/) - - [haml-coffee](https://github.com/9elements/haml-coffee) [(website)](http://haml-lang.com/) - - [handlebars](https://github.com/wycats/handlebars.js/) [(website)](http://handlebarsjs.com/) - - [hogan](https://github.com/twitter/hogan.js) [(website)](http://twitter.github.com/hogan.js/) - - [jade](https://github.com/visionmedia/jade) [(website)](http://jade-lang.com/) - - [jazz](https://github.com/shinetech/jazz) - - [jqtpl](https://github.com/kof/node-jqtpl) [(website)](http://api.jquery.com/category/plugins/templates/) - - [JUST](https://github.com/baryshev/just) - - [liquor](https://github.com/chjj/liquor) - - [lodash](https://github.com/bestiejs/lodash) [(website)](http://lodash.com/) - - [mustache](https://github.com/janl/mustache.js) - - [QEJS](https://github.com/jepso/QEJS) - - [ractive](https://github.com/Rich-Harris/Ractive) - - [swig](https://github.com/paularmstrong/swig) [(website)](http://paularmstrong.github.com/swig/) - - [templayed](http://archan937.github.com/templayed.js/) - - [toffee](https://github.com/malgorithms/toffee) - - [underscore](https://github.com/documentcloud/underscore) [(website)](http://documentcloud.github.com/underscore/) - - [walrus](https://github.com/jeremyruppel/walrus) [(website)](http://documentup.com/jeremyruppel/walrus/) - - [whiskers](https://github.com/gsf/whiskers.js/tree/) - -__NOTE__: you must still install the engines you wish to use, add them to your package.json dependencies. - -## API - - All templates supported by this library may be rendered using the signature `(path[, locals], callback)` as shown below, which happens to be the signature that Express 3.x supports so any of these engines may be used within Express. - -__NOTE__: All this example code uses cons.swig for the swig template engine. Replace swig with whatever templating you are using. For example, use cons.hogan for hogan.js, cons.jade for jade, etc. `console.log(cons)` for the full list of identifiers. - -```js -var cons = require('consolidate'); -cons.swig('views/page.html', { user: 'tobi' }, function(err, html){ - if (err) throw err; - console.log(html); -}); -``` - - Or without options / local variables: - -```js -var cons = require('consolidate'); -cons.swig('views/page.html', function(err, html){ - if (err) throw err; - console.log(html); -}); -``` - - To dynamically pass the engine, simply use the subscript operator and a variable: - -```js -var cons = require('consolidate') - , name = 'swig'; - -cons[name]('views/page.html', { user: 'tobi' }, function(err, html){ - if (err) throw err; - console.log(html); -}); -``` - -## Caching - - To enable caching simply pass `{ cache: true }`. Engines _may_ use this option to cache things reading the file contents, compiled `Function`s etc. Engines which do _not_ support this may simply ignore it. All engines that consolidate.js implements I/O for will cache the file contents, ideal for production environments. - -```js -var cons = require('consolidate'); -cons.swig('views/page.html', { user: 'tobi' }, function(err, html){ - if (err) throw err; - console.log(html); -}); -``` - -## Express 3.x example - -```js -var express = require('express') - , cons = require('consolidate') - , app = express(); - -// assign the swig engine to .html files -app.engine('html', cons.swig); - -// set .html as the default extension -app.set('view engine', 'html'); -app.set('views', __dirname + '/views'); - -var users = []; -users.push({ name: 'tobi' }); -users.push({ name: 'loki' }); -users.push({ name: 'jane' }); - -app.get('/', function(req, res){ - res.render('index', { - title: 'Consolidate.js' - }); -}); - -app.get('/users', function(req, res){ - res.render('users', { - title: 'Users', - users: users - }); -}); - -app.listen(3000); -console.log('Express server listening on port 3000'); -``` - -## Running tests - - Install dev deps: - - $ npm install -d - - Run the tests: - - $ make test - -## License - -(The MIT License) - -Copyright (c) 2011 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/node_modules/consolidate/index.js b/node_modules/consolidate/index.js deleted file mode 100644 index 4a0df174..00000000 --- a/node_modules/consolidate/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/consolidate'); \ No newline at end of file diff --git a/node_modules/consolidate/lib/consolidate.js b/node_modules/consolidate/lib/consolidate.js deleted file mode 100644 index 279b7f46..00000000 --- a/node_modules/consolidate/lib/consolidate.js +++ /dev/null @@ -1,764 +0,0 @@ -/*! - * consolidate - * Copyright(c) 2012 TJ Holowaychuk - * MIT Licensed - * - * Engines which do not support caching of their file contents - * should use the `read()` function defined in consolidate.js - * On top of this, when an engine compiles to a `Function`, - * these functions should either be cached within consolidate.js - * or the engine itself via `options.cache`. This will allow - * users and frameworks to pass `options.cache = true` for - * `NODE_ENV=production`, however edit the file(s) without - * re-loading the application in development. - */ - -/** - * Module dependencies. - */ - -var fs = require('fs') - , path = require('path') - , join = path.join - , extname = path.extname - , dirname = path.dirname; - -var readCache = {}; - -/** - * Require cache. - */ - -var cacheStore = {}; - -/** - * Require cache. - */ - -var requires = {}; - -/** - * Clear the cache. - * - * @api public - */ - -exports.clearCache = function(){ - cacheStore = {}; -}; - -/** - * Conditionally cache `compiled` template based - * on the `options` filename and `.cache` boolean. - * - * @param {Object} options - * @param {Function} compiled - * @return {Function} - * @api private - */ - -function cache(options, compiled) { - // cachable - if (compiled && options.filename && options.cache) { - delete readCache[options.filename]; - cacheStore[options.filename] = compiled; - return compiled; - } - - // check cache - if (options.filename && options.cache) { - return cacheStore[options.filename]; - } - - return compiled; -} - -/** - * Read `path` with `options` with - * callback `(err, str)`. When `options.cache` - * is true the template string will be cached. - * - * @param {String} options - * @param {Function} fn - * @api private - */ - -function read(path, options, fn) { - var str = readCache[path]; - var cached = options.cache && str && 'string' == typeof str; - - // cached (only if cached is a string and not a compiled template function) - if (cached) return fn(null, str); - - // read - fs.readFile(path, 'utf8', function(err, str){ - if (err) return fn(err); - // remove extraneous utf8 BOM marker - str = str.replace(/^\uFEFF/, ''); - if (options.cache) readCache[path] = str; - fn(null, str); - }); -} - -/** - * Read `path` with `options` with - * callback `(err, str)`. When `options.cache` - * is true the partial string will be cached. - * - * @param {String} options - * @param {Function} fn - * @api private - */ - -function readPartials(path, options, fn) { - if (!options.partials) return fn(); - var partials = options.partials; - var keys = Object.keys(partials); - - function next(index) { - if (index == keys.length) return fn(null); - var key = keys[index]; - var file = join(dirname(path), partials[key] + extname(path)); - read(file, options, function(err, str){ - if (err) return fn(err); - options.partials[key] = str; - next(++index); - }); - } - - next(0); -} - -/** - * fromStringRenderer - */ - -function fromStringRenderer(name) { - return function(path, options, fn){ - options.filename = path; - readPartials(path, options, function (err) { - if (err) return fn(err); - if (cache(options)) { - exports[name].render('', options, fn); - } else { - read(path, options, function(err, str){ - if (err) return fn(err); - exports[name].render(str, options, fn); - }); - } - }); - }; -} - -/** - * Jade support. - */ - -exports.jade = function(path, options, fn){ - var engine = requires.jade; - if (!engine) { - try { - engine = requires.jade = require('jade'); - } catch (err) { - engine = requires.jade = require('then-jade'); - } - } - engine.renderFile(path, options, fn); -}; - -/** - * Jade string support. - */ - -exports.jade.render = function(str, options, fn){ - var engine = requires.jade; - if (!engine) { - try { - engine = requires.jade = require('jade'); - } catch (err) { - engine = requires.jade = require('then-jade'); - } - } - engine.render(str, options, fn); -}; - -/** - * Dust support. - */ - -exports.dust = fromStringRenderer('dust'); - -/** - * Dust string support. - */ - -exports.dust.render = function(str, options, fn){ - var engine = requires.dust; - if (!engine) { - try { - engine = requires.dust = require('dust'); - } catch (err) { - try { - engine = requires.dust = require('dustjs-helpers'); - } catch (err) { - engine = requires.dust = require('dustjs-linkedin'); - } - } - } - - var ext = 'dust' - , views = '.'; - - if (options) { - if (options.ext) ext = options.ext; - if (options.views) views = options.views; - if (options.settings && options.settings.views) views = options.settings.views; - } - if (!options || (options && !options.cache)) engine.cache = {}; - - engine.onLoad = function(path, callback){ - if ('' == extname(path)) path += '.' + ext; - if ('/' !== path[0]) path = views + '/' + path; - read(path, options, callback); - }; - - try { - var tmpl = cache(options) || cache(options, engine.compileFn(str)); - tmpl(options, fn); - } catch (err) { - fn(err); - } -}; - -/** - * Swig support. - */ - -exports.swig = fromStringRenderer('swig'); - -/** - * Swig string support. - */ - -exports.swig.render = function(str, options, fn){ - var engine = requires.swig || (requires.swig = require('swig')); - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - fn(null, tmpl(options)); - } catch (err) { - fn(err); - } -}; - -/** - * Atpl support. - */ - -exports.atpl = fromStringRenderer('atpl'); - -/** - * Atpl string support. - */ - -exports.atpl.render = function(str, options, fn){ - var engine = requires.atpl || (requires.atpl = require('atpl')); - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - fn(null, tmpl(options)); - } catch (err) { - fn(err); - } -}; - -/** - * Liquor support, - */ - -exports.liquor = fromStringRenderer('liquor'); - -/** - * Liquor string support. - */ - -exports.liquor.render = function(str, options, fn){ - var engine = requires.liquor || (requires.liquor = require('liquor')); - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - fn(null, tmpl(options)); - } catch (err) { - fn(err); - } -}; - -/** - * EJS support. - */ - -exports.ejs = fromStringRenderer('ejs'); - -/** - * EJS string support. - */ - -exports.ejs.render = function(str, options, fn){ - var engine = requires.ejs || (requires.ejs = require('ejs')); - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - fn(null, tmpl(options)); - } catch (err) { - fn(err); - } -}; - - -/** - * Eco support. - */ - -exports.eco = fromStringRenderer('eco'); - -/** - * Eco string support. - */ - -exports.eco.render = function(str, options, fn){ - var engine = requires.eco || (requires.eco = require('eco')); - try { - fn(null, engine.render(str, options)); - } catch (err) { - fn(err); - } -}; - -/** - * Jazz support. - */ - -exports.jazz = fromStringRenderer('jazz'); - -/** - * Jazz string support. - */ - -exports.jazz.render = function(str, options, fn){ - var engine = requires.jazz || (requires.jazz = require('jazz')); - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - tmpl.eval(options, function(str){ - fn(null, str); - }); - } catch (err) { - fn(err); - } -}; - -/** - * JQTPL support. - */ - -exports.jqtpl = fromStringRenderer('jqtpl'); - -/** - * JQTPL string support. - */ - -exports.jqtpl.render = function(str, options, fn){ - var engine = requires.jqtpl || (requires.jqtpl = require('jqtpl')); - try { - engine.template(str, str); - fn(null, engine.tmpl(str, options)); - } catch (err) { - fn(err); - } -}; - -/** - * Haml support. - */ - -exports.haml = fromStringRenderer('haml'); - -/** - * Haml string support. - */ - -exports.haml.render = function(str, options, fn){ - var engine = requires.hamljs || (requires.hamljs = require('hamljs')); - try { - options.locals = options; - fn(null, engine.render(str, options).trimLeft()); - } catch (err) { - fn(err); - } -}; - -/** - * Whiskers support. - */ - -exports.whiskers = function(path, options, fn){ - var engine = requires.whiskers || (requires.whiskers = require('whiskers')); - engine.__express(path, options, fn); -}; - -/** - * Whiskers string support. - */ - -exports.whiskers.render = function(str, options, fn){ - var engine = requires.whiskers || (requires.whiskers = require('whiskers')); - try { - fn(null, engine.render(str, options)); - } catch (err) { - fn(err); - } -}; - -/** - * Coffee-HAML support. - */ - -exports['haml-coffee'] = fromStringRenderer('haml-coffee'); - -/** - * Coffee-HAML string support. - */ - -exports['haml-coffee'].render = function(str, options, fn){ - var engine = requires.HAMLCoffee || (requires.HAMLCoffee = require('haml-coffee')); - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - fn(null, tmpl(options)); - } catch (err) { - fn(err); - } -}; - -/** - * Hogan support. - */ - -exports.hogan = fromStringRenderer('hogan'); - -/** - * Hogan string support. - */ - -exports.hogan.render = function(str, options, fn){ - var engine = requires.hogan || (requires.hogan = require('hogan.js')); - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - fn(null, tmpl.render(options, options.partials)); - } catch (err) { - fn(err); - } -}; - -/** - * templayed.js support. - */ - -exports.templayed = fromStringRenderer('templayed'); - -/** - * templayed.js string support. - */ - -exports.templayed.render = function(str, options, fn){ - var engine = requires.templayed || (requires.templayed = require('templayed')); - try { - var tmpl = cache(options) || cache(options, engine(str)); - fn(null, tmpl(options)); - } catch (err) { - fn(err); - } -}; - -/** - * Handlebars support. - */ - -exports.handlebars = fromStringRenderer('handlebars'); - -/** - * Handlebars string support. - */ - -exports.handlebars.render = function(str, options, fn) { - var engine = requires.handlebars || (requires.handlebars = require('handlebars')); - try { - for (var partial in options.partials) { - engine.registerPartial(partial, options.partials[partial]); - } - for (var helper in options.helpers) { - engine.registerHelper(helper, options.helpers[helper]); - } - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - fn(null, tmpl(options)); - } catch (err) { - fn(err); - } -} - -/** - * Underscore support. - */ - -exports.underscore = fromStringRenderer('underscore'); - -/** - * Underscore string support. - */ - -exports.underscore.render = function(str, options, fn) { - var engine = requires.underscore || (requires.underscore = require('underscore')); - try { - var tmpl = cache(options) || cache(options, engine.template(str, null, options)); - fn(null, tmpl(options).replace(/\n$/, '')); - } catch (err) { - fn(err); - } -}; - - -/** - * Lodash support. - */ - -exports.lodash = fromStringRenderer('lodash'); - -/** - * Lodash string support. - */ - -exports.lodash.render = function(str, options, fn) { - var engine = requires.lodash || (requires.lodash = require('lodash')); - try { - var tmpl = cache(options) || cache(options, engine.template(str, null, options)); - fn(null, tmpl(options).replace(/\n$/, '')); - } catch (err) { - fn(err); - } -}; - - -/** - * QEJS support. - */ - -exports.qejs = function (path, options, fn) { - try { - var engine = requires.qejs || (requires.qejs = require('qejs')); - engine.renderFile(path, options).nodeify(fn); - } catch (err) { - fn(err); - } -}; - -/** - * QEJS string support. - */ - -exports.qejs.render = function (str, options, fn) { - try { - var engine = requires.qejs || (requires.qejs = require('qejs')); - engine.render(str, options).then(function (result) { - fn(null, result); - }, function (err) { - fn(err); - }).end(); - } catch (err) { - fn(err); - } -}; - - -/** - * Walrus support. - */ - -exports.walrus = fromStringRenderer('walrus'); - -/** - * Walrus string support. - */ - -exports.walrus.render = function (str, options, fn) { - var engine = requires.walrus || (requires.walrus = require('walrus')); - try { - var tmpl = cache(options) || cache(options, engine.parse(str)); - fn(null, tmpl.compile(options)); - } catch (err) { - fn(err); - } -}; - -/** - * Mustache support. - */ - -exports.mustache = fromStringRenderer('mustache'); - -/** - * Mustache string support. - */ - -exports.mustache.render = function(str, options, fn) { - var engine = requires.mustache || (requires.mustache = require('mustache')); - try { - fn(null, engine.to_html(str, options, options.partials)); - } catch (err) { - fn(err); - } -}; - -/** - * Just support. - */ - -exports.just = function(path, options, fn){ - var engine = requires.just; - if (!engine) { - var JUST = require('just'); - engine = requires.just = new JUST(); - } - engine.configure({ useCache: options.cache }); - engine.render(path, options, fn); -}; - -/** - * Just string support. - */ - -exports.just.render = function(str, options, fn){ - var JUST = require('just'); - var engine = new JUST({ root: { page: str }}); - engine.render('page', options, fn); -}; - -/** - * ECT support. - */ - -exports.ect = function(path, options, fn){ - var engine = requires.ect; - if (!engine) { - var ECT = require('ect'); - engine = requires.ect = new ECT(); - } - engine.configure({ cache: options.cache }); - engine.render(path, options, fn); -}; - -/** - * ECT string support. - */ - -exports.ect.render = function(str, options, fn){ - var ECT = require('ect'); - var engine = new ECT({ root: { page: str }}); - engine.render('page', options, fn); -}; - -/** - * mote support. - */ - -exports.mote = fromStringRenderer('mote'); - -/** - * mote string support. - */ - -exports.mote.render = function(str, options, fn){ - var engine = requires.mote || (requires.mote = require('mote')); - try { - var tmpl = cache(options) || cache(options, engine.compile(str)); - fn(null, tmpl(options)); - } catch (err) { - fn(err); - } -}; - -/** - * Toffee support. - */ - -exports.toffee = function(path, options, fn){ - var toffee = requires.toffee || (requires.toffee = require('toffee')); - toffee.__consolidate_engine_render(path, options, fn); -}; - -/** - * Toffee string support. - */ - -exports.toffee.render = function(str, options, fn) { - var engine = requires.toffee || (requires.toffee = require('toffee')); - try { - engine.str_render(str, options,fn); - } catch (err) { - fn(err); - } -}; - -/** - * doT support. - */ - -exports.dot = fromStringRenderer('dot'); - -/** - * doT string support. - */ - -exports.dot.render = function (str, options, fn) { - var engine = requires.dot || (requires.dot = require('dot')); - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options && options._def)); - fn(null, tmpl(options)); - } catch (err) { - fn(err); - } -}; - -/** - * Ractive support. - */ - -exports.ractive = fromStringRenderer('ractive'); - -/** - * Ractive string support. - */ - -exports.ractive.render = function(str, options, fn){ - var engine = requires.ractive || (requires.ractive = require('ractive')); - - options.template = str; - if (options.data === null || options.data === undefined) - { - options.data = options; - } - - try { - fn(null, new engine(options).renderHTML()); - } catch (err) { - fn(err); - } -}; - -/** - * Nunjucks support. - */ - -exports.nunjucks = fromStringRenderer('nunjucks'); - -/** - * Nunjucks string support. - */ - -exports.nunjucks.render = function(str, options, fn) { - var engine = requires.nunjucks || (requires.nunjucks = require('nunjucks')); - engine.renderString(str, options, fn); -}; diff --git a/node_modules/consolidate/package.json b/node_modules/consolidate/package.json deleted file mode 100644 index 2923fe14..00000000 --- a/node_modules/consolidate/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "consolidate", - "version": "0.10.0", - "description": "Template engine consolidation library", - "keywords": [ - "template", - "engine", - "view" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "devDependencies": { - "mocha": "*", - "should": "*", - "jade": "0.26.0", - "ejs": "0.7.1", - "eco": "1.1.0-rc-3", - "swig": "0.12.0", - "jazz": "0.0.18", - "jqtpl": "1.1.0", - "liquor": "0.0.4", - "lodash": "1.2.0", - "hamljs": "0.6.1", - "whiskers": "0.2.2", - "haml-coffee": "1.4.0", - "hogan.js": "2.0.0", - "dust": "0.3.0", - "dustjs-linkedin": "1.2", - "dustjs-helpers": "1.1.1", - "handlebars": "1.0.7", - "underscore": "1.3.3", - "qejs": "0.0.1", - "walrus": "0.9.0", - "mustache": "0.4.0", - "just": "0.1.8", - "ect": "0.3.5", - "mote": "0.2.0", - "toffee": "0.0.52", - "atpl": ">=0.5.5", - "templayed": ">=0.2.3", - "dot": "1.0.1", - "ractive": "0.3.7", - "nunjucks": "~1.0.0" - }, - "main": "index", - "repository": { - "type": "git", - "url": "https://github.com/visionmedia/consolidate.js.git" - }, - "scripts": { - "test": "mocha" - }, - "readme": "# Consolidate.js\n\n Template engine consolidation library.\n\n## Installation\n\n $ npm install consolidate\n\n## Supported template engines\n\n - [atpl](https://github.com/soywiz/atpl.js)\n - [dust](https://github.com/akdubya/dustjs) [(website)](http://akdubya.github.com/dustjs/)\n - [eco](https://github.com/sstephenson/eco)\n - [ect](https://github.com/baryshev/ect) [(website)](http://ectjs.com/)\n - [ejs](https://github.com/visionmedia/ejs)\n - [haml](https://github.com/visionmedia/haml.js) [(website)](http://haml-lang.com/)\n - [haml-coffee](https://github.com/9elements/haml-coffee) [(website)](http://haml-lang.com/)\n - [handlebars](https://github.com/wycats/handlebars.js/) [(website)](http://handlebarsjs.com/)\n - [hogan](https://github.com/twitter/hogan.js) [(website)](http://twitter.github.com/hogan.js/)\n - [jade](https://github.com/visionmedia/jade) [(website)](http://jade-lang.com/)\n - [jazz](https://github.com/shinetech/jazz)\n - [jqtpl](https://github.com/kof/node-jqtpl) [(website)](http://api.jquery.com/category/plugins/templates/)\n - [JUST](https://github.com/baryshev/just)\n - [liquor](https://github.com/chjj/liquor)\n - [lodash](https://github.com/bestiejs/lodash) [(website)](http://lodash.com/)\n - [mustache](https://github.com/janl/mustache.js)\n - [QEJS](https://github.com/jepso/QEJS)\n - [ractive](https://github.com/Rich-Harris/Ractive)\n - [swig](https://github.com/paularmstrong/swig) [(website)](http://paularmstrong.github.com/swig/)\n - [templayed](http://archan937.github.com/templayed.js/)\n - [toffee](https://github.com/malgorithms/toffee)\n - [underscore](https://github.com/documentcloud/underscore) [(website)](http://documentcloud.github.com/underscore/)\n - [walrus](https://github.com/jeremyruppel/walrus) [(website)](http://documentup.com/jeremyruppel/walrus/)\n - [whiskers](https://github.com/gsf/whiskers.js/tree/)\n\n__NOTE__: you must still install the engines you wish to use, add them to your package.json dependencies.\n\n## API\n\n All templates supported by this library may be rendered using the signature `(path[, locals], callback)` as shown below, which happens to be the signature that Express 3.x supports so any of these engines may be used within Express.\n\n__NOTE__: All this example code uses cons.swig for the swig template engine. Replace swig with whatever templating you are using. For example, use cons.hogan for hogan.js, cons.jade for jade, etc. `console.log(cons)` for the full list of identifiers.\n\n```js\nvar cons = require('consolidate');\ncons.swig('views/page.html', { user: 'tobi' }, function(err, html){\n if (err) throw err;\n console.log(html);\n});\n```\n\n Or without options / local variables:\n\n```js\nvar cons = require('consolidate');\ncons.swig('views/page.html', function(err, html){\n if (err) throw err;\n console.log(html);\n});\n```\n\n To dynamically pass the engine, simply use the subscript operator and a variable:\n\n```js\nvar cons = require('consolidate')\n , name = 'swig';\n\ncons[name]('views/page.html', { user: 'tobi' }, function(err, html){\n if (err) throw err;\n console.log(html);\n});\n```\n\n## Caching\n\n To enable caching simply pass `{ cache: true }`. Engines _may_ use this option to cache things reading the file contents, compiled `Function`s etc. Engines which do _not_ support this may simply ignore it. All engines that consolidate.js implements I/O for will cache the file contents, ideal for production environments.\n\n```js\nvar cons = require('consolidate');\ncons.swig('views/page.html', { user: 'tobi' }, function(err, html){\n if (err) throw err;\n console.log(html);\n});\n```\n\n## Express 3.x example\n\n```js\nvar express = require('express')\n , cons = require('consolidate')\n , app = express();\n\n// assign the swig engine to .html files\napp.engine('html', cons.swig);\n\n// set .html as the default extension \napp.set('view engine', 'html');\napp.set('views', __dirname + '/views');\n\nvar users = [];\nusers.push({ name: 'tobi' });\nusers.push({ name: 'loki' });\nusers.push({ name: 'jane' });\n\napp.get('/', function(req, res){\n res.render('index', {\n title: 'Consolidate.js'\n });\n});\n\napp.get('/users', function(req, res){\n res.render('users', {\n title: 'Users',\n users: users\n });\n});\n\napp.listen(3000);\nconsole.log('Express server listening on port 3000');\n```\n\n## Running tests\n\n Install dev deps:\n \n $ npm install -d\n\n Run the tests:\n\n $ make test\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/consolidate.js/issues" - }, - "homepage": "https://github.com/visionmedia/consolidate.js", - "_id": "consolidate@0.10.0", - "dist": { - "shasum": "81f1a6ceba1247df9cef7a261ce527c2ce538f7a" - }, - "_from": "consolidate@", - "_resolved": "https://registry.npmjs.org/consolidate/-/consolidate-0.10.0.tgz" -} diff --git a/node_modules/express/.npmignore b/node_modules/express/.npmignore deleted file mode 100644 index caf574de..00000000 --- a/node_modules/express/.npmignore +++ /dev/null @@ -1,9 +0,0 @@ -.git* -docs/ -examples/ -support/ -test/ -testing.js -.DS_Store -coverage.html -lib-cov diff --git a/node_modules/express/.travis.yml b/node_modules/express/.travis.yml deleted file mode 100644 index a12e3f0f..00000000 --- a/node_modules/express/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" \ No newline at end of file diff --git a/node_modules/express/History.md b/node_modules/express/History.md deleted file mode 100644 index 9d53bef4..00000000 --- a/node_modules/express/History.md +++ /dev/null @@ -1,1274 +0,0 @@ -4.0.0 / -================== - - * remove: - - express(1) - moved to [express-generator](https://github.com/expressjs/generator) - - `req.accepted*` - use `req.accepts*()` instead - - `app.configure` - use logic in your own app code - * change: - - `req.accepts*` -> `req.accepts*s` - i.e. `req.acceptsEncoding` -> `req.acceptsEncodings` - - `req.params` is now an object instead of an array - - `json spaces` no longer enabled by default in development - * refactor: - - `req.accepts*` with [accepts](https://github.com/expressjs/accepts) - - `req.is` with [type-is](https://github.com/expressjs/type-is) - -3.4.8 / 2014-01-13 -================== - - * prevent incorrect automatic OPTIONS responses #1868 @dpatti - * update binary and examples for jade 1.0 #1876 @yossi, #1877 @reqshark, #1892 @matheusazzi - * throw 400 in case of malformed paths @rlidwka - -3.4.7 / 2013-12-10 -================== - - * update connect - -3.4.6 / 2013-12-01 -================== - - * update connect (raw-body) - -3.4.5 / 2013-11-27 -================== - - * update connect - * res.location: remove leading ./ #1802 @kapouer - * res.redirect: fix `res.redirect('toString') #1829 @michaelficarra - * res.send: always send ETag when content-length > 0 - * router: add Router.all() method - -3.4.4 / 2013-10-29 -================== - - * update connect - * update supertest - * update methods - * express(1): replace bodyParser() with urlencoded() and json() #1795 @chirag04 - -3.4.3 / 2013-10-23 -================== - - * update connect - -3.4.2 / 2013-10-18 -================== - - * update connect - * downgrade commander - -3.4.1 / 2013-10-15 -================== - - * update connect - * update commander - * jsonp: check if callback is a function - * router: wrap encodeURIComponent in a try/catch #1735 (@lxe) - * res.format: now includes chraset @1747 (@sorribas) - * res.links: allow multiple calls @1746 (@sorribas) - -3.4.0 / 2013-09-07 -================== - - * add res.vary(). Closes #1682 - * update connect - -3.3.8 / 2013-09-02 -================== - - * update connect - -3.3.7 / 2013-08-28 -================== - - * update connect - -3.3.6 / 2013-08-27 -================== - - * Revert "remove charset from json responses. Closes #1631" (causes issues in some clients) - * add: req.accepts take an argument list - -3.3.4 / 2013-07-08 -================== - - * update send and connect - -3.3.3 / 2013-07-04 -================== - - * update connect - -3.3.2 / 2013-07-03 -================== - - * update connect - * update send - * remove .version export - -3.3.1 / 2013-06-27 -================== - - * update connect - -3.3.0 / 2013-06-26 -================== - - * update connect - * add support for multiple X-Forwarded-Proto values. Closes #1646 - * change: remove charset from json responses. Closes #1631 - * change: return actual booleans from req.accept* functions - * fix jsonp callback array throw - -3.2.6 / 2013-06-02 -================== - - * update connect - -3.2.5 / 2013-05-21 -================== - - * update connect - * update node-cookie - * add: throw a meaningful error when there is no default engine - * change generation of ETags with res.send() to GET requests only. Closes #1619 - -3.2.4 / 2013-05-09 -================== - - * fix `req.subdomains` when no Host is present - * fix `req.host` when no Host is present, return undefined - -3.2.3 / 2013-05-07 -================== - - * update connect / qs - -3.2.2 / 2013-05-03 -================== - - * update qs - -3.2.1 / 2013-04-29 -================== - - * add app.VERB() paths array deprecation warning - * update connect - * update qs and remove all ~ semver crap - * fix: accept number as value of Signed Cookie - -3.2.0 / 2013-04-15 -================== - - * add "view" constructor setting to override view behaviour - * add req.acceptsEncoding(name) - * add req.acceptedEncodings - * revert cookie signature change causing session race conditions - * fix sorting of Accept values of the same quality - -3.1.2 / 2013-04-12 -================== - - * add support for custom Accept parameters - * update cookie-signature - -3.1.1 / 2013-04-01 -================== - - * add X-Forwarded-Host support to `req.host` - * fix relative redirects - * update mkdirp - * update buffer-crc32 - * remove legacy app.configure() method from app template. - -3.1.0 / 2013-01-25 -================== - - * add support for leading "." in "view engine" setting - * add array support to `res.set()` - * add node 0.8.x to travis.yml - * add "subdomain offset" setting for tweaking `req.subdomains` - * add `res.location(url)` implementing `res.redirect()`-like setting of Location - * use app.get() for x-powered-by setting for inheritance - * fix colons in passwords for `req.auth` - -3.0.6 / 2013-01-04 -================== - - * add http verb methods to Router - * update connect - * fix mangling of the `res.cookie()` options object - * fix jsonp whitespace escape. Closes #1132 - -3.0.5 / 2012-12-19 -================== - - * add throwing when a non-function is passed to a route - * fix: explicitly remove Transfer-Encoding header from 204 and 304 responses - * revert "add 'etag' option" - -3.0.4 / 2012-12-05 -================== - - * add 'etag' option to disable `res.send()` Etags - * add escaping of urls in text/plain in `res.redirect()` - for old browsers interpreting as html - * change crc32 module for a more liberal license - * update connect - -3.0.3 / 2012-11-13 -================== - - * update connect - * update cookie module - * fix cookie max-age - -3.0.2 / 2012-11-08 -================== - - * add OPTIONS to cors example. Closes #1398 - * fix route chaining regression. Closes #1397 - -3.0.1 / 2012-11-01 -================== - - * update connect - -3.0.0 / 2012-10-23 -================== - - * add `make clean` - * add "Basic" check to req.auth - * add `req.auth` test coverage - * add cb && cb(payload) to `res.jsonp()`. Closes #1374 - * add backwards compat for `res.redirect()` status. Closes #1336 - * add support for `res.json()` to retain previously defined Content-Types. Closes #1349 - * update connect - * change `res.redirect()` to utilize a pathname-relative Location again. Closes #1382 - * remove non-primitive string support for `res.send()` - * fix view-locals example. Closes #1370 - * fix route-separation example - -3.0.0rc5 / 2012-09-18 -================== - - * update connect - * add redis search example - * add static-files example - * add "x-powered-by" setting (`app.disable('x-powered-by')`) - * add "application/octet-stream" redirect Accept test case. Closes #1317 - -3.0.0rc4 / 2012-08-30 -================== - - * add `res.jsonp()`. Closes #1307 - * add "verbose errors" option to error-pages example - * add another route example to express(1) so people are not so confused - * add redis online user activity tracking example - * update connect dep - * fix etag quoting. Closes #1310 - * fix error-pages 404 status - * fix jsonp callback char restrictions - * remove old OPTIONS default response - -3.0.0rc3 / 2012-08-13 -================== - - * update connect dep - * fix signed cookies to work with `connect.cookieParser()` ("s:" prefix was missing) [tnydwrds] - * fix `res.render()` clobbering of "locals" - -3.0.0rc2 / 2012-08-03 -================== - - * add CORS example - * update connect dep - * deprecate `.createServer()` & remove old stale examples - * fix: escape `res.redirect()` link - * fix vhost example - -3.0.0rc1 / 2012-07-24 -================== - - * add more examples to view-locals - * add scheme-relative redirects (`res.redirect("//foo.com")`) support - * update cookie dep - * update connect dep - * update send dep - * fix `express(1)` -h flag, use -H for hogan. Closes #1245 - * fix `res.sendfile()` socket error handling regression - -3.0.0beta7 / 2012-07-16 -================== - - * update connect dep for `send()` root normalization regression - -3.0.0beta6 / 2012-07-13 -================== - - * add `err.view` property for view errors. Closes #1226 - * add "jsonp callback name" setting - * add support for "/foo/:bar*" non-greedy matches - * change `res.sendfile()` to use `send()` module - * change `res.send` to use "response-send" module - * remove `app.locals.use` and `res.locals.use`, use regular middleware - -3.0.0beta5 / 2012-07-03 -================== - - * add "make check" support - * add route-map example - * add `res.json(obj, status)` support back for BC - * add "methods" dep, remove internal methods module - * update connect dep - * update auth example to utilize cores pbkdf2 - * updated tests to use "supertest" - -3.0.0beta4 / 2012-06-25 -================== - - * Added `req.auth` - * Added `req.range(size)` - * Added `res.links(obj)` - * Added `res.send(body, status)` support back for backwards compat - * Added `.default()` support to `res.format()` - * Added 2xx / 304 check to `req.fresh` - * Revert "Added + support to the router" - * Fixed `res.send()` freshness check, respect res.statusCode - -3.0.0beta3 / 2012-06-15 -================== - - * Added hogan `--hjs` to express(1) [nullfirm] - * Added another example to content-negotiation - * Added `fresh` dep - * Changed: `res.send()` always checks freshness - * Fixed: expose connects mime module. Cloases #1165 - -3.0.0beta2 / 2012-06-06 -================== - - * Added `+` support to the router - * Added `req.host` - * Changed `req.param()` to check route first - * Update connect dep - -3.0.0beta1 / 2012-06-01 -================== - - * Added `res.format()` callback to override default 406 behaviour - * Fixed `res.redirect()` 406. Closes #1154 - -3.0.0alpha5 / 2012-05-30 -================== - - * Added `req.ip` - * Added `{ signed: true }` option to `res.cookie()` - * Removed `res.signedCookie()` - * Changed: dont reverse `req.ips` - * Fixed "trust proxy" setting check for `req.ips` - -3.0.0alpha4 / 2012-05-09 -================== - - * Added: allow `[]` in jsonp callback. Closes #1128 - * Added `PORT` env var support in generated template. Closes #1118 [benatkin] - * Updated: connect 2.2.2 - -3.0.0alpha3 / 2012-05-04 -================== - - * Added public `app.routes`. Closes #887 - * Added _view-locals_ example - * Added _mvc_ example - * Added `res.locals.use()`. Closes #1120 - * Added conditional-GET support to `res.send()` - * Added: coerce `res.set()` values to strings - * Changed: moved `static()` in generated apps below router - * Changed: `res.send()` only set ETag when not previously set - * Changed connect 2.2.1 dep - * Changed: `make test` now runs unit / acceptance tests - * Fixed req/res proto inheritance - -3.0.0alpha2 / 2012-04-26 -================== - - * Added `make benchmark` back - * Added `res.send()` support for `String` objects - * Added client-side data exposing example - * Added `res.header()` and `req.header()` aliases for BC - * Added `express.createServer()` for BC - * Perf: memoize parsed urls - * Perf: connect 2.2.0 dep - * Changed: make `expressInit()` middleware self-aware - * Fixed: use app.get() for all core settings - * Fixed redis session example - * Fixed session example. Closes #1105 - * Fixed generated express dep. Closes #1078 - -3.0.0alpha1 / 2012-04-15 -================== - - * Added `app.locals.use(callback)` - * Added `app.locals` object - * Added `app.locals(obj)` - * Added `res.locals` object - * Added `res.locals(obj)` - * Added `res.format()` for content-negotiation - * Added `app.engine()` - * Added `res.cookie()` JSON cookie support - * Added "trust proxy" setting - * Added `req.subdomains` - * Added `req.protocol` - * Added `req.secure` - * Added `req.path` - * Added `req.ips` - * Added `req.fresh` - * Added `req.stale` - * Added comma-delmited / array support for `req.accepts()` - * Added debug instrumentation - * Added `res.set(obj)` - * Added `res.set(field, value)` - * Added `res.get(field)` - * Added `app.get(setting)`. Closes #842 - * Added `req.acceptsLanguage()` - * Added `req.acceptsCharset()` - * Added `req.accepted` - * Added `req.acceptedLanguages` - * Added `req.acceptedCharsets` - * Added "json replacer" setting - * Added "json spaces" setting - * Added X-Forwarded-Proto support to `res.redirect()`. Closes #92 - * Added `--less` support to express(1) - * Added `express.response` prototype - * Added `express.request` prototype - * Added `express.application` prototype - * Added `app.path()` - * Added `app.render()` - * Added `res.type()` to replace `res.contentType()` - * Changed: `res.redirect()` to add relative support - * Changed: enable "jsonp callback" by default - * Changed: renamed "case sensitive routes" to "case sensitive routing" - * Rewrite of all tests with mocha - * Removed "root" setting - * Removed `res.redirect('home')` support - * Removed `req.notify()` - * Removed `app.register()` - * Removed `app.redirect()` - * Removed `app.is()` - * Removed `app.helpers()` - * Removed `app.dynamicHelpers()` - * Fixed `res.sendfile()` with non-GET. Closes #723 - * Fixed express(1) public dir for windows. Closes #866 - -2.5.9/ 2012-04-02 -================== - - * Added support for PURGE request method [pbuyle] - * Fixed `express(1)` generated app `app.address()` before `listening` [mmalecki] - -2.5.8 / 2012-02-08 -================== - - * Update mkdirp dep. Closes #991 - -2.5.7 / 2012-02-06 -================== - - * Fixed `app.all` duplicate DELETE requests [mscdex] - -2.5.6 / 2012-01-13 -================== - - * Updated hamljs dev dep. Closes #953 - -2.5.5 / 2012-01-08 -================== - - * Fixed: set `filename` on cached templates [matthewleon] - -2.5.4 / 2012-01-02 -================== - - * Fixed `express(1)` eol on 0.4.x. Closes #947 - -2.5.3 / 2011-12-30 -================== - - * Fixed `req.is()` when a charset is present - -2.5.2 / 2011-12-10 -================== - - * Fixed: express(1) LF -> CRLF for windows - -2.5.1 / 2011-11-17 -================== - - * Changed: updated connect to 1.8.x - * Removed sass.js support from express(1) - -2.5.0 / 2011-10-24 -================== - - * Added ./routes dir for generated app by default - * Added npm install reminder to express(1) app gen - * Added 0.5.x support - * Removed `make test-cov` since it wont work with node 0.5.x - * Fixed express(1) public dir for windows. Closes #866 - -2.4.7 / 2011-10-05 -================== - - * Added mkdirp to express(1). Closes #795 - * Added simple _json-config_ example - * Added shorthand for the parsed request's pathname via `req.path` - * Changed connect dep to 1.7.x to fix npm issue... - * Fixed `res.redirect()` __HEAD__ support. [reported by xerox] - * Fixed `req.flash()`, only escape args - * Fixed absolute path checking on windows. Closes #829 [reported by andrewpmckenzie] - -2.4.6 / 2011-08-22 -================== - - * Fixed multiple param callback regression. Closes #824 [reported by TroyGoode] - -2.4.5 / 2011-08-19 -================== - - * Added support for routes to handle errors. Closes #809 - * Added `app.routes.all()`. Closes #803 - * Added "basepath" setting to work in conjunction with reverse proxies etc. - * Refactored `Route` to use a single array of callbacks - * Added support for multiple callbacks for `app.param()`. Closes #801 -Closes #805 - * Changed: removed .call(self) for route callbacks - * Dependency: `qs >= 0.3.1` - * Fixed `res.redirect()` on windows due to `join()` usage. Closes #808 - -2.4.4 / 2011-08-05 -================== - - * Fixed `res.header()` intention of a set, even when `undefined` - * Fixed `*`, value no longer required - * Fixed `res.send(204)` support. Closes #771 - -2.4.3 / 2011-07-14 -================== - - * Added docs for `status` option special-case. Closes #739 - * Fixed `options.filename`, exposing the view path to template engines - -2.4.2. / 2011-07-06 -================== - - * Revert "removed jsonp stripping" for XSS - -2.4.1 / 2011-07-06 -================== - - * Added `res.json()` JSONP support. Closes #737 - * Added _extending-templates_ example. Closes #730 - * Added "strict routing" setting for trailing slashes - * Added support for multiple envs in `app.configure()` calls. Closes #735 - * Changed: `res.send()` using `res.json()` - * Changed: when cookie `path === null` don't default it - * Changed; default cookie path to "home" setting. Closes #731 - * Removed _pids/logs_ creation from express(1) - -2.4.0 / 2011-06-28 -================== - - * Added chainable `res.status(code)` - * Added `res.json()`, an explicit version of `res.send(obj)` - * Added simple web-service example - -2.3.12 / 2011-06-22 -================== - - * \#express is now on freenode! come join! - * Added `req.get(field, param)` - * Added links to Japanese documentation, thanks @hideyukisaito! - * Added; the `express(1)` generated app outputs the env - * Added `content-negotiation` example - * Dependency: connect >= 1.5.1 < 2.0.0 - * Fixed view layout bug. Closes #720 - * Fixed; ignore body on 304. Closes #701 - -2.3.11 / 2011-06-04 -================== - - * Added `npm test` - * Removed generation of dummy test file from `express(1)` - * Fixed; `express(1)` adds express as a dep - * Fixed; prune on `prepublish` - -2.3.10 / 2011-05-27 -================== - - * Added `req.route`, exposing the current route - * Added _package.json_ generation support to `express(1)` - * Fixed call to `app.param()` function for optional params. Closes #682 - -2.3.9 / 2011-05-25 -================== - - * Fixed bug-ish with `../' in `res.partial()` calls - -2.3.8 / 2011-05-24 -================== - - * Fixed `app.options()` - -2.3.7 / 2011-05-23 -================== - - * Added route `Collection`, ex: `app.get('/user/:id').remove();` - * Added support for `app.param(fn)` to define param logic - * Removed `app.param()` support for callback with return value - * Removed module.parent check from express(1) generated app. Closes #670 - * Refactored router. Closes #639 - -2.3.6 / 2011-05-20 -================== - - * Changed; using devDependencies instead of git submodules - * Fixed redis session example - * Fixed markdown example - * Fixed view caching, should not be enabled in development - -2.3.5 / 2011-05-20 -================== - - * Added export `.view` as alias for `.View` - -2.3.4 / 2011-05-08 -================== - - * Added `./examples/say` - * Fixed `res.sendfile()` bug preventing the transfer of files with spaces - -2.3.3 / 2011-05-03 -================== - - * Added "case sensitive routes" option. - * Changed; split methods supported per rfc [slaskis] - * Fixed route-specific middleware when using the same callback function several times - -2.3.2 / 2011-04-27 -================== - - * Fixed view hints - -2.3.1 / 2011-04-26 -================== - - * Added `app.match()` as `app.match.all()` - * Added `app.lookup()` as `app.lookup.all()` - * Added `app.remove()` for `app.remove.all()` - * Added `app.remove.VERB()` - * Fixed template caching collision issue. Closes #644 - * Moved router over from connect and started refactor - -2.3.0 / 2011-04-25 -================== - - * Added options support to `res.clearCookie()` - * Added `res.helpers()` as alias of `res.locals()` - * Added; json defaults to UTF-8 with `res.send()`. Closes #632. [Daniel * Dependency `connect >= 1.4.0` - * Changed; auto set Content-Type in res.attachement [Aaron Heckmann] - * Renamed "cache views" to "view cache". Closes #628 - * Fixed caching of views when using several apps. Closes #637 - * Fixed gotcha invoking `app.param()` callbacks once per route middleware. -Closes #638 - * Fixed partial lookup precedence. Closes #631 -Shaw] - -2.2.2 / 2011-04-12 -================== - - * Added second callback support for `res.download()` connection errors - * Fixed `filename` option passing to template engine - -2.2.1 / 2011-04-04 -================== - - * Added `layout(path)` helper to change the layout within a view. Closes #610 - * Fixed `partial()` collection object support. - Previously only anything with `.length` would work. - When `.length` is present one must still be aware of holes, - however now `{ collection: {foo: 'bar'}}` is valid, exposes - `keyInCollection` and `keysInCollection`. - - * Performance improved with better view caching - * Removed `request` and `response` locals - * Changed; errorHandler page title is now `Express` instead of `Connect` - -2.2.0 / 2011-03-30 -================== - - * Added `app.lookup.VERB()`, ex `app.lookup.put('/user/:id')`. Closes #606 - * Added `app.match.VERB()`, ex `app.match.put('/user/12')`. Closes #606 - * Added `app.VERB(path)` as alias of `app.lookup.VERB()`. - * Dependency `connect >= 1.2.0` - -2.1.1 / 2011-03-29 -================== - - * Added; expose `err.view` object when failing to locate a view - * Fixed `res.partial()` call `next(err)` when no callback is given [reported by aheckmann] - * Fixed; `res.send(undefined)` responds with 204 [aheckmann] - -2.1.0 / 2011-03-24 -================== - - * Added `/_?` partial lookup support. Closes #447 - * Added `request`, `response`, and `app` local variables - * Added `settings` local variable, containing the app's settings - * Added `req.flash()` exception if `req.session` is not available - * Added `res.send(bool)` support (json response) - * Fixed stylus example for latest version - * Fixed; wrap try/catch around `res.render()` - -2.0.0 / 2011-03-17 -================== - - * Fixed up index view path alternative. - * Changed; `res.locals()` without object returns the locals - -2.0.0rc3 / 2011-03-17 -================== - - * Added `res.locals(obj)` to compliment `res.local(key, val)` - * Added `res.partial()` callback support - * Fixed recursive error reporting issue in `res.render()` - -2.0.0rc2 / 2011-03-17 -================== - - * Changed; `partial()` "locals" are now optional - * Fixed `SlowBuffer` support. Closes #584 [reported by tyrda01] - * Fixed .filename view engine option [reported by drudge] - * Fixed blog example - * Fixed `{req,res}.app` reference when mounting [Ben Weaver] - -2.0.0rc / 2011-03-14 -================== - - * Fixed; expose `HTTPSServer` constructor - * Fixed express(1) default test charset. Closes #579 [reported by secoif] - * Fixed; default charset to utf-8 instead of utf8 for lame IE [reported by NickP] - -2.0.0beta3 / 2011-03-09 -================== - - * Added support for `res.contentType()` literal - The original `res.contentType('.json')`, - `res.contentType('application/json')`, and `res.contentType('json')` - will work now. - * Added `res.render()` status option support back - * Added charset option for `res.render()` - * Added `.charset` support (via connect 1.0.4) - * Added view resolution hints when in development and a lookup fails - * Added layout lookup support relative to the page view. - For example while rendering `./views/user/index.jade` if you create - `./views/user/layout.jade` it will be used in favour of the root layout. - * Fixed `res.redirect()`. RFC states absolute url [reported by unlink] - * Fixed; default `res.send()` string charset to utf8 - * Removed `Partial` constructor (not currently used) - -2.0.0beta2 / 2011-03-07 -================== - - * Added res.render() `.locals` support back to aid in migration process - * Fixed flash example - -2.0.0beta / 2011-03-03 -================== - - * Added HTTPS support - * Added `res.cookie()` maxAge support - * Added `req.header()` _Referrer_ / _Referer_ special-case, either works - * Added mount support for `res.redirect()`, now respects the mount-point - * Added `union()` util, taking place of `merge(clone())` combo - * Added stylus support to express(1) generated app - * Added secret to session middleware used in examples and generated app - * Added `res.local(name, val)` for progressive view locals - * Added default param support to `req.param(name, default)` - * Added `app.disabled()` and `app.enabled()` - * Added `app.register()` support for omitting leading ".", either works - * Added `res.partial()`, using the same interface as `partial()` within a view. Closes #539 - * Added `app.param()` to map route params to async/sync logic - * Added; aliased `app.helpers()` as `app.locals()`. Closes #481 - * Added extname with no leading "." support to `res.contentType()` - * Added `cache views` setting, defaulting to enabled in "production" env - * Added index file partial resolution, eg: partial('user') may try _views/user/index.jade_. - * Added `req.accepts()` support for extensions - * Changed; `res.download()` and `res.sendfile()` now utilize Connect's - static file server `connect.static.send()`. - * Changed; replaced `connect.utils.mime()` with npm _mime_ module - * Changed; allow `req.query` to be pre-defined (via middleware or other parent - * Changed view partial resolution, now relative to parent view - * Changed view engine signature. no longer `engine.render(str, options, callback)`, now `engine.compile(str, options) -> Function`, the returned function accepts `fn(locals)`. - * Fixed `req.param()` bug returning Array.prototype methods. Closes #552 - * Fixed; using `Stream#pipe()` instead of `sys.pump()` in `res.sendfile()` - * Fixed; using _qs_ module instead of _querystring_ - * Fixed; strip unsafe chars from jsonp callbacks - * Removed "stream threshold" setting - -1.0.8 / 2011-03-01 -================== - - * Allow `req.query` to be pre-defined (via middleware or other parent app) - * "connect": ">= 0.5.0 < 1.0.0". Closes #547 - * Removed the long deprecated __EXPRESS_ENV__ support - -1.0.7 / 2011-02-07 -================== - - * Fixed `render()` setting inheritance. - Mounted apps would not inherit "view engine" - -1.0.6 / 2011-02-07 -================== - - * Fixed `view engine` setting bug when period is in dirname - -1.0.5 / 2011-02-05 -================== - - * Added secret to generated app `session()` call - -1.0.4 / 2011-02-05 -================== - - * Added `qs` dependency to _package.json_ - * Fixed namespaced `require()`s for latest connect support - -1.0.3 / 2011-01-13 -================== - - * Remove unsafe characters from JSONP callback names [Ryan Grove] - -1.0.2 / 2011-01-10 -================== - - * Removed nested require, using `connect.router` - -1.0.1 / 2010-12-29 -================== - - * Fixed for middleware stacked via `createServer()` - previously the `foo` middleware passed to `createServer(foo)` - would not have access to Express methods such as `res.send()` - or props like `req.query` etc. - -1.0.0 / 2010-11-16 -================== - - * Added; deduce partial object names from the last segment. - For example by default `partial('forum/post', postObject)` will - give you the _post_ object, providing a meaningful default. - * Added http status code string representation to `res.redirect()` body - * Added; `res.redirect()` supporting _text/plain_ and _text/html_ via __Accept__. - * Added `req.is()` to aid in content negotiation - * Added partial local inheritance [suggested by masylum]. Closes #102 - providing access to parent template locals. - * Added _-s, --session[s]_ flag to express(1) to add session related middleware - * Added _--template_ flag to express(1) to specify the - template engine to use. - * Added _--css_ flag to express(1) to specify the - stylesheet engine to use (or just plain css by default). - * Added `app.all()` support [thanks aheckmann] - * Added partial direct object support. - You may now `partial('user', user)` providing the "user" local, - vs previously `partial('user', { object: user })`. - * Added _route-separation_ example since many people question ways - to do this with CommonJS modules. Also view the _blog_ example for - an alternative. - * Performance; caching view path derived partial object names - * Fixed partial local inheritance precedence. [reported by Nick Poulden] Closes #454 - * Fixed jsonp support; _text/javascript_ as per mailinglist discussion - -1.0.0rc4 / 2010-10-14 -================== - - * Added _NODE_ENV_ support, _EXPRESS_ENV_ is deprecated and will be removed in 1.0.0 - * Added route-middleware support (very helpful, see the [docs](http://expressjs.com/guide.html#Route-Middleware)) - * Added _jsonp callback_ setting to enable/disable jsonp autowrapping [Dav Glass] - * Added callback query check on response.send to autowrap JSON objects for simple webservice implementations [Dav Glass] - * Added `partial()` support for array-like collections. Closes #434 - * Added support for swappable querystring parsers - * Added session usage docs. Closes #443 - * Added dynamic helper caching. Closes #439 [suggested by maritz] - * Added authentication example - * Added basic Range support to `res.sendfile()` (and `res.download()` etc) - * Changed; `express(1)` generated app using 2 spaces instead of 4 - * Default env to "development" again [aheckmann] - * Removed _context_ option is no more, use "scope" - * Fixed; exposing _./support_ libs to examples so they can run without installs - * Fixed mvc example - -1.0.0rc3 / 2010-09-20 -================== - - * Added confirmation for `express(1)` app generation. Closes #391 - * Added extending of flash formatters via `app.flashFormatters` - * Added flash formatter support. Closes #411 - * Added streaming support to `res.sendfile()` using `sys.pump()` when >= "stream threshold" - * Added _stream threshold_ setting for `res.sendfile()` - * Added `res.send()` __HEAD__ support - * Added `res.clearCookie()` - * Added `res.cookie()` - * Added `res.render()` headers option - * Added `res.redirect()` response bodies - * Added `res.render()` status option support. Closes #425 [thanks aheckmann] - * Fixed `res.sendfile()` responding with 403 on malicious path - * Fixed `res.download()` bug; when an error occurs remove _Content-Disposition_ - * Fixed; mounted apps settings now inherit from parent app [aheckmann] - * Fixed; stripping Content-Length / Content-Type when 204 - * Fixed `res.send()` 204. Closes #419 - * Fixed multiple _Set-Cookie_ headers via `res.header()`. Closes #402 - * Fixed bug messing with error handlers when `listenFD()` is called instead of `listen()`. [thanks guillermo] - - -1.0.0rc2 / 2010-08-17 -================== - - * Added `app.register()` for template engine mapping. Closes #390 - * Added `res.render()` callback support as second argument (no options) - * Added callback support to `res.download()` - * Added callback support for `res.sendfile()` - * Added support for middleware access via `express.middlewareName()` vs `connect.middlewareName()` - * Added "partials" setting to docs - * Added default expresso tests to `express(1)` generated app. Closes #384 - * Fixed `res.sendfile()` error handling, defer via `next()` - * Fixed `res.render()` callback when a layout is used [thanks guillermo] - * Fixed; `make install` creating ~/.node_libraries when not present - * Fixed issue preventing error handlers from being defined anywhere. Closes #387 - -1.0.0rc / 2010-07-28 -================== - - * Added mounted hook. Closes #369 - * Added connect dependency to _package.json_ - - * Removed "reload views" setting and support code - development env never caches, production always caches. - - * Removed _param_ in route callbacks, signature is now - simply (req, res, next), previously (req, res, params, next). - Use _req.params_ for path captures, _req.query_ for GET params. - - * Fixed "home" setting - * Fixed middleware/router precedence issue. Closes #366 - * Fixed; _configure()_ callbacks called immediately. Closes #368 - -1.0.0beta2 / 2010-07-23 -================== - - * Added more examples - * Added; exporting `Server` constructor - * Added `Server#helpers()` for view locals - * Added `Server#dynamicHelpers()` for dynamic view locals. Closes #349 - * Added support for absolute view paths - * Added; _home_ setting defaults to `Server#route` for mounted apps. Closes #363 - * Added Guillermo Rauch to the contributor list - * Added support for "as" for non-collection partials. Closes #341 - * Fixed _install.sh_, ensuring _~/.node_libraries_ exists. Closes #362 [thanks jf] - * Fixed `res.render()` exceptions, now passed to `next()` when no callback is given [thanks guillermo] - * Fixed instanceof `Array` checks, now `Array.isArray()` - * Fixed express(1) expansion of public dirs. Closes #348 - * Fixed middleware precedence. Closes #345 - * Fixed view watcher, now async [thanks aheckmann] - -1.0.0beta / 2010-07-15 -================== - - * Re-write - - much faster - - much lighter - - Check [ExpressJS.com](http://expressjs.com) for migration guide and updated docs - -0.14.0 / 2010-06-15 -================== - - * Utilize relative requires - * Added Static bufferSize option [aheckmann] - * Fixed caching of view and partial subdirectories [aheckmann] - * Fixed mime.type() comments now that ".ext" is not supported - * Updated haml submodule - * Updated class submodule - * Removed bin/express - -0.13.0 / 2010-06-01 -================== - - * Added node v0.1.97 compatibility - * Added support for deleting cookies via Request#cookie('key', null) - * Updated haml submodule - * Fixed not-found page, now using using charset utf-8 - * Fixed show-exceptions page, now using using charset utf-8 - * Fixed view support due to fs.readFile Buffers - * Changed; mime.type() no longer accepts ".type" due to node extname() changes - -0.12.0 / 2010-05-22 -================== - - * Added node v0.1.96 compatibility - * Added view `helpers` export which act as additional local variables - * Updated haml submodule - * Changed ETag; removed inode, modified time only - * Fixed LF to CRLF for setting multiple cookies - * Fixed cookie complation; values are now urlencoded - * Fixed cookies parsing; accepts quoted values and url escaped cookies - -0.11.0 / 2010-05-06 -================== - - * Added support for layouts using different engines - - this.render('page.html.haml', { layout: 'super-cool-layout.html.ejs' }) - - this.render('page.html.haml', { layout: 'foo' }) // assumes 'foo.html.haml' - - this.render('page.html.haml', { layout: false }) // no layout - * Updated ext submodule - * Updated haml submodule - * Fixed EJS partial support by passing along the context. Issue #307 - -0.10.1 / 2010-05-03 -================== - - * Fixed binary uploads. - -0.10.0 / 2010-04-30 -================== - - * Added charset support via Request#charset (automatically assigned to 'UTF-8' when respond()'s - encoding is set to 'utf8' or 'utf-8'. - * Added "encoding" option to Request#render(). Closes #299 - * Added "dump exceptions" setting, which is enabled by default. - * Added simple ejs template engine support - * Added error reponse support for text/plain, application/json. Closes #297 - * Added callback function param to Request#error() - * Added Request#sendHead() - * Added Request#stream() - * Added support for Request#respond(304, null) for empty response bodies - * Added ETag support to Request#sendfile() - * Added options to Request#sendfile(), passed to fs.createReadStream() - * Added filename arg to Request#download() - * Performance enhanced due to pre-reversing plugins so that plugins.reverse() is not called on each request - * Performance enhanced by preventing several calls to toLowerCase() in Router#match() - * Changed; Request#sendfile() now streams - * Changed; Renamed Request#halt() to Request#respond(). Closes #289 - * Changed; Using sys.inspect() instead of JSON.encode() for error output - * Changed; run() returns the http.Server instance. Closes #298 - * Changed; Defaulting Server#host to null (INADDR_ANY) - * Changed; Logger "common" format scale of 0.4f - * Removed Logger "request" format - * Fixed; Catching ENOENT in view caching, preventing error when "views/partials" is not found - * Fixed several issues with http client - * Fixed Logger Content-Length output - * Fixed bug preventing Opera from retaining the generated session id. Closes #292 - -0.9.0 / 2010-04-14 -================== - - * Added DSL level error() route support - * Added DSL level notFound() route support - * Added Request#error() - * Added Request#notFound() - * Added Request#render() callback function. Closes #258 - * Added "max upload size" setting - * Added "magic" variables to collection partials (\_\_index\_\_, \_\_length\_\_, \_\_isFirst\_\_, \_\_isLast\_\_). Closes #254 - * Added [haml.js](http://github.com/visionmedia/haml.js) submodule; removed haml-js - * Added callback function support to Request#halt() as 3rd/4th arg - * Added preprocessing of route param wildcards using param(). Closes #251 - * Added view partial support (with collections etc) - * Fixed bug preventing falsey params (such as ?page=0). Closes #286 - * Fixed setting of multiple cookies. Closes #199 - * Changed; view naming convention is now NAME.TYPE.ENGINE (for example page.html.haml) - * Changed; session cookie is now httpOnly - * Changed; Request is no longer global - * Changed; Event is no longer global - * Changed; "sys" module is no longer global - * Changed; moved Request#download to Static plugin where it belongs - * Changed; Request instance created before body parsing. Closes #262 - * Changed; Pre-caching views in memory when "cache view contents" is enabled. Closes #253 - * Changed; Pre-caching view partials in memory when "cache view partials" is enabled - * Updated support to node --version 0.1.90 - * Updated dependencies - * Removed set("session cookie") in favour of use(Session, { cookie: { ... }}) - * Removed utils.mixin(); use Object#mergeDeep() - -0.8.0 / 2010-03-19 -================== - - * Added coffeescript example app. Closes #242 - * Changed; cache api now async friendly. Closes #240 - * Removed deprecated 'express/static' support. Use 'express/plugins/static' - -0.7.6 / 2010-03-19 -================== - - * Added Request#isXHR. Closes #229 - * Added `make install` (for the executable) - * Added `express` executable for setting up simple app templates - * Added "GET /public/*" to Static plugin, defaulting to /public - * Added Static plugin - * Fixed; Request#render() only calls cache.get() once - * Fixed; Namespacing View caches with "view:" - * Fixed; Namespacing Static caches with "static:" - * Fixed; Both example apps now use the Static plugin - * Fixed set("views"). Closes #239 - * Fixed missing space for combined log format - * Deprecated Request#sendfile() and 'express/static' - * Removed Server#running - -0.7.5 / 2010-03-16 -================== - - * Added Request#flash() support without args, now returns all flashes - * Updated ext submodule - -0.7.4 / 2010-03-16 -================== - - * Fixed session reaper - * Changed; class.js replacing js-oo Class implementation (quite a bit faster, no browser cruft) - -0.7.3 / 2010-03-16 -================== - - * Added package.json - * Fixed requiring of haml / sass due to kiwi removal - -0.7.2 / 2010-03-16 -================== - - * Fixed GIT submodules (HAH!) - -0.7.1 / 2010-03-16 -================== - - * Changed; Express now using submodules again until a PM is adopted - * Changed; chat example using millisecond conversions from ext - -0.7.0 / 2010-03-15 -================== - - * Added Request#pass() support (finds the next matching route, or the given path) - * Added Logger plugin (default "common" format replaces CommonLogger) - * Removed Profiler plugin - * Removed CommonLogger plugin - -0.6.0 / 2010-03-11 -================== - - * Added seed.yml for kiwi package management support - * Added HTTP client query string support when method is GET. Closes #205 - - * Added support for arbitrary view engines. - For example "foo.engine.html" will now require('engine'), - the exports from this module are cached after the first require(). - - * Added async plugin support - - * Removed usage of RESTful route funcs as http client - get() etc, use http.get() and friends - - * Removed custom exceptions - -0.5.0 / 2010-03-10 -================== - - * Added ext dependency (library of js extensions) - * Removed extname() / basename() utils. Use path module - * Removed toArray() util. Use arguments.values - * Removed escapeRegexp() util. Use RegExp.escape() - * Removed process.mixin() dependency. Use utils.mixin() - * Removed Collection - * Removed ElementCollection - * Shameless self promotion of ebook "Advanced JavaScript" (http://dev-mag.com) ;) - -0.4.0 / 2010-02-11 -================== - - * Added flash() example to sample upload app - * Added high level restful http client module (express/http) - * Changed; RESTful route functions double as HTTP clients. Closes #69 - * Changed; throwing error when routes are added at runtime - * Changed; defaulting render() context to the current Request. Closes #197 - * Updated haml submodule - -0.3.0 / 2010-02-11 -================== - - * Updated haml / sass submodules. Closes #200 - * Added flash message support. Closes #64 - * Added accepts() now allows multiple args. fixes #117 - * Added support for plugins to halt. Closes #189 - * Added alternate layout support. Closes #119 - * Removed Route#run(). Closes #188 - * Fixed broken specs due to use(Cookie) missing - -0.2.1 / 2010-02-05 -================== - - * Added "plot" format option for Profiler (for gnuplot processing) - * Added request number to Profiler plugin - * Fixed binary encoding for multi-part file uploads, was previously defaulting to UTF8 - * Fixed issue with routes not firing when not files are present. Closes #184 - * Fixed process.Promise -> events.Promise - -0.2.0 / 2010-02-03 -================== - - * Added parseParam() support for name[] etc. (allows for file inputs with "multiple" attr) Closes #180 - * Added Both Cache and Session option "reapInterval" may be "reapEvery". Closes #174 - * Added expiration support to cache api with reaper. Closes #133 - * Added cache Store.Memory#reap() - * Added Cache; cache api now uses first class Cache instances - * Added abstract session Store. Closes #172 - * Changed; cache Memory.Store#get() utilizing Collection - * Renamed MemoryStore -> Store.Memory - * Fixed use() of the same plugin several time will always use latest options. Closes #176 - -0.1.0 / 2010-02-03 -================== - - * Changed; Hooks (before / after) pass request as arg as well as evaluated in their context - * Updated node support to 0.1.27 Closes #169 - * Updated dirname(__filename) -> __dirname - * Updated libxmljs support to v0.2.0 - * Added session support with memory store / reaping - * Added quick uid() helper - * Added multi-part upload support - * Added Sass.js support / submodule - * Added production env caching view contents and static files - * Added static file caching. Closes #136 - * Added cache plugin with memory stores - * Added support to StaticFile so that it works with non-textual files. - * Removed dirname() helper - * Removed several globals (now their modules must be required) - -0.0.2 / 2010-01-10 -================== - - * Added view benchmarks; currently haml vs ejs - * Added Request#attachment() specs. Closes #116 - * Added use of node's parseQuery() util. Closes #123 - * Added `make init` for submodules - * Updated Haml - * Updated sample chat app to show messages on load - * Updated libxmljs parseString -> parseHtmlString - * Fixed `make init` to work with older versions of git - * Fixed specs can now run independant specs for those who cant build deps. Closes #127 - * Fixed issues introduced by the node url module changes. Closes 126. - * Fixed two assertions failing due to Collection#keys() returning strings - * Fixed faulty Collection#toArray() spec due to keys() returning strings - * Fixed `make test` now builds libxmljs.node before testing - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/express/LICENSE b/node_modules/express/LICENSE deleted file mode 100644 index d23e93ce..00000000 --- a/node_modules/express/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2009-2013 TJ Holowaychuk - -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. \ No newline at end of file diff --git a/node_modules/express/Makefile b/node_modules/express/Makefile deleted file mode 100644 index a1f33a70..00000000 --- a/node_modules/express/Makefile +++ /dev/null @@ -1,34 +0,0 @@ - -MOCHA_OPTS= --check-leaks -REPORTER = dot - -check: test - -test: test-unit test-acceptance - -test-unit: - @NODE_ENV=test ./node_modules/.bin/mocha \ - --reporter $(REPORTER) \ - --globals setImmediate,clearImmediate \ - $(MOCHA_OPTS) - -test-acceptance: - @NODE_ENV=test ./node_modules/.bin/mocha \ - --reporter $(REPORTER) \ - --bail \ - test/acceptance/*.js - -test-cov: lib-cov - @EXPRESS_COV=1 $(MAKE) test REPORTER=html-cov > coverage.html - -lib-cov: - @jscoverage lib lib-cov - -bench: - @$(MAKE) -C benchmarks - -clean: - rm -f coverage.html - rm -fr lib-cov - -.PHONY: test test-unit test-acceptance bench clean diff --git a/node_modules/express/Readme.md b/node_modules/express/Readme.md deleted file mode 100644 index e1e3f7e9..00000000 --- a/node_modules/express/Readme.md +++ /dev/null @@ -1,126 +0,0 @@ -[![express logo](http://f.cl.ly/items/0V2S1n0K1i3y1c122g04/Screen%20Shot%202012-04-11%20at%209.59.42%20AM.png)](http://expressjs.com/) - - Fast, unopinionated, minimalist web framework for [node](http://nodejs.org). - - [![Build Status](https://secure.travis-ci.org/visionmedia/express.png)](http://travis-ci.org/visionmedia/express) [![Gittip](http://img.shields.io/gittip/visionmedia.png)](https://www.gittip.com/visionmedia/) - -```js -var express = require('express'); -var app = express(); - -app.get('/', function(req, res){ - res.send('Hello World'); -}); - -app.listen(3000); -``` - -## Installation - - $ npm install -g express - -## Quick Start - - The quickest way to get started with express is to utilize the executable `express(1)` to generate an application as shown below: - - Create the app: - - $ npm install -g express - $ express /tmp/foo && cd /tmp/foo - - Install dependencies: - - $ npm install - - Start the server: - - $ node app - -## Features - - * Built on [Connect](http://github.com/senchalabs/connect) - * Robust routing - * HTTP helpers (redirection, caching, etc) - * View system supporting 14+ template engines - * Content negotiation - * Focus on high performance - * Environment based configuration - * Executable for generating applications quickly - * High test coverage - -## Philosophy - - The Express philosophy is to provide small, robust tooling for HTTP servers, making - it a great solution for single page applications, web sites, hybrids, or public - HTTP APIs. - - Built on Connect, you can use _only_ what you need, and nothing more. Applications - can be as big or as small as you like, even a single file. Express does - not force you to use any specific ORM or template engine. With support for over - 14 template engines via [Consolidate.js](http://github.com/visionmedia/consolidate.js), - you can quickly craft your perfect framework. - -## More Information - - * [Website and Documentation](http://expressjs.com/) stored at [visionmedia/expressjs.com](https://github.com/visionmedia/expressjs.com) - * Join #express on freenode - * [Google Group](http://groups.google.com/group/express-js) for discussion - * Follow [tjholowaychuk](http://twitter.com/tjholowaychuk) on twitter for updates - * Visit the [Wiki](http://github.com/visionmedia/express/wiki) - * [Русскоязычная документация](http://jsman.ru/express/) - * Run express examples [online](https://runnable.com/express) - -## Viewing Examples - -Clone the Express repo, then install the dev dependencies to install all the example / test suite dependencies: - - $ git clone git://github.com/visionmedia/express.git --depth 1 - $ cd express - $ npm install - -Then run whichever tests you want: - - $ node examples/content-negotiation - -You can also view live examples here: - - - -## Running Tests - -To run the test suite, first invoke the following command within the repo, installing the development dependencies: - - $ npm install - -Then run the tests: - - $ make test - -## Contributors - - https://github.com/visionmedia/express/graphs/contributors - -## License - -(The MIT License) - -Copyright (c) 2009-2012 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/node_modules/express/benchmarks/Makefile b/node_modules/express/benchmarks/Makefile deleted file mode 100644 index baf0d6fc..00000000 --- a/node_modules/express/benchmarks/Makefile +++ /dev/null @@ -1,13 +0,0 @@ - -all: - @./run 1 middleware - @./run 5 middleware - @./run 10 middleware - @./run 15 middleware - @./run 20 middleware - @./run 30 middleware - @./run 50 middleware - @./run 100 middleware - @echo - -.PHONY: all diff --git a/node_modules/express/benchmarks/middleware.js b/node_modules/express/benchmarks/middleware.js deleted file mode 100644 index 3aa7a8b4..00000000 --- a/node_modules/express/benchmarks/middleware.js +++ /dev/null @@ -1,23 +0,0 @@ - -var http = require('http'); -var express = require('..'); -var app = express(); - -// number of middleware - -var n = parseInt(process.env.MW || '1', 10); -console.log(' %s middleware', n); - -while (n--) { - app.use(function(req, res, next){ - next(); - }); -} - -var body = new Buffer('Hello World'); - -app.use(function(req, res, next){ - res.send(body); -}); - -app.listen(3333); diff --git a/node_modules/express/benchmarks/run b/node_modules/express/benchmarks/run deleted file mode 100755 index 93b5bc52..00000000 --- a/node_modules/express/benchmarks/run +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -echo -MW=$1 node $2 & -pid=$! - -sleep 2 - -wrk 'http://localhost:3333/?foo[bar]=baz' \ - -d 3 \ - -c 50 \ - -t 8 \ - | grep 'Requests/sec' \ - | awk '{ print " " $2 }' - -kill $pid diff --git a/node_modules/express/bin/express b/node_modules/express/bin/express deleted file mode 100755 index cb979288..00000000 --- a/node_modules/express/bin/express +++ /dev/null @@ -1,423 +0,0 @@ -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('commander') - , mkdirp = require('mkdirp') - , pkg = require('../package.json') - , version = pkg.version - , os = require('os') - , fs = require('fs'); - -// CLI - -program - .version(version) - .usage('[options] [dir]') - .option('-s, --sessions', 'add session support') - .option('-e, --ejs', 'add ejs engine support (defaults to jade)') - .option('-J, --jshtml', 'add jshtml engine support (defaults to jade)') - .option('-H, --hogan', 'add hogan.js engine support') - .option('-c, --css ', 'add stylesheet support (less|stylus) (defaults to plain css)') - .option('-f, --force', 'force on non-empty directory') - .parse(process.argv); - -// Path - -var path = program.args.shift() || '.'; - -// end-of-line code - -var eol = os.EOL - -// Template engine - -program.template = 'jade'; -if (program.ejs) program.template = 'ejs'; -if (program.jshtml) program.template = 'jshtml'; -if (program.hogan) program.template = 'hjs'; - -/** - * Routes index template. - */ - -var index = [ - '' - , '/*' - , ' * GET home page.' - , ' */' - , '' - , 'exports.index = function(req, res){' - , ' res.render(\'index\', { title: \'Express\' });' - , '};' -].join(eol); - -/** - * Routes users template. - */ - -var users = [ - '' - , '/*' - , ' * GET users listing.' - , ' */' - , '' - , 'exports.list = function(req, res){' - , ' res.send("respond with a resource");' - , '};' -].join(eol); - -/** - * Jade layout template. - */ - -var jadeLayout = [ - 'doctype html' - , 'html' - , ' head' - , ' title= title' - , ' link(rel=\'stylesheet\', href=\'/stylesheets/style.css\')' - , ' body' - , ' block content' -].join(eol); - -/** - * Jade index template. - */ - -var jadeIndex = [ - 'extends layout' - , '' - , 'block content' - , ' h1= title' - , ' p Welcome to #{title}' -].join(eol); - -/** - * EJS index template. - */ - -var ejsIndex = [ - '' - , '' - , ' ' - , ' <%= title %>' - , ' ' - , ' ' - , ' ' - , '

<%= title %>

' - , '

Welcome to <%= title %>

' - , ' ' - , '' -].join(eol); - -/** - * JSHTML layout template. - */ - -var jshtmlLayout = [ - '' - , '' - , ' ' - , ' @write(title) ' - , ' ' - , ' ' - , ' ' - , ' @write(body)' - , ' ' - , '' -].join(eol); - -/** - * JSHTML index template. - */ - -var jshtmlIndex = [ - '

@write(title)

' - , '

Welcome to @write(title)

' -].join(eol); - -/** - * Hogan.js index template. - */ -var hoganIndex = [ - '' - , '' - , ' ' - , ' {{ title }}' - , ' ' - , ' ' - , ' ' - , '

{{ title }}

' - , '

Welcome to {{ title }}

' - , ' ' - , '' -].join(eol); - -/** - * Default css template. - */ - -var css = [ - 'body {' - , ' padding: 50px;' - , ' font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;' - , '}' - , '' - , 'a {' - , ' color: #00B7FF;' - , '}' -].join(eol); - -/** - * Default less template. - */ - -var less = [ - 'body {' - , ' padding: 50px;' - , ' font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;' - , '}' - , '' - , 'a {' - , ' color: #00B7FF;' - , '}' -].join(eol); - -/** - * Default stylus template. - */ - -var stylus = [ - 'body' - , ' padding: 50px' - , ' font: 14px "Lucida Grande", Helvetica, Arial, sans-serif' - , 'a' - , ' color: #00B7FF' -].join(eol); - -/** - * App template. - */ - -var app = [ - '' - , '/**' - , ' * Module dependencies.' - , ' */' - , '' - , 'var express = require(\'express\');' - , 'var routes = require(\'./routes\');' - , 'var user = require(\'./routes/user\');' - , 'var http = require(\'http\');' - , 'var path = require(\'path\');' - , '' - , 'var app = express();' - , '' - , '// all environments' - , 'app.set(\'port\', process.env.PORT || 3000);' - , 'app.set(\'views\', path.join(__dirname, \'views\'));' - , 'app.set(\'view engine\', \':TEMPLATE\');' - , 'app.use(express.favicon());' - , 'app.use(express.logger(\'dev\'));' - , 'app.use(express.json());' - , 'app.use(express.urlencoded());' - , 'app.use(express.methodOverride());{sess}' - , 'app.use(app.router);{css}' - , 'app.use(express.static(path.join(__dirname, \'public\')));' - , '' - , '// development only' - , 'if (\'development\' == app.get(\'env\')) {' - , ' app.use(express.errorHandler());' - , '}' - , '' - , 'app.get(\'/\', routes.index);' - , 'app.get(\'/users\', user.list);' - , '' - , 'http.createServer(app).listen(app.get(\'port\'), function(){' - , ' console.log(\'Express server listening on port \' + app.get(\'port\'));' - , '});' - , '' -].join(eol); - -// Generate application - -(function createApplication(path) { - emptyDirectory(path, function(empty){ - if (empty || program.force) { - createApplicationAt(path); - } else { - program.confirm('destination is not empty, continue? ', function(ok){ - if (ok) { - process.stdin.destroy(); - createApplicationAt(path); - } else { - abort('aborting'); - } - }); - } - }); -})(path); - -/** - * Create application at the given directory `path`. - * - * @param {String} path - */ - -function createApplicationAt(path) { - console.log(); - process.on('exit', function(){ - console.log(); - console.log(' install dependencies:'); - console.log(' $ cd %s && npm install', path); - console.log(); - console.log(' run the app:'); - console.log(' $ node app'); - console.log(); - }); - - mkdir(path, function(){ - mkdir(path + '/public'); - mkdir(path + '/public/javascripts'); - mkdir(path + '/public/images'); - mkdir(path + '/public/stylesheets', function(){ - switch (program.css) { - case 'less': - write(path + '/public/stylesheets/style.less', less); - break; - case 'stylus': - write(path + '/public/stylesheets/style.styl', stylus); - break; - default: - write(path + '/public/stylesheets/style.css', css); - } - }); - - mkdir(path + '/routes', function(){ - write(path + '/routes/index.js', index); - write(path + '/routes/user.js', users); - }); - - mkdir(path + '/views', function(){ - switch (program.template) { - case 'ejs': - write(path + '/views/index.ejs', ejsIndex); - break; - case 'jade': - write(path + '/views/layout.jade', jadeLayout); - write(path + '/views/index.jade', jadeIndex); - break; - case 'jshtml': - write(path + '/views/layout.jshtml', jshtmlLayout); - write(path + '/views/index.jshtml', jshtmlIndex); - break; - case 'hjs': - write(path + '/views/index.hjs', hoganIndex); - break; - - } - }); - - // CSS Engine support - switch (program.css) { - case 'less': - app = app.replace('{css}', eol + 'app.use(require(\'less-middleware\')({ src: path.join(__dirname, \'public\') }));'); - break; - case 'stylus': - app = app.replace('{css}', eol + 'app.use(require(\'stylus\').middleware(path.join(__dirname, \'public\')));'); - break; - default: - app = app.replace('{css}', ''); - } - - // Session support - app = app.replace('{sess}', program.sessions - ? eol + 'app.use(express.cookieParser(\'your secret here\'));' + eol + 'app.use(express.session());' - : ''); - - // Template support - app = app.replace(':TEMPLATE', program.template); - - // package.json - var pkg = { - name: 'application-name' - , version: '0.0.1' - , private: true - , scripts: { start: 'node app.js' } - , dependencies: { - express: version - } - } - - if (program.template) pkg.dependencies[program.template] = '*'; - - // CSS Engine support - switch (program.css) { - case 'less': - pkg.dependencies['less-middleware'] = '*'; - break; - default: - if (program.css) { - pkg.dependencies[program.css] = '*'; - } - } - - write(path + '/package.json', JSON.stringify(pkg, null, 2)); - write(path + '/app.js', app); - }); -} - -/** - * Check if the given directory `path` is empty. - * - * @param {String} path - * @param {Function} fn - */ - -function emptyDirectory(path, fn) { - fs.readdir(path, function(err, files){ - if (err && 'ENOENT' != err.code) throw err; - fn(!files || !files.length); - }); -} - -/** - * echo str > path. - * - * @param {String} path - * @param {String} str - */ - -function write(path, str) { - fs.writeFile(path, str); - console.log(' \x1b[36mcreate\x1b[0m : ' + path); -} - -/** - * Mkdir -p. - * - * @param {String} path - * @param {Function} fn - */ - -function mkdir(path, fn) { - mkdirp(path, 0755, function(err){ - if (err) throw err; - console.log(' \033[36mcreate\033[0m : ' + path); - fn && fn(); - }); -} - -/** - * Exit with the given `str`. - * - * @param {String} str - */ - -function abort(str) { - console.error(str); - process.exit(1); -} diff --git a/node_modules/express/index.js b/node_modules/express/index.js deleted file mode 100644 index bfe99345..00000000 --- a/node_modules/express/index.js +++ /dev/null @@ -1,4 +0,0 @@ - -module.exports = process.env.EXPRESS_COV - ? require('./lib-cov/express') - : require('./lib/express'); \ No newline at end of file diff --git a/node_modules/express/lib/application.js b/node_modules/express/lib/application.js deleted file mode 100644 index 865e1e02..00000000 --- a/node_modules/express/lib/application.js +++ /dev/null @@ -1,534 +0,0 @@ -/** - * Module dependencies. - */ - -var connect = require('connect') - , Router = require('./router') - , methods = require('methods') - , middleware = require('./middleware') - , debug = require('debug')('express:application') - , locals = require('./utils').locals - , View = require('./view') - , utils = connect.utils - , http = require('http'); - -/** - * Application prototype. - */ - -var app = exports = module.exports = {}; - -/** - * Initialize the server. - * - * - setup default configuration - * - setup default middleware - * - setup route reflection methods - * - * @api private - */ - -app.init = function(){ - this.cache = {}; - this.settings = {}; - this.engines = {}; - this.defaultConfiguration(); -}; - -/** - * Initialize application configuration. - * - * @api private - */ - -app.defaultConfiguration = function(){ - // default settings - this.enable('x-powered-by'); - this.enable('etag'); - this.set('env', process.env.NODE_ENV || 'development'); - this.set('subdomain offset', 2); - debug('booting in %s mode', this.get('env')); - - // implicit middleware - this.use(connect.query()); - this.use(middleware.init(this)); - - // inherit protos - this.on('mount', function(parent){ - this.request.__proto__ = parent.request; - this.response.__proto__ = parent.response; - this.engines.__proto__ = parent.engines; - this.settings.__proto__ = parent.settings; - }); - - // router - this._router = new Router(this); - this.routes = this._router.map; - this.__defineGetter__('router', function(){ - this._usedRouter = true; - this._router.caseSensitive = this.enabled('case sensitive routing'); - this._router.strict = this.enabled('strict routing'); - return this._router.middleware; - }); - - // setup locals - this.locals = locals(this); - - // default locals - this.locals.settings = this.settings; - - // default configuration - this.set('view', View); - this.set('views', process.cwd() + '/views'); - this.set('jsonp callback name', 'callback'); - - this.configure('development', function(){ - this.set('json spaces', 2); - }); - - this.configure('production', function(){ - this.enable('view cache'); - }); -}; - -/** - * Proxy `connect#use()` to apply settings to - * mounted applications. - * - * @param {String|Function|Server} route - * @param {Function|Server} fn - * @return {app} for chaining - * @api public - */ - -app.use = function(route, fn){ - var app; - - // default route to '/' - if ('string' != typeof route) fn = route, route = '/'; - - // express app - if (fn.handle && fn.set) app = fn; - - // restore .app property on req and res - if (app) { - app.route = route; - fn = function(req, res, next) { - var orig = req.app; - app.handle(req, res, function(err){ - req.__proto__ = orig.request; - res.__proto__ = orig.response; - next(err); - }); - }; - } - - connect.proto.use.call(this, route, fn); - - // mounted an app - if (app) { - app.parent = this; - app.emit('mount', this); - } - - return this; -}; - -/** - * Register the given template engine callback `fn` - * as `ext`. - * - * By default will `require()` the engine based on the - * file extension. For example if you try to render - * a "foo.jade" file Express will invoke the following internally: - * - * app.engine('jade', require('jade').__express); - * - * For engines that do not provide `.__express` out of the box, - * or if you wish to "map" a different extension to the template engine - * you may use this method. For example mapping the EJS template engine to - * ".html" files: - * - * app.engine('html', require('ejs').renderFile); - * - * In this case EJS provides a `.renderFile()` method with - * the same signature that Express expects: `(path, options, callback)`, - * though note that it aliases this method as `ejs.__express` internally - * so if you're using ".ejs" extensions you dont need to do anything. - * - * Some template engines do not follow this convention, the - * [Consolidate.js](https://github.com/visionmedia/consolidate.js) - * library was created to map all of node's popular template - * engines to follow this convention, thus allowing them to - * work seamlessly within Express. - * - * @param {String} ext - * @param {Function} fn - * @return {app} for chaining - * @api public - */ - -app.engine = function(ext, fn){ - if ('function' != typeof fn) throw new Error('callback function required'); - if ('.' != ext[0]) ext = '.' + ext; - this.engines[ext] = fn; - return this; -}; - -/** - * Map the given param placeholder `name`(s) to the given callback(s). - * - * Parameter mapping is used to provide pre-conditions to routes - * which use normalized placeholders. For example a _:user_id_ parameter - * could automatically load a user's information from the database without - * any additional code, - * - * The callback uses the same signature as middleware, the only difference - * being that the value of the placeholder is passed, in this case the _id_ - * of the user. Once the `next()` function is invoked, just like middleware - * it will continue on to execute the route, or subsequent parameter functions. - * - * app.param('user_id', function(req, res, next, id){ - * User.find(id, function(err, user){ - * if (err) { - * next(err); - * } else if (user) { - * req.user = user; - * next(); - * } else { - * next(new Error('failed to load user')); - * } - * }); - * }); - * - * @param {String|Array} name - * @param {Function} fn - * @return {app} for chaining - * @api public - */ - -app.param = function(name, fn){ - var self = this - , fns = [].slice.call(arguments, 1); - - // array - if (Array.isArray(name)) { - name.forEach(function(name){ - fns.forEach(function(fn){ - self.param(name, fn); - }); - }); - // param logic - } else if ('function' == typeof name) { - this._router.param(name); - // single - } else { - if (':' == name[0]) name = name.substr(1); - fns.forEach(function(fn){ - self._router.param(name, fn); - }); - } - - return this; -}; - -/** - * Assign `setting` to `val`, or return `setting`'s value. - * - * app.set('foo', 'bar'); - * app.get('foo'); - * // => "bar" - * - * Mounted servers inherit their parent server's settings. - * - * @param {String} setting - * @param {String} val - * @return {Server} for chaining - * @api public - */ - -app.set = function(setting, val){ - if (1 == arguments.length) { - return this.settings[setting]; - } else { - this.settings[setting] = val; - return this; - } -}; - -/** - * Return the app's absolute pathname - * based on the parent(s) that have - * mounted it. - * - * For example if the application was - * mounted as "/admin", which itself - * was mounted as "/blog" then the - * return value would be "/blog/admin". - * - * @return {String} - * @api private - */ - -app.path = function(){ - return this.parent - ? this.parent.path() + this.route - : ''; -}; - -/** - * Check if `setting` is enabled (truthy). - * - * app.enabled('foo') - * // => false - * - * app.enable('foo') - * app.enabled('foo') - * // => true - * - * @param {String} setting - * @return {Boolean} - * @api public - */ - -app.enabled = function(setting){ - return !!this.set(setting); -}; - -/** - * Check if `setting` is disabled. - * - * app.disabled('foo') - * // => true - * - * app.enable('foo') - * app.disabled('foo') - * // => false - * - * @param {String} setting - * @return {Boolean} - * @api public - */ - -app.disabled = function(setting){ - return !this.set(setting); -}; - -/** - * Enable `setting`. - * - * @param {String} setting - * @return {app} for chaining - * @api public - */ - -app.enable = function(setting){ - return this.set(setting, true); -}; - -/** - * Disable `setting`. - * - * @param {String} setting - * @return {app} for chaining - * @api public - */ - -app.disable = function(setting){ - return this.set(setting, false); -}; - -/** - * Configure callback for zero or more envs, - * when no `env` is specified that callback will - * be invoked for all environments. Any combination - * can be used multiple times, in any order desired. - * - * Examples: - * - * app.configure(function(){ - * // executed for all envs - * }); - * - * app.configure('stage', function(){ - * // executed staging env - * }); - * - * app.configure('stage', 'production', function(){ - * // executed for stage and production - * }); - * - * Note: - * - * These callbacks are invoked immediately, and - * are effectively sugar for the following: - * - * var env = process.env.NODE_ENV || 'development'; - * - * switch (env) { - * case 'development': - * ... - * break; - * case 'stage': - * ... - * break; - * case 'production': - * ... - * break; - * } - * - * @param {String} env... - * @param {Function} fn - * @return {app} for chaining - * @api public - */ - -app.configure = function(env, fn){ - var envs = 'all' - , args = [].slice.call(arguments); - fn = args.pop(); - if (args.length) envs = args; - if ('all' == envs || ~envs.indexOf(this.settings.env)) fn.call(this); - return this; -}; - -/** - * Delegate `.VERB(...)` calls to `router.VERB(...)`. - */ - -methods.forEach(function(method){ - app[method] = function(path){ - if ('get' == method && 1 == arguments.length) return this.set(path); - - // deprecated - if (Array.isArray(path)) { - console.trace('passing an array to app.VERB() is deprecated and will be removed in 4.0'); - } - - // if no router attached yet, attach the router - if (!this._usedRouter) this.use(this.router); - - // setup route - this._router[method].apply(this._router, arguments); - return this; - }; -}); - -/** - * Special-cased "all" method, applying the given route `path`, - * middleware, and callback to _every_ HTTP method. - * - * @param {String} path - * @param {Function} ... - * @return {app} for chaining - * @api public - */ - -app.all = function(path){ - var args = arguments; - methods.forEach(function(method){ - app[method].apply(this, args); - }, this); - return this; -}; - -// del -> delete alias - -app.del = app.delete; - -/** - * Render the given view `name` name with `options` - * and a callback accepting an error and the - * rendered template string. - * - * Example: - * - * app.render('email', { name: 'Tobi' }, function(err, html){ - * // ... - * }) - * - * @param {String} name - * @param {String|Function} options or fn - * @param {Function} fn - * @api public - */ - -app.render = function(name, options, fn){ - var opts = {} - , cache = this.cache - , engines = this.engines - , view; - - // support callback function as second arg - if ('function' == typeof options) { - fn = options, options = {}; - } - - // merge app.locals - utils.merge(opts, this.locals); - - // merge options._locals - if (options._locals) utils.merge(opts, options._locals); - - // merge options - utils.merge(opts, options); - - // set .cache unless explicitly provided - opts.cache = null == opts.cache - ? this.enabled('view cache') - : opts.cache; - - // primed cache - if (opts.cache) view = cache[name]; - - // view - if (!view) { - view = new (this.get('view'))(name, { - defaultEngine: this.get('view engine'), - root: this.get('views'), - engines: engines - }); - - if (!view.path) { - var err = new Error('Failed to lookup view "' + name + '" in views directory "' + view.root + '"'); - err.view = view; - return fn(err); - } - - // prime the cache - if (opts.cache) cache[name] = view; - } - - // render - try { - view.render(opts, fn); - } catch (err) { - fn(err); - } -}; - -/** - * Listen for connections. - * - * A node `http.Server` is returned, with this - * application (which is a `Function`) as its - * callback. If you wish to create both an HTTP - * and HTTPS server you may do so with the "http" - * and "https" modules as shown here: - * - * var http = require('http') - * , https = require('https') - * , express = require('express') - * , app = express(); - * - * http.createServer(app).listen(80); - * https.createServer({ ... }, app).listen(443); - * - * @return {http.Server} - * @api public - */ - -app.listen = function(){ - var server = http.createServer(this); - return server.listen.apply(server, arguments); -}; diff --git a/node_modules/express/lib/express.js b/node_modules/express/lib/express.js deleted file mode 100644 index 4f61cdbd..00000000 --- a/node_modules/express/lib/express.js +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Module dependencies. - */ - -var merge = require('merge-descriptors'); -var connect = require('connect') - , proto = require('./application') - , Route = require('./router/route') - , Router = require('./router') - , req = require('./request') - , res = require('./response') - , utils = connect.utils; - -/** - * Expose `createApplication()`. - */ - -exports = module.exports = createApplication; - -/** - * Expose mime. - */ - -exports.mime = connect.mime; - -/** - * Create an express application. - * - * @return {Function} - * @api public - */ - -function createApplication() { - var app = connect(); - utils.merge(app, proto); - app.request = { __proto__: req, app: app }; - app.response = { __proto__: res, app: app }; - app.init(); - return app; -} - -/** - * Expose connect.middleware as express.* - * for example `express.logger` etc. - */ - -merge(exports, connect.middleware); - -/** - * Error on createServer(). - */ - -exports.createServer = function(){ - console.warn('Warning: express.createServer() is deprecated, express'); - console.warn('applications no longer inherit from http.Server,'); - console.warn('please use:'); - console.warn(''); - console.warn(' var express = require("express");'); - console.warn(' var app = express();'); - console.warn(''); - return createApplication(); -}; - -/** - * Expose the prototypes. - */ - -exports.application = proto; -exports.request = req; -exports.response = res; - -/** - * Expose constructors. - */ - -exports.Route = Route; -exports.Router = Router; - -// Error handler title - -exports.errorHandler.title = 'Express'; - diff --git a/node_modules/express/lib/middleware.js b/node_modules/express/lib/middleware.js deleted file mode 100644 index e07dd4cd..00000000 --- a/node_modules/express/lib/middleware.js +++ /dev/null @@ -1,32 +0,0 @@ - -/** - * Module dependencies. - */ - -var utils = require('./utils'); - -/** - * Initialization middleware, exposing the - * request and response to eachother, as well - * as defaulting the X-Powered-By header field. - * - * @param {Function} app - * @return {Function} - * @api private - */ - -exports.init = function(app){ - return function expressInit(req, res, next){ - if (app.enabled('x-powered-by')) res.setHeader('X-Powered-By', 'Express'); - req.res = res; - res.req = req; - req.next = next; - - req.__proto__ = app.request; - res.__proto__ = app.response; - - res.locals = res.locals || utils.locals(res); - - next(); - } -}; diff --git a/node_modules/express/lib/request.js b/node_modules/express/lib/request.js deleted file mode 100644 index 3d41617e..00000000 --- a/node_modules/express/lib/request.js +++ /dev/null @@ -1,529 +0,0 @@ - -/** - * Module dependencies. - */ - -var http = require('http') - , utils = require('./utils') - , connect = require('connect') - , fresh = require('fresh') - , parseRange = require('range-parser') - , parse = connect.utils.parseUrl - , mime = connect.mime; - -/** - * Request prototype. - */ - -var req = exports = module.exports = { - __proto__: http.IncomingMessage.prototype -}; - -/** - * Return request header. - * - * The `Referrer` header field is special-cased, - * both `Referrer` and `Referer` are interchangeable. - * - * Examples: - * - * req.get('Content-Type'); - * // => "text/plain" - * - * req.get('content-type'); - * // => "text/plain" - * - * req.get('Something'); - * // => undefined - * - * Aliased as `req.header()`. - * - * @param {String} name - * @return {String} - * @api public - */ - -req.get = -req.header = function(name){ - switch (name = name.toLowerCase()) { - case 'referer': - case 'referrer': - return this.headers.referrer - || this.headers.referer; - default: - return this.headers[name]; - } -}; - -/** - * Check if the given `type(s)` is acceptable, returning - * the best match when true, otherwise `undefined`, in which - * case you should respond with 406 "Not Acceptable". - * - * The `type` value may be a single mime type string - * such as "application/json", the extension name - * such as "json", a comma-delimted list such as "json, html, text/plain", - * an argument list such as `"json", "html", "text/plain"`, - * or an array `["json", "html", "text/plain"]`. When a list - * or array is given the _best_ match, if any is returned. - * - * Examples: - * - * // Accept: text/html - * req.accepts('html'); - * // => "html" - * - * // Accept: text/*, application/json - * req.accepts('html'); - * // => "html" - * req.accepts('text/html'); - * // => "text/html" - * req.accepts('json, text'); - * // => "json" - * req.accepts('application/json'); - * // => "application/json" - * - * // Accept: text/*, application/json - * req.accepts('image/png'); - * req.accepts('png'); - * // => undefined - * - * // Accept: text/*;q=.5, application/json - * req.accepts(['html', 'json']); - * req.accepts('html', 'json'); - * req.accepts('html, json'); - * // => "json" - * - * @param {String|Array} type(s) - * @return {String} - * @api public - */ - -req.accepts = function(type){ - var args = arguments.length > 1 ? [].slice.apply(arguments) : type; - return utils.accepts(args, this.get('Accept')); -}; - -/** - * Check if the given `encoding` is accepted. - * - * @param {String} encoding - * @return {Boolean} - * @api public - */ - -req.acceptsEncoding = function(encoding){ - return !! ~this.acceptedEncodings.indexOf(encoding); -}; - -/** - * Check if the given `charset` is acceptable, - * otherwise you should respond with 406 "Not Acceptable". - * - * @param {String} charset - * @return {Boolean} - * @api public - */ - -req.acceptsCharset = function(charset){ - var accepted = this.acceptedCharsets; - return accepted.length - ? !! ~accepted.indexOf(charset) - : true; -}; - -/** - * Check if the given `lang` is acceptable, - * otherwise you should respond with 406 "Not Acceptable". - * - * @param {String} lang - * @return {Boolean} - * @api public - */ - -req.acceptsLanguage = function(lang){ - var accepted = this.acceptedLanguages; - return accepted.length - ? !! ~accepted.indexOf(lang) - : true; -}; - -/** - * Parse Range header field, - * capping to the given `size`. - * - * Unspecified ranges such as "0-" require - * knowledge of your resource length. In - * the case of a byte range this is of course - * the total number of bytes. If the Range - * header field is not given `null` is returned, - * `-1` when unsatisfiable, `-2` when syntactically invalid. - * - * NOTE: remember that ranges are inclusive, so - * for example "Range: users=0-3" should respond - * with 4 users when available, not 3. - * - * @param {Number} size - * @return {Array} - * @api public - */ - -req.range = function(size){ - var range = this.get('Range'); - if (!range) return; - return parseRange(size, range); -}; - -/** - * Return an array of encodings. - * - * Examples: - * - * ['gzip', 'deflate'] - * - * @return {Array} - * @api public - */ - -req.__defineGetter__('acceptedEncodings', function(){ - var accept = this.get('Accept-Encoding'); - return accept - ? accept.trim().split(/ *, */) - : []; -}); - -/** - * Return an array of Accepted media types - * ordered from highest quality to lowest. - * - * Examples: - * - * [ { value: 'application/json', - * quality: 1, - * type: 'application', - * subtype: 'json' }, - * { value: 'text/html', - * quality: 0.5, - * type: 'text', - * subtype: 'html' } ] - * - * @return {Array} - * @api public - */ - -req.__defineGetter__('accepted', function(){ - var accept = this.get('Accept'); - return accept - ? utils.parseAccept(accept) - : []; -}); - -/** - * Return an array of Accepted languages - * ordered from highest quality to lowest. - * - * Examples: - * - * Accept-Language: en;q=.5, en-us - * ['en-us', 'en'] - * - * @return {Array} - * @api public - */ - -req.__defineGetter__('acceptedLanguages', function(){ - var accept = this.get('Accept-Language'); - return accept - ? utils - .parseParams(accept) - .map(function(obj){ - return obj.value; - }) - : []; -}); - -/** - * Return an array of Accepted charsets - * ordered from highest quality to lowest. - * - * Examples: - * - * Accept-Charset: iso-8859-5;q=.2, unicode-1-1;q=0.8 - * ['unicode-1-1', 'iso-8859-5'] - * - * @return {Array} - * @api public - */ - -req.__defineGetter__('acceptedCharsets', function(){ - var accept = this.get('Accept-Charset'); - return accept - ? utils - .parseParams(accept) - .map(function(obj){ - return obj.value; - }) - : []; -}); - -/** - * Return the value of param `name` when present or `defaultValue`. - * - * - Checks route placeholders, ex: _/user/:id_ - * - Checks body params, ex: id=12, {"id":12} - * - Checks query string params, ex: ?id=12 - * - * To utilize request bodies, `req.body` - * should be an object. This can be done by using - * the `connect.bodyParser()` middleware. - * - * @param {String} name - * @param {Mixed} [defaultValue] - * @return {String} - * @api public - */ - -req.param = function(name, defaultValue){ - var params = this.params || {}; - var body = this.body || {}; - var query = this.query || {}; - if (null != params[name] && params.hasOwnProperty(name)) return params[name]; - if (null != body[name]) return body[name]; - if (null != query[name]) return query[name]; - return defaultValue; -}; - -/** - * Check if the incoming request contains the "Content-Type" - * header field, and it contains the give mime `type`. - * - * Examples: - * - * // With Content-Type: text/html; charset=utf-8 - * req.is('html'); - * req.is('text/html'); - * req.is('text/*'); - * // => true - * - * // When Content-Type is application/json - * req.is('json'); - * req.is('application/json'); - * req.is('application/*'); - * // => true - * - * req.is('html'); - * // => false - * - * @param {String} type - * @return {Boolean} - * @api public - */ - -req.is = function(type){ - var ct = this.get('Content-Type'); - if (!ct) return false; - ct = ct.split(';')[0]; - if (!~type.indexOf('/')) type = mime.lookup(type); - if (~type.indexOf('*')) { - type = type.split('/'); - ct = ct.split('/'); - if ('*' == type[0] && type[1] == ct[1]) return true; - if ('*' == type[1] && type[0] == ct[0]) return true; - return false; - } - return !! ~ct.indexOf(type); -}; - -/** - * Return the protocol string "http" or "https" - * when requested with TLS. When the "trust proxy" - * setting is enabled the "X-Forwarded-Proto" header - * field will be trusted. If you're running behind - * a reverse proxy that supplies https for you this - * may be enabled. - * - * @return {String} - * @api public - */ - -req.__defineGetter__('protocol', function(){ - var trustProxy = this.app.get('trust proxy'); - if (this.connection.encrypted) return 'https'; - if (!trustProxy) return 'http'; - var proto = this.get('X-Forwarded-Proto') || 'http'; - return proto.split(/\s*,\s*/)[0]; -}); - -/** - * Short-hand for: - * - * req.protocol == 'https' - * - * @return {Boolean} - * @api public - */ - -req.__defineGetter__('secure', function(){ - return 'https' == this.protocol; -}); - -/** - * Return the remote address, or when - * "trust proxy" is `true` return - * the upstream addr. - * - * @return {String} - * @api public - */ - -req.__defineGetter__('ip', function(){ - return this.ips[0] || this.connection.remoteAddress; -}); - -/** - * When "trust proxy" is `true`, parse - * the "X-Forwarded-For" ip address list. - * - * For example if the value were "client, proxy1, proxy2" - * you would receive the array `["client", "proxy1", "proxy2"]` - * where "proxy2" is the furthest down-stream. - * - * @return {Array} - * @api public - */ - -req.__defineGetter__('ips', function(){ - var trustProxy = this.app.get('trust proxy'); - var val = this.get('X-Forwarded-For'); - return trustProxy && val - ? val.split(/ *, */) - : []; -}); - -/** - * Return basic auth credentials. - * - * Examples: - * - * // http://tobi:hello@example.com - * req.auth - * // => { username: 'tobi', password: 'hello' } - * - * @return {Object} or undefined - * @api public - */ - -req.__defineGetter__('auth', function(){ - // missing - var auth = this.get('Authorization'); - if (!auth) return; - - // malformed - var parts = auth.split(' '); - if ('basic' != parts[0].toLowerCase()) return; - if (!parts[1]) return; - auth = parts[1]; - - // credentials - auth = new Buffer(auth, 'base64').toString().match(/^([^:]*):(.*)$/); - if (!auth) return; - return { username: auth[1], password: auth[2] }; -}); - -/** - * Return subdomains as an array. - * - * Subdomains are the dot-separated parts of the host before the main domain of - * the app. By default, the domain of the app is assumed to be the last two - * parts of the host. This can be changed by setting "subdomain offset". - * - * For example, if the domain is "tobi.ferrets.example.com": - * If "subdomain offset" is not set, req.subdomains is `["ferrets", "tobi"]`. - * If "subdomain offset" is 3, req.subdomains is `["tobi"]`. - * - * @return {Array} - * @api public - */ - -req.__defineGetter__('subdomains', function(){ - var offset = this.app.get('subdomain offset'); - return (this.host || '') - .split('.') - .reverse() - .slice(offset); -}); - -/** - * Short-hand for `url.parse(req.url).pathname`. - * - * @return {String} - * @api public - */ - -req.__defineGetter__('path', function(){ - return parse(this).pathname; -}); - -/** - * Parse the "Host" header field hostname. - * - * @return {String} - * @api public - */ - -req.__defineGetter__('host', function(){ - var trustProxy = this.app.get('trust proxy'); - var host = trustProxy && this.get('X-Forwarded-Host'); - host = host || this.get('Host'); - if (!host) return; - return host.split(':')[0]; -}); - -/** - * Check if the request is fresh, aka - * Last-Modified and/or the ETag - * still match. - * - * @return {Boolean} - * @api public - */ - -req.__defineGetter__('fresh', function(){ - var method = this.method; - var s = this.res.statusCode; - - // GET or HEAD for weak freshness validation only - if ('GET' != method && 'HEAD' != method) return false; - - // 2xx or 304 as per rfc2616 14.26 - if ((s >= 200 && s < 300) || 304 == s) { - return fresh(this.headers, this.res._headers); - } - - return false; -}); - -/** - * Check if the request is stale, aka - * "Last-Modified" and / or the "ETag" for the - * resource has changed. - * - * @return {Boolean} - * @api public - */ - -req.__defineGetter__('stale', function(){ - return !this.fresh; -}); - -/** - * Check if the request was an _XMLHttpRequest_. - * - * @return {Boolean} - * @api public - */ - -req.__defineGetter__('xhr', function(){ - var val = this.get('X-Requested-With') || ''; - return 'xmlhttprequest' == val.toLowerCase(); -}); diff --git a/node_modules/express/lib/response.js b/node_modules/express/lib/response.js deleted file mode 100644 index 31c79c0d..00000000 --- a/node_modules/express/lib/response.js +++ /dev/null @@ -1,799 +0,0 @@ -/** - * Module dependencies. - */ - -var http = require('http') - , path = require('path') - , connect = require('connect') - , utils = connect.utils - , sign = require('cookie-signature').sign - , normalizeType = require('./utils').normalizeType - , normalizeTypes = require('./utils').normalizeTypes - , etag = require('./utils').etag - , statusCodes = http.STATUS_CODES - , cookie = require('cookie') - , send = require('send') - , mime = connect.mime - , resolve = require('url').resolve - , basename = path.basename - , extname = path.extname; - -/** - * Response prototype. - */ - -var res = module.exports = { - __proto__: http.ServerResponse.prototype -}; - -/** - * Set status `code`. - * - * @param {Number} code - * @return {ServerResponse} - * @api public - */ - -res.status = function(code){ - this.statusCode = code; - return this; -}; - -/** - * Set Link header field with the given `links`. - * - * Examples: - * - * res.links({ - * next: 'http://api.example.com/users?page=2', - * last: 'http://api.example.com/users?page=5' - * }); - * - * @param {Object} links - * @return {ServerResponse} - * @api public - */ - -res.links = function(links){ - var link = this.get('Link') || ''; - if (link) link += ', '; - return this.set('Link', link + Object.keys(links).map(function(rel){ - return '<' + links[rel] + '>; rel="' + rel + '"'; - }).join(', ')); -}; - -/** - * Send a response. - * - * Examples: - * - * res.send(new Buffer('wahoo')); - * res.send({ some: 'json' }); - * res.send('

some html

'); - * res.send(404, 'Sorry, cant find that'); - * res.send(404); - * - * @param {Mixed} body or status - * @param {Mixed} body - * @return {ServerResponse} - * @api public - */ - -res.send = function(body){ - var req = this.req; - var head = 'HEAD' == req.method; - var len; - - // settings - var app = this.app; - - // allow status / body - if (2 == arguments.length) { - // res.send(body, status) backwards compat - if ('number' != typeof body && 'number' == typeof arguments[1]) { - this.statusCode = arguments[1]; - } else { - this.statusCode = body; - body = arguments[1]; - } - } - - switch (typeof body) { - // response status - case 'number': - this.get('Content-Type') || this.type('txt'); - this.statusCode = body; - body = http.STATUS_CODES[body]; - break; - // string defaulting to html - case 'string': - if (!this.get('Content-Type')) { - this.charset = this.charset || 'utf-8'; - this.type('html'); - } - break; - case 'boolean': - case 'object': - if (null == body) { - body = ''; - } else if (Buffer.isBuffer(body)) { - this.get('Content-Type') || this.type('bin'); - } else { - return this.json(body); - } - break; - } - - // populate Content-Length - if (undefined !== body && !this.get('Content-Length')) { - this.set('Content-Length', len = Buffer.isBuffer(body) - ? body.length - : Buffer.byteLength(body)); - } - - // ETag support - // TODO: W/ support - if (app.settings.etag && len && 'GET' == req.method) { - if (!this.get('ETag')) { - this.set('ETag', etag(body)); - } - } - - // freshness - if (req.fresh) this.statusCode = 304; - - // strip irrelevant headers - if (204 == this.statusCode || 304 == this.statusCode) { - this.removeHeader('Content-Type'); - this.removeHeader('Content-Length'); - this.removeHeader('Transfer-Encoding'); - body = ''; - } - - // respond - this.end(head ? null : body); - return this; -}; - -/** - * Send JSON response. - * - * Examples: - * - * res.json(null); - * res.json({ user: 'tj' }); - * res.json(500, 'oh noes!'); - * res.json(404, 'I dont have that'); - * - * @param {Mixed} obj or status - * @param {Mixed} obj - * @return {ServerResponse} - * @api public - */ - -res.json = function(obj){ - // allow status / body - if (2 == arguments.length) { - // res.json(body, status) backwards compat - if ('number' == typeof arguments[1]) { - this.statusCode = arguments[1]; - } else { - this.statusCode = obj; - obj = arguments[1]; - } - } - - // settings - var app = this.app; - var replacer = app.get('json replacer'); - var spaces = app.get('json spaces'); - var body = JSON.stringify(obj, replacer, spaces); - - // content-type - this.charset = this.charset || 'utf-8'; - this.get('Content-Type') || this.set('Content-Type', 'application/json'); - - return this.send(body); -}; - -/** - * Send JSON response with JSONP callback support. - * - * Examples: - * - * res.jsonp(null); - * res.jsonp({ user: 'tj' }); - * res.jsonp(500, 'oh noes!'); - * res.jsonp(404, 'I dont have that'); - * - * @param {Mixed} obj or status - * @param {Mixed} obj - * @return {ServerResponse} - * @api public - */ - -res.jsonp = function(obj){ - // allow status / body - if (2 == arguments.length) { - // res.json(body, status) backwards compat - if ('number' == typeof arguments[1]) { - this.statusCode = arguments[1]; - } else { - this.statusCode = obj; - obj = arguments[1]; - } - } - - // settings - var app = this.app; - var replacer = app.get('json replacer'); - var spaces = app.get('json spaces'); - var body = JSON.stringify(obj, replacer, spaces) - .replace(/\u2028/g, '\\u2028') - .replace(/\u2029/g, '\\u2029'); - var callback = this.req.query[app.get('jsonp callback name')]; - - // content-type - this.charset = this.charset || 'utf-8'; - this.set('Content-Type', 'application/json'); - - // jsonp - if (callback) { - if (Array.isArray(callback)) callback = callback[0]; - this.set('Content-Type', 'text/javascript'); - var cb = callback.replace(/[^\[\]\w$.]/g, ''); - body = 'typeof ' + cb + ' === \'function\' && ' + cb + '(' + body + ');'; - } - - return this.send(body); -}; - -/** - * Transfer the file at the given `path`. - * - * Automatically sets the _Content-Type_ response header field. - * The callback `fn(err)` is invoked when the transfer is complete - * or when an error occurs. Be sure to check `res.sentHeader` - * if you wish to attempt responding, as the header and some data - * may have already been transferred. - * - * Options: - * - * - `maxAge` defaulting to 0 - * - `root` root directory for relative filenames - * - * Examples: - * - * The following example illustrates how `res.sendfile()` may - * be used as an alternative for the `static()` middleware for - * dynamic situations. The code backing `res.sendfile()` is actually - * the same code, so HTTP cache support etc is identical. - * - * app.get('/user/:uid/photos/:file', function(req, res){ - * var uid = req.params.uid - * , file = req.params.file; - * - * req.user.mayViewFilesFrom(uid, function(yes){ - * if (yes) { - * res.sendfile('/uploads/' + uid + '/' + file); - * } else { - * res.send(403, 'Sorry! you cant see that.'); - * } - * }); - * }); - * - * @param {String} path - * @param {Object|Function} options or fn - * @param {Function} fn - * @api public - */ - -res.sendfile = function(path, options, fn){ - var self = this - , req = self.req - , next = this.req.next - , options = options || {} - , done; - - // support function as second arg - if ('function' == typeof options) { - fn = options; - options = {}; - } - - // socket errors - req.socket.on('error', error); - - // errors - function error(err) { - if (done) return; - done = true; - - // clean up - cleanup(); - if (!self.headerSent) self.removeHeader('Content-Disposition'); - - // callback available - if (fn) return fn(err); - - // list in limbo if there's no callback - if (self.headerSent) return; - - // delegate - next(err); - } - - // streaming - function stream(stream) { - if (done) return; - cleanup(); - if (fn) stream.on('end', fn); - } - - // cleanup - function cleanup() { - req.socket.removeListener('error', error); - } - - // transfer - var file = send(req, path); - if (options.root) file.root(options.root); - file.maxage(options.maxAge || 0); - file.on('error', error); - file.on('directory', next); - file.on('stream', stream); - file.pipe(this); - this.on('finish', cleanup); -}; - -/** - * Transfer the file at the given `path` as an attachment. - * - * Optionally providing an alternate attachment `filename`, - * and optional callback `fn(err)`. The callback is invoked - * when the data transfer is complete, or when an error has - * ocurred. Be sure to check `res.headerSent` if you plan to respond. - * - * This method uses `res.sendfile()`. - * - * @param {String} path - * @param {String|Function} filename or fn - * @param {Function} fn - * @api public - */ - -res.download = function(path, filename, fn){ - // support function as second arg - if ('function' == typeof filename) { - fn = filename; - filename = null; - } - - filename = filename || path; - this.set('Content-Disposition', 'attachment; filename="' + basename(filename) + '"'); - return this.sendfile(path, fn); -}; - -/** - * Set _Content-Type_ response header with `type` through `mime.lookup()` - * when it does not contain "/", or set the Content-Type to `type` otherwise. - * - * Examples: - * - * res.type('.html'); - * res.type('html'); - * res.type('json'); - * res.type('application/json'); - * res.type('png'); - * - * @param {String} type - * @return {ServerResponse} for chaining - * @api public - */ - -res.contentType = -res.type = function(type){ - return this.set('Content-Type', ~type.indexOf('/') - ? type - : mime.lookup(type)); -}; - -/** - * Respond to the Acceptable formats using an `obj` - * of mime-type callbacks. - * - * This method uses `req.accepted`, an array of - * acceptable types ordered by their quality values. - * When "Accept" is not present the _first_ callback - * is invoked, otherwise the first match is used. When - * no match is performed the server responds with - * 406 "Not Acceptable". - * - * Content-Type is set for you, however if you choose - * you may alter this within the callback using `res.type()` - * or `res.set('Content-Type', ...)`. - * - * res.format({ - * 'text/plain': function(){ - * res.send('hey'); - * }, - * - * 'text/html': function(){ - * res.send('

hey

'); - * }, - * - * 'appliation/json': function(){ - * res.send({ message: 'hey' }); - * } - * }); - * - * In addition to canonicalized MIME types you may - * also use extnames mapped to these types: - * - * res.format({ - * text: function(){ - * res.send('hey'); - * }, - * - * html: function(){ - * res.send('

hey

'); - * }, - * - * json: function(){ - * res.send({ message: 'hey' }); - * } - * }); - * - * By default Express passes an `Error` - * with a `.status` of 406 to `next(err)` - * if a match is not made. If you provide - * a `.default` callback it will be invoked - * instead. - * - * @param {Object} obj - * @return {ServerResponse} for chaining - * @api public - */ - -res.format = function(obj){ - var req = this.req - , next = req.next; - - var fn = obj.default; - if (fn) delete obj.default; - var keys = Object.keys(obj); - - var key = req.accepts(keys); - - this.vary("Accept"); - - if (key) { - var type = normalizeType(key).value; - var charset = mime.charsets.lookup(type); - if (charset) type += '; charset=' + charset; - this.set('Content-Type', type); - obj[key](req, this, next); - } else if (fn) { - fn(); - } else { - var err = new Error('Not Acceptable'); - err.status = 406; - err.types = normalizeTypes(keys).map(function(o){ return o.value }); - next(err); - } - - return this; -}; - -/** - * Set _Content-Disposition_ header to _attachment_ with optional `filename`. - * - * @param {String} filename - * @return {ServerResponse} - * @api public - */ - -res.attachment = function(filename){ - if (filename) this.type(extname(filename)); - this.set('Content-Disposition', filename - ? 'attachment; filename="' + basename(filename) + '"' - : 'attachment'); - return this; -}; - -/** - * Set header `field` to `val`, or pass - * an object of header fields. - * - * Examples: - * - * res.set('Foo', ['bar', 'baz']); - * res.set('Accept', 'application/json'); - * res.set({ Accept: 'text/plain', 'X-API-Key': 'tobi' }); - * - * Aliased as `res.header()`. - * - * @param {String|Object|Array} field - * @param {String} val - * @return {ServerResponse} for chaining - * @api public - */ - -res.set = -res.header = function(field, val){ - if (2 == arguments.length) { - if (Array.isArray(val)) val = val.map(String); - else val = String(val); - this.setHeader(field, val); - } else { - for (var key in field) { - this.set(key, field[key]); - } - } - return this; -}; - -/** - * Get value for header `field`. - * - * @param {String} field - * @return {String} - * @api public - */ - -res.get = function(field){ - return this.getHeader(field); -}; - -/** - * Clear cookie `name`. - * - * @param {String} name - * @param {Object} options - * @param {ServerResponse} for chaining - * @api public - */ - -res.clearCookie = function(name, options){ - var opts = { expires: new Date(1), path: '/' }; - return this.cookie(name, '', options - ? utils.merge(opts, options) - : opts); -}; - -/** - * Set cookie `name` to `val`, with the given `options`. - * - * Options: - * - * - `maxAge` max-age in milliseconds, converted to `expires` - * - `signed` sign the cookie - * - `path` defaults to "/" - * - * Examples: - * - * // "Remember Me" for 15 minutes - * res.cookie('rememberme', '1', { expires: new Date(Date.now() + 900000), httpOnly: true }); - * - * // save as above - * res.cookie('rememberme', '1', { maxAge: 900000, httpOnly: true }) - * - * @param {String} name - * @param {String|Object} val - * @param {Options} options - * @api public - */ - -res.cookie = function(name, val, options){ - options = utils.merge({}, options); - var secret = this.req.secret; - var signed = options.signed; - if (signed && !secret) throw new Error('connect.cookieParser("secret") required for signed cookies'); - if ('number' == typeof val) val = val.toString(); - if ('object' == typeof val) val = 'j:' + JSON.stringify(val); - if (signed) val = 's:' + sign(val, secret); - if ('maxAge' in options) { - options.expires = new Date(Date.now() + options.maxAge); - options.maxAge /= 1000; - } - if (null == options.path) options.path = '/'; - this.set('Set-Cookie', cookie.serialize(name, String(val), options)); - return this; -}; - - -/** - * Set the location header to `url`. - * - * The given `url` can also be "back", which redirects - * to the _Referrer_ or _Referer_ headers or "/". - * - * Examples: - * - * res.location('/foo/bar').; - * res.location('http://example.com'); - * res.location('../login'); // /blog/post/1 -> /blog/login - * - * Mounting: - * - * When an application is mounted and `res.location()` - * is given a path that does _not_ lead with "/" it becomes - * relative to the mount-point. For example if the application - * is mounted at "/blog", the following would become "/blog/login". - * - * res.location('login'); - * - * While the leading slash would result in a location of "/login": - * - * res.location('/login'); - * - * @param {String} url - * @api public - */ - -res.location = function(url){ - var app = this.app - , req = this.req - , path; - - // "back" is an alias for the referrer - if ('back' == url) url = req.get('Referrer') || '/'; - - // relative - if (!~url.indexOf('://') && 0 != url.indexOf('//')) { - // relative to path - if ('.' == url[0]) { - path = req.originalUrl.split('?')[0]; - path = path + ('/' == path[path.length - 1] ? '' : '/'); - url = resolve(path, url); - // relative to mount-point - } else if ('/' != url[0]) { - path = app.path(); - url = path + '/' + url; - } - } - - // Respond - this.set('Location', url); - return this; -}; - -/** - * Redirect to the given `url` with optional response `status` - * defaulting to 302. - * - * The resulting `url` is determined by `res.location()`, so - * it will play nicely with mounted apps, relative paths, - * `"back"` etc. - * - * Examples: - * - * res.redirect('/foo/bar'); - * res.redirect('http://example.com'); - * res.redirect(301, 'http://example.com'); - * res.redirect('http://example.com', 301); - * res.redirect('../login'); // /blog/post/1 -> /blog/login - * - * @param {String} url - * @param {Number} code - * @api public - */ - -res.redirect = function(url){ - var head = 'HEAD' == this.req.method - , status = 302 - , body; - - // allow status / url - if (2 == arguments.length) { - if ('number' == typeof url) { - status = url; - url = arguments[1]; - } else { - status = arguments[1]; - } - } - - // Set location header - this.location(url); - url = this.get('Location'); - - // Support text/{plain,html} by default - this.format({ - text: function(){ - body = statusCodes[status] + '. Redirecting to ' + encodeURI(url); - }, - - html: function(){ - var u = utils.escape(url); - body = '

' + statusCodes[status] + '. Redirecting to ' + u + '

'; - }, - - default: function(){ - body = ''; - } - }); - - // Respond - this.statusCode = status; - this.set('Content-Length', Buffer.byteLength(body)); - this.end(head ? null : body); -}; - -/** - * Add `field` to Vary. If already present in the Vary set, then - * this call is simply ignored. - * - * @param {Array|String} field - * @param {ServerResponse} for chaining - * @api public - */ - -res.vary = function(field){ - var self = this; - - // nothing - if (!field) return this; - - // array - if (Array.isArray(field)) { - field.forEach(function(field){ - self.vary(field); - }); - return; - } - - var vary = this.get('Vary'); - - // append - if (vary) { - vary = vary.split(/ *, */); - if (!~vary.indexOf(field)) vary.push(field); - this.set('Vary', vary.join(', ')); - return this; - } - - // set - this.set('Vary', field); - return this; -}; - -/** - * Render `view` with the given `options` and optional callback `fn`. - * When a callback function is given a response will _not_ be made - * automatically, otherwise a response of _200_ and _text/html_ is given. - * - * Options: - * - * - `cache` boolean hinting to the engine it should cache - * - `filename` filename of the view being rendered - * - * @param {String} view - * @param {Object|Function} options or callback function - * @param {Function} fn - * @api public - */ - -res.render = function(view, options, fn){ - var self = this - , options = options || {} - , req = this.req - , app = req.app; - - // support callback function as second arg - if ('function' == typeof options) { - fn = options, options = {}; - } - - // merge res.locals - options._locals = self.locals; - - // default callback to respond - fn = fn || function(err, str){ - if (err) return req.next(err); - self.send(str); - }; - - // render - app.render(view, options, fn); -}; diff --git a/node_modules/express/lib/router/index.js b/node_modules/express/lib/router/index.js deleted file mode 100644 index cd2f2693..00000000 --- a/node_modules/express/lib/router/index.js +++ /dev/null @@ -1,321 +0,0 @@ -/** - * Module dependencies. - */ - -var Route = require('./route') - , utils = require('../utils') - , methods = require('methods') - , debug = require('debug')('express:router') - , parse = require('connect').utils.parseUrl; - -/** - * Expose `Router` constructor. - */ - -exports = module.exports = Router; - -/** - * Initialize a new `Router` with the given `options`. - * - * @param {Object} options - * @api private - */ - -function Router(options) { - options = options || {}; - var self = this; - this.map = {}; - this.params = {}; - this._params = []; - this.caseSensitive = options.caseSensitive; - this.strict = options.strict; - this.middleware = function router(req, res, next){ - self._dispatch(req, res, next); - }; -} - -/** - * Register a param callback `fn` for the given `name`. - * - * @param {String|Function} name - * @param {Function} fn - * @return {Router} for chaining - * @api public - */ - -Router.prototype.param = function(name, fn){ - // param logic - if ('function' == typeof name) { - this._params.push(name); - return; - } - - // apply param functions - var params = this._params - , len = params.length - , ret; - - for (var i = 0; i < len; ++i) { - if (ret = params[i](name, fn)) { - fn = ret; - } - } - - // ensure we end up with a - // middleware function - if ('function' != typeof fn) { - throw new Error('invalid param() call for ' + name + ', got ' + fn); - } - - (this.params[name] = this.params[name] || []).push(fn); - return this; -}; - -/** - * Route dispatcher aka the route "middleware". - * - * @param {IncomingMessage} req - * @param {ServerResponse} res - * @param {Function} next - * @api private - */ - -Router.prototype._dispatch = function(req, res, next){ - var params = this.params - , self = this; - - debug('dispatching %s %s (%s)', req.method, req.url, req.originalUrl); - - // route dispatch - (function pass(i, err){ - var paramCallbacks - , paramIndex = 0 - , paramVal - , route - , keys - , key; - - // match next route - function nextRoute(err) { - pass(req._route_index + 1, err); - } - - // match route - req.route = route = self.matchRequest(req, i); - - // implied OPTIONS - if (!route && 'OPTIONS' == req.method) return self._options(req, res, next); - - // no route - if (!route) return next(err); - debug('matched %s %s', route.method, route.path); - - // we have a route - // start at param 0 - req.params = route.params; - keys = route.keys; - i = 0; - - // param callbacks - function param(err) { - paramIndex = 0; - key = keys[i++]; - paramVal = key && req.params[key.name]; - paramCallbacks = key && params[key.name]; - - try { - if ('route' == err) { - nextRoute(); - } else if (err) { - i = 0; - callbacks(err); - } else if (paramCallbacks && undefined !== paramVal) { - paramCallback(); - } else if (key) { - param(); - } else { - i = 0; - callbacks(); - } - } catch (err) { - param(err); - } - }; - - param(err); - - // single param callbacks - function paramCallback(err) { - var fn = paramCallbacks[paramIndex++]; - if (err || !fn) return param(err); - fn(req, res, paramCallback, paramVal, key.name); - } - - // invoke route callbacks - function callbacks(err) { - var fn = route.callbacks[i++]; - try { - if ('route' == err) { - nextRoute(); - } else if (err && fn) { - if (fn.length < 4) return callbacks(err); - fn(err, req, res, callbacks); - } else if (fn) { - if (fn.length < 4) return fn(req, res, callbacks); - callbacks(); - } else { - nextRoute(err); - } - } catch (err) { - callbacks(err); - } - } - })(0); -}; - -/** - * Respond to __OPTIONS__ method. - * - * @param {IncomingMessage} req - * @param {ServerResponse} res - * @api private - */ - -Router.prototype._options = function(req, res, next){ - var path = parse(req).pathname - , body = this._optionsFor(path).join(','); - if (!body) return next(); - res.set('Allow', body).send(body); -}; - -/** - * Return an array of HTTP verbs or "options" for `path`. - * - * @param {String} path - * @return {Array} - * @api private - */ - -Router.prototype._optionsFor = function(path){ - var self = this; - return methods.filter(function(method){ - var routes = self.map[method]; - if (!routes || 'options' == method) return; - for (var i = 0, len = routes.length; i < len; ++i) { - if (routes[i].match(path)) return true; - } - }).map(function(method){ - return method.toUpperCase(); - }); -}; - -/** - * Attempt to match a route for `req` - * with optional starting index of `i` - * defaulting to 0. - * - * @param {IncomingMessage} req - * @param {Number} i - * @return {Route} - * @api private - */ - -Router.prototype.matchRequest = function(req, i, head){ - var method = req.method.toLowerCase() - , url = parse(req) - , path = url.pathname - , routes = this.map - , i = i || 0 - , route; - - // HEAD support - if (!head && 'head' == method) { - route = this.matchRequest(req, i, true); - if (route) return route; - method = 'get'; - } - - // routes for this method - if (routes = routes[method]) { - - // matching routes - for (var len = routes.length; i < len; ++i) { - route = routes[i]; - if (route.match(path)) { - req._route_index = i; - return route; - } - } - } -}; - -/** - * Attempt to match a route for `method` - * and `url` with optional starting - * index of `i` defaulting to 0. - * - * @param {String} method - * @param {String} url - * @param {Number} i - * @return {Route} - * @api private - */ - -Router.prototype.match = function(method, url, i, head){ - var req = { method: method, url: url }; - return this.matchRequest(req, i, head); -}; - -/** - * Route `method`, `path`, and one or more callbacks. - * - * @param {String} method - * @param {String} path - * @param {Function} callback... - * @return {Router} for chaining - * @api private - */ - -Router.prototype.route = function(method, path, callbacks){ - var method = method.toLowerCase() - , callbacks = utils.flatten([].slice.call(arguments, 2)); - - // ensure path was given - if (!path) throw new Error('Router#' + method + '() requires a path'); - - // ensure all callbacks are functions - callbacks.forEach(function(fn){ - if ('function' == typeof fn) return; - var type = {}.toString.call(fn); - var msg = '.' + method + '() requires callback functions but got a ' + type; - throw new Error(msg); - }); - - // create the route - debug('defined %s %s', method, path); - var route = new Route(method, path, callbacks, { - sensitive: this.caseSensitive, - strict: this.strict - }); - - // add it - (this.map[method] = this.map[method] || []).push(route); - return this; -}; - -Router.prototype.all = function(path) { - var self = this; - var args = [].slice.call(arguments); - methods.forEach(function(method){ - self.route.apply(self, [method].concat(args)); - }); - return this; -}; - -methods.forEach(function(method){ - Router.prototype[method] = function(path){ - var args = [method].concat([].slice.call(arguments)); - this.route.apply(this, args); - return this; - }; -}); diff --git a/node_modules/express/lib/router/route.js b/node_modules/express/lib/router/route.js deleted file mode 100644 index d7ec88d2..00000000 --- a/node_modules/express/lib/router/route.js +++ /dev/null @@ -1,78 +0,0 @@ - -/** - * Module dependencies. - */ - -var utils = require('../utils'); - -/** - * Expose `Route`. - */ - -module.exports = Route; - -/** - * Initialize `Route` with the given HTTP `method`, `path`, - * and an array of `callbacks` and `options`. - * - * Options: - * - * - `sensitive` enable case-sensitive routes - * - `strict` enable strict matching for trailing slashes - * - * @param {String} method - * @param {String} path - * @param {Array} callbacks - * @param {Object} options. - * @api private - */ - -function Route(method, path, callbacks, options) { - options = options || {}; - this.path = path; - this.method = method; - this.callbacks = callbacks; - this.regexp = utils.pathRegexp(path - , this.keys = [] - , options.sensitive - , options.strict); -} - -/** - * Check if this route matches `path`, if so - * populate `.params`. - * - * @param {String} path - * @return {Boolean} - * @api private - */ - -Route.prototype.match = function(path){ - var keys = this.keys - , params = this.params = [] - , m = this.regexp.exec(path); - - if (!m) return false; - - for (var i = 1, len = m.length; i < len; ++i) { - var key = keys[i - 1]; - - try { - var val = 'string' == typeof m[i] - ? decodeURIComponent(m[i]) - : m[i]; - } catch(e) { - var err = new Error("Failed to decode param '" + m[i] + "'"); - err.status = 400; - throw err; - } - - if (key) { - params[key.name] = val; - } else { - params.push(val); - } - } - - return true; -}; diff --git a/node_modules/express/lib/utils.js b/node_modules/express/lib/utils.js deleted file mode 100644 index b30873a8..00000000 --- a/node_modules/express/lib/utils.js +++ /dev/null @@ -1,314 +0,0 @@ - -/** - * Module dependencies. - */ - -var mime = require('connect').mime - , crc32 = require('buffer-crc32'); - -/** - * toString ref. - */ - -var toString = {}.toString; - -/** - * Return ETag for `body`. - * - * @param {String|Buffer} body - * @return {String} - * @api private - */ - -exports.etag = function(body){ - return '"' + crc32.signed(body) + '"'; -}; - -/** - * Make `locals()` bound to the given `obj`. - * - * This is used for `app.locals` and `res.locals`. - * - * @param {Object} obj - * @return {Function} - * @api private - */ - -exports.locals = function(){ - function locals(obj){ - for (var key in obj) locals[key] = obj[key]; - return obj; - }; - - return locals; -}; - -/** - * Check if `path` looks absolute. - * - * @param {String} path - * @return {Boolean} - * @api private - */ - -exports.isAbsolute = function(path){ - if ('/' == path[0]) return true; - if (':' == path[1] && '\\' == path[2]) return true; - if ('\\\\' == path.substring(0, 2)) return true; // Microsoft Azure absolute path -}; - -/** - * Flatten the given `arr`. - * - * @param {Array} arr - * @return {Array} - * @api private - */ - -exports.flatten = function(arr, ret){ - var ret = ret || [] - , len = arr.length; - for (var i = 0; i < len; ++i) { - if (Array.isArray(arr[i])) { - exports.flatten(arr[i], ret); - } else { - ret.push(arr[i]); - } - } - return ret; -}; - -/** - * Normalize the given `type`, for example "html" becomes "text/html". - * - * @param {String} type - * @return {Object} - * @api private - */ - -exports.normalizeType = function(type){ - return ~type.indexOf('/') - ? acceptParams(type) - : { value: mime.lookup(type), params: {} }; -}; - -/** - * Normalize `types`, for example "html" becomes "text/html". - * - * @param {Array} types - * @return {Array} - * @api private - */ - -exports.normalizeTypes = function(types){ - var ret = []; - - for (var i = 0; i < types.length; ++i) { - ret.push(exports.normalizeType(types[i])); - } - - return ret; -}; - -/** - * Return the acceptable type in `types`, if any. - * - * @param {Array} types - * @param {String} str - * @return {String} - * @api private - */ - -exports.acceptsArray = function(types, str){ - // accept anything when Accept is not present - if (!str) return types[0]; - - // parse - var accepted = exports.parseAccept(str) - , normalized = exports.normalizeTypes(types) - , len = accepted.length; - - for (var i = 0; i < len; ++i) { - for (var j = 0, jlen = types.length; j < jlen; ++j) { - if (exports.accept(normalized[j], accepted[i])) { - return types[j]; - } - } - } -}; - -/** - * Check if `type(s)` are acceptable based on - * the given `str`. - * - * @param {String|Array} type(s) - * @param {String} str - * @return {Boolean|String} - * @api private - */ - -exports.accepts = function(type, str){ - if ('string' == typeof type) type = type.split(/ *, */); - return exports.acceptsArray(type, str); -}; - -/** - * Check if `type` array is acceptable for `other`. - * - * @param {Object} type - * @param {Object} other - * @return {Boolean} - * @api private - */ - -exports.accept = function(type, other){ - var t = type.value.split('/'); - return (t[0] == other.type || '*' == other.type) - && (t[1] == other.subtype || '*' == other.subtype) - && paramsEqual(type.params, other.params); -}; - -/** - * Check if accept params are equal. - * - * @param {Object} a - * @param {Object} b - * @return {Boolean} - * @api private - */ - -function paramsEqual(a, b){ - return !Object.keys(a).some(function(k) { - return a[k] != b[k]; - }); -} - -/** - * Parse accept `str`, returning - * an array objects containing - * `.type` and `.subtype` along - * with the values provided by - * `parseQuality()`. - * - * @param {Type} name - * @return {Type} - * @api private - */ - -exports.parseAccept = function(str){ - return exports - .parseParams(str) - .map(function(obj){ - var parts = obj.value.split('/'); - obj.type = parts[0]; - obj.subtype = parts[1]; - return obj; - }); -}; - -/** - * Parse quality `str`, returning an - * array of objects with `.value`, - * `.quality` and optional `.params` - * - * @param {String} str - * @return {Array} - * @api private - */ - -exports.parseParams = function(str){ - return str - .split(/ *, */) - .map(acceptParams) - .filter(function(obj){ - return obj.quality; - }) - .sort(function(a, b){ - if (a.quality === b.quality) { - return a.originalIndex - b.originalIndex; - } else { - return b.quality - a.quality; - } - }); -}; - -/** - * Parse accept params `str` returning an - * object with `.value`, `.quality` and `.params`. - * also includes `.originalIndex` for stable sorting - * - * @param {String} str - * @return {Object} - * @api private - */ - -function acceptParams(str, index) { - var parts = str.split(/ *; */); - var ret = { value: parts[0], quality: 1, params: {}, originalIndex: index }; - - for (var i = 1; i < parts.length; ++i) { - var pms = parts[i].split(/ *= */); - if ('q' == pms[0]) { - ret.quality = parseFloat(pms[1]); - } else { - ret.params[pms[0]] = pms[1]; - } - } - - return ret; -} - -/** - * Escape special characters in the given string of html. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function(html) { - return String(html) - .replace(/&/g, '&') - .replace(/"/g, '"') - .replace(//g, '>'); -}; - -/** - * Normalize the given path string, - * returning a regular expression. - * - * An empty array should be passed, - * which will contain the placeholder - * key names. For example "/user/:id" will - * then contain ["id"]. - * - * @param {String|RegExp|Array} path - * @param {Array} keys - * @param {Boolean} sensitive - * @param {Boolean} strict - * @return {RegExp} - * @api private - */ - -exports.pathRegexp = function(path, keys, sensitive, strict) { - if (toString.call(path) == '[object RegExp]') return path; - if (Array.isArray(path)) path = '(' + path.join('|') + ')'; - path = path - .concat(strict ? '' : '/?') - .replace(/\/\(/g, '(?:/') - .replace(/(\/)?(\.)?:(\w+)(?:(\(.*?\)))?(\?)?(\*)?/g, function(_, slash, format, key, capture, optional, star){ - keys.push({ name: key, optional: !! optional }); - slash = slash || ''; - return '' - + (optional ? '' : slash) - + '(?:' - + (optional ? slash : '') - + (format || '') + (capture || (format && '([^/.]+?)' || '([^/]+?)')) + ')' - + (optional || '') - + (star ? '(/*)?' : ''); - }) - .replace(/([\/.])/g, '\\$1') - .replace(/\*/g, '(.*)'); - return new RegExp('^' + path + '$', sensitive ? '' : 'i'); -} diff --git a/node_modules/express/lib/view.js b/node_modules/express/lib/view.js deleted file mode 100644 index b9dc69e0..00000000 --- a/node_modules/express/lib/view.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Module dependencies. - */ - -var path = require('path') - , fs = require('fs') - , utils = require('./utils') - , dirname = path.dirname - , basename = path.basename - , extname = path.extname - , exists = fs.existsSync || path.existsSync - , join = path.join; - -/** - * Expose `View`. - */ - -module.exports = View; - -/** - * Initialize a new `View` with the given `name`. - * - * Options: - * - * - `defaultEngine` the default template engine name - * - `engines` template engine require() cache - * - `root` root path for view lookup - * - * @param {String} name - * @param {Object} options - * @api private - */ - -function View(name, options) { - options = options || {}; - this.name = name; - this.root = options.root; - var engines = options.engines; - this.defaultEngine = options.defaultEngine; - var ext = this.ext = extname(name); - if (!ext && !this.defaultEngine) throw new Error('No default engine was specified and no extension was provided.'); - if (!ext) name += (ext = this.ext = ('.' != this.defaultEngine[0] ? '.' : '') + this.defaultEngine); - this.engine = engines[ext] || (engines[ext] = require(ext.slice(1)).__express); - this.path = this.lookup(name); -} - -/** - * Lookup view by the given `path` - * - * @param {String} path - * @return {String} - * @api private - */ - -View.prototype.lookup = function(path){ - var ext = this.ext; - - // . - if (!utils.isAbsolute(path)) path = join(this.root, path); - if (exists(path)) return path; - - // /index. - path = join(dirname(path), basename(path, ext), 'index' + ext); - if (exists(path)) return path; -}; - -/** - * Render with the given `options` and callback `fn(err, str)`. - * - * @param {Object} options - * @param {Function} fn - * @api private - */ - -View.prototype.render = function(options, fn){ - this.engine(this.path, options, fn); -}; diff --git a/node_modules/express/node_modules/buffer-crc32/.npmignore b/node_modules/express/node_modules/buffer-crc32/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/node_modules/express/node_modules/buffer-crc32/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/node_modules/express/node_modules/buffer-crc32/.travis.yml b/node_modules/express/node_modules/buffer-crc32/.travis.yml deleted file mode 100644 index 7a902e8c..00000000 --- a/node_modules/express/node_modules/buffer-crc32/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 -notifications: - email: - recipients: - - brianloveswords@gmail.com \ No newline at end of file diff --git a/node_modules/express/node_modules/buffer-crc32/README.md b/node_modules/express/node_modules/buffer-crc32/README.md deleted file mode 100644 index 0d9d8b83..00000000 --- a/node_modules/express/node_modules/buffer-crc32/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# buffer-crc32 - -[![Build Status](https://secure.travis-ci.org/brianloveswords/buffer-crc32.png?branch=master)](http://travis-ci.org/brianloveswords/buffer-crc32) - -crc32 that works with binary data and fancy character sets, outputs -buffer, signed or unsigned data and has tests. - -Derived from the sample CRC implementation in the PNG specification: http://www.w3.org/TR/PNG/#D-CRCAppendix - -# install -``` -npm install buffer-crc32 -``` - -# example -```js -var crc32 = require('buffer-crc32'); -// works with buffers -var buf = Buffer([0x00, 0x73, 0x75, 0x70, 0x20, 0x62, 0x72, 0x6f, 0x00]) -crc32(buf) // -> - -// has convenience methods for getting signed or unsigned ints -crc32.signed(buf) // -> -1805997238 -crc32.unsigned(buf) // -> 2488970058 - -// will cast to buffer if given a string, so you can -// directly use foreign characters safely -crc32('自動販売機') // -> - -// and works in append mode too -var partialCrc = crc32('hey'); -var partialCrc = crc32(' ', partialCrc); -var partialCrc = crc32('sup', partialCrc); -var partialCrc = crc32(' ', partialCrc); -var finalCrc = crc32('bros', partialCrc); // -> -``` - -# tests -This was tested against the output of zlib's crc32 method. You can run -the tests with`npm test` (requires tap) - -# see also -https://github.com/alexgorbatchev/node-crc, `crc.buffer.crc32` also -supports buffer inputs and return unsigned ints (thanks @tjholowaychuk). - -# license -MIT/X11 diff --git a/node_modules/express/node_modules/buffer-crc32/index.js b/node_modules/express/node_modules/buffer-crc32/index.js deleted file mode 100644 index e29ce3eb..00000000 --- a/node_modules/express/node_modules/buffer-crc32/index.js +++ /dev/null @@ -1,88 +0,0 @@ -var Buffer = require('buffer').Buffer; - -var CRC_TABLE = [ - 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, - 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, - 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, - 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, - 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, - 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, - 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, - 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, - 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, - 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, - 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, - 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, - 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, - 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, - 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, - 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, - 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, - 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, - 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, - 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, - 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, - 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, - 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, - 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, - 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, - 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, - 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, - 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, - 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, - 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, - 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, - 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, - 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, - 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, - 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, - 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, - 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, - 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, - 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, - 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, - 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, - 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, - 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, - 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, - 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, - 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, - 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, - 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, - 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, - 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, - 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, - 0x2d02ef8d -]; - -function bufferizeInt(num) { - var tmp = Buffer(4); - tmp.writeInt32BE(num, 0); - return tmp; -} - -function _crc32(buf, previous) { - if (!Buffer.isBuffer(buf)) { - buf = Buffer(buf); - } - if (Buffer.isBuffer(previous)) { - previous = previous.readUInt32BE(0); - } - var crc = ~~previous ^ -1; - for (var n = 0; n < buf.length; n++) { - crc = CRC_TABLE[(crc ^ buf[n]) & 0xff] ^ (crc >>> 8); - } - return (crc ^ -1); -} - -function crc32() { - return bufferizeInt(_crc32.apply(null, arguments)); -} -crc32.signed = function () { - return _crc32.apply(null, arguments); -}; -crc32.unsigned = function () { - return _crc32.apply(null, arguments) >>> 0; -}; - -module.exports = crc32; diff --git a/node_modules/express/node_modules/buffer-crc32/package.json b/node_modules/express/node_modules/buffer-crc32/package.json deleted file mode 100644 index 0ce14940..00000000 --- a/node_modules/express/node_modules/buffer-crc32/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "author": { - "name": "Brian J. Brennan", - "email": "brianloveswords@gmail.com", - "url": "http://bjb.io" - }, - "name": "buffer-crc32", - "description": "A pure javascript CRC32 algorithm that plays nice with binary data", - "version": "0.2.1", - "contributors": [ - { - "name": "Vladimir Kuznetsov" - } - ], - "homepage": "https://github.com/brianloveswords/buffer-crc32", - "repository": { - "type": "git", - "url": "git://github.com/brianloveswords/buffer-crc32.git" - }, - "main": "index.js", - "scripts": { - "test": "tap tests/*.test.js" - }, - "dependencies": {}, - "devDependencies": { - "tap": "~0.2.5" - }, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "readme": "# buffer-crc32\n\n[![Build Status](https://secure.travis-ci.org/brianloveswords/buffer-crc32.png?branch=master)](http://travis-ci.org/brianloveswords/buffer-crc32)\n\ncrc32 that works with binary data and fancy character sets, outputs\nbuffer, signed or unsigned data and has tests.\n\nDerived from the sample CRC implementation in the PNG specification: http://www.w3.org/TR/PNG/#D-CRCAppendix\n\n# install\n```\nnpm install buffer-crc32\n```\n\n# example\n```js\nvar crc32 = require('buffer-crc32');\n// works with buffers\nvar buf = Buffer([0x00, 0x73, 0x75, 0x70, 0x20, 0x62, 0x72, 0x6f, 0x00])\ncrc32(buf) // -> \n\n// has convenience methods for getting signed or unsigned ints\ncrc32.signed(buf) // -> -1805997238\ncrc32.unsigned(buf) // -> 2488970058\n\n// will cast to buffer if given a string, so you can\n// directly use foreign characters safely\ncrc32('自動販売機') // -> \n\n// and works in append mode too\nvar partialCrc = crc32('hey');\nvar partialCrc = crc32(' ', partialCrc);\nvar partialCrc = crc32('sup', partialCrc);\nvar partialCrc = crc32(' ', partialCrc);\nvar finalCrc = crc32('bros', partialCrc); // -> \n```\n\n# tests\nThis was tested against the output of zlib's crc32 method. You can run\nthe tests with`npm test` (requires tap)\n\n# see also\nhttps://github.com/alexgorbatchev/node-crc, `crc.buffer.crc32` also\nsupports buffer inputs and return unsigned ints (thanks @tjholowaychuk).\n\n# license\nMIT/X11\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/brianloveswords/buffer-crc32/issues" - }, - "_id": "buffer-crc32@0.2.1", - "dist": { - "shasum": "be3e5382fc02b6d6324956ac1af98aa98b08534c" - }, - "_from": "buffer-crc32@0.2.1", - "_resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.1.tgz" -} diff --git a/node_modules/express/node_modules/buffer-crc32/tests/crc.test.js b/node_modules/express/node_modules/buffer-crc32/tests/crc.test.js deleted file mode 100644 index bb0f9efc..00000000 --- a/node_modules/express/node_modules/buffer-crc32/tests/crc.test.js +++ /dev/null @@ -1,89 +0,0 @@ -var crc32 = require('..'); -var test = require('tap').test; - -test('simple crc32 is no problem', function (t) { - var input = Buffer('hey sup bros'); - var expected = Buffer([0x47, 0xfa, 0x55, 0x70]); - t.same(crc32(input), expected); - t.end(); -}); - -test('another simple one', function (t) { - var input = Buffer('IEND'); - var expected = Buffer([0xae, 0x42, 0x60, 0x82]); - t.same(crc32(input), expected); - t.end(); -}); - -test('slightly more complex', function (t) { - var input = Buffer([0x00, 0x00, 0x00]); - var expected = Buffer([0xff, 0x41, 0xd9, 0x12]); - t.same(crc32(input), expected); - t.end(); -}); - -test('complex crc32 gets calculated like a champ', function (t) { - var input = Buffer('शीर्षक'); - var expected = Buffer([0x17, 0xb8, 0xaf, 0xf1]); - t.same(crc32(input), expected); - t.end(); -}); - -test('casts to buffer if necessary', function (t) { - var input = 'शीर्षक'; - var expected = Buffer([0x17, 0xb8, 0xaf, 0xf1]); - t.same(crc32(input), expected); - t.end(); -}); - -test('can do signed', function (t) { - var input = 'ham sandwich'; - var expected = -1891873021; - t.same(crc32.signed(input), expected); - t.end(); -}); - -test('can do unsigned', function (t) { - var input = 'bear sandwich'; - var expected = 3711466352; - t.same(crc32.unsigned(input), expected); - t.end(); -}); - - -test('simple crc32 in append mode', function (t) { - var input = [Buffer('hey'), Buffer(' '), Buffer('sup'), Buffer(' '), Buffer('bros')]; - var expected = Buffer([0x47, 0xfa, 0x55, 0x70]); - for (var crc = 0, i = 0; i < input.length; i++) { - crc = crc32(input[i], crc); - } - t.same(crc, expected); - t.end(); -}); - - -test('can do signed in append mode', function (t) { - var input1 = 'ham'; - var input2 = ' '; - var input3 = 'sandwich'; - var expected = -1891873021; - - var crc = crc32.signed(input1); - crc = crc32.signed(input2, crc); - crc = crc32.signed(input3, crc); - - t.same(crc, expected); - t.end(); -}); - -test('can do unsigned in append mode', function (t) { - var input1 = 'bear san'; - var input2 = 'dwich'; - var expected = 3711466352; - - var crc = crc32.unsigned(input1); - crc = crc32.unsigned(input2, crc); - t.same(crc, expected); - t.end(); -}); - diff --git a/node_modules/express/node_modules/commander/History.md b/node_modules/express/node_modules/commander/History.md deleted file mode 100644 index ce046f6f..00000000 --- a/node_modules/express/node_modules/commander/History.md +++ /dev/null @@ -1,174 +0,0 @@ - -1.3.2 / 2013-07-18 -================== - - * add support for sub-commands to co-exist with the original command - -1.3.1 / 2013-07-18 -================== - - * add quick .runningCommand hack so you can opt-out of other logic when running a sub command - -1.3.0 / 2013-07-09 -================== - - * add EACCES error handling - * fix sub-command --help - -1.2.0 / 2013-06-13 -================== - - * allow "-" hyphen as an option argument - * support for RegExp coercion - -1.1.1 / 2012-11-20 -================== - - * add more sub-command padding - * fix .usage() when args are present. Closes #106 - -1.1.0 / 2012-11-16 -================== - - * add git-style executable subcommand support. Closes #94 - -1.0.5 / 2012-10-09 -================== - - * fix `--name` clobbering. Closes #92 - * fix examples/help. Closes #89 - -1.0.4 / 2012-09-03 -================== - - * add `outputHelp()` method. - -1.0.3 / 2012-08-30 -================== - - * remove invalid .version() defaulting - -1.0.2 / 2012-08-24 -================== - - * add `--foo=bar` support [arv] - * fix password on node 0.8.8. Make backward compatible with 0.6 [focusaurus] - -1.0.1 / 2012-08-03 -================== - - * fix issue #56 - * fix tty.setRawMode(mode) was moved to tty.ReadStream#setRawMode() (i.e. process.stdin.setRawMode()) - -1.0.0 / 2012-07-05 -================== - - * add support for optional option descriptions - * add defaulting of `.version()` to package.json's version - -0.6.1 / 2012-06-01 -================== - - * Added: append (yes or no) on confirmation - * Added: allow node.js v0.7.x - -0.6.0 / 2012-04-10 -================== - - * Added `.prompt(obj, callback)` support. Closes #49 - * Added default support to .choose(). Closes #41 - * Fixed the choice example - -0.5.1 / 2011-12-20 -================== - - * Fixed `password()` for recent nodes. Closes #36 - -0.5.0 / 2011-12-04 -================== - - * Added sub-command option support [itay] - -0.4.3 / 2011-12-04 -================== - - * Fixed custom help ordering. Closes #32 - -0.4.2 / 2011-11-24 -================== - - * Added travis support - * Fixed: line-buffered input automatically trimmed. Closes #31 - -0.4.1 / 2011-11-18 -================== - - * Removed listening for "close" on --help - -0.4.0 / 2011-11-15 -================== - - * Added support for `--`. Closes #24 - -0.3.3 / 2011-11-14 -================== - - * Fixed: wait for close event when writing help info [Jerry Hamlet] - -0.3.2 / 2011-11-01 -================== - - * Fixed long flag definitions with values [felixge] - -0.3.1 / 2011-10-31 -================== - - * Changed `--version` short flag to `-V` from `-v` - * Changed `.version()` so it's configurable [felixge] - -0.3.0 / 2011-10-31 -================== - - * Added support for long flags only. Closes #18 - -0.2.1 / 2011-10-24 -================== - - * "node": ">= 0.4.x < 0.7.0". Closes #20 - -0.2.0 / 2011-09-26 -================== - - * Allow for defaults that are not just boolean. Default peassignment only occurs for --no-*, optional, and required arguments. [Jim Isaacs] - -0.1.0 / 2011-08-24 -================== - - * Added support for custom `--help` output - -0.0.5 / 2011-08-18 -================== - - * Changed: when the user enters nothing prompt for password again - * Fixed issue with passwords beginning with numbers [NuckChorris] - -0.0.4 / 2011-08-15 -================== - - * Fixed `Commander#args` - -0.0.3 / 2011-08-15 -================== - - * Added default option value support - -0.0.2 / 2011-08-15 -================== - - * Added mask support to `Command#password(str[, mask], fn)` - * Added `Command#password(str, fn)` - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/express/node_modules/commander/Readme.md b/node_modules/express/node_modules/commander/Readme.md deleted file mode 100644 index ed0aeb2c..00000000 --- a/node_modules/express/node_modules/commander/Readme.md +++ /dev/null @@ -1,276 +0,0 @@ -# Commander.js - - The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander). - - [![Build Status](https://secure.travis-ci.org/visionmedia/commander.js.png)](http://travis-ci.org/visionmedia/commander.js) - -## Installation - - $ npm install commander - -## Option parsing - - Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('commander'); - -program - .version('0.0.1') - .option('-p, --peppers', 'Add peppers') - .option('-P, --pineapple', 'Add pineapple') - .option('-b, --bbq', 'Add bbq sauce') - .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble') - .parse(process.argv); - -console.log('you ordered a pizza with:'); -if (program.peppers) console.log(' - peppers'); -if (program.pineapple) console.log(' - pineapple'); -if (program.bbq) console.log(' - bbq'); -console.log(' - %s cheese', program.cheese); -``` - - Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc. - -## Automated --help - - The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free: - -``` - $ ./examples/pizza --help - - Usage: pizza [options] - - Options: - - -V, --version output the version number - -p, --peppers Add peppers - -P, --pineapple Add pineapple - -b, --bbq Add bbq sauce - -c, --cheese Add the specified type of cheese [marble] - -h, --help output usage information - -``` - -## Coercion - -```js -function range(val) { - return val.split('..').map(Number); -} - -function list(val) { - return val.split(','); -} - -program - .version('0.0.1') - .usage('[options] ') - .option('-i, --integer ', 'An integer argument', parseInt) - .option('-f, --float ', 'A float argument', parseFloat) - .option('-r, --range ..', 'A range', range) - .option('-l, --list ', 'A list', list) - .option('-o, --optional [value]', 'An optional value') - .parse(process.argv); - -console.log(' int: %j', program.integer); -console.log(' float: %j', program.float); -console.log(' optional: %j', program.optional); -program.range = program.range || []; -console.log(' range: %j..%j', program.range[0], program.range[1]); -console.log(' list: %j', program.list); -console.log(' args: %j', program.args); -``` - -## Custom help - - You can display arbitrary `-h, --help` information - by listening for "--help". Commander will automatically - exit once you are done so that the remainder of your program - does not execute causing undesired behaviours, for example - in the following executable "stuff" will not output when - `--help` is used. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('../'); - -function list(val) { - return val.split(',').map(Number); -} - -program - .version('0.0.1') - .option('-f, --foo', 'enable some foo') - .option('-b, --bar', 'enable some bar') - .option('-B, --baz', 'enable some baz'); - -// must be before .parse() since -// node's emit() is immediate - -program.on('--help', function(){ - console.log(' Examples:'); - console.log(''); - console.log(' $ custom-help --help'); - console.log(' $ custom-help -h'); - console.log(''); -}); - -program.parse(process.argv); - -console.log('stuff'); -``` - -yielding the following help output: - -``` - -Usage: custom-help [options] - -Options: - - -h, --help output usage information - -V, --version output the version number - -f, --foo enable some foo - -b, --bar enable some bar - -B, --baz enable some baz - -Examples: - - $ custom-help --help - $ custom-help -h - -``` - -## .prompt(msg, fn) - - Single-line prompt: - -```js -program.prompt('name: ', function(name){ - console.log('hi %s', name); -}); -``` - - Multi-line prompt: - -```js -program.prompt('description:', function(name){ - console.log('hi %s', name); -}); -``` - - Coercion: - -```js -program.prompt('Age: ', Number, function(age){ - console.log('age: %j', age); -}); -``` - -```js -program.prompt('Birthdate: ', Date, function(date){ - console.log('date: %s', date); -}); -``` - -```js -program.prompt('Email: ', /^.+@.+\..+$/, function(email){ - console.log('email: %j', email); -}); -``` - -## .password(msg[, mask], fn) - -Prompt for password without echoing: - -```js -program.password('Password: ', function(pass){ - console.log('got "%s"', pass); - process.stdin.destroy(); -}); -``` - -Prompt for password with mask char "*": - -```js -program.password('Password: ', '*', function(pass){ - console.log('got "%s"', pass); - process.stdin.destroy(); -}); -``` - -## .confirm(msg, fn) - - Confirm with the given `msg`: - -```js -program.confirm('continue? ', function(ok){ - console.log(' got %j', ok); -}); -``` - -## .choose(list, fn) - - Let the user choose from a `list`: - -```js -var list = ['tobi', 'loki', 'jane', 'manny', 'luna']; - -console.log('Choose the coolest pet:'); -program.choose(list, function(i){ - console.log('you chose %d "%s"', i, list[i]); -}); -``` - -## .outputHelp() - - Output help information without exiting. - -## .help() - - Output help information and exit immediately. - -## Links - - - [API documentation](http://visionmedia.github.com/commander.js/) - - [ascii tables](https://github.com/LearnBoost/cli-table) - - [progress bars](https://github.com/visionmedia/node-progress) - - [more progress bars](https://github.com/substack/node-multimeter) - - [examples](https://github.com/visionmedia/commander.js/tree/master/examples) - -## License - -(The MIT License) - -Copyright (c) 2011 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/node_modules/express/node_modules/commander/index.js b/node_modules/express/node_modules/commander/index.js deleted file mode 100644 index d9634e34..00000000 --- a/node_modules/express/node_modules/commander/index.js +++ /dev/null @@ -1,1160 +0,0 @@ -/*! - * commander - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , spawn = require('child_process').spawn - , keypress = require('keypress') - , fs = require('fs') - , exists = fs.existsSync - , path = require('path') - , tty = require('tty') - , dirname = path.dirname - , basename = path.basename; - -/** - * Expose the root command. - */ - -exports = module.exports = new Command; - -/** - * Expose `Command`. - */ - -exports.Command = Command; - -/** - * Expose `Option`. - */ - -exports.Option = Option; - -/** - * Initialize a new `Option` with the given `flags` and `description`. - * - * @param {String} flags - * @param {String} description - * @api public - */ - -function Option(flags, description) { - this.flags = flags; - this.required = ~flags.indexOf('<'); - this.optional = ~flags.indexOf('['); - this.bool = !~flags.indexOf('-no-'); - flags = flags.split(/[ ,|]+/); - if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift(); - this.long = flags.shift(); - this.description = description || ''; -} - -/** - * Return option name. - * - * @return {String} - * @api private - */ - -Option.prototype.name = function(){ - return this.long - .replace('--', '') - .replace('no-', ''); -}; - -/** - * Check if `arg` matches the short or long flag. - * - * @param {String} arg - * @return {Boolean} - * @api private - */ - -Option.prototype.is = function(arg){ - return arg == this.short - || arg == this.long; -}; - -/** - * Initialize a new `Command`. - * - * @param {String} name - * @api public - */ - -function Command(name) { - this.commands = []; - this.options = []; - this._execs = []; - this._args = []; - this._name = name; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Command.prototype.__proto__ = EventEmitter.prototype; - -/** - * Add command `name`. - * - * The `.action()` callback is invoked when the - * command `name` is specified via __ARGV__, - * and the remaining arguments are applied to the - * function for access. - * - * When the `name` is "*" an un-matched command - * will be passed as the first arg, followed by - * the rest of __ARGV__ remaining. - * - * Examples: - * - * program - * .version('0.0.1') - * .option('-C, --chdir ', 'change the working directory') - * .option('-c, --config ', 'set config path. defaults to ./deploy.conf') - * .option('-T, --no-tests', 'ignore test hook') - * - * program - * .command('setup') - * .description('run remote setup commands') - * .action(function(){ - * console.log('setup'); - * }); - * - * program - * .command('exec ') - * .description('run the given remote command') - * .action(function(cmd){ - * console.log('exec "%s"', cmd); - * }); - * - * program - * .command('*') - * .description('deploy the given env') - * .action(function(env){ - * console.log('deploying "%s"', env); - * }); - * - * program.parse(process.argv); - * - * @param {String} name - * @param {String} [desc] - * @return {Command} the new command - * @api public - */ - -Command.prototype.command = function(name, desc){ - var args = name.split(/ +/); - var cmd = new Command(args.shift()); - if (desc) cmd.description(desc); - if (desc) this.executables = true; - if (desc) this._execs[cmd._name] = true; - this.commands.push(cmd); - cmd.parseExpectedArgs(args); - cmd.parent = this; - if (desc) return this; - return cmd; -}; - -/** - * Add an implicit `help [cmd]` subcommand - * which invokes `--help` for the given command. - * - * @api private - */ - -Command.prototype.addImplicitHelpCommand = function() { - this.command('help [cmd]', 'display help for [cmd]'); -}; - -/** - * Parse expected `args`. - * - * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. - * - * @param {Array} args - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parseExpectedArgs = function(args){ - if (!args.length) return; - var self = this; - args.forEach(function(arg){ - switch (arg[0]) { - case '<': - self._args.push({ required: true, name: arg.slice(1, -1) }); - break; - case '[': - self._args.push({ required: false, name: arg.slice(1, -1) }); - break; - } - }); - return this; -}; - -/** - * Register callback `fn` for the command. - * - * Examples: - * - * program - * .command('help') - * .description('display verbose help') - * .action(function(){ - * // output help here - * }); - * - * @param {Function} fn - * @return {Command} for chaining - * @api public - */ - -Command.prototype.action = function(fn){ - var self = this; - this.parent.on(this._name, function(args, unknown){ - // Parse any so-far unknown options - unknown = unknown || []; - var parsed = self.parseOptions(unknown); - - // Output help if necessary - outputHelpIfNecessary(self, parsed.unknown); - - // If there are still any unknown options, then we simply - // die, unless someone asked for help, in which case we give it - // to them, and then we die. - if (parsed.unknown.length > 0) { - self.unknownOption(parsed.unknown[0]); - } - - // Leftover arguments need to be pushed back. Fixes issue #56 - if (parsed.args.length) args = parsed.args.concat(args); - - self._args.forEach(function(arg, i){ - if (arg.required && null == args[i]) { - self.missingArgument(arg.name); - } - }); - - // Always append ourselves to the end of the arguments, - // to make sure we match the number of arguments the user - // expects - if (self._args.length) { - args[self._args.length] = self; - } else { - args.push(self); - } - - fn.apply(this, args); - }); - return this; -}; - -/** - * Define option with `flags`, `description` and optional - * coercion `fn`. - * - * The `flags` string should contain both the short and long flags, - * separated by comma, a pipe or space. The following are all valid - * all will output this way when `--help` is used. - * - * "-p, --pepper" - * "-p|--pepper" - * "-p --pepper" - * - * Examples: - * - * // simple boolean defaulting to false - * program.option('-p, --pepper', 'add pepper'); - * - * --pepper - * program.pepper - * // => Boolean - * - * // simple boolean defaulting to false - * program.option('-C, --no-cheese', 'remove cheese'); - * - * program.cheese - * // => true - * - * --no-cheese - * program.cheese - * // => true - * - * // required argument - * program.option('-C, --chdir ', 'change the working directory'); - * - * --chdir /tmp - * program.chdir - * // => "/tmp" - * - * // optional argument - * program.option('-c, --cheese [type]', 'add cheese [marble]'); - * - * @param {String} flags - * @param {String} description - * @param {Function|Mixed} fn or default - * @param {Mixed} defaultValue - * @return {Command} for chaining - * @api public - */ - -Command.prototype.option = function(flags, description, fn, defaultValue){ - var self = this - , option = new Option(flags, description) - , oname = option.name() - , name = camelcase(oname); - - // default as 3rd arg - if ('function' != typeof fn) defaultValue = fn, fn = null; - - // preassign default value only for --no-*, [optional], or - if (false == option.bool || option.optional || option.required) { - // when --no-* we make sure default is true - if (false == option.bool) defaultValue = true; - // preassign only if we have a default - if (undefined !== defaultValue) self[name] = defaultValue; - } - - // register the option - this.options.push(option); - - // when it's passed assign the value - // and conditionally invoke the callback - this.on(oname, function(val){ - // coercion - if (null != val && fn) val = fn(val); - - // unassigned or bool - if ('boolean' == typeof self[name] || 'undefined' == typeof self[name]) { - // if no value, bool true, and we have a default, then use it! - if (null == val) { - self[name] = option.bool - ? defaultValue || true - : false; - } else { - self[name] = val; - } - } else if (null !== val) { - // reassign - self[name] = val; - } - }); - - return this; -}; - -/** - * Parse `argv`, settings options and invoking commands when defined. - * - * @param {Array} argv - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parse = function(argv){ - // implicit help - if (this.executables) this.addImplicitHelpCommand(); - - // store raw args - this.rawArgs = argv; - - // guess name - this._name = this._name || basename(argv[1]); - - // process argv - var parsed = this.parseOptions(this.normalize(argv.slice(2))); - var args = this.args = parsed.args; - - var result = this.parseArgs(this.args, parsed.unknown); - - // executable sub-commands - var name = result.args[0]; - if (this._execs[name]) return this.executeSubCommand(argv, args, parsed.unknown); - - return result; -}; - -/** - * Execute a sub-command executable. - * - * @param {Array} argv - * @param {Array} args - * @param {Array} unknown - * @api private - */ - -Command.prototype.executeSubCommand = function(argv, args, unknown) { - args = args.concat(unknown); - - if (!args.length) this.help(); - if ('help' == args[0] && 1 == args.length) this.help(); - - // --help - if ('help' == args[0]) { - args[0] = args[1]; - args[1] = '--help'; - } - - // executable - var dir = dirname(argv[1]); - var bin = basename(argv[1]) + '-' + args[0]; - - // check for ./ first - var local = path.join(dir, bin); - - // run it - args = args.slice(1); - var proc = spawn(local, args, { stdio: 'inherit', customFds: [0, 1, 2] }); - proc.on('error', function(err){ - if (err.code == "ENOENT") { - console.error('\n %s(1) does not exist, try --help\n', bin); - } else if (err.code == "EACCES") { - console.error('\n %s(1) not executable. try chmod or run with root\n', bin); - } - }); - - this.runningCommand = proc; -}; - -/** - * Normalize `args`, splitting joined short flags. For example - * the arg "-abc" is equivalent to "-a -b -c". - * This also normalizes equal sign and splits "--abc=def" into "--abc def". - * - * @param {Array} args - * @return {Array} - * @api private - */ - -Command.prototype.normalize = function(args){ - var ret = [] - , arg - , index; - - for (var i = 0, len = args.length; i < len; ++i) { - arg = args[i]; - if (arg.length > 1 && '-' == arg[0] && '-' != arg[1]) { - arg.slice(1).split('').forEach(function(c){ - ret.push('-' + c); - }); - } else if (/^--/.test(arg) && ~(index = arg.indexOf('='))) { - ret.push(arg.slice(0, index), arg.slice(index + 1)); - } else { - ret.push(arg); - } - } - - return ret; -}; - -/** - * Parse command `args`. - * - * When listener(s) are available those - * callbacks are invoked, otherwise the "*" - * event is emitted and those actions are invoked. - * - * @param {Array} args - * @return {Command} for chaining - * @api private - */ - -Command.prototype.parseArgs = function(args, unknown){ - var cmds = this.commands - , len = cmds.length - , name; - - if (args.length) { - name = args[0]; - if (this.listeners(name).length) { - this.emit(args.shift(), args, unknown); - } else { - this.emit('*', args); - } - } else { - outputHelpIfNecessary(this, unknown); - - // If there were no args and we have unknown options, - // then they are extraneous and we need to error. - if (unknown.length > 0) { - this.unknownOption(unknown[0]); - } - } - - return this; -}; - -/** - * Return an option matching `arg` if any. - * - * @param {String} arg - * @return {Option} - * @api private - */ - -Command.prototype.optionFor = function(arg){ - for (var i = 0, len = this.options.length; i < len; ++i) { - if (this.options[i].is(arg)) { - return this.options[i]; - } - } -}; - -/** - * Parse options from `argv` returning `argv` - * void of these options. - * - * @param {Array} argv - * @return {Array} - * @api public - */ - -Command.prototype.parseOptions = function(argv){ - var args = [] - , len = argv.length - , literal - , option - , arg; - - var unknownOptions = []; - - // parse options - for (var i = 0; i < len; ++i) { - arg = argv[i]; - - // literal args after -- - if ('--' == arg) { - literal = true; - continue; - } - - if (literal) { - args.push(arg); - continue; - } - - // find matching Option - option = this.optionFor(arg); - - // option is defined - if (option) { - // requires arg - if (option.required) { - arg = argv[++i]; - if (null == arg) return this.optionMissingArgument(option); - if ('-' == arg[0] && '-' != arg) return this.optionMissingArgument(option, arg); - this.emit(option.name(), arg); - // optional arg - } else if (option.optional) { - arg = argv[i+1]; - if (null == arg || ('-' == arg[0] && '-' != arg)) { - arg = null; - } else { - ++i; - } - this.emit(option.name(), arg); - // bool - } else { - this.emit(option.name()); - } - continue; - } - - // looks like an option - if (arg.length > 1 && '-' == arg[0]) { - unknownOptions.push(arg); - - // If the next argument looks like it might be - // an argument for this option, we pass it on. - // If it isn't, then it'll simply be ignored - if (argv[i+1] && '-' != argv[i+1][0]) { - unknownOptions.push(argv[++i]); - } - continue; - } - - // arg - args.push(arg); - } - - return { args: args, unknown: unknownOptions }; -}; - -/** - * Argument `name` is missing. - * - * @param {String} name - * @api private - */ - -Command.prototype.missingArgument = function(name){ - console.error(); - console.error(" error: missing required argument `%s'", name); - console.error(); - process.exit(1); -}; - -/** - * `Option` is missing an argument, but received `flag` or nothing. - * - * @param {String} option - * @param {String} flag - * @api private - */ - -Command.prototype.optionMissingArgument = function(option, flag){ - console.error(); - if (flag) { - console.error(" error: option `%s' argument missing, got `%s'", option.flags, flag); - } else { - console.error(" error: option `%s' argument missing", option.flags); - } - console.error(); - process.exit(1); -}; - -/** - * Unknown option `flag`. - * - * @param {String} flag - * @api private - */ - -Command.prototype.unknownOption = function(flag){ - console.error(); - console.error(" error: unknown option `%s'", flag); - console.error(); - process.exit(1); -}; - - -/** - * Set the program version to `str`. - * - * This method auto-registers the "-V, --version" flag - * which will print the version number when passed. - * - * @param {String} str - * @param {String} flags - * @return {Command} for chaining - * @api public - */ - -Command.prototype.version = function(str, flags){ - if (0 == arguments.length) return this._version; - this._version = str; - flags = flags || '-V, --version'; - this.option(flags, 'output the version number'); - this.on('version', function(){ - console.log(str); - process.exit(0); - }); - return this; -}; - -/** - * Set the description `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.description = function(str){ - if (0 == arguments.length) return this._description; - this._description = str; - return this; -}; - -/** - * Set / get the command usage `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.usage = function(str){ - var args = this._args.map(function(arg){ - return arg.required - ? '<' + arg.name + '>' - : '[' + arg.name + ']'; - }); - - var usage = '[options' - + (this.commands.length ? '] [command' : '') - + ']' - + (this._args.length ? ' ' + args : ''); - - if (0 == arguments.length) return this._usage || usage; - this._usage = str; - - return this; -}; - -/** - * Return the largest option length. - * - * @return {Number} - * @api private - */ - -Command.prototype.largestOptionLength = function(){ - return this.options.reduce(function(max, option){ - return Math.max(max, option.flags.length); - }, 0); -}; - -/** - * Return help for options. - * - * @return {String} - * @api private - */ - -Command.prototype.optionHelp = function(){ - var width = this.largestOptionLength(); - - // Prepend the help information - return [pad('-h, --help', width) + ' ' + 'output usage information'] - .concat(this.options.map(function(option){ - return pad(option.flags, width) - + ' ' + option.description; - })) - .join('\n'); -}; - -/** - * Return command help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.commandHelp = function(){ - if (!this.commands.length) return ''; - return [ - '' - , ' Commands:' - , '' - , this.commands.map(function(cmd){ - var args = cmd._args.map(function(arg){ - return arg.required - ? '<' + arg.name + '>' - : '[' + arg.name + ']'; - }).join(' '); - - return pad(cmd._name - + (cmd.options.length - ? ' [options]' - : '') + ' ' + args, 22) - + (cmd.description() - ? ' ' + cmd.description() - : ''); - }).join('\n').replace(/^/gm, ' ') - , '' - ].join('\n'); -}; - -/** - * Return program help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.helpInformation = function(){ - return [ - '' - , ' Usage: ' + this._name + ' ' + this.usage() - , '' + this.commandHelp() - , ' Options:' - , '' - , '' + this.optionHelp().replace(/^/gm, ' ') - , '' - , '' - ].join('\n'); -}; - -/** - * Prompt for a `Number`. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptForNumber = function(str, fn){ - var self = this; - this.promptSingleLine(str, function parseNumber(val){ - val = Number(val); - if (isNaN(val)) return self.promptSingleLine(str + '(must be a number) ', parseNumber); - fn(val); - }); -}; - -/** - * Prompt for a `Date`. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptForDate = function(str, fn){ - var self = this; - this.promptSingleLine(str, function parseDate(val){ - val = new Date(val); - if (isNaN(val.getTime())) return self.promptSingleLine(str + '(must be a date) ', parseDate); - fn(val); - }); -}; - - -/** - * Prompt for a `Regular Expression`. - * - * @param {String} str - * @param {Object} pattern regular expression object to test - * @param {Function} fn - * @api private - */ - -Command.prototype.promptForRegexp = function(str, pattern, fn){ - var self = this; - this.promptSingleLine(str, function parseRegexp(val){ - if(!pattern.test(val)) return self.promptSingleLine(str + '(regular expression mismatch) ', parseRegexp); - fn(val); - }); -}; - - -/** - * Single-line prompt. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptSingleLine = function(str, fn){ - // determine if the 2nd argument is a regular expression - if (arguments[1].global !== undefined && arguments[1].multiline !== undefined) { - return this.promptForRegexp(str, arguments[1], arguments[2]); - } else if ('function' == typeof arguments[2]) { - return this['promptFor' + (fn.name || fn)](str, arguments[2]); - } - - process.stdout.write(str); - process.stdin.setEncoding('utf8'); - process.stdin.once('data', function(val){ - fn(val.trim()); - }).resume(); -}; - -/** - * Multi-line prompt. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptMultiLine = function(str, fn){ - var buf = []; - console.log(str); - process.stdin.setEncoding('utf8'); - process.stdin.on('data', function(val){ - if ('\n' == val || '\r\n' == val) { - process.stdin.removeAllListeners('data'); - fn(buf.join('\n')); - } else { - buf.push(val.trimRight()); - } - }).resume(); -}; - -/** - * Prompt `str` and callback `fn(val)` - * - * Commander supports single-line and multi-line prompts. - * To issue a single-line prompt simply add white-space - * to the end of `str`, something like "name: ", whereas - * for a multi-line prompt omit this "description:". - * - * - * Examples: - * - * program.prompt('Username: ', function(name){ - * console.log('hi %s', name); - * }); - * - * program.prompt('Description:', function(desc){ - * console.log('description was "%s"', desc.trim()); - * }); - * - * @param {String|Object} str - * @param {Function} fn - * @api public - */ - -Command.prototype.prompt = function(str, fn){ - var self = this; - if ('string' == typeof str) { - if (/ $/.test(str)) return this.promptSingleLine.apply(this, arguments); - this.promptMultiLine(str, fn); - } else { - var keys = Object.keys(str) - , obj = {}; - - function next() { - var key = keys.shift() - , label = str[key]; - - if (!key) return fn(obj); - self.prompt(label, function(val){ - obj[key] = val; - next(); - }); - } - - next(); - } -}; - -/** - * Prompt for password with `str`, `mask` char and callback `fn(val)`. - * - * The mask string defaults to '', aka no output is - * written while typing, you may want to use "*" etc. - * - * Examples: - * - * program.password('Password: ', function(pass){ - * console.log('got "%s"', pass); - * process.stdin.destroy(); - * }); - * - * program.password('Password: ', '*', function(pass){ - * console.log('got "%s"', pass); - * process.stdin.destroy(); - * }); - * - * @param {String} str - * @param {String} mask - * @param {Function} fn - * @api public - */ - -Command.prototype.password = function(str, mask, fn){ - var self = this - , buf = ''; - - // default mask - if ('function' == typeof mask) { - fn = mask; - mask = ''; - } - - keypress(process.stdin); - - function setRawMode(mode) { - if (process.stdin.setRawMode) { - process.stdin.setRawMode(mode); - } else { - tty.setRawMode(mode); - } - }; - setRawMode(true); - process.stdout.write(str); - - // keypress - process.stdin.on('keypress', function(c, key){ - if (key && 'enter' == key.name) { - console.log(); - process.stdin.pause(); - process.stdin.removeAllListeners('keypress'); - setRawMode(false); - if (!buf.trim().length) return self.password(str, mask, fn); - fn(buf); - return; - } - - if (key && key.ctrl && 'c' == key.name) { - console.log('%s', buf); - process.exit(); - } - - process.stdout.write(mask); - buf += c; - }).resume(); -}; - -/** - * Confirmation prompt with `str` and callback `fn(bool)` - * - * Examples: - * - * program.confirm('continue? ', function(ok){ - * console.log(' got %j', ok); - * process.stdin.destroy(); - * }); - * - * @param {String} str - * @param {Function} fn - * @api public - */ - - -Command.prototype.confirm = function(str, fn, verbose){ - var self = this; - this.prompt(str, function(ok){ - if (!ok.trim()) { - if (!verbose) str += '(yes or no) '; - return self.confirm(str, fn, true); - } - fn(parseBool(ok)); - }); -}; - -/** - * Choice prompt with `list` of items and callback `fn(index, item)` - * - * Examples: - * - * var list = ['tobi', 'loki', 'jane', 'manny', 'luna']; - * - * console.log('Choose the coolest pet:'); - * program.choose(list, function(i){ - * console.log('you chose %d "%s"', i, list[i]); - * process.stdin.destroy(); - * }); - * - * @param {Array} list - * @param {Number|Function} index or fn - * @param {Function} fn - * @api public - */ - -Command.prototype.choose = function(list, index, fn){ - var self = this - , hasDefault = 'number' == typeof index; - - if (!hasDefault) { - fn = index; - index = null; - } - - list.forEach(function(item, i){ - if (hasDefault && i == index) { - console.log('* %d) %s', i + 1, item); - } else { - console.log(' %d) %s', i + 1, item); - } - }); - - function again() { - self.prompt(' : ', function(val){ - val = parseInt(val, 10) - 1; - if (hasDefault && isNaN(val)) val = index; - - if (null == list[val]) { - again(); - } else { - fn(val, list[val]); - } - }); - } - - again(); -}; - - -/** - * Output help information for this command - * - * @api public - */ - -Command.prototype.outputHelp = function(){ - process.stdout.write(this.helpInformation()); - this.emit('--help'); -}; - -/** - * Output help information and exit. - * - * @api public - */ - -Command.prototype.help = function(){ - this.outputHelp(); - process.exit(); -}; - -/** - * Camel-case the given `flag` - * - * @param {String} flag - * @return {String} - * @api private - */ - -function camelcase(flag) { - return flag.split('-').reduce(function(str, word){ - return str + word[0].toUpperCase() + word.slice(1); - }); -} - -/** - * Parse a boolean `str`. - * - * @param {String} str - * @return {Boolean} - * @api private - */ - -function parseBool(str) { - return /^y|yes|ok|true$/i.test(str); -} - -/** - * Pad `str` to `width`. - * - * @param {String} str - * @param {Number} width - * @return {String} - * @api private - */ - -function pad(str, width) { - var len = Math.max(0, width - str.length); - return str + Array(len + 1).join(' '); -} - -/** - * Output help information if necessary - * - * @param {Command} command to output help for - * @param {Array} array of options to search for -h or --help - * @api private - */ - -function outputHelpIfNecessary(cmd, options) { - options = options || []; - for (var i = 0; i < options.length; i++) { - if (options[i] == '--help' || options[i] == '-h') { - cmd.outputHelp(); - process.exit(0); - } - } -} diff --git a/node_modules/express/node_modules/commander/node_modules/keypress/README.md b/node_modules/express/node_modules/commander/node_modules/keypress/README.md deleted file mode 100644 index a768e8f5..00000000 --- a/node_modules/express/node_modules/commander/node_modules/keypress/README.md +++ /dev/null @@ -1,101 +0,0 @@ -keypress -======== -### Make any Node ReadableStream emit "keypress" events - - -Previous to Node `v0.8.x`, there was an undocumented `"keypress"` event that -`process.stdin` would emit when it was a TTY. Some people discovered this hidden -gem, and started using it in their own code. - -Now in Node `v0.8.x`, this `"keypress"` event does not get emitted by default, -but rather only when it is being used in conjuction with the `readline` (or by -extension, the `repl`) module. - -This module is the exact logic from the node `v0.8.x` releases ripped out into its -own module. - -__Bonus:__ Now with mouse support! - -Installation ------------- - -Install with `npm`: - -``` bash -$ npm install keypress -``` - -Or add it to the `"dependencies"` section of your _package.json_ file. - - -Example -------- - -#### Listening for "keypress" events - -``` js -var keypress = require('keypress'); - -// make `process.stdin` begin emitting "keypress" events -keypress(process.stdin); - -// listen for the "keypress" event -process.stdin.on('keypress', function (ch, key) { - console.log('got "keypress"', key); - if (key && key.ctrl && key.name == 'c') { - process.stdin.pause(); - } -}); - -process.stdin.setRawMode(true); -process.stdin.resume(); -``` - -#### Listening for "mousepress" events - -``` js -var keypress = require('keypress'); - -// make `process.stdin` begin emitting "mousepress" (and "keypress") events -keypress(process.stdin); - -// you must enable the mouse events before they will begin firing -keypress.enableMouse(process.stdout); - -process.stdin.on('mousepress', function (info) { - console.log('got "mousepress" event at %d x %d', info.x, info.y); -}); - -process.on('exit', function () { - // disable mouse on exit, so that the state - // is back to normal for the terminal - keypress.disableMouse(process.stdout); -}); -``` - - -License -------- - -(The MIT License) - -Copyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net> - -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/node_modules/express/node_modules/commander/node_modules/keypress/index.js b/node_modules/express/node_modules/commander/node_modules/keypress/index.js deleted file mode 100644 index c2ba488b..00000000 --- a/node_modules/express/node_modules/commander/node_modules/keypress/index.js +++ /dev/null @@ -1,346 +0,0 @@ - -/** - * This module offers the internal "keypress" functionality from node-core's - * `readline` module, for your own programs and modules to use. - * - * Usage: - * - * require('keypress')(process.stdin); - * - * process.stdin.on('keypress', function (ch, key) { - * console.log(ch, key); - * if (key.ctrl && key.name == 'c') { - * process.stdin.pause(); - * } - * }); - * proces.stdin.resume(); - */ -var exports = module.exports = keypress; - -exports.enableMouse = function (stream) { - stream.write('\x1b' +'[?1000h') -} - -exports.disableMouse = function (stream) { - stream.write('\x1b' +'[?1000l') -} - - -/** - * accepts a readable Stream instance and makes it emit "keypress" events - */ - -function keypress(stream) { - if (isEmittingKeypress(stream)) return; - stream._emitKeypress = true; - - function onData(b) { - if (stream.listeners('keypress').length > 0) { - emitKey(stream, b); - } else { - // Nobody's watching anyway - stream.removeListener('data', onData); - stream.on('newListener', onNewListener); - } - } - - function onNewListener(event) { - if (event == 'keypress') { - stream.on('data', onData); - stream.removeListener('newListener', onNewListener); - } - } - - if (stream.listeners('keypress').length > 0) { - stream.on('data', onData); - } else { - stream.on('newListener', onNewListener); - } -} - -/** - * Returns `true` if the stream is already emitting "keypress" events. - * `false` otherwise. - */ - -function isEmittingKeypress(stream) { - var rtn = stream._emitKeypress; - if (!rtn) { - // hack: check for the v0.6.x "data" event - stream.listeners('data').forEach(function (l) { - if (l.name == 'onData' && /emitKey/.test(l.toString())) { - rtn = true; - stream._emitKeypress = true; - } - }); - } - if (!rtn) { - // hack: check for the v0.6.x "newListener" event - stream.listeners('newListener').forEach(function (l) { - if (l.name == 'onNewListener' && /keypress/.test(l.toString())) { - rtn = true; - stream._emitKeypress = true; - } - }); - } - return rtn; -} - - -/* - Some patterns seen in terminal key escape codes, derived from combos seen - at http://www.midnight-commander.org/browser/lib/tty/key.c - - ESC letter - ESC [ letter - ESC [ modifier letter - ESC [ 1 ; modifier letter - ESC [ num char - ESC [ num ; modifier char - ESC O letter - ESC O modifier letter - ESC O 1 ; modifier letter - ESC N letter - ESC [ [ num ; modifier char - ESC [ [ 1 ; modifier letter - ESC ESC [ num char - ESC ESC O letter - - - char is usually ~ but $ and ^ also happen with rxvt - - modifier is 1 + - (shift * 1) + - (left_alt * 2) + - (ctrl * 4) + - (right_alt * 8) - - two leading ESCs apparently mean the same as one leading ESC -*/ - -// Regexes used for ansi escape code splitting -var metaKeyCodeRe = /^(?:\x1b)([a-zA-Z0-9])$/; -var functionKeyCodeRe = - /^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/; - -function emitKey(stream, s) { - var ch, - key = { - name: undefined, - ctrl: false, - meta: false, - shift: false - }, - parts; - - if (Buffer.isBuffer(s)) { - if (s[0] > 127 && s[1] === undefined) { - s[0] -= 128; - s = '\x1b' + s.toString(stream.encoding || 'utf-8'); - } else { - s = s.toString(stream.encoding || 'utf-8'); - } - } - - key.sequence = s; - - if (s === '\r' || s === '\n') { - // enter - key.name = 'enter'; - - } else if (s === '\t') { - // tab - key.name = 'tab'; - - } else if (s === '\b' || s === '\x7f' || - s === '\x1b\x7f' || s === '\x1b\b') { - // backspace or ctrl+h - key.name = 'backspace'; - key.meta = (s.charAt(0) === '\x1b'); - - } else if (s === '\x1b' || s === '\x1b\x1b') { - // escape key - key.name = 'escape'; - key.meta = (s.length === 2); - - } else if (s === ' ' || s === '\x1b ') { - key.name = 'space'; - key.meta = (s.length === 2); - - } else if (s <= '\x1a') { - // ctrl+letter - key.name = String.fromCharCode(s.charCodeAt(0) + 'a'.charCodeAt(0) - 1); - key.ctrl = true; - - } else if (s.length === 1 && s >= 'a' && s <= 'z') { - // lowercase letter - key.name = s; - - } else if (s.length === 1 && s >= 'A' && s <= 'Z') { - // shift+letter - key.name = s.toLowerCase(); - key.shift = true; - - } else if (parts = metaKeyCodeRe.exec(s)) { - // meta+character key - key.name = parts[1].toLowerCase(); - key.meta = true; - key.shift = /^[A-Z]$/.test(parts[1]); - - } else if (parts = functionKeyCodeRe.exec(s)) { - // ansi escape sequence - - // reassemble the key code leaving out leading \x1b's, - // the modifier key bitflag and any meaningless "1;" sequence - var code = (parts[1] || '') + (parts[2] || '') + - (parts[4] || '') + (parts[6] || ''), - modifier = (parts[3] || parts[5] || 1) - 1; - - // Parse the key modifier - key.ctrl = !!(modifier & 4); - key.meta = !!(modifier & 10); - key.shift = !!(modifier & 1); - key.code = code; - - // Parse the key itself - switch (code) { - /* xterm/gnome ESC O letter */ - case 'OP': key.name = 'f1'; break; - case 'OQ': key.name = 'f2'; break; - case 'OR': key.name = 'f3'; break; - case 'OS': key.name = 'f4'; break; - - /* xterm/rxvt ESC [ number ~ */ - case '[11~': key.name = 'f1'; break; - case '[12~': key.name = 'f2'; break; - case '[13~': key.name = 'f3'; break; - case '[14~': key.name = 'f4'; break; - - /* from Cygwin and used in libuv */ - case '[[A': key.name = 'f1'; break; - case '[[B': key.name = 'f2'; break; - case '[[C': key.name = 'f3'; break; - case '[[D': key.name = 'f4'; break; - case '[[E': key.name = 'f5'; break; - - /* common */ - case '[15~': key.name = 'f5'; break; - case '[17~': key.name = 'f6'; break; - case '[18~': key.name = 'f7'; break; - case '[19~': key.name = 'f8'; break; - case '[20~': key.name = 'f9'; break; - case '[21~': key.name = 'f10'; break; - case '[23~': key.name = 'f11'; break; - case '[24~': key.name = 'f12'; break; - - /* xterm ESC [ letter */ - case '[A': key.name = 'up'; break; - case '[B': key.name = 'down'; break; - case '[C': key.name = 'right'; break; - case '[D': key.name = 'left'; break; - case '[E': key.name = 'clear'; break; - case '[F': key.name = 'end'; break; - case '[H': key.name = 'home'; break; - - /* xterm/gnome ESC O letter */ - case 'OA': key.name = 'up'; break; - case 'OB': key.name = 'down'; break; - case 'OC': key.name = 'right'; break; - case 'OD': key.name = 'left'; break; - case 'OE': key.name = 'clear'; break; - case 'OF': key.name = 'end'; break; - case 'OH': key.name = 'home'; break; - - /* xterm/rxvt ESC [ number ~ */ - case '[1~': key.name = 'home'; break; - case '[2~': key.name = 'insert'; break; - case '[3~': key.name = 'delete'; break; - case '[4~': key.name = 'end'; break; - case '[5~': key.name = 'pageup'; break; - case '[6~': key.name = 'pagedown'; break; - - /* putty */ - case '[[5~': key.name = 'pageup'; break; - case '[[6~': key.name = 'pagedown'; break; - - /* rxvt */ - case '[7~': key.name = 'home'; break; - case '[8~': key.name = 'end'; break; - - /* rxvt keys with modifiers */ - case '[a': key.name = 'up'; key.shift = true; break; - case '[b': key.name = 'down'; key.shift = true; break; - case '[c': key.name = 'right'; key.shift = true; break; - case '[d': key.name = 'left'; key.shift = true; break; - case '[e': key.name = 'clear'; key.shift = true; break; - - case '[2$': key.name = 'insert'; key.shift = true; break; - case '[3$': key.name = 'delete'; key.shift = true; break; - case '[5$': key.name = 'pageup'; key.shift = true; break; - case '[6$': key.name = 'pagedown'; key.shift = true; break; - case '[7$': key.name = 'home'; key.shift = true; break; - case '[8$': key.name = 'end'; key.shift = true; break; - - case 'Oa': key.name = 'up'; key.ctrl = true; break; - case 'Ob': key.name = 'down'; key.ctrl = true; break; - case 'Oc': key.name = 'right'; key.ctrl = true; break; - case 'Od': key.name = 'left'; key.ctrl = true; break; - case 'Oe': key.name = 'clear'; key.ctrl = true; break; - - case '[2^': key.name = 'insert'; key.ctrl = true; break; - case '[3^': key.name = 'delete'; key.ctrl = true; break; - case '[5^': key.name = 'pageup'; key.ctrl = true; break; - case '[6^': key.name = 'pagedown'; key.ctrl = true; break; - case '[7^': key.name = 'home'; key.ctrl = true; break; - case '[8^': key.name = 'end'; key.ctrl = true; break; - - /* misc. */ - case '[Z': key.name = 'tab'; key.shift = true; break; - default: key.name = 'undefined'; break; - - } - } else if (s.length > 1 && s[0] !== '\x1b') { - // Got a longer-than-one string of characters. - // Probably a paste, since it wasn't a control sequence. - Array.prototype.forEach.call(s, function(c) { - emitKey(stream, c); - }); - return; - } - - if (key.code == '[M') { - key.name = 'mouse'; - var s = key.sequence; - var b = s.charCodeAt(3); - key.x = s.charCodeAt(4) - 040; - key.y = s.charCodeAt(5) - 040; - - key.scroll = 0; - - key.ctrl = !!(1<<4 & b); - key.meta = !!(1<<3 & b); - key.shift = !!(1<<2 & b); - - key.release = (3 & b) === 3; - - if (1<<6 & b) { //scroll - key.scroll = 1 & b ? 1 : -1; - } - - if (!key.release && !key.scroll) { - key.button = b & 3; - } - } - - // Don't emit a key if no name was found - if (key.name === undefined) { - key = undefined; - } - - if (s.length === 1) { - ch = s; - } - - if (key && key.name == 'mouse') { - stream.emit('mousepress', key) - } else if (key || ch) { - stream.emit('keypress', ch, key); - } -} diff --git a/node_modules/express/node_modules/commander/node_modules/keypress/package.json b/node_modules/express/node_modules/commander/node_modules/keypress/package.json deleted file mode 100644 index c5462052..00000000 --- a/node_modules/express/node_modules/commander/node_modules/keypress/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "keypress", - "version": "0.1.0", - "description": "Make any Node ReadableStream emit \"keypress\" events", - "author": { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://tootallnate.net" - }, - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/keypress.git" - }, - "keywords": [ - "keypress", - "readline", - "core" - ], - "license": "MIT", - "readme": "keypress\n========\n### Make any Node ReadableStream emit \"keypress\" events\n\n\nPrevious to Node `v0.8.x`, there was an undocumented `\"keypress\"` event that\n`process.stdin` would emit when it was a TTY. Some people discovered this hidden\ngem, and started using it in their own code.\n\nNow in Node `v0.8.x`, this `\"keypress\"` event does not get emitted by default,\nbut rather only when it is being used in conjuction with the `readline` (or by\nextension, the `repl`) module.\n\nThis module is the exact logic from the node `v0.8.x` releases ripped out into its\nown module.\n\n__Bonus:__ Now with mouse support!\n\nInstallation\n------------\n\nInstall with `npm`:\n\n``` bash\n$ npm install keypress\n```\n\nOr add it to the `\"dependencies\"` section of your _package.json_ file.\n\n\nExample\n-------\n\n#### Listening for \"keypress\" events\n\n``` js\nvar keypress = require('keypress');\n\n// make `process.stdin` begin emitting \"keypress\" events\nkeypress(process.stdin);\n\n// listen for the \"keypress\" event\nprocess.stdin.on('keypress', function (ch, key) {\n console.log('got \"keypress\"', key);\n if (key && key.ctrl && key.name == 'c') {\n process.stdin.pause();\n }\n});\n\nprocess.stdin.setRawMode(true);\nprocess.stdin.resume();\n```\n\n#### Listening for \"mousepress\" events\n\n``` js\nvar keypress = require('keypress');\n\n// make `process.stdin` begin emitting \"mousepress\" (and \"keypress\") events\nkeypress(process.stdin);\n\n// you must enable the mouse events before they will begin firing\nkeypress.enableMouse(process.stdout);\n\nprocess.stdin.on('mousepress', function (info) {\n console.log('got \"mousepress\" event at %d x %d', info.x, info.y);\n});\n\nprocess.on('exit', function () {\n // disable mouse on exit, so that the state\n // is back to normal for the terminal\n keypress.disableMouse(process.stdout);\n});\n```\n\n\nLicense\n-------\n\n(The MIT License)\n\nCopyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/TooTallNate/keypress/issues" - }, - "homepage": "https://github.com/TooTallNate/keypress", - "_id": "keypress@0.1.0", - "_from": "keypress@0.1.x" -} diff --git a/node_modules/express/node_modules/commander/node_modules/keypress/test.js b/node_modules/express/node_modules/commander/node_modules/keypress/test.js deleted file mode 100644 index c3f61d79..00000000 --- a/node_modules/express/node_modules/commander/node_modules/keypress/test.js +++ /dev/null @@ -1,28 +0,0 @@ - -var keypress = require('./') -keypress(process.stdin) - -if (process.stdin.setRawMode) - process.stdin.setRawMode(true) -else - require('tty').setRawMode(true) - -process.stdin.on('keypress', function (c, key) { - console.log(0, c, key) - if (key && key.ctrl && key.name == 'c') { - process.stdin.pause() - } -}) -process.stdin.on('mousepress', function (mouse) { - console.log(mouse) -}) - -keypress.enableMouse(process.stdout) -process.on('exit', function () { - //disable mouse on exit, so that the state is back to normal - //for the terminal. - keypress.disableMouse(process.stdout) -}) - -process.stdin.resume() - diff --git a/node_modules/express/node_modules/commander/package.json b/node_modules/express/node_modules/commander/package.json deleted file mode 100644 index b1f5fcd4..00000000 --- a/node_modules/express/node_modules/commander/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "commander", - "version": "1.3.2", - "description": "the complete solution for node.js command-line programs", - "keywords": [ - "command", - "option", - "parser", - "prompt", - "stdin" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "repository": { - "type": "git", - "url": "https://github.com/visionmedia/commander.js.git" - }, - "dependencies": { - "keypress": "0.1.x" - }, - "devDependencies": { - "should": ">= 0.0.1" - }, - "scripts": { - "test": "make test" - }, - "main": "index", - "engines": { - "node": ">= 0.6.x" - }, - "readme": "# Commander.js\n\n The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander).\n\n [![Build Status](https://secure.travis-ci.org/visionmedia/commander.js.png)](http://travis-ci.org/visionmedia/commander.js)\n\n## Installation\n\n $ npm install commander\n\n## Option parsing\n\n Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('commander');\n\nprogram\n .version('0.0.1')\n .option('-p, --peppers', 'Add peppers')\n .option('-P, --pineapple', 'Add pineapple')\n .option('-b, --bbq', 'Add bbq sauce')\n .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble')\n .parse(process.argv);\n\nconsole.log('you ordered a pizza with:');\nif (program.peppers) console.log(' - peppers');\nif (program.pineapple) console.log(' - pineapple');\nif (program.bbq) console.log(' - bbq');\nconsole.log(' - %s cheese', program.cheese);\n```\n\n Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as \"--template-engine\" are camel-cased, becoming `program.templateEngine` etc.\n\n## Automated --help\n\n The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free:\n\n``` \n $ ./examples/pizza --help\n\n Usage: pizza [options]\n\n Options:\n\n -V, --version output the version number\n -p, --peppers Add peppers\n -P, --pineapple Add pineapple\n -b, --bbq Add bbq sauce\n -c, --cheese Add the specified type of cheese [marble]\n -h, --help output usage information\n\n```\n\n## Coercion\n\n```js\nfunction range(val) {\n return val.split('..').map(Number);\n}\n\nfunction list(val) {\n return val.split(',');\n}\n\nprogram\n .version('0.0.1')\n .usage('[options] ')\n .option('-i, --integer ', 'An integer argument', parseInt)\n .option('-f, --float ', 'A float argument', parseFloat)\n .option('-r, --range ..', 'A range', range)\n .option('-l, --list ', 'A list', list)\n .option('-o, --optional [value]', 'An optional value')\n .parse(process.argv);\n\nconsole.log(' int: %j', program.integer);\nconsole.log(' float: %j', program.float);\nconsole.log(' optional: %j', program.optional);\nprogram.range = program.range || [];\nconsole.log(' range: %j..%j', program.range[0], program.range[1]);\nconsole.log(' list: %j', program.list);\nconsole.log(' args: %j', program.args);\n```\n\n## Custom help\n\n You can display arbitrary `-h, --help` information\n by listening for \"--help\". Commander will automatically\n exit once you are done so that the remainder of your program\n does not execute causing undesired behaviours, for example\n in the following executable \"stuff\" will not output when\n `--help` is used.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('../');\n\nfunction list(val) {\n return val.split(',').map(Number);\n}\n\nprogram\n .version('0.0.1')\n .option('-f, --foo', 'enable some foo')\n .option('-b, --bar', 'enable some bar')\n .option('-B, --baz', 'enable some baz');\n\n// must be before .parse() since\n// node's emit() is immediate\n\nprogram.on('--help', function(){\n console.log(' Examples:');\n console.log('');\n console.log(' $ custom-help --help');\n console.log(' $ custom-help -h');\n console.log('');\n});\n\nprogram.parse(process.argv);\n\nconsole.log('stuff');\n```\n\nyielding the following help output:\n\n```\n\nUsage: custom-help [options]\n\nOptions:\n\n -h, --help output usage information\n -V, --version output the version number\n -f, --foo enable some foo\n -b, --bar enable some bar\n -B, --baz enable some baz\n\nExamples:\n\n $ custom-help --help\n $ custom-help -h\n\n```\n\n## .prompt(msg, fn)\n\n Single-line prompt:\n\n```js\nprogram.prompt('name: ', function(name){\n console.log('hi %s', name);\n});\n```\n\n Multi-line prompt:\n\n```js\nprogram.prompt('description:', function(name){\n console.log('hi %s', name);\n});\n```\n\n Coercion:\n\n```js\nprogram.prompt('Age: ', Number, function(age){\n console.log('age: %j', age);\n});\n```\n\n```js\nprogram.prompt('Birthdate: ', Date, function(date){\n console.log('date: %s', date);\n});\n```\n\n```js\nprogram.prompt('Email: ', /^.+@.+\\..+$/, function(email){\n console.log('email: %j', email);\n});\n```\n\n## .password(msg[, mask], fn)\n\nPrompt for password without echoing:\n\n```js\nprogram.password('Password: ', function(pass){\n console.log('got \"%s\"', pass);\n process.stdin.destroy();\n});\n```\n\nPrompt for password with mask char \"*\":\n\n```js\nprogram.password('Password: ', '*', function(pass){\n console.log('got \"%s\"', pass);\n process.stdin.destroy();\n});\n```\n\n## .confirm(msg, fn)\n\n Confirm with the given `msg`:\n\n```js\nprogram.confirm('continue? ', function(ok){\n console.log(' got %j', ok);\n});\n```\n\n## .choose(list, fn)\n\n Let the user choose from a `list`:\n\n```js\nvar list = ['tobi', 'loki', 'jane', 'manny', 'luna'];\n\nconsole.log('Choose the coolest pet:');\nprogram.choose(list, function(i){\n console.log('you chose %d \"%s\"', i, list[i]);\n});\n```\n\n## .outputHelp()\n\n Output help information without exiting.\n\n## .help()\n\n Output help information and exit immediately.\n\n## Links\n\n - [API documentation](http://visionmedia.github.com/commander.js/)\n - [ascii tables](https://github.com/LearnBoost/cli-table)\n - [progress bars](https://github.com/visionmedia/node-progress)\n - [more progress bars](https://github.com/substack/node-multimeter)\n - [examples](https://github.com/visionmedia/commander.js/tree/master/examples)\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/commander.js/issues" - }, - "homepage": "https://github.com/visionmedia/commander.js", - "_id": "commander@1.3.2", - "dist": { - "shasum": "8a8f30ec670a6fdd64af52f1914b907d79ead5b5" - }, - "_from": "commander@1.3.2", - "_resolved": "https://registry.npmjs.org/commander/-/commander-1.3.2.tgz" -} diff --git a/node_modules/express/node_modules/connect/.npmignore b/node_modules/express/node_modules/connect/.npmignore deleted file mode 100644 index 9046dde5..00000000 --- a/node_modules/express/node_modules/connect/.npmignore +++ /dev/null @@ -1,12 +0,0 @@ -*.markdown -*.md -.git* -Makefile -benchmarks/ -docs/ -examples/ -install.sh -support/ -test/ -.DS_Store -coverage.html diff --git a/node_modules/express/node_modules/connect/.travis.yml b/node_modules/express/node_modules/connect/.travis.yml deleted file mode 100644 index a12e3f0f..00000000 --- a/node_modules/express/node_modules/connect/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" \ No newline at end of file diff --git a/node_modules/express/node_modules/connect/LICENSE b/node_modules/express/node_modules/connect/LICENSE deleted file mode 100644 index 0c5d22d9..00000000 --- a/node_modules/express/node_modules/connect/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2010 Sencha Inc. -Copyright (c) 2011 LearnBoost -Copyright (c) 2011 TJ Holowaychuk - -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. \ No newline at end of file diff --git a/node_modules/express/node_modules/connect/Readme.md b/node_modules/express/node_modules/connect/Readme.md deleted file mode 100644 index e38a3263..00000000 --- a/node_modules/express/node_modules/connect/Readme.md +++ /dev/null @@ -1,84 +0,0 @@ -# Connect [![build status](https://secure.travis-ci.org/senchalabs/connect.png)](http://travis-ci.org/senchalabs/connect) - - Connect is an extensible HTTP server framework for [node](http://nodejs.org), providing high performance "plugins" known as _middleware_. - - Connect is bundled with over _20_ commonly used middleware, including - a logger, session support, cookie parser, and [more](http://senchalabs.github.com/connect). Be sure to view the 2.x [documentation](http://senchalabs.github.com/connect/). - -```js -var connect = require('connect') - , http = require('http'); - -var app = connect() - .use(connect.favicon()) - .use(connect.logger('dev')) - .use(connect.static('public')) - .use(connect.directory('public')) - .use(connect.cookieParser()) - .use(connect.session({ secret: 'my secret here' })) - .use(function(req, res){ - res.end('Hello from Connect!\n'); - }); - -http.createServer(app).listen(3000); -``` - -## Middleware - - - [basicAuth](http://www.senchalabs.org/connect/basicAuth.html) - - [bodyParser](http://www.senchalabs.org/connect/bodyParser.html) - - [compress](http://www.senchalabs.org/connect/compress.html) - - [cookieParser](http://www.senchalabs.org/connect/cookieParser.html) - - [cookieSession](http://www.senchalabs.org/connect/cookieSession.html) - - [csrf](http://www.senchalabs.org/connect/csrf.html) - - [directory](http://www.senchalabs.org/connect/directory.html) - - [errorHandler](http://www.senchalabs.org/connect/errorHandler.html) - - [favicon](http://www.senchalabs.org/connect/favicon.html) - - [json](http://www.senchalabs.org/connect/json.html) - - [limit](http://www.senchalabs.org/connect/limit.html) - - [logger](http://www.senchalabs.org/connect/logger.html) - - [methodOverride](http://www.senchalabs.org/connect/methodOverride.html) - - [multipart](http://www.senchalabs.org/connect/multipart.html) - - [urlencoded](http://www.senchalabs.org/connect/urlencoded.html) - - [query](http://www.senchalabs.org/connect/query.html) - - [responseTime](http://www.senchalabs.org/connect/responseTime.html) - - [session](http://www.senchalabs.org/connect/session.html) - - [static](http://www.senchalabs.org/connect/static.html) - - [staticCache](http://www.senchalabs.org/connect/staticCache.html) - - [subdomains](http://www.senchalabs.org/connect/subdomains.html) - - [vhost](http://www.senchalabs.org/connect/vhost.html) - -## Running Tests - -first: - - $ npm install -d - -then: - - $ make test - -## Contributors - - https://github.com/senchalabs/connect/graphs/contributors - -## Node Compatibility - - Connect `< 1.x` is compatible with node 0.2.x - - - Connect `1.x` is compatible with node 0.4.x - - - Connect `2.x` is compatible with node 0.6.x - - - Connect (_master_) is compatible with node 0.8.x - -## CLA - - [http://sencha.com/cla](http://sencha.com/cla) - -## License - -View the [LICENSE](https://github.com/senchalabs/connect/blob/master/LICENSE) file. The [Silk](http://www.famfamfam.com/lab/icons/silk/) icons used by the `directory` middleware created by/copyright of [FAMFAMFAM](http://www.famfamfam.com/). diff --git a/node_modules/express/node_modules/connect/index.js b/node_modules/express/node_modules/connect/index.js deleted file mode 100644 index 23240eed..00000000 --- a/node_modules/express/node_modules/connect/index.js +++ /dev/null @@ -1,4 +0,0 @@ - -module.exports = process.env.CONNECT_COV - ? require('./lib-cov/connect') - : require('./lib/connect'); \ No newline at end of file diff --git a/node_modules/express/node_modules/connect/lib/cache.js b/node_modules/express/node_modules/connect/lib/cache.js deleted file mode 100644 index 052fcdb3..00000000 --- a/node_modules/express/node_modules/connect/lib/cache.js +++ /dev/null @@ -1,81 +0,0 @@ - -/*! - * Connect - Cache - * Copyright(c) 2011 Sencha Inc. - * MIT Licensed - */ - -/** - * Expose `Cache`. - */ - -module.exports = Cache; - -/** - * LRU cache store. - * - * @param {Number} limit - * @api private - */ - -function Cache(limit) { - this.store = {}; - this.keys = []; - this.limit = limit; -} - -/** - * Touch `key`, promoting the object. - * - * @param {String} key - * @param {Number} i - * @api private - */ - -Cache.prototype.touch = function(key, i){ - this.keys.splice(i,1); - this.keys.push(key); -}; - -/** - * Remove `key`. - * - * @param {String} key - * @api private - */ - -Cache.prototype.remove = function(key){ - delete this.store[key]; -}; - -/** - * Get the object stored for `key`. - * - * @param {String} key - * @return {Array} - * @api private - */ - -Cache.prototype.get = function(key){ - return this.store[key]; -}; - -/** - * Add a cache `key`. - * - * @param {String} key - * @return {Array} - * @api private - */ - -Cache.prototype.add = function(key){ - // initialize store - var len = this.keys.push(key); - - // limit reached, invalidate LRU - if (len > this.limit) this.remove(this.keys.shift()); - - var arr = this.store[key] = []; - arr.createdAt = new Date; - return arr; -}; diff --git a/node_modules/express/node_modules/connect/lib/connect.js b/node_modules/express/node_modules/connect/lib/connect.js deleted file mode 100644 index 72961dca..00000000 --- a/node_modules/express/node_modules/connect/lib/connect.js +++ /dev/null @@ -1,92 +0,0 @@ -/*! - * Connect - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , proto = require('./proto') - , utils = require('./utils') - , path = require('path') - , basename = path.basename - , fs = require('fs'); - -// node patches - -require('./patch'); - -// expose createServer() as the module - -exports = module.exports = createServer; - -/** - * Framework version. - */ - -exports.version = '2.7.11'; - -/** - * Expose mime module. - */ - -exports.mime = require('./middleware/static').mime; - -/** - * Expose the prototype. - */ - -exports.proto = proto; - -/** - * Auto-load middleware getters. - */ - -exports.middleware = {}; - -/** - * Expose utilities. - */ - -exports.utils = utils; - -/** - * Create a new connect server. - * - * @return {Function} - * @api public - */ - -function createServer() { - function app(req, res, next){ app.handle(req, res, next); } - utils.merge(app, proto); - utils.merge(app, EventEmitter.prototype); - app.route = '/'; - app.stack = []; - for (var i = 0; i < arguments.length; ++i) { - app.use(arguments[i]); - } - return app; -}; - -/** - * Support old `.createServer()` method. - */ - -createServer.createServer = createServer; - -/** - * Auto-load bundled middleware with getters. - */ - -fs.readdirSync(__dirname + '/middleware').forEach(function(filename){ - if (!/\.js$/.test(filename)) return; - var name = basename(filename, '.js'); - function load(){ return require('./middleware/' + name); } - exports.middleware.__defineGetter__(name, load); - exports.__defineGetter__(name, load); -}); diff --git a/node_modules/express/node_modules/connect/lib/index.js b/node_modules/express/node_modules/connect/lib/index.js deleted file mode 100644 index 5938c753..00000000 --- a/node_modules/express/node_modules/connect/lib/index.js +++ /dev/null @@ -1,50 +0,0 @@ - -/** - * Connect is a middleware framework for node, - * shipping with over 18 bundled middleware and a rich selection of - * 3rd-party middleware. - * - * var app = connect() - * .use(connect.logger('dev')) - * .use(connect.static('public')) - * .use(function(req, res){ - * res.end('hello world\n'); - * }) - * - * http.createServer(app).listen(3000); - * - * Installation: - * - * $ npm install connect - * - * Middleware: - * - * - [logger](logger.html) request logger with custom format support - * - [csrf](csrf.html) Cross-site request forgery protection - * - [compress](compress.html) Gzip compression middleware - * - [basicAuth](basicAuth.html) basic http authentication - * - [bodyParser](bodyParser.html) extensible request body parser - * - [json](json.html) application/json parser - * - [urlencoded](urlencoded.html) application/x-www-form-urlencoded parser - * - [multipart](multipart.html) multipart/form-data parser - * - [timeout](timeout.html) request timeouts - * - [cookieParser](cookieParser.html) cookie parser - * - [session](session.html) session management support with bundled MemoryStore - * - [cookieSession](cookieSession.html) cookie-based session support - * - [methodOverride](methodOverride.html) faux HTTP method support - * - [responseTime](responseTime.html) calculates response-time and exposes via X-Response-Time - * - [staticCache](staticCache.html) memory cache layer for the static() middleware - * - [static](static.html) streaming static file server supporting `Range` and more - * - [directory](directory.html) directory listing middleware - * - [vhost](vhost.html) virtual host sub-domain mapping middleware - * - [favicon](favicon.html) efficient favicon server (with default icon) - * - [limit](limit.html) limit the bytesize of request bodies - * - [query](query.html) automatic querystring parser, populating `req.query` - * - [errorHandler](errorHandler.html) flexible error handler - * - * Links: - * - * - list of [3rd-party](https://github.com/senchalabs/connect/wiki) middleware - * - GitHub [repository](http://github.com/senchalabs/connect) - * - */ \ No newline at end of file diff --git a/node_modules/express/node_modules/connect/lib/middleware/basicAuth.js b/node_modules/express/node_modules/connect/lib/middleware/basicAuth.js deleted file mode 100644 index 8af07ca0..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/basicAuth.js +++ /dev/null @@ -1,106 +0,0 @@ -/*! - * Connect - basicAuth - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils') - , unauthorized = utils.unauthorized; - -/** - * Basic Auth: - * - * Status: Deprecated. No bug reports or pull requests are welcomed - * for this middleware. However, this middleware will not be removed. - * Instead, you should use [basic-auth](https://github.com/visionmedia/node-basic-auth). - * - * Enfore basic authentication by providing a `callback(user, pass)`, - * which must return `true` in order to gain access. Alternatively an async - * method is provided as well, invoking `callback(user, pass, callback)`. Populates - * `req.user`. The final alternative is simply passing username / password - * strings. - * - * Simple username and password - * - * connect(connect.basicAuth('username', 'password')); - * - * Callback verification - * - * connect() - * .use(connect.basicAuth(function(user, pass){ - * return 'tj' == user && 'wahoo' == pass; - * })) - * - * Async callback verification, accepting `fn(err, user)`. - * - * connect() - * .use(connect.basicAuth(function(user, pass, fn){ - * User.authenticate({ user: user, pass: pass }, fn); - * })) - * - * @param {Function|String} callback or username - * @param {String} realm - * @api public - */ - -module.exports = function basicAuth(callback, realm) { - var username, password; - - // user / pass strings - if ('string' == typeof callback) { - username = callback; - password = realm; - if ('string' != typeof password) throw new Error('password argument required'); - realm = arguments[2]; - callback = function(user, pass){ - return user == username && pass == password; - } - } - - realm = realm || 'Authorization Required'; - - return function(req, res, next) { - var authorization = req.headers.authorization; - - if (req.user) return next(); - if (!authorization) return unauthorized(res, realm); - - var parts = authorization.split(' '); - - if (parts.length !== 2) return next(utils.error(400)); - - var scheme = parts[0] - , credentials = new Buffer(parts[1], 'base64').toString() - , index = credentials.indexOf(':'); - - if ('Basic' != scheme || index < 0) return next(utils.error(400)); - - var user = credentials.slice(0, index) - , pass = credentials.slice(index + 1); - - // async - if (callback.length >= 3) { - var pause = utils.pause(req); - callback(user, pass, function(err, user){ - if (err || !user) return unauthorized(res, realm); - req.user = req.remoteUser = user; - next(); - pause.resume(); - }); - // sync - } else { - if (callback(user, pass)) { - req.user = req.remoteUser = user; - next(); - } else { - unauthorized(res, realm); - } - } - } -}; - diff --git a/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js b/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js deleted file mode 100644 index 14481f56..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js +++ /dev/null @@ -1,68 +0,0 @@ - -/*! - * Connect - bodyParser - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var multipart = require('./multipart') - , urlencoded = require('./urlencoded') - , json = require('./json'); - -/** - * Body parser: - * - * Status: the multipart body parser will be removed in Connect 3. - * - * Parse request bodies, supports _application/json_, - * _application/x-www-form-urlencoded_, and _multipart/form-data_. - * - * This is equivalent to: - * - * app.use(connect.json()); - * app.use(connect.urlencoded()); - * app.use(connect.multipart()); - * - * Examples: - * - * connect() - * .use(connect.bodyParser()) - * .use(function(req, res) { - * res.end('viewing user ' + req.body.user.name); - * }); - * - * $ curl -d 'user[name]=tj' http://local/ - * $ curl -d '{"user":{"name":"tj"}}' -H "Content-Type: application/json" http://local/ - * - * View [json](json.html), [urlencoded](urlencoded.html), and [multipart](multipart.html) for more info. - * - * If you wish to create your own body parser, you may be interested in: - * - * - [raw-body](https://github.com/stream-utils/raw-body) - * - [body](https://github.com/raynos/body) - * - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function bodyParser(options){ - var _urlencoded = urlencoded(options) - , _multipart = multipart(options) - , _json = json(options); - - return function bodyParser(req, res, next) { - _json(req, res, function(err){ - if (err) return next(err); - _urlencoded(req, res, function(err){ - if (err) return next(err); - _multipart(req, res, next); - }); - }); - } -}; \ No newline at end of file diff --git a/node_modules/express/node_modules/connect/lib/middleware/compress.js b/node_modules/express/node_modules/connect/lib/middleware/compress.js deleted file mode 100644 index a300e530..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/compress.js +++ /dev/null @@ -1,192 +0,0 @@ -/*! - * Connect - compress - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var zlib = require('zlib'); -var utils = require('../utils'); -var Negotiator = require('negotiator'); - -/** - * Supported content-encoding methods. - */ - -exports.methods = { - gzip: zlib.createGzip - , deflate: zlib.createDeflate -}; - -/** - * Default filter function. - */ - -exports.filter = function(req, res){ - return /json|text|javascript|dart|image\/svg\+xml|application\/x-font-ttf|application\/vnd\.ms-opentype|application\/vnd\.ms-fontobject/.test(res.getHeader('Content-Type')); -}; - -/** - * Compress: - * - * Compress response data with gzip/deflate. - * - * Filter: - * - * A `filter` callback function may be passed to - * replace the default logic of: - * - * exports.filter = function(req, res){ - * return /json|text|javascript/.test(res.getHeader('Content-Type')); - * }; - * - * Threshold: - * - * Only compress the response if the byte size is at or above a threshold. - * Always compress while streaming. - * - * - `threshold` - string representation of size or bytes as an integer. - * - * Options: - * - * All remaining options are passed to the gzip/deflate - * creation functions. Consult node's docs for additional details. - * - * - `chunkSize` (default: 16*1024) - * - `windowBits` - * - `level`: 0-9 where 0 is no compression, and 9 is slow but best compression - * - `memLevel`: 1-9 low is slower but uses less memory, high is fast but uses more - * - `strategy`: compression strategy - * - * @param {Object} options - * @return {Function} - * @api public - */ - -module.exports = function compress(options) { - options = options || {}; - var filter = options.filter || exports.filter; - var threshold; - - if (false === options.threshold || 0 === options.threshold) { - threshold = 0 - } else if ('string' === typeof options.threshold) { - threshold = utils.parseBytes(options.threshold) - } else { - threshold = options.threshold || 1024 - } - - return function compress(req, res, next){ - var accept = req.headers['accept-encoding'] - , write = res.write - , end = res.end - , compress = true - , stream; - - // see #724 - req.on('close', function(){ - res.write = res.end = function(){}; - }); - - // flush is noop by default - res.flush = noop; - - // proxy - - res.write = function(chunk, encoding){ - if (!this.headerSent) { - // if content-length is set and is lower - // than the threshold, don't compress - var length = res.getHeader('content-length'); - if (!isNaN(length) && length < threshold) compress = false; - this._implicitHeader(); - } - return stream - ? stream.write(new Buffer(chunk, encoding)) - : write.call(res, chunk, encoding); - }; - - res.end = function(chunk, encoding){ - if (chunk) { - if (!this.headerSent && getSize(chunk) < threshold) compress = false; - this.write(chunk, encoding); - } else if (!this.headerSent) { - // response size === 0 - compress = false; - } - return stream - ? stream.end() - : end.call(res); - }; - - res.on('header', function(){ - // default request filter - if (!filter(req, res)) return; - - // vary - var vary = res.getHeader('Vary'); - if (!vary) { - res.setHeader('Vary', 'Accept-Encoding'); - } else if (!~vary.indexOf('Accept-Encoding')) { - res.setHeader('Vary', vary + ', Accept-Encoding'); - } - - if (!compress) return; - - var encoding = res.getHeader('Content-Encoding') || 'identity'; - - // already encoded - if ('identity' != encoding) return; - - // SHOULD use identity - if (!accept) return; - - // head - if ('HEAD' == req.method) return; - - // compression method - var method = new Negotiator(req).preferredEncoding(['gzip', 'deflate', 'identity']); - // negotiation failed - if (method === 'identity') return; - - // compression stream - stream = exports.methods[method](options); - - // overwrite the flush method - res.flush = function(){ - stream.flush(); - } - - // header fields - res.setHeader('Content-Encoding', method); - res.removeHeader('Content-Length'); - - // compression - stream.on('data', function(chunk){ - write.call(res, chunk); - }); - - stream.on('end', function(){ - end.call(res); - }); - - stream.on('drain', function() { - res.emit('drain'); - }); - }); - - next(); - }; -}; - -function getSize(chunk) { - return Buffer.isBuffer(chunk) - ? chunk.length - : Buffer.byteLength(chunk); -} - -function noop(){} diff --git a/node_modules/express/node_modules/connect/lib/middleware/cookieParser.js b/node_modules/express/node_modules/connect/lib/middleware/cookieParser.js deleted file mode 100644 index 665226c4..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/cookieParser.js +++ /dev/null @@ -1,67 +0,0 @@ - -/*! - * Connect - cookieParser - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('./../utils') - , cookie = require('cookie'); - -/** - * Cookie parser: - * - * Status: Deprecated. This middleware will be removed in - * Connect 3.0 and will be replaced by a `cookies` middleware, - * which will use [cookies](http://github.com/jed/cookies) - * and [keygrip](https://github.com/jed/keygrip). - * - * Parse _Cookie_ header and populate `req.cookies` - * with an object keyed by the cookie names. Optionally - * you may enabled signed cookie support by passing - * a `secret` string, which assigns `req.secret` so - * it may be used by other middleware. - * - * Examples: - * - * connect() - * .use(connect.cookieParser('optional secret string')) - * .use(function(req, res, next){ - * res.end(JSON.stringify(req.cookies)); - * }) - * - * @param {String} secret - * @return {Function} - * @api public - */ - -module.exports = function cookieParser(secret, opt){ - return function cookieParser(req, res, next) { - if (req.cookies) return next(); - var cookies = req.headers.cookie; - - req.secret = secret; - req.cookies = {}; - req.signedCookies = {}; - - if (cookies) { - try { - req.cookies = cookie.parse(cookies, opt); - if (secret) { - req.signedCookies = utils.parseSignedCookies(req.cookies, secret); - req.signedCookies = utils.parseJSONCookies(req.signedCookies); - } - req.cookies = utils.parseJSONCookies(req.cookies); - } catch (err) { - err.status = 400; - return next(err); - } - } - next(); - }; -}; diff --git a/node_modules/express/node_modules/connect/lib/middleware/cookieSession.js b/node_modules/express/node_modules/connect/lib/middleware/cookieSession.js deleted file mode 100644 index 663f2b97..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/cookieSession.js +++ /dev/null @@ -1,122 +0,0 @@ -/*! - * Connect - cookieSession - * Copyright(c) 2011 Sencha Inc. - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('./../utils') - , Cookie = require('./session/cookie') - , debug = require('debug')('connect:cookieSession') - , signature = require('cookie-signature') - , crc32 = require('buffer-crc32') - , url = require('url'); - -/** - * Cookie Session: - * - * Cookie session middleware. - * - * var app = connect(); - * app.use(connect.cookieParser()); - * app.use(connect.cookieSession({ secret: 'tobo!', cookie: { maxAge: 60 * 60 * 1000 }})); - * - * Options: - * - * - `key` cookie name defaulting to `connect.sess` - * - `secret` prevents cookie tampering - * - `cookie` session cookie settings, defaulting to `{ path: '/', httpOnly: true, maxAge: null }` - * - `proxy` trust the reverse proxy when setting secure cookies (via "x-forwarded-proto") - * - * Clearing sessions: - * - * To clear the session simply set its value to `null`, - * `cookieSession()` will then respond with a 1970 Set-Cookie. - * - * req.session = null; - * - * If you are interested in more sophisticated solutions, - * you may be interested in: - * - * - [client-sessions](https://github.com/mozilla/node-client-sessions) - * - * @param {Object} options - * @return {Function} - * @api public - */ - -module.exports = function cookieSession(options){ - // TODO: utilize Session/Cookie to unify API - options = options || {}; - var key = options.key || 'connect.sess' - , trustProxy = options.proxy; - - return function cookieSession(req, res, next) { - - // req.secret is for backwards compatibility - var secret = options.secret || req.secret; - if (!secret) throw new Error('`secret` option required for cookie sessions'); - - // default session - req.session = {}; - var cookie = req.session.cookie = new Cookie(options.cookie); - - // pathname mismatch - var originalPath = url.parse(req.originalUrl).pathname; - if (0 != originalPath.indexOf(cookie.path)) return next(); - - // cookieParser secret - if (!options.secret && req.secret) { - req.session = req.signedCookies[key] || {}; - req.session.cookie = cookie; - } else { - // TODO: refactor - var rawCookie = req.cookies[key]; - if (rawCookie) { - var unsigned = utils.parseSignedCookie(rawCookie, secret); - if (unsigned) { - var originalHash = crc32.signed(unsigned); - req.session = utils.parseJSONCookie(unsigned) || {}; - req.session.cookie = cookie; - } - } - } - - res.on('header', function(){ - // removed - if (!req.session) { - debug('clear session'); - cookie.expires = new Date(0); - res.setHeader('Set-Cookie', cookie.serialize(key, '')); - return; - } - - delete req.session.cookie; - - // check security - var proto = (req.headers['x-forwarded-proto'] || '').toLowerCase() - , tls = req.connection.encrypted || (trustProxy && 'https' == proto.split(/\s*,\s*/)[0]); - - // only send secure cookies via https - if (cookie.secure && !tls) return debug('not secured'); - - // serialize - debug('serializing %j', req.session); - var val = 'j:' + JSON.stringify(req.session); - - // compare hashes, no need to set-cookie if unchanged - if (originalHash == crc32.signed(val)) return debug('unmodified session'); - - // set-cookie - val = 's:' + signature.sign(val, secret); - val = cookie.serialize(key, val); - debug('set-cookie %j', cookie); - res.setHeader('Set-Cookie', val); - }); - - next(); - }; -}; diff --git a/node_modules/express/node_modules/connect/lib/middleware/csrf.js b/node_modules/express/node_modules/connect/lib/middleware/csrf.js deleted file mode 100644 index 1c3854b4..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/csrf.js +++ /dev/null @@ -1,163 +0,0 @@ -/*! - * Connect - csrf - * Copyright(c) 2011 Sencha Inc. - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils'); -var uid = require('uid2'); -var crypto = require('crypto'); - -/** - * Anti CSRF: - * - * CSRF protection middleware. - * - * This middleware adds a `req.csrfToken()` function to make a token - * which should be added to requests which mutate - * state, within a hidden form field, query-string etc. This - * token is validated against the visitor's session. - * - * The default `value` function checks `req.body` generated - * by the `bodyParser()` middleware, `req.query` generated - * by `query()`, and the "X-CSRF-Token" header field. - * - * This middleware requires session support, thus should be added - * somewhere _below_ `session()` and `cookieParser()`. - * - * Options: - * - * - `value` a function accepting the request, returning the token - * - * @param {Object} options - * @api public - */ - -module.exports = function csrf(options) { - options = options || {}; - var value = options.value || defaultValue; - - return function(req, res, next){ - - // already have one - var secret = req.session._csrfSecret; - if (secret) return createToken(secret); - - // generate secret - uid(24, function(err, secret){ - if (err) return next(err); - req.session._csrfSecret = secret; - createToken(secret); - }); - - // generate the token - function createToken(secret) { - var token; - - // lazy-load token - req.csrfToken = function csrfToken() { - return token || (token = saltedToken(secret)); - }; - - // compatibility with old middleware - Object.defineProperty(req.session, '_csrf', { - configurable: true, - get: function() { - console.warn('req.session._csrf is deprecated, use req.csrfToken() instead'); - return req.csrfToken(); - } - }); - - // ignore these methods - if ('GET' == req.method || 'HEAD' == req.method || 'OPTIONS' == req.method) return next(); - - // determine user-submitted value - var val = value(req); - - // check - if (!checkToken(val, secret)) return next(utils.error(403)); - - next(); - } - } -}; - -/** - * Default value function, checking the `req.body` - * and `req.query` for the CSRF token. - * - * @param {IncomingMessage} req - * @return {String} - * @api private - */ - -function defaultValue(req) { - return (req.body && req.body._csrf) - || (req.query && req.query._csrf) - || (req.headers['x-csrf-token']) - || (req.headers['x-xsrf-token']); -} - -/** - * Return salted token. - * - * @param {String} secret - * @return {String} - * @api private - */ - -function saltedToken(secret) { - return createToken(generateSalt(10), secret); -} - -/** - * Creates a CSRF token from a given salt and secret. - * - * @param {String} salt (should be 10 characters) - * @param {String} secret - * @return {String} - * @api private - */ - -function createToken(salt, secret) { - return salt + crypto - .createHash('sha1') - .update(salt + secret) - .digest('base64'); -} - -/** - * Checks if a given CSRF token matches the given secret. - * - * @param {String} token - * @param {String} secret - * @return {Boolean} - * @api private - */ - -function checkToken(token, secret) { - if ('string' != typeof token) return false; - return token === createToken(token.slice(0, 10), secret); -} - -/** - * Generates a random salt, using a fast non-blocking PRNG (Math.random()). - * - * @param {Number} length - * @return {String} - * @api private - */ - -function generateSalt(length) { - var i, r = []; - for (i = 0; i < length; ++i) { - r.push(SALTCHARS[Math.floor(Math.random() * SALTCHARS.length)]); - } - return r.join(''); -} - -var SALTCHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; diff --git a/node_modules/express/node_modules/connect/lib/middleware/directory.js b/node_modules/express/node_modules/connect/lib/middleware/directory.js deleted file mode 100644 index ac8ea7a5..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/directory.js +++ /dev/null @@ -1,330 +0,0 @@ - -/*! - * Connect - directory - * Copyright(c) 2011 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -// TODO: arrow key navigation -// TODO: make icons extensible - -/** - * Module dependencies. - */ - -var fs = require('fs') - , parse = require('url').parse - , utils = require('../utils') - , path = require('path') - , normalize = path.normalize - , sep = path.sep - , extname = path.extname - , join = path.join; -var Batch = require('batch'); -var Negotiator = require('negotiator'); - -/*! - * Icon cache. - */ - -var cache = {}; - -/** - * Media types and the map for content negotiation. - */ - -var mediaTypes = [ - 'text/html', - 'text/plain', - 'application/json' -]; - -var mediaType = { - 'text/html': 'html', - 'text/plain': 'plain', - 'application/json': 'json' -}; - -/** - * Directory: - * - * Serve directory listings with the given `root` path. - * - * Options: - * - * - `hidden` display hidden (dot) files. Defaults to false. - * - `icons` display icons. Defaults to false. - * - `filter` Apply this filter function to files. Defaults to false. - * - * @param {String} root - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function directory(root, options){ - options = options || {}; - - // root required - if (!root) throw new Error('directory() root path required'); - var hidden = options.hidden - , icons = options.icons - , view = options.view || 'tiles' - , filter = options.filter - , root = normalize(root + sep); - - return function directory(req, res, next) { - if ('GET' != req.method && 'HEAD' != req.method) return next(); - - var url = parse(req.url) - , dir = decodeURIComponent(url.pathname) - , path = normalize(join(root, dir)) - , originalUrl = parse(req.originalUrl) - , originalDir = decodeURIComponent(originalUrl.pathname) - , showUp = path != root; - - // null byte(s), bad request - if (~path.indexOf('\0')) return next(utils.error(400)); - - // malicious path, forbidden - if (0 != path.indexOf(root)) return next(utils.error(403)); - - // check if we have a directory - fs.stat(path, function(err, stat){ - if (err) return 'ENOENT' == err.code - ? next() - : next(err); - - if (!stat.isDirectory()) return next(); - - // fetch files - fs.readdir(path, function(err, files){ - if (err) return next(err); - if (!hidden) files = removeHidden(files); - if (filter) files = files.filter(filter); - files.sort(); - - // content-negotiation - var type = new Negotiator(req).preferredMediaType(mediaTypes); - - // not acceptable - if (!type) return next(utils.error(406)); - exports[mediaType[type]](req, res, files, next, originalDir, showUp, icons, path, view); - }); - }); - }; -}; - -/** - * Respond with text/html. - */ - -exports.html = function(req, res, files, next, dir, showUp, icons, path, view){ - fs.readFile(__dirname + '/../public/directory.html', 'utf8', function(err, str){ - if (err) return next(err); - fs.readFile(__dirname + '/../public/style.css', 'utf8', function(err, style){ - if (err) return next(err); - stat(path, files, function(err, stats){ - if (err) return next(err); - files = files.map(function(file, i){ return { name: file, stat: stats[i] }; }); - files.sort(fileSort); - if (showUp) files.unshift({ name: '..' }); - str = str - .replace('{style}', style.concat(iconStyle(files, icons))) - .replace('{files}', html(files, dir, icons, view)) - .replace('{directory}', dir) - .replace('{linked-path}', htmlPath(dir)); - res.setHeader('Content-Type', 'text/html'); - res.setHeader('Content-Length', str.length); - res.end(str); - }); - }); - }); -}; - -/** - * Respond with application/json. - */ - -exports.json = function(req, res, files){ - files = JSON.stringify(files); - res.setHeader('Content-Type', 'application/json'); - res.setHeader('Content-Length', files.length); - res.end(files); -}; - -/** - * Respond with text/plain. - */ - -exports.plain = function(req, res, files){ - files = files.join('\n') + '\n'; - res.setHeader('Content-Type', 'text/plain'); - res.setHeader('Content-Length', files.length); - res.end(files); -}; - -/** - * Sort function for with directories first. - */ - -function fileSort(a, b) { - return Number(b.stat && b.stat.isDirectory()) - Number(a.stat && a.stat.isDirectory()) || - String(a.name).toLocaleLowerCase().localeCompare(String(b.name).toLocaleLowerCase()); -} - -/** - * Map html `dir`, returning a linked path. - */ - -function htmlPath(dir) { - var curr = []; - return dir.split('/').map(function(part){ - curr.push(encodeURIComponent(part)); - return part ? '' + part + '' : ''; - }).join(' / '); -} - -/** - * Load icon images, return css string. - */ - -function iconStyle (files, useIcons) { - if (!useIcons) return ''; - var data = {}; - var views = { tiles: [], details: [], mobile: [] }; - - for (var i=0; i < files.length; i++) { - var file = files[i]; - if (file.name == '..') continue; - - var isDir = '..' == file.name || (file.stat && file.stat.isDirectory()); - var icon = isDir ? icons.folder : icons[extname(file.name)] || icons.default; - - var ext = extname(file.name); - ext = isDir ? '.directory' : (icons[ext] ? ext : '.default'); - - if (data[icon]) continue; - data[icon] = ext + ' .name{background-image: url(data:image/png;base64,' + load(icon)+');}'; - views.tiles.push('.view-tiles ' + data[icon]); - views.details.push('.view-details ' + data[icon]); - views.mobile.push('#files ' + data[icon]); - } - - var style = views.tiles.join('\n') - + '\n'+views.details.join('\n') - + '\n@media (max-width: 768px) {\n\t' - + views.mobile.join('\n\t') - + '\n}'; - return style; -} - -/** - * Map html `files`, returning an html unordered list. - */ - -function html(files, dir, useIcons, view) { - return '
    ' - + (view == 'details' ? ( - '
  • ' - + 'Name' - + 'Size' - + 'Modified' - + '
  • ') : '') - + files.map(function(file){ - var isDir - , classes = [] - , path = dir.split('/').map(function (c) { return encodeURIComponent(c); }); - - if (useIcons) { - var ext = extname(file.name); - isDir = '..' == file.name || (file.stat && file.stat.isDirectory()); - ext = isDir ? '.directory' : (icons[ext] ? ext : '.default'); - classes.push('icon'); - classes.push(ext.replace('.','')); - } - - path.push(encodeURIComponent(file.name)); - - var date = file.name == '..' ? '' - : file.stat.mtime.toDateString()+' '+file.stat.mtime.toLocaleTimeString(); - var size = file.name == '..' ? '' : file.stat.size; - - return '
  • ' - + ''+file.name+'' - + ''+size+'' - + ''+date+'' - + '
  • '; - - }).join('\n') + '
'; -} - -/** - * Load and cache the given `icon`. - * - * @param {String} icon - * @return {String} - * @api private - */ - -function load(icon) { - if (cache[icon]) return cache[icon]; - return cache[icon] = fs.readFileSync(__dirname + '/../public/icons/' + icon, 'base64'); -} - -/** - * Filter "hidden" `files`, aka files - * beginning with a `.`. - * - * @param {Array} files - * @return {Array} - * @api private - */ - -function removeHidden(files) { - return files.filter(function(file){ - return '.' != file[0]; - }); -} - -/** - * Stat all files and return array of stat - * in same order. - */ - -function stat(dir, files, cb) { - var batch = new Batch(); - - batch.concurrency(10); - - files.forEach(function(file, i){ - batch.push(function(done){ - fs.stat(join(dir, file), done); - }); - }); - - batch.end(cb); -} - -/** - * Icon map. - */ - -var icons = { - '.js': 'page_white_code_red.png' - , '.c': 'page_white_c.png' - , '.h': 'page_white_h.png' - , '.cc': 'page_white_cplusplus.png' - , '.php': 'page_white_php.png' - , '.rb': 'page_white_ruby.png' - , '.cpp': 'page_white_cplusplus.png' - , '.swf': 'page_white_flash.png' - , '.pdf': 'page_white_acrobat.png' - , 'folder': 'folder.png' - , 'default': 'page_white.png' -}; diff --git a/node_modules/express/node_modules/connect/lib/middleware/errorHandler.js b/node_modules/express/node_modules/connect/lib/middleware/errorHandler.js deleted file mode 100644 index 56e96830..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/errorHandler.js +++ /dev/null @@ -1,86 +0,0 @@ -/*! - * Connect - errorHandler - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils') - , fs = require('fs'); - -// environment - -var env = process.env.NODE_ENV || 'development'; - -/** - * Error handler: - * - * Development error handler, providing stack traces - * and error message responses for requests accepting text, html, - * or json. - * - * Text: - * - * By default, and when _text/plain_ is accepted a simple stack trace - * or error message will be returned. - * - * JSON: - * - * When _application/json_ is accepted, connect will respond with - * an object in the form of `{ "error": error }`. - * - * HTML: - * - * When accepted connect will output a nice html stack trace. - * - * @return {Function} - * @api public - */ - -exports = module.exports = function errorHandler(){ - return function errorHandler(err, req, res, next){ - if (err.status) res.statusCode = err.status; - if (res.statusCode < 400) res.statusCode = 500; - if ('test' != env) console.error(err.stack); - var accept = req.headers.accept || ''; - // html - if (~accept.indexOf('html')) { - fs.readFile(__dirname + '/../public/style.css', 'utf8', function(e, style){ - fs.readFile(__dirname + '/../public/error.html', 'utf8', function(e, html){ - var stack = (err.stack || '') - .split('\n').slice(1) - .map(function(v){ return '
  • ' + v + '
  • '; }).join(''); - html = html - .replace('{style}', style) - .replace('{stack}', stack) - .replace('{title}', exports.title) - .replace('{statusCode}', res.statusCode) - .replace(/\{error\}/g, utils.escape(err.toString().replace(/\n/g, '
    '))); - res.setHeader('Content-Type', 'text/html; charset=utf-8'); - res.end(html); - }); - }); - // json - } else if (~accept.indexOf('json')) { - var error = { message: err.message, stack: err.stack }; - for (var prop in err) error[prop] = err[prop]; - var json = JSON.stringify({ error: error }); - res.setHeader('Content-Type', 'application/json'); - res.end(json); - // plain text - } else { - res.setHeader('Content-Type', 'text/plain'); - res.end(err.stack); - } - }; -}; - -/** - * Template title, framework authors may override this value. - */ - -exports.title = 'Connect'; diff --git a/node_modules/express/node_modules/connect/lib/middleware/favicon.js b/node_modules/express/node_modules/connect/lib/middleware/favicon.js deleted file mode 100644 index ef543544..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/favicon.js +++ /dev/null @@ -1,80 +0,0 @@ -/*! - * Connect - favicon - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var fs = require('fs') - , utils = require('../utils'); - -/** - * Favicon: - * - * By default serves the connect favicon, or the favicon - * located by the given `path`. - * - * Options: - * - * - `maxAge` cache-control max-age directive, defaulting to 1 day - * - * Examples: - * - * Serve default favicon: - * - * connect() - * .use(connect.favicon()) - * - * Serve favicon before logging for brevity: - * - * connect() - * .use(connect.favicon()) - * .use(connect.logger('dev')) - * - * Serve custom favicon: - * - * connect() - * .use(connect.favicon('public/favicon.ico')) - * - * @param {String} path - * @param {Object} options - * @return {Function} - * @api public - */ - -module.exports = function favicon(path, options){ - var options = options || {} - , path = path || __dirname + '/../public/favicon.ico' - , maxAge = options.maxAge || 86400000 - , icon; // favicon cache - - return function favicon(req, res, next){ - if ('/favicon.ico' == req.url) { - if (icon) { - res.writeHead(200, icon.headers); - res.end(icon.body); - } else { - fs.readFile(path, function(err, buf){ - if (err) return next(err); - icon = { - headers: { - 'Content-Type': 'image/x-icon' - , 'Content-Length': buf.length - , 'ETag': '"' + utils.md5(buf) + '"' - , 'Cache-Control': 'public, max-age=' + (maxAge / 1000) - }, - body: buf - }; - res.writeHead(200, icon.headers); - res.end(icon.body); - }); - } - } else { - next(); - } - }; -}; diff --git a/node_modules/express/node_modules/connect/lib/middleware/json.js b/node_modules/express/node_modules/connect/lib/middleware/json.js deleted file mode 100644 index ef489852..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/json.js +++ /dev/null @@ -1,87 +0,0 @@ - -/*! - * Connect - json - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils'); -var getBody = require('raw-body'); - -/** - * JSON: - * - * Parse JSON request bodies, providing the - * parsed object as `req.body`. - * - * Options: - * - * - `strict` when `false` anything `JSON.parse()` accepts will be parsed - * - `reviver` used as the second "reviver" argument for JSON.parse - * - `limit` byte limit [1mb] - * - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function(options){ - options = options || {}; - var strict = options.strict !== false; - var verify = typeof options.verify === 'function' && options.verify; - - return function json(req, res, next) { - if (req._body) return next(); - req.body = req.body || {}; - - if (!utils.hasBody(req)) return next(); - - // check Content-Type - if (!exports.regexp.test(utils.mime(req))) return next(); - - // flag as parsed - req._body = true; - - // parse - getBody(req, { - limit: options.limit || '1mb', - length: req.headers['content-length'], - encoding: 'utf8' - }, function (err, buf) { - if (err) return next(err); - - if (verify) { - try { - verify(req, res, buf) - } catch (err) { - if (!err.status) err.status = 403; - return next(err); - } - } - - var first = buf.trim()[0]; - - if (0 == buf.length) { - return next(utils.error(400, 'invalid json, empty body')); - } - - if (strict && '{' != first && '[' != first) return next(utils.error(400, 'invalid json')); - try { - req.body = JSON.parse(buf, options.reviver); - } catch (err){ - err.body = buf; - err.status = 400; - return next(err); - } - next(); - }) - }; -}; - -exports.regexp = /^application\/([\w!#\$%&\*`\-\.\^~]*\+)?json$/i; - diff --git a/node_modules/express/node_modules/connect/lib/middleware/limit.js b/node_modules/express/node_modules/connect/lib/middleware/limit.js deleted file mode 100644 index 2b895f97..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/limit.js +++ /dev/null @@ -1,89 +0,0 @@ - -/*! - * Connect - limit - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils'), - brokenPause = utils.brokenPause; - -/** - * Limit: - * - * Status: Deprecated. This middleware will be removed in Connect 3.0. - * If you still wish to use some type of limit middleware, - * you may be interested in: - * - * - [raw-body](https://github.com/stream-utils/raw-body) - * - * Limit request bodies to the given size in `bytes`. - * - * A string representation of the bytesize may also be passed, - * for example "5mb", "200kb", "1gb", etc. - * - * connect() - * .use(connect.limit('5.5mb')) - * .use(handleImageUpload) - * - * @param {Number|String} bytes - * @return {Function} - * @api public - */ - -module.exports = function limit(bytes){ - if ('string' == typeof bytes) bytes = utils.parseBytes(bytes); - if ('number' != typeof bytes) throw new Error('limit() bytes required'); - - if (process.env.NODE_ENV !== 'test') { - console.warn('connect.limit() will be removed in connect 3.0'); - } - - return function limit(req, res, next){ - var received = 0 - , len = req.headers['content-length'] - ? parseInt(req.headers['content-length'], 10) - : null; - - // self-awareness - if (req._limit) return next(); - req._limit = true; - - // limit by content-length - if (len && len > bytes) return next(utils.error(413)); - - // limit - if (brokenPause) { - listen(); - } else { - req.on('newListener', function handler(event) { - if (event !== 'data') return; - - req.removeListener('newListener', handler); - // Start listening at the end of the current loop - // otherwise the request will be consumed too early. - // Sideaffect is `limit` will miss the first chunk, - // but that's not a big deal. - // Unfortunately, the tests don't have large enough - // request bodies to test this. - process.nextTick(listen); - }); - }; - - next(); - - function listen() { - req.on('data', function(chunk) { - received += Buffer.isBuffer(chunk) - ? chunk.length : - Buffer.byteLength(chunk); - - if (received > bytes) req.destroy(); - }); - }; - }; -}; \ No newline at end of file diff --git a/node_modules/express/node_modules/connect/lib/middleware/logger.js b/node_modules/express/node_modules/connect/lib/middleware/logger.js deleted file mode 100644 index fba43e41..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/logger.js +++ /dev/null @@ -1,342 +0,0 @@ -/*! - * Connect - logger - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var bytes = require('bytes'); - -/*! - * Log buffer. - */ - -var buf = []; - -/*! - * Default log buffer duration. - */ - -var defaultBufferDuration = 1000; - -/** - * Logger: - * - * Log requests with the given `options` or a `format` string. - * - * Options: - * - * - `format` Format string, see below for tokens - * - `stream` Output stream, defaults to _stdout_ - * - `buffer` Buffer duration, defaults to 1000ms when _true_ - * - `immediate` Write log line on request instead of response (for response times) - * - * Tokens: - * - * - `:req[header]` ex: `:req[Accept]` - * - `:res[header]` ex: `:res[Content-Length]` - * - `:http-version` - * - `:response-time` - * - `:remote-addr` - * - `:date` - * - `:method` - * - `:url` - * - `:referrer` - * - `:user-agent` - * - `:status` - * - * Formats: - * - * Pre-defined formats that ship with connect: - * - * - `default` ':remote-addr - - [:date] ":method :url HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent"' - * - `short` ':remote-addr - :method :url HTTP/:http-version :status :res[content-length] - :response-time ms' - * - `tiny` ':method :url :status :res[content-length] - :response-time ms' - * - `dev` concise output colored by response status for development use - * - * Examples: - * - * connect.logger() // default - * connect.logger('short') - * connect.logger('tiny') - * connect.logger({ immediate: true, format: 'dev' }) - * connect.logger(':method :url - :referrer') - * connect.logger(':req[content-type] -> :res[content-type]') - * connect.logger(function(tokens, req, res){ return 'some format string' }) - * - * Defining Tokens: - * - * To define a token, simply invoke `connect.logger.token()` with the - * name and a callback function. The value returned is then available - * as ":type" in this case. - * - * connect.logger.token('type', function(req, res){ return req.headers['content-type']; }) - * - * Defining Formats: - * - * All default formats are defined this way, however it's public API as well: - * - * connect.logger.format('name', 'string or function') - * - * @param {String|Function|Object} format or options - * @return {Function} - * @api public - */ - -exports = module.exports = function logger(options) { - if ('object' == typeof options) { - options = options || {}; - } else if (options) { - options = { format: options }; - } else { - options = {}; - } - - // output on request instead of response - var immediate = options.immediate; - - // format name - var fmt = exports[options.format] || options.format || exports.default; - - // compile format - if ('function' != typeof fmt) fmt = compile(fmt); - - // options - var stream = options.stream || process.stdout - , buffer = options.buffer; - - // buffering support - if (buffer) { - var realStream = stream - , interval = 'number' == typeof buffer - ? buffer - : defaultBufferDuration; - - // flush interval - setInterval(function(){ - if (buf.length) { - realStream.write(buf.join('')); - buf.length = 0; - } - }, interval); - - // swap the stream - stream = { - write: function(str){ - buf.push(str); - } - }; - } - - return function logger(req, res, next) { - var sock = req.socket; - req._startTime = new Date; - req._remoteAddress = sock.socket ? sock.socket.remoteAddress : sock.remoteAddress; - - function logRequest(){ - res.removeListener('finish', logRequest); - res.removeListener('close', logRequest); - var line = fmt(exports, req, res); - if (null == line) return; - stream.write(line + '\n'); - }; - - // immediate - if (immediate) { - logRequest(); - // proxy end to output logging - } else { - res.on('finish', logRequest); - res.on('close', logRequest); - } - - - next(); - }; -}; - -/** - * Compile `fmt` into a function. - * - * @param {String} fmt - * @return {Function} - * @api private - */ - -function compile(fmt) { - fmt = fmt.replace(/"/g, '\\"'); - var js = ' return "' + fmt.replace(/:([-\w]{2,})(?:\[([^\]]+)\])?/g, function(_, name, arg){ - return '"\n + (tokens["' + name + '"](req, res, "' + arg + '") || "-") + "'; - }) + '";' - return new Function('tokens, req, res', js); -}; - -/** - * Define a token function with the given `name`, - * and callback `fn(req, res)`. - * - * @param {String} name - * @param {Function} fn - * @return {Object} exports for chaining - * @api public - */ - -exports.token = function(name, fn) { - exports[name] = fn; - return this; -}; - -/** - * Define a `fmt` with the given `name`. - * - * @param {String} name - * @param {String|Function} fmt - * @return {Object} exports for chaining - * @api public - */ - -exports.format = function(name, str){ - exports[name] = str; - return this; -}; - -/** - * Default format. - */ - -exports.format('default', ':remote-addr - - [:date] ":method :url HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent"'); - -/** - * Short format. - */ - -exports.format('short', ':remote-addr - :method :url HTTP/:http-version :status :res[content-length] - :response-time ms'); - -/** - * Tiny format. - */ - -exports.format('tiny', ':method :url :status :res[content-length] - :response-time ms'); - -/** - * dev (colored) - */ - -exports.format('dev', function(tokens, req, res){ - var status = res.statusCode - , len = parseInt(res.getHeader('Content-Length'), 10) - , color = 32; - - if (status >= 500) color = 31 - else if (status >= 400) color = 33 - else if (status >= 300) color = 36; - - len = isNaN(len) - ? '' - : len = ' - ' + bytes(len); - - return '\x1b[90m' + req.method - + ' ' + req.originalUrl + ' ' - + '\x1b[' + color + 'm' + res.statusCode - + ' \x1b[90m' - + (new Date - req._startTime) - + 'ms' + len - + '\x1b[0m'; -}); - -/** - * request url - */ - -exports.token('url', function(req){ - return req.originalUrl || req.url; -}); - -/** - * request method - */ - -exports.token('method', function(req){ - return req.method; -}); - -/** - * response time in milliseconds - */ - -exports.token('response-time', function(req){ - return String(Date.now() - req._startTime); -}); - -/** - * UTC date - */ - -exports.token('date', function(){ - return new Date().toUTCString(); -}); - -/** - * response status code - */ - -exports.token('status', function(req, res){ - return res.headerSent ? res.statusCode : null; -}); - -/** - * normalized referrer - */ - -exports.token('referrer', function(req){ - return req.headers['referer'] || req.headers['referrer']; -}); - -/** - * remote address - */ - -exports.token('remote-addr', function(req){ - if (req.ip) return req.ip; - if (req._remoteAddress) return req._remoteAddress; - var sock = req.socket; - if (sock.socket) return sock.socket.remoteAddress; - return sock.remoteAddress; -}); - -/** - * HTTP version - */ - -exports.token('http-version', function(req){ - return req.httpVersionMajor + '.' + req.httpVersionMinor; -}); - -/** - * UA string - */ - -exports.token('user-agent', function(req){ - return req.headers['user-agent']; -}); - -/** - * request header - */ - -exports.token('req', function(req, res, field){ - return req.headers[field.toLowerCase()]; -}); - -/** - * response header - */ - -exports.token('res', function(req, res, field){ - return (res._headers || {})[field.toLowerCase()]; -}); - diff --git a/node_modules/express/node_modules/connect/lib/middleware/methodOverride.js b/node_modules/express/node_modules/connect/lib/middleware/methodOverride.js deleted file mode 100644 index a729d136..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/methodOverride.js +++ /dev/null @@ -1,58 +0,0 @@ -/*! - * Connect - methodOverride - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var methods = require('methods'); - -/** - * Method Override: - * - * Provides faux HTTP method support. - * - * Pass an optional `key` to use when checking for - * a method override, otherwise defaults to _\_method_. - * The original method is available via `req.originalMethod`. - * - * @param {String} key - * @return {Function} - * @api public - */ - -module.exports = function methodOverride(key){ - key = key || "_method"; - return function methodOverride(req, res, next) { - var method; - req.originalMethod = req.originalMethod || req.method; - - // req.body - if (req.body && typeof req.body === 'object' && key in req.body) { - method = req.body[key].toLowerCase(); - delete req.body[key]; - } - - // check X-HTTP-Method-Override - if (req.headers['x-http-method-override']) { - method = req.headers['x-http-method-override'].toLowerCase(); - } - - // replace - if (supports(method)) req.method = method.toUpperCase(); - - next(); - }; -}; - -/** - * Check if node supports `method`. - */ - -function supports(method) { - return ~methods.indexOf(method); -} diff --git a/node_modules/express/node_modules/connect/lib/middleware/multipart.js b/node_modules/express/node_modules/connect/lib/middleware/multipart.js deleted file mode 100644 index 8bf66389..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/multipart.js +++ /dev/null @@ -1,171 +0,0 @@ -/*! - * Connect - multipart - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var multiparty = require('multiparty') - , _limit = require('./limit') - , utils = require('../utils') - , qs = require('qs'); - -/** - * Multipart: - * - * Status: Deprecated. The multipart parser will be removed in Connect 3.0. - * Please use one of the following parsers/middleware directly: - * - * - [formidable](https://github.com/felixge/node-formidable) - * - [connect-multiparty](https://github.com/superjoe30/connect-multiparty) or [multiparty] - * - [connect-busboy](https://github.com/mscdex/connect-busboy) or [busboy](https://github.com/mscdex/busboy) - * - * Parse multipart/form-data request bodies, - * providing the parsed object as `req.body` - * and `req.files`. - * - * Configuration: - * - * The options passed are merged with [multiparty](https://github.com/superjoe30/node-multiparty)'s - * `Form` object, allowing you to configure the upload directory, - * size limits, etc. For example if you wish to change the upload dir do the following. - * - * app.use(connect.multipart({ uploadDir: path })); - * - * Options: - * - * - `limit` byte limit defaulting to [100mb] - * - `defer` defers processing and exposes the multiparty form object as `req.form`. - * `next()` is called without waiting for the form's "end" event. - * This option is useful if you need to bind to the "progress" or "part" events, for example. - * - * Temporary Files: - * - * By default temporary files are used, stored in `os.tmpDir()`. These - * are not automatically garbage collected, you are in charge of moving them - * or deleting them. When `defer` is not used and these files are created you - * may refernce them via the `req.files` object. - * - * req.files.images.forEach(function(file){ - * console.log(' uploaded : %s %skb : %s', file.originalFilename, file.size / 1024 | 0, file.path); - * }); - * - * It is highly recommended to monitor and clean up tempfiles in any production - * environment, you may use tools like [reap](https://github.com/visionmedia/reap) - * to do so. - * - * Streaming: - * - * When `defer` is used files are _not_ streamed to tmpfiles, you may - * access them via the "part" events and stream them accordingly: - * - * req.form.on('part', function(part){ - * // transfer to s3 etc - * console.log('upload %s %s', part.name, part.filename); - * var out = fs.createWriteStream('/tmp/' + part.filename); - * part.pipe(out); - * }); - * - * req.form.on('close', function(){ - * res.end('uploaded!'); - * }); - * - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function(options){ - options = options || {}; - - if (process.env.NODE_ENV !== 'test') { - console.warn('connect.multipart() will be removed in connect 3.0'); - console.warn('visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives'); - } - - var limit = _limit(options.limit || '100mb'); - - return function multipart(req, res, next) { - if (req._body) return next(); - req.body = req.body || {}; - req.files = req.files || {}; - - if (!utils.hasBody(req)) return next(); - - // ignore GET - if ('GET' == req.method || 'HEAD' == req.method) return next(); - - // check Content-Type - if ('multipart/form-data' != utils.mime(req)) return next(); - - // flag as parsed - req._body = true; - - // parse - limit(req, res, function(err){ - if (err) return next(err); - - var form = new multiparty.Form(options) - , data = {} - , files = {} - , done; - - Object.keys(options).forEach(function(key){ - form[key] = options[key]; - }); - - function ondata(name, val, data){ - if (Array.isArray(data[name])) { - data[name].push(val); - } else if (data[name]) { - data[name] = [data[name], val]; - } else { - data[name] = val; - } - } - - form.on('field', function(name, val){ - ondata(name, val, data); - }); - - if (!options.defer) { - form.on('file', function(name, val){ - val.name = val.originalFilename; - val.type = val.headers['content-type'] || null; - ondata(name, val, files); - }); - } - - form.on('error', function(err){ - if (!options.defer) { - err.status = 400; - next(err); - } - done = true; - }); - - form.on('close', function(){ - if (done) return; - try { - req.body = qs.parse(data); - req.files = qs.parse(files); - } catch (err) { - form.emit('error', err); - return; - } - if (!options.defer) next(); - }); - - form.parse(req); - - if (options.defer) { - req.form = form; - next(); - } - }); - } -}; diff --git a/node_modules/express/node_modules/connect/lib/middleware/query.js b/node_modules/express/node_modules/connect/lib/middleware/query.js deleted file mode 100644 index f0fb50fc..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/query.js +++ /dev/null @@ -1,47 +0,0 @@ -/*! - * Connect - query - * Copyright(c) 2011 TJ Holowaychuk - * Copyright(c) 2011 Sencha Inc. - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var qs = require('qs') - , parse = require('../utils').parseUrl; - -/** - * Query: - * - * Automatically parse the query-string when available, - * populating the `req.query` object using - * [qs](https://github.com/visionmedia/node-querystring). - * - * Examples: - * - * connect() - * .use(connect.query()) - * .use(function(req, res){ - * res.end(JSON.stringify(req.query)); - * }); - * - * The `options` passed are provided to qs.parse function. - * - * @param {Object} options - * @return {Function} - * @api public - */ - -module.exports = function query(options){ - return function query(req, res, next){ - if (!req.query) { - req.query = ~req.url.indexOf('?') - ? qs.parse(parse(req).query, options) - : {}; - } - - next(); - }; -}; diff --git a/node_modules/express/node_modules/connect/lib/middleware/responseTime.js b/node_modules/express/node_modules/connect/lib/middleware/responseTime.js deleted file mode 100644 index 62abc049..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/responseTime.js +++ /dev/null @@ -1,32 +0,0 @@ - -/*! - * Connect - responseTime - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Reponse time: - * - * Adds the `X-Response-Time` header displaying the response - * duration in milliseconds. - * - * @return {Function} - * @api public - */ - -module.exports = function responseTime(){ - return function(req, res, next){ - var start = new Date; - - if (res._responseTime) return next(); - res._responseTime = true; - - res.on('header', function(){ - var duration = new Date - start; - res.setHeader('X-Response-Time', duration + 'ms'); - }); - - next(); - }; -}; diff --git a/node_modules/express/node_modules/connect/lib/middleware/session.js b/node_modules/express/node_modules/connect/lib/middleware/session.js deleted file mode 100644 index 128bc591..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/session.js +++ /dev/null @@ -1,358 +0,0 @@ -/*! - * Connect - session - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Session = require('./session/session') - , debug = require('debug')('connect:session') - , MemoryStore = require('./session/memory') - , signature = require('cookie-signature') - , Cookie = require('./session/cookie') - , Store = require('./session/store') - , utils = require('./../utils') - , uid = require('uid2') - , crc32 = require('buffer-crc32') - , parse = require('url').parse; - -// environment - -var env = process.env.NODE_ENV; - -/** - * Expose the middleware. - */ - -exports = module.exports = session; - -/** - * Expose constructors. - */ - -exports.Store = Store; -exports.Cookie = Cookie; -exports.Session = Session; -exports.MemoryStore = MemoryStore; - -/** - * Warning message for `MemoryStore` usage in production. - */ - -var warning = 'Warning: connection.session() MemoryStore is not\n' - + 'designed for a production environment, as it will leak\n' - + 'memory, and will not scale past a single process.'; - -/** - * Session: - * - * Setup session store with the given `options`. - * - * Session data is _not_ saved in the cookie itself, however - * cookies are used, so we must use the [cookieParser()](cookieParser.html) - * middleware _before_ `session()`. - * - * Examples: - * - * connect() - * .use(connect.cookieParser()) - * .use(connect.session({ secret: 'keyboard cat', key: 'sid', cookie: { secure: true }})) - * - * Options: - * - * - `key` cookie name defaulting to `connect.sid` - * - `store` session store instance - * - `secret` session cookie is signed with this secret to prevent tampering - * - `cookie` session cookie settings, defaulting to `{ path: '/', httpOnly: true, maxAge: null }` - * - `proxy` trust the reverse proxy when setting secure cookies (via "x-forwarded-proto") - * - * Cookie option: - * - * By default `cookie.maxAge` is `null`, meaning no "expires" parameter is set - * so the cookie becomes a browser-session cookie. When the user closes the - * browser the cookie (and session) will be removed. - * - * ## req.session - * - * To store or access session data, simply use the request property `req.session`, - * which is (generally) serialized as JSON by the store, so nested objects - * are typically fine. For example below is a user-specific view counter: - * - * connect() - * .use(connect.favicon()) - * .use(connect.cookieParser()) - * .use(connect.session({ secret: 'keyboard cat', cookie: { maxAge: 60000 }})) - * .use(function(req, res, next){ - * var sess = req.session; - * if (sess.views) { - * res.setHeader('Content-Type', 'text/html'); - * res.write('

    views: ' + sess.views + '

    '); - * res.write('

    expires in: ' + (sess.cookie.maxAge / 1000) + 's

    '); - * res.end(); - * sess.views++; - * } else { - * sess.views = 1; - * res.end('welcome to the session demo. refresh!'); - * } - * } - * )).listen(3000); - * - * ## Session#regenerate() - * - * To regenerate the session simply invoke the method, once complete - * a new SID and `Session` instance will be initialized at `req.session`. - * - * req.session.regenerate(function(err){ - * // will have a new session here - * }); - * - * ## Session#destroy() - * - * Destroys the session, removing `req.session`, will be re-generated next request. - * - * req.session.destroy(function(err){ - * // cannot access session here - * }); - * - * ## Session#reload() - * - * Reloads the session data. - * - * req.session.reload(function(err){ - * // session updated - * }); - * - * ## Session#save() - * - * Save the session. - * - * req.session.save(function(err){ - * // session saved - * }); - * - * ## Session#touch() - * - * Updates the `.maxAge` property. Typically this is - * not necessary to call, as the session middleware does this for you. - * - * ## Session#cookie - * - * Each session has a unique cookie object accompany it. This allows - * you to alter the session cookie per visitor. For example we can - * set `req.session.cookie.expires` to `false` to enable the cookie - * to remain for only the duration of the user-agent. - * - * ## Session#maxAge - * - * Alternatively `req.session.cookie.maxAge` will return the time - * remaining in milliseconds, which we may also re-assign a new value - * to adjust the `.expires` property appropriately. The following - * are essentially equivalent - * - * var hour = 3600000; - * req.session.cookie.expires = new Date(Date.now() + hour); - * req.session.cookie.maxAge = hour; - * - * For example when `maxAge` is set to `60000` (one minute), and 30 seconds - * has elapsed it will return `30000` until the current request has completed, - * at which time `req.session.touch()` is called to reset `req.session.maxAge` - * to its original value. - * - * req.session.cookie.maxAge; - * // => 30000 - * - * Session Store Implementation: - * - * Every session store _must_ implement the following methods - * - * - `.get(sid, callback)` - * - `.set(sid, session, callback)` - * - `.destroy(sid, callback)` - * - * Recommended methods include, but are not limited to: - * - * - `.length(callback)` - * - `.clear(callback)` - * - * For an example implementation view the [connect-redis](http://github.com/visionmedia/connect-redis) repo. - * - * @param {Object} options - * @return {Function} - * @api public - */ - -function session(options){ - var options = options || {} - , key = options.key || 'connect.sid' - , store = options.store || new MemoryStore - , cookie = options.cookie || {} - , trustProxy = options.proxy - , storeReady = true - , rollingSessions = options.rolling || false; - - // notify user that this store is not - // meant for a production environment - if ('production' == env && store instanceof MemoryStore) { - console.warn(warning); - } - - // generates the new session - store.generate = function(req){ - req.sessionID = uid(24); - req.session = new Session(req); - req.session.cookie = new Cookie(cookie); - }; - - store.on('disconnect', function(){ storeReady = false; }); - store.on('connect', function(){ storeReady = true; }); - - return function session(req, res, next) { - // self-awareness - if (req.session) return next(); - - // Handle connection as if there is no session if - // the store has temporarily disconnected etc - if (!storeReady) return debug('store is disconnected'), next(); - - // pathname mismatch - var originalPath = parse(req.originalUrl).pathname; - if (0 != originalPath.indexOf(cookie.path || '/')) return next(); - - // backwards compatibility for signed cookies - // req.secret is passed from the cookie parser middleware - var secret = options.secret || req.secret; - - // ensure secret is available or bail - if (!secret) throw new Error('`secret` option required for sessions'); - - var originalHash - , originalId; - - // expose store - req.sessionStore = store; - - // grab the session cookie value and check the signature - var rawCookie = req.cookies[key]; - - // get signedCookies for backwards compat with signed cookies - var unsignedCookie = req.signedCookies[key]; - - if (!unsignedCookie && rawCookie) { - unsignedCookie = utils.parseSignedCookie(rawCookie, secret); - } - - // set-cookie - res.on('header', function(){ - if (!req.session) return; - var cookie = req.session.cookie - , proto = (req.headers['x-forwarded-proto'] || '').split(',')[0].toLowerCase().trim() - , tls = req.connection.encrypted || (trustProxy && 'https' == proto) - , isNew = unsignedCookie != req.sessionID; - - // only send secure cookies via https - if (cookie.secure && !tls) return debug('not secured'); - - // in case of rolling session, always reset the cookie - if (!rollingSessions) { - - // browser-session length cookie - if (null == cookie.expires) { - if (!isNew) return debug('already set browser-session cookie'); - // compare hashes and ids - } else if (originalHash == hash(req.session) && originalId == req.session.id) { - return debug('unmodified session'); - } - - } - - var val = 's:' + signature.sign(req.sessionID, secret); - val = cookie.serialize(key, val); - debug('set-cookie %s', val); - res.setHeader('Set-Cookie', val); - }); - - // proxy end() to commit the session - var end = res.end; - res.end = function(data, encoding){ - res.end = end; - if (!req.session) return res.end(data, encoding); - debug('saving'); - req.session.resetMaxAge(); - req.session.save(function(err){ - if (err) console.error(err.stack); - debug('saved'); - res.end(data, encoding); - }); - }; - - // generate the session - function generate() { - store.generate(req); - } - - // get the sessionID from the cookie - req.sessionID = unsignedCookie; - - // generate a session if the browser doesn't send a sessionID - if (!req.sessionID) { - debug('no SID sent, generating session'); - generate(); - next(); - return; - } - - // generate the session object - var pause = utils.pause(req); - debug('fetching %s', req.sessionID); - store.get(req.sessionID, function(err, sess){ - // proxy to resume() events - var _next = next; - next = function(err){ - _next(err); - pause.resume(); - }; - - // error handling - if (err) { - debug('error %j', err); - if ('ENOENT' == err.code) { - generate(); - next(); - } else { - next(err); - } - // no session - } else if (!sess) { - debug('no session found'); - generate(); - next(); - // populate req.session - } else { - debug('session found'); - store.createSession(req, sess); - originalId = req.sessionID; - originalHash = hash(sess); - next(); - } - }); - }; -}; - -/** - * Hash the given `sess` object omitting changes - * to `.cookie`. - * - * @param {Object} sess - * @return {String} - * @api private - */ - -function hash(sess) { - return crc32.signed(JSON.stringify(sess, function(key, val){ - if ('cookie' != key) return val; - })); -} diff --git a/node_modules/express/node_modules/connect/lib/middleware/session/cookie.js b/node_modules/express/node_modules/connect/lib/middleware/session/cookie.js deleted file mode 100644 index 3125410d..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/session/cookie.js +++ /dev/null @@ -1,128 +0,0 @@ - -/*! - * Connect - session - Cookie - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../../utils') - , cookie = require('cookie'); - -/** - * Initialize a new `Cookie` with the given `options`. - * - * @param {IncomingMessage} req - * @param {Object} options - * @api private - */ - -var Cookie = module.exports = function Cookie(options) { - this.path = '/'; - this.maxAge = null; - this.httpOnly = true; - if (options) utils.merge(this, options); - this.originalMaxAge = undefined == this.originalMaxAge - ? this.maxAge - : this.originalMaxAge; -}; - -/*! - * Prototype. - */ - -Cookie.prototype = { - - /** - * Set expires `date`. - * - * @param {Date} date - * @api public - */ - - set expires(date) { - this._expires = date; - this.originalMaxAge = this.maxAge; - }, - - /** - * Get expires `date`. - * - * @return {Date} - * @api public - */ - - get expires() { - return this._expires; - }, - - /** - * Set expires via max-age in `ms`. - * - * @param {Number} ms - * @api public - */ - - set maxAge(ms) { - this.expires = 'number' == typeof ms - ? new Date(Date.now() + ms) - : ms; - }, - - /** - * Get expires max-age in `ms`. - * - * @return {Number} - * @api public - */ - - get maxAge() { - return this.expires instanceof Date - ? this.expires.valueOf() - Date.now() - : this.expires; - }, - - /** - * Return cookie data object. - * - * @return {Object} - * @api private - */ - - get data() { - return { - originalMaxAge: this.originalMaxAge - , expires: this._expires - , secure: this.secure - , httpOnly: this.httpOnly - , domain: this.domain - , path: this.path - } - }, - - /** - * Return a serialized cookie string. - * - * @return {String} - * @api public - */ - - serialize: function(name, val){ - return cookie.serialize(name, val, this.data); - }, - - /** - * Return JSON representation of this cookie. - * - * @return {Object} - * @api private - */ - - toJSON: function(){ - return this.data; - } -}; diff --git a/node_modules/express/node_modules/connect/lib/middleware/session/memory.js b/node_modules/express/node_modules/connect/lib/middleware/session/memory.js deleted file mode 100644 index fb939392..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/session/memory.js +++ /dev/null @@ -1,129 +0,0 @@ - -/*! - * Connect - session - MemoryStore - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Store = require('./store'); - -/** - * Initialize a new `MemoryStore`. - * - * @api public - */ - -var MemoryStore = module.exports = function MemoryStore() { - this.sessions = {}; -}; - -/** - * Inherit from `Store.prototype`. - */ - -MemoryStore.prototype.__proto__ = Store.prototype; - -/** - * Attempt to fetch session by the given `sid`. - * - * @param {String} sid - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.get = function(sid, fn){ - var self = this; - process.nextTick(function(){ - var expires - , sess = self.sessions[sid]; - if (sess) { - sess = JSON.parse(sess); - expires = 'string' == typeof sess.cookie.expires - ? new Date(sess.cookie.expires) - : sess.cookie.expires; - if (!expires || new Date < expires) { - fn(null, sess); - } else { - self.destroy(sid, fn); - } - } else { - fn(); - } - }); -}; - -/** - * Commit the given `sess` object associated with the given `sid`. - * - * @param {String} sid - * @param {Session} sess - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.set = function(sid, sess, fn){ - var self = this; - process.nextTick(function(){ - self.sessions[sid] = JSON.stringify(sess); - fn && fn(); - }); -}; - -/** - * Destroy the session associated with the given `sid`. - * - * @param {String} sid - * @api public - */ - -MemoryStore.prototype.destroy = function(sid, fn){ - var self = this; - process.nextTick(function(){ - delete self.sessions[sid]; - fn && fn(); - }); -}; - -/** - * Invoke the given callback `fn` with all active sessions. - * - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.all = function(fn){ - var arr = [] - , keys = Object.keys(this.sessions); - for (var i = 0, len = keys.length; i < len; ++i) { - arr.push(this.sessions[keys[i]]); - } - fn(null, arr); -}; - -/** - * Clear all sessions. - * - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.clear = function(fn){ - this.sessions = {}; - fn && fn(); -}; - -/** - * Fetch number of sessions. - * - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.length = function(fn){ - fn(null, Object.keys(this.sessions).length); -}; diff --git a/node_modules/express/node_modules/connect/lib/middleware/session/session.js b/node_modules/express/node_modules/connect/lib/middleware/session/session.js deleted file mode 100644 index 0dd4b400..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/session/session.js +++ /dev/null @@ -1,116 +0,0 @@ - -/*! - * Connect - session - Session - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../../utils'); - -/** - * Create a new `Session` with the given request and `data`. - * - * @param {IncomingRequest} req - * @param {Object} data - * @api private - */ - -var Session = module.exports = function Session(req, data) { - Object.defineProperty(this, 'req', { value: req }); - Object.defineProperty(this, 'id', { value: req.sessionID }); - if ('object' == typeof data) utils.merge(this, data); -}; - -/** - * Update reset `.cookie.maxAge` to prevent - * the cookie from expiring when the - * session is still active. - * - * @return {Session} for chaining - * @api public - */ - -Session.prototype.touch = function(){ - return this.resetMaxAge(); -}; - -/** - * Reset `.maxAge` to `.originalMaxAge`. - * - * @return {Session} for chaining - * @api public - */ - -Session.prototype.resetMaxAge = function(){ - this.cookie.maxAge = this.cookie.originalMaxAge; - return this; -}; - -/** - * Save the session data with optional callback `fn(err)`. - * - * @param {Function} fn - * @return {Session} for chaining - * @api public - */ - -Session.prototype.save = function(fn){ - this.req.sessionStore.set(this.id, this, fn || function(){}); - return this; -}; - -/** - * Re-loads the session data _without_ altering - * the maxAge properties. Invokes the callback `fn(err)`, - * after which time if no exception has occurred the - * `req.session` property will be a new `Session` object, - * although representing the same session. - * - * @param {Function} fn - * @return {Session} for chaining - * @api public - */ - -Session.prototype.reload = function(fn){ - var req = this.req - , store = this.req.sessionStore; - store.get(this.id, function(err, sess){ - if (err) return fn(err); - if (!sess) return fn(new Error('failed to load session')); - store.createSession(req, sess); - fn(); - }); - return this; -}; - -/** - * Destroy `this` session. - * - * @param {Function} fn - * @return {Session} for chaining - * @api public - */ - -Session.prototype.destroy = function(fn){ - delete this.req.session; - this.req.sessionStore.destroy(this.id, fn); - return this; -}; - -/** - * Regenerate this request's session. - * - * @param {Function} fn - * @return {Session} for chaining - * @api public - */ - -Session.prototype.regenerate = function(fn){ - this.req.sessionStore.regenerate(this.req, fn); - return this; -}; diff --git a/node_modules/express/node_modules/connect/lib/middleware/session/store.js b/node_modules/express/node_modules/connect/lib/middleware/session/store.js deleted file mode 100644 index 54294cbd..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/session/store.js +++ /dev/null @@ -1,84 +0,0 @@ - -/*! - * Connect - session - Store - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , Session = require('./session') - , Cookie = require('./cookie'); - -/** - * Initialize abstract `Store`. - * - * @api private - */ - -var Store = module.exports = function Store(options){}; - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Store.prototype.__proto__ = EventEmitter.prototype; - -/** - * Re-generate the given requests's session. - * - * @param {IncomingRequest} req - * @return {Function} fn - * @api public - */ - -Store.prototype.regenerate = function(req, fn){ - var self = this; - this.destroy(req.sessionID, function(err){ - self.generate(req); - fn(err); - }); -}; - -/** - * Load a `Session` instance via the given `sid` - * and invoke the callback `fn(err, sess)`. - * - * @param {String} sid - * @param {Function} fn - * @api public - */ - -Store.prototype.load = function(sid, fn){ - var self = this; - this.get(sid, function(err, sess){ - if (err) return fn(err); - if (!sess) return fn(); - var req = { sessionID: sid, sessionStore: self }; - sess = self.createSession(req, sess); - fn(null, sess); - }); -}; - -/** - * Create session from JSON `sess` data. - * - * @param {IncomingRequest} req - * @param {Object} sess - * @return {Session} - * @api private - */ - -Store.prototype.createSession = function(req, sess){ - var expires = sess.cookie.expires - , orig = sess.cookie.originalMaxAge; - sess.cookie = new Cookie(sess.cookie); - if ('string' == typeof expires) sess.cookie.expires = new Date(expires); - sess.cookie.originalMaxAge = orig; - req.session = new Session(req, sess); - return req.session; -}; diff --git a/node_modules/express/node_modules/connect/lib/middleware/static.js b/node_modules/express/node_modules/connect/lib/middleware/static.js deleted file mode 100644 index 67970dab..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/static.js +++ /dev/null @@ -1,102 +0,0 @@ -/*! - * Connect - static - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var send = require('send') - , utils = require('../utils') - , parse = utils.parseUrl - , url = require('url'); - -/** - * Static: - * - * Static file server with the given `root` path. - * - * Examples: - * - * var oneDay = 86400000; - * - * connect() - * .use(connect.static(__dirname + '/public')) - * - * connect() - * .use(connect.static(__dirname + '/public', { maxAge: oneDay })) - * - * Options: - * - * - `maxAge` Browser cache maxAge in milliseconds. defaults to 0 - * - `hidden` Allow transfer of hidden files. defaults to false - * - `redirect` Redirect to trailing "/" when the pathname is a dir. defaults to true - * - `index` Default file name, defaults to 'index.html' - * - * @param {String} root - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function(root, options){ - options = options || {}; - - // root required - if (!root) throw new Error('static() root path required'); - - // default redirect - var redirect = false !== options.redirect; - - return function staticMiddleware(req, res, next) { - if ('GET' != req.method && 'HEAD' != req.method) return next(); - var originalUrl = url.parse(req.originalUrl); - var path = parse(req).pathname; - var pause = utils.pause(req); - - if (path == '/' && originalUrl.pathname[originalUrl.pathname.length - 1] != '/') { - return directory(); - } - - function resume() { - next(); - pause.resume(); - } - - function directory() { - if (!redirect) return resume(); - var target; - originalUrl.pathname += '/'; - target = url.format(originalUrl); - res.statusCode = 303; - res.setHeader('Location', target); - res.end('Redirecting to ' + utils.escape(target)); - } - - function error(err) { - if (404 == err.status) return resume(); - next(err); - } - - send(req, path) - .maxage(options.maxAge || 0) - .root(root) - .index(options.index || 'index.html') - .hidden(options.hidden) - .on('error', error) - .on('directory', directory) - .pipe(res); - }; -}; - -/** - * Expose mime module. - * - * If you wish to extend the mime table use this - * reference to the "mime" module in the npm registry. - */ - -exports.mime = send.mime; diff --git a/node_modules/express/node_modules/connect/lib/middleware/staticCache.js b/node_modules/express/node_modules/connect/lib/middleware/staticCache.js deleted file mode 100644 index 66d3c1f6..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/staticCache.js +++ /dev/null @@ -1,238 +0,0 @@ - -/*! - * Connect - staticCache - * Copyright(c) 2011 Sencha Inc. - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils') - , Cache = require('../cache') - , fresh = require('fresh'); - -/** - * Static cache: - * - * Status: Deprecated. This middleware will be removed in - * Connect 3.0. You may be interested in: - * - * - [st](https://github.com/isaacs/st) - * - * Enables a memory cache layer on top of - * the `static()` middleware, serving popular - * static files. - * - * By default a maximum of 128 objects are - * held in cache, with a max of 256k each, - * totalling ~32mb. - * - * A Least-Recently-Used (LRU) cache algo - * is implemented through the `Cache` object, - * simply rotating cache objects as they are - * hit. This means that increasingly popular - * objects maintain their positions while - * others get shoved out of the stack and - * garbage collected. - * - * Benchmarks: - * - * static(): 2700 rps - * node-static: 5300 rps - * static() + staticCache(): 7500 rps - * - * Options: - * - * - `maxObjects` max cache objects [128] - * - `maxLength` max cache object length 256kb - * - * @param {Object} options - * @return {Function} - * @api public - */ - -module.exports = function staticCache(options){ - var options = options || {} - , cache = new Cache(options.maxObjects || 128) - , maxlen = options.maxLength || 1024 * 256; - - if (process.env.NODE_ENV !== 'test') { - console.warn('connect.staticCache() is deprecated and will be removed in 3.0'); - console.warn('use varnish or similar reverse proxy caches.'); - } - - return function staticCache(req, res, next){ - var key = cacheKey(req) - , ranges = req.headers.range - , hasCookies = req.headers.cookie - , hit = cache.get(key); - - // cache static - // TODO: change from staticCache() -> cache() - // and make this work for any request - req.on('static', function(stream){ - var headers = res._headers - , cc = utils.parseCacheControl(headers['cache-control'] || '') - , contentLength = headers['content-length'] - , hit; - - // dont cache set-cookie responses - if (headers['set-cookie']) return hasCookies = true; - - // dont cache when cookies are present - if (hasCookies) return; - - // ignore larger files - if (!contentLength || contentLength > maxlen) return; - - // don't cache partial files - if (headers['content-range']) return; - - // dont cache items we shouldn't be - // TODO: real support for must-revalidate / no-cache - if ( cc['no-cache'] - || cc['no-store'] - || cc['private'] - || cc['must-revalidate']) return; - - // if already in cache then validate - if (hit = cache.get(key)){ - if (headers.etag == hit[0].etag) { - hit[0].date = new Date; - return; - } else { - cache.remove(key); - } - } - - // validation notifiactions don't contain a steam - if (null == stream) return; - - // add the cache object - var arr = []; - - // store the chunks - stream.on('data', function(chunk){ - arr.push(chunk); - }); - - // flag it as complete - stream.on('end', function(){ - var cacheEntry = cache.add(key); - delete headers['x-cache']; // Clean up (TODO: others) - cacheEntry.push(200); - cacheEntry.push(headers); - cacheEntry.push.apply(cacheEntry, arr); - }); - }); - - if (req.method == 'GET' || req.method == 'HEAD') { - if (ranges) { - next(); - } else if (!hasCookies && hit && !mustRevalidate(req, hit)) { - res.setHeader('X-Cache', 'HIT'); - respondFromCache(req, res, hit); - } else { - res.setHeader('X-Cache', 'MISS'); - next(); - } - } else { - next(); - } - } -}; - -/** - * Respond with the provided cached value. - * TODO: Assume 200 code, that's iffy. - * - * @param {Object} req - * @param {Object} res - * @param {Object} cacheEntry - * @return {String} - * @api private - */ - -function respondFromCache(req, res, cacheEntry) { - var status = cacheEntry[0] - , headers = utils.merge({}, cacheEntry[1]) - , content = cacheEntry.slice(2); - - headers.age = (new Date - new Date(headers.date)) / 1000 || 0; - - switch (req.method) { - case 'HEAD': - res.writeHead(status, headers); - res.end(); - break; - case 'GET': - if (utils.conditionalGET(req) && fresh(req.headers, headers)) { - headers['content-length'] = 0; - res.writeHead(304, headers); - res.end(); - } else { - res.writeHead(status, headers); - - function write() { - while (content.length) { - if (false === res.write(content.shift())) { - res.once('drain', write); - return; - } - } - res.end(); - } - - write(); - } - break; - default: - // This should never happen. - res.writeHead(500, ''); - res.end(); - } -} - -/** - * Determine whether or not a cached value must be revalidated. - * - * @param {Object} req - * @param {Object} cacheEntry - * @return {String} - * @api private - */ - -function mustRevalidate(req, cacheEntry) { - var cacheHeaders = cacheEntry[1] - , reqCC = utils.parseCacheControl(req.headers['cache-control'] || '') - , cacheCC = utils.parseCacheControl(cacheHeaders['cache-control'] || '') - , cacheAge = (new Date - new Date(cacheHeaders.date)) / 1000 || 0; - - if ( cacheCC['no-cache'] - || cacheCC['must-revalidate'] - || cacheCC['proxy-revalidate']) return true; - - if (reqCC['no-cache']) return true; - - if (null != reqCC['max-age']) return reqCC['max-age'] < cacheAge; - - if (null != cacheCC['max-age']) return cacheCC['max-age'] < cacheAge; - - return false; -} - -/** - * The key to use in the cache. For now, this is the URL path and query. - * - * 'http://example.com?key=value' -> '/?key=value' - * - * @param {Object} req - * @return {String} - * @api private - */ - -function cacheKey(req) { - return utils.parseUrl(req).path; -} diff --git a/node_modules/express/node_modules/connect/lib/middleware/timeout.js b/node_modules/express/node_modules/connect/lib/middleware/timeout.js deleted file mode 100644 index 5496c024..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/timeout.js +++ /dev/null @@ -1,55 +0,0 @@ -/*! - * Connect - timeout - * Ported from https://github.com/LearnBoost/connect-timeout - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var debug = require('debug')('connect:timeout'); - -/** - * Timeout: - * - * Times out the request in `ms`, defaulting to `5000`. The - * method `req.clearTimeout()` is added to revert this behaviour - * programmatically within your application's middleware, routes, etc. - * - * The timeout error is passed to `next()` so that you may customize - * the response behaviour. This error has the `.timeout` property as - * well as `.status == 503`. - * - * @param {Number} ms - * @return {Function} - * @api public - */ - -module.exports = function timeout(ms) { - ms = ms || 5000; - - return function(req, res, next) { - var id = setTimeout(function(){ - req.emit('timeout', ms); - }, ms); - - req.on('timeout', function(){ - if (res.headerSent) return debug('response started, cannot timeout'); - var err = new Error('Response timeout'); - err.timeout = ms; - err.status = 503; - next(err); - }); - - req.clearTimeout = function(){ - clearTimeout(id); - }; - - res.on('header', function(){ - clearTimeout(id); - }); - - next(); - }; -}; diff --git a/node_modules/express/node_modules/connect/lib/middleware/urlencoded.js b/node_modules/express/node_modules/connect/lib/middleware/urlencoded.js deleted file mode 100644 index ebc6f5fc..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/urlencoded.js +++ /dev/null @@ -1,77 +0,0 @@ - -/*! - * Connect - urlencoded - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils'); -var getBody = require('raw-body'); -var qs = require('qs'); - -/** - * Urlencoded: - * - * Parse x-ww-form-urlencoded request bodies, - * providing the parsed object as `req.body` using - * [qs](https://github.com/visionmedia/node-querystring). - * - * Options: - * - * - `limit` byte limit [1mb] - * - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function(options){ - options = options || {}; - var verify = typeof options.verify === 'function' && options.verify; - - return function urlencoded(req, res, next) { - if (req._body) return next(); - req.body = req.body || {}; - - if (!utils.hasBody(req)) return next(); - - // check Content-Type - if ('application/x-www-form-urlencoded' != utils.mime(req)) return next(); - - // flag as parsed - req._body = true; - - // parse - getBody(req, { - limit: options.limit || '1mb', - length: req.headers['content-length'], - encoding: 'utf8' - }, function (err, buf) { - if (err) return next(err); - - if (verify) { - try { - verify(req, res, buf) - } catch (err) { - if (!err.status) err.status = 403; - return next(err); - } - } - - try { - req.body = buf.length - ? qs.parse(buf, options) - : {}; - } catch (err){ - err.body = buf; - return next(err); - } - next(); - }) - } -}; diff --git a/node_modules/express/node_modules/connect/lib/middleware/vhost.js b/node_modules/express/node_modules/connect/lib/middleware/vhost.js deleted file mode 100644 index abbb0500..00000000 --- a/node_modules/express/node_modules/connect/lib/middleware/vhost.js +++ /dev/null @@ -1,40 +0,0 @@ - -/*! - * Connect - vhost - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Vhost: - * - * Setup vhost for the given `hostname` and `server`. - * - * connect() - * .use(connect.vhost('foo.com', fooApp)) - * .use(connect.vhost('bar.com', barApp)) - * .use(connect.vhost('*.com', mainApp)) - * - * The `server` may be a Connect server or - * a regular Node `http.Server`. - * - * @param {String} hostname - * @param {Server} server - * @return {Function} - * @api public - */ - -module.exports = function vhost(hostname, server){ - if (!hostname) throw new Error('vhost hostname required'); - if (!server) throw new Error('vhost server required'); - var regexp = new RegExp('^' + hostname.replace(/[^*\w]/g, '\\$&').replace(/[*]/g, '(?:.*?)') + '$', 'i'); - if (server.onvhost) server.onvhost(hostname); - return function vhost(req, res, next){ - if (!req.headers.host) return next(); - var host = req.headers.host.split(':')[0]; - if (!regexp.test(host)) return next(); - if ('function' == typeof server) return server(req, res, next); - server.emit('request', req, res); - }; -}; diff --git a/node_modules/express/node_modules/connect/lib/patch.js b/node_modules/express/node_modules/connect/lib/patch.js deleted file mode 100644 index 22bcbc62..00000000 --- a/node_modules/express/node_modules/connect/lib/patch.js +++ /dev/null @@ -1,89 +0,0 @@ - -/*! - * Connect - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var http = require('http') - , res = http.ServerResponse.prototype - , setHeader = res.setHeader - , _renderHeaders = res._renderHeaders - , writeHead = res.writeHead; - -// apply only once - -if (!res._hasConnectPatch) { - - /** - * Provide a public "header sent" flag - * until node does. - * - * @return {Boolean} - * @api public - */ - - res.__defineGetter__('headerSent', function(){ - return this._header; - }); - - /** - * Set header `field` to `val`, special-casing - * the `Set-Cookie` field for multiple support. - * - * @param {String} field - * @param {String} val - * @api public - */ - - res.setHeader = function(field, val){ - var key = field.toLowerCase() - , prev; - - // special-case Set-Cookie - if (this._headers && 'set-cookie' == key) { - if (prev = this.getHeader(field)) { - if (Array.isArray(prev)) { - val = prev.concat(val); - } else if (Array.isArray(val)) { - val = val.concat(prev); - } else { - val = [prev, val]; - } - } - // charset - } else if ('content-type' == key && this.charset) { - val += '; charset=' + this.charset; - } - - return setHeader.call(this, field, val); - }; - - /** - * Proxy to emit "header" event. - */ - - res._renderHeaders = function(){ - if (!this._emittedHeader) this.emit('header'); - this._emittedHeader = true; - return _renderHeaders.call(this); - }; - - res.writeHead = function(statusCode, reasonPhrase, headers){ - if (typeof reasonPhrase === 'object') headers = reasonPhrase; - if (typeof headers === 'object') { - Object.keys(headers).forEach(function(key){ - this.setHeader(key, headers[key]); - }, this); - } - if (!this._emittedHeader) this.emit('header'); - this._emittedHeader = true; - return writeHead.call(this, statusCode, reasonPhrase); - }; - - res._hasConnectPatch = true; -} diff --git a/node_modules/express/node_modules/connect/lib/proto.js b/node_modules/express/node_modules/connect/lib/proto.js deleted file mode 100644 index a945bc28..00000000 --- a/node_modules/express/node_modules/connect/lib/proto.js +++ /dev/null @@ -1,233 +0,0 @@ -/*! - * Connect - HTTPServer - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var http = require('http') - , utils = require('./utils') - , debug = require('debug')('connect:dispatcher'); - -// prototype - -var app = module.exports = {}; - -// environment - -var env = process.env.NODE_ENV || 'development'; - -/** - * Utilize the given middleware `handle` to the given `route`, - * defaulting to _/_. This "route" is the mount-point for the - * middleware, when given a value other than _/_ the middleware - * is only effective when that segment is present in the request's - * pathname. - * - * For example if we were to mount a function at _/admin_, it would - * be invoked on _/admin_, and _/admin/settings_, however it would - * not be invoked for _/_, or _/posts_. - * - * Examples: - * - * var app = connect(); - * app.use(connect.favicon()); - * app.use(connect.logger()); - * app.use(connect.static(__dirname + '/public')); - * - * If we wanted to prefix static files with _/public_, we could - * "mount" the `static()` middleware: - * - * app.use('/public', connect.static(__dirname + '/public')); - * - * This api is chainable, so the following is valid: - * - * connect() - * .use(connect.favicon()) - * .use(connect.logger()) - * .use(connect.static(__dirname + '/public')) - * .listen(3000); - * - * @param {String|Function|Server} route, callback or server - * @param {Function|Server} callback or server - * @return {Server} for chaining - * @api public - */ - -app.use = function(route, fn){ - // default route to '/' - if ('string' != typeof route) { - fn = route; - route = '/'; - } - - // wrap sub-apps - if ('function' == typeof fn.handle) { - var server = fn; - fn.route = route; - fn = function(req, res, next){ - server.handle(req, res, next); - }; - } - - // wrap vanilla http.Servers - if (fn instanceof http.Server) { - fn = fn.listeners('request')[0]; - } - - // strip trailing slash - if ('/' == route[route.length - 1]) { - route = route.slice(0, -1); - } - - // add the middleware - debug('use %s %s', route || '/', fn.name || 'anonymous'); - this.stack.push({ route: route, handle: fn }); - - return this; -}; - -/** - * Handle server requests, punting them down - * the middleware stack. - * - * @api private - */ - -app.handle = function(req, res, out) { - var stack = this.stack - , search = 1 + req.url.indexOf('?') - , pathlength = search ? search - 1 : req.url.length - , fqdn = 1 + req.url.substr(0, pathlength).indexOf('://') - , protohost = fqdn ? req.url.substr(0, req.url.indexOf('/', 2 + fqdn)) : '' - , removed = '' - , slashAdded = false - , index = 0; - - function next(err) { - var layer, path, c; - - if (slashAdded) { - req.url = req.url.substr(1); - slashAdded = false; - } - - req.url = protohost + removed + req.url.substr(protohost.length); - req.originalUrl = req.originalUrl || req.url; - removed = ''; - - // next callback - layer = stack[index++]; - - // all done - if (!layer || res.headerSent) { - // delegate to parent - if (out) return out(err); - - // unhandled error - if (err) { - // default to 500 - if (res.statusCode < 400) res.statusCode = 500; - debug('default %s', res.statusCode); - - // respect err.status - if (err.status) res.statusCode = err.status; - - // production gets a basic error message - var msg = 'production' == env - ? http.STATUS_CODES[res.statusCode] - : err.stack || err.toString(); - msg = utils.escape(msg); - - // log to stderr in a non-test env - if ('test' != env) console.error(err.stack || err.toString()); - if (res.headerSent) return req.socket.destroy(); - res.setHeader('Content-Type', 'text/html'); - res.setHeader('Content-Length', Buffer.byteLength(msg)); - if ('HEAD' == req.method) return res.end(); - res.end(msg); - } else { - debug('default 404'); - res.statusCode = 404; - res.setHeader('Content-Type', 'text/html'); - if ('HEAD' == req.method) return res.end(); - res.end('Cannot ' + utils.escape(req.method) + ' ' + utils.escape(req.originalUrl) + '\n'); - } - return; - } - - try { - path = utils.parseUrl(req).pathname; - if (undefined == path) path = '/'; - - // skip this layer if the route doesn't match. - if (0 != path.toLowerCase().indexOf(layer.route.toLowerCase())) return next(err); - - c = path[layer.route.length]; - if (c && '/' != c && '.' != c) return next(err); - - // Call the layer handler - // Trim off the part of the url that matches the route - removed = layer.route; - req.url = protohost + req.url.substr(protohost.length + removed.length); - - // Ensure leading slash - if (!fqdn && '/' != req.url[0]) { - req.url = '/' + req.url; - slashAdded = true; - } - - debug('%s %s : %s', layer.handle.name || 'anonymous', layer.route, req.originalUrl); - var arity = layer.handle.length; - if (err) { - if (arity === 4) { - layer.handle(err, req, res, next); - } else { - next(err); - } - } else if (arity < 4) { - layer.handle(req, res, next); - } else { - next(); - } - } catch (e) { - next(e); - } - } - next(); -}; - -/** - * Listen for connections. - * - * This method takes the same arguments - * as node's `http.Server#listen()`. - * - * HTTP and HTTPS: - * - * If you run your application both as HTTP - * and HTTPS you may wrap them individually, - * since your Connect "server" is really just - * a JavaScript `Function`. - * - * var connect = require('connect') - * , http = require('http') - * , https = require('https'); - * - * var app = connect(); - * - * http.createServer(app).listen(80); - * https.createServer(options, app).listen(443); - * - * @return {http.Server} - * @api public - */ - -app.listen = function(){ - var server = http.createServer(this); - return server.listen.apply(server, arguments); -}; diff --git a/node_modules/express/node_modules/connect/lib/public/directory.html b/node_modules/express/node_modules/connect/lib/public/directory.html deleted file mode 100644 index 8ed8b4ae..00000000 --- a/node_modules/express/node_modules/connect/lib/public/directory.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - listing directory {directory} - - - - - -
    -

    {linked-path}

    - {files} -
    - - \ No newline at end of file diff --git a/node_modules/express/node_modules/connect/lib/public/error.html b/node_modules/express/node_modules/connect/lib/public/error.html deleted file mode 100644 index a6d3fafd..00000000 --- a/node_modules/express/node_modules/connect/lib/public/error.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - {error} - - - -
    -

    {title}

    -

    {statusCode} {error}

    -
      {stack}
    -
    - - diff --git a/node_modules/express/node_modules/connect/lib/public/favicon.ico b/node_modules/express/node_modules/connect/lib/public/favicon.ico deleted file mode 100644 index 895fc96a..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/favicon.ico and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/folder.png b/node_modules/express/node_modules/connect/lib/public/icons/folder.png deleted file mode 100644 index 698f3d30..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/folder.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page.png b/node_modules/express/node_modules/connect/lib/public/icons/page.png deleted file mode 100644 index 03ddd799..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_add.png b/node_modules/express/node_modules/connect/lib/public/icons/page_add.png deleted file mode 100644 index d5bfa071..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_add.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_attach.png b/node_modules/express/node_modules/connect/lib/public/icons/page_attach.png deleted file mode 100644 index 89ee2da0..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_attach.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_code.png b/node_modules/express/node_modules/connect/lib/public/icons/page_code.png deleted file mode 100644 index f7ea9041..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_code.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_copy.png b/node_modules/express/node_modules/connect/lib/public/icons/page_copy.png deleted file mode 100644 index 195dc6d6..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_copy.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_delete.png b/node_modules/express/node_modules/connect/lib/public/icons/page_delete.png deleted file mode 100644 index 3141467c..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_delete.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_edit.png b/node_modules/express/node_modules/connect/lib/public/icons/page_edit.png deleted file mode 100644 index 046811ed..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_edit.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_error.png b/node_modules/express/node_modules/connect/lib/public/icons/page_error.png deleted file mode 100644 index f07f449a..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_error.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_excel.png b/node_modules/express/node_modules/connect/lib/public/icons/page_excel.png deleted file mode 100644 index eb6158eb..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_excel.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_find.png b/node_modules/express/node_modules/connect/lib/public/icons/page_find.png deleted file mode 100644 index 2f193889..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_find.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_gear.png b/node_modules/express/node_modules/connect/lib/public/icons/page_gear.png deleted file mode 100644 index 8e83281c..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_gear.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_go.png b/node_modules/express/node_modules/connect/lib/public/icons/page_go.png deleted file mode 100644 index 80fe1ed0..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_go.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_green.png b/node_modules/express/node_modules/connect/lib/public/icons/page_green.png deleted file mode 100644 index de8e003f..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_green.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_key.png b/node_modules/express/node_modules/connect/lib/public/icons/page_key.png deleted file mode 100644 index d6626cb0..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_key.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_lightning.png b/node_modules/express/node_modules/connect/lib/public/icons/page_lightning.png deleted file mode 100644 index 7e568703..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_lightning.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_link.png b/node_modules/express/node_modules/connect/lib/public/icons/page_link.png deleted file mode 100644 index 312eab09..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_link.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_paintbrush.png b/node_modules/express/node_modules/connect/lib/public/icons/page_paintbrush.png deleted file mode 100644 index 246a2f0b..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_paintbrush.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_paste.png b/node_modules/express/node_modules/connect/lib/public/icons/page_paste.png deleted file mode 100644 index 968f073f..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_paste.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_red.png b/node_modules/express/node_modules/connect/lib/public/icons/page_red.png deleted file mode 100644 index 0b18247d..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_red.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_refresh.png b/node_modules/express/node_modules/connect/lib/public/icons/page_refresh.png deleted file mode 100644 index cf347c7d..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_refresh.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_save.png b/node_modules/express/node_modules/connect/lib/public/icons/page_save.png deleted file mode 100644 index caea546a..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_save.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white.png deleted file mode 100644 index 8b8b1ca0..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_acrobat.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_acrobat.png deleted file mode 100644 index 8f8095e4..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_acrobat.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_actionscript.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_actionscript.png deleted file mode 100644 index 159b2407..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_actionscript.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_add.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_add.png deleted file mode 100644 index aa23dde3..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_add.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_c.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_c.png deleted file mode 100644 index 34a05ccc..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_c.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_camera.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_camera.png deleted file mode 100644 index f501a593..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_camera.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_cd.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_cd.png deleted file mode 100644 index 848bdaf3..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_cd.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_code.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_code.png deleted file mode 100644 index 0c76bd12..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_code.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_code_red.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_code_red.png deleted file mode 100644 index 87a69145..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_code_red.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_coldfusion.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_coldfusion.png deleted file mode 100644 index c66011fb..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_coldfusion.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_compressed.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_compressed.png deleted file mode 100644 index 2b6b1007..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_compressed.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_copy.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_copy.png deleted file mode 100644 index a9f31a27..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_copy.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_cplusplus.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_cplusplus.png deleted file mode 100644 index a87cf847..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_cplusplus.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_csharp.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_csharp.png deleted file mode 100644 index ffb8fc93..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_csharp.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_cup.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_cup.png deleted file mode 100644 index 0a7d6f4a..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_cup.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_database.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_database.png deleted file mode 100644 index bddba1f9..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_database.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_delete.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_delete.png deleted file mode 100644 index af1ecaf2..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_delete.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_dvd.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_dvd.png deleted file mode 100644 index 4cc537af..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_dvd.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_edit.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_edit.png deleted file mode 100644 index b93e7760..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_edit.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_error.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_error.png deleted file mode 100644 index 9fc5a0a1..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_error.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_excel.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_excel.png deleted file mode 100644 index b977d7e5..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_excel.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_find.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_find.png deleted file mode 100644 index 58184363..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_find.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_flash.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_flash.png deleted file mode 100644 index 5769120b..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_flash.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_freehand.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_freehand.png deleted file mode 100644 index 8d719df5..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_freehand.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_gear.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_gear.png deleted file mode 100644 index 106f5aa3..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_gear.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_get.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_get.png deleted file mode 100644 index e4a1ecba..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_get.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_go.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_go.png deleted file mode 100644 index 7e62a924..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_go.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_h.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_h.png deleted file mode 100644 index e902abb0..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_h.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_horizontal.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_horizontal.png deleted file mode 100644 index 1d2d0a49..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_horizontal.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_key.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_key.png deleted file mode 100644 index d6164845..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_key.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_lightning.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_lightning.png deleted file mode 100644 index 7215d1e8..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_lightning.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_link.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_link.png deleted file mode 100644 index bf7bd1c9..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_link.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_magnify.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_magnify.png deleted file mode 100644 index f6b74cc4..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_magnify.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_medal.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_medal.png deleted file mode 100644 index d3fffb6d..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_medal.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_office.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_office.png deleted file mode 100644 index a65bcb3e..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_office.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_paint.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_paint.png deleted file mode 100644 index 23a37b89..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_paint.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_paintbrush.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_paintbrush.png deleted file mode 100644 index f907e44b..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_paintbrush.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_paste.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_paste.png deleted file mode 100644 index 5b2cbb3f..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_paste.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_php.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_php.png deleted file mode 100644 index 7868a259..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_php.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_picture.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_picture.png deleted file mode 100644 index 134b6693..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_picture.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_powerpoint.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_powerpoint.png deleted file mode 100644 index c4eff038..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_powerpoint.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_put.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_put.png deleted file mode 100644 index 884ffd6f..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_put.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_ruby.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_ruby.png deleted file mode 100644 index f59b7c43..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_ruby.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_stack.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_stack.png deleted file mode 100644 index 44084add..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_stack.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_star.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_star.png deleted file mode 100644 index 3a1441c9..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_star.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_swoosh.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_swoosh.png deleted file mode 100644 index e7708292..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_swoosh.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_text.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_text.png deleted file mode 100644 index 813f712f..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_text.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_text_width.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_text_width.png deleted file mode 100644 index d9cf1325..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_text_width.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_tux.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_tux.png deleted file mode 100644 index 52699bfe..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_tux.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_vector.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_vector.png deleted file mode 100644 index 4a05955b..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_vector.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_visualstudio.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_visualstudio.png deleted file mode 100644 index a0a433df..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_visualstudio.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_width.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_width.png deleted file mode 100644 index 1eb88094..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_width.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_word.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_word.png deleted file mode 100644 index ae8ecbf4..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_word.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_world.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_world.png deleted file mode 100644 index 6ed2490e..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_world.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_wrench.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_wrench.png deleted file mode 100644 index fecadd08..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_wrench.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_white_zip.png b/node_modules/express/node_modules/connect/lib/public/icons/page_white_zip.png deleted file mode 100644 index fd4bbccd..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_white_zip.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_word.png b/node_modules/express/node_modules/connect/lib/public/icons/page_word.png deleted file mode 100644 index 834cdfaf..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_word.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/icons/page_world.png b/node_modules/express/node_modules/connect/lib/public/icons/page_world.png deleted file mode 100644 index b8895dde..00000000 Binary files a/node_modules/express/node_modules/connect/lib/public/icons/page_world.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/lib/public/style.css b/node_modules/express/node_modules/connect/lib/public/style.css deleted file mode 100644 index 0709908a..00000000 --- a/node_modules/express/node_modules/connect/lib/public/style.css +++ /dev/null @@ -1,257 +0,0 @@ -* { - margin: 0; - padding: 0; - outline: 0; -} - -body { - padding: 80px 100px; - font: 13px "Helvetica Neue", "Lucida Grande", "Arial"; - background: #ECE9E9 -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#ECE9E9)); - background: #ECE9E9 -moz-linear-gradient(top, #fff, #ECE9E9); - background-repeat: no-repeat; - color: #555; - -webkit-font-smoothing: antialiased; -} -h1, h2, h3 { - font-size: 22px; - color: #343434; -} -h1 em, h2 em { - padding: 0 5px; - font-weight: normal; -} -h1 { - font-size: 60px; -} -h2 { - margin-top: 10px; -} -h3 { - margin: 5px 0 10px 0; - padding-bottom: 5px; - border-bottom: 1px solid #eee; - font-size: 18px; -} -ul li { - list-style: none; -} -ul li:hover { - cursor: pointer; - color: #2e2e2e; -} -ul li .path { - padding-left: 5px; - font-weight: bold; -} -ul li .line { - padding-right: 5px; - font-style: italic; -} -ul li:first-child .path { - padding-left: 0; -} -p { - line-height: 1.5; -} -a { - color: #555; - text-decoration: none; -} -a:hover { - color: #303030; -} -#stacktrace { - margin-top: 15px; -} -.directory h1 { - margin-bottom: 15px; - font-size: 18px; -} -ul#files { - width: 100%; - height: 100%; - overflow: hidden; -} -ul#files li { - float: left; - width: 30%; - line-height: 25px; - margin: 1px; -} -ul#files li a { - display: block; - height: 25px; - border: 1px solid transparent; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; - overflow: hidden; - white-space: nowrap; -} -ul#files li a:focus, -ul#files li a:hover { - background: rgba(255,255,255,0.65); - border: 1px solid #ececec; -} -ul#files li a.highlight { - -webkit-transition: background .4s ease-in-out; - background: #ffff4f; - border-color: #E9DC51; -} -#search { - display: block; - position: fixed; - top: 20px; - right: 20px; - width: 90px; - -webkit-transition: width ease 0.2s, opacity ease 0.4s; - -moz-transition: width ease 0.2s, opacity ease 0.4s; - -webkit-border-radius: 32px; - -moz-border-radius: 32px; - -webkit-box-shadow: inset 0px 0px 3px rgba(0, 0, 0, 0.25), inset 0px 1px 3px rgba(0, 0, 0, 0.7), 0px 1px 0px rgba(255, 255, 255, 0.03); - -moz-box-shadow: inset 0px 0px 3px rgba(0, 0, 0, 0.25), inset 0px 1px 3px rgba(0, 0, 0, 0.7), 0px 1px 0px rgba(255, 255, 255, 0.03); - -webkit-font-smoothing: antialiased; - text-align: left; - font: 13px "Helvetica Neue", Arial, sans-serif; - padding: 4px 10px; - border: none; - background: transparent; - margin-bottom: 0; - outline: none; - opacity: 0.7; - color: #888; -} -#search:focus { - width: 120px; - opacity: 1.0; -} - -/*views*/ -#files span { - display: inline-block; - overflow: hidden; - text-overflow: ellipsis; - text-indent: 10px; -} -#files .name { - background-repeat: no-repeat; -} -#files .icon .name { - text-indent: 28px; -} - -/*tiles*/ -.view-tiles .name { - width: 100%; - background-position: 8px 5px; -} -.view-tiles .size, -.view-tiles .date { - display: none; -} - -/*details*/ -ul#files.view-details li { - float: none; - display: block; - width: 90%; -} -ul#files.view-details li.header { - height: 25px; - background: #000; - color: #fff; - font-weight: bold; -} -.view-details .header { - border-radius: 5px; -} -.view-details .name { - width: 60%; - background-position: 8px 5px; -} -.view-details .size { - width: 10%; -} -.view-details .date { - width: 30%; -} -.view-details .size, -.view-details .date { - text-align: right; - direction: rtl; -} - -/*mobile*/ -@media (max-width: 768px) { - body { - font-size: 13px; - line-height: 16px; - padding: 0; - } - #search { - position: static; - width: 100%; - font-size: 2em; - line-height: 1.8em; - text-indent: 10px; - border: 0; - border-radius: 0; - padding: 10px 0; - margin: 0; - } - #search:focus { - width: 100%; - border: 0; - opacity: 1; - } - .directory h1 { - font-size: 2em; - line-height: 1.5em; - color: #fff; - background: #000; - padding: 15px 10px; - margin: 0; - } - ul#files { - border-top: 1px solid #cacaca; - } - ul#files li { - float: none; - width: auto !important; - display: block; - border-bottom: 1px solid #cacaca; - font-size: 2em; - line-height: 1.2em; - text-indent: 0; - margin: 0; - } - ul#files li:nth-child(odd) { - background: #e0e0e0; - } - ul#files li a { - height: auto; - border: 0; - border-radius: 0; - padding: 15px 10px; - } - ul#files li a:focus, - ul#files li a:hover { - border: 0; - } - #files .header, - #files .size, - #files .date { - display: none !important; - } - #files .name { - float: none; - display: inline-block; - width: 100%; - text-indent: 0; - background-position: 0 0; - } - #files .icon .name { - text-indent: 41px; - } -} diff --git a/node_modules/express/node_modules/connect/lib/utils.js b/node_modules/express/node_modules/connect/lib/utils.js deleted file mode 100644 index 9839bc33..00000000 --- a/node_modules/express/node_modules/connect/lib/utils.js +++ /dev/null @@ -1,408 +0,0 @@ - -/*! - * Connect - utils - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var http = require('http') - , crypto = require('crypto') - , parse = require('url').parse - , sep = require('path').sep - , signature = require('cookie-signature') - , nodeVersion = process.versions.node.split('.'); - -// pause is broken in node < 0.10 -exports.brokenPause = parseInt(nodeVersion[0], 10) === 0 - && parseInt(nodeVersion[1], 10) < 10; - -/** - * Return `true` if the request has a body, otherwise return `false`. - * - * @param {IncomingMessage} req - * @return {Boolean} - * @api private - */ - -exports.hasBody = function(req) { - var encoding = 'transfer-encoding' in req.headers; - var length = 'content-length' in req.headers && req.headers['content-length'] !== '0'; - return encoding || length; -}; - -/** - * Extract the mime type from the given request's - * _Content-Type_ header. - * - * @param {IncomingMessage} req - * @return {String} - * @api private - */ - -exports.mime = function(req) { - var str = req.headers['content-type'] || ''; - return str.split(';')[0]; -}; - -/** - * Generate an `Error` from the given status `code` - * and optional `msg`. - * - * @param {Number} code - * @param {String} msg - * @return {Error} - * @api private - */ - -exports.error = function(code, msg){ - var err = new Error(msg || http.STATUS_CODES[code]); - err.status = code; - return err; -}; - -/** - * Return md5 hash of the given string and optional encoding, - * defaulting to hex. - * - * utils.md5('wahoo'); - * // => "e493298061761236c96b02ea6aa8a2ad" - * - * @param {String} str - * @param {String} encoding - * @return {String} - * @api private - */ - -exports.md5 = function(str, encoding){ - return crypto - .createHash('md5') - .update(str, 'utf8') - .digest(encoding || 'hex'); -}; - -/** - * Merge object b with object a. - * - * var a = { foo: 'bar' } - * , b = { bar: 'baz' }; - * - * utils.merge(a, b); - * // => { foo: 'bar', bar: 'baz' } - * - * @param {Object} a - * @param {Object} b - * @return {Object} - * @api private - */ - -exports.merge = function(a, b){ - if (a && b) { - for (var key in b) { - a[key] = b[key]; - } - } - return a; -}; - -/** - * Escape the given string of `html`. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function(html){ - return String(html) - .replace(/&(?!\w+;)/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); -}; - -/** - * Sign the given `val` with `secret`. - * - * @param {String} val - * @param {String} secret - * @return {String} - * @api private - */ - -exports.sign = function(val, secret){ - console.warn('do not use utils.sign(), use https://github.com/visionmedia/node-cookie-signature') - return val + '.' + crypto - .createHmac('sha256', secret) - .update(val) - .digest('base64') - .replace(/=+$/, ''); -}; - -/** - * Unsign and decode the given `val` with `secret`, - * returning `false` if the signature is invalid. - * - * @param {String} val - * @param {String} secret - * @return {String|Boolean} - * @api private - */ - -exports.unsign = function(val, secret){ - console.warn('do not use utils.unsign(), use https://github.com/visionmedia/node-cookie-signature') - var str = val.slice(0, val.lastIndexOf('.')); - return exports.sign(str, secret) == val - ? str - : false; -}; - -/** - * Parse signed cookies, returning an object - * containing the decoded key/value pairs, - * while removing the signed key from `obj`. - * - * @param {Object} obj - * @return {Object} - * @api private - */ - -exports.parseSignedCookies = function(obj, secret){ - var ret = {}; - Object.keys(obj).forEach(function(key){ - var val = obj[key]; - if (0 == val.indexOf('s:')) { - val = signature.unsign(val.slice(2), secret); - if (val) { - ret[key] = val; - delete obj[key]; - } - } - }); - return ret; -}; - -/** - * Parse a signed cookie string, return the decoded value - * - * @param {String} str signed cookie string - * @param {String} secret - * @return {String} decoded value - * @api private - */ - -exports.parseSignedCookie = function(str, secret){ - return 0 == str.indexOf('s:') - ? signature.unsign(str.slice(2), secret) - : str; -}; - -/** - * Parse JSON cookies. - * - * @param {Object} obj - * @return {Object} - * @api private - */ - -exports.parseJSONCookies = function(obj){ - Object.keys(obj).forEach(function(key){ - var val = obj[key]; - var res = exports.parseJSONCookie(val); - if (res) obj[key] = res; - }); - return obj; -}; - -/** - * Parse JSON cookie string - * - * @param {String} str - * @return {Object} Parsed object or null if not json cookie - * @api private - */ - -exports.parseJSONCookie = function(str) { - if (0 == str.indexOf('j:')) { - try { - return JSON.parse(str.slice(2)); - } catch (err) { - // no op - } - } -}; - -/** - * Pause `data` and `end` events on the given `obj`. - * Middleware performing async tasks _should_ utilize - * this utility (or similar), to re-emit data once - * the async operation has completed, otherwise these - * events may be lost. Pause is only required for - * node versions less than 10, and is replaced with - * noop's otherwise. - * - * var pause = utils.pause(req); - * fs.readFile(path, function(){ - * next(); - * pause.resume(); - * }); - * - * @param {Object} obj - * @return {Object} - * @api private - */ - -exports.pause = exports.brokenPause - ? require('pause') - : function () { - return { - end: noop, - resume: noop - } - } - -/** - * Strip `Content-*` headers from `res`. - * - * @param {ServerResponse} res - * @api private - */ - -exports.removeContentHeaders = function(res){ - if (!res._headers) return; - Object.keys(res._headers).forEach(function(field){ - if (0 == field.indexOf('content')) { - res.removeHeader(field); - } - }); -}; - -/** - * Check if `req` is a conditional GET request. - * - * @param {IncomingMessage} req - * @return {Boolean} - * @api private - */ - -exports.conditionalGET = function(req) { - return req.headers['if-modified-since'] - || req.headers['if-none-match']; -}; - -/** - * Respond with 401 "Unauthorized". - * - * @param {ServerResponse} res - * @param {String} realm - * @api private - */ - -exports.unauthorized = function(res, realm) { - res.statusCode = 401; - res.setHeader('WWW-Authenticate', 'Basic realm="' + realm + '"'); - res.end('Unauthorized'); -}; - -/** - * Respond with 304 "Not Modified". - * - * @param {ServerResponse} res - * @param {Object} headers - * @api private - */ - -exports.notModified = function(res) { - exports.removeContentHeaders(res); - res.statusCode = 304; - res.end(); -}; - -/** - * Return an ETag in the form of `"-"` - * from the given `stat`. - * - * @param {Object} stat - * @return {String} - * @api private - */ - -exports.etag = function(stat) { - return '"' + stat.size + '-' + Number(stat.mtime) + '"'; -}; - -/** - * Parse the given Cache-Control `str`. - * - * @param {String} str - * @return {Object} - * @api private - */ - -exports.parseCacheControl = function(str){ - var directives = str.split(',') - , obj = {}; - - for(var i = 0, len = directives.length; i < len; i++) { - var parts = directives[i].split('=') - , key = parts.shift().trim() - , val = parseInt(parts.shift(), 10); - - obj[key] = isNaN(val) ? true : val; - } - - return obj; -}; - -/** - * Parse the `req` url with memoization. - * - * @param {ServerRequest} req - * @return {Object} - * @api private - */ - -exports.parseUrl = function(req){ - var parsed = req._parsedUrl; - if (parsed && parsed.href == req.url) { - return parsed; - } else { - parsed = parse(req.url); - - if (parsed.auth && !parsed.protocol && ~parsed.href.indexOf('//')) { - // This parses pathnames, and a strange pathname like //r@e should work - parsed = parse(req.url.replace(/@/g, '%40')); - } - - return req._parsedUrl = parsed; - } -}; - -/** - * Parse byte `size` string. - * - * @param {String} size - * @return {Number} - * @api private - */ - -exports.parseBytes = require('bytes'); - -/** - * Normalizes the path separator from system separator - * to URL separator, aka `/`. - * - * @param {String} path - * @return {String} - * @api private - */ - -exports.normalizeSlashes = function normalizeSlashes(path) { - return path.split(sep).join('/'); -}; - -function noop() {} diff --git a/node_modules/express/node_modules/connect/node_modules/batch/.npmignore b/node_modules/express/node_modules/connect/node_modules/batch/.npmignore deleted file mode 100644 index f1250e58..00000000 --- a/node_modules/express/node_modules/connect/node_modules/batch/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/node_modules/express/node_modules/connect/node_modules/batch/History.md b/node_modules/express/node_modules/connect/node_modules/batch/History.md deleted file mode 100644 index b1b77526..00000000 --- a/node_modules/express/node_modules/connect/node_modules/batch/History.md +++ /dev/null @@ -1,66 +0,0 @@ - -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/node_modules/express/node_modules/connect/node_modules/batch/Makefile b/node_modules/express/node_modules/connect/node_modules/batch/Makefile deleted file mode 100644 index 634e3721..00000000 --- a/node_modules/express/node_modules/connect/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/node_modules/express/node_modules/connect/node_modules/batch/Readme.md b/node_modules/express/node_modules/connect/node_modules/batch/Readme.md deleted file mode 100644 index f2345c67..00000000 --- a/node_modules/express/node_modules/connect/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/node_modules/express/node_modules/connect/node_modules/batch/component.json b/node_modules/express/node_modules/connect/node_modules/batch/component.json deleted file mode 100644 index 0ea7e582..00000000 --- a/node_modules/express/node_modules/connect/node_modules/batch/component.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "batch", - "repo": "visionmedia/batch", - "description": "Async task batching", - "version": "0.5.0", - "keywords": ["batch", "async", "utility", "concurrency", "concurrent"], - "dependencies": { - "component/emitter": "*" - }, - "development": {}, - "scripts": [ - "index.js" - ] -} diff --git a/node_modules/express/node_modules/connect/node_modules/batch/index.js b/node_modules/express/node_modules/connect/node_modules/batch/index.js deleted file mode 100644 index 932d4045..00000000 --- a/node_modules/express/node_modules/connect/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/node_modules/express/node_modules/connect/node_modules/batch/package.json b/node_modules/express/node_modules/connect/node_modules/batch/package.json deleted file mode 100644 index 4c2c1758..00000000 --- a/node_modules/express/node_modules/connect/node_modules/batch/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "batch", - "version": "0.5.0", - "description": "Simple async batch", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "main": "index", - "readme": "\n# batch\n\n Simple async batch with concurrency control and progress reporting.\n\n## Installation\n\n```\n$ npm install batch\n```\n\n## API\n\n```js\nvar Batch = require('batch')\n , batch = new Batch;\n\nbatch.concurrency(4);\n\nids.forEach(function(id){\n batch.push(function(done){\n User.get(id, done);\n });\n});\n\nbatch.on('progress', function(e){\n\n});\n\nbatch.end(function(err, users){\n\n});\n```\n\n### Progress events\n\n Contain the \"job\" index, response value, duration information, and completion data.\n\n```js\n{ index: 1,\n value: 'bar',\n pending: 2,\n total: 3,\n complete: 2,\n percent: 66,\n start: Thu Oct 04 2012 12:25:53 GMT-0700 (PDT),\n end: Thu Oct 04 2012 12:25:53 GMT-0700 (PDT),\n duration: 0 }\n```\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2013 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "_id": "batch@0.5.0", - "dist": { - "shasum": "4f41ac9cbe3be6cd5aaa900854ac3ce7b627fa21" - }, - "_from": "batch@0.5.0", - "_resolved": "https://registry.npmjs.org/batch/-/batch-0.5.0.tgz" -} diff --git a/node_modules/express/node_modules/connect/node_modules/bytes/.npmignore b/node_modules/express/node_modules/connect/node_modules/bytes/.npmignore deleted file mode 100644 index 9daeafb9..00000000 --- a/node_modules/express/node_modules/connect/node_modules/bytes/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test diff --git a/node_modules/express/node_modules/connect/node_modules/bytes/History.md b/node_modules/express/node_modules/connect/node_modules/bytes/History.md deleted file mode 100644 index f233ed16..00000000 --- a/node_modules/express/node_modules/connect/node_modules/bytes/History.md +++ /dev/null @@ -1,15 +0,0 @@ - -0.2.1 / 2013-04-01 -================== - - * add .component - -0.2.0 / 2012-10-28 -================== - - * bytes(200).should.eql('200b') - -0.1.0 / 2012-07-04 -================== - - * add bytes to string conversion [yields] diff --git a/node_modules/express/node_modules/connect/node_modules/bytes/Makefile b/node_modules/express/node_modules/connect/node_modules/bytes/Makefile deleted file mode 100644 index 8e8640f2..00000000 --- a/node_modules/express/node_modules/connect/node_modules/bytes/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --reporter spec \ - --require should - -.PHONY: test \ No newline at end of file diff --git a/node_modules/express/node_modules/connect/node_modules/bytes/Readme.md b/node_modules/express/node_modules/connect/node_modules/bytes/Readme.md deleted file mode 100644 index 9325d5bf..00000000 --- a/node_modules/express/node_modules/connect/node_modules/bytes/Readme.md +++ /dev/null @@ -1,51 +0,0 @@ -# node-bytes - - Byte string parser / formatter. - -## Example: - -```js -bytes('1kb') -// => 1024 - -bytes('2mb') -// => 2097152 - -bytes('1gb') -// => 1073741824 - -bytes(1073741824) -// => 1gb -``` - -## Installation - -``` -$ npm install bytes -$ component install visionmedia/bytes.js -``` - -## License - -(The MIT License) - -Copyright (c) 2012 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/node_modules/express/node_modules/connect/node_modules/bytes/component.json b/node_modules/express/node_modules/connect/node_modules/bytes/component.json deleted file mode 100644 index 2929c25d..00000000 --- a/node_modules/express/node_modules/connect/node_modules/bytes/component.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "bytes", - "description": "byte size string parser / serializer", - "keywords": ["bytes", "utility"], - "version": "0.2.1", - "scripts": ["index.js"] -} diff --git a/node_modules/express/node_modules/connect/node_modules/bytes/index.js b/node_modules/express/node_modules/connect/node_modules/bytes/index.js deleted file mode 100644 index 70b2e01a..00000000 --- a/node_modules/express/node_modules/connect/node_modules/bytes/index.js +++ /dev/null @@ -1,39 +0,0 @@ - -/** - * Parse byte `size` string. - * - * @param {String} size - * @return {Number} - * @api public - */ - -module.exports = function(size) { - if ('number' == typeof size) return convert(size); - var parts = size.match(/^(\d+(?:\.\d+)?) *(kb|mb|gb)$/) - , n = parseFloat(parts[1]) - , type = parts[2]; - - var map = { - kb: 1 << 10 - , mb: 1 << 20 - , gb: 1 << 30 - }; - - return map[type] * n; -}; - -/** - * convert bytes into string. - * - * @param {Number} b - bytes to convert - * @return {String} - * @api public - */ - -function convert (b) { - var gb = 1 << 30, mb = 1 << 20, kb = 1 << 10; - if (b >= gb) return (Math.round(b / gb * 100) / 100) + 'gb'; - if (b >= mb) return (Math.round(b / mb * 100) / 100) + 'mb'; - if (b >= kb) return (Math.round(b / kb * 100) / 100) + 'kb'; - return b + 'b'; -} diff --git a/node_modules/express/node_modules/connect/node_modules/bytes/package.json b/node_modules/express/node_modules/connect/node_modules/bytes/package.json deleted file mode 100644 index 601b1102..00000000 --- a/node_modules/express/node_modules/connect/node_modules/bytes/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "bytes", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - }, - "description": "byte size string parser / serializer", - "version": "0.2.1", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "component": { - "scripts": { - "bytes/index.js": "index.js" - } - }, - "readme": "# node-bytes\n\n Byte string parser / formatter.\n\n## Example:\n\n```js\nbytes('1kb')\n// => 1024\n\nbytes('2mb')\n// => 2097152\n\nbytes('1gb')\n// => 1073741824\n\nbytes(1073741824)\n// => 1gb\n```\n\n## Installation\n\n```\n$ npm install bytes\n$ component install visionmedia/bytes.js\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "_id": "bytes@0.2.1", - "dist": { - "shasum": "586572818c283774f959f5c5762ece7bdf522f03" - }, - "_from": "bytes@0.2.1", - "_resolved": "https://registry.npmjs.org/bytes/-/bytes-0.2.1.tgz" -} diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/.jshintrc b/node_modules/express/node_modules/connect/node_modules/multiparty/.jshintrc deleted file mode 100644 index a93b50cf..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/.jshintrc +++ /dev/null @@ -1,70 +0,0 @@ -{ - // Settings - "passfail" : false, // Stop on first error. - "maxerr" : 100, // Maximum errors before stopping. - - - // Predefined globals whom JSHint will ignore. - "browser" : false, // Standard browser globals e.g. `window`, `document`. - - "node" : true, - "rhino" : false, - "couch" : false, - "wsh" : false, // Windows Scripting Host. - - "jquery" : false, - "prototypejs" : false, - "mootools" : false, - "dojo" : false, - - - "predef" : [ - "describe", "it", "before", "after" - ], - - // Development. - "debug" : true, // Allow debugger statements e.g. browser breakpoints. - "devel" : true, // Allow development statements e.g. `console.log();`. - - - // EcmaScript 5. - "es5" : true, // Allow EcmaScript 5 syntax. - "strict" : false, // Require `use strict` pragma in every file. - "globalstrict" : true, // Allow global "use strict" (also enables 'strict'). - - - // The Good Parts. - "asi" : true, // Tolerate Automatic Semicolon Insertion (no semicolons). - "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons. - "laxcomma" : true, - "bitwise" : false, // Prohibit bitwise operators (&, |, ^, etc.). - "boss" : true, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments. - "curly" : false, // Require {} for every new block or scope. - "eqeqeq" : true, // Require triple equals i.e. `===`. - "eqnull" : true, // Tolerate use of `== null`. - "evil" : false, // Tolerate use of `eval`. - "expr" : false, // Tolerate `ExpressionStatement` as Programs. - "forin" : false, // Prohibt `for in` loops without `hasOwnProperty`. - "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` - "latedef" : false, // Prohibit variable use before definition. - "loopfunc" : false, // Allow functions to be defined within loops. - "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`. - "regexp" : false, // Prohibit `.` and `[^...]` in regular expressions. - "regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`. - "scripturl" : false, // Tolerate script-targeted URLs. - "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`. - "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`. - "undef" : true, // Require all non-global variables be declared before they are used. - - - // Persone styling prefrences. - "newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`. - "noempty" : true, // Prohibit use of empty blocks. - "nonew" : true, // Prohibit use of constructors for side-effects. - "nomen" : false, // Prohibit use of initial or trailing underbars in names. - "onevar" : false, // Allow only one `var` statement per function. - "plusplus" : false, // Prohibit use of `++` & `--`. - "sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`. - "trailing" : true, // Prohibit trailing whitespaces. - "white" : false // Check against strict whitespace and indentation rules. -} diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/.npmignore b/node_modules/express/node_modules/connect/node_modules/multiparty/.npmignore deleted file mode 100644 index 07e6e472..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/.npmignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/.travis.yml b/node_modules/express/node_modules/connect/node_modules/multiparty/.travis.yml deleted file mode 100644 index b1fc4b01..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" -before_script: - - ulimit -n 500 diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/CHANGELOG.md b/node_modules/express/node_modules/connect/node_modules/multiparty/CHANGELOG.md deleted file mode 100644 index ea54d9a1..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/CHANGELOG.md +++ /dev/null @@ -1,191 +0,0 @@ -### 2.2.0 - - * additional callback API to support multiple files with same field name - * fix assertion crash when max field count is exceeded - * fix assertion crash when client aborts an invalid request - * (>=v0.10 only) unpipe the request when an error occurs to save resources. - * update readable-stream to ~1.1.9 - * fix assertion crash when EMFILE occurrs - * (no more assertions - only 'error' events) - -### 2.1.9 - - * relax content-type detection regex. (thanks amitaibu) - -### 2.1.8 - - * replace deprecated Buffer.write(). (thanks hueniverse) - -### 2.1.7 - - * add repository field to package.json - -### 2.1.6 - - * expose `hash` as an option to `Form`. (thanks wookiehangover) - -### 2.1.5 - - * fix possible 'close' event before all temp files are done - -### 2.1.4 - - * fix crash for invalid requests - -### 2.1.3 - - * add `file.size` - -### 2.1.2 - - * proper backpressure support - * update s3 example - -### 2.1.1 - - * fix uploads larger than 2KB - * fix both s3 and upload example - * add part.byteCount and part.byteOffset - -### 2.1.0 (recalled) - - * Complete rewrite. See README for changes and new API. - -### v1.0.13 - -* Only update hash if update method exists (Sven Lito) -* According to travis v0.10 needs to go quoted (Sven Lito) -* Bumping build node versions (Sven Lito) -* Additional fix for empty requests (Eugene Girshov) -* Change the default to 1000, to match the new Node behaviour. (OrangeDog) -* Add ability to control maxKeys in the querystring parser. (OrangeDog) -* Adjust test case to work with node 0.9.x (Eugene Girshov) -* Update package.json (Sven Lito) -* Path adjustment according to eb4468b (Markus Ast) - -### v1.0.12 - -* Emit error on aborted connections (Eugene Girshov) -* Add support for empty requests (Eugene Girshov) -* Fix name/filename handling in Content-Disposition (jesperp) -* Tolerate malformed closing boundary in multipart (Eugene Girshov) -* Ignore preamble in multipart messages (Eugene Girshov) -* Add support for application/json (Mike Frey, Carlos Rodriguez) -* Add support for Base64 encoding (Elmer Bulthuis) -* Add File#toJSON (TJ Holowaychuk) -* Remove support for Node.js 0.4 & 0.6 (Andrew Kelley) -* Documentation improvements (Sven Lito, Andre Azevedo) -* Add support for application/octet-stream (Ion Lupascu, Chris Scribner) -* Use os.tmpDir() to get tmp directory (Andrew Kelley) -* Improve package.json (Andrew Kelley, Sven Lito) -* Fix benchmark script (Andrew Kelley) -* Fix scope issue in incoming_forms (Sven Lito) -* Fix file handle leak on error (OrangeDog) - -### v1.0.11 - -* Calculate checksums for incoming files (sreuter) -* Add definition parameters to "IncomingForm" as an argument (Math-) - -### v1.0.10 - -* Make parts to be proper Streams (Matt Robenolt) - -### v1.0.9 - -* Emit progress when content length header parsed (Tim Koschützki) -* Fix Readme syntax due to GitHub changes (goob) -* Replace references to old 'sys' module in Readme with 'util' (Peter Sugihara) - -### v1.0.8 - -* Strip potentially unsafe characters when using `keepExtensions: true`. -* Switch to utest / urun for testing -* Add travis build - -### v1.0.7 - -* Remove file from package that was causing problems when installing on windows. (#102) -* Fix typos in Readme (Jason Davies). - -### v1.0.6 - -* Do not default to the default to the field name for file uploads where - filename="". - -### v1.0.5 - -* Support filename="" in multipart parts -* Explain unexpected end() errors in parser better - -**Note:** Starting with this version, formidable emits 'file' events for empty -file input fields. Previously those were incorrectly emitted as regular file -input fields with value = "". - -### v1.0.4 - -* Detect a good default tmp directory regardless of platform. (#88) - -### v1.0.3 - -* Fix problems with utf8 characters (#84) / semicolons in filenames (#58) -* Small performance improvements -* New test suite and fixture system - -### v1.0.2 - -* Exclude node\_modules folder from git -* Implement new `'aborted'` event -* Fix files in example folder to work with recent node versions -* Make gently a devDependency - -[See Commits](https://github.com/felixge/node-formidable/compare/v1.0.1...v1.0.2) - -### v1.0.1 - -* Fix package.json to refer to proper main directory. (#68, Dean Landolt) - -[See Commits](https://github.com/felixge/node-formidable/compare/v1.0.0...v1.0.1) - -### v1.0.0 - -* Add support for multipart boundaries that are quoted strings. (Jeff Craig) - -This marks the beginning of development on version 2.0 which will include -several architectural improvements. - -[See Commits](https://github.com/felixge/node-formidable/compare/v0.9.11...v1.0.0) - -### v0.9.11 - -* Emit `'progress'` event when receiving data, regardless of parsing it. (Tim Koschützki) -* Use [W3C FileAPI Draft](http://dev.w3.org/2006/webapi/FileAPI/) properties for File class - -**Important:** The old property names of the File class will be removed in a -future release. - -[See Commits](https://github.com/felixge/node-formidable/compare/v0.9.10...v0.9.11) - -### Older releases - -These releases were done before starting to maintain the above Changelog: - -* [v0.9.10](https://github.com/felixge/node-formidable/compare/v0.9.9...v0.9.10) -* [v0.9.9](https://github.com/felixge/node-formidable/compare/v0.9.8...v0.9.9) -* [v0.9.8](https://github.com/felixge/node-formidable/compare/v0.9.7...v0.9.8) -* [v0.9.7](https://github.com/felixge/node-formidable/compare/v0.9.6...v0.9.7) -* [v0.9.6](https://github.com/felixge/node-formidable/compare/v0.9.5...v0.9.6) -* [v0.9.5](https://github.com/felixge/node-formidable/compare/v0.9.4...v0.9.5) -* [v0.9.4](https://github.com/felixge/node-formidable/compare/v0.9.3...v0.9.4) -* [v0.9.3](https://github.com/felixge/node-formidable/compare/v0.9.2...v0.9.3) -* [v0.9.2](https://github.com/felixge/node-formidable/compare/v0.9.1...v0.9.2) -* [v0.9.1](https://github.com/felixge/node-formidable/compare/v0.9.0...v0.9.1) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.1.0](https://github.com/felixge/node-formidable/commits/v0.1.0) diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/LICENSE b/node_modules/express/node_modules/connect/node_modules/multiparty/LICENSE deleted file mode 100644 index 8488a405..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/LICENSE +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (C) 2011-2013 Felix Geisendörfer, Andrew Kelley - -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/node_modules/express/node_modules/connect/node_modules/multiparty/README.md b/node_modules/express/node_modules/connect/node_modules/multiparty/README.md deleted file mode 100644 index f149ac04..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/README.md +++ /dev/null @@ -1,177 +0,0 @@ -[![Build Status](https://travis-ci.org/superjoe30/node-multiparty.png?branch=master)](https://travis-ci.org/superjoe30/node-multiparty) -# multiparty - -Parse http requests with content-type `multipart/form-data`, also known as file uploads. - -See also [busboy](https://github.com/mscdex/busboy) - a -[faster](https://github.com/mscdex/dicer/wiki/Benchmarks) alternative -which may be worth looking into. - -### Why the fork? - - * This module uses the Node.js v0.10 streams properly, *even in Node.js v0.8* - * It will not create a temp file for you unless you want it to. - * Counts bytes and does math to help you figure out the `Content-Length` of - each part. - * You can easily stream uploads to s3 with - [knox](https://github.com/LearnBoost/knox), for [example](examples/s3.js). - * Less bugs. This code is simpler, has all deprecated functionality removed, - has cleaner tests, and does not try to do anything beyond multipart stream - parsing. - -## Installation - -``` -npm install multiparty -``` - -## Usage - - * See [examples](examples). - -Parse an incoming `multipart/form-data` request. - -```js -var multiparty = require('multiparty') - , http = require('http') - , util = require('util') - -http.createServer(function(req, res) { - if (req.url === '/upload' && req.method === 'POST') { - // parse a file upload - var form = new multiparty.Form(); - - form.parse(req, function(err, fields, files) { - res.writeHead(200, {'content-type': 'text/plain'}); - res.write('received upload:\n\n'); - res.end(util.inspect({fields: fields, files: files})); - }); - - return; - } - - // show a file upload form - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
    '+ - '
    '+ - '
    '+ - ''+ - '
    ' - ); -}).listen(8080); -``` - -## API - -### multiparty.Form -```js -var form = new multiparty.Form(options) -``` -Creates a new form. Options: - - * `encoding` - sets encoding for the incoming form fields. Defaults to `utf8`. - * `maxFieldSize` - Limits the amount of memory a field (not a file) can - allocate in bytes. If this value is exceeded, an `error` event is emitted. - The default size is 2MB. - * `maxFields` - Limits the number of fields that will be parsed before - emitting an `error` event. A file counts as a field in this case. - Defaults to 1000. - * `autoFields` - Enables `field` events. This is automatically set to `true` - if you add a `field` listener. - * `autoFiles` - Enables `file` events. This is automatically set to `true` - if you add a `file` listener. - * `uploadDir` - Only relevant when `autoFiles` is `true`. The directory for - placing file uploads in. You can move them later using `fs.rename()`. - Defaults to `os.tmpDir()`. - * `hash` - Only relevant when `autoFiles` is `true`. If you want checksums - calculated for incoming files, set this to either `sha1` or `md5`. - Defaults to off. - -#### form.parse(request, [cb]) - -Parses an incoming node.js `request` containing form data. If `cb` is -provided, `autoFields` and `autoFiles` are set to `true` and all fields and -files are collected and passed to the callback: - -```js -form.parse(req, function(err, fieldsObject, filesObject, fieldsList, filesList) { - // ... -}); -``` - -It is often convenient to access a field or file by name. In this situation, -use `fieldsObject` or `filesObject`. However sometimes, as in the case of a -`` the multipart stream will contain -multiple files of the same input name, and you are interested in all of them. -In this case, use `filesList`. - -Another example is when you do not care what the field name of a file is; you -are merely interested in a single upload. In this case, set `maxFields` to 1 -(assuming no other fields expected besides the file) and use `filesList[0]`. - -#### form.bytesReceived - -The amount of bytes received for this form so far. - -#### form.bytesExpected - -The expected number of bytes in this form. - -### Events - -#### 'error' (err) - -You definitely want to handle this event. If not your server *will* crash when -users submit bogus multipart requests! - -#### 'part' (part) - -Emitted when a part is encountered in the request. `part` is a -`ReadableStream`. It also has the following properties: - - * `headers` - the headers for this part. For example, you may be interested - in `content-type`. - * `name` - the field name for this part - * `filename` - only if the part is an incoming file - * `byteOffset` - the byte offset of this part in the request body - * `byteCount` - assuming that this is the last part in the request, - this is the size of this part in bytes. You could use this, for - example, to set the `Content-Length` header if uploading to S3. - If the part had a `Content-Length` header then that value is used - here instead. - -#### 'aborted' - -Emitted when the request is aborted. This event will be followed shortly -by an `error` event. In practice you do not need to handle this event. - -#### 'progress' (bytesReceived, bytesExpected) - -#### 'close' - -Emitted after all parts have been parsed and emitted. Not emitted if an `error` -event is emitted. This is typically when you would send your response. - -#### 'file' (name, file) - -**By default multiparty will not touch your hard drive.** But if you add this -listener, multiparty automatically sets `form.autoFiles` to `true` and will -stream uploads to disk for you. - - * `name` - the field name for this file - * `file` - an object with these properties: - - `fieldName` - same as `name` - the field name for this file - - `originalFilename` - the filename that the user reports for the file - - `path` - the absolute path of the uploaded file on disk - - `headers` - the HTTP headers that were sent along with this file - - `size` - size of the file in bytes - -If you set the `form.hash` option, then `file` will also contain a `hash` -property which is the checksum of the file. - -#### 'field' (name, value) - - * `name` - field name - * `value` - string field value - diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/examples/azureblobstorage.js b/node_modules/express/node_modules/connect/node_modules/multiparty/examples/azureblobstorage.js deleted file mode 100644 index 273c3321..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/examples/azureblobstorage.js +++ /dev/null @@ -1,41 +0,0 @@ -var http = require('http') - , util = require('util') - , multiparty = require('../') - , azure = require('azure') - , PORT = process.env.PORT || 27372 - -var server = http.createServer(function(req, res) { - if (req.url === '/') { - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
    '+ - '
    '+ - '
    '+ - ''+ - '
    ' - ); - } else if (req.url === '/upload') { - - var blobService = azure.createBlobService(); - var form = new multiparty.Form(); - form.on('part', function(part) { - if (!part.filename) return; - - var size = part.byteCount - part.byteOffset; - var name = part.filename; - var container = 'blobContainerName'; - - blobService.createBlockBlobFromStream(container, name, part, size, function(error) { - if (error) { - // error handling - } - }); - }); - form.parse(req); - - res.send('File uploaded successfully'); - } -}); -server.listen(PORT, function() { - console.info('listening on http://0.0.0.0:'+PORT+'/'); -}); diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/examples/s3.js b/node_modules/express/node_modules/connect/node_modules/multiparty/examples/s3.js deleted file mode 100644 index 60617ba2..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/examples/s3.js +++ /dev/null @@ -1,74 +0,0 @@ -var http = require('http') - , util = require('util') - , multiparty = require('../') - , knox = require('knox') - , Batch = require('batch') - , PORT = process.env.PORT || 27372 - -var s3Client = knox.createClient({ - secure: false, - key: process.env.S3_KEY, - secret: process.env.S3_SECRET, - bucket: process.env.S3_BUCKET, -}); - -var server = http.createServer(function(req, res) { - if (req.url === '/') { - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
    '+ - '
    '+ - '
    '+ - ''+ - '
    ' - ); - } else if (req.url === '/upload') { - var headers = { - 'x-amz-acl': 'public-read', - }; - var form = new multiparty.Form(); - var batch = new Batch(); - batch.push(function(cb) { - form.on('field', function(name, value) { - if (name === 'path') { - var destPath = value; - if (destPath[0] !== '/') destPath = '/' + destPath; - cb(null, destPath); - } - }); - }); - batch.push(function(cb) { - form.on('part', function(part) { - if (! part.filename) return; - cb(null, part); - }); - }); - batch.end(function(err, results) { - if (err) throw err; - form.removeListener('close', onEnd); - var destPath = results[0] - , part = results[1]; - - headers['Content-Length'] = part.byteCount; - s3Client.putStream(part, destPath, headers, function(err, s3Response) { - if (err) throw err; - res.statusCode = s3Response.statusCode; - s3Response.pipe(res); - console.log("https://s3.amazonaws.com/" + process.env.S3_BUCKET + destPath); - }); - }); - form.on('close', onEnd); - form.parse(req); - - } else { - res.writeHead(404, {'content-type': 'text/plain'}); - res.end('404'); - } - - function onEnd() { - throw new Error("no uploaded file"); - } -}); -server.listen(PORT, function() { - console.info('listening on http://0.0.0.0:'+PORT+'/'); -}); diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/examples/upload.js b/node_modules/express/node_modules/connect/node_modules/multiparty/examples/upload.js deleted file mode 100644 index 5dd39268..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/examples/upload.js +++ /dev/null @@ -1,37 +0,0 @@ -var http = require('http') - , util = require('util') - , multiparty = require('../') - , PORT = process.env.PORT || 27372 - -var server = http.createServer(function(req, res) { - if (req.url === '/') { - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
    '+ - '
    '+ - '
    '+ - ''+ - '
    ' - ); - } else if (req.url === '/upload') { - var form = new multiparty.Form(); - - form.parse(req, function(err, fields, files) { - if (err) { - res.writeHead(400, {'content-type': 'text/plain'}); - res.end("invalid request: " + err.message); - return; - } - res.writeHead(200, {'content-type': 'text/plain'}); - res.write('received fields:\n\n '+util.inspect(fields)); - res.write('\n\n'); - res.end('received files:\n\n '+util.inspect(files)); - }); - } else { - res.writeHead(404, {'content-type': 'text/plain'}); - res.end('404'); - } -}); -server.listen(PORT, function() { - console.info('listening on http://0.0.0.0:'+PORT+'/'); -}); diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/index.js b/node_modules/express/node_modules/connect/node_modules/multiparty/index.js deleted file mode 100755 index 71c88ae3..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/index.js +++ /dev/null @@ -1,618 +0,0 @@ -exports.Form = Form; - -var stream = require('readable-stream') - , util = require('util') - , fs = require('fs') - , crypto = require('crypto') - , path = require('path') - , os = require('os') - , StringDecoder = require('string_decoder').StringDecoder - , StreamCounter = require('stream-counter') - -var START = 0 - , START_BOUNDARY = 1 - , HEADER_FIELD_START = 2 - , HEADER_FIELD = 3 - , HEADER_VALUE_START = 4 - , HEADER_VALUE = 5 - , HEADER_VALUE_ALMOST_DONE = 6 - , HEADERS_ALMOST_DONE = 7 - , PART_DATA_START = 8 - , PART_DATA = 9 - , PART_END = 10 - , END = 11 - - , LF = 10 - , CR = 13 - , SPACE = 32 - , HYPHEN = 45 - , COLON = 58 - , A = 97 - , Z = 122 - -var CONTENT_TYPE_RE = /^multipart\/(form-data|related);\s*boundary=(?:"([^"]+)"|([^;]+))$/i; -var FILE_EXT_RE = /(\.[_\-a-zA-Z0-9]{0,16}).*/; -var LAST_BOUNDARY_SUFFIX_LEN = 4; // --\r\n - -util.inherits(Form, stream.Writable); -function Form(options) { - var self = this; - stream.Writable.call(self); - - options = options || {}; - - self.error = null; - self.finished = false; - - self.autoFields = !!options.autoFields; - self.autoFiles = !!options.autoFields; - - self.maxFields = options.maxFields || 1000; - self.maxFieldsSize = options.maxFieldsSize || 2 * 1024 * 1024; - self.uploadDir = options.uploadDir || os.tmpDir(); - self.encoding = options.encoding || 'utf8'; - self.hash = options.hash || false; - - self.bytesReceived = 0; - self.bytesExpected = null; - - self.openedFiles = []; - self.totalFieldSize = 0; - self.totalFieldCount = 0; - self.flushing = 0; - - self.backpressure = false; - self.writeCbs = []; - - if (options.boundary) setUpParser(self, options.boundary); - - self.on('newListener', function(eventName) { - if (eventName === 'file') { - self.autoFiles = true; - } else if (eventName === 'field') { - self.autoFields = true; - } - }); -} - -Form.prototype.parse = function(req, cb) { - var self = this; - - // if the user supplies a callback, this implies autoFields and autoFiles - if (cb) { - self.autoFields = true; - self.autoFiles = true; - } - - self.handleError = handleError; - self.bytesExpected = getBytesExpected(req.headers); - - req.on('error', handleError); - req.on('aborted', onReqAborted); - - var contentType = req.headers['content-type']; - if (!contentType) { - handleError(new Error('missing content-type header')); - return; - } - - var m = contentType.match(CONTENT_TYPE_RE); - if (!m) { - handleError(new Error('unrecognized content-type: ' + contentType)); - return; - } - var boundary = m[2] || m[3]; - setUpParser(self, boundary); - req.pipe(self); - - if (cb) { - var fieldsTable = {}; - var filesTable = {}; - var fieldsList = []; - var filesList = []; - self.on('error', function(err) { - cb(err); - }); - self.on('field', function(name, value) { - fieldsTable[name] = value; - fieldsList.push({name: name, value: value}); - }); - self.on('file', function(name, file) { - filesTable[name] = file; - filesList.push(file); - }); - self.on('close', function() { - cb(null, fieldsTable, filesTable, fieldsList, filesList); - }); - } - - function onReqAborted() { - self.emit('aborted'); - handleError(new Error("Request aborted")); - } - - function handleError(err) { - var first = !self.error; - if (first) { - self.error = err; - req.removeListener('aborted', onReqAborted); - - // welp. 0.8 doesn't support unpipe, too bad so sad. - // let's drop support for 0.8 soon. - if (req.unpipe) { - req.unpipe(self); - } - } - - self.openedFiles.forEach(function(file) { - file.ws.destroy(); - fs.unlink(file.path, function(err) { - // this is already an error condition, ignore 2nd error - }); - }); - self.openedFiles = []; - - if (first) { - self.emit('error', err); - } - } - -}; - -Form.prototype._write = function(buffer, encoding, cb) { - var self = this - , i = 0 - , len = buffer.length - , prevIndex = self.index - , index = self.index - , state = self.state - , lookbehind = self.lookbehind - , boundary = self.boundary - , boundaryChars = self.boundaryChars - , boundaryLength = self.boundary.length - , boundaryEnd = boundaryLength - 1 - , bufferLength = buffer.length - , c - , cl - - for (i = 0; i < len; i++) { - c = buffer[i]; - switch (state) { - case START: - index = 0; - state = START_BOUNDARY; - /* falls through */ - case START_BOUNDARY: - if (index === boundaryLength - 2) { - if (c !== CR) return self.handleError(new Error("Expected CR Received " + c)); - index++; - break; - } else if (index === boundaryLength - 1) { - if (c !== LF) return self.handleError(new Error("Expected LF Received " + c)); - index = 0; - self.onParsePartBegin(); - state = HEADER_FIELD_START; - break; - } - - if (c !== boundary[index+2]) index = -2; - if (c === boundary[index+2]) index++; - break; - case HEADER_FIELD_START: - state = HEADER_FIELD; - self.headerFieldMark = i; - index = 0; - /* falls through */ - case HEADER_FIELD: - if (c === CR) { - self.headerFieldMark = null; - state = HEADERS_ALMOST_DONE; - break; - } - - index++; - if (c === HYPHEN) break; - - if (c === COLON) { - if (index === 1) { - // empty header field - self.handleError(new Error("Empty header field")); - return; - } - self.onParseHeaderField(buffer.slice(self.headerFieldMark, i)); - self.headerFieldMark = null; - state = HEADER_VALUE_START; - break; - } - - cl = lower(c); - if (cl < A || cl > Z) { - self.handleError(new Error("Expected alphabetic character, received " + c)); - return; - } - break; - case HEADER_VALUE_START: - if (c === SPACE) break; - - self.headerValueMark = i; - state = HEADER_VALUE; - /* falls through */ - case HEADER_VALUE: - if (c === CR) { - self.onParseHeaderValue(buffer.slice(self.headerValueMark, i)); - self.headerValueMark = null; - self.onParseHeaderEnd(); - state = HEADER_VALUE_ALMOST_DONE; - } - break; - case HEADER_VALUE_ALMOST_DONE: - if (c !== LF) return self.handleError(new Error("Expected LF Received " + c)); - state = HEADER_FIELD_START; - break; - case HEADERS_ALMOST_DONE: - if (c !== LF) return self.handleError(new Error("Expected LF Received " + c)); - var err = self.onParseHeadersEnd(i + 1); - if (err) return self.handleError(err); - state = PART_DATA_START; - break; - case PART_DATA_START: - state = PART_DATA; - self.partDataMark = i; - /* falls through */ - case PART_DATA: - prevIndex = index; - - if (index === 0) { - // boyer-moore derrived algorithm to safely skip non-boundary data - i += boundaryEnd; - while (i < bufferLength && !(buffer[i] in boundaryChars)) { - i += boundaryLength; - } - i -= boundaryEnd; - c = buffer[i]; - } - - if (index < boundaryLength) { - if (boundary[index] === c) { - if (index === 0) { - self.onParsePartData(buffer.slice(self.partDataMark, i)); - self.partDataMark = null; - } - index++; - } else { - index = 0; - } - } else if (index === boundaryLength) { - index++; - if (c === CR) { - // CR = part boundary - self.partBoundaryFlag = true; - } else if (c === HYPHEN) { - // HYPHEN = end boundary - self.lastBoundaryFlag = true; - } else { - index = 0; - } - } else if (index - 1 === boundaryLength) { - if (self.partBoundaryFlag) { - index = 0; - if (c === LF) { - self.partBoundaryFlag = false; - self.onParsePartEnd(); - self.onParsePartBegin(); - state = HEADER_FIELD_START; - break; - } - } else if (self.lastBoundaryFlag) { - if (c === HYPHEN) { - self.onParsePartEnd(); - self.end(); - state = END; - } else { - index = 0; - } - } else { - index = 0; - } - } - - if (index > 0) { - // when matching a possible boundary, keep a lookbehind reference - // in case it turns out to be a false lead - lookbehind[index-1] = c; - } else if (prevIndex > 0) { - // if our boundary turned out to be rubbish, the captured lookbehind - // belongs to partData - self.onParsePartData(lookbehind.slice(0, prevIndex)); - prevIndex = 0; - self.partDataMark = i; - - // reconsider the current character even so it interrupted the sequence - // it could be the beginning of a new sequence - i--; - } - - break; - case END: - break; - default: - self.handleError(new Error("Parser has invalid state.")); - return; - } - } - - if (self.headerFieldMark != null) { - self.onParseHeaderField(buffer.slice(self.headerFieldMark)); - self.headerFieldMark = 0; - } - if (self.headerValueMark != null) { - self.onParseHeaderValue(buffer.slice(self.headerValueMark)); - self.headerValueMark = 0; - } - if (self.partDataMark != null) { - self.onParsePartData(buffer.slice(self.partDataMark)); - self.partDataMark = 0; - } - - self.index = index; - self.state = state; - - self.bytesReceived += buffer.length; - self.emit('progress', self.bytesReceived, self.bytesExpected); - - if (self.backpressure) { - self.writeCbs.push(cb); - } else { - cb(); - } -}; - -Form.prototype.onParsePartBegin = function() { - clearPartVars(this); -} - -Form.prototype.onParseHeaderField = function(b) { - this.headerField += this.headerFieldDecoder.write(b); -} - -Form.prototype.onParseHeaderValue = function(b) { - this.headerValue += this.headerValueDecoder.write(b); -} - -Form.prototype.onParseHeaderEnd = function() { - this.headerField = this.headerField.toLowerCase(); - this.partHeaders[this.headerField] = this.headerValue; - - var m; - if (this.headerField === 'content-disposition') { - if (m = this.headerValue.match(/\bname="([^"]+)"/i)) { - this.partName = m[1]; - } - this.partFilename = parseFilename(this.headerValue); - } else if (this.headerField === 'content-transfer-encoding') { - this.partTransferEncoding = this.headerValue.toLowerCase(); - } - - this.headerFieldDecoder = new StringDecoder(this.encoding); - this.headerField = ''; - this.headerValueDecoder = new StringDecoder(this.encoding); - this.headerValue = ''; -} - -Form.prototype.onParsePartData = function(b) { - if (this.partTransferEncoding === 'base64') { - this.backpressure = ! this.destStream.write(b.toString('ascii'), 'base64'); - } else { - this.backpressure = ! this.destStream.write(b); - } -} - -Form.prototype.onParsePartEnd = function() { - if (this.destStream) { - flushWriteCbs(this); - var s = this.destStream; - process.nextTick(function() { - s.end(); - }); - } - clearPartVars(this); -} - -Form.prototype.onParseHeadersEnd = function(offset) { - var self = this; - switch(self.partTransferEncoding){ - case 'binary': - case '7bit': - case '8bit': - self.partTransferEncoding = 'binary'; - break; - - case 'base64': break; - default: - return new Error("unknown transfer-encoding: " + self.partTransferEncoding); - } - - self.totalFieldCount += 1; - if (self.totalFieldCount >= self.maxFields) { - return new Error("maxFields " + self.maxFields + " exceeded."); - } - - self.destStream = new stream.PassThrough(); - self.destStream.on('drain', function() { - flushWriteCbs(self); - }); - self.destStream.headers = self.partHeaders; - self.destStream.name = self.partName; - self.destStream.filename = self.partFilename; - self.destStream.byteOffset = self.bytesReceived + offset; - var partContentLength = self.destStream.headers['content-length']; - self.destStream.byteCount = partContentLength ? - parseInt(partContentLength, 10) : - (self.bytesExpected - self.destStream.byteOffset - - self.boundary.length - LAST_BOUNDARY_SUFFIX_LEN); - - self.emit('part', self.destStream); - if (self.destStream.filename == null && self.autoFields) { - handleField(self, self.destStream); - } else if (self.destStream.filename != null && self.autoFiles) { - handleFile(self, self.destStream); - } -} - -function flushWriteCbs(self) { - self.writeCbs.forEach(function(cb) { - process.nextTick(cb); - }); - self.writeCbs = []; - self.backpressure = false; -} - -function getBytesExpected(headers) { - var contentLength = headers['content-length']; - if (contentLength) { - return parseInt(contentLength, 10); - } else if (headers['transfer-encoding'] == null) { - return 0; - } else { - return null; - } -} - -function beginFlush(self) { - self.flushing += 1; -} - -function endFlush(self) { - self.flushing -= 1; - maybeClose(self); -} - -function maybeClose(self) { - if (!self.flushing && self.finished && !self.error) { - self.emit('close'); - } -} - -function handleFile(self, fileStream) { - beginFlush(self); - var file = { - fieldName: fileStream.name, - originalFilename: fileStream.filename, - path: uploadPath(self.uploadDir, fileStream.filename), - headers: fileStream.headers, - }; - file.ws = fs.createWriteStream(file.path); - self.openedFiles.push(file); - fileStream.pipe(file.ws); - var counter = new StreamCounter(); - fileStream.pipe(counter); - var hashWorkaroundStream - , hash = null; - if (self.hash) { - // workaround stream because https://github.com/joyent/node/issues/5216 - hashWorkaroundStream = stream.Writable(); - hash = crypto.createHash(self.hash); - hashWorkaroundStream._write = function(buffer, encoding, callback) { - hash.update(buffer); - callback(); - }; - fileStream.pipe(hashWorkaroundStream); - } - file.ws.on('error', function(err) { - if (!self.error) self.handleError(err); - }); - file.ws.on('close', function() { - if (hash) file.hash = hash.digest('hex'); - file.size = counter.bytes; - self.emit('file', fileStream.name, file); - endFlush(self); - }); -} - -function handleField(self, fieldStream) { - var value = ''; - var decoder = new StringDecoder(self.encoding); - - beginFlush(self); - fieldStream.on('readable', function() { - var buffer = fieldStream.read(); - if (!buffer) return; - - self.totalFieldSize += buffer.length; - if (self.totalFieldSize > self.maxFieldsSize) { - self.handleError(new Error("maxFieldsSize " + self.maxFieldsSize + " exceeded")); - return; - } - value += decoder.write(buffer); - }); - - fieldStream.on('end', function() { - self.emit('field', fieldStream.name, value); - endFlush(self); - }); -} - -function clearPartVars(self) { - self.partHeaders = {}; - self.partName = null; - self.partFilename = null; - self.partTransferEncoding = 'binary'; - self.destStream = null; - - self.headerFieldDecoder = new StringDecoder(self.encoding); - self.headerField = ""; - self.headerValueDecoder = new StringDecoder(self.encoding); - self.headerValue = ""; -} - -function setUpParser(self, boundary) { - self.boundary = new Buffer(boundary.length + 4); - self.boundary.write('\r\n--', 0, boundary.length + 4, 'ascii'); - self.boundary.write(boundary, 4, boundary.length, 'ascii'); - self.lookbehind = new Buffer(self.boundary.length + 8); - self.state = START; - self.boundaryChars = {}; - for (var i = 0; i < self.boundary.length; i++) { - self.boundaryChars[self.boundary[i]] = true; - } - - self.index = null; - self.partBoundaryFlag = false; - self.lastBoundaryFlag = false; - - self.on('finish', function() { - if ((self.state === HEADER_FIELD_START && self.index === 0) || - (self.state === PART_DATA && self.index === self.boundary.length)) - { - self.onParsePartEnd(); - } else if (self.state !== END) { - self.handleError(new Error('stream ended unexpectedly')); - } - self.finished = true; - maybeClose(self); - }); -} - -function uploadPath(baseDir, filename) { - var ext = path.extname(filename).replace(FILE_EXT_RE, '$1'); - var name = process.pid + '-' + - (Math.random() * 0x100000000 + 1).toString(36) + ext; - return path.join(baseDir, name); -} - -function parseFilename(headerValue) { - var m = headerValue.match(/\bfilename="(.*?)"($|; )/i); - if (!m) return; - - var filename = m[1].substr(m[1].lastIndexOf('\\') + 1); - filename = filename.replace(/%22/g, '"'); - filename = filename.replace(/&#([\d]{4});/g, function(m, code) { - return String.fromCharCode(code); - }); - return filename; -} - -function lower(c) { - return c | 0x20; -} - diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/.npmignore b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/.npmignore deleted file mode 100644 index 38344f87..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js \ No newline at end of file diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/LICENSE b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/LICENSE deleted file mode 100644 index e3d4e695..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -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/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/README.md b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/README.md deleted file mode 100644 index be976683..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/README.md +++ /dev/null @@ -1,768 +0,0 @@ -# readable-stream - -A new class of streams for Node.js - -This module provides the new Stream base classes introduced in Node -v0.10, for use in Node v0.8. You can use it to have programs that -have to work with node v0.8, while being forward-compatible for v0.10 -and beyond. When you drop support for v0.8, you can remove this -module, and only use the native streams. - -This is almost exactly the same codebase as appears in Node v0.10. -However: - -1. The exported object is actually the Readable class. Decorating the - native `stream` module would be global pollution. -2. In v0.10, you can safely use `base64` as an argument to - `setEncoding` in Readable streams. However, in v0.8, the - StringDecoder class has no `end()` method, which is problematic for - Base64. So, don't use that, because it'll break and be weird. - -Other than that, the API is the same as `require('stream')` in v0.10, -so the API docs are reproduced below. - ----------- - - Stability: 2 - Unstable - -A stream is an abstract interface implemented by various objects in -Node. For example a request to an HTTP server is a stream, as is -stdout. Streams are readable, writable, or both. All streams are -instances of [EventEmitter][] - -You can load the Stream base classes by doing `require('stream')`. -There are base classes provided for Readable streams, Writable -streams, Duplex streams, and Transform streams. - -## Compatibility - -In earlier versions of Node, the Readable stream interface was -simpler, but also less powerful and less useful. - -* Rather than waiting for you to call the `read()` method, `'data'` - events would start emitting immediately. If you needed to do some - I/O to decide how to handle data, then you had to store the chunks - in some kind of buffer so that they would not be lost. -* The `pause()` method was advisory, rather than guaranteed. This - meant that you still had to be prepared to receive `'data'` events - even when the stream was in a paused state. - -In Node v0.10, the Readable class described below was added. For -backwards compatibility with older Node programs, Readable streams -switch into "old mode" when a `'data'` event handler is added, or when -the `pause()` or `resume()` methods are called. The effect is that, -even if you are not using the new `read()` method and `'readable'` -event, you no longer have to worry about losing `'data'` chunks. - -Most programs will continue to function normally. However, this -introduces an edge case in the following conditions: - -* No `'data'` event handler is added. -* The `pause()` and `resume()` methods are never called. - -For example, consider the following code: - -```javascript -// WARNING! BROKEN! -net.createServer(function(socket) { - - // we add an 'end' method, but never consume the data - socket.on('end', function() { - // It will never get here. - socket.end('I got your message (but didnt read it)\n'); - }); - -}).listen(1337); -``` - -In versions of node prior to v0.10, the incoming message data would be -simply discarded. However, in Node v0.10 and beyond, the socket will -remain paused forever. - -The workaround in this situation is to call the `resume()` method to -trigger "old mode" behavior: - -```javascript -// Workaround -net.createServer(function(socket) { - - socket.on('end', function() { - socket.end('I got your message (but didnt read it)\n'); - }); - - // start the flow of data, discarding it. - socket.resume(); - -}).listen(1337); -``` - -In addition to new Readable streams switching into old-mode, pre-v0.10 -style streams can be wrapped in a Readable class using the `wrap()` -method. - -## Class: stream.Readable - - - -A `Readable Stream` has the following methods, members, and events. - -Note that `stream.Readable` is an abstract class designed to be -extended with an underlying implementation of the `_read(size)` -method. (See below.) - -### new stream.Readable([options]) - -* `options` {Object} - * `highWaterMark` {Number} The maximum number of bytes to store in - the internal buffer before ceasing to read from the underlying - resource. Default=16kb - * `encoding` {String} If specified, then buffers will be decoded to - strings using the specified encoding. Default=null - * `objectMode` {Boolean} Whether this stream should behave - as a stream of objects. Meaning that stream.read(n) returns - a single value instead of a Buffer of size n - -In classes that extend the Readable class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### readable.\_read(size) - -* `size` {Number} Number of bytes to read asynchronously - -Note: **This function should NOT be called directly.** It should be -implemented by child classes, and called by the internal Readable -class methods only. - -All Readable stream implementations must provide a `_read` method -to fetch data from the underlying resource. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -When data is available, put it into the read queue by calling -`readable.push(chunk)`. If `push` returns false, then you should stop -reading. When `_read` is called again, you should start pushing more -data. - -The `size` argument is advisory. Implementations where a "read" is a -single call that returns data can use this to know how much data to -fetch. Implementations where that is not relevant, such as TCP or -TLS, may ignore this argument, and simply provide data whenever it -becomes available. There is no need, for example to "wait" until -`size` bytes are available before calling `stream.push(chunk)`. - -### readable.push(chunk) - -* `chunk` {Buffer | null | String} Chunk of data to push into the read queue -* return {Boolean} Whether or not more pushes should be performed - -Note: **This function should be called by Readable implementors, NOT -by consumers of Readable subclasses.** The `_read()` function will not -be called again until at least one `push(chunk)` call is made. If no -data is available, then you MAY call `push('')` (an empty string) to -allow a future `_read` call, without adding any data to the queue. - -The `Readable` class works by putting data into a read queue to be -pulled out later by calling the `read()` method when the `'readable'` -event fires. - -The `push()` method will explicitly insert some data into the read -queue. If it is called with `null` then it will signal the end of the -data. - -In some cases, you may be wrapping a lower-level source which has some -sort of pause/resume mechanism, and a data callback. In those cases, -you could wrap the low-level source object by doing something like -this: - -```javascript -// source is an object with readStop() and readStart() methods, -// and an `ondata` member that gets called when it has data, and -// an `onend` member that gets called when the data is over. - -var stream = new Readable(); - -source.ondata = function(chunk) { - // if push() returns false, then we need to stop reading from source - if (!stream.push(chunk)) - source.readStop(); -}; - -source.onend = function() { - stream.push(null); -}; - -// _read will be called when the stream wants to pull more data in -// the advisory size argument is ignored in this case. -stream._read = function(n) { - source.readStart(); -}; -``` - -### readable.unshift(chunk) - -* `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue -* return {Boolean} Whether or not more pushes should be performed - -This is the corollary of `readable.push(chunk)`. Rather than putting -the data at the *end* of the read queue, it puts it at the *front* of -the read queue. - -This is useful in certain use-cases where a stream is being consumed -by a parser, which needs to "un-consume" some data that it has -optimistically pulled out of the source. - -```javascript -// A parser for a simple data protocol. -// The "header" is a JSON object, followed by 2 \n characters, and -// then a message body. -// -// Note: This can be done more simply as a Transform stream. See below. - -function SimpleProtocol(source, options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(options); - - Readable.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - - // source is a readable stream, such as a socket or file - this._source = source; - - var self = this; - source.on('end', function() { - self.push(null); - }); - - // give it a kick whenever the source is readable - // read(0) will not consume any bytes - source.on('readable', function() { - self.read(0); - }); - - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype = Object.create( - Readable.prototype, { constructor: { value: SimpleProtocol }}); - -SimpleProtocol.prototype._read = function(n) { - if (!this._inBody) { - var chunk = this._source.read(); - - // if the source doesn't have data, we don't have data yet. - if (chunk === null) - return this.push(''); - - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - this.push(''); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // now, because we got some extra data, unshift the rest - // back into the read queue so that our consumer will see it. - var b = chunk.slice(split); - this.unshift(b); - - // and let them know that we are done parsing the header. - this.emit('header', this.header); - } - } else { - // from there on, just provide the data to our consumer. - // careful not to push(null), since that would indicate EOF. - var chunk = this._source.read(); - if (chunk) this.push(chunk); - } -}; - -// Usage: -var parser = new SimpleProtocol(source); -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - -### readable.wrap(stream) - -* `stream` {Stream} An "old style" readable stream - -If you are using an older Node library that emits `'data'` events and -has a `pause()` method that is advisory only, then you can use the -`wrap()` method to create a Readable stream that uses the old stream -as its data source. - -For example: - -```javascript -var OldReader = require('./old-api-module.js').OldReader; -var oreader = new OldReader; -var Readable = require('stream').Readable; -var myReader = new Readable().wrap(oreader); - -myReader.on('readable', function() { - myReader.read(); // etc. -}); -``` - -### Event: 'readable' - -When there is data ready to be consumed, this event will fire. - -When this event emits, call the `read()` method to consume the data. - -### Event: 'end' - -Emitted when the stream has received an EOF (FIN in TCP terminology). -Indicates that no more `'data'` events will happen. If the stream is -also writable, it may be possible to continue writing. - -### Event: 'data' - -The `'data'` event emits either a `Buffer` (by default) or a string if -`setEncoding()` was used. - -Note that adding a `'data'` event listener will switch the Readable -stream into "old mode", where data is emitted as soon as it is -available, rather than waiting for you to call `read()` to consume it. - -### Event: 'error' - -Emitted if there was an error receiving data. - -### Event: 'close' - -Emitted when the underlying resource (for example, the backing file -descriptor) has been closed. Not all streams will emit this. - -### readable.setEncoding(encoding) - -Makes the `'data'` event emit a string instead of a `Buffer`. `encoding` -can be `'utf8'`, `'utf16le'` (`'ucs2'`), `'ascii'`, or `'hex'`. - -The encoding can also be set by specifying an `encoding` field to the -constructor. - -### readable.read([size]) - -* `size` {Number | null} Optional number of bytes to read. -* Return: {Buffer | String | null} - -Note: **This function SHOULD be called by Readable stream users.** - -Call this method to consume data once the `'readable'` event is -emitted. - -The `size` argument will set a minimum number of bytes that you are -interested in. If not set, then the entire content of the internal -buffer is returned. - -If there is no data to consume, or if there are fewer bytes in the -internal buffer than the `size` argument, then `null` is returned, and -a future `'readable'` event will be emitted when more is available. - -Calling `stream.read(0)` will always return `null`, and will trigger a -refresh of the internal buffer, but otherwise be a no-op. - -### readable.pipe(destination, [options]) - -* `destination` {Writable Stream} -* `options` {Object} Optional - * `end` {Boolean} Default=true - -Connects this readable stream to `destination` WriteStream. Incoming -data on this stream gets written to `destination`. Properly manages -back-pressure so that a slow destination will not be overwhelmed by a -fast readable stream. - -This function returns the `destination` stream. - -For example, emulating the Unix `cat` command: - - process.stdin.pipe(process.stdout); - -By default `end()` is called on the destination when the source stream -emits `end`, so that `destination` is no longer writable. Pass `{ end: -false }` as `options` to keep the destination stream open. - -This keeps `writer` open so that "Goodbye" can be written at the -end. - - reader.pipe(writer, { end: false }); - reader.on("end", function() { - writer.end("Goodbye\n"); - }); - -Note that `process.stderr` and `process.stdout` are never closed until -the process exits, regardless of the specified options. - -### readable.unpipe([destination]) - -* `destination` {Writable Stream} Optional - -Undo a previously established `pipe()`. If no destination is -provided, then all previously established pipes are removed. - -### readable.pause() - -Switches the readable stream into "old mode", where data is emitted -using a `'data'` event rather than being buffered for consumption via -the `read()` method. - -Ceases the flow of data. No `'data'` events are emitted while the -stream is in a paused state. - -### readable.resume() - -Switches the readable stream into "old mode", where data is emitted -using a `'data'` event rather than being buffered for consumption via -the `read()` method. - -Resumes the incoming `'data'` events after a `pause()`. - - -## Class: stream.Writable - - - -A `Writable` Stream has the following methods, members, and events. - -Note that `stream.Writable` is an abstract class designed to be -extended with an underlying implementation of the -`_write(chunk, encoding, cb)` method. (See below.) - -### new stream.Writable([options]) - -* `options` {Object} - * `highWaterMark` {Number} Buffer level when `write()` starts - returning false. Default=16kb - * `decodeStrings` {Boolean} Whether or not to decode strings into - Buffers before passing them to `_write()`. Default=true - -In classes that extend the Writable class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### writable.\_write(chunk, encoding, callback) - -* `chunk` {Buffer | String} The chunk to be written. Will always - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. Ignore chunk is a buffer. Note that chunk will - **always** be a buffer unless the `decodeStrings` option is - explicitly set to `false`. -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunk. - -All Writable stream implementations must provide a `_write` method to -send data to the underlying resource. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Writable -class methods only. - -Call the callback using the standard `callback(error)` pattern to -signal that the write completed successfully or with an error. - -If the `decodeStrings` flag is set in the constructor options, then -`chunk` may be a string rather than a Buffer, and `encoding` will -indicate the sort of string that it is. This is to support -implementations that have an optimized handling for certain string -data encodings. If you do not explicitly set the `decodeStrings` -option to `false`, then you can safely ignore the `encoding` argument, -and assume that `chunk` will always be a Buffer. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - - -### writable.write(chunk, [encoding], [callback]) - -* `chunk` {Buffer | String} Data to be written -* `encoding` {String} Optional. If `chunk` is a string, then encoding - defaults to `'utf8'` -* `callback` {Function} Optional. Called when this chunk is - successfully written. -* Returns {Boolean} - -Writes `chunk` to the stream. Returns `true` if the data has been -flushed to the underlying resource. Returns `false` to indicate that -the buffer is full, and the data will be sent out in the future. The -`'drain'` event will indicate when the buffer is empty again. - -The specifics of when `write()` will return false, is determined by -the `highWaterMark` option provided to the constructor. - -### writable.end([chunk], [encoding], [callback]) - -* `chunk` {Buffer | String} Optional final data to be written -* `encoding` {String} Optional. If `chunk` is a string, then encoding - defaults to `'utf8'` -* `callback` {Function} Optional. Called when the final chunk is - successfully written. - -Call this method to signal the end of the data being written to the -stream. - -### Event: 'drain' - -Emitted when the stream's write queue empties and it's safe to write -without buffering again. Listen for it when `stream.write()` returns -`false`. - -### Event: 'close' - -Emitted when the underlying resource (for example, the backing file -descriptor) has been closed. Not all streams will emit this. - -### Event: 'finish' - -When `end()` is called and there are no more chunks to write, this -event is emitted. - -### Event: 'pipe' - -* `source` {Readable Stream} - -Emitted when the stream is passed to a readable stream's pipe method. - -### Event 'unpipe' - -* `source` {Readable Stream} - -Emitted when a previously established `pipe()` is removed using the -source Readable stream's `unpipe()` method. - -## Class: stream.Duplex - - - -A "duplex" stream is one that is both Readable and Writable, such as a -TCP socket connection. - -Note that `stream.Duplex` is an abstract class designed to be -extended with an underlying implementation of the `_read(size)` -and `_write(chunk, encoding, callback)` methods as you would with a Readable or -Writable stream class. - -Since JavaScript doesn't have multiple prototypal inheritance, this -class prototypally inherits from Readable, and then parasitically from -Writable. It is thus up to the user to implement both the lowlevel -`_read(n)` method as well as the lowlevel `_write(chunk, encoding, cb)` method -on extension duplex classes. - -### new stream.Duplex(options) - -* `options` {Object} Passed to both Writable and Readable - constructors. Also has the following fields: - * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then - the stream will automatically end the readable side when the - writable side ends and vice versa. - -In classes that extend the Duplex class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -## Class: stream.Transform - -A "transform" stream is a duplex stream where the output is causally -connected in some way to the input, such as a zlib stream or a crypto -stream. - -There is no requirement that the output be the same size as the input, -the same number of chunks, or arrive at the same time. For example, a -Hash stream will only ever have a single chunk of output which is -provided when the input is ended. A zlib stream will either produce -much smaller or much larger than its input. - -Rather than implement the `_read()` and `_write()` methods, Transform -classes must implement the `_transform()` method, and may optionally -also implement the `_flush()` method. (See below.) - -### new stream.Transform([options]) - -* `options` {Object} Passed to both Writable and Readable - constructors. - -In classes that extend the Transform class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### transform.\_transform(chunk, encoding, callback) - -* `chunk` {Buffer | String} The chunk to be transformed. Will always - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. (Ignore if `decodeStrings` chunk is a buffer.) -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunk. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Transform -class methods only. - -All Transform stream implementations must provide a `_transform` -method to accept input and produce output. - -`_transform` should do whatever has to be done in this specific -Transform class, to handle the bytes being written, and pass them off -to the readable portion of the interface. Do asynchronous I/O, -process things, and so on. - -Call `transform.push(outputChunk)` 0 or more times to generate output -from this input chunk, depending on how much data you want to output -as a result of this chunk. - -Call the callback function only when the current chunk is completely -consumed. Note that there may or may not be output as a result of any -particular input chunk. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -### transform.\_flush(callback) - -* `callback` {Function} Call this function (optionally with an error - argument) when you are done flushing any remaining data. - -Note: **This function MUST NOT be called directly.** It MAY be implemented -by child classes, and if so, will be called by the internal Transform -class methods only. - -In some cases, your transform operation may need to emit a bit more -data at the end of the stream. For example, a `Zlib` compression -stream will store up some internal state so that it can optimally -compress the output. At the end, however, it needs to do the best it -can with what is left, so that the data will be complete. - -In those cases, you can implement a `_flush` method, which will be -called at the very end, after all the written data is consumed, but -before emitting `end` to signal the end of the readable side. Just -like with `_transform`, call `transform.push(chunk)` zero or more -times, as appropriate, and call `callback` when the flush operation is -complete. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -### Example: `SimpleProtocol` parser - -The example above of a simple protocol parser can be implemented much -more simply by using the higher level `Transform` stream class. - -In this example, rather than providing the input as an argument, it -would be piped into the parser, which is a more idiomatic Node stream -approach. - -```javascript -function SimpleProtocol(options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(options); - - Transform.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype = Object.create( - Transform.prototype, { constructor: { value: SimpleProtocol }}); - -SimpleProtocol.prototype._transform = function(chunk, encoding, done) { - if (!this._inBody) { - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // and let them know that we are done parsing the header. - this.emit('header', this.header); - - // now, because we got some extra data, emit this first. - this.push(b); - } - } else { - // from there on, just provide the data to our consumer as-is. - this.push(b); - } - done(); -}; - -var parser = new SimpleProtocol(); -source.pipe(parser) - -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - - -## Class: stream.PassThrough - -This is a trivial implementation of a `Transform` stream that simply -passes the input bytes across to the output. Its purpose is mainly -for examples and testing, but there are occasionally use cases where -it can come in handy. - - -[EventEmitter]: events.html#events_class_events_eventemitter diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/duplex.js b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af8..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/float.patch b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/float.patch deleted file mode 100644 index b984607a..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/float.patch +++ /dev/null @@ -1,923 +0,0 @@ -diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js -index c5a741c..a2e0d8e 100644 ---- a/lib/_stream_duplex.js -+++ b/lib/_stream_duplex.js -@@ -26,8 +26,8 @@ - - module.exports = Duplex; - var util = require('util'); --var Readable = require('_stream_readable'); --var Writable = require('_stream_writable'); -+var Readable = require('./_stream_readable'); -+var Writable = require('./_stream_writable'); - - util.inherits(Duplex, Readable); - -diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js -index a5e9864..330c247 100644 ---- a/lib/_stream_passthrough.js -+++ b/lib/_stream_passthrough.js -@@ -25,7 +25,7 @@ - - module.exports = PassThrough; - --var Transform = require('_stream_transform'); -+var Transform = require('./_stream_transform'); - var util = require('util'); - util.inherits(PassThrough, Transform); - -diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js -index 0c3fe3e..90a8298 100644 ---- a/lib/_stream_readable.js -+++ b/lib/_stream_readable.js -@@ -23,10 +23,34 @@ module.exports = Readable; - Readable.ReadableState = ReadableState; - - var EE = require('events').EventEmitter; -+if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { -+ return emitter.listeners(type).length; -+}; -+ -+if (!global.setImmediate) global.setImmediate = function setImmediate(fn) { -+ return setTimeout(fn, 0); -+}; -+if (!global.clearImmediate) global.clearImmediate = function clearImmediate(i) { -+ return clearTimeout(i); -+}; -+ - var Stream = require('stream'); - var util = require('util'); -+if (!util.isUndefined) { -+ var utilIs = require('core-util-is'); -+ for (var f in utilIs) { -+ util[f] = utilIs[f]; -+ } -+} - var StringDecoder; --var debug = util.debuglog('stream'); -+var debug; -+if (util.debuglog) -+ debug = util.debuglog('stream'); -+else try { -+ debug = require('debuglog')('stream'); -+} catch (er) { -+ debug = function() {}; -+} - - util.inherits(Readable, Stream); - -@@ -380,7 +404,7 @@ function chunkInvalid(state, chunk) { - - - function onEofChunk(stream, state) { -- if (state.decoder && !state.ended) { -+ if (state.decoder && !state.ended && state.decoder.end) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); -diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js -index b1f9fcc..b0caf57 100644 ---- a/lib/_stream_transform.js -+++ b/lib/_stream_transform.js -@@ -64,8 +64,14 @@ - - module.exports = Transform; - --var Duplex = require('_stream_duplex'); -+var Duplex = require('./_stream_duplex'); - var util = require('util'); -+if (!util.isUndefined) { -+ var utilIs = require('core-util-is'); -+ for (var f in utilIs) { -+ util[f] = utilIs[f]; -+ } -+} - util.inherits(Transform, Duplex); - - -diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js -index ba2e920..f49288b 100644 ---- a/lib/_stream_writable.js -+++ b/lib/_stream_writable.js -@@ -27,6 +27,12 @@ module.exports = Writable; - Writable.WritableState = WritableState; - - var util = require('util'); -+if (!util.isUndefined) { -+ var utilIs = require('core-util-is'); -+ for (var f in utilIs) { -+ util[f] = utilIs[f]; -+ } -+} - var Stream = require('stream'); - - util.inherits(Writable, Stream); -@@ -119,7 +125,7 @@ function WritableState(options, stream) { - function Writable(options) { - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. -- if (!(this instanceof Writable) && !(this instanceof Stream.Duplex)) -+ if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) - return new Writable(options); - - this._writableState = new WritableState(options, this); -diff --git a/test/simple/test-stream-big-push.js b/test/simple/test-stream-big-push.js -index e3787e4..8cd2127 100644 ---- a/test/simple/test-stream-big-push.js -+++ b/test/simple/test-stream-big-push.js -@@ -21,7 +21,7 @@ - - var common = require('../common'); - var assert = require('assert'); --var stream = require('stream'); -+var stream = require('../../'); - var str = 'asdfasdfasdfasdfasdf'; - - var r = new stream.Readable({ -diff --git a/test/simple/test-stream-end-paused.js b/test/simple/test-stream-end-paused.js -index bb73777..d40efc7 100644 ---- a/test/simple/test-stream-end-paused.js -+++ b/test/simple/test-stream-end-paused.js -@@ -25,7 +25,7 @@ var gotEnd = false; - - // Make sure we don't miss the end event for paused 0-length streams - --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - var stream = new Readable(); - var calledRead = false; - stream._read = function() { -diff --git a/test/simple/test-stream-pipe-after-end.js b/test/simple/test-stream-pipe-after-end.js -index b46ee90..0be8366 100644 ---- a/test/simple/test-stream-pipe-after-end.js -+++ b/test/simple/test-stream-pipe-after-end.js -@@ -22,8 +22,8 @@ - var common = require('../common'); - var assert = require('assert'); - --var Readable = require('_stream_readable'); --var Writable = require('_stream_writable'); -+var Readable = require('../../lib/_stream_readable'); -+var Writable = require('../../lib/_stream_writable'); - var util = require('util'); - - util.inherits(TestReadable, Readable); -diff --git a/test/simple/test-stream-pipe-cleanup.js b/test/simple/test-stream-pipe-cleanup.js -deleted file mode 100644 -index f689358..0000000 ---- a/test/simple/test-stream-pipe-cleanup.js -+++ /dev/null -@@ -1,122 +0,0 @@ --// Copyright Joyent, Inc. and other Node contributors. --// --// 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. -- --// This test asserts that Stream.prototype.pipe does not leave listeners --// hanging on the source or dest. -- --var common = require('../common'); --var stream = require('stream'); --var assert = require('assert'); --var util = require('util'); -- --function Writable() { -- this.writable = true; -- this.endCalls = 0; -- stream.Stream.call(this); --} --util.inherits(Writable, stream.Stream); --Writable.prototype.end = function() { -- this.endCalls++; --}; -- --Writable.prototype.destroy = function() { -- this.endCalls++; --}; -- --function Readable() { -- this.readable = true; -- stream.Stream.call(this); --} --util.inherits(Readable, stream.Stream); -- --function Duplex() { -- this.readable = true; -- Writable.call(this); --} --util.inherits(Duplex, Writable); -- --var i = 0; --var limit = 100; -- --var w = new Writable(); -- --var r; -- --for (i = 0; i < limit; i++) { -- r = new Readable(); -- r.pipe(w); -- r.emit('end'); --} --assert.equal(0, r.listeners('end').length); --assert.equal(limit, w.endCalls); -- --w.endCalls = 0; -- --for (i = 0; i < limit; i++) { -- r = new Readable(); -- r.pipe(w); -- r.emit('close'); --} --assert.equal(0, r.listeners('close').length); --assert.equal(limit, w.endCalls); -- --w.endCalls = 0; -- --r = new Readable(); -- --for (i = 0; i < limit; i++) { -- w = new Writable(); -- r.pipe(w); -- w.emit('close'); --} --assert.equal(0, w.listeners('close').length); -- --r = new Readable(); --w = new Writable(); --var d = new Duplex(); --r.pipe(d); // pipeline A --d.pipe(w); // pipeline B --assert.equal(r.listeners('end').length, 2); // A.onend, A.cleanup --assert.equal(r.listeners('close').length, 2); // A.onclose, A.cleanup --assert.equal(d.listeners('end').length, 2); // B.onend, B.cleanup --assert.equal(d.listeners('close').length, 3); // A.cleanup, B.onclose, B.cleanup --assert.equal(w.listeners('end').length, 0); --assert.equal(w.listeners('close').length, 1); // B.cleanup -- --r.emit('end'); --assert.equal(d.endCalls, 1); --assert.equal(w.endCalls, 0); --assert.equal(r.listeners('end').length, 0); --assert.equal(r.listeners('close').length, 0); --assert.equal(d.listeners('end').length, 2); // B.onend, B.cleanup --assert.equal(d.listeners('close').length, 2); // B.onclose, B.cleanup --assert.equal(w.listeners('end').length, 0); --assert.equal(w.listeners('close').length, 1); // B.cleanup -- --d.emit('end'); --assert.equal(d.endCalls, 1); --assert.equal(w.endCalls, 1); --assert.equal(r.listeners('end').length, 0); --assert.equal(r.listeners('close').length, 0); --assert.equal(d.listeners('end').length, 0); --assert.equal(d.listeners('close').length, 0); --assert.equal(w.listeners('end').length, 0); --assert.equal(w.listeners('close').length, 0); -diff --git a/test/simple/test-stream-pipe-error-handling.js b/test/simple/test-stream-pipe-error-handling.js -index c5d724b..c7d6b7d 100644 ---- a/test/simple/test-stream-pipe-error-handling.js -+++ b/test/simple/test-stream-pipe-error-handling.js -@@ -21,7 +21,7 @@ - - var common = require('../common'); - var assert = require('assert'); --var Stream = require('stream').Stream; -+var Stream = require('../../').Stream; - - (function testErrorListenerCatches() { - var source = new Stream(); -diff --git a/test/simple/test-stream-pipe-event.js b/test/simple/test-stream-pipe-event.js -index cb9d5fe..56f8d61 100644 ---- a/test/simple/test-stream-pipe-event.js -+++ b/test/simple/test-stream-pipe-event.js -@@ -20,7 +20,7 @@ - // USE OR OTHER DEALINGS IN THE SOFTWARE. - - var common = require('../common'); --var stream = require('stream'); -+var stream = require('../../'); - var assert = require('assert'); - var util = require('util'); - -diff --git a/test/simple/test-stream-push-order.js b/test/simple/test-stream-push-order.js -index f2e6ec2..a5c9bf9 100644 ---- a/test/simple/test-stream-push-order.js -+++ b/test/simple/test-stream-push-order.js -@@ -20,7 +20,7 @@ - // USE OR OTHER DEALINGS IN THE SOFTWARE. - - var common = require('../common.js'); --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - var assert = require('assert'); - - var s = new Readable({ -diff --git a/test/simple/test-stream-push-strings.js b/test/simple/test-stream-push-strings.js -index 06f43dc..1701a9a 100644 ---- a/test/simple/test-stream-push-strings.js -+++ b/test/simple/test-stream-push-strings.js -@@ -22,7 +22,7 @@ - var common = require('../common'); - var assert = require('assert'); - --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - var util = require('util'); - - util.inherits(MyStream, Readable); -diff --git a/test/simple/test-stream-readable-event.js b/test/simple/test-stream-readable-event.js -index ba6a577..a8e6f7b 100644 ---- a/test/simple/test-stream-readable-event.js -+++ b/test/simple/test-stream-readable-event.js -@@ -22,7 +22,7 @@ - var common = require('../common'); - var assert = require('assert'); - --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - - (function first() { - // First test, not reading when the readable is added. -diff --git a/test/simple/test-stream-readable-flow-recursion.js b/test/simple/test-stream-readable-flow-recursion.js -index 2891ad6..11689ba 100644 ---- a/test/simple/test-stream-readable-flow-recursion.js -+++ b/test/simple/test-stream-readable-flow-recursion.js -@@ -27,7 +27,7 @@ var assert = require('assert'); - // more data continuously, but without triggering a nextTick - // warning or RangeError. - --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - - // throw an error if we trigger a nextTick warning. - process.throwDeprecation = true; -diff --git a/test/simple/test-stream-unshift-empty-chunk.js b/test/simple/test-stream-unshift-empty-chunk.js -index 0c96476..7827538 100644 ---- a/test/simple/test-stream-unshift-empty-chunk.js -+++ b/test/simple/test-stream-unshift-empty-chunk.js -@@ -24,7 +24,7 @@ var assert = require('assert'); - - // This test verifies that stream.unshift(Buffer(0)) or - // stream.unshift('') does not set state.reading=false. --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - - var r = new Readable(); - var nChunks = 10; -diff --git a/test/simple/test-stream-unshift-read-race.js b/test/simple/test-stream-unshift-read-race.js -index 83fd9fa..17c18aa 100644 ---- a/test/simple/test-stream-unshift-read-race.js -+++ b/test/simple/test-stream-unshift-read-race.js -@@ -29,7 +29,7 @@ var assert = require('assert'); - // 3. push() after the EOF signaling null is an error. - // 4. _read() is not called after pushing the EOF null chunk. - --var stream = require('stream'); -+var stream = require('../../'); - var hwm = 10; - var r = stream.Readable({ highWaterMark: hwm }); - var chunks = 10; -@@ -51,7 +51,14 @@ r._read = function(n) { - - function push(fast) { - assert(!pushedNull, 'push() after null push'); -- var c = pos >= data.length ? null : data.slice(pos, pos + n); -+ var c; -+ if (pos >= data.length) -+ c = null; -+ else { -+ if (n + pos > data.length) -+ n = data.length - pos; -+ c = data.slice(pos, pos + n); -+ } - pushedNull = c === null; - if (fast) { - pos += n; -diff --git a/test/simple/test-stream-writev.js b/test/simple/test-stream-writev.js -index 5b49e6e..b5321f3 100644 ---- a/test/simple/test-stream-writev.js -+++ b/test/simple/test-stream-writev.js -@@ -22,7 +22,7 @@ - var common = require('../common'); - var assert = require('assert'); - --var stream = require('stream'); -+var stream = require('../../'); - - var queue = []; - for (var decode = 0; decode < 2; decode++) { -diff --git a/test/simple/test-stream2-basic.js b/test/simple/test-stream2-basic.js -index 3814bf0..248c1be 100644 ---- a/test/simple/test-stream2-basic.js -+++ b/test/simple/test-stream2-basic.js -@@ -21,7 +21,7 @@ - - - var common = require('../common.js'); --var R = require('_stream_readable'); -+var R = require('../../lib/_stream_readable'); - var assert = require('assert'); - - var util = require('util'); -diff --git a/test/simple/test-stream2-compatibility.js b/test/simple/test-stream2-compatibility.js -index 6cdd4e9..f0fa84b 100644 ---- a/test/simple/test-stream2-compatibility.js -+++ b/test/simple/test-stream2-compatibility.js -@@ -21,7 +21,7 @@ - - - var common = require('../common.js'); --var R = require('_stream_readable'); -+var R = require('../../lib/_stream_readable'); - var assert = require('assert'); - - var util = require('util'); -diff --git a/test/simple/test-stream2-finish-pipe.js b/test/simple/test-stream2-finish-pipe.js -index 39b274f..006a19b 100644 ---- a/test/simple/test-stream2-finish-pipe.js -+++ b/test/simple/test-stream2-finish-pipe.js -@@ -20,7 +20,7 @@ - // USE OR OTHER DEALINGS IN THE SOFTWARE. - - var common = require('../common.js'); --var stream = require('stream'); -+var stream = require('../../'); - var Buffer = require('buffer').Buffer; - - var r = new stream.Readable(); -diff --git a/test/simple/test-stream2-fs.js b/test/simple/test-stream2-fs.js -deleted file mode 100644 -index e162406..0000000 ---- a/test/simple/test-stream2-fs.js -+++ /dev/null -@@ -1,72 +0,0 @@ --// Copyright Joyent, Inc. and other Node contributors. --// --// 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. -- -- --var common = require('../common.js'); --var R = require('_stream_readable'); --var assert = require('assert'); -- --var fs = require('fs'); --var FSReadable = fs.ReadStream; -- --var path = require('path'); --var file = path.resolve(common.fixturesDir, 'x1024.txt'); -- --var size = fs.statSync(file).size; -- --var expectLengths = [1024]; -- --var util = require('util'); --var Stream = require('stream'); -- --util.inherits(TestWriter, Stream); -- --function TestWriter() { -- Stream.apply(this); -- this.buffer = []; -- this.length = 0; --} -- --TestWriter.prototype.write = function(c) { -- this.buffer.push(c.toString()); -- this.length += c.length; -- return true; --}; -- --TestWriter.prototype.end = function(c) { -- if (c) this.buffer.push(c.toString()); -- this.emit('results', this.buffer); --} -- --var r = new FSReadable(file); --var w = new TestWriter(); -- --w.on('results', function(res) { -- console.error(res, w.length); -- assert.equal(w.length, size); -- var l = 0; -- assert.deepEqual(res.map(function (c) { -- return c.length; -- }), expectLengths); -- console.log('ok'); --}); -- --r.pipe(w); -diff --git a/test/simple/test-stream2-httpclient-response-end.js b/test/simple/test-stream2-httpclient-response-end.js -deleted file mode 100644 -index 15cffc2..0000000 ---- a/test/simple/test-stream2-httpclient-response-end.js -+++ /dev/null -@@ -1,52 +0,0 @@ --// Copyright Joyent, Inc. and other Node contributors. --// --// 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. -- --var common = require('../common.js'); --var assert = require('assert'); --var http = require('http'); --var msg = 'Hello'; --var readable_event = false; --var end_event = false; --var server = http.createServer(function(req, res) { -- res.writeHead(200, {'Content-Type': 'text/plain'}); -- res.end(msg); --}).listen(common.PORT, function() { -- http.get({port: common.PORT}, function(res) { -- var data = ''; -- res.on('readable', function() { -- console.log('readable event'); -- readable_event = true; -- data += res.read(); -- }); -- res.on('end', function() { -- console.log('end event'); -- end_event = true; -- assert.strictEqual(msg, data); -- server.close(); -- }); -- }); --}); -- --process.on('exit', function() { -- assert(readable_event); -- assert(end_event); --}); -- -diff --git a/test/simple/test-stream2-large-read-stall.js b/test/simple/test-stream2-large-read-stall.js -index 2fbfbca..667985b 100644 ---- a/test/simple/test-stream2-large-read-stall.js -+++ b/test/simple/test-stream2-large-read-stall.js -@@ -30,7 +30,7 @@ var PUSHSIZE = 20; - var PUSHCOUNT = 1000; - var HWM = 50; - --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - var r = new Readable({ - highWaterMark: HWM - }); -@@ -39,23 +39,23 @@ var rs = r._readableState; - r._read = push; - - r.on('readable', function() { -- console.error('>> readable'); -+ //console.error('>> readable'); - do { -- console.error(' > read(%d)', READSIZE); -+ //console.error(' > read(%d)', READSIZE); - var ret = r.read(READSIZE); -- console.error(' < %j (%d remain)', ret && ret.length, rs.length); -+ //console.error(' < %j (%d remain)', ret && ret.length, rs.length); - } while (ret && ret.length === READSIZE); - -- console.error('<< after read()', -- ret && ret.length, -- rs.needReadable, -- rs.length); -+ //console.error('<< after read()', -+ // ret && ret.length, -+ // rs.needReadable, -+ // rs.length); - }); - - var endEmitted = false; - r.on('end', function() { - endEmitted = true; -- console.error('end'); -+ //console.error('end'); - }); - - var pushes = 0; -@@ -64,11 +64,11 @@ function push() { - return; - - if (pushes++ === PUSHCOUNT) { -- console.error(' push(EOF)'); -+ //console.error(' push(EOF)'); - return r.push(null); - } - -- console.error(' push #%d', pushes); -+ //console.error(' push #%d', pushes); - if (r.push(new Buffer(PUSHSIZE))) - setTimeout(push); - } -diff --git a/test/simple/test-stream2-objects.js b/test/simple/test-stream2-objects.js -index 3e6931d..ff47d89 100644 ---- a/test/simple/test-stream2-objects.js -+++ b/test/simple/test-stream2-objects.js -@@ -21,8 +21,8 @@ - - - var common = require('../common.js'); --var Readable = require('_stream_readable'); --var Writable = require('_stream_writable'); -+var Readable = require('../../lib/_stream_readable'); -+var Writable = require('../../lib/_stream_writable'); - var assert = require('assert'); - - // tiny node-tap lookalike. -diff --git a/test/simple/test-stream2-pipe-error-handling.js b/test/simple/test-stream2-pipe-error-handling.js -index cf7531c..e3f3e4e 100644 ---- a/test/simple/test-stream2-pipe-error-handling.js -+++ b/test/simple/test-stream2-pipe-error-handling.js -@@ -21,7 +21,7 @@ - - var common = require('../common'); - var assert = require('assert'); --var stream = require('stream'); -+var stream = require('../../'); - - (function testErrorListenerCatches() { - var count = 1000; -diff --git a/test/simple/test-stream2-pipe-error-once-listener.js b/test/simple/test-stream2-pipe-error-once-listener.js -index 5e8e3cb..53b2616 100755 ---- a/test/simple/test-stream2-pipe-error-once-listener.js -+++ b/test/simple/test-stream2-pipe-error-once-listener.js -@@ -24,7 +24,7 @@ var common = require('../common.js'); - var assert = require('assert'); - - var util = require('util'); --var stream = require('stream'); -+var stream = require('../../'); - - - var Read = function() { -diff --git a/test/simple/test-stream2-push.js b/test/simple/test-stream2-push.js -index b63edc3..eb2b0e9 100644 ---- a/test/simple/test-stream2-push.js -+++ b/test/simple/test-stream2-push.js -@@ -20,7 +20,7 @@ - // USE OR OTHER DEALINGS IN THE SOFTWARE. - - var common = require('../common.js'); --var stream = require('stream'); -+var stream = require('../../'); - var Readable = stream.Readable; - var Writable = stream.Writable; - var assert = require('assert'); -diff --git a/test/simple/test-stream2-read-sync-stack.js b/test/simple/test-stream2-read-sync-stack.js -index e8a7305..9740a47 100644 ---- a/test/simple/test-stream2-read-sync-stack.js -+++ b/test/simple/test-stream2-read-sync-stack.js -@@ -21,7 +21,7 @@ - - var common = require('../common'); - var assert = require('assert'); --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - var r = new Readable(); - var N = 256 * 1024; - -diff --git a/test/simple/test-stream2-readable-empty-buffer-no-eof.js b/test/simple/test-stream2-readable-empty-buffer-no-eof.js -index cd30178..4b1659d 100644 ---- a/test/simple/test-stream2-readable-empty-buffer-no-eof.js -+++ b/test/simple/test-stream2-readable-empty-buffer-no-eof.js -@@ -22,10 +22,9 @@ - var common = require('../common'); - var assert = require('assert'); - --var Readable = require('stream').Readable; -+var Readable = require('../../').Readable; - - test1(); --test2(); - - function test1() { - var r = new Readable(); -@@ -88,31 +87,3 @@ function test1() { - console.log('ok'); - }); - } -- --function test2() { -- var r = new Readable({ encoding: 'base64' }); -- var reads = 5; -- r._read = function(n) { -- if (!reads--) -- return r.push(null); // EOF -- else -- return r.push(new Buffer('x')); -- }; -- -- var results = []; -- function flow() { -- var chunk; -- while (null !== (chunk = r.read())) -- results.push(chunk + ''); -- } -- r.on('readable', flow); -- r.on('end', function() { -- results.push('EOF'); -- }); -- flow(); -- -- process.on('exit', function() { -- assert.deepEqual(results, [ 'eHh4', 'eHg=', 'EOF' ]); -- console.log('ok'); -- }); --} -diff --git a/test/simple/test-stream2-readable-from-list.js b/test/simple/test-stream2-readable-from-list.js -index 7c96ffe..04a96f5 100644 ---- a/test/simple/test-stream2-readable-from-list.js -+++ b/test/simple/test-stream2-readable-from-list.js -@@ -21,7 +21,7 @@ - - var assert = require('assert'); - var common = require('../common.js'); --var fromList = require('_stream_readable')._fromList; -+var fromList = require('../../lib/_stream_readable')._fromList; - - // tiny node-tap lookalike. - var tests = []; -diff --git a/test/simple/test-stream2-readable-legacy-drain.js b/test/simple/test-stream2-readable-legacy-drain.js -index 675da8e..51fd3d5 100644 ---- a/test/simple/test-stream2-readable-legacy-drain.js -+++ b/test/simple/test-stream2-readable-legacy-drain.js -@@ -22,7 +22,7 @@ - var common = require('../common'); - var assert = require('assert'); - --var Stream = require('stream'); -+var Stream = require('../../'); - var Readable = Stream.Readable; - - var r = new Readable(); -diff --git a/test/simple/test-stream2-readable-non-empty-end.js b/test/simple/test-stream2-readable-non-empty-end.js -index 7314ae7..c971898 100644 ---- a/test/simple/test-stream2-readable-non-empty-end.js -+++ b/test/simple/test-stream2-readable-non-empty-end.js -@@ -21,7 +21,7 @@ - - var assert = require('assert'); - var common = require('../common.js'); --var Readable = require('_stream_readable'); -+var Readable = require('../../lib/_stream_readable'); - - var len = 0; - var chunks = new Array(10); -diff --git a/test/simple/test-stream2-readable-wrap-empty.js b/test/simple/test-stream2-readable-wrap-empty.js -index 2e5cf25..fd8a3dc 100644 ---- a/test/simple/test-stream2-readable-wrap-empty.js -+++ b/test/simple/test-stream2-readable-wrap-empty.js -@@ -22,7 +22,7 @@ - var common = require('../common'); - var assert = require('assert'); - --var Readable = require('_stream_readable'); -+var Readable = require('../../lib/_stream_readable'); - var EE = require('events').EventEmitter; - - var oldStream = new EE(); -diff --git a/test/simple/test-stream2-readable-wrap.js b/test/simple/test-stream2-readable-wrap.js -index 90eea01..6b177f7 100644 ---- a/test/simple/test-stream2-readable-wrap.js -+++ b/test/simple/test-stream2-readable-wrap.js -@@ -22,8 +22,8 @@ - var common = require('../common'); - var assert = require('assert'); - --var Readable = require('_stream_readable'); --var Writable = require('_stream_writable'); -+var Readable = require('../../lib/_stream_readable'); -+var Writable = require('../../lib/_stream_writable'); - var EE = require('events').EventEmitter; - - var testRuns = 0, completedRuns = 0; -diff --git a/test/simple/test-stream2-set-encoding.js b/test/simple/test-stream2-set-encoding.js -index 5d2c32a..685531b 100644 ---- a/test/simple/test-stream2-set-encoding.js -+++ b/test/simple/test-stream2-set-encoding.js -@@ -22,7 +22,7 @@ - - var common = require('../common.js'); - var assert = require('assert'); --var R = require('_stream_readable'); -+var R = require('../../lib/_stream_readable'); - var util = require('util'); - - // tiny node-tap lookalike. -diff --git a/test/simple/test-stream2-transform.js b/test/simple/test-stream2-transform.js -index 9c9ddd8..a0cacc6 100644 ---- a/test/simple/test-stream2-transform.js -+++ b/test/simple/test-stream2-transform.js -@@ -21,8 +21,8 @@ - - var assert = require('assert'); - var common = require('../common.js'); --var PassThrough = require('_stream_passthrough'); --var Transform = require('_stream_transform'); -+var PassThrough = require('../../').PassThrough; -+var Transform = require('../../').Transform; - - // tiny node-tap lookalike. - var tests = []; -diff --git a/test/simple/test-stream2-unpipe-drain.js b/test/simple/test-stream2-unpipe-drain.js -index d66dc3c..365b327 100644 ---- a/test/simple/test-stream2-unpipe-drain.js -+++ b/test/simple/test-stream2-unpipe-drain.js -@@ -22,7 +22,7 @@ - - var common = require('../common.js'); - var assert = require('assert'); --var stream = require('stream'); -+var stream = require('../../'); - var crypto = require('crypto'); - - var util = require('util'); -diff --git a/test/simple/test-stream2-unpipe-leak.js b/test/simple/test-stream2-unpipe-leak.js -index 99f8746..17c92ae 100644 ---- a/test/simple/test-stream2-unpipe-leak.js -+++ b/test/simple/test-stream2-unpipe-leak.js -@@ -22,7 +22,7 @@ - - var common = require('../common.js'); - var assert = require('assert'); --var stream = require('stream'); -+var stream = require('../../'); - - var chunk = new Buffer('hallo'); - -diff --git a/test/simple/test-stream2-writable.js b/test/simple/test-stream2-writable.js -index 704100c..209c3a6 100644 ---- a/test/simple/test-stream2-writable.js -+++ b/test/simple/test-stream2-writable.js -@@ -20,8 +20,8 @@ - // USE OR OTHER DEALINGS IN THE SOFTWARE. - - var common = require('../common.js'); --var W = require('_stream_writable'); --var D = require('_stream_duplex'); -+var W = require('../../').Writable; -+var D = require('../../').Duplex; - var assert = require('assert'); - - var util = require('util'); -diff --git a/test/simple/test-stream3-pause-then-read.js b/test/simple/test-stream3-pause-then-read.js -index b91bde3..2f72c15 100644 ---- a/test/simple/test-stream3-pause-then-read.js -+++ b/test/simple/test-stream3-pause-then-read.js -@@ -22,7 +22,7 @@ - var common = require('../common'); - var assert = require('assert'); - --var stream = require('stream'); -+var stream = require('../../'); - var Readable = stream.Readable; - var Writable = stream.Writable; - diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index a2e0d8e0..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -module.exports = Duplex; -var util = require('util'); -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -Object.keys(Writable.prototype).forEach(function(method) { - if (!Duplex.prototype[method]) - Duplex.prototype[method] = Writable.prototype[method]; -}); - -function Duplex(options) { - if (!(this instanceof Duplex)) - return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) - this.readable = false; - - if (options && options.writable === false) - this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) - this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) - return; - - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(this.end.bind(this)); -} diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 330c247d..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); -var util = require('util'); -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) - return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function(chunk, encoding, cb) { - cb(null, chunk); -}; diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 2d00efb4..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,924 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -module.exports = Readable; -Readable.ReadableState = ReadableState; - -var EE = require('events').EventEmitter; -if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { - return emitter.listeners(type).length; -}; - -if (!global.setImmediate) global.setImmediate = function setImmediate(fn) { - return setTimeout(fn, 0); -}; -if (!global.clearImmediate) global.clearImmediate = function clearImmediate(i) { - return clearTimeout(i); -}; - -var Stream = require('stream'); -var util = require('util'); -if (!util.isUndefined) { - var utilIs = require('core-util-is'); - for (var f in utilIs) { - util[f] = utilIs[f]; - } -} -var StringDecoder; -var debug; -if (util.debuglog) - debug = util.debuglog('stream'); -else try { - debug = require('debuglog')('stream'); -} catch (er) { - debug = function() {}; -} - -util.inherits(Readable, Stream); - -function ReadableState(options, stream) { - options = options || {}; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - var defaultHwm = options.objectMode ? 16 : 16 * 1024; - this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) - StringDecoder = require('string_decoder').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - if (!(this instanceof Readable)) - return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function(chunk, encoding) { - var state = this._readableState; - - if (util.isString(chunk) && !state.objectMode) { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = new Buffer(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function(chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (util.isNullOrUndefined(chunk)) { - state.reading = false; - if (!state.ended) - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var e = new Error('stream.unshift() after end event'); - stream.emit('error', e); - } else { - if (state.decoder && !addToFront && !encoding) - chunk = state.decoder.write(chunk); - - if (!addToFront) - state.reading = false; - - // if we want the data now, just emit it. - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) - state.buffer.unshift(chunk); - else - state.buffer.push(chunk); - - if (state.needReadable) - emitReadable(stream); - } - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - - - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && - (state.needReadable || - state.length < state.highWaterMark || - state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function(enc) { - if (!StringDecoder) - StringDecoder = require('string_decoder').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; - return this; -}; - -// Don't raise the hwm > 128MB -var MAX_HWM = 0x800000; -function roundUpToNextPowerOf2(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - for (var p = 1; p < 32; p <<= 1) n |= n >> p; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) - return 0; - - if (state.objectMode) - return n === 0 ? 0 : 1; - - if (isNaN(n) || util.isNull(n)) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) - return state.buffer[0].length; - else - return state.length; - } - - if (n <= 0) - return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) - state.highWaterMark = roundUpToNextPowerOf2(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else - return state.length; - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function(n) { - debug('read', n); - var state = this._readableState; - var nOrig = n; - - if (!util.isNumber(n) || n > 0) - state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && - state.needReadable && - (state.length >= state.highWaterMark || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) - endReadable(this); - else - emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) - endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } - - if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) - state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (doRead && !state.reading) - n = howMuchToRead(nOrig, state); - - var ret; - if (n > 0) - ret = fromList(n, state); - else - ret = null; - - if (util.isNull(ret)) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) - state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended && state.length === 0) - endReadable(this); - - if (!util.isNull(ret)) - this.emit('data', ret); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!util.isBuffer(chunk) && - !util.isString(chunk) && - !util.isNullOrUndefined(chunk) && - !state.objectMode && - !er) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - - -function onEofChunk(stream, state) { - if (state.decoder && !state.ended && state.decoder.end) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // emit 'readable' now to make sure it gets picked up. - emitReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - if (state.sync) - process.nextTick(function() { - emitReadable_(stream); - }); - else - emitReadable_(stream); - } -} - -function emitReadable_(stream) { - debug('emit readable'); - stream.emit('readable'); - flow(stream); -} - - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(function() { - maybeReadMore_(stream, state); - }); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && - state.length < state.highWaterMark) { - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break; - else - len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function(n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function(dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && - dest !== process.stdout && - dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) - process.nextTick(endFn); - else - src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - debug('onunpipe'); - if (readable === src) { - cleanup(); - } - } - - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - src.removeListener('data', ondata); - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && - (!dest._writableState || dest._writableState.needDrain)) - ondrain(); - } - - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - var ret = dest.write(chunk); - if (false === ret) { - debug('false write response, pause', - src._readableState.awaitDrain); - src._readableState.awaitDrain++; - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EE.listenerCount(dest, 'error') === 0) - dest.emit('error', er); - } - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. - if (!dest._events || !dest._events.error) - dest.on('error', onerror); - else if (Array.isArray(dest._events.error)) - dest._events.error.unshift(onerror); - else - dest._events.error = [onerror, dest._events.error]; - - - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function() { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) - state.awaitDrain--; - if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} - - -Readable.prototype.unpipe = function(dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) - return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) - return this; - - if (!dest) - dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) - dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - - for (var i = 0; i < len; i++) - dests[i].emit('unpipe', this); - return this; - } - - // try to find the right one. - var i = state.pipes.indexOf(dest); - if (i === -1) - return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) - state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function(ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - // If listening to data, and it has not explicitly been paused, - // then call resume to start the flow of data on the next tick. - if (ev === 'data' && false !== this._readableState.flowing) { - this.resume(); - } - - if (ev === 'readable' && this.readable) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - var self = this; - process.nextTick(function() { - debug('readable nexttick read 0'); - self.read(0); - }); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function() { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - state.flowing = true; - if (!state.reading) { - debug('resume read 0'); - this.read(0); - } - resume(this, state); - } - return this; -}; - -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - process.nextTick(function() { - resume_(stream, state); - }); - } -} - -function resume_(stream, state) { - state.resumeScheduled = false; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) - stream.read(0); -} - -Readable.prototype.pause = function() { - debug('call pause flowing=%j', this._readableState.flowing); - if (false !== this._readableState.flowing) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - return this; -}; - -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - if (state.flowing) { - do { - var chunk = stream.read(); - } while (null !== chunk && state.flowing); - } -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function(stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function() { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) - self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function(chunk) { - debug('wrapped data'); - if (state.decoder) - chunk = state.decoder.write(chunk); - if (!chunk || !state.objectMode && !chunk.length) - return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (util.isFunction(stream[i]) && util.isUndefined(this[i])) { - this[i] = function(method) { return function() { - return stream[method].apply(stream, arguments); - }}(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - events.forEach(function(ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function(n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - - - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) - return null; - - if (length === 0) - ret = null; - else if (objectMode) - ret = list.shift(); - else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) - ret = list.join(''); - else - ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) - ret = ''; - else - ret = new Buffer(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var buf = list[0]; - var cpy = Math.min(n - c, buf.length); - - if (stringMode) - ret += buf.slice(0, cpy); - else - buf.copy(ret, c, 0, cpy); - - if (cpy < buf.length) - list[0] = buf.slice(cpy); - else - list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) - throw new Error('endReadable called on non-empty stream'); - - if (!state.endEmitted) { - state.ended = true; - process.nextTick(function() { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } - }); - } -} diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index b0caf57d..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); -var util = require('util'); -if (!util.isUndefined) { - var utilIs = require('core-util-is'); - for (var f in utilIs) { - util[f] = utilIs[f]; - } -} -util.inherits(Transform, Duplex); - - -function TransformState(options, stream) { - this.afterTransform = function(er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) - return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (!util.isNullOrUndefined(data)) - stream.push(data); - - if (cb) - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - - -function Transform(options) { - if (!(this instanceof Transform)) - return new Transform(options); - - Duplex.call(this, options); - - this._transformState = new TransformState(options, this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - this.once('prefinish', function() { - if (util.isFunction(this._flush)) - this._flush(function(er) { - done(stream, er); - }); - else - done(stream); - }); -} - -Transform.prototype.push = function(chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function(chunk, encoding, cb) { - throw new Error('not implemented'); -}; - -Transform.prototype._write = function(chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || - rs.needReadable || - rs.length < rs.highWaterMark) - this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function(n) { - var ts = this._transformState; - - if (!util.isNull(ts.writechunk) && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - - -function done(stream, er) { - if (er) - return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var ts = stream._transformState; - - if (ws.length) - throw new Error('calling transform done when ws.length != 0'); - - if (ts.transforming) - throw new Error('calling transform done when still transforming'); - - return stream.push(null); -} diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index 1dfca70d..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,460 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, cb), and it'll handle all -// the drain event emission and buffering. - -module.exports = Writable; -Writable.WritableState = WritableState; - -var util = require('util'); -if (!util.isUndefined) { - var utilIs = require('core-util-is'); - for (var f in utilIs) { - util[f] = utilIs[f]; - } -} -var Stream = require('stream'); - -util.inherits(Writable, Stream); - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; -} - -function WritableState(options, stream) { - options = options || {}; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - var defaultHwm = options.objectMode ? 16 : 16 * 1024; - this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function(er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.buffer = []; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; -} - -function Writable(options) { - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) - return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function() { - this.emit('error', new Error('Cannot pipe. Not readable.')); -}; - - -function writeAfterEnd(stream, state, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - if (!util.isBuffer(chunk) && - !util.isString(chunk) && - !util.isNullOrUndefined(chunk) && - !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); - valid = false; - } - return valid; -} - -Writable.prototype.write = function(chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (util.isFunction(encoding)) { - cb = encoding; - encoding = null; - } - - if (util.isBuffer(chunk)) - encoding = 'buffer'; - else if (!encoding) - encoding = state.defaultEncoding; - - if (!util.isFunction(cb)) - cb = function() {}; - - if (state.ended) - writeAfterEnd(this, state, cb); - else if (validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, chunk, encoding, cb); - } - - return ret; -}; - -Writable.prototype.cork = function() { - var state = this._writableState; - - state.corked++; -}; - -Writable.prototype.uncork = function() { - var state = this._writableState; - - if (state.corked) { - state.corked--; - - if (!state.writing && - !state.corked && - !state.finished && - !state.bufferProcessing && - state.buffer.length) - clearBuffer(this, state); - } -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && - state.decodeStrings !== false && - util.isString(chunk)) { - chunk = new Buffer(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - if (util.isBuffer(chunk)) - encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - state.needDrain = !ret; - - if (state.writing || state.corked) - state.buffer.push(new WriteReq(chunk, encoding, cb)); - else - doWrite(stream, state, false, len, chunk, encoding, cb); - - return ret; -} - -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (writev) - stream._writev(chunk, state.onwrite); - else - stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - if (sync) - process.nextTick(function() { - state.pendingcb--; - cb(er); - }); - else { - state.pendingcb--; - cb(er); - } - - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) - onwriteError(stream, state, sync, er, cb); - else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(stream, state); - - if (!finished && - !state.corked && - !state.bufferProcessing && - state.buffer.length) { - clearBuffer(stream, state); - } - - if (sync) { - process.nextTick(function() { - afterWrite(stream, state, finished, cb); - }); - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) - onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - - if (stream._writev && state.buffer.length > 1) { - // Fast case, write everything using _writev() - var cbs = []; - for (var c = 0; c < state.buffer.length; c++) - cbs.push(state.buffer[c].callback); - - // count the one we are adding, as well. - // TODO(isaacs) clean this up - state.pendingcb++; - doWrite(stream, state, true, state.length, state.buffer, '', function(err) { - for (var i = 0; i < cbs.length; i++) { - state.pendingcb--; - cbs[i](err); - } - }); - - // Clear buffer - state.buffer = []; - } else { - // Slow case, write chunks one-by-one - for (var c = 0; c < state.buffer.length; c++) { - var entry = state.buffer[c]; - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, false, len, chunk, encoding, cb); - - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - c++; - break; - } - } - - if (c < state.buffer.length) - state.buffer = state.buffer.slice(c); - else - state.buffer.length = 0; - } - - state.bufferProcessing = false; -} - -Writable.prototype._write = function(chunk, encoding, cb) { - cb(new Error('not implemented')); - -}; - -Writable.prototype._writev = null; - -Writable.prototype.end = function(chunk, encoding, cb) { - var state = this._writableState; - - if (util.isFunction(chunk)) { - cb = chunk; - chunk = null; - encoding = null; - } else if (util.isFunction(encoding)) { - cb = encoding; - encoding = null; - } - - if (!util.isNullOrUndefined(chunk)) - this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) - endWritable(this, state, cb); -}; - - -function needFinish(stream, state) { - return (state.ending && - state.length === 0 && - !state.finished && - !state.writing); -} - -function prefinish(stream, state) { - if (!state.prefinished) { - state.prefinished = true; - stream.emit('prefinish'); - } -} - -function finishMaybe(stream, state) { - var need = needFinish(stream, state); - if (need) { - if (state.pendingcb === 0) { - prefinish(stream, state); - state.finished = true; - stream.emit('finish'); - } else - prefinish(stream, state); - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) - process.nextTick(cb); - else - stream.once('finish', cb); - } - state.ended = true; -} diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/core-util-is/README.md b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/core-util-is/README.md deleted file mode 100644 index 5a76b414..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/core-util-is/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# core-util-is - -The `util.is*` functions introduced in Node v0.12. diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/core-util-is/float.patch b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/core-util-is/float.patch deleted file mode 100644 index a06d5c05..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/core-util-is/float.patch +++ /dev/null @@ -1,604 +0,0 @@ -diff --git a/lib/util.js b/lib/util.js -index a03e874..9074e8e 100644 ---- a/lib/util.js -+++ b/lib/util.js -@@ -19,430 +19,6 @@ - // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - // USE OR OTHER DEALINGS IN THE SOFTWARE. - --var formatRegExp = /%[sdj%]/g; --exports.format = function(f) { -- if (!isString(f)) { -- var objects = []; -- for (var i = 0; i < arguments.length; i++) { -- objects.push(inspect(arguments[i])); -- } -- return objects.join(' '); -- } -- -- var i = 1; -- var args = arguments; -- var len = args.length; -- var str = String(f).replace(formatRegExp, function(x) { -- if (x === '%%') return '%'; -- if (i >= len) return x; -- switch (x) { -- case '%s': return String(args[i++]); -- case '%d': return Number(args[i++]); -- case '%j': -- try { -- return JSON.stringify(args[i++]); -- } catch (_) { -- return '[Circular]'; -- } -- default: -- return x; -- } -- }); -- for (var x = args[i]; i < len; x = args[++i]) { -- if (isNull(x) || !isObject(x)) { -- str += ' ' + x; -- } else { -- str += ' ' + inspect(x); -- } -- } -- return str; --}; -- -- --// Mark that a method should not be used. --// Returns a modified function which warns once by default. --// If --no-deprecation is set, then it is a no-op. --exports.deprecate = function(fn, msg) { -- // Allow for deprecating things in the process of starting up. -- if (isUndefined(global.process)) { -- return function() { -- return exports.deprecate(fn, msg).apply(this, arguments); -- }; -- } -- -- if (process.noDeprecation === true) { -- return fn; -- } -- -- var warned = false; -- function deprecated() { -- if (!warned) { -- if (process.throwDeprecation) { -- throw new Error(msg); -- } else if (process.traceDeprecation) { -- console.trace(msg); -- } else { -- console.error(msg); -- } -- warned = true; -- } -- return fn.apply(this, arguments); -- } -- -- return deprecated; --}; -- -- --var debugs = {}; --var debugEnviron; --exports.debuglog = function(set) { -- if (isUndefined(debugEnviron)) -- debugEnviron = process.env.NODE_DEBUG || ''; -- set = set.toUpperCase(); -- if (!debugs[set]) { -- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { -- var pid = process.pid; -- debugs[set] = function() { -- var msg = exports.format.apply(exports, arguments); -- console.error('%s %d: %s', set, pid, msg); -- }; -- } else { -- debugs[set] = function() {}; -- } -- } -- return debugs[set]; --}; -- -- --/** -- * Echos the value of a value. Trys to print the value out -- * in the best way possible given the different types. -- * -- * @param {Object} obj The object to print out. -- * @param {Object} opts Optional options object that alters the output. -- */ --/* legacy: obj, showHidden, depth, colors*/ --function inspect(obj, opts) { -- // default options -- var ctx = { -- seen: [], -- stylize: stylizeNoColor -- }; -- // legacy... -- if (arguments.length >= 3) ctx.depth = arguments[2]; -- if (arguments.length >= 4) ctx.colors = arguments[3]; -- if (isBoolean(opts)) { -- // legacy... -- ctx.showHidden = opts; -- } else if (opts) { -- // got an "options" object -- exports._extend(ctx, opts); -- } -- // set default options -- if (isUndefined(ctx.showHidden)) ctx.showHidden = false; -- if (isUndefined(ctx.depth)) ctx.depth = 2; -- if (isUndefined(ctx.colors)) ctx.colors = false; -- if (isUndefined(ctx.customInspect)) ctx.customInspect = true; -- if (ctx.colors) ctx.stylize = stylizeWithColor; -- return formatValue(ctx, obj, ctx.depth); --} --exports.inspect = inspect; -- -- --// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics --inspect.colors = { -- 'bold' : [1, 22], -- 'italic' : [3, 23], -- 'underline' : [4, 24], -- 'inverse' : [7, 27], -- 'white' : [37, 39], -- 'grey' : [90, 39], -- 'black' : [30, 39], -- 'blue' : [34, 39], -- 'cyan' : [36, 39], -- 'green' : [32, 39], -- 'magenta' : [35, 39], -- 'red' : [31, 39], -- 'yellow' : [33, 39] --}; -- --// Don't use 'blue' not visible on cmd.exe --inspect.styles = { -- 'special': 'cyan', -- 'number': 'yellow', -- 'boolean': 'yellow', -- 'undefined': 'grey', -- 'null': 'bold', -- 'string': 'green', -- 'date': 'magenta', -- // "name": intentionally not styling -- 'regexp': 'red' --}; -- -- --function stylizeWithColor(str, styleType) { -- var style = inspect.styles[styleType]; -- -- if (style) { -- return '\u001b[' + inspect.colors[style][0] + 'm' + str + -- '\u001b[' + inspect.colors[style][1] + 'm'; -- } else { -- return str; -- } --} -- -- --function stylizeNoColor(str, styleType) { -- return str; --} -- -- --function arrayToHash(array) { -- var hash = {}; -- -- array.forEach(function(val, idx) { -- hash[val] = true; -- }); -- -- return hash; --} -- -- --function formatValue(ctx, value, recurseTimes) { -- // Provide a hook for user-specified inspect functions. -- // Check that value is an object with an inspect function on it -- if (ctx.customInspect && -- value && -- isFunction(value.inspect) && -- // Filter out the util module, it's inspect function is special -- value.inspect !== exports.inspect && -- // Also filter out any prototype objects using the circular check. -- !(value.constructor && value.constructor.prototype === value)) { -- var ret = value.inspect(recurseTimes, ctx); -- if (!isString(ret)) { -- ret = formatValue(ctx, ret, recurseTimes); -- } -- return ret; -- } -- -- // Primitive types cannot have properties -- var primitive = formatPrimitive(ctx, value); -- if (primitive) { -- return primitive; -- } -- -- // Look up the keys of the object. -- var keys = Object.keys(value); -- var visibleKeys = arrayToHash(keys); -- -- if (ctx.showHidden) { -- keys = Object.getOwnPropertyNames(value); -- } -- -- // Some type of object without properties can be shortcutted. -- if (keys.length === 0) { -- if (isFunction(value)) { -- var name = value.name ? ': ' + value.name : ''; -- return ctx.stylize('[Function' + name + ']', 'special'); -- } -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } -- if (isDate(value)) { -- return ctx.stylize(Date.prototype.toString.call(value), 'date'); -- } -- if (isError(value)) { -- return formatError(value); -- } -- } -- -- var base = '', array = false, braces = ['{', '}']; -- -- // Make Array say that they are Array -- if (isArray(value)) { -- array = true; -- braces = ['[', ']']; -- } -- -- // Make functions say that they are functions -- if (isFunction(value)) { -- var n = value.name ? ': ' + value.name : ''; -- base = ' [Function' + n + ']'; -- } -- -- // Make RegExps say that they are RegExps -- if (isRegExp(value)) { -- base = ' ' + RegExp.prototype.toString.call(value); -- } -- -- // Make dates with properties first say the date -- if (isDate(value)) { -- base = ' ' + Date.prototype.toUTCString.call(value); -- } -- -- // Make error with message first say the error -- if (isError(value)) { -- base = ' ' + formatError(value); -- } -- -- if (keys.length === 0 && (!array || value.length == 0)) { -- return braces[0] + base + braces[1]; -- } -- -- if (recurseTimes < 0) { -- if (isRegExp(value)) { -- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); -- } else { -- return ctx.stylize('[Object]', 'special'); -- } -- } -- -- ctx.seen.push(value); -- -- var output; -- if (array) { -- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); -- } else { -- output = keys.map(function(key) { -- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); -- }); -- } -- -- ctx.seen.pop(); -- -- return reduceToSingleString(output, base, braces); --} -- -- --function formatPrimitive(ctx, value) { -- if (isUndefined(value)) -- return ctx.stylize('undefined', 'undefined'); -- if (isString(value)) { -- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') -- .replace(/'/g, "\\'") -- .replace(/\\"/g, '"') + '\''; -- return ctx.stylize(simple, 'string'); -- } -- if (isNumber(value)) { -- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, -- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . -- if (value === 0 && 1 / value < 0) -- return ctx.stylize('-0', 'number'); -- return ctx.stylize('' + value, 'number'); -- } -- if (isBoolean(value)) -- return ctx.stylize('' + value, 'boolean'); -- // For some reason typeof null is "object", so special case here. -- if (isNull(value)) -- return ctx.stylize('null', 'null'); --} -- -- --function formatError(value) { -- return '[' + Error.prototype.toString.call(value) + ']'; --} -- -- --function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { -- var output = []; -- for (var i = 0, l = value.length; i < l; ++i) { -- if (hasOwnProperty(value, String(i))) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- String(i), true)); -- } else { -- output.push(''); -- } -- } -- keys.forEach(function(key) { -- if (!key.match(/^\d+$/)) { -- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, -- key, true)); -- } -- }); -- return output; --} -- -- --function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { -- var name, str, desc; -- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; -- if (desc.get) { -- if (desc.set) { -- str = ctx.stylize('[Getter/Setter]', 'special'); -- } else { -- str = ctx.stylize('[Getter]', 'special'); -- } -- } else { -- if (desc.set) { -- str = ctx.stylize('[Setter]', 'special'); -- } -- } -- if (!hasOwnProperty(visibleKeys, key)) { -- name = '[' + key + ']'; -- } -- if (!str) { -- if (ctx.seen.indexOf(desc.value) < 0) { -- if (isNull(recurseTimes)) { -- str = formatValue(ctx, desc.value, null); -- } else { -- str = formatValue(ctx, desc.value, recurseTimes - 1); -- } -- if (str.indexOf('\n') > -1) { -- if (array) { -- str = str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n').substr(2); -- } else { -- str = '\n' + str.split('\n').map(function(line) { -- return ' ' + line; -- }).join('\n'); -- } -- } -- } else { -- str = ctx.stylize('[Circular]', 'special'); -- } -- } -- if (isUndefined(name)) { -- if (array && key.match(/^\d+$/)) { -- return str; -- } -- name = JSON.stringify('' + key); -- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { -- name = name.substr(1, name.length - 2); -- name = ctx.stylize(name, 'name'); -- } else { -- name = name.replace(/'/g, "\\'") -- .replace(/\\"/g, '"') -- .replace(/(^"|"$)/g, "'"); -- name = ctx.stylize(name, 'string'); -- } -- } -- -- return name + ': ' + str; --} -- -- --function reduceToSingleString(output, base, braces) { -- var numLinesEst = 0; -- var length = output.reduce(function(prev, cur) { -- numLinesEst++; -- if (cur.indexOf('\n') >= 0) numLinesEst++; -- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; -- }, 0); -- -- if (length > 60) { -- return braces[0] + -- (base === '' ? '' : base + '\n ') + -- ' ' + -- output.join(',\n ') + -- ' ' + -- braces[1]; -- } -- -- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; --} -- -- - // NOTE: These type checking functions intentionally don't use `instanceof` - // because it is fragile and can be easily faked with `Object.create()`. - function isArray(ar) { -@@ -522,166 +98,10 @@ function isPrimitive(arg) { - exports.isPrimitive = isPrimitive; - - function isBuffer(arg) { -- return arg instanceof Buffer; -+ return Buffer.isBuffer(arg); - } - exports.isBuffer = isBuffer; - - function objectToString(o) { - return Object.prototype.toString.call(o); --} -- -- --function pad(n) { -- return n < 10 ? '0' + n.toString(10) : n.toString(10); --} -- -- --var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', -- 'Oct', 'Nov', 'Dec']; -- --// 26 Feb 16:19:34 --function timestamp() { -- var d = new Date(); -- var time = [pad(d.getHours()), -- pad(d.getMinutes()), -- pad(d.getSeconds())].join(':'); -- return [d.getDate(), months[d.getMonth()], time].join(' '); --} -- -- --// log is just a thin wrapper to console.log that prepends a timestamp --exports.log = function() { -- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); --}; -- -- --/** -- * Inherit the prototype methods from one constructor into another. -- * -- * The Function.prototype.inherits from lang.js rewritten as a standalone -- * function (not on Function.prototype). NOTE: If this file is to be loaded -- * during bootstrapping this function needs to be rewritten using some native -- * functions as prototype setup using normal JavaScript does not work as -- * expected during bootstrapping (see mirror.js in r114903). -- * -- * @param {function} ctor Constructor function which needs to inherit the -- * prototype. -- * @param {function} superCtor Constructor function to inherit prototype from. -- */ --exports.inherits = function(ctor, superCtor) { -- ctor.super_ = superCtor; -- ctor.prototype = Object.create(superCtor.prototype, { -- constructor: { -- value: ctor, -- enumerable: false, -- writable: true, -- configurable: true -- } -- }); --}; -- --exports._extend = function(origin, add) { -- // Don't do anything if add isn't an object -- if (!add || !isObject(add)) return origin; -- -- var keys = Object.keys(add); -- var i = keys.length; -- while (i--) { -- origin[keys[i]] = add[keys[i]]; -- } -- return origin; --}; -- --function hasOwnProperty(obj, prop) { -- return Object.prototype.hasOwnProperty.call(obj, prop); --} -- -- --// Deprecated old stuff. -- --exports.p = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- console.error(exports.inspect(arguments[i])); -- } --}, 'util.p: Use console.error() instead'); -- -- --exports.exec = exports.deprecate(function() { -- return require('child_process').exec.apply(this, arguments); --}, 'util.exec is now called `child_process.exec`.'); -- -- --exports.print = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(String(arguments[i])); -- } --}, 'util.print: Use console.log instead'); -- -- --exports.puts = exports.deprecate(function() { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stdout.write(arguments[i] + '\n'); -- } --}, 'util.puts: Use console.log instead'); -- -- --exports.debug = exports.deprecate(function(x) { -- process.stderr.write('DEBUG: ' + x + '\n'); --}, 'util.debug: Use console.error instead'); -- -- --exports.error = exports.deprecate(function(x) { -- for (var i = 0, len = arguments.length; i < len; ++i) { -- process.stderr.write(arguments[i] + '\n'); -- } --}, 'util.error: Use console.error instead'); -- -- --exports.pump = exports.deprecate(function(readStream, writeStream, callback) { -- var callbackCalled = false; -- -- function call(a, b, c) { -- if (callback && !callbackCalled) { -- callback(a, b, c); -- callbackCalled = true; -- } -- } -- -- readStream.addListener('data', function(chunk) { -- if (writeStream.write(chunk) === false) readStream.pause(); -- }); -- -- writeStream.addListener('drain', function() { -- readStream.resume(); -- }); -- -- readStream.addListener('end', function() { -- writeStream.end(); -- }); -- -- readStream.addListener('close', function() { -- call(); -- }); -- -- readStream.addListener('error', function(err) { -- writeStream.end(); -- call(err); -- }); -- -- writeStream.addListener('error', function(err) { -- readStream.destroy(); -- call(err); -- }); --}, 'util.pump(): Use readableStream.pipe() instead'); -- -- --var uv; --exports._errnoException = function(err, syscall) { -- if (isUndefined(uv)) uv = process.binding('uv'); -- var errname = uv.errname(err); -- var e = new Error(syscall + ' ' + errname); -- e.code = errname; -- e.errno = errname; -- e.syscall = syscall; -- return e; --}; -+} \ No newline at end of file diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/core-util-is/lib/util.js b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/core-util-is/lib/util.js deleted file mode 100644 index 9074e8eb..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. -function isArray(ar) { - return Array.isArray(ar); -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return isObject(e) && - (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -function isBuffer(arg) { - return Buffer.isBuffer(arg); -} -exports.isBuffer = isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} \ No newline at end of file diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/core-util-is/package.json b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/core-util-is/package.json deleted file mode 100644 index cb9aa927..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/core-util-is/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "core-util-is", - "version": "1.0.1", - "description": "The `util.is*` functions introduced in Node v0.12.", - "main": "lib/util.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/core-util-is" - }, - "keywords": [ - "util", - "isBuffer", - "isArray", - "isNumber", - "isString", - "isRegExp", - "isThis", - "isThat", - "polyfill" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/isaacs/core-util-is/issues" - }, - "readme": "# core-util-is\n\nThe `util.is*` functions introduced in Node v0.12.\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/isaacs/core-util-is", - "_id": "core-util-is@1.0.1", - "_from": "core-util-is@~1.0.0" -} diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/core-util-is/util.js b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/core-util-is/util.js deleted file mode 100644 index 007fa105..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/core-util-is/util.js +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. -function isArray(ar) { - return Array.isArray(ar); -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return isObject(e) && objectToString(e) === '[object Error]'; -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -function isBuffer(arg) { - return arg instanceof Buffer; -} -exports.isBuffer = isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/debuglog/LICENSE b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/debuglog/LICENSE deleted file mode 100644 index a3187cc1..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/debuglog/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. All rights reserved. - -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/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/debuglog/README.md b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/debuglog/README.md deleted file mode 100644 index dc6fccec..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/debuglog/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# debuglog - backport of util.debuglog() from node v0.11 - -To facilitate using the `util.debuglog()` function that will be available when -node v0.12 is released now, this is a copy extracted from the source. - -## require('debuglog') - -Return `util.debuglog`, if it exists, otherwise it will return an internal copy -of the implementation from node v0.11. - -## debuglog(section) - -* `section` {String} The section of the program to be debugged -* Returns: {Function} The logging function - -This is used to create a function which conditionally writes to stderr -based on the existence of a `NODE_DEBUG` environment variable. If the -`section` name appears in that environment variable, then the returned -function will be similar to `console.error()`. If not, then the -returned function is a no-op. - -For example: - -```javascript -var debuglog = util.debuglog('foo'); - -var bar = 123; -debuglog('hello from foo [%d]', bar); -``` - -If this program is run with `NODE_DEBUG=foo` in the environment, then -it will output something like: - - FOO 3245: hello from foo [123] - -where `3245` is the process id. If it is not run with that -environment variable set, then it will not print anything. - -You may separate multiple `NODE_DEBUG` environment variables with a -comma. For example, `NODE_DEBUG=fs,net,tls`. diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/debuglog/debuglog.js b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/debuglog/debuglog.js deleted file mode 100644 index da465c29..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/debuglog/debuglog.js +++ /dev/null @@ -1,22 +0,0 @@ -var util = require('util'); - -module.exports = util.debuglog || debuglog; - -var debugs = {}; -var debugEnviron = process.env.NODE_DEBUG || ''; - -function debuglog(set) { - set = set.toUpperCase(); - if (!debugs[set]) { - if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { - var pid = process.pid; - debugs[set] = function() { - var msg = util.format.apply(exports, arguments); - console.error('%s %d: %s', set, pid, msg); - }; - } else { - debugs[set] = function() {}; - } - } - return debugs[set]; -}; diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/debuglog/package.json b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/debuglog/package.json deleted file mode 100644 index f9c64a99..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/node_modules/debuglog/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "debuglog", - "version": "0.0.2", - "description": "backport of util.debuglog from node v0.11", - "license": "MIT", - "main": "debuglog.js", - "repository": { - "type": "git", - "url": "https://github.com/sam-github/node-debuglog.git" - }, - "author": { - "name": "Sam Roberts", - "email": "sam@strongloop.com" - }, - "engines": { - "node": "*" - }, - "readme": "# debuglog - backport of util.debuglog() from node v0.11\n\nTo facilitate using the `util.debuglog()` function that will be available when\nnode v0.12 is released now, this is a copy extracted from the source.\n\n## require('debuglog')\n\nReturn `util.debuglog`, if it exists, otherwise it will return an internal copy\nof the implementation from node v0.11.\n\n## debuglog(section)\n\n* `section` {String} The section of the program to be debugged\n* Returns: {Function} The logging function\n\nThis is used to create a function which conditionally writes to stderr\nbased on the existence of a `NODE_DEBUG` environment variable. If the\n`section` name appears in that environment variable, then the returned\nfunction will be similar to `console.error()`. If not, then the\nreturned function is a no-op.\n\nFor example:\n\n```javascript\nvar debuglog = util.debuglog('foo');\n\nvar bar = 123;\ndebuglog('hello from foo [%d]', bar);\n```\n\nIf this program is run with `NODE_DEBUG=foo` in the environment, then\nit will output something like:\n\n FOO 3245: hello from foo [123]\n\nwhere `3245` is the process id. If it is not run with that\nenvironment variable set, then it will not print anything.\n\nYou may separate multiple `NODE_DEBUG` environment variables with a\ncomma. For example, `NODE_DEBUG=fs,net,tls`.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/sam-github/node-debuglog/issues" - }, - "homepage": "https://github.com/sam-github/node-debuglog", - "_id": "debuglog@0.0.2", - "dist": { - "shasum": "a0e439ca87738aff3813659190fd30842ffea6f4" - }, - "_from": "debuglog@0.0.2", - "_resolved": "https://registry.npmjs.org/debuglog/-/debuglog-0.0.2.tgz" -} diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/package.json b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/package.json deleted file mode 100644 index 49566cdb..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "readable-stream", - "version": "1.1.10", - "description": "An exploration of a new kind of readable streams for Node.js", - "main": "readable.js", - "dependencies": { - "core-util-is": "~1.0.0", - "debuglog": "0.0.2" - }, - "devDependencies": { - "tap": "~0.2.6" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/readable-stream" - }, - "keywords": [ - "readable", - "stream", - "pipe" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "MIT", - "optionalDependencies": { - "debuglog": "0.0.2" - }, - "readme": "# readable-stream\n\nA new class of streams for Node.js\n\nThis module provides the new Stream base classes introduced in Node\nv0.10, for use in Node v0.8. You can use it to have programs that\nhave to work with node v0.8, while being forward-compatible for v0.10\nand beyond. When you drop support for v0.8, you can remove this\nmodule, and only use the native streams.\n\nThis is almost exactly the same codebase as appears in Node v0.10.\nHowever:\n\n1. The exported object is actually the Readable class. Decorating the\n native `stream` module would be global pollution.\n2. In v0.10, you can safely use `base64` as an argument to\n `setEncoding` in Readable streams. However, in v0.8, the\n StringDecoder class has no `end()` method, which is problematic for\n Base64. So, don't use that, because it'll break and be weird.\n\nOther than that, the API is the same as `require('stream')` in v0.10,\nso the API docs are reproduced below.\n\n----------\n\n Stability: 2 - Unstable\n\nA stream is an abstract interface implemented by various objects in\nNode. For example a request to an HTTP server is a stream, as is\nstdout. Streams are readable, writable, or both. All streams are\ninstances of [EventEmitter][]\n\nYou can load the Stream base classes by doing `require('stream')`.\nThere are base classes provided for Readable streams, Writable\nstreams, Duplex streams, and Transform streams.\n\n## Compatibility\n\nIn earlier versions of Node, the Readable stream interface was\nsimpler, but also less powerful and less useful.\n\n* Rather than waiting for you to call the `read()` method, `'data'`\n events would start emitting immediately. If you needed to do some\n I/O to decide how to handle data, then you had to store the chunks\n in some kind of buffer so that they would not be lost.\n* The `pause()` method was advisory, rather than guaranteed. This\n meant that you still had to be prepared to receive `'data'` events\n even when the stream was in a paused state.\n\nIn Node v0.10, the Readable class described below was added. For\nbackwards compatibility with older Node programs, Readable streams\nswitch into \"old mode\" when a `'data'` event handler is added, or when\nthe `pause()` or `resume()` methods are called. The effect is that,\neven if you are not using the new `read()` method and `'readable'`\nevent, you no longer have to worry about losing `'data'` chunks.\n\nMost programs will continue to function normally. However, this\nintroduces an edge case in the following conditions:\n\n* No `'data'` event handler is added.\n* The `pause()` and `resume()` methods are never called.\n\nFor example, consider the following code:\n\n```javascript\n// WARNING! BROKEN!\nnet.createServer(function(socket) {\n\n // we add an 'end' method, but never consume the data\n socket.on('end', function() {\n // It will never get here.\n socket.end('I got your message (but didnt read it)\\n');\n });\n\n}).listen(1337);\n```\n\nIn versions of node prior to v0.10, the incoming message data would be\nsimply discarded. However, in Node v0.10 and beyond, the socket will\nremain paused forever.\n\nThe workaround in this situation is to call the `resume()` method to\ntrigger \"old mode\" behavior:\n\n```javascript\n// Workaround\nnet.createServer(function(socket) {\n\n socket.on('end', function() {\n socket.end('I got your message (but didnt read it)\\n');\n });\n\n // start the flow of data, discarding it.\n socket.resume();\n\n}).listen(1337);\n```\n\nIn addition to new Readable streams switching into old-mode, pre-v0.10\nstyle streams can be wrapped in a Readable class using the `wrap()`\nmethod.\n\n## Class: stream.Readable\n\n\n\nA `Readable Stream` has the following methods, members, and events.\n\nNote that `stream.Readable` is an abstract class designed to be\nextended with an underlying implementation of the `_read(size)`\nmethod. (See below.)\n\n### new stream.Readable([options])\n\n* `options` {Object}\n * `highWaterMark` {Number} The maximum number of bytes to store in\n the internal buffer before ceasing to read from the underlying\n resource. Default=16kb\n * `encoding` {String} If specified, then buffers will be decoded to\n strings using the specified encoding. Default=null\n * `objectMode` {Boolean} Whether this stream should behave\n as a stream of objects. Meaning that stream.read(n) returns\n a single value instead of a Buffer of size n\n\nIn classes that extend the Readable class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### readable.\\_read(size)\n\n* `size` {Number} Number of bytes to read asynchronously\n\nNote: **This function should NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Readable\nclass methods only.\n\nAll Readable stream implementations must provide a `_read` method\nto fetch data from the underlying resource.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\nWhen data is available, put it into the read queue by calling\n`readable.push(chunk)`. If `push` returns false, then you should stop\nreading. When `_read` is called again, you should start pushing more\ndata.\n\nThe `size` argument is advisory. Implementations where a \"read\" is a\nsingle call that returns data can use this to know how much data to\nfetch. Implementations where that is not relevant, such as TCP or\nTLS, may ignore this argument, and simply provide data whenever it\nbecomes available. There is no need, for example to \"wait\" until\n`size` bytes are available before calling `stream.push(chunk)`.\n\n### readable.push(chunk)\n\n* `chunk` {Buffer | null | String} Chunk of data to push into the read queue\n* return {Boolean} Whether or not more pushes should be performed\n\nNote: **This function should be called by Readable implementors, NOT\nby consumers of Readable subclasses.** The `_read()` function will not\nbe called again until at least one `push(chunk)` call is made. If no\ndata is available, then you MAY call `push('')` (an empty string) to\nallow a future `_read` call, without adding any data to the queue.\n\nThe `Readable` class works by putting data into a read queue to be\npulled out later by calling the `read()` method when the `'readable'`\nevent fires.\n\nThe `push()` method will explicitly insert some data into the read\nqueue. If it is called with `null` then it will signal the end of the\ndata.\n\nIn some cases, you may be wrapping a lower-level source which has some\nsort of pause/resume mechanism, and a data callback. In those cases,\nyou could wrap the low-level source object by doing something like\nthis:\n\n```javascript\n// source is an object with readStop() and readStart() methods,\n// and an `ondata` member that gets called when it has data, and\n// an `onend` member that gets called when the data is over.\n\nvar stream = new Readable();\n\nsource.ondata = function(chunk) {\n // if push() returns false, then we need to stop reading from source\n if (!stream.push(chunk))\n source.readStop();\n};\n\nsource.onend = function() {\n stream.push(null);\n};\n\n// _read will be called when the stream wants to pull more data in\n// the advisory size argument is ignored in this case.\nstream._read = function(n) {\n source.readStart();\n};\n```\n\n### readable.unshift(chunk)\n\n* `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue\n* return {Boolean} Whether or not more pushes should be performed\n\nThis is the corollary of `readable.push(chunk)`. Rather than putting\nthe data at the *end* of the read queue, it puts it at the *front* of\nthe read queue.\n\nThis is useful in certain use-cases where a stream is being consumed\nby a parser, which needs to \"un-consume\" some data that it has\noptimistically pulled out of the source.\n\n```javascript\n// A parser for a simple data protocol.\n// The \"header\" is a JSON object, followed by 2 \\n characters, and\n// then a message body.\n//\n// Note: This can be done more simply as a Transform stream. See below.\n\nfunction SimpleProtocol(source, options) {\n if (!(this instanceof SimpleProtocol))\n return new SimpleProtocol(options);\n\n Readable.call(this, options);\n this._inBody = false;\n this._sawFirstCr = false;\n\n // source is a readable stream, such as a socket or file\n this._source = source;\n\n var self = this;\n source.on('end', function() {\n self.push(null);\n });\n\n // give it a kick whenever the source is readable\n // read(0) will not consume any bytes\n source.on('readable', function() {\n self.read(0);\n });\n\n this._rawHeader = [];\n this.header = null;\n}\n\nSimpleProtocol.prototype = Object.create(\n Readable.prototype, { constructor: { value: SimpleProtocol }});\n\nSimpleProtocol.prototype._read = function(n) {\n if (!this._inBody) {\n var chunk = this._source.read();\n\n // if the source doesn't have data, we don't have data yet.\n if (chunk === null)\n return this.push('');\n\n // check if the chunk has a \\n\\n\n var split = -1;\n for (var i = 0; i < chunk.length; i++) {\n if (chunk[i] === 10) { // '\\n'\n if (this._sawFirstCr) {\n split = i;\n break;\n } else {\n this._sawFirstCr = true;\n }\n } else {\n this._sawFirstCr = false;\n }\n }\n\n if (split === -1) {\n // still waiting for the \\n\\n\n // stash the chunk, and try again.\n this._rawHeader.push(chunk);\n this.push('');\n } else {\n this._inBody = true;\n var h = chunk.slice(0, split);\n this._rawHeader.push(h);\n var header = Buffer.concat(this._rawHeader).toString();\n try {\n this.header = JSON.parse(header);\n } catch (er) {\n this.emit('error', new Error('invalid simple protocol data'));\n return;\n }\n // now, because we got some extra data, unshift the rest\n // back into the read queue so that our consumer will see it.\n var b = chunk.slice(split);\n this.unshift(b);\n\n // and let them know that we are done parsing the header.\n this.emit('header', this.header);\n }\n } else {\n // from there on, just provide the data to our consumer.\n // careful not to push(null), since that would indicate EOF.\n var chunk = this._source.read();\n if (chunk) this.push(chunk);\n }\n};\n\n// Usage:\nvar parser = new SimpleProtocol(source);\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.\n```\n\n### readable.wrap(stream)\n\n* `stream` {Stream} An \"old style\" readable stream\n\nIf you are using an older Node library that emits `'data'` events and\nhas a `pause()` method that is advisory only, then you can use the\n`wrap()` method to create a Readable stream that uses the old stream\nas its data source.\n\nFor example:\n\n```javascript\nvar OldReader = require('./old-api-module.js').OldReader;\nvar oreader = new OldReader;\nvar Readable = require('stream').Readable;\nvar myReader = new Readable().wrap(oreader);\n\nmyReader.on('readable', function() {\n myReader.read(); // etc.\n});\n```\n\n### Event: 'readable'\n\nWhen there is data ready to be consumed, this event will fire.\n\nWhen this event emits, call the `read()` method to consume the data.\n\n### Event: 'end'\n\nEmitted when the stream has received an EOF (FIN in TCP terminology).\nIndicates that no more `'data'` events will happen. If the stream is\nalso writable, it may be possible to continue writing.\n\n### Event: 'data'\n\nThe `'data'` event emits either a `Buffer` (by default) or a string if\n`setEncoding()` was used.\n\nNote that adding a `'data'` event listener will switch the Readable\nstream into \"old mode\", where data is emitted as soon as it is\navailable, rather than waiting for you to call `read()` to consume it.\n\n### Event: 'error'\n\nEmitted if there was an error receiving data.\n\n### Event: 'close'\n\nEmitted when the underlying resource (for example, the backing file\ndescriptor) has been closed. Not all streams will emit this.\n\n### readable.setEncoding(encoding)\n\nMakes the `'data'` event emit a string instead of a `Buffer`. `encoding`\ncan be `'utf8'`, `'utf16le'` (`'ucs2'`), `'ascii'`, or `'hex'`.\n\nThe encoding can also be set by specifying an `encoding` field to the\nconstructor.\n\n### readable.read([size])\n\n* `size` {Number | null} Optional number of bytes to read.\n* Return: {Buffer | String | null}\n\nNote: **This function SHOULD be called by Readable stream users.**\n\nCall this method to consume data once the `'readable'` event is\nemitted.\n\nThe `size` argument will set a minimum number of bytes that you are\ninterested in. If not set, then the entire content of the internal\nbuffer is returned.\n\nIf there is no data to consume, or if there are fewer bytes in the\ninternal buffer than the `size` argument, then `null` is returned, and\na future `'readable'` event will be emitted when more is available.\n\nCalling `stream.read(0)` will always return `null`, and will trigger a\nrefresh of the internal buffer, but otherwise be a no-op.\n\n### readable.pipe(destination, [options])\n\n* `destination` {Writable Stream}\n* `options` {Object} Optional\n * `end` {Boolean} Default=true\n\nConnects this readable stream to `destination` WriteStream. Incoming\ndata on this stream gets written to `destination`. Properly manages\nback-pressure so that a slow destination will not be overwhelmed by a\nfast readable stream.\n\nThis function returns the `destination` stream.\n\nFor example, emulating the Unix `cat` command:\n\n process.stdin.pipe(process.stdout);\n\nBy default `end()` is called on the destination when the source stream\nemits `end`, so that `destination` is no longer writable. Pass `{ end:\nfalse }` as `options` to keep the destination stream open.\n\nThis keeps `writer` open so that \"Goodbye\" can be written at the\nend.\n\n reader.pipe(writer, { end: false });\n reader.on(\"end\", function() {\n writer.end(\"Goodbye\\n\");\n });\n\nNote that `process.stderr` and `process.stdout` are never closed until\nthe process exits, regardless of the specified options.\n\n### readable.unpipe([destination])\n\n* `destination` {Writable Stream} Optional\n\nUndo a previously established `pipe()`. If no destination is\nprovided, then all previously established pipes are removed.\n\n### readable.pause()\n\nSwitches the readable stream into \"old mode\", where data is emitted\nusing a `'data'` event rather than being buffered for consumption via\nthe `read()` method.\n\nCeases the flow of data. No `'data'` events are emitted while the\nstream is in a paused state.\n\n### readable.resume()\n\nSwitches the readable stream into \"old mode\", where data is emitted\nusing a `'data'` event rather than being buffered for consumption via\nthe `read()` method.\n\nResumes the incoming `'data'` events after a `pause()`.\n\n\n## Class: stream.Writable\n\n\n\nA `Writable` Stream has the following methods, members, and events.\n\nNote that `stream.Writable` is an abstract class designed to be\nextended with an underlying implementation of the\n`_write(chunk, encoding, cb)` method. (See below.)\n\n### new stream.Writable([options])\n\n* `options` {Object}\n * `highWaterMark` {Number} Buffer level when `write()` starts\n returning false. Default=16kb\n * `decodeStrings` {Boolean} Whether or not to decode strings into\n Buffers before passing them to `_write()`. Default=true\n\nIn classes that extend the Writable class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### writable.\\_write(chunk, encoding, callback)\n\n* `chunk` {Buffer | String} The chunk to be written. Will always\n be a buffer unless the `decodeStrings` option was set to `false`.\n* `encoding` {String} If the chunk is a string, then this is the\n encoding type. Ignore chunk is a buffer. Note that chunk will\n **always** be a buffer unless the `decodeStrings` option is\n explicitly set to `false`.\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done processing the supplied chunk.\n\nAll Writable stream implementations must provide a `_write` method to\nsend data to the underlying resource.\n\nNote: **This function MUST NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Writable\nclass methods only.\n\nCall the callback using the standard `callback(error)` pattern to\nsignal that the write completed successfully or with an error.\n\nIf the `decodeStrings` flag is set in the constructor options, then\n`chunk` may be a string rather than a Buffer, and `encoding` will\nindicate the sort of string that it is. This is to support\nimplementations that have an optimized handling for certain string\ndata encodings. If you do not explicitly set the `decodeStrings`\noption to `false`, then you can safely ignore the `encoding` argument,\nand assume that `chunk` will always be a Buffer.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n\n### writable.write(chunk, [encoding], [callback])\n\n* `chunk` {Buffer | String} Data to be written\n* `encoding` {String} Optional. If `chunk` is a string, then encoding\n defaults to `'utf8'`\n* `callback` {Function} Optional. Called when this chunk is\n successfully written.\n* Returns {Boolean}\n\nWrites `chunk` to the stream. Returns `true` if the data has been\nflushed to the underlying resource. Returns `false` to indicate that\nthe buffer is full, and the data will be sent out in the future. The\n`'drain'` event will indicate when the buffer is empty again.\n\nThe specifics of when `write()` will return false, is determined by\nthe `highWaterMark` option provided to the constructor.\n\n### writable.end([chunk], [encoding], [callback])\n\n* `chunk` {Buffer | String} Optional final data to be written\n* `encoding` {String} Optional. If `chunk` is a string, then encoding\n defaults to `'utf8'`\n* `callback` {Function} Optional. Called when the final chunk is\n successfully written.\n\nCall this method to signal the end of the data being written to the\nstream.\n\n### Event: 'drain'\n\nEmitted when the stream's write queue empties and it's safe to write\nwithout buffering again. Listen for it when `stream.write()` returns\n`false`.\n\n### Event: 'close'\n\nEmitted when the underlying resource (for example, the backing file\ndescriptor) has been closed. Not all streams will emit this.\n\n### Event: 'finish'\n\nWhen `end()` is called and there are no more chunks to write, this\nevent is emitted.\n\n### Event: 'pipe'\n\n* `source` {Readable Stream}\n\nEmitted when the stream is passed to a readable stream's pipe method.\n\n### Event 'unpipe'\n\n* `source` {Readable Stream}\n\nEmitted when a previously established `pipe()` is removed using the\nsource Readable stream's `unpipe()` method.\n\n## Class: stream.Duplex\n\n\n\nA \"duplex\" stream is one that is both Readable and Writable, such as a\nTCP socket connection.\n\nNote that `stream.Duplex` is an abstract class designed to be\nextended with an underlying implementation of the `_read(size)`\nand `_write(chunk, encoding, callback)` methods as you would with a Readable or\nWritable stream class.\n\nSince JavaScript doesn't have multiple prototypal inheritance, this\nclass prototypally inherits from Readable, and then parasitically from\nWritable. It is thus up to the user to implement both the lowlevel\n`_read(n)` method as well as the lowlevel `_write(chunk, encoding, cb)` method\non extension duplex classes.\n\n### new stream.Duplex(options)\n\n* `options` {Object} Passed to both Writable and Readable\n constructors. Also has the following fields:\n * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then\n the stream will automatically end the readable side when the\n writable side ends and vice versa.\n\nIn classes that extend the Duplex class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n## Class: stream.Transform\n\nA \"transform\" stream is a duplex stream where the output is causally\nconnected in some way to the input, such as a zlib stream or a crypto\nstream.\n\nThere is no requirement that the output be the same size as the input,\nthe same number of chunks, or arrive at the same time. For example, a\nHash stream will only ever have a single chunk of output which is\nprovided when the input is ended. A zlib stream will either produce\nmuch smaller or much larger than its input.\n\nRather than implement the `_read()` and `_write()` methods, Transform\nclasses must implement the `_transform()` method, and may optionally\nalso implement the `_flush()` method. (See below.)\n\n### new stream.Transform([options])\n\n* `options` {Object} Passed to both Writable and Readable\n constructors.\n\nIn classes that extend the Transform class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### transform.\\_transform(chunk, encoding, callback)\n\n* `chunk` {Buffer | String} The chunk to be transformed. Will always\n be a buffer unless the `decodeStrings` option was set to `false`.\n* `encoding` {String} If the chunk is a string, then this is the\n encoding type. (Ignore if `decodeStrings` chunk is a buffer.)\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done processing the supplied chunk.\n\nNote: **This function MUST NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Transform\nclass methods only.\n\nAll Transform stream implementations must provide a `_transform`\nmethod to accept input and produce output.\n\n`_transform` should do whatever has to be done in this specific\nTransform class, to handle the bytes being written, and pass them off\nto the readable portion of the interface. Do asynchronous I/O,\nprocess things, and so on.\n\nCall `transform.push(outputChunk)` 0 or more times to generate output\nfrom this input chunk, depending on how much data you want to output\nas a result of this chunk.\n\nCall the callback function only when the current chunk is completely\nconsumed. Note that there may or may not be output as a result of any\nparticular input chunk.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n### transform.\\_flush(callback)\n\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done flushing any remaining data.\n\nNote: **This function MUST NOT be called directly.** It MAY be implemented\nby child classes, and if so, will be called by the internal Transform\nclass methods only.\n\nIn some cases, your transform operation may need to emit a bit more\ndata at the end of the stream. For example, a `Zlib` compression\nstream will store up some internal state so that it can optimally\ncompress the output. At the end, however, it needs to do the best it\ncan with what is left, so that the data will be complete.\n\nIn those cases, you can implement a `_flush` method, which will be\ncalled at the very end, after all the written data is consumed, but\nbefore emitting `end` to signal the end of the readable side. Just\nlike with `_transform`, call `transform.push(chunk)` zero or more\ntimes, as appropriate, and call `callback` when the flush operation is\ncomplete.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n### Example: `SimpleProtocol` parser\n\nThe example above of a simple protocol parser can be implemented much\nmore simply by using the higher level `Transform` stream class.\n\nIn this example, rather than providing the input as an argument, it\nwould be piped into the parser, which is a more idiomatic Node stream\napproach.\n\n```javascript\nfunction SimpleProtocol(options) {\n if (!(this instanceof SimpleProtocol))\n return new SimpleProtocol(options);\n\n Transform.call(this, options);\n this._inBody = false;\n this._sawFirstCr = false;\n this._rawHeader = [];\n this.header = null;\n}\n\nSimpleProtocol.prototype = Object.create(\n Transform.prototype, { constructor: { value: SimpleProtocol }});\n\nSimpleProtocol.prototype._transform = function(chunk, encoding, done) {\n if (!this._inBody) {\n // check if the chunk has a \\n\\n\n var split = -1;\n for (var i = 0; i < chunk.length; i++) {\n if (chunk[i] === 10) { // '\\n'\n if (this._sawFirstCr) {\n split = i;\n break;\n } else {\n this._sawFirstCr = true;\n }\n } else {\n this._sawFirstCr = false;\n }\n }\n\n if (split === -1) {\n // still waiting for the \\n\\n\n // stash the chunk, and try again.\n this._rawHeader.push(chunk);\n } else {\n this._inBody = true;\n var h = chunk.slice(0, split);\n this._rawHeader.push(h);\n var header = Buffer.concat(this._rawHeader).toString();\n try {\n this.header = JSON.parse(header);\n } catch (er) {\n this.emit('error', new Error('invalid simple protocol data'));\n return;\n }\n // and let them know that we are done parsing the header.\n this.emit('header', this.header);\n\n // now, because we got some extra data, emit this first.\n this.push(b);\n }\n } else {\n // from there on, just provide the data to our consumer as-is.\n this.push(b);\n }\n done();\n};\n\nvar parser = new SimpleProtocol();\nsource.pipe(parser)\n\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.\n```\n\n\n## Class: stream.PassThrough\n\nThis is a trivial implementation of a `Transform` stream that simply\npasses the input bytes across to the output. Its purpose is mainly\nfor examples and testing, but there are occasionally use cases where\nit can come in handy.\n\n\n[EventEmitter]: events.html#events_class_events_eventemitter\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/readable-stream/issues" - }, - "homepage": "https://github.com/isaacs/readable-stream", - "_id": "readable-stream@1.1.10", - "_from": "readable-stream@~1.1.9" -} diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/passthrough.js b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a5..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/readable.js b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/readable.js deleted file mode 100644 index 09b8bf50..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,7 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = require('stream'); -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/transform.js b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f07..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/writable.js b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efdf..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/.npmignore b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/.npmignore deleted file mode 100644 index 07e6e472..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/.npmignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/README.md b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/README.md deleted file mode 100644 index 8d6a1928..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# stream-counter - -Keep track of how many bytes have been written to a stream. - -## Usage - -```js -var StreamCounter = require('stream-counter'); -var counter = new StreamCounter(); -counter.on('progress', function() { - console.log("progress", counter.bytes); -}); -fs.createReadStream('foo.txt').pipe(counter); -``` diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/index.js b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/index.js deleted file mode 100644 index c490c2db..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/index.js +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = ByteCounter; - -var Writable = require('readable-stream').Writable; -var util = require('util'); - -util.inherits(ByteCounter, Writable); -function ByteCounter(options) { - Writable.call(this, options); - this.bytes = 0; -} - -ByteCounter.prototype._write = function(chunk, encoding, cb) { - this.bytes += chunk.length; - this.emit('progress'); - cb(); -}; diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/package.json b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/package.json deleted file mode 100644 index 1453933a..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "stream-counter", - "version": "0.2.0", - "description": "keeps track of how many bytes have been written to a stream", - "main": "index.js", - "scripts": { - "test": "node test/test.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/superjoe30/node-stream-counter.git" - }, - "author": { - "name": "Andrew Kelley", - "email": "superjoe30@gmail.com" - }, - "license": "BSD", - "engines": { - "node": ">=0.8.0" - }, - "dependencies": { - "readable-stream": "~1.1.8" - }, - "readme": "# stream-counter\n\nKeep track of how many bytes have been written to a stream.\n\n## Usage\n\n```js\nvar StreamCounter = require('stream-counter');\nvar counter = new StreamCounter();\ncounter.on('progress', function() {\n console.log(\"progress\", counter.bytes);\n});\nfs.createReadStream('foo.txt').pipe(counter);\n```\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/superjoe30/node-stream-counter/issues" - }, - "homepage": "https://github.com/superjoe30/node-stream-counter", - "_id": "stream-counter@0.2.0", - "_from": "stream-counter@~0.2.0" -} diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/test/test.js b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/test/test.js deleted file mode 100644 index 0da95660..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/test/test.js +++ /dev/null @@ -1,20 +0,0 @@ -var ByteCounter = require('../'); -var fs = require('fs'); -var path = require('path'); -var assert = require('assert'); - -var counter = new ByteCounter(); -var remainingTests = 2; -counter.once('progress', function() { - assert.strictEqual(counter.bytes, 5); - remainingTests -= 1; -}); -var is = fs.createReadStream(path.join(__dirname, 'test.txt')); -is.pipe(counter); -is.on('end', function() { - remainingTests -= 1; - assert.strictEqual(counter.bytes, 5); -}); -process.on('exit', function() { - assert.strictEqual(remainingTests, 0); -}); diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/test/test.txt b/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/test/test.txt deleted file mode 100644 index 81c545ef..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/stream-counter/test/test.txt +++ /dev/null @@ -1 +0,0 @@ -1234 diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/package.json b/node_modules/express/node_modules/connect/node_modules/multiparty/package.json deleted file mode 100644 index a1d429c7..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "multiparty", - "version": "2.2.0", - "description": "multipart/form-data parser which supports streaming", - "repository": { - "type": "git", - "url": "git@github.com:superjoe30/node-multiparty.git" - }, - "keywords": [ - "file", - "upload", - "formidable", - "stream", - "s3" - ], - "devDependencies": { - "findit": "0.1.1", - "hashish": "0.0.4", - "mocha": "~1.8.2", - "request": "~2.16.6", - "mkdirp": "~0.3.5", - "superagent": "~0.14.1" - }, - "scripts": { - "test": "ulimit -n 500 && mocha --timeout 4000 --reporter spec --recursive test/test.js" - }, - "engines": { - "node": ">=0.8.0" - }, - "license": "MIT", - "dependencies": { - "readable-stream": "~1.1.9", - "stream-counter": "~0.2.0" - }, - "readme": "[![Build Status](https://travis-ci.org/superjoe30/node-multiparty.png?branch=master)](https://travis-ci.org/superjoe30/node-multiparty)\n# multiparty\n\nParse http requests with content-type `multipart/form-data`, also known as file uploads.\n\nSee also [busboy](https://github.com/mscdex/busboy) - a\n[faster](https://github.com/mscdex/dicer/wiki/Benchmarks) alternative\nwhich may be worth looking into.\n\n### Why the fork?\n\n * This module uses the Node.js v0.10 streams properly, *even in Node.js v0.8*\n * It will not create a temp file for you unless you want it to.\n * Counts bytes and does math to help you figure out the `Content-Length` of\n each part.\n * You can easily stream uploads to s3 with\n [knox](https://github.com/LearnBoost/knox), for [example](examples/s3.js).\n * Less bugs. This code is simpler, has all deprecated functionality removed,\n has cleaner tests, and does not try to do anything beyond multipart stream\n parsing.\n\n## Installation\n\n```\nnpm install multiparty\n```\n\n## Usage\n\n * See [examples](examples).\n\nParse an incoming `multipart/form-data` request.\n\n```js\nvar multiparty = require('multiparty')\n , http = require('http')\n , util = require('util')\n\nhttp.createServer(function(req, res) {\n if (req.url === '/upload' && req.method === 'POST') {\n // parse a file upload\n var form = new multiparty.Form();\n\n form.parse(req, function(err, fields, files) {\n res.writeHead(200, {'content-type': 'text/plain'});\n res.write('received upload:\\n\\n');\n res.end(util.inspect({fields: fields, files: files}));\n });\n\n return;\n }\n\n // show a file upload form\n res.writeHead(200, {'content-type': 'text/html'});\n res.end(\n '
    '+\n '
    '+\n '
    '+\n ''+\n '
    '\n );\n}).listen(8080);\n```\n\n## API\n\n### multiparty.Form\n```js\nvar form = new multiparty.Form(options)\n```\nCreates a new form. Options:\n\n * `encoding` - sets encoding for the incoming form fields. Defaults to `utf8`.\n * `maxFieldSize` - Limits the amount of memory a field (not a file) can\n allocate in bytes. If this value is exceeded, an `error` event is emitted.\n The default size is 2MB.\n * `maxFields` - Limits the number of fields that will be parsed before\n emitting an `error` event. A file counts as a field in this case.\n Defaults to 1000.\n * `autoFields` - Enables `field` events. This is automatically set to `true`\n if you add a `field` listener.\n * `autoFiles` - Enables `file` events. This is automatically set to `true`\n if you add a `file` listener.\n * `uploadDir` - Only relevant when `autoFiles` is `true`. The directory for\n placing file uploads in. You can move them later using `fs.rename()`.\n Defaults to `os.tmpDir()`.\n * `hash` - Only relevant when `autoFiles` is `true`. If you want checksums\n calculated for incoming files, set this to either `sha1` or `md5`.\n Defaults to off.\n\n#### form.parse(request, [cb])\n\nParses an incoming node.js `request` containing form data. If `cb` is\nprovided, `autoFields` and `autoFiles` are set to `true` and all fields and\nfiles are collected and passed to the callback:\n\n```js\nform.parse(req, function(err, fieldsObject, filesObject, fieldsList, filesList) {\n // ...\n});\n```\n\nIt is often convenient to access a field or file by name. In this situation,\nuse `fieldsObject` or `filesObject`. However sometimes, as in the case of a\n`` the multipart stream will contain\nmultiple files of the same input name, and you are interested in all of them.\nIn this case, use `filesList`.\n\nAnother example is when you do not care what the field name of a file is; you\nare merely interested in a single upload. In this case, set `maxFields` to 1\n(assuming no other fields expected besides the file) and use `filesList[0]`.\n\n#### form.bytesReceived\n\nThe amount of bytes received for this form so far.\n\n#### form.bytesExpected\n\nThe expected number of bytes in this form.\n\n### Events\n\n#### 'error' (err)\n\nYou definitely want to handle this event. If not your server *will* crash when\nusers submit bogus multipart requests!\n\n#### 'part' (part)\n\nEmitted when a part is encountered in the request. `part` is a\n`ReadableStream`. It also has the following properties:\n\n * `headers` - the headers for this part. For example, you may be interested\n in `content-type`.\n * `name` - the field name for this part\n * `filename` - only if the part is an incoming file\n * `byteOffset` - the byte offset of this part in the request body\n * `byteCount` - assuming that this is the last part in the request,\n this is the size of this part in bytes. You could use this, for\n example, to set the `Content-Length` header if uploading to S3.\n If the part had a `Content-Length` header then that value is used\n here instead.\n\n#### 'aborted'\n\nEmitted when the request is aborted. This event will be followed shortly\nby an `error` event. In practice you do not need to handle this event.\n\n#### 'progress' (bytesReceived, bytesExpected)\n\n#### 'close'\n\nEmitted after all parts have been parsed and emitted. Not emitted if an `error`\nevent is emitted. This is typically when you would send your response.\n\n#### 'file' (name, file)\n\n**By default multiparty will not touch your hard drive.** But if you add this\nlistener, multiparty automatically sets `form.autoFiles` to `true` and will\nstream uploads to disk for you. \n\n * `name` - the field name for this file\n * `file` - an object with these properties:\n - `fieldName` - same as `name` - the field name for this file\n - `originalFilename` - the filename that the user reports for the file\n - `path` - the absolute path of the uploaded file on disk\n - `headers` - the HTTP headers that were sent along with this file\n - `size` - size of the file in bytes\n\nIf you set the `form.hash` option, then `file` will also contain a `hash`\nproperty which is the checksum of the file.\n\n#### 'field' (name, value)\n\n * `name` - field name\n * `value` - string field value\n\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/superjoe30/node-multiparty/issues" - }, - "homepage": "https://github.com/superjoe30/node-multiparty", - "_id": "multiparty@2.2.0", - "dist": { - "shasum": "6f771955f8cffe3d08937a9592db04e1573bfb34" - }, - "_from": "multiparty@2.2.0", - "_resolved": "https://registry.npmjs.org/multiparty/-/multiparty-2.2.0.tgz" -} diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/bench-multipart-parser.js b/node_modules/express/node_modules/connect/node_modules/multiparty/test/bench-multipart-parser.js deleted file mode 100644 index ee5dbad4..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/bench-multipart-parser.js +++ /dev/null @@ -1,76 +0,0 @@ -var assert = require('assert') - , Form = require('../').Form - , boundary = '-----------------------------168072824752491622650073' - , mb = 100 - , buffer = createMultipartBuffer(boundary, mb * 1024 * 1024) - -var callbacks = { - partBegin: -1, - partEnd: -1, - headerField: -1, - headerValue: -1, - partData: -1, - end: -1, -}; - -var form = new Form({ boundary: boundary }); - -hijack('onParseHeaderField', function() { - callbacks.headerField++; -}); - -hijack('onParseHeaderValue', function() { - callbacks.headerValue++; -}); - -hijack('onParsePartBegin', function() { - callbacks.partBegin++; -}); - -hijack('onParsePartData', function() { - callbacks.partData++; -}); - -hijack('onParsePartEnd', function() { - callbacks.partEnd++; -}); - -form.on('finish', function() { - callbacks.end++; -}); - -var start = new Date(); -form.write(buffer, function(err) { - var duration = new Date() - start; - assert.ifError(err); - var mbPerSec = (mb / (duration / 1000)).toFixed(2); - console.log(mbPerSec+' mb/sec'); -}); - -process.on('exit', function() { - for (var k in callbacks) { - assert.equal(0, callbacks[k], k+' count off by '+callbacks[k]); - } -}); - -function createMultipartBuffer(boundary, size) { - var head = - '--'+boundary+'\r\n' + - 'content-disposition: form-data; name="field1"\r\n' + - '\r\n' - , tail = '\r\n--'+boundary+'--\r\n' - , buffer = new Buffer(size); - - buffer.write(head, 'ascii', 0); - buffer.write(tail, 'ascii', buffer.length - tail.length); - return buffer; -} - -function hijack(name, fn) { - var oldFn = form[name]; - form[name] = function() { - fn(); - return oldFn.apply(this, arguments); - }; -} - diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/file/beta-sticker-1.png b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/file/beta-sticker-1.png deleted file mode 100644 index 20b1a7f1..00000000 Binary files a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/file/beta-sticker-1.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/file/binaryfile.tar.gz b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/file/binaryfile.tar.gz deleted file mode 100644 index 4a85af7a..00000000 Binary files a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/file/binaryfile.tar.gz and /dev/null differ diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/file/blank.gif b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/file/blank.gif deleted file mode 100755 index 75b945d2..00000000 Binary files a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/file/blank.gif and /dev/null differ diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/file/funkyfilename.txt b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/file/funkyfilename.txt deleted file mode 100644 index e7a4785e..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/file/funkyfilename.txt +++ /dev/null @@ -1 +0,0 @@ -I am a text file with a funky name! diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/file/menu_separator.png b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/file/menu_separator.png deleted file mode 100644 index 1c16a71e..00000000 Binary files a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/file/menu_separator.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/file/pf1y5.png b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/file/pf1y5.png deleted file mode 100644 index 44d60175..00000000 Binary files a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/file/pf1y5.png and /dev/null differ diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/file/plain.txt b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/file/plain.txt deleted file mode 100644 index 9b6903e2..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/file/plain.txt +++ /dev/null @@ -1 +0,0 @@ -I am a plain text file diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/encoding/beta-sticker-1.png.http b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/encoding/beta-sticker-1.png.http deleted file mode 100644 index 833b83ca..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/encoding/beta-sticker-1.png.http +++ /dev/null @@ -1,12 +0,0 @@ -POST /upload HTTP/1.1 -Host: localhost:8080 -Content-Type: multipart/form-data; boundary=\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ -Content-Length: 2483 - ---\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ -Content-Disposition: form-data; name="sticker"; filename="beta-sticker-1.png" -Content-Type: image/png -Content-Transfer-Encoding: base64 - -iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABh5JREFUeNrMmHtIHEcYwGfv5SNwaovxEanEiJKqlYCCTRo1f0SvDeof1legEcE/YttQaNOiaQjYFFtpKaJILZU8SCRUWqlJGpoWepGLTXqUEnzFxCrnK9DEelbvvPOe/WacuY7r7HmGFjrwsbNzt7u//V7zfYvQ/2xI/9K1/NyvMP9PgCTuGmmL6/0ckD9UOGmbIExUsqMkAPHJjv5QwKRtgKioqDlh5+w/7IFeCuLlxCeA2zQ0IcCwh2qoaLH09fUdTElJ2e/1elU+n0/y+9fvPz4+fvfYsWN3YOoBcXPiocLghD4mBYHhQTCErqWlZU9FRcXJqKiowyqVSk/uSEH4o8fjWVlYWDB2d3e3d3R0WGB5jYqLg/NyGgsKxMNgkDB4451NTU3vxcXF1SlBKB0tFsuVxsbGjlu3bj2GJQeIk8K5RVBqBTMxrYRfuHAh9/jx4+ejo6MPS9I6f6hHPOC6rOLi4vyVlZXf7t27Z5c5/iZfkgMxxyUwFy9ezC0tLe3V6XRJ/MOCAYjWwsLCni0oKCh98uSJaWhoyMZFn0/uT2qBqYi/1NbWxjc0NJwPFUYExc/B53R5eXk5ZrN5YH5+3slFn5+D2uBDzG90IJETExOtzGdC9RelNf78wYMH3xQWFn4Ep0sgyyCr1NmJP6kEIa5tbW3dEx8fXxeKRoJpT76OR3p6enllZWUKTCOwNalFAglWDkTCvLq6+uR2YYKZSw4GQVKNfZQCafjkqhKYTBsTE3NY/uYi2Q4MP5KTkw9QGB3VEMv6G/YioqFLly5lazQavfytxobnUW+PWTGisIyNPEL3QYLB4PPIyMi4EydO7JUBbTIZ0RDYOFPkE8t/OdHczCK6Y/qdzP8BfUTW8Tj/uQndvT1F5vOzVvTLz1PwX4cQbt++fekURsNpSNLIw16v1z/HLsRRgecsSnovm8nxs5bvUe+NN1Bz47fkfBaAXj2aA2BWEsM/3hhFX1/5Fe3NTEAfvn8NXTO+tSH68IiNjU2Qw/AmCzg2XCQp+YyhJAu9c+pl9GJ+KmhiEt38bhjpoyJQRtYudA60k3dwD6o4mouKjmSiolcy0ArRqnXz3rT+knwFEShhNKLNlmmFP7Kf8XxuehHpj0QQmLdPGch/ioYyCSAe57pMaHnJgcprctDdwUkRjKi8CUTWhipvbm7uvlJo3zFNoHJDOznPeGEXqn+9EBUf+AQZXvqU+BEG/KCpHz2flYh+ALO9++ZX5L/Mj3gfevjw4ZRoP+PzD/b4HadPn844c+aMkb0F1DqIz9byzBvquXytvr6+7vr16+Ow9CfN2njjdfFAWpo9o2FnNmm12kQMw24gcvSnhbHb7Y+huHsNlhapLNHSxK3idlq287qhhrkKlSByOBzIZrPhGyCn04ncbjfRGAMV5ZlQxvDw8E+yYi1Q3qpleYjUQlNTU5aysrJqgNBhIAwGVSDCkFj48BVFULA1eCl7XV3dx1CKYK3YqKnY7u9Ti2royclJ76FDh1YhxefgsoFpCIOtra0RuGBQwYbRaLzc1dVlpjA2ZiqmKbWsDAmEYU9Pz8Tg4OCNoqKixNTU1BQostDq6iqBcrlcRBiYfEff1KBR+OnpabPBYOikWlnhtOOWm0zUffpnZ2ednZ2dJtCYMTs7+xkA2x0eHk6gsMYwFPYr/EC1Wo2LMEWzWa1WC1QRZ8FUVgpj42ohD3umWqHjRFxf5RkZGVkCNQ9CcTWQn5+flpSUtBOiMKAt7Fek/FSAmpmZMVdVVZ0dGxv7g4PhteMVlbBIofv0sh4Lbmhtb2+/Cbv1eFpaWmJCQsJODMO0hGGgUghAAay9v7//i5KSki9lmmG+4+Jg/MHaIH6f0dCkqaNFFc5VkViam5v319TUNEDdvRubEGsNYHGqsAwMDFxta2u7DdpdpA+3c+LgWiHfVkCiFnpDw0iLqwgqO6BVKoPo00K6WIDsOzE6OrpE395FzeLgxMn5jVe0dYTa26s5jfFg4VR0nAuwNtrFda1rgmToD6VzVWq3eTPyYAxOwwH5gvT2PiWY7X4fUgJTywp1fivyyL6E+Lb6XvQ0X9AkBeeXZED+p/k+9LcAAwAXm3hBLzoZPAAAAABJRU5ErkJggg== ---\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/-- diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/encoding/binaryfile.tar.gz.http b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/encoding/binaryfile.tar.gz.http deleted file mode 100644 index 4f4fadb0..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/encoding/binaryfile.tar.gz.http +++ /dev/null @@ -1,12 +0,0 @@ -POST /upload HTTP/1.1 -Host: localhost:8080 -Content-Type: multipart/form-data; boundary=\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ -Content-Length: 676 - ---\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ -Content-Disposition: form-data; name="file"; filename="binaryfile.tar.gz" -Content-Type: application/x-gzip -Content-Transfer-Encoding: base64 - -H4sIAGiNIU8AA+3R0W6CMBQGYK59iobLZantRDG73osUOGqnFNJWM2N897UghG1ZdmWWLf93U/jP4bRAq8q92hJ/dY1J7kQEqyyLq8yXYrp2ltkqkTKXYiEykYc++ZTLVcLEvQ40dXReWcYSV1pdnL/v+6n+R11mjKVG1ZQ+s3TT2FpXqjhQ+hjzE1mnGxNLkgu+7tOKWjIVmVKTC6XL9ZaeXj4VQhwKWzL+cI4zwgQuuhkh3mhTad/Hkssh3im3027X54JnQ360R/M19OT8kC7SEN7Ooi2VvrEfznHQRWzl83gxttZKmzGehzPRW/+W8X+3fvL8sFet9sS6m3EIma02071MU3Uf9KHrmV1/+y8DAAAAAAAAAAAAAAAAAAAAAMB/9A6txIuJACgAAA== ---\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/-- diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/encoding/blank.gif.http b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/encoding/blank.gif.http deleted file mode 100644 index 7426f5b6..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/encoding/blank.gif.http +++ /dev/null @@ -1,12 +0,0 @@ -POST /upload HTTP/1.1 -Host: localhost:8080 -Content-Type: multipart/form-data; boundary=\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ -Content-Length: 323 - ---\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ -Content-Disposition: form-data; name="file"; filename="blank.gif" -Content-Type: image/gif -Content-Transfer-Encoding: base64 - -R0lGODlhAQABAJH/AP///wAAAMDAwAAAACH5BAEAAAIALAAAAAABAAEAAAICVAEAOw== ---\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/-- diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/encoding/menu_seperator.png.http b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/encoding/menu_seperator.png.http deleted file mode 100644 index d08fd37e..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/encoding/menu_seperator.png.http +++ /dev/null @@ -1,12 +0,0 @@ -POST /upload HTTP/1.1 -Host: localhost:8080 -Content-Type: multipart/form-data; boundary=\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ -Content-Length: 1509 - ---\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ -Content-Disposition: form-data; name="image"; filename="menu_separator.png" -Content-Type: image/png -Content-Transfer-Encoding: base64 - -iVBORw0KGgoAAAANSUhEUgAAAAIAAAAYCAIAAABfmbuOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDcxODNBNzJERDcyMTFFMUFBOEVFNDQzOTA0MDJDMjQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDcxODNBNzNERDcyMTFFMUFBOEVFNDQzOTA0MDJDMjQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNzE4M0E3MERENzIxMUUxQUE4RUU0NDM5MDQwMkMyNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzE4M0E3MURENzIxMUUxQUE4RUU0NDM5MDQwMkMyNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pmvhbb8AAAAXSURBVHjaYnHk9PON8WJiAIPBSwEEGAAPrgG+VozFWgAAAABJRU5ErkJggg== ---\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/-- diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/encoding/pf1y5.png.http b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/encoding/pf1y5.png.http deleted file mode 100644 index 20c2c2df..00000000 Binary files a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/encoding/pf1y5.png.http and /dev/null differ diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/encoding/plain.txt.http b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/encoding/plain.txt.http deleted file mode 100644 index 5e85ad6b..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/encoding/plain.txt.http +++ /dev/null @@ -1,13 +0,0 @@ -POST /upload HTTP/1.1 -Host: localhost:8080 -Content-Type: multipart/form-data; boundary=----TLV0SrKD4z1TRxRhAPUvZ -Content-Length: 221 - -------TLV0SrKD4z1TRxRhAPUvZ -Content-Disposition: form-data; name="file"; filename="plain.txt" -Content-Type: text/plain -Content-Transfer-Encoding: 7bit - -I am a plain text file - -------TLV0SrKD4z1TRxRhAPUvZ-- diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/no-filename/filename-name.http b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/no-filename/filename-name.http deleted file mode 100644 index 43672a32..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/no-filename/filename-name.http +++ /dev/null @@ -1,13 +0,0 @@ -POST /upload HTTP/1.1 -Host: localhost:8080 -Content-Type: multipart/form-data; boundary=----WebKitFormBoundarytyE4wkKlZ5CQJVTG -Content-Length: 1000 - -------WebKitFormBoundarytyE4wkKlZ5CQJVTG -Content-Disposition: form-data; filename="plain.txt"; name="upload" -Content-Type: text/plain - -I am a plain text file - -------WebKitFormBoundarytyE4wkKlZ5CQJVTG-- - diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/no-filename/generic.http b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/no-filename/generic.http deleted file mode 100644 index e0dee27c..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/no-filename/generic.http +++ /dev/null @@ -1,13 +0,0 @@ -POST /upload HTTP/1.1 -Host: localhost:8080 -Content-Type: multipart/form-data; boundary=----WebKitFormBoundarytyE4wkKlZ5CQJVTG -Content-Length: 1000 - -------WebKitFormBoundarytyE4wkKlZ5CQJVTG -Content-Disposition: form-data; name="upload"; filename="" -Content-Type: text/plain - -I am a plain text file - -------WebKitFormBoundarytyE4wkKlZ5CQJVTG-- - diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/preamble/crlf.http b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/preamble/crlf.http deleted file mode 100644 index 1d5f7095..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/preamble/crlf.http +++ /dev/null @@ -1,13 +0,0 @@ -POST /upload HTTP/1.1 -Host: localhost:8080 -Content-Type: multipart/form-data; boundary=----TLV0SrKD4z1TRxRhAPUvZ -Content-Length: 184 - - -------TLV0SrKD4z1TRxRhAPUvZ -Content-Disposition: form-data; name="upload"; filename="plain.txt" -Content-Type: text/plain - -I am a plain text file - -------TLV0SrKD4z1TRxRhAPUvZ-- diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/preamble/preamble.http b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/preamble/preamble.http deleted file mode 100644 index d14d4330..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/preamble/preamble.http +++ /dev/null @@ -1,13 +0,0 @@ -POST /upload HTTP/1.1 -Host: localhost:8080 -Content-Type: multipart/form-data; boundary=----TLV0SrKD4z1TRxRhAPUvZ -Content-Length: 226 - -This is a preamble which should be ignored -------TLV0SrKD4z1TRxRhAPUvZ -Content-Disposition: form-data; name="upload"; filename="plain.txt" -Content-Type: text/plain - -I am a plain text file - -------TLV0SrKD4z1TRxRhAPUvZ-- diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/special-chars-in-filename/info.md b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/special-chars-in-filename/info.md deleted file mode 100644 index 3c9dbe3d..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/special-chars-in-filename/info.md +++ /dev/null @@ -1,3 +0,0 @@ -* Opera does not allow submitting this file, it shows a warning to the - user that the file could not be found instead. Tested in 9.8, 11.51 on OSX. - Reported to Opera on 08.09.2011 (tracking email DSK-346009@bugs.opera.com). diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/special-chars-in-filename/osx-chrome-13.http b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/special-chars-in-filename/osx-chrome-13.http deleted file mode 100644 index 4ef39172..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/special-chars-in-filename/osx-chrome-13.http +++ /dev/null @@ -1,26 +0,0 @@ -POST /upload HTTP/1.1 -Host: localhost:8080 -Connection: keep-alive -Referer: http://localhost:8080/ -Content-Length: 383 -Cache-Control: max-age=0 -Origin: http://localhost:8080 -User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.220 Safari/535.1 -Content-Type: multipart/form-data; boundary=----WebKitFormBoundarytyE4wkKlZ5CQJVTG -Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 -Accept-Encoding: gzip,deflate,sdch -Accept-Language: en-US,en;q=0.8 -Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 -Cookie: jqCookieJar_tablesorter=%7B%22showListTable%22%3A%5B%5B5%2C1%5D%2C%5B1%2C0%5D%5D%7D - -------WebKitFormBoundarytyE4wkKlZ5CQJVTG -Content-Disposition: form-data; name="title" - -Weird filename -------WebKitFormBoundarytyE4wkKlZ5CQJVTG -Content-Disposition: form-data; name="upload"; filename=": \ ? % * | %22 < > . ? ; ' @ # $ ^ & ( ) - _ = + { } [ ] ` ~.txt" -Content-Type: text/plain - -I am a text file with a funky name! - -------WebKitFormBoundarytyE4wkKlZ5CQJVTG-- diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/special-chars-in-filename/osx-firefox-3.6.http b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/special-chars-in-filename/osx-firefox-3.6.http deleted file mode 100644 index bf49f85f..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/special-chars-in-filename/osx-firefox-3.6.http +++ /dev/null @@ -1,24 +0,0 @@ -POST /upload HTTP/1.1 -Host: localhost:8080 -User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.22) Gecko/20110902 Firefox/3.6.22 -Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 -Accept-Language: en-us,en;q=0.5 -Accept-Encoding: gzip,deflate -Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 -Keep-Alive: 115 -Connection: keep-alive -Referer: http://localhost:8080/ -Content-Type: multipart/form-data; boundary=---------------------------9849436581144108930470211272 -Content-Length: 438 - ------------------------------9849436581144108930470211272 -Content-Disposition: form-data; name="title" - -Weird filename ------------------------------9849436581144108930470211272 -Content-Disposition: form-data; name="upload"; filename=": \ ? % * | " < > . ☃ ; ' @ # $ ^ & ( ) - _ = + { } [ ] ` ~.txt" -Content-Type: text/plain - -I am a text file with a funky name! - ------------------------------9849436581144108930470211272-- diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/special-chars-in-filename/osx-safari-5.http b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/special-chars-in-filename/osx-safari-5.http deleted file mode 100644 index ff158a43..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/special-chars-in-filename/osx-safari-5.http +++ /dev/null @@ -1,23 +0,0 @@ -POST /upload HTTP/1.1 -Host: localhost:8080 -Origin: http://localhost:8080 -Content-Length: 383 -User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1 -Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryQJZ1gvhvdgfisJPJ -Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 -Referer: http://localhost:8080/ -Accept-Language: en-us -Accept-Encoding: gzip, deflate -Connection: keep-alive - -------WebKitFormBoundaryQJZ1gvhvdgfisJPJ -Content-Disposition: form-data; name="title" - -Weird filename -------WebKitFormBoundaryQJZ1gvhvdgfisJPJ -Content-Disposition: form-data; name="upload"; filename=": \ ? % * | %22 < > . ? ; ' @ # $ ^ & ( ) - _ = + { } [ ] ` ~.txt" -Content-Type: text/plain - -I am a text file with a funky name! - -------WebKitFormBoundaryQJZ1gvhvdgfisJPJ-- diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/special-chars-in-filename/xp-chrome-12.http b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/special-chars-in-filename/xp-chrome-12.http deleted file mode 100644 index f0fc533a..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/special-chars-in-filename/xp-chrome-12.http +++ /dev/null @@ -1,24 +0,0 @@ -POST /upload HTTP/1.1 -Host: 192.168.56.1:8080 -Connection: keep-alive -Referer: http://192.168.56.1:8080/ -Content-Length: 344 -Cache-Control: max-age=0 -Origin: http://192.168.56.1:8080 -User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.122 Safari/534.30 -Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryEvqBNplR3ByrwQPa -Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 -Accept-Encoding: gzip,deflate,sdch -Accept-Language: de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4 -Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 - -------WebKitFormBoundaryEvqBNplR3ByrwQPa -Content-Disposition: form-data; name="title" - -Weird filename -------WebKitFormBoundaryEvqBNplR3ByrwQPa -Content-Disposition: form-data; name="upload"; filename=" ? % * | %22 < > . ? ; ' @ # $ ^ & ( ) - _ = + { } [ ] ` ~.txt" -Content-Type: text/plain - - -------WebKitFormBoundaryEvqBNplR3ByrwQPa-- diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/special-chars-in-filename/xp-ie-7.http b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/special-chars-in-filename/xp-ie-7.http deleted file mode 100644 index 2e2c61c7..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/special-chars-in-filename/xp-ie-7.http +++ /dev/null @@ -1,22 +0,0 @@ -POST /upload HTTP/1.1 -Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, */* -Referer: http://192.168.56.1:8080/ -Accept-Language: de -User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1) -Content-Type: multipart/form-data; boundary=---------------------------7db1fe232017c -Accept-Encoding: gzip, deflate -Host: 192.168.56.1:8080 -Content-Length: 368 -Connection: Keep-Alive -Cache-Control: no-cache - ------------------------------7db1fe232017c -Content-Disposition: form-data; name="title" - -Weird filename ------------------------------7db1fe232017c -Content-Disposition: form-data; name="upload"; filename=" ? % * | " < > . ☃ ; ' @ # $ ^ & ( ) - _ = + { } [ ] ` ~.txt" -Content-Type: application/octet-stream - - ------------------------------7db1fe232017c-- diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/special-chars-in-filename/xp-ie-8.http b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/special-chars-in-filename/xp-ie-8.http deleted file mode 100644 index e2b94fae..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/special-chars-in-filename/xp-ie-8.http +++ /dev/null @@ -1,22 +0,0 @@ -POST /upload HTTP/1.1 -Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, */* -Referer: http://192.168.56.1:8080/ -Accept-Language: de -User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0) -Content-Type: multipart/form-data; boundary=---------------------------7db3a8372017c -Accept-Encoding: gzip, deflate -Host: 192.168.56.1:8080 -Content-Length: 368 -Connection: Keep-Alive -Cache-Control: no-cache - ------------------------------7db3a8372017c -Content-Disposition: form-data; name="title" - -Weird filename ------------------------------7db3a8372017c -Content-Disposition: form-data; name="upload"; filename=" ? % * | " < > . ☃ ; ' @ # $ ^ & ( ) - _ = + { } [ ] ` ~.txt" -Content-Type: application/octet-stream - - ------------------------------7db3a8372017c-- diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/special-chars-in-filename/xp-safari-5.http b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/special-chars-in-filename/xp-safari-5.http deleted file mode 100644 index 6379ac01..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/special-chars-in-filename/xp-safari-5.http +++ /dev/null @@ -1,22 +0,0 @@ -POST /upload HTTP/1.1 -Host: 192.168.56.1:8080 -Referer: http://192.168.56.1:8080/ -Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 -Accept-Language: en-US -Origin: http://192.168.56.1:8080 -User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4 -Accept-Encoding: gzip, deflate -Content-Type: multipart/form-data; boundary=----WebKitFormBoundarykmaWSUbu697WN9TM -Content-Length: 344 -Connection: keep-alive - -------WebKitFormBoundarykmaWSUbu697WN9TM -Content-Disposition: form-data; name="title" - -Weird filename -------WebKitFormBoundarykmaWSUbu697WN9TM -Content-Disposition: form-data; name="upload"; filename=" ? % * | %22 < > . ? ; ' @ # $ ^ & ( ) - _ = + { } [ ] ` ~.txt" -Content-Type: text/plain - - -------WebKitFormBoundarykmaWSUbu697WN9TM-- diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/workarounds/missing-hyphens1.http b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/workarounds/missing-hyphens1.http deleted file mode 100644 index 28268903..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/workarounds/missing-hyphens1.http +++ /dev/null @@ -1,12 +0,0 @@ -POST /upload HTTP/1.1 -Host: localhost:8080 -Content-Type: multipart/form-data; boundary=----TLV0SrKD4z1TRxRhAPUvZ -Content-Length: 178 - -------TLV0SrKD4z1TRxRhAPUvZ -Content-Disposition: form-data; name="upload"; filename="plain.txt" -Content-Type: text/plain - -I am a plain text file - -------TLV0SrKD4z1TRxRhAPUvZ diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/workarounds/missing-hyphens2.http b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/workarounds/missing-hyphens2.http deleted file mode 100644 index 8e181947..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/http/workarounds/missing-hyphens2.http +++ /dev/null @@ -1,12 +0,0 @@ -POST /upload HTTP/1.1 -Host: localhost:8080 -Content-Type: multipart/form-data; boundary=----TLV0SrKD4z1TRxRhAPUvZ -Content-Length: 180 - -------TLV0SrKD4z1TRxRhAPUvZ -Content-Disposition: form-data; name="upload"; filename="plain.txt" -Content-Type: text/plain - -I am a plain text file - -------TLV0SrKD4z1TRxRhAPUvZ diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/js/encoding.js b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/js/encoding.js deleted file mode 100644 index 1ade9656..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/js/encoding.js +++ /dev/null @@ -1,69 +0,0 @@ -module.exports['menu_seperator.png.http'] = [ - { - type: 'file', - name: 'image', - filename: 'menu_separator.png', - fixture: 'menu_separator.png', - sha1: 'c845ca3ea794be298f2a1b79769b71939eaf4e54', - size: 931, - } -]; - -module.exports['beta-sticker-1.png.http'] = [ - { - type: 'file', - name: 'sticker', - filename: 'beta-sticker-1.png', - fixture: 'beta-sticker-1.png', - sha1: '6abbcffd12b4ada5a6a084fe9e4584f846331bc4', - size: 1660, - } -]; - -module.exports['blank.gif.http'] = [ - { - type: 'file', - name: 'file', - filename: 'blank.gif', - fixture: 'blank.gif', - sha1: 'a1fdee122b95748d81cee426d717c05b5174fe96', - size: 49, - } -]; - -module.exports['binaryfile.tar.gz.http'] = [ - { - type: 'file', - name: 'file', - filename: 'binaryfile.tar.gz', - fixture: 'binaryfile.tar.gz', - sha1: 'cfabe13b348e5e69287d677860880c52a69d2155', - size: 301, - } -]; - -module.exports['plain.txt.http'] = [ - { - type: 'file', - name: 'file', - filename: 'plain.txt', - fixture: 'plain.txt', - sha1: 'b31d07bac24ac32734de88b3687dddb10e976872', - size: 23, - } -]; - -module.exports['pf1y5.png.http'] = [ - { - type: 'field', - name: 'path', - }, - { - type: 'file', - name: 'upload', - filename: 'pf1y5.png', - fixture: 'pf1y5.png', - sha1: '805cc640c5b182e86f2b5c8ebf34ecf063cd34fd', - size: 768323, - } -]; diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/js/no-filename.js b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/js/no-filename.js deleted file mode 100644 index f03b4f01..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/js/no-filename.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports['generic.http'] = [ - {type: 'file', name: 'upload', filename: '', fixture: 'plain.txt', - sha1: 'b31d07bac24ac32734de88b3687dddb10e976872'}, -]; - -module.exports['filename-name.http'] = [ - {type: 'file', name: 'upload', filename: 'plain.txt', fixture: 'plain.txt', - sha1: 'b31d07bac24ac32734de88b3687dddb10e976872'}, -]; diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/js/preamble.js b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/js/preamble.js deleted file mode 100644 index d2e4cfdb..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/js/preamble.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports['crlf.http'] = [ - {type: 'file', name: 'upload', filename: 'plain.txt', fixture: 'plain.txt', - sha1: 'b31d07bac24ac32734de88b3687dddb10e976872'}, -]; - -module.exports['preamble.http'] = [ - {type: 'file', name: 'upload', filename: 'plain.txt', fixture: 'plain.txt', - sha1: 'b31d07bac24ac32734de88b3687dddb10e976872'}, -]; diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/js/special-chars-in-filename.js b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/js/special-chars-in-filename.js deleted file mode 100644 index aa0b79f3..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/js/special-chars-in-filename.js +++ /dev/null @@ -1,30 +0,0 @@ -var properFilename = 'funkyfilename.txt'; - -function expect(filename) { - return [ - { - type: 'field', - name: 'title', - value: 'Weird filename', - }, - { - type: 'file', - name: 'upload', - filename: filename, - fixture: properFilename, - }, - ]; -} - -var webkit = " ? % * | \" < > . ? ; ' @ # $ ^ & ( ) - _ = + { } [ ] ` ~.txt"; -var ffOrIe = " ? % * | \" < > . ☃ ; ' @ # $ ^ & ( ) - _ = + { } [ ] ` ~.txt"; - -module.exports = { - 'osx-chrome-13.http' : expect(webkit), - 'osx-firefox-3.6.http' : expect(ffOrIe), - 'osx-safari-5.http' : expect(webkit), - 'xp-chrome-12.http' : expect(webkit), - 'xp-ie-7.http' : expect(ffOrIe), - 'xp-ie-8.http' : expect(ffOrIe), - 'xp-safari-5.http' : expect(webkit), -}; diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/js/workarounds.js b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/js/workarounds.js deleted file mode 100644 index e59c5b26..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/js/workarounds.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports['missing-hyphens1.http'] = [ - {type: 'file', name: 'upload', filename: 'plain.txt', fixture: 'plain.txt', - sha1: 'b31d07bac24ac32734de88b3687dddb10e976872'}, -]; -module.exports['missing-hyphens2.http'] = [ - {type: 'file', name: 'upload', filename: 'plain.txt', fixture: 'plain.txt', - sha1: 'b31d07bac24ac32734de88b3687dddb10e976872'}, -]; diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/multi_video.upload b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/multi_video.upload deleted file mode 100644 index 9c82ba36..00000000 Binary files a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/multi_video.upload and /dev/null differ diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/multipart.js b/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/multipart.js deleted file mode 100644 index a4761699..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/fixture/multipart.js +++ /dev/null @@ -1,72 +0,0 @@ -exports['rfc1867'] = - { boundary: 'AaB03x', - raw: - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="field1"\r\n'+ - '\r\n'+ - 'Joe Blow\r\nalmost tricked you!\r\n'+ - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="pics"; filename="file1.txt"\r\n'+ - 'Content-Type: text/plain\r\n'+ - '\r\n'+ - '... contents of file1.txt ...\r\r\n'+ - '--AaB03x--\r\n', - parts: - [ { headers: { - 'content-disposition': 'form-data; name="field1"', - }, - data: 'Joe Blow\r\nalmost tricked you!', - }, - { headers: { - 'content-disposition': 'form-data; name="pics"; filename="file1.txt"', - 'Content-Type': 'text/plain', - }, - data: '... contents of file1.txt ...\r', - } - ] - }; - -exports['noTrailing\r\n'] = - { boundary: 'AaB03x', - raw: - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="field1"\r\n'+ - '\r\n'+ - 'Joe Blow\r\nalmost tricked you!\r\n'+ - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="pics"; filename="file1.txt"\r\n'+ - 'Content-Type: text/plain\r\n'+ - '\r\n'+ - '... contents of file1.txt ...\r\r\n'+ - '--AaB03x--', - parts: - [ { headers: { - 'content-disposition': 'form-data; name="field1"', - }, - data: 'Joe Blow\r\nalmost tricked you!', - }, - { headers: { - 'content-disposition': 'form-data; name="pics"; filename="file1.txt"', - 'Content-Type': 'text/plain', - }, - data: '... contents of file1.txt ...\r', - } - ] - }; - -exports['emptyHeader'] = - { boundary: 'AaB03x', - raw: - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="field1"\r\n'+ - ': foo\r\n'+ - '\r\n'+ - 'Joe Blow\r\nalmost tricked you!\r\n'+ - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="pics"; filename="file1.txt"\r\n'+ - 'Content-Type: text/plain\r\n'+ - '\r\n'+ - '... contents of file1.txt ...\r\r\n'+ - '--AaB03x--\r\n', - expectError: true, - }; diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/record.js b/node_modules/express/node_modules/connect/node_modules/multiparty/test/record.js deleted file mode 100644 index 9f1cef86..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/record.js +++ /dev/null @@ -1,47 +0,0 @@ -var http = require('http'); -var fs = require('fs'); -var connections = 0; - -var server = http.createServer(function(req, res) { - var socket = req.socket; - console.log('Request: %s %s -> %s', req.method, req.url, socket.filename); - - req.on('end', function() { - if (req.url !== '/') { - res.end(JSON.stringify({ - method: req.method, - url: req.url, - filename: socket.filename, - })); - return; - } - - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
    '+ - '
    '+ - '
    '+ - ''+ - '
    ' - ); - }); -}); - -server.on('connection', function(socket) { - connections++; - - socket.id = connections; - socket.filename = 'connection-' + socket.id + '.http'; - socket.file = fs.createWriteStream(socket.filename); - socket.pipe(socket.file); - - console.log('--> %s', socket.filename); - socket.on('close', function() { - console.log('<-- %s', socket.filename); - }); -}); - -var port = process.env.PORT || 8080; -server.listen(port, function() { - console.log('Recording connections on port %s', port); -}); diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-connection-aborted.js b/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-connection-aborted.js deleted file mode 100644 index bd83e1d6..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-connection-aborted.js +++ /dev/null @@ -1,27 +0,0 @@ -var assert = require('assert'); -var http = require('http'); -var net = require('net'); -var multiparty = require('../../'); - -var server = http.createServer(function (req, res) { - var form = new multiparty.Form(); - var aborted_received = false; - form.on('aborted', function () { - aborted_received = true; - }); - form.on('error', function () { - assert(aborted_received, 'Error event should follow aborted'); - server.close(); - }); - form.on('end', function () { - throw new Error('Unexpected "end" event'); - }); - form.parse(req); -}).listen(0, 'localhost', function () { - var client = net.connect(server.address().port); - client.write( - "POST / HTTP/1.1\r\n" + - "Content-Length: 70\r\n" + - "Content-Type: multipart/form-data; boundary=foo\r\n\r\n"); - client.end(); -}); diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-content-transfer-encoding.js b/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-content-transfer-encoding.js deleted file mode 100644 index 35e5a1f8..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-content-transfer-encoding.js +++ /dev/null @@ -1,52 +0,0 @@ -var assert = require('assert') - , multiparty = require('../../') - , http = require('http') - , path = require('path') - , TMP_PATH = path.join(__dirname, '..', 'tmp') - -var server = http.createServer(function(req, res) { - var form = new multiparty.Form(); - form.uploadDir = TMP_PATH; - form.on('close', function () { - throw new Error('Unexpected "close" event'); - }); - form.on('end', function () { - throw new Error('Unexpected "end" event'); - }); - form.on('error', function (e) { - res.writeHead(500); - res.end(e.message); - }); - form.parse(req); -}); - -server.listen(0, function() { - var body = - '--foo\r\n' + - 'Content-Disposition: form-data; name="file1"; filename="file1"\r\n' + - 'Content-Type: application/octet-stream\r\n' + - '\r\nThis is the first file\r\n' + - '--foo\r\n' + - 'Content-Type: application/octet-stream\r\n' + - 'Content-Disposition: form-data; name="file2"; filename="file2"\r\n' + - 'Content-Transfer-Encoding: unknown\r\n' + - '\r\nThis is the second file\r\n' + - '--foo--\r\n'; - - var req = http.request({ - method: 'POST', - port: server.address().port, - headers: { - 'Content-Length': body.length, - 'Content-Type': 'multipart/form-data; boundary=foo' - } - }); - req.on('response', function (res) { - assert.equal(res.statusCode, 500); - res.on('data', function () {}); - res.on('end', function () { - server.close(); - }); - }); - req.end(body); -}); diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-invalid.js b/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-invalid.js deleted file mode 100644 index ede541da..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-invalid.js +++ /dev/null @@ -1,35 +0,0 @@ -var superagent = require('superagent') - , multiparty = require('../../') - , http = require('http') - -var server = http.createServer(function(req, resp) { - var form = new multiparty.Form(); - - var errCount = 0; - form.on('error', function(err) { - errCount += 1; - resp.end(); - }); - form.on('file', function(name, file) { - }); - form.on('field', function(name, file) { - }); - - form.parse(req); -}); -server.listen(function() { - var url = 'http://localhost:' + server.address().port + '/' - var req = superagent.post(url) - req.set('Content-Type', 'multipart/form-data; boundary=foo') - req.write('--foo\r\n') - req.write('Content-filename="foo.txt"\r\n') - req.write('\r\n') - req.write('some text here') - req.write('Content-Disposition: form-data; name="text"; filename="bar.txt"\r\n') - req.write('\r\n') - req.write('some more text stuff') - req.write('\r\n--foo--') - req.end(function(err, resp) { - server.close(); - }); -}); diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-issue-15.js b/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-issue-15.js deleted file mode 100644 index 43982fa7..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-issue-15.js +++ /dev/null @@ -1,88 +0,0 @@ -var http = require('http') - , multiparty = require('../../') - , assert = require('assert') - , superagent = require('superagent') - , path = require('path') - -var server = http.createServer(function(req, res) { - assert.strictEqual(req.url, '/upload'); - assert.strictEqual(req.method, 'POST'); - - var form = new multiparty.Form({autoFields:true,autoFiles:true}); - - form.on('error', function(err) { - console.log(err); - }); - - form.on('close', function() { - }); - - var fileCount = 0; - form.on('file', function(name, file) { - fileCount += 1; - }); - - form.parse(req, function(err, fields, files) { - var objFileCount = 0; - for (var file in files) { - objFileCount += 1; - } - // multiparty does NOT try to do intelligent things based on - // the part name. - assert.strictEqual(fileCount, 2); - assert.strictEqual(objFileCount, 1); - res.end(); - }); -}); -server.listen(function() { - var url = 'http://localhost:' + server.address().port + '/upload'; - var req = superagent.post(url); - req.attach('files[]', fixture('pf1y5.png'), 'SOG2.JPG'); - req.attach('files[]', fixture('binaryfile.tar.gz'), 'BenF364_LIB353.zip'); - - // Get the existing boundary. - var contentType = req.get('content-type'); - var split = contentType.split(' '); - - // Set the content-type. - req.set('content-type', split.join('')); - - req.end(function(err, resp) { - assert.ifError(err); - resp.on('end', function() { - server.close(); - }); - }); - - // No space. - createRequest(''); - - // Single space. - createRequest(' '); - - // Multiple spaces. - createRequest(' '); -}); - -function createRequest(separator) { - var url = 'http://localhost:' + server.address().port + '/upload'; - var req = superagent.post(url); - req.attach('files[]', fixture('pf1y5.png'), 'SOG2.JPG'); - req.attach('files[]', fixture('binaryfile.tar.gz'), 'BenF364_LIB353.zip'); - - // Get the existing boundary. - var contentType = req.get('content-type'); - var split = contentType.split(' '); - - // Set the content-type. - req.set('content-type', split.join(separator)); - - req.end(function(err, resp) { - assert.ifError(err); - // We don't close the server, to allow other requests to pass. - }); -} - -function fixture(name) { - return path.join(__dirname, '..', 'fixture', 'file', name) -} diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-issue-19.js b/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-issue-19.js deleted file mode 100644 index d7da0cfb..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-issue-19.js +++ /dev/null @@ -1,44 +0,0 @@ -var assert = require('assert'); -var http = require('http'); -var net = require('net'); -var multiparty = require('../../'); - -var client; -var server = http.createServer(function (req, res) { - var form = new multiparty.Form({maxFields: 1}); - form.on('aborted', function () { - throw new Error("did not expect aborted"); - }); - var first = true; - form.on('error', function (err) { - assert.ok(first); - first = false; - client.end(); - assert.ok(/maxFields/.test(err.message)); - server.close(); - }); - form.on('end', function () { - throw new Error('Unexpected "end" event'); - }); - form.parse(req); -}); -server.listen(function() { - client = net.connect(server.address().port); - - client.write("POST /upload HTTP/1.1\r\n" + - "Content-Length: 728\r\n" + - "Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryvfUZhxgsZDO7FXLF\r\n" + - "\r\n" + - "------WebKitFormBoundaryvfUZhxgsZDO7FXLF\r\n" + - "Content-Disposition: form-data; name=\"title\"\r\n" + - "\r\n" + - "foofoo" + - "\r\n" + - "------WebKitFormBoundaryvfUZhxgsZDO7FXLF\r\n" + - "Content-Disposition: form-data; name=\"upload\"; filename=\"blah1.txt\"\r\n" + - "Content-Type: text/plain\r\n" + - "\r\n" + - "hi1\r\n" + - "\r\n" + - "------WebKitFormBoundaryvfUZhxgsZDO7FXLF\r\n"); -}); diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-issue-21.js b/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-issue-21.js deleted file mode 100644 index 155fba05..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-issue-21.js +++ /dev/null @@ -1,66 +0,0 @@ -var assert = require('assert'); -var http = require('http'); -var net = require('net'); -var multiparty = require('../../'); - -var client; -var server = http.createServer(function(req, res) { - var form = new multiparty.Form(); - - form.parse(req, function(err, fieldsTable, filesTable, fieldsList, filesList) { - if (err) { - console.error(err.stack); - return; - } - assert.strictEqual(fieldsList.length, 1); - assert.strictEqual(fieldsList[0].name, "title"); - assert.strictEqual(fieldsList[0].value, "foofoo"); - assert.strictEqual(filesList.length, 4); - assert.strictEqual(filesList[0].fieldName, "upload"); - assert.strictEqual(filesList[1].fieldName, "upload"); - assert.strictEqual(filesList[2].fieldName, "upload"); - assert.strictEqual(filesList[3].fieldName, "upload"); - res.end(); - client.end(); - server.close(); - }); -}); -server.listen(function() { - client = net.connect(server.address().port); - - client.write("POST /upload HTTP/1.1\r\n" + - "Content-Length: 728\r\n" + - "Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryvfUZhxgsZDO7FXLF\r\n" + - "\r\n" + - "------WebKitFormBoundaryvfUZhxgsZDO7FXLF\r\n" + - "Content-Disposition: form-data; name=\"title\"\r\n" + - "\r\n" + - "foofoo" + - "\r\n" + - "------WebKitFormBoundaryvfUZhxgsZDO7FXLF\r\n" + - "Content-Disposition: form-data; name=\"upload\"; filename=\"blah1.txt\"\r\n" + - "Content-Type: text/plain\r\n" + - "\r\n" + - "hi1\r\n" + - "\r\n" + - "------WebKitFormBoundaryvfUZhxgsZDO7FXLF\r\n" + - "Content-Disposition: form-data; name=\"upload\"; filename=\"blah2.txt\"\r\n" + - "Content-Type: text/plain\r\n" + - "\r\n" + - "hi2\r\n" + - "\r\n" + - "------WebKitFormBoundaryvfUZhxgsZDO7FXLF\r\n" + - "Content-Disposition: form-data; name=\"upload\"; filename=\"blah3.txt\"\r\n" + - "Content-Type: text/plain\r\n" + - "\r\n" + - "hi3\r\n" + - "\r\n" + - "------WebKitFormBoundaryvfUZhxgsZDO7FXLF\r\n" + - "Content-Disposition: form-data; name=\"upload\"; filename=\"blah4.txt\"\r\n" + - "Content-Type: text/plain\r\n" + - "\r\n" + - "hi4\r\n" + - "\r\n" + - "------WebKitFormBoundaryvfUZhxgsZDO7FXLF--\r\n" - ); -}); diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-issue-4.js b/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-issue-4.js deleted file mode 100644 index 66b2a690..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-issue-4.js +++ /dev/null @@ -1,51 +0,0 @@ -var http = require('http') - , multiparty = require('../../') - , assert = require('assert') - , superagent = require('superagent') - , path = require('path') - -var server = http.createServer(function(req, res) { - assert.strictEqual(req.url, '/upload'); - assert.strictEqual(req.method, 'POST'); - - var form = new multiparty.Form({autoFields:true,autoFiles:true}); - - form.on('error', function(err) { - console.log(err); - }); - - form.on('close', function() { - }); - - var fileCount = 0; - form.on('file', function(name, file) { - fileCount += 1; - }); - - form.parse(req, function(err, fields, files) { - var objFileCount = 0; - for (var file in files) { - objFileCount += 1; - } - // multiparty does NOT try to do intelligent things based on - // the part name. - assert.strictEqual(fileCount, 2); - assert.strictEqual(objFileCount, 1); - res.end(); - }); -}); -server.listen(function() { - var url = 'http://localhost:' + server.address().port + '/upload'; - var req = superagent.post(url); - req.attach('files[]', fixture('pf1y5.png'), 'SOG2.JPG'); - req.attach('files[]', fixture('binaryfile.tar.gz'), 'BenF364_LIB353.zip'); - req.end(function(err, resp) { - assert.ifError(err); - resp.on('end', function() { - server.close(); - }); - }); -}); -function fixture(name) { - return path.join(__dirname, '..', 'fixture', 'file', name) -} diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-issue-46.js b/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-issue-46.js deleted file mode 100644 index 676b8709..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-issue-46.js +++ /dev/null @@ -1,49 +0,0 @@ -var http = require('http'), - multiparty = require('../../'), - request = require('request'), - assert = require('assert'); - -var host = 'localhost'; - -var index = [ - '
    ', - ' ', - ' ', - '
    ' -].join("\n"); - -var server = http.createServer(function(req, res) { - - // Show a form for testing purposes. - if (req.method === 'GET') { - res.writeHead(200, {'content-type': 'text/html'}); - res.end(index); - return; - } - - // Parse form and write results to response. - var form = new multiparty.Form(); - form.parse(req, function(err, fields, files) { - res.writeHead(200, {'content-type': 'text/plain'}); - res.write(JSON.stringify({err: err, fields: fields, files: files})); - res.end(); - }); - -}).listen(0, host, function() { - - //console.log("Server up and running..."); - - var server = this, - url = 'http://' + host + ':' + server.address().port; - - var parts = [ - {'Content-Disposition': 'form-data; name="foo"', 'body': 'bar'} - ] - - var req = request({method: 'POST', url: url, multipart: parts}, function(e, res, body) { - var obj = JSON.parse(body); - assert.equal("bar", obj.fields.foo); - server.close(); - }); - -}); diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-issue-5.js b/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-issue-5.js deleted file mode 100644 index 80eadf20..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/standalone/test-issue-5.js +++ /dev/null @@ -1,39 +0,0 @@ -var assert = require('assert'); -var http = require('http'); -var net = require('net'); -var multiparty = require('../../'); - -var client; -var attachmentCount = 510; -var server = http.createServer(function(req, res) { - var form = new multiparty.Form({maxFields: 10000}); - - form.parse(req, function(err, fieldsTable, filesTable, fieldsList, filesList) { - assert.strictEqual(err.code, "EMFILE"); - res.end(); - client.end(); - server.close(); - }); -}); -server.listen(function() { - client = net.connect(server.address().port); - - var boundary = "------WebKitFormBoundaryvfUZhxgsZDO7FXLF\r\n"; - var oneAttachment = boundary + - "Content-Disposition: form-data; name=\"upload\"; filename=\"blah1.txt\"\r\n" + - "Content-Type: text/plain\r\n" + - "\r\n" + - "hi1\r\n" + - "\r\n"; - var payloadSize = oneAttachment.length * attachmentCount + boundary.length; - - client.write("POST /upload HTTP/1.1\r\n" + - "Content-Length: " + payloadSize + "\r\n" + - "Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryvfUZhxgsZDO7FXLF\r\n" + - "\r\n"); - - for (var i = 0; i < attachmentCount; i += 1) { - client.write(oneAttachment); - } - client.write(boundary); -}); diff --git a/node_modules/express/node_modules/connect/node_modules/multiparty/test/test.js b/node_modules/express/node_modules/connect/node_modules/multiparty/test/test.js deleted file mode 100644 index 199d5cdd..00000000 --- a/node_modules/express/node_modules/connect/node_modules/multiparty/test/test.js +++ /dev/null @@ -1,117 +0,0 @@ -var spawn = require('child_process').spawn - , findit = require('findit') - , path = require('path') - , hashish = require('hashish') - , fs = require('fs') - , http = require('http') - , net = require('net') - , assert = require('assert') - , multiparty = require('../') - , mkdirp = require('mkdirp') - , STANDALONE_PATH = path.join(__dirname, 'standalone') - , server = http.createServer() - , PORT = 13532 - , FIXTURE_PATH = path.join(__dirname, 'fixture') - , TMP_PATH = path.join(__dirname, 'tmp') - -mkdirp.sync(TMP_PATH); - -describe("fixtures", function() { - before(function(done) { - server.listen(PORT, done); - }); - var fixtures = []; - findit - .sync(path.join(FIXTURE_PATH, 'js')) - .forEach(function(jsPath) { - if (!/\.js$/.test(jsPath)) return; - var group = path.basename(jsPath, '.js'); - hashish.forEach(require(jsPath), function(fixture, name) { - it(group + '/' + name, createTest({ - name : group + '/' + name, - fixture : fixture, - })); - }); - }); -}); - -describe("standalone", function() { - findit - .sync(STANDALONE_PATH) - .forEach(function(jsPath) { - if (!/\.js$/.test(jsPath)) return; - it(path.basename(jsPath, '.js'), function(done) { - var child = spawn(process.execPath, [jsPath], { stdio: 'inherit' }); - child.on('error', function(err) { - done(err); - }); - child.on('exit', function(code) { - if (code) return done(new Error("exited with code " + code)); - done(); - }); - }); - }); -}); - -function createTest(fixture) { - var name = fixture.name; - fixture = fixture.fixture; - return function(done) { - uploadFixture(name, function(err, parts) { - if (err) return done(err); - fixture.forEach(function(expectedPart, i) { - var parsedPart = parts[i]; - assert.equal(parsedPart.type, expectedPart.type); - assert.equal(parsedPart.name, expectedPart.name); - - if (parsedPart.type === 'file') { - var file = parsedPart.value; - assert.equal(file.originalFilename, expectedPart.filename); - if(expectedPart.sha1) assert.strictEqual(file.hash, expectedPart.sha1); - if(expectedPart.size) assert.strictEqual(file.size, expectedPart.size); - } - }); - done(); - }); - }; - -} - -function uploadFixture(name, cb) { - server.once('request', function(req, res) { - var parts = []; - var form = new multiparty.Form({ - autoFields: true, - autoFiles: true, - }); - form.uploadDir = TMP_PATH; - form.hash = "sha1"; - - form.on('error', callback); - form.on('file', function(name, value) { - parts.push({type: 'file', name: name, value: value}); - }); - form.on('field', function(name, value) { - parts.push({type: 'field', name: name, value: value}); - }); - form.on('close', function() { - res.end('OK'); - callback(null, parts); - }); - form.parse(req); - - function callback() { - var realCallback = cb; - cb = function() {}; - realCallback.apply(null, arguments); - } - }); - - var socket = net.createConnection(PORT); - var file = fs.createReadStream(FIXTURE_PATH + '/http/' + name); - - file.pipe(socket, {end: false}); - socket.on('data', function () { - socket.end(); - }); -} diff --git a/node_modules/express/node_modules/connect/node_modules/negotiator/LICENSE b/node_modules/express/node_modules/connect/node_modules/negotiator/LICENSE deleted file mode 100644 index 42ca2e7d..00000000 --- a/node_modules/express/node_modules/connect/node_modules/negotiator/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Original "Negotiator" program Copyright Federico Romero -Port to JavaScript Copyright Isaac Z. Schlueter - -All rights reserved. - -MIT License - -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/node_modules/express/node_modules/connect/node_modules/negotiator/examples/accept.js b/node_modules/express/node_modules/connect/node_modules/negotiator/examples/accept.js deleted file mode 100644 index 2a180391..00000000 --- a/node_modules/express/node_modules/connect/node_modules/negotiator/examples/accept.js +++ /dev/null @@ -1,47 +0,0 @@ -(function() { - var Negotiator, availableMediaTypes, http, key, representations, server, val; - - Negotiator = require('../lib/negotiator').Negotiator; - - http = require('http'); - - representations = { - 'text/html': '

    Hello world!

    ', - 'text/plain': 'Hello World!', - 'application/json': JSON.stringify({ - hello: 'world!' - }) - }; - - availableMediaTypes = (function() { - var _results; - _results = []; - for (key in representations) { - val = representations[key]; - _results.push(key); - } - return _results; - })(); - - server = http.createServer(function(req, res) { - var mediaType, negotiator; - negotiator = new Negotiator(req); - console.log("Accept: " + req.headers['accept']); - console.log("Preferred: " + (negotiator.preferredMediaTypes())); - console.log("Possible: " + (negotiator.preferredMediaTypes(availableMediaTypes))); - mediaType = negotiator.preferredMediaType(availableMediaTypes); - console.log("Selected: " + mediaType); - if (mediaType) { - res.writeHead(200, { - 'Content-Type': mediaType - }); - return res.end(representations[mediaType]); - } else { - res.writeHead(406); - return res.end(); - } - }); - - server.listen(8080); - -}).call(this); diff --git a/node_modules/express/node_modules/connect/node_modules/negotiator/examples/charset.js b/node_modules/express/node_modules/connect/node_modules/negotiator/examples/charset.js deleted file mode 100644 index 6455effa..00000000 --- a/node_modules/express/node_modules/connect/node_modules/negotiator/examples/charset.js +++ /dev/null @@ -1,52 +0,0 @@ -(function() { - var Buffer, Iconv, Negotiator, availableCharsets, http, iconv, key, message, messages, server, val; - - Negotiator = require('../lib/negotiator').Negotiator; - - http = require('http'); - - Buffer = require('buffer').Buffer; - - Iconv = require('iconv').Iconv; - - iconv = new Iconv('UTF-8', 'ISO-8859-1'); - - message = "ë"; - - messages = { - 'utf-8': message, - 'iso-8859-1': iconv.convert(new Buffer(message)) - }; - - availableCharsets = (function() { - var _results; - _results = []; - for (key in messages) { - val = messages[key]; - _results.push(key); - } - return _results; - })(); - - server = http.createServer(function(req, res) { - var charset, negotiator; - negotiator = new Negotiator(req); - console.log("Accept-Charset: " + req.headers['accept-charset']); - console.log("Preferred: " + (negotiator.preferredCharsets())); - console.log("Possible: " + (negotiator.preferredCharsets(availableCharsets))); - charset = negotiator.preferredCharset(availableCharsets); - console.log("Selected: " + charset); - if (charset) { - res.writeHead(200, { - 'Content-Type': "text/html; charset=" + charset - }); - return res.end(messages[charset]); - } else { - res.writeHead(406); - return res.end(); - } - }); - - server.listen(8080); - -}).call(this); diff --git a/node_modules/express/node_modules/connect/node_modules/negotiator/examples/encoding.js b/node_modules/express/node_modules/connect/node_modules/negotiator/examples/encoding.js deleted file mode 100644 index a02d0f46..00000000 --- a/node_modules/express/node_modules/connect/node_modules/negotiator/examples/encoding.js +++ /dev/null @@ -1,48 +0,0 @@ -(function() { - var Negotiator, gbuf, http, messages; - - Negotiator = require('../lib/negotiator').Negotiator; - - http = require('http'); - - gbuf = require('gzip-buffer'); - - messages = { - identity: 'Hello World' - }; - - gbuf.gzip(messages.identity, function(zipped) { - var availableEncodings, key, server, val; - messages.gzip = zipped; - availableEncodings = (function() { - var _results; - _results = []; - for (key in messages) { - val = messages[key]; - _results.push(key); - } - return _results; - })(); - console.log(availableEncodings); - server = http.createServer(function(req, res) { - var encoding, negotiator; - negotiator = new Negotiator(req); - console.log("Accept-Encoding: " + req.headers['accept-encoding']); - console.log("Preferred: " + (negotiator.preferredEncodings())); - console.log("Possible: " + (negotiator.preferredEncodings(availableEncodings))); - encoding = negotiator.preferredEncoding(availableEncodings); - console.log("Selected: " + encoding); - if (encoding) { - res.writeHead(200, { - 'Content-Encoding': encoding - }); - return res.end(messages[encoding]); - } else { - res.writeHead(406); - return res.end(); - } - }); - return server.listen(8080); - }); - -}).call(this); diff --git a/node_modules/express/node_modules/connect/node_modules/negotiator/examples/language.js b/node_modules/express/node_modules/connect/node_modules/negotiator/examples/language.js deleted file mode 100644 index f161743f..00000000 --- a/node_modules/express/node_modules/connect/node_modules/negotiator/examples/language.js +++ /dev/null @@ -1,44 +0,0 @@ -(function() { - var Negotiator, availableLanguages, http, key, messages, server, val; - - Negotiator = require('../lib/negotiator').Negotiator; - - http = require('http'); - - messages = { - es: "¡Hola Mundo!", - en: "Hello World!" - }; - - availableLanguages = (function() { - var _results; - _results = []; - for (key in messages) { - val = messages[key]; - _results.push(key); - } - return _results; - })(); - - server = http.createServer(function(req, res) { - var language, negotiator; - negotiator = new Negotiator(req); - console.log("Accept-Language: " + req.headers['accept-language']); - console.log("Preferred: " + (negotiator.preferredLanguages())); - console.log("Possible: " + (negotiator.preferredLanguages(availableLanguages))); - language = negotiator.preferredLanguage(availableLanguages); - console.log("Selected: " + language); - if (language) { - res.writeHead(200, { - 'Content-Language': language - }); - return res.end(messages[language]); - } else { - res.writeHead(406); - return res.end(); - } - }); - - server.listen(8080); - -}).call(this); diff --git a/node_modules/express/node_modules/connect/node_modules/negotiator/lib/charset.js b/node_modules/express/node_modules/connect/node_modules/negotiator/lib/charset.js deleted file mode 100644 index 33004572..00000000 --- a/node_modules/express/node_modules/connect/node_modules/negotiator/lib/charset.js +++ /dev/null @@ -1,71 +0,0 @@ -module.exports = preferredCharsets; -preferredCharsets.preferredCharsets = preferredCharsets; - -function parseAcceptCharset(accept) { - return accept.split(',').map(function(e) { - return parseCharset(e.trim()); - }).filter(function(e) { - return e && e.q > 0; - }); -} - -function parseCharset(s) { - var match = s.match(/^\s*(\S+?)\s*(?:;(.*))?$/); - if (!match) return null; - - var charset = match[1]; - var q = 1; - if (match[2]) { - var params = match[2].split(';') - for (var i = 0; i < params.length; i ++) { - var p = params[i].trim().split('='); - if (p[0] === 'q') { - q = parseFloat(p[1]); - break; - } - } - } - - return { - charset: charset, - q: q - }; -} - -function getCharsetPriority(charset, accepted) { - return (accepted.filter(function(a) { - return specify(charset, a); - }).sort(function (a, b) { - // revsort - return a.q === b.q ? 0 : a.q > b.q ? -1 : 1; - })[0] || {q:0}).q; -} - -function specify(charset, spec) { - if (spec.charset === '*' || spec.charset === charset) { - return spec; - } -}; - -function preferredCharsets(accept, provided) { - accept = parseAcceptCharset(accept || ''); - if (provided) { - return provided.map(function(type) { - return [type, getCharsetPriority(type, accept)]; - }).filter(function(pair) { - return pair[1] > 0; - }).sort(function(a, b) { - // revsort - return a[1] === b[1] ? 0 : a[1] > b[1] ? -1 : 1; - }).map(function(pair) { - return pair[0]; - }); - } else { - return accept.sort(function (a, b) { - // revsort - return a.q < b.q ? 1 : -1; - }).map(function(type) { - return type.charset; - }); - } -} diff --git a/node_modules/express/node_modules/connect/node_modules/negotiator/lib/encoding.js b/node_modules/express/node_modules/connect/node_modules/negotiator/lib/encoding.js deleted file mode 100644 index b4fc889f..00000000 --- a/node_modules/express/node_modules/connect/node_modules/negotiator/lib/encoding.js +++ /dev/null @@ -1,89 +0,0 @@ -module.exports = preferredEncodings; -preferredEncodings.preferredEncodings = preferredEncodings; - -function parseAcceptEncoding(accept) { - var acceptableEncodings; - - if (accept) { - acceptableEncodings = accept.split(',').map(function(e) { - return parseEncoding(e.trim()); - }); - } else { - acceptableEncodings = []; - } - - if (!acceptableEncodings.some(function(e) { - return e && e.encoding === 'identity'; - })) { - acceptableEncodings.push({ - encoding: 'identity', - q: 0.1 - }); - } - - return acceptableEncodings.filter(function(e) { - return e && e.q > 0; - }); -} - -function parseEncoding(s) { - var match = s.match(/^\s*(\S+?)\s*(?:;(.*))?$/); - - if (!match) return null; - - var encoding = match[1]; - var q = 1; - if (match[2]) { - var params = match[2].split(';'); - for (var i = 0; i < params.length; i ++) { - var p = params[i].trim().split('='); - if (p[0] === 'q') { - q = parseFloat(p[1]); - break; - } - } - } - - return { - encoding: encoding, - q: q - }; -} - -function getEncodingPriority(encoding, accepted) { - return (accepted.filter(function(a) { - return specify(encoding, a); - }).sort(function (a, b) { - // revsort - return a.q === b.q ? 0 : a.q > b.q ? -1 : 1; - })[0] || {q:0}).q; -} - -function specify(encoding, spec) { - if (spec.encoding === '*' || spec.encoding === encoding) { - return spec; - } -} - -function preferredEncodings(accept, provided) { - accept = parseAcceptEncoding(accept || ''); - if (provided) { - return provided.map(function(type) { - return [type, getEncodingPriority(type, accept)]; - }).filter(function(pair) { - return pair[1] > 0; - }).sort(function(a, b) { - // revsort - return a[1] === b[1] ? 0 : a[1] > b[1] ? -1 : 1; - }).map(function(pair) { - return pair[0]; - }); - } else { - return accept.sort(function (a, b) { - // revsort - return a.q < b.q ? 1 : -1; - }).map(function(type) { - return type.encoding; - }); - } -} diff --git a/node_modules/express/node_modules/connect/node_modules/negotiator/lib/language.js b/node_modules/express/node_modules/connect/node_modules/negotiator/lib/language.js deleted file mode 100644 index 432b7026..00000000 --- a/node_modules/express/node_modules/connect/node_modules/negotiator/lib/language.js +++ /dev/null @@ -1,92 +0,0 @@ -module.exports = preferredLanguages; -preferredLanguages.preferredLanguages = preferredLanguages; - -function parseAcceptLanguage(accept) { - return accept.split(',').map(function(e) { - return parseLanguage(e.trim()); - }).filter(function(e) { - return e && e.q > 0; - }); -} - -function parseLanguage(s) { - var match = s.match(/^\s*(\S+?)(?:-(\S+?))?\s*(?:;(.*))?$/); - if (!match) return null; - - var prefix = match[1], - suffix = match[2], - full = prefix; - - if (suffix) full += "-" + suffix; - - var q = 1; - if (match[3]) { - var params = match[3].split(';') - for (var i = 0; i < params.length; i ++) { - var p = params[i].split('='); - if (p[0] === 'q') q = parseFloat(p[1]); - } - } - - return { - prefix: prefix, - suffix: suffix, - q: q, - full: full - }; -} - -function getLanguagePriority(language, accepted) { - var match = getClosestMatch(language, accepted); - return match ? match.q : 0; -} - -function getClosestMatch(language, accepted) { - var parsed = parseLanguage(language); - - var matches = accepted.filter(function(a) { - return a.full === parsed.full; - }); - if (matches.length) return matches[0]; - - matches = accepted.filter(function(a) { - return a.prefix === parsed.prefix && !a.suffix; - }); - if (matches.length) return matches[0]; - - matches = accepted.filter(function(a) { - return a.prefix === parsed.prefix; - }); - if (matches.length) return matches[0]; - - matches = accepted.filter(function(a) { - return a.prefix === '*'; - }); - return matches[0]; -} - -function preferredLanguages(accept, provided) { - accept = parseAcceptLanguage(accept || ''); - if (provided) { - - var ret = provided.map(function(type) { - return [type, getLanguagePriority(type, accept)]; - }).filter(function(pair) { - return pair[1] > 0; - }).sort(function(a, b) { - // revsort - return a[1] === b[1] ? 0 : a[1] > b[1] ? -1 : 1; - }).map(function(pair) { - return pair[0]; - }); - return ret; - - } else { - return accept.sort(function (a, b) { - // revsort - return a.q < b.q ? 1 : -1; - }).map(function(type) { - return type.full; - }); - } -} diff --git a/node_modules/express/node_modules/connect/node_modules/negotiator/lib/mediaType.js b/node_modules/express/node_modules/connect/node_modules/negotiator/lib/mediaType.js deleted file mode 100644 index 3dc017fd..00000000 --- a/node_modules/express/node_modules/connect/node_modules/negotiator/lib/mediaType.js +++ /dev/null @@ -1,101 +0,0 @@ -module.exports = preferredMediaTypes; -preferredMediaTypes.preferredMediaTypes = preferredMediaTypes; - -function parseAccept(accept) { - return accept.split(',').map(function(e) { - return parseMediaType(e.trim()); - }).filter(function(e) { - return e && e.q > 0; - }); -}; - -function parseMediaType(s) { - var match = s.match(/\s*(\S+)\/([^;\s]+)\s*(?:;(.*))?/); - if (!match) return null; - - var type = match[1], - subtype = match[2], - full = "" + type + "/" + subtype, - params = {}, - q = 1; - - if (match[3]) { - params = match[3].split(';').map(function(s) { - return s.trim().split('='); - }).reduce(function (set, p) { - set[p[0]] = p[1]; - return set - }, params); - - if (params.q != null) { - q = parseFloat(params.q); - delete params.q; - } - } - - return { - type: type, - subtype: subtype, - params: params, - q: q, - full: full - }; -} - -function getMediaTypePriority(type, accepted) { - return (accepted.filter(function(a) { - return specify(type, a); - }).sort(function (a, b) { - // revsort - return a.q > b.q ? -1 : 1; - })[0] || {q:0}).q; -} - -function specifies(spec, type) { - return spec === '*' || spec === type; -} - -function specify(type, spec) { - var p = parseMediaType(type); - - if (spec.params) { - var keys = Object.keys(spec.params); - if (keys.some(function (k) { - return !specifies(spec.params[k], p.params[k]); - })) { - // some didn't specify. - return null; - } - } - - if (specifies(spec.type, p.type) && - specifies(spec.subtype, p.subtype)) { - return spec; - } -} - -function preferredMediaTypes(accept, provided) { - accept = parseAccept(accept || ''); - if (provided) { - return provided.map(function(type) { - return [type, getMediaTypePriority(type, accept)]; - }).filter(function(pair) { - return pair[1] > 0; - }).sort(function(a, b) { - // revsort - return a[1] === b[1] ? 0 : a[1] > b[1] ? -1 : 1; - }).map(function(pair) { - return pair[0]; - }); - - } else { - return accept.sort(function (a, b) { - // revsort - return a.q < b.q ? 1 : -1; - }).map(function(type) { - return type.full; - }); - } -} - - diff --git a/node_modules/express/node_modules/connect/node_modules/negotiator/lib/negotiator.js b/node_modules/express/node_modules/connect/node_modules/negotiator/lib/negotiator.js deleted file mode 100644 index fe0e58a5..00000000 --- a/node_modules/express/node_modules/connect/node_modules/negotiator/lib/negotiator.js +++ /dev/null @@ -1,29 +0,0 @@ -module.exports = Negotiator; -Negotiator.Negotiator = Negotiator; - -function Negotiator(request) { - if (!(this instanceof Negotiator)) return new Negotiator(request); - this.request = request; -} - -var set = { preferredCharset: [require('./charset.js'), 'accept-charset'], - preferredEncoding: [require('./encoding.js'), 'accept-encoding'], - preferredLanguage: [require('./language.js'), 'accept-language'], - preferredMediaType: [require('./mediaType.js'), 'accept'] }; - -Object.keys(set).forEach(function (k) { - var mh = set[k], - method = mh[0], - header = mh[1], - singular = k, - plural = k + 's'; - - Negotiator.prototype[plural] = function (available) { - return method(this.request.headers[header], available); - }; - - Negotiator.prototype[singular] = function(available) { - var set = this[plural](available); - if (set) return set[0]; - }; -}) diff --git a/node_modules/express/node_modules/connect/node_modules/negotiator/package.json b/node_modules/express/node_modules/connect/node_modules/negotiator/package.json deleted file mode 100644 index 62a98115..00000000 --- a/node_modules/express/node_modules/connect/node_modules/negotiator/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "negotiator", - "description": "HTTP content negotiation", - "version": "0.3.0", - "author": { - "name": "Federico Romero", - "email": "federico.romero@outboxlabs.com" - }, - "contributors": [ - { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - } - ], - "repository": { - "type": "git", - "url": "git://github.com/federomero/negotiator.git" - }, - "keywords": [ - "http", - "content negotiation", - "accept", - "accept-language", - "accept-encoding", - "accept-charset" - ], - "engine": "node >= 0.6", - "license": "MIT", - "devDependencies": { - "nodeunit": "0.6.x" - }, - "scripts": { - "test": "nodeunit test" - }, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "main": "lib/negotiator.js", - "readme": "# Negotiator\n\nAn HTTP content negotiator for node.js written in javascript.\n\n# Accept Negotiation\n\n Negotiator = require('negotiator')\n\n availableMediaTypes = ['text/html', 'text/plain', 'application/json']\n\n // The negotiator constructor receives a request object\n negotiator = new Negotiator(request)\n\n // Let's say Accept header is 'text/html, application/*;q=0.2, image/jpeg;q=0.8'\n\n negotiator.preferredMediaTypes()\n // -> ['text/html', 'image/jpeg', 'application/*']\n\n negotiator.preferredMediaTypes(availableMediaTypes)\n // -> ['text/html', 'application/json']\n\n negotiator.preferredMediaType(availableMediaTypes)\n // -> 'text/html'\n\nYou can check a working example at `examples/accept.js`.\n\n## Methods\n\n`preferredMediaTypes(availableMediaTypes)`:\n\nReturns an array of preferred media types ordered by priority from a list of available media types.\n\n`preferredMediaType(availableMediaType)`:\n\nReturns the top preferred media type from a list of available media types.\n\n# Accept-Language Negotiation\n\n Negotiator = require('negotiator')\n\n negotiator = new Negotiator(request)\n\n availableLanguages = 'en', 'es', 'fr'\n\n // Let's say Accept-Language header is 'en;q=0.8, es, pt'\n\n negotiator.preferredLanguages()\n // -> ['es', 'pt', 'en']\n\n negotiator.preferredLanguages(availableLanguages)\n // -> ['es', 'en']\n\n language = negotiator.preferredLanguage(availableLanguages)\n // -> 'es'\n\nYou can check a working example at `examples/language.js`.\n\n## Methods\n\n`preferredLanguages(availableLanguages)`:\n\nReturns an array of preferred languages ordered by priority from a list of available languages.\n\n`preferredLanguage(availableLanguages)`:\n\nReturns the top preferred language from a list of available languages.\n\n# Accept-Charset Negotiation\n\n Negotiator = require('negotiator')\n\n availableCharsets = ['utf-8', 'iso-8859-1', 'iso-8859-5']\n\n negotiator = new Negotiator(request)\n\n // Let's say Accept-Charset header is 'utf-8, iso-8859-1;q=0.8, utf-7;q=0.2'\n\n negotiator.preferredCharsets()\n // -> ['utf-8', 'iso-8859-1', 'utf-7']\n\n negotiator.preferredCharsets(availableCharsets)\n // -> ['utf-8', 'iso-8859-1']\n\n negotiator.preferredCharset(availableCharsets)\n // -> 'utf-8'\n\nYou can check a working example at `examples/charset.js`.\n\n## Methods\n\n`preferredCharsets(availableCharsets)`:\n\nReturns an array of preferred charsets ordered by priority from a list of available charsets.\n\n`preferredCharset(availableCharsets)`:\n\nReturns the top preferred charset from a list of available charsets.\n\n# Accept-Encoding Negotiation\n\n Negotiator = require('negotiator').Negotiator\n\n availableEncodings = ['identity', 'gzip']\n\n negotiator = new Negotiator(request)\n\n // Let's say Accept-Encoding header is 'gzip, compress;q=0.2, identity;q=0.5'\n\n negotiator.preferredEncodings()\n // -> ['gzip', 'identity', 'compress']\n\n negotiator.preferredEncodings(availableEncodings)\n // -> ['gzip', 'identity']\n\n negotiator.preferredEncoding(availableEncodings)\n // -> 'gzip'\n\nYou can check a working example at `examples/encoding.js`.\n\n## Methods\n\n`preferredEncodings(availableEncodings)`:\n\nReturns an array of preferred encodings ordered by priority from a list of available encodings.\n\n`preferredEncoding(availableEncodings)`:\n\nReturns the top preferred encoding from a list of available encodings.\n\n# License\n\nMIT\n", - "readmeFilename": "readme.md", - "bugs": { - "url": "https://github.com/federomero/negotiator/issues" - }, - "homepage": "https://github.com/federomero/negotiator", - "dependencies": {}, - "_id": "negotiator@0.3.0", - "dist": { - "shasum": "706d692efeddf574d57ea9fb1ab89a4fa7ee8f60" - }, - "_from": "negotiator@0.3.0", - "_resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.3.0.tgz" -} diff --git a/node_modules/express/node_modules/connect/node_modules/negotiator/readme.md b/node_modules/express/node_modules/connect/node_modules/negotiator/readme.md deleted file mode 100644 index 0a077bbe..00000000 --- a/node_modules/express/node_modules/connect/node_modules/negotiator/readme.md +++ /dev/null @@ -1,132 +0,0 @@ -# Negotiator - -An HTTP content negotiator for node.js written in javascript. - -# Accept Negotiation - - Negotiator = require('negotiator') - - availableMediaTypes = ['text/html', 'text/plain', 'application/json'] - - // The negotiator constructor receives a request object - negotiator = new Negotiator(request) - - // Let's say Accept header is 'text/html, application/*;q=0.2, image/jpeg;q=0.8' - - negotiator.preferredMediaTypes() - // -> ['text/html', 'image/jpeg', 'application/*'] - - negotiator.preferredMediaTypes(availableMediaTypes) - // -> ['text/html', 'application/json'] - - negotiator.preferredMediaType(availableMediaTypes) - // -> 'text/html' - -You can check a working example at `examples/accept.js`. - -## Methods - -`preferredMediaTypes(availableMediaTypes)`: - -Returns an array of preferred media types ordered by priority from a list of available media types. - -`preferredMediaType(availableMediaType)`: - -Returns the top preferred media type from a list of available media types. - -# Accept-Language Negotiation - - Negotiator = require('negotiator') - - negotiator = new Negotiator(request) - - availableLanguages = 'en', 'es', 'fr' - - // Let's say Accept-Language header is 'en;q=0.8, es, pt' - - negotiator.preferredLanguages() - // -> ['es', 'pt', 'en'] - - negotiator.preferredLanguages(availableLanguages) - // -> ['es', 'en'] - - language = negotiator.preferredLanguage(availableLanguages) - // -> 'es' - -You can check a working example at `examples/language.js`. - -## Methods - -`preferredLanguages(availableLanguages)`: - -Returns an array of preferred languages ordered by priority from a list of available languages. - -`preferredLanguage(availableLanguages)`: - -Returns the top preferred language from a list of available languages. - -# Accept-Charset Negotiation - - Negotiator = require('negotiator') - - availableCharsets = ['utf-8', 'iso-8859-1', 'iso-8859-5'] - - negotiator = new Negotiator(request) - - // Let's say Accept-Charset header is 'utf-8, iso-8859-1;q=0.8, utf-7;q=0.2' - - negotiator.preferredCharsets() - // -> ['utf-8', 'iso-8859-1', 'utf-7'] - - negotiator.preferredCharsets(availableCharsets) - // -> ['utf-8', 'iso-8859-1'] - - negotiator.preferredCharset(availableCharsets) - // -> 'utf-8' - -You can check a working example at `examples/charset.js`. - -## Methods - -`preferredCharsets(availableCharsets)`: - -Returns an array of preferred charsets ordered by priority from a list of available charsets. - -`preferredCharset(availableCharsets)`: - -Returns the top preferred charset from a list of available charsets. - -# Accept-Encoding Negotiation - - Negotiator = require('negotiator').Negotiator - - availableEncodings = ['identity', 'gzip'] - - negotiator = new Negotiator(request) - - // Let's say Accept-Encoding header is 'gzip, compress;q=0.2, identity;q=0.5' - - negotiator.preferredEncodings() - // -> ['gzip', 'identity', 'compress'] - - negotiator.preferredEncodings(availableEncodings) - // -> ['gzip', 'identity'] - - negotiator.preferredEncoding(availableEncodings) - // -> 'gzip' - -You can check a working example at `examples/encoding.js`. - -## Methods - -`preferredEncodings(availableEncodings)`: - -Returns an array of preferred encodings ordered by priority from a list of available encodings. - -`preferredEncoding(availableEncodings)`: - -Returns the top preferred encoding from a list of available encodings. - -# License - -MIT diff --git a/node_modules/express/node_modules/connect/node_modules/negotiator/test/charset.js b/node_modules/express/node_modules/connect/node_modules/negotiator/test/charset.js deleted file mode 100644 index 79224a75..00000000 --- a/node_modules/express/node_modules/connect/node_modules/negotiator/test/charset.js +++ /dev/null @@ -1,62 +0,0 @@ -(function() { - var configuration, preferredCharsets, testConfigurations, testCorrectCharset, _i, _len, - _this = this; - - preferredCharsets = require('../lib/charset').preferredCharsets; - - this["Should not return a charset when no charset is provided"] = function(test) { - test.deepEqual(preferredCharsets('*', []), []); - return test.done(); - }; - - this["Should not return a charset when no charset is acceptable"] = function(test) { - test.deepEqual(preferredCharsets('ISO-8859-1', ['utf-8']), []); - return test.done(); - }; - - this["Should not return a charset with q = 0"] = function(test) { - test.deepEqual(preferredCharsets('utf-8;q=0', ['utf-8']), []); - return test.done(); - }; - - testCorrectCharset = function(c) { - return _this["Should return " + c.selected + " for accept-charset header " + c.accept + " with provided charset " + c.provided] = function(test) { - test.deepEqual(preferredCharsets(c.accept, c.provided), c.selected); - return test.done(); - }; - }; - - testConfigurations = [ - { - accept: 'utf-8', - provided: ['utf-8'], - selected: ['utf-8'] - }, { - accept: '*', - provided: ['utf-8'], - selected: ['utf-8'] - }, { - accept: 'utf-8', - provided: ['utf-8', 'ISO-8859-1'], - selected: ['utf-8'] - }, { - accept: 'utf-8, ISO-8859-1', - provided: ['utf-8'], - selected: ['utf-8'] - }, { - accept: 'utf-8;q=0.8, ISO-8859-1', - provided: ['utf-8', 'ISO-8859-1'], - selected: ['ISO-8859-1', 'utf-8'] - }, { - accept: 'utf-8;q=0.8, ISO-8859-1', - provided: null, - selected: ['ISO-8859-1', 'utf-8'] - } - ]; - - for (_i = 0, _len = testConfigurations.length; _i < _len; _i++) { - configuration = testConfigurations[_i]; - testCorrectCharset(configuration); - } - -}).call(this); diff --git a/node_modules/express/node_modules/connect/node_modules/negotiator/test/encoding.js b/node_modules/express/node_modules/connect/node_modules/negotiator/test/encoding.js deleted file mode 100644 index 7859d5e4..00000000 --- a/node_modules/express/node_modules/connect/node_modules/negotiator/test/encoding.js +++ /dev/null @@ -1,70 +0,0 @@ -(function() { - var configuration, preferredEncodings, testConfigurations, testCorrectEncoding, _i, _len, - _this = this; - - preferredEncodings = require('../lib/encoding').preferredEncodings; - - this["Should return identity encoding when no encoding is provided"] = function(test) { - test.deepEqual(preferredEncodings(null), ['identity']); - return test.done(); - }; - - this["Should include the identity encoding even if not explicity listed"] = function(test) { - test.ok(preferredEncodings('gzip').indexOf('identity') !== -1); - return test.done(); - }; - - this["Should not return identity encoding if q = 0"] = function(test) { - test.ok(preferredEncodings('identity;q=0').indexOf('identity') === -1); - return test.done(); - }; - - testCorrectEncoding = function(c) { - return _this["Should return " + c.selected + " for accept-encoding header " + c.accept + " with provided encoding " + c.provided] = function(test) { - test.deepEqual(preferredEncodings(c.accept, c.provided), c.selected); - return test.done(); - }; - }; - - testConfigurations = [ - { - accept: 'gzip', - provided: ['identity', 'gzip'], - selected: ['gzip', 'identity'] - }, { - accept: 'gzip, compress', - provided: ['compress'], - selected: ['compress'] - }, { - accept: 'deflate', - provided: ['gzip', 'identity'], - selected: ['identity'] - }, { - accept: '*', - provided: ['identity', 'gzip'], - selected: ['identity', 'gzip'] - }, { - accept: 'gzip, compress', - provided: ['compress', 'identity'], - selected: ['compress', 'identity'] - }, { - accept: 'gzip;q=0.8, identity;q=0.5, *;q=0.3', - provided: ['identity', 'gzip', 'compress'], - selected: ['gzip', 'identity', 'compress'] - }, { - accept: 'gzip;q=0.8, compress', - provided: ['gzip', 'compress'], - selected: ['compress', 'gzip'] - }, { - accept: 'gzip;q=0.8, compress', - provided: null, - selected: ['compress', 'gzip', 'identity'] - } - ]; - - for (_i = 0, _len = testConfigurations.length; _i < _len; _i++) { - configuration = testConfigurations[_i]; - testCorrectEncoding(configuration); - } - -}).call(this); diff --git a/node_modules/express/node_modules/connect/node_modules/negotiator/test/language.js b/node_modules/express/node_modules/connect/node_modules/negotiator/test/language.js deleted file mode 100644 index d98f26de..00000000 --- a/node_modules/express/node_modules/connect/node_modules/negotiator/test/language.js +++ /dev/null @@ -1,70 +0,0 @@ -(function() { - var configuration, preferredLanguages, testConfigurations, testCorrectType, _i, _len, - _this = this; - - preferredLanguages = require('../lib/language').preferredLanguages; - - this["Should not return a language when no is provided"] = function(test) { - test.deepEqual(preferredLanguages('*', []), []); - return test.done(); - }; - - this["Should not return a language when no language is acceptable"] = function(test) { - test.deepEqual(preferredLanguages('en', ['es']), []); - return test.done(); - }; - - this["Should not return a language with q = 0"] = function(test) { - test.deepEqual(preferredLanguages('en;q=0', ['en']), []); - return test.done(); - }; - - testCorrectType = function(c) { - return _this["Should return " + c.selected + " for accept-language header " + c.accept + " with provided language " + c.provided] = function(test) { - test.deepEqual(preferredLanguages(c.accept, c.provided), c.selected); - return test.done(); - }; - }; - - testConfigurations = [ - { - accept: 'en', - provided: ['en'], - selected: ['en'] - }, { - accept: '*', - provided: ['en'], - selected: ['en'] - }, { - accept: 'en-US, en;q=0.8', - provided: ['en-US', 'en-GB'], - selected: ['en-US', 'en-GB'] - }, { - accept: 'en-US, en-GB', - provided: ['en-US'], - selected: ['en-US'] - }, { - accept: 'en', - provided: ['en-US'], - selected: ['en-US'] - }, { - accept: 'en;q=0.8, es', - provided: ['en', 'es'], - selected: ['es', 'en'] - }, { - accept: 'en-US;q=0.8, es', - provided: ['en', 'es'], - selected: ['es', 'en'] - }, { - accept: 'en-US;q=0.8, es', - provided: null, - selected: ['es', 'en-US'] - } - ]; - - for (_i = 0, _len = testConfigurations.length; _i < _len; _i++) { - configuration = testConfigurations[_i]; - testCorrectType(configuration); - } - -}).call(this); diff --git a/node_modules/express/node_modules/connect/node_modules/negotiator/test/mediaType.js b/node_modules/express/node_modules/connect/node_modules/negotiator/test/mediaType.js deleted file mode 100644 index 08e49231..00000000 --- a/node_modules/express/node_modules/connect/node_modules/negotiator/test/mediaType.js +++ /dev/null @@ -1,70 +0,0 @@ -(function() { - var configuration, preferredMediaTypes, testConfigurations, testCorrectType, _i, _len, - _this = this; - - preferredMediaTypes = require('../lib/mediaType').preferredMediaTypes; - - this["Should not return a media type when no media type provided"] = function(test) { - test.deepEqual(preferredMediaTypes('*/*', []), []); - return test.done(); - }; - - this["Should not return a media type when no media type is acceptable"] = function(test) { - test.deepEqual(preferredMediaTypes('application/json', ['text/html']), []); - return test.done(); - }; - - this["Should not return a media type with q = 0"] = function(test) { - test.deepEqual(preferredMediaTypes('text/html;q=0', ['text/html']), []); - return test.done(); - }; - - testCorrectType = function(c) { - return _this["Should return " + c.selected + " for access header " + c.accept + " with provided types " + c.provided] = function(test) { - test.deepEqual(preferredMediaTypes(c.accept, c.provided), c.selected); - return test.done(); - }; - }; - - testConfigurations = [ - { - accept: 'text/html', - provided: ['text/html'], - selected: ['text/html'] - }, { - accept: '*/*', - provided: ['text/html'], - selected: ['text/html'] - }, { - accept: 'text/*', - provided: ['text/html'], - selected: ['text/html'] - }, { - accept: 'application/json, text/html', - provided: ['text/html'], - selected: ['text/html'] - }, { - accept: 'text/html;q=0.1', - provided: ['text/html'], - selected: ['text/html'] - }, { - accept: 'application/json, text/html', - provided: ['application/json', 'text/html'], - selected: ['application/json', 'text/html'] - }, { - accept: 'application/json;q=0.2, text/html', - provided: ['application/json', 'text/html'], - selected: ['text/html', 'application/json'] - }, { - accept: 'application/json;q=0.2, text/html', - provided: null, - selected: ['text/html', 'application/json'] - } - ]; - - for (_i = 0, _len = testConfigurations.length; _i < _len; _i++) { - configuration = testConfigurations[_i]; - testCorrectType(configuration); - } - -}).call(this); diff --git a/node_modules/express/node_modules/connect/node_modules/pause/.npmignore b/node_modules/express/node_modules/connect/node_modules/pause/.npmignore deleted file mode 100644 index f1250e58..00000000 --- a/node_modules/express/node_modules/connect/node_modules/pause/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/node_modules/express/node_modules/connect/node_modules/pause/History.md b/node_modules/express/node_modules/connect/node_modules/pause/History.md deleted file mode 100644 index c8aa68fa..00000000 --- a/node_modules/express/node_modules/connect/node_modules/pause/History.md +++ /dev/null @@ -1,5 +0,0 @@ - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/express/node_modules/connect/node_modules/pause/Makefile b/node_modules/express/node_modules/connect/node_modules/pause/Makefile deleted file mode 100644 index 4e9c8d36..00000000 --- a/node_modules/express/node_modules/connect/node_modules/pause/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --require should \ - --reporter spec - -.PHONY: test \ No newline at end of file diff --git a/node_modules/express/node_modules/connect/node_modules/pause/Readme.md b/node_modules/express/node_modules/connect/node_modules/pause/Readme.md deleted file mode 100644 index 1cdd68a2..00000000 --- a/node_modules/express/node_modules/connect/node_modules/pause/Readme.md +++ /dev/null @@ -1,29 +0,0 @@ - -# pause - - Pause streams... - -## License - -(The MIT License) - -Copyright (c) 2012 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. \ No newline at end of file diff --git a/node_modules/express/node_modules/connect/node_modules/pause/index.js b/node_modules/express/node_modules/connect/node_modules/pause/index.js deleted file mode 100644 index 1b7b3794..00000000 --- a/node_modules/express/node_modules/connect/node_modules/pause/index.js +++ /dev/null @@ -1,29 +0,0 @@ - -module.exports = function(obj){ - var onData - , onEnd - , events = []; - - // buffer data - obj.on('data', onData = function(data, encoding){ - events.push(['data', data, encoding]); - }); - - // buffer end - obj.on('end', onEnd = function(data, encoding){ - events.push(['end', data, encoding]); - }); - - return { - end: function(){ - obj.removeListener('data', onData); - obj.removeListener('end', onEnd); - }, - resume: function(){ - this.end(); - for (var i = 0, len = events.length; i < len; ++i) { - obj.emit.apply(obj, events[i]); - } - } - }; -}; \ No newline at end of file diff --git a/node_modules/express/node_modules/connect/node_modules/pause/package.json b/node_modules/express/node_modules/connect/node_modules/pause/package.json deleted file mode 100644 index 9296b245..00000000 --- a/node_modules/express/node_modules/connect/node_modules/pause/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "pause", - "version": "0.0.1", - "description": "Pause streams...", - "keywords": [], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "main": "index", - "readme": "\n# pause\n\n Pause streams...\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "_id": "pause@0.0.1", - "dist": { - "shasum": "1d408b3fdb76923b9543d96fb4c9dfd535d9cb5d" - }, - "_from": "pause@0.0.1", - "_resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz" -} diff --git a/node_modules/express/node_modules/connect/node_modules/qs/.gitmodules b/node_modules/express/node_modules/connect/node_modules/qs/.gitmodules deleted file mode 100644 index 49e31dac..00000000 --- a/node_modules/express/node_modules/connect/node_modules/qs/.gitmodules +++ /dev/null @@ -1,6 +0,0 @@ -[submodule "support/expresso"] - path = support/expresso - url = git://github.com/visionmedia/expresso.git -[submodule "support/should"] - path = support/should - url = git://github.com/visionmedia/should.js.git diff --git a/node_modules/express/node_modules/connect/node_modules/qs/.npmignore b/node_modules/express/node_modules/connect/node_modules/qs/.npmignore deleted file mode 100644 index e85ce2af..00000000 --- a/node_modules/express/node_modules/connect/node_modules/qs/.npmignore +++ /dev/null @@ -1,7 +0,0 @@ -test -.travis.yml -benchmark.js -component.json -examples.js -History.md -Makefile diff --git a/node_modules/express/node_modules/connect/node_modules/qs/Readme.md b/node_modules/express/node_modules/connect/node_modules/qs/Readme.md deleted file mode 100644 index 27e54a4a..00000000 --- a/node_modules/express/node_modules/connect/node_modules/qs/Readme.md +++ /dev/null @@ -1,58 +0,0 @@ -# node-querystring - - query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others. - -## Installation - - $ npm install qs - -## Examples - -```js -var qs = require('qs'); - -qs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com'); -// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } } - -qs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }}) -// => user[name]=Tobi&user[email]=tobi%40learnboost.com -``` - -## Testing - -Install dev dependencies: - - $ npm install -d - -and execute: - - $ make test - -browser: - - $ open test/browser/index.html - -## License - -(The MIT License) - -Copyright (c) 2010 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. \ No newline at end of file diff --git a/node_modules/express/node_modules/connect/node_modules/qs/index.js b/node_modules/express/node_modules/connect/node_modules/qs/index.js deleted file mode 100644 index b05938ac..00000000 --- a/node_modules/express/node_modules/connect/node_modules/qs/index.js +++ /dev/null @@ -1,366 +0,0 @@ -/** - * Object#toString() ref for stringify(). - */ - -var toString = Object.prototype.toString; - -/** - * Object#hasOwnProperty ref - */ - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -/** - * Array#indexOf shim. - */ - -var indexOf = typeof Array.prototype.indexOf === 'function' - ? function(arr, el) { return arr.indexOf(el); } - : function(arr, el) { - for (var i = 0; i < arr.length; i++) { - if (arr[i] === el) return i; - } - return -1; - }; - -/** - * Array.isArray shim. - */ - -var isArray = Array.isArray || function(arr) { - return toString.call(arr) == '[object Array]'; -}; - -/** - * Object.keys shim. - */ - -var objectKeys = Object.keys || function(obj) { - var ret = []; - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - ret.push(key); - } - } - return ret; -}; - -/** - * Array#forEach shim. - */ - -var forEach = typeof Array.prototype.forEach === 'function' - ? function(arr, fn) { return arr.forEach(fn); } - : function(arr, fn) { - for (var i = 0; i < arr.length; i++) fn(arr[i]); - }; - -/** - * Array#reduce shim. - */ - -var reduce = function(arr, fn, initial) { - if (typeof arr.reduce === 'function') return arr.reduce(fn, initial); - var res = initial; - for (var i = 0; i < arr.length; i++) res = fn(res, arr[i]); - return res; -}; - -/** - * Cache non-integer test regexp. - */ - -var isint = /^[0-9]+$/; - -function promote(parent, key) { - if (parent[key].length == 0) return parent[key] = {} - var t = {}; - for (var i in parent[key]) { - if (hasOwnProperty.call(parent[key], i)) { - t[i] = parent[key][i]; - } - } - parent[key] = t; - return t; -} - -function parse(parts, parent, key, val) { - var part = parts.shift(); - - // illegal - if (Object.getOwnPropertyDescriptor(Object.prototype, key)) return; - - // end - if (!part) { - if (isArray(parent[key])) { - parent[key].push(val); - } else if ('object' == typeof parent[key]) { - parent[key] = val; - } else if ('undefined' == typeof parent[key]) { - parent[key] = val; - } else { - parent[key] = [parent[key], val]; - } - // array - } else { - var obj = parent[key] = parent[key] || []; - if (']' == part) { - if (isArray(obj)) { - if ('' != val) obj.push(val); - } else if ('object' == typeof obj) { - obj[objectKeys(obj).length] = val; - } else { - obj = parent[key] = [parent[key], val]; - } - // prop - } else if (~indexOf(part, ']')) { - part = part.substr(0, part.length - 1); - if (!isint.test(part) && isArray(obj)) obj = promote(parent, key); - parse(parts, obj, part, val); - // key - } else { - if (!isint.test(part) && isArray(obj)) obj = promote(parent, key); - parse(parts, obj, part, val); - } - } -} - -/** - * Merge parent key/val pair. - */ - -function merge(parent, key, val){ - if (~indexOf(key, ']')) { - var parts = key.split('[') - , len = parts.length - , last = len - 1; - parse(parts, parent, 'base', val); - // optimize - } else { - if (!isint.test(key) && isArray(parent.base)) { - var t = {}; - for (var k in parent.base) t[k] = parent.base[k]; - parent.base = t; - } - set(parent.base, key, val); - } - - return parent; -} - -/** - * Compact sparse arrays. - */ - -function compact(obj) { - if ('object' != typeof obj) return obj; - - if (isArray(obj)) { - var ret = []; - - for (var i in obj) { - if (hasOwnProperty.call(obj, i)) { - ret.push(obj[i]); - } - } - - return ret; - } - - for (var key in obj) { - obj[key] = compact(obj[key]); - } - - return obj; -} - -/** - * Parse the given obj. - */ - -function parseObject(obj){ - var ret = { base: {} }; - - forEach(objectKeys(obj), function(name){ - merge(ret, name, obj[name]); - }); - - return compact(ret.base); -} - -/** - * Parse the given str. - */ - -function parseString(str){ - var ret = reduce(String(str).split('&'), function(ret, pair){ - var eql = indexOf(pair, '=') - , brace = lastBraceInKey(pair) - , key = pair.substr(0, brace || eql) - , val = pair.substr(brace || eql, pair.length) - , val = val.substr(indexOf(val, '=') + 1, val.length); - - // ?foo - if ('' == key) key = pair, val = ''; - if ('' == key) return ret; - - return merge(ret, decode(key), decode(val)); - }, { base: {} }).base; - - return compact(ret); -} - -/** - * Parse the given query `str` or `obj`, returning an object. - * - * @param {String} str | {Object} obj - * @return {Object} - * @api public - */ - -exports.parse = function(str){ - if (null == str || '' == str) return {}; - return 'object' == typeof str - ? parseObject(str) - : parseString(str); -}; - -/** - * Turn the given `obj` into a query string - * - * @param {Object} obj - * @return {String} - * @api public - */ - -var stringify = exports.stringify = function(obj, prefix) { - if (isArray(obj)) { - return stringifyArray(obj, prefix); - } else if ('[object Object]' == toString.call(obj)) { - return stringifyObject(obj, prefix); - } else if ('string' == typeof obj) { - return stringifyString(obj, prefix); - } else { - return prefix + '=' + encodeURIComponent(String(obj)); - } -}; - -/** - * Stringify the given `str`. - * - * @param {String} str - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyString(str, prefix) { - if (!prefix) throw new TypeError('stringify expects an object'); - return prefix + '=' + encodeURIComponent(str); -} - -/** - * Stringify the given `arr`. - * - * @param {Array} arr - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyArray(arr, prefix) { - var ret = []; - if (!prefix) throw new TypeError('stringify expects an object'); - for (var i = 0; i < arr.length; i++) { - ret.push(stringify(arr[i], prefix + '[' + i + ']')); - } - return ret.join('&'); -} - -/** - * Stringify the given `obj`. - * - * @param {Object} obj - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyObject(obj, prefix) { - var ret = [] - , keys = objectKeys(obj) - , key; - - for (var i = 0, len = keys.length; i < len; ++i) { - key = keys[i]; - if ('' == key) continue; - if (null == obj[key]) { - ret.push(encodeURIComponent(key) + '='); - } else { - ret.push(stringify(obj[key], prefix - ? prefix + '[' + encodeURIComponent(key) + ']' - : encodeURIComponent(key))); - } - } - - return ret.join('&'); -} - -/** - * Set `obj`'s `key` to `val` respecting - * the weird and wonderful syntax of a qs, - * where "foo=bar&foo=baz" becomes an array. - * - * @param {Object} obj - * @param {String} key - * @param {String} val - * @api private - */ - -function set(obj, key, val) { - var v = obj[key]; - if (Object.getOwnPropertyDescriptor(Object.prototype, key)) return; - if (undefined === v) { - obj[key] = val; - } else if (isArray(v)) { - v.push(val); - } else { - obj[key] = [v, val]; - } -} - -/** - * Locate last brace in `str` within the key. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function lastBraceInKey(str) { - var len = str.length - , brace - , c; - for (var i = 0; i < len; ++i) { - c = str[i]; - if (']' == c) brace = false; - if ('[' == c) brace = true; - if ('=' == c && !brace) return i; - } -} - -/** - * Decode `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -function decode(str) { - try { - return decodeURIComponent(str.replace(/\+/g, ' ')); - } catch (err) { - return str; - } -} diff --git a/node_modules/express/node_modules/connect/node_modules/qs/package.json b/node_modules/express/node_modules/connect/node_modules/qs/package.json deleted file mode 100644 index d2a9c9b2..00000000 --- a/node_modules/express/node_modules/connect/node_modules/qs/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "qs", - "description": "querystring parser", - "version": "0.6.6", - "keywords": [ - "query string", - "parser", - "component" - ], - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/node-querystring.git" - }, - "devDependencies": { - "mocha": "*", - "expect.js": "*" - }, - "scripts": { - "test": "make test" - }, - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - }, - "main": "index", - "engines": { - "node": "*" - }, - "readme": "# node-querystring\n\n query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others.\n\n## Installation\n\n $ npm install qs\n\n## Examples\n\n```js\nvar qs = require('qs');\n\nqs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com');\n// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } }\n\nqs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }})\n// => user[name]=Tobi&user[email]=tobi%40learnboost.com\n```\n\n## Testing\n\nInstall dev dependencies:\n\n $ npm install -d\n\nand execute:\n\n $ make test\n\nbrowser:\n\n $ open test/browser/index.html\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2010 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/node-querystring/issues" - }, - "homepage": "https://github.com/visionmedia/node-querystring", - "_id": "qs@0.6.6", - "dist": { - "shasum": "6e015098ff51968b8a3c819001d5f2c89bc4b107" - }, - "_from": "qs@0.6.6", - "_resolved": "https://registry.npmjs.org/qs/-/qs-0.6.6.tgz" -} diff --git a/node_modules/express/node_modules/connect/node_modules/raw-body/.npmignore b/node_modules/express/node_modules/connect/node_modules/raw-body/.npmignore deleted file mode 100644 index b59f7e3a..00000000 --- a/node_modules/express/node_modules/connect/node_modules/raw-body/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test/ \ No newline at end of file diff --git a/node_modules/express/node_modules/connect/node_modules/raw-body/.travis.yml b/node_modules/express/node_modules/connect/node_modules/raw-body/.travis.yml deleted file mode 100644 index 595ded21..00000000 --- a/node_modules/express/node_modules/connect/node_modules/raw-body/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -node_js: -- "0.8" -- "0.10" -- "0.11" -language: node_js -matrix: - allow_failures: - - node_js: "0.11" \ No newline at end of file diff --git a/node_modules/express/node_modules/connect/node_modules/raw-body/Makefile b/node_modules/express/node_modules/connect/node_modules/raw-body/Makefile deleted file mode 100644 index 642d6a64..00000000 --- a/node_modules/express/node_modules/connect/node_modules/raw-body/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -NODE ?= node -BIN = ./node_modules/.bin/ - -test: - @${NODE} ${BIN}mocha \ - --reporter spec \ - --bail \ - ./test/index.js - -clean: - @rm -rf node_modules - -.PHONY: test clean diff --git a/node_modules/express/node_modules/connect/node_modules/raw-body/README.md b/node_modules/express/node_modules/connect/node_modules/raw-body/README.md deleted file mode 100644 index 049ef641..00000000 --- a/node_modules/express/node_modules/connect/node_modules/raw-body/README.md +++ /dev/null @@ -1,96 +0,0 @@ -# Raw Body [![Build Status](https://travis-ci.org/stream-utils/raw-body.png)](https://travis-ci.org/stream-utils/raw-body) - -Gets the entire buffer of a stream either as a `Buffer` or a string. -Validates the stream's length against an expected length and maximum limit. -Ideal for parsing request bodies. - -## API - -```js -var getRawBody = require('raw-body') - -app.use(function (req, res, next) { - getRawBody(req, { - length: req.headers['content-length'], - limit: '1mb', - encoding: 'utf8' - }, function (err, string) { - if (err) - return next(err) - - req.text = string - next() - }) -}) -``` - -or in a Koa generator: - -```js -app.use(function* (next) { - var string = yield getRawBody(this.req, { - length: this.length, - limit: '1mb', - encoding: 'utf8' - }) -}) -``` - -### getRawBody(stream, [options], [callback]) - -Returns a thunk for yielding with generators. - -Options: - -- `length` - The length length of the stream. - If the contents of the stream do not add up to this length, - an `400` error code is returned. -- `limit` - The byte limit of the body. - If the body ends up being larger than this limit, - a `413` error code is returned. -- `encoding` - The requested encoding. - By default, a `Buffer` instance will be returned. - Most likely, you want `utf8`. - You can use any type of encoding supported by [StringDecoder](http://nodejs.org/api/string_decoder.html). - You can also pass `true` which sets it to the default `utf8` - -`callback(err, res)`: - -- `err` - the following attributes will be defined if applicable: - - - `limit` - the limit in bytes - - `length` and `expected` - the expected length of the stream - - `received` - the received bytes - - `status` and `statusCode` - the corresponding status code for the error - - `type` - either `entity.too.large`, `request.size.invalid`, or `stream.encoding.set` - -- `res` - the result, either as a `String` if an encoding was set or a `Buffer` otherwise. - -If an error occurs, the stream will be paused, -and you are responsible for correctly disposing the stream. -For HTTP requests, no handling is required if you send a response. -For streams that use file descriptors, you should `stream.destroy()` or `stream.close()` to prevent leaks. - -## License - -The MIT License (MIT) - -Copyright (c) 2013 Jonathan Ong me@jongleberry.com - -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/node_modules/express/node_modules/connect/node_modules/raw-body/index.js b/node_modules/express/node_modules/connect/node_modules/raw-body/index.js deleted file mode 100644 index b1798654..00000000 --- a/node_modules/express/node_modules/connect/node_modules/raw-body/index.js +++ /dev/null @@ -1,160 +0,0 @@ -var StringDecoder = require('string_decoder').StringDecoder -var bytes = require('bytes') - -module.exports = function (stream, options, done) { - if (typeof options === 'function') { - done = options - options = {} - } else if (!options) { - options = {} - } - - // convert the limit to an integer - var limit = null - if (typeof options.limit === 'number') - limit = options.limit - if (typeof options.limit === 'string') - limit = bytes(options.limit) - - // convert the expected length to an integer - var length = null - if (!isNaN(options.length)) - length = parseInt(options.length, 10) - - // check the length and limit options. - // note: we intentionally leave the stream paused, - // so users should handle the stream themselves. - if (limit !== null && length !== null && length > limit) { - if (typeof stream.pause === 'function') - stream.pause() - - process.nextTick(function () { - var err = makeError('request entity too large', 'entity.too.large') - err.status = err.statusCode = 413 - err.length = err.expected = length - err.limit = limit - done(err) - }) - return defer - } - - var state = stream._readableState - // streams2+: assert the stream encoding is buffer. - if (state && state.encoding != null) { - if (typeof stream.pause === 'function') - stream.pause() - - process.nextTick(function () { - var err = makeError('stream encoding should not be set', - 'stream.encoding.set') - // developer error - err.status = err.statusCode = 500 - done(err) - }) - return defer - } - - var received = 0 - // note: we delegate any invalid encodings to the constructor - var decoder = options.encoding - ? new StringDecoder(options.encoding === true ? 'utf8' : options.encoding) - : null - var buffer = decoder - ? '' - : [] - - stream.on('data', onData) - stream.once('end', onEnd) - stream.once('error', onEnd) - stream.once('close', cleanup) - - return defer - - // yieldable support - function defer(fn) { - done = fn - } - - function onData(chunk) { - received += chunk.length - decoder - ? buffer += decoder.write(chunk) - : buffer.push(chunk) - - if (limit !== null && received > limit) { - if (typeof stream.pause === 'function') - stream.pause() - var err = makeError('request entity too large', 'entity.too.large') - err.status = err.statusCode = 413 - err.received = received - err.limit = limit - done(err) - cleanup() - } - } - - function onEnd(err) { - if (err) { - if (typeof stream.pause === 'function') - stream.pause() - done(err) - } else if (length !== null && received !== length) { - err = makeError('request size did not match content length', - 'request.size.invalid') - err.status = err.statusCode = 400 - err.received = received - err.length = err.expected = length - done(err) - } else { - done(null, decoder - ? buffer + endStringDecoder(decoder) - : Buffer.concat(buffer) - ) - } - - cleanup() - } - - function cleanup() { - received = buffer = null - - stream.removeListener('data', onData) - stream.removeListener('end', onEnd) - stream.removeListener('error', onEnd) - stream.removeListener('close', cleanup) - } -} - -// to create serializable errors you must re-set message so -// that it is enumerable and you must re configure the type -// property so that is writable and enumerable -function makeError(message, type) { - var error = new Error() - error.message = message - Object.defineProperty(error, 'type', { - value: type, - enumerable: true, - writable: true, - configurable: true - }) - return error -} - -// https://github.com/Raynos/body/blob/2512ced39e31776e5a2f7492b907330badac3a40/index.js#L72 -// bug fix for missing `StringDecoder.end` in v0.8.x -function endStringDecoder(decoder) { - if (decoder.end) { - return decoder.end() - } - - var res = "" - - if (decoder.charReceived) { - var cr = decoder.charReceived - var buf = decoder.charBuffer - var enc = decoder.encoding - res += buf.slice(0, cr).toString(enc) - } - - return res -} diff --git a/node_modules/express/node_modules/connect/node_modules/raw-body/package.json b/node_modules/express/node_modules/connect/node_modules/raw-body/package.json deleted file mode 100644 index 9f080c17..00000000 --- a/node_modules/express/node_modules/connect/node_modules/raw-body/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "raw-body", - "description": "Get and validate the raw body of a readable stream.", - "version": "1.1.2", - "author": { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/stream-utils/raw-body.git" - }, - "bugs": { - "url": "https://github.com/stream-utils/raw-body/issues" - }, - "dependencies": { - "bytes": "~0.2.1" - }, - "devDependencies": { - "readable-stream": "~1.0.17", - "co": "2", - "gnode": "~0.0.4", - "mocha": "~1.14.0", - "through": "~2.3.4", - "request": "~2.27.0", - "assert-tap": "~0.1.4" - }, - "scripts": { - "test": "NODE=gnode make test && node ./test/acceptance.js" - }, - "engines": { - "node": ">= 0.8.0" - }, - "readme": "# Raw Body [![Build Status](https://travis-ci.org/stream-utils/raw-body.png)](https://travis-ci.org/stream-utils/raw-body)\n\nGets the entire buffer of a stream either as a `Buffer` or a string.\nValidates the stream's length against an expected length and maximum limit.\nIdeal for parsing request bodies.\n\n## API\n\n```js\nvar getRawBody = require('raw-body')\n\napp.use(function (req, res, next) {\n getRawBody(req, {\n length: req.headers['content-length'],\n limit: '1mb',\n encoding: 'utf8'\n }, function (err, string) {\n if (err)\n return next(err)\n\n req.text = string\n next()\n })\n})\n```\n\nor in a Koa generator:\n\n```js\napp.use(function* (next) {\n var string = yield getRawBody(this.req, {\n length: this.length,\n limit: '1mb',\n encoding: 'utf8'\n })\n})\n```\n\n### getRawBody(stream, [options], [callback])\n\nReturns a thunk for yielding with generators.\n\nOptions:\n\n- `length` - The length length of the stream.\n If the contents of the stream do not add up to this length,\n an `400` error code is returned.\n- `limit` - The byte limit of the body.\n If the body ends up being larger than this limit,\n a `413` error code is returned.\n- `encoding` - The requested encoding.\n By default, a `Buffer` instance will be returned.\n Most likely, you want `utf8`.\n You can use any type of encoding supported by [StringDecoder](http://nodejs.org/api/string_decoder.html).\n You can also pass `true` which sets it to the default `utf8`\n\n`callback(err, res)`:\n\n- `err` - the following attributes will be defined if applicable:\n\n - `limit` - the limit in bytes\n - `length` and `expected` - the expected length of the stream\n - `received` - the received bytes\n - `status` and `statusCode` - the corresponding status code for the error\n - `type` - either `entity.too.large`, `request.size.invalid`, or `stream.encoding.set`\n\n- `res` - the result, either as a `String` if an encoding was set or a `Buffer` otherwise.\n\nIf an error occurs, the stream will be paused,\nand you are responsible for correctly disposing the stream.\nFor HTTP requests, no handling is required if you send a response.\nFor streams that use file descriptors, you should `stream.destroy()` or `stream.close()` to prevent leaks.\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2013 Jonathan Ong me@jongleberry.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/stream-utils/raw-body", - "_id": "raw-body@1.1.2", - "dist": { - "shasum": "c74b3004dea5defd1696171106ac740ec31d62be" - }, - "_from": "raw-body@1.1.2", - "_resolved": "https://registry.npmjs.org/raw-body/-/raw-body-1.1.2.tgz" -} diff --git a/node_modules/express/node_modules/connect/node_modules/uid2/LICENSE b/node_modules/express/node_modules/connect/node_modules/uid2/LICENSE deleted file mode 100644 index bdfab69b..00000000 --- a/node_modules/express/node_modules/connect/node_modules/uid2/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Marco Aurelio - -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. \ No newline at end of file diff --git a/node_modules/express/node_modules/connect/node_modules/uid2/index.js b/node_modules/express/node_modules/connect/node_modules/uid2/index.js deleted file mode 100644 index 6240b308..00000000 --- a/node_modules/express/node_modules/connect/node_modules/uid2/index.js +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Module dependencies - */ - -var crypto = require('crypto'); - -/** - * 62 characters in the ascii range that can be used in URLs without special - * encoding. - */ -var UIDCHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; - -/** - * Make a Buffer into a string ready for use in URLs - * - * @param {String} - * @returns {String} - * @api private - */ -function tostr(bytes) { - var chars, r, i; - - r = []; - for (i = 0; i < bytes.length; i++) { - r.push(UIDCHARS[bytes[i] % UIDCHARS.length]); - } - - return r.join(''); -} - -/** - * Generate an Unique Id - * - * @param {Number} length The number of chars of the uid - * @param {Number} cb (optional) Callback for async uid generation - * @api public - */ - -function uid(length, cb) { - - if (typeof cb === 'undefined') { - return tostr(crypto.pseudoRandomBytes(length)); - } else { - crypto.pseudoRandomBytes(length, function(err, bytes) { - if (err) return cb(err); - cb(null, tostr(bytes)); - }) - } -} - -/** - * Exports - */ - -module.exports = uid; diff --git a/node_modules/express/node_modules/connect/node_modules/uid2/package.json b/node_modules/express/node_modules/connect/node_modules/uid2/package.json deleted file mode 100644 index 08af7a10..00000000 --- a/node_modules/express/node_modules/connect/node_modules/uid2/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "uid2", - "description": "strong uid", - "tags": [ - "uid" - ], - "version": "0.0.3", - "dependencies": {}, - "readme": "ERROR: No README data found!", - "_id": "uid2@0.0.3", - "dist": { - "shasum": "837bfbe18583ae394e1e2b803f8bc13c47f942ef" - }, - "_from": "uid2@0.0.3", - "_resolved": "https://registry.npmjs.org/uid2/-/uid2-0.0.3.tgz" -} diff --git a/node_modules/express/node_modules/connect/package.json b/node_modules/express/node_modules/connect/package.json deleted file mode 100644 index 1ac08cc4..00000000 --- a/node_modules/express/node_modules/connect/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "connect", - "version": "2.12.0", - "description": "High performance middleware framework", - "keywords": [ - "framework", - "web", - "middleware", - "connect", - "rack" - ], - "repository": { - "type": "git", - "url": "git://github.com/senchalabs/connect.git" - }, - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - }, - "dependencies": { - "batch": "0.5.0", - "qs": "0.6.6", - "cookie-signature": "1.0.1", - "buffer-crc32": "0.2.1", - "cookie": "0.1.0", - "send": "0.1.4", - "bytes": "0.2.1", - "fresh": "0.2.0", - "pause": "0.0.1", - "uid2": "0.0.3", - "debug": ">= 0.7.3 < 1", - "methods": "0.1.0", - "raw-body": "1.1.2", - "negotiator": "0.3.0", - "multiparty": "2.2.0" - }, - "devDependencies": { - "should": ">= 2.0.2 < 3", - "mocha": ">= 1.13.0 < 2", - "jade": ">= 0.35.0 < 1", - "dox": ">= 0.4.4 < 1" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://raw.github.com/senchalabs/connect/master/LICENSE" - } - ], - "main": "index", - "engines": { - "node": ">= 0.8.0" - }, - "scripts": { - "test": "make" - }, - "readme": "# Connect [![build status](https://secure.travis-ci.org/senchalabs/connect.png)](http://travis-ci.org/senchalabs/connect)\n\n Connect is an extensible HTTP server framework for [node](http://nodejs.org), providing high performance \"plugins\" known as _middleware_.\n\n Connect is bundled with over _20_ commonly used middleware, including\n a logger, session support, cookie parser, and [more](http://senchalabs.github.com/connect). Be sure to view the 2.x [documentation](http://senchalabs.github.com/connect/).\n\n```js\nvar connect = require('connect')\n , http = require('http');\n\nvar app = connect()\n .use(connect.favicon())\n .use(connect.logger('dev'))\n .use(connect.static('public'))\n .use(connect.directory('public'))\n .use(connect.cookieParser())\n .use(connect.session({ secret: 'my secret here' }))\n .use(function(req, res){\n res.end('Hello from Connect!\\n');\n });\n\nhttp.createServer(app).listen(3000);\n```\n\n## Middleware\n\n - [basicAuth](http://www.senchalabs.org/connect/basicAuth.html)\n - [bodyParser](http://www.senchalabs.org/connect/bodyParser.html)\n - [compress](http://www.senchalabs.org/connect/compress.html)\n - [cookieParser](http://www.senchalabs.org/connect/cookieParser.html)\n - [cookieSession](http://www.senchalabs.org/connect/cookieSession.html)\n - [csrf](http://www.senchalabs.org/connect/csrf.html)\n - [directory](http://www.senchalabs.org/connect/directory.html)\n - [errorHandler](http://www.senchalabs.org/connect/errorHandler.html)\n - [favicon](http://www.senchalabs.org/connect/favicon.html)\n - [json](http://www.senchalabs.org/connect/json.html)\n - [limit](http://www.senchalabs.org/connect/limit.html)\n - [logger](http://www.senchalabs.org/connect/logger.html)\n - [methodOverride](http://www.senchalabs.org/connect/methodOverride.html)\n - [multipart](http://www.senchalabs.org/connect/multipart.html)\n - [urlencoded](http://www.senchalabs.org/connect/urlencoded.html)\n - [query](http://www.senchalabs.org/connect/query.html)\n - [responseTime](http://www.senchalabs.org/connect/responseTime.html)\n - [session](http://www.senchalabs.org/connect/session.html)\n - [static](http://www.senchalabs.org/connect/static.html)\n - [staticCache](http://www.senchalabs.org/connect/staticCache.html)\n - [subdomains](http://www.senchalabs.org/connect/subdomains.html)\n - [vhost](http://www.senchalabs.org/connect/vhost.html)\n\n## Running Tests\n\nfirst:\n\n $ npm install -d\n\nthen:\n\n $ make test\n\n## Contributors\n\n https://github.com/senchalabs/connect/graphs/contributors\n\n## Node Compatibility\n\n Connect `< 1.x` is compatible with node 0.2.x\n\n\n Connect `1.x` is compatible with node 0.4.x\n\n\n Connect `2.x` is compatible with node 0.6.x\n\n\n Connect (_master_) is compatible with node 0.8.x\n\n## CLA\n\n [http://sencha.com/cla](http://sencha.com/cla)\n\n## License\n\nView the [LICENSE](https://github.com/senchalabs/connect/blob/master/LICENSE) file. The [Silk](http://www.famfamfam.com/lab/icons/silk/) icons used by the `directory` middleware created by/copyright of [FAMFAMFAM](http://www.famfamfam.com/).\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/senchalabs/connect/issues" - }, - "homepage": "https://github.com/senchalabs/connect", - "_id": "connect@2.12.0", - "dist": { - "shasum": "31d8fa0dcacdf1908d822bd2923be8a2d2a7ed9a" - }, - "_from": "connect@2.12.0", - "_resolved": "https://registry.npmjs.org/connect/-/connect-2.12.0.tgz" -} diff --git a/node_modules/express/node_modules/cookie-signature/.npmignore b/node_modules/express/node_modules/cookie-signature/.npmignore deleted file mode 100644 index f1250e58..00000000 --- a/node_modules/express/node_modules/cookie-signature/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/node_modules/express/node_modules/cookie-signature/History.md b/node_modules/express/node_modules/cookie-signature/History.md deleted file mode 100644 index 9e301799..00000000 --- a/node_modules/express/node_modules/cookie-signature/History.md +++ /dev/null @@ -1,11 +0,0 @@ - -1.0.1 / 2013-04-15 -================== - - * Revert "Changed underlying HMAC algo. to sha512." - * Revert "Fix for timing attacks on MAC verification." - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/express/node_modules/cookie-signature/Makefile b/node_modules/express/node_modules/cookie-signature/Makefile deleted file mode 100644 index 4e9c8d36..00000000 --- a/node_modules/express/node_modules/cookie-signature/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --require should \ - --reporter spec - -.PHONY: test \ No newline at end of file diff --git a/node_modules/express/node_modules/cookie-signature/Readme.md b/node_modules/express/node_modules/cookie-signature/Readme.md deleted file mode 100644 index 2559e841..00000000 --- a/node_modules/express/node_modules/cookie-signature/Readme.md +++ /dev/null @@ -1,42 +0,0 @@ - -# cookie-signature - - Sign and unsign cookies. - -## Example - -```js -var cookie = require('cookie-signature'); - -var val = cookie.sign('hello', 'tobiiscool'); -val.should.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI'); - -var val = cookie.sign('hello', 'tobiiscool'); -cookie.unsign(val, 'tobiiscool').should.equal('hello'); -cookie.unsign(val, 'luna').should.be.false; -``` - -## License - -(The MIT License) - -Copyright (c) 2012 LearnBoost <tj@learnboost.com> - -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. \ No newline at end of file diff --git a/node_modules/express/node_modules/cookie-signature/index.js b/node_modules/express/node_modules/cookie-signature/index.js deleted file mode 100644 index ed62814e..00000000 --- a/node_modules/express/node_modules/cookie-signature/index.js +++ /dev/null @@ -1,42 +0,0 @@ - -/** - * Module dependencies. - */ - -var crypto = require('crypto'); - -/** - * Sign the given `val` with `secret`. - * - * @param {String} val - * @param {String} secret - * @return {String} - * @api private - */ - -exports.sign = function(val, secret){ - if ('string' != typeof val) throw new TypeError('cookie required'); - if ('string' != typeof secret) throw new TypeError('secret required'); - return val + '.' + crypto - .createHmac('sha256', secret) - .update(val) - .digest('base64') - .replace(/\=+$/, ''); -}; - -/** - * Unsign and decode the given `val` with `secret`, - * returning `false` if the signature is invalid. - * - * @param {String} val - * @param {String} secret - * @return {String|Boolean} - * @api private - */ - -exports.unsign = function(val, secret){ - if ('string' != typeof val) throw new TypeError('cookie required'); - if ('string' != typeof secret) throw new TypeError('secret required'); - var str = val.slice(0, val.lastIndexOf('.')); - return exports.sign(str, secret) == val ? str : false; -}; diff --git a/node_modules/express/node_modules/cookie-signature/package.json b/node_modules/express/node_modules/cookie-signature/package.json deleted file mode 100644 index 5203d81a..00000000 --- a/node_modules/express/node_modules/cookie-signature/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "cookie-signature", - "version": "1.0.1", - "description": "Sign and unsign cookies", - "keywords": [ - "cookie", - "sign", - "unsign" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@learnboost.com" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "main": "index", - "readme": "\n# cookie-signature\n\n Sign and unsign cookies.\n\n## Example\n\n```js\nvar cookie = require('cookie-signature');\n\nvar val = cookie.sign('hello', 'tobiiscool');\nval.should.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI');\n\nvar val = cookie.sign('hello', 'tobiiscool');\ncookie.unsign(val, 'tobiiscool').should.equal('hello');\ncookie.unsign(val, 'luna').should.be.false;\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2012 LearnBoost <tj@learnboost.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "_id": "cookie-signature@1.0.1", - "dist": { - "shasum": "44e072148af01e6e8e24afbf12690d68ae698ecb" - }, - "_from": "cookie-signature@1.0.1", - "_resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.1.tgz" -} diff --git a/node_modules/express/node_modules/cookie/.npmignore b/node_modules/express/node_modules/cookie/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/express/node_modules/cookie/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/express/node_modules/cookie/.travis.yml b/node_modules/express/node_modules/cookie/.travis.yml deleted file mode 100644 index 9400c118..00000000 --- a/node_modules/express/node_modules/cookie/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.6" - - "0.8" - - "0.10" diff --git a/node_modules/express/node_modules/cookie/LICENSE b/node_modules/express/node_modules/cookie/LICENSE deleted file mode 100644 index 249d9def..00000000 --- a/node_modules/express/node_modules/cookie/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -// MIT License - -Copyright (C) Roman Shtylman - -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/node_modules/express/node_modules/cookie/README.md b/node_modules/express/node_modules/cookie/README.md deleted file mode 100644 index 5187ed1c..00000000 --- a/node_modules/express/node_modules/cookie/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# cookie [![Build Status](https://secure.travis-ci.org/shtylman/node-cookie.png?branch=master)](http://travis-ci.org/shtylman/node-cookie) # - -cookie is a basic cookie parser and serializer. It doesn't make assumptions about how you are going to deal with your cookies. It basically just provides a way to read and write the HTTP cookie headers. - -See [RFC6265](http://tools.ietf.org/html/rfc6265) for details about the http header for cookies. - -## how? - -``` -npm install cookie -``` - -```javascript -var cookie = require('cookie'); - -var hdr = cookie.serialize('foo', 'bar'); -// hdr = 'foo=bar'; - -var cookies = cookie.parse('foo=bar; cat=meow; dog=ruff'); -// cookies = { foo: 'bar', cat: 'meow', dog: 'ruff' }; -``` - -## more - -The serialize function takes a third parameter, an object, to set cookie options. See the RFC for valid values. - -### path -> cookie path - -### expires -> absolute expiration date for the cookie (Date object) - -### maxAge -> relative max age of the cookie from when the client receives it (seconds) - -### domain -> domain for the cookie - -### secure -> true or false - -### httpOnly -> true or false - diff --git a/node_modules/express/node_modules/cookie/index.js b/node_modules/express/node_modules/cookie/index.js deleted file mode 100644 index 16bdb65d..00000000 --- a/node_modules/express/node_modules/cookie/index.js +++ /dev/null @@ -1,70 +0,0 @@ - -/// Serialize the a name value pair into a cookie string suitable for -/// http headers. An optional options object specified cookie parameters -/// -/// serialize('foo', 'bar', { httpOnly: true }) -/// => "foo=bar; httpOnly" -/// -/// @param {String} name -/// @param {String} val -/// @param {Object} options -/// @return {String} -var serialize = function(name, val, opt){ - opt = opt || {}; - var enc = opt.encode || encode; - var pairs = [name + '=' + enc(val)]; - - if (opt.maxAge) pairs.push('Max-Age=' + opt.maxAge); - if (opt.domain) pairs.push('Domain=' + opt.domain); - if (opt.path) pairs.push('Path=' + opt.path); - if (opt.expires) pairs.push('Expires=' + opt.expires.toUTCString()); - if (opt.httpOnly) pairs.push('HttpOnly'); - if (opt.secure) pairs.push('Secure'); - - return pairs.join('; '); -}; - -/// Parse the given cookie header string into an object -/// The object has the various cookies as keys(names) => values -/// @param {String} str -/// @return {Object} -var parse = function(str, opt) { - opt = opt || {}; - var obj = {} - var pairs = str.split(/[;,] */); - var dec = opt.decode || decode; - - pairs.forEach(function(pair) { - var eq_idx = pair.indexOf('=') - - // skip things that don't look like key=value - if (eq_idx < 0) { - return; - } - - var key = pair.substr(0, eq_idx).trim() - var val = pair.substr(++eq_idx, pair.length).trim(); - - // quoted values - if ('"' == val[0]) { - val = val.slice(1, -1); - } - - // only assign once - if (undefined == obj[key]) { - try { - obj[key] = dec(val); - } catch (e) { - obj[key] = val; - } - } - }); - - return obj; -}; - -var encode = encodeURIComponent; -var decode = decodeURIComponent; - -module.exports.serialize = serialize; -module.exports.parse = parse; diff --git a/node_modules/express/node_modules/cookie/package.json b/node_modules/express/node_modules/cookie/package.json deleted file mode 100644 index 8da1c04e..00000000 --- a/node_modules/express/node_modules/cookie/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "author": { - "name": "Roman Shtylman", - "email": "shtylman@gmail.com" - }, - "name": "cookie", - "description": "cookie parsing and serialization", - "version": "0.1.0", - "repository": { - "type": "git", - "url": "git://github.com/shtylman/node-cookie.git" - }, - "keywords": [ - "cookie", - "cookies" - ], - "main": "index.js", - "scripts": { - "test": "mocha" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "1.x.x" - }, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "readme": "# cookie [![Build Status](https://secure.travis-ci.org/shtylman/node-cookie.png?branch=master)](http://travis-ci.org/shtylman/node-cookie) #\n\ncookie is a basic cookie parser and serializer. It doesn't make assumptions about how you are going to deal with your cookies. It basically just provides a way to read and write the HTTP cookie headers.\n\nSee [RFC6265](http://tools.ietf.org/html/rfc6265) for details about the http header for cookies.\n\n## how?\n\n```\nnpm install cookie\n```\n\n```javascript\nvar cookie = require('cookie');\n\nvar hdr = cookie.serialize('foo', 'bar');\n// hdr = 'foo=bar';\n\nvar cookies = cookie.parse('foo=bar; cat=meow; dog=ruff');\n// cookies = { foo: 'bar', cat: 'meow', dog: 'ruff' };\n```\n\n## more\n\nThe serialize function takes a third parameter, an object, to set cookie options. See the RFC for valid values.\n\n### path\n> cookie path\n\n### expires\n> absolute expiration date for the cookie (Date object)\n\n### maxAge\n> relative max age of the cookie from when the client receives it (seconds)\n\n### domain\n> domain for the cookie\n\n### secure\n> true or false\n\n### httpOnly\n> true or false\n\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/shtylman/node-cookie/issues" - }, - "homepage": "https://github.com/shtylman/node-cookie", - "_id": "cookie@0.1.0", - "dist": { - "shasum": "90eb469ddce905c866de687efc43131d8801f9d0" - }, - "_from": "cookie@0.1.0", - "_resolved": "https://registry.npmjs.org/cookie/-/cookie-0.1.0.tgz" -} diff --git a/node_modules/express/node_modules/cookie/test/mocha.opts b/node_modules/express/node_modules/cookie/test/mocha.opts deleted file mode 100644 index e2bfcc5a..00000000 --- a/node_modules/express/node_modules/cookie/test/mocha.opts +++ /dev/null @@ -1 +0,0 @@ ---ui qunit diff --git a/node_modules/express/node_modules/cookie/test/parse.js b/node_modules/express/node_modules/cookie/test/parse.js deleted file mode 100644 index c6c27a20..00000000 --- a/node_modules/express/node_modules/cookie/test/parse.js +++ /dev/null @@ -1,44 +0,0 @@ - -var assert = require('assert'); - -var cookie = require('..'); - -suite('parse'); - -test('basic', function() { - assert.deepEqual({ foo: 'bar' }, cookie.parse('foo=bar')); - assert.deepEqual({ foo: '123' }, cookie.parse('foo=123')); -}); - -test('ignore spaces', function() { - assert.deepEqual({ FOO: 'bar', baz: 'raz' }, - cookie.parse('FOO = bar; baz = raz')); -}); - -test('escaping', function() { - assert.deepEqual({ foo: 'bar=123456789&name=Magic+Mouse' }, - cookie.parse('foo="bar=123456789&name=Magic+Mouse"')); - - assert.deepEqual({ email: ' ",;/' }, - cookie.parse('email=%20%22%2c%3b%2f')); -}); - -test('ignore escaping error and return original value', function() { - assert.deepEqual({ foo: '%1', bar: 'bar' }, cookie.parse('foo=%1;bar=bar')); -}); - -test('ignore non values', function() { - assert.deepEqual({ foo: '%1', bar: 'bar' }, cookie.parse('foo=%1;bar=bar;HttpOnly;Secure')); -}); - -test('unencoded', function() { - assert.deepEqual({ foo: 'bar=123456789&name=Magic+Mouse' }, - cookie.parse('foo="bar=123456789&name=Magic+Mouse"',{ - decode: function(value) { return value; } - })); - - assert.deepEqual({ email: '%20%22%2c%3b%2f' }, - cookie.parse('email=%20%22%2c%3b%2f',{ - decode: function(value) { return value; } - })); -}) diff --git a/node_modules/express/node_modules/cookie/test/serialize.js b/node_modules/express/node_modules/cookie/test/serialize.js deleted file mode 100644 index 86bb8c93..00000000 --- a/node_modules/express/node_modules/cookie/test/serialize.js +++ /dev/null @@ -1,64 +0,0 @@ -// builtin -var assert = require('assert'); - -var cookie = require('..'); - -suite('serialize'); - -test('basic', function() { - assert.equal('foo=bar', cookie.serialize('foo', 'bar')); - assert.equal('foo=bar%20baz', cookie.serialize('foo', 'bar baz')); -}); - -test('path', function() { - assert.equal('foo=bar; Path=/', cookie.serialize('foo', 'bar', { - path: '/' - })); -}); - -test('secure', function() { - assert.equal('foo=bar; Secure', cookie.serialize('foo', 'bar', { - secure: true - })); - - assert.equal('foo=bar', cookie.serialize('foo', 'bar', { - secure: false - })); -}); - -test('domain', function() { - assert.equal('foo=bar; Domain=example.com', cookie.serialize('foo', 'bar', { - domain: 'example.com' - })); -}); - -test('httpOnly', function() { - assert.equal('foo=bar; HttpOnly', cookie.serialize('foo', 'bar', { - httpOnly: true - })); -}); - -test('maxAge', function() { - assert.equal('foo=bar; Max-Age=1000', cookie.serialize('foo', 'bar', { - maxAge: 1000 - })); -}); - -test('escaping', function() { - assert.deepEqual('cat=%2B%20', cookie.serialize('cat', '+ ')); -}); - -test('parse->serialize', function() { - - assert.deepEqual({ cat: 'foo=123&name=baz five' }, cookie.parse( - cookie.serialize('cat', 'foo=123&name=baz five'))); - - assert.deepEqual({ cat: ' ";/' }, cookie.parse( - cookie.serialize('cat', ' ";/'))); -}); - -test('unencoded', function() { - assert.deepEqual('cat=+ ', cookie.serialize('cat', '+ ', { - encode: function(value) { return value; } - })); -}) diff --git a/node_modules/express/node_modules/debug/Readme.md b/node_modules/express/node_modules/debug/Readme.md deleted file mode 100644 index c5a34e8b..00000000 --- a/node_modules/express/node_modules/debug/Readme.md +++ /dev/null @@ -1,115 +0,0 @@ -# debug - - tiny node.js debugging utility modelled after node core's debugging technique. - -## Installation - -``` -$ npm install debug -``` - -## Usage - - With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` format string goodies you're used to work fine. A unique color is selected per-function for visibility. - -Example _app.js_: - -```js -var debug = require('debug')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %s', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); -``` - -Example _worker.js_: - -```js -var debug = require('debug')('worker'); - -setInterval(function(){ - debug('doing some work'); -}, 1000); -``` - - The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples: - - ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png) - - ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png) - -## Millisecond diff - - When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png) - - When stderr is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below: - _(NOTE: Debug now uses stderr instead of stdout, so the correct shell command for this example is actually `DEBUG=* node example/worker 2> out &`)_ - - ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png) - -## Conventions - - If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". - -## Wildcards - - The "*" character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect.compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - - You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=* -connect:*` would include all debuggers except those starting with "connect:". - -## Browser support - - Debug works in the browser as well, currently persisted by `localStorage`. For example if you have `worker:a` and `worker:b` as shown below, and wish to debug both type `debug.enable('worker:*')` in the console and refresh the page, this will remain until you disable with `debug.disable()`. - -```js -a = debug('worker:a'); -b = debug('worker:b'); - -setInterval(function(){ - a('doing some work'); -}, 1000); - -setInterval(function(){ - a('doing some work'); -}, 1200); -``` - -## License - -(The MIT License) - -Copyright (c) 2011 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/node_modules/express/node_modules/debug/debug.js b/node_modules/express/node_modules/debug/debug.js deleted file mode 100644 index 509dc0de..00000000 --- a/node_modules/express/node_modules/debug/debug.js +++ /dev/null @@ -1,137 +0,0 @@ - -/** - * Expose `debug()` as the module. - */ - -module.exports = debug; - -/** - * Create a debugger with the given `name`. - * - * @param {String} name - * @return {Type} - * @api public - */ - -function debug(name) { - if (!debug.enabled(name)) return function(){}; - - return function(fmt){ - fmt = coerce(fmt); - - var curr = new Date; - var ms = curr - (debug[name] || curr); - debug[name] = curr; - - fmt = name - + ' ' - + fmt - + ' +' + debug.humanize(ms); - - // This hackery is required for IE8 - // where `console.log` doesn't have 'apply' - window.console - && console.log - && Function.prototype.apply.call(console.log, console, arguments); - } -} - -/** - * The currently active debug mode names. - */ - -debug.names = []; -debug.skips = []; - -/** - * Enables a debug mode by name. This can include modes - * separated by a colon and wildcards. - * - * @param {String} name - * @api public - */ - -debug.enable = function(name) { - try { - localStorage.debug = name; - } catch(e){} - - var split = (name || '').split(/[\s,]+/) - , len = split.length; - - for (var i = 0; i < len; i++) { - name = split[i].replace('*', '.*?'); - if (name[0] === '-') { - debug.skips.push(new RegExp('^' + name.substr(1) + '$')); - } - else { - debug.names.push(new RegExp('^' + name + '$')); - } - } -}; - -/** - * Disable debug output. - * - * @api public - */ - -debug.disable = function(){ - debug.enable(''); -}; - -/** - * Humanize the given `ms`. - * - * @param {Number} m - * @return {String} - * @api private - */ - -debug.humanize = function(ms) { - var sec = 1000 - , min = 60 * 1000 - , hour = 60 * min; - - if (ms >= hour) return (ms / hour).toFixed(1) + 'h'; - if (ms >= min) return (ms / min).toFixed(1) + 'm'; - if (ms >= sec) return (ms / sec | 0) + 's'; - return ms + 'ms'; -}; - -/** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - -debug.enabled = function(name) { - for (var i = 0, len = debug.skips.length; i < len; i++) { - if (debug.skips[i].test(name)) { - return false; - } - } - for (var i = 0, len = debug.names.length; i < len; i++) { - if (debug.names[i].test(name)) { - return true; - } - } - return false; -}; - -/** - * Coerce `val`. - */ - -function coerce(val) { - if (val instanceof Error) return val.stack || val.message; - return val; -} - -// persist - -try { - if (window.localStorage) debug.enable(localStorage.debug); -} catch(e){} diff --git a/node_modules/express/node_modules/debug/index.js b/node_modules/express/node_modules/debug/index.js deleted file mode 100644 index e02c13b7..00000000 --- a/node_modules/express/node_modules/debug/index.js +++ /dev/null @@ -1,5 +0,0 @@ -if ('undefined' == typeof window) { - module.exports = require('./lib/debug'); -} else { - module.exports = require('./debug'); -} diff --git a/node_modules/express/node_modules/debug/lib/debug.js b/node_modules/express/node_modules/debug/lib/debug.js deleted file mode 100644 index 3b0a9183..00000000 --- a/node_modules/express/node_modules/debug/lib/debug.js +++ /dev/null @@ -1,147 +0,0 @@ -/** - * Module dependencies. - */ - -var tty = require('tty'); - -/** - * Expose `debug()` as the module. - */ - -module.exports = debug; - -/** - * Enabled debuggers. - */ - -var names = [] - , skips = []; - -(process.env.DEBUG || '') - .split(/[\s,]+/) - .forEach(function(name){ - name = name.replace('*', '.*?'); - if (name[0] === '-') { - skips.push(new RegExp('^' + name.substr(1) + '$')); - } else { - names.push(new RegExp('^' + name + '$')); - } - }); - -/** - * Colors. - */ - -var colors = [6, 2, 3, 4, 5, 1]; - -/** - * Previous debug() call. - */ - -var prev = {}; - -/** - * Previously assigned color. - */ - -var prevColor = 0; - -/** - * Is stdout a TTY? Colored output is disabled when `true`. - */ - -var isatty = tty.isatty(2); - -/** - * Select a color. - * - * @return {Number} - * @api private - */ - -function color() { - return colors[prevColor++ % colors.length]; -} - -/** - * Humanize the given `ms`. - * - * @param {Number} m - * @return {String} - * @api private - */ - -function humanize(ms) { - var sec = 1000 - , min = 60 * 1000 - , hour = 60 * min; - - if (ms >= hour) return (ms / hour).toFixed(1) + 'h'; - if (ms >= min) return (ms / min).toFixed(1) + 'm'; - if (ms >= sec) return (ms / sec | 0) + 's'; - return ms + 'ms'; -} - -/** - * Create a debugger with the given `name`. - * - * @param {String} name - * @return {Type} - * @api public - */ - -function debug(name) { - function disabled(){} - disabled.enabled = false; - - var match = skips.some(function(re){ - return re.test(name); - }); - - if (match) return disabled; - - match = names.some(function(re){ - return re.test(name); - }); - - if (!match) return disabled; - var c = color(); - - function colored(fmt) { - fmt = coerce(fmt); - - var curr = new Date; - var ms = curr - (prev[name] || curr); - prev[name] = curr; - - fmt = ' \u001b[9' + c + 'm' + name + ' ' - + '\u001b[3' + c + 'm\u001b[90m' - + fmt + '\u001b[3' + c + 'm' - + ' +' + humanize(ms) + '\u001b[0m'; - - console.error.apply(this, arguments); - } - - function plain(fmt) { - fmt = coerce(fmt); - - fmt = new Date().toUTCString() - + ' ' + name + ' ' + fmt; - console.error.apply(this, arguments); - } - - colored.enabled = plain.enabled = true; - - return isatty || process.env.DEBUG_COLORS - ? colored - : plain; -} - -/** - * Coerce `val`. - */ - -function coerce(val) { - if (val instanceof Error) return val.stack || val.message; - return val; -} diff --git a/node_modules/express/node_modules/debug/package.json b/node_modules/express/node_modules/debug/package.json deleted file mode 100644 index 24abce64..00000000 --- a/node_modules/express/node_modules/debug/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "debug", - "version": "0.7.4", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/debug.git" - }, - "description": "small debugging utility", - "keywords": [ - "debug", - "log", - "debugger" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "*" - }, - "main": "lib/debug.js", - "browser": "./debug.js", - "engines": { - "node": "*" - }, - "files": [ - "lib/debug.js", - "debug.js", - "index.js" - ], - "component": { - "scripts": { - "debug/index.js": "index.js", - "debug/debug.js": "debug.js" - } - }, - "readme": "# debug\n\n tiny node.js debugging utility modelled after node core's debugging technique.\n\n## Installation\n\n```\n$ npm install debug\n```\n\n## Usage\n\n With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` format string goodies you're used to work fine. A unique color is selected per-function for visibility.\n \nExample _app.js_:\n\n```js\nvar debug = require('debug')('http')\n , http = require('http')\n , name = 'My App';\n\n// fake app\n\ndebug('booting %s', name);\n\nhttp.createServer(function(req, res){\n debug(req.method + ' ' + req.url);\n res.end('hello\\n');\n}).listen(3000, function(){\n debug('listening');\n});\n\n// fake worker of some kind\n\nrequire('./worker');\n```\n\nExample _worker.js_:\n\n```js\nvar debug = require('debug')('worker');\n\nsetInterval(function(){\n debug('doing some work');\n}, 1000);\n```\n\n The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:\n\n ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png)\n\n ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png)\n\n## Millisecond diff\n\n When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the \"+NNNms\" will show you how much time was spent between calls.\n\n ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png)\n\n When stderr is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:\n _(NOTE: Debug now uses stderr instead of stdout, so the correct shell command for this example is actually `DEBUG=* node example/worker 2> out &`)_\n \n ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png)\n \n## Conventions\n\n If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use \":\" to separate features. For example \"bodyParser\" from Connect would then be \"connect:bodyParser\". \n\n## Wildcards\n\n The \"*\" character may be used as a wildcard. Suppose for example your library has debuggers named \"connect:bodyParser\", \"connect:compress\", \"connect:session\", instead of listing all three with `DEBUG=connect:bodyParser,connect.compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.\n\n You can also exclude specific debuggers by prefixing them with a \"-\" character. For example, `DEBUG=* -connect:*` would include all debuggers except those starting with \"connect:\".\n\n## Browser support\n\n Debug works in the browser as well, currently persisted by `localStorage`. For example if you have `worker:a` and `worker:b` as shown below, and wish to debug both type `debug.enable('worker:*')` in the console and refresh the page, this will remain until you disable with `debug.disable()`. \n\n```js\na = debug('worker:a');\nb = debug('worker:b');\n\nsetInterval(function(){\n a('doing some work');\n}, 1000);\n\nsetInterval(function(){\n a('doing some work');\n}, 1200);\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/debug/issues" - }, - "homepage": "https://github.com/visionmedia/debug", - "_id": "debug@0.7.4", - "_from": "debug@>= 0.7.3 < 1" -} diff --git a/node_modules/express/node_modules/fresh/.npmignore b/node_modules/express/node_modules/fresh/.npmignore deleted file mode 100644 index 9daeafb9..00000000 --- a/node_modules/express/node_modules/fresh/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test diff --git a/node_modules/express/node_modules/fresh/History.md b/node_modules/express/node_modules/fresh/History.md deleted file mode 100644 index 60a2903f..00000000 --- a/node_modules/express/node_modules/fresh/History.md +++ /dev/null @@ -1,5 +0,0 @@ - -0.2.0 / 2013-08-11 -================== - - * fix: return false for no-cache diff --git a/node_modules/express/node_modules/fresh/Makefile b/node_modules/express/node_modules/fresh/Makefile deleted file mode 100644 index 8e8640f2..00000000 --- a/node_modules/express/node_modules/fresh/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --reporter spec \ - --require should - -.PHONY: test \ No newline at end of file diff --git a/node_modules/express/node_modules/fresh/Readme.md b/node_modules/express/node_modules/fresh/Readme.md deleted file mode 100644 index 61366c57..00000000 --- a/node_modules/express/node_modules/fresh/Readme.md +++ /dev/null @@ -1,57 +0,0 @@ - -# node-fresh - - HTTP response freshness testing - -## fresh(req, res) - - Check freshness of `req` and `res` headers. - - When the cache is "fresh" __true__ is returned, - otherwise __false__ is returned to indicate that - the cache is now stale. - -## Example: - -```js -var req = { 'if-none-match': 'tobi' }; -var res = { 'etag': 'luna' }; -fresh(req, res); -// => false - -var req = { 'if-none-match': 'tobi' }; -var res = { 'etag': 'tobi' }; -fresh(req, res); -// => true -``` - -## Installation - -``` -$ npm install fresh -``` - -## License - -(The MIT License) - -Copyright (c) 2012 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. \ No newline at end of file diff --git a/node_modules/express/node_modules/fresh/index.js b/node_modules/express/node_modules/fresh/index.js deleted file mode 100644 index 9c3f47d1..00000000 --- a/node_modules/express/node_modules/fresh/index.js +++ /dev/null @@ -1,53 +0,0 @@ - -/** - * Expose `fresh()`. - */ - -module.exports = fresh; - -/** - * Check freshness of `req` and `res` headers. - * - * When the cache is "fresh" __true__ is returned, - * otherwise __false__ is returned to indicate that - * the cache is now stale. - * - * @param {Object} req - * @param {Object} res - * @return {Boolean} - * @api public - */ - -function fresh(req, res) { - // defaults - var etagMatches = true; - var notModified = true; - - // fields - var modifiedSince = req['if-modified-since']; - var noneMatch = req['if-none-match']; - var lastModified = res['last-modified']; - var etag = res['etag']; - var cc = req['cache-control']; - - // unconditional request - if (!modifiedSince && !noneMatch) return false; - - // check for no-cache cache request directive - if (cc && cc.indexOf('no-cache') !== -1) return false; - - // parse if-none-match - if (noneMatch) noneMatch = noneMatch.split(/ *, */); - - // if-none-match - if (noneMatch) etagMatches = ~noneMatch.indexOf(etag) || '*' == noneMatch[0]; - - // if-modified-since - if (modifiedSince) { - modifiedSince = new Date(modifiedSince); - lastModified = new Date(lastModified); - notModified = lastModified <= modifiedSince; - } - - return !! (etagMatches && notModified); -} \ No newline at end of file diff --git a/node_modules/express/node_modules/fresh/package.json b/node_modules/express/node_modules/fresh/package.json deleted file mode 100644 index 8300673a..00000000 --- a/node_modules/express/node_modules/fresh/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "fresh", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - }, - "description": "HTTP response freshness testing", - "version": "0.2.0", - "main": "index.js", - "repository": { - "type": "git", - "url": "https://github.com/visionmedia/node-fresh.git" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "readme": "\n# node-fresh\n\n HTTP response freshness testing\n\n## fresh(req, res)\n\n Check freshness of `req` and `res` headers.\n\n When the cache is \"fresh\" __true__ is returned,\n otherwise __false__ is returned to indicate that\n the cache is now stale.\n\n## Example:\n\n```js\nvar req = { 'if-none-match': 'tobi' };\nvar res = { 'etag': 'luna' };\nfresh(req, res);\n// => false\n\nvar req = { 'if-none-match': 'tobi' };\nvar res = { 'etag': 'tobi' };\nfresh(req, res);\n// => true\n```\n\n## Installation\n\n```\n$ npm install fresh\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/node-fresh/issues" - }, - "homepage": "https://github.com/visionmedia/node-fresh", - "_id": "fresh@0.2.0", - "dist": { - "shasum": "bfd9402cf3df12c4a4c310c79f99a3dde13d34a7" - }, - "_from": "fresh@0.2.0", - "_resolved": "https://registry.npmjs.org/fresh/-/fresh-0.2.0.tgz" -} diff --git a/node_modules/express/node_modules/merge-descriptors/.npmignore b/node_modules/express/node_modules/merge-descriptors/.npmignore deleted file mode 100644 index f62e6050..00000000 --- a/node_modules/express/node_modules/merge-descriptors/.npmignore +++ /dev/null @@ -1,59 +0,0 @@ -# Compiled source # -################### -*.com -*.class -*.dll -*.exe -*.o -*.so - -# Packages # -############ -# it's better to unpack these files and commit the raw source -# git has its own built in compression methods -*.7z -*.dmg -*.gz -*.iso -*.jar -*.rar -*.tar -*.zip - -# Logs and databases # -###################### -*.log -*.sql -*.sqlite - -# OS generated files # -###################### -.DS_Store* -ehthumbs.db -Icon? -Thumbs.db - -# Node.js # -########### -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -node_modules -npm-debug.log - -# Components # -############## - -/build -/components -/vendors \ No newline at end of file diff --git a/node_modules/express/node_modules/merge-descriptors/README.md b/node_modules/express/node_modules/merge-descriptors/README.md deleted file mode 100644 index 34d715df..00000000 --- a/node_modules/express/node_modules/merge-descriptors/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# Merge Descriptors [![Build Status](https://travis-ci.org/jonathanong/merge-descriptors.png)](https://travis-ci.org/jonathanong/merge-descriptors) - -Merge objects using descriptors. - -```js -var thing = { - get name() { - return 'jon' - } -} - -var animal = { - -} - -merge(animal, thing) - -animal.name === 'jon' -``` - -## API - -### merge(destination, source) - -Overwrites `destination`'s descriptors with `source`'s. - -## License - -The MIT License (MIT) - -Copyright (c) 2013 Jonathan Ong me@jongleberry.com - -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. \ No newline at end of file diff --git a/node_modules/express/node_modules/merge-descriptors/component.json b/node_modules/express/node_modules/merge-descriptors/component.json deleted file mode 100644 index 26b1b8e8..00000000 --- a/node_modules/express/node_modules/merge-descriptors/component.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "merge-descriptors", - "description": "Merge objects using descriptors", - "version": "0.0.1", - "scripts": [ - "index.js" - ], - "repo": "jonathanong/merge-descriptors", - "license": "MIT" -} \ No newline at end of file diff --git a/node_modules/express/node_modules/merge-descriptors/index.js b/node_modules/express/node_modules/merge-descriptors/index.js deleted file mode 100644 index e4e23793..00000000 --- a/node_modules/express/node_modules/merge-descriptors/index.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = function (dest, src) { - Object.getOwnPropertyNames(src).forEach(function (name) { - var descriptor = Object.getOwnPropertyDescriptor(src, name) - Object.defineProperty(dest, name, descriptor) - }) - - return dest -} \ No newline at end of file diff --git a/node_modules/express/node_modules/merge-descriptors/package.json b/node_modules/express/node_modules/merge-descriptors/package.json deleted file mode 100644 index 059520b1..00000000 --- a/node_modules/express/node_modules/merge-descriptors/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "merge-descriptors", - "description": "Merge objects using descriptors", - "version": "0.0.1", - "author": { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/jonathanong/merge-descriptors.git" - }, - "bugs": { - "url": "https://github.com/jonathanong/merge-descriptors/issues" - }, - "scripts": { - "test": "make test;" - }, - "readme": "# Merge Descriptors [![Build Status](https://travis-ci.org/jonathanong/merge-descriptors.png)](https://travis-ci.org/jonathanong/merge-descriptors)\n\nMerge objects using descriptors.\n\n```js\nvar thing = {\n get name() {\n return 'jon'\n }\n}\n\nvar animal = {\n\n}\n\nmerge(animal, thing)\n\nanimal.name === 'jon'\n```\n\n## API\n\n### merge(destination, source)\n\nOverwrites `destination`'s descriptors with `source`'s.\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2013 Jonathan Ong me@jongleberry.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.", - "readmeFilename": "README.md", - "homepage": "https://github.com/jonathanong/merge-descriptors", - "_id": "merge-descriptors@0.0.1", - "dist": { - "shasum": "2ff0980c924cf81d0b5d1fb601177cb8bb56c0d0" - }, - "_from": "merge-descriptors@0.0.1", - "_resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-0.0.1.tgz" -} diff --git a/node_modules/express/node_modules/methods/History.md b/node_modules/express/node_modules/methods/History.md deleted file mode 100644 index 1d0e229f..00000000 --- a/node_modules/express/node_modules/methods/History.md +++ /dev/null @@ -1,5 +0,0 @@ - -0.1.0 / 2013-10-28 -================== - - * add http.METHODS support diff --git a/node_modules/express/node_modules/methods/Readme.md b/node_modules/express/node_modules/methods/Readme.md deleted file mode 100644 index ac0658e2..00000000 --- a/node_modules/express/node_modules/methods/Readme.md +++ /dev/null @@ -1,4 +0,0 @@ - -# Methods - - HTTP verbs that node core's parser supports. diff --git a/node_modules/express/node_modules/methods/index.js b/node_modules/express/node_modules/methods/index.js deleted file mode 100644 index 95b93f5f..00000000 --- a/node_modules/express/node_modules/methods/index.js +++ /dev/null @@ -1,37 +0,0 @@ - -var http = require('http'); - -if (http.METHODS) { - module.exports = http.METHODS.map(function(method){ - return method.toLowerCase(); - }); - - return; -} - -module.exports = [ - 'get', - 'post', - 'put', - 'head', - 'delete', - 'options', - 'trace', - 'copy', - 'lock', - 'mkcol', - 'move', - 'propfind', - 'proppatch', - 'unlock', - 'report', - 'mkactivity', - 'checkout', - 'merge', - 'm-search', - 'notify', - 'subscribe', - 'unsubscribe', - 'patch', - 'search' -]; diff --git a/node_modules/express/node_modules/methods/package.json b/node_modules/express/node_modules/methods/package.json deleted file mode 100644 index e328b9dd..00000000 --- a/node_modules/express/node_modules/methods/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "methods", - "version": "0.1.0", - "description": "HTTP methods that node supports", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [ - "http", - "methods" - ], - "author": { - "name": "TJ Holowaychuk" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/node-methods.git" - }, - "readme": "\n# Methods\n\n HTTP verbs that node core's parser supports.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/node-methods/issues" - }, - "homepage": "https://github.com/visionmedia/node-methods", - "_id": "methods@0.1.0", - "dist": { - "shasum": "335d429eefd21b7bacf2e9c922a8d2bd14a30e4f" - }, - "_from": "methods@0.1.0", - "_resolved": "https://registry.npmjs.org/methods/-/methods-0.1.0.tgz" -} diff --git a/node_modules/express/node_modules/mkdirp/.npmignore b/node_modules/express/node_modules/mkdirp/.npmignore deleted file mode 100644 index 9303c347..00000000 --- a/node_modules/express/node_modules/mkdirp/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log \ No newline at end of file diff --git a/node_modules/express/node_modules/mkdirp/.travis.yml b/node_modules/express/node_modules/mkdirp/.travis.yml deleted file mode 100644 index 84fd7ca2..00000000 --- a/node_modules/express/node_modules/mkdirp/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - 0.9 diff --git a/node_modules/express/node_modules/mkdirp/LICENSE b/node_modules/express/node_modules/mkdirp/LICENSE deleted file mode 100644 index 432d1aeb..00000000 --- a/node_modules/express/node_modules/mkdirp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 2010 James Halliday (mail@substack.net) - -This project is free software released under the MIT/X11 license: - -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/node_modules/express/node_modules/mkdirp/examples/pow.js b/node_modules/express/node_modules/mkdirp/examples/pow.js deleted file mode 100644 index e6924212..00000000 --- a/node_modules/express/node_modules/mkdirp/examples/pow.js +++ /dev/null @@ -1,6 +0,0 @@ -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); diff --git a/node_modules/express/node_modules/mkdirp/index.js b/node_modules/express/node_modules/mkdirp/index.js deleted file mode 100644 index fda6de8a..00000000 --- a/node_modules/express/node_modules/mkdirp/index.js +++ /dev/null @@ -1,82 +0,0 @@ -var path = require('path'); -var fs = require('fs'); - -module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; - -function mkdirP (p, mode, f, made) { - if (typeof mode === 'function' || mode === undefined) { - f = mode; - mode = 0777 & (~process.umask()); - } - if (!made) made = null; - - var cb = f || function () {}; - if (typeof mode === 'string') mode = parseInt(mode, 8); - p = path.resolve(p); - - fs.mkdir(p, mode, function (er) { - if (!er) { - made = made || p; - return cb(null, made); - } - switch (er.code) { - case 'ENOENT': - mkdirP(path.dirname(p), mode, function (er, made) { - if (er) cb(er, made); - else mkdirP(p, mode, cb, made); - }); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - fs.stat(p, function (er2, stat) { - // if the stat fails, then that's super weird. - // let the original error be the failure reason. - if (er2 || !stat.isDirectory()) cb(er, made) - else cb(null, made); - }); - break; - } - }); -} - -mkdirP.sync = function sync (p, mode, made) { - if (mode === undefined) { - mode = 0777 & (~process.umask()); - } - if (!made) made = null; - - if (typeof mode === 'string') mode = parseInt(mode, 8); - p = path.resolve(p); - - try { - fs.mkdirSync(p, mode); - made = made || p; - } - catch (err0) { - switch (err0.code) { - case 'ENOENT' : - made = sync(path.dirname(p), mode, made); - sync(p, mode, made); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - var stat; - try { - stat = fs.statSync(p); - } - catch (err1) { - throw err0; - } - if (!stat.isDirectory()) throw err0; - break; - } - } - - return made; -}; diff --git a/node_modules/express/node_modules/mkdirp/package.json b/node_modules/express/node_modules/mkdirp/package.json deleted file mode 100644 index 221a22e3..00000000 --- a/node_modules/express/node_modules/mkdirp/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "mkdirp", - "description": "Recursively mkdir, like `mkdir -p`", - "version": "0.3.5", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "main": "./index", - "keywords": [ - "mkdir", - "directory" - ], - "repository": { - "type": "git", - "url": "http://github.com/substack/node-mkdirp.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "devDependencies": { - "tap": "~0.4.0" - }, - "license": "MIT", - "readme": "# mkdirp\n\nLike `mkdir -p`, but in node.js!\n\n[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)\n\n# example\n\n## pow.js\n\n```js\nvar mkdirp = require('mkdirp');\n \nmkdirp('/tmp/foo/bar/baz', function (err) {\n if (err) console.error(err)\n else console.log('pow!')\n});\n```\n\nOutput\n\n```\npow!\n```\n\nAnd now /tmp/foo/bar/baz exists, huzzah!\n\n# methods\n\n```js\nvar mkdirp = require('mkdirp');\n```\n\n## mkdirp(dir, mode, cb)\n\nCreate a new directory and any necessary subdirectories at `dir` with octal\npermission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\n`cb(err, made)` fires with the error or the first directory `made`\nthat had to be created, if any.\n\n## mkdirp.sync(dir, mode)\n\nSynchronously create a new directory and any necessary subdirectories at `dir`\nwith octal permission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\nReturns the first directory that had to be created, if any.\n\n# install\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install mkdirp\n```\n\n# license\n\nMIT\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/substack/node-mkdirp/issues" - }, - "homepage": "https://github.com/substack/node-mkdirp", - "_id": "mkdirp@0.3.5", - "_from": "mkdirp@~0.3.5" -} diff --git a/node_modules/express/node_modules/mkdirp/readme.markdown b/node_modules/express/node_modules/mkdirp/readme.markdown deleted file mode 100644 index 83b0216a..00000000 --- a/node_modules/express/node_modules/mkdirp/readme.markdown +++ /dev/null @@ -1,63 +0,0 @@ -# mkdirp - -Like `mkdir -p`, but in node.js! - -[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp) - -# example - -## pow.js - -```js -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); -``` - -Output - -``` -pow! -``` - -And now /tmp/foo/bar/baz exists, huzzah! - -# methods - -```js -var mkdirp = require('mkdirp'); -``` - -## mkdirp(dir, mode, cb) - -Create a new directory and any necessary subdirectories at `dir` with octal -permission string `mode`. - -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -`cb(err, made)` fires with the error or the first directory `made` -that had to be created, if any. - -## mkdirp.sync(dir, mode) - -Synchronously create a new directory and any necessary subdirectories at `dir` -with octal permission string `mode`. - -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -Returns the first directory that had to be created, if any. - -# install - -With [npm](http://npmjs.org) do: - -``` -npm install mkdirp -``` - -# license - -MIT diff --git a/node_modules/express/node_modules/mkdirp/test/chmod.js b/node_modules/express/node_modules/mkdirp/test/chmod.js deleted file mode 100644 index 520dcb8e..00000000 --- a/node_modules/express/node_modules/mkdirp/test/chmod.js +++ /dev/null @@ -1,38 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -test('chmod-pre', function (t) { - var mode = 0744 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.equal(stat && stat.mode & 0777, mode, 'should be 0744'); - t.end(); - }); - }); -}); - -test('chmod', function (t) { - var mode = 0755 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.end(); - }); - }); -}); diff --git a/node_modules/express/node_modules/mkdirp/test/clobber.js b/node_modules/express/node_modules/mkdirp/test/clobber.js deleted file mode 100644 index 0eb70998..00000000 --- a/node_modules/express/node_modules/mkdirp/test/clobber.js +++ /dev/null @@ -1,37 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -// a file in the way -var itw = ps.slice(0, 3).join('/'); - - -test('clobber-pre', function (t) { - console.error("about to write to "+itw) - fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); - - fs.stat(itw, function (er, stat) { - t.ifError(er) - t.ok(stat && stat.isFile(), 'should be file') - t.end() - }) -}) - -test('clobber', function (t) { - t.plan(2); - mkdirp(file, 0755, function (err) { - t.ok(err); - t.equal(err.code, 'ENOTDIR'); - t.end(); - }); -}); diff --git a/node_modules/express/node_modules/mkdirp/test/mkdirp.js b/node_modules/express/node_modules/mkdirp/test/mkdirp.js deleted file mode 100644 index b07cd70c..00000000 --- a/node_modules/express/node_modules/mkdirp/test/mkdirp.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('woo', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/express/node_modules/mkdirp/test/perm.js b/node_modules/express/node_modules/mkdirp/test/perm.js deleted file mode 100644 index 23a7abbd..00000000 --- a/node_modules/express/node_modules/mkdirp/test/perm.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('async perm', function (t) { - t.plan(2); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); - -test('async root perm', function (t) { - mkdirp('/tmp', 0755, function (err) { - if (err) t.fail(err); - t.end(); - }); - t.end(); -}); diff --git a/node_modules/express/node_modules/mkdirp/test/perm_sync.js b/node_modules/express/node_modules/mkdirp/test/perm_sync.js deleted file mode 100644 index f685f609..00000000 --- a/node_modules/express/node_modules/mkdirp/test/perm_sync.js +++ /dev/null @@ -1,39 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('sync perm', function (t) { - t.plan(2); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json'; - - mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }); -}); - -test('sync root perm', function (t) { - t.plan(1); - - var file = '/tmp'; - mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }); -}); diff --git a/node_modules/express/node_modules/mkdirp/test/race.js b/node_modules/express/node_modules/mkdirp/test/race.js deleted file mode 100644 index 96a04476..00000000 --- a/node_modules/express/node_modules/mkdirp/test/race.js +++ /dev/null @@ -1,41 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('race', function (t) { - t.plan(4); - var ps = [ '', 'tmp' ]; - - for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); - } - var file = ps.join('/'); - - var res = 2; - mk(file, function () { - if (--res === 0) t.end(); - }); - - mk(file, function () { - if (--res === 0) t.end(); - }); - - function mk (file, cb) { - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - if (cb) cb(); - } - }) - }) - }); - } -}); diff --git a/node_modules/express/node_modules/mkdirp/test/rel.js b/node_modules/express/node_modules/mkdirp/test/rel.js deleted file mode 100644 index 79858243..00000000 --- a/node_modules/express/node_modules/mkdirp/test/rel.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('rel', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var cwd = process.cwd(); - process.chdir('/tmp'); - - var file = [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - process.chdir(cwd); - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/express/node_modules/mkdirp/test/return.js b/node_modules/express/node_modules/mkdirp/test/return.js deleted file mode 100644 index bce68e56..00000000 --- a/node_modules/express/node_modules/mkdirp/test/return.js +++ /dev/null @@ -1,25 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('return value', function (t) { - t.plan(4); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - // should return the first dir created. - // By this point, it would be profoundly surprising if /tmp didn't - // already exist, since every other test makes things in there. - mkdirp(file, function (err, made) { - t.ifError(err); - t.equal(made, '/tmp/' + x); - mkdirp(file, function (err, made) { - t.ifError(err); - t.equal(made, null); - }); - }); -}); diff --git a/node_modules/express/node_modules/mkdirp/test/return_sync.js b/node_modules/express/node_modules/mkdirp/test/return_sync.js deleted file mode 100644 index 7c222d35..00000000 --- a/node_modules/express/node_modules/mkdirp/test/return_sync.js +++ /dev/null @@ -1,24 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('return value', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - // should return the first dir created. - // By this point, it would be profoundly surprising if /tmp didn't - // already exist, since every other test makes things in there. - // Note that this will throw on failure, which will fail the test. - var made = mkdirp.sync(file); - t.equal(made, '/tmp/' + x); - - // making the same file again should have no effect. - made = mkdirp.sync(file); - t.equal(made, null); -}); diff --git a/node_modules/express/node_modules/mkdirp/test/root.js b/node_modules/express/node_modules/mkdirp/test/root.js deleted file mode 100644 index 97ad7a2f..00000000 --- a/node_modules/express/node_modules/mkdirp/test/root.js +++ /dev/null @@ -1,18 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('root', function (t) { - // '/' on unix, 'c:/' on windows. - var file = path.resolve('/'); - - mkdirp(file, 0755, function (err) { - if (err) throw err - fs.stat(file, function (er, stat) { - if (er) throw er - t.ok(stat.isDirectory(), 'target is a directory'); - t.end(); - }) - }); -}); diff --git a/node_modules/express/node_modules/mkdirp/test/sync.js b/node_modules/express/node_modules/mkdirp/test/sync.js deleted file mode 100644 index 7530cada..00000000 --- a/node_modules/express/node_modules/mkdirp/test/sync.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('sync', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - try { - mkdirp.sync(file, 0755); - } catch (err) { - t.fail(err); - return t.end(); - } - - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }); - }); -}); diff --git a/node_modules/express/node_modules/mkdirp/test/umask.js b/node_modules/express/node_modules/mkdirp/test/umask.js deleted file mode 100644 index 64ccafe2..00000000 --- a/node_modules/express/node_modules/mkdirp/test/umask.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('implicit mode from umask', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0777 & (~process.umask())); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/express/node_modules/mkdirp/test/umask_sync.js b/node_modules/express/node_modules/mkdirp/test/umask_sync.js deleted file mode 100644 index 35bd5cbb..00000000 --- a/node_modules/express/node_modules/mkdirp/test/umask_sync.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('umask sync modes', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - try { - mkdirp.sync(file); - } catch (err) { - t.fail(err); - return t.end(); - } - - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, (0777 & (~process.umask()))); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }); - }); -}); diff --git a/node_modules/express/node_modules/range-parser/.npmignore b/node_modules/express/node_modules/range-parser/.npmignore deleted file mode 100644 index 9daeafb9..00000000 --- a/node_modules/express/node_modules/range-parser/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test diff --git a/node_modules/express/node_modules/range-parser/History.md b/node_modules/express/node_modules/range-parser/History.md deleted file mode 100644 index 82df7b1e..00000000 --- a/node_modules/express/node_modules/range-parser/History.md +++ /dev/null @@ -1,15 +0,0 @@ - -0.0.4 / 2012-06-17 -================== - - * changed: ret -1 for unsatisfiable and -2 when invalid - -0.0.3 / 2012-06-17 -================== - - * fix last-byte-pos default to len - 1 - -0.0.2 / 2012-06-14 -================== - - * add `.type` diff --git a/node_modules/express/node_modules/range-parser/Makefile b/node_modules/express/node_modules/range-parser/Makefile deleted file mode 100644 index 8e8640f2..00000000 --- a/node_modules/express/node_modules/range-parser/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --reporter spec \ - --require should - -.PHONY: test \ No newline at end of file diff --git a/node_modules/express/node_modules/range-parser/Readme.md b/node_modules/express/node_modules/range-parser/Readme.md deleted file mode 100644 index b2a67fe8..00000000 --- a/node_modules/express/node_modules/range-parser/Readme.md +++ /dev/null @@ -1,28 +0,0 @@ - -# node-range-parser - - Range header field parser. - -## Example: - -```js -assert(-1 == parse(200, 'bytes=500-20')); -assert(-2 == parse(200, 'bytes=malformed')); -parse(200, 'bytes=0-499').should.eql(arr('bytes', [{ start: 0, end: 199 }])); -parse(1000, 'bytes=0-499').should.eql(arr('bytes', [{ start: 0, end: 499 }])); -parse(1000, 'bytes=40-80').should.eql(arr('bytes', [{ start: 40, end: 80 }])); -parse(1000, 'bytes=-500').should.eql(arr('bytes', [{ start: 500, end: 999 }])); -parse(1000, 'bytes=-400').should.eql(arr('bytes', [{ start: 600, end: 999 }])); -parse(1000, 'bytes=500-').should.eql(arr('bytes', [{ start: 500, end: 999 }])); -parse(1000, 'bytes=400-').should.eql(arr('bytes', [{ start: 400, end: 999 }])); -parse(1000, 'bytes=0-0').should.eql(arr('bytes', [{ start: 0, end: 0 }])); -parse(1000, 'bytes=-1').should.eql(arr('bytes', [{ start: 999, end: 999 }])); -parse(1000, 'items=0-5').should.eql(arr('items', [{ start: 0, end: 5 }])); -parse(1000, 'bytes=40-80,-1').should.eql(arr('bytes', [{ start: 40, end: 80 }, { start: 999, end: 999 }])); -``` - -## Installation - -``` -$ npm install range-parser -``` \ No newline at end of file diff --git a/node_modules/express/node_modules/range-parser/index.js b/node_modules/express/node_modules/range-parser/index.js deleted file mode 100644 index 9b0f7a8e..00000000 --- a/node_modules/express/node_modules/range-parser/index.js +++ /dev/null @@ -1,49 +0,0 @@ - -/** - * Parse "Range" header `str` relative to the given file `size`. - * - * @param {Number} size - * @param {String} str - * @return {Array} - * @api public - */ - -module.exports = function(size, str){ - var valid = true; - var i = str.indexOf('='); - - if (-1 == i) return -2; - - var arr = str.slice(i + 1).split(',').map(function(range){ - var range = range.split('-') - , start = parseInt(range[0], 10) - , end = parseInt(range[1], 10); - - // -nnn - if (isNaN(start)) { - start = size - end; - end = size - 1; - // nnn- - } else if (isNaN(end)) { - end = size - 1; - } - - // limit last-byte-pos to current length - if (end > size - 1) end = size - 1; - - // invalid - if (isNaN(start) - || isNaN(end) - || start > end - || start < 0) valid = false; - - return { - start: start, - end: end - }; - }); - - arr.type = str.slice(0, i); - - return valid ? arr : -1; -}; \ No newline at end of file diff --git a/node_modules/express/node_modules/range-parser/package.json b/node_modules/express/node_modules/range-parser/package.json deleted file mode 100644 index 0e048f77..00000000 --- a/node_modules/express/node_modules/range-parser/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "range-parser", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - }, - "description": "Range header field string parser", - "version": "0.0.4", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "readme": "\n# node-range-parser\n\n Range header field parser.\n\n## Example:\n\n```js\nassert(-1 == parse(200, 'bytes=500-20'));\nassert(-2 == parse(200, 'bytes=malformed'));\nparse(200, 'bytes=0-499').should.eql(arr('bytes', [{ start: 0, end: 199 }]));\nparse(1000, 'bytes=0-499').should.eql(arr('bytes', [{ start: 0, end: 499 }]));\nparse(1000, 'bytes=40-80').should.eql(arr('bytes', [{ start: 40, end: 80 }]));\nparse(1000, 'bytes=-500').should.eql(arr('bytes', [{ start: 500, end: 999 }]));\nparse(1000, 'bytes=-400').should.eql(arr('bytes', [{ start: 600, end: 999 }]));\nparse(1000, 'bytes=500-').should.eql(arr('bytes', [{ start: 500, end: 999 }]));\nparse(1000, 'bytes=400-').should.eql(arr('bytes', [{ start: 400, end: 999 }]));\nparse(1000, 'bytes=0-0').should.eql(arr('bytes', [{ start: 0, end: 0 }]));\nparse(1000, 'bytes=-1').should.eql(arr('bytes', [{ start: 999, end: 999 }]));\nparse(1000, 'items=0-5').should.eql(arr('items', [{ start: 0, end: 5 }]));\nparse(1000, 'bytes=40-80,-1').should.eql(arr('bytes', [{ start: 40, end: 80 }, { start: 999, end: 999 }]));\n```\n\n## Installation\n\n```\n$ npm install range-parser\n```", - "readmeFilename": "Readme.md", - "_id": "range-parser@0.0.4", - "dist": { - "shasum": "c0427ffef51c10acba0782a46c9602e744ff620b" - }, - "_from": "range-parser@0.0.4", - "_resolved": "https://registry.npmjs.org/range-parser/-/range-parser-0.0.4.tgz" -} diff --git a/node_modules/express/node_modules/send/.npmignore b/node_modules/express/node_modules/send/.npmignore deleted file mode 100644 index f1250e58..00000000 --- a/node_modules/express/node_modules/send/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/node_modules/express/node_modules/send/History.md b/node_modules/express/node_modules/send/History.md deleted file mode 100644 index 55c4af74..00000000 --- a/node_modules/express/node_modules/send/History.md +++ /dev/null @@ -1,40 +0,0 @@ - -0.1.4 / 2013-08-11 -================== - - * update fresh - -0.1.3 / 2013-07-08 -================== - - * Revert "Fix fd leak" - -0.1.2 / 2013-07-03 -================== - - * Fix fd leak - -0.1.0 / 2012-08-25 -================== - - * add options parameter to send() that is passed to fs.createReadStream() [kanongil] - -0.0.4 / 2012-08-16 -================== - - * allow custom "Accept-Ranges" definition - -0.0.3 / 2012-07-16 -================== - - * fix normalization of the root directory. Closes #3 - -0.0.2 / 2012-07-09 -================== - - * add passing of req explicitly for now (YUCK) - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/express/node_modules/send/Makefile b/node_modules/express/node_modules/send/Makefile deleted file mode 100644 index a9dcfd50..00000000 --- a/node_modules/express/node_modules/send/Makefile +++ /dev/null @@ -1,8 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --require should \ - --reporter spec \ - --bail - -.PHONY: test \ No newline at end of file diff --git a/node_modules/express/node_modules/send/Readme.md b/node_modules/express/node_modules/send/Readme.md deleted file mode 100644 index ea7b2341..00000000 --- a/node_modules/express/node_modules/send/Readme.md +++ /dev/null @@ -1,128 +0,0 @@ -# send - - Send is Connect's `static()` extracted for generalized use, a streaming static file - server supporting partial responses (Ranges), conditional-GET negotiation, high test coverage, and granular events which may be leveraged to take appropriate actions in your application or framework. - -## Installation - - $ npm install send - -## Examples - - Small: - -```js -var http = require('http'); -var send = require('send'); - -var app = http.createServer(function(req, res){ - send(req, req.url).pipe(res); -}).listen(3000); -``` - - Serving from a root directory with custom error-handling: - -```js -var http = require('http'); -var send = require('send'); -var url = require('url'); - -var app = http.createServer(function(req, res){ - // your custom error-handling logic: - function error(err) { - res.statusCode = err.status || 500; - res.end(err.message); - } - - // your custom directory handling logic: - function redirect() { - res.statusCode = 301; - res.setHeader('Location', req.url + '/'); - res.end('Redirecting to ' + req.url + '/'); - } - - // transfer arbitrary files from within - // /www/example.com/public/* - send(req, url.parse(req.url).pathname) - .root('/www/example.com/public') - .on('error', error) - .on('directory', redirect) - .pipe(res); -}).listen(3000); -``` - -## API - -### Events - - - `error` an error occurred `(err)` - - `directory` a directory was requested - - `file` a file was requested `(path, stat)` - - `stream` file streaming has started `(stream)` - - `end` streaming has completed - -### .root(dir) - - Serve files relative to `path`. Aliased as `.from(dir)`. - -### .index(path) - - By default send supports "index.html" files, to disable this - invoke `.index(false)` or to supply a new index pass a string. - -### .maxage(ms) - - Provide a max-age in milliseconds for http caching, defaults to 0. - -### .hidden(bool) - - Enable or disable transfer of hidden files, defaults to false. - -## Error-handling - - By default when no `error` listeners are present an automatic response will be made, otherwise you have full control over the response, aka you may show a 5xx page etc. - -## Caching - - It does _not_ perform internal caching, you should use a reverse proxy cache such - as Varnish for this, or those fancy things called CDNs. If your application is small enough that it would benefit from single-node memory caching, it's small enough that it does not need caching at all ;). - -## Debugging - - To enable `debug()` instrumentation output export __DEBUG__: - -``` -$ DEBUG=send node app -``` - -## Running tests - -``` -$ npm install -$ make test -``` - -## License - -(The MIT License) - -Copyright (c) 2012 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/node_modules/express/node_modules/send/index.js b/node_modules/express/node_modules/send/index.js deleted file mode 100644 index f17158d8..00000000 --- a/node_modules/express/node_modules/send/index.js +++ /dev/null @@ -1,2 +0,0 @@ - -module.exports = require('./lib/send'); \ No newline at end of file diff --git a/node_modules/express/node_modules/send/lib/send.js b/node_modules/express/node_modules/send/lib/send.js deleted file mode 100644 index a3d94a69..00000000 --- a/node_modules/express/node_modules/send/lib/send.js +++ /dev/null @@ -1,474 +0,0 @@ - -/** - * Module dependencies. - */ - -var debug = require('debug')('send') - , parseRange = require('range-parser') - , Stream = require('stream') - , mime = require('mime') - , fresh = require('fresh') - , path = require('path') - , http = require('http') - , fs = require('fs') - , basename = path.basename - , normalize = path.normalize - , join = path.join - , utils = require('./utils'); - -/** - * Expose `send`. - */ - -exports = module.exports = send; - -/** - * Expose mime module. - */ - -exports.mime = mime; - -/** - * Return a `SendStream` for `req` and `path`. - * - * @param {Request} req - * @param {String} path - * @param {Object} options - * @return {SendStream} - * @api public - */ - -function send(req, path, options) { - return new SendStream(req, path, options); -} - -/** - * Initialize a `SendStream` with the given `path`. - * - * Events: - * - * - `error` an error occurred - * - `stream` file streaming has started - * - `end` streaming has completed - * - `directory` a directory was requested - * - * @param {Request} req - * @param {String} path - * @param {Object} options - * @api private - */ - -function SendStream(req, path, options) { - var self = this; - this.req = req; - this.path = path; - this.options = options || {}; - this.maxage(0); - this.hidden(false); - this.index('index.html'); -} - -/** - * Inherits from `Stream.prototype`. - */ - -SendStream.prototype.__proto__ = Stream.prototype; - -/** - * Enable or disable "hidden" (dot) files. - * - * @param {Boolean} path - * @return {SendStream} - * @api public - */ - -SendStream.prototype.hidden = function(val){ - debug('hidden %s', val); - this._hidden = val; - return this; -}; - -/** - * Set index `path`, set to a falsy - * value to disable index support. - * - * @param {String|Boolean} path - * @return {SendStream} - * @api public - */ - -SendStream.prototype.index = function(path){ - debug('index %s', path); - this._index = path; - return this; -}; - -/** - * Set root `path`. - * - * @param {String} path - * @return {SendStream} - * @api public - */ - -SendStream.prototype.root = -SendStream.prototype.from = function(path){ - this._root = normalize(path); - return this; -}; - -/** - * Set max-age to `ms`. - * - * @param {Number} ms - * @return {SendStream} - * @api public - */ - -SendStream.prototype.maxage = function(ms){ - if (Infinity == ms) ms = 60 * 60 * 24 * 365 * 1000; - debug('max-age %d', ms); - this._maxage = ms; - return this; -}; - -/** - * Emit error with `status`. - * - * @param {Number} status - * @api private - */ - -SendStream.prototype.error = function(status, err){ - var res = this.res; - var msg = http.STATUS_CODES[status]; - err = err || new Error(msg); - err.status = status; - if (this.listeners('error').length) return this.emit('error', err); - res.statusCode = err.status; - res.end(msg); -}; - -/** - * Check if the pathname is potentially malicious. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isMalicious = function(){ - return !this._root && ~this.path.indexOf('..'); -}; - -/** - * Check if the pathname ends with "/". - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.hasTrailingSlash = function(){ - return '/' == this.path[this.path.length - 1]; -}; - -/** - * Check if the basename leads with ".". - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.hasLeadingDot = function(){ - return '.' == basename(this.path)[0]; -}; - -/** - * Check if this is a conditional GET request. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isConditionalGET = function(){ - return this.req.headers['if-none-match'] - || this.req.headers['if-modified-since']; -}; - -/** - * Strip content-* header fields. - * - * @api private - */ - -SendStream.prototype.removeContentHeaderFields = function(){ - var res = this.res; - Object.keys(res._headers).forEach(function(field){ - if (0 == field.indexOf('content')) { - res.removeHeader(field); - } - }); -}; - -/** - * Respond with 304 not modified. - * - * @api private - */ - -SendStream.prototype.notModified = function(){ - var res = this.res; - debug('not modified'); - this.removeContentHeaderFields(); - res.statusCode = 304; - res.end(); -}; - -/** - * Check if the request is cacheable, aka - * responded with 2xx or 304 (see RFC 2616 section 14.2{5,6}). - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isCachable = function(){ - var res = this.res; - return (res.statusCode >= 200 && res.statusCode < 300) || 304 == res.statusCode; -}; - -/** - * Handle stat() error. - * - * @param {Error} err - * @api private - */ - -SendStream.prototype.onStatError = function(err){ - var notfound = ['ENOENT', 'ENAMETOOLONG', 'ENOTDIR']; - if (~notfound.indexOf(err.code)) return this.error(404, err); - this.error(500, err); -}; - -/** - * Check if the cache is fresh. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isFresh = function(){ - return fresh(this.req.headers, this.res._headers); -}; - -/** - * Redirect to `path`. - * - * @param {String} path - * @api private - */ - -SendStream.prototype.redirect = function(path){ - if (this.listeners('directory').length) return this.emit('directory'); - var res = this.res; - path += '/'; - res.statusCode = 301; - res.setHeader('Location', path); - res.end('Redirecting to ' + utils.escape(path)); -}; - -/** - * Pipe to `res. - * - * @param {Stream} res - * @return {Stream} res - * @api public - */ - -SendStream.prototype.pipe = function(res){ - var self = this - , args = arguments - , path = this.path - , root = this._root; - - // references - this.res = res; - - // invalid request uri - path = utils.decode(path); - if (-1 == path) return this.error(400); - - // null byte(s) - if (~path.indexOf('\0')) return this.error(400); - - // join / normalize from optional root dir - if (root) path = normalize(join(this._root, path)); - - // ".." is malicious without "root" - if (this.isMalicious()) return this.error(403); - - // malicious path - if (root && 0 != path.indexOf(root)) return this.error(403); - - // hidden file support - if (!this._hidden && this.hasLeadingDot()) return this.error(404); - - // index file support - if (this._index && this.hasTrailingSlash()) path += this._index; - - debug('stat "%s"', path); - fs.stat(path, function(err, stat){ - if (err) return self.onStatError(err); - if (stat.isDirectory()) return self.redirect(self.path); - self.emit('file', path, stat); - self.send(path, stat); - }); - - return res; -}; - -/** - * Transfer `path`. - * - * @param {String} path - * @api public - */ - -SendStream.prototype.send = function(path, stat){ - var options = this.options; - var len = stat.size; - var res = this.res; - var req = this.req; - var ranges = req.headers.range; - var offset = options.start || 0; - - // set header fields - this.setHeader(stat); - - // set content-type - this.type(path); - - // conditional GET support - if (this.isConditionalGET() - && this.isCachable() - && this.isFresh()) { - return this.notModified(); - } - - // adjust len to start/end options - len = Math.max(0, len - offset); - if (options.end !== undefined) { - var bytes = options.end - offset + 1; - if (len > bytes) len = bytes; - } - - // Range support - if (ranges) { - ranges = parseRange(len, ranges); - - // unsatisfiable - if (-1 == ranges) { - res.setHeader('Content-Range', 'bytes */' + stat.size); - return this.error(416); - } - - // valid (syntactically invalid ranges are treated as a regular response) - if (-2 != ranges) { - options.start = offset + ranges[0].start; - options.end = offset + ranges[0].end; - - // Content-Range - res.statusCode = 206; - res.setHeader('Content-Range', 'bytes ' - + ranges[0].start - + '-' - + ranges[0].end - + '/' - + len); - len = options.end - options.start + 1; - } - } - - // content-length - res.setHeader('Content-Length', len); - - // HEAD support - if ('HEAD' == req.method) return res.end(); - - this.stream(path, options); -}; - -/** - * Stream `path` to the response. - * - * @param {String} path - * @param {Object} options - * @api private - */ - -SendStream.prototype.stream = function(path, options){ - // TODO: this is all lame, refactor meeee - var self = this; - var res = this.res; - var req = this.req; - - // pipe - var stream = fs.createReadStream(path, options); - this.emit('stream', stream); - stream.pipe(res); - - // socket closed, done with the fd - req.on('close', stream.destroy.bind(stream)); - - // error handling code-smell - stream.on('error', function(err){ - // no hope in responding - if (res._header) { - console.error(err.stack); - req.destroy(); - return; - } - - // 500 - err.status = 500; - self.emit('error', err); - }); - - // end - stream.on('end', function(){ - self.emit('end'); - }); -}; - -/** - * Set content-type based on `path` - * if it hasn't been explicitly set. - * - * @param {String} path - * @api private - */ - -SendStream.prototype.type = function(path){ - var res = this.res; - if (res.getHeader('Content-Type')) return; - var type = mime.lookup(path); - var charset = mime.charsets.lookup(type); - debug('content-type %s', type); - res.setHeader('Content-Type', type + (charset ? '; charset=' + charset : '')); -}; - -/** - * Set reaponse header fields, most - * fields may be pre-defined. - * - * @param {Object} stat - * @api private - */ - -SendStream.prototype.setHeader = function(stat){ - var res = this.res; - if (!res.getHeader('Accept-Ranges')) res.setHeader('Accept-Ranges', 'bytes'); - if (!res.getHeader('ETag')) res.setHeader('ETag', utils.etag(stat)); - if (!res.getHeader('Date')) res.setHeader('Date', new Date().toUTCString()); - if (!res.getHeader('Cache-Control')) res.setHeader('Cache-Control', 'public, max-age=' + (this._maxage / 1000)); - if (!res.getHeader('Last-Modified')) res.setHeader('Last-Modified', stat.mtime.toUTCString()); -}; diff --git a/node_modules/express/node_modules/send/lib/utils.js b/node_modules/express/node_modules/send/lib/utils.js deleted file mode 100644 index 950e5a2c..00000000 --- a/node_modules/express/node_modules/send/lib/utils.js +++ /dev/null @@ -1,47 +0,0 @@ - -/** - * Return an ETag in the form of `"-"` - * from the given `stat`. - * - * @param {Object} stat - * @return {String} - * @api private - */ - -exports.etag = function(stat) { - return '"' + stat.size + '-' + Number(stat.mtime) + '"'; -}; - -/** - * decodeURIComponent. - * - * Allows V8 to only deoptimize this fn instead of all - * of send(). - * - * @param {String} path - * @api private - */ - -exports.decode = function(path){ - try { - return decodeURIComponent(path); - } catch (err) { - return -1; - } -}; - -/** - * Escape the given string of `html`. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function(html){ - return String(html) - .replace(/&(?!\w+;)/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); -}; \ No newline at end of file diff --git a/node_modules/express/node_modules/send/node_modules/mime/LICENSE b/node_modules/express/node_modules/send/node_modules/mime/LICENSE deleted file mode 100644 index 451fc455..00000000 --- a/node_modules/express/node_modules/send/node_modules/mime/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Benjamin Thomas, Robert Kieffer - -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/node_modules/express/node_modules/send/node_modules/mime/README.md b/node_modules/express/node_modules/send/node_modules/mime/README.md deleted file mode 100644 index 6ca19bd1..00000000 --- a/node_modules/express/node_modules/send/node_modules/mime/README.md +++ /dev/null @@ -1,66 +0,0 @@ -# mime - -Comprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community. - -## Install - -Install with [npm](http://github.com/isaacs/npm): - - npm install mime - -## API - Queries - -### mime.lookup(path) -Get the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g. - - var mime = require('mime'); - - mime.lookup('/path/to/file.txt'); // => 'text/plain' - mime.lookup('file.txt'); // => 'text/plain' - mime.lookup('.TXT'); // => 'text/plain' - mime.lookup('htm'); // => 'text/html' - -### mime.default_type -Sets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.) - -### mime.extension(type) -Get the default extension for `type` - - mime.extension('text/html'); // => 'html' - mime.extension('application/octet-stream'); // => 'bin' - -### mime.charsets.lookup() - -Map mime-type to charset - - mime.charsets.lookup('text/plain'); // => 'UTF-8' - -(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.) - -## API - Defining Custom Types - -The following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/broofa/node-mime/wiki/Requesting-New-Types). - -### mime.define() - -Add custom mime/extension mappings - - mime.define({ - 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'], - 'application/x-my-type': ['x-mt', 'x-mtt'], - // etc ... - }); - - mime.lookup('x-sft'); // => 'text/x-some-format' - -The first entry in the extensions array is returned by `mime.extension()`. E.g. - - mime.extension('text/x-some-format'); // => 'x-sf' - -### mime.load(filepath) - -Load mappings from an Apache ".types" format file - - mime.load('./my_project.types'); - -The .types file format is simple - See the `types` dir for examples. diff --git a/node_modules/express/node_modules/send/node_modules/mime/mime.js b/node_modules/express/node_modules/send/node_modules/mime/mime.js deleted file mode 100644 index 48be0c5e..00000000 --- a/node_modules/express/node_modules/send/node_modules/mime/mime.js +++ /dev/null @@ -1,114 +0,0 @@ -var path = require('path'); -var fs = require('fs'); - -function Mime() { - // Map of extension -> mime type - this.types = Object.create(null); - - // Map of mime type -> extension - this.extensions = Object.create(null); -} - -/** - * Define mimetype -> extension mappings. Each key is a mime-type that maps - * to an array of extensions associated with the type. The first extension is - * used as the default extension for the type. - * - * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']}); - * - * @param map (Object) type definitions - */ -Mime.prototype.define = function (map) { - for (var type in map) { - var exts = map[type]; - - for (var i = 0; i < exts.length; i++) { - if (process.env.DEBUG_MIME && this.types[exts]) { - console.warn(this._loading.replace(/.*\//, ''), 'changes "' + exts[i] + '" extension type from ' + - this.types[exts] + ' to ' + type); - } - - this.types[exts[i]] = type; - } - - // Default extension is the first one we encounter - if (!this.extensions[type]) { - this.extensions[type] = exts[0]; - } - } -}; - -/** - * Load an Apache2-style ".types" file - * - * This may be called multiple times (it's expected). Where files declare - * overlapping types/extensions, the last file wins. - * - * @param file (String) path of file to load. - */ -Mime.prototype.load = function(file) { - - this._loading = file; - // Read file and split into lines - var map = {}, - content = fs.readFileSync(file, 'ascii'), - lines = content.split(/[\r\n]+/); - - lines.forEach(function(line) { - // Clean up whitespace/comments, and split into fields - var fields = line.replace(/\s*#.*|^\s*|\s*$/g, '').split(/\s+/); - map[fields.shift()] = fields; - }); - - this.define(map); - - this._loading = null; -}; - -/** - * Lookup a mime type based on extension - */ -Mime.prototype.lookup = function(path, fallback) { - var ext = path.replace(/.*[\.\/\\]/, '').toLowerCase(); - - return this.types[ext] || fallback || this.default_type; -}; - -/** - * Return file extension associated with a mime type - */ -Mime.prototype.extension = function(mimeType) { - var type = mimeType.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase(); - return this.extensions[type]; -}; - -// Default instance -var mime = new Mime(); - -// Load local copy of -// http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types -mime.load(path.join(__dirname, 'types/mime.types')); - -// Load additional types from node.js community -mime.load(path.join(__dirname, 'types/node.types')); - -// Default type -mime.default_type = mime.lookup('bin'); - -// -// Additional API specific to the default instance -// - -mime.Mime = Mime; - -/** - * Lookup a charset based on mime type. - */ -mime.charsets = { - lookup: function(mimeType, fallback) { - // Assume text types are utf8 - return (/^text\//).test(mimeType) ? 'UTF-8' : fallback; - } -}; - -module.exports = mime; diff --git a/node_modules/express/node_modules/send/node_modules/mime/package.json b/node_modules/express/node_modules/send/node_modules/mime/package.json deleted file mode 100644 index a9759392..00000000 --- a/node_modules/express/node_modules/send/node_modules/mime/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": { - "name": "Robert Kieffer", - "email": "robert@broofa.com", - "url": "http://github.com/broofa" - }, - "contributors": [ - { - "name": "Benjamin Thomas", - "email": "benjamin@benjaminthomas.org", - "url": "http://github.com/bentomas" - } - ], - "dependencies": {}, - "description": "A comprehensive library for mime-type mapping", - "devDependencies": {}, - "keywords": [ - "util", - "mime" - ], - "main": "mime.js", - "name": "mime", - "repository": { - "url": "https://github.com/broofa/node-mime", - "type": "git" - }, - "version": "1.2.11", - "readme": "# mime\n\nComprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community.\n\n## Install\n\nInstall with [npm](http://github.com/isaacs/npm):\n\n npm install mime\n\n## API - Queries\n\n### mime.lookup(path)\nGet the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g.\n\n var mime = require('mime');\n\n mime.lookup('/path/to/file.txt'); // => 'text/plain'\n mime.lookup('file.txt'); // => 'text/plain'\n mime.lookup('.TXT'); // => 'text/plain'\n mime.lookup('htm'); // => 'text/html'\n\n### mime.default_type\nSets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.)\n\n### mime.extension(type)\nGet the default extension for `type`\n\n mime.extension('text/html'); // => 'html'\n mime.extension('application/octet-stream'); // => 'bin'\n\n### mime.charsets.lookup()\n\nMap mime-type to charset\n\n mime.charsets.lookup('text/plain'); // => 'UTF-8'\n\n(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.)\n\n## API - Defining Custom Types\n\nThe following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/broofa/node-mime/wiki/Requesting-New-Types).\n\n### mime.define()\n\nAdd custom mime/extension mappings\n\n mime.define({\n 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'],\n 'application/x-my-type': ['x-mt', 'x-mtt'],\n // etc ...\n });\n\n mime.lookup('x-sft'); // => 'text/x-some-format'\n\nThe first entry in the extensions array is returned by `mime.extension()`. E.g.\n\n mime.extension('text/x-some-format'); // => 'x-sf'\n\n### mime.load(filepath)\n\nLoad mappings from an Apache \".types\" format file\n\n mime.load('./my_project.types');\n\nThe .types file format is simple - See the `types` dir for examples.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/broofa/node-mime/issues" - }, - "homepage": "https://github.com/broofa/node-mime", - "_id": "mime@1.2.11", - "_from": "mime@~1.2.9" -} diff --git a/node_modules/express/node_modules/send/node_modules/mime/test.js b/node_modules/express/node_modules/send/node_modules/mime/test.js deleted file mode 100644 index 2cda1c7a..00000000 --- a/node_modules/express/node_modules/send/node_modules/mime/test.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Usage: node test.js - */ - -var mime = require('./mime'); -var assert = require('assert'); -var path = require('path'); - -function eq(a, b) { - console.log('Test: ' + a + ' === ' + b); - assert.strictEqual.apply(null, arguments); -} - -console.log(Object.keys(mime.extensions).length + ' types'); -console.log(Object.keys(mime.types).length + ' extensions\n'); - -// -// Test mime lookups -// - -eq('text/plain', mime.lookup('text.txt')); // normal file -eq('text/plain', mime.lookup('TEXT.TXT')); // uppercase -eq('text/plain', mime.lookup('dir/text.txt')); // dir + file -eq('text/plain', mime.lookup('.text.txt')); // hidden file -eq('text/plain', mime.lookup('.txt')); // nameless -eq('text/plain', mime.lookup('txt')); // extension-only -eq('text/plain', mime.lookup('/txt')); // extension-less () -eq('text/plain', mime.lookup('\\txt')); // Windows, extension-less -eq('application/octet-stream', mime.lookup('text.nope')); // unrecognized -eq('fallback', mime.lookup('text.fallback', 'fallback')); // alternate default - -// -// Test extensions -// - -eq('txt', mime.extension(mime.types.text)); -eq('html', mime.extension(mime.types.htm)); -eq('bin', mime.extension('application/octet-stream')); -eq('bin', mime.extension('application/octet-stream ')); -eq('html', mime.extension(' text/html; charset=UTF-8')); -eq('html', mime.extension('text/html; charset=UTF-8 ')); -eq('html', mime.extension('text/html; charset=UTF-8')); -eq('html', mime.extension('text/html ; charset=UTF-8')); -eq('html', mime.extension('text/html;charset=UTF-8')); -eq('html', mime.extension('text/Html;charset=UTF-8')); -eq(undefined, mime.extension('unrecognized')); - -// -// Test node.types lookups -// - -eq('application/font-woff', mime.lookup('file.woff')); -eq('application/octet-stream', mime.lookup('file.buffer')); -eq('audio/mp4', mime.lookup('file.m4a')); -eq('font/opentype', mime.lookup('file.otf')); - -// -// Test charsets -// - -eq('UTF-8', mime.charsets.lookup('text/plain')); -eq(undefined, mime.charsets.lookup(mime.types.js)); -eq('fallback', mime.charsets.lookup('application/octet-stream', 'fallback')); - -// -// Test for overlaps between mime.types and node.types -// - -var apacheTypes = new mime.Mime(), nodeTypes = new mime.Mime(); -apacheTypes.load(path.join(__dirname, 'types/mime.types')); -nodeTypes.load(path.join(__dirname, 'types/node.types')); - -var keys = [].concat(Object.keys(apacheTypes.types)) - .concat(Object.keys(nodeTypes.types)); -keys.sort(); -for (var i = 1; i < keys.length; i++) { - if (keys[i] == keys[i-1]) { - console.warn('Warning: ' + - 'node.types defines ' + keys[i] + '->' + nodeTypes.types[keys[i]] + - ', mime.types defines ' + keys[i] + '->' + apacheTypes.types[keys[i]]); - } -} - -console.log('\nOK'); diff --git a/node_modules/express/node_modules/send/node_modules/mime/types/mime.types b/node_modules/express/node_modules/send/node_modules/mime/types/mime.types deleted file mode 100644 index da8cd691..00000000 --- a/node_modules/express/node_modules/send/node_modules/mime/types/mime.types +++ /dev/null @@ -1,1588 +0,0 @@ -# This file maps Internet media types to unique file extension(s). -# Although created for httpd, this file is used by many software systems -# and has been placed in the public domain for unlimited redisribution. -# -# The table below contains both registered and (common) unregistered types. -# A type that has no unique extension can be ignored -- they are listed -# here to guide configurations toward known types and to make it easier to -# identify "new" types. File extensions are also commonly used to indicate -# content languages and encodings, so choose them carefully. -# -# Internet media types should be registered as described in RFC 4288. -# The registry is at . -# -# MIME type (lowercased) Extensions -# ============================================ ========== -# application/1d-interleaved-parityfec -# application/3gpp-ims+xml -# application/activemessage -application/andrew-inset ez -# application/applefile -application/applixware aw -application/atom+xml atom -application/atomcat+xml atomcat -# application/atomicmail -application/atomsvc+xml atomsvc -# application/auth-policy+xml -# application/batch-smtp -# application/beep+xml -# application/calendar+xml -# application/cals-1840 -# application/ccmp+xml -application/ccxml+xml ccxml -application/cdmi-capability cdmia -application/cdmi-container cdmic -application/cdmi-domain cdmid -application/cdmi-object cdmio -application/cdmi-queue cdmiq -# application/cea-2018+xml -# application/cellml+xml -# application/cfw -# application/cnrp+xml -# application/commonground -# application/conference-info+xml -# application/cpl+xml -# application/csta+xml -# application/cstadata+xml -application/cu-seeme cu -# application/cybercash -application/davmount+xml davmount -# application/dca-rft -# application/dec-dx -# application/dialog-info+xml -# application/dicom -# application/dns -application/docbook+xml dbk -# application/dskpp+xml -application/dssc+der dssc -application/dssc+xml xdssc -# application/dvcs -application/ecmascript ecma -# application/edi-consent -# application/edi-x12 -# application/edifact -application/emma+xml emma -# application/epp+xml -application/epub+zip epub -# application/eshop -# application/example -application/exi exi -# application/fastinfoset -# application/fastsoap -# application/fits -application/font-tdpfr pfr -# application/framework-attributes+xml -application/gml+xml gml -application/gpx+xml gpx -application/gxf gxf -# application/h224 -# application/held+xml -# application/http -application/hyperstudio stk -# application/ibe-key-request+xml -# application/ibe-pkg-reply+xml -# application/ibe-pp-data -# application/iges -# application/im-iscomposing+xml -# application/index -# application/index.cmd -# application/index.obj -# application/index.response -# application/index.vnd -application/inkml+xml ink inkml -# application/iotp -application/ipfix ipfix -# application/ipp -# application/isup -application/java-archive jar -application/java-serialized-object ser -application/java-vm class -application/javascript js -application/json json -application/jsonml+json jsonml -# application/kpml-request+xml -# application/kpml-response+xml -application/lost+xml lostxml -application/mac-binhex40 hqx -application/mac-compactpro cpt -# application/macwriteii -application/mads+xml mads -application/marc mrc -application/marcxml+xml mrcx -application/mathematica ma nb mb -# application/mathml-content+xml -# application/mathml-presentation+xml -application/mathml+xml mathml -# application/mbms-associated-procedure-description+xml -# application/mbms-deregister+xml -# application/mbms-envelope+xml -# application/mbms-msk+xml -# application/mbms-msk-response+xml -# application/mbms-protection-description+xml -# application/mbms-reception-report+xml -# application/mbms-register+xml -# application/mbms-register-response+xml -# application/mbms-user-service-description+xml -application/mbox mbox -# application/media_control+xml -application/mediaservercontrol+xml mscml -application/metalink+xml metalink -application/metalink4+xml meta4 -application/mets+xml mets -# application/mikey -application/mods+xml mods -# application/moss-keys -# application/moss-signature -# application/mosskey-data -# application/mosskey-request -application/mp21 m21 mp21 -application/mp4 mp4s -# application/mpeg4-generic -# application/mpeg4-iod -# application/mpeg4-iod-xmt -# application/msc-ivr+xml -# application/msc-mixer+xml -application/msword doc dot -application/mxf mxf -# application/nasdata -# application/news-checkgroups -# application/news-groupinfo -# application/news-transmission -# application/nss -# application/ocsp-request -# application/ocsp-response -application/octet-stream bin dms lrf mar so dist distz pkg bpk dump elc deploy -application/oda oda -application/oebps-package+xml opf -application/ogg ogx -application/omdoc+xml omdoc -application/onenote onetoc onetoc2 onetmp onepkg -application/oxps oxps -# application/parityfec -application/patch-ops-error+xml xer -application/pdf pdf -application/pgp-encrypted pgp -# application/pgp-keys -application/pgp-signature asc sig -application/pics-rules prf -# application/pidf+xml -# application/pidf-diff+xml -application/pkcs10 p10 -application/pkcs7-mime p7m p7c -application/pkcs7-signature p7s -application/pkcs8 p8 -application/pkix-attr-cert ac -application/pkix-cert cer -application/pkix-crl crl -application/pkix-pkipath pkipath -application/pkixcmp pki -application/pls+xml pls -# application/poc-settings+xml -application/postscript ai eps ps -# application/prs.alvestrand.titrax-sheet -application/prs.cww cww -# application/prs.nprend -# application/prs.plucker -# application/prs.rdf-xml-crypt -# application/prs.xsf+xml -application/pskc+xml pskcxml -# application/qsig -application/rdf+xml rdf -application/reginfo+xml rif -application/relax-ng-compact-syntax rnc -# application/remote-printing -application/resource-lists+xml rl -application/resource-lists-diff+xml rld -# application/riscos -# application/rlmi+xml -application/rls-services+xml rs -application/rpki-ghostbusters gbr -application/rpki-manifest mft -application/rpki-roa roa -# application/rpki-updown -application/rsd+xml rsd -application/rss+xml rss -application/rtf rtf -# application/rtx -# application/samlassertion+xml -# application/samlmetadata+xml -application/sbml+xml sbml -application/scvp-cv-request scq -application/scvp-cv-response scs -application/scvp-vp-request spq -application/scvp-vp-response spp -application/sdp sdp -# application/set-payment -application/set-payment-initiation setpay -# application/set-registration -application/set-registration-initiation setreg -# application/sgml -# application/sgml-open-catalog -application/shf+xml shf -# application/sieve -# application/simple-filter+xml -# application/simple-message-summary -# application/simplesymbolcontainer -# application/slate -# application/smil -application/smil+xml smi smil -# application/soap+fastinfoset -# application/soap+xml -application/sparql-query rq -application/sparql-results+xml srx -# application/spirits-event+xml -application/srgs gram -application/srgs+xml grxml -application/sru+xml sru -application/ssdl+xml ssdl -application/ssml+xml ssml -# application/tamp-apex-update -# application/tamp-apex-update-confirm -# application/tamp-community-update -# application/tamp-community-update-confirm -# application/tamp-error -# application/tamp-sequence-adjust -# application/tamp-sequence-adjust-confirm -# application/tamp-status-query -# application/tamp-status-response -# application/tamp-update -# application/tamp-update-confirm -application/tei+xml tei teicorpus -application/thraud+xml tfi -# application/timestamp-query -# application/timestamp-reply -application/timestamped-data tsd -# application/tve-trigger -# application/ulpfec -# application/vcard+xml -# application/vemmi -# application/vividence.scriptfile -# application/vnd.3gpp.bsf+xml -application/vnd.3gpp.pic-bw-large plb -application/vnd.3gpp.pic-bw-small psb -application/vnd.3gpp.pic-bw-var pvb -# application/vnd.3gpp.sms -# application/vnd.3gpp2.bcmcsinfo+xml -# application/vnd.3gpp2.sms -application/vnd.3gpp2.tcap tcap -application/vnd.3m.post-it-notes pwn -application/vnd.accpac.simply.aso aso -application/vnd.accpac.simply.imp imp -application/vnd.acucobol acu -application/vnd.acucorp atc acutc -application/vnd.adobe.air-application-installer-package+zip air -application/vnd.adobe.formscentral.fcdt fcdt -application/vnd.adobe.fxp fxp fxpl -# application/vnd.adobe.partial-upload -application/vnd.adobe.xdp+xml xdp -application/vnd.adobe.xfdf xfdf -# application/vnd.aether.imp -# application/vnd.ah-barcode -application/vnd.ahead.space ahead -application/vnd.airzip.filesecure.azf azf -application/vnd.airzip.filesecure.azs azs -application/vnd.amazon.ebook azw -application/vnd.americandynamics.acc acc -application/vnd.amiga.ami ami -# application/vnd.amundsen.maze+xml -application/vnd.android.package-archive apk -application/vnd.anser-web-certificate-issue-initiation cii -application/vnd.anser-web-funds-transfer-initiation fti -application/vnd.antix.game-component atx -application/vnd.apple.installer+xml mpkg -application/vnd.apple.mpegurl m3u8 -# application/vnd.arastra.swi -application/vnd.aristanetworks.swi swi -application/vnd.astraea-software.iota iota -application/vnd.audiograph aep -# application/vnd.autopackage -# application/vnd.avistar+xml -application/vnd.blueice.multipass mpm -# application/vnd.bluetooth.ep.oob -application/vnd.bmi bmi -application/vnd.businessobjects rep -# application/vnd.cab-jscript -# application/vnd.canon-cpdl -# application/vnd.canon-lips -# application/vnd.cendio.thinlinc.clientconf -application/vnd.chemdraw+xml cdxml -application/vnd.chipnuts.karaoke-mmd mmd -application/vnd.cinderella cdy -# application/vnd.cirpack.isdn-ext -application/vnd.claymore cla -application/vnd.cloanto.rp9 rp9 -application/vnd.clonk.c4group c4g c4d c4f c4p c4u -application/vnd.cluetrust.cartomobile-config c11amc -application/vnd.cluetrust.cartomobile-config-pkg c11amz -# application/vnd.collection+json -# application/vnd.commerce-battelle -application/vnd.commonspace csp -application/vnd.contact.cmsg cdbcmsg -application/vnd.cosmocaller cmc -application/vnd.crick.clicker clkx -application/vnd.crick.clicker.keyboard clkk -application/vnd.crick.clicker.palette clkp -application/vnd.crick.clicker.template clkt -application/vnd.crick.clicker.wordbank clkw -application/vnd.criticaltools.wbs+xml wbs -application/vnd.ctc-posml pml -# application/vnd.ctct.ws+xml -# application/vnd.cups-pdf -# application/vnd.cups-postscript -application/vnd.cups-ppd ppd -# application/vnd.cups-raster -# application/vnd.cups-raw -# application/vnd.curl -application/vnd.curl.car car -application/vnd.curl.pcurl pcurl -# application/vnd.cybank -application/vnd.dart dart -application/vnd.data-vision.rdz rdz -application/vnd.dece.data uvf uvvf uvd uvvd -application/vnd.dece.ttml+xml uvt uvvt -application/vnd.dece.unspecified uvx uvvx -application/vnd.dece.zip uvz uvvz -application/vnd.denovo.fcselayout-link fe_launch -# application/vnd.dir-bi.plate-dl-nosuffix -application/vnd.dna dna -application/vnd.dolby.mlp mlp -# application/vnd.dolby.mobile.1 -# application/vnd.dolby.mobile.2 -application/vnd.dpgraph dpg -application/vnd.dreamfactory dfac -application/vnd.ds-keypoint kpxx -application/vnd.dvb.ait ait -# application/vnd.dvb.dvbj -# application/vnd.dvb.esgcontainer -# application/vnd.dvb.ipdcdftnotifaccess -# application/vnd.dvb.ipdcesgaccess -# application/vnd.dvb.ipdcesgaccess2 -# application/vnd.dvb.ipdcesgpdd -# application/vnd.dvb.ipdcroaming -# application/vnd.dvb.iptv.alfec-base -# application/vnd.dvb.iptv.alfec-enhancement -# application/vnd.dvb.notif-aggregate-root+xml -# application/vnd.dvb.notif-container+xml -# application/vnd.dvb.notif-generic+xml -# application/vnd.dvb.notif-ia-msglist+xml -# application/vnd.dvb.notif-ia-registration-request+xml -# application/vnd.dvb.notif-ia-registration-response+xml -# application/vnd.dvb.notif-init+xml -# application/vnd.dvb.pfr -application/vnd.dvb.service svc -# application/vnd.dxr -application/vnd.dynageo geo -# application/vnd.easykaraoke.cdgdownload -# application/vnd.ecdis-update -application/vnd.ecowin.chart mag -# application/vnd.ecowin.filerequest -# application/vnd.ecowin.fileupdate -# application/vnd.ecowin.series -# application/vnd.ecowin.seriesrequest -# application/vnd.ecowin.seriesupdate -# application/vnd.emclient.accessrequest+xml -application/vnd.enliven nml -# application/vnd.eprints.data+xml -application/vnd.epson.esf esf -application/vnd.epson.msf msf -application/vnd.epson.quickanime qam -application/vnd.epson.salt slt -application/vnd.epson.ssf ssf -# application/vnd.ericsson.quickcall -application/vnd.eszigno3+xml es3 et3 -# application/vnd.etsi.aoc+xml -# application/vnd.etsi.cug+xml -# application/vnd.etsi.iptvcommand+xml -# application/vnd.etsi.iptvdiscovery+xml -# application/vnd.etsi.iptvprofile+xml -# application/vnd.etsi.iptvsad-bc+xml -# application/vnd.etsi.iptvsad-cod+xml -# application/vnd.etsi.iptvsad-npvr+xml -# application/vnd.etsi.iptvservice+xml -# application/vnd.etsi.iptvsync+xml -# application/vnd.etsi.iptvueprofile+xml -# application/vnd.etsi.mcid+xml -# application/vnd.etsi.overload-control-policy-dataset+xml -# application/vnd.etsi.sci+xml -# application/vnd.etsi.simservs+xml -# application/vnd.etsi.tsl+xml -# application/vnd.etsi.tsl.der -# application/vnd.eudora.data -application/vnd.ezpix-album ez2 -application/vnd.ezpix-package ez3 -# application/vnd.f-secure.mobile -application/vnd.fdf fdf -application/vnd.fdsn.mseed mseed -application/vnd.fdsn.seed seed dataless -# application/vnd.ffsns -# application/vnd.fints -application/vnd.flographit gph -application/vnd.fluxtime.clip ftc -# application/vnd.font-fontforge-sfd -application/vnd.framemaker fm frame maker book -application/vnd.frogans.fnc fnc -application/vnd.frogans.ltf ltf -application/vnd.fsc.weblaunch fsc -application/vnd.fujitsu.oasys oas -application/vnd.fujitsu.oasys2 oa2 -application/vnd.fujitsu.oasys3 oa3 -application/vnd.fujitsu.oasysgp fg5 -application/vnd.fujitsu.oasysprs bh2 -# application/vnd.fujixerox.art-ex -# application/vnd.fujixerox.art4 -# application/vnd.fujixerox.hbpl -application/vnd.fujixerox.ddd ddd -application/vnd.fujixerox.docuworks xdw -application/vnd.fujixerox.docuworks.binder xbd -# application/vnd.fut-misnet -application/vnd.fuzzysheet fzs -application/vnd.genomatix.tuxedo txd -# application/vnd.geocube+xml -application/vnd.geogebra.file ggb -application/vnd.geogebra.tool ggt -application/vnd.geometry-explorer gex gre -application/vnd.geonext gxt -application/vnd.geoplan g2w -application/vnd.geospace g3w -# application/vnd.globalplatform.card-content-mgt -# application/vnd.globalplatform.card-content-mgt-response -application/vnd.gmx gmx -application/vnd.google-earth.kml+xml kml -application/vnd.google-earth.kmz kmz -application/vnd.grafeq gqf gqs -# application/vnd.gridmp -application/vnd.groove-account gac -application/vnd.groove-help ghf -application/vnd.groove-identity-message gim -application/vnd.groove-injector grv -application/vnd.groove-tool-message gtm -application/vnd.groove-tool-template tpl -application/vnd.groove-vcard vcg -# application/vnd.hal+json -application/vnd.hal+xml hal -application/vnd.handheld-entertainment+xml zmm -application/vnd.hbci hbci -# application/vnd.hcl-bireports -application/vnd.hhe.lesson-player les -application/vnd.hp-hpgl hpgl -application/vnd.hp-hpid hpid -application/vnd.hp-hps hps -application/vnd.hp-jlyt jlt -application/vnd.hp-pcl pcl -application/vnd.hp-pclxl pclxl -# application/vnd.httphone -application/vnd.hydrostatix.sof-data sfd-hdstx -# application/vnd.hzn-3d-crossword -# application/vnd.ibm.afplinedata -# application/vnd.ibm.electronic-media -application/vnd.ibm.minipay mpy -application/vnd.ibm.modcap afp listafp list3820 -application/vnd.ibm.rights-management irm -application/vnd.ibm.secure-container sc -application/vnd.iccprofile icc icm -application/vnd.igloader igl -application/vnd.immervision-ivp ivp -application/vnd.immervision-ivu ivu -# application/vnd.informedcontrol.rms+xml -# application/vnd.informix-visionary -# application/vnd.infotech.project -# application/vnd.infotech.project+xml -# application/vnd.innopath.wamp.notification -application/vnd.insors.igm igm -application/vnd.intercon.formnet xpw xpx -application/vnd.intergeo i2g -# application/vnd.intertrust.digibox -# application/vnd.intertrust.nncp -application/vnd.intu.qbo qbo -application/vnd.intu.qfx qfx -# application/vnd.iptc.g2.conceptitem+xml -# application/vnd.iptc.g2.knowledgeitem+xml -# application/vnd.iptc.g2.newsitem+xml -# application/vnd.iptc.g2.newsmessage+xml -# application/vnd.iptc.g2.packageitem+xml -# application/vnd.iptc.g2.planningitem+xml -application/vnd.ipunplugged.rcprofile rcprofile -application/vnd.irepository.package+xml irp -application/vnd.is-xpr xpr -application/vnd.isac.fcs fcs -application/vnd.jam jam -# application/vnd.japannet-directory-service -# application/vnd.japannet-jpnstore-wakeup -# application/vnd.japannet-payment-wakeup -# application/vnd.japannet-registration -# application/vnd.japannet-registration-wakeup -# application/vnd.japannet-setstore-wakeup -# application/vnd.japannet-verification -# application/vnd.japannet-verification-wakeup -application/vnd.jcp.javame.midlet-rms rms -application/vnd.jisp jisp -application/vnd.joost.joda-archive joda -application/vnd.kahootz ktz ktr -application/vnd.kde.karbon karbon -application/vnd.kde.kchart chrt -application/vnd.kde.kformula kfo -application/vnd.kde.kivio flw -application/vnd.kde.kontour kon -application/vnd.kde.kpresenter kpr kpt -application/vnd.kde.kspread ksp -application/vnd.kde.kword kwd kwt -application/vnd.kenameaapp htke -application/vnd.kidspiration kia -application/vnd.kinar kne knp -application/vnd.koan skp skd skt skm -application/vnd.kodak-descriptor sse -application/vnd.las.las+xml lasxml -# application/vnd.liberty-request+xml -application/vnd.llamagraphics.life-balance.desktop lbd -application/vnd.llamagraphics.life-balance.exchange+xml lbe -application/vnd.lotus-1-2-3 123 -application/vnd.lotus-approach apr -application/vnd.lotus-freelance pre -application/vnd.lotus-notes nsf -application/vnd.lotus-organizer org -application/vnd.lotus-screencam scm -application/vnd.lotus-wordpro lwp -application/vnd.macports.portpkg portpkg -# application/vnd.marlin.drm.actiontoken+xml -# application/vnd.marlin.drm.conftoken+xml -# application/vnd.marlin.drm.license+xml -# application/vnd.marlin.drm.mdcf -application/vnd.mcd mcd -application/vnd.medcalcdata mc1 -application/vnd.mediastation.cdkey cdkey -# application/vnd.meridian-slingshot -application/vnd.mfer mwf -application/vnd.mfmp mfm -application/vnd.micrografx.flo flo -application/vnd.micrografx.igx igx -application/vnd.mif mif -# application/vnd.minisoft-hp3000-save -# application/vnd.mitsubishi.misty-guard.trustweb -application/vnd.mobius.daf daf -application/vnd.mobius.dis dis -application/vnd.mobius.mbk mbk -application/vnd.mobius.mqy mqy -application/vnd.mobius.msl msl -application/vnd.mobius.plc plc -application/vnd.mobius.txf txf -application/vnd.mophun.application mpn -application/vnd.mophun.certificate mpc -# application/vnd.motorola.flexsuite -# application/vnd.motorola.flexsuite.adsi -# application/vnd.motorola.flexsuite.fis -# application/vnd.motorola.flexsuite.gotap -# application/vnd.motorola.flexsuite.kmr -# application/vnd.motorola.flexsuite.ttc -# application/vnd.motorola.flexsuite.wem -# application/vnd.motorola.iprm -application/vnd.mozilla.xul+xml xul -application/vnd.ms-artgalry cil -# application/vnd.ms-asf -application/vnd.ms-cab-compressed cab -# application/vnd.ms-color.iccprofile -application/vnd.ms-excel xls xlm xla xlc xlt xlw -application/vnd.ms-excel.addin.macroenabled.12 xlam -application/vnd.ms-excel.sheet.binary.macroenabled.12 xlsb -application/vnd.ms-excel.sheet.macroenabled.12 xlsm -application/vnd.ms-excel.template.macroenabled.12 xltm -application/vnd.ms-fontobject eot -application/vnd.ms-htmlhelp chm -application/vnd.ms-ims ims -application/vnd.ms-lrm lrm -# application/vnd.ms-office.activex+xml -application/vnd.ms-officetheme thmx -# application/vnd.ms-opentype -# application/vnd.ms-package.obfuscated-opentype -application/vnd.ms-pki.seccat cat -application/vnd.ms-pki.stl stl -# application/vnd.ms-playready.initiator+xml -application/vnd.ms-powerpoint ppt pps pot -application/vnd.ms-powerpoint.addin.macroenabled.12 ppam -application/vnd.ms-powerpoint.presentation.macroenabled.12 pptm -application/vnd.ms-powerpoint.slide.macroenabled.12 sldm -application/vnd.ms-powerpoint.slideshow.macroenabled.12 ppsm -application/vnd.ms-powerpoint.template.macroenabled.12 potm -# application/vnd.ms-printing.printticket+xml -application/vnd.ms-project mpp mpt -# application/vnd.ms-tnef -# application/vnd.ms-wmdrm.lic-chlg-req -# application/vnd.ms-wmdrm.lic-resp -# application/vnd.ms-wmdrm.meter-chlg-req -# application/vnd.ms-wmdrm.meter-resp -application/vnd.ms-word.document.macroenabled.12 docm -application/vnd.ms-word.template.macroenabled.12 dotm -application/vnd.ms-works wps wks wcm wdb -application/vnd.ms-wpl wpl -application/vnd.ms-xpsdocument xps -application/vnd.mseq mseq -# application/vnd.msign -# application/vnd.multiad.creator -# application/vnd.multiad.creator.cif -# application/vnd.music-niff -application/vnd.musician mus -application/vnd.muvee.style msty -application/vnd.mynfc taglet -# application/vnd.ncd.control -# application/vnd.ncd.reference -# application/vnd.nervana -# application/vnd.netfpx -application/vnd.neurolanguage.nlu nlu -application/vnd.nitf ntf nitf -application/vnd.noblenet-directory nnd -application/vnd.noblenet-sealer nns -application/vnd.noblenet-web nnw -# application/vnd.nokia.catalogs -# application/vnd.nokia.conml+wbxml -# application/vnd.nokia.conml+xml -# application/vnd.nokia.isds-radio-presets -# application/vnd.nokia.iptv.config+xml -# application/vnd.nokia.landmark+wbxml -# application/vnd.nokia.landmark+xml -# application/vnd.nokia.landmarkcollection+xml -# application/vnd.nokia.n-gage.ac+xml -application/vnd.nokia.n-gage.data ngdat -application/vnd.nokia.n-gage.symbian.install n-gage -# application/vnd.nokia.ncd -# application/vnd.nokia.pcd+wbxml -# application/vnd.nokia.pcd+xml -application/vnd.nokia.radio-preset rpst -application/vnd.nokia.radio-presets rpss -application/vnd.novadigm.edm edm -application/vnd.novadigm.edx edx -application/vnd.novadigm.ext ext -# application/vnd.ntt-local.file-transfer -# application/vnd.ntt-local.sip-ta_remote -# application/vnd.ntt-local.sip-ta_tcp_stream -application/vnd.oasis.opendocument.chart odc -application/vnd.oasis.opendocument.chart-template otc -application/vnd.oasis.opendocument.database odb -application/vnd.oasis.opendocument.formula odf -application/vnd.oasis.opendocument.formula-template odft -application/vnd.oasis.opendocument.graphics odg -application/vnd.oasis.opendocument.graphics-template otg -application/vnd.oasis.opendocument.image odi -application/vnd.oasis.opendocument.image-template oti -application/vnd.oasis.opendocument.presentation odp -application/vnd.oasis.opendocument.presentation-template otp -application/vnd.oasis.opendocument.spreadsheet ods -application/vnd.oasis.opendocument.spreadsheet-template ots -application/vnd.oasis.opendocument.text odt -application/vnd.oasis.opendocument.text-master odm -application/vnd.oasis.opendocument.text-template ott -application/vnd.oasis.opendocument.text-web oth -# application/vnd.obn -# application/vnd.oftn.l10n+json -# application/vnd.oipf.contentaccessdownload+xml -# application/vnd.oipf.contentaccessstreaming+xml -# application/vnd.oipf.cspg-hexbinary -# application/vnd.oipf.dae.svg+xml -# application/vnd.oipf.dae.xhtml+xml -# application/vnd.oipf.mippvcontrolmessage+xml -# application/vnd.oipf.pae.gem -# application/vnd.oipf.spdiscovery+xml -# application/vnd.oipf.spdlist+xml -# application/vnd.oipf.ueprofile+xml -# application/vnd.oipf.userprofile+xml -application/vnd.olpc-sugar xo -# application/vnd.oma-scws-config -# application/vnd.oma-scws-http-request -# application/vnd.oma-scws-http-response -# application/vnd.oma.bcast.associated-procedure-parameter+xml -# application/vnd.oma.bcast.drm-trigger+xml -# application/vnd.oma.bcast.imd+xml -# application/vnd.oma.bcast.ltkm -# application/vnd.oma.bcast.notification+xml -# application/vnd.oma.bcast.provisioningtrigger -# application/vnd.oma.bcast.sgboot -# application/vnd.oma.bcast.sgdd+xml -# application/vnd.oma.bcast.sgdu -# application/vnd.oma.bcast.simple-symbol-container -# application/vnd.oma.bcast.smartcard-trigger+xml -# application/vnd.oma.bcast.sprov+xml -# application/vnd.oma.bcast.stkm -# application/vnd.oma.cab-address-book+xml -# application/vnd.oma.cab-feature-handler+xml -# application/vnd.oma.cab-pcc+xml -# application/vnd.oma.cab-user-prefs+xml -# application/vnd.oma.dcd -# application/vnd.oma.dcdc -application/vnd.oma.dd2+xml dd2 -# application/vnd.oma.drm.risd+xml -# application/vnd.oma.group-usage-list+xml -# application/vnd.oma.pal+xml -# application/vnd.oma.poc.detailed-progress-report+xml -# application/vnd.oma.poc.final-report+xml -# application/vnd.oma.poc.groups+xml -# application/vnd.oma.poc.invocation-descriptor+xml -# application/vnd.oma.poc.optimized-progress-report+xml -# application/vnd.oma.push -# application/vnd.oma.scidm.messages+xml -# application/vnd.oma.xcap-directory+xml -# application/vnd.omads-email+xml -# application/vnd.omads-file+xml -# application/vnd.omads-folder+xml -# application/vnd.omaloc-supl-init -application/vnd.openofficeorg.extension oxt -# application/vnd.openxmlformats-officedocument.custom-properties+xml -# application/vnd.openxmlformats-officedocument.customxmlproperties+xml -# application/vnd.openxmlformats-officedocument.drawing+xml -# application/vnd.openxmlformats-officedocument.drawingml.chart+xml -# application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml -# application/vnd.openxmlformats-officedocument.extended-properties+xml -# application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml -# application/vnd.openxmlformats-officedocument.presentationml.comments+xml -# application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml -# application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml -# application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml -application/vnd.openxmlformats-officedocument.presentationml.presentation pptx -# application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.presprops+xml -application/vnd.openxmlformats-officedocument.presentationml.slide sldx -# application/vnd.openxmlformats-officedocument.presentationml.slide+xml -# application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml -# application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml -application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx -# application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml -# application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml -# application/vnd.openxmlformats-officedocument.presentationml.tags+xml -application/vnd.openxmlformats-officedocument.presentationml.template potx -# application/vnd.openxmlformats-officedocument.presentationml.template.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx -# application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx -# application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml -# application/vnd.openxmlformats-officedocument.theme+xml -# application/vnd.openxmlformats-officedocument.themeoverride+xml -# application/vnd.openxmlformats-officedocument.vmldrawing -# application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.document docx -# application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx -# application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml -# application/vnd.openxmlformats-package.core-properties+xml -# application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml -# application/vnd.openxmlformats-package.relationships+xml -# application/vnd.quobject-quoxdocument -# application/vnd.osa.netdeploy -application/vnd.osgeo.mapguide.package mgp -# application/vnd.osgi.bundle -application/vnd.osgi.dp dp -application/vnd.osgi.subsystem esa -# application/vnd.otps.ct-kip+xml -application/vnd.palm pdb pqa oprc -# application/vnd.paos.xml -application/vnd.pawaafile paw -application/vnd.pg.format str -application/vnd.pg.osasli ei6 -# application/vnd.piaccess.application-licence -application/vnd.picsel efif -application/vnd.pmi.widget wg -# application/vnd.poc.group-advertisement+xml -application/vnd.pocketlearn plf -application/vnd.powerbuilder6 pbd -# application/vnd.powerbuilder6-s -# application/vnd.powerbuilder7 -# application/vnd.powerbuilder7-s -# application/vnd.powerbuilder75 -# application/vnd.powerbuilder75-s -# application/vnd.preminet -application/vnd.previewsystems.box box -application/vnd.proteus.magazine mgz -application/vnd.publishare-delta-tree qps -application/vnd.pvi.ptid1 ptid -# application/vnd.pwg-multiplexed -# application/vnd.pwg-xhtml-print+xml -# application/vnd.qualcomm.brew-app-res -application/vnd.quark.quarkxpress qxd qxt qwd qwt qxl qxb -# application/vnd.radisys.moml+xml -# application/vnd.radisys.msml+xml -# application/vnd.radisys.msml-audit+xml -# application/vnd.radisys.msml-audit-conf+xml -# application/vnd.radisys.msml-audit-conn+xml -# application/vnd.radisys.msml-audit-dialog+xml -# application/vnd.radisys.msml-audit-stream+xml -# application/vnd.radisys.msml-conf+xml -# application/vnd.radisys.msml-dialog+xml -# application/vnd.radisys.msml-dialog-base+xml -# application/vnd.radisys.msml-dialog-fax-detect+xml -# application/vnd.radisys.msml-dialog-fax-sendrecv+xml -# application/vnd.radisys.msml-dialog-group+xml -# application/vnd.radisys.msml-dialog-speech+xml -# application/vnd.radisys.msml-dialog-transform+xml -# application/vnd.rainstor.data -# application/vnd.rapid -application/vnd.realvnc.bed bed -application/vnd.recordare.musicxml mxl -application/vnd.recordare.musicxml+xml musicxml -# application/vnd.renlearn.rlprint -application/vnd.rig.cryptonote cryptonote -application/vnd.rim.cod cod -application/vnd.rn-realmedia rm -application/vnd.rn-realmedia-vbr rmvb -application/vnd.route66.link66+xml link66 -# application/vnd.rs-274x -# application/vnd.ruckus.download -# application/vnd.s3sms -application/vnd.sailingtracker.track st -# application/vnd.sbm.cid -# application/vnd.sbm.mid2 -# application/vnd.scribus -# application/vnd.sealed.3df -# application/vnd.sealed.csf -# application/vnd.sealed.doc -# application/vnd.sealed.eml -# application/vnd.sealed.mht -# application/vnd.sealed.net -# application/vnd.sealed.ppt -# application/vnd.sealed.tiff -# application/vnd.sealed.xls -# application/vnd.sealedmedia.softseal.html -# application/vnd.sealedmedia.softseal.pdf -application/vnd.seemail see -application/vnd.sema sema -application/vnd.semd semd -application/vnd.semf semf -application/vnd.shana.informed.formdata ifm -application/vnd.shana.informed.formtemplate itp -application/vnd.shana.informed.interchange iif -application/vnd.shana.informed.package ipk -application/vnd.simtech-mindmapper twd twds -application/vnd.smaf mmf -# application/vnd.smart.notebook -application/vnd.smart.teacher teacher -# application/vnd.software602.filler.form+xml -# application/vnd.software602.filler.form-xml-zip -application/vnd.solent.sdkm+xml sdkm sdkd -application/vnd.spotfire.dxp dxp -application/vnd.spotfire.sfs sfs -# application/vnd.sss-cod -# application/vnd.sss-dtf -# application/vnd.sss-ntf -application/vnd.stardivision.calc sdc -application/vnd.stardivision.draw sda -application/vnd.stardivision.impress sdd -application/vnd.stardivision.math smf -application/vnd.stardivision.writer sdw vor -application/vnd.stardivision.writer-global sgl -application/vnd.stepmania.package smzip -application/vnd.stepmania.stepchart sm -# application/vnd.street-stream -application/vnd.sun.xml.calc sxc -application/vnd.sun.xml.calc.template stc -application/vnd.sun.xml.draw sxd -application/vnd.sun.xml.draw.template std -application/vnd.sun.xml.impress sxi -application/vnd.sun.xml.impress.template sti -application/vnd.sun.xml.math sxm -application/vnd.sun.xml.writer sxw -application/vnd.sun.xml.writer.global sxg -application/vnd.sun.xml.writer.template stw -# application/vnd.sun.wadl+xml -application/vnd.sus-calendar sus susp -application/vnd.svd svd -# application/vnd.swiftview-ics -application/vnd.symbian.install sis sisx -application/vnd.syncml+xml xsm -application/vnd.syncml.dm+wbxml bdm -application/vnd.syncml.dm+xml xdm -# application/vnd.syncml.dm.notification -# application/vnd.syncml.ds.notification -application/vnd.tao.intent-module-archive tao -application/vnd.tcpdump.pcap pcap cap dmp -application/vnd.tmobile-livetv tmo -application/vnd.trid.tpt tpt -application/vnd.triscape.mxs mxs -application/vnd.trueapp tra -# application/vnd.truedoc -# application/vnd.ubisoft.webplayer -application/vnd.ufdl ufd ufdl -application/vnd.uiq.theme utz -application/vnd.umajin umj -application/vnd.unity unityweb -application/vnd.uoml+xml uoml -# application/vnd.uplanet.alert -# application/vnd.uplanet.alert-wbxml -# application/vnd.uplanet.bearer-choice -# application/vnd.uplanet.bearer-choice-wbxml -# application/vnd.uplanet.cacheop -# application/vnd.uplanet.cacheop-wbxml -# application/vnd.uplanet.channel -# application/vnd.uplanet.channel-wbxml -# application/vnd.uplanet.list -# application/vnd.uplanet.list-wbxml -# application/vnd.uplanet.listcmd -# application/vnd.uplanet.listcmd-wbxml -# application/vnd.uplanet.signal -application/vnd.vcx vcx -# application/vnd.vd-study -# application/vnd.vectorworks -# application/vnd.verimatrix.vcas -# application/vnd.vidsoft.vidconference -application/vnd.visio vsd vst vss vsw -application/vnd.visionary vis -# application/vnd.vividence.scriptfile -application/vnd.vsf vsf -# application/vnd.wap.sic -# application/vnd.wap.slc -application/vnd.wap.wbxml wbxml -application/vnd.wap.wmlc wmlc -application/vnd.wap.wmlscriptc wmlsc -application/vnd.webturbo wtb -# application/vnd.wfa.wsc -# application/vnd.wmc -# application/vnd.wmf.bootstrap -# application/vnd.wolfram.mathematica -# application/vnd.wolfram.mathematica.package -application/vnd.wolfram.player nbp -application/vnd.wordperfect wpd -application/vnd.wqd wqd -# application/vnd.wrq-hp3000-labelled -application/vnd.wt.stf stf -# application/vnd.wv.csp+wbxml -# application/vnd.wv.csp+xml -# application/vnd.wv.ssp+xml -application/vnd.xara xar -application/vnd.xfdl xfdl -# application/vnd.xfdl.webform -# application/vnd.xmi+xml -# application/vnd.xmpie.cpkg -# application/vnd.xmpie.dpkg -# application/vnd.xmpie.plan -# application/vnd.xmpie.ppkg -# application/vnd.xmpie.xlim -application/vnd.yamaha.hv-dic hvd -application/vnd.yamaha.hv-script hvs -application/vnd.yamaha.hv-voice hvp -application/vnd.yamaha.openscoreformat osf -application/vnd.yamaha.openscoreformat.osfpvg+xml osfpvg -# application/vnd.yamaha.remote-setup -application/vnd.yamaha.smaf-audio saf -application/vnd.yamaha.smaf-phrase spf -# application/vnd.yamaha.through-ngn -# application/vnd.yamaha.tunnel-udpencap -application/vnd.yellowriver-custom-menu cmp -application/vnd.zul zir zirz -application/vnd.zzazz.deck+xml zaz -application/voicexml+xml vxml -# application/vq-rtcpxr -# application/watcherinfo+xml -# application/whoispp-query -# application/whoispp-response -application/widget wgt -application/winhlp hlp -# application/wita -# application/wordperfect5.1 -application/wsdl+xml wsdl -application/wspolicy+xml wspolicy -application/x-7z-compressed 7z -application/x-abiword abw -application/x-ace-compressed ace -# application/x-amf -application/x-apple-diskimage dmg -application/x-authorware-bin aab x32 u32 vox -application/x-authorware-map aam -application/x-authorware-seg aas -application/x-bcpio bcpio -application/x-bittorrent torrent -application/x-blorb blb blorb -application/x-bzip bz -application/x-bzip2 bz2 boz -application/x-cbr cbr cba cbt cbz cb7 -application/x-cdlink vcd -application/x-cfs-compressed cfs -application/x-chat chat -application/x-chess-pgn pgn -application/x-conference nsc -# application/x-compress -application/x-cpio cpio -application/x-csh csh -application/x-debian-package deb udeb -application/x-dgc-compressed dgc -application/x-director dir dcr dxr cst cct cxt w3d fgd swa -application/x-doom wad -application/x-dtbncx+xml ncx -application/x-dtbook+xml dtb -application/x-dtbresource+xml res -application/x-dvi dvi -application/x-envoy evy -application/x-eva eva -application/x-font-bdf bdf -# application/x-font-dos -# application/x-font-framemaker -application/x-font-ghostscript gsf -# application/x-font-libgrx -application/x-font-linux-psf psf -application/x-font-otf otf -application/x-font-pcf pcf -application/x-font-snf snf -# application/x-font-speedo -# application/x-font-sunos-news -application/x-font-ttf ttf ttc -application/x-font-type1 pfa pfb pfm afm -application/font-woff woff -# application/x-font-vfont -application/x-freearc arc -application/x-futuresplash spl -application/x-gca-compressed gca -application/x-glulx ulx -application/x-gnumeric gnumeric -application/x-gramps-xml gramps -application/x-gtar gtar -# application/x-gzip -application/x-hdf hdf -application/x-install-instructions install -application/x-iso9660-image iso -application/x-java-jnlp-file jnlp -application/x-latex latex -application/x-lzh-compressed lzh lha -application/x-mie mie -application/x-mobipocket-ebook prc mobi -application/x-ms-application application -application/x-ms-shortcut lnk -application/x-ms-wmd wmd -application/x-ms-wmz wmz -application/x-ms-xbap xbap -application/x-msaccess mdb -application/x-msbinder obd -application/x-mscardfile crd -application/x-msclip clp -application/x-msdownload exe dll com bat msi -application/x-msmediaview mvb m13 m14 -application/x-msmetafile wmf wmz emf emz -application/x-msmoney mny -application/x-mspublisher pub -application/x-msschedule scd -application/x-msterminal trm -application/x-mswrite wri -application/x-netcdf nc cdf -application/x-nzb nzb -application/x-pkcs12 p12 pfx -application/x-pkcs7-certificates p7b spc -application/x-pkcs7-certreqresp p7r -application/x-rar-compressed rar -application/x-research-info-systems ris -application/x-sh sh -application/x-shar shar -application/x-shockwave-flash swf -application/x-silverlight-app xap -application/x-sql sql -application/x-stuffit sit -application/x-stuffitx sitx -application/x-subrip srt -application/x-sv4cpio sv4cpio -application/x-sv4crc sv4crc -application/x-t3vm-image t3 -application/x-tads gam -application/x-tar tar -application/x-tcl tcl -application/x-tex tex -application/x-tex-tfm tfm -application/x-texinfo texinfo texi -application/x-tgif obj -application/x-ustar ustar -application/x-wais-source src -application/x-x509-ca-cert der crt -application/x-xfig fig -application/x-xliff+xml xlf -application/x-xpinstall xpi -application/x-xz xz -application/x-zmachine z1 z2 z3 z4 z5 z6 z7 z8 -# application/x400-bp -application/xaml+xml xaml -# application/xcap-att+xml -# application/xcap-caps+xml -application/xcap-diff+xml xdf -# application/xcap-el+xml -# application/xcap-error+xml -# application/xcap-ns+xml -# application/xcon-conference-info-diff+xml -# application/xcon-conference-info+xml -application/xenc+xml xenc -application/xhtml+xml xhtml xht -# application/xhtml-voice+xml -application/xml xml xsl -application/xml-dtd dtd -# application/xml-external-parsed-entity -# application/xmpp+xml -application/xop+xml xop -application/xproc+xml xpl -application/xslt+xml xslt -application/xspf+xml xspf -application/xv+xml mxml xhvml xvml xvm -application/yang yang -application/yin+xml yin -application/zip zip -# audio/1d-interleaved-parityfec -# audio/32kadpcm -# audio/3gpp -# audio/3gpp2 -# audio/ac3 -audio/adpcm adp -# audio/amr -# audio/amr-wb -# audio/amr-wb+ -# audio/asc -# audio/atrac-advanced-lossless -# audio/atrac-x -# audio/atrac3 -audio/basic au snd -# audio/bv16 -# audio/bv32 -# audio/clearmode -# audio/cn -# audio/dat12 -# audio/dls -# audio/dsr-es201108 -# audio/dsr-es202050 -# audio/dsr-es202211 -# audio/dsr-es202212 -# audio/dv -# audio/dvi4 -# audio/eac3 -# audio/evrc -# audio/evrc-qcp -# audio/evrc0 -# audio/evrc1 -# audio/evrcb -# audio/evrcb0 -# audio/evrcb1 -# audio/evrcwb -# audio/evrcwb0 -# audio/evrcwb1 -# audio/example -# audio/fwdred -# audio/g719 -# audio/g722 -# audio/g7221 -# audio/g723 -# audio/g726-16 -# audio/g726-24 -# audio/g726-32 -# audio/g726-40 -# audio/g728 -# audio/g729 -# audio/g7291 -# audio/g729d -# audio/g729e -# audio/gsm -# audio/gsm-efr -# audio/gsm-hr-08 -# audio/ilbc -# audio/ip-mr_v2.5 -# audio/isac -# audio/l16 -# audio/l20 -# audio/l24 -# audio/l8 -# audio/lpc -audio/midi mid midi kar rmi -# audio/mobile-xmf -audio/mp4 mp4a -# audio/mp4a-latm -# audio/mpa -# audio/mpa-robust -audio/mpeg mpga mp2 mp2a mp3 m2a m3a -# audio/mpeg4-generic -# audio/musepack -audio/ogg oga ogg spx -# audio/opus -# audio/parityfec -# audio/pcma -# audio/pcma-wb -# audio/pcmu-wb -# audio/pcmu -# audio/prs.sid -# audio/qcelp -# audio/red -# audio/rtp-enc-aescm128 -# audio/rtp-midi -# audio/rtx -audio/s3m s3m -audio/silk sil -# audio/smv -# audio/smv0 -# audio/smv-qcp -# audio/sp-midi -# audio/speex -# audio/t140c -# audio/t38 -# audio/telephone-event -# audio/tone -# audio/uemclip -# audio/ulpfec -# audio/vdvi -# audio/vmr-wb -# audio/vnd.3gpp.iufp -# audio/vnd.4sb -# audio/vnd.audiokoz -# audio/vnd.celp -# audio/vnd.cisco.nse -# audio/vnd.cmles.radio-events -# audio/vnd.cns.anp1 -# audio/vnd.cns.inf1 -audio/vnd.dece.audio uva uvva -audio/vnd.digital-winds eol -# audio/vnd.dlna.adts -# audio/vnd.dolby.heaac.1 -# audio/vnd.dolby.heaac.2 -# audio/vnd.dolby.mlp -# audio/vnd.dolby.mps -# audio/vnd.dolby.pl2 -# audio/vnd.dolby.pl2x -# audio/vnd.dolby.pl2z -# audio/vnd.dolby.pulse.1 -audio/vnd.dra dra -audio/vnd.dts dts -audio/vnd.dts.hd dtshd -# audio/vnd.dvb.file -# audio/vnd.everad.plj -# audio/vnd.hns.audio -audio/vnd.lucent.voice lvp -audio/vnd.ms-playready.media.pya pya -# audio/vnd.nokia.mobile-xmf -# audio/vnd.nortel.vbk -audio/vnd.nuera.ecelp4800 ecelp4800 -audio/vnd.nuera.ecelp7470 ecelp7470 -audio/vnd.nuera.ecelp9600 ecelp9600 -# audio/vnd.octel.sbc -# audio/vnd.qcelp -# audio/vnd.rhetorex.32kadpcm -audio/vnd.rip rip -# audio/vnd.sealedmedia.softseal.mpeg -# audio/vnd.vmx.cvsd -# audio/vorbis -# audio/vorbis-config -audio/webm weba -audio/x-aac aac -audio/x-aiff aif aiff aifc -audio/x-caf caf -audio/x-flac flac -audio/x-matroska mka -audio/x-mpegurl m3u -audio/x-ms-wax wax -audio/x-ms-wma wma -audio/x-pn-realaudio ram ra -audio/x-pn-realaudio-plugin rmp -# audio/x-tta -audio/x-wav wav -audio/xm xm -chemical/x-cdx cdx -chemical/x-cif cif -chemical/x-cmdf cmdf -chemical/x-cml cml -chemical/x-csml csml -# chemical/x-pdb -chemical/x-xyz xyz -image/bmp bmp -image/cgm cgm -# image/example -# image/fits -image/g3fax g3 -image/gif gif -image/ief ief -# image/jp2 -image/jpeg jpeg jpg jpe -# image/jpm -# image/jpx -image/ktx ktx -# image/naplps -image/png png -image/prs.btif btif -# image/prs.pti -image/sgi sgi -image/svg+xml svg svgz -# image/t38 -image/tiff tiff tif -# image/tiff-fx -image/vnd.adobe.photoshop psd -# image/vnd.cns.inf2 -image/vnd.dece.graphic uvi uvvi uvg uvvg -image/vnd.dvb.subtitle sub -image/vnd.djvu djvu djv -image/vnd.dwg dwg -image/vnd.dxf dxf -image/vnd.fastbidsheet fbs -image/vnd.fpx fpx -image/vnd.fst fst -image/vnd.fujixerox.edmics-mmr mmr -image/vnd.fujixerox.edmics-rlc rlc -# image/vnd.globalgraphics.pgb -# image/vnd.microsoft.icon -# image/vnd.mix -image/vnd.ms-modi mdi -image/vnd.ms-photo wdp -image/vnd.net-fpx npx -# image/vnd.radiance -# image/vnd.sealed.png -# image/vnd.sealedmedia.softseal.gif -# image/vnd.sealedmedia.softseal.jpg -# image/vnd.svf -image/vnd.wap.wbmp wbmp -image/vnd.xiff xif -image/webp webp -image/x-3ds 3ds -image/x-cmu-raster ras -image/x-cmx cmx -image/x-freehand fh fhc fh4 fh5 fh7 -image/x-icon ico -image/x-mrsid-image sid -image/x-pcx pcx -image/x-pict pic pct -image/x-portable-anymap pnm -image/x-portable-bitmap pbm -image/x-portable-graymap pgm -image/x-portable-pixmap ppm -image/x-rgb rgb -image/x-tga tga -image/x-xbitmap xbm -image/x-xpixmap xpm -image/x-xwindowdump xwd -# message/cpim -# message/delivery-status -# message/disposition-notification -# message/example -# message/external-body -# message/feedback-report -# message/global -# message/global-delivery-status -# message/global-disposition-notification -# message/global-headers -# message/http -# message/imdn+xml -# message/news -# message/partial -message/rfc822 eml mime -# message/s-http -# message/sip -# message/sipfrag -# message/tracking-status -# message/vnd.si.simp -# model/example -model/iges igs iges -model/mesh msh mesh silo -model/vnd.collada+xml dae -model/vnd.dwf dwf -# model/vnd.flatland.3dml -model/vnd.gdl gdl -# model/vnd.gs-gdl -# model/vnd.gs.gdl -model/vnd.gtw gtw -# model/vnd.moml+xml -model/vnd.mts mts -# model/vnd.parasolid.transmit.binary -# model/vnd.parasolid.transmit.text -model/vnd.vtu vtu -model/vrml wrl vrml -model/x3d+binary x3db x3dbz -model/x3d+vrml x3dv x3dvz -model/x3d+xml x3d x3dz -# multipart/alternative -# multipart/appledouble -# multipart/byteranges -# multipart/digest -# multipart/encrypted -# multipart/example -# multipart/form-data -# multipart/header-set -# multipart/mixed -# multipart/parallel -# multipart/related -# multipart/report -# multipart/signed -# multipart/voice-message -# text/1d-interleaved-parityfec -text/cache-manifest appcache -text/calendar ics ifb -text/css css -text/csv csv -# text/directory -# text/dns -# text/ecmascript -# text/enriched -# text/example -# text/fwdred -text/html html htm -# text/javascript -text/n3 n3 -# text/parityfec -text/plain txt text conf def list log in -# text/prs.fallenstein.rst -text/prs.lines.tag dsc -# text/vnd.radisys.msml-basic-layout -# text/red -# text/rfc822-headers -text/richtext rtx -# text/rtf -# text/rtp-enc-aescm128 -# text/rtx -text/sgml sgml sgm -# text/t140 -text/tab-separated-values tsv -text/troff t tr roff man me ms -text/turtle ttl -# text/ulpfec -text/uri-list uri uris urls -text/vcard vcard -# text/vnd.abc -text/vnd.curl curl -text/vnd.curl.dcurl dcurl -text/vnd.curl.scurl scurl -text/vnd.curl.mcurl mcurl -# text/vnd.dmclientscript -text/vnd.dvb.subtitle sub -# text/vnd.esmertec.theme-descriptor -text/vnd.fly fly -text/vnd.fmi.flexstor flx -text/vnd.graphviz gv -text/vnd.in3d.3dml 3dml -text/vnd.in3d.spot spot -# text/vnd.iptc.newsml -# text/vnd.iptc.nitf -# text/vnd.latex-z -# text/vnd.motorola.reflex -# text/vnd.ms-mediapackage -# text/vnd.net2phone.commcenter.command -# text/vnd.si.uricatalogue -text/vnd.sun.j2me.app-descriptor jad -# text/vnd.trolltech.linguist -# text/vnd.wap.si -# text/vnd.wap.sl -text/vnd.wap.wml wml -text/vnd.wap.wmlscript wmls -text/x-asm s asm -text/x-c c cc cxx cpp h hh dic -text/x-fortran f for f77 f90 -text/x-java-source java -text/x-opml opml -text/x-pascal p pas -text/x-nfo nfo -text/x-setext etx -text/x-sfv sfv -text/x-uuencode uu -text/x-vcalendar vcs -text/x-vcard vcf -# text/xml -# text/xml-external-parsed-entity -# video/1d-interleaved-parityfec -video/3gpp 3gp -# video/3gpp-tt -video/3gpp2 3g2 -# video/bmpeg -# video/bt656 -# video/celb -# video/dv -# video/example -video/h261 h261 -video/h263 h263 -# video/h263-1998 -# video/h263-2000 -video/h264 h264 -# video/h264-rcdo -# video/h264-svc -video/jpeg jpgv -# video/jpeg2000 -video/jpm jpm jpgm -video/mj2 mj2 mjp2 -# video/mp1s -# video/mp2p -# video/mp2t -video/mp4 mp4 mp4v mpg4 -# video/mp4v-es -video/mpeg mpeg mpg mpe m1v m2v -# video/mpeg4-generic -# video/mpv -# video/nv -video/ogg ogv -# video/parityfec -# video/pointer -video/quicktime qt mov -# video/raw -# video/rtp-enc-aescm128 -# video/rtx -# video/smpte292m -# video/ulpfec -# video/vc1 -# video/vnd.cctv -video/vnd.dece.hd uvh uvvh -video/vnd.dece.mobile uvm uvvm -# video/vnd.dece.mp4 -video/vnd.dece.pd uvp uvvp -video/vnd.dece.sd uvs uvvs -video/vnd.dece.video uvv uvvv -# video/vnd.directv.mpeg -# video/vnd.directv.mpeg-tts -# video/vnd.dlna.mpeg-tts -video/vnd.dvb.file dvb -video/vnd.fvt fvt -# video/vnd.hns.video -# video/vnd.iptvforum.1dparityfec-1010 -# video/vnd.iptvforum.1dparityfec-2005 -# video/vnd.iptvforum.2dparityfec-1010 -# video/vnd.iptvforum.2dparityfec-2005 -# video/vnd.iptvforum.ttsavc -# video/vnd.iptvforum.ttsmpeg2 -# video/vnd.motorola.video -# video/vnd.motorola.videop -video/vnd.mpegurl mxu m4u -video/vnd.ms-playready.media.pyv pyv -# video/vnd.nokia.interleaved-multimedia -# video/vnd.nokia.videovoip -# video/vnd.objectvideo -# video/vnd.sealed.mpeg1 -# video/vnd.sealed.mpeg4 -# video/vnd.sealed.swf -# video/vnd.sealedmedia.softseal.mov -video/vnd.uvvu.mp4 uvu uvvu -video/vnd.vivo viv -video/webm webm -video/x-f4v f4v -video/x-fli fli -video/x-flv flv -video/x-m4v m4v -video/x-matroska mkv mk3d mks -video/x-mng mng -video/x-ms-asf asf asx -video/x-ms-vob vob -video/x-ms-wm wm -video/x-ms-wmv wmv -video/x-ms-wmx wmx -video/x-ms-wvx wvx -video/x-msvideo avi -video/x-sgi-movie movie -video/x-smv smv -x-conference/x-cooltalk ice diff --git a/node_modules/express/node_modules/send/node_modules/mime/types/node.types b/node_modules/express/node_modules/send/node_modules/mime/types/node.types deleted file mode 100644 index 55b2cf79..00000000 --- a/node_modules/express/node_modules/send/node_modules/mime/types/node.types +++ /dev/null @@ -1,77 +0,0 @@ -# What: WebVTT -# Why: To allow formats intended for marking up external text track resources. -# http://dev.w3.org/html5/webvtt/ -# Added by: niftylettuce -text/vtt vtt - -# What: Google Chrome Extension -# Why: To allow apps to (work) be served with the right content type header. -# http://codereview.chromium.org/2830017 -# Added by: niftylettuce -application/x-chrome-extension crx - -# What: HTC support -# Why: To properly render .htc files such as CSS3PIE -# Added by: niftylettuce -text/x-component htc - -# What: HTML5 application cache manifes ('.manifest' extension) -# Why: De-facto standard. Required by Mozilla browser when serving HTML5 apps -# per https://developer.mozilla.org/en/offline_resources_in_firefox -# Added by: louisremi -text/cache-manifest manifest - -# What: node binary buffer format -# Why: semi-standard extension w/in the node community -# Added by: tootallnate -application/octet-stream buffer - -# What: The "protected" MP-4 formats used by iTunes. -# Why: Required for streaming music to browsers (?) -# Added by: broofa -application/mp4 m4p -audio/mp4 m4a - -# What: Video format, Part of RFC1890 -# Why: See https://github.com/bentomas/node-mime/pull/6 -# Added by: mjrusso -video/MP2T ts - -# What: EventSource mime type -# Why: mime type of Server-Sent Events stream -# http://www.w3.org/TR/eventsource/#text-event-stream -# Added by: francois2metz -text/event-stream event-stream - -# What: Mozilla App manifest mime type -# Why: https://developer.mozilla.org/en/Apps/Manifest#Serving_manifests -# Added by: ednapiranha -application/x-web-app-manifest+json webapp - -# What: Lua file types -# Why: Googling around shows de-facto consensus on these -# Added by: creationix (Issue #45) -text/x-lua lua -application/x-lua-bytecode luac - -# What: Markdown files, as per http://daringfireball.net/projects/markdown/syntax -# Why: http://stackoverflow.com/questions/10701983/what-is-the-mime-type-for-markdown -# Added by: avoidwork -text/x-markdown markdown md mkd - -# What: ini files -# Why: because they're just text files -# Added by: Matthew Kastor -text/plain ini - -# What: DASH Adaptive Streaming manifest -# Why: https://developer.mozilla.org/en-US/docs/DASH_Adaptive_Streaming_for_HTML_5_Video -# Added by: eelcocramer -application/dash+xml mdp - -# What: OpenType font files - http://www.microsoft.com/typography/otspec/ -# Why: Browsers usually ignore the font MIME types and sniff the content, -# but Chrome, shows a warning if OpenType fonts aren't served with -# the `font/opentype` MIME type: http://i.imgur.com/8c5RN8M.png. -# Added by: alrra -font/opentype otf diff --git a/node_modules/express/node_modules/send/package.json b/node_modules/express/node_modules/send/package.json deleted file mode 100644 index 607f5806..00000000 --- a/node_modules/express/node_modules/send/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "send", - "version": "0.1.4", - "description": "Better streaming static file server with Range and conditional-GET support", - "keywords": [ - "static", - "file", - "server" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "dependencies": { - "debug": "*", - "mime": "~1.2.9", - "fresh": "0.2.0", - "range-parser": "0.0.4" - }, - "devDependencies": { - "mocha": "*", - "should": "*", - "supertest": "0.0.1", - "connect": "2.x" - }, - "scripts": { - "test": "make test" - }, - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/send.git" - }, - "main": "index", - "readme": "# send\n\n Send is Connect's `static()` extracted for generalized use, a streaming static file\n server supporting partial responses (Ranges), conditional-GET negotiation, high test coverage, and granular events which may be leveraged to take appropriate actions in your application or framework.\n\n## Installation\n\n $ npm install send\n\n## Examples\n\n Small:\n\n```js\nvar http = require('http');\nvar send = require('send');\n\nvar app = http.createServer(function(req, res){\n send(req, req.url).pipe(res);\n}).listen(3000);\n```\n\n Serving from a root directory with custom error-handling:\n\n```js\nvar http = require('http');\nvar send = require('send');\nvar url = require('url');\n\nvar app = http.createServer(function(req, res){\n // your custom error-handling logic:\n function error(err) {\n res.statusCode = err.status || 500;\n res.end(err.message);\n }\n\n // your custom directory handling logic:\n function redirect() {\n res.statusCode = 301;\n res.setHeader('Location', req.url + '/');\n res.end('Redirecting to ' + req.url + '/');\n }\n\n // transfer arbitrary files from within\n // /www/example.com/public/*\n send(req, url.parse(req.url).pathname)\n .root('/www/example.com/public')\n .on('error', error)\n .on('directory', redirect)\n .pipe(res);\n}).listen(3000);\n```\n\n## API\n\n### Events\n\n - `error` an error occurred `(err)`\n - `directory` a directory was requested\n - `file` a file was requested `(path, stat)`\n - `stream` file streaming has started `(stream)`\n - `end` streaming has completed\n\n### .root(dir)\n\n Serve files relative to `path`. Aliased as `.from(dir)`.\n\n### .index(path)\n\n By default send supports \"index.html\" files, to disable this\n invoke `.index(false)` or to supply a new index pass a string.\n\n### .maxage(ms)\n\n Provide a max-age in milliseconds for http caching, defaults to 0.\n\n### .hidden(bool)\n\n Enable or disable transfer of hidden files, defaults to false.\n\n## Error-handling\n\n By default when no `error` listeners are present an automatic response will be made, otherwise you have full control over the response, aka you may show a 5xx page etc.\n\n## Caching\n\n It does _not_ perform internal caching, you should use a reverse proxy cache such\n as Varnish for this, or those fancy things called CDNs. If your application is small enough that it would benefit from single-node memory caching, it's small enough that it does not need caching at all ;).\n\n## Debugging\n\n To enable `debug()` instrumentation output export __DEBUG__:\n\n```\n$ DEBUG=send node app\n```\n\n## Running tests\n\n```\n$ npm install\n$ make test\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/send/issues" - }, - "homepage": "https://github.com/visionmedia/send", - "_id": "send@0.1.4", - "dist": { - "shasum": "be70d8d1be01de61821af13780b50345a4f71abd" - }, - "_from": "send@0.1.4", - "_resolved": "https://registry.npmjs.org/send/-/send-0.1.4.tgz" -} diff --git a/node_modules/express/package.json b/node_modules/express/package.json deleted file mode 100644 index fc43276c..00000000 --- a/node_modules/express/package.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "name": "express", - "description": "Sinatra inspired web development framework", - "version": "3.4.8", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "contributors": [ - { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - { - "name": "Aaron Heckmann", - "email": "aaron.heckmann+github@gmail.com" - }, - { - "name": "Ciaran Jessup", - "email": "ciaranj@gmail.com" - }, - { - "name": "Guillermo Rauch", - "email": "rauchg@gmail.com" - } - ], - "dependencies": { - "connect": "2.12.0", - "commander": "1.3.2", - "range-parser": "0.0.4", - "mkdirp": "0.3.5", - "cookie": "0.1.0", - "buffer-crc32": "0.2.1", - "fresh": "0.2.0", - "methods": "0.1.0", - "send": "0.1.4", - "cookie-signature": "1.0.1", - "merge-descriptors": "0.0.1", - "debug": ">= 0.7.3 < 1" - }, - "devDependencies": { - "ejs": "~0.8.4", - "mocha": "~1.15.1", - "jade": "~0.30.0", - "hjs": "~0.0.6", - "stylus": "~0.40.0", - "should": "~2.1.1", - "connect-redis": "~1.4.5", - "marked": "0.2.10", - "supertest": "~0.8.1" - }, - "keywords": [ - "express", - "framework", - "sinatra", - "web", - "rest", - "restful", - "router", - "app", - "api" - ], - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/express" - }, - "main": "index", - "bin": { - "express": "./bin/express" - }, - "scripts": { - "prepublish": "npm prune", - "test": "make test" - }, - "engines": { - "node": ">= 0.8.0" - }, - "license": "MIT", - "readme": "[![express logo](http://f.cl.ly/items/0V2S1n0K1i3y1c122g04/Screen%20Shot%202012-04-11%20at%209.59.42%20AM.png)](http://expressjs.com/)\n\n Fast, unopinionated, minimalist web framework for [node](http://nodejs.org).\n\n [![Build Status](https://secure.travis-ci.org/visionmedia/express.png)](http://travis-ci.org/visionmedia/express) [![Gittip](http://img.shields.io/gittip/visionmedia.png)](https://www.gittip.com/visionmedia/)\n\n```js\nvar express = require('express');\nvar app = express();\n\napp.get('/', function(req, res){\n res.send('Hello World');\n});\n\napp.listen(3000);\n```\n\n## Installation\n\n $ npm install -g express\n\n## Quick Start\n\n The quickest way to get started with express is to utilize the executable `express(1)` to generate an application as shown below:\n\n Create the app:\n\n $ npm install -g express\n $ express /tmp/foo && cd /tmp/foo\n\n Install dependencies:\n\n $ npm install\n\n Start the server:\n\n $ node app\n\n## Features\n\n * Built on [Connect](http://github.com/senchalabs/connect)\n * Robust routing\n * HTTP helpers (redirection, caching, etc)\n * View system supporting 14+ template engines\n * Content negotiation\n * Focus on high performance\n * Environment based configuration\n * Executable for generating applications quickly\n * High test coverage\n\n## Philosophy\n\n The Express philosophy is to provide small, robust tooling for HTTP servers, making\n it a great solution for single page applications, web sites, hybrids, or public\n HTTP APIs.\n\n Built on Connect, you can use _only_ what you need, and nothing more. Applications\n can be as big or as small as you like, even a single file. Express does\n not force you to use any specific ORM or template engine. With support for over\n 14 template engines via [Consolidate.js](http://github.com/visionmedia/consolidate.js),\n you can quickly craft your perfect framework.\n\n## More Information\n\n * [Website and Documentation](http://expressjs.com/) stored at [visionmedia/expressjs.com](https://github.com/visionmedia/expressjs.com)\n * Join #express on freenode\n * [Google Group](http://groups.google.com/group/express-js) for discussion\n * Follow [tjholowaychuk](http://twitter.com/tjholowaychuk) on twitter for updates\n * Visit the [Wiki](http://github.com/visionmedia/express/wiki)\n * [Русскоязычная документация](http://jsman.ru/express/)\n * Run express examples [online](https://runnable.com/express)\n\n## Viewing Examples\n\nClone the Express repo, then install the dev dependencies to install all the example / test suite dependencies:\n\n $ git clone git://github.com/visionmedia/express.git --depth 1\n $ cd express\n $ npm install\n\nThen run whichever tests you want:\n\n $ node examples/content-negotiation\n\nYou can also view live examples here:\n\n\n\n## Running Tests\n\nTo run the test suite, first invoke the following command within the repo, installing the development dependencies:\n\n $ npm install\n\nThen run the tests:\n\n $ make test\n\n## Contributors\n\n https://github.com/visionmedia/express/graphs/contributors\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2009-2012 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/express/issues" - }, - "homepage": "https://github.com/visionmedia/express", - "_id": "express@3.4.8", - "dist": { - "shasum": "aa7a8986de07053337f4bc5ed9a6453d9cc8e2e1" - }, - "_from": "express@", - "_resolved": "https://registry.npmjs.org/express/-/express-3.4.8.tgz" -} diff --git a/node_modules/gulp-autoprefixer/.npmignore b/node_modules/gulp-autoprefixer/.npmignore deleted file mode 100644 index 40b878db..00000000 --- a/node_modules/gulp-autoprefixer/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/LICENSE b/node_modules/gulp-autoprefixer/LICENSE deleted file mode 100644 index 9b0f1756..00000000 --- a/node_modules/gulp-autoprefixer/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Michael Ostermann metrime@icloud.com - -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. \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/README.md b/node_modules/gulp-autoprefixer/README.md deleted file mode 100644 index ffeccb20..00000000 --- a/node_modules/gulp-autoprefixer/README.md +++ /dev/null @@ -1,21 +0,0 @@ -gulp-autoprefixer -=========== - -[Autoprefixer](https://github.com/ai/autoprefixer) for [gulp](https://github.com/wearefractal/gulp). - - var prefix = require('gulp-autoprefixer'); - - -Example -------- - - gulp.src('./css/*.css') - .pipe(prefix("last 1 version", "> 1%", "ie 8", "ie 7")) - .pipe(gulp.dest('./dist/')) - - - -License -------- - -MIT diff --git a/node_modules/gulp-autoprefixer/index.js b/node_modules/gulp-autoprefixer/index.js deleted file mode 100644 index 12c491e3..00000000 --- a/node_modules/gulp-autoprefixer/index.js +++ /dev/null @@ -1,58 +0,0 @@ -/* jshint node:true */ - -'use strict'; - -var prefix = require('autoprefixer'), - gutil = require('gulp-util'), - transform = require('stream').Transform, - bufferstreams = require('bufferstreams'), - - PLUGIN_NAME = 'gulp-autoprefixer'; - -function autoprefixerTransform(opts) { - // Returns a callback that handles the buffered content - return function(err, buffer, callback) { - if (err) { - callback(gutil.PluginError(PLUGIN_NAME, err)); - } - var prefixed = prefix(opts).process(String(buffer)).css; - callback(null, new Buffer(prefixed)); - }; -} - -function gulpautoprefixer() { - var stream = new transform({ objectMode: true }), - opts = arguments.length > 0 ? [].slice.call(arguments, 0) : ['> 1%','last 2 versions','ff 17','opera 12.1']; - stream._transform = function(file, unused, done) { - // Pass through if null - if (file.isNull()) { - stream.push(file); - done(); - return; - } - if (file.isStream()) { - try { - file.contents = file.contents.pipe(new bufferstreams(autoprefixerTransform(opts))); - } catch (err) { - err.fileName = file.path; - stream.emit('error', new gutil.PluginError('gulp-autoprefixer', err)); - } - stream.push(file); - done(); - } else { - try { - var prefixed = prefix(opts).process(String(file.contents)).css; - file.contents = new Buffer(prefixed); - } catch (err) { - err.fileName = file.path; - stream.emit('error', new gutil.PluginError('gulp-autoprefixer', err)); - } - stream.push(file); - done(); - } - }; - return stream; -} - -gulpautoprefixer.autoprefixerTransform = autoprefixerTransform; -module.exports = gulpautoprefixer; diff --git a/node_modules/gulp-autoprefixer/node_modules/.bin/autoprefixer b/node_modules/gulp-autoprefixer/node_modules/.bin/autoprefixer deleted file mode 120000 index e876d81c..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/.bin/autoprefixer +++ /dev/null @@ -1 +0,0 @@ -../autoprefixer/bin/autoprefixer \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/ChangeLog.md b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/ChangeLog.md deleted file mode 100644 index f7098f9c..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/ChangeLog.md +++ /dev/null @@ -1,276 +0,0 @@ -## 1.0 “Plus ultra” -* Source map support. -* Save origin indents and code formatting. -* Change CSS parser to PostCSS. -* Preserve vendor-prefixed properties put right after unprefixed ones. -* Rename compile() to process() and return result object, instead of CSS string. -* Rename inspect() to info(). -* Add in binary -d option to specify output directory. -* Binary now will not concat output files. -* Allow to select last versions for specified browser. -* Add full browser names aliases: `firefox`, `explorer` and `blackberry`. -* Ignore case in browser names. -* Change license to MIT. -* Add prefixes inside custom at-rules. -* Add only necessary prefixes to selector inside prefixed at-rule. -* Safer backgrounds list parser in gradient hack. -* Prefix @keyframes inside @media. -* Don’t prefix values for CSS3 PIE properties. -* Binary now shows file name in syntax error. -* Use browserify to build standalone version. - -### 20131225: -* Fix deprecated API convertor. -* Add ::placeholder support for Firefix >= 18. -* Fix vendor prefixes order. - -### 20140103: -* Add webkit prefix for sticky position. -* Update browsers popularity statistics. - -### 20140109: -* Add selectors and at-rules sections to debug info. -* Fix outdated prefixes cleaning. - -### 20140110: -* Add `Firefox ESR` browser requirement. -* Opera 18 is moved to released versions. -* Add Opera 20 data. - -### 20140117: -* Chrome 32 is moved to released versions. -* Add Opera 34 data. - -### 20140130: -* Fix flexbox properties names in transitions. -* Add Chrome 35 and Firefox 29 data. - -### 20140203: -* Android 4.4 stock browser and Opera 19 are moved to released versions. -* Add Opera 21 data. -* Update browsers usage statistics. - -### 20140213 -* Add case insensitive to IE’s filter hack (by Dominik Schilling). -* Improve selector prefixing in some rare cases (by Simon Lydell). -* Firefox 27 is moved to released versions. -* Add Firefox 30 data. - -## 0.8 “Unbowed, Unbent, Unbroken” -* Add more browsers to defaults ("> 1%, last 2 versions, ff 17, opera 12.1" - instead of just "last 2 browsers"). -* Keep vendor prefixes without unprefixed version (like vendor-specific hacks). -* Convert gradients to old WebKit syntax (actual for Android 2.3). -* Better support for several syntaxes with one prefix (like Flexbox and - gradients in WebKit). -* Add intrinsic and extrinsic sizing values support. -* Remove never existed prefixes from common mistakes (like -ms-transition). -* Add Opera 17 data. -* Fix selector prefixes order. -* Fix browser versions order in inspect. - -### 20130903: -* Fix old WebKit gradients convertor on rgba() colors. -* Allow to write old direction syntax in gradients. - -### 20130906: -* Fix direction syntax in radial gradients. -* Don’t prefix IE filter with modern syntax. - -### 20130911: -* Fix parsing property name with spaces. - -### 20130919: -* Fix processing custom framework prefixes (by Johannes J. Schmidt). -* Concat outputs if several files compiled to one output. -* Decrease standalone build size by removing unnecessary Binary class. -* iOS 7 is moved to released versions. -* Clean up binary code (by Simon Lydell). - -### 20130923: -* Firefox 24 is moved to released versions. - -### 20131001: -* Add support for grab, grabbing, zoom-in and zoom-out cursor values. - -### 20131006: -* Chrome 30 is moved to released versions. - -### 20131007: -* Don’t add another prefixes in rule with prefixed selector. - -### 20131009: -* Opera 17 is moved to released versions. - -### 20131015: -* Fix converting multiple gradients to old webkit syntax (by Aleksei Androsov). - -### 20131017: -* Fix @host at-rule parsing. - -### 20131020: -* IE 11 and Andrid 4.3 is moved to released versions. -* Add Opera 18 data. -* Add @namespace support. -* Sort browser versions in data file. - -### 20131029: -* Add Safari 6.1 data. -* Add fx alias for Firefox. - -### 20131104: -* Update Android future version to 4.4. -* Google Chrome 32 added to future versions list. -* Firefox 25 now is actual version, 27 and 28 added to future versions. -* Browsers statistics are updated. - -### 20131205: -* Google Chrome 33 added to future releases list. -* Google Chrome 31 moved to current releases list. - -### 20131209: -* Use old webkit gradients for old iOS and Safari (by Chad von Nau). -* Fix direction conversion for old webkit gradients (by Chad von Nau). -* Update browsers popularity statistics. - -### 20131213: -* Firefox ESR in default browsers was changed to 24 version. -* Firefox 26 was moved to current releases list. -* Firefox 28 was added to future releases list. - -## 0.7 “We Do Not Sow” -* Add vendor prefixes to selectors. -* Add ::selection and ::placeholder selectors support. -* Allow to load support data from Can I Use pull requests. -* Remove deprecated API. - -### 20130806: -* Add hyphens support. - -### 20130807: -* Add tab-size support. -* Add :fullscreen support. - -### 20130808: -* Allow to select browser versions by > and >= operator. -* Fix flex properties in transition. - -### 20130810: -* Add Firefox 25 data. - -### 20130824: -* Add Chrome 31 and 30 data. -* Fix CSS comments parsing (by vladkens). - -## 0.6 “As High As Honor” -* New faster API, which cache preprocessed data. Old API is deprecated. -* A lot of perfomance improvements. -* Add Opera 15 -webkit- prefix support. -* Update Chrome 29 and Safari 7 prefixes data. -* Add minor browsers in popularity select. -* Better syntax error messages. - -### 20130721: -* Add Chrome 30 data. - -### 20130728: -* Don’t remove non-standard -webkit-background-clip: text. -* Don’t remove IE hack on CSS parse. - -### 20130729: -* Add Opera 16 data. -* Fix “Invalid range in character class” error on Firefox. - -### 20130730: -* Fix correct clone comments inside keyframes (by Alexey Plutalov). -* Fix angle recalculation in gradients (by Roman Komarov). - -### 20130731: -* Add border-image support. - -## 0.5 “Ours is the Fury” -* Rewrite Autoprefixer to be more flexible. -* Use css, instead of Rework, to fix CSS parsing errors faster. -* Fix a lot of CSS parsing errors. - -### 20130616: -* More useful message for CSS parsing errors. -* Remove old WebKit gradient syntax. -* Fix parsing error on comment with braces. - -### 20130617: -* Remove old Mozilla border-radius. -* Don’t prefix old IE filter. -* Remove old background-clip, background-size and background-origin prefixes. -* Speed up regexps in values. -* Allow to hack property declarations. - -### 20130625: -* Convert flexbox properties to 2009 and 2012 specifications. -* Improve messages on syntax errors. - -### 20130626: -* Add Firefox 24 data. -* Add prefixes for font-feature-settings. - -### 20130629: -* Fix convert flex properties to old box-flex. - -## 0.4 “Winter Is Coming” -* Remove outdated prefixes. -* Add border-radius and box-shadow properties to database. -* Change degrees in webkit gradients. - -### 20130515: -* Add old syntax in gradient direction. -* Add old syntax for display: flex. -* Update browser global usage statistics. - -### 20130521: -* Add Firefox 23 data. - -### 20130524: -* Add Chrome 29 data. - -### 20130528: -* Fix compatibilty with Rework from git master. -* Add minor browsers to data, which can be selected only directly. - -### 20130530: -* Add Opera 15 and iOS 6.1 data. -* Fix iOS versions in properties and values data. - -### 20130603: -* Use latest Rework 0.15 with a lot of CSS parsing fixes. -* Update browsers usage statistics. - -## 0.3 “Growing Strong” -* Rename `autoprefixer.filter()` to `autoprefixer.rework()`. -* Use own filters instead of Rework’s `prefix` and `prefixValue`. -* Smarter value prefixer without false match “order” in “border”. -* 40% faster. -* Don’t add unnecessary properties instead of Rework’s `prefixValue`. -* Don’t change properties order. -* Sort properties and values in inspect output. -* Add main to component config (by Jonathan Ong). -* Fix documentation (by Sergey Leschina and Mark Vasilkov). - -### 20130424: -* Fix value override in prefixer. - -### 20130427: -* Prefix several same values in one property. -* Fix Windows support in binary. -* Improve print errors in binary. - -### 20130502: -* Don’t add -webkit- prefix to IE filter. -* Don’t duplicate prefixes on second run. - -## 0.2 “Hear Me Roar!” -* Update parse libraries. -* Use component package manager to build standalone script. -* Add inspect to standalone script. - -## 0.1 “Fire and Blood” -* Initial release. diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/LICENSE b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/LICENSE deleted file mode 100644 index da057b45..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright 2013 Andrey Sitnik - -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/node_modules/gulp-autoprefixer/node_modules/autoprefixer/README.md b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/README.md deleted file mode 100644 index 276ab1b2..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/README.md +++ /dev/null @@ -1,474 +0,0 @@ -# Autoprefixer - - - -Parse CSS and add vendor prefixes to CSS rules using values -from the [Can I Use](http://caniuse.com/). - -Write your CSS rules without vendor prefixes (in fact, forget about them -entirely): - -```css -:fullscreen a { - transition: transform 1s -} -``` - -Process your CSS by Autoprefixer: - -```js -var prefixed = autoprefixer.process(css).css; -``` - -It will use the data on current browser popularity and properties support -to apply prefixes for you: - -```css -:-webkit-full-screen a { - -webkit-transition: -webkit-transform 1s; - transition: transform 1s -} -:-moz-full-screen a { - transition: transform 1s -} -:-ms-fullscreen a { - transition: transform 1s -} -:fullscreen a { - -webkit-transition: -webkit-transform 1s; - transition: transform 1s -} -``` - -You can play with your CSS in [interactive demo] of Autoprefixer. - -Twitter account for news and releases: [@autoprefixer]. - -Sponsored by [Evil Martians]. Based on [PostCSS] framework. - -[interactive demo]: http://jsfiddle.net/simevidas/udyTs/show/light/ -[@autoprefixer]: https://twitter.com/autoprefixer -[Evil Martians]: http://evilmartians.com/ -[PostCSS]: https://github.com/ai/postcss - -## Features - -### Forget about prefixes - -The best tool is a tool you can't see and one that does the work for you. -This is the main idea behind Autoprefixer. - -Autoprefixer interface is simple: just forget about vendor prefixes -and write normal CSS according to latest W3C specs. You don’t need -a special language (like Sass) or special mixins. - -Because Autoprefixer is a postprocessor for CSS, -you can also use it with preprocessors, such as Sass, Stylus or LESS. - -### Actual data from Can I Use - -Autoprefixer uses the most recent data from [Can I Use](http://caniuse.com/), -understands which browsers are actual and popular and adds only the necessary -vendor prefixes. - -It also cleans your CSS from old prefixes (like prefixed `border-radius`, -produced by many CSS libraries): - -```css -a { - -webkit-border-radius: 5px; - border-radius: 5px -} -``` - -compiles to: - -```css -a { - border-radius: 5px -} -``` - -Note, that Autoprefixer doesn’t load Can I Use data every time. This data -is already packed to release, so with same Autoprefixer version you always will -have same output result. - -### Flexbox, Gradients, etc. - -Flexbox or gradients have different syntaxes in different browsers -(sometimes you need to recalculate angles, sometimes you need 2 old properties -instead of new one), but Autoprefixer hides this from you. - -Just code by latest W3C specs and Autoprefixer will produce the code -for old browsers: - -```css -a { - display: flex; -} -``` - -compiles to: - -```css -a { - display: -webkit-box; - display: -webkit-flex; - display: -moz-box; - display: -ms-flexbox; - display: flex -} -``` - -Autoprefixer has [22 special hacks] to fix browser’s differences. - -[22 special hacks]: https://github.com/ai/autoprefixer/tree/master/lib/hacks - -### Fast - -Autoprefixer is about 16 times faster than Compass and 8 times faster -than Stylus. - -On a Core i7 with 10 GB of RAM and SSD, benchmark with GitHub styles is: - -``` -~/Dev/autoprefixer$ ./node_modules/.bin/cake bench -Load GitHub styles -Autoprefixer: 489 ms -Compass: 4156 ms (8.5 times slower) -Stylus: 4165 ms (8.5 times slower) -``` - -Unlike [-prefix-free](http://leaverou.github.io/prefixfree/), Autoprefixer -compiles CSS once on deploy and doesn’t hit client-side performance. - -## Browsers - -You can specify the browsers you want to target in your project: - -```js -autoprefixer("last 1 version", "> 1%", "Explorer 7").process(css).css; -``` - -* `last 2 versions` is last versions for each browser. Like “last 2 versions” - [strategy](http://support.google.com/a/bin/answer.py?answer=33864) in - Google. -* `last 2 Chrome versions` is last versions of specify browser. -* `> 5%` is browser versions, selected by global usage statistics. -* `Firefox > 20` is Firefox newer versions than 20. -* `Firefox >= 20` is Firefox version 20 or newer. -* `Firefix ESR` is latest [Firefox ESR] version. -* `none` don’t set any browsers to clean CSS from any vendor prefixes. -* You can also set browsers directly. - -Blackberry and stock Android browsers will not be used in `last n versions`. -You can add them by name: - -```js -autoprefixer("last 1 version", "BlackBerry 10", "Android 4").process(css).css; -``` - -Browsers names (case insensitive): -* `Android` for old Android stock browser. -* `BlackBerry` or `bb` for Blackberry browser. -* `Chrome` for Google Chrome. -* `Firefox` or `ff` for Mozilla Firefox. -* `Explorer` or `ie` for Internet Explorer. -* `iOS` for iOS Safari. -* `Opera` for Opera. -* `Safari` for desktop Safari. - -By default, Autoprefixer uses `> 1%, last 2 versions, Firefox ESR, Opera 12.1`: -* Latest [Firefox ESR] is a 24 version. -* Opera 12.1 will be in list until Opera supports non-Blink 12.x branch. - -[Firefox ESR]: http://www.mozilla.org/en/firefox/organizations/faq/ - -## Source Map - -Autoprefixer will generate a source map if you set `map` option to `true`. - -You must set input and output CSS files paths (by `from` and `to` options) -to generate a correct map. - -```js -var result = autoprefixer.process(css, { - map: true, - from: 'main.css', - to: 'main.out.css' -}); - -result.css //=> Prefixed CSS -result.map //=> Source map content - -fs.writeFileSync('main.out.css.map', result.map); -``` - -Autoprefixer can also modify previous source map (for example, from Sass -compilation). Just set original source map content (as string or JS object) -to `map` option: - -```js -var result = autoprefixer.process(css, { - map: fs.readFileSync('main.sass.css.map'), - from: 'main.sass.css', - to: 'main.min.css' -}); - -result.map //=> Source map from main.sass to main.min.css -``` - -## Debug - -You can check which browsers are selected and which properties will be prefixed: - -```js -info = autoprefixer("last 1 version").info(); -console.log(info); -``` - -Or by CLI command: - -```sh -autoprefixer -i -``` - -## FAQ - -### Does it add polyfills for old browsers? - -No. Autoprefixer only adds prefixes, not polyfills. There are two reasons: - -1. Prefixes and polyfills are very different and need a different API. - Two separate libraries would be much better. -2. Most of IE polyfills are very bad for client perfomance. They use slow hacks - and old IEs is mostly used on old hardware. Most of CSS 3 features that is - only used for styling should be ignored in old IEs as it is recommended in - Graceful Degradation. - -### Why don’t gradients work in Firefox? - -Check that you use correct [direction syntax]. For example, you should use -`to bottom` instead of `top`: - -```css -a { - background: linear-gradient(to bottom, white, black) -} -``` - -Unfortunately, unprefixed gradients use different direction syntax, that most -of old gradients examples, so be careful and use always latest W3C specs with -Autoprefixer. - -[direction syntax]: https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient - -### Why doesn’t Autoprefixer add prefixes to `border-radius`? - -Developers are often surprised by how few prefixes are required today. -If Autoprefixer doesn’t add prefixes to your CSS, check if they’re still -required on [Can I Use](http://caniuse.com/). - -If a prefix is required, but Autoprefixer doesn’t add it or adds it -incorrectly, please -[report an issue](https://github.com/ai/autoprefixer/issues/new) -and include your source CSS and expected output. - -### Why doesn’t Autoprefixer support `appearance`? - -Unlike `transition`, the `appearance` property is not a part of -any specification. So there is no `appearance`, only `-moz-appearance` -and `-webkit-appearance`. Quote from [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-appearance): - -> Do not use this property on Web sites: not only is it non-standard, but its -> behavior changes from one browser to another. Even the keyword `none` does not -> have the same behavior on each form element across different browsers, and -> some do not support it at all. - -## Usage - -### Grunt - -You can use the -[grunt-autoprefixer](https://github.com/nDmitry/grunt-autoprefixer) -plugin for Grunt. Install the npm package and add it to Gruntfile: - -```js -grunt.loadNpmTasks('grunt-autoprefixer'); -``` - -### Compass - -If you use Compass binary to compile your styles, you can easily integrate -Autoprefixer with it. Install `autoprefixer-rails` gem: - -``` -gem install autoprefixer-rails -``` - -and add post-compile hook to `config.rb`: - -```ruby -require 'autoprefixer-rails' -require 'csso' - -on_stylesheet_saved do |file| - css = File.read(file) - File.open(file, 'w') do |io| - io << AutoprefixerRails.process(css) - end -end -``` - -You can set browsers array as second argument in `process` method: - -```ruby -io << AutoprefixerRails.process(css, ["last 1 version", "> 1%", "Explorer 7"]) -``` - -### Stylus - -If you use Stylus CLI, you can add Autoprefixer by -[autoprefixer-stylus](https://github.com/jenius/autoprefixer-stylus) plugin. - -Just install npm package and use it in `-u` option: - -``` -stylus -u autoprefixer-stylus file.css -``` - -### Ruby on Rails - -Add [autoprefixer-rails](https://github.com/ai/autoprefixer-rails) gem -to `Gemfile` and write CSS in a usual way: - -```ruby -gem "autoprefixer-rails" -``` - -### Ruby - -You can integrate Autoprefixer into your Sprockets environment -by `autoprefixer-rails` gem: - -```ruby -AutoprefixerRails.install(sprockets_env) -``` - -or process CSS from plain Ruby: - -```ruby -prefixed = AutoprefixerRails.compile(css) -``` - -### Prepros - -If you want to build your assets in GUI, try -[Prepros](http://alphapixels.com/prepros/). Just set “Auto Prefix CSS” -[checkbox](https://f.cloud.github.com/assets/3478693/930798/faa29892-0016-11e3-8901-87850de7aed2.jpg) -in right panel. - - - -### Mincer - -To use Autoprefixer in [Mincer](https://github.com/nodeca/mincer), -install `autoprefixer` npm package and enable it: - -```js -environment.enable('autoprefixer'); -``` - -### Middleman - -Add [middleman-autoprefixer](https://github.com/porada/middleman-autoprefixer) -gem to `Gemfile`: - -```ruby -gem "middleman-autoprefixer" -``` - -and activate the extension in your project’s `config.rb`: - -```ruby -activate :autoprefixer -``` - -### Node.js - -Use `autoprefixer` npm package: - -```js -var autoprefixer = require('autoprefixer'); -var css = 'a { transition: transform 1s }'; -var prefixed = autoprefixer.process(css).css; -``` - -### PHP - -You can use Autoprefixer in PHP by -[autoprefixer-php](https://github.com/vladkens/autoprefixer-php) library: - - -```php -$autoprefixer = new Autoprefixer(); -$css = 'a { transition: transform 1s }'; -$prefixed = $autoprefixer->compile($css); -``` - -### JavaScript - -You can use Autoprefixer in the browser or a non-Node.js runtime -with [standalone version](https://raw.github.com/ai/autoprefixer-rails/master/vendor/autoprefixer.js). - -### PostCSS - -Autoprefixer can be also used as a [PostCSS](https://github.com/ai/postcss) -processor, so you can combine it with other processors and parse CSS only once: - -```js -postcss(). - use( autoprefixer(['> 1%', 'opera 12.5']).postcss ). - use( compressor ). - process(css); -``` - -### Sublime Text - -You can process your styles directly in Sublime Text with the -[sublime-autoprefixer](https://github.com/sindresorhus/sublime-autoprefixer) -plugin. - -### Brackets - -Styles can processed automatically in Brackets using the -[brackets-autoprefixer](https://github.com/mikaeljorhult/brackets-autoprefixer) -extension. - - -### Others - -You can use the `autoprefixer` binary to process CSS files using -any assets manager: - -``` -sudo npm install --global autoprefixer -autoprefixer *.css -``` - -See `autoprefixer -h` for help. - -## In-package Update - -It’s highly recommended that you always use the latest version of Autoprefixer. -If by any chance you or your company are not able to update the package -(e.g. in case of long test periods before any library updates), you can still -update the very browser data that Autoprefixer fetches from Can I Use: - -``` -autoprefixer --update -``` - -Note that the in-package update doesn’t get any code fixes nor the -implementation of new features. It just keeps the browser popularity and -support data up to date, and adds new browser versions. diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/bin/autoprefixer b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/bin/autoprefixer deleted file mode 100755 index f98e533b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/bin/autoprefixer +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env node -(function() { - var Binary, binary; - - Binary = require('../lib/binary'); - - binary = new Binary(process); - - binary.run(function() { - return process.exit(binary.status); - }); - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/data/browsers.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/data/browsers.js deleted file mode 100644 index 9b80c63a..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/data/browsers.js +++ /dev/null @@ -1,50 +0,0 @@ -(function() { - module.exports = { - android: { - prefix: "-webkit-", - minor: true, - versions: [4.4, 4.3, 4.2, 4.1, 4, 3, 2.3, 2.2, 2.1], - popularity: [0.0894926, 0.74151, 0.74151, 2.29485, 1.0803, 0.00639233, 1.35517, 0.0831003, 0.0255693] - }, - bb: { - prefix: "-webkit-", - minor: true, - versions: [10, 7], - popularity: [0, 0.153316] - }, - chrome: { - prefix: "-webkit-", - future: [35, 34, 33], - versions: [32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4], - popularity: [15.5204, 15.3756, 0.411642, 0.480249, 0.274428, 0.312543, 0.221067, 0.121968, 0.068607, 0.083853, 0.121968, 0.480249, 0.045738, 0.038115, 0.099099, 0.030492, 0.038115, 0.068607, 0.045738, 0.053361, 0.060984, 0.121968, 0.038115, 0.015246, 0.022869, 0.022869, 0.030492, 0.022869, 0.022869] - }, - ff: { - prefix: "-moz-", - future: [30, 29, 28], - versions: [27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3.6, 3.5, 3, 2], - popularity: [0.472626, 11.9757, 0.411642, 0.266805, 0.15246, 0.137214, 0.15246, 0.114345, 0.106722, 0.099099, 0.137214, 0.160083, 0.099099, 0.07623, 0.083853, 0.175329, 0.07623, 0.106722, 0.045738, 0.068607, 0.030492, 0.045738, 0.038115, 0.060984, 0.251559, 0.038115, 0.091476, 0.015246] - }, - ie: { - prefix: "-ms-", - versions: [11, 10, 9, 8, 7, 6, 5.5], - popularity: [6.40778, 3.74183, 3.18016, 5.65625, 0.213593, 0.28479, 0.009298] - }, - ios: { - prefix: "-webkit-", - versions: [7, 6.1, 6, 5.1, 5, 4.3, 4.2, 4.1, 4, 3.2], - popularity: [4.18754, 0.4515445, 0.4515445, 0.1317005, 0.1317005, 0.01075105, 0.01075105, 0.00537555, 0.00537555, 0] - }, - opera: { - prefix: "-o-", - future: [21, 20], - versions: [19, 18, 17, 16, 15, 12.1, 12, 11.6, 11.5, 11.1, 11, 10.6, 10.5, 10.1, 10, 9.6, 9.5], - popularity: [0.038115, 0.358281, 0.030492, 0.022869, 0.015246, 0.419265, 0.038115, 0.030492, 0.015246, 0.008219, 0.008219, 0.007623, 0.008392, 0.007623, 0.007623, 0.0038115, 0.0038115] - }, - safari: { - prefix: "-webkit-", - versions: [7, 6.1, 6, 5.1, 5, 4, 3.2, 3.1], - popularity: [1.11296, 0.815661, 0.602217, 0.930006, 0.274428, 0.114345, 0.008692, 0] - } - }; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/data/prefixes.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/data/prefixes.js deleted file mode 100644 index 5c14021a..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/data/prefixes.js +++ /dev/null @@ -1,311 +0,0 @@ -(function() { - module.exports = { - "::placeholder": { - selector: true, - browsers: ["android 4.4", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 4 old", "ff 5 old", "ff 6 old", "ff 7 old", "ff 8 old", "ff 9 old", "ff 10 old", "ff 11 old", "ff 12 old", "ff 13 old", "ff 14 old", "ff 15 old", "ff 16 old", "ff 17 old", "ff 18 old", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ie 10", "ie 11", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - "::selection": { - selector: true, - browsers: ["ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30"] - }, - ":fullscreen": { - selector: true, - browsers: ["chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ie 11", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - "@keyframes": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - "align-content": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"] - }, - "align-items": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"] - }, - "align-self": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"] - }, - animation: { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - "animation-delay": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - "animation-direction": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - "animation-duration": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - "animation-fill-mode": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - "animation-iteration-count": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - "animation-name": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - "animation-play-state": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - "animation-timing-function": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - "backface-visibility": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ie 9", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 10.5", "opera 10.6", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - "background-clip": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "ff 3.6", "opera 10", "opera 10.1"] - }, - "background-origin": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "ff 3.6", "opera 10", "opera 10.1"] - }, - "background-size": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "ff 3.6", "opera 10", "opera 10.1"] - }, - "border-bottom-left-radius": { - mistakes: ["-ms-"], - browsers: ["android 2.1", "chrome 4", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ios 3.2", "safari 3.1", "safari 3.2", "safari 4"], - transition: true - }, - "border-bottom-right-radius": { - mistakes: ["-ms-"], - browsers: ["android 2.1", "chrome 4", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ios 3.2", "safari 3.1", "safari 3.2", "safari 4"], - transition: true - }, - "border-image": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "opera 12.1", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1"] - }, - "border-radius": { - mistakes: ["-ms-"], - browsers: ["android 2.1", "chrome 4", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ios 3.2", "safari 3.1", "safari 3.2", "safari 4"], - transition: true - }, - "border-top-left-radius": { - mistakes: ["-ms-"], - browsers: ["android 2.1", "chrome 4", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ios 3.2", "safari 3.1", "safari 3.2", "safari 4"], - transition: true - }, - "border-top-right-radius": { - mistakes: ["-ms-"], - browsers: ["android 2.1", "chrome 4", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ios 3.2", "safari 3.1", "safari 3.2", "safari 4"], - transition: true - }, - "box-shadow": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "bb 7", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "ff 3.5", "ff 3.6", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "safari 3.1", "safari 3.2", "safari 4", "safari 5"], - transition: true - }, - "box-sizing": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "bb 7", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "safari 3.1", "safari 3.2", "safari 4", "safari 5"] - }, - "break-after": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - "break-before": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - "break-inside": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - calc: { - props: ["*"], - browsers: ["bb 10", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 6", "ios 6.1", "safari 6"] - }, - "column-count": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - "column-fill": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - "column-gap": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"], - transition: true - }, - "column-rule": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"], - transition: true - }, - "column-rule-color": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"], - transition: true - }, - "column-rule-style": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - "column-rule-width": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"], - transition: true - }, - "column-span": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - "column-width": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"], - transition: true - }, - columns: { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"], - transition: true - }, - "display-flex": { - props: ["display"], - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"] - }, - "fill-available": { - props: ["width", "min-width", "max-width", "height", "min-height", "max-height"], - browsers: ["android 4.4", "bb 10", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 6.1", "safari 7"] - }, - filter: { - browsers: ["android 4.4", "bb 10", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 6", "safari 6.1", "safari 7"], - transition: true - }, - "fit-content": { - props: ["width", "min-width", "max-width", "height", "min-height", "max-height"], - browsers: ["android 4.4", "bb 10", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 6.1", "safari 7"] - }, - flex: { - transition: true, - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"] - }, - "flex-basis": { - transition: true, - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"] - }, - "flex-direction": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"] - }, - "flex-flow": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"] - }, - "flex-grow": { - transition: true, - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"] - }, - "flex-shrink": { - transition: true, - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"] - }, - "flex-wrap": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"] - }, - "font-feature-settings": { - browsers: ["android 4.4", "bb 10", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 6.1", "safari 7"] - }, - "font-kerning": { - browsers: ["android 4.4", "bb 10", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 6.1", "safari 7"] - }, - "font-language-override": { - browsers: ["android 4.4", "bb 10", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 6.1", "safari 7"] - }, - "font-variant-ligatures": { - browsers: ["android 4.4", "bb 10", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 6.1", "safari 7"] - }, - grab: { - props: ["cursor"], - browsers: ["chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - grabbing: { - props: ["cursor"], - browsers: ["chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - hyphens: { - browsers: ["ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ie 10", "ie 11", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - "inline-flex": { - props: ["display"], - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"] - }, - "justify-content": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"] - }, - "linear-gradient": { - props: ["background", "background-image", "border-image"], - mistakes: ["-ms-"], - browsers: ["android 2.1 old", "android 2.2 old", "android 2.3 old", "android 3 old", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2 old", "ios 4 old", "ios 4.1 old", "ios 4.2 old", "ios 4.3 old", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "safari 4 old", "safari 5 old", "safari 5.1", "safari 6"] - }, - "max-content": { - props: ["width", "min-width", "max-width", "height", "min-height", "max-height"], - browsers: ["android 4.4", "bb 10", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 6.1", "safari 7"] - }, - "min-content": { - props: ["width", "min-width", "max-width", "height", "min-height", "max-height"], - browsers: ["android 4.4", "bb 10", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 6.1", "safari 7"] - }, - order: { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"] - }, - perspective: { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ie 9", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 10.5", "opera 10.6", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"], - transition: true - }, - "perspective-origin": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ie 9", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 10.5", "opera 10.6", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"], - transition: true - }, - "radial-gradient": { - props: ["background", "background-image", "border-image"], - mistakes: ["-ms-"], - browsers: ["android 2.1 old", "android 2.2 old", "android 2.3 old", "android 3 old", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2 old", "ios 4 old", "ios 4.1 old", "ios 4.2 old", "ios 4.3 old", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "safari 4 old", "safari 5 old", "safari 5.1", "safari 6"] - }, - "repeating-linear-gradient": { - props: ["background", "background-image", "border-image"], - mistakes: ["-ms-"], - browsers: ["android 2.1 old", "android 2.2 old", "android 2.3 old", "android 3 old", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2 old", "ios 4 old", "ios 4.1 old", "ios 4.2 old", "ios 4.3 old", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "safari 4 old", "safari 5 old", "safari 5.1", "safari 6"] - }, - "repeating-radial-gradient": { - props: ["background", "background-image", "border-image"], - mistakes: ["-ms-"], - browsers: ["android 2.1 old", "android 2.2 old", "android 2.3 old", "android 3 old", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2 old", "ios 4 old", "ios 4.1 old", "ios 4.2 old", "ios 4.3 old", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "safari 4 old", "safari 5 old", "safari 5.1", "safari 6"] - }, - sticky: { - props: ["position"], - browsers: ["ios 6", "ios 6.1", "ios 7", "safari 6.1", "safari 7"] - }, - "tab-size": { - browsers: ["ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "opera 10.6", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "opera 12.1"] - }, - transform: { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ie 9", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 10.5", "opera 10.6", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"], - transition: true - }, - "transform-origin": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ie 9", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 10.5", "opera 10.6", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"], - transition: true - }, - "transform-style": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ie 9", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 10.5", "opera 10.6", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - transition: { - mistakes: ["-ms-"], - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "opera 10.5", "opera 10.6", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6"] - }, - "transition-delay": { - mistakes: ["-ms-"], - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "opera 10.5", "opera 10.6", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6"] - }, - "transition-duration": { - mistakes: ["-ms-"], - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "opera 10.5", "opera 10.6", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6"] - }, - "transition-property": { - mistakes: ["-ms-"], - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "opera 10.5", "opera 10.6", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6"] - }, - "transition-timing-function": { - mistakes: ["-ms-"], - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "opera 10.5", "opera 10.6", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6"] - }, - "user-select": { - browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ie 10", "ie 11", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - "zoom-in": { - props: ["cursor"], - browsers: ["chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - }, - "zoom-out": { - props: ["cursor"], - browsers: ["chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"] - } - }; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/autoprefixer.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/autoprefixer.js deleted file mode 100644 index cbbf547b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/autoprefixer.js +++ /dev/null @@ -1,117 +0,0 @@ -(function() { - var Autoprefixer, Browsers, Prefixes, autoprefixer, infoCache, postcss, - __slice = [].slice, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; - - postcss = require('postcss'); - - Browsers = require('./browsers'); - - Prefixes = require('./prefixes'); - - infoCache = null; - - autoprefixer = function() { - var browsers, prefixes, reqs; - reqs = 1 <= arguments.length ? __slice.call(arguments, 0) : []; - if (reqs.length === 1 && reqs[0] instanceof Array) { - reqs = reqs[0]; - } else if (reqs.length === 0 || (reqs.length === 1 && (reqs[0] == null))) { - reqs = void 0; - } - if (reqs == null) { - reqs = autoprefixer["default"]; - } - browsers = new Browsers(autoprefixer.data.browsers, reqs); - prefixes = new Prefixes(autoprefixer.data.prefixes, browsers); - return new Autoprefixer(prefixes, autoprefixer.data); - }; - - autoprefixer.data = { - browsers: require('../data/browsers'), - prefixes: require('../data/prefixes') - }; - - Autoprefixer = (function() { - function Autoprefixer(prefixes, data) { - this.prefixes = prefixes; - this.data = data; - this.postcss = __bind(this.postcss, this); - this.browsers = this.prefixes.browsers.selected; - } - - Autoprefixer.prototype.process = function(str, options) { - if (options == null) { - options = {}; - } - return this.processor().process(str, options); - }; - - Autoprefixer.prototype.compile = function(str, options) { - var fixed, name, value; - if (options == null) { - options = {}; - } - fixed = {}; - for (name in options) { - value = options[name]; - if (name === 'file') { - name = 'from'; - } - fixed[name] = value; - } - if (typeof console !== "undefined" && console !== null) { - console.warn('autoprefixer: replace compile() to process(). ' + 'Method compile() is deprecated and will be removed in 1.1.'); - } - return this.process(str, fixed).css; - }; - - Autoprefixer.prototype.postcss = function(css) { - this.prefixes.processor.remove(css); - return this.prefixes.processor.add(css); - }; - - Autoprefixer.prototype.info = function() { - infoCache || (infoCache = require('./info')); - return infoCache(this.prefixes); - }; - - Autoprefixer.prototype.processor = function() { - return this.processorCache || (this.processorCache = postcss(this.postcss)); - }; - - return Autoprefixer; - - })(); - - autoprefixer["default"] = ['> 1%', 'last 2 versions', 'Firefox ESR', 'Opera 12.1']; - - autoprefixer.loadDefault = function() { - return this.defaultCache || (this.defaultCache = autoprefixer(this["default"])); - }; - - autoprefixer.process = function(str, options) { - if (options == null) { - options = {}; - } - return this.loadDefault().process(str, options); - }; - - autoprefixer.compile = function(str, options) { - if (options == null) { - options = {}; - } - return this.loadDefault().compile(str, options); - }; - - autoprefixer.postcss = function(css) { - return this.loadDefault().postcss(css); - }; - - autoprefixer.info = function() { - return this.loadDefault().info(); - }; - - module.exports = autoprefixer; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/binary.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/binary.js deleted file mode 100644 index 6c6bf271..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/binary.js +++ /dev/null @@ -1,326 +0,0 @@ -(function() { - var Binary, autoprefixer, fs, path; - - autoprefixer = require('./autoprefixer'); - - path = require('path'); - - fs = require('fs-extra'); - - Binary = (function() { - function Binary(process) { - this["arguments"] = process.argv.slice(2); - this.stdin = process.stdin; - this.stderr = process.stderr; - this.stdout = process.stdout; - this.status = 0; - this.command = 'compile'; - this.inputFiles = []; - this.parseArguments(); - } - - Binary.prototype.help = function() { - return 'Usage: autoprefixer [OPTION...] FILES\n\nParse CSS files and add prefixed properties and values.\n\nOptions:\n -b, --browsers BROWSERS add prefixes for selected browsers\n -o, --output FILE set output file\n -d, --dir DIR set output dir\n -m, --map generate source map\n -i, --info show selected browsers and properties\n -h, --help show help text\n -v, --version print program version'; - }; - - Binary.prototype.desc = function() { - return 'Files:\n If you didn\'t set input files, autoprefixer will read from stdin stream.\n\n By default, prefixed CSS will rewrite original files.\n\n You can specify output file or directory by `-o` argument.\n For several input files you can specify only output directory by `-d`.\n\n Output CSS will be written to stdout stream on `-o -\' argument or stdin input.\n\nSource maps:\n On `-m` argument Autoprefixer will generate source map for changes near\n output CSS (for out/main.css it generates out/main.css.map).\n\n If previous source map will be near input files (for example, in/main.css\n and in/main.css.map) Autoprefixer will apply previous map to output\n source map.\n\nBrowsers:\n Separate browsers by comma. For example, `-b "> 1%, opera 12"\'.\n You can set browsers by global usage statictics: `-b \"> 1%\"\'.\n or last version: `-b "last 2 versions"\'.'; - }; - - Binary.prototype.print = function(str) { - str = str.replace(/\n$/, ''); - return this.stdout.write(str + "\n"); - }; - - Binary.prototype.error = function(str) { - this.status = 1; - return this.stderr.write(str + "\n"); - }; - - Binary.prototype.version = function() { - return require('../package.json').version; - }; - - Binary.prototype.parseArguments = function() { - var arg, args; - args = this["arguments"].slice(); - while (args.length > 0) { - arg = args.shift(); - switch (arg) { - case '-h': - case '--help': - this.command = 'showHelp'; - break; - case '-v': - case '--version': - this.command = 'showVersion'; - break; - case '-i': - case '--info': - this.command = 'info'; - break; - case '-u': - case '--update': - this.command = 'update'; - break; - case '-m': - case '--map': - this.sourceMap = true; - break; - case '-b': - case '--browsers': - this.requirements = args.shift().split(',').map(function(i) { - return i.trim(); - }); - break; - case '-o': - case '--output': - this.outputFile = args.shift(); - break; - case '-d': - case '--dir': - this.outputDir = args.shift(); - break; - default: - if (arg.match(/^-\w$/) || arg.match(/^--\w[\w-]+$/)) { - this.command = void 0; - this.error("autoprefixer: Unknown argument " + arg); - this.error(''); - this.error(this.help()); - } else { - this.inputFiles.push(arg); - } - } - } - }; - - Binary.prototype.showHelp = function(done) { - this.print(this.help()); - this.print(''); - this.print(this.desc()); - return done(); - }; - - Binary.prototype.showVersion = function(done) { - this.print("autoprefixer " + (this.version())); - return done(); - }; - - Binary.prototype.info = function(done) { - this.print(this.compiler().info()); - return done(); - }; - - Binary.prototype.update = function(done) { - var coffee, updater; - try { - coffee = require('coffee-script'); - } catch (_error) { - this.error("Install coffee-script npm package"); - return done(); - } - updater = require('./updater'); - updater.request((function(_this) { - return function() { - return _this.stdout.write('.'); - }; - })(this)); - updater.done((function(_this) { - return function() { - _this.print(''); - if (updater.changed.length === 0) { - _this.print('Everything up-to-date'); - } else { - _this.print("Update " + (updater.changed.join(' and ')) + " data"); - } - return done(); - }; - })(this)); - return updater.run(); - }; - - Binary.prototype.startWork = function() { - return this.waiting += 1; - }; - - Binary.prototype.endWork = function() { - this.waiting -= 1; - if (this.waiting <= 0) { - return this.doneCallback(); - } - }; - - Binary.prototype.workError = function(str) { - this.error(str); - return this.endWork(); - }; - - Binary.prototype.compiler = function() { - return this.compilerCache || (this.compilerCache = autoprefixer(this.requirements)); - }; - - Binary.prototype.compileCSS = function(css, output, input) { - var error, opts, result; - opts = {}; - if (input) { - opts.from = input; - } - if (output !== '-') { - opts.to = output; - } - if (this.sourceMap) { - opts.map = true; - } - if (opts.map && input && fs.existsSync(input + '.map')) { - opts.map = fs.readFileSync(input + '.map').toString(); - } - try { - result = this.compiler().process(css, opts); - } catch (_error) { - error = _error; - if (error.autoprefixer || error.message.match(/^Can't parse CSS/)) { - this.error("autoprefixer: " + error.message); - } else { - this.error('autoprefixer: Internal error'); - } - if (error.css || !error.autoprefixer) { - if (error.stack != null) { - this.error(''); - this.error(error.stack); - } - } - } - if (result == null) { - return this.endWork(); - } - if (output === '-') { - this.print(result.css); - return this.endWork(); - } else { - return fs.outputFile(output, result.css, (function(_this) { - return function(error) { - if (error) { - _this.error("autoprefixer: " + error); - } - if (result.map) { - return fs.writeFile(output + '.map', result.map, function(error) { - if (error) { - _this.error("autoprefixer: " + error); - } - return _this.endWork(); - }); - } else { - return _this.endWork(); - } - }; - })(this)); - } - }; - - Binary.prototype.files = function() { - var file, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results, _results1, _results2; - if (this.inputFiles.length === 0) { - this.outputFile || (this.outputFile = '-'); - } - if (this.outputDir) { - if (this.inputFiles.length === 0) { - this.error("autoprefixer: For STDIN input you need to specify output file (by `-o FILE`),\nnot output dir"); - return; - } - if (fs.existsSync(this.outputDir) && !fs.statSync(this.outputDir).isDirectory()) { - this.error("autoprefixer: Path " + this.outputDir + " is a file, not directory"); - return; - } - _ref = this.inputFiles; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - _results.push([file, path.join(this.outputDir, path.basename(file))]); - } - return _results; - } else if (this.outputFile) { - if (this.inputFiles.length > 1) { - this.error("autoprefixer: For several files you can specify only output dir (by `-d DIR`),\nnot one output file"); - return; - } - _ref1 = this.inputFiles; - _results1 = []; - for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - file = _ref1[_j]; - _results1.push([file, this.outputFile]); - } - return _results1; - } else { - _ref2 = this.inputFiles; - _results2 = []; - for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { - file = _ref2[_k]; - _results2.push([file, file]); - } - return _results2; - } - }; - - Binary.prototype.compile = function(done) { - var css, file, files, input, output, _fn, _i, _j, _len, _len1, _ref; - this.waiting = 0; - this.doneCallback = done; - files = this.files(); - if (!files) { - return done(); - } - if (files.length === 0) { - this.startWork(); - css = ''; - this.stdin.resume(); - this.stdin.on('data', function(chunk) { - return css += chunk; - }); - return this.stdin.on('end', (function(_this) { - return function() { - return _this.compileCSS(css, _this.outputFile); - }; - })(this)); - } else { - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - this.startWork(); - } - _fn = (function(_this) { - return function(input, output) { - return fs.readFile(input, function(error, css) { - if (error) { - return _this.workError("autoprefixer: " + error.message); - } else { - return _this.compileCSS(css, output, input); - } - }); - }; - })(this); - for (_j = 0, _len1 = files.length; _j < _len1; _j++) { - _ref = files[_j], input = _ref[0], output = _ref[1]; - if (!fs.existsSync(input)) { - this.workError("autoprefixer: File " + input + " doesn't exists"); - continue; - } - _fn(input, output); - } - return false; - } - }; - - Binary.prototype.run = function(done) { - if (this.command) { - return this[this.command](done); - } else { - return done(); - } - }; - - return Binary; - - })(); - - module.exports = Binary; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/browsers.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/browsers.js deleted file mode 100644 index a8b8b3c5..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/browsers.js +++ /dev/null @@ -1,190 +0,0 @@ -(function() { - var Browsers, utils; - - utils = require('./utils'); - - Browsers = (function() { - Browsers.prefixes = function() { - var data, i, name; - if (this.prefixesCache) { - return this.prefixesCache; - } - data = require('../data/browsers'); - return this.prefixesCache = utils.uniq((function() { - var _results; - _results = []; - for (name in data) { - i = data[name]; - _results.push(i.prefix); - } - return _results; - })()).sort(function(a, b) { - return b.length - a.length; - }); - }; - - function Browsers(data, requirements) { - this.data = data; - this.selected = this.parse(requirements); - } - - Browsers.prototype.parse = function(requirements) { - var selected; - if (!(requirements instanceof Array)) { - requirements = [requirements]; - } - selected = []; - requirements.map((function(_this) { - return function(req) { - var i, match, name, _ref; - _ref = _this.requirements; - for (name in _ref) { - i = _ref[name]; - if (match = req.match(i.regexp)) { - selected = selected.concat(i.select.apply(_this, match.slice(1))); - return; - } - } - return utils.error("Unknown browser requirement `" + req + "`"); - }; - })(this)); - return utils.uniq(selected); - }; - - Browsers.prototype.aliases = { - fx: 'ff', - firefox: 'ff', - explorer: 'ie', - blackberry: 'bb' - }; - - Browsers.prototype.requirements = { - none: { - regexp: /^none$/i, - select: function() { - return []; - } - }, - lastVersions: { - regexp: /^last (\d+) versions?$/i, - select: function(versions) { - return this.browsers(function(data) { - if (data.minor) { - return []; - } else { - return data.versions.slice(0, versions); - } - }); - } - }, - lastByBrowser: { - regexp: /^last (\d+) (\w+) versions?$/i, - select: function(versions, browser) { - var data; - data = this.byName(browser); - return data.versions.slice(0, versions).map(function(v) { - return "" + data.name + " " + v; - }); - } - }, - globalStatistics: { - regexp: /^> (\d+(\.\d+)?)%$/, - select: function(popularity) { - return this.browsers(function(data) { - return data.versions.filter(function(version, i) { - return data.popularity[i] > popularity; - }); - }); - } - }, - newerThen: { - regexp: /^(\w+) (>=?)\s*([\d\.]+)/, - select: function(browser, sign, version) { - var data, filter; - data = this.byName(browser); - version = parseFloat(version); - if (sign === '>') { - filter = function(v) { - return v > version; - }; - } else if (sign === '>=') { - filter = function(v) { - return v >= version; - }; - } - return data.versions.filter(filter).map(function(v) { - return "" + data.name + " " + v; - }); - } - }, - esr: { - regexp: /^(firefox|ff|fx) esr$/i, - select: function() { - return ['ff 24']; - } - }, - direct: { - regexp: /^(\w+) ([\d\.]+)$/, - select: function(browser, version) { - var data, first, last; - data = this.byName(browser); - version = parseFloat(version); - last = data.future ? data.future[0] : data.versions[0]; - first = data.versions[data.versions.length - 1]; - if (version > last) { - version = last; - } else if (version < first) { - version = first; - } - return ["" + data.name + " " + version]; - } - } - }; - - Browsers.prototype.browsers = function(criteria) { - var browser, data, selected, versions, _ref; - selected = []; - _ref = this.data; - for (browser in _ref) { - data = _ref[browser]; - versions = criteria(data).map(function(version) { - return "" + browser + " " + version; - }); - selected = selected.concat(versions); - } - return selected; - }; - - Browsers.prototype.prefix = function(browser) { - var name, version, _ref; - _ref = browser.split(' '), name = _ref[0], version = _ref[1]; - if (name === 'opera' && parseFloat(version) >= 15) { - return '-webkit-'; - } else { - return this.data[name].prefix; - } - }; - - Browsers.prototype.isSelected = function(browser) { - return this.selected.indexOf(browser) !== -1; - }; - - Browsers.prototype.byName = function(name) { - var data; - name = name.toLowerCase(); - name = this.aliases[name] || name; - data = this.data[name]; - if (!data) { - utils.error("Unknown browser " + browser); - } - data.name = name; - return data; - }; - - return Browsers; - - })(); - - module.exports = Browsers; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/declaration.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/declaration.js deleted file mode 100644 index 439a9050..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/declaration.js +++ /dev/null @@ -1,81 +0,0 @@ -(function() { - var Browsers, Declaration, Prefixer, vendor, - __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; }; - - Prefixer = require('./prefixer'); - - Browsers = require('./browsers'); - - vendor = require('postcss/lib/vendor'); - - Declaration = (function(_super) { - __extends(Declaration, _super); - - function Declaration() { - return Declaration.__super__.constructor.apply(this, arguments); - } - - Declaration.prototype.check = function(decl) { - return true; - }; - - Declaration.prototype.prefixed = function(prop, prefix) { - return prefix + prop; - }; - - Declaration.prototype.normalize = function(prop) { - return prop; - }; - - Declaration.prototype.otherPrefixes = function(value, prefix) { - var other, _i, _len, _ref; - _ref = Browsers.prefixes(); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - other = _ref[_i]; - if (other === prefix) { - continue; - } - if (value.indexOf(other) !== -1) { - return true; - } - } - return false; - }; - - Declaration.prototype.set = function(decl, prefix) { - decl.prop = this.prefixed(decl.prop, prefix); - return decl; - }; - - Declaration.prototype.insert = function(decl, prefix) { - var cloned; - cloned = this.set(this.clone(decl), prefix); - if (cloned) { - return decl.parent.insertBefore(decl, cloned); - } - }; - - Declaration.prototype.add = function(decl, prefix) { - var already, prefixed; - prefixed = this.prefixed(decl.prop, prefix); - already = this.all.group(decl).up(function(i) { - return i.prop === prefixed; - }); - if (already || this.otherPrefixes(decl.value, prefix)) { - return; - } - return this.insert(decl, prefix); - }; - - Declaration.prototype.old = function(prop, prefix) { - return [this.prefixed(prop, prefix)]; - }; - - return Declaration; - - })(Prefixer); - - module.exports = Declaration; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/align-content.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/align-content.js deleted file mode 100644 index 74885370..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/align-content.js +++ /dev/null @@ -1,57 +0,0 @@ -(function() { - var AlignContent, Declaration, flexSpec, - __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; }; - - flexSpec = require('./flex-spec'); - - Declaration = require('../declaration'); - - AlignContent = (function(_super) { - __extends(AlignContent, _super); - - function AlignContent() { - return AlignContent.__super__.constructor.apply(this, arguments); - } - - AlignContent.names = ['align-content', 'flex-line-pack']; - - AlignContent.oldValues = { - 'flex-end': 'end', - 'flex-start': 'start', - 'space-between': 'justify', - 'space-around': 'distribute' - }; - - AlignContent.prototype.prefixed = function(prop, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; - if (spec === 2012) { - return prefix + 'flex-line-pack'; - } else { - return AlignContent.__super__.prefixed.apply(this, arguments); - } - }; - - AlignContent.prototype.normalize = function(prop) { - return 'align-content'; - }; - - AlignContent.prototype.set = function(decl, prefix) { - var spec; - spec = flexSpec(prefix)[0]; - if (spec === 2012) { - decl.value = AlignContent.oldValues[decl.value] || decl.value; - return AlignContent.__super__.set.call(this, decl, prefix); - } else if (spec === 'final') { - return AlignContent.__super__.set.apply(this, arguments); - } - }; - - return AlignContent; - - })(Declaration); - - module.exports = AlignContent; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/align-items.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/align-items.js deleted file mode 100644 index 71144d55..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/align-items.js +++ /dev/null @@ -1,57 +0,0 @@ -(function() { - var AlignItems, Declaration, flexSpec, - __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; }; - - flexSpec = require('./flex-spec'); - - Declaration = require('../declaration'); - - AlignItems = (function(_super) { - __extends(AlignItems, _super); - - function AlignItems() { - return AlignItems.__super__.constructor.apply(this, arguments); - } - - AlignItems.names = ['align-items', 'flex-align', 'box-align']; - - AlignItems.oldValues = { - 'flex-end': 'end', - 'flex-start': 'start' - }; - - AlignItems.prototype.prefixed = function(prop, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; - if (spec === 2009) { - return prefix + 'box-align'; - } else if (spec === 2012) { - return prefix + 'flex-align'; - } else { - return AlignItems.__super__.prefixed.apply(this, arguments); - } - }; - - AlignItems.prototype.normalize = function(prop) { - return 'align-items'; - }; - - AlignItems.prototype.set = function(decl, prefix) { - var spec; - spec = flexSpec(prefix)[0]; - if (spec === 2009 || spec === 2012) { - decl.value = AlignItems.oldValues[decl.value] || decl.value; - return AlignItems.__super__.set.call(this, decl, prefix); - } else { - return AlignItems.__super__.set.apply(this, arguments); - } - }; - - return AlignItems; - - })(Declaration); - - module.exports = AlignItems; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/align-self.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/align-self.js deleted file mode 100644 index fa7e81ce..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/align-self.js +++ /dev/null @@ -1,55 +0,0 @@ -(function() { - var AlignSelf, Declaration, flexSpec, - __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; }; - - flexSpec = require('./flex-spec'); - - Declaration = require('../declaration'); - - AlignSelf = (function(_super) { - __extends(AlignSelf, _super); - - function AlignSelf() { - return AlignSelf.__super__.constructor.apply(this, arguments); - } - - AlignSelf.names = ['align-self', 'flex-item-align']; - - AlignSelf.oldValues = { - 'flex-end': 'end', - 'flex-start': 'start' - }; - - AlignSelf.prototype.prefixed = function(prop, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; - if (spec === 2012) { - return prefix + 'flex-item-align'; - } else { - return AlignSelf.__super__.prefixed.apply(this, arguments); - } - }; - - AlignSelf.prototype.normalize = function(prop) { - return 'align-self'; - }; - - AlignSelf.prototype.set = function(decl, prefix) { - var spec; - spec = flexSpec(prefix)[0]; - if (spec === 2012) { - decl.value = AlignSelf.oldValues[decl.value] || decl.value; - return AlignSelf.__super__.set.call(this, decl, prefix); - } else if (spec === 'final') { - return AlignSelf.__super__.set.apply(this, arguments); - } - }; - - return AlignSelf; - - })(Declaration); - - module.exports = AlignSelf; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/border-image.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/border-image.js deleted file mode 100644 index 95b430fa..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/border-image.js +++ /dev/null @@ -1,28 +0,0 @@ -(function() { - var BorderImage, Declaration, - __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; }; - - Declaration = require('../declaration'); - - BorderImage = (function(_super) { - __extends(BorderImage, _super); - - function BorderImage() { - return BorderImage.__super__.constructor.apply(this, arguments); - } - - BorderImage.names = ['border-image']; - - BorderImage.prototype.set = function(decl, prefix) { - decl.value = decl.value.replace(/\s+fill(\s)/, '$1'); - return BorderImage.__super__.set.call(this, decl, prefix); - }; - - return BorderImage; - - })(Declaration); - - module.exports = BorderImage; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/border-radius.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/border-radius.js deleted file mode 100644 index 97bcfa31..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/border-radius.js +++ /dev/null @@ -1,56 +0,0 @@ -(function() { - var BorderRadius, Declaration, - __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; }; - - Declaration = require('../declaration'); - - BorderRadius = (function(_super) { - var hor, mozilla, normal, ver, _i, _j, _len, _len1, _ref, _ref1; - - __extends(BorderRadius, _super); - - function BorderRadius() { - return BorderRadius.__super__.constructor.apply(this, arguments); - } - - BorderRadius.names = ['border-radius']; - - BorderRadius.toMozilla = {}; - - BorderRadius.toNormal = {}; - - _ref = ['top', 'bottom']; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - ver = _ref[_i]; - _ref1 = ['left', 'right']; - for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - hor = _ref1[_j]; - normal = "border-" + ver + "-" + hor + "-radius"; - mozilla = "border-radius-" + ver + hor; - BorderRadius.names.push(normal); - BorderRadius.names.push(mozilla); - BorderRadius.toMozilla[normal] = mozilla; - BorderRadius.toNormal[mozilla] = normal; - } - } - - BorderRadius.prototype.prefixed = function(prop, prefix) { - if (prefix === '-moz-') { - return prefix + (BorderRadius.toMozilla[prop] || prop); - } else { - return BorderRadius.__super__.prefixed.apply(this, arguments); - } - }; - - BorderRadius.prototype.normalize = function(prop) { - return BorderRadius.toNormal[prop] || prop; - }; - - return BorderRadius; - - })(Declaration); - - module.exports = BorderRadius; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/display-flex.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/display-flex.js deleted file mode 100644 index 4529e356..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/display-flex.js +++ /dev/null @@ -1,70 +0,0 @@ -(function() { - var DisplayFlex, OldDisplayFlex, OldValue, Value, flexSpec, - __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; }; - - flexSpec = require('./flex-spec'); - - OldValue = require('../old-value'); - - Value = require('../value'); - - OldDisplayFlex = (function(_super) { - __extends(OldDisplayFlex, _super); - - function OldDisplayFlex(name) { - this.name = name; - } - - OldDisplayFlex.prototype.check = function(value) { - return value === this.name; - }; - - return OldDisplayFlex; - - })(OldValue); - - DisplayFlex = (function(_super) { - __extends(DisplayFlex, _super); - - DisplayFlex.names = ['display-flex', 'inline-flex']; - - function DisplayFlex(name, prefixes) { - DisplayFlex.__super__.constructor.apply(this, arguments); - if (name === 'display-flex') { - this.name = 'flex'; - } - } - - DisplayFlex.prototype.check = function(decl) { - return decl.value === this.name; - }; - - DisplayFlex.prototype.prefixed = function(prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; - if (spec === 2009 && this.name === 'inline-flex') { - return; - } - return prefix + (spec === 2009 ? 'box' : spec === 2012 ? this.name === 'flex' ? 'flexbox' : 'inline-flexbox' : spec === 'final' ? this.name : void 0); - }; - - DisplayFlex.prototype.replace = function(string, prefix) { - return this.prefixed(prefix); - }; - - DisplayFlex.prototype.old = function(prefix) { - var prefixed; - prefixed = this.prefixed(prefix); - if (prefixed) { - return new OldValue(prefixed); - } - }; - - return DisplayFlex; - - })(Value); - - module.exports = DisplayFlex; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/fill-available.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/fill-available.js deleted file mode 100644 index f9594652..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/fill-available.js +++ /dev/null @@ -1,41 +0,0 @@ -(function() { - var FillAvailable, OldValue, Value, - __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; }; - - OldValue = require('../old-value'); - - Value = require('../value'); - - FillAvailable = (function(_super) { - __extends(FillAvailable, _super); - - function FillAvailable() { - return FillAvailable.__super__.constructor.apply(this, arguments); - } - - FillAvailable.names = ['fill-available']; - - FillAvailable.prototype.replace = function(string, prefix) { - if (prefix === '-moz-') { - return string.replace(this.regexp(), '$1-moz-available$3'); - } else { - return FillAvailable.__super__.replace.apply(this, arguments); - } - }; - - FillAvailable.prototype.old = function(prefix) { - if (prefix === '-moz-') { - return new OldValue('-moz-available'); - } else { - return FillAvailable.__super__.old.apply(this, arguments); - } - }; - - return FillAvailable; - - })(Value); - - module.exports = FillAvailable; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/filter.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/filter.js deleted file mode 100644 index 7a109a78..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/filter.js +++ /dev/null @@ -1,29 +0,0 @@ -(function() { - var Declaration, Filter, - __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; }; - - Declaration = require('../declaration'); - - Filter = (function(_super) { - __extends(Filter, _super); - - function Filter() { - return Filter.__super__.constructor.apply(this, arguments); - } - - Filter.names = ['filter']; - - Filter.prototype.check = function(decl) { - var v; - v = decl.value; - return v.toLowerCase().indexOf('alpha(') === -1 && v.indexOf('DXImageTransform.Microsoft') === -1; - }; - - return Filter; - - })(Declaration); - - module.exports = Filter; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/flex-basis.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/flex-basis.js deleted file mode 100644 index 4231c0fe..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/flex-basis.js +++ /dev/null @@ -1,51 +0,0 @@ -(function() { - var Declaration, FlexBasis, flexSpec, - __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; }; - - flexSpec = require('./flex-spec'); - - Declaration = require('../declaration'); - - FlexBasis = (function(_super) { - __extends(FlexBasis, _super); - - function FlexBasis() { - return FlexBasis.__super__.constructor.apply(this, arguments); - } - - FlexBasis.names = ['flex-basis']; - - FlexBasis.prototype.normalize = function() { - return 'flex'; - }; - - FlexBasis.prototype.prefixed = function(prop, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; - if (spec === 2012) { - return prefix + 'flex'; - } else { - return FlexBasis.__super__.prefixed.apply(this, arguments); - } - }; - - FlexBasis.prototype.set = function(decl, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; - if (spec === 2012) { - decl.prop = prefix + 'flex'; - decl.value = '0 1 ' + decl.value; - return decl; - } else if (spec === 'final') { - return FlexBasis.__super__.set.apply(this, arguments); - } - }; - - return FlexBasis; - - })(Declaration); - - module.exports = FlexBasis; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/flex-direction.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/flex-direction.js deleted file mode 100644 index d4ec3036..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/flex-direction.js +++ /dev/null @@ -1,65 +0,0 @@ -(function() { - var Declaration, FlexDirection, flexSpec, - __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; }; - - flexSpec = require('./flex-spec'); - - Declaration = require('../declaration'); - - FlexDirection = (function(_super) { - __extends(FlexDirection, _super); - - function FlexDirection() { - return FlexDirection.__super__.constructor.apply(this, arguments); - } - - FlexDirection.names = ['flex-direction', 'box-direction', 'box-orient']; - - FlexDirection.prototype.normalize = function(prop) { - return 'flex-direction'; - }; - - FlexDirection.prototype.insert = function(decl, prefix) { - var already, cloned, dir, orient, spec, value, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; - if (spec === 2009) { - already = decl.parent.some(function(i) { - return i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction'; - }); - if (already) { - return; - } - value = decl.value; - orient = value.indexOf('row') !== -1 ? 'horizontal' : 'vertical'; - dir = value.indexOf('reverse') !== -1 ? 'reverse' : 'normal'; - cloned = this.clone(decl); - cloned.prop = prefix + 'box-orient'; - cloned.value = orient; - decl.parent.insertBefore(decl, cloned); - cloned = this.clone(decl); - cloned.prop = prefix + 'box-direction'; - cloned.value = dir; - return decl.parent.insertBefore(decl, cloned); - } else { - return FlexDirection.__super__.insert.apply(this, arguments); - } - }; - - FlexDirection.prototype.old = function(prop, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; - if (spec === 2009) { - return [prefix + 'box-orient', prefix + 'box-direction']; - } else { - return FlexDirection.__super__.old.apply(this, arguments); - } - }; - - return FlexDirection; - - })(Declaration); - - module.exports = FlexDirection; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/flex-flow.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/flex-flow.js deleted file mode 100644 index 011199b4..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/flex-flow.js +++ /dev/null @@ -1,35 +0,0 @@ -(function() { - var Declaration, FlexFlow, flexSpec, - __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; }; - - flexSpec = require('./flex-spec'); - - Declaration = require('../declaration'); - - FlexFlow = (function(_super) { - __extends(FlexFlow, _super); - - function FlexFlow() { - return FlexFlow.__super__.constructor.apply(this, arguments); - } - - FlexFlow.names = ['flex-flow']; - - FlexFlow.prototype.set = function(decl, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; - if (spec === 2012) { - return FlexFlow.__super__.set.apply(this, arguments); - } else if (spec === 'final') { - return FlexFlow.__super__.set.apply(this, arguments); - } - }; - - return FlexFlow; - - })(Declaration); - - module.exports = FlexFlow; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/flex-grow.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/flex-grow.js deleted file mode 100644 index c275f15b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/flex-grow.js +++ /dev/null @@ -1,41 +0,0 @@ -(function() { - var Declaration, Flex, flexSpec, - __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; }; - - flexSpec = require('./flex-spec'); - - Declaration = require('../declaration'); - - Flex = (function(_super) { - __extends(Flex, _super); - - function Flex() { - return Flex.__super__.constructor.apply(this, arguments); - } - - Flex.names = ['flex-grow']; - - Flex.prototype.normalize = function() { - return 'flex'; - }; - - Flex.prototype.prefixed = function(prop, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; - if (spec === 2009) { - return prefix + 'box-flex'; - } else if (spec === 2012) { - return prefix + 'flex'; - } else { - return Flex.__super__.prefixed.apply(this, arguments); - } - }; - - return Flex; - - })(Declaration); - - module.exports = Flex; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/flex-shrink.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/flex-shrink.js deleted file mode 100644 index d7bd77e5..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/flex-shrink.js +++ /dev/null @@ -1,51 +0,0 @@ -(function() { - var Declaration, FlexShrink, flexSpec, - __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; }; - - flexSpec = require('./flex-spec'); - - Declaration = require('../declaration'); - - FlexShrink = (function(_super) { - __extends(FlexShrink, _super); - - function FlexShrink() { - return FlexShrink.__super__.constructor.apply(this, arguments); - } - - FlexShrink.names = ['flex-shrink']; - - FlexShrink.prototype.normalize = function() { - return 'flex'; - }; - - FlexShrink.prototype.prefixed = function(prop, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; - if (spec === 2012) { - return prefix + 'flex'; - } else { - return FlexShrink.__super__.prefixed.apply(this, arguments); - } - }; - - FlexShrink.prototype.set = function(decl, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; - if (spec === 2012) { - decl.prop = prefix + 'flex'; - decl.value = '0 ' + decl.value; - return decl; - } else if (spec === 'final') { - return FlexShrink.__super__.set.apply(this, arguments); - } - }; - - return FlexShrink; - - })(Declaration); - - module.exports = FlexShrink; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/flex-spec.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/flex-spec.js deleted file mode 100644 index 59ec38e9..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/flex-spec.js +++ /dev/null @@ -1,11 +0,0 @@ -(function() { - module.exports = function(prefix) { - var spec; - spec = prefix === '-webkit- 2009' || prefix === '-moz-' ? 2009 : prefix === '-ms-' ? 2012 : prefix === '-webkit-' ? 'final' : void 0; - if (prefix === '-webkit- 2009') { - prefix = '-webkit-'; - } - return [spec, prefix]; - }; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/flex-wrap.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/flex-wrap.js deleted file mode 100644 index f7ffddc8..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/flex-wrap.js +++ /dev/null @@ -1,33 +0,0 @@ -(function() { - var Declaration, FlexWrap, flexSpec, - __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; }; - - flexSpec = require('./flex-spec'); - - Declaration = require('../declaration'); - - FlexWrap = (function(_super) { - __extends(FlexWrap, _super); - - function FlexWrap() { - return FlexWrap.__super__.constructor.apply(this, arguments); - } - - FlexWrap.names = ['flex-wrap']; - - FlexWrap.prototype.set = function(decl, prefix) { - var spec; - spec = flexSpec(prefix)[0]; - if (spec !== 2009) { - return FlexWrap.__super__.set.apply(this, arguments); - } - }; - - return FlexWrap; - - })(Declaration); - - module.exports = FlexWrap; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/flex.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/flex.js deleted file mode 100644 index 8ad2e0b5..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/flex.js +++ /dev/null @@ -1,50 +0,0 @@ -(function() { - var Declaration, Flex, flexSpec, - __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; }; - - flexSpec = require('./flex-spec'); - - Declaration = require('../declaration'); - - Flex = (function(_super) { - __extends(Flex, _super); - - function Flex() { - return Flex.__super__.constructor.apply(this, arguments); - } - - Flex.names = ['flex', 'box-flex']; - - Flex.prototype.prefixed = function(prop, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; - if (spec === 2009) { - return prefix + 'box-flex'; - } else { - return Flex.__super__.prefixed.apply(this, arguments); - } - }; - - Flex.prototype.normalize = function(prop) { - return 'flex'; - }; - - Flex.prototype.set = function(decl, prefix) { - var spec; - spec = flexSpec(prefix)[0]; - if (spec === 2009) { - decl.value = decl.value.split(' ')[0]; - return Flex.__super__.set.call(this, decl, prefix); - } else { - return Flex.__super__.set.apply(this, arguments); - } - }; - - return Flex; - - })(Declaration); - - module.exports = Flex; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/fullscreen.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/fullscreen.js deleted file mode 100644 index f8a601f5..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/fullscreen.js +++ /dev/null @@ -1,33 +0,0 @@ -(function() { - var Fullscreen, Selector, - __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; }; - - Selector = require('../selector'); - - Fullscreen = (function(_super) { - __extends(Fullscreen, _super); - - function Fullscreen() { - return Fullscreen.__super__.constructor.apply(this, arguments); - } - - Fullscreen.names = [':fullscreen']; - - Fullscreen.prototype.prefixed = function(prefix) { - if ('-webkit-' === prefix) { - return ':-webkit-full-screen'; - } else if ('-moz-' === prefix) { - return ':-moz-full-screen'; - } else { - return ":" + prefix + "fullscreen"; - } - }; - - return Fullscreen; - - })(Selector); - - module.exports = Fullscreen; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/gradient.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/gradient.js deleted file mode 100644 index 3701fbce..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/gradient.js +++ /dev/null @@ -1,213 +0,0 @@ -(function() { - var Gradient, OldValue, Value, isDirection, list, utils, - __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; }; - - OldValue = require('../old-value'); - - Value = require('../value'); - - utils = require('../utils'); - - list = require('postcss/lib/list'); - - isDirection = /top|left|right|bottom/gi; - - Gradient = (function(_super) { - __extends(Gradient, _super); - - function Gradient() { - return Gradient.__super__.constructor.apply(this, arguments); - } - - Gradient.names = ['linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient']; - - Gradient.prototype.replace = function(string, prefix) { - var values; - values = list.comma(string).map((function(_this) { - return function(value) { - var after, args, close, params; - if (value.slice(0, +_this.name.length + 1 || 9e9) !== _this.name + '(') { - return value; - } - close = value.lastIndexOf(')'); - after = value.slice(close + 1); - args = value.slice(_this.name.length + 1, +(close - 1) + 1 || 9e9); - params = list.comma(args); - params = _this.newDirection(params); - if (prefix === '-webkit- old') { - return _this.oldWebkit(value, args, params, after); - } else { - _this.convertDirection(params); - return prefix + _this.name + '(' + params.join(', ') + ')' + after; - } - }; - })(this)); - return values.join(', '); - }; - - Gradient.prototype.directions = { - top: 'bottom', - left: 'right', - bottom: 'top', - right: 'left' - }; - - Gradient.prototype.oldDirections = { - 'top': 'left bottom, left top', - 'left': 'right top, left top', - 'bottom': 'left top, left bottom', - 'right': 'left top, right top', - 'top right': 'left bottom, right top', - 'top left': 'right bottom, left top', - 'bottom right': 'left top, right bottom', - 'bottom left': 'right top, left bottom' - }; - - Gradient.prototype.newDirection = function(params) { - var first, value; - first = params[0]; - if (first.indexOf('to ') === -1 && isDirection.test(first)) { - first = first.split(' '); - first = (function() { - var _i, _len, _results; - _results = []; - for (_i = 0, _len = first.length; _i < _len; _i++) { - value = first[_i]; - _results.push(this.directions[value.toLowerCase()] || value); - } - return _results; - }).call(this); - params[0] = 'to ' + first.join(' '); - } - return params; - }; - - Gradient.prototype.oldWebkit = function(value, args, params, after) { - if (this.name !== 'linear-gradient') { - return value; - } - if (params[0] && params[0].indexOf('deg') !== -1) { - return value; - } - if (args.indexOf('-corner') !== -1) { - return value; - } - if (args.indexOf('-side') !== -1) { - return value; - } - params = this.oldDirection(params); - params = this.colorStops(params); - return '-webkit-gradient(linear, ' + params.join(', ') + ')' + after; - }; - - Gradient.prototype.convertDirection = function(params) { - if (params.length > 0) { - if (params[0].slice(0, 3) === 'to ') { - return params[0] = this.fixDirection(params[0]); - } else if (params[0].indexOf('deg') !== -1) { - return params[0] = this.fixAngle(params[0]); - } else if (params[0].indexOf(' at ') !== -1) { - return this.fixRadial(params); - } - } - }; - - Gradient.prototype.fixDirection = function(param) { - var value; - param = param.split(' '); - param.splice(0, 1); - param = (function() { - var _i, _len, _results; - _results = []; - for (_i = 0, _len = param.length; _i < _len; _i++) { - value = param[_i]; - _results.push(this.directions[value.toLowerCase()] || value); - } - return _results; - }).call(this); - return param.join(' '); - }; - - Gradient.prototype.roundFloat = function(float, digits) { - return parseFloat(float.toFixed(digits)); - }; - - Gradient.prototype.fixAngle = function(param) { - param = parseFloat(param); - param = Math.abs(450 - param) % 360; - param = this.roundFloat(param, 3); - return "" + param + "deg"; - }; - - Gradient.prototype.oldDirection = function(params) { - var direction; - if (params.length === 0) { - params; - } - if (params[0].indexOf('to ') !== -1) { - direction = params[0].replace(/^to\s+/, ''); - direction = this.oldDirections[direction]; - params[0] = direction; - return params; - } else { - direction = this.oldDirections.bottom; - return [direction].concat(params); - } - }; - - Gradient.prototype.colorStops = function(params) { - return params.map(function(param, i) { - var color, position, separator; - if (i === 0) { - return param; - } - separator = param.lastIndexOf(' '); - if (separator === -1) { - color = param; - position = void 0; - } else { - color = param.slice(0, separator); - position = param.slice(separator + 1); - } - if (position && position.indexOf(')') !== -1) { - color += ' ' + position; - position = void 0; - } - if (i === 1) { - return "from(" + color + ")"; - } else if (i === params.length - 1) { - return "to(" + color + ")"; - } else if (position) { - return "color-stop(" + position + ", " + color + ")"; - } else { - return "color-stop(" + color + ")"; - } - }); - }; - - Gradient.prototype.fixRadial = function(params) { - var first; - first = params[0].split(/\s+at\s+/); - return params.splice(0, 1, first[1], first[0]); - }; - - Gradient.prototype.old = function(prefix) { - var regexp, string, type; - if (prefix === '-webkit-') { - type = this.name === 'linear-gradient' ? 'linear' : 'radial'; - string = '-gradient'; - regexp = utils.regexp("-webkit-(" + type + "-gradient|gradient\\(\\s*" + type + ")", false); - return new OldValue(prefix + this.name, string, regexp); - } else { - return Gradient.__super__.old.apply(this, arguments); - } - }; - - return Gradient; - - })(Value); - - module.exports = Gradient; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/justify-content.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/justify-content.js deleted file mode 100644 index 1a7554b8..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/justify-content.js +++ /dev/null @@ -1,62 +0,0 @@ -(function() { - var Declaration, JustifyContent, flexSpec, - __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; }; - - flexSpec = require('./flex-spec'); - - Declaration = require('../declaration'); - - JustifyContent = (function(_super) { - __extends(JustifyContent, _super); - - function JustifyContent() { - return JustifyContent.__super__.constructor.apply(this, arguments); - } - - JustifyContent.names = ['justify-content', 'flex-pack', 'box-pack']; - - JustifyContent.oldValues = { - 'flex-end': 'end', - 'flex-start': 'start', - 'space-between': 'justify', - 'space-around': 'distribute' - }; - - JustifyContent.prototype.prefixed = function(prop, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; - if (spec === 2009) { - return prefix + 'box-pack'; - } else if (spec === 2012) { - return prefix + 'flex-pack'; - } else { - return JustifyContent.__super__.prefixed.apply(this, arguments); - } - }; - - JustifyContent.prototype.normalize = function(prop) { - return 'justify-content'; - }; - - JustifyContent.prototype.set = function(decl, prefix) { - var spec, value; - spec = flexSpec(prefix)[0]; - if (spec === 2009 || spec === 2012) { - value = JustifyContent.oldValues[decl.value] || decl.value; - decl.value = value; - if (spec !== 2009 || value !== 'distribute') { - return JustifyContent.__super__.set.call(this, decl, prefix); - } - } else if (spec === 'final') { - return JustifyContent.__super__.set.apply(this, arguments); - } - }; - - return JustifyContent; - - })(Declaration); - - module.exports = JustifyContent; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/order.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/order.js deleted file mode 100644 index 4a1c619c..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/order.js +++ /dev/null @@ -1,52 +0,0 @@ -(function() { - var Declaration, Order, flexSpec, - __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; }; - - flexSpec = require('./flex-spec'); - - Declaration = require('../declaration'); - - Order = (function(_super) { - __extends(Order, _super); - - function Order() { - return Order.__super__.constructor.apply(this, arguments); - } - - Order.names = ['order', 'flex-order', 'box-ordinal-group']; - - Order.prototype.prefixed = function(prop, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; - if (spec === 2009) { - return prefix + 'box-ordinal-group'; - } else if (spec === 2012) { - return prefix + 'flex-order'; - } else { - return Order.__super__.prefixed.apply(this, arguments); - } - }; - - Order.prototype.normalize = function(prop) { - return 'order'; - }; - - Order.prototype.set = function(decl, prefix) { - var spec; - spec = flexSpec(prefix)[0]; - if (spec === 2009) { - decl.value = (parseInt(decl.value) + 1).toString(); - return Order.__super__.set.call(this, decl, prefix); - } else { - return Order.__super__.set.apply(this, arguments); - } - }; - - return Order; - - })(Declaration); - - module.exports = Order; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/placeholder.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/placeholder.js deleted file mode 100644 index 51d3bf9a..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/placeholder.js +++ /dev/null @@ -1,35 +0,0 @@ -(function() { - var Placeholder, Selector, - __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; }; - - Selector = require('../selector'); - - Placeholder = (function(_super) { - __extends(Placeholder, _super); - - function Placeholder() { - return Placeholder.__super__.constructor.apply(this, arguments); - } - - Placeholder.names = ['::placeholder']; - - Placeholder.prototype.prefixed = function(prefix) { - if ('-webkit-' === prefix) { - return '::-webkit-input-placeholder'; - } else if ('-ms-' === prefix) { - return ':-ms-input-placeholder'; - } else if ('-moz- old' === prefix) { - return ':-moz-placeholder'; - } else { - return "::" + prefix + "placeholder"; - } - }; - - return Placeholder; - - })(Selector); - - module.exports = Placeholder; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/transform.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/transform.js deleted file mode 100644 index dd1e456a..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/transform.js +++ /dev/null @@ -1,31 +0,0 @@ -(function() { - var Transform, Value, - __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; }; - - Value = require('../value'); - - Transform = (function(_super) { - __extends(Transform, _super); - - function Transform() { - return Transform.__super__.constructor.apply(this, arguments); - } - - Transform.names = ['transform']; - - Transform.prototype.replace = function(value, prefix) { - if (prefix === '-ms-') { - return value; - } else { - return Transform.__super__.replace.apply(this, arguments); - } - }; - - return Transform; - - })(Value); - - module.exports = Transform; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/transition.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/transition.js deleted file mode 100644 index 70306f30..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/hacks/transition.js +++ /dev/null @@ -1,37 +0,0 @@ -(function() { - var OldValue, Transition, Value, - __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; }; - - OldValue = require('../old-value'); - - Value = require('../value'); - - Transition = (function(_super) { - __extends(Transition, _super); - - function Transition() { - return Transition.__super__.constructor.apply(this, arguments); - } - - Transition.names = ['flex', 'flex-grow', 'flex-shrink', 'flex-basis']; - - Transition.prototype.prefixed = function(prefix) { - return this.all.prefixed(this.name, prefix); - }; - - Transition.prototype.replace = function(string, prefix) { - return string.replace(this.regexp(), '$1' + this.prefixed(prefix) + '$3'); - }; - - Transition.prototype.old = function(prefix) { - return new OldValue(this.prefixed(prefix)); - }; - - return Transition; - - })(Value); - - module.exports = Transition; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/info.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/info.js deleted file mode 100644 index c097a1b2..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/info.js +++ /dev/null @@ -1,114 +0,0 @@ -(function() { - var capitalize, names, prefix; - - capitalize = function(str) { - return str.slice(0, 1).toUpperCase() + str.slice(1); - }; - - names = { - ie: 'IE', - ff: 'Firefox', - ios: 'iOS' - }; - - prefix = function(name, transition, prefixes) { - var out; - out = ' ' + name + (transition ? '*' : '') + ': '; - out += prefixes.map(function(i) { - return i.replace(/^-(.*)-$/g, '$1'); - }).join(', '); - out += "\n"; - return out; - }; - - module.exports = function(prefixes) { - var atrules, browser, data, list, name, needTransition, out, props, selector, selectors, string, transitionProp, useTransition, value, values, version, versions, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6; - if (prefixes.browsers.selected.length === 0) { - return "No browsers selected"; - } - versions = []; - _ref = prefixes.browsers.selected; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - browser = _ref[_i]; - _ref1 = browser.split(' '), name = _ref1[0], version = _ref1[1]; - name = names[name] || capitalize(name); - if (versions[name]) { - versions[name].push(version); - } else { - versions[name] = [version]; - } - } - out = "Browsers:\n"; - for (browser in versions) { - list = versions[browser]; - list = list.sort(function(a, b) { - return parseFloat(b) - parseFloat(a); - }); - out += ' ' + browser + ': ' + list.join(', ') + "\n"; - } - atrules = ''; - _ref2 = prefixes.add; - for (name in _ref2) { - data = _ref2[name]; - if (name[0] === '@' && data.prefixes) { - atrules += prefix(name, false, data.prefixes); - } - } - if (atrules !== '') { - out += "\nAt-Rules:\n" + atrules; - } - selectors = ''; - _ref3 = prefixes.add.selectors; - for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) { - selector = _ref3[_j]; - if (selector.prefixes) { - selectors += prefix(selector.name, false, selector.prefixes); - } - } - if (selectors !== '') { - out += "\nSelectors:\n" + selectors; - } - values = ''; - props = ''; - useTransition = false; - needTransition = (_ref4 = prefixes.add.transition) != null ? _ref4.prefixes : void 0; - _ref5 = prefixes.add; - for (name in _ref5) { - data = _ref5[name]; - if (name[0] !== '@' && data.prefixes) { - transitionProp = needTransition && prefixes.data[name].transition; - if (transitionProp) { - useTransition = true; - } - props += prefix(name, transitionProp, data.prefixes); - } - if (!data.values) { - continue; - } - if (prefixes.transitionProps.some(function(i) { - return i === name; - })) { - continue; - } - _ref6 = data.values; - for (_k = 0, _len2 = _ref6.length; _k < _len2; _k++) { - value = _ref6[_k]; - string = prefix(value.name, false, value.prefixes); - if (values.indexOf(string) === -1) { - values += string; - } - } - } - if (useTransition) { - props += " * - can be used in transition\n"; - } - if (props !== '') { - out += "\nProperties:\n" + props; - } - if (values !== '') { - out += "\nValues:\n" + values; - } - return out; - }; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/keyframes.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/keyframes.js deleted file mode 100644 index 60f2850e..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/keyframes.js +++ /dev/null @@ -1,40 +0,0 @@ -(function() { - var Keyframes, Prefixer, - __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; }; - - Prefixer = require('./prefixer'); - - Keyframes = (function(_super) { - __extends(Keyframes, _super); - - function Keyframes() { - return Keyframes.__super__.constructor.apply(this, arguments); - } - - Keyframes.prototype.check = function(atRule) { - return atRule.name === 'keyframes'; - }; - - Keyframes.prototype.add = function(atRule, prefix) { - var already, cloned, prefixed; - prefixed = prefix + atRule.name; - already = atRule.parent.some(function(i) { - return i.name === prefixed && i.params === atRule.params; - }); - if (already) { - return; - } - cloned = this.clone(atRule, { - name: prefixed - }); - return atRule.parent.insertBefore(atRule, cloned); - }; - - return Keyframes; - - })(Prefixer); - - module.exports = Keyframes; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/old-value.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/old-value.js deleted file mode 100644 index 38819e2c..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/old-value.js +++ /dev/null @@ -1,29 +0,0 @@ -(function() { - var OldValue, utils; - - utils = require('./utils'); - - OldValue = (function() { - function OldValue(name, string, regexp) { - this.name = name; - this.string = string; - this.regexp = regexp; - this.regexp || (this.regexp = utils.regexp(this.name)); - this.string || (this.string = this.name); - } - - OldValue.prototype.check = function(value) { - if (value.indexOf(this.string) !== -1) { - return !!value.match(this.regexp); - } else { - return false; - } - }; - - return OldValue; - - })(); - - module.exports = OldValue; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/prefixer.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/prefixer.js deleted file mode 100644 index 72a0c411..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/prefixer.js +++ /dev/null @@ -1,84 +0,0 @@ -(function() { - var Browsers, Prefixer, utils, vendor; - - Browsers = require('./browsers'); - - vendor = require('postcss/lib/vendor'); - - utils = require('./utils'); - - Prefixer = (function() { - Prefixer.hack = function(klass) { - var name, _i, _len, _ref, _results; - this.hacks || (this.hacks = {}); - _ref = klass.names; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - name = _ref[_i]; - _results.push(this.hacks[name] = klass); - } - return _results; - }; - - Prefixer.load = function(name, prefixes, all) { - var klass, _ref; - klass = (_ref = this.hacks) != null ? _ref[name] : void 0; - if (klass) { - return new klass(name, prefixes, all); - } else { - return new this(name, prefixes, all); - } - }; - - Prefixer.clone = function(node, overrides) { - var cloned; - cloned = node.clone(overrides); - delete cloned._autoprefixerPrefix; - delete cloned._autoprefixerValues; - return cloned; - }; - - function Prefixer(name, prefixes, all) { - this.name = name; - this.prefixes = prefixes; - this.all = all; - } - - Prefixer.prototype.parentPrefix = function(node) { - var prefix; - prefix = node._autoprefixerPrefix != null ? node._autoprefixerPrefix : node.type === 'decl' && node.prop[0] === '-' ? vendor.prefix(node.prop) : node.type === 'root' ? false : node.type === 'rule' && node.selector.indexOf(':-') !== -1 ? node.selector.match(/:(-\w+-)/)[1] : node.type === 'atrule' && node.name[0] === '-' ? vendor.prefix(node.name) : this.parentPrefix(node.parent); - if (Browsers.prefixes().indexOf(prefix) === -1) { - prefix = false; - } - return node._autoprefixerPrefix = prefix; - }; - - Prefixer.prototype.process = function(node) { - var parent, prefix, _i, _len, _ref, _results; - if (!this.check(node)) { - return; - } - parent = this.parentPrefix(node); - _ref = this.prefixes; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - prefix = _ref[_i]; - if (parent && parent !== utils.removeNote(prefix)) { - continue; - } - _results.push(this.add(node, prefix)); - } - return _results; - }; - - Prefixer.prototype.clone = function(node, overrides) { - return Prefixer.clone(node, overrides); - }; - - return Prefixer; - - })(); - - module.exports = Prefixer; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/prefixes.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/prefixes.js deleted file mode 100644 index a6d7762a..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/prefixes.js +++ /dev/null @@ -1,315 +0,0 @@ -(function() { - var Declaration, Keyframes, Prefixes, Processor, Selector, Value, declsCache, utils, vendor; - - utils = require('./utils'); - - vendor = require('postcss/lib/vendor'); - - Processor = require('./processor'); - - Declaration = require('./declaration'); - - Keyframes = require('./keyframes'); - - Selector = require('./selector'); - - Value = require('./value'); - - Selector.hack(require('./hacks/fullscreen')); - - Selector.hack(require('./hacks/placeholder')); - - Declaration.hack(require('./hacks/flex')); - - Declaration.hack(require('./hacks/order')); - - Declaration.hack(require('./hacks/filter')); - - Declaration.hack(require('./hacks/flex-flow')); - - Declaration.hack(require('./hacks/flex-grow')); - - Declaration.hack(require('./hacks/flex-wrap')); - - Declaration.hack(require('./hacks/align-self')); - - Declaration.hack(require('./hacks/flex-basis')); - - Declaration.hack(require('./hacks/align-items')); - - Declaration.hack(require('./hacks/flex-shrink')); - - Declaration.hack(require('./hacks/border-image')); - - Declaration.hack(require('./hacks/align-content')); - - Declaration.hack(require('./hacks/border-radius')); - - Declaration.hack(require('./hacks/flex-direction')); - - Declaration.hack(require('./hacks/justify-content')); - - Value.hack(require('./hacks/gradient')); - - Value.hack(require('./hacks/transform')); - - Value.hack(require('./hacks/transition')); - - Value.hack(require('./hacks/display-flex')); - - Value.hack(require('./hacks/fill-available')); - - declsCache = {}; - - Prefixes = (function() { - function Prefixes(data, browsers) { - var _ref; - this.data = data; - this.browsers = browsers; - _ref = this.preprocess(this.select(this.data)), this.add = _ref[0], this.remove = _ref[1]; - this.processor = new Processor(this); - } - - Prefixes.prototype.transitionProps = ['transition', 'transition-property']; - - Prefixes.prototype.select = function(list) { - var add, all, data, name, notes, selected; - selected = { - add: {}, - remove: {} - }; - for (name in list) { - data = list[name]; - add = data.browsers.map(function(i) { - var params; - params = i.split(' '); - return { - browser: params[0] + ' ' + params[1], - note: params[2] - }; - }); - notes = add.filter(function(i) { - return i.note; - }).map((function(_this) { - return function(i) { - return _this.browsers.prefix(i.browser) + ' ' + i.note; - }; - })(this)); - notes = utils.uniq(notes); - add = add.filter((function(_this) { - return function(i) { - return _this.browsers.isSelected(i.browser); - }; - })(this)).map((function(_this) { - return function(i) { - var prefix; - prefix = _this.browsers.prefix(i.browser); - if (i.note) { - return prefix + ' ' + i.note; - } else { - return prefix; - } - }; - })(this)); - add = this.sort(utils.uniq(add)); - all = data.browsers.map((function(_this) { - return function(i) { - return _this.browsers.prefix(i); - }; - })(this)); - if (data.mistakes) { - all = all.concat(data.mistakes); - } - all = all.concat(notes); - all = utils.uniq(all); - if (add.length) { - selected.add[name] = add; - if (add.length < all.length) { - selected.remove[name] = all.filter(function(i) { - return add.indexOf(i) === -1; - }); - } - } else { - selected.remove[name] = all; - } - } - return selected; - }; - - Prefixes.prototype.sort = function(prefixes) { - return prefixes.sort(function(a, b) { - var aLength, bLength; - aLength = utils.removeNote(a).length; - bLength = utils.removeNote(b).length; - if (aLength === bLength) { - return b.length - a.length; - } else { - return bLength - aLength; - } - }); - }; - - Prefixes.prototype.preprocess = function(selected) { - var add, name, old, olds, prefix, prefixed, prefixes, prop, props, remove, selector, value, values, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _len6, _m, _n, _o, _ref, _ref1, _ref2; - add = { - selectors: [] - }; - _ref = selected.add; - for (name in _ref) { - prefixes = _ref[name]; - if (name === '@keyframes') { - add[name] = new Keyframes(name, prefixes, this); - } else if (this.data[name].selector) { - add.selectors.push(Selector.load(name, prefixes, this)); - } else { - props = this.data[name].transition ? this.transitionProps : this.data[name].props; - if (props) { - value = Value.load(name, prefixes, this); - for (_i = 0, _len = props.length; _i < _len; _i++) { - prop = props[_i]; - if (!add[prop]) { - add[prop] = { - values: [] - }; - } - add[prop].values.push(value); - } - } - if (!this.data[name].props) { - values = ((_ref1 = add[name]) != null ? _ref1.values : void 0) || []; - add[name] = Declaration.load(name, prefixes, this); - add[name].values = values; - } - } - } - remove = { - selectors: [] - }; - _ref2 = selected.remove; - for (name in _ref2) { - prefixes = _ref2[name]; - if (this.data[name].selector) { - selector = Selector.load(name, prefixes); - for (_j = 0, _len1 = prefixes.length; _j < _len1; _j++) { - prefix = prefixes[_j]; - remove.selectors.push(selector.checker(prefix)); - } - } else if (name[0] === '@') { - for (_k = 0, _len2 = prefixes.length; _k < _len2; _k++) { - prefix = prefixes[_k]; - prefixed = '@' + prefix + name.slice(1); - remove[prefixed] = { - remove: true - }; - } - } else { - props = this.data[name].transition ? this.transitionProps : this.data[name].props; - if (props) { - value = Value.load(name, [], this); - for (_l = 0, _len3 = prefixes.length; _l < _len3; _l++) { - prefix = prefixes[_l]; - old = value.old(prefix); - if (old) { - for (_m = 0, _len4 = props.length; _m < _len4; _m++) { - prop = props[_m]; - if (!remove[prop]) { - remove[prop] = {}; - } - if (!remove[prop].values) { - remove[prop].values = []; - } - remove[prop].values.push(old); - } - } - } - } - if (!this.data[name].props) { - for (_n = 0, _len5 = prefixes.length; _n < _len5; _n++) { - prefix = prefixes[_n]; - prop = vendor.unprefixed(name); - olds = this.decl(name).old(name, prefix); - for (_o = 0, _len6 = olds.length; _o < _len6; _o++) { - prefixed = olds[_o]; - if (!remove[prefixed]) { - remove[prefixed] = {}; - } - remove[prefixed].remove = true; - } - } - } - } - } - return [add, remove]; - }; - - Prefixes.prototype.decl = function(prop) { - var decl; - decl = declsCache[prop]; - if (decl) { - return decl; - } else { - return declsCache[prop] = Declaration.load(prop); - } - }; - - Prefixes.prototype.unprefixed = function(prop) { - prop = vendor.unprefixed(prop); - return this.decl(prop).normalize(prop); - }; - - Prefixes.prototype.prefixed = function(prop, prefix) { - prop = vendor.unprefixed(prop); - return this.decl(prop).prefixed(prop, prefix); - }; - - Prefixes.prototype.values = function(type, prop) { - var data, global, values, _ref, _ref1; - data = this[type]; - global = (_ref = data['*']) != null ? _ref.values : void 0; - values = (_ref1 = data[prop]) != null ? _ref1.values : void 0; - if (global && values) { - return utils.uniq(global.concat(values)); - } else { - return global || values || []; - } - }; - - Prefixes.prototype.group = function(decl) { - var checker, index, length, rule, unprefixed; - rule = decl.parent; - index = rule.index(decl); - length = rule.decls.length; - unprefixed = this.unprefixed(decl.prop); - checker = (function(_this) { - return function(step, callback) { - var other; - index += step; - while (index >= 0 && index < length) { - other = rule.decls[index]; - if (_this.unprefixed(other.prop) !== unprefixed) { - break; - } else if (callback(other) === true) { - return true; - } - index += step; - } - return false; - }; - })(this); - return { - up: function(callback) { - return checker(-1, callback); - }, - down: function(callback) { - return checker(+1, callback); - } - }; - }; - - return Prefixes; - - })(); - - module.exports = Prefixes; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/processor.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/processor.js deleted file mode 100644 index 4062f3eb..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/processor.js +++ /dev/null @@ -1,105 +0,0 @@ -(function() { - var Processor, Value, utils, vendor; - - vendor = require('postcss/lib/vendor'); - - Value = require('./value'); - - utils = require('./utils'); - - Processor = (function() { - function Processor(prefixes) { - this.prefixes = prefixes; - } - - Processor.prototype.add = function(css) { - var prefixer, selector, _i, _len, _ref; - prefixer = this.prefixes.add['@keyframes']; - if (prefixer) { - css.eachAtRule(function(rule) { - return prefixer.process(rule); - }); - } - _ref = this.prefixes.add.selectors; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - selector = _ref[_i]; - css.eachRule(function(rule) { - return selector.process(rule); - }); - } - css.eachDecl((function(_this) { - return function(decl) { - var prefix; - prefix = _this.prefixes.add[decl.prop]; - if (prefix && prefix.prefixes) { - return prefix.process(decl); - } - }; - })(this)); - return css.eachDecl((function(_this) { - return function(decl) { - var unprefixed, value, _j, _len1, _ref1; - unprefixed = _this.prefixes.unprefixed(decl.prop); - _ref1 = _this.prefixes.values('add', unprefixed); - for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - value = _ref1[_j]; - value.process(decl); - } - return Value.save(_this.prefixes, decl); - }; - })(this)); - }; - - Processor.prototype.remove = function(css) { - var checker, _i, _len, _ref; - css.eachAtRule((function(_this) { - return function(rule, i) { - if (_this.prefixes.remove['@' + rule.name]) { - return rule.parent.remove(i); - } - }; - })(this)); - _ref = this.prefixes.remove.selectors; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - checker = _ref[_i]; - css.eachRule((function(_this) { - return function(rule, i) { - if (checker(rule)) { - return rule.parent.remove(i); - } - }; - })(this)); - } - return css.eachDecl((function(_this) { - return function(decl, i) { - var notHack, rule, unprefixed, _j, _len1, _ref1, _ref2; - rule = decl.parent; - unprefixed = _this.prefixes.unprefixed(decl.prop); - if ((_ref1 = _this.prefixes.remove[decl.prop]) != null ? _ref1.remove : void 0) { - notHack = _this.prefixes.group(decl).down(function(i) { - return i.prop === unprefixed; - }); - if (notHack) { - rule.remove(i); - return; - } - } - _ref2 = _this.prefixes.values('remove', unprefixed); - for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) { - checker = _ref2[_j]; - if (checker.check(decl.value)) { - rule.remove(i); - return; - } - } - }; - })(this)); - }; - - return Processor; - - })(); - - module.exports = Processor; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/selector.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/selector.js deleted file mode 100644 index bf3f09ee..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/selector.js +++ /dev/null @@ -1,75 +0,0 @@ -(function() { - var Prefixer, Selector, utils, - __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; }; - - Prefixer = require('./prefixer'); - - utils = require('./utils'); - - Selector = (function(_super) { - __extends(Selector, _super); - - function Selector(name, prefixes, all) { - this.name = name; - this.prefixes = prefixes; - this.all = all; - this.regexpCache = {}; - } - - Selector.prototype.check = function(rule, prefix) { - var name; - name = prefix ? this.prefixed(prefix) : this.name; - if (rule.selector.indexOf(name) !== -1) { - return !!rule.selector.match(this.regexp(prefix)); - } else { - return false; - } - }; - - Selector.prototype.checker = function(prefix) { - return (function(_this) { - return function(rule) { - return _this.check(rule, prefix); - }; - })(this); - }; - - Selector.prototype.prefixed = function(prefix) { - return this.name.replace(/^([^\w]*)/, '$1' + prefix); - }; - - Selector.prototype.regexp = function(prefix) { - var name; - if (this.regexpCache[prefix]) { - return this.regexpCache[prefix]; - } - name = prefix ? this.prefixed(prefix) : this.name; - return this.regexpCache = RegExp("(^|[^:\"'=])" + (utils.escapeRegexp(name)), "gi"); - }; - - Selector.prototype.replace = function(selector, prefix) { - return selector.replace(this.regexp(), '$1' + this.prefixed(prefix)); - }; - - Selector.prototype.add = function(rule, prefix) { - var cloned, prefixed; - prefixed = this.replace(rule.selector, prefix); - if (rule.parent.some(function(i) { - return i.selector === prefixed; - })) { - return; - } - cloned = this.clone(rule, { - selector: prefixed - }); - return rule.parent.insertBefore(rule, cloned); - }; - - return Selector; - - })(Prefixer); - - module.exports = Selector; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/updater.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/updater.js deleted file mode 100644 index f8ab33e5..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/updater.js +++ /dev/null @@ -1,225 +0,0 @@ -(function() { - var coffee, fs, https; - - coffee = require('coffee-script'); - - https = require('https'); - - fs = require('fs'); - - module.exports = { - browsers: { - firefox: 'ff', - chrome: 'chrome', - safari: 'safari', - ios_saf: 'ios', - opera: 'opera', - ie: 'ie', - bb: 'bb', - android: 'android' - }, - run: function() { - var i, updaters, _i, _len, _ref, _results; - updaters = __dirname + '/../updaters/'; - _ref = fs.readdirSync(updaters).sort(); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - i = _ref[_i]; - if (!i.match(/\.(coffee|js)$/)) { - continue; - } - _results.push(require(updaters + i).apply(this)); - } - return _results; - }, - requests: 0, - doneCallbacks: [], - requestCallbacks: [], - done: function(callback) { - this.doneCallbacks || (this.doneCallbacks = []); - return this.doneCallbacks.push(callback); - }, - error: function(message) { - process.stderr.write("\n" + message + "\n"); - return process.exit(1); - }, - request: function(callback) { - this.requestCallbacks || (this.requestCallbacks = []); - return this.requestCallbacks.push(callback); - }, - github: function(path, callback) { - this.requests += 1; - return https.get("https://raw.github.com/" + path, (function(_this) { - return function(res) { - var data; - data = ''; - res.on('data', function(chunk) { - return data += chunk; - }); - return res.on('end', function() { - var e, func, title, _i, _j, _len, _len1, _ref, _ref1, _results; - try { - callback(JSON.parse(data)); - } catch (_error) { - e = _error; - title = data.match(/([^<]+)<\/title>/); - if (title) { - _this.error("" + title[1] + " on " + path); - } else { - _this.error("Parsing error in " + path + ":\n" + e.message); - } - } - _this.requests -= 1; - _ref = _this.requestCallbacks; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - func = _ref[_i]; - func(); - } - if (_this.requests === 0) { - _ref1 = _this.doneCallbacks.reverse(); - _results = []; - for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - func = _ref1[_j]; - _results.push(func()); - } - return _results; - } - }); - }; - })(this)); - }, - sort: function(browsers) { - return browsers.sort(function(a, b) { - a = a.split(' '); - b = b.split(' '); - if (a[0] > b[0]) { - return 1; - } else if (a[0] < b[0]) { - return -1; - } else { - return parseFloat(a[1]) - parseFloat(b[1]); - } - }); - }, - parse: function(data) { - var browser, interval, need, support, version, versions, _i, _len, _ref, _ref1; - need = []; - _ref = data.stats; - for (browser in _ref) { - versions = _ref[browser]; - for (interval in versions) { - support = versions[interval]; - _ref1 = interval.split('-'); - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - version = _ref1[_i]; - if (this.browsers[browser] && support.match(/\sx($|\s)/)) { - version = version.replace(/\.0$/, ''); - need.push(this.browsers[browser] + ' ' + version); - } - } - } - } - return this.sort(need); - }, - feature: function(file, callback) { - var url; - url = "Fyrd/caniuse/master/features-json/" + file + ".json"; - return this.github(url, (function(_this) { - return function(data) { - return callback(_this.parse(data)); - }; - })(this)); - }, - fork: function(fork, file, callback) { - var branch, url, user, _ref; - _ref = fork.split(':'), user = _ref[0], branch = _ref[1]; - branch || (branch = 'master'); - url = "" + user + "/caniuse/" + branch + "/features-json/" + file + ".json"; - return this.github(url, (function(_this) { - return function(data) { - return callback(_this.parse(data)); - }; - })(this)); - }, - all: function(callback) { - var browsers, data, list, name, version, _i, _len, _ref; - browsers = require('../data/browsers'); - list = []; - for (name in browsers) { - data = browsers[name]; - _ref = data.versions; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - version = _ref[_i]; - list.push(name + ' ' + version); - } - } - return callback(this.sort(list)); - }, - map: function(browsers, callback) { - var browser, name, version, _i, _len, _ref, _results; - _results = []; - for (_i = 0, _len = browsers.length; _i < _len; _i++) { - browser = browsers[_i]; - _ref = browser.split(' '), name = _ref[0], version = _ref[1]; - version = parseFloat(version); - _results.push(callback(browser, name, version)); - } - return _results; - }, - stringify: function(obj, indent) { - var key, local, processed, value; - if (indent == null) { - indent = ''; - } - if (obj instanceof Array) { - local = indent + ' '; - return ("[\n" + local) + obj.map((function(_this) { - return function(i) { - return _this.stringify(i, local); - }; - })(this)).join("\n" + local) + ("\n" + indent + "]"); - } else if (typeof obj === 'object') { - local = indent + ' '; - processed = []; - for (key in obj) { - value = obj[key]; - if (key.match(/'|-|@|:/)) { - key = "\"" + key + "\""; - } - value = this.stringify(value, local); - if (value[0] !== "\n") { - value = ' ' + value; - } - processed.push(key + ':' + value); - } - return "\n" + local + processed.join("\n" + local) + "\n"; - } else { - return JSON.stringify(obj); - } - }, - changed: [], - save: function(name, json) { - var content, file, key, sorted, _i, _len, _ref; - sorted = {}; - _ref = Object.keys(json).sort(); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - key = _ref[_i]; - sorted[key] = json[key]; - } - file = __dirname + ("/../data/" + name); - content = "# Don't edit this files, because it's autogenerated.\n" + "# See updaters/ dir for generator. " + "Run `bin/autoprefixer --update` to update." + "\n\n"; - content += "module.exports =" + this.stringify(sorted) + ";\n"; - if (fs.existsSync(file + '.js')) { - file += '.js'; - content = coffee.compile(content); - } else { - file += '.coffee'; - } - if (fs.readFileSync(file).toString() !== content) { - this.changed.push(name); - return fs.writeFileSync(file, content); - } - } - }; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/utils.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/utils.js deleted file mode 100644 index 32568164..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/utils.js +++ /dev/null @@ -1,41 +0,0 @@ -(function() { - module.exports = { - error: function(text) { - var err; - err = new Error(text); - err.autoprefixer = true; - throw err; - }, - uniq: function(array) { - var filtered, i, _i, _len; - filtered = []; - for (_i = 0, _len = array.length; _i < _len; _i++) { - i = array[_i]; - if (filtered.indexOf(i) === -1) { - filtered.push(i); - } - } - return filtered; - }, - removeNote: function(string) { - if (string.indexOf(' ') === -1) { - return string; - } else { - return string.split(' ')[0]; - } - }, - escapeRegexp: function(string) { - return string.replace(/[.?*+\^\$\[\]\\(){}|\-]/g, '\\$&'); - }, - regexp: function(word, escape) { - if (escape == null) { - escape = true; - } - if (escape) { - word = this.escapeRegexp(word); - } - return RegExp("(^|[\\s,(])(" + word + "($|[\\s(,]))", "gi"); - } - }; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/value.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/value.js deleted file mode 100644 index 242c14b4..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/lib/value.js +++ /dev/null @@ -1,97 +0,0 @@ -(function() { - var OldValue, Prefixer, Value, utils, vendor, - __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; }; - - Prefixer = require('./prefixer'); - - OldValue = require('./old-value'); - - vendor = require('postcss/lib/vendor'); - - utils = require('./utils'); - - Value = (function(_super) { - __extends(Value, _super); - - function Value() { - return Value.__super__.constructor.apply(this, arguments); - } - - Value.save = function(prefixes, decl) { - var cloned, prefix, prefixed, propPrefix, rule, value, _ref, _results; - _ref = decl._autoprefixerValues; - _results = []; - for (prefix in _ref) { - value = _ref[prefix]; - if (value === decl.value) { - continue; - } - propPrefix = vendor.prefix(decl.prop); - if (propPrefix === prefix) { - _results.push(decl.value = value); - } else if (propPrefix === '-pie-') { - continue; - } else { - prefixed = prefixes.prefixed(decl.prop, prefix); - rule = decl.parent; - if (rule.every(function(i) { - return i.prop !== prefixed; - })) { - if (rule.every(function(i) { - return i.prop !== decl.prop || i.value !== value; - })) { - cloned = this.clone(decl, { - value: value - }); - _results.push(decl.parent.insertBefore(decl, cloned)); - } else { - _results.push(void 0); - } - } else { - _results.push(void 0); - } - } - } - return _results; - }; - - Value.prototype.check = function(decl) { - var value; - value = decl.value; - if (value.indexOf(this.name) !== -1) { - return !!value.match(this.regexp()); - } else { - return false; - } - }; - - Value.prototype.regexp = function() { - return this.regexpCache || (this.regexpCache = utils.regexp(this.name)); - }; - - Value.prototype.replace = function(string, prefix) { - return string.replace(this.regexp(), '$1' + prefix + '$2'); - }; - - Value.prototype.add = function(decl, prefix) { - var value; - decl._autoprefixerValues || (decl._autoprefixerValues = {}); - value = decl._autoprefixerValues[prefix] || decl.value; - value = this.replace(value, prefix); - if (value) { - return decl._autoprefixerValues[prefix] = value; - } - }; - - Value.prototype.old = function(prefix) { - return new OldValue(prefix + this.name); - }; - - return Value; - - })(Prefixer); - - module.exports = Value; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/.npmignore b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/.npmignore deleted file mode 100644 index cefaa67a..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -test/ -.travis.yml \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/CHANGELOG.md b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/CHANGELOG.md deleted file mode 100644 index 73c222b8..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/CHANGELOG.md +++ /dev/null @@ -1,112 +0,0 @@ -0.8.1 / 2013-10-24 ------------------- -* copy failed to return an error to the callback if a file doesn't exist (ulikoehler #38, #39) - -0.8.0 / 2013-10-14 ------------------- -* `filter` implemented on `copy()` and `copySync()`. (Srirangan / #36) - -0.7.1 / 2013-10-12 ------------------- -* `copySync()` implemented (Srirangan / #33) -* updated to the latest `jsonfile` version `1.1.0` which gives `options` params for the JSON methods. Closes #32 - -0.7.0 / 2013-10-07 ------------------- -* update readme conventions -* `copy()` now works if destination directory does not exist. Closes #29 - -0.6.4 / 2013-09-05 ------------------- -* changed `homepage` field in package.json to remove NPM warning - -0.6.3 / 2013-06-28 ------------------- -* changed JSON spacing default from `4` to `2` to follow Node conventions -* updated `jsonfile` dep -* updated `rimraf` dep - -0.6.2 / 2013-06-28 ------------------- -* added .npmignore, #25 - -0.6.1 / 2013-05-14 ------------------- -* modified for `strict` mode, closes #24 -* added `outputJson()/outputJsonSync()`, closes #23 - -0.6.0 / 2013-03-18 ------------------- -* removed node 0.6 support -* added node 0.10 support -* upgraded to latest `ncp` and `rimraf`. -* optional `graceful-fs` support. Closes #17 - - -0.5.0 / 2013-02-03 ------------------- -* Removed `readTextFile`. -* Renamed `readJSONFile` to `readJSON` and `readJson`, same with write. -* Restructured documentation a bit. Added roadmap. - -0.4.0 / 2013-01-28 ------------------- -* Set default spaces in `jsonfile` from 4 to 2. -* Updated `testutil` deps for tests. -* Renamed `touch()` to `createFile()` -* Added `outputFile()` and `outputFileSync()` -* Changed creation of testing diretories so the /tmp dir is not littered. -* Added `readTextFile()` and `readTextFileSync()`. - -0.3.2 / 2012-11-01 ------------------- -* Added `touch()` and `touchSync()` methods. - -0.3.1 / 2012-10-11 ------------------- -* Fixed some stray globals. - -0.3.0 / 2012-10-09 ------------------- -* Removed all CoffeeScript from tests. -* Renamed `mkdir` to `mkdirs`/`mkdirp`. - -0.2.1 / 2012-09-11 ------------------- -* Updated `rimraf` dep. - -0.2.0 / 2012-09-10 ------------------- -* Rewrote module into JavaScript. (Must still rewrite tests into JavaScript) -* Added all methods of [jsonfile][https://github.com/jprichardson/node-jsonfile] -* Added Travis-CI. - -0.1.3 / 2012-08-13 ------------------- -* Added method `readJSONFile`. - -0.1.2 / 2012-06-15 ------------------- -* Bug fix: `deleteSync()` didn't exist. -* Verified Node v0.8 compatibility. - -0.1.1 / 2012-06-15 ------------------- -* Fixed bug in `remove()`/`delete()` that wouldn't execute the function if a callback wasn't passed. - -0.1.0 / 2012-05-31 ------------------- -* Renamed `copyFile()` to `copy()`. `copy()` can now copy directories (recursively) too. -* Renamed `rmrf()` to `remove()`. -* `remove()` aliased with `delete()`. -* Added `mkdirp` capabilities. Named: `mkdir()`. Hides Node.js native `mkdir()`. -* Instead of exporting the native `fs` module with new functions, I now copy over the native methods to a new object and export that instead. - -0.0.4 / 2012-03-14 ------------------- -* Removed CoffeeScript dependency - -0.0.3 / 2012-01-11 ------------------- -* Added methods rmrf and rmrfSync -* Moved tests from Jasmine to Mocha diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/LICENSE b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/LICENSE deleted file mode 100644 index c73f7930..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ - -(The MIT License) - -Copyright (c) 2011-2013 JP Richardson - -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. \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/README.md b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/README.md deleted file mode 100644 index 8fda86af..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/README.md +++ /dev/null @@ -1,332 +0,0 @@ - -Node.js: fs-extra -================= - -[![build status](https://secure.travis-ci.org/jprichardson/node-fs-extra.png)](http://travis-ci.org/jprichardson/node-fs-extra) - -This module adds a few extra file system methods that aren't included in the native `fs` module. It is a drop in replacement for `fs`. - - - -Why? ----- - -I got tired of including `mkdirp`, `rimraf`, and `cp -r` in most of my projects. - - - - -Installation ------------- - - npm install --save fs-extra - - - -Usage ------ - -`fs-extra` is a drop in replacement for native `fs`. All methods in `fs` are unmodified and attached to `fs-extra`. - -You don't ever need to include the original `fs` module again: - -```javascript -var fs = require('fs') //this is no longer necessary -``` - -you can now do this: - -```javascript -var fs = require('fs-extra'); //var fs = require('fs') -``` - -or if you prefer to make it clear that you're using `fs-extra` and not `fs`, you may want -to do this: - -```javascript -//var fs = require('fs') -var fse = require('fs-extra') -``` - -you can also keep, both, but it's redundant: - -```javascript -var fs = require('fs') - , fse = require('fs-extra') -``` - - - -Methods -------- - -**NOTE:** You can still use the native Node.js methods. They are copied over to `fs-extra`. - - -### copy(src, dest, [filter], callback) - -Copy a file or directory. The directory can have contents. Like `cp -r`. There isn't a synchronous version implemented yet. - -Sync: `copySync()` - - -Examples: - -```javascript -var fs = require('fs-extra'); - -fs.copy('/tmp/myfile', '/tmp/mynewfile', function(err){ - if (err) return console.error(err); - - console.log("success!") -}); //copies file - -fs.copy('/tmp/mydir', '/tmp/mynewdir', function(err){ - if (err) return console.error(err); - - console.log("success!") -}); //copies directory, even if it has subdirectories or files -``` - - -### createFile(file, callback) - -Creates a file. If the file that is requested to be created is in directories that do not exist, these directories are created. If the file already exists, it is **NOT MODIFIED**. - -Sync: `createFileSync()` - - -Example: - -```javascript -var fs = require('fs-extra') - -var file = '/tmp/this/path/does/not/exist/file.txt' - -fs.createFile(file, function(err) { - console.log(err); //null - //file has now been created, including the directory it is to be placed in -}) -``` - - - -### mkdirs(dir, callback) - -Creates a directory. If the parent hierarchy doesn't exist, it's created. Like `mkdir -p`. - -Alias: `mkdirp()` - -Sync: `mkdirsSync()` / `mkdirpSync()` - - -Examples: - -```javascript -var fs = require('fs-extra'); - -fs.mkdirs('/tmp/some/long/path/that/prob/doesnt/exist', function(err){ - if (err) return console.error(err); - - console.log("success!") -}); - -fs.mkdirsSync('/tmp/another/path'); -``` - - -### outputFile(file, data, callback) - -Almost the same as `writeFile`, except that if the directory does not exist, it's created. - -Sync: `outputFileSync()` - - -Example: - -```javascript -var fs = require('fs-extra') -var file = '/tmp/this/path/does/not/exist/file.txt' - -fs.outputFile(file, 'hello!', function(err) { - console.log(err); //null - - fs.readFile(file, 'utf8', function(err, data) { - console.log(data); //hello! - }) -}) -``` - - - -### outputJson(file, data, callback) - -Almost the same as `writeJson`, except that if the directory does not exist, it's created. - -Alias: `outputJSON() - -Sync: `outputJsonSync()`, `outputJSONSync()` - - -Example: - -```javascript -var fs = require('fs-extra') -var file = '/tmp/this/path/does/not/exist/file.txt' - -fs.outputJson(file, {name: 'JP'}, function(err) { - console.log(err); //null - - fs.readJson(file, function(err, data) { - console.log(data.name); //'JP - }) -}) -``` - - - -### readJson(file, [options], callback) - -Reads a JSON file and then parses it into an object. `options` are the same that you'd pass to `fs.readFile`. - -Alias: `readJSON()` - -Sync: `readJsonSync()`, `readJSONSync()` - - -Example: - -```javascript -var fs = require('fs-extra'); - -fs.readJson('./package.json', function(err, packageObj) { - console.log(packageObj.version); //0.1.3 -}); -``` - - -### remove(dir, callback) - -Removes a file or directory. The directory can have contents. Like `rm -rf`. - -Alias: `delete()` - -Sync: `removeSync()` / `deleteSync()` - - -Examples: - -```javascript -var fs = require('fs-extra'); - -fs.remove('/tmp/myfile', function(err){ - if (err) return console.error(err); - - console.log("success!") -}); - -fs.removeSync('/home/jprichardson'); //I just deleted my entire HOME directory. -``` - - - -### writeJson(file, object, [options], callback) - -Writes an object to a JSON file. `options` are the same that you'd pass to `fs.readFile`. - -Alias: `writeJSON()` - -Sync: `writeJsonSync()`, `writeJSONSync()` - -Example: - -```javascript -var fs = require('fs-extra'); -fs.writeJson('./package.json', {name: 'fs-extra'}, function(err){ - console.log(err); -}); -``` - - - -Roadmap to 1.0.0 ------------------ - -This contains items that I'm considering doing. I'd love community feedback. - -* File system walker. I really like this one: https://github.com/daaku/nodejs-walker ... this might be adding too much. Thoughts? -* File/directory tree watcher. There are quite a few. ... this also might be adding too much. I like this one: https://github.com/paulmillr/chokidar but I don't like that it's written in CoffeeScript. Thoughts? -* Method to move files. -* Thinking about moving `rimraf`, `ncp`, and `mkdirps` code into this library. I'd like fs-extra to be a stable library that module authors -can depend upon. A bunch of other dependencies kinda sucks for modules/libraries. (I'm leaning against this now.) -* Change documentation to use the `fse` prefix instead of `fs`. This may encourage people to start using `fse` as a prefix and hence make their code clearer that they're not using the native `fs`. I'm very undecided on this one since `fs-extra` is a drop in replacement for the native `fs`. (I'm leaning against this now.) - - - -Naming ------- - -I put a lot of thought into the naming of these functions. Inspired by @coolaj86's request. So he deserves much of the credit for raising the issue. See discussion(s) here: - -* https://github.com/jprichardson/node-fs-extra/issues/2 -* https://github.com/flatiron/utile/issues/11 -* https://github.com/ryanmcgrath/wrench-js/issues/29 -* https://github.com/substack/node-mkdirp/issues/17 - -First, I believe that in as many cases as possible, the [Node.js naming schemes](http://nodejs.org/api/fs.html) should be chosen. However, there are problems with the Node.js own naming schemes. - -For example, `fs.readFile()` and `fs.readdir()`: the **F** is capitalized in *File* and the **d** is not capitalized in *dir*. Perhaps a bit pedantic, but they should still be consistent. Also, Node.js has chosen a lot of POSIX naming schemes, which I believe is great. See: `fs.mkdir()`, `fs.rmdir()`, `fs.chown()`, etc. - -We have a dilemma though. How do you consistently name methods that perform the following POSIX commands: `cp`, `cp -r`, `mkdir -p`, and `rm -rf`? - -My perspective: when in doubt, err on the side of simplicity. A directory is just a hierarchical grouping of directories and files. Consider that for a moment. So when you want to copy it or remove it, in most cases you'll want to copy or remove all of its contents. When you want to create a directory, if the directory that it's suppose to be contained in does not exist, then in most cases you'll want to create that too. - -So, if you want to remove a file or a directory regardless of whether it has contents, just call `fs.remove(path)` or its alias `fs.delete(path)`. If you want to copy a file or a directory whether it has contents, just call `fs.copy(source, destination)`. If you want to create a directory regardless of whether its parent directories exist, just call `fs.mkdirs(path)` or `fs.mkdirp(path)`. - - -Credit ------- - -`fs-extra` wouldn't be possible without using the modules from the following authors: - -- [Isaac Shlueter](https://github.com/isaacs) -- [Charlie McConnel](https://github.com/avianflu) -- [James Halliday](https://github.com/substack) - - -Contributions -------------- - -If you want to contribute, please add a test if you can. Also, don't change the version in `package.json`. - - -### Contributors - -- [JP Richardson](https://github.com/jprichardson) -- [Mike McNeil](https://github.com/mikermcneil) -- [Ian Crowther](https://github.com/iancrowther) -- [Stephen Mathieson](https://github.com/stephenmathieson) -- [Srirangan](https://github.com/Srirangan) -- [Uli Köhler](https://github.com/ulikoehler) -- `<your name here>` - - - - -License -------- - - -Licensed under MIT - -Copyright (c) 2011-2013 JP Richardson - -[1]: http://nodejs.org/docs/latest/api/fs.html - - -[jsonfile]: https://github.com/jprichardson/node-jsonfile - - - - - diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/lib/copy.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/lib/copy.js deleted file mode 100644 index 7a29f3ec..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/lib/copy.js +++ /dev/null @@ -1,79 +0,0 @@ -"use strict" - -var fs = require('fs') - , ncp = require('ncp').ncp - , path = require('path') - , mkdir = require('./mkdir'), - create = require('./create') - -module.exports.copy = copy; -module.exports.copySync = copySync; - -var BUF_LENGTH = 64 * 1024 -var _buff = new Buffer(BUF_LENGTH) - -var copyFileSync = function(srcFile, destFile) { - var bytesRead, fdr, fdw, pos; - fdr = fs.openSync(srcFile, 'r'); - fdw = fs.openSync(destFile, 'w'); - bytesRead = 1; - pos = 0; - while (bytesRead > 0) { - bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos); - fs.writeSync(fdw, _buff, 0, bytesRead); - pos += bytesRead; - } - fs.closeSync(fdr); - return fs.closeSync(fdw); -} - -function copy(src, dest, filter, callback) { - if( typeof filter === "function" && !callback) { - callback = filter; - filter = null; - } - callback = callback || function(){} - - fs.lstat(src, function(err, stats) { - if (err) return callback(err) - - var dir = null - if (stats.isDirectory()) { - var parts = dest.split(path.sep) - parts.pop() - dir = parts.join(path.sep) - } else { - dir = path.dirname(dest) - } - - fs.exists(dir, function(dirExists) { - if (dirExists) return ncp(src, dest, {filter: filter}, callback); - mkdir.mkdirs(dir, function(err) { - if (err) return callback(err) - ncp(src, dest, {filter: filter}, callback); - }) - }) - }) -} - -function copySync(src, dest, filter) { - filter = filter || function () { return true; }; - var stats = fs.lstatSync(src), - destExists = fs.exists(dest), - performCopy = false; - if (stats.isFile()) { - if (filter instanceof RegExp) performCopy = filter.test(src); - else if (typeof filter === "function") performCopy = filter(src); - if(performCopy) { - if (!destExists) create.createFileSync(dest); - copyFileSync(src, dest); - } - } - else if (stats.isDirectory()) { - if (!destExists) mkdir.mkdirsSync(dest); - var contents = fs.readdirSync(src); - contents.forEach(function (content) { - copySync(src + "/" + content, dest + "/" + content); - }); - } -} diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/lib/create.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/lib/create.js deleted file mode 100644 index cf3a34bd..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/lib/create.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict" - -var mkdir = require('./mkdir') - , path = require('path') - , fs = require('fs') - , exists = fs.exists || path.exists - , existsSync = fs.existsSync || path.existsSync - -function createFile (file, callback) { - function makeFile() { - fs.writeFile(file, '', function(err) { - if (err) - callback(err) - else - callback(null); - }) - } - - exists(file, function(fileExists) { - if (fileExists) - return callback(null); - else { - var dir = path.dirname(file); - - exists(dir, function(dirExists) { - if (!dirExists) { - mkdir.mkdirs(dir, function(err) { - if (err) - callback(err) - else - makeFile(); - }) - } else { - makeFile(); - } - }) - } - }) -} - - -function createFileSync (file) { - if (existsSync(file)) - return; - - var dir = path.dirname(file); - if (!existsSync(dir)) - mkdir.mkdirsSync(dir); - - fs.writeFileSync(file, ''); -} - - -module.exports.createFile = createFile; -module.exports.createFileSync = createFileSync; \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/lib/index.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/lib/index.js deleted file mode 100644 index 2ad3923d..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/lib/index.js +++ /dev/null @@ -1,110 +0,0 @@ -"use strict" - -var fs = null - , path = require('path') - , jsonFile = require('jsonfile') - , json = require('./json') - , fse = {}; - -try { - // optional dependency - fs = require("graceful-fs") -} catch (er) { - fs = require("fs") -} - -Object.keys(fs).forEach(function(key) { - var func = fs[key]; - if (typeof func == 'function') - fse[key] = func; -}); - -fs = fse; - -// copy - -fs.copy = require('./copy').copy; -fs.copySync = require('./copy').copySync; - -// remove - -var remove = require('./remove'); -fs.remove = remove.remove; -fs.removeSync = remove.removeSync; -fs['delete'] = fs.remove -fs.deleteSync = fs.removeSync - -// mkdir - -var mkdir = require('./mkdir') -fs.mkdirs = mkdir.mkdirs -fs.mkdirsSync = mkdir.mkdirsSync -fs.mkdirp = mkdir.mkdirs -fs.mkdirpSync = mkdir.mkdirsSync - -// create - -var create = require('./create') -fs.createFile = create.createFile; -fs.createFileSync = create.createFileSync; - -//deprecated -fs.touch = function touch() { - console.log('fs.touch() is deprecated. Please use fs.createFile().') - fs.createFile.apply(null, arguments) -} - -fs.touchSync = function touchSync() { - console.log('fs.touchSync() is deprecated. Please use fs.createFileSync().') - fs.createFileSync.apply(null, arguments) -} - -// output - -var output = require('./output'); -fs.outputFile = output.outputFile; -fs.outputFileSync = output.outputFileSync; - -// read - -/*fs.readTextFile = function(file, callback) { - return fs.readFile(file, 'utf8', callback) -} - -fs.readTextFileSync = function(file, callback) { - return fs.readFileSync(file, 'utf8') -}*/ - -// json files - -fs.readJsonFile = jsonFile.readFile; -fs.readJSONFile = jsonFile.readFile; -fs.readJsonFileSync = jsonFile.readFileSync; -fs.readJSONFileSync = jsonFile.readFileSync; - -fs.readJson = jsonFile.readFile; -fs.readJSON = jsonFile.readFile; -fs.readJsonSync = jsonFile.readFileSync; -fs.readJSONSync = jsonFile.readFileSync; - -fs.outputJsonSync = json.outputJsonSync; -fs.outputJSONSync = json.outputJsonSync; -fs.outputJson = json.outputJson; -fs.outputJSON = json.outputJson; - -fs.writeJsonFile = jsonFile.writeFile; -fs.writeJSONFile = jsonFile.writeFile; -fs.writeJsonFileSync = jsonFile.writeFileSync; -fs.writeJSONFileSync = jsonFile.writeFileSync; - -fs.writeJson = jsonFile.writeFile; -fs.writeJSON = jsonFile.writeFile; -fs.writeJsonSync = jsonFile.writeFileSync; -fs.writeJSONSync = jsonFile.writeFileSync; - - -module.exports = fs - -jsonFile.spaces = 2; //set to 2 -module.exports.jsonfile = jsonFile; //so users of fs-extra can modify jsonFile.spaces; - diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/lib/json.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/lib/json.js deleted file mode 100644 index a0b8c2a4..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/lib/json.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict" - -var jsonFile = require('jsonfile') - , fs = require('fs') - , mkdir = require('./mkdir') - , path = require('path') - -var me = module.exports - -me.outputJsonSync = function(file, data) { - var dir = path.dirname(file) - - if (!fs.existsSync(dir)) - mkdir.mkdirsSync(dir) - - jsonFile.writeFileSync(file, data) -} - -me.outputJson = function(file, data, callback) { - var dir = path.dirname(file) - - fs.exists(dir, function(itDoes) { - if (itDoes) return jsonFile.writeFile(file, data, callback) - - mkdir.mkdirs(dir, function(err) { - if (err) return callback(err) - jsonFile.writeFile(file, data, callback) - }) - }) -} \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/lib/mkdir.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/lib/mkdir.js deleted file mode 100644 index e0b16253..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/lib/mkdir.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict" - -var mkdirp = require('mkdirp'); - -module.exports.mkdirs = mkdirp; -module.exports.mkdirsSync = mkdirp.sync; - - diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/lib/output.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/lib/output.js deleted file mode 100644 index 85840aa7..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/lib/output.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict" - -var mkdir = require('./mkdir') - , path = require('path') - , fs = require('fs') - , exists = fs.exists || path.exists - , existsSync = fs.existsSync || path.existsSync - -function outputFile (file, data, encoding, callback) { - if (typeof encoding === 'function') { - callback = encoding - encoding = 'utf8' - } - - var dir = path.dirname(file) - exists(dir, function(itDoes) { - if (itDoes) return fs.writeFile(file, data, encoding, callback) - - mkdir.mkdirs(dir, function(err) { - if (err) return callback(err) - - fs.writeFile(file, data, encoding, callback) - }) - }) -} - - -function outputFileSync (file, data, encoding) { - var dir = path.dirname(file) - if (existsSync(dir)) return fs.writeFileSync.apply(fs, arguments) - mkdir.mkdirsSync(dir) - fs.writeFileSync.apply(fs, arguments) -} - - -module.exports.outputFile = outputFile; -module.exports.outputFileSync = outputFileSync; \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/lib/remove.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/lib/remove.js deleted file mode 100644 index 9d5573b1..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/lib/remove.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict" - -var rimraf = require('rimraf') - , fs = require('fs'); - -function rmrfSync(dir) { - return rimraf.sync(dir); -} - -function rmrf(dir, cb) { - if (cb != null) { - return rimraf(dir, cb); - } else { - return rimraf(dir, (function() {})); - } -} - -module.exports.remove = rmrf; -module.exports.removeSync = rmrfSync; diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/.bin/ncp b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/.bin/ncp deleted file mode 120000 index 1c026480..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/.bin/ncp +++ /dev/null @@ -1 +0,0 @@ -../ncp/bin/ncp \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/.bin/rimraf b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/.bin/rimraf deleted file mode 120000 index 4cd49a49..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/.bin/rimraf +++ /dev/null @@ -1 +0,0 @@ -../rimraf/bin.js \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/jsonfile/.npmignore b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/jsonfile/.npmignore deleted file mode 100644 index cefaa67a..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/jsonfile/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -test/ -.travis.yml \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/jsonfile/CHANGELOG.md b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/jsonfile/CHANGELOG.md deleted file mode 100644 index fb9ec881..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/jsonfile/CHANGELOG.md +++ /dev/null @@ -1,20 +0,0 @@ -1.1.1 / 2013-11-11 ------------------- -* fixed catching of callback bug (ffissore / #5) - -1.1.0 / 2013-10-11 ------------------- -* added `options` param to methods, (seanodell / #4) - -1.0.1 / 2013-09-05 ------------------- -* removed `homepage` field from package.json to remove NPM warning - -1.0.0 / 2013-06-28 ------------------- -* added `.npmignore`, #1 -* changed spacing default from `4` to `2` to follow Node conventions - -0.0.1 / 2012-09-10 ------------------- -* Initial release. diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/jsonfile/LICENSE b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/jsonfile/LICENSE deleted file mode 100644 index 83642bff..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/jsonfile/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -(The MIT License) - -Copyright (c) 2012, JP Richardson <jprichardson@gmail.com> - -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/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/jsonfile/README.md b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/jsonfile/README.md deleted file mode 100644 index 489b3945..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/jsonfile/README.md +++ /dev/null @@ -1,121 +0,0 @@ -[![build status](https://secure.travis-ci.org/jprichardson/node-jsonfile.png)](http://travis-ci.org/jprichardson/node-jsonfile) - -Node.js - jsonfile -================ - -Easily read/write JSON files. - - -Why? ----- - -Writing `JSON.stringify()` and then `fs.writeFile()` and `JSON.parse()` with `fs.readFile()` enclosed in `try/catch` blocks became annoying. - - - -Installation ------------- - - npm install jsonfile --save - - - -API ---- - -### readFile(filename, [options], callback) - -```javascript -var jf = require('jsonfile') - , util = require('util'); - -var file = '/tmp/data.json'; -js.readFile(file, function(err, obj) { - console.log(util.inspect(obj)); -}); -``` - - -### readFileSync(filename, [options]) - -```javascript -var jf = require('jsonfile') - , util = require('util'); - -var file = '/tmp/data.json'; - -console.log(util.inspect(jf.readFileSync(file))); -``` - - -### writeFile(filename, [options], callback) - -```javascript -var jf = require('jsonfile') - -var file = '/tmp/data.json'; -var obj = {name: 'JP'}; - -jf.writeFile(file, obj, function(err) { - console.log(err); -}) -``` - -### writeFileSync(filename, [options]) - -```javascript -var jf = require('jsonfile') - -var file = '/tmp/data.json'; -var obj = {name: 'JP'}; - -jf.writeFileSync(file, obj); -``` - - -### spaces - -Number of spaces to indent JSON files. - -**default:** 2 - -``` -var jf = require('jsonfile'); - -jf.spaces = 4; - -var file = '/tmp/data.json'; -var obj = {name: 'JP'}; - -jf.writeFile(file, obj, function(err) { //json file has four space indenting now - console.log(err); -}); -``` - - -Contributions -------------- - -If you contribute to this library, please don't change the version numbers in your pull request. - - -### Contributors - -(You can add your name, or I'll add it if you forget) - -- [*] [JP Richardson](https://github.com/jprichardson) -- [2] [Sean O'Dell](https://github.com/seanodell) -- [1] [Federico Fissore](https://github.com/ffissore) - - -License -------- - -(MIT License) - -Copyright 2012-2013, JP Richardson <jprichardson@gmail.com> - - - - - diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/jsonfile/lib/jsonfile.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/jsonfile/lib/jsonfile.js deleted file mode 100644 index 011a7756..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/jsonfile/lib/jsonfile.js +++ /dev/null @@ -1,47 +0,0 @@ -var fs = require('fs'); - -var me = module.exports; - -me.spaces = 2; - -me.readFile = function(file, callback) { - fs.readFile(file, 'utf8', function(err, data) { - if (err) return callback(err, null); - - var obj = null; - try { - obj = JSON.parse(data); - } catch (err2) { - callback(err2, null); - return; - } - callback(null, obj); - }) -} - -me.readFileSync = function(file) { - return JSON.parse(fs.readFileSync(file, 'utf8')); -} - -me.writeFile = function(file, obj, options, callback) { - if (callback == null) { // odd little swap because options is optional - callback = options; - options = null; - } - - var str = ''; - try { - str = JSON.stringify(obj, null, module.exports.spaces); - } catch (err) { - if (callback) { - callback(err, null); - } - return; - } - fs.writeFile(file, str, options, callback); -} - -me.writeFileSync = function(file, obj, options) { - var str = JSON.stringify(obj, null, module.exports.spaces); - return fs.writeFileSync(file, str, options); //not sure if fs.writeFileSync returns anything, but just in case -} \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/jsonfile/package.json b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/jsonfile/package.json deleted file mode 100644 index bf18753c..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/jsonfile/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "jsonfile", - "version": "1.1.1", - "description": "Easily read/write JSON files.", - "repository": { - "type": "git", - "url": "git@github.com:jprichardson/node-jsonfile.git" - }, - "keywords": [ - "read", - "write", - "file", - "json" - ], - "author": { - "name": "JP Richardson", - "email": "jprichardson@gmail.com" - }, - "licenses": [ - { - "type": "MIT", - "url": "" - } - ], - "dependencies": {}, - "devDependencies": { - "testutil": "~0.5.1", - "mocha": "*" - }, - "main": "./lib/jsonfile.js", - "scripts": { - "test": "mocha test" - }, - "readme": "[![build status](https://secure.travis-ci.org/jprichardson/node-jsonfile.png)](http://travis-ci.org/jprichardson/node-jsonfile)\n\nNode.js - jsonfile\n================\n\nEasily read/write JSON files. \n\n\nWhy?\n----\n\nWriting `JSON.stringify()` and then `fs.writeFile()` and `JSON.parse()` with `fs.readFile()` enclosed in `try/catch` blocks became annoying.\n\n\n\nInstallation\n------------\n\n npm install jsonfile --save\n\n\n\nAPI\n---\n\n### readFile(filename, [options], callback)\n\n```javascript\nvar jf = require('jsonfile')\n , util = require('util');\n\nvar file = '/tmp/data.json';\njs.readFile(file, function(err, obj) {\n console.log(util.inspect(obj)); \n});\n```\n\n\n### readFileSync(filename, [options])\n\n```javascript\nvar jf = require('jsonfile')\n , util = require('util');\n\nvar file = '/tmp/data.json';\n\nconsole.log(util.inspect(jf.readFileSync(file)));\n```\n\n\n### writeFile(filename, [options], callback)\n\n```javascript\nvar jf = require('jsonfile')\n\nvar file = '/tmp/data.json';\nvar obj = {name: 'JP'};\n\njf.writeFile(file, obj, function(err) {\n console.log(err);\n})\n```\n\n### writeFileSync(filename, [options])\n\n```javascript\nvar jf = require('jsonfile')\n\nvar file = '/tmp/data.json';\nvar obj = {name: 'JP'};\n\njf.writeFileSync(file, obj);\n```\n\n\n### spaces\n\nNumber of spaces to indent JSON files. \n\n**default:** 2\n\n```\nvar jf = require('jsonfile');\n\njf.spaces = 4;\n\nvar file = '/tmp/data.json';\nvar obj = {name: 'JP'};\n\njf.writeFile(file, obj, function(err) { //json file has four space indenting now\n console.log(err);\n});\n```\n\n\nContributions\n-------------\n\nIf you contribute to this library, please don't change the version numbers in your pull request.\n\n\n### Contributors\n\n(You can add your name, or I'll add it if you forget)\n\n- [*] [JP Richardson](https://github.com/jprichardson)\n- [2] [Sean O'Dell](https://github.com/seanodell)\n- [1] [Federico Fissore](https://github.com/ffissore)\n\n\nLicense\n-------\n\n(MIT License)\n\nCopyright 2012-2013, JP Richardson <jprichardson@gmail.com>\n\n\n\n\n\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/jprichardson/node-jsonfile/issues" - }, - "homepage": "https://github.com/jprichardson/node-jsonfile", - "_id": "jsonfile@1.1.1", - "_from": "jsonfile@~1.1.0" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/.npmignore b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/.npmignore deleted file mode 100644 index 9303c347..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/.travis.yml b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/.travis.yml deleted file mode 100644 index 84fd7ca2..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - 0.9 diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/LICENSE b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/LICENSE deleted file mode 100644 index 432d1aeb..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 2010 James Halliday (mail@substack.net) - -This project is free software released under the MIT/X11 license: - -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/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/examples/pow.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/examples/pow.js deleted file mode 100644 index e6924212..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/examples/pow.js +++ /dev/null @@ -1,6 +0,0 @@ -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/index.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/index.js deleted file mode 100644 index fda6de8a..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/index.js +++ /dev/null @@ -1,82 +0,0 @@ -var path = require('path'); -var fs = require('fs'); - -module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; - -function mkdirP (p, mode, f, made) { - if (typeof mode === 'function' || mode === undefined) { - f = mode; - mode = 0777 & (~process.umask()); - } - if (!made) made = null; - - var cb = f || function () {}; - if (typeof mode === 'string') mode = parseInt(mode, 8); - p = path.resolve(p); - - fs.mkdir(p, mode, function (er) { - if (!er) { - made = made || p; - return cb(null, made); - } - switch (er.code) { - case 'ENOENT': - mkdirP(path.dirname(p), mode, function (er, made) { - if (er) cb(er, made); - else mkdirP(p, mode, cb, made); - }); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - fs.stat(p, function (er2, stat) { - // if the stat fails, then that's super weird. - // let the original error be the failure reason. - if (er2 || !stat.isDirectory()) cb(er, made) - else cb(null, made); - }); - break; - } - }); -} - -mkdirP.sync = function sync (p, mode, made) { - if (mode === undefined) { - mode = 0777 & (~process.umask()); - } - if (!made) made = null; - - if (typeof mode === 'string') mode = parseInt(mode, 8); - p = path.resolve(p); - - try { - fs.mkdirSync(p, mode); - made = made || p; - } - catch (err0) { - switch (err0.code) { - case 'ENOENT' : - made = sync(path.dirname(p), mode, made); - sync(p, mode, made); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - var stat; - try { - stat = fs.statSync(p); - } - catch (err1) { - throw err0; - } - if (!stat.isDirectory()) throw err0; - break; - } - } - - return made; -}; diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/package.json b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/package.json deleted file mode 100644 index dc434821..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "mkdirp", - "description": "Recursively mkdir, like `mkdir -p`", - "version": "0.3.5", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "main": "./index", - "keywords": [ - "mkdir", - "directory" - ], - "repository": { - "type": "git", - "url": "http://github.com/substack/node-mkdirp.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "devDependencies": { - "tap": "~0.4.0" - }, - "license": "MIT", - "readme": "# mkdirp\n\nLike `mkdir -p`, but in node.js!\n\n[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)\n\n# example\n\n## pow.js\n\n```js\nvar mkdirp = require('mkdirp');\n \nmkdirp('/tmp/foo/bar/baz', function (err) {\n if (err) console.error(err)\n else console.log('pow!')\n});\n```\n\nOutput\n\n```\npow!\n```\n\nAnd now /tmp/foo/bar/baz exists, huzzah!\n\n# methods\n\n```js\nvar mkdirp = require('mkdirp');\n```\n\n## mkdirp(dir, mode, cb)\n\nCreate a new directory and any necessary subdirectories at `dir` with octal\npermission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\n`cb(err, made)` fires with the error or the first directory `made`\nthat had to be created, if any.\n\n## mkdirp.sync(dir, mode)\n\nSynchronously create a new directory and any necessary subdirectories at `dir`\nwith octal permission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\nReturns the first directory that had to be created, if any.\n\n# install\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install mkdirp\n```\n\n# license\n\nMIT\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/substack/node-mkdirp/issues" - }, - "homepage": "https://github.com/substack/node-mkdirp", - "_id": "mkdirp@0.3.5", - "_from": "mkdirp@0.3.x" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/readme.markdown b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/readme.markdown deleted file mode 100644 index 83b0216a..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/readme.markdown +++ /dev/null @@ -1,63 +0,0 @@ -# mkdirp - -Like `mkdir -p`, but in node.js! - -[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp) - -# example - -## pow.js - -```js -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); -``` - -Output - -``` -pow! -``` - -And now /tmp/foo/bar/baz exists, huzzah! - -# methods - -```js -var mkdirp = require('mkdirp'); -``` - -## mkdirp(dir, mode, cb) - -Create a new directory and any necessary subdirectories at `dir` with octal -permission string `mode`. - -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -`cb(err, made)` fires with the error or the first directory `made` -that had to be created, if any. - -## mkdirp.sync(dir, mode) - -Synchronously create a new directory and any necessary subdirectories at `dir` -with octal permission string `mode`. - -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -Returns the first directory that had to be created, if any. - -# install - -With [npm](http://npmjs.org) do: - -``` -npm install mkdirp -``` - -# license - -MIT diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/chmod.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/chmod.js deleted file mode 100644 index 520dcb8e..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/chmod.js +++ /dev/null @@ -1,38 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -test('chmod-pre', function (t) { - var mode = 0744 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.equal(stat && stat.mode & 0777, mode, 'should be 0744'); - t.end(); - }); - }); -}); - -test('chmod', function (t) { - var mode = 0755 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.end(); - }); - }); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/clobber.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/clobber.js deleted file mode 100644 index 0eb70998..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/clobber.js +++ /dev/null @@ -1,37 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -// a file in the way -var itw = ps.slice(0, 3).join('/'); - - -test('clobber-pre', function (t) { - console.error("about to write to "+itw) - fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); - - fs.stat(itw, function (er, stat) { - t.ifError(er) - t.ok(stat && stat.isFile(), 'should be file') - t.end() - }) -}) - -test('clobber', function (t) { - t.plan(2); - mkdirp(file, 0755, function (err) { - t.ok(err); - t.equal(err.code, 'ENOTDIR'); - t.end(); - }); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/mkdirp.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/mkdirp.js deleted file mode 100644 index b07cd70c..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/mkdirp.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('woo', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/perm.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/perm.js deleted file mode 100644 index 23a7abbd..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/perm.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('async perm', function (t) { - t.plan(2); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); - -test('async root perm', function (t) { - mkdirp('/tmp', 0755, function (err) { - if (err) t.fail(err); - t.end(); - }); - t.end(); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/perm_sync.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/perm_sync.js deleted file mode 100644 index f685f609..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/perm_sync.js +++ /dev/null @@ -1,39 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('sync perm', function (t) { - t.plan(2); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json'; - - mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }); -}); - -test('sync root perm', function (t) { - t.plan(1); - - var file = '/tmp'; - mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/race.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/race.js deleted file mode 100644 index 96a04476..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/race.js +++ /dev/null @@ -1,41 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('race', function (t) { - t.plan(4); - var ps = [ '', 'tmp' ]; - - for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); - } - var file = ps.join('/'); - - var res = 2; - mk(file, function () { - if (--res === 0) t.end(); - }); - - mk(file, function () { - if (--res === 0) t.end(); - }); - - function mk (file, cb) { - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - if (cb) cb(); - } - }) - }) - }); - } -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/rel.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/rel.js deleted file mode 100644 index 79858243..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/rel.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('rel', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var cwd = process.cwd(); - process.chdir('/tmp'); - - var file = [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - process.chdir(cwd); - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/return.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/return.js deleted file mode 100644 index bce68e56..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/return.js +++ /dev/null @@ -1,25 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('return value', function (t) { - t.plan(4); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - // should return the first dir created. - // By this point, it would be profoundly surprising if /tmp didn't - // already exist, since every other test makes things in there. - mkdirp(file, function (err, made) { - t.ifError(err); - t.equal(made, '/tmp/' + x); - mkdirp(file, function (err, made) { - t.ifError(err); - t.equal(made, null); - }); - }); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/return_sync.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/return_sync.js deleted file mode 100644 index 7c222d35..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/return_sync.js +++ /dev/null @@ -1,24 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('return value', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - // should return the first dir created. - // By this point, it would be profoundly surprising if /tmp didn't - // already exist, since every other test makes things in there. - // Note that this will throw on failure, which will fail the test. - var made = mkdirp.sync(file); - t.equal(made, '/tmp/' + x); - - // making the same file again should have no effect. - made = mkdirp.sync(file); - t.equal(made, null); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/root.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/root.js deleted file mode 100644 index 97ad7a2f..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/root.js +++ /dev/null @@ -1,18 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('root', function (t) { - // '/' on unix, 'c:/' on windows. - var file = path.resolve('/'); - - mkdirp(file, 0755, function (err) { - if (err) throw err - fs.stat(file, function (er, stat) { - if (er) throw er - t.ok(stat.isDirectory(), 'target is a directory'); - t.end(); - }) - }); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/sync.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/sync.js deleted file mode 100644 index 7530cada..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/sync.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('sync', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - try { - mkdirp.sync(file, 0755); - } catch (err) { - t.fail(err); - return t.end(); - } - - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }); - }); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/umask.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/umask.js deleted file mode 100644 index 64ccafe2..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/umask.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('implicit mode from umask', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0777 & (~process.umask())); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/umask_sync.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/umask_sync.js deleted file mode 100644 index 35bd5cbb..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/mkdirp/test/umask_sync.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('umask sync modes', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - try { - mkdirp.sync(file); - } catch (err) { - t.fail(err); - return t.end(); - } - - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, (0777 & (~process.umask()))); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }); - }); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/.npmignore b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/.npmignore deleted file mode 100644 index 9ecd205c..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -.*.sw[op] -.DS_Store -test/fixtures/out diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/.travis.yml b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/.travis.yml deleted file mode 100644 index f686c49b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js - -node_js: - - 0.4 - - 0.6 - - 0.7 - - 0.8 diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/LICENSE.md b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/LICENSE.md deleted file mode 100644 index e2b9b413..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -# MIT License - -###Copyright (C) 2011 by Charlie McConnell - -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/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/README.md b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/README.md deleted file mode 100644 index 79ad086c..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# ncp - Asynchronous recursive file & directory copying - -[![Build Status](https://secure.travis-ci.org/AvianFlu/ncp.png)](http://travis-ci.org/AvianFlu/ncp) - -Think `cp -r`, but pure node, and asynchronous. `ncp` can be used both as a CLI tool and programmatically. - -## Command Line usage - -Usage is simple: `ncp [source] [dest] [--limit=concurrency limit] -[--filter=filter] --stopOnErr` - -The 'filter' is a Regular Expression - matched files will be copied. - -The 'concurrency limit' is an integer that represents how many pending file system requests `ncp` has at a time. - -'stopOnErr' is a boolean flag that will tell `ncp` to stop immediately if any -errors arise, rather than attempting to continue while logging errors. - -If there are no errors, `ncp` will output `done.` when complete. If there are errors, the error messages will be logged to `stdout` and to `./ncp-debug.log`, and the copy operation will attempt to continue. - -## Programmatic usage - -Programmatic usage of `ncp` is just as simple. The only argument to the completion callback is a possible error. - -```javascript -var ncp = require('ncp').ncp; - -ncp.limit = 16; - -ncp(source, destination, function (err) { - if (err) { - return console.error(err); - } - console.log('done!'); -}); -``` - -You can also call ncp like `ncp(source, destination, options, callback)`. -`options` should be a dictionary. Currently, such options are available: - - * `options.filter` - a `RegExp` instance, against which each file name is - tested to determine whether to copy it or not, or a function taking single - parameter: copied file name, returning `true` or `false`, determining - whether to copy file or not. - - * `options.transform` - a function: `function (read, write) { read.pipe(write) }` - used to apply streaming transforms while copying. - - * `options.clobber` - boolean=true. if set to false, `ncp` will not overwrite - destination files that already exist. - -Please open an issue if any bugs arise. As always, I accept (working) pull requests, and refunds are available at `/dev/null`. diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/bin/ncp b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/bin/ncp deleted file mode 100755 index 388eaba6..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/bin/ncp +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env node - - - - -var ncp = require('../lib/ncp'), - args = process.argv.slice(2), - source, dest; - -if (args.length < 2) { - console.error('Usage: ncp [source] [destination] [--filter=filter] [--limit=concurrency limit]'); - process.exit(1); -} - -// parse arguments the hard way -function startsWith(str, prefix) { - return str.substr(0, prefix.length) == prefix; -} - -var options = {}; -args.forEach(function (arg) { - if (startsWith(arg, "--limit=")) { - options.limit = parseInt(arg.split('=', 2)[1], 10); - } - if (startsWith(arg, "--filter=")) { - options.filter = new RegExp(arg.split('=', 2)[1]); - } - if (startsWith(arg, "--stoponerr")) { - options.stopOnErr = true; - } -}); - -ncp.ncp(args[0], args[1], options, function (err) { - if (Array.isArray(err)) { - console.error('There were errors during the copy.'); - err.forEach(function (err) { - console.error(err.stack || err.message); - }); - process.exit(1); - } - else if (err) { - console.error('An error has occurred.'); - console.error(err.stack || err.message); - process.exit(1); - } -}); - - diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/lib/ncp.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/lib/ncp.js deleted file mode 100644 index d871e009..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/lib/ncp.js +++ /dev/null @@ -1,222 +0,0 @@ -var fs = require('fs'), - path = require('path'); - -module.exports = ncp -ncp.ncp = ncp - -function ncp (source, dest, options, callback) { - if (!callback) { - callback = options; - options = {}; - } - - var basePath = process.cwd(), - currentPath = path.resolve(basePath, source), - targetPath = path.resolve(basePath, dest), - filter = options.filter, - transform = options.transform, - clobber = options.clobber !== false, - errs = null, - started = 0, - finished = 0, - running = 0, - limit = options.limit || ncp.limit || 16; - - limit = (limit < 1) ? 1 : (limit > 512) ? 512 : limit; - - startCopy(currentPath); - - function startCopy(source) { - started++; - if (filter) { - if (filter instanceof RegExp) { - if (!filter.test(source)) { - return cb(true); - } - } - else if (typeof filter === 'function') { - if (!filter(source)) { - return cb(true); - } - } - } - return getStats(source); - } - - function defer(fn) { - if (typeof(setImmediate) === 'function') - return setImmediate(fn); - return process.nextTick(fn); - } - - function getStats(source) { - if (running >= limit) { - return defer(function () { - getStats(source); - }); - } - running++; - fs.lstat(source, function (err, stats) { - var item = {}; - if (err) { - return onError(err); - } - - // We need to get the mode from the stats object and preserve it. - item.name = source; - item.mode = stats.mode; - - if (stats.isDirectory()) { - return onDir(item); - } - else if (stats.isFile()) { - return onFile(item); - } - else if (stats.isSymbolicLink()) { - // Symlinks don't really need to know about the mode. - return onLink(source); - } - }); - } - - function onFile(file) { - var target = file.name.replace(currentPath, targetPath); - isWritable(target, function (writable) { - if (writable) { - return copyFile(file, target); - } - if(clobber) - rmFile(target, function () { - copyFile(file, target); - }); - }); - } - - function copyFile(file, target) { - var readStream = fs.createReadStream(file.name), - writeStream = fs.createWriteStream(target, { mode: file.mode }); - if(transform) { - transform(readStream, writeStream,file); - } else { - readStream.pipe(writeStream); - } - readStream.once('end', cb); - } - - function rmFile(file, done) { - fs.unlink(file, function (err) { - if (err) { - return onError(err); - } - return done(); - }); - } - - function onDir(dir) { - var target = dir.name.replace(currentPath, targetPath); - isWritable(target, function (writable) { - if (writable) { - return mkDir(dir, target); - } - copyDir(dir.name); - }); - } - - function mkDir(dir, target) { - fs.mkdir(target, dir.mode, function (err) { - if (err) { - return onError(err); - } - copyDir(dir.name); - }); - } - - function copyDir(dir) { - fs.readdir(dir, function (err, items) { - if (err) { - return onError(err); - } - items.forEach(function (item) { - startCopy(dir + '/' + item); - }); - return cb(); - }); - } - - function onLink(link) { - var target = link.replace(currentPath, targetPath); - fs.readlink(link, function (err, resolvedPath) { - if (err) { - return onError(err); - } - checkLink(resolvedPath, target); - }); - } - - function checkLink(resolvedPath, target) { - isWritable(target, function (writable) { - if (writable) { - return makeLink(resolvedPath, target); - } - fs.readlink(target, function (err, targetDest) { - if (err) { - return onError(err); - } - if (targetDest === resolvedPath) { - return cb(); - } - return rmFile(target, function () { - makeLink(resolvedPath, target); - }); - }); - }); - } - - function makeLink(linkPath, target) { - fs.symlink(linkPath, target, function (err) { - if (err) { - return onError(err); - } - return cb(); - }); - } - - function isWritable(path, done) { - fs.lstat(path, function (err, stats) { - if (err) { - if (err.code === 'ENOENT') return done(true); - return done(false); - } - return done(false); - }); - } - - function onError(err) { - if (options.stopOnError) { - return callback(err); - } - else if (!errs && options.errs) { - errs = fs.createWriteStream(options.errs); - } - else if (!errs) { - errs = []; - } - if (typeof errs.write === 'undefined') { - errs.push(err); - } - else { - errs.write(err.stack + '\n\n'); - } - return cb(); - } - - function cb(skipped) { - if (!skipped) running--; - finished++; - if ((started === finished) && (running === 0)) { - return errs ? callback(errs) : callback(null); - } - } -}; - - diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/package.json b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/package.json deleted file mode 100644 index 7c87da71..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "ncp", - "version": "0.4.2", - "author": { - "name": "AvianFlu", - "email": "charlie@charlieistheman.com" - }, - "description": "Asynchronous recursive file copy utility.", - "bin": { - "ncp": "./bin/ncp" - }, - "devDependencies": { - "vows": "0.6.x", - "rimraf": "1.0.x", - "read-dir-files": "0.0.x" - }, - "main": "./lib/ncp.js", - "repository": { - "type": "git", - "url": "https://github.com/AvianFlu/ncp.git" - }, - "keywords": [ - "cli", - "copy" - ], - "license": "MIT", - "engine": { - "node": ">=0.4" - }, - "scripts": { - "test": "vows --isolate --spec" - }, - "readme": "# ncp - Asynchronous recursive file & directory copying\n\n[![Build Status](https://secure.travis-ci.org/AvianFlu/ncp.png)](http://travis-ci.org/AvianFlu/ncp)\n\nThink `cp -r`, but pure node, and asynchronous. `ncp` can be used both as a CLI tool and programmatically.\n\n## Command Line usage\n\nUsage is simple: `ncp [source] [dest] [--limit=concurrency limit]\n[--filter=filter] --stopOnErr`\n\nThe 'filter' is a Regular Expression - matched files will be copied.\n\nThe 'concurrency limit' is an integer that represents how many pending file system requests `ncp` has at a time.\n\n'stopOnErr' is a boolean flag that will tell `ncp` to stop immediately if any\nerrors arise, rather than attempting to continue while logging errors.\n\nIf there are no errors, `ncp` will output `done.` when complete. If there are errors, the error messages will be logged to `stdout` and to `./ncp-debug.log`, and the copy operation will attempt to continue.\n\n## Programmatic usage\n\nProgrammatic usage of `ncp` is just as simple. The only argument to the completion callback is a possible error. \n\n```javascript\nvar ncp = require('ncp').ncp;\n\nncp.limit = 16;\n\nncp(source, destination, function (err) {\n if (err) {\n return console.error(err);\n }\n console.log('done!');\n});\n```\n\nYou can also call ncp like `ncp(source, destination, options, callback)`. \n`options` should be a dictionary. Currently, such options are available:\n\n * `options.filter` - a `RegExp` instance, against which each file name is\n tested to determine whether to copy it or not, or a function taking single\n parameter: copied file name, returning `true` or `false`, determining\n whether to copy file or not.\n\n * `options.transform` - a function: `function (read, write) { read.pipe(write) }`\n used to apply streaming transforms while copying.\n\n * `options.clobber` - boolean=true. if set to false, `ncp` will not overwrite \n destination files that already exist.\n\nPlease open an issue if any bugs arise. As always, I accept (working) pull requests, and refunds are available at `/dev/null`.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/AvianFlu/ncp/issues" - }, - "homepage": "https://github.com/AvianFlu/ncp", - "_id": "ncp@0.4.2", - "_from": "ncp@~0.4.2" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/a b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/a deleted file mode 100644 index 802992c4..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/a +++ /dev/null @@ -1 +0,0 @@ -Hello world diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/b b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/b deleted file mode 100644 index 9f6bb185..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/b +++ /dev/null @@ -1 +0,0 @@ -Hello ncp diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/c b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/c deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/d b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/d deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/e b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/e deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/f b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/f deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/sub/a b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/sub/a deleted file mode 100644 index cf291b5e..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/sub/a +++ /dev/null @@ -1 +0,0 @@ -Hello nodejitsu diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/sub/b b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/sub/b deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/ncp-test.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/ncp-test.js deleted file mode 100644 index 3c613f77..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/ncp/test/ncp-test.js +++ /dev/null @@ -1,86 +0,0 @@ -var assert = require('assert'), - path = require('path'), - rimraf = require('rimraf'), - vows = require('vows'), - readDirFiles = require('read-dir-files'), - ncp = require('../').ncp; - -var fixtures = path.join(__dirname, 'fixtures'), - src = path.join(fixtures, 'src'), - out = path.join(fixtures, 'out'); - -vows.describe('ncp').addBatch({ - 'When copying a directory of files': { - topic: function () { - var cb = this.callback; - rimraf(out, function () { - ncp(src, out, cb); - }); - }, - 'files should be copied': { - topic: function () { - var cb = this.callback; - - readDirFiles(src, 'utf8', function (srcErr, srcFiles) { - readDirFiles(out, 'utf8', function (outErr, outFiles) { - cb(outErr, srcFiles, outFiles); - }); - }); - }, - 'and the destination should match the source': function (err, srcFiles, outFiles) { - assert.isNull(err); - assert.deepEqual(srcFiles, outFiles); - } - } - } -}).addBatch({ - 'When copying files using filter': { - topic: function() { - var cb = this.callback; - var filter = function(name) { - return name.substr(name.length - 1) != 'a' - } - rimraf(out, function () { - ncp(src, out, {filter: filter}, cb); - }); - }, - 'it should copy files': { - topic: function () { - var cb = this.callback; - - readDirFiles(src, 'utf8', function (srcErr, srcFiles) { - function filter(files) { - for (var fileName in files) { - var curFile = files[fileName]; - if (curFile instanceof Object) - return filter(curFile); - if (fileName.substr(fileName.length - 1) == 'a') - delete files[fileName]; - } - } - filter(srcFiles); - readDirFiles(out, 'utf8', function (outErr, outFiles) { - cb(outErr, srcFiles, outFiles); - }); - }); - }, - 'and destination files should match source files that pass filter': function (err, srcFiles, outFiles) { - assert.isNull(err); - assert.deepEqual(srcFiles, outFiles); - } - } - } -}).addBatch({ - 'When copying files using transform': { - 'it should pass file descriptors along to transform functions': function() { - ncp(src, out, { - transform: function(read,write,file) { - assert.notEqual(file.name, undefined); - assert.strictEqual(typeof file.mode,'number'); - read.pipe(write); - } - }, function(){}); - } - } -}).export(module); - diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/AUTHORS b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/AUTHORS deleted file mode 100644 index 247b7543..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/AUTHORS +++ /dev/null @@ -1,6 +0,0 @@ -# Authors sorted by whether or not they're me. -Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me) -Wayne Larsen <wayne@larsen.st> (http://github.com/wvl) -ritch <skawful@gmail.com> -Marcel Laverdet -Yosef Dinerstein <yosefd@microsoft.com> diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/LICENSE b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/LICENSE deleted file mode 100644 index 05a40109..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -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/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/README.md b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/README.md deleted file mode 100644 index cd123b65..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/README.md +++ /dev/null @@ -1,30 +0,0 @@ -`rm -rf` for node. - -Install with `npm install rimraf`, or just drop rimraf.js somewhere. - -## API - -`rimraf(f, callback)` - -The callback will be called with an error if there is one. Certain -errors are handled for you: - -* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of - `opts.maxBusyTries` times before giving up. -* `ENOENT` - If the file doesn't exist, rimraf will return - successfully, since your desired outcome is already the case. - -## rimraf.sync - -It can remove stuff synchronously, too. But that's not so good. Use -the async API. It's better. - -## CLI - -If installed with `npm install rimraf -g` it can be used as a global -command `rimraf <path>` which is useful for cross platform support. - -## mkdirp - -If you need to create a directory recursively, check out -[mkdirp](https://github.com/substack/node-mkdirp). diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/bin.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/bin.js deleted file mode 100755 index 29bfa8a6..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/bin.js +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env node - -var rimraf = require('./') - -var help = false -var dashdash = false -var args = process.argv.slice(2).filter(function(arg) { - if (dashdash) - return !!arg - else if (arg === '--') - dashdash = true - else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) - help = true - else - return !!arg -}); - -if (help || args.length === 0) { - // If they didn't ask for help, then this is not a "success" - var log = help ? console.log : console.error - log('Usage: rimraf <path>') - log('') - log(' Deletes all files and folders at "path" recursively.') - log('') - log('Options:') - log('') - log(' -h, --help Display this usage info') - process.exit(help ? 0 : 1) -} else { - args.forEach(function(arg) { - rimraf.sync(arg) - }) -} diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/package.json b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/package.json deleted file mode 100644 index 71f7dea0..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "rimraf", - "version": "2.2.6", - "main": "rimraf.js", - "description": "A deep deletion module for node (like `rm -rf`)", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": { - "type": "MIT", - "url": "https://github.com/isaacs/rimraf/raw/master/LICENSE" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/rimraf.git" - }, - "scripts": { - "test": "cd test && bash run.sh" - }, - "bin": { - "rimraf": "./bin.js" - }, - "contributors": [ - { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - { - "name": "Wayne Larsen", - "email": "wayne@larsen.st", - "url": "http://github.com/wvl" - }, - { - "name": "ritch", - "email": "skawful@gmail.com" - }, - { - "name": "Marcel Laverdet" - }, - { - "name": "Yosef Dinerstein", - "email": "yosefd@microsoft.com" - } - ], - "readme": "`rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one. Certain\nerrors are handled for you:\n\n* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of\n `opts.maxBusyTries` times before giving up.\n* `ENOENT` - If the file doesn't exist, rimraf will return\n successfully, since your desired outcome is already the case.\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too. But that's not so good. Use\nthe async API. It's better.\n\n## CLI\n\nIf installed with `npm install rimraf -g` it can be used as a global\ncommand `rimraf <path>` which is useful for cross platform support.\n\n## mkdirp\n\nIf you need to create a directory recursively, check out\n[mkdirp](https://github.com/substack/node-mkdirp).\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/rimraf/issues" - }, - "homepage": "https://github.com/isaacs/rimraf", - "_id": "rimraf@2.2.6", - "_from": "rimraf@~2.2.0" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/rimraf.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/rimraf.js deleted file mode 100644 index ce62051f..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/rimraf.js +++ /dev/null @@ -1,178 +0,0 @@ -module.exports = rimraf -rimraf.sync = rimrafSync - -var path = require("path") -var fs = require("fs") - -// for EMFILE handling -var timeout = 0 -exports.EMFILE_MAX = 1000 -exports.BUSYTRIES_MAX = 3 - -var isWindows = (process.platform === "win32") - -function rimraf (p, cb) { - if (!cb) throw new Error("No callback passed to rimraf()") - - var busyTries = 0 - rimraf_(p, function CB (er) { - if (er) { - if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY") && - busyTries < exports.BUSYTRIES_MAX) { - busyTries ++ - var time = busyTries * 100 - // try again, with the same exact callback as this one. - return setTimeout(function () { - rimraf_(p, CB) - }, time) - } - - // this one won't happen if graceful-fs is used. - if (er.code === "EMFILE" && timeout < exports.EMFILE_MAX) { - return setTimeout(function () { - rimraf_(p, CB) - }, timeout ++) - } - - // already gone - if (er.code === "ENOENT") er = null - } - - timeout = 0 - cb(er) - }) -} - -// Two possible strategies. -// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR -// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR -// -// Both result in an extra syscall when you guess wrong. However, there -// are likely far more normal files in the world than directories. This -// is based on the assumption that a the average number of files per -// directory is >= 1. -// -// If anyone ever complains about this, then I guess the strategy could -// be made configurable somehow. But until then, YAGNI. -function rimraf_ (p, cb) { - fs.unlink(p, function (er) { - if (er) { - if (er.code === "ENOENT") - return cb(null) - if (er.code === "EPERM") - return (isWindows) ? fixWinEPERM(p, er, cb) : rmdir(p, er, cb) - if (er.code === "EISDIR") - return rmdir(p, er, cb) - } - return cb(er) - }) -} - -function fixWinEPERM (p, er, cb) { - fs.chmod(p, 666, function (er2) { - if (er2) - cb(er2.code === "ENOENT" ? null : er) - else - fs.stat(p, function(er3, stats) { - if (er3) - cb(er3.code === "ENOENT" ? null : er) - else if (stats.isDirectory()) - rmdir(p, er, cb) - else - fs.unlink(p, cb) - }) - }) -} - -function fixWinEPERMSync (p, er, cb) { - try { - fs.chmodSync(p, 666) - } catch (er2) { - if (er2.code !== "ENOENT") - throw er - } - - try { - var stats = fs.statSync(p) - } catch (er3) { - if (er3 !== "ENOENT") - throw er - } - - if (stats.isDirectory()) - rmdirSync(p, er) - else - fs.unlinkSync(p) -} - -function rmdir (p, originalEr, cb) { - // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) - // if we guessed wrong, and it's not a directory, then - // raise the original error. - fs.rmdir(p, function (er) { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) - rmkids(p, cb) - else if (er && er.code === "ENOTDIR") - cb(originalEr) - else - cb(er) - }) -} - -function rmkids(p, cb) { - fs.readdir(p, function (er, files) { - if (er) - return cb(er) - var n = files.length - if (n === 0) - return fs.rmdir(p, cb) - var errState - files.forEach(function (f) { - rimraf(path.join(p, f), function (er) { - if (errState) - return - if (er) - return cb(errState = er) - if (--n === 0) - fs.rmdir(p, cb) - }) - }) - }) -} - -// this looks simpler, and is strictly *faster*, but will -// tie up the JavaScript thread and fail on excessively -// deep directory trees. -function rimrafSync (p) { - try { - fs.unlinkSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - if (er.code === "EPERM") - return isWindows ? fixWinEPERMSync(p, er) : rmdirSync(p, er) - if (er.code !== "EISDIR") - throw er - rmdirSync(p, er) - } -} - -function rmdirSync (p, originalEr) { - try { - fs.rmdirSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - if (er.code === "ENOTDIR") - throw originalEr - if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") - rmkidsSync(p) - } -} - -function rmkidsSync (p) { - fs.readdirSync(p).forEach(function (f) { - rimrafSync(path.join(p, f)) - }) - fs.rmdirSync(p) -} diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/test/run.sh b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/test/run.sh deleted file mode 100644 index 598f0163..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/test/run.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -set -e -for i in test-*.js; do - echo -n $i ... - bash setup.sh - node $i - ! [ -d target ] - echo "pass" -done -rm -rf target diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/test/setup.sh b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/test/setup.sh deleted file mode 100644 index 2602e631..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/test/setup.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -set -e - -files=10 -folders=2 -depth=4 -target="$PWD/target" - -rm -rf target - -fill () { - local depth=$1 - local files=$2 - local folders=$3 - local target=$4 - - if ! [ -d $target ]; then - mkdir -p $target - fi - - local f - - f=$files - while [ $f -gt 0 ]; do - touch "$target/f-$depth-$f" - let f-- - done - - let depth-- - - if [ $depth -le 0 ]; then - return 0 - fi - - f=$folders - while [ $f -gt 0 ]; do - mkdir "$target/folder-$depth-$f" - fill $depth $files $folders "$target/d-$depth-$f" - let f-- - done -} - -fill $depth $files $folders $target - -# sanity assert -[ -d $target ] diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/test/test-async.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/test/test-async.js deleted file mode 100644 index 9c2e0b7b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/test/test-async.js +++ /dev/null @@ -1,5 +0,0 @@ -var rimraf = require("../rimraf") - , path = require("path") -rimraf(path.join(__dirname, "target"), function (er) { - if (er) throw er -}) diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/test/test-sync.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/test/test-sync.js deleted file mode 100644 index eb71f104..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/node_modules/rimraf/test/test-sync.js +++ /dev/null @@ -1,3 +0,0 @@ -var rimraf = require("../rimraf") - , path = require("path") -rimraf.sync(path.join(__dirname, "target")) diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/package.json b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/package.json deleted file mode 100755 index 03491b04..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/fs-extra/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "fs-extra", - "version": "0.8.1", - "description": "fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as mkdir -p, cp -r, and rm -rf.", - "homepage": "https://github.com/jprichardson/node-fs-extra", - "repository": { - "type": "git", - "url": "https://github.com/jprichardson/node-fs-extra" - }, - "keywords": [ - "fs", - "file", - "file system", - "copy", - "directory", - "extra", - "mkdirp", - "mkdir", - "mkdirs", - "recursive", - "json", - "read", - "write", - "extra", - "delete", - "remove", - "touch", - "create", - "text", - "output" - ], - "author": { - "name": "JP Richardson", - "email": "jprichardson@gmail.com" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/jprichardson/node-fs-extra/raw/master/LICENSE" - } - ], - "dependencies": { - "ncp": "~0.4.2", - "mkdirp": "0.3.x", - "jsonfile": "~1.1.0", - "rimraf": "~2.2.0" - }, - "devDependencies": { - "mocha": "*", - "path-extra": "0.0.x", - "testutil": "~0.5.0" - }, - "main": "./lib/index", - "scripts": { - "test": "mocha test" - }, - "readme": "\nNode.js: fs-extra\n=================\n\n[![build status](https://secure.travis-ci.org/jprichardson/node-fs-extra.png)](http://travis-ci.org/jprichardson/node-fs-extra)\n\nThis module adds a few extra file system methods that aren't included in the native `fs` module. It is a drop in replacement for `fs`.\n\n\n\nWhy?\n----\n\nI got tired of including `mkdirp`, `rimraf`, and `cp -r` in most of my projects. \n\n\n\n\nInstallation\n------------\n\n npm install --save fs-extra\n\n\n\nUsage\n-----\n\n`fs-extra` is a drop in replacement for native `fs`. All methods in `fs` are unmodified and attached to `fs-extra`.\n\nYou don't ever need to include the original `fs` module again:\n\n```javascript\nvar fs = require('fs') //this is no longer necessary\n```\n\nyou can now do this:\n\n```javascript\nvar fs = require('fs-extra'); //var fs = require('fs')\n```\n\nor if you prefer to make it clear that you're using `fs-extra` and not `fs`, you may want \nto do this:\n\n```javascript\n//var fs = require('fs')\nvar fse = require('fs-extra')\n```\n\nyou can also keep, both, but it's redundant:\n\n```javascript\nvar fs = require('fs')\n , fse = require('fs-extra')\n```\n\n\n\nMethods\n-------\n\n**NOTE:** You can still use the native Node.js methods. They are copied over to `fs-extra`.\n\n\n### copy(src, dest, [filter], callback)\n\nCopy a file or directory. The directory can have contents. Like `cp -r`. There isn't a synchronous version implemented yet.\n\nSync: `copySync()`\n\n\nExamples:\n\n```javascript\nvar fs = require('fs-extra');\n\nfs.copy('/tmp/myfile', '/tmp/mynewfile', function(err){\n if (err) return console.error(err);\n\n console.log(\"success!\")\n}); //copies file\n\nfs.copy('/tmp/mydir', '/tmp/mynewdir', function(err){\n if (err) return console.error(err);\n \n console.log(\"success!\")\n}); //copies directory, even if it has subdirectories or files\n```\n\n\n### createFile(file, callback) \n\nCreates a file. If the file that is requested to be created is in directories that do not exist, these directories are created. If the file already exists, it is **NOT MODIFIED**.\n\nSync: `createFileSync()`\n\n\nExample:\n\n```javascript\nvar fs = require('fs-extra')\n\nvar file = '/tmp/this/path/does/not/exist/file.txt'\n\nfs.createFile(file, function(err) {\n console.log(err); //null\n //file has now been created, including the directory it is to be placed in\n})\n```\n\n\n\n### mkdirs(dir, callback) \n\nCreates a directory. If the parent hierarchy doesn't exist, it's created. Like `mkdir -p`.\n\nAlias: `mkdirp()`\n\nSync: `mkdirsSync()` / `mkdirpSync()`\n\n\nExamples:\n\n```javascript\nvar fs = require('fs-extra');\n\nfs.mkdirs('/tmp/some/long/path/that/prob/doesnt/exist', function(err){\n if (err) return console.error(err);\n \n console.log(\"success!\")\n});\n\nfs.mkdirsSync('/tmp/another/path');\n```\n\n\n### outputFile(file, data, callback)\n\nAlmost the same as `writeFile`, except that if the directory does not exist, it's created.\n\nSync: `outputFileSync()`\n\n\nExample:\n\n```javascript\nvar fs = require('fs-extra')\nvar file = '/tmp/this/path/does/not/exist/file.txt'\n\nfs.outputFile(file, 'hello!', function(err) {\n console.log(err); //null\n\n fs.readFile(file, 'utf8', function(err, data) {\n console.log(data); //hello!\n })\n})\n```\n\n\n\n### outputJson(file, data, callback)\n\nAlmost the same as `writeJson`, except that if the directory does not exist, it's created.\n\nAlias: `outputJSON()\n\nSync: `outputJsonSync()`, `outputJSONSync()`\n\n\nExample:\n\n```javascript\nvar fs = require('fs-extra')\nvar file = '/tmp/this/path/does/not/exist/file.txt'\n\nfs.outputJson(file, {name: 'JP'}, function(err) {\n console.log(err); //null\n\n fs.readJson(file, function(err, data) {\n console.log(data.name); //'JP\n })\n})\n```\n\n\n\n### readJson(file, [options], callback) \n\nReads a JSON file and then parses it into an object. `options` are the same that you'd pass to `fs.readFile`.\n\nAlias: `readJSON()`\n\nSync: `readJsonSync()`, `readJSONSync()`\n\n\nExample:\n\n```javascript\nvar fs = require('fs-extra');\n\nfs.readJson('./package.json', function(err, packageObj) {\n console.log(packageObj.version); //0.1.3\n});\n```\n\n\n### remove(dir, callback)\n\nRemoves a file or directory. The directory can have contents. Like `rm -rf`.\n\nAlias: `delete()`\n\nSync: `removeSync()` / `deleteSync()`\n\n\nExamples:\n\n```javascript\nvar fs = require('fs-extra');\n\nfs.remove('/tmp/myfile', function(err){\n if (err) return console.error(err);\n \n console.log(\"success!\")\n});\n\nfs.removeSync('/home/jprichardson'); //I just deleted my entire HOME directory. \n```\n\n\n\n### writeJson(file, object, [options], callback) \n\nWrites an object to a JSON file. `options` are the same that you'd pass to `fs.readFile`.\n\nAlias: `writeJSON()`\n\nSync: `writeJsonSync()`, `writeJSONSync()`\n\nExample:\n\n```javascript\nvar fs = require('fs-extra');\nfs.writeJson('./package.json', {name: 'fs-extra'}, function(err){\n console.log(err);\n});\n```\n\n\n\nRoadmap to 1.0.0\n-----------------\n\nThis contains items that I'm considering doing. I'd love community feedback.\n\n* File system walker. I really like this one: https://github.com/daaku/nodejs-walker ... this might be adding too much. Thoughts?\n* File/directory tree watcher. There are quite a few. ... this also might be adding too much. I like this one: https://github.com/paulmillr/chokidar but I don't like that it's written in CoffeeScript. Thoughts?\n* Method to move files.\n* Thinking about moving `rimraf`, `ncp`, and `mkdirps` code into this library. I'd like fs-extra to be a stable library that module authors\ncan depend upon. A bunch of other dependencies kinda sucks for modules/libraries. (I'm leaning against this now.)\n* Change documentation to use the `fse` prefix instead of `fs`. This may encourage people to start using `fse` as a prefix and hence make their code clearer that they're not using the native `fs`. I'm very undecided on this one since `fs-extra` is a drop in replacement for the native `fs`. (I'm leaning against this now.)\n\n\n\nNaming\n------\n\nI put a lot of thought into the naming of these functions. Inspired by @coolaj86's request. So he deserves much of the credit for raising the issue. See discussion(s) here:\n\n* https://github.com/jprichardson/node-fs-extra/issues/2\n* https://github.com/flatiron/utile/issues/11\n* https://github.com/ryanmcgrath/wrench-js/issues/29\n* https://github.com/substack/node-mkdirp/issues/17\n\nFirst, I believe that in as many cases as possible, the [Node.js naming schemes](http://nodejs.org/api/fs.html) should be chosen. However, there are problems with the Node.js own naming schemes.\n\nFor example, `fs.readFile()` and `fs.readdir()`: the **F** is capitalized in *File* and the **d** is not capitalized in *dir*. Perhaps a bit pedantic, but they should still be consistent. Also, Node.js has chosen a lot of POSIX naming schemes, which I believe is great. See: `fs.mkdir()`, `fs.rmdir()`, `fs.chown()`, etc.\n\nWe have a dilemma though. How do you consistently name methods that perform the following POSIX commands: `cp`, `cp -r`, `mkdir -p`, and `rm -rf`?\n\nMy perspective: when in doubt, err on the side of simplicity. A directory is just a hierarchical grouping of directories and files. Consider that for a moment. So when you want to copy it or remove it, in most cases you'll want to copy or remove all of its contents. When you want to create a directory, if the directory that it's suppose to be contained in does not exist, then in most cases you'll want to create that too. \n\nSo, if you want to remove a file or a directory regardless of whether it has contents, just call `fs.remove(path)` or its alias `fs.delete(path)`. If you want to copy a file or a directory whether it has contents, just call `fs.copy(source, destination)`. If you want to create a directory regardless of whether its parent directories exist, just call `fs.mkdirs(path)` or `fs.mkdirp(path)`. \n\n\nCredit\n------\n\n`fs-extra` wouldn't be possible without using the modules from the following authors:\n\n- [Isaac Shlueter](https://github.com/isaacs)\n- [Charlie McConnel](https://github.com/avianflu)\n- [James Halliday](https://github.com/substack)\n\n\nContributions\n-------------\n\nIf you want to contribute, please add a test if you can. Also, don't change the version in `package.json`.\n\n\n### Contributors\n\n- [JP Richardson](https://github.com/jprichardson)\n- [Mike McNeil](https://github.com/mikermcneil)\n- [Ian Crowther](https://github.com/iancrowther)\n- [Stephen Mathieson](https://github.com/stephenmathieson)\n- [Srirangan](https://github.com/Srirangan)\n- [Uli Köhler](https://github.com/ulikoehler)\n- `<your name here>`\n\n\n\n\nLicense\n-------\n\n\nLicensed under MIT\n\nCopyright (c) 2011-2013 JP Richardson\n\n[1]: http://nodejs.org/docs/latest/api/fs.html \n\n\n[jsonfile]: https://github.com/jprichardson/node-jsonfile\n\n\n\n\n\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/jprichardson/node-fs-extra/issues" - }, - "_id": "fs-extra@0.8.1", - "_from": "fs-extra@~0.8.1" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/ChangeLog.md b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/ChangeLog.md deleted file mode 100644 index a073af2e..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/ChangeLog.md +++ /dev/null @@ -1,12 +0,0 @@ -## 0.2 “Duke Dantalion” -* Add source map support. -* Add shortcuts to create nodes. -* Method `process()` now returns object with `css` and `map` keys. -* Origin CSS file option was renamed from `file` to `from`. -* Rename `Node#remove()` method to `removeSelf()` to fix name conflict. -* Node source was moved to `source` property with origin file - and node end position. -* You can set own stringify function. - -## 0.1 “Count Andromalius” -* Initial release. diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/LICENSE b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/LICENSE deleted file mode 100644 index da057b45..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright 2013 Andrey Sitnik <andrey@sitnik.ru> - -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/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/README.md b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/README.md deleted file mode 100644 index 32a70b42..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/README.md +++ /dev/null @@ -1,571 +0,0 @@ -# PostCSS - -PostCSS is a framework for CSS postprocessors, -to modify CSS by your JS function. - -It takes care of most common CSS tool tasks: - -1. parses CSS; -2. gives you usable JS API to edit CSS node tree; -3. saves modified node tree to new CSS; -4. generates (or modifies existent) source map for your changes; - -You can use this framework to write you own: - -* CSS minifier or beautifizer. -* Grunt plugin to generate sprites, include `data-uri` images - or any other works. -* Text editor plugin to automate CSS routine. -* Command-line CSS tool. - -Sponsored by [Evil Martians](http://evilmartians.com/). - -## Build with PostCSS - -* [Autoprefixer](https://github.com/ai/autoprefixer) -* [grunt-pixrem](https://github.com/robwierzbowski/grunt-pixrem) - -## Quick Example - -Let’s fix forgotten `content` property in `::before` and `::after`: - -```js -var postcss = require('postcss'); - -var contenter = postcss(function (css) { - css.eachRule(function (rule) { - if ( rule.selector.match(/::(before|after)/) ) { - // In every ::before/::after rule - - // Did we forget content property? - var good = rule.some(function (i) { return i.prop == 'content'; }); - - if ( !good ) { - // Add content: '' if we forget it - rule.prepend({ prop: 'content', value: '""' }); - } - - } - }); -}); -``` - -And then CSS with forgotten `content`: - -```css -a::before { - width: 10px; - height: 10px -} -``` - -will be fixed by our new `contenter`: - -```js -var fixed = contenter.process(css).css; -``` - -to: - -```css -a::before { - content: ""; - width: 10px; - height: 10px -} -``` - -## Features - -### Source Map - -PostCSS generates source map for its transformations: - -```js -result = processor.process(css, { map: true, from: 'from.css', to: 'to.css' }); -result.css // String with processed CSS -result.map // Source map -``` - -And modifies source map from previous step (like Sass preprocessor): - -```js -var sassMap = fs.readFileSync('from.sass.map'); -processor.process(css, { map: sassMap, from: 'from.sass.css', to: 'to.css' }); -``` - -### Preserves code formatting and indentations - -PostCSS will not change any byte of rule if you don't modify node: - -```js -postcss(function (css) { }).process(css).css == css; -``` - -And when you modify CSS nodes, PostCSS will try to copy coding style: - -```js -contenter.process("a::before{color: black}") -// a::before{content: '';color: black} - -contenter.process("a::before {\n color: black;\n }") -// a::before { -// content: ''; -// color: black; -// } -``` - -## Why PostCSS Better Than … - -### Preprocessors - -Preprocessors (like Sass or Stylus) give us special language with variables, -mixins, statements and compile it to CSS. Compass, nib and other mixins -libraries use this languages to work with prefixes, sprites and inline images. - -But Sass and Stylus languages were created to be syntax-sugar for CSS. -Writing really complicated programs using preporcessor languages is very difficult. -[Autoprefixer] is absolutely impossible on Sass. - -PostCSS gives you comfort and power of JS or CoffeeScript to working with CSS. -You can do really magic things with wide range of [npm] libraries. - -But postprocessors are not enemies for preprocessors. Sass and Stylus is still -the best way to improve readability and add some syntax sugar to CSS. You can easily combine preprocessors and postprocessors. - -[Autoprefixer]: https://github.com/ai/autoprefixer -[npm]: https://npmjs.org/ - -### RegExp - -Some Grunt plugins modify CSS with regular expressions. But CSS parser and -node tree are much safer way to edit CSS. Also regexps will break source maps -generated by preprocessors. - -### CSS Parsers - -There are a lot of good CSS parsers, like [Gonzales]. But they help you only -with first step. - -Unlike them PostCSS gives you useful high level API (for example, -safe iterators) and changes source map generator (or modifier for existing -source map from preprocessors). - -[Gonzales]: https://github.com/css/gonzales - -### Rework - -[Rework] was a first CSS postprocessors framework. PostCSS is very similar -to it. - -But Rework has no high level API and rewrite your CSS code style -and indentations. So it can’t be used in text editor plugins. - -Unlike it PostCSS preserves all spaces and code formatting. -If you don't change rule, output will be byte‑to‑byte equal. - -[Rework]: https://github.com/visionmedia/rework - -## Usage - -### Processor - -Function `postcss(fn)` creates processor by your function: - -```js -var postcss = require('postcss'); - -var processor = postcss(function (css) { - // Code to modify CSS -}); -``` - -If you want to combine multiple processors (and parse CSS only once), -you can create empty processor and add several functions by `use(fn)` method: - -```js -var all = postcss(). - use(prefixer). - use(minifing); -``` - -Processor function can just change current CSS node tree: - -```js -postcss(function (css) { - css.append( /* new rule */ ) -}); -``` - -or create totally new CSS root and return it: - -```js -postcss(function (css) { - var newCSS = postcss.root() - // Add rules and declarations - return newCSS; -}); -``` - -Processor will transform some CSS by `process(css, opts)` method: - -```js -var doubler = postcss(function (css) { - // Clone each declaration - css.eachDecl(function (decl) { - decl.parent.prepend( decl.clone() ); - }); -}); - -var css = "a { color: black; }"; -var result = processor.process(css); - -result.css //=> "a { color: black; color: black; }" -``` - -You can set original CSS filename by `from` options and make syntax error -messages much more helpful: - -```js -var wrong = "a {"; -processor.process(wrong, { from: 'main.css' }); -//=> Can't parse CSS: Unclosed block at line 1:1 in main.css -``` -### Source Map - -PostCSS will generate source map, if you set `map` option to `true` -in `process(css, opts)` method. - -You must set input and output CSS files paths (by `from` and `to` options) -to generate correct map. - -```js -var result = processor.process(css, { - map: true, - from: 'main.css', - to: 'main.out.css' -}); - -result.map //=> '{"version":3,"file":"main.out.css","sources":["main.css"],"names":[],"mappings":"AAAA,KAAI"}' - -fs.writeFileSync('main.out.map', result.map); -``` - -PostCSS can also modify previous source map (for example, from Sass -compilation). So, if you compile: Sass to CSS and then minify CSS -by postprocessor, final source map will contain mapping from Sass code -to minified CSS. - -Just set original source map content (as string or JS object) -to `map` option: - -```js -var result = minifier.process(css, { - map: fs.readFileSync('main.sass.map'), - from: 'main.sass.css', - to: 'main.min.css' -}); - -result.map //=> Source map from main.sass to main.min.css -``` - -### Nodes - -Processor function will receive `Root` node with CSS node tree inside. - -```js -var processor = postcss(function (cssRoot) { -}); -``` - -There are 3 types of child nodes: `AtRule`, `Rule` and `Declaration`. -All nodes contain `toString()` and `clone()` methods. - -You can parse CSS and get `Root` node by `postcss.parse(css, opts)` method: - -```js -var postcss = require('postcss'); - -var cssRoot = postcss.parse('a { }'); -``` - -### Node Source - -Every node stores it origin file (if you set `from` option to `process` -or `parse` method) and position at `source` property: - -``` -var root = postcss.parse(css, { from: 'main.css' }); -var rule = root.rules[1]; - -rule.source.file //=> 'main.css' -rule.source.start //=> { line: 5, position: 1 } -rule.source.end //=> { line: 10, position: 5 } -``` - -### Whitespaces - -All nodes (exclude `Root`) have `before` property with all earlier spaces and comments. - -Nodes with children (`Root`, `AtRule` and `Rule`) contain also `after` property -with spaces after last child and before `}` or end of file. - -```js -var root = postcss.parse("a {\n color: black;\n}\n"); - -root.after //=> "\n" from end of file -root.rules[0].after //=> "\n" before } -root.rules[0].decls[0].before //=> "\n " before color: black -``` - -So, the simplest way to minify CSS is to clean `before` and `after` properties: - -```js -var minifier = postcss(function (css) { - css.eachDecl(function (decl) { - decl.before = ''; - }); - css.eachRule(function (rule) { - rule.before = ''; - rule.after = ''; - }); - css.eachAtRule(function (atRule) { - atRule.before = ''; - atRule.after = ''; - }); -}); - -var css = "a{\n color:black\n}\n"; -minifier.process(css).css //=> "a{color:black}" -``` - -### Raw Properties - -Some CSS values (like selectors, at-rule params and declaration values) can -contain comments. PostCSS will clean them for you: - -```js -var root = postcss.parse("a /**/ b {}"); -var ab = root.rules[0]; - -ab.selector //=> 'a b' trimmed and cleaned from comments -``` - -But PostCSS saves raw content to stringify it to CSS, if you don’t -set new value. As you can remember, PostCSS tries to save origin CSS -byte-to-byte, when it’s possible: - -```js -ab.toString() //=> 'a /**/ b {}' with comment - -ab.selector = '.link b'; -ab.toString() //=> '.link b' you change value and magic was gone -``` - -### Containers - -`Root`, `AtRule` and `Rule` nodes can contain children in `rules` or `decls` -property. - -There are common method to work with children: - -* `append(newChild)` to add child at the end of children list. -* `prepend(newChild)` to add child at the beginning of children list. -* `insertBefore(existsChild, newChild)` to insert new child before some - existent children. -* `insertAfter(existsChild, newChild)` to insert new child after some - existent children. -* `remove(child)` to remove child. -* `index(child)` to return child index. -* `some(fn)` to return true if `fn` return true on any child. -* `every(fn)` to return true if `fn` return true on all children. - -Methods `insertBefore`, `insertAfter` and `remove` can receive child node -or child index number as existent child argument. -Have in mind that `index` works much faster. - -### Children - -`AtRule`, `Rule` and `Declaration` nodes should be wrapped in other nodes. - -All children contain `parent` property with parent node: - -```js -rule.decls[0].parent == rule; -``` - -All children has `removeSelf()` method: - -```js -rule.decls[0].removeSelf(); -``` - -But `remove(index)` in parent with child index is much faster: - -```js -rule.each(function (decl, i) { - rule.remove(i); -}); -``` - -### Iterators - -All parent nodes have `each` method to iterate through children nodes: - -```js -root = postcss.parse('a { color: black; display: none }'); - -root.each(function (rule, i) { - console.log(rule.selector, i); // Will log "a 0" -}); - -root.rules[0].each(function (decl, i) { - console.log(decl.prop, i); // Will log "color 0" and "display 1" -}); -``` - -Instead of simple `for` or `Array#forEach()` this iterator is safe. -You can change children inside iteration and it will fix current index: - -```js -rule.rules.forEach(function (decl, i) { - rule.prepend( decl.clone() ); - // Will be infinity cycle, because on prepend current declaration become - // second and next index will go to current declaration again -}); - -rule.each(function (decl, i) { - rule.prepend( decl.clone() ); - // Will work correct (once clone each declaration), because after prepend - // iterator index will be recalculated -}); -``` - -Because CSS is nested structure, PostCSS contains recursive iterator -by node type: - -```js -root.eachDecl(function (decl, i) { - // Each declaration inside root -}); - -root.eachRule(function (rule, i) { - // Each rule inside root and any nested at-rules -}); - -root.eachAtRule(function (atRule, i) { - // Each at-rule inside root and any nested at-rules -}); -``` - -### Root Node - -`Root` node contains all CSS tree. Its children can be only `AtRule` or `Rule` -nodes in `rules` property. - -You can create new root by shortcut: - -```js -var root = postcss.root(); -``` - -Method `toString()` will stringify all current CSS: - -```js -root = postcss.parse(css); -root.toString() == css; -``` - -### AtRule Node - -```css -@charset 'utf-8'; - -@font-face { - font-family: 'Cool' -} - -@media print { - img { display: none } -} -``` - -`AtRule` has two own properties: `name` and `params`. - -As you see, some at-rules don’t contain any children (like `@charset` -or `@import`), some of at-rules can contain only declarations -(like `@font-face` or `@page`), but most of them can contain rules -and nested at-rules (like `@media`, `@keyframes` and others). - -Parser select `AtRule` content type by its name. If you create `AtRule` -node manually, it will detect own content type with new child type on first -`append` or other add method call: - -```js -var atRule = postcss.atRule({ name: '-x-animations' }); -atRule.rules //=> undefined -atRule.decls //=> undefined - -atRule.append( postcss.rule({ selector: 'from' }) ); -atRule.rules.length //=> 1 -atRule.decls //=> undefined -``` - -You can create new at-rule by shortcut: - -```js -var atRule = postcss.atRule({ name: 'charset', params: 'utf-8' }); -``` - -### Rule Node - -```css -a { - color: black; -} -``` - -`Rule` node has `selector` property and contains `Declaration` children -in `decls` property. - -You can miss `Declaration` constructor in `append` and other insert methods: - -```js -rule.append({ prop: 'color', value: 'black' }); -``` - -Property `semicolon` marks does last declaration in rule has semicolon or not: - -```js -var root = postcss.parse('a { color: black }'); -root.rules[0].semicolon //=> false - -var root = postcss.parse('a { color: black; }'); -root.rules[0].semicolon //=> true -``` - -You can create new rule by shortcut: - -```js -var rule = postcss.rule({ selector: 'a' }); -``` - -### Declaration Node - -```css -color: black -``` - -`Declaration` node has `prop` and `value` properties. - -You can create new declaration by shortcut: - -```js -var decl = postcss.decl({ prop: 'color', value: 'black' }); -``` - -Or use short form in `append()` and other add methods: - -```js -rule.append({ prop: 'color', value: 'black' }); -``` diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/at-rule.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/at-rule.js deleted file mode 100644 index 973259df..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/at-rule.js +++ /dev/null @@ -1,72 +0,0 @@ -(function() { - var AtRule, Container, name, _fn, _i, _len, _ref, - __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; }; - - Container = require('./container'); - - AtRule = (function(_super) { - __extends(AtRule, _super); - - function AtRule() { - this.type = 'atrule'; - AtRule.__super__.constructor.apply(this, arguments); - } - - AtRule.prototype.addMixin = function(type) { - var mixin, name, value, _ref; - mixin = type === 'rules' ? Container.WithRules : Container.WithDecls; - if (!mixin) { - return; - } - _ref = mixin.prototype; - for (name in _ref) { - value = _ref[name]; - if (name === 'constructor') { - continue; - } - this[name] = value; - } - return mixin.apply(this); - }; - - AtRule.raw('params'); - - AtRule.prototype.stringify = function(builder, last) { - var params, semicolon; - if (this.rules || this.decls) { - params = this._params.stringify({ - before: ' ', - after: ' ' - }); - return this.stringifyBlock(builder, '@' + this.name + params + '{'); - } else { - if (this.before) { - builder(this.before); - } - semicolon = !last || this.semicolon ? ';' : ''; - return builder('@' + this.name + this._params.stringify({ - before: ' ' - }) + semicolon, this); - } - }; - - return AtRule; - - })(Container); - - _ref = ['append', 'prepend']; - _fn = function(name) { - return AtRule.prototype[name] = function(child) { - this.addMixin(child.type + 's'); - return this[name](child); - }; - }; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - name = _ref[_i]; - _fn(name); - } - - module.exports = AtRule; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/container.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/container.js deleted file mode 100644 index 62e4c394..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/container.js +++ /dev/null @@ -1,243 +0,0 @@ -(function() { - var Container, Declaration, Node, _ref, - __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; }; - - Node = require('./node'); - - Declaration = require('./declaration'); - - Container = (function(_super) { - __extends(Container, _super); - - function Container() { - _ref = Container.__super__.constructor.apply(this, arguments); - return _ref; - } - - Container.prototype.stringifyContent = function(builder) { - var last, - _this = this; - if (!this.rules && !this.decls) { - return; - } - if (this.rules) { - last = this.rules.length - 1; - return this.rules.map(function(rule, i) { - return rule.stringify(builder, last === i); - }); - } else if (this.decls) { - last = this.decls.length - 1; - return this.decls.map(function(decl, i) { - return decl.stringify(builder, last !== i || _this.semicolon); - }); - } - }; - - Container.prototype.stringifyBlock = function(builder, start) { - if (this.before) { - builder(this.before); - } - builder(start, this, 'start'); - this.stringifyContent(builder); - if (this.after) { - builder(this.after); - } - return builder('}', this, 'end'); - }; - - Container.prototype.push = function(child) { - child.parent = this; - this.list.push(child); - return this; - }; - - Container.prototype.each = function(callback) { - var id, index, list; - this.lastEach || (this.lastEach = 0); - this.indexes || (this.indexes = {}); - this.lastEach += 1; - id = this.lastEach; - this.indexes[id] = 0; - list = this.list; - while (this.indexes[id] < list.length) { - index = this.indexes[id]; - callback(list[index], index); - this.indexes[id] += 1; - } - delete this.indexes[id]; - return this; - }; - - Container.prototype.eachDecl = function(callback) {}; - - Container.prototype.append = function(child) { - child = this.normalize(child, this.list[this.list.length - 1]); - this.list.push(child); - return this; - }; - - Container.prototype.prepend = function(child) { - var id, index, _ref1; - child = this.normalize(child, this.list[0], 'prepend'); - this.list.unshift(child); - _ref1 = this.indexes; - for (id in _ref1) { - index = _ref1[id]; - this.indexes[id] = index + 1; - } - return this; - }; - - Container.prototype.insertBefore = function(exist, add) { - var id, index, _ref1; - exist = this.index(exist); - add = this.normalize(add, this.list[exist], exist === 0 ? 'prepend' : void 0); - this.list.splice(exist, 0, add); - _ref1 = this.indexes; - for (id in _ref1) { - index = _ref1[id]; - if (index >= exist) { - this.indexes[id] = index + 1; - } - } - return this; - }; - - Container.prototype.insertAfter = function(exist, add) { - var id, index, _ref1; - exist = this.index(exist); - add = this.normalize(add, this.list[exist]); - this.list.splice(exist + 1, 0, add); - _ref1 = this.indexes; - for (id in _ref1) { - index = _ref1[id]; - if (index > exist) { - this.indexes[id] = index + 1; - } - } - return this; - }; - - Container.prototype.remove = function(child) { - var id, index, _ref1; - child = this.index(child); - this.list.splice(child, 1); - _ref1 = this.indexes; - for (id in _ref1) { - index = _ref1[id]; - if (index >= child) { - this.indexes[id] = index - 1; - } - } - return this; - }; - - Container.prototype.every = function(condition) { - return this.list.every(condition); - }; - - Container.prototype.some = function(condition) { - return this.list.some(condition); - }; - - Container.prototype.index = function(child) { - if (typeof child === 'number') { - return child; - } else { - return this.list.indexOf(child); - } - }; - - Container.prop('list', { - get: function() { - return this.rules || this.decls; - } - }); - - Container.prototype.normalize = function(child, sample) { - child.parent = this; - if ((child.before == null) && sample) { - child.before = sample.before; - } - return child; - }; - - return Container; - - })(Node); - - Container.WithRules = (function(_super) { - __extends(WithRules, _super); - - function WithRules() { - this.rules = []; - WithRules.__super__.constructor.apply(this, arguments); - } - - WithRules.prototype.eachDecl = function(callback) { - this.each(function(child) { - return child.eachDecl(callback); - }); - return this; - }; - - WithRules.prototype.eachRule = function(callback) { - var _this = this; - this.each(function(child, i) { - if (child.type === 'rule') { - return callback(child, i); - } else if (child.eachRule) { - return child.eachRule(callback); - } - }); - return this; - }; - - WithRules.prototype.eachAtRule = function(callback) { - var _this = this; - this.each(function(child, i) { - if (child.type === 'atrule') { - callback(child, i); - if (child.eachAtRule) { - return child.eachAtRule(callback); - } - } - }); - return this; - }; - - return WithRules; - - })(Container); - - Container.WithDecls = (function(_super) { - __extends(WithDecls, _super); - - function WithDecls() { - this.decls = []; - WithDecls.__super__.constructor.apply(this, arguments); - } - - WithDecls.prototype.normalize = function(child, sample) { - if (!child.type) { - child = new Declaration(child); - } - return WithDecls.__super__.normalize.call(this, child, sample); - }; - - WithDecls.prototype.eachDecl = function(callback) { - var _this = this; - this.each(function(decl, i) { - return callback(decl, i); - }); - return this; - }; - - return WithDecls; - - })(Container); - - module.exports = Container; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/declaration.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/declaration.js deleted file mode 100644 index 8d130e0b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/declaration.js +++ /dev/null @@ -1,55 +0,0 @@ -(function() { - var Declaration, Node, vendor, - __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; }; - - Node = require('./node'); - - vendor = require('./vendor'); - - Declaration = (function(_super) { - __extends(Declaration, _super); - - function Declaration() { - this.type = 'decl'; - Declaration.__super__.constructor.apply(this, arguments); - } - - Declaration.raw('value'); - - Declaration.prototype.stringify = function(builder, semicolon) { - var string; - if (this.before) { - builder(this.before); - } - string = this.prop + (this.between || '') + ':' + this._value.stringify({ - before: ' ' - }); - if (semicolon) { - string += ';'; - } - return builder(string, this); - }; - - Declaration.prototype.removeSelf = function() { - if (!this.parent) { - return; - } - this.parent.remove(this); - return this; - }; - - Declaration.prototype.clone = function(obj) { - var cloned; - cloned = Declaration.__super__.clone.apply(this, arguments); - delete cloned.before; - return cloned; - }; - - return Declaration; - - })(Node); - - module.exports = Declaration; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/generate-map.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/generate-map.js deleted file mode 100644 index 8b36570e..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/generate-map.js +++ /dev/null @@ -1,65 +0,0 @@ -(function() { - var Result, SourceMap, generateMap; - - SourceMap = require('source-map'); - - Result = require('./result'); - - generateMap = function(css, opts) { - var builder, column, line, map, prev, result; - map = new SourceMap.SourceMapGenerator({ - file: opts.to || 'to.css' - }); - result = new Result(css, ''); - line = 1; - column = 1; - builder = function(str, node, type) { - var last, lines, _ref, _ref1; - result.css += str; - if ((node != null ? (_ref = node.source) != null ? _ref.start : void 0 : void 0) && type !== 'end') { - map.addMapping({ - source: node.source.file || 'from.css', - original: { - line: node.source.start.line, - column: node.source.start.column - 1 - }, - generated: { - line: line, - column: column - 1 - } - }); - } - lines = str.match(/\n/g); - if (lines) { - line += lines.length; - last = str.lastIndexOf("\n"); - column = str.length - last; - } else { - column = column + str.length; - } - if ((node != null ? (_ref1 = node.source) != null ? _ref1.end : void 0 : void 0) && type !== 'start') { - return map.addMapping({ - source: node.source.file || 'from.css', - original: { - line: node.source.end.line, - column: node.source.end.column - }, - generated: { - line: line, - column: column - } - }); - } - }; - css.stringify(builder); - if (typeof opts.map === 'string') { - prev = new SourceMap.SourceMapConsumer(opts.map); - map.applySourceMap(prev); - } - result.map = map.toString(); - return result; - }; - - module.exports = generateMap; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/list.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/list.js deleted file mode 100644 index 5f984c8d..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/list.js +++ /dev/null @@ -1,64 +0,0 @@ -(function() { - var list; - - list = { - split: function(string, separators, last) { - var array, current, escape, func, letter, quote, separator, split, _i, _j, _len, _len1; - array = []; - current = ''; - split = false; - func = 0; - quote = false; - escape = false; - for (_i = 0, _len = string.length; _i < _len; _i++) { - letter = string[_i]; - if (quote) { - if (escape) { - escape = false; - } else if (letter === '\\') { - escape = true; - } else if (letter === quote) { - quote = false; - } - } else if (letter === '"' || letter === "'") { - quote = letter; - } else if (letter === '(') { - func += 1; - } else if (letter === ')') { - if (func > 0) { - func -= 1; - } - } else if (func === 0) { - for (_j = 0, _len1 = separators.length; _j < _len1; _j++) { - separator = separators[_j]; - if (letter === separator) { - split = true; - } - } - } - if (split) { - if (current !== '') { - array.push(current.trim()); - } - current = ''; - split = false; - } else { - current += letter; - } - } - if (last || current !== '') { - array.push(current.trim()); - } - return array; - }, - space: function(string) { - return this.split(string, [' ', "\n", "\t"]); - }, - comma: function(string) { - return this.split(string, [','], true); - } - }; - - module.exports = list; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/node.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/node.js deleted file mode 100644 index 6f5edfe9..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/node.js +++ /dev/null @@ -1,126 +0,0 @@ -(function() { - var Node, Raw, clone, - __hasProp = {}.hasOwnProperty; - - Raw = require('./raw'); - - clone = function(obj, parent) { - var cloned, name, value; - if (typeof obj !== 'object') { - return obj; - } - cloned = new obj.constructor(); - for (name in obj) { - if (!__hasProp.call(obj, name)) continue; - value = obj[name]; - if (name === 'parent' && typeof value === 'object') { - if (parent) { - cloned[name] = parent; - } - } else if (value instanceof Array) { - cloned[name] = value.map(function(i) { - return clone(i, cloned); - }); - } else { - cloned[name] = clone(value, cloned); - } - } - return cloned; - }; - - Node = (function() { - function Node(defaults) { - var name, value; - if (defaults == null) { - defaults = {}; - } - for (name in defaults) { - value = defaults[name]; - this[name] = value; - } - } - - Node.prop = function(name, params) { - return Object.defineProperty(this.prototype, name, params); - }; - - Node.raw = function(name) { - var hidden; - hidden = '_' + name; - this.prototype[hidden] = Raw.empty; - return this.prop(name, { - get: function() { - var _ref; - return (_ref = this[hidden]) != null ? _ref.trimmed : void 0; - }, - set: function(value) { - if (value instanceof Raw) { - return this[hidden] = value; - } else { - if (this[hidden] === Raw.empty) { - this[hidden] = new Raw(); - } - return this[hidden].set(value); - } - } - }); - }; - - Node.prototype.removeSelf = function() { - if (!this.parent) { - return; - } - this.parent.remove(this); - return this; - }; - - Node.prototype.toString = function() { - var builder, result; - result = ''; - builder = function(str) { - return result += str; - }; - this.stringify(builder); - return result; - }; - - Node.prototype.clone = function(overrides) { - var cloned, name, value; - if (overrides == null) { - overrides = {}; - } - cloned = clone(this); - for (name in overrides) { - value = overrides[name]; - cloned[name] = value; - } - return cloned; - }; - - Node.prototype.toJSON = function() { - var fixed, name, value; - fixed = {}; - for (name in this) { - if (!__hasProp.call(this, name)) continue; - value = this[name]; - if (name === 'parent') { - continue; - } - fixed[name] = value instanceof Array ? value.map(function(i) { - if (typeof i === 'object' && i.toJSON) { - return i.toJSON(); - } else { - return i; - } - }) : typeof value === 'object' && value.toJSON ? value.toJSON() : value; - } - return fixed; - }; - - return Node; - - })(); - - module.exports = Node; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/parse.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/parse.js deleted file mode 100644 index abce7316..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/parse.js +++ /dev/null @@ -1,422 +0,0 @@ -(function() { - var AtRule, Declaration, Parser, Raw, Root, Rule, SyntexError; - - SyntexError = require('./syntax-error'); - - Declaration = require('./declaration'); - - AtRule = require('./at-rule'); - - Root = require('./root'); - - Rule = require('./rule'); - - Raw = require('./raw'); - - Parser = (function() { - function Parser(source, opts) { - this.opts = opts; - this.source = source.toString(); - this.root = new Root(); - this.current = this.root; - this.parents = [this.current]; - this.type = 'rules'; - this.types = [this.type]; - this.pos = -1; - this.line = 1; - this.lines = []; - this.column = 0; - this.buffer = ''; - } - - Parser.prototype.loop = function() { - while (this.pos < this.source.length - 1) { - this.move(); - this.nextLetter(); - } - return this.endFile(); - }; - - Parser.prototype.nextLetter = function() { - this.inString() || this.inComment() || this.isComment() || this.isString() || this.isWrong() || this.inAtrule() || this.isAtrule() || this.isBlockEnd() || this.inSelector() || this.isSelector() || this.inProperty() || this.isProperty() || this.inValue(); - return this.unknown(); - }; - - Parser.prototype.inString = function() { - if (this.quote) { - if (this.escape) { - this.escape = false; - } else if (this.letter === '\\') { - this.escape = true; - } else if (this.letter === this.quote) { - this.quote = void 0; - } - this.trimmed += this.letter; - return true; - } - }; - - Parser.prototype.isString = function() { - if (this.letter === '"' || this.letter === "'") { - this.quote = this.letter; - this.quotePos = { - line: this.line, - column: this.column - }; - this.trimmed += this.letter; - return true; - } - }; - - Parser.prototype.inComment = function() { - if (this.inside('comment')) { - if (this.next('*/')) { - this.popType(); - this.move(); - } - return true; - } - }; - - Parser.prototype.isComment = function() { - if (this.next('/*')) { - this.commentPos = { - line: this.line, - column: this.column - }; - this.addType('comment'); - this.move(); - return true; - } - }; - - Parser.prototype.isWrong = function() { - if (this.letter === '{' && (this.inside('decls') || this.inside('value'))) { - this.error("Unexpected {"); - } - if (this.inside('property') && (this.letter === '}' || this.letter === ';')) { - return this.error('Missing property value'); - } - }; - - Parser.prototype.isAtrule = function() { - if (this.letter === '@' && this.inside('rules')) { - this.init(new AtRule()); - this.current.name = ''; - this.addType('atrule-name'); - return true; - } - }; - - Parser.prototype.inAtrule = function(close) { - if (this.inside('atrule-name')) { - if (this.space()) { - this.checkAtruleName(); - this.buffer = this.buffer.slice(this.current.name.length); - this.trimmed = ''; - this.setType('atrule-param'); - } else if (this.letter === ';' || this.letter === '{' || close) { - this.checkAtruleName(); - this.endAtruleParams(); - } else { - this.current.name += this.letter; - } - return true; - } else if (this.inside('atrule-param')) { - if (this.letter === ';' || this.letter === '{' || close) { - this.current.params = new Raw(this.prevBuffer(), this.trim(this.trimmed)); - this.endAtruleParams(); - } else { - this.trimmed += this.letter; - } - return true; - } - }; - - Parser.prototype.inSelector = function() { - if (this.inside('selector')) { - if (this.letter === '{') { - this.current.selector = new Raw(this.prevBuffer(), this.trim(this.trimmed)); - this.semicolon = false; - this.buffer = ''; - this.setType('decls'); - } else { - this.trimmed += this.letter; - } - return true; - } - }; - - Parser.prototype.isSelector = function() { - if (!this.space() && this.inside('rules')) { - this.init(new Rule()); - if (this.letter === '{') { - this.addType('decls'); - this.current.selector = new Raw('', ''); - this.semicolon = false; - this.buffer = ''; - } else { - this.addType('selector'); - this.buffer = this.letter; - this.trimmed = this.letter; - } - return true; - } - }; - - Parser.prototype.isBlockEnd = function() { - if (this.letter === '}') { - if (this.parents.length === 1) { - this.error('Unexpected }'); - } else { - if (this.inside('value')) { - this.fixEnd(function() { - return this.inValue('close'); - }); - } else { - if (this.semicolon) { - this.current.semicolon = true; - } - this.current.after = this.prevBuffer(); - } - this.pop(); - } - return true; - } - }; - - Parser.prototype.inProperty = function() { - if (this.inside('property')) { - if (this.letter === ':') { - if (this.buffer[0] === '*' || this.buffer[0] === '_') { - this.current.before += this.buffer[0]; - this.trimmed = this.trimmed.slice(1); - this.buffer = this.buffer.slice(1); - } - this.current.prop = this.trim(this.trimmed); - this.current.between = this.prevBuffer().slice(this.current.prop.length); - this.buffer = ''; - this.setType('value'); - this.trimmed = ''; - } else if (this.letter === '{') { - this.error('Unexpected { in decls'); - } else { - this.trimmed += this.letter; - } - return true; - } - }; - - Parser.prototype.isProperty = function() { - if (this.inside('decls') && !this.space() && this.letter !== ';') { - this.init(new Declaration()); - this.addType('property'); - this.buffer = this.letter; - this.trimmed = this.letter; - this.semicolon = false; - return true; - } - }; - - Parser.prototype.inValue = function(close) { - if (this.inside('value')) { - if (this.letter === '(') { - this.inBrackets = true; - } else if (this.inBrackets && this.letter === ')') { - this.inBrackets = false; - } - if ((this.letter === ';' && !this.inBrackets) || close) { - if (this.letter === ';') { - this.semicolon = true; - } - this.current.value = new Raw(this.prevBuffer(), this.trim(this.trimmed)); - this.pop(); - } else { - this.trimmed += this.letter; - } - return true; - } - }; - - Parser.prototype.unknown = function() { - if (!this.space) { - return this.error("Unexpected symbol " + this.letter); - } - }; - - Parser.prototype.endFile = function() { - if (this.inside('atrule-param') || this.inside('atrule-name')) { - this.fixEnd(function() { - return this.inAtrule('close'); - }); - } - if (this.parents.length > 1) { - return this.error('Unclosed block', this.current.source.start); - } else if (this.inside('comment')) { - return this.error('Unclosed comment', this.commentPos); - } else if (this.quote) { - return this.error('Unclosed quote', this.quotePos); - } else { - return this.root.after = this.buffer; - } - }; - - Parser.prototype.error = function(message, position) { - if (position == null) { - position = { - line: this.line, - column: this.column - }; - } - throw new SyntexError(message, this.source, position, this.opts.from); - }; - - Parser.prototype.move = function() { - this.pos += 1; - this.column += 1; - this.letter = this.source[this.pos]; - this.buffer += this.letter; - if (this.letter === "\n") { - this.lines[this.line] = this.column - 1; - this.line += 1; - return this.column = 0; - } - }; - - Parser.prototype.prevBuffer = function() { - return this.buffer.slice(0, -1); - }; - - Parser.prototype.inside = function(type) { - return this.type === type; - }; - - Parser.prototype.next = function(string) { - return this.source.slice(this.pos, +(this.pos + string.length - 1) + 1 || 9e9) === string; - }; - - Parser.prototype.space = function() { - return this.letter === ' ' || this.letter === "\t" || this.letter === "\n" || this.letter === "\f" || this.letter === "\r"; - }; - - Parser.prototype.init = function(node) { - this.current.push(node); - this.parents.push(node); - this.current = node; - this.current.source = { - start: { - line: this.line, - column: this.column - } - }; - if (this.opts.from) { - this.current.source.file = this.opts.from; - } - this.current.before = this.buffer.slice(0, -1); - return this.buffer = ''; - }; - - Parser.prototype.fixEnd = function(callback) { - var after, all, el, last, lines, start; - if (this.letter === '}') { - start = this.buffer.search(/\s*\}$/); - after = this.buffer.slice(start, -1); - } else { - start = this.buffer.search(/\s*$/); - after = this.buffer.slice(start); - } - this.buffer = this.buffer.slice(0, +start + 1 || 9e9); - el = this.current; - callback.apply(this); - lines = after.match(/\n/g); - if (lines) { - el.source.end.line -= lines.length; - all = this.lines[el.source.end.line]; - last = after.indexOf("\n"); - if (last === -1) { - last = after.length; - } - el.source.end.column = all - last; - } else { - el.source.end.column -= after.length; - } - this.current.after = after; - return this.buffer = after; - }; - - Parser.prototype.pop = function() { - this.current.source.end = { - line: this.line, - column: this.column - }; - this.popType(); - this.parents.pop(); - this.current = this.parents[this.parents.length - 1]; - return this.buffer = ''; - }; - - Parser.prototype.addType = function(type) { - this.types.push(type); - return this.type = type; - }; - - Parser.prototype.setType = function(type) { - this.types[this.types.length - 1] = type; - return this.type = type; - }; - - Parser.prototype.popType = function() { - this.types.pop(); - return this.type = this.types[this.types.length - 1]; - }; - - Parser.prototype.atruleType = function() { - var name; - name = this.current.name.toLowerCase(); - if (name === 'page' || name === 'font-face' || name.slice(-8) === 'viewport') { - return 'decls'; - } else { - return 'rules'; - } - }; - - Parser.prototype.endAtruleParams = function() { - var type; - if (this.letter === '{') { - type = this.atruleType(); - this.current.addMixin(type); - this.setType(type); - return this.buffer = ''; - } else { - if (this.letter === ';') { - this.current.semicolon = true; - } - return this.pop(); - } - }; - - Parser.prototype.checkAtruleName = function() { - if (this.current.name === '') { - return this.error('At-rule without name'); - } - }; - - Parser.prototype.trim = function(string) { - return string.replace(/^\s*/, '').replace(/\s*$/, ''); - }; - - return Parser; - - })(); - - module.exports = function(source, opts) { - var parser; - if (opts == null) { - opts = {}; - } - parser = new Parser(source, opts); - parser.loop(); - return parser.root; - }; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/postcss.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/postcss.js deleted file mode 100644 index 18bac9c0..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/postcss.js +++ /dev/null @@ -1,78 +0,0 @@ -(function() { - var AtRule, Declaration, PostCSS, Result, Root, Rule, generateMap, postcss, - __slice = [].slice; - - generateMap = require('./generate-map'); - - Declaration = require('./declaration'); - - AtRule = require('./at-rule'); - - Result = require('./result'); - - Rule = require('./rule'); - - Root = require('./root'); - - PostCSS = (function() { - function PostCSS(processors) { - this.processors = processors != null ? processors : []; - } - - PostCSS.prototype.use = function(processor) { - this.processors.push(processor); - return this; - }; - - PostCSS.prototype.process = function(css, opts) { - var parsed, processor, returned, _i, _len, _ref; - if (opts == null) { - opts = {}; - } - parsed = postcss.parse(css, opts); - _ref = this.processors; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - processor = _ref[_i]; - returned = processor(parsed); - if (returned instanceof Root) { - parsed = returned; - } - } - if (opts.map) { - return generateMap(parsed, opts); - } else { - return new Result(parsed, parsed.toString()); - } - }; - - return PostCSS; - - })(); - - postcss = function() { - var processors; - processors = 1 <= arguments.length ? __slice.call(arguments, 0) : []; - return new PostCSS(processors); - }; - - postcss.parse = require('./parse'); - - postcss.decl = function(defaults) { - return new Declaration(defaults); - }; - - postcss.atRule = function(defaults) { - return new AtRule(defaults); - }; - - postcss.rule = function(defaults) { - return new Rule(defaults); - }; - - postcss.root = function(defaults) { - return new Root(defaults); - }; - - module.exports = postcss; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/raw.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/raw.js deleted file mode 100644 index 9217b1de..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/raw.js +++ /dev/null @@ -1,38 +0,0 @@ -(function() { - var Raw; - - Raw = (function() { - function Raw(raw, trimmed) { - this.raw = raw; - this.trimmed = trimmed; - } - - Raw.prototype.set = function(value) { - if (this.trimmed !== value) { - this.changed = true; - return this.trimmed = value; - } - }; - - Raw.prototype.stringify = function(opts) { - if (opts == null) { - opts = {}; - } - if (!this.changed) { - return this.raw || ''; - } else if (!this.raw) { - return (opts.before || '') + this.trimmed + (opts.after || ''); - } else { - return (this.raw[0] === ' ' ? ' ' : '') + this.trimmed + (this.raw.slice(-1) === ' ' ? ' ' : ''); - } - }; - - return Raw; - - })(); - - Raw.empty = new Raw(); - - module.exports = Raw; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/result.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/result.js deleted file mode 100644 index 810a005b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/result.js +++ /dev/null @@ -1,20 +0,0 @@ -(function() { - var Result; - - Result = (function() { - function Result(parsed, css) { - this.parsed = parsed; - this.css = css; - } - - Result.prototype.toString = function() { - return this.css; - }; - - return Result; - - })(); - - module.exports = Result; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/root.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/root.js deleted file mode 100644 index 68f7d0d0..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/root.js +++ /dev/null @@ -1,38 +0,0 @@ -(function() { - var Container, Root, - __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; }; - - Container = require('./container'); - - Root = (function(_super) { - __extends(Root, _super); - - function Root() { - this.type = 'root'; - this.rules = []; - Root.__super__.constructor.apply(this, arguments); - } - - Root.prototype.normalize = function(child, sample, type) { - child = Root.__super__.normalize.apply(this, arguments); - if (type === 'prepend') { - sample.before = this.rules.length > 1 ? this.rules[1].before : this.after; - } - return child; - }; - - Root.prototype.stringify = function(builder) { - this.stringifyContent(builder); - if (this.after) { - return builder(this.after); - } - }; - - return Root; - - })(Container.WithRules); - - module.exports = Root; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/rule.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/rule.js deleted file mode 100644 index ec326c24..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/rule.js +++ /dev/null @@ -1,32 +0,0 @@ -(function() { - var Container, Declaration, Rule, - __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; }; - - Container = require('./container'); - - Declaration = require('./declaration'); - - Rule = (function(_super) { - __extends(Rule, _super); - - function Rule() { - this.type = 'rule'; - Rule.__super__.constructor.apply(this, arguments); - } - - Rule.raw('selector'); - - Rule.prototype.stringify = function(builder) { - return this.stringifyBlock(builder, this._selector.stringify({ - after: ' ' - }) + '{'); - }; - - return Rule; - - })(Container.WithDecls); - - module.exports = Rule; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/syntax-error.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/syntax-error.js deleted file mode 100644 index 349dfae9..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/syntax-error.js +++ /dev/null @@ -1,27 +0,0 @@ -(function() { - var SyntaxError, - __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; }; - - SyntaxError = (function(_super) { - __extends(SyntaxError, _super); - - function SyntaxError(text, source, pos, file) { - this.source = source; - this.file = file; - this.line = pos.line; - this.column = pos.column; - this.message = "Can't parse CSS: " + text; - this.message += " at line " + pos.line + ":" + pos.column; - if (this.file) { - this.message += " in " + this.file; - } - } - - return SyntaxError; - - })(Error); - - module.exports = SyntaxError; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/vendor.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/vendor.js deleted file mode 100644 index a1a8223b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/lib/vendor.js +++ /dev/null @@ -1,27 +0,0 @@ -(function() { - var vendor; - - vendor = { - prefix: function(prop) { - var separator; - if (prop[0] === '-') { - separator = prop.indexOf('-', 1) + 1; - return prop.slice(0, separator); - } else { - return ''; - } - }, - unprefixed: function(prop) { - var separator; - if (prop[0] === '-') { - separator = prop.indexOf('-', 1) + 1; - return prop.slice(separator); - } else { - return prop; - } - } - }; - - module.exports = vendor; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/.npmignore b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/.npmignore deleted file mode 100644 index 3dddf3f6..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -dist/* -node_modules/* diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/.travis.yml b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/.travis.yml deleted file mode 100644 index ddc9c4f9..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.8 - - "0.10" \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/CHANGELOG.md b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/CHANGELOG.md deleted file mode 100644 index a0e1b9c4..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/CHANGELOG.md +++ /dev/null @@ -1,130 +0,0 @@ -# Change Log - -## 0.1.33 - -* Fix some edge cases surrounding path joining and URL resolution. - -* Add a third parameter for relative path to - `SourceMapGenerator.prototype.applySourceMap`. - -* Fix issues with mappings and EOLs. - -## 0.1.32 - -* Fixed a bug where SourceMapConsumer couldn't handle negative relative columns - (issue 92). - -* Fixed test runner to actually report number of failed tests as its process - exit code. - -* Fixed a typo when reporting bad mappings (issue 87). - -## 0.1.31 - -* Delay parsing the mappings in SourceMapConsumer until queried for a source - location. - -* Support Sass source maps (which at the time of writing deviate from the spec - in small ways) in SourceMapConsumer. - -## 0.1.30 - -* Do not join source root with a source, when the source is a data URI. - -* Extend the test runner to allow running single specific test files at a time. - -* Performance improvements in `SourceNode.prototype.walk` and - `SourceMapConsumer.prototype.eachMapping`. - -* Source map browser builds will now work inside Workers. - -* Better error messages when attempting to add an invalid mapping to a - `SourceMapGenerator`. - -## 0.1.29 - -* Allow duplicate entries in the `names` and `sources` arrays of source maps - (usually from TypeScript) we are parsing. Fixes github isse 72. - -## 0.1.28 - -* Skip duplicate mappings when creating source maps from SourceNode; github - issue 75. - -## 0.1.27 - -* Don't throw an error when the `file` property is missing in SourceMapConsumer, - we don't use it anyway. - -## 0.1.26 - -* Fix SourceNode.fromStringWithSourceMap for empty maps. Fixes github issue 70. - -## 0.1.25 - -* Make compatible with browserify - -## 0.1.24 - -* Fix issue with absolute paths and `file://` URIs. See - https://bugzilla.mozilla.org/show_bug.cgi?id=885597 - -## 0.1.23 - -* Fix issue with absolute paths and sourcesContent, github issue 64. - -## 0.1.22 - -* Ignore duplicate mappings in SourceMapGenerator. Fixes github issue 21. - -## 0.1.21 - -* Fixed handling of sources that start with a slash so that they are relative to - the source root's host. - -## 0.1.20 - -* Fixed github issue #43: absolute URLs aren't joined with the source root - anymore. - -## 0.1.19 - -* Using Travis CI to run tests. - -## 0.1.18 - -* Fixed a bug in the handling of sourceRoot. - -## 0.1.17 - -* Added SourceNode.fromStringWithSourceMap. - -## 0.1.16 - -* Added missing documentation. - -* Fixed the generating of empty mappings in SourceNode. - -## 0.1.15 - -* Added SourceMapGenerator.applySourceMap. - -## 0.1.14 - -* The sourceRoot is now handled consistently. - -## 0.1.13 - -* Added SourceMapGenerator.fromSourceMap. - -## 0.1.12 - -* SourceNode now generates empty mappings too. - -## 0.1.11 - -* Added name support to SourceNode. - -## 0.1.10 - -* Added sourcesContent support to the customer and generator. diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/LICENSE b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/LICENSE deleted file mode 100644 index ed1b7cf2..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ - -Copyright (c) 2009-2011, Mozilla Foundation and contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the names of the Mozilla Foundation nor the names of project - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/Makefile.dryice.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/Makefile.dryice.js deleted file mode 100644 index d6fc26a7..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/Makefile.dryice.js +++ /dev/null @@ -1,166 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -var path = require('path'); -var fs = require('fs'); -var copy = require('dryice').copy; - -function removeAmdefine(src) { - src = String(src).replace( - /if\s*\(typeof\s*define\s*!==\s*'function'\)\s*{\s*var\s*define\s*=\s*require\('amdefine'\)\(module,\s*require\);\s*}\s*/g, - ''); - src = src.replace( - /\b(define\(.*)('amdefine',?)/gm, - '$1'); - return src; -} -removeAmdefine.onRead = true; - -function makeNonRelative(src) { - return src - .replace(/require\('.\//g, 'require(\'source-map/') - .replace(/\.\.\/\.\.\/lib\//g, ''); -} -makeNonRelative.onRead = true; - -function buildBrowser() { - console.log('\nCreating dist/source-map.js'); - - var project = copy.createCommonJsProject({ - roots: [ path.join(__dirname, 'lib') ] - }); - - copy({ - source: [ - 'build/mini-require.js', - { - project: project, - require: [ 'source-map/source-map-generator', - 'source-map/source-map-consumer', - 'source-map/source-node'] - }, - 'build/suffix-browser.js' - ], - filter: [ - copy.filter.moduleDefines, - removeAmdefine - ], - dest: 'dist/source-map.js' - }); -} - -function buildBrowserMin() { - console.log('\nCreating dist/source-map.min.js'); - - copy({ - source: 'dist/source-map.js', - filter: copy.filter.uglifyjs, - dest: 'dist/source-map.min.js' - }); -} - -function buildFirefox() { - console.log('\nCreating dist/SourceMap.jsm'); - - var project = copy.createCommonJsProject({ - roots: [ path.join(__dirname, 'lib') ] - }); - - copy({ - source: [ - 'build/prefix-source-map.jsm', - { - project: project, - require: [ 'source-map/source-map-consumer', - 'source-map/source-map-generator', - 'source-map/source-node' ] - }, - 'build/suffix-source-map.jsm' - ], - filter: [ - copy.filter.moduleDefines, - removeAmdefine, - makeNonRelative - ], - dest: 'dist/SourceMap.jsm' - }); - - // Create dist/test/Utils.jsm - console.log('\nCreating dist/test/Utils.jsm'); - - project = copy.createCommonJsProject({ - roots: [ __dirname, path.join(__dirname, 'lib') ] - }); - - copy({ - source: [ - 'build/prefix-utils.jsm', - 'build/assert-shim.js', - { - project: project, - require: [ 'test/source-map/util' ] - }, - 'build/suffix-utils.jsm' - ], - filter: [ - copy.filter.moduleDefines, - removeAmdefine, - makeNonRelative - ], - dest: 'dist/test/Utils.jsm' - }); - - function isTestFile(f) { - return /^test\-.*?\.js/.test(f); - } - - var testFiles = fs.readdirSync(path.join(__dirname, 'test', 'source-map')).filter(isTestFile); - - testFiles.forEach(function (testFile) { - console.log('\nCreating', path.join('dist', 'test', testFile.replace(/\-/g, '_'))); - - copy({ - source: [ - 'build/test-prefix.js', - path.join('test', 'source-map', testFile), - 'build/test-suffix.js' - ], - filter: [ - removeAmdefine, - makeNonRelative, - function (input, source) { - return input.replace('define(', - 'define("' - + path.join('test', 'source-map', testFile.replace(/\.js$/, '')) - + '", ["require", "exports", "module"], '); - }, - function (input, source) { - return input.replace('{THIS_MODULE}', function () { - return "test/source-map/" + testFile.replace(/\.js$/, ''); - }); - } - ], - dest: path.join('dist', 'test', testFile.replace(/\-/g, '_')) - }); - }); -} - -function ensureDir(name) { - var dirExists = false; - try { - dirExists = fs.statSync(name).isDirectory(); - } catch (err) {} - - if (!dirExists) { - fs.mkdirSync(name, 0777); - } -} - -ensureDir("dist"); -ensureDir("dist/test"); -buildFirefox(); -buildBrowser(); -buildBrowserMin(); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/README.md b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/README.md deleted file mode 100644 index b00e970c..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/README.md +++ /dev/null @@ -1,446 +0,0 @@ -# Source Map - -This is a library to generate and consume the source map format -[described here][format]. - -This library is written in the Asynchronous Module Definition format, and works -in the following environments: - -* Modern Browsers supporting ECMAScript 5 (either after the build, or with an - AMD loader such as RequireJS) - -* Inside Firefox (as a JSM file, after the build) - -* With NodeJS versions 0.8.X and higher - -## Node - - $ npm install source-map - -## Building from Source (for everywhere else) - -Install Node and then run - - $ git clone https://fitzgen@github.com/mozilla/source-map.git - $ cd source-map - $ npm link . - -Next, run - - $ node Makefile.dryice.js - -This should spew a bunch of stuff to stdout, and create the following files: - -* `dist/source-map.js` - The unminified browser version. - -* `dist/source-map.min.js` - The minified browser version. - -* `dist/SourceMap.jsm` - The JavaScript Module for inclusion in Firefox source. - -## Examples - -### Consuming a source map - - var rawSourceMap = { - version: 3, - file: 'min.js', - names: ['bar', 'baz', 'n'], - sources: ['one.js', 'two.js'], - sourceRoot: 'http://example.com/www/js/', - mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' - }; - - var smc = new SourceMapConsumer(rawSourceMap); - - console.log(smc.sources); - // [ 'http://example.com/www/js/one.js', - // 'http://example.com/www/js/two.js' ] - - console.log(smc.originalPositionFor({ - line: 2, - column: 28 - })); - // { source: 'http://example.com/www/js/two.js', - // line: 2, - // column: 10, - // name: 'n' } - - console.log(smc.generatedPositionFor({ - source: 'http://example.com/www/js/two.js', - line: 2, - column: 10 - })); - // { line: 2, column: 28 } - - smc.eachMapping(function (m) { - // ... - }); - -### Generating a source map - -In depth guide: -[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) - -#### With SourceNode (high level API) - - function compile(ast) { - switch (ast.type) { - case 'BinaryExpression': - return new SourceNode( - ast.location.line, - ast.location.column, - ast.location.source, - [compile(ast.left), " + ", compile(ast.right)] - ); - case 'Literal': - return new SourceNode( - ast.location.line, - ast.location.column, - ast.location.source, - String(ast.value) - ); - // ... - default: - throw new Error("Bad AST"); - } - } - - var ast = parse("40 + 2", "add.js"); - console.log(compile(ast).toStringWithSourceMap({ - file: 'add.js' - })); - // { code: '40 + 2', - // map: [object SourceMapGenerator] } - -#### With SourceMapGenerator (low level API) - - var map = new SourceMapGenerator({ - file: "source-mapped.js" - }); - - map.addMapping({ - generated: { - line: 10, - column: 35 - }, - source: "foo.js", - original: { - line: 33, - column: 2 - }, - name: "christopher" - }); - - console.log(map.toString()); - // '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' - -## API - -Get a reference to the module: - - // NodeJS - var sourceMap = require('source-map'); - - // Browser builds - var sourceMap = window.sourceMap; - - // Inside Firefox - let sourceMap = {}; - Components.utils.import('resource:///modules/devtools/SourceMap.jsm', sourceMap); - -### SourceMapConsumer - -A SourceMapConsumer instance represents a parsed source map which we can query -for information about the original file positions by giving it a file position -in the generated source. - -#### new SourceMapConsumer(rawSourceMap) - -The only parameter is the raw source map (either as a string which can be -`JSON.parse`'d, or an object). According to the spec, source maps have the -following attributes: - -* `version`: Which version of the source map spec this map is following. - -* `sources`: An array of URLs to the original source files. - -* `names`: An array of identifiers which can be referrenced by individual - mappings. - -* `sourceRoot`: Optional. The URL root from which all sources are relative. - -* `sourcesContent`: Optional. An array of contents of the original source files. - -* `mappings`: A string of base64 VLQs which contain the actual mappings. - -* `file`: Optional. The generated filename this source map is associated with. - -#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) - -Returns the original source, line, and column information for the generated -source's line and column positions provided. The only argument is an object with -the following properties: - -* `line`: The line number in the generated source. - -* `column`: The column number in the generated source. - -and an object is returned with the following properties: - -* `source`: The original source file, or null if this information is not - available. - -* `line`: The line number in the original source, or null if this information is - not available. - -* `column`: The column number in the original source, or null or null if this - information is not available. - -* `name`: The original identifier, or null if this information is not available. - -#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) - -Returns the generated line and column information for the original source, -line, and column positions provided. The only argument is an object with -the following properties: - -* `source`: The filename of the original source. - -* `line`: The line number in the original source. - -* `column`: The column number in the original source. - -and an object is returned with the following properties: - -* `line`: The line number in the generated source, or null. - -* `column`: The column number in the generated source, or null. - -#### SourceMapConsumer.prototype.sourceContentFor(source) - -Returns the original source content for the source provided. The only -argument is the URL of the original source file. - -#### SourceMapConsumer.prototype.eachMapping(callback, context, order) - -Iterate over each mapping between an original source/line/column and a -generated line/column in this source map. - -* `callback`: The function that is called with each mapping. Mappings have the - form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, - name }` - -* `context`: Optional. If specified, this object will be the value of `this` - every time that `callback` is called. - -* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or - `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over - the mappings sorted by the generated file's line/column order or the - original's source/line/column order, respectively. Defaults to - `SourceMapConsumer.GENERATED_ORDER`. - -### SourceMapGenerator - -An instance of the SourceMapGenerator represents a source map which is being -built incrementally. - -#### new SourceMapGenerator([startOfSourceMap]) - -You may pass an object with the following properties: - -* `file`: The filename of the generated source that this source map is - associated with. - -* `sourceRoot`: A root for all relative URLs in this source map. - -#### SourceMapGenerator.fromSourceMap(sourceMapConsumer) - -Creates a new SourceMapGenerator based on a SourceMapConsumer - -* `sourceMapConsumer` The SourceMap. - -#### SourceMapGenerator.prototype.addMapping(mapping) - -Add a single mapping from original source line and column to the generated -source's line and column for this source map being created. The mapping object -should have the following properties: - -* `generated`: An object with the generated line and column positions. - -* `original`: An object with the original line and column positions. - -* `source`: The original source file (relative to the sourceRoot). - -* `name`: An optional original token name for this mapping. - -#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) - -Set the source content for an original source file. - -* `sourceFile` the URL of the original source file. - -* `sourceContent` the content of the source file. - -#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) - -Applies a SourceMap for a source file to the SourceMap. -Each mapping to the supplied source file is rewritten using the -supplied SourceMap. Note: The resolution for the resulting mappings -is the minimium of this map and the supplied map. - -* `sourceMapConsumer`: The SourceMap to be applied. - -* `sourceFile`: Optional. The filename of the source file. - If omitted, sourceMapConsumer.file will be used, if it exists. - Otherwise an error will be thrown. - -* `sourceMapPath`: Optional. The dirname of the path to the SourceMap - to be applied. If relative, it is relative to the SourceMap. - - This parameter is needed when the two SourceMaps aren't in the same - directory, and the SourceMap to be applied contains relative source - paths. If so, those relative source paths need to be rewritten - relative to the SourceMap. - - If omitted, it is assumed that both SourceMaps are in the same directory, - thus not needing any rewriting. (Supplying `'.'` has the same effect.) - -#### SourceMapGenerator.prototype.toString() - -Renders the source map being generated to a string. - -### SourceNode - -SourceNodes provide a way to abstract over interpolating and/or concatenating -snippets of generated JavaScript source code, while maintaining the line and -column information associated between those snippets and the original source -code. This is useful as the final intermediate representation a compiler might -use before outputting the generated JS and source map. - -#### new SourceNode([line, column, source[, chunk[, name]]]) - -* `line`: The original line number associated with this source node, or null if - it isn't associated with an original line. - -* `column`: The original column number associated with this source node, or null - if it isn't associated with an original column. - -* `source`: The original source's filename; null if no filename is provided. - -* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see - below. - -* `name`: Optional. The original identifier. - -#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer) - -Creates a SourceNode from generated code and a SourceMapConsumer. - -* `code`: The generated code - -* `sourceMapConsumer` The SourceMap for the generated code - -#### SourceNode.prototype.add(chunk) - -Add a chunk of generated JS to this source node. - -* `chunk`: A string snippet of generated JS code, another instance of - `SourceNode`, or an array where each member is one of those things. - -#### SourceNode.prototype.prepend(chunk) - -Prepend a chunk of generated JS to this source node. - -* `chunk`: A string snippet of generated JS code, another instance of - `SourceNode`, or an array where each member is one of those things. - -#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) - -Set the source content for a source file. This will be added to the -`SourceMap` in the `sourcesContent` field. - -* `sourceFile`: The filename of the source file - -* `sourceContent`: The content of the source file - -#### SourceNode.prototype.walk(fn) - -Walk over the tree of JS snippets in this node and its children. The walking -function is called once for each snippet of JS and is passed that snippet and -the its original associated source's line/column location. - -* `fn`: The traversal function. - -#### SourceNode.prototype.walkSourceContents(fn) - -Walk over the tree of SourceNodes. The walking function is called for each -source file content and is passed the filename and source content. - -* `fn`: The traversal function. - -#### SourceNode.prototype.join(sep) - -Like `Array.prototype.join` except for SourceNodes. Inserts the separator -between each of this source node's children. - -* `sep`: The separator. - -#### SourceNode.prototype.replaceRight(pattern, replacement) - -Call `String.prototype.replace` on the very right-most source snippet. Useful -for trimming whitespace from the end of a source node, etc. - -* `pattern`: The pattern to replace. - -* `replacement`: The thing to replace the pattern with. - -#### SourceNode.prototype.toString() - -Return the string representation of this source node. Walks over the tree and -concatenates all the various snippets together to one string. - -### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) - -Returns the string representation of this tree of source nodes, plus a -SourceMapGenerator which contains all the mappings between the generated and -original sources. - -The arguments are the same as those to `new SourceMapGenerator`. - -## Tests - -[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map) - -Install NodeJS version 0.8.0 or greater, then run `node test/run-tests.js`. - -To add new tests, create a new file named `test/test-<your new test name>.js` -and export your test functions with names that start with "test", for example - - exports["test doing the foo bar"] = function (assert, util) { - ... - }; - -The new test will be located automatically when you run the suite. - -The `util` argument is the test utility module located at `test/source-map/util`. - -The `assert` argument is a cut down version of node's assert module. You have -access to the following assertion functions: - -* `doesNotThrow` - -* `equal` - -* `ok` - -* `strictEqual` - -* `throws` - -(The reason for the restricted set of test functions is because we need the -tests to run inside Firefox's test suite as well and so the assert module is -shimmed in that environment. See `build/assert-shim.js`.) - -[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit -[feature]: https://wiki.mozilla.org/DevTools/Features/SourceMap -[Dryice]: https://github.com/mozilla/dryice diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/assert-shim.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/assert-shim.js deleted file mode 100644 index daa1a623..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/assert-shim.js +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -define('test/source-map/assert', ['exports'], function (exports) { - - let do_throw = function (msg) { - throw new Error(msg); - }; - - exports.init = function (throw_fn) { - do_throw = throw_fn; - }; - - exports.doesNotThrow = function (fn) { - try { - fn(); - } - catch (e) { - do_throw(e.message); - } - }; - - exports.equal = function (actual, expected, msg) { - msg = msg || String(actual) + ' != ' + String(expected); - if (actual != expected) { - do_throw(msg); - } - }; - - exports.ok = function (val, msg) { - msg = msg || String(val) + ' is falsey'; - if (!Boolean(val)) { - do_throw(msg); - } - }; - - exports.strictEqual = function (actual, expected, msg) { - msg = msg || String(actual) + ' !== ' + String(expected); - if (actual !== expected) { - do_throw(msg); - } - }; - - exports.throws = function (fn) { - try { - fn(); - do_throw('Expected an error to be thrown, but it wasn\'t.'); - } - catch (e) { - } - }; - -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/mini-require.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/mini-require.js deleted file mode 100644 index 0daf4537..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/mini-require.js +++ /dev/null @@ -1,152 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -/** - * Define a module along with a payload. - * @param {string} moduleName Name for the payload - * @param {ignored} deps Ignored. For compatibility with CommonJS AMD Spec - * @param {function} payload Function with (require, exports, module) params - */ -function define(moduleName, deps, payload) { - if (typeof moduleName != "string") { - throw new TypeError('Expected string, got: ' + moduleName); - } - - if (arguments.length == 2) { - payload = deps; - } - - if (moduleName in define.modules) { - throw new Error("Module already defined: " + moduleName); - } - define.modules[moduleName] = payload; -}; - -/** - * The global store of un-instantiated modules - */ -define.modules = {}; - - -/** - * We invoke require() in the context of a Domain so we can have multiple - * sets of modules running separate from each other. - * This contrasts with JSMs which are singletons, Domains allows us to - * optionally load a CommonJS module twice with separate data each time. - * Perhaps you want 2 command lines with a different set of commands in each, - * for example. - */ -function Domain() { - this.modules = {}; - this._currentModule = null; -} - -(function () { - - /** - * Lookup module names and resolve them by calling the definition function if - * needed. - * There are 2 ways to call this, either with an array of dependencies and a - * callback to call when the dependencies are found (which can happen - * asynchronously in an in-page context) or with a single string an no callback - * where the dependency is resolved synchronously and returned. - * The API is designed to be compatible with the CommonJS AMD spec and - * RequireJS. - * @param {string[]|string} deps A name, or names for the payload - * @param {function|undefined} callback Function to call when the dependencies - * are resolved - * @return {undefined|object} The module required or undefined for - * array/callback method - */ - Domain.prototype.require = function(deps, callback) { - if (Array.isArray(deps)) { - var params = deps.map(function(dep) { - return this.lookup(dep); - }, this); - if (callback) { - callback.apply(null, params); - } - return undefined; - } - else { - return this.lookup(deps); - } - }; - - function normalize(path) { - var bits = path.split('/'); - var i = 1; - while (i < bits.length) { - if (bits[i] === '..') { - bits.splice(i-1, 1); - } else if (bits[i] === '.') { - bits.splice(i, 1); - } else { - i++; - } - } - return bits.join('/'); - } - - function join(a, b) { - a = a.trim(); - b = b.trim(); - if (/^\//.test(b)) { - return b; - } else { - return a.replace(/\/*$/, '/') + b; - } - } - - function dirname(path) { - var bits = path.split('/'); - bits.pop(); - return bits.join('/'); - } - - /** - * Lookup module names and resolve them by calling the definition function if - * needed. - * @param {string} moduleName A name for the payload to lookup - * @return {object} The module specified by aModuleName or null if not found. - */ - Domain.prototype.lookup = function(moduleName) { - if (/^\./.test(moduleName)) { - moduleName = normalize(join(dirname(this._currentModule), moduleName)); - } - - if (moduleName in this.modules) { - var module = this.modules[moduleName]; - return module; - } - - if (!(moduleName in define.modules)) { - throw new Error("Module not defined: " + moduleName); - } - - var module = define.modules[moduleName]; - - if (typeof module == "function") { - var exports = {}; - var previousModule = this._currentModule; - this._currentModule = moduleName; - module(this.require.bind(this), exports, { id: moduleName, uri: "" }); - this._currentModule = previousModule; - module = exports; - } - - // cache the resulting module object for next time - this.modules[moduleName] = module; - - return module; - }; - -}()); - -define.Domain = Domain; -define.globalDomain = new Domain(); -var require = define.globalDomain.require.bind(define.globalDomain); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/prefix-source-map.jsm b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/prefix-source-map.jsm deleted file mode 100644 index ee2539d8..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/prefix-source-map.jsm +++ /dev/null @@ -1,20 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -/* - * WARNING! - * - * Do not edit this file directly, it is built from the sources at - * https://github.com/mozilla/source-map/ - */ - -/////////////////////////////////////////////////////////////////////////////// - - -this.EXPORTED_SYMBOLS = [ "SourceMapConsumer", "SourceMapGenerator", "SourceNode" ]; - -Components.utils.import('resource://gre/modules/devtools/Require.jsm'); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/prefix-utils.jsm b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/prefix-utils.jsm deleted file mode 100644 index 80341d45..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/prefix-utils.jsm +++ /dev/null @@ -1,18 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -/* - * WARNING! - * - * Do not edit this file directly, it is built from the sources at - * https://github.com/mozilla/source-map/ - */ - -Components.utils.import('resource://gre/modules/devtools/Require.jsm'); -Components.utils.import('resource://gre/modules/devtools/SourceMap.jsm'); - -this.EXPORTED_SYMBOLS = [ "define", "runSourceMapTests" ]; diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/suffix-browser.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/suffix-browser.js deleted file mode 100644 index fb29ff5f..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/suffix-browser.js +++ /dev/null @@ -1,8 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/////////////////////////////////////////////////////////////////////////////// - -this.sourceMap = { - SourceMapConsumer: require('source-map/source-map-consumer').SourceMapConsumer, - SourceMapGenerator: require('source-map/source-map-generator').SourceMapGenerator, - SourceNode: require('source-map/source-node').SourceNode -}; diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/suffix-source-map.jsm b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/suffix-source-map.jsm deleted file mode 100644 index cf3c2d8d..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/suffix-source-map.jsm +++ /dev/null @@ -1,6 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/////////////////////////////////////////////////////////////////////////////// - -this.SourceMapConsumer = require('source-map/source-map-consumer').SourceMapConsumer; -this.SourceMapGenerator = require('source-map/source-map-generator').SourceMapGenerator; -this.SourceNode = require('source-map/source-node').SourceNode; diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/suffix-utils.jsm b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/suffix-utils.jsm deleted file mode 100644 index b31b84cb..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/suffix-utils.jsm +++ /dev/null @@ -1,21 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -function runSourceMapTests(modName, do_throw) { - let mod = require(modName); - let assert = require('test/source-map/assert'); - let util = require('test/source-map/util'); - - assert.init(do_throw); - - for (let k in mod) { - if (/^test/.test(k)) { - mod[k](assert, util); - } - } - -} -this.runSourceMapTests = runSourceMapTests; diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/test-prefix.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/test-prefix.js deleted file mode 100644 index 1b13f300..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/test-prefix.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - * WARNING! - * - * Do not edit this file directly, it is built from the sources at - * https://github.com/mozilla/source-map/ - */ - -Components.utils.import('resource://test/Utils.jsm'); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/test-suffix.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/test-suffix.js deleted file mode 100644 index bec2de3f..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/build/test-suffix.js +++ /dev/null @@ -1,3 +0,0 @@ -function run_test() { - runSourceMapTests('{THIS_MODULE}', do_throw); -} diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map.js deleted file mode 100644 index 121ad241..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ -exports.SourceMapGenerator = require('./source-map/source-map-generator').SourceMapGenerator; -exports.SourceMapConsumer = require('./source-map/source-map-consumer').SourceMapConsumer; -exports.SourceNode = require('./source-map/source-node').SourceNode; diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/array-set.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/array-set.js deleted file mode 100644 index 40f9a18b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/array-set.js +++ /dev/null @@ -1,97 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var util = require('./util'); - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = {}; - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var isDuplicate = this.has(aStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - this._set[util.toSetString(aStr)] = idx; - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - return Object.prototype.hasOwnProperty.call(this._set, - util.toSetString(aStr)); - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (this.has(aStr)) { - return this._set[util.toSetString(aStr)]; - } - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/base64-vlq.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/base64-vlq.js deleted file mode 100644 index 1b67bb37..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/base64-vlq.js +++ /dev/null @@ -1,144 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var base64 = require('./base64'); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * is placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * is placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string. - */ - exports.decode = function base64VLQ_decode(aStr) { - var i = 0; - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (i >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - digit = base64.decode(aStr.charAt(i++)); - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - return { - value: fromVLQSigned(result), - rest: aStr.slice(i) - }; - }; - -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/base64.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/base64.js deleted file mode 100644 index 863cc465..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/base64.js +++ /dev/null @@ -1,42 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var charToIntMap = {}; - var intToCharMap = {}; - - 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' - .split('') - .forEach(function (ch, index) { - charToIntMap[ch] = index; - intToCharMap[index] = ch; - }); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function base64_encode(aNumber) { - if (aNumber in intToCharMap) { - return intToCharMap[aNumber]; - } - throw new TypeError("Must be between 0 and 63: " + aNumber); - }; - - /** - * Decode a single base 64 digit to an integer. - */ - exports.decode = function base64_decode(aChar) { - if (aChar in charToIntMap) { - return charToIntMap[aChar]; - } - throw new TypeError("Not a valid base 64 digit: " + aChar); - }; - -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/binary-search.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/binary-search.js deleted file mode 100644 index ff347c68..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/binary-search.js +++ /dev/null @@ -1,81 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the next - // closest element that is less than that element. - // - // 3. We did not find the exact element, and there is no next-closest - // element which is less than the one we are searching for, so we - // return null. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return aHaystack[mid]; - } - else if (cmp > 0) { - // aHaystack[mid] is greater than our needle. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare); - } - // We did not find an exact match, return the next closest one - // (termination case 2). - return aHaystack[mid]; - } - else { - // aHaystack[mid] is less than our needle. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare); - } - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (2) or (3) and return the appropriate thing. - return aLow < 0 - ? null - : aHaystack[aLow]; - } - } - - /** - * This is an implementation of binary search which will always try and return - * the next lowest value checked if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - */ - exports.search = function search(aNeedle, aHaystack, aCompare) { - return aHaystack.length > 0 - ? recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare) - : null; - }; - -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/source-map-consumer.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/source-map-consumer.js deleted file mode 100644 index 5214d5e7..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/source-map-consumer.js +++ /dev/null @@ -1,478 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var util = require('./util'); - var binarySearch = require('./binary-search'); - var ArraySet = require('./array-set').ArraySet; - var base64VLQ = require('./base64-vlq'); - - /** - * A SourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names, true); - this._sources = ArraySet.fromArray(sources, true); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this.file = file; - } - - /** - * Create a SourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns SourceMapConsumer - */ - SourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(SourceMapConsumer.prototype); - - smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - smc.__generatedMappings = aSourceMap._mappings.slice() - .sort(util.compareByGeneratedPositions); - smc.__originalMappings = aSourceMap._mappings.slice() - .sort(util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(SourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot ? util.join(this.sourceRoot, s) : s; - }, this); - } - }); - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - get: function () { - if (!this.__generatedMappings) { - this.__generatedMappings = []; - this.__originalMappings = []; - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - get: function () { - if (!this.__originalMappings) { - this.__generatedMappings = []; - this.__originalMappings = []; - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var mappingSeparator = /^[,;]/; - var str = aStr; - var mapping; - var temp; - - while (str.length > 0) { - if (str.charAt(0) === ';') { - generatedLine++; - str = str.slice(1); - previousGeneratedColumn = 0; - } - else if (str.charAt(0) === ',') { - str = str.slice(1); - } - else { - mapping = {}; - mapping.generatedLine = generatedLine; - - // Generated column. - temp = base64VLQ.decode(str); - mapping.generatedColumn = previousGeneratedColumn + temp.value; - previousGeneratedColumn = mapping.generatedColumn; - str = temp.rest; - - if (str.length > 0 && !mappingSeparator.test(str.charAt(0))) { - // Original source. - temp = base64VLQ.decode(str); - mapping.source = this._sources.at(previousSource + temp.value); - previousSource += temp.value; - str = temp.rest; - if (str.length === 0 || mappingSeparator.test(str.charAt(0))) { - throw new Error('Found a source, but no line and column'); - } - - // Original line. - temp = base64VLQ.decode(str); - mapping.originalLine = previousOriginalLine + temp.value; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - str = temp.rest; - if (str.length === 0 || mappingSeparator.test(str.charAt(0))) { - throw new Error('Found a source and line, but no column'); - } - - // Original column. - temp = base64VLQ.decode(str); - mapping.originalColumn = previousOriginalColumn + temp.value; - previousOriginalColumn = mapping.originalColumn; - str = temp.rest; - - if (str.length > 0 && !mappingSeparator.test(str.charAt(0))) { - // Original name. - temp = base64VLQ.decode(str); - mapping.name = this._names.at(previousName + temp.value); - previousName += temp.value; - str = temp.rest; - } - } - - this.__generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - this.__originalMappings.push(mapping); - } - } - } - - this.__generatedMappings.sort(util.compareByGeneratedPositions); - this.__originalMappings.sort(util.compareByOriginalPositions); - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - SourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator); - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - SourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var mapping = this._findMapping(needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositions); - - if (mapping && mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source && this.sourceRoot) { - source = util.join(this.sourceRoot, source); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: util.getArg(mapping, 'name', null) - }; - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * availible. - */ - SourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - throw new Error('"' + aSource + '" is not in the SourceMap.'); - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - SourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - if (this.sourceRoot) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - - var mapping = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions); - - if (mapping) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null) - }; - } - - return { - line: null, - column: null - }; - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source; - if (source && sourceRoot) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name - }; - }).forEach(aCallback, context); - }; - - exports.SourceMapConsumer = SourceMapConsumer; - -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/source-map-generator.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/source-map-generator.js deleted file mode 100644 index d555f08c..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/source-map-generator.js +++ /dev/null @@ -1,397 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var base64VLQ = require('./base64-vlq'); - var util = require('./util'); - var ArraySet = require('./array-set').ArraySet; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = []; - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source) { - newMapping.source = mapping.source; - if (sourceRoot) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - this._validateMapping(generated, original, source, name); - - if (source && !this._sources.has(source)) { - this._sources.add(source); - } - - if (name && !this._names.has(name)) { - this._names.add(name); - } - - this._mappings.push({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent !== null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = {}; - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (!aSourceFile) { - if (!aSourceMapConsumer.file) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - aSourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "aSourceFile" relative if an absolute Url is passed. - if (sourceRoot) { - aSourceFile = util.relative(sourceRoot, aSourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "aSourceFile" - this._mappings.forEach(function (mapping) { - if (mapping.source === aSourceFile && mapping.originalLine) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source !== null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name !== null && mapping.name !== null) { - // Only use the identifier name if it's an identifier - // in both SourceMaps - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content) { - if (sourceRoot) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var mapping; - - // The mappings must be guaranteed to be in sorted order before we start - // serializing them or else the generated line numbers (which are defined - // via the ';' separators) will be all messed up. Note: it might be more - // performant to maintain the sorting as we insert them, rather than as we - // serialize them, but the big O is the same either way. - this._mappings.sort(util.compareByGeneratedPositions); - - for (var i = 0, len = this._mappings.length; i < len; i++) { - mapping = this._mappings[i]; - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - result += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositions(mapping, this._mappings[i - 1])) { - continue; - } - result += ','; - } - } - - result += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source) { - result += base64VLQ.encode(this._sources.indexOf(mapping.source) - - previousSource); - previousSource = this._sources.indexOf(mapping.source); - - // lines are stored 0-based in SourceMap spec version 3 - result += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - result += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name) { - result += base64VLQ.encode(this._names.indexOf(mapping.name) - - previousName); - previousName = this._names.indexOf(mapping.name); - } - } - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, - key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - file: this._file, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._sourceRoot) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/source-node.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/source-node.js deleted file mode 100644 index 1d98123b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/source-node.js +++ /dev/null @@ -1,387 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; - var util = require('./util'); - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine === undefined ? null : aLine; - this.column = aColumn === undefined ? null : aColumn; - this.source = aSource === undefined ? null : aSource; - this.name = aName === undefined ? null : aName; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // The generated code - // Processed fragments are removed from this array. - var remainingLines = aGeneratedCode.split('\n'); - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - var code = ""; - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, remainingLines.shift() + "\n"); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[0]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[0] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(remainingLines.shift() + "\n"); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[0]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[0] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLines.length > 0) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - var lastLine = remainingLines.shift(); - if (remainingLines.length > 0) lastLine += "\n"; - addMappingWithCode(lastMapping, lastLine); - } - // and add the remaining lines without any mapping - node.add(remainingLines.join("\n")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content) { - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - mapping.source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk instanceof SourceNode || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk instanceof SourceNode || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk instanceof SourceNode) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild instanceof SourceNode) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i] instanceof SourceNode) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - chunk.split('').forEach(function (ch, idx, array) { - if (ch === '\n') { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === array.length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - }); - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/util.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/util.js deleted file mode 100644 index 4316445f..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/lib/source-map/util.js +++ /dev/null @@ -1,302 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consequtive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '<dir>/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = (path.charAt(0) === '/'); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - return '$' + aStr; - } - exports.toSetString = toSetString; - - function fromSetString(aStr) { - return aStr.substr(1); - } - exports.fromSetString = fromSetString; - - function relative(aRoot, aPath) { - aRoot = aRoot.replace(/\/$/, ''); - - var url = urlParse(aRoot); - if (aPath.charAt(0) == "/" && url && url.path == "/") { - return aPath.slice(1); - } - - return aPath.indexOf(aRoot + '/') === 0 - ? aPath.substr(aRoot.length + 1) - : aPath; - } - exports.relative = relative; - - function strcmp(aStr1, aStr2) { - var s1 = aStr1 || ""; - var s2 = aStr2 || ""; - return (s1 > s2) - (s1 < s2); - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp; - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp || onlyCompareOriginal) { - return cmp; - } - - cmp = strcmp(mappingA.name, mappingB.name); - if (cmp) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp) { - return cmp; - } - - return mappingA.generatedColumn - mappingB.generatedColumn; - }; - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings where the generated positions are - * compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositions(mappingA, mappingB, onlyCompareGenerated) { - var cmp; - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp || onlyCompareGenerated) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - }; - exports.compareByGeneratedPositions = compareByGeneratedPositions; - -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/node_modules/amdefine/LICENSE b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/node_modules/amdefine/LICENSE deleted file mode 100644 index f33d665d..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/node_modules/amdefine/LICENSE +++ /dev/null @@ -1,58 +0,0 @@ -amdefine is released under two licenses: new BSD, and MIT. You may pick the -license that best suits your development needs. The text of both licenses are -provided below. - - -The "New" BSD License: ----------------------- - -Copyright (c) 2011, The Dojo Foundation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of the Dojo Foundation nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - -MIT License ------------ - -Copyright (c) 2011, The Dojo Foundation - -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/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/node_modules/amdefine/README.md b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/node_modules/amdefine/README.md deleted file mode 100644 index c6995c07..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/node_modules/amdefine/README.md +++ /dev/null @@ -1,171 +0,0 @@ -# amdefine - -A module that can be used to implement AMD's define() in Node. This allows you -to code to the AMD API and have the module work in node programs without -requiring those other programs to use AMD. - -## Usage - -**1)** Update your package.json to indicate amdefine as a dependency: - -```javascript - "dependencies": { - "amdefine": ">=0.1.0" - } -``` - -Then run `npm install` to get amdefine into your project. - -**2)** At the top of each module that uses define(), place this code: - -```javascript -if (typeof define !== 'function') { var define = require('amdefine')(module) } -``` - -**Only use these snippets** when loading amdefine. If you preserve the basic structure, -with the braces, it will be stripped out when using the [RequireJS optimizer](#optimizer). - -You can add spaces, line breaks and even require amdefine with a local path, but -keep the rest of the structure to get the stripping behavior. - -As you may know, because `if` statements in JavaScript don't have their own scope, the var -declaration in the above snippet is made whether the `if` expression is truthy or not. If -RequireJS is loaded then the declaration is superfluous because `define` is already already -declared in the same scope in RequireJS. Fortunately JavaScript handles multiple `var` -declarations of the same variable in the same scope gracefully. - -If you want to deliver amdefine.js with your code rather than specifying it as a dependency -with npm, then just download the latest release and refer to it using a relative path: - -[Latest Version](https://github.com/jrburke/amdefine/raw/latest/amdefine.js) - -### amdefine/intercept - -Consider this very experimental. - -Instead of pasting the piece of text for the amdefine setup of a `define` -variable in each module you create or consume, you can use `amdefine/intercept` -instead. It will automatically insert the above snippet in each .js file loaded -by Node. - -**Warning**: you should only use this if you are creating an application that -is consuming AMD style defined()'d modules that are distributed via npm and want -to run that code in Node. - -For library code where you are not sure if it will be used by others in Node or -in the browser, then explicitly depending on amdefine and placing the code -snippet above is suggested path, instead of using `amdefine/intercept`. The -intercept module affects all .js files loaded in the Node app, and it is -inconsiderate to modify global state like that unless you are also controlling -the top level app. - -#### Why distribute AMD-style nodes via npm? - -npm has a lot of weaknesses for front-end use (installed layout is not great, -should have better support for the `baseUrl + moduleID + '.js' style of loading, -single file JS installs), but some people want a JS package manager and are -willing to live with those constraints. If that is you, but still want to author -in AMD style modules to get dynamic require([]), better direct source usage and -powerful loader plugin support in the browser, then this tool can help. - -#### amdefine/intercept usage - -Just require it in your top level app module (for example index.js, server.js): - -```javascript -require('amdefine/intercept'); -``` - -The module does not return a value, so no need to assign the result to a local -variable. - -Then just require() code as you normally would with Node's require(). Any .js -loaded after the intercept require will have the amdefine check injected in -the .js source as it is loaded. It does not modify the source on disk, just -prepends some content to the text of the module as it is loaded by Node. - -#### How amdefine/intercept works - -It overrides the `Module._extensions['.js']` in Node to automatically prepend -the amdefine snippet above. So, it will affect any .js file loaded by your -app. - -## define() usage - -It is best if you use the anonymous forms of define() in your module: - -```javascript -define(function (require) { - var dependency = require('dependency'); -}); -``` - -or - -```javascript -define(['dependency'], function (dependency) { - -}); -``` - -## RequireJS optimizer integration. <a name="optimizer"></name> - -Version 1.0.3 of the [RequireJS optimizer](http://requirejs.org/docs/optimization.html) -will have support for stripping the `if (typeof define !== 'function')` check -mentioned above, so you can include this snippet for code that runs in the -browser, but avoid taking the cost of the if() statement once the code is -optimized for deployment. - -## Node 0.4 Support - -If you want to support Node 0.4, then add `require` as the second parameter to amdefine: - -```javascript -//Only if you want Node 0.4. If using 0.5 or later, use the above snippet. -if (typeof define !== 'function') { var define = require('amdefine')(module, require) } -``` - -## Limitations - -### Synchronous vs Asynchronous - -amdefine creates a define() function that is callable by your code. It will -execute and trace dependencies and call the factory function *synchronously*, -to keep the behavior in line with Node's synchronous dependency tracing. - -The exception: calling AMD's callback-style require() from inside a factory -function. The require callback is called on process.nextTick(): - -```javascript -define(function (require) { - require(['a'], function(a) { - //'a' is loaded synchronously, but - //this callback is called on process.nextTick(). - }); -}); -``` - -### Loader Plugins - -Loader plugins are supported as long as they call their load() callbacks -synchronously. So ones that do network requests will not work. However plugins -like [text](http://requirejs.org/docs/api.html#text) can load text files locally. - -The plugin API's `load.fromText()` is **not supported** in amdefine, so this means -transpiler plugins like the [CoffeeScript loader plugin](https://github.com/jrburke/require-cs) -will not work. This may be fixable, but it is a bit complex, and I do not have -enough node-fu to figure it out yet. See the source for amdefine.js if you want -to get an idea of the issues involved. - -## Tests - -To run the tests, cd to **tests** and run: - -``` -node all.js -node all-intercept.js -``` - -## License - -New BSD and MIT. Check the LICENSE file for all the details. diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/node_modules/amdefine/amdefine.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/node_modules/amdefine/amdefine.js deleted file mode 100644 index 53bf5a68..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/node_modules/amdefine/amdefine.js +++ /dev/null @@ -1,299 +0,0 @@ -/** vim: et:ts=4:sw=4:sts=4 - * @license amdefine 0.1.0 Copyright (c) 2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/amdefine for details - */ - -/*jslint node: true */ -/*global module, process */ -'use strict'; - -/** - * Creates a define for node. - * @param {Object} module the "module" object that is defined by Node for the - * current module. - * @param {Function} [requireFn]. Node's require function for the current module. - * It only needs to be passed in Node versions before 0.5, when module.require - * did not exist. - * @returns {Function} a define function that is usable for the current node - * module. - */ -function amdefine(module, requireFn) { - 'use strict'; - var defineCache = {}, - loaderCache = {}, - alreadyCalled = false, - path = require('path'), - makeRequire, stringRequire; - - /** - * Trims the . and .. from an array of path segments. - * It will keep a leading path segment if a .. will become - * the first path segment, to help with module name lookups, - * which act like paths, but can be remapped. But the end result, - * all paths that use this function should look normalized. - * NOTE: this method MODIFIES the input array. - * @param {Array} ary the array of path segments. - */ - function trimDots(ary) { - var i, part; - for (i = 0; ary[i]; i+= 1) { - part = ary[i]; - if (part === '.') { - ary.splice(i, 1); - i -= 1; - } else if (part === '..') { - if (i === 1 && (ary[2] === '..' || ary[0] === '..')) { - //End of the line. Keep at least one non-dot - //path segment at the front so it can be mapped - //correctly to disk. Otherwise, there is likely - //no path mapping for a path starting with '..'. - //This can still fail, but catches the most reasonable - //uses of .. - break; - } else if (i > 0) { - ary.splice(i - 1, 2); - i -= 2; - } - } - } - } - - function normalize(name, baseName) { - var baseParts; - - //Adjust any relative paths. - if (name && name.charAt(0) === '.') { - //If have a base name, try to normalize against it, - //otherwise, assume it is a top-level require that will - //be relative to baseUrl in the end. - if (baseName) { - baseParts = baseName.split('/'); - baseParts = baseParts.slice(0, baseParts.length - 1); - baseParts = baseParts.concat(name.split('/')); - trimDots(baseParts); - name = baseParts.join('/'); - } - } - - return name; - } - - /** - * Create the normalize() function passed to a loader plugin's - * normalize method. - */ - function makeNormalize(relName) { - return function (name) { - return normalize(name, relName); - }; - } - - function makeLoad(id) { - function load(value) { - loaderCache[id] = value; - } - - load.fromText = function (id, text) { - //This one is difficult because the text can/probably uses - //define, and any relative paths and requires should be relative - //to that id was it would be found on disk. But this would require - //bootstrapping a module/require fairly deeply from node core. - //Not sure how best to go about that yet. - throw new Error('amdefine does not implement load.fromText'); - }; - - return load; - } - - makeRequire = function (systemRequire, exports, module, relId) { - function amdRequire(deps, callback) { - if (typeof deps === 'string') { - //Synchronous, single module require('') - return stringRequire(systemRequire, exports, module, deps, relId); - } else { - //Array of dependencies with a callback. - - //Convert the dependencies to modules. - deps = deps.map(function (depName) { - return stringRequire(systemRequire, exports, module, depName, relId); - }); - - //Wait for next tick to call back the require call. - process.nextTick(function () { - callback.apply(null, deps); - }); - } - } - - amdRequire.toUrl = function (filePath) { - if (filePath.indexOf('.') === 0) { - return normalize(filePath, path.dirname(module.filename)); - } else { - return filePath; - } - }; - - return amdRequire; - }; - - //Favor explicit value, passed in if the module wants to support Node 0.4. - requireFn = requireFn || function req() { - return module.require.apply(module, arguments); - }; - - function runFactory(id, deps, factory) { - var r, e, m, result; - - if (id) { - e = loaderCache[id] = {}; - m = { - id: id, - uri: __filename, - exports: e - }; - r = makeRequire(requireFn, e, m, id); - } else { - //Only support one define call per file - if (alreadyCalled) { - throw new Error('amdefine with no module ID cannot be called more than once per file.'); - } - alreadyCalled = true; - - //Use the real variables from node - //Use module.exports for exports, since - //the exports in here is amdefine exports. - e = module.exports; - m = module; - r = makeRequire(requireFn, e, m, module.id); - } - - //If there are dependencies, they are strings, so need - //to convert them to dependency values. - if (deps) { - deps = deps.map(function (depName) { - return r(depName); - }); - } - - //Call the factory with the right dependencies. - if (typeof factory === 'function') { - result = factory.apply(m.exports, deps); - } else { - result = factory; - } - - if (result !== undefined) { - m.exports = result; - if (id) { - loaderCache[id] = m.exports; - } - } - } - - stringRequire = function (systemRequire, exports, module, id, relId) { - //Split the ID by a ! so that - var index = id.indexOf('!'), - originalId = id, - prefix, plugin; - - if (index === -1) { - id = normalize(id, relId); - - //Straight module lookup. If it is one of the special dependencies, - //deal with it, otherwise, delegate to node. - if (id === 'require') { - return makeRequire(systemRequire, exports, module, relId); - } else if (id === 'exports') { - return exports; - } else if (id === 'module') { - return module; - } else if (loaderCache.hasOwnProperty(id)) { - return loaderCache[id]; - } else if (defineCache[id]) { - runFactory.apply(null, defineCache[id]); - return loaderCache[id]; - } else { - if(systemRequire) { - return systemRequire(originalId); - } else { - throw new Error('No module with ID: ' + id); - } - } - } else { - //There is a plugin in play. - prefix = id.substring(0, index); - id = id.substring(index + 1, id.length); - - plugin = stringRequire(systemRequire, exports, module, prefix, relId); - - if (plugin.normalize) { - id = plugin.normalize(id, makeNormalize(relId)); - } else { - //Normalize the ID normally. - id = normalize(id, relId); - } - - if (loaderCache[id]) { - return loaderCache[id]; - } else { - plugin.load(id, makeRequire(systemRequire, exports, module, relId), makeLoad(id), {}); - - return loaderCache[id]; - } - } - }; - - //Create a define function specific to the module asking for amdefine. - function define(id, deps, factory) { - if (Array.isArray(id)) { - factory = deps; - deps = id; - id = undefined; - } else if (typeof id !== 'string') { - factory = id; - id = deps = undefined; - } - - if (deps && !Array.isArray(deps)) { - factory = deps; - deps = undefined; - } - - if (!deps) { - deps = ['require', 'exports', 'module']; - } - - //Set up properties for this module. If an ID, then use - //internal cache. If no ID, then use the external variables - //for this node module. - if (id) { - //Put the module in deep freeze until there is a - //require call for it. - defineCache[id] = [id, deps, factory]; - } else { - runFactory(id, deps, factory); - } - } - - //define.require, which has access to all the values in the - //cache. Useful for AMD modules that all have IDs in the file, - //but need to finally export a value to node based on one of those - //IDs. - define.require = function (id) { - if (loaderCache[id]) { - return loaderCache[id]; - } - - if (defineCache[id]) { - runFactory.apply(null, defineCache[id]); - return loaderCache[id]; - } - }; - - define.amd = {}; - - return define; -} - -module.exports = amdefine; diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/node_modules/amdefine/intercept.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/node_modules/amdefine/intercept.js deleted file mode 100644 index 771a9830..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/node_modules/amdefine/intercept.js +++ /dev/null @@ -1,36 +0,0 @@ -/*jshint node: true */ -var inserted, - Module = require('module'), - fs = require('fs'), - existingExtFn = Module._extensions['.js'], - amdefineRegExp = /amdefine\.js/; - -inserted = "if (typeof define !== 'function') {var define = require('amdefine')(module)}"; - -//From the node/lib/module.js source: -function stripBOM(content) { - // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) - // because the buffer-to-string conversion in `fs.readFileSync()` - // translates it to FEFF, the UTF-16 BOM. - if (content.charCodeAt(0) === 0xFEFF) { - content = content.slice(1); - } - return content; -} - -//Also adapted from the node/lib/module.js source: -function intercept(module, filename) { - var content = stripBOM(fs.readFileSync(filename, 'utf8')); - - if (!amdefineRegExp.test(module.id)) { - content = inserted + content; - } - - module._compile(content, filename); -} - -intercept._id = 'amdefine/intercept'; - -if (!existingExtFn._id || existingExtFn._id !== intercept._id) { - Module._extensions['.js'] = intercept; -} diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/node_modules/amdefine/package.json b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/node_modules/amdefine/package.json deleted file mode 100644 index 8caf15c5..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/node_modules/amdefine/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "amdefine", - "description": "Provide AMD's define() API for declaring modules in the AMD format", - "version": "0.1.0", - "homepage": "http://github.com/jrburke/amdefine", - "author": { - "name": "James Burke", - "email": "jrburke@gmail.com", - "url": "http://github.com/jrburke" - }, - "licenses": [ - { - "type": "BSD", - "url": "https://github.com/jrburke/amdefine/blob/master/LICENSE" - }, - { - "type": "MIT", - "url": "https://github.com/jrburke/amdefine/blob/master/LICENSE" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/jrburke/amdefine.git" - }, - "main": "./amdefine.js", - "engines": { - "node": ">=0.4.2" - }, - "readme": "# amdefine\n\nA module that can be used to implement AMD's define() in Node. This allows you\nto code to the AMD API and have the module work in node programs without\nrequiring those other programs to use AMD.\n\n## Usage\n\n**1)** Update your package.json to indicate amdefine as a dependency:\n\n```javascript\n \"dependencies\": {\n \"amdefine\": \">=0.1.0\"\n }\n```\n\nThen run `npm install` to get amdefine into your project.\n\n**2)** At the top of each module that uses define(), place this code:\n\n```javascript\nif (typeof define !== 'function') { var define = require('amdefine')(module) }\n```\n\n**Only use these snippets** when loading amdefine. If you preserve the basic structure,\nwith the braces, it will be stripped out when using the [RequireJS optimizer](#optimizer).\n\nYou can add spaces, line breaks and even require amdefine with a local path, but\nkeep the rest of the structure to get the stripping behavior.\n\nAs you may know, because `if` statements in JavaScript don't have their own scope, the var\ndeclaration in the above snippet is made whether the `if` expression is truthy or not. If\nRequireJS is loaded then the declaration is superfluous because `define` is already already\ndeclared in the same scope in RequireJS. Fortunately JavaScript handles multiple `var`\ndeclarations of the same variable in the same scope gracefully.\n\nIf you want to deliver amdefine.js with your code rather than specifying it as a dependency\nwith npm, then just download the latest release and refer to it using a relative path:\n\n[Latest Version](https://github.com/jrburke/amdefine/raw/latest/amdefine.js)\n\n### amdefine/intercept\n\nConsider this very experimental.\n\nInstead of pasting the piece of text for the amdefine setup of a `define`\nvariable in each module you create or consume, you can use `amdefine/intercept`\ninstead. It will automatically insert the above snippet in each .js file loaded\nby Node.\n\n**Warning**: you should only use this if you are creating an application that\nis consuming AMD style defined()'d modules that are distributed via npm and want\nto run that code in Node.\n\nFor library code where you are not sure if it will be used by others in Node or\nin the browser, then explicitly depending on amdefine and placing the code\nsnippet above is suggested path, instead of using `amdefine/intercept`. The\nintercept module affects all .js files loaded in the Node app, and it is\ninconsiderate to modify global state like that unless you are also controlling\nthe top level app.\n\n#### Why distribute AMD-style nodes via npm?\n\nnpm has a lot of weaknesses for front-end use (installed layout is not great,\nshould have better support for the `baseUrl + moduleID + '.js' style of loading,\nsingle file JS installs), but some people want a JS package manager and are\nwilling to live with those constraints. If that is you, but still want to author\nin AMD style modules to get dynamic require([]), better direct source usage and\npowerful loader plugin support in the browser, then this tool can help.\n\n#### amdefine/intercept usage\n\nJust require it in your top level app module (for example index.js, server.js):\n\n```javascript\nrequire('amdefine/intercept');\n```\n\nThe module does not return a value, so no need to assign the result to a local\nvariable.\n\nThen just require() code as you normally would with Node's require(). Any .js\nloaded after the intercept require will have the amdefine check injected in\nthe .js source as it is loaded. It does not modify the source on disk, just\nprepends some content to the text of the module as it is loaded by Node.\n\n#### How amdefine/intercept works\n\nIt overrides the `Module._extensions['.js']` in Node to automatically prepend\nthe amdefine snippet above. So, it will affect any .js file loaded by your\napp.\n\n## define() usage\n\nIt is best if you use the anonymous forms of define() in your module:\n\n```javascript\ndefine(function (require) {\n var dependency = require('dependency');\n});\n```\n\nor\n\n```javascript\ndefine(['dependency'], function (dependency) {\n\n});\n```\n\n## RequireJS optimizer integration. <a name=\"optimizer\"></name>\n\nVersion 1.0.3 of the [RequireJS optimizer](http://requirejs.org/docs/optimization.html)\nwill have support for stripping the `if (typeof define !== 'function')` check\nmentioned above, so you can include this snippet for code that runs in the\nbrowser, but avoid taking the cost of the if() statement once the code is\noptimized for deployment.\n\n## Node 0.4 Support\n\nIf you want to support Node 0.4, then add `require` as the second parameter to amdefine:\n\n```javascript\n//Only if you want Node 0.4. If using 0.5 or later, use the above snippet.\nif (typeof define !== 'function') { var define = require('amdefine')(module, require) }\n```\n\n## Limitations\n\n### Synchronous vs Asynchronous\n\namdefine creates a define() function that is callable by your code. It will\nexecute and trace dependencies and call the factory function *synchronously*,\nto keep the behavior in line with Node's synchronous dependency tracing.\n\nThe exception: calling AMD's callback-style require() from inside a factory\nfunction. The require callback is called on process.nextTick():\n\n```javascript\ndefine(function (require) {\n require(['a'], function(a) {\n //'a' is loaded synchronously, but\n //this callback is called on process.nextTick().\n });\n});\n```\n\n### Loader Plugins\n\nLoader plugins are supported as long as they call their load() callbacks\nsynchronously. So ones that do network requests will not work. However plugins\nlike [text](http://requirejs.org/docs/api.html#text) can load text files locally.\n\nThe plugin API's `load.fromText()` is **not supported** in amdefine, so this means\ntranspiler plugins like the [CoffeeScript loader plugin](https://github.com/jrburke/require-cs)\nwill not work. This may be fixable, but it is a bit complex, and I do not have\nenough node-fu to figure it out yet. See the source for amdefine.js if you want\nto get an idea of the issues involved.\n\n## Tests\n\nTo run the tests, cd to **tests** and run:\n\n```\nnode all.js\nnode all-intercept.js\n```\n\n## License\n\nNew BSD and MIT. Check the LICENSE file for all the details.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/jrburke/amdefine/issues" - }, - "_id": "amdefine@0.1.0", - "_from": "amdefine@>=0.0.4" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/package.json b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/package.json deleted file mode 100644 index 132d4562..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/package.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "name": "source-map", - "description": "Generates and consumes source maps", - "version": "0.1.33", - "homepage": "https://github.com/mozilla/source-map", - "author": { - "name": "Nick Fitzgerald", - "email": "nfitzgerald@mozilla.com" - }, - "contributors": [ - { - "name": "Tobias Koppers", - "email": "tobias.koppers@googlemail.com" - }, - { - "name": "Duncan Beevers", - "email": "duncan@dweebd.com" - }, - { - "name": "Stephen Crane", - "email": "scrane@mozilla.com" - }, - { - "name": "Ryan Seddon", - "email": "seddon.ryan@gmail.com" - }, - { - "name": "Miles Elam", - "email": "miles.elam@deem.com" - }, - { - "name": "Mihai Bazon", - "email": "mihai.bazon@gmail.com" - }, - { - "name": "Michael Ficarra", - "email": "github.public.email@michael.ficarra.me" - }, - { - "name": "Todd Wolfson", - "email": "todd@twolfson.com" - }, - { - "name": "Alexander Solovyov", - "email": "alexander@solovyov.net" - }, - { - "name": "Felix Gnass", - "email": "fgnass@gmail.com" - }, - { - "name": "Conrad Irwin", - "email": "conrad.irwin@gmail.com" - }, - { - "name": "usrbincc", - "email": "usrbincc@yahoo.com" - }, - { - "name": "David Glasser", - "email": "glasser@davidglasser.net" - }, - { - "name": "Chase Douglas", - "email": "chase@newrelic.com" - }, - { - "name": "Evan Wallace", - "email": "evan.exe@gmail.com" - }, - { - "name": "Heather Arthur", - "email": "fayearthur@gmail.com" - }, - { - "name": "Hugh Kennedy", - "email": "hughskennedy@gmail.com" - }, - { - "name": "David Glasser", - "email": "glasser@davidglasser.net" - }, - { - "name": "Simon Lydell", - "email": "simon.lydell@gmail.com" - }, - { - "name": "Jmeas Smith", - "email": "jellyes2@gmail.com" - } - ], - "repository": { - "type": "git", - "url": "http://github.com/mozilla/source-map.git" - }, - "directories": { - "lib": "./lib" - }, - "main": "./lib/source-map.js", - "engines": { - "node": ">=0.8.0" - }, - "licenses": [ - { - "type": "BSD", - "url": "http://opensource.org/licenses/BSD-3-Clause" - } - ], - "dependencies": { - "amdefine": ">=0.0.4" - }, - "devDependencies": { - "dryice": ">=0.4.8" - }, - "scripts": { - "test": "node test/run-tests.js", - "build": "node Makefile.dryice.js" - }, - "readme": "# Source Map\n\nThis is a library to generate and consume the source map format\n[described here][format].\n\nThis library is written in the Asynchronous Module Definition format, and works\nin the following environments:\n\n* Modern Browsers supporting ECMAScript 5 (either after the build, or with an\n AMD loader such as RequireJS)\n\n* Inside Firefox (as a JSM file, after the build)\n\n* With NodeJS versions 0.8.X and higher\n\n## Node\n\n $ npm install source-map\n\n## Building from Source (for everywhere else)\n\nInstall Node and then run\n\n $ git clone https://fitzgen@github.com/mozilla/source-map.git\n $ cd source-map\n $ npm link .\n\nNext, run\n\n $ node Makefile.dryice.js\n\nThis should spew a bunch of stuff to stdout, and create the following files:\n\n* `dist/source-map.js` - The unminified browser version.\n\n* `dist/source-map.min.js` - The minified browser version.\n\n* `dist/SourceMap.jsm` - The JavaScript Module for inclusion in Firefox source.\n\n## Examples\n\n### Consuming a source map\n\n var rawSourceMap = {\n version: 3,\n file: 'min.js',\n names: ['bar', 'baz', 'n'],\n sources: ['one.js', 'two.js'],\n sourceRoot: 'http://example.com/www/js/',\n mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA'\n };\n\n var smc = new SourceMapConsumer(rawSourceMap);\n\n console.log(smc.sources);\n // [ 'http://example.com/www/js/one.js',\n // 'http://example.com/www/js/two.js' ]\n\n console.log(smc.originalPositionFor({\n line: 2,\n column: 28\n }));\n // { source: 'http://example.com/www/js/two.js',\n // line: 2,\n // column: 10,\n // name: 'n' }\n\n console.log(smc.generatedPositionFor({\n source: 'http://example.com/www/js/two.js',\n line: 2,\n column: 10\n }));\n // { line: 2, column: 28 }\n\n smc.eachMapping(function (m) {\n // ...\n });\n\n### Generating a source map\n\nIn depth guide:\n[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/)\n\n#### With SourceNode (high level API)\n\n function compile(ast) {\n switch (ast.type) {\n case 'BinaryExpression':\n return new SourceNode(\n ast.location.line,\n ast.location.column,\n ast.location.source,\n [compile(ast.left), \" + \", compile(ast.right)]\n );\n case 'Literal':\n return new SourceNode(\n ast.location.line,\n ast.location.column,\n ast.location.source,\n String(ast.value)\n );\n // ...\n default:\n throw new Error(\"Bad AST\");\n }\n }\n\n var ast = parse(\"40 + 2\", \"add.js\");\n console.log(compile(ast).toStringWithSourceMap({\n file: 'add.js'\n }));\n // { code: '40 + 2',\n // map: [object SourceMapGenerator] }\n\n#### With SourceMapGenerator (low level API)\n\n var map = new SourceMapGenerator({\n file: \"source-mapped.js\"\n });\n\n map.addMapping({\n generated: {\n line: 10,\n column: 35\n },\n source: \"foo.js\",\n original: {\n line: 33,\n column: 2\n },\n name: \"christopher\"\n });\n\n console.log(map.toString());\n // '{\"version\":3,\"file\":\"source-mapped.js\",\"sources\":[\"foo.js\"],\"names\":[\"christopher\"],\"mappings\":\";;;;;;;;;mCAgCEA\"}'\n\n## API\n\nGet a reference to the module:\n\n // NodeJS\n var sourceMap = require('source-map');\n\n // Browser builds\n var sourceMap = window.sourceMap;\n\n // Inside Firefox\n let sourceMap = {};\n Components.utils.import('resource:///modules/devtools/SourceMap.jsm', sourceMap);\n\n### SourceMapConsumer\n\nA SourceMapConsumer instance represents a parsed source map which we can query\nfor information about the original file positions by giving it a file position\nin the generated source.\n\n#### new SourceMapConsumer(rawSourceMap)\n\nThe only parameter is the raw source map (either as a string which can be\n`JSON.parse`'d, or an object). According to the spec, source maps have the\nfollowing attributes:\n\n* `version`: Which version of the source map spec this map is following.\n\n* `sources`: An array of URLs to the original source files.\n\n* `names`: An array of identifiers which can be referrenced by individual\n mappings.\n\n* `sourceRoot`: Optional. The URL root from which all sources are relative.\n\n* `sourcesContent`: Optional. An array of contents of the original source files.\n\n* `mappings`: A string of base64 VLQs which contain the actual mappings.\n\n* `file`: Optional. The generated filename this source map is associated with.\n\n#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition)\n\nReturns the original source, line, and column information for the generated\nsource's line and column positions provided. The only argument is an object with\nthe following properties:\n\n* `line`: The line number in the generated source.\n\n* `column`: The column number in the generated source.\n\nand an object is returned with the following properties:\n\n* `source`: The original source file, or null if this information is not\n available.\n\n* `line`: The line number in the original source, or null if this information is\n not available.\n\n* `column`: The column number in the original source, or null or null if this\n information is not available.\n\n* `name`: The original identifier, or null if this information is not available.\n\n#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition)\n\nReturns the generated line and column information for the original source,\nline, and column positions provided. The only argument is an object with\nthe following properties:\n\n* `source`: The filename of the original source.\n\n* `line`: The line number in the original source.\n\n* `column`: The column number in the original source.\n\nand an object is returned with the following properties:\n\n* `line`: The line number in the generated source, or null.\n\n* `column`: The column number in the generated source, or null.\n\n#### SourceMapConsumer.prototype.sourceContentFor(source)\n\nReturns the original source content for the source provided. The only\nargument is the URL of the original source file.\n\n#### SourceMapConsumer.prototype.eachMapping(callback, context, order)\n\nIterate over each mapping between an original source/line/column and a\ngenerated line/column in this source map.\n\n* `callback`: The function that is called with each mapping. Mappings have the\n form `{ source, generatedLine, generatedColumn, originalLine, originalColumn,\n name }`\n\n* `context`: Optional. If specified, this object will be the value of `this`\n every time that `callback` is called.\n\n* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or\n `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over\n the mappings sorted by the generated file's line/column order or the\n original's source/line/column order, respectively. Defaults to\n `SourceMapConsumer.GENERATED_ORDER`.\n\n### SourceMapGenerator\n\nAn instance of the SourceMapGenerator represents a source map which is being\nbuilt incrementally.\n\n#### new SourceMapGenerator([startOfSourceMap])\n\nYou may pass an object with the following properties:\n\n* `file`: The filename of the generated source that this source map is\n associated with.\n\n* `sourceRoot`: A root for all relative URLs in this source map.\n\n#### SourceMapGenerator.fromSourceMap(sourceMapConsumer)\n\nCreates a new SourceMapGenerator based on a SourceMapConsumer\n\n* `sourceMapConsumer` The SourceMap.\n\n#### SourceMapGenerator.prototype.addMapping(mapping)\n\nAdd a single mapping from original source line and column to the generated\nsource's line and column for this source map being created. The mapping object\nshould have the following properties:\n\n* `generated`: An object with the generated line and column positions.\n\n* `original`: An object with the original line and column positions.\n\n* `source`: The original source file (relative to the sourceRoot).\n\n* `name`: An optional original token name for this mapping.\n\n#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)\n\nSet the source content for an original source file.\n\n* `sourceFile` the URL of the original source file.\n\n* `sourceContent` the content of the source file.\n\n#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])\n\nApplies a SourceMap for a source file to the SourceMap.\nEach mapping to the supplied source file is rewritten using the\nsupplied SourceMap. Note: The resolution for the resulting mappings\nis the minimium of this map and the supplied map.\n\n* `sourceMapConsumer`: The SourceMap to be applied.\n\n* `sourceFile`: Optional. The filename of the source file.\n If omitted, sourceMapConsumer.file will be used, if it exists.\n Otherwise an error will be thrown.\n\n* `sourceMapPath`: Optional. The dirname of the path to the SourceMap\n to be applied. If relative, it is relative to the SourceMap.\n\n This parameter is needed when the two SourceMaps aren't in the same\n directory, and the SourceMap to be applied contains relative source\n paths. If so, those relative source paths need to be rewritten\n relative to the SourceMap.\n\n If omitted, it is assumed that both SourceMaps are in the same directory,\n thus not needing any rewriting. (Supplying `'.'` has the same effect.)\n\n#### SourceMapGenerator.prototype.toString()\n\nRenders the source map being generated to a string.\n\n### SourceNode\n\nSourceNodes provide a way to abstract over interpolating and/or concatenating\nsnippets of generated JavaScript source code, while maintaining the line and\ncolumn information associated between those snippets and the original source\ncode. This is useful as the final intermediate representation a compiler might\nuse before outputting the generated JS and source map.\n\n#### new SourceNode([line, column, source[, chunk[, name]]])\n\n* `line`: The original line number associated with this source node, or null if\n it isn't associated with an original line.\n\n* `column`: The original column number associated with this source node, or null\n if it isn't associated with an original column.\n\n* `source`: The original source's filename; null if no filename is provided.\n\n* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see\n below.\n\n* `name`: Optional. The original identifier.\n\n#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer)\n\nCreates a SourceNode from generated code and a SourceMapConsumer.\n\n* `code`: The generated code\n\n* `sourceMapConsumer` The SourceMap for the generated code\n\n#### SourceNode.prototype.add(chunk)\n\nAdd a chunk of generated JS to this source node.\n\n* `chunk`: A string snippet of generated JS code, another instance of\n `SourceNode`, or an array where each member is one of those things.\n\n#### SourceNode.prototype.prepend(chunk)\n\nPrepend a chunk of generated JS to this source node.\n\n* `chunk`: A string snippet of generated JS code, another instance of\n `SourceNode`, or an array where each member is one of those things.\n\n#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent)\n\nSet the source content for a source file. This will be added to the\n`SourceMap` in the `sourcesContent` field.\n\n* `sourceFile`: The filename of the source file\n\n* `sourceContent`: The content of the source file\n\n#### SourceNode.prototype.walk(fn)\n\nWalk over the tree of JS snippets in this node and its children. The walking\nfunction is called once for each snippet of JS and is passed that snippet and\nthe its original associated source's line/column location.\n\n* `fn`: The traversal function.\n\n#### SourceNode.prototype.walkSourceContents(fn)\n\nWalk over the tree of SourceNodes. The walking function is called for each\nsource file content and is passed the filename and source content.\n\n* `fn`: The traversal function.\n\n#### SourceNode.prototype.join(sep)\n\nLike `Array.prototype.join` except for SourceNodes. Inserts the separator\nbetween each of this source node's children.\n\n* `sep`: The separator.\n\n#### SourceNode.prototype.replaceRight(pattern, replacement)\n\nCall `String.prototype.replace` on the very right-most source snippet. Useful\nfor trimming whitespace from the end of a source node, etc.\n\n* `pattern`: The pattern to replace.\n\n* `replacement`: The thing to replace the pattern with.\n\n#### SourceNode.prototype.toString()\n\nReturn the string representation of this source node. Walks over the tree and\nconcatenates all the various snippets together to one string.\n\n### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])\n\nReturns the string representation of this tree of source nodes, plus a\nSourceMapGenerator which contains all the mappings between the generated and\noriginal sources.\n\nThe arguments are the same as those to `new SourceMapGenerator`.\n\n## Tests\n\n[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map)\n\nInstall NodeJS version 0.8.0 or greater, then run `node test/run-tests.js`.\n\nTo add new tests, create a new file named `test/test-<your new test name>.js`\nand export your test functions with names that start with \"test\", for example\n\n exports[\"test doing the foo bar\"] = function (assert, util) {\n ...\n };\n\nThe new test will be located automatically when you run the suite.\n\nThe `util` argument is the test utility module located at `test/source-map/util`.\n\nThe `assert` argument is a cut down version of node's assert module. You have\naccess to the following assertion functions:\n\n* `doesNotThrow`\n\n* `equal`\n\n* `ok`\n\n* `strictEqual`\n\n* `throws`\n\n(The reason for the restricted set of test functions is because we need the\ntests to run inside Firefox's test suite as well and so the assert module is\nshimmed in that environment. See `build/assert-shim.js`.)\n\n[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit\n[feature]: https://wiki.mozilla.org/DevTools/Features/SourceMap\n[Dryice]: https://github.com/mozilla/dryice\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/mozilla/source-map/issues" - }, - "_id": "source-map@0.1.33", - "_from": "source-map@*" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/run-tests.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/run-tests.js deleted file mode 100755 index 64a7c3a3..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/run-tests.js +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env node -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -var assert = require('assert'); -var fs = require('fs'); -var path = require('path'); -var util = require('./source-map/util'); - -function run(tests) { - var total = 0; - var passed = 0; - - for (var i = 0; i < tests.length; i++) { - for (var k in tests[i].testCase) { - if (/^test/.test(k)) { - total++; - try { - tests[i].testCase[k](assert, util); - passed++; - } - catch (e) { - console.log('FAILED ' + tests[i].name + ': ' + k + '!'); - console.log(e.stack); - } - } - } - } - - console.log(''); - console.log(passed + ' / ' + total + ' tests passed.'); - console.log(''); - - return total - passed; -} - -function isTestFile(f) { - var testToRun = process.argv[2]; - return testToRun - ? path.basename(testToRun) === f - : /^test\-.*?\.js/.test(f); -} - -function toModule(f) { - return './source-map/' + f.replace(/\.js$/, ''); -} - -var requires = fs.readdirSync(path.join(__dirname, 'source-map')) - .filter(isTestFile) - .map(toModule); - -var code = run(requires.map(require).map(function (mod, i) { - return { - name: requires[i], - testCase: mod - }; -})); - -process.exit(code); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-api.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-api.js deleted file mode 100644 index 3801233c..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-api.js +++ /dev/null @@ -1,26 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2012 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var sourceMap; - try { - sourceMap = require('../../lib/source-map'); - } catch (e) { - sourceMap = {}; - Components.utils.import('resource:///modules/devtools/SourceMap.jsm', sourceMap); - } - - exports['test that the api is properly exposed in the top level'] = function (assert, util) { - assert.equal(typeof sourceMap.SourceMapGenerator, "function"); - assert.equal(typeof sourceMap.SourceMapConsumer, "function"); - assert.equal(typeof sourceMap.SourceNode, "function"); - }; - -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-array-set.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-array-set.js deleted file mode 100644 index b5797edd..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-array-set.js +++ /dev/null @@ -1,104 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var ArraySet = require('../../lib/source-map/array-set').ArraySet; - - function makeTestSet() { - var set = new ArraySet(); - for (var i = 0; i < 100; i++) { - set.add(String(i)); - } - return set; - } - - exports['test .has() membership'] = function (assert, util) { - var set = makeTestSet(); - for (var i = 0; i < 100; i++) { - assert.ok(set.has(String(i))); - } - }; - - exports['test .indexOf() elements'] = function (assert, util) { - var set = makeTestSet(); - for (var i = 0; i < 100; i++) { - assert.strictEqual(set.indexOf(String(i)), i); - } - }; - - exports['test .at() indexing'] = function (assert, util) { - var set = makeTestSet(); - for (var i = 0; i < 100; i++) { - assert.strictEqual(set.at(i), String(i)); - } - }; - - exports['test creating from an array'] = function (assert, util) { - var set = ArraySet.fromArray(['foo', 'bar', 'baz', 'quux', 'hasOwnProperty']); - - assert.ok(set.has('foo')); - assert.ok(set.has('bar')); - assert.ok(set.has('baz')); - assert.ok(set.has('quux')); - assert.ok(set.has('hasOwnProperty')); - - assert.strictEqual(set.indexOf('foo'), 0); - assert.strictEqual(set.indexOf('bar'), 1); - assert.strictEqual(set.indexOf('baz'), 2); - assert.strictEqual(set.indexOf('quux'), 3); - - assert.strictEqual(set.at(0), 'foo'); - assert.strictEqual(set.at(1), 'bar'); - assert.strictEqual(set.at(2), 'baz'); - assert.strictEqual(set.at(3), 'quux'); - }; - - exports['test that you can add __proto__; see github issue #30'] = function (assert, util) { - var set = new ArraySet(); - set.add('__proto__'); - assert.ok(set.has('__proto__')); - assert.strictEqual(set.at(0), '__proto__'); - assert.strictEqual(set.indexOf('__proto__'), 0); - }; - - exports['test .fromArray() with duplicates'] = function (assert, util) { - var set = ArraySet.fromArray(['foo', 'foo']); - assert.ok(set.has('foo')); - assert.strictEqual(set.at(0), 'foo'); - assert.strictEqual(set.indexOf('foo'), 0); - assert.strictEqual(set.toArray().length, 1); - - set = ArraySet.fromArray(['foo', 'foo'], true); - assert.ok(set.has('foo')); - assert.strictEqual(set.at(0), 'foo'); - assert.strictEqual(set.at(1), 'foo'); - assert.strictEqual(set.indexOf('foo'), 0); - assert.strictEqual(set.toArray().length, 2); - }; - - exports['test .add() with duplicates'] = function (assert, util) { - var set = new ArraySet(); - set.add('foo'); - - set.add('foo'); - assert.ok(set.has('foo')); - assert.strictEqual(set.at(0), 'foo'); - assert.strictEqual(set.indexOf('foo'), 0); - assert.strictEqual(set.toArray().length, 1); - - set.add('foo', true); - assert.ok(set.has('foo')); - assert.strictEqual(set.at(0), 'foo'); - assert.strictEqual(set.at(1), 'foo'); - assert.strictEqual(set.indexOf('foo'), 0); - assert.strictEqual(set.toArray().length, 2); - }; - -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-base64-vlq.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-base64-vlq.js deleted file mode 100644 index 653a874e..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-base64-vlq.js +++ /dev/null @@ -1,24 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var base64VLQ = require('../../lib/source-map/base64-vlq'); - - exports['test normal encoding and decoding'] = function (assert, util) { - var result; - for (var i = -255; i < 256; i++) { - result = base64VLQ.decode(base64VLQ.encode(i)); - assert.ok(result); - assert.equal(result.value, i); - assert.equal(result.rest, ""); - } - }; - -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-base64.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-base64.js deleted file mode 100644 index ff3a2445..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-base64.js +++ /dev/null @@ -1,35 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var base64 = require('../../lib/source-map/base64'); - - exports['test out of range encoding'] = function (assert, util) { - assert.throws(function () { - base64.encode(-1); - }); - assert.throws(function () { - base64.encode(64); - }); - }; - - exports['test out of range decoding'] = function (assert, util) { - assert.throws(function () { - base64.decode('='); - }); - }; - - exports['test normal encoding and decoding'] = function (assert, util) { - for (var i = 0; i < 64; i++) { - assert.equal(base64.decode(base64.encode(i)), i); - } - }; - -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-binary-search.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-binary-search.js deleted file mode 100644 index ee306830..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-binary-search.js +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var binarySearch = require('../../lib/source-map/binary-search'); - - function numberCompare(a, b) { - return a - b; - } - - exports['test too high'] = function (assert, util) { - var needle = 30; - var haystack = [2,4,6,8,10,12,14,16,18,20]; - - assert.doesNotThrow(function () { - binarySearch.search(needle, haystack, numberCompare); - }); - - assert.equal(binarySearch.search(needle, haystack, numberCompare), 20); - }; - - exports['test too low'] = function (assert, util) { - var needle = 1; - var haystack = [2,4,6,8,10,12,14,16,18,20]; - - assert.doesNotThrow(function () { - binarySearch.search(needle, haystack, numberCompare); - }); - - assert.equal(binarySearch.search(needle, haystack, numberCompare), null); - }; - - exports['test exact search'] = function (assert, util) { - var needle = 4; - var haystack = [2,4,6,8,10,12,14,16,18,20]; - - assert.equal(binarySearch.search(needle, haystack, numberCompare), 4); - }; - - exports['test fuzzy search'] = function (assert, util) { - var needle = 19; - var haystack = [2,4,6,8,10,12,14,16,18,20]; - - assert.equal(binarySearch.search(needle, haystack, numberCompare), 18); - }; - -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-dog-fooding.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-dog-fooding.js deleted file mode 100644 index 26757b2d..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-dog-fooding.js +++ /dev/null @@ -1,84 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var SourceMapConsumer = require('../../lib/source-map/source-map-consumer').SourceMapConsumer; - var SourceMapGenerator = require('../../lib/source-map/source-map-generator').SourceMapGenerator; - - exports['test eating our own dog food'] = function (assert, util) { - var smg = new SourceMapGenerator({ - file: 'testing.js', - sourceRoot: '/wu/tang' - }); - - smg.addMapping({ - source: 'gza.coffee', - original: { line: 1, column: 0 }, - generated: { line: 2, column: 2 } - }); - - smg.addMapping({ - source: 'gza.coffee', - original: { line: 2, column: 0 }, - generated: { line: 3, column: 2 } - }); - - smg.addMapping({ - source: 'gza.coffee', - original: { line: 3, column: 0 }, - generated: { line: 4, column: 2 } - }); - - smg.addMapping({ - source: 'gza.coffee', - original: { line: 4, column: 0 }, - generated: { line: 5, column: 2 } - }); - - smg.addMapping({ - source: 'gza.coffee', - original: { line: 5, column: 10 }, - generated: { line: 6, column: 12 } - }); - - var smc = new SourceMapConsumer(smg.toString()); - - // Exact - util.assertMapping(2, 2, '/wu/tang/gza.coffee', 1, 0, null, smc, assert); - util.assertMapping(3, 2, '/wu/tang/gza.coffee', 2, 0, null, smc, assert); - util.assertMapping(4, 2, '/wu/tang/gza.coffee', 3, 0, null, smc, assert); - util.assertMapping(5, 2, '/wu/tang/gza.coffee', 4, 0, null, smc, assert); - util.assertMapping(6, 12, '/wu/tang/gza.coffee', 5, 10, null, smc, assert); - - // Fuzzy - - // Generated to original - util.assertMapping(2, 0, null, null, null, null, smc, assert, true); - util.assertMapping(2, 9, '/wu/tang/gza.coffee', 1, 0, null, smc, assert, true); - util.assertMapping(3, 0, null, null, null, null, smc, assert, true); - util.assertMapping(3, 9, '/wu/tang/gza.coffee', 2, 0, null, smc, assert, true); - util.assertMapping(4, 0, null, null, null, null, smc, assert, true); - util.assertMapping(4, 9, '/wu/tang/gza.coffee', 3, 0, null, smc, assert, true); - util.assertMapping(5, 0, null, null, null, null, smc, assert, true); - util.assertMapping(5, 9, '/wu/tang/gza.coffee', 4, 0, null, smc, assert, true); - util.assertMapping(6, 0, null, null, null, null, smc, assert, true); - util.assertMapping(6, 9, null, null, null, null, smc, assert, true); - util.assertMapping(6, 13, '/wu/tang/gza.coffee', 5, 10, null, smc, assert, true); - - // Original to generated - util.assertMapping(2, 2, '/wu/tang/gza.coffee', 1, 1, null, smc, assert, null, true); - util.assertMapping(3, 2, '/wu/tang/gza.coffee', 2, 3, null, smc, assert, null, true); - util.assertMapping(4, 2, '/wu/tang/gza.coffee', 3, 6, null, smc, assert, null, true); - util.assertMapping(5, 2, '/wu/tang/gza.coffee', 4, 9, null, smc, assert, null, true); - util.assertMapping(5, 2, '/wu/tang/gza.coffee', 5, 9, null, smc, assert, null, true); - util.assertMapping(6, 12, '/wu/tang/gza.coffee', 6, 19, null, smc, assert, null, true); - }; - -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-source-map-consumer.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-source-map-consumer.js deleted file mode 100644 index acd24d5e..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-source-map-consumer.js +++ /dev/null @@ -1,475 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var SourceMapConsumer = require('../../lib/source-map/source-map-consumer').SourceMapConsumer; - var SourceMapGenerator = require('../../lib/source-map/source-map-generator').SourceMapGenerator; - - exports['test that we can instantiate with a string or an object'] = function (assert, util) { - assert.doesNotThrow(function () { - var map = new SourceMapConsumer(util.testMap); - }); - assert.doesNotThrow(function () { - var map = new SourceMapConsumer(JSON.stringify(util.testMap)); - }); - }; - - exports['test that the `sources` field has the original sources'] = function (assert, util) { - var map = new SourceMapConsumer(util.testMap); - var sources = map.sources; - - assert.equal(sources[0], '/the/root/one.js'); - assert.equal(sources[1], '/the/root/two.js'); - assert.equal(sources.length, 2); - }; - - exports['test that the source root is reflected in a mapping\'s source field'] = function (assert, util) { - var map = new SourceMapConsumer(util.testMap); - var mapping; - - mapping = map.originalPositionFor({ - line: 2, - column: 1 - }); - assert.equal(mapping.source, '/the/root/two.js'); - - mapping = map.originalPositionFor({ - line: 1, - column: 1 - }); - assert.equal(mapping.source, '/the/root/one.js'); - }; - - exports['test mapping tokens back exactly'] = function (assert, util) { - var map = new SourceMapConsumer(util.testMap); - - util.assertMapping(1, 1, '/the/root/one.js', 1, 1, null, map, assert); - util.assertMapping(1, 5, '/the/root/one.js', 1, 5, null, map, assert); - util.assertMapping(1, 9, '/the/root/one.js', 1, 11, null, map, assert); - util.assertMapping(1, 18, '/the/root/one.js', 1, 21, 'bar', map, assert); - util.assertMapping(1, 21, '/the/root/one.js', 2, 3, null, map, assert); - util.assertMapping(1, 28, '/the/root/one.js', 2, 10, 'baz', map, assert); - util.assertMapping(1, 32, '/the/root/one.js', 2, 14, 'bar', map, assert); - - util.assertMapping(2, 1, '/the/root/two.js', 1, 1, null, map, assert); - util.assertMapping(2, 5, '/the/root/two.js', 1, 5, null, map, assert); - util.assertMapping(2, 9, '/the/root/two.js', 1, 11, null, map, assert); - util.assertMapping(2, 18, '/the/root/two.js', 1, 21, 'n', map, assert); - util.assertMapping(2, 21, '/the/root/two.js', 2, 3, null, map, assert); - util.assertMapping(2, 28, '/the/root/two.js', 2, 10, 'n', map, assert); - }; - - exports['test mapping tokens fuzzy'] = function (assert, util) { - var map = new SourceMapConsumer(util.testMap); - - // Finding original positions - util.assertMapping(1, 20, '/the/root/one.js', 1, 21, 'bar', map, assert, true); - util.assertMapping(1, 30, '/the/root/one.js', 2, 10, 'baz', map, assert, true); - util.assertMapping(2, 12, '/the/root/two.js', 1, 11, null, map, assert, true); - - // Finding generated positions - util.assertMapping(1, 18, '/the/root/one.js', 1, 22, 'bar', map, assert, null, true); - util.assertMapping(1, 28, '/the/root/one.js', 2, 13, 'baz', map, assert, null, true); - util.assertMapping(2, 9, '/the/root/two.js', 1, 16, null, map, assert, null, true); - }; - - exports['test mappings and end of lines'] = function (assert, util) { - var smg = new SourceMapGenerator({ - file: 'foo.js' - }); - smg.addMapping({ - original: { line: 1, column: 1 }, - generated: { line: 1, column: 1 }, - source: 'bar.js' - }); - smg.addMapping({ - original: { line: 2, column: 2 }, - generated: { line: 2, column: 2 }, - source: 'bar.js' - }); - - var map = SourceMapConsumer.fromSourceMap(smg); - - // When finding original positions, mappings end at the end of the line. - util.assertMapping(2, 1, null, null, null, null, map, assert, true) - - // When finding generated positions, mappings do not end at the end of the line. - util.assertMapping(1, 1, 'bar.js', 2, 1, null, map, assert, null, true); - }; - - exports['test creating source map consumers with )]}\' prefix'] = function (assert, util) { - assert.doesNotThrow(function () { - var map = new SourceMapConsumer(")]}'" + JSON.stringify(util.testMap)); - }); - }; - - exports['test eachMapping'] = function (assert, util) { - var map = new SourceMapConsumer(util.testMap); - var previousLine = -Infinity; - var previousColumn = -Infinity; - map.eachMapping(function (mapping) { - assert.ok(mapping.generatedLine >= previousLine); - - if (mapping.source) { - assert.equal(mapping.source.indexOf(util.testMap.sourceRoot), 0); - } - - if (mapping.generatedLine === previousLine) { - assert.ok(mapping.generatedColumn >= previousColumn); - previousColumn = mapping.generatedColumn; - } - else { - previousLine = mapping.generatedLine; - previousColumn = -Infinity; - } - }); - }; - - exports['test iterating over mappings in a different order'] = function (assert, util) { - var map = new SourceMapConsumer(util.testMap); - var previousLine = -Infinity; - var previousColumn = -Infinity; - var previousSource = ""; - map.eachMapping(function (mapping) { - assert.ok(mapping.source >= previousSource); - - if (mapping.source === previousSource) { - assert.ok(mapping.originalLine >= previousLine); - - if (mapping.originalLine === previousLine) { - assert.ok(mapping.originalColumn >= previousColumn); - previousColumn = mapping.originalColumn; - } - else { - previousLine = mapping.originalLine; - previousColumn = -Infinity; - } - } - else { - previousSource = mapping.source; - previousLine = -Infinity; - previousColumn = -Infinity; - } - }, null, SourceMapConsumer.ORIGINAL_ORDER); - }; - - exports['test that we can set the context for `this` in eachMapping'] = function (assert, util) { - var map = new SourceMapConsumer(util.testMap); - var context = {}; - map.eachMapping(function () { - assert.equal(this, context); - }, context); - }; - - exports['test that the `sourcesContent` field has the original sources'] = function (assert, util) { - var map = new SourceMapConsumer(util.testMapWithSourcesContent); - var sourcesContent = map.sourcesContent; - - assert.equal(sourcesContent[0], ' ONE.foo = function (bar) {\n return baz(bar);\n };'); - assert.equal(sourcesContent[1], ' TWO.inc = function (n) {\n return n + 1;\n };'); - assert.equal(sourcesContent.length, 2); - }; - - exports['test that we can get the original sources for the sources'] = function (assert, util) { - var map = new SourceMapConsumer(util.testMapWithSourcesContent); - var sources = map.sources; - - assert.equal(map.sourceContentFor(sources[0]), ' ONE.foo = function (bar) {\n return baz(bar);\n };'); - assert.equal(map.sourceContentFor(sources[1]), ' TWO.inc = function (n) {\n return n + 1;\n };'); - assert.equal(map.sourceContentFor("one.js"), ' ONE.foo = function (bar) {\n return baz(bar);\n };'); - assert.equal(map.sourceContentFor("two.js"), ' TWO.inc = function (n) {\n return n + 1;\n };'); - assert.throws(function () { - map.sourceContentFor(""); - }, Error); - assert.throws(function () { - map.sourceContentFor("/the/root/three.js"); - }, Error); - assert.throws(function () { - map.sourceContentFor("three.js"); - }, Error); - }; - - exports['test sourceRoot + generatedPositionFor'] = function (assert, util) { - var map = new SourceMapGenerator({ - sourceRoot: 'foo/bar', - file: 'baz.js' - }); - map.addMapping({ - original: { line: 1, column: 1 }, - generated: { line: 2, column: 2 }, - source: 'bang.coffee' - }); - map.addMapping({ - original: { line: 5, column: 5 }, - generated: { line: 6, column: 6 }, - source: 'bang.coffee' - }); - map = new SourceMapConsumer(map.toString()); - - // Should handle without sourceRoot. - var pos = map.generatedPositionFor({ - line: 1, - column: 1, - source: 'bang.coffee' - }); - - assert.equal(pos.line, 2); - assert.equal(pos.column, 2); - - // Should handle with sourceRoot. - var pos = map.generatedPositionFor({ - line: 1, - column: 1, - source: 'foo/bar/bang.coffee' - }); - - assert.equal(pos.line, 2); - assert.equal(pos.column, 2); - }; - - exports['test sourceRoot + originalPositionFor'] = function (assert, util) { - var map = new SourceMapGenerator({ - sourceRoot: 'foo/bar', - file: 'baz.js' - }); - map.addMapping({ - original: { line: 1, column: 1 }, - generated: { line: 2, column: 2 }, - source: 'bang.coffee' - }); - map = new SourceMapConsumer(map.toString()); - - var pos = map.originalPositionFor({ - line: 2, - column: 2, - }); - - // Should always have the prepended source root - assert.equal(pos.source, 'foo/bar/bang.coffee'); - assert.equal(pos.line, 1); - assert.equal(pos.column, 1); - }; - - exports['test github issue #56'] = function (assert, util) { - var map = new SourceMapGenerator({ - sourceRoot: 'http://', - file: 'www.example.com/foo.js' - }); - map.addMapping({ - original: { line: 1, column: 1 }, - generated: { line: 2, column: 2 }, - source: 'www.example.com/original.js' - }); - map = new SourceMapConsumer(map.toString()); - - var sources = map.sources; - assert.equal(sources.length, 1); - assert.equal(sources[0], 'http://www.example.com/original.js'); - }; - - exports['test github issue #43'] = function (assert, util) { - var map = new SourceMapGenerator({ - sourceRoot: 'http://example.com', - file: 'foo.js' - }); - map.addMapping({ - original: { line: 1, column: 1 }, - generated: { line: 2, column: 2 }, - source: 'http://cdn.example.com/original.js' - }); - map = new SourceMapConsumer(map.toString()); - - var sources = map.sources; - assert.equal(sources.length, 1, - 'Should only be one source.'); - assert.equal(sources[0], 'http://cdn.example.com/original.js', - 'Should not be joined with the sourceRoot.'); - }; - - exports['test absolute path, but same host sources'] = function (assert, util) { - var map = new SourceMapGenerator({ - sourceRoot: 'http://example.com/foo/bar', - file: 'foo.js' - }); - map.addMapping({ - original: { line: 1, column: 1 }, - generated: { line: 2, column: 2 }, - source: '/original.js' - }); - map = new SourceMapConsumer(map.toString()); - - var sources = map.sources; - assert.equal(sources.length, 1, - 'Should only be one source.'); - assert.equal(sources[0], 'http://example.com/original.js', - 'Source should be relative the host of the source root.'); - }; - - exports['test github issue #64'] = function (assert, util) { - var map = new SourceMapConsumer({ - "version": 3, - "file": "foo.js", - "sourceRoot": "http://example.com/", - "sources": ["/a"], - "names": [], - "mappings": "AACA", - "sourcesContent": ["foo"] - }); - - assert.equal(map.sourceContentFor("a"), "foo"); - assert.equal(map.sourceContentFor("/a"), "foo"); - }; - - exports['test bug 885597'] = function (assert, util) { - var map = new SourceMapConsumer({ - "version": 3, - "file": "foo.js", - "sourceRoot": "file:///Users/AlGore/Invented/The/Internet/", - "sources": ["/a"], - "names": [], - "mappings": "AACA", - "sourcesContent": ["foo"] - }); - - var s = map.sources[0]; - assert.equal(map.sourceContentFor(s), "foo"); - }; - - exports['test github issue #72, duplicate sources'] = function (assert, util) { - var map = new SourceMapConsumer({ - "version": 3, - "file": "foo.js", - "sources": ["source1.js", "source1.js", "source3.js"], - "names": [], - "mappings": ";EAAC;;IAEE;;MEEE", - "sourceRoot": "http://example.com" - }); - - var pos = map.originalPositionFor({ - line: 2, - column: 2 - }); - assert.equal(pos.source, 'http://example.com/source1.js'); - assert.equal(pos.line, 1); - assert.equal(pos.column, 1); - - var pos = map.originalPositionFor({ - line: 4, - column: 4 - }); - assert.equal(pos.source, 'http://example.com/source1.js'); - assert.equal(pos.line, 3); - assert.equal(pos.column, 3); - - var pos = map.originalPositionFor({ - line: 6, - column: 6 - }); - assert.equal(pos.source, 'http://example.com/source3.js'); - assert.equal(pos.line, 5); - assert.equal(pos.column, 5); - }; - - exports['test github issue #72, duplicate names'] = function (assert, util) { - var map = new SourceMapConsumer({ - "version": 3, - "file": "foo.js", - "sources": ["source.js"], - "names": ["name1", "name1", "name3"], - "mappings": ";EAACA;;IAEEA;;MAEEE", - "sourceRoot": "http://example.com" - }); - - var pos = map.originalPositionFor({ - line: 2, - column: 2 - }); - assert.equal(pos.name, 'name1'); - assert.equal(pos.line, 1); - assert.equal(pos.column, 1); - - var pos = map.originalPositionFor({ - line: 4, - column: 4 - }); - assert.equal(pos.name, 'name1'); - assert.equal(pos.line, 3); - assert.equal(pos.column, 3); - - var pos = map.originalPositionFor({ - line: 6, - column: 6 - }); - assert.equal(pos.name, 'name3'); - assert.equal(pos.line, 5); - assert.equal(pos.column, 5); - }; - - exports['test SourceMapConsumer.fromSourceMap'] = function (assert, util) { - var smg = new SourceMapGenerator({ - sourceRoot: 'http://example.com/', - file: 'foo.js' - }); - smg.addMapping({ - original: { line: 1, column: 1 }, - generated: { line: 2, column: 2 }, - source: 'bar.js' - }); - smg.addMapping({ - original: { line: 2, column: 2 }, - generated: { line: 4, column: 4 }, - source: 'baz.js', - name: 'dirtMcGirt' - }); - smg.setSourceContent('baz.js', 'baz.js content'); - - var smc = SourceMapConsumer.fromSourceMap(smg); - assert.equal(smc.file, 'foo.js'); - assert.equal(smc.sourceRoot, 'http://example.com/'); - assert.equal(smc.sources.length, 2); - assert.equal(smc.sources[0], 'http://example.com/bar.js'); - assert.equal(smc.sources[1], 'http://example.com/baz.js'); - assert.equal(smc.sourceContentFor('baz.js'), 'baz.js content'); - - var pos = smc.originalPositionFor({ - line: 2, - column: 2 - }); - assert.equal(pos.line, 1); - assert.equal(pos.column, 1); - assert.equal(pos.source, 'http://example.com/bar.js'); - assert.equal(pos.name, null); - - pos = smc.generatedPositionFor({ - line: 1, - column: 1, - source: 'http://example.com/bar.js' - }); - assert.equal(pos.line, 2); - assert.equal(pos.column, 2); - - pos = smc.originalPositionFor({ - line: 4, - column: 4 - }); - assert.equal(pos.line, 2); - assert.equal(pos.column, 2); - assert.equal(pos.source, 'http://example.com/baz.js'); - assert.equal(pos.name, 'dirtMcGirt'); - - pos = smc.generatedPositionFor({ - line: 2, - column: 2, - source: 'http://example.com/baz.js' - }); - assert.equal(pos.line, 4); - assert.equal(pos.column, 4); - }; -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-source-map-generator.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-source-map-generator.js deleted file mode 100644 index 16241dd3..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-source-map-generator.js +++ /dev/null @@ -1,540 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var SourceMapGenerator = require('../../lib/source-map/source-map-generator').SourceMapGenerator; - var SourceMapConsumer = require('../../lib/source-map/source-map-consumer').SourceMapConsumer; - var SourceNode = require('../../lib/source-map/source-node').SourceNode; - var util = require('./util'); - - exports['test some simple stuff'] = function (assert, util) { - var map = new SourceMapGenerator({ - file: 'foo.js', - sourceRoot: '.' - }); - assert.ok(true); - - var map = new SourceMapGenerator(); - assert.ok(true); - }; - - exports['test JSON serialization'] = function (assert, util) { - var map = new SourceMapGenerator({ - file: 'foo.js', - sourceRoot: '.' - }); - assert.equal(map.toString(), JSON.stringify(map)); - }; - - exports['test adding mappings (case 1)'] = function (assert, util) { - var map = new SourceMapGenerator({ - file: 'generated-foo.js', - sourceRoot: '.' - }); - - assert.doesNotThrow(function () { - map.addMapping({ - generated: { line: 1, column: 1 } - }); - }); - }; - - exports['test adding mappings (case 2)'] = function (assert, util) { - var map = new SourceMapGenerator({ - file: 'generated-foo.js', - sourceRoot: '.' - }); - - assert.doesNotThrow(function () { - map.addMapping({ - generated: { line: 1, column: 1 }, - source: 'bar.js', - original: { line: 1, column: 1 } - }); - }); - }; - - exports['test adding mappings (case 3)'] = function (assert, util) { - var map = new SourceMapGenerator({ - file: 'generated-foo.js', - sourceRoot: '.' - }); - - assert.doesNotThrow(function () { - map.addMapping({ - generated: { line: 1, column: 1 }, - source: 'bar.js', - original: { line: 1, column: 1 }, - name: 'someToken' - }); - }); - }; - - exports['test adding mappings (invalid)'] = function (assert, util) { - var map = new SourceMapGenerator({ - file: 'generated-foo.js', - sourceRoot: '.' - }); - - // Not enough info. - assert.throws(function () { - map.addMapping({}); - }); - - // Original file position, but no source. - assert.throws(function () { - map.addMapping({ - generated: { line: 1, column: 1 }, - original: { line: 1, column: 1 } - }); - }); - }; - - exports['test that the correct mappings are being generated'] = function (assert, util) { - var map = new SourceMapGenerator({ - file: 'min.js', - sourceRoot: '/the/root' - }); - - map.addMapping({ - generated: { line: 1, column: 1 }, - original: { line: 1, column: 1 }, - source: 'one.js' - }); - map.addMapping({ - generated: { line: 1, column: 5 }, - original: { line: 1, column: 5 }, - source: 'one.js' - }); - map.addMapping({ - generated: { line: 1, column: 9 }, - original: { line: 1, column: 11 }, - source: 'one.js' - }); - map.addMapping({ - generated: { line: 1, column: 18 }, - original: { line: 1, column: 21 }, - source: 'one.js', - name: 'bar' - }); - map.addMapping({ - generated: { line: 1, column: 21 }, - original: { line: 2, column: 3 }, - source: 'one.js' - }); - map.addMapping({ - generated: { line: 1, column: 28 }, - original: { line: 2, column: 10 }, - source: 'one.js', - name: 'baz' - }); - map.addMapping({ - generated: { line: 1, column: 32 }, - original: { line: 2, column: 14 }, - source: 'one.js', - name: 'bar' - }); - - map.addMapping({ - generated: { line: 2, column: 1 }, - original: { line: 1, column: 1 }, - source: 'two.js' - }); - map.addMapping({ - generated: { line: 2, column: 5 }, - original: { line: 1, column: 5 }, - source: 'two.js' - }); - map.addMapping({ - generated: { line: 2, column: 9 }, - original: { line: 1, column: 11 }, - source: 'two.js' - }); - map.addMapping({ - generated: { line: 2, column: 18 }, - original: { line: 1, column: 21 }, - source: 'two.js', - name: 'n' - }); - map.addMapping({ - generated: { line: 2, column: 21 }, - original: { line: 2, column: 3 }, - source: 'two.js' - }); - map.addMapping({ - generated: { line: 2, column: 28 }, - original: { line: 2, column: 10 }, - source: 'two.js', - name: 'n' - }); - - map = JSON.parse(map.toString()); - - util.assertEqualMaps(assert, map, util.testMap); - }; - - exports['test that source content can be set'] = function (assert, util) { - var map = new SourceMapGenerator({ - file: 'min.js', - sourceRoot: '/the/root' - }); - map.addMapping({ - generated: { line: 1, column: 1 }, - original: { line: 1, column: 1 }, - source: 'one.js' - }); - map.addMapping({ - generated: { line: 2, column: 1 }, - original: { line: 1, column: 1 }, - source: 'two.js' - }); - map.setSourceContent('one.js', 'one file content'); - - map = JSON.parse(map.toString()); - assert.equal(map.sources[0], 'one.js'); - assert.equal(map.sources[1], 'two.js'); - assert.equal(map.sourcesContent[0], 'one file content'); - assert.equal(map.sourcesContent[1], null); - }; - - exports['test .fromSourceMap'] = function (assert, util) { - var map = SourceMapGenerator.fromSourceMap(new SourceMapConsumer(util.testMap)); - util.assertEqualMaps(assert, map.toJSON(), util.testMap); - }; - - exports['test .fromSourceMap with sourcesContent'] = function (assert, util) { - var map = SourceMapGenerator.fromSourceMap( - new SourceMapConsumer(util.testMapWithSourcesContent)); - util.assertEqualMaps(assert, map.toJSON(), util.testMapWithSourcesContent); - }; - - exports['test applySourceMap'] = function (assert, util) { - var node = new SourceNode(null, null, null, [ - new SourceNode(2, 0, 'fileX', 'lineX2\n'), - 'genA1\n', - new SourceNode(2, 0, 'fileY', 'lineY2\n'), - 'genA2\n', - new SourceNode(1, 0, 'fileX', 'lineX1\n'), - 'genA3\n', - new SourceNode(1, 0, 'fileY', 'lineY1\n') - ]); - var mapStep1 = node.toStringWithSourceMap({ - file: 'fileA' - }).map; - mapStep1.setSourceContent('fileX', 'lineX1\nlineX2\n'); - mapStep1 = mapStep1.toJSON(); - - node = new SourceNode(null, null, null, [ - 'gen1\n', - new SourceNode(1, 0, 'fileA', 'lineA1\n'), - new SourceNode(2, 0, 'fileA', 'lineA2\n'), - new SourceNode(3, 0, 'fileA', 'lineA3\n'), - new SourceNode(4, 0, 'fileA', 'lineA4\n'), - new SourceNode(1, 0, 'fileB', 'lineB1\n'), - new SourceNode(2, 0, 'fileB', 'lineB2\n'), - 'gen2\n' - ]); - var mapStep2 = node.toStringWithSourceMap({ - file: 'fileGen' - }).map; - mapStep2.setSourceContent('fileB', 'lineB1\nlineB2\n'); - mapStep2 = mapStep2.toJSON(); - - node = new SourceNode(null, null, null, [ - 'gen1\n', - new SourceNode(2, 0, 'fileX', 'lineA1\n'), - new SourceNode(2, 0, 'fileA', 'lineA2\n'), - new SourceNode(2, 0, 'fileY', 'lineA3\n'), - new SourceNode(4, 0, 'fileA', 'lineA4\n'), - new SourceNode(1, 0, 'fileB', 'lineB1\n'), - new SourceNode(2, 0, 'fileB', 'lineB2\n'), - 'gen2\n' - ]); - var expectedMap = node.toStringWithSourceMap({ - file: 'fileGen' - }).map; - expectedMap.setSourceContent('fileX', 'lineX1\nlineX2\n'); - expectedMap.setSourceContent('fileB', 'lineB1\nlineB2\n'); - expectedMap = expectedMap.toJSON(); - - // apply source map "mapStep1" to "mapStep2" - var generator = SourceMapGenerator.fromSourceMap(new SourceMapConsumer(mapStep2)); - generator.applySourceMap(new SourceMapConsumer(mapStep1)); - var actualMap = generator.toJSON(); - - util.assertEqualMaps(assert, actualMap, expectedMap); - }; - - exports['test applySourceMap throws when file is missing'] = function (assert, util) { - var map = new SourceMapGenerator({ - file: 'test.js' - }); - var map2 = new SourceMapGenerator(); - assert.throws(function() { - map.applySourceMap(new SourceMapConsumer(map2.toJSON())); - }); - }; - - exports['test the two additional parameters of applySourceMap'] = function (assert, util) { - // Assume the following directory structure: - // - // http://foo.org/ - // bar.coffee - // app/ - // coffee/ - // foo.coffee - // temp/ - // bundle.js - // temp_maps/ - // bundle.js.map - // public/ - // bundle.min.js - // bundle.min.js.map - // - // http://www.example.com/ - // baz.coffee - - var bundleMap = new SourceMapGenerator({ - file: 'bundle.js' - }); - bundleMap.addMapping({ - generated: { line: 3, column: 3 }, - original: { line: 2, column: 2 }, - source: '../coffee/foo.coffee' - }); - bundleMap.addMapping({ - generated: { line: 13, column: 13 }, - original: { line: 12, column: 12 }, - source: '/bar.coffee' - }); - bundleMap.addMapping({ - generated: { line: 23, column: 23 }, - original: { line: 22, column: 22 }, - source: 'http://www.example.com/baz.coffee' - }); - bundleMap = new SourceMapConsumer(bundleMap.toJSON()); - - var minifiedMap = new SourceMapGenerator({ - file: 'bundle.min.js', - sourceRoot: '..' - }); - minifiedMap.addMapping({ - generated: { line: 1, column: 1 }, - original: { line: 3, column: 3 }, - source: 'temp/bundle.js' - }); - minifiedMap.addMapping({ - generated: { line: 11, column: 11 }, - original: { line: 13, column: 13 }, - source: 'temp/bundle.js' - }); - minifiedMap.addMapping({ - generated: { line: 21, column: 21 }, - original: { line: 23, column: 23 }, - source: 'temp/bundle.js' - }); - minifiedMap = new SourceMapConsumer(minifiedMap.toJSON()); - - var expectedMap = function (sources) { - var map = new SourceMapGenerator({ - file: 'bundle.min.js', - sourceRoot: '..' - }); - map.addMapping({ - generated: { line: 1, column: 1 }, - original: { line: 2, column: 2 }, - source: sources[0] - }); - map.addMapping({ - generated: { line: 11, column: 11 }, - original: { line: 12, column: 12 }, - source: sources[1] - }); - map.addMapping({ - generated: { line: 21, column: 21 }, - original: { line: 22, column: 22 }, - source: sources[2] - }); - return map.toJSON(); - } - - var actualMap = function (aSourceMapPath) { - var map = SourceMapGenerator.fromSourceMap(minifiedMap); - // Note that relying on `bundleMap.file` (which is simply 'bundle.js') - // instead of supplying the second parameter wouldn't work here. - map.applySourceMap(bundleMap, '../temp/bundle.js', aSourceMapPath); - return map.toJSON(); - } - - util.assertEqualMaps(assert, actualMap('../temp_maps'), expectedMap([ - 'coffee/foo.coffee', - '/bar.coffee', - 'http://www.example.com/baz.coffee' - ])); - - util.assertEqualMaps(assert, actualMap('/app/temp_maps'), expectedMap([ - '/app/coffee/foo.coffee', - '/bar.coffee', - 'http://www.example.com/baz.coffee' - ])); - - util.assertEqualMaps(assert, actualMap('http://foo.org/app/temp_maps'), expectedMap([ - 'http://foo.org/app/coffee/foo.coffee', - 'http://foo.org/bar.coffee', - 'http://www.example.com/baz.coffee' - ])); - }; - - exports['test sorting with duplicate generated mappings'] = function (assert, util) { - var map = new SourceMapGenerator({ - file: 'test.js' - }); - map.addMapping({ - generated: { line: 3, column: 0 }, - original: { line: 2, column: 0 }, - source: 'a.js' - }); - map.addMapping({ - generated: { line: 2, column: 0 } - }); - map.addMapping({ - generated: { line: 2, column: 0 } - }); - map.addMapping({ - generated: { line: 1, column: 0 }, - original: { line: 1, column: 0 }, - source: 'a.js' - }); - - util.assertEqualMaps(assert, map.toJSON(), { - version: 3, - file: 'test.js', - sources: ['a.js'], - names: [], - mappings: 'AAAA;A;AACA' - }); - }; - - exports['test ignore duplicate mappings.'] = function (assert, util) { - var init = { file: 'min.js', sourceRoot: '/the/root' }; - var map1, map2; - - // null original source location - var nullMapping1 = { - generated: { line: 1, column: 0 } - }; - var nullMapping2 = { - generated: { line: 2, column: 2 } - }; - - map1 = new SourceMapGenerator(init); - map2 = new SourceMapGenerator(init); - - map1.addMapping(nullMapping1); - map1.addMapping(nullMapping1); - - map2.addMapping(nullMapping1); - - util.assertEqualMaps(assert, map1.toJSON(), map2.toJSON()); - - map1.addMapping(nullMapping2); - map1.addMapping(nullMapping1); - - map2.addMapping(nullMapping2); - - util.assertEqualMaps(assert, map1.toJSON(), map2.toJSON()); - - // original source location - var srcMapping1 = { - generated: { line: 1, column: 0 }, - original: { line: 11, column: 0 }, - source: 'srcMapping1.js' - }; - var srcMapping2 = { - generated: { line: 2, column: 2 }, - original: { line: 11, column: 0 }, - source: 'srcMapping2.js' - }; - - map1 = new SourceMapGenerator(init); - map2 = new SourceMapGenerator(init); - - map1.addMapping(srcMapping1); - map1.addMapping(srcMapping1); - - map2.addMapping(srcMapping1); - - util.assertEqualMaps(assert, map1.toJSON(), map2.toJSON()); - - map1.addMapping(srcMapping2); - map1.addMapping(srcMapping1); - - map2.addMapping(srcMapping2); - - util.assertEqualMaps(assert, map1.toJSON(), map2.toJSON()); - - // full original source and name information - var fullMapping1 = { - generated: { line: 1, column: 0 }, - original: { line: 11, column: 0 }, - source: 'fullMapping1.js', - name: 'fullMapping1' - }; - var fullMapping2 = { - generated: { line: 2, column: 2 }, - original: { line: 11, column: 0 }, - source: 'fullMapping2.js', - name: 'fullMapping2' - }; - - map1 = new SourceMapGenerator(init); - map2 = new SourceMapGenerator(init); - - map1.addMapping(fullMapping1); - map1.addMapping(fullMapping1); - - map2.addMapping(fullMapping1); - - util.assertEqualMaps(assert, map1.toJSON(), map2.toJSON()); - - map1.addMapping(fullMapping2); - map1.addMapping(fullMapping1); - - map2.addMapping(fullMapping2); - - util.assertEqualMaps(assert, map1.toJSON(), map2.toJSON()); - }; - - exports['test github issue #72, check for duplicate names or sources'] = function (assert, util) { - var map = new SourceMapGenerator({ - file: 'test.js' - }); - map.addMapping({ - generated: { line: 1, column: 1 }, - original: { line: 2, column: 2 }, - source: 'a.js', - name: 'foo' - }); - map.addMapping({ - generated: { line: 3, column: 3 }, - original: { line: 4, column: 4 }, - source: 'a.js', - name: 'foo' - }); - util.assertEqualMaps(assert, map.toJSON(), { - version: 3, - file: 'test.js', - sources: ['a.js'], - names: ['foo'], - mappings: 'CACEA;;GAEEA' - }); - }; - -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-source-node.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-source-node.js deleted file mode 100644 index e7afc4e7..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-source-node.js +++ /dev/null @@ -1,439 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var SourceMapGenerator = require('../../lib/source-map/source-map-generator').SourceMapGenerator; - var SourceMapConsumer = require('../../lib/source-map/source-map-consumer').SourceMapConsumer; - var SourceNode = require('../../lib/source-map/source-node').SourceNode; - - exports['test .add()'] = function (assert, util) { - var node = new SourceNode(null, null, null); - - // Adding a string works. - node.add('function noop() {}'); - - // Adding another source node works. - node.add(new SourceNode(null, null, null)); - - // Adding an array works. - node.add(['function foo() {', - new SourceNode(null, null, null, - 'return 10;'), - '}']); - - // Adding other stuff doesn't. - assert.throws(function () { - node.add({}); - }); - assert.throws(function () { - node.add(function () {}); - }); - }; - - exports['test .prepend()'] = function (assert, util) { - var node = new SourceNode(null, null, null); - - // Prepending a string works. - node.prepend('function noop() {}'); - assert.equal(node.children[0], 'function noop() {}'); - assert.equal(node.children.length, 1); - - // Prepending another source node works. - node.prepend(new SourceNode(null, null, null)); - assert.equal(node.children[0], ''); - assert.equal(node.children[1], 'function noop() {}'); - assert.equal(node.children.length, 2); - - // Prepending an array works. - node.prepend(['function foo() {', - new SourceNode(null, null, null, - 'return 10;'), - '}']); - assert.equal(node.children[0], 'function foo() {'); - assert.equal(node.children[1], 'return 10;'); - assert.equal(node.children[2], '}'); - assert.equal(node.children[3], ''); - assert.equal(node.children[4], 'function noop() {}'); - assert.equal(node.children.length, 5); - - // Prepending other stuff doesn't. - assert.throws(function () { - node.prepend({}); - }); - assert.throws(function () { - node.prepend(function () {}); - }); - }; - - exports['test .toString()'] = function (assert, util) { - assert.equal((new SourceNode(null, null, null, - ['function foo() {', - new SourceNode(null, null, null, 'return 10;'), - '}'])).toString(), - 'function foo() {return 10;}'); - }; - - exports['test .join()'] = function (assert, util) { - assert.equal((new SourceNode(null, null, null, - ['a', 'b', 'c', 'd'])).join(', ').toString(), - 'a, b, c, d'); - }; - - exports['test .walk()'] = function (assert, util) { - var node = new SourceNode(null, null, null, - ['(function () {\n', - ' ', new SourceNode(1, 0, 'a.js', ['someCall()']), ';\n', - ' ', new SourceNode(2, 0, 'b.js', ['if (foo) bar()']), ';\n', - '}());']); - var expected = [ - { str: '(function () {\n', source: null, line: null, column: null }, - { str: ' ', source: null, line: null, column: null }, - { str: 'someCall()', source: 'a.js', line: 1, column: 0 }, - { str: ';\n', source: null, line: null, column: null }, - { str: ' ', source: null, line: null, column: null }, - { str: 'if (foo) bar()', source: 'b.js', line: 2, column: 0 }, - { str: ';\n', source: null, line: null, column: null }, - { str: '}());', source: null, line: null, column: null }, - ]; - var i = 0; - node.walk(function (chunk, loc) { - assert.equal(expected[i].str, chunk); - assert.equal(expected[i].source, loc.source); - assert.equal(expected[i].line, loc.line); - assert.equal(expected[i].column, loc.column); - i++; - }); - }; - - exports['test .replaceRight'] = function (assert, util) { - var node; - - // Not nested - node = new SourceNode(null, null, null, 'hello world'); - node.replaceRight(/world/, 'universe'); - assert.equal(node.toString(), 'hello universe'); - - // Nested - node = new SourceNode(null, null, null, - [new SourceNode(null, null, null, 'hey sexy mama, '), - new SourceNode(null, null, null, 'want to kill all humans?')]); - node.replaceRight(/kill all humans/, 'watch Futurama'); - assert.equal(node.toString(), 'hey sexy mama, want to watch Futurama?'); - }; - - exports['test .toStringWithSourceMap()'] = function (assert, util) { - var node = new SourceNode(null, null, null, - ['(function () {\n', - ' ', - new SourceNode(1, 0, 'a.js', 'someCall', 'originalCall'), - new SourceNode(1, 8, 'a.js', '()'), - ';\n', - ' ', new SourceNode(2, 0, 'b.js', ['if (foo) bar()']), ';\n', - '}());']); - var map = node.toStringWithSourceMap({ - file: 'foo.js' - }).map; - var mapWithoutOptions = node.toStringWithSourceMap().map; - - assert.ok(map instanceof SourceMapGenerator, 'map instanceof SourceMapGenerator'); - assert.ok(mapWithoutOptions instanceof SourceMapGenerator, 'mapWithoutOptions instanceof SourceMapGenerator'); - mapWithoutOptions._file = 'foo.js'; - util.assertEqualMaps(assert, map.toJSON(), mapWithoutOptions.toJSON()); - - map = new SourceMapConsumer(map.toString()); - - var actual; - - actual = map.originalPositionFor({ - line: 1, - column: 4 - }); - assert.equal(actual.source, null); - assert.equal(actual.line, null); - assert.equal(actual.column, null); - - actual = map.originalPositionFor({ - line: 2, - column: 2 - }); - assert.equal(actual.source, 'a.js'); - assert.equal(actual.line, 1); - assert.equal(actual.column, 0); - assert.equal(actual.name, 'originalCall'); - - actual = map.originalPositionFor({ - line: 3, - column: 2 - }); - assert.equal(actual.source, 'b.js'); - assert.equal(actual.line, 2); - assert.equal(actual.column, 0); - - actual = map.originalPositionFor({ - line: 3, - column: 16 - }); - assert.equal(actual.source, null); - assert.equal(actual.line, null); - assert.equal(actual.column, null); - - actual = map.originalPositionFor({ - line: 4, - column: 2 - }); - assert.equal(actual.source, null); - assert.equal(actual.line, null); - assert.equal(actual.column, null); - }; - - exports['test .fromStringWithSourceMap()'] = function (assert, util) { - var node = SourceNode.fromStringWithSourceMap( - util.testGeneratedCode, - new SourceMapConsumer(util.testMap)); - - var result = node.toStringWithSourceMap({ - file: 'min.js' - }); - var map = result.map; - var code = result.code; - - assert.equal(code, util.testGeneratedCode); - assert.ok(map instanceof SourceMapGenerator, 'map instanceof SourceMapGenerator'); - map = map.toJSON(); - assert.equal(map.version, util.testMap.version); - assert.equal(map.file, util.testMap.file); - assert.equal(map.mappings, util.testMap.mappings); - }; - - exports['test .fromStringWithSourceMap() empty map'] = function (assert, util) { - var node = SourceNode.fromStringWithSourceMap( - util.testGeneratedCode, - new SourceMapConsumer(util.emptyMap)); - var result = node.toStringWithSourceMap({ - file: 'min.js' - }); - var map = result.map; - var code = result.code; - - assert.equal(code, util.testGeneratedCode); - assert.ok(map instanceof SourceMapGenerator, 'map instanceof SourceMapGenerator'); - map = map.toJSON(); - assert.equal(map.version, util.emptyMap.version); - assert.equal(map.file, util.emptyMap.file); - assert.equal(map.mappings.length, util.emptyMap.mappings.length); - assert.equal(map.mappings, util.emptyMap.mappings); - }; - - exports['test .fromStringWithSourceMap() complex version'] = function (assert, util) { - var input = new SourceNode(null, null, null, [ - "(function() {\n", - " var Test = {};\n", - " ", new SourceNode(1, 0, "a.js", "Test.A = { value: 1234 };\n"), - " ", new SourceNode(2, 0, "a.js", "Test.A.x = 'xyz';"), "\n", - "}());\n", - "/* Generated Source */"]); - input = input.toStringWithSourceMap({ - file: 'foo.js' - }); - - var node = SourceNode.fromStringWithSourceMap( - input.code, - new SourceMapConsumer(input.map.toString())); - - var result = node.toStringWithSourceMap({ - file: 'foo.js' - }); - var map = result.map; - var code = result.code; - - assert.equal(code, input.code); - assert.ok(map instanceof SourceMapGenerator, 'map instanceof SourceMapGenerator'); - map = map.toJSON(); - var inputMap = input.map.toJSON(); - util.assertEqualMaps(assert, map, inputMap); - }; - - exports['test .toStringWithSourceMap() merging duplicate mappings'] = function (assert, util) { - var input = new SourceNode(null, null, null, [ - new SourceNode(1, 0, "a.js", "(function"), - new SourceNode(1, 0, "a.js", "() {\n"), - " ", - new SourceNode(1, 0, "a.js", "var Test = "), - new SourceNode(1, 0, "b.js", "{};\n"), - new SourceNode(2, 0, "b.js", "Test"), - new SourceNode(2, 0, "b.js", ".A", "A"), - new SourceNode(2, 20, "b.js", " = { value: ", "A"), - "1234", - new SourceNode(2, 40, "b.js", " };\n", "A"), - "}());\n", - "/* Generated Source */" - ]); - input = input.toStringWithSourceMap({ - file: 'foo.js' - }); - - var correctMap = new SourceMapGenerator({ - file: 'foo.js' - }); - correctMap.addMapping({ - generated: { line: 1, column: 0 }, - source: 'a.js', - original: { line: 1, column: 0 } - }); - // Here is no need for a empty mapping, - // because mappings ends at eol - correctMap.addMapping({ - generated: { line: 2, column: 2 }, - source: 'a.js', - original: { line: 1, column: 0 } - }); - correctMap.addMapping({ - generated: { line: 2, column: 13 }, - source: 'b.js', - original: { line: 1, column: 0 } - }); - correctMap.addMapping({ - generated: { line: 3, column: 0 }, - source: 'b.js', - original: { line: 2, column: 0 } - }); - correctMap.addMapping({ - generated: { line: 3, column: 4 }, - source: 'b.js', - name: 'A', - original: { line: 2, column: 0 } - }); - correctMap.addMapping({ - generated: { line: 3, column: 6 }, - source: 'b.js', - name: 'A', - original: { line: 2, column: 20 } - }); - // This empty mapping is required, - // because there is a hole in the middle of the line - correctMap.addMapping({ - generated: { line: 3, column: 18 } - }); - correctMap.addMapping({ - generated: { line: 3, column: 22 }, - source: 'b.js', - name: 'A', - original: { line: 2, column: 40 } - }); - // Here is no need for a empty mapping, - // because mappings ends at eol - - var inputMap = input.map.toJSON(); - correctMap = correctMap.toJSON(); - util.assertEqualMaps(assert, inputMap, correctMap); - }; - - exports['test .toStringWithSourceMap() multi-line SourceNodes'] = function (assert, util) { - var input = new SourceNode(null, null, null, [ - new SourceNode(1, 0, "a.js", "(function() {\nvar nextLine = 1;\nanotherLine();\n"), - new SourceNode(2, 2, "b.js", "Test.call(this, 123);\n"), - new SourceNode(2, 2, "b.js", "this['stuff'] = 'v';\n"), - new SourceNode(2, 2, "b.js", "anotherLine();\n"), - "/*\nGenerated\nSource\n*/\n", - new SourceNode(3, 4, "c.js", "anotherLine();\n"), - "/*\nGenerated\nSource\n*/" - ]); - input = input.toStringWithSourceMap({ - file: 'foo.js' - }); - - var correctMap = new SourceMapGenerator({ - file: 'foo.js' - }); - correctMap.addMapping({ - generated: { line: 1, column: 0 }, - source: 'a.js', - original: { line: 1, column: 0 } - }); - correctMap.addMapping({ - generated: { line: 2, column: 0 }, - source: 'a.js', - original: { line: 1, column: 0 } - }); - correctMap.addMapping({ - generated: { line: 3, column: 0 }, - source: 'a.js', - original: { line: 1, column: 0 } - }); - correctMap.addMapping({ - generated: { line: 4, column: 0 }, - source: 'b.js', - original: { line: 2, column: 2 } - }); - correctMap.addMapping({ - generated: { line: 5, column: 0 }, - source: 'b.js', - original: { line: 2, column: 2 } - }); - correctMap.addMapping({ - generated: { line: 6, column: 0 }, - source: 'b.js', - original: { line: 2, column: 2 } - }); - correctMap.addMapping({ - generated: { line: 11, column: 0 }, - source: 'c.js', - original: { line: 3, column: 4 } - }); - - var inputMap = input.map.toJSON(); - correctMap = correctMap.toJSON(); - util.assertEqualMaps(assert, inputMap, correctMap); - }; - - exports['test setSourceContent with toStringWithSourceMap'] = function (assert, util) { - var aNode = new SourceNode(1, 1, 'a.js', 'a'); - aNode.setSourceContent('a.js', 'someContent'); - var node = new SourceNode(null, null, null, - ['(function () {\n', - ' ', aNode, - ' ', new SourceNode(1, 1, 'b.js', 'b'), - '}());']); - node.setSourceContent('b.js', 'otherContent'); - var map = node.toStringWithSourceMap({ - file: 'foo.js' - }).map; - - assert.ok(map instanceof SourceMapGenerator, 'map instanceof SourceMapGenerator'); - map = new SourceMapConsumer(map.toString()); - - assert.equal(map.sources.length, 2); - assert.equal(map.sources[0], 'a.js'); - assert.equal(map.sources[1], 'b.js'); - assert.equal(map.sourcesContent.length, 2); - assert.equal(map.sourcesContent[0], 'someContent'); - assert.equal(map.sourcesContent[1], 'otherContent'); - }; - - exports['test walkSourceContents'] = function (assert, util) { - var aNode = new SourceNode(1, 1, 'a.js', 'a'); - aNode.setSourceContent('a.js', 'someContent'); - var node = new SourceNode(null, null, null, - ['(function () {\n', - ' ', aNode, - ' ', new SourceNode(1, 1, 'b.js', 'b'), - '}());']); - node.setSourceContent('b.js', 'otherContent'); - var results = []; - node.walkSourceContents(function (sourceFile, sourceContent) { - results.push([sourceFile, sourceContent]); - }); - assert.equal(results.length, 2); - assert.equal(results[0][0], 'a.js'); - assert.equal(results[0][1], 'someContent'); - assert.equal(results[1][0], 'b.js'); - assert.equal(results[1][1], 'otherContent'); - }; -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-util.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-util.js deleted file mode 100644 index 22e9a9e3..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/test-util.js +++ /dev/null @@ -1,127 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var libUtil = require('../../lib/source-map/util'); - - exports['test urls'] = function (assert, util) { - var assertUrl = function (url) { - assert.equal(url, libUtil.urlGenerate(libUtil.urlParse(url))); - }; - assertUrl('http://'); - assertUrl('http://www.example.com'); - assertUrl('http://user:pass@www.example.com'); - assertUrl('http://www.example.com:80'); - assertUrl('http://www.example.com/'); - assertUrl('http://www.example.com/foo/bar'); - assertUrl('http://www.example.com/foo/bar/'); - assertUrl('http://user:pass@www.example.com:80/foo/bar/'); - - assertUrl('//'); - assertUrl('//www.example.com'); - assertUrl('file:///www.example.com'); - - assert.equal(libUtil.urlParse('a//b'), null); - }; - - exports['test normalize()'] = function (assert, util) { - assert.equal(libUtil.normalize('/..'), '/'); - assert.equal(libUtil.normalize('/../'), '/'); - assert.equal(libUtil.normalize('/../../../..'), '/'); - assert.equal(libUtil.normalize('/../../../../a/b/c'), '/a/b/c'); - assert.equal(libUtil.normalize('/a/b/c/../../../d/../../e'), '/e'); - - assert.equal(libUtil.normalize('..'), '..'); - assert.equal(libUtil.normalize('../'), '../'); - assert.equal(libUtil.normalize('../../a/'), '../../a/'); - assert.equal(libUtil.normalize('a/..'), '.'); - assert.equal(libUtil.normalize('a/../../..'), '../..'); - - assert.equal(libUtil.normalize('/.'), '/'); - assert.equal(libUtil.normalize('/./'), '/'); - assert.equal(libUtil.normalize('/./././.'), '/'); - assert.equal(libUtil.normalize('/././././a/b/c'), '/a/b/c'); - assert.equal(libUtil.normalize('/a/b/c/./././d/././e'), '/a/b/c/d/e'); - - assert.equal(libUtil.normalize('.'), '.'); - assert.equal(libUtil.normalize('./'), '.'); - assert.equal(libUtil.normalize('././a'), 'a'); - assert.equal(libUtil.normalize('a/./'), 'a/'); - assert.equal(libUtil.normalize('a/././.'), 'a'); - - assert.equal(libUtil.normalize('/a/b//c////d/////'), '/a/b/c/d/'); - assert.equal(libUtil.normalize('///a/b//c////d/////'), '///a/b/c/d/'); - assert.equal(libUtil.normalize('a/b//c////d'), 'a/b/c/d'); - - assert.equal(libUtil.normalize('.///.././../a/b//./..'), '../../a') - - assert.equal(libUtil.normalize('http://www.example.com'), 'http://www.example.com'); - assert.equal(libUtil.normalize('http://www.example.com/'), 'http://www.example.com/'); - assert.equal(libUtil.normalize('http://www.example.com/./..//a/b/c/.././d//'), 'http://www.example.com/a/b/d/'); - }; - - exports['test join()'] = function (assert, util) { - assert.equal(libUtil.join('a', 'b'), 'a/b'); - assert.equal(libUtil.join('a/', 'b'), 'a/b'); - assert.equal(libUtil.join('a//', 'b'), 'a/b'); - assert.equal(libUtil.join('a', 'b/'), 'a/b/'); - assert.equal(libUtil.join('a', 'b//'), 'a/b/'); - assert.equal(libUtil.join('a/', '/b'), '/b'); - assert.equal(libUtil.join('a//', '//b'), '//b'); - - assert.equal(libUtil.join('a', '..'), '.'); - assert.equal(libUtil.join('a', '../b'), 'b'); - assert.equal(libUtil.join('a/b', '../c'), 'a/c'); - - assert.equal(libUtil.join('a', '.'), 'a'); - assert.equal(libUtil.join('a', './b'), 'a/b'); - assert.equal(libUtil.join('a/b', './c'), 'a/b/c'); - - assert.equal(libUtil.join('a', 'http://www.example.com'), 'http://www.example.com'); - assert.equal(libUtil.join('a', 'data:foo,bar'), 'data:foo,bar'); - - - assert.equal(libUtil.join('http://foo.org/a', 'b'), 'http://foo.org/a/b'); - assert.equal(libUtil.join('http://foo.org/a/', 'b'), 'http://foo.org/a/b'); - assert.equal(libUtil.join('http://foo.org/a//', 'b'), 'http://foo.org/a/b'); - assert.equal(libUtil.join('http://foo.org/a', 'b/'), 'http://foo.org/a/b/'); - assert.equal(libUtil.join('http://foo.org/a', 'b//'), 'http://foo.org/a/b/'); - assert.equal(libUtil.join('http://foo.org/a/', '/b'), 'http://foo.org/b'); - assert.equal(libUtil.join('http://foo.org/a//', '//b'), 'http://b'); - - assert.equal(libUtil.join('http://foo.org/a', '..'), 'http://foo.org/'); - assert.equal(libUtil.join('http://foo.org/a', '../b'), 'http://foo.org/b'); - assert.equal(libUtil.join('http://foo.org/a/b', '../c'), 'http://foo.org/a/c'); - - assert.equal(libUtil.join('http://foo.org/a', '.'), 'http://foo.org/a'); - assert.equal(libUtil.join('http://foo.org/a', './b'), 'http://foo.org/a/b'); - assert.equal(libUtil.join('http://foo.org/a/b', './c'), 'http://foo.org/a/b/c'); - - assert.equal(libUtil.join('http://foo.org/a', 'http://www.example.com'), 'http://www.example.com'); - assert.equal(libUtil.join('http://foo.org/a', 'data:foo,bar'), 'data:foo,bar'); - - - assert.equal(libUtil.join('http://foo.org', 'a'), 'http://foo.org/a'); - assert.equal(libUtil.join('http://foo.org/', 'a'), 'http://foo.org/a'); - assert.equal(libUtil.join('http://foo.org//', 'a'), 'http://foo.org/a'); - assert.equal(libUtil.join('http://foo.org', '/a'), 'http://foo.org/a'); - assert.equal(libUtil.join('http://foo.org/', '/a'), 'http://foo.org/a'); - assert.equal(libUtil.join('http://foo.org//', '/a'), 'http://foo.org/a'); - - - assert.equal(libUtil.join('http://', 'www.example.com'), 'http://www.example.com'); - assert.equal(libUtil.join('file:///', 'www.example.com'), 'file:///www.example.com'); - assert.equal(libUtil.join('http://', 'ftp://example.com'), 'ftp://example.com'); - - assert.equal(libUtil.join('http://www.example.com', '//foo.org/bar'), 'http://foo.org/bar'); - assert.equal(libUtil.join('//www.example.com', '//foo.org/bar'), '//foo.org/bar'); - }; - -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/util.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/util.js deleted file mode 100644 index 288046bf..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/node_modules/source-map/test/source-map/util.js +++ /dev/null @@ -1,161 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ -if (typeof define !== 'function') { - var define = require('amdefine')(module, require); -} -define(function (require, exports, module) { - - var util = require('../../lib/source-map/util'); - - // This is a test mapping which maps functions from two different files - // (one.js and two.js) to a minified generated source. - // - // Here is one.js: - // - // ONE.foo = function (bar) { - // return baz(bar); - // }; - // - // Here is two.js: - // - // TWO.inc = function (n) { - // return n + 1; - // }; - // - // And here is the generated code (min.js): - // - // ONE.foo=function(a){return baz(a);}; - // TWO.inc=function(a){return a+1;}; - exports.testGeneratedCode = " ONE.foo=function(a){return baz(a);};\n"+ - " TWO.inc=function(a){return a+1;};"; - exports.testMap = { - version: 3, - file: 'min.js', - names: ['bar', 'baz', 'n'], - sources: ['one.js', 'two.js'], - sourceRoot: '/the/root', - mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' - }; - exports.testMapWithSourcesContent = { - version: 3, - file: 'min.js', - names: ['bar', 'baz', 'n'], - sources: ['one.js', 'two.js'], - sourcesContent: [ - ' ONE.foo = function (bar) {\n' + - ' return baz(bar);\n' + - ' };', - ' TWO.inc = function (n) {\n' + - ' return n + 1;\n' + - ' };' - ], - sourceRoot: '/the/root', - mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' - }; - exports.emptyMap = { - version: 3, - file: 'min.js', - names: [], - sources: [], - mappings: '' - }; - - - function assertMapping(generatedLine, generatedColumn, originalSource, - originalLine, originalColumn, name, map, assert, - dontTestGenerated, dontTestOriginal) { - if (!dontTestOriginal) { - var origMapping = map.originalPositionFor({ - line: generatedLine, - column: generatedColumn - }); - assert.equal(origMapping.name, name, - 'Incorrect name, expected ' + JSON.stringify(name) - + ', got ' + JSON.stringify(origMapping.name)); - assert.equal(origMapping.line, originalLine, - 'Incorrect line, expected ' + JSON.stringify(originalLine) - + ', got ' + JSON.stringify(origMapping.line)); - assert.equal(origMapping.column, originalColumn, - 'Incorrect column, expected ' + JSON.stringify(originalColumn) - + ', got ' + JSON.stringify(origMapping.column)); - - var expectedSource; - - if (originalSource && map.sourceRoot && originalSource.indexOf(map.sourceRoot) === 0) { - expectedSource = originalSource; - } else if (originalSource) { - expectedSource = map.sourceRoot - ? util.join(map.sourceRoot, originalSource) - : originalSource; - } else { - expectedSource = null; - } - - assert.equal(origMapping.source, expectedSource, - 'Incorrect source, expected ' + JSON.stringify(expectedSource) - + ', got ' + JSON.stringify(origMapping.source)); - } - - if (!dontTestGenerated) { - var genMapping = map.generatedPositionFor({ - source: originalSource, - line: originalLine, - column: originalColumn - }); - assert.equal(genMapping.line, generatedLine, - 'Incorrect line, expected ' + JSON.stringify(generatedLine) - + ', got ' + JSON.stringify(genMapping.line)); - assert.equal(genMapping.column, generatedColumn, - 'Incorrect column, expected ' + JSON.stringify(generatedColumn) - + ', got ' + JSON.stringify(genMapping.column)); - } - } - exports.assertMapping = assertMapping; - - function assertEqualMaps(assert, actualMap, expectedMap) { - assert.equal(actualMap.version, expectedMap.version, "version mismatch"); - assert.equal(actualMap.file, expectedMap.file, "file mismatch"); - assert.equal(actualMap.names.length, - expectedMap.names.length, - "names length mismatch: " + - actualMap.names.join(", ") + " != " + expectedMap.names.join(", ")); - for (var i = 0; i < actualMap.names.length; i++) { - assert.equal(actualMap.names[i], - expectedMap.names[i], - "names[" + i + "] mismatch: " + - actualMap.names.join(", ") + " != " + expectedMap.names.join(", ")); - } - assert.equal(actualMap.sources.length, - expectedMap.sources.length, - "sources length mismatch: " + - actualMap.sources.join(", ") + " != " + expectedMap.sources.join(", ")); - for (var i = 0; i < actualMap.sources.length; i++) { - assert.equal(actualMap.sources[i], - expectedMap.sources[i], - "sources[" + i + "] length mismatch: " + - actualMap.sources.join(", ") + " != " + expectedMap.sources.join(", ")); - } - assert.equal(actualMap.sourceRoot, - expectedMap.sourceRoot, - "sourceRoot mismatch: " + - actualMap.sourceRoot + " != " + expectedMap.sourceRoot); - assert.equal(actualMap.mappings, expectedMap.mappings, - "mappings mismatch:\nActual: " + actualMap.mappings + "\nExpected: " + expectedMap.mappings); - if (actualMap.sourcesContent) { - assert.equal(actualMap.sourcesContent.length, - expectedMap.sourcesContent.length, - "sourcesContent length mismatch"); - for (var i = 0; i < actualMap.sourcesContent.length; i++) { - assert.equal(actualMap.sourcesContent[i], - expectedMap.sourcesContent[i], - "sourcesContent[" + i + "] mismatch"); - } - } - } - exports.assertEqualMaps = assertEqualMaps; - -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/package.json b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/package.json deleted file mode 100644 index 10d9fd06..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/node_modules/postcss/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "postcss", - "version": "0.2.0", - "description": "Framework for CSS postprocessors", - "keywords": [ - "css", - "parser", - "postproccessor" - ], - "author": { - "name": "Andrey Sitnik", - "email": "andrey@sitnik.ru" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ai/postcss.git" - }, - "dependencies": { - "source-map": "*" - }, - "devDependencies": { - "coffee-script": "1.6.3", - "fs-extra": "0.8.1", - "should": "2.1.1", - "mocha": "1.15.1" - }, - "main": "lib/postcss", - "scripts": { - "test": "mocha" - }, - "readme": "# PostCSS\n\nPostCSS is a framework for CSS postprocessors,\nto modify CSS by your JS function.\n\nIt takes care of most common CSS tool tasks:\n\n1. parses CSS;\n2. gives you usable JS API to edit CSS node tree;\n3. saves modified node tree to new CSS;\n4. generates (or modifies existent) source map for your changes;\n\nYou can use this framework to write you own:\n\n* CSS minifier or beautifizer.\n* Grunt plugin to generate sprites, include `data-uri` images\n or any other works.\n* Text editor plugin to automate CSS routine.\n* Command-line CSS tool.\n\nSponsored by [Evil Martians](http://evilmartians.com/).\n\n## Build with PostCSS\n\n* [Autoprefixer](https://github.com/ai/autoprefixer)\n* [grunt-pixrem](https://github.com/robwierzbowski/grunt-pixrem)\n\n## Quick Example\n\nLet’s fix forgotten `content` property in `::before` and `::after`:\n\n```js\nvar postcss = require('postcss');\n\nvar contenter = postcss(function (css) {\n css.eachRule(function (rule) {\n if ( rule.selector.match(/::(before|after)/) ) {\n // In every ::before/::after rule\n\n // Did we forget content property?\n var good = rule.some(function (i) { return i.prop == 'content'; });\n\n if ( !good ) {\n // Add content: '' if we forget it\n rule.prepend({ prop: 'content', value: '\"\"' });\n }\n\n }\n });\n});\n```\n\nAnd then CSS with forgotten `content`:\n\n```css\na::before {\n width: 10px;\n height: 10px\n}\n```\n\nwill be fixed by our new `contenter`:\n\n```js\nvar fixed = contenter.process(css).css;\n```\n\nto:\n\n```css\na::before {\n content: \"\";\n width: 10px;\n height: 10px\n}\n```\n\n## Features\n\n### Source Map\n\nPostCSS generates source map for its transformations:\n\n```js\nresult = processor.process(css, { map: true, from: 'from.css', to: 'to.css' });\nresult.css // String with processed CSS\nresult.map // Source map\n```\n\nAnd modifies source map from previous step (like Sass preprocessor):\n\n```js\nvar sassMap = fs.readFileSync('from.sass.map');\nprocessor.process(css, { map: sassMap, from: 'from.sass.css', to: 'to.css' });\n```\n\n### Preserves code formatting and indentations\n\nPostCSS will not change any byte of rule if you don't modify node:\n\n```js\npostcss(function (css) { }).process(css).css == css;\n```\n\nAnd when you modify CSS nodes, PostCSS will try to copy coding style:\n\n```js\ncontenter.process(\"a::before{color: black}\")\n// a::before{content: '';color: black}\n\ncontenter.process(\"a::before {\\n color: black;\\n }\")\n// a::before {\n// content: '';\n// color: black;\n// }\n```\n\n## Why PostCSS Better Than …\n\n### Preprocessors\n\nPreprocessors (like Sass or Stylus) give us special language with variables,\nmixins, statements and compile it to CSS. Compass, nib and other mixins\nlibraries use this languages to work with prefixes, sprites and inline images.\n\nBut Sass and Stylus languages were created to be syntax-sugar for CSS.\nWriting really complicated programs using preporcessor languages is very difficult.\n[Autoprefixer] is absolutely impossible on Sass.\n\nPostCSS gives you comfort and power of JS or CoffeeScript to working with CSS.\nYou can do really magic things with wide range of [npm] libraries.\n\nBut postprocessors are not enemies for preprocessors. Sass and Stylus is still\nthe best way to improve readability and add some syntax sugar to CSS. You can easily combine preprocessors and postprocessors.\n\n[Autoprefixer]: https://github.com/ai/autoprefixer\n[npm]: https://npmjs.org/\n\n### RegExp\n\nSome Grunt plugins modify CSS with regular expressions. But CSS parser and\nnode tree are much safer way to edit CSS. Also regexps will break source maps\ngenerated by preprocessors.\n\n### CSS Parsers\n\nThere are a lot of good CSS parsers, like [Gonzales]. But they help you only\nwith first step.\n\nUnlike them PostCSS gives you useful high level API (for example,\nsafe iterators) and changes source map generator (or modifier for existing\nsource map from preprocessors).\n\n[Gonzales]: https://github.com/css/gonzales\n\n### Rework\n\n[Rework] was a first CSS postprocessors framework. PostCSS is very similar\nto it.\n\nBut Rework has no high level API and rewrite your CSS code style\nand indentations. So it can’t be used in text editor plugins.\n\nUnlike it PostCSS preserves all spaces and code formatting.\nIf you don't change rule, output will be byte‑to‑byte equal.\n\n[Rework]: https://github.com/visionmedia/rework\n\n## Usage\n\n### Processor\n\nFunction `postcss(fn)` creates processor by your function:\n\n```js\nvar postcss = require('postcss');\n\nvar processor = postcss(function (css) {\n // Code to modify CSS\n});\n```\n\nIf you want to combine multiple processors (and parse CSS only once),\nyou can create empty processor and add several functions by `use(fn)` method:\n\n```js\nvar all = postcss().\n use(prefixer).\n use(minifing);\n```\n\nProcessor function can just change current CSS node tree:\n\n```js\npostcss(function (css) {\n css.append( /* new rule */ )\n});\n```\n\nor create totally new CSS root and return it:\n\n```js\npostcss(function (css) {\n var newCSS = postcss.root()\n // Add rules and declarations\n return newCSS;\n});\n```\n\nProcessor will transform some CSS by `process(css, opts)` method:\n\n```js\nvar doubler = postcss(function (css) {\n // Clone each declaration\n css.eachDecl(function (decl) {\n decl.parent.prepend( decl.clone() );\n });\n});\n\nvar css = \"a { color: black; }\";\nvar result = processor.process(css);\n\nresult.css //=> \"a { color: black; color: black; }\"\n```\n\nYou can set original CSS filename by `from` options and make syntax error\nmessages much more helpful:\n\n```js\nvar wrong = \"a {\";\nprocessor.process(wrong, { from: 'main.css' });\n//=> Can't parse CSS: Unclosed block at line 1:1 in main.css\n```\n### Source Map\n\nPostCSS will generate source map, if you set `map` option to `true`\nin `process(css, opts)` method.\n\nYou must set input and output CSS files paths (by `from` and `to` options)\nto generate correct map.\n\n```js\nvar result = processor.process(css, {\n map: true,\n from: 'main.css',\n to: 'main.out.css'\n});\n\nresult.map //=> '{\"version\":3,\"file\":\"main.out.css\",\"sources\":[\"main.css\"],\"names\":[],\"mappings\":\"AAAA,KAAI\"}'\n\nfs.writeFileSync('main.out.map', result.map);\n```\n\nPostCSS can also modify previous source map (for example, from Sass\ncompilation). So, if you compile: Sass to CSS and then minify CSS\nby postprocessor, final source map will contain mapping from Sass code\nto minified CSS.\n\nJust set original source map content (as string or JS object)\nto `map` option:\n\n```js\nvar result = minifier.process(css, {\n map: fs.readFileSync('main.sass.map'),\n from: 'main.sass.css',\n to: 'main.min.css'\n});\n\nresult.map //=> Source map from main.sass to main.min.css\n```\n\n### Nodes\n\nProcessor function will receive `Root` node with CSS node tree inside.\n\n```js\nvar processor = postcss(function (cssRoot) {\n});\n```\n\nThere are 3 types of child nodes: `AtRule`, `Rule` and `Declaration`.\nAll nodes contain `toString()` and `clone()` methods.\n\nYou can parse CSS and get `Root` node by `postcss.parse(css, opts)` method:\n\n```js\nvar postcss = require('postcss');\n\nvar cssRoot = postcss.parse('a { }');\n```\n\n### Node Source\n\nEvery node stores it origin file (if you set `from` option to `process`\nor `parse` method) and position at `source` property:\n\n```\nvar root = postcss.parse(css, { from: 'main.css' });\nvar rule = root.rules[1];\n\nrule.source.file //=> 'main.css'\nrule.source.start //=> { line: 5, position: 1 }\nrule.source.end //=> { line: 10, position: 5 }\n```\n\n### Whitespaces\n\nAll nodes (exclude `Root`) have `before` property with all earlier spaces and comments.\n\nNodes with children (`Root`, `AtRule` and `Rule`) contain also `after` property\nwith spaces after last child and before `}` or end of file.\n\n```js\nvar root = postcss.parse(\"a {\\n color: black;\\n}\\n\");\n\nroot.after //=> \"\\n\" from end of file\nroot.rules[0].after //=> \"\\n\" before }\nroot.rules[0].decls[0].before //=> \"\\n \" before color: black\n```\n\nSo, the simplest way to minify CSS is to clean `before` and `after` properties:\n\n```js\nvar minifier = postcss(function (css) {\n css.eachDecl(function (decl) {\n decl.before = '';\n });\n css.eachRule(function (rule) {\n rule.before = '';\n rule.after = '';\n });\n css.eachAtRule(function (atRule) {\n atRule.before = '';\n atRule.after = '';\n });\n});\n\nvar css = \"a{\\n color:black\\n}\\n\";\nminifier.process(css).css //=> \"a{color:black}\"\n```\n\n### Raw Properties\n\nSome CSS values (like selectors, at-rule params and declaration values) can\ncontain comments. PostCSS will clean them for you:\n\n```js\nvar root = postcss.parse(\"a /**/ b {}\");\nvar ab = root.rules[0];\n\nab.selector //=> 'a b' trimmed and cleaned from comments\n```\n\nBut PostCSS saves raw content to stringify it to CSS, if you don’t\nset new value. As you can remember, PostCSS tries to save origin CSS\nbyte-to-byte, when it’s possible:\n\n```js\nab.toString() //=> 'a /**/ b {}' with comment\n\nab.selector = '.link b';\nab.toString() //=> '.link b' you change value and magic was gone\n```\n\n### Containers\n\n`Root`, `AtRule` and `Rule` nodes can contain children in `rules` or `decls`\nproperty.\n\nThere are common method to work with children:\n\n* `append(newChild)` to add child at the end of children list.\n* `prepend(newChild)` to add child at the beginning of children list.\n* `insertBefore(existsChild, newChild)` to insert new child before some\n existent children.\n* `insertAfter(existsChild, newChild)` to insert new child after some\n existent children.\n* `remove(child)` to remove child.\n* `index(child)` to return child index.\n* `some(fn)` to return true if `fn` return true on any child.\n* `every(fn)` to return true if `fn` return true on all children.\n\nMethods `insertBefore`, `insertAfter` and `remove` can receive child node\nor child index number as existent child argument.\nHave in mind that `index` works much faster.\n\n### Children\n\n`AtRule`, `Rule` and `Declaration` nodes should be wrapped in other nodes.\n\nAll children contain `parent` property with parent node:\n\n```js\nrule.decls[0].parent == rule;\n```\n\nAll children has `removeSelf()` method:\n\n```js\nrule.decls[0].removeSelf();\n```\n\nBut `remove(index)` in parent with child index is much faster:\n\n```js\nrule.each(function (decl, i) {\n rule.remove(i);\n});\n```\n\n### Iterators\n\nAll parent nodes have `each` method to iterate through children nodes:\n\n```js\nroot = postcss.parse('a { color: black; display: none }');\n\nroot.each(function (rule, i) {\n console.log(rule.selector, i); // Will log \"a 0\"\n});\n\nroot.rules[0].each(function (decl, i) {\n console.log(decl.prop, i); // Will log \"color 0\" and \"display 1\"\n});\n```\n\nInstead of simple `for` or `Array#forEach()` this iterator is safe.\nYou can change children inside iteration and it will fix current index:\n\n```js\nrule.rules.forEach(function (decl, i) {\n rule.prepend( decl.clone() );\n // Will be infinity cycle, because on prepend current declaration become\n // second and next index will go to current declaration again\n});\n\nrule.each(function (decl, i) {\n rule.prepend( decl.clone() );\n // Will work correct (once clone each declaration), because after prepend\n // iterator index will be recalculated\n});\n```\n\nBecause CSS is nested structure, PostCSS contains recursive iterator\nby node type:\n\n```js\nroot.eachDecl(function (decl, i) {\n // Each declaration inside root\n});\n\nroot.eachRule(function (rule, i) {\n // Each rule inside root and any nested at-rules\n});\n\nroot.eachAtRule(function (atRule, i) {\n // Each at-rule inside root and any nested at-rules\n});\n```\n\n### Root Node\n\n`Root` node contains all CSS tree. Its children can be only `AtRule` or `Rule`\nnodes in `rules` property.\n\nYou can create new root by shortcut:\n\n```js\nvar root = postcss.root();\n```\n\nMethod `toString()` will stringify all current CSS:\n\n```js\nroot = postcss.parse(css);\nroot.toString() == css;\n```\n\n### AtRule Node\n\n```css\n@charset 'utf-8';\n\n@font-face {\n font-family: 'Cool'\n}\n\n@media print {\n img { display: none }\n}\n```\n\n`AtRule` has two own properties: `name` and `params`.\n\nAs you see, some at-rules don’t contain any children (like `@charset`\nor `@import`), some of at-rules can contain only declarations\n(like `@font-face` or `@page`), but most of them can contain rules\nand nested at-rules (like `@media`, `@keyframes` and others).\n\nParser select `AtRule` content type by its name. If you create `AtRule`\nnode manually, it will detect own content type with new child type on first\n`append` or other add method call:\n\n```js\nvar atRule = postcss.atRule({ name: '-x-animations' });\natRule.rules //=> undefined\natRule.decls //=> undefined\n\natRule.append( postcss.rule({ selector: 'from' }) );\natRule.rules.length //=> 1\natRule.decls //=> undefined\n```\n\nYou can create new at-rule by shortcut:\n\n```js\nvar atRule = postcss.atRule({ name: 'charset', params: 'utf-8' });\n```\n\n### Rule Node\n\n```css\na {\n color: black;\n}\n```\n\n`Rule` node has `selector` property and contains `Declaration` children\nin `decls` property.\n\nYou can miss `Declaration` constructor in `append` and other insert methods:\n\n```js\nrule.append({ prop: 'color', value: 'black' });\n```\n\nProperty `semicolon` marks does last declaration in rule has semicolon or not:\n\n```js\nvar root = postcss.parse('a { color: black }');\nroot.rules[0].semicolon //=> false\n\nvar root = postcss.parse('a { color: black; }');\nroot.rules[0].semicolon //=> true\n```\n\nYou can create new rule by shortcut:\n\n```js\nvar rule = postcss.rule({ selector: 'a' });\n```\n\n### Declaration Node\n\n```css\ncolor: black\n```\n\n`Declaration` node has `prop` and `value` properties.\n\nYou can create new declaration by shortcut:\n\n```js\nvar decl = postcss.decl({ prop: 'color', value: 'black' });\n```\n\nOr use short form in `append()` and other add methods:\n\n```js\nrule.append({ prop: 'color', value: 'black' });\n```\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/ai/postcss/issues" - }, - "homepage": "https://github.com/ai/postcss", - "_id": "postcss@0.2.0", - "_from": "postcss@~0.2" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/package.json b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/package.json deleted file mode 100644 index d8c453b3..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "autoprefixer", - "version": "1.0.20140213", - "description": "Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website", - "keywords": [ - "css", - "prefix", - "postprocessor", - "postcss" - ], - "author": { - "name": "Andrey Sitnik", - "email": "andrey@sitnik.ru" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/ai/autoprefixer.git" - }, - "dependencies": { - "postcss": "~0.2", - "fs-extra": "~0.8.1" - }, - "devDependencies": { - "coffee-script": "1.7.1", - "browserify": "3.28.2", - "should": "3.1.2", - "stylus": "0.42.2", - "mocha": "1.17.1", - "nib": "1.0.2" - }, - "bin": { - "autoprefixer": "./bin/autoprefixer" - }, - "main": "lib/autoprefixer", - "scripts": { - "test": "mocha" - }, - "readme": "# Autoprefixer\n\n<img align=\"right\" width=\"94\" src=\"http://ai.github.io/autoprefixer/logo.svg\" title=\"Autoprefixer logo by Anton Lovchikov\">\n\nParse CSS and add vendor prefixes to CSS rules using values\nfrom the [Can I Use](http://caniuse.com/).\n\nWrite your CSS rules without vendor prefixes (in fact, forget about them\nentirely):\n\n```css\n:fullscreen a {\n transition: transform 1s\n}\n```\n\nProcess your CSS by Autoprefixer:\n\n```js\nvar prefixed = autoprefixer.process(css).css;\n```\n\nIt will use the data on current browser popularity and properties support\nto apply prefixes for you:\n\n```css\n:-webkit-full-screen a {\n -webkit-transition: -webkit-transform 1s;\n transition: transform 1s\n}\n:-moz-full-screen a {\n transition: transform 1s\n}\n:-ms-fullscreen a {\n transition: transform 1s\n}\n:fullscreen a {\n -webkit-transition: -webkit-transform 1s;\n transition: transform 1s\n}\n```\n\nYou can play with your CSS in [interactive demo] of Autoprefixer.\n\nTwitter account for news and releases: [@autoprefixer].\n\nSponsored by [Evil Martians]. Based on [PostCSS] framework.\n\n[interactive demo]: http://jsfiddle.net/simevidas/udyTs/show/light/\n[@autoprefixer]: https://twitter.com/autoprefixer\n[Evil Martians]: http://evilmartians.com/\n[PostCSS]: https://github.com/ai/postcss\n\n## Features\n\n### Forget about prefixes\n\nThe best tool is a tool you can't see and one that does the work for you.\nThis is the main idea behind Autoprefixer.\n\nAutoprefixer interface is simple: just forget about vendor prefixes\nand write normal CSS according to latest W3C specs. You don’t need\na special language (like Sass) or special mixins.\n\nBecause Autoprefixer is a postprocessor for CSS,\nyou can also use it with preprocessors, such as Sass, Stylus or LESS.\n\n### Actual data from Can I Use\n\nAutoprefixer uses the most recent data from [Can I Use](http://caniuse.com/),\nunderstands which browsers are actual and popular and adds only the necessary\nvendor prefixes.\n\nIt also cleans your CSS from old prefixes (like prefixed `border-radius`,\nproduced by many CSS libraries):\n\n```css\na {\n -webkit-border-radius: 5px;\n border-radius: 5px\n}\n```\n\ncompiles to:\n\n```css\na {\n border-radius: 5px\n}\n```\n\nNote, that Autoprefixer doesn’t load Can I Use data every time. This data\nis already packed to release, so with same Autoprefixer version you always will\nhave same output result.\n\n### Flexbox, Gradients, etc.\n\nFlexbox or gradients have different syntaxes in different browsers\n(sometimes you need to recalculate angles, sometimes you need 2 old properties\ninstead of new one), but Autoprefixer hides this from you.\n\nJust code by latest W3C specs and Autoprefixer will produce the code\nfor old browsers:\n\n```css\na {\n display: flex;\n}\n```\n\ncompiles to:\n\n```css\na {\n display: -webkit-box;\n display: -webkit-flex;\n display: -moz-box;\n display: -ms-flexbox;\n display: flex\n}\n```\n\nAutoprefixer has [22 special hacks] to fix browser’s differences.\n\n[22 special hacks]: https://github.com/ai/autoprefixer/tree/master/lib/hacks\n\n### Fast\n\nAutoprefixer is about 16 times faster than Compass and 8 times faster\nthan Stylus.\n\nOn a Core i7 with 10 GB of RAM and SSD, benchmark with GitHub styles is:\n\n```\n~/Dev/autoprefixer$ ./node_modules/.bin/cake bench\nLoad GitHub styles\nAutoprefixer: 489 ms\nCompass: 4156 ms (8.5 times slower)\nStylus: 4165 ms (8.5 times slower)\n```\n\nUnlike [-prefix-free](http://leaverou.github.io/prefixfree/), Autoprefixer\ncompiles CSS once on deploy and doesn’t hit client-side performance.\n\n## Browsers\n\nYou can specify the browsers you want to target in your project:\n\n```js\nautoprefixer(\"last 1 version\", \"> 1%\", \"Explorer 7\").process(css).css;\n```\n\n* `last 2 versions` is last versions for each browser. Like “last 2 versions”\n [strategy](http://support.google.com/a/bin/answer.py?answer=33864) in\n Google.\n* `last 2 Chrome versions` is last versions of specify browser.\n* `> 5%` is browser versions, selected by global usage statistics.\n* `Firefox > 20` is Firefox newer versions than 20.\n* `Firefox >= 20` is Firefox version 20 or newer.\n* `Firefix ESR` is latest [Firefox ESR] version.\n* `none` don’t set any browsers to clean CSS from any vendor prefixes.\n* You can also set browsers directly.\n\nBlackberry and stock Android browsers will not be used in `last n versions`.\nYou can add them by name:\n\n```js\nautoprefixer(\"last 1 version\", \"BlackBerry 10\", \"Android 4\").process(css).css;\n```\n\nBrowsers names (case insensitive):\n* `Android` for old Android stock browser.\n* `BlackBerry` or `bb` for Blackberry browser.\n* `Chrome` for Google Chrome.\n* `Firefox` or `ff` for Mozilla Firefox.\n* `Explorer` or `ie` for Internet Explorer.\n* `iOS` for iOS Safari.\n* `Opera` for Opera.\n* `Safari` for desktop Safari.\n\nBy default, Autoprefixer uses `> 1%, last 2 versions, Firefox ESR, Opera 12.1`:\n* Latest [Firefox ESR] is a 24 version.\n* Opera 12.1 will be in list until Opera supports non-Blink 12.x branch.\n\n[Firefox ESR]: http://www.mozilla.org/en/firefox/organizations/faq/\n\n## Source Map\n\nAutoprefixer will generate a source map if you set `map` option to `true`.\n\nYou must set input and output CSS files paths (by `from` and `to` options)\nto generate a correct map.\n\n```js\nvar result = autoprefixer.process(css, {\n map: true,\n from: 'main.css',\n to: 'main.out.css'\n});\n\nresult.css //=> Prefixed CSS\nresult.map //=> Source map content\n\nfs.writeFileSync('main.out.css.map', result.map);\n```\n\nAutoprefixer can also modify previous source map (for example, from Sass\ncompilation). Just set original source map content (as string or JS object)\nto `map` option:\n\n```js\nvar result = autoprefixer.process(css, {\n map: fs.readFileSync('main.sass.css.map'),\n from: 'main.sass.css',\n to: 'main.min.css'\n});\n\nresult.map //=> Source map from main.sass to main.min.css\n```\n\n## Debug\n\nYou can check which browsers are selected and which properties will be prefixed:\n\n```js\ninfo = autoprefixer(\"last 1 version\").info();\nconsole.log(info);\n```\n\nOr by CLI command:\n\n```sh\nautoprefixer -i\n```\n\n## FAQ\n\n### Does it add polyfills for old browsers?\n\nNo. Autoprefixer only adds prefixes, not polyfills. There are two reasons:\n\n1. Prefixes and polyfills are very different and need a different API.\n Two separate libraries would be much better.\n2. Most of IE polyfills are very bad for client perfomance. They use slow hacks\n and old IEs is mostly used on old hardware. Most of CSS 3 features that is\n only used for styling should be ignored in old IEs as it is recommended in\n Graceful Degradation.\n\n### Why don’t gradients work in Firefox?\n\nCheck that you use correct [direction syntax]. For example, you should use\n`to bottom` instead of `top`:\n\n```css\na {\n background: linear-gradient(to bottom, white, black)\n}\n```\n\nUnfortunately, unprefixed gradients use different direction syntax, that most\nof old gradients examples, so be careful and use always latest W3C specs with\nAutoprefixer.\n\n[direction syntax]: https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient\n\n### Why doesn’t Autoprefixer add prefixes to `border-radius`?\n\nDevelopers are often surprised by how few prefixes are required today.\nIf Autoprefixer doesn’t add prefixes to your CSS, check if they’re still\nrequired on [Can I Use](http://caniuse.com/).\n\nIf a prefix is required, but Autoprefixer doesn’t add it or adds it\nincorrectly, please\n[report an issue](https://github.com/ai/autoprefixer/issues/new)\nand include your source CSS and expected output.\n\n### Why doesn’t Autoprefixer support `appearance`?\n\nUnlike `transition`, the `appearance` property is not a part of\nany specification. So there is no `appearance`, only `-moz-appearance`\nand `-webkit-appearance`. Quote from [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-appearance):\n\n> Do not use this property on Web sites: not only is it non-standard, but its\n> behavior changes from one browser to another. Even the keyword `none` does not\n> have the same behavior on each form element across different browsers, and\n> some do not support it at all.\n\n## Usage\n\n### Grunt\n\nYou can use the\n[grunt-autoprefixer](https://github.com/nDmitry/grunt-autoprefixer)\nplugin for Grunt. Install the npm package and add it to Gruntfile:\n\n```js\ngrunt.loadNpmTasks('grunt-autoprefixer');\n```\n\n### Compass\n\nIf you use Compass binary to compile your styles, you can easily integrate\nAutoprefixer with it. Install `autoprefixer-rails` gem:\n\n```\ngem install autoprefixer-rails\n```\n\nand add post-compile hook to `config.rb`:\n\n```ruby\nrequire 'autoprefixer-rails'\nrequire 'csso'\n\non_stylesheet_saved do |file|\n css = File.read(file)\n File.open(file, 'w') do |io|\n io << AutoprefixerRails.process(css)\n end\nend\n```\n\nYou can set browsers array as second argument in `process` method:\n\n```ruby\nio << AutoprefixerRails.process(css, [\"last 1 version\", \"> 1%\", \"Explorer 7\"])\n```\n\n### Stylus\n\nIf you use Stylus CLI, you can add Autoprefixer by\n[autoprefixer-stylus](https://github.com/jenius/autoprefixer-stylus) plugin.\n\nJust install npm package and use it in `-u` option:\n\n```\nstylus -u autoprefixer-stylus file.css\n```\n\n### Ruby on Rails\n\nAdd [autoprefixer-rails](https://github.com/ai/autoprefixer-rails) gem\nto `Gemfile` and write CSS in a usual way:\n\n```ruby\ngem \"autoprefixer-rails\"\n```\n\n### Ruby\n\nYou can integrate Autoprefixer into your Sprockets environment\nby `autoprefixer-rails` gem:\n\n```ruby\nAutoprefixerRails.install(sprockets_env)\n```\n\nor process CSS from plain Ruby:\n\n```ruby\nprefixed = AutoprefixerRails.compile(css)\n```\n\n### Prepros\n\nIf you want to build your assets in GUI, try\n[Prepros](http://alphapixels.com/prepros/). Just set “Auto Prefix CSS”\n[checkbox](https://f.cloud.github.com/assets/3478693/930798/faa29892-0016-11e3-8901-87850de7aed2.jpg)\nin right panel.\n\n<img src=\"http://alphapixels.com/prepros/static/img/prepros.jpg\" width=\"550\" height=\"340\" />\n\n### Mincer\n\nTo use Autoprefixer in [Mincer](https://github.com/nodeca/mincer),\ninstall `autoprefixer` npm package and enable it:\n\n```js\nenvironment.enable('autoprefixer');\n```\n\n### Middleman\n\nAdd [middleman-autoprefixer](https://github.com/porada/middleman-autoprefixer)\ngem to `Gemfile`:\n\n```ruby\ngem \"middleman-autoprefixer\"\n```\n\nand activate the extension in your project’s `config.rb`:\n\n```ruby\nactivate :autoprefixer\n```\n\n### Node.js\n\nUse `autoprefixer` npm package:\n\n```js\nvar autoprefixer = require('autoprefixer');\nvar css = 'a { transition: transform 1s }';\nvar prefixed = autoprefixer.process(css).css;\n```\n\n### PHP\n\nYou can use Autoprefixer in PHP by\n[autoprefixer-php](https://github.com/vladkens/autoprefixer-php) library:\n\n\n```php\n$autoprefixer = new Autoprefixer();\n$css = 'a { transition: transform 1s }';\n$prefixed = $autoprefixer->compile($css);\n```\n\n### JavaScript\n\nYou can use Autoprefixer in the browser or a non-Node.js runtime\nwith [standalone version](https://raw.github.com/ai/autoprefixer-rails/master/vendor/autoprefixer.js).\n\n### PostCSS\n\nAutoprefixer can be also used as a [PostCSS](https://github.com/ai/postcss)\nprocessor, so you can combine it with other processors and parse CSS only once:\n\n```js\npostcss().\n use( autoprefixer(['> 1%', 'opera 12.5']).postcss ).\n use( compressor ).\n process(css);\n```\n\n### Sublime Text\n\nYou can process your styles directly in Sublime Text with the\n[sublime-autoprefixer](https://github.com/sindresorhus/sublime-autoprefixer)\nplugin.\n\n### Brackets\n\nStyles can processed automatically in Brackets using the\n[brackets-autoprefixer](https://github.com/mikaeljorhult/brackets-autoprefixer)\nextension.\n\n\n### Others\n\nYou can use the `autoprefixer` binary to process CSS files using\nany assets manager:\n\n```\nsudo npm install --global autoprefixer\nautoprefixer *.css\n```\n\nSee `autoprefixer -h` for help.\n\n## In-package Update\n\nIt’s highly recommended that you always use the latest version of Autoprefixer.\nIf by any chance you or your company are not able to update the package\n(e.g. in case of long test periods before any library updates), you can still\nupdate the very browser data that Autoprefixer fetches from Can I Use:\n\n```\nautoprefixer --update\n```\n\nNote that the in-package update doesn’t get any code fixes nor the\nimplementation of new features. It just keeps the browser popularity and\nsupport data up to date, and adds new browser versions.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/ai/autoprefixer/issues" - }, - "homepage": "https://github.com/ai/autoprefixer", - "_id": "autoprefixer@1.0.20140213", - "_from": "autoprefixer@~1.0.20140110" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/updaters/browsers.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/updaters/browsers.js deleted file mode 100644 index afa4f7c1..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/updaters/browsers.js +++ /dev/null @@ -1,69 +0,0 @@ -(function() { - module.exports = function() { - var minor; - minor = ['bb', 'android']; - return this.github('Fyrd/caniuse/master/data.json', (function(_this) { - return function(data) { - var agent, browsers, caniuse, internal, intervals, normalize, _ref; - normalize = function(array) { - return array.reverse().filter(function(i) { - return i; - }); - }; - intervals = function(array) { - var i, interval, result, splited, sub, _i, _len; - result = []; - for (_i = 0, _len = array.length; _i < _len; _i++) { - interval = array[_i]; - splited = interval.split('-').map(function(i) { - return parseFloat(i); - }); - splited = splited.sort().reverse(); - sub = (function() { - var _j, _len1, _results; - _results = []; - for (_j = 0, _len1 = splited.length; _j < _len1; _j++) { - i = splited[_j]; - _results.push([i, interval, splited.length]); - } - return _results; - })(); - result = result.concat(sub); - } - return result; - }; - agent = function(name) { - var future, info, result, versions; - info = data.agents[name]; - future = normalize(info.versions.slice(-3)).map(function(i) { - return parseFloat(i); - }); - versions = intervals(normalize(info.versions.slice(0, -3))); - result = {}; - result.prefix = name === 'opera' ? '-o-' : "-" + info.prefix + "-"; - if (minor.indexOf(name) !== -1) { - result.minor = true; - } - if (future.length) { - result.future = future; - } - result.versions = versions.map(function(i) { - return i[0]; - }); - result.popularity = versions.map(function(i) { - return info.usage_global[i[1]] / i[2]; - }); - return result; - }; - browsers = {}; - _ref = _this.browsers; - for (caniuse in _ref) { - internal = _ref[caniuse]; - browsers[internal] = agent(caniuse); - } - return _this.save('browsers', browsers); - }; - })(this)); - }; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/updaters/prefixes.js b/node_modules/gulp-autoprefixer/node_modules/autoprefixer/updaters/prefixes.js deleted file mode 100644 index 5d2e7755..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/autoprefixer/updaters/prefixes.js +++ /dev/null @@ -1,238 +0,0 @@ -(function() { - var __slice = [].slice; - - module.exports = function(updater) { - var prefix, prefixes; - prefixes = {}; - prefix = function() { - var data, name, names, _i, _j, _len, _results; - names = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), data = arguments[_i++]; - _results = []; - for (_j = 0, _len = names.length; _j < _len; _j++) { - name = names[_j]; - _results.push(prefixes[name] = data); - } - return _results; - }; - this.feature('border-radius', (function(_this) { - return function(browsers) { - return prefix('border-radius', 'border-top-left-radius', 'border-top-right-radius', 'border-bottom-right-radius', 'border-bottom-left-radius', { - mistakes: ['-ms-'], - browsers: browsers, - transition: true - }); - }; - })(this)); - this.feature('css-boxshadow', (function(_this) { - return function(browsers) { - return prefix('box-shadow', { - browsers: browsers, - transition: true - }); - }; - })(this)); - this.feature('css-animation', (function(_this) { - return function(browsers) { - return prefix('animation', 'animation-name', 'animation-duration', 'animation-delay', 'animation-direction', 'animation-fill-mode', 'animation-iteration-count', 'animation-play-state', 'animation-timing-function', '@keyframes', { - browsers: browsers - }); - }; - })(this)); - this.feature('css-transitions', (function(_this) { - return function(browsers) { - return prefix('transition', 'transition-property', 'transition-duration', 'transition-delay', 'transition-timing-function', { - mistakes: ['-ms-'], - browsers: browsers - }); - }; - })(this)); - this.feature('transforms2d', (function(_this) { - return function(browsers) { - prefix('transform', 'transform-origin', 'perspective', 'perspective-origin', { - browsers: browsers, - transition: true - }); - return prefix('transform-style', 'backface-visibility', { - browsers: browsers - }); - }; - })(this)); - this.feature('css-gradients', (function(_this) { - return function(browsers) { - browsers = _this.map(browsers, function(browser, name, version) { - if (name === 'android' && version < 4 || name === 'safari' && version < 5.1 || name === 'ios' && version < 5) { - return browser + ' old'; - } else { - return browser; - } - }); - return prefix('linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient', { - props: ['background', 'background-image', 'border-image'], - mistakes: ['-ms-'], - browsers: browsers - }); - }; - })(this)); - this.feature('css3-boxsizing', (function(_this) { - return function(browsers) { - return prefix('box-sizing', { - browsers: browsers - }); - }; - })(this)); - this.feature('css-filters', (function(_this) { - return function(browsers) { - return prefix('filter', { - browsers: browsers, - transition: true - }); - }; - })(this)); - this.feature('multicolumn', (function(_this) { - return function(browsers) { - prefix('columns', 'column-width', 'column-gap', 'column-rule', 'column-rule-color', 'column-rule-width', { - browsers: browsers, - transition: true - }); - return prefix('column-count', 'column-rule-style', 'column-span', 'column-fill', 'break-before', 'break-after', 'break-inside', { - browsers: browsers - }); - }; - })(this)); - this.feature('user-select-none', (function(_this) { - return function(browsers) { - return prefix('user-select', { - browsers: browsers - }); - }; - })(this)); - this.feature('flexbox', (function(_this) { - return function(browsers) { - browsers = _this.map(browsers, function(browser, name, version) { - if ((name === 'safari' || name === 'ios') && version < 7) { - return browser + ' 2009'; - } else if (name === 'chrome' && version < 21) { - return browser + ' 2009'; - } else { - return browser; - } - }); - prefix('display-flex', 'inline-flex', { - props: ['display'], - browsers: browsers - }); - prefix('flex', 'flex-grow', 'flex-shrink', 'flex-basis', { - transition: true, - browsers: browsers - }); - return prefix('flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content', { - browsers: browsers - }); - }; - })(this)); - this.feature('calc', (function(_this) { - return function(browsers) { - return prefix('calc', { - props: ['*'], - browsers: browsers - }); - }; - })(this)); - this.feature('background-img-opts', (function(_this) { - return function(browsers) { - return prefix('background-clip', 'background-origin', 'background-size', { - browsers: browsers - }); - }; - })(this)); - this.feature('font-feature', (function(_this) { - return function(browsers) { - return prefix('font-feature-settings', 'font-variant-ligatures', 'font-language-override', 'font-kerning', { - browsers: browsers - }); - }; - })(this)); - this.feature('border-image', (function(_this) { - return function(browsers) { - return prefix('border-image', { - browsers: browsers - }); - }; - })(this)); - this.feature('css-selection', (function(_this) { - return function(browsers) { - return prefix('::selection', { - selector: true, - browsers: browsers - }); - }; - })(this)); - this.feature('css-placeholder', (function(_this) { - return function(browsers) { - browsers = _this.map(browsers, function(browser, name, version) { - if (name === 'ff' && version <= 18) { - return browser + ' old'; - } else { - return browser; - } - }); - return prefix('::placeholder', { - selector: true, - browsers: browsers - }); - }; - })(this)); - this.feature('css-hyphens', (function(_this) { - return function(browsers) { - return prefix('hyphens', { - browsers: browsers - }); - }; - })(this)); - this.feature('fullscreen', (function(_this) { - return function(browsers) { - return prefix(':fullscreen', { - selector: true, - browsers: browsers - }); - }; - })(this)); - this.feature('css3-tabsize', (function(_this) { - return function(browsers) { - return prefix('tab-size', { - browsers: browsers - }); - }; - })(this)); - this.feature('intrinsic-width', (function(_this) { - return function(browsers) { - return prefix('max-content', 'min-content', 'fit-content', 'fill-available', { - props: ['width', 'min-width', 'max-width', 'height', 'min-height', 'max-height'], - browsers: browsers - }); - }; - })(this)); - this.feature('css3-cursors-newer', (function(_this) { - return function(browsers) { - return prefix('zoom-in', 'zoom-out', 'grab', 'grabbing', { - props: ['cursor'], - browsers: browsers - }); - }; - })(this)); - this.feature('css-sticky', (function(_this) { - return function(browsers) { - return prefix('sticky', { - props: ['position'], - browsers: browsers - }); - }; - })(this)); - return this.done((function(_this) { - return function() { - return _this.save('prefixes', prefixes); - }; - })(this)); - }; - -}).call(this); diff --git a/node_modules/gulp-autoprefixer/node_modules/bufferstreams/.npmignore b/node_modules/gulp-autoprefixer/node_modules/bufferstreams/.npmignore deleted file mode 100755 index 31f2e87a..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/bufferstreams/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -*~ -*.swp -node_modules/ -.git -tests/results diff --git a/node_modules/gulp-autoprefixer/node_modules/bufferstreams/.travis.yml b/node_modules/gulp-autoprefixer/node_modules/bufferstreams/.travis.yml deleted file mode 100755 index b2178387..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/bufferstreams/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -node_js: - - 0.10 - -before_script: - - npm install --dev - -script: - - npm test diff --git a/node_modules/gulp-autoprefixer/node_modules/bufferstreams/LICENCE b/node_modules/gulp-autoprefixer/node_modules/bufferstreams/LICENCE deleted file mode 100755 index 454ab9d0..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/bufferstreams/LICENCE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2013 Nicolas Froidure, <http://insertafter.com/> - -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/node_modules/gulp-autoprefixer/node_modules/bufferstreams/README.md b/node_modules/gulp-autoprefixer/node_modules/bufferstreams/README.md deleted file mode 100755 index 85fc9bd1..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/bufferstreams/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# BufferStreams [![NPM version](https://badge.fury.io/js/bufferstreams.png)](https://npmjs.org/package/bufferstreams) [![Build Status](https://travis-ci.org/nfroidure/BufferStreams.png?branch=master)](https://travis-ci.org/nfroidure/BufferStreams) - -BufferStreams abstracts streams to allow you to deal with the whole contents in - a single buffer when it becomes necessary (by example: a legacy library that - do not support streams). - -It is not a good practice, just some glue. Using BufferStreams means: -* there is no library dealing with streams for your needs -* you filled an issue to the wrapped library to support streams - -## Usage -Install the [npm module](https://npmjs.org/package/bufferstreams): -```sh -npm install bufferstreams --save -``` -Then, in your scripts: -```js -var BufferStreams = require('bufferstreams'); - -Fs.createReadStream('input.txt') - .pipe(new BufferStreams(function(err, buf, cb) { - - // err will be filled with an error if the piped in stream emits one. - if(err) { - throw err; - } - - // buf will contain the whole piped in stream contents - buf = Buffer(buf.toString(utf-8).repalce('foo', 'bar')); - - // cb is a callback to pass the result back to the piped out stream - // first argument is an error that wil be emitted if one - // the second argument is the modified buffer - cb(null, buf); - - })) - .pipe(Fs.createWriteStream('output.txt')); -``` - -## Contributing -Feel free to pull your code if you agree with publishing it under the MIT license. - diff --git a/node_modules/gulp-autoprefixer/node_modules/bufferstreams/package.json b/node_modules/gulp-autoprefixer/node_modules/bufferstreams/package.json deleted file mode 100755 index fd607d19..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/bufferstreams/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "bufferstreams", - "version": "0.0.1", - "description": "Abstract streams to deal with the whole buffered contents.", - "homepage": "https://github.com/nfroidure/BufferStreams", - "main": "src/index.js", - "scripts": { - "test": "mocha tests/*.mocha.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/nfroidure/BufferStreams" - }, - "keywords": [ - "buffer", - "streaming", - "stream", - "async", - "abstract" - ], - "devDependencies": { - "mocha": "1.x.x", - "event-stream": "1.x.x" - }, - "author": { - "name": "Nicolas Froidure", - "url": "http://www.insertafter.com/blog.html" - }, - "engines": { - "node": ">= 0.10.0" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/nfroidure/BufferStreams/blob/master/LICENSE" - } - ], - "bugs": { - "url": "https://github.com/nfroidure/BufferStreams/issues" - }, - "readme": "# BufferStreams [![NPM version](https://badge.fury.io/js/bufferstreams.png)](https://npmjs.org/package/bufferstreams) [![Build Status](https://travis-ci.org/nfroidure/BufferStreams.png?branch=master)](https://travis-ci.org/nfroidure/BufferStreams)\n\nBufferStreams abstracts streams to allow you to deal with the whole contents in\n a single buffer when it becomes necessary (by example: a legacy library that\n do not support streams).\n\nIt is not a good practice, just some glue. Using BufferStreams means:\n* there is no library dealing with streams for your needs\n* you filled an issue to the wrapped library to support streams\n\n## Usage\nInstall the [npm module](https://npmjs.org/package/bufferstreams):\n```sh\nnpm install bufferstreams --save\n```\nThen, in your scripts:\n```js\nvar BufferStreams = require('bufferstreams');\n\nFs.createReadStream('input.txt')\n .pipe(new BufferStreams(function(err, buf, cb) {\n\n // err will be filled with an error if the piped in stream emits one.\n if(err) {\n throw err;\n }\n\n // buf will contain the whole piped in stream contents\n buf = Buffer(buf.toString(utf-8).repalce('foo', 'bar'));\n\n // cb is a callback to pass the result back to the piped out stream\n // first argument is an error that wil be emitted if one\n // the second argument is the modified buffer\n cb(null, buf);\n\n }))\n .pipe(Fs.createWriteStream('output.txt'));\n```\n\n## Contributing\nFeel free to pull your code if you agree with publishing it under the MIT license.\n\n", - "readmeFilename": "README.md", - "_id": "bufferstreams@0.0.1", - "_from": "bufferstreams@0.0.1" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/bufferstreams/src/index.js b/node_modules/gulp-autoprefixer/node_modules/bufferstreams/src/index.js deleted file mode 100644 index a19a0f96..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/bufferstreams/src/index.js +++ /dev/null @@ -1,45 +0,0 @@ -var PassThrough = require('stream').PassThrough; -var util = require('util'); - -// Inherit of PassThrough stream -util.inherits(BufferStream, PassThrough); - -// Constructor -function BufferStream(cb) { - - // Ensure new were used - if (!(this instanceof BufferStream)) { - throw Error('Please use the "new" operator to instanciate a BufferStream.'); - } - - // Parent constructor - PassThrough.call(this); - - // Keep a reference to the callback - this._cb = cb; - - // Internal buffer - this._buf = Buffer(''); -} - -BufferStream.prototype._transform = function(chunk, encoding, done) { - - this._buf = Buffer.concat([this._buf, chunk], this._buf.length + chunk.length); - - done(); - -}; - -BufferStream.prototype._flush = function(done) { - var _that = this; - - this._cb(null, this._buf, function(err, buf) { - if (buf && buf.length) { - _that.push(buf); - } - done(); - }); - -}; - -module.exports = BufferStream; diff --git a/node_modules/gulp-autoprefixer/node_modules/bufferstreams/tests/index.mocha.js b/node_modules/gulp-autoprefixer/node_modules/bufferstreams/tests/index.mocha.js deleted file mode 100755 index 7b0ccc32..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/bufferstreams/tests/index.mocha.js +++ /dev/null @@ -1,111 +0,0 @@ -var assert = require('assert') - , es = require('event-stream') - , BufferStream = require('../src') -; - -// Helpers -function syncBufferPrefixer(headerText) { - return new BufferStream(function(err, buf, cb) { - assert.equal(err, null); - if(null === buf) { - cb(null, Buffer(headerText)); - } else { - cb(null, Buffer.concat([Buffer(headerText), buf])); - } - }); -} -function asyncBufferPrefixer(headerText) { - return new BufferStream(function(err, buf, cb) { - assert.equal(err, null); - if(null === buf) { - setTimeout(function() { - cb(null, Buffer(headerText)); - }, 0); - } else { - setTimeout(function() { - cb(null, Buffer.concat([Buffer(headerText), buf])); - }, 0); - } - }); -} - -// Tests -describe('Abstract buffers', function() { - describe('synchonously', function() { - - it('should work with one pipe', function(done) { - es.readArray(['te', 'st']) - .pipe(syncBufferPrefixer('plop')) - .pipe(es.wait(function(err, data) { - assert.equal(err, null); - assert.equal(data, 'ploptest'); - done(); - })); - }); - - it('should work when returning a null buffer', function(done) { - - es.readArray(['te', 'st']) - .pipe(new BufferStream(function(err, buf, cb){ - cb(null, null); - })) - .pipe(es.wait(function(err, data) { - assert.equal(err, null); - assert.equal(data, ''); - done(); - })); - }); - - it('should work with multiple pipes', function(done) { - es.readArray(['te', 'st']) - .pipe(syncBufferPrefixer('plop')) - .pipe(syncBufferPrefixer('plip')) - .pipe(syncBufferPrefixer('plap')) - .pipe(es.wait(function(err, data) { - assert.equal(err, null); - assert.equal(data, 'plapplipploptest'); - done(); - })); - }); - - }); - - describe('asynchonously', function() { - - it('should work with one pipe', function(done) { - es.readArray(['te', 'st']) - .pipe(asyncBufferPrefixer('plop')) - .pipe(es.wait(function(err, data) { - assert.equal(err, null); - assert.equal(data, 'ploptest'); - done(); - })); - }); - - it('should work when returning a null buffer', function(done) { - - es.readArray(['te', 'st']) - .pipe(new BufferStream(function(err, buf, cb){ - cb(null, null); - })) - .pipe(es.wait(function(err, data) { - assert.equal(err, null); - assert.equal(data, ''); - done(); - })); - }); - - it('should work with multiple pipes', function(done) { - es.readArray(['te', 'st']) - .pipe(asyncBufferPrefixer('plop')) - .pipe(asyncBufferPrefixer('plip')) - .pipe(asyncBufferPrefixer('plap')) - .pipe(es.wait(function(err, data) { - assert.equal(err, null); - assert.equal(data, 'plapplipploptest'); - done(); - })); - }); - - }); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/.npmignore b/node_modules/gulp-autoprefixer/node_modules/gulp-util/.npmignore deleted file mode 100644 index b5ef13a3..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -.DS_Store -*.log -node_modules -build -*.node -components \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/.travis.yml b/node_modules/gulp-autoprefixer/node_modules/gulp-util/.travis.yml deleted file mode 100644 index 33ad9f8c..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.9" - - "0.10" -after_script: - - npm run coveralls \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/LICENSE b/node_modules/gulp-autoprefixer/node_modules/gulp-util/LICENSE deleted file mode 100755 index 7cbe012c..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2014 Fractal <contact@wearefractal.com> - -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/node_modules/gulp-autoprefixer/node_modules/gulp-util/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/README.md deleted file mode 100644 index fd0e506e..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/README.md +++ /dev/null @@ -1,166 +0,0 @@ -# gulp-util [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/gulpjs/gulp-util.png?theme=shields.io)](https://david-dm.org/gulpjs/gulp-util) - -## Information - -<table> -<tr> -<td>Package</td><td>gulp-util</td> -</tr> -<tr> -<td>Description</td> -<td>Utility functions for gulp plugins</td> -</tr> -<tr> -<td>Node Version</td> -<td>>= 0.9</td> -</tr> -</table> - -## Usage - -```javascript -var gutil = require('gulp-util'); - -gutil.log('stuff happened', 'Really it did', gutil.colors.cyan('123')); -gutil.beep(); - -gutil.replaceExtension('file.coffee', '.js'); // file.js - -var opt = { - name: 'todd', - file: someGulpFile -}; -gutil.template('test <%= name %> <%= file.path %>', opt) // test todd /js/hi.js -``` - -### log(msg...) - -Logs stuff. Already prefixed with [gulp] and all that. Use the right colors for values. If you pass in multiple arguments it will join them by a space. - -``` -values (files, module names, etc.) = magenta -numbers (times, counts, etc) = cyan -``` - -### colors - -This is an instance of [chalk](https://github.com/sindresorhus/chalk) - -### date - -This is an instance of [node-dateformat](https://github.com/felixge/node-dateformat). - -### linefeed - -Just `\n`. Use this. - -### replaceExtension(path, newExtension) - -Replaces a file extension in a path. Returns the new path. - -### isStream(obj) - -Returns true or false if an object is a stream. - -### isBuffer(obj) - -Returns true or false if an object is a Buffer. - -### template(string[, data]) - -This is a lodash.template function wrapper. You must pass in a valid gulp file object so it is available to the user or it will error. You can not configure any of the delimiters. Look at the [lodash docs](http://lodash.com/docs#template) for more info. - -## new File(obj) - -This is just [vinyl](https://github.com/wearefractal/vinyl) - -```javascript -var file = new gutil.File({ - base: join(__dirname, './fixtures/'), - cwd: __dirname, - path: join(__dirname, './fixtures/test.coffee') -}); -``` - -## noop() - -Returns a stream that does nothing but pass data straight through. - -```javascript -gulp.task('scripts', function() { - gulp.src('src/**/*.js') - .pipe(concat('script.js')) - .pipe(gulp.env.production ? uglify() : gutil.noop()) - .pipe(gulp.dest('dist/'); -}); -``` - -## combine(streams...) - -Argument may also be an array of streams. Returns a function that returns the combined stream. Useful for keeping things DRY. This is a simple wrapper around event-stream's `.pipeline` - -```javascript -var scripts = gutil.combine( - coffee({bare: true}), - uglify(), - concat('script.js'), - gulp.dest('dist/') -); - -gulp.task('default', function() { - gulp.src('*.coffee').pipe(scripts()); -}); -``` - -## buffer(cb) - -This is similar to es.wait but instead of buffering text into one string it buffers anything into an array (so very useful for file objects). - -Returns a stream that can be piped to. - -The stream will emit one data event after the stream piped to it has ended. The data will be the same array passed to the callback. - -Callback is optional and receives two arguments: error and data - -```javascript -gulp.src('stuff/*.js') - .pipe(gutil.buffer(function(err, files){ - - }); -``` - -## new PluginError(pluginName, message[, options]) - -- pluginName should be the module name of your plugin -- message can be a string or an existing error -- By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error. -- If you pass an error in as the message the stack will be pulled from that, otherwise one will be created. - -These are all acceptable forms of instantiation: - -```javascript -var err = new gutil.PluginError('test', { - message: 'something broke' -}); - -var err = new gutil.PluginError({ - plugin: 'test', - message: 'something broke' -}); - -var err = new gutil.PluginError('test', 'something broke'); - -var err = new gutil.PluginError('test', 'something broke', {showStack: true}); - -var existingError = new Error('OMG'); -var err = new gutil.PluginError('test', existingError, {showStack: true}); -``` - -[npm-url]: https://npmjs.org/package/gulp-util -[npm-image]: https://badge.fury.io/js/gulp-util.png -[travis-url]: https://travis-ci.org/gulpjs/gulp-util -[travis-image]: https://travis-ci.org/gulpjs/gulp-util.png?branch=master -[coveralls-url]: https://coveralls.io/r/gulpjs/gulp-util -[coveralls-image]: https://coveralls.io/repos/gulpjs/gulp-util/badge.png -[depstat-url]: https://david-dm.org/gulpjs/gulp-util -[depstat-image]: https://david-dm.org/gulpjs/gulp-util.png diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/index.js deleted file mode 100644 index 6746ee4b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/index.js +++ /dev/null @@ -1,18 +0,0 @@ -module.exports = { - File: require('./lib/File'), - replaceExtension: require('./lib/replaceExtension'), - colors: require('./lib/colors'), - date: require('./lib/date'), - log: require('./lib/log'), - template: require('./lib/template'), - env: require('./lib/env'), - beep: require('./lib/beep'), - noop: require('./lib/noop'), - isStream: require('./lib/isStream'), - isBuffer: require('./lib/isBuffer'), - isNull: require('./lib/isNull'), - linefeed: require('./lib/linefeed'), - combine: require('./lib/combine'), - buffer: require('./lib/buffer'), - PluginError: require('./lib/PluginError') -}; \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/File.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/File.js deleted file mode 100644 index 690a508a..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/File.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('vinyl'); \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/PluginError.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/PluginError.js deleted file mode 100644 index 96555672..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/PluginError.js +++ /dev/null @@ -1,65 +0,0 @@ -var util = require('util'); -var colors = require('./colors'); - -// wow what a clusterfuck -var parseOptions = function(plugin, message, opt) { - if (!opt) opt = {}; - if (typeof plugin === 'object') { - opt = plugin; - } else if (message instanceof Error) { - opt.message = message; - opt.plugin = plugin; - } else if (typeof message === 'object') { - opt = message; - opt.plugin = plugin; - } else if (typeof opt === 'object') { - opt.plugin = plugin; - opt.message = message; - } - return opt; -}; - -function PluginError(plugin, message, opt) { - if (!(this instanceof PluginError)) throw new Error('Call PluginError using new'); - - Error.call(this); - - var options = parseOptions(plugin, message, opt); - - this.plugin = options.plugin; - this.showStack = options.showStack; - - // if message is an Error grab crap off it - if (options.message instanceof Error) { - this.name = options.message.name; - this.message = options.message.message; - this.fileName = options.message.fileName; - this.lineNumber = options.message.lineNumber; - this.stack = options.message.stack; - } else { // else check options obj - this.name = options.name; - this.message = options.message; - this.fileName = options.fileName; - this.lineNumber = options.lineNumber; - this.stack = options.stack; - } - - // defaults - if (!this.name) this.name = 'Error'; - - // TODO: figure out why this explodes mocha - if (!this.stack) Error.captureStackTrace(this, arguments.callee || this.constructor); - - if (!this.plugin) throw new Error('Missing plugin name'); - if (!this.message) throw new Error('Missing error message'); -} - -util.inherits(PluginError, Error); - -PluginError.prototype.toString = function () { - var sig = '['+colors.green('gulp')+'] '+this.name+' in plugin \''+colors.cyan(this.plugin)+'\''; - var msg = this.showStack ? (this._stack || this.stack) : this.message; - return sig+': '+msg; -}; - -module.exports = PluginError; \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/beep.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/beep.js deleted file mode 100644 index 5473d754..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/beep.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function() { - process.stdout.write('\x07'); -}; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/buffer.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/buffer.js deleted file mode 100644 index 4cb064ac..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/buffer.js +++ /dev/null @@ -1,15 +0,0 @@ -var through = require('through2'); - -module.exports = function(fn) { - var buf = []; - var end = function(cb) { - this.push(buf); - cb(); - if(fn) fn(null, buf); - }; - var push = function(data, enc, cb) { - buf.push(data); - cb(); - }; - return through.obj(push, end); -}; \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/colors.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/colors.js deleted file mode 100644 index bc804940..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/colors.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('chalk'); \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/combine.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/combine.js deleted file mode 100644 index f20712d2..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/combine.js +++ /dev/null @@ -1,11 +0,0 @@ -var pipeline = require('multipipe'); - -module.exports = function(){ - var args = arguments; - if (args.length === 1 && Array.isArray(args[0])) { - args = args[0]; - } - return function(){ - return pipeline.apply(pipeline, args); - }; -}; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/date.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/date.js deleted file mode 100644 index 935793cc..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/date.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('dateformat'); \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/env.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/env.js deleted file mode 100644 index ea1e03e4..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/env.js +++ /dev/null @@ -1,4 +0,0 @@ -var parseArgs = require('minimist'); -var argv = parseArgs(process.argv.slice(2)); - -module.exports = argv; \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/isBuffer.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/isBuffer.js deleted file mode 100644 index 0e23782c..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/isBuffer.js +++ /dev/null @@ -1,7 +0,0 @@ -var buf = require('buffer'); -var Buffer = buf.Buffer; - -// could use Buffer.isBuffer but this is the same exact thing... -module.exports = function(o) { - return typeof o === 'object' && o instanceof Buffer; -}; \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/isNull.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/isNull.js deleted file mode 100644 index 403bb30e..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/isNull.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function(v) { - return v === null; -}; \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/isStream.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/isStream.js deleted file mode 100644 index 9ce0929b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/isStream.js +++ /dev/null @@ -1,5 +0,0 @@ -var Stream = require('stream').Stream; - -module.exports = function(o) { - return !!o && o instanceof Stream; -}; \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/linefeed.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/linefeed.js deleted file mode 100644 index 5b0dfa4b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/linefeed.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = '\n'; \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/log.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/log.js deleted file mode 100644 index cdbb22fc..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/log.js +++ /dev/null @@ -1,9 +0,0 @@ -var colors = require('./colors'); - -module.exports = function(){ - var sig = '['+colors.green('gulp')+']'; - var args = Array.prototype.slice.call(arguments); - args.unshift(sig); - console.log.apply(console, args); - return this; -}; \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/noop.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/noop.js deleted file mode 100644 index 7862cb16..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/noop.js +++ /dev/null @@ -1,5 +0,0 @@ -var through = require('through2'); - -module.exports = function () { - return through.obj(); -}; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/replaceExtension.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/replaceExtension.js deleted file mode 100644 index 3f76938e..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/replaceExtension.js +++ /dev/null @@ -1,9 +0,0 @@ -var path = require('path'); - -module.exports = function(npath, ext) { - if (typeof npath !== 'string') return npath; - if (npath.length === 0) return npath; - - var nFileName = path.basename(npath, path.extname(npath))+ext; - return path.join(path.dirname(npath), nFileName); -}; \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/template.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/template.js deleted file mode 100644 index c467820f..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/lib/template.js +++ /dev/null @@ -1,19 +0,0 @@ -var template = require('lodash.template'); -var reInterpolate = require('lodash._reinterpolate'); - -var forcedSettings = { - escape: /<%-([\s\S]+?)%>/g, - evaluate: /<%([\s\S]+?)%>/g, - interpolate: reInterpolate -}; - -module.exports = function(tmpl, data){ - var fn = template(tmpl, null, forcedSettings); - - var wrapped = function(o) { - if (typeof o === 'undefined' || typeof o.file === 'undefined') throw new Error('Failed to provide the current file as "file" to the template'); - return fn(o); - }; - - return (data ? wrapped(data) : wrapped); -}; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/index.js deleted file mode 100644 index a21f7022..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/index.js +++ /dev/null @@ -1,63 +0,0 @@ -'use strict'; -var ansi = require('ansi-styles'); -var stripAnsi = require('strip-ansi'); -var hasColor = require('has-color'); -var defineProps = Object.defineProperties; -var chalk = module.exports; - -var styles = (function () { - var ret = {}; - - ansi.grey = ansi.gray; - - Object.keys(ansi).forEach(function (key) { - ret[key] = { - get: function () { - this._styles.push(key); - return this; - } - }; - }); - - return ret; -})(); - -function init() { - var ret = {}; - - Object.keys(styles).forEach(function (name) { - ret[name] = { - get: function () { - var obj = defineProps(function self() { - var str = [].slice.call(arguments).join(' '); - - if (!chalk.enabled) { - return str; - } - - return self._styles.reduce(function (str, name) { - var code = ansi[name]; - return str ? code.open + str + code.close : ''; - }, str); - }, styles); - - obj._styles = []; - - return obj[name]; - } - } - }); - - return ret; -} - -defineProps(chalk, init()); - -chalk.styles = ansi; -chalk.stripColor = stripAnsi; -chalk.supportsColor = hasColor; - -// detect mode if not set manually -if (chalk.enabled === undefined) { - chalk.enabled = chalk.supportsColor; -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/strip-ansi b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/strip-ansi deleted file mode 120000 index b65c9f81..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/strip-ansi +++ /dev/null @@ -1 +0,0 @@ -../strip-ansi/cli.js \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js deleted file mode 100644 index 3da548c4..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; -var styles = module.exports; - -var codes = { - reset: [0, 0], - - bold: [1, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - strikethrough: [9, 29], - - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39], - - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49] -}; - -Object.keys(codes).forEach(function (key) { - var val = codes[key]; - var style = styles[key] = {}; - style.open = '\x1b[' + val[0] + 'm'; - style.close = '\x1b[' + val[1] + 'm'; -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/package.json deleted file mode 100644 index 2d61dabe..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "ansi-styles", - "version": "1.0.0", - "description": "ANSI escape codes for colorizing strings in the terminal", - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "homepage": "https://github.com/sindresorhus/ansi-styles", - "bugs": { - "url": "https://github.com/sindresorhus/ansi-styles/issues" - }, - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "ansi-styles.js" - ], - "main": "ansi-styles", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/ansi-styles.git" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "readme": "# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles)\n\n> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for colorizing strings in the terminal.\n\nYou probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings.\n\n![screenshot](screenshot.png)\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles`\n\n\n## Example\n\n```js\nvar ansi = require('ansi-styles');\n\nconsole.log(ansi.green.open + 'Hello world!' + ansi.green.close);\n```\n\n## API\n\nEach style has an `open` and `close` property.\n\n\n## Styles\n\n### General\n\n- reset\n- bold\n- italic\n- underline\n- inverse\n- strikethrough\n\n### Text colors\n\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n\n### Background colors\n\n- bgBlack\n- bgRed\n- bgGreen\n- bgYellow\n- bgBlue\n- bgMagenta\n- bgCyan\n- bgWhite\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "_id": "ansi-styles@1.0.0", - "_from": "ansi-styles@~1.0.0" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/readme.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/readme.md deleted file mode 100644 index 4ac8cbd0..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,65 +0,0 @@ -# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles) - -> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for colorizing strings in the terminal. - -You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings. - -![screenshot](screenshot.png) - - -## Install - -Install with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles` - - -## Example - -```js -var ansi = require('ansi-styles'); - -console.log(ansi.green.open + 'Hello world!' + ansi.green.close); -``` - -## API - -Each style has an `open` and `close` property. - - -## Styles - -### General - -- reset -- bold -- italic -- underline -- inverse -- strikethrough - -### Text colors - -- black -- red -- green -- yellow -- blue -- magenta -- cyan -- white -- gray - -### Background colors - -- bgBlack -- bgRed -- bgGreen -- bgYellow -- bgBlue -- bgMagenta -- bgCyan -- bgWhite - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/has-color.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/has-color.js deleted file mode 100644 index 27316b1f..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/has-color.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; -module.exports = (function () { - if (process.argv.indexOf('--no-color') !== -1) { - return false; - } - - if (process.argv.indexOf('--color') !== -1) { - return true; - } - - if (!process.stdout.isTTY) { - return false; - } - - if (process.platform === 'win32') { - return true; - } - - if ('COLORTERM' in process.env) { - return true; - } - - return /^screen|^xterm|color|ansi|cygwin|linux/i.test(process.env.TERM); -})(); diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/package.json deleted file mode 100644 index e55a6244..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "has-color", - "version": "0.1.4", - "description": "Detect whether a terminal supports color", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "capability", - "detect" - ], - "homepage": "https://github.com/sindresorhus/has-color", - "bugs": { - "url": "https://github.com/sindresorhus/has-color/issues" - }, - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "has-color.js" - ], - "main": "has-color", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/has-color.git" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "readme": "# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color)\n\n> Detect whether a terminal supports color.\n\nUsed in the terminal color module [chalk](https://github.com/sindresorhus/chalk).\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/has-color): `npm install --save has-color`\n\n\n## Example\n\n```js\nvar hasColor = require('has-color');\n\nif (hasColor) {\n\tconsole.log('Terminal supports color.');\n}\n```\n\nIt obeys the CLI flags `--color` and `--no-color`.\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "_id": "has-color@0.1.4", - "_from": "has-color@~0.1.0" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/readme.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/readme.md deleted file mode 100644 index 0918c851..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color) - -> Detect whether a terminal supports color. - -Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). - - -## Install - -Install with [npm](https://npmjs.org/package/has-color): `npm install --save has-color` - - -## Example - -```js -var hasColor = require('has-color'); - -if (hasColor) { - console.log('Terminal supports color.'); -} -``` - -It obeys the CLI flags `--color` and `--no-color`. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/cli.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/cli.js deleted file mode 100755 index f8019cda..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/cli.js +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env node -'use strict'; -var fs = require('fs'); -var strip = require('./index'); -var input = process.argv[2]; - -if (process.argv.indexOf('-h') !== -1 || process.argv.indexOf('--help') !== -1) { - console.log('strip-ansi <input file> > <output file>'); - console.log('or'); - console.log('cat <input file> | strip-ansi > <output file>'); - return; -} - -if (process.argv.indexOf('-v') !== -1 || process.argv.indexOf('--version') !== -1) { - console.log(require('./package').version); - return; -} - -if (input) { - process.stdout.write(strip(fs.readFileSync(input, 'utf8'))); - return; -} - -process.stdin.setEncoding('utf8'); -process.stdin.on('data', function (data) { - process.stdout.write(strip(data)); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/index.js deleted file mode 100644 index 62320c59..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -module.exports = function (str) { - return typeof str === 'string' ? str.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, '') : str; -}; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/package.json deleted file mode 100644 index 7ca2b5d1..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "strip-ansi", - "version": "0.1.1", - "description": "Strip ANSI escape codes (used for colorizing strings in the terminal)", - "license": "MIT", - "bin": { - "strip-ansi": "cli.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/strip-ansi" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.8.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js", - "cli.js" - ], - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "devDependencies": { - "mocha": "~1.x" - }, - "readme": "# strip-ansi [![Build Status](https://secure.travis-ci.org/sindresorhus/strip-ansi.png?branch=master)](http://travis-ci.org/sindresorhus/strip-ansi)\n\n> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) (used for colorizing strings in the terminal)\n\nUsed in the terminal color module [chalk](https://github.com/sindresorhus/chalk).\n\n\n## Install\n\nInstall locally with [npm](https://npmjs.org/package/strip-ansi):\n\n```\nnpm install --save strip-ansi\n```\n\nOr globally if you want to use it as a CLI app:\n\n```\nnpm install --global strip-ansi\n```\n\nYou can then use it in your Terminal like:\n\n```\nstrip-ansi file-with-color-codes\n```\n\nOr pipe something to it:\n\n```\nls | strip-ansi\n```\n\n\n## Example\n\n```js\nvar stripAnsi = require('strip-ansi');\nstripAnsi('\\x1b[4mcake\\x1b[0m');\n//=> cake\n```\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "bugs": { - "url": "https://github.com/sindresorhus/strip-ansi/issues" - }, - "homepage": "https://github.com/sindresorhus/strip-ansi", - "_id": "strip-ansi@0.1.1", - "_from": "strip-ansi@~0.1.0" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/readme.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/readme.md deleted file mode 100644 index eb661b3d..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/readme.md +++ /dev/null @@ -1,46 +0,0 @@ -# strip-ansi [![Build Status](https://secure.travis-ci.org/sindresorhus/strip-ansi.png?branch=master)](http://travis-ci.org/sindresorhus/strip-ansi) - -> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) (used for colorizing strings in the terminal) - -Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). - - -## Install - -Install locally with [npm](https://npmjs.org/package/strip-ansi): - -``` -npm install --save strip-ansi -``` - -Or globally if you want to use it as a CLI app: - -``` -npm install --global strip-ansi -``` - -You can then use it in your Terminal like: - -``` -strip-ansi file-with-color-codes -``` - -Or pipe something to it: - -``` -ls | strip-ansi -``` - - -## Example - -```js -var stripAnsi = require('strip-ansi'); -stripAnsi('\x1b[4mcake\x1b[0m'); -//=> cake -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/package.json deleted file mode 100644 index 853b0144..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "chalk", - "version": "0.4.0", - "description": "Terminal string styling done right. Created because the `colors` module does some really horrible things.", - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/chalk" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.8.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js" - ], - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "ansi", - "styles", - "tty", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "has-color": "~0.1.0", - "ansi-styles": "~1.0.0", - "strip-ansi": "~0.1.0" - }, - "devDependencies": { - "mocha": "~1.x" - }, - "readme": "# <img width=\"250\" src=\"logo.png\" alt=\"chalk\">\n\n> Terminal string styling done right\n\n[![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk)\n\n[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough.\n\n**Chalk is a clean and focused alternative.**\n\n![screenshot](screenshot.png)\n\n\n## Why\n\n- **Doesn't extend String.prototype**\n- Expressive API\n- Clean and focused\n- Auto-detects color support\n- Actively maintained\n- [Used by 150+ modules](https://npmjs.org/browse/depended/chalk)\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/chalk): `npm install --save chalk`\n\n\n## Example\n\nChalk comes with an easy to use composable API where you just chain and nest the styles you want.\n\n```js\nvar chalk = require('chalk');\n\n// style a string\nconsole.log( chalk.blue('Hello world!') );\n\n// combine styled and normal strings\nconsole.log( chalk.blue('Hello'), 'World' + chalk.red('!') );\n\n// compose multiple styles using the chainable API\nconsole.log( chalk.blue.bgRed.bold('Hello world!') );\n\n// nest styles\nconsole.log( chalk.red('Hello', chalk.underline.bgBlue('world') + '!') );\n\n// pass in multiple arguments\nconsole.log( chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz') );\n```\n\nYou can easily define your own themes.\n\n```js\nvar chalk = require('chalk');\nvar error = chalk.bold.red;\nconsole.log(error('Error!'));\n```\n\n\n## API\n\n### chalk.`<style>[.<style>...](string, [string...])`\n\nExample: `chalk.red.bold.underline('Hello', 'world');`\n\nChain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter.\n\nMultiple arguments will be separated by space.\n\n### chalk.enabled\n\nColor support is automatically detected, but you can override it.\n\n### chalk.supportsColor\n\nDetect whether the terminal [supports color](https://github.com/sindresorhus/has-color).\n\nCan be overridden by the user with the flags `--color` and `--no-color`.\n\nUsed internally and handled for you, but exposed for convenience.\n\n### chalk.styles\n\nExposes the styles as [ANSI escape codes](https://github.com/sindresorhus/ansi-styles).\n\nGenerally not useful, but you might need just the `.open` or `.close` escape code if you're mixing externally styled strings with yours.\n\n```js\nvar chalk = require('chalk');\n\nconsole.log(chalk.styles.red);\n//=> {open: '\\x1b[31m', close: '\\x1b[39m'}\n\nconsole.log(chalk.styles.red.open + 'Hello' + chalk.styles.red.close);\n```\n\n### chalk.stripColor(string)\n\n[Strip color](https://github.com/sindresorhus/strip-ansi) from a string.\n\nCan be useful in combination with `.supportsColor` to strip color on externally styled text when it's not supported.\n\nExample:\n\n```js\nvar chalk = require('chalk');\nvar styledString = fromExternal();\n\nif (!chalk.supportsColor) {\n\tchalk.stripColor(styledString);\n}\n```\n\n\n## Styles\n\n### General\n\n- reset\n- bold\n- italic\n- underline\n- inverse\n- strikethrough\n\n### Text colors\n\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n\n### Background colors\n\n- bgBlack\n- bgRed\n- bgGreen\n- bgYellow\n- bgBlue\n- bgMagenta\n- bgCyan\n- bgWhite\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n\n\n-\n\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/sindresorhus/chalk/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n", - "readmeFilename": "readme.md", - "bugs": { - "url": "https://github.com/sindresorhus/chalk/issues" - }, - "homepage": "https://github.com/sindresorhus/chalk", - "_id": "chalk@0.4.0", - "_from": "chalk@~0.4.0" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/readme.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/readme.md deleted file mode 100644 index 46813acf..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/readme.md +++ /dev/null @@ -1,158 +0,0 @@ -# <img width="250" src="logo.png" alt="chalk"> - -> Terminal string styling done right - -[![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk) - -[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough. - -**Chalk is a clean and focused alternative.** - -![screenshot](screenshot.png) - - -## Why - -- **Doesn't extend String.prototype** -- Expressive API -- Clean and focused -- Auto-detects color support -- Actively maintained -- [Used by 150+ modules](https://npmjs.org/browse/depended/chalk) - - -## Install - -Install with [npm](https://npmjs.org/package/chalk): `npm install --save chalk` - - -## Example - -Chalk comes with an easy to use composable API where you just chain and nest the styles you want. - -```js -var chalk = require('chalk'); - -// style a string -console.log( chalk.blue('Hello world!') ); - -// combine styled and normal strings -console.log( chalk.blue('Hello'), 'World' + chalk.red('!') ); - -// compose multiple styles using the chainable API -console.log( chalk.blue.bgRed.bold('Hello world!') ); - -// nest styles -console.log( chalk.red('Hello', chalk.underline.bgBlue('world') + '!') ); - -// pass in multiple arguments -console.log( chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz') ); -``` - -You can easily define your own themes. - -```js -var chalk = require('chalk'); -var error = chalk.bold.red; -console.log(error('Error!')); -``` - - -## API - -### chalk.`<style>[.<style>...](string, [string...])` - -Example: `chalk.red.bold.underline('Hello', 'world');` - -Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter. - -Multiple arguments will be separated by space. - -### chalk.enabled - -Color support is automatically detected, but you can override it. - -### chalk.supportsColor - -Detect whether the terminal [supports color](https://github.com/sindresorhus/has-color). - -Can be overridden by the user with the flags `--color` and `--no-color`. - -Used internally and handled for you, but exposed for convenience. - -### chalk.styles - -Exposes the styles as [ANSI escape codes](https://github.com/sindresorhus/ansi-styles). - -Generally not useful, but you might need just the `.open` or `.close` escape code if you're mixing externally styled strings with yours. - -```js -var chalk = require('chalk'); - -console.log(chalk.styles.red); -//=> {open: '\x1b[31m', close: '\x1b[39m'} - -console.log(chalk.styles.red.open + 'Hello' + chalk.styles.red.close); -``` - -### chalk.stripColor(string) - -[Strip color](https://github.com/sindresorhus/strip-ansi) from a string. - -Can be useful in combination with `.supportsColor` to strip color on externally styled text when it's not supported. - -Example: - -```js -var chalk = require('chalk'); -var styledString = fromExternal(); - -if (!chalk.supportsColor) { - chalk.stripColor(styledString); -} -``` - - -## Styles - -### General - -- reset -- bold -- italic -- underline -- inverse -- strikethrough - -### Text colors - -- black -- red -- green -- yellow -- blue -- magenta -- cyan -- white -- gray - -### Background colors - -- bgBlack -- bgRed -- bgGreen -- bgYellow -- bgBlue -- bgMagenta -- bgCyan -- bgWhite - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) - - -- - -[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/sindresorhus/chalk/trend.png)](https://bitdeli.com/free "Bitdeli Badge") diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/dateformat/LICENSE b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/dateformat/LICENSE deleted file mode 100644 index 57d44e2a..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/dateformat/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -(c) 2007-2009 Steven Levithan <stevenlevithan.com> - -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/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/dateformat/Readme.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/dateformat/Readme.md deleted file mode 100644 index 12f9872d..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/dateformat/Readme.md +++ /dev/null @@ -1,79 +0,0 @@ -# dateformat - -A node.js package for Steven Levithan's excellent [dateFormat()][dateformat] function. - -## Modifications - -* Removed the `Date.prototype.format` method. Sorry folks, but extending native prototypes is for suckers. -* Added a `module.exports = dateFormat;` statement at the bottom -* Added the placeholder `N` to get the ISO 8601 numeric representation of the day of the week - -## Installation - -```bash -$ npm install dateformat -``` - -## Usage - -As taken from Steven's post, modified to match the Modifications listed above: -```js - var dateFormat = require('dateformat'); - var now = new Date(); - - // Basic usage - dateFormat(now, "dddd, mmmm dS, yyyy, h:MM:ss TT"); - // Saturday, June 9th, 2007, 5:46:21 PM - - // You can use one of several named masks - dateFormat(now, "isoDateTime"); - // 2007-06-09T17:46:21 - - // ...Or add your own - dateFormat.masks.hammerTime = 'HH:MM! "Can\'t touch this!"'; - dateFormat(now, "hammerTime"); - // 17:46! Can't touch this! - - // When using the standalone dateFormat function, - // you can also provide the date as a string - dateFormat("Jun 9 2007", "fullDate"); - // Saturday, June 9, 2007 - - // Note that if you don't include the mask argument, - // dateFormat.masks.default is used - dateFormat(now); - // Sat Jun 09 2007 17:46:21 - - // And if you don't include the date argument, - // the current date and time is used - dateFormat(); - // Sat Jun 09 2007 17:46:22 - - // You can also skip the date argument (as long as your mask doesn't - // contain any numbers), in which case the current date/time is used - dateFormat("longTime"); - // 5:46:22 PM EST - - // And finally, you can convert local time to UTC time. Simply pass in - // true as an additional argument (no argument skipping allowed in this case): - dateFormat(now, "longTime", true); - // 10:46:21 PM UTC - - // ...Or add the prefix "UTC:" or "GMT:" to your mask. - dateFormat(now, "UTC:h:MM:ss TT Z"); - // 10:46:21 PM UTC - - // You can also get the ISO 8601 week of the year: - dateFormat(now, "W"); - // 42 - - // and also get the ISO 8601 numeric representation of the day of the week: - dateFormat(now,"N"); - // 6 -``` -## License - -(c) 2007-2009 Steven Levithan [stevenlevithan.com][stevenlevithan], MIT license. - -[dateformat]: http://blog.stevenlevithan.com/archives/date-time-format -[stevenlevithan]: http://stevenlevithan.com/ diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/dateformat/lib/dateformat.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/dateformat/lib/dateformat.js deleted file mode 100644 index e1c38245..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/dateformat/lib/dateformat.js +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Date Format 1.2.3 - * (c) 2007-2009 Steven Levithan <stevenlevithan.com> - * MIT license - * - * Includes enhancements by Scott Trenda <scott.trenda.net> - * and Kris Kowal <cixar.com/~kris.kowal/> - * - * Accepts a date, a mask, or a date and a mask. - * Returns a formatted version of the given date. - * The date defaults to the current date/time. - * The mask defaults to dateFormat.masks.default. - */ - -var dateFormat = function () { - var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|"[^"]*"|'[^']*'/g, - timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g, - timezoneClip = /[^-+\dA-Z]/g, - pad = function (val, len) { - val = String(val); - len = len || 2; - while (val.length < len) val = "0" + val; - return val; - }, - /** - * Get the ISO 8601 week number - * Based on comments from - * http://techblog.procurios.nl/k/n618/news/view/33796/14863/Calculate-ISO-8601-week-and-year-in-javascript.html - */ - getWeek = function (date) { - // Remove time components of date - var targetThursday = new Date(date.getFullYear(), date.getMonth(), date.getDate()); - - // Change date to Thursday same week - targetThursday.setDate(targetThursday.getDate() - ((targetThursday.getDay() + 6) % 7) + 3); - - // Take January 4th as it is always in week 1 (see ISO 8601) - var firstThursday = new Date(targetThursday.getFullYear(), 0, 4); - - // Change date to Thursday same week - firstThursday.setDate(firstThursday.getDate() - ((firstThursday.getDay() + 6) % 7) + 3); - - // Check if daylight-saving-time-switch occured and correct for it - var ds = targetThursday.getTimezoneOffset() - firstThursday.getTimezoneOffset(); - targetThursday.setHours(targetThursday.getHours() - ds); - - // Number of weeks between target Thursday and first Thursday - var weekDiff = (targetThursday - firstThursday) / (86400000*7); - return 1 + weekDiff; - }, - - /** - * Get ISO-8601 numeric representation of the day of the week - * 1 (for Monday) through 7 (for Sunday) - */ - - getDayOfWeek = function(date){ - var dow = date.getDay(); - if(dow === 0) dow = 7; - return dow; - }; - - // Regexes and supporting functions are cached through closure - return function (date, mask, utc, gmt) { - var dF = dateFormat; - - // You can't provide utc if you skip other args (use the "UTC:" mask prefix) - if (arguments.length == 1 && Object.prototype.toString.call(date) == "[object String]" && !/\d/.test(date)) { - mask = date; - date = undefined; - } - - date = date || new Date; - - if(!(date instanceof Date)) { - date = new Date(date); - } - - if (isNaN(date)) { - throw TypeError("Invalid date"); - } - - mask = String(dF.masks[mask] || mask || dF.masks["default"]); - - // Allow setting the utc/gmt argument via the mask - var maskSlice = mask.slice(0, 4); - if (maskSlice == "UTC:" || maskSlice == "GMT:") { - mask = mask.slice(4); - utc = true; - if (maskSlice == "GMT:") { - gmt = true; - } - } - - var _ = utc ? "getUTC" : "get", - d = date[_ + "Date"](), - D = date[_ + "Day"](), - m = date[_ + "Month"](), - y = date[_ + "FullYear"](), - H = date[_ + "Hours"](), - M = date[_ + "Minutes"](), - s = date[_ + "Seconds"](), - L = date[_ + "Milliseconds"](), - o = utc ? 0 : date.getTimezoneOffset(), - W = getWeek(date), - N = getDayOfWeek(date), - flags = { - d: d, - dd: pad(d), - ddd: dF.i18n.dayNames[D], - dddd: dF.i18n.dayNames[D + 7], - m: m + 1, - mm: pad(m + 1), - mmm: dF.i18n.monthNames[m], - mmmm: dF.i18n.monthNames[m + 12], - yy: String(y).slice(2), - yyyy: y, - h: H % 12 || 12, - hh: pad(H % 12 || 12), - H: H, - HH: pad(H), - M: M, - MM: pad(M), - s: s, - ss: pad(s), - l: pad(L, 3), - L: pad(L > 99 ? Math.round(L / 10) : L), - t: H < 12 ? "a" : "p", - tt: H < 12 ? "am" : "pm", - T: H < 12 ? "A" : "P", - TT: H < 12 ? "AM" : "PM", - Z: gmt ? "GMT" : utc ? "UTC" : (String(date).match(timezone) || [""]).pop().replace(timezoneClip, ""), - o: (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4), - S: ["th", "st", "nd", "rd"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10], - W: W, - N: N - }; - - return mask.replace(token, function ($0) { - return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1); - }); - }; -}(); - -// Some common format strings -dateFormat.masks = { - "default": "ddd mmm dd yyyy HH:MM:ss", - shortDate: "m/d/yy", - mediumDate: "mmm d, yyyy", - longDate: "mmmm d, yyyy", - fullDate: "dddd, mmmm d, yyyy", - shortTime: "h:MM TT", - mediumTime: "h:MM:ss TT", - longTime: "h:MM:ss TT Z", - isoDate: "yyyy-mm-dd", - isoTime: "HH:MM:ss", - isoDateTime: "yyyy-mm-dd'T'HH:MM:ss", - isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'", - expiresHeaderFormat: "ddd, dd mmm yyyy HH:MM:ss Z" -}; - -// Internationalization strings -dateFormat.i18n = { - dayNames: [ - "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", - "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" - ], - monthNames: [ - "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", - "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" - ] -}; - -/* -// For convenience... -Date.prototype.format = function (mask, utc) { - return dateFormat(this, mask, utc); -}; -*/ - -if (typeof exports !== "undefined") { - module.exports = dateFormat; -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/dateformat/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/dateformat/package.json deleted file mode 100644 index deee5fee..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/dateformat/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "dateformat", - "description": "A node.js package for Steven Levithan's excellent dateFormat() function.", - "maintainers": "Felix Geisendörfer <felix@debuggable.com>", - "homepage": "https://github.com/felixge/node-dateformat", - "author": { - "name": "Steven Levithan" - }, - "contributors": [ - { - "name": "Steven Levithan" - }, - { - "name": "Felix Geisendörfer", - "email": "felix@debuggable.com" - }, - { - "name": "Christoph Tavan", - "email": "dev@tavan.de" - } - ], - "version": "1.0.7-1.2.3", - "main": "./lib/dateformat", - "dependencies": {}, - "devDependencies": {}, - "engines": { - "node": "*" - }, - "repository": { - "type": "git", - "url": "https://github.com/felixge/node-dateformat.git" - }, - "readme": "# dateformat\n\nA node.js package for Steven Levithan's excellent [dateFormat()][dateformat] function.\n\n## Modifications\n\n* Removed the `Date.prototype.format` method. Sorry folks, but extending native prototypes is for suckers.\n* Added a `module.exports = dateFormat;` statement at the bottom\n* Added the placeholder `N` to get the ISO 8601 numeric representation of the day of the week\n\n## Installation\n\n```bash\n$ npm install dateformat\n```\n\n## Usage\n\nAs taken from Steven's post, modified to match the Modifications listed above:\n```js\n var dateFormat = require('dateformat');\n var now = new Date();\n\n // Basic usage\n dateFormat(now, \"dddd, mmmm dS, yyyy, h:MM:ss TT\");\n // Saturday, June 9th, 2007, 5:46:21 PM\n\n // You can use one of several named masks\n dateFormat(now, \"isoDateTime\");\n // 2007-06-09T17:46:21\n\n // ...Or add your own\n dateFormat.masks.hammerTime = 'HH:MM! \"Can\\'t touch this!\"';\n dateFormat(now, \"hammerTime\");\n // 17:46! Can't touch this!\n\n // When using the standalone dateFormat function,\n // you can also provide the date as a string\n dateFormat(\"Jun 9 2007\", \"fullDate\");\n // Saturday, June 9, 2007\n\n // Note that if you don't include the mask argument,\n // dateFormat.masks.default is used\n dateFormat(now);\n // Sat Jun 09 2007 17:46:21\n\n // And if you don't include the date argument,\n // the current date and time is used\n dateFormat();\n // Sat Jun 09 2007 17:46:22\n\n // You can also skip the date argument (as long as your mask doesn't\n // contain any numbers), in which case the current date/time is used\n dateFormat(\"longTime\");\n // 5:46:22 PM EST\n\n // And finally, you can convert local time to UTC time. Simply pass in\n // true as an additional argument (no argument skipping allowed in this case):\n dateFormat(now, \"longTime\", true);\n // 10:46:21 PM UTC\n\n // ...Or add the prefix \"UTC:\" or \"GMT:\" to your mask.\n dateFormat(now, \"UTC:h:MM:ss TT Z\");\n // 10:46:21 PM UTC\n\n // You can also get the ISO 8601 week of the year:\n dateFormat(now, \"W\");\n // 42\n\n // and also get the ISO 8601 numeric representation of the day of the week:\n dateFormat(now,\"N\");\n // 6\n```\n## License\n\n(c) 2007-2009 Steven Levithan [stevenlevithan.com][stevenlevithan], MIT license.\n\n[dateformat]: http://blog.stevenlevithan.com/archives/date-time-format\n[stevenlevithan]: http://stevenlevithan.com/\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/felixge/node-dateformat/issues" - }, - "_id": "dateformat@1.0.7-1.2.3", - "_from": "dateformat@~1.0.7-1.2.3" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/dateformat/test/basic.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/dateformat/test/basic.js deleted file mode 100644 index 9602a72a..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/dateformat/test/basic.js +++ /dev/null @@ -1,45 +0,0 @@ -var dateFormat = require('./lib/dateformat.js'); -var now = new Date(); - -// Basic usage -console.log(dateFormat(now, "dddd, mmmm dS, yyyy, h:MM:ss TT")); -// Saturday, June 9th, 2007, 5:46:21 PM - -// You can use one of several named masks -console.log(dateFormat(now, "isoDateTime")); -// 2007-06-09T17:46:21 - -// ...Or add your own -dateFormat.masks.hammerTime = 'HH:MM! "Can\'t touch this!"'; -console.log(dateFormat(now, "hammerTime")); -// 17:46! Can't touch this! - -// When using the standalone dateFormat function, -// you can also provide the date as a string -console.log(dateFormat("Jun 9 2007", "fullDate")); -// Saturday, June 9, 2007 - -// Note that if you don't include the mask argument, -// dateFormat.masks.default is used -console.log(dateFormat(now)); -// Sat Jun 09 2007 17:46:21 - -// And if you don't include the date argument, -// the current date and time is used -console.log(dateFormat()); -// Sat Jun 09 2007 17:46:22 - -// You can also skip the date argument (as long as your mask doesn't -// contain any numbers), in which case the current date/time is used -console.log(dateFormat("longTime")); -// 5:46:22 PM EST - -// And finally, you can convert local time to UTC time. Simply pass in -// true as an additional argument (no argument skipping allowed in this case): -console.log(dateFormat(now, "longTime", true)); -// 10:46:21 PM UTC - -// ...Or add the prefix "UTC:" to your mask. -console.log(dateFormat(now, "UTC:h:MM:ss TT Z")); -// 10:46:21 PM UTC - diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/dateformat/test/test_dayofweek.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/dateformat/test/test_dayofweek.js deleted file mode 100644 index 07780fa8..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/dateformat/test/test_dayofweek.js +++ /dev/null @@ -1,10 +0,0 @@ -var dateFormat = require('./../lib/dateformat'), - assert = require('assert'); - -var start = 10; // the 10 of March 2013 is a Sunday -for(var dow = 1; dow <= 7; dow++){ - var date = new Date('2013-03-' + (start + dow)); - var N = dateFormat(date,'N'); - assert.equal(N,dow); - console.log('The ISO-8601 numeric representation of the day "' + date.toString() + '" is ' + N); -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/dateformat/test/test_weekofyear.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/dateformat/test/test_weekofyear.js deleted file mode 100644 index d1ddbe81..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/dateformat/test/test_weekofyear.js +++ /dev/null @@ -1,4 +0,0 @@ -var dateFormat = require('../lib/dateformat.js'); - -var val = process.argv[2] || new Date(); -console.log(dateFormat(val, 'W')); diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/dateformat/test/test_weekofyear.sh b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/dateformat/test/test_weekofyear.sh deleted file mode 100644 index 3c3e69b3..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/dateformat/test/test_weekofyear.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -# this just takes php's date() function as a reference to check if week of year -# is calculated correctly in the range from 1970 .. 2038 by brute force... - -SEQ="seq" -SYSTEM=`uname` -if [ "$SYSTEM" = "Darwin" ]; then - SEQ="jot" -fi - -for YEAR in {1970..2038}; do - for MONTH in {1..12}; do - DAYS=$(cal $MONTH $YEAR | egrep "28|29|30|31" |tail -1 |awk '{print $NF}') - for DAY in $( $SEQ $DAYS ); do - DATE=$YEAR-$MONTH-$DAY - echo -n $DATE ... - NODEVAL=$(node test_weekofyear.js $DATE) - PHPVAL=$(php -r "echo intval(date('W', strtotime('$DATE')));") - if [ "$NODEVAL" -ne "$PHPVAL" ]; then - echo "MISMATCH: node: $NODEVAL vs php: $PHPVAL for date $DATE" - else - echo " OK" - fi - done - done -done diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash._reinterpolate/LICENSE.txt b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash._reinterpolate/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash._reinterpolate/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash._reinterpolate/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash._reinterpolate/README.md deleted file mode 100644 index d362e36d..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash._reinterpolate/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._reinterpolate v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `reInterpolate` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash._reinterpolate/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash._reinterpolate/index.js deleted file mode 100644 index 0bf92a5c..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash._reinterpolate/index.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** Used to match "interpolate" template delimiters */ -var reInterpolate = /<%=([\s\S]+?)%>/g; - -module.exports = reInterpolate; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash._reinterpolate/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash._reinterpolate/package.json deleted file mode 100644 index 85f64e7b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash._reinterpolate/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "lodash._reinterpolate", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `reInterpolate` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._reinterpolate v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `reInterpolate` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._reinterpolate@2.4.1", - "_from": "lodash._reinterpolate@~2.4.1" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/LICENSE.txt b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/README.md deleted file mode 100644 index e89bd0db..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.template v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.template`](http://lodash.com/docs#template) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/index.js deleted file mode 100644 index 230f8ee8..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/index.js +++ /dev/null @@ -1,216 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var defaults = require('lodash.defaults'), - escape = require('lodash.escape'), - escapeStringChar = require('lodash._escapestringchar'), - keys = require('lodash.keys'), - reInterpolate = require('lodash._reinterpolate'), - templateSettings = require('lodash.templatesettings'), - values = require('lodash.values'); - -/** Used to match empty string literals in compiled template source */ -var reEmptyStringLeading = /\b__p \+= '';/g, - reEmptyStringMiddle = /\b(__p \+=) '' \+/g, - reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; - -/** - * Used to match ES6 template delimiters - * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-literals-string-literals - */ -var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; - -/** Used to ensure capturing order of template delimiters */ -var reNoMatch = /($^)/; - -/** Used to match unescaped characters in compiled string literals */ -var reUnescapedString = /['\n\r\t\u2028\u2029\\]/g; - -/** - * A micro-templating method that handles arbitrary delimiters, preserves - * whitespace, and correctly escapes quotes within interpolated code. - * - * Note: In the development build, `_.template` utilizes sourceURLs for easier - * debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl - * - * For more information on precompiling templates see: - * http://lodash.com/custom-builds - * - * For more information on Chrome extension sandboxes see: - * http://developer.chrome.com/stable/extensions/sandboxingEval.html - * - * @static - * @memberOf _ - * @category Utilities - * @param {string} text The template text. - * @param {Object} data The data object used to populate the text. - * @param {Object} [options] The options object. - * @param {RegExp} [options.escape] The "escape" delimiter. - * @param {RegExp} [options.evaluate] The "evaluate" delimiter. - * @param {Object} [options.imports] An object to import into the template as local variables. - * @param {RegExp} [options.interpolate] The "interpolate" delimiter. - * @param {string} [sourceURL] The sourceURL of the template's compiled source. - * @param {string} [variable] The data object variable name. - * @returns {Function|string} Returns a compiled function when no `data` object - * is given, else it returns the interpolated text. - * @example - * - * // using the "interpolate" delimiter to create a compiled template - * var compiled = _.template('hello <%= name %>'); - * compiled({ 'name': 'fred' }); - * // => 'hello fred' - * - * // using the "escape" delimiter to escape HTML in data property values - * _.template('<b><%- value %></b>', { 'value': '<script>' }); - * // => '<b><script></b>' - * - * // using the "evaluate" delimiter to generate HTML - * var list = '<% _.forEach(people, function(name) { %><li><%- name %></li><% }); %>'; - * _.template(list, { 'people': ['fred', 'barney'] }); - * // => '<li>fred</li><li>barney</li>' - * - * // using the ES6 delimiter as an alternative to the default "interpolate" delimiter - * _.template('hello ${ name }', { 'name': 'pebbles' }); - * // => 'hello pebbles' - * - * // using the internal `print` function in "evaluate" delimiters - * _.template('<% print("hello " + name); %>!', { 'name': 'barney' }); - * // => 'hello barney!' - * - * // using a custom template delimiters - * _.templateSettings = { - * 'interpolate': /{{([\s\S]+?)}}/g - * }; - * - * _.template('hello {{ name }}!', { 'name': 'mustache' }); - * // => 'hello mustache!' - * - * // using the `imports` option to import jQuery - * var list = '<% jq.each(people, function(name) { %><li><%- name %></li><% }); %>'; - * _.template(list, { 'people': ['fred', 'barney'] }, { 'imports': { 'jq': jQuery } }); - * // => '<li>fred</li><li>barney</li>' - * - * // using the `sourceURL` option to specify a custom sourceURL for the template - * var compiled = _.template('hello <%= name %>', null, { 'sourceURL': '/basic/greeting.jst' }); - * compiled(data); - * // => find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector - * - * // using the `variable` option to ensure a with-statement isn't used in the compiled template - * var compiled = _.template('hi <%= data.name %>!', null, { 'variable': 'data' }); - * compiled.source; - * // => function(data) { - * var __t, __p = '', __e = _.escape; - * __p += 'hi ' + ((__t = ( data.name )) == null ? '' : __t) + '!'; - * return __p; - * } - * - * // using the `source` property to inline compiled templates for meaningful - * // line numbers in error messages and a stack trace - * fs.writeFileSync(path.join(cwd, 'jst.js'), '\ - * var JST = {\ - * "main": ' + _.template(mainText).source + '\ - * };\ - * '); - */ -function template(text, data, options) { - // based on John Resig's `tmpl` implementation - // http://ejohn.org/blog/javascript-micro-templating/ - // and Laura Doktorova's doT.js - // https://github.com/olado/doT - var settings = templateSettings.imports._.templateSettings || templateSettings; - text = String(text || ''); - - // avoid missing dependencies when `iteratorTemplate` is not defined - options = defaults({}, options, settings); - - var imports = defaults({}, options.imports, settings.imports), - importsKeys = keys(imports), - importsValues = values(imports); - - var isEvaluating, - index = 0, - interpolate = options.interpolate || reNoMatch, - source = "__p += '"; - - // compile the regexp to match each delimiter - var reDelimiters = RegExp( - (options.escape || reNoMatch).source + '|' + - interpolate.source + '|' + - (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' + - (options.evaluate || reNoMatch).source + '|$' - , 'g'); - - text.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) { - interpolateValue || (interpolateValue = esTemplateValue); - - // escape characters that cannot be included in string literals - source += text.slice(index, offset).replace(reUnescapedString, escapeStringChar); - - // replace delimiters with snippets - if (escapeValue) { - source += "' +\n__e(" + escapeValue + ") +\n'"; - } - if (evaluateValue) { - isEvaluating = true; - source += "';\n" + evaluateValue + ";\n__p += '"; - } - if (interpolateValue) { - source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'"; - } - index = offset + match.length; - - // the JS engine embedded in Adobe products requires returning the `match` - // string in order to produce the correct `offset` value - return match; - }); - - source += "';\n"; - - // if `variable` is not specified, wrap a with-statement around the generated - // code to add the data object to the top of the scope chain - var variable = options.variable, - hasVariable = variable; - - if (!hasVariable) { - variable = 'obj'; - source = 'with (' + variable + ') {\n' + source + '\n}\n'; - } - // cleanup code by stripping empty strings - source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source) - .replace(reEmptyStringMiddle, '$1') - .replace(reEmptyStringTrailing, '$1;'); - - // frame code as the function body - source = 'function(' + variable + ') {\n' + - (hasVariable ? '' : variable + ' || (' + variable + ' = {});\n') + - "var __t, __p = '', __e = _.escape" + - (isEvaluating - ? ', __j = Array.prototype.join;\n' + - "function print() { __p += __j.call(arguments, '') }\n" - : ';\n' - ) + - source + - 'return __p\n}'; - - try { - var result = Function(importsKeys, 'return ' + source ).apply(undefined, importsValues); - } catch(e) { - e.source = source; - throw e; - } - if (data) { - return result(data); - } - // provide the compiled function's source by its `toString` method, in - // supported environments, or the `source` property as a convenience for - // inlining compiled templates during the build process - result.source = source; - return result; -} - -module.exports = template; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/LICENSE.txt b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/README.md deleted file mode 100644 index 6191a196..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._escapestringchar v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `escapeStringChar` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/index.js deleted file mode 100644 index f3b8c438..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/index.js +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** Used to escape characters for inclusion in compiled string literals */ -var stringEscapes = { - '\\': '\\', - "'": "'", - '\n': 'n', - '\r': 'r', - '\t': 't', - '\u2028': 'u2028', - '\u2029': 'u2029' -}; - -/** - * Used by `template` to escape characters for inclusion in compiled - * string literals. - * - * @private - * @param {string} match The matched character to escape. - * @returns {string} Returns the escaped character. - */ -function escapeStringChar(match) { - return '\\' + stringEscapes[match]; -} - -module.exports = escapeStringChar; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/package.json deleted file mode 100644 index 600f622a..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "lodash._escapestringchar", - "version": "2.4.1", - "description": "The internal Lo-Dash function `escapeStringChar` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._escapestringchar v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `escapeStringChar` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._escapestringchar@2.4.1", - "_from": "lodash._escapestringchar@~2.4.1" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/LICENSE.txt b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/README.md deleted file mode 100644 index da283fc4..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.defaults v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.defaults`](http://lodash.com/docs#defaults) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/index.js deleted file mode 100644 index 52eec906..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/index.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var keys = require('lodash.keys'), - objectTypes = require('lodash._objecttypes'); - -/** - * Assigns own enumerable properties of source object(s) to the destination - * object for all destination properties that resolve to `undefined`. Once a - * property is set, additional defaults of the same property will be ignored. - * - * @static - * @memberOf _ - * @type Function - * @category Objects - * @param {Object} object The destination object. - * @param {...Object} [source] The source objects. - * @param- {Object} [guard] Allows working with `_.reduce` without using its - * `key` and `object` arguments as sources. - * @returns {Object} Returns the destination object. - * @example - * - * var object = { 'name': 'barney' }; - * _.defaults(object, { 'name': 'fred', 'employer': 'slate' }); - * // => { 'name': 'barney', 'employer': 'slate' } - */ -var defaults = function(object, source, guard) { - var index, iterable = object, result = iterable; - if (!iterable) return result; - var args = arguments, - argsIndex = 0, - argsLength = typeof guard == 'number' ? 2 : args.length; - while (++argsIndex < argsLength) { - iterable = args[argsIndex]; - if (iterable && objectTypes[typeof iterable]) { - var ownIndex = -1, - ownProps = objectTypes[typeof iterable] && keys(iterable), - length = ownProps ? ownProps.length : 0; - - while (++ownIndex < length) { - index = ownProps[ownIndex]; - if (typeof result[index] == 'undefined') result[index] = iterable[index]; - } - } - } - return result -}; - -module.exports = defaults; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/LICENSE.txt b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/README.md deleted file mode 100644 index 16de7300..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._objecttypes v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/index.js deleted file mode 100644 index da17c6cd..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** Used to determine if values are of the language type Object */ -var objectTypes = { - 'boolean': false, - 'function': true, - 'object': true, - 'number': false, - 'string': false, - 'undefined': false -}; - -module.exports = objectTypes; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/package.json deleted file mode 100644 index ab0f1e6d..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "lodash._objecttypes", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `objectTypes` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._objecttypes v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._objecttypes@2.4.1", - "_from": "lodash._objecttypes@~2.4.1" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/package.json deleted file mode 100644 index 53559bd9..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "lodash.defaults", - "version": "2.4.1", - "description": "The Lo-Dash function `_.defaults` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash.keys": "~2.4.1", - "lodash._objecttypes": "~2.4.1" - }, - "readme": "# lodash.defaults v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.defaults`](http://lodash.com/docs#defaults) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.defaults@2.4.1", - "_from": "lodash.defaults@~2.4.1" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/LICENSE.txt b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/README.md deleted file mode 100644 index 7cbc6538..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.escape v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.escape`](http://lodash.com/docs#escape) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/index.js deleted file mode 100644 index 343a4156..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/index.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var escapeHtmlChar = require('lodash._escapehtmlchar'), - keys = require('lodash.keys'), - reUnescapedHtml = require('lodash._reunescapedhtml'); - -/** - * Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their - * corresponding HTML entities. - * - * @static - * @memberOf _ - * @category Utilities - * @param {string} string The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escape('Fred, Wilma, & Pebbles'); - * // => 'Fred, Wilma, & Pebbles' - */ -function escape(string) { - return string == null ? '' : String(string).replace(reUnescapedHtml, escapeHtmlChar); -} - -module.exports = escape; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/LICENSE.txt b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/README.md deleted file mode 100644 index eef7f9c6..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._escapehtmlchar v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `escapeHtmlChar` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/index.js deleted file mode 100644 index ce4e6d8e..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/index.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var htmlEscapes = require('lodash._htmlescapes'); - -/** - * Used by `escape` to convert characters to HTML entities. - * - * @private - * @param {string} match The matched character to escape. - * @returns {string} Returns the escaped character. - */ -function escapeHtmlChar(match) { - return htmlEscapes[match]; -} - -module.exports = escapeHtmlChar; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/LICENSE.txt b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/README.md deleted file mode 100644 index 9957cefa..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._htmlescapes v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `htmlEscapes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/index.js deleted file mode 100644 index f69503d4..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/index.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** - * Used to convert characters to HTML entities: - * - * Though the `>` character is escaped for symmetry, characters like `>` and `/` - * don't require escaping in HTML and have no special meaning unless they're part - * of a tag or an unquoted attribute value. - * http://mathiasbynens.be/notes/ambiguous-ampersands (under "semi-related fun fact") - */ -var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' -}; - -module.exports = htmlEscapes; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/package.json deleted file mode 100644 index 29c83d94..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "lodash._htmlescapes", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `htmlEscapes` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._htmlescapes v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `htmlEscapes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._htmlescapes@2.4.1", - "_from": "lodash._htmlescapes@~2.4.1" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/package.json deleted file mode 100644 index 00c07f7b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "lodash._escapehtmlchar", - "version": "2.4.1", - "description": "The internal Lo-Dash function `escapeHtmlChar` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash._htmlescapes": "~2.4.1" - }, - "readme": "# lodash._escapehtmlchar v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `escapeHtmlChar` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._escapehtmlchar@2.4.1", - "_from": "lodash._escapehtmlchar@~2.4.1" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/LICENSE.txt b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/README.md deleted file mode 100644 index c6ca90c4..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._reunescapedhtml v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `reUnescapedHtml` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/index.js deleted file mode 100644 index fa870474..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/index.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var htmlEscapes = require('lodash._htmlescapes'), - keys = require('lodash.keys'); - -/** Used to match HTML entities and HTML characters */ -var reUnescapedHtml = RegExp('[' + keys(htmlEscapes).join('') + ']', 'g'); - -module.exports = reUnescapedHtml; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/LICENSE.txt b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/README.md deleted file mode 100644 index 9957cefa..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._htmlescapes v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `htmlEscapes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/index.js deleted file mode 100644 index f69503d4..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/index.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** - * Used to convert characters to HTML entities: - * - * Though the `>` character is escaped for symmetry, characters like `>` and `/` - * don't require escaping in HTML and have no special meaning unless they're part - * of a tag or an unquoted attribute value. - * http://mathiasbynens.be/notes/ambiguous-ampersands (under "semi-related fun fact") - */ -var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' -}; - -module.exports = htmlEscapes; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/package.json deleted file mode 100644 index 29c83d94..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "lodash._htmlescapes", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `htmlEscapes` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._htmlescapes v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `htmlEscapes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._htmlescapes@2.4.1", - "_from": "lodash._htmlescapes@~2.4.1" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/package.json deleted file mode 100644 index 74a4f272..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "lodash._reunescapedhtml", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `reUnescapedHtml` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash._htmlescapes": "~2.4.1", - "lodash.keys": "~2.4.1" - }, - "readme": "# lodash._reunescapedhtml v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `reUnescapedHtml` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._reunescapedhtml@2.4.1", - "_from": "lodash._reunescapedhtml@~2.4.1" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/package.json deleted file mode 100644 index 254ecb1e..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "lodash.escape", - "version": "2.4.1", - "description": "The Lo-Dash function `_.escape` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash._escapehtmlchar": "~2.4.1", - "lodash.keys": "~2.4.1", - "lodash._reunescapedhtml": "~2.4.1" - }, - "readme": "# lodash.escape v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.escape`](http://lodash.com/docs#escape) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.escape@2.4.1", - "_from": "lodash.escape@~2.4.1" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/LICENSE.txt b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/README.md deleted file mode 100644 index bee29a8d..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.keys v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.keys`](http://lodash.com/docs#keys) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/index.js deleted file mode 100644 index 139568a2..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/index.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var isNative = require('lodash._isnative'), - isObject = require('lodash.isobject'), - shimKeys = require('lodash._shimkeys'); - -/* Native method shortcuts for methods with the same name as other `lodash` methods */ -var nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys; - -/** - * Creates an array composed of the own enumerable property names of an object. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property names. - * @example - * - * _.keys({ 'one': 1, 'two': 2, 'three': 3 }); - * // => ['one', 'two', 'three'] (property order is not guaranteed across environments) - */ -var keys = !nativeKeys ? shimKeys : function(object) { - if (!isObject(object)) { - return []; - } - return nativeKeys(object); -}; - -module.exports = keys; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/README.md deleted file mode 100644 index fbcaad2f..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._isnative v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `isNative` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/index.js deleted file mode 100644 index b34a3500..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/index.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** Used for native method references */ -var objectProto = Object.prototype; - -/** Used to resolve the internal [[Class]] of values */ -var toString = objectProto.toString; - -/** Used to detect if a method is native */ -var reNative = RegExp('^' + - String(toString) - .replace(/[.*+?^${}()|[\]\\]/g, '\\$&') - .replace(/toString| for [^\]]+/g, '.*?') + '$' -); - -/** - * Checks if `value` is a native function. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if the `value` is a native function, else `false`. - */ -function isNative(value) { - return typeof value == 'function' && reNative.test(value); -} - -module.exports = isNative; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/package.json deleted file mode 100644 index 5e652af4..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "lodash._isnative", - "version": "2.4.1", - "description": "The internal Lo-Dash function `isNative` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._isnative v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `isNative` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._isnative@2.4.1", - "_from": "lodash._isnative@~2.4.1" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/README.md deleted file mode 100644 index 23f3000b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._shimkeys v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `shimKeys` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js deleted file mode 100644 index 12be0bf1..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var objectTypes = require('lodash._objecttypes'); - -/** Used for native method references */ -var objectProto = Object.prototype; - -/** Native method shortcuts */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A fallback implementation of `Object.keys` which produces an array of the - * given object's own enumerable property names. - * - * @private - * @type Function - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property names. - */ -var shimKeys = function(object) { - var index, iterable = object, result = []; - if (!iterable) return result; - if (!(objectTypes[typeof object])) return result; - for (index in iterable) { - if (hasOwnProperty.call(iterable, index)) { - result.push(index); - } - } - return result -}; - -module.exports = shimKeys; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/LICENSE.txt b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/README.md deleted file mode 100644 index 16de7300..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._objecttypes v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/index.js deleted file mode 100644 index da17c6cd..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** Used to determine if values are of the language type Object */ -var objectTypes = { - 'boolean': false, - 'function': true, - 'object': true, - 'number': false, - 'string': false, - 'undefined': false -}; - -module.exports = objectTypes; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/package.json deleted file mode 100644 index 21b0fd84..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "lodash._objecttypes", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `objectTypes` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._objecttypes v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._objecttypes@2.4.1", - "_from": "lodash._objecttypes@~2.4.1", - "scripts": {} -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json deleted file mode 100644 index a51388c1..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "lodash._shimkeys", - "version": "2.4.1", - "description": "The internal Lo-Dash function `shimKeys` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash._objecttypes": "~2.4.1" - }, - "readme": "# lodash._shimkeys v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `shimKeys` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._shimkeys@2.4.1", - "_from": "lodash._shimkeys@~2.4.1" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/LICENSE.txt b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/README.md deleted file mode 100644 index eeb0a78b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.isobject v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.isObject`](http://lodash.com/docs#isObject) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/index.js deleted file mode 100644 index 3596ac34..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/index.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var objectTypes = require('lodash._objecttypes'); - -/** - * Checks if `value` is the language type of Object. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Objects - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if the `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // check if the value is the ECMAScript language type of Object - // http://es5.github.io/#x8 - // and avoid a V8 bug - // http://code.google.com/p/v8/issues/detail?id=2291 - return !!(value && objectTypes[typeof value]); -} - -module.exports = isObject; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/LICENSE.txt b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/README.md deleted file mode 100644 index 16de7300..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._objecttypes v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/index.js deleted file mode 100644 index da17c6cd..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** Used to determine if values are of the language type Object */ -var objectTypes = { - 'boolean': false, - 'function': true, - 'object': true, - 'number': false, - 'string': false, - 'undefined': false -}; - -module.exports = objectTypes; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/package.json deleted file mode 100644 index 21b0fd84..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "lodash._objecttypes", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `objectTypes` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._objecttypes v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._objecttypes@2.4.1", - "_from": "lodash._objecttypes@~2.4.1", - "scripts": {} -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/package.json deleted file mode 100644 index 698a9eaf..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "lodash.isobject", - "version": "2.4.1", - "description": "The Lo-Dash function `_.isObject` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash._objecttypes": "~2.4.1" - }, - "readme": "# lodash.isobject v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.isObject`](http://lodash.com/docs#isObject) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.isobject@2.4.1", - "_from": "lodash.isobject@~2.4.1" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/package.json deleted file mode 100644 index cd3c29bd..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "lodash.keys", - "version": "2.4.1", - "description": "The Lo-Dash function `_.keys` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash._isnative": "~2.4.1", - "lodash.isobject": "~2.4.1", - "lodash._shimkeys": "~2.4.1" - }, - "readme": "# lodash.keys v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.keys`](http://lodash.com/docs#keys) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.keys@2.4.1", - "_from": "lodash.keys@~2.4.1" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/LICENSE.txt b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/README.md deleted file mode 100644 index d9ce72bc..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.templatesettings v2.4.1 - -The [Lo-Dash](http://lodash.com/) object [`_.templateSettings`](http://lodash.com/docs#templateSettings) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/index.js deleted file mode 100644 index bba7e231..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/index.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var escape = require('lodash.escape'), - reInterpolate = require('lodash._reinterpolate'); - -/** - * By default, the template delimiters used by Lo-Dash are similar to those in - * embedded Ruby (ERB). Change the following template settings to use alternative - * delimiters. - * - * @static - * @memberOf _ - * @type Object - */ -var templateSettings = { - - /** - * Used to detect `data` property values to be HTML-escaped. - * - * @memberOf _.templateSettings - * @type RegExp - */ - 'escape': /<%-([\s\S]+?)%>/g, - - /** - * Used to detect code to be evaluated. - * - * @memberOf _.templateSettings - * @type RegExp - */ - 'evaluate': /<%([\s\S]+?)%>/g, - - /** - * Used to detect `data` property values to inject. - * - * @memberOf _.templateSettings - * @type RegExp - */ - 'interpolate': reInterpolate, - - /** - * Used to reference the data object in the template text. - * - * @memberOf _.templateSettings - * @type string - */ - 'variable': '', - - /** - * Used to import variables into the compiled template. - * - * @memberOf _.templateSettings - * @type Object - */ - 'imports': { - - /** - * A reference to the `lodash` function. - * - * @memberOf _.templateSettings.imports - * @type Function - */ - '_': { 'escape': escape } - } -}; - -module.exports = templateSettings; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json deleted file mode 100644 index f08cd47d..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "lodash.templatesettings", - "version": "2.4.1", - "description": "The Lo-Dash object `_.templateSettings` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash.escape": "~2.4.1", - "lodash._reinterpolate": "~2.4.1" - }, - "readme": "# lodash.templatesettings v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) object [`_.templateSettings`](http://lodash.com/docs#templateSettings) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.templatesettings@2.4.1", - "_from": "lodash.templatesettings@~2.4.1" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/LICENSE.txt b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/README.md deleted file mode 100644 index 33f028da..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.values v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.values`](http://lodash.com/docs#values) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/index.js deleted file mode 100644 index ccf622fa..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/index.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var keys = require('lodash.keys'); - -/** - * Creates an array composed of the own enumerable property values of `object`. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property values. - * @example - * - * _.values({ 'one': 1, 'two': 2, 'three': 3 }); - * // => [1, 2, 3] (property order is not guaranteed across environments) - */ -function values(object) { - var index = -1, - props = keys(object), - length = props.length, - result = Array(length); - - while (++index < length) { - result[index] = object[props[index]]; - } - return result; -} - -module.exports = values; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/package.json deleted file mode 100644 index 8e864ab7..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "lodash.values", - "version": "2.4.1", - "description": "The Lo-Dash function `_.values` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash.keys": "~2.4.1" - }, - "readme": "# lodash.values v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.values`](http://lodash.com/docs#values) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.values@2.4.1", - "_from": "lodash.values@~2.4.1" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/package.json deleted file mode 100644 index a42d1163..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/lodash.template/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "lodash.template", - "version": "2.4.1", - "description": "The Lo-Dash function `_.template` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash.defaults": "~2.4.1", - "lodash.escape": "~2.4.1", - "lodash._escapestringchar": "~2.4.1", - "lodash.keys": "~2.4.1", - "lodash._reinterpolate": "~2.4.1", - "lodash.templatesettings": "~2.4.1", - "lodash.values": "~2.4.1" - }, - "readme": "# lodash.template v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.template`](http://lodash.com/docs#template) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.template@2.4.1", - "_from": "lodash.template@~2.4.1" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/.travis.yml b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/.travis.yml deleted file mode 100644 index cc4dba29..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/LICENSE b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/example/parse.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/example/parse.js deleted file mode 100644 index abff3e8e..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/example/parse.js +++ /dev/null @@ -1,2 +0,0 @@ -var argv = require('../')(process.argv.slice(2)); -console.dir(argv); diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/index.js deleted file mode 100644 index 584f551a..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/index.js +++ /dev/null @@ -1,187 +0,0 @@ -module.exports = function (args, opts) { - if (!opts) opts = {}; - - var flags = { bools : {}, strings : {} }; - - [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - - [].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - }); - - var aliases = {}; - Object.keys(opts.alias || {}).forEach(function (key) { - aliases[key] = [].concat(opts.alias[key]); - aliases[key].forEach(function (x) { - aliases[x] = [key].concat(aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - - var defaults = opts['default'] || {}; - - var argv = { _ : [] }; - Object.keys(flags.bools).forEach(function (key) { - setArg(key, defaults[key] === undefined ? false : defaults[key]); - }); - - var notFlags = []; - - if (args.indexOf('--') !== -1) { - notFlags = args.slice(args.indexOf('--')+1); - args = args.slice(0, args.indexOf('--')); - } - - function setArg (key, val) { - var value = !flags.strings[key] && isNumber(val) - ? Number(val) : val - ; - setKey(argv, key.split('.'), value); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), value); - }); - } - - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - - if (/^--.+=/.test(arg)) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - setArg(m[1], m[2]); - } - else if (/^--no-.+/.test(arg)) { - var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false); - } - else if (/^--.+/.test(arg)) { - var key = arg.match(/^--(.+)/)[1]; - var next = args[i + 1]; - if (next !== undefined && !/^-/.test(next) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true'); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true); - } - } - else if (/^-[^-]+/.test(arg)) { - var letters = arg.slice(1,-1).split(''); - - var broken = false; - for (var j = 0; j < letters.length; j++) { - var next = arg.slice(j+2); - - if (next === '-') { - setArg(letters[j], next) - continue; - } - - if (/[A-Za-z]/.test(letters[j]) - && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next); - broken = true; - break; - } - - if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2)); - broken = true; - break; - } - else { - setArg(letters[j], flags.strings[letters[j]] ? '' : true); - } - } - - var key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, args[i+1]); - i++; - } - else if (args[i+1] && /true|false/.test(args[i+1])) { - setArg(key, args[i+1] === 'true'); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true); - } - } - } - else { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ); - } - } - - Object.keys(defaults).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) { - setKey(argv, key.split('.'), defaults[key]); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), defaults[key]); - }); - } - }); - - notFlags.forEach(function(key) { - argv._.push(key); - }); - - return argv; -}; - -function hasKey (obj, keys) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - o = (o[key] || {}); - }); - - var key = keys[keys.length - 1]; - return key in o; -} - -function setKey (obj, keys, value) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - if (o[key] === undefined) o[key] = {}; - o = o[key]; - }); - - var key = keys[keys.length - 1]; - if (o[key] === undefined || typeof o[key] === 'boolean') { - o[key] = value; - } - else if (Array.isArray(o[key])) { - o[key].push(value); - } - else { - o[key] = [ o[key], value ]; - } -} - -function isNumber (x) { - if (typeof x === 'number') return true; - if (/^0x[0-9a-f]+$/i.test(x)) return true; - return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); -} - -function longest (xs) { - return Math.max.apply(null, xs.map(function (x) { return x.length })); -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/package.json deleted file mode 100644 index 6cb96be8..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "minimist", - "version": "0.0.8", - "description": "parse argument options", - "main": "index.js", - "devDependencies": { - "tape": "~1.0.4", - "tap": "~0.4.0" - }, - "scripts": { - "test": "tap test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "ff/5", - "firefox/latest", - "chrome/10", - "chrome/latest", - "safari/5.1", - "safari/latest", - "opera/12" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/minimist.git" - }, - "homepage": "https://github.com/substack/minimist", - "keywords": [ - "argv", - "getopt", - "parser", - "optimist" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "readme": "# minimist\n\nparse argument options\n\nThis module is the guts of optimist's argument parser without all the\nfanciful decoration.\n\n[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist)\n\n[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist)\n\n# example\n\n``` js\nvar argv = require('minimist')(process.argv.slice(2));\nconsole.dir(argv);\n```\n\n```\n$ node example/parse.js -a beep -b boop\n{ _: [], a: 'beep', b: 'boop' }\n```\n\n```\n$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz\n{ _: [ 'foo', 'bar', 'baz' ],\n x: 3,\n y: 4,\n n: 5,\n a: true,\n b: true,\n c: true,\n beep: 'boop' }\n```\n\n# methods\n\n``` js\nvar parseArgs = require('minimist')\n```\n\n## var argv = parseArgs(args, opts={})\n\nReturn an argument object `argv` populated with the array arguments from `args`.\n\n`argv._` contains all the arguments that didn't have an option associated with\nthem.\n\nNumeric-looking arguments will be returned as numbers unless `opts.string` or\n`opts.boolean` is set for that argument name.\n\nAny arguments after `'--'` will not be parsed and will end up in `argv._`.\n\noptions can be:\n\n* `opts.string` - a string or array of strings argument names to always treat as\nstrings\n* `opts.boolean` - a string or array of strings to always treat as booleans\n* `opts.alias` - an object mapping string names to strings or arrays of string\nargument names to use as aliases\n* `opts.default` - an object mapping string argument names to default values\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install minimist\n```\n\n# license\n\nMIT\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/substack/minimist/issues" - }, - "_id": "minimist@0.0.8", - "_from": "minimist@~0.0.5" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/readme.markdown b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/readme.markdown deleted file mode 100644 index c2563532..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/readme.markdown +++ /dev/null @@ -1,73 +0,0 @@ -# minimist - -parse argument options - -This module is the guts of optimist's argument parser without all the -fanciful decoration. - -[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist) - -[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist) - -# example - -``` js -var argv = require('minimist')(process.argv.slice(2)); -console.dir(argv); -``` - -``` -$ node example/parse.js -a beep -b boop -{ _: [], a: 'beep', b: 'boop' } -``` - -``` -$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz -{ _: [ 'foo', 'bar', 'baz' ], - x: 3, - y: 4, - n: 5, - a: true, - b: true, - c: true, - beep: 'boop' } -``` - -# methods - -``` js -var parseArgs = require('minimist') -``` - -## var argv = parseArgs(args, opts={}) - -Return an argument object `argv` populated with the array arguments from `args`. - -`argv._` contains all the arguments that didn't have an option associated with -them. - -Numeric-looking arguments will be returned as numbers unless `opts.string` or -`opts.boolean` is set for that argument name. - -Any arguments after `'--'` will not be parsed and will end up in `argv._`. - -options can be: - -* `opts.string` - a string or array of strings argument names to always treat as -strings -* `opts.boolean` - a string or array of strings to always treat as booleans -* `opts.alias` - an object mapping string names to strings or arrays of string -argument names to use as aliases -* `opts.default` - an object mapping string argument names to default values - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install minimist -``` - -# license - -MIT diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/test/dash.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/test/dash.js deleted file mode 100644 index 8b034b99..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/test/dash.js +++ /dev/null @@ -1,24 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('-', function (t) { - t.plan(5); - t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); - t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); - t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); - t.deepEqual( - parse([ '-b', '-' ], { boolean: 'b' }), - { b: true, _: [ '-' ] } - ); - t.deepEqual( - parse([ '-s', '-' ], { string: 's' }), - { s: '-', _: [] } - ); -}); - -test('-a -- b', function (t) { - t.plan(3); - t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/test/default_bool.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/test/default_bool.js deleted file mode 100644 index f0041ee4..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/test/default_bool.js +++ /dev/null @@ -1,20 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('boolean default true', function (t) { - var argv = parse([], { - boolean: 'sometrue', - default: { sometrue: true } - }); - t.equal(argv.sometrue, true); - t.end(); -}); - -test('boolean default false', function (t) { - var argv = parse([], { - boolean: 'somefalse', - default: { somefalse: false } - }); - t.equal(argv.somefalse, false); - t.end(); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/test/dotted.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/test/dotted.js deleted file mode 100644 index ef0ae349..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/test/dotted.js +++ /dev/null @@ -1,16 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('dotted alias', function (t) { - var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 22); - t.equal(argv.aa.bb, 22); - t.end(); -}); - -test('dotted default', function (t) { - var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 11); - t.equal(argv.aa.bb, 11); - t.end(); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/test/long.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/test/long.js deleted file mode 100644 index 5d3a1e09..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/test/long.js +++ /dev/null @@ -1,31 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('long opts', function (t) { - t.deepEqual( - parse([ '--bool' ]), - { bool : true, _ : [] }, - 'long boolean' - ); - t.deepEqual( - parse([ '--pow', 'xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture sp' - ); - t.deepEqual( - parse([ '--pow=xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture eq' - ); - t.deepEqual( - parse([ '--host', 'localhost', '--port', '555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures sp' - ); - t.deepEqual( - parse([ '--host=localhost', '--port=555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures eq' - ); - t.end(); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/test/parse.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/test/parse.js deleted file mode 100644 index 8a906466..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/test/parse.js +++ /dev/null @@ -1,318 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse args', function (t) { - t.deepEqual( - parse([ '--no-moo' ]), - { moo : false, _ : [] }, - 'no' - ); - t.deepEqual( - parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), - { v : ['a','b','c'], _ : [] }, - 'multi' - ); - t.end(); -}); - -test('comprehensive', function (t) { - t.deepEqual( - parse([ - '--name=meowmers', 'bare', '-cats', 'woo', - '-h', 'awesome', '--multi=quux', - '--key', 'value', - '-b', '--bool', '--no-meep', '--multi=baz', - '--', '--not-a-flag', 'eek' - ]), - { - c : true, - a : true, - t : true, - s : 'woo', - h : 'awesome', - b : true, - bool : true, - key : 'value', - multi : [ 'quux', 'baz' ], - meep : false, - name : 'meowmers', - _ : [ 'bare', '--not-a-flag', 'eek' ] - } - ); - t.end(); -}); - -test('nums', function (t) { - var argv = parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789' - ]); - t.deepEqual(argv, { - x : 1234, - y : 5.67, - z : 1e7, - w : '10f', - hex : 0xdeadbeef, - _ : [ 789 ] - }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv.y, 'number'); - t.deepEqual(typeof argv.z, 'number'); - t.deepEqual(typeof argv.w, 'string'); - t.deepEqual(typeof argv.hex, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); - -test('flag boolean', function (t) { - var argv = parse([ '-t', 'moo' ], { boolean: 't' }); - t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean value', function (t) { - var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { - boolean: [ 't', 'verbose' ], - default: { verbose: true } - }); - - t.deepEqual(argv, { - verbose: false, - t: true, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean default false', function (t) { - var argv = parse(['moo'], { - boolean: ['t', 'verbose'], - default: { verbose: false, t: false } - }); - - t.deepEqual(argv, { - verbose: false, - t: false, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); - -}); - -test('boolean groups', function (t) { - var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { - boolean: ['x','y','z'] - }); - - t.deepEqual(argv, { - x : true, - y : false, - z : true, - _ : [ 'one', 'two', 'three' ] - }); - - t.deepEqual(typeof argv.x, 'boolean'); - t.deepEqual(typeof argv.y, 'boolean'); - t.deepEqual(typeof argv.z, 'boolean'); - t.end(); -}); - -test('newlines in params' , function (t) { - var args = parse([ '-s', "X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - - // reproduce in bash: - // VALUE="new - // line" - // node program.js --s="$VALUE" - args = parse([ "--s=X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - t.end(); -}); - -test('strings' , function (t) { - var s = parse([ '-s', '0001234' ], { string: 's' }).s; - t.equal(s, '0001234'); - t.equal(typeof s, 'string'); - - var x = parse([ '-x', '56' ], { string: 'x' }).x; - t.equal(x, '56'); - t.equal(typeof x, 'string'); - t.end(); -}); - -test('stringArgs', function (t) { - var s = parse([ ' ', ' ' ], { string: '_' })._; - t.same(s.length, 2); - t.same(typeof s[0], 'string'); - t.same(s[0], ' '); - t.same(typeof s[1], 'string'); - t.same(s[1], ' '); - t.end(); -}); - -test('empty strings', function(t) { - var s = parse([ '-s' ], { string: 's' }).s; - t.equal(s, ''); - t.equal(typeof s, 'string'); - - var str = parse([ '--str' ], { string: 'str' }).str; - t.equal(str, ''); - t.equal(typeof str, 'string'); - - var letters = parse([ '-art' ], { - string: [ 'a', 't' ] - }); - - t.equal(letters.a, ''); - t.equal(letters.r, true); - t.equal(letters.t, ''); - - t.end(); -}); - - -test('slashBreak', function (t) { - t.same( - parse([ '-I/foo/bar/baz' ]), - { I : '/foo/bar/baz', _ : [] } - ); - t.same( - parse([ '-xyz/foo/bar/baz' ]), - { x : true, y : true, z : '/foo/bar/baz', _ : [] } - ); - t.end(); -}); - -test('alias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: 'zoom' } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.f, 11); - t.end(); -}); - -test('multiAlias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: [ 'zm', 'zoom' ] } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.z, argv.zm); - t.equal(argv.f, 11); - t.end(); -}); - -test('nested dotted objects', function (t) { - var argv = parse([ - '--foo.bar', '3', '--foo.baz', '4', - '--foo.quux.quibble', '5', '--foo.quux.o_O', - '--beep.boop' - ]); - - t.same(argv.foo, { - bar : 3, - baz : 4, - quux : { - quibble : 5, - o_O : true - } - }); - t.same(argv.beep, { boop : true }); - t.end(); -}); - -test('boolean and alias with chainable api', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = parse(aliased, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var propertyArgv = parse(regular, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - alias: { 'h': 'herp' }, - boolean: 'herp' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias using explicit true', function (t) { - var aliased = [ '-h', 'true' ]; - var regular = [ '--herp', 'true' ]; - var opts = { - alias: { h: 'herp' }, - boolean: 'h' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -// regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function(t) { - var parsed = parse(['--boool', '--other=true'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); - - parsed = parse(['--boool', '--other=false'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/test/parse_modified.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/test/parse_modified.js deleted file mode 100644 index 21851b03..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/test/parse_modified.js +++ /dev/null @@ -1,9 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse with modifier functions' , function (t) { - t.plan(1); - - var argv = parse([ '-b', '123' ], { boolean: 'b' }); - t.deepEqual(argv, { b: true, _: ['123'] }); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/test/short.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/test/short.js deleted file mode 100644 index d513a1c2..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/test/short.js +++ /dev/null @@ -1,67 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('numeric short args', function (t) { - t.plan(2); - t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); - t.deepEqual( - parse([ '-123', '456' ]), - { 1: true, 2: true, 3: 456, _: [] } - ); -}); - -test('short', function (t) { - t.deepEqual( - parse([ '-b' ]), - { b : true, _ : [] }, - 'short boolean' - ); - t.deepEqual( - parse([ 'foo', 'bar', 'baz' ]), - { _ : [ 'foo', 'bar', 'baz' ] }, - 'bare' - ); - t.deepEqual( - parse([ '-cats' ]), - { c : true, a : true, t : true, s : true, _ : [] }, - 'group' - ); - t.deepEqual( - parse([ '-cats', 'meow' ]), - { c : true, a : true, t : true, s : 'meow', _ : [] }, - 'short group next' - ); - t.deepEqual( - parse([ '-h', 'localhost' ]), - { h : 'localhost', _ : [] }, - 'short capture' - ); - t.deepEqual( - parse([ '-h', 'localhost', '-p', '555' ]), - { h : 'localhost', p : 555, _ : [] }, - 'short captures' - ); - t.end(); -}); - -test('mixed short bool and capture', function (t) { - t.same( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); - -test('short and long', function (t) { - t.deepEqual( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/test/whitespace.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/test/whitespace.js deleted file mode 100644 index 8a52a58c..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/test/whitespace.js +++ /dev/null @@ -1,8 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('whitespace should be whitespace' , function (t) { - t.plan(1); - var x = parse([ '-x', '\t' ]).x; - t.equal(x, '\t'); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/.npmignore b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/.travis.yml b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/.travis.yml deleted file mode 100644 index 6e5919de..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "0.10" diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/History.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/History.md deleted file mode 100644 index da69e925..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/History.md +++ /dev/null @@ -1,15 +0,0 @@ - -0.0.2 / 2014-02-20 -================== - - * fix infinite loop - -0.0.1 / 2014-01-15 -================== - -* fix error bubbling - -0.0.0 / 2014-01-13 -================== - -* initial release diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/Makefile b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/Makefile deleted file mode 100644 index d1df0ab3..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/Makefile +++ /dev/null @@ -1,10 +0,0 @@ - -node_modules: package.json - @npm install - -test: - @./node_modules/.bin/mocha \ - --reporter spec \ - --timeout 100 - -.PHONY: test \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/Readme.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/Readme.md deleted file mode 100644 index e8f432ec..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/Readme.md +++ /dev/null @@ -1,74 +0,0 @@ -# multipipe - -A better `Stream#pipe` that creates duplex streams and lets you handle errors in one place. - -[![build status](https://secure.travis-ci.org/segmentio/multipipe.png)](http://travis-ci.org/segmentio/multipipe) - -## Example - -```js -var pipe = require('multipipe'); - -// pipe streams -var stream = pipe(streamA, streamB, streamC); - -// centralized error handling -stream.on('error', fn); - -// creates a new stream -source.pipe(stream).pipe(dest); -``` - -## Duplex streams - - Write to the pipe and you'll really write to the first stream, read from the pipe and you'll read from the last stream. - -```js -var stream = pipe(a, b, c); - -source - .pipe(stream) - .pipe(destination); -``` - - In this example the flow of data is: - - * source -> - * a -> - * b -> - * c -> - * destination - -## Error handling - - Each `pipe` forwards the errors the streams it wraps emit, so you have one central place to handle errors: - -```js -var stream = pipe(a, b, c); - -stream.on('error', function(err){ - // called three times -}); - -a.emit('error', new Error); -b.emit('error', new Error); -c.emit('error', new Error); -``` - -## API - -### pipe(stream, ...) - -Pass a variable number of streams and each will be piped to the next one. - -A stream will be returned that wraps passed in streams in a way that errors will be forwarded and you can write to and/or read from it. - -## Installation - -```bash -$ npm install multipipe -``` - -## License - - MIT diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/index.js deleted file mode 100644 index 1fefb4a4..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/index.js +++ /dev/null @@ -1,57 +0,0 @@ - -/** - * Module dependencies. - */ - -var duplexer = require('duplexer2'); -var Stream = require('stream'); - -/** - * Slice reference. - */ - -var slice = [].slice; - -/** - * Duplexer options. - */ - -var opts = { - bubbleErrors: false -}; - -/** - * Expose `pipe`. - */ - -module.exports = pipe; - -/** - * Pipe. - * - * @param {Stream,...} - * @return {Stream} - * @api public - */ - -function pipe(){ - if (arguments.length == 1) return arguments[0]; - var streams = slice.call(arguments); - var first = streams[0]; - var last = streams[streams.length - 1]; - var ret; - - if (first.writable && last.readable) ret = duplexer(opts, first, last); - else if (first.writable) ret = first; - else if (last.readable) ret = last; - else ret = new Stream; - - streams.forEach(function(stream, i){ - var next = streams[i+1]; - if (next) stream.pipe(next); - if (stream != ret) stream.on('error', ret.emit.bind(ret, 'error')); - }); - - return ret; -} - diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/.npmignore b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/.npmignore deleted file mode 100644 index 07e6e472..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/.npmignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/.travis.yml b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/.travis.yml deleted file mode 100644 index 6e5919de..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "0.10" diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/LICENSE.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/LICENSE.md deleted file mode 100644 index 547189a6..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/LICENSE.md +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2013, Deoxxa Development -====================================== -All rights reserved. --------------------- - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of Deoxxa Development nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY DEOXXA DEVELOPMENT ''AS IS'' AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL DEOXXA DEVELOPMENT BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/README.md deleted file mode 100644 index e39e1e9e..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/README.md +++ /dev/null @@ -1,129 +0,0 @@ -duplexer2 [![build status](https://travis-ci.org/deoxxa/duplexer2.png)](https://travis-ci.org/deoxxa/fork) -========= - -Like duplexer (http://npm.im/duplexer) but using streams2. - -Overview --------- - -duplexer2 is a reimplementation of [duplexer](http://npm.im/duplexer) using the -readable-stream API which is standard in node as of v0.10. Everything largely -works the same. - -Installation ------------- - -Available via [npm](http://npmjs.org/): - -> $ npm install duplexer2 - -Or via git: - -> $ git clone git://github.com/deoxxa/duplexer2.git node_modules/duplexer2 - -API ---- - -**duplexer2** - -Creates a new `DuplexWrapper` object, which is the actual class that implements -most of the fun stuff. All that fun stuff is hidden. DON'T LOOK. - -```javascript -duplexer2([options], writable, readable) -``` - -```javascript -var duplex = duplexer2(new stream.Writable(), new stream.Readable()); -``` - -Arguments - -* __options__ - an object specifying the regular `stream.Duplex` options, as - well as the properties described below. -* __writable__ - a writable stream -* __readable__ - a readable stream - -Options - -* __bubbleErrors__ - a boolean value that specifies whether to bubble errors - from the underlying readable/writable streams. Default is `true`. - -Example -------- - -Also see [example.js](https://github.com/deoxxa/duplexer2/blob/master/example.js). - -Code: - -```javascript -var stream = require("stream"); - -var duplexer2 = require("duplexer2"); - -var writable = new stream.Writable({objectMode: true}), - readable = new stream.Readable({objectMode: true}); - -writable._write = function _write(input, encoding, done) { - if (readable.push(input)) { - return done(); - } else { - readable.once("drain", done); - } -}; - -readable._read = function _read(n) { - // no-op -}; - -// simulate the readable thing closing after a bit -writable.once("finish", function() { - setTimeout(function() { - readable.push(null); - }, 500); -}); - -var duplex = duplexer2(writable, readable); - -duplex.on("data", function(e) { - console.log("got data", JSON.stringify(e)); -}); - -duplex.on("finish", function() { - console.log("got finish event"); -}); - -duplex.on("end", function() { - console.log("got end event"); -}); - -duplex.write("oh, hi there", function() { - console.log("finished writing"); -}); - -duplex.end(function() { - console.log("finished ending"); -}); -``` - -Output: - -``` -got data "oh, hi there" -finished writing -got finish event -finished ending -got end event -``` - -License -------- - -3-clause BSD. A copy is included with the source. - -Contact -------- - -* GitHub ([deoxxa](http://github.com/deoxxa)) -* Twitter ([@deoxxa](http://twitter.com/deoxxa)) -* Email ([deoxxa@fknsrs.biz](mailto:deoxxa@fknsrs.biz)) diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/example.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/example.js deleted file mode 100755 index ad537a04..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/example.js +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env node - -var stream = require("stream"); - -var duplexer2 = require("./"); - -var writable = new stream.Writable({objectMode: true}), - readable = new stream.Readable({objectMode: true}); - -writable._write = function _write(input, encoding, done) { - if (readable.push(input)) { - return done(); - } else { - readable.once("drain", done); - } -}; - -readable._read = function _read(n) { - // no-op -}; - -// simulate the readable thing closing after a bit -writable.once("finish", function() { - setTimeout(function() { - readable.push(null); - }, 500); -}); - -var duplex = duplexer2(writable, readable); - -duplex.on("data", function(e) { - console.log("got data", JSON.stringify(e)); -}); - -duplex.on("finish", function() { - console.log("got finish event"); -}); - -duplex.on("end", function() { - console.log("got end event"); -}); - -duplex.write("oh, hi there", function() { - console.log("finished writing"); -}); - -duplex.end(function() { - console.log("finished ending"); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/index.js deleted file mode 100644 index 90b261b4..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/index.js +++ /dev/null @@ -1,62 +0,0 @@ -var stream = require("stream"); - -var duplex2 = module.exports = function duplex2(options, writable, readable) { - return new DuplexWrapper(options, writable, readable); -}; - -var DuplexWrapper = exports.DuplexWrapper = function DuplexWrapper(options, writable, readable) { - if (typeof readable === "undefined") { - readable = writable; - writable = options; - options = null; - } - - options = options || {}; - options.objectMode = true; - - stream.Duplex.call(this, options); - - this._bubbleErrors = (typeof options.bubbleErrors === "undefined") || !!options.bubbleErrors; - - this._writable = writable; - this._readable = readable; - - var self = this; - - writable.once("finish", function() { - self.end(); - }); - - this.once("finish", function() { - writable.end(); - }); - - readable.on("data", function(e) { - if (!self.push(e)) { - readable.pause(); - } - }); - - readable.once("end", function() { - return self.push(null); - }); - - if (this._bubbleErrors) { - writable.on("error", function(err) { - return self.emit("error", err); - }); - - readable.on("error", function(err) { - return self.emit("error", err); - }); - } -}; -DuplexWrapper.prototype = Object.create(stream.Duplex.prototype, {constructor: {value: DuplexWrapper}}); - -DuplexWrapper.prototype._write = function _write(input, encoding, done) { - this._writable.write(input, encoding, done); -}; - -DuplexWrapper.prototype._read = function _read(n) { - this._readable.resume(); -}; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/package.json deleted file mode 100644 index 1949be68..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "duplexer2", - "version": "0.0.1", - "description": "Like duplexer (http://npm.im/duplexer) but using streams2", - "main": "index.js", - "scripts": { - "test": "mocha -R tap" - }, - "repository": { - "type": "git", - "url": "git://github.com/deoxxa/duplexer2.git" - }, - "keywords": [ - "duplex", - "stream", - "join", - "combine" - ], - "author": { - "name": "Conrad Pankoff", - "email": "deoxxa@fknsrs.biz", - "url": "http://www.fknsrs.biz/" - }, - "license": "BSD", - "bugs": { - "url": "https://github.com/deoxxa/duplexer2/issues" - }, - "devDependencies": { - "chai": "~1.7.2", - "mocha": "~1.12.1" - }, - "readme": "duplexer2 [![build status](https://travis-ci.org/deoxxa/duplexer2.png)](https://travis-ci.org/deoxxa/fork)\n=========\n\nLike duplexer (http://npm.im/duplexer) but using streams2.\n\nOverview\n--------\n\nduplexer2 is a reimplementation of [duplexer](http://npm.im/duplexer) using the\nreadable-stream API which is standard in node as of v0.10. Everything largely\nworks the same.\n\nInstallation\n------------\n\nAvailable via [npm](http://npmjs.org/):\n\n> $ npm install duplexer2\n\nOr via git:\n\n> $ git clone git://github.com/deoxxa/duplexer2.git node_modules/duplexer2\n\nAPI\n---\n\n**duplexer2**\n\nCreates a new `DuplexWrapper` object, which is the actual class that implements\nmost of the fun stuff. All that fun stuff is hidden. DON'T LOOK.\n\n```javascript\nduplexer2([options], writable, readable)\n```\n\n```javascript\nvar duplex = duplexer2(new stream.Writable(), new stream.Readable());\n```\n\nArguments\n\n* __options__ - an object specifying the regular `stream.Duplex` options, as\n well as the properties described below.\n* __writable__ - a writable stream\n* __readable__ - a readable stream\n\nOptions\n\n* __bubbleErrors__ - a boolean value that specifies whether to bubble errors\n from the underlying readable/writable streams. Default is `true`.\n\nExample\n-------\n\nAlso see [example.js](https://github.com/deoxxa/duplexer2/blob/master/example.js).\n\nCode:\n\n```javascript\nvar stream = require(\"stream\");\n\nvar duplexer2 = require(\"duplexer2\");\n\nvar writable = new stream.Writable({objectMode: true}),\n readable = new stream.Readable({objectMode: true});\n\nwritable._write = function _write(input, encoding, done) {\n if (readable.push(input)) {\n return done();\n } else {\n readable.once(\"drain\", done);\n }\n};\n\nreadable._read = function _read(n) {\n // no-op\n};\n\n// simulate the readable thing closing after a bit\nwritable.once(\"finish\", function() {\n setTimeout(function() {\n readable.push(null);\n }, 500);\n});\n\nvar duplex = duplexer2(writable, readable);\n\nduplex.on(\"data\", function(e) {\n console.log(\"got data\", JSON.stringify(e));\n});\n\nduplex.on(\"finish\", function() {\n console.log(\"got finish event\");\n});\n\nduplex.on(\"end\", function() {\n console.log(\"got end event\");\n});\n\nduplex.write(\"oh, hi there\", function() {\n console.log(\"finished writing\");\n});\n\nduplex.end(function() {\n console.log(\"finished ending\");\n});\n```\n\nOutput:\n\n```\ngot data \"oh, hi there\"\nfinished writing\ngot finish event\nfinished ending\ngot end event\n```\n\nLicense\n-------\n\n3-clause BSD. A copy is included with the source.\n\nContact\n-------\n\n* GitHub ([deoxxa](http://github.com/deoxxa))\n* Twitter ([@deoxxa](http://twitter.com/deoxxa))\n* Email ([deoxxa@fknsrs.biz](mailto:deoxxa@fknsrs.biz))\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/deoxxa/duplexer2", - "_id": "duplexer2@0.0.1", - "_from": "duplexer2@0.0.1" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/test/tests.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/test/tests.js deleted file mode 100644 index fe3b2560..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/test/tests.js +++ /dev/null @@ -1,161 +0,0 @@ -var assert = require("chai").assert; - -var stream = require("stream"); - -var duplexer2 = require("../"); - -describe("duplexer2", function() { - var writable, readable; - - beforeEach(function() { - writable = new stream.Writable({objectMode: true}); - readable = new stream.Readable({objectMode: true}); - - writable._write = function _write(input, encoding, done) { - return done(); - }; - - readable._read = function _read(n) { - }; - }); - - it("should interact with the writable stream properly for writing", function(done) { - var duplex = duplexer2(writable, readable); - - writable._write = function _write(input, encoding, _done) { - assert.strictEqual(input, "well hello there"); - - return done(); - }; - - duplex.write("well hello there"); - }); - - it("should interact with the readable stream properly for reading", function(done) { - var duplex = duplexer2(writable, readable); - - duplex.on("data", function(e) { - assert.strictEqual(e, "well hello there"); - - return done(); - }); - - readable.push("well hello there"); - }); - - it("should end the writable stream, causing it to finish", function(done) { - var duplex = duplexer2(writable, readable); - - writable.once("finish", done); - - duplex.end(); - }); - - it("should finish when the writable stream finishes", function(done) { - var duplex = duplexer2(writable, readable); - - duplex.once("finish", done); - - writable.end(); - }); - - it("should end when the readable stream ends", function(done) { - var duplex = duplexer2(writable, readable); - - // required to let "end" fire without reading - duplex.resume(); - duplex.once("end", done); - - readable.push(null); - }); - - it("should bubble errors from the writable stream when no behaviour is specified", function(done) { - var duplex = duplexer2(writable, readable); - - var originalErr = Error("testing"); - - duplex.on("error", function(err) { - assert.strictEqual(err, originalErr); - - return done(); - }); - - writable.emit("error", originalErr); - }); - - it("should bubble errors from the readable stream when no behaviour is specified", function(done) { - var duplex = duplexer2(writable, readable); - - var originalErr = Error("testing"); - - duplex.on("error", function(err) { - assert.strictEqual(err, originalErr); - - return done(); - }); - - readable.emit("error", originalErr); - }); - - it("should bubble errors from the writable stream when bubbleErrors is true", function(done) { - var duplex = duplexer2({bubbleErrors: true}, writable, readable); - - var originalErr = Error("testing"); - - duplex.on("error", function(err) { - assert.strictEqual(err, originalErr); - - return done(); - }); - - writable.emit("error", originalErr); - }); - - it("should bubble errors from the readable stream when bubbleErrors is true", function(done) { - var duplex = duplexer2({bubbleErrors: true}, writable, readable); - - var originalErr = Error("testing"); - - duplex.on("error", function(err) { - assert.strictEqual(err, originalErr); - - return done(); - }); - - readable.emit("error", originalErr); - }); - - it("should not bubble errors from the writable stream when bubbleErrors is false", function(done) { - var duplex = duplexer2({bubbleErrors: false}, writable, readable); - - var timeout = setTimeout(done, 25); - - duplex.on("error", function(err) { - clearTimeout(timeout); - - return done(Error("shouldn't bubble error")); - }); - - // prevent uncaught error exception - writable.on("error", function() {}); - - writable.emit("error", Error("testing")); - }); - - it("should not bubble errors from the readable stream when bubbleErrors is false", function(done) { - var duplex = duplexer2({bubbleErrors: false}, writable, readable); - - var timeout = setTimeout(done, 25); - - duplex.on("error", function(err) { - clearTimeout(timeout); - - return done(Error("shouldn't bubble error")); - }); - - // prevent uncaught error exception - readable.on("error", function() {}); - - readable.emit("error", Error("testing")); - }); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/package.json deleted file mode 100644 index 10d6dd98..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "multipipe", - "version": "0.0.2", - "description": "pipe streams with centralized error handling", - "repository": { - "type": "git", - "url": "git://github.com/segmentio/multipipe" - }, - "dependencies": { - "duplexer2": "0.0.1" - }, - "devDependencies": { - "mocha": "~1.17.0" - }, - "scripts": { - "test": "make test" - }, - "readme": "# multipipe\n\nA better `Stream#pipe` that creates duplex streams and lets you handle errors in one place.\n\n[![build status](https://secure.travis-ci.org/segmentio/multipipe.png)](http://travis-ci.org/segmentio/multipipe)\n\n## Example\n\n```js\nvar pipe = require('multipipe');\n\n// pipe streams\nvar stream = pipe(streamA, streamB, streamC);\n\n// centralized error handling\nstream.on('error', fn);\n\n// creates a new stream\nsource.pipe(stream).pipe(dest);\n```\n\n## Duplex streams\n\n Write to the pipe and you'll really write to the first stream, read from the pipe and you'll read from the last stream.\n\n```js\nvar stream = pipe(a, b, c);\n\nsource\n .pipe(stream)\n .pipe(destination);\n```\n\n In this example the flow of data is:\n\n * source ->\n * a ->\n * b ->\n * c ->\n * destination\n\n## Error handling\n\n Each `pipe` forwards the errors the streams it wraps emit, so you have one central place to handle errors:\n\n```js\nvar stream = pipe(a, b, c);\n\nstream.on('error', function(err){\n // called three times\n});\n\na.emit('error', new Error);\nb.emit('error', new Error);\nc.emit('error', new Error);\n```\n\n## API\n\n### pipe(stream, ...)\n\nPass a variable number of streams and each will be piped to the next one.\n\nA stream will be returned that wraps passed in streams in a way that errors will be forwarded and you can write to and/or read from it.\n\n## Installation\n\n```bash\n$ npm install multipipe\n```\n\n## License\n\n MIT\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/segmentio/multipipe/issues" - }, - "homepage": "https://github.com/segmentio/multipipe", - "_id": "multipipe@0.0.2", - "_from": "multipipe@~0.0.1" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/test/multipipe.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/test/multipipe.js deleted file mode 100644 index 9d276510..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/multipipe/test/multipipe.js +++ /dev/null @@ -1,108 +0,0 @@ -var assert = require('assert'); -var pipe = require('..'); -var Stream = require('stream'); - -describe('pipe(a)', function(){ - it('should return a', function(){ - var readable = Readable(); - var stream = pipe(readable); - assert.equal(stream, readable); - }); -}); - -describe('pipe(a, b, c)', function(){ - it('should pipe internally', function(done){ - pipe(Readable(), Transform(), Writable(done)); - }); - - it('should be writable', function(done){ - var stream = pipe(Transform(), Writable(done)); - assert(stream.writable); - Readable().pipe(stream); - }); - - it('should be readable', function(done){ - var stream = pipe(Readable(), Transform()); - assert(stream.readable); - stream.pipe(Writable(done)); - }); - - it('should be readable and writable', function(done){ - var stream = pipe(Transform(), Transform()); - assert(stream.readable); - assert(stream.writable); - Readable() - .pipe(stream) - .pipe(Writable(done)); - }); - - describe('errors', function(){ - it('should reemit', function(done){ - var a = Transform(); - var b = Transform(); - var c = Transform(); - var stream = pipe(a, b, c); - var err = new Error; - var i = 0; - - stream.on('error', function(_err){ - i++; - assert.equal(_err, err); - assert(i <= 3); - if (i == 3) done(); - }); - - a.emit('error', err); - b.emit('error', err); - c.emit('error', err); - }); - - it('should not reemit endlessly', function(done){ - var a = Transform(); - var b = Transform(); - var c = Transform(); - c.readable = false; - var stream = pipe(a, b, c); - var err = new Error; - var i = 0; - - stream.on('error', function(_err){ - i++; - assert.equal(_err, err); - assert(i <= 3); - if (i == 3) done(); - }); - - a.emit('error', err); - b.emit('error', err); - c.emit('error', err); - }); - }); -}); - -function Readable(){ - var readable = new Stream.Readable({ objectMode: true }); - readable._read = function(){ - this.push('a'); - this.push(null); - }; - return readable; -} - -function Transform(){ - var transform = new Stream.Transform({ objectMode: true }); - transform._transform = function(chunk, _, done){ - done(null, chunk.toUpperCase()); - }; - return transform; -} - -function Writable(cb){ - var writable = new Stream.Writable({ objectMode: true }); - writable._write = function(chunk, _, done){ - assert.equal(chunk, 'A'); - done(); - cb(); - }; - return writable; -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/.jshintrc b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/.jshintrc deleted file mode 100644 index c8ef3ca4..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/.jshintrc +++ /dev/null @@ -1,59 +0,0 @@ -{ - "predef": [ ] - , "bitwise": false - , "camelcase": false - , "curly": false - , "eqeqeq": false - , "forin": false - , "immed": false - , "latedef": false - , "noarg": true - , "noempty": true - , "nonew": true - , "plusplus": false - , "quotmark": true - , "regexp": false - , "undef": true - , "unused": true - , "strict": false - , "trailing": true - , "maxlen": 120 - , "asi": true - , "boss": true - , "debug": true - , "eqnull": true - , "esnext": true - , "evil": true - , "expr": true - , "funcscope": false - , "globalstrict": false - , "iterator": false - , "lastsemic": true - , "laxbreak": true - , "laxcomma": true - , "loopfunc": true - , "multistr": false - , "onecase": false - , "proto": false - , "regexdash": false - , "scripturl": true - , "smarttabs": false - , "shadow": false - , "sub": true - , "supernew": false - , "validthis": true - , "browser": true - , "couch": false - , "devel": false - , "dojo": false - , "mootools": false - , "node": true - , "nonstandard": true - , "prototypejs": false - , "rhino": false - , "worker": true - , "wsh": false - , "nomen": false - , "onevar": false - , "passfail": false -} \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/.npmignore b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/.travis.yml b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/.travis.yml deleted file mode 100644 index 12b1a310..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: node_js -node_js: -- '0.8' -- '0.10' -- '0.11' -branches: - only: - - master -notifications: - email: - - rod@vagg.org -script: npm test -env: - global: - - SAUCE_USER=through2-sauce - - secure: A8KyygIlklZOcTwTGhZHpkOu7Cn4tI1QQasg75CTSjudczGzkuh1pG2RDIkWqGcrWv9o5CjI6fFYYx0JvQu8o5PO+ZAtV1Z0AlnM965vE8kAx0XEC7giAV323bibfnHwyQu74vIhbOfdes7E4/cYerV2kAjK0T375D4DYEpDuvw= - diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/LICENSE b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/LICENSE deleted file mode 100644 index f6a0029d..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/LICENSE +++ /dev/null @@ -1,39 +0,0 @@ -Copyright 2013, Rod Vagg (the "Original Author") -All rights reserved. - -MIT +no-false-attribs License - -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. - -Distributions of all or part of the Software intended to be used -by the recipients as they would use the unmodified Software, -containing modifications that substantially alter, remove, or -disable functionality of the Software, outside of the documented -configuration mechanisms provided by the Software, shall be -modified such that the Original Author's bug reporting email -addresses and urls are either replaced with the contact information -of the parties responsible for the changes, or removed entirely. - -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. - - -Except where noted, this license applies to any and all software -programs and associated documentation files created by the -Original Author, when distributed with the Software. \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/README.md deleted file mode 100644 index c9388b38..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/README.md +++ /dev/null @@ -1,131 +0,0 @@ -# through2 - -<!-- - -soon ... - -[![Build Status](https://secure.travis-ci.org/rvagg/through2.png)](http://travis-ci.org/rvagg/through2) - -[![Build Status](https://saucelabs.com/browser-matrix/through2-sauce.svg)](https://travis-ci.org/rvagg/through2) - ---> - -[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/) - -<!-- -not happy with these, we need to peg to readable-stream@1.0.x so it'll always report out-of-date - -[![david-dm](https://david-dm.org/rvagg/through2.png)](https://david-dm.org/rvagg/through2/) -[![david-dm](https://david-dm.org/rvagg/through2/dev-status.png)](https://david-dm.org/rvagg/through2#info=devDependencies/) ---> - -**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise** - -Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`. - -```js -fs.createReadStream('ex.txt') - .pipe(through2(function (chunk, enc, callback) { - - for (var i = 0; i < chunk.length; i++) - if (chunk[i] == 97) - chunk[i] = 122 // swap 'a' for 'z' - - this.push(chunk) - - callback() - - })) - .pipe(fs.createWriteStream('out.txt')) -``` - -Or object streams: - -```js -var all = [] - -fs.createReadStream('data.csv') - .pipe(csv2()) - .pipe(through2.obj(function (chunk, enc, callback) { - - var data = { - name : chunk[0] - , address : chunk[3] - , phone : chunk[10] - } - - this.push(data) - - callback() - - })) - .on('data', function (data) { - all.push(data) - }) - .on('end', function () { - doSomethingSpecial(all) - }) -``` - -Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`. - -## API - -<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b> - -Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`). - -### options - -The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`). - -The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call: - -```js -fs.createReadStream('/tmp/important.dat') - .pipe(through2({ objectMode: true, allowHalfOpen: false }, function (chunk, enc, cb) { - - this.push(new Buffer('wut?')) - cb() - - }) - .pipe(fs.createWriteStream('/tmp/wut.txt')) -``` - -### transformFunction - -The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk. - -To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on. - -If you **do not provide a `transformFunction`** then you will get a simple simple pass-through stream. - -### flushFunction - -The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress. - -<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b> - -Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances. - -```js -var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) { - if (record.temp != null && record.unit = "F") { - record.temp = ( ( record.temp - 32 ) * 5 ) / 9 - record.unit = "C" - } - this.push(record) - callback() -}) - -// Create instances of FToC like so: -var converter = new FToC() -// Or: -var converter = FToC() -// Or specify/override options when you instantiate, if you prefer: -var converter = FToC({objectMode: true}) -``` - -## License - -**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/.npmignore b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/.npmignore deleted file mode 100644 index 38344f87..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/LICENSE b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/README.md deleted file mode 100644 index 34c11897..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# readable-stream - -***Node-core streams for userland*** - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png)](https://nodei.co/npm/readable-stream/) - -This package is a mirror of the Streams2 and Streams3 implementations in Node-core. - -If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core. - -**readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12. - -**readable-stream** uses proper patch-level versioning so if you pin to `"~1.0.0"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `"~1.1.0"` - diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/duplex.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af8..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index a2e0d8e0..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -module.exports = Duplex; -var util = require('util'); -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -Object.keys(Writable.prototype).forEach(function(method) { - if (!Duplex.prototype[method]) - Duplex.prototype[method] = Writable.prototype[method]; -}); - -function Duplex(options) { - if (!(this instanceof Duplex)) - return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) - this.readable = false; - - if (options && options.writable === false) - this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) - this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) - return; - - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(this.end.bind(this)); -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 330c247d..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); -var util = require('util'); -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) - return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function(chunk, encoding, cb) { - cb(null, chunk); -}; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 9a57f147..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,928 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -module.exports = Readable; -Readable.ReadableState = ReadableState; - -var EE = require('events').EventEmitter; -if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { - return emitter.listeners(type).length; -}; -var Stream = require('stream'); -var util = require('util'); -var Buffer = require('buffer').Buffer; -var StringDecoder; - -util.inherits(Readable, Stream); - -function ReadableState(options, stream) { - options = options || {}; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = false; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // In streams that never have any data, and do push(null) right away, - // the consumer can miss the 'end' event if they do some I/O before - // consuming the stream. So, we don't emit('end') until some reading - // happens. - this.calledRead = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - if (!(this instanceof Readable)) - return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function(chunk, encoding) { - var state = this._readableState; - - if (typeof chunk === 'string' && !state.objectMode) { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = new Buffer(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function(chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (chunk === null || chunk === undefined) { - state.reading = false; - if (!state.ended) - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var e = new Error('stream.unshift() after end event'); - stream.emit('error', e); - } else { - if (state.decoder && !addToFront && !encoding) - chunk = state.decoder.write(chunk); - - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) { - state.buffer.unshift(chunk); - } else { - state.reading = false; - state.buffer.push(chunk); - } - - if (state.needReadable) - emitReadable(stream); - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - - - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && - (state.needReadable || - state.length < state.highWaterMark || - state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function(enc) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; -}; - -// Don't raise the hwm > 128MB -var MAX_HWM = 0x800000; -function roundUpToNextPowerOf2(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - for (var p = 1; p < 32; p <<= 1) n |= n >> p; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) - return 0; - - if (state.objectMode) - return n === 0 ? 0 : 1; - - if (isNaN(n) || n === null) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) - return state.buffer[0].length; - else - return state.length; - } - - if (n <= 0) - return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) - state.highWaterMark = roundUpToNextPowerOf2(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else - return state.length; - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function(n) { - var state = this._readableState; - state.calledRead = true; - var nOrig = n; - - if (typeof n !== 'number' || n > 0) - state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && - state.needReadable && - (state.length >= state.highWaterMark || state.ended)) { - emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) - endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - - // if we currently have less than the highWaterMark, then also read some - if (state.length - n <= state.highWaterMark) - doRead = true; - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) - doRead = false; - - if (doRead) { - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) - state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read called its callback synchronously, then `reading` - // will be false, and we need to re-evaluate how much data we - // can return to the user. - if (doRead && !state.reading) - n = howMuchToRead(nOrig, state); - - var ret; - if (n > 0) - ret = fromList(n, state); - else - ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) - state.needReadable = true; - - // If we happened to read() exactly the remaining amount in the - // buffer, and the EOF has been seen at this point, then make sure - // that we emit 'end' on the very next tick. - if (state.ended && !state.endEmitted && state.length === 0) - endReadable(this); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode && - !er) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - - -function onEofChunk(stream, state) { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // if we've ended and we have some data left, then emit - // 'readable' now to make sure it gets picked up. - if (state.length > 0) - emitReadable(stream); - else - endReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (state.emittedReadable) - return; - - state.emittedReadable = true; - if (state.sync) - process.nextTick(function() { - emitReadable_(stream); - }); - else - emitReadable_(stream); -} - -function emitReadable_(stream) { - stream.emit('readable'); -} - - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(function() { - maybeReadMore_(stream, state); - }); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && - state.length < state.highWaterMark) { - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break; - else - len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function(n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function(dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && - dest !== process.stdout && - dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) - process.nextTick(endFn); - else - src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - if (readable !== src) return; - cleanup(); - } - - function onend() { - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - function cleanup() { - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (!dest._writableState || dest._writableState.needDrain) - ondrain(); - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - unpipe(); - dest.removeListener('error', onerror); - if (EE.listenerCount(dest, 'error') === 0) - dest.emit('error', er); - } - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. - if (!dest._events || !dest._events.error) - dest.on('error', onerror); - else if (Array.isArray(dest._events.error)) - dest._events.error.unshift(onerror); - else - dest._events.error = [onerror, dest._events.error]; - - - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - // the handler that waits for readable events after all - // the data gets sucked out in flow. - // This would be easier to follow with a .once() handler - // in flow(), but that is too slow. - this.on('readable', pipeOnReadable); - - state.flowing = true; - process.nextTick(function() { - flow(src); - }); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function() { - var dest = this; - var state = src._readableState; - state.awaitDrain--; - if (state.awaitDrain === 0) - flow(src); - }; -} - -function flow(src) { - var state = src._readableState; - var chunk; - state.awaitDrain = 0; - - function write(dest, i, list) { - var written = dest.write(chunk); - if (false === written) { - state.awaitDrain++; - } - } - - while (state.pipesCount && null !== (chunk = src.read())) { - - if (state.pipesCount === 1) - write(state.pipes, 0, null); - else - state.pipes.forEach(write); - - src.emit('data', chunk); - - // if anyone needs a drain, then we have to wait for that. - if (state.awaitDrain > 0) - return; - } - - // if every destination was unpiped, either before entering this - // function, or in the while loop, then stop flowing. - // - // NB: This is a pretty rare edge case. - if (state.pipesCount === 0) { - state.flowing = false; - - // if there were data event listeners added, then switch to old mode. - if (EE.listenerCount(src, 'data') > 0) - emitDataEvents(src); - return; - } - - // at this point, no one needed a drain, so we just ran out of data - // on the next readable event, start it over again. - state.ranOut = true; -} - -function pipeOnReadable() { - if (this._readableState.ranOut) { - this._readableState.ranOut = false; - flow(this); - } -} - - -Readable.prototype.unpipe = function(dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) - return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) - return this; - - if (!dest) - dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - if (dest) - dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - - for (var i = 0; i < len; i++) - dests[i].emit('unpipe', this); - return this; - } - - // try to find the right one. - var i = state.pipes.indexOf(dest); - if (i === -1) - return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) - state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function(ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data' && !this._readableState.flowing) - emitDataEvents(this); - - if (ev === 'readable' && this.readable) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - this.read(0); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function() { - emitDataEvents(this); - this.read(0); - this.emit('resume'); -}; - -Readable.prototype.pause = function() { - emitDataEvents(this, true); - this.emit('pause'); -}; - -function emitDataEvents(stream, startPaused) { - var state = stream._readableState; - - if (state.flowing) { - // https://github.com/isaacs/readable-stream/issues/16 - throw new Error('Cannot switch to old mode now.'); - } - - var paused = startPaused || false; - var readable = false; - - // convert to an old-style stream. - stream.readable = true; - stream.pipe = Stream.prototype.pipe; - stream.on = stream.addListener = Stream.prototype.on; - - stream.on('readable', function() { - readable = true; - - var c; - while (!paused && (null !== (c = stream.read()))) - stream.emit('data', c); - - if (c === null) { - readable = false; - stream._readableState.needReadable = true; - } - }); - - stream.pause = function() { - paused = true; - this.emit('pause'); - }; - - stream.resume = function() { - paused = false; - if (readable) - process.nextTick(function() { - stream.emit('readable'); - }); - else - this.read(0); - this.emit('resume'); - }; - - // now make it start, just in case it hadn't already. - stream.emit('readable'); -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function(stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function() { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) - self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function(chunk) { - if (state.decoder) - chunk = state.decoder.write(chunk); - if (!chunk || !state.objectMode && !chunk.length) - return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (typeof stream[i] === 'function' && - typeof this[i] === 'undefined') { - this[i] = function(method) { return function() { - return stream[method].apply(stream, arguments); - }}(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - events.forEach(function(ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function(n) { - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - - - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) - return null; - - if (length === 0) - ret = null; - else if (objectMode) - ret = list.shift(); - else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) - ret = list.join(''); - else - ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) - ret = ''; - else - ret = new Buffer(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var buf = list[0]; - var cpy = Math.min(n - c, buf.length); - - if (stringMode) - ret += buf.slice(0, cpy); - else - buf.copy(ret, c, 0, cpy); - - if (cpy < buf.length) - list[0] = buf.slice(cpy); - else - list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) - throw new Error('endReadable called on non-empty stream'); - - if (!state.endEmitted && state.calledRead) { - state.ended = true; - process.nextTick(function() { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } - }); - } -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index 707e4b3b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); -var util = require('util'); -util.inherits(Transform, Duplex); - - -function TransformState(options, stream) { - this.afterTransform = function(er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) - return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (data !== null && data !== undefined) - stream.push(data); - - if (cb) - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - - -function Transform(options) { - if (!(this instanceof Transform)) - return new Transform(options); - - Duplex.call(this, options); - - var ts = this._transformState = new TransformState(options, this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - this.once('finish', function() { - if ('function' === typeof this._flush) - this._flush(function(er) { - done(stream, er); - }); - else - done(stream); - }); -} - -Transform.prototype.push = function(chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function(chunk, encoding, cb) { - throw new Error('not implemented'); -}; - -Transform.prototype._write = function(chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || - rs.needReadable || - rs.length < rs.highWaterMark) - this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function(n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - - -function done(stream, er) { - if (er) - return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var rs = stream._readableState; - var ts = stream._transformState; - - if (ws.length) - throw new Error('calling transform done when ws.length != 0'); - - if (ts.transforming) - throw new Error('calling transform done when still transforming'); - - return stream.push(null); -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index 32fbab77..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,378 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, cb), and it'll handle all -// the drain event emission and buffering. - -module.exports = Writable; -Writable.WritableState = WritableState; - -var util = require('util'); -var Buffer = require('buffer').Buffer; -var assert = require('assert'); -var Stream = require('stream'); - -util.inherits(Writable, Stream); - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; -} - -function WritableState(options, stream) { - options = options || {}; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function(er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.buffer = []; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; -} - -function Writable(options) { - var Duplex = require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof Duplex)) - return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function() { - this.emit('error', new Error('Cannot pipe. Not readable.')); -}; - - -function writeAfterEnd(stream, state, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); - valid = false; - } - return valid; -} - -Writable.prototype.write = function(chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - else if (!encoding) - encoding = state.defaultEncoding; - - if (typeof cb !== 'function') - cb = function() {}; - - if (state.ended) - writeAfterEnd(this, state, cb); - else if (validChunk(this, state, chunk, cb)) - ret = writeOrBuffer(this, state, chunk, encoding, cb); - - return ret; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && - state.decodeStrings !== false && - typeof chunk === 'string') { - chunk = new Buffer(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) - state.needDrain = true; - - if (state.writing) - state.buffer.push(new WriteReq(chunk, encoding, cb)); - else - doWrite(stream, state, len, chunk, encoding, cb); - - return ret; -} - -function doWrite(stream, state, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - if (sync) - process.nextTick(function() { - cb(er); - }); - else - cb(er); - - stream._writableState.errorEmitted = true; - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) - onwriteError(stream, state, sync, er, cb); - else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(stream, state); - - if (!finished && !state.bufferProcessing && state.buffer.length) - clearBuffer(stream, state); - - if (sync) { - process.nextTick(function() { - afterWrite(stream, state, finished, cb); - }); - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) - onwriteDrain(stream, state); - cb(); - if (finished) - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - - for (var c = 0; c < state.buffer.length; c++) { - var entry = state.buffer[c]; - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, len, chunk, encoding, cb); - - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - c++; - break; - } - } - - state.bufferProcessing = false; - if (c < state.buffer.length) - state.buffer = state.buffer.slice(c); - else - state.buffer.length = 0; -} - -Writable.prototype._write = function(chunk, encoding, cb) { - cb(new Error('not implemented')); -}; - -Writable.prototype.end = function(chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (typeof chunk !== 'undefined' && chunk !== null) - this.write(chunk, encoding); - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) - endWritable(this, state, cb); -}; - - -function needFinish(stream, state) { - return (state.ending && - state.length === 0 && - !state.finished && - !state.writing); -} - -function finishMaybe(stream, state) { - var need = needFinish(stream, state); - if (need) { - state.finished = true; - stream.emit('finish'); - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) - process.nextTick(cb); - else - stream.once('finish', cb); - } - state.ended = true; -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore deleted file mode 100644 index 206320cc..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -build -test diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE deleted file mode 100644 index 6de584a4..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. - -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/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md deleted file mode 100644 index 4d2aa001..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md +++ /dev/null @@ -1,7 +0,0 @@ -**string_decoder.js** (`require('string_decoder')`) from Node.js core - -Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. - -Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** - -The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js deleted file mode 100644 index 2e44a03e..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var Buffer = require('buffer').Buffer; - -var isBufferEncoding = Buffer.isEncoding - || function(encoding) { - switch (encoding && encoding.toLowerCase()) { - case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; - default: return false; - } - } - - -function assertEncoding(encoding) { - if (encoding && !isBufferEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} - -var StringDecoder = exports.StringDecoder = function(encoding) { - this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); - assertEncoding(encoding); - switch (this.encoding) { - case 'utf8': - // CESU-8 represents each of Surrogate Pair by 3-bytes - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - // UTF-16 represents each of Surrogate Pair by 2-bytes - this.surrogateSize = 2; - this.detectIncompleteChar = utf16DetectIncompleteChar; - break; - case 'base64': - // Base-64 stores 3 bytes in 4 chars, and pads the remainder. - this.surrogateSize = 3; - this.detectIncompleteChar = base64DetectIncompleteChar; - break; - default: - this.write = passThroughWrite; - return; - } - - this.charBuffer = new Buffer(6); - this.charReceived = 0; - this.charLength = 0; -}; - - -StringDecoder.prototype.write = function(buffer) { - var charStr = ''; - var offset = 0; - - // if our last write ended with an incomplete multibyte character - while (this.charLength) { - // determine how many remaining bytes this buffer has to offer for this char - var i = (buffer.length >= this.charLength - this.charReceived) ? - this.charLength - this.charReceived : - buffer.length; - - // add the new bytes to the char buffer - buffer.copy(this.charBuffer, this.charReceived, offset, i); - this.charReceived += (i - offset); - offset = i; - - if (this.charReceived < this.charLength) { - // still not enough chars in this buffer? wait for more ... - return ''; - } - - // get the character that was split - charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); - - // lead surrogate (D800-DBFF) is also the incomplete character - var charCode = charStr.charCodeAt(charStr.length - 1); - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - this.charLength += this.surrogateSize; - charStr = ''; - continue; - } - this.charReceived = this.charLength = 0; - - // if there are no more bytes in this buffer, just emit our char - if (i == buffer.length) return charStr; - - // otherwise cut off the characters end from the beginning of this buffer - buffer = buffer.slice(i, buffer.length); - break; - } - - var lenIncomplete = this.detectIncompleteChar(buffer); - - var end = buffer.length; - if (this.charLength) { - // buffer the incomplete character bytes we got - buffer.copy(this.charBuffer, 0, buffer.length - lenIncomplete, end); - this.charReceived = lenIncomplete; - end -= lenIncomplete; - } - - charStr += buffer.toString(this.encoding, 0, end); - - var end = charStr.length - 1; - var charCode = charStr.charCodeAt(end); - // lead surrogate (D800-DBFF) is also the incomplete character - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - var size = this.surrogateSize; - this.charLength += size; - this.charReceived += size; - this.charBuffer.copy(this.charBuffer, size, 0, size); - this.charBuffer.write(charStr.charAt(charStr.length - 1), this.encoding); - return charStr.substring(0, end); - } - - // or just emit the charStr - return charStr; -}; - -StringDecoder.prototype.detectIncompleteChar = function(buffer) { - // determine how many bytes we have to check at the end of this buffer - var i = (buffer.length >= 3) ? 3 : buffer.length; - - // Figure out if one of the last i bytes of our buffer announces an - // incomplete char. - for (; i > 0; i--) { - var c = buffer[buffer.length - i]; - - // See http://en.wikipedia.org/wiki/UTF-8#Description - - // 110XXXXX - if (i == 1 && c >> 5 == 0x06) { - this.charLength = 2; - break; - } - - // 1110XXXX - if (i <= 2 && c >> 4 == 0x0E) { - this.charLength = 3; - break; - } - - // 11110XXX - if (i <= 3 && c >> 3 == 0x1E) { - this.charLength = 4; - break; - } - } - - return i; -}; - -StringDecoder.prototype.end = function(buffer) { - var res = ''; - if (buffer && buffer.length) - res = this.write(buffer); - - if (this.charReceived) { - var cr = this.charReceived; - var buf = this.charBuffer; - var enc = this.encoding; - res += buf.slice(0, cr).toString(enc); - } - - return res; -}; - -function passThroughWrite(buffer) { - return buffer.toString(this.encoding); -} - -function utf16DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 2; - this.charLength = incomplete ? 2 : 0; - return incomplete; -} - -function base64DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 3; - this.charLength = incomplete ? 3 : 0; - return incomplete; -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json deleted file mode 100644 index 7f5d0011..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "string_decoder", - "version": "0.10.25-1", - "description": "The string_decoder module from Node core", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "tap": "~0.4.8" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/rvagg/string_decoder.git" - }, - "homepage": "https://github.com/rvagg/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "readme": "**string_decoder.js** (`require('string_decoder')`) from Node.js core\n\nCopyright Joyent, Inc. and other Node contributors. See LICENCE file for details.\n\nVersion numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.**\n\nThe *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version.", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/rvagg/string_decoder/issues" - }, - "_id": "string_decoder@0.10.25-1", - "_from": "string_decoder@~0.10.x" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/package.json deleted file mode 100644 index 3723fdf3..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "readable-stream", - "version": "1.0.26-2", - "description": "An exploration of a new kind of readable streams for Node.js", - "main": "readable.js", - "dependencies": { - "string_decoder": "~0.10.x" - }, - "devDependencies": { - "tap": "~0.2.6" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/readable-stream" - }, - "keywords": [ - "readable", - "stream", - "pipe" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "BSD", - "readme": "# readable-stream\n\n***Node-core streams for userland***\n\n[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true)](https://nodei.co/npm/readable-stream/)\n[![NPM](https://nodei.co/npm-dl/readable-stream.png)](https://nodei.co/npm/readable-stream/)\n\nThis package is a mirror of the Streams2 and Streams3 implementations in Node-core.\n\nIf you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *\"stream\"* module in Node-core.\n\n**readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12.\n\n**readable-stream** uses proper patch-level versioning so if you pin to `\"~1.0.0\"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `\"~1.1.0\"`\n\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/readable-stream/issues" - }, - "homepage": "https://github.com/isaacs/readable-stream", - "_id": "readable-stream@1.0.26-2", - "dist": { - "shasum": "85dd7415f13356c98300d6d260c3a62fc656b1b1" - }, - "_from": "readable-stream@~1.0.17", - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.26-2.tgz" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/passthrough.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a5..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/readable.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/readable.js deleted file mode 100644 index 4d1ddfc7..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,6 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/transform.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f07..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/writable.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efdf..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/.npmignore b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/LICENCE b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/LICENCE deleted file mode 100644 index a23e08a8..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 Raynos. - -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. \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/Makefile b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/Makefile deleted file mode 100644 index d583fcf4..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -browser: - node ./support/compile - -.PHONY: browser \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/README.md deleted file mode 100644 index 389adae3..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# xtend - -[![browser support][3]][4] - -Extend like a boss - -xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence. - -## Examples - -```js -var extend = require("xtend") - -var combination = extend({ - a: "a" -}, { - b: "b" -}) -// { a: "a", b: "b" } -``` - - -## MIT Licenced - - - [3]: http://ci.testling.com/Raynos/xtend.png - [4]: http://ci.testling.com/Raynos/xtend diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/has-keys.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/has-keys.js deleted file mode 100644 index 62391e78..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/has-keys.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = hasKeys - -function hasKeys(source) { - return source !== null && - (typeof source === "object" || - typeof source === "function") -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/index.js deleted file mode 100644 index 20937d19..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/index.js +++ /dev/null @@ -1,25 +0,0 @@ -var Keys = require("object-keys") -var hasKeys = require("./has-keys") - -module.exports = extend - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - if (!hasKeys(source)) { - continue - } - - var keys = Keys(source) - - for (var j = 0; j < keys.length; j++) { - var name = keys[j] - target[name] = source[name] - } - } - - return target -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/mutable.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/mutable.js deleted file mode 100644 index 17454ae4..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/mutable.js +++ /dev/null @@ -1,25 +0,0 @@ -var Keys = require("object-keys") -var hasKeys = require("./has-keys") - -module.exports = extend - -function extend(target) { - var sources = [].slice.call(arguments, 1) - - for (var i = 0; i < sources.length; i++) { - var source = sources[i] - - if (!hasKeys(source)) { - continue - } - - var keys = Keys(source) - - for (var j = 0; j < keys.length; j++) { - var name = keys[j] - target[name] = source[name] - } - } - - return target -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml deleted file mode 100644 index 60d00ce1..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.8" - - "0.6" diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md deleted file mode 100644 index ab32d0ad..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md +++ /dev/null @@ -1,39 +0,0 @@ -#object-keys <sup>[![Version Badge][2]][1]</sup> - -[![Build Status][3]][4] [![dependency status][5]][6] - -[![browser support][7]][8] - -An Object.keys shim. Uses Object.keys if available. - -## Example - -```js -var keys = require('object-keys'); -var assert = require('assert'); -var obj = { - a: true, - b: true, - c: true -}; - -assert.equal(keys(obj), ['a', 'b', 'c']); -``` - -## Source -Implementation taken directly from [es5-shim]([9]), with modifications, including from [lodash]([10]). - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[1]: https://npmjs.org/package/object-keys -[2]: http://vb.teelaun.ch/ljharb/object-keys.svg -[3]: https://travis-ci.org/ljharb/object-keys.png -[4]: https://travis-ci.org/ljharb/object-keys -[5]: https://david-dm.org/ljharb/object-keys.png -[6]: https://david-dm.org/ljharb/object-keys -[7]: https://ci.testling.com/ljharb/object-keys.png -[8]: https://ci.testling.com/ljharb/object-keys -[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589 -[10]: https://github.com/bestiejs/lodash - diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js deleted file mode 100644 index db32d458..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js +++ /dev/null @@ -1,40 +0,0 @@ -var hasOwn = Object.prototype.hasOwnProperty; -var toString = Object.prototype.toString; - -var isFunction = function (fn) { - var isFunc = (typeof fn === 'function' && !(fn instanceof RegExp)) || toString.call(fn) === '[object Function]'; - if (!isFunc && typeof window !== 'undefined') { - isFunc = fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt; - } - return isFunc; -}; - -module.exports = function forEach(obj, fn) { - if (!isFunction(fn)) { - throw new TypeError('iterator must be a function'); - } - var i, k, - isString = typeof obj === 'string', - l = obj.length, - context = arguments.length > 2 ? arguments[2] : null; - if (l === +l) { - for (i = 0; i < l; i++) { - if (context === null) { - fn(isString ? obj.charAt(i) : obj[i], i, obj); - } else { - fn.call(context, isString ? obj.charAt(i) : obj[i], i, obj); - } - } - } else { - for (k in obj) { - if (hasOwn.call(obj, k)) { - if (context === null) { - fn(obj[k], k, obj); - } else { - fn.call(context, obj[k], k, obj); - } - } - } - } -}; - diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js deleted file mode 100644 index f5b24b6d..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js +++ /dev/null @@ -1,2 +0,0 @@ -module.exports = Object.keys || require('./shim'); - diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js deleted file mode 100644 index 74a09897..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js +++ /dev/null @@ -1,16 +0,0 @@ -var toString = Object.prototype.toString; - -module.exports = function isArguments(value) { - var str = toString.call(value); - var isArguments = str === '[object Arguments]'; - if (!isArguments) { - isArguments = str !== '[object Array]' - && value !== null - && typeof value === 'object' - && typeof value.length === 'number' - && value.length >= 0 - && toString.call(value.callee) === '[object Function]'; - } - return isArguments; -}; - diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json deleted file mode 100644 index 1de9cbb3..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "object-keys", - "version": "0.4.0", - "author": { - "name": "Jordan Harband" - }, - "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/kriskowal/es5-shim", - "license": "MIT", - "main": "index.js", - "scripts": { - "test": "node test/index.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/ljharb/object-keys.git" - }, - "keywords": [ - "Object.keys", - "keys", - "ES5", - "shim" - ], - "dependencies": {}, - "devDependencies": { - "foreach": "~2.0.3", - "is": "~0.2.6", - "tape": "~1.0.4", - "indexof": "~0.0.1" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "readme": "#object-keys <sup>[![Version Badge][2]][1]</sup>\n\n[![Build Status][3]][4] [![dependency status][5]][6]\n\n[![browser support][7]][8]\n\nAn Object.keys shim. Uses Object.keys if available.\n\n## Example\n\n```js\nvar keys = require('object-keys');\nvar assert = require('assert');\nvar obj = {\n\ta: true,\n\tb: true,\n\tc: true\n};\n\nassert.equal(keys(obj), ['a', 'b', 'c']);\n```\n\n## Source\nImplementation taken directly from [es5-shim]([9]), with modifications, including from [lodash]([10]).\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[1]: https://npmjs.org/package/object-keys\n[2]: http://vb.teelaun.ch/ljharb/object-keys.svg\n[3]: https://travis-ci.org/ljharb/object-keys.png\n[4]: https://travis-ci.org/ljharb/object-keys\n[5]: https://david-dm.org/ljharb/object-keys.png\n[6]: https://david-dm.org/ljharb/object-keys\n[7]: https://ci.testling.com/ljharb/object-keys.png\n[8]: https://ci.testling.com/ljharb/object-keys\n[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589\n[10]: https://github.com/bestiejs/lodash\n\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/ljharb/object-keys/issues" - }, - "homepage": "https://github.com/ljharb/object-keys", - "_id": "object-keys@0.4.0", - "_from": "object-keys@~0.4.0" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js deleted file mode 100644 index b88421be..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js +++ /dev/null @@ -1,62 +0,0 @@ -(function () { - "use strict"; - - // modified from https://github.com/kriskowal/es5-shim - var has = Object.prototype.hasOwnProperty, - toString = Object.prototype.toString, - forEach = require('./foreach'), - isArgs = require('./isArguments'), - hasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'), - hasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype'), - dontEnums = [ - "toString", - "toLocaleString", - "valueOf", - "hasOwnProperty", - "isPrototypeOf", - "propertyIsEnumerable", - "constructor" - ], - keysShim; - - keysShim = function keys(object) { - var isObject = object !== null && typeof object === 'object', - isFunction = toString.call(object) === '[object Function]', - isArguments = isArgs(object), - theKeys = []; - - if (!isObject && !isFunction && !isArguments) { - throw new TypeError("Object.keys called on a non-object"); - } - - if (isArguments) { - forEach(object, function (value) { - theKeys.push(value); - }); - } else { - var name, - skipProto = hasProtoEnumBug && isFunction; - - for (name in object) { - if (!(skipProto && name === 'prototype') && has.call(object, name)) { - theKeys.push(name); - } - } - } - - if (hasDontEnumBug) { - var ctor = object.constructor, - skipConstructor = ctor && ctor.prototype === object; - - forEach(dontEnums, function (dontEnum) { - if (!(skipConstructor && dontEnum === 'constructor') && has.call(object, dontEnum)) { - theKeys.push(dontEnum); - } - }); - } - return theKeys; - }; - - module.exports = keysShim; -}()); - diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js deleted file mode 100644 index f29f065a..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js +++ /dev/null @@ -1,156 +0,0 @@ -var test = require('tape'); -var forEach = require('../foreach.js'); - -test('second argument: iterator', function (t) { - var arr = []; - t.throws(function () { forEach(arr); }, TypeError, 'undefined is not a function'); - t.throws(function () { forEach(arr, null); }, TypeError, 'null is not a function'); - t.throws(function () { forEach(arr, ''); }, TypeError, 'string is not a function'); - t.throws(function () { forEach(arr, /a/); }, TypeError, 'regex is not a function'); - t.throws(function () { forEach(arr, true); }, TypeError, 'true is not a function'); - t.throws(function () { forEach(arr, false); }, TypeError, 'false is not a function'); - t.throws(function () { forEach(arr, NaN); }, TypeError, 'NaN is not a function'); - t.throws(function () { forEach(arr, 42); }, TypeError, '42 is not a function'); - t.doesNotThrow(function () { forEach(arr, function () {}); }, 'function is a function'); - t.doesNotThrow(function () { forEach(arr, setTimeout); }, 'setTimeout is a function'); - if (typeof window !== 'undefined') { - t.doesNotThrow(function () { forEach(arr, window.alert); }, 'alert is a function'); - } - t.end(); -}); - -test('array', function (t) { - var arr = [1, 2, 3]; - - t.test('iterates over every item', function (st) { - var index = 0; - forEach(arr, function () { index += 1; }); - st.equal(index, arr.length, 'iterates ' + arr.length + ' times'); - st.end(); - }); - - t.test('first iterator argument', function (st) { - var index = 0; - st.plan(arr.length); - forEach(arr, function (item) { - st.equal(arr[index], item, 'item ' + index + ' is passed as first argument'); - index += 1; - }); - st.end(); - }); - - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(arr.length); - forEach(arr, function (item, index) { - st.equal(counter, index, 'index ' + index + ' is passed as second argument'); - counter += 1; - }); - st.end(); - }); - - t.test('third iterator argument', function (st) { - st.plan(arr.length); - forEach(arr, function (item, index, array) { - st.deepEqual(arr, array, 'array is passed as third argument'); - }); - st.end(); - }); - - t.test('context argument', function (st) { - var context = {}; - st.plan(arr.length); - forEach(arr, function () { - st.equal(this, context, '"this" is the passed context'); - }, context); - st.end(); - }); - - t.end(); -}); - -test('object', function (t) { - var obj = { - a: 1, - b: 2, - c: 3 - }; - var keys = ['a', 'b', 'c']; - - var F = function () { - this.a = 1; - this.b = 2; - }; - F.prototype.c = 3; - var fKeys = ['a', 'b']; - - t.test('iterates over every object literal key', function (st) { - var counter = 0; - forEach(obj, function () { counter += 1; }); - st.equal(counter, keys.length, 'iterated ' + counter + ' times'); - st.end(); - }); - - t.test('iterates only over own keys', function (st) { - var counter = 0; - forEach(new F(), function () { counter += 1; }); - st.equal(counter, fKeys.length, 'iterated ' + fKeys.length + ' times'); - st.end(); - }); - - t.test('first iterator argument', function (st) { - var index = 0; - st.plan(keys.length); - forEach(obj, function (item) { - st.equal(obj[keys[index]], item, 'item at key ' + keys[index] + ' is passed as first argument'); - index += 1; - }); - st.end(); - }); - - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(keys.length); - forEach(obj, function (item, key) { - st.equal(keys[counter], key, 'key ' + key + ' is passed as second argument'); - counter += 1; - }); - st.end(); - }); - - t.test('third iterator argument', function (st) { - st.plan(keys.length); - forEach(obj, function (item, key, object) { - st.deepEqual(obj, object, 'object is passed as third argument'); - }); - st.end(); - }); - - t.test('context argument', function (st) { - var context = {}; - st.plan(1); - forEach({foo: 'bar'}, function () { - st.equal(this, context, '"this" is the passed context'); - }, context); - st.end(); - }); - - t.end(); -}); - - -test('string', function (t) { - var str = 'str'; - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(str.length * 2 + 1); - forEach(str, function (item, index) { - st.equal(counter, index, 'index ' + index + ' is passed as second argument'); - st.equal(str.charAt(index), item); - counter += 1; - }); - st.equal(counter, str.length, 'iterates ' + str.length + ' times'); - }); - t.end(); -}); - diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js deleted file mode 100644 index 8b77b1fc..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js +++ /dev/null @@ -1,6 +0,0 @@ - -require('./foreach'); -require('./isArguments'); - -require('./shim'); - diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js deleted file mode 100644 index 62a07c2d..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js +++ /dev/null @@ -1,10 +0,0 @@ -var test = require('tape'); -var isArguments = require('../isArguments'); - -test('is.arguments', function (t) { - t.notOk(isArguments([]), 'array is not arguments'); - (function () { t.ok(isArguments(arguments), 'arguments is arguments'); }()); - (function () { t.notOk(isArguments(Array.prototype.slice.call(arguments)), 'sliced arguments is not arguments'); }()); - t.end(); -}); - diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js deleted file mode 100644 index 9d932712..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js +++ /dev/null @@ -1,134 +0,0 @@ -var test = require('tape'); -var shimmedKeys = require('../index.js'); -var is = require('is'); -var keys = require('../shim.js'); -var forEach = require('foreach'); -var indexOf = require('indexof'); - -var obj = { - "str": "boz", - "obj": {}, - "arr": [], - "bool": true, - "num": 42, - "aNull": null, - "undef": undefined -}; -var objKeys = ['str', 'obj', 'arr', 'bool', 'num', 'aNull', 'undef']; - -test('exports a function', function (t) { - if (Object.keys) { - t.equal(Object.keys, shimmedKeys, 'Object.keys is supported and exported'); - } else { - t.equal(keys, shimmedKeys, 'Object.keys is not supported; shim is exported'); - } - t.end(); -}); - -test('working with actual shim', function (t) { - t.notEqual(Object.keys, keys, 'keys shim is not native Object.keys'); - t.end(); -}); - -test('works with an object literal', function (t) { - var theKeys = keys(obj); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, objKeys, 'Object has expected keys'); - t.end(); -}); - -test('works with an array', function (t) { - var arr = [1, 2, 3]; - var theKeys = keys(arr); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, ['0', '1', '2'], 'Array has expected keys'); - t.end(); -}); - -test('works with a function', function (t) { - var foo = function () {}; - foo.a = true; - - t.doesNotThrow(function () { return keys(foo); }, 'does not throw an error'); - t.deepEqual(keys(foo), ['a'], 'returns expected keys'); - t.end(); -}); - -test('returns names which are own properties', function (t) { - forEach(keys(obj), function (name) { - t.equal(obj.hasOwnProperty(name), true, name + ' should be returned'); - }); - t.end(); -}); - -test('returns names which are enumerable', function (t) { - var k, loopedValues = []; - for (k in obj) { - loopedValues.push(k); - } - forEach(keys(obj), function (name) { - t.notEqual(indexOf(loopedValues, name), -1, name + ' is not enumerable'); - }); - t.end(); -}); - -test('throws an error for a non-object', function (t) { - t.throws( - function () { return keys(42); }, - new TypeError('Object.keys called on a non-object'), - 'throws on a non-object' - ); - t.end(); -}); - -test('works with an object instance', function (t) { - var Prototype = function () {}; - Prototype.prototype.foo = true; - var obj = new Prototype(); - obj.bar = true; - var theKeys = keys(obj); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, ['bar'], 'Instance has expected keys'); - t.end(); -}); - -test('works in iOS 5 mobile Safari', function (t) { - var Foo = function () {}; - Foo.a = function () {}; - - // the bug is keys(Foo) => ['a', 'prototype'] instead of ['a'] - t.deepEqual(keys(Foo), ['a'], 'has expected keys'); - t.end(); -}); - -test('works in environments with the dontEnum bug (IE < 9)', function (t) { - var Foo = function () {}; - Foo.prototype.a = function () {}; - - // the bug is keys(Foo.prototype) => ['a', 'constructor'] instead of ['a'] - t.deepEqual(keys(Foo.prototype), ['a'], 'has expected keys'); - t.end(); -}); - -test('shadowed properties', function (t) { - var shadowedProps = [ - 'dummyControlProp', /* just to be sure */ - 'constructor', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'toLocaleString', - 'toString', - 'valueOf' - ]; - shadowedProps.sort(); - var shadowedObject = {}; - forEach(shadowedProps, function (value, index) { - shadowedObject[value] = index; - }); - var shadowedObjectKeys = keys(shadowedObject); - shadowedObjectKeys.sort(); - t.deepEqual(shadowedObjectKeys, shadowedProps, 'troublesome shadowed properties are keys of object literals'); - t.end(); -}); - diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/package.json deleted file mode 100644 index c52e4efc..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "xtend", - "version": "2.1.2", - "description": "extend like a boss", - "keywords": [ - "extend", - "merge", - "options", - "opts", - "object", - "array" - ], - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Raynos/xtend.git" - }, - "main": "index", - "scripts": { - "test": "node test" - }, - "dependencies": { - "object-keys": "~0.4.0" - }, - "devDependencies": { - "tape": "~1.1.0" - }, - "homepage": "https://github.com/Raynos/xtend", - "contributors": [ - { - "name": "Jake Verbaten" - }, - { - "name": "Matt Esch" - } - ], - "bugs": { - "url": "https://github.com/Raynos/xtend/issues", - "email": "raynos2@gmail.com" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/raynos/xtend/raw/master/LICENSE" - } - ], - "testling": { - "files": "test.js", - "browsers": [ - "ie/7..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "engines": { - "node": ">=0.4" - }, - "readme": "# xtend\n\n[![browser support][3]][4]\n\nExtend like a boss\n\nxtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence.\n\n## Examples\n\n```js\nvar extend = require(\"xtend\")\n\nvar combination = extend({\n a: \"a\"\n}, {\n b: \"b\"\n})\n// { a: \"a\", b: \"b\" }\n```\n\n\n## MIT Licenced\n\n\n [3]: http://ci.testling.com/Raynos/xtend.png\n [4]: http://ci.testling.com/Raynos/xtend\n", - "readmeFilename": "README.md", - "_id": "xtend@2.1.2", - "_from": "xtend@~2.1.1" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/test.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/test.js deleted file mode 100644 index 3369d796..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/node_modules/xtend/test.js +++ /dev/null @@ -1,63 +0,0 @@ -var test = require("tape") -var extend = require("./") -var mutableExtend = require("./mutable") - -test("merge", function(assert) { - var a = { a: "foo" } - var b = { b: "bar" } - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("replace", function(assert) { - var a = { a: "foo" } - var b = { a: "bar" } - - assert.deepEqual(extend(a, b), { a: "bar" }) - assert.end() -}) - -test("undefined", function(assert) { - var a = { a: undefined } - var b = { b: "foo" } - - assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) - assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) - assert.end() -}) - -test("handle 0", function(assert) { - var a = { a: "default" } - var b = { a: 0 } - - assert.deepEqual(extend(a, b), { a: 0 }) - assert.deepEqual(extend(b, a), { a: "default" }) - assert.end() -}) - -test("is immutable", function (assert) { - var record = {} - - extend(record, { foo: "bar" }) - assert.equal(record.foo, undefined) - assert.end() -}) - -test("null as argument", function (assert) { - var a = { foo: "bar" } - var b = null - var c = void 0 - - assert.deepEqual(extend(b, a, c), { foo: "bar" }) - assert.end() -}) - -test("mutable", function (assert) { - var a = { foo: "bar" } - - mutableExtend(a, { bar: "baz" }) - - assert.equal(a.bar, "baz") - assert.end() -}) diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/package.json deleted file mode 100644 index 3d0e0c8b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "through2", - "version": "0.4.1", - "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", - "main": "through2.js", - "scripts": { - "test": "node test/test.js", - "test-local": "brtapsauce-local test/basic-test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/rvagg/through2.git" - }, - "keywords": [ - "stream", - "streams2", - "through", - "transform" - ], - "author": { - "name": "Rod Vagg", - "email": "r@va.gg", - "url": "https://github.com/rvagg" - }, - "license": "MIT", - "dependencies": { - "readable-stream": "~1.0.17", - "xtend": "~2.1.1" - }, - "devDependencies": { - "tape": "~2.3.0", - "bl": "~0.6.0", - "stream-spigot": "~3.0.1", - "brtapsauce": "~0.2.2" - }, - "readme": "# through2\n\n<!--\n\nsoon ...\n\n[![Build Status](https://secure.travis-ci.org/rvagg/through2.png)](http://travis-ci.org/rvagg/through2)\n\n[![Build Status](https://saucelabs.com/browser-matrix/through2-sauce.svg)](https://travis-ci.org/rvagg/through2)\n\n-->\n\n[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/) \n\n<!--\nnot happy with these, we need to peg to readable-stream@1.0.x so it'll always report out-of-date\n\n[![david-dm](https://david-dm.org/rvagg/through2.png)](https://david-dm.org/rvagg/through2/)\n[![david-dm](https://david-dm.org/rvagg/through2/dev-status.png)](https://david-dm.org/rvagg/through2#info=devDependencies/)\n-->\n\n**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise**\n\nInspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.\n\n```js\nfs.createReadStream('ex.txt')\n .pipe(through2(function (chunk, enc, callback) {\n\n for (var i = 0; i < chunk.length; i++)\n if (chunk[i] == 97)\n chunk[i] = 122 // swap 'a' for 'z'\n\n this.push(chunk)\n \n callback()\n\n }))\n .pipe(fs.createWriteStream('out.txt'))\n```\n\nOr object streams:\n\n```js\nvar all = []\n\nfs.createReadStream('data.csv')\n .pipe(csv2())\n .pipe(through2.obj(function (chunk, enc, callback) {\n\n var data = {\n name : chunk[0]\n , address : chunk[3]\n , phone : chunk[10]\n }\n \n this.push(data)\n \n callback()\n\n }))\n .on('data', function (data) {\n all.push(data)\n })\n .on('end', function () {\n doSomethingSpecial(all)\n })\n```\n\nNote that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`.\n\n## API\n\n<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b>\n\nConsult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).\n\n### options\n\nThe options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`).\n\nThe `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call:\n\n```js\nfs.createReadStream('/tmp/important.dat')\n .pipe(through2({ objectMode: true, allowHalfOpen: false }, function (chunk, enc, cb) {\n\n this.push(new Buffer('wut?'))\n cb()\n\n })\n .pipe(fs.createWriteStream('/tmp/wut.txt'))\n```\n\n### transformFunction\n\nThe `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk.\n\nTo queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on.\n\nIf you **do not provide a `transformFunction`** then you will get a simple simple pass-through stream.\n\n### flushFunction\n\nThe optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress.\n\n<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b>\n\nInstead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.\n\n```js\nvar FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) {\n if (record.temp != null && record.unit = \"F\") {\n record.temp = ( ( record.temp - 32 ) * 5 ) / 9\n record.unit = \"C\"\n }\n this.push(record)\n callback()\n})\n\n// Create instances of FToC like so:\nvar converter = new FToC()\n// Or:\nvar converter = FToC()\n// Or specify/override options when you instantiate, if you prefer:\nvar converter = FToC({objectMode: true})\n```\n\n## License\n\n**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/rvagg/through2/issues" - }, - "homepage": "https://github.com/rvagg/through2", - "_id": "through2@0.4.1", - "_from": "through2@~0.4.0" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/test/basic-test.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/test/basic-test.js deleted file mode 100644 index 9d137c7f..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/test/basic-test.js +++ /dev/null @@ -1,334 +0,0 @@ -const test = require('tape') - , through2 = require('../') - , crypto = require('crypto') - , bl = require('bl') - , spigot = require('stream-spigot') - -test('plain through', function (t) { - var th2 = through2(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') - t.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('pipeable through', function (t) { - var th2 = through2(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - // bl() acts like a proper streams2 stream and passes as much as it's - // asked for, so we really only get one write with such a small amount - // of data - t.equal(s, 'aaaaaaaaaaaaaaaaaaaaaaaaa', 'got transformed string') - t.end() - })) - - var bufs = bl() - bufs.append(crypto.randomBytes(10)) - bufs.append(crypto.randomBytes(5)) - bufs.append(crypto.randomBytes(10)) - bufs.pipe(th2) -}) - -test('object through', function (t) { - t.plan(3) - - var th2 = through2({ objectMode: true}, function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object through with through2.obj', function (t) { - t.plan(3) - - var th2 = through2.obj(function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('flushing through', function (t) { - var th2 = through2(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }, function (callback) { - this.push(new Buffer([ 101, 110, 100 ])) - callback() - }) - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal(s, 'aaaaaaaaaabbbbbccccccccccend', 'got transformed string') - t.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('plain through ctor', function (t) { - var Th2 = through2.ctor(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - var th2 = new Th2() - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') - t.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('reuse through ctor', function (t) { - t.plan(4) - - var Th2 = through2.ctor(function (chunk, enc, callback) { - if (!this._i) { - t.ok(1, 'did not contain previous instance data (this._i)') - this._i = 97 // 'a' - } else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - var th2 = Th2() - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') - - var newInstance = Th2() - newInstance.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaabbbbccccccc', s, 'got transformed string') - })) - - newInstance.write(crypto.randomBytes(7)) - newInstance.write(crypto.randomBytes(4)) - newInstance.write(crypto.randomBytes(7)) - newInstance.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('object through ctor', function (t) { - t.plan(3) - - var Th2 = through2.ctor({ objectMode: true}, function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = new Th2() - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('pipeable object through ctor', function (t) { - t.plan(4) - - var Th2 = through2.ctor({ objectMode: true}, function (record, enc, callback) { - if (record.temp != null && record.unit == 'F') { - record.temp = ( ( record.temp - 32 ) * 5 ) / 9 - record.unit = 'C' - } - this.push(record) - callback() - }) - - var th2 = Th2() - - var expect = [-19, -40, 100, 22] - th2.on('data', function (o) { - t.deepEqual(o, { temp: expect.shift(), unit: 'C' }, 'got transformed object') - }) - - spigot({objectMode: true}, [ - {temp: -2.2, unit: 'F'}, - {temp: -40, unit: 'F'}, - {temp: 212, unit: 'F'}, - {temp: 22, unit: 'C'} - ]).pipe(th2) -}) - -test('object through ctor override', function (t) { - t.plan(3) - - var Th2 = through2.ctor(function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2({objectMode: true}) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object settings available in transform', function (t) { - t.plan(6) - - var Th2 = through2.ctor({objectMode: true, peek: true}, function (chunk, enc, callback) { - t.ok(this.options.peek, "reading options from inside _transform") - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2() - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object settings available in transform override', function (t) { - t.plan(6) - - var Th2 = through2.ctor(function (chunk, enc, callback) { - t.ok(this.options.peek, "reading options from inside _transform") - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2({objectMode: true, peek: true}) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object override extends options', function (t) { - t.plan(6) - - var Th2 = through2.ctor({objectMode: true}, function (chunk, enc, callback) { - t.ok(this.options.peek, "reading options from inside _transform") - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2({peek: true}) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/test/bench.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/test/bench.js deleted file mode 100644 index cc10868b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/test/bench.js +++ /dev/null @@ -1,42 +0,0 @@ -/* -on rvagg@fletcher: - @0.2.3: Ran 36719 iterations in 10000 ms -*/ - -const through2 = require('../') - , bl = require('bl') - , crypto = require('crypto') - , assert = require('assert') - -function run (callback) { - var bufs = Array.apply(null, Array(10)).map(function () { return crypto.randomBytes(32) }) - , stream = through2(function (chunk, env, callback) { - callback(null, chunk.toString('hex')) - }) - - stream.pipe(bl(function (err, data) { - assert(!err) - assert.equal(data.toString(), Buffer.concat(bufs).toString('hex')) - callback() - })) - - bufs.forEach(function (b) { - stream.write(b) - }) - stream.end() -} - -var count = 0 - , start = Date.now() - -;(function exec () { - count++ - run(function () { - if (Date.now() - start < 1000 * 10) { - return setImmediate(exec) - } - console.log('Ran', count, 'iterations in', Date.now() - start, 'ms') - }) -}()) - -console.log('Running for ~10s') \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/test/sauce.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/test/sauce.js deleted file mode 100644 index a6d28625..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/test/sauce.js +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env node - -const user = process.env.SAUCE_USER - , key = process.env.SAUCE_KEY - , path = require('path') - , brtapsauce = require('brtapsauce') - , testFile = path.join(__dirname, 'basic-test.js') - - , capabilities = [ - { browserName: 'chrome' , platform: 'Windows XP', version: '' } - , { browserName: 'firefox' , platform: 'Windows 8' , version: '' } - , { browserName: 'firefox' , platform: 'Windows XP', version: '4' } - , { browserName: 'internet explorer' , platform: 'Windows 8' , version: '10' } - , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '9' } - , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '8' } - , { browserName: 'internet explorer' , platform: 'Windows XP', version: '7' } - , { browserName: 'internet explorer' , platform: 'Windows XP', version: '6' } - , { browserName: 'safari' , platform: 'Windows 7' , version: '5' } - , { browserName: 'safari' , platform: 'OS X 10.8' , version: '6' } - , { browserName: 'opera' , platform: 'Windows 7' , version: '' } - , { browserName: 'opera' , platform: 'Windows 7' , version: '11' } - , { browserName: 'ipad' , platform: 'OS X 10.8' , version: '6' } - , { browserName: 'android' , platform: 'Linux' , version: '4.0', 'device-type': 'tablet' } - ] - -if (!user) - throw new Error('Must set a SAUCE_USER env var') -if (!key) - throw new Error('Must set a SAUCE_KEY env var') - -brtapsauce({ - name : 'Traversty' - , user : user - , key : key - , brsrc : testFile - , capabilities : capabilities - , options : { timeout: 60 * 6 } -}) \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/test/test.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/test/test.js deleted file mode 100644 index aa9b4877..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/test/test.js +++ /dev/null @@ -1,9 +0,0 @@ -require('./basic-test') - -if (!process.env.SAUCE_KEY || !process.env.SAUCE_USER) - return console.log('SAUCE_KEY and/or SAUCE_USER not set, not running sauce tests') - -if (!/v0\.10/.test(process.version)) - return console.log('Not Node v0.10.x, not running sauce tests') - -require('./sauce.js') \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/through2.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/through2.js deleted file mode 100644 index c1104848..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/through2/through2.js +++ /dev/null @@ -1,78 +0,0 @@ -var Transform = require('readable-stream/transform') - , inherits = require('util').inherits - , xtend = require('xtend') - - -// a noop _transform function -function noop (chunk, enc, callback) { - callback(null, chunk) -} - - -// create a new export function, used by both the main export and -// the .ctor export, contains common logic for dealing with arguments -function through2 (construct) { - return function (options, transform, flush) { - if (typeof options == 'function') { - flush = transform - transform = options - options = {} - } - - if (typeof transform != 'function') - transform = noop - - if (typeof flush != 'function') - flush = null - - return construct(options, transform, flush) - } -} - - -// main export, just make me a transform stream! -module.exports = through2(function (options, transform, flush) { - var t2 = new Transform(options) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) - - -// make me a reusable prototype that I can `new`, or implicitly `new` -// with a constructor call -module.exports.ctor = through2(function (options, transform, flush) { - function Through2 (override) { - if (!(this instanceof Through2)) - return new Through2(override) - - this.options = xtend(options, override) - - Transform.call(this, this.options) - } - - inherits(Through2, Transform) - - Through2.prototype._transform = transform - - if (flush) - Through2.prototype._flush = flush - - return Through2 -}) - - -module.exports.obj = through2(function (options, transform, flush) { - var t2 = new Transform(xtend({ objectMode: true }, options)) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/.npmignore b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/.npmignore deleted file mode 100644 index b5ef13a3..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -.DS_Store -*.log -node_modules -build -*.node -components \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/.travis.yml b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/.travis.yml deleted file mode 100644 index 33ad9f8c..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.9" - - "0.10" -after_script: - - npm run coveralls \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/LICENSE b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/LICENSE deleted file mode 100755 index 4f482f9b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013 Fractal <contact@wearefractal.com> - -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/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/README.md deleted file mode 100644 index 3f97efc5..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/README.md +++ /dev/null @@ -1,123 +0,0 @@ -# vinyl [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl) - - -## Information - -<table> -<tr> -<td>Package</td><td>vinyl</td> -</tr> -<tr> -<td>Description</td> -<td>A virtual file format</td> -</tr> -<tr> -<td>Node Version</td> -<td>>= 0.9</td> -</tr> -</table> - -## File - -```javascript -var File = require('vinyl'); - -var coffeeFile = new File({ - cwd: "/", - base: "/test/", - path: "/test/file.coffee" - contents: new Buffer("test = 123") -}); -``` - -### constructor(options) - -#### options.cwd - -Type: `String` -Default: `process.cwd()` - -#### options.base - -Used for relative pathing. Typically where a glob starts. - -Type: `String` -Default: `options.cwd` - -#### options.path - -Full path to the file. - -Type: `String` -Default: `null` - -#### options.stat - -The result of an fs.stat call. See [fs.Stats](http://nodejs.org/api/fs.html#fs_class_fs_stats) for more information. - -Type: `fs.Stats` -Default: `null` - -#### options.contents - -File contents. - -Type: `Buffer, Stream, or null` -Default: `null` - -### isBuffer() - -Returns true if file.contents is a Buffer. - -### isStream() - -Returns true if file.contents is a Stream. - -### isNull() - -Returns true if file.contents is null. - -### clone() - -Returns a new File object with all attributes cloned. - -### pipe(stream[, opt]) - -If file.contents is a Buffer, it will write it to the stream. - -If file.contents is a Stream, it will pipe it to the stream. - -If file.contents is null, it will do nothing. - -If opt.end is true, the destination stream will not be ended (same as node core). - -Returns the stream. - -### inspect() - -Returns a pretty String interpretation of the File. Useful for console.log. - -### relative - -Returns path.relative for the file base and file path. - -Example: - -```javascript -var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/file.coffee" -}); - -console.log(file.relative); // file.coffee -``` - -[npm-url]: https://npmjs.org/package/vinyl -[npm-image]: https://badge.fury.io/js/vinyl.png -[travis-url]: https://travis-ci.org/wearefractal/vinyl -[travis-image]: https://travis-ci.org/wearefractal/vinyl.png?branch=master -[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl -[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl/badge.png -[depstat-url]: https://david-dm.org/wearefractal/vinyl -[depstat-image]: https://david-dm.org/wearefractal/vinyl.png \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/index.js deleted file mode 100644 index 97f5c752..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/index.js +++ /dev/null @@ -1,128 +0,0 @@ -var path = require('path'); - -var cloneStats = require('clone-stats'); - -var isBuffer = require('./lib/isBuffer'); -var isStream = require('./lib/isStream'); -var isNull = require('./lib/isNull'); -var inspectStream = require('./lib/inspectStream'); -var cloneBuffer = require('./lib/cloneBuffer'); - -function File(file) { - if (!file) file = {}; - - // TODO: should this be moved to vinyl-fs? - this.cwd = file.cwd || process.cwd(); - this.base = file.base || this.cwd; - - this.path = file.path || null; - - // stat = fs stats object - // TODO: should this be moved to vinyl-fs? - this.stat = file.stat || null; - - // contents = stream, buffer, or null if not read - this.contents = file.contents || null; -} - -File.prototype.isBuffer = function() { - return isBuffer(this.contents); -}; - -File.prototype.isStream = function() { - return isStream(this.contents); -}; - -File.prototype.isNull = function() { - return isNull(this.contents); -}; - -// TODO: should this be moved to vinyl-fs? -File.prototype.isDirectory = function() { - return this.isNull() && this.stat && this.stat.isDirectory(); -}; - -File.prototype.clone = function() { - var clonedContents = this.isBuffer() ? cloneBuffer(this.contents) : this.contents; - var clonedStat = this.stat ? cloneStats(this.stat) : null; - - return new File({ - cwd: this.cwd, - base: this.base, - path: this.path, - stat: clonedStat, - contents: clonedContents - }); -}; - -File.prototype.pipe = function(stream, opt) { - if (!opt) opt = {}; - if (typeof opt.end === 'undefined') opt.end = true; - - if (this.isStream()) { - return this.contents.pipe(stream, opt); - } - if (this.isBuffer()) { - if (opt.end) { - stream.end(this.contents); - } else { - stream.write(this.contents); - } - return stream; - } - if (this.isNull()) { - if (opt.end) stream.end(); - return stream; - } - - return stream; -}; - -File.prototype.inspect = function() { - var inspect = []; - - // use relative path if possible - var filePath = (this.base && this.path) ? this.relative : this.path; - - if (filePath) { - inspect.push('"'+filePath+'"'); - } - - if (this.isBuffer()) { - inspect.push(this.contents.inspect()); - } - - if (this.isStream()) { - inspect.push(inspectStream(this.contents)); - } - - return '<File '+inspect.join(' ')+'>'; -}; - -// virtual attributes -// or stuff with extra logic -Object.defineProperty(File.prototype, 'contents', { - get: function() { - return this._contents; - }, - set: function(val) { - if (!isBuffer(val) && !isStream(val) && !isNull(val)) { - throw new Error("File.contents can only be a Buffer, a Stream, or null."); - } - this._contents = val; - } -}); - -// TODO: should this be moved to vinyl-fs? -Object.defineProperty(File.prototype, 'relative', { - get: function() { - if (!this.base) throw new Error('No base specified! Can not get relative.'); - if (!this.path) throw new Error('No path specified! Can not get relative.'); - return path.relative(this.base, this.path); - }, - set: function() { - throw new Error('File.relative is generated from the base and path attributes. Do not modify it.'); - } -}); - -module.exports = File; diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js deleted file mode 100644 index 3a861f22..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js +++ /dev/null @@ -1,7 +0,0 @@ -var Buffer = require('buffer').Buffer; - -module.exports = function(buf) { - var out = new Buffer(buf.length); - buf.copy(out); - return out; -}; \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js deleted file mode 100644 index 2c906789..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js +++ /dev/null @@ -1,12 +0,0 @@ -var Stream = require('stream').Stream; -var isStream = require('./isStream'); - -module.exports = function(stream) { - if (!isStream(stream)) return; - - var streamType = stream.constructor.name; - // avoid StreamStream - if (streamType === 'Stream') streamType = ''; - - return '<'+streamType+'Stream>'; -}; \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js deleted file mode 100644 index 0e23782c..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js +++ /dev/null @@ -1,7 +0,0 @@ -var buf = require('buffer'); -var Buffer = buf.Buffer; - -// could use Buffer.isBuffer but this is the same exact thing... -module.exports = function(o) { - return typeof o === 'object' && o instanceof Buffer; -}; \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js deleted file mode 100644 index 403bb30e..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function(v) { - return v === null; -}; \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/lib/isStream.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/lib/isStream.js deleted file mode 100644 index 9ce0929b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/lib/isStream.js +++ /dev/null @@ -1,5 +0,0 @@ -var Stream = require('stream').Stream; - -module.exports = function(o) { - return !!o && o instanceof Stream; -}; \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/LICENSE.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/LICENSE.md deleted file mode 100644 index 146cb32a..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -## The MIT License (MIT) ## - -Copyright (c) 2014 Hugh Kennedy - -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/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/README.md b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/README.md deleted file mode 100644 index 8b12b6fa..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# clone-stats [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/clone-stats&title=clone-stats&description=hughsk/clone-stats%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) # - -Safely clone node's -[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) instances without -losing their class methods, i.e. `stat.isDirectory()` and co. - -## Usage ## - -[![clone-stats](https://nodei.co/npm/clone-stats.png?mini=true)](https://nodei.co/npm/clone-stats) - -### `copy = require('clone-stats')(stat)` ### - -Returns a clone of the original `fs.Stats` instance (`stat`). - -## License ## - -MIT. See [LICENSE.md](http://github.com/hughsk/clone-stats/blob/master/LICENSE.md) for details. diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/index.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/index.js deleted file mode 100644 index e797cfe6..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/index.js +++ /dev/null @@ -1,13 +0,0 @@ -var Stat = require('fs').Stats - -module.exports = cloneStats - -function cloneStats(stats) { - var replacement = new Stat - - Object.keys(stats).forEach(function(key) { - replacement[key] = stats[key] - }) - - return replacement -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json deleted file mode 100644 index f7dc15d9..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "clone-stats", - "description": "Safely clone node's fs.Stats instances without losing their class methods", - "version": "0.0.1", - "main": "index.js", - "browser": "index.js", - "dependencies": {}, - "devDependencies": { - "tape": "~2.3.2" - }, - "scripts": { - "test": "node test" - }, - "author": { - "name": "Hugh Kennedy", - "email": "hughskennedy@gmail.com", - "url": "http://hughsk.io/" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/hughsk/clone-stats" - }, - "bugs": { - "url": "https://github.com/hughsk/clone-stats/issues" - }, - "homepage": "https://github.com/hughsk/clone-stats", - "keywords": [ - "stats", - "fs", - "clone", - "copy", - "prototype" - ], - "readme": "# clone-stats [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/clone-stats&title=clone-stats&description=hughsk/clone-stats%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #\n\nSafely clone node's\n[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) instances without\nlosing their class methods, i.e. `stat.isDirectory()` and co.\n\n## Usage ##\n\n[![clone-stats](https://nodei.co/npm/clone-stats.png?mini=true)](https://nodei.co/npm/clone-stats)\n\n### `copy = require('clone-stats')(stat)` ###\n\nReturns a clone of the original `fs.Stats` instance (`stat`).\n\n## License ##\n\nMIT. See [LICENSE.md](http://github.com/hughsk/clone-stats/blob/master/LICENSE.md) for details.\n", - "readmeFilename": "README.md", - "_id": "clone-stats@0.0.1", - "_from": "clone-stats@~0.0.1" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/test.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/test.js deleted file mode 100644 index e4bb2814..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/test.js +++ /dev/null @@ -1,36 +0,0 @@ -var test = require('tape') -var clone = require('./') -var fs = require('fs') - -test('file', function(t) { - compare(t, fs.statSync(__filename)) - t.end() -}) - -test('directory', function(t) { - compare(t, fs.statSync(__dirname)) - t.end() -}) - -function compare(t, stat) { - var copy = clone(stat) - - t.deepEqual(stat, copy, 'clone has equal properties') - t.ok(stat instanceof fs.Stats, 'original is an fs.Stat') - t.ok(copy instanceof fs.Stats, 'copy is an fs.Stat') - - ;['isDirectory' - , 'isFile' - , 'isBlockDevice' - , 'isCharacterDevice' - , 'isSymbolicLink' - , 'isFIFO' - , 'isSocket' - ].forEach(function(method) { - t.equal( - stat[method].call(stat) - , copy[method].call(copy) - , 'equal value for stat.' + method + '()' - ) - }) -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/package.json deleted file mode 100644 index 4ef0f631..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "vinyl", - "description": "A virtual file format", - "version": "0.2.3", - "homepage": "http://github.com/wearefractal/vinyl", - "repository": { - "type": "git", - "url": "git://github.com/wearefractal/vinyl.git" - }, - "author": { - "name": "Fractal", - "email": "contact@wearefractal.com", - "url": "http://wearefractal.com/" - }, - "main": "./index.js", - "dependencies": { - "clone-stats": "~0.0.1" - }, - "devDependencies": { - "mocha": "~1.17.0", - "should": "~2.1.1", - "mocha-lcov-reporter": "0.0.1", - "coveralls": "~2.6.1", - "istanbul": "~0.2.3", - "rimraf": "~2.2.5", - "jshint": "~2.4.1", - "buffer-equal": "0.0.0", - "lodash.templatesettings": "~2.4.1", - "event-stream": "~3.1.0" - }, - "scripts": { - "test": "mocha --reporter spec && jshint", - "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage" - }, - "engines": { - "node": ">= 0.9" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/wearefractal/vinyl/raw/master/LICENSE" - } - ], - "readme": "# vinyl [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl)\n\n\n## Information\n\n<table>\n<tr> \n<td>Package</td><td>vinyl</td>\n</tr>\n<tr>\n<td>Description</td>\n<td>A virtual file format</td>\n</tr>\n<tr>\n<td>Node Version</td>\n<td>>= 0.9</td>\n</tr>\n</table>\n\n## File\n\n```javascript\nvar File = require('vinyl');\n\nvar coffeeFile = new File({\n cwd: \"/\",\n base: \"/test/\",\n path: \"/test/file.coffee\"\n contents: new Buffer(\"test = 123\")\n});\n```\n\n### constructor(options)\n\n#### options.cwd\n\nType: `String` \nDefault: `process.cwd()`\n\n#### options.base\n\nUsed for relative pathing. Typically where a glob starts.\n\nType: `String` \nDefault: `options.cwd`\n\n#### options.path\n\nFull path to the file.\n\nType: `String` \nDefault: `null`\n\n#### options.stat\n\nThe result of an fs.stat call. See [fs.Stats](http://nodejs.org/api/fs.html#fs_class_fs_stats) for more information.\n\nType: `fs.Stats` \nDefault: `null`\n\n#### options.contents\n\nFile contents.\n\nType: `Buffer, Stream, or null` \nDefault: `null`\n\n### isBuffer()\n\nReturns true if file.contents is a Buffer.\n\n### isStream()\n\nReturns true if file.contents is a Stream.\n\n### isNull()\n\nReturns true if file.contents is null.\n\n### clone()\n\nReturns a new File object with all attributes cloned.\n\n### pipe(stream[, opt])\n\nIf file.contents is a Buffer, it will write it to the stream.\n\nIf file.contents is a Stream, it will pipe it to the stream.\n\nIf file.contents is null, it will do nothing.\n\nIf opt.end is true, the destination stream will not be ended (same as node core).\n\nReturns the stream.\n\n### inspect()\n\nReturns a pretty String interpretation of the File. Useful for console.log.\n\n### relative\n\nReturns path.relative for the file base and file path.\n\nExample:\n\n```javascript\nvar file = new File({\n cwd: \"/\",\n base: \"/test/\",\n path: \"/test/file.coffee\"\n});\n\nconsole.log(file.relative); // file.coffee\n```\n\n[npm-url]: https://npmjs.org/package/vinyl\n[npm-image]: https://badge.fury.io/js/vinyl.png\n[travis-url]: https://travis-ci.org/wearefractal/vinyl\n[travis-image]: https://travis-ci.org/wearefractal/vinyl.png?branch=master\n[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl\n[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl/badge.png\n[depstat-url]: https://david-dm.org/wearefractal/vinyl\n[depstat-image]: https://david-dm.org/wearefractal/vinyl.png", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/wearefractal/vinyl/issues" - }, - "_id": "vinyl@0.2.3", - "_from": "vinyl@~0.2.1" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/test/File.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/test/File.js deleted file mode 100644 index 1f2a83a0..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/test/File.js +++ /dev/null @@ -1,540 +0,0 @@ -var File = require('../'); -var Stream = require('stream'); -var fs = require('fs'); - -var should = require('should'); -require('mocha'); - -describe('File', function() { - - describe('constructor()', function() { - it('should default cwd to process.cwd', function(done) { - var file = new File(); - file.cwd.should.equal(process.cwd()); - done(); - }); - - it('should default base to cwd', function(done) { - var cwd = "/"; - var file = new File({cwd: cwd}); - file.base.should.equal(cwd); - done(); - }); - - it('should default base to cwd even when none is given', function(done) { - var file = new File(); - file.base.should.equal(process.cwd()); - done(); - }); - - it('should default path to null', function(done) { - var file = new File(); - should.not.exist(file.path); - done(); - }); - - it('should default stat to null', function(done) { - var file = new File(); - should.not.exist(file.stat); - done(); - }); - - it('should default contents to null', function(done) { - var file = new File(); - should.not.exist(file.contents); - done(); - }); - - it('should set base to given value', function(done) { - var val = "/"; - var file = new File({base: val}); - file.base.should.equal(val); - done(); - }); - - it('should set cwd to given value', function(done) { - var val = "/"; - var file = new File({cwd: val}); - file.cwd.should.equal(val); - done(); - }); - - it('should set path to given value', function(done) { - var val = "/test.coffee"; - var file = new File({path: val}); - file.path.should.equal(val); - done(); - }); - - it('should set stat to given value', function(done) { - var val = {}; - var file = new File({stat: val}); - file.stat.should.equal(val); - done(); - }); - - it('should set contents to given value', function(done) { - var val = new Buffer("test"); - var file = new File({contents: val}); - file.contents.should.equal(val); - done(); - }); - }); - - describe('isBuffer()', function() { - it('should return true when the contents are a Buffer', function(done) { - var val = new Buffer("test"); - var file = new File({contents: val}); - file.isBuffer().should.equal(true); - done(); - }); - - it('should return false when the contents are a Stream', function(done) { - var val = new Stream(); - var file = new File({contents: val}); - file.isBuffer().should.equal(false); - done(); - }); - - it('should return false when the contents are a null', function(done) { - var file = new File({contents: null}); - file.isBuffer().should.equal(false); - done(); - }); - }); - - describe('isStream()', function() { - it('should return false when the contents are a Buffer', function(done) { - var val = new Buffer("test"); - var file = new File({contents: val}); - file.isStream().should.equal(false); - done(); - }); - - it('should return true when the contents are a Stream', function(done) { - var val = new Stream(); - var file = new File({contents: val}); - file.isStream().should.equal(true); - done(); - }); - - it('should return false when the contents are a null', function(done) { - var file = new File({contents: null}); - file.isStream().should.equal(false); - done(); - }); - }); - - describe('isNull()', function() { - it('should return false when the contents are a Buffer', function(done) { - var val = new Buffer("test"); - var file = new File({contents: val}); - file.isNull().should.equal(false); - done(); - }); - - it('should return false when the contents are a Stream', function(done) { - var val = new Stream(); - var file = new File({contents: val}); - file.isNull().should.equal(false); - done(); - }); - - it('should return true when the contents are a null', function(done) { - var file = new File({contents: null}); - file.isNull().should.equal(true); - done(); - }); - }); - - describe('isDirectory()', function() { - var fakeStat = { - isDirectory: function() { - return true; - } - }; - - it('should return false when the contents are a Buffer', function(done) { - var val = new Buffer("test"); - var file = new File({contents: val, stat: fakeStat}); - file.isDirectory().should.equal(false); - done(); - }); - - it('should return false when the contents are a Stream', function(done) { - var val = new Stream(); - var file = new File({contents: val, stat: fakeStat}); - file.isDirectory().should.equal(false); - done(); - }); - - it('should return true when the contents are a null', function(done) { - var file = new File({contents: null, stat: fakeStat}); - file.isDirectory().should.equal(true); - done(); - }); - }); - - describe('clone()', function() { - it('should copy all attributes over with Buffer', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Buffer("test") - }; - var file = new File(options); - var file2 = file.clone(); - - file2.should.not.equal(file, 'refs should be different'); - file2.cwd.should.equal(file.cwd); - file2.base.should.equal(file.base); - file2.path.should.equal(file.path); - file2.contents.should.not.equal(file.contents, 'buffer ref should be different'); - file2.contents.toString('utf8').should.equal(file.contents.toString('utf8')); - done(); - }); - - it('should copy all attributes over with Stream', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Stream() - }; - var file = new File(options); - var file2 = file.clone(); - - file2.should.not.equal(file, 'refs should be different'); - file2.cwd.should.equal(file.cwd); - file2.base.should.equal(file.base); - file2.path.should.equal(file.path); - file2.contents.should.equal(file.contents, 'stream ref should be the same'); - done(); - }); - - it('should copy all attributes over with null', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: null - }; - var file = new File(options); - var file2 = file.clone(); - - file2.should.not.equal(file, 'refs should be different'); - file2.cwd.should.equal(file.cwd); - file2.base.should.equal(file.base); - file2.path.should.equal(file.path); - should.not.exist(file2.contents); - done(); - }); - - it('should properly clone the `stat` property', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.js", - contents: new Buffer("test"), - stat: fs.statSync(__filename) - }; - - var file = new File(options); - var copy = file.clone(); - - copy.stat.isFile().should.be.true; - copy.stat.isDirectory().should.be.false; - should(file.stat instanceof fs.Stats).be.true; - should(copy.stat instanceof fs.Stats).be.true; - - done(); - }); - }); - - describe('pipe()', function() { - it('should write to stream with Buffer', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Buffer("test") - }; - var file = new File(options); - var stream = new Stream.PassThrough(); - stream.on('data', function(chunk) { - should.exist(chunk); - (chunk instanceof Buffer).should.equal(true, 'should write as a buffer'); - chunk.toString('utf8').should.equal(options.contents.toString('utf8')); - }); - stream.on('end', function(chunk) { - done(); - }); - var ret = file.pipe(stream); - ret.should.equal(stream, 'should return the stream'); - }); - - it('should pipe to stream with Stream', function(done) { - var testChunk = new Buffer("test"); - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Stream.PassThrough() - }; - var file = new File(options); - var stream = new Stream.PassThrough(); - stream.on('data', function(chunk) { - should.exist(chunk); - (chunk instanceof Buffer).should.equal(true, 'should write as a buffer'); - chunk.toString('utf8').should.equal(testChunk.toString('utf8')); - done(); - }); - var ret = file.pipe(stream); - ret.should.equal(stream, 'should return the stream'); - - file.contents.write(testChunk); - }); - - it('should do nothing with null', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: null - }; - var file = new File(options); - var stream = new Stream.PassThrough(); - stream.on('data', function(chunk) { - throw new Error("should not write"); - }); - stream.on('end', function() { - done(); - }); - var ret = file.pipe(stream); - ret.should.equal(stream, 'should return the stream'); - }); - - it('should write to stream with Buffer', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Buffer("test") - }; - var file = new File(options); - var stream = new Stream.PassThrough(); - stream.on('data', function(chunk) { - should.exist(chunk); - (chunk instanceof Buffer).should.equal(true, 'should write as a buffer'); - chunk.toString('utf8').should.equal(options.contents.toString('utf8')); - done(); - }); - stream.on('end', function(chunk) { - throw new Error("should not end"); - }); - var ret = file.pipe(stream, {end: false}); - ret.should.equal(stream, 'should return the stream'); - }); - - it('should pipe to stream with Stream', function(done) { - var testChunk = new Buffer("test"); - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Stream.PassThrough() - }; - var file = new File(options); - var stream = new Stream.PassThrough(); - stream.on('data', function(chunk) { - should.exist(chunk); - (chunk instanceof Buffer).should.equal(true, 'should write as a buffer'); - chunk.toString('utf8').should.equal(testChunk.toString('utf8')); - done(); - }); - stream.on('end', function(chunk) { - throw new Error("should not end"); - }); - var ret = file.pipe(stream, {end: false}); - ret.should.equal(stream, 'should return the stream'); - - file.contents.write(testChunk); - }); - - it('should do nothing with null', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: null - }; - var file = new File(options); - var stream = new Stream.PassThrough(); - stream.on('data', function(chunk) { - throw new Error("should not write"); - }); - stream.on('end', function(chunk) { - throw new Error("should not end"); - }); - var ret = file.pipe(stream, {end: false}); - ret.should.equal(stream, 'should return the stream'); - process.nextTick(done); - }); - }); - - describe('inspect()', function() { - it('should return correct format when no contents and no path', function(done) { - var file = new File(); - file.inspect().should.equal('<File >'); - done(); - }); - - it('should return correct format when Buffer and no path', function(done) { - var val = new Buffer("test"); - var file = new File({ - contents: val - }); - file.inspect().should.equal('<File <Buffer 74 65 73 74>>'); - done(); - }); - - it('should return correct format when Buffer and relative path', function(done) { - var val = new Buffer("test"); - var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: val - }); - file.inspect().should.equal('<File "test.coffee" <Buffer 74 65 73 74>>'); - done(); - }); - - it('should return correct format when Buffer and only path and no base', function(done) { - var val = new Buffer("test"); - var file = new File({ - cwd: "/", - path: "/test/test.coffee", - contents: val - }); - delete file.base; - file.inspect().should.equal('<File "/test/test.coffee" <Buffer 74 65 73 74>>'); - done(); - }); - - it('should return correct format when Stream and relative path', function(done) { - var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Stream.PassThrough() - }); - file.inspect().should.equal('<File "test.coffee" <PassThroughStream>>'); - done(); - }); - - it('should return correct format when null and relative path', function(done) { - var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: null - }); - file.inspect().should.equal('<File "test.coffee">'); - done(); - }); - }); - - describe('contents get/set', function() { - it('should work with Buffer', function(done) { - var val = new Buffer("test"); - var file = new File(); - file.contents = val; - file.contents.should.equal(val); - done(); - }); - - it('should work with Stream', function(done) { - var val = new Stream.PassThrough(); - var file = new File(); - file.contents = val; - file.contents.should.equal(val); - done(); - }); - - it('should work with null', function(done) { - var val = null; - var file = new File(); - file.contents = val; - (file.contents === null).should.equal(true); - done(); - }); - - it('should not work with string', function(done) { - var val = "test"; - var file = new File(); - try { - file.contents = val; - } catch (err) { - should.exist(err); - done(); - } - }); - }); - - describe('relative get/set', function() { - it('should error on set', function(done) { - var file = new File(); - try { - file.relative = "test"; - } catch (err) { - should.exist(err); - done(); - } - }); - - it('should error on get when no base', function(done) { - var a; - var file = new File(); - delete file.base; - try { - a = file.relative; - } catch (err) { - should.exist(err); - done(); - } - }); - - it('should error on get when no path', function(done) { - var a; - var file = new File(); - try { - a = file.relative; - } catch (err) { - should.exist(err); - done(); - } - }); - - it('should return a relative path from base', function(done) { - var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee" - }); - file.relative.should.equal("test.coffee"); - done(); - }); - - it('should return a relative path from cwd', function(done) { - var file = new File({ - cwd: "/", - path: "/test/test.coffee" - }); - file.relative.should.equal("test/test.coffee"); - done(); - }); - }); - -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js deleted file mode 100644 index 7d286814..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js +++ /dev/null @@ -1,28 +0,0 @@ -var cloneBuffer = require('../lib/cloneBuffer'); -var Stream = require('stream'); -var should = require('should'); -require('mocha'); - -describe('cloneBuffer()', function() { - it('should return a new Buffer reference', function(done) { - var testBuffer = new Buffer('test'); - var testBuffer2 = cloneBuffer(testBuffer); - - should.exist(testBuffer2, 'should return something'); - (testBuffer2 instanceof Buffer).should.equal(true, 'should return a Buffer'); - testBuffer2.should.not.equal(testBuffer, 'pointer should change'); - done(); - }); - - it('should not replicate modifications to the original buffer', function(done) { - var testBuffer = new Buffer('test'); - var testBuffer2 = cloneBuffer(testBuffer); - - // test that changes dont modify both pointers - testBuffer2.write('w'); - - testBuffer.toString('utf8').should.equal('test', 'original should stay the same'); - testBuffer2.toString('utf8').should.equal('west', 'new buffer should be modified'); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/test/inspectStream.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/test/inspectStream.js deleted file mode 100644 index fe1802c5..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/test/inspectStream.js +++ /dev/null @@ -1,53 +0,0 @@ -var inspectStream = require('../lib/inspectStream'); -var Stream = require('stream'); -var should = require('should'); -require('mocha'); - -describe('inspectStream()', function() { - it('should work on a core Stream', function(done) { - var testStream = new Stream(); - inspectStream(testStream).should.equal('<Stream>'); - done(); - }); - - it('should work on a core Readable Stream', function(done) { - var testStream = new Stream.Readable(); - inspectStream(testStream).should.equal('<ReadableStream>'); - done(); - }); - - it('should work on a core Writable Stream', function(done) { - var testStream = new Stream.Writable(); - inspectStream(testStream).should.equal('<WritableStream>'); - done(); - }); - - it('should work on a core Duplex Stream', function(done) { - var testStream = new Stream.Duplex(); - inspectStream(testStream).should.equal('<DuplexStream>'); - done(); - }); - - it('should work on a core Transform Stream', function(done) { - var testStream = new Stream.Transform(); - inspectStream(testStream).should.equal('<TransformStream>'); - done(); - }); - - it('should work on a core PassThrough Stream', function(done) { - var testStream = new Stream.PassThrough(); - inspectStream(testStream).should.equal('<PassThroughStream>'); - done(); - }); - - it('should not work on a Buffer', function(done) { - var testBuffer = new Buffer('test'); - should.not.exist(inspectStream(testBuffer)); - done(); - }); - - it('should not work on a null', function(done) { - should.not.exist(inspectStream(null)); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js deleted file mode 100644 index 5bb1cb91..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js +++ /dev/null @@ -1,29 +0,0 @@ -var isBuffer = require('../lib/isBuffer'); -var Stream = require('stream'); -var should = require('should'); -require('mocha'); - -describe('isBuffer()', function() { - it('should return true on a Buffer', function(done) { - var testBuffer = new Buffer('test'); - isBuffer(testBuffer).should.equal(true); - done(); - }); - - it('should return false on a Stream', function(done) { - var testStream = new Stream(); - isBuffer(testStream).should.equal(false); - done(); - }); - - it('should return false on a null', function(done) { - isBuffer(null).should.equal(false); - done(); - }); - - it('should return false on a array of numbers', function(done) { - var testArray = [1, 2, 3]; - isBuffer(testArray).should.equal(false); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/test/isNull.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/test/isNull.js deleted file mode 100644 index db70c013..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/test/isNull.js +++ /dev/null @@ -1,23 +0,0 @@ -var isNull = require('../lib/isNull'); -var Stream = require('stream'); -var should = require('should'); -require('mocha'); - -describe('isNull()', function() { - it('should return true on null', function(done) { - isNull(null).should.equal(true); - done(); - }); - - it('should return false on undefined', function(done) { - isNull().should.equal(false); - isNull(undefined).should.equal(false); - done(); - }); - - it('should return false on defined values', function(done) { - isNull(1).should.equal(false); - isNull("test").should.equal(false); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/test/isStream.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/test/isStream.js deleted file mode 100644 index f22584c5..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/vinyl/test/isStream.js +++ /dev/null @@ -1,29 +0,0 @@ -var isStream = require('../lib/isStream'); -var Stream = require('stream'); -var should = require('should'); -require('mocha'); - -describe('isStream()', function() { - it('should return true on a Stream', function(done) { - var testStream = new Stream(); - isStream(testStream).should.equal(true); - done(); - }); - - it('should return false on a Buffer', function(done) { - var testBuffer = new Buffer('test'); - isStream(testBuffer).should.equal(false); - done(); - }); - - it('should return false on a null', function(done) { - isStream(null).should.equal(false); - done(); - }); - - it('should return false on a array of numbers', function(done) { - var testArray = [1, 2, 3]; - isStream(testArray).should.equal(false); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/package.json b/node_modules/gulp-autoprefixer/node_modules/gulp-util/package.json deleted file mode 100644 index 8c5bb404..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "gulp-util", - "description": "Utility functions for gulp plugins", - "version": "2.2.14", - "homepage": "http://github.com/wearefractal/gulp-util", - "repository": { - "type": "git", - "url": "git://github.com/wearefractal/gulp-util.git" - }, - "author": { - "name": "Fractal", - "email": "contact@wearefractal.com", - "url": "http://wearefractal.com/" - }, - "main": "./index.js", - "dependencies": { - "chalk": "~0.4.0", - "lodash.template": "~2.4.1", - "lodash._reinterpolate": "~2.4.1", - "vinyl": "~0.2.1", - "through2": "~0.4.0", - "dateformat": "~1.0.7-1.2.3", - "multipipe": "~0.0.1", - "minimist": "~0.0.5" - }, - "devDependencies": { - "mocha": "~1.17.0", - "should": "~3.1.2", - "mocha-lcov-reporter": "~0.0.1", - "coveralls": "~2.7.0", - "istanbul": "~0.2.3", - "rimraf": "~2.2.5", - "jshint": "~2.4.1", - "buffer-equal": "0.0.0", - "lodash.templatesettings": "~2.4.1", - "event-stream": "~3.1.0" - }, - "scripts": { - "test": "mocha --reporter spec && jshint", - "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage" - }, - "engines": { - "node": ">= 0.9" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/wearefractal/gulp-util/raw/master/LICENSE" - } - ], - "readme": "# gulp-util [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/gulpjs/gulp-util.png?theme=shields.io)](https://david-dm.org/gulpjs/gulp-util)\n\n## Information\n\n<table>\n<tr> \n<td>Package</td><td>gulp-util</td>\n</tr>\n<tr>\n<td>Description</td>\n<td>Utility functions for gulp plugins</td>\n</tr>\n<tr>\n<td>Node Version</td>\n<td>>= 0.9</td>\n</tr>\n</table>\n\n## Usage\n\n```javascript\nvar gutil = require('gulp-util');\n\ngutil.log('stuff happened', 'Really it did', gutil.colors.cyan('123'));\ngutil.beep();\n\ngutil.replaceExtension('file.coffee', '.js'); // file.js\n\nvar opt = {\n name: 'todd',\n file: someGulpFile\n};\ngutil.template('test <%= name %> <%= file.path %>', opt) // test todd /js/hi.js\n```\n\n### log(msg...)\n\nLogs stuff. Already prefixed with [gulp] and all that. Use the right colors for values. If you pass in multiple arguments it will join them by a space.\n\n```\nvalues (files, module names, etc.) = magenta\nnumbers (times, counts, etc) = cyan\n```\n\n### colors\n\nThis is an instance of [chalk](https://github.com/sindresorhus/chalk)\n\n### date\n\nThis is an instance of [node-dateformat](https://github.com/felixge/node-dateformat).\n\n### linefeed\n\nJust `\\n`. Use this.\n\n### replaceExtension(path, newExtension)\n\nReplaces a file extension in a path. Returns the new path.\n\n### isStream(obj)\n\nReturns true or false if an object is a stream.\n\n### isBuffer(obj)\n\nReturns true or false if an object is a Buffer.\n\n### template(string[, data])\n\nThis is a lodash.template function wrapper. You must pass in a valid gulp file object so it is available to the user or it will error. You can not configure any of the delimiters. Look at the [lodash docs](http://lodash.com/docs#template) for more info.\n\n## new File(obj)\n\nThis is just [vinyl](https://github.com/wearefractal/vinyl)\n\n```javascript\nvar file = new gutil.File({\n base: join(__dirname, './fixtures/'),\n cwd: __dirname,\n path: join(__dirname, './fixtures/test.coffee')\n});\n```\n\n## noop()\n\nReturns a stream that does nothing but pass data straight through.\n\n```javascript\ngulp.task('scripts', function() {\n gulp.src('src/**/*.js')\n .pipe(concat('script.js'))\n .pipe(gulp.env.production ? uglify() : gutil.noop())\n .pipe(gulp.dest('dist/');\n});\n```\n\n## combine(streams...)\n\nArgument may also be an array of streams. Returns a function that returns the combined stream. Useful for keeping things DRY. This is a simple wrapper around event-stream's `.pipeline`\n\n```javascript\nvar scripts = gutil.combine(\n coffee({bare: true}),\n uglify(),\n concat('script.js'),\n gulp.dest('dist/')\n);\n\ngulp.task('default', function() {\n gulp.src('*.coffee').pipe(scripts());\n});\n```\n\n## buffer(cb)\n\nThis is similar to es.wait but instead of buffering text into one string it buffers anything into an array (so very useful for file objects).\n\nReturns a stream that can be piped to.\n\nThe stream will emit one data event after the stream piped to it has ended. The data will be the same array passed to the callback.\n\nCallback is optional and receives two arguments: error and data\n\n```javascript\ngulp.src('stuff/*.js')\n .pipe(gutil.buffer(function(err, files){\n \n });\n```\n\n## new PluginError(pluginName, message[, options])\n\n- pluginName should be the module name of your plugin\n- message can be a string or an existing error\n- By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error.\n- If you pass an error in as the message the stack will be pulled from that, otherwise one will be created.\n\nThese are all acceptable forms of instantiation:\n\n```javascript\nvar err = new gutil.PluginError('test', {\n message: 'something broke'\n});\n\nvar err = new gutil.PluginError({\n plugin: 'test',\n message: 'something broke'\n});\n\nvar err = new gutil.PluginError('test', 'something broke');\n\nvar err = new gutil.PluginError('test', 'something broke', {showStack: true});\n\nvar existingError = new Error('OMG');\nvar err = new gutil.PluginError('test', existingError, {showStack: true});\n```\n\n[npm-url]: https://npmjs.org/package/gulp-util\n[npm-image]: https://badge.fury.io/js/gulp-util.png\n[travis-url]: https://travis-ci.org/gulpjs/gulp-util\n[travis-image]: https://travis-ci.org/gulpjs/gulp-util.png?branch=master\n[coveralls-url]: https://coveralls.io/r/gulpjs/gulp-util\n[coveralls-image]: https://coveralls.io/repos/gulpjs/gulp-util/badge.png\n[depstat-url]: https://david-dm.org/gulpjs/gulp-util\n[depstat-image]: https://david-dm.org/gulpjs/gulp-util.png\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/wearefractal/gulp-util/issues" - }, - "_id": "gulp-util@2.2.14", - "_from": "gulp-util@~2.2.12" -} diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/File.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/File.js deleted file mode 100644 index 53544075..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/File.js +++ /dev/null @@ -1,46 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('File()', function() { - it('should return a valid file', function(done) { - var fname = path.join(__dirname, './fixtures/test.coffee'); - var base = path.join(__dirname, './fixtures/'); - var file = new util.File({ - base: base, - cwd: __dirname, - path: fname - }); - should.exist(file, 'root'); - should.exist(file.relative, 'relative'); - should.exist(file.path, 'path'); - should.exist(file.cwd, 'cwd'); - should.exist(file.base, 'base'); - file.path.should.equal(fname); - file.cwd.should.equal(__dirname); - file.base.should.equal(base); - file.relative.should.equal('test.coffee'); - done(); - }); - - it('should return a valid file 2', function(done) { - var fname = path.join(__dirname, './fixtures/test.coffee'); - var base = __dirname; - var file = new util.File({ - base: base, - cwd: __dirname, - path: fname - }); - should.exist(file, 'root'); - should.exist(file.relative, 'relative'); - should.exist(file.path, 'path'); - should.exist(file.cwd, 'cwd'); - should.exist(file.base, 'base'); - file.path.should.equal(fname); - file.cwd.should.equal(__dirname); - file.base.should.equal(base); - file.relative.should.equal('fixtures/test.coffee'); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/PluginError.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/PluginError.js deleted file mode 100644 index 6dc23c0c..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/PluginError.js +++ /dev/null @@ -1,70 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('PluginError()', function(){ - it('should print the plugin name in toString', function(done){ - var err = new util.PluginError('test', 'something broke'); - err.toString().indexOf('test').should.not.equal(-1); - done(); - }); - - it('should not include the stack by default in toString', function(done){ - var err = new util.PluginError('test', 'something broke'); - // just check that there are no 'at' lines - err.toString().indexOf('at').should.equal(-1); - done(); - }); - - it('should include the stack when specified in toString', function(done){ - var err = new util.PluginError('test', 'something broke', {stack: "at huh", showStack: true}); - // just check that there are 'at' lines - err.toString().indexOf('at').should.not.equal(-1); - done(); - }); - - it('should take arguments as one object', function(done){ - var err = new util.PluginError({ - plugin: 'test', - message: 'something broke' - }); - err.plugin.should.equal('test'); - err.message.should.equal('something broke'); - done(); - }); - - it('should take arguments as plugin name and one object', function(done){ - var err = new util.PluginError('test', { - message: 'something broke' - }); - err.plugin.should.equal('test'); - err.message.should.equal('something broke'); - done(); - }); - - it('should take arguments as plugin name and message', function(done){ - var err = new util.PluginError('test', 'something broke'); - err.plugin.should.equal('test'); - err.message.should.equal('something broke'); - done(); - }); - - it('should take arguments as plugin name, message, and one object', function(done){ - var err = new util.PluginError('test', 'something broke', {showStack: true}); - err.plugin.should.equal('test'); - err.message.should.equal('something broke'); - err.showStack.should.equal(true); - done(); - }); - - it('should take arguments as plugin name, error, and one object', function(done){ - var realErr = new Error('something broke'); - var err = new util.PluginError('test', realErr, {showStack: true}); - err.plugin.should.equal('test'); - err.message.should.equal('something broke'); - err.showStack.should.equal(true); - done(); - }); - -}); \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/beep.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/beep.js deleted file mode 100644 index e3e71073..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/beep.js +++ /dev/null @@ -1,23 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('beep()', function(){ - it('should send the right code to stdout', function(done){ - var writtenValue; - - // Stub process.stdout.write - var stdout_write = process.stdout.write; - process.stdout.write = function(value) { - writtenValue = value; - }; - - util.beep(); - writtenValue.should.equal('\x07'); - - // Restore process.stdout.write - process.stdout.write = stdout_write; - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/buffer.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/buffer.js deleted file mode 100644 index 6b4de67f..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/buffer.js +++ /dev/null @@ -1,36 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -var es = require('event-stream'); -require('mocha'); - -describe('buffer()', function(){ - it('should buffer stuff and return an array into the callback', function(done){ - var src = [1,2,3]; - var inp = es.readArray(src); - inp.pipe(util.buffer(function(err, data){ - should.not.exist(err); - should.exist(data); - data.should.eql(src); - done(); - })); - }); - it('should buffer stuff and emit it as a data event', function(done){ - var src = [1,2,3]; - var inp = es.readArray(src); - inp.pipe(util.buffer()).on('data', function(data){ - should.exist(data); - data.should.eql(src); - done(); - }); - }); - it('should buffer stuff and return a stream with the buffered data', function(done){ - var src = [1,2,3]; - var inp = es.readArray(src); - inp.pipe(util.buffer()).pipe(es.through(function(data) { - should.exist(data); - data.should.eql(src); - done(); - })); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/colors.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/colors.js deleted file mode 100644 index 970367e2..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/colors.js +++ /dev/null @@ -1,11 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('colors', function(){ - it('should be a chalk instance', function(done){ - util.colors.should.equal(require('chalk')); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/combine.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/combine.js deleted file mode 100644 index a54f0012..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/combine.js +++ /dev/null @@ -1,38 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -var es = require('event-stream'); -var Stream = require('stream'); -require('mocha'); - -describe('combine()', function(){ - it('should return a function', function(done){ - var src = [1,2,3]; - var inp = es.readArray(src); - var factory = util.combine(inp); - factory.should.be.type('function'); - done(); - }); - it('should return a function that returns a stream combination', function(done){ - var src = [1,2,3]; - var inp = es.readArray(src); - var inp2 = es.writeArray(function(err, data){ - should.not.exist(err); - data.should.eql(src); - done(); - }); - var factory = util.combine(inp, inp2); - factory().should.be.instanceof(Stream); - }); - it('should return a function that returns a stream combination when given an array', function(done){ - var src = [1,2,3]; - var inp = es.readArray(src); - var inp2 = es.writeArray(function(err, data){ - should.not.exist(err); - data.should.eql(src); - done(); - }); - var factory = util.combine([inp, inp2]); - factory().should.be.instanceof(Stream); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/date.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/date.js deleted file mode 100644 index 21f52ee9..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/date.js +++ /dev/null @@ -1,17 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('date', function() { - it('should be a date format instance', function(done) { - util.date.should.equal(require('dateformat')); - done(); - }); - it('should return today\'s date', function(done) { - var time = new Date(); - var dateutil = util.date('HH:MM:ss'); - dateutil.should.equal(('0' + time.getHours()).slice(-2) + ':' + ('0' + time.getMinutes()).slice(-2) + ':' + ('0' + time.getSeconds()).slice(-2)); - done(); - }) -}); \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/env.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/env.js deleted file mode 100644 index d3942940..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/env.js +++ /dev/null @@ -1,12 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('env', function(){ - it('should exist', function(done){ - should.exist(util.env); - should.exist(util.env._); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/isBuffer.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/isBuffer.js deleted file mode 100644 index ad09bbf5..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/isBuffer.js +++ /dev/null @@ -1,16 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -var through = require('through2'); -require('mocha'); - -describe('isBuffer()', function(){ - it('should work on a buffer', function(done){ - util.isBuffer(new Buffer('huh')).should.equal(true); - done(); - }); - it('should not work on a stream', function(done){ - util.isBuffer(through()).should.equal(false); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/isNull.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/isNull.js deleted file mode 100644 index 841fc46b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/isNull.js +++ /dev/null @@ -1,20 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -var through = require('through2'); -require('mocha'); - -describe('isNull()', function(){ - it('should work on a null', function(done){ - util.isNull(null).should.equal(true); - done(); - }); - it('should not work on a stream', function(done){ - util.isNull(through()).should.equal(false); - done(); - }); - it('should not work on undefined', function(done){ - util.isNull(undefined).should.equal(false); - done(); - }); -}); diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/isStream.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/isStream.js deleted file mode 100644 index 3935324b..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/isStream.js +++ /dev/null @@ -1,16 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -var through = require('through2'); -require('mocha'); - -describe('isStream()', function(){ - it('should work on a stream', function(done){ - util.isStream(through()).should.equal(true); - done(); - }); - it('should not work on a buffer', function(done){ - util.isStream(new Buffer('huh')).should.equal(false); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/linefeed.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/linefeed.js deleted file mode 100644 index 72f61ca0..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/linefeed.js +++ /dev/null @@ -1,5 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/log.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/log.js deleted file mode 100644 index 71c6417a..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/log.js +++ /dev/null @@ -1,23 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('log()', function(){ - it('should work i guess', function(done){ - var writtenValue; - - // Stub process.stdout.write - var stdout_write = process.stdout.write; - process.stdout.write = function(value) { - writtenValue = value; - }; - - util.log(1, 2, 3, 4, 'five'); - writtenValue.should.eql('['+util.colors.green('gulp')+'] 1 2 3 4 five\n'); - - // Restore process.stdout.write - process.stdout.write = stdout_write; - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/noop.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/noop.js deleted file mode 100644 index 0d75b35c..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/noop.js +++ /dev/null @@ -1,24 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -var es = require('event-stream'); -require('mocha'); - -describe('noop()', function(){ - it('should return a stream', function(done){ - util.isStream(util.noop()).should.equal(true); - done(); - }); - it('should return a stream that passes through all data', function(done){ - var inp = [1,2,3,4,5,6,7,8,9]; - var stream = util.noop(); - es.readArray(inp) - .pipe(stream) - .pipe(es.writeArray(function(err, arr){ - should.not.exist(err); - should.exist(arr); - arr.should.eql(inp); - done(); - })); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/replaceExtension.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/replaceExtension.js deleted file mode 100644 index b9c65662..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/replaceExtension.js +++ /dev/null @@ -1,34 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('replaceExtension()', function() { - it('should return a valid replaced extension on nested', function(done) { - var fname = path.join(__dirname, './fixtures/test.coffee'); - var expected = path.join(__dirname, './fixtures/test.js'); - var nu = util.replaceExtension(fname, '.js'); - should.exist(nu); - nu.should.equal(expected); - done(); - }); - - it('should return a valid replaced extension on flat', function(done) { - var fname = 'test.coffee'; - var expected = 'test.js'; - var nu = util.replaceExtension(fname, '.js'); - should.exist(nu); - nu.should.equal(expected); - done(); - }); - - it('should not return a valid replaced extension on empty string', function(done) { - var fname = ''; - var expected = ''; - var nu = util.replaceExtension(fname, '.js'); - should.exist(nu); - nu.should.equal(expected); - done(); - }); - -}); \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/template.js b/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/template.js deleted file mode 100644 index 7664620a..00000000 --- a/node_modules/gulp-autoprefixer/node_modules/gulp-util/test/template.js +++ /dev/null @@ -1,99 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('template()', function(){ - it('should work with just a template', function(done){ - var opt = { - name:'todd', - file: { - path: 'hi.js' - } - }; - var expected = 'test todd hi.js'; - - var tmpl = util.template('test <%= name %> <%= file.path %>'); - should.exist(tmpl); - 'function'.should.equal(typeof(tmpl)); - - // eval it now - var etmpl = tmpl(opt); - 'string'.should.equal(typeof(etmpl)); - etmpl.should.equal(expected); - done(); - }); - - it('should work with a template and data', function(done){ - var opt = { - name:'todd', - file: { - path: 'hi.js' - } - }; - var expected = 'test todd hi.js'; - var tmpl = util.template('test <%= name %> <%= file.path %>', opt); - should.exist(tmpl); - 'string'.should.equal(typeof(tmpl)); - tmpl.should.equal(expected); - done(); - }); - - it('should throw an error when no file object is passed', function(done){ - var opt = { - name:'todd' - }; - try { - var tmpl = util.template('test <%= name %> <%= file.path %>', opt); - } catch (err) { - should.exist(err); - done(); - } - }); - - it('should ignore modified templateSettings', function(done){ - var templateSettings = require('lodash.templatesettings'); - templateSettings.interpolate = /\{\{([\s\S]+?)\}\}/g; - - var opt = { - name:'todd', - file: { - path: 'hi.js' - } - }; - var expected = 'test {{name}} hi.js'; - - var tmpl = util.template('test {{name}} <%= file.path %>'); - should.exist(tmpl); - 'function'.should.equal(typeof(tmpl)); - - // eval it now - var etmpl = tmpl(opt); - 'string'.should.equal(typeof(etmpl)); - etmpl.should.equal(expected); - - done(); - }); - - it('should allow ES6 delimiters', function(done){ - var opt = { - name:'todd', - file: { - path: 'hi.js' - } - }; - var expected = 'test todd hi.js'; - - var tmpl = util.template('test ${name} ${file.path}'); - should.exist(tmpl); - 'function'.should.equal(typeof(tmpl)); - - // eval it now - var etmpl = tmpl(opt); - 'string'.should.equal(typeof(etmpl)); - etmpl.should.equal(expected); - - done(); - }); - -}); \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/package.json b/node_modules/gulp-autoprefixer/package.json deleted file mode 100644 index 741dbc3d..00000000 --- a/node_modules/gulp-autoprefixer/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "gulp-autoprefixer", - "version": "0.0.6", - "description": "Autoprefixer for gulp.", - "license": "MIT", - "author": { - "name": "Michael Ostermann", - "email": "metrime@icloud.com" - }, - "repository": { - "type": "git", - "url": "https://github.com/Metrime/gulp-autoprefixer.git" - }, - "keywords": [ - "gulpplugin", - "css", - "prefix", - "rework" - ], - "dependencies": { - "autoprefixer": "~1.0.20140110", - "bufferstreams": "0.0.1", - "gulp-util": "~2.2.12" - }, - "main": "index.js", - "devDependencies": { - "mocha": "*", - "should": "*", - "event-stream": "~3.1.0" - }, - "readme": "gulp-autoprefixer\n===========\n\n[Autoprefixer](https://github.com/ai/autoprefixer) for [gulp](https://github.com/wearefractal/gulp).\n\n var prefix = require('gulp-autoprefixer');\n\n\nExample\n-------\n \n\tgulp.src('./css/*.css')\n\t.pipe(prefix(\"last 1 version\", \"> 1%\", \"ie 8\", \"ie 7\"))\n\t.pipe(gulp.dest('./dist/'))\n\n\n\nLicense\n-------\n\nMIT\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/Metrime/gulp-autoprefixer/issues" - }, - "homepage": "https://github.com/Metrime/gulp-autoprefixer", - "_id": "gulp-autoprefixer@0.0.6", - "_from": "gulp-autoprefixer@" -} diff --git a/node_modules/gulp-autoprefixer/test/test.css b/node_modules/gulp-autoprefixer/test/test.css deleted file mode 100644 index 7afc16f8..00000000 --- a/node_modules/gulp-autoprefixer/test/test.css +++ /dev/null @@ -1,3 +0,0 @@ -.example{ -background:linear-gradient(bottom,#000,#fff); -} \ No newline at end of file diff --git a/node_modules/gulp-autoprefixer/test/test.js b/node_modules/gulp-autoprefixer/test/test.js deleted file mode 100644 index 39d45f3b..00000000 --- a/node_modules/gulp-autoprefixer/test/test.js +++ /dev/null @@ -1,106 +0,0 @@ -var prefix = require('../'); -var should = require('should'); -var fs = require('fs'); -var autoprefixer = require("autoprefixer"); -var gutil = require('gulp-util'); -var Stream = require('stream'); -var es = require('event-stream'); -require('mocha'); - - -var testfile = fs.readFileSync("./test/test.css","utf8"); - -describe('gulp-autoprefixer', function() { - it('should prefix with defaults', function(done) { - var stream = prefix(); - var fakeFile = new gutil.File({ - contents: new Buffer(testfile) - }); - - - stream.on('data', function(newFile){ - String(newFile.contents).should.equal(autoprefixer.process(testfile).css); - done(); - }); - - - stream.write(fakeFile); - stream.end(); - - }); - - - - - - it('should prefix with options', function(done) { - var stream = prefix("last 1 version", "> 1%", "ie 8", "ie 7"); - var fakeFile = new gutil.File({ - contents: new Buffer(testfile) - }); - - - stream.on('data', function(newFile){ - String(newFile.contents).should.equal(autoprefixer("last 1 version", "> 1%", "ie 8", "ie 7").process(testfile).css); - done(); - }); - - - stream.write(fakeFile); - stream.end(); - - }); - - it('should work the same in stream mode', function(done) { - var stream = prefix(); - var fakeFile = new gutil.File({ - contents: new Stream() - }); - - stream.on('data', function(data) { - data.contents.pipe(es.wait(function(err, data) { - data.should.equal(autoprefixer.process(testfile).css); - done(); - })); - }); - - stream.write(fakeFile); - fakeFile.contents.write(testfile); - fakeFile.contents.end(); - }); - - it('should work the same in stream mode, with options', function(done) { - var stream = prefix("last 1 version", "> 1%", "ie 8", "ie 7"); - var fakeFile = new gutil.File({ - contents: new Stream() - }); - - stream.on('data', function(data) { - data.contents.pipe(es.wait(function(err, data) { - data.should.equal(autoprefixer("last 1 version", "> 1%", "ie 8", "ie 7").process(testfile).css); - done(); - })); - }); - stream.write(fakeFile); - fakeFile.contents.write(testfile); - fakeFile.contents.end(); - }); - - it('should let null files pass through', function(done) { - var stream = prefix(), - n = 0; - stream.pipe(es.through(function(file) { - file.path.should.equal('null.md'); - (file.contents === null).should.be.true; - n++; - }, function() { - n.should.equal(1); - done(); - })); - stream.write(new gutil.File({ - path: 'null.md', - contents: null - })); - stream.end(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/index.js b/node_modules/gulp-imagemin/index.js deleted file mode 100644 index 41b4b110..00000000 --- a/node_modules/gulp-imagemin/index.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; -var path = require('path'); -var fs = require('graceful-fs'); -var gutil = require('gulp-util'); -var map = require('map-stream'); -var filesize = require('filesize'); -var tempWrite = require('temp-write'); -var imagemin = require('image-min'); - -module.exports = function (options) { - return map(function (file, cb) { - if (file.isNull()) { - return cb(null, file); - } - - if (file.isStream()) { - return cb(new gutil.PluginError('gulp-imagemin', 'Streaming not supported')); - } - - if (['.jpg', '.jpeg', '.png', '.gif'].indexOf(path.extname(file.path).toLowerCase()) === -1) { - gutil.log('gulp-imagemin: Skipping unsupported image ' + gutil.colors.blue(file.relative)); - return cb(null, file); - } - - tempWrite(file.contents, path.basename(file.path), function (err, tempFile) { - if (err) { - return cb(new gutil.PluginError('gulp-imagemin', err)); - } - - // workaround: https://github.com/kevva/image-min/issues/8 - fs.stat(tempFile, function (err, stats) { - if (err) { - return cb(new gutil.PluginError('gulp-imagemin', err)); - } - - var origSize = stats.size; - - imagemin(tempFile, tempFile, options, function () { - fs.readFile(tempFile, function (err, data) { - if (err) { - return cb(new gutil.PluginError('gulp-imagemin', err)); - } - - var saved = origSize - data.length; - var savedMsg = saved > 0 ? 'saved ' + filesize(saved, {round: 1}) : 'already optimized'; - - gutil.log('gulp-imagemin:', gutil.colors.green('✔ ') + file.relative + gutil.colors.gray(' (' + savedMsg + ')')); - - file.contents = data; - cb(null, file); - }); - }); - }); - }); - }); -}; diff --git a/node_modules/gulp-imagemin/node_modules/filesize/.npmignore b/node_modules/gulp-imagemin/node_modules/filesize/.npmignore deleted file mode 100644 index 9cacf8da..00000000 --- a/node_modules/gulp-imagemin/node_modules/filesize/.npmignore +++ /dev/null @@ -1,8 +0,0 @@ -/node_modules/ -/lib/filesize.min.js -/lib/filesize.map -/src/ -/test/ -.jshintrc -.travis.yml -Gruntfile.js diff --git a/node_modules/gulp-imagemin/node_modules/filesize/LICENSE b/node_modules/gulp-imagemin/node_modules/filesize/LICENSE deleted file mode 100644 index c6f00fdd..00000000 --- a/node_modules/gulp-imagemin/node_modules/filesize/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013, Jason Mulligan -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, this - list of conditions and the following disclaimer in the documentation and/or - other materials provided with the distribution. - - Neither the name of the {organization} nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/filesize/README.md b/node_modules/gulp-imagemin/node_modules/filesize/README.md deleted file mode 100644 index 62b6fea4..00000000 --- a/node_modules/gulp-imagemin/node_modules/filesize/README.md +++ /dev/null @@ -1,47 +0,0 @@ -[![build status](https://secure.travis-ci.org/avoidwork/filesize.js.png)](http://travis-ci.org/avoidwork/filesize.js) -# filesize.js - -filesize.js provides a simple way to get a human readable file size string from a number (float or integer) or string. - -## Optional settings - -`filesize()` accepts an optional descriptor Object as a second argument, so you can customize the output. - -### bits -_***(boolean)***_ Enables `bit` sizes, default is `false` - -### unix -_***(boolean)***_ Enables unix style human readable output, e.g `ls -lh`, default is `false` - -### base -_***(number)***_ Number base, default is `10` - -### round -_***(number)***_ Decimal place, default is `2` - -### spacer -_***(string)***_ Character between the `result` and `suffix`, default is `" "` - -## Examples - -```javascript -filesize(500); // "500 B" -filesize(500, {bits: true}); // "4.00 kb" -filesize(265318); // "265.32 kB" -filesize(265318, {base: 2}); // "259.10 kB" -filesize(265318, {base: 2, round: 1}); // "259.1 kB" -``` - -## How can I load filesize.js? - -filesize.js supports AMD loaders (require.js, curl.js, etc.), node.js & npm (npm install filesize), or using a script tag. - -## Support - -If you're having problems, use the support forum at CodersClan. - -<a href="http://codersclan.net/forum/index.php?repo_id=11"><img src="http://www.codersclan.net/graphics/getSupport_blue_big.png" width="160"></a> - -## License -Copyright (c) 2013 Jason Mulligan -Licensed under the BSD-3 license. diff --git a/node_modules/gulp-imagemin/node_modules/filesize/lib/filesize.js b/node_modules/gulp-imagemin/node_modules/filesize/lib/filesize.js deleted file mode 100644 index 74f60006..00000000 --- a/node_modules/gulp-imagemin/node_modules/filesize/lib/filesize.js +++ /dev/null @@ -1,141 +0,0 @@ -/** - * filesize - * - * @author Jason Mulligan <jason.mulligan@avoidwork.com> - * @copyright 2013 Jason Mulligan - * @license BSD-3 <https://raw.github.com/avoidwork/filesize.js/master/LICENSE> - * @link http://filesizejs.com - * @module filesize - * @version 2.0.0 - */ -( function ( global ) { -"use strict"; - -var bit = /b$/, - bite = /^B$/, - radix = 10, - right = /\.(.*)/, - zero = /^0$/; - -/** - * filesize - * - * @method filesize - * @param {Mixed} arg String, Int or Float to transform - * @param {Object} descriptor [Optional] Flags - * @return {String} Readable file size String - */ -function filesize ( arg, descriptor ) { - var result = "", - skip = false, - i = 6, - base, bits, neg, num, round, size, sizes, unix, spacer, suffix, z; - - if ( isNaN( arg ) ) { - throw new Error( "Invalid arguments" ); - } - - descriptor = descriptor || {}; - bits = ( descriptor.bits === true ); - unix = ( descriptor.unix === true ); - base = descriptor.base !== undefined ? descriptor.base : unix ? 2 : 10; - round = descriptor.round !== undefined ? descriptor.round : unix ? 1 : 2; - spacer = descriptor.spacer !== undefined ? descriptor.spacer : unix ? "" : " "; - num = Number( arg ); - neg = ( num < 0 ); - - // Flipping a negative number to determine the size - if ( neg ) { - num = -num; - } - - // Zero is now a special case because bytes divide by 1 - if ( num === 0 ) { - if ( unix ) { - result = "0"; - } - else { - result = "0" + spacer + "B"; - } - } - else { - sizes = options[base][bits ? "bits" : "bytes"]; - - while ( i-- ) { - size = sizes[i][1]; - suffix = sizes[i][0]; - - if ( num >= size ) { - // Treating bytes as cardinal - if ( bite.test( suffix ) ) { - skip = true; - round = 0; - } - - result = ( num / size ).toFixed( round ); - - if ( !skip && unix ) { - if ( bits && bit.test( suffix ) ) { - suffix = suffix.toLowerCase(); - } - - suffix = suffix.charAt( 0 ); - z = right.exec( result ); - - if ( !bits && suffix === "k" ) { - suffix = "K"; - } - - if ( z !== null && z[1] !== undefined && zero.test( z[1] ) ) { - result = parseInt( result, radix ); - } - - result += spacer + suffix; - } - else if ( !unix ) { - result += spacer + suffix; - } - - break; - } - } - } - - // Decorating a 'diff' - if ( neg ) { - result = "-" + result; - } - - return result; -} - -/** - * Size options - * - * @type {Object} - */ -var options = { - 2 : { - bits : [["B", 1], ["kb", 128], ["Mb", 131072], ["Gb", 134217728], ["Tb", 137438953472], ["Pb", 140737488355328]], - bytes : [["B", 1], ["kB", 1024], ["MB", 1048576], ["GB", 1073741824], ["TB", 1099511627776], ["PB", 1125899906842624]] - }, - 10 : { - bits : [["B", 1], ["kb", 125], ["Mb", 125000], ["Gb", 125000000], ["Tb", 125000000000], ["Pb", 125000000000000]], - bytes : [["B", 1], ["kB", 1000], ["MB", 1000000], ["GB", 1000000000], ["TB", 1000000000000], ["PB", 1000000000000000]] - } -}; - -// CommonJS, AMD, script tag -if ( typeof exports !== "undefined" ) { - module.exports = filesize; -} -else if ( typeof define === "function" ) { - define( function () { - return filesize; - } ); -} -else { - global.filesize = filesize; -} - -} )( this ); diff --git a/node_modules/gulp-imagemin/node_modules/filesize/package.json b/node_modules/gulp-imagemin/node_modules/filesize/package.json deleted file mode 100644 index d39de5af..00000000 --- a/node_modules/gulp-imagemin/node_modules/filesize/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "filesize", - "description": "JavaScript library to generate a human readable String describing the file size", - "version": "2.0.0", - "homepage": "http://filesizejs.com", - "author": { - "name": "Jason Mulligan", - "email": "jason.mulligan@avoidwork.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/avoidwork/filesize.js.git" - }, - "bugs": { - "url": "https://github.com/avoidwork/filesize.js/issues" - }, - "licenses": [ - { - "type": "BSD-3", - "url": "https://raw.github.com/avoidwork/filesize.js/master/LICENSE" - } - ], - "main": "lib/filesize", - "engines": { - "node": ">= 0.4.0" - }, - "scripts": { - "test": "grunt test" - }, - "devDependencies": { - "grunt": "~0.4.1", - "grunt-cli": "~0.1.6", - "grunt-exec": "~0.4", - "grunt-sed": "~0.1", - "grunt-contrib-concat": "~0.1.3", - "grunt-contrib-jshint": "~0.1", - "grunt-contrib-nodeunit": "~0.1.2", - "grunt-contrib-watch": "~0.2" - }, - "keywords": [ - "file", - "filesize", - "size", - "readable", - "file system" - ], - "readme": "[![build status](https://secure.travis-ci.org/avoidwork/filesize.js.png)](http://travis-ci.org/avoidwork/filesize.js)\n# filesize.js\n\nfilesize.js provides a simple way to get a human readable file size string from a number (float or integer) or string.\n\n## Optional settings\n\n`filesize()` accepts an optional descriptor Object as a second argument, so you can customize the output.\n\n### bits\n_***(boolean)***_ Enables `bit` sizes, default is `false`\n\n### unix\n_***(boolean)***_ Enables unix style human readable output, e.g `ls -lh`, default is `false`\n\n### base\n_***(number)***_ Number base, default is `10`\n\n### round\n_***(number)***_ Decimal place, default is `2`\n\n### spacer\n_***(string)***_ Character between the `result` and `suffix`, default is `\" \"`\n\n## Examples\n\n```javascript\nfilesize(500); // \"500 B\"\nfilesize(500, {bits: true}); // \"4.00 kb\"\nfilesize(265318); // \"265.32 kB\"\nfilesize(265318, {base: 2}); // \"259.10 kB\"\nfilesize(265318, {base: 2, round: 1}); // \"259.1 kB\"\n```\n\n## How can I load filesize.js?\n\nfilesize.js supports AMD loaders (require.js, curl.js, etc.), node.js & npm (npm install filesize), or using a script tag.\n\n## Support\n\nIf you're having problems, use the support forum at CodersClan.\n\n<a href=\"http://codersclan.net/forum/index.php?repo_id=11\"><img src=\"http://www.codersclan.net/graphics/getSupport_blue_big.png\" width=\"160\"></a>\n\n## License\nCopyright (c) 2013 Jason Mulligan \nLicensed under the BSD-3 license.\n", - "readmeFilename": "README.md", - "_id": "filesize@2.0.0", - "dist": { - "shasum": "4242899128eebf8c96804d05ef2da04e20ad09f6" - }, - "_from": "filesize@~2.0.0", - "_resolved": "https://registry.npmjs.org/filesize/-/filesize-2.0.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/graceful-fs/.npmignore b/node_modules/gulp-imagemin/node_modules/graceful-fs/.npmignore deleted file mode 100644 index c2658d7d..00000000 --- a/node_modules/gulp-imagemin/node_modules/graceful-fs/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ diff --git a/node_modules/gulp-imagemin/node_modules/graceful-fs/LICENSE b/node_modules/gulp-imagemin/node_modules/graceful-fs/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/gulp-imagemin/node_modules/graceful-fs/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/graceful-fs/README.md b/node_modules/gulp-imagemin/node_modules/graceful-fs/README.md deleted file mode 100644 index eb1a1093..00000000 --- a/node_modules/gulp-imagemin/node_modules/graceful-fs/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# graceful-fs - -graceful-fs functions as a drop-in replacement for the fs module, -making various improvements. - -The improvements are meant to normalize behavior across different -platforms and environments, and to make filesystem access more -resilient to errors. - -## Improvements over fs module - -graceful-fs: - -* Queues up `open` and `readdir` calls, and retries them once - something closes if there is an EMFILE error from too many file - descriptors. -* fixes `lchmod` for Node versions prior to 0.6.2. -* implements `fs.lutimes` if possible. Otherwise it becomes a noop. -* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or - `lchown` if the user isn't root. -* makes `lchmod` and `lchown` become noops, if not available. -* retries reading a file if `read` results in EAGAIN error. - -On Windows, it retries renaming a file for up to one second if `EACCESS` -or `EPERM` error occurs, likely because antivirus software has locked -the directory. diff --git a/node_modules/gulp-imagemin/node_modules/graceful-fs/graceful-fs.js b/node_modules/gulp-imagemin/node_modules/graceful-fs/graceful-fs.js deleted file mode 100644 index 1865f92c..00000000 --- a/node_modules/gulp-imagemin/node_modules/graceful-fs/graceful-fs.js +++ /dev/null @@ -1,159 +0,0 @@ -// Monkey-patching the fs module. -// It's ugly, but there is simply no other way to do this. -var fs = module.exports = require('fs') - -var assert = require('assert') - -// fix up some busted stuff, mostly on windows and old nodes -require('./polyfills.js') - -// The EMFILE enqueuing stuff - -var util = require('util') - -function noop () {} - -var debug = noop -var util = require('util') -if (util.debuglog) - debug = util.debuglog('gfs') -else if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) - debug = function() { - var m = util.format.apply(util, arguments) - m = 'GFS: ' + m.split(/\n/).join('\nGFS: ') - console.error(m) - } - -if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) { - process.on('exit', function() { - debug('fds', fds) - debug(queue) - assert.equal(queue.length, 0) - }) -} - - -var originalOpen = fs.open -fs.open = open - -function open(path, flags, mode, cb) { - if (typeof mode === "function") cb = mode, mode = null - if (typeof cb !== "function") cb = noop - new OpenReq(path, flags, mode, cb) -} - -function OpenReq(path, flags, mode, cb) { - this.path = path - this.flags = flags - this.mode = mode - this.cb = cb - Req.call(this) -} - -util.inherits(OpenReq, Req) - -OpenReq.prototype.process = function() { - originalOpen.call(fs, this.path, this.flags, this.mode, this.done) -} - -var fds = {} -OpenReq.prototype.done = function(er, fd) { - debug('open done', er, fd) - if (fd) - fds['fd' + fd] = this.path - Req.prototype.done.call(this, er, fd) -} - - -var originalReaddir = fs.readdir -fs.readdir = readdir - -function readdir(path, cb) { - if (typeof cb !== "function") cb = noop - new ReaddirReq(path, cb) -} - -function ReaddirReq(path, cb) { - this.path = path - this.cb = cb - Req.call(this) -} - -util.inherits(ReaddirReq, Req) - -ReaddirReq.prototype.process = function() { - originalReaddir.call(fs, this.path, this.done) -} - -ReaddirReq.prototype.done = function(er, files) { - Req.prototype.done.call(this, er, files) - onclose() -} - - -var originalClose = fs.close -fs.close = close - -function close (fd, cb) { - debug('close', fd) - if (typeof cb !== "function") cb = noop - delete fds['fd' + fd] - originalClose.call(fs, fd, function(er) { - onclose() - cb(er) - }) -} - - -var originalCloseSync = fs.closeSync -fs.closeSync = closeSync - -function closeSync (fd) { - try { - return originalCloseSync(fd) - } finally { - onclose() - } -} - - -// Req class -function Req () { - // start processing - this.done = this.done.bind(this) - this.failures = 0 - this.process() -} - -Req.prototype.done = function (er, result) { - var tryAgain = false - if (er) { - var code = er.code - var tryAgain = code === "EMFILE" - if (process.platform === "win32") - tryAgain = tryAgain || code === "OK" - } - - if (tryAgain) { - this.failures ++ - enqueue(this) - } else { - var cb = this.cb - cb(er, result) - } -} - -var queue = [] - -function enqueue(req) { - queue.push(req) - debug('enqueue %d %s', queue.length, req.constructor.name, req) -} - -function onclose() { - var req = queue.shift() - if (req) { - debug('process', req.constructor.name, req) - req.process() - } -} diff --git a/node_modules/gulp-imagemin/node_modules/graceful-fs/package.json b/node_modules/gulp-imagemin/node_modules/graceful-fs/package.json deleted file mode 100644 index 3e4131e8..00000000 --- a/node_modules/gulp-imagemin/node_modules/graceful-fs/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "name": "graceful-fs", - "description": "A drop-in replacement for fs, making various improvements.", - "version": "2.0.1", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-graceful-fs.git" - }, - "main": "graceful-fs.js", - "engines": { - "node": ">=0.4.0" - }, - "directories": { - "test": "test" - }, - "scripts": { - "test": "tap test/*.js" - }, - "keywords": [ - "fs", - "module", - "reading", - "retry", - "retries", - "queue", - "error", - "errors", - "handling", - "EMFILE", - "EAGAIN", - "EINVAL", - "EPERM", - "EACCESS" - ], - "license": "BSD", - "readme": "# graceful-fs\n\ngraceful-fs functions as a drop-in replacement for the fs module,\nmaking various improvements.\n\nThe improvements are meant to normalize behavior across different\nplatforms and environments, and to make filesystem access more\nresilient to errors.\n\n## Improvements over fs module\n\ngraceful-fs:\n\n* Queues up `open` and `readdir` calls, and retries them once\n something closes if there is an EMFILE error from too many file\n descriptors.\n* fixes `lchmod` for Node versions prior to 0.6.2.\n* implements `fs.lutimes` if possible. Otherwise it becomes a noop.\n* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or\n `lchown` if the user isn't root.\n* makes `lchmod` and `lchown` become noops, if not available.\n* retries reading a file if `read` results in EAGAIN error.\n\nOn Windows, it retries renaming a file for up to one second if `EACCESS`\nor `EPERM` error occurs, likely because antivirus software has locked\nthe directory.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/node-graceful-fs/issues" - }, - "homepage": "https://github.com/isaacs/node-graceful-fs", - "_id": "graceful-fs@2.0.1", - "dist": { - "shasum": "ec829a5953ea8ab7c1ba4c5de223ad6a44432ad6" - }, - "_from": "graceful-fs@~2.0.0", - "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-2.0.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/graceful-fs/polyfills.js b/node_modules/gulp-imagemin/node_modules/graceful-fs/polyfills.js deleted file mode 100644 index afc83b3f..00000000 --- a/node_modules/gulp-imagemin/node_modules/graceful-fs/polyfills.js +++ /dev/null @@ -1,228 +0,0 @@ -var fs = require('fs') -var constants = require('constants') - -var origCwd = process.cwd -var cwd = null -process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process) - return cwd -} -var chdir = process.chdir -process.chdir = function(d) { - cwd = null - chdir.call(process, d) -} - -// (re-)implement some things that are known busted or missing. - -// lchmod, broken prior to 0.6.2 -// back-port the fix here. -if (constants.hasOwnProperty('O_SYMLINK') && - process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - fs.lchmod = function (path, mode, callback) { - callback = callback || noop - fs.open( path - , constants.O_WRONLY | constants.O_SYMLINK - , mode - , function (err, fd) { - if (err) { - callback(err) - return - } - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - fs.fchmod(fd, mode, function (err) { - fs.close(fd, function(err2) { - callback(err || err2) - }) - }) - }) - } - - fs.lchmodSync = function (path, mode) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) - - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - var err, err2 - try { - var ret = fs.fchmodSync(fd, mode) - } catch (er) { - err = er - } - try { - fs.closeSync(fd) - } catch (er) { - err2 = er - } - if (err || err2) throw (err || err2) - return ret - } -} - - -// lutimes implementation, or no-op -if (!fs.lutimes) { - if (constants.hasOwnProperty("O_SYMLINK")) { - fs.lutimes = function (path, at, mt, cb) { - fs.open(path, constants.O_SYMLINK, function (er, fd) { - cb = cb || noop - if (er) return cb(er) - fs.futimes(fd, at, mt, function (er) { - fs.close(fd, function (er2) { - return cb(er || er2) - }) - }) - }) - } - - fs.lutimesSync = function (path, at, mt) { - var fd = fs.openSync(path, constants.O_SYMLINK) - , err - , err2 - , ret - - try { - var ret = fs.futimesSync(fd, at, mt) - } catch (er) { - err = er - } - try { - fs.closeSync(fd) - } catch (er) { - err2 = er - } - if (err || err2) throw (err || err2) - return ret - } - - } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) { - // maybe utimensat will be bound soonish? - fs.lutimes = function (path, at, mt, cb) { - fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb) - } - - fs.lutimesSync = function (path, at, mt) { - return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW) - } - - } else { - fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) } - fs.lutimesSync = function () {} - } -} - - -// https://github.com/isaacs/node-graceful-fs/issues/4 -// Chown should not fail on einval or eperm if non-root. - -fs.chown = chownFix(fs.chown) -fs.fchown = chownFix(fs.fchown) -fs.lchown = chownFix(fs.lchown) - -fs.chownSync = chownFixSync(fs.chownSync) -fs.fchownSync = chownFixSync(fs.fchownSync) -fs.lchownSync = chownFixSync(fs.lchownSync) - -function chownFix (orig) { - if (!orig) return orig - return function (target, uid, gid, cb) { - return orig.call(fs, target, uid, gid, function (er, res) { - if (chownErOk(er)) er = null - cb(er, res) - }) - } -} - -function chownFixSync (orig) { - if (!orig) return orig - return function (target, uid, gid) { - try { - return orig.call(fs, target, uid, gid) - } catch (er) { - if (!chownErOk(er)) throw er - } - } -} - -function chownErOk (er) { - // if there's no getuid, or if getuid() is something other than 0, - // and the error is EINVAL or EPERM, then just ignore it. - // This specific case is a silent failure in cp, install, tar, - // and most other unix tools that manage permissions. - // When running as root, or if other types of errors are encountered, - // then it's strict. - if (!er || (!process.getuid || process.getuid() !== 0) - && (er.code === "EINVAL" || er.code === "EPERM")) return true -} - - -// if lchmod/lchown do not exist, then make them no-ops -if (!fs.lchmod) { - fs.lchmod = function (path, mode, cb) { - process.nextTick(cb) - } - fs.lchmodSync = function () {} -} -if (!fs.lchown) { - fs.lchown = function (path, uid, gid, cb) { - process.nextTick(cb) - } - fs.lchownSync = function () {} -} - - - -// on Windows, A/V software can lock the directory, causing this -// to fail with an EACCES or EPERM if the directory contains newly -// created files. Try again on failure, for up to 1 second. -if (process.platform === "win32") { - var rename_ = fs.rename - fs.rename = function rename (from, to, cb) { - var start = Date.now() - rename_(from, to, function CB (er) { - if (er - && (er.code === "EACCES" || er.code === "EPERM") - && Date.now() - start < 1000) { - return rename_(from, to, CB) - } - cb(er) - }) - } -} - - -// if read() returns EAGAIN, then just try it again. -var read = fs.read -fs.read = function (fd, buffer, offset, length, position, callback_) { - var callback - if (callback_ && typeof callback_ === 'function') { - var eagCounter = 0 - callback = function (er, _, __) { - if (er && er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - return read.call(fs, fd, buffer, offset, length, position, callback) - } - callback_.apply(this, arguments) - } - } - return read.call(fs, fd, buffer, offset, length, position, callback) -} - -var readSync = fs.readSync -fs.readSync = function (fd, buffer, offset, length, position) { - var eagCounter = 0 - while (true) { - try { - return readSync.call(fs, fd, buffer, offset, length, position) - } catch (er) { - if (er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - continue - } - throw er - } - } -} - diff --git a/node_modules/gulp-imagemin/node_modules/graceful-fs/test/open.js b/node_modules/gulp-imagemin/node_modules/graceful-fs/test/open.js deleted file mode 100644 index 104f36b0..00000000 --- a/node_modules/gulp-imagemin/node_modules/graceful-fs/test/open.js +++ /dev/null @@ -1,39 +0,0 @@ -var test = require('tap').test -var fs = require('../graceful-fs.js') - -test('graceful fs is monkeypatched fs', function (t) { - t.equal(fs, require('fs')) - t.end() -}) - -test('open an existing file works', function (t) { - var fd = fs.openSync(__filename, 'r') - fs.closeSync(fd) - fs.open(__filename, 'r', function (er, fd) { - if (er) throw er - fs.close(fd, function (er) { - if (er) throw er - t.pass('works') - t.end() - }) - }) -}) - -test('open a non-existing file throws', function (t) { - var er - try { - var fd = fs.openSync('this file does not exist', 'r') - } catch (x) { - er = x - } - t.ok(er, 'should throw') - t.notOk(fd, 'should not get an fd') - t.equal(er.code, 'ENOENT') - - fs.open('neither does this file', 'r', function (er, fd) { - t.ok(er, 'should throw') - t.notOk(fd, 'should not get an fd') - t.equal(er.code, 'ENOENT') - t.end() - }) -}) diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/.npmignore b/node_modules/gulp-imagemin/node_modules/gulp-util/.npmignore deleted file mode 100644 index b5ef13a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -.DS_Store -*.log -node_modules -build -*.node -components \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/.travis.yml b/node_modules/gulp-imagemin/node_modules/gulp-util/.travis.yml deleted file mode 100644 index 33ad9f8c..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.9" - - "0.10" -after_script: - - npm run coveralls \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/LICENSE b/node_modules/gulp-imagemin/node_modules/gulp-util/LICENSE deleted file mode 100755 index 7cbe012c..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2014 Fractal <contact@wearefractal.com> - -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/node_modules/gulp-imagemin/node_modules/gulp-util/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/README.md deleted file mode 100644 index fd0e506e..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/README.md +++ /dev/null @@ -1,166 +0,0 @@ -# gulp-util [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/gulpjs/gulp-util.png?theme=shields.io)](https://david-dm.org/gulpjs/gulp-util) - -## Information - -<table> -<tr> -<td>Package</td><td>gulp-util</td> -</tr> -<tr> -<td>Description</td> -<td>Utility functions for gulp plugins</td> -</tr> -<tr> -<td>Node Version</td> -<td>>= 0.9</td> -</tr> -</table> - -## Usage - -```javascript -var gutil = require('gulp-util'); - -gutil.log('stuff happened', 'Really it did', gutil.colors.cyan('123')); -gutil.beep(); - -gutil.replaceExtension('file.coffee', '.js'); // file.js - -var opt = { - name: 'todd', - file: someGulpFile -}; -gutil.template('test <%= name %> <%= file.path %>', opt) // test todd /js/hi.js -``` - -### log(msg...) - -Logs stuff. Already prefixed with [gulp] and all that. Use the right colors for values. If you pass in multiple arguments it will join them by a space. - -``` -values (files, module names, etc.) = magenta -numbers (times, counts, etc) = cyan -``` - -### colors - -This is an instance of [chalk](https://github.com/sindresorhus/chalk) - -### date - -This is an instance of [node-dateformat](https://github.com/felixge/node-dateformat). - -### linefeed - -Just `\n`. Use this. - -### replaceExtension(path, newExtension) - -Replaces a file extension in a path. Returns the new path. - -### isStream(obj) - -Returns true or false if an object is a stream. - -### isBuffer(obj) - -Returns true or false if an object is a Buffer. - -### template(string[, data]) - -This is a lodash.template function wrapper. You must pass in a valid gulp file object so it is available to the user or it will error. You can not configure any of the delimiters. Look at the [lodash docs](http://lodash.com/docs#template) for more info. - -## new File(obj) - -This is just [vinyl](https://github.com/wearefractal/vinyl) - -```javascript -var file = new gutil.File({ - base: join(__dirname, './fixtures/'), - cwd: __dirname, - path: join(__dirname, './fixtures/test.coffee') -}); -``` - -## noop() - -Returns a stream that does nothing but pass data straight through. - -```javascript -gulp.task('scripts', function() { - gulp.src('src/**/*.js') - .pipe(concat('script.js')) - .pipe(gulp.env.production ? uglify() : gutil.noop()) - .pipe(gulp.dest('dist/'); -}); -``` - -## combine(streams...) - -Argument may also be an array of streams. Returns a function that returns the combined stream. Useful for keeping things DRY. This is a simple wrapper around event-stream's `.pipeline` - -```javascript -var scripts = gutil.combine( - coffee({bare: true}), - uglify(), - concat('script.js'), - gulp.dest('dist/') -); - -gulp.task('default', function() { - gulp.src('*.coffee').pipe(scripts()); -}); -``` - -## buffer(cb) - -This is similar to es.wait but instead of buffering text into one string it buffers anything into an array (so very useful for file objects). - -Returns a stream that can be piped to. - -The stream will emit one data event after the stream piped to it has ended. The data will be the same array passed to the callback. - -Callback is optional and receives two arguments: error and data - -```javascript -gulp.src('stuff/*.js') - .pipe(gutil.buffer(function(err, files){ - - }); -``` - -## new PluginError(pluginName, message[, options]) - -- pluginName should be the module name of your plugin -- message can be a string or an existing error -- By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error. -- If you pass an error in as the message the stack will be pulled from that, otherwise one will be created. - -These are all acceptable forms of instantiation: - -```javascript -var err = new gutil.PluginError('test', { - message: 'something broke' -}); - -var err = new gutil.PluginError({ - plugin: 'test', - message: 'something broke' -}); - -var err = new gutil.PluginError('test', 'something broke'); - -var err = new gutil.PluginError('test', 'something broke', {showStack: true}); - -var existingError = new Error('OMG'); -var err = new gutil.PluginError('test', existingError, {showStack: true}); -``` - -[npm-url]: https://npmjs.org/package/gulp-util -[npm-image]: https://badge.fury.io/js/gulp-util.png -[travis-url]: https://travis-ci.org/gulpjs/gulp-util -[travis-image]: https://travis-ci.org/gulpjs/gulp-util.png?branch=master -[coveralls-url]: https://coveralls.io/r/gulpjs/gulp-util -[coveralls-image]: https://coveralls.io/repos/gulpjs/gulp-util/badge.png -[depstat-url]: https://david-dm.org/gulpjs/gulp-util -[depstat-image]: https://david-dm.org/gulpjs/gulp-util.png diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/index.js deleted file mode 100644 index 6746ee4b..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/index.js +++ /dev/null @@ -1,18 +0,0 @@ -module.exports = { - File: require('./lib/File'), - replaceExtension: require('./lib/replaceExtension'), - colors: require('./lib/colors'), - date: require('./lib/date'), - log: require('./lib/log'), - template: require('./lib/template'), - env: require('./lib/env'), - beep: require('./lib/beep'), - noop: require('./lib/noop'), - isStream: require('./lib/isStream'), - isBuffer: require('./lib/isBuffer'), - isNull: require('./lib/isNull'), - linefeed: require('./lib/linefeed'), - combine: require('./lib/combine'), - buffer: require('./lib/buffer'), - PluginError: require('./lib/PluginError') -}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/File.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/File.js deleted file mode 100644 index 690a508a..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/File.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('vinyl'); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/PluginError.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/PluginError.js deleted file mode 100644 index 96555672..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/PluginError.js +++ /dev/null @@ -1,65 +0,0 @@ -var util = require('util'); -var colors = require('./colors'); - -// wow what a clusterfuck -var parseOptions = function(plugin, message, opt) { - if (!opt) opt = {}; - if (typeof plugin === 'object') { - opt = plugin; - } else if (message instanceof Error) { - opt.message = message; - opt.plugin = plugin; - } else if (typeof message === 'object') { - opt = message; - opt.plugin = plugin; - } else if (typeof opt === 'object') { - opt.plugin = plugin; - opt.message = message; - } - return opt; -}; - -function PluginError(plugin, message, opt) { - if (!(this instanceof PluginError)) throw new Error('Call PluginError using new'); - - Error.call(this); - - var options = parseOptions(plugin, message, opt); - - this.plugin = options.plugin; - this.showStack = options.showStack; - - // if message is an Error grab crap off it - if (options.message instanceof Error) { - this.name = options.message.name; - this.message = options.message.message; - this.fileName = options.message.fileName; - this.lineNumber = options.message.lineNumber; - this.stack = options.message.stack; - } else { // else check options obj - this.name = options.name; - this.message = options.message; - this.fileName = options.fileName; - this.lineNumber = options.lineNumber; - this.stack = options.stack; - } - - // defaults - if (!this.name) this.name = 'Error'; - - // TODO: figure out why this explodes mocha - if (!this.stack) Error.captureStackTrace(this, arguments.callee || this.constructor); - - if (!this.plugin) throw new Error('Missing plugin name'); - if (!this.message) throw new Error('Missing error message'); -} - -util.inherits(PluginError, Error); - -PluginError.prototype.toString = function () { - var sig = '['+colors.green('gulp')+'] '+this.name+' in plugin \''+colors.cyan(this.plugin)+'\''; - var msg = this.showStack ? (this._stack || this.stack) : this.message; - return sig+': '+msg; -}; - -module.exports = PluginError; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/beep.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/beep.js deleted file mode 100644 index 5473d754..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/beep.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function() { - process.stdout.write('\x07'); -}; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/buffer.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/buffer.js deleted file mode 100644 index 4cb064ac..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/buffer.js +++ /dev/null @@ -1,15 +0,0 @@ -var through = require('through2'); - -module.exports = function(fn) { - var buf = []; - var end = function(cb) { - this.push(buf); - cb(); - if(fn) fn(null, buf); - }; - var push = function(data, enc, cb) { - buf.push(data); - cb(); - }; - return through.obj(push, end); -}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/colors.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/colors.js deleted file mode 100644 index bc804940..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/colors.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('chalk'); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/combine.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/combine.js deleted file mode 100644 index f20712d2..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/combine.js +++ /dev/null @@ -1,11 +0,0 @@ -var pipeline = require('multipipe'); - -module.exports = function(){ - var args = arguments; - if (args.length === 1 && Array.isArray(args[0])) { - args = args[0]; - } - return function(){ - return pipeline.apply(pipeline, args); - }; -}; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/date.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/date.js deleted file mode 100644 index 935793cc..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/date.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('dateformat'); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/env.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/env.js deleted file mode 100644 index ea1e03e4..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/env.js +++ /dev/null @@ -1,4 +0,0 @@ -var parseArgs = require('minimist'); -var argv = parseArgs(process.argv.slice(2)); - -module.exports = argv; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/isBuffer.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/isBuffer.js deleted file mode 100644 index 0e23782c..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/isBuffer.js +++ /dev/null @@ -1,7 +0,0 @@ -var buf = require('buffer'); -var Buffer = buf.Buffer; - -// could use Buffer.isBuffer but this is the same exact thing... -module.exports = function(o) { - return typeof o === 'object' && o instanceof Buffer; -}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/isNull.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/isNull.js deleted file mode 100644 index 403bb30e..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/isNull.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function(v) { - return v === null; -}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/isStream.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/isStream.js deleted file mode 100644 index 9ce0929b..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/isStream.js +++ /dev/null @@ -1,5 +0,0 @@ -var Stream = require('stream').Stream; - -module.exports = function(o) { - return !!o && o instanceof Stream; -}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/linefeed.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/linefeed.js deleted file mode 100644 index 5b0dfa4b..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/linefeed.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = '\n'; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/log.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/log.js deleted file mode 100644 index cdbb22fc..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/log.js +++ /dev/null @@ -1,9 +0,0 @@ -var colors = require('./colors'); - -module.exports = function(){ - var sig = '['+colors.green('gulp')+']'; - var args = Array.prototype.slice.call(arguments); - args.unshift(sig); - console.log.apply(console, args); - return this; -}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/noop.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/noop.js deleted file mode 100644 index 7862cb16..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/noop.js +++ /dev/null @@ -1,5 +0,0 @@ -var through = require('through2'); - -module.exports = function () { - return through.obj(); -}; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/replaceExtension.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/replaceExtension.js deleted file mode 100644 index 3f76938e..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/replaceExtension.js +++ /dev/null @@ -1,9 +0,0 @@ -var path = require('path'); - -module.exports = function(npath, ext) { - if (typeof npath !== 'string') return npath; - if (npath.length === 0) return npath; - - var nFileName = path.basename(npath, path.extname(npath))+ext; - return path.join(path.dirname(npath), nFileName); -}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/template.js b/node_modules/gulp-imagemin/node_modules/gulp-util/lib/template.js deleted file mode 100644 index c467820f..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/lib/template.js +++ /dev/null @@ -1,19 +0,0 @@ -var template = require('lodash.template'); -var reInterpolate = require('lodash._reinterpolate'); - -var forcedSettings = { - escape: /<%-([\s\S]+?)%>/g, - evaluate: /<%([\s\S]+?)%>/g, - interpolate: reInterpolate -}; - -module.exports = function(tmpl, data){ - var fn = template(tmpl, null, forcedSettings); - - var wrapped = function(o) { - if (typeof o === 'undefined' || typeof o.file === 'undefined') throw new Error('Failed to provide the current file as "file" to the template'); - return fn(o); - }; - - return (data ? wrapped(data) : wrapped); -}; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/index.js deleted file mode 100644 index a21f7022..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/index.js +++ /dev/null @@ -1,63 +0,0 @@ -'use strict'; -var ansi = require('ansi-styles'); -var stripAnsi = require('strip-ansi'); -var hasColor = require('has-color'); -var defineProps = Object.defineProperties; -var chalk = module.exports; - -var styles = (function () { - var ret = {}; - - ansi.grey = ansi.gray; - - Object.keys(ansi).forEach(function (key) { - ret[key] = { - get: function () { - this._styles.push(key); - return this; - } - }; - }); - - return ret; -})(); - -function init() { - var ret = {}; - - Object.keys(styles).forEach(function (name) { - ret[name] = { - get: function () { - var obj = defineProps(function self() { - var str = [].slice.call(arguments).join(' '); - - if (!chalk.enabled) { - return str; - } - - return self._styles.reduce(function (str, name) { - var code = ansi[name]; - return str ? code.open + str + code.close : ''; - }, str); - }, styles); - - obj._styles = []; - - return obj[name]; - } - } - }); - - return ret; -} - -defineProps(chalk, init()); - -chalk.styles = ansi; -chalk.stripColor = stripAnsi; -chalk.supportsColor = hasColor; - -// detect mode if not set manually -if (chalk.enabled === undefined) { - chalk.enabled = chalk.supportsColor; -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/strip-ansi b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/strip-ansi deleted file mode 120000 index b65c9f81..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/strip-ansi +++ /dev/null @@ -1 +0,0 @@ -../strip-ansi/cli.js \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js deleted file mode 100644 index 3da548c4..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; -var styles = module.exports; - -var codes = { - reset: [0, 0], - - bold: [1, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - strikethrough: [9, 29], - - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39], - - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49] -}; - -Object.keys(codes).forEach(function (key) { - var val = codes[key]; - var style = styles[key] = {}; - style.open = '\x1b[' + val[0] + 'm'; - style.close = '\x1b[' + val[1] + 'm'; -}); diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/package.json deleted file mode 100644 index 633d5e9b..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "ansi-styles", - "version": "1.0.0", - "description": "ANSI escape codes for colorizing strings in the terminal", - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "homepage": "https://github.com/sindresorhus/ansi-styles", - "bugs": { - "url": "https://github.com/sindresorhus/ansi-styles/issues" - }, - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "ansi-styles.js" - ], - "main": "ansi-styles", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/ansi-styles.git" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "readme": "# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles)\n\n> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for colorizing strings in the terminal.\n\nYou probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings.\n\n![screenshot](screenshot.png)\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles`\n\n\n## Example\n\n```js\nvar ansi = require('ansi-styles');\n\nconsole.log(ansi.green.open + 'Hello world!' + ansi.green.close);\n```\n\n## API\n\nEach style has an `open` and `close` property.\n\n\n## Styles\n\n### General\n\n- reset\n- bold\n- italic\n- underline\n- inverse\n- strikethrough\n\n### Text colors\n\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n\n### Background colors\n\n- bgBlack\n- bgRed\n- bgGreen\n- bgYellow\n- bgBlue\n- bgMagenta\n- bgCyan\n- bgWhite\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "_id": "ansi-styles@1.0.0", - "dist": { - "shasum": "cb102df1c56f5123eab8b67cd7b98027a0279178" - }, - "_from": "ansi-styles@~1.0.0", - "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/readme.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/readme.md deleted file mode 100644 index 4ac8cbd0..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,65 +0,0 @@ -# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles) - -> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for colorizing strings in the terminal. - -You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings. - -![screenshot](screenshot.png) - - -## Install - -Install with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles` - - -## Example - -```js -var ansi = require('ansi-styles'); - -console.log(ansi.green.open + 'Hello world!' + ansi.green.close); -``` - -## API - -Each style has an `open` and `close` property. - - -## Styles - -### General - -- reset -- bold -- italic -- underline -- inverse -- strikethrough - -### Text colors - -- black -- red -- green -- yellow -- blue -- magenta -- cyan -- white -- gray - -### Background colors - -- bgBlack -- bgRed -- bgGreen -- bgYellow -- bgBlue -- bgMagenta -- bgCyan -- bgWhite - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/has-color.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/has-color.js deleted file mode 100644 index 27316b1f..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/has-color.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; -module.exports = (function () { - if (process.argv.indexOf('--no-color') !== -1) { - return false; - } - - if (process.argv.indexOf('--color') !== -1) { - return true; - } - - if (!process.stdout.isTTY) { - return false; - } - - if (process.platform === 'win32') { - return true; - } - - if ('COLORTERM' in process.env) { - return true; - } - - return /^screen|^xterm|color|ansi|cygwin|linux/i.test(process.env.TERM); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/package.json deleted file mode 100644 index d60b2d0a..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "has-color", - "version": "0.1.4", - "description": "Detect whether a terminal supports color", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "capability", - "detect" - ], - "homepage": "https://github.com/sindresorhus/has-color", - "bugs": { - "url": "https://github.com/sindresorhus/has-color/issues" - }, - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "has-color.js" - ], - "main": "has-color", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/has-color.git" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "readme": "# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color)\n\n> Detect whether a terminal supports color.\n\nUsed in the terminal color module [chalk](https://github.com/sindresorhus/chalk).\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/has-color): `npm install --save has-color`\n\n\n## Example\n\n```js\nvar hasColor = require('has-color');\n\nif (hasColor) {\n\tconsole.log('Terminal supports color.');\n}\n```\n\nIt obeys the CLI flags `--color` and `--no-color`.\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "_id": "has-color@0.1.4", - "dist": { - "shasum": "d1dadeea5b9e8b446bf08603532333710c95a290" - }, - "_from": "has-color@~0.1.0", - "_resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.4.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/readme.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/readme.md deleted file mode 100644 index 0918c851..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color) - -> Detect whether a terminal supports color. - -Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). - - -## Install - -Install with [npm](https://npmjs.org/package/has-color): `npm install --save has-color` - - -## Example - -```js -var hasColor = require('has-color'); - -if (hasColor) { - console.log('Terminal supports color.'); -} -``` - -It obeys the CLI flags `--color` and `--no-color`. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/cli.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/cli.js deleted file mode 100755 index f8019cda..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/cli.js +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env node -'use strict'; -var fs = require('fs'); -var strip = require('./index'); -var input = process.argv[2]; - -if (process.argv.indexOf('-h') !== -1 || process.argv.indexOf('--help') !== -1) { - console.log('strip-ansi <input file> > <output file>'); - console.log('or'); - console.log('cat <input file> | strip-ansi > <output file>'); - return; -} - -if (process.argv.indexOf('-v') !== -1 || process.argv.indexOf('--version') !== -1) { - console.log(require('./package').version); - return; -} - -if (input) { - process.stdout.write(strip(fs.readFileSync(input, 'utf8'))); - return; -} - -process.stdin.setEncoding('utf8'); -process.stdin.on('data', function (data) { - process.stdout.write(strip(data)); -}); diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/index.js deleted file mode 100644 index 62320c59..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -module.exports = function (str) { - return typeof str === 'string' ? str.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, '') : str; -}; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/package.json deleted file mode 100644 index 459be932..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "strip-ansi", - "version": "0.1.1", - "description": "Strip ANSI escape codes (used for colorizing strings in the terminal)", - "license": "MIT", - "bin": { - "strip-ansi": "cli.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/strip-ansi" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.8.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js", - "cli.js" - ], - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "devDependencies": { - "mocha": "~1.x" - }, - "readme": "# strip-ansi [![Build Status](https://secure.travis-ci.org/sindresorhus/strip-ansi.png?branch=master)](http://travis-ci.org/sindresorhus/strip-ansi)\n\n> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) (used for colorizing strings in the terminal)\n\nUsed in the terminal color module [chalk](https://github.com/sindresorhus/chalk).\n\n\n## Install\n\nInstall locally with [npm](https://npmjs.org/package/strip-ansi):\n\n```\nnpm install --save strip-ansi\n```\n\nOr globally if you want to use it as a CLI app:\n\n```\nnpm install --global strip-ansi\n```\n\nYou can then use it in your Terminal like:\n\n```\nstrip-ansi file-with-color-codes\n```\n\nOr pipe something to it:\n\n```\nls | strip-ansi\n```\n\n\n## Example\n\n```js\nvar stripAnsi = require('strip-ansi');\nstripAnsi('\\x1b[4mcake\\x1b[0m');\n//=> cake\n```\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "bugs": { - "url": "https://github.com/sindresorhus/strip-ansi/issues" - }, - "homepage": "https://github.com/sindresorhus/strip-ansi", - "_id": "strip-ansi@0.1.1", - "dist": { - "shasum": "39e8a98d044d150660abe4a6808acf70bb7bc991" - }, - "_from": "strip-ansi@~0.1.0", - "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/readme.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/readme.md deleted file mode 100644 index eb661b3d..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/readme.md +++ /dev/null @@ -1,46 +0,0 @@ -# strip-ansi [![Build Status](https://secure.travis-ci.org/sindresorhus/strip-ansi.png?branch=master)](http://travis-ci.org/sindresorhus/strip-ansi) - -> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) (used for colorizing strings in the terminal) - -Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). - - -## Install - -Install locally with [npm](https://npmjs.org/package/strip-ansi): - -``` -npm install --save strip-ansi -``` - -Or globally if you want to use it as a CLI app: - -``` -npm install --global strip-ansi -``` - -You can then use it in your Terminal like: - -``` -strip-ansi file-with-color-codes -``` - -Or pipe something to it: - -``` -ls | strip-ansi -``` - - -## Example - -```js -var stripAnsi = require('strip-ansi'); -stripAnsi('\x1b[4mcake\x1b[0m'); -//=> cake -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/package.json deleted file mode 100644 index 5ed4c5d5..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "chalk", - "version": "0.4.0", - "description": "Terminal string styling done right. Created because the `colors` module does some really horrible things.", - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/chalk" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.8.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js" - ], - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "ansi", - "styles", - "tty", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "has-color": "~0.1.0", - "ansi-styles": "~1.0.0", - "strip-ansi": "~0.1.0" - }, - "devDependencies": { - "mocha": "~1.x" - }, - "readme": "# <img width=\"250\" src=\"logo.png\" alt=\"chalk\">\n\n> Terminal string styling done right\n\n[![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk)\n\n[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough.\n\n**Chalk is a clean and focused alternative.**\n\n![screenshot](screenshot.png)\n\n\n## Why\n\n- **Doesn't extend String.prototype**\n- Expressive API\n- Clean and focused\n- Auto-detects color support\n- Actively maintained\n- [Used by 150+ modules](https://npmjs.org/browse/depended/chalk)\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/chalk): `npm install --save chalk`\n\n\n## Example\n\nChalk comes with an easy to use composable API where you just chain and nest the styles you want.\n\n```js\nvar chalk = require('chalk');\n\n// style a string\nconsole.log( chalk.blue('Hello world!') );\n\n// combine styled and normal strings\nconsole.log( chalk.blue('Hello'), 'World' + chalk.red('!') );\n\n// compose multiple styles using the chainable API\nconsole.log( chalk.blue.bgRed.bold('Hello world!') );\n\n// nest styles\nconsole.log( chalk.red('Hello', chalk.underline.bgBlue('world') + '!') );\n\n// pass in multiple arguments\nconsole.log( chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz') );\n```\n\nYou can easily define your own themes.\n\n```js\nvar chalk = require('chalk');\nvar error = chalk.bold.red;\nconsole.log(error('Error!'));\n```\n\n\n## API\n\n### chalk.`<style>[.<style>...](string, [string...])`\n\nExample: `chalk.red.bold.underline('Hello', 'world');`\n\nChain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter.\n\nMultiple arguments will be separated by space.\n\n### chalk.enabled\n\nColor support is automatically detected, but you can override it.\n\n### chalk.supportsColor\n\nDetect whether the terminal [supports color](https://github.com/sindresorhus/has-color).\n\nCan be overridden by the user with the flags `--color` and `--no-color`.\n\nUsed internally and handled for you, but exposed for convenience.\n\n### chalk.styles\n\nExposes the styles as [ANSI escape codes](https://github.com/sindresorhus/ansi-styles).\n\nGenerally not useful, but you might need just the `.open` or `.close` escape code if you're mixing externally styled strings with yours.\n\n```js\nvar chalk = require('chalk');\n\nconsole.log(chalk.styles.red);\n//=> {open: '\\x1b[31m', close: '\\x1b[39m'}\n\nconsole.log(chalk.styles.red.open + 'Hello' + chalk.styles.red.close);\n```\n\n### chalk.stripColor(string)\n\n[Strip color](https://github.com/sindresorhus/strip-ansi) from a string.\n\nCan be useful in combination with `.supportsColor` to strip color on externally styled text when it's not supported.\n\nExample:\n\n```js\nvar chalk = require('chalk');\nvar styledString = fromExternal();\n\nif (!chalk.supportsColor) {\n\tchalk.stripColor(styledString);\n}\n```\n\n\n## Styles\n\n### General\n\n- reset\n- bold\n- italic\n- underline\n- inverse\n- strikethrough\n\n### Text colors\n\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n\n### Background colors\n\n- bgBlack\n- bgRed\n- bgGreen\n- bgYellow\n- bgBlue\n- bgMagenta\n- bgCyan\n- bgWhite\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n\n\n-\n\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/sindresorhus/chalk/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n", - "readmeFilename": "readme.md", - "bugs": { - "url": "https://github.com/sindresorhus/chalk/issues" - }, - "homepage": "https://github.com/sindresorhus/chalk", - "_id": "chalk@0.4.0", - "dist": { - "shasum": "5199a3ddcd0c1efe23bc08c1b027b06176e0c64f" - }, - "_from": "chalk@~0.4.0", - "_resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/readme.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/readme.md deleted file mode 100644 index 46813acf..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/chalk/readme.md +++ /dev/null @@ -1,158 +0,0 @@ -# <img width="250" src="logo.png" alt="chalk"> - -> Terminal string styling done right - -[![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk) - -[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough. - -**Chalk is a clean and focused alternative.** - -![screenshot](screenshot.png) - - -## Why - -- **Doesn't extend String.prototype** -- Expressive API -- Clean and focused -- Auto-detects color support -- Actively maintained -- [Used by 150+ modules](https://npmjs.org/browse/depended/chalk) - - -## Install - -Install with [npm](https://npmjs.org/package/chalk): `npm install --save chalk` - - -## Example - -Chalk comes with an easy to use composable API where you just chain and nest the styles you want. - -```js -var chalk = require('chalk'); - -// style a string -console.log( chalk.blue('Hello world!') ); - -// combine styled and normal strings -console.log( chalk.blue('Hello'), 'World' + chalk.red('!') ); - -// compose multiple styles using the chainable API -console.log( chalk.blue.bgRed.bold('Hello world!') ); - -// nest styles -console.log( chalk.red('Hello', chalk.underline.bgBlue('world') + '!') ); - -// pass in multiple arguments -console.log( chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz') ); -``` - -You can easily define your own themes. - -```js -var chalk = require('chalk'); -var error = chalk.bold.red; -console.log(error('Error!')); -``` - - -## API - -### chalk.`<style>[.<style>...](string, [string...])` - -Example: `chalk.red.bold.underline('Hello', 'world');` - -Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter. - -Multiple arguments will be separated by space. - -### chalk.enabled - -Color support is automatically detected, but you can override it. - -### chalk.supportsColor - -Detect whether the terminal [supports color](https://github.com/sindresorhus/has-color). - -Can be overridden by the user with the flags `--color` and `--no-color`. - -Used internally and handled for you, but exposed for convenience. - -### chalk.styles - -Exposes the styles as [ANSI escape codes](https://github.com/sindresorhus/ansi-styles). - -Generally not useful, but you might need just the `.open` or `.close` escape code if you're mixing externally styled strings with yours. - -```js -var chalk = require('chalk'); - -console.log(chalk.styles.red); -//=> {open: '\x1b[31m', close: '\x1b[39m'} - -console.log(chalk.styles.red.open + 'Hello' + chalk.styles.red.close); -``` - -### chalk.stripColor(string) - -[Strip color](https://github.com/sindresorhus/strip-ansi) from a string. - -Can be useful in combination with `.supportsColor` to strip color on externally styled text when it's not supported. - -Example: - -```js -var chalk = require('chalk'); -var styledString = fromExternal(); - -if (!chalk.supportsColor) { - chalk.stripColor(styledString); -} -``` - - -## Styles - -### General - -- reset -- bold -- italic -- underline -- inverse -- strikethrough - -### Text colors - -- black -- red -- green -- yellow -- blue -- magenta -- cyan -- white -- gray - -### Background colors - -- bgBlack -- bgRed -- bgGreen -- bgYellow -- bgBlue -- bgMagenta -- bgCyan -- bgWhite - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) - - -- - -[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/sindresorhus/chalk/trend.png)](https://bitdeli.com/free "Bitdeli Badge") diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/dateformat/LICENSE b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/dateformat/LICENSE deleted file mode 100644 index 57d44e2a..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/dateformat/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -(c) 2007-2009 Steven Levithan <stevenlevithan.com> - -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/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/dateformat/Readme.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/dateformat/Readme.md deleted file mode 100644 index 12f9872d..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/dateformat/Readme.md +++ /dev/null @@ -1,79 +0,0 @@ -# dateformat - -A node.js package for Steven Levithan's excellent [dateFormat()][dateformat] function. - -## Modifications - -* Removed the `Date.prototype.format` method. Sorry folks, but extending native prototypes is for suckers. -* Added a `module.exports = dateFormat;` statement at the bottom -* Added the placeholder `N` to get the ISO 8601 numeric representation of the day of the week - -## Installation - -```bash -$ npm install dateformat -``` - -## Usage - -As taken from Steven's post, modified to match the Modifications listed above: -```js - var dateFormat = require('dateformat'); - var now = new Date(); - - // Basic usage - dateFormat(now, "dddd, mmmm dS, yyyy, h:MM:ss TT"); - // Saturday, June 9th, 2007, 5:46:21 PM - - // You can use one of several named masks - dateFormat(now, "isoDateTime"); - // 2007-06-09T17:46:21 - - // ...Or add your own - dateFormat.masks.hammerTime = 'HH:MM! "Can\'t touch this!"'; - dateFormat(now, "hammerTime"); - // 17:46! Can't touch this! - - // When using the standalone dateFormat function, - // you can also provide the date as a string - dateFormat("Jun 9 2007", "fullDate"); - // Saturday, June 9, 2007 - - // Note that if you don't include the mask argument, - // dateFormat.masks.default is used - dateFormat(now); - // Sat Jun 09 2007 17:46:21 - - // And if you don't include the date argument, - // the current date and time is used - dateFormat(); - // Sat Jun 09 2007 17:46:22 - - // You can also skip the date argument (as long as your mask doesn't - // contain any numbers), in which case the current date/time is used - dateFormat("longTime"); - // 5:46:22 PM EST - - // And finally, you can convert local time to UTC time. Simply pass in - // true as an additional argument (no argument skipping allowed in this case): - dateFormat(now, "longTime", true); - // 10:46:21 PM UTC - - // ...Or add the prefix "UTC:" or "GMT:" to your mask. - dateFormat(now, "UTC:h:MM:ss TT Z"); - // 10:46:21 PM UTC - - // You can also get the ISO 8601 week of the year: - dateFormat(now, "W"); - // 42 - - // and also get the ISO 8601 numeric representation of the day of the week: - dateFormat(now,"N"); - // 6 -``` -## License - -(c) 2007-2009 Steven Levithan [stevenlevithan.com][stevenlevithan], MIT license. - -[dateformat]: http://blog.stevenlevithan.com/archives/date-time-format -[stevenlevithan]: http://stevenlevithan.com/ diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/dateformat/lib/dateformat.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/dateformat/lib/dateformat.js deleted file mode 100644 index e1c38245..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/dateformat/lib/dateformat.js +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Date Format 1.2.3 - * (c) 2007-2009 Steven Levithan <stevenlevithan.com> - * MIT license - * - * Includes enhancements by Scott Trenda <scott.trenda.net> - * and Kris Kowal <cixar.com/~kris.kowal/> - * - * Accepts a date, a mask, or a date and a mask. - * Returns a formatted version of the given date. - * The date defaults to the current date/time. - * The mask defaults to dateFormat.masks.default. - */ - -var dateFormat = function () { - var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|"[^"]*"|'[^']*'/g, - timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g, - timezoneClip = /[^-+\dA-Z]/g, - pad = function (val, len) { - val = String(val); - len = len || 2; - while (val.length < len) val = "0" + val; - return val; - }, - /** - * Get the ISO 8601 week number - * Based on comments from - * http://techblog.procurios.nl/k/n618/news/view/33796/14863/Calculate-ISO-8601-week-and-year-in-javascript.html - */ - getWeek = function (date) { - // Remove time components of date - var targetThursday = new Date(date.getFullYear(), date.getMonth(), date.getDate()); - - // Change date to Thursday same week - targetThursday.setDate(targetThursday.getDate() - ((targetThursday.getDay() + 6) % 7) + 3); - - // Take January 4th as it is always in week 1 (see ISO 8601) - var firstThursday = new Date(targetThursday.getFullYear(), 0, 4); - - // Change date to Thursday same week - firstThursday.setDate(firstThursday.getDate() - ((firstThursday.getDay() + 6) % 7) + 3); - - // Check if daylight-saving-time-switch occured and correct for it - var ds = targetThursday.getTimezoneOffset() - firstThursday.getTimezoneOffset(); - targetThursday.setHours(targetThursday.getHours() - ds); - - // Number of weeks between target Thursday and first Thursday - var weekDiff = (targetThursday - firstThursday) / (86400000*7); - return 1 + weekDiff; - }, - - /** - * Get ISO-8601 numeric representation of the day of the week - * 1 (for Monday) through 7 (for Sunday) - */ - - getDayOfWeek = function(date){ - var dow = date.getDay(); - if(dow === 0) dow = 7; - return dow; - }; - - // Regexes and supporting functions are cached through closure - return function (date, mask, utc, gmt) { - var dF = dateFormat; - - // You can't provide utc if you skip other args (use the "UTC:" mask prefix) - if (arguments.length == 1 && Object.prototype.toString.call(date) == "[object String]" && !/\d/.test(date)) { - mask = date; - date = undefined; - } - - date = date || new Date; - - if(!(date instanceof Date)) { - date = new Date(date); - } - - if (isNaN(date)) { - throw TypeError("Invalid date"); - } - - mask = String(dF.masks[mask] || mask || dF.masks["default"]); - - // Allow setting the utc/gmt argument via the mask - var maskSlice = mask.slice(0, 4); - if (maskSlice == "UTC:" || maskSlice == "GMT:") { - mask = mask.slice(4); - utc = true; - if (maskSlice == "GMT:") { - gmt = true; - } - } - - var _ = utc ? "getUTC" : "get", - d = date[_ + "Date"](), - D = date[_ + "Day"](), - m = date[_ + "Month"](), - y = date[_ + "FullYear"](), - H = date[_ + "Hours"](), - M = date[_ + "Minutes"](), - s = date[_ + "Seconds"](), - L = date[_ + "Milliseconds"](), - o = utc ? 0 : date.getTimezoneOffset(), - W = getWeek(date), - N = getDayOfWeek(date), - flags = { - d: d, - dd: pad(d), - ddd: dF.i18n.dayNames[D], - dddd: dF.i18n.dayNames[D + 7], - m: m + 1, - mm: pad(m + 1), - mmm: dF.i18n.monthNames[m], - mmmm: dF.i18n.monthNames[m + 12], - yy: String(y).slice(2), - yyyy: y, - h: H % 12 || 12, - hh: pad(H % 12 || 12), - H: H, - HH: pad(H), - M: M, - MM: pad(M), - s: s, - ss: pad(s), - l: pad(L, 3), - L: pad(L > 99 ? Math.round(L / 10) : L), - t: H < 12 ? "a" : "p", - tt: H < 12 ? "am" : "pm", - T: H < 12 ? "A" : "P", - TT: H < 12 ? "AM" : "PM", - Z: gmt ? "GMT" : utc ? "UTC" : (String(date).match(timezone) || [""]).pop().replace(timezoneClip, ""), - o: (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4), - S: ["th", "st", "nd", "rd"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10], - W: W, - N: N - }; - - return mask.replace(token, function ($0) { - return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1); - }); - }; -}(); - -// Some common format strings -dateFormat.masks = { - "default": "ddd mmm dd yyyy HH:MM:ss", - shortDate: "m/d/yy", - mediumDate: "mmm d, yyyy", - longDate: "mmmm d, yyyy", - fullDate: "dddd, mmmm d, yyyy", - shortTime: "h:MM TT", - mediumTime: "h:MM:ss TT", - longTime: "h:MM:ss TT Z", - isoDate: "yyyy-mm-dd", - isoTime: "HH:MM:ss", - isoDateTime: "yyyy-mm-dd'T'HH:MM:ss", - isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'", - expiresHeaderFormat: "ddd, dd mmm yyyy HH:MM:ss Z" -}; - -// Internationalization strings -dateFormat.i18n = { - dayNames: [ - "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", - "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" - ], - monthNames: [ - "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", - "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" - ] -}; - -/* -// For convenience... -Date.prototype.format = function (mask, utc) { - return dateFormat(this, mask, utc); -}; -*/ - -if (typeof exports !== "undefined") { - module.exports = dateFormat; -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/dateformat/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/dateformat/package.json deleted file mode 100644 index c1f687e9..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/dateformat/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "dateformat", - "description": "A node.js package for Steven Levithan's excellent dateFormat() function.", - "maintainers": "Felix Geisendörfer <felix@debuggable.com>", - "homepage": "https://github.com/felixge/node-dateformat", - "author": { - "name": "Steven Levithan" - }, - "contributors": [ - { - "name": "Steven Levithan" - }, - { - "name": "Felix Geisendörfer", - "email": "felix@debuggable.com" - }, - { - "name": "Christoph Tavan", - "email": "dev@tavan.de" - } - ], - "version": "1.0.7-1.2.3", - "main": "./lib/dateformat", - "dependencies": {}, - "devDependencies": {}, - "engines": { - "node": "*" - }, - "repository": { - "type": "git", - "url": "https://github.com/felixge/node-dateformat.git" - }, - "readme": "# dateformat\n\nA node.js package for Steven Levithan's excellent [dateFormat()][dateformat] function.\n\n## Modifications\n\n* Removed the `Date.prototype.format` method. Sorry folks, but extending native prototypes is for suckers.\n* Added a `module.exports = dateFormat;` statement at the bottom\n* Added the placeholder `N` to get the ISO 8601 numeric representation of the day of the week\n\n## Installation\n\n```bash\n$ npm install dateformat\n```\n\n## Usage\n\nAs taken from Steven's post, modified to match the Modifications listed above:\n```js\n var dateFormat = require('dateformat');\n var now = new Date();\n\n // Basic usage\n dateFormat(now, \"dddd, mmmm dS, yyyy, h:MM:ss TT\");\n // Saturday, June 9th, 2007, 5:46:21 PM\n\n // You can use one of several named masks\n dateFormat(now, \"isoDateTime\");\n // 2007-06-09T17:46:21\n\n // ...Or add your own\n dateFormat.masks.hammerTime = 'HH:MM! \"Can\\'t touch this!\"';\n dateFormat(now, \"hammerTime\");\n // 17:46! Can't touch this!\n\n // When using the standalone dateFormat function,\n // you can also provide the date as a string\n dateFormat(\"Jun 9 2007\", \"fullDate\");\n // Saturday, June 9, 2007\n\n // Note that if you don't include the mask argument,\n // dateFormat.masks.default is used\n dateFormat(now);\n // Sat Jun 09 2007 17:46:21\n\n // And if you don't include the date argument,\n // the current date and time is used\n dateFormat();\n // Sat Jun 09 2007 17:46:22\n\n // You can also skip the date argument (as long as your mask doesn't\n // contain any numbers), in which case the current date/time is used\n dateFormat(\"longTime\");\n // 5:46:22 PM EST\n\n // And finally, you can convert local time to UTC time. Simply pass in\n // true as an additional argument (no argument skipping allowed in this case):\n dateFormat(now, \"longTime\", true);\n // 10:46:21 PM UTC\n\n // ...Or add the prefix \"UTC:\" or \"GMT:\" to your mask.\n dateFormat(now, \"UTC:h:MM:ss TT Z\");\n // 10:46:21 PM UTC\n\n // You can also get the ISO 8601 week of the year:\n dateFormat(now, \"W\");\n // 42\n\n // and also get the ISO 8601 numeric representation of the day of the week:\n dateFormat(now,\"N\");\n // 6\n```\n## License\n\n(c) 2007-2009 Steven Levithan [stevenlevithan.com][stevenlevithan], MIT license.\n\n[dateformat]: http://blog.stevenlevithan.com/archives/date-time-format\n[stevenlevithan]: http://stevenlevithan.com/\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/felixge/node-dateformat/issues" - }, - "_id": "dateformat@1.0.7-1.2.3", - "dist": { - "shasum": "ee94157a2b1444b4a0cdc48dd6fe1ce67592e62d" - }, - "_from": "dateformat@~1.0.7-1.2.3", - "_resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.7-1.2.3.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/dateformat/test/basic.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/dateformat/test/basic.js deleted file mode 100644 index 9602a72a..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/dateformat/test/basic.js +++ /dev/null @@ -1,45 +0,0 @@ -var dateFormat = require('./lib/dateformat.js'); -var now = new Date(); - -// Basic usage -console.log(dateFormat(now, "dddd, mmmm dS, yyyy, h:MM:ss TT")); -// Saturday, June 9th, 2007, 5:46:21 PM - -// You can use one of several named masks -console.log(dateFormat(now, "isoDateTime")); -// 2007-06-09T17:46:21 - -// ...Or add your own -dateFormat.masks.hammerTime = 'HH:MM! "Can\'t touch this!"'; -console.log(dateFormat(now, "hammerTime")); -// 17:46! Can't touch this! - -// When using the standalone dateFormat function, -// you can also provide the date as a string -console.log(dateFormat("Jun 9 2007", "fullDate")); -// Saturday, June 9, 2007 - -// Note that if you don't include the mask argument, -// dateFormat.masks.default is used -console.log(dateFormat(now)); -// Sat Jun 09 2007 17:46:21 - -// And if you don't include the date argument, -// the current date and time is used -console.log(dateFormat()); -// Sat Jun 09 2007 17:46:22 - -// You can also skip the date argument (as long as your mask doesn't -// contain any numbers), in which case the current date/time is used -console.log(dateFormat("longTime")); -// 5:46:22 PM EST - -// And finally, you can convert local time to UTC time. Simply pass in -// true as an additional argument (no argument skipping allowed in this case): -console.log(dateFormat(now, "longTime", true)); -// 10:46:21 PM UTC - -// ...Or add the prefix "UTC:" to your mask. -console.log(dateFormat(now, "UTC:h:MM:ss TT Z")); -// 10:46:21 PM UTC - diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/dateformat/test/test_dayofweek.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/dateformat/test/test_dayofweek.js deleted file mode 100644 index 07780fa8..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/dateformat/test/test_dayofweek.js +++ /dev/null @@ -1,10 +0,0 @@ -var dateFormat = require('./../lib/dateformat'), - assert = require('assert'); - -var start = 10; // the 10 of March 2013 is a Sunday -for(var dow = 1; dow <= 7; dow++){ - var date = new Date('2013-03-' + (start + dow)); - var N = dateFormat(date,'N'); - assert.equal(N,dow); - console.log('The ISO-8601 numeric representation of the day "' + date.toString() + '" is ' + N); -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/dateformat/test/test_weekofyear.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/dateformat/test/test_weekofyear.js deleted file mode 100644 index d1ddbe81..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/dateformat/test/test_weekofyear.js +++ /dev/null @@ -1,4 +0,0 @@ -var dateFormat = require('../lib/dateformat.js'); - -var val = process.argv[2] || new Date(); -console.log(dateFormat(val, 'W')); diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/dateformat/test/test_weekofyear.sh b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/dateformat/test/test_weekofyear.sh deleted file mode 100644 index 3c3e69b3..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/dateformat/test/test_weekofyear.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -# this just takes php's date() function as a reference to check if week of year -# is calculated correctly in the range from 1970 .. 2038 by brute force... - -SEQ="seq" -SYSTEM=`uname` -if [ "$SYSTEM" = "Darwin" ]; then - SEQ="jot" -fi - -for YEAR in {1970..2038}; do - for MONTH in {1..12}; do - DAYS=$(cal $MONTH $YEAR | egrep "28|29|30|31" |tail -1 |awk '{print $NF}') - for DAY in $( $SEQ $DAYS ); do - DATE=$YEAR-$MONTH-$DAY - echo -n $DATE ... - NODEVAL=$(node test_weekofyear.js $DATE) - PHPVAL=$(php -r "echo intval(date('W', strtotime('$DATE')));") - if [ "$NODEVAL" -ne "$PHPVAL" ]; then - echo "MISMATCH: node: $NODEVAL vs php: $PHPVAL for date $DATE" - else - echo " OK" - fi - done - done -done diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash._reinterpolate/LICENSE.txt b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash._reinterpolate/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash._reinterpolate/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash._reinterpolate/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash._reinterpolate/README.md deleted file mode 100644 index d362e36d..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash._reinterpolate/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._reinterpolate v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `reInterpolate` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash._reinterpolate/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash._reinterpolate/index.js deleted file mode 100644 index 0bf92a5c..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash._reinterpolate/index.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** Used to match "interpolate" template delimiters */ -var reInterpolate = /<%=([\s\S]+?)%>/g; - -module.exports = reInterpolate; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash._reinterpolate/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash._reinterpolate/package.json deleted file mode 100644 index 2f3da035..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash._reinterpolate/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "lodash._reinterpolate", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `reInterpolate` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._reinterpolate v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `reInterpolate` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._reinterpolate@2.4.1", - "dist": { - "shasum": "4f1227aa5a8711fc632f5b07a1f4607aab8b3222" - }, - "_from": "lodash._reinterpolate@~2.4.1", - "_resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-2.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/LICENSE.txt b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/README.md deleted file mode 100644 index e89bd0db..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.template v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.template`](http://lodash.com/docs#template) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/index.js deleted file mode 100644 index 230f8ee8..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/index.js +++ /dev/null @@ -1,216 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var defaults = require('lodash.defaults'), - escape = require('lodash.escape'), - escapeStringChar = require('lodash._escapestringchar'), - keys = require('lodash.keys'), - reInterpolate = require('lodash._reinterpolate'), - templateSettings = require('lodash.templatesettings'), - values = require('lodash.values'); - -/** Used to match empty string literals in compiled template source */ -var reEmptyStringLeading = /\b__p \+= '';/g, - reEmptyStringMiddle = /\b(__p \+=) '' \+/g, - reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; - -/** - * Used to match ES6 template delimiters - * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-literals-string-literals - */ -var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; - -/** Used to ensure capturing order of template delimiters */ -var reNoMatch = /($^)/; - -/** Used to match unescaped characters in compiled string literals */ -var reUnescapedString = /['\n\r\t\u2028\u2029\\]/g; - -/** - * A micro-templating method that handles arbitrary delimiters, preserves - * whitespace, and correctly escapes quotes within interpolated code. - * - * Note: In the development build, `_.template` utilizes sourceURLs for easier - * debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl - * - * For more information on precompiling templates see: - * http://lodash.com/custom-builds - * - * For more information on Chrome extension sandboxes see: - * http://developer.chrome.com/stable/extensions/sandboxingEval.html - * - * @static - * @memberOf _ - * @category Utilities - * @param {string} text The template text. - * @param {Object} data The data object used to populate the text. - * @param {Object} [options] The options object. - * @param {RegExp} [options.escape] The "escape" delimiter. - * @param {RegExp} [options.evaluate] The "evaluate" delimiter. - * @param {Object} [options.imports] An object to import into the template as local variables. - * @param {RegExp} [options.interpolate] The "interpolate" delimiter. - * @param {string} [sourceURL] The sourceURL of the template's compiled source. - * @param {string} [variable] The data object variable name. - * @returns {Function|string} Returns a compiled function when no `data` object - * is given, else it returns the interpolated text. - * @example - * - * // using the "interpolate" delimiter to create a compiled template - * var compiled = _.template('hello <%= name %>'); - * compiled({ 'name': 'fred' }); - * // => 'hello fred' - * - * // using the "escape" delimiter to escape HTML in data property values - * _.template('<b><%- value %></b>', { 'value': '<script>' }); - * // => '<b><script></b>' - * - * // using the "evaluate" delimiter to generate HTML - * var list = '<% _.forEach(people, function(name) { %><li><%- name %></li><% }); %>'; - * _.template(list, { 'people': ['fred', 'barney'] }); - * // => '<li>fred</li><li>barney</li>' - * - * // using the ES6 delimiter as an alternative to the default "interpolate" delimiter - * _.template('hello ${ name }', { 'name': 'pebbles' }); - * // => 'hello pebbles' - * - * // using the internal `print` function in "evaluate" delimiters - * _.template('<% print("hello " + name); %>!', { 'name': 'barney' }); - * // => 'hello barney!' - * - * // using a custom template delimiters - * _.templateSettings = { - * 'interpolate': /{{([\s\S]+?)}}/g - * }; - * - * _.template('hello {{ name }}!', { 'name': 'mustache' }); - * // => 'hello mustache!' - * - * // using the `imports` option to import jQuery - * var list = '<% jq.each(people, function(name) { %><li><%- name %></li><% }); %>'; - * _.template(list, { 'people': ['fred', 'barney'] }, { 'imports': { 'jq': jQuery } }); - * // => '<li>fred</li><li>barney</li>' - * - * // using the `sourceURL` option to specify a custom sourceURL for the template - * var compiled = _.template('hello <%= name %>', null, { 'sourceURL': '/basic/greeting.jst' }); - * compiled(data); - * // => find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector - * - * // using the `variable` option to ensure a with-statement isn't used in the compiled template - * var compiled = _.template('hi <%= data.name %>!', null, { 'variable': 'data' }); - * compiled.source; - * // => function(data) { - * var __t, __p = '', __e = _.escape; - * __p += 'hi ' + ((__t = ( data.name )) == null ? '' : __t) + '!'; - * return __p; - * } - * - * // using the `source` property to inline compiled templates for meaningful - * // line numbers in error messages and a stack trace - * fs.writeFileSync(path.join(cwd, 'jst.js'), '\ - * var JST = {\ - * "main": ' + _.template(mainText).source + '\ - * };\ - * '); - */ -function template(text, data, options) { - // based on John Resig's `tmpl` implementation - // http://ejohn.org/blog/javascript-micro-templating/ - // and Laura Doktorova's doT.js - // https://github.com/olado/doT - var settings = templateSettings.imports._.templateSettings || templateSettings; - text = String(text || ''); - - // avoid missing dependencies when `iteratorTemplate` is not defined - options = defaults({}, options, settings); - - var imports = defaults({}, options.imports, settings.imports), - importsKeys = keys(imports), - importsValues = values(imports); - - var isEvaluating, - index = 0, - interpolate = options.interpolate || reNoMatch, - source = "__p += '"; - - // compile the regexp to match each delimiter - var reDelimiters = RegExp( - (options.escape || reNoMatch).source + '|' + - interpolate.source + '|' + - (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' + - (options.evaluate || reNoMatch).source + '|$' - , 'g'); - - text.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) { - interpolateValue || (interpolateValue = esTemplateValue); - - // escape characters that cannot be included in string literals - source += text.slice(index, offset).replace(reUnescapedString, escapeStringChar); - - // replace delimiters with snippets - if (escapeValue) { - source += "' +\n__e(" + escapeValue + ") +\n'"; - } - if (evaluateValue) { - isEvaluating = true; - source += "';\n" + evaluateValue + ";\n__p += '"; - } - if (interpolateValue) { - source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'"; - } - index = offset + match.length; - - // the JS engine embedded in Adobe products requires returning the `match` - // string in order to produce the correct `offset` value - return match; - }); - - source += "';\n"; - - // if `variable` is not specified, wrap a with-statement around the generated - // code to add the data object to the top of the scope chain - var variable = options.variable, - hasVariable = variable; - - if (!hasVariable) { - variable = 'obj'; - source = 'with (' + variable + ') {\n' + source + '\n}\n'; - } - // cleanup code by stripping empty strings - source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source) - .replace(reEmptyStringMiddle, '$1') - .replace(reEmptyStringTrailing, '$1;'); - - // frame code as the function body - source = 'function(' + variable + ') {\n' + - (hasVariable ? '' : variable + ' || (' + variable + ' = {});\n') + - "var __t, __p = '', __e = _.escape" + - (isEvaluating - ? ', __j = Array.prototype.join;\n' + - "function print() { __p += __j.call(arguments, '') }\n" - : ';\n' - ) + - source + - 'return __p\n}'; - - try { - var result = Function(importsKeys, 'return ' + source ).apply(undefined, importsValues); - } catch(e) { - e.source = source; - throw e; - } - if (data) { - return result(data); - } - // provide the compiled function's source by its `toString` method, in - // supported environments, or the `source` property as a convenience for - // inlining compiled templates during the build process - result.source = source; - return result; -} - -module.exports = template; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/LICENSE.txt b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/README.md deleted file mode 100644 index 6191a196..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._escapestringchar v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `escapeStringChar` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/index.js deleted file mode 100644 index f3b8c438..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/index.js +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** Used to escape characters for inclusion in compiled string literals */ -var stringEscapes = { - '\\': '\\', - "'": "'", - '\n': 'n', - '\r': 'r', - '\t': 't', - '\u2028': 'u2028', - '\u2029': 'u2029' -}; - -/** - * Used by `template` to escape characters for inclusion in compiled - * string literals. - * - * @private - * @param {string} match The matched character to escape. - * @returns {string} Returns the escaped character. - */ -function escapeStringChar(match) { - return '\\' + stringEscapes[match]; -} - -module.exports = escapeStringChar; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/package.json deleted file mode 100644 index a12ffa73..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "lodash._escapestringchar", - "version": "2.4.1", - "description": "The internal Lo-Dash function `escapeStringChar` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._escapestringchar v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `escapeStringChar` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._escapestringchar@2.4.1", - "dist": { - "shasum": "ecfe22618a2ade50bfeea43937e51df66f0edb72" - }, - "_from": "lodash._escapestringchar@~2.4.1", - "_resolved": "https://registry.npmjs.org/lodash._escapestringchar/-/lodash._escapestringchar-2.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/LICENSE.txt b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/README.md deleted file mode 100644 index da283fc4..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.defaults v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.defaults`](http://lodash.com/docs#defaults) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/index.js deleted file mode 100644 index 52eec906..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/index.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var keys = require('lodash.keys'), - objectTypes = require('lodash._objecttypes'); - -/** - * Assigns own enumerable properties of source object(s) to the destination - * object for all destination properties that resolve to `undefined`. Once a - * property is set, additional defaults of the same property will be ignored. - * - * @static - * @memberOf _ - * @type Function - * @category Objects - * @param {Object} object The destination object. - * @param {...Object} [source] The source objects. - * @param- {Object} [guard] Allows working with `_.reduce` without using its - * `key` and `object` arguments as sources. - * @returns {Object} Returns the destination object. - * @example - * - * var object = { 'name': 'barney' }; - * _.defaults(object, { 'name': 'fred', 'employer': 'slate' }); - * // => { 'name': 'barney', 'employer': 'slate' } - */ -var defaults = function(object, source, guard) { - var index, iterable = object, result = iterable; - if (!iterable) return result; - var args = arguments, - argsIndex = 0, - argsLength = typeof guard == 'number' ? 2 : args.length; - while (++argsIndex < argsLength) { - iterable = args[argsIndex]; - if (iterable && objectTypes[typeof iterable]) { - var ownIndex = -1, - ownProps = objectTypes[typeof iterable] && keys(iterable), - length = ownProps ? ownProps.length : 0; - - while (++ownIndex < length) { - index = ownProps[ownIndex]; - if (typeof result[index] == 'undefined') result[index] = iterable[index]; - } - } - } - return result -}; - -module.exports = defaults; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/LICENSE.txt b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/README.md deleted file mode 100644 index 16de7300..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._objecttypes v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/index.js deleted file mode 100644 index da17c6cd..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** Used to determine if values are of the language type Object */ -var objectTypes = { - 'boolean': false, - 'function': true, - 'object': true, - 'number': false, - 'string': false, - 'undefined': false -}; - -module.exports = objectTypes; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/package.json deleted file mode 100644 index f5b3de80..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "lodash._objecttypes", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `objectTypes` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._objecttypes v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._objecttypes@2.4.1", - "dist": { - "shasum": "7c0b7f69d98a1f76529f890b0cdb1b4dfec11c11" - }, - "_from": "lodash._objecttypes@~2.4.1", - "_resolved": "https://registry.npmjs.org/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/package.json deleted file mode 100644 index dde9277d..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "lodash.defaults", - "version": "2.4.1", - "description": "The Lo-Dash function `_.defaults` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash.keys": "~2.4.1", - "lodash._objecttypes": "~2.4.1" - }, - "readme": "# lodash.defaults v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.defaults`](http://lodash.com/docs#defaults) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.defaults@2.4.1", - "dist": { - "shasum": "a7e8885f05e68851144b6e12a8f3678026bc4c54" - }, - "_from": "lodash.defaults@~2.4.1", - "_resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-2.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/LICENSE.txt b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/README.md deleted file mode 100644 index 7cbc6538..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.escape v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.escape`](http://lodash.com/docs#escape) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/index.js deleted file mode 100644 index 343a4156..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/index.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var escapeHtmlChar = require('lodash._escapehtmlchar'), - keys = require('lodash.keys'), - reUnescapedHtml = require('lodash._reunescapedhtml'); - -/** - * Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their - * corresponding HTML entities. - * - * @static - * @memberOf _ - * @category Utilities - * @param {string} string The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escape('Fred, Wilma, & Pebbles'); - * // => 'Fred, Wilma, & Pebbles' - */ -function escape(string) { - return string == null ? '' : String(string).replace(reUnescapedHtml, escapeHtmlChar); -} - -module.exports = escape; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/LICENSE.txt b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/README.md deleted file mode 100644 index eef7f9c6..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._escapehtmlchar v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `escapeHtmlChar` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/index.js deleted file mode 100644 index ce4e6d8e..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/index.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var htmlEscapes = require('lodash._htmlescapes'); - -/** - * Used by `escape` to convert characters to HTML entities. - * - * @private - * @param {string} match The matched character to escape. - * @returns {string} Returns the escaped character. - */ -function escapeHtmlChar(match) { - return htmlEscapes[match]; -} - -module.exports = escapeHtmlChar; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/LICENSE.txt b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/README.md deleted file mode 100644 index 9957cefa..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._htmlescapes v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `htmlEscapes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/index.js deleted file mode 100644 index f69503d4..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/index.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** - * Used to convert characters to HTML entities: - * - * Though the `>` character is escaped for symmetry, characters like `>` and `/` - * don't require escaping in HTML and have no special meaning unless they're part - * of a tag or an unquoted attribute value. - * http://mathiasbynens.be/notes/ambiguous-ampersands (under "semi-related fun fact") - */ -var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' -}; - -module.exports = htmlEscapes; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/package.json deleted file mode 100644 index f685854b..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "lodash._htmlescapes", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `htmlEscapes` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._htmlescapes v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `htmlEscapes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._htmlescapes@2.4.1", - "dist": { - "shasum": "32d14bf0844b6de6f8b62a051b4f67c228b624cb" - }, - "_from": "lodash._htmlescapes@~2.4.1", - "_resolved": "https://registry.npmjs.org/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/package.json deleted file mode 100644 index 7fc7a4e9..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "lodash._escapehtmlchar", - "version": "2.4.1", - "description": "The internal Lo-Dash function `escapeHtmlChar` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash._htmlescapes": "~2.4.1" - }, - "readme": "# lodash._escapehtmlchar v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `escapeHtmlChar` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._escapehtmlchar@2.4.1", - "dist": { - "shasum": "df67c3bb6b7e8e1e831ab48bfa0795b92afe899d" - }, - "_from": "lodash._escapehtmlchar@~2.4.1", - "_resolved": "https://registry.npmjs.org/lodash._escapehtmlchar/-/lodash._escapehtmlchar-2.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/LICENSE.txt b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/README.md deleted file mode 100644 index c6ca90c4..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._reunescapedhtml v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `reUnescapedHtml` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/index.js deleted file mode 100644 index fa870474..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/index.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var htmlEscapes = require('lodash._htmlescapes'), - keys = require('lodash.keys'); - -/** Used to match HTML entities and HTML characters */ -var reUnescapedHtml = RegExp('[' + keys(htmlEscapes).join('') + ']', 'g'); - -module.exports = reUnescapedHtml; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/LICENSE.txt b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/README.md deleted file mode 100644 index 9957cefa..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._htmlescapes v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `htmlEscapes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/index.js deleted file mode 100644 index f69503d4..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/index.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** - * Used to convert characters to HTML entities: - * - * Though the `>` character is escaped for symmetry, characters like `>` and `/` - * don't require escaping in HTML and have no special meaning unless they're part - * of a tag or an unquoted attribute value. - * http://mathiasbynens.be/notes/ambiguous-ampersands (under "semi-related fun fact") - */ -var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' -}; - -module.exports = htmlEscapes; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/package.json deleted file mode 100644 index f685854b..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "lodash._htmlescapes", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `htmlEscapes` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._htmlescapes v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `htmlEscapes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._htmlescapes@2.4.1", - "dist": { - "shasum": "32d14bf0844b6de6f8b62a051b4f67c228b624cb" - }, - "_from": "lodash._htmlescapes@~2.4.1", - "_resolved": "https://registry.npmjs.org/lodash._htmlescapes/-/lodash._htmlescapes-2.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/package.json deleted file mode 100644 index 55cfe20b..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "lodash._reunescapedhtml", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `reUnescapedHtml` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash._htmlescapes": "~2.4.1", - "lodash.keys": "~2.4.1" - }, - "readme": "# lodash._reunescapedhtml v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `reUnescapedHtml` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._reunescapedhtml@2.4.1", - "dist": { - "shasum": "747c4fc40103eb3bb8a0976e571f7a2659e93ba7" - }, - "_from": "lodash._reunescapedhtml@~2.4.1", - "_resolved": "https://registry.npmjs.org/lodash._reunescapedhtml/-/lodash._reunescapedhtml-2.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/package.json deleted file mode 100644 index efe2e729..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "lodash.escape", - "version": "2.4.1", - "description": "The Lo-Dash function `_.escape` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash._escapehtmlchar": "~2.4.1", - "lodash.keys": "~2.4.1", - "lodash._reunescapedhtml": "~2.4.1" - }, - "readme": "# lodash.escape v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.escape`](http://lodash.com/docs#escape) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.escape@2.4.1", - "dist": { - "shasum": "2ce12c5e084db0a57dda5e5d1eeeb9f5d175a3b4" - }, - "_from": "lodash.escape@~2.4.1", - "_resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-2.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/LICENSE.txt b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/README.md deleted file mode 100644 index bee29a8d..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.keys v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.keys`](http://lodash.com/docs#keys) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/index.js deleted file mode 100644 index 139568a2..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/index.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var isNative = require('lodash._isnative'), - isObject = require('lodash.isobject'), - shimKeys = require('lodash._shimkeys'); - -/* Native method shortcuts for methods with the same name as other `lodash` methods */ -var nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys; - -/** - * Creates an array composed of the own enumerable property names of an object. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property names. - * @example - * - * _.keys({ 'one': 1, 'two': 2, 'three': 3 }); - * // => ['one', 'two', 'three'] (property order is not guaranteed across environments) - */ -var keys = !nativeKeys ? shimKeys : function(object) { - if (!isObject(object)) { - return []; - } - return nativeKeys(object); -}; - -module.exports = keys; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/README.md deleted file mode 100644 index fbcaad2f..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._isnative v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `isNative` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/index.js deleted file mode 100644 index b34a3500..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/index.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** Used for native method references */ -var objectProto = Object.prototype; - -/** Used to resolve the internal [[Class]] of values */ -var toString = objectProto.toString; - -/** Used to detect if a method is native */ -var reNative = RegExp('^' + - String(toString) - .replace(/[.*+?^${}()|[\]\\]/g, '\\$&') - .replace(/toString| for [^\]]+/g, '.*?') + '$' -); - -/** - * Checks if `value` is a native function. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if the `value` is a native function, else `false`. - */ -function isNative(value) { - return typeof value == 'function' && reNative.test(value); -} - -module.exports = isNative; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/package.json deleted file mode 100644 index aeff6347..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "lodash._isnative", - "version": "2.4.1", - "description": "The internal Lo-Dash function `isNative` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._isnative v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `isNative` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._isnative@2.4.1", - "dist": { - "shasum": "3ea6404b784a7be836c7b57580e1cdf79b14832c" - }, - "_from": "lodash._isnative@~2.4.1", - "_resolved": "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/README.md deleted file mode 100644 index 23f3000b..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._shimkeys v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `shimKeys` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js deleted file mode 100644 index 12be0bf1..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var objectTypes = require('lodash._objecttypes'); - -/** Used for native method references */ -var objectProto = Object.prototype; - -/** Native method shortcuts */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A fallback implementation of `Object.keys` which produces an array of the - * given object's own enumerable property names. - * - * @private - * @type Function - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property names. - */ -var shimKeys = function(object) { - var index, iterable = object, result = []; - if (!iterable) return result; - if (!(objectTypes[typeof object])) return result; - for (index in iterable) { - if (hasOwnProperty.call(iterable, index)) { - result.push(index); - } - } - return result -}; - -module.exports = shimKeys; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/LICENSE.txt b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/README.md deleted file mode 100644 index 16de7300..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._objecttypes v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/index.js deleted file mode 100644 index da17c6cd..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** Used to determine if values are of the language type Object */ -var objectTypes = { - 'boolean': false, - 'function': true, - 'object': true, - 'number': false, - 'string': false, - 'undefined': false -}; - -module.exports = objectTypes; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/package.json deleted file mode 100644 index 4ee6604f..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "lodash._objecttypes", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `objectTypes` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._objecttypes v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._objecttypes@2.4.1", - "dist": { - "shasum": "7c0b7f69d98a1f76529f890b0cdb1b4dfec11c11" - }, - "_from": "lodash._objecttypes@~2.4.1", - "_resolved": "https://registry.npmjs.org/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz", - "scripts": {} -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json deleted file mode 100644 index 5684f2cc..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "lodash._shimkeys", - "version": "2.4.1", - "description": "The internal Lo-Dash function `shimKeys` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash._objecttypes": "~2.4.1" - }, - "readme": "# lodash._shimkeys v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `shimKeys` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._shimkeys@2.4.1", - "dist": { - "shasum": "6e9cc9666ff081f0b5a6c978b83e242e6949d203" - }, - "_from": "lodash._shimkeys@~2.4.1", - "_resolved": "https://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/LICENSE.txt b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/README.md deleted file mode 100644 index eeb0a78b..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.isobject v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.isObject`](http://lodash.com/docs#isObject) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/index.js deleted file mode 100644 index 3596ac34..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/index.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var objectTypes = require('lodash._objecttypes'); - -/** - * Checks if `value` is the language type of Object. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Objects - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if the `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // check if the value is the ECMAScript language type of Object - // http://es5.github.io/#x8 - // and avoid a V8 bug - // http://code.google.com/p/v8/issues/detail?id=2291 - return !!(value && objectTypes[typeof value]); -} - -module.exports = isObject; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/LICENSE.txt b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/README.md deleted file mode 100644 index 16de7300..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._objecttypes v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/index.js deleted file mode 100644 index da17c6cd..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** Used to determine if values are of the language type Object */ -var objectTypes = { - 'boolean': false, - 'function': true, - 'object': true, - 'number': false, - 'string': false, - 'undefined': false -}; - -module.exports = objectTypes; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/package.json deleted file mode 100644 index 4ee6604f..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "lodash._objecttypes", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `objectTypes` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._objecttypes v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._objecttypes@2.4.1", - "dist": { - "shasum": "7c0b7f69d98a1f76529f890b0cdb1b4dfec11c11" - }, - "_from": "lodash._objecttypes@~2.4.1", - "_resolved": "https://registry.npmjs.org/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz", - "scripts": {} -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/package.json deleted file mode 100644 index 8def4942..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "lodash.isobject", - "version": "2.4.1", - "description": "The Lo-Dash function `_.isObject` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash._objecttypes": "~2.4.1" - }, - "readme": "# lodash.isobject v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.isObject`](http://lodash.com/docs#isObject) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.isobject@2.4.1", - "dist": { - "shasum": "5a2e47fe69953f1ee631a7eba1fe64d2d06558f5" - }, - "_from": "lodash.isobject@~2.4.1", - "_resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-2.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/package.json deleted file mode 100644 index 21aac6a2..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "lodash.keys", - "version": "2.4.1", - "description": "The Lo-Dash function `_.keys` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash._isnative": "~2.4.1", - "lodash.isobject": "~2.4.1", - "lodash._shimkeys": "~2.4.1" - }, - "readme": "# lodash.keys v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.keys`](http://lodash.com/docs#keys) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.keys@2.4.1", - "dist": { - "shasum": "48dea46df8ff7632b10d706b8acb26591e2b3727" - }, - "_from": "lodash.keys@~2.4.1", - "_resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/LICENSE.txt b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/README.md deleted file mode 100644 index d9ce72bc..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.templatesettings v2.4.1 - -The [Lo-Dash](http://lodash.com/) object [`_.templateSettings`](http://lodash.com/docs#templateSettings) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/index.js deleted file mode 100644 index bba7e231..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/index.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var escape = require('lodash.escape'), - reInterpolate = require('lodash._reinterpolate'); - -/** - * By default, the template delimiters used by Lo-Dash are similar to those in - * embedded Ruby (ERB). Change the following template settings to use alternative - * delimiters. - * - * @static - * @memberOf _ - * @type Object - */ -var templateSettings = { - - /** - * Used to detect `data` property values to be HTML-escaped. - * - * @memberOf _.templateSettings - * @type RegExp - */ - 'escape': /<%-([\s\S]+?)%>/g, - - /** - * Used to detect code to be evaluated. - * - * @memberOf _.templateSettings - * @type RegExp - */ - 'evaluate': /<%([\s\S]+?)%>/g, - - /** - * Used to detect `data` property values to inject. - * - * @memberOf _.templateSettings - * @type RegExp - */ - 'interpolate': reInterpolate, - - /** - * Used to reference the data object in the template text. - * - * @memberOf _.templateSettings - * @type string - */ - 'variable': '', - - /** - * Used to import variables into the compiled template. - * - * @memberOf _.templateSettings - * @type Object - */ - 'imports': { - - /** - * A reference to the `lodash` function. - * - * @memberOf _.templateSettings.imports - * @type Function - */ - '_': { 'escape': escape } - } -}; - -module.exports = templateSettings; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json deleted file mode 100644 index 4df2c9fa..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "lodash.templatesettings", - "version": "2.4.1", - "description": "The Lo-Dash object `_.templateSettings` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash.escape": "~2.4.1", - "lodash._reinterpolate": "~2.4.1" - }, - "readme": "# lodash.templatesettings v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) object [`_.templateSettings`](http://lodash.com/docs#templateSettings) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.templatesettings@2.4.1", - "dist": { - "shasum": "ea76c75d11eb86d4dbe89a83893bb861929ac699" - }, - "_from": "lodash.templatesettings@~2.4.1", - "_resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-2.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/LICENSE.txt b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/README.md deleted file mode 100644 index 33f028da..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.values v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.values`](http://lodash.com/docs#values) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/index.js deleted file mode 100644 index ccf622fa..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/index.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var keys = require('lodash.keys'); - -/** - * Creates an array composed of the own enumerable property values of `object`. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property values. - * @example - * - * _.values({ 'one': 1, 'two': 2, 'three': 3 }); - * // => [1, 2, 3] (property order is not guaranteed across environments) - */ -function values(object) { - var index = -1, - props = keys(object), - length = props.length, - result = Array(length); - - while (++index < length) { - result[index] = object[props[index]]; - } - return result; -} - -module.exports = values; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/package.json deleted file mode 100644 index 82ec70fd..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "lodash.values", - "version": "2.4.1", - "description": "The Lo-Dash function `_.values` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash.keys": "~2.4.1" - }, - "readme": "# lodash.values v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.values`](http://lodash.com/docs#values) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.values@2.4.1", - "dist": { - "shasum": "abf514436b3cb705001627978cbcf30b1280eea4" - }, - "_from": "lodash.values@~2.4.1", - "_resolved": "https://registry.npmjs.org/lodash.values/-/lodash.values-2.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/package.json deleted file mode 100644 index 6133269f..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/lodash.template/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "lodash.template", - "version": "2.4.1", - "description": "The Lo-Dash function `_.template` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash.defaults": "~2.4.1", - "lodash.escape": "~2.4.1", - "lodash._escapestringchar": "~2.4.1", - "lodash.keys": "~2.4.1", - "lodash._reinterpolate": "~2.4.1", - "lodash.templatesettings": "~2.4.1", - "lodash.values": "~2.4.1" - }, - "readme": "# lodash.template v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.template`](http://lodash.com/docs#template) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.template@2.4.1", - "dist": { - "shasum": "9e611007edf629129a974ab3c48b817b3e1cf20d" - }, - "_from": "lodash.template@~2.4.1", - "_resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-2.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/.travis.yml b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/.travis.yml deleted file mode 100644 index cc4dba29..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/LICENSE b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/example/parse.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/example/parse.js deleted file mode 100644 index abff3e8e..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/example/parse.js +++ /dev/null @@ -1,2 +0,0 @@ -var argv = require('../')(process.argv.slice(2)); -console.dir(argv); diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/index.js deleted file mode 100644 index 2aa95140..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/index.js +++ /dev/null @@ -1,187 +0,0 @@ -module.exports = function (args, opts) { - if (!opts) opts = {}; - - var flags = { bools : {}, strings : {} }; - - [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - - [].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - }); - - var aliases = {}; - Object.keys(opts.alias || {}).forEach(function (key) { - aliases[key] = [].concat(opts.alias[key]); - aliases[key].forEach(function (x) { - aliases[x] = [key].concat(aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - - var defaults = opts['default'] || {}; - - var argv = { _ : [] }; - Object.keys(flags.bools).forEach(function (key) { - setArg(key, defaults[key] === undefined ? false : defaults[key]); - }); - - var notFlags = []; - - if (args.indexOf('--') !== -1) { - notFlags = args.slice(args.indexOf('--')+1); - args = args.slice(0, args.indexOf('--')); - } - - function setArg (key, val) { - var value = !flags.strings[key] && isNumber(val) - ? Number(val) : val - ; - setKey(argv, key.split('.'), value); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), value); - }); - } - - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - - if (/^--.+=/.test(arg)) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - setArg(m[1], m[2]); - } - else if (/^--no-.+/.test(arg)) { - var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false); - } - else if (/^--.+/.test(arg)) { - var key = arg.match(/^--(.+)/)[1]; - var next = args[i + 1]; - if (next !== undefined && !/^-/.test(next) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true'); - i++; - } - else { - setArg(key, true); - } - } - else if (/^-[^-]+/.test(arg)) { - var letters = arg.slice(1,-1).split(''); - - var broken = false; - for (var j = 0; j < letters.length; j++) { - var next = arg.slice(j+2); - - if (next === '-') { - setArg(letters[j], next) - continue; - } - - if (/[A-Za-z]/.test(letters[j]) - && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next); - broken = true; - break; - } - - if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2)); - broken = true; - break; - } - else { - setArg(letters[j], true); - } - } - - var key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, args[i+1]); - i++; - } - else if (args[i+1] && /true|false/.test(args[i+1])) { - setArg(key, args[i+1] === 'true'); - i++; - } - else { - setArg(key, true); - } - } - } - else { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ); - } - } - - Object.keys(defaults).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) { - setKey(argv, key.split('.'), defaults[key]); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), defaults[key]); - }); - } - }); - - notFlags.forEach(function(key) { - argv._.push(key); - }); - - return argv; -}; - -function hasKey (obj, keys) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - o = (o[key] || {}); - }); - - var key = keys[keys.length - 1]; - return key in o; -} - -function setKey (obj, keys, value) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - if (o[key] === undefined) o[key] = {}; - o = o[key]; - }); - - var key = keys[keys.length - 1]; - if (o[key] === undefined || typeof o[key] === 'boolean') { - o[key] = value; - } - else if (Array.isArray(o[key])) { - o[key].push(value); - } - else { - o[key] = [ o[key], value ]; - } -} - -function isNumber (x) { - if (typeof x === 'number') return true; - if (/^0x[0-9a-f]+$/i.test(x)) return true; - return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); -} - -function longest (xs) { - return Math.max.apply(null, xs.map(function (x) { return x.length })); -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/package.json deleted file mode 100644 index d0d35f82..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "minimist", - "version": "0.0.7", - "description": "parse argument options", - "main": "index.js", - "devDependencies": { - "tape": "~1.0.4", - "tap": "~0.4.0" - }, - "scripts": { - "test": "tap test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "ff/5", - "firefox/latest", - "chrome/10", - "chrome/latest", - "safari/5.1", - "safari/latest", - "opera/12" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/minimist.git" - }, - "homepage": "https://github.com/substack/minimist", - "keywords": [ - "argv", - "getopt", - "parser", - "optimist" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "readme": "# minimist\n\nparse argument options\n\nThis module is the guts of optimist's argument parser without all the\nfanciful decoration.\n\n[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist)\n\n[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist)\n\n# example\n\n``` js\nvar argv = require('minimist')(process.argv.slice(2));\nconsole.dir(argv);\n```\n\n```\n$ node example/parse.js -a beep -b boop\n{ _: [], a: 'beep', b: 'boop' }\n```\n\n```\n$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz\n{ _: [ 'foo', 'bar', 'baz' ],\n x: 3,\n y: 4,\n n: 5,\n a: true,\n b: true,\n c: true,\n beep: 'boop' }\n```\n\n# methods\n\n``` js\nvar parseArgs = require('minimist')\n```\n\n## var argv = parseArgs(args, opts={})\n\nReturn an argument object `argv` populated with the array arguments from `args`.\n\n`argv._` contains all the arguments that didn't have an option associated with\nthem.\n\nNumeric-looking arguments will be returned as numbers unless `opts.string` or\n`opts.boolean` is set for that argument name.\n\nAny arguments after `'--'` will not be parsed and will end up in `argv._`.\n\noptions can be:\n\n* `opts.string` - a string or array of strings argument names to always treat as\nstrings\n* `opts.boolean` - a string or array of strings to always treat as booleans\n* `opts.alias` - an object mapping string names to strings or arrays of string\nargument names to use as aliases\n* `opts.default` - an object mapping string argument names to default values\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install minimist\n```\n\n# license\n\nMIT\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/substack/minimist/issues" - }, - "_id": "minimist@0.0.7", - "dist": { - "shasum": "5e1aa4da48e55dcfd52b66fdacd054d19dd64fce" - }, - "_from": "minimist@~0.0.5", - "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.7.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/readme.markdown b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/readme.markdown deleted file mode 100644 index c2563532..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/readme.markdown +++ /dev/null @@ -1,73 +0,0 @@ -# minimist - -parse argument options - -This module is the guts of optimist's argument parser without all the -fanciful decoration. - -[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist) - -[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist) - -# example - -``` js -var argv = require('minimist')(process.argv.slice(2)); -console.dir(argv); -``` - -``` -$ node example/parse.js -a beep -b boop -{ _: [], a: 'beep', b: 'boop' } -``` - -``` -$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz -{ _: [ 'foo', 'bar', 'baz' ], - x: 3, - y: 4, - n: 5, - a: true, - b: true, - c: true, - beep: 'boop' } -``` - -# methods - -``` js -var parseArgs = require('minimist') -``` - -## var argv = parseArgs(args, opts={}) - -Return an argument object `argv` populated with the array arguments from `args`. - -`argv._` contains all the arguments that didn't have an option associated with -them. - -Numeric-looking arguments will be returned as numbers unless `opts.string` or -`opts.boolean` is set for that argument name. - -Any arguments after `'--'` will not be parsed and will end up in `argv._`. - -options can be: - -* `opts.string` - a string or array of strings argument names to always treat as -strings -* `opts.boolean` - a string or array of strings to always treat as booleans -* `opts.alias` - an object mapping string names to strings or arrays of string -argument names to use as aliases -* `opts.default` - an object mapping string argument names to default values - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install minimist -``` - -# license - -MIT diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/test/dash.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/test/dash.js deleted file mode 100644 index 8b034b99..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/test/dash.js +++ /dev/null @@ -1,24 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('-', function (t) { - t.plan(5); - t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); - t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); - t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); - t.deepEqual( - parse([ '-b', '-' ], { boolean: 'b' }), - { b: true, _: [ '-' ] } - ); - t.deepEqual( - parse([ '-s', '-' ], { string: 's' }), - { s: '-', _: [] } - ); -}); - -test('-a -- b', function (t) { - t.plan(3); - t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/test/default_bool.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/test/default_bool.js deleted file mode 100644 index f0041ee4..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/test/default_bool.js +++ /dev/null @@ -1,20 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('boolean default true', function (t) { - var argv = parse([], { - boolean: 'sometrue', - default: { sometrue: true } - }); - t.equal(argv.sometrue, true); - t.end(); -}); - -test('boolean default false', function (t) { - var argv = parse([], { - boolean: 'somefalse', - default: { somefalse: false } - }); - t.equal(argv.somefalse, false); - t.end(); -}); diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/test/dotted.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/test/dotted.js deleted file mode 100644 index ef0ae349..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/test/dotted.js +++ /dev/null @@ -1,16 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('dotted alias', function (t) { - var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 22); - t.equal(argv.aa.bb, 22); - t.end(); -}); - -test('dotted default', function (t) { - var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 11); - t.equal(argv.aa.bb, 11); - t.end(); -}); diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/test/long.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/test/long.js deleted file mode 100644 index 5d3a1e09..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/test/long.js +++ /dev/null @@ -1,31 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('long opts', function (t) { - t.deepEqual( - parse([ '--bool' ]), - { bool : true, _ : [] }, - 'long boolean' - ); - t.deepEqual( - parse([ '--pow', 'xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture sp' - ); - t.deepEqual( - parse([ '--pow=xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture eq' - ); - t.deepEqual( - parse([ '--host', 'localhost', '--port', '555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures sp' - ); - t.deepEqual( - parse([ '--host=localhost', '--port=555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures eq' - ); - t.end(); -}); diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/test/parse.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/test/parse.js deleted file mode 100644 index 7c4348a4..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/test/parse.js +++ /dev/null @@ -1,297 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse args', function (t) { - t.deepEqual( - parse([ '--no-moo' ]), - { moo : false, _ : [] }, - 'no' - ); - t.deepEqual( - parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), - { v : ['a','b','c'], _ : [] }, - 'multi' - ); - t.end(); -}); - -test('comprehensive', function (t) { - t.deepEqual( - parse([ - '--name=meowmers', 'bare', '-cats', 'woo', - '-h', 'awesome', '--multi=quux', - '--key', 'value', - '-b', '--bool', '--no-meep', '--multi=baz', - '--', '--not-a-flag', 'eek' - ]), - { - c : true, - a : true, - t : true, - s : 'woo', - h : 'awesome', - b : true, - bool : true, - key : 'value', - multi : [ 'quux', 'baz' ], - meep : false, - name : 'meowmers', - _ : [ 'bare', '--not-a-flag', 'eek' ] - } - ); - t.end(); -}); - -test('nums', function (t) { - var argv = parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789' - ]); - t.deepEqual(argv, { - x : 1234, - y : 5.67, - z : 1e7, - w : '10f', - hex : 0xdeadbeef, - _ : [ 789 ] - }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv.y, 'number'); - t.deepEqual(typeof argv.z, 'number'); - t.deepEqual(typeof argv.w, 'string'); - t.deepEqual(typeof argv.hex, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); - -test('flag boolean', function (t) { - var argv = parse([ '-t', 'moo' ], { boolean: 't' }); - t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean value', function (t) { - var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { - boolean: [ 't', 'verbose' ], - default: { verbose: true } - }); - - t.deepEqual(argv, { - verbose: false, - t: true, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean default false', function (t) { - var argv = parse(['moo'], { - boolean: ['t', 'verbose'], - default: { verbose: false, t: false } - }); - - t.deepEqual(argv, { - verbose: false, - t: false, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); - -}); - -test('boolean groups', function (t) { - var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { - boolean: ['x','y','z'] - }); - - t.deepEqual(argv, { - x : true, - y : false, - z : true, - _ : [ 'one', 'two', 'three' ] - }); - - t.deepEqual(typeof argv.x, 'boolean'); - t.deepEqual(typeof argv.y, 'boolean'); - t.deepEqual(typeof argv.z, 'boolean'); - t.end(); -}); - -test('newlines in params' , function (t) { - var args = parse([ '-s', "X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - - // reproduce in bash: - // VALUE="new - // line" - // node program.js --s="$VALUE" - args = parse([ "--s=X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - t.end(); -}); - -test('strings' , function (t) { - var s = parse([ '-s', '0001234' ], { string: 's' }).s; - t.equal(s, '0001234'); - t.equal(typeof s, 'string'); - - var x = parse([ '-x', '56' ], { string: 'x' }).x; - t.equal(x, '56'); - t.equal(typeof x, 'string'); - t.end(); -}); - -test('stringArgs', function (t) { - var s = parse([ ' ', ' ' ], { string: '_' })._; - t.same(s.length, 2); - t.same(typeof s[0], 'string'); - t.same(s[0], ' '); - t.same(typeof s[1], 'string'); - t.same(s[1], ' '); - t.end(); -}); - -test('slashBreak', function (t) { - t.same( - parse([ '-I/foo/bar/baz' ]), - { I : '/foo/bar/baz', _ : [] } - ); - t.same( - parse([ '-xyz/foo/bar/baz' ]), - { x : true, y : true, z : '/foo/bar/baz', _ : [] } - ); - t.end(); -}); - -test('alias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: 'zoom' } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.f, 11); - t.end(); -}); - -test('multiAlias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: [ 'zm', 'zoom' ] } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.z, argv.zm); - t.equal(argv.f, 11); - t.end(); -}); - -test('nested dotted objects', function (t) { - var argv = parse([ - '--foo.bar', '3', '--foo.baz', '4', - '--foo.quux.quibble', '5', '--foo.quux.o_O', - '--beep.boop' - ]); - - t.same(argv.foo, { - bar : 3, - baz : 4, - quux : { - quibble : 5, - o_O : true - } - }); - t.same(argv.beep, { boop : true }); - t.end(); -}); - -test('boolean and alias with chainable api', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = parse(aliased, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var propertyArgv = parse(regular, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - alias: { 'h': 'herp' }, - boolean: 'herp' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias using explicit true', function (t) { - var aliased = [ '-h', 'true' ]; - var regular = [ '--herp', 'true' ]; - var opts = { - alias: { h: 'herp' }, - boolean: 'h' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -// regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function(t) { - var parsed = parse(['--boool', '--other=true'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); - - parsed = parse(['--boool', '--other=false'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); -}); diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/test/parse_modified.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/test/parse_modified.js deleted file mode 100644 index 21851b03..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/test/parse_modified.js +++ /dev/null @@ -1,9 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse with modifier functions' , function (t) { - t.plan(1); - - var argv = parse([ '-b', '123' ], { boolean: 'b' }); - t.deepEqual(argv, { b: true, _: ['123'] }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/test/short.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/test/short.js deleted file mode 100644 index d513a1c2..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/test/short.js +++ /dev/null @@ -1,67 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('numeric short args', function (t) { - t.plan(2); - t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); - t.deepEqual( - parse([ '-123', '456' ]), - { 1: true, 2: true, 3: 456, _: [] } - ); -}); - -test('short', function (t) { - t.deepEqual( - parse([ '-b' ]), - { b : true, _ : [] }, - 'short boolean' - ); - t.deepEqual( - parse([ 'foo', 'bar', 'baz' ]), - { _ : [ 'foo', 'bar', 'baz' ] }, - 'bare' - ); - t.deepEqual( - parse([ '-cats' ]), - { c : true, a : true, t : true, s : true, _ : [] }, - 'group' - ); - t.deepEqual( - parse([ '-cats', 'meow' ]), - { c : true, a : true, t : true, s : 'meow', _ : [] }, - 'short group next' - ); - t.deepEqual( - parse([ '-h', 'localhost' ]), - { h : 'localhost', _ : [] }, - 'short capture' - ); - t.deepEqual( - parse([ '-h', 'localhost', '-p', '555' ]), - { h : 'localhost', p : 555, _ : [] }, - 'short captures' - ); - t.end(); -}); - -test('mixed short bool and capture', function (t) { - t.same( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); - -test('short and long', function (t) { - t.deepEqual( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/test/whitespace.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/test/whitespace.js deleted file mode 100644 index 8a52a58c..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/minimist/test/whitespace.js +++ /dev/null @@ -1,8 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('whitespace should be whitespace' , function (t) { - t.plan(1); - var x = parse([ '-x', '\t' ]).x; - t.equal(x, '\t'); -}); diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/.npmignore b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/.travis.yml b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/.travis.yml deleted file mode 100644 index 6e5919de..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "0.10" diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/History.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/History.md deleted file mode 100644 index 4174056f..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/History.md +++ /dev/null @@ -1,10 +0,0 @@ - -0.0.1 / 2013-01-15 -================== - -* fix error bubbling - -0.0.0 / 2013-01-13 -================== - -* initial release diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/Makefile b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/Makefile deleted file mode 100644 index d1df0ab3..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/Makefile +++ /dev/null @@ -1,10 +0,0 @@ - -node_modules: package.json - @npm install - -test: - @./node_modules/.bin/mocha \ - --reporter spec \ - --timeout 100 - -.PHONY: test \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/Readme.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/Readme.md deleted file mode 100644 index e8f432ec..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/Readme.md +++ /dev/null @@ -1,74 +0,0 @@ -# multipipe - -A better `Stream#pipe` that creates duplex streams and lets you handle errors in one place. - -[![build status](https://secure.travis-ci.org/segmentio/multipipe.png)](http://travis-ci.org/segmentio/multipipe) - -## Example - -```js -var pipe = require('multipipe'); - -// pipe streams -var stream = pipe(streamA, streamB, streamC); - -// centralized error handling -stream.on('error', fn); - -// creates a new stream -source.pipe(stream).pipe(dest); -``` - -## Duplex streams - - Write to the pipe and you'll really write to the first stream, read from the pipe and you'll read from the last stream. - -```js -var stream = pipe(a, b, c); - -source - .pipe(stream) - .pipe(destination); -``` - - In this example the flow of data is: - - * source -> - * a -> - * b -> - * c -> - * destination - -## Error handling - - Each `pipe` forwards the errors the streams it wraps emit, so you have one central place to handle errors: - -```js -var stream = pipe(a, b, c); - -stream.on('error', function(err){ - // called three times -}); - -a.emit('error', new Error); -b.emit('error', new Error); -c.emit('error', new Error); -``` - -## API - -### pipe(stream, ...) - -Pass a variable number of streams and each will be piped to the next one. - -A stream will be returned that wraps passed in streams in a way that errors will be forwarded and you can write to and/or read from it. - -## Installation - -```bash -$ npm install multipipe -``` - -## License - - MIT diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/index.js deleted file mode 100644 index 5292417c..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/index.js +++ /dev/null @@ -1,57 +0,0 @@ - -/** - * Module dependencies. - */ - -var duplexer = require('duplexer2'); -var Stream = require('stream'); - -/** - * Slice reference. - */ - -var slice = [].slice; - -/** - * Duplexer options. - */ - -var opts = { - bubbleErrors: false -}; - -/** - * Expose `pipe`. - */ - -module.exports = pipe; - -/** - * Pipe. - * - * @param {Stream,...} - * @return {Stream} - * @api public - */ - -function pipe(){ - if (arguments.length == 1) return arguments[0]; - var streams = slice.call(arguments); - var first = streams[0]; - var last = streams[streams.length - 1]; - var ret; - - if (first.writable && last.readable) ret = duplexer(opts, first, last); - else if (first.writable) ret = first; - else if (last.readable) ret = last; - else ret = new Stream; - - streams.forEach(function(stream, i){ - var next = streams[i+1]; - if (next) stream.pipe(next); - stream.on('error', ret.emit.bind(ret, 'error')); - }); - - return ret; -} - diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/.npmignore b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/.npmignore deleted file mode 100644 index 07e6e472..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/.npmignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/.travis.yml b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/.travis.yml deleted file mode 100644 index 6e5919de..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "0.10" diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/LICENSE.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/LICENSE.md deleted file mode 100644 index 547189a6..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/LICENSE.md +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2013, Deoxxa Development -====================================== -All rights reserved. --------------------- - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of Deoxxa Development nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY DEOXXA DEVELOPMENT ''AS IS'' AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL DEOXXA DEVELOPMENT BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/README.md deleted file mode 100644 index e39e1e9e..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/README.md +++ /dev/null @@ -1,129 +0,0 @@ -duplexer2 [![build status](https://travis-ci.org/deoxxa/duplexer2.png)](https://travis-ci.org/deoxxa/fork) -========= - -Like duplexer (http://npm.im/duplexer) but using streams2. - -Overview --------- - -duplexer2 is a reimplementation of [duplexer](http://npm.im/duplexer) using the -readable-stream API which is standard in node as of v0.10. Everything largely -works the same. - -Installation ------------- - -Available via [npm](http://npmjs.org/): - -> $ npm install duplexer2 - -Or via git: - -> $ git clone git://github.com/deoxxa/duplexer2.git node_modules/duplexer2 - -API ---- - -**duplexer2** - -Creates a new `DuplexWrapper` object, which is the actual class that implements -most of the fun stuff. All that fun stuff is hidden. DON'T LOOK. - -```javascript -duplexer2([options], writable, readable) -``` - -```javascript -var duplex = duplexer2(new stream.Writable(), new stream.Readable()); -``` - -Arguments - -* __options__ - an object specifying the regular `stream.Duplex` options, as - well as the properties described below. -* __writable__ - a writable stream -* __readable__ - a readable stream - -Options - -* __bubbleErrors__ - a boolean value that specifies whether to bubble errors - from the underlying readable/writable streams. Default is `true`. - -Example -------- - -Also see [example.js](https://github.com/deoxxa/duplexer2/blob/master/example.js). - -Code: - -```javascript -var stream = require("stream"); - -var duplexer2 = require("duplexer2"); - -var writable = new stream.Writable({objectMode: true}), - readable = new stream.Readable({objectMode: true}); - -writable._write = function _write(input, encoding, done) { - if (readable.push(input)) { - return done(); - } else { - readable.once("drain", done); - } -}; - -readable._read = function _read(n) { - // no-op -}; - -// simulate the readable thing closing after a bit -writable.once("finish", function() { - setTimeout(function() { - readable.push(null); - }, 500); -}); - -var duplex = duplexer2(writable, readable); - -duplex.on("data", function(e) { - console.log("got data", JSON.stringify(e)); -}); - -duplex.on("finish", function() { - console.log("got finish event"); -}); - -duplex.on("end", function() { - console.log("got end event"); -}); - -duplex.write("oh, hi there", function() { - console.log("finished writing"); -}); - -duplex.end(function() { - console.log("finished ending"); -}); -``` - -Output: - -``` -got data "oh, hi there" -finished writing -got finish event -finished ending -got end event -``` - -License -------- - -3-clause BSD. A copy is included with the source. - -Contact -------- - -* GitHub ([deoxxa](http://github.com/deoxxa)) -* Twitter ([@deoxxa](http://twitter.com/deoxxa)) -* Email ([deoxxa@fknsrs.biz](mailto:deoxxa@fknsrs.biz)) diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/example.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/example.js deleted file mode 100755 index ad537a04..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/example.js +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env node - -var stream = require("stream"); - -var duplexer2 = require("./"); - -var writable = new stream.Writable({objectMode: true}), - readable = new stream.Readable({objectMode: true}); - -writable._write = function _write(input, encoding, done) { - if (readable.push(input)) { - return done(); - } else { - readable.once("drain", done); - } -}; - -readable._read = function _read(n) { - // no-op -}; - -// simulate the readable thing closing after a bit -writable.once("finish", function() { - setTimeout(function() { - readable.push(null); - }, 500); -}); - -var duplex = duplexer2(writable, readable); - -duplex.on("data", function(e) { - console.log("got data", JSON.stringify(e)); -}); - -duplex.on("finish", function() { - console.log("got finish event"); -}); - -duplex.on("end", function() { - console.log("got end event"); -}); - -duplex.write("oh, hi there", function() { - console.log("finished writing"); -}); - -duplex.end(function() { - console.log("finished ending"); -}); diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/index.js deleted file mode 100644 index 90b261b4..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/index.js +++ /dev/null @@ -1,62 +0,0 @@ -var stream = require("stream"); - -var duplex2 = module.exports = function duplex2(options, writable, readable) { - return new DuplexWrapper(options, writable, readable); -}; - -var DuplexWrapper = exports.DuplexWrapper = function DuplexWrapper(options, writable, readable) { - if (typeof readable === "undefined") { - readable = writable; - writable = options; - options = null; - } - - options = options || {}; - options.objectMode = true; - - stream.Duplex.call(this, options); - - this._bubbleErrors = (typeof options.bubbleErrors === "undefined") || !!options.bubbleErrors; - - this._writable = writable; - this._readable = readable; - - var self = this; - - writable.once("finish", function() { - self.end(); - }); - - this.once("finish", function() { - writable.end(); - }); - - readable.on("data", function(e) { - if (!self.push(e)) { - readable.pause(); - } - }); - - readable.once("end", function() { - return self.push(null); - }); - - if (this._bubbleErrors) { - writable.on("error", function(err) { - return self.emit("error", err); - }); - - readable.on("error", function(err) { - return self.emit("error", err); - }); - } -}; -DuplexWrapper.prototype = Object.create(stream.Duplex.prototype, {constructor: {value: DuplexWrapper}}); - -DuplexWrapper.prototype._write = function _write(input, encoding, done) { - this._writable.write(input, encoding, done); -}; - -DuplexWrapper.prototype._read = function _read(n) { - this._readable.resume(); -}; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/package.json deleted file mode 100644 index 2c190c20..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "duplexer2", - "version": "0.0.1", - "description": "Like duplexer (http://npm.im/duplexer) but using streams2", - "main": "index.js", - "scripts": { - "test": "mocha -R tap" - }, - "repository": { - "type": "git", - "url": "git://github.com/deoxxa/duplexer2.git" - }, - "keywords": [ - "duplex", - "stream", - "join", - "combine" - ], - "author": { - "name": "Conrad Pankoff", - "email": "deoxxa@fknsrs.biz", - "url": "http://www.fknsrs.biz/" - }, - "license": "BSD", - "bugs": { - "url": "https://github.com/deoxxa/duplexer2/issues" - }, - "devDependencies": { - "chai": "~1.7.2", - "mocha": "~1.12.1" - }, - "readme": "duplexer2 [![build status](https://travis-ci.org/deoxxa/duplexer2.png)](https://travis-ci.org/deoxxa/fork)\n=========\n\nLike duplexer (http://npm.im/duplexer) but using streams2.\n\nOverview\n--------\n\nduplexer2 is a reimplementation of [duplexer](http://npm.im/duplexer) using the\nreadable-stream API which is standard in node as of v0.10. Everything largely\nworks the same.\n\nInstallation\n------------\n\nAvailable via [npm](http://npmjs.org/):\n\n> $ npm install duplexer2\n\nOr via git:\n\n> $ git clone git://github.com/deoxxa/duplexer2.git node_modules/duplexer2\n\nAPI\n---\n\n**duplexer2**\n\nCreates a new `DuplexWrapper` object, which is the actual class that implements\nmost of the fun stuff. All that fun stuff is hidden. DON'T LOOK.\n\n```javascript\nduplexer2([options], writable, readable)\n```\n\n```javascript\nvar duplex = duplexer2(new stream.Writable(), new stream.Readable());\n```\n\nArguments\n\n* __options__ - an object specifying the regular `stream.Duplex` options, as\n well as the properties described below.\n* __writable__ - a writable stream\n* __readable__ - a readable stream\n\nOptions\n\n* __bubbleErrors__ - a boolean value that specifies whether to bubble errors\n from the underlying readable/writable streams. Default is `true`.\n\nExample\n-------\n\nAlso see [example.js](https://github.com/deoxxa/duplexer2/blob/master/example.js).\n\nCode:\n\n```javascript\nvar stream = require(\"stream\");\n\nvar duplexer2 = require(\"duplexer2\");\n\nvar writable = new stream.Writable({objectMode: true}),\n readable = new stream.Readable({objectMode: true});\n\nwritable._write = function _write(input, encoding, done) {\n if (readable.push(input)) {\n return done();\n } else {\n readable.once(\"drain\", done);\n }\n};\n\nreadable._read = function _read(n) {\n // no-op\n};\n\n// simulate the readable thing closing after a bit\nwritable.once(\"finish\", function() {\n setTimeout(function() {\n readable.push(null);\n }, 500);\n});\n\nvar duplex = duplexer2(writable, readable);\n\nduplex.on(\"data\", function(e) {\n console.log(\"got data\", JSON.stringify(e));\n});\n\nduplex.on(\"finish\", function() {\n console.log(\"got finish event\");\n});\n\nduplex.on(\"end\", function() {\n console.log(\"got end event\");\n});\n\nduplex.write(\"oh, hi there\", function() {\n console.log(\"finished writing\");\n});\n\nduplex.end(function() {\n console.log(\"finished ending\");\n});\n```\n\nOutput:\n\n```\ngot data \"oh, hi there\"\nfinished writing\ngot finish event\nfinished ending\ngot end event\n```\n\nLicense\n-------\n\n3-clause BSD. A copy is included with the source.\n\nContact\n-------\n\n* GitHub ([deoxxa](http://github.com/deoxxa))\n* Twitter ([@deoxxa](http://twitter.com/deoxxa))\n* Email ([deoxxa@fknsrs.biz](mailto:deoxxa@fknsrs.biz))\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/deoxxa/duplexer2", - "_id": "duplexer2@0.0.1", - "dist": { - "shasum": "f8a276687b0b122a466e2bbc8f6a22043cb15d26" - }, - "_from": "duplexer2@0.0.1", - "_resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/test/tests.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/test/tests.js deleted file mode 100644 index fe3b2560..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/test/tests.js +++ /dev/null @@ -1,161 +0,0 @@ -var assert = require("chai").assert; - -var stream = require("stream"); - -var duplexer2 = require("../"); - -describe("duplexer2", function() { - var writable, readable; - - beforeEach(function() { - writable = new stream.Writable({objectMode: true}); - readable = new stream.Readable({objectMode: true}); - - writable._write = function _write(input, encoding, done) { - return done(); - }; - - readable._read = function _read(n) { - }; - }); - - it("should interact with the writable stream properly for writing", function(done) { - var duplex = duplexer2(writable, readable); - - writable._write = function _write(input, encoding, _done) { - assert.strictEqual(input, "well hello there"); - - return done(); - }; - - duplex.write("well hello there"); - }); - - it("should interact with the readable stream properly for reading", function(done) { - var duplex = duplexer2(writable, readable); - - duplex.on("data", function(e) { - assert.strictEqual(e, "well hello there"); - - return done(); - }); - - readable.push("well hello there"); - }); - - it("should end the writable stream, causing it to finish", function(done) { - var duplex = duplexer2(writable, readable); - - writable.once("finish", done); - - duplex.end(); - }); - - it("should finish when the writable stream finishes", function(done) { - var duplex = duplexer2(writable, readable); - - duplex.once("finish", done); - - writable.end(); - }); - - it("should end when the readable stream ends", function(done) { - var duplex = duplexer2(writable, readable); - - // required to let "end" fire without reading - duplex.resume(); - duplex.once("end", done); - - readable.push(null); - }); - - it("should bubble errors from the writable stream when no behaviour is specified", function(done) { - var duplex = duplexer2(writable, readable); - - var originalErr = Error("testing"); - - duplex.on("error", function(err) { - assert.strictEqual(err, originalErr); - - return done(); - }); - - writable.emit("error", originalErr); - }); - - it("should bubble errors from the readable stream when no behaviour is specified", function(done) { - var duplex = duplexer2(writable, readable); - - var originalErr = Error("testing"); - - duplex.on("error", function(err) { - assert.strictEqual(err, originalErr); - - return done(); - }); - - readable.emit("error", originalErr); - }); - - it("should bubble errors from the writable stream when bubbleErrors is true", function(done) { - var duplex = duplexer2({bubbleErrors: true}, writable, readable); - - var originalErr = Error("testing"); - - duplex.on("error", function(err) { - assert.strictEqual(err, originalErr); - - return done(); - }); - - writable.emit("error", originalErr); - }); - - it("should bubble errors from the readable stream when bubbleErrors is true", function(done) { - var duplex = duplexer2({bubbleErrors: true}, writable, readable); - - var originalErr = Error("testing"); - - duplex.on("error", function(err) { - assert.strictEqual(err, originalErr); - - return done(); - }); - - readable.emit("error", originalErr); - }); - - it("should not bubble errors from the writable stream when bubbleErrors is false", function(done) { - var duplex = duplexer2({bubbleErrors: false}, writable, readable); - - var timeout = setTimeout(done, 25); - - duplex.on("error", function(err) { - clearTimeout(timeout); - - return done(Error("shouldn't bubble error")); - }); - - // prevent uncaught error exception - writable.on("error", function() {}); - - writable.emit("error", Error("testing")); - }); - - it("should not bubble errors from the readable stream when bubbleErrors is false", function(done) { - var duplex = duplexer2({bubbleErrors: false}, writable, readable); - - var timeout = setTimeout(done, 25); - - duplex.on("error", function(err) { - clearTimeout(timeout); - - return done(Error("shouldn't bubble error")); - }); - - // prevent uncaught error exception - readable.on("error", function() {}); - - readable.emit("error", Error("testing")); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/package.json deleted file mode 100644 index 9d5bb7d7..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "multipipe", - "version": "0.0.1", - "description": "pipe streams with centralized error handling", - "repository": { - "type": "git", - "url": "git://github.com/segmentio/multipipe" - }, - "dependencies": { - "duplexer2": "0.0.1" - }, - "devDependencies": { - "mocha": "~1.17.0" - }, - "scripts": { - "test": "make test" - }, - "readme": "# multipipe\n\nA better `Stream#pipe` that creates duplex streams and lets you handle errors in one place.\n\n[![build status](https://secure.travis-ci.org/segmentio/multipipe.png)](http://travis-ci.org/segmentio/multipipe)\n\n## Example\n\n```js\nvar pipe = require('multipipe');\n\n// pipe streams\nvar stream = pipe(streamA, streamB, streamC);\n\n// centralized error handling\nstream.on('error', fn);\n\n// creates a new stream\nsource.pipe(stream).pipe(dest);\n```\n\n## Duplex streams\n\n Write to the pipe and you'll really write to the first stream, read from the pipe and you'll read from the last stream.\n\n```js\nvar stream = pipe(a, b, c);\n\nsource\n .pipe(stream)\n .pipe(destination);\n```\n\n In this example the flow of data is:\n\n * source ->\n * a ->\n * b ->\n * c ->\n * destination\n\n## Error handling\n\n Each `pipe` forwards the errors the streams it wraps emit, so you have one central place to handle errors:\n\n```js\nvar stream = pipe(a, b, c);\n\nstream.on('error', function(err){\n // called three times\n});\n\na.emit('error', new Error);\nb.emit('error', new Error);\nc.emit('error', new Error);\n```\n\n## API\n\n### pipe(stream, ...)\n\nPass a variable number of streams and each will be piped to the next one.\n\nA stream will be returned that wraps passed in streams in a way that errors will be forwarded and you can write to and/or read from it.\n\n## Installation\n\n```bash\n$ npm install multipipe\n```\n\n## License\n\n MIT\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/segmentio/multipipe/issues" - }, - "homepage": "https://github.com/segmentio/multipipe", - "_id": "multipipe@0.0.1", - "dist": { - "shasum": "537286e6edfcfc85e9f7e568e1f50d82381b6196" - }, - "_from": "multipipe@~0.0.1", - "_resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.0.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/test/multipipe.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/test/multipipe.js deleted file mode 100644 index 57fd1886..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/multipipe/test/multipipe.js +++ /dev/null @@ -1,85 +0,0 @@ -var assert = require('assert'); -var pipe = require('..'); -var Stream = require('stream'); - -describe('pipe(a)', function(){ - it('should return a', function(){ - var readable = Readable(); - var stream = pipe(readable); - assert.equal(stream, readable); - }); -}); - -describe('pipe(a, b, c)', function(){ - it('should pipe internally', function(done){ - pipe(Readable(), Transform(), Writable(done)); - }); - - it('should be writable', function(done){ - var stream = pipe(Transform(), Writable(done)); - assert(stream.writable); - Readable().pipe(stream); - }); - - it('should be readable', function(done){ - var stream = pipe(Readable(), Transform()); - assert(stream.readable); - stream.pipe(Writable(done)); - }); - - it('should be readable and writable', function(done){ - var stream = pipe(Transform(), Transform()); - assert(stream.readable); - assert(stream.writable); - Readable() - .pipe(stream) - .pipe(Writable(done)); - }); - - it('should aggregate errors', function(done){ - var a = Transform(); - var b = Transform(); - var c = Transform(); - var stream = pipe(a, b, c); - var err = new Error; - var i = 0; - - stream.on('error', function(_err){ - i++; - assert.equal(_err, err); - assert(i <= 3); - if (i == 3) done(); - }); - - a.emit('error', err); - b.emit('error', err); - c.emit('error', err); - }); -}); - -function Readable(){ - var readable = new Stream.Readable({ objectMode: true }); - readable._read = function(){ - this.push('a'); - this.push(null); - }; - return readable; -} - -function Transform(){ - var transform = new Stream.Transform({ objectMode: true }); - transform._transform = function(chunk, _, done){ - done(null, chunk.toUpperCase()); - }; - return transform; -} - -function Writable(cb){ - var writable = new Stream.Writable({ objectMode: true }); - writable._write = function(chunk, _, done){ - assert.equal(chunk, 'A'); - done(); - cb(); - }; - return writable; -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/.jshintrc b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/.jshintrc deleted file mode 100644 index c8ef3ca4..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/.jshintrc +++ /dev/null @@ -1,59 +0,0 @@ -{ - "predef": [ ] - , "bitwise": false - , "camelcase": false - , "curly": false - , "eqeqeq": false - , "forin": false - , "immed": false - , "latedef": false - , "noarg": true - , "noempty": true - , "nonew": true - , "plusplus": false - , "quotmark": true - , "regexp": false - , "undef": true - , "unused": true - , "strict": false - , "trailing": true - , "maxlen": 120 - , "asi": true - , "boss": true - , "debug": true - , "eqnull": true - , "esnext": true - , "evil": true - , "expr": true - , "funcscope": false - , "globalstrict": false - , "iterator": false - , "lastsemic": true - , "laxbreak": true - , "laxcomma": true - , "loopfunc": true - , "multistr": false - , "onecase": false - , "proto": false - , "regexdash": false - , "scripturl": true - , "smarttabs": false - , "shadow": false - , "sub": true - , "supernew": false - , "validthis": true - , "browser": true - , "couch": false - , "devel": false - , "dojo": false - , "mootools": false - , "node": true - , "nonstandard": true - , "prototypejs": false - , "rhino": false - , "worker": true - , "wsh": false - , "nomen": false - , "onevar": false - , "passfail": false -} \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/.npmignore b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/.travis.yml b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/.travis.yml deleted file mode 100644 index 12b1a310..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: node_js -node_js: -- '0.8' -- '0.10' -- '0.11' -branches: - only: - - master -notifications: - email: - - rod@vagg.org -script: npm test -env: - global: - - SAUCE_USER=through2-sauce - - secure: A8KyygIlklZOcTwTGhZHpkOu7Cn4tI1QQasg75CTSjudczGzkuh1pG2RDIkWqGcrWv9o5CjI6fFYYx0JvQu8o5PO+ZAtV1Z0AlnM965vE8kAx0XEC7giAV323bibfnHwyQu74vIhbOfdes7E4/cYerV2kAjK0T375D4DYEpDuvw= - diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/LICENSE b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/LICENSE deleted file mode 100644 index f6a0029d..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/LICENSE +++ /dev/null @@ -1,39 +0,0 @@ -Copyright 2013, Rod Vagg (the "Original Author") -All rights reserved. - -MIT +no-false-attribs License - -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. - -Distributions of all or part of the Software intended to be used -by the recipients as they would use the unmodified Software, -containing modifications that substantially alter, remove, or -disable functionality of the Software, outside of the documented -configuration mechanisms provided by the Software, shall be -modified such that the Original Author's bug reporting email -addresses and urls are either replaced with the contact information -of the parties responsible for the changes, or removed entirely. - -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. - - -Except where noted, this license applies to any and all software -programs and associated documentation files created by the -Original Author, when distributed with the Software. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/README.md deleted file mode 100644 index c9388b38..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/README.md +++ /dev/null @@ -1,131 +0,0 @@ -# through2 - -<!-- - -soon ... - -[![Build Status](https://secure.travis-ci.org/rvagg/through2.png)](http://travis-ci.org/rvagg/through2) - -[![Build Status](https://saucelabs.com/browser-matrix/through2-sauce.svg)](https://travis-ci.org/rvagg/through2) - ---> - -[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/) - -<!-- -not happy with these, we need to peg to readable-stream@1.0.x so it'll always report out-of-date - -[![david-dm](https://david-dm.org/rvagg/through2.png)](https://david-dm.org/rvagg/through2/) -[![david-dm](https://david-dm.org/rvagg/through2/dev-status.png)](https://david-dm.org/rvagg/through2#info=devDependencies/) ---> - -**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise** - -Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`. - -```js -fs.createReadStream('ex.txt') - .pipe(through2(function (chunk, enc, callback) { - - for (var i = 0; i < chunk.length; i++) - if (chunk[i] == 97) - chunk[i] = 122 // swap 'a' for 'z' - - this.push(chunk) - - callback() - - })) - .pipe(fs.createWriteStream('out.txt')) -``` - -Or object streams: - -```js -var all = [] - -fs.createReadStream('data.csv') - .pipe(csv2()) - .pipe(through2.obj(function (chunk, enc, callback) { - - var data = { - name : chunk[0] - , address : chunk[3] - , phone : chunk[10] - } - - this.push(data) - - callback() - - })) - .on('data', function (data) { - all.push(data) - }) - .on('end', function () { - doSomethingSpecial(all) - }) -``` - -Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`. - -## API - -<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b> - -Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`). - -### options - -The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`). - -The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call: - -```js -fs.createReadStream('/tmp/important.dat') - .pipe(through2({ objectMode: true, allowHalfOpen: false }, function (chunk, enc, cb) { - - this.push(new Buffer('wut?')) - cb() - - }) - .pipe(fs.createWriteStream('/tmp/wut.txt')) -``` - -### transformFunction - -The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk. - -To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on. - -If you **do not provide a `transformFunction`** then you will get a simple simple pass-through stream. - -### flushFunction - -The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress. - -<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b> - -Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances. - -```js -var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) { - if (record.temp != null && record.unit = "F") { - record.temp = ( ( record.temp - 32 ) * 5 ) / 9 - record.unit = "C" - } - this.push(record) - callback() -}) - -// Create instances of FToC like so: -var converter = new FToC() -// Or: -var converter = FToC() -// Or specify/override options when you instantiate, if you prefer: -var converter = FToC({objectMode: true}) -``` - -## License - -**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/.npmignore b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/.npmignore deleted file mode 100644 index 38344f87..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/LICENSE b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/README.md deleted file mode 100644 index be976683..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/README.md +++ /dev/null @@ -1,768 +0,0 @@ -# readable-stream - -A new class of streams for Node.js - -This module provides the new Stream base classes introduced in Node -v0.10, for use in Node v0.8. You can use it to have programs that -have to work with node v0.8, while being forward-compatible for v0.10 -and beyond. When you drop support for v0.8, you can remove this -module, and only use the native streams. - -This is almost exactly the same codebase as appears in Node v0.10. -However: - -1. The exported object is actually the Readable class. Decorating the - native `stream` module would be global pollution. -2. In v0.10, you can safely use `base64` as an argument to - `setEncoding` in Readable streams. However, in v0.8, the - StringDecoder class has no `end()` method, which is problematic for - Base64. So, don't use that, because it'll break and be weird. - -Other than that, the API is the same as `require('stream')` in v0.10, -so the API docs are reproduced below. - ----------- - - Stability: 2 - Unstable - -A stream is an abstract interface implemented by various objects in -Node. For example a request to an HTTP server is a stream, as is -stdout. Streams are readable, writable, or both. All streams are -instances of [EventEmitter][] - -You can load the Stream base classes by doing `require('stream')`. -There are base classes provided for Readable streams, Writable -streams, Duplex streams, and Transform streams. - -## Compatibility - -In earlier versions of Node, the Readable stream interface was -simpler, but also less powerful and less useful. - -* Rather than waiting for you to call the `read()` method, `'data'` - events would start emitting immediately. If you needed to do some - I/O to decide how to handle data, then you had to store the chunks - in some kind of buffer so that they would not be lost. -* The `pause()` method was advisory, rather than guaranteed. This - meant that you still had to be prepared to receive `'data'` events - even when the stream was in a paused state. - -In Node v0.10, the Readable class described below was added. For -backwards compatibility with older Node programs, Readable streams -switch into "old mode" when a `'data'` event handler is added, or when -the `pause()` or `resume()` methods are called. The effect is that, -even if you are not using the new `read()` method and `'readable'` -event, you no longer have to worry about losing `'data'` chunks. - -Most programs will continue to function normally. However, this -introduces an edge case in the following conditions: - -* No `'data'` event handler is added. -* The `pause()` and `resume()` methods are never called. - -For example, consider the following code: - -```javascript -// WARNING! BROKEN! -net.createServer(function(socket) { - - // we add an 'end' method, but never consume the data - socket.on('end', function() { - // It will never get here. - socket.end('I got your message (but didnt read it)\n'); - }); - -}).listen(1337); -``` - -In versions of node prior to v0.10, the incoming message data would be -simply discarded. However, in Node v0.10 and beyond, the socket will -remain paused forever. - -The workaround in this situation is to call the `resume()` method to -trigger "old mode" behavior: - -```javascript -// Workaround -net.createServer(function(socket) { - - socket.on('end', function() { - socket.end('I got your message (but didnt read it)\n'); - }); - - // start the flow of data, discarding it. - socket.resume(); - -}).listen(1337); -``` - -In addition to new Readable streams switching into old-mode, pre-v0.10 -style streams can be wrapped in a Readable class using the `wrap()` -method. - -## Class: stream.Readable - -<!--type=class--> - -A `Readable Stream` has the following methods, members, and events. - -Note that `stream.Readable` is an abstract class designed to be -extended with an underlying implementation of the `_read(size)` -method. (See below.) - -### new stream.Readable([options]) - -* `options` {Object} - * `highWaterMark` {Number} The maximum number of bytes to store in - the internal buffer before ceasing to read from the underlying - resource. Default=16kb - * `encoding` {String} If specified, then buffers will be decoded to - strings using the specified encoding. Default=null - * `objectMode` {Boolean} Whether this stream should behave - as a stream of objects. Meaning that stream.read(n) returns - a single value instead of a Buffer of size n - -In classes that extend the Readable class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### readable.\_read(size) - -* `size` {Number} Number of bytes to read asynchronously - -Note: **This function should NOT be called directly.** It should be -implemented by child classes, and called by the internal Readable -class methods only. - -All Readable stream implementations must provide a `_read` method -to fetch data from the underlying resource. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -When data is available, put it into the read queue by calling -`readable.push(chunk)`. If `push` returns false, then you should stop -reading. When `_read` is called again, you should start pushing more -data. - -The `size` argument is advisory. Implementations where a "read" is a -single call that returns data can use this to know how much data to -fetch. Implementations where that is not relevant, such as TCP or -TLS, may ignore this argument, and simply provide data whenever it -becomes available. There is no need, for example to "wait" until -`size` bytes are available before calling `stream.push(chunk)`. - -### readable.push(chunk) - -* `chunk` {Buffer | null | String} Chunk of data to push into the read queue -* return {Boolean} Whether or not more pushes should be performed - -Note: **This function should be called by Readable implementors, NOT -by consumers of Readable subclasses.** The `_read()` function will not -be called again until at least one `push(chunk)` call is made. If no -data is available, then you MAY call `push('')` (an empty string) to -allow a future `_read` call, without adding any data to the queue. - -The `Readable` class works by putting data into a read queue to be -pulled out later by calling the `read()` method when the `'readable'` -event fires. - -The `push()` method will explicitly insert some data into the read -queue. If it is called with `null` then it will signal the end of the -data. - -In some cases, you may be wrapping a lower-level source which has some -sort of pause/resume mechanism, and a data callback. In those cases, -you could wrap the low-level source object by doing something like -this: - -```javascript -// source is an object with readStop() and readStart() methods, -// and an `ondata` member that gets called when it has data, and -// an `onend` member that gets called when the data is over. - -var stream = new Readable(); - -source.ondata = function(chunk) { - // if push() returns false, then we need to stop reading from source - if (!stream.push(chunk)) - source.readStop(); -}; - -source.onend = function() { - stream.push(null); -}; - -// _read will be called when the stream wants to pull more data in -// the advisory size argument is ignored in this case. -stream._read = function(n) { - source.readStart(); -}; -``` - -### readable.unshift(chunk) - -* `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue -* return {Boolean} Whether or not more pushes should be performed - -This is the corollary of `readable.push(chunk)`. Rather than putting -the data at the *end* of the read queue, it puts it at the *front* of -the read queue. - -This is useful in certain use-cases where a stream is being consumed -by a parser, which needs to "un-consume" some data that it has -optimistically pulled out of the source. - -```javascript -// A parser for a simple data protocol. -// The "header" is a JSON object, followed by 2 \n characters, and -// then a message body. -// -// Note: This can be done more simply as a Transform stream. See below. - -function SimpleProtocol(source, options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(options); - - Readable.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - - // source is a readable stream, such as a socket or file - this._source = source; - - var self = this; - source.on('end', function() { - self.push(null); - }); - - // give it a kick whenever the source is readable - // read(0) will not consume any bytes - source.on('readable', function() { - self.read(0); - }); - - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype = Object.create( - Readable.prototype, { constructor: { value: SimpleProtocol }}); - -SimpleProtocol.prototype._read = function(n) { - if (!this._inBody) { - var chunk = this._source.read(); - - // if the source doesn't have data, we don't have data yet. - if (chunk === null) - return this.push(''); - - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - this.push(''); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // now, because we got some extra data, unshift the rest - // back into the read queue so that our consumer will see it. - var b = chunk.slice(split); - this.unshift(b); - - // and let them know that we are done parsing the header. - this.emit('header', this.header); - } - } else { - // from there on, just provide the data to our consumer. - // careful not to push(null), since that would indicate EOF. - var chunk = this._source.read(); - if (chunk) this.push(chunk); - } -}; - -// Usage: -var parser = new SimpleProtocol(source); -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - -### readable.wrap(stream) - -* `stream` {Stream} An "old style" readable stream - -If you are using an older Node library that emits `'data'` events and -has a `pause()` method that is advisory only, then you can use the -`wrap()` method to create a Readable stream that uses the old stream -as its data source. - -For example: - -```javascript -var OldReader = require('./old-api-module.js').OldReader; -var oreader = new OldReader; -var Readable = require('stream').Readable; -var myReader = new Readable().wrap(oreader); - -myReader.on('readable', function() { - myReader.read(); // etc. -}); -``` - -### Event: 'readable' - -When there is data ready to be consumed, this event will fire. - -When this event emits, call the `read()` method to consume the data. - -### Event: 'end' - -Emitted when the stream has received an EOF (FIN in TCP terminology). -Indicates that no more `'data'` events will happen. If the stream is -also writable, it may be possible to continue writing. - -### Event: 'data' - -The `'data'` event emits either a `Buffer` (by default) or a string if -`setEncoding()` was used. - -Note that adding a `'data'` event listener will switch the Readable -stream into "old mode", where data is emitted as soon as it is -available, rather than waiting for you to call `read()` to consume it. - -### Event: 'error' - -Emitted if there was an error receiving data. - -### Event: 'close' - -Emitted when the underlying resource (for example, the backing file -descriptor) has been closed. Not all streams will emit this. - -### readable.setEncoding(encoding) - -Makes the `'data'` event emit a string instead of a `Buffer`. `encoding` -can be `'utf8'`, `'utf16le'` (`'ucs2'`), `'ascii'`, or `'hex'`. - -The encoding can also be set by specifying an `encoding` field to the -constructor. - -### readable.read([size]) - -* `size` {Number | null} Optional number of bytes to read. -* Return: {Buffer | String | null} - -Note: **This function SHOULD be called by Readable stream users.** - -Call this method to consume data once the `'readable'` event is -emitted. - -The `size` argument will set a minimum number of bytes that you are -interested in. If not set, then the entire content of the internal -buffer is returned. - -If there is no data to consume, or if there are fewer bytes in the -internal buffer than the `size` argument, then `null` is returned, and -a future `'readable'` event will be emitted when more is available. - -Calling `stream.read(0)` will always return `null`, and will trigger a -refresh of the internal buffer, but otherwise be a no-op. - -### readable.pipe(destination, [options]) - -* `destination` {Writable Stream} -* `options` {Object} Optional - * `end` {Boolean} Default=true - -Connects this readable stream to `destination` WriteStream. Incoming -data on this stream gets written to `destination`. Properly manages -back-pressure so that a slow destination will not be overwhelmed by a -fast readable stream. - -This function returns the `destination` stream. - -For example, emulating the Unix `cat` command: - - process.stdin.pipe(process.stdout); - -By default `end()` is called on the destination when the source stream -emits `end`, so that `destination` is no longer writable. Pass `{ end: -false }` as `options` to keep the destination stream open. - -This keeps `writer` open so that "Goodbye" can be written at the -end. - - reader.pipe(writer, { end: false }); - reader.on("end", function() { - writer.end("Goodbye\n"); - }); - -Note that `process.stderr` and `process.stdout` are never closed until -the process exits, regardless of the specified options. - -### readable.unpipe([destination]) - -* `destination` {Writable Stream} Optional - -Undo a previously established `pipe()`. If no destination is -provided, then all previously established pipes are removed. - -### readable.pause() - -Switches the readable stream into "old mode", where data is emitted -using a `'data'` event rather than being buffered for consumption via -the `read()` method. - -Ceases the flow of data. No `'data'` events are emitted while the -stream is in a paused state. - -### readable.resume() - -Switches the readable stream into "old mode", where data is emitted -using a `'data'` event rather than being buffered for consumption via -the `read()` method. - -Resumes the incoming `'data'` events after a `pause()`. - - -## Class: stream.Writable - -<!--type=class--> - -A `Writable` Stream has the following methods, members, and events. - -Note that `stream.Writable` is an abstract class designed to be -extended with an underlying implementation of the -`_write(chunk, encoding, cb)` method. (See below.) - -### new stream.Writable([options]) - -* `options` {Object} - * `highWaterMark` {Number} Buffer level when `write()` starts - returning false. Default=16kb - * `decodeStrings` {Boolean} Whether or not to decode strings into - Buffers before passing them to `_write()`. Default=true - -In classes that extend the Writable class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### writable.\_write(chunk, encoding, callback) - -* `chunk` {Buffer | String} The chunk to be written. Will always - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. Ignore chunk is a buffer. Note that chunk will - **always** be a buffer unless the `decodeStrings` option is - explicitly set to `false`. -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunk. - -All Writable stream implementations must provide a `_write` method to -send data to the underlying resource. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Writable -class methods only. - -Call the callback using the standard `callback(error)` pattern to -signal that the write completed successfully or with an error. - -If the `decodeStrings` flag is set in the constructor options, then -`chunk` may be a string rather than a Buffer, and `encoding` will -indicate the sort of string that it is. This is to support -implementations that have an optimized handling for certain string -data encodings. If you do not explicitly set the `decodeStrings` -option to `false`, then you can safely ignore the `encoding` argument, -and assume that `chunk` will always be a Buffer. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - - -### writable.write(chunk, [encoding], [callback]) - -* `chunk` {Buffer | String} Data to be written -* `encoding` {String} Optional. If `chunk` is a string, then encoding - defaults to `'utf8'` -* `callback` {Function} Optional. Called when this chunk is - successfully written. -* Returns {Boolean} - -Writes `chunk` to the stream. Returns `true` if the data has been -flushed to the underlying resource. Returns `false` to indicate that -the buffer is full, and the data will be sent out in the future. The -`'drain'` event will indicate when the buffer is empty again. - -The specifics of when `write()` will return false, is determined by -the `highWaterMark` option provided to the constructor. - -### writable.end([chunk], [encoding], [callback]) - -* `chunk` {Buffer | String} Optional final data to be written -* `encoding` {String} Optional. If `chunk` is a string, then encoding - defaults to `'utf8'` -* `callback` {Function} Optional. Called when the final chunk is - successfully written. - -Call this method to signal the end of the data being written to the -stream. - -### Event: 'drain' - -Emitted when the stream's write queue empties and it's safe to write -without buffering again. Listen for it when `stream.write()` returns -`false`. - -### Event: 'close' - -Emitted when the underlying resource (for example, the backing file -descriptor) has been closed. Not all streams will emit this. - -### Event: 'finish' - -When `end()` is called and there are no more chunks to write, this -event is emitted. - -### Event: 'pipe' - -* `source` {Readable Stream} - -Emitted when the stream is passed to a readable stream's pipe method. - -### Event 'unpipe' - -* `source` {Readable Stream} - -Emitted when a previously established `pipe()` is removed using the -source Readable stream's `unpipe()` method. - -## Class: stream.Duplex - -<!--type=class--> - -A "duplex" stream is one that is both Readable and Writable, such as a -TCP socket connection. - -Note that `stream.Duplex` is an abstract class designed to be -extended with an underlying implementation of the `_read(size)` -and `_write(chunk, encoding, callback)` methods as you would with a Readable or -Writable stream class. - -Since JavaScript doesn't have multiple prototypal inheritance, this -class prototypally inherits from Readable, and then parasitically from -Writable. It is thus up to the user to implement both the lowlevel -`_read(n)` method as well as the lowlevel `_write(chunk, encoding, cb)` method -on extension duplex classes. - -### new stream.Duplex(options) - -* `options` {Object} Passed to both Writable and Readable - constructors. Also has the following fields: - * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then - the stream will automatically end the readable side when the - writable side ends and vice versa. - -In classes that extend the Duplex class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -## Class: stream.Transform - -A "transform" stream is a duplex stream where the output is causally -connected in some way to the input, such as a zlib stream or a crypto -stream. - -There is no requirement that the output be the same size as the input, -the same number of chunks, or arrive at the same time. For example, a -Hash stream will only ever have a single chunk of output which is -provided when the input is ended. A zlib stream will either produce -much smaller or much larger than its input. - -Rather than implement the `_read()` and `_write()` methods, Transform -classes must implement the `_transform()` method, and may optionally -also implement the `_flush()` method. (See below.) - -### new stream.Transform([options]) - -* `options` {Object} Passed to both Writable and Readable - constructors. - -In classes that extend the Transform class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### transform.\_transform(chunk, encoding, callback) - -* `chunk` {Buffer | String} The chunk to be transformed. Will always - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. (Ignore if `decodeStrings` chunk is a buffer.) -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunk. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Transform -class methods only. - -All Transform stream implementations must provide a `_transform` -method to accept input and produce output. - -`_transform` should do whatever has to be done in this specific -Transform class, to handle the bytes being written, and pass them off -to the readable portion of the interface. Do asynchronous I/O, -process things, and so on. - -Call `transform.push(outputChunk)` 0 or more times to generate output -from this input chunk, depending on how much data you want to output -as a result of this chunk. - -Call the callback function only when the current chunk is completely -consumed. Note that there may or may not be output as a result of any -particular input chunk. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -### transform.\_flush(callback) - -* `callback` {Function} Call this function (optionally with an error - argument) when you are done flushing any remaining data. - -Note: **This function MUST NOT be called directly.** It MAY be implemented -by child classes, and if so, will be called by the internal Transform -class methods only. - -In some cases, your transform operation may need to emit a bit more -data at the end of the stream. For example, a `Zlib` compression -stream will store up some internal state so that it can optimally -compress the output. At the end, however, it needs to do the best it -can with what is left, so that the data will be complete. - -In those cases, you can implement a `_flush` method, which will be -called at the very end, after all the written data is consumed, but -before emitting `end` to signal the end of the readable side. Just -like with `_transform`, call `transform.push(chunk)` zero or more -times, as appropriate, and call `callback` when the flush operation is -complete. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -### Example: `SimpleProtocol` parser - -The example above of a simple protocol parser can be implemented much -more simply by using the higher level `Transform` stream class. - -In this example, rather than providing the input as an argument, it -would be piped into the parser, which is a more idiomatic Node stream -approach. - -```javascript -function SimpleProtocol(options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(options); - - Transform.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype = Object.create( - Transform.prototype, { constructor: { value: SimpleProtocol }}); - -SimpleProtocol.prototype._transform = function(chunk, encoding, done) { - if (!this._inBody) { - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // and let them know that we are done parsing the header. - this.emit('header', this.header); - - // now, because we got some extra data, emit this first. - this.push(b); - } - } else { - // from there on, just provide the data to our consumer as-is. - this.push(b); - } - done(); -}; - -var parser = new SimpleProtocol(); -source.pipe(parser) - -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - - -## Class: stream.PassThrough - -This is a trivial implementation of a `Transform` stream that simply -passes the input bytes across to the output. Its purpose is mainly -for examples and testing, but there are occasionally use cases where -it can come in handy. - - -[EventEmitter]: events.html#events_class_events_eventemitter diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/duplex.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af8..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/float.patch b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/float.patch deleted file mode 100644 index 0ad71a1f..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/float.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js -index c5a741c..a2e0d8e 100644 ---- a/lib/_stream_duplex.js -+++ b/lib/_stream_duplex.js -@@ -26,8 +26,8 @@ - - module.exports = Duplex; - var util = require('util'); --var Readable = require('_stream_readable'); --var Writable = require('_stream_writable'); -+var Readable = require('./_stream_readable'); -+var Writable = require('./_stream_writable'); - - util.inherits(Duplex, Readable); - -diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js -index a5e9864..330c247 100644 ---- a/lib/_stream_passthrough.js -+++ b/lib/_stream_passthrough.js -@@ -25,7 +25,7 @@ - - module.exports = PassThrough; - --var Transform = require('_stream_transform'); -+var Transform = require('./_stream_transform'); - var util = require('util'); - util.inherits(PassThrough, Transform); - -diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js -index 2259d2e..e6681ee 100644 ---- a/lib/_stream_readable.js -+++ b/lib/_stream_readable.js -@@ -23,6 +23,9 @@ module.exports = Readable; - Readable.ReadableState = ReadableState; - - var EE = require('events').EventEmitter; -+if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { -+ return emitter.listeners(type).length; -+}; - var Stream = require('stream'); - var util = require('util'); - var StringDecoder; -diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js -index e925b4b..f08b05e 100644 ---- a/lib/_stream_transform.js -+++ b/lib/_stream_transform.js -@@ -64,7 +64,7 @@ - - module.exports = Transform; - --var Duplex = require('_stream_duplex'); -+var Duplex = require('./_stream_duplex'); - var util = require('util'); - util.inherits(Transform, Duplex); - -diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js -index a26f711..56ca47d 100644 ---- a/lib/_stream_writable.js -+++ b/lib/_stream_writable.js -@@ -109,7 +109,7 @@ function WritableState(options, stream) { - function Writable(options) { - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. -- if (!(this instanceof Writable) && !(this instanceof Stream.Duplex)) -+ if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) - return new Writable(options); - - this._writableState = new WritableState(options, this); diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index a2e0d8e0..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -module.exports = Duplex; -var util = require('util'); -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -Object.keys(Writable.prototype).forEach(function(method) { - if (!Duplex.prototype[method]) - Duplex.prototype[method] = Writable.prototype[method]; -}); - -function Duplex(options) { - if (!(this instanceof Duplex)) - return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) - this.readable = false; - - if (options && options.writable === false) - this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) - this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) - return; - - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(this.end.bind(this)); -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 330c247d..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); -var util = require('util'); -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) - return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function(chunk, encoding, cb) { - cb(null, chunk); -}; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 323f3305..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,927 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -module.exports = Readable; -Readable.ReadableState = ReadableState; - -var EE = require('events').EventEmitter; -if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { - return emitter.listeners(type).length; -}; -var Stream = require('stream'); -var util = require('util'); -var StringDecoder; - -util.inherits(Readable, Stream); - -function ReadableState(options, stream) { - options = options || {}; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = false; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // In streams that never have any data, and do push(null) right away, - // the consumer can miss the 'end' event if they do some I/O before - // consuming the stream. So, we don't emit('end') until some reading - // happens. - this.calledRead = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - if (!(this instanceof Readable)) - return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function(chunk, encoding) { - var state = this._readableState; - - if (typeof chunk === 'string' && !state.objectMode) { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = new Buffer(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function(chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (chunk === null || chunk === undefined) { - state.reading = false; - if (!state.ended) - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var e = new Error('stream.unshift() after end event'); - stream.emit('error', e); - } else { - if (state.decoder && !addToFront && !encoding) - chunk = state.decoder.write(chunk); - - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) { - state.buffer.unshift(chunk); - } else { - state.reading = false; - state.buffer.push(chunk); - } - - if (state.needReadable) - emitReadable(stream); - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - - - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && - (state.needReadable || - state.length < state.highWaterMark || - state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function(enc) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; -}; - -// Don't raise the hwm > 128MB -var MAX_HWM = 0x800000; -function roundUpToNextPowerOf2(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - for (var p = 1; p < 32; p <<= 1) n |= n >> p; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) - return 0; - - if (state.objectMode) - return n === 0 ? 0 : 1; - - if (isNaN(n) || n === null) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) - return state.buffer[0].length; - else - return state.length; - } - - if (n <= 0) - return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) - state.highWaterMark = roundUpToNextPowerOf2(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else - return state.length; - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function(n) { - var state = this._readableState; - state.calledRead = true; - var nOrig = n; - - if (typeof n !== 'number' || n > 0) - state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && - state.needReadable && - (state.length >= state.highWaterMark || state.ended)) { - emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) - endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - - // if we currently have less than the highWaterMark, then also read some - if (state.length - n <= state.highWaterMark) - doRead = true; - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) - doRead = false; - - if (doRead) { - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) - state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read called its callback synchronously, then `reading` - // will be false, and we need to re-evaluate how much data we - // can return to the user. - if (doRead && !state.reading) - n = howMuchToRead(nOrig, state); - - var ret; - if (n > 0) - ret = fromList(n, state); - else - ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) - state.needReadable = true; - - // If we happened to read() exactly the remaining amount in the - // buffer, and the EOF has been seen at this point, then make sure - // that we emit 'end' on the very next tick. - if (state.ended && !state.endEmitted && state.length === 0) - endReadable(this); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode && - !er) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - - -function onEofChunk(stream, state) { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // if we've ended and we have some data left, then emit - // 'readable' now to make sure it gets picked up. - if (state.length > 0) - emitReadable(stream); - else - endReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (state.emittedReadable) - return; - - state.emittedReadable = true; - if (state.sync) - process.nextTick(function() { - emitReadable_(stream); - }); - else - emitReadable_(stream); -} - -function emitReadable_(stream) { - stream.emit('readable'); -} - - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(function() { - maybeReadMore_(stream, state); - }); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && - state.length < state.highWaterMark) { - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break; - else - len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function(n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function(dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && - dest !== process.stdout && - dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) - process.nextTick(endFn); - else - src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - if (readable !== src) return; - cleanup(); - } - - function onend() { - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - function cleanup() { - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (!dest._writableState || dest._writableState.needDrain) - ondrain(); - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - unpipe(); - dest.removeListener('error', onerror); - if (EE.listenerCount(dest, 'error') === 0) - dest.emit('error', er); - } - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. - if (!dest._events || !dest._events.error) - dest.on('error', onerror); - else if (Array.isArray(dest._events.error)) - dest._events.error.unshift(onerror); - else - dest._events.error = [onerror, dest._events.error]; - - - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - // the handler that waits for readable events after all - // the data gets sucked out in flow. - // This would be easier to follow with a .once() handler - // in flow(), but that is too slow. - this.on('readable', pipeOnReadable); - - state.flowing = true; - process.nextTick(function() { - flow(src); - }); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function() { - var dest = this; - var state = src._readableState; - state.awaitDrain--; - if (state.awaitDrain === 0) - flow(src); - }; -} - -function flow(src) { - var state = src._readableState; - var chunk; - state.awaitDrain = 0; - - function write(dest, i, list) { - var written = dest.write(chunk); - if (false === written) { - state.awaitDrain++; - } - } - - while (state.pipesCount && null !== (chunk = src.read())) { - - if (state.pipesCount === 1) - write(state.pipes, 0, null); - else - state.pipes.forEach(write); - - src.emit('data', chunk); - - // if anyone needs a drain, then we have to wait for that. - if (state.awaitDrain > 0) - return; - } - - // if every destination was unpiped, either before entering this - // function, or in the while loop, then stop flowing. - // - // NB: This is a pretty rare edge case. - if (state.pipesCount === 0) { - state.flowing = false; - - // if there were data event listeners added, then switch to old mode. - if (EE.listenerCount(src, 'data') > 0) - emitDataEvents(src); - return; - } - - // at this point, no one needed a drain, so we just ran out of data - // on the next readable event, start it over again. - state.ranOut = true; -} - -function pipeOnReadable() { - if (this._readableState.ranOut) { - this._readableState.ranOut = false; - flow(this); - } -} - - -Readable.prototype.unpipe = function(dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) - return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) - return this; - - if (!dest) - dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - if (dest) - dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - - for (var i = 0; i < len; i++) - dests[i].emit('unpipe', this); - return this; - } - - // try to find the right one. - var i = state.pipes.indexOf(dest); - if (i === -1) - return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) - state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function(ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data' && !this._readableState.flowing) - emitDataEvents(this); - - if (ev === 'readable' && this.readable) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - this.read(0); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function() { - emitDataEvents(this); - this.read(0); - this.emit('resume'); -}; - -Readable.prototype.pause = function() { - emitDataEvents(this, true); - this.emit('pause'); -}; - -function emitDataEvents(stream, startPaused) { - var state = stream._readableState; - - if (state.flowing) { - // https://github.com/isaacs/readable-stream/issues/16 - throw new Error('Cannot switch to old mode now.'); - } - - var paused = startPaused || false; - var readable = false; - - // convert to an old-style stream. - stream.readable = true; - stream.pipe = Stream.prototype.pipe; - stream.on = stream.addListener = Stream.prototype.on; - - stream.on('readable', function() { - readable = true; - - var c; - while (!paused && (null !== (c = stream.read()))) - stream.emit('data', c); - - if (c === null) { - readable = false; - stream._readableState.needReadable = true; - } - }); - - stream.pause = function() { - paused = true; - this.emit('pause'); - }; - - stream.resume = function() { - paused = false; - if (readable) - process.nextTick(function() { - stream.emit('readable'); - }); - else - this.read(0); - this.emit('resume'); - }; - - // now make it start, just in case it hadn't already. - stream.emit('readable'); -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function(stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function() { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) - self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function(chunk) { - if (state.decoder) - chunk = state.decoder.write(chunk); - if (!chunk || !state.objectMode && !chunk.length) - return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (typeof stream[i] === 'function' && - typeof this[i] === 'undefined') { - this[i] = function(method) { return function() { - return stream[method].apply(stream, arguments); - }}(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - events.forEach(function(ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function(n) { - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - - - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) - return null; - - if (length === 0) - ret = null; - else if (objectMode) - ret = list.shift(); - else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) - ret = list.join(''); - else - ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) - ret = ''; - else - ret = new Buffer(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var buf = list[0]; - var cpy = Math.min(n - c, buf.length); - - if (stringMode) - ret += buf.slice(0, cpy); - else - buf.copy(ret, c, 0, cpy); - - if (cpy < buf.length) - list[0] = buf.slice(cpy); - else - list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) - throw new Error('endReadable called on non-empty stream'); - - if (!state.endEmitted && state.calledRead) { - state.ended = true; - process.nextTick(function() { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } - }); - } -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index 707e4b3b..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); -var util = require('util'); -util.inherits(Transform, Duplex); - - -function TransformState(options, stream) { - this.afterTransform = function(er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) - return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (data !== null && data !== undefined) - stream.push(data); - - if (cb) - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - - -function Transform(options) { - if (!(this instanceof Transform)) - return new Transform(options); - - Duplex.call(this, options); - - var ts = this._transformState = new TransformState(options, this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - this.once('finish', function() { - if ('function' === typeof this._flush) - this._flush(function(er) { - done(stream, er); - }); - else - done(stream); - }); -} - -Transform.prototype.push = function(chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function(chunk, encoding, cb) { - throw new Error('not implemented'); -}; - -Transform.prototype._write = function(chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || - rs.needReadable || - rs.length < rs.highWaterMark) - this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function(n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - - -function done(stream, er) { - if (er) - return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var rs = stream._readableState; - var ts = stream._transformState; - - if (ws.length) - throw new Error('calling transform done when ws.length != 0'); - - if (ts.transforming) - throw new Error('calling transform done when still transforming'); - - return stream.push(null); -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index 9eaf4ec2..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,371 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, cb), and it'll handle all -// the drain event emission and buffering. - -module.exports = Writable; -Writable.WritableState = WritableState; - -var util = require('util'); -var assert = require('assert'); -var Stream = require('stream'); - -util.inherits(Writable, Stream); - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; -} - -function WritableState(options, stream) { - options = options || {}; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function(er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.buffer = []; -} - -function Writable(options) { - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) - return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function() { - this.emit('error', new Error('Cannot pipe. Not readable.')); -}; - - -function writeAfterEnd(stream, state, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); - valid = false; - } - return valid; -} - -Writable.prototype.write = function(chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - else if (!encoding) - encoding = state.defaultEncoding; - - if (typeof cb !== 'function') - cb = function() {}; - - if (state.ended) - writeAfterEnd(this, state, cb); - else if (validChunk(this, state, chunk, cb)) - ret = writeOrBuffer(this, state, chunk, encoding, cb); - - return ret; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && - state.decodeStrings !== false && - typeof chunk === 'string') { - chunk = new Buffer(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) - state.needDrain = true; - - if (state.writing) - state.buffer.push(new WriteReq(chunk, encoding, cb)); - else - doWrite(stream, state, len, chunk, encoding, cb); - - return ret; -} - -function doWrite(stream, state, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - if (sync) - process.nextTick(function() { - cb(er); - }); - else - cb(er); - - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) - onwriteError(stream, state, sync, er, cb); - else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(stream, state); - - if (!finished && !state.bufferProcessing && state.buffer.length) - clearBuffer(stream, state); - - if (sync) { - process.nextTick(function() { - afterWrite(stream, state, finished, cb); - }); - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) - onwriteDrain(stream, state); - cb(); - if (finished) - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - - for (var c = 0; c < state.buffer.length; c++) { - var entry = state.buffer[c]; - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, len, chunk, encoding, cb); - - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - c++; - break; - } - } - - state.bufferProcessing = false; - if (c < state.buffer.length) - state.buffer = state.buffer.slice(c); - else - state.buffer.length = 0; -} - -Writable.prototype._write = function(chunk, encoding, cb) { - cb(new Error('not implemented')); -}; - -Writable.prototype.end = function(chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (typeof chunk !== 'undefined' && chunk !== null) - this.write(chunk, encoding); - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) - endWritable(this, state, cb); -}; - - -function needFinish(stream, state) { - return (state.ending && - state.length === 0 && - !state.finished && - !state.writing); -} - -function finishMaybe(stream, state) { - var need = needFinish(stream, state); - if (need) { - state.finished = true; - stream.emit('finish'); - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) - process.nextTick(cb); - else - stream.once('finish', cb); - } - state.ended = true; -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE deleted file mode 100644 index 6de584a4..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. - -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/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md deleted file mode 100644 index 4d2aa001..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md +++ /dev/null @@ -1,7 +0,0 @@ -**string_decoder.js** (`require('string_decoder')`) from Node.js core - -Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. - -Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** - -The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js deleted file mode 100755 index 46470cfd..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js +++ /dev/null @@ -1,94 +0,0 @@ -#!/usr/bin/env node - -const hyperquest = require('hyperzip')(require('hyperdirect')) - , bl = require('bl') - , fs = require('fs') - , path = require('path') - , cheerio = require('cheerio') - - , files = require('./files') - , testReplace = require('./test-replacements') - - , srcurlpfx = 'https://raw.github.com/joyent/node/v' + process.argv[2] + '-release/' - , libsrcurl = srcurlpfx + 'lib/' - , testsrcurl = srcurlpfx + 'test/simple/' - , testlisturl = 'https://github.com/joyent/node/tree/v' + process.argv[2] + '-release/test/simple' - , libourroot = path.join(__dirname, '../') - , testourroot = path.join(__dirname, '../test/simple/') - - -function processFile (url, out, replacements) { - hyperquest(url).pipe(bl(function (err, data) { - if (err) - throw err - - data = data.toString() - replacements.forEach(function (replacement) { - data = data.replace.apply(data, replacement) - }) - - fs.writeFile(out, data, 'utf8', function (err) { - if (err) - throw err - - console.log('Wrote', out) - }) - })) -} - -function processLibFile (file) { - var replacements = files[file] - , url = libsrcurl + file - , out = path.join(libourroot, replacements.out || file) - - processFile(url, out, replacements) -} - - -function processTestFile (file) { - var replacements = testReplace.all - , url = testsrcurl + file - , out = path.join(testourroot, file) - - if (testReplace[file]) - replacements = replacements.concat(testReplace[file]) - - processFile(url, out, replacements) -} - - -if (!/0\.1\d\.\d+/.test(process.argv[2])) { - console.log('Usage: build.js <node version>') - return process.exit(-1) -} - - -//-------------------------------------------------------------------- -// Grab & process files in ../lib/ - -Object.keys(files).forEach(processLibFile) - -//-------------------------------------------------------------------- -// Discover, grab and process all test-string-decoder* files on joyent/node - -hyperquest(testlisturl).pipe(bl(function (err, data) { - if (err) - throw err - - var $ = cheerio.load(data.toString()) - - $('table.files .js-directory-link').each(function () { - var file = $(this).text() - if (/^test-string-decoder/.test(file) || file == 'common.js') - processTestFile(file) - }) -})) - -//-------------------------------------------------------------------- -// Grab the joyent/node test/common.js - -processFile( - testsrcurl + '../common.js' - , path.join(testourroot, '../common.js') - , testReplace['common.js'] -) \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js deleted file mode 100644 index 7396a4f4..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js +++ /dev/null @@ -1,36 +0,0 @@ -/* This file lists the files to be fetched from the node repo - * in the /lib/ directory which will be placed in the ../lib/ - * directory after having each of the "replacements" in the - * array for that file applied to it. The replacements are - * simply the arguments to String#replace, so they can be - * strings, regexes, functions. - */ - -module.exports['string_decoder.js'] = [ - - // pull in Bufer as a require - // add Buffer.isEncoding where missing - [ - /^(\/\/ USE OR OTHER DEALINGS IN THE SOFTWARE\.)/m - , '$1\n\nvar Buffer = require(\'buffer\').Buffer;' - + '\n' - + '\nvar isBufferEncoding = Buffer.isEncoding' - + '\n || function(encoding) {' - + '\n switch (encoding && encoding.toLowerCase()) {' - + '\n case \'hex\': case \'utf8\': case \'utf-8\': case \'ascii\': case \'binary\': case \'base64\': case \'ucs2\': case \'ucs-2\': case \'utf16le\': case \'utf-16le\': case \'raw\': return true;' - + '\n default: return false;' - + '\n }' - + '\n }' - + '\n' - - ] - - // use custom Buffer.isEncoding reference - , [ - /Buffer\.isEncoding\(/g - , 'isBufferEncoding\(' - ] - -] - -module.exports['string_decoder.js'].out = 'index.js' \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json deleted file mode 100644 index f7ee6a46..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "string_decoder-build", - "version": "0.0.0", - "description": "", - "main": "build.js", - "dependencies": { - "bl": "~0.6.0", - "hyperzip": "0.0.0", - "hyperdirect": "0.0.0", - "cheerio": "~0.13.1" - } -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js deleted file mode 100644 index 5bbf6028..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js +++ /dev/null @@ -1,24 +0,0 @@ -module.exports.all = [ - [ - /require\(['"]string_decoder['"]\)/g - , 'require(\'../../\')' - ] - -] - -module.exports['common.js'] = [ - [ - /^ setImmediate,$/m - , ' typeof setImmediate == \'undefined\' ? null : setImmediate,' - ] - - , [ - /^ clearImmediate,$/m - , ' typeof clearImmediate == \'undefined\' ? null : clearImmediate,' - ] - - , [ - /^ global];$/m - , ' global].filter(Boolean);' - ] -] diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js deleted file mode 100644 index 2e44a03e..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var Buffer = require('buffer').Buffer; - -var isBufferEncoding = Buffer.isEncoding - || function(encoding) { - switch (encoding && encoding.toLowerCase()) { - case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; - default: return false; - } - } - - -function assertEncoding(encoding) { - if (encoding && !isBufferEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} - -var StringDecoder = exports.StringDecoder = function(encoding) { - this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); - assertEncoding(encoding); - switch (this.encoding) { - case 'utf8': - // CESU-8 represents each of Surrogate Pair by 3-bytes - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - // UTF-16 represents each of Surrogate Pair by 2-bytes - this.surrogateSize = 2; - this.detectIncompleteChar = utf16DetectIncompleteChar; - break; - case 'base64': - // Base-64 stores 3 bytes in 4 chars, and pads the remainder. - this.surrogateSize = 3; - this.detectIncompleteChar = base64DetectIncompleteChar; - break; - default: - this.write = passThroughWrite; - return; - } - - this.charBuffer = new Buffer(6); - this.charReceived = 0; - this.charLength = 0; -}; - - -StringDecoder.prototype.write = function(buffer) { - var charStr = ''; - var offset = 0; - - // if our last write ended with an incomplete multibyte character - while (this.charLength) { - // determine how many remaining bytes this buffer has to offer for this char - var i = (buffer.length >= this.charLength - this.charReceived) ? - this.charLength - this.charReceived : - buffer.length; - - // add the new bytes to the char buffer - buffer.copy(this.charBuffer, this.charReceived, offset, i); - this.charReceived += (i - offset); - offset = i; - - if (this.charReceived < this.charLength) { - // still not enough chars in this buffer? wait for more ... - return ''; - } - - // get the character that was split - charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); - - // lead surrogate (D800-DBFF) is also the incomplete character - var charCode = charStr.charCodeAt(charStr.length - 1); - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - this.charLength += this.surrogateSize; - charStr = ''; - continue; - } - this.charReceived = this.charLength = 0; - - // if there are no more bytes in this buffer, just emit our char - if (i == buffer.length) return charStr; - - // otherwise cut off the characters end from the beginning of this buffer - buffer = buffer.slice(i, buffer.length); - break; - } - - var lenIncomplete = this.detectIncompleteChar(buffer); - - var end = buffer.length; - if (this.charLength) { - // buffer the incomplete character bytes we got - buffer.copy(this.charBuffer, 0, buffer.length - lenIncomplete, end); - this.charReceived = lenIncomplete; - end -= lenIncomplete; - } - - charStr += buffer.toString(this.encoding, 0, end); - - var end = charStr.length - 1; - var charCode = charStr.charCodeAt(end); - // lead surrogate (D800-DBFF) is also the incomplete character - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - var size = this.surrogateSize; - this.charLength += size; - this.charReceived += size; - this.charBuffer.copy(this.charBuffer, size, 0, size); - this.charBuffer.write(charStr.charAt(charStr.length - 1), this.encoding); - return charStr.substring(0, end); - } - - // or just emit the charStr - return charStr; -}; - -StringDecoder.prototype.detectIncompleteChar = function(buffer) { - // determine how many bytes we have to check at the end of this buffer - var i = (buffer.length >= 3) ? 3 : buffer.length; - - // Figure out if one of the last i bytes of our buffer announces an - // incomplete char. - for (; i > 0; i--) { - var c = buffer[buffer.length - i]; - - // See http://en.wikipedia.org/wiki/UTF-8#Description - - // 110XXXXX - if (i == 1 && c >> 5 == 0x06) { - this.charLength = 2; - break; - } - - // 1110XXXX - if (i <= 2 && c >> 4 == 0x0E) { - this.charLength = 3; - break; - } - - // 11110XXX - if (i <= 3 && c >> 3 == 0x1E) { - this.charLength = 4; - break; - } - } - - return i; -}; - -StringDecoder.prototype.end = function(buffer) { - var res = ''; - if (buffer && buffer.length) - res = this.write(buffer); - - if (this.charReceived) { - var cr = this.charReceived; - var buf = this.charBuffer; - var enc = this.encoding; - res += buf.slice(0, cr).toString(enc); - } - - return res; -}; - -function passThroughWrite(buffer) { - return buffer.toString(this.encoding); -} - -function utf16DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 2; - this.charLength = incomplete ? 2 : 0; - return incomplete; -} - -function base64DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 3; - this.charLength = incomplete ? 3 : 0; - return incomplete; -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json deleted file mode 100644 index c7cac1a5..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "string_decoder", - "version": "0.10.25", - "description": "The string_decoder module from Node core", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "tap": "~0.4.8" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/rvagg/string_decoder.git" - }, - "homepage": "https://github.com/rvagg/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "readme": "**string_decoder.js** (`require('string_decoder')`) from Node.js core\n\nCopyright Joyent, Inc. and other Node contributors. See LICENCE file for details.\n\nVersion numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.**\n\nThe *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version.", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/rvagg/string_decoder/issues" - }, - "_id": "string_decoder@0.10.25", - "dist": { - "shasum": "aa026a29a0177ff13c8df4472dcda2f26d646900" - }, - "_from": "string_decoder@~0.10.x", - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.25.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js deleted file mode 100644 index ed5ff08d..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var path = require('path'); -var assert = require('assert'); - -exports.testDir = path.dirname(__filename); -exports.fixturesDir = path.join(exports.testDir, 'fixtures'); -exports.libDir = path.join(exports.testDir, '../lib'); -exports.tmpDir = path.join(exports.testDir, 'tmp'); -exports.PORT = +process.env.NODE_COMMON_PORT || 12346; - -if (process.platform === 'win32') { - exports.PIPE = '\\\\.\\pipe\\libuv-test'; -} else { - exports.PIPE = exports.tmpDir + '/test.sock'; -} - -var util = require('util'); -for (var i in util) exports[i] = util[i]; -//for (var i in exports) global[i] = exports[i]; - -function protoCtrChain(o) { - var result = []; - for (; o; o = o.__proto__) { result.push(o.constructor); } - return result.join(); -} - -exports.indirectInstanceOf = function(obj, cls) { - if (obj instanceof cls) { return true; } - var clsChain = protoCtrChain(cls.prototype); - var objChain = protoCtrChain(obj); - return objChain.slice(-clsChain.length) === clsChain; -}; - - -exports.ddCommand = function(filename, kilobytes) { - if (process.platform === 'win32') { - var p = path.resolve(exports.fixturesDir, 'create-file.js'); - return '"' + process.argv[0] + '" "' + p + '" "' + - filename + '" ' + (kilobytes * 1024); - } else { - return 'dd if=/dev/zero of="' + filename + '" bs=1024 count=' + kilobytes; - } -}; - - -exports.spawnCat = function(options) { - var spawn = require('child_process').spawn; - - if (process.platform === 'win32') { - return spawn('more', [], options); - } else { - return spawn('cat', [], options); - } -}; - - -exports.spawnPwd = function(options) { - var spawn = require('child_process').spawn; - - if (process.platform === 'win32') { - return spawn('cmd.exe', ['/c', 'cd'], options); - } else { - return spawn('pwd', [], options); - } -}; - - -// Turn this off if the test should not check for global leaks. -exports.globalCheck = true; - -process.on('exit', function() { - if (!exports.globalCheck) return; - var knownGlobals = [setTimeout, - setInterval, - typeof setImmediate == 'undefined' ? null : setImmediate, - clearTimeout, - clearInterval, - typeof clearImmediate == 'undefined' ? null : clearImmediate, - console, - Buffer, - process, - global].filter(Boolean); - - if (global.gc) { - knownGlobals.push(gc); - } - - if (global.DTRACE_HTTP_SERVER_RESPONSE) { - knownGlobals.push(DTRACE_HTTP_SERVER_RESPONSE); - knownGlobals.push(DTRACE_HTTP_SERVER_REQUEST); - knownGlobals.push(DTRACE_HTTP_CLIENT_RESPONSE); - knownGlobals.push(DTRACE_HTTP_CLIENT_REQUEST); - knownGlobals.push(DTRACE_NET_STREAM_END); - knownGlobals.push(DTRACE_NET_SERVER_CONNECTION); - knownGlobals.push(DTRACE_NET_SOCKET_READ); - knownGlobals.push(DTRACE_NET_SOCKET_WRITE); - } - if (global.COUNTER_NET_SERVER_CONNECTION) { - knownGlobals.push(COUNTER_NET_SERVER_CONNECTION); - knownGlobals.push(COUNTER_NET_SERVER_CONNECTION_CLOSE); - knownGlobals.push(COUNTER_HTTP_SERVER_REQUEST); - knownGlobals.push(COUNTER_HTTP_SERVER_RESPONSE); - knownGlobals.push(COUNTER_HTTP_CLIENT_REQUEST); - knownGlobals.push(COUNTER_HTTP_CLIENT_RESPONSE); - } - - if (global.ArrayBuffer) { - knownGlobals.push(ArrayBuffer); - knownGlobals.push(Int8Array); - knownGlobals.push(Uint8Array); - knownGlobals.push(Uint8ClampedArray); - knownGlobals.push(Int16Array); - knownGlobals.push(Uint16Array); - knownGlobals.push(Int32Array); - knownGlobals.push(Uint32Array); - knownGlobals.push(Float32Array); - knownGlobals.push(Float64Array); - knownGlobals.push(DataView); - } - - for (var x in global) { - var found = false; - - for (var y in knownGlobals) { - if (global[x] === knownGlobals[y]) { - found = true; - break; - } - } - - if (!found) { - console.error('Unknown global: %s', x); - assert.ok(false, 'Unknown global found'); - } - } -}); - - -var mustCallChecks = []; - - -function runCallChecks(exitCode) { - if (exitCode !== 0) return; - - var failed = mustCallChecks.filter(function(context) { - return context.actual !== context.expected; - }); - - failed.forEach(function(context) { - console.log('Mismatched %s function calls. Expected %d, actual %d.', - context.name, - context.expected, - context.actual); - console.log(context.stack.split('\n').slice(2).join('\n')); - }); - - if (failed.length) process.exit(1); -} - - -exports.mustCall = function(fn, expected) { - if (typeof expected !== 'number') expected = 1; - - var context = { - expected: expected, - actual: 0, - stack: (new Error).stack, - name: fn.name || '<anonymous>' - }; - - // add the exit listener only once to avoid listener leak warnings - if (mustCallChecks.length === 0) process.on('exit', runCallChecks); - - mustCallChecks.push(context); - - return function() { - context.actual++; - return fn.apply(this, arguments); - }; -}; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js deleted file mode 100644 index 869a4116..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// verify that the string decoder works getting 1 byte at a time, -// the whole buffer at once, and that both match the .toString(enc) -// result of the entire buffer. - -var assert = require('assert'); -var SD = require('../../').StringDecoder; -var encodings = ['base64', 'hex', 'utf8', 'utf16le', 'ucs2']; - -var bufs = [ '☃💩', 'asdf' ].map(function(b) { - return new Buffer(b); -}); - -// also test just arbitrary bytes from 0-15. -for (var i = 1; i <= 16; i++) { - var bytes = new Array(i).join('.').split('.').map(function(_, j) { - return j + 0x78; - }); - bufs.push(new Buffer(bytes)); -} - -encodings.forEach(testEncoding); - -console.log('ok'); - -function testEncoding(encoding) { - bufs.forEach(function(buf) { - testBuf(encoding, buf); - }); -} - -function testBuf(encoding, buf) { - console.error('# %s', encoding, buf); - - // write one byte at a time. - var s = new SD(encoding); - var res1 = ''; - for (var i = 0; i < buf.length; i++) { - res1 += s.write(buf.slice(i, i + 1)); - } - res1 += s.end(); - - // write the whole buffer at once. - var res2 = ''; - var s = new SD(encoding); - res2 += s.write(buf); - res2 += s.end(); - - // .toString() on the buffer - var res3 = buf.toString(encoding); - - console.log('expect=%j', res3); - assert.equal(res1, res3, 'one byte at a time should match toString'); - assert.equal(res2, res3, 'all bytes at once should match toString'); -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js deleted file mode 100644 index 7f69f7ea..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var common = require('../common'); -var assert = require('assert'); -var StringDecoder = require('../../').StringDecoder; -var decoder = new StringDecoder('utf8'); - - - -var buffer = new Buffer('$'); -assert.deepEqual('$', decoder.write(buffer)); - -buffer = new Buffer('¢'); -assert.deepEqual('', decoder.write(buffer.slice(0, 1))); -assert.deepEqual('¢', decoder.write(buffer.slice(1, 2))); - -buffer = new Buffer('€'); -assert.deepEqual('', decoder.write(buffer.slice(0, 1))); -assert.deepEqual('', decoder.write(buffer.slice(1, 2))); -assert.deepEqual('€', decoder.write(buffer.slice(2, 3))); - -buffer = new Buffer([0xF0, 0xA4, 0xAD, 0xA2]); -var s = ''; -s += decoder.write(buffer.slice(0, 1)); -s += decoder.write(buffer.slice(1, 2)); -s += decoder.write(buffer.slice(2, 3)); -s += decoder.write(buffer.slice(3, 4)); -assert.ok(s.length > 0); - -// CESU-8 -buffer = new Buffer('EDA0BDEDB18D', 'hex'); // THUMBS UP SIGN (in CESU-8) -var s = ''; -s += decoder.write(buffer.slice(0, 1)); -s += decoder.write(buffer.slice(1, 2)); -s += decoder.write(buffer.slice(2, 3)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(3, 4)); -s += decoder.write(buffer.slice(4, 5)); -s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 2)); -s += decoder.write(buffer.slice(2, 4)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(4, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 3)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(3, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 4)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(4, 5)); -s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 5)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 6)); -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - - -// UCS-2 -decoder = new StringDecoder('ucs2'); -buffer = new Buffer('ab', 'ucs2'); -assert.equal(decoder.write(buffer), 'ab'); // 2 complete chars -buffer = new Buffer('abc', 'ucs2'); -assert.equal(decoder.write(buffer.slice(0, 3)), 'a'); // 'a' and first of 'b' -assert.equal(decoder.write(buffer.slice(3, 6)), 'bc'); // second of 'b' and 'c' - - -// UTF-16LE -buffer = new Buffer('3DD84DDC', 'hex'); // THUMBS UP SIGN (in CESU-8) -var s = ''; -s += decoder.write(buffer.slice(0, 1)); -s += decoder.write(buffer.slice(1, 2)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(2, 3)); -s += decoder.write(buffer.slice(3, 4)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 2)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(2, 4)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 3)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(3, 4)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 4)); -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - - -// A mixed ascii and non-ascii string -// Test stolen from deps/v8/test/cctest/test-strings.cc -// U+02E4 -> CB A4 -// U+0064 -> 64 -// U+12E4 -> E1 8B A4 -// U+0030 -> 30 -// U+3045 -> E3 81 85 -var expected = '\u02e4\u0064\u12e4\u0030\u3045'; -var buffer = new Buffer([0xCB, 0xA4, 0x64, 0xE1, 0x8B, 0xA4, - 0x30, 0xE3, 0x81, 0x85]); -var charLengths = [0, 0, 1, 2, 2, 2, 3, 4, 4, 4, 5, 5]; - -// Split the buffer into 3 segments -// |----|------|-------| -// 0 i j buffer.length -// Scan through every possible 3 segment combination -// and make sure that the string is always parsed. -common.print('scanning '); -for (var j = 2; j < buffer.length; j++) { - for (var i = 1; i < j; i++) { - var decoder = new StringDecoder('utf8'); - - var sum = decoder.write(buffer.slice(0, i)); - - // just check that we've received the right amount - // after the first write - assert.equal(charLengths[i], sum.length); - - sum += decoder.write(buffer.slice(i, j)); - sum += decoder.write(buffer.slice(j, buffer.length)); - assert.equal(expected, sum); - common.print('.'); - } -} -console.log(' crayon!'); - diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/package.json deleted file mode 100644 index c9e268d0..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "readable-stream", - "version": "1.0.25", - "description": "An exploration of a new kind of readable streams for Node.js", - "main": "readable.js", - "dependencies": { - "string_decoder": "~0.10.x" - }, - "devDependencies": { - "tap": "~0.2.6" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/readable-stream" - }, - "keywords": [ - "readable", - "stream", - "pipe" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "BSD", - "readme": "# readable-stream\n\nA new class of streams for Node.js\n\nThis module provides the new Stream base classes introduced in Node\nv0.10, for use in Node v0.8. You can use it to have programs that\nhave to work with node v0.8, while being forward-compatible for v0.10\nand beyond. When you drop support for v0.8, you can remove this\nmodule, and only use the native streams.\n\nThis is almost exactly the same codebase as appears in Node v0.10.\nHowever:\n\n1. The exported object is actually the Readable class. Decorating the\n native `stream` module would be global pollution.\n2. In v0.10, you can safely use `base64` as an argument to\n `setEncoding` in Readable streams. However, in v0.8, the\n StringDecoder class has no `end()` method, which is problematic for\n Base64. So, don't use that, because it'll break and be weird.\n\nOther than that, the API is the same as `require('stream')` in v0.10,\nso the API docs are reproduced below.\n\n----------\n\n Stability: 2 - Unstable\n\nA stream is an abstract interface implemented by various objects in\nNode. For example a request to an HTTP server is a stream, as is\nstdout. Streams are readable, writable, or both. All streams are\ninstances of [EventEmitter][]\n\nYou can load the Stream base classes by doing `require('stream')`.\nThere are base classes provided for Readable streams, Writable\nstreams, Duplex streams, and Transform streams.\n\n## Compatibility\n\nIn earlier versions of Node, the Readable stream interface was\nsimpler, but also less powerful and less useful.\n\n* Rather than waiting for you to call the `read()` method, `'data'`\n events would start emitting immediately. If you needed to do some\n I/O to decide how to handle data, then you had to store the chunks\n in some kind of buffer so that they would not be lost.\n* The `pause()` method was advisory, rather than guaranteed. This\n meant that you still had to be prepared to receive `'data'` events\n even when the stream was in a paused state.\n\nIn Node v0.10, the Readable class described below was added. For\nbackwards compatibility with older Node programs, Readable streams\nswitch into \"old mode\" when a `'data'` event handler is added, or when\nthe `pause()` or `resume()` methods are called. The effect is that,\neven if you are not using the new `read()` method and `'readable'`\nevent, you no longer have to worry about losing `'data'` chunks.\n\nMost programs will continue to function normally. However, this\nintroduces an edge case in the following conditions:\n\n* No `'data'` event handler is added.\n* The `pause()` and `resume()` methods are never called.\n\nFor example, consider the following code:\n\n```javascript\n// WARNING! BROKEN!\nnet.createServer(function(socket) {\n\n // we add an 'end' method, but never consume the data\n socket.on('end', function() {\n // It will never get here.\n socket.end('I got your message (but didnt read it)\\n');\n });\n\n}).listen(1337);\n```\n\nIn versions of node prior to v0.10, the incoming message data would be\nsimply discarded. However, in Node v0.10 and beyond, the socket will\nremain paused forever.\n\nThe workaround in this situation is to call the `resume()` method to\ntrigger \"old mode\" behavior:\n\n```javascript\n// Workaround\nnet.createServer(function(socket) {\n\n socket.on('end', function() {\n socket.end('I got your message (but didnt read it)\\n');\n });\n\n // start the flow of data, discarding it.\n socket.resume();\n\n}).listen(1337);\n```\n\nIn addition to new Readable streams switching into old-mode, pre-v0.10\nstyle streams can be wrapped in a Readable class using the `wrap()`\nmethod.\n\n## Class: stream.Readable\n\n<!--type=class-->\n\nA `Readable Stream` has the following methods, members, and events.\n\nNote that `stream.Readable` is an abstract class designed to be\nextended with an underlying implementation of the `_read(size)`\nmethod. (See below.)\n\n### new stream.Readable([options])\n\n* `options` {Object}\n * `highWaterMark` {Number} The maximum number of bytes to store in\n the internal buffer before ceasing to read from the underlying\n resource. Default=16kb\n * `encoding` {String} If specified, then buffers will be decoded to\n strings using the specified encoding. Default=null\n * `objectMode` {Boolean} Whether this stream should behave\n as a stream of objects. Meaning that stream.read(n) returns\n a single value instead of a Buffer of size n\n\nIn classes that extend the Readable class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### readable.\\_read(size)\n\n* `size` {Number} Number of bytes to read asynchronously\n\nNote: **This function should NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Readable\nclass methods only.\n\nAll Readable stream implementations must provide a `_read` method\nto fetch data from the underlying resource.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\nWhen data is available, put it into the read queue by calling\n`readable.push(chunk)`. If `push` returns false, then you should stop\nreading. When `_read` is called again, you should start pushing more\ndata.\n\nThe `size` argument is advisory. Implementations where a \"read\" is a\nsingle call that returns data can use this to know how much data to\nfetch. Implementations where that is not relevant, such as TCP or\nTLS, may ignore this argument, and simply provide data whenever it\nbecomes available. There is no need, for example to \"wait\" until\n`size` bytes are available before calling `stream.push(chunk)`.\n\n### readable.push(chunk)\n\n* `chunk` {Buffer | null | String} Chunk of data to push into the read queue\n* return {Boolean} Whether or not more pushes should be performed\n\nNote: **This function should be called by Readable implementors, NOT\nby consumers of Readable subclasses.** The `_read()` function will not\nbe called again until at least one `push(chunk)` call is made. If no\ndata is available, then you MAY call `push('')` (an empty string) to\nallow a future `_read` call, without adding any data to the queue.\n\nThe `Readable` class works by putting data into a read queue to be\npulled out later by calling the `read()` method when the `'readable'`\nevent fires.\n\nThe `push()` method will explicitly insert some data into the read\nqueue. If it is called with `null` then it will signal the end of the\ndata.\n\nIn some cases, you may be wrapping a lower-level source which has some\nsort of pause/resume mechanism, and a data callback. In those cases,\nyou could wrap the low-level source object by doing something like\nthis:\n\n```javascript\n// source is an object with readStop() and readStart() methods,\n// and an `ondata` member that gets called when it has data, and\n// an `onend` member that gets called when the data is over.\n\nvar stream = new Readable();\n\nsource.ondata = function(chunk) {\n // if push() returns false, then we need to stop reading from source\n if (!stream.push(chunk))\n source.readStop();\n};\n\nsource.onend = function() {\n stream.push(null);\n};\n\n// _read will be called when the stream wants to pull more data in\n// the advisory size argument is ignored in this case.\nstream._read = function(n) {\n source.readStart();\n};\n```\n\n### readable.unshift(chunk)\n\n* `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue\n* return {Boolean} Whether or not more pushes should be performed\n\nThis is the corollary of `readable.push(chunk)`. Rather than putting\nthe data at the *end* of the read queue, it puts it at the *front* of\nthe read queue.\n\nThis is useful in certain use-cases where a stream is being consumed\nby a parser, which needs to \"un-consume\" some data that it has\noptimistically pulled out of the source.\n\n```javascript\n// A parser for a simple data protocol.\n// The \"header\" is a JSON object, followed by 2 \\n characters, and\n// then a message body.\n//\n// Note: This can be done more simply as a Transform stream. See below.\n\nfunction SimpleProtocol(source, options) {\n if (!(this instanceof SimpleProtocol))\n return new SimpleProtocol(options);\n\n Readable.call(this, options);\n this._inBody = false;\n this._sawFirstCr = false;\n\n // source is a readable stream, such as a socket or file\n this._source = source;\n\n var self = this;\n source.on('end', function() {\n self.push(null);\n });\n\n // give it a kick whenever the source is readable\n // read(0) will not consume any bytes\n source.on('readable', function() {\n self.read(0);\n });\n\n this._rawHeader = [];\n this.header = null;\n}\n\nSimpleProtocol.prototype = Object.create(\n Readable.prototype, { constructor: { value: SimpleProtocol }});\n\nSimpleProtocol.prototype._read = function(n) {\n if (!this._inBody) {\n var chunk = this._source.read();\n\n // if the source doesn't have data, we don't have data yet.\n if (chunk === null)\n return this.push('');\n\n // check if the chunk has a \\n\\n\n var split = -1;\n for (var i = 0; i < chunk.length; i++) {\n if (chunk[i] === 10) { // '\\n'\n if (this._sawFirstCr) {\n split = i;\n break;\n } else {\n this._sawFirstCr = true;\n }\n } else {\n this._sawFirstCr = false;\n }\n }\n\n if (split === -1) {\n // still waiting for the \\n\\n\n // stash the chunk, and try again.\n this._rawHeader.push(chunk);\n this.push('');\n } else {\n this._inBody = true;\n var h = chunk.slice(0, split);\n this._rawHeader.push(h);\n var header = Buffer.concat(this._rawHeader).toString();\n try {\n this.header = JSON.parse(header);\n } catch (er) {\n this.emit('error', new Error('invalid simple protocol data'));\n return;\n }\n // now, because we got some extra data, unshift the rest\n // back into the read queue so that our consumer will see it.\n var b = chunk.slice(split);\n this.unshift(b);\n\n // and let them know that we are done parsing the header.\n this.emit('header', this.header);\n }\n } else {\n // from there on, just provide the data to our consumer.\n // careful not to push(null), since that would indicate EOF.\n var chunk = this._source.read();\n if (chunk) this.push(chunk);\n }\n};\n\n// Usage:\nvar parser = new SimpleProtocol(source);\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.\n```\n\n### readable.wrap(stream)\n\n* `stream` {Stream} An \"old style\" readable stream\n\nIf you are using an older Node library that emits `'data'` events and\nhas a `pause()` method that is advisory only, then you can use the\n`wrap()` method to create a Readable stream that uses the old stream\nas its data source.\n\nFor example:\n\n```javascript\nvar OldReader = require('./old-api-module.js').OldReader;\nvar oreader = new OldReader;\nvar Readable = require('stream').Readable;\nvar myReader = new Readable().wrap(oreader);\n\nmyReader.on('readable', function() {\n myReader.read(); // etc.\n});\n```\n\n### Event: 'readable'\n\nWhen there is data ready to be consumed, this event will fire.\n\nWhen this event emits, call the `read()` method to consume the data.\n\n### Event: 'end'\n\nEmitted when the stream has received an EOF (FIN in TCP terminology).\nIndicates that no more `'data'` events will happen. If the stream is\nalso writable, it may be possible to continue writing.\n\n### Event: 'data'\n\nThe `'data'` event emits either a `Buffer` (by default) or a string if\n`setEncoding()` was used.\n\nNote that adding a `'data'` event listener will switch the Readable\nstream into \"old mode\", where data is emitted as soon as it is\navailable, rather than waiting for you to call `read()` to consume it.\n\n### Event: 'error'\n\nEmitted if there was an error receiving data.\n\n### Event: 'close'\n\nEmitted when the underlying resource (for example, the backing file\ndescriptor) has been closed. Not all streams will emit this.\n\n### readable.setEncoding(encoding)\n\nMakes the `'data'` event emit a string instead of a `Buffer`. `encoding`\ncan be `'utf8'`, `'utf16le'` (`'ucs2'`), `'ascii'`, or `'hex'`.\n\nThe encoding can also be set by specifying an `encoding` field to the\nconstructor.\n\n### readable.read([size])\n\n* `size` {Number | null} Optional number of bytes to read.\n* Return: {Buffer | String | null}\n\nNote: **This function SHOULD be called by Readable stream users.**\n\nCall this method to consume data once the `'readable'` event is\nemitted.\n\nThe `size` argument will set a minimum number of bytes that you are\ninterested in. If not set, then the entire content of the internal\nbuffer is returned.\n\nIf there is no data to consume, or if there are fewer bytes in the\ninternal buffer than the `size` argument, then `null` is returned, and\na future `'readable'` event will be emitted when more is available.\n\nCalling `stream.read(0)` will always return `null`, and will trigger a\nrefresh of the internal buffer, but otherwise be a no-op.\n\n### readable.pipe(destination, [options])\n\n* `destination` {Writable Stream}\n* `options` {Object} Optional\n * `end` {Boolean} Default=true\n\nConnects this readable stream to `destination` WriteStream. Incoming\ndata on this stream gets written to `destination`. Properly manages\nback-pressure so that a slow destination will not be overwhelmed by a\nfast readable stream.\n\nThis function returns the `destination` stream.\n\nFor example, emulating the Unix `cat` command:\n\n process.stdin.pipe(process.stdout);\n\nBy default `end()` is called on the destination when the source stream\nemits `end`, so that `destination` is no longer writable. Pass `{ end:\nfalse }` as `options` to keep the destination stream open.\n\nThis keeps `writer` open so that \"Goodbye\" can be written at the\nend.\n\n reader.pipe(writer, { end: false });\n reader.on(\"end\", function() {\n writer.end(\"Goodbye\\n\");\n });\n\nNote that `process.stderr` and `process.stdout` are never closed until\nthe process exits, regardless of the specified options.\n\n### readable.unpipe([destination])\n\n* `destination` {Writable Stream} Optional\n\nUndo a previously established `pipe()`. If no destination is\nprovided, then all previously established pipes are removed.\n\n### readable.pause()\n\nSwitches the readable stream into \"old mode\", where data is emitted\nusing a `'data'` event rather than being buffered for consumption via\nthe `read()` method.\n\nCeases the flow of data. No `'data'` events are emitted while the\nstream is in a paused state.\n\n### readable.resume()\n\nSwitches the readable stream into \"old mode\", where data is emitted\nusing a `'data'` event rather than being buffered for consumption via\nthe `read()` method.\n\nResumes the incoming `'data'` events after a `pause()`.\n\n\n## Class: stream.Writable\n\n<!--type=class-->\n\nA `Writable` Stream has the following methods, members, and events.\n\nNote that `stream.Writable` is an abstract class designed to be\nextended with an underlying implementation of the\n`_write(chunk, encoding, cb)` method. (See below.)\n\n### new stream.Writable([options])\n\n* `options` {Object}\n * `highWaterMark` {Number} Buffer level when `write()` starts\n returning false. Default=16kb\n * `decodeStrings` {Boolean} Whether or not to decode strings into\n Buffers before passing them to `_write()`. Default=true\n\nIn classes that extend the Writable class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### writable.\\_write(chunk, encoding, callback)\n\n* `chunk` {Buffer | String} The chunk to be written. Will always\n be a buffer unless the `decodeStrings` option was set to `false`.\n* `encoding` {String} If the chunk is a string, then this is the\n encoding type. Ignore chunk is a buffer. Note that chunk will\n **always** be a buffer unless the `decodeStrings` option is\n explicitly set to `false`.\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done processing the supplied chunk.\n\nAll Writable stream implementations must provide a `_write` method to\nsend data to the underlying resource.\n\nNote: **This function MUST NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Writable\nclass methods only.\n\nCall the callback using the standard `callback(error)` pattern to\nsignal that the write completed successfully or with an error.\n\nIf the `decodeStrings` flag is set in the constructor options, then\n`chunk` may be a string rather than a Buffer, and `encoding` will\nindicate the sort of string that it is. This is to support\nimplementations that have an optimized handling for certain string\ndata encodings. If you do not explicitly set the `decodeStrings`\noption to `false`, then you can safely ignore the `encoding` argument,\nand assume that `chunk` will always be a Buffer.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n\n### writable.write(chunk, [encoding], [callback])\n\n* `chunk` {Buffer | String} Data to be written\n* `encoding` {String} Optional. If `chunk` is a string, then encoding\n defaults to `'utf8'`\n* `callback` {Function} Optional. Called when this chunk is\n successfully written.\n* Returns {Boolean}\n\nWrites `chunk` to the stream. Returns `true` if the data has been\nflushed to the underlying resource. Returns `false` to indicate that\nthe buffer is full, and the data will be sent out in the future. The\n`'drain'` event will indicate when the buffer is empty again.\n\nThe specifics of when `write()` will return false, is determined by\nthe `highWaterMark` option provided to the constructor.\n\n### writable.end([chunk], [encoding], [callback])\n\n* `chunk` {Buffer | String} Optional final data to be written\n* `encoding` {String} Optional. If `chunk` is a string, then encoding\n defaults to `'utf8'`\n* `callback` {Function} Optional. Called when the final chunk is\n successfully written.\n\nCall this method to signal the end of the data being written to the\nstream.\n\n### Event: 'drain'\n\nEmitted when the stream's write queue empties and it's safe to write\nwithout buffering again. Listen for it when `stream.write()` returns\n`false`.\n\n### Event: 'close'\n\nEmitted when the underlying resource (for example, the backing file\ndescriptor) has been closed. Not all streams will emit this.\n\n### Event: 'finish'\n\nWhen `end()` is called and there are no more chunks to write, this\nevent is emitted.\n\n### Event: 'pipe'\n\n* `source` {Readable Stream}\n\nEmitted when the stream is passed to a readable stream's pipe method.\n\n### Event 'unpipe'\n\n* `source` {Readable Stream}\n\nEmitted when a previously established `pipe()` is removed using the\nsource Readable stream's `unpipe()` method.\n\n## Class: stream.Duplex\n\n<!--type=class-->\n\nA \"duplex\" stream is one that is both Readable and Writable, such as a\nTCP socket connection.\n\nNote that `stream.Duplex` is an abstract class designed to be\nextended with an underlying implementation of the `_read(size)`\nand `_write(chunk, encoding, callback)` methods as you would with a Readable or\nWritable stream class.\n\nSince JavaScript doesn't have multiple prototypal inheritance, this\nclass prototypally inherits from Readable, and then parasitically from\nWritable. It is thus up to the user to implement both the lowlevel\n`_read(n)` method as well as the lowlevel `_write(chunk, encoding, cb)` method\non extension duplex classes.\n\n### new stream.Duplex(options)\n\n* `options` {Object} Passed to both Writable and Readable\n constructors. Also has the following fields:\n * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then\n the stream will automatically end the readable side when the\n writable side ends and vice versa.\n\nIn classes that extend the Duplex class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n## Class: stream.Transform\n\nA \"transform\" stream is a duplex stream where the output is causally\nconnected in some way to the input, such as a zlib stream or a crypto\nstream.\n\nThere is no requirement that the output be the same size as the input,\nthe same number of chunks, or arrive at the same time. For example, a\nHash stream will only ever have a single chunk of output which is\nprovided when the input is ended. A zlib stream will either produce\nmuch smaller or much larger than its input.\n\nRather than implement the `_read()` and `_write()` methods, Transform\nclasses must implement the `_transform()` method, and may optionally\nalso implement the `_flush()` method. (See below.)\n\n### new stream.Transform([options])\n\n* `options` {Object} Passed to both Writable and Readable\n constructors.\n\nIn classes that extend the Transform class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### transform.\\_transform(chunk, encoding, callback)\n\n* `chunk` {Buffer | String} The chunk to be transformed. Will always\n be a buffer unless the `decodeStrings` option was set to `false`.\n* `encoding` {String} If the chunk is a string, then this is the\n encoding type. (Ignore if `decodeStrings` chunk is a buffer.)\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done processing the supplied chunk.\n\nNote: **This function MUST NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Transform\nclass methods only.\n\nAll Transform stream implementations must provide a `_transform`\nmethod to accept input and produce output.\n\n`_transform` should do whatever has to be done in this specific\nTransform class, to handle the bytes being written, and pass them off\nto the readable portion of the interface. Do asynchronous I/O,\nprocess things, and so on.\n\nCall `transform.push(outputChunk)` 0 or more times to generate output\nfrom this input chunk, depending on how much data you want to output\nas a result of this chunk.\n\nCall the callback function only when the current chunk is completely\nconsumed. Note that there may or may not be output as a result of any\nparticular input chunk.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n### transform.\\_flush(callback)\n\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done flushing any remaining data.\n\nNote: **This function MUST NOT be called directly.** It MAY be implemented\nby child classes, and if so, will be called by the internal Transform\nclass methods only.\n\nIn some cases, your transform operation may need to emit a bit more\ndata at the end of the stream. For example, a `Zlib` compression\nstream will store up some internal state so that it can optimally\ncompress the output. At the end, however, it needs to do the best it\ncan with what is left, so that the data will be complete.\n\nIn those cases, you can implement a `_flush` method, which will be\ncalled at the very end, after all the written data is consumed, but\nbefore emitting `end` to signal the end of the readable side. Just\nlike with `_transform`, call `transform.push(chunk)` zero or more\ntimes, as appropriate, and call `callback` when the flush operation is\ncomplete.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n### Example: `SimpleProtocol` parser\n\nThe example above of a simple protocol parser can be implemented much\nmore simply by using the higher level `Transform` stream class.\n\nIn this example, rather than providing the input as an argument, it\nwould be piped into the parser, which is a more idiomatic Node stream\napproach.\n\n```javascript\nfunction SimpleProtocol(options) {\n if (!(this instanceof SimpleProtocol))\n return new SimpleProtocol(options);\n\n Transform.call(this, options);\n this._inBody = false;\n this._sawFirstCr = false;\n this._rawHeader = [];\n this.header = null;\n}\n\nSimpleProtocol.prototype = Object.create(\n Transform.prototype, { constructor: { value: SimpleProtocol }});\n\nSimpleProtocol.prototype._transform = function(chunk, encoding, done) {\n if (!this._inBody) {\n // check if the chunk has a \\n\\n\n var split = -1;\n for (var i = 0; i < chunk.length; i++) {\n if (chunk[i] === 10) { // '\\n'\n if (this._sawFirstCr) {\n split = i;\n break;\n } else {\n this._sawFirstCr = true;\n }\n } else {\n this._sawFirstCr = false;\n }\n }\n\n if (split === -1) {\n // still waiting for the \\n\\n\n // stash the chunk, and try again.\n this._rawHeader.push(chunk);\n } else {\n this._inBody = true;\n var h = chunk.slice(0, split);\n this._rawHeader.push(h);\n var header = Buffer.concat(this._rawHeader).toString();\n try {\n this.header = JSON.parse(header);\n } catch (er) {\n this.emit('error', new Error('invalid simple protocol data'));\n return;\n }\n // and let them know that we are done parsing the header.\n this.emit('header', this.header);\n\n // now, because we got some extra data, emit this first.\n this.push(b);\n }\n } else {\n // from there on, just provide the data to our consumer as-is.\n this.push(b);\n }\n done();\n};\n\nvar parser = new SimpleProtocol();\nsource.pipe(parser)\n\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.\n```\n\n\n## Class: stream.PassThrough\n\nThis is a trivial implementation of a `Transform` stream that simply\npasses the input bytes across to the output. Its purpose is mainly\nfor examples and testing, but there are occasionally use cases where\nit can come in handy.\n\n\n[EventEmitter]: events.html#events_class_events_eventemitter\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/readable-stream/issues" - }, - "homepage": "https://github.com/isaacs/readable-stream", - "_id": "readable-stream@1.0.25", - "dist": { - "shasum": "3d234b55fd2a25db8327618f088e50a32044df50" - }, - "_from": "readable-stream@~1.0.17", - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.25.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/passthrough.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a5..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/readable.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/readable.js deleted file mode 100644 index 4d1ddfc7..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,6 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/transform.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f07..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/writable.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efdf..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/.npmignore b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/LICENCE b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/LICENCE deleted file mode 100644 index a23e08a8..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 Raynos. - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/Makefile b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/Makefile deleted file mode 100644 index d583fcf4..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -browser: - node ./support/compile - -.PHONY: browser \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/README.md deleted file mode 100644 index 389adae3..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# xtend - -[![browser support][3]][4] - -Extend like a boss - -xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence. - -## Examples - -```js -var extend = require("xtend") - -var combination = extend({ - a: "a" -}, { - b: "b" -}) -// { a: "a", b: "b" } -``` - - -## MIT Licenced - - - [3]: http://ci.testling.com/Raynos/xtend.png - [4]: http://ci.testling.com/Raynos/xtend diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/has-keys.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/has-keys.js deleted file mode 100644 index 62391e78..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/has-keys.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = hasKeys - -function hasKeys(source) { - return source !== null && - (typeof source === "object" || - typeof source === "function") -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/index.js deleted file mode 100644 index 20937d19..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/index.js +++ /dev/null @@ -1,25 +0,0 @@ -var Keys = require("object-keys") -var hasKeys = require("./has-keys") - -module.exports = extend - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - if (!hasKeys(source)) { - continue - } - - var keys = Keys(source) - - for (var j = 0; j < keys.length; j++) { - var name = keys[j] - target[name] = source[name] - } - } - - return target -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/mutable.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/mutable.js deleted file mode 100644 index 17454ae4..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/mutable.js +++ /dev/null @@ -1,25 +0,0 @@ -var Keys = require("object-keys") -var hasKeys = require("./has-keys") - -module.exports = extend - -function extend(target) { - var sources = [].slice.call(arguments, 1) - - for (var i = 0; i < sources.length; i++) { - var source = sources[i] - - if (!hasKeys(source)) { - continue - } - - var keys = Keys(source) - - for (var j = 0; j < keys.length; j++) { - var name = keys[j] - target[name] = source[name] - } - } - - return target -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml deleted file mode 100644 index 60d00ce1..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.8" - - "0.6" diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md deleted file mode 100644 index ab32d0ad..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md +++ /dev/null @@ -1,39 +0,0 @@ -#object-keys <sup>[![Version Badge][2]][1]</sup> - -[![Build Status][3]][4] [![dependency status][5]][6] - -[![browser support][7]][8] - -An Object.keys shim. Uses Object.keys if available. - -## Example - -```js -var keys = require('object-keys'); -var assert = require('assert'); -var obj = { - a: true, - b: true, - c: true -}; - -assert.equal(keys(obj), ['a', 'b', 'c']); -``` - -## Source -Implementation taken directly from [es5-shim]([9]), with modifications, including from [lodash]([10]). - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[1]: https://npmjs.org/package/object-keys -[2]: http://vb.teelaun.ch/ljharb/object-keys.svg -[3]: https://travis-ci.org/ljharb/object-keys.png -[4]: https://travis-ci.org/ljharb/object-keys -[5]: https://david-dm.org/ljharb/object-keys.png -[6]: https://david-dm.org/ljharb/object-keys -[7]: https://ci.testling.com/ljharb/object-keys.png -[8]: https://ci.testling.com/ljharb/object-keys -[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589 -[10]: https://github.com/bestiejs/lodash - diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js deleted file mode 100644 index db32d458..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js +++ /dev/null @@ -1,40 +0,0 @@ -var hasOwn = Object.prototype.hasOwnProperty; -var toString = Object.prototype.toString; - -var isFunction = function (fn) { - var isFunc = (typeof fn === 'function' && !(fn instanceof RegExp)) || toString.call(fn) === '[object Function]'; - if (!isFunc && typeof window !== 'undefined') { - isFunc = fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt; - } - return isFunc; -}; - -module.exports = function forEach(obj, fn) { - if (!isFunction(fn)) { - throw new TypeError('iterator must be a function'); - } - var i, k, - isString = typeof obj === 'string', - l = obj.length, - context = arguments.length > 2 ? arguments[2] : null; - if (l === +l) { - for (i = 0; i < l; i++) { - if (context === null) { - fn(isString ? obj.charAt(i) : obj[i], i, obj); - } else { - fn.call(context, isString ? obj.charAt(i) : obj[i], i, obj); - } - } - } else { - for (k in obj) { - if (hasOwn.call(obj, k)) { - if (context === null) { - fn(obj[k], k, obj); - } else { - fn.call(context, obj[k], k, obj); - } - } - } - } -}; - diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js deleted file mode 100644 index f5b24b6d..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js +++ /dev/null @@ -1,2 +0,0 @@ -module.exports = Object.keys || require('./shim'); - diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js deleted file mode 100644 index 74a09897..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js +++ /dev/null @@ -1,16 +0,0 @@ -var toString = Object.prototype.toString; - -module.exports = function isArguments(value) { - var str = toString.call(value); - var isArguments = str === '[object Arguments]'; - if (!isArguments) { - isArguments = str !== '[object Array]' - && value !== null - && typeof value === 'object' - && typeof value.length === 'number' - && value.length >= 0 - && toString.call(value.callee) === '[object Function]'; - } - return isArguments; -}; - diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json deleted file mode 100644 index 9dfda8dc..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "object-keys", - "version": "0.4.0", - "author": { - "name": "Jordan Harband" - }, - "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/kriskowal/es5-shim", - "license": "MIT", - "main": "index.js", - "scripts": { - "test": "node test/index.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/ljharb/object-keys.git" - }, - "keywords": [ - "Object.keys", - "keys", - "ES5", - "shim" - ], - "dependencies": {}, - "devDependencies": { - "foreach": "~2.0.3", - "is": "~0.2.6", - "tape": "~1.0.4", - "indexof": "~0.0.1" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "readme": "#object-keys <sup>[![Version Badge][2]][1]</sup>\n\n[![Build Status][3]][4] [![dependency status][5]][6]\n\n[![browser support][7]][8]\n\nAn Object.keys shim. Uses Object.keys if available.\n\n## Example\n\n```js\nvar keys = require('object-keys');\nvar assert = require('assert');\nvar obj = {\n\ta: true,\n\tb: true,\n\tc: true\n};\n\nassert.equal(keys(obj), ['a', 'b', 'c']);\n```\n\n## Source\nImplementation taken directly from [es5-shim]([9]), with modifications, including from [lodash]([10]).\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[1]: https://npmjs.org/package/object-keys\n[2]: http://vb.teelaun.ch/ljharb/object-keys.svg\n[3]: https://travis-ci.org/ljharb/object-keys.png\n[4]: https://travis-ci.org/ljharb/object-keys\n[5]: https://david-dm.org/ljharb/object-keys.png\n[6]: https://david-dm.org/ljharb/object-keys\n[7]: https://ci.testling.com/ljharb/object-keys.png\n[8]: https://ci.testling.com/ljharb/object-keys\n[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589\n[10]: https://github.com/bestiejs/lodash\n\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/ljharb/object-keys/issues" - }, - "homepage": "https://github.com/ljharb/object-keys", - "_id": "object-keys@0.4.0", - "dist": { - "shasum": "28a6aae7428dd2c3a92f3d95f21335dd204e0336" - }, - "_from": "object-keys@~0.4.0", - "_resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js deleted file mode 100644 index b88421be..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js +++ /dev/null @@ -1,62 +0,0 @@ -(function () { - "use strict"; - - // modified from https://github.com/kriskowal/es5-shim - var has = Object.prototype.hasOwnProperty, - toString = Object.prototype.toString, - forEach = require('./foreach'), - isArgs = require('./isArguments'), - hasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'), - hasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype'), - dontEnums = [ - "toString", - "toLocaleString", - "valueOf", - "hasOwnProperty", - "isPrototypeOf", - "propertyIsEnumerable", - "constructor" - ], - keysShim; - - keysShim = function keys(object) { - var isObject = object !== null && typeof object === 'object', - isFunction = toString.call(object) === '[object Function]', - isArguments = isArgs(object), - theKeys = []; - - if (!isObject && !isFunction && !isArguments) { - throw new TypeError("Object.keys called on a non-object"); - } - - if (isArguments) { - forEach(object, function (value) { - theKeys.push(value); - }); - } else { - var name, - skipProto = hasProtoEnumBug && isFunction; - - for (name in object) { - if (!(skipProto && name === 'prototype') && has.call(object, name)) { - theKeys.push(name); - } - } - } - - if (hasDontEnumBug) { - var ctor = object.constructor, - skipConstructor = ctor && ctor.prototype === object; - - forEach(dontEnums, function (dontEnum) { - if (!(skipConstructor && dontEnum === 'constructor') && has.call(object, dontEnum)) { - theKeys.push(dontEnum); - } - }); - } - return theKeys; - }; - - module.exports = keysShim; -}()); - diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js deleted file mode 100644 index f29f065a..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js +++ /dev/null @@ -1,156 +0,0 @@ -var test = require('tape'); -var forEach = require('../foreach.js'); - -test('second argument: iterator', function (t) { - var arr = []; - t.throws(function () { forEach(arr); }, TypeError, 'undefined is not a function'); - t.throws(function () { forEach(arr, null); }, TypeError, 'null is not a function'); - t.throws(function () { forEach(arr, ''); }, TypeError, 'string is not a function'); - t.throws(function () { forEach(arr, /a/); }, TypeError, 'regex is not a function'); - t.throws(function () { forEach(arr, true); }, TypeError, 'true is not a function'); - t.throws(function () { forEach(arr, false); }, TypeError, 'false is not a function'); - t.throws(function () { forEach(arr, NaN); }, TypeError, 'NaN is not a function'); - t.throws(function () { forEach(arr, 42); }, TypeError, '42 is not a function'); - t.doesNotThrow(function () { forEach(arr, function () {}); }, 'function is a function'); - t.doesNotThrow(function () { forEach(arr, setTimeout); }, 'setTimeout is a function'); - if (typeof window !== 'undefined') { - t.doesNotThrow(function () { forEach(arr, window.alert); }, 'alert is a function'); - } - t.end(); -}); - -test('array', function (t) { - var arr = [1, 2, 3]; - - t.test('iterates over every item', function (st) { - var index = 0; - forEach(arr, function () { index += 1; }); - st.equal(index, arr.length, 'iterates ' + arr.length + ' times'); - st.end(); - }); - - t.test('first iterator argument', function (st) { - var index = 0; - st.plan(arr.length); - forEach(arr, function (item) { - st.equal(arr[index], item, 'item ' + index + ' is passed as first argument'); - index += 1; - }); - st.end(); - }); - - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(arr.length); - forEach(arr, function (item, index) { - st.equal(counter, index, 'index ' + index + ' is passed as second argument'); - counter += 1; - }); - st.end(); - }); - - t.test('third iterator argument', function (st) { - st.plan(arr.length); - forEach(arr, function (item, index, array) { - st.deepEqual(arr, array, 'array is passed as third argument'); - }); - st.end(); - }); - - t.test('context argument', function (st) { - var context = {}; - st.plan(arr.length); - forEach(arr, function () { - st.equal(this, context, '"this" is the passed context'); - }, context); - st.end(); - }); - - t.end(); -}); - -test('object', function (t) { - var obj = { - a: 1, - b: 2, - c: 3 - }; - var keys = ['a', 'b', 'c']; - - var F = function () { - this.a = 1; - this.b = 2; - }; - F.prototype.c = 3; - var fKeys = ['a', 'b']; - - t.test('iterates over every object literal key', function (st) { - var counter = 0; - forEach(obj, function () { counter += 1; }); - st.equal(counter, keys.length, 'iterated ' + counter + ' times'); - st.end(); - }); - - t.test('iterates only over own keys', function (st) { - var counter = 0; - forEach(new F(), function () { counter += 1; }); - st.equal(counter, fKeys.length, 'iterated ' + fKeys.length + ' times'); - st.end(); - }); - - t.test('first iterator argument', function (st) { - var index = 0; - st.plan(keys.length); - forEach(obj, function (item) { - st.equal(obj[keys[index]], item, 'item at key ' + keys[index] + ' is passed as first argument'); - index += 1; - }); - st.end(); - }); - - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(keys.length); - forEach(obj, function (item, key) { - st.equal(keys[counter], key, 'key ' + key + ' is passed as second argument'); - counter += 1; - }); - st.end(); - }); - - t.test('third iterator argument', function (st) { - st.plan(keys.length); - forEach(obj, function (item, key, object) { - st.deepEqual(obj, object, 'object is passed as third argument'); - }); - st.end(); - }); - - t.test('context argument', function (st) { - var context = {}; - st.plan(1); - forEach({foo: 'bar'}, function () { - st.equal(this, context, '"this" is the passed context'); - }, context); - st.end(); - }); - - t.end(); -}); - - -test('string', function (t) { - var str = 'str'; - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(str.length * 2 + 1); - forEach(str, function (item, index) { - st.equal(counter, index, 'index ' + index + ' is passed as second argument'); - st.equal(str.charAt(index), item); - counter += 1; - }); - st.equal(counter, str.length, 'iterates ' + str.length + ' times'); - }); - t.end(); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js deleted file mode 100644 index 8b77b1fc..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js +++ /dev/null @@ -1,6 +0,0 @@ - -require('./foreach'); -require('./isArguments'); - -require('./shim'); - diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js deleted file mode 100644 index 62a07c2d..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js +++ /dev/null @@ -1,10 +0,0 @@ -var test = require('tape'); -var isArguments = require('../isArguments'); - -test('is.arguments', function (t) { - t.notOk(isArguments([]), 'array is not arguments'); - (function () { t.ok(isArguments(arguments), 'arguments is arguments'); }()); - (function () { t.notOk(isArguments(Array.prototype.slice.call(arguments)), 'sliced arguments is not arguments'); }()); - t.end(); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js deleted file mode 100644 index 9d932712..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js +++ /dev/null @@ -1,134 +0,0 @@ -var test = require('tape'); -var shimmedKeys = require('../index.js'); -var is = require('is'); -var keys = require('../shim.js'); -var forEach = require('foreach'); -var indexOf = require('indexof'); - -var obj = { - "str": "boz", - "obj": {}, - "arr": [], - "bool": true, - "num": 42, - "aNull": null, - "undef": undefined -}; -var objKeys = ['str', 'obj', 'arr', 'bool', 'num', 'aNull', 'undef']; - -test('exports a function', function (t) { - if (Object.keys) { - t.equal(Object.keys, shimmedKeys, 'Object.keys is supported and exported'); - } else { - t.equal(keys, shimmedKeys, 'Object.keys is not supported; shim is exported'); - } - t.end(); -}); - -test('working with actual shim', function (t) { - t.notEqual(Object.keys, keys, 'keys shim is not native Object.keys'); - t.end(); -}); - -test('works with an object literal', function (t) { - var theKeys = keys(obj); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, objKeys, 'Object has expected keys'); - t.end(); -}); - -test('works with an array', function (t) { - var arr = [1, 2, 3]; - var theKeys = keys(arr); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, ['0', '1', '2'], 'Array has expected keys'); - t.end(); -}); - -test('works with a function', function (t) { - var foo = function () {}; - foo.a = true; - - t.doesNotThrow(function () { return keys(foo); }, 'does not throw an error'); - t.deepEqual(keys(foo), ['a'], 'returns expected keys'); - t.end(); -}); - -test('returns names which are own properties', function (t) { - forEach(keys(obj), function (name) { - t.equal(obj.hasOwnProperty(name), true, name + ' should be returned'); - }); - t.end(); -}); - -test('returns names which are enumerable', function (t) { - var k, loopedValues = []; - for (k in obj) { - loopedValues.push(k); - } - forEach(keys(obj), function (name) { - t.notEqual(indexOf(loopedValues, name), -1, name + ' is not enumerable'); - }); - t.end(); -}); - -test('throws an error for a non-object', function (t) { - t.throws( - function () { return keys(42); }, - new TypeError('Object.keys called on a non-object'), - 'throws on a non-object' - ); - t.end(); -}); - -test('works with an object instance', function (t) { - var Prototype = function () {}; - Prototype.prototype.foo = true; - var obj = new Prototype(); - obj.bar = true; - var theKeys = keys(obj); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, ['bar'], 'Instance has expected keys'); - t.end(); -}); - -test('works in iOS 5 mobile Safari', function (t) { - var Foo = function () {}; - Foo.a = function () {}; - - // the bug is keys(Foo) => ['a', 'prototype'] instead of ['a'] - t.deepEqual(keys(Foo), ['a'], 'has expected keys'); - t.end(); -}); - -test('works in environments with the dontEnum bug (IE < 9)', function (t) { - var Foo = function () {}; - Foo.prototype.a = function () {}; - - // the bug is keys(Foo.prototype) => ['a', 'constructor'] instead of ['a'] - t.deepEqual(keys(Foo.prototype), ['a'], 'has expected keys'); - t.end(); -}); - -test('shadowed properties', function (t) { - var shadowedProps = [ - 'dummyControlProp', /* just to be sure */ - 'constructor', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'toLocaleString', - 'toString', - 'valueOf' - ]; - shadowedProps.sort(); - var shadowedObject = {}; - forEach(shadowedProps, function (value, index) { - shadowedObject[value] = index; - }); - var shadowedObjectKeys = keys(shadowedObject); - shadowedObjectKeys.sort(); - t.deepEqual(shadowedObjectKeys, shadowedProps, 'troublesome shadowed properties are keys of object literals'); - t.end(); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/package.json deleted file mode 100644 index a761197d..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "xtend", - "version": "2.1.2", - "description": "extend like a boss", - "keywords": [ - "extend", - "merge", - "options", - "opts", - "object", - "array" - ], - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Raynos/xtend.git" - }, - "main": "index", - "scripts": { - "test": "node test" - }, - "dependencies": { - "object-keys": "~0.4.0" - }, - "devDependencies": { - "tape": "~1.1.0" - }, - "homepage": "https://github.com/Raynos/xtend", - "contributors": [ - { - "name": "Jake Verbaten" - }, - { - "name": "Matt Esch" - } - ], - "bugs": { - "url": "https://github.com/Raynos/xtend/issues", - "email": "raynos2@gmail.com" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/raynos/xtend/raw/master/LICENSE" - } - ], - "testling": { - "files": "test.js", - "browsers": [ - "ie/7..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "engines": { - "node": ">=0.4" - }, - "readme": "# xtend\n\n[![browser support][3]][4]\n\nExtend like a boss\n\nxtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence.\n\n## Examples\n\n```js\nvar extend = require(\"xtend\")\n\nvar combination = extend({\n a: \"a\"\n}, {\n b: \"b\"\n})\n// { a: \"a\", b: \"b\" }\n```\n\n\n## MIT Licenced\n\n\n [3]: http://ci.testling.com/Raynos/xtend.png\n [4]: http://ci.testling.com/Raynos/xtend\n", - "readmeFilename": "README.md", - "_id": "xtend@2.1.2", - "dist": { - "shasum": "5e8f75d1b0d9ca976fee0f1aa88f80c7619210d5" - }, - "_from": "xtend@~2.1.1", - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/test.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/test.js deleted file mode 100644 index 3369d796..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/node_modules/xtend/test.js +++ /dev/null @@ -1,63 +0,0 @@ -var test = require("tape") -var extend = require("./") -var mutableExtend = require("./mutable") - -test("merge", function(assert) { - var a = { a: "foo" } - var b = { b: "bar" } - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("replace", function(assert) { - var a = { a: "foo" } - var b = { a: "bar" } - - assert.deepEqual(extend(a, b), { a: "bar" }) - assert.end() -}) - -test("undefined", function(assert) { - var a = { a: undefined } - var b = { b: "foo" } - - assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) - assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) - assert.end() -}) - -test("handle 0", function(assert) { - var a = { a: "default" } - var b = { a: 0 } - - assert.deepEqual(extend(a, b), { a: 0 }) - assert.deepEqual(extend(b, a), { a: "default" }) - assert.end() -}) - -test("is immutable", function (assert) { - var record = {} - - extend(record, { foo: "bar" }) - assert.equal(record.foo, undefined) - assert.end() -}) - -test("null as argument", function (assert) { - var a = { foo: "bar" } - var b = null - var c = void 0 - - assert.deepEqual(extend(b, a, c), { foo: "bar" }) - assert.end() -}) - -test("mutable", function (assert) { - var a = { foo: "bar" } - - mutableExtend(a, { bar: "baz" }) - - assert.equal(a.bar, "baz") - assert.end() -}) diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/package.json deleted file mode 100644 index 9612fee2..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "through2", - "version": "0.4.1", - "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", - "main": "through2.js", - "scripts": { - "test": "node test/test.js", - "test-local": "brtapsauce-local test/basic-test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/rvagg/through2.git" - }, - "keywords": [ - "stream", - "streams2", - "through", - "transform" - ], - "author": { - "name": "Rod Vagg", - "email": "r@va.gg", - "url": "https://github.com/rvagg" - }, - "license": "MIT", - "dependencies": { - "readable-stream": "~1.0.17", - "xtend": "~2.1.1" - }, - "devDependencies": { - "tape": "~2.3.0", - "bl": "~0.6.0", - "stream-spigot": "~3.0.1", - "brtapsauce": "~0.2.2" - }, - "readme": "# through2\n\n<!--\n\nsoon ...\n\n[![Build Status](https://secure.travis-ci.org/rvagg/through2.png)](http://travis-ci.org/rvagg/through2)\n\n[![Build Status](https://saucelabs.com/browser-matrix/through2-sauce.svg)](https://travis-ci.org/rvagg/through2)\n\n-->\n\n[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/) \n\n<!--\nnot happy with these, we need to peg to readable-stream@1.0.x so it'll always report out-of-date\n\n[![david-dm](https://david-dm.org/rvagg/through2.png)](https://david-dm.org/rvagg/through2/)\n[![david-dm](https://david-dm.org/rvagg/through2/dev-status.png)](https://david-dm.org/rvagg/through2#info=devDependencies/)\n-->\n\n**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise**\n\nInspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.\n\n```js\nfs.createReadStream('ex.txt')\n .pipe(through2(function (chunk, enc, callback) {\n\n for (var i = 0; i < chunk.length; i++)\n if (chunk[i] == 97)\n chunk[i] = 122 // swap 'a' for 'z'\n\n this.push(chunk)\n \n callback()\n\n }))\n .pipe(fs.createWriteStream('out.txt'))\n```\n\nOr object streams:\n\n```js\nvar all = []\n\nfs.createReadStream('data.csv')\n .pipe(csv2())\n .pipe(through2.obj(function (chunk, enc, callback) {\n\n var data = {\n name : chunk[0]\n , address : chunk[3]\n , phone : chunk[10]\n }\n \n this.push(data)\n \n callback()\n\n }))\n .on('data', function (data) {\n all.push(data)\n })\n .on('end', function () {\n doSomethingSpecial(all)\n })\n```\n\nNote that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`.\n\n## API\n\n<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b>\n\nConsult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).\n\n### options\n\nThe options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`).\n\nThe `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call:\n\n```js\nfs.createReadStream('/tmp/important.dat')\n .pipe(through2({ objectMode: true, allowHalfOpen: false }, function (chunk, enc, cb) {\n\n this.push(new Buffer('wut?'))\n cb()\n\n })\n .pipe(fs.createWriteStream('/tmp/wut.txt'))\n```\n\n### transformFunction\n\nThe `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk.\n\nTo queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on.\n\nIf you **do not provide a `transformFunction`** then you will get a simple simple pass-through stream.\n\n### flushFunction\n\nThe optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress.\n\n<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b>\n\nInstead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.\n\n```js\nvar FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) {\n if (record.temp != null && record.unit = \"F\") {\n record.temp = ( ( record.temp - 32 ) * 5 ) / 9\n record.unit = \"C\"\n }\n this.push(record)\n callback()\n})\n\n// Create instances of FToC like so:\nvar converter = new FToC()\n// Or:\nvar converter = FToC()\n// Or specify/override options when you instantiate, if you prefer:\nvar converter = FToC({objectMode: true})\n```\n\n## License\n\n**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/rvagg/through2/issues" - }, - "homepage": "https://github.com/rvagg/through2", - "_id": "through2@0.4.1", - "dist": { - "shasum": "48772c8b50c4955c25e7cdbe69f4220f4138178b" - }, - "_from": "through2@~0.4.0", - "_resolved": "https://registry.npmjs.org/through2/-/through2-0.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/test/basic-test.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/test/basic-test.js deleted file mode 100644 index 9d137c7f..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/test/basic-test.js +++ /dev/null @@ -1,334 +0,0 @@ -const test = require('tape') - , through2 = require('../') - , crypto = require('crypto') - , bl = require('bl') - , spigot = require('stream-spigot') - -test('plain through', function (t) { - var th2 = through2(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') - t.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('pipeable through', function (t) { - var th2 = through2(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - // bl() acts like a proper streams2 stream and passes as much as it's - // asked for, so we really only get one write with such a small amount - // of data - t.equal(s, 'aaaaaaaaaaaaaaaaaaaaaaaaa', 'got transformed string') - t.end() - })) - - var bufs = bl() - bufs.append(crypto.randomBytes(10)) - bufs.append(crypto.randomBytes(5)) - bufs.append(crypto.randomBytes(10)) - bufs.pipe(th2) -}) - -test('object through', function (t) { - t.plan(3) - - var th2 = through2({ objectMode: true}, function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object through with through2.obj', function (t) { - t.plan(3) - - var th2 = through2.obj(function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('flushing through', function (t) { - var th2 = through2(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }, function (callback) { - this.push(new Buffer([ 101, 110, 100 ])) - callback() - }) - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal(s, 'aaaaaaaaaabbbbbccccccccccend', 'got transformed string') - t.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('plain through ctor', function (t) { - var Th2 = through2.ctor(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - var th2 = new Th2() - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') - t.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('reuse through ctor', function (t) { - t.plan(4) - - var Th2 = through2.ctor(function (chunk, enc, callback) { - if (!this._i) { - t.ok(1, 'did not contain previous instance data (this._i)') - this._i = 97 // 'a' - } else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - var th2 = Th2() - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') - - var newInstance = Th2() - newInstance.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaabbbbccccccc', s, 'got transformed string') - })) - - newInstance.write(crypto.randomBytes(7)) - newInstance.write(crypto.randomBytes(4)) - newInstance.write(crypto.randomBytes(7)) - newInstance.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('object through ctor', function (t) { - t.plan(3) - - var Th2 = through2.ctor({ objectMode: true}, function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = new Th2() - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('pipeable object through ctor', function (t) { - t.plan(4) - - var Th2 = through2.ctor({ objectMode: true}, function (record, enc, callback) { - if (record.temp != null && record.unit == 'F') { - record.temp = ( ( record.temp - 32 ) * 5 ) / 9 - record.unit = 'C' - } - this.push(record) - callback() - }) - - var th2 = Th2() - - var expect = [-19, -40, 100, 22] - th2.on('data', function (o) { - t.deepEqual(o, { temp: expect.shift(), unit: 'C' }, 'got transformed object') - }) - - spigot({objectMode: true}, [ - {temp: -2.2, unit: 'F'}, - {temp: -40, unit: 'F'}, - {temp: 212, unit: 'F'}, - {temp: 22, unit: 'C'} - ]).pipe(th2) -}) - -test('object through ctor override', function (t) { - t.plan(3) - - var Th2 = through2.ctor(function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2({objectMode: true}) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object settings available in transform', function (t) { - t.plan(6) - - var Th2 = through2.ctor({objectMode: true, peek: true}, function (chunk, enc, callback) { - t.ok(this.options.peek, "reading options from inside _transform") - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2() - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object settings available in transform override', function (t) { - t.plan(6) - - var Th2 = through2.ctor(function (chunk, enc, callback) { - t.ok(this.options.peek, "reading options from inside _transform") - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2({objectMode: true, peek: true}) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object override extends options', function (t) { - t.plan(6) - - var Th2 = through2.ctor({objectMode: true}, function (chunk, enc, callback) { - t.ok(this.options.peek, "reading options from inside _transform") - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2({peek: true}) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/test/bench.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/test/bench.js deleted file mode 100644 index cc10868b..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/test/bench.js +++ /dev/null @@ -1,42 +0,0 @@ -/* -on rvagg@fletcher: - @0.2.3: Ran 36719 iterations in 10000 ms -*/ - -const through2 = require('../') - , bl = require('bl') - , crypto = require('crypto') - , assert = require('assert') - -function run (callback) { - var bufs = Array.apply(null, Array(10)).map(function () { return crypto.randomBytes(32) }) - , stream = through2(function (chunk, env, callback) { - callback(null, chunk.toString('hex')) - }) - - stream.pipe(bl(function (err, data) { - assert(!err) - assert.equal(data.toString(), Buffer.concat(bufs).toString('hex')) - callback() - })) - - bufs.forEach(function (b) { - stream.write(b) - }) - stream.end() -} - -var count = 0 - , start = Date.now() - -;(function exec () { - count++ - run(function () { - if (Date.now() - start < 1000 * 10) { - return setImmediate(exec) - } - console.log('Ran', count, 'iterations in', Date.now() - start, 'ms') - }) -}()) - -console.log('Running for ~10s') \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/test/sauce.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/test/sauce.js deleted file mode 100644 index a6d28625..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/test/sauce.js +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env node - -const user = process.env.SAUCE_USER - , key = process.env.SAUCE_KEY - , path = require('path') - , brtapsauce = require('brtapsauce') - , testFile = path.join(__dirname, 'basic-test.js') - - , capabilities = [ - { browserName: 'chrome' , platform: 'Windows XP', version: '' } - , { browserName: 'firefox' , platform: 'Windows 8' , version: '' } - , { browserName: 'firefox' , platform: 'Windows XP', version: '4' } - , { browserName: 'internet explorer' , platform: 'Windows 8' , version: '10' } - , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '9' } - , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '8' } - , { browserName: 'internet explorer' , platform: 'Windows XP', version: '7' } - , { browserName: 'internet explorer' , platform: 'Windows XP', version: '6' } - , { browserName: 'safari' , platform: 'Windows 7' , version: '5' } - , { browserName: 'safari' , platform: 'OS X 10.8' , version: '6' } - , { browserName: 'opera' , platform: 'Windows 7' , version: '' } - , { browserName: 'opera' , platform: 'Windows 7' , version: '11' } - , { browserName: 'ipad' , platform: 'OS X 10.8' , version: '6' } - , { browserName: 'android' , platform: 'Linux' , version: '4.0', 'device-type': 'tablet' } - ] - -if (!user) - throw new Error('Must set a SAUCE_USER env var') -if (!key) - throw new Error('Must set a SAUCE_KEY env var') - -brtapsauce({ - name : 'Traversty' - , user : user - , key : key - , brsrc : testFile - , capabilities : capabilities - , options : { timeout: 60 * 6 } -}) \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/test/test.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/test/test.js deleted file mode 100644 index aa9b4877..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/test/test.js +++ /dev/null @@ -1,9 +0,0 @@ -require('./basic-test') - -if (!process.env.SAUCE_KEY || !process.env.SAUCE_USER) - return console.log('SAUCE_KEY and/or SAUCE_USER not set, not running sauce tests') - -if (!/v0\.10/.test(process.version)) - return console.log('Not Node v0.10.x, not running sauce tests') - -require('./sauce.js') \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/through2.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/through2.js deleted file mode 100644 index c1104848..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/through2/through2.js +++ /dev/null @@ -1,78 +0,0 @@ -var Transform = require('readable-stream/transform') - , inherits = require('util').inherits - , xtend = require('xtend') - - -// a noop _transform function -function noop (chunk, enc, callback) { - callback(null, chunk) -} - - -// create a new export function, used by both the main export and -// the .ctor export, contains common logic for dealing with arguments -function through2 (construct) { - return function (options, transform, flush) { - if (typeof options == 'function') { - flush = transform - transform = options - options = {} - } - - if (typeof transform != 'function') - transform = noop - - if (typeof flush != 'function') - flush = null - - return construct(options, transform, flush) - } -} - - -// main export, just make me a transform stream! -module.exports = through2(function (options, transform, flush) { - var t2 = new Transform(options) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) - - -// make me a reusable prototype that I can `new`, or implicitly `new` -// with a constructor call -module.exports.ctor = through2(function (options, transform, flush) { - function Through2 (override) { - if (!(this instanceof Through2)) - return new Through2(override) - - this.options = xtend(options, override) - - Transform.call(this, this.options) - } - - inherits(Through2, Transform) - - Through2.prototype._transform = transform - - if (flush) - Through2.prototype._flush = flush - - return Through2 -}) - - -module.exports.obj = through2(function (options, transform, flush) { - var t2 = new Transform(xtend({ objectMode: true }, options)) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/.npmignore b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/.npmignore deleted file mode 100644 index b5ef13a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -.DS_Store -*.log -node_modules -build -*.node -components \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/.travis.yml b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/.travis.yml deleted file mode 100644 index 33ad9f8c..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.9" - - "0.10" -after_script: - - npm run coveralls \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/LICENSE b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/LICENSE deleted file mode 100755 index 4f482f9b..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013 Fractal <contact@wearefractal.com> - -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/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/README.md deleted file mode 100644 index 3f97efc5..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/README.md +++ /dev/null @@ -1,123 +0,0 @@ -# vinyl [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl) - - -## Information - -<table> -<tr> -<td>Package</td><td>vinyl</td> -</tr> -<tr> -<td>Description</td> -<td>A virtual file format</td> -</tr> -<tr> -<td>Node Version</td> -<td>>= 0.9</td> -</tr> -</table> - -## File - -```javascript -var File = require('vinyl'); - -var coffeeFile = new File({ - cwd: "/", - base: "/test/", - path: "/test/file.coffee" - contents: new Buffer("test = 123") -}); -``` - -### constructor(options) - -#### options.cwd - -Type: `String` -Default: `process.cwd()` - -#### options.base - -Used for relative pathing. Typically where a glob starts. - -Type: `String` -Default: `options.cwd` - -#### options.path - -Full path to the file. - -Type: `String` -Default: `null` - -#### options.stat - -The result of an fs.stat call. See [fs.Stats](http://nodejs.org/api/fs.html#fs_class_fs_stats) for more information. - -Type: `fs.Stats` -Default: `null` - -#### options.contents - -File contents. - -Type: `Buffer, Stream, or null` -Default: `null` - -### isBuffer() - -Returns true if file.contents is a Buffer. - -### isStream() - -Returns true if file.contents is a Stream. - -### isNull() - -Returns true if file.contents is null. - -### clone() - -Returns a new File object with all attributes cloned. - -### pipe(stream[, opt]) - -If file.contents is a Buffer, it will write it to the stream. - -If file.contents is a Stream, it will pipe it to the stream. - -If file.contents is null, it will do nothing. - -If opt.end is true, the destination stream will not be ended (same as node core). - -Returns the stream. - -### inspect() - -Returns a pretty String interpretation of the File. Useful for console.log. - -### relative - -Returns path.relative for the file base and file path. - -Example: - -```javascript -var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/file.coffee" -}); - -console.log(file.relative); // file.coffee -``` - -[npm-url]: https://npmjs.org/package/vinyl -[npm-image]: https://badge.fury.io/js/vinyl.png -[travis-url]: https://travis-ci.org/wearefractal/vinyl -[travis-image]: https://travis-ci.org/wearefractal/vinyl.png?branch=master -[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl -[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl/badge.png -[depstat-url]: https://david-dm.org/wearefractal/vinyl -[depstat-image]: https://david-dm.org/wearefractal/vinyl.png \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/index.js deleted file mode 100644 index 97f5c752..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/index.js +++ /dev/null @@ -1,128 +0,0 @@ -var path = require('path'); - -var cloneStats = require('clone-stats'); - -var isBuffer = require('./lib/isBuffer'); -var isStream = require('./lib/isStream'); -var isNull = require('./lib/isNull'); -var inspectStream = require('./lib/inspectStream'); -var cloneBuffer = require('./lib/cloneBuffer'); - -function File(file) { - if (!file) file = {}; - - // TODO: should this be moved to vinyl-fs? - this.cwd = file.cwd || process.cwd(); - this.base = file.base || this.cwd; - - this.path = file.path || null; - - // stat = fs stats object - // TODO: should this be moved to vinyl-fs? - this.stat = file.stat || null; - - // contents = stream, buffer, or null if not read - this.contents = file.contents || null; -} - -File.prototype.isBuffer = function() { - return isBuffer(this.contents); -}; - -File.prototype.isStream = function() { - return isStream(this.contents); -}; - -File.prototype.isNull = function() { - return isNull(this.contents); -}; - -// TODO: should this be moved to vinyl-fs? -File.prototype.isDirectory = function() { - return this.isNull() && this.stat && this.stat.isDirectory(); -}; - -File.prototype.clone = function() { - var clonedContents = this.isBuffer() ? cloneBuffer(this.contents) : this.contents; - var clonedStat = this.stat ? cloneStats(this.stat) : null; - - return new File({ - cwd: this.cwd, - base: this.base, - path: this.path, - stat: clonedStat, - contents: clonedContents - }); -}; - -File.prototype.pipe = function(stream, opt) { - if (!opt) opt = {}; - if (typeof opt.end === 'undefined') opt.end = true; - - if (this.isStream()) { - return this.contents.pipe(stream, opt); - } - if (this.isBuffer()) { - if (opt.end) { - stream.end(this.contents); - } else { - stream.write(this.contents); - } - return stream; - } - if (this.isNull()) { - if (opt.end) stream.end(); - return stream; - } - - return stream; -}; - -File.prototype.inspect = function() { - var inspect = []; - - // use relative path if possible - var filePath = (this.base && this.path) ? this.relative : this.path; - - if (filePath) { - inspect.push('"'+filePath+'"'); - } - - if (this.isBuffer()) { - inspect.push(this.contents.inspect()); - } - - if (this.isStream()) { - inspect.push(inspectStream(this.contents)); - } - - return '<File '+inspect.join(' ')+'>'; -}; - -// virtual attributes -// or stuff with extra logic -Object.defineProperty(File.prototype, 'contents', { - get: function() { - return this._contents; - }, - set: function(val) { - if (!isBuffer(val) && !isStream(val) && !isNull(val)) { - throw new Error("File.contents can only be a Buffer, a Stream, or null."); - } - this._contents = val; - } -}); - -// TODO: should this be moved to vinyl-fs? -Object.defineProperty(File.prototype, 'relative', { - get: function() { - if (!this.base) throw new Error('No base specified! Can not get relative.'); - if (!this.path) throw new Error('No path specified! Can not get relative.'); - return path.relative(this.base, this.path); - }, - set: function() { - throw new Error('File.relative is generated from the base and path attributes. Do not modify it.'); - } -}); - -module.exports = File; diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js deleted file mode 100644 index 3a861f22..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js +++ /dev/null @@ -1,7 +0,0 @@ -var Buffer = require('buffer').Buffer; - -module.exports = function(buf) { - var out = new Buffer(buf.length); - buf.copy(out); - return out; -}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js deleted file mode 100644 index 2c906789..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js +++ /dev/null @@ -1,12 +0,0 @@ -var Stream = require('stream').Stream; -var isStream = require('./isStream'); - -module.exports = function(stream) { - if (!isStream(stream)) return; - - var streamType = stream.constructor.name; - // avoid StreamStream - if (streamType === 'Stream') streamType = ''; - - return '<'+streamType+'Stream>'; -}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js deleted file mode 100644 index 0e23782c..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js +++ /dev/null @@ -1,7 +0,0 @@ -var buf = require('buffer'); -var Buffer = buf.Buffer; - -// could use Buffer.isBuffer but this is the same exact thing... -module.exports = function(o) { - return typeof o === 'object' && o instanceof Buffer; -}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js deleted file mode 100644 index 403bb30e..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function(v) { - return v === null; -}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/lib/isStream.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/lib/isStream.js deleted file mode 100644 index 9ce0929b..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/lib/isStream.js +++ /dev/null @@ -1,5 +0,0 @@ -var Stream = require('stream').Stream; - -module.exports = function(o) { - return !!o && o instanceof Stream; -}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/LICENSE.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/LICENSE.md deleted file mode 100644 index 146cb32a..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -## The MIT License (MIT) ## - -Copyright (c) 2014 Hugh Kennedy - -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/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/README.md b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/README.md deleted file mode 100644 index 8b12b6fa..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# clone-stats [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/clone-stats&title=clone-stats&description=hughsk/clone-stats%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) # - -Safely clone node's -[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) instances without -losing their class methods, i.e. `stat.isDirectory()` and co. - -## Usage ## - -[![clone-stats](https://nodei.co/npm/clone-stats.png?mini=true)](https://nodei.co/npm/clone-stats) - -### `copy = require('clone-stats')(stat)` ### - -Returns a clone of the original `fs.Stats` instance (`stat`). - -## License ## - -MIT. See [LICENSE.md](http://github.com/hughsk/clone-stats/blob/master/LICENSE.md) for details. diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/index.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/index.js deleted file mode 100644 index e797cfe6..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/index.js +++ /dev/null @@ -1,13 +0,0 @@ -var Stat = require('fs').Stats - -module.exports = cloneStats - -function cloneStats(stats) { - var replacement = new Stat - - Object.keys(stats).forEach(function(key) { - replacement[key] = stats[key] - }) - - return replacement -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json deleted file mode 100644 index c77c62c4..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "clone-stats", - "description": "Safely clone node's fs.Stats instances without losing their class methods", - "version": "0.0.1", - "main": "index.js", - "browser": "index.js", - "dependencies": {}, - "devDependencies": { - "tape": "~2.3.2" - }, - "scripts": { - "test": "node test" - }, - "author": { - "name": "Hugh Kennedy", - "email": "hughskennedy@gmail.com", - "url": "http://hughsk.io/" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/hughsk/clone-stats" - }, - "bugs": { - "url": "https://github.com/hughsk/clone-stats/issues" - }, - "homepage": "https://github.com/hughsk/clone-stats", - "keywords": [ - "stats", - "fs", - "clone", - "copy", - "prototype" - ], - "readme": "# clone-stats [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/clone-stats&title=clone-stats&description=hughsk/clone-stats%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #\n\nSafely clone node's\n[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) instances without\nlosing their class methods, i.e. `stat.isDirectory()` and co.\n\n## Usage ##\n\n[![clone-stats](https://nodei.co/npm/clone-stats.png?mini=true)](https://nodei.co/npm/clone-stats)\n\n### `copy = require('clone-stats')(stat)` ###\n\nReturns a clone of the original `fs.Stats` instance (`stat`).\n\n## License ##\n\nMIT. See [LICENSE.md](http://github.com/hughsk/clone-stats/blob/master/LICENSE.md) for details.\n", - "readmeFilename": "README.md", - "_id": "clone-stats@0.0.1", - "dist": { - "shasum": "b88f94a82cf38b8791d58046ea4029ad88ca99d1" - }, - "_from": "clone-stats@~0.0.1", - "_resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/test.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/test.js deleted file mode 100644 index e4bb2814..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/test.js +++ /dev/null @@ -1,36 +0,0 @@ -var test = require('tape') -var clone = require('./') -var fs = require('fs') - -test('file', function(t) { - compare(t, fs.statSync(__filename)) - t.end() -}) - -test('directory', function(t) { - compare(t, fs.statSync(__dirname)) - t.end() -}) - -function compare(t, stat) { - var copy = clone(stat) - - t.deepEqual(stat, copy, 'clone has equal properties') - t.ok(stat instanceof fs.Stats, 'original is an fs.Stat') - t.ok(copy instanceof fs.Stats, 'copy is an fs.Stat') - - ;['isDirectory' - , 'isFile' - , 'isBlockDevice' - , 'isCharacterDevice' - , 'isSymbolicLink' - , 'isFIFO' - , 'isSocket' - ].forEach(function(method) { - t.equal( - stat[method].call(stat) - , copy[method].call(copy) - , 'equal value for stat.' + method + '()' - ) - }) -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/package.json deleted file mode 100644 index a2a3bc40..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "vinyl", - "description": "A virtual file format", - "version": "0.2.3", - "homepage": "http://github.com/wearefractal/vinyl", - "repository": { - "type": "git", - "url": "git://github.com/wearefractal/vinyl.git" - }, - "author": { - "name": "Fractal", - "email": "contact@wearefractal.com", - "url": "http://wearefractal.com/" - }, - "main": "./index.js", - "dependencies": { - "clone-stats": "~0.0.1" - }, - "devDependencies": { - "mocha": "~1.17.0", - "should": "~2.1.1", - "mocha-lcov-reporter": "0.0.1", - "coveralls": "~2.6.1", - "istanbul": "~0.2.3", - "rimraf": "~2.2.5", - "jshint": "~2.4.1", - "buffer-equal": "0.0.0", - "lodash.templatesettings": "~2.4.1", - "event-stream": "~3.1.0" - }, - "scripts": { - "test": "mocha --reporter spec && jshint", - "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage" - }, - "engines": { - "node": ">= 0.9" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/wearefractal/vinyl/raw/master/LICENSE" - } - ], - "readme": "# vinyl [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl)\n\n\n## Information\n\n<table>\n<tr> \n<td>Package</td><td>vinyl</td>\n</tr>\n<tr>\n<td>Description</td>\n<td>A virtual file format</td>\n</tr>\n<tr>\n<td>Node Version</td>\n<td>>= 0.9</td>\n</tr>\n</table>\n\n## File\n\n```javascript\nvar File = require('vinyl');\n\nvar coffeeFile = new File({\n cwd: \"/\",\n base: \"/test/\",\n path: \"/test/file.coffee\"\n contents: new Buffer(\"test = 123\")\n});\n```\n\n### constructor(options)\n\n#### options.cwd\n\nType: `String` \nDefault: `process.cwd()`\n\n#### options.base\n\nUsed for relative pathing. Typically where a glob starts.\n\nType: `String` \nDefault: `options.cwd`\n\n#### options.path\n\nFull path to the file.\n\nType: `String` \nDefault: `null`\n\n#### options.stat\n\nThe result of an fs.stat call. See [fs.Stats](http://nodejs.org/api/fs.html#fs_class_fs_stats) for more information.\n\nType: `fs.Stats` \nDefault: `null`\n\n#### options.contents\n\nFile contents.\n\nType: `Buffer, Stream, or null` \nDefault: `null`\n\n### isBuffer()\n\nReturns true if file.contents is a Buffer.\n\n### isStream()\n\nReturns true if file.contents is a Stream.\n\n### isNull()\n\nReturns true if file.contents is null.\n\n### clone()\n\nReturns a new File object with all attributes cloned.\n\n### pipe(stream[, opt])\n\nIf file.contents is a Buffer, it will write it to the stream.\n\nIf file.contents is a Stream, it will pipe it to the stream.\n\nIf file.contents is null, it will do nothing.\n\nIf opt.end is true, the destination stream will not be ended (same as node core).\n\nReturns the stream.\n\n### inspect()\n\nReturns a pretty String interpretation of the File. Useful for console.log.\n\n### relative\n\nReturns path.relative for the file base and file path.\n\nExample:\n\n```javascript\nvar file = new File({\n cwd: \"/\",\n base: \"/test/\",\n path: \"/test/file.coffee\"\n});\n\nconsole.log(file.relative); // file.coffee\n```\n\n[npm-url]: https://npmjs.org/package/vinyl\n[npm-image]: https://badge.fury.io/js/vinyl.png\n[travis-url]: https://travis-ci.org/wearefractal/vinyl\n[travis-image]: https://travis-ci.org/wearefractal/vinyl.png?branch=master\n[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl\n[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl/badge.png\n[depstat-url]: https://david-dm.org/wearefractal/vinyl\n[depstat-image]: https://david-dm.org/wearefractal/vinyl.png", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/wearefractal/vinyl/issues" - }, - "_id": "vinyl@0.2.3", - "dist": { - "shasum": "bca938209582ec5a49ad538a00fa1f125e513252" - }, - "_from": "vinyl@~0.2.1", - "_resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.2.3.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/test/File.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/test/File.js deleted file mode 100644 index 1f2a83a0..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/test/File.js +++ /dev/null @@ -1,540 +0,0 @@ -var File = require('../'); -var Stream = require('stream'); -var fs = require('fs'); - -var should = require('should'); -require('mocha'); - -describe('File', function() { - - describe('constructor()', function() { - it('should default cwd to process.cwd', function(done) { - var file = new File(); - file.cwd.should.equal(process.cwd()); - done(); - }); - - it('should default base to cwd', function(done) { - var cwd = "/"; - var file = new File({cwd: cwd}); - file.base.should.equal(cwd); - done(); - }); - - it('should default base to cwd even when none is given', function(done) { - var file = new File(); - file.base.should.equal(process.cwd()); - done(); - }); - - it('should default path to null', function(done) { - var file = new File(); - should.not.exist(file.path); - done(); - }); - - it('should default stat to null', function(done) { - var file = new File(); - should.not.exist(file.stat); - done(); - }); - - it('should default contents to null', function(done) { - var file = new File(); - should.not.exist(file.contents); - done(); - }); - - it('should set base to given value', function(done) { - var val = "/"; - var file = new File({base: val}); - file.base.should.equal(val); - done(); - }); - - it('should set cwd to given value', function(done) { - var val = "/"; - var file = new File({cwd: val}); - file.cwd.should.equal(val); - done(); - }); - - it('should set path to given value', function(done) { - var val = "/test.coffee"; - var file = new File({path: val}); - file.path.should.equal(val); - done(); - }); - - it('should set stat to given value', function(done) { - var val = {}; - var file = new File({stat: val}); - file.stat.should.equal(val); - done(); - }); - - it('should set contents to given value', function(done) { - var val = new Buffer("test"); - var file = new File({contents: val}); - file.contents.should.equal(val); - done(); - }); - }); - - describe('isBuffer()', function() { - it('should return true when the contents are a Buffer', function(done) { - var val = new Buffer("test"); - var file = new File({contents: val}); - file.isBuffer().should.equal(true); - done(); - }); - - it('should return false when the contents are a Stream', function(done) { - var val = new Stream(); - var file = new File({contents: val}); - file.isBuffer().should.equal(false); - done(); - }); - - it('should return false when the contents are a null', function(done) { - var file = new File({contents: null}); - file.isBuffer().should.equal(false); - done(); - }); - }); - - describe('isStream()', function() { - it('should return false when the contents are a Buffer', function(done) { - var val = new Buffer("test"); - var file = new File({contents: val}); - file.isStream().should.equal(false); - done(); - }); - - it('should return true when the contents are a Stream', function(done) { - var val = new Stream(); - var file = new File({contents: val}); - file.isStream().should.equal(true); - done(); - }); - - it('should return false when the contents are a null', function(done) { - var file = new File({contents: null}); - file.isStream().should.equal(false); - done(); - }); - }); - - describe('isNull()', function() { - it('should return false when the contents are a Buffer', function(done) { - var val = new Buffer("test"); - var file = new File({contents: val}); - file.isNull().should.equal(false); - done(); - }); - - it('should return false when the contents are a Stream', function(done) { - var val = new Stream(); - var file = new File({contents: val}); - file.isNull().should.equal(false); - done(); - }); - - it('should return true when the contents are a null', function(done) { - var file = new File({contents: null}); - file.isNull().should.equal(true); - done(); - }); - }); - - describe('isDirectory()', function() { - var fakeStat = { - isDirectory: function() { - return true; - } - }; - - it('should return false when the contents are a Buffer', function(done) { - var val = new Buffer("test"); - var file = new File({contents: val, stat: fakeStat}); - file.isDirectory().should.equal(false); - done(); - }); - - it('should return false when the contents are a Stream', function(done) { - var val = new Stream(); - var file = new File({contents: val, stat: fakeStat}); - file.isDirectory().should.equal(false); - done(); - }); - - it('should return true when the contents are a null', function(done) { - var file = new File({contents: null, stat: fakeStat}); - file.isDirectory().should.equal(true); - done(); - }); - }); - - describe('clone()', function() { - it('should copy all attributes over with Buffer', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Buffer("test") - }; - var file = new File(options); - var file2 = file.clone(); - - file2.should.not.equal(file, 'refs should be different'); - file2.cwd.should.equal(file.cwd); - file2.base.should.equal(file.base); - file2.path.should.equal(file.path); - file2.contents.should.not.equal(file.contents, 'buffer ref should be different'); - file2.contents.toString('utf8').should.equal(file.contents.toString('utf8')); - done(); - }); - - it('should copy all attributes over with Stream', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Stream() - }; - var file = new File(options); - var file2 = file.clone(); - - file2.should.not.equal(file, 'refs should be different'); - file2.cwd.should.equal(file.cwd); - file2.base.should.equal(file.base); - file2.path.should.equal(file.path); - file2.contents.should.equal(file.contents, 'stream ref should be the same'); - done(); - }); - - it('should copy all attributes over with null', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: null - }; - var file = new File(options); - var file2 = file.clone(); - - file2.should.not.equal(file, 'refs should be different'); - file2.cwd.should.equal(file.cwd); - file2.base.should.equal(file.base); - file2.path.should.equal(file.path); - should.not.exist(file2.contents); - done(); - }); - - it('should properly clone the `stat` property', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.js", - contents: new Buffer("test"), - stat: fs.statSync(__filename) - }; - - var file = new File(options); - var copy = file.clone(); - - copy.stat.isFile().should.be.true; - copy.stat.isDirectory().should.be.false; - should(file.stat instanceof fs.Stats).be.true; - should(copy.stat instanceof fs.Stats).be.true; - - done(); - }); - }); - - describe('pipe()', function() { - it('should write to stream with Buffer', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Buffer("test") - }; - var file = new File(options); - var stream = new Stream.PassThrough(); - stream.on('data', function(chunk) { - should.exist(chunk); - (chunk instanceof Buffer).should.equal(true, 'should write as a buffer'); - chunk.toString('utf8').should.equal(options.contents.toString('utf8')); - }); - stream.on('end', function(chunk) { - done(); - }); - var ret = file.pipe(stream); - ret.should.equal(stream, 'should return the stream'); - }); - - it('should pipe to stream with Stream', function(done) { - var testChunk = new Buffer("test"); - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Stream.PassThrough() - }; - var file = new File(options); - var stream = new Stream.PassThrough(); - stream.on('data', function(chunk) { - should.exist(chunk); - (chunk instanceof Buffer).should.equal(true, 'should write as a buffer'); - chunk.toString('utf8').should.equal(testChunk.toString('utf8')); - done(); - }); - var ret = file.pipe(stream); - ret.should.equal(stream, 'should return the stream'); - - file.contents.write(testChunk); - }); - - it('should do nothing with null', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: null - }; - var file = new File(options); - var stream = new Stream.PassThrough(); - stream.on('data', function(chunk) { - throw new Error("should not write"); - }); - stream.on('end', function() { - done(); - }); - var ret = file.pipe(stream); - ret.should.equal(stream, 'should return the stream'); - }); - - it('should write to stream with Buffer', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Buffer("test") - }; - var file = new File(options); - var stream = new Stream.PassThrough(); - stream.on('data', function(chunk) { - should.exist(chunk); - (chunk instanceof Buffer).should.equal(true, 'should write as a buffer'); - chunk.toString('utf8').should.equal(options.contents.toString('utf8')); - done(); - }); - stream.on('end', function(chunk) { - throw new Error("should not end"); - }); - var ret = file.pipe(stream, {end: false}); - ret.should.equal(stream, 'should return the stream'); - }); - - it('should pipe to stream with Stream', function(done) { - var testChunk = new Buffer("test"); - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Stream.PassThrough() - }; - var file = new File(options); - var stream = new Stream.PassThrough(); - stream.on('data', function(chunk) { - should.exist(chunk); - (chunk instanceof Buffer).should.equal(true, 'should write as a buffer'); - chunk.toString('utf8').should.equal(testChunk.toString('utf8')); - done(); - }); - stream.on('end', function(chunk) { - throw new Error("should not end"); - }); - var ret = file.pipe(stream, {end: false}); - ret.should.equal(stream, 'should return the stream'); - - file.contents.write(testChunk); - }); - - it('should do nothing with null', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: null - }; - var file = new File(options); - var stream = new Stream.PassThrough(); - stream.on('data', function(chunk) { - throw new Error("should not write"); - }); - stream.on('end', function(chunk) { - throw new Error("should not end"); - }); - var ret = file.pipe(stream, {end: false}); - ret.should.equal(stream, 'should return the stream'); - process.nextTick(done); - }); - }); - - describe('inspect()', function() { - it('should return correct format when no contents and no path', function(done) { - var file = new File(); - file.inspect().should.equal('<File >'); - done(); - }); - - it('should return correct format when Buffer and no path', function(done) { - var val = new Buffer("test"); - var file = new File({ - contents: val - }); - file.inspect().should.equal('<File <Buffer 74 65 73 74>>'); - done(); - }); - - it('should return correct format when Buffer and relative path', function(done) { - var val = new Buffer("test"); - var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: val - }); - file.inspect().should.equal('<File "test.coffee" <Buffer 74 65 73 74>>'); - done(); - }); - - it('should return correct format when Buffer and only path and no base', function(done) { - var val = new Buffer("test"); - var file = new File({ - cwd: "/", - path: "/test/test.coffee", - contents: val - }); - delete file.base; - file.inspect().should.equal('<File "/test/test.coffee" <Buffer 74 65 73 74>>'); - done(); - }); - - it('should return correct format when Stream and relative path', function(done) { - var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Stream.PassThrough() - }); - file.inspect().should.equal('<File "test.coffee" <PassThroughStream>>'); - done(); - }); - - it('should return correct format when null and relative path', function(done) { - var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: null - }); - file.inspect().should.equal('<File "test.coffee">'); - done(); - }); - }); - - describe('contents get/set', function() { - it('should work with Buffer', function(done) { - var val = new Buffer("test"); - var file = new File(); - file.contents = val; - file.contents.should.equal(val); - done(); - }); - - it('should work with Stream', function(done) { - var val = new Stream.PassThrough(); - var file = new File(); - file.contents = val; - file.contents.should.equal(val); - done(); - }); - - it('should work with null', function(done) { - var val = null; - var file = new File(); - file.contents = val; - (file.contents === null).should.equal(true); - done(); - }); - - it('should not work with string', function(done) { - var val = "test"; - var file = new File(); - try { - file.contents = val; - } catch (err) { - should.exist(err); - done(); - } - }); - }); - - describe('relative get/set', function() { - it('should error on set', function(done) { - var file = new File(); - try { - file.relative = "test"; - } catch (err) { - should.exist(err); - done(); - } - }); - - it('should error on get when no base', function(done) { - var a; - var file = new File(); - delete file.base; - try { - a = file.relative; - } catch (err) { - should.exist(err); - done(); - } - }); - - it('should error on get when no path', function(done) { - var a; - var file = new File(); - try { - a = file.relative; - } catch (err) { - should.exist(err); - done(); - } - }); - - it('should return a relative path from base', function(done) { - var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee" - }); - file.relative.should.equal("test.coffee"); - done(); - }); - - it('should return a relative path from cwd', function(done) { - var file = new File({ - cwd: "/", - path: "/test/test.coffee" - }); - file.relative.should.equal("test/test.coffee"); - done(); - }); - }); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js deleted file mode 100644 index 7d286814..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js +++ /dev/null @@ -1,28 +0,0 @@ -var cloneBuffer = require('../lib/cloneBuffer'); -var Stream = require('stream'); -var should = require('should'); -require('mocha'); - -describe('cloneBuffer()', function() { - it('should return a new Buffer reference', function(done) { - var testBuffer = new Buffer('test'); - var testBuffer2 = cloneBuffer(testBuffer); - - should.exist(testBuffer2, 'should return something'); - (testBuffer2 instanceof Buffer).should.equal(true, 'should return a Buffer'); - testBuffer2.should.not.equal(testBuffer, 'pointer should change'); - done(); - }); - - it('should not replicate modifications to the original buffer', function(done) { - var testBuffer = new Buffer('test'); - var testBuffer2 = cloneBuffer(testBuffer); - - // test that changes dont modify both pointers - testBuffer2.write('w'); - - testBuffer.toString('utf8').should.equal('test', 'original should stay the same'); - testBuffer2.toString('utf8').should.equal('west', 'new buffer should be modified'); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/test/inspectStream.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/test/inspectStream.js deleted file mode 100644 index fe1802c5..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/test/inspectStream.js +++ /dev/null @@ -1,53 +0,0 @@ -var inspectStream = require('../lib/inspectStream'); -var Stream = require('stream'); -var should = require('should'); -require('mocha'); - -describe('inspectStream()', function() { - it('should work on a core Stream', function(done) { - var testStream = new Stream(); - inspectStream(testStream).should.equal('<Stream>'); - done(); - }); - - it('should work on a core Readable Stream', function(done) { - var testStream = new Stream.Readable(); - inspectStream(testStream).should.equal('<ReadableStream>'); - done(); - }); - - it('should work on a core Writable Stream', function(done) { - var testStream = new Stream.Writable(); - inspectStream(testStream).should.equal('<WritableStream>'); - done(); - }); - - it('should work on a core Duplex Stream', function(done) { - var testStream = new Stream.Duplex(); - inspectStream(testStream).should.equal('<DuplexStream>'); - done(); - }); - - it('should work on a core Transform Stream', function(done) { - var testStream = new Stream.Transform(); - inspectStream(testStream).should.equal('<TransformStream>'); - done(); - }); - - it('should work on a core PassThrough Stream', function(done) { - var testStream = new Stream.PassThrough(); - inspectStream(testStream).should.equal('<PassThroughStream>'); - done(); - }); - - it('should not work on a Buffer', function(done) { - var testBuffer = new Buffer('test'); - should.not.exist(inspectStream(testBuffer)); - done(); - }); - - it('should not work on a null', function(done) { - should.not.exist(inspectStream(null)); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js deleted file mode 100644 index 5bb1cb91..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js +++ /dev/null @@ -1,29 +0,0 @@ -var isBuffer = require('../lib/isBuffer'); -var Stream = require('stream'); -var should = require('should'); -require('mocha'); - -describe('isBuffer()', function() { - it('should return true on a Buffer', function(done) { - var testBuffer = new Buffer('test'); - isBuffer(testBuffer).should.equal(true); - done(); - }); - - it('should return false on a Stream', function(done) { - var testStream = new Stream(); - isBuffer(testStream).should.equal(false); - done(); - }); - - it('should return false on a null', function(done) { - isBuffer(null).should.equal(false); - done(); - }); - - it('should return false on a array of numbers', function(done) { - var testArray = [1, 2, 3]; - isBuffer(testArray).should.equal(false); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/test/isNull.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/test/isNull.js deleted file mode 100644 index db70c013..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/test/isNull.js +++ /dev/null @@ -1,23 +0,0 @@ -var isNull = require('../lib/isNull'); -var Stream = require('stream'); -var should = require('should'); -require('mocha'); - -describe('isNull()', function() { - it('should return true on null', function(done) { - isNull(null).should.equal(true); - done(); - }); - - it('should return false on undefined', function(done) { - isNull().should.equal(false); - isNull(undefined).should.equal(false); - done(); - }); - - it('should return false on defined values', function(done) { - isNull(1).should.equal(false); - isNull("test").should.equal(false); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/test/isStream.js b/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/test/isStream.js deleted file mode 100644 index f22584c5..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/node_modules/vinyl/test/isStream.js +++ /dev/null @@ -1,29 +0,0 @@ -var isStream = require('../lib/isStream'); -var Stream = require('stream'); -var should = require('should'); -require('mocha'); - -describe('isStream()', function() { - it('should return true on a Stream', function(done) { - var testStream = new Stream(); - isStream(testStream).should.equal(true); - done(); - }); - - it('should return false on a Buffer', function(done) { - var testBuffer = new Buffer('test'); - isStream(testBuffer).should.equal(false); - done(); - }); - - it('should return false on a null', function(done) { - isStream(null).should.equal(false); - done(); - }); - - it('should return false on a array of numbers', function(done) { - var testArray = [1, 2, 3]; - isStream(testArray).should.equal(false); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/package.json b/node_modules/gulp-imagemin/node_modules/gulp-util/package.json deleted file mode 100644 index 0853a28d..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "gulp-util", - "description": "Utility functions for gulp plugins", - "version": "2.2.14", - "homepage": "http://github.com/wearefractal/gulp-util", - "repository": { - "type": "git", - "url": "git://github.com/wearefractal/gulp-util.git" - }, - "author": { - "name": "Fractal", - "email": "contact@wearefractal.com", - "url": "http://wearefractal.com/" - }, - "main": "./index.js", - "dependencies": { - "chalk": "~0.4.0", - "lodash.template": "~2.4.1", - "lodash._reinterpolate": "~2.4.1", - "vinyl": "~0.2.1", - "through2": "~0.4.0", - "dateformat": "~1.0.7-1.2.3", - "multipipe": "~0.0.1", - "minimist": "~0.0.5" - }, - "devDependencies": { - "mocha": "~1.17.0", - "should": "~3.1.2", - "mocha-lcov-reporter": "~0.0.1", - "coveralls": "~2.7.0", - "istanbul": "~0.2.3", - "rimraf": "~2.2.5", - "jshint": "~2.4.1", - "buffer-equal": "0.0.0", - "lodash.templatesettings": "~2.4.1", - "event-stream": "~3.1.0" - }, - "scripts": { - "test": "mocha --reporter spec && jshint", - "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage" - }, - "engines": { - "node": ">= 0.9" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/wearefractal/gulp-util/raw/master/LICENSE" - } - ], - "readme": "# gulp-util [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/gulpjs/gulp-util.png?theme=shields.io)](https://david-dm.org/gulpjs/gulp-util)\n\n## Information\n\n<table>\n<tr> \n<td>Package</td><td>gulp-util</td>\n</tr>\n<tr>\n<td>Description</td>\n<td>Utility functions for gulp plugins</td>\n</tr>\n<tr>\n<td>Node Version</td>\n<td>>= 0.9</td>\n</tr>\n</table>\n\n## Usage\n\n```javascript\nvar gutil = require('gulp-util');\n\ngutil.log('stuff happened', 'Really it did', gutil.colors.cyan('123'));\ngutil.beep();\n\ngutil.replaceExtension('file.coffee', '.js'); // file.js\n\nvar opt = {\n name: 'todd',\n file: someGulpFile\n};\ngutil.template('test <%= name %> <%= file.path %>', opt) // test todd /js/hi.js\n```\n\n### log(msg...)\n\nLogs stuff. Already prefixed with [gulp] and all that. Use the right colors for values. If you pass in multiple arguments it will join them by a space.\n\n```\nvalues (files, module names, etc.) = magenta\nnumbers (times, counts, etc) = cyan\n```\n\n### colors\n\nThis is an instance of [chalk](https://github.com/sindresorhus/chalk)\n\n### date\n\nThis is an instance of [node-dateformat](https://github.com/felixge/node-dateformat).\n\n### linefeed\n\nJust `\\n`. Use this.\n\n### replaceExtension(path, newExtension)\n\nReplaces a file extension in a path. Returns the new path.\n\n### isStream(obj)\n\nReturns true or false if an object is a stream.\n\n### isBuffer(obj)\n\nReturns true or false if an object is a Buffer.\n\n### template(string[, data])\n\nThis is a lodash.template function wrapper. You must pass in a valid gulp file object so it is available to the user or it will error. You can not configure any of the delimiters. Look at the [lodash docs](http://lodash.com/docs#template) for more info.\n\n## new File(obj)\n\nThis is just [vinyl](https://github.com/wearefractal/vinyl)\n\n```javascript\nvar file = new gutil.File({\n base: join(__dirname, './fixtures/'),\n cwd: __dirname,\n path: join(__dirname, './fixtures/test.coffee')\n});\n```\n\n## noop()\n\nReturns a stream that does nothing but pass data straight through.\n\n```javascript\ngulp.task('scripts', function() {\n gulp.src('src/**/*.js')\n .pipe(concat('script.js'))\n .pipe(gulp.env.production ? uglify() : gutil.noop())\n .pipe(gulp.dest('dist/');\n});\n```\n\n## combine(streams...)\n\nArgument may also be an array of streams. Returns a function that returns the combined stream. Useful for keeping things DRY. This is a simple wrapper around event-stream's `.pipeline`\n\n```javascript\nvar scripts = gutil.combine(\n coffee({bare: true}),\n uglify(),\n concat('script.js'),\n gulp.dest('dist/')\n);\n\ngulp.task('default', function() {\n gulp.src('*.coffee').pipe(scripts());\n});\n```\n\n## buffer(cb)\n\nThis is similar to es.wait but instead of buffering text into one string it buffers anything into an array (so very useful for file objects).\n\nReturns a stream that can be piped to.\n\nThe stream will emit one data event after the stream piped to it has ended. The data will be the same array passed to the callback.\n\nCallback is optional and receives two arguments: error and data\n\n```javascript\ngulp.src('stuff/*.js')\n .pipe(gutil.buffer(function(err, files){\n \n });\n```\n\n## new PluginError(pluginName, message[, options])\n\n- pluginName should be the module name of your plugin\n- message can be a string or an existing error\n- By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error.\n- If you pass an error in as the message the stack will be pulled from that, otherwise one will be created.\n\nThese are all acceptable forms of instantiation:\n\n```javascript\nvar err = new gutil.PluginError('test', {\n message: 'something broke'\n});\n\nvar err = new gutil.PluginError({\n plugin: 'test',\n message: 'something broke'\n});\n\nvar err = new gutil.PluginError('test', 'something broke');\n\nvar err = new gutil.PluginError('test', 'something broke', {showStack: true});\n\nvar existingError = new Error('OMG');\nvar err = new gutil.PluginError('test', existingError, {showStack: true});\n```\n\n[npm-url]: https://npmjs.org/package/gulp-util\n[npm-image]: https://badge.fury.io/js/gulp-util.png\n[travis-url]: https://travis-ci.org/gulpjs/gulp-util\n[travis-image]: https://travis-ci.org/gulpjs/gulp-util.png?branch=master\n[coveralls-url]: https://coveralls.io/r/gulpjs/gulp-util\n[coveralls-image]: https://coveralls.io/repos/gulpjs/gulp-util/badge.png\n[depstat-url]: https://david-dm.org/gulpjs/gulp-util\n[depstat-image]: https://david-dm.org/gulpjs/gulp-util.png\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/wearefractal/gulp-util/issues" - }, - "_id": "gulp-util@2.2.14", - "dist": { - "shasum": "705a44e3624a7e44f5fdf70a3e91f3087ff83ba1" - }, - "_from": "gulp-util@~2.2.0", - "_resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-2.2.14.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/test/File.js b/node_modules/gulp-imagemin/node_modules/gulp-util/test/File.js deleted file mode 100644 index 53544075..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/test/File.js +++ /dev/null @@ -1,46 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('File()', function() { - it('should return a valid file', function(done) { - var fname = path.join(__dirname, './fixtures/test.coffee'); - var base = path.join(__dirname, './fixtures/'); - var file = new util.File({ - base: base, - cwd: __dirname, - path: fname - }); - should.exist(file, 'root'); - should.exist(file.relative, 'relative'); - should.exist(file.path, 'path'); - should.exist(file.cwd, 'cwd'); - should.exist(file.base, 'base'); - file.path.should.equal(fname); - file.cwd.should.equal(__dirname); - file.base.should.equal(base); - file.relative.should.equal('test.coffee'); - done(); - }); - - it('should return a valid file 2', function(done) { - var fname = path.join(__dirname, './fixtures/test.coffee'); - var base = __dirname; - var file = new util.File({ - base: base, - cwd: __dirname, - path: fname - }); - should.exist(file, 'root'); - should.exist(file.relative, 'relative'); - should.exist(file.path, 'path'); - should.exist(file.cwd, 'cwd'); - should.exist(file.base, 'base'); - file.path.should.equal(fname); - file.cwd.should.equal(__dirname); - file.base.should.equal(base); - file.relative.should.equal('fixtures/test.coffee'); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/test/PluginError.js b/node_modules/gulp-imagemin/node_modules/gulp-util/test/PluginError.js deleted file mode 100644 index 6dc23c0c..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/test/PluginError.js +++ /dev/null @@ -1,70 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('PluginError()', function(){ - it('should print the plugin name in toString', function(done){ - var err = new util.PluginError('test', 'something broke'); - err.toString().indexOf('test').should.not.equal(-1); - done(); - }); - - it('should not include the stack by default in toString', function(done){ - var err = new util.PluginError('test', 'something broke'); - // just check that there are no 'at' lines - err.toString().indexOf('at').should.equal(-1); - done(); - }); - - it('should include the stack when specified in toString', function(done){ - var err = new util.PluginError('test', 'something broke', {stack: "at huh", showStack: true}); - // just check that there are 'at' lines - err.toString().indexOf('at').should.not.equal(-1); - done(); - }); - - it('should take arguments as one object', function(done){ - var err = new util.PluginError({ - plugin: 'test', - message: 'something broke' - }); - err.plugin.should.equal('test'); - err.message.should.equal('something broke'); - done(); - }); - - it('should take arguments as plugin name and one object', function(done){ - var err = new util.PluginError('test', { - message: 'something broke' - }); - err.plugin.should.equal('test'); - err.message.should.equal('something broke'); - done(); - }); - - it('should take arguments as plugin name and message', function(done){ - var err = new util.PluginError('test', 'something broke'); - err.plugin.should.equal('test'); - err.message.should.equal('something broke'); - done(); - }); - - it('should take arguments as plugin name, message, and one object', function(done){ - var err = new util.PluginError('test', 'something broke', {showStack: true}); - err.plugin.should.equal('test'); - err.message.should.equal('something broke'); - err.showStack.should.equal(true); - done(); - }); - - it('should take arguments as plugin name, error, and one object', function(done){ - var realErr = new Error('something broke'); - var err = new util.PluginError('test', realErr, {showStack: true}); - err.plugin.should.equal('test'); - err.message.should.equal('something broke'); - err.showStack.should.equal(true); - done(); - }); - -}); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/test/beep.js b/node_modules/gulp-imagemin/node_modules/gulp-util/test/beep.js deleted file mode 100644 index e3e71073..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/test/beep.js +++ /dev/null @@ -1,23 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('beep()', function(){ - it('should send the right code to stdout', function(done){ - var writtenValue; - - // Stub process.stdout.write - var stdout_write = process.stdout.write; - process.stdout.write = function(value) { - writtenValue = value; - }; - - util.beep(); - writtenValue.should.equal('\x07'); - - // Restore process.stdout.write - process.stdout.write = stdout_write; - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/test/buffer.js b/node_modules/gulp-imagemin/node_modules/gulp-util/test/buffer.js deleted file mode 100644 index 6b4de67f..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/test/buffer.js +++ /dev/null @@ -1,36 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -var es = require('event-stream'); -require('mocha'); - -describe('buffer()', function(){ - it('should buffer stuff and return an array into the callback', function(done){ - var src = [1,2,3]; - var inp = es.readArray(src); - inp.pipe(util.buffer(function(err, data){ - should.not.exist(err); - should.exist(data); - data.should.eql(src); - done(); - })); - }); - it('should buffer stuff and emit it as a data event', function(done){ - var src = [1,2,3]; - var inp = es.readArray(src); - inp.pipe(util.buffer()).on('data', function(data){ - should.exist(data); - data.should.eql(src); - done(); - }); - }); - it('should buffer stuff and return a stream with the buffered data', function(done){ - var src = [1,2,3]; - var inp = es.readArray(src); - inp.pipe(util.buffer()).pipe(es.through(function(data) { - should.exist(data); - data.should.eql(src); - done(); - })); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/test/colors.js b/node_modules/gulp-imagemin/node_modules/gulp-util/test/colors.js deleted file mode 100644 index 970367e2..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/test/colors.js +++ /dev/null @@ -1,11 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('colors', function(){ - it('should be a chalk instance', function(done){ - util.colors.should.equal(require('chalk')); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/test/combine.js b/node_modules/gulp-imagemin/node_modules/gulp-util/test/combine.js deleted file mode 100644 index a54f0012..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/test/combine.js +++ /dev/null @@ -1,38 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -var es = require('event-stream'); -var Stream = require('stream'); -require('mocha'); - -describe('combine()', function(){ - it('should return a function', function(done){ - var src = [1,2,3]; - var inp = es.readArray(src); - var factory = util.combine(inp); - factory.should.be.type('function'); - done(); - }); - it('should return a function that returns a stream combination', function(done){ - var src = [1,2,3]; - var inp = es.readArray(src); - var inp2 = es.writeArray(function(err, data){ - should.not.exist(err); - data.should.eql(src); - done(); - }); - var factory = util.combine(inp, inp2); - factory().should.be.instanceof(Stream); - }); - it('should return a function that returns a stream combination when given an array', function(done){ - var src = [1,2,3]; - var inp = es.readArray(src); - var inp2 = es.writeArray(function(err, data){ - should.not.exist(err); - data.should.eql(src); - done(); - }); - var factory = util.combine([inp, inp2]); - factory().should.be.instanceof(Stream); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/test/date.js b/node_modules/gulp-imagemin/node_modules/gulp-util/test/date.js deleted file mode 100644 index 21f52ee9..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/test/date.js +++ /dev/null @@ -1,17 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('date', function() { - it('should be a date format instance', function(done) { - util.date.should.equal(require('dateformat')); - done(); - }); - it('should return today\'s date', function(done) { - var time = new Date(); - var dateutil = util.date('HH:MM:ss'); - dateutil.should.equal(('0' + time.getHours()).slice(-2) + ':' + ('0' + time.getMinutes()).slice(-2) + ':' + ('0' + time.getSeconds()).slice(-2)); - done(); - }) -}); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/test/env.js b/node_modules/gulp-imagemin/node_modules/gulp-util/test/env.js deleted file mode 100644 index d3942940..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/test/env.js +++ /dev/null @@ -1,12 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('env', function(){ - it('should exist', function(done){ - should.exist(util.env); - should.exist(util.env._); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/test/isBuffer.js b/node_modules/gulp-imagemin/node_modules/gulp-util/test/isBuffer.js deleted file mode 100644 index ad09bbf5..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/test/isBuffer.js +++ /dev/null @@ -1,16 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -var through = require('through2'); -require('mocha'); - -describe('isBuffer()', function(){ - it('should work on a buffer', function(done){ - util.isBuffer(new Buffer('huh')).should.equal(true); - done(); - }); - it('should not work on a stream', function(done){ - util.isBuffer(through()).should.equal(false); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/test/isNull.js b/node_modules/gulp-imagemin/node_modules/gulp-util/test/isNull.js deleted file mode 100644 index 841fc46b..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/test/isNull.js +++ /dev/null @@ -1,20 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -var through = require('through2'); -require('mocha'); - -describe('isNull()', function(){ - it('should work on a null', function(done){ - util.isNull(null).should.equal(true); - done(); - }); - it('should not work on a stream', function(done){ - util.isNull(through()).should.equal(false); - done(); - }); - it('should not work on undefined', function(done){ - util.isNull(undefined).should.equal(false); - done(); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/test/isStream.js b/node_modules/gulp-imagemin/node_modules/gulp-util/test/isStream.js deleted file mode 100644 index 3935324b..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/test/isStream.js +++ /dev/null @@ -1,16 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -var through = require('through2'); -require('mocha'); - -describe('isStream()', function(){ - it('should work on a stream', function(done){ - util.isStream(through()).should.equal(true); - done(); - }); - it('should not work on a buffer', function(done){ - util.isStream(new Buffer('huh')).should.equal(false); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/test/linefeed.js b/node_modules/gulp-imagemin/node_modules/gulp-util/test/linefeed.js deleted file mode 100644 index 72f61ca0..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/test/linefeed.js +++ /dev/null @@ -1,5 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/test/log.js b/node_modules/gulp-imagemin/node_modules/gulp-util/test/log.js deleted file mode 100644 index 71c6417a..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/test/log.js +++ /dev/null @@ -1,23 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('log()', function(){ - it('should work i guess', function(done){ - var writtenValue; - - // Stub process.stdout.write - var stdout_write = process.stdout.write; - process.stdout.write = function(value) { - writtenValue = value; - }; - - util.log(1, 2, 3, 4, 'five'); - writtenValue.should.eql('['+util.colors.green('gulp')+'] 1 2 3 4 five\n'); - - // Restore process.stdout.write - process.stdout.write = stdout_write; - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/test/noop.js b/node_modules/gulp-imagemin/node_modules/gulp-util/test/noop.js deleted file mode 100644 index 0d75b35c..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/test/noop.js +++ /dev/null @@ -1,24 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -var es = require('event-stream'); -require('mocha'); - -describe('noop()', function(){ - it('should return a stream', function(done){ - util.isStream(util.noop()).should.equal(true); - done(); - }); - it('should return a stream that passes through all data', function(done){ - var inp = [1,2,3,4,5,6,7,8,9]; - var stream = util.noop(); - es.readArray(inp) - .pipe(stream) - .pipe(es.writeArray(function(err, arr){ - should.not.exist(err); - should.exist(arr); - arr.should.eql(inp); - done(); - })); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/test/replaceExtension.js b/node_modules/gulp-imagemin/node_modules/gulp-util/test/replaceExtension.js deleted file mode 100644 index b9c65662..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/test/replaceExtension.js +++ /dev/null @@ -1,34 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('replaceExtension()', function() { - it('should return a valid replaced extension on nested', function(done) { - var fname = path.join(__dirname, './fixtures/test.coffee'); - var expected = path.join(__dirname, './fixtures/test.js'); - var nu = util.replaceExtension(fname, '.js'); - should.exist(nu); - nu.should.equal(expected); - done(); - }); - - it('should return a valid replaced extension on flat', function(done) { - var fname = 'test.coffee'; - var expected = 'test.js'; - var nu = util.replaceExtension(fname, '.js'); - should.exist(nu); - nu.should.equal(expected); - done(); - }); - - it('should not return a valid replaced extension on empty string', function(done) { - var fname = ''; - var expected = ''; - var nu = util.replaceExtension(fname, '.js'); - should.exist(nu); - nu.should.equal(expected); - done(); - }); - -}); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/gulp-util/test/template.js b/node_modules/gulp-imagemin/node_modules/gulp-util/test/template.js deleted file mode 100644 index 7664620a..00000000 --- a/node_modules/gulp-imagemin/node_modules/gulp-util/test/template.js +++ /dev/null @@ -1,99 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('template()', function(){ - it('should work with just a template', function(done){ - var opt = { - name:'todd', - file: { - path: 'hi.js' - } - }; - var expected = 'test todd hi.js'; - - var tmpl = util.template('test <%= name %> <%= file.path %>'); - should.exist(tmpl); - 'function'.should.equal(typeof(tmpl)); - - // eval it now - var etmpl = tmpl(opt); - 'string'.should.equal(typeof(etmpl)); - etmpl.should.equal(expected); - done(); - }); - - it('should work with a template and data', function(done){ - var opt = { - name:'todd', - file: { - path: 'hi.js' - } - }; - var expected = 'test todd hi.js'; - var tmpl = util.template('test <%= name %> <%= file.path %>', opt); - should.exist(tmpl); - 'string'.should.equal(typeof(tmpl)); - tmpl.should.equal(expected); - done(); - }); - - it('should throw an error when no file object is passed', function(done){ - var opt = { - name:'todd' - }; - try { - var tmpl = util.template('test <%= name %> <%= file.path %>', opt); - } catch (err) { - should.exist(err); - done(); - } - }); - - it('should ignore modified templateSettings', function(done){ - var templateSettings = require('lodash.templatesettings'); - templateSettings.interpolate = /\{\{([\s\S]+?)\}\}/g; - - var opt = { - name:'todd', - file: { - path: 'hi.js' - } - }; - var expected = 'test {{name}} hi.js'; - - var tmpl = util.template('test {{name}} <%= file.path %>'); - should.exist(tmpl); - 'function'.should.equal(typeof(tmpl)); - - // eval it now - var etmpl = tmpl(opt); - 'string'.should.equal(typeof(etmpl)); - etmpl.should.equal(expected); - - done(); - }); - - it('should allow ES6 delimiters', function(done){ - var opt = { - name:'todd', - file: { - path: 'hi.js' - } - }; - var expected = 'test todd hi.js'; - - var tmpl = util.template('test ${name} ${file.path}'); - should.exist(tmpl); - 'function'.should.equal(typeof(tmpl)); - - // eval it now - var etmpl = tmpl(opt); - 'string'.should.equal(typeof(etmpl)); - etmpl.should.equal(expected); - - done(); - }); - -}); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/README.md b/node_modules/gulp-imagemin/node_modules/image-min/README.md deleted file mode 100644 index 3f096408..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# image-min [![Build Status](https://secure.travis-ci.org/kevva/image-min.png?branch=master)](http://travis-ci.org/kevva/image-min) - -Minify GIF, JPEG and PNG images seamlessly with Node.js. - -## Getting started - -Install with [npm](https://npmjs.org/package/image-min): `npm install image-min` - -## Examples - -`data` returns information about how much optimization was done. - -```js -var imagemin = require('image-min'); - -imagemin(img.gif, img-minified.gif, function (err, data) { - console.log('Saved ' + data.diffSize); -}); - -imagemin(img.jpg, img-minified.jpg, { progressive: true }, function (err, data) { - console.log('Saved ' + data.diffSize); -}); - -imagemin(img.png, img-minified.png, { optimizationLevel: 4 }, function (err, data) { - console.log('Saved ' + data.diffSize); -}); -``` - -## API - -### imagemin(src, dest, opts, cb) - -Optimize a `GIF`, `JPEG`, or `PNG` image by providing a `src` and `dest`. Use the -options below (optionally) to configure how your images are optimized. - -## Options - -### cache - -Type: `Boolean` -Default: `false` - -Whether to cache optimized images. - -### interlaced (GIF only) - -Type: `Boolean` -Default: `false` - -Interlace gif for progressive rendering. - -### optimizationLevel (PNG only) - -Type: `Number` -Default: `2` - -Select a optimization level between 0 and 7. - -### progressive (JPEG only) - -Type: `Boolean` -Default: `false` - -Lossless conversion to progressive. - -## Used by - -* [gulp-imagemin](https://github.com/sindresorhus/gulp-imagemin) -* [grunt-contrib-imagemin](https://github.com/gruntjs/grunt-contrib-imagemin) - -## License - -[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/imagemin.js b/node_modules/gulp-imagemin/node_modules/image-min/imagemin.js deleted file mode 100644 index b93d6b4e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/imagemin.js +++ /dev/null @@ -1,190 +0,0 @@ -'use strict'; - -var cache = require('cache-file'); -var endsWith = require('mout/string/endsWith'); -var filesize = require('filesize'); -var find = require('mout/array/find'); -var fs = require('fs'); -var isFunction = require('mout/lang/isFunction'); -var mkdir = require('mkdirp'); -var path = require('path'); -var spawn = require('child_process').spawn; - -/** - * Initialize `Imagemin` with options - * - * @param {String} src - * @param {String} dest - * @param {Object} opts - * @api private - */ - -function Imagemin(src, dest, opts) { - opts = opts || {}; - this.opts = opts; - this.src = src; - this.dest = dest; - this.optimizers = { - '.gif': this._optimizeGif, - '.jpg': this._optimizeJpeg, - '.jpeg': this._optimizeJpeg, - '.png': this._optimizePng - }; - this.optimizerTypes = Object.keys(this.optimizers); - this.optimizer = this._getOptimizer(this.src); -} - -/** - * Optimize GIF, JPEG, and PNG images - * - * @param {Function} cb - * @api public - */ - -Imagemin.prototype.optimize = function (cb) { - if (!cb || !isFunction(cb)) { - cb = function () {}; - } - - if (!fs.existsSync(path.dirname(this.dest))) { - mkdir.sync(path.dirname(this.dest)); - } - - if (this.opts.cache && cache.check(this.src)) { - cache.get(this.src, this.dest); - return cb(null, this._process()); - } - - if (!isFunction(this.optimizer)) { - return cb(); - } - - var self = this; - var optimizer = this.optimizer(this.src, this.dest, cb); - - optimizer.on('error', function (err) { - return cb(new Error(err)); - }); - - optimizer.stderr.on('data', function (data) { - return cb(new Error(data.toString())); - }); - - optimizer.once('close', function (code) { - if (code === 0) { - return cb(null, self._process()); - } - }); -}; - -/** - * Get the optimizer for a desired file - * - * @param {String} src - * @api private - */ - -Imagemin.prototype._getOptimizer = function (src) { - src = src.toLowerCase(); - - var ext = find(this.optimizerTypes, function (ext) { - return endsWith(src, ext); - }); - - return ext ? this.optimizers[ext] : null; -}; - -/** - * Optimize a GIF image - * - * @param {String} src - * @param {String} dest - * @api private - */ - -Imagemin.prototype._optimizeGif = function (src, dest) { - var args = ['-w']; - var gifsicle = require('gifsicle').path; - - if (this.opts.interlaced) { - args.push('--interlace'); - } - - return spawn(gifsicle, args.concat(['-o', dest, src])); -}; - -/** - * Optimize a JPEG image - * - * @param {String} src - * @param {String} dest - * @api private - */ - -Imagemin.prototype._optimizeJpeg = function (src, dest) { - var args = ['-copy', 'none', '-optimize']; - var jpegtran = require('jpegtran-bin').path; - - if (this.opts.progressive) { - args.push('-progressive'); - } - - return spawn(jpegtran, args.concat(['-outfile', dest, src])); -}; - -/** - * Optimize a PNG image - * - * @param {String} src - * @param {String} dest - * @api private - */ - -Imagemin.prototype._optimizePng = function (src, dest) { - var args = ['-strip', 'all', '-quiet']; - var optipng = require('optipng-bin').path; - - if (typeof this.opts.optimizationLevel === 'number') { - args.push('-o', this.opts.optimizationLevel); - } - - return spawn(optipng, args.concat(['-out', dest, src])); -}; - -/** - * Process optimized images - * - * @api private - */ - -Imagemin.prototype._process = function () { - var size = fs.statSync(this.src).size; - var saved = size - fs.statSync(this.dest).size; - - if (this.opts.cache && !cache.check(this.src)) { - cache.store(this.dest, this.src); - } - - var data = { - origSize: filesize(size), - origSizeRaw: size, - diffSize: filesize(saved), - diffSizeRaw: saved - }; - - return data; -}; - -/** - * Module exports - */ - -module.exports = function (src, dest, opts, cb) { - if (!cb && isFunction(opts)) { - cb = opts; - opts = {}; - } - - var imagemin = new Imagemin(src, dest, opts); - return imagemin.optimize(cb); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/.bin/gifsicle b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/.bin/gifsicle deleted file mode 120000 index a098fdb4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/.bin/gifsicle +++ /dev/null @@ -1 +0,0 @@ -../gifsicle/bin/gifsicle.js \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/.bin/jpegtran b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/.bin/jpegtran deleted file mode 120000 index 16214f3c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/.bin/jpegtran +++ /dev/null @@ -1 +0,0 @@ -../jpegtran-bin/bin/jpegtran.js \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/.bin/optipng b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/.bin/optipng deleted file mode 120000 index 1297372d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/.bin/optipng +++ /dev/null @@ -1 +0,0 @@ -../optipng-bin/bin/optipng.js \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/README.md deleted file mode 100644 index 7bae2146..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# cache-file [![Build Status](https://secure.travis-ci.org/kevva/cache-file.png?branch=master)](http://travis-ci.org/kevva/cache-file) - -Store and get files from cache with Node.js. - -## Getting started - -Install with [npm](https://npmjs.org/package/cache-file): `npm install cache-file` - -## Examples - -```js -var cache = require('cache-file'); - -// store test.jpg inside a test folder in cache -cache.store('test.jpg'); - -// get test.jpg from cache and save it as test-restored.jpg -cache.get('test.jpg', 'test-restored.jpg'); - -// check if test.jpg exists in cache -cache.check('test.jpg'); - -// get the path to test.jpg in cache -cache.path('test.jpg'); - -// remove test.jpg from cache -cache.clean('test.jpg'); -``` - -## API - -### .store(src, dest) - -Store a file inside cache. Use `dest` to specify a custom name. - -### .get(src, dest) - -Get a cached file and save it to a desired location. - -### .check(src) - -Check if a cached file exists. - -### .path(src) - -Get the path to a cached file. - -### .clean(src) - -Remove a file from cache. - -## License - -[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/index.js deleted file mode 100644 index b87cb782..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/index.js +++ /dev/null @@ -1,95 +0,0 @@ -'use strict'; - -var fs = require('fs'); -var hashfile = require('hash-file'); -var mkdir = require('mkdirp'); -var path = require('path'); -var rm = require('rimraf'); -var tmp = require('os').tmpdir(); - -/** - * Cache a file - * - * @param {String} src - * @param {String} dest - * @api public - */ - -module.exports.store = function (src, dest) { - var cache = dest ? path.join(tmp, hashfile(dest)) : path.join(tmp, hashfile(src)); - - if (!fs.existsSync(cache)) { - if (!fs.existsSync(path.dirname(cache))) { - mkdir.sync(path.dirname(cache)); - } - - fs.createReadStream(src).pipe(fs.createWriteStream(cache)); - } -}; - -/** - * Get a cached file - * - * @param {String} src - * @param {String} dest - * @api public - */ - -module.exports.get = function (src, dest) { - var cache = path.join(tmp, hashfile(src)); - - if (fs.existsSync(cache)) { - if (!fs.existsSync(path.dirname(dest))) { - mkdir.sync(path.dirname(dest)); - } - - fs.createReadStream(cache).pipe(fs.createWriteStream(dest)); - } -}; - -/** - * Check if a file exists in cache - * - * @param {String} src - * @api public - */ - -module.exports.check = function (src) { - var cache = path.join(tmp, hashfile(src)); - - if (fs.existsSync(cache)) { - return true; - } - - return false; -}; - -/** - * Get the path to a cached file - * - * @param {String} src - * @api public - */ - -module.exports.path = function (src) { - var cache = path.join(tmp, hashfile(src)); - - if (fs.existsSync(cache)) { - return path.resolve(cache); - } -}; - -/** - * Clean cache - * - * @param {String} src - * @api public - */ - -module.exports.clean = function (src) { - var cache = path.join(tmp, hashfile(src)); - - if (fs.existsSync(cache)) { - rm.sync(cache); - } -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/.bin/rimraf b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/.bin/rimraf deleted file mode 120000 index 4cd49a49..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/.bin/rimraf +++ /dev/null @@ -1 +0,0 @@ -../rimraf/bin.js \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/hash-file/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/hash-file/README.md deleted file mode 100644 index 95a89599..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/hash-file/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# hash-file [![Build Status](https://secure.travis-ci.org/kevva/hash-file.png?branch=master)](http://travis-ci.org/kevva/hash-file) - -Create a hashed file name with Node.js. - -## Getting started - -Install with [npm](https://npmjs.org/package/hash-file): `npm install hash-file` - -## Examples - -```js -var hashfile = require('hash-file'); - -hashfile('test.zip'); -``` - -## API - -### hashfile(src) - -Create a hashed file name from a files content. - -## License - -[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/hash-file/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/hash-file/index.js deleted file mode 100644 index 52a32f25..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/hash-file/index.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -var crypto = require('crypto'); -var fs = require('fs'); - -module.exports = function (src) { - var data; - - if (Buffer.isBuffer(src)) { - data = src.toString('utf8'); - } else { - data = fs.readFileSync(String(src), 'utf8'); - } - - return crypto.createHash('sha1').update(data).digest('hex'); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/hash-file/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/hash-file/package.json deleted file mode 100644 index c1364af7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/hash-file/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "hash-file", - "version": "0.1.0", - "description": "Create a hashed file name", - "keywords": [ - "file", - "hash", - "name" - ], - "homepage": "https://github.com/kevva/hash-file", - "bugs": { - "url": "https://github.com/kevva/hash-file/issues" - }, - "author": { - "name": "Kevin Martensson", - "email": "kevinmartensson@gmail.com", - "url": "http://kevinmartensson.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/kevva/hash-file.git" - }, - "scripts": { - "test": "mocha --reporter list" - }, - "main": "index.js", - "files": [ - "index.js" - ], - "devDependencies": { - "mocha": "~1.17.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "readme": "# hash-file [![Build Status](https://secure.travis-ci.org/kevva/hash-file.png?branch=master)](http://travis-ci.org/kevva/hash-file)\n\nCreate a hashed file name with Node.js.\n\n## Getting started\n\nInstall with [npm](https://npmjs.org/package/hash-file): `npm install hash-file`\n\n## Examples\n\n```js\nvar hashfile = require('hash-file');\n\nhashfile('test.zip');\n```\n\n## API\n\n### hashfile(src)\n\nCreate a hashed file name from a files content.\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com)\n", - "readmeFilename": "README.md", - "_id": "hash-file@0.1.0", - "dist": { - "shasum": "3bbce661e2589c56aeae6c3f06738071e9704618" - }, - "_from": "hash-file@~0.1.0", - "_resolved": "https://registry.npmjs.org/hash-file/-/hash-file-0.1.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/AUTHORS b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/AUTHORS deleted file mode 100644 index 247b7543..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/AUTHORS +++ /dev/null @@ -1,6 +0,0 @@ -# Authors sorted by whether or not they're me. -Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me) -Wayne Larsen <wayne@larsen.st> (http://github.com/wvl) -ritch <skawful@gmail.com> -Marcel Laverdet -Yosef Dinerstein <yosefd@microsoft.com> diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/LICENSE deleted file mode 100644 index 05a40109..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/README.md deleted file mode 100644 index cd123b65..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/README.md +++ /dev/null @@ -1,30 +0,0 @@ -`rm -rf` for node. - -Install with `npm install rimraf`, or just drop rimraf.js somewhere. - -## API - -`rimraf(f, callback)` - -The callback will be called with an error if there is one. Certain -errors are handled for you: - -* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of - `opts.maxBusyTries` times before giving up. -* `ENOENT` - If the file doesn't exist, rimraf will return - successfully, since your desired outcome is already the case. - -## rimraf.sync - -It can remove stuff synchronously, too. But that's not so good. Use -the async API. It's better. - -## CLI - -If installed with `npm install rimraf -g` it can be used as a global -command `rimraf <path>` which is useful for cross platform support. - -## mkdirp - -If you need to create a directory recursively, check out -[mkdirp](https://github.com/substack/node-mkdirp). diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/bin.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/bin.js deleted file mode 100755 index 29bfa8a6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/bin.js +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env node - -var rimraf = require('./') - -var help = false -var dashdash = false -var args = process.argv.slice(2).filter(function(arg) { - if (dashdash) - return !!arg - else if (arg === '--') - dashdash = true - else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) - help = true - else - return !!arg -}); - -if (help || args.length === 0) { - // If they didn't ask for help, then this is not a "success" - var log = help ? console.log : console.error - log('Usage: rimraf <path>') - log('') - log(' Deletes all files and folders at "path" recursively.') - log('') - log('Options:') - log('') - log(' -h, --help Display this usage info') - process.exit(help ? 0 : 1) -} else { - args.forEach(function(arg) { - rimraf.sync(arg) - }) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/package.json deleted file mode 100644 index 749964b9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "rimraf", - "version": "2.2.6", - "main": "rimraf.js", - "description": "A deep deletion module for node (like `rm -rf`)", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": { - "type": "MIT", - "url": "https://github.com/isaacs/rimraf/raw/master/LICENSE" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/rimraf.git" - }, - "scripts": { - "test": "cd test && bash run.sh" - }, - "bin": { - "rimraf": "./bin.js" - }, - "contributors": [ - { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - { - "name": "Wayne Larsen", - "email": "wayne@larsen.st", - "url": "http://github.com/wvl" - }, - { - "name": "ritch", - "email": "skawful@gmail.com" - }, - { - "name": "Marcel Laverdet" - }, - { - "name": "Yosef Dinerstein", - "email": "yosefd@microsoft.com" - } - ], - "readme": "`rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one. Certain\nerrors are handled for you:\n\n* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of\n `opts.maxBusyTries` times before giving up.\n* `ENOENT` - If the file doesn't exist, rimraf will return\n successfully, since your desired outcome is already the case.\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too. But that's not so good. Use\nthe async API. It's better.\n\n## CLI\n\nIf installed with `npm install rimraf -g` it can be used as a global\ncommand `rimraf <path>` which is useful for cross platform support.\n\n## mkdirp\n\nIf you need to create a directory recursively, check out\n[mkdirp](https://github.com/substack/node-mkdirp).\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/rimraf/issues" - }, - "homepage": "https://github.com/isaacs/rimraf", - "_id": "rimraf@2.2.6", - "dist": { - "shasum": "7ada6a6d39b2301af3c8fe7b936c2e46e7c4463d" - }, - "_from": "rimraf@~2.2.2", - "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.6.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/rimraf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/rimraf.js deleted file mode 100644 index ce62051f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/rimraf.js +++ /dev/null @@ -1,178 +0,0 @@ -module.exports = rimraf -rimraf.sync = rimrafSync - -var path = require("path") -var fs = require("fs") - -// for EMFILE handling -var timeout = 0 -exports.EMFILE_MAX = 1000 -exports.BUSYTRIES_MAX = 3 - -var isWindows = (process.platform === "win32") - -function rimraf (p, cb) { - if (!cb) throw new Error("No callback passed to rimraf()") - - var busyTries = 0 - rimraf_(p, function CB (er) { - if (er) { - if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY") && - busyTries < exports.BUSYTRIES_MAX) { - busyTries ++ - var time = busyTries * 100 - // try again, with the same exact callback as this one. - return setTimeout(function () { - rimraf_(p, CB) - }, time) - } - - // this one won't happen if graceful-fs is used. - if (er.code === "EMFILE" && timeout < exports.EMFILE_MAX) { - return setTimeout(function () { - rimraf_(p, CB) - }, timeout ++) - } - - // already gone - if (er.code === "ENOENT") er = null - } - - timeout = 0 - cb(er) - }) -} - -// Two possible strategies. -// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR -// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR -// -// Both result in an extra syscall when you guess wrong. However, there -// are likely far more normal files in the world than directories. This -// is based on the assumption that a the average number of files per -// directory is >= 1. -// -// If anyone ever complains about this, then I guess the strategy could -// be made configurable somehow. But until then, YAGNI. -function rimraf_ (p, cb) { - fs.unlink(p, function (er) { - if (er) { - if (er.code === "ENOENT") - return cb(null) - if (er.code === "EPERM") - return (isWindows) ? fixWinEPERM(p, er, cb) : rmdir(p, er, cb) - if (er.code === "EISDIR") - return rmdir(p, er, cb) - } - return cb(er) - }) -} - -function fixWinEPERM (p, er, cb) { - fs.chmod(p, 666, function (er2) { - if (er2) - cb(er2.code === "ENOENT" ? null : er) - else - fs.stat(p, function(er3, stats) { - if (er3) - cb(er3.code === "ENOENT" ? null : er) - else if (stats.isDirectory()) - rmdir(p, er, cb) - else - fs.unlink(p, cb) - }) - }) -} - -function fixWinEPERMSync (p, er, cb) { - try { - fs.chmodSync(p, 666) - } catch (er2) { - if (er2.code !== "ENOENT") - throw er - } - - try { - var stats = fs.statSync(p) - } catch (er3) { - if (er3 !== "ENOENT") - throw er - } - - if (stats.isDirectory()) - rmdirSync(p, er) - else - fs.unlinkSync(p) -} - -function rmdir (p, originalEr, cb) { - // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) - // if we guessed wrong, and it's not a directory, then - // raise the original error. - fs.rmdir(p, function (er) { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) - rmkids(p, cb) - else if (er && er.code === "ENOTDIR") - cb(originalEr) - else - cb(er) - }) -} - -function rmkids(p, cb) { - fs.readdir(p, function (er, files) { - if (er) - return cb(er) - var n = files.length - if (n === 0) - return fs.rmdir(p, cb) - var errState - files.forEach(function (f) { - rimraf(path.join(p, f), function (er) { - if (errState) - return - if (er) - return cb(errState = er) - if (--n === 0) - fs.rmdir(p, cb) - }) - }) - }) -} - -// this looks simpler, and is strictly *faster*, but will -// tie up the JavaScript thread and fail on excessively -// deep directory trees. -function rimrafSync (p) { - try { - fs.unlinkSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - if (er.code === "EPERM") - return isWindows ? fixWinEPERMSync(p, er) : rmdirSync(p, er) - if (er.code !== "EISDIR") - throw er - rmdirSync(p, er) - } -} - -function rmdirSync (p, originalEr) { - try { - fs.rmdirSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - if (er.code === "ENOTDIR") - throw originalEr - if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") - rmkidsSync(p) - } -} - -function rmkidsSync (p) { - fs.readdirSync(p).forEach(function (f) { - rimrafSync(path.join(p, f)) - }) - fs.rmdirSync(p) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/test/run.sh b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/test/run.sh deleted file mode 100644 index 598f0163..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/test/run.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -set -e -for i in test-*.js; do - echo -n $i ... - bash setup.sh - node $i - ! [ -d target ] - echo "pass" -done -rm -rf target diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/test/setup.sh b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/test/setup.sh deleted file mode 100644 index 2602e631..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/test/setup.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -set -e - -files=10 -folders=2 -depth=4 -target="$PWD/target" - -rm -rf target - -fill () { - local depth=$1 - local files=$2 - local folders=$3 - local target=$4 - - if ! [ -d $target ]; then - mkdir -p $target - fi - - local f - - f=$files - while [ $f -gt 0 ]; do - touch "$target/f-$depth-$f" - let f-- - done - - let depth-- - - if [ $depth -le 0 ]; then - return 0 - fi - - f=$folders - while [ $f -gt 0 ]; do - mkdir "$target/folder-$depth-$f" - fill $depth $files $folders "$target/d-$depth-$f" - let f-- - done -} - -fill $depth $files $folders $target - -# sanity assert -[ -d $target ] diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/test/test-async.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/test/test-async.js deleted file mode 100644 index 9c2e0b7b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/test/test-async.js +++ /dev/null @@ -1,5 +0,0 @@ -var rimraf = require("../rimraf") - , path = require("path") -rimraf(path.join(__dirname, "target"), function (er) { - if (er) throw er -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/test/test-sync.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/test/test-sync.js deleted file mode 100644 index eb71f104..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/node_modules/rimraf/test/test-sync.js +++ /dev/null @@ -1,3 +0,0 @@ -var rimraf = require("../rimraf") - , path = require("path") -rimraf.sync(path.join(__dirname, "target")) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/package.json deleted file mode 100644 index f3fc68ad..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/cache-file/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "cache-file", - "version": "0.1.4", - "description": "Store and get files from cache", - "keywords": [ - "cache", - "store" - ], - "homepage": "https://github.com/kevva/cache-file", - "bugs": { - "url": "https://github.com/kevva/cache-file/issues" - }, - "author": { - "name": "Kevin Martensson", - "email": "kevinmartensson@gmail.com", - "url": "http://kevinmartensson.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/kevva/cache-file.git" - }, - "scripts": { - "test": "mocha --reporter list" - }, - "main": "index.js", - "files": [ - "index.js" - ], - "dependencies": { - "hash-file": "~0.1.0", - "mkdirp": "~0.3.5", - "rimraf": "~2.2.2" - }, - "devDependencies": { - "mocha": "~1.12.0", - "each-async": "~0.1.1" - }, - "engines": { - "node": ">=0.10.0" - }, - "readme": "# cache-file [![Build Status](https://secure.travis-ci.org/kevva/cache-file.png?branch=master)](http://travis-ci.org/kevva/cache-file)\n\nStore and get files from cache with Node.js.\n\n## Getting started\n\nInstall with [npm](https://npmjs.org/package/cache-file): `npm install cache-file`\n\n## Examples\n\n```js\nvar cache = require('cache-file');\n\n// store test.jpg inside a test folder in cache\ncache.store('test.jpg');\n\n// get test.jpg from cache and save it as test-restored.jpg\ncache.get('test.jpg', 'test-restored.jpg');\n\n// check if test.jpg exists in cache\ncache.check('test.jpg');\n\n// get the path to test.jpg in cache\ncache.path('test.jpg');\n\n// remove test.jpg from cache\ncache.clean('test.jpg');\n```\n\n## API\n\n### .store(src, dest)\n\nStore a file inside cache. Use `dest` to specify a custom name.\n\n### .get(src, dest)\n\nGet a cached file and save it to a desired location.\n\n### .check(src)\n\nCheck if a cached file exists.\n\n### .path(src)\n\nGet the path to a cached file.\n\n### .clean(src)\n\nRemove a file from cache.\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com)\n", - "readmeFilename": "README.md", - "_id": "cache-file@0.1.4", - "dist": { - "shasum": "532cb94bbc700b6496007ddd330539115b8937f7" - }, - "_from": "cache-file@~0.1.1", - "_resolved": "https://registry.npmjs.org/cache-file/-/cache-file-0.1.4.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/bin/gifsicle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/bin/gifsicle.js deleted file mode 100755 index 16935475..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/bin/gifsicle.js +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var binPath = require('../lib/gifsicle').path; -var spawn = require('child_process').spawn; - -spawn(binPath, process.argv.slice(2), { stdio: 'inherit' }) - .on('exit', process.exit); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/lib/check.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/lib/check.js deleted file mode 100644 index 725e38af..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/lib/check.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -var bin = require('./gifsicle').bin; -var chalk = require('chalk'); - -bin.check(function (w) { - if (!w) { - console.log(chalk.red('✗ pre-build test failed, compiling from source...')); - - if (process.platform === 'win32') { - throw new Error('building is not supported on ' + process.platform); - } - - return bin.build(function (err) { - if (err) { - return console.log(chalk.red('✗ ' + err.message)); - } - - console.log(chalk.green('✓ gifsicle rebuilt successfully')); - }); - } - - console.log(chalk.green('✓ pre-build test passed successfully')); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/lib/gifsicle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/lib/gifsicle.js deleted file mode 100644 index e216b386..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/lib/gifsicle.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; - -var Bin = require('bin-wrapper'); -var path = require('path'); - -var options = { - name: 'gifsicle', - bin: 'gifsicle', - path: path.join(__dirname, '../vendor'), - src: 'http://www.lcdf.org/gifsicle/gifsicle-1.71.tar.gz', - buildScript: './configure --disable-gifview --disable-gifdiff ' + - '--bindir="' + path.join(__dirname, '../vendor') + '" && ' + - 'make install', - platform: { - darwin: { - url: 'https://raw.github.com/yeoman/node-gifsicle/master/vendor/osx/gifsicle' - }, - linux: { - url: 'https://raw.github.com/yeoman/node-gifsicle/master/vendor/linux/x86/gifsicle', - arch: { - x64: { - url: 'https://raw.github.com/yeoman/node-gifsicle/master/vendor/linux/x64/gifsicle' - } - } - }, - freebsd: { - url: 'https://raw.github.com/yeoman/node-gifsicle/master/vendor/freebsd/x86/gifsicle', - arch: { - x64: { - url: 'https://raw.github.com/yeoman/node-gifsicle/master/vendor/freebsd/x64/gifsicle' - } - } - }, - win32: { - bin: 'gifsicle.exe', - url: 'https://raw.github.com/yeoman/node-gifsicle/master/vendor/win/x86/gifsicle.exe', - arch: { - x64: { - url: 'https://raw.github.com/yeoman/node-gifsicle/master/vendor/win/x64/gifsicle.exe' - } - } - } - } -}; -var bin = new Bin(options); - -exports.bin = bin; -exports.options = options; -exports.path = bin.path; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/README.md deleted file mode 100644 index 05419cd4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/README.md +++ /dev/null @@ -1,67 +0,0 @@ -# bin-wrapper [![Build Status](https://secure.travis-ci.org/kevva/bin-wrapper.png?branch=master)](http://travis-ci.org/kevva/bin-wrapper) - -Binary wrapper for Node.js that makes your programs seamlessly available as local dependencies - -## Getting started - -Install with [npm](https://npmjs.org/package/bin-wrapper): `npm install bin-wrapper` - -## Examples - -All `platform` and `arch` specific options takes precedence over the base -options. See [test.js](test.js) for a full fleshed example. - -```js -var Bin = require('bin-wrapper'); - -var opts = { - name: 'Gifsicle', - bin: 'gifsicle', - path: 'vendor', - url: 'http://url/to/gifsicle', - src: 'http://www.lcdf.org/gifsicle/gifsicle-1.71.tar.gz', - buildScript: './configure --bindir="vendor" && make install', - platform: { - win32: { - bin: 'gifsicle.exe', - url: [ - 'http://url/to/gifsicle.exe' - 'http://url/to/gifsicle.dll' - ] - } - } -} -var bin = new Bin(opts); - -bin.check('--version', function (works) { - if (!works) { - console.log('Pre-build test failed, compiling from source'); - return bin.build(); - } - - console.log('Binary passed the test'); -}); -``` - -Get the path to your binary with `bin.path`. - -```js -console.log(bin.path); -// => path/to/vendor/gifsicle -``` - -## API - -### .check(cmd, cb) - -Check if a binary is present and working. If it isn't, download and test it by -running the binary with `cmd` and see if it exits correctly. - -### .build(cb) - -Download the source archive defined in the `src` property and build it using the -build script defined in the `buildScript` property. - -## License - -[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/bin-wrapper.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/bin-wrapper.js deleted file mode 100644 index ccfe9342..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/bin-wrapper.js +++ /dev/null @@ -1,222 +0,0 @@ -'use strict'; - -var download = require('download'); -var exec = require('child_process').exec; -var fs = require('fs'); -var hasOwn = require('mout/object/hasOwn'); -var isbin = require('isbin'); -var isFunction = require('mout/lang/isFunction'); -var mixIn = require('mout/object/mixIn'); -var os = require('os'); -var path = require('path'); -var ProgressBar = require('progress'); -var rm = require('rimraf'); -var spawn = require('child_process').spawn; -var which = require('which'); - -/** - * Initialize BinWrapper with options - * - * @param {Object} opts - * @api public - */ - -function BinWrapper(opts) { - opts = opts || {}; - this.opts = this._parse(opts); - this.name = this.opts.name; - this.bin = this.opts.bin; - this.dest = this.opts.path; - this.path = this._path() || path.join(this.dest, this.bin); - this.url = this.opts.url; - this.src = this.opts.src; - this.buildScript = this.opts.buildScript; - this.proxy = process.env.http_proxy || - process.env.HTTP_PROXY || - process.env.https_proxy || - process.env.HTTPS_PROXY || - null; -} - -/** - * Check if a binary is present and working - * - * @param {String|Array} cmd - * @param {Function} cb - * @api public - */ - -BinWrapper.prototype.check = function (cmd, cb) { - var self = this; - - if (!cb && isFunction(cmd)) { - cb = cmd; - cmd = ['--help']; - } - - cmd = cmd; - cmd = Array.isArray(cmd) ? cmd : [cmd]; - - if (this._path()) { - return self._test(cmd, cb); - } - - this._download(this.url, this.dest, { mode: '0755', proxy: this.proxy }) - .on('close', function () { - return self._test(cmd, cb); - }); -}; - -/** - * Download source and build a binary - * - * @param {Function} cb - * @api public - */ - -BinWrapper.prototype.build = function (cb) { - var self = this; - var tmpDir = os.tmpdir ? os.tmpdir() : os.tmpDir(); - var tmp = path.join(tmpDir, this.name); - var get = this._download(this.src, tmp, { mode: '0777', extract: true, strip: '1', proxy: this.proxy }); - - if (!cb || !isFunction(cb)) { - cb = function () {}; - } - - get.on('close', function () { - exec(self.buildScript, { cwd: tmp }, function (err) { - if (err) { - return cb(err); - } - - rm.sync(tmp); - - return cb(); - }); - }); -}; - -/** - * Download a string or an array of files - * - * @param {String|Array} src - * @param {String} dest - * @param {Object} opts - * @api private - */ - -BinWrapper.prototype._download = function (src, dest, opts) { - var get = download(src, dest, opts); - - get.on('response', function (res) { - var len = parseInt(res.headers['content-length'], 10); - var bar = new ProgressBar(' ' + path.basename(src) + ': downloading [:bar] :percent :etas', { - complete: '=', - incomplete: ' ', - width: 20, - total: len - }); - - res.on('data', function (data) { - bar.tick(data.length); - }); - - res.on('end', function () { - console.log('\n'); - }); - }); - - return get; -}; - -/** - * If a binary exists, get its path - * - * @api private - */ - -BinWrapper.prototype._path = function () { - var self = this; - - if (fs.existsSync(path.join(this.dest, this.bin))) { - return path.join(self.dest, self.bin); - } - - if (isbin(this.bin)) { - if (which.sync(self.bin).indexOf('node_modules/.bin') === -1) { - return which.sync(self.bin); - } - } - - return false; -}; - -/** - * Test if a binary is working by checking its exit code - * - * @param {Array} cmd - * @param {Function} cb - * @api private - */ - -BinWrapper.prototype._test = function (cmd, cb) { - var working; - var bin = spawn(this.path, cmd); - - bin.on('error', function () { - working = false; - return cb(working); - }); - - bin.on('exit', function (code) { - working = code === 0; - return cb(working); - }); -}; - -/** - * Parse options - * - * @param {Object} opts - * @api private - */ - -BinWrapper.prototype._parse = function (opts) { - opts.platform = opts.platform || {}; - opts.arch = opts.arch || {}; - - var platform = process.platform; - var arch = process.arch === 'x64' ? 'x64' : process.arch === 'arm' ? 'arm' : 'x86'; - var required = [ - 'bin', - 'name', - 'path', - 'url' - ]; - - if (hasOwn(opts.platform, [platform])) { - opts = mixIn(opts, opts.platform[platform]); - } - - if (hasOwn(opts.arch, [arch])) { - opts = mixIn(opts, opts.arch[arch]); - } - - required.forEach(function (val) { - if (!hasOwn(opts, val)) { - throw new Error(val + ' option is required'); - } - }); - - delete opts.platform; - delete opts.arch; - - return opts; -}; - -/** - * Module exports - */ - -module.exports = BinWrapper; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/.bin/rimraf b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/.bin/rimraf deleted file mode 120000 index 4cd49a49..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/.bin/rimraf +++ /dev/null @@ -1 +0,0 @@ -../rimraf/bin.js \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/.bin/which b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/.bin/which deleted file mode 120000 index f62471c8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/.bin/which +++ /dev/null @@ -1 +0,0 @@ -../which/bin/which \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/README.md deleted file mode 100644 index f57b2f41..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/README.md +++ /dev/null @@ -1,84 +0,0 @@ -# download [![Build Status](https://secure.travis-ci.org/kevva/download.png?branch=master)](http://travis-ci.org/kevva/download) - -Download and extract files effortlessly in Node.js. - -## Getting started - -Install with [npm](https://npmjs.org/package/download): `npm install download` - -## Examples - -If you're fetching an archive you can set `extract: true` in options and -it'll extract it for you. - -```js -var download = require('download'); - -// download and extract `foo.tar.gz` into `bar/` -download('foo.tar.gz', 'bar', { extract: true }); - -// download and save `foo.exe` into `bar/foo.exe` with mode `0755` -download('foo.exe', 'bar', { mode: '0755' }); - -// download and save `foo.zip` into `bar/foobar.zip` -download({ url: 'foo.zip', name: 'foobar.zip' }, 'bar'); - -// download and save an array of files in `bar/` -var files = ['foo.jpg', 'bar.jpg', 'cat.jpg']; -download(files, 'bar'); - -// download, save and rename an array of files in `bar/` -var files = [{ - url: 'foo.jpg', - name: 'foobar.jpg' -}, { - url: 'cat.jpg', - name: 'dog.jpg' -}]; -download(files, 'bar'); -``` - -## API - -### download(url, dest, opts) - -Download a file or an array of files to a given destination. Returns an EventEmitter -that emits the following possible events: - -* `response` — Relayed when the underlying `http.ClientRequest` emits the same -event. Listeners called with a `http.IncomingMessage` instance. -* `data` — Relayed when the underlying `http.IncomingMessage` emits the same -event. Listeners called with a `Buffer` instance. -* `error` — Relayed when the underlying `http.ClientRequest` emits the same event -or when the response status code is not in the 200s. Listeners called with an -`Error` instance (in the first case) or the response status code. -* `close` — Relayed when the underlying `stream.Duplex` emits the same event. - -## Options - -You can define options accepted by the [request](https://github.com/mikeal/request/) module besides from the options below. - -### extract - -Type: `Boolean` -Default: `false` - -If set to `true`, try extracting the file using [decompress](https://github.com/kevva/decompress/). - -### mode - -Type: `String` -Default: `undefined` - -Set mode on the downloaded files. - -### strip - -Type: `Number` -Default: `0` - -Equivalent to `--strip-components` for tar. - -## License - -[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/download.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/download.js deleted file mode 100644 index 4b9c05e2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/download.js +++ /dev/null @@ -1,100 +0,0 @@ -'use strict'; - -var decompress = require('decompress'); -var eachAsync = require('each-async'); -var fs = require('fs'); -var mkdir = require('mkdirp'); -var path = require('path'); -var request = require('request'); -var through = require('through2'); - -/** - * Download a file to a given destination - * - * Options: - * - * - `extract` Try extracting the file - * - `mode` Set mode on the downloaded files - * - `strip` Equivalent to --strip-components for tar - * - * @param {String|Array|Object} url - * @param {String} dest - * @param {Object} opts - * @api public - */ - -module.exports = function (url, dest, opts) { - url = Array.isArray(url) ? url : [url]; - opts = opts || {}; - - var stream = through(); - var strip = opts.strip || '0'; - - eachAsync(url, function (url, index, done) { - opts.url = url; - var target = path.join(dest, path.basename(url)); - - if (url.url && url.name) { - target = path.join(dest, url.name); - opts.url = url.url; - } - - var req = request.get(opts) - .on('response', function (res) { - stream.emit('response', res); - }) - .on('data', function (data) { - stream.emit('data', data); - }) - .on('error', function (err) { - stream.emit('error', err); - }); - - req.on('response', function (res) { - var mime = res.headers['content-type']; - var status = res.statusCode; - var end; - - if (status < 200 || status >= 300) { - stream.emit('error', status); - return; - } - - if (opts.extract && decompress.canExtract(url, mime)) { - var ext; - - if (decompress.canExtract(url)) { - ext = url; - } else { - ext = mime; - } - - end = decompress.extract({ - ext: ext, - path: dest, - strip: strip - }); - } else { - if (!fs.existsSync(dest)) { - mkdir.sync(dest); - } - - end = fs.createWriteStream(target); - } - - req.pipe(end); - - end.on('close', function () { - if (!opts.extract && opts.mode) { - fs.chmodSync(target, opts.mode); - } - - done(); - }); - }); - }, function () { - stream.emit('close'); - }); - - return stream; -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/README.md deleted file mode 100644 index 4226d3f5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# decompress [![Build Status](https://secure.travis-ci.org/kevva/decompress.png?branch=master)](http://travis-ci.org/kevva/decompress) - -Easily extract `.zip`, `.tar` and `.tar.gz` archives. Based on the extract -utility in [Bower](https://github.com/bower/bower). - -## Getting started - -Install with [npm](https://npmjs.org/package/decompress): `npm install decompress` - -## Examples - -You'll only need to pass a type into `ext` and it'll figure the rest out for -you. - -```js -var decompress = require('decompress'); -var fs = require('fs'); - -var src = fs.createReadStream('foo.tar.gz'); -var dest = decompress.extract({ ext: '.tar.gz' }); - -src.pipe(dest); -``` - -## API - -### .extract(opts) - -Extract an archive using the `ext` option to determine which extractor to use. -If no `path` is specified it'll extract it to your current location. - -### .canExtract(src, mime) - -Determine if a file can be extracted or not by checking the file extension -and/or the MIME type. - -```js -decompress.canExtract('foo.zip'); -// => true - -decompress.canExtract('application/zip'); -// => true -``` - -## Options - -### `ext` - -Type: `String` -Default: `''` - -String that can be a file name, URL, MIME type etc. - -### `path` - -Type: `String` -Default: `process.cwd()` - -Path to extract the archive to. If no `path` is defined it'll extract it to your -current location. - -### strip - -Type: `Number` -Default: `0` - -Equivalent to `--strip-components` for tar. - -## License - -[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/decompress.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/decompress.js deleted file mode 100644 index e110d93c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/decompress.js +++ /dev/null @@ -1,168 +0,0 @@ -'use strict'; - -var AdmZip = require('adm-zip'); -var endsWith = require('mout/string/endsWith'); -var find = require('mout/array/find'); -var fs = require('fs'); -var mkdir = require('mkdirp'); -var path = require('path'); -var pipeline = require('stream-combiner'); -var rm = require('rimraf'); -var tar = require('tar'); -var tempfile = require('tempfile'); -var zlib = require('zlib'); - -/** - * Initialize Decompress with options - * - * Options: - * - * - `ext` String with file name, MIME type, etc - * - `path` Path to extract to - * - * @param {Object} opts - * @api private - */ - -function Decompress(opts) { - opts = opts || {}; - opts.strip = opts.strip || 0; - this.opts = opts; - this.path = opts.path || process.cwd(); - this.ext = opts.ext || ''; - this.strip = opts.strip >= 0 ? opts.strip : 0; - this.extractors = { - '.zip': this._extractZip, - '.tar': this._extractTar, - '.tar.gz': this._extractTarGz, - '.tgz': this._extractTarGz, - 'application/zip': this._extractZip, - 'application/x-tar': this._extractTar, - 'application/x-tgz': this._extractTarGz - }; - this.extractorTypes = Object.keys(this.extractors); - this.extractor = this._getExtractor(this.ext); -} - -/** - * Extract an archive - * - * @api public - */ - -Decompress.prototype.extract = function () { - var self = this; - var stream = this.extractor(); - - if (!fs.existsSync(this.path)) { - mkdir.sync(self.path); - } - - return stream; -}; - -/** - * Check if a file can be extracted - * - * @param {String} src - * @param {String} mime - * @api public - */ - -Decompress.prototype.canExtract = function (src, mime) { - if (this._getExtractor(src)) { - return true; - } - - if (mime && this._getExtractor(mime)) { - return true; - } - - return false; -}; - -/** - * Get the extractor for a desired file - * - * @param {String} src - * @api private - */ - -Decompress.prototype._getExtractor = function (src) { - src = src.toLowerCase(); - - var ext = find(this.extractorTypes, function (ext) { - return endsWith(src, ext); - }); - - return ext ? this.extractors[ext] : null; -}; - -/** - * Extract a zip file - * - * @api private - */ - -Decompress.prototype._extractZip = function () { - var self = this; - var tmp = tempfile('.zip'); - - var stream = fs.createWriteStream(tmp).on('close', function () { - var zip = new AdmZip(tmp); - var zipEntries = zip.getEntries(); - - zipEntries.forEach(function (entry) { - if (!entry.isDirectory) { - var entryFile = path.basename(entry.entryName.toString()); - var entryDir = path.dirname(entry.entryName.toString().split('/').slice(self.strip).join('/')); - var dest = path.join(self.path, entryDir, entryFile); - - mkdir.sync(path.dirname(dest)); - fs.writeFileSync(dest, entry.getData()); - } - }); - }); - - return stream.on('close', function () { - rm.sync(tmp); - }); -}; - -/** - * Extract a tar file - * - * @api private - */ - -Decompress.prototype._extractTar = function () { - var stream = tar.Extract(this.opts); - return stream; -}; - -/** - * Extract a tar.gz file - * - * @api private - */ - -Decompress.prototype._extractTarGz = function () { - var stream = zlib.Unzip(); - var dest = tar.Extract(this.opts); - - return pipeline(stream, dest); -}; - -/** - * Module exports - */ - -module.exports.extract = function (opts) { - var decompress = new Decompress(opts); - return decompress.extract(); -}; - -module.exports.canExtract = function (src, mime) { - var decompress = new Decompress(); - return decompress.canExtract(src, mime); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/.idea/scopes/scope_settings.xml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/.idea/scopes/scope_settings.xml deleted file mode 100644 index 0d5175ca..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/.idea/scopes/scope_settings.xml +++ /dev/null @@ -1,5 +0,0 @@ -<component name="DependencyValidationManager"> - <state> - <option name="SKIP_IMPORT_STATEMENTS" value="false" /> - </state> -</component> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/MIT-LICENSE.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/MIT-LICENSE.txt deleted file mode 100644 index 14c3ee5c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/MIT-LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2012 Another-D-Mention Software and other contributors, -http://www.another-d-mention.ro/ - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/README.md deleted file mode 100644 index 030fab8a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/README.md +++ /dev/null @@ -1,64 +0,0 @@ -# ADM-ZIP for NodeJS - -ADM-ZIP is a pure JavaScript implementation for zip data compression for [NodeJS](http://nodejs.org/). - -# Installation - -With [npm](http://npmjs.org) do: - - $ npm install adm-zip - -## What is it good for? -The library allows you to: - -* decompress zip files directly to disk or in memory buffers -* compress files and store them to disk in .zip format or in compressed buffers -* update content of/add new/delete files from an existing .zip - -# Dependencies -There are no other nodeJS libraries that ADM-ZIP is dependent of - -# Examples - -## Basic usage -```javascript - - var AdmZip = require('adm-zip'); - - // reading archives - var zip = new AdmZip("./my_file.zip"); - var zipEntries = zip.getEntries(); // an array of ZipEntry records - - zipEntries.forEach(function(zipEntry) { - console.log(zipEntry.toString()); // outputs zip entries information - if (zipEntry.entryName == "my_file.txt") { - console.log(zipEntry.data.toString('utf8')); - } - }); - // outputs the content of some_folder/my_file.txt - console.log(zip.readAsText("some_folder/my_file.txt")); - // extracts the specified file to the specified location - zip.extractEntryTo(/*entry name*/"some_folder/my_file.txt", /*target path*/"/home/me/tempfolder", /*maintainEntryPath*/false, /*overwrite*/true); - // extracts everything - zip.extractAllTo(/*target path*/"/home/me/zipcontent/", /*overwrite*/true); - - - // creating archives - var zip = new AdmZip(); - - // add file directly - zip.addFile("test.txt", new Buffer("inner content of the file"), "entry comment goes here"); - // add local file - zip.addLocalFile("/home/me/some_picture.png"); - // get everything as a buffer - var willSendthis = zip.toBuffer(); - // or write everything to disk - zip.writeZip(/*target file name*/"/home/me/files.zip"); - - - // ... more examples in the wiki -``` - -For more detailed information please check out the [wiki](https://github.com/cthackers/adm-zip/wiki). - -[![build status](https://secure.travis-ci.org/cthackers/adm-zip.png)](http://travis-ci.org/cthackers/adm-zip) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/adm-zip.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/adm-zip.js deleted file mode 100644 index 46595fc5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/adm-zip.js +++ /dev/null @@ -1,404 +0,0 @@ -var fs = require("fs"), - pth = require("path"); - -fs.existsSync = fs.existsSync || pth.existsSync; - -var ZipEntry = require("./zipEntry"), - ZipFile = require("./zipFile"), - Utils = require("./util"); - -module.exports = function(/*String*/input) { - var _zip = undefined, - _filename = ""; - - if (input && typeof input === "string") { // load zip file - if (fs.existsSync(input)) { - _filename = input; - _zip = new ZipFile(input, Utils.Constants.FILE); - } else { - throw Utils.Errors.INVALID_FILENAME; - } - } else if(input && Buffer.isBuffer(input)) { // load buffer - _zip = new ZipFile(input, Utils.Constants.BUFFER); - } else { // create new zip file - _zip = new ZipFile(null, Utils.Constants.NONE); - } - - function getEntry(/*Object*/entry) { - if (entry && _zip) { - var item; - // If entry was given as a file name - if (typeof entry === "string") - item = _zip.getEntry(entry); - // if entry was given as a ZipEntry object - if (typeof entry === "object" && entry.entryName != undefined && entry.header != undefined) - item = _zip.getEntry(entry.entryName); - - if (item) { - return item; - } - } - return null; - } - - return { - /** - * Extracts the given entry from the archive and returns the content as a Buffer object - * @param entry ZipEntry object or String with the full path of the entry - * - * @return Buffer or Null in case of error - */ - readFile : function(/*Object*/entry) { - var item = getEntry(entry); - return item && item.getData() || null; - }, - - /** - * Asynchronous readFile - * @param entry ZipEntry object or String with the full path of the entry - * @param callback - * - * @return Buffer or Null in case of error - */ - readFileAsync : function(/*Object*/entry, /*Function*/callback) { - var item = getEntry(entry); - if (item) { - item.getDataAsync(callback); - } else { - callback(null,"getEntry failed for:" + entry) - } - }, - - /** - * Extracts the given entry from the archive and returns the content as plain text in the given encoding - * @param entry ZipEntry object or String with the full path of the entry - * @param encoding Optional. If no encoding is specified utf8 is used - * - * @return String - */ - readAsText : function(/*Object*/entry, /*String - Optional*/encoding) { - var item = getEntry(entry); - if (item) { - var data = item.getData(); - if (data && data.length) { - return data.toString(encoding || "utf8"); - } - } - return ""; - }, - - /** - * Asynchronous readAsText - * @param entry ZipEntry object or String with the full path of the entry - * @param callback - * @param encoding Optional. If no encoding is specified utf8 is used - * - * @return String - */ - readAsTextAsync : function(/*Object*/entry, /*Function*/callback, /*String - Optional*/encoding) { - var item = getEntry(entry); - if (item) { - item.getDataAsync(function(data) { - if (data && data.length) { - callback(data.toString(encoding || "utf8")); - } else { - callback(""); - } - }) - } else { - callback(""); - } - }, - - /** - * Remove the entry from the file or the entry and all it's nested directories and files if the given entry is a directory - * - * @param entry - */ - deleteFile : function(/*Object*/entry) { // @TODO: test deleteFile - var item = getEntry(entry); - if (item) { - _zip.deleteEntry(item.entryName); - } - }, - - /** - * Adds a comment to the zip. The zip must be rewritten after adding the comment. - * - * @param comment - */ - addZipComment : function(/*String*/comment) { // @TODO: test addZipComment - _zip.comment = comment; - }, - - /** - * Returns the zip comment - * - * @return String - */ - getZipComment : function() { - return _zip.comment || ''; - }, - - /** - * Adds a comment to a specified zipEntry. The zip must be rewritten after adding the comment - * The comment cannot exceed 65535 characters in length - * - * @param entry - * @param comment - */ - addZipEntryComment : function(/*Object*/entry,/*String*/comment) { - var item = getEntry(entry); - if (item) { - item.comment = comment; - } - }, - - /** - * Returns the comment of the specified entry - * - * @param entry - * @return String - */ - getZipEntryComment : function(/*Object*/entry) { - var item = getEntry(entry); - if (item) { - return item.comment || ''; - } - return '' - }, - - /** - * Updates the content of an existing entry inside the archive. The zip must be rewritten after updating the content - * - * @param entry - * @param content - */ - updateFile : function(/*Object*/entry, /*Buffer*/content) { - var item = getEntry(entry); - if (item) { - item.setData(content); - } - }, - - /** - * Adds a file from the disk to the archive - * - * @param localPath - */ - addLocalFile : function(/*String*/localPath, /*String*/zipPath) { - if (fs.existsSync(localPath)) { - if(zipPath){ - zipPath=zipPath.split("\\").join("/"); - if(zipPath.charAt(zipPath.length - 1) != "/"){ - zipPath += "/"; - } - }else{ - zipPath=""; - } - var p = localPath.split("\\").join("/").split("/").pop(); - - this.addFile(zipPath+p, fs.readFileSync(localPath), "", 0) - } else { - throw Utils.Errors.FILE_NOT_FOUND.replace("%s", localPath); - } - }, - - /** - * Adds a local directory and all its nested files and directories to the archive - * - * @param localPath - */ - addLocalFolder : function(/*String*/localPath, /*String*/zipPath) { - if(zipPath){ - zipPath=zipPath.split("\\").join("/"); - if(zipPath.charAt(zipPath.length - 1) != "/"){ - zipPath += "/"; - } - }else{ - zipPath=""; - } - localPath = localPath.split("\\").join("/"); //windows fix - if (localPath.charAt(localPath.length - 1) != "/") - localPath += "/"; - - if (fs.existsSync(localPath)) { - - var items = Utils.findFiles(localPath), - self = this; - - if (items.length) { - items.forEach(function(path) { - var p = path.split("\\").join("/").replace(localPath, ""); //windows fix - if (p.charAt(p.length - 1) !== "/") { - self.addFile(zipPath+p, fs.readFileSync(path), "", 0) - } else { - self.addFile(zipPath+p, new Buffer(0), "", 0) - } - }); - } - } else { - throw Utils.Errors.FILE_NOT_FOUND.replace("%s", localPath); - } - }, - - /** - * Allows you to create a entry (file or directory) in the zip file. - * If you want to create a directory the entryName must end in / and a null buffer should be provided. - * Comment and attributes are optional - * - * @param entryName - * @param content - * @param comment - * @param attr - */ - addFile : function(/*String*/entryName, /*Buffer*/content, /*String*/comment, /*Number*/attr) { - var entry = new ZipEntry(); - entry.entryName = entryName; - entry.comment = comment || ""; - entry.attr = attr || 438; //0666; - if (entry.isDirectory && content.length) { - // throw Utils.Errors.DIRECTORY_CONTENT_ERROR; - } - entry.setData(content); - _zip.setEntry(entry); - }, - - /** - * Returns an array of ZipEntry objects representing the files and folders inside the archive - * - * @return Array - */ - getEntries : function() { - if (_zip) { - return _zip.entries; - } else { - return []; - } - }, - - /** - * Returns a ZipEntry object representing the file or folder specified by ``name``. - * - * @param name - * @return ZipEntry - */ - getEntry : function(/*String*/name) { - return getEntry(name); - }, - - /** - * Extracts the given entry to the given targetPath - * If the entry is a directory inside the archive, the entire directory and it's subdirectories will be extracted - * - * @param entry ZipEntry object or String with the full path of the entry - * @param targetPath Target folder where to write the file - * @param maintainEntryPath If maintainEntryPath is true and the entry is inside a folder, the entry folder - * will be created in targetPath as well. Default is TRUE - * @param overwrite If the file already exists at the target path, the file will be overwriten if this is true. - * Default is FALSE - * - * @return Boolean - */ - extractEntryTo : function(/*Object*/entry, /*String*/targetPath, /*Boolean*/maintainEntryPath, /*Boolean*/overwrite) { - overwrite = overwrite || false; - maintainEntryPath = typeof maintainEntryPath == "undefined" ? true : maintainEntryPath; - - var item = getEntry(entry); - if (!item) { - throw Utils.Errors.NO_ENTRY; - } - - var target = pth.resolve(targetPath, maintainEntryPath ? item.entryName : pth.basename(item.entryName)); - - if (item.isDirectory) { - target = pth.resolve(target, ".."); - var children = _zip.getEntryChildren(item); - children.forEach(function(child) { - if (child.isDirectory) return; - var content = child.getData(); - if (!content) { - throw Utils.Errors.CANT_EXTRACT_FILE; - } - Utils.writeFileTo(pth.resolve(targetPath, maintainEntryPath ? child.entryName : child.entryName.substr(item.entryName.length)), content, overwrite); - }); - return true; - } - - var content = item.getData(); - if (!content) throw Utils.Errors.CANT_EXTRACT_FILE; - - if (fs.existsSync(targetPath) && !overwrite) { - throw Utils.Errors.CANT_OVERRIDE; - } - Utils.writeFileTo(target, content, overwrite); - - return true; - }, - - /** - * Extracts the entire archive to the given location - * - * @param targetPath Target location - * @param overwrite If the file already exists at the target path, the file will be overwriten if this is true. - * Default is FALSE - */ - extractAllTo : function(/*String*/targetPath, /*Boolean*/overwrite) { - overwrite = overwrite || false; - if (!_zip) { - throw Utils.Errors.NO_ZIP; - } - - _zip.entries.forEach(function(entry) { - if (entry.isDirectory) { - Utils.makeDir(pth.resolve(targetPath, entry.entryName.toString())); - return; - } - var content = entry.getData(); - if (!content) { - throw Utils.Errors.CANT_EXTRACT_FILE + "2"; - } - Utils.writeFileTo(pth.resolve(targetPath, entry.entryName.toString()), content, overwrite); - }) - }, - - /** - * Writes the newly created zip file to disk at the specified location or if a zip was opened and no ``targetFileName`` is provided, it will overwrite the opened zip - * - * @param targetFileName - * @param callback - */ - writeZip : function(/*String*/targetFileName, /*Function*/callback) { - if (arguments.length == 1) { - if (typeof targetFileName == "function") { - callback = targetFileName; - targetFileName = ""; - } - } - - if (!targetFileName && _filename) { - targetFileName = _filename; - } - if (!targetFileName) return; - - var zipData = _zip.compressToBuffer(); - if (zipData) { - Utils.writeFileTo(targetFileName, zipData, true); - } - }, - - /** - * Returns the content of the entire zip file as a Buffer object - * - * @return Buffer - */ - toBuffer : function(/*Function*/onSuccess,/*Function*/onFail,/*Function*/onItemStart,/*Function*/onItemEnd) { - this.valueOf = 2; - if (typeof onSuccess == "function") { - _zip.toAsyncBuffer(onSuccess,onFail,onItemStart,onItemEnd); - return null; - } - return _zip.compressToBuffer() - } - } -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/entryHeader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/entryHeader.js deleted file mode 100644 index a29c70f1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/entryHeader.js +++ /dev/null @@ -1,261 +0,0 @@ -var Utils = require("../util"), - Constants = Utils.Constants; - -/* The central directory file header */ -module.exports = function () { - var _verMade = 0x0A, - _version = 0x0A, - _flags = 0, - _method = 0, - _time = 0, - _crc = 0, - _compressedSize = 0, - _size = 0, - _fnameLen = 0, - _extraLen = 0, - - _comLen = 0, - _diskStart = 0, - _inattr = 0, - _attr = 0, - _offset = 0; - - var _dataHeader = {}; - - function setTime(val) { - var val = new Date(val); - _time = (val.getFullYear() - 1980 & 0x7f) << 25 // b09-16 years from 1980 - | (val.getMonth() + 1) << 21 // b05-08 month - | val.getDay() << 16 // b00-04 hour - - // 2 bytes time - | val.getHours() << 11 // b11-15 hour - | val.getMinutes() << 5 // b05-10 minute - | val.getSeconds() >> 1; // b00-04 seconds divided by 2 - } - - setTime(+new Date()); - - return { - get made () { return _verMade; }, - set made (val) { _verMade = val; }, - - get version () { return _version; }, - set version (val) { _version = val }, - - get flags () { return _flags }, - set flags (val) { _flags = val; }, - - get method () { return _method; }, - set method (val) { _method = val; }, - - get time () { return new Date( - ((_time >> 25) & 0x7f) + 1980, - ((_time >> 21) & 0x0f) - 1, - (_time >> 16) & 0x1f, - (_time >> 11) & 0x1f, - (_time >> 5) & 0x3f, - (_time & 0x1f) << 1 - ); - }, - set time (val) { - setTime(val); - }, - - get crc () { return _crc; }, - set crc (val) { _crc = val; }, - - get compressedSize () { return _compressedSize; }, - set compressedSize (val) { _compressedSize = val; }, - - get size () { return _size; }, - set size (val) { _size = val; }, - - get fileNameLength () { return _fnameLen; }, - set fileNameLength (val) { _fnameLen = val; }, - - get extraLength () { return _extraLen }, - set extraLength (val) { _extraLen = val; }, - - get commentLength () { return _comLen }, - set commentLength (val) { _comLen = val }, - - get diskNumStart () { return _diskStart }, - set diskNumStart (val) { _diskStart = val }, - - get inAttr () { return _inattr }, - set inAttr (val) { _inattr = val }, - - get attr () { return _attr }, - set attr (val) { _attr = val }, - - get offset () { return _offset }, - set offset (val) { _offset = val }, - - get encripted () { return (_flags & 1) == 1 }, - - get entryHeaderSize () { - return Constants.CENHDR + _fnameLen + _extraLen + _comLen; - }, - - get realDataOffset () { - return _offset + Constants.LOCHDR + _dataHeader.fnameLen + _dataHeader.extraLen; - }, - - get dataHeader () { - return _dataHeader; - }, - - loadDataHeaderFromBinary : function(/*Buffer*/input) { - var data = input.slice(_offset, _offset + Constants.LOCHDR); - // 30 bytes and should start with "PK\003\004" - if (data.readUInt32LE(0) != Constants.LOCSIG) { - throw Utils.Errors.INVALID_LOC; - } - _dataHeader = { - // version needed to extract - version : data.readUInt16LE(Constants.LOCVER), - // general purpose bit flag - flags : data.readUInt16LE(Constants.LOCFLG), - // compression method - method : data.readUInt16LE(Constants.LOCHOW), - // modification time (2 bytes time, 2 bytes date) - time : data.readUInt32LE(Constants.LOCTIM), - // uncompressed file crc-32 value - crc : data.readUInt32LE(Constants.LOCCRC), - // compressed size - compressedSize : data.readUInt32LE(Constants.LOCSIZ), - // uncompressed size - size : data.readUInt32LE(Constants.LOCLEN), - // filename length - fnameLen : data.readUInt16LE(Constants.LOCNAM), - // extra field length - extraLen : data.readUInt16LE(Constants.LOCEXT) - } - }, - - loadFromBinary : function(/*Buffer*/data) { - // data should be 46 bytes and start with "PK 01 02" - if (data.length != Constants.CENHDR || data.readUInt32LE(0) != Constants.CENSIG) { - throw Utils.Errors.INVALID_CEN; - } - // version made by - _verMade = data.readUInt16LE(Constants.CENVEM); - // version needed to extract - _version = data.readUInt16LE(Constants.CENVER); - // encrypt, decrypt flags - _flags = data.readUInt16LE(Constants.CENFLG); - // compression method - _method = data.readUInt16LE(Constants.CENHOW); - // modification time (2 bytes time, 2 bytes date) - _time = data.readUInt32LE(Constants.CENTIM); - // uncompressed file crc-32 value - _crc = data.readUInt32LE(Constants.CENCRC); - // compressed size - _compressedSize = data.readUInt32LE(Constants.CENSIZ); - // uncompressed size - _size = data.readUInt32LE(Constants.CENLEN); - // filename length - _fnameLen = data.readUInt16LE(Constants.CENNAM); - // extra field length - _extraLen = data.readUInt16LE(Constants.CENEXT); - // file comment length - _comLen = data.readUInt16LE(Constants.CENCOM); - // volume number start - _diskStart = data.readUInt16LE(Constants.CENDSK); - // internal file attributes - _inattr = data.readUInt16LE(Constants.CENATT); - // external file attributes - _attr = data.readUInt32LE(Constants.CENATX); - // LOC header offset - _offset = data.readUInt32LE(Constants.CENOFF); - }, - - dataHeaderToBinary : function() { - // LOC header size (30 bytes) - var data = new Buffer(Constants.LOCHDR); - // "PK\003\004" - data.writeUInt32LE(Constants.LOCSIG, 0); - // version needed to extract - data.writeUInt16LE(_version, Constants.LOCVER); - // general purpose bit flag - data.writeUInt16LE(_flags, Constants.LOCFLG); - // compression method - data.writeUInt16LE(_method, Constants.LOCHOW); - // modification time (2 bytes time, 2 bytes date) - data.writeUInt32LE(_time, Constants.LOCTIM); - // uncompressed file crc-32 value - data.writeUInt32LE(_crc, Constants.LOCCRC); - // compressed size - data.writeUInt32LE(_compressedSize, Constants.LOCSIZ); - // uncompressed size - data.writeUInt32LE(_size, Constants.LOCLEN); - // filename length - data.writeUInt16LE(_fnameLen, Constants.LOCNAM); - // extra field length - data.writeUInt16LE(_extraLen, Constants.LOCEXT); - return data; - }, - - entryHeaderToBinary : function() { - // CEN header size (46 bytes) - var data = new Buffer(Constants.CENHDR + _fnameLen + _extraLen + _comLen); - // "PK\001\002" - data.writeUInt32LE(Constants.CENSIG, 0); - // version made by - data.writeUInt16LE(_verMade, Constants.CENVEM); - // version needed to extract - data.writeUInt16LE(_version, Constants.CENVER); - // encrypt, decrypt flags - data.writeUInt16LE(_flags, Constants.CENFLG); - // compression method - data.writeUInt16LE(_method, Constants.CENHOW); - // modification time (2 bytes time, 2 bytes date) - data.writeUInt32LE(_time, Constants.CENTIM); - // uncompressed file crc-32 value - data.writeInt32LE(_crc, Constants.CENCRC, true); - // compressed size - data.writeUInt32LE(_compressedSize, Constants.CENSIZ); - // uncompressed size - data.writeUInt32LE(_size, Constants.CENLEN); - // filename length - data.writeUInt16LE(_fnameLen, Constants.CENNAM); - // extra field length - data.writeUInt16LE(_extraLen, Constants.CENEXT); - // file comment length - data.writeUInt16LE(_comLen, Constants.CENCOM); - // volume number start - data.writeUInt16LE(_diskStart, Constants.CENDSK); - // internal file attributes - data.writeUInt16LE(_inattr, Constants.CENATT); - // external file attributes - data.writeUInt32LE(_attr, Constants.CENATX); - // LOC header offset - data.writeUInt32LE(_offset, Constants.CENOFF); - // fill all with - data.fill(0x00, Constants.CENHDR); - return data; - }, - - toString : function() { - return '{\n' + - '\t"made" : ' + _verMade + ",\n" + - '\t"version" : ' + _version + ",\n" + - '\t"flags" : ' + _flags + ",\n" + - '\t"method" : ' + Utils.methodToString(_method) + ",\n" + - '\t"time" : ' + _time + ",\n" + - '\t"crc" : 0x' + _crc.toString(16).toUpperCase() + ",\n" + - '\t"compressedSize" : ' + _compressedSize + " bytes,\n" + - '\t"size" : ' + _size + " bytes,\n" + - '\t"fileNameLength" : ' + _fnameLen + ",\n" + - '\t"extraLength" : ' + _extraLen + " bytes,\n" + - '\t"commentLength" : ' + _comLen + " bytes,\n" + - '\t"diskNumStart" : ' + _diskStart + ",\n" + - '\t"inAttr" : ' + _inattr + ",\n" + - '\t"attr" : ' + _attr + ",\n" + - '\t"offset" : ' + _offset + ",\n" + - '\t"entryHeaderSize" : ' + (Constants.CENHDR + _fnameLen + _extraLen + _comLen) + " bytes\n" + - '}'; - } - } -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/index.js deleted file mode 100644 index b8c67b96..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/index.js +++ /dev/null @@ -1,2 +0,0 @@ -exports.EntryHeader = require("./entryHeader"); -exports.MainHeader = require("./mainHeader"); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/mainHeader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/mainHeader.js deleted file mode 100644 index 002bc8a7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/mainHeader.js +++ /dev/null @@ -1,80 +0,0 @@ -var Utils = require("../util"), - Constants = Utils.Constants; - -/* The entries in the end of central directory */ -module.exports = function () { - var _volumeEntries = 0, - _totalEntries = 0, - _size = 0, - _offset = 0, - _commentLength = 0; - - return { - get diskEntries () { return _volumeEntries }, - set diskEntries (/*Number*/val) { _volumeEntries = _totalEntries = val; }, - - get totalEntries () { return _totalEntries }, - set totalEntries (/*Number*/val) { _totalEntries = _volumeEntries = val; }, - - get size () { return _size }, - set size (/*Number*/val) { _size = val; }, - - get offset () { return _offset }, - set offset (/*Number*/val) { _offset = val; }, - - get commentLength () { return _commentLength }, - set commentLength (/*Number*/val) { _commentLength = val; }, - - get mainHeaderSize () { - return Constants.ENDHDR + _commentLength; - }, - - loadFromBinary : function(/*Buffer*/data) { - // data should be 22 bytes and start with "PK 05 06" - if (data.length != Constants.ENDHDR || data.readUInt32LE(0) != Constants.ENDSIG) - throw Utils.Errors.INVALID_END; - - // number of entries on this volume - _volumeEntries = data.readUInt16LE(Constants.ENDSUB); - // total number of entries - _totalEntries = data.readUInt16LE(Constants.ENDTOT); - // central directory size in bytes - _size = data.readUInt32LE(Constants.ENDSIZ); - // offset of first CEN header - _offset = data.readUInt32LE(Constants.ENDOFF); - // zip file comment length - _commentLength = data.readUInt16LE(Constants.ENDCOM); - }, - - toBinary : function() { - var b = new Buffer(Constants.ENDHDR + _commentLength); - // "PK 05 06" signature - b.writeUInt32LE(Constants.ENDSIG, 0); - b.writeUInt32LE(0, 4); - // number of entries on this volume - b.writeUInt16LE(_volumeEntries, Constants.ENDSUB); - // total number of entries - b.writeUInt16LE(_totalEntries, Constants.ENDTOT); - // central directory size in bytes - b.writeUInt32LE(_size, Constants.ENDSIZ); - // offset of first CEN header - b.writeUInt32LE(_offset, Constants.ENDOFF); - // zip file comment length - b.writeUInt16LE(_commentLength, Constants.ENDCOM); - // fill comment memory with spaces so no garbage is left there - b.fill(" ", Constants.ENDHDR); - - return b; - }, - - toString : function() { - return '{\n' + - '\t"diskEntries" : ' + _volumeEntries + ",\n" + - '\t"totalEntries" : ' + _totalEntries + ",\n" + - '\t"size" : ' + _size + " bytes,\n" + - '\t"offset" : 0x' + _offset.toString(16).toUpperCase() + ",\n" + - '\t"commentLength" : 0x' + _commentLength + "\n" + - '}'; - } - } -}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/deflater.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/deflater.js deleted file mode 100644 index 32679434..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/deflater.js +++ /dev/null @@ -1,1578 +0,0 @@ -/* - * $Id: rawdeflate.js,v 0.5 2013/04/09 14:25:38 dankogai Exp dankogai $ - * - * GNU General Public License, version 2 (GPL-2.0) - * http://opensource.org/licenses/GPL-2.0 - * Original: - * http://www.onicos.com/staff/iz/amuse/javascript/expert/deflate.txt - */ -function JSDeflater(/*inbuff*/inbuf) { - - /* Copyright (C) 1999 Masanao Izumo <iz@onicos.co.jp> - * Version: 1.0.1 - * LastModified: Dec 25 1999 - */ - - var WSIZE = 32768, // Sliding Window size - zip_STORED_BLOCK = 0, - zip_STATIC_TREES = 1, - zip_DYN_TREES = 2, - zip_DEFAULT_LEVEL = 6, - zip_FULL_SEARCH = true, - zip_INBUFSIZ = 32768, // Input buffer size - zip_INBUF_EXTRA = 64, // Extra buffer - zip_OUTBUFSIZ = 1024 * 8, - zip_window_size = 2 * WSIZE, - MIN_MATCH = 3, - MAX_MATCH = 258, - zip_BITS = 16, - LIT_BUFSIZE = 0x2000, - zip_HASH_BITS = 13, - zip_DIST_BUFSIZE = LIT_BUFSIZE, - zip_HASH_SIZE = 1 << zip_HASH_BITS, - zip_HASH_MASK = zip_HASH_SIZE - 1, - zip_WMASK = WSIZE - 1, - zip_NIL = 0, // Tail of hash chains - zip_TOO_FAR = 4096, - zip_MIN_LOOKAHEAD = MAX_MATCH + MIN_MATCH + 1, - zip_MAX_DIST = WSIZE - zip_MIN_LOOKAHEAD, - zip_SMALLEST = 1, - zip_MAX_BITS = 15, - zip_MAX_BL_BITS = 7, - zip_LENGTH_CODES = 29, - zip_LITERALS = 256, - zip_END_BLOCK = 256, - zip_L_CODES = zip_LITERALS + 1 + zip_LENGTH_CODES, - zip_D_CODES = 30, - zip_BL_CODES = 19, - zip_REP_3_6 = 16, - zip_REPZ_3_10 = 17, - zip_REPZ_11_138 = 18, - zip_HEAP_SIZE = 2 * zip_L_CODES + 1, - zip_H_SHIFT = parseInt((zip_HASH_BITS + MIN_MATCH - 1) / MIN_MATCH); - - var zip_free_queue, zip_qhead, zip_qtail, zip_initflag, zip_outbuf = null, zip_outcnt, zip_outoff, zip_complete, - zip_window, zip_d_buf, zip_l_buf, zip_prev, zip_bi_buf, zip_bi_valid, zip_block_start, zip_ins_h, zip_hash_head, - zip_prev_match, zip_match_available, zip_match_length, zip_prev_length, zip_strstart, zip_match_start, zip_eofile, - zip_lookahead, zip_max_chain_length, zip_max_lazy_match, zip_compr_level, zip_good_match, zip_nice_match, - zip_dyn_ltree, zip_dyn_dtree, zip_static_ltree, zip_static_dtree, zip_bl_tree, zip_l_desc, zip_d_desc, zip_bl_desc, - zip_bl_count, zip_heap, zip_heap_len, zip_heap_max, zip_depth, zip_length_code, zip_dist_code, zip_base_length, - zip_base_dist, zip_flag_buf, zip_last_lit, zip_last_dist, zip_last_flags, zip_flags, zip_flag_bit, zip_opt_len, - zip_static_len, zip_deflate_data, zip_deflate_pos; - - var zip_DeflateCT = function () { - this.fc = 0; // frequency count or bit string - this.dl = 0; // father node in Huffman tree or length of bit string - }; - - var zip_DeflateTreeDesc = function () { - this.dyn_tree = null; // the dynamic tree - this.static_tree = null; // corresponding static tree or NULL - this.extra_bits = null; // extra bits for each code or NULL - this.extra_base = 0; // base index for extra_bits - this.elems = 0; // max number of elements in the tree - this.max_length = 0; // max bit length for the codes - this.max_code = 0; // largest code with non zero frequency - }; - - /* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. - */ - var zip_DeflateConfiguration = function (a, b, c, d) { - this.good_length = a; // reduce lazy search above this match length - this.max_lazy = b; // do not perform lazy search above this match length - this.nice_length = c; // quit search above this match length - this.max_chain = d; - }; - - var zip_DeflateBuffer = function () { - this.next = null; - this.len = 0; - this.ptr = new Array(zip_OUTBUFSIZ); - this.off = 0; - }; - - /* constant tables */ - var zip_extra_lbits = new Array( - 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0); - var zip_extra_dbits = new Array( - 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13); - var zip_extra_blbits = new Array( - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7); - var zip_bl_order = new Array( - 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15); - var zip_configuration_table = new Array( - new zip_DeflateConfiguration(0, 0, 0, 0), - new zip_DeflateConfiguration(4, 4, 8, 4), - new zip_DeflateConfiguration(4, 5, 16, 8), - new zip_DeflateConfiguration(4, 6, 32, 32), - new zip_DeflateConfiguration(4, 4, 16, 16), - new zip_DeflateConfiguration(8, 16, 32, 32), - new zip_DeflateConfiguration(8, 16, 128, 128), - new zip_DeflateConfiguration(8, 32, 128, 256), - new zip_DeflateConfiguration(32, 128, 258, 1024), - new zip_DeflateConfiguration(32, 258, 258, 4096)); - - - /* routines (deflate) */ - - var zip_deflate_start = function (level) { - var i; - - if (!level) - level = zip_DEFAULT_LEVEL; - else if (level < 1) - level = 1; - else if (level > 9) - level = 9; - - zip_compr_level = level; - zip_initflag = false; - zip_eofile = false; - if (zip_outbuf != null) - return; - - zip_free_queue = zip_qhead = zip_qtail = null; - zip_outbuf = new Array(zip_OUTBUFSIZ); - zip_window = new Array(zip_window_size); - zip_d_buf = new Array(zip_DIST_BUFSIZE); - zip_l_buf = new Array(zip_INBUFSIZ + zip_INBUF_EXTRA); - zip_prev = new Array(1 << zip_BITS); - zip_dyn_ltree = new Array(zip_HEAP_SIZE); - for (i = 0; i < zip_HEAP_SIZE; i++) zip_dyn_ltree[i] = new zip_DeflateCT(); - zip_dyn_dtree = new Array(2 * zip_D_CODES + 1); - for (i = 0; i < 2 * zip_D_CODES + 1; i++) zip_dyn_dtree[i] = new zip_DeflateCT(); - zip_static_ltree = new Array(zip_L_CODES + 2); - for (i = 0; i < zip_L_CODES + 2; i++) zip_static_ltree[i] = new zip_DeflateCT(); - zip_static_dtree = new Array(zip_D_CODES); - for (i = 0; i < zip_D_CODES; i++) zip_static_dtree[i] = new zip_DeflateCT(); - zip_bl_tree = new Array(2 * zip_BL_CODES + 1); - for (i = 0; i < 2 * zip_BL_CODES + 1; i++) zip_bl_tree[i] = new zip_DeflateCT(); - zip_l_desc = new zip_DeflateTreeDesc(); - zip_d_desc = new zip_DeflateTreeDesc(); - zip_bl_desc = new zip_DeflateTreeDesc(); - zip_bl_count = new Array(zip_MAX_BITS + 1); - zip_heap = new Array(2 * zip_L_CODES + 1); - zip_depth = new Array(2 * zip_L_CODES + 1); - zip_length_code = new Array(MAX_MATCH - MIN_MATCH + 1); - zip_dist_code = new Array(512); - zip_base_length = new Array(zip_LENGTH_CODES); - zip_base_dist = new Array(zip_D_CODES); - zip_flag_buf = new Array(parseInt(LIT_BUFSIZE / 8)); - }; - - var zip_deflate_end = function () { - zip_free_queue = zip_qhead = zip_qtail = null; - zip_outbuf = null; - zip_window = null; - zip_d_buf = null; - zip_l_buf = null; - zip_prev = null; - zip_dyn_ltree = null; - zip_dyn_dtree = null; - zip_static_ltree = null; - zip_static_dtree = null; - zip_bl_tree = null; - zip_l_desc = null; - zip_d_desc = null; - zip_bl_desc = null; - zip_bl_count = null; - zip_heap = null; - zip_depth = null; - zip_length_code = null; - zip_dist_code = null; - zip_base_length = null; - zip_base_dist = null; - zip_flag_buf = null; - }; - - var zip_reuse_queue = function (p) { - p.next = zip_free_queue; - zip_free_queue = p; - }; - - var zip_new_queue = function () { - var p; - - if (zip_free_queue != null) { - p = zip_free_queue; - zip_free_queue = zip_free_queue.next; - } - else - p = new zip_DeflateBuffer(); - p.next = null; - p.len = p.off = 0; - - return p; - }; - - var zip_head1 = function (i) { - return zip_prev[WSIZE + i]; - }; - - var zip_head2 = function (i, val) { - return zip_prev[WSIZE + i] = val; - }; - - /* put_byte is used for the compressed output, put_ubyte for the - * uncompressed output. However unlzw() uses window for its - * suffix table instead of its output buffer, so it does not use put_ubyte - * (to be cleaned up). - */ - var zip_put_byte = function (c) { - zip_outbuf[zip_outoff + zip_outcnt++] = c; - if (zip_outoff + zip_outcnt == zip_OUTBUFSIZ) - zip_qoutbuf(); - }; - - /* Output a 16 bit value, lsb first */ - var zip_put_short = function (w) { - w &= 0xffff; - if (zip_outoff + zip_outcnt < zip_OUTBUFSIZ - 2) { - zip_outbuf[zip_outoff + zip_outcnt++] = (w & 0xff); - zip_outbuf[zip_outoff + zip_outcnt++] = (w >>> 8); - } else { - zip_put_byte(w & 0xff); - zip_put_byte(w >>> 8); - } - }; - - /* ========================================================================== - * Insert string s in the dictionary and set match_head to the previous head - * of the hash chain (the most recent string with same hash key). Return - * the previous length of the hash chain. - * IN assertion: all calls to to INSERT_STRING are made with consecutive - * input characters and the first MIN_MATCH bytes of s are valid - * (except for the last MIN_MATCH-1 bytes of the input file). - */ - var zip_INSERT_STRING = function () { - zip_ins_h = ((zip_ins_h << zip_H_SHIFT) - ^ (zip_window[zip_strstart + MIN_MATCH - 1] & 0xff)) - & zip_HASH_MASK; - zip_hash_head = zip_head1(zip_ins_h); - zip_prev[zip_strstart & zip_WMASK] = zip_hash_head; - zip_head2(zip_ins_h, zip_strstart); - }; - - /* Send a code of the given tree. c and tree must not have side effects */ - var zip_SEND_CODE = function (c, tree) { - zip_send_bits(tree[c].fc, tree[c].dl); - }; - - /* Mapping from a distance to a distance code. dist is the distance - 1 and - * must not have side effects. dist_code[256] and dist_code[257] are never - * used. - */ - var zip_D_CODE = function (dist) { - return (dist < 256 ? zip_dist_code[dist] - : zip_dist_code[256 + (dist >> 7)]) & 0xff; - }; - - /* ========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ - var zip_SMALLER = function (tree, n, m) { - return tree[n].fc < tree[m].fc || - (tree[n].fc == tree[m].fc && zip_depth[n] <= zip_depth[m]); - }; - - /* ========================================================================== - * read string data - */ - var zip_read_buff = function (buff, offset, n) { - var i; - for (i = 0; i < n && zip_deflate_pos < zip_deflate_data.length; i++) - buff[offset + i] = - zip_deflate_data[zip_deflate_pos++] & 0xff; - return i; - }; - - /* ========================================================================== - * Initialize the "longest match" routines for a new file - */ - var zip_lm_init = function () { - var j; - - /* Initialize the hash table. */ - for (j = 0; j < zip_HASH_SIZE; j++) - zip_prev[WSIZE + j] = 0; - zip_max_lazy_match = zip_configuration_table[zip_compr_level].max_lazy; - zip_good_match = zip_configuration_table[zip_compr_level].good_length; - if (!zip_FULL_SEARCH) - zip_nice_match = zip_configuration_table[zip_compr_level].nice_length; - zip_max_chain_length = zip_configuration_table[zip_compr_level].max_chain; - - zip_strstart = 0; - zip_block_start = 0; - - zip_lookahead = zip_read_buff(zip_window, 0, 2 * WSIZE); - if (zip_lookahead <= 0) { - zip_eofile = true; - zip_lookahead = 0; - return; - } - zip_eofile = false; - /* Make sure that we always have enough lookahead. This is important - * if input comes from a device such as a tty. - */ - while (zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile) - zip_fill_window(); - - /* If lookahead < MIN_MATCH, ins_h is garbage, but this is - * not important since only literal bytes will be emitted. - */ - zip_ins_h = 0; - for (j = 0; j < MIN_MATCH - 1; j++) { - zip_ins_h = ((zip_ins_h << zip_H_SHIFT) ^ (zip_window[j] & 0xff)) & zip_HASH_MASK; - } - }; - - /* ========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - */ - var zip_longest_match = function (cur_match) { - var chain_length = zip_max_chain_length; // max hash chain length - var scanp = zip_strstart; // current string - var matchp; // matched string - var len; // length of current match - var best_len = zip_prev_length; // best match length so far - - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - var limit = (zip_strstart > zip_MAX_DIST ? zip_strstart - zip_MAX_DIST : zip_NIL); - - var strendp = zip_strstart + MAX_MATCH; - var scan_end1 = zip_window[scanp + best_len - 1]; - var scan_end = zip_window[scanp + best_len]; - - /* Do not waste too much time if we already have a good match: */ - if (zip_prev_length >= zip_good_match) - chain_length >>= 2; - - do { - matchp = cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2: - */ - if (zip_window[matchp + best_len] != scan_end || - zip_window[matchp + best_len - 1] != scan_end1 || - zip_window[matchp] != zip_window[scanp] || - zip_window[++matchp] != zip_window[scanp + 1]) { - continue; - } - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scanp += 2; - matchp++; - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - } while (zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - scanp < strendp); - - len = MAX_MATCH - (strendp - scanp); - scanp = strendp - MAX_MATCH; - - if (len > best_len) { - zip_match_start = cur_match; - best_len = len; - if (zip_FULL_SEARCH) { - if (len >= MAX_MATCH) break; - } else { - if (len >= zip_nice_match) break; - } - - scan_end1 = zip_window[scanp + best_len - 1]; - scan_end = zip_window[scanp + best_len]; - } - } while ((cur_match = zip_prev[cur_match & zip_WMASK]) > limit - && --chain_length != 0); - - return best_len; - }; - - /* ========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead, and sets eofile if end of input file. - * IN assertion: lookahead < MIN_LOOKAHEAD && strstart + lookahead > 0 - * OUT assertions: at least one byte has been read, or eofile is set; - * file reads are performed for at least two bytes (required for the - * translate_eol option). - */ - var zip_fill_window = function () { - var n, m; - - // Amount of free space at the end of the window. - var more = zip_window_size - zip_lookahead - zip_strstart; - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (more == -1) { - /* Very unlikely, but possible on 16 bit machine if strstart == 0 - * and lookahead == 1 (input done one byte at time) - */ - more--; - } else if (zip_strstart >= WSIZE + zip_MAX_DIST) { - /* By the IN assertion, the window is not empty so we can't confuse - * more == 0 with more == 64K on a 16 bit machine. - */ - for (n = 0; n < WSIZE; n++) - zip_window[n] = zip_window[n + WSIZE]; - - zip_match_start -= WSIZE; - zip_strstart -= WSIZE; - /* we now have strstart >= MAX_DIST: */ - zip_block_start -= WSIZE; - - for (n = 0; n < zip_HASH_SIZE; n++) { - m = zip_head1(n); - zip_head2(n, m >= WSIZE ? m - WSIZE : zip_NIL); - } - for (n = 0; n < WSIZE; n++) { - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - m = zip_prev[n]; - zip_prev[n] = (m >= WSIZE ? m - WSIZE : zip_NIL); - } - more += WSIZE; - } - // At this point, more >= 2 - if (!zip_eofile) { - n = zip_read_buff(zip_window, zip_strstart + zip_lookahead, more); - if (n <= 0) - zip_eofile = true; - else - zip_lookahead += n; - } - }; - - /* ========================================================================== - * Processes a new input file and return its compressed length. This - * function does not perform lazy evaluationof matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. - */ - var zip_deflate_fast = function () { - while (zip_lookahead != 0 && zip_qhead == null) { - var flush; // set if current block must be flushed - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - zip_INSERT_STRING(); - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH - */ - if (zip_hash_head != zip_NIL && - zip_strstart - zip_hash_head <= zip_MAX_DIST) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - zip_match_length = zip_longest_match(zip_hash_head); - /* longest_match() sets match_start */ - if (zip_match_length > zip_lookahead) - zip_match_length = zip_lookahead; - } - if (zip_match_length >= MIN_MATCH) { - flush = zip_ct_tally(zip_strstart - zip_match_start, - zip_match_length - MIN_MATCH); - zip_lookahead -= zip_match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ - if (zip_match_length <= zip_max_lazy_match) { - zip_match_length--; // string at strstart already in hash table - do { - zip_strstart++; - zip_INSERT_STRING(); - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH - * these bytes are garbage, but it does not matter since - * the next lookahead bytes will be emitted as literals. - */ - } while (--zip_match_length != 0); - zip_strstart++; - } else { - zip_strstart += zip_match_length; - zip_match_length = 0; - zip_ins_h = zip_window[zip_strstart] & 0xff; - zip_ins_h = ((zip_ins_h << zip_H_SHIFT) ^ (zip_window[zip_strstart + 1] & 0xff)) & zip_HASH_MASK; - } - } else { - /* No match, output a literal byte */ - flush = zip_ct_tally(0, zip_window[zip_strstart] & 0xff); - zip_lookahead--; - zip_strstart++; - } - if (flush) { - zip_flush_block(0); - zip_block_start = zip_strstart; - } - - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - while (zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile) - zip_fill_window(); - } - }; - - var zip_deflate_better = function () { - /* Process the input block. */ - while (zip_lookahead != 0 && zip_qhead == null) { - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - zip_INSERT_STRING(); - - /* Find the longest match, discarding those <= prev_length. - */ - zip_prev_length = zip_match_length; - zip_prev_match = zip_match_start; - zip_match_length = MIN_MATCH - 1; - - if (zip_hash_head != zip_NIL && - zip_prev_length < zip_max_lazy_match && - zip_strstart - zip_hash_head <= zip_MAX_DIST) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - zip_match_length = zip_longest_match(zip_hash_head); - /* longest_match() sets match_start */ - if (zip_match_length > zip_lookahead) - zip_match_length = zip_lookahead; - - /* Ignore a length 3 match if it is too distant: */ - if (zip_match_length == MIN_MATCH && - zip_strstart - zip_match_start > zip_TOO_FAR) { - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - zip_match_length--; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: - */ - if (zip_prev_length >= MIN_MATCH && - zip_match_length <= zip_prev_length) { - var flush; // set if current block must be flushed - flush = zip_ct_tally(zip_strstart - 1 - zip_prev_match, - zip_prev_length - MIN_MATCH); - - /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. - */ - zip_lookahead -= zip_prev_length - 1; - zip_prev_length -= 2; - do { - zip_strstart++; - zip_INSERT_STRING(); - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH - * these bytes are garbage, but it does not matter since the - * next lookahead bytes will always be emitted as literals. - */ - } while (--zip_prev_length != 0); - zip_match_available = 0; - zip_match_length = MIN_MATCH - 1; - zip_strstart++; - if (flush) { - zip_flush_block(0); - zip_block_start = zip_strstart; - } - } else if (zip_match_available != 0) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - if (zip_ct_tally(0, zip_window[zip_strstart - 1] & 0xff)) { - zip_flush_block(0); - zip_block_start = zip_strstart; - } - zip_strstart++; - zip_lookahead--; - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - zip_match_available = 1; - zip_strstart++; - zip_lookahead--; - } - - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - while (zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile) - zip_fill_window(); - } - }; - - var zip_init_deflate = function () { - if (zip_eofile) - return; - zip_bi_buf = 0; - zip_bi_valid = 0; - zip_ct_init(); - zip_lm_init(); - - zip_qhead = null; - zip_outcnt = 0; - zip_outoff = 0; - zip_match_available = 0; - - if (zip_compr_level <= 3) { - zip_prev_length = MIN_MATCH - 1; - zip_match_length = 0; - } - else { - zip_match_length = MIN_MATCH - 1; - zip_match_available = 0; - zip_match_available = 0; - } - - zip_complete = false; - }; - - /* ========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. - */ - var zip_deflate_internal = function (buff, off, buff_size) { - var n; - - if (!zip_initflag) { - zip_init_deflate(); - zip_initflag = true; - if (zip_lookahead == 0) { // empty - zip_complete = true; - return 0; - } - } - - if ((n = zip_qcopy(buff, off, buff_size)) == buff_size) - return buff_size; - - if (zip_complete) - return n; - - if (zip_compr_level <= 3) // optimized for speed - zip_deflate_fast(); - else - zip_deflate_better(); - if (zip_lookahead == 0) { - if (zip_match_available != 0) - zip_ct_tally(0, zip_window[zip_strstart - 1] & 0xff); - zip_flush_block(1); - zip_complete = true; - } - return n + zip_qcopy(buff, n + off, buff_size - n); - }; - - var zip_qcopy = function (buff, off, buff_size) { - var n, i, j; - - n = 0; - while (zip_qhead != null && n < buff_size) { - i = buff_size - n; - if (i > zip_qhead.len) - i = zip_qhead.len; - for (j = 0; j < i; j++) - buff[off + n + j] = zip_qhead.ptr[zip_qhead.off + j]; - - zip_qhead.off += i; - zip_qhead.len -= i; - n += i; - if (zip_qhead.len == 0) { - var p; - p = zip_qhead; - zip_qhead = zip_qhead.next; - zip_reuse_queue(p); - } - } - - if (n == buff_size) - return n; - - if (zip_outoff < zip_outcnt) { - i = buff_size - n; - if (i > zip_outcnt - zip_outoff) - i = zip_outcnt - zip_outoff; - // System.arraycopy(outbuf, outoff, buff, off + n, i); - for (j = 0; j < i; j++) - buff[off + n + j] = zip_outbuf[zip_outoff + j]; - zip_outoff += i; - n += i; - if (zip_outcnt == zip_outoff) - zip_outcnt = zip_outoff = 0; - } - return n; - }; - - /* ========================================================================== - * Allocate the match buffer, initialize the various tables and save the - * location of the internal file attribute (ascii/binary) and method - * (DEFLATE/STORE). - */ - var zip_ct_init = function () { - var n; // iterates over tree elements - var bits; // bit counter - var length; // length value - var code; // code value - var dist; // distance index - - if (zip_static_dtree[0].dl != 0) return; // ct_init already called - - zip_l_desc.dyn_tree = zip_dyn_ltree; - zip_l_desc.static_tree = zip_static_ltree; - zip_l_desc.extra_bits = zip_extra_lbits; - zip_l_desc.extra_base = zip_LITERALS + 1; - zip_l_desc.elems = zip_L_CODES; - zip_l_desc.max_length = zip_MAX_BITS; - zip_l_desc.max_code = 0; - - zip_d_desc.dyn_tree = zip_dyn_dtree; - zip_d_desc.static_tree = zip_static_dtree; - zip_d_desc.extra_bits = zip_extra_dbits; - zip_d_desc.extra_base = 0; - zip_d_desc.elems = zip_D_CODES; - zip_d_desc.max_length = zip_MAX_BITS; - zip_d_desc.max_code = 0; - - zip_bl_desc.dyn_tree = zip_bl_tree; - zip_bl_desc.static_tree = null; - zip_bl_desc.extra_bits = zip_extra_blbits; - zip_bl_desc.extra_base = 0; - zip_bl_desc.elems = zip_BL_CODES; - zip_bl_desc.max_length = zip_MAX_BL_BITS; - zip_bl_desc.max_code = 0; - - // Initialize the mapping length (0..255) -> length code (0..28) - length = 0; - for (code = 0; code < zip_LENGTH_CODES - 1; code++) { - zip_base_length[code] = length; - for (n = 0; n < (1 << zip_extra_lbits[code]); n++) - zip_length_code[length++] = code; - } - /* Note that the length 255 (match length 258) can be represented - * in two different ways: code 284 + 5 bits or code 285, so we - * overwrite length_code[255] to use the best encoding: - */ - zip_length_code[length - 1] = code; - - /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ - dist = 0; - for (code = 0; code < 16; code++) { - zip_base_dist[code] = dist; - for (n = 0; n < (1 << zip_extra_dbits[code]); n++) { - zip_dist_code[dist++] = code; - } - } - dist >>= 7; // from now on, all distances are divided by 128 - for (; code < zip_D_CODES; code++) { - zip_base_dist[code] = dist << 7; - for (n = 0; n < (1 << (zip_extra_dbits[code] - 7)); n++) - zip_dist_code[256 + dist++] = code; - } - // Construct the codes of the static literal tree - for (bits = 0; bits <= zip_MAX_BITS; bits++) - zip_bl_count[bits] = 0; - n = 0; - while (n <= 143) { - zip_static_ltree[n++].dl = 8; - zip_bl_count[8]++; - } - while (n <= 255) { - zip_static_ltree[n++].dl = 9; - zip_bl_count[9]++; - } - while (n <= 279) { - zip_static_ltree[n++].dl = 7; - zip_bl_count[7]++; - } - while (n <= 287) { - zip_static_ltree[n++].dl = 8; - zip_bl_count[8]++; - } - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - zip_gen_codes(zip_static_ltree, zip_L_CODES + 1); - - /* The static distance tree is trivial: */ - for (n = 0; n < zip_D_CODES; n++) { - zip_static_dtree[n].dl = 5; - zip_static_dtree[n].fc = zip_bi_reverse(n, 5); - } - - // Initialize the first block of the first file: - zip_init_block(); - }; - - /* ========================================================================== - * Initialize a new block. - */ - var zip_init_block = function () { - var n; // iterates over tree elements - - // Initialize the trees. - for (n = 0; n < zip_L_CODES; n++) zip_dyn_ltree[n].fc = 0; - for (n = 0; n < zip_D_CODES; n++) zip_dyn_dtree[n].fc = 0; - for (n = 0; n < zip_BL_CODES; n++) zip_bl_tree[n].fc = 0; - - zip_dyn_ltree[zip_END_BLOCK].fc = 1; - zip_opt_len = zip_static_len = 0; - zip_last_lit = zip_last_dist = zip_last_flags = 0; - zip_flags = 0; - zip_flag_bit = 1; - }; - - /* ========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ - var zip_pqdownheap = function (tree, // the tree to restore - k) { // node to move down - var v = zip_heap[k]; - var j = k << 1; // left son of k - - while (j <= zip_heap_len) { - // Set j to the smallest of the two sons: - if (j < zip_heap_len && - zip_SMALLER(tree, zip_heap[j + 1], zip_heap[j])) - j++; - - // Exit if v is smaller than both sons - if (zip_SMALLER(tree, v, zip_heap[j])) - break; - - // Exchange v with the smallest son - zip_heap[k] = zip_heap[j]; - k = j; - - // And continue down the tree, setting j to the left son of k - j <<= 1; - } - zip_heap[k] = v; - }; - - /* ========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. - */ - var zip_gen_bitlen = function (desc) { // the tree descriptor - var tree = desc.dyn_tree; - var extra = desc.extra_bits; - var base = desc.extra_base; - var max_code = desc.max_code; - var max_length = desc.max_length; - var stree = desc.static_tree; - var h; // heap index - var n, m; // iterate over the tree elements - var bits; // bit length - var xbits; // extra bits - var f; // frequency - var overflow = 0; // number of elements with bit length too large - - for (bits = 0; bits <= zip_MAX_BITS; bits++) - zip_bl_count[bits] = 0; - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[zip_heap[zip_heap_max]].dl = 0; // root of the heap - - for (h = zip_heap_max + 1; h < zip_HEAP_SIZE; h++) { - n = zip_heap[h]; - bits = tree[tree[n].dl].dl + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n].dl = bits; - // We overwrite tree[n].dl which is no longer needed - - if (n > max_code) - continue; // not a leaf node - - zip_bl_count[bits]++; - xbits = 0; - if (n >= base) - xbits = extra[n - base]; - f = tree[n].fc; - zip_opt_len += f * (bits + xbits); - if (stree != null) - zip_static_len += f * (stree[n].dl + xbits); - } - if (overflow == 0) - return; - - // This happens for example on obj2 and pic of the Calgary corpus - - // Find the first bit length which could increase: - do { - bits = max_length - 1; - while (zip_bl_count[bits] == 0) - bits--; - zip_bl_count[bits]--; // move one leaf down the tree - zip_bl_count[bits + 1] += 2; // move one overflow item as its brother - zip_bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits != 0; bits--) { - n = zip_bl_count[bits]; - while (n != 0) { - m = zip_heap[--h]; - if (m > max_code) - continue; - if (tree[m].dl != bits) { - zip_opt_len += (bits - tree[m].dl) * tree[m].fc; - tree[m].fc = bits; - } - n--; - } - } - }; - - /* ========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ - var zip_gen_codes = function (tree, // the tree to decorate - max_code) { // largest code with non zero frequency - var next_code = new Array(zip_MAX_BITS + 1); // next code value for each bit length - var code = 0; // running code value - var bits; // bit index - var n; // code index - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= zip_MAX_BITS; bits++) { - code = ((code + zip_bl_count[bits - 1]) << 1); - next_code[bits] = code; - } - - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - for (n = 0; n <= max_code; n++) { - var len = tree[n].dl; - if (len == 0) - continue; - // Now reverse the bits - tree[n].fc = zip_bi_reverse(next_code[len]++, len); - } - }; - - /* ========================================================================== - * Construct one Huffman tree and assigns the code bit strings and lengths. - * Update the total bit length for the current block. - * IN assertion: the field freq is set for all tree elements. - * OUT assertions: the fields len and code are set to the optimal bit length - * and corresponding code. The length opt_len is updated; static_len is - * also updated if stree is not null. The field max_code is set. - */ - var zip_build_tree = function (desc) { // the tree descriptor - var tree = desc.dyn_tree; - var stree = desc.static_tree; - var elems = desc.elems; - var n, m; // iterate over heap elements - var max_code = -1; // largest code with non zero frequency - var node = elems; // next internal node of the tree - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. - * heap[0] is not used. - */ - zip_heap_len = 0; - zip_heap_max = zip_HEAP_SIZE; - - for (n = 0; n < elems; n++) { - if (tree[n].fc != 0) { - zip_heap[++zip_heap_len] = max_code = n; - zip_depth[n] = 0; - } else - tree[n].dl = 0; - } - - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (zip_heap_len < 2) { - var xnew = zip_heap[++zip_heap_len] = (max_code < 2 ? ++max_code : 0); - tree[xnew].fc = 1; - zip_depth[xnew] = 0; - zip_opt_len--; - if (stree != null) - zip_static_len -= stree[xnew].dl; - // new is 0 or 1 so it does not have extra bits - } - desc.max_code = max_code; - - /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = zip_heap_len >> 1; n >= 1; n--) - zip_pqdownheap(tree, n); - - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - do { - n = zip_heap[zip_SMALLEST]; - zip_heap[zip_SMALLEST] = zip_heap[zip_heap_len--]; - zip_pqdownheap(tree, zip_SMALLEST); - - m = zip_heap[zip_SMALLEST]; // m = node of next least frequency - - // keep the nodes sorted by frequency - zip_heap[--zip_heap_max] = n; - zip_heap[--zip_heap_max] = m; - - // Create a new node father of n and m - tree[node].fc = tree[n].fc + tree[m].fc; - if (zip_depth[n] > zip_depth[m] + 1) - zip_depth[node] = zip_depth[n]; - else - zip_depth[node] = zip_depth[m] + 1; - tree[n].dl = tree[m].dl = node; - - // and insert the new node in the heap - zip_heap[zip_SMALLEST] = node++; - zip_pqdownheap(tree, zip_SMALLEST); - - } while (zip_heap_len >= 2); - - zip_heap[--zip_heap_max] = zip_heap[zip_SMALLEST]; - - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - zip_gen_bitlen(desc); - - // The field len is now set, we can generate the bit codes - zip_gen_codes(tree, max_code); - }; - - /* ========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. Updates opt_len to take into account the repeat - * counts. (The contribution of the bit length codes will be added later - * during the construction of bl_tree.) - */ - var zip_scan_tree = function (tree,// the tree to be scanned - max_code) { // and its largest code of non zero frequency - var n; // iterates over all tree elements - var prevlen = -1; // last emitted length - var curlen; // length of current code - var nextlen = tree[0].dl; // length of next code - var count = 0; // repeat count of the current code - var max_count = 7; // max repeat count - var min_count = 4; // min repeat count - - if (nextlen == 0) { - max_count = 138; - min_count = 3; - } - tree[max_code + 1].dl = 0xffff; // guard - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[n + 1].dl; - if (++count < max_count && curlen == nextlen) - continue; - else if (count < min_count) - zip_bl_tree[curlen].fc += count; - else if (curlen != 0) { - if (curlen != prevlen) - zip_bl_tree[curlen].fc++; - zip_bl_tree[zip_REP_3_6].fc++; - } else if (count <= 10) - zip_bl_tree[zip_REPZ_3_10].fc++; - else - zip_bl_tree[zip_REPZ_11_138].fc++; - count = 0; - prevlen = curlen; - if (nextlen == 0) { - max_count = 138; - min_count = 3; - } else if (curlen == nextlen) { - max_count = 6; - min_count = 3; - } else { - max_count = 7; - min_count = 4; - } - } - }; - - /* ========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. - */ - var zip_send_tree = function (tree, // the tree to be scanned - max_code) { // and its largest code of non zero frequency - var n; // iterates over all tree elements - var prevlen = -1; // last emitted length - var curlen; // length of current code - var nextlen = tree[0].dl; // length of next code - var count = 0; // repeat count of the current code - var max_count = 7; // max repeat count - var min_count = 4; // min repeat count - - /* tree[max_code+1].dl = -1; */ - /* guard already set */ - if (nextlen == 0) { - max_count = 138; - min_count = 3; - } - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[n + 1].dl; - if (++count < max_count && curlen == nextlen) { - continue; - } else if (count < min_count) { - do { - zip_SEND_CODE(curlen, zip_bl_tree); - } while (--count != 0); - } else if (curlen != 0) { - if (curlen != prevlen) { - zip_SEND_CODE(curlen, zip_bl_tree); - count--; - } - // Assert(count >= 3 && count <= 6, " 3_6?"); - zip_SEND_CODE(zip_REP_3_6, zip_bl_tree); - zip_send_bits(count - 3, 2); - } else if (count <= 10) { - zip_SEND_CODE(zip_REPZ_3_10, zip_bl_tree); - zip_send_bits(count - 3, 3); - } else { - zip_SEND_CODE(zip_REPZ_11_138, zip_bl_tree); - zip_send_bits(count - 11, 7); - } - count = 0; - prevlen = curlen; - if (nextlen == 0) { - max_count = 138; - min_count = 3; - } else if (curlen == nextlen) { - max_count = 6; - min_count = 3; - } else { - max_count = 7; - min_count = 4; - } - } - }; - - /* ========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ - var zip_build_bl_tree = function () { - var max_blindex; // index of last bit length code of non zero freq - - // Determine the bit length frequencies for literal and distance trees - zip_scan_tree(zip_dyn_ltree, zip_l_desc.max_code); - zip_scan_tree(zip_dyn_dtree, zip_d_desc.max_code); - - // Build the bit length tree: - zip_build_tree(zip_bl_desc); - /* opt_len now includes the length of the tree representations, except - * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. - */ - - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = zip_BL_CODES - 1; max_blindex >= 3; max_blindex--) { - if (zip_bl_tree[zip_bl_order[max_blindex]].dl != 0) break; - } - /* Update opt_len to include the bit length tree and counts */ - zip_opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; - return max_blindex; - }; - - /* ========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ - var zip_send_all_trees = function (lcodes, dcodes, blcodes) { // number of codes for each tree - var rank; // index in bl_order - zip_send_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt - zip_send_bits(dcodes - 1, 5); - zip_send_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt - for (rank = 0; rank < blcodes; rank++) { - zip_send_bits(zip_bl_tree[zip_bl_order[rank]].dl, 3); - } - - // send the literal tree - zip_send_tree(zip_dyn_ltree, lcodes - 1); - - // send the distance tree - zip_send_tree(zip_dyn_dtree, dcodes - 1); - }; - - /* ========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. - */ - var zip_flush_block = function (eof) { // true if this is the last block for a file - var opt_lenb, static_lenb; // opt_len and static_len in bytes - var max_blindex; // index of last bit length code of non zero freq - var stored_len; // length of input block - - stored_len = zip_strstart - zip_block_start; - zip_flag_buf[zip_last_flags] = zip_flags; // Save the flags for the last 8 items - - // Construct the literal and distance trees - zip_build_tree(zip_l_desc); - zip_build_tree(zip_d_desc); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = zip_build_bl_tree(); - - // Determine the best encoding. Compute first the block length in bytes - opt_lenb = (zip_opt_len + 3 + 7) >> 3; - static_lenb = (zip_static_len + 3 + 7) >> 3; - if (static_lenb <= opt_lenb) - opt_lenb = static_lenb; - if (stored_len + 4 <= opt_lenb // 4: two words for the lengths - && zip_block_start >= 0) { - var i; - - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - zip_send_bits((zip_STORED_BLOCK << 1) + eof, 3); - /* send block type */ - zip_bi_windup(); - /* align on byte boundary */ - zip_put_short(stored_len); - zip_put_short(~stored_len); - - // copy block - for (i = 0; i < stored_len; i++) - zip_put_byte(zip_window[zip_block_start + i]); - - } else if (static_lenb == opt_lenb) { - zip_send_bits((zip_STATIC_TREES << 1) + eof, 3); - zip_compress_block(zip_static_ltree, zip_static_dtree); - } else { - zip_send_bits((zip_DYN_TREES << 1) + eof, 3); - zip_send_all_trees(zip_l_desc.max_code + 1, - zip_d_desc.max_code + 1, - max_blindex + 1); - zip_compress_block(zip_dyn_ltree, zip_dyn_dtree); - } - - zip_init_block(); - - if (eof != 0) - zip_bi_windup(); - }; - - /* ========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ - var zip_ct_tally = function (dist, // distance of matched string - lc) { // match length-MIN_MATCH or unmatched char (if dist==0) - zip_l_buf[zip_last_lit++] = lc; - if (dist == 0) { - // lc is the unmatched char - zip_dyn_ltree[lc].fc++; - } else { - // Here, lc is the match length - MIN_MATCH - dist--; // dist = match distance - 1 - zip_dyn_ltree[zip_length_code[lc] + zip_LITERALS + 1].fc++; - zip_dyn_dtree[zip_D_CODE(dist)].fc++; - - zip_d_buf[zip_last_dist++] = dist; - zip_flags |= zip_flag_bit; - } - zip_flag_bit <<= 1; - - // Output the flags if they fill a byte - if ((zip_last_lit & 7) == 0) { - zip_flag_buf[zip_last_flags++] = zip_flags; - zip_flags = 0; - zip_flag_bit = 1; - } - // Try to guess if it is profitable to stop the current block here - if (zip_compr_level > 2 && (zip_last_lit & 0xfff) == 0) { - // Compute an upper bound for the compressed length - var out_length = zip_last_lit * 8; - var in_length = zip_strstart - zip_block_start; - var dcode; - - for (dcode = 0; dcode < zip_D_CODES; dcode++) { - out_length += zip_dyn_dtree[dcode].fc * (5 + zip_extra_dbits[dcode]); - } - out_length >>= 3; - if (zip_last_dist < parseInt(zip_last_lit / 2) && - out_length < parseInt(in_length / 2)) - return true; - } - return (zip_last_lit == LIT_BUFSIZE - 1 || - zip_last_dist == zip_DIST_BUFSIZE); - /* We avoid equality with LIT_BUFSIZE because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ - }; - - /* ========================================================================== - * Send the block data compressed using the given Huffman trees - */ - var zip_compress_block = function (ltree, // literal tree - dtree) { // distance tree - var dist; // distance of matched string - var lc; // match length or unmatched char (if dist == 0) - var lx = 0; // running index in l_buf - var dx = 0; // running index in d_buf - var fx = 0; // running index in flag_buf - var flag = 0; // current flags - var code; // the code to send - var extra; // number of extra bits to send - - if (zip_last_lit != 0) do { - if ((lx & 7) == 0) - flag = zip_flag_buf[fx++]; - lc = zip_l_buf[lx++] & 0xff; - if ((flag & 1) == 0) { - zip_SEND_CODE(lc, ltree); - /* send a literal byte */ - } else { - // Here, lc is the match length - MIN_MATCH - code = zip_length_code[lc]; - zip_SEND_CODE(code + zip_LITERALS + 1, ltree); // send the length code - extra = zip_extra_lbits[code]; - if (extra != 0) { - lc -= zip_base_length[code]; - zip_send_bits(lc, extra); // send the extra length bits - } - dist = zip_d_buf[dx++]; - // Here, dist is the match distance - 1 - code = zip_D_CODE(dist); - zip_SEND_CODE(code, dtree); // send the distance code - extra = zip_extra_dbits[code]; - if (extra != 0) { - dist -= zip_base_dist[code]; - zip_send_bits(dist, extra); // send the extra distance bits - } - } // literal or match pair ? - flag >>= 1; - } while (lx < zip_last_lit); - - zip_SEND_CODE(zip_END_BLOCK, ltree); - }; - - /* ========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ - var zip_Buf_size = 16; // bit size of bi_buf - var zip_send_bits = function (value, // value to send - length) { // number of bits - /* If not enough room in bi_buf, use (valid) bits from bi_buf and - * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid)) - * unused bits in value. - */ - if (zip_bi_valid > zip_Buf_size - length) { - zip_bi_buf |= (value << zip_bi_valid); - zip_put_short(zip_bi_buf); - zip_bi_buf = (value >> (zip_Buf_size - zip_bi_valid)); - zip_bi_valid += length - zip_Buf_size; - } else { - zip_bi_buf |= value << zip_bi_valid; - zip_bi_valid += length; - } - }; - - /* ========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ - var zip_bi_reverse = function (code, // the value to invert - len) { // its bit length - var res = 0; - do { - res |= code & 1; - code >>= 1; - res <<= 1; - } while (--len > 0); - return res >> 1; - }; - - /* ========================================================================== - * Write out any remaining bits in an incomplete byte. - */ - var zip_bi_windup = function () { - if (zip_bi_valid > 8) { - zip_put_short(zip_bi_buf); - } else if (zip_bi_valid > 0) { - zip_put_byte(zip_bi_buf); - } - zip_bi_buf = 0; - zip_bi_valid = 0; - }; - - var zip_qoutbuf = function () { - if (zip_outcnt != 0) { - var q, i; - q = zip_new_queue(); - if (zip_qhead == null) - zip_qhead = zip_qtail = q; - else - zip_qtail = zip_qtail.next = q; - q.len = zip_outcnt - zip_outoff; - for (i = 0; i < q.len; i++) - q.ptr[i] = zip_outbuf[zip_outoff + i]; - zip_outcnt = zip_outoff = 0; - } - }; - - function deflate(buffData, level) { - zip_deflate_data = buffData; - zip_deflate_pos = 0; - zip_deflate_start(level); - - var buff = new Array(1024), - pages = [], - totalSize = 0, - i; - - for (i = 0; i < 1024; i++) buff[i] = 0; - while ((i = zip_deflate_internal(buff, 0, buff.length)) > 0) { - var buf = new Buffer(buff.slice(0, i)); - pages.push(buf); - totalSize += buf.length; - } - - if (pages.length == 1) { - return pages[0]; - } - - var result = new Buffer(totalSize), - index = 0; - - for (i = 0; i < pages.length; i++) { - pages[i].copy(result, index); - index = index + pages[i].length - } - - return result; - } - - return { - deflate: function () { - return deflate(inbuf, 8); - } - } -} - -module.exports = function (/*Buffer*/inbuf) { - - var zlib = require("zlib"); - - return { - deflate: function () { - return new JSDeflater(inbuf).deflate(); - }, - - deflateAsync: function (/*Function*/callback) { - var tmp = zlib.createDeflateRaw({chunkSize:(parseInt(inbuf.length / 1024) + 1)*1024}), - parts = [], total = 0; - tmp.on('data', function(data) { - parts.push(data); - total += data.length; - }); - tmp.on('end', function() { - var buf = new Buffer(total), written = 0; - buf.fill(0); - - for (var i = 0; i < parts.length; i++) { - var part = parts[i]; - part.copy(buf, written); - written += part.length; - } - callback && callback(buf); - }); - tmp.end(inbuf); - } - } -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/index.js deleted file mode 100644 index ddcbba60..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/index.js +++ /dev/null @@ -1,2 +0,0 @@ -exports.Deflater = require("./deflater"); -exports.Inflater = require("./inflater"); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/inflater.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/inflater.js deleted file mode 100644 index 59536c90..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/inflater.js +++ /dev/null @@ -1,448 +0,0 @@ -var Buffer = require("buffer").Buffer; - -function JSInflater(/*Buffer*/input) { - - var WSIZE = 0x8000, - slide = new Buffer(0x10000), - windowPos = 0, - fixedTableList = null, - fixedTableDist, - fixedLookup, - bitBuf = 0, - bitLen = 0, - method = -1, - eof = false, - copyLen = 0, - copyDist = 0, - tblList, tblDist, bitList, bitdist, - - inputPosition = 0, - - MASK_BITS = [0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff], - LENS = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], - LEXT = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99], - DISTS = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577], - DEXT = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], - BITORDER = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; - - function HuffTable(clen, cnum, cval, blist, elist, lookupm) { - - this.status = 0; - this.root = null; - this.maxbit = 0; - - var el, f, tail, - offsets = [], - countTbl = [], - sTbl = [], - values = [], - tentry = {extra: 0, bitcnt: 0, lbase: 0, next: null}; - - tail = this.root = null; - for(var i = 0; i < 0x11; i++) { countTbl[i] = 0; sTbl[i] = 0; offsets[i] = 0; } - for(i = 0; i < 0x120; i++) values[i] = 0; - - el = cnum > 256 ? clen[256] : 16; - - var pidx = -1; - while (++pidx < cnum) countTbl[clen[pidx]]++; - - if(countTbl[0] == cnum) return; - - for(var j = 1; j <= 16; j++) if(countTbl[j] != 0) break; - var bitLen = j; - for(i = 16; i != 0; i--) if(countTbl[i] != 0) break; - var maxLen = i; - - lookupm < j && (lookupm = j); - - var dCodes = 1 << j; - for(; j < i; j++, dCodes <<= 1) - if((dCodes -= countTbl[j]) < 0) { - this.status = 2; - this.maxbit = lookupm; - return; - } - - if((dCodes -= countTbl[i]) < 0) { - this.status = 2; - this.maxbit = lookupm; - return; - } - - countTbl[i] += dCodes; - offsets[1] = j = 0; - pidx = 1; - var xp = 2; - while(--i > 0) offsets[xp++] = (j += countTbl[pidx++]); - pidx = 0; - i = 0; - do { - (j = clen[pidx++]) && (values[offsets[j]++] = i); - } while(++i < cnum); - cnum = offsets[maxLen]; - offsets[0] = i = 0; - pidx = 0; - - var level = -1, - w = sTbl[0] = 0, - cnode = null, - tblCnt = 0, - tblStack = []; - - for(; bitLen <= maxLen; bitLen++) { - var kccnt = countTbl[bitLen]; - while(kccnt-- > 0) { - while(bitLen > w + sTbl[1 + level]) { - w += sTbl[1 + level]; - level++; - tblCnt = (tblCnt = maxLen - w) > lookupm ? lookupm : tblCnt; - if((f = 1 << (j = bitLen - w)) > kccnt + 1) { - f -= kccnt + 1; - xp = bitLen; - while(++j < tblCnt) { - if((f <<= 1) <= countTbl[++xp]) break; - f -= countTbl[xp]; - } - } - if(w + j > el && w < el) j = el - w; - tblCnt = 1 << j; - sTbl[1 + level] = j; - cnode = []; - while (cnode.length < tblCnt) cnode.push({extra: 0, bitcnt: 0, lbase: 0, next: null}); - if (tail == null) { - tail = this.root = {next:null, list:null}; - } else { - tail = tail.next = {next:null, list:null} - } - tail.next = null; - tail.list = cnode; - - tblStack[level] = cnode; - - if(level > 0) { - offsets[level] = i; - tentry.bitcnt = sTbl[level]; - tentry.extra = 16 + j; - tentry.next = cnode; - j = (i & ((1 << w) - 1)) >> (w - sTbl[level]); - - tblStack[level-1][j].extra = tentry.extra; - tblStack[level-1][j].bitcnt = tentry.bitcnt; - tblStack[level-1][j].lbase = tentry.lbase; - tblStack[level-1][j].next = tentry.next; - } - } - tentry.bitcnt = bitLen - w; - if(pidx >= cnum) - tentry.extra = 99; - else if(values[pidx] < cval) { - tentry.extra = (values[pidx] < 256 ? 16 : 15); - tentry.lbase = values[pidx++]; - } else { - tentry.extra = elist[values[pidx] - cval]; - tentry.lbase = blist[values[pidx++] - cval]; - } - - f = 1 << (bitLen - w); - for(j = i >> w; j < tblCnt; j += f) { - cnode[j].extra = tentry.extra; - cnode[j].bitcnt = tentry.bitcnt; - cnode[j].lbase = tentry.lbase; - cnode[j].next = tentry.next; - } - for(j = 1 << (bitLen - 1); (i & j) != 0; j >>= 1) - i ^= j; - i ^= j; - while((i & ((1 << w) - 1)) != offsets[level]) { - w -= sTbl[level]; - level--; - } - } - } - - this.maxbit = sTbl[1]; - this.status = ((dCodes != 0 && maxLen != 1) ? 1 : 0); - } - - function addBits(n) { - while(bitLen < n) { - bitBuf |= input[inputPosition++] << bitLen; - bitLen += 8; - } - return bitBuf; - } - - function cutBits(n) { - bitLen -= n; - return bitBuf >>= n; - } - - function maskBits(n) { - while(bitLen < n) { - bitBuf |= input[inputPosition++] << bitLen; - bitLen += 8; - } - var res = bitBuf & MASK_BITS[n]; - bitBuf >>= n; - bitLen -= n; - return res; - } - - function codes(buff, off, size) { - var e, t; - if(size == 0) return 0; - - var n = 0; - for(;;) { - t = tblList.list[addBits(bitList) & MASK_BITS[bitList]]; - e = t.extra; - while(e > 16) { - if(e == 99) return -1; - cutBits(t.bitcnt); - e -= 16; - t = t.next[addBits(e) & MASK_BITS[e]]; - e = t.extra; - } - cutBits(t.bitcnt); - if(e == 16) { - windowPos &= WSIZE - 1; - buff[off + n++] = slide[windowPos++] = t.lbase; - if(n == size) return size; - continue; - } - if(e == 15) break; - - copyLen = t.lbase + maskBits(e); - t = tblDist.list[addBits(bitdist) & MASK_BITS[bitdist]]; - e = t.extra; - - while(e > 16) { - if(e == 99) return -1; - cutBits(t.bitcnt); - e -= 16; - t = t.next[addBits(e) & MASK_BITS[e]]; - e = t.extra - } - cutBits(t.bitcnt); - copyDist = windowPos - t.lbase - maskBits(e); - - while(copyLen > 0 && n < size) { - copyLen--; - copyDist &= WSIZE - 1; - windowPos &= WSIZE - 1; - buff[off + n++] = slide[windowPos++] = slide[copyDist++]; - } - - if(n == size) return size; - } - - method = -1; // done - return n; - } - - function stored(buff, off, size) { - cutBits(bitLen & 7); - var n = maskBits(0x10); - if(n != ((~maskBits(0x10)) & 0xffff)) return -1; - copyLen = n; - - n = 0; - while(copyLen > 0 && n < size) { - copyLen--; - windowPos &= WSIZE - 1; - buff[off + n++] = slide[windowPos++] = maskBits(8); - } - - if(copyLen == 0) method = -1; - return n; - } - - function fixed(buff, off, size) { - var fixed_bd = 0; - if(fixedTableList == null) { - var lengths = []; - - for(var symbol = 0; symbol < 144; symbol++) lengths[symbol] = 8; - for(; symbol < 256; symbol++) lengths[symbol] = 9; - for(; symbol < 280; symbol++) lengths[symbol] = 7; - for(; symbol < 288; symbol++) lengths[symbol] = 8; - - fixedLookup = 7; - - var htbl = new HuffTable(lengths, 288, 257, LENS, LEXT, fixedLookup); - - if(htbl.status != 0) return -1; - - fixedTableList = htbl.root; - fixedLookup = htbl.maxbit; - - for(symbol = 0; symbol < 30; symbol++) lengths[symbol] = 5; - fixed_bd = 5; - - htbl = new HuffTable(lengths, 30, 0, DISTS, DEXT, fixed_bd); - if(htbl.status > 1) { - fixedTableList = null; - return -1; - } - fixedTableDist = htbl.root; - fixed_bd = htbl.maxbit; - } - - tblList = fixedTableList; - tblDist = fixedTableDist; - bitList = fixedLookup; - bitdist = fixed_bd; - return codes(buff, off, size); - } - - function dynamic(buff, off, size) { - var ll = new Array(0x023C); - - for (var m = 0; m < 0x023C; m++) ll[m] = 0; - - var llencnt = 257 + maskBits(5), - dcodescnt = 1 + maskBits(5), - bitlencnt = 4 + maskBits(4); - - if(llencnt > 286 || dcodescnt > 30) return -1; - - for(var j = 0; j < bitlencnt; j++) ll[BITORDER[j]] = maskBits(3); - for(; j < 19; j++) ll[BITORDER[j]] = 0; - - // build decoding table for trees--single level, 7 bit lookup - bitList = 7; - var hufTable = new HuffTable(ll, 19, 19, null, null, bitList); - if(hufTable.status != 0) - return -1; // incomplete code set - - tblList = hufTable.root; - bitList = hufTable.maxbit; - var lencnt = llencnt + dcodescnt, - i = 0, - lastLen = 0; - while(i < lencnt) { - var hufLcode = tblList.list[addBits(bitList) & MASK_BITS[bitList]]; - j = hufLcode.bitcnt; - cutBits(j); - j = hufLcode.lbase; - if(j < 16) - ll[i++] = lastLen = j; - else if(j == 16) { - j = 3 + maskBits(2); - if(i + j > lencnt) return -1; - while(j-- > 0) ll[i++] = lastLen; - } else if(j == 17) { - j = 3 + maskBits(3); - if(i + j > lencnt) return -1; - while(j-- > 0) ll[i++] = 0; - lastLen = 0; - } else { - j = 11 + maskBits(7); - if(i + j > lencnt) return -1; - while(j-- > 0) ll[i++] = 0; - lastLen = 0; - } - } - bitList = 9; - hufTable = new HuffTable(ll, llencnt, 257, LENS, LEXT, bitList); - bitList == 0 && (hufTable.status = 1); - - if (hufTable.status != 0) return -1; - - tblList = hufTable.root; - bitList = hufTable.maxbit; - - for(i = 0; i < dcodescnt; i++) ll[i] = ll[i + llencnt]; - bitdist = 6; - hufTable = new HuffTable(ll, dcodescnt, 0, DISTS, DEXT, bitdist); - tblDist = hufTable.root; - bitdist = hufTable.maxbit; - - if((bitdist == 0 && llencnt > 257) || hufTable.status != 0) return -1; - - return codes(buff, off, size); - } - - return { - inflate : function(/*Buffer*/outputBuffer) { - tblList = null; - - var size = outputBuffer.length, - offset = 0, i; - - while(offset < size) { - if(eof && method == -1) return; - if(copyLen > 0) { - if(method != 0) { - while(copyLen > 0 && offset < size) { - copyLen--; - copyDist &= WSIZE - 1; - windowPos &= WSIZE - 1; - outputBuffer[offset++] = (slide[windowPos++] = slide[copyDist++]); - } - } else { - while(copyLen > 0 && offset < size) { - copyLen--; - windowPos &= WSIZE - 1; - outputBuffer[offset++] = (slide[windowPos++] = maskBits(8)); - } - copyLen == 0 && (method = -1); // done - } - if (offset == size) return; - } - - if(method == -1) { - if(eof) break; - eof = maskBits(1) != 0; - method = maskBits(2); - tblList = null; - copyLen = 0; - } - switch(method) { - case 0: i = stored(outputBuffer, offset, size - offset); break; - case 1: i = tblList != null ? codes(outputBuffer, offset, size - offset) : fixed(outputBuffer, offset, size - offset); break; - case 2: i = tblList != null ? codes(outputBuffer, offset, size - offset) : dynamic(outputBuffer, offset, size - offset); break; - default: i = -1; break; - } - - if(i == -1) return; - offset += i; - } - } - }; -} - -module.exports = function(/*Buffer*/inbuf) { - var zlib = require("zlib"); - return { - inflateAsync : function(/*Function*/callback) { - var tmp = zlib.createInflateRaw(), - parts = [], total = 0; - tmp.on('data', function(data) { - parts.push(data); - total += data.length; - }); - tmp.on('end', function() { - var buf = new Buffer(total), written = 0; - buf.fill(0); - - for (var i = 0; i < parts.length; i++) { - var part = parts[i]; - part.copy(buf, written); - written += part.length; - } - callback && callback(buf); - }); - tmp.end(inbuf) - }, - - inflate : function(/*Buffer*/outputBuffer) { - var x = { - x: new JSInflater(inbuf) - }; - x.x.inflate(outputBuffer); - delete(x.x); - } - } -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/package.json deleted file mode 100644 index 807d3cd1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "adm-zip", - "version": "0.4.4", - "description": "A Javascript implementation of zip for nodejs. Allows user to create or extract zip files both in memory or to/from disk", - "keywords": [ - "zip", - "methods", - "archive", - "unzip" - ], - "homepage": "http://github.com/cthackers/adm-zip", - "author": { - "name": "Nasca Iacob", - "email": "sy@another-d-mention.ro", - "url": "https://github.com/cthackers" - }, - "bugs": { - "url": "https://github.com/cthackers/adm-zip/issues", - "email": "sy@another-d-mention.ro" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://raw.github.com/cthackers/adm-zip/master/MIT-LICENSE.txt" - } - ], - "main": "adm-zip.js", - "repository": { - "type": "git", - "url": "https://github.com/cthackers/adm-zip.git" - }, - "engines": { - "node": ">=0.3.0" - }, - "readme": "# ADM-ZIP for NodeJS\r\n\r\nADM-ZIP is a pure JavaScript implementation for zip data compression for [NodeJS](http://nodejs.org/). \r\n\r\n# Installation\r\n\r\nWith [npm](http://npmjs.org) do:\r\n\r\n $ npm install adm-zip\r\n\t\r\n## What is it good for?\r\nThe library allows you to:\r\n\r\n* decompress zip files directly to disk or in memory buffers\r\n* compress files and store them to disk in .zip format or in compressed buffers\r\n* update content of/add new/delete files from an existing .zip\r\n\r\n# Dependencies\r\nThere are no other nodeJS libraries that ADM-ZIP is dependent of\r\n\r\n# Examples\r\n\r\n## Basic usage\r\n```javascript\r\n\r\n\tvar AdmZip = require('adm-zip');\r\n\r\n\t// reading archives\r\n\tvar zip = new AdmZip(\"./my_file.zip\");\r\n\tvar zipEntries = zip.getEntries(); // an array of ZipEntry records\r\n\r\n\tzipEntries.forEach(function(zipEntry) {\r\n\t console.log(zipEntry.toString()); // outputs zip entries information\r\n\t\tif (zipEntry.entryName == \"my_file.txt\") {\r\n\t\t console.log(zipEntry.data.toString('utf8')); \r\n\t\t}\r\n\t});\r\n\t// outputs the content of some_folder/my_file.txt\r\n\tconsole.log(zip.readAsText(\"some_folder/my_file.txt\")); \r\n\t// extracts the specified file to the specified location\r\n\tzip.extractEntryTo(/*entry name*/\"some_folder/my_file.txt\", /*target path*/\"/home/me/tempfolder\", /*maintainEntryPath*/false, /*overwrite*/true);\r\n\t// extracts everything\r\n\tzip.extractAllTo(/*target path*/\"/home/me/zipcontent/\", /*overwrite*/true);\r\n\t\r\n\t\r\n\t// creating archives\r\n\tvar zip = new AdmZip();\r\n\t\r\n\t// add file directly\r\n\tzip.addFile(\"test.txt\", new Buffer(\"inner content of the file\"), \"entry comment goes here\");\r\n\t// add local file\r\n\tzip.addLocalFile(\"/home/me/some_picture.png\");\r\n\t// get everything as a buffer\r\n\tvar willSendthis = zip.toBuffer();\r\n\t// or write everything to disk\r\n\tzip.writeZip(/*target file name*/\"/home/me/files.zip\");\r\n\t\r\n\t\r\n\t// ... more examples in the wiki\r\n```\r\n\r\nFor more detailed information please check out the [wiki](https://github.com/cthackers/adm-zip/wiki).\r\n\r\n[![build status](https://secure.travis-ci.org/cthackers/adm-zip.png)](http://travis-ci.org/cthackers/adm-zip)\r\n", - "readmeFilename": "README.md", - "_id": "adm-zip@0.4.4", - "dist": { - "shasum": "b493a1464b82a89ecd8c77b99faa046d8f03ded4" - }, - "_from": "adm-zip@~0.4.3", - "_resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.4.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test.zip b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test.zip deleted file mode 100644 index d57bfc07..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test.zip and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/hidden.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/hidden.txt deleted file mode 100644 index 3c3ca551..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/hidden.txt +++ /dev/null @@ -1,17 +0,0 @@ -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/hidden_readonly.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/hidden_readonly.txt deleted file mode 100644 index 3c3ca551..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/hidden_readonly.txt +++ /dev/null @@ -1,17 +0,0 @@ -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/readonly.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/readonly.txt deleted file mode 100644 index 3c3ca551..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/readonly.txt +++ /dev/null @@ -1,17 +0,0 @@ -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/somefile.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/somefile.txt deleted file mode 100644 index 3c3ca551..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/somefile.txt +++ /dev/null @@ -1,17 +0,0 @@ -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/asd/New Text Document.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/asd/New Text Document.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/blank file.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/blank file.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/fast.zip b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/fast.zip deleted file mode 100644 index f4ed17b9..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/fast.zip and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/fastest.zip b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/fastest.zip deleted file mode 100644 index f4ed17b9..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/fastest.zip and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/linux_arc.zip b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/linux_arc.zip deleted file mode 100644 index 188eccbe..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/linux_arc.zip and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/maximum.zip b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/maximum.zip deleted file mode 100644 index 86a8ec77..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/maximum.zip and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/normal.zip b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/normal.zip deleted file mode 100644 index b4602c94..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/normal.zip and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/store.zip b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/store.zip deleted file mode 100644 index e2add30d..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/store.zip and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/ultra.zip b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/ultra.zip deleted file mode 100644 index 86a8ec77..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/ultra.zip and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/index.js deleted file mode 100644 index 70acb517..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/index.js +++ /dev/null @@ -1,5 +0,0 @@ -var Attr = require("../util").FileAttr, - Zip = require("../adm-zip"), - fs = require("fs"); - -//zip.addLocalFile("./test/readonly.txt"); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/constants.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/constants.js deleted file mode 100644 index 05480541..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/constants.js +++ /dev/null @@ -1,84 +0,0 @@ -module.exports = { - /* The local file header */ - LOCHDR : 30, // LOC header size - LOCSIG : 0x04034b50, // "PK\003\004" - LOCVER : 4, // version needed to extract - LOCFLG : 6, // general purpose bit flag - LOCHOW : 8, // compression method - LOCTIM : 10, // modification time (2 bytes time, 2 bytes date) - LOCCRC : 14, // uncompressed file crc-32 value - LOCSIZ : 18, // compressed size - LOCLEN : 22, // uncompressed size - LOCNAM : 26, // filename length - LOCEXT : 28, // extra field length - - /* The Data descriptor */ - EXTSIG : 0x08074b50, // "PK\007\008" - EXTHDR : 16, // EXT header size - EXTCRC : 4, // uncompressed file crc-32 value - EXTSIZ : 8, // compressed size - EXTLEN : 12, // uncompressed size - - /* The central directory file header */ - CENHDR : 46, // CEN header size - CENSIG : 0x02014b50, // "PK\001\002" - CENVEM : 4, // version made by - CENVER : 6, // version needed to extract - CENFLG : 8, // encrypt, decrypt flags - CENHOW : 10, // compression method - CENTIM : 12, // modification time (2 bytes time, 2 bytes date) - CENCRC : 16, // uncompressed file crc-32 value - CENSIZ : 20, // compressed size - CENLEN : 24, // uncompressed size - CENNAM : 28, // filename length - CENEXT : 30, // extra field length - CENCOM : 32, // file comment length - CENDSK : 34, // volume number start - CENATT : 36, // internal file attributes - CENATX : 38, // external file attributes (host system dependent) - CENOFF : 42, // LOC header offset - - /* The entries in the end of central directory */ - ENDHDR : 22, // END header size - ENDSIG : 0x06054b50, // "PK\005\006" - ENDSUB : 8, // number of entries on this disk - ENDTOT : 10, // total number of entries - ENDSIZ : 12, // central directory size in bytes - ENDOFF : 16, // offset of first CEN header - ENDCOM : 20, // zip file comment length - - /* Compression methods */ - STORED : 0, // no compression - SHRUNK : 1, // shrunk - REDUCED1 : 2, // reduced with compression factor 1 - REDUCED2 : 3, // reduced with compression factor 2 - REDUCED3 : 4, // reduced with compression factor 3 - REDUCED4 : 5, // reduced with compression factor 4 - IMPLODED : 6, // imploded - // 7 reserved - DEFLATED : 8, // deflated - ENHANCED_DEFLATED: 9, // enhanced deflated - PKWARE : 10,// PKWare DCL imploded - // 11 reserved - BZIP2 : 12, // compressed using BZIP2 - // 13 reserved - LZMA : 14, // LZMA - // 15-17 reserved - IBM_TERSE : 18, // compressed using IBM TERSE - IBM_LZ77 : 19, //IBM LZ77 z - - /* General purpose bit flag */ - FLG_ENC : 0, // encripted file - FLG_COMP1 : 1, // compression option - FLG_COMP2 : 2, // compression option - FLG_DESC : 4, // data descriptor - FLG_ENH : 8, // enhanced deflation - FLG_STR : 16, // strong encryption - FLG_LNG : 1024, // language encoding - FLG_MSK : 4096, // mask header values - - /* Load type */ - FILE : 0, - BUFFER : 1, - NONE : 2 -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/errors.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/errors.js deleted file mode 100644 index db5d69e9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/errors.js +++ /dev/null @@ -1,35 +0,0 @@ -module.exports = { - /* Header error messages */ - "INVALID_LOC" : "Invalid LOC header (bad signature)", - "INVALID_CEN" : "Invalid CEN header (bad signature)", - "INVALID_END" : "Invalid END header (bad signature)", - - /* ZipEntry error messages*/ - "NO_DATA" : "Nothing to decompress", - "BAD_CRC" : "CRC32 checksum failed", - "FILE_IN_THE_WAY" : "There is a file in the way: %s", - "UNKNOWN_METHOD" : "Invalid/unsupported compression method", - - /* Inflater error messages */ - "AVAIL_DATA" : "inflate::Available inflate data did not terminate", - "INVALID_DISTANCE" : "inflate::Invalid literal/length or distance code in fixed or dynamic block", - "TO_MANY_CODES" : "inflate::Dynamic block code description: too many length or distance codes", - "INVALID_REPEAT_LEN" : "inflate::Dynamic block code description: repeat more than specified lengths", - "INVALID_REPEAT_FIRST" : "inflate::Dynamic block code description: repeat lengths with no first length", - "INCOMPLETE_CODES" : "inflate::Dynamic block code description: code lengths codes incomplete", - "INVALID_DYN_DISTANCE": "inflate::Dynamic block code description: invalid distance code lengths", - "INVALID_CODES_LEN": "inflate::Dynamic block code description: invalid literal/length code lengths", - "INVALID_STORE_BLOCK" : "inflate::Stored block length did not match one's complement", - "INVALID_BLOCK_TYPE" : "inflate::Invalid block type (type == 3)", - - /* ADM-ZIP error messages */ - "CANT_EXTRACT_FILE" : "Could not extract the file", - "CANT_OVERRIDE" : "Target file already exists", - "NO_ZIP" : "No zip file was loaded", - "NO_ENTRY" : "Entry doesn't exist", - "DIRECTORY_CONTENT_ERROR" : "A directory cannot have content", - "FILE_NOT_FOUND" : "File not found: %s", - "NOT_IMPLEMENTED" : "Not implemented", - "INVALID_FILENAME" : "Invalid filename", - "INVALID_FORMAT" : "Invalid or unsupported zip format. No END header found" -}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/fattr.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/fattr.js deleted file mode 100644 index 2191ec1c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/fattr.js +++ /dev/null @@ -1,84 +0,0 @@ -var fs = require("fs"), - pth = require("path"); - -fs.existsSync = fs.existsSync || pth.existsSync; - -module.exports = function(/*String*/path) { - - var _path = path || "", - _permissions = 0, - _obj = newAttr(), - _stat = null; - - function newAttr() { - return { - directory : false, - readonly : false, - hidden : false, - executable : false, - mtime : 0, - atime : 0 - } - } - - if (_path && fs.existsSync(_path)) { - _stat = fs.statSync(_path); - _obj.directory = _stat.isDirectory(); - _obj.mtime = _stat.mtime; - _obj.atime = _stat.atime; - _obj.executable = !!(1 & parseInt ((_stat.mode & parseInt ("777", 8)).toString (8)[0])); - _obj.readonly = !!(2 & parseInt ((_stat.mode & parseInt ("777", 8)).toString (8)[0])); - _obj.hidden = pth.basename(_path)[0] === "."; - } else { - console.warn("Invalid path: " + _path) - } - - return { - - get directory () { - return _obj.directory; - }, - - get readOnly () { - return _obj.readonly; - }, - - get hidden () { - return _obj.hidden; - }, - - get mtime () { - return _obj.mtime; - }, - - get atime () { - return _obj.atime; - }, - - - get executable () { - return _obj.executable; - }, - - decodeAttributes : function(val) { - - }, - - encodeAttributes : function (val) { - - }, - - toString : function() { - return '{\n' + - '\t"path" : "' + _path + ",\n" + - '\t"isDirectory" : ' + _obj.directory + ",\n" + - '\t"isReadOnly" : ' + _obj.readonly + ",\n" + - '\t"isHidden" : ' + _obj.hidden + ",\n" + - '\t"isExecutable" : ' + _obj.executable + ",\n" + - '\t"mTime" : ' + _obj.mtime + "\n" + - '\t"aTime" : ' + _obj.atime + "\n" + - '}'; - } - } - -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/index.js deleted file mode 100644 index 935fc1a4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/index.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = require("./utils"); -module.exports.Constants = require("./constants"); -module.exports.Errors = require("./errors"); -module.exports.FileAttr = require("./fattr"); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/utils.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/utils.js deleted file mode 100644 index b14db8c1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/utils.js +++ /dev/null @@ -1,145 +0,0 @@ -var fs = require("fs"), - pth = require('path'); - -fs.existsSync = fs.existsSync || pth.existsSync; - -module.exports = (function() { - - var crcTable = [], - Constants = require('./constants'), - Errors = require('./errors'), - - PATH_SEPARATOR = pth.normalize("/"); - - - function mkdirSync(/*String*/path) { - var resolvedPath = path.split(PATH_SEPARATOR)[0]; - path.split(PATH_SEPARATOR).forEach(function(name) { - if (!name || name.substr(-1,1) == ":") return; - resolvedPath += PATH_SEPARATOR + name; - var stat; - try { - stat = fs.statSync(resolvedPath); - } catch (e) { - fs.mkdirSync(resolvedPath); - } - if (stat && stat.isFile()) - throw Errors.FILE_IN_THE_WAY.replace("%s", resolvedPath); - }); - } - - function findSync(/*String*/root, /*RegExp*/pattern, /*Boolean*/recoursive) { - if (typeof pattern === 'boolean') { - recoursive = pattern; - pattern = undefined; - } - var files = []; - fs.readdirSync(root).forEach(function(file) { - var path = pth.join(root, file); - - if (fs.statSync(path).isDirectory() && recoursive) - files = files.concat(findSync(path, pattern, recoursive)); - - if (!pattern || pattern.test(path)) { - files.push(pth.normalize(path) + (fs.statSync(path).isDirectory() ? PATH_SEPARATOR : "")); - } - - }); - return files; - } - - return { - makeDir : function(/*String*/path) { - mkdirSync(path); - }, - - crc32 : function(buf) { - var b = new Buffer(4); - if (!crcTable.length) { - for (var n = 0; n < 256; n++) { - var c = n; - for (var k = 8; --k >= 0;) // - if ((c & 1) != 0) { c = 0xedb88320 ^ (c >>> 1); } else { c = c >>> 1; } - if (c < 0) { - b.writeInt32LE(c, 0); - c = b.readUInt32LE(0); - } - crcTable[n] = c; - } - } - var crc = 0, off = 0, len = buf.length, c1 = ~crc; - while(--len >= 0) c1 = crcTable[(c1 ^ buf[off++]) & 0xff] ^ (c1 >>> 8); - crc = ~c1; - b.writeInt32LE(crc & 0xffffffff, 0); - return b.readUInt32LE(0); - }, - - methodToString : function(/*Number*/method) { - switch (method) { - case Constants.STORED: - return 'STORED (' + method + ')'; - case Constants.DEFLATED: - return 'DEFLATED (' + method + ')'; - default: - return 'UNSUPPORTED (' + method + ')' - } - - }, - - writeFileTo : function(/*String*/path, /*Buffer*/content, /*Boolean*/overwrite, /*Number*/attr) { - if (fs.existsSync(path)) { - if (!overwrite) - return false; // cannot overwite - - var stat = fs.statSync(path); - if (stat.isDirectory()) { - return false; - } - } - var folder = pth.dirname(path); - if (!fs.existsSync(folder)) { - mkdirSync(folder); - } - - var fd; - try { - fd = fs.openSync(path, 'w', 438); // 0666 - } catch(e) { - fs.chmodSync(path, 438); - fd = fs.openSync(path, 'w', 438); - } - if (fd) { - fs.writeSync(fd, content, 0, content.length, 0); - fs.closeSync(fd); - } - fs.chmodSync(path, attr || 438); - return true; - }, - - findFiles : function(/*String*/path) { - return findSync(path, true); - }, - - getAttributes : function(/*String*/path) { - - }, - - setAttributes : function(/*String*/path) { - - }, - - toBuffer : function(input) { - if (Buffer.isBuffer(input)) { - return input; - } else { - if (input.length == 0) { - return new Buffer(0) - } - return new Buffer(input, 'utf8'); - } - }, - - Constants : Constants, - Errors : Errors - } -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/zipEntry.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/zipEntry.js deleted file mode 100644 index 02c31725..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/zipEntry.js +++ /dev/null @@ -1,224 +0,0 @@ -var Utils = require("./util"), - Headers = require("./headers"), - Constants = Utils.Constants, - Methods = require("./methods"); - -module.exports = function (/*Buffer*/input) { - - var _entryHeader = new Headers.EntryHeader(), - _entryName = new Buffer(0), - _comment = new Buffer(0), - _isDirectory = false, - uncompressedData = null, - _extra = new Buffer(0); - - function getCompressedDataFromZip() { - if (!input || !Buffer.isBuffer(input)) { - return new Buffer(0); - } - _entryHeader.loadDataHeaderFromBinary(input); - return input.slice(_entryHeader.realDataOffset, _entryHeader.realDataOffset + _entryHeader.compressedSize) - } - - function crc32OK(data) { - // if bit 3 (0x08) of the general-purpose flags field is set, then the CRC-32 and file sizes are not known when the header is written - if (_entryHeader.flags & 0x8 != 0x8) { - if (Utils.crc32(data) != _entryHeader.crc) { - return false; - } - } else { - // @TODO: load and check data descriptor header - // The fields in the local header are filled with zero, and the CRC-32 and size are appended in a 12-byte structure - // (optionally preceded by a 4-byte signature) immediately after the compressed data: - } - return true; - } - - function decompress(/*Boolean*/async, /*Function*/callback) { - if (_isDirectory) { - if (async && callback) { - callback(new Buffer(0), Utils.Errors.DIRECTORY_CONTENT_ERROR); //si added error. - } - return new Buffer(0); - } - - var compressedData = getCompressedDataFromZip(); - if (compressedData.length == 0) { - if (async && callback) callback(compressedData, Utils.Errors.NO_DATA);//si added error. - return compressedData; - } - - var data = new Buffer(_entryHeader.size); - data.fill(0); - - switch (_entryHeader.method) { - case Utils.Constants.STORED: - compressedData.copy(data); - if (!crc32OK(data)) { - if (async && callback) callback(data, Utils.Errors.BAD_CRC);//si added error - return Utils.Errors.BAD_CRC; - } else {//si added otherwise did not seem to return data. - if (async && callback) callback(data); - return data; - } - break; - case Utils.Constants.DEFLATED: - var inflater = new Methods.Inflater(compressedData); - if (!async) { - inflater.inflate(data); - if (!crc32OK(data)) { - console.warn(Utils.Errors.BAD_CRC + " " + _entryName.toString()) - } - return data; - } else { - inflater.inflateAsync(function(result) { - result.copy(data, 0); - if (crc32OK(data)) { - if (callback) callback(data, Utils.Errors.BAD_CRC); //si added error - } else { //si added otherwise did not seem to return data. - if (callback) callback(data); - } - }) - } - break; - default: - if (async && callback) callback(new Buffer(0), Utils.Errors.UNKNOWN_METHOD); - return Utils.Errors.UNKNOWN_METHOD; - } - } - - function compress(/*Boolean*/async, /*Function*/callback) { - if ((!uncompressedData || !uncompressedData.length) && Buffer.isBuffer(input)) { - // no data set or the data wasn't changed to require recompression - if (async && callback) callback(getCompressedDataFromZip()); - return getCompressedDataFromZip(); - } - - if (uncompressedData.length && !_isDirectory) { - var compressedData; - // Local file header - switch (_entryHeader.method) { - case Utils.Constants.STORED: - _entryHeader.compressedSize = _entryHeader.size; - - compressedData = new Buffer(uncompressedData.length); - uncompressedData.copy(compressedData); - - if (async && callback) callback(compressedData); - return compressedData; - - break; - default: - case Utils.Constants.DEFLATED: - - var deflater = new Methods.Deflater(uncompressedData); - if (!async) { - var deflated = deflater.deflate(); - _entryHeader.compressedSize = deflated.length; - return deflated; - } else { - deflater.deflateAsync(function(data) { - compressedData = new Buffer(data.length); - _entryHeader.compressedSize = data.length; - data.copy(compressedData); - callback && callback(compressedData); - }) - } - deflater = null; - break; - } - } else { - if (async && callback) { - callback(new Buffer(0)); - } else { - return new Buffer(0); - } - } - } - - return { - get entryName () { return _entryName.toString(); }, - get rawEntryName() { return _entryName; }, - set entryName (val) { - _entryName = Utils.toBuffer(val); - var lastChar = _entryName[_entryName.length - 1]; - _isDirectory = (lastChar == 47) || (lastChar == 92); - _entryHeader.fileNameLength = _entryName.length; - }, - - get extra () { return _extra; }, - set extra (val) { - _extra = val; - _entryHeader.extraLength = val.length; - }, - - get comment () { return _comment.toString(); }, - set comment (val) { - _comment = Utils.toBuffer(val); - _entryHeader.commentLength = _comment.length; - }, - - get name () { var n = _entryName.toString(); return _isDirectory ? n.substr(n.length - 1).split("/").pop() : n.split("/").pop(); }, - get isDirectory () { return _isDirectory }, - - getCompressedData : function() { - return compress(false, null) - }, - - getCompressedDataAsync : function(/*Function*/callback) { - compress(true, callback) - }, - - setData : function(value) { - uncompressedData = Utils.toBuffer(value); - if (!_isDirectory && uncompressedData.length) { - _entryHeader.size = uncompressedData.length; - _entryHeader.method = Utils.Constants.DEFLATED; - _entryHeader.crc = Utils.crc32(value); - } else { // folders and blank files should be stored - _entryHeader.method = Utils.Constants.STORED; - } - }, - - getData : function() { - return decompress(false, null); - }, - - getDataAsync : function(/*Function*/callback) { - decompress(true, callback) - }, - - set header(/*Buffer*/data) { - _entryHeader.loadFromBinary(data); - }, - - get header() { - return _entryHeader; - }, - - packHeader : function() { - var header = _entryHeader.entryHeaderToBinary(); - // add - _entryName.copy(header, Utils.Constants.CENHDR); - if (_entryHeader.extraLength) { - _extra.copy(header, Utils.Constants.CENHDR + _entryName.length) - } - if (_entryHeader.commentLength) { - _comment.copy(header, Utils.Constants.CENHDR + _entryName.length + _entryHeader.extraLength, _comment.length); - } - return header; - }, - - toString : function() { - return '{\n' + - '\t"entryName" : "' + _entryName.toString() + "\",\n" + - '\t"name" : "' + _entryName.toString().split("/").pop() + "\",\n" + - '\t"comment" : "' + _comment.toString() + "\",\n" + - '\t"isDirectory" : ' + _isDirectory + ",\n" + - '\t"header" : ' + _entryHeader.toString().replace(/\t/mg, "\t\t") + ",\n" + - '\t"compressedData" : <' + (input && input.length + " bytes buffer" || "null") + ">\n" + - '\t"data" : <' + (uncompressedData && uncompressedData.length + " bytes buffer" || "null") + ">\n" + - '}'; - } - } -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/zipFile.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/zipFile.js deleted file mode 100644 index f066d7ed..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/zipFile.js +++ /dev/null @@ -1,311 +0,0 @@ -var ZipEntry = require("./zipEntry"), - Headers = require("./headers"), - Utils = require("./util"); - -module.exports = function(/*String|Buffer*/input, /*Number*/inputType) { - var entryList = [], - entryTable = {}, - _comment = new Buffer(0), - filename = "", - fs = require("fs"), - inBuffer = null, - mainHeader = new Headers.MainHeader(); - - if (inputType == Utils.Constants.FILE) { - // is a filename - filename = input; - inBuffer = fs.readFileSync(filename); - readMainHeader(); - } else if (inputType == Utils.Constants.BUFFER) { - // is a memory buffer - inBuffer = input; - readMainHeader(); - } else { - // none. is a new file - } - - function readEntries() { - entryTable = {}; - entryList = new Array(mainHeader.diskEntries); // total number of entries - var index = mainHeader.offset; // offset of first CEN header - for(var i = 0; i < entryList.length; i++) { - - var tmp = index, - entry = new ZipEntry(inBuffer); - entry.header = inBuffer.slice(tmp, tmp += Utils.Constants.CENHDR); - - entry.entryName = inBuffer.slice(tmp, tmp += entry.header.fileNameLength); - - if (entry.header.extraLength) { - entry.extra = inBuffer.slice(tmp, tmp += entry.header.extraLength); - } - - if (entry.header.commentLength) - entry.comment = inBuffer.slice(tmp, tmp + entry.header.commentLength); - - index += entry.header.entryHeaderSize; - - entryList[i] = entry; - entryTable[entry.entryName] = entry; - } - } - - function readMainHeader() { - var i = inBuffer.length - Utils.Constants.ENDHDR, // END header size - n = Math.max(0, i - 0xFFFF), // 0xFFFF is the max zip file comment length - endOffset = 0; // Start offset of the END header - - for (i; i >= n; i--) { - if (inBuffer[i] != 0x50) continue; // quick check that the byte is 'P' - if (inBuffer.readUInt32LE(i) == Utils.Constants.ENDSIG) { // "PK\005\006" - endOffset = i; - break; - } - } - if (!endOffset) - throw Utils.Errors.INVALID_FORMAT; - - mainHeader.loadFromBinary(inBuffer.slice(endOffset, endOffset + Utils.Constants.ENDHDR)); - if (mainHeader.commentLength) { - _comment = inBuffer.slice(endOffset + Utils.Constants.ENDHDR); - } - readEntries(); - } - - return { - /** - * Returns an array of ZipEntry objects existent in the current opened archive - * @return Array - */ - get entries () { - return entryList; - }, - - /** - * Archive comment - * @return {String} - */ - get comment () { return _comment.toString(); }, - set comment(val) { - mainHeader.commentLength = val.length; - _comment = val; - }, - - /** - * Returns a reference to the entry with the given name or null if entry is inexistent - * - * @param entryName - * @return ZipEntry - */ - getEntry : function(/*String*/entryName) { - return entryTable[entryName] || null; - }, - - /** - * Adds the given entry to the entry list - * - * @param entry - */ - setEntry : function(/*ZipEntry*/entry) { - entryList.push(entry); - entryTable[entry.entryName] = entry; - mainHeader.totalEntries = entryList.length; - }, - - /** - * Removes the entry with the given name from the entry list. - * - * If the entry is a directory, then all nested files and directories will be removed - * @param entryName - */ - deleteEntry : function(/*String*/entryName) { - var entry = entryTable[entryName]; - if (entry && entry.isDirectory) { - var _self = this; - this.getEntryChildren(entry).forEach(function(child) { - if (child.entryName != entryName) { - _self.deleteEntry(child.entryName) - } - }) - } - entryList.splice(entryList.indexOf(entry), 1); - delete(entryTable[entryName]); - mainHeader.totalEntries = entryList.length; - }, - - /** - * Iterates and returns all nested files and directories of the given entry - * - * @param entry - * @return Array - */ - getEntryChildren : function(/*ZipEntry*/entry) { - if (entry.isDirectory) { - var list = [], - name = entry.entryName, - len = name.length; - - entryList.forEach(function(zipEntry) { - if (zipEntry.entryName.substr(0, len) == name) { - list.push(zipEntry); - } - }); - return list; - } - return [] - }, - - /** - * Returns the zip file - * - * @return Buffer - */ - compressToBuffer : function() { - if (entryList.length > 1) { - entryList.sort(function(a, b) { - var nameA = a.entryName.toLowerCase(); - var nameB = b.entryName.toLowerCase(); - if (nameA < nameB) {return -1} - if (nameA > nameB) {return 1} - return 0; - }); - } - - var totalSize = 0, - dataBlock = [], - entryHeaders = [], - dindex = 0; - - mainHeader.size = 0; - mainHeader.offset = 0; - - entryList.forEach(function(entry) { - entry.header.offset = dindex; - - // compress data and set local and entry header accordingly. Reason why is called first - var compressedData = entry.getCompressedData(); - // data header - var dataHeader = entry.header.dataHeaderToBinary(); - var postHeader = new Buffer(entry.entryName + entry.extra.toString()); - var dataLength = dataHeader.length + postHeader.length + compressedData.length; - - dindex += dataLength; - - dataBlock.push(dataHeader); - dataBlock.push(postHeader); - dataBlock.push(compressedData); - - var entryHeader = entry.packHeader(); - entryHeaders.push(entryHeader); - mainHeader.size += entryHeader.length; - totalSize += (dataLength + entryHeader.length); - }); - - totalSize += mainHeader.mainHeaderSize; // also includes zip file comment length - // point to end of data and begining of central directory first record - mainHeader.offset = dindex; - - dindex = 0; - var outBuffer = new Buffer(totalSize); - dataBlock.forEach(function(content) { - content.copy(outBuffer, dindex); // write data blocks - dindex += content.length; - }); - entryHeaders.forEach(function(content) { - content.copy(outBuffer, dindex); // write central directory entries - dindex += content.length; - }); - - var mh = mainHeader.toBinary(); - if (_comment) { - _comment.copy(mh, Utils.Constants.ENDHDR); // add zip file comment - } - - mh.copy(outBuffer, dindex); // write main header - - return outBuffer - }, - - toAsyncBuffer : function(/*Function*/onSuccess,/*Function*/onFail,/*Function*/onItemStart,/*Function*/onItemEnd) { - if (entryList.length > 1) { - entryList.sort(function(a, b) { - var nameA = a.entryName.toLowerCase(); - var nameB = b.entryName.toLowerCase(); - if (nameA > nameB) {return -1} - if (nameA < nameB) {return 1} - return 0; - }); - } - - var totalSize = 0, - dataBlock = [], - entryHeaders = [], - dindex = 0; - - mainHeader.size = 0; - mainHeader.offset = 0; - - var compress=function(entryList){ - var self=arguments.callee; - var entry; - if(entryList.length){ - var entry=entryList.pop(); - var name=entry.entryName + entry.extra.toString(); - if(onItemStart)onItemStart(name); - entry.getCompressedDataAsync(function(compressedData){ - if(onItemEnd)onItemEnd(name); - - entry.header.offset = dindex; - // data header - var dataHeader = entry.header.dataHeaderToBinary(); - var postHeader = new Buffer(name); - var dataLength = dataHeader.length + postHeader.length + compressedData.length; - - dindex += dataLength; - - dataBlock.push(dataHeader); - dataBlock.push(postHeader); - dataBlock.push(compressedData); - - var entryHeader = entry.packHeader(); - entryHeaders.push(entryHeader); - mainHeader.size += entryHeader.length; - totalSize += (dataLength + entryHeader.length); - - if(entryList.length){ - self(entryList); - }else{ - - - totalSize += mainHeader.mainHeaderSize; // also includes zip file comment length - // point to end of data and begining of central directory first record - mainHeader.offset = dindex; - - dindex = 0; - var outBuffer = new Buffer(totalSize); - dataBlock.forEach(function(content) { - content.copy(outBuffer, dindex); // write data blocks - dindex += content.length; - }); - entryHeaders.forEach(function(content) { - content.copy(outBuffer, dindex); // write central directory entries - dindex += content.length; - }); - - var mh = mainHeader.toBinary(); - if (_comment) { - _comment.copy(mh, Utils.Constants.ENDHDR); // add zip file comment - } - - mh.copy(outBuffer, dindex); // write main header - - onSuccess(outBuffer); - } - }); - } - }; - - compress(entryList); - } - } -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/.npmignore deleted file mode 100644 index 13abef4f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -node_modules/* -npm_debug.log diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/LICENSE deleted file mode 100644 index 6d03581f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2012 'Dominic Tarr' - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/README.md deleted file mode 100644 index 565e0e26..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# stream-combiner - -<img src=https://secure.travis-ci.org/dominictarr/stream-combiner.png?branch=master> - -## Combine (stream1,...,streamN) - -Turn a pipeline into a single stream. `pipeline` returns a stream that writes to the first stream -and reads from the last stream. - -Listening for 'error' will recieve errors from all streams inside the pipe. - -``` js - var Combine = require('stream-combiner') - var es = require('event-stream') - - Combine( //connect streams together with `pipe` - process.openStdin(), //open stdin - es.split(), //split stream to break on newlines - es.map(function (data, callback) {//turn this async function into a stream - callback(null - , inspect(JSON.parse(data))) //render it nicely - }), - process.stdout // pipe it to stdout ! - ) -``` - -## License - -MIT diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/index.js deleted file mode 100644 index 99cf5b61..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/index.js +++ /dev/null @@ -1,39 +0,0 @@ -var duplexer = require('duplexer') - -module.exports = function () { - - var streams = [].slice.call(arguments) - , first = streams[0] - , last = streams[streams.length - 1] - , thepipe = duplexer(first, last) - - if(streams.length == 1) - return streams[0] - else if (!streams.length) - throw new Error('connect called with empty args') - - //pipe all the streams together - - function recurse (streams) { - if(streams.length < 2) - return - streams[0].pipe(streams[1]) - recurse(streams.slice(1)) - } - - recurse(streams) - - function onerror () { - var args = [].slice.call(arguments) - args.unshift('error') - thepipe.emit.apply(thepipe, args) - } - - //es.duplex already reemits the error from the first and last stream. - //add a listener for the inner streams in the pipeline. - for(var i = 1; i < streams.length - 1; i ++) - streams[i].on('error', onerror) - - return thepipe -} - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/.npmignore deleted file mode 100644 index 062c11e8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -*.log -*.err \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/.travis.yml deleted file mode 100644 index ed05f88d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.11" - - "0.10" - - "0.8" - - "0.6" diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/LICENCE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/LICENCE deleted file mode 100644 index a23e08a8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 Raynos. - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/README.md deleted file mode 100644 index 61ff71aa..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# duplexer - -[![build status][1]][2] [![dependency status][3]][4] - -[![browser support][5]][6] - -Creates a duplex stream - -Taken from [event-stream][7] - -## duplex (writeStream, readStream) - -Takes a writable stream and a readable stream and makes them appear as a readable writable stream. - -It is assumed that the two streams are connected to each other in some way. - -## Example - -```js -var grep = cp.exec('grep Stream') - -duplex(grep.stdin, grep.stdout) -``` - -## Installation - -`npm install duplexer` - -## Tests - -`npm test` - -## Contributors - - - Dominictarr - - Raynos - - samccone - -## MIT Licenced - - [1]: https://secure.travis-ci.org/Raynos/duplexer.png - [2]: https://travis-ci.org/Raynos/duplexer - [3]: https://david-dm.org/Raynos/duplexer.png - [4]: https://david-dm.org/Raynos/duplexer - [5]: https://ci.testling.com/Raynos/duplexer.png - [6]: https://ci.testling.com/Raynos/duplexer - [7]: https://github.com/dominictarr/event-stream#duplex-writestream-readstream diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/index.js deleted file mode 100644 index a188a210..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/index.js +++ /dev/null @@ -1,87 +0,0 @@ -var Stream = require("stream") -var writeMethods = ["write", "end", "destroy"] -var readMethods = ["resume", "pause"] -var readEvents = ["data", "close"] -var slice = Array.prototype.slice - -module.exports = duplex - -function forEach (arr, fn) { - if (arr.forEach) { - return arr.forEach(fn) - } - - for (var i = 0; i < arr.length; i++) { - fn(arr[i], i) - } -} - -function duplex(writer, reader) { - var stream = new Stream() - var ended = false - - forEach(writeMethods, proxyWriter) - - forEach(readMethods, proxyReader) - - forEach(readEvents, proxyStream) - - reader.on("end", handleEnd) - - writer.on("drain", function() { - stream.emit("drain") - }) - - writer.on("error", reemit) - reader.on("error", reemit) - - stream.writable = writer.writable - stream.readable = reader.readable - - return stream - - function proxyWriter(methodName) { - stream[methodName] = method - - function method() { - return writer[methodName].apply(writer, arguments) - } - } - - function proxyReader(methodName) { - stream[methodName] = method - - function method() { - stream.emit(methodName) - var func = reader[methodName] - if (func) { - return func.apply(reader, arguments) - } - reader.emit(methodName) - } - } - - function proxyStream(methodName) { - reader.on(methodName, reemit) - - function reemit() { - var args = slice.call(arguments) - args.unshift(methodName) - stream.emit.apply(stream, args) - } - } - - function handleEnd() { - if (ended) { - return - } - ended = true - var args = slice.call(arguments) - args.unshift("end") - stream.emit.apply(stream, args) - } - - function reemit(err) { - stream.emit("error", err) - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/package.json deleted file mode 100644 index d78e4d07..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "duplexer", - "version": "0.1.1", - "description": "Creates a duplex stream", - "keywords": [], - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Raynos/duplexer.git" - }, - "main": "index", - "homepage": "https://github.com/Raynos/duplexer", - "contributors": [ - { - "name": "Jake Verbaten" - } - ], - "bugs": { - "url": "https://github.com/Raynos/duplexer/issues", - "email": "raynos2@gmail.com" - }, - "devDependencies": { - "tape": "0.3.3", - "through": "~0.1.4" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/Raynos/duplexer/raw/master/LICENSE" - } - ], - "scripts": { - "test": "node test" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "ie/8..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "readme": "# duplexer\n\n[![build status][1]][2] [![dependency status][3]][4]\n\n[![browser support][5]][6]\n\nCreates a duplex stream\n\nTaken from [event-stream][7]\n\n## duplex (writeStream, readStream)\n\nTakes a writable stream and a readable stream and makes them appear as a readable writable stream.\n\nIt is assumed that the two streams are connected to each other in some way.\n\n## Example\n\n```js\nvar grep = cp.exec('grep Stream')\n\nduplex(grep.stdin, grep.stdout)\n```\n\n## Installation\n\n`npm install duplexer`\n\n## Tests\n\n`npm test`\n\n## Contributors\n\n - Dominictarr\n - Raynos\n - samccone\n\n## MIT Licenced\n\n [1]: https://secure.travis-ci.org/Raynos/duplexer.png\n [2]: https://travis-ci.org/Raynos/duplexer\n [3]: https://david-dm.org/Raynos/duplexer.png\n [4]: https://david-dm.org/Raynos/duplexer\n [5]: https://ci.testling.com/Raynos/duplexer.png\n [6]: https://ci.testling.com/Raynos/duplexer\n [7]: https://github.com/dominictarr/event-stream#duplex-writestream-readstream\n", - "readmeFilename": "README.md", - "_id": "duplexer@0.1.1", - "dist": { - "shasum": "7fb4a6591c344b842e6f6764796a996ff912e7f4" - }, - "_from": "duplexer@~0.1.1", - "_resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/test/index.js deleted file mode 100644 index 4988e0d9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/test/index.js +++ /dev/null @@ -1,31 +0,0 @@ -var through = require("through") -var test = require("tape") - -var duplex = require("../index") - -var readable = through() -var writable = through(write) -var written = 0 -var data = 0 - -var stream = duplex(writable, readable) - -function write() { - written++ -} - -stream.on("data", ondata) - -function ondata() { - data++ -} - -test("emit and write", function(t) { - t.plan(2) - - stream.write() - readable.emit("data") - - t.equal(written, 1, "should have written once") - t.equal(data, 1, "should have recived once") -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/package.json deleted file mode 100644 index 3a25f682..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "stream-combiner", - "version": "0.0.4", - "homepage": "https://github.com/dominictarr/stream-combiner", - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/stream-combiner.git" - }, - "dependencies": { - "duplexer": "~0.1.1" - }, - "devDependencies": { - "tape": "~2.3.0", - "event-stream": "~3.0.7" - }, - "scripts": { - "test": "set -e; for t in test/*.js; do node $t; done" - }, - "author": { - "name": "'Dominic Tarr'", - "email": "dominic.tarr@gmail.com", - "url": "http://dominictarr.com" - }, - "license": "MIT", - "readme": "# stream-combiner\n\n<img src=https://secure.travis-ci.org/dominictarr/stream-combiner.png?branch=master>\n\n## Combine (stream1,...,streamN)\n\nTurn a pipeline into a single stream. `pipeline` returns a stream that writes to the first stream\nand reads from the last stream. \n\nListening for 'error' will recieve errors from all streams inside the pipe.\n\n``` js\n var Combine = require('stream-combiner')\n var es = require('event-stream')\n\n Combine( //connect streams together with `pipe`\n process.openStdin(), //open stdin\n es.split(), //split stream to break on newlines\n es.map(function (data, callback) {//turn this async function into a stream\n callback(null\n , inspect(JSON.parse(data))) //render it nicely\n }),\n process.stdout // pipe it to stdout !\n )\n```\n\n## License\n\nMIT\n", - "readmeFilename": "README.md", - "description": "<img src=https://secure.travis-ci.org/dominictarr/stream-combiner.png?branch=master>", - "bugs": { - "url": "https://github.com/dominictarr/stream-combiner/issues" - }, - "_id": "stream-combiner@0.0.4", - "dist": { - "shasum": "0d1c68aea72345d3619884ed3eb44e8a4e583129" - }, - "_from": "stream-combiner@~0.0.2", - "_resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/test/index.js deleted file mode 100644 index d17ddada..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/test/index.js +++ /dev/null @@ -1,52 +0,0 @@ -var es = require('event-stream') -var combine = require('..') -var test = require('tape') - -test('do not duplicate errors', function (test) { - - var errors = 0; - var pipe = combine( - es.through(function(data) { - return this.emit('data', data); - }), - es.through(function(data) { - return this.emit('error', new Error(data)); - }) - ) - - pipe.on('error', function(err) { - errors++ - test.ok(errors, 'expected error count') - process.nextTick(function () { - return test.end(); - }) - }) - - return pipe.write('meh'); -}) - -test('3 pipe do not duplicate errors', function (test) { - - var errors = 0; - var pipe = combine( - es.through(function(data) { - return this.emit('data', data); - }), - es.through(function(data) { - return this.emit('error', new Error(data)); - }), - es.through() - ) - - pipe.on('error', function(err) { - errors++ - test.ok(errors, 'expected error count') - process.nextTick(function () { - return test.end(); - }) - }) - - return pipe.write('meh'); - -}) - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/.npmignore deleted file mode 100644 index c167ad5b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -.*.swp -node_modules -examples/extract/ -test/tmp/ -test/fixtures/ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/.travis.yml deleted file mode 100644 index 2d26206d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - 0.6 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/LICENCE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/LICENCE deleted file mode 100644 index 74489e2e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/LICENCE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) Isaac Z. Schlueter -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/README.md deleted file mode 100644 index 5bcc82cd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# node-tar - -Tar for Node.js. - -[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/) - -## API - -See `examples/` for usage examples. - -### var tar = require('tar') - -Returns an object with `.Pack`, `.Extract` and `.Parse` methods. - -### tar.Pack([properties]) - -Returns a through stream. Use -[fstream](https://npmjs.org/package/fstream) to write files into the -pack stream and you will receive tar archive data from the pack -stream. - -The optional `properties` object are used to set properties in the tar -'Global Extended Header'. - -### tar.Extract([options]) - -Returns a through stream. Write tar data to the stream and the files -in the tarball will be extracted onto the filesystem. - -`options` can be: - -```js -{ - path: '/path/to/extract/tar/into', - strip: 0, // how many path segments to strip from the root when extracting -} -``` - -`options` also get passed to the `fstream.Writer` instance that `tar` -uses internally. - -### tar.Parse() - -Returns a writable stream. Write tar data to it and it will emit -`entry` events for each entry parsed from the tarball. This is used by -`tar.Extract`. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/examples/extracter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/examples/extracter.js deleted file mode 100644 index e150abf2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/examples/extracter.js +++ /dev/null @@ -1,11 +0,0 @@ -var tar = require("../tar.js") - , fs = require("fs") - -fs.createReadStream(__dirname + "/../test/fixtures/c.tar") - .pipe(tar.Extract({ path: __dirname + "/extract" })) - .on("error", function (er) { - console.error("error here") - }) - .on("end", function () { - console.error("done") - }) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/examples/reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/examples/reader.js deleted file mode 100644 index 39f3f088..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/examples/reader.js +++ /dev/null @@ -1,36 +0,0 @@ -var tar = require("../tar.js") - , fs = require("fs") - -fs.createReadStream(__dirname + "/../test/fixtures/c.tar") - .pipe(tar.Parse()) - .on("extendedHeader", function (e) { - console.error("extended pax header", e.props) - e.on("end", function () { - console.error("extended pax fields:", e.fields) - }) - }) - .on("ignoredEntry", function (e) { - console.error("ignoredEntry?!?", e.props) - }) - .on("longLinkpath", function (e) { - console.error("longLinkpath entry", e.props) - e.on("end", function () { - console.error("value=%j", e.body.toString()) - }) - }) - .on("longPath", function (e) { - console.error("longPath entry", e.props) - e.on("end", function () { - console.error("value=%j", e.body.toString()) - }) - }) - .on("entry", function (e) { - console.error("entry", e.props) - e.on("data", function (c) { - console.error(" >>>" + c.toString().replace(/\n/g, "\\n")) - }) - e.on("end", function () { - console.error(" <<<EOF") - }) - }) - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/buffer-entry.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/buffer-entry.js deleted file mode 100644 index 6c1da237..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/buffer-entry.js +++ /dev/null @@ -1,30 +0,0 @@ -// just like the Entry class, but it buffers the contents -// -// XXX It would be good to set a maximum BufferEntry filesize, -// since it eats up memory. In normal operation, -// these are only for long filenames or link names, which are -// rarely very big. - -module.exports = BufferEntry - -var inherits = require("inherits") - , Entry = require("./entry.js") - -function BufferEntry () { - Entry.apply(this, arguments) - this._buffer = new Buffer(this.props.size) - this._offset = 0 - this.body = "" - this.on("end", function () { - this.body = this._buffer.toString().slice(0, -1) - }) -} - -inherits(BufferEntry, Entry) - -// collect the bytes as they come in. -BufferEntry.prototype.write = function (c) { - c.copy(this._buffer, this._offset) - this._offset += c.length - Entry.prototype.write.call(this, c) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/entry-writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/entry-writer.js deleted file mode 100644 index 8e09042d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/entry-writer.js +++ /dev/null @@ -1,169 +0,0 @@ -module.exports = EntryWriter - -var tar = require("../tar.js") - , TarHeader = require("./header.js") - , Entry = require("./entry.js") - , inherits = require("inherits") - , BlockStream = require("block-stream") - , ExtendedHeaderWriter - , Stream = require("stream").Stream - , EOF = {} - -inherits(EntryWriter, Stream) - -function EntryWriter (props) { - var me = this - - if (!(me instanceof EntryWriter)) { - return new EntryWriter(props) - } - - Stream.apply(this) - - me.writable = true - me.readable = true - - me._stream = new BlockStream(512) - - me._stream.on("data", function (c) { - me.emit("data", c) - }) - - me._stream.on("drain", function () { - me.emit("drain") - }) - - me._stream.on("end", function () { - me.emit("end") - me.emit("close") - }) - - me.props = props - if (props.type === "Directory") { - props.size = 0 - } - props.ustar = "ustar\0" - props.ustarver = "00" - me.path = props.path - - me._buffer = [] - me._didHeader = false - me._meta = false - - me.on("pipe", function () { - me._process() - }) -} - -EntryWriter.prototype.write = function (c) { - // console.error(".. ew write") - if (this._ended) return this.emit("error", new Error("write after end")) - this._buffer.push(c) - this._process() - this._needDrain = this._buffer.length > 0 - return !this._needDrain -} - -EntryWriter.prototype.end = function (c) { - // console.error(".. ew end") - if (c) this._buffer.push(c) - this._buffer.push(EOF) - this._ended = true - this._process() - this._needDrain = this._buffer.length > 0 -} - -EntryWriter.prototype.pause = function () { - // console.error(".. ew pause") - this._paused = true - this.emit("pause") -} - -EntryWriter.prototype.resume = function () { - // console.error(".. ew resume") - this._paused = false - this.emit("resume") - this._process() -} - -EntryWriter.prototype.add = function (entry) { - // console.error(".. ew add") - if (!this.parent) return this.emit("error", new Error("no parent")) - - // make sure that the _header and such is emitted, and clear out - // the _currentEntry link on the parent. - if (!this._ended) this.end() - - return this.parent.add(entry) -} - -EntryWriter.prototype._header = function () { - // console.error(".. ew header") - if (this._didHeader) return - this._didHeader = true - - var headerBlock = TarHeader.encode(this.props) - - if (this.props.needExtended && !this._meta) { - var me = this - - ExtendedHeaderWriter = ExtendedHeaderWriter || - require("./extended-header-writer.js") - - ExtendedHeaderWriter(this.props) - .on("data", function (c) { - me.emit("data", c) - }) - .on("error", function (er) { - me.emit("error", er) - }) - .end() - } - - // console.error(".. .. ew headerBlock emitting") - this.emit("data", headerBlock) - this.emit("header") -} - -EntryWriter.prototype._process = function () { - // console.error(".. .. ew process") - if (!this._didHeader && !this._meta) { - this._header() - } - - if (this._paused || this._processing) { - // console.error(".. .. .. paused=%j, processing=%j", this._paused, this._processing) - return - } - - this._processing = true - - var buf = this._buffer - for (var i = 0; i < buf.length; i ++) { - // console.error(".. .. .. i=%d", i) - - var c = buf[i] - - if (c === EOF) this._stream.end() - else this._stream.write(c) - - if (this._paused) { - // console.error(".. .. .. paused mid-emission") - this._processing = false - if (i < buf.length) { - this._needDrain = true - this._buffer = buf.slice(i + 1) - } - return - } - } - - // console.error(".. .. .. emitted") - this._buffer.length = 0 - this._processing = false - - // console.error(".. .. .. emitting drain") - this.emit("drain") -} - -EntryWriter.prototype.destroy = function () {} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/entry.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/entry.js deleted file mode 100644 index 4af5c410..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/entry.js +++ /dev/null @@ -1,213 +0,0 @@ -// A passthrough read/write stream that sets its properties -// based on a header, extendedHeader, and globalHeader -// -// Can be either a file system object of some sort, or -// a pax/ustar metadata entry. - -module.exports = Entry - -var TarHeader = require("./header.js") - , tar = require("../tar") - , assert = require("assert").ok - , Stream = require("stream").Stream - , inherits = require("inherits") - , fstream = require("fstream").Abstract - -function Entry (header, extended, global) { - Stream.call(this) - this.readable = true - this.writable = true - - this._needDrain = false - this._paused = false - this._reading = false - this._ending = false - this._ended = false - this._remaining = 0 - this._queue = [] - this._index = 0 - this._queueLen = 0 - - this._read = this._read.bind(this) - - this.props = {} - this._header = header - this._extended = extended || {} - - // globals can change throughout the course of - // a file parse operation. Freeze it at its current state. - this._global = {} - var me = this - Object.keys(global || {}).forEach(function (g) { - me._global[g] = global[g] - }) - - this._setProps() -} - -inherits(Entry, Stream) - -Entry.prototype.write = function (c) { - if (this._ending) this.error("write() after end()", null, true) - if (this._remaining === 0) { - this.error("invalid bytes past eof") - } - - // often we'll get a bunch of \0 at the end of the last write, - // since chunks will always be 512 bytes when reading a tarball. - if (c.length > this._remaining) { - c = c.slice(0, this._remaining) - } - this._remaining -= c.length - - // put it on the stack. - var ql = this._queueLen - this._queue.push(c) - this._queueLen ++ - - this._read() - - // either paused, or buffered - if (this._paused || ql > 0) { - this._needDrain = true - return false - } - - return true -} - -Entry.prototype.end = function (c) { - if (c) this.write(c) - this._ending = true - this._read() -} - -Entry.prototype.pause = function () { - this._paused = true - this.emit("pause") -} - -Entry.prototype.resume = function () { - // console.error(" Tar Entry resume", this.path) - this.emit("resume") - this._paused = false - this._read() - return this._queueLen - this._index > 1 -} - - // This is bound to the instance -Entry.prototype._read = function () { - // console.error(" Tar Entry _read", this.path) - - if (this._paused || this._reading || this._ended) return - - // set this flag so that event handlers don't inadvertently - // get multiple _read() calls running. - this._reading = true - - // have any data to emit? - while (this._index < this._queueLen && !this._paused) { - var chunk = this._queue[this._index ++] - this.emit("data", chunk) - } - - // check if we're drained - if (this._index >= this._queueLen) { - this._queue.length = this._queueLen = this._index = 0 - if (this._needDrain) { - this._needDrain = false - this.emit("drain") - } - if (this._ending) { - this._ended = true - this.emit("end") - } - } - - // if the queue gets too big, then pluck off whatever we can. - // this should be fairly rare. - var mql = this._maxQueueLen - if (this._queueLen > mql && this._index > 0) { - mql = Math.min(this._index, mql) - this._index -= mql - this._queueLen -= mql - this._queue = this._queue.slice(mql) - } - - this._reading = false -} - -Entry.prototype._setProps = function () { - // props = extended->global->header->{} - var header = this._header - , extended = this._extended - , global = this._global - , props = this.props - - // first get the values from the normal header. - var fields = tar.fields - for (var f = 0; fields[f] !== null; f ++) { - var field = fields[f] - , val = header[field] - if (typeof val !== "undefined") props[field] = val - } - - // next, the global header for this file. - // numeric values, etc, will have already been parsed. - ;[global, extended].forEach(function (p) { - Object.keys(p).forEach(function (f) { - if (typeof p[f] !== "undefined") props[f] = p[f] - }) - }) - - // no nulls allowed in path or linkpath - ;["path", "linkpath"].forEach(function (p) { - if (props.hasOwnProperty(p)) { - props[p] = props[p].split("\0")[0] - } - }) - - - // set date fields to be a proper date - ;["mtime", "ctime", "atime"].forEach(function (p) { - if (props.hasOwnProperty(p)) { - props[p] = new Date(props[p] * 1000) - } - }) - - // set the type so that we know what kind of file to create - var type - switch (tar.types[props.type]) { - case "OldFile": - case "ContiguousFile": - type = "File" - break - - case "GNUDumpDir": - type = "Directory" - break - - case undefined: - type = "Unknown" - break - - case "Link": - case "SymbolicLink": - case "CharacterDevice": - case "BlockDevice": - case "Directory": - case "FIFO": - default: - type = tar.types[props.type] - } - - this.type = type - this.path = props.path - this.size = props.size - - // size is special, since it signals when the file needs to end. - this._remaining = props.size -} - -Entry.prototype.warn = fstream.warn -Entry.prototype.error = fstream.error diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extended-header-writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extended-header-writer.js deleted file mode 100644 index 1728c458..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extended-header-writer.js +++ /dev/null @@ -1,191 +0,0 @@ - -module.exports = ExtendedHeaderWriter - -var inherits = require("inherits") - , EntryWriter = require("./entry-writer.js") - -inherits(ExtendedHeaderWriter, EntryWriter) - -var tar = require("../tar.js") - , path = require("path") - , TarHeader = require("./header.js") - -// props is the props of the thing we need to write an -// extended header for. -// Don't be shy with it. Just encode everything. -function ExtendedHeaderWriter (props) { - // console.error(">> ehw ctor") - var me = this - - if (!(me instanceof ExtendedHeaderWriter)) { - return new ExtendedHeaderWriter(props) - } - - me.fields = props - - var p = - { path : ("PaxHeader" + path.join("/", props.path || "")) - .replace(/\\/g, "/").substr(0, 100) - , mode : props.mode || 0666 - , uid : props.uid || 0 - , gid : props.gid || 0 - , size : 0 // will be set later - , mtime : props.mtime || Date.now() / 1000 - , type : "x" - , linkpath : "" - , ustar : "ustar\0" - , ustarver : "00" - , uname : props.uname || "" - , gname : props.gname || "" - , devmaj : props.devmaj || 0 - , devmin : props.devmin || 0 - } - - - EntryWriter.call(me, p) - // console.error(">> ehw props", me.props) - me.props = p - - me._meta = true -} - -ExtendedHeaderWriter.prototype.end = function () { - // console.error(">> ehw end") - var me = this - - if (me._ended) return - me._ended = true - - me._encodeFields() - - if (me.props.size === 0) { - // nothing to write! - me._ready = true - me._stream.end() - return - } - - me._stream.write(TarHeader.encode(me.props)) - me.body.forEach(function (l) { - me._stream.write(l) - }) - me._ready = true - - // console.error(">> ehw _process calling end()", me.props) - this._stream.end() -} - -ExtendedHeaderWriter.prototype._encodeFields = function () { - // console.error(">> ehw _encodeFields") - this.body = [] - if (this.fields.prefix) { - this.fields.path = this.fields.prefix + "/" + this.fields.path - this.fields.prefix = "" - } - encodeFields(this.fields, "", this.body, this.fields.noProprietary) - var me = this - this.body.forEach(function (l) { - me.props.size += l.length - }) -} - -function encodeFields (fields, prefix, body, nop) { - // console.error(">> >> ehw encodeFields") - // "%d %s=%s\n", <length>, <keyword>, <value> - // The length is a decimal number, and includes itself and the \n - // Numeric values are decimal strings. - - Object.keys(fields).forEach(function (k) { - var val = fields[k] - , numeric = tar.numeric[k] - - if (prefix) k = prefix + "." + k - - // already including NODETAR.type, don't need File=true also - if (k === fields.type && val === true) return - - switch (k) { - // don't include anything that's always handled just fine - // in the normal header, or only meaningful in the context - // of nodetar - case "mode": - case "cksum": - case "ustar": - case "ustarver": - case "prefix": - case "basename": - case "dirname": - case "needExtended": - case "block": - case "filter": - return - - case "rdev": - if (val === 0) return - break - - case "nlink": - case "dev": // Truly a hero among men, Creator of Star! - case "ino": // Speak his name with reverent awe! It is: - k = "SCHILY." + k - break - - default: break - } - - if (val && typeof val === "object" && - !Buffer.isBuffer(val)) encodeFields(val, k, body, nop) - else if (val === null || val === undefined) return - else body.push.apply(body, encodeField(k, val, nop)) - }) - - return body -} - -function encodeField (k, v, nop) { - // lowercase keys must be valid, otherwise prefix with - // "NODETAR." - if (k.charAt(0) === k.charAt(0).toLowerCase()) { - var m = k.split(".")[0] - if (!tar.knownExtended[m]) k = "NODETAR." + k - } - - // no proprietary - if (nop && k.charAt(0) !== k.charAt(0).toLowerCase()) { - return [] - } - - if (typeof val === "number") val = val.toString(10) - - var s = new Buffer(" " + k + "=" + v + "\n") - , digits = Math.floor(Math.log(s.length) / Math.log(10)) + 1 - - // console.error("1 s=%j digits=%j s.length=%d", s.toString(), digits, s.length) - - // if adding that many digits will make it go over that length, - // then add one to it. For example, if the string is: - // " foo=bar\n" - // then that's 9 characters. With the "9", that bumps the length - // up to 10. However, this is invalid: - // "10 foo=bar\n" - // but, since that's actually 11 characters, since 10 adds another - // character to the length, and the length includes the number - // itself. In that case, just bump it up again. - if (s.length + digits >= Math.pow(10, digits)) digits += 1 - // console.error("2 s=%j digits=%j s.length=%d", s.toString(), digits, s.length) - - var len = digits + s.length - // console.error("3 s=%j digits=%j s.length=%d len=%d", s.toString(), digits, s.length, len) - var lenBuf = new Buffer("" + len) - if (lenBuf.length + s.length !== len) { - throw new Error("Bad length calculation\n"+ - "len="+len+"\n"+ - "lenBuf="+JSON.stringify(lenBuf.toString())+"\n"+ - "lenBuf.length="+lenBuf.length+"\n"+ - "digits="+digits+"\n"+ - "s="+JSON.stringify(s.toString())+"\n"+ - "s.length="+s.length) - } - - return [lenBuf, s] -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extended-header.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extended-header.js deleted file mode 100644 index 74f432ce..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extended-header.js +++ /dev/null @@ -1,140 +0,0 @@ -// An Entry consisting of: -// -// "%d %s=%s\n", <length>, <keyword>, <value> -// -// The length is a decimal number, and includes itself and the \n -// \0 does not terminate anything. Only the length terminates the string. -// Numeric values are decimal strings. - -module.exports = ExtendedHeader - -var Entry = require("./entry.js") - , inherits = require("inherits") - , tar = require("../tar.js") - , numeric = tar.numeric - , keyTrans = { "SCHILY.dev": "dev" - , "SCHILY.ino": "ino" - , "SCHILY.nlink": "nlink" } - -function ExtendedHeader () { - Entry.apply(this, arguments) - this.on("data", this._parse) - this.fields = {} - this._position = 0 - this._fieldPos = 0 - this._state = SIZE - this._sizeBuf = [] - this._keyBuf = [] - this._valBuf = [] - this._size = -1 - this._key = "" -} - -inherits(ExtendedHeader, Entry) -ExtendedHeader.prototype._parse = parse - -var s = 0 - , states = ExtendedHeader.states = {} - , SIZE = states.SIZE = s++ - , KEY = states.KEY = s++ - , VAL = states.VAL = s++ - , ERR = states.ERR = s++ - -Object.keys(states).forEach(function (s) { - states[states[s]] = states[s] -}) - -states[s] = null - -// char code values for comparison -var _0 = "0".charCodeAt(0) - , _9 = "9".charCodeAt(0) - , point = ".".charCodeAt(0) - , a = "a".charCodeAt(0) - , Z = "Z".charCodeAt(0) - , a = "a".charCodeAt(0) - , z = "z".charCodeAt(0) - , space = " ".charCodeAt(0) - , eq = "=".charCodeAt(0) - , cr = "\n".charCodeAt(0) - -function parse (c) { - if (this._state === ERR) return - - for ( var i = 0, l = c.length - ; i < l - ; this._position++, this._fieldPos++, i++) { - // console.error("top of loop, size="+this._size) - - var b = c[i] - - if (this._size >= 0 && this._fieldPos > this._size) { - error(this, "field exceeds length="+this._size) - return - } - - switch (this._state) { - case ERR: return - - case SIZE: - // console.error("parsing size, b=%d, rest=%j", b, c.slice(i).toString()) - if (b === space) { - this._state = KEY - // this._fieldPos = this._sizeBuf.length - this._size = parseInt(new Buffer(this._sizeBuf).toString(), 10) - this._sizeBuf.length = 0 - continue - } - if (b < _0 || b > _9) { - error(this, "expected [" + _0 + ".." + _9 + "], got " + b) - return - } - this._sizeBuf.push(b) - continue - - case KEY: - // can be any char except =, not > size. - if (b === eq) { - this._state = VAL - this._key = new Buffer(this._keyBuf).toString() - if (keyTrans[this._key]) this._key = keyTrans[this._key] - this._keyBuf.length = 0 - continue - } - this._keyBuf.push(b) - continue - - case VAL: - // field must end with cr - if (this._fieldPos === this._size - 1) { - // console.error("finished with "+this._key) - if (b !== cr) { - error(this, "expected \\n at end of field") - return - } - var val = new Buffer(this._valBuf).toString() - if (numeric[this._key]) { - val = parseFloat(val) - } - this.fields[this._key] = val - - this._valBuf.length = 0 - this._state = SIZE - this._size = -1 - this._fieldPos = -1 - continue - } - this._valBuf.push(b) - continue - } - } -} - -function error (me, msg) { - msg = "invalid header: " + msg - + "\nposition=" + me._position - + "\nfield position=" + me._fieldPos - - me.error(msg) - me.state = ERR -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extract.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extract.js deleted file mode 100644 index c34a81e2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extract.js +++ /dev/null @@ -1,78 +0,0 @@ -// give it a tarball and a path, and it'll dump the contents - -module.exports = Extract - -var tar = require("../tar.js") - , fstream = require("fstream") - , inherits = require("inherits") - , path = require("path") - -function Extract (opts) { - if (!(this instanceof Extract)) return new Extract(opts) - tar.Parse.apply(this) - - // have to dump into a directory - opts.type = "Directory" - opts.Directory = true - - if (typeof opts !== "object") { - opts = { path: opts } - } - - // better to drop in cwd? seems more standard. - opts.path = opts.path || path.resolve("node-tar-extract") - opts.type = "Directory" - opts.Directory = true - - // similar to --strip or --strip-components - opts.strip = +opts.strip - if (!opts.strip || opts.strip <= 0) opts.strip = 0 - - this._fst = fstream.Writer(opts) - - this.pause() - var me = this - - // Hardlinks in tarballs are relative to the root - // of the tarball. So, they need to be resolved against - // the target directory in order to be created properly. - me.on("entry", function (entry) { - // if there's a "strip" argument, then strip off that many - // path components. - if (opts.strip) { - var p = entry.path.split("/").slice(opts.strip).join("/") - entry.path = entry.props.path = p - if (entry.linkpath) { - var lp = entry.linkpath.split("/").slice(opts.strip).join("/") - entry.linkpath = entry.props.linkpath = lp - } - } - if (entry.type !== "Link") return - entry.linkpath = entry.props.linkpath = - path.join(opts.path, path.join("/", entry.props.linkpath)) - }) - - this._fst.on("ready", function () { - me.pipe(me._fst, { end: false }) - me.resume() - }) - - // this._fst.on("end", function () { - // console.error("\nEEEE Extract End", me._fst.path) - // }) - - this._fst.on("close", function () { - // console.error("\nEEEE Extract End", me._fst.path) - me.emit("end") - me.emit("close") - }) -} - -inherits(Extract, tar.Parse) - -Extract.prototype._streamEnd = function () { - var me = this - if (!me._ended) me.error("unexpected eof") - me._fst.end() - // my .end() is coming later. -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/global-header-writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/global-header-writer.js deleted file mode 100644 index 0bfc7b80..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/global-header-writer.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = GlobalHeaderWriter - -var ExtendedHeaderWriter = require("./extended-header-writer.js") - , inherits = require("inherits") - -inherits(GlobalHeaderWriter, ExtendedHeaderWriter) - -function GlobalHeaderWriter (props) { - if (!(this instanceof GlobalHeaderWriter)) { - return new GlobalHeaderWriter(props) - } - ExtendedHeaderWriter.call(this, props) - this.props.type = "g" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/header.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/header.js deleted file mode 100644 index 05b237c0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/header.js +++ /dev/null @@ -1,385 +0,0 @@ -// parse a 512-byte header block to a data object, or vice-versa -// If the data won't fit nicely in a simple header, then generate -// the appropriate extended header file, and return that. - -module.exports = TarHeader - -var tar = require("../tar.js") - , fields = tar.fields - , fieldOffs = tar.fieldOffs - , fieldEnds = tar.fieldEnds - , fieldSize = tar.fieldSize - , numeric = tar.numeric - , assert = require("assert").ok - , space = " ".charCodeAt(0) - , slash = "/".charCodeAt(0) - , bslash = process.platform === "win32" ? "\\".charCodeAt(0) : null - -function TarHeader (block) { - if (!(this instanceof TarHeader)) return new TarHeader(block) - if (block) this.decode(block) -} - -TarHeader.prototype = - { decode : decode - , encode: encode - , calcSum: calcSum - , checkSum: checkSum - } - -TarHeader.parseNumeric = parseNumeric -TarHeader.encode = encode -TarHeader.decode = decode - -// note that this will only do the normal ustar header, not any kind -// of extended posix header file. If something doesn't fit comfortably, -// then it will set obj.needExtended = true, and set the block to -// the closest approximation. -function encode (obj) { - if (!obj && !(this instanceof TarHeader)) throw new Error( - "encode must be called on a TarHeader, or supplied an object") - - obj = obj || this - var block = obj.block = new Buffer(512) - - // if the object has a "prefix", then that's actually an extension of - // the path field. - if (obj.prefix) { - // console.error("%% header encoding, got a prefix", obj.prefix) - obj.path = obj.prefix + "/" + obj.path - // console.error("%% header encoding, prefixed path", obj.path) - obj.prefix = "" - } - - obj.needExtended = false - - if (obj.mode) { - if (typeof obj.mode === "string") obj.mode = parseInt(obj.mode, 8) - obj.mode = obj.mode & 0777 - } - - for (var f = 0; fields[f] !== null; f ++) { - var field = fields[f] - , off = fieldOffs[f] - , end = fieldEnds[f] - , ret - - switch (field) { - case "cksum": - // special, done below, after all the others - break - - case "prefix": - // special, this is an extension of the "path" field. - // console.error("%% header encoding, skip prefix later") - break - - case "type": - // convert from long name to a single char. - var type = obj.type || "0" - if (type.length > 1) { - type = tar.types[obj.type] - if (!type) type = "0" - } - writeText(block, off, end, type) - break - - case "path": - // uses the "prefix" field if > 100 bytes, but <= 255 - var pathLen = Buffer.byteLength(obj.path) - , pathFSize = fieldSize[fields.path] - , prefFSize = fieldSize[fields.prefix] - - // paths between 100 and 255 should use the prefix field. - // longer than 255 - if (pathLen > pathFSize && - pathLen <= pathFSize + prefFSize) { - // need to find a slash somewhere in the middle so that - // path and prefix both fit in their respective fields - var searchStart = pathLen - 1 - pathFSize - , searchEnd = prefFSize - , found = false - , pathBuf = new Buffer(obj.path) - - for ( var s = searchStart - ; (s <= searchEnd) - ; s ++ ) { - if (pathBuf[s] === slash || pathBuf[s] === bslash) { - found = s - break - } - } - - if (found !== false) { - prefix = pathBuf.slice(0, found).toString("utf8") - path = pathBuf.slice(found + 1).toString("utf8") - - ret = writeText(block, off, end, path) - off = fieldOffs[fields.prefix] - end = fieldEnds[fields.prefix] - // console.error("%% header writing prefix", off, end, prefix) - ret = writeText(block, off, end, prefix) || ret - break - } - } - - // paths less than 100 chars don't need a prefix - // and paths longer than 255 need an extended header and will fail - // on old implementations no matter what we do here. - // Null out the prefix, and fallthrough to default. - // console.error("%% header writing no prefix") - var poff = fieldOffs[fields.prefix] - , pend = fieldEnds[fields.prefix] - writeText(block, poff, pend, "") - // fallthrough - - // all other fields are numeric or text - default: - ret = numeric[field] - ? writeNumeric(block, off, end, obj[field]) - : writeText(block, off, end, obj[field] || "") - break - } - obj.needExtended = obj.needExtended || ret - } - - var off = fieldOffs[fields.cksum] - , end = fieldEnds[fields.cksum] - - writeNumeric(block, off, end, calcSum.call(this, block)) - - return block -} - -// if it's a negative number, or greater than will fit, -// then use write256. -var MAXNUM = { 12: 077777777777 - , 11: 07777777777 - , 8 : 07777777 - , 7 : 0777777 } -function writeNumeric (block, off, end, num) { - var writeLen = end - off - , maxNum = MAXNUM[writeLen] || 0 - - num = num || 0 - // console.error(" numeric", num) - - if (num instanceof Date || - Object.prototype.toString.call(num) === "[object Date]") { - num = num.getTime() / 1000 - } - - if (num > maxNum || num < 0) { - write256(block, off, end, num) - // need an extended header if negative or too big. - return true - } - - // god, tar is so annoying - // if the string is small enough, you should put a space - // between the octal string and the \0, but if it doesn't - // fit, then don't. - var numStr = Math.floor(num).toString(8) - if (num < MAXNUM[writeLen - 1]) numStr += " " - - // pad with "0" chars - if (numStr.length < writeLen) { - numStr = (new Array(writeLen - numStr.length).join("0")) + numStr - } - - if (numStr.length !== writeLen - 1) { - throw new Error("invalid length: " + JSON.stringify(numStr) + "\n" + - "expected: "+writeLen) - } - block.write(numStr, off, writeLen, "utf8") - block[end - 1] = 0 -} - -function write256 (block, off, end, num) { - var buf = block.slice(off, end) - var positive = num >= 0 - buf[0] = positive ? 0x80 : 0xFF - - // get the number as a base-256 tuple - if (!positive) num *= -1 - var tuple = [] - do { - var n = num % 256 - tuple.push(n) - num = (num - n) / 256 - } while (num) - - var bytes = tuple.length - - var fill = buf.length - bytes - for (var i = 1; i < fill; i ++) { - buf[i] = positive ? 0 : 0xFF - } - - // tuple is a base256 number, with [0] as the *least* significant byte - // if it's negative, then we need to flip all the bits once we hit the - // first non-zero bit. The 2's-complement is (0x100 - n), and the 1's- - // complement is (0xFF - n). - var zero = true - for (i = bytes; i > 0; i --) { - var byte = tuple[bytes - i] - if (positive) buf[fill + i] = byte - else if (zero && byte === 0) buf[fill + i] = 0 - else if (zero) { - zero = false - buf[fill + i] = 0x100 - byte - } else buf[fill + i] = 0xFF - byte - } -} - -function writeText (block, off, end, str) { - // strings are written as utf8, then padded with \0 - var strLen = Buffer.byteLength(str) - , writeLen = Math.min(strLen, end - off) - // non-ascii fields need extended headers - // long fields get truncated - , needExtended = strLen !== str.length || strLen > writeLen - - // write the string, and null-pad - if (writeLen > 0) block.write(str, off, writeLen, "utf8") - for (var i = off + writeLen; i < end; i ++) block[i] = 0 - - return needExtended -} - -function calcSum (block) { - block = block || this.block - assert(Buffer.isBuffer(block) && block.length === 512) - - if (!block) throw new Error("Need block to checksum") - - // now figure out what it would be if the cksum was " " - var sum = 0 - , start = fieldOffs[fields.cksum] - , end = fieldEnds[fields.cksum] - - for (var i = 0; i < fieldOffs[fields.cksum]; i ++) { - sum += block[i] - } - - for (var i = start; i < end; i ++) { - sum += space - } - - for (var i = end; i < 512; i ++) { - sum += block[i] - } - - return sum -} - - -function checkSum (block) { - var sum = calcSum.call(this, block) - block = block || this.block - - var cksum = block.slice(fieldOffs[fields.cksum], fieldEnds[fields.cksum]) - cksum = parseNumeric(cksum) - - return cksum === sum -} - -function decode (block) { - block = block || this.block - assert(Buffer.isBuffer(block) && block.length === 512) - - this.block = block - this.cksumValid = this.checkSum() - - var prefix = null - - // slice off each field. - for (var f = 0; fields[f] !== null; f ++) { - var field = fields[f] - , val = block.slice(fieldOffs[f], fieldEnds[f]) - - switch (field) { - case "ustar": - // if not ustar, then everything after that is just padding. - if (val.toString() !== "ustar\0") { - this.ustar = false - return - } else { - // console.error("ustar:", val, val.toString()) - this.ustar = val.toString() - } - break - - // prefix is special, since it might signal the xstar header - case "prefix": - var atime = parseNumeric(val.slice(131, 131 + 12)) - , ctime = parseNumeric(val.slice(131 + 12, 131 + 12 + 12)) - if ((val[130] === 0 || val[130] === space) && - typeof atime === "number" && - typeof ctime === "number" && - val[131 + 12] === space && - val[131 + 12 + 12] === space) { - this.atime = atime - this.ctime = ctime - val = val.slice(0, 130) - } - prefix = val.toString("utf8").replace(/\0+$/, "") - // console.error("%% header reading prefix", prefix) - break - - // all other fields are null-padding text - // or a number. - default: - if (numeric[field]) { - this[field] = parseNumeric(val) - } else { - this[field] = val.toString("utf8").replace(/\0+$/, "") - } - break - } - } - - // if we got a prefix, then prepend it to the path. - if (prefix) { - this.path = prefix + "/" + this.path - // console.error("%% header got a prefix", this.path) - } -} - -function parse256 (buf) { - // first byte MUST be either 80 or FF - // 80 for positive, FF for 2's comp - var positive - if (buf[0] === 0x80) positive = true - else if (buf[0] === 0xFF) positive = false - else return null - - // build up a base-256 tuple from the least sig to the highest - var zero = false - , tuple = [] - for (var i = buf.length - 1; i > 0; i --) { - var byte = buf[i] - if (positive) tuple.push(byte) - else if (zero && byte === 0) tuple.push(0) - else if (zero) { - zero = false - tuple.push(0x100 - byte) - } else tuple.push(0xFF - byte) - } - - for (var sum = 0, i = 0, l = tuple.length; i < l; i ++) { - sum += tuple[i] * Math.pow(256, i) - } - - return positive ? sum : -1 * sum -} - -function parseNumeric (f) { - if (f[0] & 0x80) return parse256(f) - - var str = f.toString("utf8").split("\0")[0].trim() - , res = parseInt(str, 8) - - return isNaN(res) ? null : res -} - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/pack.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/pack.js deleted file mode 100644 index 3ff14dd6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/pack.js +++ /dev/null @@ -1,231 +0,0 @@ -// pipe in an fstream, and it'll make a tarball. -// key-value pair argument is global extended header props. - -module.exports = Pack - -var EntryWriter = require("./entry-writer.js") - , Stream = require("stream").Stream - , path = require("path") - , inherits = require("inherits") - , GlobalHeaderWriter = require("./global-header-writer.js") - , collect = require("fstream").collect - , eof = new Buffer(512) - -for (var i = 0; i < 512; i ++) eof[i] = 0 - -inherits(Pack, Stream) - -function Pack (props) { - // console.error("-- p ctor") - var me = this - if (!(me instanceof Pack)) return new Pack(props) - - if (props) me._noProprietary = props.noProprietary - else me._noProprietary = false - - me._global = props - - me.readable = true - me.writable = true - me._buffer = [] - // console.error("-- -- set current to null in ctor") - me._currentEntry = null - me._processing = false - - me._pipeRoot = null - me.on("pipe", function (src) { - if (src.root === me._pipeRoot) return - me._pipeRoot = src - src.on("end", function () { - me._pipeRoot = null - }) - me.add(src) - }) -} - -Pack.prototype.addGlobal = function (props) { - // console.error("-- p addGlobal") - if (this._didGlobal) return - this._didGlobal = true - - var me = this - GlobalHeaderWriter(props) - .on("data", function (c) { - me.emit("data", c) - }) - .end() -} - -Pack.prototype.add = function (stream) { - if (this._global && !this._didGlobal) this.addGlobal(this._global) - - if (this._ended) return this.emit("error", new Error("add after end")) - - collect(stream) - this._buffer.push(stream) - this._process() - this._needDrain = this._buffer.length > 0 - return !this._needDrain -} - -Pack.prototype.pause = function () { - this._paused = true - if (this._currentEntry) this._currentEntry.pause() - this.emit("pause") -} - -Pack.prototype.resume = function () { - this._paused = false - if (this._currentEntry) this._currentEntry.resume() - this.emit("resume") - this._process() -} - -Pack.prototype.end = function () { - this._ended = true - this._buffer.push(eof) - this._process() -} - -Pack.prototype._process = function () { - var me = this - if (me._paused || me._processing) { - return - } - - var entry = me._buffer.shift() - - if (!entry) { - if (me._needDrain) { - me.emit("drain") - } - return - } - - if (entry.ready === false) { - // console.error("-- entry is not ready", entry) - me._buffer.unshift(entry) - entry.on("ready", function () { - // console.error("-- -- ready!", entry) - me._process() - }) - return - } - - me._processing = true - - if (entry === eof) { - // need 2 ending null blocks. - me.emit("data", eof) - me.emit("data", eof) - me.emit("end") - me.emit("close") - return - } - - // Change the path to be relative to the root dir that was - // added to the tarball. - // - // XXX This should be more like how -C works, so you can - // explicitly set a root dir, and also explicitly set a pathname - // in the tarball to use. That way we can skip a lot of extra - // work when resolving symlinks for bundled dependencies in npm. - - var root = path.dirname((entry.root || entry).path) - var wprops = {} - - Object.keys(entry.props || {}).forEach(function (k) { - wprops[k] = entry.props[k] - }) - - if (me._noProprietary) wprops.noProprietary = true - - wprops.path = path.relative(root, entry.path || '') - - // actually not a matter of opinion or taste. - if (process.platform === "win32") { - wprops.path = wprops.path.replace(/\\/g, "/") - } - - if (!wprops.type) - wprops.type = 'Directory' - - switch (wprops.type) { - // sockets not supported - case "Socket": - return - - case "Directory": - wprops.path += "/" - wprops.size = 0 - break - - case "Link": - var lp = path.resolve(path.dirname(entry.path), entry.linkpath) - wprops.linkpath = path.relative(root, lp) || "." - wprops.size = 0 - break - - case "SymbolicLink": - var lp = path.resolve(path.dirname(entry.path), entry.linkpath) - wprops.linkpath = path.relative(path.dirname(entry.path), lp) || "." - wprops.size = 0 - break - } - - // console.error("-- new writer", wprops) - // if (!wprops.type) { - // // console.error("-- no type?", entry.constructor.name, entry) - // } - - // console.error("-- -- set current to new writer", wprops.path) - var writer = me._currentEntry = EntryWriter(wprops) - - writer.parent = me - - // writer.on("end", function () { - // // console.error("-- -- writer end", writer.path) - // }) - - writer.on("data", function (c) { - me.emit("data", c) - }) - - writer.on("header", function () { - Buffer.prototype.toJSON = function () { - return this.toString().split(/\0/).join(".") - } - // console.error("-- -- writer header %j", writer.props) - if (writer.props.size === 0) nextEntry() - }) - writer.on("close", nextEntry) - - var ended = false - function nextEntry () { - if (ended) return - ended = true - - // console.error("-- -- writer close", writer.path) - // console.error("-- -- set current to null", wprops.path) - me._currentEntry = null - me._processing = false - me._process() - } - - writer.on("error", function (er) { - // console.error("-- -- writer error", writer.path) - me.emit("error", er) - }) - - // if it's the root, then there's no need to add its entries, - // or data, since they'll be added directly. - if (entry === me._pipeRoot) { - // console.error("-- is the root, don't auto-add") - writer.add = null - } - - entry.pipe(writer) -} - -Pack.prototype.destroy = function () {} -Pack.prototype.write = function () {} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/parse.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/parse.js deleted file mode 100644 index 884e73db..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/parse.js +++ /dev/null @@ -1,270 +0,0 @@ - -// A writable stream. -// It emits "entry" events, which provide a readable stream that has -// header info attached. - -module.exports = Parse.create = Parse - -var stream = require("stream") - , Stream = stream.Stream - , BlockStream = require("block-stream") - , tar = require("../tar.js") - , TarHeader = require("./header.js") - , Entry = require("./entry.js") - , BufferEntry = require("./buffer-entry.js") - , ExtendedHeader = require("./extended-header.js") - , assert = require("assert").ok - , inherits = require("inherits") - , fstream = require("fstream") - -// reading a tar is a lot like reading a directory -// However, we're actually not going to run the ctor, -// since it does a stat and various other stuff. -// This inheritance gives us the pause/resume/pipe -// behavior that is desired. -inherits(Parse, fstream.Reader) - -function Parse () { - var me = this - if (!(me instanceof Parse)) return new Parse() - - // doesn't apply fstream.Reader ctor? - // no, becasue we don't want to stat/etc, we just - // want to get the entry/add logic from .pipe() - Stream.apply(me) - - me.writable = true - me.readable = true - me._stream = new BlockStream(512) - me.position = 0 - - me._stream.on("error", function (e) { - me.emit("error", e) - }) - - me._stream.on("data", function (c) { - me._process(c) - }) - - me._stream.on("end", function () { - me._streamEnd() - }) - - me._stream.on("drain", function () { - me.emit("drain") - }) -} - -// overridden in Extract class, since it needs to -// wait for its DirWriter part to finish before -// emitting "end" -Parse.prototype._streamEnd = function () { - var me = this - if (!me._ended) me.error("unexpected eof") - me.emit("end") -} - -// a tar reader is actually a filter, not just a readable stream. -// So, you should pipe a tarball stream into it, and it needs these -// write/end methods to do that. -Parse.prototype.write = function (c) { - if (this._ended) { - // gnutar puts a LOT of nulls at the end. - // you can keep writing these things forever. - // Just ignore them. - for (var i = 0, l = c.length; i > l; i ++) { - if (c[i] !== 0) return this.error("write() after end()") - } - return - } - return this._stream.write(c) -} - -Parse.prototype.end = function (c) { - this._ended = true - return this._stream.end(c) -} - -// don't need to do anything, since we're just -// proxying the data up from the _stream. -// Just need to override the parent's "Not Implemented" -// error-thrower. -Parse.prototype._read = function () {} - -Parse.prototype._process = function (c) { - assert(c && c.length === 512, "block size should be 512") - - // one of three cases. - // 1. A new header - // 2. A part of a file/extended header - // 3. One of two or more EOF null blocks - - if (this._entry) { - var entry = this._entry - entry.write(c) - if (entry._remaining === 0) { - entry.end() - this._entry = null - } - } else { - // either zeroes or a header - var zero = true - for (var i = 0; i < 512 && zero; i ++) { - zero = c[i] === 0 - } - - // eof is *at least* 2 blocks of nulls, and then the end of the - // file. you can put blocks of nulls between entries anywhere, - // so appending one tarball to another is technically valid. - // ending without the eof null blocks is not allowed, however. - if (zero) { - this._ended = this._eofStarted - this._eofStarted = true - } else { - this._ended = this._eofStarted = false - this._startEntry(c) - } - - } - - this.position += 512 -} - -// take a header chunk, start the right kind of entry. -Parse.prototype._startEntry = function (c) { - var header = new TarHeader(c) - , self = this - , entry - , ev - , EntryType - , onend - , meta = false - - if (null === header.size || !header.cksumValid) { - var e = new Error("invalid tar file") - e.header = header - e.tar_file_offset = this.position - e.tar_block = this.position / 512 - this.emit("error", e) - } - - switch (tar.types[header.type]) { - case "File": - case "OldFile": - case "Link": - case "SymbolicLink": - case "CharacterDevice": - case "BlockDevice": - case "Directory": - case "FIFO": - case "ContiguousFile": - case "GNUDumpDir": - // start a file. - // pass in any extended headers - // These ones consumers are typically most interested in. - EntryType = Entry - ev = "entry" - break - - case "GlobalExtendedHeader": - // extended headers that apply to the rest of the tarball - EntryType = ExtendedHeader - onend = function () { - self._global = self._global || {} - Object.keys(entry.fields).forEach(function (k) { - self._global[k] = entry.fields[k] - }) - } - ev = "globalExtendedHeader" - meta = true - break - - case "ExtendedHeader": - case "OldExtendedHeader": - // extended headers that apply to the next entry - EntryType = ExtendedHeader - onend = function () { - self._extended = entry.fields - } - ev = "extendedHeader" - meta = true - break - - case "NextFileHasLongLinkpath": - // set linkpath=<contents> in extended header - EntryType = BufferEntry - onend = function () { - self._extended = self._extended || {} - self._extended.linkpath = entry.body - } - ev = "longLinkpath" - meta = true - break - - case "NextFileHasLongPath": - case "OldGnuLongPath": - // set path=<contents> in file-extended header - EntryType = BufferEntry - onend = function () { - self._extended = self._extended || {} - self._extended.path = entry.body - } - ev = "longPath" - meta = true - break - - default: - // all the rest we skip, but still set the _entry - // member, so that we can skip over their data appropriately. - // emit an event to say that this is an ignored entry type? - EntryType = Entry - ev = "ignoredEntry" - break - } - - var global, extended - if (meta) { - global = extended = null - } else { - var global = this._global - var extended = this._extended - - // extendedHeader only applies to one entry, so once we start - // an entry, it's over. - this._extended = null - } - entry = new EntryType(header, extended, global) - entry.meta = meta - - // only proxy data events of normal files. - if (!meta) { - entry.on("data", function (c) { - me.emit("data", c) - }) - } - - if (onend) entry.on("end", onend) - - this._entry = entry - var me = this - - entry.on("pause", function () { - me.pause() - }) - - entry.on("resume", function () { - me.resume() - }) - - if (this.listeners("*").length) { - this.emit("*", ev, entry) - } - - this.emit(ev, entry) - - // Zero-byte entry. End immediately. - if (entry.props.size === 0) { - entry.end() - this._entry = null - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/LICENCE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/LICENCE deleted file mode 100644 index 74489e2e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/LICENCE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) Isaac Z. Schlueter -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/README.md deleted file mode 100644 index c16e9c46..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# block-stream - -A stream of blocks. - -Write data into it, and it'll output data in buffer blocks the size you -specify, padding with zeroes if necessary. - -```javascript -var block = new BlockStream(512) -fs.createReadStream("some-file").pipe(block) -block.pipe(fs.createWriteStream("block-file")) -``` - -When `.end()` or `.flush()` is called, it'll pad the block with zeroes. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/block-stream-pause.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/block-stream-pause.js deleted file mode 100644 index 9328844a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/block-stream-pause.js +++ /dev/null @@ -1,70 +0,0 @@ -var BlockStream = require("../block-stream.js") - -var blockSizes = [16, 25, 1024] - , writeSizes = [4, 8, 15, 16, 17, 64, 100] - , writeCounts = [1, 10, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize, {nopad: true }) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - - f.on("data", function (c) { - timeouts ++ - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - f.pause() - setTimeout(function () { - timeouts -- - - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - f.resume() - }, 100) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = writeSize * writeCount * 2 - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 100) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/block-stream.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/block-stream.js deleted file mode 100644 index 1141f3a8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/block-stream.js +++ /dev/null @@ -1,68 +0,0 @@ -var BlockStream = require("../block-stream.js") - -var blockSizes = [16, 25, 1024] - , writeSizes = [4, 8, 15, 16, 17, 64, 100] - , writeCounts = [1, 10, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize, {nopad: true }) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - - f.on("data", function (c) { - timeouts ++ - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - setTimeout(function () { - timeouts -- - - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - }, 100) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = writeSize * writeCount * 2 - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 100) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/dropper-pause.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/dropper-pause.js deleted file mode 100644 index 93e4068e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/dropper-pause.js +++ /dev/null @@ -1,70 +0,0 @@ -var BlockStream = require("dropper") - -var blockSizes = [16, 25, 1024] - , writeSizes = [4, 8, 15, 16, 17, 64, 100] - , writeCounts = [1, 10, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize, {nopad: true }) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - - f.on("data", function (c) { - timeouts ++ - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - f.pause() - setTimeout(function () { - timeouts -- - - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - f.resume() - }, 100) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = writeSize * writeCount * 2 - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 100) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/dropper.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/dropper.js deleted file mode 100644 index 55fa1330..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/dropper.js +++ /dev/null @@ -1,68 +0,0 @@ -var BlockStream = require("dropper") - -var blockSizes = [16, 25, 1024] - , writeSizes = [4, 8, 15, 16, 17, 64, 100] - , writeCounts = [1, 10, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize, {nopad: true }) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - - f.on("data", function (c) { - timeouts ++ - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - setTimeout(function () { - timeouts -- - - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - }, 100) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = writeSize * writeCount * 2 - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 100) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/block-stream.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/block-stream.js deleted file mode 100644 index 008de035..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/block-stream.js +++ /dev/null @@ -1,209 +0,0 @@ -// write data to it, and it'll emit data in 512 byte blocks. -// if you .end() or .flush(), it'll emit whatever it's got, -// padded with nulls to 512 bytes. - -module.exports = BlockStream - -var Stream = require("stream").Stream - , inherits = require("inherits") - , assert = require("assert").ok - , debug = process.env.DEBUG ? console.error : function () {} - -function BlockStream (size, opt) { - this.writable = this.readable = true - this._opt = opt || {} - this._chunkSize = size || 512 - this._offset = 0 - this._buffer = [] - this._bufferLength = 0 - if (this._opt.nopad) this._zeroes = false - else { - this._zeroes = new Buffer(this._chunkSize) - for (var i = 0; i < this._chunkSize; i ++) { - this._zeroes[i] = 0 - } - } -} - -inherits(BlockStream, Stream) - -BlockStream.prototype.write = function (c) { - // debug(" BS write", c) - if (this._ended) throw new Error("BlockStream: write after end") - if (c && !Buffer.isBuffer(c)) c = new Buffer(c + "") - if (c.length) { - this._buffer.push(c) - this._bufferLength += c.length - } - // debug("pushed onto buffer", this._bufferLength) - if (this._bufferLength >= this._chunkSize) { - if (this._paused) { - // debug(" BS paused, return false, need drain") - this._needDrain = true - return false - } - this._emitChunk() - } - return true -} - -BlockStream.prototype.pause = function () { - // debug(" BS pausing") - this._paused = true -} - -BlockStream.prototype.resume = function () { - // debug(" BS resume") - this._paused = false - return this._emitChunk() -} - -BlockStream.prototype.end = function (chunk) { - // debug("end", chunk) - if (typeof chunk === "function") cb = chunk, chunk = null - if (chunk) this.write(chunk) - this._ended = true - this.flush() -} - -BlockStream.prototype.flush = function () { - this._emitChunk(true) -} - -BlockStream.prototype._emitChunk = function (flush) { - // debug("emitChunk flush=%j emitting=%j paused=%j", flush, this._emitting, this._paused) - - // emit a <chunkSize> chunk - if (flush && this._zeroes) { - // debug(" BS push zeroes", this._bufferLength) - // push a chunk of zeroes - var padBytes = (this._bufferLength % this._chunkSize) - if (padBytes !== 0) padBytes = this._chunkSize - padBytes - if (padBytes > 0) { - // debug("padBytes", padBytes, this._zeroes.slice(0, padBytes)) - this._buffer.push(this._zeroes.slice(0, padBytes)) - this._bufferLength += padBytes - // debug(this._buffer[this._buffer.length - 1].length, this._bufferLength) - } - } - - if (this._emitting || this._paused) return - this._emitting = true - - // debug(" BS entering loops") - var bufferIndex = 0 - while (this._bufferLength >= this._chunkSize && - (flush || !this._paused)) { - // debug(" BS data emission loop", this._bufferLength) - - var out - , outOffset = 0 - , outHas = this._chunkSize - - while (outHas > 0 && (flush || !this._paused) ) { - // debug(" BS data inner emit loop", this._bufferLength) - var cur = this._buffer[bufferIndex] - , curHas = cur.length - this._offset - // debug("cur=", cur) - // debug("curHas=%j", curHas) - // If it's not big enough to fill the whole thing, then we'll need - // to copy multiple buffers into one. However, if it is big enough, - // then just slice out the part we want, to save unnecessary copying. - // Also, need to copy if we've already done some copying, since buffers - // can't be joined like cons strings. - if (out || curHas < outHas) { - out = out || new Buffer(this._chunkSize) - cur.copy(out, outOffset, - this._offset, this._offset + Math.min(curHas, outHas)) - } else if (cur.length === outHas && this._offset === 0) { - // shortcut -- cur is exactly long enough, and no offset. - out = cur - } else { - // slice out the piece of cur that we need. - out = cur.slice(this._offset, this._offset + outHas) - } - - if (curHas > outHas) { - // means that the current buffer couldn't be completely output - // update this._offset to reflect how much WAS written - this._offset += outHas - outHas = 0 - } else { - // output the entire current chunk. - // toss it away - outHas -= curHas - outOffset += curHas - bufferIndex ++ - this._offset = 0 - } - } - - this._bufferLength -= this._chunkSize - assert(out.length === this._chunkSize) - // debug("emitting data", out) - // debug(" BS emitting, paused=%j", this._paused, this._bufferLength) - this.emit("data", out) - out = null - } - // debug(" BS out of loops", this._bufferLength) - - // whatever is left, it's not enough to fill up a block, or we're paused - this._buffer = this._buffer.slice(bufferIndex) - if (this._paused) { - // debug(" BS paused, leaving", this._bufferLength) - this._needsDrain = true - this._emitting = false - return - } - - // if flushing, and not using null-padding, then need to emit the last - // chunk(s) sitting in the queue. We know that it's not enough to - // fill up a whole block, because otherwise it would have been emitted - // above, but there may be some offset. - var l = this._buffer.length - if (flush && !this._zeroes && l) { - if (l === 1) { - if (this._offset) { - this.emit("data", this._buffer[0].slice(this._offset)) - } else { - this.emit("data", this._buffer[0]) - } - } else { - var outHas = this._bufferLength - , out = new Buffer(outHas) - , outOffset = 0 - for (var i = 0; i < l; i ++) { - var cur = this._buffer[i] - , curHas = cur.length - this._offset - cur.copy(out, outOffset, this._offset) - this._offset = 0 - outOffset += curHas - this._bufferLength -= curHas - } - this.emit("data", out) - } - // truncate - this._buffer.length = 0 - this._bufferLength = 0 - this._offset = 0 - } - - // now either drained or ended - // debug("either draining, or ended", this._bufferLength, this._ended) - // means that we've flushed out all that we can so far. - if (this._needDrain) { - // debug("emitting drain", this._bufferLength) - this._needDrain = false - this.emit("drain") - } - - if ((this._bufferLength === 0) && this._ended && !this._endEmitted) { - // debug("emitting end", this._bufferLength) - this._endEmitted = true - this.emit("end") - } - - this._emitting = false - - // debug(" BS no longer emitting", flush, this._paused, this._emitting, this._bufferLength, this._chunkSize) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/package.json deleted file mode 100644 index a9dec954..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "name": "block-stream", - "description": "a stream of blocks", - "version": "0.0.7", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/block-stream.git" - }, - "engines": { - "node": "0.4 || >=0.5.8" - }, - "main": "block-stream.js", - "dependencies": { - "inherits": "~2.0.0" - }, - "devDependencies": { - "tap": "0.x" - }, - "scripts": { - "test": "tap test/" - }, - "license": "BSD", - "readme": "# block-stream\n\nA stream of blocks.\n\nWrite data into it, and it'll output data in buffer blocks the size you\nspecify, padding with zeroes if necessary.\n\n```javascript\nvar block = new BlockStream(512)\nfs.createReadStream(\"some-file\").pipe(block)\nblock.pipe(fs.createWriteStream(\"block-file\"))\n```\n\nWhen `.end()` or `.flush()` is called, it'll pad the block with zeroes.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/block-stream/issues" - }, - "homepage": "https://github.com/isaacs/block-stream", - "_id": "block-stream@0.0.7", - "dist": { - "shasum": "f02594aed4110922c417d5d634b45e55a4ffaefd" - }, - "_from": "block-stream@*", - "_resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.7.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/basic.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/basic.js deleted file mode 100644 index b4b93051..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/basic.js +++ /dev/null @@ -1,27 +0,0 @@ -var tap = require("tap") - , BlockStream = require("../block-stream.js") - -tap.test("basic test", function (t) { - var b = new BlockStream(16) - var fs = require("fs") - var fstr = fs.createReadStream(__filename, {encoding: "utf8"}) - fstr.pipe(b) - - var stat - t.doesNotThrow(function () { - stat = fs.statSync(__filename) - }, "stat should not throw") - - var totalBytes = 0 - b.on("data", function (c) { - t.equal(c.length, 16, "chunks should be 16 bytes long") - t.type(c, Buffer, "chunks should be buffer objects") - totalBytes += c.length - }) - b.on("end", function () { - var expectedBytes = stat.size + (16 - stat.size % 16) - t.equal(totalBytes, expectedBytes, "Should be multiple of 16") - t.end() - }) - -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/nopad-thorough.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/nopad-thorough.js deleted file mode 100644 index 7a8de88b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/nopad-thorough.js +++ /dev/null @@ -1,68 +0,0 @@ -var BlockStream = require("../block-stream.js") - -var blockSizes = [16]//, 25]//, 1024] - , writeSizes = [4, 15, 16, 17, 64 ]//, 64, 100] - , writeCounts = [1, 10]//, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize, {nopad: true }) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - - f.on("data", function (c) { - timeouts ++ - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - setTimeout(function () { - timeouts -- - - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - }, 100) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = writeSize * writeCount * 2 - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 100) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/nopad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/nopad.js deleted file mode 100644 index 6d38429f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/nopad.js +++ /dev/null @@ -1,57 +0,0 @@ -var BlockStream = require("../") -var tap = require("tap") - - -tap.test("don't pad, small writes", function (t) { - var f = new BlockStream(16, { nopad: true }) - t.plan(1) - - f.on("data", function (c) { - t.equal(c.toString(), "abc", "should get 'abc'") - }) - - f.on("end", function () { t.end() }) - - f.write(new Buffer("a")) - f.write(new Buffer("b")) - f.write(new Buffer("c")) - f.end() -}) - -tap.test("don't pad, exact write", function (t) { - var f = new BlockStream(16, { nopad: true }) - t.plan(1) - - var first = true - f.on("data", function (c) { - if (first) { - first = false - t.equal(c.toString(), "abcdefghijklmnop", "first chunk") - } else { - t.fail("should only get one") - } - }) - - f.on("end", function () { t.end() }) - - f.end(new Buffer("abcdefghijklmnop")) -}) - -tap.test("don't pad, big write", function (t) { - var f = new BlockStream(16, { nopad: true }) - t.plan(2) - - var first = true - f.on("data", function (c) { - if (first) { - first = false - t.equal(c.toString(), "abcdefghijklmnop", "first chunk") - } else { - t.equal(c.toString(), "q") - } - }) - - f.on("end", function () { t.end() }) - - f.end(new Buffer("abcdefghijklmnopq")) -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/pause-resume.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/pause-resume.js deleted file mode 100644 index 64d0d091..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/pause-resume.js +++ /dev/null @@ -1,73 +0,0 @@ -var BlockStream = require("../block-stream.js") - -var blockSizes = [16] - , writeSizes = [15, 16, 17] - , writeCounts = [1, 10]//, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - var paused = false - - f.on("data", function (c) { - timeouts ++ - t.notOk(paused, "should not be paused when emitting data") - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - paused = true - f.pause() - process.nextTick(function () { - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - paused = false - f.resume() - timeouts -- - }) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = expectChunks * blockSize - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 200) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/thorough.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/thorough.js deleted file mode 100644 index 1cc9ea08..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/thorough.js +++ /dev/null @@ -1,68 +0,0 @@ -var BlockStream = require("../block-stream.js") - -var blockSizes = [16]//, 25]//, 1024] - , writeSizes = [4, 15, 16, 17, 64 ]//, 64, 100] - , writeCounts = [1, 10]//, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - - f.on("data", function (c) { - timeouts ++ - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - setTimeout(function () { - timeouts -- - - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - }, 100) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = expectChunks * blockSize - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 100) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/two-stream.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/two-stream.js deleted file mode 100644 index c6db79a4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/two-stream.js +++ /dev/null @@ -1,59 +0,0 @@ -var log = console.log, - assert = require( 'assert' ), - BlockStream = require("../block-stream.js"), - isize = 0, tsize = 0, fsize = 0, psize = 0, i = 0, - filter = null, paper = null, stack = null, - -// a source data buffer -tsize = 1 * 1024; // <- 1K -stack = new Buffer( tsize ); -for ( ; i < tsize; i++) stack[i] = "x".charCodeAt(0); - -isize = 1 * 1024; // <- initial packet size with 4K no bug! -fsize = 2 * 1024 ; // <- first block-stream size -psize = Math.ceil( isize / 6 ); // <- second block-stream size - -fexpected = Math.ceil( tsize / fsize ); // <- packets expected for first -pexpected = Math.ceil( tsize / psize ); // <- packets expected for second - - -filter = new BlockStream( fsize, { nopad : true } ); -paper = new BlockStream( psize, { nopad : true } ); - - -var fcounter = 0; -filter.on( 'data', function (c) { - // verify that they're not null-padded - for (var i = 0; i < c.length; i ++) { - assert.strictEqual(c[i], "x".charCodeAt(0)) - } - ++fcounter; -} ); - -var pcounter = 0; -paper.on( 'data', function (c) { - // verify that they're not null-padded - for (var i = 0; i < c.length; i ++) { - assert.strictEqual(c[i], "x".charCodeAt(0)) - } - ++pcounter; -} ); - -filter.pipe( paper ); - -filter.on( 'end', function () { - log("fcounter: %s === %s", fcounter, fexpected) - assert.strictEqual( fcounter, fexpected ); -} ); - -paper.on( 'end', function () { - log("pcounter: %s === %s", pcounter, pexpected); - assert.strictEqual( pcounter, pexpected ); -} ); - - -for ( i = 0, j = isize; j <= tsize; j += isize ) { - filter.write( stack.slice( j - isize, j ) ); -} - -filter.end(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/.npmignore deleted file mode 100644 index 494272a8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -.*.swp -node_modules/ -examples/deep-copy/ -examples/path/ -examples/filter-copy/ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/.travis.yml deleted file mode 100644 index 2d26206d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - 0.6 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/README.md deleted file mode 100644 index 9d8cb77e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/README.md +++ /dev/null @@ -1,76 +0,0 @@ -Like FS streams, but with stat on them, and supporting directories and -symbolic links, as well as normal files. Also, you can use this to set -the stats on a file, even if you don't change its contents, or to create -a symlink, etc. - -So, for example, you can "write" a directory, and it'll call `mkdir`. You -can specify a uid and gid, and it'll call `chown`. You can specify a -`mtime` and `atime`, and it'll call `utimes`. You can call it a symlink -and provide a `linkpath` and it'll call `symlink`. - -Note that it won't automatically resolve symbolic links. So, if you -call `fstream.Reader('/some/symlink')` then you'll get an object -that stats and then ends immediately (since it has no data). To follow -symbolic links, do this: `fstream.Reader({path:'/some/symlink', follow: -true })`. - -There are various checks to make sure that the bytes emitted are the -same as the intended size, if the size is set. - -## Examples - -```javascript -fstream - .Writer({ path: "path/to/file" - , mode: 0755 - , size: 6 - }) - .write("hello\n") - .end() -``` - -This will create the directories if they're missing, and then write -`hello\n` into the file, chmod it to 0755, and assert that 6 bytes have -been written when it's done. - -```javascript -fstream - .Writer({ path: "path/to/file" - , mode: 0755 - , size: 6 - , flags: "a" - }) - .write("hello\n") - .end() -``` - -You can pass flags in, if you want to append to a file. - -```javascript -fstream - .Writer({ path: "path/to/symlink" - , linkpath: "./file" - , SymbolicLink: true - , mode: "0755" // octal strings supported - }) - .end() -``` - -If isSymbolicLink is a function, it'll be called, and if it returns -true, then it'll treat it as a symlink. If it's not a function, then -any truish value will make a symlink, or you can set `type: -'SymbolicLink'`, which does the same thing. - -Note that the linkpath is relative to the symbolic link location, not -the parent dir or cwd. - -```javascript -fstream - .Reader("path/to/dir") - .pipe(fstream.Writer("path/to/other/dir")) -``` - -This will do like `cp -Rp path/to/dir path/to/other/dir`. If the other -dir exists and isn't a directory, then it'll emit an error. It'll also -set the uid, gid, mode, etc. to be identical. In this way, it's more -like `rsync -a` than simply a copy. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/filter-pipe.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/filter-pipe.js deleted file mode 100644 index c6b55b3e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/filter-pipe.js +++ /dev/null @@ -1,131 +0,0 @@ -var fstream = require("../fstream.js") -var path = require("path") - -var r = fstream.Reader({ path: path.dirname(__dirname) - , filter: function () { - return !this.basename.match(/^\./) && - !this.basename.match(/^node_modules$/) - !this.basename.match(/^deep-copy$/) - !this.basename.match(/^filter-copy$/) - } - }) - -// this writer will only write directories -var w = fstream.Writer({ path: path.resolve(__dirname, "filter-copy") - , type: "Directory" - , filter: function () { - return this.type === "Directory" - } - }) - -var indent = "" -var escape = {} - -r.on("entry", appears) -r.on("ready", function () { - console.error("ready to begin!", r.path) -}) - -function appears (entry) { - console.error(indent + "a %s appears!", entry.type, entry.basename, typeof entry.basename) - if (foggy) { - console.error("FOGGY!") - var p = entry - do { - console.error(p.depth, p.path, p._paused) - } while (p = p.parent) - - throw new Error("\033[mshould not have entries while foggy") - } - indent += "\t" - entry.on("data", missile(entry)) - entry.on("end", runaway(entry)) - entry.on("entry", appears) -} - -var foggy -function missile (entry) { - if (entry.type === "Directory") { - var ended = false - entry.once("end", function () { ended = true }) - return function (c) { - // throw in some pathological pause()/resume() behavior - // just for extra fun. - process.nextTick(function () { - if (!foggy && !ended) { // && Math.random() < 0.3) { - console.error(indent +"%s casts a spell", entry.basename) - console.error("\na slowing fog comes over the battlefield...\n\033[32m") - entry.pause() - entry.once("resume", liftFog) - foggy = setTimeout(liftFog, 1000) - - function liftFog (who) { - if (!foggy) return - if (who) { - console.error("%s breaks the spell!", who && who.path) - } else { - console.error("the spell expires!") - } - console.error("\033[mthe fog lifts!\n") - clearTimeout(foggy) - foggy = null - if (entry._paused) entry.resume() - } - - } - }) - } - } - - return function (c) { - var e = Math.random() < 0.5 - console.error(indent + "%s %s for %d damage!", - entry.basename, - e ? "is struck" : "fires a chunk", - c.length) - } -} - -function runaway (entry) { return function () { - var e = Math.random() < 0.5 - console.error(indent + "%s %s", - entry.basename, - e ? "turns to flee" : "is vanquished!") - indent = indent.slice(0, -1) -}} - - -w.on("entry", attacks) -//w.on("ready", function () { attacks(w) }) -function attacks (entry) { - console.error(indent + "%s %s!", entry.basename, - entry.type === "Directory" ? "calls for backup" : "attacks") - entry.on("entry", attacks) -} - -ended = false -var i = 1 -r.on("end", function () { - if (foggy) clearTimeout(foggy) - console.error("\033[mIT'S OVER!!") - console.error("A WINNAR IS YOU!") - - console.log("ok " + (i ++) + " A WINNAR IS YOU") - ended = true - // now go through and verify that everything in there is a dir. - var p = path.resolve(__dirname, "filter-copy") - var checker = fstream.Reader({ path: p }) - checker.checker = true - checker.on("child", function (e) { - var ok = e.type === "Directory" - console.log((ok ? "" : "not ") + "ok " + (i ++) + - " should be a dir: " + - e.path.substr(checker.path.length + 1)) - }) -}) - -process.on("exit", function () { - console.log((ended ? "" : "not ") + "ok " + (i ++) + " ended") -}) - -r.pipe(w) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/pipe.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/pipe.js deleted file mode 100644 index 648ec849..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/pipe.js +++ /dev/null @@ -1,115 +0,0 @@ -var fstream = require("../fstream.js") -var path = require("path") - -var r = fstream.Reader({ path: path.dirname(__dirname) - , filter: function () { - return !this.basename.match(/^\./) && - !this.basename.match(/^node_modules$/) - !this.basename.match(/^deep-copy$/) - } - }) - -var w = fstream.Writer({ path: path.resolve(__dirname, "deep-copy") - , type: "Directory" - }) - -var indent = "" -var escape = {} - -r.on("entry", appears) -r.on("ready", function () { - console.error("ready to begin!", r.path) -}) - -function appears (entry) { - console.error(indent + "a %s appears!", entry.type, entry.basename, typeof entry.basename, entry) - if (foggy) { - console.error("FOGGY!") - var p = entry - do { - console.error(p.depth, p.path, p._paused) - } while (p = p.parent) - - throw new Error("\033[mshould not have entries while foggy") - } - indent += "\t" - entry.on("data", missile(entry)) - entry.on("end", runaway(entry)) - entry.on("entry", appears) -} - -var foggy -function missile (entry) { - if (entry.type === "Directory") { - var ended = false - entry.once("end", function () { ended = true }) - return function (c) { - // throw in some pathological pause()/resume() behavior - // just for extra fun. - process.nextTick(function () { - if (!foggy && !ended) { // && Math.random() < 0.3) { - console.error(indent +"%s casts a spell", entry.basename) - console.error("\na slowing fog comes over the battlefield...\n\033[32m") - entry.pause() - entry.once("resume", liftFog) - foggy = setTimeout(liftFog, 10) - - function liftFog (who) { - if (!foggy) return - if (who) { - console.error("%s breaks the spell!", who && who.path) - } else { - console.error("the spell expires!") - } - console.error("\033[mthe fog lifts!\n") - clearTimeout(foggy) - foggy = null - if (entry._paused) entry.resume() - } - - } - }) - } - } - - return function (c) { - var e = Math.random() < 0.5 - console.error(indent + "%s %s for %d damage!", - entry.basename, - e ? "is struck" : "fires a chunk", - c.length) - } -} - -function runaway (entry) { return function () { - var e = Math.random() < 0.5 - console.error(indent + "%s %s", - entry.basename, - e ? "turns to flee" : "is vanquished!") - indent = indent.slice(0, -1) -}} - - -w.on("entry", attacks) -//w.on("ready", function () { attacks(w) }) -function attacks (entry) { - console.error(indent + "%s %s!", entry.basename, - entry.type === "Directory" ? "calls for backup" : "attacks") - entry.on("entry", attacks) -} - -ended = false -r.on("end", function () { - if (foggy) clearTimeout(foggy) - console.error("\033[mIT'S OVER!!") - console.error("A WINNAR IS YOU!") - - console.log("ok 1 A WINNAR IS YOU") - ended = true -}) - -process.on("exit", function () { - console.log((ended ? "" : "not ") + "ok 2 ended") -}) - -r.pipe(w) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/reader.js deleted file mode 100644 index 9aa1a953..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/reader.js +++ /dev/null @@ -1,54 +0,0 @@ -var fstream = require("../fstream.js") -var tap = require("tap") -var fs = require("fs") -var path = require("path") -var children = -1 -var dir = path.dirname(__dirname) - -var gotReady = false -var ended = false - -tap.test("reader test", function (t) { - - var r = fstream.Reader({ path: dir - , filter: function () { - // return this.parent === r - return this.parent === r || this === r - } - }) - - r.on("ready", function () { - gotReady = true - children = fs.readdirSync(dir).length - console.error("Setting expected children to "+children) - t.equal(r.type, "Directory", "should be a directory") - }) - - r.on("entry", function (entry) { - children -- - if (!gotReady) { - t.fail("children before ready!") - } - t.equal(entry.dirname, r.path, "basename is parent dir") - }) - - r.on("error", function (er) { - t.fail(er) - t.end() - process.exit(1) - }) - - r.on("end", function () { - t.equal(children, 0, "should have seen all children") - ended = true - }) - - var closed = false - r.on("close", function () { - t.ok(ended, "saw end before close") - t.notOk(closed, "close should only happen once") - closed = true - t.end() - }) - -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/symlink-write.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/symlink-write.js deleted file mode 100644 index d7816d24..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/symlink-write.js +++ /dev/null @@ -1,24 +0,0 @@ -var fstream = require("../fstream.js") - , closed = false - -fstream - .Writer({ path: "path/to/symlink" - , linkpath: "./file" - , isSymbolicLink: true - , mode: "0755" // octal strings supported - }) - .on("close", function () { - closed = true - var fs = require("fs") - var s = fs.lstatSync("path/to/symlink") - var isSym = s.isSymbolicLink() - console.log((isSym?"":"not ") +"ok 1 should be symlink") - var t = fs.readlinkSync("path/to/symlink") - var isTarget = t === "./file" - console.log((isTarget?"":"not ") +"ok 2 should link to ./file") - }) - .end() - -process.on("exit", function () { - console.log((closed?"":"not ")+"ok 3 should be closed") -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/fstream.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/fstream.js deleted file mode 100644 index c66d26f5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/fstream.js +++ /dev/null @@ -1,31 +0,0 @@ -exports.Abstract = require("./lib/abstract.js") -exports.Reader = require("./lib/reader.js") -exports.Writer = require("./lib/writer.js") - -exports.File = - { Reader: require("./lib/file-reader.js") - , Writer: require("./lib/file-writer.js") } - -exports.Dir = - { Reader : require("./lib/dir-reader.js") - , Writer : require("./lib/dir-writer.js") } - -exports.Link = - { Reader : require("./lib/link-reader.js") - , Writer : require("./lib/link-writer.js") } - -exports.Proxy = - { Reader : require("./lib/proxy-reader.js") - , Writer : require("./lib/proxy-writer.js") } - -exports.Reader.Dir = exports.DirReader = exports.Dir.Reader -exports.Reader.File = exports.FileReader = exports.File.Reader -exports.Reader.Link = exports.LinkReader = exports.Link.Reader -exports.Reader.Proxy = exports.ProxyReader = exports.Proxy.Reader - -exports.Writer.Dir = exports.DirWriter = exports.Dir.Writer -exports.Writer.File = exports.FileWriter = exports.File.Writer -exports.Writer.Link = exports.LinkWriter = exports.Link.Writer -exports.Writer.Proxy = exports.ProxyWriter = exports.Proxy.Writer - -exports.collect = require("./lib/collect.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/abstract.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/abstract.js deleted file mode 100644 index 11ef0e28..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/abstract.js +++ /dev/null @@ -1,85 +0,0 @@ -// the parent class for all fstreams. - -module.exports = Abstract - -var Stream = require("stream").Stream - , inherits = require("inherits") - -function Abstract () { - Stream.call(this) -} - -inherits(Abstract, Stream) - -Abstract.prototype.on = function (ev, fn) { - if (ev === "ready" && this.ready) { - process.nextTick(fn.bind(this)) - } else { - Stream.prototype.on.call(this, ev, fn) - } - return this -} - -Abstract.prototype.abort = function () { - this._aborted = true - this.emit("abort") -} - -Abstract.prototype.destroy = function () {} - -Abstract.prototype.warn = function (msg, code) { - var me = this - , er = decorate(msg, code, me) - if (!me.listeners("warn")) { - console.error("%s %s\n" + - "path = %s\n" + - "syscall = %s\n" + - "fstream_type = %s\n" + - "fstream_path = %s\n" + - "fstream_unc_path = %s\n" + - "fstream_class = %s\n" + - "fstream_stack =\n%s\n", - code || "UNKNOWN", - er.stack, - er.path, - er.syscall, - er.fstream_type, - er.fstream_path, - er.fstream_unc_path, - er.fstream_class, - er.fstream_stack.join("\n")) - } else { - me.emit("warn", er) - } -} - -Abstract.prototype.info = function (msg, code) { - this.emit("info", msg, code) -} - -Abstract.prototype.error = function (msg, code, th) { - var er = decorate(msg, code, this) - if (th) throw er - else this.emit("error", er) -} - -function decorate (er, code, me) { - if (!(er instanceof Error)) er = new Error(er) - er.code = er.code || code - er.path = er.path || me.path - er.fstream_type = er.fstream_type || me.type - er.fstream_path = er.fstream_path || me.path - if (me._path !== me.path) { - er.fstream_unc_path = er.fstream_unc_path || me._path - } - if (me.linkpath) { - er.fstream_linkpath = er.fstream_linkpath || me.linkpath - } - er.fstream_class = er.fstream_class || me.constructor.name - er.fstream_stack = er.fstream_stack || - new Error().stack.split(/\n/).slice(3).map(function (s) { - return s.replace(/^ at /, "") - }) - - return er -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/collect.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/collect.js deleted file mode 100644 index a36f780e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/collect.js +++ /dev/null @@ -1,67 +0,0 @@ -module.exports = collect - -function collect (stream) { - if (stream._collected) return - - stream._collected = true - stream.pause() - - stream.on("data", save) - stream.on("end", save) - var buf = [] - function save (b) { - if (typeof b === "string") b = new Buffer(b) - if (Buffer.isBuffer(b) && !b.length) return - buf.push(b) - } - - stream.on("entry", saveEntry) - var entryBuffer = [] - function saveEntry (e) { - collect(e) - entryBuffer.push(e) - } - - stream.on("proxy", proxyPause) - function proxyPause (p) { - p.pause() - } - - - // replace the pipe method with a new version that will - // unlock the buffered stuff. if you just call .pipe() - // without a destination, then it'll re-play the events. - stream.pipe = (function (orig) { return function (dest) { - // console.error(" === open the pipes", dest && dest.path) - - // let the entries flow through one at a time. - // Once they're all done, then we can resume completely. - var e = 0 - ;(function unblockEntry () { - var entry = entryBuffer[e++] - // console.error(" ==== unblock entry", entry && entry.path) - if (!entry) return resume() - entry.on("end", unblockEntry) - if (dest) dest.add(entry) - else stream.emit("entry", entry) - })() - - function resume () { - stream.removeListener("entry", saveEntry) - stream.removeListener("data", save) - stream.removeListener("end", save) - - stream.pipe = orig - if (dest) stream.pipe(dest) - - buf.forEach(function (b) { - if (b) stream.emit("data", b) - else stream.emit("end") - }) - - stream.resume() - } - - return dest - }})(stream.pipe) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/dir-reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/dir-reader.js deleted file mode 100644 index 346ac2b8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/dir-reader.js +++ /dev/null @@ -1,251 +0,0 @@ -// A thing that emits "entry" events with Reader objects -// Pausing it causes it to stop emitting entry events, and also -// pauses the current entry if there is one. - -module.exports = DirReader - -var fs = require("graceful-fs") - , fstream = require("../fstream.js") - , Reader = fstream.Reader - , inherits = require("inherits") - , mkdir = require("mkdirp") - , path = require("path") - , Reader = require("./reader.js") - , assert = require("assert").ok - -inherits(DirReader, Reader) - -function DirReader (props) { - var me = this - if (!(me instanceof DirReader)) throw new Error( - "DirReader must be called as constructor.") - - // should already be established as a Directory type - if (props.type !== "Directory" || !props.Directory) { - throw new Error("Non-directory type "+ props.type) - } - - me.entries = null - me._index = -1 - me._paused = false - me._length = -1 - - if (props.sort) { - this.sort = props.sort - } - - Reader.call(this, props) -} - -DirReader.prototype._getEntries = function () { - var me = this - - // race condition. might pause() before calling _getEntries, - // and then resume, and try to get them a second time. - if (me._gotEntries) return - me._gotEntries = true - - fs.readdir(me._path, function (er, entries) { - if (er) return me.error(er) - - me.entries = entries - - me.emit("entries", entries) - if (me._paused) me.once("resume", processEntries) - else processEntries() - - function processEntries () { - me._length = me.entries.length - if (typeof me.sort === "function") { - me.entries = me.entries.sort(me.sort.bind(me)) - } - me._read() - } - }) -} - -// start walking the dir, and emit an "entry" event for each one. -DirReader.prototype._read = function () { - var me = this - - if (!me.entries) return me._getEntries() - - if (me._paused || me._currentEntry || me._aborted) { - // console.error("DR paused=%j, current=%j, aborted=%j", me._paused, !!me._currentEntry, me._aborted) - return - } - - me._index ++ - if (me._index >= me.entries.length) { - if (!me._ended) { - me._ended = true - me.emit("end") - me.emit("close") - } - return - } - - // ok, handle this one, then. - - // save creating a proxy, by stat'ing the thing now. - var p = path.resolve(me._path, me.entries[me._index]) - assert(p !== me._path) - assert(me.entries[me._index]) - - // set this to prevent trying to _read() again in the stat time. - me._currentEntry = p - fs[ me.props.follow ? "stat" : "lstat" ](p, function (er, stat) { - if (er) return me.error(er) - - var who = me._proxy || me - - stat.path = p - stat.basename = path.basename(p) - stat.dirname = path.dirname(p) - var childProps = me.getChildProps.call(who, stat) - childProps.path = p - childProps.basename = path.basename(p) - childProps.dirname = path.dirname(p) - - var entry = Reader(childProps, stat) - - // console.error("DR Entry", p, stat.size) - - me._currentEntry = entry - - // "entry" events are for direct entries in a specific dir. - // "child" events are for any and all children at all levels. - // This nomenclature is not completely final. - - entry.on("pause", function (who) { - if (!me._paused && !entry._disowned) { - me.pause(who) - } - }) - - entry.on("resume", function (who) { - if (me._paused && !entry._disowned) { - me.resume(who) - } - }) - - entry.on("stat", function (props) { - me.emit("_entryStat", entry, props) - if (entry._aborted) return - if (entry._paused) entry.once("resume", function () { - me.emit("entryStat", entry, props) - }) - else me.emit("entryStat", entry, props) - }) - - entry.on("ready", function EMITCHILD () { - // console.error("DR emit child", entry._path) - if (me._paused) { - // console.error(" DR emit child - try again later") - // pause the child, and emit the "entry" event once we drain. - // console.error("DR pausing child entry") - entry.pause(me) - return me.once("resume", EMITCHILD) - } - - // skip over sockets. they can't be piped around properly, - // so there's really no sense even acknowledging them. - // if someone really wants to see them, they can listen to - // the "socket" events. - if (entry.type === "Socket") { - me.emit("socket", entry) - } else { - me.emitEntry(entry) - } - }) - - var ended = false - entry.on("close", onend) - entry.on("disown", onend) - function onend () { - if (ended) return - ended = true - me.emit("childEnd", entry) - me.emit("entryEnd", entry) - me._currentEntry = null - if (!me._paused) { - me._read() - } - } - - // XXX Remove this. Works in node as of 0.6.2 or so. - // Long filenames should not break stuff. - entry.on("error", function (er) { - if (entry._swallowErrors) { - me.warn(er) - entry.emit("end") - entry.emit("close") - } else { - me.emit("error", er) - } - }) - - // proxy up some events. - ; [ "child" - , "childEnd" - , "warn" - ].forEach(function (ev) { - entry.on(ev, me.emit.bind(me, ev)) - }) - }) -} - -DirReader.prototype.disown = function (entry) { - entry.emit("beforeDisown") - entry._disowned = true - entry.parent = entry.root = null - if (entry === this._currentEntry) { - this._currentEntry = null - } - entry.emit("disown") -} - -DirReader.prototype.getChildProps = function (stat) { - return { depth: this.depth + 1 - , root: this.root || this - , parent: this - , follow: this.follow - , filter: this.filter - , sort: this.props.sort - , hardlinks: this.props.hardlinks - } -} - -DirReader.prototype.pause = function (who) { - var me = this - if (me._paused) return - who = who || me - me._paused = true - if (me._currentEntry && me._currentEntry.pause) { - me._currentEntry.pause(who) - } - me.emit("pause", who) -} - -DirReader.prototype.resume = function (who) { - var me = this - if (!me._paused) return - who = who || me - - me._paused = false - // console.error("DR Emit Resume", me._path) - me.emit("resume", who) - if (me._paused) { - // console.error("DR Re-paused", me._path) - return - } - - if (me._currentEntry) { - if (me._currentEntry.resume) me._currentEntry.resume(who) - } else me._read() -} - -DirReader.prototype.emitEntry = function (entry) { - this.emit("entry", entry) - this.emit("child", entry) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/dir-writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/dir-writer.js deleted file mode 100644 index 7073b883..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/dir-writer.js +++ /dev/null @@ -1,171 +0,0 @@ -// It is expected that, when .add() returns false, the consumer -// of the DirWriter will pause until a "drain" event occurs. Note -// that this is *almost always going to be the case*, unless the -// thing being written is some sort of unsupported type, and thus -// skipped over. - -module.exports = DirWriter - -var fs = require("graceful-fs") - , fstream = require("../fstream.js") - , Writer = require("./writer.js") - , inherits = require("inherits") - , mkdir = require("mkdirp") - , path = require("path") - , collect = require("./collect.js") - -inherits(DirWriter, Writer) - -function DirWriter (props) { - var me = this - if (!(me instanceof DirWriter)) me.error( - "DirWriter must be called as constructor.", null, true) - - // should already be established as a Directory type - if (props.type !== "Directory" || !props.Directory) { - me.error("Non-directory type "+ props.type + " " + - JSON.stringify(props), null, true) - } - - Writer.call(this, props) -} - -DirWriter.prototype._create = function () { - var me = this - mkdir(me._path, Writer.dirmode, function (er) { - if (er) return me.error(er) - // ready to start getting entries! - me.ready = true - me.emit("ready") - me._process() - }) -} - -// a DirWriter has an add(entry) method, but its .write() doesn't -// do anything. Why a no-op rather than a throw? Because this -// leaves open the door for writing directory metadata for -// gnu/solaris style dumpdirs. -DirWriter.prototype.write = function () { - return true -} - -DirWriter.prototype.end = function () { - this._ended = true - this._process() -} - -DirWriter.prototype.add = function (entry) { - var me = this - - // console.error("\tadd", entry._path, "->", me._path) - collect(entry) - if (!me.ready || me._currentEntry) { - me._buffer.push(entry) - return false - } - - // create a new writer, and pipe the incoming entry into it. - if (me._ended) { - return me.error("add after end") - } - - me._buffer.push(entry) - me._process() - - return 0 === this._buffer.length -} - -DirWriter.prototype._process = function () { - var me = this - - // console.error("DW Process p=%j", me._processing, me.basename) - - if (me._processing) return - - var entry = me._buffer.shift() - if (!entry) { - // console.error("DW Drain") - me.emit("drain") - if (me._ended) me._finish() - return - } - - me._processing = true - // console.error("DW Entry", entry._path) - - me.emit("entry", entry) - - // ok, add this entry - // - // don't allow recursive copying - var p = entry - do { - var pp = p._path || p.path - if (pp === me.root._path || pp === me._path || - (pp && pp.indexOf(me._path) === 0)) { - // console.error("DW Exit (recursive)", entry.basename, me._path) - me._processing = false - if (entry._collected) entry.pipe() - return me._process() - } - } while (p = p.parent) - - // console.error("DW not recursive") - - // chop off the entry's root dir, replace with ours - var props = { parent: me - , root: me.root || me - , type: entry.type - , depth: me.depth + 1 } - - var p = entry._path || entry.path || entry.props.path - if (entry.parent) { - p = p.substr(entry.parent._path.length + 1) - } - // get rid of any ../../ shenanigans - props.path = path.join(me.path, path.join("/", p)) - - // if i have a filter, the child should inherit it. - props.filter = me.filter - - // all the rest of the stuff, copy over from the source. - Object.keys(entry.props).forEach(function (k) { - if (!props.hasOwnProperty(k)) { - props[k] = entry.props[k] - } - }) - - // not sure at this point what kind of writer this is. - var child = me._currentChild = new Writer(props) - child.on("ready", function () { - // console.error("DW Child Ready", child.type, child._path) - // console.error(" resuming", entry._path) - entry.pipe(child) - entry.resume() - }) - - // XXX Make this work in node. - // Long filenames should not break stuff. - child.on("error", function (er) { - if (child._swallowErrors) { - me.warn(er) - child.emit("end") - child.emit("close") - } else { - me.emit("error", er) - } - }) - - // we fire _end internally *after* end, so that we don't move on - // until any "end" listeners have had their chance to do stuff. - child.on("close", onend) - var ended = false - function onend () { - if (ended) return - ended = true - // console.error("* DW Child end", child.basename) - me._currentChild = null - me._processing = false - me._process() - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/file-reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/file-reader.js deleted file mode 100644 index b1f98618..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/file-reader.js +++ /dev/null @@ -1,147 +0,0 @@ -// Basically just a wrapper around an fs.ReadStream - -module.exports = FileReader - -var fs = require("graceful-fs") - , fstream = require("../fstream.js") - , Reader = fstream.Reader - , inherits = require("inherits") - , mkdir = require("mkdirp") - , Reader = require("./reader.js") - , EOF = {EOF: true} - , CLOSE = {CLOSE: true} - -inherits(FileReader, Reader) - -function FileReader (props) { - // console.error(" FR create", props.path, props.size, new Error().stack) - var me = this - if (!(me instanceof FileReader)) throw new Error( - "FileReader must be called as constructor.") - - // should already be established as a File type - // XXX Todo: preserve hardlinks by tracking dev+inode+nlink, - // with a HardLinkReader class. - if (!((props.type === "Link" && props.Link) || - (props.type === "File" && props.File))) { - throw new Error("Non-file type "+ props.type) - } - - me._buffer = [] - me._bytesEmitted = 0 - Reader.call(me, props) -} - -FileReader.prototype._getStream = function () { - var me = this - , stream = me._stream = fs.createReadStream(me._path, me.props) - - if (me.props.blksize) { - stream.bufferSize = me.props.blksize - } - - stream.on("open", me.emit.bind(me, "open")) - - stream.on("data", function (c) { - // console.error("\t\t%d %s", c.length, me.basename) - me._bytesEmitted += c.length - // no point saving empty chunks - if (!c.length) return - else if (me._paused || me._buffer.length) { - me._buffer.push(c) - me._read() - } else me.emit("data", c) - }) - - stream.on("end", function () { - if (me._paused || me._buffer.length) { - // console.error("FR Buffering End", me._path) - me._buffer.push(EOF) - me._read() - } else { - me.emit("end") - } - - if (me._bytesEmitted !== me.props.size) { - me.error("Didn't get expected byte count\n"+ - "expect: "+me.props.size + "\n" + - "actual: "+me._bytesEmitted) - } - }) - - stream.on("close", function () { - if (me._paused || me._buffer.length) { - // console.error("FR Buffering Close", me._path) - me._buffer.push(CLOSE) - me._read() - } else { - // console.error("FR close 1", me._path) - me.emit("close") - } - }) - - me._read() -} - -FileReader.prototype._read = function () { - var me = this - // console.error("FR _read", me._path) - if (me._paused) { - // console.error("FR _read paused", me._path) - return - } - - if (!me._stream) { - // console.error("FR _getStream calling", me._path) - return me._getStream() - } - - // clear out the buffer, if there is one. - if (me._buffer.length) { - // console.error("FR _read has buffer", me._buffer.length, me._path) - var buf = me._buffer - for (var i = 0, l = buf.length; i < l; i ++) { - var c = buf[i] - if (c === EOF) { - // console.error("FR Read emitting buffered end", me._path) - me.emit("end") - } else if (c === CLOSE) { - // console.error("FR Read emitting buffered close", me._path) - me.emit("close") - } else { - // console.error("FR Read emitting buffered data", me._path) - me.emit("data", c) - } - - if (me._paused) { - // console.error("FR Read Re-pausing at "+i, me._path) - me._buffer = buf.slice(i) - return - } - } - me._buffer.length = 0 - } - // console.error("FR _read done") - // that's about all there is to it. -} - -FileReader.prototype.pause = function (who) { - var me = this - // console.error("FR Pause", me._path) - if (me._paused) return - who = who || me - me._paused = true - if (me._stream) me._stream.pause() - me.emit("pause", who) -} - -FileReader.prototype.resume = function (who) { - var me = this - // console.error("FR Resume", me._path) - if (!me._paused) return - who = who || me - me.emit("resume", who) - me._paused = false - if (me._stream) me._stream.resume() - me._read() -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/file-writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/file-writer.js deleted file mode 100644 index 68114625..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/file-writer.js +++ /dev/null @@ -1,100 +0,0 @@ -module.exports = FileWriter - -var fs = require("graceful-fs") - , mkdir = require("mkdirp") - , Writer = require("./writer.js") - , inherits = require("inherits") - , EOF = {} - -inherits(FileWriter, Writer) - -function FileWriter (props) { - var me = this - if (!(me instanceof FileWriter)) throw new Error( - "FileWriter must be called as constructor.") - - // should already be established as a File type - if (props.type !== "File" || !props.File) { - throw new Error("Non-file type "+ props.type) - } - - me._buffer = [] - me._bytesWritten = 0 - - Writer.call(this, props) -} - -FileWriter.prototype._create = function () { - var me = this - if (me._stream) return - - var so = {} - if (me.props.flags) so.flags = me.props.flags - so.mode = Writer.filemode - if (me._old && me._old.blksize) so.bufferSize = me._old.blksize - - me._stream = fs.createWriteStream(me._path, so) - - me._stream.on("open", function (fd) { - // console.error("FW open", me._buffer, me._path) - me.ready = true - me._buffer.forEach(function (c) { - if (c === EOF) me._stream.end() - else me._stream.write(c) - }) - me.emit("ready") - // give this a kick just in case it needs it. - me.emit("drain") - }) - - me._stream.on("drain", function () { me.emit("drain") }) - - me._stream.on("close", function () { - // console.error("\n\nFW Stream Close", me._path, me.size) - me._finish() - }) -} - -FileWriter.prototype.write = function (c) { - var me = this - - me._bytesWritten += c.length - - if (!me.ready) { - if (!Buffer.isBuffer(c) && typeof c !== 'string') - throw new Error('invalid write data') - me._buffer.push(c) - return false - } - - var ret = me._stream.write(c) - // console.error("\t-- fw wrote, _stream says", ret, me._stream._queue.length) - - // allow 2 buffered writes, because otherwise there's just too - // much stop and go bs. - return ret || (me._stream._queue && me._stream._queue.length <= 2) -} - -FileWriter.prototype.end = function (c) { - var me = this - - if (c) me.write(c) - - if (!me.ready) { - me._buffer.push(EOF) - return false - } - - return me._stream.end() -} - -FileWriter.prototype._finish = function () { - var me = this - if (typeof me.size === "number" && me._bytesWritten != me.size) { - me.error( - "Did not get expected byte count.\n" + - "expect: " + me.size + "\n" + - "actual: " + me._bytesWritten) - } - Writer.prototype._finish.call(me) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/get-type.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/get-type.js deleted file mode 100644 index cd65c41d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/get-type.js +++ /dev/null @@ -1,32 +0,0 @@ -module.exports = getType - -function getType (st) { - var types = - [ "Directory" - , "File" - , "SymbolicLink" - , "Link" // special for hardlinks from tarballs - , "BlockDevice" - , "CharacterDevice" - , "FIFO" - , "Socket" ] - , type - - if (st.type && -1 !== types.indexOf(st.type)) { - st[st.type] = true - return st.type - } - - for (var i = 0, l = types.length; i < l; i ++) { - type = types[i] - var is = st[type] || st["is" + type] - if (typeof is === "function") is = is.call(st) - if (is) { - st[type] = true - st.type = type - return type - } - } - - return null -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/link-reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/link-reader.js deleted file mode 100644 index 7e7ab6ce..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/link-reader.js +++ /dev/null @@ -1,54 +0,0 @@ -// Basically just a wrapper around an fs.readlink -// -// XXX: Enhance this to support the Link type, by keeping -// a lookup table of {<dev+inode>:<path>}, so that hardlinks -// can be preserved in tarballs. - -module.exports = LinkReader - -var fs = require("graceful-fs") - , fstream = require("../fstream.js") - , inherits = require("inherits") - , mkdir = require("mkdirp") - , Reader = require("./reader.js") - -inherits(LinkReader, Reader) - -function LinkReader (props) { - var me = this - if (!(me instanceof LinkReader)) throw new Error( - "LinkReader must be called as constructor.") - - if (!((props.type === "Link" && props.Link) || - (props.type === "SymbolicLink" && props.SymbolicLink))) { - throw new Error("Non-link type "+ props.type) - } - - Reader.call(me, props) -} - -// When piping a LinkReader into a LinkWriter, we have to -// already have the linkpath property set, so that has to -// happen *before* the "ready" event, which means we need to -// override the _stat method. -LinkReader.prototype._stat = function (currentStat) { - var me = this - fs.readlink(me._path, function (er, linkpath) { - if (er) return me.error(er) - me.linkpath = me.props.linkpath = linkpath - me.emit("linkpath", linkpath) - Reader.prototype._stat.call(me, currentStat) - }) -} - -LinkReader.prototype._read = function () { - var me = this - if (me._paused) return - // basically just a no-op, since we got all the info we need - // from the _stat method - if (!me._ended) { - me.emit("end") - me.emit("close") - me._ended = true - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/link-writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/link-writer.js deleted file mode 100644 index 5c8f1e70..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/link-writer.js +++ /dev/null @@ -1,95 +0,0 @@ - -module.exports = LinkWriter - -var fs = require("graceful-fs") - , Writer = require("./writer.js") - , inherits = require("inherits") - , path = require("path") - , rimraf = require("rimraf") - -inherits(LinkWriter, Writer) - -function LinkWriter (props) { - var me = this - if (!(me instanceof LinkWriter)) throw new Error( - "LinkWriter must be called as constructor.") - - // should already be established as a Link type - if (!((props.type === "Link" && props.Link) || - (props.type === "SymbolicLink" && props.SymbolicLink))) { - throw new Error("Non-link type "+ props.type) - } - - if (props.linkpath === "") props.linkpath = "." - if (!props.linkpath) { - me.error("Need linkpath property to create " + props.type) - } - - Writer.call(this, props) -} - -LinkWriter.prototype._create = function () { - // console.error(" LW _create") - var me = this - , hard = me.type === "Link" || process.platform === "win32" - , link = hard ? "link" : "symlink" - , lp = hard ? path.resolve(me.dirname, me.linkpath) : me.linkpath - - // can only change the link path by clobbering - // For hard links, let's just assume that's always the case, since - // there's no good way to read them if we don't already know. - if (hard) return clobber(me, lp, link) - - fs.readlink(me._path, function (er, p) { - // only skip creation if it's exactly the same link - if (p && p === lp) return finish(me) - clobber(me, lp, link) - }) -} - -function clobber (me, lp, link) { - rimraf(me._path, function (er) { - if (er) return me.error(er) - create(me, lp, link) - }) -} - -function create (me, lp, link) { - fs[link](lp, me._path, function (er) { - // if this is a hard link, and we're in the process of writing out a - // directory, it's very possible that the thing we're linking to - // doesn't exist yet (especially if it was intended as a symlink), - // so swallow ENOENT errors here and just soldier in. - // Additionally, an EPERM or EACCES can happen on win32 if it's trying - // to make a link to a directory. Again, just skip it. - // A better solution would be to have fs.symlink be supported on - // windows in some nice fashion. - if (er) { - if ((er.code === "ENOENT" || - er.code === "EACCES" || - er.code === "EPERM" ) && process.platform === "win32") { - me.ready = true - me.emit("ready") - me.emit("end") - me.emit("close") - me.end = me._finish = function () {} - } else return me.error(er) - } - finish(me) - }) -} - -function finish (me) { - me.ready = true - me.emit("ready") - if (me._ended && !me._finished) me._finish() -} - -LinkWriter.prototype.end = function () { - // console.error("LW finish in end") - this._ended = true - if (this.ready) { - this._finished = true - this._finish() - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/proxy-reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/proxy-reader.js deleted file mode 100644 index a0ece34a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/proxy-reader.js +++ /dev/null @@ -1,93 +0,0 @@ -// A reader for when we don't yet know what kind of thing -// the thing is. - -module.exports = ProxyReader - -var Reader = require("./reader.js") - , getType = require("./get-type.js") - , inherits = require("inherits") - , fs = require("graceful-fs") - -inherits(ProxyReader, Reader) - -function ProxyReader (props) { - var me = this - if (!(me instanceof ProxyReader)) throw new Error( - "ProxyReader must be called as constructor.") - - me.props = props - me._buffer = [] - me.ready = false - - Reader.call(me, props) -} - -ProxyReader.prototype._stat = function () { - var me = this - , props = me.props - // stat the thing to see what the proxy should be. - , stat = props.follow ? "stat" : "lstat" - - fs[stat](props.path, function (er, current) { - var type - if (er || !current) { - type = "File" - } else { - type = getType(current) - } - - props[type] = true - props.type = me.type = type - - me._old = current - me._addProxy(Reader(props, current)) - }) -} - -ProxyReader.prototype._addProxy = function (proxy) { - var me = this - if (me._proxyTarget) { - return me.error("proxy already set") - } - - me._proxyTarget = proxy - proxy._proxy = me - - ; [ "error" - , "data" - , "end" - , "close" - , "linkpath" - , "entry" - , "entryEnd" - , "child" - , "childEnd" - , "warn" - , "stat" - ].forEach(function (ev) { - // console.error("~~ proxy event", ev, me.path) - proxy.on(ev, me.emit.bind(me, ev)) - }) - - me.emit("proxy", proxy) - - proxy.on("ready", function () { - // console.error("~~ proxy is ready!", me.path) - me.ready = true - me.emit("ready") - }) - - var calls = me._buffer - me._buffer.length = 0 - calls.forEach(function (c) { - proxy[c[0]].apply(proxy, c[1]) - }) -} - -ProxyReader.prototype.pause = function () { - return this._proxyTarget ? this._proxyTarget.pause() : false -} - -ProxyReader.prototype.resume = function () { - return this._proxyTarget ? this._proxyTarget.resume() : false -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/proxy-writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/proxy-writer.js deleted file mode 100644 index b0476633..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/proxy-writer.js +++ /dev/null @@ -1,109 +0,0 @@ -// A writer for when we don't know what kind of thing -// the thing is. That is, it's not explicitly set, -// so we're going to make it whatever the thing already -// is, or "File" -// -// Until then, collect all events. - -module.exports = ProxyWriter - -var Writer = require("./writer.js") - , getType = require("./get-type.js") - , inherits = require("inherits") - , collect = require("./collect.js") - , fs = require("fs") - -inherits(ProxyWriter, Writer) - -function ProxyWriter (props) { - var me = this - if (!(me instanceof ProxyWriter)) throw new Error( - "ProxyWriter must be called as constructor.") - - me.props = props - me._needDrain = false - - Writer.call(me, props) -} - -ProxyWriter.prototype._stat = function () { - var me = this - , props = me.props - // stat the thing to see what the proxy should be. - , stat = props.follow ? "stat" : "lstat" - - fs[stat](props.path, function (er, current) { - var type - if (er || !current) { - type = "File" - } else { - type = getType(current) - } - - props[type] = true - props.type = me.type = type - - me._old = current - me._addProxy(Writer(props, current)) - }) -} - -ProxyWriter.prototype._addProxy = function (proxy) { - // console.error("~~ set proxy", this.path) - var me = this - if (me._proxy) { - return me.error("proxy already set") - } - - me._proxy = proxy - ; [ "ready" - , "error" - , "close" - , "pipe" - , "drain" - , "warn" - ].forEach(function (ev) { - proxy.on(ev, me.emit.bind(me, ev)) - }) - - me.emit("proxy", proxy) - - var calls = me._buffer - calls.forEach(function (c) { - // console.error("~~ ~~ proxy buffered call", c[0], c[1]) - proxy[c[0]].apply(proxy, c[1]) - }) - me._buffer.length = 0 - if (me._needsDrain) me.emit("drain") -} - -ProxyWriter.prototype.add = function (entry) { - // console.error("~~ proxy add") - collect(entry) - - if (!this._proxy) { - this._buffer.push(["add", [entry]]) - this._needDrain = true - return false - } - return this._proxy.add(entry) -} - -ProxyWriter.prototype.write = function (c) { - // console.error("~~ proxy write") - if (!this._proxy) { - this._buffer.push(["write", [c]]) - this._needDrain = true - return false - } - return this._proxy.write(c) -} - -ProxyWriter.prototype.end = function (c) { - // console.error("~~ proxy end") - if (!this._proxy) { - this._buffer.push(["end", [c]]) - return false - } - return this._proxy.end(c) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/reader.js deleted file mode 100644 index eaf921cd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/reader.js +++ /dev/null @@ -1,260 +0,0 @@ - -module.exports = Reader - -var fs = require("graceful-fs") - , Stream = require("stream").Stream - , inherits = require("inherits") - , path = require("path") - , getType = require("./get-type.js") - , hardLinks = Reader.hardLinks = {} - , Abstract = require("./abstract.js") - -// Must do this *before* loading the child classes -inherits(Reader, Abstract) - -var DirReader = require("./dir-reader.js") - , FileReader = require("./file-reader.js") - , LinkReader = require("./link-reader.js") - , SocketReader = require("./socket-reader.js") - , ProxyReader = require("./proxy-reader.js") - -function Reader (props, currentStat) { - var me = this - if (!(me instanceof Reader)) return new Reader(props, currentStat) - - if (typeof props === "string") { - props = { path: props } - } - - if (!props.path) { - me.error("Must provide a path", null, true) - } - - // polymorphism. - // call fstream.Reader(dir) to get a DirReader object, etc. - // Note that, unlike in the Writer case, ProxyReader is going - // to be the *normal* state of affairs, since we rarely know - // the type of a file prior to reading it. - - - var type - , ClassType - - if (props.type && typeof props.type === "function") { - type = props.type - ClassType = type - } else { - type = getType(props) - ClassType = Reader - } - - if (currentStat && !type) { - type = getType(currentStat) - props[type] = true - props.type = type - } - - switch (type) { - case "Directory": - ClassType = DirReader - break - - case "Link": - // XXX hard links are just files. - // However, it would be good to keep track of files' dev+inode - // and nlink values, and create a HardLinkReader that emits - // a linkpath value of the original copy, so that the tar - // writer can preserve them. - // ClassType = HardLinkReader - // break - - case "File": - ClassType = FileReader - break - - case "SymbolicLink": - ClassType = LinkReader - break - - case "Socket": - ClassType = SocketReader - break - - case null: - ClassType = ProxyReader - break - } - - if (!(me instanceof ClassType)) { - return new ClassType(props) - } - - Abstract.call(me) - - me.readable = true - me.writable = false - - me.type = type - me.props = props - me.depth = props.depth = props.depth || 0 - me.parent = props.parent || null - me.root = props.root || (props.parent && props.parent.root) || me - - me._path = me.path = path.resolve(props.path) - if (process.platform === "win32") { - me.path = me._path = me.path.replace(/\?/g, "_") - if (me._path.length >= 260) { - // how DOES one create files on the moon? - // if the path has spaces in it, then UNC will fail. - me._swallowErrors = true - //if (me._path.indexOf(" ") === -1) { - me._path = "\\\\?\\" + me.path.replace(/\//g, "\\") - //} - } - } - me.basename = props.basename = path.basename(me.path) - me.dirname = props.dirname = path.dirname(me.path) - - // these have served their purpose, and are now just noisy clutter - props.parent = props.root = null - - // console.error("\n\n\n%s setting size to", props.path, props.size) - me.size = props.size - me.filter = typeof props.filter === "function" ? props.filter : null - if (props.sort === "alpha") props.sort = alphasort - - // start the ball rolling. - // this will stat the thing, and then call me._read() - // to start reading whatever it is. - // console.error("calling stat", props.path, currentStat) - me._stat(currentStat) -} - -function alphasort (a, b) { - return a === b ? 0 - : a.toLowerCase() > b.toLowerCase() ? 1 - : a.toLowerCase() < b.toLowerCase() ? -1 - : a > b ? 1 - : -1 -} - -Reader.prototype._stat = function (currentStat) { - var me = this - , props = me.props - , stat = props.follow ? "stat" : "lstat" - // console.error("Reader._stat", me._path, currentStat) - if (currentStat) process.nextTick(statCb.bind(null, null, currentStat)) - else fs[stat](me._path, statCb) - - - function statCb (er, props_) { - // console.error("Reader._stat, statCb", me._path, props_, props_.nlink) - if (er) return me.error(er) - - Object.keys(props_).forEach(function (k) { - props[k] = props_[k] - }) - - // if it's not the expected size, then abort here. - if (undefined !== me.size && props.size !== me.size) { - return me.error("incorrect size") - } - me.size = props.size - - var type = getType(props) - var handleHardlinks = props.hardlinks !== false - - // special little thing for handling hardlinks. - if (handleHardlinks && type !== "Directory" && props.nlink && props.nlink > 1) { - var k = props.dev + ":" + props.ino - // console.error("Reader has nlink", me._path, k) - if (hardLinks[k] === me._path || !hardLinks[k]) hardLinks[k] = me._path - else { - // switch into hardlink mode. - type = me.type = me.props.type = "Link" - me.Link = me.props.Link = true - me.linkpath = me.props.linkpath = hardLinks[k] - // console.error("Hardlink detected, switching mode", me._path, me.linkpath) - // Setting __proto__ would arguably be the "correct" - // approach here, but that just seems too wrong. - me._stat = me._read = LinkReader.prototype._read - } - } - - if (me.type && me.type !== type) { - me.error("Unexpected type: " + type) - } - - // if the filter doesn't pass, then just skip over this one. - // still have to emit end so that dir-walking can move on. - if (me.filter) { - var who = me._proxy || me - // special handling for ProxyReaders - if (!me.filter.call(who, who, props)) { - if (!me._disowned) { - me.abort() - me.emit("end") - me.emit("close") - } - return - } - } - - // last chance to abort or disown before the flow starts! - var events = ["_stat", "stat", "ready"] - var e = 0 - ;(function go () { - if (me._aborted) { - me.emit("end") - me.emit("close") - return - } - - if (me._paused) { - me.once("resume", go) - return - } - - var ev = events[e ++] - if (!ev) return me._read() - me.emit(ev, props) - go() - })() - } -} - -Reader.prototype.pipe = function (dest, opts) { - var me = this - if (typeof dest.add === "function") { - // piping to a multi-compatible, and we've got directory entries. - me.on("entry", function (entry) { - var ret = dest.add(entry) - if (false === ret) { - me.pause() - } - }) - } - - // console.error("R Pipe apply Stream Pipe") - return Stream.prototype.pipe.apply(this, arguments) -} - -Reader.prototype.pause = function (who) { - this._paused = true - who = who || this - this.emit("pause", who) - if (this._stream) this._stream.pause(who) -} - -Reader.prototype.resume = function (who) { - this._paused = false - who = who || this - this.emit("resume", who) - if (this._stream) this._stream.resume(who) - this._read() -} - -Reader.prototype._read = function () { - this.error("Cannot read unknown type: "+this.type) -} - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/socket-reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/socket-reader.js deleted file mode 100644 index e89c1731..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/socket-reader.js +++ /dev/null @@ -1,38 +0,0 @@ -// Just get the stats, and then don't do anything. -// You can't really "read" from a socket. You "connect" to it. -// Mostly, this is here so that reading a dir with a socket in it -// doesn't blow up. - -module.exports = SocketReader - -var fs = require("graceful-fs") - , fstream = require("../fstream.js") - , inherits = require("inherits") - , mkdir = require("mkdirp") - , Reader = require("./reader.js") - -inherits(SocketReader, Reader) - -function SocketReader (props) { - var me = this - if (!(me instanceof SocketReader)) throw new Error( - "SocketReader must be called as constructor.") - - if (!(props.type === "Socket" && props.Socket)) { - throw new Error("Non-socket type "+ props.type) - } - - Reader.call(me, props) -} - -SocketReader.prototype._read = function () { - var me = this - if (me._paused) return - // basically just a no-op, since we got all the info we have - // from the _stat method - if (!me._ended) { - me.emit("end") - me.emit("close") - me._ended = true - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/writer.js deleted file mode 100644 index 5599fb22..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/writer.js +++ /dev/null @@ -1,389 +0,0 @@ - -module.exports = Writer - -var fs = require("graceful-fs") - , inherits = require("inherits") - , rimraf = require("rimraf") - , mkdir = require("mkdirp") - , path = require("path") - , umask = process.platform === "win32" ? 0 : process.umask() - , getType = require("./get-type.js") - , Abstract = require("./abstract.js") - -// Must do this *before* loading the child classes -inherits(Writer, Abstract) - -Writer.dirmode = 0777 & (~umask) -Writer.filemode = 0666 & (~umask) - -var DirWriter = require("./dir-writer.js") - , LinkWriter = require("./link-writer.js") - , FileWriter = require("./file-writer.js") - , ProxyWriter = require("./proxy-writer.js") - -// props is the desired state. current is optionally the current stat, -// provided here so that subclasses can avoid statting the target -// more than necessary. -function Writer (props, current) { - var me = this - - if (typeof props === "string") { - props = { path: props } - } - - if (!props.path) me.error("Must provide a path", null, true) - - // polymorphism. - // call fstream.Writer(dir) to get a DirWriter object, etc. - var type = getType(props) - , ClassType = Writer - - switch (type) { - case "Directory": - ClassType = DirWriter - break - case "File": - ClassType = FileWriter - break - case "Link": - case "SymbolicLink": - ClassType = LinkWriter - break - case null: - // Don't know yet what type to create, so we wrap in a proxy. - ClassType = ProxyWriter - break - } - - if (!(me instanceof ClassType)) return new ClassType(props) - - // now get down to business. - - Abstract.call(me) - - // props is what we want to set. - // set some convenience properties as well. - me.type = props.type - me.props = props - me.depth = props.depth || 0 - me.clobber = false === props.clobber ? props.clobber : true - me.parent = props.parent || null - me.root = props.root || (props.parent && props.parent.root) || me - - me._path = me.path = path.resolve(props.path) - if (process.platform === "win32") { - me.path = me._path = me.path.replace(/\?/g, "_") - if (me._path.length >= 260) { - me._swallowErrors = true - me._path = "\\\\?\\" + me.path.replace(/\//g, "\\") - } - } - me.basename = path.basename(props.path) - me.dirname = path.dirname(props.path) - me.linkpath = props.linkpath || null - - props.parent = props.root = null - - // console.error("\n\n\n%s setting size to", props.path, props.size) - me.size = props.size - - if (typeof props.mode === "string") { - props.mode = parseInt(props.mode, 8) - } - - me.readable = false - me.writable = true - - // buffer until ready, or while handling another entry - me._buffer = [] - me.ready = false - - me.filter = typeof props.filter === "function" ? props.filter: null - - // start the ball rolling. - // this checks what's there already, and then calls - // me._create() to call the impl-specific creation stuff. - me._stat(current) -} - -// Calling this means that it's something we can't create. -// Just assert that it's already there, otherwise raise a warning. -Writer.prototype._create = function () { - var me = this - fs[me.props.follow ? "stat" : "lstat"](me._path, function (er, current) { - if (er) { - return me.warn("Cannot create " + me._path + "\n" + - "Unsupported type: "+me.type, "ENOTSUP") - } - me._finish() - }) -} - -Writer.prototype._stat = function (current) { - var me = this - , props = me.props - , stat = props.follow ? "stat" : "lstat" - , who = me._proxy || me - - if (current) statCb(null, current) - else fs[stat](me._path, statCb) - - function statCb (er, current) { - if (me.filter && !me.filter.call(who, who, current)) { - me._aborted = true - me.emit("end") - me.emit("close") - return - } - - // if it's not there, great. We'll just create it. - // if it is there, then we'll need to change whatever differs - if (er || !current) { - return create(me) - } - - me._old = current - var currentType = getType(current) - - // if it's a type change, then we need to clobber or error. - // if it's not a type change, then let the impl take care of it. - if (currentType !== me.type) { - return rimraf(me._path, function (er) { - if (er) return me.error(er) - me._old = null - create(me) - }) - } - - // otherwise, just handle in the app-specific way - // this creates a fs.WriteStream, or mkdir's, or whatever - create(me) - } -} - -function create (me) { - // console.error("W create", me._path, Writer.dirmode) - - // XXX Need to clobber non-dirs that are in the way, - // unless { clobber: false } in the props. - mkdir(path.dirname(me._path), Writer.dirmode, function (er, made) { - // console.error("W created", path.dirname(me._path), er) - if (er) return me.error(er) - - // later on, we have to set the mode and owner for these - me._madeDir = made - return me._create() - }) -} - -function endChmod (me, want, current, path, cb) { - var wantMode = want.mode - , chmod = want.follow || me.type !== "SymbolicLink" - ? "chmod" : "lchmod" - - if (!fs[chmod]) return cb() - if (typeof wantMode !== "number") return cb() - - var curMode = current.mode & 0777 - wantMode = wantMode & 0777 - if (wantMode === curMode) return cb() - - fs[chmod](path, wantMode, cb) -} - - -function endChown (me, want, current, path, cb) { - // Don't even try it unless root. Too easy to EPERM. - if (process.platform === "win32") return cb() - if (!process.getuid || !process.getuid() === 0) return cb() - if (typeof want.uid !== "number" && - typeof want.gid !== "number" ) return cb() - - if (current.uid === want.uid && - current.gid === want.gid) return cb() - - var chown = (me.props.follow || me.type !== "SymbolicLink") - ? "chown" : "lchown" - if (!fs[chown]) return cb() - - if (typeof want.uid !== "number") want.uid = current.uid - if (typeof want.gid !== "number") want.gid = current.gid - - fs[chown](path, want.uid, want.gid, cb) -} - -function endUtimes (me, want, current, path, cb) { - if (!fs.utimes || process.platform === "win32") return cb() - - var utimes = (want.follow || me.type !== "SymbolicLink") - ? "utimes" : "lutimes" - - if (utimes === "lutimes" && !fs[utimes]) { - utimes = "utimes" - } - - if (!fs[utimes]) return cb() - - var curA = current.atime - , curM = current.mtime - , meA = want.atime - , meM = want.mtime - - if (meA === undefined) meA = curA - if (meM === undefined) meM = curM - - if (!isDate(meA)) meA = new Date(meA) - if (!isDate(meM)) meA = new Date(meM) - - if (meA.getTime() === curA.getTime() && - meM.getTime() === curM.getTime()) return cb() - - fs[utimes](path, meA, meM, cb) -} - - -// XXX This function is beastly. Break it up! -Writer.prototype._finish = function () { - var me = this - - // console.error(" W Finish", me._path, me.size) - - // set up all the things. - // At this point, we're already done writing whatever we've gotta write, - // adding files to the dir, etc. - var todo = 0 - var errState = null - var done = false - - if (me._old) { - // the times will almost *certainly* have changed. - // adds the utimes syscall, but remove another stat. - me._old.atime = new Date(0) - me._old.mtime = new Date(0) - // console.error(" W Finish Stale Stat", me._path, me.size) - setProps(me._old) - } else { - var stat = me.props.follow ? "stat" : "lstat" - // console.error(" W Finish Stating", me._path, me.size) - fs[stat](me._path, function (er, current) { - // console.error(" W Finish Stated", me._path, me.size, current) - if (er) { - // if we're in the process of writing out a - // directory, it's very possible that the thing we're linking to - // doesn't exist yet (especially if it was intended as a symlink), - // so swallow ENOENT errors here and just soldier on. - if (er.code === "ENOENT" && - (me.type === "Link" || me.type === "SymbolicLink") && - process.platform === "win32") { - me.ready = true - me.emit("ready") - me.emit("end") - me.emit("close") - me.end = me._finish = function () {} - return - } else return me.error(er) - } - setProps(me._old = current) - }) - } - - return - - function setProps (current) { - todo += 3 - endChmod(me, me.props, current, me._path, next("chmod")) - endChown(me, me.props, current, me._path, next("chown")) - endUtimes(me, me.props, current, me._path, next("utimes")) - } - - function next (what) { - return function (er) { - // console.error(" W Finish", what, todo) - if (errState) return - if (er) { - er.fstream_finish_call = what - return me.error(errState = er) - } - if (--todo > 0) return - if (done) return - done = true - - // we may still need to set the mode/etc. on some parent dirs - // that were created previously. delay end/close until then. - if (!me._madeDir) return end() - else endMadeDir(me, me._path, end) - - function end (er) { - if (er) { - er.fstream_finish_call = "setupMadeDir" - return me.error(er) - } - // all the props have been set, so we're completely done. - me.emit("end") - me.emit("close") - } - } - } -} - -function endMadeDir (me, p, cb) { - var made = me._madeDir - // everything *between* made and path.dirname(me._path) - // needs to be set up. Note that this may just be one dir. - var d = path.dirname(p) - - endMadeDir_(me, d, function (er) { - if (er) return cb(er) - if (d === made) { - return cb() - } - endMadeDir(me, d, cb) - }) -} - -function endMadeDir_ (me, p, cb) { - var dirProps = {} - Object.keys(me.props).forEach(function (k) { - dirProps[k] = me.props[k] - - // only make non-readable dirs if explicitly requested. - if (k === "mode" && me.type !== "Directory") { - dirProps[k] = dirProps[k] | 0111 - } - }) - - var todo = 3 - , errState = null - fs.stat(p, function (er, current) { - if (er) return cb(errState = er) - endChmod(me, dirProps, current, p, next) - endChown(me, dirProps, current, p, next) - endUtimes(me, dirProps, current, p, next) - }) - - function next (er) { - if (errState) return - if (er) return cb(errState = er) - if (-- todo === 0) return cb() - } -} - -Writer.prototype.pipe = function () { - this.error("Can't pipe from writable stream") -} - -Writer.prototype.add = function () { - this.error("Cannot add to non-Directory type") -} - -Writer.prototype.write = function () { - return true -} - -function objectToString (d) { - return Object.prototype.toString.call(d) -} - -function isDate(d) { - return typeof d === 'object' && objectToString(d) === '[object Date]'; -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/package.json deleted file mode 100644 index c3b07d0a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "name": "fstream", - "description": "Advanced file system stream things", - "version": "0.1.25", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/fstream.git" - }, - "main": "fstream.js", - "engines": { - "node": ">=0.6" - }, - "dependencies": { - "rimraf": "2", - "mkdirp": "0.3", - "graceful-fs": "~2.0.0", - "inherits": "~2.0.0" - }, - "devDependencies": { - "tap": "" - }, - "scripts": { - "test": "tap examples/*.js" - }, - "license": "BSD", - "readme": "Like FS streams, but with stat on them, and supporting directories and\nsymbolic links, as well as normal files. Also, you can use this to set\nthe stats on a file, even if you don't change its contents, or to create\na symlink, etc.\n\nSo, for example, you can \"write\" a directory, and it'll call `mkdir`. You\ncan specify a uid and gid, and it'll call `chown`. You can specify a\n`mtime` and `atime`, and it'll call `utimes`. You can call it a symlink\nand provide a `linkpath` and it'll call `symlink`.\n\nNote that it won't automatically resolve symbolic links. So, if you\ncall `fstream.Reader('/some/symlink')` then you'll get an object\nthat stats and then ends immediately (since it has no data). To follow\nsymbolic links, do this: `fstream.Reader({path:'/some/symlink', follow:\ntrue })`.\n\nThere are various checks to make sure that the bytes emitted are the\nsame as the intended size, if the size is set.\n\n## Examples\n\n```javascript\nfstream\n .Writer({ path: \"path/to/file\"\n , mode: 0755\n , size: 6\n })\n .write(\"hello\\n\")\n .end()\n```\n\nThis will create the directories if they're missing, and then write\n`hello\\n` into the file, chmod it to 0755, and assert that 6 bytes have\nbeen written when it's done.\n\n```javascript\nfstream\n .Writer({ path: \"path/to/file\"\n , mode: 0755\n , size: 6\n , flags: \"a\"\n })\n .write(\"hello\\n\")\n .end()\n```\n\nYou can pass flags in, if you want to append to a file.\n\n```javascript\nfstream\n .Writer({ path: \"path/to/symlink\"\n , linkpath: \"./file\"\n , SymbolicLink: true\n , mode: \"0755\" // octal strings supported\n })\n .end()\n```\n\nIf isSymbolicLink is a function, it'll be called, and if it returns\ntrue, then it'll treat it as a symlink. If it's not a function, then\nany truish value will make a symlink, or you can set `type:\n'SymbolicLink'`, which does the same thing.\n\nNote that the linkpath is relative to the symbolic link location, not\nthe parent dir or cwd.\n\n```javascript\nfstream\n .Reader(\"path/to/dir\")\n .pipe(fstream.Writer(\"path/to/other/dir\"))\n```\n\nThis will do like `cp -Rp path/to/dir path/to/other/dir`. If the other\ndir exists and isn't a directory, then it'll emit an error. It'll also\nset the uid, gid, mode, etc. to be identical. In this way, it's more\nlike `rsync -a` than simply a copy.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/fstream/issues" - }, - "homepage": "https://github.com/isaacs/fstream", - "_id": "fstream@0.1.25", - "dist": { - "shasum": "cca977eec0cdc5382161b2feeeb567d5f95783b0" - }, - "_from": "fstream@~0.1.8", - "_resolved": "https://registry.npmjs.org/fstream/-/fstream-0.1.25.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/LICENSE deleted file mode 100644 index dea3013d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/README.md deleted file mode 100644 index b1c56658..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/README.md +++ /dev/null @@ -1,42 +0,0 @@ -Browser-friendly inheritance fully compatible with standard node.js -[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). - -This package exports standard `inherits` from node.js `util` module in -node environment, but also provides alternative browser-friendly -implementation through [browser -field](https://gist.github.com/shtylman/4339901). Alternative -implementation is a literal copy of standard one located in standalone -module to avoid requiring of `util`. It also has a shim for old -browsers with no `Object.create` support. - -While keeping you sure you are using standard `inherits` -implementation in node.js environment, it allows bundlers such as -[browserify](https://github.com/substack/node-browserify) to not -include full `util` package to your client code if all you need is -just `inherits` function. It worth, because browser shim for `util` -package is large and `inherits` is often the single function you need -from it. - -It's recommended to use this package instead of -`require('util').inherits` for any code that has chances to be used -not only in node.js but in browser too. - -## usage - -```js -var inherits = require('inherits'); -// then use exactly as the standard one -``` - -## note on version ~1.0 - -Version ~1.0 had completely different motivation and is not compatible -neither with 2.0 nor with standard node.js `inherits`. - -If you are using version ~1.0 and planning to switch to ~2.0, be -careful: - -* new version uses `super_` instead of `super` for referencing - superclass -* new version overwrites current prototype while old one preserves any - existing fields on it diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/inherits.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/inherits.js deleted file mode 100644 index 29f5e24f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/inherits.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('util').inherits diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/inherits_browser.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/inherits_browser.js deleted file mode 100644 index c1e78a75..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/inherits_browser.js +++ /dev/null @@ -1,23 +0,0 @@ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/package.json deleted file mode 100644 index 8b3b563d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "inherits", - "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "version": "2.0.1", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented", - "inherits", - "browser", - "browserify" - ], - "main": "./inherits.js", - "browser": "./inherits_browser.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/inherits" - }, - "license": "ISC", - "scripts": { - "test": "node test" - }, - "readme": "Browser-friendly inheritance fully compatible with standard node.js\n[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).\n\nThis package exports standard `inherits` from node.js `util` module in\nnode environment, but also provides alternative browser-friendly\nimplementation through [browser\nfield](https://gist.github.com/shtylman/4339901). Alternative\nimplementation is a literal copy of standard one located in standalone\nmodule to avoid requiring of `util`. It also has a shim for old\nbrowsers with no `Object.create` support.\n\nWhile keeping you sure you are using standard `inherits`\nimplementation in node.js environment, it allows bundlers such as\n[browserify](https://github.com/substack/node-browserify) to not\ninclude full `util` package to your client code if all you need is\njust `inherits` function. It worth, because browser shim for `util`\npackage is large and `inherits` is often the single function you need\nfrom it.\n\nIt's recommended to use this package instead of\n`require('util').inherits` for any code that has chances to be used\nnot only in node.js but in browser too.\n\n## usage\n\n```js\nvar inherits = require('inherits');\n// then use exactly as the standard one\n```\n\n## note on version ~1.0\n\nVersion ~1.0 had completely different motivation and is not compatible\nneither with 2.0 nor with standard node.js `inherits`.\n\nIf you are using version ~1.0 and planning to switch to ~2.0, be\ncareful:\n\n* new version uses `super_` instead of `super` for referencing\n superclass\n* new version overwrites current prototype while old one preserves any\n existing fields on it\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/inherits/issues" - }, - "homepage": "https://github.com/isaacs/inherits", - "_id": "inherits@2.0.1", - "dist": { - "shasum": "b084742f5bd8d0e2e285cb3a8957f7e733389ef2" - }, - "_from": "inherits@2", - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/test.js deleted file mode 100644 index fc53012d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/test.js +++ /dev/null @@ -1,25 +0,0 @@ -var inherits = require('./inherits.js') -var assert = require('assert') - -function test(c) { - assert(c.constructor === Child) - assert(c.constructor.super_ === Parent) - assert(Object.getPrototypeOf(c) === Child.prototype) - assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) - assert(c instanceof Child) - assert(c instanceof Parent) -} - -function Child() { - Parent.call(this) - test(this) -} - -function Parent() {} - -inherits(Child, Parent) - -var c = new Child -test(c) - -console.log('ok') diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/package.json deleted file mode 100644 index fd335461..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "name": "tar", - "description": "tar for node", - "version": "0.1.19", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-tar.git" - }, - "main": "tar.js", - "scripts": { - "test": "tap test/*.js" - }, - "dependencies": { - "inherits": "2", - "block-stream": "*", - "fstream": "~0.1.8" - }, - "devDependencies": { - "tap": "0.x", - "rimraf": "1.x" - }, - "license": "BSD", - "readme": "# node-tar\n\nTar for Node.js.\n\n[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/)\n\n## API\n\nSee `examples/` for usage examples.\n\n### var tar = require('tar')\n\nReturns an object with `.Pack`, `.Extract` and `.Parse` methods.\n\n### tar.Pack([properties])\n\nReturns a through stream. Use\n[fstream](https://npmjs.org/package/fstream) to write files into the\npack stream and you will receive tar archive data from the pack\nstream.\n\nThe optional `properties` object are used to set properties in the tar\n'Global Extended Header'.\n\n### tar.Extract([options])\n\nReturns a through stream. Write tar data to the stream and the files\nin the tarball will be extracted onto the filesystem.\n\n`options` can be:\n\n```js\n{\n path: '/path/to/extract/tar/into',\n strip: 0, // how many path segments to strip from the root when extracting\n}\n```\n\n`options` also get passed to the `fstream.Writer` instance that `tar`\nuses internally.\n\n### tar.Parse()\n\nReturns a writable stream. Write tar data to it and it will emit\n`entry` events for each entry parsed from the tarball. This is used by\n`tar.Extract`.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/node-tar/issues" - }, - "homepage": "https://github.com/isaacs/node-tar", - "_id": "tar@0.1.19", - "dist": { - "shasum": "bd31a1030d51bfbbbf4b3e174603500389a1250d" - }, - "_from": "tar@~0.1.18", - "_resolved": "https://registry.npmjs.org/tar/-/tar-0.1.19.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/tar.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/tar.js deleted file mode 100644 index a81298b9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/tar.js +++ /dev/null @@ -1,173 +0,0 @@ -// field paths that every tar file must have. -// header is padded to 512 bytes. -var f = 0 - , fields = {} - , path = fields.path = f++ - , mode = fields.mode = f++ - , uid = fields.uid = f++ - , gid = fields.gid = f++ - , size = fields.size = f++ - , mtime = fields.mtime = f++ - , cksum = fields.cksum = f++ - , type = fields.type = f++ - , linkpath = fields.linkpath = f++ - , headerSize = 512 - , blockSize = 512 - , fieldSize = [] - -fieldSize[path] = 100 -fieldSize[mode] = 8 -fieldSize[uid] = 8 -fieldSize[gid] = 8 -fieldSize[size] = 12 -fieldSize[mtime] = 12 -fieldSize[cksum] = 8 -fieldSize[type] = 1 -fieldSize[linkpath] = 100 - -// "ustar\0" may introduce another bunch of headers. -// these are optional, and will be nulled out if not present. - -var ustar = fields.ustar = f++ - , ustarver = fields.ustarver = f++ - , uname = fields.uname = f++ - , gname = fields.gname = f++ - , devmaj = fields.devmaj = f++ - , devmin = fields.devmin = f++ - , prefix = fields.prefix = f++ - , fill = fields.fill = f++ - -// terminate fields. -fields[f] = null - -fieldSize[ustar] = 6 -fieldSize[ustarver] = 2 -fieldSize[uname] = 32 -fieldSize[gname] = 32 -fieldSize[devmaj] = 8 -fieldSize[devmin] = 8 -fieldSize[prefix] = 155 -fieldSize[fill] = 12 - -// nb: prefix field may in fact be 130 bytes of prefix, -// a null char, 12 bytes for atime, 12 bytes for ctime. -// -// To recognize this format: -// 1. prefix[130] === ' ' or '\0' -// 2. atime and ctime are octal numeric values -// 3. atime and ctime have ' ' in their last byte - -var fieldEnds = {} - , fieldOffs = {} - , fe = 0 -for (var i = 0; i < f; i ++) { - fieldOffs[i] = fe - fieldEnds[i] = (fe += fieldSize[i]) -} - -// build a translation table of field paths. -Object.keys(fields).forEach(function (f) { - if (fields[f] !== null) fields[fields[f]] = f -}) - -// different values of the 'type' field -// paths match the values of Stats.isX() functions, where appropriate -var types = - { 0: "File" - , "\0": "OldFile" // like 0 - , "": "OldFile" - , 1: "Link" - , 2: "SymbolicLink" - , 3: "CharacterDevice" - , 4: "BlockDevice" - , 5: "Directory" - , 6: "FIFO" - , 7: "ContiguousFile" // like 0 - // posix headers - , g: "GlobalExtendedHeader" // k=v for the rest of the archive - , x: "ExtendedHeader" // k=v for the next file - // vendor-specific stuff - , A: "SolarisACL" // skip - , D: "GNUDumpDir" // like 5, but with data, which should be skipped - , I: "Inode" // metadata only, skip - , K: "NextFileHasLongLinkpath" // data = link path of next file - , L: "NextFileHasLongPath" // data = path of next file - , M: "ContinuationFile" // skip - , N: "OldGnuLongPath" // like L - , S: "SparseFile" // skip - , V: "TapeVolumeHeader" // skip - , X: "OldExtendedHeader" // like x - } - -Object.keys(types).forEach(function (t) { - types[types[t]] = types[types[t]] || t -}) - -// values for the mode field -var modes = - { suid: 04000 // set uid on extraction - , sgid: 02000 // set gid on extraction - , svtx: 01000 // set restricted deletion flag on dirs on extraction - , uread: 0400 - , uwrite: 0200 - , uexec: 0100 - , gread: 040 - , gwrite: 020 - , gexec: 010 - , oread: 4 - , owrite: 2 - , oexec: 1 - , all: 07777 - } - -var numeric = - { mode: true - , uid: true - , gid: true - , size: true - , mtime: true - , devmaj: true - , devmin: true - , cksum: true - , atime: true - , ctime: true - , dev: true - , ino: true - , nlink: true - } - -Object.keys(modes).forEach(function (t) { - modes[modes[t]] = modes[modes[t]] || t -}) - -var knownExtended = - { atime: true - , charset: true - , comment: true - , ctime: true - , gid: true - , gname: true - , linkpath: true - , mtime: true - , path: true - , realtime: true - , security: true - , size: true - , uid: true - , uname: true } - - -exports.fields = fields -exports.fieldSize = fieldSize -exports.fieldOffs = fieldOffs -exports.fieldEnds = fieldEnds -exports.types = types -exports.modes = modes -exports.numeric = numeric -exports.headerSize = headerSize -exports.blockSize = blockSize -exports.knownExtended = knownExtended - -exports.Pack = require("./lib/pack.js") -exports.Parse = require("./lib/parse.js") -exports.Extract = require("./lib/extract.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/00-setup-fixtures.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/00-setup-fixtures.js deleted file mode 100644 index 1524ff7a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/00-setup-fixtures.js +++ /dev/null @@ -1,53 +0,0 @@ -// the fixtures have some weird stuff that is painful -// to include directly in the repo for various reasons. -// -// So, unpack the fixtures with the system tar first. -// -// This means, of course, that it'll only work if you -// already have a tar implementation, and some of them -// will not properly unpack the fixtures anyway. -// -// But, since usually those tests will fail on Windows -// and other systems with less capable filesystems anyway, -// at least this way we don't cause inconveniences by -// merely cloning the repo or installing the package. - -var tap = require("tap") -, child_process = require("child_process") -, rimraf = require("rimraf") -, test = tap.test -, path = require("path") - -test("clean fixtures", function (t) { - rimraf(path.resolve(__dirname, "fixtures"), function (er) { - t.ifError(er, "rimraf ./fixtures/") - t.end() - }) -}) - -test("clean tmp", function (t) { - rimraf(path.resolve(__dirname, "tmp"), function (er) { - t.ifError(er, "rimraf ./tmp/") - t.end() - }) -}) - -test("extract fixtures", function (t) { - var c = child_process.spawn("tar" - ,["xzvf", "fixtures.tgz"] - ,{ cwd: __dirname }) - - c.stdout.on("data", errwrite) - c.stderr.on("data", errwrite) - function errwrite (chunk) { - process.stderr.write(chunk) - } - - c.on("exit", function (code) { - t.equal(code, 0, "extract fixtures should exit with 0") - if (code) { - t.comment("Note, all tests from here on out will fail because of this.") - } - t.end() - }) -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/extract.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/extract.js deleted file mode 100644 index fff48181..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/extract.js +++ /dev/null @@ -1,358 +0,0 @@ -var tap = require("tap") - , tar = require("../tar.js") - , fs = require("fs") - , path = require("path") - , file = path.resolve(__dirname, "fixtures/c.tar") - , target = path.resolve(__dirname, "tmp/extract-test") - , index = 0 - , fstream = require("fstream") - - , ee = 0 - , expectEntries = -[ { path: 'c.txt', - mode: '644', - type: '0', - depth: undefined, - size: 513, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'cc.txt', - mode: '644', - type: '0', - depth: undefined, - size: 513, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '0', - depth: undefined, - size: 100, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'Ω.txt', - mode: '644', - type: '0', - depth: undefined, - size: 2, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'Ω.txt', - mode: '644', - type: '0', - depth: undefined, - size: 2, - linkpath: '', - nlink: 1, - dev: 234881026, - ino: 51693379 }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '0', - depth: undefined, - size: 200, - linkpath: '', - nlink: 1, - dev: 234881026, - ino: 51681874 }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '0', - depth: undefined, - size: 201, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', - mode: '777', - type: '2', - depth: undefined, - size: 0, - linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: '200-hard', - mode: '644', - type: '0', - depth: undefined, - size: 200, - linkpath: '', - nlink: 2, - dev: 234881026, - ino: 51681874 }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '1', - depth: undefined, - size: 0, - linkpath: path.resolve(target, '200-hard'), - nlink: 2, - dev: 234881026, - ino: 51681874 } ] - - , ef = 0 - , expectFiles = -[ { path: '', - mode: '40755', - type: 'Directory', - depth: 0, - linkpath: undefined }, - { path: '/200-hard', - mode: '100644', - type: 'File', - depth: 1, - size: 200, - linkpath: undefined, - nlink: 2 }, - { path: '/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '100644', - type: 'Link', - depth: 1, - size: 200, - linkpath: path.join(target, '200-hard'), - nlink: 2 }, - { path: '/200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', - mode: '120777', - type: 'SymbolicLink', - depth: 1, - size: 200, - linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - nlink: 1 }, - { path: '/c.txt', - mode: '100644', - type: 'File', - depth: 1, - size: 513, - linkpath: undefined, - nlink: 1 }, - { path: '/cc.txt', - mode: '100644', - type: 'File', - depth: 1, - size: 513, - linkpath: undefined, - nlink: 1 }, - { path: '/r', - mode: '40755', - type: 'Directory', - depth: 1, - linkpath: undefined }, - { path: '/r/e', - mode: '40755', - type: 'Directory', - depth: 2, - linkpath: undefined }, - { path: '/r/e/a', - mode: '40755', - type: 'Directory', - depth: 3, - linkpath: undefined }, - { path: '/r/e/a/l', - mode: '40755', - type: 'Directory', - depth: 4, - linkpath: undefined }, - { path: '/r/e/a/l/l', - mode: '40755', - type: 'Directory', - depth: 5, - linkpath: undefined }, - { path: '/r/e/a/l/l/y', - mode: '40755', - type: 'Directory', - depth: 6, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-', - mode: '40755', - type: 'Directory', - depth: 7, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d', - mode: '40755', - type: 'Directory', - depth: 8, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e', - mode: '40755', - type: 'Directory', - depth: 9, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e', - mode: '40755', - type: 'Directory', - depth: 10, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p', - mode: '40755', - type: 'Directory', - depth: 11, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-', - mode: '40755', - type: 'Directory', - depth: 12, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f', - mode: '40755', - type: 'Directory', - depth: 13, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o', - mode: '40755', - type: 'Directory', - depth: 14, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l', - mode: '40755', - type: 'Directory', - depth: 15, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d', - mode: '40755', - type: 'Directory', - depth: 16, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e', - mode: '40755', - type: 'Directory', - depth: 17, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r', - mode: '40755', - type: 'Directory', - depth: 18, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-', - mode: '40755', - type: 'Directory', - depth: 19, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p', - mode: '40755', - type: 'Directory', - depth: 20, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a', - mode: '40755', - type: 'Directory', - depth: 21, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t', - mode: '40755', - type: 'Directory', - depth: 22, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h', - mode: '40755', - type: 'Directory', - depth: 23, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '100644', - type: 'File', - depth: 24, - size: 100, - linkpath: undefined, - nlink: 1 }, - { path: '/Ω.txt', - mode: '100644', - type: 'File', - depth: 1, - size: 2, - linkpath: undefined, - nlink: 1 } ] - - - -// The extract class basically just pipes the input -// to a Reader, and then to a fstream.DirWriter - -// So, this is as much a test of fstream.Reader and fstream.Writer -// as it is of tar.Extract, but it sort of makes sense. - -tap.test("extract test", function (t) { - var extract = tar.Extract(target) - var inp = fs.createReadStream(file) - - // give it a weird buffer size to try to break in odd places - inp.bufferSize = 1234 - - inp.pipe(extract) - - extract.on("end", function () { - t.equal(ee, expectEntries.length, "should see "+ee+" entries") - - // should get no more entries after end - extract.removeAllListeners("entry") - extract.on("entry", function (e) { - t.fail("Should not get entries after end!") - }) - - next() - }) - - extract.on("entry", function (entry) { - var found = - { path: entry.path - , mode: entry.props.mode.toString(8) - , type: entry.props.type - , depth: entry.props.depth - , size: entry.props.size - , linkpath: entry.props.linkpath - , nlink: entry.props.nlink - , dev: entry.props.dev - , ino: entry.props.ino - } - - var wanted = expectEntries[ee ++] - - t.equivalent(found, wanted, "tar entry " + ee + " " + wanted.path) - }) - - function next () { - var r = fstream.Reader({ path: target - , type: "Directory" - // this is just to encourage consistency - , sort: "alpha" }) - - r.on("ready", function () { - foundEntry(r) - }) - - r.on("end", finish) - - function foundEntry (entry) { - var p = entry.path.substr(target.length) - var found = - { path: p - , mode: entry.props.mode.toString(8) - , type: entry.props.type - , depth: entry.props.depth - , size: entry.props.size - , linkpath: entry.props.linkpath - , nlink: entry.props.nlink - } - - var wanted = expectFiles[ef ++] - - t.has(found, wanted, "unpacked file " + ef + " " + wanted.path) - - entry.on("entry", foundEntry) - } - - function finish () { - t.equal(ef, expectFiles.length, "should have "+ef+" items") - t.end() - } - } -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/fixtures.tgz b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/fixtures.tgz deleted file mode 100644 index 4501bcf2..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/fixtures.tgz and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/header.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/header.js deleted file mode 100644 index 8ea6f795..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/header.js +++ /dev/null @@ -1,183 +0,0 @@ -var tap = require("tap") -var TarHeader = require("../lib/header.js") -var tar = require("../tar.js") -var fs = require("fs") - - -var headers = - { "a.txt file header": - [ "612e747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303430312031313635313336303333332030313234353100203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'a.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 257 - , mtime: 1319493851 - , cksum: 5417 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - - , "omega pax": // the extended header from omega tar. - [ "5061784865616465722fcea92e74787400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303137302031313534333731303631312030313530353100207800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'PaxHeader/Ω.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 120 - , mtime: 1301254537 - , cksum: 6697 - , type: 'x' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } ] - - , "omega file header": - [ "cea92e7478740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303030322031313534333731303631312030313330373200203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'Ω.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 2 - , mtime: 1301254537 - , cksum: 5690 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } ] - - , "foo.js file header": - [ "666f6f2e6a730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303030342031313534333637303734312030313236313700203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'foo.js' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 4 - , mtime: 1301246433 - , cksum: 5519 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - - , "b.txt file header": - [ "622e747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030313030302031313635313336303637372030313234363100203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'b.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 512 - , mtime: 1319494079 - , cksum: 5425 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - - , "deep nested file": - [ "636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363633030303634342000303537373631200030303030323420003030303030303030313434203131363532313531353333203034333331340020300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000075737461720030306973616163730000000000000000000000000000000000000000000000000000737461666600000000000000000000000000000000000000000000000000000030303030303020003030303030302000722f652f612f6c2f6c2f792f2d2f642f652f652f702f2d2f662f6f2f6c2f642f652f722f2d2f702f612f742f680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true, - path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 100 - , mtime: 1319687003 - , cksum: 18124 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - } - -tap.test("parsing", function (t) { - Object.keys(headers).forEach(function (name) { - var h = headers[name] - , header = new Buffer(h[0], "hex") - , expect = h[1] - , parsed = new TarHeader(header) - - // console.error(parsed) - t.has(parsed, expect, "parse " + name) - }) - t.end() -}) - -tap.test("encoding", function (t) { - Object.keys(headers).forEach(function (name) { - var h = headers[name] - , expect = new Buffer(h[0], "hex") - , encoded = TarHeader.encode(h[1]) - - // might have slightly different bytes, since the standard - // isn't very strict, but should have the same semantics - // checkSum will be different, but cksumValid will be true - - var th = new TarHeader(encoded) - delete h[1].block - delete h[1].needExtended - delete h[1].cksum - t.has(th, h[1], "fields "+name) - }) - t.end() -}) - -// test these manually. they're a bit rare to find in the wild -tap.test("parseNumeric tests", function (t) { - var parseNumeric = TarHeader.parseNumeric - , numbers = - { "303737373737373700": 2097151 - , "30373737373737373737373700": 8589934591 - , "303030303036343400": 420 - , "800000ffffffffffff": 281474976710655 - , "ffffff000000000001": -281474976710654 - , "ffffff000000000000": -281474976710655 - , "800000000000200000": 2097152 - , "8000000000001544c5": 1393861 - , "ffffffffffff1544c5": -15383354 } - Object.keys(numbers).forEach(function (n) { - var b = new Buffer(n, "hex") - t.equal(parseNumeric(b), numbers[n], n + " === " + numbers[n]) - }) - t.end() -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/pack-no-proprietary.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/pack-no-proprietary.js deleted file mode 100644 index 5bf0e540..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/pack-no-proprietary.js +++ /dev/null @@ -1,854 +0,0 @@ -// This is exactly like test/pack.js, except that it's excluding -// any proprietary headers. -// -// This loses some information about the filesystem, but creates -// tarballs that are supported by more versions of tar, especially -// old non-spec-compliant copies of gnutar. - -// the symlink file is excluded from git, because it makes -// windows freak the hell out. -var fs = require("fs") - , path = require("path") - , symlink = path.resolve(__dirname, "fixtures/symlink") -try { fs.unlinkSync(symlink) } catch (e) {} -fs.symlinkSync("./hardlink-1", symlink) -process.on("exit", function () { - fs.unlinkSync(symlink) -}) - -var tap = require("tap") - , tar = require("../tar.js") - , pkg = require("../package.json") - , Pack = tar.Pack - , fstream = require("fstream") - , Reader = fstream.Reader - , Writer = fstream.Writer - , input = path.resolve(__dirname, "fixtures/") - , target = path.resolve(__dirname, "tmp/pack.tar") - , uid = process.getuid ? process.getuid() : 0 - , gid = process.getgid ? process.getgid() : 0 - - , entries = - - // the global header and root fixtures/ dir are going to get - // a different date each time, so omit that bit. - // Also, dev/ino values differ across machines, so that's not - // included. - [ [ 'entry', - { path: 'fixtures/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/200cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - uid: uid, - gid: gid, - size: 200 } ] - - , [ 'entry', - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 200, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/a.txt', - mode: 420, - uid: uid, - gid: gid, - size: 257, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/b.txt', - mode: 420, - uid: uid, - gid: gid, - size: 512, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/c.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/cc.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/foo.js', - mode: 420, - uid: uid, - gid: gid, - size: 4, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-1', - mode: 420, - uid: uid, - gid: gid, - size: 200, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-2', - mode: 420, - uid: uid, - gid: gid, - size: 0, - type: '1', - linkpath: 'fixtures/hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/star.4.html', - mode: 420, - uid: uid, - gid: gid, - size: 54081, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/packtest/Ω.txt', - uid: uid, - gid: gid, - size: 2 } ] - - , [ 'entry', - { path: 'fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 100, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/symlink', - uid: uid, - gid: gid, - size: 0, - type: '2', - linkpath: 'hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: "fixtures/Ω.txt" - , uid: uid - , gid: gid - , size: 2 } ] - - , [ 'entry', - { path: 'fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - ] - - -// first, make sure that the hardlinks are actually hardlinks, or this -// won't work. Git has a way of replacing them with a copy. -var hard1 = path.resolve(__dirname, "fixtures/hardlink-1") - , hard2 = path.resolve(__dirname, "fixtures/hardlink-2") - , fs = require("fs") - -try { fs.unlinkSync(hard2) } catch (e) {} -fs.linkSync(hard1, hard2) - -tap.test("with global header", { timeout: 10000 }, function (t) { - runTest(t, true) -}) - -tap.test("without global header", { timeout: 10000 }, function (t) { - runTest(t, false) -}) - -function alphasort (a, b) { - return a === b ? 0 - : a.toLowerCase() > b.toLowerCase() ? 1 - : a.toLowerCase() < b.toLowerCase() ? -1 - : a > b ? 1 - : -1 -} - - -function runTest (t, doGH) { - var reader = Reader({ path: input - , filter: function () { - return !this.path.match(/\.(tar|hex)$/) - } - , sort: alphasort - }) - - var props = doGH ? pkg : {} - props.noProprietary = true - var pack = Pack(props) - var writer = Writer(target) - - // global header should be skipped regardless, since it has no content. - var entry = 0 - - t.ok(reader, "reader ok") - t.ok(pack, "pack ok") - t.ok(writer, "writer ok") - - pack.pipe(writer) - - var parse = tar.Parse() - t.ok(parse, "parser should be ok") - - pack.on("data", function (c) { - // console.error("PACK DATA") - if (c.length !== 512) { - // this one is too noisy, only assert if it'll be relevant - t.equal(c.length, 512, "parser should emit data in 512byte blocks") - } - parse.write(c) - }) - - pack.on("end", function () { - // console.error("PACK END") - t.pass("parser ends") - parse.end() - }) - - pack.on("error", function (er) { - t.fail("pack error", er) - }) - - parse.on("error", function (er) { - t.fail("parse error", er) - }) - - writer.on("error", function (er) { - t.fail("writer error", er) - }) - - reader.on("error", function (er) { - t.fail("reader error", er) - }) - - parse.on("*", function (ev, e) { - var wanted = entries[entry++] - if (!wanted) { - t.fail("unexpected event: "+ev) - return - } - t.equal(ev, wanted[0], "event type should be "+wanted[0]) - - if (ev !== wanted[0] || e.path !== wanted[1].path) { - console.error(wanted) - console.error([ev, e.props]) - e.on("end", function () { - console.error(e.fields) - throw "break" - }) - } - - t.has(e.props, wanted[1], "properties "+wanted[1].path) - if (wanted[2]) { - e.on("end", function () { - if (!e.fields) { - t.ok(e.fields, "should get fields") - } else { - t.has(e.fields, wanted[2], "should get expected fields") - } - }) - } - }) - - reader.pipe(pack) - - writer.on("close", function () { - t.equal(entry, entries.length, "should get all expected entries") - t.pass("it finished") - t.end() - }) - -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/pack.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/pack.js deleted file mode 100644 index 0f509945..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/pack.js +++ /dev/null @@ -1,897 +0,0 @@ - -// the symlink file is excluded from git, because it makes -// windows freak the hell out. -var fs = require("fs") - , path = require("path") - , symlink = path.resolve(__dirname, "fixtures/symlink") -try { fs.unlinkSync(symlink) } catch (e) {} -fs.symlinkSync("./hardlink-1", symlink) -process.on("exit", function () { - fs.unlinkSync(symlink) -}) - - -var tap = require("tap") - , tar = require("../tar.js") - , pkg = require("../package.json") - , Pack = tar.Pack - , fstream = require("fstream") - , Reader = fstream.Reader - , Writer = fstream.Writer - , input = path.resolve(__dirname, "fixtures/") - , target = path.resolve(__dirname, "tmp/pack.tar") - , uid = process.getuid ? process.getuid() : 0 - , gid = process.getgid ? process.getgid() : 0 - - , entries = - - // the global header and root fixtures/ dir are going to get - // a different date each time, so omit that bit. - // Also, dev/ino values differ across machines, so that's not - // included. - [ [ 'globalExtendedHeader', - { path: 'PaxHeader/', - mode: 438, - uid: 0, - gid: 0, - type: 'g', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { "NODETAR.author": pkg.author, - "NODETAR.name": pkg.name, - "NODETAR.description": pkg.description, - "NODETAR.version": pkg.version, - "NODETAR.repository.type": pkg.repository.type, - "NODETAR.repository.url": pkg.repository.url, - "NODETAR.main": pkg.main, - "NODETAR.scripts.test": pkg.scripts.test } ] - - , [ 'entry', - { path: 'fixtures/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/200cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - 'NODETAR.depth': '1', - 'NODETAR.type': 'File', - nlink: 1, - uid: uid, - gid: gid, - size: 200, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 200, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '', - 'NODETAR.depth': '1', - 'NODETAR.type': 'File', - nlink: 1, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/a.txt', - mode: 420, - uid: uid, - gid: gid, - size: 257, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/b.txt', - mode: 420, - uid: uid, - gid: gid, - size: 512, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/c.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/cc.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/foo.js', - mode: 420, - uid: uid, - gid: gid, - size: 4, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-1', - mode: 420, - uid: uid, - gid: gid, - size: 200, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-2', - mode: 420, - uid: uid, - gid: gid, - size: 0, - type: '1', - linkpath: 'fixtures/hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/star.4.html', - mode: 420, - uid: uid, - gid: gid, - size: 54081, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/packtest/Ω.txt', - 'NODETAR.depth': '2', - 'NODETAR.type': 'File', - nlink: 1, - uid: uid, - gid: gid, - size: 2, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '', - 'NODETAR.depth': '2', - 'NODETAR.type': 'File', - nlink: 1, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 100, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/symlink', - uid: uid, - gid: gid, - size: 0, - type: '2', - linkpath: 'hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: "fixtures/Ω.txt" - , "NODETAR.depth": "1" - , "NODETAR.type": "File" - , nlink: 1 - , uid: uid - , gid: gid - , size: 2 - , "NODETAR.blksize": "4096" - , "NODETAR.blocks": "8" } ] - - , [ 'entry', - { path: 'fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '', - 'NODETAR.depth': '1', - 'NODETAR.type': 'File', - nlink: 1, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - ] - - -// first, make sure that the hardlinks are actually hardlinks, or this -// won't work. Git has a way of replacing them with a copy. -var hard1 = path.resolve(__dirname, "fixtures/hardlink-1") - , hard2 = path.resolve(__dirname, "fixtures/hardlink-2") - , fs = require("fs") - -try { fs.unlinkSync(hard2) } catch (e) {} -fs.linkSync(hard1, hard2) - -tap.test("with global header", { timeout: 10000 }, function (t) { - runTest(t, true) -}) - -tap.test("without global header", { timeout: 10000 }, function (t) { - runTest(t, false) -}) - -function alphasort (a, b) { - return a === b ? 0 - : a.toLowerCase() > b.toLowerCase() ? 1 - : a.toLowerCase() < b.toLowerCase() ? -1 - : a > b ? 1 - : -1 -} - - -function runTest (t, doGH) { - var reader = Reader({ path: input - , filter: function () { - return !this.path.match(/\.(tar|hex)$/) - } - , sort: alphasort - }) - - var pack = Pack(doGH ? pkg : null) - var writer = Writer(target) - - // skip the global header if we're not doing that. - var entry = doGH ? 0 : 1 - - t.ok(reader, "reader ok") - t.ok(pack, "pack ok") - t.ok(writer, "writer ok") - - pack.pipe(writer) - - var parse = tar.Parse() - t.ok(parse, "parser should be ok") - - pack.on("data", function (c) { - // console.error("PACK DATA") - if (c.length !== 512) { - // this one is too noisy, only assert if it'll be relevant - t.equal(c.length, 512, "parser should emit data in 512byte blocks") - } - parse.write(c) - }) - - pack.on("end", function () { - // console.error("PACK END") - t.pass("parser ends") - parse.end() - }) - - pack.on("error", function (er) { - t.fail("pack error", er) - }) - - parse.on("error", function (er) { - t.fail("parse error", er) - }) - - writer.on("error", function (er) { - t.fail("writer error", er) - }) - - reader.on("error", function (er) { - t.fail("reader error", er) - }) - - parse.on("*", function (ev, e) { - var wanted = entries[entry++] - if (!wanted) { - t.fail("unexpected event: "+ev) - return - } - t.equal(ev, wanted[0], "event type should be "+wanted[0]) - - // if (ev !== wanted[0] || e.path !== wanted[1].path) { - // console.error(wanted) - // console.error([ev, e.props]) - // throw "break" - // } - - t.has(e.props, wanted[1], "properties "+wanted[1].path) - if (wanted[2]) { - e.on("end", function () { - if (!e.fields) { - t.ok(e.fields, "should get fields") - } else { - t.has(e.fields, wanted[2], "should get expected fields") - } - }) - } - }) - - reader.pipe(pack) - - writer.on("close", function () { - t.equal(entry, entries.length, "should get all expected entries") - t.pass("it finished") - t.end() - }) - -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/parse.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/parse.js deleted file mode 100644 index f765a501..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/parse.js +++ /dev/null @@ -1,359 +0,0 @@ -var tap = require("tap") - , tar = require("../tar.js") - , fs = require("fs") - , path = require("path") - , file = path.resolve(__dirname, "fixtures/c.tar") - , index = 0 - - , expect = -[ [ 'entry', - { path: 'c.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 513, - mtime: new Date('Wed, 26 Oct 2011 01:10:58 GMT'), - cksum: 5422, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'entry', - { path: 'cc.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 513, - mtime: new Date('Wed, 26 Oct 2011 01:11:02 GMT'), - cksum: 5525, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'entry', - { path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 100, - mtime: new Date('Thu, 27 Oct 2011 03:43:23 GMT'), - cksum: 18124, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'entry', - { path: 'Ω.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 2, - mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - cksum: 5695, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/Ω.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 120, - mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - cksum: 6702, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'Ω.txt', - ctime: 1319737909, - atime: 1319739061, - dev: 234881026, - ino: 51693379, - nlink: 1 } ], - [ 'entry', - { path: 'Ω.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 2, - mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - cksum: 5695, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - atime: new Date('Thu, 27 Oct 2011 18:11:01 GMT'), - dev: 234881026, - ino: 51693379, - nlink: 1 }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 353, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 14488, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - ctime: 1319686868, - atime: 1319741254, - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 1 } ], - [ 'entry', - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 200, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 14570, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - atime: new Date('Thu, 27 Oct 2011 18:47:34 GMT'), - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 1 }, - undefined ], - [ 'longPath', - { path: '././@LongLink', - mode: 0, - uid: 0, - gid: 0, - size: 201, - mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), - cksum: 4976, - type: 'L', - linkpath: '', - ustar: false }, - '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ], - [ 'entry', - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 1000, - gid: 1000, - size: 201, - mtime: new Date('Thu, 27 Oct 2011 22:21:50 GMT'), - cksum: 14086, - type: '0', - linkpath: '', - ustar: false }, - undefined ], - [ 'longLinkpath', - { path: '././@LongLink', - mode: 0, - uid: 0, - gid: 0, - size: 201, - mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), - cksum: 4975, - type: 'K', - linkpath: '', - ustar: false }, - '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ], - [ 'longPath', - { path: '././@LongLink', - mode: 0, - uid: 0, - gid: 0, - size: 201, - mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), - cksum: 4976, - type: 'L', - linkpath: '', - ustar: false }, - '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL' ], - [ 'entry', - { path: '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', - mode: 511, - uid: 1000, - gid: 1000, - size: 0, - mtime: new Date('Fri, 28 Oct 2011 23:05:17 GMT'), - cksum: 21603, - type: '2', - linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - ustar: false }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/200-hard', - mode: 420, - uid: 24561, - gid: 20, - size: 143, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 6533, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { ctime: 1320617144, - atime: 1320617232, - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 } ], - [ 'entry', - { path: '200-hard', - mode: 420, - uid: 24561, - gid: 20, - size: 200, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 5526, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Sun, 06 Nov 2011 22:05:44 GMT'), - atime: new Date('Sun, 06 Nov 2011 22:07:12 GMT'), - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 353, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 14488, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - ctime: 1320617144, - atime: 1320617406, - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 } ], - [ 'entry', - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 15173, - type: '1', - linkpath: '200-hard', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Sun, 06 Nov 2011 22:05:44 GMT'), - atime: new Date('Sun, 06 Nov 2011 22:10:06 GMT'), - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 }, - undefined ] ] - - -tap.test("parser test", function (t) { - var parser = tar.Parse() - - parser.on("end", function () { - t.equal(index, expect.length, "saw all expected events") - t.end() - }) - - fs.createReadStream(file) - .pipe(parser) - .on("*", function (ev, entry) { - var wanted = expect[index] - if (!wanted) { - return t.fail("Unexpected event: " + ev) - } - var result = [ev, entry.props] - entry.on("end", function () { - result.push(entry.fields || entry.body) - - t.equal(ev, wanted[0], index + " event type") - t.equivalent(entry.props, wanted[1], wanted[1].path + " entry properties") - if (wanted[2]) { - t.equivalent(result[2], wanted[2], "metadata values") - } - index ++ - }) - }) -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/zz-cleanup.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/zz-cleanup.js deleted file mode 100644 index a00ff7fa..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/zz-cleanup.js +++ /dev/null @@ -1,20 +0,0 @@ -// clean up the fixtures - -var tap = require("tap") -, rimraf = require("rimraf") -, test = tap.test -, path = require("path") - -test("clean fixtures", function (t) { - rimraf(path.resolve(__dirname, "fixtures"), function (er) { - t.ifError(er, "rimraf ./fixtures/") - t.end() - }) -}) - -test("clean tmp", function (t) { - rimraf(path.resolve(__dirname, "tmp"), function (er) { - t.ifError(er, "rimraf ./tmp/") - t.end() - }) -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/index.js deleted file mode 100644 index da99ffef..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; -var path = require('path'); -var tmpdir = require('os').tmpdir(); -var uuid = require('uuid'); - -module.exports = function (ext) { - return path.join(tmpdir, uuid.v4() + (ext || '')); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/.npmignore deleted file mode 100644 index fd4f2b06..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -.DS_Store diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/.travis.yml deleted file mode 100644 index b6d42c3e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - 0.9 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/LICENSE.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/LICENSE.md deleted file mode 100644 index f039427f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/LICENSE.md +++ /dev/null @@ -1,2 +0,0 @@ -Copyright (c) 2010-2012 Robert Kieffer -MIT License - http://opensource.org/licenses/mit-license.php diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/README.md deleted file mode 100644 index d2adba18..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/README.md +++ /dev/null @@ -1,204 +0,0 @@ -# uuid [![Build Status](https://secure.travis-ci.org/shtylman/node-uuid.png?branch=master)](http://travis-ci.org/shtylman/node-uuid) # - -[![browser support](http://ci.testling.com/shtylman/node-uuid.png)](http://ci.testling.com/shtylman/node-uuid) - -Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. - -Features: - -* Generate RFC4122 version 1 or version 4 UUIDs -* Runs in node.js and all browsers. -* Cryptographically strong random # generation on supporting platforms -* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! ) -* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html) - -## Getting Started - -Install it in your browser: - -```html -<script src="uuid.js"></script> -``` - -Or in node.js: - -``` -npm install uuid -``` - -```javascript -var uuid = require('uuid'); - -// Generate a v1 (time-based) id -uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' - -// Generate a v4 (random) id -uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1' -``` - -## API - -### uuid.v1([`options` [, `buffer` [, `offset`]]]) - -Generate and return a RFC4122 v1 (timestamp-based) UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. - * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. - * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used. - * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Notes: - -1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) - -Example: Generate string UUID with fully-specified options - -```javascript -uuid.v1({ - node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], - clockseq: 0x1234, - msecs: new Date('2011-11-01').getTime(), - nsecs: 5678 -}); // -> "710b962e-041c-11e1-9234-0123456789ab" -``` - -Example: In-place generation of two binary IDs - -```javascript -// Generate two ids in an array -var arr = new Array(32); // -> [] -uuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15] -uuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15] - -// Optionally use uuid.unparse() to get stringify the ids -uuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115' -uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115' -``` - -### uuid.v4([`options` [, `buffer` [, `offset`]]]) - -Generate and return a RFC4122 v4 UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values - * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Example: Generate string UUID with fully-specified options - -```javascript -uuid.v4({ - random: [ - 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, - 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 - ] -}); -// -> "109156be-c4fb-41ea-b1b4-efe1671c5836" -``` - -Example: Generate two IDs in a single buffer - -```javascript -var buffer = new Array(32); // (or 'new Buffer' in node.js) -uuid.v4(null, buffer, 0); -uuid.v4(null, buffer, 16); -``` - -### uuid.parse(id[, buffer[, offset]]) -### uuid.unparse(buffer[, offset]) - -Parse and unparse UUIDs - - * `id` - (String) UUID(-like) string - * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used - * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0 - -Example parsing and unparsing a UUID string - -```javascript -var bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> <Buffer 79 7f f0 43 11 eb 11 e1 80 d6 51 09 98 75 5d 10> -var string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10' -``` - -### uuid.noConflict() - -(Browsers only) Set `uuid` property back to it's previous value. - -Returns the uuid object. - -Example: - -```javascript -var myUuid = uuid.noConflict(); -myUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' -``` - -## Deprecated APIs - -Support for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version. - -### uuid([format [, buffer [, offset]]]) - -uuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary). - -### uuid.BufferClass - -The class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API. - -## Testing - -In node.js - -``` -> cd test -> node test.js -``` - -In Browser - -``` -open test/test.html -``` - -### Benchmarking - -Requires node.js - -``` -npm install uuid uuid-js -node benchmark/benchmark.js -``` - -For a more complete discussion of uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/uuid/wiki/Benchmark) - -For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance). - -## Release notes - -### 1.4.0 - -* Improved module context detection -* Removed public RNG functions - -### 1.3.2 - -* Improve tests and handling of v1() options (Issue #24) -* Expose RNG option to allow for perf testing with different generators - -### 1.3.0 - -* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! -* Support for node.js crypto API -* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/README.md deleted file mode 100644 index aaeb2ea0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# node-uuid Benchmarks - -### Results - -To see the results of our benchmarks visit https://github.com/broofa/node-uuid/wiki/Benchmark - -### Run them yourself - -node-uuid comes with some benchmarks to measure performance of generating UUIDs. These can be run using node.js. node-uuid is being benchmarked against some other uuid modules, that are available through npm namely `uuid` and `uuid-js`. - -To prepare and run the benchmark issue; - -``` -npm install uuid uuid-js -node benchmark/benchmark.js -``` - -You'll see an output like this one: - -``` -# v4 -nodeuuid.v4(): 854700 uuids/second -nodeuuid.v4('binary'): 788643 uuids/second -nodeuuid.v4('binary', buffer): 1336898 uuids/second -uuid(): 479386 uuids/second -uuid('binary'): 582072 uuids/second -uuidjs.create(4): 312304 uuids/second - -# v1 -nodeuuid.v1(): 938086 uuids/second -nodeuuid.v1('binary'): 683060 uuids/second -nodeuuid.v1('binary', buffer): 1644736 uuids/second -uuidjs.create(1): 190621 uuids/second -``` - -* The `uuid()` entries are for Nikhil Marathe's [uuid module](https://bitbucket.org/nikhilm/uuidjs) which is a wrapper around the native libuuid library. -* The `uuidjs()` entries are for Patrick Negri's [uuid-js module](https://github.com/pnegri/uuid-js) which is a pure javascript implementation based on [UUID.js](https://github.com/LiosK/UUID.js) by LiosK. - -If you want to get more reliable results you can run the benchmark multiple times and write the output into a log file: - -``` -for i in {0..9}; do node benchmark/benchmark.js >> benchmark/bench_0.4.12.log; done; -``` - -If you're interested in how performance varies between different node versions, you can issue the above command multiple times. - -You can then use the shell script `bench.sh` provided in this directory to calculate the averages over all benchmark runs and draw a nice plot: - -``` -(cd benchmark/ && ./bench.sh) -``` - -This assumes you have [gnuplot](http://www.gnuplot.info/) and [ImageMagick](http://www.imagemagick.org/) installed. You'll find a nice `bench.png` graph in the `benchmark/` directory then. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/bench.gnu b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/bench.gnu deleted file mode 100644 index a342fbbe..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/bench.gnu +++ /dev/null @@ -1,174 +0,0 @@ -#!/opt/local/bin/gnuplot -persist -# -# -# G N U P L O T -# Version 4.4 patchlevel 3 -# last modified March 2011 -# System: Darwin 10.8.0 -# -# Copyright (C) 1986-1993, 1998, 2004, 2007-2010 -# Thomas Williams, Colin Kelley and many others -# -# gnuplot home: http://www.gnuplot.info -# faq, bugs, etc: type "help seeking-assistance" -# immediate help: type "help" -# plot window: hit 'h' -set terminal postscript eps noenhanced defaultplex \ - leveldefault color colortext \ - solid linewidth 1.2 butt noclip \ - palfuncparam 2000,0.003 \ - "Helvetica" 14 -set output 'bench.eps' -unset clip points -set clip one -unset clip two -set bar 1.000000 front -set border 31 front linetype -1 linewidth 1.000 -set xdata -set ydata -set zdata -set x2data -set y2data -set timefmt x "%d/%m/%y,%H:%M" -set timefmt y "%d/%m/%y,%H:%M" -set timefmt z "%d/%m/%y,%H:%M" -set timefmt x2 "%d/%m/%y,%H:%M" -set timefmt y2 "%d/%m/%y,%H:%M" -set timefmt cb "%d/%m/%y,%H:%M" -set boxwidth -set style fill empty border -set style rectangle back fc lt -3 fillstyle solid 1.00 border lt -1 -set style circle radius graph 0.02, first 0, 0 -set dummy x,y -set format x "% g" -set format y "% g" -set format x2 "% g" -set format y2 "% g" -set format z "% g" -set format cb "% g" -set angles radians -unset grid -set key title "" -set key outside left top horizontal Right noreverse enhanced autotitles columnhead nobox -set key noinvert samplen 4 spacing 1 width 0 height 0 -set key maxcolumns 2 maxrows 0 -unset label -unset arrow -set style increment default -unset style line -set style line 1 linetype 1 linewidth 2.000 pointtype 1 pointsize default pointinterval 0 -unset style arrow -set style histogram clustered gap 2 title offset character 0, 0, 0 -unset logscale -set offsets graph 0.05, 0.15, 0, 0 -set pointsize 1.5 -set pointintervalbox 1 -set encoding default -unset polar -unset parametric -unset decimalsign -set view 60, 30, 1, 1 -set samples 100, 100 -set isosamples 10, 10 -set surface -unset contour -set clabel '%8.3g' -set mapping cartesian -set datafile separator whitespace -unset hidden3d -set cntrparam order 4 -set cntrparam linear -set cntrparam levels auto 5 -set cntrparam points 5 -set size ratio 0 1,1 -set origin 0,0 -set style data points -set style function lines -set xzeroaxis linetype -2 linewidth 1.000 -set yzeroaxis linetype -2 linewidth 1.000 -set zzeroaxis linetype -2 linewidth 1.000 -set x2zeroaxis linetype -2 linewidth 1.000 -set y2zeroaxis linetype -2 linewidth 1.000 -set ticslevel 0.5 -set mxtics default -set mytics default -set mztics default -set mx2tics default -set my2tics default -set mcbtics default -set xtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set xtics norangelimit -set xtics () -set ytics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set ytics autofreq norangelimit -set ztics border in scale 1,0.5 nomirror norotate offset character 0, 0, 0 -set ztics autofreq norangelimit -set nox2tics -set noy2tics -set cbtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set cbtics autofreq norangelimit -set title "" -set title offset character 0, 0, 0 font "" norotate -set timestamp bottom -set timestamp "" -set timestamp offset character 0, 0, 0 font "" norotate -set rrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) -set autoscale rfixmin -set autoscale rfixmax -set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] ) -set autoscale tfixmin -set autoscale tfixmax -set urange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale ufixmin -set autoscale ufixmax -set vrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale vfixmin -set autoscale vfixmax -set xlabel "" -set xlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate -set x2label "" -set x2label offset character 0, 0, 0 font "" textcolor lt -1 norotate -set xrange [ * : * ] noreverse nowriteback # (currently [-0.150000:3.15000] ) -set autoscale xfixmin -set autoscale xfixmax -set x2range [ * : * ] noreverse nowriteback # (currently [0.00000:3.00000] ) -set autoscale x2fixmin -set autoscale x2fixmax -set ylabel "" -set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set y2label "" -set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set yrange [ 0.00000 : 1.90000e+06 ] noreverse nowriteback # (currently [:] ) -set autoscale yfixmin -set autoscale yfixmax -set y2range [ * : * ] noreverse nowriteback # (currently [0.00000:1.90000e+06] ) -set autoscale y2fixmin -set autoscale y2fixmax -set zlabel "" -set zlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate -set zrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale zfixmin -set autoscale zfixmax -set cblabel "" -set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set cbrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) -set autoscale cbfixmin -set autoscale cbfixmax -set zero 1e-08 -set lmargin -1 -set bmargin -1 -set rmargin -1 -set tmargin -1 -set pm3d explicit at s -set pm3d scansautomatic -set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean -set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB -set palette rgbformulae 7, 5, 15 -set colorbox default -set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault -set loadpath -set fontpath -set fit noerrorvariables -GNUTERM = "aqua" -plot 'bench_results.txt' using 2:xticlabel(1) w lp lw 2, '' using 3:xticlabel(1) w lp lw 2, '' using 4:xticlabel(1) w lp lw 2, '' using 5:xticlabel(1) w lp lw 2, '' using 6:xticlabel(1) w lp lw 2, '' using 7:xticlabel(1) w lp lw 2, '' using 8:xticlabel(1) w lp lw 2, '' using 9:xticlabel(1) w lp lw 2 -# EOF diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/bench.sh b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/bench.sh deleted file mode 100755 index d870a0cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/bench.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# for a given node version run: -# for i in {0..9}; do node benchmark.js >> bench_0.6.2.log; done; - -PATTERNS=('nodeuuid.v1()' "nodeuuid.v1('binary'," 'nodeuuid.v4()' "nodeuuid.v4('binary'," "uuid()" "uuid('binary')" 'uuidjs.create(1)' 'uuidjs.create(4)' '140byte') -FILES=(node_uuid_v1_string node_uuid_v1_buf node_uuid_v4_string node_uuid_v4_buf libuuid_v4_string libuuid_v4_binary uuidjs_v1_string uuidjs_v4_string 140byte_es) -INDICES=(2 3 2 3 2 2 2 2 2) -VERSIONS=$( ls bench_*.log | sed -e 's/^bench_\([0-9\.]*\)\.log/\1/' | tr "\\n" " " ) -TMPJOIN="tmp_join" -OUTPUT="bench_results.txt" - -for I in ${!FILES[*]}; do - F=${FILES[$I]} - P=${PATTERNS[$I]} - INDEX=${INDICES[$I]} - echo "version $F" > $F - for V in $VERSIONS; do - (VAL=$( grep "$P" bench_$V.log | LC_ALL=en_US awk '{ sum += $'$INDEX' } END { print sum/NR }' ); echo $V $VAL) >> $F - done - if [ $I == 0 ]; then - cat $F > $TMPJOIN - else - join $TMPJOIN $F > $OUTPUT - cp $OUTPUT $TMPJOIN - fi - rm $F -done - -rm $TMPJOIN - -gnuplot bench.gnu -convert -density 200 -resize 800x560 -flatten bench.eps bench.png -rm bench.eps diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/benchmark-native.c b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/benchmark-native.c deleted file mode 100644 index dbfc75f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/benchmark-native.c +++ /dev/null @@ -1,34 +0,0 @@ -/* -Test performance of native C UUID generation - -To Compile: cc -luuid benchmark-native.c -o benchmark-native -*/ - -#include <stdio.h> -#include <unistd.h> -#include <sys/time.h> -#include <uuid/uuid.h> - -int main() { - uuid_t myid; - char buf[36+1]; - int i; - struct timeval t; - double start, finish; - - gettimeofday(&t, NULL); - start = t.tv_sec + t.tv_usec/1e6; - - int n = 2e5; - for (i = 0; i < n; i++) { - uuid_generate(myid); - uuid_unparse(myid, buf); - } - - gettimeofday(&t, NULL); - finish = t.tv_sec + t.tv_usec/1e6; - double dur = finish - start; - - printf("%d uuids/sec", (int)(n/dur)); - return 0; -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/benchmark.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/benchmark.js deleted file mode 100644 index 40e6efbe..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/benchmark.js +++ /dev/null @@ -1,84 +0,0 @@ -try { - var nodeuuid = require('../uuid'); -} catch (e) { - console.error('node-uuid require failed - skipping tests'); -} - -try { - var uuid = require('uuid'); -} catch (e) { - console.error('uuid require failed - skipping tests'); -} - -try { - var uuidjs = require('uuid-js'); -} catch (e) { - console.error('uuid-js require failed - skipping tests'); -} - -var N = 5e5; - -function rate(msg, t) { - console.log(msg + ': ' + - (N / (Date.now() - t) * 1e3 | 0) + - ' uuids/second'); -} - -console.log('# v4'); - -// node-uuid - string form -if (nodeuuid) { - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4(); - rate('nodeuuid.v4() - using node.js crypto RNG', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4({rng: nodeuuid.mathRNG}); - rate('nodeuuid.v4() - using Math.random() RNG', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary'); - rate('nodeuuid.v4(\'binary\')', t); - - var buffer = new nodeuuid.BufferClass(16); - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary', buffer); - rate('nodeuuid.v4(\'binary\', buffer)', t); -} - -// libuuid - string form -if (uuid) { - for (var i = 0, t = Date.now(); i < N; i++) uuid(); - rate('uuid()', t); - - for (var i = 0, t = Date.now(); i < N; i++) uuid('binary'); - rate('uuid(\'binary\')', t); -} - -// uuid-js - string form -if (uuidjs) { - for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(4); - rate('uuidjs.create(4)', t); -} - -// 140byte.es -for (var i = 0, t = Date.now(); i < N; i++) 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(s,r){r=Math.random()*16|0;return (s=='x'?r:r&0x3|0x8).toString(16)}); -rate('140byte.es_v4', t); - -console.log(''); -console.log('# v1'); - -// node-uuid - v1 string form -if (nodeuuid) { - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1(); - rate('nodeuuid.v1()', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary'); - rate('nodeuuid.v1(\'binary\')', t); - - var buffer = new nodeuuid.BufferClass(16); - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary', buffer); - rate('nodeuuid.v1(\'binary\', buffer)', t); -} - -// uuid-js - v1 string form -if (uuidjs) { - for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(1); - rate('uuidjs.create(1)', t); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/misc/compare.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/misc/compare.js deleted file mode 100644 index 3de34151..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/misc/compare.js +++ /dev/null @@ -1,62 +0,0 @@ -var assert = require('assert'), - nodeuuid = require('../'), - uuidjs = require('uuid-js'), - util = require('util'), - exec = require('child_process').exec, - os = require('os'); - -// On Mac Os X / macports there's only the ossp-uuid package that provides uuid -// On Linux there's uuid-runtime which provides uuidgen -var uuidCmd = os.type() === 'Darwin' ? 'uuid -1' : 'uuidgen -t'; - -function compare(ids) { - console.log(ids); - for (var i = 0; i < ids.length; i++) { - var id = ids[i].split('-'); - id = [id[2], id[1], id[0]].join(''); - ids[i] = id; - } - var sorted = ([].concat(ids)).sort(); - - if (sorted.toString() !== ids.toString()) { - console.log('Warning: sorted !== ids'); - } else { - console.log('everything in order!'); - } -} - -// Test time order of v1 uuids -var ids = []; -while (ids.length < 10e3) ids.push(nodeuuid.v1()); - -var max = 10; -console.log('node-uuid:'); -ids = []; -for (var i = 0; i < max; i++) ids.push(nodeuuid.v1()); -compare(ids); - -console.log(''); -console.log('uuidjs:'); -ids = []; -for (var i = 0; i < max; i++) ids.push(uuidjs.create(1).toString()); -compare(ids); - -console.log(''); -console.log('libuuid:'); -ids = []; -var count = 0; -var last = function() { - compare(ids); -} -var cb = function(err, stdout, stderr) { - ids.push(stdout.substring(0, stdout.length-1)); - count++; - if (count < max) { - return next(); - } - last(); -}; -var next = function() { - exec(uuidCmd, cb); -}; -next(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/misc/perf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/misc/perf.js deleted file mode 100644 index bdc9eb46..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/misc/perf.js +++ /dev/null @@ -1,102 +0,0 @@ -var assert = require('assert'); - -var uuid = require('../'); - -var log = console.log; - -var generators = { - v1: uuid.v1, - v4: uuid.v4 -}; - -var UUID_FORMAT = { - v1: /[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i, - v4: /[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i -}; - -var N = 1e4; - -// Get %'age an actual value differs from the ideal value -function divergence(actual, ideal) { - return Math.round(100*100*(actual - ideal)/ideal)/100; -} - -function rate(msg, t) { - log(msg + ': ' + (N / (Date.now() - t) * 1e3 | 0) + ' uuids\/second'); -} - -for (var version in generators) { - var counts = {}, max = 0; - var generator = generators[version]; - var format = UUID_FORMAT[version]; - - log('\nSanity check ' + N + ' ' + version + ' uuids'); - for (var i = 0, ok = 0; i < N; i++) { - id = generator(); - if (!format.test(id)) { - throw Error(id + ' is not a valid UUID string'); - } - - if (id != uuid.unparse(uuid.parse(id))) { - assert(fail, id + ' is not a valid id'); - } - - // Count digits for our randomness check - if (version == 'v4') { - var digits = id.replace(/-/g, '').split(''); - for (var j = digits.length-1; j >= 0; j--) { - var c = digits[j]; - max = Math.max(max, counts[c] = (counts[c] || 0) + 1); - } - } - } - - // Check randomness for v4 UUIDs - if (version == 'v4') { - // Limit that we get worried about randomness. (Purely empirical choice, this!) - var limit = 2*100*Math.sqrt(1/N); - - log('\nChecking v4 randomness. Distribution of Hex Digits (% deviation from ideal)'); - - for (var i = 0; i < 16; i++) { - var c = i.toString(16); - var bar = '', n = counts[c], p = Math.round(n/max*100|0); - - // 1-3,5-8, and D-F: 1:16 odds over 30 digits - var ideal = N*30/16; - if (i == 4) { - // 4: 1:1 odds on 1 digit, plus 1:16 odds on 30 digits - ideal = N*(1 + 30/16); - } else if (i >= 8 && i <= 11) { - // 8-B: 1:4 odds on 1 digit, plus 1:16 odds on 30 digits - ideal = N*(1/4 + 30/16); - } else { - // Otherwise: 1:16 odds on 30 digits - ideal = N*30/16; - } - var d = divergence(n, ideal); - - // Draw bar using UTF squares (just for grins) - var s = n/max*50 | 0; - while (s--) bar += '='; - - assert(Math.abs(d) < limit, c + ' |' + bar + '| ' + counts[c] + ' (' + d + '% < ' + limit + '%)'); - } - } -} - -// Perf tests -for (var version in generators) { - log('\nPerformance testing ' + version + ' UUIDs'); - var generator = generators[version]; - var buf = new uuid.BufferClass(16); - - for (var i = 0, t = Date.now(); i < N; i++) generator(); - rate('uuid.' + version + '()', t); - - for (var i = 0, t = Date.now(); i < N; i++) generator('binary'); - rate('uuid.' + version + '(\'binary\')', t); - - for (var i = 0, t = Date.now(); i < N; i++) generator('binary', buf); - rate('uuid.' + version + '(\'binary\', buffer)', t); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/package.json deleted file mode 100644 index d9f8435b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "uuid", - "version": "1.4.1", - "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", - "keywords": [ - "uuid", - "guid", - "rfc4122" - ], - "author": { - "name": "Robert Kieffer", - "email": "robert@broofa.com" - }, - "contributors": [ - { - "name": "Christoph Tavan", - "email": "dev@tavan.de" - } - ], - "main": "./uuid.js", - "devDependencies": { - "mocha": "1.8.0" - }, - "scripts": { - "test": "mocha test/test.js" - }, - "browser": { - "./rng.js": "./rng-browser.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/shtylman/node-uuid.git" - }, - "testling": { - "browsers": [ - "ie6..latest", - "firefox/3.6..latest", - "chrome/22..latest", - "safari/5.1..latest" - ], - "harness": "mocha-tdd", - "files": "test/*.js" - }, - "readme": "# uuid [![Build Status](https://secure.travis-ci.org/shtylman/node-uuid.png?branch=master)](http://travis-ci.org/shtylman/node-uuid) #\n\n[![browser support](http://ci.testling.com/shtylman/node-uuid.png)](http://ci.testling.com/shtylman/node-uuid)\n\nSimple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.\n\nFeatures:\n\n* Generate RFC4122 version 1 or version 4 UUIDs\n* Runs in node.js and all browsers.\n* Cryptographically strong random # generation on supporting platforms\n* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! )\n* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html)\n\n## Getting Started\n\nInstall it in your browser:\n\n```html\n<script src=\"uuid.js\"></script>\n```\n\nOr in node.js:\n\n```\nnpm install uuid\n```\n\n```javascript\nvar uuid = require('uuid');\n\n// Generate a v1 (time-based) id\nuuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n\n// Generate a v4 (random) id\nuuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'\n```\n\n## API\n\n### uuid.v1([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v1 (timestamp-based) UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1.\n * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.\n * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used.\n * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nNotes:\n\n1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v1({\n node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],\n clockseq: 0x1234,\n msecs: new Date('2011-11-01').getTime(),\n nsecs: 5678\n}); // -> \"710b962e-041c-11e1-9234-0123456789ab\"\n```\n\nExample: In-place generation of two binary IDs\n\n```javascript\n// Generate two ids in an array\nvar arr = new Array(32); // -> []\nuuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\nuuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\n\n// Optionally use uuid.unparse() to get stringify the ids\nuuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115'\nuuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115'\n```\n\n### uuid.v4([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v4 UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values\n * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v4({\n random: [\n 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,\n 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36\n ]\n});\n// -> \"109156be-c4fb-41ea-b1b4-efe1671c5836\"\n```\n\nExample: Generate two IDs in a single buffer\n\n```javascript\nvar buffer = new Array(32); // (or 'new Buffer' in node.js)\nuuid.v4(null, buffer, 0);\nuuid.v4(null, buffer, 16);\n```\n\n### uuid.parse(id[, buffer[, offset]])\n### uuid.unparse(buffer[, offset])\n\nParse and unparse UUIDs\n\n * `id` - (String) UUID(-like) string\n * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used\n * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0\n\nExample parsing and unparsing a UUID string\n\n```javascript\nvar bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> <Buffer 79 7f f0 43 11 eb 11 e1 80 d6 51 09 98 75 5d 10>\nvar string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10'\n```\n\n### uuid.noConflict()\n\n(Browsers only) Set `uuid` property back to it's previous value.\n\nReturns the uuid object.\n\nExample:\n\n```javascript\nvar myUuid = uuid.noConflict();\nmyUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n```\n\n## Deprecated APIs\n\nSupport for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version.\n\n### uuid([format [, buffer [, offset]]])\n\nuuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary).\n\n### uuid.BufferClass\n\nThe class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API.\n\n## Testing\n\nIn node.js\n\n```\n> cd test\n> node test.js\n```\n\nIn Browser\n\n```\nopen test/test.html\n```\n\n### Benchmarking\n\nRequires node.js\n\n```\nnpm install uuid uuid-js\nnode benchmark/benchmark.js\n```\n\nFor a more complete discussion of uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/uuid/wiki/Benchmark)\n\nFor browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance).\n\n## Release notes\n\n### 1.4.0\n\n* Improved module context detection\n* Removed public RNG functions\n\n### 1.3.2\n\n* Improve tests and handling of v1() options (Issue #24)\n* Expose RNG option to allow for perf testing with different generators\n\n### 1.3.0\n\n* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!\n* Support for node.js crypto API\n* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/shtylman/node-uuid/issues" - }, - "homepage": "https://github.com/shtylman/node-uuid", - "_id": "uuid@1.4.1", - "dist": { - "shasum": "4e6bbab179cc65c2f120508576c631bd7751af7c" - }, - "_from": "uuid@~1.4.0", - "_resolved": "https://registry.npmjs.org/uuid/-/uuid-1.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/rng-browser.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/rng-browser.js deleted file mode 100644 index 57b58d4b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/rng-browser.js +++ /dev/null @@ -1,31 +0,0 @@ - -var rng; - -if (global.crypto && crypto.getRandomValues) { - // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto - // Moderately fast, high quality - var _rnds8 = new Uint8Array(16); - rng = function whatwgRNG() { - crypto.getRandomValues(_rnds8); - return _rnds8; - }; -} - -if (!rng) { - // Math.random()-based (RNG) - // - // If all else fails, use Math.random(). It's fast, but is of unspecified - // quality. - var _rnds = new Array(16); - rng = function() { - for (var i = 0, r; i < 16; i++) { - if ((i & 0x03) === 0) r = Math.random() * 0x100000000; - _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; - } - - return _rnds; - }; -} - -module.exports = rng; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/rng.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/rng.js deleted file mode 100644 index 3977f798..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/rng.js +++ /dev/null @@ -1,4 +0,0 @@ -var rb = require('crypto').randomBytes; -module.exports = function() { - return rb(16); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/test/mocha.opts b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/test/mocha.opts deleted file mode 100644 index e2bfcc5a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/test/mocha.opts +++ /dev/null @@ -1 +0,0 @@ ---ui qunit diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/test/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/test/test.js deleted file mode 100644 index 4c9872ff..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/test/test.js +++ /dev/null @@ -1,105 +0,0 @@ -var assert = require('assert'); - -var uuid = require('../'); - -// Verify ordering of v1 ids created with explicit times -var TIME = 1321644961388; // 2011-11-18 11:36:01.388-08:00 - -function compare(name, ids) { - test(name, function() { - // avoid .map for older browsers - for (var i=0 ; i<ids.length ; ++i) { - ids[i] = ids[i].split('-').reverse().join('-'); - } - ids = ids.sort(); - var sorted = ([].concat(ids)).sort(); - - assert(sorted.toString() == ids.toString(), name + ' have expected order'); - }); -} - -// Verify ordering of v1 ids created using default behavior -compare('uuids with current time', [ - uuid.v1(), - uuid.v1(), - uuid.v1(), - uuid.v1(), - uuid.v1() -]); - -// Verify ordering of v1 ids created with explicit times -compare('uuids with time option', [ - uuid.v1({msecs: TIME - 10*3600*1000}), - uuid.v1({msecs: TIME - 1}), - uuid.v1({msecs: TIME}), - uuid.v1({msecs: TIME + 1}), - uuid.v1({msecs: TIME + 28*24*3600*1000}) -]); - -test('msec', function() { - assert( - uuid.v1({msecs: TIME}) != uuid.v1({msecs: TIME}), - 'IDs created at same msec are different' - ); -}); - -test('exception thrown when > 10k ids created in 1ms', function() { - // Verify throw if too many ids created - var thrown = false; - try { - uuid.v1({msecs: TIME, nsecs: 10000}); - } catch (e) { - thrown = true; - } - assert(thrown, 'Exception thrown when > 10K ids created in 1 ms'); -}); - -test('clock regression by msec', function() { - // Verify clock regression bumps clockseq - var uidt = uuid.v1({msecs: TIME}); - var uidtb = uuid.v1({msecs: TIME - 1}); - assert( - parseInt(uidtb.split('-')[3], 16) - parseInt(uidt.split('-')[3], 16) === 1, - 'Clock regression by msec increments the clockseq' - ); -}); - -test('clock regression by nsec', function() { - // Verify clock regression bumps clockseq - var uidtn = uuid.v1({msecs: TIME, nsecs: 10}); - var uidtnb = uuid.v1({msecs: TIME, nsecs: 9}); - assert( - parseInt(uidtnb.split('-')[3], 16) - parseInt(uidtn.split('-')[3], 16) === 1, - 'Clock regression by nsec increments the clockseq' - ); -}); - -test('explicit options product expected id', function() { - // Verify explicit options produce expected id - var id = uuid.v1({ - msecs: 1321651533573, - nsecs: 5432, - clockseq: 0x385c, - node: [ 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10 ] - }); - assert(id == 'd9428888-122b-11e1-b85c-61cd3cbb3210', 'Explicit options produce expected id'); -}); - -test('ids spanning 1ms boundary are 100ns apart', function() { - // Verify adjacent ids across a msec boundary are 1 time unit apart - var u0 = uuid.v1({msecs: TIME, nsecs: 9999}); - var u1 = uuid.v1({msecs: TIME + 1, nsecs: 0}); - - var before = u0.split('-')[0], after = u1.split('-')[0]; - var dt = parseInt(after, 16) - parseInt(before, 16); - assert(dt === 1, 'Ids spanning 1ms boundary are 100ns apart'); -}); - -test('parse/unparse', function() { - var id = '00112233445566778899aabbccddeeff'; - assert(uuid.unparse(uuid.parse(id.substr(0,10))) == - '00112233-4400-0000-0000-000000000000', 'Short parse'); - assert(uuid.unparse(uuid.parse('(this is the uuid -> ' + id + id)) == - '00112233-4455-6677-8899-aabbccddeeff', 'Dirty parse'); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/uuid.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/uuid.js deleted file mode 100644 index d0062fb4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/uuid.js +++ /dev/null @@ -1,187 +0,0 @@ -// uuid.js -// -// Copyright (c) 2010-2012 Robert Kieffer -// MIT License - http://opensource.org/licenses/mit-license.php - -// Unique ID creation requires a high quality random # generator. We feature -// detect to determine the best RNG source, normalizing to a function that -// returns 128-bits of randomness, since that's what's usually required -var _rng = require('./rng'); - -// Buffer class to use -var BufferClass = typeof(Buffer) == 'function' ? Buffer : Array; - -// Maps for number <-> hex string conversion -var _byteToHex = []; -var _hexToByte = {}; -for (var i = 0; i < 256; i++) { - _byteToHex[i] = (i + 0x100).toString(16).substr(1); - _hexToByte[_byteToHex[i]] = i; -} - -// **`parse()` - Parse a UUID into it's component bytes** -function parse(s, buf, offset) { - var i = (buf && offset) || 0, ii = 0; - - buf = buf || []; - s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) { - if (ii < 16) { // Don't overflow! - buf[i + ii++] = _hexToByte[oct]; - } - }); - - // Zero out remaining bytes if string was short - while (ii < 16) { - buf[i + ii++] = 0; - } - - return buf; -} - -// **`unparse()` - Convert UUID byte array (ala parse()) into a string** -function unparse(buf, offset) { - var i = offset || 0, bth = _byteToHex; - return bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]]; -} - -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html - -// random #'s we need to init node and clockseq -var _seedBytes = _rng(); - -// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) -var _nodeId = [ - _seedBytes[0] | 0x01, - _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] -]; - -// Per 4.2.2, randomize (14 bit) clockseq -var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff; - -// Previous uuid creation time -var _lastMSecs = 0, _lastNSecs = 0; - -// See https://github.com/broofa/node-uuid for API details -function v1(options, buf, offset) { - var i = buf && offset || 0; - var b = buf || []; - - options = options || {}; - - var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; - - // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); - - // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; - - // Time since last uuid creation (in msecs) - var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; - - // Per 4.2.1.2, Bump clockseq on clock regression - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } - - // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } - - // Per 4.2.1.2 Throw error if too many uuids are requested - if (nsecs >= 10000) { - throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; - - // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - msecs += 12219292800000; - - // `time_low` - var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; - - // `time_mid` - var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; - - // `time_high_and_version` - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - b[i++] = tmh >>> 16 & 0xff; - - // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - b[i++] = clockseq >>> 8 | 0x80; - - // `clock_seq_low` - b[i++] = clockseq & 0xff; - - // `node` - var node = options.node || _nodeId; - for (var n = 0; n < 6; n++) { - b[i + n] = node[n]; - } - - return buf ? buf : unparse(b); -} - -// **`v4()` - Generate random UUID** - -// See https://github.com/broofa/node-uuid for API details -function v4(options, buf, offset) { - // Deprecated - 'format' argument, as supported in v1.2 - var i = buf && offset || 0; - - if (typeof(options) == 'string') { - buf = options == 'binary' ? new BufferClass(16) : null; - options = null; - } - options = options || {}; - - var rnds = options.random || (options.rng || _rng)(); - - // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - - // Copy bytes to buffer, if provided - if (buf) { - for (var ii = 0; ii < 16; ii++) { - buf[i + ii] = rnds[ii]; - } - } - - return buf || unparse(rnds); -} - -// Export public API -var uuid = v4; -uuid.v1 = v1; -uuid.v4 = v4; -uuid.parse = parse; -uuid.unparse = unparse; -uuid.BufferClass = BufferClass; - -module.exports = uuid; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/package.json deleted file mode 100644 index 561465e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "tempfile", - "version": "0.1.2", - "description": "Get a random temp file path", - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/tempfile" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js" - ], - "keywords": [ - "tmp", - "temp", - "temporary", - "tempfile", - "file", - "path", - "random", - "rand" - ], - "dependencies": { - "uuid": "~1.4.0" - }, - "devDependencies": { - "mocha": "*" - }, - "readme": "# tempfile [![Build Status](https://travis-ci.org/sindresorhus/tempfile.png?branch=master)](http://travis-ci.org/sindresorhus/tempfile)\n\n> Get a random temp file path\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/tempfile)\n\n```\nnpm install --save tempfile\n```\n\n\n## Example\n\n```js\nvar tempfile = require('tempfile');\ntempfile('.png');\n//=> /var/folders/_1/tk89k8215ts0rg0kmb096nj80000gn/T/4049f192-43e7-43b2-98d9-094e6760861b.png\n```\n\n## API\n\n### tempfile(extension)\n\n#### extension\n\nType: `String`\n\nOptionally supply an extension to append to the path.\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "bugs": { - "url": "https://github.com/sindresorhus/tempfile/issues" - }, - "homepage": "https://github.com/sindresorhus/tempfile", - "_id": "tempfile@0.1.2", - "dist": { - "shasum": "81d4e51f35856592f3b51d568135791af3b038e0" - }, - "_from": "tempfile@~0.1.2", - "_resolved": "https://registry.npmjs.org/tempfile/-/tempfile-0.1.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/readme.md deleted file mode 100644 index 672a0ac6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/readme.md +++ /dev/null @@ -1,36 +0,0 @@ -# tempfile [![Build Status](https://travis-ci.org/sindresorhus/tempfile.png?branch=master)](http://travis-ci.org/sindresorhus/tempfile) - -> Get a random temp file path - - -## Install - -Install with [npm](https://npmjs.org/package/tempfile) - -``` -npm install --save tempfile -``` - - -## Example - -```js -var tempfile = require('tempfile'); -tempfile('.png'); -//=> /var/folders/_1/tk89k8215ts0rg0kmb096nj80000gn/T/4049f192-43e7-43b2-98d9-094e6760861b.png -``` - -## API - -### tempfile(extension) - -#### extension - -Type: `String` - -Optionally supply an extension to append to the path. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/package.json deleted file mode 100644 index 6e75932a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "decompress", - "version": "0.1.6", - "description": "Easily extract zip, tar and tar.gz archives", - "keywords": [ - "extract", - "zip", - "tar", - "tar.gz" - ], - "homepage": "https://github.com/kevva/decompress", - "bugs": { - "url": "https://github.com/kevva/decompress/issues" - }, - "author": { - "name": "Kevin Martensson", - "email": "kevinmartensson@gmail.com", - "url": "http://kevinmartensson.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/kevva/decompress.git" - }, - "scripts": { - "test": "mocha --reporter list" - }, - "main": "decompress.js", - "files": [ - "decompress.js" - ], - "dependencies": { - "adm-zip": "~0.4.3", - "mkdirp": "~0.3.5", - "mout": "~0.6.0", - "rimraf": "~2.2.2", - "stream-combiner": "~0.0.2", - "tar": "~0.1.18", - "tempfile": "~0.1.2" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "readme": "# decompress [![Build Status](https://secure.travis-ci.org/kevva/decompress.png?branch=master)](http://travis-ci.org/kevva/decompress)\n\nEasily extract `.zip`, `.tar` and `.tar.gz` archives. Based on the extract \nutility in [Bower](https://github.com/bower/bower).\n\n## Getting started\n\nInstall with [npm](https://npmjs.org/package/decompress): `npm install decompress`\n\n## Examples\n\nYou'll only need to pass a type into `ext` and it'll figure the rest out for \nyou.\n\n```js\nvar decompress = require('decompress');\nvar fs = require('fs');\n\nvar src = fs.createReadStream('foo.tar.gz');\nvar dest = decompress.extract({ ext: '.tar.gz' });\n\nsrc.pipe(dest);\n```\n\n## API\n\n### .extract(opts)\n\nExtract an archive using the `ext` option to determine which extractor to use. \nIf no `path` is specified it'll extract it to your current location.\n\n### .canExtract(src, mime)\n\nDetermine if a file can be extracted or not by checking the file extension \nand/or the MIME type.\n\n```js\ndecompress.canExtract('foo.zip');\n// => true\n\ndecompress.canExtract('application/zip');\n// => true\n```\n\n## Options\n\n### `ext`\n\nType: `String` \nDefault: `''`\n\nString that can be a file name, URL, MIME type etc.\n\n### `path`\n\nType: `String` \nDefault: `process.cwd()`\n\nPath to extract the archive to. If no `path` is defined it'll extract it to your \ncurrent location.\n\n### strip\n\nType: `Number` \nDefault: `0`\n\nEquivalent to `--strip-components` for tar.\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com)\n", - "readmeFilename": "README.md", - "_id": "decompress@0.1.6", - "dist": { - "shasum": "dc920bd81312e06f3e97aa46add56f1e95e21a4e" - }, - "_from": "decompress@~0.1.5", - "_resolved": "https://registry.npmjs.org/decompress/-/decompress-0.1.6.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/each-async.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/each-async.js deleted file mode 100644 index a43b4363..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/each-async.js +++ /dev/null @@ -1,72 +0,0 @@ -/*! - each-async - Async concurrent iterator (async forEach) - https://github.com/sindresorhus/each-async - by Sindre Sorhus - MIT License -*/ -(function () { - 'use strict'; - - function once(fn) { - var called = false; - - if (typeof fn !== 'function') { - throw new TypeError; - } - - return function () { - if (called) { - throw new Error('Callback already called.'); - } - called = true; - fn.apply(this, arguments); - } - } - - function each(arr, next, cb) { - var failed = false; - var count = 0; - - cb = cb || function () {}; - - if (!Array.isArray(arr)) { - throw new TypeError('First argument must be an array'); - } - - if (typeof next !== 'function') { - throw new TypeError('Second argument must be a function'); - } - - var len = arr.length; - - if (!len) { - return cb(); - } - - function callback(err) { - if (failed) { - return; - } - - if (err !== undefined && err !== null) { - failed = true; - return cb(err); - } - - if (++count === len) { - return cb(); - } - } - - for (var i = 0; i < len; i++) { - next(arr[i], i, once(callback)); - } - } - - if (typeof module !== 'undefined' && module.exports) { - module.exports = each; - } else { - window.eachAsync = each; - } -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/package.json deleted file mode 100644 index 8e17c2d0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "each-async", - "version": "0.1.2", - "description": "Async concurrent iterator", - "license": "MIT", - "main": "each-async.js", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/each-async" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "each-async.js" - ], - "keywords": [ - "each", - "async", - "asynchronous", - "iteration", - "iterate", - "loop", - "foreach", - "parallel", - "concurrent", - "array", - "flow", - "control flow" - ], - "devDependencies": { - "mocha": "*" - }, - "readme": "# each-async [![Build Status](https://secure.travis-ci.org/sindresorhus/each-async.png?branch=master)](http://travis-ci.org/sindresorhus/each-async)\n\n> Async concurrent iterator (async forEach)\n\nLike [async.each()](https://github.com/caolan/async#eacharr-iterator-callback), but tiny.\n\nI often use `async.each()` for doing async operations when iterating, but I almost never use the other gadzillion methods in `async`.\n\nAsync iteration is one of the most used async control flow patterns.\n\n\n## Install\n\nDownload [manually](https://github.com/sindresorhus/each-async/releases) or with a package-manager.\n\n#### [npm](https://npmjs.org/package/each-async)\n\n```\nnpm install --save each-async\n```\n\n#### [Bower](http://bower.io)\n\n```\nbower install --save each-async\n```\n\n#### [Component](https://github.com/component/component)\n\n```\ncomponent install sindresorhus/each-async\n```\n\n\n## Examples\n\n### Node.js\n\n```js\neachAsync(['foo','bar','baz'], function (item, index, done) {\n\tconsole.log(item, index);\n\tdone();\n}, function (error) {\n\tconsole.log('finished');\n});\n//=> foo 0\n//=> bar 1\n//=> baz 2\n//=> finished\n```\n\n\n## API\n\n### eachAsync(array, callback, finishedCallback)\n\n#### array\n\nThe array you want to iterate.\n\n#### callback(item, index, done)\n\nA function which is called for each item in the array with the following arguments:\n\n- `item`: the current item in the array\n- `index`: the current index\n- `done([error])`: call this when you're done with an optional error. Supplying anything other than `undefined`/`null` will stop the iteration.\n\nNote that order is not guaranteed since each item is handled concurrently.\n\n#### finishedCallback(error)\n\nA function which is called when the iteration is finished or on the first error. First argument is the error passed from `done()` in the `callback`.\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "bugs": { - "url": "https://github.com/sindresorhus/each-async/issues" - }, - "homepage": "https://github.com/sindresorhus/each-async", - "_id": "each-async@0.1.2", - "dist": { - "shasum": "d5b900bd92705ed5b8cad3307a6536adb0f134c6" - }, - "_from": "each-async@~0.1.1", - "_resolved": "https://registry.npmjs.org/each-async/-/each-async-0.1.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/readme.md deleted file mode 100644 index e5e5bb14..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/readme.md +++ /dev/null @@ -1,78 +0,0 @@ -# each-async [![Build Status](https://secure.travis-ci.org/sindresorhus/each-async.png?branch=master)](http://travis-ci.org/sindresorhus/each-async) - -> Async concurrent iterator (async forEach) - -Like [async.each()](https://github.com/caolan/async#eacharr-iterator-callback), but tiny. - -I often use `async.each()` for doing async operations when iterating, but I almost never use the other gadzillion methods in `async`. - -Async iteration is one of the most used async control flow patterns. - - -## Install - -Download [manually](https://github.com/sindresorhus/each-async/releases) or with a package-manager. - -#### [npm](https://npmjs.org/package/each-async) - -``` -npm install --save each-async -``` - -#### [Bower](http://bower.io) - -``` -bower install --save each-async -``` - -#### [Component](https://github.com/component/component) - -``` -component install sindresorhus/each-async -``` - - -## Examples - -### Node.js - -```js -eachAsync(['foo','bar','baz'], function (item, index, done) { - console.log(item, index); - done(); -}, function (error) { - console.log('finished'); -}); -//=> foo 0 -//=> bar 1 -//=> baz 2 -//=> finished -``` - - -## API - -### eachAsync(array, callback, finishedCallback) - -#### array - -The array you want to iterate. - -#### callback(item, index, done) - -A function which is called for each item in the array with the following arguments: - -- `item`: the current item in the array -- `index`: the current index -- `done([error])`: call this when you're done with an optional error. Supplying anything other than `undefined`/`null` will stop the iteration. - -Note that order is not guaranteed since each item is handled concurrently. - -#### finishedCallback(error) - -A function which is called when the iteration is finished or on the first error. First argument is the error passed from `done()` in the `callback`. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/.npmignore deleted file mode 100644 index 80e59ef5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -tests -node_modules diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/.travis.yml deleted file mode 100644 index 0bce8152..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: node_js -node_js: - - 0.8 - - 0.10 - -env: - - OPTIONALS=Y - - OPTIONALS=N - -install: - - if [[ "$OPTIONALS" == "Y" ]]; then npm install; fi - - if [[ "$OPTIONALS" == "N" ]]; then npm install --no-optional; fi diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/LICENSE deleted file mode 100644 index a4a9aee0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/README.md deleted file mode 100644 index 5c0c081f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/README.md +++ /dev/null @@ -1,366 +0,0 @@ -# Request -- Simplified HTTP client - -[![NPM](https://nodei.co/npm/request.png)](https://nodei.co/npm/request/) - -## Super simple to use - -Request is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default. - -```javascript -var request = require('request'); -request('http://www.google.com', function (error, response, body) { - if (!error && response.statusCode == 200) { - console.log(body) // Print the google web page. - } -}) -``` - -## Streaming - -You can stream any response to a file stream. - -```javascript -request('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png')) -``` - -You can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers don’t already provide one). - -```javascript -fs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json')) -``` - -Request can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers. - -```javascript -request.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png')) -``` - -Now let’s get fancy. - -```javascript -http.createServer(function (req, resp) { - if (req.url === '/doodle.png') { - if (req.method === 'PUT') { - req.pipe(request.put('http://mysite.com/doodle.png')) - } else if (req.method === 'GET' || req.method === 'HEAD') { - request.get('http://mysite.com/doodle.png').pipe(resp) - } - } -}) -``` - -You can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do: - -```javascript -http.createServer(function (req, resp) { - if (req.url === '/doodle.png') { - var x = request('http://mysite.com/doodle.png') - req.pipe(x) - x.pipe(resp) - } -}) -``` - -And since `pipe()` returns the destination stream in ≥ Node 0.5.x you can do one line proxying. :) - -```javascript -req.pipe(request('http://mysite.com/doodle.png')).pipe(resp) -``` - -Also, none of this new functionality conflicts with requests previous features, it just expands them. - -```javascript -var r = request.defaults({'proxy':'http://localproxy.com'}) - -http.createServer(function (req, resp) { - if (req.url === '/doodle.png') { - r.get('http://google.com/doodle.png').pipe(resp) - } -}) -``` - -You can still use intermediate proxies, the requests will still follow HTTP forwards, etc. - -## Forms - -`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API. - -URL-encoded forms are simple. - -```javascript -request.post('http://service.com/upload', {form:{key:'value'}}) -// or -request.post('http://service.com/upload').form({key:'value'}) -``` - -For `multipart/form-data` we use the [form-data](https://github.com/felixge/node-form-data) library by [@felixge](https://github.com/felixge). You don’t need to worry about piping the form object or setting the headers, `request` will handle that for you. - -```javascript -var r = request.post('http://service.com/upload') -var form = r.form() -form.append('my_field', 'my_value') -form.append('my_buffer', new Buffer([1, 2, 3])) -form.append('my_file', fs.createReadStream(path.join(__dirname, 'doodle.png')) -form.append('remote_file', request('http://google.com/doodle.png')) -``` - -## HTTP Authentication - -```javascript -request.get('http://some.server.com/').auth('username', 'password', false); -// or -request.get('http://some.server.com/', { - 'auth': { - 'user': 'username', - 'pass': 'password', - 'sendImmediately': false - } -}); -``` - -If passed as an option, `auth` should be a hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). The method form takes parameters `auth(username, password, sendImmediately)`. - -`sendImmediately` defaults to `true`, which causes a basic authentication header to be sent. If `sendImmediately` is `false`, then `request` will retry with a proper authentication header after receiving a `401` response from the server (which must contain a `WWW-Authenticate` header indicating the required authentication method). - -Digest authentication is supported, but it only works with `sendImmediately` set to `false`; otherwise `request` will send basic authentication on the initial request, which will probably cause the request to fail. - -## OAuth Signing - -```javascript -// Twitter OAuth -var qs = require('querystring') - , oauth = - { callback: 'http://mysite.com/callback/' - , consumer_key: CONSUMER_KEY - , consumer_secret: CONSUMER_SECRET - } - , url = 'https://api.twitter.com/oauth/request_token' - ; -request.post({url:url, oauth:oauth}, function (e, r, body) { - // Ideally, you would take the body in the response - // and construct a URL that a user clicks on (like a sign in button). - // The verifier is only available in the response after a user has - // verified with twitter that they are authorizing your app. - var access_token = qs.parse(body) - , oauth = - { consumer_key: CONSUMER_KEY - , consumer_secret: CONSUMER_SECRET - , token: access_token.oauth_token - , verifier: access_token.oauth_verifier - } - , url = 'https://api.twitter.com/oauth/access_token' - ; - request.post({url:url, oauth:oauth}, function (e, r, body) { - var perm_token = qs.parse(body) - , oauth = - { consumer_key: CONSUMER_KEY - , consumer_secret: CONSUMER_SECRET - , token: perm_token.oauth_token - , token_secret: perm_token.oauth_token_secret - } - , url = 'https://api.twitter.com/1.1/users/show.json?' - , params = - { screen_name: perm_token.screen_name - , user_id: perm_token.user_id - } - ; - url += qs.stringify(params) - request.get({url:url, oauth:oauth, json:true}, function (e, r, user) { - console.log(user) - }) - }) -}) -``` - -### Custom HTTP Headers - -HTTP Headers, such as `User-Agent`, can be set in the `options` object. -In the example below, we call the github API to find out the number -of stars and forks for the request repository. This requires a -custom `User-Agent` header as well as https. - -```javascript -var request = require('request'); - -var options = { - url: 'https://api.github.com/repos/mikeal/request', - headers: { - 'User-Agent': 'request' - } -}; - -function callback(error, response, body) { - if (!error && response.statusCode == 200) { - var info = JSON.parse(body); - console.log(info.stargazers_count + " Stars"); - console.log(info.forks_count + " Forks"); - } -} - -request(options, callback); -``` - -### request(options, callback) - -The first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional. - -* `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()` -* `qs` - object containing querystring values to be appended to the `uri` -* `method` - http method (default: `"GET"`) -* `headers` - http headers (default: `{}`) -* `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`. -* `form` - when passed an object, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header. When passed no options, a `FormData` instance is returned (and is piped to request). -* `auth` - A hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). See documentation above. -* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON. -* `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below. -* `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`) -* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`) -* `maxRedirects` - the maximum number of redirects to follow (default: `10`) -* `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`. -* `pool` - A hash object containing the agents for these requests. If omitted, the request will use the global pool (which is set to node's default `maxSockets`) -* `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool. -* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request -* `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`) -* `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above. -* `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example). -* `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option. -* `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section) -* `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services) -* `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options. -* `localAddress` - Local interface to bind for network connections. - - -The callback argument gets 3 arguments: - -1. An `error` when applicable (usually from [`http.ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) object) -2. An [`http.IncomingMessage`](http://nodejs.org/api/http.html#http_http_incomingmessage) object -3. The third is the `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied) - -## Convenience methods - -There are also shorthand methods for different HTTP METHODs and some other conveniences. - -### request.defaults(options) - -This method returns a wrapper around the normal request API that defaults to whatever options you pass in to it. - -### request.put - -Same as `request()`, but defaults to `method: "PUT"`. - -```javascript -request.put(url) -``` - -### request.patch - -Same as `request()`, but defaults to `method: "PATCH"`. - -```javascript -request.patch(url) -``` - -### request.post - -Same as `request()`, but defaults to `method: "POST"`. - -```javascript -request.post(url) -``` - -### request.head - -Same as request() but defaults to `method: "HEAD"`. - -```javascript -request.head(url) -``` - -### request.del - -Same as `request()`, but defaults to `method: "DELETE"`. - -```javascript -request.del(url) -``` - -### request.get - -Same as `request()` (for uniformity). - -```javascript -request.get(url) -``` -### request.cookie - -Function that creates a new cookie. - -```javascript -request.cookie('cookie_string_here') -``` -### request.jar - -Function that creates a new cookie jar. - -```javascript -request.jar() -``` - - -## Examples: - -```javascript - var request = require('request') - , rand = Math.floor(Math.random()*100000000).toString() - ; - request( - { method: 'PUT' - , uri: 'http://mikeal.iriscouch.com/testjs/' + rand - , multipart: - [ { 'content-type': 'application/json' - , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}}) - } - , { body: 'I am an attachment' } - ] - } - , function (error, response, body) { - if(response.statusCode == 201){ - console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand) - } else { - console.log('error: '+ response.statusCode) - console.log(body) - } - } - ) -``` - -Cookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`). - -```javascript -var request = request.defaults({jar: true}) -request('http://www.google.com', function () { - request('http://images.google.com') -}) -``` - -To use a custom cookie jar (instead `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`) - -```javascript -var j = request.jar() -var request = request.defaults({jar:j}) -request('http://www.google.com', function () { - request('http://images.google.com') -}) -``` -OR - -Note that `setCookie` requires at least three parameters, and the last is required to be a callback. - -```javascript -var j = request.jar() -var cookie = request.cookie('your_cookie_here') -j.setCookie(cookie, uri, function (err, cookie){}) -request({url: 'http://www.google.com', jar: j}, function () { - request('http://images.google.com') -}) -``` diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/dns-request.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/dns-request.js deleted file mode 100644 index 6a847f6d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/dns-request.js +++ /dev/null @@ -1,7 +0,0 @@ -var request = require('request') - , dns = require('dns') - ; - -function wrap (fn) { - var -} \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/index.js deleted file mode 100755 index 465e5ae3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/index.js +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright 2010-2012 Mikeal Rogers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -var optional = require('./lib/optional') - , cookie = optional('tough-cookie') - , Cookie = cookie && cookie.Cookie - , CookieJar = cookie && cookie.CookieJar - , cookieJar = CookieJar && new CookieJar - - , copy = require('./lib/copy') - , Request = require('./request') - ; - - - -// organize params for patch, post, put, head, del -function initParams(uri, options, callback) { - if ((typeof options === 'function') && !callback) callback = options - if (options && typeof options === 'object') { - options.uri = uri - } else if (typeof uri === 'string') { - options = {uri:uri} - } else { - options = uri - uri = options.uri - } - return { uri: uri, options: options, callback: callback } -} - -function request (uri, options, callback) { - if (typeof uri === 'undefined') throw new Error('undefined is not a valid uri or options object.') - if ((typeof options === 'function') && !callback) callback = options - if (options && typeof options === 'object') { - options.uri = uri - } else if (typeof uri === 'string') { - options = {uri:uri} - } else { - options = uri - } - - options = copy(options) - - if (callback) options.callback = callback - var r = new Request(options) - return r -} - -module.exports = request - -request.Request = Request; - -request.debug = process.env.NODE_DEBUG && /request/.test(process.env.NODE_DEBUG) - -request.initParams = initParams - -request.defaults = function (options, requester) { - var def = function (method) { - var d = function (uri, opts, callback) { - var params = initParams(uri, opts, callback) - for (var i in options) { - if (params.options[i] === undefined) params.options[i] = options[i] - } - if(typeof requester === 'function') { - if(method === request) { - method = requester - } else { - params.options._requester = requester - } - } - return method(params.options, params.callback) - } - return d - } - var de = def(request) - de.get = def(request.get) - de.patch = def(request.patch) - de.post = def(request.post) - de.put = def(request.put) - de.head = def(request.head) - de.del = def(request.del) - de.cookie = def(request.cookie) - de.jar = request.jar - return de -} - -function requester(params) { - if(typeof params.options._requester === 'function') { - return params.options._requester - } else { - return request - } -} - -request.forever = function (agentOptions, optionsArg) { - var options = {} - if (optionsArg) { - for (var option in optionsArg) { - options[option] = optionsArg[option] - } - } - if (agentOptions) options.agentOptions = agentOptions - options.forever = true - return request.defaults(options) -} - -request.get = request -request.post = function (uri, options, callback) { - var params = initParams(uri, options, callback) - params.options.method = 'POST' - return requester(params)(params.uri || null, params.options, params.callback) -} -request.put = function (uri, options, callback) { - var params = initParams(uri, options, callback) - params.options.method = 'PUT' - return requester(params)(params.uri || null, params.options, params.callback) -} -request.patch = function (uri, options, callback) { - var params = initParams(uri, options, callback) - params.options.method = 'PATCH' - return requester(params)(params.uri || null, params.options, params.callback) -} -request.head = function (uri, options, callback) { - var params = initParams(uri, options, callback) - params.options.method = 'HEAD' - if (params.options.body || - params.options.requestBodyStream || - (params.options.json && typeof params.options.json !== 'boolean') || - params.options.multipart) { - throw new Error("HTTP HEAD requests MUST NOT include a request body.") - } - - return requester(params)(params.uri || null, params.options, params.callback) -} -request.del = function (uri, options, callback) { - var params = initParams(uri, options, callback) - params.options.method = 'DELETE' - return requester(params)(params.uri || null, params.options, params.callback) -} -request.jar = function () { - return new CookieJar -} -request.cookie = function (str) { - if (str && str.uri) str = str.uri - if (typeof str !== 'string') throw new Error("The cookie function only accepts STRING as param") - return new Cookie(str) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/copy.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/copy.js deleted file mode 100644 index 56831ff8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/copy.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = -function copy (obj) { - var o = {} - Object.keys(obj).forEach(function (i) { - o[i] = obj[i] - }) - return o -} \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/debug.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/debug.js deleted file mode 100644 index fa27b24b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/debug.js +++ /dev/null @@ -1,7 +0,0 @@ -var util = require('util') - -module.exports = -function debug () { - if (/\brequest\b/.test(process.env.NODE_DEBUG)) - console.error('REQUEST %s', util.format.apply(util, arguments)) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/getSafe.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/getSafe.js deleted file mode 100644 index 28e07ea5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/getSafe.js +++ /dev/null @@ -1,34 +0,0 @@ -// Safe toJSON -module.exports = -function getSafe (self, uuid) { - if (typeof self === 'object' || typeof self === 'function') var safe = {} - if (Array.isArray(self)) var safe = [] - - var recurse = [] - - Object.defineProperty(self, uuid, {}) - - var attrs = Object.keys(self).filter(function (i) { - if (i === uuid) return false - if ( (typeof self[i] !== 'object' && typeof self[i] !== 'function') || self[i] === null) return true - return !(Object.getOwnPropertyDescriptor(self[i], uuid)) - }) - - - for (var i=0;i<attrs.length;i++) { - if ( (typeof self[attrs[i]] !== 'object' && typeof self[attrs[i]] !== 'function') || - self[attrs[i]] === null - ) { - safe[attrs[i]] = self[attrs[i]] - } else { - recurse.push(attrs[i]) - Object.defineProperty(self[attrs[i]], uuid, {}) - } - } - - for (var i=0;i<recurse.length;i++) { - safe[recurse[i]] = getSafe(self[recurse[i]], uuid) - } - - return safe -} \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/optional.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/optional.js deleted file mode 100644 index 0c4fe853..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/optional.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = function(module) { - try { - return require(module); - } catch (e) {} -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/LICENSE deleted file mode 100644 index a4a9aee0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/README.md deleted file mode 100644 index 763564e0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/README.md +++ /dev/null @@ -1,4 +0,0 @@ -aws-sign -======== - -AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/index.js deleted file mode 100644 index 576e49dd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/index.js +++ /dev/null @@ -1,202 +0,0 @@ - -/*! - * knox - auth - * Copyright(c) 2010 LearnBoost <dev@learnboost.com> - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var crypto = require('crypto') - , parse = require('url').parse - ; - -/** - * Valid keys. - */ - -var keys = - [ 'acl' - , 'location' - , 'logging' - , 'notification' - , 'partNumber' - , 'policy' - , 'requestPayment' - , 'torrent' - , 'uploadId' - , 'uploads' - , 'versionId' - , 'versioning' - , 'versions' - , 'website' - ] - -/** - * Return an "Authorization" header value with the given `options` - * in the form of "AWS <key>:<signature>" - * - * @param {Object} options - * @return {String} - * @api private - */ - -function authorization (options) { - return 'AWS ' + options.key + ':' + sign(options) -} - -module.exports = authorization -module.exports.authorization = authorization - -/** - * Simple HMAC-SHA1 Wrapper - * - * @param {Object} options - * @return {String} - * @api private - */ - -function hmacSha1 (options) { - return crypto.createHmac('sha1', options.secret).update(options.message).digest('base64') -} - -module.exports.hmacSha1 = hmacSha1 - -/** - * Create a base64 sha1 HMAC for `options`. - * - * @param {Object} options - * @return {String} - * @api private - */ - -function sign (options) { - options.message = stringToSign(options) - return hmacSha1(options) -} -module.exports.sign = sign - -/** - * Create a base64 sha1 HMAC for `options`. - * - * Specifically to be used with S3 presigned URLs - * - * @param {Object} options - * @return {String} - * @api private - */ - -function signQuery (options) { - options.message = queryStringToSign(options) - return hmacSha1(options) -} -module.exports.signQuery= signQuery - -/** - * Return a string for sign() with the given `options`. - * - * Spec: - * - * <verb>\n - * <md5>\n - * <content-type>\n - * <date>\n - * [headers\n] - * <resource> - * - * @param {Object} options - * @return {String} - * @api private - */ - -function stringToSign (options) { - var headers = options.amazonHeaders || '' - if (headers) headers += '\n' - var r = - [ options.verb - , options.md5 - , options.contentType - , options.date ? options.date.toUTCString() : '' - , headers + options.resource - ] - return r.join('\n') -} -module.exports.queryStringToSign = stringToSign - -/** - * Return a string for sign() with the given `options`, but is meant exclusively - * for S3 presigned URLs - * - * Spec: - * - * <date>\n - * <resource> - * - * @param {Object} options - * @return {String} - * @api private - */ - -function queryStringToSign (options){ - return 'GET\n\n\n' + options.date + '\n' + options.resource -} -module.exports.queryStringToSign = queryStringToSign - -/** - * Perform the following: - * - * - ignore non-amazon headers - * - lowercase fields - * - sort lexicographically - * - trim whitespace between ":" - * - join with newline - * - * @param {Object} headers - * @return {String} - * @api private - */ - -function canonicalizeHeaders (headers) { - var buf = [] - , fields = Object.keys(headers) - ; - for (var i = 0, len = fields.length; i < len; ++i) { - var field = fields[i] - , val = headers[field] - , field = field.toLowerCase() - ; - if (0 !== field.indexOf('x-amz')) continue - buf.push(field + ':' + val) - } - return buf.sort().join('\n') -} -module.exports.canonicalizeHeaders = canonicalizeHeaders - -/** - * Perform the following: - * - * - ignore non sub-resources - * - sort lexicographically - * - * @param {String} resource - * @return {String} - * @api private - */ - -function canonicalizeResource (resource) { - var url = parse(resource, true) - , path = url.pathname - , buf = [] - ; - - Object.keys(url.query).forEach(function(key){ - if (!~keys.indexOf(key)) return - var val = '' == url.query[key] ? '' : '=' + encodeURIComponent(url.query[key]) - buf.push(key + val) - }) - - return path + (buf.length ? '?' + buf.sort().join('&') : '') -} -module.exports.canonicalizeResource = canonicalizeResource diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/package.json deleted file mode 100644 index ae98297e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "author": { - "name": "Mikeal Rogers", - "email": "mikeal.rogers@gmail.com", - "url": "http://www.futurealoof.com" - }, - "name": "aws-sign2", - "description": "AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module.", - "version": "0.5.0", - "repository": { - "url": "https://github.com/mikeal/aws-sign" - }, - "main": "index.js", - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "readme": "aws-sign\n========\n\nAWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/mikeal/aws-sign/issues" - }, - "homepage": "https://github.com/mikeal/aws-sign", - "_id": "aws-sign2@0.5.0", - "dist": { - "shasum": "c57103f7a17fc037f02d7c2e64b602ea223f7d63" - }, - "_from": "aws-sign2@~0.5.0", - "_resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/LICENSE deleted file mode 100644 index a4a9aee0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/README.md deleted file mode 100644 index 9d5b6634..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/README.md +++ /dev/null @@ -1,4 +0,0 @@ -forever-agent -============= - -HTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/index.js deleted file mode 100644 index 1e8efcdf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/index.js +++ /dev/null @@ -1,119 +0,0 @@ -module.exports = ForeverAgent -ForeverAgent.SSL = ForeverAgentSSL - -var util = require('util') - , Agent = require('http').Agent - , net = require('net') - , tls = require('tls') - , AgentSSL = require('https').Agent - -function ForeverAgent(options) { - var self = this - self.options = options || {} - self.requests = {} - self.sockets = {} - self.freeSockets = {} - self.maxSockets = self.options.maxSockets || Agent.defaultMaxSockets - self.minSockets = self.options.minSockets || ForeverAgent.defaultMinSockets - self.on('free', function(socket, host, port) { - var name = host + ':' + port - if (self.requests[name] && self.requests[name].length) { - self.requests[name].shift().onSocket(socket) - } else if (self.sockets[name].length < self.minSockets) { - if (!self.freeSockets[name]) self.freeSockets[name] = [] - self.freeSockets[name].push(socket) - - // if an error happens while we don't use the socket anyway, meh, throw the socket away - var onIdleError = function() { - socket.destroy() - } - socket._onIdleError = onIdleError - socket.on('error', onIdleError) - } else { - // If there are no pending requests just destroy the - // socket and it will get removed from the pool. This - // gets us out of timeout issues and allows us to - // default to Connection:keep-alive. - socket.destroy() - } - }) - -} -util.inherits(ForeverAgent, Agent) - -ForeverAgent.defaultMinSockets = 5 - - -ForeverAgent.prototype.createConnection = net.createConnection -ForeverAgent.prototype.addRequestNoreuse = Agent.prototype.addRequest -ForeverAgent.prototype.addRequest = function(req, host, port) { - var name = host + ':' + port - if (this.freeSockets[name] && this.freeSockets[name].length > 0 && !req.useChunkedEncodingByDefault) { - var idleSocket = this.freeSockets[name].pop() - idleSocket.removeListener('error', idleSocket._onIdleError) - delete idleSocket._onIdleError - req._reusedSocket = true - req.onSocket(idleSocket) - } else { - this.addRequestNoreuse(req, host, port) - } -} - -ForeverAgent.prototype.removeSocket = function(s, name, host, port) { - if (this.sockets[name]) { - var index = this.sockets[name].indexOf(s) - if (index !== -1) { - this.sockets[name].splice(index, 1) - } - } else if (this.sockets[name] && this.sockets[name].length === 0) { - // don't leak - delete this.sockets[name] - delete this.requests[name] - } - - if (this.freeSockets[name]) { - var index = this.freeSockets[name].indexOf(s) - if (index !== -1) { - this.freeSockets[name].splice(index, 1) - if (this.freeSockets[name].length === 0) { - delete this.freeSockets[name] - } - } - } - - if (this.requests[name] && this.requests[name].length) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createSocket(name, host, port).emit('free') - } -} - -function ForeverAgentSSL (options) { - ForeverAgent.call(this, options) -} -util.inherits(ForeverAgentSSL, ForeverAgent) - -ForeverAgentSSL.prototype.createConnection = createConnectionSSL -ForeverAgentSSL.prototype.addRequestNoreuse = AgentSSL.prototype.addRequest - -function createConnectionSSL (port, host, options) { - if (typeof port === 'object') { - options = port; - } else if (typeof host === 'object') { - options = host; - } else if (typeof options === 'object') { - options = options; - } else { - options = {}; - } - - if (typeof port === 'number') { - options.port = port; - } - - if (typeof host === 'string') { - options.host = host; - } - - return tls.connect(options); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/package.json deleted file mode 100644 index 2044778a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "author": { - "name": "Mikeal Rogers", - "email": "mikeal.rogers@gmail.com", - "url": "http://www.futurealoof.com" - }, - "name": "forever-agent", - "description": "HTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.", - "version": "0.5.2", - "repository": { - "url": "https://github.com/mikeal/forever-agent" - }, - "main": "index.js", - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "readme": "forever-agent\n=============\n\nHTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/mikeal/forever-agent/issues" - }, - "homepage": "https://github.com/mikeal/forever-agent", - "_id": "forever-agent@0.5.2", - "dist": { - "shasum": "6d0e09c4921f94a27f63d3b49c5feff1ea4c5130" - }, - "_from": "forever-agent@~0.5.0", - "_resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/License b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/License deleted file mode 100644 index c7ff12a2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/License +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors - - 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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/Readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/Readme.md deleted file mode 100644 index dc73c463..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/Readme.md +++ /dev/null @@ -1,163 +0,0 @@ -# Form-Data [![Build Status](https://travis-ci.org/felixge/node-form-data.png?branch=master)](https://travis-ci.org/felixge/node-form-data) [![Dependency Status](https://gemnasium.com/felixge/node-form-data.png)](https://gemnasium.com/felixge/node-form-data) - -A module to create readable ```"multipart/form-data"``` streams. Can be used to submit forms and file uploads to other web applications. - -The API of this module is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd]. - -[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface -[streams2-thing]: http://nodejs.org/api/stream.html#stream_compatibility_with_older_node_versions - -## Install - -``` -npm install form-data -``` - -## Usage - -In this example we are constructing a form with 3 fields that contain a string, -a buffer and a file stream. - -``` javascript -var FormData = require('form-data'); -var fs = require('fs'); - -var form = new FormData(); -form.append('my_field', 'my value'); -form.append('my_buffer', new Buffer(10)); -form.append('my_file', fs.createReadStream('/foo/bar.jpg')); -``` - -Also you can use http-response stream: - -``` javascript -var FormData = require('form-data'); -var http = require('http'); - -var form = new FormData(); - -http.request('http://nodejs.org/images/logo.png', function(response) { - form.append('my_field', 'my value'); - form.append('my_buffer', new Buffer(10)); - form.append('my_logo', response); -}); -``` - -Or @mikeal's request stream: - -``` javascript -var FormData = require('form-data'); -var request = require('request'); - -var form = new FormData(); - -form.append('my_field', 'my value'); -form.append('my_buffer', new Buffer(10)); -form.append('my_logo', request('http://nodejs.org/images/logo.png')); -``` - -In order to submit this form to a web application, call ```submit(url, [callback])``` method: - -``` javascript -form.submit('http://example.org/', function(err, res) { - // res – response object (http.IncomingMessage) // - res.resume(); // for node-0.10.x -}); - -``` - -For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods. - -### Alternative submission methods - -You can use node's http client interface: - -``` javascript -var http = require('http'); - -var request = http.request({ - method: 'post', - host: 'example.org', - path: '/upload', - headers: form.getHeaders() -}); - -form.pipe(request); - -request.on('response', function(res) { - console.log(res.statusCode); -}); -``` - -Or if you would prefer the `'Content-Length'` header to be set for you: - -``` javascript -form.submit('example.org/upload', function(err, res) { - console.log(res.statusCode); -}); -``` - -To use custom headers and pre-known length in parts: - -``` javascript -var CRLF = '\r\n'; -var form = new FormData(); - -var options = { - header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF, - knownLength: 1 -}; - -form.append('my_buffer', buffer, options); - -form.submit('http://example.com/', function(err, res) { - if (err) throw err; - console.log('Done'); -}); -``` - -Form-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide "file"-related information manually: - -``` javascript -someModule.stream(function(err, stdout, stderr) { - if (err) throw err; - - var form = new FormData(); - - form.append('file', stdout, { - filename: 'unicycle.jpg', - contentType: 'image/jpg', - knownLength: 19806 - }); - - form.submit('http://example.com/', function(err, res) { - if (err) throw err; - console.log('Done'); - }); -}); -``` - -For edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter: - -``` javascript -form.submit({ - host: 'example.com', - path: '/probably.php?extra=params', - auth: 'username:password' -}, function(err, res) { - console.log(res.statusCode); -}); -``` - -## Notes - -- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround. -- If it feels like FormData hangs after submit and you're on ```node-0.10```, please check [Compatibility with Older Node Versions][streams2-thing] - -## TODO - -- Add new streams (0.10) support and try really hard not to break it for 0.8.x. - -## License - -Form-Data is licensed under the MIT license. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/lib/form_data.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/lib/form_data.js deleted file mode 100644 index d1064748..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/lib/form_data.js +++ /dev/null @@ -1,325 +0,0 @@ -var CombinedStream = require('combined-stream'); -var util = require('util'); -var path = require('path'); -var http = require('http'); -var https = require('https'); -var parseUrl = require('url').parse; -var fs = require('fs'); -var mime = require('mime'); -var async = require('async'); - -module.exports = FormData; -function FormData() { - this._overheadLength = 0; - this._valueLength = 0; - this._lengthRetrievers = []; - - CombinedStream.call(this); -} -util.inherits(FormData, CombinedStream); - -FormData.LINE_BREAK = '\r\n'; - -FormData.prototype.append = function(field, value, options) { - options = options || {}; - - var append = CombinedStream.prototype.append.bind(this); - - // all that streamy business can't handle numbers - if (typeof value == 'number') value = ''+value; - - // https://github.com/felixge/node-form-data/issues/38 - if (util.isArray(value)) { - // Please convert your array into string - // the way web server expects it - this._error(new Error('Arrays are not supported.')); - return; - } - - var header = this._multiPartHeader(field, value, options); - var footer = this._multiPartFooter(field, value, options); - - append(header); - append(value); - append(footer); - - // pass along options.knownLength - this._trackLength(header, value, options); -}; - -FormData.prototype._trackLength = function(header, value, options) { - var valueLength = 0; - - // used w/ getLengthSync(), when length is known. - // e.g. for streaming directly from a remote server, - // w/ a known file a size, and not wanting to wait for - // incoming file to finish to get its size. - if (options.knownLength != null) { - valueLength += +options.knownLength; - } else if (Buffer.isBuffer(value)) { - valueLength = value.length; - } else if (typeof value === 'string') { - valueLength = Buffer.byteLength(value); - } - - this._valueLength += valueLength; - - // @check why add CRLF? does this account for custom/multiple CRLFs? - this._overheadLength += - Buffer.byteLength(header) + - + FormData.LINE_BREAK.length; - - // empty or either doesn't have path or not an http response - if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) )) { - return; - } - - // no need to bother with the length - if (!options.knownLength) - this._lengthRetrievers.push(function(next) { - - if (value.hasOwnProperty('fd')) { - fs.stat(value.path, function(err, stat) { - if (err) { - next(err); - return; - } - - next(null, stat.size); - }); - - // or http response - } else if (value.hasOwnProperty('httpVersion')) { - next(null, +value.headers['content-length']); - - // or request stream http://github.com/mikeal/request - } else if (value.hasOwnProperty('httpModule')) { - // wait till response come back - value.on('response', function(response) { - value.pause(); - next(null, +response.headers['content-length']); - }); - value.resume(); - - // something else - } else { - next('Unknown stream'); - } - }); -}; - -FormData.prototype._multiPartHeader = function(field, value, options) { - var boundary = this.getBoundary(); - var header = ''; - - // custom header specified (as string)? - // it becomes responsible for boundary - // (e.g. to handle extra CRLFs on .NET servers) - if (options.header != null) { - header = options.header; - } else { - header += '--' + boundary + FormData.LINE_BREAK + - 'Content-Disposition: form-data; name="' + field + '"'; - - // fs- and request- streams have path property - // or use custom filename and/or contentType - // TODO: Use request's response mime-type - if (options.filename || value.path) { - header += - '; filename="' + path.basename(options.filename || value.path) + '"' + FormData.LINE_BREAK + - 'Content-Type: ' + (options.contentType || mime.lookup(options.filename || value.path)); - - // http response has not - } else if (value.readable && value.hasOwnProperty('httpVersion')) { - header += - '; filename="' + path.basename(value.client._httpMessage.path) + '"' + FormData.LINE_BREAK + - 'Content-Type: ' + value.headers['content-type']; - } - - header += FormData.LINE_BREAK + FormData.LINE_BREAK; - } - - return header; -}; - -FormData.prototype._multiPartFooter = function(field, value, options) { - return function(next) { - var footer = FormData.LINE_BREAK; - - var lastPart = (this._streams.length === 0); - if (lastPart) { - footer += this._lastBoundary(); - } - - next(footer); - }.bind(this); -}; - -FormData.prototype._lastBoundary = function() { - return '--' + this.getBoundary() + '--'; -}; - -FormData.prototype.getHeaders = function(userHeaders) { - var formHeaders = { - 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() - }; - - for (var header in userHeaders) { - formHeaders[header.toLowerCase()] = userHeaders[header]; - } - - return formHeaders; -} - -FormData.prototype.getCustomHeaders = function(contentType) { - contentType = contentType ? contentType : 'multipart/form-data'; - - var formHeaders = { - 'content-type': contentType + '; boundary=' + this.getBoundary(), - 'content-length': this.getLengthSync() - }; - - return formHeaders; -} - -FormData.prototype.getBoundary = function() { - if (!this._boundary) { - this._generateBoundary(); - } - - return this._boundary; -}; - -FormData.prototype._generateBoundary = function() { - // This generates a 50 character boundary similar to those used by Firefox. - // They are optimized for boyer-moore parsing. - var boundary = '--------------------------'; - for (var i = 0; i < 24; i++) { - boundary += Math.floor(Math.random() * 10).toString(16); - } - - this._boundary = boundary; -}; - -// Note: getLengthSync DOESN'T calculate streams length -// As workaround one can calculate file size manually -// and add it as knownLength option -FormData.prototype.getLengthSync = function(debug) { - var knownLength = this._overheadLength + this._valueLength; - - // Don't get confused, there are 3 "internal" streams for each keyval pair - // so it basically checks if there is any value added to the form - if (this._streams.length) { - knownLength += this._lastBoundary().length; - } - - // https://github.com/felixge/node-form-data/issues/40 - if (this._lengthRetrievers.length) { - // Some async length retrivers are present - // therefore synchronous length calculation is false. - // Please use getLength(callback) to get proper length - this._error(new Error('Cannot calculate proper length in synchronous way.')); - } - - return knownLength; -}; - -FormData.prototype.getLength = function(cb) { - var knownLength = this._overheadLength + this._valueLength; - - if (this._streams.length) { - knownLength += this._lastBoundary().length; - } - - if (!this._lengthRetrievers.length) { - process.nextTick(cb.bind(this, null, knownLength)); - return; - } - - async.parallel(this._lengthRetrievers, function(err, values) { - if (err) { - cb(err); - return; - } - - values.forEach(function(length) { - knownLength += length; - }); - - cb(null, knownLength); - }); -}; - -FormData.prototype.submit = function(params, cb) { - - var request - , options - , defaults = { - method : 'post', - headers: this.getHeaders() - }; - - // parse provided url if it's string - // or treat it as options object - if (typeof params == 'string') { - params = parseUrl(params); - - options = populate({ - port: params.port, - path: params.pathname, - host: params.hostname - }, defaults); - } - else // use custom params - { - options = populate(params, defaults); - // if no port provided use default one - if (!options.port) { - options.port = options.protocol == 'https:' ? 443 : 80; - } - } - - // https if specified, fallback to http in any other case - if (params.protocol == 'https:') { - request = https.request(options); - } else { - request = http.request(options); - } - - // get content length and fire away - this.getLength(function(err, length) { - - // TODO: Add chunked encoding when no length (if err) - - // add content length - request.setHeader('Content-Length', length); - - this.pipe(request); - if (cb) { - request.on('error', cb); - request.on('response', cb.bind(this, null)); - } - }.bind(this)); - - return request; -}; - -FormData.prototype._error = function(err) { - if (this.error) return; - - this.error = err; - this.pause(); - this.emit('error', err); -}; - -/* - * Santa's little helpers - */ - -// populates missing values -function populate(dst, src) { - for (var prop in src) { - if (!dst[prop]) dst[prop] = src[prop]; - } - return dst; -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/LICENSE deleted file mode 100644 index b7f9d500..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Caolan McMahon - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/README.md deleted file mode 100644 index 951f76e9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/README.md +++ /dev/null @@ -1,1425 +0,0 @@ -# Async.js - -Async is a utility module which provides straight-forward, powerful functions -for working with asynchronous JavaScript. Although originally designed for -use with [node.js](http://nodejs.org), it can also be used directly in the -browser. Also supports [component](https://github.com/component/component). - -Async provides around 20 functions that include the usual 'functional' -suspects (map, reduce, filter, each…) as well as some common patterns -for asynchronous control flow (parallel, series, waterfall…). All these -functions assume you follow the node.js convention of providing a single -callback as the last argument of your async function. - - -## Quick Examples - -```javascript -async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file -}); - -async.filter(['file1','file2','file3'], fs.exists, function(results){ - // results now equals an array of the existing files -}); - -async.parallel([ - function(){ ... }, - function(){ ... } -], callback); - -async.series([ - function(){ ... }, - function(){ ... } -]); -``` - -There are many more functions available so take a look at the docs below for a -full list. This module aims to be comprehensive, so if you feel anything is -missing please create a GitHub issue for it. - -## Common Pitfalls - -### Binding a context to an iterator - -This section is really about bind, not about async. If you are wondering how to -make async execute your iterators in a given context, or are confused as to why -a method of another library isn't working as an iterator, study this example: - -```js -// Here is a simple object with an (unnecessarily roundabout) squaring method -var AsyncSquaringLibrary = { - squareExponent: 2, - square: function(number, callback){ - var result = Math.pow(number, this.squareExponent); - setTimeout(function(){ - callback(null, result); - }, 200); - } -}; - -async.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){ - // result is [NaN, NaN, NaN] - // This fails because the `this.squareExponent` expression in the square - // function is not evaluated in the context of AsyncSquaringLibrary, and is - // therefore undefined. -}); - -async.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){ - // result is [1, 4, 9] - // With the help of bind we can attach a context to the iterator before - // passing it to async. Now the square function will be executed in its - // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent` - // will be as expected. -}); -``` - -## Download - -The source is available for download from -[GitHub](http://github.com/caolan/async). -Alternatively, you can install using Node Package Manager (npm): - - npm install async - -__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed - -## In the Browser - -So far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage: - -```html -<script type="text/javascript" src="async.js"></script> -<script type="text/javascript"> - - async.map(data, asyncProcess, function(err, results){ - alert(results); - }); - -</script> -``` - -## Documentation - -### Collections - -* [each](#each) -* [eachSeries](#eachSeries) -* [eachLimit](#eachLimit) -* [map](#map) -* [mapSeries](#mapSeries) -* [mapLimit](#mapLimit) -* [filter](#filter) -* [filterSeries](#filterSeries) -* [reject](#reject) -* [rejectSeries](#rejectSeries) -* [reduce](#reduce) -* [reduceRight](#reduceRight) -* [detect](#detect) -* [detectSeries](#detectSeries) -* [sortBy](#sortBy) -* [some](#some) -* [every](#every) -* [concat](#concat) -* [concatSeries](#concatSeries) - -### Control Flow - -* [series](#series) -* [parallel](#parallel) -* [parallelLimit](#parallellimittasks-limit-callback) -* [whilst](#whilst) -* [doWhilst](#doWhilst) -* [until](#until) -* [doUntil](#doUntil) -* [forever](#forever) -* [waterfall](#waterfall) -* [compose](#compose) -* [applyEach](#applyEach) -* [applyEachSeries](#applyEachSeries) -* [queue](#queue) -* [cargo](#cargo) -* [auto](#auto) -* [iterator](#iterator) -* [apply](#apply) -* [nextTick](#nextTick) -* [times](#times) -* [timesSeries](#timesSeries) - -### Utils - -* [memoize](#memoize) -* [unmemoize](#unmemoize) -* [log](#log) -* [dir](#dir) -* [noConflict](#noConflict) - - -## Collections - -<a name="forEach" /> -<a name="each" /> -### each(arr, iterator, callback) - -Applies an iterator function to each item in an array, in parallel. -The iterator is called with an item from the list and a callback for when it -has finished. If the iterator passes an error to this callback, the main -callback for the each function is immediately called with the error. - -Note, that since this function applies the iterator to each item in parallel -there is no guarantee that the iterator functions will complete in order. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback(err) which must be called once it has - completed. If no error has occured, the callback should be run without - arguments or with an explicit null argument. -* callback(err) - A callback which is called after all the iterator functions - have finished, or an error has occurred. - -__Example__ - -```js -// assuming openFiles is an array of file names and saveFile is a function -// to save the modified contents of that file: - -async.each(openFiles, saveFile, function(err){ - // if any of the saves produced an error, err would equal that error -}); -``` - ---------------------------------------- - -<a name="forEachSeries" /> -<a name="eachSeries" /> -### eachSeries(arr, iterator, callback) - -The same as each only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. This means the iterator functions will complete in order. - - ---------------------------------------- - -<a name="forEachLimit" /> -<a name="eachLimit" /> -### eachLimit(arr, limit, iterator, callback) - -The same as each only no more than "limit" iterators will be simultaneously -running at any time. - -Note that the items are not processed in batches, so there is no guarantee that - the first "limit" iterator functions will complete before any others are -started. - -__Arguments__ - -* arr - An array to iterate over. -* limit - The maximum number of iterators to run at any time. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback(err) which must be called once it has - completed. If no error has occured, the callback should be run without - arguments or with an explicit null argument. -* callback(err) - A callback which is called after all the iterator functions - have finished, or an error has occurred. - -__Example__ - -```js -// Assume documents is an array of JSON objects and requestApi is a -// function that interacts with a rate-limited REST api. - -async.eachLimit(documents, 20, requestApi, function(err){ - // if any of the saves produced an error, err would equal that error -}); -``` - ---------------------------------------- - -<a name="map" /> -### map(arr, iterator, callback) - -Produces a new array of values by mapping each value in the given array through -the iterator function. The iterator is called with an item from the array and a -callback for when it has finished processing. The callback takes 2 arguments, -an error and the transformed item from the array. If the iterator passes an -error to this callback, the main callback for the map function is immediately -called with the error. - -Note, that since this function applies the iterator to each item in parallel -there is no guarantee that the iterator functions will complete in order, however -the results array will be in the same order as the original array. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback(err, transformed) which must be called once - it has completed with an error (which can be null) and a transformed item. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is an array of the - transformed items from the original array. - -__Example__ - -```js -async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file -}); -``` - ---------------------------------------- - -<a name="mapSeries" /> -### mapSeries(arr, iterator, callback) - -The same as map only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. The results array will be in the same order as the original. - - ---------------------------------------- - -<a name="mapLimit" /> -### mapLimit(arr, limit, iterator, callback) - -The same as map only no more than "limit" iterators will be simultaneously -running at any time. - -Note that the items are not processed in batches, so there is no guarantee that - the first "limit" iterator functions will complete before any others are -started. - -__Arguments__ - -* arr - An array to iterate over. -* limit - The maximum number of iterators to run at any time. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback(err, transformed) which must be called once - it has completed with an error (which can be null) and a transformed item. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is an array of the - transformed items from the original array. - -__Example__ - -```js -async.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){ - // results is now an array of stats for each file -}); -``` - ---------------------------------------- - -<a name="filter" /> -### filter(arr, iterator, callback) - -__Alias:__ select - -Returns a new array of all the values which pass an async truth test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like fs.exists. This operation is -performed in parallel, but the results array will be in the same order as the -original. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback(truthValue) which must be called with a - boolean argument once it has completed. -* callback(results) - A callback which is called after all the iterator - functions have finished. - -__Example__ - -```js -async.filter(['file1','file2','file3'], fs.exists, function(results){ - // results now equals an array of the existing files -}); -``` - ---------------------------------------- - -<a name="filterSeries" /> -### filterSeries(arr, iterator, callback) - -__alias:__ selectSeries - -The same as filter only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. The results array will be in the same order as the original. - ---------------------------------------- - -<a name="reject" /> -### reject(arr, iterator, callback) - -The opposite of filter. Removes values that pass an async truth test. - ---------------------------------------- - -<a name="rejectSeries" /> -### rejectSeries(arr, iterator, callback) - -The same as reject, only the iterator is applied to each item in the array -in series. - - ---------------------------------------- - -<a name="reduce" /> -### reduce(arr, memo, iterator, callback) - -__aliases:__ inject, foldl - -Reduces a list of values into a single value using an async iterator to return -each successive step. Memo is the initial state of the reduction. This -function only operates in series. For performance reasons, it may make sense to -split a call to this function into a parallel map, then use the normal -Array.prototype.reduce on the results. This function is for situations where -each step in the reduction needs to be async, if you can get the data before -reducing it then it's probably a good idea to do so. - -__Arguments__ - -* arr - An array to iterate over. -* memo - The initial state of the reduction. -* iterator(memo, item, callback) - A function applied to each item in the - array to produce the next step in the reduction. The iterator is passed a - callback(err, reduction) which accepts an optional error as its first - argument, and the state of the reduction as the second. If an error is - passed to the callback, the reduction is stopped and the main callback is - immediately called with the error. -* callback(err, result) - A callback which is called after all the iterator - functions have finished. Result is the reduced value. - -__Example__ - -```js -async.reduce([1,2,3], 0, function(memo, item, callback){ - // pointless async: - process.nextTick(function(){ - callback(null, memo + item) - }); -}, function(err, result){ - // result is now equal to the last value of memo, which is 6 -}); -``` - ---------------------------------------- - -<a name="reduceRight" /> -### reduceRight(arr, memo, iterator, callback) - -__Alias:__ foldr - -Same as reduce, only operates on the items in the array in reverse order. - - ---------------------------------------- - -<a name="detect" /> -### detect(arr, iterator, callback) - -Returns the first value in a list that passes an async truth test. The -iterator is applied in parallel, meaning the first iterator to return true will -fire the detect callback with that result. That means the result might not be -the first item in the original array (in terms of order) that passes the test. - -If order within the original array is important then look at detectSeries. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback(truthValue) which must be called with a - boolean argument once it has completed. -* callback(result) - A callback which is called as soon as any iterator returns - true, or after all the iterator functions have finished. Result will be - the first item in the array that passes the truth test (iterator) or the - value undefined if none passed. - -__Example__ - -```js -async.detect(['file1','file2','file3'], fs.exists, function(result){ - // result now equals the first file in the list that exists -}); -``` - ---------------------------------------- - -<a name="detectSeries" /> -### detectSeries(arr, iterator, callback) - -The same as detect, only the iterator is applied to each item in the array -in series. This means the result is always the first in the original array (in -terms of array order) that passes the truth test. - - ---------------------------------------- - -<a name="sortBy" /> -### sortBy(arr, iterator, callback) - -Sorts a list by the results of running each value through an async iterator. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback(err, sortValue) which must be called once it - has completed with an error (which can be null) and a value to use as the sort - criteria. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is the items from - the original array sorted by the values returned by the iterator calls. - -__Example__ - -```js -async.sortBy(['file1','file2','file3'], function(file, callback){ - fs.stat(file, function(err, stats){ - callback(err, stats.mtime); - }); -}, function(err, results){ - // results is now the original array of files sorted by - // modified date -}); -``` - ---------------------------------------- - -<a name="some" /> -### some(arr, iterator, callback) - -__Alias:__ any - -Returns true if at least one element in the array satisfies an async test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like fs.exists. Once any iterator -call returns true, the main callback is immediately called. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback(truthValue) which must be called with a - boolean argument once it has completed. -* callback(result) - A callback which is called as soon as any iterator returns - true, or after all the iterator functions have finished. Result will be - either true or false depending on the values of the async tests. - -__Example__ - -```js -async.some(['file1','file2','file3'], fs.exists, function(result){ - // if result is true then at least one of the files exists -}); -``` - ---------------------------------------- - -<a name="every" /> -### every(arr, iterator, callback) - -__Alias:__ all - -Returns true if every element in the array satisfies an async test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like fs.exists. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback(truthValue) which must be called with a - boolean argument once it has completed. -* callback(result) - A callback which is called after all the iterator - functions have finished. Result will be either true or false depending on - the values of the async tests. - -__Example__ - -```js -async.every(['file1','file2','file3'], fs.exists, function(result){ - // if result is true then every file exists -}); -``` - ---------------------------------------- - -<a name="concat" /> -### concat(arr, iterator, callback) - -Applies an iterator to each item in a list, concatenating the results. Returns the -concatenated list. The iterators are called in parallel, and the results are -concatenated as they return. There is no guarantee that the results array will -be returned in the original order of the arguments passed to the iterator function. - -__Arguments__ - -* arr - An array to iterate over -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback(err, results) which must be called once it - has completed with an error (which can be null) and an array of results. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is an array containing - the concatenated results of the iterator function. - -__Example__ - -```js -async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ - // files is now a list of filenames that exist in the 3 directories -}); -``` - ---------------------------------------- - -<a name="concatSeries" /> -### concatSeries(arr, iterator, callback) - -Same as async.concat, but executes in series instead of parallel. - - -## Control Flow - -<a name="series" /> -### series(tasks, [callback]) - -Run an array of functions in series, each one running once the previous -function has completed. If any functions in the series pass an error to its -callback, no more functions are run and the callback for the series is -immediately called with the value of the error. Once the tasks have completed, -the results are passed to the final callback as an array. - -It is also possible to use an object instead of an array. Each property will be -run as a function and the results will be passed to the final callback as an object -instead of an array. This can be a more readable way of handling results from -async.series. - - -__Arguments__ - -* tasks - An array or object containing functions to run, each function is passed - a callback(err, result) it must call on completion with an error (which can - be null) and an optional result value. -* callback(err, results) - An optional callback to run once all the functions - have completed. This function gets a results array (or object) containing all - the result arguments passed to the task callbacks. - -__Example__ - -```js -async.series([ - function(callback){ - // do some stuff ... - callback(null, 'one'); - }, - function(callback){ - // do some more stuff ... - callback(null, 'two'); - } -], -// optional callback -function(err, results){ - // results is now equal to ['one', 'two'] -}); - - -// an example using an object instead of an array -async.series({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - } -}, -function(err, results) { - // results is now equal to: {one: 1, two: 2} -}); -``` - ---------------------------------------- - -<a name="parallel" /> -### parallel(tasks, [callback]) - -Run an array of functions in parallel, without waiting until the previous -function has completed. If any of the functions pass an error to its -callback, the main callback is immediately called with the value of the error. -Once the tasks have completed, the results are passed to the final callback as an -array. - -It is also possible to use an object instead of an array. Each property will be -run as a function and the results will be passed to the final callback as an object -instead of an array. This can be a more readable way of handling results from -async.parallel. - - -__Arguments__ - -* tasks - An array or object containing functions to run, each function is passed - a callback(err, result) it must call on completion with an error (which can - be null) and an optional result value. -* callback(err, results) - An optional callback to run once all the functions - have completed. This function gets a results array (or object) containing all - the result arguments passed to the task callbacks. - -__Example__ - -```js -async.parallel([ - function(callback){ - setTimeout(function(){ - callback(null, 'one'); - }, 200); - }, - function(callback){ - setTimeout(function(){ - callback(null, 'two'); - }, 100); - } -], -// optional callback -function(err, results){ - // the results array will equal ['one','two'] even though - // the second function had a shorter timeout. -}); - - -// an example using an object instead of an array -async.parallel({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - } -}, -function(err, results) { - // results is now equals to: {one: 1, two: 2} -}); -``` - ---------------------------------------- - -<a name="parallel" /> -### parallelLimit(tasks, limit, [callback]) - -The same as parallel only the tasks are executed in parallel with a maximum of "limit" -tasks executing at any time. - -Note that the tasks are not executed in batches, so there is no guarantee that -the first "limit" tasks will complete before any others are started. - -__Arguments__ - -* tasks - An array or object containing functions to run, each function is passed - a callback(err, result) it must call on completion with an error (which can - be null) and an optional result value. -* limit - The maximum number of tasks to run at any time. -* callback(err, results) - An optional callback to run once all the functions - have completed. This function gets a results array (or object) containing all - the result arguments passed to the task callbacks. - ---------------------------------------- - -<a name="whilst" /> -### whilst(test, fn, callback) - -Repeatedly call fn, while test returns true. Calls the callback when stopped, -or an error occurs. - -__Arguments__ - -* test() - synchronous truth test to perform before each execution of fn. -* fn(callback) - A function to call each time the test passes. The function is - passed a callback(err) which must be called once it has completed with an - optional error argument. -* callback(err) - A callback which is called after the test fails and repeated - execution of fn has stopped. - -__Example__ - -```js -var count = 0; - -async.whilst( - function () { return count < 5; }, - function (callback) { - count++; - setTimeout(callback, 1000); - }, - function (err) { - // 5 seconds have passed - } -); -``` - ---------------------------------------- - -<a name="doWhilst" /> -### doWhilst(fn, test, callback) - -The post check version of whilst. To reflect the difference in the order of operations `test` and `fn` arguments are switched. `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. - ---------------------------------------- - -<a name="until" /> -### until(test, fn, callback) - -Repeatedly call fn, until test returns true. Calls the callback when stopped, -or an error occurs. - -The inverse of async.whilst. - ---------------------------------------- - -<a name="doUntil" /> -### doUntil(fn, test, callback) - -Like doWhilst except the test is inverted. Note the argument ordering differs from `until`. - ---------------------------------------- - -<a name="forever" /> -### forever(fn, callback) - -Calls the asynchronous function 'fn' repeatedly, in series, indefinitely. -If an error is passed to fn's callback then 'callback' is called with the -error, otherwise it will never be called. - ---------------------------------------- - -<a name="waterfall" /> -### waterfall(tasks, [callback]) - -Runs an array of functions in series, each passing their results to the next in -the array. However, if any of the functions pass an error to the callback, the -next function is not executed and the main callback is immediately called with -the error. - -__Arguments__ - -* tasks - An array of functions to run, each function is passed a - callback(err, result1, result2, ...) it must call on completion. The first - argument is an error (which can be null) and any further arguments will be - passed as arguments in order to the next task. -* callback(err, [results]) - An optional callback to run once all the functions - have completed. This will be passed the results of the last task's callback. - - - -__Example__ - -```js -async.waterfall([ - function(callback){ - callback(null, 'one', 'two'); - }, - function(arg1, arg2, callback){ - callback(null, 'three'); - }, - function(arg1, callback){ - // arg1 now equals 'three' - callback(null, 'done'); - } -], function (err, result) { - // result now equals 'done' -}); -``` - ---------------------------------------- -<a name="compose" /> -### compose(fn1, fn2...) - -Creates a function which is a composition of the passed asynchronous -functions. Each function consumes the return value of the function that -follows. Composing functions f(), g() and h() would produce the result of -f(g(h())), only this version uses callbacks to obtain the return values. - -Each function is executed with the `this` binding of the composed function. - -__Arguments__ - -* functions... - the asynchronous functions to compose - - -__Example__ - -```js -function add1(n, callback) { - setTimeout(function () { - callback(null, n + 1); - }, 10); -} - -function mul3(n, callback) { - setTimeout(function () { - callback(null, n * 3); - }, 10); -} - -var add1mul3 = async.compose(mul3, add1); - -add1mul3(4, function (err, result) { - // result now equals 15 -}); -``` - ---------------------------------------- -<a name="applyEach" /> -### applyEach(fns, args..., callback) - -Applies the provided arguments to each function in the array, calling the -callback after all functions have completed. If you only provide the first -argument then it will return a function which lets you pass in the -arguments as if it were a single function call. - -__Arguments__ - -* fns - the asynchronous functions to all call with the same arguments -* args... - any number of separate arguments to pass to the function -* callback - the final argument should be the callback, called when all - functions have completed processing - - -__Example__ - -```js -async.applyEach([enableSearch, updateSchema], 'bucket', callback); - -// partial application example: -async.each( - buckets, - async.applyEach([enableSearch, updateSchema]), - callback -); -``` - ---------------------------------------- - -<a name="applyEachSeries" /> -### applyEachSeries(arr, iterator, callback) - -The same as applyEach only the functions are applied in series. - ---------------------------------------- - -<a name="queue" /> -### queue(worker, concurrency) - -Creates a queue object with the specified concurrency. Tasks added to the -queue will be processed in parallel (up to the concurrency limit). If all -workers are in progress, the task is queued until one is available. Once -a worker has completed a task, the task's callback is called. - -__Arguments__ - -* worker(task, callback) - An asynchronous function for processing a queued - task, which must call its callback(err) argument when finished, with an - optional error as an argument. -* concurrency - An integer for determining how many worker functions should be - run in parallel. - -__Queue objects__ - -The queue object returned by this function has the following properties and -methods: - -* length() - a function returning the number of items waiting to be processed. -* concurrency - an integer for determining how many worker functions should be - run in parallel. This property can be changed after a queue is created to - alter the concurrency on-the-fly. -* push(task, [callback]) - add a new task to the queue, the callback is called - once the worker has finished processing the task. - instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list. -* unshift(task, [callback]) - add a new task to the front of the queue. -* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued -* empty - a callback that is called when the last item from the queue is given to a worker -* drain - a callback that is called when the last item from the queue has returned from the worker - -__Example__ - -```js -// create a queue object with concurrency 2 - -var q = async.queue(function (task, callback) { - console.log('hello ' + task.name); - callback(); -}, 2); - - -// assign a callback -q.drain = function() { - console.log('all items have been processed'); -} - -// add some items to the queue - -q.push({name: 'foo'}, function (err) { - console.log('finished processing foo'); -}); -q.push({name: 'bar'}, function (err) { - console.log('finished processing bar'); -}); - -// add some items to the queue (batch-wise) - -q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) { - console.log('finished processing bar'); -}); - -// add some items to the front of the queue - -q.unshift({name: 'bar'}, function (err) { - console.log('finished processing bar'); -}); -``` - ---------------------------------------- - -<a name="cargo" /> -### cargo(worker, [payload]) - -Creates a cargo object with the specified payload. Tasks added to the -cargo will be processed altogether (up to the payload limit). If the -worker is in progress, the task is queued until it is available. Once -the worker has completed some tasks, each callback of those tasks is called. - -__Arguments__ - -* worker(tasks, callback) - An asynchronous function for processing an array of - queued tasks, which must call its callback(err) argument when finished, with - an optional error as an argument. -* payload - An optional integer for determining how many tasks should be - processed per round; if omitted, the default is unlimited. - -__Cargo objects__ - -The cargo object returned by this function has the following properties and -methods: - -* length() - a function returning the number of items waiting to be processed. -* payload - an integer for determining how many tasks should be - process per round. This property can be changed after a cargo is created to - alter the payload on-the-fly. -* push(task, [callback]) - add a new task to the queue, the callback is called - once the worker has finished processing the task. - instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list. -* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued -* empty - a callback that is called when the last item from the queue is given to a worker -* drain - a callback that is called when the last item from the queue has returned from the worker - -__Example__ - -```js -// create a cargo object with payload 2 - -var cargo = async.cargo(function (tasks, callback) { - for(var i=0; i<tasks.length; i++){ - console.log('hello ' + tasks[i].name); - } - callback(); -}, 2); - - -// add some items - -cargo.push({name: 'foo'}, function (err) { - console.log('finished processing foo'); -}); -cargo.push({name: 'bar'}, function (err) { - console.log('finished processing bar'); -}); -cargo.push({name: 'baz'}, function (err) { - console.log('finished processing baz'); -}); -``` - ---------------------------------------- - -<a name="auto" /> -### auto(tasks, [callback]) - -Determines the best order for running functions based on their requirements. -Each function can optionally depend on other functions being completed first, -and each function is run as soon as its requirements are satisfied. If any of -the functions pass an error to their callback, that function will not complete -(so any other functions depending on it will not run) and the main callback -will be called immediately with the error. Functions also receive an object -containing the results of functions which have completed so far. - -Note, all functions are called with a results object as a second argument, -so it is unsafe to pass functions in the tasks object which cannot handle the -extra argument. For example, this snippet of code: - -```js -async.auto({ - readData: async.apply(fs.readFile, 'data.txt', 'utf-8') -}, callback); -``` - -will have the effect of calling readFile with the results object as the last -argument, which will fail: - -```js -fs.readFile('data.txt', 'utf-8', cb, {}); -``` - -Instead, wrap the call to readFile in a function which does not forward the -results object: - -```js -async.auto({ - readData: function(cb, results){ - fs.readFile('data.txt', 'utf-8', cb); - } -}, callback); -``` - -__Arguments__ - -* tasks - An object literal containing named functions or an array of - requirements, with the function itself the last item in the array. The key - used for each function or array is used when specifying requirements. The - function receives two arguments: (1) a callback(err, result) which must be - called when finished, passing an error (which can be null) and the result of - the function's execution, and (2) a results object, containing the results of - the previously executed functions. -* callback(err, results) - An optional callback which is called when all the - tasks have been completed. The callback will receive an error as an argument - if any tasks pass an error to their callback. Results will always be passed - but if an error occurred, no other tasks will be performed, and the results - object will only contain partial results. - - -__Example__ - -```js -async.auto({ - get_data: function(callback){ - // async code to get some data - }, - make_folder: function(callback){ - // async code to create a directory to store a file in - // this is run at the same time as getting the data - }, - write_file: ['get_data', 'make_folder', function(callback){ - // once there is some data and the directory exists, - // write the data to a file in the directory - callback(null, filename); - }], - email_link: ['write_file', function(callback, results){ - // once the file is written let's email a link to it... - // results.write_file contains the filename returned by write_file. - }] -}); -``` - -This is a fairly trivial example, but to do this using the basic parallel and -series functions would look like this: - -```js -async.parallel([ - function(callback){ - // async code to get some data - }, - function(callback){ - // async code to create a directory to store a file in - // this is run at the same time as getting the data - } -], -function(err, results){ - async.series([ - function(callback){ - // once there is some data and the directory exists, - // write the data to a file in the directory - }, - function(callback){ - // once the file is written let's email a link to it... - } - ]); -}); -``` - -For a complicated series of async tasks using the auto function makes adding -new tasks much easier and makes the code more readable. - - ---------------------------------------- - -<a name="iterator" /> -### iterator(tasks) - -Creates an iterator function which calls the next function in the array, -returning a continuation to call the next one after that. It's also possible to -'peek' the next iterator by doing iterator.next(). - -This function is used internally by the async module but can be useful when -you want to manually control the flow of functions in series. - -__Arguments__ - -* tasks - An array of functions to run. - -__Example__ - -```js -var iterator = async.iterator([ - function(){ sys.p('one'); }, - function(){ sys.p('two'); }, - function(){ sys.p('three'); } -]); - -node> var iterator2 = iterator(); -'one' -node> var iterator3 = iterator2(); -'two' -node> iterator3(); -'three' -node> var nextfn = iterator2.next(); -node> nextfn(); -'three' -``` - ---------------------------------------- - -<a name="apply" /> -### apply(function, arguments..) - -Creates a continuation function with some arguments already applied, a useful -shorthand when combined with other control flow functions. Any arguments -passed to the returned function are added to the arguments originally passed -to apply. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to automatically apply when the - continuation is called. - -__Example__ - -```js -// using apply - -async.parallel([ - async.apply(fs.writeFile, 'testfile1', 'test1'), - async.apply(fs.writeFile, 'testfile2', 'test2'), -]); - - -// the same process without using apply - -async.parallel([ - function(callback){ - fs.writeFile('testfile1', 'test1', callback); - }, - function(callback){ - fs.writeFile('testfile2', 'test2', callback); - } -]); -``` - -It's possible to pass any number of additional arguments when calling the -continuation: - -```js -node> var fn = async.apply(sys.puts, 'one'); -node> fn('two', 'three'); -one -two -three -``` - ---------------------------------------- - -<a name="nextTick" /> -### nextTick(callback) - -Calls the callback on a later loop around the event loop. In node.js this just -calls process.nextTick, in the browser it falls back to setImmediate(callback) -if available, otherwise setTimeout(callback, 0), which means other higher priority -events may precede the execution of the callback. - -This is used internally for browser-compatibility purposes. - -__Arguments__ - -* callback - The function to call on a later loop around the event loop. - -__Example__ - -```js -var call_order = []; -async.nextTick(function(){ - call_order.push('two'); - // call_order now equals ['one','two'] -}); -call_order.push('one') -``` - -<a name="times" /> -### times(n, callback) - -Calls the callback n times and accumulates results in the same manner -you would use with async.map. - -__Arguments__ - -* n - The number of times to run the function. -* callback - The function to call n times. - -__Example__ - -```js -// Pretend this is some complicated async factory -var createUser = function(id, callback) { - callback(null, { - id: 'user' + id - }) -} -// generate 5 users -async.times(5, function(n, next){ - createUser(n, function(err, user) { - next(err, user) - }) -}, function(err, users) { - // we should now have 5 users -}); -``` - -<a name="timesSeries" /> -### timesSeries(n, callback) - -The same as times only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. The results array will be in the same order as the original. - - -## Utils - -<a name="memoize" /> -### memoize(fn, [hasher]) - -Caches the results of an async function. When creating a hash to store function -results against, the callback is omitted from the hash and an optional hash -function can be used. - -The cache of results is exposed as the `memo` property of the function returned -by `memoize`. - -__Arguments__ - -* fn - the function you to proxy and cache results from. -* hasher - an optional function for generating a custom hash for storing - results, it has all the arguments applied to it apart from the callback, and - must be synchronous. - -__Example__ - -```js -var slow_fn = function (name, callback) { - // do something - callback(null, result); -}; -var fn = async.memoize(slow_fn); - -// fn can now be used as if it were slow_fn -fn('some name', function () { - // callback -}); -``` - -<a name="unmemoize" /> -### unmemoize(fn) - -Undoes a memoized function, reverting it to the original, unmemoized -form. Comes handy in tests. - -__Arguments__ - -* fn - the memoized function - -<a name="log" /> -### log(function, arguments) - -Logs the result of an async function to the console. Only works in node.js or -in browsers that support console.log and console.error (such as FF and Chrome). -If multiple arguments are returned from the async function, console.log is -called on each argument in order. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to apply to the function. - -__Example__ - -```js -var hello = function(name, callback){ - setTimeout(function(){ - callback(null, 'hello ' + name); - }, 1000); -}; -``` -```js -node> async.log(hello, 'world'); -'hello world' -``` - ---------------------------------------- - -<a name="dir" /> -### dir(function, arguments) - -Logs the result of an async function to the console using console.dir to -display the properties of the resulting object. Only works in node.js or -in browsers that support console.dir and console.error (such as FF and Chrome). -If multiple arguments are returned from the async function, console.dir is -called on each argument in order. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to apply to the function. - -__Example__ - -```js -var hello = function(name, callback){ - setTimeout(function(){ - callback(null, {hello: name}); - }, 1000); -}; -``` -```js -node> async.dir(hello, 'world'); -{hello: 'world'} -``` - ---------------------------------------- - -<a name="noConflict" /> -### noConflict() - -Changes the value of async back to its original value, returning a reference to the -async object. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/component.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/component.json deleted file mode 100644 index bbb01154..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/component.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "async", - "repo": "caolan/async", - "description": "Higher-order functions and common patterns for asynchronous code", - "version": "0.1.23", - "keywords": [], - "dependencies": {}, - "development": {}, - "main": "lib/async.js", - "scripts": [ "lib/async.js" ] -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js deleted file mode 100755 index 1eebb153..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js +++ /dev/null @@ -1,958 +0,0 @@ -/*global setImmediate: false, setTimeout: false, console: false */ -(function () { - - var async = {}; - - // global on the server, window in the browser - var root, previous_async; - - root = this; - if (root != null) { - previous_async = root.async; - } - - async.noConflict = function () { - root.async = previous_async; - return async; - }; - - function only_once(fn) { - var called = false; - return function() { - if (called) throw new Error("Callback was already called."); - called = true; - fn.apply(root, arguments); - } - } - - //// cross-browser compatiblity functions //// - - var _each = function (arr, iterator) { - if (arr.forEach) { - return arr.forEach(iterator); - } - for (var i = 0; i < arr.length; i += 1) { - iterator(arr[i], i, arr); - } - }; - - var _map = function (arr, iterator) { - if (arr.map) { - return arr.map(iterator); - } - var results = []; - _each(arr, function (x, i, a) { - results.push(iterator(x, i, a)); - }); - return results; - }; - - var _reduce = function (arr, iterator, memo) { - if (arr.reduce) { - return arr.reduce(iterator, memo); - } - _each(arr, function (x, i, a) { - memo = iterator(memo, x, i, a); - }); - return memo; - }; - - var _keys = function (obj) { - if (Object.keys) { - return Object.keys(obj); - } - var keys = []; - for (var k in obj) { - if (obj.hasOwnProperty(k)) { - keys.push(k); - } - } - return keys; - }; - - //// exported async module functions //// - - //// nextTick implementation with browser-compatible fallback //// - if (typeof process === 'undefined' || !(process.nextTick)) { - if (typeof setImmediate === 'function') { - async.nextTick = function (fn) { - // not a direct alias for IE10 compatibility - setImmediate(fn); - }; - async.setImmediate = async.nextTick; - } - else { - async.nextTick = function (fn) { - setTimeout(fn, 0); - }; - async.setImmediate = async.nextTick; - } - } - else { - async.nextTick = process.nextTick; - if (typeof setImmediate !== 'undefined') { - async.setImmediate = function (fn) { - // not a direct alias for IE10 compatibility - setImmediate(fn); - }; - } - else { - async.setImmediate = async.nextTick; - } - } - - async.each = function (arr, iterator, callback) { - callback = callback || function () {}; - if (!arr.length) { - return callback(); - } - var completed = 0; - _each(arr, function (x) { - iterator(x, only_once(function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - if (completed >= arr.length) { - callback(null); - } - } - })); - }); - }; - async.forEach = async.each; - - async.eachSeries = function (arr, iterator, callback) { - callback = callback || function () {}; - if (!arr.length) { - return callback(); - } - var completed = 0; - var iterate = function () { - iterator(arr[completed], function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - if (completed >= arr.length) { - callback(null); - } - else { - iterate(); - } - } - }); - }; - iterate(); - }; - async.forEachSeries = async.eachSeries; - - async.eachLimit = function (arr, limit, iterator, callback) { - var fn = _eachLimit(limit); - fn.apply(null, [arr, iterator, callback]); - }; - async.forEachLimit = async.eachLimit; - - var _eachLimit = function (limit) { - - return function (arr, iterator, callback) { - callback = callback || function () {}; - if (!arr.length || limit <= 0) { - return callback(); - } - var completed = 0; - var started = 0; - var running = 0; - - (function replenish () { - if (completed >= arr.length) { - return callback(); - } - - while (running < limit && started < arr.length) { - started += 1; - running += 1; - iterator(arr[started - 1], function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - running -= 1; - if (completed >= arr.length) { - callback(); - } - else { - replenish(); - } - } - }); - } - })(); - }; - }; - - - var doParallel = function (fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [async.each].concat(args)); - }; - }; - var doParallelLimit = function(limit, fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [_eachLimit(limit)].concat(args)); - }; - }; - var doSeries = function (fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [async.eachSeries].concat(args)); - }; - }; - - - var _asyncMap = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (err, v) { - results[x.index] = v; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - }; - async.map = doParallel(_asyncMap); - async.mapSeries = doSeries(_asyncMap); - async.mapLimit = function (arr, limit, iterator, callback) { - return _mapLimit(limit)(arr, iterator, callback); - }; - - var _mapLimit = function(limit) { - return doParallelLimit(limit, _asyncMap); - }; - - // reduce only has a series version, as doing reduce in parallel won't - // work in many situations. - async.reduce = function (arr, memo, iterator, callback) { - async.eachSeries(arr, function (x, callback) { - iterator(memo, x, function (err, v) { - memo = v; - callback(err); - }); - }, function (err) { - callback(err, memo); - }); - }; - // inject alias - async.inject = async.reduce; - // foldl alias - async.foldl = async.reduce; - - async.reduceRight = function (arr, memo, iterator, callback) { - var reversed = _map(arr, function (x) { - return x; - }).reverse(); - async.reduce(reversed, memo, iterator, callback); - }; - // foldr alias - async.foldr = async.reduceRight; - - var _filter = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (v) { - if (v) { - results.push(x); - } - callback(); - }); - }, function (err) { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - }; - async.filter = doParallel(_filter); - async.filterSeries = doSeries(_filter); - // select alias - async.select = async.filter; - async.selectSeries = async.filterSeries; - - var _reject = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (v) { - if (!v) { - results.push(x); - } - callback(); - }); - }, function (err) { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - }; - async.reject = doParallel(_reject); - async.rejectSeries = doSeries(_reject); - - var _detect = function (eachfn, arr, iterator, main_callback) { - eachfn(arr, function (x, callback) { - iterator(x, function (result) { - if (result) { - main_callback(x); - main_callback = function () {}; - } - else { - callback(); - } - }); - }, function (err) { - main_callback(); - }); - }; - async.detect = doParallel(_detect); - async.detectSeries = doSeries(_detect); - - async.some = function (arr, iterator, main_callback) { - async.each(arr, function (x, callback) { - iterator(x, function (v) { - if (v) { - main_callback(true); - main_callback = function () {}; - } - callback(); - }); - }, function (err) { - main_callback(false); - }); - }; - // any alias - async.any = async.some; - - async.every = function (arr, iterator, main_callback) { - async.each(arr, function (x, callback) { - iterator(x, function (v) { - if (!v) { - main_callback(false); - main_callback = function () {}; - } - callback(); - }); - }, function (err) { - main_callback(true); - }); - }; - // all alias - async.all = async.every; - - async.sortBy = function (arr, iterator, callback) { - async.map(arr, function (x, callback) { - iterator(x, function (err, criteria) { - if (err) { - callback(err); - } - else { - callback(null, {value: x, criteria: criteria}); - } - }); - }, function (err, results) { - if (err) { - return callback(err); - } - else { - var fn = function (left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }; - callback(null, _map(results.sort(fn), function (x) { - return x.value; - })); - } - }); - }; - - async.auto = function (tasks, callback) { - callback = callback || function () {}; - var keys = _keys(tasks); - if (!keys.length) { - return callback(null); - } - - var results = {}; - - var listeners = []; - var addListener = function (fn) { - listeners.unshift(fn); - }; - var removeListener = function (fn) { - for (var i = 0; i < listeners.length; i += 1) { - if (listeners[i] === fn) { - listeners.splice(i, 1); - return; - } - } - }; - var taskComplete = function () { - _each(listeners.slice(0), function (fn) { - fn(); - }); - }; - - addListener(function () { - if (_keys(results).length === keys.length) { - callback(null, results); - callback = function () {}; - } - }); - - _each(keys, function (k) { - var task = (tasks[k] instanceof Function) ? [tasks[k]]: tasks[k]; - var taskCallback = function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - if (err) { - var safeResults = {}; - _each(_keys(results), function(rkey) { - safeResults[rkey] = results[rkey]; - }); - safeResults[k] = args; - callback(err, safeResults); - // stop subsequent errors hitting callback multiple times - callback = function () {}; - } - else { - results[k] = args; - async.setImmediate(taskComplete); - } - }; - var requires = task.slice(0, Math.abs(task.length - 1)) || []; - var ready = function () { - return _reduce(requires, function (a, x) { - return (a && results.hasOwnProperty(x)); - }, true) && !results.hasOwnProperty(k); - }; - if (ready()) { - task[task.length - 1](taskCallback, results); - } - else { - var listener = function () { - if (ready()) { - removeListener(listener); - task[task.length - 1](taskCallback, results); - } - }; - addListener(listener); - } - }); - }; - - async.waterfall = function (tasks, callback) { - callback = callback || function () {}; - if (tasks.constructor !== Array) { - var err = new Error('First argument to waterfall must be an array of functions'); - return callback(err); - } - if (!tasks.length) { - return callback(); - } - var wrapIterator = function (iterator) { - return function (err) { - if (err) { - callback.apply(null, arguments); - callback = function () {}; - } - else { - var args = Array.prototype.slice.call(arguments, 1); - var next = iterator.next(); - if (next) { - args.push(wrapIterator(next)); - } - else { - args.push(callback); - } - async.setImmediate(function () { - iterator.apply(null, args); - }); - } - }; - }; - wrapIterator(async.iterator(tasks))(); - }; - - var _parallel = function(eachfn, tasks, callback) { - callback = callback || function () {}; - if (tasks.constructor === Array) { - eachfn.map(tasks, function (fn, callback) { - if (fn) { - fn(function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - callback.call(null, err, args); - }); - } - }, callback); - } - else { - var results = {}; - eachfn.each(_keys(tasks), function (k, callback) { - tasks[k](function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - - async.parallel = function (tasks, callback) { - _parallel({ map: async.map, each: async.each }, tasks, callback); - }; - - async.parallelLimit = function(tasks, limit, callback) { - _parallel({ map: _mapLimit(limit), each: _eachLimit(limit) }, tasks, callback); - }; - - async.series = function (tasks, callback) { - callback = callback || function () {}; - if (tasks.constructor === Array) { - async.mapSeries(tasks, function (fn, callback) { - if (fn) { - fn(function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - callback.call(null, err, args); - }); - } - }, callback); - } - else { - var results = {}; - async.eachSeries(_keys(tasks), function (k, callback) { - tasks[k](function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - - async.iterator = function (tasks) { - var makeCallback = function (index) { - var fn = function () { - if (tasks.length) { - tasks[index].apply(null, arguments); - } - return fn.next(); - }; - fn.next = function () { - return (index < tasks.length - 1) ? makeCallback(index + 1): null; - }; - return fn; - }; - return makeCallback(0); - }; - - async.apply = function (fn) { - var args = Array.prototype.slice.call(arguments, 1); - return function () { - return fn.apply( - null, args.concat(Array.prototype.slice.call(arguments)) - ); - }; - }; - - var _concat = function (eachfn, arr, fn, callback) { - var r = []; - eachfn(arr, function (x, cb) { - fn(x, function (err, y) { - r = r.concat(y || []); - cb(err); - }); - }, function (err) { - callback(err, r); - }); - }; - async.concat = doParallel(_concat); - async.concatSeries = doSeries(_concat); - - async.whilst = function (test, iterator, callback) { - if (test()) { - iterator(function (err) { - if (err) { - return callback(err); - } - async.whilst(test, iterator, callback); - }); - } - else { - callback(); - } - }; - - async.doWhilst = function (iterator, test, callback) { - iterator(function (err) { - if (err) { - return callback(err); - } - if (test()) { - async.doWhilst(iterator, test, callback); - } - else { - callback(); - } - }); - }; - - async.until = function (test, iterator, callback) { - if (!test()) { - iterator(function (err) { - if (err) { - return callback(err); - } - async.until(test, iterator, callback); - }); - } - else { - callback(); - } - }; - - async.doUntil = function (iterator, test, callback) { - iterator(function (err) { - if (err) { - return callback(err); - } - if (!test()) { - async.doUntil(iterator, test, callback); - } - else { - callback(); - } - }); - }; - - async.queue = function (worker, concurrency) { - if (concurrency === undefined) { - concurrency = 1; - } - function _insert(q, data, pos, callback) { - if(data.constructor !== Array) { - data = [data]; - } - _each(data, function(task) { - var item = { - data: task, - callback: typeof callback === 'function' ? callback : null - }; - - if (pos) { - q.tasks.unshift(item); - } else { - q.tasks.push(item); - } - - if (q.saturated && q.tasks.length === concurrency) { - q.saturated(); - } - async.setImmediate(q.process); - }); - } - - var workers = 0; - var q = { - tasks: [], - concurrency: concurrency, - saturated: null, - empty: null, - drain: null, - push: function (data, callback) { - _insert(q, data, false, callback); - }, - unshift: function (data, callback) { - _insert(q, data, true, callback); - }, - process: function () { - if (workers < q.concurrency && q.tasks.length) { - var task = q.tasks.shift(); - if (q.empty && q.tasks.length === 0) { - q.empty(); - } - workers += 1; - var next = function () { - workers -= 1; - if (task.callback) { - task.callback.apply(task, arguments); - } - if (q.drain && q.tasks.length + workers === 0) { - q.drain(); - } - q.process(); - }; - var cb = only_once(next); - worker(task.data, cb); - } - }, - length: function () { - return q.tasks.length; - }, - running: function () { - return workers; - } - }; - return q; - }; - - async.cargo = function (worker, payload) { - var working = false, - tasks = []; - - var cargo = { - tasks: tasks, - payload: payload, - saturated: null, - empty: null, - drain: null, - push: function (data, callback) { - if(data.constructor !== Array) { - data = [data]; - } - _each(data, function(task) { - tasks.push({ - data: task, - callback: typeof callback === 'function' ? callback : null - }); - if (cargo.saturated && tasks.length === payload) { - cargo.saturated(); - } - }); - async.setImmediate(cargo.process); - }, - process: function process() { - if (working) return; - if (tasks.length === 0) { - if(cargo.drain) cargo.drain(); - return; - } - - var ts = typeof payload === 'number' - ? tasks.splice(0, payload) - : tasks.splice(0); - - var ds = _map(ts, function (task) { - return task.data; - }); - - if(cargo.empty) cargo.empty(); - working = true; - worker(ds, function () { - working = false; - - var args = arguments; - _each(ts, function (data) { - if (data.callback) { - data.callback.apply(null, args); - } - }); - - process(); - }); - }, - length: function () { - return tasks.length; - }, - running: function () { - return working; - } - }; - return cargo; - }; - - var _console_fn = function (name) { - return function (fn) { - var args = Array.prototype.slice.call(arguments, 1); - fn.apply(null, args.concat([function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (typeof console !== 'undefined') { - if (err) { - if (console.error) { - console.error(err); - } - } - else if (console[name]) { - _each(args, function (x) { - console[name](x); - }); - } - } - }])); - }; - }; - async.log = _console_fn('log'); - async.dir = _console_fn('dir'); - /*async.info = _console_fn('info'); - async.warn = _console_fn('warn'); - async.error = _console_fn('error');*/ - - async.memoize = function (fn, hasher) { - var memo = {}; - var queues = {}; - hasher = hasher || function (x) { - return x; - }; - var memoized = function () { - var args = Array.prototype.slice.call(arguments); - var callback = args.pop(); - var key = hasher.apply(null, args); - if (key in memo) { - callback.apply(null, memo[key]); - } - else if (key in queues) { - queues[key].push(callback); - } - else { - queues[key] = [callback]; - fn.apply(null, args.concat([function () { - memo[key] = arguments; - var q = queues[key]; - delete queues[key]; - for (var i = 0, l = q.length; i < l; i++) { - q[i].apply(null, arguments); - } - }])); - } - }; - memoized.memo = memo; - memoized.unmemoized = fn; - return memoized; - }; - - async.unmemoize = function (fn) { - return function () { - return (fn.unmemoized || fn).apply(null, arguments); - }; - }; - - async.times = function (count, iterator, callback) { - var counter = []; - for (var i = 0; i < count; i++) { - counter.push(i); - } - return async.map(counter, iterator, callback); - }; - - async.timesSeries = function (count, iterator, callback) { - var counter = []; - for (var i = 0; i < count; i++) { - counter.push(i); - } - return async.mapSeries(counter, iterator, callback); - }; - - async.compose = function (/* functions... */) { - var fns = Array.prototype.reverse.call(arguments); - return function () { - var that = this; - var args = Array.prototype.slice.call(arguments); - var callback = args.pop(); - async.reduce(fns, args, function (newargs, fn, cb) { - fn.apply(that, newargs.concat([function () { - var err = arguments[0]; - var nextargs = Array.prototype.slice.call(arguments, 1); - cb(err, nextargs); - }])) - }, - function (err, results) { - callback.apply(that, [err].concat(results)); - }); - }; - }; - - var _applyEach = function (eachfn, fns /*args...*/) { - var go = function () { - var that = this; - var args = Array.prototype.slice.call(arguments); - var callback = args.pop(); - return eachfn(fns, function (fn, cb) { - fn.apply(that, args.concat([cb])); - }, - callback); - }; - if (arguments.length > 2) { - var args = Array.prototype.slice.call(arguments, 2); - return go.apply(this, args); - } - else { - return go; - } - }; - async.applyEach = doParallel(_applyEach); - async.applyEachSeries = doSeries(_applyEach); - - async.forever = function (fn, callback) { - function next(err) { - if (err) { - if (callback) { - return callback(err); - } - throw err; - } - fn(next); - } - next(); - }; - - // AMD / RequireJS - if (typeof define !== 'undefined' && define.amd) { - define([], function () { - return async; - }); - } - // Node.js - else if (typeof module !== 'undefined' && module.exports) { - module.exports = async; - } - // included directly via <script> tag - else { - root.async = async; - } - -}()); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/package.json deleted file mode 100644 index c586b717..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "async", - "description": "Higher-order functions and common patterns for asynchronous code", - "main": "./lib/async", - "author": { - "name": "Caolan McMahon" - }, - "version": "0.2.10", - "repository": { - "type": "git", - "url": "https://github.com/caolan/async.git" - }, - "bugs": { - "url": "https://github.com/caolan/async/issues" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/caolan/async/raw/master/LICENSE" - } - ], - "devDependencies": { - "nodeunit": ">0.0.0", - "uglify-js": "1.2.x", - "nodelint": ">0.0.0" - }, - "jam": { - "main": "lib/async.js", - "include": [ - "lib/async.js", - "README.md", - "LICENSE" - ] - }, - "scripts": { - "test": "nodeunit test/test-async.js" - }, - "readme": "# Async.js\n\nAsync is a utility module which provides straight-forward, powerful functions\nfor working with asynchronous JavaScript. Although originally designed for\nuse with [node.js](http://nodejs.org), it can also be used directly in the\nbrowser. Also supports [component](https://github.com/component/component).\n\nAsync provides around 20 functions that include the usual 'functional'\nsuspects (map, reduce, filter, each…) as well as some common patterns\nfor asynchronous control flow (parallel, series, waterfall…). All these\nfunctions assume you follow the node.js convention of providing a single\ncallback as the last argument of your async function.\n\n\n## Quick Examples\n\n```javascript\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n\nasync.parallel([\n function(){ ... },\n function(){ ... }\n], callback);\n\nasync.series([\n function(){ ... },\n function(){ ... }\n]);\n```\n\nThere are many more functions available so take a look at the docs below for a\nfull list. This module aims to be comprehensive, so if you feel anything is\nmissing please create a GitHub issue for it.\n\n## Common Pitfalls\n\n### Binding a context to an iterator\n\nThis section is really about bind, not about async. If you are wondering how to\nmake async execute your iterators in a given context, or are confused as to why\na method of another library isn't working as an iterator, study this example:\n\n```js\n// Here is a simple object with an (unnecessarily roundabout) squaring method\nvar AsyncSquaringLibrary = {\n squareExponent: 2,\n square: function(number, callback){ \n var result = Math.pow(number, this.squareExponent);\n setTimeout(function(){\n callback(null, result);\n }, 200);\n }\n};\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){\n // result is [NaN, NaN, NaN]\n // This fails because the `this.squareExponent` expression in the square\n // function is not evaluated in the context of AsyncSquaringLibrary, and is\n // therefore undefined.\n});\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){\n // result is [1, 4, 9]\n // With the help of bind we can attach a context to the iterator before\n // passing it to async. Now the square function will be executed in its \n // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent`\n // will be as expected.\n});\n```\n\n## Download\n\nThe source is available for download from\n[GitHub](http://github.com/caolan/async).\nAlternatively, you can install using Node Package Manager (npm):\n\n npm install async\n\n__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed\n\n## In the Browser\n\nSo far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage:\n\n```html\n<script type=\"text/javascript\" src=\"async.js\"></script>\n<script type=\"text/javascript\">\n\n async.map(data, asyncProcess, function(err, results){\n alert(results);\n });\n\n</script>\n```\n\n## Documentation\n\n### Collections\n\n* [each](#each)\n* [eachSeries](#eachSeries)\n* [eachLimit](#eachLimit)\n* [map](#map)\n* [mapSeries](#mapSeries)\n* [mapLimit](#mapLimit)\n* [filter](#filter)\n* [filterSeries](#filterSeries)\n* [reject](#reject)\n* [rejectSeries](#rejectSeries)\n* [reduce](#reduce)\n* [reduceRight](#reduceRight)\n* [detect](#detect)\n* [detectSeries](#detectSeries)\n* [sortBy](#sortBy)\n* [some](#some)\n* [every](#every)\n* [concat](#concat)\n* [concatSeries](#concatSeries)\n\n### Control Flow\n\n* [series](#series)\n* [parallel](#parallel)\n* [parallelLimit](#parallellimittasks-limit-callback)\n* [whilst](#whilst)\n* [doWhilst](#doWhilst)\n* [until](#until)\n* [doUntil](#doUntil)\n* [forever](#forever)\n* [waterfall](#waterfall)\n* [compose](#compose)\n* [applyEach](#applyEach)\n* [applyEachSeries](#applyEachSeries)\n* [queue](#queue)\n* [cargo](#cargo)\n* [auto](#auto)\n* [iterator](#iterator)\n* [apply](#apply)\n* [nextTick](#nextTick)\n* [times](#times)\n* [timesSeries](#timesSeries)\n\n### Utils\n\n* [memoize](#memoize)\n* [unmemoize](#unmemoize)\n* [log](#log)\n* [dir](#dir)\n* [noConflict](#noConflict)\n\n\n## Collections\n\n<a name=\"forEach\" />\n<a name=\"each\" />\n### each(arr, iterator, callback)\n\nApplies an iterator function to each item in an array, in parallel.\nThe iterator is called with an item from the list and a callback for when it\nhas finished. If the iterator passes an error to this callback, the main\ncallback for the each function is immediately called with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// assuming openFiles is an array of file names and saveFile is a function\n// to save the modified contents of that file:\n\nasync.each(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n<a name=\"forEachSeries\" />\n<a name=\"eachSeries\" />\n### eachSeries(arr, iterator, callback)\n\nThe same as each only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. This means the iterator functions will complete in order.\n\n\n---------------------------------------\n\n<a name=\"forEachLimit\" />\n<a name=\"eachLimit\" />\n### eachLimit(arr, limit, iterator, callback)\n\nThe same as each only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// Assume documents is an array of JSON objects and requestApi is a\n// function that interacts with a rate-limited REST api.\n\nasync.eachLimit(documents, 20, requestApi, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n<a name=\"map\" />\n### map(arr, iterator, callback)\n\nProduces a new array of values by mapping each value in the given array through\nthe iterator function. The iterator is called with an item from the array and a\ncallback for when it has finished processing. The callback takes 2 arguments, \nan error and the transformed item from the array. If the iterator passes an\nerror to this callback, the main callback for the map function is immediately\ncalled with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order, however\nthe results array will be in the same order as the original array.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n```js\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n<a name=\"mapSeries\" />\n### mapSeries(arr, iterator, callback)\n\nThe same as map only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n---------------------------------------\n\n<a name=\"mapLimit\" />\n### mapLimit(arr, limit, iterator, callback)\n\nThe same as map only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n```js\nasync.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n<a name=\"filter\" />\n### filter(arr, iterator, callback)\n\n__Alias:__ select\n\nReturns a new array of all the values which pass an async truth test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(results) - A callback which is called after all the iterator\n functions have finished.\n\n__Example__\n\n```js\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n```\n\n---------------------------------------\n\n<a name=\"filterSeries\" />\n### filterSeries(arr, iterator, callback)\n\n__alias:__ selectSeries\n\nThe same as filter only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n---------------------------------------\n\n<a name=\"reject\" />\n### reject(arr, iterator, callback)\n\nThe opposite of filter. Removes values that pass an async truth test.\n\n---------------------------------------\n\n<a name=\"rejectSeries\" />\n### rejectSeries(arr, iterator, callback)\n\nThe same as reject, only the iterator is applied to each item in the array\nin series.\n\n\n---------------------------------------\n\n<a name=\"reduce\" />\n### reduce(arr, memo, iterator, callback)\n\n__aliases:__ inject, foldl\n\nReduces a list of values into a single value using an async iterator to return\neach successive step. Memo is the initial state of the reduction. This\nfunction only operates in series. For performance reasons, it may make sense to\nsplit a call to this function into a parallel map, then use the normal\nArray.prototype.reduce on the results. This function is for situations where\neach step in the reduction needs to be async, if you can get the data before\nreducing it then it's probably a good idea to do so.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* memo - The initial state of the reduction.\n* iterator(memo, item, callback) - A function applied to each item in the\n array to produce the next step in the reduction. The iterator is passed a\n callback(err, reduction) which accepts an optional error as its first \n argument, and the state of the reduction as the second. If an error is \n passed to the callback, the reduction is stopped and the main callback is \n immediately called with the error.\n* callback(err, result) - A callback which is called after all the iterator\n functions have finished. Result is the reduced value.\n\n__Example__\n\n```js\nasync.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n}, function(err, result){\n // result is now equal to the last value of memo, which is 6\n});\n```\n\n---------------------------------------\n\n<a name=\"reduceRight\" />\n### reduceRight(arr, memo, iterator, callback)\n\n__Alias:__ foldr\n\nSame as reduce, only operates on the items in the array in reverse order.\n\n\n---------------------------------------\n\n<a name=\"detect\" />\n### detect(arr, iterator, callback)\n\nReturns the first value in a list that passes an async truth test. The\niterator is applied in parallel, meaning the first iterator to return true will\nfire the detect callback with that result. That means the result might not be\nthe first item in the original array (in terms of order) that passes the test.\n\nIf order within the original array is important then look at detectSeries.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value undefined if none passed.\n\n__Example__\n\n```js\nasync.detect(['file1','file2','file3'], fs.exists, function(result){\n // result now equals the first file in the list that exists\n});\n```\n\n---------------------------------------\n\n<a name=\"detectSeries\" />\n### detectSeries(arr, iterator, callback)\n\nThe same as detect, only the iterator is applied to each item in the array\nin series. This means the result is always the first in the original array (in\nterms of array order) that passes the truth test.\n\n\n---------------------------------------\n\n<a name=\"sortBy\" />\n### sortBy(arr, iterator, callback)\n\nSorts a list by the results of running each value through an async iterator.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, sortValue) which must be called once it\n has completed with an error (which can be null) and a value to use as the sort\n criteria.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is the items from\n the original array sorted by the values returned by the iterator calls.\n\n__Example__\n\n```js\nasync.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n}, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n});\n```\n\n---------------------------------------\n\n<a name=\"some\" />\n### some(arr, iterator, callback)\n\n__Alias:__ any\n\nReturns true if at least one element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists. Once any iterator\ncall returns true, the main callback is immediately called.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n either true or false depending on the values of the async tests.\n\n__Example__\n\n```js\nasync.some(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then at least one of the files exists\n});\n```\n\n---------------------------------------\n\n<a name=\"every\" />\n### every(arr, iterator, callback)\n\n__Alias:__ all\n\nReturns true if every element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called after all the iterator\n functions have finished. Result will be either true or false depending on\n the values of the async tests.\n\n__Example__\n\n```js\nasync.every(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then every file exists\n});\n```\n\n---------------------------------------\n\n<a name=\"concat\" />\n### concat(arr, iterator, callback)\n\nApplies an iterator to each item in a list, concatenating the results. Returns the\nconcatenated list. The iterators are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of the arguments passed to the iterator function.\n\n__Arguments__\n\n* arr - An array to iterate over\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, results) which must be called once it \n has completed with an error (which can be null) and an array of results.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array containing\n the concatenated results of the iterator function.\n\n__Example__\n\n```js\nasync.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n});\n```\n\n---------------------------------------\n\n<a name=\"concatSeries\" />\n### concatSeries(arr, iterator, callback)\n\nSame as async.concat, but executes in series instead of parallel.\n\n\n## Control Flow\n\n<a name=\"series\" />\n### series(tasks, [callback])\n\nRun an array of functions in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run and the callback for the series is\nimmediately called with the value of the error. Once the tasks have completed,\nthe results are passed to the final callback as an array.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.series.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed\n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n }\n],\n// optional callback\nfunction(err, results){\n // results is now equal to ['one', 'two']\n});\n\n\n// an example using an object instead of an array\nasync.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equal to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n<a name=\"parallel\" />\n### parallel(tasks, [callback])\n\nRun an array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main callback is immediately called with the value of the error.\nOnce the tasks have completed, the results are passed to the final callback as an\narray.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.parallel.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n }\n],\n// optional callback\nfunction(err, results){\n // the results array will equal ['one','two'] even though\n // the second function had a shorter timeout.\n});\n\n\n// an example using an object instead of an array\nasync.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equals to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n<a name=\"parallel\" />\n### parallelLimit(tasks, limit, [callback])\n\nThe same as parallel only the tasks are executed in parallel with a maximum of \"limit\" \ntasks executing at any time.\n\nNote that the tasks are not executed in batches, so there is no guarantee that \nthe first \"limit\" tasks will complete before any others are started.\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* limit - The maximum number of tasks to run at any time.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n---------------------------------------\n\n<a name=\"whilst\" />\n### whilst(test, fn, callback)\n\nRepeatedly call fn, while test returns true. Calls the callback when stopped,\nor an error occurs.\n\n__Arguments__\n\n* test() - synchronous truth test to perform before each execution of fn.\n* fn(callback) - A function to call each time the test passes. The function is\n passed a callback(err) which must be called once it has completed with an \n optional error argument.\n* callback(err) - A callback which is called after the test fails and repeated\n execution of fn has stopped.\n\n__Example__\n\n```js\nvar count = 0;\n\nasync.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n);\n```\n\n---------------------------------------\n\n<a name=\"doWhilst\" />\n### doWhilst(fn, test, callback)\n\nThe post check version of whilst. To reflect the difference in the order of operations `test` and `fn` arguments are switched. `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.\n\n---------------------------------------\n\n<a name=\"until\" />\n### until(test, fn, callback)\n\nRepeatedly call fn, until test returns true. Calls the callback when stopped,\nor an error occurs.\n\nThe inverse of async.whilst.\n\n---------------------------------------\n\n<a name=\"doUntil\" />\n### doUntil(fn, test, callback)\n\nLike doWhilst except the test is inverted. Note the argument ordering differs from `until`.\n\n---------------------------------------\n\n<a name=\"forever\" />\n### forever(fn, callback)\n\nCalls the asynchronous function 'fn' repeatedly, in series, indefinitely.\nIf an error is passed to fn's callback then 'callback' is called with the\nerror, otherwise it will never be called.\n\n---------------------------------------\n\n<a name=\"waterfall\" />\n### waterfall(tasks, [callback])\n\nRuns an array of functions in series, each passing their results to the next in\nthe array. However, if any of the functions pass an error to the callback, the\nnext function is not executed and the main callback is immediately called with\nthe error.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a \n callback(err, result1, result2, ...) it must call on completion. The first\n argument is an error (which can be null) and any further arguments will be \n passed as arguments in order to the next task.\n* callback(err, [results]) - An optional callback to run once all the functions\n have completed. This will be passed the results of the last task's callback.\n\n\n\n__Example__\n\n```js\nasync.waterfall([\n function(callback){\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback){\n callback(null, 'three');\n },\n function(arg1, callback){\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n], function (err, result) {\n // result now equals 'done' \n});\n```\n\n---------------------------------------\n<a name=\"compose\" />\n### compose(fn1, fn2...)\n\nCreates a function which is a composition of the passed asynchronous\nfunctions. Each function consumes the return value of the function that\nfollows. Composing functions f(), g() and h() would produce the result of\nf(g(h())), only this version uses callbacks to obtain the return values.\n\nEach function is executed with the `this` binding of the composed function.\n\n__Arguments__\n\n* functions... - the asynchronous functions to compose\n\n\n__Example__\n\n```js\nfunction add1(n, callback) {\n setTimeout(function () {\n callback(null, n + 1);\n }, 10);\n}\n\nfunction mul3(n, callback) {\n setTimeout(function () {\n callback(null, n * 3);\n }, 10);\n}\n\nvar add1mul3 = async.compose(mul3, add1);\n\nadd1mul3(4, function (err, result) {\n // result now equals 15\n});\n```\n\n---------------------------------------\n<a name=\"applyEach\" />\n### applyEach(fns, args..., callback)\n\nApplies the provided arguments to each function in the array, calling the\ncallback after all functions have completed. If you only provide the first\nargument then it will return a function which lets you pass in the\narguments as if it were a single function call.\n\n__Arguments__\n\n* fns - the asynchronous functions to all call with the same arguments\n* args... - any number of separate arguments to pass to the function\n* callback - the final argument should be the callback, called when all\n functions have completed processing\n\n\n__Example__\n\n```js\nasync.applyEach([enableSearch, updateSchema], 'bucket', callback);\n\n// partial application example:\nasync.each(\n buckets,\n async.applyEach([enableSearch, updateSchema]),\n callback\n);\n```\n\n---------------------------------------\n\n<a name=\"applyEachSeries\" />\n### applyEachSeries(arr, iterator, callback)\n\nThe same as applyEach only the functions are applied in series.\n\n---------------------------------------\n\n<a name=\"queue\" />\n### queue(worker, concurrency)\n\nCreates a queue object with the specified concurrency. Tasks added to the\nqueue will be processed in parallel (up to the concurrency limit). If all\nworkers are in progress, the task is queued until one is available. Once\na worker has completed a task, the task's callback is called.\n\n__Arguments__\n\n* worker(task, callback) - An asynchronous function for processing a queued\n task, which must call its callback(err) argument when finished, with an \n optional error as an argument.\n* concurrency - An integer for determining how many worker functions should be\n run in parallel.\n\n__Queue objects__\n\nThe queue object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* concurrency - an integer for determining how many worker functions should be\n run in parallel. This property can be changed after a queue is created to\n alter the concurrency on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* unshift(task, [callback]) - add a new task to the front of the queue.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a queue object with concurrency 2\n\nvar q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n}, 2);\n\n\n// assign a callback\nq.drain = function() {\n console.log('all items have been processed');\n}\n\n// add some items to the queue\n\nq.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n});\nq.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the queue (batch-wise)\n\nq.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the front of the queue\n\nq.unshift({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n```\n\n---------------------------------------\n\n<a name=\"cargo\" />\n### cargo(worker, [payload])\n\nCreates a cargo object with the specified payload. Tasks added to the\ncargo will be processed altogether (up to the payload limit). If the\nworker is in progress, the task is queued until it is available. Once\nthe worker has completed some tasks, each callback of those tasks is called.\n\n__Arguments__\n\n* worker(tasks, callback) - An asynchronous function for processing an array of\n queued tasks, which must call its callback(err) argument when finished, with \n an optional error as an argument.\n* payload - An optional integer for determining how many tasks should be\n processed per round; if omitted, the default is unlimited.\n\n__Cargo objects__\n\nThe cargo object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* payload - an integer for determining how many tasks should be\n process per round. This property can be changed after a cargo is created to\n alter the payload on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a cargo object with payload 2\n\nvar cargo = async.cargo(function (tasks, callback) {\n for(var i=0; i<tasks.length; i++){\n console.log('hello ' + tasks[i].name);\n }\n callback();\n}, 2);\n\n\n// add some items\n\ncargo.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n});\ncargo.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\ncargo.push({name: 'baz'}, function (err) {\n console.log('finished processing baz');\n});\n```\n\n---------------------------------------\n\n<a name=\"auto\" />\n### auto(tasks, [callback])\n\nDetermines the best order for running functions based on their requirements.\nEach function can optionally depend on other functions being completed first,\nand each function is run as soon as its requirements are satisfied. If any of\nthe functions pass an error to their callback, that function will not complete\n(so any other functions depending on it will not run) and the main callback\nwill be called immediately with the error. Functions also receive an object\ncontaining the results of functions which have completed so far.\n\nNote, all functions are called with a results object as a second argument, \nso it is unsafe to pass functions in the tasks object which cannot handle the\nextra argument. For example, this snippet of code:\n\n```js\nasync.auto({\n readData: async.apply(fs.readFile, 'data.txt', 'utf-8')\n}, callback);\n```\n\nwill have the effect of calling readFile with the results object as the last\nargument, which will fail:\n\n```js\nfs.readFile('data.txt', 'utf-8', cb, {});\n```\n\nInstead, wrap the call to readFile in a function which does not forward the \nresults object:\n\n```js\nasync.auto({\n readData: function(cb, results){\n fs.readFile('data.txt', 'utf-8', cb);\n }\n}, callback);\n```\n\n__Arguments__\n\n* tasks - An object literal containing named functions or an array of\n requirements, with the function itself the last item in the array. The key\n used for each function or array is used when specifying requirements. The \n function receives two arguments: (1) a callback(err, result) which must be \n called when finished, passing an error (which can be null) and the result of \n the function's execution, and (2) a results object, containing the results of\n the previously executed functions.\n* callback(err, results) - An optional callback which is called when all the\n tasks have been completed. The callback will receive an error as an argument\n if any tasks pass an error to their callback. Results will always be passed\n\tbut if an error occurred, no other tasks will be performed, and the results\n\tobject will only contain partial results.\n \n\n__Example__\n\n```js\nasync.auto({\n get_data: function(callback){\n // async code to get some data\n },\n make_folder: function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n },\n write_file: ['get_data', 'make_folder', function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, filename);\n }],\n email_link: ['write_file', function(callback, results){\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n }]\n});\n```\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n```js\nasync.parallel([\n function(callback){\n // async code to get some data\n },\n function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n }\n],\nfunction(err, results){\n async.series([\n function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n },\n function(callback){\n // once the file is written let's email a link to it...\n }\n ]);\n});\n```\n\nFor a complicated series of async tasks using the auto function makes adding\nnew tasks much easier and makes the code more readable.\n\n\n---------------------------------------\n\n<a name=\"iterator\" />\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the array,\nreturning a continuation to call the next one after that. It's also possible to\n'peek' the next iterator by doing iterator.next().\n\nThis function is used internally by the async module but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* tasks - An array of functions to run.\n\n__Example__\n\n```js\nvar iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n]);\n\nnode> var iterator2 = iterator();\n'one'\nnode> var iterator3 = iterator2();\n'two'\nnode> iterator3();\n'three'\nnode> var nextfn = iterator2.next();\nnode> nextfn();\n'three'\n```\n\n---------------------------------------\n\n<a name=\"apply\" />\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied, a useful\nshorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n```js\n// using apply\n\nasync.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n]);\n\n\n// the same process without using apply\n\nasync.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n }\n]);\n```\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n```js\nnode> var fn = async.apply(sys.puts, 'one');\nnode> fn('two', 'three');\none\ntwo\nthree\n```\n\n---------------------------------------\n\n<a name=\"nextTick\" />\n### nextTick(callback)\n\nCalls the callback on a later loop around the event loop. In node.js this just\ncalls process.nextTick, in the browser it falls back to setImmediate(callback)\nif available, otherwise setTimeout(callback, 0), which means other higher priority\nevents may precede the execution of the callback.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* callback - The function to call on a later loop around the event loop.\n\n__Example__\n\n```js\nvar call_order = [];\nasync.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two']\n});\ncall_order.push('one')\n```\n\n<a name=\"times\" />\n### times(n, callback)\n\nCalls the callback n times and accumulates results in the same manner\nyou would use with async.map.\n\n__Arguments__\n\n* n - The number of times to run the function.\n* callback - The function to call n times.\n\n__Example__\n\n```js\n// Pretend this is some complicated async factory\nvar createUser = function(id, callback) {\n callback(null, {\n id: 'user' + id\n })\n}\n// generate 5 users\nasync.times(5, function(n, next){\n createUser(n, function(err, user) {\n next(err, user)\n })\n}, function(err, users) {\n // we should now have 5 users\n});\n```\n\n<a name=\"timesSeries\" />\n### timesSeries(n, callback)\n\nThe same as times only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n## Utils\n\n<a name=\"memoize\" />\n### memoize(fn, [hasher])\n\nCaches the results of an async function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\nThe cache of results is exposed as the `memo` property of the function returned\nby `memoize`.\n\n__Arguments__\n\n* fn - the function you to proxy and cache results from.\n* hasher - an optional function for generating a custom hash for storing\n results, it has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n```js\nvar slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n};\nvar fn = async.memoize(slow_fn);\n\n// fn can now be used as if it were slow_fn\nfn('some name', function () {\n // callback\n});\n```\n\n<a name=\"unmemoize\" />\n### unmemoize(fn)\n\nUndoes a memoized function, reverting it to the original, unmemoized\nform. Comes handy in tests.\n\n__Arguments__\n\n* fn - the memoized function\n\n<a name=\"log\" />\n### log(function, arguments)\n\nLogs the result of an async function to the console. Only works in node.js or\nin browsers that support console.log and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.log is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n};\n```\n```js\nnode> async.log(hello, 'world');\n'hello world'\n```\n\n---------------------------------------\n\n<a name=\"dir\" />\n### dir(function, arguments)\n\nLogs the result of an async function to the console using console.dir to\ndisplay the properties of the resulting object. Only works in node.js or\nin browsers that support console.dir and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.dir is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n};\n```\n```js\nnode> async.dir(hello, 'world');\n{hello: 'world'}\n```\n\n---------------------------------------\n\n<a name=\"noConflict\" />\n### noConflict()\n\nChanges the value of async back to its original value, returning a reference to the\nasync object.\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/caolan/async", - "_id": "async@0.2.10", - "dist": { - "shasum": "a06e6818541aa1851d6ac822c8dbbfd6206eb72f" - }, - "_from": "async@~0.2.9", - "_resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/.npmignore deleted file mode 100644 index aba34f01..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -*.un~ -/node_modules -/test/tmp diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/License b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/License deleted file mode 100644 index 4804b7ab..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/License +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 Debuggable Limited <felix@debuggable.com> - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/Makefile deleted file mode 100644 index b4ff85a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -SHELL := /bin/bash - -test: - @./test/run.js - -.PHONY: test - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md deleted file mode 100644 index 1a9999eb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md +++ /dev/null @@ -1,132 +0,0 @@ -# combined-stream - -A stream that emits multiple other streams one after another. - -## Installation - -``` bash -npm install combined-stream -``` - -## Usage - -Here is a simple example that shows how you can use combined-stream to combine -two files into one: - -``` javascript -var CombinedStream = require('combined-stream'); -var fs = require('fs'); - -var combinedStream = CombinedStream.create(); -combinedStream.append(fs.createReadStream('file1.txt')); -combinedStream.append(fs.createReadStream('file2.txt')); - -combinedStream.pipe(fs.createWriteStream('combined.txt')); -``` - -While the example above works great, it will pause all source streams until -they are needed. If you don't want that to happen, you can set `pauseStreams` -to `false`: - -``` javascript -var CombinedStream = require('combined-stream'); -var fs = require('fs'); - -var combinedStream = CombinedStream.create({pauseStreams: false}); -combinedStream.append(fs.createReadStream('file1.txt')); -combinedStream.append(fs.createReadStream('file2.txt')); - -combinedStream.pipe(fs.createWriteStream('combined.txt')); -``` - -However, what if you don't have all the source streams yet, or you don't want -to allocate the resources (file descriptors, memory, etc.) for them right away? -Well, in that case you can simply provide a callback that supplies the stream -by calling a `next()` function: - -``` javascript -var CombinedStream = require('combined-stream'); -var fs = require('fs'); - -var combinedStream = CombinedStream.create(); -combinedStream.append(function(next) { - next(fs.createReadStream('file1.txt')); -}); -combinedStream.append(function(next) { - next(fs.createReadStream('file2.txt')); -}); - -combinedStream.pipe(fs.createWriteStream('combined.txt')); -``` - -## API - -### CombinedStream.create([options]) - -Returns a new combined stream object. Available options are: - -* `maxDataSize` -* `pauseStreams` - -The effect of those options is described below. - -### combinedStream.pauseStreams = true - -Whether to apply back pressure to the underlaying streams. If set to `false`, -the underlaying streams will never be paused. If set to `true`, the -underlaying streams will be paused right after being appended, as well as when -`delayedStream.pipe()` wants to throttle. - -### combinedStream.maxDataSize = 2 * 1024 * 1024 - -The maximum amount of bytes (or characters) to buffer for all source streams. -If this value is exceeded, `combinedStream` emits an `'error'` event. - -### combinedStream.dataSize = 0 - -The amount of bytes (or characters) currently buffered by `combinedStream`. - -### combinedStream.append(stream) - -Appends the given `stream` to the combinedStream object. If `pauseStreams` is -set to `true, this stream will also be paused right away. - -`streams` can also be a function that takes one parameter called `next`. `next` -is a function that must be invoked in order to provide the `next` stream, see -example above. - -Regardless of how the `stream` is appended, combined-stream always attaches an -`'error'` listener to it, so you don't have to do that manually. - -Special case: `stream` can also be a String or Buffer. - -### combinedStream.write(data) - -You should not call this, `combinedStream` takes care of piping the appended -streams into itself for you. - -### combinedStream.resume() - -Causes `combinedStream` to start drain the streams it manages. The function is -idempotent, and also emits a `'resume'` event each time which usually goes to -the stream that is currently being drained. - -### combinedStream.pause(); - -If `combinedStream.pauseStreams` is set to `false`, this does nothing. -Otherwise a `'pause'` event is emitted, this goes to the stream that is -currently being drained, so you can use it to apply back pressure. - -### combinedStream.end(); - -Sets `combinedStream.writable` to false, emits an `'end'` event, and removes -all streams from the queue. - -### combinedStream.destroy(); - -Same as `combinedStream.end()`, except it emits a `'close'` event instead of -`'end'`. - -## License - -combined-stream is licensed under the MIT license. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js deleted file mode 100644 index 32849fd1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js +++ /dev/null @@ -1,185 +0,0 @@ -var util = require('util'); -var Stream = require('stream').Stream; -var DelayedStream = require('delayed-stream'); - -module.exports = CombinedStream; -function CombinedStream() { - this.writable = false; - this.readable = true; - this.dataSize = 0; - this.maxDataSize = 2 * 1024 * 1024; - this.pauseStreams = true; - - this._released = false; - this._streams = []; - this._currentStream = null; -} -util.inherits(CombinedStream, Stream); - -CombinedStream.create = function(options) { - var combinedStream = new this(); - - options = options || {}; - for (var option in options) { - combinedStream[option] = options[option]; - } - - return combinedStream; -}; - -CombinedStream.isStreamLike = function(stream) { - return (typeof stream !== 'function') - && (typeof stream !== 'string') - && (typeof stream !== 'boolean') - && (typeof stream !== 'number') - && (!Buffer.isBuffer(stream)); -}; - -CombinedStream.prototype.append = function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); - - if (isStreamLike) { - if (!(stream instanceof DelayedStream)) { - stream.on('data', this._checkDataSize.bind(this)); - - stream = DelayedStream.create(stream, { - maxDataSize: Infinity, - pauseStream: this.pauseStreams, - }); - } - - this._handleErrors(stream); - - if (this.pauseStreams) { - stream.pause(); - } - } - - this._streams.push(stream); - return this; -}; - -CombinedStream.prototype.pipe = function(dest, options) { - Stream.prototype.pipe.call(this, dest, options); - this.resume(); -}; - -CombinedStream.prototype._getNext = function() { - this._currentStream = null; - var stream = this._streams.shift(); - - - if (typeof stream == 'undefined') { - this.end(); - return; - } - - if (typeof stream !== 'function') { - this._pipeNext(stream); - return; - } - - var getStream = stream; - getStream(function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('data', this._checkDataSize.bind(this)); - this._handleErrors(stream); - } - - this._pipeNext(stream); - }.bind(this)); -}; - -CombinedStream.prototype._pipeNext = function(stream) { - this._currentStream = stream; - - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('end', this._getNext.bind(this)) - stream.pipe(this, {end: false}); - return; - } - - var value = stream; - this.write(value); - this._getNext(); -}; - -CombinedStream.prototype._handleErrors = function(stream) { - var self = this; - stream.on('error', function(err) { - self._emitError(err); - }); -}; - -CombinedStream.prototype.write = function(data) { - this.emit('data', data); -}; - -CombinedStream.prototype.pause = function() { - if (!this.pauseStreams) { - return; - } - - this.emit('pause'); -}; - -CombinedStream.prototype.resume = function() { - if (!this._released) { - this._released = true; - this.writable = true; - this._getNext(); - } - - this.emit('resume'); -}; - -CombinedStream.prototype.end = function() { - this._reset(); - this.emit('end'); -}; - -CombinedStream.prototype.destroy = function() { - this._reset(); - this.emit('close'); -}; - -CombinedStream.prototype._reset = function() { - this.writable = false; - this._streams = []; - this._currentStream = null; -}; - -CombinedStream.prototype._checkDataSize = function() { - this._updateDataSize(); - if (this.dataSize <= this.maxDataSize) { - return; - } - - var message = - 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.' - this._emitError(new Error(message)); -}; - -CombinedStream.prototype._updateDataSize = function() { - this.dataSize = 0; - - var self = this; - this._streams.forEach(function(stream) { - if (!stream.dataSize) { - return; - } - - self.dataSize += stream.dataSize; - }); - - if (this._currentStream && this._currentStream.dataSize) { - this.dataSize += this._currentStream.dataSize; - } -}; - -CombinedStream.prototype._emitError = function(err) { - this._reset(); - this.emit('error', err); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/.npmignore deleted file mode 100644 index 2fedb26c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -*.un~ -/node_modules/* diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License deleted file mode 100644 index 4804b7ab..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 Debuggable Limited <felix@debuggable.com> - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile deleted file mode 100644 index b4ff85a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -SHELL := /bin/bash - -test: - @./test/run.js - -.PHONY: test - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md deleted file mode 100644 index 5cb5b35e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md +++ /dev/null @@ -1,154 +0,0 @@ -# delayed-stream - -Buffers events from a stream until you are ready to handle them. - -## Installation - -``` bash -npm install delayed-stream -``` - -## Usage - -The following example shows how to write a http echo server that delays its -response by 1000 ms. - -``` javascript -var DelayedStream = require('delayed-stream'); -var http = require('http'); - -http.createServer(function(req, res) { - var delayed = DelayedStream.create(req); - - setTimeout(function() { - res.writeHead(200); - delayed.pipe(res); - }, 1000); -}); -``` - -If you are not using `Stream#pipe`, you can also manually release the buffered -events by calling `delayedStream.resume()`: - -``` javascript -var delayed = DelayedStream.create(req); - -setTimeout(function() { - // Emit all buffered events and resume underlaying source - delayed.resume(); -}, 1000); -``` - -## Implementation - -In order to use this meta stream properly, here are a few things you should -know about the implementation. - -### Event Buffering / Proxying - -All events of the `source` stream are hijacked by overwriting the `source.emit` -method. Until node implements a catch-all event listener, this is the only way. - -However, delayed-stream still continues to emit all events it captures on the -`source`, regardless of whether you have released the delayed stream yet or -not. - -Upon creation, delayed-stream captures all `source` events and stores them in -an internal event buffer. Once `delayedStream.release()` is called, all -buffered events are emitted on the `delayedStream`, and the event buffer is -cleared. After that, delayed-stream merely acts as a proxy for the underlaying -source. - -### Error handling - -Error events on `source` are buffered / proxied just like any other events. -However, `delayedStream.create` attaches a no-op `'error'` listener to the -`source`. This way you only have to handle errors on the `delayedStream` -object, rather than in two places. - -### Buffer limits - -delayed-stream provides a `maxDataSize` property that can be used to limit -the amount of data being buffered. In order to protect you from bad `source` -streams that don't react to `source.pause()`, this feature is enabled by -default. - -## API - -### DelayedStream.create(source, [options]) - -Returns a new `delayedStream`. Available options are: - -* `pauseStream` -* `maxDataSize` - -The description for those properties can be found below. - -### delayedStream.source - -The `source` stream managed by this object. This is useful if you are -passing your `delayedStream` around, and you still want to access properties -on the `source` object. - -### delayedStream.pauseStream = true - -Whether to pause the underlaying `source` when calling -`DelayedStream.create()`. Modifying this property afterwards has no effect. - -### delayedStream.maxDataSize = 1024 * 1024 - -The amount of data to buffer before emitting an `error`. - -If the underlaying source is emitting `Buffer` objects, the `maxDataSize` -refers to bytes. - -If the underlaying source is emitting JavaScript strings, the size refers to -characters. - -If you know what you are doing, you can set this property to `Infinity` to -disable this feature. You can also modify this property during runtime. - -### delayedStream.maxDataSize = 1024 * 1024 - -The amount of data to buffer before emitting an `error`. - -If the underlaying source is emitting `Buffer` objects, the `maxDataSize` -refers to bytes. - -If the underlaying source is emitting JavaScript strings, the size refers to -characters. - -If you know what you are doing, you can set this property to `Infinity` to -disable this feature. - -### delayedStream.dataSize = 0 - -The amount of data buffered so far. - -### delayedStream.readable - -An ECMA5 getter that returns the value of `source.readable`. - -### delayedStream.resume() - -If the `delayedStream` has not been released so far, `delayedStream.release()` -is called. - -In either case, `source.resume()` is called. - -### delayedStream.pause() - -Calls `source.pause()`. - -### delayedStream.pipe(dest) - -Calls `delayedStream.resume()` and then proxies the arguments to `source.pipe`. - -### delayedStream.release() - -Emits and clears all events that have been buffered up so far. This does not -resume the underlaying source, use `delayedStream.resume()` instead. - -## License - -delayed-stream is licensed under the MIT license. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js deleted file mode 100644 index 7c10d482..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js +++ /dev/null @@ -1,99 +0,0 @@ -var Stream = require('stream').Stream; -var util = require('util'); - -module.exports = DelayedStream; -function DelayedStream() { - this.source = null; - this.dataSize = 0; - this.maxDataSize = 1024 * 1024; - this.pauseStream = true; - - this._maxDataSizeExceeded = false; - this._released = false; - this._bufferedEvents = []; -} -util.inherits(DelayedStream, Stream); - -DelayedStream.create = function(source, options) { - var delayedStream = new this(); - - options = options || {}; - for (var option in options) { - delayedStream[option] = options[option]; - } - - delayedStream.source = source; - - var realEmit = source.emit; - source.emit = function() { - delayedStream._handleEmit(arguments); - return realEmit.apply(source, arguments); - }; - - source.on('error', function() {}); - if (delayedStream.pauseStream) { - source.pause(); - } - - return delayedStream; -}; - -DelayedStream.prototype.__defineGetter__('readable', function() { - return this.source.readable; -}); - -DelayedStream.prototype.resume = function() { - if (!this._released) { - this.release(); - } - - this.source.resume(); -}; - -DelayedStream.prototype.pause = function() { - this.source.pause(); -}; - -DelayedStream.prototype.release = function() { - this._released = true; - - this._bufferedEvents.forEach(function(args) { - this.emit.apply(this, args); - }.bind(this)); - this._bufferedEvents = []; -}; - -DelayedStream.prototype.pipe = function() { - var r = Stream.prototype.pipe.apply(this, arguments); - this.resume(); - return r; -}; - -DelayedStream.prototype._handleEmit = function(args) { - if (this._released) { - this.emit.apply(this, args); - return; - } - - if (args[0] === 'data') { - this.dataSize += args[1].length; - this._checkIfMaxDataSizeExceeded(); - } - - this._bufferedEvents.push(args); -}; - -DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { - if (this._maxDataSizeExceeded) { - return; - } - - if (this.dataSize <= this.maxDataSize) { - return; - } - - this._maxDataSizeExceeded = true; - var message = - 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.' - this.emit('error', new Error(message)); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json deleted file mode 100644 index 2ba5526d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "author": { - "name": "Felix Geisendörfer", - "email": "felix@debuggable.com", - "url": "http://debuggable.com/" - }, - "name": "delayed-stream", - "description": "Buffers events from a stream until you are ready to handle them.", - "version": "0.0.5", - "homepage": "https://github.com/felixge/node-delayed-stream", - "repository": { - "type": "git", - "url": "git://github.com/felixge/node-delayed-stream.git" - }, - "main": "./lib/delayed_stream", - "engines": { - "node": ">=0.4.0" - }, - "dependencies": {}, - "devDependencies": { - "fake": "0.2.0", - "far": "0.0.1" - }, - "readme": "# delayed-stream\n\nBuffers events from a stream until you are ready to handle them.\n\n## Installation\n\n``` bash\nnpm install delayed-stream\n```\n\n## Usage\n\nThe following example shows how to write a http echo server that delays its\nresponse by 1000 ms.\n\n``` javascript\nvar DelayedStream = require('delayed-stream');\nvar http = require('http');\n\nhttp.createServer(function(req, res) {\n var delayed = DelayedStream.create(req);\n\n setTimeout(function() {\n res.writeHead(200);\n delayed.pipe(res);\n }, 1000);\n});\n```\n\nIf you are not using `Stream#pipe`, you can also manually release the buffered\nevents by calling `delayedStream.resume()`:\n\n``` javascript\nvar delayed = DelayedStream.create(req);\n\nsetTimeout(function() {\n // Emit all buffered events and resume underlaying source\n delayed.resume();\n}, 1000);\n```\n\n## Implementation\n\nIn order to use this meta stream properly, here are a few things you should\nknow about the implementation.\n\n### Event Buffering / Proxying\n\nAll events of the `source` stream are hijacked by overwriting the `source.emit`\nmethod. Until node implements a catch-all event listener, this is the only way.\n\nHowever, delayed-stream still continues to emit all events it captures on the\n`source`, regardless of whether you have released the delayed stream yet or\nnot.\n\nUpon creation, delayed-stream captures all `source` events and stores them in\nan internal event buffer. Once `delayedStream.release()` is called, all\nbuffered events are emitted on the `delayedStream`, and the event buffer is\ncleared. After that, delayed-stream merely acts as a proxy for the underlaying\nsource.\n\n### Error handling\n\nError events on `source` are buffered / proxied just like any other events.\nHowever, `delayedStream.create` attaches a no-op `'error'` listener to the\n`source`. This way you only have to handle errors on the `delayedStream`\nobject, rather than in two places.\n\n### Buffer limits\n\ndelayed-stream provides a `maxDataSize` property that can be used to limit\nthe amount of data being buffered. In order to protect you from bad `source`\nstreams that don't react to `source.pause()`, this feature is enabled by\ndefault.\n\n## API\n\n### DelayedStream.create(source, [options])\n\nReturns a new `delayedStream`. Available options are:\n\n* `pauseStream`\n* `maxDataSize`\n\nThe description for those properties can be found below.\n\n### delayedStream.source\n\nThe `source` stream managed by this object. This is useful if you are\npassing your `delayedStream` around, and you still want to access properties\non the `source` object.\n\n### delayedStream.pauseStream = true\n\nWhether to pause the underlaying `source` when calling\n`DelayedStream.create()`. Modifying this property afterwards has no effect.\n\n### delayedStream.maxDataSize = 1024 * 1024\n\nThe amount of data to buffer before emitting an `error`.\n\nIf the underlaying source is emitting `Buffer` objects, the `maxDataSize`\nrefers to bytes.\n\nIf the underlaying source is emitting JavaScript strings, the size refers to\ncharacters.\n\nIf you know what you are doing, you can set this property to `Infinity` to\ndisable this feature. You can also modify this property during runtime.\n\n### delayedStream.maxDataSize = 1024 * 1024\n\nThe amount of data to buffer before emitting an `error`.\n\nIf the underlaying source is emitting `Buffer` objects, the `maxDataSize`\nrefers to bytes.\n\nIf the underlaying source is emitting JavaScript strings, the size refers to\ncharacters.\n\nIf you know what you are doing, you can set this property to `Infinity` to\ndisable this feature.\n\n### delayedStream.dataSize = 0\n\nThe amount of data buffered so far.\n\n### delayedStream.readable\n\nAn ECMA5 getter that returns the value of `source.readable`.\n\n### delayedStream.resume()\n\nIf the `delayedStream` has not been released so far, `delayedStream.release()`\nis called.\n\nIn either case, `source.resume()` is called.\n\n### delayedStream.pause()\n\nCalls `source.pause()`.\n\n### delayedStream.pipe(dest)\n\nCalls `delayedStream.resume()` and then proxies the arguments to `source.pipe`.\n\n### delayedStream.release()\n\nEmits and clears all events that have been buffered up so far. This does not\nresume the underlaying source, use `delayedStream.resume()` instead.\n\n## License\n\ndelayed-stream is licensed under the MIT license.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/felixge/node-delayed-stream/issues" - }, - "_id": "delayed-stream@0.0.5", - "dist": { - "shasum": "66839603c076296710bcc7f2e84ebd3348ae6343" - }, - "_from": "delayed-stream@0.0.5", - "_resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/common.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/common.js deleted file mode 100644 index 4d71b8a6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/common.js +++ /dev/null @@ -1,6 +0,0 @@ -var common = module.exports; - -common.DelayedStream = require('..'); -common.assert = require('assert'); -common.fake = require('fake'); -common.PORT = 49252; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js deleted file mode 100644 index 9ecad5b8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js +++ /dev/null @@ -1,38 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var DelayedStream = common.DelayedStream; -var http = require('http'); - -var UPLOAD = new Buffer(10 * 1024 * 1024); - -var server = http.createServer(function(req, res) { - var delayed = DelayedStream.create(req, {maxDataSize: UPLOAD.length}); - - setTimeout(function() { - res.writeHead(200); - delayed.pipe(res); - }, 10); -}); -server.listen(common.PORT, function() { - var request = http.request({ - method: 'POST', - port: common.PORT, - }); - - request.write(UPLOAD); - request.end(); - - request.on('response', function(res) { - var received = 0; - res - .on('data', function(chunk) { - received += chunk.length; - }) - .on('end', function() { - assert.equal(received, UPLOAD.length); - server.close(); - }); - }); -}); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js deleted file mode 100644 index 6f417f3e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js +++ /dev/null @@ -1,21 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var fake = common.fake.create(); -var DelayedStream = common.DelayedStream; -var Stream = require('stream').Stream; - -(function testAutoPause() { - var source = new Stream(); - - fake.expect(source, 'pause', 1); - var delayedStream = DelayedStream.create(source); - fake.verify(); -})(); - -(function testDisableAutoPause() { - var source = new Stream(); - fake.expect(source, 'pause', 0); - - var delayedStream = DelayedStream.create(source, {pauseStream: false}); - fake.verify(); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js deleted file mode 100644 index b50c3978..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js +++ /dev/null @@ -1,14 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var fake = common.fake.create(); -var DelayedStream = common.DelayedStream; -var Stream = require('stream').Stream; - -(function testDelayEventsUntilResume() { - var source = new Stream(); - var delayedStream = DelayedStream.create(source, {pauseStream: false}); - - fake.expect(source, 'pause'); - delayedStream.pause(); - fake.verify(); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream.js deleted file mode 100644 index fc4047e0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream.js +++ /dev/null @@ -1,48 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var fake = common.fake.create(); -var DelayedStream = common.DelayedStream; -var Stream = require('stream').Stream; - -(function testDelayEventsUntilResume() { - var source = new Stream(); - var delayedStream = DelayedStream.create(source, {pauseStream: false}); - - // delayedStream must not emit until we resume - fake.expect(delayedStream, 'emit', 0); - - // but our original source must emit - var params = []; - source.on('foo', function(param) { - params.push(param); - }); - - source.emit('foo', 1); - source.emit('foo', 2); - - // Make sure delayedStream did not emit, and source did - assert.deepEqual(params, [1, 2]); - fake.verify(); - - // After resume, delayedStream must playback all events - fake - .stub(delayedStream, 'emit') - .times(Infinity) - .withArg(1, 'newListener'); - fake.expect(delayedStream, 'emit', ['foo', 1]); - fake.expect(delayedStream, 'emit', ['foo', 2]); - fake.expect(source, 'resume'); - - delayedStream.resume(); - fake.verify(); - - // Calling resume again will delegate to source - fake.expect(source, 'resume'); - delayedStream.resume(); - fake.verify(); - - // Emitting more events directly leads to them being emitted - fake.expect(delayedStream, 'emit', ['foo', 3]); - source.emit('foo', 3); - fake.verify(); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-handle-source-errors.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-handle-source-errors.js deleted file mode 100644 index a9d35e72..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-handle-source-errors.js +++ /dev/null @@ -1,15 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var fake = common.fake.create(); -var DelayedStream = common.DelayedStream; -var Stream = require('stream').Stream; - -(function testHandleSourceErrors() { - var source = new Stream(); - var delayedStream = DelayedStream.create(source, {pauseStream: false}); - - // We deal with this by attaching a no-op listener to 'error' on the source - // when creating a new DelayedStream. This way error events on the source - // won't throw. - source.emit('error', new Error('something went wrong')); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-max-data-size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-max-data-size.js deleted file mode 100644 index 7638a2bf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-max-data-size.js +++ /dev/null @@ -1,18 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var fake = common.fake.create(); -var DelayedStream = common.DelayedStream; -var Stream = require('stream').Stream; - -(function testMaxDataSize() { - var source = new Stream(); - var delayedStream = DelayedStream.create(source, {maxDataSize: 1024, pauseStream: false}); - - source.emit('data', new Buffer(1024)); - - fake - .expect(delayedStream, 'emit') - .withArg(1, 'error'); - source.emit('data', new Buffer(1)); - fake.verify(); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-pipe-resumes.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-pipe-resumes.js deleted file mode 100644 index 7d312ab1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-pipe-resumes.js +++ /dev/null @@ -1,13 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var fake = common.fake.create(); -var DelayedStream = common.DelayedStream; -var Stream = require('stream').Stream; - -(function testPipeReleases() { - var source = new Stream(); - var delayedStream = DelayedStream.create(source, {pauseStream: false}); - - fake.expect(delayedStream, 'resume'); - delayedStream.pipe(new Stream()); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-proxy-readable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-proxy-readable.js deleted file mode 100644 index d436163b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-proxy-readable.js +++ /dev/null @@ -1,13 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var fake = common.fake.create(); -var DelayedStream = common.DelayedStream; -var Stream = require('stream').Stream; - -(function testProxyReadableProperty() { - var source = new Stream(); - var delayedStream = DelayedStream.create(source, {pauseStream: false}); - - source.readable = fake.value('source.readable'); - assert.strictEqual(delayedStream.readable, source.readable); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js deleted file mode 100755 index 0bb8e822..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -var far = require('far').create(); - -far.add(__dirname); -far.include(/test-.*\.js$/); - -far.execute(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json deleted file mode 100644 index ecc71ada..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": { - "name": "Felix Geisendörfer", - "email": "felix@debuggable.com", - "url": "http://debuggable.com/" - }, - "name": "combined-stream", - "description": "A stream that emits multiple other streams one after another.", - "version": "0.0.4", - "homepage": "https://github.com/felixge/node-combined-stream", - "repository": { - "type": "git", - "url": "git://github.com/felixge/node-combined-stream.git" - }, - "main": "./lib/combined_stream", - "engines": { - "node": "*" - }, - "dependencies": { - "delayed-stream": "0.0.5" - }, - "devDependencies": { - "far": "0.0.1" - }, - "readme": "# combined-stream\n\nA stream that emits multiple other streams one after another.\n\n## Installation\n\n``` bash\nnpm install combined-stream\n```\n\n## Usage\n\nHere is a simple example that shows how you can use combined-stream to combine\ntwo files into one:\n\n``` javascript\nvar CombinedStream = require('combined-stream');\nvar fs = require('fs');\n\nvar combinedStream = CombinedStream.create();\ncombinedStream.append(fs.createReadStream('file1.txt'));\ncombinedStream.append(fs.createReadStream('file2.txt'));\n\ncombinedStream.pipe(fs.createWriteStream('combined.txt'));\n```\n\nWhile the example above works great, it will pause all source streams until\nthey are needed. If you don't want that to happen, you can set `pauseStreams`\nto `false`:\n\n``` javascript\nvar CombinedStream = require('combined-stream');\nvar fs = require('fs');\n\nvar combinedStream = CombinedStream.create({pauseStreams: false});\ncombinedStream.append(fs.createReadStream('file1.txt'));\ncombinedStream.append(fs.createReadStream('file2.txt'));\n\ncombinedStream.pipe(fs.createWriteStream('combined.txt'));\n```\n\nHowever, what if you don't have all the source streams yet, or you don't want\nto allocate the resources (file descriptors, memory, etc.) for them right away?\nWell, in that case you can simply provide a callback that supplies the stream\nby calling a `next()` function:\n\n``` javascript\nvar CombinedStream = require('combined-stream');\nvar fs = require('fs');\n\nvar combinedStream = CombinedStream.create();\ncombinedStream.append(function(next) {\n next(fs.createReadStream('file1.txt'));\n});\ncombinedStream.append(function(next) {\n next(fs.createReadStream('file2.txt'));\n});\n\ncombinedStream.pipe(fs.createWriteStream('combined.txt'));\n```\n\n## API\n\n### CombinedStream.create([options])\n\nReturns a new combined stream object. Available options are:\n\n* `maxDataSize`\n* `pauseStreams`\n\nThe effect of those options is described below.\n\n### combinedStream.pauseStreams = true\n\nWhether to apply back pressure to the underlaying streams. If set to `false`,\nthe underlaying streams will never be paused. If set to `true`, the\nunderlaying streams will be paused right after being appended, as well as when\n`delayedStream.pipe()` wants to throttle.\n\n### combinedStream.maxDataSize = 2 * 1024 * 1024\n\nThe maximum amount of bytes (or characters) to buffer for all source streams.\nIf this value is exceeded, `combinedStream` emits an `'error'` event.\n\n### combinedStream.dataSize = 0\n\nThe amount of bytes (or characters) currently buffered by `combinedStream`.\n\n### combinedStream.append(stream)\n\nAppends the given `stream` to the combinedStream object. If `pauseStreams` is\nset to `true, this stream will also be paused right away.\n\n`streams` can also be a function that takes one parameter called `next`. `next`\nis a function that must be invoked in order to provide the `next` stream, see\nexample above.\n\nRegardless of how the `stream` is appended, combined-stream always attaches an\n`'error'` listener to it, so you don't have to do that manually.\n\nSpecial case: `stream` can also be a String or Buffer.\n\n### combinedStream.write(data)\n\nYou should not call this, `combinedStream` takes care of piping the appended\nstreams into itself for you.\n\n### combinedStream.resume()\n\nCauses `combinedStream` to start drain the streams it manages. The function is\nidempotent, and also emits a `'resume'` event each time which usually goes to\nthe stream that is currently being drained.\n\n### combinedStream.pause();\n\nIf `combinedStream.pauseStreams` is set to `false`, this does nothing.\nOtherwise a `'pause'` event is emitted, this goes to the stream that is\ncurrently being drained, so you can use it to apply back pressure.\n\n### combinedStream.end();\n\nSets `combinedStream.writable` to false, emits an `'end'` event, and removes\nall streams from the queue.\n\n### combinedStream.destroy();\n\nSame as `combinedStream.end()`, except it emits a `'close'` event instead of\n`'end'`.\n\n## License\n\ncombined-stream is licensed under the MIT license.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/felixge/node-combined-stream/issues" - }, - "_id": "combined-stream@0.0.4", - "dist": { - "shasum": "6562a96c9e6862c7a1349ac563047313599d0e86" - }, - "_from": "combined-stream@~0.0.4", - "_resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.4.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/common.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/common.js deleted file mode 100644 index 81543485..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/common.js +++ /dev/null @@ -1,23 +0,0 @@ -var common = module.exports; - -var path = require('path'); -var fs = require('fs'); -var root = path.join(__dirname, '..'); - -common.dir = { - fixture: root + '/test/fixture', - tmp: root + '/test/tmp', -}; - -// Create tmp directory if it does not exist -// Not using fs.exists so as to be node 0.6.x compatible -try { - fs.statSync(common.dir.tmp); -} -catch (e) { - // Dir does not exist - fs.mkdirSync(common.dir.tmp); -} - -common.CombinedStream = require(root); -common.assert = require('assert'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file1.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file1.txt deleted file mode 100644 index 50e0218d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file1.txt +++ /dev/null @@ -1,256 +0,0 @@ -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file2.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file2.txt deleted file mode 100644 index da1d821f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file2.txt +++ /dev/null @@ -1,256 +0,0 @@ -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-callback-streams.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-callback-streams.js deleted file mode 100644 index 44ecabab..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-callback-streams.js +++ /dev/null @@ -1,27 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var fs = require('fs'); - -var FILE1 = common.dir.fixture + '/file1.txt'; -var FILE2 = common.dir.fixture + '/file2.txt'; -var EXPECTED = fs.readFileSync(FILE1) + fs.readFileSync(FILE2); - -(function testDelayedStreams() { - var combinedStream = CombinedStream.create(); - combinedStream.append(function(next) { - next(fs.createReadStream(FILE1)); - }); - combinedStream.append(function(next) { - next(fs.createReadStream(FILE2)); - }); - - var tmpFile = common.dir.tmp + '/combined.txt'; - var dest = fs.createWriteStream(tmpFile); - combinedStream.pipe(dest); - - dest.on('end', function() { - var written = fs.readFileSync(tmpFile, 'utf8'); - assert.strictEqual(written, EXPECTED); - }); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-data-size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-data-size.js deleted file mode 100644 index e3fbd184..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-data-size.js +++ /dev/null @@ -1,34 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; - -(function testDataSizeGetter() { - var combinedStream = CombinedStream.create(); - - assert.strictEqual(combinedStream.dataSize, 0); - - // Test one stream - combinedStream._streams.push({dataSize: 10}); - combinedStream._updateDataSize(); - assert.strictEqual(combinedStream.dataSize, 10); - - // Test two streams - combinedStream._streams.push({dataSize: 23}); - combinedStream._updateDataSize(); - assert.strictEqual(combinedStream.dataSize, 33); - - // Test currentStream - combinedStream._currentStream = {dataSize: 20}; - combinedStream._updateDataSize(); - assert.strictEqual(combinedStream.dataSize, 53); - - // Test currentStream without dataSize - combinedStream._currentStream = {}; - combinedStream._updateDataSize(); - assert.strictEqual(combinedStream.dataSize, 33); - - // Test stream function - combinedStream._streams.push(function() {}); - combinedStream._updateDataSize(); - assert.strictEqual(combinedStream.dataSize, 33); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams-and-buffers-and-strings.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams-and-buffers-and-strings.js deleted file mode 100644 index c678575c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams-and-buffers-and-strings.js +++ /dev/null @@ -1,38 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var fs = require('fs'); - -var FILE1 = common.dir.fixture + '/file1.txt'; -var BUFFER = new Buffer('Bacon is delicious'); -var FILE2 = common.dir.fixture + '/file2.txt'; -var STRING = 'The € kicks the $\'s ass!'; - -var EXPECTED = - fs.readFileSync(FILE1) - + BUFFER - + fs.readFileSync(FILE2) - + STRING; -var GOT; - -(function testDelayedStreams() { - var combinedStream = CombinedStream.create(); - combinedStream.append(fs.createReadStream(FILE1)); - combinedStream.append(BUFFER); - combinedStream.append(fs.createReadStream(FILE2)); - combinedStream.append(function(next) { - next(STRING); - }); - - var tmpFile = common.dir.tmp + '/combined-file1-buffer-file2-string.txt'; - var dest = fs.createWriteStream(tmpFile); - combinedStream.pipe(dest); - - dest.on('close', function() { - GOT = fs.readFileSync(tmpFile, 'utf8'); - }); -})(); - -process.on('exit', function() { - assert.strictEqual(GOT, EXPECTED); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams.js deleted file mode 100644 index 263cfdf7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams.js +++ /dev/null @@ -1,35 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var fs = require('fs'); - -var FILE1 = common.dir.fixture + '/file1.txt'; -var FILE2 = common.dir.fixture + '/file2.txt'; -var EXPECTED = fs.readFileSync(FILE1) + fs.readFileSync(FILE2); -var GOT; - -(function testDelayedStreams() { - var combinedStream = CombinedStream.create(); - combinedStream.append(fs.createReadStream(FILE1)); - combinedStream.append(fs.createReadStream(FILE2)); - - var stream1 = combinedStream._streams[0]; - var stream2 = combinedStream._streams[1]; - - stream1.on('end', function() { - assert.equal(stream2.dataSize, 0); - }); - - var tmpFile = common.dir.tmp + '/combined.txt'; - var dest = fs.createWriteStream(tmpFile); - combinedStream.pipe(dest); - - dest.on('close', function() { - GOT = fs.readFileSync(tmpFile, 'utf8'); - }); -})(); - -process.on('exit', function() { - console.error(GOT.length, EXPECTED.length); - assert.strictEqual(GOT, EXPECTED); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-empty-string.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-empty-string.js deleted file mode 100644 index c3d288d0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-empty-string.js +++ /dev/null @@ -1,39 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var util = require('util'); -var Stream = require('stream').Stream; - -var s = CombinedStream.create(); - - -function StringStream(){ - this.writable=true; - this.str="" -} -util.inherits(StringStream,Stream); - -StringStream.prototype.write=function(chunk,encoding){ - this.str+=chunk.toString(); - this.emit('data',chunk); -} - -StringStream.prototype.end=function(chunk,encoding){ - this.emit('end'); -} - -StringStream.prototype.toString=function(){ - return this.str; -} - - -s.append("foo."); -s.append(""); -s.append("bar"); - -var ss = new StringStream(); - -s.pipe(ss); -s.resume(); - -assert.equal(ss.toString(),"foo.bar"); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-is-stream-like.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-is-stream-like.js deleted file mode 100644 index aefa36e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-is-stream-like.js +++ /dev/null @@ -1,17 +0,0 @@ -var fs = require('fs'); -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var FILE1 = common.dir.fixture + '/file1.txt'; -var fileStream = fs.createReadStream(FILE1); - -var foo = function(){}; - -(function testIsStreamLike() { - assert(! CombinedStream.isStreamLike(true)); - assert(! CombinedStream.isStreamLike("I am a string")); - assert(! CombinedStream.isStreamLike(7)); - assert(! CombinedStream.isStreamLike(foo)); - - assert(CombinedStream.isStreamLike(fileStream)); -})(); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-max-data-size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-max-data-size.js deleted file mode 100644 index 25f47a47..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-max-data-size.js +++ /dev/null @@ -1,24 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var fs = require('fs'); - -var FILE1 = common.dir.fixture + '/file1.txt'; -var FILE2 = common.dir.fixture + '/file2.txt'; -var EXPECTED = fs.readFileSync(FILE1) + fs.readFileSync(FILE2); - -(function testDelayedStreams() { - var combinedStream = CombinedStream.create({pauseStreams: false, maxDataSize: 20736}); - combinedStream.append(fs.createReadStream(FILE1)); - combinedStream.append(fs.createReadStream(FILE2)); - - var gotErr = null; - combinedStream.on('error', function(err) { - gotErr = err; - }); - - process.on('exit', function() { - assert.ok(gotErr); - assert.ok(gotErr.message.match(/bytes/)); - }); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-unpaused-streams.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-unpaused-streams.js deleted file mode 100644 index 30a3a6f8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-unpaused-streams.js +++ /dev/null @@ -1,30 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var fs = require('fs'); - -var FILE1 = common.dir.fixture + '/file1.txt'; -var FILE2 = common.dir.fixture + '/file2.txt'; -var EXPECTED = fs.readFileSync(FILE1) + fs.readFileSync(FILE2); - -(function testDelayedStreams() { - var combinedStream = CombinedStream.create({pauseStreams: false}); - combinedStream.append(fs.createReadStream(FILE1)); - combinedStream.append(fs.createReadStream(FILE2)); - - var stream1 = combinedStream._streams[0]; - var stream2 = combinedStream._streams[1]; - - stream1.on('end', function() { - assert.ok(stream2.dataSize > 0); - }); - - var tmpFile = common.dir.tmp + '/combined.txt'; - var dest = fs.createWriteStream(tmpFile); - combinedStream.pipe(dest); - - dest.on('end', function() { - var written = fs.readFileSync(tmpFile, 'utf8'); - assert.strictEqual(written, EXPECTED); - }); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/run.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/run.js deleted file mode 100755 index 0bb8e822..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/run.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -var far = require('far').create(); - -far.add(__dirname); -far.include(/test-.*\.js$/); - -far.execute(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/package.json deleted file mode 100644 index 5d424f23..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "author": { - "name": "Felix Geisendörfer", - "email": "felix@debuggable.com", - "url": "http://debuggable.com/" - }, - "name": "form-data", - "description": "A module to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.", - "version": "0.1.2", - "repository": { - "type": "git", - "url": "git://github.com/felixge/node-form-data.git" - }, - "main": "./lib/form_data", - "scripts": { - "test": "node test/run.js" - }, - "engines": { - "node": ">= 0.6" - }, - "dependencies": { - "combined-stream": "~0.0.4", - "mime": "~1.2.11", - "async": "~0.2.9" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://raw.github.com/felixge/node-form-data/master/License" - } - ], - "devDependencies": { - "fake": "~0.2.2", - "far": "~0.0.7", - "formidable": "~1.0.14", - "request": "~2.27.0" - }, - "readme": "# Form-Data [![Build Status](https://travis-ci.org/felixge/node-form-data.png?branch=master)](https://travis-ci.org/felixge/node-form-data) [![Dependency Status](https://gemnasium.com/felixge/node-form-data.png)](https://gemnasium.com/felixge/node-form-data)\n\nA module to create readable ```\"multipart/form-data\"``` streams. Can be used to submit forms and file uploads to other web applications.\n\nThe API of this module is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd].\n\n[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface\n[streams2-thing]: http://nodejs.org/api/stream.html#stream_compatibility_with_older_node_versions\n\n## Install\n\n```\nnpm install form-data\n```\n\n## Usage\n\nIn this example we are constructing a form with 3 fields that contain a string,\na buffer and a file stream.\n\n``` javascript\nvar FormData = require('form-data');\nvar fs = require('fs');\n\nvar form = new FormData();\nform.append('my_field', 'my value');\nform.append('my_buffer', new Buffer(10));\nform.append('my_file', fs.createReadStream('/foo/bar.jpg'));\n```\n\nAlso you can use http-response stream:\n\n``` javascript\nvar FormData = require('form-data');\nvar http = require('http');\n\nvar form = new FormData();\n\nhttp.request('http://nodejs.org/images/logo.png', function(response) {\n form.append('my_field', 'my value');\n form.append('my_buffer', new Buffer(10));\n form.append('my_logo', response);\n});\n```\n\nOr @mikeal's request stream:\n\n``` javascript\nvar FormData = require('form-data');\nvar request = require('request');\n\nvar form = new FormData();\n\nform.append('my_field', 'my value');\nform.append('my_buffer', new Buffer(10));\nform.append('my_logo', request('http://nodejs.org/images/logo.png'));\n```\n\nIn order to submit this form to a web application, call ```submit(url, [callback])``` method:\n\n``` javascript\nform.submit('http://example.org/', function(err, res) {\n // res – response object (http.IncomingMessage) //\n res.resume(); // for node-0.10.x\n});\n\n```\n\nFor more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods.\n\n### Alternative submission methods\n\nYou can use node's http client interface:\n\n``` javascript\nvar http = require('http');\n\nvar request = http.request({\n method: 'post',\n host: 'example.org',\n path: '/upload',\n headers: form.getHeaders()\n});\n\nform.pipe(request);\n\nrequest.on('response', function(res) {\n console.log(res.statusCode);\n});\n```\n\nOr if you would prefer the `'Content-Length'` header to be set for you:\n\n``` javascript\nform.submit('example.org/upload', function(err, res) {\n console.log(res.statusCode);\n});\n```\n\nTo use custom headers and pre-known length in parts:\n\n``` javascript\nvar CRLF = '\\r\\n';\nvar form = new FormData();\n\nvar options = {\n header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF,\n knownLength: 1\n};\n\nform.append('my_buffer', buffer, options);\n\nform.submit('http://example.com/', function(err, res) {\n if (err) throw err;\n console.log('Done');\n});\n```\n\nForm-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide \"file\"-related information manually:\n\n``` javascript\nsomeModule.stream(function(err, stdout, stderr) {\n if (err) throw err;\n\n var form = new FormData();\n\n form.append('file', stdout, {\n filename: 'unicycle.jpg',\n contentType: 'image/jpg',\n knownLength: 19806\n });\n\n form.submit('http://example.com/', function(err, res) {\n if (err) throw err;\n console.log('Done');\n });\n});\n```\n\nFor edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter:\n\n``` javascript\nform.submit({\n host: 'example.com',\n path: '/probably.php?extra=params',\n auth: 'username:password'\n}, function(err, res) {\n console.log(res.statusCode);\n});\n```\n\n## Notes\n\n- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround.\n- If it feels like FormData hangs after submit and you're on ```node-0.10```, please check [Compatibility with Older Node Versions][streams2-thing]\n\n## TODO\n\n- Add new streams (0.10) support and try really hard not to break it for 0.8.x.\n\n## License\n\nForm-Data is licensed under the MIT license.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/felixge/node-form-data/issues" - }, - "homepage": "https://github.com/felixge/node-form-data", - "_id": "form-data@0.1.2", - "dist": { - "shasum": "1143c21357911a78dd7913b189b4bab5d5d57445" - }, - "_from": "form-data@~0.1.0", - "_resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/.npmignore deleted file mode 100644 index 77ba16cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/.npmignore +++ /dev/null @@ -1,18 +0,0 @@ -.idea -*.iml -npm-debug.log -dump.rdb -node_modules -results.tap -results.xml -npm-shrinkwrap.json -config.json -.DS_Store -*/.DS_Store -*/*/.DS_Store -._* -*/._* -*/*/._* -coverage.* -lib-cov - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/.travis.yml deleted file mode 100755 index 047f7e3d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js - -node_js: - - 0.10 - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/LICENSE deleted file mode 100755 index e699a7bd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2012-2013, Eran Hammer. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Eran Hammer nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL ERAN HAMMER BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/Makefile deleted file mode 100755 index 5f339bf3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -test: - @node node_modules/lab/bin/lab -test-cov: - @node node_modules/lab/bin/lab -r threshold -t 100 -test-cov-html: - @node node_modules/lab/bin/lab -r html -o coverage.html -complexity: - @node node_modules/complexity-report/src/cli.js -o complexity.md -f markdown lib - -.PHONY: test test-cov test-cov-html complexity diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/README.md deleted file mode 100755 index 010bac6d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/README.md +++ /dev/null @@ -1,627 +0,0 @@ -![hawk Logo](https://raw.github.com/hueniverse/hawk/master/images/hawk.png) - -<img align="right" src="https://raw.github.com/hueniverse/hawk/master/images/logo.png" /> **Hawk** is an HTTP authentication scheme using a message authentication code (MAC) algorithm to provide partial -HTTP request cryptographic verification. For more complex use cases such as access delegation, see [Oz](https://github.com/hueniverse/oz). - -Current version: **1.0** - -[![Build Status](https://secure.travis-ci.org/hueniverse/hawk.png)](http://travis-ci.org/hueniverse/hawk) - -# Table of Content - -- [**Introduction**](#introduction) - - [Replay Protection](#replay-protection) - - [Usage Example](#usage-example) - - [Protocol Example](#protocol-example) - - [Payload Validation](#payload-validation) - - [Response Payload Validation](#response-payload-validation) - - [Browser Support and Considerations](#browser-support-and-considerations) -<p></p> -- [**Single URI Authorization**](#single-uri-authorization) - - [Usage Example](#bewit-usage-example) -<p></p> -- [**Security Considerations**](#security-considerations) - - [MAC Keys Transmission](#mac-keys-transmission) - - [Confidentiality of Requests](#confidentiality-of-requests) - - [Spoofing by Counterfeit Servers](#spoofing-by-counterfeit-servers) - - [Plaintext Storage of Credentials](#plaintext-storage-of-credentials) - - [Entropy of Keys](#entropy-of-keys) - - [Coverage Limitations](#coverage-limitations) - - [Future Time Manipulation](#future-time-manipulation) - - [Client Clock Poisoning](#client-clock-poisoning) - - [Bewit Limitations](#bewit-limitations) - - [Host Header Forgery](#host-header-forgery) -<p></p> -- [**Frequently Asked Questions**](#frequently-asked-questions) -<p></p> -- [**Acknowledgements**](#acknowledgements) - -# Introduction - -**Hawk** is an HTTP authentication scheme providing mechanisms for making authenticated HTTP requests with -partial cryptographic verification of the request and response, covering the HTTP method, request URI, host, -and optionally the request payload. - -Similar to the HTTP [Digest access authentication schemes](http://www.ietf.org/rfc/rfc2617.txt), **Hawk** uses a set of -client credentials which include an identifier (e.g. username) and key (e.g. password). Likewise, just as with the Digest scheme, -the key is never included in authenticated requests. Instead, it is used to calculate a request MAC value which is -included in its place. - -However, **Hawk** has several differences from Digest. In particular, while both use a nonce to limit the possibility of -replay attacks, in **Hawk** the client generates the nonce and uses it in combination with a timestamp, leading to less -"chattiness" (interaction with the server). - -Also unlike Digest, this scheme is not intended to protect the key itself (the password in Digest) because -the client and server must both have access to the key material in the clear. - -The primary design goals of this scheme are to: -* simplify and improve HTTP authentication for services that are unwilling or unable to deploy TLS for all resources, -* secure credentials against leakage (e.g., when the client uses some form of dynamic configuration to determine where - to send an authenticated request), and -* avoid the exposure of credentials sent to a malicious server over an unauthenticated secure channel due to client - failure to validate the server's identity as part of its TLS handshake. - -In addition, **Hawk** supports a method for granting third-parties temporary access to individual resources using -a query parameter called _bewit_ (in falconry, a leather strap used to attach a tracking device to the leg of a hawk). - -The **Hawk** scheme requires the establishment of a shared symmetric key between the client and the server, -which is beyond the scope of this module. Typically, the shared credentials are established via an initial -TLS-protected phase or derived from some other shared confidential information available to both the client -and the server. - - -## Replay Protection - -Without replay protection, an attacker can use a compromised (but otherwise valid and authenticated) request more -than once, gaining access to a protected resource. To mitigate this, clients include both a nonce and a timestamp when -making requests. This gives the server enough information to prevent replay attacks. - -The nonce is generated by the client, and is a string unique across all requests with the same timestamp and -key identifier combination. - -The timestamp enables the server to restrict the validity period of the credentials where requests occuring afterwards -are rejected. It also removes the need for the server to retain an unbounded number of nonce values for future checks. -By default, **Hawk** uses a time window of 1 minute to allow for time skew between the client and server (which in -practice translates to a maximum of 2 minutes as the skew can be positive or negative). - -Using a timestamp requires the client's clock to be in sync with the server's clock. **Hawk** requires both the client -clock and the server clock to use NTP to ensure synchronization. However, given the limitations of some client types -(e.g. browsers) to deploy NTP, the server provides the client with its current time (in seconds precision) in response -to a bad timestamp. - -There is no expectation that the client will adjust its system clock to match the server (in fact, this would be a -potential attack vector). Instead, the client only uses the server's time to calculate an offset used only -for communications with that particular server. The protocol rewards clients with synchronized clocks by reducing -the number of round trips required to authenticate the first request. - - -## Usage Example - -Server code: - -```javascript -var Http = require('http'); -var Hawk = require('hawk'); - - -// Credentials lookup function - -var credentialsFunc = function (id, callback) { - - var credentials = { - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'Steve' - }; - - return callback(null, credentials); -}; - -// Create HTTP server - -var handler = function (req, res) { - - // Authenticate incoming request - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - // Prepare response - - var payload = (!err ? 'Hello ' + credentials.user + ' ' + artifacts.ext : 'Shoosh!'); - var headers = { 'Content-Type': 'text/plain' }; - - // Generate Server-Authorization response header - - var header = Hawk.server.header(credentials, artifacts, { payload: payload, contentType: headers['Content-Type'] }); - headers['Server-Authorization'] = header; - - // Send the response back - - res.writeHead(!err ? 200 : 401, headers); - res.end(payload); - }); -}; - -// Start server - -Http.createServer(handler).listen(8000, 'example.com'); -``` - -Client code: - -```javascript -var Request = require('request'); -var Hawk = require('hawk'); - - -// Client credentials - -var credentials = { - id: 'dh37fgj492je', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256' -} - -// Request options - -var requestOptions = { - uri: 'http://example.com:8000/resource/1?b=1&a=2', - method: 'GET', - headers: {} -}; - -// Generate Authorization request header - -var header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'GET', { credentials: credentials, ext: 'some-app-data' }); -requestOptions.headers.Authorization = header.field; - -// Send authenticated request - -Request(requestOptions, function (error, response, body) { - - // Authenticate the server's response - - var isValid = Hawk.client.authenticate(response, credentials, header.artifacts, { payload: body }); - - // Output results - - console.log(response.statusCode + ': ' + body + (isValid ? ' (valid)' : ' (invalid)')); -}); -``` - -**Hawk** utilized the [**SNTP**](https://github.com/hueniverse/sntp) module for time sync management. By default, the local -machine time is used. To automatically retrieve and synchronice the clock within the application, use the SNTP 'start()' method. - -```javascript -Hawk.sntp.start(); -``` - - -## Protocol Example - -The client attempts to access a protected resource without authentication, sending the following HTTP request to -the resource server: - -``` -GET /resource/1?b=1&a=2 HTTP/1.1 -Host: example.com:8000 -``` - -The resource server returns an authentication challenge. - -``` -HTTP/1.1 401 Unauthorized -WWW-Authenticate: Hawk -``` - -The client has previously obtained a set of **Hawk** credentials for accessing resources on the "http://example.com/" -server. The **Hawk** credentials issued to the client include the following attributes: - -* Key identifier: dh37fgj492je -* Key: werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn -* Algorithm: sha256 - -The client generates the authentication header by calculating a timestamp (e.g. the number of seconds since January 1, -1970 00:00:00 GMT), generating a nonce, and constructing the normalized request string (each value followed by a newline -character): - -``` -hawk.1.header -1353832234 -j4h3g2 -GET -/resource/1?b=1&a=2 -example.com -8000 - -some-app-ext-data - -``` - -The request MAC is calculated using HMAC with the specified hash algorithm "sha256" and the key over the normalized request string. -The result is base64-encoded to produce the request MAC: - -``` -6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE= -``` - -The client includes the **Hawk** key identifier, timestamp, nonce, application specific data, and request MAC with the request using -the HTTP `Authorization` request header field: - -``` -GET /resource/1?b=1&a=2 HTTP/1.1 -Host: example.com:8000 -Authorization: Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", ext="some-app-ext-data", mac="6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE=" -``` - -The server validates the request by calculating the request MAC again based on the request received and verifies the validity -and scope of the **Hawk** credentials. If valid, the server responds with the requested resource. - - -### Payload Validation - -**Hawk** provides optional payload validation. When generating the authentication header, the client calculates a payload hash -using the specified hash algorithm. The hash is calculated over the concatenated value of (each followed by a newline character): -* `hawk.1.payload` -* the content-type in lowercase, without any parameters (e.g. `application/json`) -* the request payload prior to any content encoding (the exact representation requirements should be specified by the server for payloads other than simple single-part ascii to ensure interoperability) - -For example: - -* Payload: `Thank you for flying Hawk` -* Content Type: `text/plain` -* Hash (sha256): `Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=` - -Results in the following input to the payload hash function (newline terminated values): - -``` -hawk.1.payload -text/plain -Thank you for flying Hawk - -``` - -Which produces the following hash value: - -``` -Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY= -``` - -The client constructs the normalized request string (newline terminated values): - -``` -hawk.1.header -1353832234 -j4h3g2 -POST -/resource/1?a=1&b=2 -example.com -8000 -Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY= -some-app-ext-data - -``` - -Then calculates the request MAC and includes the **Hawk** key identifier, timestamp, nonce, payload hash, application specific data, -and request MAC, with the request using the HTTP `Authorization` request header field: - -``` -POST /resource/1?a=1&b=2 HTTP/1.1 -Host: example.com:8000 -Authorization: Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", hash="Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=", ext="some-app-ext-data", mac="aSe1DERmZuRl3pI36/9BdZmnErTw3sNzOOAUlfeKjVw=" -``` - -It is up to the server if and when it validates the payload for any given request, based solely on it's security policy -and the nature of the data included. - -If the payload is available at the time of authentication, the server uses the hash value provided by the client to construct -the normalized string and validates the MAC. If the MAC is valid, the server calculates the payload hash and compares the value -with the provided payload hash in the header. In many cases, checking the MAC first is faster than calculating the payload hash. - -However, if the payload is not available at authentication time (e.g. too large to fit in memory, streamed elsewhere, or processed -at a different stage in the application), the server may choose to defer payload validation for later by retaining the hash value -provided by the client after validating the MAC. - -It is important to note that MAC validation does not mean the hash value provided by the client is valid, only that the value -included in the header was not modified. Without calculating the payload hash on the server and comparing it to the value provided -by the client, the payload may be modified by an attacker. - - -## Response Payload Validation - -**Hawk** provides partial response payload validation. The server includes the `Server-Authorization` response header which enables the -client to authenticate the response and ensure it is talking to the right server. **Hawk** defines the HTTP `Server-Authorization` header -as a response header using the exact same syntax as the `Authorization` request header field. - -The header is contructed using the same process as the client's request header. The server uses the same credentials and other -artifacts provided by the client to constructs the normalized request string. The `ext` and `hash` values are replaced with -new values based on the server response. The rest as identical to those used by the client. - -The result MAC digest is included with the optional `hash` and `ext` values: - -``` -Server-Authorization: Hawk mac="XIJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific" -``` - - -## Browser Support and Considerations - -A browser script is provided for including using a `<script>` tag in [lib/browser.js](/lib/browser.js). - -**Hawk** relies on the _Server-Authorization_ and _WWW-Authenticate_ headers in its response to communicate with the client. -Therefore, in case of CORS requests, it is important to consider sending _Access-Control-Expose-Headers_ with the value -_"WWW-Authenticate, Server-Authorization"_ on each response from your server. As explained in the -[specifications](http://www.w3.org/TR/cors/#access-control-expose-headers-response-header), it will indicate that these headers -can safely be accessed by the client (using getResponseHeader() on the XmlHttpRequest object). Otherwise you will be met with a -["simple response header"](http://www.w3.org/TR/cors/#simple-response-header) which excludes these fields and would prevent the -Hawk client from authenticating the requests.You can read more about the why and how in this -[article](http://www.html5rocks.com/en/tutorials/cors/#toc-adding-cors-support-to-the-server) - - -# Single URI Authorization - -There are cases in which limited and short-term access to a protected resource is granted to a third party which does not -have access to the shared credentials. For example, displaying a protected image on a web page accessed by anyone. **Hawk** -provides limited support for such URIs in the form of a _bewit_ - a URI query parameter appended to the request URI which contains -the necessary credentials to authenticate the request. - -Because of the significant security risks involved in issuing such access, bewit usage is purposely limited only to GET requests -and for a finite period of time. Both the client and server can issue bewit credentials, however, the server should not use the same -credentials as the client to maintain clear traceability as to who issued which credentials. - -In order to simplify implementation, bewit credentials do not support single-use policy and can be replayed multiple times within -the granted access timeframe. - - -## Bewit Usage Example - -Server code: - -```javascript -var Http = require('http'); -var Hawk = require('hawk'); - - -// Credentials lookup function - -var credentialsFunc = function (id, callback) { - - var credentials = { - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256' - }; - - return callback(null, credentials); -}; - -// Create HTTP server - -var handler = function (req, res) { - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - res.writeHead(!err ? 200 : 401, { 'Content-Type': 'text/plain' }); - res.end(!err ? 'Access granted' : 'Shoosh!'); - }); -}; - -Http.createServer(handler).listen(8000, 'example.com'); -``` - -Bewit code generation: - -```javascript -var Request = require('request'); -var Hawk = require('hawk'); - - -// Client credentials - -var credentials = { - id: 'dh37fgj492je', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256' -} - -// Generate bewit - -var duration = 60 * 5; // 5 Minutes -var bewit = Hawk.uri.getBewit('http://example.com:8080/resource/1?b=1&a=2', { credentials: credentials, ttlSec: duration, ext: 'some-app-data' }); -var uri = 'http://example.com:8000/resource/1?b=1&a=2' + '&bewit=' + bewit; -``` - - -# Security Considerations - -The greatest sources of security risks are usually found not in **Hawk** but in the policies and procedures surrounding its use. -Implementers are strongly encouraged to assess how this module addresses their security requirements. This section includes -an incomplete list of security considerations that must be reviewed and understood before deploying **Hawk** on the server. -Many of the protections provided in **Hawk** depends on whether and how they are used. - -### MAC Keys Transmission - -**Hawk** does not provide any mechanism for obtaining or transmitting the set of shared credentials required. Any mechanism used -to obtain **Hawk** credentials must ensure that these transmissions are protected using transport-layer mechanisms such as TLS. - -### Confidentiality of Requests - -While **Hawk** provides a mechanism for verifying the integrity of HTTP requests, it provides no guarantee of request -confidentiality. Unless other precautions are taken, eavesdroppers will have full access to the request content. Servers should -carefully consider the types of data likely to be sent as part of such requests, and employ transport-layer security mechanisms -to protect sensitive resources. - -### Spoofing by Counterfeit Servers - -**Hawk** provides limited verification of the server authenticity. When receiving a response back from the server, the server -may choose to include a response `Server-Authorization` header which the client can use to verify the response. However, it is up to -the server to determine when such measure is included, to up to the client to enforce that policy. - -A hostile party could take advantage of this by intercepting the client's requests and returning misleading or otherwise -incorrect responses. Service providers should consider such attacks when developing services using this protocol, and should -require transport-layer security for any requests where the authenticity of the resource server or of server responses is an issue. - -### Plaintext Storage of Credentials - -The **Hawk** key functions the same way passwords do in traditional authentication systems. In order to compute the request MAC, -the server must have access to the key in plaintext form. This is in contrast, for example, to modern operating systems, which -store only a one-way hash of user credentials. - -If an attacker were to gain access to these keys - or worse, to the server's database of all such keys - he or she would be able -to perform any action on behalf of any resource owner. Accordingly, it is critical that servers protect these keys from unauthorized -access. - -### Entropy of Keys - -Unless a transport-layer security protocol is used, eavesdroppers will have full access to authenticated requests and request -MAC values, and will thus be able to mount offline brute-force attacks to recover the key used. Servers should be careful to -assign keys which are long enough, and random enough, to resist such attacks for at least the length of time that the **Hawk** -credentials are valid. - -For example, if the credentials are valid for two weeks, servers should ensure that it is not possible to mount a brute force -attack that recovers the key in less than two weeks. Of course, servers are urged to err on the side of caution, and use the -longest key reasonable. - -It is equally important that the pseudo-random number generator (PRNG) used to generate these keys be of sufficiently high -quality. Many PRNG implementations generate number sequences that may appear to be random, but which nevertheless exhibit -patterns or other weaknesses which make cryptanalysis or brute force attacks easier. Implementers should be careful to use -cryptographically secure PRNGs to avoid these problems. - -### Coverage Limitations - -The request MAC only covers the HTTP `Host` header and optionally the `Content-Type` header. It does not cover any other headers -which can often affect how the request body is interpreted by the server. If the server behavior is influenced by the presence -or value of such headers, an attacker can manipulate the request headers without being detected. Implementers should use the -`ext` feature to pass application-specific information via the `Authorization` header which is protected by the request MAC. - -The response authentication, when performed, only covers the response payload, content-type, and the request information -provided by the client in it's request (method, resource, timestamp, nonce, etc.). It does not cover the HTTP status code or -any other response header field (e.g. Location) which can affect the client's behaviour. - -### Future Time Manipulation - -The protocol relies on a clock sync between the client and server. To accomplish this, the server informs the client of its -current time when an invalid timestamp is received. - -If an attacker is able to manipulate this information and cause the client to use an incorrect time, it would be able to cause -the client to generate authenticated requests using time in the future. Such requests will fail when sent by the client, and will -not likely leave a trace on the server (given the common implementation of nonce, if at all enforced). The attacker will then -be able to replay the request at the correct time without detection. - -The client must only use the time information provided by the server if: -* it was delivered over a TLS connection and the server identity has been verified, or -* the `tsm` MAC digest calculated using the same client credentials over the timestamp has been verified. - -### Client Clock Poisoning - -When receiving a request with a bad timestamp, the server provides the client with its current time. The client must never use -the time received from the server to adjust its own clock, and must only use it to calculate an offset for communicating with -that particular server. - -### Bewit Limitations - -Special care must be taken when issuing bewit credentials to third parties. Bewit credentials are valid until expiration and cannot -be revoked or limited without using other means. Whatever resource they grant access to will be completely exposed to anyone with -access to the bewit credentials which act as bearer credentials for that particular resource. While bewit usage is limited to GET -requests only and therefore cannot be used to perform transactions or change server state, it can still be used to expose private -and sensitive information. - -### Host Header Forgery - -Hawk validates the incoming request MAC against the incoming HTTP Host header. However, unless the optional `host` and `port` -options are used with `server.authenticate()`, a malicous client can mint new host names pointing to the server's IP address and -use that to craft an attack by sending a valid request that's meant for another hostname than the one used by the server. Server -implementors must manually verify that the host header received matches their expectation (or use the options mentioned above). - -# Frequently Asked Questions - -### Where is the protocol specification? - -If you are looking for some prose explaining how all this works, **this is it**. **Hawk** is being developed as an open source -project instead of a standard. In other words, the [code](/hueniverse/hawk/tree/master/lib) is the specification. Not sure about -something? Open an issue! - -### Is it done? - -At if version 0.10.0, **Hawk** is feature-complete. However, until this module reaches version 1.0.0 it is considered experimental -and is likely to change. This also means your feedback and contribution are very welcome. Feel free to open issues with questions -and suggestions. - -### Where can I find **Hawk** implementations in other languages? - -**Hawk**'s only reference implementation is provided in JavaScript as a node.js module. However, others are actively porting it to other -platforms. There is already a [PHP](https://github.com/alexbilbie/PHP-Hawk), -[.NET](https://github.com/pcibraro/hawknet), and [JAVA](https://github.com/wealdtech/hawk) libraries available. The full list -is maintained [here](https://github.com/hueniverse/hawk/issues?labels=port). Please add an issue if you are working on another -port. A cross-platform test-suite is in the works. - -### Why isn't the algorithm part of the challenge or dynamically negotiated? - -The algorithm used is closely related to the key issued as different algorithms require different key sizes (and other -requirements). While some keys can be used for multiple algorithm, the protocol is designed to closely bind the key and algorithm -together as part of the issued credentials. - -### Why is Host and Content-Type the only headers covered by the request MAC? - -It is really hard to include other headers. Headers can be changed by proxies and other intermediaries and there is no -well-established way to normalize them. Many platforms change the case of header field names and values. The only -straight-forward solution is to include the headers in some blob (say, base64 encoded JSON) and include that with the request, -an approach taken by JWT and other such formats. However, that design violates the HTTP header boundaries, repeats information, -and introduces other security issues because firewalls will not be aware of these "hidden" headers. In addition, any information -repeated must be compared to the duplicated information in the header and therefore only moves the problem elsewhere. - -### Why not just use HTTP Digest? - -Digest requires pre-negotiation to establish a nonce. This means you can't just make a request - you must first send -a protocol handshake to the server. This pattern has become unacceptable for most web services, especially mobile -where extra round-trip are costly. - -### Why bother with all this nonce and timestamp business? - -**Hawk** is an attempt to find a reasonable, practical compromise between security and usability. OAuth 1.0 got timestamp -and nonces halfway right but failed when it came to scalability and consistent developer experience. **Hawk** addresses -it by requiring the client to sync its clock, but provides it with tools to accomplish it. - -In general, replay protection is a matter of application-specific threat model. It is less of an issue on a TLS-protected -system where the clients are implemented using best practices and are under the control of the server. Instead of dropping -replay protection, **Hawk** offers a required time window and an optional nonce verification. Together, it provides developers -with the ability to decide how to enforce their security policy without impacting the client's implementation. - -### What are `app` and `dlg` in the authorization header and normalized mac string? - -The original motivation for **Hawk** was to replace the OAuth 1.0 use cases. This included both a simple client-server mode which -this module is specifically designed for, and a delegated access mode which is being developed separately in -[Oz](https://github.com/hueniverse/oz). In addition to the **Hawk** use cases, Oz requires another attribute: the application id `app`. -This provides binding between the credentials and the application in a way that prevents an attacker from tricking an application -to use credentials issued to someone else. It also has an optional 'delegated-by' attribute `dlg` which is the application id of the -application the credentials were directly issued to. The goal of these two additions is to allow Oz to utilize **Hawk** directly, -but with the additional security of delegated credentials. - -### What is the purpose of the static strings used in each normalized MAC input? - -When calculating a hash or MAC, a static prefix (tag) is added. The prefix is used to prevent MAC values from being -used or reused for a purpose other than what they were created for (i.e. prevents switching MAC values between a request, -response, and a bewit use cases). It also protects against expliots created after a potential change in how the protocol -creates the normalized string. For example, if a future version would switch the order of nonce and timestamp, it -can create an exploit opportunity for cases where the nonce is similar in format to a timestamp. - -### Does **Hawk** have anything to do with OAuth? - -Short answer: no. - -**Hawk** was originally proposed as the OAuth MAC Token specification. However, the OAuth working group in its consistent -incompetence failed to produce a final, usable solution to address one of the most popular use cases of OAuth 1.0 - using it -to authenticate simple client-server transactions (i.e. two-legged). As you can guess, the OAuth working group is still hard -at work to produce more garbage. - -**Hawk** provides a simple HTTP authentication scheme for making client-server requests. It does not address the OAuth use case -of delegating access to a third party. If you are looking for an OAuth alternative, check out [Oz](https://github.com/hueniverse/oz). - - -# Acknowledgements - -**Hawk** is a derivative work of the [HTTP MAC Authentication Scheme](http://tools.ietf.org/html/draft-hammer-oauth-v2-mac-token-05) proposal -co-authored by Ben Adida, Adam Barth, and Eran Hammer, which in turn was based on the OAuth 1.0 community specification. - -Special thanks to Ben Laurie for his always insightful feedback and advice. - -The **Hawk** logo was created by [Chris Carrasco](http://chriscarrasco.com). diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/example/usage.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/example/usage.js deleted file mode 100755 index 8c063f6c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/example/usage.js +++ /dev/null @@ -1,78 +0,0 @@ -// Load modules - -var Http = require('http'); -var Request = require('request'); -var Hawk = require('../lib'); - - -// Declare internals - -var internals = { - credentials: { - dh37fgj492je: { - id: 'dh37fgj492je', // Required by Hawk.client.header - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'Steve' - } - } -}; - - -// Credentials lookup function - -var credentialsFunc = function (id, callback) { - - return callback(null, internals.credentials[id]); -}; - - -// Create HTTP server - -var handler = function (req, res) { - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - var payload = (!err ? 'Hello ' + credentials.user + ' ' + artifacts.ext : 'Shoosh!'); - var headers = { - 'Content-Type': 'text/plain', - 'Server-Authorization': Hawk.server.header(credentials, artifacts, { payload: payload, contentType: 'text/plain' }) - }; - - res.writeHead(!err ? 200 : 401, headers); - res.end(payload); - }); -}; - -Http.createServer(handler).listen(8000, '127.0.0.1'); - - -// Send unauthenticated request - -Request('http://127.0.0.1:8000/resource/1?b=1&a=2', function (error, response, body) { - - console.log(response.statusCode + ': ' + body); -}); - - -// Send authenticated request - -credentialsFunc('dh37fgj492je', function (err, credentials) { - - var header = Hawk.client.header('http://127.0.0.1:8000/resource/1?b=1&a=2', 'GET', { credentials: credentials, ext: 'and welcome!' }); - var options = { - uri: 'http://127.0.0.1:8000/resource/1?b=1&a=2', - method: 'GET', - headers: { - authorization: header.field - } - }; - - Request(options, function (error, response, body) { - - var isValid = Hawk.client.authenticate(response, credentials, header.artifacts, { payload: body }); - console.log(response.statusCode + ': ' + body + (isValid ? ' (valid)' : ' (invalid)')); - process.exit(0); - }); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/images/hawk.png b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/images/hawk.png deleted file mode 100755 index a0e15cda..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/images/hawk.png and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/images/logo.png b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/images/logo.png deleted file mode 100755 index b8ff5901..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/images/logo.png and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/index.js deleted file mode 100755 index 4cc88b35..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib'); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/browser.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/browser.js deleted file mode 100755 index 27494f23..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/browser.js +++ /dev/null @@ -1,485 +0,0 @@ -/* - HTTP Hawk Authentication Scheme - Copyright (c) 2012-2013, Eran Hammer <eran@hueniverse.com> - MIT Licensed -*/ - - -// Declare namespace - -var hawk = {}; - - -// Export if used as a module - -if (typeof module !== "undefined" && module.exports) { - module.exports = hawk; -} - -hawk.client = { - - // Generate an Authorization header for a given request - - /* - uri: 'http://example.com/resource?a=b' - method: HTTP verb (e.g. 'GET', 'POST') - options: { - - // Required - - credentials: { - id: 'dh37fgj492je', - key: 'aoijedoaijsdlaksjdl', - algorithm: 'sha256' // 'sha1', 'sha256' - }, - - // Optional - - ext: 'application-specific', // Application specific data sent via the ext attribute - timestamp: Date.now() / 1000, // A pre-calculated timestamp in seconds - nonce: '2334f34f', // A pre-generated nonce - localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided) - payload: '{"some":"payload"}', // UTF-8 encoded string for body hash generation (ignored if hash provided) - contentType: 'application/json', // Payload content-type (ignored if hash provided) - hash: 'U4MKKSmiVxk37JCCrAVIjV=', // Pre-calculated payload hash - app: '24s23423f34dx', // Oz application id - dlg: '234sz34tww3sd' // Oz delegated-by application id - } - */ - - header: function (uri, method, options) { - - var result = { - field: '', - artifacts: {} - }; - - // Validate inputs - - if (!uri || (typeof uri !== 'string' && typeof uri !== 'object') || - !method || typeof method !== 'string' || - !options || typeof options !== 'object') { - - return result; - } - - // Application time - - var timestamp = options.timestamp || Math.floor((hawk.utils.now() + (options.localtimeOffsetMsec || 0)) / 1000) - - // Validate credentials - - var credentials = options.credentials; - if (!credentials || - !credentials.id || - !credentials.key || - !credentials.algorithm) { - - // Invalid credential object - return result; - } - - if (hawk.crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return result; - } - - // Parse URI - - if (typeof uri === 'string') { - uri = hawk.utils.parseUri(uri); - } - - // Calculate signature - - var artifacts = { - ts: timestamp, - nonce: options.nonce || hawk.utils.randomString(6), - method: method, - resource: uri.relative, - host: uri.hostname, - port: uri.port, - hash: options.hash, - ext: options.ext, - app: options.app, - dlg: options.dlg - }; - - result.artifacts = artifacts; - - // Calculate payload hash - - if (!artifacts.hash && - options.hasOwnProperty('payload')) { - - artifacts.hash = hawk.crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType); - } - - var mac = hawk.crypto.calculateMac('header', credentials, artifacts); - - // Construct header - - var hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== ''; // Other falsey values allowed - var header = 'Hawk id="' + credentials.id + - '", ts="' + artifacts.ts + - '", nonce="' + artifacts.nonce + - (artifacts.hash ? '", hash="' + artifacts.hash : '') + - (hasExt ? '", ext="' + hawk.utils.escapeHeaderAttribute(artifacts.ext) : '') + - '", mac="' + mac + '"'; - - if (artifacts.app) { - header += ', app="' + artifacts.app + - (artifacts.dlg ? '", dlg="' + artifacts.dlg : '') + '"'; - } - - result.field = header; - - return result; - }, - - - // Validate server response - - /* - request: object created via 'new XMLHttpRequest()' after response received - artifacts: object recieved from header().artifacts - options: { - payload: optional payload received - required: specifies if a Server-Authorization header is required. Defaults to 'false' - } - */ - - authenticate: function (request, credentials, artifacts, options) { - - options = options || {}; - - if (request.getResponseHeader('www-authenticate')) { - - // Parse HTTP WWW-Authenticate header - - var attributes = hawk.utils.parseAuthorizationHeader(request.getResponseHeader('www-authenticate'), ['ts', 'tsm', 'error']); - if (!attributes) { - return false; - } - - if (attributes.ts) { - var tsm = hawk.crypto.calculateTsMac(attributes.ts, credentials); - if (tsm !== attributes.tsm) { - return false; - } - - hawk.utils.setNtpOffset(attributes.ts - Math.floor(Date.now() / 1000)); // Keep offset at 1 second precision - } - } - - // Parse HTTP Server-Authorization header - - if (!request.getResponseHeader('server-authorization') && - !options.required) { - - return true; - } - - var attributes = hawk.utils.parseAuthorizationHeader(request.getResponseHeader('server-authorization'), ['mac', 'ext', 'hash']); - if (!attributes) { - return false; - } - - var modArtifacts = { - ts: artifacts.ts, - nonce: artifacts.nonce, - method: artifacts.method, - resource: artifacts.resource, - host: artifacts.host, - port: artifacts.port, - hash: attributes.hash, - ext: attributes.ext, - app: artifacts.app, - dlg: artifacts.dlg - }; - - var mac = hawk.crypto.calculateMac('response', credentials, modArtifacts); - if (mac !== attributes.mac) { - return false; - } - - if (!options.hasOwnProperty('payload')) { - return true; - } - - if (!attributes.hash) { - return false; - } - - var calculatedHash = hawk.crypto.calculatePayloadHash(options.payload, credentials.algorithm, request.getResponseHeader('content-type')); - return (calculatedHash === attributes.hash); - }, - - message: function (host, port, message, options) { - - // Validate inputs - - if (!host || typeof host !== 'string' || - !port || typeof port !== 'number' || - message === null || message === undefined || typeof message !== 'string' || - !options || typeof options !== 'object') { - - return null; - } - - // Application time - - var timestamp = options.timestamp || Math.floor((hawk.utils.now() + (options.localtimeOffsetMsec || 0)) / 1000) - - // Validate credentials - - var credentials = options.credentials; - if (!credentials || - !credentials.id || - !credentials.key || - !credentials.algorithm) { - - // Invalid credential object - return null; - } - - if (hawk.crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return null; - } - - // Calculate signature - - var artifacts = { - ts: timestamp, - nonce: options.nonce || hawk.utils.randomString(6), - host: host, - port: port, - hash: hawk.crypto.calculatePayloadHash(message, credentials.algorithm) - }; - - // Construct authorization - - var result = { - id: credentials.id, - ts: artifacts.ts, - nonce: artifacts.nonce, - hash: artifacts.hash, - mac: hawk.crypto.calculateMac('message', credentials, artifacts) - }; - - return result; - } -}; - - -hawk.crypto = { - - headerVersion: '1', - - algorithms: ['sha1', 'sha256'], - - calculateMac: function (type, credentials, options) { - - var normalized = hawk.crypto.generateNormalizedString(type, options); - - var hmac = CryptoJS['Hmac' + credentials.algorithm.toUpperCase()](normalized, credentials.key); - return hmac.toString(CryptoJS.enc.Base64); - }, - - generateNormalizedString: function (type, options) { - - var normalized = 'hawk.' + hawk.crypto.headerVersion + '.' + type + '\n' + - options.ts + '\n' + - options.nonce + '\n' + - (options.method || '').toUpperCase() + '\n' + - (options.resource || '') + '\n' + - options.host.toLowerCase() + '\n' + - options.port + '\n' + - (options.hash || '') + '\n'; - - if (options.ext) { - normalized += options.ext.replace('\\', '\\\\').replace('\n', '\\n'); - } - - normalized += '\n'; - - if (options.app) { - normalized += options.app + '\n' + - (options.dlg || '') + '\n'; - } - - return normalized; - }, - - calculatePayloadHash: function (payload, algorithm, contentType) { - - var hash = CryptoJS.algo[algorithm.toUpperCase()].create(); - hash.update('hawk.' + hawk.crypto.headerVersion + '.payload\n'); - hash.update(hawk.utils.parseContentType(contentType) + '\n'); - hash.update(payload || ''); - hash.update('\n'); - return hash.finalize().toString(CryptoJS.enc.Base64); - }, - - calculateTsMac: function (ts, credentials) { - - var hash = CryptoJS['Hmac' + credentials.algorithm.toUpperCase()]('hawk.' + hawk.crypto.headerVersion + '.ts\n' + ts + '\n', credentials.key); - return hash.toString(CryptoJS.enc.Base64); - } -}; - - -hawk.utils = { - - storage: { // localStorage compatible interface - _cache: {}, - setItem: function (key, value) { - - hawk.utils.storage._cache[key] = value; - }, - getItem: function (key) { - - return hawk.utils.storage._cache[key]; - } - }, - - setStorage: function (storage) { - - var ntpOffset = hawk.utils.getNtpOffset() || 0; - hawk.utils.storage = storage; - hawk.utils.setNtpOffset(ntpOffset); - }, - - setNtpOffset: function (offset) { - - hawk.utils.storage.setItem('hawk_ntp_offset', offset); - }, - - getNtpOffset: function () { - - return parseInt(hawk.utils.storage.getItem('hawk_ntp_offset') || '0', 10); - }, - - now: function () { - - return Date.now() + hawk.utils.getNtpOffset(); - }, - - escapeHeaderAttribute: function (attribute) { - - return attribute.replace(/\\/g, '\\\\').replace(/\"/g, '\\"'); - }, - - parseContentType: function (header) { - - if (!header) { - return ''; - } - - return header.split(';')[0].trim().toLowerCase(); - }, - - parseAuthorizationHeader: function (header, keys) { - - if (!header) { - return null; - } - - var headerParts = header.match(/^(\w+)(?:\s+(.*))?$/); // Header: scheme[ something] - if (!headerParts) { - return null; - } - - var scheme = headerParts[1]; - if (scheme.toLowerCase() !== 'hawk') { - return null; - } - - var attributesString = headerParts[2]; - if (!attributesString) { - return null; - } - - var attributes = {}; - var verify = attributesString.replace(/(\w+)="([^"\\]*)"\s*(?:,\s*|$)/g, function ($0, $1, $2) { - - // Check valid attribute names - - if (keys.indexOf($1) === -1) { - return; - } - - // Allowed attribute value characters: !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9 - - if ($2.match(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~]+$/) === null) { - return; - } - - // Check for duplicates - - if (attributes.hasOwnProperty($1)) { - return; - } - - attributes[$1] = $2; - return ''; - }); - - if (verify !== '') { - return null; - } - - return attributes; - }, - - randomString: function (size) { - - var randomSource = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; - var len = randomSource.length; - - var result = []; - for (var i = 0; i < size; ++i) { - result[i] = randomSource[Math.floor(Math.random() * len)]; - } - - return result.join(''); - }, - - parseUri: function (input) { - - // Based on: parseURI 1.2.2 - // http://blog.stevenlevithan.com/archives/parseuri - // (c) Steven Levithan <stevenlevithan.com> - // MIT License - - var keys = ['source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'hostname', 'port', 'resource', 'relative', 'pathname', 'directory', 'file', 'query', 'fragment']; - - var uriRegex = /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?(((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?)(?:#(.*))?)/; - var uriByNumber = uriRegex.exec(input); - var uri = {}; - - var i = 15; - while (i--) { - uri[keys[i]] = uriByNumber[i] || ''; - } - - if (uri.port === null || - uri.port === '') { - - uri.port = (uri.protocol.toLowerCase() === 'http' ? '80' : (uri.protocol.toLowerCase() === 'https' ? '443' : '')); - } - - return uri; - } -}; - - -// Based on: Crypto-JS v3.1.2 -// Copyright (c) 2009-2013, Jeff Mott. All rights reserved. -// http://code.google.com/p/crypto-js/ -// http://code.google.com/p/crypto-js/wiki/License - -var CryptoJS=CryptoJS||function(h,r){var k={},l=k.lib={},n=function(){},f=l.Base={extend:function(a){n.prototype=this;var b=new n;a&&b.mixIn(a);b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)});b.init.prototype=b;b.$super=this;return b},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},j=l.WordArray=f.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=r?b:4*a.length},toString:function(a){return(a||s).stringify(this)},concat:function(a){var b=this.words,d=a.words,c=this.sigBytes;a=a.sigBytes;this.clamp();if(c%4)for(var e=0;e<a;e++)b[c+e>>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((c+e)%4);else if(65535<d.length)for(e=0;e<a;e+=4)b[c+e>>>2]=d[e>>>2];else b.push.apply(b,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<<32-8*(b%4);a.length=h.ceil(b/4)},clone:function(){var a=f.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],d=0;d<a;d+=4)b.push(4294967296*h.random()|0);return new j.init(b,a)}}),m=k.enc={},s=m.Hex={stringify:function(a){var b=a.words;a=a.sigBytes;for(var d=[],c=0;c<a;c++){var e=b[c>>>2]>>>24-8*(c%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c<b;c+=2)d[c>>>3]|=parseInt(a.substr(c,2),16)<<24-4*(c%8);return new j.init(d,b/2)}},p=m.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var d=[],c=0;c<a;c++)d.push(String.fromCharCode(b[c>>>2]>>>24-8*(c%4)&255));return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c<b;c++)d[c>>>2]|=(a.charCodeAt(c)&255)<<24-8*(c%4);return new j.init(d,b)}},t=m.Utf8={stringify:function(a){try{return decodeURIComponent(escape(p.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return p.parse(unescape(encodeURIComponent(a)))}},q=l.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new j.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=t.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,d=b.words,c=b.sigBytes,e=this.blockSize,f=c/(4*e),f=a?h.ceil(f):h.max((f|0)-this._minBufferSize,0);a=f*e;c=h.min(4*a,c);if(a){for(var g=0;g<a;g+=e)this._doProcessBlock(d,g);g=d.splice(0,a);b.sigBytes-=c}return new j.init(g,c)},clone:function(){var a=f.clone.call(this);a._data=this._data.clone();return a},_minBufferSize:0});l.Hasher=q.extend({cfg:f.extend(),init:function(a){this.cfg=this.cfg.extend(a);this.reset()},reset:function(){q.reset.call(this);this._doReset()},update:function(a){this._append(a);this._process();return this},finalize:function(a){a&&this._append(a);return this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,d){return(new a.init(d)).finalize(b)}},_createHmacHelper:function(a){return function(b,d){return(new u.HMAC.init(a,d)).finalize(b)}}});var u=k.algo={};return k}(Math); -(function () { var k = CryptoJS, b = k.lib, m = b.WordArray, l = b.Hasher, d = [], b = k.algo.SHA1 = l.extend({ _doReset: function () { this._hash = new m.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (n, p) { for (var a = this._hash.words, e = a[0], f = a[1], h = a[2], j = a[3], b = a[4], c = 0; 80 > c; c++) { if (16 > c) d[c] = n[p + c] | 0; else { var g = d[c - 3] ^ d[c - 8] ^ d[c - 14] ^ d[c - 16]; d[c] = g << 1 | g >>> 31 } g = (e << 5 | e >>> 27) + b + d[c]; g = 20 > c ? g + ((f & h | ~f & j) + 1518500249) : 40 > c ? g + ((f ^ h ^ j) + 1859775393) : 60 > c ? g + ((f & h | f & j | h & j) - 1894007588) : g + ((f ^ h ^ j) - 899497514); b = j; j = h; h = f << 30 | f >>> 2; f = e; e = g } a[0] = a[0] + e | 0; a[1] = a[1] + f | 0; a[2] = a[2] + h | 0; a[3] = a[3] + j | 0; a[4] = a[4] + b | 0 }, _doFinalize: function () { var b = this._data, d = b.words, a = 8 * this._nDataBytes, e = 8 * b.sigBytes; d[e >>> 5] |= 128 << 24 - e % 32; d[(e + 64 >>> 9 << 4) + 14] = Math.floor(a / 4294967296); d[(e + 64 >>> 9 << 4) + 15] = a; b.sigBytes = 4 * d.length; this._process(); return this._hash }, clone: function () { var b = l.clone.call(this); b._hash = this._hash.clone(); return b } }); k.SHA1 = l._createHelper(b); k.HmacSHA1 = l._createHmacHelper(b) })(); -(function (k) { for (var g = CryptoJS, h = g.lib, v = h.WordArray, j = h.Hasher, h = g.algo, s = [], t = [], u = function (q) { return 4294967296 * (q - (q | 0)) | 0 }, l = 2, b = 0; 64 > b;) { var d; a: { d = l; for (var w = k.sqrt(d), r = 2; r <= w; r++) if (!(d % r)) { d = !1; break a } d = !0 } d && (8 > b && (s[b] = u(k.pow(l, 0.5))), t[b] = u(k.pow(l, 1 / 3)), b++); l++ } var n = [], h = h.SHA256 = j.extend({ _doReset: function () { this._hash = new v.init(s.slice(0)) }, _doProcessBlock: function (q, h) { for (var a = this._hash.words, c = a[0], d = a[1], b = a[2], k = a[3], f = a[4], g = a[5], j = a[6], l = a[7], e = 0; 64 > e; e++) { if (16 > e) n[e] = q[h + e] | 0; else { var m = n[e - 15], p = n[e - 2]; n[e] = ((m << 25 | m >>> 7) ^ (m << 14 | m >>> 18) ^ m >>> 3) + n[e - 7] + ((p << 15 | p >>> 17) ^ (p << 13 | p >>> 19) ^ p >>> 10) + n[e - 16] } m = l + ((f << 26 | f >>> 6) ^ (f << 21 | f >>> 11) ^ (f << 7 | f >>> 25)) + (f & g ^ ~f & j) + t[e] + n[e]; p = ((c << 30 | c >>> 2) ^ (c << 19 | c >>> 13) ^ (c << 10 | c >>> 22)) + (c & d ^ c & b ^ d & b); l = j; j = g; g = f; f = k + m | 0; k = b; b = d; d = c; c = m + p | 0 } a[0] = a[0] + c | 0; a[1] = a[1] + d | 0; a[2] = a[2] + b | 0; a[3] = a[3] + k | 0; a[4] = a[4] + f | 0; a[5] = a[5] + g | 0; a[6] = a[6] + j | 0; a[7] = a[7] + l | 0 }, _doFinalize: function () { var d = this._data, b = d.words, a = 8 * this._nDataBytes, c = 8 * d.sigBytes; b[c >>> 5] |= 128 << 24 - c % 32; b[(c + 64 >>> 9 << 4) + 14] = k.floor(a / 4294967296); b[(c + 64 >>> 9 << 4) + 15] = a; d.sigBytes = 4 * b.length; this._process(); return this._hash }, clone: function () { var b = j.clone.call(this); b._hash = this._hash.clone(); return b } }); g.SHA256 = j._createHelper(h); g.HmacSHA256 = j._createHmacHelper(h) })(Math); -(function(){var c=CryptoJS,k=c.enc.Utf8;c.algo.HMAC=c.lib.Base.extend({init:function(a,b){a=this._hasher=new a.init;"string"==typeof b&&(b=k.parse(b));var c=a.blockSize,e=4*c;b.sigBytes>e&&(b=a.finalize(b));b.clamp();for(var f=this._oKey=b.clone(),g=this._iKey=b.clone(),h=f.words,j=g.words,d=0;d<c;d++)h[d]^=1549556828,j[d]^=909522486;f.sigBytes=g.sigBytes=e;this.reset()},reset:function(){var a=this._hasher;a.reset();a.update(this._iKey)},update:function(a){this._hasher.update(a);return this},finalize:function(a){var b=this._hasher;a=b.finalize(a);b.reset();return b.finalize(this._oKey.clone().concat(a))}})})(); -(function(){var h=CryptoJS,j=h.lib.WordArray;h.enc.Base64={stringify:function(b){var e=b.words,f=b.sigBytes,c=this._map;b.clamp();b=[];for(var a=0;a<f;a+=3)for(var d=(e[a>>>2]>>>24-8*(a%4)&255)<<16|(e[a+1>>>2]>>>24-8*((a+1)%4)&255)<<8|e[a+2>>>2]>>>24-8*((a+2)%4)&255,g=0;4>g&&a+0.75*g<f;g++)b.push(c.charAt(d>>>6*(3-g)&63));if(e=c.charAt(64))for(;b.length%4;)b.push(e);return b.join("")},parse:function(b){var e=b.length,f=this._map,c=f.charAt(64);c&&(c=b.indexOf(c),-1!=c&&(e=c));for(var c=[],a=0,d=0;d<e;d++)if(d%4){var g=f.indexOf(b.charAt(d-1))<<2*(d%4),h=f.indexOf(b.charAt(d))>>>6-2*(d%4);c[a>>>2]|=(g|h)<<24-8*(a%4);a++}return j.create(c,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/client.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/client.js deleted file mode 100755 index 41984582..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/client.js +++ /dev/null @@ -1,367 +0,0 @@ -// Load modules - -var Url = require('url'); -var Hoek = require('hoek'); -var Cryptiles = require('cryptiles'); -var Crypto = require('./crypto'); -var Utils = require('./utils'); - - -// Declare internals - -var internals = {}; - - -// Generate an Authorization header for a given request - -/* - uri: 'http://example.com/resource?a=b' or object from Url.parse() - method: HTTP verb (e.g. 'GET', 'POST') - options: { - - // Required - - credentials: { - id: 'dh37fgj492je', - key: 'aoijedoaijsdlaksjdl', - algorithm: 'sha256' // 'sha1', 'sha256' - }, - - // Optional - - ext: 'application-specific', // Application specific data sent via the ext attribute - timestamp: Date.now(), // A pre-calculated timestamp - nonce: '2334f34f', // A pre-generated nonce - localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided) - payload: '{"some":"payload"}', // UTF-8 encoded string for body hash generation (ignored if hash provided) - contentType: 'application/json', // Payload content-type (ignored if hash provided) - hash: 'U4MKKSmiVxk37JCCrAVIjV=', // Pre-calculated payload hash - app: '24s23423f34dx', // Oz application id - dlg: '234sz34tww3sd' // Oz delegated-by application id - } -*/ - -exports.header = function (uri, method, options) { - - var result = { - field: '', - artifacts: {} - }; - - // Validate inputs - - if (!uri || (typeof uri !== 'string' && typeof uri !== 'object') || - !method || typeof method !== 'string' || - !options || typeof options !== 'object') { - - return result; - } - - // Application time - - var timestamp = options.timestamp || Math.floor((Utils.now() + (options.localtimeOffsetMsec || 0)) / 1000) - - // Validate credentials - - var credentials = options.credentials; - if (!credentials || - !credentials.id || - !credentials.key || - !credentials.algorithm) { - - // Invalid credential object - return result; - } - - if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return result; - } - - // Parse URI - - if (typeof uri === 'string') { - uri = Url.parse(uri); - } - - // Calculate signature - - var artifacts = { - ts: timestamp, - nonce: options.nonce || Cryptiles.randomString(6), - method: method, - resource: uri.pathname + (uri.search || ''), // Maintain trailing '?' - host: uri.hostname, - port: uri.port || (uri.protocol === 'http:' ? 80 : 443), - hash: options.hash, - ext: options.ext, - app: options.app, - dlg: options.dlg - }; - - result.artifacts = artifacts; - - // Calculate payload hash - - if (!artifacts.hash && - options.hasOwnProperty('payload')) { - - artifacts.hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType); - } - - var mac = Crypto.calculateMac('header', credentials, artifacts); - - // Construct header - - var hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== ''; // Other falsey values allowed - var header = 'Hawk id="' + credentials.id + - '", ts="' + artifacts.ts + - '", nonce="' + artifacts.nonce + - (artifacts.hash ? '", hash="' + artifacts.hash : '') + - (hasExt ? '", ext="' + Utils.escapeHeaderAttribute(artifacts.ext) : '') + - '", mac="' + mac + '"'; - - if (artifacts.app) { - header += ', app="' + artifacts.app + - (artifacts.dlg ? '", dlg="' + artifacts.dlg : '') + '"'; - } - - result.field = header; - - return result; -}; - - -// Validate server response - -/* - res: node's response object - artifacts: object recieved from header().artifacts - options: { - payload: optional payload received - required: specifies if a Server-Authorization header is required. Defaults to 'false' - } -*/ - -exports.authenticate = function (res, credentials, artifacts, options) { - - artifacts = Hoek.clone(artifacts); - options = options || {}; - - if (res.headers['www-authenticate']) { - - // Parse HTTP WWW-Authenticate header - - var attributes = Utils.parseAuthorizationHeader(res.headers['www-authenticate'], ['ts', 'tsm', 'error']); - if (attributes instanceof Error) { - return false; - } - - if (attributes.ts) { - var tsm = Crypto.calculateTsMac(attributes.ts, credentials); - if (tsm !== attributes.tsm) { - return false; - } - } - } - - // Parse HTTP Server-Authorization header - - if (!res.headers['server-authorization'] && - !options.required) { - - return true; - } - - var attributes = Utils.parseAuthorizationHeader(res.headers['server-authorization'], ['mac', 'ext', 'hash']); - if (attributes instanceof Error) { - return false; - } - - artifacts.ext = attributes.ext; - artifacts.hash = attributes.hash; - - var mac = Crypto.calculateMac('response', credentials, artifacts); - if (mac !== attributes.mac) { - return false; - } - - if (!options.hasOwnProperty('payload')) { - return true; - } - - if (!attributes.hash) { - return false; - } - - var calculatedHash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, res.headers['content-type']); - return (calculatedHash === attributes.hash); -}; - - -// Generate a bewit value for a given URI - -/* - * credentials is an object with the following keys: 'id, 'key', 'algorithm'. - * options is an object with the following optional keys: 'ext', 'localtimeOffsetMsec' - */ -/* - uri: 'http://example.com/resource?a=b' or object from Url.parse() - options: { - - // Required - - credentials: { - id: 'dh37fgj492je', - key: 'aoijedoaijsdlaksjdl', - algorithm: 'sha256' // 'sha1', 'sha256' - }, - ttlSec: 60 * 60, // TTL in seconds - - // Optional - - ext: 'application-specific', // Application specific data sent via the ext attribute - localtimeOffsetMsec: 400 // Time offset to sync with server time - }; -*/ - -exports.getBewit = function (uri, options) { - - // Validate inputs - - if (!uri || - (typeof uri !== 'string' && typeof uri !== 'object') || - !options || - typeof options !== 'object' || - !options.ttlSec) { - - return ''; - } - - options.ext = (options.ext === null || options.ext === undefined ? '' : options.ext); // Zero is valid value - - // Application time - - var now = Utils.now() + (options.localtimeOffsetMsec || 0); - - // Validate credentials - - var credentials = options.credentials; - if (!credentials || - !credentials.id || - !credentials.key || - !credentials.algorithm) { - - return ''; - } - - if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return ''; - } - - // Parse URI - - if (typeof uri === 'string') { - uri = Url.parse(uri); - } - - // Calculate signature - - var exp = Math.floor(now / 1000) + options.ttlSec; - var mac = Crypto.calculateMac('bewit', credentials, { - ts: exp, - nonce: '', - method: 'GET', - resource: uri.pathname + (uri.search || ''), // Maintain trailing '?' - host: uri.hostname, - port: uri.port || (uri.protocol === 'http:' ? 80 : 443), - ext: options.ext - }); - - // Construct bewit: id\exp\mac\ext - - var bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + options.ext; - return Utils.base64urlEncode(bewit); -}; - - -// Generate an authorization string for a message - -/* - host: 'example.com', - port: 8000, - message: '{"some":"payload"}', // UTF-8 encoded string for body hash generation - options: { - - // Required - - credentials: { - id: 'dh37fgj492je', - key: 'aoijedoaijsdlaksjdl', - algorithm: 'sha256' // 'sha1', 'sha256' - }, - - // Optional - - timestamp: Date.now(), // A pre-calculated timestamp - nonce: '2334f34f', // A pre-generated nonce - localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided) - } -*/ - -exports.message = function (host, port, message, options) { - - // Validate inputs - - if (!host || typeof host !== 'string' || - !port || typeof port !== 'number' || - message === null || message === undefined || typeof message !== 'string' || - !options || typeof options !== 'object') { - - return null; - } - - // Application time - - var timestamp = options.timestamp || Math.floor((Utils.now() + (options.localtimeOffsetMsec || 0)) / 1000) - - // Validate credentials - - var credentials = options.credentials; - if (!credentials || - !credentials.id || - !credentials.key || - !credentials.algorithm) { - - // Invalid credential object - return null; - } - - if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return null; - } - - // Calculate signature - - var artifacts = { - ts: timestamp, - nonce: options.nonce || Cryptiles.randomString(6), - host: host, - port: port, - hash: Crypto.calculatePayloadHash(message, credentials.algorithm) - }; - - // Construct authorization - - var result = { - id: credentials.id, - ts: artifacts.ts, - nonce: artifacts.nonce, - hash: artifacts.hash, - mac: Crypto.calculateMac('message', credentials, artifacts) - }; - - return result; -}; - - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/crypto.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/crypto.js deleted file mode 100755 index 150340a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/crypto.js +++ /dev/null @@ -1,111 +0,0 @@ -// Load modules - -var Crypto = require('crypto'); -var Url = require('url'); -var Utils = require('./utils'); - - -// Declare internals - -var internals = {}; - - -// MAC normalization format version - -exports.headerVersion = '1'; // Prevent comparison of mac values generated with different normalized string formats - - -// Supported HMAC algorithms - -exports.algorithms = ['sha1', 'sha256']; - - -// Calculate the request MAC - -/* - type: 'header', // 'header', 'bewit', 'response' - credentials: { - key: 'aoijedoaijsdlaksjdl', - algorithm: 'sha256' // 'sha1', 'sha256' - }, - options: { - method: 'GET', - resource: '/resource?a=1&b=2', - host: 'example.com', - port: 8080, - ts: 1357718381034, - nonce: 'd3d345f', - hash: 'U4MKKSmiVxk37JCCrAVIjV/OhB3y+NdwoCr6RShbVkE=', - ext: 'app-specific-data', - app: 'hf48hd83qwkj', // Application id (Oz) - dlg: 'd8djwekds9cj' // Delegated by application id (Oz), requires options.app - } -*/ - -exports.calculateMac = function (type, credentials, options) { - - var normalized = exports.generateNormalizedString(type, options); - - var hmac = Crypto.createHmac(credentials.algorithm, credentials.key).update(normalized); - var digest = hmac.digest('base64'); - return digest; -}; - - -exports.generateNormalizedString = function (type, options) { - - var normalized = 'hawk.' + exports.headerVersion + '.' + type + '\n' + - options.ts + '\n' + - options.nonce + '\n' + - (options.method || '').toUpperCase() + '\n' + - (options.resource || '') + '\n' + - options.host.toLowerCase() + '\n' + - options.port + '\n' + - (options.hash || '') + '\n'; - - if (options.ext) { - normalized += options.ext.replace('\\', '\\\\').replace('\n', '\\n'); - } - - normalized += '\n'; - - if (options.app) { - normalized += options.app + '\n' + - (options.dlg || '') + '\n'; - } - - return normalized; -}; - - -exports.calculatePayloadHash = function (payload, algorithm, contentType) { - - var hash = exports.initializePayloadHash(algorithm, contentType); - hash.update(payload || ''); - return exports.finalizePayloadHash(hash); -}; - - -exports.initializePayloadHash = function (algorithm, contentType) { - - var hash = Crypto.createHash(algorithm); - hash.update('hawk.' + exports.headerVersion + '.payload\n'); - hash.update(Utils.parseContentType(contentType) + '\n'); - return hash; -}; - - -exports.finalizePayloadHash = function (hash) { - - hash.update('\n'); - return hash.digest('base64'); -}; - - -exports.calculateTsMac = function (ts, credentials) { - - var hmac = Crypto.createHmac(credentials.algorithm, credentials.key); - hmac.update('hawk.' + exports.headerVersion + '.ts\n' + ts + '\n'); - return hmac.digest('base64'); -}; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/index.js deleted file mode 100755 index 1d713cb6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/index.js +++ /dev/null @@ -1,15 +0,0 @@ -// Export sub-modules - -exports.error = exports.Error = require('boom'); -exports.sntp = require('sntp'); -exports.server = require('./server'); -exports.client = require('./client'); -exports.crypto = require('./crypto'); -exports.utils = require('./utils'); - -exports.uri = { - authenticate: exports.server.authenticateBewit, - getBewit: exports.client.getBewit -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/server.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/server.js deleted file mode 100755 index 478c47b3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/server.js +++ /dev/null @@ -1,524 +0,0 @@ -// Load modules - -var Boom = require('boom'); -var Hoek = require('hoek'); -var Cryptiles = require('cryptiles'); -var Crypto = require('./crypto'); -var Utils = require('./utils'); - - -// Declare internals - -var internals = {}; - - -// Hawk authentication - -/* - req: node's HTTP request object or an object as follows: - - var request = { - method: 'GET', - url: '/resource/4?a=1&b=2', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", ext="some-app-ext-data", mac="6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE="' - }; - - credentialsFunc: required function to lookup the set of Hawk credentials based on the provided credentials id. - The credentials include the MAC key, MAC algorithm, and other attributes (such as username) - needed by the application. This function is the equivalent of verifying the username and - password in Basic authentication. - - var credentialsFunc = function (id, callback) { - - // Lookup credentials in database - db.lookup(id, function (err, item) { - - if (err || !item) { - return callback(err); - } - - var credentials = { - // Required - key: item.key, - algorithm: item.algorithm, - // Application specific - user: item.user - }; - - return callback(null, credentials); - }); - }; - - options: { - - hostHeaderName: optional header field name, used to override the default 'Host' header when used - behind a cache of a proxy. Apache2 changes the value of the 'Host' header while preserving - the original (which is what the module must verify) in the 'x-forwarded-host' header field. - Only used when passed a node Http.ServerRequest object. - - nonceFunc: optional nonce validation function. The function signature is function(nonce, ts, callback) - where 'callback' must be called using the signature function(err). - - timestampSkewSec: optional number of seconds of permitted clock skew for incoming timestamps. Defaults to 60 seconds. - Provides a +/- skew which means actual allowed window is double the number of seconds. - - localtimeOffsetMsec: optional local clock time offset express in a number of milliseconds (positive or negative). - Defaults to 0. - - payload: optional payload for validation. The client calculates the hash value and includes it via the 'hash' - header attribute. The server always ensures the value provided has been included in the request - MAC. When this option is provided, it validates the hash value itself. Validation is done by calculating - a hash value over the entire payload (assuming it has already be normalized to the same format and - encoding used by the client to calculate the hash on request). If the payload is not available at the time - of authentication, the authenticatePayload() method can be used by passing it the credentials and - attributes.hash returned in the authenticate callback. - - host: optional host name override. Only used when passed a node request object. - port: optional port override. Only used when passed a node request object. - } - - callback: function (err, credentials, artifacts) { } - */ - -exports.authenticate = function (req, credentialsFunc, options, callback) { - - callback = Utils.nextTick(callback); - - // Default options - - options.nonceFunc = options.nonceFunc || function (nonce, ts, nonceCallback) { return nonceCallback(); }; // No validation - options.timestampSkewSec = options.timestampSkewSec || 60; // 60 seconds - - // Application time - - var now = Utils.now() + (options.localtimeOffsetMsec || 0); // Measure now before any other processing - - // Convert node Http request object to a request configuration object - - var request = Utils.parseRequest(req, options); - if (request instanceof Error) { - return callback(Boom.badRequest(request.message)); - } - - // Parse HTTP Authorization header - - var attributes = Utils.parseAuthorizationHeader(request.authorization); - if (attributes instanceof Error) { - return callback(attributes); - } - - // Construct artifacts container - - var artifacts = { - method: request.method, - host: request.host, - port: request.port, - resource: request.url, - ts: attributes.ts, - nonce: attributes.nonce, - hash: attributes.hash, - ext: attributes.ext, - app: attributes.app, - dlg: attributes.dlg, - mac: attributes.mac, - id: attributes.id - }; - - // Verify required header attributes - - if (!attributes.id || - !attributes.ts || - !attributes.nonce || - !attributes.mac) { - - return callback(Boom.badRequest('Missing attributes'), null, artifacts); - } - - // Fetch Hawk credentials - - credentialsFunc(attributes.id, function (err, credentials) { - - if (err) { - return callback(err, credentials || null, artifacts); - } - - if (!credentials) { - return callback(Boom.unauthorized('Unknown credentials', 'Hawk'), null, artifacts); - } - - if (!credentials.key || - !credentials.algorithm) { - - return callback(Boom.internal('Invalid credentials'), credentials, artifacts); - } - - if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return callback(Boom.internal('Unknown algorithm'), credentials, artifacts); - } - - // Calculate MAC - - var mac = Crypto.calculateMac('header', credentials, artifacts); - if (!Cryptiles.fixedTimeComparison(mac, attributes.mac)) { - return callback(Boom.unauthorized('Bad mac', 'Hawk'), credentials, artifacts); - } - - // Check payload hash - - if (options.payload !== null && - options.payload !== undefined) { // '' is valid - - if (!attributes.hash) { - return callback(Boom.unauthorized('Missing required payload hash', 'Hawk'), credentials, artifacts); - } - - var hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, request.contentType); - if (!Cryptiles.fixedTimeComparison(hash, attributes.hash)) { - return callback(Boom.unauthorized('Bad payload hash', 'Hawk'), credentials, artifacts); - } - } - - // Check nonce - - options.nonceFunc(attributes.nonce, attributes.ts, function (err) { - - if (err) { - return callback(Boom.unauthorized('Invalid nonce', 'Hawk'), credentials, artifacts); - } - - // Check timestamp staleness - - if (Math.abs((attributes.ts * 1000) - now) > (options.timestampSkewSec * 1000)) { - var fresh = Math.floor((Utils.now() + (options.localtimeOffsetMsec || 0)) / 1000); // Get fresh now - var tsm = Crypto.calculateTsMac(fresh, credentials); - return callback(Boom.unauthorized('Stale timestamp', 'Hawk', { ts: fresh, tsm: tsm }), credentials, artifacts); - } - - // Successful authentication - - return callback(null, credentials, artifacts); - }); - }); -}; - - -// Authenticate payload hash - used when payload cannot be provided during authenticate() - -/* - payload: raw request payload - credentials: from authenticate callback - artifacts: from authenticate callback - contentType: req.headers['content-type'] -*/ - -exports.authenticatePayload = function (payload, credentials, artifacts, contentType) { - - var calculatedHash = Crypto.calculatePayloadHash(payload, credentials.algorithm, contentType); - return Cryptiles.fixedTimeComparison(calculatedHash, artifacts.hash); -}; - - -// Generate a Server-Authorization header for a given response - -/* - credentials: {}, // Object received from authenticate() - artifacts: {} // Object received from authenticate(); 'mac', 'hash', and 'ext' - ignored - options: { - ext: 'application-specific', // Application specific data sent via the ext attribute - payload: '{"some":"payload"}', // UTF-8 encoded string for body hash generation (ignored if hash provided) - contentType: 'application/json', // Payload content-type (ignored if hash provided) - hash: 'U4MKKSmiVxk37JCCrAVIjV=' // Pre-calculated payload hash - } -*/ - -exports.header = function (credentials, artifacts, options) { - - // Prepare inputs - - options = options || {}; - - if (!artifacts || - typeof artifacts !== 'object' || - typeof options !== 'object') { - - return ''; - } - - artifacts = Hoek.clone(artifacts); - delete artifacts.mac; - artifacts.hash = options.hash; - artifacts.ext = options.ext; - - // Validate credentials - - if (!credentials || - !credentials.key || - !credentials.algorithm) { - - // Invalid credential object - return ''; - } - - if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return ''; - } - - // Calculate payload hash - - if (!artifacts.hash && - options.hasOwnProperty('payload')) { - - artifacts.hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType); - } - - var mac = Crypto.calculateMac('response', credentials, artifacts); - - // Construct header - - var header = 'Hawk mac="' + mac + '"' + - (artifacts.hash ? ', hash="' + artifacts.hash + '"' : ''); - - if (artifacts.ext !== null && - artifacts.ext !== undefined && - artifacts.ext !== '') { // Other falsey values allowed - - header += ', ext="' + Utils.escapeHeaderAttribute(artifacts.ext) + '"'; - } - - return header; -}; - - -/* - * Arguments and options are the same as authenticate() with the exception that the only supported options are: - * 'hostHeaderName', 'localtimeOffsetMsec', 'host', 'port' - */ - -exports.authenticateBewit = function (req, credentialsFunc, options, callback) { - - callback = Utils.nextTick(callback); - - // Application time - - var now = Utils.now() + (options.localtimeOffsetMsec || 0); - - // Convert node Http request object to a request configuration object - - var request = Utils.parseRequest(req, options); - if (request instanceof Error) { - return callback(Boom.badRequest(request.message)); - } - - // Extract bewit - - // 1 2 3 4 - var resource = request.url.match(/^(\/.*)([\?&])bewit\=([^&$]*)(?:&(.+))?$/); - if (!resource) { - return callback(Boom.unauthorized(null, 'Hawk')); - } - - // Bewit not empty - - if (!resource[3]) { - return callback(Boom.unauthorized('Empty bewit', 'Hawk')); - } - - // Verify method is GET - - if (request.method !== 'GET' && - request.method !== 'HEAD') { - - return callback(Boom.unauthorized('Invalid method', 'Hawk')); - } - - // No other authentication - - if (request.authorization) { - return callback(Boom.badRequest('Multiple authentications', 'Hawk')); - } - - // Parse bewit - - var bewitString = Utils.base64urlDecode(resource[3]); - if (bewitString instanceof Error) { - return callback(Boom.badRequest('Invalid bewit encoding')); - } - - // Bewit format: id\exp\mac\ext ('\' is used because it is a reserved header attribute character) - - var bewitParts = bewitString.split('\\'); - if (!bewitParts || - bewitParts.length !== 4) { - - return callback(Boom.badRequest('Invalid bewit structure')); - } - - var bewit = { - id: bewitParts[0], - exp: parseInt(bewitParts[1], 10), - mac: bewitParts[2], - ext: bewitParts[3] || '' - }; - - if (!bewit.id || - !bewit.exp || - !bewit.mac) { - - return callback(Boom.badRequest('Missing bewit attributes')); - } - - // Construct URL without bewit - - var url = resource[1]; - if (resource[4]) { - url += resource[2] + resource[4]; - } - - // Check expiration - - if (bewit.exp * 1000 <= now) { - return callback(Boom.unauthorized('Access expired', 'Hawk'), null, bewit); - } - - // Fetch Hawk credentials - - credentialsFunc(bewit.id, function (err, credentials) { - - if (err) { - return callback(err, credentials || null, bewit.ext); - } - - if (!credentials) { - return callback(Boom.unauthorized('Unknown credentials', 'Hawk'), null, bewit); - } - - if (!credentials.key || - !credentials.algorithm) { - - return callback(Boom.internal('Invalid credentials'), credentials, bewit); - } - - if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return callback(Boom.internal('Unknown algorithm'), credentials, bewit); - } - - // Calculate MAC - - var mac = Crypto.calculateMac('bewit', credentials, { - ts: bewit.exp, - nonce: '', - method: 'GET', - resource: url, - host: request.host, - port: request.port, - ext: bewit.ext - }); - - if (!Cryptiles.fixedTimeComparison(mac, bewit.mac)) { - return callback(Boom.unauthorized('Bad mac', 'Hawk'), credentials, bewit); - } - - // Successful authentication - - return callback(null, credentials, bewit); - }); -}; - - -/* - * options are the same as authenticate() with the exception that the only supported options are: - * 'nonceFunc', 'timestampSkewSec', 'localtimeOffsetMsec' - */ - -exports.authenticateMessage = function (host, port, message, authorization, credentialsFunc, options, callback) { - - callback = Utils.nextTick(callback); - - // Default options - - options.nonceFunc = options.nonceFunc || function (nonce, ts, nonceCallback) { return nonceCallback(); }; // No validation - options.timestampSkewSec = options.timestampSkewSec || 60; // 60 seconds - - // Application time - - var now = Utils.now() + (options.localtimeOffsetMsec || 0); // Measure now before any other processing - - // Validate authorization - - if (!authorization.id || - !authorization.ts || - !authorization.nonce || - !authorization.hash || - !authorization.mac) { - - return callback(Boom.badRequest('Invalid authorization')) - } - - // Fetch Hawk credentials - - credentialsFunc(authorization.id, function (err, credentials) { - - if (err) { - return callback(err, credentials || null); - } - - if (!credentials) { - return callback(Boom.unauthorized('Unknown credentials', 'Hawk')); - } - - if (!credentials.key || - !credentials.algorithm) { - - return callback(Boom.internal('Invalid credentials'), credentials); - } - - if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return callback(Boom.internal('Unknown algorithm'), credentials); - } - - // Construct artifacts container - - var artifacts = { - ts: authorization.ts, - nonce: authorization.nonce, - host: host, - port: port, - hash: authorization.hash - }; - - // Calculate MAC - - var mac = Crypto.calculateMac('message', credentials, artifacts); - if (!Cryptiles.fixedTimeComparison(mac, authorization.mac)) { - return callback(Boom.unauthorized('Bad mac', 'Hawk'), credentials); - } - - // Check payload hash - - var hash = Crypto.calculatePayloadHash(message, credentials.algorithm); - if (!Cryptiles.fixedTimeComparison(hash, authorization.hash)) { - return callback(Boom.unauthorized('Bad message hash', 'Hawk'), credentials); - } - - // Check nonce - - options.nonceFunc(authorization.nonce, authorization.ts, function (err) { - - if (err) { - return callback(Boom.unauthorized('Invalid nonce', 'Hawk'), credentials); - } - - // Check timestamp staleness - - if (Math.abs((authorization.ts * 1000) - now) > (options.timestampSkewSec * 1000)) { - return callback(Boom.unauthorized('Stale timestamp'), credentials); - } - - // Successful authentication - - return callback(null, credentials); - }); - }); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/utils.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/utils.js deleted file mode 100755 index c8938fe8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/utils.js +++ /dev/null @@ -1,183 +0,0 @@ -// Load modules - -var Hoek = require('hoek'); -var Sntp = require('sntp'); -var Boom = require('boom'); - - -// Declare internals - -var internals = {}; - - -// Import Hoek Utilities - -internals.import = function () { - - for (var i in Hoek) { - if (Hoek.hasOwnProperty(i)) { - exports[i] = Hoek[i]; - } - } -}; - -internals.import(); - - -// Hawk version - -exports.version = function () { - - return exports.loadPackage(__dirname + '/..').version; -}; - - -// Extract host and port from request - -exports.parseHost = function (req, hostHeaderName) { - - hostHeaderName = (hostHeaderName ? hostHeaderName.toLowerCase() : 'host'); - var hostHeader = req.headers[hostHeaderName]; - if (!hostHeader) { - return null; - } - - var hostHeaderRegex; - if (hostHeader[0] === '[') { - hostHeaderRegex = /^(?:(?:\r\n)?\s)*(\[[^\]]+\])(?::(\d+))?(?:(?:\r\n)?\s)*$/; // IPv6 - } - else { - hostHeaderRegex = /^(?:(?:\r\n)?\s)*([^:]+)(?::(\d+))?(?:(?:\r\n)?\s)*$/; // IPv4, hostname - } - - var hostParts = hostHeader.match(hostHeaderRegex); - - if (!hostParts || - hostParts.length !== 3 || - !hostParts[1]) { - - return null; - } - - return { - name: hostParts[1], - port: (hostParts[2] ? hostParts[2] : (req.connection && req.connection.encrypted ? 443 : 80)) - }; -}; - - -// Parse Content-Type header content - -exports.parseContentType = function (header) { - - if (!header) { - return ''; - } - - return header.split(';')[0].trim().toLowerCase(); -}; - - -// Convert node's to request configuration object - -exports.parseRequest = function (req, options) { - - if (!req.headers) { - return req; - } - - // Obtain host and port information - - if (!options.host || !options.port) { - var host = exports.parseHost(req, options.hostHeaderName); - if (!host) { - return new Error('Invalid Host header'); - } - } - - var request = { - method: req.method, - url: req.url, - host: options.host || host.name, - port: options.port || host.port, - authorization: req.headers.authorization, - contentType: req.headers['content-type'] || '' - }; - - return request; -}; - - -exports.now = function () { - - return Sntp.now(); -}; - - -// Parse Hawk HTTP Authorization header - -exports.parseAuthorizationHeader = function (header, keys) { - - keys = keys || ['id', 'ts', 'nonce', 'hash', 'ext', 'mac', 'app', 'dlg']; - - if (!header) { - return Boom.unauthorized(null, 'Hawk'); - } - - var headerParts = header.match(/^(\w+)(?:\s+(.*))?$/); // Header: scheme[ something] - if (!headerParts) { - return Boom.badRequest('Invalid header syntax'); - } - - var scheme = headerParts[1]; - if (scheme.toLowerCase() !== 'hawk') { - return Boom.unauthorized(null, 'Hawk'); - } - - var attributesString = headerParts[2]; - if (!attributesString) { - return Boom.badRequest('Invalid header syntax'); - } - - var attributes = {}; - var errorMessage = ''; - var verify = attributesString.replace(/(\w+)="([^"\\]*)"\s*(?:,\s*|$)/g, function ($0, $1, $2) { - - // Check valid attribute names - - if (keys.indexOf($1) === -1) { - errorMessage = 'Unknown attribute: ' + $1; - return; - } - - // Allowed attribute value characters: !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9 - - if ($2.match(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~]+$/) === null) { - errorMessage = 'Bad attribute value: ' + $1; - return; - } - - // Check for duplicates - - if (attributes.hasOwnProperty($1)) { - errorMessage = 'Duplicate attribute: ' + $1; - return; - } - - attributes[$1] = $2; - return ''; - }); - - if (verify !== '') { - return Boom.badRequest(errorMessage || 'Bad header format'); - } - - return attributes; -}; - - -exports.unauthorized = function (message) { - - return Boom.unauthorized(message, 'Hawk'); -}; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/.npmignore deleted file mode 100644 index 77ba16cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/.npmignore +++ /dev/null @@ -1,18 +0,0 @@ -.idea -*.iml -npm-debug.log -dump.rdb -node_modules -results.tap -results.xml -npm-shrinkwrap.json -config.json -.DS_Store -*/.DS_Store -*/*/.DS_Store -._* -*/._* -*/*/._* -coverage.* -lib-cov - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml deleted file mode 100755 index 047f7e3d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js - -node_js: - - 0.10 - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE deleted file mode 100755 index 911b97ee..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2012-2013, Walmart. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Walmart nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL WALMART BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/Makefile deleted file mode 100755 index 884ec6db..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -test: - @node node_modules/lab/bin/lab -test-cov: - @node node_modules/lab/bin/lab -r threshold -t 100 -test-cov-html: - @node node_modules/lab/bin/lab -r html -o coverage.html -complexity: - @node node_modules/complexity-report/src/cli.js -o complexity.md -f markdown lib - -.PHONY: test test-cov test-cov-html complexity - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/README.md deleted file mode 100755 index 1970b1c4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/README.md +++ /dev/null @@ -1,6 +0,0 @@ -<a href="https://github.com/spumko"><img src="https://raw.github.com/spumko/spumko/master/images/from.png" align="right" /></a> -![boom Logo](https://raw.github.com/spumko/boom/master/images/boom.png) - -HTTP-friendly error objects - -[![Build Status](https://secure.travis-ci.org/spumko/boom.png)](http://travis-ci.org/spumko/boom) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png deleted file mode 100755 index 373bc134..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/index.js deleted file mode 100755 index 4cc88b35..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib'); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js deleted file mode 100755 index 0bbeed95..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js +++ /dev/null @@ -1,207 +0,0 @@ -// Load modules - -var Http = require('http'); -var NodeUtil = require('util'); -var Hoek = require('hoek'); - - -// Declare internals - -var internals = {}; - - -exports = module.exports = internals.Boom = function (/* (new Error) or (code, message) */) { - - var self = this; - - Hoek.assert(this.constructor === internals.Boom, 'Error must be instantiated using new'); - - Error.call(this); - this.isBoom = true; - - this.response = { - code: 0, - payload: {}, - headers: {} - // type: 'content-type' - }; - - if (arguments[0] instanceof Error) { - - // Error - - var error = arguments[0]; - - this.data = error; - this.response.code = error.code || 500; - if (error.message) { - this.message = error.message; - } - } - else { - - // code, message - - var code = arguments[0]; - var message = arguments[1]; - - Hoek.assert(!isNaN(parseFloat(code)) && isFinite(code) && code >= 400, 'First argument must be a number (400+)'); - - this.response.code = code; - if (message) { - this.message = message; - } - } - - // Response format - - this.reformat(); - - return this; -}; - -NodeUtil.inherits(internals.Boom, Error); - - -internals.Boom.prototype.reformat = function () { - - this.response.payload.code = this.response.code; - this.response.payload.error = Http.STATUS_CODES[this.response.code] || 'Unknown'; - if (this.message) { - this.response.payload.message = Hoek.escapeHtml(this.message); // Prevent XSS from error message - } -}; - - -// Utilities - -internals.Boom.badRequest = function (message) { - - return new internals.Boom(400, message); -}; - - -internals.Boom.unauthorized = function (message, scheme, attributes) { // Or function (message, wwwAuthenticate[]) - - var err = new internals.Boom(401, message); - - if (!scheme) { - return err; - } - - var wwwAuthenticate = ''; - - if (typeof scheme === 'string') { - - // function (message, scheme, attributes) - - wwwAuthenticate = scheme; - if (attributes) { - var names = Object.keys(attributes); - for (var i = 0, il = names.length; i < il; ++i) { - if (i) { - wwwAuthenticate += ','; - } - - var value = attributes[names[i]]; - if (value === null || - value === undefined) { // Value can be zero - - value = ''; - } - wwwAuthenticate += ' ' + names[i] + '="' + Hoek.escapeHeaderAttribute(value.toString()) + '"'; - } - } - - if (message) { - if (attributes) { - wwwAuthenticate += ','; - } - wwwAuthenticate += ' error="' + Hoek.escapeHeaderAttribute(message) + '"'; - } - else { - err.isMissing = true; - } - } - else { - - // function (message, wwwAuthenticate[]) - - var wwwArray = scheme; - for (var i = 0, il = wwwArray.length; i < il; ++i) { - if (i) { - wwwAuthenticate += ', '; - } - - wwwAuthenticate += wwwArray[i]; - } - } - - err.response.headers['WWW-Authenticate'] = wwwAuthenticate; - - return err; -}; - - -internals.Boom.clientTimeout = function (message) { - - return new internals.Boom(408, message); -}; - - -internals.Boom.serverTimeout = function (message) { - - return new internals.Boom(503, message); -}; - - -internals.Boom.forbidden = function (message) { - - return new internals.Boom(403, message); -}; - - -internals.Boom.notFound = function (message) { - - return new internals.Boom(404, message); -}; - - -internals.Boom.internal = function (message, data) { - - var err = new internals.Boom(500, message); - - if (data && data.stack) { - err.trace = data.stack.split('\n'); - err.outterTrace = Hoek.displayStack(1); - } - else { - err.trace = Hoek.displayStack(1); - } - - err.data = data; - err.response.payload.message = 'An internal server error occurred'; // Hide actual error from user - - return err; -}; - - -internals.Boom.passThrough = function (code, payload, contentType, headers) { - - var err = new internals.Boom(500, 'Pass-through'); // 500 code is only used to initialize - - err.data = { - code: code, - payload: payload, - type: contentType - }; - - err.response.code = code; - err.response.type = contentType; - err.response.headers = headers; - err.response.payload = payload; - - return err; -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/package.json deleted file mode 100755 index a6c56b90..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "boom", - "description": "HTTP-friendly error objects", - "version": "0.4.2", - "author": { - "name": "Eran Hammer", - "email": "eran@hueniverse.com", - "url": "http://hueniverse.com" - }, - "contributors": [], - "repository": { - "type": "git", - "url": "git://github.com/spumko/boom" - }, - "main": "index", - "keywords": [ - "error", - "http" - ], - "engines": { - "node": ">=0.8.0" - }, - "dependencies": { - "hoek": "0.9.x" - }, - "devDependencies": { - "lab": "0.1.x", - "complexity-report": "0.x.x" - }, - "scripts": { - "test": "make test-cov" - }, - "licenses": [ - { - "type": "BSD", - "url": "http://github.com/spumko/boom/raw/master/LICENSE" - } - ], - "readme": "<a href=\"https://github.com/spumko\"><img src=\"https://raw.github.com/spumko/spumko/master/images/from.png\" align=\"right\" /></a>\n![boom Logo](https://raw.github.com/spumko/boom/master/images/boom.png)\n\nHTTP-friendly error objects\n\n[![Build Status](https://secure.travis-ci.org/spumko/boom.png)](http://travis-ci.org/spumko/boom)\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/spumko/boom/issues" - }, - "homepage": "https://github.com/spumko/boom", - "_id": "boom@0.4.2", - "dist": { - "shasum": "92a32f029aba10e290058f22c83377d073ed5cdd" - }, - "_from": "boom@0.4.x", - "_resolved": "https://registry.npmjs.org/boom/-/boom-0.4.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js deleted file mode 100755 index a20c1c34..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js +++ /dev/null @@ -1,245 +0,0 @@ -// Load modules - -var Lab = require('lab'); -var Boom = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Boom', function () { - - it('returns an error with info when constructed using another error', function (done) { - - var error = new Error('ka-boom'); - error.xyz = 123; - var err = new Boom(error); - expect(err.data.xyz).to.equal(123); - expect(err.message).to.equal('ka-boom'); - expect(err.response).to.deep.equal({ - code: 500, - payload: { - code: 500, - error: 'Internal Server Error', - message: 'ka-boom' - }, - headers: {} - }); - done(); - }); - - describe('#isBoom', function () { - - it('returns true for Boom object', function (done) { - - expect(Boom.badRequest().isBoom).to.equal(true); - done(); - }); - - it('returns false for Error object', function (done) { - - expect(new Error().isBoom).to.not.exist; - done(); - }); - }); - - describe('#badRequest', function () { - - it('returns a 400 error code', function (done) { - - expect(Boom.badRequest().response.code).to.equal(400); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.badRequest('my message').message).to.equal('my message'); - done(); - }); - }); - - describe('#unauthorized', function () { - - it('returns a 401 error code', function (done) { - - var err = Boom.unauthorized(); - expect(err.response.code).to.equal(401); - expect(err.response.headers).to.deep.equal({}); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.unauthorized('my message').message).to.equal('my message'); - done(); - }); - - it('returns a WWW-Authenticate header when passed a scheme', function (done) { - - var err = Boom.unauthorized('boom', 'Test'); - expect(err.response.code).to.equal(401); - expect(err.response.headers['WWW-Authenticate']).to.equal('Test error="boom"'); - done(); - }); - - it('returns a WWW-Authenticate header when passed a scheme and attributes', function (done) { - - var err = Boom.unauthorized('boom', 'Test', { a: 1, b: 'something', c: null, d: 0 }); - expect(err.response.code).to.equal(401); - expect(err.response.headers['WWW-Authenticate']).to.equal('Test a="1", b="something", c="", d="0", error="boom"'); - done(); - }); - - it('sets the isMissing flag when error message is empty', function (done) { - - var err = Boom.unauthorized('', 'Basic'); - expect(err.isMissing).to.equal(true); - done(); - }); - - it('does not set the isMissing flag when error message is not empty', function (done) { - - var err = Boom.unauthorized('message', 'Basic'); - expect(err.isMissing).to.equal(undefined); - done(); - }); - - it('sets a WWW-Authenticate when passed as an array', function (done) { - - var err = Boom.unauthorized('message', ['Basic', 'Example e="1"', 'Another x="3", y="4"']); - expect(err.response.headers['WWW-Authenticate']).to.equal('Basic, Example e="1", Another x="3", y="4"'); - done(); - }); - }); - - describe('#clientTimeout', function () { - - it('returns a 408 error code', function (done) { - - expect(Boom.clientTimeout().response.code).to.equal(408); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.clientTimeout('my message').message).to.equal('my message'); - done(); - }); - }); - - describe('#serverTimeout', function () { - - it('returns a 503 error code', function (done) { - - expect(Boom.serverTimeout().response.code).to.equal(503); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.serverTimeout('my message').message).to.equal('my message'); - done(); - }); - }); - - describe('#forbidden', function () { - - it('returns a 403 error code', function (done) { - - expect(Boom.forbidden().response.code).to.equal(403); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.forbidden('my message').message).to.equal('my message'); - done(); - }); - }); - - describe('#notFound', function () { - - it('returns a 404 error code', function (done) { - - expect(Boom.notFound().response.code).to.equal(404); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.notFound('my message').message).to.equal('my message'); - done(); - }); - }); - - describe('#internal', function () { - - it('returns a 500 error code', function (done) { - - expect(Boom.internal().response.code).to.equal(500); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - var err = Boom.internal('my message'); - expect(err.message).to.equal('my message'); - expect(err.response.payload.message).to.equal('An internal server error occurred'); - done(); - }); - - it('passes data on the callback if its passed in', function (done) { - - expect(Boom.internal('my message', { my: 'data' }).data.my).to.equal('data'); - done(); - }); - - it('uses passed in stack if its available', function (done) { - - var error = new Error(); - error.stack = 'my stack line\nmy second stack line'; - expect(Boom.internal('my message', error).trace[0]).to.equal('my stack line'); - done(); - }); - }); - - describe('#passThrough', function () { - - it('returns a pass-through error', function (done) { - - var err = Boom.passThrough(499, { a: 1 }, 'application/text', { 'X-Test': 'Boom' }); - expect(err.response.code).to.equal(499); - expect(err.message).to.equal('Pass-through'); - expect(err.response).to.deep.equal({ - code: 499, - payload: { a: 1 }, - headers: { 'X-Test': 'Boom' }, - type: 'application/text' - }); - done(); - }); - }); - - describe('#reformat', function () { - - it('encodes any HTML markup in the response payload', function (done) { - - var boom = new Boom(new Error('<script>alert(1)</script>')); - expect(boom.response.payload.message).to.not.contain('<script>'); - done(); - }); - }); -}); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore deleted file mode 100644 index b3bb5176..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore +++ /dev/null @@ -1,18 +0,0 @@ -.idea -*.iml -npm-debug.log -dump.rdb -node_modules -results.tap -results.xml -npm-shrinkwrap.json -config.json -.DS_Store -*/.DS_Store -*/*/.DS_Store -._* -*/._* -*/*/._* -coverage.* -lib-cov - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml deleted file mode 100755 index 40ca59ee..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js - -node_js: - - 0.10 - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE deleted file mode 100755 index e699a7bd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2012-2013, Eran Hammer. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Eran Hammer nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL ERAN HAMMER BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile deleted file mode 100755 index 9e7138c2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -test: - @./node_modules/.bin/lab -test-cov: - @./node_modules/.bin/lab -r threshold -t 100 -test-cov-html: - @./node_modules/.bin/lab -r html -o coverage.html -complexity: - @./node_modules/.bin/cr -o complexity.md -f markdown lib - -.PHONY: test test-cov test-cov-html complexity - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md deleted file mode 100644 index 6a900a49..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md +++ /dev/null @@ -1,6 +0,0 @@ -cryptiles -========= - -General purpose crypto utilities - -[![Build Status](https://secure.travis-ci.org/hueniverse/cryptiles.png)](http://travis-ci.org/hueniverse/cryptiles) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js deleted file mode 100755 index 4cc88b35..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib'); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js deleted file mode 100755 index dcf2bc38..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js +++ /dev/null @@ -1,68 +0,0 @@ -// Load modules - -var Crypto = require('crypto'); -var Boom = require('boom'); - - -// Declare internals - -var internals = {}; - - -// Generate a cryptographically strong pseudo-random data - -exports.randomString = function (size) { - - var buffer = exports.randomBits((size + 1) * 6); - if (buffer instanceof Error) { - return buffer; - } - - var string = buffer.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, ''); - return string.slice(0, size); -}; - - -exports.randomBits = function (bits) { - - if (!bits || - bits < 0) { - - return Boom.internal('Invalid random bits count'); - } - - var bytes = Math.ceil(bits / 8); - try { - return Crypto.randomBytes(bytes); - } - catch (err) { - return Boom.internal('Failed generating random bits: ' + err.message); - } -}; - - -// Compare two strings using fixed time algorithm (to prevent time-based analysis of MAC digest match) - -exports.fixedTimeComparison = function (a, b) { - - if (typeof a !== 'string' || - typeof b !== 'string') { - - return false; - } - - var mismatch = (a.length === b.length ? 0 : 1); - if (mismatch) { - b = a; - } - - for (var i = 0, il = a.length; i < il; ++i) { - var ac = a.charCodeAt(i); - var bc = b.charCodeAt(i); - mismatch += (ac === bc ? 0 : 1); - } - - return (mismatch === 0); -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json deleted file mode 100755 index cafe4c1b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "cryptiles", - "description": "General purpose crypto utilities", - "version": "0.2.2", - "author": { - "name": "Eran Hammer", - "email": "eran@hueniverse.com", - "url": "http://hueniverse.com" - }, - "contributors": [], - "repository": { - "type": "git", - "url": "git://github.com/hueniverse/cryptiles" - }, - "main": "index", - "keywords": [ - "cryptography", - "security", - "utilites" - ], - "engines": { - "node": ">=0.8.0" - }, - "dependencies": { - "boom": "0.4.x" - }, - "devDependencies": { - "lab": "0.1.x", - "complexity-report": "0.x.x" - }, - "scripts": { - "test": "make test-cov" - }, - "licenses": [ - { - "type": "BSD", - "url": "http://github.com/hueniverse/cryptiles/raw/master/LICENSE" - } - ], - "readme": "cryptiles\n=========\n\nGeneral purpose crypto utilities\n\n[![Build Status](https://secure.travis-ci.org/hueniverse/cryptiles.png)](http://travis-ci.org/hueniverse/cryptiles)\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/hueniverse/cryptiles/issues" - }, - "homepage": "https://github.com/hueniverse/cryptiles", - "_id": "cryptiles@0.2.2", - "dist": { - "shasum": "0462e8adb7667ffa104947a34a96e68627d8c95d" - }, - "_from": "cryptiles@0.2.x", - "_resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-0.2.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js deleted file mode 100755 index 58aaa70b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js +++ /dev/null @@ -1,101 +0,0 @@ -// Load modules - -var Lab = require('lab'); -var Cryptiles = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Cryptiles', function () { - - describe('#randomString', function () { - - it('should generate the right length string', function (done) { - - for (var i = 1; i <= 1000; ++i) { - expect(Cryptiles.randomString(i).length).to.equal(i); - } - - done(); - }); - - it('returns an error on invalid bits size', function (done) { - - expect(Cryptiles.randomString(99999999999999999999).message).to.equal('Failed generating random bits: Argument #1 must be number > 0'); - done(); - }); - }); - - describe('#randomBits', function () { - - it('returns an error on invalid input', function (done) { - - expect(Cryptiles.randomBits(0).message).to.equal('Invalid random bits count'); - done(); - }); - }); - - describe('#fixedTimeComparison', function () { - - var a = Cryptiles.randomString(50000); - var b = Cryptiles.randomString(150000); - - it('should take the same amount of time comparing different string sizes', function (done) { - - var now = Date.now(); - Cryptiles.fixedTimeComparison(b, a); - var t1 = Date.now() - now; - - now = Date.now(); - Cryptiles.fixedTimeComparison(b, b); - var t2 = Date.now() - now; - - expect(t2 - t1).to.be.within(-20, 20); - done(); - }); - - it('should return true for equal strings', function (done) { - - expect(Cryptiles.fixedTimeComparison(a, a)).to.equal(true); - done(); - }); - - it('should return false for different strings (size, a < b)', function (done) { - - expect(Cryptiles.fixedTimeComparison(a, a + 'x')).to.equal(false); - done(); - }); - - it('should return false for different strings (size, a > b)', function (done) { - - expect(Cryptiles.fixedTimeComparison(a + 'x', a)).to.equal(false); - done(); - }); - - it('should return false for different strings (size, a = b)', function (done) { - - expect(Cryptiles.fixedTimeComparison(a + 'x', a + 'y')).to.equal(false); - done(); - }); - - it('should return false when not a string', function (done) { - - expect(Cryptiles.fixedTimeComparison('x', null)).to.equal(false); - done(); - }); - }); -}); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore deleted file mode 100644 index 9966e5e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore +++ /dev/null @@ -1,18 +0,0 @@ -.idea -*.iml -npm-debug.log -dump.rdb -node_modules -results.tap -results.xml -npm-shrinkwrap.json -config.json -.DS_Store -*/.DS_Store -*/*/.DS_Store -._* -*/._* -*/*/._* -coverage.* -lib-cov -complexity.md diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml deleted file mode 100755 index 40ca59ee..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js - -node_js: - - 0.10 - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE deleted file mode 100755 index 394adcff..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE +++ /dev/null @@ -1,33 +0,0 @@ -Copyright (c) 2011-2013, Walmart. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Walmart nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL WALMART BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - * * * - - -Portions of this project were initially based on Postmile, Copyright (c) 2011, Yahoo Inc. -Postmile is published at https://github.com/yahoo/postmile and its licensing terms are -published at https://github.com/yahoo/postmile/blob/master/LICENSE. - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile deleted file mode 100755 index e605d6c0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -test: - @node node_modules/lab/bin/lab -test-cov: - @node node_modules/lab/bin/lab -r threshold -t 100 -test-cov-html: - @node node_modules/lab/bin/lab -r html -o coverage.html -complexity: - @node node_modules/complexity-report/src/cli.js -o complexity.md -f markdown lib - -.PHONY: test test-cov test-cov-html complexity diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/README.md deleted file mode 100755 index ac64e2fd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/README.md +++ /dev/null @@ -1,436 +0,0 @@ -<a href="https://github.com/spumko"><img src="https://raw.github.com/spumko/spumko/master/images/from.png" align="right" /></a> -![hoek Logo](https://raw.github.com/spumko/hoek/master/images/hoek.png) - -General purpose node utilities - -[![Build Status](https://secure.travis-ci.org/spumko/hoek.png)](http://travis-ci.org/spumko/hoek) - -# Table of Contents - -* [Introduction](#introduction "Introduction") -* [Object](#object "Object") - * [clone](#cloneobj "clone") - * [merge](#mergetarget-source-isnulloverride-ismergearrays "merge") - * [applyToDefaults](#applytodefaultsdefaults-options "applyToDefaults") - * [unique](#uniquearray-key "unique") - * [mapToObject](#maptoobjectarray-key "mapToObject") - * [intersect](#intersectarray1-array2 "intersect") - * [matchKeys](#matchkeysobj-keys "matchKeys") - * [flatten](#flattenarray-target "flatten") - * [removeKeys](#removekeysobject-keys "removeKeys") - * [reach](#reachobj-chain "reach") - * [inheritAsync](#inheritasyncself-obj-keys "inheritAsync") - * [rename](#renameobj-from-to "rename") -* [Timer](#timer "Timer") -* [Binary Encoding/Decoding](#binary "Binary Encoding/Decoding") - * [base64urlEncode](#binary64urlEncodevalue "binary64urlEncode") - * [base64urlDecode](#binary64urlDecodevalue "binary64urlDecode") -* [Escaping Characters](#escaped "Escaping Characters") - * [escapeHtml](#escapeHtmlstring "escapeHtml") - * [escapeHeaderAttribute](#escapeHeaderAttributeattribute "escapeHeaderAttribute") - * [escapeRegex](#escapeRegexstring "escapeRegex") -* [Errors](#errors "Errors") - * [assert](#assertmessage "assert") - * [abort](#abortmessage "abort") - * [displayStack](#displayStackslice "displayStack") - * [callStack](#callStackslice "callStack") - * [toss](#tosscondition "toss") -* [Load files](#load-files "Load Files") - * [loadPackage](#loadPackagedir "loadpackage") - * [loadDirModules](#loadDirModulespath-excludefiles-target "loaddirmodules") - - - -# Introduction - -The *Hoek* general purpose node utilities library is used to aid in a variety of manners. It comes with useful methods for Arrays (clone, merge, applyToDefaults), Objects (removeKeys, copy), Asserting and more. - -For example, to use Hoek to set configuration with default options: -```javascript -var Hoek = require('hoek'); - -var default = {url : "www.github.com", port : "8000", debug : true} - -var config = Hoek.applyToDefaults(default, {port : "3000", admin : true}); - -// In this case, config would be { url: 'www.github.com', port: '3000', debug: true, admin: true } -``` - -Under each of the sections (such as Array), there are subsections which correspond to Hoek methods. Each subsection will explain how to use the corresponding method. In each js excerpt below, the var Hoek = require('hoek') is omitted for brevity. - -## Object - -Hoek provides several helpful methods for objects and arrays. - -### clone(obj) - -This method is used to clone an object or an array. A *deep copy* is made (duplicates everything, including values that are objects). - -```javascript - -var nestedObj = { - w: /^something$/ig, - x: { - a: [1, 2, 3], - b: 123456, - c: new Date() - }, - y: 'y', - z: new Date() - }; - -var copy = Hoek.clone(nestedObj); - -copy.x.b = 100; - -console.log(copy.y) // results in 'y' -console.log(nestedObj.x.b) // results in 123456 -console.log(copy.x.b) // results in 100 -``` - -### merge(target, source, isNullOverride, isMergeArrays) -isNullOverride, isMergeArrays default to true - -Merge all the properties of source into target, source wins in conflic, and by default null and undefined from source are applied - - -```javascript - -var target = {a: 1, b : 2} -var source = {a: 0, c: 5} -var source2 = {a: null, c: 5} - -var targetArray = [1, 2, 3]; -var sourceArray = [4, 5]; - -var newTarget = Hoek.merge(target, source); // results in {a: 0, b: 2, c: 5} -newTarget = Hoek.merge(target, source2); // results in {a: null, b: 2, c: 5} -newTarget = Hoek.merge(target, source2, false); // results in {a: 1, b: 2, c: 5} - -newTarget = Hoek.merge(targetArray, sourceArray) // results in [1, 2, 3, 4, 5] -newTarget = Hoek.merge(targetArray, sourceArray, true, false) // results in [4, 5] - - - - -``` - -### applyToDefaults(defaults, options) - -Apply options to a copy of the defaults - -```javascript - -var defaults = {host: "localhost", port: 8000}; -var options = {port: 8080}; - -var config = Hoek.applyToDefaults(defaults, options); // results in {host: "localhost", port: 8080}; - - -``` - -### unique(array, key) - -Remove duplicate items from Array - -```javascript - -var array = [1, 2, 2, 3, 3, 4, 5, 6]; - -var newArray = Hoek.unique(array); // results in [1,2,3,4,5,6]; - -array = [{id: 1}, {id: 1}, {id: 2}]; - -newArray = Hoek.unique(array, "id") // results in [{id: 1}, {id: 2}] - -``` - -### mapToObject(array, key) - -Convert an Array into an Object - -```javascript - -var array = [1,2,3]; -var newObject = Hoek.mapToObject(array); // results in [{"1": true}, {"2": true}, {"3": true}] - -array = [{id: 1}, {id: 2}]; -newObject = Hoek.mapToObject(array, "id") // results in [{"id": 1}, {"id": 2}] - -``` -### intersect(array1, array2) - -Find the common unique items in two arrays - -```javascript - -var array1 = [1, 2, 3]; -var array2 = [1, 4, 5]; - -var newArray = Hoek.intersect(array1, array2) // results in [1] - -``` - -### matchKeys(obj, keys) - -Find which keys are present - -```javascript - -var obj = {a: 1, b: 2, c: 3}; -var keys = ["a", "e"]; - -Hoek.matchKeys(obj, keys) // returns ["a"] - -``` - -### flatten(array, target) - -Flatten an array - -```javascript - -var array = [1, 2, 3]; -var target = [4, 5]; - -var flattenedArray = Hoek.flatten(array, target) // results in [4, 5, 1, 2, 3]; - -``` - -### removeKeys(object, keys) - -Remove keys - -```javascript - -var object = {a: 1, b: 2, c: 3, d: 4}; - -var keys = ["a", "b"]; - -Hoek.removeKeys(object, keys) // object is now {c: 3, d: 4} - -``` - -### reach(obj, chain) - -Converts an object key chain string to reference - -```javascript - -var chain = 'a.b.c'; -var obj = {a : {b : { c : 1}}}; - -Hoek.reach(obj, chain) // returns 1 - -``` - -### inheritAsync(self, obj, keys) - -Inherits a selected set of methods from an object, wrapping functions in asynchronous syntax and catching errors - -```javascript - -var targetFunc = function () { }; - -var proto = { - a: function () { - return 'a!'; - }, - b: function () { - return 'b!'; - }, - c: function () { - throw new Error('c!'); - } - }; - -var keys = ['a', 'c']; - -Hoek.inheritAsync(targetFunc, proto, ['a', 'c']); - -var target = new targetFunc(); - -target.a(function(err, result){console.log(result)} // returns 'a!' - -target.c(function(err, result){console.log(result)} // returns undefined - -target.b(function(err, result){console.log(result)} // gives error: Object [object Object] has no method 'b' - -``` - -### rename(obj, from, to) - -Rename a key of an object - -```javascript - -var obj = {a : 1, b : 2}; - -Hoek.rename(obj, "a", "c"); // obj is now {c : 1, b : 2} - -``` - - -# Timer - -A Timer object. Initializing a new timer object sets the ts to the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC. - -```javascript - - -example : - - -var timerObj = new Hoek.Timer(); -console.log("Time is now: " + timerObj.ts) -console.log("Elapsed time from initialization: " + timerObj.elapsed() + 'milliseconds') - -``` - -# Binary Encoding/Decoding - -### base64urlEncode(value) - -Encodes value in Base64 or URL encoding - -### base64urlDecode(value) - -Decodes data in Base64 or URL encoding. -# Escaping Characters - -Hoek provides convenient methods for escaping html characters. The escaped characters are as followed: - -```javascript - -internals.htmlEscaped = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '`': '`' -}; - -``` - -### escapeHtml(string) - -```javascript - -var string = '<html> hey </html>'; -var escapedString = Hoek.escapeHtml(string); // returns <html> hey </html> - -``` - -### escapeHeaderAttribute(attribute) - -Escape attribute value for use in HTTP header - -```javascript - -var a = Hoek.escapeHeaderAttribute('I said "go w\\o me"'); //returns I said \"go w\\o me\" - - -``` - - -### escapeRegex(string) - -Escape string for Regex construction - -```javascript - -var a = Hoek.escapeRegex('4^f$s.4*5+-_?%=#!:@|~\\/`"(>)[<]d{}s,'); // returns 4\^f\$s\.4\*5\+\-_\?%\=#\!\:@\|~\\\/`"\(>\)\[<\]d\{\}s\, - - - -``` - -# Errors - -### assert(message) - -```javascript - -var a = 1, b =2; - -Hoek.assert(a === b, 'a should equal b'); // ABORT: a should equal b - -``` - -### abort(message) - -First checks if process.env.NODE_ENV === 'test', and if so, throws error message. Otherwise, -displays most recent stack and then exits process. - - - -### displayStack(slice) - -Displays the trace stack - -```javascript - -var stack = Hoek.displayStack(); -console.log(stack) // returns something like: - -[ 'null (/Users/user/Desktop/hoek/test.js:4:18)', - 'Module._compile (module.js:449:26)', - 'Module._extensions..js (module.js:467:10)', - 'Module.load (module.js:356:32)', - 'Module._load (module.js:312:12)', - 'Module.runMain (module.js:492:10)', - 'startup.processNextTick.process._tickCallback (node.js:244:9)' ] - -``` - -### callStack(slice) - -Returns a trace stack array. - -```javascript - -var stack = Hoek.callStack(); -console.log(stack) // returns something like: - -[ [ '/Users/user/Desktop/hoek/test.js', 4, 18, null, false ], - [ 'module.js', 449, 26, 'Module._compile', false ], - [ 'module.js', 467, 10, 'Module._extensions..js', false ], - [ 'module.js', 356, 32, 'Module.load', false ], - [ 'module.js', 312, 12, 'Module._load', false ], - [ 'module.js', 492, 10, 'Module.runMain', false ], - [ 'node.js', - 244, - 9, - 'startup.processNextTick.process._tickCallback', - false ] ] - - -``` - -### toss(condition) - -toss(condition /*, [message], callback */) - -Return an error as first argument of a callback - - -# Load Files - -### loadPackage(dir) - -Load and parse package.json process root or given directory - -```javascript - -var pack = Hoek.loadPackage(); // pack.name === 'hoek' - -``` - -### loadDirModules(path, excludeFiles, target) - -Loads modules from a given path; option to exclude files (array). - - - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png deleted file mode 100755 index 6ccfcb12..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/index.js deleted file mode 100755 index 4cc88b35..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib'); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js deleted file mode 100755 index 666b3dc8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js +++ /dev/null @@ -1,132 +0,0 @@ -// Declare internals - -var internals = {}; - - -exports.escapeJavaScript = function (input) { - - if (!input) { - return ''; - } - - var escaped = ''; - - for (var i = 0, il = input.length; i < il; ++i) { - - var charCode = input.charCodeAt(i); - - if (internals.isSafe(charCode)) { - escaped += input[i]; - } - else { - escaped += internals.escapeJavaScriptChar(charCode); - } - } - - return escaped; -}; - - -exports.escapeHtml = function (input) { - - if (!input) { - return ''; - } - - var escaped = ''; - - for (var i = 0, il = input.length; i < il; ++i) { - - var charCode = input.charCodeAt(i); - - if (internals.isSafe(charCode)) { - escaped += input[i]; - } - else { - escaped += internals.escapeHtmlChar(charCode); - } - } - - return escaped; -}; - - -internals.escapeJavaScriptChar = function (charCode) { - - if (charCode >= 256) { - return '\\u' + internals.padLeft('' + charCode, 4); - } - - var hexValue = new Buffer(String.fromCharCode(charCode), 'ascii').toString('hex'); - return '\\x' + internals.padLeft(hexValue, 2); -}; - - -internals.escapeHtmlChar = function (charCode) { - - var namedEscape = internals.namedHtml[charCode]; - if (typeof namedEscape !== 'undefined') { - return namedEscape; - } - - if (charCode >= 256) { - return '&#' + charCode + ';'; - } - - var hexValue = new Buffer(String.fromCharCode(charCode), 'ascii').toString('hex'); - return '&#x' + internals.padLeft(hexValue, 2) + ';'; -}; - - -internals.padLeft = function (str, len) { - - while (str.length < len) { - str = '0' + str; - } - - return str; -}; - - -internals.isSafe = function (charCode) { - - return (typeof internals.safeCharCodes[charCode] !== 'undefined'); -}; - - -internals.namedHtml = { - '38': '&', - '60': '<', - '62': '>', - '34': '"', - '160': ' ', - '162': '¢', - '163': '£', - '164': '¤', - '169': '©', - '174': '®' -}; - - -internals.safeCharCodes = (function () { - - var safe = {}; - - for (var i = 32; i < 123; ++i) { - - if ((i >= 97 && i <= 122) || // a-z - (i >= 65 && i <= 90) || // A-Z - (i >= 48 && i <= 57) || // 0-9 - i === 32 || // space - i === 46 || // . - i === 44 || // , - i === 45 || // - - i === 58 || // : - i === 95) { // _ - - safe[i] = null; - } - } - - return safe; -}()); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js deleted file mode 100755 index 806260d2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js +++ /dev/null @@ -1,585 +0,0 @@ -// Load modules - -var Fs = require('fs'); -var Escape = require('./escape'); - - -// Declare internals - -var internals = {}; - - -// Clone object or array - -exports.clone = function (obj, seen) { - - if (typeof obj !== 'object' || - obj === null) { - - return obj; - } - - seen = seen || { orig: [], copy: [] }; - - var lookup = seen.orig.indexOf(obj); - if (lookup !== -1) { - return seen.copy[lookup]; - } - - var newObj = (obj instanceof Array) ? [] : {}; - - seen.orig.push(obj); - seen.copy.push(newObj); - - for (var i in obj) { - if (obj.hasOwnProperty(i)) { - if (obj[i] instanceof Buffer) { - newObj[i] = new Buffer(obj[i]); - } - else if (obj[i] instanceof Date) { - newObj[i] = new Date(obj[i].getTime()); - } - else if (obj[i] instanceof RegExp) { - var flags = '' + (obj[i].global ? 'g' : '') + (obj[i].ignoreCase ? 'i' : '') + (obj[i].multiline ? 'm' : ''); - newObj[i] = new RegExp(obj[i].source, flags); - } - else { - newObj[i] = exports.clone(obj[i], seen); - } - } - } - - return newObj; -}; - - -// Merge all the properties of source into target, source wins in conflic, and by default null and undefined from source are applied - -exports.merge = function (target, source, isNullOverride /* = true */, isMergeArrays /* = true */) { - - exports.assert(target && typeof target == 'object', 'Invalid target value: must be an object'); - exports.assert(source === null || source === undefined || typeof source === 'object', 'Invalid source value: must be null, undefined, or an object'); - - if (!source) { - return target; - } - - if (source instanceof Array) { - exports.assert(target instanceof Array, 'Cannot merge array onto an object'); - if (isMergeArrays === false) { // isMergeArrays defaults to true - target.length = 0; // Must not change target assignment - } - - for (var i = 0, il = source.length; i < il; ++i) { - target.push(source[i]); - } - - return target; - } - - var keys = Object.keys(source); - for (var k = 0, kl = keys.length; k < kl; ++k) { - var key = keys[k]; - var value = source[key]; - if (value && - typeof value === 'object') { - - if (!target[key] || - typeof target[key] !== 'object') { - - target[key] = exports.clone(value); - } - else { - exports.merge(target[key], source[key], isNullOverride, isMergeArrays); - } - } - else { - if (value !== null && value !== undefined) { // Explicit to preserve empty strings - target[key] = value; - } - else if (isNullOverride !== false) { // Defaults to true - target[key] = value; - } - } - } - - return target; -}; - - -// Apply options to a copy of the defaults - -exports.applyToDefaults = function (defaults, options) { - - exports.assert(defaults && typeof defaults == 'object', 'Invalid defaults value: must be an object'); - exports.assert(!options || options === true || typeof options === 'object', 'Invalid options value: must be true, falsy or an object'); - - if (!options) { // If no options, return null - return null; - } - - var copy = exports.clone(defaults); - - if (options === true) { // If options is set to true, use defaults - return copy; - } - - return exports.merge(copy, options, false, false); -}; - - -// Remove duplicate items from array - -exports.unique = function (array, key) { - - var index = {}; - var result = []; - - for (var i = 0, il = array.length; i < il; ++i) { - var id = (key ? array[i][key] : array[i]); - if (index[id] !== true) { - - result.push(array[i]); - index[id] = true; - } - } - - return result; -}; - - -// Convert array into object - -exports.mapToObject = function (array, key) { - - if (!array) { - return null; - } - - var obj = {}; - for (var i = 0, il = array.length; i < il; ++i) { - if (key) { - if (array[i][key]) { - obj[array[i][key]] = true; - } - } - else { - obj[array[i]] = true; - } - } - - return obj; -}; - - -// Find the common unique items in two arrays - -exports.intersect = function (array1, array2, justFirst) { - - if (!array1 || !array2) { - return []; - } - - var common = []; - var hash = (array1 instanceof Array ? exports.mapToObject(array1) : array1); - var found = {}; - for (var i = 0, il = array2.length; i < il; ++i) { - if (hash[array2[i]] && !found[array2[i]]) { - if (justFirst) { - return array2[i]; - } - - common.push(array2[i]); - found[array2[i]] = true; - } - } - - return (justFirst ? null : common); -}; - - -// Find which keys are present - -exports.matchKeys = function (obj, keys) { - - var matched = []; - for (var i = 0, il = keys.length; i < il; ++i) { - if (obj.hasOwnProperty(keys[i])) { - matched.push(keys[i]); - } - } - return matched; -}; - - -// Flatten array - -exports.flatten = function (array, target) { - - var result = target || []; - - for (var i = 0, il = array.length; i < il; ++i) { - if (Array.isArray(array[i])) { - exports.flatten(array[i], result); - } - else { - result.push(array[i]); - } - } - - return result; -}; - - -// Remove keys - -exports.removeKeys = function (object, keys) { - - for (var i = 0, il = keys.length; i < il; i++) { - delete object[keys[i]]; - } -}; - - -// Convert an object key chain string ('a.b.c') to reference (object[a][b][c]) - -exports.reach = function (obj, chain) { - - var path = chain.split('.'); - var ref = obj; - for (var i = 0, il = path.length; i < il; ++i) { - if (ref) { - ref = ref[path[i]]; - } - } - - return ref; -}; - - -// Inherits a selected set of methods from an object, wrapping functions in asynchronous syntax and catching errors - -exports.inheritAsync = function (self, obj, keys) { - - keys = keys || null; - - for (var i in obj) { - if (obj.hasOwnProperty(i)) { - if (keys instanceof Array && - keys.indexOf(i) < 0) { - - continue; - } - - self.prototype[i] = (function (fn) { - - return function (next) { - - var result = null; - try { - result = fn(); - } - catch (err) { - return next(err); - } - - return next(null, result); - }; - })(obj[i]); - } - } -}; - - -exports.formatStack = function (stack) { - - var trace = []; - for (var i = 0, il = stack.length; i < il; ++i) { - var item = stack[i]; - trace.push([item.getFileName(), item.getLineNumber(), item.getColumnNumber(), item.getFunctionName(), item.isConstructor()]); - } - - return trace; -}; - - -exports.formatTrace = function (trace) { - - var display = []; - - for (var i = 0, il = trace.length; i < il; ++i) { - var row = trace[i]; - display.push((row[4] ? 'new ' : '') + row[3] + ' (' + row[0] + ':' + row[1] + ':' + row[2] + ')'); - } - - return display; -}; - - -exports.callStack = function (slice) { - - // http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi - - var v8 = Error.prepareStackTrace; - Error.prepareStackTrace = function (err, stack) { - - return stack; - }; - - var capture = {}; - Error.captureStackTrace(capture, arguments.callee); - var stack = capture.stack; - - Error.prepareStackTrace = v8; - - var trace = exports.formatStack(stack); - - if (slice) { - return trace.slice(slice); - } - - return trace; -}; - - -exports.displayStack = function (slice) { - - var trace = exports.callStack(slice === undefined ? 1 : slice + 1); - - return exports.formatTrace(trace); -}; - - -exports.abortThrow = false; - - -exports.abort = function (message, hideStack) { - - if (process.env.NODE_ENV === 'test' || exports.abortThrow === true) { - throw new Error(message || 'Unknown error'); - } - - var stack = ''; - if (!hideStack) { - stack = exports.displayStack(1).join('\n\t'); - } - console.log('ABORT: ' + message + '\n\t' + stack); - process.exit(1); -}; - - -exports.assert = function (condition /*, msg1, msg2, msg3 */) { - - if (condition) { - return; - } - - var msgs = Array.prototype.slice.call(arguments, 1); - msgs = msgs.map(function (msg) { - - return typeof msg === 'string' ? msg : msg instanceof Error ? msg.message : JSON.stringify(msg); - }); - throw new Error(msgs.join(' ') || 'Unknown error'); -}; - - -exports.loadDirModules = function (path, excludeFiles, target) { // target(filename, name, capName) - - var exclude = {}; - for (var i = 0, il = excludeFiles.length; i < il; ++i) { - exclude[excludeFiles[i] + '.js'] = true; - } - - var files = Fs.readdirSync(path); - for (i = 0, il = files.length; i < il; ++i) { - var filename = files[i]; - if (/\.js$/.test(filename) && - !exclude[filename]) { - - var name = filename.substr(0, filename.lastIndexOf('.')); - var capName = name.charAt(0).toUpperCase() + name.substr(1).toLowerCase(); - - if (typeof target !== 'function') { - target[capName] = require(path + '/' + name); - } - else { - target(path + '/' + name, name, capName); - } - } - } -}; - - -exports.rename = function (obj, from, to) { - - obj[to] = obj[from]; - delete obj[from]; -}; - - -exports.Timer = function () { - - this.reset(); -}; - - -exports.Timer.prototype.reset = function () { - - this.ts = Date.now(); -}; - - -exports.Timer.prototype.elapsed = function () { - - return Date.now() - this.ts; -}; - - -// Load and parse package.json process root or given directory - -exports.loadPackage = function (dir) { - - var result = {}; - var filepath = (dir || process.env.PWD) + '/package.json'; - if (Fs.existsSync(filepath)) { - try { - result = JSON.parse(Fs.readFileSync(filepath)); - } - catch (e) { } - } - - return result; -}; - - -// Escape string for Regex construction - -exports.escapeRegex = function (string) { - - // Escape ^$.*+-?=!:|\/()[]{}, - return string.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g, '\\$&'); -}; - - -// Return an error as first argument of a callback - -exports.toss = function (condition /*, [message], next */) { - - var message = (arguments.length === 3 ? arguments[1] : ''); - var next = (arguments.length === 3 ? arguments[2] : arguments[1]); - - var err = (message instanceof Error ? message : (message ? new Error(message) : (condition instanceof Error ? condition : new Error()))); - - if (condition instanceof Error || - !condition) { - - return next(err); - } -}; - - -// Base64url (RFC 4648) encode - -exports.base64urlEncode = function (value) { - - return (new Buffer(value, 'binary')).toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, ''); -}; - - -// Base64url (RFC 4648) decode - -exports.base64urlDecode = function (encoded) { - - if (encoded && - !encoded.match(/^[\w\-]*$/)) { - - return new Error('Invalid character'); - } - - try { - return (new Buffer(encoded.replace(/-/g, '+').replace(/:/g, '/'), 'base64')).toString('binary'); - } - catch (err) { - return err; - } -}; - - -// Escape attribute value for use in HTTP header - -exports.escapeHeaderAttribute = function (attribute) { - - // Allowed value characters: !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9, \, " - - exports.assert(attribute.match(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/), 'Bad attribute value (' + attribute + ')'); - - return attribute.replace(/\\/g, '\\\\').replace(/\"/g, '\\"'); // Escape quotes and slash -}; - - -exports.escapeHtml = function (string) { - - return Escape.escapeHtml(string); -}; - - -exports.escapeJavaScript = function (string) { - - return Escape.escapeJavaScript(string); -}; - - -/* -var event = { - timestamp: now.getTime(), - tags: ['tag'], - data: { some: 'data' } -}; -*/ - -exports.consoleFunc = console.log; - -exports.printEvent = function (event) { - - var pad = function (value) { - - return (value < 10 ? '0' : '') + value; - }; - - var now = new Date(event.timestamp); - var timestring = (now.getYear() - 100).toString() + - pad(now.getMonth() + 1) + - pad(now.getDate()) + - '/' + - pad(now.getHours()) + - pad(now.getMinutes()) + - pad(now.getSeconds()) + - '.' + - now.getMilliseconds(); - - var data = event.data; - if (typeof event.data !== 'string') { - try { - data = JSON.stringify(event.data); - } - catch (e) { - data = 'JSON Error: ' + e.message; - } - } - - var output = timestring + ', ' + event.tags[0] + ', ' + data; - exports.consoleFunc(output); -}; - - -exports.nextTick = function (callback) { - - return function () { - - var args = arguments; - process.nextTick(function () { - - callback.apply(null, args); - }); - }; -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/package.json deleted file mode 100755 index 158eb318..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "hoek", - "description": "General purpose node utilities", - "version": "0.9.1", - "author": { - "name": "Eran Hammer", - "email": "eran@hueniverse.com", - "url": "http://hueniverse.com" - }, - "contributors": [ - { - "name": "Van Nguyen", - "email": "the.gol.effect@gmail.com" - } - ], - "repository": { - "type": "git", - "url": "git://github.com/spumko/hoek" - }, - "main": "index", - "keywords": [ - "utilities" - ], - "engines": { - "node": ">=0.8.0" - }, - "dependencies": {}, - "devDependencies": { - "lab": "0.1.x", - "complexity-report": "0.x.x" - }, - "scripts": { - "test": "make test-cov" - }, - "licenses": [ - { - "type": "BSD", - "url": "http://github.com/spumko/hoek/raw/master/LICENSE" - } - ], - "readme": "<a href=\"https://github.com/spumko\"><img src=\"https://raw.github.com/spumko/spumko/master/images/from.png\" align=\"right\" /></a>\r\n![hoek Logo](https://raw.github.com/spumko/hoek/master/images/hoek.png)\r\n\r\nGeneral purpose node utilities\r\n\r\n[![Build Status](https://secure.travis-ci.org/spumko/hoek.png)](http://travis-ci.org/spumko/hoek)\r\n\r\n# Table of Contents\r\n\r\n* [Introduction](#introduction \"Introduction\")\r\n* [Object](#object \"Object\")\r\n * [clone](#cloneobj \"clone\")\r\n * [merge](#mergetarget-source-isnulloverride-ismergearrays \"merge\")\r\n * [applyToDefaults](#applytodefaultsdefaults-options \"applyToDefaults\")\r\n * [unique](#uniquearray-key \"unique\")\r\n * [mapToObject](#maptoobjectarray-key \"mapToObject\")\r\n * [intersect](#intersectarray1-array2 \"intersect\")\r\n * [matchKeys](#matchkeysobj-keys \"matchKeys\")\r\n * [flatten](#flattenarray-target \"flatten\")\r\n * [removeKeys](#removekeysobject-keys \"removeKeys\")\r\n * [reach](#reachobj-chain \"reach\")\r\n * [inheritAsync](#inheritasyncself-obj-keys \"inheritAsync\")\r\n * [rename](#renameobj-from-to \"rename\")\r\n* [Timer](#timer \"Timer\")\r\n* [Binary Encoding/Decoding](#binary \"Binary Encoding/Decoding\")\r\n * [base64urlEncode](#binary64urlEncodevalue \"binary64urlEncode\")\r\n * [base64urlDecode](#binary64urlDecodevalue \"binary64urlDecode\")\r\n* [Escaping Characters](#escaped \"Escaping Characters\")\r\n * [escapeHtml](#escapeHtmlstring \"escapeHtml\")\r\n * [escapeHeaderAttribute](#escapeHeaderAttributeattribute \"escapeHeaderAttribute\")\r\n * [escapeRegex](#escapeRegexstring \"escapeRegex\")\r\n* [Errors](#errors \"Errors\")\r\n * [assert](#assertmessage \"assert\")\r\n * [abort](#abortmessage \"abort\")\r\n * [displayStack](#displayStackslice \"displayStack\")\r\n * [callStack](#callStackslice \"callStack\")\r\n * [toss](#tosscondition \"toss\")\r\n* [Load files](#load-files \"Load Files\")\r\n * [loadPackage](#loadPackagedir \"loadpackage\")\r\n * [loadDirModules](#loadDirModulespath-excludefiles-target \"loaddirmodules\")\r\n\r\n\r\n\r\n# Introduction\r\n\r\nThe *Hoek* general purpose node utilities library is used to aid in a variety of manners. It comes with useful methods for Arrays (clone, merge, applyToDefaults), Objects (removeKeys, copy), Asserting and more. \r\n\r\nFor example, to use Hoek to set configuration with default options:\r\n```javascript\r\nvar Hoek = require('hoek');\r\n\r\nvar default = {url : \"www.github.com\", port : \"8000\", debug : true}\r\n\r\nvar config = Hoek.applyToDefaults(default, {port : \"3000\", admin : true});\r\n\r\n// In this case, config would be { url: 'www.github.com', port: '3000', debug: true, admin: true }\r\n```\r\n\r\nUnder each of the sections (such as Array), there are subsections which correspond to Hoek methods. Each subsection will explain how to use the corresponding method. In each js excerpt below, the var Hoek = require('hoek') is omitted for brevity.\r\n\r\n## Object\r\n\r\nHoek provides several helpful methods for objects and arrays.\r\n\r\n### clone(obj)\r\n\r\nThis method is used to clone an object or an array. A *deep copy* is made (duplicates everything, including values that are objects). \r\n\r\n```javascript\r\n\r\nvar nestedObj = {\r\n w: /^something$/ig,\r\n x: {\r\n a: [1, 2, 3],\r\n b: 123456,\r\n c: new Date()\r\n },\r\n y: 'y',\r\n z: new Date()\r\n };\r\n\r\nvar copy = Hoek.clone(nestedObj);\r\n\r\ncopy.x.b = 100;\r\n\r\nconsole.log(copy.y) // results in 'y'\r\nconsole.log(nestedObj.x.b) // results in 123456\r\nconsole.log(copy.x.b) // results in 100\r\n```\r\n\r\n### merge(target, source, isNullOverride, isMergeArrays)\r\nisNullOverride, isMergeArrays default to true\r\n\r\nMerge all the properties of source into target, source wins in conflic, and by default null and undefined from source are applied\r\n\r\n\r\n```javascript\r\n\r\nvar target = {a: 1, b : 2}\r\nvar source = {a: 0, c: 5}\r\nvar source2 = {a: null, c: 5}\r\n\r\nvar targetArray = [1, 2, 3];\r\nvar sourceArray = [4, 5];\r\n\r\nvar newTarget = Hoek.merge(target, source); // results in {a: 0, b: 2, c: 5}\r\nnewTarget = Hoek.merge(target, source2); // results in {a: null, b: 2, c: 5}\r\nnewTarget = Hoek.merge(target, source2, false); // results in {a: 1, b: 2, c: 5}\r\n\r\nnewTarget = Hoek.merge(targetArray, sourceArray) // results in [1, 2, 3, 4, 5]\r\nnewTarget = Hoek.merge(targetArray, sourceArray, true, false) // results in [4, 5]\r\n\r\n\r\n\r\n\r\n```\r\n\r\n### applyToDefaults(defaults, options)\r\n\r\nApply options to a copy of the defaults\r\n\r\n```javascript\r\n\r\nvar defaults = {host: \"localhost\", port: 8000};\r\nvar options = {port: 8080};\r\n\r\nvar config = Hoek.applyToDefaults(defaults, options); // results in {host: \"localhost\", port: 8080};\r\n\r\n\r\n```\r\n\r\n### unique(array, key)\r\n\r\nRemove duplicate items from Array\r\n\r\n```javascript\r\n\r\nvar array = [1, 2, 2, 3, 3, 4, 5, 6];\r\n\r\nvar newArray = Hoek.unique(array); // results in [1,2,3,4,5,6];\r\n\r\narray = [{id: 1}, {id: 1}, {id: 2}];\r\n\r\nnewArray = Hoek.unique(array, \"id\") // results in [{id: 1}, {id: 2}]\r\n\r\n```\r\n\r\n### mapToObject(array, key)\r\n\r\nConvert an Array into an Object\r\n\r\n```javascript\r\n\r\nvar array = [1,2,3];\r\nvar newObject = Hoek.mapToObject(array); // results in [{\"1\": true}, {\"2\": true}, {\"3\": true}]\r\n\r\narray = [{id: 1}, {id: 2}];\r\nnewObject = Hoek.mapToObject(array, \"id\") // results in [{\"id\": 1}, {\"id\": 2}]\r\n\r\n```\r\n### intersect(array1, array2)\r\n\r\nFind the common unique items in two arrays\r\n\r\n```javascript\r\n\r\nvar array1 = [1, 2, 3];\r\nvar array2 = [1, 4, 5];\r\n\r\nvar newArray = Hoek.intersect(array1, array2) // results in [1]\r\n\r\n```\r\n\r\n### matchKeys(obj, keys) \r\n\r\nFind which keys are present\r\n\r\n```javascript\r\n\r\nvar obj = {a: 1, b: 2, c: 3};\r\nvar keys = [\"a\", \"e\"];\r\n\r\nHoek.matchKeys(obj, keys) // returns [\"a\"]\r\n\r\n```\r\n\r\n### flatten(array, target)\r\n\r\nFlatten an array\r\n\r\n```javascript\r\n\r\nvar array = [1, 2, 3];\r\nvar target = [4, 5]; \r\n\r\nvar flattenedArray = Hoek.flatten(array, target) // results in [4, 5, 1, 2, 3];\r\n\r\n```\r\n\r\n### removeKeys(object, keys)\r\n\r\nRemove keys\r\n\r\n```javascript\r\n\r\nvar object = {a: 1, b: 2, c: 3, d: 4};\r\n\r\nvar keys = [\"a\", \"b\"];\r\n\r\nHoek.removeKeys(object, keys) // object is now {c: 3, d: 4}\r\n\r\n```\r\n\r\n### reach(obj, chain)\r\n\r\nConverts an object key chain string to reference\r\n\r\n```javascript\r\n\r\nvar chain = 'a.b.c';\r\nvar obj = {a : {b : { c : 1}}};\r\n\r\nHoek.reach(obj, chain) // returns 1\r\n\r\n```\r\n\r\n### inheritAsync(self, obj, keys) \r\n\r\nInherits a selected set of methods from an object, wrapping functions in asynchronous syntax and catching errors\r\n\r\n```javascript\r\n\r\nvar targetFunc = function () { };\r\n\r\nvar proto = {\r\n a: function () {\r\n return 'a!';\r\n },\r\n b: function () {\r\n return 'b!';\r\n },\r\n c: function () {\r\n throw new Error('c!');\r\n }\r\n };\r\n\r\nvar keys = ['a', 'c'];\r\n\r\nHoek.inheritAsync(targetFunc, proto, ['a', 'c']);\r\n\r\nvar target = new targetFunc();\r\n\r\ntarget.a(function(err, result){console.log(result)} // returns 'a!' \r\n\r\ntarget.c(function(err, result){console.log(result)} // returns undefined\r\n\r\ntarget.b(function(err, result){console.log(result)} // gives error: Object [object Object] has no method 'b'\r\n\r\n```\r\n\r\n### rename(obj, from, to)\r\n\r\nRename a key of an object\r\n\r\n```javascript\r\n\r\nvar obj = {a : 1, b : 2};\r\n\r\nHoek.rename(obj, \"a\", \"c\"); // obj is now {c : 1, b : 2}\r\n\r\n```\r\n\r\n\r\n# Timer\r\n\r\nA Timer object. Initializing a new timer object sets the ts to the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.\r\n\r\n```javascript\r\n\r\n\r\nexample : \r\n\r\n\r\nvar timerObj = new Hoek.Timer();\r\nconsole.log(\"Time is now: \" + timerObj.ts)\r\nconsole.log(\"Elapsed time from initialization: \" + timerObj.elapsed() + 'milliseconds')\r\n\r\n```\r\n\r\n# Binary Encoding/Decoding\r\n\r\n### base64urlEncode(value)\r\n\r\nEncodes value in Base64 or URL encoding\r\n\r\n### base64urlDecode(value)\r\n\r\nDecodes data in Base64 or URL encoding.\r\n# Escaping Characters\r\n\r\nHoek provides convenient methods for escaping html characters. The escaped characters are as followed:\r\n\r\n```javascript\r\n\r\ninternals.htmlEscaped = {\r\n '&': '&',\r\n '<': '<',\r\n '>': '>',\r\n '\"': '"',\r\n \"'\": ''',\r\n '`': '`'\r\n};\r\n\r\n```\r\n\r\n### escapeHtml(string)\r\n\r\n```javascript\r\n\r\nvar string = '<html> hey </html>';\r\nvar escapedString = Hoek.escapeHtml(string); // returns <html> hey </html>\r\n\r\n```\r\n\r\n### escapeHeaderAttribute(attribute)\r\n\r\nEscape attribute value for use in HTTP header\r\n\r\n```javascript\r\n\r\nvar a = Hoek.escapeHeaderAttribute('I said \"go w\\\\o me\"'); //returns I said \\\"go w\\\\o me\\\"\r\n\r\n\r\n```\r\n\r\n\r\n### escapeRegex(string)\r\n\r\nEscape string for Regex construction\r\n\r\n```javascript\r\n\r\nvar a = Hoek.escapeRegex('4^f$s.4*5+-_?%=#!:@|~\\\\/`\"(>)[<]d{}s,'); // returns 4\\^f\\$s\\.4\\*5\\+\\-_\\?%\\=#\\!\\:@\\|~\\\\\\/`\"\\(>\\)\\[<\\]d\\{\\}s\\,\r\n\r\n\r\n\r\n```\r\n\r\n# Errors\r\n\r\n### assert(message)\r\n\r\n```javascript\r\n\r\nvar a = 1, b =2;\r\n\r\nHoek.assert(a === b, 'a should equal b'); // ABORT: a should equal b\r\n\r\n```\r\n\r\n### abort(message)\r\n\r\nFirst checks if process.env.NODE_ENV === 'test', and if so, throws error message. Otherwise,\r\ndisplays most recent stack and then exits process.\r\n\r\n\r\n\r\n### displayStack(slice)\r\n\r\nDisplays the trace stack\r\n\r\n```javascript\r\n\r\nvar stack = Hoek.displayStack();\r\nconsole.log(stack) // returns something like:\r\n\r\n[ 'null (/Users/user/Desktop/hoek/test.js:4:18)',\r\n 'Module._compile (module.js:449:26)',\r\n 'Module._extensions..js (module.js:467:10)',\r\n 'Module.load (module.js:356:32)',\r\n 'Module._load (module.js:312:12)',\r\n 'Module.runMain (module.js:492:10)',\r\n 'startup.processNextTick.process._tickCallback (node.js:244:9)' ]\r\n\r\n```\r\n\r\n### callStack(slice)\r\n\r\nReturns a trace stack array.\r\n\r\n```javascript\r\n\r\nvar stack = Hoek.callStack();\r\nconsole.log(stack) // returns something like:\r\n\r\n[ [ '/Users/user/Desktop/hoek/test.js', 4, 18, null, false ],\r\n [ 'module.js', 449, 26, 'Module._compile', false ],\r\n [ 'module.js', 467, 10, 'Module._extensions..js', false ],\r\n [ 'module.js', 356, 32, 'Module.load', false ],\r\n [ 'module.js', 312, 12, 'Module._load', false ],\r\n [ 'module.js', 492, 10, 'Module.runMain', false ],\r\n [ 'node.js',\r\n 244,\r\n 9,\r\n 'startup.processNextTick.process._tickCallback',\r\n false ] ]\r\n\r\n\r\n```\r\n\r\n### toss(condition)\r\n\r\ntoss(condition /*, [message], callback */)\r\n\r\nReturn an error as first argument of a callback\r\n\r\n\r\n# Load Files\r\n\r\n### loadPackage(dir)\r\n\r\nLoad and parse package.json process root or given directory\r\n\r\n```javascript\r\n\r\nvar pack = Hoek.loadPackage(); // pack.name === 'hoek'\r\n\r\n```\r\n\r\n### loadDirModules(path, excludeFiles, target) \r\n\r\nLoads modules from a given path; option to exclude files (array).\r\n\r\n\r\n\r\n\r\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/spumko/hoek/issues" - }, - "homepage": "https://github.com/spumko/hoek", - "_id": "hoek@0.9.1", - "dist": { - "shasum": "8525a65589a017e905052fd24b26898c26a20c6f" - }, - "_from": "hoek@0.9.x", - "_resolved": "https://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js deleted file mode 100644 index 4dddd77d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js +++ /dev/null @@ -1,86 +0,0 @@ -// Load modules - -var Lab = require('lab'); -var Hoek = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hoek', function () { - - describe('#escapeJavaScript', function () { - - it('encodes / characters', function (done) { - - var encoded = Hoek.escapeJavaScript('<script>alert(1)</script>'); - expect(encoded).to.equal('\\x3cscript\\x3ealert\\x281\\x29\\x3c\\x2fscript\\x3e'); - done(); - }); - - it('encodes \' characters', function (done) { - - var encoded = Hoek.escapeJavaScript('something(\'param\')'); - expect(encoded).to.equal('something\\x28\\x27param\\x27\\x29'); - done(); - }); - - it('encodes large unicode characters with the correct padding', function (done) { - - var encoded = Hoek.escapeJavaScript(String.fromCharCode(500) + String.fromCharCode(1000)); - expect(encoded).to.equal('\\u0500\\u1000'); - done(); - }); - - it('doesn\'t throw an exception when passed null', function (done) { - - var encoded = Hoek.escapeJavaScript(null); - expect(encoded).to.equal(''); - done(); - }); - }); - - describe('#escapeHtml', function () { - - it('encodes / characters', function (done) { - - var encoded = Hoek.escapeHtml('<script>alert(1)</script>'); - expect(encoded).to.equal('<script>alert(1)</script>'); - done(); - }); - - it('encodes < and > as named characters', function (done) { - - var encoded = Hoek.escapeHtml('<script><>'); - expect(encoded).to.equal('<script><>'); - done(); - }); - - it('encodes large unicode characters', function (done) { - - var encoded = Hoek.escapeHtml(String.fromCharCode(500) + String.fromCharCode(1000)); - expect(encoded).to.equal('ǴϨ'); - done(); - }); - - it('doesn\'t throw an exception when passed null', function (done) { - - var encoded = Hoek.escapeHtml(null); - expect(encoded).to.equal(''); - done(); - }); - }); -}); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js deleted file mode 100755 index c40e3ad9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js +++ /dev/null @@ -1,1078 +0,0 @@ -// Load modules - -var Lab = require('lab'); -var Hoek = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hoek', function () { - - var nestedObj = { - v: [7,8,9], - w: /^something$/igm, - x: { - a: [1, 2, 3], - b: 123456, - c: new Date(), - d: /hi/igm, - e: /hello/ - }, - y: 'y', - z: new Date() - }; - - var dupsArray = [nestedObj, { z: 'z' }, nestedObj]; - var reducedDupsArray = [nestedObj, { z: 'z' }]; - - describe('#clone', function () { - - it('should clone a nested object', function (done) { - - var a = nestedObj; - var b = Hoek.clone(a); - - expect(a).to.deep.equal(b); - expect(a.z.getTime()).to.equal(b.z.getTime()); - done(); - }); - - it('should clone a null object', function (done) { - - var b = Hoek.clone(null); - - expect(b).to.equal(null); - done(); - }); - - it('should not convert undefined properties to null', function (done) { - - var obj = { something: undefined }; - var b = Hoek.clone(obj); - - expect(typeof b.something).to.equal('undefined'); - done(); - }); - - it('should not throw on circular reference', function (done) { - - var a = {}; - a.x = a; - - var test = (function () { - - var b = Hoek.clone(a); - }); - - expect(test).to.not.throw(); - done(); - }); - - it('should properly clone circular reference', function (done) { - - var x = { - 'z': new Date() - }; - x.y = x; - - var b = Hoek.clone(x); - expect(Object.keys(b.y)).to.deep.equal(Object.keys(x)) - expect(b.z).to.not.equal(x.z); - expect(b.y).to.not.equal(x.y); - expect(b.y.z).to.not.equal(x.y.z); - expect(b.y).to.equal(b); - expect(b.y.y.y.y).to.equal(b); - done(); - }); - - it('should properly clone deeply nested object', function (done) { - - var a = { - x: { - y: { - a: [1, 2, 3], - b: 123456, - c: new Date(), - d: /hi/igm, - e: /hello/ - }, - } - }; - - var b = Hoek.clone(a); - - expect(a).to.deep.equal(b); - expect(a.x.y.c.getTime()).to.equal(b.x.y.c.getTime()); - done(); - }); - - it('should properly clone arrays', function (done) { - - var a = [1,2,3]; - - var b = Hoek.clone(a); - - expect(a).to.deep.equal(b); - done(); - }); - - it('should perform actual copy for shallow keys (no pass by reference)', function (done) { - - var x = Hoek.clone(nestedObj); - var y = Hoek.clone(nestedObj); - - // Date - expect(x.z).to.not.equal(nestedObj.z); - expect(x.z).to.not.equal(y.z); - - // Regex - expect(x.w).to.not.equal(nestedObj.w); - expect(x.w).to.not.equal(y.w); - - // Array - expect(x.v).to.not.equal(nestedObj.v); - expect(x.v).to.not.equal(y.v); - - // Immutable(s) - x.y = 5; - expect(x.y).to.not.equal(nestedObj.y); - expect(x.y).to.not.equal(y.y); - - done(); - }); - - it('should perform actual copy for deep keys (no pass by reference)', function (done) { - - var x = Hoek.clone(nestedObj); - var y = Hoek.clone(nestedObj); - - expect(x.x.c).to.not.equal(nestedObj.x.c); - expect(x.x.c).to.not.equal(y.x.c); - - expect(x.x.c.getTime()).to.equal(nestedObj.x.c.getTime()); - expect(x.x.c.getTime()).to.equal(y.x.c.getTime()); - done(); - }); - - it('copies functions with properties', function (done) { - - var a = { - x: function () { return 1; }, - y: {} - }; - a.x.z = 'string in function'; - a.x.v = function () { return 2; }; - a.y.u = a.x; - - var b = Hoek.clone(a); - expect(b.x()).to.equal(1); - expect(b.x.v()).to.equal(2); - expect(b.y.u).to.equal(b.x); - expect(b.x.z).to.equal('string in function'); - done(); - }); - - it('should copy a buffer', function(done){ - var tls = { - key: new Buffer([1,2,3,4,5]), - cert: new Buffer([1,2,3,4,5,6,10]) - } - - copiedTls = Hoek.clone(tls); - expect(Buffer.isBuffer(copiedTls.key)).to.equal(true); - expect(JSON.stringify(copiedTls.key)).to.equal(JSON.stringify(tls.key)) - expect(Buffer.isBuffer(copiedTls.cert)).to.equal(true); - expect(JSON.stringify(copiedTls.cert)).to.equal(JSON.stringify(tls.cert)) - done(); - }); - }); - - describe('#merge', function () { - - it('does not throw if source is null', function (done) { - - var a = {}; - var b = null; - var c = null; - - expect(function () { - - c = Hoek.merge(a, b); - }).to.not.throw(); - - expect(c).to.equal(a); - done(); - }); - - it('does not throw if source is undefined', function (done) { - - var a = {}; - var b = undefined; - var c = null; - - expect(function () { - - c = Hoek.merge(a, b); - }).to.not.throw(); - - expect(c).to.equal(a); - done(); - }); - - it('throws if source is not an object', function (done) { - - expect(function () { - - var a = {}; - var b = 0; - - Hoek.merge(a, b); - }).to.throw('Invalid source value: must be null, undefined, or an object'); - done(); - }); - - it('throws if target is not an object', function (done) { - - expect(function () { - - var a = 0; - var b = {}; - - Hoek.merge(a, b); - }).to.throw('Invalid target value: must be an object'); - done(); - }); - - it('throws if target is not an array and source is', function (done) { - - expect(function () { - - var a = {}; - var b = [1, 2]; - - Hoek.merge(a, b); - }).to.throw('Cannot merge array onto an object'); - done(); - }); - - it('returns the same object when merging arrays', function (done) { - - var a = []; - var b = [1, 2]; - - expect(Hoek.merge(a, b)).to.equal(a); - done(); - }); - - it('should combine an empty object with a non-empty object', function (done) { - - var a = {}; - var b = nestedObj; - - var c = Hoek.merge(a, b); - expect(a).to.deep.equal(b); - expect(c).to.deep.equal(b); - done(); - }); - - it('should override values in target', function (done) { - - var a = { x: 1, y: 2, z: 3, v: 5, t: 'test', m: 'abc' }; - var b = { x: null, z: 4, v: 0, t: { u: 6 }, m: '123' }; - - var c = Hoek.merge(a, b); - expect(c.x).to.equal(null); - expect(c.y).to.equal(2); - expect(c.z).to.equal(4); - expect(c.v).to.equal(0); - expect(c.m).to.equal('123'); - expect(c.t).to.deep.equal({ u: 6 }); - done(); - }); - - it('should override values in target (flip)', function (done) { - - var a = { x: 1, y: 2, z: 3, v: 5, t: 'test', m: 'abc' }; - var b = { x: null, z: 4, v: 0, t: { u: 6 }, m: '123' }; - - var d = Hoek.merge(b, a); - expect(d.x).to.equal(1); - expect(d.y).to.equal(2); - expect(d.z).to.equal(3); - expect(d.v).to.equal(5); - expect(d.m).to.equal('abc'); - expect(d.t).to.deep.equal('test'); - done(); - }); - }); - - describe('#applyToDefaults', function () { - - var defaults = { - a: 1, - b: 2, - c: { - d: 3, - e: [5, 6] - }, - f: 6, - g: 'test' - }; - - it('should return null if options is false', function (done) { - - var result = Hoek.applyToDefaults(defaults, false); - expect(result).to.equal(null); - done(); - }); - - it('should return a copy of defaults if options is true', function (done) { - - var result = Hoek.applyToDefaults(defaults, true); - expect(result).to.deep.equal(result); - done(); - }); - - it('should apply object to defaults', function (done) { - - var obj = { - a: null, - c: { - e: [4] - }, - f: 0, - g: { - h: 5 - } - }; - - var result = Hoek.applyToDefaults(defaults, obj); - expect(result.c.e).to.deep.equal([4]); - expect(result.a).to.equal(1); - expect(result.b).to.equal(2); - expect(result.f).to.equal(0); - expect(result.g).to.deep.equal({ h: 5 }); - done(); - }); - }); - - describe('#unique', function () { - - it('should ensure uniqueness within array of objects based on subkey', function (done) { - - var a = Hoek.unique(dupsArray, 'x'); - expect(a).to.deep.equal(reducedDupsArray); - done(); - }); - - it('removes duplicated without key', function (done) { - - expect(Hoek.unique([1, 2, 3, 4, 2, 1, 5])).to.deep.equal([1, 2, 3, 4, 5]); - done(); - }); - }); - - describe('#mapToObject', function () { - - it('should return null on null array', function (done) { - - var a = Hoek.mapToObject(null); - expect(a).to.equal(null); - done(); - }); - - it('should convert basic array to existential object', function (done) { - - var keys = [1, 2, 3, 4]; - var a = Hoek.mapToObject(keys); - for (var i in keys) { - expect(a[keys[i]]).to.equal(true); - } - done(); - }); - - it('should convert array of objects to existential object', function (done) { - - var keys = [{ x: 1 }, { x: 2 }, { x: 3 }]; - var subkey = 'x'; - var a = Hoek.mapToObject(keys, subkey); - for (var i in keys) { - expect(a[keys[i][subkey]]).to.equal(true); - } - done(); - }); - }); - - describe('#intersect', function () { - - it('should return the common objects of two arrays', function (done) { - - var array1 = [1, 2, 3, 4, 4, 5, 5]; - var array2 = [5, 4, 5, 6, 7]; - var common = Hoek.intersect(array1, array2); - expect(common.length).to.equal(2); - done(); - }); - - it('should return just the first common object of two arrays', function (done) { - - var array1 = [1, 2, 3, 4, 4, 5, 5]; - var array2 = [5, 4, 5, 6, 7]; - var common = Hoek.intersect(array1, array2, true); - expect(common).to.equal(5); - done(); - }); - - it('should return an empty array if either input is null', function (done) { - - expect(Hoek.intersect([1], null).length).to.equal(0); - expect(Hoek.intersect(null, [1]).length).to.equal(0); - done(); - }); - - it('should return the common objects of object and array', function (done) { - - var array1 = [1, 2, 3, 4, 4, 5, 5]; - var array2 = [5, 4, 5, 6, 7]; - var common = Hoek.intersect(Hoek.mapToObject(array1), array2); - expect(common.length).to.equal(2); - done(); - }); - }); - - describe('#matchKeys', function () { - - it('should match the existing object keys', function (done) { - - var obj = { - a: 1, - b: 2, - c: 3, - d: null - }; - - expect(Hoek.matchKeys(obj, ['b', 'c', 'd', 'e'])).to.deep.equal(['b', 'c', 'd']); - done(); - }); - }); - - describe('#flatten', function () { - - it('should return a flat array', function (done) { - - var result = Hoek.flatten([1, 2, [3, 4, [5, 6], [7], 8], [9], [10, [11, 12]], 13]); - expect(result.length).to.equal(13); - expect(result).to.deep.equal([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]); - done(); - }); - }); - - describe('#removeKeys', function () { - - var objWithHiddenKeys = { - location: { - name: 'San Bruno' - }, - company: { - name: '@WalmartLabs' - } - }; - - it('should delete params with definition\'s hide set to true', function (done) { - - var a = Hoek.removeKeys(objWithHiddenKeys, ['location']); - expect(objWithHiddenKeys.location).to.not.exist; - expect(objWithHiddenKeys.company).to.exist; - done(); - }); - }); - - describe('#reach', function () { - - var obj = { - a: { - b: { - c: { - d: 1, - e: 2 - }, - f: 'hello' - }, - g: { - h: 3 - } - }, - i: function () { } - }; - - it('returns a valid member', function (done) { - - expect(Hoek.reach(obj, 'a.b.c.d')).to.equal(1); - done(); - }); - - it('returns null on null object', function (done) { - - expect(Hoek.reach(null, 'a.b.c.d')).to.not.exist; - done(); - }); - - it('returns null on missing member', function (done) { - - expect(Hoek.reach(obj, 'a.b.c.d.x')).to.not.exist; - done(); - }); - - it('returns null on invalid member', function (done) { - - expect(Hoek.reach(obj, 'a.b.c.d-.x')).to.not.exist; - done(); - }); - - it('returns function member', function (done) { - - expect(typeof Hoek.reach(obj, 'i')).to.equal('function'); - done(); - }); - }); - - describe('#inheritAsync', function () { - - it('should inherit selected methods and wrap in async call', function (done) { - - var proto = { - a: function () { - return 'a!'; - }, - b: function () { - return 'b!'; - }, - c: function () { - throw new Error('c!'); - } - }; - - var targetFunc = function () { }; - targetFunc.prototype.c = function () { - - return 'oops'; - }; - - Hoek.inheritAsync(targetFunc, proto, ['a', 'c']); - var target = new targetFunc(); - - expect(typeof target.a).to.equal('function'); - expect(typeof target.c).to.equal('function'); - expect(target.b).to.not.exist; - - target.a(function (err, result) { - - expect(err).to.not.exist; - expect(result).to.equal('a!'); - - target.c(function (err, result) { - - expect(result).to.not.exist; - expect(err.message).to.equal('c!'); - done(); - }); - }); - }); - }); - - describe('#callStack', function () { - - it('should return the full call stack', function (done) { - - var stack = Hoek.callStack(); - expect(stack[0][0]).to.contain('index.js'); - expect(stack[0][2]).to.equal(30); - done(); - }); - }); - - describe('#displayStack ', function () { - - it('should return the full call stack for display', function (done) { - - var stack = Hoek.displayStack(); - expect(stack[0]).to.contain('test/index.js:'); - done(); - }); - - it('should include constructor functions correctly', function (done) { - - var Something = function (next) { - - next(); - }; - - var something = new Something(function () { - - var stack = Hoek.displayStack(); - expect(stack[1]).to.contain('new Something'); - done(); - }); - }); - }); - - describe('#abort', function () { - - it('should exit process when not in test mode', function (done) { - - var env = process.env.NODE_ENV; - var write = process.stdout.write; - var exit = process.exit; - - process.env.NODE_ENV = 'nottatest'; - process.stdout.write = function () { }; - process.exit = function (state) { - - process.exit = exit; - process.env.NODE_ENV = env; - process.stdout.write = write; - - expect(state).to.equal(1); - done(); - }; - - Hoek.abort('Boom'); - }); - - it('should throw when not in test mode and abortThrow is true', function (done) { - - var env = process.env.NODE_ENV; - process.env.NODE_ENV = 'nottatest'; - Hoek.abortThrow = true; - - var fn = function () { - - Hoek.abort('my error message'); - }; - - expect(fn).to.throw('my error message'); - Hoek.abortThrow = false; - process.env.NODE_ENV = env; - - done(); - }); - - - it('should respect hideStack argument', function (done) { - - var env = process.env.NODE_ENV; - var write = process.stdout.write; - var exit = process.exit; - var output = ''; - - process.exit = function () { }; - process.env.NODE_ENV = ''; - process.stdout.write = function (message) { - - output = message; - }; - - Hoek.abort('my error message', true); - - process.env.NODE_ENV = env; - process.stdout.write = write; - process.exit = exit; - - expect(output).to.equal('ABORT: my error message\n\t\n'); - - done(); - }); - - it('should default to showing stack', function (done) { - - var env = process.env.NODE_ENV; - var write = process.stdout.write; - var exit = process.exit; - var output = ''; - - process.exit = function () { }; - process.env.NODE_ENV = ''; - process.stdout.write = function (message) { - - output = message; - }; - - Hoek.abort('my error message'); - - process.env.NODE_ENV = env; - process.stdout.write = write; - process.exit = exit; - - expect(output).to.contain('index.js'); - - done(); - }); - }); - - describe('#assert', function () { - - it('should throw an Error when using assert in a test', function (done) { - - var fn = function () { - - Hoek.assert(false, 'my error message'); - }; - - expect(fn).to.throw('my error message'); - done(); - }); - - it('should throw an Error when using assert in a test with no message', function (done) { - - var fn = function () { - - Hoek.assert(false); - }; - - expect(fn).to.throw('Unknown error'); - done(); - }); - - it('should throw an Error when using assert in a test with multipart message', function (done) { - - var fn = function () { - - Hoek.assert(false, 'This', 'is', 'my message'); - }; - - expect(fn).to.throw('This is my message'); - done(); - }); - - it('should throw an Error when using assert in a test with object message', function (done) { - - var fn = function () { - - Hoek.assert(false, 'This', 'is', { spinal: 'tap' }); - }; - - expect(fn).to.throw('This is {"spinal":"tap"}'); - done(); - }); - - it('should throw an Error when using assert in a test with error object message', function (done) { - - var fn = function () { - - Hoek.assert(false, new Error('This is spinal tap')); - }; - - expect(fn).to.throw('This is spinal tap'); - done(); - }); - }); - - describe('#loadDirModules', function () { - - it('should load modules from directory', function (done) { - - var target = {}; - Hoek.loadDirModules(__dirname + '/modules', ['test2'], target); - expect(target.Test1.x).to.equal(1); - expect(target.Test2).to.not.exist; - expect(target.Test3.z).to.equal(3); - done(); - }); - - it('should list modules from directory into function', function (done) { - - var target = {}; - Hoek.loadDirModules(__dirname + '/modules', ['test2'], function (path, name, capName) { - - target[name] = capName; - }); - - expect(target.test1).to.equal('Test1'); - expect(target.test2).to.not.exist; - expect(target.test3).to.equal('Test3'); - done(); - }); - }); - - describe('#rename', function () { - - it('should rename object key', function (done) { - - var a = { b: 'c' }; - Hoek.rename(a, 'b', 'x'); - expect(a.b).to.not.exist; - expect(a.x).to.equal('c'); - done(); - }); - }); - - describe('Timer', function () { - - it('should return time elapsed', function (done) { - - var timer = new Hoek.Timer(); - setTimeout(function () { - - expect(timer.elapsed()).to.be.above(9); - done(); - }, 12); - }); - }); - - describe('#loadPackage', function () { - - it('should', function (done) { - - var pack = Hoek.loadPackage(); - expect(pack.name).to.equal('hoek'); - done(); - }); - }); - - describe('#escapeRegex', function () { - - it('should escape all special regular expression characters', function (done) { - - var a = Hoek.escapeRegex('4^f$s.4*5+-_?%=#!:@|~\\/`"(>)[<]d{}s,'); - expect(a).to.equal('4\\^f\\$s\\.4\\*5\\+\\-_\\?%\\=#\\!\\:@\\|~\\\\\\/`"\\(>\\)\\[<\\]d\\{\\}s\\,'); - done(); - }); - }); - - describe('#toss', function () { - - it('should call callback with new error', function (done) { - - var callback = function (err) { - - expect(err).to.exist; - expect(err.message).to.equal('bug'); - done(); - }; - - Hoek.toss(true, 'feature', callback); - Hoek.toss(false, 'bug', callback); - }); - - it('should call callback with new error and no message', function (done) { - - Hoek.toss(false, function (err) { - - expect(err).to.exist; - expect(err.message).to.equal(''); - done(); - }); - }); - - it('should call callback with error condition', function (done) { - - Hoek.toss(new Error('boom'), function (err) { - - expect(err).to.exist; - expect(err.message).to.equal('boom'); - done(); - }); - }); - - it('should call callback with new error using message with error condition', function (done) { - - Hoek.toss(new Error('ka'), 'boom', function (err) { - - expect(err).to.exist; - expect(err.message).to.equal('boom'); - done(); - }); - }); - - it('should call callback with new error using passed error with error condition', function (done) { - - Hoek.toss(new Error('ka'), new Error('boom'), function (err) { - - expect(err).to.exist; - expect(err.message).to.equal('boom'); - done(); - }); - }); - }); - - describe('Base64Url', function () { - - var base64str = 'AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0-P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn-AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq-wsbKztLW2t7i5uru8vb6_wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t_g4eLj5OXm5-jp6uvs7e7v8PHy8_T19vf4-fr7_P3-_w'; - var str = unescape('%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%20%21%22%23%24%25%26%27%28%29*+%2C-./0123456789%3A%3B%3C%3D%3E%3F@ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D%7E%7F%80%81%82%83%84%85%86%87%88%89%8A%8B%8C%8D%8E%8F%90%91%92%93%94%95%96%97%98%99%9A%9B%9C%9D%9E%9F%A0%A1%A2%A3%A4%A5%A6%A7%A8%A9%AA%AB%AC%AD%AE%AF%B0%B1%B2%B3%B4%B5%B6%B7%B8%B9%BA%BB%BC%BD%BE%BF%C0%C1%C2%C3%C4%C5%C6%C7%C8%C9%CA%CB%CC%CD%CE%CF%D0%D1%D2%D3%D4%D5%D6%D7%D8%D9%DA%DB%DC%DD%DE%DF%E0%E1%E2%E3%E4%E5%E6%E7%E8%E9%EA%EB%EC%ED%EE%EF%F0%F1%F2%F3%F4%F5%F6%F7%F8%F9%FA%FB%FC%FD%FE%FF'); - - describe('#base64urlEncode', function () { - - it('should base64 URL-safe a string', function (done) { - - expect(Hoek.base64urlEncode(str)).to.equal(base64str); - done(); - }); - }); - - describe('#base64urlDecode', function () { - - it('should un-base64 URL-safe a string', function (done) { - - expect(Hoek.base64urlDecode(base64str)).to.equal(str); - done(); - }); - - it('should return error on undefined input', function (done) { - - expect(Hoek.base64urlDecode().message).to.exist; - done(); - }); - - it('should return error on invalid input', function (done) { - - expect(Hoek.base64urlDecode('*').message).to.exist; - done(); - }); - }); - }); - - describe('#escapeHeaderAttribute', function () { - - it('should not alter ascii values', function (done) { - - var a = Hoek.escapeHeaderAttribute('My Value'); - expect(a).to.equal('My Value'); - done(); - }); - - it('should escape all special HTTP header attribute characters', function (done) { - - var a = Hoek.escapeHeaderAttribute('I said go!!!#"' + String.fromCharCode(92)); - expect(a).to.equal('I said go!!!#\\"\\\\'); - done(); - }); - - it('should throw on large unicode characters', function (done) { - - var fn = function () { - - Hoek.escapeHeaderAttribute('this is a test' + String.fromCharCode(500) + String.fromCharCode(300)); - }; - - expect(fn).to.throw(Error); - done(); - }); - - it('should throw on CRLF to prevent response splitting', function (done) { - - var fn = function () { - - Hoek.escapeHeaderAttribute('this is a test\r\n'); - }; - - expect(fn).to.throw(Error); - done(); - }); - }); - - describe('#escapeHtml', function () { - - it('should escape all special HTML characters', function (done) { - - var a = Hoek.escapeHtml('&<>"\'`'); - expect(a).to.equal('&<>"'`'); - done(); - }); - - it('should return empty string on falsy input', function (done) { - - var a = Hoek.escapeHtml(''); - expect(a).to.equal(''); - done(); - }); - - it('should return unchanged string on no reserved input', function (done) { - - var a = Hoek.escapeHtml('abc'); - expect(a).to.equal('abc'); - done(); - }); - }); - - describe('#printEvent', function () { - - it('outputs event as string', function (done) { - - var event = { - timestamp: (new Date(2013, 1, 1, 6, 30, 45, 123)).getTime(), - tags: ['a', 'b', 'c'], - data: { some: 'data' } - }; - - Hoek.consoleFunc = function (string) { - - Hoek.consoleFunc = console.log; - expect(string).to.equal('130201/063045.123, a, {"some":"data"}'); - done(); - }; - - Hoek.printEvent(event); - }); - - it('outputs JSON error', function (done) { - - var event = { - timestamp: (new Date(2013, 1, 1, 6, 30, 45, 123)).getTime(), - tags: ['a', 'b', 'c'], - data: { some: 'data' } - }; - - event.data.a = event.data; - - Hoek.consoleFunc = function (string) { - - Hoek.consoleFunc = console.log; - expect(string).to.equal('130201/063045.123, a, JSON Error: Converting circular structure to JSON'); - done(); - }; - - Hoek.printEvent(event); - }); - }); - - describe('#nextTick', function () { - - it('calls the provided callback on nextTick', function (done) { - - var a = 0; - - var inc = function (step, next) { - - a += step; - next(); - }; - - var ticked = Hoek.nextTick(inc); - - ticked(5, function () { - - expect(a).to.equal(6); - done(); - }); - - expect(a).to.equal(0); - inc(1, function () { - - expect(a).to.equal(1); - }); - }); - }); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js deleted file mode 100755 index 3f41e601..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js +++ /dev/null @@ -1 +0,0 @@ -exports.x = 1; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js deleted file mode 100755 index 38556b27..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js +++ /dev/null @@ -1 +0,0 @@ -exports.y = 2; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js deleted file mode 100755 index 436b860b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js +++ /dev/null @@ -1 +0,0 @@ -exports.z = 3; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/.npmignore deleted file mode 100644 index 77ba16cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/.npmignore +++ /dev/null @@ -1,18 +0,0 @@ -.idea -*.iml -npm-debug.log -dump.rdb -node_modules -results.tap -results.xml -npm-shrinkwrap.json -config.json -.DS_Store -*/.DS_Store -*/*/.DS_Store -._* -*/._* -*/*/._* -coverage.* -lib-cov - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/.travis.yml deleted file mode 100755 index 047f7e3d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js - -node_js: - - 0.10 - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE deleted file mode 100755 index e699a7bd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2012-2013, Eran Hammer. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Eran Hammer nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL ERAN HAMMER BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile deleted file mode 100755 index 9e7138c2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -test: - @./node_modules/.bin/lab -test-cov: - @./node_modules/.bin/lab -r threshold -t 100 -test-cov-html: - @./node_modules/.bin/lab -r html -o coverage.html -complexity: - @./node_modules/.bin/cr -o complexity.md -f markdown lib - -.PHONY: test test-cov test-cov-html complexity - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/README.md deleted file mode 100755 index 98a6e025..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# sntp - -An SNTP v4 client (RFC4330) for node. Simpy connects to the NTP or SNTP server requested and returns the server time -along with the roundtrip duration and clock offset. To adjust the local time to the NTP time, add the returned `t` offset -to the local time. - -[![Build Status](https://secure.travis-ci.org/hueniverse/sntp.png)](http://travis-ci.org/hueniverse/sntp) - -# Usage - -```javascript -var Sntp = require('sntp'); - -// All options are optional - -var options = { - host: 'nist1-sj.ustiming.org', // Defaults to pool.ntp.org - port: 123, // Defaults to 123 (NTP) - resolveReference: true, // Default to false (not resolving) - timeout: 1000 // Defaults to zero (no timeout) -}; - -// Request server time - -Sntp.time(options, function (err, time) { - - if (err) { - console.log('Failed: ' + err.message); - process.exit(1); - } - - console.log('Local clock is off by: ' + time.t + ' milliseconds'); - process.exit(0); -}); -``` - -If an application needs to maintain continuous time synchronization, the module provides a stateful method for -querying the current offset only when the last one is too old (defaults to daily). - -```javascript -// Request offset once - -Sntp.offset(function (err, offset) { - - console.log(offset); // New (served fresh) - - // Request offset again - - Sntp.offset(function (err, offset) { - - console.log(offset); // Identical (served from cache) - }); -}); -``` - -To set a background offset refresh, start the interval and use the provided now() method. If for any reason the -client fails to obtain an up-to-date offset, the current system clock is used. - -```javascript -var before = Sntp.now(); // System time without offset - -Sntp.start(function () { - - var now = Sntp.now(); // With offset - Sntp.stop(); -}); -``` - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js deleted file mode 100755 index 0303f6dc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js +++ /dev/null @@ -1,16 +0,0 @@ -var Sntp = require('../lib'); - -// Request offset once - -Sntp.offset(function (err, offset) { - - console.log(offset); // New (served fresh) - - // Request offset again - - Sntp.offset(function (err, offset) { - - console.log(offset); // Identical (served from cache) - }); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js deleted file mode 100755 index bd70d0e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js +++ /dev/null @@ -1,25 +0,0 @@ -var Sntp = require('../lib'); - -// All options are optional - -var options = { - host: 'nist1-sj.ustiming.org', // Defaults to pool.ntp.org - port: 123, // Defaults to 123 (NTP) - resolveReference: true, // Default to false (not resolving) - timeout: 1000 // Defaults to zero (no timeout) -}; - -// Request server time - -Sntp.time(options, function (err, time) { - - if (err) { - console.log('Failed: ' + err.message); - process.exit(1); - } - - console.log(time); - console.log('Local clock is off by: ' + time.t + ' milliseconds'); - process.exit(0); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/index.js deleted file mode 100755 index 4cc88b35..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib'); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js deleted file mode 100755 index e492cd93..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js +++ /dev/null @@ -1,409 +0,0 @@ -// Load modules - -var Dgram = require('dgram'); -var Dns = require('dns'); -var Hoek = require('hoek'); - - -// Declare internals - -var internals = {}; - - -exports.time = function (options, callback) { - - if (arguments.length !== 2) { - callback = arguments[0]; - options = {}; - } - - var settings = Hoek.clone(options); - settings.host = settings.host || 'pool.ntp.org'; - settings.port = settings.port || 123; - settings.resolveReference = settings.resolveReference || false; - - // Declare variables used by callback - - var timeoutId = 0; - var sent = 0; - - // Ensure callback is only called once - - var isFinished = false; - var finish = function (err, result) { - - if (timeoutId) { - clearTimeout(timeoutId); - timeoutId = 0; - } - - if (!isFinished) { - isFinished = true; - socket.removeAllListeners(); - socket.close(); - return callback(err, result); - } - }; - - // Create UDP socket - - var socket = Dgram.createSocket('udp4'); - - socket.once('error', function (err) { - - return finish(err); - }); - - // Listen to incoming messages - - socket.on('message', function (buffer, rinfo) { - - var received = Date.now(); - - var message = new internals.NtpMessage(buffer); - if (!message.isValid) { - return finish(new Error('Invalid server response'), message); - } - - if (message.originateTimestamp !== sent) { - return finish(new Error('Wrong originate timestamp'), message); - } - - // Timestamp Name ID When Generated - // ------------------------------------------------------------ - // Originate Timestamp T1 time request sent by client - // Receive Timestamp T2 time request received by server - // Transmit Timestamp T3 time reply sent by server - // Destination Timestamp T4 time reply received by client - // - // The roundtrip delay d and system clock offset t are defined as: - // - // d = (T4 - T1) - (T3 - T2) t = ((T2 - T1) + (T3 - T4)) / 2 - - var T1 = message.originateTimestamp; - var T2 = message.receiveTimestamp; - var T3 = message.transmitTimestamp; - var T4 = received; - - message.d = (T4 - T1) - (T3 - T2); - message.t = ((T2 - T1) + (T3 - T4)) / 2; - message.receivedLocally = received; - - if (!settings.resolveReference || - message.stratum !== 'secondary') { - - return finish(null, message); - } - - // Resolve reference IP address - - Dns.reverse(message.referenceId, function (err, domains) { - - if (!err) { - message.referenceHost = domains[0]; - } - - return finish(null, message); - }); - }); - - // Set timeout - - if (settings.timeout) { - timeoutId = setTimeout(function () { - - timeoutId = 0; - return finish(new Error('Timeout')); - }, settings.timeout); - } - - // Construct NTP message - - var message = new Buffer(48); - for (var i = 0; i < 48; i++) { // Zero message - message[i] = 0; - } - - message[0] = (0 << 6) + (4 << 3) + (3 << 0) // Set version number to 4 and Mode to 3 (client) - sent = Date.now(); - internals.fromMsecs(sent, message, 40); // Set transmit timestamp (returns as originate) - - // Send NTP request - - socket.send(message, 0, message.length, settings.port, settings.host, function (err, bytes) { - - if (err || - bytes !== 48) { - - return finish(err || new Error('Could not send entire message')); - } - }); -}; - - -internals.NtpMessage = function (buffer) { - - this.isValid = false; - - // Validate - - if (buffer.length !== 48) { - return; - } - - // Leap indicator - - var li = (buffer[0] >> 6); - switch (li) { - case 0: this.leapIndicator = 'no-warning'; break; - case 1: this.leapIndicator = 'last-minute-61'; break; - case 2: this.leapIndicator = 'last-minute-59'; break; - case 3: this.leapIndicator = 'alarm'; break; - } - - // Version - - var vn = ((buffer[0] & 0x38) >> 3); - this.version = vn; - - // Mode - - var mode = (buffer[0] & 0x7); - switch (mode) { - case 1: this.mode = 'symmetric-active'; break; - case 2: this.mode = 'symmetric-passive'; break; - case 3: this.mode = 'client'; break; - case 4: this.mode = 'server'; break; - case 5: this.mode = 'broadcast'; break; - case 0: - case 6: - case 7: this.mode = 'reserved'; break; - } - - // Stratum - - var stratum = buffer[1]; - if (stratum === 0) { - this.stratum = 'death'; - } - else if (stratum === 1) { - this.stratum = 'primary'; - } - else if (stratum <= 15) { - this.stratum = 'secondary'; - } - else { - this.stratum = 'reserved'; - } - - // Poll interval (msec) - - this.pollInterval = Math.round(Math.pow(2, buffer[2])) * 1000; - - // Precision (msecs) - - this.precision = Math.pow(2, buffer[3]) * 1000; - - // Root delay (msecs) - - var rootDelay = 256 * (256 * (256 * buffer[4] + buffer[5]) + buffer[6]) + buffer[7]; - this.rootDelay = 1000 * (rootDelay / 0x10000); - - // Root dispersion (msecs) - - this.rootDispersion = ((buffer[8] << 8) + buffer[9] + ((buffer[10] << 8) + buffer[11]) / Math.pow(2, 16)) * 1000; - - // Reference identifier - - this.referenceId = ''; - switch (this.stratum) { - case 'death': - case 'primary': - this.referenceId = String.fromCharCode(buffer[12]) + String.fromCharCode(buffer[13]) + String.fromCharCode(buffer[14]) + String.fromCharCode(buffer[15]); - break; - case 'secondary': - this.referenceId = '' + buffer[12] + '.' + buffer[13] + '.' + buffer[14] + '.' + buffer[15]; - break; - } - - // Reference timestamp - - this.referenceTimestamp = internals.toMsecs(buffer, 16); - - // Originate timestamp - - this.originateTimestamp = internals.toMsecs(buffer, 24); - - // Receive timestamp - - this.receiveTimestamp = internals.toMsecs(buffer, 32); - - // Transmit timestamp - - this.transmitTimestamp = internals.toMsecs(buffer, 40); - - // Validate - - if (this.version === 4 && - this.stratum !== 'reserved' && - this.mode === 'server' && - this.originateTimestamp && - this.receiveTimestamp && - this.transmitTimestamp) { - - this.isValid = true; - } - - return this; -}; - - -internals.toMsecs = function (buffer, offset) { - - var seconds = 0; - var fraction = 0; - - for (var i = 0; i < 4; ++i) { - seconds = (seconds * 256) + buffer[offset + i]; - } - - for (i = 4; i < 8; ++i) { - fraction = (fraction * 256) + buffer[offset + i]; - } - - return ((seconds - 2208988800 + (fraction / Math.pow(2, 32))) * 1000); -}; - - -internals.fromMsecs = function (ts, buffer, offset) { - - var seconds = Math.floor(ts / 1000) + 2208988800; - var fraction = Math.round((ts % 1000) / 1000 * Math.pow(2, 32)); - - buffer[offset + 0] = (seconds & 0xFF000000) >> 24; - buffer[offset + 1] = (seconds & 0x00FF0000) >> 16; - buffer[offset + 2] = (seconds & 0x0000FF00) >> 8; - buffer[offset + 3] = (seconds & 0x000000FF); - - buffer[offset + 4] = (fraction & 0xFF000000) >> 24; - buffer[offset + 5] = (fraction & 0x00FF0000) >> 16; - buffer[offset + 6] = (fraction & 0x0000FF00) >> 8; - buffer[offset + 7] = (fraction & 0x000000FF); -}; - - -// Offset singleton - -internals.last = { - offset: 0, - expires: 0, - host: '', - port: 0 -}; - - -exports.offset = function (options, callback) { - - if (arguments.length !== 2) { - callback = arguments[0]; - options = {}; - } - - var now = Date.now(); - var clockSyncRefresh = options.clockSyncRefresh || 24 * 60 * 60 * 1000; // Daily - - if (internals.last.offset && - internals.last.host === options.host && - internals.last.port === options.port && - now < internals.last.expires) { - - process.nextTick(function () { - - callback(null, internals.last.offset); - }); - - return; - } - - exports.time(options, function (err, time) { - - if (err) { - return callback(err, 0); - } - - internals.last = { - offset: Math.round(time.t), - expires: now + clockSyncRefresh, - host: options.host, - port: options.port - }; - - return callback(null, internals.last.offset); - }); -}; - - -// Now singleton - -internals.now = { - intervalId: 0 -}; - - -exports.start = function (options, callback) { - - if (arguments.length !== 2) { - callback = arguments[0]; - options = {}; - } - - if (internals.now.intervalId) { - process.nextTick(function () { - - callback(); - }); - - return; - } - - exports.offset(options, function (err, offset) { - - internals.now.intervalId = setInterval(function () { - - exports.offset(options, function () { }); - }, options.clockSyncRefresh || 24 * 60 * 60 * 1000); // Daily - - return callback(); - }); -}; - - -exports.stop = function () { - - if (!internals.now.intervalId) { - return; - } - - clearInterval(internals.now.intervalId); - internals.now.intervalId = 0; -}; - - -exports.isLive = function () { - - return !!internals.now.intervalId; -}; - - -exports.now = function () { - - var now = Date.now(); - if (!exports.isLive() || - now >= internals.last.expires) { - - return now; - } - - return now + internals.last.offset; -}; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/package.json deleted file mode 100755 index 8ce7a61f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "sntp", - "description": "SNTP Client", - "version": "0.2.4", - "author": { - "name": "Eran Hammer", - "email": "eran@hueniverse.com", - "url": "http://hueniverse.com" - }, - "contributors": [], - "repository": { - "type": "git", - "url": "git://github.com/hueniverse/sntp" - }, - "main": "index", - "keywords": [ - "sntp", - "ntp", - "time" - ], - "engines": { - "node": ">=0.8.0" - }, - "dependencies": { - "hoek": "0.9.x" - }, - "devDependencies": { - "lab": "0.1.x", - "complexity-report": "0.x.x" - }, - "scripts": { - "test": "make test-cov" - }, - "licenses": [ - { - "type": "BSD", - "url": "http://github.com/hueniverse/sntp/raw/master/LICENSE" - } - ], - "readme": "# sntp\n\nAn SNTP v4 client (RFC4330) for node. Simpy connects to the NTP or SNTP server requested and returns the server time\nalong with the roundtrip duration and clock offset. To adjust the local time to the NTP time, add the returned `t` offset\nto the local time.\n\n[![Build Status](https://secure.travis-ci.org/hueniverse/sntp.png)](http://travis-ci.org/hueniverse/sntp)\n\n# Usage\n\n```javascript\nvar Sntp = require('sntp');\n\n// All options are optional\n\nvar options = {\n host: 'nist1-sj.ustiming.org', // Defaults to pool.ntp.org\n port: 123, // Defaults to 123 (NTP)\n resolveReference: true, // Default to false (not resolving)\n timeout: 1000 // Defaults to zero (no timeout)\n};\n\n// Request server time\n\nSntp.time(options, function (err, time) {\n\n if (err) {\n console.log('Failed: ' + err.message);\n process.exit(1);\n }\n\n console.log('Local clock is off by: ' + time.t + ' milliseconds');\n process.exit(0);\n});\n```\n\nIf an application needs to maintain continuous time synchronization, the module provides a stateful method for\nquerying the current offset only when the last one is too old (defaults to daily).\n\n```javascript\n// Request offset once\n\nSntp.offset(function (err, offset) {\n\n console.log(offset); // New (served fresh)\n\n // Request offset again\n\n Sntp.offset(function (err, offset) {\n\n console.log(offset); // Identical (served from cache)\n });\n});\n```\n\nTo set a background offset refresh, start the interval and use the provided now() method. If for any reason the\nclient fails to obtain an up-to-date offset, the current system clock is used.\n\n```javascript\nvar before = Sntp.now(); // System time without offset\n\nSntp.start(function () {\n\n var now = Sntp.now(); // With offset\n Sntp.stop();\n});\n```\n\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/hueniverse/sntp/issues" - }, - "homepage": "https://github.com/hueniverse/sntp", - "_id": "sntp@0.2.4", - "dist": { - "shasum": "657ad142a4f42d39c3e8f4b507ec2dd8f0ecfd9f" - }, - "_from": "sntp@0.2.x", - "_resolved": "https://registry.npmjs.org/sntp/-/sntp-0.2.4.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js deleted file mode 100755 index 38a55346..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js +++ /dev/null @@ -1,359 +0,0 @@ -// Load modules - -var Dgram = require('dgram'); -var Lab = require('lab'); -var Sntp = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('SNTP', function () { - - describe('#time', function () { - - it('returns consistent result over multiple tries', function (done) { - - Sntp.time(function (err, time) { - - expect(err).to.not.exist; - expect(time).to.exist; - var t1 = time.t; - - Sntp.time(function (err, time) { - - expect(err).to.not.exist; - expect(time).to.exist; - var t2 = time.t; - expect(Math.abs(t1 - t2)).is.below(200); - done(); - }); - }); - }); - - it('resolves reference IP', function (done) { - - Sntp.time({ host: 'ntp.exnet.com', resolveReference: true }, function (err, time) { - - expect(err).to.not.exist; - expect(time).to.exist; - expect(time.referenceHost).to.exist; - done(); - }); - }); - - it('times out on no response', function (done) { - - Sntp.time({ port: 124, timeout: 100 }, function (err, time) { - - expect(err).to.exist; - expect(time).to.not.exist; - expect(err.message).to.equal('Timeout'); - done(); - }); - }); - - it('errors on error event', function (done) { - - var orig = Dgram.createSocket; - Dgram.createSocket = function (type) { - - Dgram.createSocket = orig; - var socket = Dgram.createSocket(type); - process.nextTick(function () { socket.emit('error', new Error('Fake')) }); - return socket; - }; - - Sntp.time(function (err, time) { - - expect(err).to.exist; - expect(time).to.not.exist; - expect(err.message).to.equal('Fake'); - done(); - }); - }); - - it('times out on invalid host', function (done) { - - Sntp.time({ host: 'error', timeout: 10000 }, function (err, time) { - - expect(err).to.exist; - expect(time).to.not.exist; - expect(err.message).to.equal('getaddrinfo ENOTFOUND'); - done(); - }); - }); - - it('fails on bad response buffer size', function (done) { - - var server = Dgram.createSocket('udp4'); - server.on('message', function (message, remote) { - var message = new Buffer(10); - server.send(message, 0, message.length, remote.port, remote.address, function (err, bytes) { - - server.close(); - }); - }); - - server.bind(49123); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(err.message).to.equal('Invalid server response'); - done(); - }); - }); - - var messup = function (bytes) { - - var server = Dgram.createSocket('udp4'); - server.on('message', function (message, remote) { - - var message = new Buffer([ - 0x24, 0x01, 0x00, 0xe3, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x41, 0x43, 0x54, 0x53, - 0xd4, 0xa8, 0x2d, 0xc7, - 0x1c, 0x5d, 0x49, 0x1b, - 0xd4, 0xa8, 0x2d, 0xe6, - 0x67, 0xef, 0x9d, 0xb2, - 0xd4, 0xa8, 0x2d, 0xe6, - 0x71, 0xed, 0xb5, 0xfb, - 0xd4, 0xa8, 0x2d, 0xe6, - 0x71, 0xee, 0x6c, 0xc5 - ]); - - for (var i = 0, il = bytes.length; i < il; ++i) { - message[bytes[i][0]] = bytes[i][1]; - } - - server.send(message, 0, message.length, remote.port, remote.address, function (err, bytes) { - - server.close(); - }); - }); - - server.bind(49123); - }; - - it('fails on bad version', function (done) { - - messup([[0, (0 << 6) + (3 << 3) + (4 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(time.version).to.equal(3); - expect(err.message).to.equal('Invalid server response'); - done(); - }); - }); - - it('fails on bad originate timestamp and alarm li', function (done) { - - messup([[0, (3 << 6) + (4 << 3) + (4 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(err.message).to.equal('Wrong originate timestamp'); - expect(time.leapIndicator).to.equal('alarm'); - done(); - }); - }); - - it('returns time with death stratum and last61 li', function (done) { - - messup([[0, (1 << 6) + (4 << 3) + (4 << 0)], [1, 0]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(time.stratum).to.equal('death'); - expect(time.leapIndicator).to.equal('last-minute-61'); - done(); - }); - }); - - it('returns time with reserved stratum and last59 li', function (done) { - - messup([[0, (2 << 6) + (4 << 3) + (4 << 0)], [1, 0x1f]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(time.stratum).to.equal('reserved'); - expect(time.leapIndicator).to.equal('last-minute-59'); - done(); - }); - }); - - it('fails on bad mode (symmetric-active)', function (done) { - - messup([[0, (0 << 6) + (4 << 3) + (1 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(time.mode).to.equal('symmetric-active'); - done(); - }); - }); - - it('fails on bad mode (symmetric-passive)', function (done) { - - messup([[0, (0 << 6) + (4 << 3) + (2 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(time.mode).to.equal('symmetric-passive'); - done(); - }); - }); - - it('fails on bad mode (client)', function (done) { - - messup([[0, (0 << 6) + (4 << 3) + (3 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(time.mode).to.equal('client'); - done(); - }); - }); - - it('fails on bad mode (broadcast)', function (done) { - - messup([[0, (0 << 6) + (4 << 3) + (5 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(time.mode).to.equal('broadcast'); - done(); - }); - }); - - it('fails on bad mode (reserved)', function (done) { - - messup([[0, (0 << 6) + (4 << 3) + (6 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(time.mode).to.equal('reserved'); - done(); - }); - }); - }); - - describe('#offset', function () { - - it('gets the current offset', function (done) { - - Sntp.offset(function (err, offset) { - - expect(err).to.not.exist; - expect(offset).to.not.equal(0); - done(); - }); - }); - - it('gets the current offset from cache', function (done) { - - Sntp.offset(function (err, offset) { - - expect(err).to.not.exist; - expect(offset).to.not.equal(0); - var offset1 = offset; - Sntp.offset({}, function (err, offset) { - - expect(err).to.not.exist; - expect(offset).to.equal(offset1); - done(); - }); - }); - }); - - it('fails getting the current offset on invalid server', function (done) { - - Sntp.offset({ host: 'error' }, function (err, offset) { - - expect(err).to.exist; - expect(offset).to.equal(0); - done(); - }); - }); - }); - - describe('#now', function () { - - it('starts auto-sync, gets now, then stops', function (done) { - - Sntp.stop(); - - var before = Sntp.now(); - expect(before).to.equal(Date.now()); - - Sntp.start(function () { - - var now = Sntp.now(); - expect(now).to.not.equal(Date.now()); - Sntp.stop(); - - done(); - }); - }); - - it('starts twice', function (done) { - - Sntp.start(function () { - - Sntp.start(function () { - - var now = Sntp.now(); - expect(now).to.not.equal(Date.now()); - Sntp.stop(); - - done(); - }); - }); - }); - - it('starts auto-sync, gets now, waits, gets again after timeout', function (done) { - - Sntp.stop(); - - var before = Sntp.now(); - expect(before).to.equal(Date.now()); - - Sntp.start({ clockSyncRefresh: 100 }, function () { - - var now = Sntp.now(); - expect(now).to.not.equal(Date.now()); - expect(now).to.equal(Sntp.now()); - - setTimeout(function () { - - expect(Sntp.now()).to.not.equal(now); - Sntp.stop(); - done(); - }, 110); - }); - }); - }); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/package.json deleted file mode 100755 index 8bf4c5c7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "hawk", - "description": "HTTP Hawk Authentication Scheme", - "version": "1.0.0", - "author": { - "name": "Eran Hammer", - "email": "eran@hueniverse.com", - "url": "http://hueniverse.com" - }, - "contributors": [], - "repository": { - "type": "git", - "url": "git://github.com/hueniverse/hawk" - }, - "main": "index", - "keywords": [ - "http", - "authentication", - "scheme", - "hawk" - ], - "engines": { - "node": ">=0.8.0" - }, - "dependencies": { - "hoek": "0.9.x", - "boom": "0.4.x", - "cryptiles": "0.2.x", - "sntp": "0.2.x" - }, - "devDependencies": { - "lab": "0.1.x", - "complexity-report": "0.x.x", - "localStorage": "1.0.x" - }, - "scripts": { - "test": "make test-cov" - }, - "licenses": [ - { - "type": "BSD", - "url": "http://github.com/hueniverse/hawk/raw/master/LICENSE" - } - ], - "readme": "![hawk Logo](https://raw.github.com/hueniverse/hawk/master/images/hawk.png)\n\n<img align=\"right\" src=\"https://raw.github.com/hueniverse/hawk/master/images/logo.png\" /> **Hawk** is an HTTP authentication scheme using a message authentication code (MAC) algorithm to provide partial\nHTTP request cryptographic verification. For more complex use cases such as access delegation, see [Oz](https://github.com/hueniverse/oz).\n\nCurrent version: **1.0**\n\n[![Build Status](https://secure.travis-ci.org/hueniverse/hawk.png)](http://travis-ci.org/hueniverse/hawk)\n\n# Table of Content\n\n- [**Introduction**](#introduction)\n - [Replay Protection](#replay-protection)\n - [Usage Example](#usage-example)\n - [Protocol Example](#protocol-example)\n - [Payload Validation](#payload-validation)\n - [Response Payload Validation](#response-payload-validation)\n - [Browser Support and Considerations](#browser-support-and-considerations)\n<p></p>\n- [**Single URI Authorization**](#single-uri-authorization)\n - [Usage Example](#bewit-usage-example)\n<p></p>\n- [**Security Considerations**](#security-considerations)\n - [MAC Keys Transmission](#mac-keys-transmission)\n - [Confidentiality of Requests](#confidentiality-of-requests)\n - [Spoofing by Counterfeit Servers](#spoofing-by-counterfeit-servers)\n - [Plaintext Storage of Credentials](#plaintext-storage-of-credentials)\n - [Entropy of Keys](#entropy-of-keys)\n - [Coverage Limitations](#coverage-limitations)\n - [Future Time Manipulation](#future-time-manipulation)\n - [Client Clock Poisoning](#client-clock-poisoning)\n - [Bewit Limitations](#bewit-limitations)\n - [Host Header Forgery](#host-header-forgery)\n<p></p>\n- [**Frequently Asked Questions**](#frequently-asked-questions)\n<p></p>\n- [**Acknowledgements**](#acknowledgements)\n\n# Introduction\n\n**Hawk** is an HTTP authentication scheme providing mechanisms for making authenticated HTTP requests with\npartial cryptographic verification of the request and response, covering the HTTP method, request URI, host,\nand optionally the request payload.\n\nSimilar to the HTTP [Digest access authentication schemes](http://www.ietf.org/rfc/rfc2617.txt), **Hawk** uses a set of\nclient credentials which include an identifier (e.g. username) and key (e.g. password). Likewise, just as with the Digest scheme,\nthe key is never included in authenticated requests. Instead, it is used to calculate a request MAC value which is\nincluded in its place.\n\nHowever, **Hawk** has several differences from Digest. In particular, while both use a nonce to limit the possibility of\nreplay attacks, in **Hawk** the client generates the nonce and uses it in combination with a timestamp, leading to less\n\"chattiness\" (interaction with the server).\n\nAlso unlike Digest, this scheme is not intended to protect the key itself (the password in Digest) because\nthe client and server must both have access to the key material in the clear.\n\nThe primary design goals of this scheme are to:\n* simplify and improve HTTP authentication for services that are unwilling or unable to deploy TLS for all resources,\n* secure credentials against leakage (e.g., when the client uses some form of dynamic configuration to determine where\n to send an authenticated request), and\n* avoid the exposure of credentials sent to a malicious server over an unauthenticated secure channel due to client\n failure to validate the server's identity as part of its TLS handshake.\n\nIn addition, **Hawk** supports a method for granting third-parties temporary access to individual resources using\na query parameter called _bewit_ (in falconry, a leather strap used to attach a tracking device to the leg of a hawk).\n\nThe **Hawk** scheme requires the establishment of a shared symmetric key between the client and the server,\nwhich is beyond the scope of this module. Typically, the shared credentials are established via an initial\nTLS-protected phase or derived from some other shared confidential information available to both the client\nand the server.\n\n\n## Replay Protection\n\nWithout replay protection, an attacker can use a compromised (but otherwise valid and authenticated) request more \nthan once, gaining access to a protected resource. To mitigate this, clients include both a nonce and a timestamp when \nmaking requests. This gives the server enough information to prevent replay attacks.\n\nThe nonce is generated by the client, and is a string unique across all requests with the same timestamp and\nkey identifier combination. \n\nThe timestamp enables the server to restrict the validity period of the credentials where requests occuring afterwards\nare rejected. It also removes the need for the server to retain an unbounded number of nonce values for future checks.\nBy default, **Hawk** uses a time window of 1 minute to allow for time skew between the client and server (which in\npractice translates to a maximum of 2 minutes as the skew can be positive or negative).\n\nUsing a timestamp requires the client's clock to be in sync with the server's clock. **Hawk** requires both the client\nclock and the server clock to use NTP to ensure synchronization. However, given the limitations of some client types\n(e.g. browsers) to deploy NTP, the server provides the client with its current time (in seconds precision) in response\nto a bad timestamp.\n\nThere is no expectation that the client will adjust its system clock to match the server (in fact, this would be a\npotential attack vector). Instead, the client only uses the server's time to calculate an offset used only\nfor communications with that particular server. The protocol rewards clients with synchronized clocks by reducing\nthe number of round trips required to authenticate the first request.\n\n\n## Usage Example\n\nServer code:\n\n```javascript\nvar Http = require('http');\nvar Hawk = require('hawk');\n\n\n// Credentials lookup function\n\nvar credentialsFunc = function (id, callback) {\n\n var credentials = {\n key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',\n algorithm: 'sha256',\n user: 'Steve'\n };\n\n return callback(null, credentials);\n};\n\n// Create HTTP server\n\nvar handler = function (req, res) {\n\n // Authenticate incoming request\n\n Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {\n\n // Prepare response\n\n var payload = (!err ? 'Hello ' + credentials.user + ' ' + artifacts.ext : 'Shoosh!');\n var headers = { 'Content-Type': 'text/plain' };\n\n // Generate Server-Authorization response header\n\n var header = Hawk.server.header(credentials, artifacts, { payload: payload, contentType: headers['Content-Type'] });\n headers['Server-Authorization'] = header;\n\n // Send the response back\n\n res.writeHead(!err ? 200 : 401, headers);\n res.end(payload);\n });\n};\n\n// Start server\n\nHttp.createServer(handler).listen(8000, 'example.com');\n```\n\nClient code:\n\n```javascript\nvar Request = require('request');\nvar Hawk = require('hawk');\n\n\n// Client credentials\n\nvar credentials = {\n id: 'dh37fgj492je',\n key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',\n algorithm: 'sha256'\n}\n\n// Request options\n\nvar requestOptions = {\n uri: 'http://example.com:8000/resource/1?b=1&a=2',\n method: 'GET',\n headers: {}\n};\n\n// Generate Authorization request header\n\nvar header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'GET', { credentials: credentials, ext: 'some-app-data' });\nrequestOptions.headers.Authorization = header.field;\n\n// Send authenticated request\n\nRequest(requestOptions, function (error, response, body) {\n\n // Authenticate the server's response\n\n var isValid = Hawk.client.authenticate(response, credentials, header.artifacts, { payload: body });\n\n // Output results\n\n console.log(response.statusCode + ': ' + body + (isValid ? ' (valid)' : ' (invalid)'));\n});\n```\n\n**Hawk** utilized the [**SNTP**](https://github.com/hueniverse/sntp) module for time sync management. By default, the local\nmachine time is used. To automatically retrieve and synchronice the clock within the application, use the SNTP 'start()' method.\n\n```javascript\nHawk.sntp.start();\n```\n\n\n## Protocol Example\n\nThe client attempts to access a protected resource without authentication, sending the following HTTP request to\nthe resource server:\n\n```\nGET /resource/1?b=1&a=2 HTTP/1.1\nHost: example.com:8000\n```\n\nThe resource server returns an authentication challenge.\n\n```\nHTTP/1.1 401 Unauthorized\nWWW-Authenticate: Hawk\n```\n\nThe client has previously obtained a set of **Hawk** credentials for accessing resources on the \"http://example.com/\"\nserver. The **Hawk** credentials issued to the client include the following attributes:\n\n* Key identifier: dh37fgj492je\n* Key: werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn\n* Algorithm: sha256\n\nThe client generates the authentication header by calculating a timestamp (e.g. the number of seconds since January 1,\n1970 00:00:00 GMT), generating a nonce, and constructing the normalized request string (each value followed by a newline\ncharacter):\n\n```\nhawk.1.header\n1353832234\nj4h3g2\nGET\n/resource/1?b=1&a=2\nexample.com\n8000\n\nsome-app-ext-data\n\n```\n\nThe request MAC is calculated using HMAC with the specified hash algorithm \"sha256\" and the key over the normalized request string.\nThe result is base64-encoded to produce the request MAC:\n\n```\n6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE=\n```\n\nThe client includes the **Hawk** key identifier, timestamp, nonce, application specific data, and request MAC with the request using\nthe HTTP `Authorization` request header field:\n\n```\nGET /resource/1?b=1&a=2 HTTP/1.1\nHost: example.com:8000\nAuthorization: Hawk id=\"dh37fgj492je\", ts=\"1353832234\", nonce=\"j4h3g2\", ext=\"some-app-ext-data\", mac=\"6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE=\"\n```\n\nThe server validates the request by calculating the request MAC again based on the request received and verifies the validity\nand scope of the **Hawk** credentials. If valid, the server responds with the requested resource.\n\n\n### Payload Validation\n\n**Hawk** provides optional payload validation. When generating the authentication header, the client calculates a payload hash\nusing the specified hash algorithm. The hash is calculated over the concatenated value of (each followed by a newline character):\n* `hawk.1.payload`\n* the content-type in lowercase, without any parameters (e.g. `application/json`)\n* the request payload prior to any content encoding (the exact representation requirements should be specified by the server for payloads other than simple single-part ascii to ensure interoperability)\n\nFor example:\n\n* Payload: `Thank you for flying Hawk`\n* Content Type: `text/plain`\n* Hash (sha256): `Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=`\n\nResults in the following input to the payload hash function (newline terminated values):\n\n```\nhawk.1.payload\ntext/plain\nThank you for flying Hawk\n\n```\n\nWhich produces the following hash value:\n\n```\nYi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=\n```\n\nThe client constructs the normalized request string (newline terminated values):\n\n```\nhawk.1.header\n1353832234\nj4h3g2\nPOST\n/resource/1?a=1&b=2\nexample.com\n8000\nYi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=\nsome-app-ext-data\n\n```\n\nThen calculates the request MAC and includes the **Hawk** key identifier, timestamp, nonce, payload hash, application specific data,\nand request MAC, with the request using the HTTP `Authorization` request header field:\n\n```\nPOST /resource/1?a=1&b=2 HTTP/1.1\nHost: example.com:8000\nAuthorization: Hawk id=\"dh37fgj492je\", ts=\"1353832234\", nonce=\"j4h3g2\", hash=\"Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=\", ext=\"some-app-ext-data\", mac=\"aSe1DERmZuRl3pI36/9BdZmnErTw3sNzOOAUlfeKjVw=\"\n```\n\nIt is up to the server if and when it validates the payload for any given request, based solely on it's security policy\nand the nature of the data included.\n\nIf the payload is available at the time of authentication, the server uses the hash value provided by the client to construct\nthe normalized string and validates the MAC. If the MAC is valid, the server calculates the payload hash and compares the value\nwith the provided payload hash in the header. In many cases, checking the MAC first is faster than calculating the payload hash.\n\nHowever, if the payload is not available at authentication time (e.g. too large to fit in memory, streamed elsewhere, or processed\nat a different stage in the application), the server may choose to defer payload validation for later by retaining the hash value\nprovided by the client after validating the MAC.\n\nIt is important to note that MAC validation does not mean the hash value provided by the client is valid, only that the value\nincluded in the header was not modified. Without calculating the payload hash on the server and comparing it to the value provided\nby the client, the payload may be modified by an attacker.\n\n\n## Response Payload Validation\n\n**Hawk** provides partial response payload validation. The server includes the `Server-Authorization` response header which enables the\nclient to authenticate the response and ensure it is talking to the right server. **Hawk** defines the HTTP `Server-Authorization` header\nas a response header using the exact same syntax as the `Authorization` request header field.\n\nThe header is contructed using the same process as the client's request header. The server uses the same credentials and other\nartifacts provided by the client to constructs the normalized request string. The `ext` and `hash` values are replaced with\nnew values based on the server response. The rest as identical to those used by the client.\n\nThe result MAC digest is included with the optional `hash` and `ext` values:\n\n```\nServer-Authorization: Hawk mac=\"XIJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=\", hash=\"f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=\", ext=\"response-specific\"\n```\n\n\n## Browser Support and Considerations\n\nA browser script is provided for including using a `<script>` tag in [lib/browser.js](/lib/browser.js).\n\n**Hawk** relies on the _Server-Authorization_ and _WWW-Authenticate_ headers in its response to communicate with the client.\nTherefore, in case of CORS requests, it is important to consider sending _Access-Control-Expose-Headers_ with the value\n_\"WWW-Authenticate, Server-Authorization\"_ on each response from your server. As explained in the\n[specifications](http://www.w3.org/TR/cors/#access-control-expose-headers-response-header), it will indicate that these headers\ncan safely be accessed by the client (using getResponseHeader() on the XmlHttpRequest object). Otherwise you will be met with a\n[\"simple response header\"](http://www.w3.org/TR/cors/#simple-response-header) which excludes these fields and would prevent the\nHawk client from authenticating the requests.You can read more about the why and how in this\n[article](http://www.html5rocks.com/en/tutorials/cors/#toc-adding-cors-support-to-the-server)\n\n\n# Single URI Authorization\n\nThere are cases in which limited and short-term access to a protected resource is granted to a third party which does not\nhave access to the shared credentials. For example, displaying a protected image on a web page accessed by anyone. **Hawk**\nprovides limited support for such URIs in the form of a _bewit_ - a URI query parameter appended to the request URI which contains\nthe necessary credentials to authenticate the request.\n\nBecause of the significant security risks involved in issuing such access, bewit usage is purposely limited only to GET requests\nand for a finite period of time. Both the client and server can issue bewit credentials, however, the server should not use the same\ncredentials as the client to maintain clear traceability as to who issued which credentials.\n\nIn order to simplify implementation, bewit credentials do not support single-use policy and can be replayed multiple times within\nthe granted access timeframe. \n\n\n## Bewit Usage Example\n\nServer code:\n\n```javascript\nvar Http = require('http');\nvar Hawk = require('hawk');\n\n\n// Credentials lookup function\n\nvar credentialsFunc = function (id, callback) {\n\n var credentials = {\n key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',\n algorithm: 'sha256'\n };\n\n return callback(null, credentials);\n};\n\n// Create HTTP server\n\nvar handler = function (req, res) {\n\n Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {\n\n res.writeHead(!err ? 200 : 401, { 'Content-Type': 'text/plain' });\n res.end(!err ? 'Access granted' : 'Shoosh!');\n });\n};\n\nHttp.createServer(handler).listen(8000, 'example.com');\n```\n\nBewit code generation:\n\n```javascript\nvar Request = require('request');\nvar Hawk = require('hawk');\n\n\n// Client credentials\n\nvar credentials = {\n id: 'dh37fgj492je',\n key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',\n algorithm: 'sha256'\n}\n\n// Generate bewit\n\nvar duration = 60 * 5; // 5 Minutes\nvar bewit = Hawk.uri.getBewit('http://example.com:8080/resource/1?b=1&a=2', { credentials: credentials, ttlSec: duration, ext: 'some-app-data' });\nvar uri = 'http://example.com:8000/resource/1?b=1&a=2' + '&bewit=' + bewit;\n```\n\n\n# Security Considerations\n\nThe greatest sources of security risks are usually found not in **Hawk** but in the policies and procedures surrounding its use.\nImplementers are strongly encouraged to assess how this module addresses their security requirements. This section includes\nan incomplete list of security considerations that must be reviewed and understood before deploying **Hawk** on the server.\nMany of the protections provided in **Hawk** depends on whether and how they are used.\n\n### MAC Keys Transmission\n\n**Hawk** does not provide any mechanism for obtaining or transmitting the set of shared credentials required. Any mechanism used\nto obtain **Hawk** credentials must ensure that these transmissions are protected using transport-layer mechanisms such as TLS.\n\n### Confidentiality of Requests\n\nWhile **Hawk** provides a mechanism for verifying the integrity of HTTP requests, it provides no guarantee of request\nconfidentiality. Unless other precautions are taken, eavesdroppers will have full access to the request content. Servers should\ncarefully consider the types of data likely to be sent as part of such requests, and employ transport-layer security mechanisms\nto protect sensitive resources.\n\n### Spoofing by Counterfeit Servers\n\n**Hawk** provides limited verification of the server authenticity. When receiving a response back from the server, the server\nmay choose to include a response `Server-Authorization` header which the client can use to verify the response. However, it is up to\nthe server to determine when such measure is included, to up to the client to enforce that policy.\n\nA hostile party could take advantage of this by intercepting the client's requests and returning misleading or otherwise\nincorrect responses. Service providers should consider such attacks when developing services using this protocol, and should\nrequire transport-layer security for any requests where the authenticity of the resource server or of server responses is an issue.\n\n### Plaintext Storage of Credentials\n\nThe **Hawk** key functions the same way passwords do in traditional authentication systems. In order to compute the request MAC,\nthe server must have access to the key in plaintext form. This is in contrast, for example, to modern operating systems, which\nstore only a one-way hash of user credentials.\n\nIf an attacker were to gain access to these keys - or worse, to the server's database of all such keys - he or she would be able\nto perform any action on behalf of any resource owner. Accordingly, it is critical that servers protect these keys from unauthorized\naccess.\n\n### Entropy of Keys\n\nUnless a transport-layer security protocol is used, eavesdroppers will have full access to authenticated requests and request\nMAC values, and will thus be able to mount offline brute-force attacks to recover the key used. Servers should be careful to\nassign keys which are long enough, and random enough, to resist such attacks for at least the length of time that the **Hawk**\ncredentials are valid.\n\nFor example, if the credentials are valid for two weeks, servers should ensure that it is not possible to mount a brute force\nattack that recovers the key in less than two weeks. Of course, servers are urged to err on the side of caution, and use the\nlongest key reasonable.\n\nIt is equally important that the pseudo-random number generator (PRNG) used to generate these keys be of sufficiently high\nquality. Many PRNG implementations generate number sequences that may appear to be random, but which nevertheless exhibit\npatterns or other weaknesses which make cryptanalysis or brute force attacks easier. Implementers should be careful to use\ncryptographically secure PRNGs to avoid these problems.\n\n### Coverage Limitations\n\nThe request MAC only covers the HTTP `Host` header and optionally the `Content-Type` header. It does not cover any other headers\nwhich can often affect how the request body is interpreted by the server. If the server behavior is influenced by the presence\nor value of such headers, an attacker can manipulate the request headers without being detected. Implementers should use the\n`ext` feature to pass application-specific information via the `Authorization` header which is protected by the request MAC.\n\nThe response authentication, when performed, only covers the response payload, content-type, and the request information \nprovided by the client in it's request (method, resource, timestamp, nonce, etc.). It does not cover the HTTP status code or\nany other response header field (e.g. Location) which can affect the client's behaviour.\n\n### Future Time Manipulation\n\nThe protocol relies on a clock sync between the client and server. To accomplish this, the server informs the client of its\ncurrent time when an invalid timestamp is received.\n\nIf an attacker is able to manipulate this information and cause the client to use an incorrect time, it would be able to cause\nthe client to generate authenticated requests using time in the future. Such requests will fail when sent by the client, and will\nnot likely leave a trace on the server (given the common implementation of nonce, if at all enforced). The attacker will then\nbe able to replay the request at the correct time without detection.\n\nThe client must only use the time information provided by the server if:\n* it was delivered over a TLS connection and the server identity has been verified, or\n* the `tsm` MAC digest calculated using the same client credentials over the timestamp has been verified.\n\n### Client Clock Poisoning\n\nWhen receiving a request with a bad timestamp, the server provides the client with its current time. The client must never use\nthe time received from the server to adjust its own clock, and must only use it to calculate an offset for communicating with\nthat particular server.\n\n### Bewit Limitations\n\nSpecial care must be taken when issuing bewit credentials to third parties. Bewit credentials are valid until expiration and cannot\nbe revoked or limited without using other means. Whatever resource they grant access to will be completely exposed to anyone with\naccess to the bewit credentials which act as bearer credentials for that particular resource. While bewit usage is limited to GET\nrequests only and therefore cannot be used to perform transactions or change server state, it can still be used to expose private\nand sensitive information.\n\n### Host Header Forgery\n\nHawk validates the incoming request MAC against the incoming HTTP Host header. However, unless the optional `host` and `port`\noptions are used with `server.authenticate()`, a malicous client can mint new host names pointing to the server's IP address and\nuse that to craft an attack by sending a valid request that's meant for another hostname than the one used by the server. Server\nimplementors must manually verify that the host header received matches their expectation (or use the options mentioned above).\n\n# Frequently Asked Questions\n\n### Where is the protocol specification?\n\nIf you are looking for some prose explaining how all this works, **this is it**. **Hawk** is being developed as an open source\nproject instead of a standard. In other words, the [code](/hueniverse/hawk/tree/master/lib) is the specification. Not sure about\nsomething? Open an issue!\n\n### Is it done?\n\nAt if version 0.10.0, **Hawk** is feature-complete. However, until this module reaches version 1.0.0 it is considered experimental\nand is likely to change. This also means your feedback and contribution are very welcome. Feel free to open issues with questions\nand suggestions.\n\n### Where can I find **Hawk** implementations in other languages?\n\n**Hawk**'s only reference implementation is provided in JavaScript as a node.js module. However, others are actively porting it to other\nplatforms. There is already a [PHP](https://github.com/alexbilbie/PHP-Hawk),\n[.NET](https://github.com/pcibraro/hawknet), and [JAVA](https://github.com/wealdtech/hawk) libraries available. The full list\nis maintained [here](https://github.com/hueniverse/hawk/issues?labels=port). Please add an issue if you are working on another\nport. A cross-platform test-suite is in the works.\n\n### Why isn't the algorithm part of the challenge or dynamically negotiated?\n\nThe algorithm used is closely related to the key issued as different algorithms require different key sizes (and other\nrequirements). While some keys can be used for multiple algorithm, the protocol is designed to closely bind the key and algorithm\ntogether as part of the issued credentials.\n\n### Why is Host and Content-Type the only headers covered by the request MAC?\n\nIt is really hard to include other headers. Headers can be changed by proxies and other intermediaries and there is no\nwell-established way to normalize them. Many platforms change the case of header field names and values. The only\nstraight-forward solution is to include the headers in some blob (say, base64 encoded JSON) and include that with the request,\nan approach taken by JWT and other such formats. However, that design violates the HTTP header boundaries, repeats information,\nand introduces other security issues because firewalls will not be aware of these \"hidden\" headers. In addition, any information\nrepeated must be compared to the duplicated information in the header and therefore only moves the problem elsewhere.\n\n### Why not just use HTTP Digest?\n\nDigest requires pre-negotiation to establish a nonce. This means you can't just make a request - you must first send\na protocol handshake to the server. This pattern has become unacceptable for most web services, especially mobile\nwhere extra round-trip are costly.\n\n### Why bother with all this nonce and timestamp business?\n\n**Hawk** is an attempt to find a reasonable, practical compromise between security and usability. OAuth 1.0 got timestamp\nand nonces halfway right but failed when it came to scalability and consistent developer experience. **Hawk** addresses\nit by requiring the client to sync its clock, but provides it with tools to accomplish it.\n\nIn general, replay protection is a matter of application-specific threat model. It is less of an issue on a TLS-protected\nsystem where the clients are implemented using best practices and are under the control of the server. Instead of dropping\nreplay protection, **Hawk** offers a required time window and an optional nonce verification. Together, it provides developers\nwith the ability to decide how to enforce their security policy without impacting the client's implementation.\n\n### What are `app` and `dlg` in the authorization header and normalized mac string?\n\nThe original motivation for **Hawk** was to replace the OAuth 1.0 use cases. This included both a simple client-server mode which\nthis module is specifically designed for, and a delegated access mode which is being developed separately in\n[Oz](https://github.com/hueniverse/oz). In addition to the **Hawk** use cases, Oz requires another attribute: the application id `app`.\nThis provides binding between the credentials and the application in a way that prevents an attacker from tricking an application\nto use credentials issued to someone else. It also has an optional 'delegated-by' attribute `dlg` which is the application id of the\napplication the credentials were directly issued to. The goal of these two additions is to allow Oz to utilize **Hawk** directly,\nbut with the additional security of delegated credentials.\n\n### What is the purpose of the static strings used in each normalized MAC input?\n\nWhen calculating a hash or MAC, a static prefix (tag) is added. The prefix is used to prevent MAC values from being\nused or reused for a purpose other than what they were created for (i.e. prevents switching MAC values between a request,\nresponse, and a bewit use cases). It also protects against expliots created after a potential change in how the protocol\ncreates the normalized string. For example, if a future version would switch the order of nonce and timestamp, it\ncan create an exploit opportunity for cases where the nonce is similar in format to a timestamp.\n\n### Does **Hawk** have anything to do with OAuth?\n\nShort answer: no.\n\n**Hawk** was originally proposed as the OAuth MAC Token specification. However, the OAuth working group in its consistent\nincompetence failed to produce a final, usable solution to address one of the most popular use cases of OAuth 1.0 - using it\nto authenticate simple client-server transactions (i.e. two-legged). As you can guess, the OAuth working group is still hard\nat work to produce more garbage.\n\n**Hawk** provides a simple HTTP authentication scheme for making client-server requests. It does not address the OAuth use case\nof delegating access to a third party. If you are looking for an OAuth alternative, check out [Oz](https://github.com/hueniverse/oz).\n\n\n# Acknowledgements\n\n**Hawk** is a derivative work of the [HTTP MAC Authentication Scheme](http://tools.ietf.org/html/draft-hammer-oauth-v2-mac-token-05) proposal\nco-authored by Ben Adida, Adam Barth, and Eran Hammer, which in turn was based on the OAuth 1.0 community specification.\n\nSpecial thanks to Ben Laurie for his always insightful feedback and advice.\n\nThe **Hawk** logo was created by [Chris Carrasco](http://chriscarrasco.com).\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/hueniverse/hawk/issues" - }, - "homepage": "https://github.com/hueniverse/hawk", - "_id": "hawk@1.0.0", - "dist": { - "shasum": "54a49d24842997b48ab16d30e69195e4a574149b" - }, - "_from": "hawk@~1.0.0", - "_resolved": "https://registry.npmjs.org/hawk/-/hawk-1.0.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/browser.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/browser.js deleted file mode 100755 index b25a10fd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/browser.js +++ /dev/null @@ -1,771 +0,0 @@ -// Load modules - -var Lab = require('lab'); -var Hoek = require('hoek'); -var Hawk = require('../lib'); -var Browser = require('../lib/browser'); -var LocalStorage = require('localStorage'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Browser', function () { - - var credentialsFunc = function (id, callback) { - - var credentials = { - id: id, - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: (id === '1' ? 'sha1' : 'sha256'), - user: 'steve' - }; - - return callback(null, credentials); - }; - - it('should generate a header then successfully parse it (configuration)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' }).field; - expect(req.authorization).to.exist; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (node request)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com:8080', - 'content-type': 'text/plain;x=y' - } - }; - - var payload = 'some not so random text'; - - credentialsFunc('123456', function (err, credentials) { - - var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] }); - req.headers.authorization = reqHeader.field; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true); - - var res = { - headers: { - 'content-type': 'text/plain' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' }); - expect(res.headers['server-authorization']).to.exist; - - expect(Browser.client.authenticate(res, credentials, artifacts, { payload: 'some reply' })).to.equal(true); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (no server header options)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com:8080', - 'content-type': 'text/plain;x=y' - } - }; - - var payload = 'some not so random text'; - - credentialsFunc('123456', function (err, credentials) { - - var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] }); - req.headers.authorization = reqHeader.field; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true); - - var res = { - headers: { - 'content-type': 'text/plain' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts); - expect(res.headers['server-authorization']).to.exist; - - expect(Browser.client.authenticate(res, credentials, artifacts)).to.equal(true); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (no server header)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com:8080', - 'content-type': 'text/plain;x=y' - } - }; - - var payload = 'some not so random text'; - - credentialsFunc('123456', function (err, credentials) { - - var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] }); - req.headers.authorization = reqHeader.field; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true); - - var res = { - headers: { - 'content-type': 'text/plain' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - expect(Browser.client.authenticate(res, credentials, artifacts)).to.equal(true); - done(); - }); - }); - }); - - it('should generate a header with stale ts and successfully authenticate on second call', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - Browser.utils.setNtpOffset(60 * 60 * 1000); - var header = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' }); - req.authorization = header.field; - expect(req.authorization).to.exist; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.message).to.equal('Stale timestamp'); - - var res = { - headers: { - 'www-authenticate': err.response.headers['WWW-Authenticate'] - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - expect(Browser.utils.getNtpOffset()).to.equal(60 * 60 * 1000); - expect(Browser.client.authenticate(res, credentials, header.artifacts)).to.equal(true); - expect(Browser.utils.getNtpOffset()).to.equal(0); - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' }).field; - expect(req.authorization).to.exist; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - done(); - }); - }); - }); - }); - - it('should generate a header with stale ts and successfully authenticate on second call (manual localStorage)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - Browser.utils.setStorage(LocalStorage) - - Browser.utils.setNtpOffset(60 * 60 * 1000); - var header = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' }); - req.authorization = header.field; - expect(req.authorization).to.exist; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.message).to.equal('Stale timestamp'); - - var res = { - headers: { - 'www-authenticate': err.response.headers['WWW-Authenticate'] - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - expect(parseInt(LocalStorage.getItem('hawk_ntp_offset'))).to.equal(60 * 60 * 1000); - expect(Browser.utils.getNtpOffset()).to.equal(60 * 60 * 1000); - expect(Browser.client.authenticate(res, credentials, header.artifacts)).to.equal(true); - expect(Browser.utils.getNtpOffset()).to.equal(0); - expect(parseInt(LocalStorage.getItem('hawk_ntp_offset'))).to.equal(0); - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' }).field; - expect(req.authorization).to.exist; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - done(); - }); - }); - }); - }); - - it('should generate a header then fails to parse it (missing server header hash)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com:8080', - 'content-type': 'text/plain;x=y' - } - }; - - var payload = 'some not so random text'; - - credentialsFunc('123456', function (err, credentials) { - - var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] }); - req.headers.authorization = reqHeader.field; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true); - - var res = { - headers: { - 'content-type': 'text/plain' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts); - expect(res.headers['server-authorization']).to.exist; - - expect(Browser.client.authenticate(res, credentials, artifacts, { payload: 'some reply' })).to.equal(false); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (with hash)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field; - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it then validate payload', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field; - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload('hola!', credentials, artifacts)).to.be.true; - expect(Hawk.server.authenticatePayload('hello!', credentials, artifacts)).to.be.false; - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (app)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', app: 'asd23ased' }).field; - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(artifacts.app).to.equal('asd23ased'); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (app, dlg)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', app: 'asd23ased', dlg: '23434szr3q4d' }).field; - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(artifacts.app).to.equal('asd23ased'); - expect(artifacts.dlg).to.equal('23434szr3q4d'); - done(); - }); - }); - }); - - it('should generate a header then fail authentication due to bad hash', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field; - Hawk.server.authenticate(req, credentialsFunc, { payload: 'byebye!' }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Bad payload hash'); - done(); - }); - }); - }); - - it('should generate a header for one resource then fail to authenticate another', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' }).field; - req.url = '/something/else'; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(credentials).to.exist; - done(); - }); - }); - }); - - describe('client', function () { - - describe('#header', function () { - - it('should return a valid authorization header (sha1)', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'sha1' - }; - - var header = Browser.client.header('http://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about' }).field; - expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="bsvY3IfUllw6V5rvk4tStEvpBhE=", ext="Bazinga!", mac="qbf1ZPG/r/e06F4ht+T77LXi5vw="'); - done(); - }); - - it('should return a valid authorization header (sha256)', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'sha256' - }; - - var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field; - expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", ext="Bazinga!", mac="q1CwFoSHzPZSkbIvl0oYlD+91rBUEvFk763nMjMndj8="'); - done(); - }); - - it('should return a valid authorization header (no ext)', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'sha256' - }; - - var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field; - expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="'); - done(); - }); - - it('should return an empty authorization header on missing options', function (done) { - - var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST').field; - expect(header).to.equal(''); - done(); - }); - - it('should return an empty authorization header on invalid credentials', function (done) { - - var credentials = { - key: '2983d45yun89q', - algorithm: 'sha256' - }; - - var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207 }).field; - expect(header).to.equal(''); - done(); - }); - - it('should return an empty authorization header on invalid algorithm', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'hmac-sha-0' - }; - - var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, payload: 'something, anything!', ext: 'Bazinga!', timestamp: 1353809207 }).field; - expect(header).to.equal(''); - done(); - }); - }); - - describe('#authenticate', function () { - - it('should return false on invalid header', function (done) { - - var res = { - headers: { - 'server-authorization': 'Hawk mac="abc", bad="xyz"' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - expect(Browser.client.authenticate(res, {})).to.equal(false); - done(); - }); - - it('should return false on invalid mac', function (done) { - - var res = { - headers: { - 'content-type': 'text/plain', - 'server-authorization': 'Hawk mac="_IJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - var artifacts = { - method: 'POST', - host: 'example.com', - port: '8080', - resource: '/resource/4?filter=a', - ts: '1362336900', - nonce: 'eb5S_L', - hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=', - ext: 'some-app-data', - app: undefined, - dlg: undefined, - mac: 'BlmSe8K+pbKIb6YsZCnt4E1GrYvY1AaYayNR82dGpIk=', - id: '123456' - }; - - var credentials = { - id: '123456', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'steve' - }; - - expect(Browser.client.authenticate(res, credentials, artifacts)).to.equal(false); - done(); - }); - - it('should return true on ignoring hash', function (done) { - - var res = { - headers: { - 'content-type': 'text/plain', - 'server-authorization': 'Hawk mac="XIJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - var artifacts = { - method: 'POST', - host: 'example.com', - port: '8080', - resource: '/resource/4?filter=a', - ts: '1362336900', - nonce: 'eb5S_L', - hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=', - ext: 'some-app-data', - app: undefined, - dlg: undefined, - mac: 'BlmSe8K+pbKIb6YsZCnt4E1GrYvY1AaYayNR82dGpIk=', - id: '123456' - }; - - var credentials = { - id: '123456', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'steve' - }; - - expect(Browser.client.authenticate(res, credentials, artifacts)).to.equal(true); - done(); - }); - - it('should fail on invalid WWW-Authenticate header format', function (done) { - - var res = { - headers: { - 'www-authenticate': 'Hawk ts="1362346425875", tsm="PhwayS28vtnn3qbv0mqRBYSXebN/zggEtucfeZ620Zo=", x="Stale timestamp"' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - expect(Browser.client.authenticate(res, {})).to.equal(false); - done(); - }); - - it('should fail on invalid WWW-Authenticate header format', function (done) { - - var credentials = { - id: '123456', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'steve' - }; - - var res = { - headers: { - 'www-authenticate': 'Hawk ts="1362346425875", tsm="hwayS28vtnn3qbv0mqRBYSXebN/zggEtucfeZ620Zo=", error="Stale timestamp"' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - expect(Browser.client.authenticate(res, credentials)).to.equal(false); - done(); - }); - }); - - describe('#message', function () { - it('should generate an authorization then successfully parse it', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - done(); - }); - }); - }); - - it('should fail on missing host', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Browser.client.message(null, 8080, 'some message', { credentials: credentials }); - expect(auth).to.not.exist; - done(); - }); - }); - - it('should fail on missing credentials', function (done) { - - var auth = Browser.client.message('example.com', 8080, 'some message', {}); - expect(auth).to.not.exist; - done(); - }); - - it('should fail on invalid algorithm', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var creds = Hoek.clone(credentials); - creds.algorithm = 'blah'; - var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: creds }); - expect(auth).to.not.exist; - done(); - }); - }); - }); - }); - - describe('#parseAuthorizationHeader', function (done) { - - it('returns null on missing header', function (done) { - - expect(Browser.utils.parseAuthorizationHeader()).to.equal(null); - done(); - }); - - it('returns null on bad header syntax (structure)', function (done) { - - expect(Browser.utils.parseAuthorizationHeader('Hawk')).to.equal(null); - done(); - }); - - it('returns null on bad header syntax (parts)', function (done) { - - expect(Browser.utils.parseAuthorizationHeader(' ')).to.equal(null); - done(); - }); - - it('returns null on bad scheme name', function (done) { - - expect(Browser.utils.parseAuthorizationHeader('Basic asdasd')).to.equal(null); - done(); - }); - - it('returns null on bad attribute value', function (done) { - - expect(Browser.utils.parseAuthorizationHeader('Hawk test="\t"', ['test'])).to.equal(null); - done(); - }); - - it('returns null on duplicated attribute', function (done) { - - expect(Browser.utils.parseAuthorizationHeader('Hawk test="a", test="b"', ['test'])).to.equal(null); - done(); - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/client.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/client.js deleted file mode 100755 index bcc4222a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/client.js +++ /dev/null @@ -1,206 +0,0 @@ -// Load modules - -var Url = require('url'); -var Lab = require('lab'); -var Hawk = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hawk', function () { - - describe('client', function () { - - describe('#header', function () { - - it('should return a valid authorization header (sha1)', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'sha1' - }; - - var header = Hawk.client.header('http://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about' }).field; - expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="bsvY3IfUllw6V5rvk4tStEvpBhE=", ext="Bazinga!", mac="qbf1ZPG/r/e06F4ht+T77LXi5vw="'); - done(); - }); - - it('should return a valid authorization header (sha256)', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'sha256' - }; - - var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field; - expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", ext="Bazinga!", mac="q1CwFoSHzPZSkbIvl0oYlD+91rBUEvFk763nMjMndj8="'); - done(); - }); - - it('should return a valid authorization header (no ext)', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'sha256' - }; - - var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field; - expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="'); - done(); - }); - - it('should return an empty authorization header on missing options', function (done) { - - var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST').field; - expect(header).to.equal(''); - done(); - }); - - it('should return an empty authorization header on invalid credentials', function (done) { - - var credentials = { - key: '2983d45yun89q', - algorithm: 'sha256' - }; - - var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207 }).field; - expect(header).to.equal(''); - done(); - }); - - it('should return an empty authorization header on invalid algorithm', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'hmac-sha-0' - }; - - var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, payload: 'something, anything!', ext: 'Bazinga!', timestamp: 1353809207 }).field; - expect(header).to.equal(''); - done(); - }); - }); - - describe('#authenticate', function () { - - it('should return false on invalid header', function (done) { - - var res = { - headers: { - 'server-authorization': 'Hawk mac="abc", bad="xyz"' - } - }; - - expect(Hawk.client.authenticate(res, {})).to.equal(false); - done(); - }); - - it('should return false on invalid mac', function (done) { - - var res = { - headers: { - 'content-type': 'text/plain', - 'server-authorization': 'Hawk mac="_IJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"' - } - }; - - var artifacts = { - method: 'POST', - host: 'example.com', - port: '8080', - resource: '/resource/4?filter=a', - ts: '1362336900', - nonce: 'eb5S_L', - hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=', - ext: 'some-app-data', - app: undefined, - dlg: undefined, - mac: 'BlmSe8K+pbKIb6YsZCnt4E1GrYvY1AaYayNR82dGpIk=', - id: '123456' - }; - - var credentials = { - id: '123456', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'steve' - }; - - expect(Hawk.client.authenticate(res, credentials, artifacts)).to.equal(false); - done(); - }); - - it('should return true on ignoring hash', function (done) { - - var res = { - headers: { - 'content-type': 'text/plain', - 'server-authorization': 'Hawk mac="XIJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"' - } - }; - - var artifacts = { - method: 'POST', - host: 'example.com', - port: '8080', - resource: '/resource/4?filter=a', - ts: '1362336900', - nonce: 'eb5S_L', - hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=', - ext: 'some-app-data', - app: undefined, - dlg: undefined, - mac: 'BlmSe8K+pbKIb6YsZCnt4E1GrYvY1AaYayNR82dGpIk=', - id: '123456' - }; - - var credentials = { - id: '123456', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'steve' - }; - - expect(Hawk.client.authenticate(res, credentials, artifacts)).to.equal(true); - done(); - }); - - it('should fail on invalid WWW-Authenticate header format', function (done) { - - var header = 'Hawk ts="1362346425875", tsm="PhwayS28vtnn3qbv0mqRBYSXebN/zggEtucfeZ620Zo=", x="Stale timestamp"'; - expect(Hawk.client.authenticate({ headers: { 'www-authenticate': header } }, {})).to.equal(false); - done(); - }); - - it('should fail on invalid WWW-Authenticate header format', function (done) { - - var credentials = { - id: '123456', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'steve' - }; - - var header = 'Hawk ts="1362346425875", tsm="hwayS28vtnn3qbv0mqRBYSXebN/zggEtucfeZ620Zo=", error="Stale timestamp"'; - expect(Hawk.client.authenticate({ headers: { 'www-authenticate': header } }, credentials)).to.equal(false); - done(); - }); - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/crypto.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/crypto.js deleted file mode 100755 index b62c2177..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/crypto.js +++ /dev/null @@ -1,86 +0,0 @@ -// Load modules - -var Lab = require('lab'); -var Hawk = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hawk', function () { - - describe('Crypto', function () { - - describe('#generateNormalizedString', function () { - - it('should return a valid normalized string', function (done) { - - expect(Hawk.crypto.generateNormalizedString('header', { - credentials: { - key: 'dasdfasdf', - algorithm: 'sha256' - }, - ts: 1357747017, - nonce: 'k3k4j5', - method: 'GET', - resource: '/resource/something', - host: 'example.com', - port: 8080 - })).to.equal('hawk.1.header\n1357747017\nk3k4j5\nGET\n/resource/something\nexample.com\n8080\n\n\n'); - - done(); - }); - - it('should return a valid normalized string (ext)', function (done) { - - expect(Hawk.crypto.generateNormalizedString('header', { - credentials: { - key: 'dasdfasdf', - algorithm: 'sha256' - }, - ts: 1357747017, - nonce: 'k3k4j5', - method: 'GET', - resource: '/resource/something', - host: 'example.com', - port: 8080, - ext: 'this is some app data' - })).to.equal('hawk.1.header\n1357747017\nk3k4j5\nGET\n/resource/something\nexample.com\n8080\n\nthis is some app data\n'); - - done(); - }); - - it('should return a valid normalized string (payload + ext)', function (done) { - - expect(Hawk.crypto.generateNormalizedString('header', { - credentials: { - key: 'dasdfasdf', - algorithm: 'sha256' - }, - ts: 1357747017, - nonce: 'k3k4j5', - method: 'GET', - resource: '/resource/something', - host: 'example.com', - port: 8080, - hash: 'U4MKKSmiVxk37JCCrAVIjV/OhB3y+NdwoCr6RShbVkE=', - ext: 'this is some app data' - })).to.equal('hawk.1.header\n1357747017\nk3k4j5\nGET\n/resource/something\nexample.com\n8080\nU4MKKSmiVxk37JCCrAVIjV/OhB3y+NdwoCr6RShbVkE=\nthis is some app data\n'); - - done(); - }); - }); - }); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/index.js deleted file mode 100755 index ba837388..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/index.js +++ /dev/null @@ -1,316 +0,0 @@ -// Load modules - -var Url = require('url'); -var Lab = require('lab'); -var Hawk = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hawk', function () { - - var credentialsFunc = function (id, callback) { - - var credentials = { - id: id, - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: (id === '1' ? 'sha1' : 'sha256'), - user: 'steve' - }; - - return callback(null, credentials); - }; - - it('should generate a header then successfully parse it (configuration)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Hawk.client.header(Url.parse('http://example.com:8080/resource/4?filter=a'), req.method, { credentials: credentials, ext: 'some-app-data' }).field; - expect(req.authorization).to.exist; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (node request)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com:8080', - 'content-type': 'text/plain;x=y' - } - }; - - var payload = 'some not so random text'; - - credentialsFunc('123456', function (err, credentials) { - - var reqHeader = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] }); - req.headers.authorization = reqHeader.field; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true); - - var res = { - headers: { - 'content-type': 'text/plain' - } - }; - - res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' }); - expect(res.headers['server-authorization']).to.exist; - - expect(Hawk.client.authenticate(res, credentials, artifacts, { payload: 'some reply' })).to.equal(true); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (no server header options)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com:8080', - 'content-type': 'text/plain;x=y' - } - }; - - var payload = 'some not so random text'; - - credentialsFunc('123456', function (err, credentials) { - - var reqHeader = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] }); - req.headers.authorization = reqHeader.field; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true); - - var res = { - headers: { - 'content-type': 'text/plain' - } - }; - - res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts); - expect(res.headers['server-authorization']).to.exist; - - expect(Hawk.client.authenticate(res, credentials, artifacts)).to.equal(true); - done(); - }); - }); - }); - - it('should generate a header then fails to parse it (missing server header hash)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com:8080', - 'content-type': 'text/plain;x=y' - } - }; - - var payload = 'some not so random text'; - - credentialsFunc('123456', function (err, credentials) { - - var reqHeader = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] }); - req.headers.authorization = reqHeader.field; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true); - - var res = { - headers: { - 'content-type': 'text/plain' - } - }; - - res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts); - expect(res.headers['server-authorization']).to.exist; - - expect(Hawk.client.authenticate(res, credentials, artifacts, { payload: 'some reply' })).to.equal(false); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (with hash)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field; - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it then validate payload', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field; - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload('hola!', credentials, artifacts)).to.be.true; - expect(Hawk.server.authenticatePayload('hello!', credentials, artifacts)).to.be.false; - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (app)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', app: 'asd23ased' }).field; - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(artifacts.app).to.equal('asd23ased'); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (app, dlg)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', app: 'asd23ased', dlg: '23434szr3q4d' }).field; - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(artifacts.app).to.equal('asd23ased'); - expect(artifacts.dlg).to.equal('23434szr3q4d'); - done(); - }); - }); - }); - - it('should generate a header then fail authentication due to bad hash', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field; - Hawk.server.authenticate(req, credentialsFunc, { payload: 'byebye!' }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Bad payload hash'); - done(); - }); - }); - }); - - it('should generate a header for one resource then fail to authenticate another', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' }).field; - req.url = '/something/else'; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(credentials).to.exist; - done(); - }); - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/message.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/message.js deleted file mode 100755 index 04b91d41..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/message.js +++ /dev/null @@ -1,246 +0,0 @@ -// Load modules - -var Url = require('url'); -var Lab = require('lab'); -var Hoek = require('hoek'); -var Hawk = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hawk', function () { - - var credentialsFunc = function (id, callback) { - - var credentials = { - id: id, - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: (id === '1' ? 'sha1' : 'sha256'), - user: 'steve' - }; - - return callback(null, credentials); - }; - - it('should generate an authorization then successfully parse it', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - done(); - }); - }); - }); - - it('should fail authorization on mismatching host', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - Hawk.server.authenticateMessage('example1.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('Bad mac'); - done(); - }); - }); - }); - - it('should fail authorization on stale timestamp', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, { localtimeOffsetMsec: 100000 }, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('Stale timestamp'); - done(); - }); - }); - }); - - it('should fail authorization on invalid authorization', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - delete auth.id; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('Invalid authorization'); - done(); - }); - }); - }); - - it('should fail authorization on bad hash', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message1', auth, credentialsFunc, {}, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('Bad message hash'); - done(); - }); - }); - }); - - it('should fail authorization on nonce error', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, { nonceFunc: function (nonce, ts, callback) { callback (new Error('kaboom')); } }, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('Invalid nonce'); - done(); - }); - }); - }); - - it('should fail authorization on credentials error', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - var errFunc = function (id, callback) { - - callback(new Error('kablooey')); - }; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('kablooey'); - done(); - }); - }); - }); - - it('should fail authorization on missing credentials', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - var errFunc = function (id, callback) { - - callback(); - }; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('Unknown credentials'); - done(); - }); - }); - }); - - it('should fail authorization on invalid credentials', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - var errFunc = function (id, callback) { - - callback(null, {}); - }; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('Invalid credentials'); - done(); - }); - }); - }); - - it('should fail authorization on invalid credentials algorithm', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - var errFunc = function (id, callback) { - - callback(null, { key: '123', algorithm: '456' }); - }; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('Unknown algorithm'); - done(); - }); - }); - }); - - it('should fail on missing host', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message(null, 8080, 'some message', { credentials: credentials }); - expect(auth).to.not.exist; - done(); - }); - }); - - it('should fail on missing credentials', function (done) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', {}); - expect(auth).to.not.exist; - done(); - }); - - it('should fail on invalid algorithm', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var creds = Hoek.clone(credentials); - creds.algorithm = 'blah'; - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: creds }); - expect(auth).to.not.exist; - done(); - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/readme.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/readme.js deleted file mode 100755 index f39e033d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/readme.js +++ /dev/null @@ -1,98 +0,0 @@ -// Load modules - -var Lab = require('lab'); -var Hoek = require('hoek'); -var Hawk = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hawk', function () { - - describe('README', function () { - - describe('core', function () { - - var credentials = { - id: 'dh37fgj492je', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256' - }; - - var options = { - credentials: credentials, - timestamp: 1353832234, - nonce: 'j4h3g2', - ext: 'some-app-ext-data' - }; - - it('should generate a header protocol example', function (done) { - - var header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'GET', options).field; - - expect(header).to.equal('Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", ext="some-app-ext-data", mac="6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE="'); - done(); - }); - - it('should generate a normalized string protocol example', function (done) { - - var normalized = Hawk.crypto.generateNormalizedString('header', { - credentials: credentials, - ts: options.timestamp, - nonce: options.nonce, - method: 'GET', - resource: '/resource?a=1&b=2', - host: 'example.com', - port: 8000, - ext: options.ext - }); - - expect(normalized).to.equal('hawk.1.header\n1353832234\nj4h3g2\nGET\n/resource?a=1&b=2\nexample.com\n8000\n\nsome-app-ext-data\n'); - done(); - }); - - var payloadOptions = Hoek.clone(options); - payloadOptions.payload = 'Thank you for flying Hawk'; - payloadOptions.contentType = 'text/plain'; - - it('should generate a header protocol example (with payload)', function (done) { - - var header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'POST', payloadOptions).field; - - expect(header).to.equal('Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", hash="Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=", ext="some-app-ext-data", mac="aSe1DERmZuRl3pI36/9BdZmnErTw3sNzOOAUlfeKjVw="'); - done(); - }); - - it('should generate a normalized string protocol example (with payload)', function (done) { - - var normalized = Hawk.crypto.generateNormalizedString('header', { - credentials: credentials, - ts: options.timestamp, - nonce: options.nonce, - method: 'POST', - resource: '/resource?a=1&b=2', - host: 'example.com', - port: 8000, - hash: Hawk.crypto.calculatePayloadHash(payloadOptions.payload, credentials.algorithm, payloadOptions.contentType), - ext: options.ext - }); - - expect(normalized).to.equal('hawk.1.header\n1353832234\nj4h3g2\nPOST\n/resource?a=1&b=2\nexample.com\n8000\nYi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=\nsome-app-ext-data\n'); - done(); - }); - }); - }); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/server.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/server.js deleted file mode 100755 index 3e92427a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/server.js +++ /dev/null @@ -1,686 +0,0 @@ -// Load modules - -var Url = require('url'); -var Lab = require('lab'); -var Hawk = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hawk', function () { - - describe('server', function () { - - var credentialsFunc = function (id, callback) { - - var credentials = { - id: id, - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: (id === '1' ? 'sha1' : 'sha256'), - user: 'steve' - }; - - return callback(null, credentials); - }; - - describe('#authenticate', function () { - - it('should parse a valid authentication header (sha1)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="1", ts="1353788437", nonce="k3j4h2", mac="zy79QQ5/EYFmQqutVnYb73gAc/U=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - done(); - }); - }); - - it('should parse a valid authentication header (sha256)', function (done) { - - var req = { - method: 'GET', - url: '/resource/1?b=1&a=2', - host: 'example.com', - port: 8000, - authorization: 'Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", mac="m8r1rHbXN6NgO+KIIhjO7sFRyd78RNGVUwehe8Cp2dU=", ext="some-app-data"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353832234000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - done(); - }); - }); - - it('should parse a valid authentication header (host override)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - headers: { - host: 'example1.com:8080', - authorization: 'Hawk id="1", ts="1353788437", nonce="k3j4h2", mac="zy79QQ5/EYFmQqutVnYb73gAc/U=", ext="hello"' - } - }; - - Hawk.server.authenticate(req, credentialsFunc, { host: 'example.com', localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - done(); - }); - }); - - it('should parse a valid authentication header (host port override)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - headers: { - host: 'example1.com:80', - authorization: 'Hawk id="1", ts="1353788437", nonce="k3j4h2", mac="zy79QQ5/EYFmQqutVnYb73gAc/U=", ext="hello"' - } - }; - - Hawk.server.authenticate(req, credentialsFunc, { host: 'example.com', port: 8080, localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - done(); - }); - }); - - it('should parse a valid authentication header (POST with payload)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123456", ts="1357926341", nonce="1AwuJD", hash="qAiXIVv+yjDATneWxZP2YCTa9aHRgQdnH9b3Wc+o3dg=", ext="some-app-data", mac="UeYcj5UoTVaAWXNvJfLVia7kU3VabxCqrccXP8sUGC4="' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1357926341000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - done(); - }); - }); - - it('should fail on missing hash', function (done) { - - var req = { - method: 'GET', - url: '/resource/1?b=1&a=2', - host: 'example.com', - port: 8000, - authorization: 'Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", mac="m8r1rHbXN6NgO+KIIhjO7sFRyd78RNGVUwehe8Cp2dU=", ext="some-app-data"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { payload: 'body', localtimeOffsetMsec: 1353832234000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Missing required payload hash'); - done(); - }); - }); - - it('should fail on a stale timestamp', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123456", ts="1362337299", nonce="UzmxSs", ext="some-app-data", mac="wnNUxchvvryMH2RxckTdZ/gY3ijzvccx4keVvELC61w="' - }; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Stale timestamp'); - var header = err.response.headers['WWW-Authenticate']; - var ts = header.match(/^Hawk ts\=\"(\d+)\"\, tsm\=\"([^\"]+)\"\, error=\"Stale timestamp\"$/); - var now = Hawk.utils.now(); - expect(parseInt(ts[1], 10) * 1000).to.be.within(now - 1000, now + 1000); - - var res = { - headers: { - 'www-authenticate': header - } - }; - - expect(Hawk.client.authenticate(res, credentials, artifacts)).to.equal(true); - done(); - }); - }); - - it('should fail on a replay', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="bXx7a7p1h9QYQNZ8x7QhvDQym8ACgab4m3lVSFn4DBw=", ext="hello"' - }; - - var memoryCache = {}; - var options = { - localtimeOffsetMsec: 1353788437000 - Hawk.utils.now(), - nonceFunc: function (nonce, ts, callback) { - - if (memoryCache[nonce]) { - return callback(new Error()); - } - - memoryCache[nonce] = true; - return callback(); - } - }; - - Hawk.server.authenticate(req, credentialsFunc, options, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - - Hawk.server.authenticate(req, credentialsFunc, options, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid nonce'); - done(); - }); - }); - }); - - it('should fail on an invalid authentication header: wrong scheme', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Basic asdasdasdasd' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.not.exist; - done(); - }); - }); - - it('should fail on an invalid authentication header: no scheme', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: '!@#' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid header syntax'); - done(); - }); - }); - - it('should fail on an missing authorization header', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.isMissing).to.equal(true); - done(); - }); - }); - - it('should fail on an missing host header', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - headers: { - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - } - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid Host header'); - done(); - }); - }); - - it('should fail on an missing authorization attribute (id)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Missing attributes'); - done(); - }); - }); - - it('should fail on an missing authorization attribute (ts)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Missing attributes'); - done(); - }); - }); - - it('should fail on an missing authorization attribute (nonce)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Missing attributes'); - done(); - }); - }); - - it('should fail on an missing authorization attribute (mac)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Missing attributes'); - done(); - }); - }); - - it('should fail on an unknown authorization attribute', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", x="3", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Unknown attribute: x'); - done(); - }); - }); - - it('should fail on an bad authorization header format', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123\\", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Bad header format'); - done(); - }); - }); - - it('should fail on an bad authorization attribute value', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="\t", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Bad attribute value: id'); - done(); - }); - }); - - it('should fail on an empty authorization attribute value', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Bad attribute value: id'); - done(); - }); - }); - - it('should fail on duplicated authorization attribute key', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", id="456", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Duplicate attribute: id'); - done(); - }); - }); - - it('should fail on an invalid authorization header format', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid header syntax'); - done(); - }); - }); - - it('should fail on an bad host header (missing host)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - headers: { - host: ':8080', - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - } - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid Host header'); - done(); - }); - }); - - it('should fail on an bad host header (pad port)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - headers: { - host: 'example.com:something', - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - } - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid Host header'); - done(); - }); - }); - - it('should fail on credentialsFunc error', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - var credentialsFunc = function (id, callback) { - - return callback(new Error('Unknown user')); - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.message).to.equal('Unknown user'); - done(); - }); - }); - - it('should fail on missing credentials', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - var credentialsFunc = function (id, callback) { - - return callback(null, null); - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Unknown credentials'); - done(); - }); - }); - - it('should fail on invalid credentials', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - var credentialsFunc = function (id, callback) { - - var credentials = { - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - user: 'steve' - }; - - return callback(null, credentials); - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.message).to.equal('Invalid credentials'); - expect(err.response.payload.message).to.equal('An internal server error occurred'); - done(); - }); - }); - - it('should fail on unknown credentials algorithm', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - var credentialsFunc = function (id, callback) { - - var credentials = { - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'hmac-sha-0', - user: 'steve' - }; - - return callback(null, credentials); - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.message).to.equal('Unknown algorithm'); - expect(err.response.payload.message).to.equal('An internal server error occurred'); - done(); - }); - }); - - it('should fail on unknown bad mac', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcU4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - var credentialsFunc = function (id, callback) { - - var credentials = { - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'steve' - }; - - return callback(null, credentials); - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Bad mac'); - done(); - }); - }); - }); - - describe('#header', function () { - - it('should return an empty authorization header on missing options', function (done) { - - var header = Hawk.server.header(); - expect(header).to.equal(''); - done(); - }); - - it('should return an empty authorization header on missing credentials', function (done) { - - var header = Hawk.server.header(null, {}); - expect(header).to.equal(''); - done(); - }); - - it('should return an empty authorization header on invalid credentials', function (done) { - - var credentials = { - key: '2983d45yun89q' - }; - - var header = Hawk.server.header(credentials); - expect(header).to.equal(''); - done(); - }); - - it('should return an empty authorization header on invalid algorithm', function (done) { - - var artifacts = { - id: '123456' - }; - - var credentials = { - key: '2983d45yun89q', - algorithm: 'hmac-sha-0' - }; - - var header = Hawk.server.header(credentials, artifacts); - expect(header).to.equal(''); - done(); - }); - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/uri.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/uri.js deleted file mode 100755 index 44ffd7fb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/uri.js +++ /dev/null @@ -1,456 +0,0 @@ -// Load modules - -var Http = require('http'); -var Lab = require('lab'); -var Hawk = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hawk', function () { - - describe('Uri', function () { - - var credentialsFunc = function (id, callback) { - - var credentials = { - id: id, - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'steve' - }; - - return callback(null, credentials); - }; - - it('should generate a bewit then successfully authenticate it', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?a=1&b=2', - host: 'example.com', - port: 80 - }; - - credentialsFunc('123456', function (err, credentials) { - - var bewit = Hawk.uri.getBewit('http://example.com/resource/4?a=1&b=2', { credentials: credentials, ttlSec: 60 * 60 * 24 * 365 * 100, ext: 'some-app-data' }); - req.url += '&bewit=' + bewit; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(attributes.ext).to.equal('some-app-data'); - done(); - }); - }); - }); - - it('should generate a bewit then successfully authenticate it (no ext)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?a=1&b=2', - host: 'example.com', - port: 80 - }; - - credentialsFunc('123456', function (err, credentials) { - - var bewit = Hawk.uri.getBewit('http://example.com/resource/4?a=1&b=2', { credentials: credentials, ttlSec: 60 * 60 * 24 * 365 * 100 }); - req.url += '&bewit=' + bewit; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - done(); - }); - }); - }); - - it('should successfully authenticate a request (last param)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?a=1&b=2&bewit=MTIzNDU2XDQ1MTE0ODQ2MjFcMzFjMmNkbUJFd1NJRVZDOVkva1NFb2c3d3YrdEVNWjZ3RXNmOGNHU2FXQT1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(attributes.ext).to.equal('some-app-data'); - done(); - }); - }); - - it('should successfully authenticate a request (first param)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MTE0ODQ2MjFcMzFjMmNkbUJFd1NJRVZDOVkva1NFb2c3d3YrdEVNWjZ3RXNmOGNHU2FXQT1cc29tZS1hcHAtZGF0YQ&a=1&b=2', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(attributes.ext).to.equal('some-app-data'); - done(); - }); - }); - - it('should successfully authenticate a request (only param)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MTE0ODQ2NDFcZm1CdkNWT3MvcElOTUUxSTIwbWhrejQ3UnBwTmo4Y1VrSHpQd3Q5OXJ1cz1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(attributes.ext).to.equal('some-app-data'); - done(); - }); - }); - - it('should fail on multiple authentication', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MTE0ODQ2NDFcZm1CdkNWT3MvcElOTUUxSTIwbWhrejQ3UnBwTmo4Y1VrSHpQd3Q5OXJ1cz1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080, - authorization: 'Basic asdasdasdasd' - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Multiple authentications'); - done(); - }); - }); - - it('should fail on method other than GET', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - var exp = Math.floor(Hawk.utils.now() / 1000) + 60; - var ext = 'some-app-data'; - var mac = Hawk.crypto.calculateMac('bewit', credentials, { - timestamp: exp, - nonce: '', - method: req.method, - resource: req.url, - host: req.host, - port: req.port, - ext: ext - }); - - var bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + ext; - - req.url += '&bewit=' + Hawk.utils.base64urlEncode(bewit); - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid method'); - done(); - }); - }); - }); - - it('should fail on invalid host header', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ', - headers: { - host: 'example.com:something' - } - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid Host header'); - done(); - }); - }); - - it('should fail on empty bewit', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Empty bewit'); - expect(err.isMissing).to.not.exist; - done(); - }); - }); - - it('should fail on invalid bewit', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=*', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid bewit encoding'); - expect(err.isMissing).to.not.exist; - done(); - }); - }); - - it('should fail on missing bewit', function (done) { - - var req = { - method: 'GET', - url: '/resource/4', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.not.exist; - expect(err.isMissing).to.equal(true); - done(); - }); - }); - - it('should fail on invalid bewit structure', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=abc', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid bewit structure'); - done(); - }); - }); - - it('should fail on empty bewit attribute', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=YVxcY1xk', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Missing bewit attributes'); - done(); - }); - }); - - it('should fail on expired access', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?a=1&b=2&bewit=MTIzNDU2XDEzNTY0MTg1ODNcWk1wZlMwWU5KNHV0WHpOMmRucTRydEk3NXNXTjFjeWVITTcrL0tNZFdVQT1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Access expired'); - done(); - }); - }); - - it('should fail on credentials function error', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, function (id, callback) { callback(Hawk.error.badRequest('Boom')); }, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Boom'); - done(); - }); - }); - - it('should fail on null credentials function response', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, function (id, callback) { callback(null, null); }, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Unknown credentials'); - done(); - }); - }); - - it('should fail on invalid credentials function response', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, function (id, callback) { callback(null, {}); }, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.message).to.equal('Invalid credentials'); - done(); - }); - }); - - it('should fail on invalid credentials function response (unknown algorithm)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, function (id, callback) { callback(null, { key: 'xxx', algorithm: 'xxx' }); }, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.message).to.equal('Unknown algorithm'); - done(); - }); - }); - - it('should fail on expired access', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, function (id, callback) { callback(null, { key: 'xxx', algorithm: 'sha256' }); }, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Bad mac'); - done(); - }); - }); - }); - - describe('#getBewit', function () { - - it('should return a valid bewit value', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'sha256' - }; - - var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' }); - expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdca3NjeHdOUjJ0SnBQMVQxekRMTlBiQjVVaUtJVTl0T1NKWFRVZEc3WDloOD1ceGFuZHlhbmR6'); - done(); - }); - - it('should return an empty bewit on invalid credentials', function (done) { - - var credentials = { - key: '2983d45yun89q', - algorithm: 'sha256' - }; - - var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 3000, ext: 'xandyandz' }); - expect(bewit).to.equal(''); - done(); - }); - - it('should return an empty bewit on invalid algorithm', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'hmac-sha-0' - }; - - var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, ext: 'xandyandz' }); - expect(bewit).to.equal(''); - done(); - }); - - it('should return an empty bewit on missing options', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'hmac-sha-0' - }; - - var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow'); - expect(bewit).to.equal(''); - done(); - }); - }); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/utils.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/utils.js deleted file mode 100755 index 0f5fef77..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/utils.js +++ /dev/null @@ -1,120 +0,0 @@ -// Load modules - -var Lab = require('lab'); -var Hawk = require('../lib'); -var Package = require('../package.json'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hawk', function () { - - describe('Utils', function () { - - describe('#parseHost', function () { - - it('returns port 80 for non tls node request', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com', - 'content-type': 'text/plain;x=y' - } - }; - - expect(Hawk.utils.parseHost(req, 'Host').port).to.equal(80); - done(); - }); - - it('returns port 443 for non tls node request', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com', - 'content-type': 'text/plain;x=y' - }, - connection: { - encrypted: true - } - }; - - expect(Hawk.utils.parseHost(req, 'Host').port).to.equal(443); - done(); - }); - - it('returns port 443 for non tls node request (IPv6)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: '[123:123:123]', - 'content-type': 'text/plain;x=y' - }, - connection: { - encrypted: true - } - }; - - expect(Hawk.utils.parseHost(req, 'Host').port).to.equal(443); - done(); - }); - - it('parses IPv6 headers', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: '[123:123:123]:8000', - 'content-type': 'text/plain;x=y' - }, - connection: { - encrypted: true - } - }; - - var host = Hawk.utils.parseHost(req, 'Host'); - expect(host.port).to.equal('8000'); - expect(host.name).to.equal('[123:123:123]'); - done(); - }); - }); - - describe('#version', function () { - - it('returns the correct package version number', function (done) { - - expect(Hawk.utils.version()).to.equal(Package.version); - done(); - }); - }); - - describe('#unauthorized', function () { - - it('returns a hawk 401', function (done) { - - expect(Hawk.utils.unauthorized('kaboom').response.headers['WWW-Authenticate']).to.equal('Hawk error="kaboom"'); - done(); - }); - }); - }); -}); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/.dir-locals.el b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/.dir-locals.el deleted file mode 100644 index 3bc9235f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/.dir-locals.el +++ /dev/null @@ -1,6 +0,0 @@ -((nil . ((indent-tabs-mode . nil) - (tab-width . 8) - (fill-column . 80))) - (js-mode . ((js-indent-level . 2) - (indent-tabs-mode . nil) - ))) \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/.npmignore deleted file mode 100644 index c143fb3a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/.npmignore +++ /dev/null @@ -1,7 +0,0 @@ -.gitmodules -deps -docs -Makefile -node_modules -test -tools \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/LICENSE deleted file mode 100644 index f6d947d2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. All rights reserved. -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/README.md deleted file mode 100644 index 0c707149..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# node-http-signature - -node-http-signature is a node.js library that has client and server components -for Joyent's [HTTP Signature Scheme](http_signing.md). - -## Usage - -Note the example below signs a request with the same key/cert used to start an -HTTP server. This is almost certainly not what you actaully want, but is just -used to illustrate the API calls; you will need to provide your own key -management in addition to this library. - -### Client - - var fs = require('fs'); - var https = require('https'); - var httpSignature = require('http-signature'); - - var key = fs.readFileSync('./key.pem', 'ascii'); - - var options = { - host: 'localhost', - port: 8443, - path: '/', - method: 'GET', - headers: {} - }; - - // Adds a 'Date' header in, signs it, and adds the - // 'Authorization' header in. - var req = https.request(options, function(res) { - console.log(res.statusCode); - }); - - - httpSignature.sign(req, { - key: key, - keyId: './cert.pem' - }); - - req.end(); - -### Server - - var fs = require('fs'); - var https = require('https'); - var httpSignature = require('http-signature'); - - var options = { - key: fs.readFileSync('./key.pem'), - cert: fs.readFileSync('./cert.pem') - }; - - https.createServer(options, function (req, res) { - var rc = 200; - var parsed = httpSignature.parseRequest(req); - var pub = fs.readFileSync(parsed.keyId, 'ascii'); - if (!httpSignature.verifySignature(parsed, pub)) - rc = 401; - - res.writeHead(rc); - res.end(); - }).listen(8443); - -## Installation - - npm install http-signature - -## License - -MIT. - -## Bugs - -See <https://github.com/joyent/node-http-signature/issues>. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/http_signing.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/http_signing.md deleted file mode 100644 index ba7321da..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/http_signing.md +++ /dev/null @@ -1,296 +0,0 @@ -# Abstract - -This document describes a way to add origin authentication, message integrity, -and replay resistance to HTTP REST requests. It is intended to be used over -the HTTPS protocol. - -# Copyright Notice - -Copyright (c) 2011 Joyent, Inc. and the persons identified as document authors. -All rights reserved. - -Code Components extracted from this document must include MIT License text. - -# Introduction - -This protocol is intended to provide a standard way for clients to sign HTTP -requests. RFC2617 (HTTP Authentication) defines Basic and Digest authentication -mechanisms, and RFC5246 (TLS 1.2) defines client-auth, both of which are widely -employed on the Internet today. However, it is common place that the burdens of -PKI prevent web service operators from deploying that methodoloy, and so many -fall back to Basic authentication, which has poor security characteristics. - -Additionally, OAuth provides a fully-specified alternative for authorization -of web service requests, but is not (always) ideal for machine to machine -communication, as the key acquisition steps (generally) imply a fixed -infrastructure that may not make sense to a service provider (e.g., symmetric -keys). - -Several web service providers have invented their own schemes for signing -HTTP requests, but to date, none have been placed in the public domain as a -standard. This document serves that purpose. There are no techniques in this -proposal that are novel beyond previous art, however, this aims to be a simple -mechanism for signing these requests. - -# Signature Authentication Scheme - -The "signature" authentication scheme is based on the model that the client must -authenticate itself with a digital signature produced by either a private -asymmetric key (e.g., RSA) or a shared symmetric key (e.g., HMAC). The scheme -is parameterized enough such that it is not bound to any particular key type or -signing algorithm. However, it does explicitly assume that clients can send an -HTTP `Date` header. - -## Authorization Header - -The client is expected to send an Authorization header (as defined in RFC 2617) -with the following parameterization: - - credentials := "Signature" params - params := 1#(keyId | algorithm | [headers] | [ext] | signature) - digitalSignature := plain-string - - keyId := "keyId" "=" <"> plain-string <"> - algorithm := "algorithm" "=" <"> plain-string <"> - headers := "headers" "=" <"> 1#headers-value <"> - ext := "ext" "=" <"> plain-string <"> - signature := "signature" "=" <"> plain-string <"> - - headers-value := plain-string - plain-string = 1*( %x20-21 / %x23-5B / %x5D-7E ) - -### Signature Parameters - -#### keyId - -REQUIRED. The `keyId` field is an opaque string that the server can use to look -up the component they need to validate the signature. It could be an SSH key -fingerprint, an LDAP DN, etc. Management of keys and assignment of `keyId` is -out of scope for this document. - -#### algorithm - -REQUIRED. The `algorithm` parameter is used if the client and server agree on a -non-standard digital signature algorithm. The full list of supported signature -mechanisms is listed below. - -#### headers - -OPTIONAL. The `headers` parameter is used to specify the list of HTTP headers -used to sign the request. If specified, it should be a quoted list of HTTP -header names, separated by a single space character. By default, only one -HTTP header is signed, which is the `Date` header. Note that the list MUST be -specified in the order the values are concatenated together during signing. To -include the HTTP request line in the signature calculation, use the special -`request-line` value. While this is overloading the definition of `headers` in -HTTP linguism, the request-line is defined in RFC 2616, and as the outlier from -headers in useful signature calculation, it is deemed simpler to simply use -`request-line` than to add a separate parameter for it. - -#### extensions - -OPTIONAL. The `extensions` parameter is used to include additional information -which is covered by the request. The content and format of the string is out of -scope for this document, and expected to be specified by implementors. - -#### signature - -REQUIRED. The `signature` parameter is a `Base64` encoded digital signature -generated by the client. The client uses the `algorithm` and `headers` request -parameters to form a canonicalized `signing string`. This `signing string` is -then signed with the key associated with `keyId` and the algorithm -corresponding to `algorithm`. The `signature` parameter is then set to the -`Base64` encoding of the signature. - -### Signing String Composition - -In order to generate the string that is signed with a key, the client MUST take -the values of each HTTP header specified by `headers` in the order they appear. - -1. If the header name is not `request-line` then append the lowercased header - name followed with an ASCII colon `:` and an ASCII space ` `. -2. If the header name is `request-line` then appened the HTTP request line, - otherwise append the header value. -3. If value is not the last value then append an ASCII newline `\n`. The string - MUST NOT include a trailing ASCII newline. - -# Example Requests - -All requests refer to the following request (body ommitted): - - POST /foo HTTP/1.1 - Host: example.org - Date: Tue, 07 Jun 2011 20:51:35 GMT - Content-Type: application/json - Content-MD5: h0auK8hnYJKmHTLhKtMTkQ== - Content-Length: 123 - -The "rsa-key-1" keyId refers to a private key known to the client and a public -key known to the server. The "hmac-key-1" keyId refers to key known to the -client and server. - -## Default parameterization - -The authorization header and signature would be generated as: - - Authorization: Signature keyId="rsa-key-1",algorithm="rsa-sha256",signature="Base64(RSA-SHA256(signing string))" - -The client would compose the signing string as: - - date: Tue, 07 Jun 2011 20:51:35 GMT - -## Header List - -The authorization header and signature would be generated as: - - Authorization: Signature keyId="rsa-key-1",algorithm="rsa-sha256",headers="request-line date content-type content-md5",signature="Base64(RSA-SHA256(signing string))" - -The client would compose the signing string as (`+ "\n"` inserted for -readability): - - POST /foo HTTP/1.1 + "\n" - date: Tue, 07 Jun 2011 20:51:35 GMT + "\n" - content-type: application/json + "\n" - content-md5: h0auK8hnYJKmHTLhKtMTkQ== - -## Algorithm - -The authorization header and signature would be generated as: - - Authorization: Signature keyId="hmac-key-1",algorithm="hmac-sha1",signature="Base64(HMAC-SHA1(signing string))" - -The client would compose the signing string as: - - date: Tue, 07 Jun 2011 20:51:35 GMT - -# Signing Algorithms - -Currently supported algorithm names are: - -* rsa-sha1 -* rsa-sha256 -* rsa-sha512 -* dsa-sha1 -* hmac-sha1 -* hmac-sha256 -* hmac-sha512 - -# Security Considerations - -## Default Parameters - -Note the default parameterization of the `Signature` scheme is only safe if all -requests are carried over a secure transport (i.e., TLS). Sending the default -scheme over a non-secure transport will leave the request vulnerable to -spoofing, tampering, replay/repudiaton, and integrity violations (if using the -STRIDE threat-modeling methodology). - -## Insecure Transports - -If sending the request over plain HTTP, service providers SHOULD require clients -to sign ALL HTTP headers, and the `request-line`. Additionally, service -providers SHOULD require `Content-MD5` calculations to be performed to ensure -against any tampering from clients. - -## Nonces - -Nonces are out of scope for this document simply because many service providers -fail to implement them correctly, or do not adopt security specfiications -because of the infrastructure complexity. Given the `header` parameterization, -a service provider is fully enabled to add nonce semantics into this scheme by -using something like an `x-request-nonce` header, and ensuring it is signed -with the `Date` header. - -## Clock Skew - -As the default scheme is to sign the `Date` header, service providers SHOULD -protect against logged replay attacks by enforcing a clock skew. The server -SHOULD be synchronized with NTP, and the recommendation in this specification -is to allow 300s of clock skew (in either direction). - -## Required Headers to Sign - -It is out of scope for this document to dictate what headers a service provider -will want to enforce, but service providers SHOULD at minimum include the -`Date` header. - -# References - -## Normative References - -* [RFC2616] Hypertext Transfer Protocol -- HTTP/1.1 -* [RFC2617] HTTP Authentication: Basic and Digest Access Authentication -* [RFC5246] The Transport Layer Security (TLS) Protocol Version 1.2 - -## Informative References - - Name: Mark Cavage (editor) - Company: Joyent, Inc. - Email: mark.cavage@joyent.com - URI: http://www.joyent.com - -# Appendix A - Test Values - -The following test data uses the RSA (2048b) keys, which we will refer -to as `keyId=Test` in the following samples: - - -----BEGIN PUBLIC KEY----- - MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCFENGw33yGihy92pDjZQhl0C3 - 6rPJj+CvfSC8+q28hxA161QFNUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6 - Z4UMR7EOcpfdUE9Hf3m/hs+FUR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJw - oYi+1hqp1fIekaxsyQIDAQAB - -----END PUBLIC KEY----- - - -----BEGIN RSA PRIVATE KEY----- - MIICXgIBAAKBgQDCFENGw33yGihy92pDjZQhl0C36rPJj+CvfSC8+q28hxA161QF - NUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6Z4UMR7EOcpfdUE9Hf3m/hs+F - UR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJwoYi+1hqp1fIekaxsyQIDAQAB - AoGBAJR8ZkCUvx5kzv+utdl7T5MnordT1TvoXXJGXK7ZZ+UuvMNUCdN2QPc4sBiA - QWvLw1cSKt5DsKZ8UETpYPy8pPYnnDEz2dDYiaew9+xEpubyeW2oH4Zx71wqBtOK - kqwrXa/pzdpiucRRjk6vE6YY7EBBs/g7uanVpGibOVAEsqH1AkEA7DkjVH28WDUg - f1nqvfn2Kj6CT7nIcE3jGJsZZ7zlZmBmHFDONMLUrXR/Zm3pR5m0tCmBqa5RK95u - 412jt1dPIwJBANJT3v8pnkth48bQo/fKel6uEYyboRtA5/uHuHkZ6FQF7OUkGogc - mSJluOdc5t6hI1VsLn0QZEjQZMEOWr+wKSMCQQCC4kXJEsHAve77oP6HtG/IiEn7 - kpyUXRNvFsDE0czpJJBvL/aRFUJxuRK91jhjC68sA7NsKMGg5OXb5I5Jj36xAkEA - gIT7aFOYBFwGgQAQkWNKLvySgKbAZRTeLBacpHMuQdl1DfdntvAyqpAZ0lY0RKmW - G6aFKaqQfOXKCyWoUiVknQJAXrlgySFci/2ueKlIE1QqIiLSZ8V8OlpFLRnb1pzI - 7U1yQXnTAEFYM560yJlzUpOb1V4cScGd365tiSMvxLOvTA== - -----END RSA PRIVATE KEY----- - -And all examples use this request: - - POST /foo?param=value&pet=dog HTTP/1.1 - Host: example.com - Date: Thu, 05 Jan 2012 21:31:40 GMT - Content-Type: application/json - Content-MD5: Sd/dVLAcvNLSq16eXua5uQ== - Content-Length: 18 - - {"hello": "world"} - -### Default - -The string to sign would be: - - date: Thu, 05 Jan 2012 21:31:40 GMT - -The Authorization header would be: - - Authorization: Signature keyId="Test",algorithm="rsa-sha256",signature="JldXnt8W9t643M2Sce10gqCh/+E7QIYLiI+bSjnFBGCti7s+mPPvOjVb72sbd1FjeOUwPTDpKbrQQORrm+xBYfAwCxF3LBSSzORvyJ5nRFCFxfJ3nlQD6Kdxhw8wrVZX5nSem4A/W3C8qH5uhFTRwF4ruRjh+ENHWuovPgO/HGQ=" - -### All Headers - -Parameterized to include all headers, the string to sign would be (`+ "\n"` -inserted for readability): - - POST /foo?param=value&pet=dog HTTP/1.1 + "\n" - host: example.com + "\n" - date: Thu, 05 Jan 2012 21:31:40 GMT + "\n" - content-type: application/json + "\n" - content-md5: Sd/dVLAcvNLSq16eXua5uQ== + "\n" - content-length: 18 - -The Authorization header would be: - - Authorization: Signature keyId="Test",algorithm="rsa-sha256",headers="request-line host date content-type content-md5 content-length",signature="Gm7W/r+e90REDpWytALMrft4MqZxCmslOTOvwJX17ViEBA5E65QqvWI0vIH3l/vSsGiaMVmuUgzYsJLYMLcm5dGrv1+a+0fCoUdVKPZWHyImQEqpLkopVwqEH67LVECFBqFTAKlQgBn676zrfXQbb+b/VebAsNUtvQMe6cTjnDY=" - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/index.js deleted file mode 100644 index 3ac70b77..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/index.js +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2011 Joyent, Inc. All rights reserved. - -var parser = require('./parser'); -var signer = require('./signer'); -var verify = require('./verify'); -var util = require('./util'); - - - -///--- API - -module.exports = { - - parse: parser.parseRequest, - parseRequest: parser.parseRequest, - - sign: signer.signRequest, - signRequest: signer.signRequest, - - sshKeyToPEM: util.sshKeyToPEM, - sshKeyFingerprint: util.fingerprint, - - verify: verify.verifySignature, - verifySignature: verify.verifySignature -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/parser.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/parser.js deleted file mode 100644 index fd9ac102..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/parser.js +++ /dev/null @@ -1,304 +0,0 @@ -// Copyright 2012 Joyent, Inc. All rights reserved. - -var assert = require('assert-plus'); -var util = require('util'); - - - -///--- Globals - -var Algorithms = { - 'rsa-sha1': true, - 'rsa-sha256': true, - 'rsa-sha512': true, - 'dsa-sha1': true, - 'hmac-sha1': true, - 'hmac-sha256': true, - 'hmac-sha512': true -}; - -var State = { - New: 0, - Params: 1 -}; - -var ParamsState = { - Name: 0, - Quote: 1, - Value: 2, - Comma: 3 -}; - - - -///--- Specific Errors - -function HttpSignatureError(message, caller) { - if (Error.captureStackTrace) - Error.captureStackTrace(this, caller || HttpSignatureError); - - this.message = message; - this.name = caller.name; -} -util.inherits(HttpSignatureError, Error); - -function ExpiredRequestError(message) { - HttpSignatureError.call(this, message, ExpiredRequestError); -} -util.inherits(ExpiredRequestError, HttpSignatureError); - - -function InvalidHeaderError(message) { - HttpSignatureError.call(this, message, InvalidHeaderError); -} -util.inherits(InvalidHeaderError, HttpSignatureError); - - -function InvalidParamsError(message) { - HttpSignatureError.call(this, message, InvalidParamsError); -} -util.inherits(InvalidParamsError, HttpSignatureError); - - -function MissingHeaderError(message) { - HttpSignatureError.call(this, message, MissingHeaderError); -} -util.inherits(MissingHeaderError, HttpSignatureError); - - - -///--- Exported API - -module.exports = { - - /** - * Parses the 'Authorization' header out of an http.ServerRequest object. - * - * Note that this API will fully validate the Authorization header, and throw - * on any error. It will not however check the signature, or the keyId format - * as those are specific to your environment. You can use the options object - * to pass in extra constraints. - * - * As a response object you can expect this: - * - * { - * "scheme": "Signature", - * "params": { - * "keyId": "foo", - * "algorithm": "rsa-sha256", - * "headers": [ - * "date" or "x-date", - * "content-md5" - * ], - * "signature": "base64" - * }, - * "signingString": "ready to be passed to crypto.verify()" - * } - * - * @param {Object} request an http.ServerRequest. - * @param {Object} options an optional options object with: - * - clockSkew: allowed clock skew in seconds (default 300). - * - headers: required header names (def: date or x-date) - * - algorithms: algorithms to support (default: all). - * @return {Object} parsed out object (see above). - * @throws {TypeError} on invalid input. - * @throws {InvalidHeaderError} on an invalid Authorization header error. - * @throws {InvalidParamsError} if the params in the scheme are invalid. - * @throws {MissingHeaderError} if the params indicate a header not present, - * either in the request headers from the params, - * or not in the params from a required header - * in options. - * @throws {ExpiredRequestError} if the value of date or x-date exceeds skew. - */ - parseRequest: function parseRequest(request, options) { - assert.object(request, 'request'); - assert.object(request.headers, 'request.headers'); - if (options === undefined) { - options = {}; - } - if (options.headers === undefined) { - options.headers = [request.headers['x-date'] ? 'x-date' : 'date']; - } - assert.object(options, 'options'); - assert.arrayOfString(options.headers, 'options.headers'); - assert.optionalNumber(options.clockSkew, 'options.clockSkew'); - - if (!request.headers.authorization) - throw new MissingHeaderError('no authorization header present in ' + - 'the request'); - - options.clockSkew = options.clockSkew || 300; - - - var i = 0; - var state = State.New; - var substate = ParamsState.Name; - var tmpName = ''; - var tmpValue = ''; - - var parsed = { - scheme: '', - params: {}, - signingString: '', - - get algorithm() { - return this.params.algorithm.toUpperCase(); - }, - - get keyId() { - return this.params.keyId; - } - - }; - - var authz = request.headers.authorization; - for (i = 0; i < authz.length; i++) { - var c = authz.charAt(i); - - switch (Number(state)) { - - case State.New: - if (c !== ' ') parsed.scheme += c; - else state = State.Params; - break; - - case State.Params: - switch (Number(substate)) { - - case ParamsState.Name: - var code = c.charCodeAt(0); - // restricted name of A-Z / a-z - if ((code >= 0x41 && code <= 0x5a) || // A-Z - (code >= 0x61 && code <= 0x7a)) { // a-z - tmpName += c; - } else if (c === '=') { - if (tmpName.length === 0) - throw new InvalidHeaderError('bad param format'); - substate = ParamsState.Quote; - } else { - throw new InvalidHeaderError('bad param format'); - } - break; - - case ParamsState.Quote: - if (c === '"') { - tmpValue = ''; - substate = ParamsState.Value; - } else { - throw new InvalidHeaderError('bad param format'); - } - break; - - case ParamsState.Value: - if (c === '"') { - parsed.params[tmpName] = tmpValue; - substate = ParamsState.Comma; - } else { - tmpValue += c; - } - break; - - case ParamsState.Comma: - if (c === ',') { - tmpName = ''; - substate = ParamsState.Name; - } else { - throw new InvalidHeaderError('bad param format'); - } - break; - - default: - throw new Error('Invalid substate'); - } - break; - - default: - throw new Error('Invalid substate'); - } - - } - - if (!parsed.params.headers || parsed.params.headers === '') { - if (request.headers['x-date']) { - parsed.params.headers = ['x-date']; - } else { - parsed.params.headers = ['date']; - } - } else { - parsed.params.headers = parsed.params.headers.split(' '); - } - - // Minimally validate the parsed object - if (!parsed.scheme || parsed.scheme !== 'Signature') - throw new InvalidHeaderError('scheme was not "Signature"'); - - if (!parsed.params.keyId) - throw new InvalidHeaderError('keyId was not specified'); - - if (!parsed.params.algorithm) - throw new InvalidHeaderError('algorithm was not specified'); - - if (!parsed.params.signature) - throw new InvalidHeaderError('signature was not specified'); - - // Check the algorithm against the official list - parsed.params.algorithm = parsed.params.algorithm.toLowerCase(); - if (!Algorithms[parsed.params.algorithm]) - throw new InvalidParamsError(parsed.params.algorithm + - ' is not supported'); - - // Build the signingString - for (i = 0; i < parsed.params.headers.length; i++) { - var h = parsed.params.headers[i].toLowerCase(); - parsed.params.headers[i] = h; - - if (h !== 'request-line') { - var value = request.headers[h]; - if (!value) - throw new MissingHeaderError(h + ' was not in the request'); - parsed.signingString += h + ': ' + value; - } else { - parsed.signingString += - request.method + ' ' + request.url + ' HTTP/' + request.httpVersion; - } - - if ((i + 1) < parsed.params.headers.length) - parsed.signingString += '\n'; - } - - // Check against the constraints - var date; - if (request.headers.date || request.headers['x-date']) { - if (request.headers['x-date']) { - date = new Date(request.headers['x-date']); - } else { - date = new Date(request.headers.date); - } - var now = new Date(); - var skew = Math.abs(now.getTime() - date.getTime()); - - if (skew > options.clockSkew * 1000) { - throw new ExpiredRequestError('clock skew of ' + - (skew / 1000) + - 's was greater than ' + - options.clockSkew + 's'); - } - } - - options.headers.forEach(function (hdr) { - // Remember that we already checked any headers in the params - // were in the request, so if this passes we're good. - if (parsed.params.headers.indexOf(hdr) < 0) - throw new MissingHeaderError(hdr + ' was not a signed header'); - }); - - if (options.algorithms) { - if (options.algorithms.indexOf(parsed.params.algorithm) === -1) - throw new InvalidParamsError(parsed.params.algorithm + - ' is not a supported algorithm'); - } - - return parsed; - } - -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/signer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/signer.js deleted file mode 100644 index 8095f0d1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/signer.js +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright 2012 Joyent, Inc. All rights reserved. - -var assert = require('assert-plus'); -var crypto = require('crypto'); -var http = require('http'); - -var sprintf = require('util').format; - - - -///--- Globals - -var Algorithms = { - 'rsa-sha1': true, - 'rsa-sha256': true, - 'rsa-sha512': true, - 'dsa-sha1': true, - 'hmac-sha1': true, - 'hmac-sha256': true, - 'hmac-sha512': true -}; - -var Authorization = - 'Signature keyId="%s",algorithm="%s",headers="%s",signature="%s"'; - - - -///--- Specific Errors - -function MissingHeaderError(message) { - this.name = 'MissingHeaderError'; - this.message = message; - this.stack = (new Error()).stack; -} -MissingHeaderError.prototype = new Error(); - - -function InvalidAlgorithmError(message) { - this.name = 'InvalidAlgorithmError'; - this.message = message; - this.stack = (new Error()).stack; -} -InvalidAlgorithmError.prototype = new Error(); - - - -///--- Internal Functions - -function _pad(val) { - if (parseInt(val, 10) < 10) { - val = '0' + val; - } - return val; -} - - -function _rfc1123() { - var date = new Date(); - - var months = ['Jan', - 'Feb', - 'Mar', - 'Apr', - 'May', - 'Jun', - 'Jul', - 'Aug', - 'Sep', - 'Oct', - 'Nov', - 'Dec']; - var days = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; - return days[date.getUTCDay()] + ', ' + - _pad(date.getUTCDate()) + ' ' + - months[date.getUTCMonth()] + ' ' + - date.getUTCFullYear() + ' ' + - _pad(date.getUTCHours()) + ':' + - _pad(date.getUTCMinutes()) + ':' + - _pad(date.getUTCSeconds()) + - ' GMT'; -} - - - -///--- Exported API - -module.exports = { - - /** - * Adds an 'Authorization' header to an http.ClientRequest object. - * - * Note that this API will add a Date header if it's not already set. Any - * other headers in the options.headers array MUST be present, or this - * will throw. - * - * You shouldn't need to check the return type; it's just there if you want - * to be pedantic. - * - * @param {Object} request an instance of http.ClientRequest. - * @param {Object} options signing parameters object: - * - {String} keyId required. - * - {String} key required (either a PEM or HMAC key). - * - {Array} headers optional; defaults to ['date']. - * - {String} algorithm optional; defaults to 'rsa-sha256'. - * - {String} httpVersion optional; defaults to '1.1'. - * @return {Boolean} true if Authorization (and optionally Date) were added. - * @throws {TypeError} on bad parameter types (input). - * @throws {InvalidAlgorithmError} if algorithm was bad. - * @throws {MissingHeaderError} if a header to be signed was specified but - * was not present. - */ - signRequest: function signRequest(request, options) { - assert.object(request, 'request'); - assert.object(options, 'options'); - assert.optionalString(options.algorithm, 'options.algorithm'); - assert.string(options.keyId, 'options.keyId'); - assert.optionalArrayOfString(options.headers, 'options.headers'); - assert.optionalString(options.httpVersion, 'options.httpVersion'); - - if (!request.getHeader('Date')) - request.setHeader('Date', _rfc1123()); - if (!options.headers) - options.headers = ['date']; - if (!options.algorithm) - options.algorithm = 'rsa-sha256'; - if (!options.httpVersion) - options.httpVersion = '1.1'; - - options.algorithm = options.algorithm.toLowerCase(); - - if (!Algorithms[options.algorithm]) - throw new InvalidAlgorithmError(options.algorithm + ' is not supported'); - - var i; - var stringToSign = ''; - for (i = 0; i < options.headers.length; i++) { - if (typeof (options.headers[i]) !== 'string') - throw new TypeError('options.headers must be an array of Strings'); - - var h = options.headers[i].toLowerCase(); - - if (h !== 'request-line') { - var value = request.getHeader(h); - if (!value) { - throw new MissingHeaderError(h + ' was not in the request'); - } - stringToSign += h + ': ' + value; - } else { - value = - stringToSign += - request.method + ' ' + request.path + ' HTTP/' + options.httpVersion; - } - - if ((i + 1) < options.headers.length) - stringToSign += '\n'; - } - - var alg = options.algorithm.match(/(hmac|rsa)-(\w+)/); - var signature; - if (alg[1] === 'hmac') { - var hmac = crypto.createHmac(alg[2].toUpperCase(), options.key); - hmac.update(stringToSign); - signature = hmac.digest('base64'); - } else { - var signer = crypto.createSign(options.algorithm.toUpperCase()); - signer.update(stringToSign); - signature = signer.sign(options.key, 'base64'); - } - - request.setHeader('Authorization', sprintf(Authorization, - options.keyId, - options.algorithm, - options.headers.join(' '), - signature)); - - return true; - } - -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/util.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/util.js deleted file mode 100644 index 30bbf045..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/util.js +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright 2012 Joyent, Inc. All rights reserved. - -var assert = require('assert-plus'); -var crypto = require('crypto'); - -var asn1 = require('asn1'); -var ctype = require('ctype'); - - - -///--- Helpers - -function readNext(buffer, offset) { - var len = ctype.ruint32(buffer, 'big', offset); - offset += 4; - - var newOffset = offset + len; - - return { - data: buffer.slice(offset, newOffset), - offset: newOffset - }; -} - - -function writeInt(writer, buffer) { - writer.writeByte(0x02); // ASN1.Integer - writer.writeLength(buffer.length); - - for (var i = 0; i < buffer.length; i++) - writer.writeByte(buffer[i]); - - return writer; -} - - -function rsaToPEM(key) { - var buffer; - var der; - var exponent; - var i; - var modulus; - var newKey = ''; - var offset = 0; - var type; - var tmp; - - try { - buffer = new Buffer(key.split(' ')[1], 'base64'); - - tmp = readNext(buffer, offset); - type = tmp.data.toString(); - offset = tmp.offset; - - if (type !== 'ssh-rsa') - throw new Error('Invalid ssh key type: ' + type); - - tmp = readNext(buffer, offset); - exponent = tmp.data; - offset = tmp.offset; - - tmp = readNext(buffer, offset); - modulus = tmp.data; - } catch (e) { - throw new Error('Invalid ssh key: ' + key); - } - - // DER is a subset of BER - der = new asn1.BerWriter(); - - der.startSequence(); - - der.startSequence(); - der.writeOID('1.2.840.113549.1.1.1'); - der.writeNull(); - der.endSequence(); - - der.startSequence(0x03); // bit string - der.writeByte(0x00); - - // Actual key - der.startSequence(); - writeInt(der, modulus); - writeInt(der, exponent); - der.endSequence(); - - // bit string - der.endSequence(); - - der.endSequence(); - - tmp = der.buffer.toString('base64'); - for (i = 0; i < tmp.length; i++) { - if ((i % 64) === 0) - newKey += '\n'; - newKey += tmp.charAt(i); - } - - if (!/\\n$/.test(newKey)) - newKey += '\n'; - - return '-----BEGIN PUBLIC KEY-----' + newKey + '-----END PUBLIC KEY-----\n'; -} - - -function dsaToPEM(key) { - var buffer; - var offset = 0; - var tmp; - var der; - var newKey = ''; - - var type; - var p; - var q; - var g; - var y; - - try { - buffer = new Buffer(key.split(' ')[1], 'base64'); - - tmp = readNext(buffer, offset); - type = tmp.data.toString(); - offset = tmp.offset; - - /* JSSTYLED */ - if (!/^ssh-ds[as].*/.test(type)) - throw new Error('Invalid ssh key type: ' + type); - - tmp = readNext(buffer, offset); - p = tmp.data; - offset = tmp.offset; - - tmp = readNext(buffer, offset); - q = tmp.data; - offset = tmp.offset; - - tmp = readNext(buffer, offset); - g = tmp.data; - offset = tmp.offset; - - tmp = readNext(buffer, offset); - y = tmp.data; - } catch (e) { - console.log(e.stack); - throw new Error('Invalid ssh key: ' + key); - } - - // DER is a subset of BER - der = new asn1.BerWriter(); - - der.startSequence(); - - der.startSequence(); - der.writeOID('1.2.840.10040.4.1'); - - der.startSequence(); - writeInt(der, p); - writeInt(der, q); - writeInt(der, g); - der.endSequence(); - - der.endSequence(); - - der.startSequence(0x03); // bit string - der.writeByte(0x00); - writeInt(der, y); - der.endSequence(); - - der.endSequence(); - - tmp = der.buffer.toString('base64'); - for (var i = 0; i < tmp.length; i++) { - if ((i % 64) === 0) - newKey += '\n'; - newKey += tmp.charAt(i); - } - - if (!/\\n$/.test(newKey)) - newKey += '\n'; - - return '-----BEGIN PUBLIC KEY-----' + newKey + '-----END PUBLIC KEY-----\n'; -} - - -///--- API - -module.exports = { - - /** - * Converts an OpenSSH public key (rsa only) to a PKCS#8 PEM file. - * - * The intent of this module is to interoperate with OpenSSL only, - * specifically the node crypto module's `verify` method. - * - * @param {String} key an OpenSSH public key. - * @return {String} PEM encoded form of the RSA public key. - * @throws {TypeError} on bad input. - * @throws {Error} on invalid ssh key formatted data. - */ - sshKeyToPEM: function sshKeyToPEM(key) { - assert.string(key, 'ssh_key'); - - /* JSSTYLED */ - if (/^ssh-rsa.*/.test(key)) - return rsaToPEM(key); - - /* JSSTYLED */ - if (/^ssh-ds[as].*/.test(key)) - return dsaToPEM(key); - - throw new Error('Only RSA and DSA public keys are allowed'); - }, - - - /** - * Generates an OpenSSH fingerprint from an ssh public key. - * - * @param {String} key an OpenSSH public key. - * @return {String} key fingerprint. - * @throws {TypeError} on bad input. - * @throws {Error} if what you passed doesn't look like an ssh public key. - */ - fingerprint: function fingerprint(key) { - assert.string(key, 'ssh_key'); - - var pieces = key.split(' '); - if (!pieces || !pieces.length || pieces.length < 2) - throw new Error('invalid ssh key'); - - var data = new Buffer(pieces[1], 'base64'); - - var hash = crypto.createHash('md5'); - hash.update(data); - var digest = hash.digest('hex'); - - var fp = ''; - for (var i = 0; i < digest.length; i++) { - if (i && i % 2 === 0) - fp += ':'; - - fp += digest[i]; - } - - return fp; - } - - -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/verify.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/verify.js deleted file mode 100644 index 5bf95896..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/verify.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2011 Joyent, Inc. All rights reserved. - -var assert = require('assert-plus'); -var crypto = require('crypto'); - - - -///--- Exported API - -module.exports = { - - /** - * Simply wraps up the node crypto operations for you, and returns - * true or false. You are expected to pass in an object that was - * returned from `parse()`. - * - * @param {Object} parsedSignature the object you got from `parse`. - * @param {String} key either an RSA private key PEM or HMAC secret. - * @return {Boolean} true if valid, false otherwise. - * @throws {TypeError} if you pass in bad arguments. - */ - verifySignature: function verifySignature(parsedSignature, key) { - assert.object(parsedSignature, 'parsedSignature'); - assert.string(key, 'key'); - - var alg = parsedSignature.algorithm.match(/(HMAC|RSA|DSA)-(\w+)/); - if (!alg || alg.length !== 3) - throw new TypeError('parsedSignature: unsupported algorithm ' + - parsedSignature.algorithm); - - if (alg[1] === 'HMAC') { - var hmac = crypto.createHmac(alg[2].toUpperCase(), key); - hmac.update(parsedSignature.signingString); - return (hmac.digest('base64') === parsedSignature.params.signature); - } else { - var verify = crypto.createVerify(alg[0]); - verify.update(parsedSignature.signingString); - return verify.verify(key, parsedSignature.params.signature, 'base64'); - } - } - -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/.npmignore deleted file mode 100644 index eb03e3e1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -*.log diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE deleted file mode 100644 index 9b5dcdb7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 Mark Cavage, All rights reserved. - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/README.md deleted file mode 100644 index 7cebf7a2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/README.md +++ /dev/null @@ -1,50 +0,0 @@ -node-asn1 is a library for encoding and decoding ASN.1 datatypes in pure JS. -Currently BER encoding is supported; at some point I'll likely have to do DER. - -## Usage - -Mostly, if you're *actually* needing to read and write ASN.1, you probably don't -need this readme to explain what and why. If you have no idea what ASN.1 is, -see this: ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc - -The source is pretty much self-explanatory, and has read/write methods for the -common types out there. - -### Decoding - -The following reads an ASN.1 sequence with a boolean. - - var Ber = require('asn1').Ber; - - var reader = new Ber.Reader(new Buffer([0x30, 0x03, 0x01, 0x01, 0xff])); - - reader.readSequence(); - console.log('Sequence len: ' + reader.length); - if (reader.peek() === Ber.Boolean) - console.log(reader.readBoolean()); - -### Encoding - -The following generates the same payload as above. - - var Ber = require('asn1').Ber; - - var writer = new Ber.Writer(); - - writer.startSequence(); - writer.writeBoolean(true); - writer.endSequence(); - - console.log(writer.buffer); - -## Installation - - npm install asn1 - -## License - -MIT. - -## Bugs - -See <https://github.com/mcavage/node-asn1/issues>. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js deleted file mode 100644 index ff21d4fa..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. - - -module.exports = { - - newInvalidAsn1Error: function(msg) { - var e = new Error(); - e.name = 'InvalidAsn1Error'; - e.message = msg || ''; - return e; - } - -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js deleted file mode 100644 index 4fb90aea..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. - -var errors = require('./errors'); -var types = require('./types'); - -var Reader = require('./reader'); -var Writer = require('./writer'); - - -///--- Exports - -module.exports = { - - Reader: Reader, - - Writer: Writer - -}; - -for (var t in types) { - if (types.hasOwnProperty(t)) - module.exports[t] = types[t]; -} -for (var e in errors) { - if (errors.hasOwnProperty(e)) - module.exports[e] = errors[e]; -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js deleted file mode 100644 index bd3357a6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. - -var assert = require('assert'); - -var ASN1 = require('./types'); -var errors = require('./errors'); - - -///--- Globals - -var newInvalidAsn1Error = errors.newInvalidAsn1Error; - - - -///--- API - -function Reader(data) { - if (!data || !Buffer.isBuffer(data)) - throw new TypeError('data must be a node Buffer'); - - this._buf = data; - this._size = data.length; - - // These hold the "current" state - this._len = 0; - this._offset = 0; - - var self = this; - this.__defineGetter__('length', function() { return self._len; }); - this.__defineGetter__('offset', function() { return self._offset; }); - this.__defineGetter__('remain', function() { - return self._size - self._offset; - }); - this.__defineGetter__('buffer', function() { - return self._buf.slice(self._offset); - }); -} - - -/** - * Reads a single byte and advances offset; you can pass in `true` to make this - * a "peek" operation (i.e., get the byte, but don't advance the offset). - * - * @param {Boolean} peek true means don't move offset. - * @return {Number} the next byte, null if not enough data. - */ -Reader.prototype.readByte = function(peek) { - if (this._size - this._offset < 1) - return null; - - var b = this._buf[this._offset] & 0xff; - - if (!peek) - this._offset += 1; - - return b; -}; - - -Reader.prototype.peek = function() { - return this.readByte(true); -}; - - -/** - * Reads a (potentially) variable length off the BER buffer. This call is - * not really meant to be called directly, as callers have to manipulate - * the internal buffer afterwards. - * - * As a result of this call, you can call `Reader.length`, until the - * next thing called that does a readLength. - * - * @return {Number} the amount of offset to advance the buffer. - * @throws {InvalidAsn1Error} on bad ASN.1 - */ -Reader.prototype.readLength = function(offset) { - if (offset === undefined) - offset = this._offset; - - if (offset >= this._size) - return null; - - var lenB = this._buf[offset++] & 0xff; - if (lenB === null) - return null; - - if ((lenB & 0x80) == 0x80) { - lenB &= 0x7f; - - if (lenB == 0) - throw newInvalidAsn1Error('Indefinite length not supported'); - - if (lenB > 4) - throw newInvalidAsn1Error('encoding too long'); - - if (this._size - offset < lenB) - return null; - - this._len = 0; - for (var i = 0; i < lenB; i++) - this._len = (this._len << 8) + (this._buf[offset++] & 0xff); - - } else { - // Wasn't a variable length - this._len = lenB; - } - - return offset; -}; - - -/** - * Parses the next sequence in this BER buffer. - * - * To get the length of the sequence, call `Reader.length`. - * - * @return {Number} the sequence's tag. - */ -Reader.prototype.readSequence = function(tag) { - var seq = this.peek(); - if (seq === null) - return null; - if (tag !== undefined && tag !== seq) - throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + - ': got 0x' + seq.toString(16)); - - var o = this.readLength(this._offset + 1); // stored in `length` - if (o === null) - return null; - - this._offset = o; - return seq; -}; - - -Reader.prototype.readInt = function() { - return this._readTag(ASN1.Integer); -}; - - -Reader.prototype.readBoolean = function() { - return (this._readTag(ASN1.Boolean) === 0 ? false : true); -}; - - -Reader.prototype.readEnumeration = function() { - return this._readTag(ASN1.Enumeration); -}; - - -Reader.prototype.readString = function(tag, retbuf) { - if (!tag) - tag = ASN1.OctetString; - - var b = this.peek(); - if (b === null) - return null; - - if (b !== tag) - throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + - ': got 0x' + b.toString(16)); - - var o = this.readLength(this._offset + 1); // stored in `length` - - if (o === null) - return null; - - if (this.length > this._size - o) - return null; - - this._offset = o; - - if (this.length === 0) - return ''; - - var str = this._buf.slice(this._offset, this._offset + this.length); - this._offset += this.length; - - return retbuf ? str : str.toString('utf8'); -}; - -Reader.prototype.readOID = function(tag) { - if (!tag) - tag = ASN1.OID; - - var b = this.peek(); - if (b === null) - return null; - - if (b !== tag) - throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + - ': got 0x' + b.toString(16)); - - var o = this.readLength(this._offset + 1); // stored in `length` - if (o === null) - return null; - - if (this.length > this._size - o) - return null; - - this._offset = o; - - var values = []; - var value = 0; - - for (var i = 0; i < this.length; i++) { - var byte = this._buf[this._offset++] & 0xff; - - value <<= 7; - value += byte & 0x7f; - if ((byte & 0x80) == 0) { - values.push(value); - value = 0; - } - } - - value = values.shift(); - values.unshift(value % 40); - values.unshift((value / 40) >> 0); - - return values.join('.'); -}; - - -Reader.prototype._readTag = function(tag) { - assert.ok(tag !== undefined); - - var b = this.peek(); - - if (b === null) - return null; - - if (b !== tag) - throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + - ': got 0x' + b.toString(16)); - - var o = this.readLength(this._offset + 1); // stored in `length` - if (o === null) - return null; - - if (this.length > 4) - throw newInvalidAsn1Error('Integer too long: ' + this.length); - - if (this.length > this._size - o) - return null; - this._offset = o; - - var fb = this._buf[this._offset++]; - var value = 0; - - value = fb & 0x7F; - for (var i = 1; i < this.length; i++) { - value <<= 8; - value |= (this._buf[this._offset++] & 0xff); - } - - if ((fb & 0x80) == 0x80) - value = -value; - - return value; -}; - - - -///--- Exported API - -module.exports = Reader; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js deleted file mode 100644 index 8aea0001..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. - - -module.exports = { - EOC: 0, - Boolean: 1, - Integer: 2, - BitString: 3, - OctetString: 4, - Null: 5, - OID: 6, - ObjectDescriptor: 7, - External: 8, - Real: 9, // float - Enumeration: 10, - PDV: 11, - Utf8String: 12, - RelativeOID: 13, - Sequence: 16, - Set: 17, - NumericString: 18, - PrintableString: 19, - T61String: 20, - VideotexString: 21, - IA5String: 22, - UTCTime: 23, - GeneralizedTime: 24, - GraphicString: 25, - VisibleString: 26, - GeneralString: 28, - UniversalString: 29, - CharacterString: 30, - BMPString: 31, - Constructor: 32, - Context: 128 -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/writer.js deleted file mode 100644 index 7b445cc6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/writer.js +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. - -var assert = require('assert'); -var ASN1 = require('./types'); -var errors = require('./errors'); - - -///--- Globals - -var newInvalidAsn1Error = errors.newInvalidAsn1Error; - -var DEFAULT_OPTS = { - size: 1024, - growthFactor: 8 -}; - - -///--- Helpers - -function merge(from, to) { - assert.ok(from); - assert.equal(typeof(from), 'object'); - assert.ok(to); - assert.equal(typeof(to), 'object'); - - var keys = Object.getOwnPropertyNames(from); - keys.forEach(function(key) { - if (to[key]) - return; - - var value = Object.getOwnPropertyDescriptor(from, key); - Object.defineProperty(to, key, value); - }); - - return to; -} - - - -///--- API - -function Writer(options) { - options = merge(DEFAULT_OPTS, options || {}); - - this._buf = new Buffer(options.size || 1024); - this._size = this._buf.length; - this._offset = 0; - this._options = options; - - // A list of offsets in the buffer where we need to insert - // sequence tag/len pairs. - this._seq = []; - - var self = this; - this.__defineGetter__('buffer', function() { - if (self._seq.length) - throw new InvalidAsn1Error(self._seq.length + ' unended sequence(s)'); - - return self._buf.slice(0, self._offset); - }); -} - - -Writer.prototype.writeByte = function(b) { - if (typeof(b) !== 'number') - throw new TypeError('argument must be a Number'); - - this._ensure(1); - this._buf[this._offset++] = b; -}; - - -Writer.prototype.writeInt = function(i, tag) { - if (typeof(i) !== 'number') - throw new TypeError('argument must be a Number'); - if (typeof(tag) !== 'number') - tag = ASN1.Integer; - - var sz = 4; - - while ((((i & 0xff800000) === 0) || ((i & 0xff800000) === 0xff800000)) && - (sz > 1)) { - sz--; - i <<= 8; - } - - if (sz > 4) - throw new InvalidAsn1Error('BER ints cannot be > 0xffffffff'); - - this._ensure(2 + sz); - this._buf[this._offset++] = tag; - this._buf[this._offset++] = sz; - - while (sz-- > 0) { - this._buf[this._offset++] = ((i & 0xff000000) >> 24); - i <<= 8; - } - -}; - - -Writer.prototype.writeNull = function() { - this.writeByte(ASN1.Null); - this.writeByte(0x00); -}; - - -Writer.prototype.writeEnumeration = function(i, tag) { - if (typeof(i) !== 'number') - throw new TypeError('argument must be a Number'); - if (typeof(tag) !== 'number') - tag = ASN1.Enumeration; - - return this.writeInt(i, tag); -}; - - -Writer.prototype.writeBoolean = function(b, tag) { - if (typeof(b) !== 'boolean') - throw new TypeError('argument must be a Boolean'); - if (typeof(tag) !== 'number') - tag = ASN1.Boolean; - - this._ensure(3); - this._buf[this._offset++] = tag; - this._buf[this._offset++] = 0x01; - this._buf[this._offset++] = b ? 0xff : 0x00; -}; - - -Writer.prototype.writeString = function(s, tag) { - if (typeof(s) !== 'string') - throw new TypeError('argument must be a string (was: ' + typeof(s) + ')'); - if (typeof(tag) !== 'number') - tag = ASN1.OctetString; - - var len = Buffer.byteLength(s); - this.writeByte(tag); - this.writeLength(len); - if (len) { - this._ensure(len); - this._buf.write(s, this._offset); - this._offset += len; - } -}; - - -Writer.prototype.writeBuffer = function(buf, tag) { - if (typeof(tag) !== 'number') - throw new TypeError('tag must be a number'); - if (!Buffer.isBuffer(buf)) - throw new TypeError('argument must be a buffer'); - - this.writeByte(tag); - this.writeLength(buf.length); - this._ensure(buf.length); - buf.copy(this._buf, this._offset, 0, buf.length); - this._offset += buf.length; -}; - - -Writer.prototype.writeStringArray = function(strings) { - if ((!strings instanceof Array)) - throw new TypeError('argument must be an Array[String]'); - - var self = this; - strings.forEach(function(s) { - self.writeString(s); - }); -}; - -// This is really to solve DER cases, but whatever for now -Writer.prototype.writeOID = function(s, tag) { - if (typeof(s) !== 'string') - throw new TypeError('argument must be a string'); - if (typeof(tag) !== 'number') - tag = ASN1.OID; - - if (!/^([0-9]+\.){3,}[0-9]+$/.test(s)) - throw new Error('argument is not a valid OID string'); - - function encodeOctet(bytes, octet) { - if (octet < 128) { - bytes.push(octet); - } else if (octet < 16384) { - bytes.push((octet >>> 7) | 0x80); - bytes.push(octet & 0x7F); - } else if (octet < 2097152) { - bytes.push((octet >>> 14) | 0x80); - bytes.push(((octet >>> 7) | 0x80) & 0xFF); - bytes.push(octet & 0x7F); - } else if (octet < 268435456) { - bytes.push((octet >>> 21) | 0x80); - bytes.push(((octet >>> 14) | 0x80) & 0xFF); - bytes.push(((octet >>> 7) | 0x80) & 0xFF); - bytes.push(octet & 0x7F); - } else { - bytes.push(((octet >>> 28) | 0x80) & 0xFF); - bytes.push(((octet >>> 21) | 0x80) & 0xFF); - bytes.push(((octet >>> 14) | 0x80) & 0xFF); - bytes.push(((octet >>> 7) | 0x80) & 0xFF); - bytes.push(octet & 0x7F); - } - } - - var tmp = s.split('.'); - var bytes = []; - bytes.push(parseInt(tmp[0], 10) * 40 + parseInt(tmp[1], 10)); - tmp.slice(2).forEach(function(b) { - encodeOctet(bytes, parseInt(b, 10)); - }); - - var self = this; - this._ensure(2 + bytes.length); - this.writeByte(tag); - this.writeLength(bytes.length); - bytes.forEach(function(b) { - self.writeByte(b); - }); -}; - - -Writer.prototype.writeLength = function(len) { - if (typeof(len) !== 'number') - throw new TypeError('argument must be a Number'); - - this._ensure(4); - - if (len <= 0x7f) { - this._buf[this._offset++] = len; - } else if (len <= 0xff) { - this._buf[this._offset++] = 0x81; - this._buf[this._offset++] = len; - } else if (len <= 0xffff) { - this._buf[this._offset++] = 0x82; - this._buf[this._offset++] = len >> 8; - this._buf[this._offset++] = len; - } else if (len <= 0xffffff) { - this._shift(start, len, 1); - this._buf[this._offset++] = 0x83; - this._buf[this._offset++] = len >> 16; - this._buf[this._offset++] = len >> 8; - this._buf[this._offset++] = len; - } else { - throw new InvalidAsn1ERror('Length too long (> 4 bytes)'); - } -}; - -Writer.prototype.startSequence = function(tag) { - if (typeof(tag) !== 'number') - tag = ASN1.Sequence | ASN1.Constructor; - - this.writeByte(tag); - this._seq.push(this._offset); - this._ensure(3); - this._offset += 3; -}; - - -Writer.prototype.endSequence = function() { - var seq = this._seq.pop(); - var start = seq + 3; - var len = this._offset - start; - - if (len <= 0x7f) { - this._shift(start, len, -2); - this._buf[seq] = len; - } else if (len <= 0xff) { - this._shift(start, len, -1); - this._buf[seq] = 0x81; - this._buf[seq + 1] = len; - } else if (len <= 0xffff) { - this._buf[seq] = 0x82; - this._buf[seq + 1] = len >> 8; - this._buf[seq + 2] = len; - } else if (len <= 0xffffff) { - this._shift(start, len, 1); - this._buf[seq] = 0x83; - this._buf[seq + 1] = len >> 16; - this._buf[seq + 2] = len >> 8; - this._buf[seq + 3] = len; - } else { - throw new InvalidAsn1Error('Sequence too long'); - } -}; - - -Writer.prototype._shift = function(start, len, shift) { - assert.ok(start !== undefined); - assert.ok(len !== undefined); - assert.ok(shift); - - this._buf.copy(this._buf, start + shift, start, start + len); - this._offset += shift; -}; - -Writer.prototype._ensure = function(len) { - assert.ok(len); - - if (this._size - this._offset < len) { - var sz = this._size * this._options.growthFactor; - if (sz - this._offset < len) - sz += len; - - var buf = new Buffer(sz); - - this._buf.copy(buf, 0, 0, this._offset); - this._buf = buf; - this._size = sz; - } -}; - - - -///--- Exported API - -module.exports = Writer; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js deleted file mode 100644 index d1766e7a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. - -// If you have no idea what ASN.1 or BER is, see this: -// ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc - -var Ber = require('./ber/index'); - - - -///--- Exported API - -module.exports = { - - Ber: Ber, - - BerReader: Ber.Reader, - - BerWriter: Ber.Writer - -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json deleted file mode 100644 index 8fbee012..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "author": { - "name": "Mark Cavage", - "email": "mcavage@gmail.com" - }, - "contributors": [ - { - "name": "David Gwynne", - "email": "loki@animata.net" - }, - { - "name": "Yunong Xiao", - "email": "yunong@joyent.com" - } - ], - "name": "asn1", - "description": "Contains parsers and serializers for ASN.1 (currently BER only)", - "version": "0.1.11", - "repository": { - "type": "git", - "url": "git://github.com/mcavage/node-asn1.git" - }, - "main": "lib/index.js", - "engines": { - "node": ">=0.4.9" - }, - "dependencies": {}, - "devDependencies": { - "tap": "0.1.4" - }, - "scripts": { - "pretest": "which gjslint; if [[ \"$?\" = 0 ]] ; then gjslint --nojsdoc -r lib -r tst; else echo \"Missing gjslint. Skipping lint\"; fi", - "test": "tap ./tst" - }, - "readme": "node-asn1 is a library for encoding and decoding ASN.1 datatypes in pure JS.\nCurrently BER encoding is supported; at some point I'll likely have to do DER.\n\n## Usage\n\nMostly, if you're *actually* needing to read and write ASN.1, you probably don't\nneed this readme to explain what and why. If you have no idea what ASN.1 is,\nsee this: ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc\n\nThe source is pretty much self-explanatory, and has read/write methods for the\ncommon types out there.\n\n### Decoding\n\nThe following reads an ASN.1 sequence with a boolean.\n\n var Ber = require('asn1').Ber;\n\n var reader = new Ber.Reader(new Buffer([0x30, 0x03, 0x01, 0x01, 0xff]));\n\n reader.readSequence();\n console.log('Sequence len: ' + reader.length);\n if (reader.peek() === Ber.Boolean)\n console.log(reader.readBoolean());\n\n### Encoding\n\nThe following generates the same payload as above.\n\n var Ber = require('asn1').Ber;\n\n var writer = new Ber.Writer();\n\n writer.startSequence();\n writer.writeBoolean(true);\n writer.endSequence();\n\n console.log(writer.buffer);\n\n## Installation\n\n npm install asn1\n\n## License\n\nMIT.\n\n## Bugs\n\nSee <https://github.com/mcavage/node-asn1/issues>.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/mcavage/node-asn1/issues" - }, - "homepage": "https://github.com/mcavage/node-asn1", - "_id": "asn1@0.1.11", - "dist": { - "shasum": "6d27af76b17126a28e5250c7ce288790af7ab63c" - }, - "_from": "asn1@0.1.11", - "_resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/reader.test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/reader.test.js deleted file mode 100644 index 0b78b474..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/reader.test.js +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. - -var test = require('tap').test; - - - -///--- Globals - -var BerReader; - - - -///--- Tests - -test('load library', function(t) { - BerReader = require('../../lib/index').BerReader; - t.ok(BerReader); - try { - new BerReader(); - t.fail('Should have thrown'); - } catch (e) { - t.ok(e instanceof TypeError, 'Should have been a type error'); - } - t.end(); -}); - - -test('read byte', function(t) { - var reader = new BerReader(new Buffer([0xde])); - t.ok(reader); - t.equal(reader.readByte(), 0xde, 'wrong value'); - t.end(); -}); - - -test('read 1 byte int', function(t) { - var reader = new BerReader(new Buffer([0x02, 0x01, 0x03])); - t.ok(reader); - t.equal(reader.readInt(), 0x03, 'wrong value'); - t.equal(reader.length, 0x01, 'wrong length'); - t.end(); -}); - - -test('read 2 byte int', function(t) { - var reader = new BerReader(new Buffer([0x02, 0x02, 0x7e, 0xde])); - t.ok(reader); - t.equal(reader.readInt(), 0x7ede, 'wrong value'); - t.equal(reader.length, 0x02, 'wrong length'); - t.end(); -}); - - -test('read 3 byte int', function(t) { - var reader = new BerReader(new Buffer([0x02, 0x03, 0x7e, 0xde, 0x03])); - t.ok(reader); - t.equal(reader.readInt(), 0x7ede03, 'wrong value'); - t.equal(reader.length, 0x03, 'wrong length'); - t.end(); -}); - - -test('read 4 byte int', function(t) { - var reader = new BerReader(new Buffer([0x02, 0x04, 0x7e, 0xde, 0x03, 0x01])); - t.ok(reader); - t.equal(reader.readInt(), 0x7ede0301, 'wrong value'); - t.equal(reader.length, 0x04, 'wrong length'); - t.end(); -}); - - -test('read boolean true', function(t) { - var reader = new BerReader(new Buffer([0x01, 0x01, 0xff])); - t.ok(reader); - t.equal(reader.readBoolean(), true, 'wrong value'); - t.equal(reader.length, 0x01, 'wrong length'); - t.end(); -}); - - -test('read boolean false', function(t) { - var reader = new BerReader(new Buffer([0x01, 0x01, 0x00])); - t.ok(reader); - t.equal(reader.readBoolean(), false, 'wrong value'); - t.equal(reader.length, 0x01, 'wrong length'); - t.end(); -}); - - -test('read enumeration', function(t) { - var reader = new BerReader(new Buffer([0x0a, 0x01, 0x20])); - t.ok(reader); - t.equal(reader.readEnumeration(), 0x20, 'wrong value'); - t.equal(reader.length, 0x01, 'wrong length'); - t.end(); -}); - - -test('read string', function(t) { - var dn = 'cn=foo,ou=unit,o=test'; - var buf = new Buffer(dn.length + 2); - buf[0] = 0x04; - buf[1] = Buffer.byteLength(dn); - buf.write(dn, 2); - var reader = new BerReader(buf); - t.ok(reader); - t.equal(reader.readString(), dn, 'wrong value'); - t.equal(reader.length, dn.length, 'wrong length'); - t.end(); -}); - - -test('read sequence', function(t) { - var reader = new BerReader(new Buffer([0x30, 0x03, 0x01, 0x01, 0xff])); - t.ok(reader); - t.equal(reader.readSequence(), 0x30, 'wrong value'); - t.equal(reader.length, 0x03, 'wrong length'); - t.equal(reader.readBoolean(), true, 'wrong value'); - t.equal(reader.length, 0x01, 'wrong length'); - t.end(); -}); - - -test('anonymous LDAPv3 bind', function(t) { - var BIND = new Buffer(14); - BIND[0] = 0x30; // Sequence - BIND[1] = 12; // len - BIND[2] = 0x02; // ASN.1 Integer - BIND[3] = 1; // len - BIND[4] = 0x04; // msgid (make up 4) - BIND[5] = 0x60; // Bind Request - BIND[6] = 7; // len - BIND[7] = 0x02; // ASN.1 Integer - BIND[8] = 1; // len - BIND[9] = 0x03; // v3 - BIND[10] = 0x04; // String (bind dn) - BIND[11] = 0; // len - BIND[12] = 0x80; // ContextSpecific (choice) - BIND[13] = 0; // simple bind - - // Start testing ^^ - var ber = new BerReader(BIND); - t.equal(ber.readSequence(), 48, 'Not an ASN.1 Sequence'); - t.equal(ber.length, 12, 'Message length should be 12'); - t.equal(ber.readInt(), 4, 'Message id should have been 4'); - t.equal(ber.readSequence(), 96, 'Bind Request should have been 96'); - t.equal(ber.length, 7, 'Bind length should have been 7'); - t.equal(ber.readInt(), 3, 'LDAP version should have been 3'); - t.equal(ber.readString(), '', 'Bind DN should have been empty'); - t.equal(ber.length, 0, 'string length should have been 0'); - t.equal(ber.readByte(), 0x80, 'Should have been ContextSpecific (choice)'); - t.equal(ber.readByte(), 0, 'Should have been simple bind'); - t.equal(null, ber.readByte(), 'Should be out of data'); - t.end(); -}); - - -test('long string', function(t) { - var buf = new Buffer(256); - var o; - var s = - '2;649;CN=Red Hat CS 71GA Demo,O=Red Hat CS 71GA Demo,C=US;' + - 'CN=RHCS Agent - admin01,UID=admin01,O=redhat,C=US [1] This is ' + - 'Teena Vradmin\'s description.'; - buf[0] = 0x04; - buf[1] = 0x81; - buf[2] = 0x94; - buf.write(s, 3); - var ber = new BerReader(buf.slice(0, 3 + s.length)); - t.equal(ber.readString(), s); - t.end(); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js deleted file mode 100644 index add0b9fd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. - -var test = require('tap').test; -var sys = require('sys'); - -///--- Globals - -var BerWriter; - -var BerReader; - - -///--- Tests - -test('load library', function(t) { - BerWriter = require('../../lib/index').BerWriter; - t.ok(BerWriter); - t.ok(new BerWriter()); - t.end(); -}); - - -test('write byte', function(t) { - var writer = new BerWriter(); - - writer.writeByte(0xC2); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 1, 'Wrong length'); - t.equal(ber[0], 0xC2, 'value wrong'); - - t.end(); -}); - - -test('write 1 byte int', function(t) { - var writer = new BerWriter(); - - writer.writeInt(0x7f); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 3, 'Wrong length for an int: ' + ber.length); - t.equal(ber[0], 0x02, 'ASN.1 tag wrong (2) -> ' + ber[0]); - t.equal(ber[1], 0x01, 'length wrong(1) -> ' + ber[1]); - t.equal(ber[2], 0x7f, 'value wrong(3) -> ' + ber[2]); - - t.end(); -}); - - -test('write 2 byte int', function(t) { - var writer = new BerWriter(); - - writer.writeInt(0x7ffe); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 4, 'Wrong length for an int'); - t.equal(ber[0], 0x02, 'ASN.1 tag wrong'); - t.equal(ber[1], 0x02, 'length wrong'); - t.equal(ber[2], 0x7f, 'value wrong (byte 1)'); - t.equal(ber[3], 0xfe, 'value wrong (byte 2)'); - - t.end(); -}); - - -test('write 3 byte int', function(t) { - var writer = new BerWriter(); - - writer.writeInt(0x7ffffe); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 5, 'Wrong length for an int'); - t.equal(ber[0], 0x02, 'ASN.1 tag wrong'); - t.equal(ber[1], 0x03, 'length wrong'); - t.equal(ber[2], 0x7f, 'value wrong (byte 1)'); - t.equal(ber[3], 0xff, 'value wrong (byte 2)'); - t.equal(ber[4], 0xfe, 'value wrong (byte 3)'); - - t.end(); -}); - - -test('write 4 byte int', function(t) { - var writer = new BerWriter(); - - writer.writeInt(0x7ffffffe); - var ber = writer.buffer; - - t.ok(ber); - - t.equal(ber.length, 6, 'Wrong length for an int'); - t.equal(ber[0], 0x02, 'ASN.1 tag wrong'); - t.equal(ber[1], 0x04, 'length wrong'); - t.equal(ber[2], 0x7f, 'value wrong (byte 1)'); - t.equal(ber[3], 0xff, 'value wrong (byte 2)'); - t.equal(ber[4], 0xff, 'value wrong (byte 3)'); - t.equal(ber[5], 0xfe, 'value wrong (byte 4)'); - - t.end(); -}); - - -test('write boolean', function(t) { - var writer = new BerWriter(); - - writer.writeBoolean(true); - writer.writeBoolean(false); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 6, 'Wrong length'); - t.equal(ber[0], 0x01, 'tag wrong'); - t.equal(ber[1], 0x01, 'length wrong'); - t.equal(ber[2], 0xff, 'value wrong'); - t.equal(ber[3], 0x01, 'tag wrong'); - t.equal(ber[4], 0x01, 'length wrong'); - t.equal(ber[5], 0x00, 'value wrong'); - - t.end(); -}); - - -test('write string', function(t) { - var writer = new BerWriter(); - writer.writeString('hello world'); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 13, 'wrong length'); - t.equal(ber[0], 0x04, 'wrong tag'); - t.equal(ber[1], 11, 'wrong length'); - t.equal(ber.slice(2).toString('utf8'), 'hello world', 'wrong value'); - - t.end(); -}); - -test('write buffer', function(t) { - var writer = new BerWriter(); - // write some stuff to start with - writer.writeString('hello world'); - var ber = writer.buffer; - var buf = new Buffer([0x04, 0x0b, 0x30, 0x09, 0x02, 0x01, 0x0f, 0x01, 0x01, - 0xff, 0x01, 0x01, 0xff]); - writer.writeBuffer(buf.slice(2, buf.length), 0x04); - ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 26, 'wrong length'); - t.equal(ber[0], 0x04, 'wrong tag'); - t.equal(ber[1], 11, 'wrong length'); - t.equal(ber.slice(2, 13).toString('utf8'), 'hello world', 'wrong value'); - t.equal(ber[13], buf[0], 'wrong tag'); - t.equal(ber[14], buf[1], 'wrong length'); - for (var i = 13, j = 0; i < ber.length && j < buf.length; i++, j++) { - t.equal(ber[i], buf[j], 'buffer contents not identical'); - } - t.end(); -}); - -test('write string array', function(t) { - var writer = new BerWriter(); - writer.writeStringArray(['hello world', 'fubar!']); - var ber = writer.buffer; - - t.ok(ber); - - t.equal(ber.length, 21, 'wrong length'); - t.equal(ber[0], 0x04, 'wrong tag'); - t.equal(ber[1], 11, 'wrong length'); - t.equal(ber.slice(2, 13).toString('utf8'), 'hello world', 'wrong value'); - - t.equal(ber[13], 0x04, 'wrong tag'); - t.equal(ber[14], 6, 'wrong length'); - t.equal(ber.slice(15).toString('utf8'), 'fubar!', 'wrong value'); - - t.end(); -}); - - -test('resize internal buffer', function(t) { - var writer = new BerWriter({size: 2}); - writer.writeString('hello world'); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 13, 'wrong length'); - t.equal(ber[0], 0x04, 'wrong tag'); - t.equal(ber[1], 11, 'wrong length'); - t.equal(ber.slice(2).toString('utf8'), 'hello world', 'wrong value'); - - t.end(); -}); - - -test('sequence', function(t) { - var writer = new BerWriter({size: 25}); - writer.startSequence(); - writer.writeString('hello world'); - writer.endSequence(); - var ber = writer.buffer; - - t.ok(ber); - console.log(ber); - t.equal(ber.length, 15, 'wrong length'); - t.equal(ber[0], 0x30, 'wrong tag'); - t.equal(ber[1], 13, 'wrong length'); - t.equal(ber[2], 0x04, 'wrong tag'); - t.equal(ber[3], 11, 'wrong length'); - t.equal(ber.slice(4).toString('utf8'), 'hello world', 'wrong value'); - - t.end(); -}); - - -test('nested sequence', function(t) { - var writer = new BerWriter({size: 25}); - writer.startSequence(); - writer.writeString('hello world'); - writer.startSequence(); - writer.writeString('hello world'); - writer.endSequence(); - writer.endSequence(); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 30, 'wrong length'); - t.equal(ber[0], 0x30, 'wrong tag'); - t.equal(ber[1], 28, 'wrong length'); - t.equal(ber[2], 0x04, 'wrong tag'); - t.equal(ber[3], 11, 'wrong length'); - t.equal(ber.slice(4, 15).toString('utf8'), 'hello world', 'wrong value'); - t.equal(ber[15], 0x30, 'wrong tag'); - t.equal(ber[16], 13, 'wrong length'); - t.equal(ber[17], 0x04, 'wrong tag'); - t.equal(ber[18], 11, 'wrong length'); - t.equal(ber.slice(19, 30).toString('utf8'), 'hello world', 'wrong value'); - - t.end(); -}); - - -test('LDAP bind message', function(t) { - var dn = 'cn=foo,ou=unit,o=test'; - var writer = new BerWriter(); - writer.startSequence(); - writer.writeInt(3); // msgid = 3 - writer.startSequence(0x60); // ldap bind - writer.writeInt(3); // ldap v3 - writer.writeString(dn); - writer.writeByte(0x80); - writer.writeByte(0x00); - writer.endSequence(); - writer.endSequence(); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 35, 'wrong length (buffer)'); - t.equal(ber[0], 0x30, 'wrong tag'); - t.equal(ber[1], 33, 'wrong length'); - t.equal(ber[2], 0x02, 'wrong tag'); - t.equal(ber[3], 1, 'wrong length'); - t.equal(ber[4], 0x03, 'wrong value'); - t.equal(ber[5], 0x60, 'wrong tag'); - t.equal(ber[6], 28, 'wrong length'); - t.equal(ber[7], 0x02, 'wrong tag'); - t.equal(ber[8], 1, 'wrong length'); - t.equal(ber[9], 0x03, 'wrong value'); - t.equal(ber[10], 0x04, 'wrong tag'); - t.equal(ber[11], dn.length, 'wrong length'); - t.equal(ber.slice(12, 33).toString('utf8'), dn, 'wrong value'); - t.equal(ber[33], 0x80, 'wrong tag'); - t.equal(ber[34], 0x00, 'wrong len'); - - t.end(); -}); - - -test('Write OID', function(t) { - var oid = '1.2.840.113549.1.1.1'; - var writer = new BerWriter(); - writer.writeOID(oid); - - var ber = writer.buffer; - t.ok(ber); - console.log(require('util').inspect(ber)); - console.log(require('util').inspect(new Buffer([0x06, 0x09, 0x2a, 0x86, - 0x48, 0x86, 0xf7, 0x0d, - 0x01, 0x01, 0x01]))); - - t.end(); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md deleted file mode 100644 index c0c3a530..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md +++ /dev/null @@ -1,126 +0,0 @@ -# node-assert-plus - -This library is a super small wrapper over node's assert module that has two -things: (1) the ability to disable assertions with the environment variable -NODE_NDEBUG, and (2) some API wrappers for argument testing. Like -`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks -like this: - - var assert = require('assert-plus'); - - function fooAccount(options, callback) { - assert.object(options, 'options'); - assert.number(options.id, 'options.id); - assert.bool(options.isManager, 'options.isManager'); - assert.string(options.name, 'options.name'); - assert.arrayOfString(options.email, 'options.email'); - assert.func(callback, 'callback'); - - // Do stuff - callback(null, {}); - } - -# API - -All methods that *aren't* part of node's core assert API are simply assumed to -take an argument, and then a string 'name' that's not a message; `AssertionError` -will be thrown if the assertion fails with a message like: - - AssertionError: foo (string) is required - at test (/home/mark/work/foo/foo.js:3:9) - at Object.<anonymous> (/home/mark/work/foo/foo.js:15:1) - at Module._compile (module.js:446:26) - at Object..js (module.js:464:10) - at Module.load (module.js:353:31) - at Function._load (module.js:311:12) - at Array.0 (module.js:484:10) - at EventEmitter._tickCallback (node.js:190:38) - -from: - - function test(foo) { - assert.string(foo, 'foo'); - } - -There you go. You can check that arrays are of a homogenous type with `Arrayof$Type`: - - function test(foo) { - assert.arrayOfString(foo, 'foo'); - } - -You can assert IFF an argument is not `undefined` (i.e., an optional arg): - - assert.optionalString(foo, 'foo'); - -Lastly, you can opt-out of assertion checking altogether by setting the -environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have -lots of assertions, and don't want to pay `typeof ()` taxes to v8 in -production. - -The complete list of APIs is: - -* assert.bool -* assert.buffer -* assert.func -* assert.number -* assert.object -* assert.string -* assert.arrayOfBool -* assert.arrayOfFunc -* assert.arrayOfNumber -* assert.arrayOfObject -* assert.arrayOfString -* assert.optionalBool -* assert.optionalBuffer -* assert.optionalFunc -* assert.optionalNumber -* assert.optionalObject -* assert.optionalString -* assert.optionalArrayOfBool -* assert.optionalArrayOfFunc -* assert.optionalArrayOfNumber -* assert.optionalArrayOfObject -* assert.optionalArrayOfString -* assert.AssertionError -* assert.fail -* assert.ok -* assert.equal -* assert.notEqual -* assert.deepEqual -* assert.notDeepEqual -* assert.strictEqual -* assert.notStrictEqual -* assert.throws -* assert.doesNotThrow -* assert.ifError - -# Installation - - npm install assert-plus - -## License - -The MIT License (MIT) -Copyright (c) 2012 Mark Cavage - -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. - -## Bugs - -See <https://github.com/mcavage/node-assert-plus/issues>. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js deleted file mode 100644 index 70583f12..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) 2012, Mark Cavage. All rights reserved. - -var assert = require('assert'); -var Stream = require('stream').Stream; -var util = require('util'); - - - -///--- Globals - -var NDEBUG = process.env.NODE_NDEBUG || false; - - - -///--- Messages - -var ARRAY_TYPE_REQUIRED = '%s ([%s]) required'; -var TYPE_REQUIRED = '%s (%s) is required'; - - - -///--- Internal - -function capitalize(str) { - return (str.charAt(0).toUpperCase() + str.slice(1)); -} - -function uncapitalize(str) { - return (str.charAt(0).toLowerCase() + str.slice(1)); -} - -function _() { - return (util.format.apply(util, arguments)); -} - - -function _assert(arg, type, name, stackFunc) { - if (!NDEBUG) { - name = name || type; - stackFunc = stackFunc || _assert.caller; - var t = typeof (arg); - - if (t !== type) { - throw new assert.AssertionError({ - message: _(TYPE_REQUIRED, name, type), - actual: t, - expected: type, - operator: '===', - stackStartFunction: stackFunc - }); - } - } -} - - - -///--- API - -function array(arr, type, name) { - if (!NDEBUG) { - name = name || type; - - if (!Array.isArray(arr)) { - throw new assert.AssertionError({ - message: _(ARRAY_TYPE_REQUIRED, name, type), - actual: typeof (arr), - expected: 'array', - operator: 'Array.isArray', - stackStartFunction: array.caller - }); - } - - for (var i = 0; i < arr.length; i++) { - _assert(arr[i], type, name, array); - } - } -} - - -function bool(arg, name) { - _assert(arg, 'boolean', name, bool); -} - - -function buffer(arg, name) { - if (!Buffer.isBuffer(arg)) { - throw new assert.AssertionError({ - message: _(TYPE_REQUIRED, name, type), - actual: typeof (arg), - expected: 'buffer', - operator: 'Buffer.isBuffer', - stackStartFunction: buffer - }); - } -} - - -function func(arg, name) { - _assert(arg, 'function', name); -} - - -function number(arg, name) { - _assert(arg, 'number', name); -} - - -function object(arg, name) { - _assert(arg, 'object', name); -} - - -function stream(arg, name) { - if (!(arg instanceof Stream)) { - throw new assert.AssertionError({ - message: _(TYPE_REQUIRED, name, type), - actual: typeof (arg), - expected: 'Stream', - operator: 'instanceof', - stackStartFunction: buffer - }); - } -} - - -function string(arg, name) { - _assert(arg, 'string', name); -} - - - -///--- Exports - -module.exports = { - bool: bool, - buffer: buffer, - func: func, - number: number, - object: object, - stream: stream, - string: string -}; - - -Object.keys(module.exports).forEach(function (k) { - if (k === 'buffer') - return; - - var name = 'arrayOf' + capitalize(k); - - if (k === 'bool') - k = 'boolean'; - if (k === 'func') - k = 'function'; - module.exports[name] = function (arg, name) { - array(arg, k, name); - }; -}); - -Object.keys(module.exports).forEach(function (k) { - var _name = 'optional' + capitalize(k); - var s = uncapitalize(k.replace('arrayOf', '')); - if (s === 'bool') - s = 'boolean'; - if (s === 'func') - s = 'function'; - - if (k.indexOf('arrayOf') !== -1) { - module.exports[_name] = function (arg, name) { - if (!NDEBUG && arg !== undefined) { - array(arg, s, name); - } - }; - } else { - module.exports[_name] = function (arg, name) { - if (!NDEBUG && arg !== undefined) { - _assert(arg, s, name); - } - }; - } -}); - - -// Reexport built-in assertions -Object.keys(assert).forEach(function (k) { - if (k === 'AssertionError') { - module.exports[k] = assert[k]; - return; - } - - module.exports[k] = function () { - if (!NDEBUG) { - assert[k].apply(assert[k], arguments); - } - }; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json deleted file mode 100644 index aade0f97..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "author": { - "name": "Mark Cavage", - "email": "mcavage@gmail.com" - }, - "name": "assert-plus", - "description": "Extra assertions on top of node's assert module", - "version": "0.1.2", - "main": "./assert.js", - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "engines": { - "node": ">=0.6" - }, - "readme": "# node-assert-plus\n\nThis library is a super small wrapper over node's assert module that has two\nthings: (1) the ability to disable assertions with the environment variable\nNODE_NDEBUG, and (2) some API wrappers for argument testing. Like\n`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks\nlike this:\n\n var assert = require('assert-plus');\n\n function fooAccount(options, callback) {\n\t assert.object(options, 'options');\n\t\tassert.number(options.id, 'options.id);\n\t\tassert.bool(options.isManager, 'options.isManager');\n\t\tassert.string(options.name, 'options.name');\n\t\tassert.arrayOfString(options.email, 'options.email');\n\t\tassert.func(callback, 'callback');\n\n // Do stuff\n\t\tcallback(null, {});\n }\n\n# API\n\nAll methods that *aren't* part of node's core assert API are simply assumed to\ntake an argument, and then a string 'name' that's not a message; `AssertionError`\nwill be thrown if the assertion fails with a message like:\n\n AssertionError: foo (string) is required\n\tat test (/home/mark/work/foo/foo.js:3:9)\n\tat Object.<anonymous> (/home/mark/work/foo/foo.js:15:1)\n\tat Module._compile (module.js:446:26)\n\tat Object..js (module.js:464:10)\n\tat Module.load (module.js:353:31)\n\tat Function._load (module.js:311:12)\n\tat Array.0 (module.js:484:10)\n\tat EventEmitter._tickCallback (node.js:190:38)\n\nfrom:\n\n function test(foo) {\n\t assert.string(foo, 'foo');\n }\n\nThere you go. You can check that arrays are of a homogenous type with `Arrayof$Type`:\n\n function test(foo) {\n\t assert.arrayOfString(foo, 'foo');\n }\n\nYou can assert IFF an argument is not `undefined` (i.e., an optional arg):\n\n assert.optionalString(foo, 'foo');\n\nLastly, you can opt-out of assertion checking altogether by setting the\nenvironment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have\nlots of assertions, and don't want to pay `typeof ()` taxes to v8 in\nproduction.\n\nThe complete list of APIs is:\n\n* assert.bool\n* assert.buffer\n* assert.func\n* assert.number\n* assert.object\n* assert.string\n* assert.arrayOfBool\n* assert.arrayOfFunc\n* assert.arrayOfNumber\n* assert.arrayOfObject\n* assert.arrayOfString\n* assert.optionalBool\n* assert.optionalBuffer\n* assert.optionalFunc\n* assert.optionalNumber\n* assert.optionalObject\n* assert.optionalString\n* assert.optionalArrayOfBool\n* assert.optionalArrayOfFunc\n* assert.optionalArrayOfNumber\n* assert.optionalArrayOfObject\n* assert.optionalArrayOfString\n* assert.AssertionError\n* assert.fail\n* assert.ok\n* assert.equal\n* assert.notEqual\n* assert.deepEqual\n* assert.notDeepEqual\n* assert.strictEqual\n* assert.notStrictEqual\n* assert.throws\n* assert.doesNotThrow\n* assert.ifError\n\n# Installation\n\n npm install assert-plus\n\n## License\n\nThe MIT License (MIT)\nCopyright (c) 2012 Mark Cavage\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n## Bugs\n\nSee <https://github.com/mcavage/node-assert-plus/issues>.\n", - "readmeFilename": "README.md", - "_id": "assert-plus@0.1.2", - "dist": { - "shasum": "53cfb5f7859525b28cbf0ba62afc8971ca7ad1a1" - }, - "_from": "assert-plus@0.1.2", - "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG deleted file mode 100644 index 078c03ca..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG +++ /dev/null @@ -1,71 +0,0 @@ -This contains tickets fixed in each version release in reverse chronological -order. There is one ticket per line. Each commits message has the tickets fixed -in it. The commit message also has the corresponding github issue. i.e. CTYPE-42 -would be issue 42. Each issue can be found at: -https://github.com/rmustacc/node-ctype/issues/%d. - -CTYPE v0.5.2 -CTYPE-46 Release 0.5.2 -CTYPE-45 error in setEndian logic - -v0.5.1 -CTYPE-44 Release 0.5.1 -Contributed by Terin Stock: -CTYPE-41 CTypeParser.writeStruct should return its offset -Contributed by Terin Stock: -CTYPE-42 int64_t returns wrong size - -v0.5.0 -CTYPE-40 Release 0.5.0 -CTYPE-39 want > 0.6 engine support - -v0.4.0 -CTYPE-37 Release v0.4.0 -CTYPE-6 want additional entry point for write -CTYPE-20 Add 64-bit int support into core parser -CTYPE-31 Fix bounds errors node/2129 -CTYPE-33 Update copyright holders -CTYPE-34 ctf.js confuses sign bit. -CTYPE-35 Make the README more useful for getting started -CTYPE-36 want manual page on ctio functions - -v0.3.1 -CTYPE-29 Release 0.3.1 -CTYPE-28 Want v0.6 npm support - -v0.3.0 -CTYPE-27 Release v0.3.0 -CTYPE-26 Want alternate default char behavior - -v0.2.1 -CTYPE-25 Release v0.2.1 -CTYPE-24 Writing structs is busted - -v0.2.0: -CTYPE-23 Release v0.2.0 -CTYPE-21 Add support for CTF JSON data -CTYPE-22 Add Javascriptlint profile -CTYPE-15 Pull in ctio updates from node/master - -v0.1.0: -CTYPE-18 Bump version to v0.1.0 -CTYPE-17 Fix nested structures -CTYPE-16 Remove extraneous logging -CTYPE-14 toAbs64 and toApprox64 are not exported - -v0.0.3: -CTYPE-12 Bump version to v0.0.3 -CTYPE-11 fix typo in wuint64 -CTYPE-10 Integrate jsstyle - -v0.0.2: -CTYPE-8 dump npm version to v0.0.2 -CTYPE-9 want changelog -CTYPE-7 fix typo in detypes. - -v0.0.1: -CTYPE-5 Missing from NPM registry -CTYPE-4 int16_t calls wrong read function -CTYPE-3 API example types are missing quotes as strings -CTYPE-2 doc missing 64-bit functions -CTYPE-1 Need license diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE deleted file mode 100644 index 22ced3e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -The following license applies to all files unless the file is specified below. -Each file specified below has its license information embedded in it: - -tools/jsstyle - -Copyright 2011, Robert Mustacchi. All rights reserved. -Copyright 2011, Joyent, Inc. All rights reserved. -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/README b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/README deleted file mode 100644 index 4efd7ee5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/README +++ /dev/null @@ -1,82 +0,0 @@ -Node-CType is a way to read and write binary data in structured and easy to use -format. Its name comes from the C header file. - -To get started, simply clone the repository or use npm to install it. Once it is -there, simply require it. - -git clone git://github.com/rmustacc/node-ctype -npm install ctype -var mod_ctype = require('ctype') - - -There are two APIs that you can use, depending on what abstraction you'd like. -The low level API let's you read and write individual integers and floats from -buffers. The higher level API let's you read and write structures of these. To -illustrate this, let's looks look at how we would read and write a binary -encoded x,y point. - -In C we would define this structure as follows: - -typedef struct point { - uint16_t p_x; - uint16_t p_y; -} point_t; - -To read a binary encoded point from a Buffer, we first need to create a CType -parser (where we specify the endian and other options) and add the typedef. - -var parser = new mod_ctype.Parser({ endian: 'big' }); -parser.typedef('point_t', [ - { x: { type: 'uint16_t' } }, - { y: { type: 'uint16_t' } } -]); - -From here, given a buffer buf and an offset into it, we can read a point. - -var out = parser.readData([ { point: { type: 'point_t' } } ], buffer, 0); -console.log(out); -{ point: { x: 23, y: 42 } } - -Another way to get the same information would be to use the low level methods. -Note that these require you to manually deal with the offset. Here's how we'd -get the same values of x and y from the buffer. - -var x = mod_ctype.ruint16(buf, 'big', 0); -var y = mod_ctype.ruint16(buf, 'big', 2); -console.log(x + ', ' + y); -23, 42 - -The true power of this API comes from the ability to define and nest typedefs, -just as you would in C. By default, the following types are defined by default. -Note that they return a Number, unless indicated otherwise. - - * int8_t - * int16_t - * int32_t - * int64_t (returns an array where val[0] << 32 + val[1] would be the value) - * uint8_t - * uint16_t - * uint32_t - * uint64_t (returns an array where val[0] << 32 + val[1] would be the value) - * float - * double - * char (either returns a buffer with that character or a uint8_t) - * char[] (returns an object with the buffer and the number of characters read which is either the total amount requested or until the first 0) - - -ctf2json integration: - -Node-CType supports consuming the output of ctf2json. Once you read in a JSON file, -all you have to do to add all the definitions it contains is: - -var data, parser; -data = JSON.parse(parsedJSONData); -parser = mod_ctype.parseCTF(data, { endian: 'big' }); - -For more documentation, see the file README.old. Full documentation is in the -process of being rewritten as a series of manual pages which will be available -in the repository and online for viewing. - -To read the ctio manual page simple run, from the root of the workspace: - -man -Mman -s 3ctype ctio diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/README.old b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/README.old deleted file mode 100644 index 9326b725..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/README.old +++ /dev/null @@ -1,298 +0,0 @@ -This library provides a way to read and write binary data. - -Node CType is a way to read and write binary data in structured and easy to use -formats. It's name comes from the header file, though it does not share as much -with it as it perhaps should. - -There are two levels of the API. One is the raw API which everything is built on -top of, while the other provides a much nicer abstraction and is built entirely -by using the lower level API. The hope is that the low level API is both clear -and useful. The low level API gets it's names from stdint.h (a rather -appropriate source). The lower level API is presented at the end of this -document. - -Standard CType API - -The CType interface is presented as a parser object that controls the -endianness combined with a series of methods to change that value, parse and -write out buffers, and a way to provide typedefs. Standard Types - -The CType parser supports the following basic types which return Numbers except -as indicated: - - * int8_t - * int16_t - * int32_t - * int64_t (returns an array where val[0] << 32 + val[1] would be the value) - * uint8_t - * uint16_t - * uint32_t - * uint64_t (returns an array where val[0] << 32 + val[1] would be the value) - * float - * double - * char (returns a buffer with just that single character) - * char[] (returns an object with the buffer and the number of characters read which is either the total amount requested or until the first 0) - -Specifying Structs - -The CType parser also supports the notion of structs. A struct is an array of -JSON objects that defines an order of keys which have types and values. One -would build a struct to represent a point (x,y) as follows: - -[ - { x: { type: 'int16_t' }}, - { y: { type: 'int16_t' }} -] - -When this is passed into the read routine, it would read the first two bytes -(as defined by int16_t) to determine the Number to use for X, and then it would -read the next two bytes to determine the value of Y. When read this could -return something like: - -{ - x: 42, - y: -23 -} - -When someone wants to write values, we use the same format as above, but with -additional value field: - -[ - { x: { type: 'int16_t', value: 42 }}, - { y: { type: 'int16_t', value: -23 }} -] - -Now, the structure above may be optionally annotated with offsets. This tells -us to rather than read continuously we should read the given value at the -specified offset. If an offset is provided, it is is effectively the equivalent -of lseek(offset, SEEK_SET). Thus, subsequent values will be read from that -offset and incremented by the appropriate value. As an example: - -[ - { x: { type: 'int16_t' }}, - { y: { type: 'int16_t', offset: 20 }}, - { z: { type: 'int16_t' }} -] - -We would read x from the first starting offset given to us, for the sake of -example, let's assume that's 0. After reading x, the next offset to read from -would be 2; however, y specifies an offset, thus we jump directly to that -offset and read y from byte 20. We would then read z from byte 22. - -The same offsets may be used when writing values. - -Typedef - -The basic set of types while covers the basics, is somewhat limiting. To make -this richer, there is functionality to typedef something like in C. One can use -typedef to add a new name to an existing type or to define a name to refer to a -struct. Thus the following are all examples of a typedef: - -typedef('size_t', 'uint32_t'); -typedef('ssize_t', 'int32_t'); -typedef('point_t', [ - { x: { type: 'int16_t' }}, - { y: { type: 'int16_t' }} -]); - -Once something has been typedef'd it can be used in any of the definitions -previously shown. - -One cannot remove a typedef once created, this is analogous to C. - -The set of defined types can be printed with lstypes. The format of this output -is subject to change, but likely will look something like: - -> lstypes(); -{ - size_t: 'uint32_t', - ssize_t: 'int32_t', - point_t: [ - { x: { type: 'int16_t' }}, - { y: { type: 'int16_t' }} - ] -} - -Specifying arrays - -Arrays can be specified by appending []s to a type. Arrays must have the size -specified. The size must be specified and it can be done in one of two ways: - - * An explicit non-zero integer size - * A name of a previously declared variable in the struct whose value is a - number. - -Note, that when using the name of a variable, it should be the string name for -the key. This is only valid inside structs and the value must be declared -before the value with the array. The following are examples: - -[ - { ip_addr4: { type: 'uint8_t[4]' }}, - { len: { type: 'uint32_t' }}, - { data: { type: 'uint8_t[len]' }} -] - -Arrays are permitted in typedefs; however, they must have a declared integer -size. The following are examples of valid and invalid arrays: - -typedef('path', 'char[1024]'); /* Good */ -typedef('path', 'char[len]'); /* Bad! */ - -64 bit values: - -Unfortunately Javascript represents values with a double, so you lose precision -and the ability to represent Integers roughly beyond 2^53. To alleviate this, I -propose the following for returning 64 bit integers when read: - -value[2]: Each entry is a 32 bit number which can be reconstructed to the -original by the following formula: - -value[0] << 32 + value[1] (Note this will not work in Javascript) - -CTF JSON data: - -node-ctype can also handle JSON data that mathces the format described in the -documentation of the tool ctf2json. Given the JSON data which specifies type -information, it will transform that into a parser that understands all of the -types defined inside of it. This is useful for more complicated structures that -have a lot of typedefs. - -Interface overview - -The following is the header-file like interface to the parser object: - -/* - * Create a new instance of the parser. Each parser has its own store of - * typedefs and endianness. Conf is an object with the following values: - * - * endian Either 'big' or 'little' do determine the endianness we - * want to read from or write to. - * - */ -function CTypeParser(conf); - -/* - * Parses the CTF JSON data and creates a parser that understands all of those - * types. - * - * data Parsed JSON data that maches that CTF JSON - * specification. - * - * conf The configuration object to create a new CTypeParser - * from. - */ -CTypeParser parseCTF(data, conf); - -/* - * This is what we were born to do. We read the data from a buffer and return it - * in an object whose keys match the values from the object. - * - * def The array definition of the data to read in - * - * buffer The buffer to read data from - * - * offset The offset to start writing to - * - * Returns an object where each key corresponds to an entry in def and the value - * is the read value. - */ -Object CTypeParser.readData(<Type Definition>, buffer, offset); - -/* - * This is the second half of what we were born to do, write out the data - * itself. - * - * def The array definition of the data to write out with - * values - * - * buffer The buffer to write to - * - * offset The offset in the buffer to write to - */ -void CTypeParser.writeData(<Type Definition>, buffer, offset); - -/* - * A user has requested to add a type, let us honor their request. Yet, if their - * request doth spurn us, send them unto the Hells which Dante describes. - * - * name The string for the type definition we're adding - * - * value Either a string that is a type/array name or an object - * that describes a struct. - */ -void CTypeParser.prototype.typedef(name, value); - -Object CTypeParser.prototype.lstypes(); - -/* - * Get the endian value for the current parser - */ -String CTypeParser.prototype.getEndian(); - -/* - * Sets the current endian value for the Parser. If the value is not valid, - * throws an Error. - * - * endian Either 'big' or 'little' do determine the endianness we - * want to read from or write to. - * - */ -void CTypeParser.protoype.setEndian(String); - -/* - * Attempts to convert an array of two integers returned from rsint64 / ruint64 - * into an absolute 64 bit number. If however the value would exceed 2^52 this - * will instead throw an error. The mantissa in a double is a 52 bit number and - * rather than potentially give you a value that is an approximation this will - * error. If you would rather an approximation, please see toApprox64. - * - * val An array of two 32-bit integers - */ -Number function toAbs64(val) - -/* - * Will return the 64 bit value as returned in an array from rsint64 / ruint64 - * to a value as close as it can. Note that Javascript stores all numbers as a - * double and the mantissa only has 52 bits. Thus this version may approximate - * the value. - * - * val An array of two 32-bit integers - */ -Number function toApprox64(val) - -Low Level API - -The following function are provided at the low level: - -Read unsigned integers from a buffer: -Number ruint8(buffer, endian, offset); -Number ruint16(buffer, endian, offset); -Number ruint32(buffer, endian, offset); -Number[] ruint64(buffer, endian, offset); - -Read signed integers from a buffer: -Number rsint8(buffer, endian, offset); -Number rsint16(buffer, endian, offset); -Number rsint32(buffer, endian, offset); -Number[] rsint64(buffer, endian, offset); - -Read floating point numbers from a buffer: -Number rfloat(buffer, endian, offset); /* IEEE-754 Single precision */ -Number rdouble(buffer, endian, offset); /* IEEE-754 Double precision */ - -Write unsigned integers to a buffer: -void wuint8(Number, endian, buffer, offset); -void wuint16(Number, endian, buffer, offset); -void wuint32(Number, endian, buffer, offset); -void wuint64(Number[], endian, buffer, offset); - -Write signed integers from a buffer: -void wsint8(Number, endian, buffer, offset); -void wsint16(Number, endian, buffer, offset); -void wsint32(Number, endian, buffer, offset); -void wsint64(Number[], endian, buffer offset); - -Write floating point numbers from a buffer: -void wfloat(Number, buffer, endian, offset); /* IEEE-754 Single precision */ -void wdouble(Number, buffer, endian, offset); /* IEEE-754 Double precision */ - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js deleted file mode 100644 index 66d5f735..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js +++ /dev/null @@ -1,245 +0,0 @@ -/* - * ctf.js - * - * Understand and parse all of the different JSON formats of CTF data and - * translate that into a series of node-ctype friendly pieces. The reason for - * the abstraction is to handle different changes in the file format. - * - * We have to be careful here that we don't end up using a name that is already - * a built in type. - */ -var mod_assert = require('assert'); -var ASSERT = mod_assert.ok; - -var ctf_versions = [ '1.0' ]; -var ctf_entries = [ 'integer', 'float', 'typedef', 'struct' ]; -var ctf_deftypes = [ 'int8_t', 'uint8_t', 'int16_t', 'uint16_t', 'int32_t', - 'uint32_t', 'float', 'double' ]; - -function ctfParseInteger(entry, ctype) -{ - var name, sign, len, type; - - name = entry['name']; - if (!('signed' in entry['integer'])) - throw (new Error('Malformed CTF JSON: integer missing ' + - 'signed value')); - - - if (!('length' in entry['integer'])) - throw (new Error('Malformed CTF JSON: integer missing ' + - 'length value')); - - sign = entry['integer']['signed']; - len = entry['integer']['length']; - type = null; - - if (sign && len == 1) - type = 'int8_t'; - else if (len == 1) - type = 'uint8_t'; - else if (sign && len == 2) - type = 'int16_t'; - else if (len == 2) - type = 'uint16_t'; - else if (sign && len == 4) - type = 'int32_t'; - else if (len == 4) - type = 'uint32_t'; - else if (sign && len == 8) - type = 'int64_t'; - else if (len == 8) - type = 'uint64_t'; - - if (type === null) - throw (new Error('Malformed CTF JSON: integer has ' + - 'unsupported length and sign - ' + len + '/' + sign)); - - /* - * This means that this is the same as one of our built in types. If - * that's the case defining it would be an error. So instead of trying - * to typedef it, we'll return here. - */ - if (name == type) - return; - - if (name == 'char') { - ASSERT(type == 'int8_t'); - return; - } - - ctype.typedef(name, type); -} - -function ctfParseFloat(entry, ctype) -{ - var name, len; - - name = entry['name']; - if (!('length' in entry['float'])) - throw (new Error('Malformed CTF JSON: float missing ' + - 'length value')); - - len = entry['float']['length']; - if (len != 4 && len != 8) - throw (new Error('Malformed CTF JSON: float has invalid ' + - 'length value')); - - if (len == 4) { - if (name == 'float') - return; - ctype.typedef(name, 'float'); - } else if (len == 8) { - if (name == 'double') - return; - ctype.typedef(name, 'double'); - } -} - -function ctfParseTypedef(entry, ctype) -{ - var name, type, ii; - - name = entry['name']; - if (typeof (entry['typedef']) != 'string') - throw (new Error('Malformed CTF JSON: typedef value in not ' + - 'a string')); - - type = entry['typedef']; - - /* - * We need to ensure that we're not looking at type that's one of our - * built in types. Traditionally in C a uint32_t would be a typedef to - * some kind of integer. However, those size types are built ins. - */ - for (ii = 0; ii < ctf_deftypes.length; ii++) { - if (name == ctf_deftypes[ii]) - return; - } - - ctype.typedef(name, type); -} - -function ctfParseStruct(entry, ctype) -{ - var name, type, ii, val, index, member, push; - - member = []; - if (!Array.isArray(entry['struct'])) - throw (new Error('Malformed CTF JSON: struct value is not ' + - 'an array')); - - for (ii = 0; ii < entry['struct'].length; ii++) { - val = entry['struct'][ii]; - if (!('name' in val)) - throw (new Error('Malformed CTF JSON: struct member ' + - 'missing name')); - - if (!('type' in val)) - throw (new Error('Malformed CTF JSON: struct member ' + - 'missing type')); - - if (typeof (val['name']) != 'string') - throw (new Error('Malformed CTF JSON: struct member ' + - 'name isn\'t a string')); - - if (typeof (val['type']) != 'string') - throw (new Error('Malformed CTF JSON: struct member ' + - 'type isn\'t a string')); - - /* - * CTF version 2 specifies array names as <type> [<num>] where - * as node-ctype does this as <type>[<num>]. - */ - name = val['name']; - type = val['type']; - index = type.indexOf(' ['); - if (index != -1) { - type = type.substring(0, index) + - type.substring(index + 1, type.length); - } - push = {}; - push[name] = { 'type': type }; - member.push(push); - } - - name = entry['name']; - ctype.typedef(name, member); -} - -function ctfParseEntry(entry, ctype) -{ - var ii, found; - - if (!('name' in entry)) - throw (new Error('Malformed CTF JSON: entry missing "name" ' + - 'section')); - - for (ii = 0; ii < ctf_entries.length; ii++) { - if (ctf_entries[ii] in entry) - found++; - } - - if (found === 0) - throw (new Error('Malformed CTF JSON: found no entries')); - - if (found >= 2) - throw (new Error('Malformed CTF JSON: found more than one ' + - 'entry')); - - if ('integer' in entry) { - ctfParseInteger(entry, ctype); - return; - } - - if ('float' in entry) { - ctfParseFloat(entry, ctype); - return; - } - - if ('typedef' in entry) { - ctfParseTypedef(entry, ctype); - return; - } - - if ('struct' in entry) { - ctfParseStruct(entry, ctype); - return; - } - - ASSERT(false, 'shouldn\'t reach here'); -} - -function ctfParseJson(json, ctype) -{ - var version, ii; - - ASSERT(json); - ASSERT(ctype); - if (!('metadata' in json)) - throw (new Error('Invalid CTF JSON: missing metadata section')); - - if (!('ctf2json_version' in json['metadata'])) - throw (new Error('Invalid CTF JSON: missing ctf2json_version')); - - version = json['metadata']['ctf2json_version']; - for (ii = 0; ii < ctf_versions.length; ii++) { - if (ctf_versions[ii] == version) - break; - } - - if (ii == ctf_versions.length) - throw (new Error('Unsuported ctf2json_version: ' + version)); - - if (!('data' in json)) - throw (new Error('Invalid CTF JSON: missing data section')); - - if (!Array.isArray(json['data'])) - throw (new Error('Malformed CTF JSON: data section is not ' + - 'an array')); - - for (ii = 0; ii < json['data'].length; ii++) - ctfParseEntry(json['data'][ii], ctype); -} - -exports.ctfParseJson = ctfParseJson; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js deleted file mode 100644 index 62c5d7b2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js +++ /dev/null @@ -1,1485 +0,0 @@ -/* - * rm - Feb 2011 - * ctio.js: - * - * A simple way to read and write simple ctypes. Of course, as you'll find the - * code isn't as simple as it might appear. The following types are currently - * supported in big and little endian formats: - * - * uint8_t int8_t - * uint16_t int16_t - * uint32_t int32_t - * float (single precision IEEE 754) - * double (double precision IEEE 754) - * - * This is designed to work in Node and v8. It may in fact work in other - * Javascript interpreters (that'd be pretty neat), but it hasn't been tested. - * If you find that it does in fact work, that's pretty cool. Try and pass word - * back to the original author. - * - * Note to the reader: If you're tabstop isn't set to 8, parts of this may look - * weird. - */ - -/* - * Numbers in Javascript have a secret: all numbers must be represented with an - * IEEE-754 double. The double has a mantissa with a length of 52 bits with an - * implicit one. Thus the range of integers that can be represented is limited - * to the size of the mantissa, this makes reading and writing 64-bit integers - * difficult, but far from impossible. - * - * Another side effect of this representation is what happens when you use the - * bitwise operators, i.e. shift left, shift right, and, or, etc. In Javascript, - * each operand and the result is cast to a signed 32-bit number. However, in - * the case of >>> the values are cast to an unsigned number. - */ - -/* - * A reminder on endian related issues: - * - * Big Endian: MSB -> First byte - * Little Endian: MSB->Last byte - */ -var mod_assert = require('assert'); - -/* - * An 8 bit unsigned integer involves doing no significant work. - */ -function ruint8(buffer, endian, offset) -{ - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - return (buffer[offset]); -} - -/* - * For 16 bit unsigned numbers we can do all the casting that we want to do. - */ -function rgint16(buffer, endian, offset) -{ - var val = 0; - - if (endian == 'big') { - val = buffer[offset] << 8; - val |= buffer[offset+1]; - } else { - val = buffer[offset]; - val |= buffer[offset+1] << 8; - } - - return (val); - -} - -function ruint16(buffer, endian, offset) -{ - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 1 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - return (rgint16(buffer, endian, offset)); -} - -/* - * Because most bitshifting is done using signed numbers, if we would go into - * the realm where we use that 32nd bit, we'll end up going into the negative - * range. i.e.: - * > 200 << 24 - * -939524096 - * - * Not the value you'd expect. To work around this, we end up having to do some - * abuse of the JavaScript standard. in this case, we know that a >>> shift is - * defined to cast our value to an *unsigned* 32-bit number. Because of that, we - * use that instead to save us some additional math, though it does feel a - * little weird and it isn't obvious as to why you woul dwant to do this at - * first. - */ -function rgint32(buffer, endian, offset) -{ - var val = 0; - - if (endian == 'big') { - val = buffer[offset+1] << 16; - val |= buffer[offset+2] << 8; - val |= buffer[offset+3]; - val = val + (buffer[offset] << 24 >>> 0); - } else { - val = buffer[offset+2] << 16; - val |= buffer[offset+1] << 8; - val |= buffer[offset]; - val = val + (buffer[offset + 3] << 24 >>> 0); - } - - return (val); -} - -function ruint32(buffer, endian, offset) -{ - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 3 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - return (rgint32(buffer, endian, offset)); -} - -/* - * Reads a 64-bit unsigned number. The astue observer will note that this - * doesn't quite work. Javascript has chosen to only have numbers that can be - * represented by a double. A double only has 52 bits of mantissa with an - * implicit 1, thus we have up to 53 bits to represent an integer. However, 2^53 - * doesn't quite give us what we want. Isn't 53 bits enough for anyone? What - * could you have possibly wanted to represent that was larger than that? Oh, - * maybe a size? You mean we bypassed the 4 GB limit on file sizes, when did - * that happen? - * - * To get around this egregious language issue, we're going to instead construct - * an array of two 32 bit unsigned integers. Where arr[0] << 32 + arr[1] would - * give the actual number. However, note that the above code probably won't - * produce the desired results because of the way Javascript numbers are - * doubles. - */ -function rgint64(buffer, endian, offset) -{ - var val = new Array(2); - - if (endian == 'big') { - val[0] = ruint32(buffer, endian, offset); - val[1] = ruint32(buffer, endian, offset+4); - } else { - val[0] = ruint32(buffer, endian, offset+4); - val[1] = ruint32(buffer, endian, offset); - } - - return (val); -} - -function ruint64(buffer, endian, offset) -{ - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 7 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - return (rgint64(buffer, endian, offset)); -} - - -/* - * Signed integer types, yay team! A reminder on how two's complement actually - * works. The first bit is the signed bit, i.e. tells us whether or not the - * number should be positive or negative. If the two's complement value is - * positive, then we're done, as it's equivalent to the unsigned representation. - * - * Now if the number is positive, you're pretty much done, you can just leverage - * the unsigned translations and return those. Unfortunately, negative numbers - * aren't quite that straightforward. - * - * At first glance, one might be inclined to use the traditional formula to - * translate binary numbers between the positive and negative values in two's - * complement. (Though it doesn't quite work for the most negative value) - * Mainly: - * - invert all the bits - * - add one to the result - * - * Of course, this doesn't quite work in Javascript. Take for example the value - * of -128. This could be represented in 16 bits (big-endian) as 0xff80. But of - * course, Javascript will do the following: - * - * > ~0xff80 - * -65409 - * - * Whoh there, Javascript, that's not quite right. But wait, according to - * Javascript that's perfectly correct. When Javascript ends up seeing the - * constant 0xff80, it has no notion that it is actually a signed number. It - * assumes that we've input the unsigned value 0xff80. Thus, when it does the - * binary negation, it casts it into a signed value, (positive 0xff80). Then - * when you perform binary negation on that, it turns it into a negative number. - * - * Instead, we're going to have to use the following general formula, that works - * in a rather Javascript friendly way. I'm glad we don't support this kind of - * weird numbering scheme in the kernel. - * - * (BIT-MAX - (unsigned)val + 1) * -1 - * - * The astute observer, may think that this doesn't make sense for 8-bit numbers - * (really it isn't necessary for them). However, when you get 16-bit numbers, - * you do. Let's go back to our prior example and see how this will look: - * - * (0xffff - 0xff80 + 1) * -1 - * (0x007f + 1) * -1 - * (0x0080) * -1 - * - * Doing it this way ends up allowing us to treat it appropriately in - * Javascript. Sigh, that's really quite ugly for what should just be a few bit - * shifts, ~ and &. - */ - -/* - * Endianness doesn't matter for 8-bit signed values. We could in fact optimize - * this case because the more traditional methods work, but for consistency, - * we'll keep doing this the same way. - */ -function rsint8(buffer, endian, offset) -{ - var neg; - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - neg = buffer[offset] & 0x80; - if (!neg) - return (buffer[offset]); - - return ((0xff - buffer[offset] + 1) * -1); -} - -/* - * The 16-bit version requires a bit more effort. In this case, we can leverage - * our unsigned code to generate the value we want to return. - */ -function rsint16(buffer, endian, offset) -{ - var neg, val; - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 1 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = rgint16(buffer, endian, offset); - neg = val & 0x8000; - if (!neg) - return (val); - - return ((0xffff - val + 1) * -1); -} - -/* - * We really shouldn't leverage our 32-bit code here and instead utilize the - * fact that we know that since these are signed numbers, we can do all the - * shifting and binary anding to generate the 32-bit number. But, for - * consistency we'll do the same. If we want to do otherwise, we should instead - * make the 32 bit unsigned code do the optimization. But as long as there - * aren't floats secretly under the hood for that, we /should/ be okay. - */ -function rsint32(buffer, endian, offset) -{ - var neg, val; - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 3 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = rgint32(buffer, endian, offset); - neg = val & 0x80000000; - if (!neg) - return (val); - - return ((0xffffffff - val + 1) * -1); -} - -/* - * The signed version of this code suffers from all of the same problems of the - * other 64 bit version. - */ -function rsint64(buffer, endian, offset) -{ - var neg, val; - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 3 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = rgint64(buffer, endian, offset); - neg = val[0] & 0x80000000; - - if (!neg) - return (val); - - val[0] = (0xffffffff - val[0]) * -1; - val[1] = (0xffffffff - val[1] + 1) * -1; - - /* - * If we had the key 0x8000000000000000, that would leave the lower 32 - * bits as 0xffffffff, however, since we're goint to add one, that would - * actually leave the lower 32-bits as 0x100000000, which would break - * our ability to write back a value that we received. To work around - * this, if we actually get that value, we're going to bump the upper - * portion by 1 and set this to zero. - */ - mod_assert.ok(val[1] <= 0x100000000); - if (val[1] == -0x100000000) { - val[1] = 0; - val[0]--; - } - - return (val); -} - -/* - * We now move onto IEEE 754: The traditional form for floating point numbers - * and what is secretly hiding at the heart of everything in this. I really hope - * that someone is actually using this, as otherwise, this effort is probably - * going to be more wasted. - * - * One might be tempted to use parseFloat here, but that wouldn't work at all - * for several reasons. Mostly due to the way floats actually work, and - * parseFloat only actually works in base 10. I don't see base 10 anywhere near - * this file. - * - * In this case we'll implement the single and double precision versions. The - * quadruple precision, while probably useful, wouldn't really be accepted by - * Javascript, so let's not even waste our time. - * - * So let's review how this format looks like. A single precision value is 32 - * bits and has three parts: - * - Sign bit - * - Exponent (Using bias notation) - * - Mantissa - * - * |s|eeeeeeee|mmmmmmmmmmmmmmmmmmmmmmmmm| - * 31| 30-23 | 22 - 0 | - * - * The exponent is stored in a biased input. The bias in this case 127. - * Therefore, our exponent is equal to the 8-bit value - 127. - * - * By default, a number is normalized in IEEE, that means that the mantissa has - * an implicit one that we don't see. So really the value stored is 1.m. - * However, if the exponent is all zeros, then instead we have to shift - * everything to the right one and there is no more implicit one. - * - * Special values: - * - Positive Infinity: - * Sign: 0 - * Exponent: All 1s - * Mantissa: 0 - * - Negative Infinity: - * Sign: 1 - * Exponent: All 1s - * Mantissa: 0 - * - NaN: - * Sign: * - * Exponent: All 1s - * Mantissa: non-zero - * - Zero: - * Sign: * - * Exponent: All 0s - * Mantissa: 0 - * - * In the case of zero, the sign bit determines whether we get a positive or - * negative zero. However, since Javascript cannot determine the difference - * between the two: i.e. -0 == 0, we just always return 0. - * - */ -function rfloat(buffer, endian, offset) -{ - var bytes = []; - var sign, exponent, mantissa, val; - var bias = 127; - var maxexp = 0xff; - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 3 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - /* Normalize the bytes to be in endian order */ - if (endian == 'big') { - bytes[0] = buffer[offset]; - bytes[1] = buffer[offset+1]; - bytes[2] = buffer[offset+2]; - bytes[3] = buffer[offset+3]; - } else { - bytes[3] = buffer[offset]; - bytes[2] = buffer[offset+1]; - bytes[1] = buffer[offset+2]; - bytes[0] = buffer[offset+3]; - } - - sign = bytes[0] & 0x80; - exponent = (bytes[0] & 0x7f) << 1; - exponent |= (bytes[1] & 0x80) >>> 7; - mantissa = (bytes[1] & 0x7f) << 16; - mantissa |= bytes[2] << 8; - mantissa |= bytes[3]; - - /* Check for special cases before we do general parsing */ - if (!sign && exponent == maxexp && mantissa === 0) - return (Number.POSITIVE_INFINITY); - - if (sign && exponent == maxexp && mantissa === 0) - return (Number.NEGATIVE_INFINITY); - - if (exponent == maxexp && mantissa !== 0) - return (Number.NaN); - - /* - * Javascript really doesn't have support for positive or negative zero. - * So we're not going to try and give it to you. That would be just - * plain weird. Besides -0 == 0. - */ - if (exponent === 0 && mantissa === 0) - return (0); - - /* - * Now we can deal with the bias and the determine whether the mantissa - * has the implicit one or not. - */ - exponent -= bias; - if (exponent == -bias) { - exponent++; - val = 0; - } else { - val = 1; - } - - val = (val + mantissa * Math.pow(2, -23)) * Math.pow(2, exponent); - - if (sign) - val *= -1; - - return (val); -} - -/* - * Doubles in IEEE 754 are like their brothers except for a few changes and - * increases in size: - * - The exponent is now 11 bits - * - The mantissa is now 52 bits - * - The bias is now 1023 - * - * |s|eeeeeeeeeee|mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm| - * 63| 62 - 52 | 51 - 0 | - * 63| 62 - 52 | 51 - 0 | - * - * While the size has increased a fair amount, we're going to end up keeping the - * same general formula for calculating the final value. As a reminder, this - * formula is: - * - * (-1)^s * (n + m) * 2^(e-b) - * - * Where: - * s is the sign bit - * n is (exponent > 0) ? 1 : 0 -- Determines whether we're normalized - * or not - * m is the mantissa - * e is the exponent specified - * b is the bias for the exponent - * - */ -function rdouble(buffer, endian, offset) -{ - var bytes = []; - var sign, exponent, mantissa, val, lowmant; - var bias = 1023; - var maxexp = 0x7ff; - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 7 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - /* Normalize the bytes to be in endian order */ - if (endian == 'big') { - bytes[0] = buffer[offset]; - bytes[1] = buffer[offset+1]; - bytes[2] = buffer[offset+2]; - bytes[3] = buffer[offset+3]; - bytes[4] = buffer[offset+4]; - bytes[5] = buffer[offset+5]; - bytes[6] = buffer[offset+6]; - bytes[7] = buffer[offset+7]; - } else { - bytes[7] = buffer[offset]; - bytes[6] = buffer[offset+1]; - bytes[5] = buffer[offset+2]; - bytes[4] = buffer[offset+3]; - bytes[3] = buffer[offset+4]; - bytes[2] = buffer[offset+5]; - bytes[1] = buffer[offset+6]; - bytes[0] = buffer[offset+7]; - } - - /* - * We can construct the exponent and mantissa the same way as we did in - * the case of a float, just increase the range of the exponent. - */ - sign = bytes[0] & 0x80; - exponent = (bytes[0] & 0x7f) << 4; - exponent |= (bytes[1] & 0xf0) >>> 4; - - /* - * This is going to be ugly but then again, we're dealing with IEEE 754. - * This could probably be done as a node add on in a few lines of C++, - * but oh we'll, we've made it this far so let's be native the rest of - * the way... - * - * What we're going to do is break the mantissa into two parts, the - * lower 24 bits and the upper 28 bits. We'll multiply the upper 28 bits - * by the appropriate power and then add in the lower 24-bits. Not - * really that great. It's pretty much a giant kludge to deal with - * Javascript eccentricities around numbers. - */ - lowmant = bytes[7]; - lowmant |= bytes[6] << 8; - lowmant |= bytes[5] << 16; - mantissa = bytes[4]; - mantissa |= bytes[3] << 8; - mantissa |= bytes[2] << 16; - mantissa |= (bytes[1] & 0x0f) << 24; - mantissa *= Math.pow(2, 24); /* Equivalent to << 24, but JS compat */ - mantissa += lowmant; - - /* Check for special cases before we do general parsing */ - if (!sign && exponent == maxexp && mantissa === 0) - return (Number.POSITIVE_INFINITY); - - if (sign && exponent == maxexp && mantissa === 0) - return (Number.NEGATIVE_INFINITY); - - if (exponent == maxexp && mantissa !== 0) - return (Number.NaN); - - /* - * Javascript really doesn't have support for positive or negative zero. - * So we're not going to try and give it to you. That would be just - * plain weird. Besides -0 == 0. - */ - if (exponent === 0 && mantissa === 0) - return (0); - - /* - * Now we can deal with the bias and the determine whether the mantissa - * has the implicit one or not. - */ - exponent -= bias; - if (exponent == -bias) { - exponent++; - val = 0; - } else { - val = 1; - } - - val = (val + mantissa * Math.pow(2, -52)) * Math.pow(2, exponent); - - if (sign) - val *= -1; - - return (val); -} - -/* - * Now that we have gone through the pain of reading the individual types, we're - * probably going to want some way to write these back. None of this is going to - * be good. But since we have Javascript numbers this should certainly be more - * interesting. Though we can constrain this end a little bit more in what is - * valid. For now, let's go back to our friends the unsigned value. - */ - -/* - * Unsigned numbers seem deceptively easy. Here are the general steps and rules - * that we are going to take: - * - If the number is negative, throw an Error - * - Truncate any floating point portion - * - Take the modulus of the number in our base - * - Write it out to the buffer in the endian format requested at the offset - */ - -/* - * We have to make sure that the value is a valid integer. This means that it is - * non-negative. It has no fractional component and that it does not exceed the - * maximum allowed value. - * - * value The number to check for validity - * - * max The maximum value - */ -function prepuint(value, max) -{ - if (typeof (value) != 'number') - throw (new (Error('cannot write a non-number as a number'))); - - if (value < 0) - throw (new Error('specified a negative value for writing an ' + - 'unsigned value')); - - if (value > max) - throw (new Error('value is larger than maximum value for ' + - 'type')); - - if (Math.floor(value) !== value) - throw (new Error('value has a fractional component')); - - return (value); -} - -/* - * 8-bit version, classy. We can ignore endianness which is good. - */ -function wuint8(value, endian, buffer, offset) -{ - var val; - - if (value === undefined) - throw (new Error('missing value')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = prepuint(value, 0xff); - buffer[offset] = val; -} - -/* - * Pretty much the same as the 8-bit version, just this time we need to worry - * about endian related issues. - */ -function wgint16(val, endian, buffer, offset) -{ - if (endian == 'big') { - buffer[offset] = (val & 0xff00) >>> 8; - buffer[offset+1] = val & 0x00ff; - } else { - buffer[offset+1] = (val & 0xff00) >>> 8; - buffer[offset] = val & 0x00ff; - } -} - -function wuint16(value, endian, buffer, offset) -{ - var val; - - if (value === undefined) - throw (new Error('missing value')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 1 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = prepuint(value, 0xffff); - wgint16(val, endian, buffer, offset); -} - -/* - * The 32-bit version is going to have to be a little different unfortunately. - * We can't quite bitshift to get the largest byte, because that would end up - * getting us caught by the signed values. - * - * And yes, we do want to subtract out the lower part by default. This means - * that when we do the division, it will be treated as a bit shift and we won't - * end up generating a floating point value. If we did generate a floating point - * value we'd have to truncate it intelligently, this saves us that problem and - * may even be somewhat faster under the hood. - */ -function wgint32(val, endian, buffer, offset) -{ - if (endian == 'big') { - buffer[offset] = (val - (val & 0x00ffffff)) / Math.pow(2, 24); - buffer[offset+1] = (val >>> 16) & 0xff; - buffer[offset+2] = (val >>> 8) & 0xff; - buffer[offset+3] = val & 0xff; - } else { - buffer[offset+3] = (val - (val & 0x00ffffff)) / - Math.pow(2, 24); - buffer[offset+2] = (val >>> 16) & 0xff; - buffer[offset+1] = (val >>> 8) & 0xff; - buffer[offset] = val & 0xff; - } -} - -function wuint32(value, endian, buffer, offset) -{ - var val; - - if (value === undefined) - throw (new Error('missing value')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 3 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = prepuint(value, 0xffffffff); - wgint32(val, endian, buffer, offset); -} - -/* - * Unlike the other versions, we expect the value to be in the form of two - * arrays where value[0] << 32 + value[1] would result in the value that we - * want. - */ -function wgint64(value, endian, buffer, offset) -{ - if (endian == 'big') { - wgint32(value[0], endian, buffer, offset); - wgint32(value[1], endian, buffer, offset+4); - } else { - wgint32(value[0], endian, buffer, offset+4); - wgint32(value[1], endian, buffer, offset); - } -} - -function wuint64(value, endian, buffer, offset) -{ - if (value === undefined) - throw (new Error('missing value')); - - if (!(value instanceof Array)) - throw (new Error('value must be an array')); - - if (value.length != 2) - throw (new Error('value must be an array of length 2')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 7 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - prepuint(value[0], 0xffffffff); - prepuint(value[1], 0xffffffff); - wgint64(value, endian, buffer, offset); -} - -/* - * We now move onto our friends in the signed number category. Unlike unsigned - * numbers, we're going to have to worry a bit more about how we put values into - * arrays. Since we are only worrying about signed 32-bit values, we're in - * slightly better shape. Unfortunately, we really can't do our favorite binary - * & in this system. It really seems to do the wrong thing. For example: - * - * > -32 & 0xff - * 224 - * - * What's happening above is really: 0xe0 & 0xff = 0xe0. However, the results of - * this aren't treated as a signed number. Ultimately a bad thing. - * - * What we're going to want to do is basically create the unsigned equivalent of - * our representation and pass that off to the wuint* functions. To do that - * we're going to do the following: - * - * - if the value is positive - * we can pass it directly off to the equivalent wuint - * - if the value is negative - * we do the following computation: - * mb + val + 1, where - * mb is the maximum unsigned value in that byte size - * val is the Javascript negative integer - * - * - * As a concrete value, take -128. In signed 16 bits this would be 0xff80. If - * you do out the computations: - * - * 0xffff - 128 + 1 - * 0xffff - 127 - * 0xff80 - * - * You can then encode this value as the signed version. This is really rather - * hacky, but it should work and get the job done which is our goal here. - * - * Thus the overall flow is: - * - Truncate the floating point part of the number - * - We don't have to take the modulus, because the unsigned versions will - * take care of that for us. And we don't have to worry about that - * potentially causing bad things to happen because of sign extension - * - Pass it off to the appropriate unsigned version, potentially modifying - * the negative portions as necessary. - */ - -/* - * A series of checks to make sure we actually have a signed 32-bit number - */ -function prepsint(value, max, min) -{ - if (typeof (value) != 'number') - throw (new (Error('cannot write a non-number as a number'))); - - if (value > max) - throw (new Error('value larger than maximum allowed value')); - - if (value < min) - throw (new Error('value smaller than minimum allowed value')); - - if (Math.floor(value) !== value) - throw (new Error('value has a fractional component')); - - return (value); -} - -/* - * The 8-bit version of the signed value. Overall, fairly straightforward. - */ -function wsint8(value, endian, buffer, offset) -{ - var val; - - if (value === undefined) - throw (new Error('missing value')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = prepsint(value, 0x7f, -0x80); - if (val >= 0) - wuint8(val, endian, buffer, offset); - else - wuint8(0xff + val + 1, endian, buffer, offset); -} - -/* - * The 16-bit version of the signed value. Also, fairly straightforward. - */ -function wsint16(value, endian, buffer, offset) -{ - var val; - - if (value === undefined) - throw (new Error('missing value')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 1 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = prepsint(value, 0x7fff, -0x8000); - if (val >= 0) - wgint16(val, endian, buffer, offset); - else - wgint16(0xffff + val + 1, endian, buffer, offset); - -} - -/* - * We can do this relatively easily by leveraging the code used for 32-bit - * unsigned code. - */ -function wsint32(value, endian, buffer, offset) -{ - var val; - - if (value === undefined) - throw (new Error('missing value')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 3 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = prepsint(value, 0x7fffffff, -0x80000000); - if (val >= 0) - wgint32(val, endian, buffer, offset); - else - wgint32(0xffffffff + val + 1, endian, buffer, offset); -} - -/* - * The signed 64 bit integer should by in the same format as when received. - * Mainly it should ensure that the value is an array of two integers where - * value[0] << 32 + value[1] is the desired number. Furthermore, the two values - * need to be equal. - */ -function wsint64(value, endian, buffer, offset) -{ - var vzpos, vopos; - var vals = new Array(2); - - if (value === undefined) - throw (new Error('missing value')); - - if (!(value instanceof Array)) - throw (new Error('value must be an array')); - - if (value.length != 2) - throw (new Error('value must be an array of length 2')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 7 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - /* - * We need to make sure that we have the same sign on both values. The - * hokiest way to to do this is to multiply the number by +inf. If we do - * this, we'll get either +/-inf depending on the sign of the value. - * Once we have this, we can compare it to +inf to see if the number is - * positive or not. - */ - vzpos = (value[0] * Number.POSITIVE_INFINITY) == - Number.POSITIVE_INFINITY; - vopos = (value[1] * Number.POSITIVE_INFINITY) == - Number.POSITIVE_INFINITY; - - /* - * If either of these is zero, then we don't actually need this check. - */ - if (value[0] != 0 && value[1] != 0 && vzpos != vopos) - throw (new Error('Both entries in the array must have ' + - 'the same sign')); - - /* - * Doing verification for a signed 64-bit integer is actually a big - * trickier than it appears. We can't quite use our standard techniques - * because we need to compare both sets of values. The first value is - * pretty straightforward. If the first value is beond the extremes than - * we error out. However, the valid range of the second value varies - * based on the first one. If the first value is negative, and *not* the - * largest negative value, than it can be any integer within the range [ - * 0, 0xffffffff ]. If it is the largest negative number, it must be - * zero. - * - * If the first number is positive, than it doesn't matter what the - * value is. We just simply have to make sure we have a valid positive - * integer. - */ - if (vzpos) { - prepuint(value[0], 0x7fffffff); - prepuint(value[1], 0xffffffff); - } else { - prepsint(value[0], 0, -0x80000000); - prepsint(value[1], 0, -0xffffffff); - if (value[0] == -0x80000000 && value[1] != 0) - throw (new Error('value smaller than minimum ' + - 'allowed value')); - } - - /* Fix negative numbers */ - if (value[0] < 0 || value[1] < 0) { - vals[0] = 0xffffffff - Math.abs(value[0]); - vals[1] = 0x100000000 - Math.abs(value[1]); - if (vals[1] == 0x100000000) { - vals[1] = 0; - vals[0]++; - } - } else { - vals[0] = value[0]; - vals[1] = value[1]; - } - wgint64(vals, endian, buffer, offset); -} - -/* - * Now we are moving onto the weirder of these, the float and double. For this - * we're going to just have to do something that's pretty weird. First off, we - * have no way to get at the underlying float representation, at least not - * easily. But that doesn't mean we can't figure it out, we just have to use our - * heads. - * - * One might propose to use Number.toString(2). Of course, this is not really - * that good, because the ECMAScript 262 v3 Standard says the following Section - * 15.7.4.2-Number.prototype.toString (radix): - * - * If radix is an integer from 2 to 36, but not 10, the result is a string, the - * choice of which is implementation-dependent. - * - * Well that doesn't really help us one bit now does it? We could use the - * standard base 10 version of the string, but that's just going to create more - * errors as we end up trying to convert it back to a binary value. So, really - * this just means we have to be non-lazy and parse the structure intelligently. - * - * First off, we can do the basic checks: NaN, positive and negative infinity. - * - * Now that those are done we can work backwards to generate the mantissa and - * exponent. - * - * The first thing we need to do is determine the sign bit, easy to do, check - * whether the value is less than 0. And convert the number to its absolute - * value representation. Next, we need to determine if the value is less than - * one or greater than or equal to one and from there determine what power was - * used to get there. What follows is now specific to floats, though the general - * ideas behind this will hold for doubles as well, but the exact numbers - * involved will change. - * - * Once we have that power we can determine the exponent and the mantissa. Call - * the value that has the number of bits to reach the power ebits. In the - * general case they have the following values: - * - * exponent 127 + ebits - * mantissa value * 2^(23 - ebits) & 0x7fffff - * - * In the case where the value of ebits is <= -127 we are now in the case where - * we no longer have normalized numbers. In this case the values take on the - * following values: - * - * exponent 0 - * mantissa value * 2^149 & 0x7fffff - * - * Once we have the values for the sign, mantissa, and exponent. We reconstruct - * the four bytes as follows: - * - * byte0 sign bit and seven most significant bits from the exp - * sign << 7 | (exponent & 0xfe) >>> 1 - * - * byte1 lsb from the exponent and 7 top bits from the mantissa - * (exponent & 0x01) << 7 | (mantissa & 0x7f0000) >>> 16 - * - * byte2 bits 8-15 (zero indexing) from mantissa - * mantissa & 0xff00 >> 8 - * - * byte3 bits 0-7 from mantissa - * mantissa & 0xff - * - * Once we have this we have to assign them into the buffer in proper endian - * order. - */ - -/* - * Compute the log base 2 of the value. Now, someone who remembers basic - * properties of logarithms will point out that we could use the change of base - * formula for logs, and in fact that would be astute, because that's what we'll - * do for now. It feels cleaner, albeit it may be less efficient than just - * iterating and dividing by 2. We may want to come back and revisit that some - * day. - */ -function log2(value) -{ - return (Math.log(value) / Math.log(2)); -} - -/* - * Helper to determine the exponent of the number we're looking at. - */ -function intexp(value) -{ - return (Math.floor(log2(value))); -} - -/* - * Helper to determine the exponent of the fractional part of the value. - */ -function fracexp(value) -{ - return (Math.floor(log2(value))); -} - -function wfloat(value, endian, buffer, offset) -{ - var sign, exponent, mantissa, ebits; - var bytes = []; - - if (value === undefined) - throw (new Error('missing value')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - - if (offset + 3 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - if (isNaN(value)) { - sign = 0; - exponent = 0xff; - mantissa = 23; - } else if (value == Number.POSITIVE_INFINITY) { - sign = 0; - exponent = 0xff; - mantissa = 0; - } else if (value == Number.NEGATIVE_INFINITY) { - sign = 1; - exponent = 0xff; - mantissa = 0; - } else { - /* Well we have some work to do */ - - /* Thankfully the sign bit is trivial */ - if (value < 0) { - sign = 1; - value = Math.abs(value); - } else { - sign = 0; - } - - /* Use the correct function to determine number of bits */ - if (value < 1) - ebits = fracexp(value); - else - ebits = intexp(value); - - /* Time to deal with the issues surrounding normalization */ - if (ebits <= -127) { - exponent = 0; - mantissa = (value * Math.pow(2, 149)) & 0x7fffff; - } else { - exponent = 127 + ebits; - mantissa = value * Math.pow(2, 23 - ebits); - mantissa &= 0x7fffff; - } - } - - bytes[0] = sign << 7 | (exponent & 0xfe) >>> 1; - bytes[1] = (exponent & 0x01) << 7 | (mantissa & 0x7f0000) >>> 16; - bytes[2] = (mantissa & 0x00ff00) >>> 8; - bytes[3] = mantissa & 0x0000ff; - - if (endian == 'big') { - buffer[offset] = bytes[0]; - buffer[offset+1] = bytes[1]; - buffer[offset+2] = bytes[2]; - buffer[offset+3] = bytes[3]; - } else { - buffer[offset] = bytes[3]; - buffer[offset+1] = bytes[2]; - buffer[offset+2] = bytes[1]; - buffer[offset+3] = bytes[0]; - } -} - -/* - * Now we move onto doubles. Doubles are similar to floats in pretty much all - * ways except that the processing isn't quite as straightforward because we - * can't always use shifting, i.e. we have > 32 bit values. - * - * We're going to proceed in an identical fashion to floats and utilize the same - * helper functions. All that really is changing are the specific values that we - * use to do the calculations. Thus, to review we have to do the following. - * - * First get the sign bit and convert the value to its absolute value - * representation. Next, we determine the number of bits that we used to get to - * the value, branching whether the value is greater than or less than 1. Once - * we have that value which we will again call ebits, we have to do the - * following in the general case: - * - * exponent 1023 + ebits - * mantissa [value * 2^(52 - ebits)] % 2^52 - * - * In the case where the value of ebits <= -1023 we no longer use normalized - * numbers, thus like with floats we have to do slightly different processing: - * - * exponent 0 - * mantissa [value * 2^1074] % 2^52 - * - * Once we have determined the sign, exponent and mantissa we can construct the - * bytes as follows: - * - * byte0 sign bit and seven most significant bits form the exp - * sign << 7 | (exponent & 0x7f0) >>> 4 - * - * byte1 Remaining 4 bits from the exponent and the four most - * significant bits from the mantissa 48-51 - * (exponent & 0x00f) << 4 | mantissa >>> 48 - * - * byte2 Bits 40-47 from the mantissa - * (mantissa >>> 40) & 0xff - * - * byte3 Bits 32-39 from the mantissa - * (mantissa >>> 32) & 0xff - * - * byte4 Bits 24-31 from the mantissa - * (mantissa >>> 24) & 0xff - * - * byte5 Bits 16-23 from the Mantissa - * (mantissa >>> 16) & 0xff - * - * byte6 Bits 8-15 from the mantissa - * (mantissa >>> 8) & 0xff - * - * byte7 Bits 0-7 from the mantissa - * mantissa & 0xff - * - * Now we can't quite do the right shifting that we want in bytes 1 - 3, because - * we'll have extended too far and we'll lose those values when we try and do - * the shift. Instead we have to use an alternate approach. To try and stay out - * of floating point, what we'll do is say that mantissa -= bytes[4-7] and then - * divide by 2^32. Once we've done that we can use binary arithmetic. Oof, - * that's ugly, but it seems to avoid using floating point (just based on how v8 - * seems to be optimizing for base 2 arithmetic). - */ -function wdouble(value, endian, buffer, offset) -{ - var sign, exponent, mantissa, ebits; - var bytes = []; - - if (value === undefined) - throw (new Error('missing value')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - - if (offset + 7 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - if (isNaN(value)) { - sign = 0; - exponent = 0x7ff; - mantissa = 23; - } else if (value == Number.POSITIVE_INFINITY) { - sign = 0; - exponent = 0x7ff; - mantissa = 0; - } else if (value == Number.NEGATIVE_INFINITY) { - sign = 1; - exponent = 0x7ff; - mantissa = 0; - } else { - /* Well we have some work to do */ - - /* Thankfully the sign bit is trivial */ - if (value < 0) { - sign = 1; - value = Math.abs(value); - } else { - sign = 0; - } - - /* Use the correct function to determine number of bits */ - if (value < 1) - ebits = fracexp(value); - else - ebits = intexp(value); - - /* - * This is a total hack to determine a denormalized value. - * Unfortunately, we sometimes do not get a proper value for - * ebits, i.e. we lose the values that would get rounded off. - * - * - * The astute observer may wonder why we would be - * multiplying by two Math.pows rather than just summing - * them. Well, that's to get around a small bug in the - * way v8 seems to implement the function. On occasion - * doing: - * - * foo * Math.pow(2, 1023 + 51) - * - * Causes us to overflow to infinity, where as doing: - * - * foo * Math.pow(2, 1023) * Math.pow(2, 51) - * - * Does not cause us to overflow. Go figure. - * - */ - if (value <= 2.225073858507201e-308 || ebits <= -1023) { - exponent = 0; - mantissa = value * Math.pow(2, 1023) * Math.pow(2, 51); - mantissa %= Math.pow(2, 52); - } else { - /* - * We might have gotten fucked by our floating point - * logarithm magic. This is rather crappy, but that's - * our luck. If we just had a log base 2 or access to - * the stupid underlying representation this would have - * been much easier and we wouldn't have such stupid - * kludges or hacks. - */ - if (ebits > 1023) - ebits = 1023; - exponent = 1023 + ebits; - mantissa = value * Math.pow(2, -ebits); - mantissa *= Math.pow(2, 52); - mantissa %= Math.pow(2, 52); - } - } - - /* Fill the bytes in backwards to deal with the size issues */ - bytes[7] = mantissa & 0xff; - bytes[6] = (mantissa >>> 8) & 0xff; - bytes[5] = (mantissa >>> 16) & 0xff; - mantissa = (mantissa - (mantissa & 0xffffff)) / Math.pow(2, 24); - bytes[4] = mantissa & 0xff; - bytes[3] = (mantissa >>> 8) & 0xff; - bytes[2] = (mantissa >>> 16) & 0xff; - bytes[1] = (exponent & 0x00f) << 4 | mantissa >>> 24; - bytes[0] = (sign << 7) | (exponent & 0x7f0) >>> 4; - - if (endian == 'big') { - buffer[offset] = bytes[0]; - buffer[offset+1] = bytes[1]; - buffer[offset+2] = bytes[2]; - buffer[offset+3] = bytes[3]; - buffer[offset+4] = bytes[4]; - buffer[offset+5] = bytes[5]; - buffer[offset+6] = bytes[6]; - buffer[offset+7] = bytes[7]; - } else { - buffer[offset+7] = bytes[0]; - buffer[offset+6] = bytes[1]; - buffer[offset+5] = bytes[2]; - buffer[offset+4] = bytes[3]; - buffer[offset+3] = bytes[4]; - buffer[offset+2] = bytes[5]; - buffer[offset+1] = bytes[6]; - buffer[offset] = bytes[7]; - } -} - -/* - * Actually export our work above. One might argue that we shouldn't expose - * these interfaces and just force people to use the higher level abstractions - * around this work. However, unlike say other libraries we've come across, this - * interface has several properties: it makes sense, it's simple, and it's - * useful. - */ -exports.ruint8 = ruint8; -exports.ruint16 = ruint16; -exports.ruint32 = ruint32; -exports.ruint64 = ruint64; -exports.wuint8 = wuint8; -exports.wuint16 = wuint16; -exports.wuint32 = wuint32; -exports.wuint64 = wuint64; - -exports.rsint8 = rsint8; -exports.rsint16 = rsint16; -exports.rsint32 = rsint32; -exports.rsint64 = rsint64; -exports.wsint8 = wsint8; -exports.wsint16 = wsint16; -exports.wsint32 = wsint32; -exports.wsint64 = wsint64; - -exports.rfloat = rfloat; -exports.rdouble = rdouble; -exports.wfloat = wfloat; -exports.wdouble = wdouble; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js deleted file mode 100644 index 7d2f4a5a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js +++ /dev/null @@ -1,944 +0,0 @@ -/* - * rm - Feb 2011 - * ctype.js - * - * This module provides a simple abstraction towards reading and writing - * different types of binary data. It is designed to use ctio.js and provide a - * richer and more expressive API on top of it. - * - * By default we support the following as built in basic types: - * int8_t - * int16_t - * int32_t - * uint8_t - * uint16_t - * uint32_t - * uint64_t - * float - * double - * char - * char[] - * - * Each type is returned as a Number, with the exception of char and char[] - * which are returned as Node Buffers. A char is considered a uint8_t. - * - * Requests to read and write data are specified as an array of JSON objects. - * This is also the same way that one declares structs. Even if just a single - * value is requested, it must be done as a struct. The array order determines - * the order that we try and read values. Each entry has the following format - * with values marked with a * being optional. - * - * { key: { type: /type/, value*: /value/, offset*: /offset/ } - * - * If offset is defined, we lseek(offset, SEEK_SET) before reading the next - * value. Value is defined when we're writing out data, otherwise it's ignored. - * - */ - -var mod_ctf = require('./ctf.js'); -var mod_ctio = require('./ctio.js'); -var mod_assert = require('assert'); - -/* - * This is the set of basic types that we support. - * - * read The function to call to read in a value from a buffer - * - * write The function to call to write a value to a buffer - * - */ -var deftypes = { - 'uint8_t': { read: ctReadUint8, write: ctWriteUint8 }, - 'uint16_t': { read: ctReadUint16, write: ctWriteUint16 }, - 'uint32_t': { read: ctReadUint32, write: ctWriteUint32 }, - 'uint64_t': { read: ctReadUint64, write: ctWriteUint64 }, - 'int8_t': { read: ctReadSint8, write: ctWriteSint8 }, - 'int16_t': { read: ctReadSint16, write: ctWriteSint16 }, - 'int32_t': { read: ctReadSint32, write: ctWriteSint32 }, - 'int64_t': { read: ctReadSint64, write: ctWriteSint64 }, - 'float': { read: ctReadFloat, write: ctWriteFloat }, - 'double': { read: ctReadDouble, write: ctWriteDouble }, - 'char': { read: ctReadChar, write: ctWriteChar }, - 'char[]': { read: ctReadCharArray, write: ctWriteCharArray } -}; - -/* - * The following are wrappers around the CType IO low level API. They encode - * knowledge about the size and return something in the expected format. - */ -function ctReadUint8(endian, buffer, offset) -{ - var val = mod_ctio.ruint8(buffer, endian, offset); - return ({ value: val, size: 1 }); -} - -function ctReadUint16(endian, buffer, offset) -{ - var val = mod_ctio.ruint16(buffer, endian, offset); - return ({ value: val, size: 2 }); -} - -function ctReadUint32(endian, buffer, offset) -{ - var val = mod_ctio.ruint32(buffer, endian, offset); - return ({ value: val, size: 4 }); -} - -function ctReadUint64(endian, buffer, offset) -{ - var val = mod_ctio.ruint64(buffer, endian, offset); - return ({ value: val, size: 8 }); -} - -function ctReadSint8(endian, buffer, offset) -{ - var val = mod_ctio.rsint8(buffer, endian, offset); - return ({ value: val, size: 1 }); -} - -function ctReadSint16(endian, buffer, offset) -{ - var val = mod_ctio.rsint16(buffer, endian, offset); - return ({ value: val, size: 2 }); -} - -function ctReadSint32(endian, buffer, offset) -{ - var val = mod_ctio.rsint32(buffer, endian, offset); - return ({ value: val, size: 4 }); -} - -function ctReadSint64(endian, buffer, offset) -{ - var val = mod_ctio.rsint64(buffer, endian, offset); - return ({ value: val, size: 8 }); -} - -function ctReadFloat(endian, buffer, offset) -{ - var val = mod_ctio.rfloat(buffer, endian, offset); - return ({ value: val, size: 4 }); -} - -function ctReadDouble(endian, buffer, offset) -{ - var val = mod_ctio.rdouble(buffer, endian, offset); - return ({ value: val, size: 8 }); -} - -/* - * Reads a single character into a node buffer - */ -function ctReadChar(endian, buffer, offset) -{ - var res = new Buffer(1); - res[0] = mod_ctio.ruint8(buffer, endian, offset); - return ({ value: res, size: 1 }); -} - -function ctReadCharArray(length, endian, buffer, offset) -{ - var ii; - var res = new Buffer(length); - - for (ii = 0; ii < length; ii++) - res[ii] = mod_ctio.ruint8(buffer, endian, offset + ii); - - return ({ value: res, size: length }); -} - -function ctWriteUint8(value, endian, buffer, offset) -{ - mod_ctio.wuint8(value, endian, buffer, offset); - return (1); -} - -function ctWriteUint16(value, endian, buffer, offset) -{ - mod_ctio.wuint16(value, endian, buffer, offset); - return (2); -} - -function ctWriteUint32(value, endian, buffer, offset) -{ - mod_ctio.wuint32(value, endian, buffer, offset); - return (4); -} - -function ctWriteUint64(value, endian, buffer, offset) -{ - mod_ctio.wuint64(value, endian, buffer, offset); - return (8); -} - -function ctWriteSint8(value, endian, buffer, offset) -{ - mod_ctio.wsint8(value, endian, buffer, offset); - return (1); -} - -function ctWriteSint16(value, endian, buffer, offset) -{ - mod_ctio.wsint16(value, endian, buffer, offset); - return (2); -} - -function ctWriteSint32(value, endian, buffer, offset) -{ - mod_ctio.wsint32(value, endian, buffer, offset); - return (4); -} - -function ctWriteSint64(value, endian, buffer, offset) -{ - mod_ctio.wsint64(value, endian, buffer, offset); - return (8); -} - -function ctWriteFloat(value, endian, buffer, offset) -{ - mod_ctio.wfloat(value, endian, buffer, offset); - return (4); -} - -function ctWriteDouble(value, endian, buffer, offset) -{ - mod_ctio.wdouble(value, endian, buffer, offset); - return (8); -} - -/* - * Writes a single character into a node buffer - */ -function ctWriteChar(value, endian, buffer, offset) -{ - if (!(value instanceof Buffer)) - throw (new Error('Input must be a buffer')); - - mod_ctio.ruint8(value[0], endian, buffer, offset); - return (1); -} - -/* - * We're going to write 0s into the buffer if the string is shorter than the - * length of the array. - */ -function ctWriteCharArray(value, length, endian, buffer, offset) -{ - var ii; - - if (!(value instanceof Buffer)) - throw (new Error('Input must be a buffer')); - - if (value.length > length) - throw (new Error('value length greater than array length')); - - for (ii = 0; ii < value.length && ii < length; ii++) - mod_ctio.wuint8(value[ii], endian, buffer, offset + ii); - - for (; ii < length; ii++) - mod_ctio.wuint8(0, endian, offset + ii); - - - return (length); -} - -/* - * Each parser has their own set of types. We want to make sure that they each - * get their own copy as they may need to modify it. - */ -function ctGetBasicTypes() -{ - var ret = {}; - var key; - for (key in deftypes) - ret[key] = deftypes[key]; - - return (ret); -} - -/* - * Given a string in the form of type[length] we want to split this into an - * object that extracts that information. We want to note that we could possibly - * have nested arrays so this should only check the furthest one. It may also be - * the case that we have no [] pieces, in which case we just return the current - * type. - */ -function ctParseType(str) -{ - var begInd, endInd; - var type, len; - if (typeof (str) != 'string') - throw (new Error('type must be a Javascript string')); - - endInd = str.lastIndexOf(']'); - if (endInd == -1) { - if (str.lastIndexOf('[') != -1) - throw (new Error('found invalid type with \'[\' but ' + - 'no corresponding \']\'')); - - return ({ type: str }); - } - - begInd = str.lastIndexOf('['); - if (begInd == -1) - throw (new Error('found invalid type with \']\' but ' + - 'no corresponding \'[\'')); - - if (begInd >= endInd) - throw (new Error('malformed type, \']\' appears before \'[\'')); - - type = str.substring(0, begInd); - len = str.substring(begInd + 1, endInd); - - return ({ type: type, len: len }); -} - -/* - * Given a request validate that all of the fields for it are valid and make - * sense. This includes verifying the following notions: - * - Each type requested is present in types - * - Only allow a name for a field to be specified once - * - If an array is specified, validate that the requested field exists and - * comes before it. - * - If fields is defined, check that each entry has the occurrence of field - */ -function ctCheckReq(def, types, fields) -{ - var ii, jj; - var req, keys, key; - var found = {}; - - if (!(def instanceof Array)) - throw (new Error('definition is not an array')); - - if (def.length === 0) - throw (new Error('definition must have at least one element')); - - for (ii = 0; ii < def.length; ii++) { - req = def[ii]; - if (!(req instanceof Object)) - throw (new Error('definition must be an array of' + - 'objects')); - - keys = Object.keys(req); - if (keys.length != 1) - throw (new Error('definition entry must only have ' + - 'one key')); - - if (keys[0] in found) - throw (new Error('Specified name already ' + - 'specified: ' + keys[0])); - - if (!('type' in req[keys[0]])) - throw (new Error('missing required type definition')); - - key = ctParseType(req[keys[0]]['type']); - - /* - * We may have nested arrays, we need to check the validity of - * the types until the len field is undefined in key. However, - * each time len is defined we need to verify it is either an - * integer or corresponds to an already seen key. - */ - while (key['len'] !== undefined) { - if (isNaN(parseInt(key['len'], 10))) { - if (!(key['len'] in found)) - throw (new Error('Given an array ' + - 'length without a matching type')); - - } - - key = ctParseType(key['type']); - } - - /* Now we can validate if the type is valid */ - if (!(key['type'] in types)) - throw (new Error('type not found or typdefed: ' + - key['type'])); - - /* Check for any required fields */ - if (fields !== undefined) { - for (jj = 0; jj < fields.length; jj++) { - if (!(fields[jj] in req[keys[0]])) - throw (new Error('Missing required ' + - 'field: ' + fields[jj])); - } - } - - found[keys[0]] = true; - } -} - - -/* - * Create a new instance of the parser. Each parser has its own store of - * typedefs and endianness. Conf is an object with the following required - * values: - * - * endian Either 'big' or 'little' do determine the endianness we - * want to read from or write to. - * - * And the following optional values: - * - * char-type Valid options here are uint8 and int8. If uint8 is - * specified this changes the default behavior of a single - * char from being a buffer of a single character to being - * a uint8_t. If int8, it becomes an int8_t instead. - */ -function CTypeParser(conf) -{ - if (!conf) throw (new Error('missing required argument')); - - if (!('endian' in conf)) - throw (new Error('missing required endian value')); - - if (conf['endian'] != 'big' && conf['endian'] != 'little') - throw (new Error('Invalid endian type')); - - if ('char-type' in conf && (conf['char-type'] != 'uint8' && - conf['char-type'] != 'int8')) - throw (new Error('invalid option for char-type: ' + - conf['char-type'])); - - this.endian = conf['endian']; - this.types = ctGetBasicTypes(); - - /* - * There may be a more graceful way to do this, but this will have to - * serve. - */ - if ('char-type' in conf && conf['char-type'] == 'uint8') - this.types['char'] = this.types['uint8_t']; - - if ('char-type' in conf && conf['char-type'] == 'int8') - this.types['char'] = this.types['int8_t']; -} - -/* - * Sets the current endian value for the Parser. If the value is not valid, - * throws an Error. - * - * endian Either 'big' or 'little' do determine the endianness we - * want to read from or write to. - * - */ -CTypeParser.prototype.setEndian = function (endian) -{ - if (endian != 'big' && endian != 'little') - throw (new Error('invalid endian type, must be big or ' + - 'little')); - - this.endian = endian; -}; - -/* - * Returns the current value of the endian value for the parser. - */ -CTypeParser.prototype.getEndian = function () -{ - return (this.endian); -}; - -/* - * A user has requested to add a type, let us honor their request. Yet, if their - * request doth spurn us, send them unto the Hells which Dante describes. - * - * name The string for the type definition we're adding - * - * value Either a string that is a type/array name or an object - * that describes a struct. - */ -CTypeParser.prototype.typedef = function (name, value) -{ - var type; - - if (name === undefined) - throw (new (Error('missing required typedef argument: name'))); - - if (value === undefined) - throw (new (Error('missing required typedef argument: value'))); - - if (typeof (name) != 'string') - throw (new (Error('the name of a type must be a string'))); - - type = ctParseType(name); - - if (type['len'] !== undefined) - throw (new Error('Cannot have an array in the typedef name')); - - if (name in this.types) - throw (new Error('typedef name already present: ' + name)); - - if (typeof (value) != 'string' && !(value instanceof Array)) - throw (new Error('typedef value must either be a string or ' + - 'struct')); - - if (typeof (value) == 'string') { - type = ctParseType(value); - if (type['len'] !== undefined) { - if (isNaN(parseInt(type['len'], 10))) - throw (new (Error('typedef value must use ' + - 'fixed size array when outside of a ' + - 'struct'))); - } - - this.types[name] = value; - } else { - /* We have a struct, validate it */ - ctCheckReq(value, this.types); - this.types[name] = value; - } -}; - -/* - * Include all of the typedefs, but none of the built in types. This should be - * treated as read-only. - */ -CTypeParser.prototype.lstypes = function () -{ - var key; - var ret = {}; - - for (key in this.types) { - if (key in deftypes) - continue; - ret[key] = this.types[key]; - } - - return (ret); -}; - -/* - * Given a type string that may have array types that aren't numbers, try and - * fill them in from the values object. The object should be of the format where - * indexing into it should return a number for that type. - * - * str The type string - * - * values An object that can be used to fulfill type information - */ -function ctResolveArray(str, values) -{ - var ret = ''; - var type = ctParseType(str); - - while (type['len'] !== undefined) { - if (isNaN(parseInt(type['len'], 10))) { - if (typeof (values[type['len']]) != 'number') - throw (new Error('cannot sawp in non-number ' + - 'for array value')); - ret = '[' + values[type['len']] + ']' + ret; - } else { - ret = '[' + type['len'] + ']' + ret; - } - type = ctParseType(type['type']); - } - - ret = type['type'] + ret; - - return (ret); -} - -/* - * [private] Either the typedef resolves to another type string or to a struct. - * If it resolves to a struct, we just pass it off to read struct. If not, we - * can just pass it off to read entry. - */ -CTypeParser.prototype.resolveTypedef = function (type, dispatch, buffer, - offset, value) -{ - var pt; - - mod_assert.ok(type in this.types); - if (typeof (this.types[type]) == 'string') { - pt = ctParseType(this.types[type]); - if (dispatch == 'read') - return (this.readEntry(pt, buffer, offset)); - else if (dispatch == 'write') - return (this.writeEntry(value, pt, buffer, offset)); - else - throw (new Error('invalid dispatch type to ' + - 'resolveTypedef')); - } else { - if (dispatch == 'read') - return (this.readStruct(this.types[type], buffer, - offset)); - else if (dispatch == 'write') - return (this.writeStruct(value, this.types[type], - buffer, offset)); - else - throw (new Error('invalid dispatch type to ' + - 'resolveTypedef')); - } - -}; - -/* - * [private] Try and read in the specific entry. - */ -CTypeParser.prototype.readEntry = function (type, buffer, offset) -{ - var parse, len; - - /* - * Because we want to special case char[]s this is unfortunately - * a bit uglier than it really should be. We want to special - * case char[]s so that we return a node buffer, thus they are a - * first class type where as all other arrays just call into a - * generic array routine which calls their data-specific routine - * the specified number of times. - * - * The valid dispatch options we have are: - * - Array and char => char[] handler - * - Generic array handler - * - Generic typedef handler - * - Basic type handler - */ - if (type['len'] !== undefined) { - len = parseInt(type['len'], 10); - if (isNaN(len)) - throw (new Error('somehow got a non-numeric length')); - - if (type['type'] == 'char') - parse = this.types['char[]']['read'](len, - this.endian, buffer, offset); - else - parse = this.readArray(type['type'], - len, buffer, offset); - } else { - if (type['type'] in deftypes) - parse = this.types[type['type']]['read'](this.endian, - buffer, offset); - else - parse = this.resolveTypedef(type['type'], 'read', - buffer, offset); - } - - return (parse); -}; - -/* - * [private] Read an array of data - */ -CTypeParser.prototype.readArray = function (type, length, buffer, offset) -{ - var ii, ent, pt; - var baseOffset = offset; - var ret = new Array(length); - pt = ctParseType(type); - - for (ii = 0; ii < length; ii++) { - ent = this.readEntry(pt, buffer, offset); - offset += ent['size']; - ret[ii] = ent['value']; - } - - return ({ value: ret, size: offset - baseOffset }); -}; - -/* - * [private] Read a single struct in. - */ -CTypeParser.prototype.readStruct = function (def, buffer, offset) -{ - var parse, ii, type, entry, key; - var baseOffset = offset; - var ret = {}; - - /* Walk it and handle doing what's necessary */ - for (ii = 0; ii < def.length; ii++) { - key = Object.keys(def[ii])[0]; - entry = def[ii][key]; - - /* Resolve all array values */ - type = ctParseType(ctResolveArray(entry['type'], ret)); - - if ('offset' in entry) - offset = baseOffset + entry['offset']; - - parse = this.readEntry(type, buffer, offset); - - offset += parse['size']; - ret[key] = parse['value']; - } - - return ({ value: ret, size: (offset-baseOffset)}); -}; - -/* - * This is what we were born to do. We read the data from a buffer and return it - * in an object whose keys match the values from the object. - * - * def The array definition of the data to read in - * - * buffer The buffer to read data from - * - * offset The offset to start writing to - * - * Returns an object where each key corresponds to an entry in def and the value - * is the read value. - */ -CTypeParser.prototype.readData = function (def, buffer, offset) -{ - /* Sanity check for arguments */ - if (def === undefined) - throw (new Error('missing definition for what we should be' + - 'parsing')); - - if (buffer === undefined) - throw (new Error('missing buffer for what we should be ' + - 'parsing')); - - if (offset === undefined) - throw (new Error('missing offset for what we should be ' + - 'parsing')); - - /* Sanity check the object definition */ - ctCheckReq(def, this.types); - - return (this.readStruct(def, buffer, offset)['value']); -}; - -/* - * [private] Write out an array of data - */ -CTypeParser.prototype.writeArray = function (value, type, length, buffer, - offset) -{ - var ii, pt; - var baseOffset = offset; - if (!(value instanceof Array)) - throw (new Error('asked to write an array, but value is not ' + - 'an array')); - - if (value.length != length) - throw (new Error('asked to write array of length ' + length + - ' but that does not match value length: ' + value.length)); - - pt = ctParseType(type); - for (ii = 0; ii < length; ii++) - offset += this.writeEntry(value[ii], pt, buffer, offset); - - return (offset - baseOffset); -}; - -/* - * [private] Write the specific entry - */ -CTypeParser.prototype.writeEntry = function (value, type, buffer, offset) -{ - var len, ret; - - if (type['len'] !== undefined) { - len = parseInt(type['len'], 10); - if (isNaN(len)) - throw (new Error('somehow got a non-numeric length')); - - if (type['type'] == 'char') - ret = this.types['char[]']['write'](value, len, - this.endian, buffer, offset); - else - ret = this.writeArray(value, type['type'], - len, buffer, offset); - } else { - if (type['type'] in deftypes) - ret = this.types[type['type']]['write'](value, - this.endian, buffer, offset); - else - ret = this.resolveTypedef(type['type'], 'write', - buffer, offset, value); - } - - return (ret); -}; - -/* - * [private] Write a single struct out. - */ -CTypeParser.prototype.writeStruct = function (value, def, buffer, offset) -{ - var ii, entry, type, key; - var baseOffset = offset; - var vals = {}; - - for (ii = 0; ii < def.length; ii++) { - key = Object.keys(def[ii])[0]; - entry = def[ii][key]; - - type = ctParseType(ctResolveArray(entry['type'], vals)); - - if ('offset' in entry) - offset = baseOffset + entry['offset']; - - offset += this.writeEntry(value[ii], type, buffer, offset); - /* Now that we've written it out, we can use it for arrays */ - vals[key] = value[ii]; - } - - return (offset); -}; - -/* - * Unfortunately, we're stuck with the sins of an initial poor design. Because - * of that, we are going to have to support the old way of writing data via - * writeData. There we insert the values that you want to write into the - * definition. A little baroque. Internally, we use the new model. So we need to - * just get those values out of there. But to maintain the principle of least - * surprise, we're not going to modify the input data. - */ -function getValues(def) -{ - var ii, out, key; - out = []; - for (ii = 0; ii < def.length; ii++) { - key = Object.keys(def[ii])[0]; - mod_assert.ok('value' in def[ii][key]); - out.push(def[ii][key]['value']); - } - - return (out); -} - -/* - * This is the second half of what we were born to do, write out the data - * itself. Historically this function required you to put your values in the - * definition section. This was not the smartest thing to do and a bit of an - * oversight to be honest. As such, this function now takes a values argument. - * If values is non-null and non-undefined, it will be used to determine the - * values. This means that the old method is still supported, but is no longer - * acceptable. - * - * def The array definition of the data to write out with - * values - * - * buffer The buffer to write to - * - * offset The offset in the buffer to write to - * - * values An array of values to write. - */ -CTypeParser.prototype.writeData = function (def, buffer, offset, values) -{ - var hv; - - if (def === undefined) - throw (new Error('missing definition for what we should be' + - 'parsing')); - - if (buffer === undefined) - throw (new Error('missing buffer for what we should be ' + - 'parsing')); - - if (offset === undefined) - throw (new Error('missing offset for what we should be ' + - 'parsing')); - - hv = (values != null && values != undefined); - if (hv) { - if (!Array.isArray(values)) - throw (new Error('missing values for writing')); - ctCheckReq(def, this.types); - } else { - ctCheckReq(def, this.types, [ 'value' ]); - } - - this.writeStruct(hv ? values : getValues(def), def, buffer, offset); -}; - -/* - * Functions to go to and from 64 bit numbers in a way that is compatible with - * Javascript limitations. There are two sets. One where the user is okay with - * an approximation and one where they are definitely not okay with an - * approximation. - */ - -/* - * Attempts to convert an array of two integers returned from rsint64 / ruint64 - * into an absolute 64 bit number. If however the value would exceed 2^52 this - * will instead throw an error. The mantissa in a double is a 52 bit number and - * rather than potentially give you a value that is an approximation this will - * error. If you would rather an approximation, please see toApprox64. - * - * val An array of two 32-bit integers - */ -function toAbs64(val) -{ - if (val === undefined) - throw (new Error('missing required arg: value')); - - if (!Array.isArray(val)) - throw (new Error('value must be an array')); - - if (val.length != 2) - throw (new Error('value must be an array of length 2')); - - /* We have 20 bits worth of precision in this range */ - if (val[0] >= 0x100000) - throw (new Error('value would become approximated')); - - return (val[0] * Math.pow(2, 32) + val[1]); -} - -/* - * Will return the 64 bit value as returned in an array from rsint64 / ruint64 - * to a value as close as it can. Note that Javascript stores all numbers as a - * double and the mantissa only has 52 bits. Thus this version may approximate - * the value. - * - * val An array of two 32-bit integers - */ -function toApprox64(val) -{ - if (val === undefined) - throw (new Error('missing required arg: value')); - - if (!Array.isArray(val)) - throw (new Error('value must be an array')); - - if (val.length != 2) - throw (new Error('value must be an array of length 2')); - - return (Math.pow(2, 32) * val[0] + val[1]); -} - -function parseCTF(json, conf) -{ - var ctype = new CTypeParser(conf); - mod_ctf.ctfParseJson(json, ctype); - - return (ctype); -} - -/* - * Export the few things we actually want to. Currently this is just the CType - * Parser and ctio. - */ -exports.Parser = CTypeParser; -exports.toAbs64 = toAbs64; -exports.toApprox64 = toApprox64; - -exports.parseCTF = parseCTF; - -exports.ruint8 = mod_ctio.ruint8; -exports.ruint16 = mod_ctio.ruint16; -exports.ruint32 = mod_ctio.ruint32; -exports.ruint64 = mod_ctio.ruint64; -exports.wuint8 = mod_ctio.wuint8; -exports.wuint16 = mod_ctio.wuint16; -exports.wuint32 = mod_ctio.wuint32; -exports.wuint64 = mod_ctio.wuint64; - -exports.rsint8 = mod_ctio.rsint8; -exports.rsint16 = mod_ctio.rsint16; -exports.rsint32 = mod_ctio.rsint32; -exports.rsint64 = mod_ctio.rsint64; -exports.wsint8 = mod_ctio.wsint8; -exports.wsint16 = mod_ctio.wsint16; -exports.wsint32 = mod_ctio.wsint32; -exports.wsint64 = mod_ctio.wsint64; - -exports.rfloat = mod_ctio.rfloat; -exports.rdouble = mod_ctio.rdouble; -exports.wfloat = mod_ctio.wfloat; -exports.wdouble = mod_ctio.wdouble; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype deleted file mode 100644 index 3f94986a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype +++ /dev/null @@ -1,241 +0,0 @@ -'\" te -.\" Copyright (c) 2011, Robert Mustacchi. All Rights Reserved. -.\" Copyright (c) 2011, Joyent, Inc. All Rights Reserved. -.\" -.\" 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. -.TH CTIO 3CTYPE "December 12, 2011" -.SH NAME -ctio, ruint8, ruint16, ruint32, ruint64, wuint8, wuint16, wuint32, wuint64, -rsint8, rsint16, rsint32, rsint64, wsint8, wsint16, wsint32, wsint64, rfloat, -rdouble, wfloat, wdouble \- integer and float operations -.SH SYNOPSIS -.LP -.nf -var mod_ctype = require('ctype'); - -\fBNumber\fR \fBmod_ctype.ruint8\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber\fR \fBmod_ctype.ruint16\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber\fR \fBmod_ctype.ruint32\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber[2]\fR \fBmod_ctype.ruint64\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber\fR \fBmod_ctype.rsint8\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber\fR \fBmod_ctype.rsint16\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber\fR \fBmod_ctype.rsint32\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber[2]\fR \fBmod_ctype.rsint64\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber\fR \fBmod_ctype.rfloat\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber\fR \fBmod_ctype.rdouble\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wuint8\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wuint16\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wuint32\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wuint64\fR(\fBNumber[2]\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wsint8\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wsint16\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wsint32\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wsint64\fR(\fBNumber[2]\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wfloat\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wdouble\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.SH DESCRIPTION -.sp -.LP -The argument \fIbuf\fR refers to a valid buffer (from calling new Buffer()). The -argument \fIendian\fR is either the string 'big' or 'little' and controls -whether the data in the buffer is interpreted as big or little endian. The argument -\fIoffset\fR indicates the starting index into the buffer to read or write. All -functions ensure that starting at \fIoffset\fR does not overflow the end of the -buffer. The argument \fIvalue\fR is a Number that is the valid type for the -specific function. All functions that take \fIvalue\fR as an argument, verify -that the passed value is valid. - -.SS "\fBruint8()\fR, \fBruint16()\fR, \fBruint32()\fR" -.sp -.LP -The \fBruint8()\fR, \fBruint16()\fR, and \fBruint32()\fR functions read an 8, -16, and 32-bit unsigned value from \fIbuf\fR and return it. The value read is -influenced by the values of \fIoffset\fR and \fRendian\fI. - - -.SS "\fBrsint8()\fR, \fBrsint16()\fR, \fBrsint32()\fR" -.sp -.LP -The \fBruint8()\fR, \fBruint16()\fR, and \fBruint32()\fR functions work just as -\fBruint8()\fR, \fBruint16()\fR, and \fBruint32()\fR, except they return signed -integers. - -.SS "\fBruint64()\fR, \fBrsint64()\fR" -.sp -.LP -The \fBruint64()\fR and \fBrsint64()\fR functions read unsigned and signed 64 -bit integers respectively from \fBbuf\fR. Due to the limitations of ECMAScript's -\fBNumber\fR type, they cannot be stored as one value without a loss of -precision. Instead of returning the values as a single \fBNumber\fR, the -functions return an array of two numbers. The first entry always contains the -upper 32-bits and the second value contains the lower 32-bits. The lossy -transformation into a number would be \fIres[0]*Math.pow(2,32)+res[1]\fR. -Note that, unless an entry is zero, both array entries are guaranteed to have -the same sign. - -.SS "\fBwuint8()\fR, \fBwuint16()\fR, \fBwuint32()\fR" -.sp -.LP -The functions \fBwuint8()\fR, \fBwuint16()\fR, and \fBwuint32()\fR modify the -contents of \fBbuf\fR by writing an 8, 16, and 32-bit unsigned integer -respectively to \fBbuf\fR. It is illegal to pass a number that is not an integer -within the domain of the integer size, for example, for \fBwuint8()\fR the valid -range is \fB[0, 255]\fR. The value will be written in either big or little -endian format based upon the value of \fBendian\fR. - - -.SS "\fBwsint8()\fR, \fBwsint16()\fR, \fBwsint32()\fR" -.sp -.LP -The functions \fBwsint8()\fR, \fBwsint16()\fR, and \fBwsint32()\fR function -identically to the functions \fBwuint8()\fR, \fBwuint16()\fR, and -\fBwuint32()\fR except that they the valid domain for \fBvalue\fR is that of a -signed number instead of an unsigned number. For example the \fBwsint8()\fR has -a domain of \fB[-128, 127]\fR. - -.SS "\fBwuint64()\fR, \fBwsint64()\fR" -.sp -.LP -The functions \fBwuint64()\fR and \fBswint64()\fR write out 64-bit unsigned and -signed integers to \fBbuf\fR. The \fBvalue\fR argument must be in the same -format as described in \fBruint64()\fR and \fBrsint64()\fR. - -.SS "\fBrfloat()\fR, \fBrdouble()\fR" -.sp -.LP -The functions "\fBrfloat()\fR and \fBrdouble()\fR" work like the other read -functions, except that they read a single precision and double precision -IEEE-754 floating point value instead. - -.SS "\fBwfloat()\fR, \fBwdouble()\fR" -.sp -.LP -The functions "\fBrfloat()\fR and \fBrdouble()\fR" work like the other write -functions, except that the domain for a float is that of a single precision 4 -byte value. The domain for a double is any \fBNumber\fR in ECMAScript, which is -defined to be represented by a double. - -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Committed -_ -MT-Level See below. -_ -Standard Not standardized. -.TE - -.sp -.LP - -All functions are MT-safe in so far as there aren't shared memory MT concerns in -most node programs. If one where to concoct such an environment, these functions -wouldn't be MT-safe. - -.SH SEE ALSO -.sp -.LP diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json deleted file mode 100644 index 90d917e2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "ctype", - "version": "0.5.2", - "description": "read and write binary structures and data types", - "homepage": "https://github.com/rmustacc/node-ctype", - "author": { - "name": "Robert Mustacchi", - "email": "rm@fingolfin.org" - }, - "engines": { - "node": ">= 0.4" - }, - "main": "ctype.js", - "readme": "Node-CType is a way to read and write binary data in structured and easy to use\nformat. Its name comes from the C header file.\n\nTo get started, simply clone the repository or use npm to install it. Once it is\nthere, simply require it.\n\ngit clone git://github.com/rmustacc/node-ctype\nnpm install ctype\nvar mod_ctype = require('ctype')\n\n\nThere are two APIs that you can use, depending on what abstraction you'd like.\nThe low level API let's you read and write individual integers and floats from\nbuffers. The higher level API let's you read and write structures of these. To\nillustrate this, let's looks look at how we would read and write a binary\nencoded x,y point.\n\nIn C we would define this structure as follows:\n\ntypedef struct point {\n\tuint16_t\tp_x;\n\tuint16_t\tp_y;\n} point_t;\n\nTo read a binary encoded point from a Buffer, we first need to create a CType\nparser (where we specify the endian and other options) and add the typedef.\n\nvar parser = new mod_ctype.Parser({ endian: 'big' });\nparser.typedef('point_t', [\n\t{ x: { type: 'uint16_t' } },\n\t{ y: { type: 'uint16_t' } }\n]);\n\nFrom here, given a buffer buf and an offset into it, we can read a point.\n\nvar out = parser.readData([ { point: { type: 'point_t' } } ], buffer, 0);\nconsole.log(out);\n{ point: { x: 23, y: 42 } }\n\nAnother way to get the same information would be to use the low level methods.\nNote that these require you to manually deal with the offset. Here's how we'd\nget the same values of x and y from the buffer.\n\nvar x = mod_ctype.ruint16(buf, 'big', 0);\nvar y = mod_ctype.ruint16(buf, 'big', 2);\nconsole.log(x + ', ' + y);\n23, 42\n\nThe true power of this API comes from the ability to define and nest typedefs,\njust as you would in C. By default, the following types are defined by default.\nNote that they return a Number, unless indicated otherwise.\n\n * int8_t\n * int16_t\n * int32_t\n * int64_t (returns an array where val[0] << 32 + val[1] would be the value)\n * uint8_t\n * uint16_t\n * uint32_t\n * uint64_t (returns an array where val[0] << 32 + val[1] would be the value)\n * float\n * double\n * char (either returns a buffer with that character or a uint8_t)\n * char[] (returns an object with the buffer and the number of characters read which is either the total amount requested or until the first 0)\n\n\nctf2json integration:\n\nNode-CType supports consuming the output of ctf2json. Once you read in a JSON file,\nall you have to do to add all the definitions it contains is:\n\nvar data, parser;\ndata = JSON.parse(parsedJSONData);\nparser = mod_ctype.parseCTF(data, { endian: 'big' });\n\nFor more documentation, see the file README.old. Full documentation is in the\nprocess of being rewritten as a series of manual pages which will be available\nin the repository and online for viewing.\n\nTo read the ctio manual page simple run, from the root of the workspace:\n\nman -Mman -s 3ctype ctio\n", - "readmeFilename": "README", - "_id": "ctype@0.5.2", - "dist": { - "shasum": "c2ddce3ef5e24701c870d46f42c33b116c8f67da" - }, - "_from": "ctype@0.5.2", - "_resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsl.conf b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsl.conf deleted file mode 100755 index 845f367a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsl.conf +++ /dev/null @@ -1,129 +0,0 @@ -# -# Configuration File for JavaScript Lint 0.3.0 -# Developed by Matthias Miller (http://www.JavaScriptLint.com) -# -# This configuration file can be used to lint a collection of scripts, or to enable -# or disable warnings for scripts that are linted via the command line. -# - -### Warnings -# Enable or disable warnings based on requirements. -# Use "+WarningName" to display or "-WarningName" to suppress. -# -+no_return_value # function {0} does not always return a value -+duplicate_formal # duplicate formal argument {0} -+equal_as_assign # test for equality (==) mistyped as assignment (=)?{0} -+var_hides_arg # variable {0} hides argument -+redeclared_var # redeclaration of {0} {1} -+anon_no_return_value # anonymous function does not always return a value -+missing_semicolon # missing semicolon -+meaningless_block # meaningless block; curly braces have no impact -+comma_separated_stmts # multiple statements separated by commas (use semicolons?) -+unreachable_code # unreachable code -+missing_break # missing break statement -+missing_break_for_last_case # missing break statement for last case in switch -+comparison_type_conv # comparisons against null, 0, true, false, or an empty string allowing implicit type conversion (use === or !==) --inc_dec_within_stmt # increment (++) and decrement (--) operators used as part of greater statement -+useless_void # use of the void type may be unnecessary (void is always undefined) --useless_quotes # quotation marks are unnecessary -+multiple_plus_minus # unknown order of operations for successive plus (e.g. x+++y) or minus (e.g. x---y) signs -+use_of_label # use of label --block_without_braces # block statement without curly braces -+leading_decimal_point # leading decimal point may indicate a number or an object member -+trailing_decimal_point # trailing decimal point may indicate a number or an object member --octal_number # leading zeros make an octal number -+nested_comment # nested comment -+misplaced_regex # regular expressions should be preceded by a left parenthesis, assignment, colon, or comma -+ambiguous_newline # unexpected end of line; it is ambiguous whether these lines are part of the same statement -+empty_statement # empty statement or extra semicolon --missing_option_explicit # the "option explicit" control comment is missing -+partial_option_explicit # the "option explicit" control comment, if used, must be in the first script tag -+dup_option_explicit # duplicate "option explicit" control comment -+useless_assign # useless assignment -+ambiguous_nested_stmt # block statements containing block statements should use curly braces to resolve ambiguity -+ambiguous_else_stmt # the else statement could be matched with one of multiple if statements (use curly braces to indicate intent) -+missing_default_case # missing default case in switch statement -+duplicate_case_in_switch # duplicate case in switch statements -+default_not_at_end # the default case is not at the end of the switch statement -+legacy_cc_not_understood # couldn't understand control comment using /*@keyword@*/ syntax -+jsl_cc_not_understood # couldn't understand control comment using /*jsl:keyword*/ syntax -+useless_comparison # useless comparison; comparing identical expressions -+with_statement # with statement hides undeclared variables; use temporary variable instead -+trailing_comma_in_array # extra comma is not recommended in array initializers -+assign_to_function_call # assignment to a function call -+parseint_missing_radix # parseInt missing radix parameter --unreferenced_argument # argument declared but never referenced: {name} - -### Output format -# Customize the format of the error message. -# __FILE__ indicates current file path -# __FILENAME__ indicates current file name -# __LINE__ indicates current line -# __ERROR__ indicates error message -# -# Visual Studio syntax (default): -+output-format __FILE__(__LINE__): __ERROR__ -# Alternative syntax: -#+output-format __FILE__:__LINE__: __ERROR__ - - -### Context -# Show the in-line position of the error. -# Use "+context" to display or "-context" to suppress. -# -+context - - -### Semicolons -# By default, assignments of an anonymous function to a variable or -# property (such as a function prototype) must be followed by a semicolon. -# -#+lambda_assign_requires_semicolon # deprecated setting - - -### Control Comments -# Both JavaScript Lint and the JScript interpreter confuse each other with the syntax for -# the /*@keyword@*/ control comments and JScript conditional comments. (The latter is -# enabled in JScript with @cc_on@). The /*jsl:keyword*/ syntax is preferred for this reason, -# although legacy control comments are enabled by default for backward compatibility. -# -+legacy_control_comments - - -### JScript Function Extensions -# JScript allows member functions to be defined like this: -# function MyObj() { /*constructor*/ } -# function MyObj.prototype.go() { /*member function*/ } -# -# It also allows events to be attached like this: -# function window::onload() { /*init page*/ } -# -# This is a Microsoft-only JavaScript extension. Enable this setting to allow them. -# -#-jscript_function_extensions # deprecated setting - - -### Defining identifiers -# By default, "option explicit" is enabled on a per-file basis. -# To enable this for all files, use "+always_use_option_explicit" --always_use_option_explicit - -# Define certain identifiers of which the lint is not aware. -# (Use this in conjunction with the "undeclared identifier" warning.) -# -# Common uses for webpages might be: -#+define window -#+define document -+define require -+define exports -+define console -+define Buffer -+define JSON - -### Files -# Specify which files to lint -# Use "+recurse" to enable recursion (disabled by default). -# To add a set of files, use "+process FileName", "+process Folder\Path\*.js", -# or "+process Folder\Path\*.htm". -# -#+process jsl-test.js diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle deleted file mode 100755 index 96c72b6d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle +++ /dev/null @@ -1,839 +0,0 @@ -#!/usr/bin/env perl -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright 2008 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# Copyright 2011 Joyent, Inc. All rights reserved. -# -# jsstyle - check for some common stylistic errors. -# -# jsstyle is a sort of "lint" for Javascript coding style. This tool is -# derived from the cstyle tool, used to check for the style used in the -# Solaris kernel, sometimes known as "Bill Joy Normal Form". -# -# There's a lot this can't check for, like proper indentation of code -# blocks. There's also a lot more this could check for. -# -# A note to the non perl literate: -# -# perl regular expressions are pretty much like egrep -# regular expressions, with the following special symbols -# -# \s any space character -# \S any non-space character -# \w any "word" character [a-zA-Z0-9_] -# \W any non-word character -# \d a digit [0-9] -# \D a non-digit -# \b word boundary (between \w and \W) -# \B non-word boundary -# - -require 5.0; -use IO::File; -use Getopt::Std; -use strict; - -my $usage = -"usage: jsstyle [-chvC] [-o constructs] file ... - -c check continuation indentation inside functions - -h perform heuristic checks that are sometimes wrong - -v verbose - -C don't check anything in header block comments - -o constructs - allow a comma-seperated list of optional constructs: - doxygen allow doxygen-style block comments (/** /*!) - splint allow splint-style lint comments (/*@ ... @*/) -"; - -my %opts; - -if (!getopts("cho:vC", \%opts)) { - print $usage; - exit 2; -} - -my $check_continuation = $opts{'c'}; -my $heuristic = $opts{'h'}; -my $verbose = $opts{'v'}; -my $ignore_hdr_comment = $opts{'C'}; - -my $doxygen_comments = 0; -my $splint_comments = 0; - -if (defined($opts{'o'})) { - for my $x (split /,/, $opts{'o'}) { - if ($x eq "doxygen") { - $doxygen_comments = 1; - } elsif ($x eq "splint") { - $splint_comments = 1; - } else { - print "jsstyle: unrecognized construct \"$x\"\n"; - print $usage; - exit 2; - } - } -} - -my ($filename, $line, $prev); # shared globals - -my $fmt; -my $hdr_comment_start; - -if ($verbose) { - $fmt = "%s: %d: %s\n%s\n"; -} else { - $fmt = "%s: %d: %s\n"; -} - -if ($doxygen_comments) { - # doxygen comments look like "/*!" or "/**"; allow them. - $hdr_comment_start = qr/^\s*\/\*[\!\*]?$/; -} else { - $hdr_comment_start = qr/^\s*\/\*$/; -} - -# Note, following must be in single quotes so that \s and \w work right. -my $lint_re = qr/\/\*(?: - jsl:\w+?|ARGSUSED[0-9]*|NOTREACHED|LINTLIBRARY|VARARGS[0-9]*| - CONSTCOND|CONSTANTCOND|CONSTANTCONDITION|EMPTY| - FALLTHRU|FALLTHROUGH|LINTED.*?|PRINTFLIKE[0-9]*| - PROTOLIB[0-9]*|SCANFLIKE[0-9]*|JSSTYLED.*? - )\*\//x; - -my $splint_re = qr/\/\*@.*?@\*\//x; - -my $err_stat = 0; # exit status - -if ($#ARGV >= 0) { - foreach my $arg (@ARGV) { - my $fh = new IO::File $arg, "r"; - if (!defined($fh)) { - printf "%s: cannot open\n", $arg; - } else { - &jsstyle($arg, $fh); - close $fh; - } - } -} else { - &jsstyle("<stdin>", *STDIN); -} -exit $err_stat; - -my $no_errs = 0; # set for JSSTYLED-protected lines - -sub err($) { - my ($error) = @_; - unless ($no_errs) { - printf $fmt, $filename, $., $error, $line; - $err_stat = 1; - } -} - -sub err_prefix($$) { - my ($prevline, $error) = @_; - my $out = $prevline."\n".$line; - unless ($no_errs) { - printf $fmt, $filename, $., $error, $out; - $err_stat = 1; - } -} - -sub err_prev($) { - my ($error) = @_; - unless ($no_errs) { - printf $fmt, $filename, $. - 1, $error, $prev; - $err_stat = 1; - } -} - -sub jsstyle($$) { - -my ($fn, $filehandle) = @_; -$filename = $fn; # share it globally - -my $in_cpp = 0; -my $next_in_cpp = 0; - -my $in_comment = 0; -my $in_header_comment = 0; -my $comment_done = 0; -my $in_function = 0; -my $in_function_header = 0; -my $in_declaration = 0; -my $note_level = 0; -my $nextok = 0; -my $nocheck = 0; - -my $in_string = 0; - -my ($okmsg, $comment_prefix); - -$line = ''; -$prev = ''; -reset_indent(); - -line: while (<$filehandle>) { - s/\r?\n$//; # strip return and newline - - # save the original line, then remove all text from within - # double or single quotes, we do not want to check such text. - - $line = $_; - - # - # C allows strings to be continued with a backslash at the end of - # the line. We translate that into a quoted string on the previous - # line followed by an initial quote on the next line. - # - # (we assume that no-one will use backslash-continuation with character - # constants) - # - $_ = '"' . $_ if ($in_string && !$nocheck && !$in_comment); - - # - # normal strings and characters - # - s/'([^\\']|\\.)*'/\'\'/g; - s/"([^\\"]|\\.)*"/\"\"/g; - - # - # detect string continuation - # - if ($nocheck || $in_comment) { - $in_string = 0; - } else { - # - # Now that all full strings are replaced with "", we check - # for unfinished strings continuing onto the next line. - # - $in_string = - (s/([^"](?:"")*)"([^\\"]|\\.)*\\$/$1""/ || - s/^("")*"([^\\"]|\\.)*\\$/""/); - } - - # - # figure out if we are in a cpp directive - # - $in_cpp = $next_in_cpp || /^\s*#/; # continued or started - $next_in_cpp = $in_cpp && /\\$/; # only if continued - - # strip off trailing backslashes, which appear in long macros - s/\s*\\$//; - - # an /* END JSSTYLED */ comment ends a no-check block. - if ($nocheck) { - if (/\/\* *END *JSSTYLED *\*\//) { - $nocheck = 0; - } else { - reset_indent(); - next line; - } - } - - # a /*JSSTYLED*/ comment indicates that the next line is ok. - if ($nextok) { - if ($okmsg) { - err($okmsg); - } - $nextok = 0; - $okmsg = 0; - if (/\/\* *JSSTYLED.*\*\//) { - /^.*\/\* *JSSTYLED *(.*) *\*\/.*$/; - $okmsg = $1; - $nextok = 1; - } - $no_errs = 1; - } elsif ($no_errs) { - $no_errs = 0; - } - - # check length of line. - # first, a quick check to see if there is any chance of being too long. - if (($line =~ tr/\t/\t/) * 7 + length($line) > 80) { - # yes, there is a chance. - # replace tabs with spaces and check again. - my $eline = $line; - 1 while $eline =~ - s/\t+/' ' x (length($&) * 8 - length($`) % 8)/e; - if (length($eline) > 80) { - err("line > 80 characters"); - } - } - - # ignore NOTE(...) annotations (assumes NOTE is on lines by itself). - if ($note_level || /\b_?NOTE\s*\(/) { # if in NOTE or this is NOTE - s/[^()]//g; # eliminate all non-parens - $note_level += s/\(//g - length; # update paren nest level - next; - } - - # a /* BEGIN JSSTYLED */ comment starts a no-check block. - if (/\/\* *BEGIN *JSSTYLED *\*\//) { - $nocheck = 1; - } - - # a /*JSSTYLED*/ comment indicates that the next line is ok. - if (/\/\* *JSSTYLED.*\*\//) { - /^.*\/\* *JSSTYLED *(.*) *\*\/.*$/; - $okmsg = $1; - $nextok = 1; - } - if (/\/\/ *JSSTYLED/) { - /^.*\/\/ *JSSTYLED *(.*)$/; - $okmsg = $1; - $nextok = 1; - } - - # universal checks; apply to everything - if (/\t +\t/) { - err("spaces between tabs"); - } - if (/ \t+ /) { - err("tabs between spaces"); - } - if (/\s$/) { - err("space or tab at end of line"); - } - if (/[^ \t(]\/\*/ && !/\w\(\/\*.*\*\/\);/) { - err("comment preceded by non-blank"); - } - - # is this the beginning or ending of a function? - # (not if "struct foo\n{\n") - if (/^{$/ && $prev =~ /\)\s*(const\s*)?(\/\*.*\*\/\s*)?\\?$/) { - $in_function = 1; - $in_declaration = 1; - $in_function_header = 0; - $prev = $line; - next line; - } - if (/^}\s*(\/\*.*\*\/\s*)*$/) { - if ($prev =~ /^\s*return\s*;/) { - err_prev("unneeded return at end of function"); - } - $in_function = 0; - reset_indent(); # we don't check between functions - $prev = $line; - next line; - } - if (/^\w*\($/) { - $in_function_header = 1; - } - - # a blank line terminates the declarations within a function. - # XXX - but still a problem in sub-blocks. - if ($in_declaration && /^$/) { - $in_declaration = 0; - } - - if ($comment_done) { - $in_comment = 0; - $in_header_comment = 0; - $comment_done = 0; - } - # does this looks like the start of a block comment? - if (/$hdr_comment_start/) { - if (!/^\t*\/\*/) { - err("block comment not indented by tabs"); - } - $in_comment = 1; - /^(\s*)\//; - $comment_prefix = $1; - if ($comment_prefix eq "") { - $in_header_comment = 1; - } - $prev = $line; - next line; - } - # are we still in the block comment? - if ($in_comment) { - if (/^$comment_prefix \*\/$/) { - $comment_done = 1; - } elsif (/\*\//) { - $comment_done = 1; - err("improper block comment close") - unless ($ignore_hdr_comment && $in_header_comment); - } elsif (!/^$comment_prefix \*[ \t]/ && - !/^$comment_prefix \*$/) { - err("improper block comment") - unless ($ignore_hdr_comment && $in_header_comment); - } - } - - if ($in_header_comment && $ignore_hdr_comment) { - $prev = $line; - next line; - } - - # check for errors that might occur in comments and in code. - - # allow spaces to be used to draw pictures in header comments. - #if (/[^ ] / && !/".* .*"/ && !$in_header_comment) { - # err("spaces instead of tabs"); - #} - #if (/^ / && !/^ \*[ \t\/]/ && !/^ \*$/ && - # (!/^ \w/ || $in_function != 0)) { - # err("indent by spaces instead of tabs"); - #} - if (/^ {2,}/ && !/^ [^ ]/) { - err("indent by spaces instead of tabs"); - } - if (/^\t+ [^ \t\*]/ || /^\t+ \S/ || /^\t+ \S/) { - err("continuation line not indented by 4 spaces"); - } - - if (/^\s*\/\*./ && !/^\s*\/\*.*\*\// && !/$hdr_comment_start/) { - err("improper first line of block comment"); - } - - if ($in_comment) { # still in comment, don't do further checks - $prev = $line; - next line; - } - - if ((/[^(]\/\*\S/ || /^\/\*\S/) && - !(/$lint_re/ || ($splint_comments && /$splint_re/))) { - err("missing blank after open comment"); - } - if (/\S\*\/[^)]|\S\*\/$/ && - !(/$lint_re/ || ($splint_comments && /$splint_re/))) { - err("missing blank before close comment"); - } - if (/\/\/\S/) { # C++ comments - err("missing blank after start comment"); - } - # check for unterminated single line comments, but allow them when - # they are used to comment out the argument list of a function - # declaration. - if (/\S.*\/\*/ && !/\S.*\/\*.*\*\// && !/\(\/\*/) { - err("unterminated single line comment"); - } - - if (/^(#else|#endif|#include)(.*)$/) { - $prev = $line; - next line; - } - - # - # delete any comments and check everything else. Note that - # ".*?" is a non-greedy match, so that we don't get confused by - # multiple comments on the same line. - # - s/\/\*.*?\*\///g; - s/\/\/.*$//; # C++ comments - - # delete any trailing whitespace; we have already checked for that. - s/\s*$//; - - # following checks do not apply to text in comments. - if (/"/) { - err("literal string using double-quote instead of single"); - } - - if (/[^=!<>\s][!<>=]=/ || /[^<>!=][!<>=]==?[^\s,=]/ || - (/[^->]>[^,=>\s]/ && !/[^->]>$/) || - (/[^<]<[^,=<\s]/ && !/[^<]<$/) || - /[^<\s]<[^<]/ || /[^->\s]>[^>]/) { - err("missing space around relational operator"); - } - if (/\S>>=/ || /\S<<=/ || />>=\S/ || /<<=\S/ || /\S[-+*\/&|^%]=/ || - (/[^-+*\/&|^%!<>=\s]=[^=]/ && !/[^-+*\/&|^%!<>=\s]=$/) || - (/[^!<>=]=[^=\s]/ && !/[^!<>=]=$/)) { - # XXX - should only check this for C++ code - # XXX - there are probably other forms that should be allowed - if (!/\soperator=/) { - err("missing space around assignment operator"); - } - } - if (/[,;]\S/ && !/\bfor \(;;\)/) { - err("comma or semicolon followed by non-blank"); - } - # allow "for" statements to have empty "while" clauses - if (/\s[,;]/ && !/^[\t]+;$/ && !/^\s*for \([^;]*; ;[^;]*\)/) { - err("comma or semicolon preceded by blank"); - } - if (/^\s*(&&|\|\|)/) { - err("improper boolean continuation"); - } - if (/\S *(&&|\|\|)/ || /(&&|\|\|) *\S/) { - err("more than one space around boolean operator"); - } - if (/\b(delete|typeof|instanceOf|throw|with|catch|new|function|in|for|if|while|switch|return|case)\(/) { - err("missing space between keyword and paren"); - } - if (/(\b(catch|for|if|with|while|switch|return)\b.*){2,}/) { - # multiple "case" and "sizeof" allowed - err("more than one keyword on line"); - } - if (/\b(delete|typeof|instanceOf|with|throw|catch|new|function|in|for|if|while|switch|return|case)\s\s+\(/ && - !/^#if\s+\(/) { - err("extra space between keyword and paren"); - } - # try to detect "func (x)" but not "if (x)" or - # "#define foo (x)" or "int (*func)();" - if (/\w\s\(/) { - my $s = $_; - # strip off all keywords on the line - s/\b(delete|typeof|instanceOf|throw|with|catch|new|function|in|for|if|while|switch|return|case)\s\(/XXX(/g; - s/#elif\s\(/XXX(/g; - s/^#define\s+\w+\s+\(/XXX(/; - # do not match things like "void (*f)();" - # or "typedef void (func_t)();" - s/\w\s\(+\*/XXX(*/g; - s/\b(void)\s+\(+/XXX(/og; - if (/\w\s\(/) { - err("extra space between function name and left paren"); - } - $_ = $s; - } - - if (/^\s*return\W[^;]*;/ && !/^\s*return\s*\(.*\);/) { - err("unparenthesized return expression"); - } - if (/\btypeof\b/ && !/\btypeof\s*\(.*\)/) { - err("unparenthesized typeof expression"); - } - if (/\(\s/) { - err("whitespace after left paren"); - } - # allow "for" statements to have empty "continue" clauses - if (/\s\)/ && !/^\s*for \([^;]*;[^;]*; \)/) { - err("whitespace before right paren"); - } - if (/^\s*\(void\)[^ ]/) { - err("missing space after (void) cast"); - } - if (/\S{/ && !/({|\(){/) { - err("missing space before left brace"); - } - if ($in_function && /^\s+{/ && - ($prev =~ /\)\s*$/ || $prev =~ /\bstruct\s+\w+$/)) { - err("left brace starting a line"); - } - if (/}(else|while)/) { - err("missing space after right brace"); - } - if (/}\s\s+(else|while)/) { - err("extra space after right brace"); - } - if (/^\s+#/) { - err("preprocessor statement not in column 1"); - } - if (/^#\s/) { - err("blank after preprocessor #"); - } - - # - # We completely ignore, for purposes of indentation: - # * lines outside of functions - # * preprocessor lines - # - if ($check_continuation && $in_function && !$in_cpp) { - process_indent($_); - } - - if ($heuristic) { - # cannot check this everywhere due to "struct {\n...\n} foo;" - if ($in_function && !$in_declaration && - /}./ && !/}\s+=/ && !/{.*}[;,]$/ && !/}(\s|)*$/ && - !/} (else|while)/ && !/}}/) { - err("possible bad text following right brace"); - } - # cannot check this because sub-blocks in - # the middle of code are ok - if ($in_function && /^\s+{/) { - err("possible left brace starting a line"); - } - } - if (/^\s*else\W/) { - if ($prev =~ /^\s*}$/) { - err_prefix($prev, - "else and right brace should be on same line"); - } - } - $prev = $line; -} - -if ($prev eq "") { - err("last line in file is blank"); -} - -} - -# -# Continuation-line checking -# -# The rest of this file contains the code for the continuation checking -# engine. It's a pretty simple state machine which tracks the expression -# depth (unmatched '('s and '['s). -# -# Keep in mind that the argument to process_indent() has already been heavily -# processed; all comments have been replaced by control-A, and the contents of -# strings and character constants have been elided. -# - -my $cont_in; # currently inside of a continuation -my $cont_off; # skipping an initializer or definition -my $cont_noerr; # suppress cascading errors -my $cont_start; # the line being continued -my $cont_base; # the base indentation -my $cont_first; # this is the first line of a statement -my $cont_multiseg; # this continuation has multiple segments - -my $cont_special; # this is a C statement (if, for, etc.) -my $cont_macro; # this is a macro -my $cont_case; # this is a multi-line case - -my @cont_paren; # the stack of unmatched ( and [s we've seen - -sub -reset_indent() -{ - $cont_in = 0; - $cont_off = 0; -} - -sub -delabel($) -{ - # - # replace labels with tabs. Note that there may be multiple - # labels on a line. - # - local $_ = $_[0]; - - while (/^(\t*)( *(?:(?:\w+\s*)|(?:case\b[^:]*)): *)(.*)$/) { - my ($pre_tabs, $label, $rest) = ($1, $2, $3); - $_ = $pre_tabs; - while ($label =~ s/^([^\t]*)(\t+)//) { - $_ .= "\t" x (length($2) + length($1) / 8); - } - $_ .= ("\t" x (length($label) / 8)).$rest; - } - - return ($_); -} - -sub -process_indent($) -{ - require strict; - local $_ = $_[0]; # preserve the global $_ - - s///g; # No comments - s/\s+$//; # Strip trailing whitespace - - return if (/^$/); # skip empty lines - - # regexps used below; keywords taking (), macros, and continued cases - my $special = '(?:(?:\}\s*)?else\s+)?(?:if|for|while|switch)\b'; - my $macro = '[A-Z_][A-Z_0-9]*\('; - my $case = 'case\b[^:]*$'; - - # skip over enumerations, array definitions, initializers, etc. - if ($cont_off <= 0 && !/^\s*$special/ && - (/(?:(?:\b(?:enum|struct|union)\s*[^\{]*)|(?:\s+=\s*)){/ || - (/^\s*{/ && $prev =~ /=\s*(?:\/\*.*\*\/\s*)*$/))) { - $cont_in = 0; - $cont_off = tr/{/{/ - tr/}/}/; - return; - } - if ($cont_off) { - $cont_off += tr/{/{/ - tr/}/}/; - return; - } - - if (!$cont_in) { - $cont_start = $line; - - if (/^\t* /) { - err("non-continuation indented 4 spaces"); - $cont_noerr = 1; # stop reporting - } - $_ = delabel($_); # replace labels with tabs - - # check if the statement is complete - return if (/^\s*\}?$/); - return if (/^\s*\}?\s*else\s*\{?$/); - return if (/^\s*do\s*\{?$/); - return if (/{$/); - return if (/}[,;]?$/); - - # Allow macros on their own lines - return if (/^\s*[A-Z_][A-Z_0-9]*$/); - - # cases we don't deal with, generally non-kosher - if (/{/) { - err("stuff after {"); - return; - } - - # Get the base line, and set up the state machine - /^(\t*)/; - $cont_base = $1; - $cont_in = 1; - @cont_paren = (); - $cont_first = 1; - $cont_multiseg = 0; - - # certain things need special processing - $cont_special = /^\s*$special/? 1 : 0; - $cont_macro = /^\s*$macro/? 1 : 0; - $cont_case = /^\s*$case/? 1 : 0; - } else { - $cont_first = 0; - - # Strings may be pulled back to an earlier (half-)tabstop - unless ($cont_noerr || /^$cont_base / || - (/^\t*(?: )?(?:gettext\()?\"/ && !/^$cont_base\t/)) { - err_prefix($cont_start, - "continuation should be indented 4 spaces"); - } - } - - my $rest = $_; # keeps the remainder of the line - - # - # The split matches 0 characters, so that each 'special' character - # is processed separately. Parens and brackets are pushed and - # popped off the @cont_paren stack. For normal processing, we wait - # until a ; or { terminates the statement. "special" processing - # (if/for/while/switch) is allowed to stop when the stack empties, - # as is macro processing. Case statements are terminated with a : - # and an empty paren stack. - # - foreach $_ (split /[^\(\)\[\]\{\}\;\:]*/) { - next if (length($_) == 0); - - # rest contains the remainder of the line - my $rxp = "[^\Q$_\E]*\Q$_\E"; - $rest =~ s/^$rxp//; - - if (/\(/ || /\[/) { - push @cont_paren, $_; - } elsif (/\)/ || /\]/) { - my $cur = $_; - tr/\)\]/\(\[/; - - my $old = (pop @cont_paren); - if (!defined($old)) { - err("unexpected '$cur'"); - $cont_in = 0; - last; - } elsif ($old ne $_) { - err("'$cur' mismatched with '$old'"); - $cont_in = 0; - last; - } - - # - # If the stack is now empty, do special processing - # for if/for/while/switch and macro statements. - # - next if (@cont_paren != 0); - if ($cont_special) { - if ($rest =~ /^\s*{?$/) { - $cont_in = 0; - last; - } - if ($rest =~ /^\s*;$/) { - err("empty if/for/while body ". - "not on its own line"); - $cont_in = 0; - last; - } - if (!$cont_first && $cont_multiseg == 1) { - err_prefix($cont_start, - "multiple statements continued ". - "over multiple lines"); - $cont_multiseg = 2; - } elsif ($cont_multiseg == 0) { - $cont_multiseg = 1; - } - # We've finished this section, start - # processing the next. - goto section_ended; - } - if ($cont_macro) { - if ($rest =~ /^$/) { - $cont_in = 0; - last; - } - } - } elsif (/\;/) { - if ($cont_case) { - err("unexpected ;"); - } elsif (!$cont_special) { - err("unexpected ;") if (@cont_paren != 0); - if (!$cont_first && $cont_multiseg == 1) { - err_prefix($cont_start, - "multiple statements continued ". - "over multiple lines"); - $cont_multiseg = 2; - } elsif ($cont_multiseg == 0) { - $cont_multiseg = 1; - } - if ($rest =~ /^$/) { - $cont_in = 0; - last; - } - if ($rest =~ /^\s*special/) { - err("if/for/while/switch not started ". - "on its own line"); - } - goto section_ended; - } - } elsif (/\{/) { - err("{ while in parens/brackets") if (@cont_paren != 0); - err("stuff after {") if ($rest =~ /[^\s}]/); - $cont_in = 0; - last; - } elsif (/\}/) { - err("} while in parens/brackets") if (@cont_paren != 0); - if (!$cont_special && $rest !~ /^\s*(while|else)\b/) { - if ($rest =~ /^$/) { - err("unexpected }"); - } else { - err("stuff after }"); - } - $cont_in = 0; - last; - } - } elsif (/\:/ && $cont_case && @cont_paren == 0) { - err("stuff after multi-line case") if ($rest !~ /$^/); - $cont_in = 0; - last; - } - next; -section_ended: - # End of a statement or if/while/for loop. Reset - # cont_special and cont_macro based on the rest of the - # line. - $cont_special = ($rest =~ /^\s*$special/)? 1 : 0; - $cont_macro = ($rest =~ /^\s*$macro/)? 1 : 0; - $cont_case = 0; - next; - } - $cont_noerr = 0 if (!$cont_in); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/float.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/float.json deleted file mode 100644 index 29d7bd89..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/float.json +++ /dev/null @@ -1,13 +0,0 @@ -{ "metadata": - { - "ctf2json_version": "1.0", - "created_at": 1316563626, - "derived_from": "/lib/libc.so", - "ctf_version": 2, - "requested_types": [ "float" ] - }, -"data": - [ - { "name": "float", "float": { "length": 4 } } - ] -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/int.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/int.json deleted file mode 100644 index f9773a14..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/int.json +++ /dev/null @@ -1,13 +0,0 @@ -{ "metadata": - { - "ctf2json_version": "1.0", - "created_at": 1316563631, - "derived_from": "/lib/libc.so", - "ctf_version": 2, - "requested_types": [ "int" ] - }, -"data": - [ - { "name": "int", "integer": { "length": 4, "signed": true } } - ] -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/psinfo.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/psinfo.json deleted file mode 100644 index e0ee5e0d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/psinfo.json +++ /dev/null @@ -1,104 +0,0 @@ -{ "metadata": - { - "ctf2json_version": "1.0", - "created_at": 1316563573, - "derived_from": "/lib/libc.so", - "ctf_version": 2, - "requested_types": [ "psinfo_t" ] - }, -"data": - [ - { "name": "int", "integer": { "length": 4, "signed": true } }, - { "name": "char", "integer": { "length": 1, "signed": true } }, - { "name": "unsigned short", "integer": { "length": 2, "signed": false } }, - { "name": "long", "integer": { "length": 4, "signed": true } }, - { "name": "unsigned", "integer": { "length": 4, "signed": false } }, - { "name": "size_t", "typedef": "unsigned" }, - { "name": "unsigned long", "integer": { "length": 4, "signed": false } }, - { "name": "time_t", "typedef": "long" }, - { "name": "struct timespec", "struct": [ - { "name": "tv_sec", "type": "time_t" }, - { "name": "tv_nsec", "type": "long" } - ] }, - { "name": "zoneid_t", "typedef": "long" }, - { "name": "taskid_t", "typedef": "long" }, - { "name": "dev_t", "typedef": "unsigned long" }, - { "name": "uid_t", "typedef": "unsigned" }, - { "name": "gid_t", "typedef": "unsigned" }, - { "name": "timestruc_t", "typedef": "struct timespec" }, - { "name": "short", "integer": { "length": 2, "signed": true } }, - { "name": "projid_t", "typedef": "long" }, - { "name": "ushort_t", "typedef": "unsigned short" }, - { "name": "poolid_t", "typedef": "long" }, - { "name": "uintptr_t", "typedef": "unsigned" }, - { "name": "id_t", "typedef": "long" }, - { "name": "pid_t", "typedef": "long" }, - { "name": "processorid_t", "typedef": "int" }, - { "name": "psetid_t", "typedef": "int" }, - { "name": "struct lwpsinfo", "struct": [ - { "name": "pr_flag", "type": "int" }, - { "name": "pr_lwpid", "type": "id_t" }, - { "name": "pr_addr", "type": "uintptr_t" }, - { "name": "pr_wchan", "type": "uintptr_t" }, - { "name": "pr_stype", "type": "char" }, - { "name": "pr_state", "type": "char" }, - { "name": "pr_sname", "type": "char" }, - { "name": "pr_nice", "type": "char" }, - { "name": "pr_syscall", "type": "short" }, - { "name": "pr_oldpri", "type": "char" }, - { "name": "pr_cpu", "type": "char" }, - { "name": "pr_pri", "type": "int" }, - { "name": "pr_pctcpu", "type": "ushort_t" }, - { "name": "pr_pad", "type": "ushort_t" }, - { "name": "pr_start", "type": "timestruc_t" }, - { "name": "pr_time", "type": "timestruc_t" }, - { "name": "pr_clname", "type": "char [8]" }, - { "name": "pr_name", "type": "char [16]" }, - { "name": "pr_onpro", "type": "processorid_t" }, - { "name": "pr_bindpro", "type": "processorid_t" }, - { "name": "pr_bindpset", "type": "psetid_t" }, - { "name": "pr_lgrp", "type": "int" }, - { "name": "pr_filler", "type": "int [4]" } - ] }, - { "name": "lwpsinfo_t", "typedef": "struct lwpsinfo" }, - { "name": "struct psinfo", "struct": [ - { "name": "pr_flag", "type": "int" }, - { "name": "pr_nlwp", "type": "int" }, - { "name": "pr_pid", "type": "pid_t" }, - { "name": "pr_ppid", "type": "pid_t" }, - { "name": "pr_pgid", "type": "pid_t" }, - { "name": "pr_sid", "type": "pid_t" }, - { "name": "pr_uid", "type": "uid_t" }, - { "name": "pr_euid", "type": "uid_t" }, - { "name": "pr_gid", "type": "gid_t" }, - { "name": "pr_egid", "type": "gid_t" }, - { "name": "pr_addr", "type": "uintptr_t" }, - { "name": "pr_size", "type": "size_t" }, - { "name": "pr_rssize", "type": "size_t" }, - { "name": "pr_pad1", "type": "size_t" }, - { "name": "pr_ttydev", "type": "dev_t" }, - { "name": "pr_pctcpu", "type": "ushort_t" }, - { "name": "pr_pctmem", "type": "ushort_t" }, - { "name": "pr_start", "type": "timestruc_t" }, - { "name": "pr_time", "type": "timestruc_t" }, - { "name": "pr_ctime", "type": "timestruc_t" }, - { "name": "pr_fname", "type": "char [16]" }, - { "name": "pr_psargs", "type": "char [80]" }, - { "name": "pr_wstat", "type": "int" }, - { "name": "pr_argc", "type": "int" }, - { "name": "pr_argv", "type": "uintptr_t" }, - { "name": "pr_envp", "type": "uintptr_t" }, - { "name": "pr_dmodel", "type": "char" }, - { "name": "pr_pad2", "type": "char [3]" }, - { "name": "pr_taskid", "type": "taskid_t" }, - { "name": "pr_projid", "type": "projid_t" }, - { "name": "pr_nzomb", "type": "int" }, - { "name": "pr_poolid", "type": "poolid_t" }, - { "name": "pr_zoneid", "type": "zoneid_t" }, - { "name": "pr_contract", "type": "id_t" }, - { "name": "pr_filler", "type": "int [1]" }, - { "name": "pr_lwp", "type": "lwpsinfo_t" } - ] }, - { "name": "psinfo_t", "typedef": "struct psinfo" } - ] -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/struct.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/struct.json deleted file mode 100644 index e0542ff4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/struct.json +++ /dev/null @@ -1,19 +0,0 @@ -{ "metadata": - { - "ctf2json_version": "1.0", - "created_at": 1316563648, - "derived_from": "/lib/libc.so", - "ctf_version": 2, - "requested_types": [ "timestruc_t" ] - }, -"data": - [ - { "name": "long", "integer": { "length": 4, "signed": true } }, - { "name": "time_t", "typedef": "long" }, - { "name": "struct timespec", "struct": [ - { "name": "tv_sec", "type": "time_t" }, - { "name": "tv_nsec", "type": "long" } - ] }, - { "name": "timestruc_t", "typedef": "struct timespec" } - ] -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js deleted file mode 100644 index d6a52cbb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Test several conditions that should always cause us to throw. - */ -var mod_assert = require('assert'); -var mod_ctype = require('../../ctype.js'); - -var cases = [ -{ json: { }, msg: 'bad JSON - no metadata or data' }, -{ json: { metadata: {} }, msg: 'bad JSON - bad metadata section' }, -{ json: { metadata: { 'JSON version': [] } }, - msg: 'bad JSON - bad JSON version' }, -{ json: { metadata: { 'JSON version': 2 } }, - msg: 'bad JSON - bad JSON version' }, -{ json: { metadata: { 'JSON version': '100.20' } }, - msg: 'bad JSON - bad JSON version' }, -{ json: { metadata: { 'JSON version': '1.0' } }, - msg: 'missing data section' }, -{ json: { metadata: { 'JSON version': '1.0' }, data: 1 }, - msg: 'invalid data section' }, -{ json: { metadata: { 'JSON version': '1.0' }, data: 1.1 }, - msg: 'invalid data section' }, -{ json: { metadata: { 'JSON version': '1.0' }, data: '1.1' }, - msg: 'invalid data section' }, -{ json: { metadata: { 'JSON version': '1.0' }, data: {} }, - msg: 'invalid data section' } -]; - -function test() -{ - var ii; - - for (ii = 0; ii < cases.length; ii++) { - mod_assert.throws(function () { - mod_ctype.parseCTF(cases[ii].json); - }, Error, cases[ii].msg); - } -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.float.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.float.js deleted file mode 100644 index f2144994..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.float.js +++ /dev/null @@ -1,14 +0,0 @@ -var mod_fs = require('fs'); -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -function test() -{ - var data, parser; - - data = JSON.parse(mod_fs.readFileSync('./float.json').toString()); - parser = mod_ctype.parseCTF(data, { endian: 'big' }); - mod_assert.deepEqual(parser.lstypes(), {}); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.int.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.int.js deleted file mode 100644 index 0ec0f769..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.int.js +++ /dev/null @@ -1,14 +0,0 @@ -var mod_fs = require('fs'); -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -function test() -{ - var data, parser; - - data = JSON.parse(mod_fs.readFileSync('./int.json').toString()); - parser = mod_ctype.parseCTF(data, { endian: 'big' }); - mod_assert.deepEqual(parser.lstypes(), { 'int': 'int32_t' }); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.psinfo.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.psinfo.js deleted file mode 100644 index ca1a544c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.psinfo.js +++ /dev/null @@ -1,17 +0,0 @@ -var mod_fs = require('fs'); -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -/* - * This is too unwieldly to actually write out. Just make sure we can parse it - * without errrors. - */ -function test() -{ - var data; - - data = JSON.parse(mod_fs.readFileSync('./psinfo.json').toString()); - mod_ctype.parseCTF(data, { endian: 'big' }); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.struct.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.struct.js deleted file mode 100644 index c62f41f9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.struct.js +++ /dev/null @@ -1,18 +0,0 @@ -var mod_fs = require('fs'); -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -function test() -{ - var data, parser; - - data = JSON.parse(mod_fs.readFileSync('./struct.json').toString()); - parser = mod_ctype.parseCTF(data, { endian: 'big' }); - mod_assert.deepEqual(parser.lstypes(), { 'long': 'int32_t', - 'time_t': 'long', - 'timestruc_t': 'struct timespec', - 'struct timespec': [ { 'tv_sec': { 'type': 'time_t' } }, - { 'tv_nsec': { 'type': 'long' } } ] }); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.typedef.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.typedef.js deleted file mode 100644 index 9006cd1b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.typedef.js +++ /dev/null @@ -1,15 +0,0 @@ -var mod_fs = require('fs'); -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -function test() -{ - var data, parser; - - data = JSON.parse(mod_fs.readFileSync('./typedef.json').toString()); - parser = mod_ctype.parseCTF(data, { endian: 'big' }); - mod_assert.deepEqual(parser.lstypes(), { 'bar_t': 'int', - 'int': 'int32_t' }); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/typedef.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/typedef.json deleted file mode 100644 index 35ddb50d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/typedef.json +++ /dev/null @@ -1,14 +0,0 @@ -{ "metadata": - { - "ctf2json_version": "1.0", - "created_at": 1316302348, - "derived_from": "/lib/libc.so", - "ctf_version": 2, - "requested_types": [ "bar_t" ] - }, -"data": - [ - { "name": "int", "integer": { "length": 4, "signed": true } }, - { "name": "bar_t", "typedef": "int" } - ] -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.rfloat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.rfloat.js deleted file mode 100644 index 2c9504a8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.rfloat.js +++ /dev/null @@ -1,767 +0,0 @@ -/* - * Battery of tests to break our floating point implementation. Oh ho ho. - * - * There are a few useful ways to generate the expected output. The first is - * just write a C program and write raw bytes out and inspect with xxd. Remember - * to consider whether or not you're on a big endian or little endian machine. - * Another useful site I found to help with some of this was: - * - * http://babbage.cs.qc.edu/IEEE-754/ - */ - -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - -function testfloat() -{ - var buffer = new Buffer(4); - /* Start off with some of the easy ones: +zero */ - buffer[0] = 0; - buffer[1] = 0; - buffer[2] = 0; - buffer[3] = 0; - - ASSERT.equal(0, mod_ctype.rfloat(buffer, 'big', 0)); - ASSERT.equal(0, mod_ctype.rfloat(buffer, 'little', 0)); - - /* Test -0 */ - buffer[0] = 0x80; - ASSERT.equal(0, mod_ctype.rfloat(buffer, 'big', 0)); - buffer[3] = buffer[0]; - buffer[0] = 0; - ASSERT.equal(0, mod_ctype.rfloat(buffer, 'little', 0)); - - /* Catch +infin */ - buffer[0] = 0x7f; - buffer[1] = 0x80; - buffer[2] = 0x00; - buffer[3] = 0x00; - ASSERT.equal(Number.POSITIVE_INFINITY, - mod_ctype.rfloat(buffer, 'big', 0)); - buffer[3] = 0x7f; - buffer[2] = 0x80; - buffer[1] = 0x00; - buffer[0] = 0x00; - ASSERT.equal(Number.POSITIVE_INFINITY, - mod_ctype.rfloat(buffer, 'litle', 0)); - - /* Catch -infin */ - buffer[0] = 0xff; - buffer[1] = 0x80; - buffer[2] = 0x00; - buffer[3] = 0x00; - ASSERT.equal(Number.NEGATIVE_INFINITY, - mod_ctype.rfloat(buffer, 'big', 0)); - buffer[3] = 0xff; - buffer[2] = 0x80; - buffer[1] = 0x00; - buffer[0] = 0x00; - ASSERT.equal(Number.NEGATIVE_INFINITY, - mod_ctype.rfloat(buffer, 'litle', 0)); - - /* Catch NaN */ - - buffer[0] = 0x7f; - buffer[1] = 0x80; - buffer[2] = 0x00; - buffer[3] = 0x23; - ASSERT.ok(isNaN(mod_ctype.rfloat(buffer, 'big', 0))); - buffer[3] = 0x7f; - buffer[2] = 0x80; - buffer[1] = 0x00; - buffer[0] = 0x23; - ASSERT.ok(isNaN(mod_ctype.rfloat(buffer, 'little', 0))); - - /* Catch -infin */ - buffer[0] = 0xff; - buffer[1] = 0x80; - buffer[2] = 0x00; - buffer[3] = 0x23; - ASSERT.ok(isNaN(mod_ctype.rfloat(buffer, 'big', 0))); - buffer[3] = 0xff; - buffer[2] = 0x80; - buffer[1] = 0x00; - buffer[0] = 0x23; - ASSERT.ok(isNaN(mod_ctype.rfloat(buffer, 'little', 0))); - - /* On to some basic tests */ - /* 1.125 */ - buffer[0] = 0x3f; - buffer[1] = 0x90; - buffer[2] = 0x00; - buffer[3] = 0x00; - ASSERT.equal(1.125, mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x3f; - buffer[2] = 0x90; - buffer[1] = 0x00; - buffer[0] = 0x00; - ASSERT.equal(1.125, mod_ctype.rfloat(buffer, 'little', 0)); - - /* ff34a2b0 -2.4010576103645774e+38 */ - buffer[0] = 0xff; - buffer[1] = 0x34; - buffer[2] = 0xa2; - buffer[3] = 0xb0; - ASSERT.equal(-2.4010576103645774e+38, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0xff; - buffer[2] = 0x34; - buffer[1] = 0xa2; - buffer[0] = 0xb0; - ASSERT.equal(-2.4010576103645774e+38, - mod_ctype.rfloat(buffer, 'little', 0)); - - /* Denormalized tests */ - - /* 0003f89a +/- 3.6468792534053364e-40 */ - buffer[0] = 0x00; - buffer[1] = 0x03; - buffer[2] = 0xf8; - buffer[3] = 0x9a; - ASSERT.equal(3.6468792534053364e-40, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x00; - buffer[2] = 0x03; - buffer[1] = 0xf8; - buffer[0] = 0x9a; - ASSERT.equal(3.6468792534053364e-40, - mod_ctype.rfloat(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0x03; - buffer[2] = 0xf8; - buffer[3] = 0x9a; - ASSERT.equal(-3.6468792534053364e-40, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x80; - buffer[2] = 0x03; - buffer[1] = 0xf8; - buffer[0] = 0x9a; - ASSERT.equal(-3.6468792534053364e-40, - mod_ctype.rfloat(buffer, 'little', 0)); - - - /* Maximum and minimum normalized and denormalized values */ - - /* Largest normalized number +/- 3.4028234663852886e+38 */ - - buffer[0] = 0x7f; - buffer[1] = 0x7f; - buffer[2] = 0xff; - buffer[3] = 0xff; - ASSERT.equal(3.4028234663852886e+38, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x7f; - buffer[2] = 0x7f; - buffer[1] = 0xff; - buffer[0] = 0xff; - ASSERT.equal(3.4028234663852886e+38, - mod_ctype.rfloat(buffer, 'little', 0)); - - buffer[0] = 0xff; - buffer[1] = 0x7f; - buffer[2] = 0xff; - buffer[3] = 0xff; - ASSERT.equal(-3.4028234663852886e+38, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0xff; - buffer[2] = 0x7f; - buffer[1] = 0xff; - buffer[0] = 0xff; - ASSERT.equal(-3.4028234663852886e+38, - mod_ctype.rfloat(buffer, 'little', 0)); - - /* Smallest normalied number +/- 1.1754943508222875e-38 */ - buffer[0] = 0x00; - buffer[1] = 0x80; - buffer[2] = 0x00; - buffer[3] = 0x00; - ASSERT.equal(1.1754943508222875e-38, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x00; - buffer[2] = 0x80; - buffer[1] = 0x00; - buffer[0] = 0x00; - ASSERT.equal(1.1754943508222875e-38, - mod_ctype.rfloat(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0x80; - buffer[2] = 0x00; - buffer[3] = 0x00; - ASSERT.equal(-1.1754943508222875e-38, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x80; - buffer[2] = 0x80; - buffer[1] = 0x00; - buffer[0] = 0x00; - ASSERT.equal(-1.1754943508222875e-38, - mod_ctype.rfloat(buffer, 'little', 0)); - - - /* Smallest denormalized number 1.401298464324817e-45 */ - buffer[0] = 0x00; - buffer[1] = 0x00; - buffer[2] = 0x00; - buffer[3] = 0x01; - ASSERT.equal(1.401298464324817e-45, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x00; - buffer[2] = 0x00; - buffer[1] = 0x00; - buffer[0] = 0x01; - ASSERT.equal(1.401298464324817e-45, - mod_ctype.rfloat(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0x00; - buffer[2] = 0x00; - buffer[3] = 0x01; - ASSERT.equal(-1.401298464324817e-45, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x80; - buffer[2] = 0x00; - buffer[1] = 0x00; - buffer[0] = 0x01; - ASSERT.equal(-1.401298464324817e-45, - mod_ctype.rfloat(buffer, 'little', 0)); - - /* Largest denormalized value +/- 1.1754942106924411e-38 */ - buffer[0] = 0x00; - buffer[1] = 0x7f; - buffer[2] = 0xff; - buffer[3] = 0xff; - ASSERT.equal(1.1754942106924411e-38, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x00; - buffer[2] = 0x7f; - buffer[1] = 0xff; - buffer[0] = 0xff; - ASSERT.equal(1.1754942106924411e-38, - mod_ctype.rfloat(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0x7f; - buffer[2] = 0xff; - buffer[3] = 0xff; - ASSERT.equal(-1.1754942106924411e-38, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x80; - buffer[2] = 0x7f; - buffer[1] = 0xff; - buffer[0] = 0xff; - ASSERT.equal(-1.1754942106924411e-38, - mod_ctype.rfloat(buffer, 'little', 0)); - - /* Do some quick offset testing */ - buffer = new Buffer(6); - buffer[0] = 0x7f; - buffer[1] = 0x4e; - buffer[2] = 0x8a; - buffer[3] = 0x79; - buffer[4] = 0xcd; - buffer[5] = 0x3f; - - ASSERT.equal(2.745399582697325e+38, - mod_ctype.rfloat(buffer, 'big', 0)); - ASSERT.equal(1161619072, - mod_ctype.rfloat(buffer, 'big', 1)); - ASSERT.equal(-1.2027516403607578e-32, - mod_ctype.rfloat(buffer, 'big', 2)); - - ASSERT.equal(8.97661320504413e+34, - mod_ctype.rfloat(buffer, 'little', 0)); - ASSERT.equal(-261661920, - mod_ctype.rfloat(buffer, 'little', 1)); - ASSERT.equal(1.605271577835083, - mod_ctype.rfloat(buffer, 'little', 2)); - -} - -function testdouble() -{ - var buffer = new Buffer(10); - - /* Check 0 */ - buffer[0] = 0; - buffer[1] = 0; - buffer[2] = 0; - buffer[3] = 0; - buffer[4] = 0; - buffer[5] = 0; - buffer[6] = 0; - buffer[7] = 0; - ASSERT.equal(0, - mod_ctype.rdouble(buffer, 'big', 0)); - ASSERT.equal(0, - mod_ctype.rdouble(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0; - buffer[2] = 0; - buffer[3] = 0; - buffer[4] = 0; - buffer[5] = 0; - buffer[6] = 0; - buffer[7] = 0; - ASSERT.equal(0, - mod_ctype.rdouble(buffer, 'big', 0)); - buffer[7] = 0x80; - buffer[6] = 0; - buffer[5] = 0; - buffer[4] = 0; - buffer[3] = 0; - buffer[2] = 0; - buffer[1] = 0; - buffer[0] = 0; - ASSERT.equal(0, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* Check NaN */ - buffer[0] = 0x7f; - buffer[1] = 0xf0; - buffer[2] = 0; - buffer[3] = 0; - buffer[4] = 0; - buffer[5] = 0; - buffer[6] = 0; - buffer[7] = 23; - ASSERT.ok(isNaN(mod_ctype.rdouble(buffer, 'big', 0))); - - buffer[7] = 0x7f; - buffer[6] = 0xf0; - buffer[5] = 0; - buffer[4] = 0; - buffer[3] = 0; - buffer[2] = 0; - buffer[1] = 0; - buffer[0] = 23; - ASSERT.ok(isNaN(mod_ctype.rdouble(buffer, 'little', 0))); - - buffer[0] = 0xff; - buffer[1] = 0xf0; - buffer[2] = 0; - buffer[3] = 0; - buffer[4] = 0; - buffer[5] = 0; - buffer[6] = 0; - buffer[7] = 23; - ASSERT.ok(isNaN(mod_ctype.rdouble(buffer, 'big', 0))); - - buffer[7] = 0xff; - buffer[6] = 0xf0; - buffer[5] = 0; - buffer[4] = 0; - buffer[3] = 0; - buffer[2] = 0; - buffer[1] = 0; - buffer[0] = 23; - ASSERT.ok(isNaN(mod_ctype.rdouble(buffer, 'little', 0))); - - /* pos inf */ - buffer[0] = 0x7f; - buffer[1] = 0xf0; - buffer[2] = 0; - buffer[3] = 0; - buffer[4] = 0; - buffer[5] = 0; - buffer[6] = 0; - buffer[7] = 0; - ASSERT.equal(Number.POSITIVE_INFINITY, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x7f; - buffer[6] = 0xf0; - buffer[5] = 0; - buffer[4] = 0; - buffer[3] = 0; - buffer[2] = 0; - buffer[1] = 0; - buffer[0] = 0; - ASSERT.equal(Number.POSITIVE_INFINITY, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* neg inf */ - buffer[0] = 0xff; - buffer[1] = 0xf0; - buffer[2] = 0; - buffer[3] = 0; - buffer[4] = 0; - buffer[5] = 0; - buffer[6] = 0; - buffer[7] = 0; - ASSERT.equal(Number.NEGATIVE_INFINITY, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0xff; - buffer[6] = 0xf0; - buffer[5] = 0; - buffer[4] = 0; - buffer[3] = 0; - buffer[2] = 0; - buffer[1] = 0; - buffer[0] = 0; - ASSERT.equal(Number.NEGATIVE_INFINITY, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* Simple normalized values */ - - /* +/- 1.125 */ - buffer[0] = 0x3f; - buffer[1] = 0xf2; - buffer[2] = 0; - buffer[3] = 0; - buffer[4] = 0; - buffer[5] = 0; - buffer[6] = 0; - buffer[7] = 0; - ASSERT.equal(1.125, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x3f; - buffer[6] = 0xf2; - buffer[5] = 0; - buffer[4] = 0; - buffer[3] = 0; - buffer[2] = 0; - buffer[1] = 0; - buffer[0] = 0; - ASSERT.equal(1.125, - mod_ctype.rdouble(buffer, 'little', 0)); - - buffer[0] = 0xbf; - buffer[1] = 0xf2; - buffer[2] = 0; - buffer[3] = 0; - buffer[4] = 0; - buffer[5] = 0; - buffer[6] = 0; - buffer[7] = 0; - ASSERT.equal(-1.125, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0xbf; - buffer[6] = 0xf2; - buffer[5] = 0; - buffer[4] = 0; - buffer[3] = 0; - buffer[2] = 0; - buffer[1] = 0; - buffer[0] = 0; - ASSERT.equal(-1.125, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* +/- 1.4397318913736026e+283 */ - buffer[0] = 0x7a; - buffer[1] = 0xb8; - buffer[2] = 0xc9; - buffer[3] = 0x34; - buffer[4] = 0x72; - buffer[5] = 0x16; - buffer[6] = 0xf9; - buffer[7] = 0x0e; - ASSERT.equal(1.4397318913736026e+283, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x7a; - buffer[6] = 0xb8; - buffer[5] = 0xc9; - buffer[4] = 0x34; - buffer[3] = 0x72; - buffer[2] = 0x16; - buffer[1] = 0xf9; - buffer[0] = 0x0e; - ASSERT.equal(1.4397318913736026e+283, - mod_ctype.rdouble(buffer, 'little', 0)); - - buffer[0] = 0xfa; - buffer[1] = 0xb8; - buffer[2] = 0xc9; - buffer[3] = 0x34; - buffer[4] = 0x72; - buffer[5] = 0x16; - buffer[6] = 0xf9; - buffer[7] = 0x0e; - ASSERT.equal(-1.4397318913736026e+283, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0xfa; - buffer[6] = 0xb8; - buffer[5] = 0xc9; - buffer[4] = 0x34; - buffer[3] = 0x72; - buffer[2] = 0x16; - buffer[1] = 0xf9; - buffer[0] = 0x0e; - ASSERT.equal(-1.4397318913736026e+283, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* Denormalized values */ - /* +/- 8.82521232268344e-309 */ - buffer[0] = 0x00; - buffer[1] = 0x06; - buffer[2] = 0x58; - buffer[3] = 0x94; - buffer[4] = 0x13; - buffer[5] = 0x27; - buffer[6] = 0x8a; - buffer[7] = 0xcd; - ASSERT.equal(8.82521232268344e-309, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x00; - buffer[6] = 0x06; - buffer[5] = 0x58; - buffer[4] = 0x94; - buffer[3] = 0x13; - buffer[2] = 0x27; - buffer[1] = 0x8a; - buffer[0] = 0xcd; - ASSERT.equal(8.82521232268344e-309, - mod_ctype.rdouble(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0x06; - buffer[2] = 0x58; - buffer[3] = 0x94; - buffer[4] = 0x13; - buffer[5] = 0x27; - buffer[6] = 0x8a; - buffer[7] = 0xcd; - ASSERT.equal(-8.82521232268344e-309, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x80; - buffer[6] = 0x06; - buffer[5] = 0x58; - buffer[4] = 0x94; - buffer[3] = 0x13; - buffer[2] = 0x27; - buffer[1] = 0x8a; - buffer[0] = 0xcd; - ASSERT.equal(-8.82521232268344e-309, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* Edge cases, maximum and minimum values */ - - /* Smallest denormalized value 5e-324 */ - buffer[0] = 0x00; - buffer[1] = 0x00; - buffer[2] = 0x00; - buffer[3] = 0x00; - buffer[4] = 0x00; - buffer[5] = 0x00; - buffer[6] = 0x00; - buffer[7] = 0x01; - ASSERT.equal(5e-324, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x00; - buffer[6] = 0x00; - buffer[5] = 0x00; - buffer[4] = 0x00; - buffer[3] = 0x00; - buffer[2] = 0x00; - buffer[1] = 0x00; - buffer[0] = 0x01; - ASSERT.equal(5e-324, - mod_ctype.rdouble(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0x00; - buffer[2] = 0x00; - buffer[3] = 0x00; - buffer[4] = 0x00; - buffer[5] = 0x00; - buffer[6] = 0x00; - buffer[7] = 0x01; - ASSERT.equal(-5e-324, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x80; - buffer[6] = 0x00; - buffer[5] = 0x00; - buffer[4] = 0x00; - buffer[3] = 0x00; - buffer[2] = 0x00; - buffer[1] = 0x00; - buffer[0] = 0x01; - ASSERT.equal(-5e-324, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* Largest denormalized value 2.225073858507201e-308 */ - buffer[0] = 0x00; - buffer[1] = 0x0f; - buffer[2] = 0xff; - buffer[3] = 0xff; - buffer[4] = 0xff; - buffer[5] = 0xff; - buffer[6] = 0xff; - buffer[7] = 0xff; - ASSERT.equal(2.225073858507201e-308, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x00; - buffer[6] = 0x0f; - buffer[5] = 0xff; - buffer[4] = 0xff; - buffer[3] = 0xff; - buffer[2] = 0xff; - buffer[1] = 0xff; - buffer[0] = 0xff; - ASSERT.equal(2.225073858507201e-308, - mod_ctype.rdouble(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0x0f; - buffer[2] = 0xff; - buffer[3] = 0xff; - buffer[4] = 0xff; - buffer[5] = 0xff; - buffer[6] = 0xff; - buffer[7] = 0xff; - ASSERT.equal(-2.225073858507201e-308, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x80; - buffer[6] = 0x0f; - buffer[5] = 0xff; - buffer[4] = 0xff; - buffer[3] = 0xff; - buffer[2] = 0xff; - buffer[1] = 0xff; - buffer[0] = 0xff; - ASSERT.equal(-2.225073858507201e-308, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* Smallest normalized value 2.2250738585072014e-308 */ - buffer[0] = 0x00; - buffer[1] = 0x10; - buffer[2] = 0x00; - buffer[3] = 0x00; - buffer[4] = 0x00; - buffer[5] = 0x00; - buffer[6] = 0x00; - buffer[7] = 0x00; - ASSERT.equal(2.2250738585072014e-308, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x00; - buffer[6] = 0x10; - buffer[5] = 0x00; - buffer[4] = 0x00; - buffer[3] = 0x00; - buffer[2] = 0x00; - buffer[1] = 0x00; - buffer[0] = 0x00; - ASSERT.equal(2.2250738585072014e-308, - mod_ctype.rdouble(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0x10; - buffer[2] = 0x00; - buffer[3] = 0x00; - buffer[4] = 0x00; - buffer[5] = 0x00; - buffer[6] = 0x00; - buffer[7] = 0x00; - ASSERT.equal(-2.2250738585072014e-308, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x80; - buffer[6] = 0x10; - buffer[5] = 0x00; - buffer[4] = 0x00; - buffer[3] = 0x00; - buffer[2] = 0x00; - buffer[1] = 0x00; - buffer[0] = 0x00; - ASSERT.equal(-2.2250738585072014e-308, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* Largest normalized value 1.7976931348623157e+308 */ - buffer[0] = 0x7f; - buffer[1] = 0xef; - buffer[2] = 0xff; - buffer[3] = 0xff; - buffer[4] = 0xff; - buffer[5] = 0xff; - buffer[6] = 0xff; - buffer[7] = 0xff; - ASSERT.equal(1.7976931348623157e+308, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x7f; - buffer[6] = 0xef; - buffer[5] = 0xff; - buffer[4] = 0xff; - buffer[3] = 0xff; - buffer[2] = 0xff; - buffer[1] = 0xff; - buffer[0] = 0xff; - ASSERT.equal(1.7976931348623157e+308, - mod_ctype.rdouble(buffer, 'little', 0)); - - buffer[0] = 0xff; - buffer[1] = 0xef; - buffer[2] = 0xff; - buffer[3] = 0xff; - buffer[4] = 0xff; - buffer[5] = 0xff; - buffer[6] = 0xff; - buffer[7] = 0xff; - ASSERT.equal(-1.7976931348623157e+308, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0xff; - buffer[6] = 0xef; - buffer[5] = 0xff; - buffer[4] = 0xff; - buffer[3] = 0xff; - buffer[2] = 0xff; - buffer[1] = 0xff; - buffer[0] = 0xff; - ASSERT.equal(-1.7976931348623157e+308, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* Try offsets */ - buffer[0] = 0xde; - buffer[1] = 0xad; - buffer[2] = 0xbe; - buffer[3] = 0xef; - buffer[4] = 0xba; - buffer[5] = 0xdd; - buffer[6] = 0xca; - buffer[7] = 0xfe; - buffer[8] = 0x16; - buffer[9] = 0x79; - - ASSERT.equal(-1.1885958404126936e+148, - mod_ctype.rdouble(buffer, 'big', 0)); - ASSERT.equal(-2.4299184080448593e-88, - mod_ctype.rdouble(buffer, 'big', 1)); - ASSERT.equal(-0.000015130017658081283, - mod_ctype.rdouble(buffer, 'big', 2)); - - ASSERT.equal(-5.757458694845505e+302, - mod_ctype.rdouble(buffer, 'little', 0)); - ASSERT.equal(6.436459604192476e-198, - mod_ctype.rdouble(buffer, 'little', 1)); - ASSERT.equal(1.9903745632417286e+275, - mod_ctype.rdouble(buffer, 'little', 2)); -} - -testfloat(); -testdouble(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.wfloat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.wfloat.js deleted file mode 100644 index b5fd95cd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.wfloat.js +++ /dev/null @@ -1,753 +0,0 @@ -/* - * Another place to find bugs that may yet plague us. This time with writing out - * floats to arrays. We are lazy and did basically just take the opposite of our - * test code to read in values. - */ - -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - - -/* - * A useful thing to keep around for debugging - * console.log('buffer[0]: ' + buffer[0].toString(16)); - * console.log('buffer[1]: ' + buffer[1].toString(16)); - * console.log('buffer[2]: ' + buffer[2].toString(16)); - * console.log('buffer[3]: ' + buffer[3].toString(16)); - * console.log('buffer[4]: ' + buffer[4].toString(16)); - * console.log('buffer[5]: ' + buffer[5].toString(16)); - * console.log('buffer[6]: ' + buffer[6].toString(16)); - * console.log('buffer[7]: ' + buffer[7].toString(16)); - */ - -function testfloat() -{ - var buffer = new Buffer(4); - mod_ctype.wfloat(0, 'big', buffer, 0); - /* Start off with some of the easy ones: +zero */ - ASSERT.equal(0, buffer[0]); - ASSERT.equal(0, buffer[1]); - ASSERT.equal(0, buffer[2]); - ASSERT.equal(0, buffer[3]); - mod_ctype.wfloat(0, 'little', buffer, 0); - ASSERT.equal(0, buffer[0]); - ASSERT.equal(0, buffer[1]); - ASSERT.equal(0, buffer[2]); - ASSERT.equal(0, buffer[3]); - - /* Catch +infin */ - mod_ctype.wfloat(Number.POSITIVE_INFINITY, 'big', buffer, 0); - ASSERT.equal(0x7f, buffer[0]); - ASSERT.equal(0x80, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - mod_ctype.wfloat(Number.POSITIVE_INFINITY, 'little', buffer, 0); - ASSERT.equal(0x7f, buffer[3]); - ASSERT.equal(0x80, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - /* Catch -infin */ - mod_ctype.wfloat(Number.NEGATIVE_INFINITY, 'big', buffer, 0); - ASSERT.equal(0xff, buffer[0]); - ASSERT.equal(0x80, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - mod_ctype.wfloat(Number.NEGATIVE_INFINITY, 'little', buffer, 0); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0x80, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - /* Catch NaN */ - - /* - * NaN Is a litle weird in its requirements, so we're going to encode a - * bit of how we actually implement it into this test. Probably not the - * best, since technically the sign is a don't care and the mantissa - * needs to just be non-zero. - */ - mod_ctype.wfloat(NaN, 'big', buffer, 0); - ASSERT.equal(0x7f, buffer[0]); - ASSERT.equal(0x80, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x17, buffer[3]); - mod_ctype.wfloat(NaN, 'little', buffer, 0); - ASSERT.equal(0x7f, buffer[3]); - ASSERT.equal(0x80, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x17, buffer[0]); - - /* On to some basic tests */ - /* 1.125 */ - mod_ctype.wfloat(1.125, 'big', buffer, 0); - ASSERT.equal(0x3f, buffer[0]); - ASSERT.equal(0x90, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - mod_ctype.wfloat(1.125, 'little', buffer, 0); - ASSERT.equal(0x3f, buffer[3]); - ASSERT.equal(0x90, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - mod_ctype.wfloat(1.0000001192092896, 'big', buffer, 0); - ASSERT.equal(0x3f, buffer[0]); - ASSERT.equal(0x80, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x01, buffer[3]); - mod_ctype.wfloat(1.0000001192092896, 'little', buffer, 0); - ASSERT.equal(0x3f, buffer[3]); - ASSERT.equal(0x80, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x01, buffer[0]); - - mod_ctype.wfloat(1.0000001192092896, 'big', buffer, 0); - ASSERT.equal(0x3f, buffer[0]); - ASSERT.equal(0x80, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x01, buffer[3]); - mod_ctype.wfloat(1.0000001192092896, 'little', buffer, 0); - ASSERT.equal(0x3f, buffer[3]); - ASSERT.equal(0x80, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x01, buffer[0]); - - mod_ctype.wfloat(2.3283067140944524e-10, 'big', buffer, 0); - ASSERT.equal(0x2f, buffer[0]); - ASSERT.equal(0x80, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x01, buffer[3]); - mod_ctype.wfloat(2.3283067140944524e-10, 'little', buffer, 0); - ASSERT.equal(0x2f, buffer[3]); - ASSERT.equal(0x80, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x01, buffer[0]); - - /* ff34a2b0 -2.4010576103645774e+38 */ - mod_ctype.wfloat(-2.4010576103645774e+38, - 'big', buffer, 0); - ASSERT.equal(0xff, buffer[0]); - ASSERT.equal(0x34, buffer[1]); - ASSERT.equal(0xa2, buffer[2]); - ASSERT.equal(0xb0, buffer[3]); - mod_ctype.wfloat(-2.4010576103645774e+38, - 'little', buffer, 0); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0x34, buffer[2]); - ASSERT.equal(0xa2, buffer[1]); - ASSERT.equal(0xb0, buffer[0]); - - /* Denormalized tests */ - - /* 0003f89a +/- 3.6468792534053364e-40 */ - mod_ctype.wfloat(3.6468792534053364e-40, - 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x03, buffer[1]); - ASSERT.equal(0xf8, buffer[2]); - ASSERT.equal(0x9a, buffer[3]); - mod_ctype.wfloat(3.6468792534053364e-40, - 'little', buffer, 0); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x03, buffer[2]); - ASSERT.equal(0xf8, buffer[1]); - ASSERT.equal(0x9a, buffer[0]); - - mod_ctype.wfloat(-3.6468792534053364e-40, - 'big', buffer, 0); - ASSERT.equal(0x80, buffer[0]); - ASSERT.equal(0x03, buffer[1]); - ASSERT.equal(0xf8, buffer[2]); - ASSERT.equal(0x9a, buffer[3]); - mod_ctype.wfloat(-3.6468792534053364e-40, - 'little', buffer, 0); - ASSERT.equal(0x80, buffer[3]); - ASSERT.equal(0x03, buffer[2]); - ASSERT.equal(0xf8, buffer[1]); - ASSERT.equal(0x9a, buffer[0]); - - /* Maximum and minimum normalized and denormalized values */ - - /* Largest normalized number +/- 3.4028234663852886e+38 */ - - mod_ctype.wfloat(3.4028234663852886e+38, - 'big', buffer, 0); - ASSERT.equal(0x7f, buffer[0]); - ASSERT.equal(0x7f, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - mod_ctype.wfloat(3.4028234663852886e+38, - 'little', buffer, 0); - ASSERT.equal(0x7f, buffer[3]); - ASSERT.equal(0x7f, buffer[2]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[0]); - - mod_ctype.wfloat(-3.4028234663852886e+38, - 'big', buffer, 0); - ASSERT.equal(0xff, buffer[0]); - ASSERT.equal(0x7f, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - mod_ctype.wfloat(-3.4028234663852886e+38, - 'little', buffer, 0); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0x7f, buffer[2]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[0]); - - /* Smallest normalied number +/- 1.1754943508222875e-38 */ - - mod_ctype.wfloat(1.1754943508222875e-38, - 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x80, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - mod_ctype.wfloat(1.1754943508222875e-38, - 'little', buffer, 0); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x80, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - mod_ctype.wfloat(-1.1754943508222875e-38, - 'big', buffer, 0); - ASSERT.equal(0x80, buffer[0]); - ASSERT.equal(0x80, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - mod_ctype.wfloat(-1.1754943508222875e-38, - 'little', buffer, 0); - ASSERT.equal(0x80, buffer[3]); - ASSERT.equal(0x80, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - /* Smallest denormalized number 1.401298464324817e-45 */ - mod_ctype.wfloat(1.401298464324817e-45, - 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x01, buffer[3]); - mod_ctype.wfloat(1.401298464324817e-45, - 'little', buffer, 0); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x01, buffer[0]); - - mod_ctype.wfloat(-1.401298464324817e-45, - 'big', buffer, 0); - ASSERT.equal(0x80, buffer[0]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x01, buffer[3]); - mod_ctype.wfloat(-1.401298464324817e-45, - 'little', buffer, 0); - ASSERT.equal(0x80, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x01, buffer[0]); - - /* Largest denormalized value +/- 1.1754942106924411e-38 */ - - mod_ctype.wfloat(1.1754942106924411e-38, - 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x7f, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - mod_ctype.wfloat(1.1754942106924411e-38, - 'little', buffer, 0); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x7f, buffer[2]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[0]); - - mod_ctype.wfloat(-1.1754942106924411e-38, - 'big', buffer, 0); - ASSERT.equal(0x80, buffer[0]); - ASSERT.equal(0x7f, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - mod_ctype.wfloat(-1.1754942106924411e-38, - 'little', buffer, 0); - ASSERT.equal(0x80, buffer[3]); - ASSERT.equal(0x7f, buffer[2]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[0]); - - /* Do some quick offset testing */ - buffer = new Buffer(6); - mod_ctype.wfloat(-1.2027516403607578e-32, - 'big', buffer, 2); - ASSERT.equal(0x8a, buffer[2]); - ASSERT.equal(0x79, buffer[3]); - ASSERT.equal(0xcd, buffer[4]); - ASSERT.equal(0x3f, buffer[5]); - - mod_ctype.wfloat(-1.2027516403607578e-32, - 'little', buffer, 2); - ASSERT.equal(0x8a, buffer[5]); - ASSERT.equal(0x79, buffer[4]); - ASSERT.equal(0xcd, buffer[3]); - ASSERT.equal(0x3f, buffer[2]); - -} - -function testdouble() -{ - var buffer = new Buffer(10); - - /* Check 0 */ - mod_ctype.wdouble(0, 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[7]); - mod_ctype.wdouble(0, 'little', buffer, 0); - ASSERT.equal(0x00, buffer[7]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - /* Check NaN */ - /* Similar to floats we are only generating a subset of values */ - mod_ctype.wdouble(NaN, 'big', buffer, 0); - ASSERT.equal(0x7f, buffer[0]); - ASSERT.equal(0xf0, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x17, buffer[7]); - mod_ctype.wdouble(NaN, 'little', buffer, 0); - ASSERT.equal(0x7f, buffer[7]); - ASSERT.equal(0xf0, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x17, buffer[0]); - - /* pos inf */ - mod_ctype.wdouble(Number.POSITIVE_INFINITY, - 'big', buffer, 0); - ASSERT.equal(0x7f, buffer[0]); - ASSERT.equal(0xf0, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[7]); - mod_ctype.wdouble(Number.POSITIVE_INFINITY, - 'little', buffer, 0); - ASSERT.equal(0x7f, buffer[7]); - ASSERT.equal(0xf0, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - /* neg inf */ - mod_ctype.wdouble(Number.NEGATIVE_INFINITY, - 'big', buffer, 0); - ASSERT.equal(0xff, buffer[0]); - ASSERT.equal(0xf0, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[7]); - mod_ctype.wdouble(Number.NEGATIVE_INFINITY, - 'little', buffer, 0); - ASSERT.equal(0xff, buffer[7]); - ASSERT.equal(0xf0, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - /* Simple normalized values */ - - /* +/- 1.125 */ - mod_ctype.wdouble(1.125, - 'big', buffer, 0); - ASSERT.equal(0x3f, buffer[0]); - ASSERT.equal(0xf2, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[7]); - - mod_ctype.wdouble(1.125, - 'little', buffer, 0); - ASSERT.equal(0x3f, buffer[7]); - ASSERT.equal(0xf2, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - mod_ctype.wdouble(-1.125, - 'big', buffer, 0); - ASSERT.equal(0xbf, buffer[0]); - ASSERT.equal(0xf2, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[7]); - - mod_ctype.wdouble(-1.125, - 'little', buffer, 0); - ASSERT.equal(0xbf, buffer[7]); - ASSERT.equal(0xf2, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - - /* +/- 1.4397318913736026e+283 */ - mod_ctype.wdouble(1.4397318913736026e+283, - 'big', buffer, 0); - ASSERT.equal(0x7a, buffer[0]); - ASSERT.equal(0xb8, buffer[1]); - ASSERT.equal(0xc9, buffer[2]); - ASSERT.equal(0x34, buffer[3]); - ASSERT.equal(0x72, buffer[4]); - ASSERT.equal(0x16, buffer[5]); - ASSERT.equal(0xf9, buffer[6]); - ASSERT.equal(0x0e, buffer[7]); - - mod_ctype.wdouble(1.4397318913736026e+283, - 'little', buffer, 0); - ASSERT.equal(0x7a, buffer[7]); - ASSERT.equal(0xb8, buffer[6]); - ASSERT.equal(0xc9, buffer[5]); - ASSERT.equal(0x34, buffer[4]); - ASSERT.equal(0x72, buffer[3]); - ASSERT.equal(0x16, buffer[2]); - ASSERT.equal(0xf9, buffer[1]); - ASSERT.equal(0x0e, buffer[0]); - - mod_ctype.wdouble(-1.4397318913736026e+283, - 'big', buffer, 0); - ASSERT.equal(0xfa, buffer[0]); - ASSERT.equal(0xb8, buffer[1]); - ASSERT.equal(0xc9, buffer[2]); - ASSERT.equal(0x34, buffer[3]); - ASSERT.equal(0x72, buffer[4]); - ASSERT.equal(0x16, buffer[5]); - ASSERT.equal(0xf9, buffer[6]); - ASSERT.equal(0x0e, buffer[7]); - - mod_ctype.wdouble(-1.4397318913736026e+283, - 'little', buffer, 0); - ASSERT.equal(0xfa, buffer[7]); - ASSERT.equal(0xb8, buffer[6]); - ASSERT.equal(0xc9, buffer[5]); - ASSERT.equal(0x34, buffer[4]); - ASSERT.equal(0x72, buffer[3]); - ASSERT.equal(0x16, buffer[2]); - ASSERT.equal(0xf9, buffer[1]); - ASSERT.equal(0x0e, buffer[0]); - - /* Denormalized values */ - /* +/- 8.82521232268344e-309 */ - mod_ctype.wdouble(8.82521232268344e-309, - 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x06, buffer[1]); - ASSERT.equal(0x58, buffer[2]); - ASSERT.equal(0x94, buffer[3]); - ASSERT.equal(0x13, buffer[4]); - ASSERT.equal(0x27, buffer[5]); - ASSERT.equal(0x8a, buffer[6]); - ASSERT.equal(0xcd, buffer[7]); - - mod_ctype.wdouble(8.82521232268344e-309, - 'little', buffer, 0); - ASSERT.equal(0x00, buffer[7]); - ASSERT.equal(0x06, buffer[6]); - ASSERT.equal(0x58, buffer[5]); - ASSERT.equal(0x94, buffer[4]); - ASSERT.equal(0x13, buffer[3]); - ASSERT.equal(0x27, buffer[2]); - ASSERT.equal(0x8a, buffer[1]); - ASSERT.equal(0xcd, buffer[0]); - - mod_ctype.wdouble(-8.82521232268344e-309, - 'big', buffer, 0); - ASSERT.equal(0x80, buffer[0]); - ASSERT.equal(0x06, buffer[1]); - ASSERT.equal(0x58, buffer[2]); - ASSERT.equal(0x94, buffer[3]); - ASSERT.equal(0x13, buffer[4]); - ASSERT.equal(0x27, buffer[5]); - ASSERT.equal(0x8a, buffer[6]); - ASSERT.equal(0xcd, buffer[7]); - - mod_ctype.wdouble(-8.82521232268344e-309, - 'little', buffer, 0); - ASSERT.equal(0x80, buffer[7]); - ASSERT.equal(0x06, buffer[6]); - ASSERT.equal(0x58, buffer[5]); - ASSERT.equal(0x94, buffer[4]); - ASSERT.equal(0x13, buffer[3]); - ASSERT.equal(0x27, buffer[2]); - ASSERT.equal(0x8a, buffer[1]); - ASSERT.equal(0xcd, buffer[0]); - - - /* Edge cases, maximum and minimum values */ - - /* Smallest denormalized value 5e-324 */ - mod_ctype.wdouble(5e-324, - 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x01, buffer[7]); - - mod_ctype.wdouble(5e-324, - 'little', buffer, 0); - ASSERT.equal(0x00, buffer[7]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x01, buffer[0]); - - mod_ctype.wdouble(-5e-324, - 'big', buffer, 0); - ASSERT.equal(0x80, buffer[0]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x01, buffer[7]); - - mod_ctype.wdouble(-5e-324, - 'little', buffer, 0); - ASSERT.equal(0x80, buffer[7]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x01, buffer[0]); - - - - /* Largest denormalized value 2.225073858507201e-308 */ - mod_ctype.wdouble(2.225073858507201e-308, - 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x0f, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0xff, buffer[4]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[6]); - ASSERT.equal(0xff, buffer[7]); - - mod_ctype.wdouble(2.225073858507201e-308, - 'little', buffer, 0); - ASSERT.equal(0x00, buffer[7]); - ASSERT.equal(0x0f, buffer[6]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[4]); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[0]); - - mod_ctype.wdouble(-2.225073858507201e-308, - 'big', buffer, 0); - ASSERT.equal(0x80, buffer[0]); - ASSERT.equal(0x0f, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0xff, buffer[4]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[6]); - ASSERT.equal(0xff, buffer[7]); - - mod_ctype.wdouble(-2.225073858507201e-308, - 'little', buffer, 0); - ASSERT.equal(0x80, buffer[7]); - ASSERT.equal(0x0f, buffer[6]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[4]); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[0]); - - - /* Smallest normalized value 2.2250738585072014e-308 */ - mod_ctype.wdouble(2.2250738585072014e-308, - 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x10, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[7]); - - mod_ctype.wdouble(2.2250738585072014e-308, - 'little', buffer, 0); - ASSERT.equal(0x00, buffer[7]); - ASSERT.equal(0x10, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - mod_ctype.wdouble(-2.2250738585072014e-308, - 'big', buffer, 0); - ASSERT.equal(0x80, buffer[0]); - ASSERT.equal(0x10, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[7]); - - mod_ctype.wdouble(-2.2250738585072014e-308, - 'little', buffer, 0); - ASSERT.equal(0x80, buffer[7]); - ASSERT.equal(0x10, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - - /* Largest normalized value 1.7976931348623157e+308 */ - mod_ctype.wdouble(1.7976931348623157e+308, - 'big', buffer, 0); - ASSERT.equal(0x7f, buffer[0]); - ASSERT.equal(0xef, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0xff, buffer[4]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[6]); - ASSERT.equal(0xff, buffer[7]); - - mod_ctype.wdouble(1.7976931348623157e+308, - 'little', buffer, 0); - ASSERT.equal(0x7f, buffer[7]); - ASSERT.equal(0xef, buffer[6]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[4]); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[0]); - - mod_ctype.wdouble(-1.7976931348623157e+308, - 'big', buffer, 0); - ASSERT.equal(0xff, buffer[0]); - ASSERT.equal(0xef, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0xff, buffer[4]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[6]); - ASSERT.equal(0xff, buffer[7]); - - mod_ctype.wdouble(-1.7976931348623157e+308, - 'little', buffer, 0); - ASSERT.equal(0xff, buffer[7]); - ASSERT.equal(0xef, buffer[6]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[4]); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[0]); - - - /* Try offsets */ - buffer[0] = 0xde; - buffer[1] = 0xad; - buffer[2] = 0xbe; - buffer[3] = 0xef; - buffer[4] = 0xba; - buffer[5] = 0xdd; - buffer[6] = 0xca; - buffer[7] = 0xfe; - buffer[8] = 0x16; - buffer[9] = 0x79; - - mod_ctype.wdouble(-0.000015130017658081283, - 'big', buffer, 2); - ASSERT.equal(0xbe, buffer[2]); - ASSERT.equal(0xef, buffer[3]); - ASSERT.equal(0xba, buffer[4]); - ASSERT.equal(0xdd, buffer[5]); - ASSERT.equal(0xca, buffer[6]); - ASSERT.equal(0xfe, buffer[7]); - ASSERT.equal(0x16, buffer[8]); - ASSERT.equal(0x79, buffer[9]); - - mod_ctype.wdouble(-0.000015130017658081283, - 'little', buffer, 2); - ASSERT.equal(0xbe, buffer[9]); - ASSERT.equal(0xef, buffer[8]); - ASSERT.equal(0xba, buffer[7]); - ASSERT.equal(0xdd, buffer[6]); - ASSERT.equal(0xca, buffer[5]); - ASSERT.equal(0xfe, buffer[4]); - ASSERT.equal(0x16, buffer[3]); - ASSERT.equal(0x79, buffer[2]); -} - -testfloat(); -testdouble(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.64.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.64.js deleted file mode 100644 index 1ffdac09..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.64.js +++ /dev/null @@ -1,638 +0,0 @@ -/* - * Test our ability to read and write signed 64-bit integers. - */ - -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - -function testRead() -{ - var res, data; - data = new Buffer(10); - - data[0] = 0x32; - data[1] = 0x65; - data[2] = 0x42; - data[3] = 0x56; - data[4] = 0x23; - data[5] = 0xff; - data[6] = 0xff; - data[7] = 0xff; - data[8] = 0x89; - data[9] = 0x11; - res = mod_ctype.rsint64(data, 'big', 0); - ASSERT.equal(0x32654256, res[0]); - ASSERT.equal(0x23ffffff, res[1]); - res = mod_ctype.rsint64(data, 'big', 1); - ASSERT.equal(0x65425623, res[0]); - ASSERT.equal(0xffffff89, res[1]); - res = mod_ctype.rsint64(data, 'big', 2); - ASSERT.equal(0x425623ff, res[0]); - ASSERT.equal(0xffff8911, res[1]); - res = mod_ctype.rsint64(data, 'little', 0); - ASSERT.equal(-0x000000dc, res[0]); - ASSERT.equal(-0xa9bd9ace, res[1]); - res = mod_ctype.rsint64(data, 'little', 1); - ASSERT.equal(-0x76000000, res[0]); - ASSERT.equal(-0xdca9bd9b, res[1]); - res = mod_ctype.rsint64(data, 'little', 2); - ASSERT.equal(0x1189ffff, res[0]); - ASSERT.equal(0xff235642, res[1]); - - data.fill(0x00); - res = mod_ctype.rsint64(data, 'big', 0); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(0x00000000, res[1]); - res = mod_ctype.rsint64(data, 'big', 1); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(0x00000000, res[1]); - res = mod_ctype.rsint64(data, 'big', 2); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(0x00000000, res[1]); - res = mod_ctype.rsint64(data, 'little', 0); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(0x00000000, res[1]); - res = mod_ctype.rsint64(data, 'little', 1); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(0x00000000, res[1]); - res = mod_ctype.rsint64(data, 'little', 2); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(0x00000000, res[1]); - - data.fill(0xff); - res = mod_ctype.rsint64(data, 'big', 0); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(-1, res[1]); - res = mod_ctype.rsint64(data, 'big', 1); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(-1, res[1]); - res = mod_ctype.rsint64(data, 'big', 2); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(-1, res[1]); - res = mod_ctype.rsint64(data, 'little', 0); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(-1, res[1]); - res = mod_ctype.rsint64(data, 'little', 1); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(-1, res[1]); - res = mod_ctype.rsint64(data, 'little', 2); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(-1, res[1]); - - data[0] = 0x80; - data[1] = 0x00; - data[2] = 0x00; - data[3] = 0x00; - data[4] = 0x00; - data[5] = 0x00; - data[6] = 0x00; - data[7] = 0x00; - res = mod_ctype.rsint64(data, 'big', 0); - ASSERT.equal(-0x80000000, res[0]); - ASSERT.equal(0, res[1]); - - - data[7] = 0x80; - data[6] = 0x00; - data[5] = 0x00; - data[4] = 0x00; - data[3] = 0x00; - data[2] = 0x00; - data[1] = 0x00; - data[0] = 0x00; - res = mod_ctype.rsint64(data, 'little', 0); - ASSERT.equal(-0x80000000, res[0]); - ASSERT.equal(0, res[1]); - - data[0] = 0x80; - data[1] = 0x00; - data[2] = 0x00; - data[3] = 0x00; - data[4] = 0x00; - data[5] = 0x00; - data[6] = 0x00; - data[7] = 0x01; - res = mod_ctype.rsint64(data, 'big', 0); - ASSERT.equal(-0x7fffffff, res[0]); - ASSERT.equal(-0xffffffff, res[1]); - - -} - -function testWriteZero() -{ - var data, buf; - buf = new Buffer(10); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wsint64(data, 'big', buf, 0); - ASSERT.equal(0, buf[0]); - ASSERT.equal(0, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wsint64(data, 'big', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wsint64(data, 'big', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0, buf[8]); - ASSERT.equal(0, buf[9]); - - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wsint64(data, 'little', buf, 0); - ASSERT.equal(0, buf[0]); - ASSERT.equal(0, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wsint64(data, 'little', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wsint64(data, 'little', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0, buf[8]); - ASSERT.equal(0, buf[9]); -} - -/* - * Also include tests that are going to force us to go into a negative value and - * insure that it's written correctly. - */ -function testWrite() -{ - var data, buf; - - buf = new Buffer(10); - data = [ 0x234456, 0x87 ]; - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 0); - ASSERT.equal(0x00, buf[0]); - ASSERT.equal(0x23, buf[1]); - ASSERT.equal(0x44, buf[2]); - ASSERT.equal(0x56, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x87, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x23, buf[2]); - ASSERT.equal(0x44, buf[3]); - ASSERT.equal(0x56, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x87, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x23, buf[3]); - ASSERT.equal(0x44, buf[4]); - ASSERT.equal(0x56, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x00, buf[8]); - ASSERT.equal(0x87, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 0); - ASSERT.equal(0x87, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x56, buf[4]); - ASSERT.equal(0x44, buf[5]); - ASSERT.equal(0x23, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x87, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x56, buf[5]); - ASSERT.equal(0x44, buf[6]); - ASSERT.equal(0x23, buf[7]); - ASSERT.equal(0x00, buf[8]); - ASSERT.equal(0x66, buf[9]); - - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0x87, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x56, buf[6]); - ASSERT.equal(0x44, buf[7]); - ASSERT.equal(0x23, buf[8]); - ASSERT.equal(0x00, buf[9]); - - data = [0x3421, 0x34abcdba]; - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 0); - ASSERT.equal(0x00, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x34, buf[2]); - ASSERT.equal(0x21, buf[3]); - ASSERT.equal(0x34, buf[4]); - ASSERT.equal(0xab, buf[5]); - ASSERT.equal(0xcd, buf[6]); - ASSERT.equal(0xba, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x34, buf[3]); - ASSERT.equal(0x21, buf[4]); - ASSERT.equal(0x34, buf[5]); - ASSERT.equal(0xab, buf[6]); - ASSERT.equal(0xcd, buf[7]); - ASSERT.equal(0xba, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x34, buf[4]); - ASSERT.equal(0x21, buf[5]); - ASSERT.equal(0x34, buf[6]); - ASSERT.equal(0xab, buf[7]); - ASSERT.equal(0xcd, buf[8]); - ASSERT.equal(0xba, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 0); - ASSERT.equal(0xba, buf[0]); - ASSERT.equal(0xcd, buf[1]); - ASSERT.equal(0xab, buf[2]); - ASSERT.equal(0x34, buf[3]); - ASSERT.equal(0x21, buf[4]); - ASSERT.equal(0x34, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0xba, buf[1]); - ASSERT.equal(0xcd, buf[2]); - ASSERT.equal(0xab, buf[3]); - ASSERT.equal(0x34, buf[4]); - ASSERT.equal(0x21, buf[5]); - ASSERT.equal(0x34, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x00, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0xba, buf[2]); - ASSERT.equal(0xcd, buf[3]); - ASSERT.equal(0xab, buf[4]); - ASSERT.equal(0x34, buf[5]); - ASSERT.equal(0x21, buf[6]); - ASSERT.equal(0x34, buf[7]); - ASSERT.equal(0x00, buf[8]); - ASSERT.equal(0x00, buf[9]); - - - data = [ -0x80000000, 0 ]; - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 0); - ASSERT.equal(0x80, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 0); - ASSERT.equal(0x00, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x80, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - data = [ -0x7fffffff, -0xffffffff ]; - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 0); - ASSERT.equal(0x80, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x01, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 0); - ASSERT.equal(0x01, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x80, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - data = [ 0x0, -0x1]; - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 0); - ASSERT.equal(0xff, buf[0]); - ASSERT.equal(0xff, buf[1]); - ASSERT.equal(0xff, buf[2]); - ASSERT.equal(0xff, buf[3]); - ASSERT.equal(0xff, buf[4]); - ASSERT.equal(0xff, buf[5]); - ASSERT.equal(0xff, buf[6]); - ASSERT.equal(0xff, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 0); - ASSERT.equal(0xff, buf[0]); - ASSERT.equal(0xff, buf[1]); - ASSERT.equal(0xff, buf[2]); - ASSERT.equal(0xff, buf[3]); - ASSERT.equal(0xff, buf[4]); - ASSERT.equal(0xff, buf[5]); - ASSERT.equal(0xff, buf[6]); - ASSERT.equal(0xff, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); -} - -/* - * Make sure we catch invalid writes. - */ -function testWriteInvalid() -{ - var data, buf; - - /* Buffer too small */ - buf = new Buffer(4); - data = [ 0, 0]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 0); - }, Error, 'buffer too small'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 0); - }, Error, 'buffer too small'); - - /* Beyond the end of the buffer */ - buf = new Buffer(12); - data = [ 0, 0]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 11); - }, Error, 'write beyond end of buffer'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 11); - }, Error, 'write beyond end of buffer'); - - /* Write fractional values */ - buf = new Buffer(12); - data = [ 3.33, 0 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ 0, 3.3 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ -3.33, 0 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ 0, -3.3 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ 3.33, 2.42 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ 3.33, -2.42 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ -3.33, -2.42 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ -3.33, 2.42 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - /* Signs don't match */ - buf = new Buffer(12); - data = [ 0x800000, -0x32 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ -0x800000, 0x32 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - /* Write values that are too large */ - buf = new Buffer(12); - data = [ 0x80000000, 0 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ 0x7fffffff, 0x100000000 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ 0x00, 0x800000000 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ 0xffffffffff, 0xffffff238 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ 0x23, 0xffffff238 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ -0x80000000, -0xfff238 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ -0x80000004, -0xfff238 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); -} - - -testRead(); -testWrite(); -testWriteZero(); -testWriteInvalid(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.rint.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.rint.js deleted file mode 100644 index 5236d268..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.rint.js +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Tests to verify we're reading in signed integers correctly - */ -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - -/* - * Test 8 bit signed integers - */ -function test8() -{ - var data = new Buffer(4); - - data[0] = 0x23; - ASSERT.equal(0x23, mod_ctype.rsint8(data, 'big', 0)); - ASSERT.equal(0x23, mod_ctype.rsint8(data, 'little', 0)); - - data[0] = 0xff; - ASSERT.equal(-1, mod_ctype.rsint8(data, 'big', 0)); - ASSERT.equal(-1, mod_ctype.rsint8(data, 'little', 0)); - - data[0] = 0x87; - data[1] = 0xab; - data[2] = 0x7c; - data[3] = 0xef; - ASSERT.equal(-121, mod_ctype.rsint8(data, 'big', 0)); - ASSERT.equal(-85, mod_ctype.rsint8(data, 'big', 1)); - ASSERT.equal(124, mod_ctype.rsint8(data, 'big', 2)); - ASSERT.equal(-17, mod_ctype.rsint8(data, 'big', 3)); - ASSERT.equal(-121, mod_ctype.rsint8(data, 'little', 0)); - ASSERT.equal(-85, mod_ctype.rsint8(data, 'little', 1)); - ASSERT.equal(124, mod_ctype.rsint8(data, 'little', 2)); - ASSERT.equal(-17, mod_ctype.rsint8(data, 'little', 3)); -} - -function test16() -{ - var buffer = new Buffer(6); - buffer[0] = 0x16; - buffer[1] = 0x79; - ASSERT.equal(0x1679, mod_ctype.rsint16(buffer, 'big', 0)); - ASSERT.equal(0x7916, mod_ctype.rsint16(buffer, 'little', 0)); - - buffer[0] = 0xff; - buffer[1] = 0x80; - ASSERT.equal(-128, mod_ctype.rsint16(buffer, 'big', 0)); - ASSERT.equal(-32513, mod_ctype.rsint16(buffer, 'little', 0)); - - /* test offset with weenix */ - buffer[0] = 0x77; - buffer[1] = 0x65; - buffer[2] = 0x65; - buffer[3] = 0x6e; - buffer[4] = 0x69; - buffer[5] = 0x78; - ASSERT.equal(0x7765, mod_ctype.rsint16(buffer, 'big', 0)); - ASSERT.equal(0x6565, mod_ctype.rsint16(buffer, 'big', 1)); - ASSERT.equal(0x656e, mod_ctype.rsint16(buffer, 'big', 2)); - ASSERT.equal(0x6e69, mod_ctype.rsint16(buffer, 'big', 3)); - ASSERT.equal(0x6978, mod_ctype.rsint16(buffer, 'big', 4)); - ASSERT.equal(0x6577, mod_ctype.rsint16(buffer, 'little', 0)); - ASSERT.equal(0x6565, mod_ctype.rsint16(buffer, 'little', 1)); - ASSERT.equal(0x6e65, mod_ctype.rsint16(buffer, 'little', 2)); - ASSERT.equal(0x696e, mod_ctype.rsint16(buffer, 'little', 3)); - ASSERT.equal(0x7869, mod_ctype.rsint16(buffer, 'little', 4)); -} - -function test32() -{ - var buffer = new Buffer(6); - buffer[0] = 0x43; - buffer[1] = 0x53; - buffer[2] = 0x16; - buffer[3] = 0x79; - ASSERT.equal(0x43531679, mod_ctype.rsint32(buffer, 'big', 0)); - ASSERT.equal(0x79165343, mod_ctype.rsint32(buffer, 'little', 0)); - - buffer[0] = 0xff; - buffer[1] = 0xfe; - buffer[2] = 0xef; - buffer[3] = 0xfa; - ASSERT.equal(-69638, mod_ctype.rsint32(buffer, 'big', 0)); - ASSERT.equal(-84934913, mod_ctype.rsint32(buffer, 'little', 0)); - - buffer[0] = 0x42; - buffer[1] = 0xc3; - buffer[2] = 0x95; - buffer[3] = 0xa9; - buffer[4] = 0x36; - buffer[5] = 0x17; - ASSERT.equal(0x42c395a9, mod_ctype.rsint32(buffer, 'big', 0)); - ASSERT.equal(-1013601994, mod_ctype.rsint32(buffer, 'big', 1)); - ASSERT.equal(-1784072681, mod_ctype.rsint32(buffer, 'big', 2)); - ASSERT.equal(-1449802942, mod_ctype.rsint32(buffer, 'little', 0)); - ASSERT.equal(917083587, mod_ctype.rsint32(buffer, 'little', 1)); - ASSERT.equal(389458325, mod_ctype.rsint32(buffer, 'little', 2)); -} - -test8(); -test16(); -test32(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wbounds.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wbounds.js deleted file mode 100644 index 5488177b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wbounds.js +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Test to make sure that we properly are erroring whenever we try to write - * beyond the size of the integer. - */ - -var mod_ctio = require('../../../ctio.js'); -var mod_assert = require('assert'); -var tb = new Buffer(16); /* Largest buffer we'll need */ - -var cases = [ - { func: - function () { - mod_ctio.wsint8(0x80, 'big', tb, 0); - }, test: '+int8_t' }, - { func: - function () { - mod_ctio.wsint8(-0x81, 'big', tb, 0); - }, test: '-int8_t' }, - - { func: - function () { - mod_ctio.wsint16(0x8000, 'big', tb, 0); - }, test: '+int16_t' }, - { func: - function () { - mod_ctio.wsint16(-0x8001, 'big', tb, 0); - }, test: '-int16_t' }, - { func: - function () { - mod_ctio.wsint32(0x80000000, 'big', tb, 0); - }, test: '+int32_t' }, - { func: - function () { - mod_ctio.wsint32(-0x80000001, 'big', tb, 0); - }, test: '-int32_t' }, - { func: - function () { - mod_ctio.wsint64([ 0x80000000, 0 ], 'big', tb, 0); - }, test: '+int64_t' }, - { func: - function () { - mod_ctio.wsint64([ -0x80000000, -1 ], 'big', tb, 0); - }, test: '-int64_t' } -]; - -function test() -{ - var ii; - for (ii = 0; ii < cases.length; ii++) - mod_assert.throws(cases[ii]['func'], Error, cases[ii]['test']); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wint.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wint.js deleted file mode 100644 index 98b6a32a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wint.js +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Tests to verify we're writing signed integers correctly - */ -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - -function test8() -{ - var buffer = new Buffer(4); - mod_ctype.wsint8(0x23, 'big', buffer, 0); - mod_ctype.wsint8(0x23, 'little', buffer, 1); - mod_ctype.wsint8(-5, 'big', buffer, 2); - mod_ctype.wsint8(-5, 'little', buffer, 3); - - ASSERT.equal(0x23, buffer[0]); - ASSERT.equal(0x23, buffer[1]); - ASSERT.equal(0xfb, buffer[2]); - ASSERT.equal(0xfb, buffer[3]); - - /* Make sure we handle truncation correctly */ - ASSERT.throws(function () { - mod_ctype.wsint8(0xabc, 'big', buffer, 0); - }); - ASSERT.throws(function () { - mod_ctype.wsint8(0xabc, 'little', buffer, 0); - }); -} - -function test16() -{ - var buffer = new Buffer(6); - mod_ctype.wsint16(0x0023, 'big', buffer, 0); - mod_ctype.wsint16(0x0023, 'little', buffer, 2); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x23, buffer[1]); - ASSERT.equal(0x23, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - mod_ctype.wsint16(-5, 'big', buffer, 0); - mod_ctype.wsint16(-5, 'little', buffer, 2); - ASSERT.equal(0xff, buffer[0]); - ASSERT.equal(0xfb, buffer[1]); - ASSERT.equal(0xfb, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - - mod_ctype.wsint16(-1679, 'big', buffer, 1); - mod_ctype.wsint16(-1679, 'little', buffer, 3); - ASSERT.equal(0xf9, buffer[1]); - ASSERT.equal(0x71, buffer[2]); - ASSERT.equal(0x71, buffer[3]); - ASSERT.equal(0xf9, buffer[4]); -} - -function test32() -{ - var buffer = new Buffer(8); - mod_ctype.wsint32(0x23, 'big', buffer, 0); - mod_ctype.wsint32(0x23, 'little', buffer, 4); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x23, buffer[3]); - ASSERT.equal(0x23, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[7]); - - mod_ctype.wsint32(-5, 'big', buffer, 0); - mod_ctype.wsint32(-5, 'little', buffer, 4); - ASSERT.equal(0xff, buffer[0]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xfb, buffer[3]); - ASSERT.equal(0xfb, buffer[4]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[6]); - ASSERT.equal(0xff, buffer[7]); - - mod_ctype.wsint32(-805306713, 'big', buffer, 0); - mod_ctype.wsint32(-805306713, 'litle', buffer, 4); - ASSERT.equal(0xcf, buffer[0]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xfe, buffer[2]); - ASSERT.equal(0xa7, buffer[3]); - ASSERT.equal(0xa7, buffer[4]); - ASSERT.equal(0xfe, buffer[5]); - ASSERT.equal(0xff, buffer[6]); - ASSERT.equal(0xcf, buffer[7]); -} - -test8(); -test16(); -test32(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.64.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.64.js deleted file mode 100644 index cf66ac7a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.64.js +++ /dev/null @@ -1,451 +0,0 @@ -/* - * Test our ability to read and write unsigned 64-bit integers. - */ - -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - -function testRead() -{ - var res, data; - data = new Buffer(10); - - data[0] = 0x32; - data[1] = 0x65; - data[2] = 0x42; - data[3] = 0x56; - data[4] = 0x23; - data[5] = 0xff; - data[6] = 0xff; - data[7] = 0xff; - data[8] = 0x89; - data[9] = 0x11; - res = mod_ctype.ruint64(data, 'big', 0); - ASSERT.equal(0x32654256, res[0]); - ASSERT.equal(0x23ffffff, res[1]); - res = mod_ctype.ruint64(data, 'big', 1); - ASSERT.equal(0x65425623, res[0]); - ASSERT.equal(0xffffff89, res[1]); - res = mod_ctype.ruint64(data, 'big', 2); - ASSERT.equal(0x425623ff, res[0]); - ASSERT.equal(0xffff8911, res[1]); - res = mod_ctype.ruint64(data, 'little', 0); - ASSERT.equal(0xffffff23, res[0]); - ASSERT.equal(0x56426532, res[1]); - res = mod_ctype.ruint64(data, 'little', 1); - ASSERT.equal(0x89ffffff, res[0]); - ASSERT.equal(0x23564265, res[1]); - res = mod_ctype.ruint64(data, 'little', 2); - ASSERT.equal(0x1189ffff, res[0]); - ASSERT.equal(0xff235642, res[1]); - -} - -function testReadOver() -{ - var res, data; - data = new Buffer(10); - - data[0] = 0x80; - data[1] = 0xff; - data[2] = 0x80; - data[3] = 0xff; - data[4] = 0x80; - data[5] = 0xff; - data[6] = 0x80; - data[7] = 0xff; - data[8] = 0x80; - data[9] = 0xff; - res = mod_ctype.ruint64(data, 'big', 0); - ASSERT.equal(0x80ff80ff, res[0]); - ASSERT.equal(0x80ff80ff, res[1]); - res = mod_ctype.ruint64(data, 'big', 1); - ASSERT.equal(0xff80ff80, res[0]); - ASSERT.equal(0xff80ff80, res[1]); - res = mod_ctype.ruint64(data, 'big', 2); - ASSERT.equal(0x80ff80ff, res[0]); - ASSERT.equal(0x80ff80ff, res[1]); - res = mod_ctype.ruint64(data, 'little', 0); - ASSERT.equal(0xff80ff80, res[0]); - ASSERT.equal(0xff80ff80, res[1]); - res = mod_ctype.ruint64(data, 'little', 1); - ASSERT.equal(0x80ff80ff, res[0]); - ASSERT.equal(0x80ff80ff, res[1]); - res = mod_ctype.ruint64(data, 'little', 2); - ASSERT.equal(0xff80ff80, res[0]); - ASSERT.equal(0xff80ff80, res[1]); -} - -function testWriteZero() -{ - var data, buf; - buf = new Buffer(10); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wuint64(data, 'big', buf, 0); - ASSERT.equal(0, buf[0]); - ASSERT.equal(0, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wuint64(data, 'big', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wuint64(data, 'big', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0, buf[8]); - ASSERT.equal(0, buf[9]); - - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wuint64(data, 'little', buf, 0); - ASSERT.equal(0, buf[0]); - ASSERT.equal(0, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wuint64(data, 'little', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wuint64(data, 'little', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0, buf[8]); - ASSERT.equal(0, buf[9]); -} - -/* - * Also include tests that are going to force us to go into a negative value and - * insure that it's written correctly. - */ -function testWrite() -{ - var data, buf; - - buf = new Buffer(10); - data = [ 0x234456, 0x87 ]; - buf.fill(0x66); - mod_ctype.wuint64(data, 'big', buf, 0); - ASSERT.equal(0x00, buf[0]); - ASSERT.equal(0x23, buf[1]); - ASSERT.equal(0x44, buf[2]); - ASSERT.equal(0x56, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x87, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'big', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x23, buf[2]); - ASSERT.equal(0x44, buf[3]); - ASSERT.equal(0x56, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x87, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'big', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x23, buf[3]); - ASSERT.equal(0x44, buf[4]); - ASSERT.equal(0x56, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x00, buf[8]); - ASSERT.equal(0x87, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'little', buf, 0); - ASSERT.equal(0x87, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x56, buf[4]); - ASSERT.equal(0x44, buf[5]); - ASSERT.equal(0x23, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'little', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x87, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x56, buf[5]); - ASSERT.equal(0x44, buf[6]); - ASSERT.equal(0x23, buf[7]); - ASSERT.equal(0x00, buf[8]); - ASSERT.equal(0x66, buf[9]); - - - buf.fill(0x66); - mod_ctype.wuint64(data, 'little', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0x87, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x56, buf[6]); - ASSERT.equal(0x44, buf[7]); - ASSERT.equal(0x23, buf[8]); - ASSERT.equal(0x00, buf[9]); - - data = [0xffff3421, 0x34abcdba]; - buf.fill(0x66); - mod_ctype.wuint64(data, 'big', buf, 0); - ASSERT.equal(0xff, buf[0]); - ASSERT.equal(0xff, buf[1]); - ASSERT.equal(0x34, buf[2]); - ASSERT.equal(0x21, buf[3]); - ASSERT.equal(0x34, buf[4]); - ASSERT.equal(0xab, buf[5]); - ASSERT.equal(0xcd, buf[6]); - ASSERT.equal(0xba, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'big', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0xff, buf[1]); - ASSERT.equal(0xff, buf[2]); - ASSERT.equal(0x34, buf[3]); - ASSERT.equal(0x21, buf[4]); - ASSERT.equal(0x34, buf[5]); - ASSERT.equal(0xab, buf[6]); - ASSERT.equal(0xcd, buf[7]); - ASSERT.equal(0xba, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'big', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0xff, buf[2]); - ASSERT.equal(0xff, buf[3]); - ASSERT.equal(0x34, buf[4]); - ASSERT.equal(0x21, buf[5]); - ASSERT.equal(0x34, buf[6]); - ASSERT.equal(0xab, buf[7]); - ASSERT.equal(0xcd, buf[8]); - ASSERT.equal(0xba, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'little', buf, 0); - ASSERT.equal(0xba, buf[0]); - ASSERT.equal(0xcd, buf[1]); - ASSERT.equal(0xab, buf[2]); - ASSERT.equal(0x34, buf[3]); - ASSERT.equal(0x21, buf[4]); - ASSERT.equal(0x34, buf[5]); - ASSERT.equal(0xff, buf[6]); - ASSERT.equal(0xff, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'little', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0xba, buf[1]); - ASSERT.equal(0xcd, buf[2]); - ASSERT.equal(0xab, buf[3]); - ASSERT.equal(0x34, buf[4]); - ASSERT.equal(0x21, buf[5]); - ASSERT.equal(0x34, buf[6]); - ASSERT.equal(0xff, buf[7]); - ASSERT.equal(0xff, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'little', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0xba, buf[2]); - ASSERT.equal(0xcd, buf[3]); - ASSERT.equal(0xab, buf[4]); - ASSERT.equal(0x34, buf[5]); - ASSERT.equal(0x21, buf[6]); - ASSERT.equal(0x34, buf[7]); - ASSERT.equal(0xff, buf[8]); - ASSERT.equal(0xff, buf[9]); -} - -/* - * Make sure we catch invalid writes. - */ -function testWriteInvalid() -{ - var data, buf; - - /* Buffer too small */ - buf = new Buffer(4); - data = [ 0, 0]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 0); - }, Error, 'buffer too small'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 0); - }, Error, 'buffer too small'); - - /* Beyond the end of the buffer */ - buf = new Buffer(12); - data = [ 0, 0]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 11); - }, Error, 'write beyond end of buffer'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 11); - }, Error, 'write beyond end of buffer'); - - /* Write negative values */ - buf = new Buffer(12); - data = [ -3, 0 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write negative number'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write negative number'); - - data = [ 0, -3 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write negative number'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write negative number'); - - data = [ -3, -3 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write negative number'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write negative number'); - - - /* Write fractional values */ - buf = new Buffer(12); - data = [ 3.33, 0 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ 0, 3.3 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ 3.33, 2.42 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - /* Write values that are too large */ - buf = new Buffer(12); - data = [ 0xffffffffff, 23 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ 0xffffffffff, 0xffffff238 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ 0x23, 0xffffff238 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write too large'); -} - - -testRead(); -testReadOver(); -testWriteZero(); -testWrite(); -testWriteInvalid(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.roundtrip.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.roundtrip.js deleted file mode 100644 index 87ae59b7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.roundtrip.js +++ /dev/null @@ -1,81 +0,0 @@ -/* - * A battery of tests for sucessful round-trip between writes and reads - */ - -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - - -/* - * What the heck, let's just test every value for 8-bits. - */ - -function test8() { - var data = new Buffer(1); - var i; - for (i = 0; i < 256; i++) { - mod_ctype.wuint8(i, 'big', data, 0); - ASSERT.equal(i, mod_ctype.ruint8(data, 'big', 0)); - mod_ctype.wuint8(i, 'little', data, 0); - ASSERT.equal(i, mod_ctype.ruint8(data, 'little', 0)); - } - ASSERT.ok(true); -} - -/* - * Test a random sample of 256 values in the 16-bit unsigned range - */ - -function test16() { - var data = new Buffer(2); - var i = 0; - for (i = 0; i < 256; i++) { - var value = Math.round(Math.random() * Math.pow(2, 16)); - mod_ctype.wuint16(value, 'big', data, 0); - ASSERT.equal(value, mod_ctype.ruint16(data, 'big', 0)); - mod_ctype.wuint16(value, 'little', data, 0); - ASSERT.equal(value, mod_ctype.ruint16(data, 'little', 0)); - } -} - -/* - * Test a random sample of 256 values in the 32-bit unsigned range - */ - -function test32() { - var data = new Buffer(4); - var i = 0; - for (i = 0; i < 256; i++) { - var value = Math.round(Math.random() * Math.pow(2, 32)); - mod_ctype.wuint32(value, 'big', data, 0); - ASSERT.equal(value, mod_ctype.ruint32(data, 'big', 0)); - mod_ctype.wuint32(value, 'little', data, 0); - ASSERT.equal(value, mod_ctype.ruint32(data, 'little', 0)); - } -} - -/* - * Test a random sample of 256 values in the 64-bit unsigned range - */ - -function test64() { - var data = new Buffer(8); - var i = 0; - for (i = 0; i < 256; i++) { - var low = Math.round(Math.random() * Math.pow(2, 32)); - var high = Math.round(Math.random() * Math.pow(2, 32)); - mod_ctype.wuint64([high, low], 'big', data, 0); - var result = mod_ctype.ruint64(data, 'big', 0); - ASSERT.equal(high, result[0]); - ASSERT.equal(low, result[1]); - mod_ctype.wuint64([high, low], 'little', data, 0); - result = mod_ctype.ruint64(data, 'little', 0); - ASSERT.equal(high, result[0]); - ASSERT.equal(low, result[1]); - } -} - -exports.test8 = test8; -exports.test16 = test16; -exports.test32 = test32; -exports.test64 = test64; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.ruint.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.ruint.js deleted file mode 100644 index b67c077f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.ruint.js +++ /dev/null @@ -1,95 +0,0 @@ -/* - * A battery of tests to help us read a series of uints - */ - -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - -/* - * We need to check the following things: - * - We are correctly resolving big endian (doesn't mean anything for 8 bit) - * - Correctly resolving little endian (doesn't mean anything for 8 bit) - * - Correctly using the offsets - * - Correctly interpreting values that are beyond the signed range as unsigned - */ -function test8() -{ - var data = new Buffer(4); - data[0] = 23; - data[1] = 23; - data[2] = 23; - data[3] = 23; - ASSERT.equal(23, mod_ctype.ruint8(data, 'big', 0)); - ASSERT.equal(23, mod_ctype.ruint8(data, 'little', 0)); - ASSERT.equal(23, mod_ctype.ruint8(data, 'big', 1)); - ASSERT.equal(23, mod_ctype.ruint8(data, 'little', 1)); - ASSERT.equal(23, mod_ctype.ruint8(data, 'big', 2)); - ASSERT.equal(23, mod_ctype.ruint8(data, 'little', 2)); - ASSERT.equal(23, mod_ctype.ruint8(data, 'big', 3)); - ASSERT.equal(23, mod_ctype.ruint8(data, 'little', 3)); - data[0] = 255; /* If it became a signed int, would be -1 */ - ASSERT.equal(255, mod_ctype.ruint8(data, 'big', 0)); - ASSERT.equal(255, mod_ctype.ruint8(data, 'little', 0)); -} - -/* - * Test 16 bit unsigned integers. We need to verify the same set as 8 bit, only - * now some of the issues actually matter: - * - We are correctly resolving big endian - * - Correctly resolving little endian - * - Correctly using the offsets - * - Correctly interpreting values that are beyond the signed range as unsigned - */ -function test16() -{ - var data = new Buffer(4); - /* Test signed values first */ - data[0] = 0; - data[1] = 0x23; - data[2] = 0x42; - data[3] = 0x3f; - - ASSERT.equal(0x23, mod_ctype.ruint16(data, 'big', 0)); - ASSERT.equal(0x2342, mod_ctype.ruint16(data, 'big', 1)); - ASSERT.equal(0x423f, mod_ctype.ruint16(data, 'big', 2)); - - ASSERT.equal(0x2300, mod_ctype.ruint16(data, 'little', 0)); - ASSERT.equal(0x4223, mod_ctype.ruint16(data, 'little', 1)); - ASSERT.equal(0x3f42, mod_ctype.ruint16(data, 'little', 2)); - - data[0] = 0xfe; - data[1] = 0xfe; - - ASSERT.equal(0xfefe, mod_ctype.ruint16(data, 'big', 0)); - ASSERT.equal(0xfefe, mod_ctype.ruint16(data, 'little', 0)); -} - -/* - * Test 32 bit unsigned integers. We need to verify the same set as 8 bit, only - * now some of the issues actually matter: - * - We are correctly resolving big endian - * - Correctly using the offsets - * - Correctly interpreting values that are beyond the signed range as unsigned - */ -function test32() -{ - var data = new Buffer(8); - data[0] = 0x32; - data[1] = 0x65; - data[2] = 0x42; - data[3] = 0x56; - data[4] = 0x23; - data[5] = 0xff; - - ASSERT.equal(0x32654256, mod_ctype.ruint32(data, 'big', 0)); - ASSERT.equal(0x65425623, mod_ctype.ruint32(data, 'big', 1)); - ASSERT.equal(0x425623ff, mod_ctype.ruint32(data, 'big', 2)); - - ASSERT.equal(0x56426532, mod_ctype.ruint32(data, 'little', 0)); - ASSERT.equal(0x23564265, mod_ctype.ruint32(data, 'little', 1)); - ASSERT.equal(0xff235642, mod_ctype.ruint32(data, 'little', 2)); -} - -test8(); -test16(); -test32(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.wuint.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.wuint.js deleted file mode 100644 index d6c4230f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.wuint.js +++ /dev/null @@ -1,156 +0,0 @@ -/* - * A battery of tests to help us read a series of uints - */ - -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - -/* - * We need to check the following things: - * - We are correctly resolving big endian (doesn't mean anything for 8 bit) - * - Correctly resolving little endian (doesn't mean anything for 8 bit) - * - Correctly using the offsets - * - Correctly interpreting values that are beyond the signed range as unsigned - */ -function test8() -{ - var data = new Buffer(4); - mod_ctype.wuint8(23, 'big', data, 0); - mod_ctype.wuint8(23, 'big', data, 1); - mod_ctype.wuint8(23, 'big', data, 2); - mod_ctype.wuint8(23, 'big', data, 3); - ASSERT.equal(23, data[0]); - ASSERT.equal(23, data[1]); - ASSERT.equal(23, data[2]); - ASSERT.equal(23, data[3]); - mod_ctype.wuint8(23, 'little', data, 0); - mod_ctype.wuint8(23, 'little', data, 1); - mod_ctype.wuint8(23, 'little', data, 2); - mod_ctype.wuint8(23, 'little', data, 3); - ASSERT.equal(23, data[0]); - ASSERT.equal(23, data[1]); - ASSERT.equal(23, data[2]); - ASSERT.equal(23, data[3]); - mod_ctype.wuint8(255, 'big', data, 0); - ASSERT.equal(255, data[0]); - mod_ctype.wuint8(255, 'little', data, 0); - ASSERT.equal(255, data[0]); -} - -function test16() -{ - var value = 0x2343; - var data = new Buffer(4); - mod_ctype.wuint16(value, 'big', data, 0); - ASSERT.equal(0x23, data[0]); - ASSERT.equal(0x43, data[1]); - mod_ctype.wuint16(value, 'big', data, 1); - ASSERT.equal(0x23, data[1]); - ASSERT.equal(0x43, data[2]); - mod_ctype.wuint16(value, 'big', data, 2); - ASSERT.equal(0x23, data[2]); - ASSERT.equal(0x43, data[3]); - - mod_ctype.wuint16(value, 'little', data, 0); - ASSERT.equal(0x23, data[1]); - ASSERT.equal(0x43, data[0]); - - mod_ctype.wuint16(value, 'little', data, 1); - ASSERT.equal(0x23, data[2]); - ASSERT.equal(0x43, data[1]); - - mod_ctype.wuint16(value, 'little', data, 2); - ASSERT.equal(0x23, data[3]); - ASSERT.equal(0x43, data[2]); - - value = 0xff80; - mod_ctype.wuint16(value, 'little', data, 0); - ASSERT.equal(0xff, data[1]); - ASSERT.equal(0x80, data[0]); - - mod_ctype.wuint16(value, 'big', data, 0); - ASSERT.equal(0xff, data[0]); - ASSERT.equal(0x80, data[1]); -} - -function test32() -{ - var data = new Buffer(6); - var value = 0xe7f90a6d; - - mod_ctype.wuint32(value, 'big', data, 0); - ASSERT.equal(0xe7, data[0]); - ASSERT.equal(0xf9, data[1]); - ASSERT.equal(0x0a, data[2]); - ASSERT.equal(0x6d, data[3]); - - mod_ctype.wuint32(value, 'big', data, 1); - ASSERT.equal(0xe7, data[1]); - ASSERT.equal(0xf9, data[2]); - ASSERT.equal(0x0a, data[3]); - ASSERT.equal(0x6d, data[4]); - - mod_ctype.wuint32(value, 'big', data, 2); - ASSERT.equal(0xe7, data[2]); - ASSERT.equal(0xf9, data[3]); - ASSERT.equal(0x0a, data[4]); - ASSERT.equal(0x6d, data[5]); - - mod_ctype.wuint32(value, 'little', data, 0); - ASSERT.equal(0xe7, data[3]); - ASSERT.equal(0xf9, data[2]); - ASSERT.equal(0x0a, data[1]); - ASSERT.equal(0x6d, data[0]); - - mod_ctype.wuint32(value, 'little', data, 1); - ASSERT.equal(0xe7, data[4]); - ASSERT.equal(0xf9, data[3]); - ASSERT.equal(0x0a, data[2]); - ASSERT.equal(0x6d, data[1]); - - mod_ctype.wuint32(value, 'little', data, 2); - ASSERT.equal(0xe7, data[5]); - ASSERT.equal(0xf9, data[4]); - ASSERT.equal(0x0a, data[3]); - ASSERT.equal(0x6d, data[2]); -} - -function test64() -{ - var data = new Buffer(10); - var value = 0x0007cda8e7f90a6d; - var high = Math.floor(value / Math.pow(2, 32)); - var low = value - (high * Math.pow(2, 32)); - ASSERT.equal(0x0007cda8, high); - ASSERT.equal(0xe7f90a6d, low); - - mod_ctype.wuint64([high, low], 'big', data, 0); - ASSERT.equal(0x00, data[0]); - ASSERT.equal(0x07, data[1]); - ASSERT.equal(0xcd, data[2]); - ASSERT.equal(0xa8, data[3]); - ASSERT.equal(0xe7, data[4]); - ASSERT.equal(0xf9, data[5]); - ASSERT.equal(0x0a, data[6]); - ASSERT.equal(0x6d, data[7]); - - mod_ctype.wuint64([high, low], 'little', data, 0); - ASSERT.equal(0x6d, data[0]); - ASSERT.equal(0x0a, data[1]); - ASSERT.equal(0xf9, data[2]); - ASSERT.equal(0xe7, data[3]); - ASSERT.equal(0xa8, data[4]); - ASSERT.equal(0xcd, data[5]); - ASSERT.equal(0x07, data[6]); - ASSERT.equal(0x00, data[7]); -} - -test8(); -test16(); -test32(); -test64(); - -exports.test8 = test8; -exports.test16 = test16; -exports.test32 = test32; -exports.test64 = test64; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicr.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicr.js deleted file mode 100644 index e9895152..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicr.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Simple does to see if it works at all - */ -var mod_ctype = require('../../ctype'); -var ASSERT = require('assert'); -var mod_sys = require('sys'); - -function test() -{ - var ii, p, result, buffer; - - p = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer(4); - buffer[0] = 23; - buffer[3] = 42; - result = p.readData([ { x: { type: 'uint8_t' }}, - { y: { type: 'uint8_t', offset: 3 }} - ], buffer, 0); - ASSERT.equal(23, result['x']); - ASSERT.equal(42, result['y']); - - buffer = new Buffer(23); - for (ii = 0; ii < 23; ii++) - buffer[ii] = 0; - - buffer.write('Hello, world!'); - result = p.readData([ { x: { type: 'char[20]' }} ], buffer, 0); - - /* - * This is currently broken behvaior, need to redesign check - * ASSERT.equal('Hello, world!', result['x'].toString('utf-8', 0, - * result['x'].length)); - */ - - buffer = new Buffer(4); - buffer[0] = 0x03; - buffer[1] = 0x24; - buffer[2] = 0x25; - buffer[3] = 0x26; - result = p.readData([ { y: { type: 'uint8_t' }}, - { x: { type: 'uint8_t[y]' }}], buffer, 0); - console.log(mod_sys.inspect(result, true)); - - p.typedef('ssize_t', 'int32_t'); - ASSERT.deepEqual({ 'ssize_t': 'int32_t' }, p.lstypes()); - result = p.readData([ { x: { type: 'ssize_t' } } ], buffer, 0); - ASSERT.equal(0x26252403, result['x']); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicw.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicw.js deleted file mode 100644 index 89d446f2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicw.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Simple does it fucking work at all test - */ - -var mod_ctype = require('../../ctype'); -var ASSERT = require('assert'); -var mod_sys = require('sys'); - -function test() -{ - var ii, p, buffer, buf2; - - p = new mod_ctype.Parser({ endian: 'big' }); - buffer = new Buffer(4); - p.writeData([ { x: { type: 'uint8_t', value: 23 }}, - { y: { type: 'uint8_t', offset: 3, value: 42 }} - ], buffer, 0); - ASSERT.equal(23, buffer[0]); - ASSERT.equal(42, buffer[3]); - - buffer = new Buffer(20); - for (ii = 0; ii < 20; ii++) - buffer[ii] = 0; - - buffer.write('Hello, world!'); - buf2 = new Buffer(22); - p.writeData([ { x: { type: 'char[20]', value: buffer }} ], buf2, 0); - for (ii = 0; ii < 20; ii++) - ASSERT.equal(buffer[ii], buf2[ii]); - /* - * This is currently broken behvaior, need to redesign check - * ASSERT.equal('Hello, world!', result['x'].toString('utf-8', 0, - * result['x'].length)); - */ - - buffer = new Buffer(4); - p.writeData([ { y: { type: 'uint8_t', value: 3 }}, - { x: { type: 'uint8_t[y]', value: [ 0x24, 0x25, 0x26] }}], - buffer, 0); - console.log(mod_sys.inspect(buffer)); - - p.typedef('ssize_t', 'int32_t'); - ASSERT.deepEqual({ 'ssize_t': 'int32_t' }, p.lstypes()); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.char.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.char.js deleted file mode 100644 index 14d9529c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.char.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Test the different forms of reading characters: - * - * - the default, a single element buffer - * - uint8, values are uint8_ts - * - int8, values are int8_ts - */ -var mod_ctype = require('../../ctype'); -var mod_assert = require('assert'); - -function test() -{ - var p, buf, res; - - buf = new Buffer(1); - buf[0] = 255; - - p = new mod_ctype.Parser({ endian: 'little'}); - res = p.readData([ { c: { type: 'char' }} ], buf, 0); - res = res['c']; - mod_assert.ok(res instanceof Buffer); - mod_assert.equal(255, res[0]); - - p = new mod_ctype.Parser({ endian: 'little', - 'char-type': 'int8' }); - res = p.readData([ { c: { type: 'char' }} ], buf, 0); - res = res['c']; - mod_assert.ok(typeof (res) == 'number', 'got typeof (res): ' + - typeof (res)); - mod_assert.equal(-1, res); - - p = new mod_ctype.Parser({ endian: 'little', - 'char-type': 'uint8' }); - res = p.readData([ { c: { type: 'char' }} ], buf, 0); - res = res['c']; - mod_assert.ok(typeof (res) == 'number', 'got typeof (res): ' + - typeof (res)); - mod_assert.equal(255, res); - -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.endian.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.endian.js deleted file mode 100644 index 11fc2d2c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.endian.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Simple test to make sure that the endian setting works. - */ - -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -function test() -{ - var parser, buf; - - parser = new mod_ctype.Parser({ - endian: 'little' - }); - - buf = new Buffer(2); - parser.writeData([ { key: { type: 'uint16_t' } } ], buf, 0, [ 0x1234 ]); - mod_assert.equal(buf[0], 0x34); - mod_assert.equal(buf[1], 0x12); - parser.setEndian('big'); - - parser.writeData([ { key: { type: 'uint16_t' } } ], buf, 0, [ 0x1234 ]); - mod_assert.equal(buf[0], 0x12); - mod_assert.equal(buf[1], 0x34); - - parser.setEndian('little'); - parser.writeData([ { key: { type: 'uint16_t' } } ], buf, 0, [ 0x1234 ]); - mod_assert.equal(buf[0], 0x34); - mod_assert.equal(buf[1], 0x12); -} - -function fail() -{ - var parser; - - parser = new mod_ctype.Parser({ - endian: 'little' - }); - mod_assert.throws(function () { - parser.setEndian('littlebigwrong'); - }); -} - -test(); -fail(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.oldwrite.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.oldwrite.js deleted file mode 100644 index 9491cf6e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.oldwrite.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * A long overdue test to go through and verify that we can read and write - * structures as well as nested structures. - */ - -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -function test() -{ - var parser, buf, data; - parser = new mod_ctype.Parser({ - endian: 'little' - }); - parser.typedef('point_t', [ - { x: { type: 'uint8_t' } }, - { y: { type: 'uint8_t' } } - ]); - buf = new Buffer(2); - data = [ - { point: { type: 'point_t', value: [ 23, 42 ] } } - ]; - parser.writeData(data, buf, 0); - mod_assert.ok(buf[0] == 23); - mod_assert.ok(buf[1] == 42); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.readSize.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.readSize.js deleted file mode 100644 index 6c490a2e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.readSize.js +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Testing to ensure we're reading the expected number bytes - */ -var mod_ctype = require('../../ctype'); -var ASSERT = require('assert'); - -function testUint8() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('80', 'hex'); - result = parser.readStruct([ { item: { type: 'uint8_t' } } ], buffer, - 0); - ASSERT.equal(result['size'], 1); -} - -function testSint8() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('80', 'hex'); - result = parser.readStruct([ { item: { type: 'int8_t' } } ], buffer, 0); - ASSERT.equal(result['size'], 1); -} - -function testUint16() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('8000', 'hex'); - result = parser.readStruct([ { item: { type: 'uint16_t' } } ], buffer, - 0); - ASSERT.equal(result['size'], 2); -} - -function testSint16() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('8000', 'hex'); - result = parser.readStruct([ { item: { type: 'int16_t' } } ], buffer, - 0); - ASSERT.equal(result['size'], 2); -} - -function testUint32() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('80000000', 'hex'); - result = parser.readStruct([ { item: { type: 'uint32_t' } } ], buffer, - 0); - ASSERT.equal(result['size'], 4); -} - -function testSint32() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('80000000', 'hex'); - result = parser.readStruct([ { item: { type: 'int32_t' } } ], buffer, - 0); - ASSERT.equal(result['size'], 4); -} - -function testUint64() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('8000000000000000', 'hex'); - result = parser.readStruct([ { item: { type: 'uint64_t' } } ], buffer, - 0); - ASSERT.equal(result['size'], 8); -} - -function testSint64() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('8000000000000000', 'hex'); - result = parser.readStruct([ { item: { type: 'int64_t' } } ], buffer, - 0); - ASSERT.equal(result['size'], 8); -} - -function testFloat() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('ABAAAA3E', 'hex'); - result = parser.readStruct([ { item: { type: 'float' } } ], buffer, 0); - ASSERT.equal(result['size'], 4); -} - -function testDouble() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('000000000000F03F', 'hex'); - result = parser.readStruct([ { item: { type: 'double' } } ], buffer, 0); - ASSERT.equal(result['size'], 8); -} - -function testChar() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('t'); - result = parser.readStruct([ { item: { type: 'char' } } ], buffer, 0); - ASSERT.equal(result['size'], 1); -} - -function test() -{ - testSint8(); - testUint8(); - testSint16(); - testUint16(); - testSint32(); - testUint32(); - testSint64(); - testUint64(); - testFloat(); - testDouble(); - testChar(); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.structw.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.structw.js deleted file mode 100644 index 09c1a5ba..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.structw.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * A long overdue test to go through and verify that we can read and write - * structures as well as nested structures. - */ - -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -function test() -{ - var parser, buf, data; - parser = new mod_ctype.Parser({ - endian: 'little' - }); - parser.typedef('point_t', [ - { x: { type: 'uint8_t' } }, - { y: { type: 'uint8_t' } } - ]); - buf = new Buffer(2); - data = [ - { point: { type: 'point_t' } } - ]; - parser.writeData(data, buf, 0, [ [ 23, 42 ] ]); - mod_assert.ok(buf[0] == 23); - mod_assert.ok(buf[1] == 42); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.writeStruct.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.writeStruct.js deleted file mode 100644 index 48556667..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.writeStruct.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Test to verify that the offset is incremented when structures are written to. - * Hopefully we will not regress issue #41 - */ - -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -function test() -{ - var parser, buf, data; - parser = new mod_ctype.Parser({ - endian: 'little' - }); - parser.typedef('point_t', [ - { x: { type: 'uint8_t' } }, - { y: { type: 'uint8_t' } } - ]); - buf = new Buffer(4); - data = [ - { point1: { type: 'point_t' } }, - { point2: { type: 'point_t' } } - ]; - parser.writeData(data, buf, 0, [ [ 23, 42 ], [ 91, 18 ] ]); - mod_assert.ok(buf[0] == 23); - mod_assert.ok(buf[1] == 42); - mod_assert.ok(buf[2] == 91); - mod_assert.ok(buf[3] == 18); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/package.json deleted file mode 100644 index 416f618a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "author": { - "name": "Joyent, Inc" - }, - "name": "http-signature", - "description": "Reference implementation of Joyent's HTTP Signature Scheme", - "version": "0.10.0", - "repository": { - "type": "git", - "url": "git://github.com/joyent/node-http-signature.git" - }, - "engines": { - "node": ">=0.8" - }, - "main": "lib/index.js", - "scripts": { - "test": "tap tst/*.js" - }, - "dependencies": { - "assert-plus": "0.1.2", - "asn1": "0.1.11", - "ctype": "0.5.2" - }, - "devDependencies": { - "node-uuid": "1.4.0", - "tap": "0.4.2" - }, - "readme": "# node-http-signature\n\nnode-http-signature is a node.js library that has client and server components\nfor Joyent's [HTTP Signature Scheme](http_signing.md).\n\n## Usage\n\nNote the example below signs a request with the same key/cert used to start an\nHTTP server. This is almost certainly not what you actaully want, but is just\nused to illustrate the API calls; you will need to provide your own key\nmanagement in addition to this library.\n\n### Client\n\n var fs = require('fs');\n var https = require('https');\n var httpSignature = require('http-signature');\n\n var key = fs.readFileSync('./key.pem', 'ascii');\n\n var options = {\n host: 'localhost',\n port: 8443,\n path: '/',\n method: 'GET',\n headers: {}\n };\n\n // Adds a 'Date' header in, signs it, and adds the\n // 'Authorization' header in.\n var req = https.request(options, function(res) {\n console.log(res.statusCode);\n });\n\n\n httpSignature.sign(req, {\n key: key,\n keyId: './cert.pem'\n });\n\n req.end();\n\n### Server\n\n var fs = require('fs');\n var https = require('https');\n var httpSignature = require('http-signature');\n\n var options = {\n key: fs.readFileSync('./key.pem'),\n cert: fs.readFileSync('./cert.pem')\n };\n\n https.createServer(options, function (req, res) {\n var rc = 200;\n var parsed = httpSignature.parseRequest(req);\n var pub = fs.readFileSync(parsed.keyId, 'ascii');\n if (!httpSignature.verifySignature(parsed, pub))\n rc = 401;\n\n res.writeHead(rc);\n res.end();\n }).listen(8443);\n\n## Installation\n\n npm install http-signature\n\n## License\n\nMIT.\n\n## Bugs\n\nSee <https://github.com/joyent/node-http-signature/issues>.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/joyent/node-http-signature/issues" - }, - "homepage": "https://github.com/joyent/node-http-signature", - "_id": "http-signature@0.10.0", - "dist": { - "shasum": "ed3c3415949cf275765bb5394a145ada7a1e506a" - }, - "_from": "http-signature@~0.10.0", - "_resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/README.md deleted file mode 100644 index 5d764f3a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# json-stringify-safe - -Like JSON.stringify, but doesn't throw on circular references. - -## Usage - -Takes the same arguments as `JSON.stringify`. - -```javascript -var stringify = require('json-stringify-safe'); -var circularObj = {}; -circularObj.circularRef = circularObj; -circularObj.list = [ circularObj, circularObj ]; -console.log(stringify(circularObj, null, 2)); -``` - -Output: - -```json -{ - "circularRef": "[Circular]", - "list": [ - "[Circular]", - "[Circular]" - ] -} -``` - -## Details - -``` -stringify(obj, serializer, indent, decycler) -``` - -The first three arguments are the same as to JSON.stringify. The last -is an argument that's only used when the object has been seen already. - -The default `decycler` function returns the string `'[Circular]'`. -If, for example, you pass in `function(k,v){}` (return nothing) then it -will prune cycles. If you pass in `function(k,v){ return {foo: 'bar'}}`, -then cyclical objects will always be represented as `{"foo":"bar"}` in -the result. - -``` -stringify.getSerialize(serializer, decycler) -``` - -Returns a serializer that can be used elsewhere. This is the actual -function that's passed to JSON.stringify. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/package.json deleted file mode 100644 index dc9929d9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "json-stringify-safe", - "version": "5.0.0", - "description": "Like JSON.stringify, but doesn't blow up on circular refs", - "main": "stringify.js", - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/json-stringify-safe" - }, - "keywords": [ - "json", - "stringify", - "circular", - "safe" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "license": "BSD", - "readmeFilename": "README.md", - "readme": "# json-stringify-safe\n\nLike JSON.stringify, but doesn't throw on circular references.\n\n## Usage\n\nTakes the same arguments as `JSON.stringify`.\n\n```javascript\nvar stringify = require('json-stringify-safe');\nvar circularObj = {};\ncircularObj.circularRef = circularObj;\ncircularObj.list = [ circularObj, circularObj ];\nconsole.log(stringify(circularObj, null, 2));\n```\n\nOutput:\n\n```json\n{\n \"circularRef\": \"[Circular]\",\n \"list\": [\n \"[Circular]\",\n \"[Circular]\"\n ]\n}\n```\n\n## Details\n\n```\nstringify(obj, serializer, indent, decycler)\n```\n\nThe first three arguments are the same as to JSON.stringify. The last\nis an argument that's only used when the object has been seen already.\n\nThe default `decycler` function returns the string `'[Circular]'`.\nIf, for example, you pass in `function(k,v){}` (return nothing) then it\nwill prune cycles. If you pass in `function(k,v){ return {foo: 'bar'}}`,\nthen cyclical objects will always be represented as `{\"foo\":\"bar\"}` in\nthe result.\n\n```\nstringify.getSerialize(serializer, decycler)\n```\n\nReturns a serializer that can be used elsewhere. This is the actual\nfunction that's passed to JSON.stringify.\n", - "bugs": { - "url": "https://github.com/isaacs/json-stringify-safe/issues" - }, - "homepage": "https://github.com/isaacs/json-stringify-safe", - "_id": "json-stringify-safe@5.0.0", - "dist": { - "shasum": "3bef04524e23eb51118883db0bcf4e18c49ed92c" - }, - "_from": "json-stringify-safe@~5.0.0", - "_resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/stringify.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/stringify.js deleted file mode 100644 index 853ef9b2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/stringify.js +++ /dev/null @@ -1,39 +0,0 @@ -module.exports = stringify; - -function getSerialize (fn, decycle) { - var seen = [], keys = []; - decycle = decycle || function(key, value) { - return '[Circular ' + getPath(value, seen, keys) + ']' - }; - return function(key, value) { - var ret = value; - if (typeof value === 'object' && value) { - if (seen.indexOf(value) !== -1) - ret = decycle(key, value); - else { - seen.push(value); - keys.push(key); - } - } - if (fn) ret = fn(key, ret); - return ret; - } -} - -function getPath (value, seen, keys) { - var index = seen.indexOf(value); - var path = [ keys[index] ]; - for (index--; index >= 0; index--) { - if (seen[index][ path[0] ] === value) { - value = seen[index]; - path.unshift(keys[index]); - } - } - return '~' + path.join('.'); -} - -function stringify(obj, fn, spaces, decycle) { - return JSON.stringify(obj, getSerialize(fn, decycle), spaces); -} - -stringify.getSerialize = getSerialize; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/test.js deleted file mode 100644 index 991e9197..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/test.js +++ /dev/null @@ -1,128 +0,0 @@ -var stringify = require('./stringify.js'); - -var circularObj = { a: 'b' }; -circularObj.circularRef = circularObj; -circularObj.list = [ circularObj, circularObj ]; - -////////// -// default -var testObj = { - "a": "b", - "circularRef": "[Circular ~]", - "list": [ - "[Circular ~]", - "[Circular ~]" - ] -}; - -var assert = require('assert'); -assert.equal(JSON.stringify(testObj, null, 2), - stringify(circularObj, null, 2)); - -assert.equal(JSON.stringify(testObj, null, 2), - JSON.stringify(circularObj, stringify.getSerialize(), 2)); - - -//////// -// prune -testObj = { - "a": "b", - "list": [ - null, - null - ] -}; - -function prune(k, v) {} - -assert.equal(JSON.stringify(testObj, null, 2), - stringify(circularObj, null, 2, prune)); - -/////////// -// re-cycle -// (throws) -function recycle(k, v) { - return v; -} - -assert.throws(function() { - stringify(circularObj, null, 2, recycle); -}); - -//////// -// fancy -testObj = { - "a": "b", - "circularRef": "circularRef{a:string,circularRef:Object,list:Array}", - "list": [ - "0{a:string,circularRef:Object,list:Array}", - "1{a:string,circularRef:Object,list:Array}" - ] -}; - -function signer(key, value) { - var ret = key + '{'; - var f = false; - for (var i in value) { - if (f) - ret += ','; - f = true; - ret += i + ':'; - var v = value[i]; - switch (typeof v) { - case 'object': - if (!v) - ret += 'null'; - else if (Array.isArray(v)) - ret += 'Array' - else - ret += v.constructor && v.constructor.name || 'Object'; - break; - default: - ret += typeof v; - break; - } - } - ret += '}'; - return ret; -} - -assert.equal(JSON.stringify(testObj, null, 2), - stringify(circularObj, null, 2, signer)); - - -/////// -//multi -var a = { x: 1 }; -a.a = a; -var b = { x: 2 }; -b.a = a; - -var c = { a: a, b: b }; -var d = { list: [ a, b, c ] }; -d.d = d; - -var multi = { - "list": [ - { - "x": 1, - "a": "[Circular ~.list.0]" - }, - { - "x": 2, - "a": "[Circular ~.list.0]" - }, - { - "a": "[Circular ~.list.0]", - "b": "[Circular ~.list.1]" - } - ], - "d": "[Circular ~]" -}; - -assert.equal(JSON.stringify(multi, null, 2), - stringify(d, null, 2)); - -//////// -// pass! -console.log('ok'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/LICENSE deleted file mode 100644 index 451fc455..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Benjamin Thomas, Robert Kieffer - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/README.md deleted file mode 100644 index 6ca19bd1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/README.md +++ /dev/null @@ -1,66 +0,0 @@ -# mime - -Comprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community. - -## Install - -Install with [npm](http://github.com/isaacs/npm): - - npm install mime - -## API - Queries - -### mime.lookup(path) -Get the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g. - - var mime = require('mime'); - - mime.lookup('/path/to/file.txt'); // => 'text/plain' - mime.lookup('file.txt'); // => 'text/plain' - mime.lookup('.TXT'); // => 'text/plain' - mime.lookup('htm'); // => 'text/html' - -### mime.default_type -Sets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.) - -### mime.extension(type) -Get the default extension for `type` - - mime.extension('text/html'); // => 'html' - mime.extension('application/octet-stream'); // => 'bin' - -### mime.charsets.lookup() - -Map mime-type to charset - - mime.charsets.lookup('text/plain'); // => 'UTF-8' - -(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.) - -## API - Defining Custom Types - -The following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/broofa/node-mime/wiki/Requesting-New-Types). - -### mime.define() - -Add custom mime/extension mappings - - mime.define({ - 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'], - 'application/x-my-type': ['x-mt', 'x-mtt'], - // etc ... - }); - - mime.lookup('x-sft'); // => 'text/x-some-format' - -The first entry in the extensions array is returned by `mime.extension()`. E.g. - - mime.extension('text/x-some-format'); // => 'x-sf' - -### mime.load(filepath) - -Load mappings from an Apache ".types" format file - - mime.load('./my_project.types'); - -The .types file format is simple - See the `types` dir for examples. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/mime.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/mime.js deleted file mode 100644 index 48be0c5e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/mime.js +++ /dev/null @@ -1,114 +0,0 @@ -var path = require('path'); -var fs = require('fs'); - -function Mime() { - // Map of extension -> mime type - this.types = Object.create(null); - - // Map of mime type -> extension - this.extensions = Object.create(null); -} - -/** - * Define mimetype -> extension mappings. Each key is a mime-type that maps - * to an array of extensions associated with the type. The first extension is - * used as the default extension for the type. - * - * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']}); - * - * @param map (Object) type definitions - */ -Mime.prototype.define = function (map) { - for (var type in map) { - var exts = map[type]; - - for (var i = 0; i < exts.length; i++) { - if (process.env.DEBUG_MIME && this.types[exts]) { - console.warn(this._loading.replace(/.*\//, ''), 'changes "' + exts[i] + '" extension type from ' + - this.types[exts] + ' to ' + type); - } - - this.types[exts[i]] = type; - } - - // Default extension is the first one we encounter - if (!this.extensions[type]) { - this.extensions[type] = exts[0]; - } - } -}; - -/** - * Load an Apache2-style ".types" file - * - * This may be called multiple times (it's expected). Where files declare - * overlapping types/extensions, the last file wins. - * - * @param file (String) path of file to load. - */ -Mime.prototype.load = function(file) { - - this._loading = file; - // Read file and split into lines - var map = {}, - content = fs.readFileSync(file, 'ascii'), - lines = content.split(/[\r\n]+/); - - lines.forEach(function(line) { - // Clean up whitespace/comments, and split into fields - var fields = line.replace(/\s*#.*|^\s*|\s*$/g, '').split(/\s+/); - map[fields.shift()] = fields; - }); - - this.define(map); - - this._loading = null; -}; - -/** - * Lookup a mime type based on extension - */ -Mime.prototype.lookup = function(path, fallback) { - var ext = path.replace(/.*[\.\/\\]/, '').toLowerCase(); - - return this.types[ext] || fallback || this.default_type; -}; - -/** - * Return file extension associated with a mime type - */ -Mime.prototype.extension = function(mimeType) { - var type = mimeType.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase(); - return this.extensions[type]; -}; - -// Default instance -var mime = new Mime(); - -// Load local copy of -// http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types -mime.load(path.join(__dirname, 'types/mime.types')); - -// Load additional types from node.js community -mime.load(path.join(__dirname, 'types/node.types')); - -// Default type -mime.default_type = mime.lookup('bin'); - -// -// Additional API specific to the default instance -// - -mime.Mime = Mime; - -/** - * Lookup a charset based on mime type. - */ -mime.charsets = { - lookup: function(mimeType, fallback) { - // Assume text types are utf8 - return (/^text\//).test(mimeType) ? 'UTF-8' : fallback; - } -}; - -module.exports = mime; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/package.json deleted file mode 100644 index a9759392..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": { - "name": "Robert Kieffer", - "email": "robert@broofa.com", - "url": "http://github.com/broofa" - }, - "contributors": [ - { - "name": "Benjamin Thomas", - "email": "benjamin@benjaminthomas.org", - "url": "http://github.com/bentomas" - } - ], - "dependencies": {}, - "description": "A comprehensive library for mime-type mapping", - "devDependencies": {}, - "keywords": [ - "util", - "mime" - ], - "main": "mime.js", - "name": "mime", - "repository": { - "url": "https://github.com/broofa/node-mime", - "type": "git" - }, - "version": "1.2.11", - "readme": "# mime\n\nComprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community.\n\n## Install\n\nInstall with [npm](http://github.com/isaacs/npm):\n\n npm install mime\n\n## API - Queries\n\n### mime.lookup(path)\nGet the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g.\n\n var mime = require('mime');\n\n mime.lookup('/path/to/file.txt'); // => 'text/plain'\n mime.lookup('file.txt'); // => 'text/plain'\n mime.lookup('.TXT'); // => 'text/plain'\n mime.lookup('htm'); // => 'text/html'\n\n### mime.default_type\nSets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.)\n\n### mime.extension(type)\nGet the default extension for `type`\n\n mime.extension('text/html'); // => 'html'\n mime.extension('application/octet-stream'); // => 'bin'\n\n### mime.charsets.lookup()\n\nMap mime-type to charset\n\n mime.charsets.lookup('text/plain'); // => 'UTF-8'\n\n(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.)\n\n## API - Defining Custom Types\n\nThe following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/broofa/node-mime/wiki/Requesting-New-Types).\n\n### mime.define()\n\nAdd custom mime/extension mappings\n\n mime.define({\n 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'],\n 'application/x-my-type': ['x-mt', 'x-mtt'],\n // etc ...\n });\n\n mime.lookup('x-sft'); // => 'text/x-some-format'\n\nThe first entry in the extensions array is returned by `mime.extension()`. E.g.\n\n mime.extension('text/x-some-format'); // => 'x-sf'\n\n### mime.load(filepath)\n\nLoad mappings from an Apache \".types\" format file\n\n mime.load('./my_project.types');\n\nThe .types file format is simple - See the `types` dir for examples.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/broofa/node-mime/issues" - }, - "homepage": "https://github.com/broofa/node-mime", - "_id": "mime@1.2.11", - "_from": "mime@~1.2.9" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/test.js deleted file mode 100644 index 2cda1c7a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/test.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Usage: node test.js - */ - -var mime = require('./mime'); -var assert = require('assert'); -var path = require('path'); - -function eq(a, b) { - console.log('Test: ' + a + ' === ' + b); - assert.strictEqual.apply(null, arguments); -} - -console.log(Object.keys(mime.extensions).length + ' types'); -console.log(Object.keys(mime.types).length + ' extensions\n'); - -// -// Test mime lookups -// - -eq('text/plain', mime.lookup('text.txt')); // normal file -eq('text/plain', mime.lookup('TEXT.TXT')); // uppercase -eq('text/plain', mime.lookup('dir/text.txt')); // dir + file -eq('text/plain', mime.lookup('.text.txt')); // hidden file -eq('text/plain', mime.lookup('.txt')); // nameless -eq('text/plain', mime.lookup('txt')); // extension-only -eq('text/plain', mime.lookup('/txt')); // extension-less () -eq('text/plain', mime.lookup('\\txt')); // Windows, extension-less -eq('application/octet-stream', mime.lookup('text.nope')); // unrecognized -eq('fallback', mime.lookup('text.fallback', 'fallback')); // alternate default - -// -// Test extensions -// - -eq('txt', mime.extension(mime.types.text)); -eq('html', mime.extension(mime.types.htm)); -eq('bin', mime.extension('application/octet-stream')); -eq('bin', mime.extension('application/octet-stream ')); -eq('html', mime.extension(' text/html; charset=UTF-8')); -eq('html', mime.extension('text/html; charset=UTF-8 ')); -eq('html', mime.extension('text/html; charset=UTF-8')); -eq('html', mime.extension('text/html ; charset=UTF-8')); -eq('html', mime.extension('text/html;charset=UTF-8')); -eq('html', mime.extension('text/Html;charset=UTF-8')); -eq(undefined, mime.extension('unrecognized')); - -// -// Test node.types lookups -// - -eq('application/font-woff', mime.lookup('file.woff')); -eq('application/octet-stream', mime.lookup('file.buffer')); -eq('audio/mp4', mime.lookup('file.m4a')); -eq('font/opentype', mime.lookup('file.otf')); - -// -// Test charsets -// - -eq('UTF-8', mime.charsets.lookup('text/plain')); -eq(undefined, mime.charsets.lookup(mime.types.js)); -eq('fallback', mime.charsets.lookup('application/octet-stream', 'fallback')); - -// -// Test for overlaps between mime.types and node.types -// - -var apacheTypes = new mime.Mime(), nodeTypes = new mime.Mime(); -apacheTypes.load(path.join(__dirname, 'types/mime.types')); -nodeTypes.load(path.join(__dirname, 'types/node.types')); - -var keys = [].concat(Object.keys(apacheTypes.types)) - .concat(Object.keys(nodeTypes.types)); -keys.sort(); -for (var i = 1; i < keys.length; i++) { - if (keys[i] == keys[i-1]) { - console.warn('Warning: ' + - 'node.types defines ' + keys[i] + '->' + nodeTypes.types[keys[i]] + - ', mime.types defines ' + keys[i] + '->' + apacheTypes.types[keys[i]]); - } -} - -console.log('\nOK'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/types/mime.types b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/types/mime.types deleted file mode 100644 index da8cd691..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/types/mime.types +++ /dev/null @@ -1,1588 +0,0 @@ -# This file maps Internet media types to unique file extension(s). -# Although created for httpd, this file is used by many software systems -# and has been placed in the public domain for unlimited redisribution. -# -# The table below contains both registered and (common) unregistered types. -# A type that has no unique extension can be ignored -- they are listed -# here to guide configurations toward known types and to make it easier to -# identify "new" types. File extensions are also commonly used to indicate -# content languages and encodings, so choose them carefully. -# -# Internet media types should be registered as described in RFC 4288. -# The registry is at <http://www.iana.org/assignments/media-types/>. -# -# MIME type (lowercased) Extensions -# ============================================ ========== -# application/1d-interleaved-parityfec -# application/3gpp-ims+xml -# application/activemessage -application/andrew-inset ez -# application/applefile -application/applixware aw -application/atom+xml atom -application/atomcat+xml atomcat -# application/atomicmail -application/atomsvc+xml atomsvc -# application/auth-policy+xml -# application/batch-smtp -# application/beep+xml -# application/calendar+xml -# application/cals-1840 -# application/ccmp+xml -application/ccxml+xml ccxml -application/cdmi-capability cdmia -application/cdmi-container cdmic -application/cdmi-domain cdmid -application/cdmi-object cdmio -application/cdmi-queue cdmiq -# application/cea-2018+xml -# application/cellml+xml -# application/cfw -# application/cnrp+xml -# application/commonground -# application/conference-info+xml -# application/cpl+xml -# application/csta+xml -# application/cstadata+xml -application/cu-seeme cu -# application/cybercash -application/davmount+xml davmount -# application/dca-rft -# application/dec-dx -# application/dialog-info+xml -# application/dicom -# application/dns -application/docbook+xml dbk -# application/dskpp+xml -application/dssc+der dssc -application/dssc+xml xdssc -# application/dvcs -application/ecmascript ecma -# application/edi-consent -# application/edi-x12 -# application/edifact -application/emma+xml emma -# application/epp+xml -application/epub+zip epub -# application/eshop -# application/example -application/exi exi -# application/fastinfoset -# application/fastsoap -# application/fits -application/font-tdpfr pfr -# application/framework-attributes+xml -application/gml+xml gml -application/gpx+xml gpx -application/gxf gxf -# application/h224 -# application/held+xml -# application/http -application/hyperstudio stk -# application/ibe-key-request+xml -# application/ibe-pkg-reply+xml -# application/ibe-pp-data -# application/iges -# application/im-iscomposing+xml -# application/index -# application/index.cmd -# application/index.obj -# application/index.response -# application/index.vnd -application/inkml+xml ink inkml -# application/iotp -application/ipfix ipfix -# application/ipp -# application/isup -application/java-archive jar -application/java-serialized-object ser -application/java-vm class -application/javascript js -application/json json -application/jsonml+json jsonml -# application/kpml-request+xml -# application/kpml-response+xml -application/lost+xml lostxml -application/mac-binhex40 hqx -application/mac-compactpro cpt -# application/macwriteii -application/mads+xml mads -application/marc mrc -application/marcxml+xml mrcx -application/mathematica ma nb mb -# application/mathml-content+xml -# application/mathml-presentation+xml -application/mathml+xml mathml -# application/mbms-associated-procedure-description+xml -# application/mbms-deregister+xml -# application/mbms-envelope+xml -# application/mbms-msk+xml -# application/mbms-msk-response+xml -# application/mbms-protection-description+xml -# application/mbms-reception-report+xml -# application/mbms-register+xml -# application/mbms-register-response+xml -# application/mbms-user-service-description+xml -application/mbox mbox -# application/media_control+xml -application/mediaservercontrol+xml mscml -application/metalink+xml metalink -application/metalink4+xml meta4 -application/mets+xml mets -# application/mikey -application/mods+xml mods -# application/moss-keys -# application/moss-signature -# application/mosskey-data -# application/mosskey-request -application/mp21 m21 mp21 -application/mp4 mp4s -# application/mpeg4-generic -# application/mpeg4-iod -# application/mpeg4-iod-xmt -# application/msc-ivr+xml -# application/msc-mixer+xml -application/msword doc dot -application/mxf mxf -# application/nasdata -# application/news-checkgroups -# application/news-groupinfo -# application/news-transmission -# application/nss -# application/ocsp-request -# application/ocsp-response -application/octet-stream bin dms lrf mar so dist distz pkg bpk dump elc deploy -application/oda oda -application/oebps-package+xml opf -application/ogg ogx -application/omdoc+xml omdoc -application/onenote onetoc onetoc2 onetmp onepkg -application/oxps oxps -# application/parityfec -application/patch-ops-error+xml xer -application/pdf pdf -application/pgp-encrypted pgp -# application/pgp-keys -application/pgp-signature asc sig -application/pics-rules prf -# application/pidf+xml -# application/pidf-diff+xml -application/pkcs10 p10 -application/pkcs7-mime p7m p7c -application/pkcs7-signature p7s -application/pkcs8 p8 -application/pkix-attr-cert ac -application/pkix-cert cer -application/pkix-crl crl -application/pkix-pkipath pkipath -application/pkixcmp pki -application/pls+xml pls -# application/poc-settings+xml -application/postscript ai eps ps -# application/prs.alvestrand.titrax-sheet -application/prs.cww cww -# application/prs.nprend -# application/prs.plucker -# application/prs.rdf-xml-crypt -# application/prs.xsf+xml -application/pskc+xml pskcxml -# application/qsig -application/rdf+xml rdf -application/reginfo+xml rif -application/relax-ng-compact-syntax rnc -# application/remote-printing -application/resource-lists+xml rl -application/resource-lists-diff+xml rld -# application/riscos -# application/rlmi+xml -application/rls-services+xml rs -application/rpki-ghostbusters gbr -application/rpki-manifest mft -application/rpki-roa roa -# application/rpki-updown -application/rsd+xml rsd -application/rss+xml rss -application/rtf rtf -# application/rtx -# application/samlassertion+xml -# application/samlmetadata+xml -application/sbml+xml sbml -application/scvp-cv-request scq -application/scvp-cv-response scs -application/scvp-vp-request spq -application/scvp-vp-response spp -application/sdp sdp -# application/set-payment -application/set-payment-initiation setpay -# application/set-registration -application/set-registration-initiation setreg -# application/sgml -# application/sgml-open-catalog -application/shf+xml shf -# application/sieve -# application/simple-filter+xml -# application/simple-message-summary -# application/simplesymbolcontainer -# application/slate -# application/smil -application/smil+xml smi smil -# application/soap+fastinfoset -# application/soap+xml -application/sparql-query rq -application/sparql-results+xml srx -# application/spirits-event+xml -application/srgs gram -application/srgs+xml grxml -application/sru+xml sru -application/ssdl+xml ssdl -application/ssml+xml ssml -# application/tamp-apex-update -# application/tamp-apex-update-confirm -# application/tamp-community-update -# application/tamp-community-update-confirm -# application/tamp-error -# application/tamp-sequence-adjust -# application/tamp-sequence-adjust-confirm -# application/tamp-status-query -# application/tamp-status-response -# application/tamp-update -# application/tamp-update-confirm -application/tei+xml tei teicorpus -application/thraud+xml tfi -# application/timestamp-query -# application/timestamp-reply -application/timestamped-data tsd -# application/tve-trigger -# application/ulpfec -# application/vcard+xml -# application/vemmi -# application/vividence.scriptfile -# application/vnd.3gpp.bsf+xml -application/vnd.3gpp.pic-bw-large plb -application/vnd.3gpp.pic-bw-small psb -application/vnd.3gpp.pic-bw-var pvb -# application/vnd.3gpp.sms -# application/vnd.3gpp2.bcmcsinfo+xml -# application/vnd.3gpp2.sms -application/vnd.3gpp2.tcap tcap -application/vnd.3m.post-it-notes pwn -application/vnd.accpac.simply.aso aso -application/vnd.accpac.simply.imp imp -application/vnd.acucobol acu -application/vnd.acucorp atc acutc -application/vnd.adobe.air-application-installer-package+zip air -application/vnd.adobe.formscentral.fcdt fcdt -application/vnd.adobe.fxp fxp fxpl -# application/vnd.adobe.partial-upload -application/vnd.adobe.xdp+xml xdp -application/vnd.adobe.xfdf xfdf -# application/vnd.aether.imp -# application/vnd.ah-barcode -application/vnd.ahead.space ahead -application/vnd.airzip.filesecure.azf azf -application/vnd.airzip.filesecure.azs azs -application/vnd.amazon.ebook azw -application/vnd.americandynamics.acc acc -application/vnd.amiga.ami ami -# application/vnd.amundsen.maze+xml -application/vnd.android.package-archive apk -application/vnd.anser-web-certificate-issue-initiation cii -application/vnd.anser-web-funds-transfer-initiation fti -application/vnd.antix.game-component atx -application/vnd.apple.installer+xml mpkg -application/vnd.apple.mpegurl m3u8 -# application/vnd.arastra.swi -application/vnd.aristanetworks.swi swi -application/vnd.astraea-software.iota iota -application/vnd.audiograph aep -# application/vnd.autopackage -# application/vnd.avistar+xml -application/vnd.blueice.multipass mpm -# application/vnd.bluetooth.ep.oob -application/vnd.bmi bmi -application/vnd.businessobjects rep -# application/vnd.cab-jscript -# application/vnd.canon-cpdl -# application/vnd.canon-lips -# application/vnd.cendio.thinlinc.clientconf -application/vnd.chemdraw+xml cdxml -application/vnd.chipnuts.karaoke-mmd mmd -application/vnd.cinderella cdy -# application/vnd.cirpack.isdn-ext -application/vnd.claymore cla -application/vnd.cloanto.rp9 rp9 -application/vnd.clonk.c4group c4g c4d c4f c4p c4u -application/vnd.cluetrust.cartomobile-config c11amc -application/vnd.cluetrust.cartomobile-config-pkg c11amz -# application/vnd.collection+json -# application/vnd.commerce-battelle -application/vnd.commonspace csp -application/vnd.contact.cmsg cdbcmsg -application/vnd.cosmocaller cmc -application/vnd.crick.clicker clkx -application/vnd.crick.clicker.keyboard clkk -application/vnd.crick.clicker.palette clkp -application/vnd.crick.clicker.template clkt -application/vnd.crick.clicker.wordbank clkw -application/vnd.criticaltools.wbs+xml wbs -application/vnd.ctc-posml pml -# application/vnd.ctct.ws+xml -# application/vnd.cups-pdf -# application/vnd.cups-postscript -application/vnd.cups-ppd ppd -# application/vnd.cups-raster -# application/vnd.cups-raw -# application/vnd.curl -application/vnd.curl.car car -application/vnd.curl.pcurl pcurl -# application/vnd.cybank -application/vnd.dart dart -application/vnd.data-vision.rdz rdz -application/vnd.dece.data uvf uvvf uvd uvvd -application/vnd.dece.ttml+xml uvt uvvt -application/vnd.dece.unspecified uvx uvvx -application/vnd.dece.zip uvz uvvz -application/vnd.denovo.fcselayout-link fe_launch -# application/vnd.dir-bi.plate-dl-nosuffix -application/vnd.dna dna -application/vnd.dolby.mlp mlp -# application/vnd.dolby.mobile.1 -# application/vnd.dolby.mobile.2 -application/vnd.dpgraph dpg -application/vnd.dreamfactory dfac -application/vnd.ds-keypoint kpxx -application/vnd.dvb.ait ait -# application/vnd.dvb.dvbj -# application/vnd.dvb.esgcontainer -# application/vnd.dvb.ipdcdftnotifaccess -# application/vnd.dvb.ipdcesgaccess -# application/vnd.dvb.ipdcesgaccess2 -# application/vnd.dvb.ipdcesgpdd -# application/vnd.dvb.ipdcroaming -# application/vnd.dvb.iptv.alfec-base -# application/vnd.dvb.iptv.alfec-enhancement -# application/vnd.dvb.notif-aggregate-root+xml -# application/vnd.dvb.notif-container+xml -# application/vnd.dvb.notif-generic+xml -# application/vnd.dvb.notif-ia-msglist+xml -# application/vnd.dvb.notif-ia-registration-request+xml -# application/vnd.dvb.notif-ia-registration-response+xml -# application/vnd.dvb.notif-init+xml -# application/vnd.dvb.pfr -application/vnd.dvb.service svc -# application/vnd.dxr -application/vnd.dynageo geo -# application/vnd.easykaraoke.cdgdownload -# application/vnd.ecdis-update -application/vnd.ecowin.chart mag -# application/vnd.ecowin.filerequest -# application/vnd.ecowin.fileupdate -# application/vnd.ecowin.series -# application/vnd.ecowin.seriesrequest -# application/vnd.ecowin.seriesupdate -# application/vnd.emclient.accessrequest+xml -application/vnd.enliven nml -# application/vnd.eprints.data+xml -application/vnd.epson.esf esf -application/vnd.epson.msf msf -application/vnd.epson.quickanime qam -application/vnd.epson.salt slt -application/vnd.epson.ssf ssf -# application/vnd.ericsson.quickcall -application/vnd.eszigno3+xml es3 et3 -# application/vnd.etsi.aoc+xml -# application/vnd.etsi.cug+xml -# application/vnd.etsi.iptvcommand+xml -# application/vnd.etsi.iptvdiscovery+xml -# application/vnd.etsi.iptvprofile+xml -# application/vnd.etsi.iptvsad-bc+xml -# application/vnd.etsi.iptvsad-cod+xml -# application/vnd.etsi.iptvsad-npvr+xml -# application/vnd.etsi.iptvservice+xml -# application/vnd.etsi.iptvsync+xml -# application/vnd.etsi.iptvueprofile+xml -# application/vnd.etsi.mcid+xml -# application/vnd.etsi.overload-control-policy-dataset+xml -# application/vnd.etsi.sci+xml -# application/vnd.etsi.simservs+xml -# application/vnd.etsi.tsl+xml -# application/vnd.etsi.tsl.der -# application/vnd.eudora.data -application/vnd.ezpix-album ez2 -application/vnd.ezpix-package ez3 -# application/vnd.f-secure.mobile -application/vnd.fdf fdf -application/vnd.fdsn.mseed mseed -application/vnd.fdsn.seed seed dataless -# application/vnd.ffsns -# application/vnd.fints -application/vnd.flographit gph -application/vnd.fluxtime.clip ftc -# application/vnd.font-fontforge-sfd -application/vnd.framemaker fm frame maker book -application/vnd.frogans.fnc fnc -application/vnd.frogans.ltf ltf -application/vnd.fsc.weblaunch fsc -application/vnd.fujitsu.oasys oas -application/vnd.fujitsu.oasys2 oa2 -application/vnd.fujitsu.oasys3 oa3 -application/vnd.fujitsu.oasysgp fg5 -application/vnd.fujitsu.oasysprs bh2 -# application/vnd.fujixerox.art-ex -# application/vnd.fujixerox.art4 -# application/vnd.fujixerox.hbpl -application/vnd.fujixerox.ddd ddd -application/vnd.fujixerox.docuworks xdw -application/vnd.fujixerox.docuworks.binder xbd -# application/vnd.fut-misnet -application/vnd.fuzzysheet fzs -application/vnd.genomatix.tuxedo txd -# application/vnd.geocube+xml -application/vnd.geogebra.file ggb -application/vnd.geogebra.tool ggt -application/vnd.geometry-explorer gex gre -application/vnd.geonext gxt -application/vnd.geoplan g2w -application/vnd.geospace g3w -# application/vnd.globalplatform.card-content-mgt -# application/vnd.globalplatform.card-content-mgt-response -application/vnd.gmx gmx -application/vnd.google-earth.kml+xml kml -application/vnd.google-earth.kmz kmz -application/vnd.grafeq gqf gqs -# application/vnd.gridmp -application/vnd.groove-account gac -application/vnd.groove-help ghf -application/vnd.groove-identity-message gim -application/vnd.groove-injector grv -application/vnd.groove-tool-message gtm -application/vnd.groove-tool-template tpl -application/vnd.groove-vcard vcg -# application/vnd.hal+json -application/vnd.hal+xml hal -application/vnd.handheld-entertainment+xml zmm -application/vnd.hbci hbci -# application/vnd.hcl-bireports -application/vnd.hhe.lesson-player les -application/vnd.hp-hpgl hpgl -application/vnd.hp-hpid hpid -application/vnd.hp-hps hps -application/vnd.hp-jlyt jlt -application/vnd.hp-pcl pcl -application/vnd.hp-pclxl pclxl -# application/vnd.httphone -application/vnd.hydrostatix.sof-data sfd-hdstx -# application/vnd.hzn-3d-crossword -# application/vnd.ibm.afplinedata -# application/vnd.ibm.electronic-media -application/vnd.ibm.minipay mpy -application/vnd.ibm.modcap afp listafp list3820 -application/vnd.ibm.rights-management irm -application/vnd.ibm.secure-container sc -application/vnd.iccprofile icc icm -application/vnd.igloader igl -application/vnd.immervision-ivp ivp -application/vnd.immervision-ivu ivu -# application/vnd.informedcontrol.rms+xml -# application/vnd.informix-visionary -# application/vnd.infotech.project -# application/vnd.infotech.project+xml -# application/vnd.innopath.wamp.notification -application/vnd.insors.igm igm -application/vnd.intercon.formnet xpw xpx -application/vnd.intergeo i2g -# application/vnd.intertrust.digibox -# application/vnd.intertrust.nncp -application/vnd.intu.qbo qbo -application/vnd.intu.qfx qfx -# application/vnd.iptc.g2.conceptitem+xml -# application/vnd.iptc.g2.knowledgeitem+xml -# application/vnd.iptc.g2.newsitem+xml -# application/vnd.iptc.g2.newsmessage+xml -# application/vnd.iptc.g2.packageitem+xml -# application/vnd.iptc.g2.planningitem+xml -application/vnd.ipunplugged.rcprofile rcprofile -application/vnd.irepository.package+xml irp -application/vnd.is-xpr xpr -application/vnd.isac.fcs fcs -application/vnd.jam jam -# application/vnd.japannet-directory-service -# application/vnd.japannet-jpnstore-wakeup -# application/vnd.japannet-payment-wakeup -# application/vnd.japannet-registration -# application/vnd.japannet-registration-wakeup -# application/vnd.japannet-setstore-wakeup -# application/vnd.japannet-verification -# application/vnd.japannet-verification-wakeup -application/vnd.jcp.javame.midlet-rms rms -application/vnd.jisp jisp -application/vnd.joost.joda-archive joda -application/vnd.kahootz ktz ktr -application/vnd.kde.karbon karbon -application/vnd.kde.kchart chrt -application/vnd.kde.kformula kfo -application/vnd.kde.kivio flw -application/vnd.kde.kontour kon -application/vnd.kde.kpresenter kpr kpt -application/vnd.kde.kspread ksp -application/vnd.kde.kword kwd kwt -application/vnd.kenameaapp htke -application/vnd.kidspiration kia -application/vnd.kinar kne knp -application/vnd.koan skp skd skt skm -application/vnd.kodak-descriptor sse -application/vnd.las.las+xml lasxml -# application/vnd.liberty-request+xml -application/vnd.llamagraphics.life-balance.desktop lbd -application/vnd.llamagraphics.life-balance.exchange+xml lbe -application/vnd.lotus-1-2-3 123 -application/vnd.lotus-approach apr -application/vnd.lotus-freelance pre -application/vnd.lotus-notes nsf -application/vnd.lotus-organizer org -application/vnd.lotus-screencam scm -application/vnd.lotus-wordpro lwp -application/vnd.macports.portpkg portpkg -# application/vnd.marlin.drm.actiontoken+xml -# application/vnd.marlin.drm.conftoken+xml -# application/vnd.marlin.drm.license+xml -# application/vnd.marlin.drm.mdcf -application/vnd.mcd mcd -application/vnd.medcalcdata mc1 -application/vnd.mediastation.cdkey cdkey -# application/vnd.meridian-slingshot -application/vnd.mfer mwf -application/vnd.mfmp mfm -application/vnd.micrografx.flo flo -application/vnd.micrografx.igx igx -application/vnd.mif mif -# application/vnd.minisoft-hp3000-save -# application/vnd.mitsubishi.misty-guard.trustweb -application/vnd.mobius.daf daf -application/vnd.mobius.dis dis -application/vnd.mobius.mbk mbk -application/vnd.mobius.mqy mqy -application/vnd.mobius.msl msl -application/vnd.mobius.plc plc -application/vnd.mobius.txf txf -application/vnd.mophun.application mpn -application/vnd.mophun.certificate mpc -# application/vnd.motorola.flexsuite -# application/vnd.motorola.flexsuite.adsi -# application/vnd.motorola.flexsuite.fis -# application/vnd.motorola.flexsuite.gotap -# application/vnd.motorola.flexsuite.kmr -# application/vnd.motorola.flexsuite.ttc -# application/vnd.motorola.flexsuite.wem -# application/vnd.motorola.iprm -application/vnd.mozilla.xul+xml xul -application/vnd.ms-artgalry cil -# application/vnd.ms-asf -application/vnd.ms-cab-compressed cab -# application/vnd.ms-color.iccprofile -application/vnd.ms-excel xls xlm xla xlc xlt xlw -application/vnd.ms-excel.addin.macroenabled.12 xlam -application/vnd.ms-excel.sheet.binary.macroenabled.12 xlsb -application/vnd.ms-excel.sheet.macroenabled.12 xlsm -application/vnd.ms-excel.template.macroenabled.12 xltm -application/vnd.ms-fontobject eot -application/vnd.ms-htmlhelp chm -application/vnd.ms-ims ims -application/vnd.ms-lrm lrm -# application/vnd.ms-office.activex+xml -application/vnd.ms-officetheme thmx -# application/vnd.ms-opentype -# application/vnd.ms-package.obfuscated-opentype -application/vnd.ms-pki.seccat cat -application/vnd.ms-pki.stl stl -# application/vnd.ms-playready.initiator+xml -application/vnd.ms-powerpoint ppt pps pot -application/vnd.ms-powerpoint.addin.macroenabled.12 ppam -application/vnd.ms-powerpoint.presentation.macroenabled.12 pptm -application/vnd.ms-powerpoint.slide.macroenabled.12 sldm -application/vnd.ms-powerpoint.slideshow.macroenabled.12 ppsm -application/vnd.ms-powerpoint.template.macroenabled.12 potm -# application/vnd.ms-printing.printticket+xml -application/vnd.ms-project mpp mpt -# application/vnd.ms-tnef -# application/vnd.ms-wmdrm.lic-chlg-req -# application/vnd.ms-wmdrm.lic-resp -# application/vnd.ms-wmdrm.meter-chlg-req -# application/vnd.ms-wmdrm.meter-resp -application/vnd.ms-word.document.macroenabled.12 docm -application/vnd.ms-word.template.macroenabled.12 dotm -application/vnd.ms-works wps wks wcm wdb -application/vnd.ms-wpl wpl -application/vnd.ms-xpsdocument xps -application/vnd.mseq mseq -# application/vnd.msign -# application/vnd.multiad.creator -# application/vnd.multiad.creator.cif -# application/vnd.music-niff -application/vnd.musician mus -application/vnd.muvee.style msty -application/vnd.mynfc taglet -# application/vnd.ncd.control -# application/vnd.ncd.reference -# application/vnd.nervana -# application/vnd.netfpx -application/vnd.neurolanguage.nlu nlu -application/vnd.nitf ntf nitf -application/vnd.noblenet-directory nnd -application/vnd.noblenet-sealer nns -application/vnd.noblenet-web nnw -# application/vnd.nokia.catalogs -# application/vnd.nokia.conml+wbxml -# application/vnd.nokia.conml+xml -# application/vnd.nokia.isds-radio-presets -# application/vnd.nokia.iptv.config+xml -# application/vnd.nokia.landmark+wbxml -# application/vnd.nokia.landmark+xml -# application/vnd.nokia.landmarkcollection+xml -# application/vnd.nokia.n-gage.ac+xml -application/vnd.nokia.n-gage.data ngdat -application/vnd.nokia.n-gage.symbian.install n-gage -# application/vnd.nokia.ncd -# application/vnd.nokia.pcd+wbxml -# application/vnd.nokia.pcd+xml -application/vnd.nokia.radio-preset rpst -application/vnd.nokia.radio-presets rpss -application/vnd.novadigm.edm edm -application/vnd.novadigm.edx edx -application/vnd.novadigm.ext ext -# application/vnd.ntt-local.file-transfer -# application/vnd.ntt-local.sip-ta_remote -# application/vnd.ntt-local.sip-ta_tcp_stream -application/vnd.oasis.opendocument.chart odc -application/vnd.oasis.opendocument.chart-template otc -application/vnd.oasis.opendocument.database odb -application/vnd.oasis.opendocument.formula odf -application/vnd.oasis.opendocument.formula-template odft -application/vnd.oasis.opendocument.graphics odg -application/vnd.oasis.opendocument.graphics-template otg -application/vnd.oasis.opendocument.image odi -application/vnd.oasis.opendocument.image-template oti -application/vnd.oasis.opendocument.presentation odp -application/vnd.oasis.opendocument.presentation-template otp -application/vnd.oasis.opendocument.spreadsheet ods -application/vnd.oasis.opendocument.spreadsheet-template ots -application/vnd.oasis.opendocument.text odt -application/vnd.oasis.opendocument.text-master odm -application/vnd.oasis.opendocument.text-template ott -application/vnd.oasis.opendocument.text-web oth -# application/vnd.obn -# application/vnd.oftn.l10n+json -# application/vnd.oipf.contentaccessdownload+xml -# application/vnd.oipf.contentaccessstreaming+xml -# application/vnd.oipf.cspg-hexbinary -# application/vnd.oipf.dae.svg+xml -# application/vnd.oipf.dae.xhtml+xml -# application/vnd.oipf.mippvcontrolmessage+xml -# application/vnd.oipf.pae.gem -# application/vnd.oipf.spdiscovery+xml -# application/vnd.oipf.spdlist+xml -# application/vnd.oipf.ueprofile+xml -# application/vnd.oipf.userprofile+xml -application/vnd.olpc-sugar xo -# application/vnd.oma-scws-config -# application/vnd.oma-scws-http-request -# application/vnd.oma-scws-http-response -# application/vnd.oma.bcast.associated-procedure-parameter+xml -# application/vnd.oma.bcast.drm-trigger+xml -# application/vnd.oma.bcast.imd+xml -# application/vnd.oma.bcast.ltkm -# application/vnd.oma.bcast.notification+xml -# application/vnd.oma.bcast.provisioningtrigger -# application/vnd.oma.bcast.sgboot -# application/vnd.oma.bcast.sgdd+xml -# application/vnd.oma.bcast.sgdu -# application/vnd.oma.bcast.simple-symbol-container -# application/vnd.oma.bcast.smartcard-trigger+xml -# application/vnd.oma.bcast.sprov+xml -# application/vnd.oma.bcast.stkm -# application/vnd.oma.cab-address-book+xml -# application/vnd.oma.cab-feature-handler+xml -# application/vnd.oma.cab-pcc+xml -# application/vnd.oma.cab-user-prefs+xml -# application/vnd.oma.dcd -# application/vnd.oma.dcdc -application/vnd.oma.dd2+xml dd2 -# application/vnd.oma.drm.risd+xml -# application/vnd.oma.group-usage-list+xml -# application/vnd.oma.pal+xml -# application/vnd.oma.poc.detailed-progress-report+xml -# application/vnd.oma.poc.final-report+xml -# application/vnd.oma.poc.groups+xml -# application/vnd.oma.poc.invocation-descriptor+xml -# application/vnd.oma.poc.optimized-progress-report+xml -# application/vnd.oma.push -# application/vnd.oma.scidm.messages+xml -# application/vnd.oma.xcap-directory+xml -# application/vnd.omads-email+xml -# application/vnd.omads-file+xml -# application/vnd.omads-folder+xml -# application/vnd.omaloc-supl-init -application/vnd.openofficeorg.extension oxt -# application/vnd.openxmlformats-officedocument.custom-properties+xml -# application/vnd.openxmlformats-officedocument.customxmlproperties+xml -# application/vnd.openxmlformats-officedocument.drawing+xml -# application/vnd.openxmlformats-officedocument.drawingml.chart+xml -# application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml -# application/vnd.openxmlformats-officedocument.extended-properties+xml -# application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml -# application/vnd.openxmlformats-officedocument.presentationml.comments+xml -# application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml -# application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml -# application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml -application/vnd.openxmlformats-officedocument.presentationml.presentation pptx -# application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.presprops+xml -application/vnd.openxmlformats-officedocument.presentationml.slide sldx -# application/vnd.openxmlformats-officedocument.presentationml.slide+xml -# application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml -# application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml -application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx -# application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml -# application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml -# application/vnd.openxmlformats-officedocument.presentationml.tags+xml -application/vnd.openxmlformats-officedocument.presentationml.template potx -# application/vnd.openxmlformats-officedocument.presentationml.template.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx -# application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx -# application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml -# application/vnd.openxmlformats-officedocument.theme+xml -# application/vnd.openxmlformats-officedocument.themeoverride+xml -# application/vnd.openxmlformats-officedocument.vmldrawing -# application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.document docx -# application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx -# application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml -# application/vnd.openxmlformats-package.core-properties+xml -# application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml -# application/vnd.openxmlformats-package.relationships+xml -# application/vnd.quobject-quoxdocument -# application/vnd.osa.netdeploy -application/vnd.osgeo.mapguide.package mgp -# application/vnd.osgi.bundle -application/vnd.osgi.dp dp -application/vnd.osgi.subsystem esa -# application/vnd.otps.ct-kip+xml -application/vnd.palm pdb pqa oprc -# application/vnd.paos.xml -application/vnd.pawaafile paw -application/vnd.pg.format str -application/vnd.pg.osasli ei6 -# application/vnd.piaccess.application-licence -application/vnd.picsel efif -application/vnd.pmi.widget wg -# application/vnd.poc.group-advertisement+xml -application/vnd.pocketlearn plf -application/vnd.powerbuilder6 pbd -# application/vnd.powerbuilder6-s -# application/vnd.powerbuilder7 -# application/vnd.powerbuilder7-s -# application/vnd.powerbuilder75 -# application/vnd.powerbuilder75-s -# application/vnd.preminet -application/vnd.previewsystems.box box -application/vnd.proteus.magazine mgz -application/vnd.publishare-delta-tree qps -application/vnd.pvi.ptid1 ptid -# application/vnd.pwg-multiplexed -# application/vnd.pwg-xhtml-print+xml -# application/vnd.qualcomm.brew-app-res -application/vnd.quark.quarkxpress qxd qxt qwd qwt qxl qxb -# application/vnd.radisys.moml+xml -# application/vnd.radisys.msml+xml -# application/vnd.radisys.msml-audit+xml -# application/vnd.radisys.msml-audit-conf+xml -# application/vnd.radisys.msml-audit-conn+xml -# application/vnd.radisys.msml-audit-dialog+xml -# application/vnd.radisys.msml-audit-stream+xml -# application/vnd.radisys.msml-conf+xml -# application/vnd.radisys.msml-dialog+xml -# application/vnd.radisys.msml-dialog-base+xml -# application/vnd.radisys.msml-dialog-fax-detect+xml -# application/vnd.radisys.msml-dialog-fax-sendrecv+xml -# application/vnd.radisys.msml-dialog-group+xml -# application/vnd.radisys.msml-dialog-speech+xml -# application/vnd.radisys.msml-dialog-transform+xml -# application/vnd.rainstor.data -# application/vnd.rapid -application/vnd.realvnc.bed bed -application/vnd.recordare.musicxml mxl -application/vnd.recordare.musicxml+xml musicxml -# application/vnd.renlearn.rlprint -application/vnd.rig.cryptonote cryptonote -application/vnd.rim.cod cod -application/vnd.rn-realmedia rm -application/vnd.rn-realmedia-vbr rmvb -application/vnd.route66.link66+xml link66 -# application/vnd.rs-274x -# application/vnd.ruckus.download -# application/vnd.s3sms -application/vnd.sailingtracker.track st -# application/vnd.sbm.cid -# application/vnd.sbm.mid2 -# application/vnd.scribus -# application/vnd.sealed.3df -# application/vnd.sealed.csf -# application/vnd.sealed.doc -# application/vnd.sealed.eml -# application/vnd.sealed.mht -# application/vnd.sealed.net -# application/vnd.sealed.ppt -# application/vnd.sealed.tiff -# application/vnd.sealed.xls -# application/vnd.sealedmedia.softseal.html -# application/vnd.sealedmedia.softseal.pdf -application/vnd.seemail see -application/vnd.sema sema -application/vnd.semd semd -application/vnd.semf semf -application/vnd.shana.informed.formdata ifm -application/vnd.shana.informed.formtemplate itp -application/vnd.shana.informed.interchange iif -application/vnd.shana.informed.package ipk -application/vnd.simtech-mindmapper twd twds -application/vnd.smaf mmf -# application/vnd.smart.notebook -application/vnd.smart.teacher teacher -# application/vnd.software602.filler.form+xml -# application/vnd.software602.filler.form-xml-zip -application/vnd.solent.sdkm+xml sdkm sdkd -application/vnd.spotfire.dxp dxp -application/vnd.spotfire.sfs sfs -# application/vnd.sss-cod -# application/vnd.sss-dtf -# application/vnd.sss-ntf -application/vnd.stardivision.calc sdc -application/vnd.stardivision.draw sda -application/vnd.stardivision.impress sdd -application/vnd.stardivision.math smf -application/vnd.stardivision.writer sdw vor -application/vnd.stardivision.writer-global sgl -application/vnd.stepmania.package smzip -application/vnd.stepmania.stepchart sm -# application/vnd.street-stream -application/vnd.sun.xml.calc sxc -application/vnd.sun.xml.calc.template stc -application/vnd.sun.xml.draw sxd -application/vnd.sun.xml.draw.template std -application/vnd.sun.xml.impress sxi -application/vnd.sun.xml.impress.template sti -application/vnd.sun.xml.math sxm -application/vnd.sun.xml.writer sxw -application/vnd.sun.xml.writer.global sxg -application/vnd.sun.xml.writer.template stw -# application/vnd.sun.wadl+xml -application/vnd.sus-calendar sus susp -application/vnd.svd svd -# application/vnd.swiftview-ics -application/vnd.symbian.install sis sisx -application/vnd.syncml+xml xsm -application/vnd.syncml.dm+wbxml bdm -application/vnd.syncml.dm+xml xdm -# application/vnd.syncml.dm.notification -# application/vnd.syncml.ds.notification -application/vnd.tao.intent-module-archive tao -application/vnd.tcpdump.pcap pcap cap dmp -application/vnd.tmobile-livetv tmo -application/vnd.trid.tpt tpt -application/vnd.triscape.mxs mxs -application/vnd.trueapp tra -# application/vnd.truedoc -# application/vnd.ubisoft.webplayer -application/vnd.ufdl ufd ufdl -application/vnd.uiq.theme utz -application/vnd.umajin umj -application/vnd.unity unityweb -application/vnd.uoml+xml uoml -# application/vnd.uplanet.alert -# application/vnd.uplanet.alert-wbxml -# application/vnd.uplanet.bearer-choice -# application/vnd.uplanet.bearer-choice-wbxml -# application/vnd.uplanet.cacheop -# application/vnd.uplanet.cacheop-wbxml -# application/vnd.uplanet.channel -# application/vnd.uplanet.channel-wbxml -# application/vnd.uplanet.list -# application/vnd.uplanet.list-wbxml -# application/vnd.uplanet.listcmd -# application/vnd.uplanet.listcmd-wbxml -# application/vnd.uplanet.signal -application/vnd.vcx vcx -# application/vnd.vd-study -# application/vnd.vectorworks -# application/vnd.verimatrix.vcas -# application/vnd.vidsoft.vidconference -application/vnd.visio vsd vst vss vsw -application/vnd.visionary vis -# application/vnd.vividence.scriptfile -application/vnd.vsf vsf -# application/vnd.wap.sic -# application/vnd.wap.slc -application/vnd.wap.wbxml wbxml -application/vnd.wap.wmlc wmlc -application/vnd.wap.wmlscriptc wmlsc -application/vnd.webturbo wtb -# application/vnd.wfa.wsc -# application/vnd.wmc -# application/vnd.wmf.bootstrap -# application/vnd.wolfram.mathematica -# application/vnd.wolfram.mathematica.package -application/vnd.wolfram.player nbp -application/vnd.wordperfect wpd -application/vnd.wqd wqd -# application/vnd.wrq-hp3000-labelled -application/vnd.wt.stf stf -# application/vnd.wv.csp+wbxml -# application/vnd.wv.csp+xml -# application/vnd.wv.ssp+xml -application/vnd.xara xar -application/vnd.xfdl xfdl -# application/vnd.xfdl.webform -# application/vnd.xmi+xml -# application/vnd.xmpie.cpkg -# application/vnd.xmpie.dpkg -# application/vnd.xmpie.plan -# application/vnd.xmpie.ppkg -# application/vnd.xmpie.xlim -application/vnd.yamaha.hv-dic hvd -application/vnd.yamaha.hv-script hvs -application/vnd.yamaha.hv-voice hvp -application/vnd.yamaha.openscoreformat osf -application/vnd.yamaha.openscoreformat.osfpvg+xml osfpvg -# application/vnd.yamaha.remote-setup -application/vnd.yamaha.smaf-audio saf -application/vnd.yamaha.smaf-phrase spf -# application/vnd.yamaha.through-ngn -# application/vnd.yamaha.tunnel-udpencap -application/vnd.yellowriver-custom-menu cmp -application/vnd.zul zir zirz -application/vnd.zzazz.deck+xml zaz -application/voicexml+xml vxml -# application/vq-rtcpxr -# application/watcherinfo+xml -# application/whoispp-query -# application/whoispp-response -application/widget wgt -application/winhlp hlp -# application/wita -# application/wordperfect5.1 -application/wsdl+xml wsdl -application/wspolicy+xml wspolicy -application/x-7z-compressed 7z -application/x-abiword abw -application/x-ace-compressed ace -# application/x-amf -application/x-apple-diskimage dmg -application/x-authorware-bin aab x32 u32 vox -application/x-authorware-map aam -application/x-authorware-seg aas -application/x-bcpio bcpio -application/x-bittorrent torrent -application/x-blorb blb blorb -application/x-bzip bz -application/x-bzip2 bz2 boz -application/x-cbr cbr cba cbt cbz cb7 -application/x-cdlink vcd -application/x-cfs-compressed cfs -application/x-chat chat -application/x-chess-pgn pgn -application/x-conference nsc -# application/x-compress -application/x-cpio cpio -application/x-csh csh -application/x-debian-package deb udeb -application/x-dgc-compressed dgc -application/x-director dir dcr dxr cst cct cxt w3d fgd swa -application/x-doom wad -application/x-dtbncx+xml ncx -application/x-dtbook+xml dtb -application/x-dtbresource+xml res -application/x-dvi dvi -application/x-envoy evy -application/x-eva eva -application/x-font-bdf bdf -# application/x-font-dos -# application/x-font-framemaker -application/x-font-ghostscript gsf -# application/x-font-libgrx -application/x-font-linux-psf psf -application/x-font-otf otf -application/x-font-pcf pcf -application/x-font-snf snf -# application/x-font-speedo -# application/x-font-sunos-news -application/x-font-ttf ttf ttc -application/x-font-type1 pfa pfb pfm afm -application/font-woff woff -# application/x-font-vfont -application/x-freearc arc -application/x-futuresplash spl -application/x-gca-compressed gca -application/x-glulx ulx -application/x-gnumeric gnumeric -application/x-gramps-xml gramps -application/x-gtar gtar -# application/x-gzip -application/x-hdf hdf -application/x-install-instructions install -application/x-iso9660-image iso -application/x-java-jnlp-file jnlp -application/x-latex latex -application/x-lzh-compressed lzh lha -application/x-mie mie -application/x-mobipocket-ebook prc mobi -application/x-ms-application application -application/x-ms-shortcut lnk -application/x-ms-wmd wmd -application/x-ms-wmz wmz -application/x-ms-xbap xbap -application/x-msaccess mdb -application/x-msbinder obd -application/x-mscardfile crd -application/x-msclip clp -application/x-msdownload exe dll com bat msi -application/x-msmediaview mvb m13 m14 -application/x-msmetafile wmf wmz emf emz -application/x-msmoney mny -application/x-mspublisher pub -application/x-msschedule scd -application/x-msterminal trm -application/x-mswrite wri -application/x-netcdf nc cdf -application/x-nzb nzb -application/x-pkcs12 p12 pfx -application/x-pkcs7-certificates p7b spc -application/x-pkcs7-certreqresp p7r -application/x-rar-compressed rar -application/x-research-info-systems ris -application/x-sh sh -application/x-shar shar -application/x-shockwave-flash swf -application/x-silverlight-app xap -application/x-sql sql -application/x-stuffit sit -application/x-stuffitx sitx -application/x-subrip srt -application/x-sv4cpio sv4cpio -application/x-sv4crc sv4crc -application/x-t3vm-image t3 -application/x-tads gam -application/x-tar tar -application/x-tcl tcl -application/x-tex tex -application/x-tex-tfm tfm -application/x-texinfo texinfo texi -application/x-tgif obj -application/x-ustar ustar -application/x-wais-source src -application/x-x509-ca-cert der crt -application/x-xfig fig -application/x-xliff+xml xlf -application/x-xpinstall xpi -application/x-xz xz -application/x-zmachine z1 z2 z3 z4 z5 z6 z7 z8 -# application/x400-bp -application/xaml+xml xaml -# application/xcap-att+xml -# application/xcap-caps+xml -application/xcap-diff+xml xdf -# application/xcap-el+xml -# application/xcap-error+xml -# application/xcap-ns+xml -# application/xcon-conference-info-diff+xml -# application/xcon-conference-info+xml -application/xenc+xml xenc -application/xhtml+xml xhtml xht -# application/xhtml-voice+xml -application/xml xml xsl -application/xml-dtd dtd -# application/xml-external-parsed-entity -# application/xmpp+xml -application/xop+xml xop -application/xproc+xml xpl -application/xslt+xml xslt -application/xspf+xml xspf -application/xv+xml mxml xhvml xvml xvm -application/yang yang -application/yin+xml yin -application/zip zip -# audio/1d-interleaved-parityfec -# audio/32kadpcm -# audio/3gpp -# audio/3gpp2 -# audio/ac3 -audio/adpcm adp -# audio/amr -# audio/amr-wb -# audio/amr-wb+ -# audio/asc -# audio/atrac-advanced-lossless -# audio/atrac-x -# audio/atrac3 -audio/basic au snd -# audio/bv16 -# audio/bv32 -# audio/clearmode -# audio/cn -# audio/dat12 -# audio/dls -# audio/dsr-es201108 -# audio/dsr-es202050 -# audio/dsr-es202211 -# audio/dsr-es202212 -# audio/dv -# audio/dvi4 -# audio/eac3 -# audio/evrc -# audio/evrc-qcp -# audio/evrc0 -# audio/evrc1 -# audio/evrcb -# audio/evrcb0 -# audio/evrcb1 -# audio/evrcwb -# audio/evrcwb0 -# audio/evrcwb1 -# audio/example -# audio/fwdred -# audio/g719 -# audio/g722 -# audio/g7221 -# audio/g723 -# audio/g726-16 -# audio/g726-24 -# audio/g726-32 -# audio/g726-40 -# audio/g728 -# audio/g729 -# audio/g7291 -# audio/g729d -# audio/g729e -# audio/gsm -# audio/gsm-efr -# audio/gsm-hr-08 -# audio/ilbc -# audio/ip-mr_v2.5 -# audio/isac -# audio/l16 -# audio/l20 -# audio/l24 -# audio/l8 -# audio/lpc -audio/midi mid midi kar rmi -# audio/mobile-xmf -audio/mp4 mp4a -# audio/mp4a-latm -# audio/mpa -# audio/mpa-robust -audio/mpeg mpga mp2 mp2a mp3 m2a m3a -# audio/mpeg4-generic -# audio/musepack -audio/ogg oga ogg spx -# audio/opus -# audio/parityfec -# audio/pcma -# audio/pcma-wb -# audio/pcmu-wb -# audio/pcmu -# audio/prs.sid -# audio/qcelp -# audio/red -# audio/rtp-enc-aescm128 -# audio/rtp-midi -# audio/rtx -audio/s3m s3m -audio/silk sil -# audio/smv -# audio/smv0 -# audio/smv-qcp -# audio/sp-midi -# audio/speex -# audio/t140c -# audio/t38 -# audio/telephone-event -# audio/tone -# audio/uemclip -# audio/ulpfec -# audio/vdvi -# audio/vmr-wb -# audio/vnd.3gpp.iufp -# audio/vnd.4sb -# audio/vnd.audiokoz -# audio/vnd.celp -# audio/vnd.cisco.nse -# audio/vnd.cmles.radio-events -# audio/vnd.cns.anp1 -# audio/vnd.cns.inf1 -audio/vnd.dece.audio uva uvva -audio/vnd.digital-winds eol -# audio/vnd.dlna.adts -# audio/vnd.dolby.heaac.1 -# audio/vnd.dolby.heaac.2 -# audio/vnd.dolby.mlp -# audio/vnd.dolby.mps -# audio/vnd.dolby.pl2 -# audio/vnd.dolby.pl2x -# audio/vnd.dolby.pl2z -# audio/vnd.dolby.pulse.1 -audio/vnd.dra dra -audio/vnd.dts dts -audio/vnd.dts.hd dtshd -# audio/vnd.dvb.file -# audio/vnd.everad.plj -# audio/vnd.hns.audio -audio/vnd.lucent.voice lvp -audio/vnd.ms-playready.media.pya pya -# audio/vnd.nokia.mobile-xmf -# audio/vnd.nortel.vbk -audio/vnd.nuera.ecelp4800 ecelp4800 -audio/vnd.nuera.ecelp7470 ecelp7470 -audio/vnd.nuera.ecelp9600 ecelp9600 -# audio/vnd.octel.sbc -# audio/vnd.qcelp -# audio/vnd.rhetorex.32kadpcm -audio/vnd.rip rip -# audio/vnd.sealedmedia.softseal.mpeg -# audio/vnd.vmx.cvsd -# audio/vorbis -# audio/vorbis-config -audio/webm weba -audio/x-aac aac -audio/x-aiff aif aiff aifc -audio/x-caf caf -audio/x-flac flac -audio/x-matroska mka -audio/x-mpegurl m3u -audio/x-ms-wax wax -audio/x-ms-wma wma -audio/x-pn-realaudio ram ra -audio/x-pn-realaudio-plugin rmp -# audio/x-tta -audio/x-wav wav -audio/xm xm -chemical/x-cdx cdx -chemical/x-cif cif -chemical/x-cmdf cmdf -chemical/x-cml cml -chemical/x-csml csml -# chemical/x-pdb -chemical/x-xyz xyz -image/bmp bmp -image/cgm cgm -# image/example -# image/fits -image/g3fax g3 -image/gif gif -image/ief ief -# image/jp2 -image/jpeg jpeg jpg jpe -# image/jpm -# image/jpx -image/ktx ktx -# image/naplps -image/png png -image/prs.btif btif -# image/prs.pti -image/sgi sgi -image/svg+xml svg svgz -# image/t38 -image/tiff tiff tif -# image/tiff-fx -image/vnd.adobe.photoshop psd -# image/vnd.cns.inf2 -image/vnd.dece.graphic uvi uvvi uvg uvvg -image/vnd.dvb.subtitle sub -image/vnd.djvu djvu djv -image/vnd.dwg dwg -image/vnd.dxf dxf -image/vnd.fastbidsheet fbs -image/vnd.fpx fpx -image/vnd.fst fst -image/vnd.fujixerox.edmics-mmr mmr -image/vnd.fujixerox.edmics-rlc rlc -# image/vnd.globalgraphics.pgb -# image/vnd.microsoft.icon -# image/vnd.mix -image/vnd.ms-modi mdi -image/vnd.ms-photo wdp -image/vnd.net-fpx npx -# image/vnd.radiance -# image/vnd.sealed.png -# image/vnd.sealedmedia.softseal.gif -# image/vnd.sealedmedia.softseal.jpg -# image/vnd.svf -image/vnd.wap.wbmp wbmp -image/vnd.xiff xif -image/webp webp -image/x-3ds 3ds -image/x-cmu-raster ras -image/x-cmx cmx -image/x-freehand fh fhc fh4 fh5 fh7 -image/x-icon ico -image/x-mrsid-image sid -image/x-pcx pcx -image/x-pict pic pct -image/x-portable-anymap pnm -image/x-portable-bitmap pbm -image/x-portable-graymap pgm -image/x-portable-pixmap ppm -image/x-rgb rgb -image/x-tga tga -image/x-xbitmap xbm -image/x-xpixmap xpm -image/x-xwindowdump xwd -# message/cpim -# message/delivery-status -# message/disposition-notification -# message/example -# message/external-body -# message/feedback-report -# message/global -# message/global-delivery-status -# message/global-disposition-notification -# message/global-headers -# message/http -# message/imdn+xml -# message/news -# message/partial -message/rfc822 eml mime -# message/s-http -# message/sip -# message/sipfrag -# message/tracking-status -# message/vnd.si.simp -# model/example -model/iges igs iges -model/mesh msh mesh silo -model/vnd.collada+xml dae -model/vnd.dwf dwf -# model/vnd.flatland.3dml -model/vnd.gdl gdl -# model/vnd.gs-gdl -# model/vnd.gs.gdl -model/vnd.gtw gtw -# model/vnd.moml+xml -model/vnd.mts mts -# model/vnd.parasolid.transmit.binary -# model/vnd.parasolid.transmit.text -model/vnd.vtu vtu -model/vrml wrl vrml -model/x3d+binary x3db x3dbz -model/x3d+vrml x3dv x3dvz -model/x3d+xml x3d x3dz -# multipart/alternative -# multipart/appledouble -# multipart/byteranges -# multipart/digest -# multipart/encrypted -# multipart/example -# multipart/form-data -# multipart/header-set -# multipart/mixed -# multipart/parallel -# multipart/related -# multipart/report -# multipart/signed -# multipart/voice-message -# text/1d-interleaved-parityfec -text/cache-manifest appcache -text/calendar ics ifb -text/css css -text/csv csv -# text/directory -# text/dns -# text/ecmascript -# text/enriched -# text/example -# text/fwdred -text/html html htm -# text/javascript -text/n3 n3 -# text/parityfec -text/plain txt text conf def list log in -# text/prs.fallenstein.rst -text/prs.lines.tag dsc -# text/vnd.radisys.msml-basic-layout -# text/red -# text/rfc822-headers -text/richtext rtx -# text/rtf -# text/rtp-enc-aescm128 -# text/rtx -text/sgml sgml sgm -# text/t140 -text/tab-separated-values tsv -text/troff t tr roff man me ms -text/turtle ttl -# text/ulpfec -text/uri-list uri uris urls -text/vcard vcard -# text/vnd.abc -text/vnd.curl curl -text/vnd.curl.dcurl dcurl -text/vnd.curl.scurl scurl -text/vnd.curl.mcurl mcurl -# text/vnd.dmclientscript -text/vnd.dvb.subtitle sub -# text/vnd.esmertec.theme-descriptor -text/vnd.fly fly -text/vnd.fmi.flexstor flx -text/vnd.graphviz gv -text/vnd.in3d.3dml 3dml -text/vnd.in3d.spot spot -# text/vnd.iptc.newsml -# text/vnd.iptc.nitf -# text/vnd.latex-z -# text/vnd.motorola.reflex -# text/vnd.ms-mediapackage -# text/vnd.net2phone.commcenter.command -# text/vnd.si.uricatalogue -text/vnd.sun.j2me.app-descriptor jad -# text/vnd.trolltech.linguist -# text/vnd.wap.si -# text/vnd.wap.sl -text/vnd.wap.wml wml -text/vnd.wap.wmlscript wmls -text/x-asm s asm -text/x-c c cc cxx cpp h hh dic -text/x-fortran f for f77 f90 -text/x-java-source java -text/x-opml opml -text/x-pascal p pas -text/x-nfo nfo -text/x-setext etx -text/x-sfv sfv -text/x-uuencode uu -text/x-vcalendar vcs -text/x-vcard vcf -# text/xml -# text/xml-external-parsed-entity -# video/1d-interleaved-parityfec -video/3gpp 3gp -# video/3gpp-tt -video/3gpp2 3g2 -# video/bmpeg -# video/bt656 -# video/celb -# video/dv -# video/example -video/h261 h261 -video/h263 h263 -# video/h263-1998 -# video/h263-2000 -video/h264 h264 -# video/h264-rcdo -# video/h264-svc -video/jpeg jpgv -# video/jpeg2000 -video/jpm jpm jpgm -video/mj2 mj2 mjp2 -# video/mp1s -# video/mp2p -# video/mp2t -video/mp4 mp4 mp4v mpg4 -# video/mp4v-es -video/mpeg mpeg mpg mpe m1v m2v -# video/mpeg4-generic -# video/mpv -# video/nv -video/ogg ogv -# video/parityfec -# video/pointer -video/quicktime qt mov -# video/raw -# video/rtp-enc-aescm128 -# video/rtx -# video/smpte292m -# video/ulpfec -# video/vc1 -# video/vnd.cctv -video/vnd.dece.hd uvh uvvh -video/vnd.dece.mobile uvm uvvm -# video/vnd.dece.mp4 -video/vnd.dece.pd uvp uvvp -video/vnd.dece.sd uvs uvvs -video/vnd.dece.video uvv uvvv -# video/vnd.directv.mpeg -# video/vnd.directv.mpeg-tts -# video/vnd.dlna.mpeg-tts -video/vnd.dvb.file dvb -video/vnd.fvt fvt -# video/vnd.hns.video -# video/vnd.iptvforum.1dparityfec-1010 -# video/vnd.iptvforum.1dparityfec-2005 -# video/vnd.iptvforum.2dparityfec-1010 -# video/vnd.iptvforum.2dparityfec-2005 -# video/vnd.iptvforum.ttsavc -# video/vnd.iptvforum.ttsmpeg2 -# video/vnd.motorola.video -# video/vnd.motorola.videop -video/vnd.mpegurl mxu m4u -video/vnd.ms-playready.media.pyv pyv -# video/vnd.nokia.interleaved-multimedia -# video/vnd.nokia.videovoip -# video/vnd.objectvideo -# video/vnd.sealed.mpeg1 -# video/vnd.sealed.mpeg4 -# video/vnd.sealed.swf -# video/vnd.sealedmedia.softseal.mov -video/vnd.uvvu.mp4 uvu uvvu -video/vnd.vivo viv -video/webm webm -video/x-f4v f4v -video/x-fli fli -video/x-flv flv -video/x-m4v m4v -video/x-matroska mkv mk3d mks -video/x-mng mng -video/x-ms-asf asf asx -video/x-ms-vob vob -video/x-ms-wm wm -video/x-ms-wmv wmv -video/x-ms-wmx wmx -video/x-ms-wvx wvx -video/x-msvideo avi -video/x-sgi-movie movie -video/x-smv smv -x-conference/x-cooltalk ice diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/types/node.types b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/types/node.types deleted file mode 100644 index 55b2cf79..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/types/node.types +++ /dev/null @@ -1,77 +0,0 @@ -# What: WebVTT -# Why: To allow formats intended for marking up external text track resources. -# http://dev.w3.org/html5/webvtt/ -# Added by: niftylettuce -text/vtt vtt - -# What: Google Chrome Extension -# Why: To allow apps to (work) be served with the right content type header. -# http://codereview.chromium.org/2830017 -# Added by: niftylettuce -application/x-chrome-extension crx - -# What: HTC support -# Why: To properly render .htc files such as CSS3PIE -# Added by: niftylettuce -text/x-component htc - -# What: HTML5 application cache manifes ('.manifest' extension) -# Why: De-facto standard. Required by Mozilla browser when serving HTML5 apps -# per https://developer.mozilla.org/en/offline_resources_in_firefox -# Added by: louisremi -text/cache-manifest manifest - -# What: node binary buffer format -# Why: semi-standard extension w/in the node community -# Added by: tootallnate -application/octet-stream buffer - -# What: The "protected" MP-4 formats used by iTunes. -# Why: Required for streaming music to browsers (?) -# Added by: broofa -application/mp4 m4p -audio/mp4 m4a - -# What: Video format, Part of RFC1890 -# Why: See https://github.com/bentomas/node-mime/pull/6 -# Added by: mjrusso -video/MP2T ts - -# What: EventSource mime type -# Why: mime type of Server-Sent Events stream -# http://www.w3.org/TR/eventsource/#text-event-stream -# Added by: francois2metz -text/event-stream event-stream - -# What: Mozilla App manifest mime type -# Why: https://developer.mozilla.org/en/Apps/Manifest#Serving_manifests -# Added by: ednapiranha -application/x-web-app-manifest+json webapp - -# What: Lua file types -# Why: Googling around shows de-facto consensus on these -# Added by: creationix (Issue #45) -text/x-lua lua -application/x-lua-bytecode luac - -# What: Markdown files, as per http://daringfireball.net/projects/markdown/syntax -# Why: http://stackoverflow.com/questions/10701983/what-is-the-mime-type-for-markdown -# Added by: avoidwork -text/x-markdown markdown md mkd - -# What: ini files -# Why: because they're just text files -# Added by: Matthew Kastor -text/plain ini - -# What: DASH Adaptive Streaming manifest -# Why: https://developer.mozilla.org/en-US/docs/DASH_Adaptive_Streaming_for_HTML_5_Video -# Added by: eelcocramer -application/dash+xml mdp - -# What: OpenType font files - http://www.microsoft.com/typography/otspec/ -# Why: Browsers usually ignore the font MIME types and sniff the content, -# but Chrome, shows a warning if OpenType fonts aren't served with -# the `font/opentype` MIME type: http://i.imgur.com/8c5RN8M.png. -# Added by: alrra -font/opentype otf diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/.npmignore deleted file mode 100644 index fd4f2b06..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -.DS_Store diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/LICENSE.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/LICENSE.md deleted file mode 100644 index f039427f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/LICENSE.md +++ /dev/null @@ -1,2 +0,0 @@ -Copyright (c) 2010-2012 Robert Kieffer -MIT License - http://opensource.org/licenses/mit-license.php diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/README.md deleted file mode 100644 index e436a89f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/README.md +++ /dev/null @@ -1,207 +0,0 @@ -# node-uuid - -Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. - -Features: - -* Generate RFC4122 version 1 or version 4 UUIDs -* Runs in node.js and all browsers. -* Registered as a [ComponentJS](https://github.com/component/component) [component](https://github.com/component/component/wiki/Components) ('broofa/node-uuid'). -* Cryptographically strong random # generation on supporting platforms -* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! ) -* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html) - -## Getting Started - -Install it in your browser: - -```html -<script src="uuid.js"></script> -``` - -Or in node.js: - -``` -npm install node-uuid -``` - -```javascript -var uuid = require('node-uuid'); -``` - -Then create some ids ... - -```javascript -// Generate a v1 (time-based) id -uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' - -// Generate a v4 (random) id -uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1' -``` - -## API - -### uuid.v1([`options` [, `buffer` [, `offset`]]]) - -Generate and return a RFC4122 v1 (timestamp-based) UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. - * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. - * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used. - * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Notes: - -1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) - -Example: Generate string UUID with fully-specified options - -```javascript -uuid.v1({ - node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], - clockseq: 0x1234, - msecs: new Date('2011-11-01').getTime(), - nsecs: 5678 -}); // -> "710b962e-041c-11e1-9234-0123456789ab" -``` - -Example: In-place generation of two binary IDs - -```javascript -// Generate two ids in an array -var arr = new Array(32); // -> [] -uuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15] -uuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15] - -// Optionally use uuid.unparse() to get stringify the ids -uuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115' -uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115' -``` - -### uuid.v4([`options` [, `buffer` [, `offset`]]]) - -Generate and return a RFC4122 v4 UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values - * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Example: Generate string UUID with fully-specified options - -```javascript -uuid.v4({ - random: [ - 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, - 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 - ] -}); -// -> "109156be-c4fb-41ea-b1b4-efe1671c5836" -``` - -Example: Generate two IDs in a single buffer - -```javascript -var buffer = new Array(32); // (or 'new Buffer' in node.js) -uuid.v4(null, buffer, 0); -uuid.v4(null, buffer, 16); -``` - -### uuid.parse(id[, buffer[, offset]]) -### uuid.unparse(buffer[, offset]) - -Parse and unparse UUIDs - - * `id` - (String) UUID(-like) string - * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used - * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0 - -Example parsing and unparsing a UUID string - -```javascript -var bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> <Buffer 79 7f f0 43 11 eb 11 e1 80 d6 51 09 98 75 5d 10> -var string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10' -``` - -### uuid.noConflict() - -(Browsers only) Set `uuid` property back to it's previous value. - -Returns the node-uuid object. - -Example: - -```javascript -var myUuid = uuid.noConflict(); -myUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' -``` - -## Deprecated APIs - -Support for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version. - -### uuid([format [, buffer [, offset]]]) - -uuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary). - -### uuid.BufferClass - -The class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API. - -## Testing - -In node.js - -``` -> cd test -> node test.js -``` - -In Browser - -``` -open test/test.html -``` - -### Benchmarking - -Requires node.js - -``` -npm install uuid uuid-js -node benchmark/benchmark.js -``` - -For a more complete discussion of node-uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/node-uuid/wiki/Benchmark) - -For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance). - -## Release notes - -### 1.4.0 - -* Improved module context detection -* Removed public RNG functions - -### 1.3.2 - -* Improve tests and handling of v1() options (Issue #24) -* Expose RNG option to allow for perf testing with different generators - -### 1.3.0 - -* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! -* Support for node.js crypto API -* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/README.md deleted file mode 100644 index aaeb2ea0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# node-uuid Benchmarks - -### Results - -To see the results of our benchmarks visit https://github.com/broofa/node-uuid/wiki/Benchmark - -### Run them yourself - -node-uuid comes with some benchmarks to measure performance of generating UUIDs. These can be run using node.js. node-uuid is being benchmarked against some other uuid modules, that are available through npm namely `uuid` and `uuid-js`. - -To prepare and run the benchmark issue; - -``` -npm install uuid uuid-js -node benchmark/benchmark.js -``` - -You'll see an output like this one: - -``` -# v4 -nodeuuid.v4(): 854700 uuids/second -nodeuuid.v4('binary'): 788643 uuids/second -nodeuuid.v4('binary', buffer): 1336898 uuids/second -uuid(): 479386 uuids/second -uuid('binary'): 582072 uuids/second -uuidjs.create(4): 312304 uuids/second - -# v1 -nodeuuid.v1(): 938086 uuids/second -nodeuuid.v1('binary'): 683060 uuids/second -nodeuuid.v1('binary', buffer): 1644736 uuids/second -uuidjs.create(1): 190621 uuids/second -``` - -* The `uuid()` entries are for Nikhil Marathe's [uuid module](https://bitbucket.org/nikhilm/uuidjs) which is a wrapper around the native libuuid library. -* The `uuidjs()` entries are for Patrick Negri's [uuid-js module](https://github.com/pnegri/uuid-js) which is a pure javascript implementation based on [UUID.js](https://github.com/LiosK/UUID.js) by LiosK. - -If you want to get more reliable results you can run the benchmark multiple times and write the output into a log file: - -``` -for i in {0..9}; do node benchmark/benchmark.js >> benchmark/bench_0.4.12.log; done; -``` - -If you're interested in how performance varies between different node versions, you can issue the above command multiple times. - -You can then use the shell script `bench.sh` provided in this directory to calculate the averages over all benchmark runs and draw a nice plot: - -``` -(cd benchmark/ && ./bench.sh) -``` - -This assumes you have [gnuplot](http://www.gnuplot.info/) and [ImageMagick](http://www.imagemagick.org/) installed. You'll find a nice `bench.png` graph in the `benchmark/` directory then. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu deleted file mode 100644 index a342fbbe..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu +++ /dev/null @@ -1,174 +0,0 @@ -#!/opt/local/bin/gnuplot -persist -# -# -# G N U P L O T -# Version 4.4 patchlevel 3 -# last modified March 2011 -# System: Darwin 10.8.0 -# -# Copyright (C) 1986-1993, 1998, 2004, 2007-2010 -# Thomas Williams, Colin Kelley and many others -# -# gnuplot home: http://www.gnuplot.info -# faq, bugs, etc: type "help seeking-assistance" -# immediate help: type "help" -# plot window: hit 'h' -set terminal postscript eps noenhanced defaultplex \ - leveldefault color colortext \ - solid linewidth 1.2 butt noclip \ - palfuncparam 2000,0.003 \ - "Helvetica" 14 -set output 'bench.eps' -unset clip points -set clip one -unset clip two -set bar 1.000000 front -set border 31 front linetype -1 linewidth 1.000 -set xdata -set ydata -set zdata -set x2data -set y2data -set timefmt x "%d/%m/%y,%H:%M" -set timefmt y "%d/%m/%y,%H:%M" -set timefmt z "%d/%m/%y,%H:%M" -set timefmt x2 "%d/%m/%y,%H:%M" -set timefmt y2 "%d/%m/%y,%H:%M" -set timefmt cb "%d/%m/%y,%H:%M" -set boxwidth -set style fill empty border -set style rectangle back fc lt -3 fillstyle solid 1.00 border lt -1 -set style circle radius graph 0.02, first 0, 0 -set dummy x,y -set format x "% g" -set format y "% g" -set format x2 "% g" -set format y2 "% g" -set format z "% g" -set format cb "% g" -set angles radians -unset grid -set key title "" -set key outside left top horizontal Right noreverse enhanced autotitles columnhead nobox -set key noinvert samplen 4 spacing 1 width 0 height 0 -set key maxcolumns 2 maxrows 0 -unset label -unset arrow -set style increment default -unset style line -set style line 1 linetype 1 linewidth 2.000 pointtype 1 pointsize default pointinterval 0 -unset style arrow -set style histogram clustered gap 2 title offset character 0, 0, 0 -unset logscale -set offsets graph 0.05, 0.15, 0, 0 -set pointsize 1.5 -set pointintervalbox 1 -set encoding default -unset polar -unset parametric -unset decimalsign -set view 60, 30, 1, 1 -set samples 100, 100 -set isosamples 10, 10 -set surface -unset contour -set clabel '%8.3g' -set mapping cartesian -set datafile separator whitespace -unset hidden3d -set cntrparam order 4 -set cntrparam linear -set cntrparam levels auto 5 -set cntrparam points 5 -set size ratio 0 1,1 -set origin 0,0 -set style data points -set style function lines -set xzeroaxis linetype -2 linewidth 1.000 -set yzeroaxis linetype -2 linewidth 1.000 -set zzeroaxis linetype -2 linewidth 1.000 -set x2zeroaxis linetype -2 linewidth 1.000 -set y2zeroaxis linetype -2 linewidth 1.000 -set ticslevel 0.5 -set mxtics default -set mytics default -set mztics default -set mx2tics default -set my2tics default -set mcbtics default -set xtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set xtics norangelimit -set xtics () -set ytics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set ytics autofreq norangelimit -set ztics border in scale 1,0.5 nomirror norotate offset character 0, 0, 0 -set ztics autofreq norangelimit -set nox2tics -set noy2tics -set cbtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set cbtics autofreq norangelimit -set title "" -set title offset character 0, 0, 0 font "" norotate -set timestamp bottom -set timestamp "" -set timestamp offset character 0, 0, 0 font "" norotate -set rrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) -set autoscale rfixmin -set autoscale rfixmax -set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] ) -set autoscale tfixmin -set autoscale tfixmax -set urange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale ufixmin -set autoscale ufixmax -set vrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale vfixmin -set autoscale vfixmax -set xlabel "" -set xlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate -set x2label "" -set x2label offset character 0, 0, 0 font "" textcolor lt -1 norotate -set xrange [ * : * ] noreverse nowriteback # (currently [-0.150000:3.15000] ) -set autoscale xfixmin -set autoscale xfixmax -set x2range [ * : * ] noreverse nowriteback # (currently [0.00000:3.00000] ) -set autoscale x2fixmin -set autoscale x2fixmax -set ylabel "" -set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set y2label "" -set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set yrange [ 0.00000 : 1.90000e+06 ] noreverse nowriteback # (currently [:] ) -set autoscale yfixmin -set autoscale yfixmax -set y2range [ * : * ] noreverse nowriteback # (currently [0.00000:1.90000e+06] ) -set autoscale y2fixmin -set autoscale y2fixmax -set zlabel "" -set zlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate -set zrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale zfixmin -set autoscale zfixmax -set cblabel "" -set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set cbrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) -set autoscale cbfixmin -set autoscale cbfixmax -set zero 1e-08 -set lmargin -1 -set bmargin -1 -set rmargin -1 -set tmargin -1 -set pm3d explicit at s -set pm3d scansautomatic -set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean -set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB -set palette rgbformulae 7, 5, 15 -set colorbox default -set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault -set loadpath -set fontpath -set fit noerrorvariables -GNUTERM = "aqua" -plot 'bench_results.txt' using 2:xticlabel(1) w lp lw 2, '' using 3:xticlabel(1) w lp lw 2, '' using 4:xticlabel(1) w lp lw 2, '' using 5:xticlabel(1) w lp lw 2, '' using 6:xticlabel(1) w lp lw 2, '' using 7:xticlabel(1) w lp lw 2, '' using 8:xticlabel(1) w lp lw 2, '' using 9:xticlabel(1) w lp lw 2 -# EOF diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/bench.sh b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/bench.sh deleted file mode 100755 index d870a0cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/bench.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# for a given node version run: -# for i in {0..9}; do node benchmark.js >> bench_0.6.2.log; done; - -PATTERNS=('nodeuuid.v1()' "nodeuuid.v1('binary'," 'nodeuuid.v4()' "nodeuuid.v4('binary'," "uuid()" "uuid('binary')" 'uuidjs.create(1)' 'uuidjs.create(4)' '140byte') -FILES=(node_uuid_v1_string node_uuid_v1_buf node_uuid_v4_string node_uuid_v4_buf libuuid_v4_string libuuid_v4_binary uuidjs_v1_string uuidjs_v4_string 140byte_es) -INDICES=(2 3 2 3 2 2 2 2 2) -VERSIONS=$( ls bench_*.log | sed -e 's/^bench_\([0-9\.]*\)\.log/\1/' | tr "\\n" " " ) -TMPJOIN="tmp_join" -OUTPUT="bench_results.txt" - -for I in ${!FILES[*]}; do - F=${FILES[$I]} - P=${PATTERNS[$I]} - INDEX=${INDICES[$I]} - echo "version $F" > $F - for V in $VERSIONS; do - (VAL=$( grep "$P" bench_$V.log | LC_ALL=en_US awk '{ sum += $'$INDEX' } END { print sum/NR }' ); echo $V $VAL) >> $F - done - if [ $I == 0 ]; then - cat $F > $TMPJOIN - else - join $TMPJOIN $F > $OUTPUT - cp $OUTPUT $TMPJOIN - fi - rm $F -done - -rm $TMPJOIN - -gnuplot bench.gnu -convert -density 200 -resize 800x560 -flatten bench.eps bench.png -rm bench.eps diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c deleted file mode 100644 index dbfc75f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c +++ /dev/null @@ -1,34 +0,0 @@ -/* -Test performance of native C UUID generation - -To Compile: cc -luuid benchmark-native.c -o benchmark-native -*/ - -#include <stdio.h> -#include <unistd.h> -#include <sys/time.h> -#include <uuid/uuid.h> - -int main() { - uuid_t myid; - char buf[36+1]; - int i; - struct timeval t; - double start, finish; - - gettimeofday(&t, NULL); - start = t.tv_sec + t.tv_usec/1e6; - - int n = 2e5; - for (i = 0; i < n; i++) { - uuid_generate(myid); - uuid_unparse(myid, buf); - } - - gettimeofday(&t, NULL); - finish = t.tv_sec + t.tv_usec/1e6; - double dur = finish - start; - - printf("%d uuids/sec", (int)(n/dur)); - return 0; -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js deleted file mode 100644 index 40e6efbe..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js +++ /dev/null @@ -1,84 +0,0 @@ -try { - var nodeuuid = require('../uuid'); -} catch (e) { - console.error('node-uuid require failed - skipping tests'); -} - -try { - var uuid = require('uuid'); -} catch (e) { - console.error('uuid require failed - skipping tests'); -} - -try { - var uuidjs = require('uuid-js'); -} catch (e) { - console.error('uuid-js require failed - skipping tests'); -} - -var N = 5e5; - -function rate(msg, t) { - console.log(msg + ': ' + - (N / (Date.now() - t) * 1e3 | 0) + - ' uuids/second'); -} - -console.log('# v4'); - -// node-uuid - string form -if (nodeuuid) { - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4(); - rate('nodeuuid.v4() - using node.js crypto RNG', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4({rng: nodeuuid.mathRNG}); - rate('nodeuuid.v4() - using Math.random() RNG', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary'); - rate('nodeuuid.v4(\'binary\')', t); - - var buffer = new nodeuuid.BufferClass(16); - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary', buffer); - rate('nodeuuid.v4(\'binary\', buffer)', t); -} - -// libuuid - string form -if (uuid) { - for (var i = 0, t = Date.now(); i < N; i++) uuid(); - rate('uuid()', t); - - for (var i = 0, t = Date.now(); i < N; i++) uuid('binary'); - rate('uuid(\'binary\')', t); -} - -// uuid-js - string form -if (uuidjs) { - for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(4); - rate('uuidjs.create(4)', t); -} - -// 140byte.es -for (var i = 0, t = Date.now(); i < N; i++) 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(s,r){r=Math.random()*16|0;return (s=='x'?r:r&0x3|0x8).toString(16)}); -rate('140byte.es_v4', t); - -console.log(''); -console.log('# v1'); - -// node-uuid - v1 string form -if (nodeuuid) { - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1(); - rate('nodeuuid.v1()', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary'); - rate('nodeuuid.v1(\'binary\')', t); - - var buffer = new nodeuuid.BufferClass(16); - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary', buffer); - rate('nodeuuid.v1(\'binary\', buffer)', t); -} - -// uuid-js - v1 string form -if (uuidjs) { - for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(1); - rate('uuidjs.create(1)', t); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/component.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/component.json deleted file mode 100644 index ace21348..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/component.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "node-uuid", - "repo": "broofa/node-uuid", - "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", - "version": "1.4.0", - "author": "Robert Kieffer <robert@broofa.com>", - "contributors": [ - {"name": "Christoph Tavan <dev@tavan.de>", "github": "https://github.com/ctavan"} - ], - "keywords": ["uuid", "guid", "rfc4122"], - "dependencies": {}, - "development": {}, - "main": "uuid.js", - "scripts": [ - "uuid.js" - ], - "license": "MIT" -} \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/package.json deleted file mode 100644 index e6f518be..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "node-uuid", - "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", - "url": "http://github.com/broofa/node-uuid", - "keywords": [ - "uuid", - "guid", - "rfc4122" - ], - "author": { - "name": "Robert Kieffer", - "email": "robert@broofa.com" - }, - "contributors": [ - { - "name": "Christoph Tavan", - "email": "dev@tavan.de" - } - ], - "lib": ".", - "main": "./uuid.js", - "repository": { - "type": "git", - "url": "https://github.com/broofa/node-uuid.git" - }, - "version": "1.4.1", - "readme": "# node-uuid\n\nSimple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.\n\nFeatures:\n\n* Generate RFC4122 version 1 or version 4 UUIDs\n* Runs in node.js and all browsers.\n* Registered as a [ComponentJS](https://github.com/component/component) [component](https://github.com/component/component/wiki/Components) ('broofa/node-uuid').\n* Cryptographically strong random # generation on supporting platforms\n* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! )\n* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html)\n\n## Getting Started\n\nInstall it in your browser:\n\n```html\n<script src=\"uuid.js\"></script>\n```\n\nOr in node.js:\n\n```\nnpm install node-uuid\n```\n\n```javascript\nvar uuid = require('node-uuid');\n```\n\nThen create some ids ...\n\n```javascript\n// Generate a v1 (time-based) id\nuuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n\n// Generate a v4 (random) id\nuuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'\n```\n\n## API\n\n### uuid.v1([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v1 (timestamp-based) UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1.\n * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.\n * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used.\n * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nNotes:\n\n1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v1({\n node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],\n clockseq: 0x1234,\n msecs: new Date('2011-11-01').getTime(),\n nsecs: 5678\n}); // -> \"710b962e-041c-11e1-9234-0123456789ab\"\n```\n\nExample: In-place generation of two binary IDs\n\n```javascript\n// Generate two ids in an array\nvar arr = new Array(32); // -> []\nuuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\nuuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\n\n// Optionally use uuid.unparse() to get stringify the ids\nuuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115'\nuuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115'\n```\n\n### uuid.v4([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v4 UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values\n * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v4({\n random: [\n 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,\n 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36\n ]\n});\n// -> \"109156be-c4fb-41ea-b1b4-efe1671c5836\"\n```\n\nExample: Generate two IDs in a single buffer\n\n```javascript\nvar buffer = new Array(32); // (or 'new Buffer' in node.js)\nuuid.v4(null, buffer, 0);\nuuid.v4(null, buffer, 16);\n```\n\n### uuid.parse(id[, buffer[, offset]])\n### uuid.unparse(buffer[, offset])\n\nParse and unparse UUIDs\n\n * `id` - (String) UUID(-like) string\n * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used\n * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0\n\nExample parsing and unparsing a UUID string\n\n```javascript\nvar bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> <Buffer 79 7f f0 43 11 eb 11 e1 80 d6 51 09 98 75 5d 10>\nvar string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10'\n```\n\n### uuid.noConflict()\n\n(Browsers only) Set `uuid` property back to it's previous value.\n\nReturns the node-uuid object.\n\nExample:\n\n```javascript\nvar myUuid = uuid.noConflict();\nmyUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n```\n\n## Deprecated APIs\n\nSupport for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version.\n\n### uuid([format [, buffer [, offset]]])\n\nuuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary).\n\n### uuid.BufferClass\n\nThe class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API.\n\n## Testing\n\nIn node.js\n\n```\n> cd test\n> node test.js\n```\n\nIn Browser\n\n```\nopen test/test.html\n```\n\n### Benchmarking\n\nRequires node.js\n\n```\nnpm install uuid uuid-js\nnode benchmark/benchmark.js\n```\n\nFor a more complete discussion of node-uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/node-uuid/wiki/Benchmark)\n\nFor browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance).\n\n## Release notes\n\n### 1.4.0\n\n* Improved module context detection\n* Removed public RNG functions\n\n### 1.3.2\n\n* Improve tests and handling of v1() options (Issue #24)\n* Expose RNG option to allow for perf testing with different generators\n\n### 1.3.0\n\n* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!\n* Support for node.js crypto API\n* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/broofa/node-uuid/issues" - }, - "homepage": "https://github.com/broofa/node-uuid", - "_id": "node-uuid@1.4.1", - "dist": { - "shasum": "e937c5cdd70594274f11a11d3ae751f5c5857c73" - }, - "_from": "node-uuid@~1.4.0", - "_resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/compare_v1.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/compare_v1.js deleted file mode 100644 index 05af8221..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/compare_v1.js +++ /dev/null @@ -1,63 +0,0 @@ -var assert = require('assert'), - nodeuuid = require('../uuid'), - uuidjs = require('uuid-js'), - libuuid = require('uuid').generate, - util = require('util'), - exec = require('child_process').exec, - os = require('os'); - -// On Mac Os X / macports there's only the ossp-uuid package that provides uuid -// On Linux there's uuid-runtime which provides uuidgen -var uuidCmd = os.type() === 'Darwin' ? 'uuid -1' : 'uuidgen -t'; - -function compare(ids) { - console.log(ids); - for (var i = 0; i < ids.length; i++) { - var id = ids[i].split('-'); - id = [id[2], id[1], id[0]].join(''); - ids[i] = id; - } - var sorted = ([].concat(ids)).sort(); - - if (sorted.toString() !== ids.toString()) { - console.log('Warning: sorted !== ids'); - } else { - console.log('everything in order!'); - } -} - -// Test time order of v1 uuids -var ids = []; -while (ids.length < 10e3) ids.push(nodeuuid.v1()); - -var max = 10; -console.log('node-uuid:'); -ids = []; -for (var i = 0; i < max; i++) ids.push(nodeuuid.v1()); -compare(ids); - -console.log(''); -console.log('uuidjs:'); -ids = []; -for (var i = 0; i < max; i++) ids.push(uuidjs.create(1).toString()); -compare(ids); - -console.log(''); -console.log('libuuid:'); -ids = []; -var count = 0; -var last = function() { - compare(ids); -} -var cb = function(err, stdout, stderr) { - ids.push(stdout.substring(0, stdout.length-1)); - count++; - if (count < max) { - return next(); - } - last(); -}; -var next = function() { - exec(uuidCmd, cb); -}; -next(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.html b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.html deleted file mode 100644 index d80326ec..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.html +++ /dev/null @@ -1,17 +0,0 @@ -<html> - <head> - <style> - div { - font-family: monospace; - font-size: 8pt; - } - div.log {color: #444;} - div.warn {color: #550;} - div.error {color: #800; font-weight: bold;} - </style> - <script src="../uuid.js"></script> - </head> - <body> - <script src="./test.js"></script> - </body> -</html> diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.js deleted file mode 100644 index 24692256..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.js +++ /dev/null @@ -1,228 +0,0 @@ -if (!this.uuid) { - // node.js - uuid = require('../uuid'); -} - -// -// x-platform log/assert shims -// - -function _log(msg, type) { - type = type || 'log'; - - if (typeof(document) != 'undefined') { - document.write('<div class="' + type + '">' + msg.replace(/\n/g, '<br />') + '</div>'); - } - if (typeof(console) != 'undefined') { - var color = { - log: '\033[39m', - warn: '\033[33m', - error: '\033[31m' - }; - console[type](color[type] + msg + color.log); - } -} - -function log(msg) {_log(msg, 'log');} -function warn(msg) {_log(msg, 'warn');} -function error(msg) {_log(msg, 'error');} - -function assert(res, msg) { - if (!res) { - error('FAIL: ' + msg); - } else { - log('Pass: ' + msg); - } -} - -// -// Unit tests -// - -// Verify ordering of v1 ids created with explicit times -var TIME = 1321644961388; // 2011-11-18 11:36:01.388-08:00 - -function compare(name, ids) { - ids = ids.map(function(id) { - return id.split('-').reverse().join('-'); - }).sort(); - var sorted = ([].concat(ids)).sort(); - - assert(sorted.toString() == ids.toString(), name + ' have expected order'); -} - -// Verify ordering of v1 ids created using default behavior -compare('uuids with current time', [ - uuid.v1(), - uuid.v1(), - uuid.v1(), - uuid.v1(), - uuid.v1() -]); - -// Verify ordering of v1 ids created with explicit times -compare('uuids with time option', [ - uuid.v1({msecs: TIME - 10*3600*1000}), - uuid.v1({msecs: TIME - 1}), - uuid.v1({msecs: TIME}), - uuid.v1({msecs: TIME + 1}), - uuid.v1({msecs: TIME + 28*24*3600*1000}) -]); - -assert( - uuid.v1({msecs: TIME}) != uuid.v1({msecs: TIME}), - 'IDs created at same msec are different' -); - -// Verify throw if too many ids created -var thrown = false; -try { - uuid.v1({msecs: TIME, nsecs: 10000}); -} catch (e) { - thrown = true; -} -assert(thrown, 'Exception thrown when > 10K ids created in 1 ms'); - -// Verify clock regression bumps clockseq -var uidt = uuid.v1({msecs: TIME}); -var uidtb = uuid.v1({msecs: TIME - 1}); -assert( - parseInt(uidtb.split('-')[3], 16) - parseInt(uidt.split('-')[3], 16) === 1, - 'Clock regression by msec increments the clockseq' -); - -// Verify clock regression bumps clockseq -var uidtn = uuid.v1({msecs: TIME, nsecs: 10}); -var uidtnb = uuid.v1({msecs: TIME, nsecs: 9}); -assert( - parseInt(uidtnb.split('-')[3], 16) - parseInt(uidtn.split('-')[3], 16) === 1, - 'Clock regression by nsec increments the clockseq' -); - -// Verify explicit options produce expected id -var id = uuid.v1({ - msecs: 1321651533573, - nsecs: 5432, - clockseq: 0x385c, - node: [ 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10 ] -}); -assert(id == 'd9428888-122b-11e1-b85c-61cd3cbb3210', 'Explicit options produce expected id'); - -// Verify adjacent ids across a msec boundary are 1 time unit apart -var u0 = uuid.v1({msecs: TIME, nsecs: 9999}); -var u1 = uuid.v1({msecs: TIME + 1, nsecs: 0}); - -var before = u0.split('-')[0], after = u1.split('-')[0]; -var dt = parseInt(after, 16) - parseInt(before, 16); -assert(dt === 1, 'Ids spanning 1ms boundary are 100ns apart'); - -// -// Test parse/unparse -// - -id = '00112233445566778899aabbccddeeff'; -assert(uuid.unparse(uuid.parse(id.substr(0,10))) == - '00112233-4400-0000-0000-000000000000', 'Short parse'); -assert(uuid.unparse(uuid.parse('(this is the uuid -> ' + id + id)) == - '00112233-4455-6677-8899-aabbccddeeff', 'Dirty parse'); - -// -// Perf tests -// - -var generators = { - v1: uuid.v1, - v4: uuid.v4 -}; - -var UUID_FORMAT = { - v1: /[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i, - v4: /[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i -}; - -var N = 1e4; - -// Get %'age an actual value differs from the ideal value -function divergence(actual, ideal) { - return Math.round(100*100*(actual - ideal)/ideal)/100; -} - -function rate(msg, t) { - log(msg + ': ' + (N / (Date.now() - t) * 1e3 | 0) + ' uuids\/second'); -} - -for (var version in generators) { - var counts = {}, max = 0; - var generator = generators[version]; - var format = UUID_FORMAT[version]; - - log('\nSanity check ' + N + ' ' + version + ' uuids'); - for (var i = 0, ok = 0; i < N; i++) { - id = generator(); - if (!format.test(id)) { - throw Error(id + ' is not a valid UUID string'); - } - - if (id != uuid.unparse(uuid.parse(id))) { - assert(fail, id + ' is not a valid id'); - } - - // Count digits for our randomness check - if (version == 'v4') { - var digits = id.replace(/-/g, '').split(''); - for (var j = digits.length-1; j >= 0; j--) { - var c = digits[j]; - max = Math.max(max, counts[c] = (counts[c] || 0) + 1); - } - } - } - - // Check randomness for v4 UUIDs - if (version == 'v4') { - // Limit that we get worried about randomness. (Purely empirical choice, this!) - var limit = 2*100*Math.sqrt(1/N); - - log('\nChecking v4 randomness. Distribution of Hex Digits (% deviation from ideal)'); - - for (var i = 0; i < 16; i++) { - var c = i.toString(16); - var bar = '', n = counts[c], p = Math.round(n/max*100|0); - - // 1-3,5-8, and D-F: 1:16 odds over 30 digits - var ideal = N*30/16; - if (i == 4) { - // 4: 1:1 odds on 1 digit, plus 1:16 odds on 30 digits - ideal = N*(1 + 30/16); - } else if (i >= 8 && i <= 11) { - // 8-B: 1:4 odds on 1 digit, plus 1:16 odds on 30 digits - ideal = N*(1/4 + 30/16); - } else { - // Otherwise: 1:16 odds on 30 digits - ideal = N*30/16; - } - var d = divergence(n, ideal); - - // Draw bar using UTF squares (just for grins) - var s = n/max*50 | 0; - while (s--) bar += '='; - - assert(Math.abs(d) < limit, c + ' |' + bar + '| ' + counts[c] + ' (' + d + '% < ' + limit + '%)'); - } - } -} - -// Perf tests -for (var version in generators) { - log('\nPerformance testing ' + version + ' UUIDs'); - var generator = generators[version]; - var buf = new uuid.BufferClass(16); - - for (var i = 0, t = Date.now(); i < N; i++) generator(); - rate('uuid.' + version + '()', t); - - for (var i = 0, t = Date.now(); i < N; i++) generator('binary'); - rate('uuid.' + version + '(\'binary\')', t); - - for (var i = 0, t = Date.now(); i < N; i++) generator('binary', buf); - rate('uuid.' + version + '(\'binary\', buffer)', t); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/uuid.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/uuid.js deleted file mode 100644 index 2fac6dc4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/uuid.js +++ /dev/null @@ -1,245 +0,0 @@ -// uuid.js -// -// Copyright (c) 2010-2012 Robert Kieffer -// MIT License - http://opensource.org/licenses/mit-license.php - -(function() { - var _global = this; - - // Unique ID creation requires a high quality random # generator. We feature - // detect to determine the best RNG source, normalizing to a function that - // returns 128-bits of randomness, since that's what's usually required - var _rng; - - // Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html - // - // Moderately fast, high quality - if (typeof(require) == 'function') { - try { - var _rb = require('crypto').randomBytes; - _rng = _rb && function() {return _rb(16);}; - } catch(e) {} - } - - if (!_rng && _global.crypto && crypto.getRandomValues) { - // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto - // - // Moderately fast, high quality - var _rnds8 = new Uint8Array(16); - _rng = function whatwgRNG() { - crypto.getRandomValues(_rnds8); - return _rnds8; - }; - } - - if (!_rng) { - // Math.random()-based (RNG) - // - // If all else fails, use Math.random(). It's fast, but is of unspecified - // quality. - var _rnds = new Array(16); - _rng = function() { - for (var i = 0, r; i < 16; i++) { - if ((i & 0x03) === 0) r = Math.random() * 0x100000000; - _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; - } - - return _rnds; - }; - } - - // Buffer class to use - var BufferClass = typeof(Buffer) == 'function' ? Buffer : Array; - - // Maps for number <-> hex string conversion - var _byteToHex = []; - var _hexToByte = {}; - for (var i = 0; i < 256; i++) { - _byteToHex[i] = (i + 0x100).toString(16).substr(1); - _hexToByte[_byteToHex[i]] = i; - } - - // **`parse()` - Parse a UUID into it's component bytes** - function parse(s, buf, offset) { - var i = (buf && offset) || 0, ii = 0; - - buf = buf || []; - s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) { - if (ii < 16) { // Don't overflow! - buf[i + ii++] = _hexToByte[oct]; - } - }); - - // Zero out remaining bytes if string was short - while (ii < 16) { - buf[i + ii++] = 0; - } - - return buf; - } - - // **`unparse()` - Convert UUID byte array (ala parse()) into a string** - function unparse(buf, offset) { - var i = offset || 0, bth = _byteToHex; - return bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]]; - } - - // **`v1()` - Generate time-based UUID** - // - // Inspired by https://github.com/LiosK/UUID.js - // and http://docs.python.org/library/uuid.html - - // random #'s we need to init node and clockseq - var _seedBytes = _rng(); - - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - var _nodeId = [ - _seedBytes[0] | 0x01, - _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] - ]; - - // Per 4.2.2, randomize (14 bit) clockseq - var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff; - - // Previous uuid creation time - var _lastMSecs = 0, _lastNSecs = 0; - - // See https://github.com/broofa/node-uuid for API details - function v1(options, buf, offset) { - var i = buf && offset || 0; - var b = buf || []; - - options = options || {}; - - var clockseq = options.clockseq != null ? options.clockseq : _clockseq; - - // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - var msecs = options.msecs != null ? options.msecs : new Date().getTime(); - - // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - var nsecs = options.nsecs != null ? options.nsecs : _lastNSecs + 1; - - // Time since last uuid creation (in msecs) - var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; - - // Per 4.2.1.2, Bump clockseq on clock regression - if (dt < 0 && options.clockseq == null) { - clockseq = clockseq + 1 & 0x3fff; - } - - // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs == null) { - nsecs = 0; - } - - // Per 4.2.1.2 Throw error if too many uuids are requested - if (nsecs >= 10000) { - throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; - - // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - msecs += 12219292800000; - - // `time_low` - var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; - - // `time_mid` - var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; - - // `time_high_and_version` - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - b[i++] = tmh >>> 16 & 0xff; - - // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - b[i++] = clockseq >>> 8 | 0x80; - - // `clock_seq_low` - b[i++] = clockseq & 0xff; - - // `node` - var node = options.node || _nodeId; - for (var n = 0; n < 6; n++) { - b[i + n] = node[n]; - } - - return buf ? buf : unparse(b); - } - - // **`v4()` - Generate random UUID** - - // See https://github.com/broofa/node-uuid for API details - function v4(options, buf, offset) { - // Deprecated - 'format' argument, as supported in v1.2 - var i = buf && offset || 0; - - if (typeof(options) == 'string') { - buf = options == 'binary' ? new BufferClass(16) : null; - options = null; - } - options = options || {}; - - var rnds = options.random || (options.rng || _rng)(); - - // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - - // Copy bytes to buffer, if provided - if (buf) { - for (var ii = 0; ii < 16; ii++) { - buf[i + ii] = rnds[ii]; - } - } - - return buf || unparse(rnds); - } - - // Export public API - var uuid = v4; - uuid.v1 = v1; - uuid.v4 = v4; - uuid.parse = parse; - uuid.unparse = unparse; - uuid.BufferClass = BufferClass; - - if (typeof define === 'function' && define.amd) { - // Publish as AMD module - define(function() {return uuid;}); - } else if (typeof(module) != 'undefined' && module.exports) { - // Publish as node.js module - module.exports = uuid; - } else { - // Publish as global (in browsers) - var _previousRoot = _global.uuid; - - // **`noConflict()` - (browser only) to reset global 'uuid' var** - uuid.noConflict = function() { - _global.uuid = _previousRoot; - return uuid; - }; - - _global.uuid = uuid; - } -}).call(this); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/LICENSE deleted file mode 100644 index a4a9aee0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/README.md deleted file mode 100644 index 34c4a85d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/README.md +++ /dev/null @@ -1,4 +0,0 @@ -oauth-sign -========== - -OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/index.js deleted file mode 100644 index e35bfa67..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/index.js +++ /dev/null @@ -1,43 +0,0 @@ -var crypto = require('crypto') - , qs = require('querystring') - ; - -function sha1 (key, body) { - return crypto.createHmac('sha1', key).update(body).digest('base64') -} - -function rfc3986 (str) { - return encodeURIComponent(str) - .replace(/!/g,'%21') - .replace(/\*/g,'%2A') - .replace(/\(/g,'%28') - .replace(/\)/g,'%29') - .replace(/'/g,'%27') - ; -} - -function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret) { - // adapted from https://dev.twitter.com/docs/auth/oauth and - // https://dev.twitter.com/docs/auth/creating-signature - - var querystring = Object.keys(params).sort().map(function(key){ - // big WTF here with the escape + encoding but it's what twitter wants - return escape(rfc3986(key)) + "%3D" + escape(rfc3986(params[key])) - }).join('%26') - - var base = [ - httpMethod ? httpMethod.toUpperCase() : 'GET', - rfc3986(base_uri), - querystring - ].join('&') - - var key = [ - consumer_secret, - token_secret || '' - ].map(rfc3986).join('&') - - return sha1(key, base) -} - -exports.hmacsign = hmacsign -exports.rfc3986 = rfc3986 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/package.json deleted file mode 100644 index abc9d21d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "author": { - "name": "Mikeal Rogers", - "email": "mikeal.rogers@gmail.com", - "url": "http://www.futurealoof.com" - }, - "name": "oauth-sign", - "description": "OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module.", - "version": "0.3.0", - "repository": { - "url": "https://github.com/mikeal/oauth-sign" - }, - "main": "index.js", - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "scripts": { - "test": "node test.js" - }, - "readme": "oauth-sign\n==========\n\nOAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module. \n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/mikeal/oauth-sign/issues" - }, - "homepage": "https://github.com/mikeal/oauth-sign", - "_id": "oauth-sign@0.3.0", - "dist": { - "shasum": "cb540f93bb2b22a7d5941691a288d60e8ea9386e" - }, - "_from": "oauth-sign@~0.3.0", - "_resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.3.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/test.js deleted file mode 100644 index 46955ff6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/test.js +++ /dev/null @@ -1,49 +0,0 @@ -var hmacsign = require('./index').hmacsign - , assert = require('assert') - , qs = require('querystring') - ; - -// Tests from Twitter documentation https://dev.twitter.com/docs/auth/oauth - -var reqsign = hmacsign('POST', 'https://api.twitter.com/oauth/request_token', - { oauth_callback: 'http://localhost:3005/the_dance/process_callback?service_provider_id=11' - , oauth_consumer_key: 'GDdmIQH6jhtmLUypg82g' - , oauth_nonce: 'QP70eNmVz8jvdPevU3oJD2AfF7R7odC2XJcn4XlZJqk' - , oauth_signature_method: 'HMAC-SHA1' - , oauth_timestamp: '1272323042' - , oauth_version: '1.0' - }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98") - -console.log(reqsign) -console.log('8wUi7m5HFQy76nowoCThusfgB+Q=') -assert.equal(reqsign, '8wUi7m5HFQy76nowoCThusfgB+Q=') - -var accsign = hmacsign('POST', 'https://api.twitter.com/oauth/access_token', - { oauth_consumer_key: 'GDdmIQH6jhtmLUypg82g' - , oauth_nonce: '9zWH6qe0qG7Lc1telCn7FhUbLyVdjEaL3MO5uHxn8' - , oauth_signature_method: 'HMAC-SHA1' - , oauth_token: '8ldIZyxQeVrFZXFOZH5tAwj6vzJYuLQpl0WUEYtWc' - , oauth_timestamp: '1272323047' - , oauth_verifier: 'pDNg57prOHapMbhv25RNf75lVRd6JDsni1AJJIDYoTY' - , oauth_version: '1.0' - }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98", "x6qpRnlEmW9JbQn4PQVVeVG8ZLPEx6A0TOebgwcuA") - -console.log(accsign) -console.log('PUw/dHA4fnlJYM6RhXk5IU/0fCc=') -assert.equal(accsign, 'PUw/dHA4fnlJYM6RhXk5IU/0fCc=') - -var upsign = hmacsign('POST', 'http://api.twitter.com/1/statuses/update.json', - { oauth_consumer_key: "GDdmIQH6jhtmLUypg82g" - , oauth_nonce: "oElnnMTQIZvqvlfXM56aBLAf5noGD0AQR3Fmi7Q6Y" - , oauth_signature_method: "HMAC-SHA1" - , oauth_token: "819797-Jxq8aYUDRmykzVKrgoLhXSq67TEa5ruc4GJC2rWimw" - , oauth_timestamp: "1272325550" - , oauth_version: "1.0" - , status: 'setting up my twitter 私のさえずりを設定する' - }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98", "J6zix3FfA9LofH0awS24M3HcBYXO5nI1iYe8EfBA") - -console.log(upsign) -console.log('yOahq5m0YjDDjfjxHaXEsW9D+X0=') -assert.equal(upsign, 'yOahq5m0YjDDjfjxHaXEsW9D+X0=') - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.gitmodules b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.gitmodules deleted file mode 100644 index 49e31dac..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.gitmodules +++ /dev/null @@ -1,6 +0,0 @@ -[submodule "support/expresso"] - path = support/expresso - url = git://github.com/visionmedia/expresso.git -[submodule "support/should"] - path = support/should - url = git://github.com/visionmedia/should.js.git diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.npmignore deleted file mode 100644 index e85ce2af..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.npmignore +++ /dev/null @@ -1,7 +0,0 @@ -test -.travis.yml -benchmark.js -component.json -examples.js -History.md -Makefile diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/Readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/Readme.md deleted file mode 100644 index 27e54a4a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/Readme.md +++ /dev/null @@ -1,58 +0,0 @@ -# node-querystring - - query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others. - -## Installation - - $ npm install qs - -## Examples - -```js -var qs = require('qs'); - -qs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com'); -// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } } - -qs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }}) -// => user[name]=Tobi&user[email]=tobi%40learnboost.com -``` - -## Testing - -Install dev dependencies: - - $ npm install -d - -and execute: - - $ make test - -browser: - - $ open test/browser/index.html - -## License - -(The MIT License) - -Copyright (c) 2010 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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/index.js deleted file mode 100644 index b05938ac..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/index.js +++ /dev/null @@ -1,366 +0,0 @@ -/** - * Object#toString() ref for stringify(). - */ - -var toString = Object.prototype.toString; - -/** - * Object#hasOwnProperty ref - */ - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -/** - * Array#indexOf shim. - */ - -var indexOf = typeof Array.prototype.indexOf === 'function' - ? function(arr, el) { return arr.indexOf(el); } - : function(arr, el) { - for (var i = 0; i < arr.length; i++) { - if (arr[i] === el) return i; - } - return -1; - }; - -/** - * Array.isArray shim. - */ - -var isArray = Array.isArray || function(arr) { - return toString.call(arr) == '[object Array]'; -}; - -/** - * Object.keys shim. - */ - -var objectKeys = Object.keys || function(obj) { - var ret = []; - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - ret.push(key); - } - } - return ret; -}; - -/** - * Array#forEach shim. - */ - -var forEach = typeof Array.prototype.forEach === 'function' - ? function(arr, fn) { return arr.forEach(fn); } - : function(arr, fn) { - for (var i = 0; i < arr.length; i++) fn(arr[i]); - }; - -/** - * Array#reduce shim. - */ - -var reduce = function(arr, fn, initial) { - if (typeof arr.reduce === 'function') return arr.reduce(fn, initial); - var res = initial; - for (var i = 0; i < arr.length; i++) res = fn(res, arr[i]); - return res; -}; - -/** - * Cache non-integer test regexp. - */ - -var isint = /^[0-9]+$/; - -function promote(parent, key) { - if (parent[key].length == 0) return parent[key] = {} - var t = {}; - for (var i in parent[key]) { - if (hasOwnProperty.call(parent[key], i)) { - t[i] = parent[key][i]; - } - } - parent[key] = t; - return t; -} - -function parse(parts, parent, key, val) { - var part = parts.shift(); - - // illegal - if (Object.getOwnPropertyDescriptor(Object.prototype, key)) return; - - // end - if (!part) { - if (isArray(parent[key])) { - parent[key].push(val); - } else if ('object' == typeof parent[key]) { - parent[key] = val; - } else if ('undefined' == typeof parent[key]) { - parent[key] = val; - } else { - parent[key] = [parent[key], val]; - } - // array - } else { - var obj = parent[key] = parent[key] || []; - if (']' == part) { - if (isArray(obj)) { - if ('' != val) obj.push(val); - } else if ('object' == typeof obj) { - obj[objectKeys(obj).length] = val; - } else { - obj = parent[key] = [parent[key], val]; - } - // prop - } else if (~indexOf(part, ']')) { - part = part.substr(0, part.length - 1); - if (!isint.test(part) && isArray(obj)) obj = promote(parent, key); - parse(parts, obj, part, val); - // key - } else { - if (!isint.test(part) && isArray(obj)) obj = promote(parent, key); - parse(parts, obj, part, val); - } - } -} - -/** - * Merge parent key/val pair. - */ - -function merge(parent, key, val){ - if (~indexOf(key, ']')) { - var parts = key.split('[') - , len = parts.length - , last = len - 1; - parse(parts, parent, 'base', val); - // optimize - } else { - if (!isint.test(key) && isArray(parent.base)) { - var t = {}; - for (var k in parent.base) t[k] = parent.base[k]; - parent.base = t; - } - set(parent.base, key, val); - } - - return parent; -} - -/** - * Compact sparse arrays. - */ - -function compact(obj) { - if ('object' != typeof obj) return obj; - - if (isArray(obj)) { - var ret = []; - - for (var i in obj) { - if (hasOwnProperty.call(obj, i)) { - ret.push(obj[i]); - } - } - - return ret; - } - - for (var key in obj) { - obj[key] = compact(obj[key]); - } - - return obj; -} - -/** - * Parse the given obj. - */ - -function parseObject(obj){ - var ret = { base: {} }; - - forEach(objectKeys(obj), function(name){ - merge(ret, name, obj[name]); - }); - - return compact(ret.base); -} - -/** - * Parse the given str. - */ - -function parseString(str){ - var ret = reduce(String(str).split('&'), function(ret, pair){ - var eql = indexOf(pair, '=') - , brace = lastBraceInKey(pair) - , key = pair.substr(0, brace || eql) - , val = pair.substr(brace || eql, pair.length) - , val = val.substr(indexOf(val, '=') + 1, val.length); - - // ?foo - if ('' == key) key = pair, val = ''; - if ('' == key) return ret; - - return merge(ret, decode(key), decode(val)); - }, { base: {} }).base; - - return compact(ret); -} - -/** - * Parse the given query `str` or `obj`, returning an object. - * - * @param {String} str | {Object} obj - * @return {Object} - * @api public - */ - -exports.parse = function(str){ - if (null == str || '' == str) return {}; - return 'object' == typeof str - ? parseObject(str) - : parseString(str); -}; - -/** - * Turn the given `obj` into a query string - * - * @param {Object} obj - * @return {String} - * @api public - */ - -var stringify = exports.stringify = function(obj, prefix) { - if (isArray(obj)) { - return stringifyArray(obj, prefix); - } else if ('[object Object]' == toString.call(obj)) { - return stringifyObject(obj, prefix); - } else if ('string' == typeof obj) { - return stringifyString(obj, prefix); - } else { - return prefix + '=' + encodeURIComponent(String(obj)); - } -}; - -/** - * Stringify the given `str`. - * - * @param {String} str - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyString(str, prefix) { - if (!prefix) throw new TypeError('stringify expects an object'); - return prefix + '=' + encodeURIComponent(str); -} - -/** - * Stringify the given `arr`. - * - * @param {Array} arr - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyArray(arr, prefix) { - var ret = []; - if (!prefix) throw new TypeError('stringify expects an object'); - for (var i = 0; i < arr.length; i++) { - ret.push(stringify(arr[i], prefix + '[' + i + ']')); - } - return ret.join('&'); -} - -/** - * Stringify the given `obj`. - * - * @param {Object} obj - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyObject(obj, prefix) { - var ret = [] - , keys = objectKeys(obj) - , key; - - for (var i = 0, len = keys.length; i < len; ++i) { - key = keys[i]; - if ('' == key) continue; - if (null == obj[key]) { - ret.push(encodeURIComponent(key) + '='); - } else { - ret.push(stringify(obj[key], prefix - ? prefix + '[' + encodeURIComponent(key) + ']' - : encodeURIComponent(key))); - } - } - - return ret.join('&'); -} - -/** - * Set `obj`'s `key` to `val` respecting - * the weird and wonderful syntax of a qs, - * where "foo=bar&foo=baz" becomes an array. - * - * @param {Object} obj - * @param {String} key - * @param {String} val - * @api private - */ - -function set(obj, key, val) { - var v = obj[key]; - if (Object.getOwnPropertyDescriptor(Object.prototype, key)) return; - if (undefined === v) { - obj[key] = val; - } else if (isArray(v)) { - v.push(val); - } else { - obj[key] = [v, val]; - } -} - -/** - * Locate last brace in `str` within the key. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function lastBraceInKey(str) { - var len = str.length - , brace - , c; - for (var i = 0; i < len; ++i) { - c = str[i]; - if (']' == c) brace = false; - if ('[' == c) brace = true; - if ('=' == c && !brace) return i; - } -} - -/** - * Decode `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -function decode(str) { - try { - return decodeURIComponent(str.replace(/\+/g, ' ')); - } catch (err) { - return str; - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/package.json deleted file mode 100644 index 313485c0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "qs", - "description": "querystring parser", - "version": "0.6.6", - "keywords": [ - "query string", - "parser", - "component" - ], - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/node-querystring.git" - }, - "devDependencies": { - "mocha": "*", - "expect.js": "*" - }, - "scripts": { - "test": "make test" - }, - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - }, - "main": "index", - "engines": { - "node": "*" - }, - "readme": "# node-querystring\n\n query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others.\n\n## Installation\n\n $ npm install qs\n\n## Examples\n\n```js\nvar qs = require('qs');\n\nqs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com');\n// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } }\n\nqs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }})\n// => user[name]=Tobi&user[email]=tobi%40learnboost.com\n```\n\n## Testing\n\nInstall dev dependencies:\n\n $ npm install -d\n\nand execute:\n\n $ make test\n\nbrowser:\n\n $ open test/browser/index.html\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2010 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/node-querystring/issues" - }, - "homepage": "https://github.com/visionmedia/node-querystring", - "_id": "qs@0.6.6", - "_from": "qs@~0.6.0" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.jshintrc b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.jshintrc deleted file mode 100644 index 8fcead4f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.jshintrc +++ /dev/null @@ -1,72 +0,0 @@ -{ - // Settings - "passfail" : false, // Stop on first error. - "maxerr" : 100, // Maximum error before stopping. - - - // Predefined globals whom JSHint will ignore. - "browser" : false, // Standard browser globals e.g. `window`, `document`. - "node" : true, - "rhino" : false, - "couch" : false, - "wsh" : false, // Windows Scripting Host. - - "jquery" : false, - "prototypejs" : false, - "mootools" : false, - "dojo" : false, - - "predef" : [ // Custom globals. - "escape", "unescape" // aren't picked up by node flag above :/ - ], - - - // Development. - "debug" : false, // Allow debugger statements e.g. browser breakpoints. - "devel" : false, // Allow developments statements e.g. `console.log();`. - - - // EcmaScript 5. - "es5" : true, // Allow EcmaScript 5 syntax. - "esnext" : true, // Allow ES "next" syntax, specifically 'const' (V8 has this) - "strict" : false, // Require `use strict` pragma in every file. - "globalstrict" : false, // Allow global "use strict" (also enables 'strict'). - - - // The Good Parts. - "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons). - "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons. - "bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.). - "boss" : false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments. - "curly" : false, // Require {} for every new block or scope. - "eqeqeq" : false, // Require triple equals i.e. `===`. - "eqnull" : true, // Tolerate use of `== null`. - "evil" : false, // Tolerate use of `eval`. - "expr" : true, // Tolerate `ExpressionStatement` as Programs. - "forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`. - "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` - "latedef" : false, // Prohibit variable use before definition. - "loopfunc" : false, // Allow functions to be defined within loops. - "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`. - "regexp" : true, // Prohibit `.` and `[^...]` in regular expressions. - "regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`. - "scripturl" : true, // Tolerate script-targeted URLs. - "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`. - "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`. - "undef" : true, // Require all non-global variables be declared before they are used. - - - // Personal styling prefrences. - "lastsemic" : true, // Prohibit missing semicolon for the last statement in a one-line block - "newcap" : false, // Require capitalization of all constructor functions e.g. `new F()`. - "noempty" : true, // Prohipit use of empty blocks. - "nonew" : true, // Prohibit use of constructors for side-effects. - "nomen" : false, // Prohibit use of initial or trailing underbars in names. - "onevar" : false, // Allow only one `var` statement per function. - "onecase" : false, // Allow switches with one case statement - "plusplus" : false, // Prohibit use of `++` & `--`. - "proto" : false, // Allow use of __proto__ - "sub" : true, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`. - "trailing" : true, // Prohibit trailing whitespaces. - "white" : false // Check against strict whitespace and indentation rules. -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.npmignore deleted file mode 100644 index 54efff98..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules/ -.*.sw[nmop] -npm-debug.log diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/LICENSE deleted file mode 100644 index 3fac4c85..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/LICENSE +++ /dev/null @@ -1,78 +0,0 @@ -Copyright GoInstant, Inc. and other contributors. All rights reserved. -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. - -The following exceptions apply: - -=== - -`pubSufTest()` of generate-pubsuffix.js is in the public domain. - - // Any copyright is dedicated to the Public Domain. - // http://creativecommons.org/publicdomain/zero/1.0/ - -=== - -`public-suffix.txt` was obtained from -<https://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat?raw=1> -via <http://publicsuffix.org>. - -That file contains the usual Mozilla triple-license, for which this project uses it -under the terms of the MPL 1.1: - - // ***** BEGIN LICENSE BLOCK ***** - // Version: MPL 1.1/GPL 2.0/LGPL 2.1 - // - // The contents of this file are subject to the Mozilla Public License Version - // 1.1 (the "License"); you may not use this file except in compliance with - // the License. You may obtain a copy of the License at - // http://www.mozilla.org/MPL/ - // - // Software distributed under the License is distributed on an "AS IS" basis, - // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - // for the specific language governing rights and limitations under the - // License. - // - // The Original Code is the Public Suffix List. - // - // The Initial Developer of the Original Code is - // Jo Hermans <jo.hermans@gmail.com>. - // Portions created by the Initial Developer are Copyright (C) 2007 - // the Initial Developer. All Rights Reserved. - // - // Contributor(s): - // Ruben Arakelyan <ruben@rubenarakelyan.com> - // Gervase Markham <gerv@gerv.net> - // Pamela Greene <pamg.bugs@gmail.com> - // David Triendl <david@triendl.name> - // Jothan Frakes <jothan@gmail.com> - // The kind representatives of many TLD registries - // - // Alternatively, the contents of this file may be used under the terms of - // either the GNU General Public License Version 2 or later (the "GPL"), or - // the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - // in which case the provisions of the GPL or the LGPL are applicable instead - // of those above. If you wish to allow use of your version of this file only - // under the terms of either the GPL or the LGPL, and not to allow others to - // use your version of this file under the terms of the MPL, indicate your - // decision by deleting the provisions above and replace them with the notice - // and other provisions required by the GPL or the LGPL. If you do not delete - // the provisions above, a recipient may use your version of this file under - // the terms of any one of the MPL, the GPL or the LGPL. - // - // ***** END LICENSE BLOCK ***** diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/README.md deleted file mode 100644 index fd1dbb1d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/README.md +++ /dev/null @@ -1,380 +0,0 @@ -[RFC6265](http://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js - -![Tough Cookie](http://www.goinstant.com.s3.amazonaws.com/tough-cookie.jpg) - -# Synopsis - -``` javascript -var cookies = require('tough-cookie'); // note: not 'cookie', 'cookies' or 'node-cookie' -var Cookie = cookies.Cookie; -var cookie = Cookie.parse(header); -cookie.value = 'somethingdifferent'; -header = cookie.toString(); - -var cookiejar = new cookies.CookieJar(); -cookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb); -// ... -cookiejar.getCookies('http://example.com/otherpath',function(err,cookies) { - res.headers['cookie'] = cookies.join('; '); -}); -``` - -# Installation - -It's _so_ easy! - -`npm install tough-cookie` - -Requires `punycode`, which should get installed automatically for you. Note that node.js v0.6.2+ bundles punycode by default. - -Why the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken. - -# API - -cookies -======= - -Functions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be "bound". - -parseDate(string[,strict]) ------------------ - -Parse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. If strict is set to true then leading/trailing non-seperator characters around the time part will cause the parsing to fail (e.g. "Thu, 01 Jan 1970 00:00:010 GMT" has an extra trailing zero but Chrome, an assumedly RFC-compliant browser, treats this as valid). - -formatDate(date) ----------------- - -Format a Date into a RFC1123 string (the RFC6265-recommended format). - -canonicalDomain(str) --------------------- - -Transforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects). - -domainMatch(str,domStr[,canonicalize=true]) -------------------------------------------- - -Answers "does this real domain match the domain in a cookie?". The `str` is the "current" domain-name and the `domStr` is the "cookie" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a "suffix match". - -The `canonicalize` parameter will run the other two paramters through `canonicalDomain` or not. - -defaultPath(path) ------------------ - -Given a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the "directory" of a "file" in the path, but is specified by Section 5.1.4 of the RFC. - -The `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output. - -pathMatch(reqPath,cookiePath) ------------------------------ - -Answers "does the request-path path-match a given cookie-path?" as per RFC6265 Section 5.1.4. Returns a boolean. - -This is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`. - -parse(header[,strict=false]) ----------------------------- - -alias for `Cookie.parse(header[,strict])` - -fromJSON(string) ----------------- - -alias for `Cookie.fromJSON(string)` - -getPublicSuffix(hostname) -------------------------- - -Returns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it. - -For example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`. - -For further information, see http://publicsuffix.org/. This module derives its list from that site. - -cookieCompare(a,b) ------------------- - -For use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). Longest `.path`s go first, then sorted oldest to youngest. - -``` javascript -var cookies = [ /* unsorted array of Cookie objects */ ]; -cookies = cookies.sort(cookieCompare); -``` - -permuteDomain(domain) ---------------------- - -Generates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores. - - -permutePath(path) ------------------ - -Generates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores. - -Cookie -====== - -Cookie.parse(header[,strict=false]) ------------------------------------ - -Parses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. If in strict mode, returns `undefined` if the cookie doesn't follow the guidelines in section 4 of RFC6265. Generally speaking, strict mode can be used to validate your own generated Set-Cookie headers, but acting as a client you want to be lenient and leave strict mode off. - -Here's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response: - -``` javascript -if (res.headers['set-cookie'] instanceof Array) - cookies = res.headers['set-cookie'].map(Cookie.parse); -else - cookies = [Cookie.parse(res.headers['set-cookie'])]; -``` - -Cookie.fromJSON(string) ------------------------ - -Convert a JSON string to a `Cookie` object. Does a `JSON.parse()` and converts the `.created`, `.lastAccessed` and `.expires` properties into `Date` objects. - -Properties -========== - - * _key_ - string - the name or key of the cookie (default "") - * _value_ - string - the value of the cookie (default "") - * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `"Infinity"`). See `setExpires()` - * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `"Infinity"` and `"-Infinity"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()` - * _domain_ - string - the `Domain=` attribute of the cookie - * _path_ - string - the `Path=` of the cookie - * _secure_ - boolean - the `Secure` cookie flag - * _httpOnly_ - boolean - the `HttpOnly` cookie flag - * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside) - -After a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes: - - * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied) - * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one. - * _created_ - `Date` - when this cookie was added to the jar - * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute. - -Construction([{options}]) ------------- - -Receives an options object that can contain any Cookie properties, uses the default for unspecified properties. - -.toString() ------------ - -encode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`. - -.cookieString() ---------------- - -encode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '='). - -.setExpires(String) -------------------- - -sets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `"Infinity"` (a string) is set. - -.setMaxAge(number) -------------------- - -sets the maxAge in seconds. Coerces `-Infinity` to `"-Infinity"` and `Infinity` to `"Infinity"` so it JSON serializes correctly. - -.expiryTime([now=Date.now()]) ------------------------------ - -.expiryDate([now=Date.now()]) ------------------------------ - -expiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds. - -Max-Age takes precedence over Expires (as per the RFC). The `.created` attribute -- or, by default, the `now` paramter -- is used to offset the `.maxAge` attribute. - -If Expires (`.expires`) is set, that's returned. - -Otherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for "Tue, 19 Jan 2038 03:14:07 GMT" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents). - -.TTL([now=Date.now()]) ---------- - -compute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply. - -The "number" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned. - -.canonicalizedDoman() ---------------------- - -.cdomain() ----------- - -return the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters. - -.validate() ------------ - -Status: *IN PROGRESS*. Works for a few things, but is by no means comprehensive. - -validates cookie attributes for semantic correctness. Useful for "lint" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct: - -``` javascript -if (cookie.validate() === true) { - // it's tasty -} else { - // yuck! -} -``` - -CookieJar -========= - -Construction([store = new MemoryCookieStore()][, rejectPublicSuffixes]) ------------- - -Simply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used. - - -Attributes ----------- - - * _rejectPublicSuffixes_ - boolean - reject cookies with domains like "com" and "co.uk" (default: `true`) - -Since eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods. - -.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie)) -------------------------------------------------------------------- - -Attempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.created`, `.lastAccessed` and `.hostOnly` properties. - -The `options` object can be omitted and can have the following properties: - - * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies. - * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`. - * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies - * _strict_ - boolean - default `false` - perform extra checks - * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. CookieStore errors aren't ignored by this option. - -As per the RFC, the `.hostOnly` property is set if there was no "Domain=" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual). - -.storeCookie(cookie, [{options},] cb(err,cookie)) -------------------------------------------------- - -__REMOVED__ removed in lieu of the CookieStore API below - -.getCookies(currentUrl, [{options},] cb(err,cookies)) ------------------------------------------------------ - -Retrieve the list of cookies that can be sent in a Cookie header for the current url. - -If an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given. - -The `options` object can be omitted and can have the following properties: - - * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies. - * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`. - * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies - * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially). - * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the CookieStore `fetchCookies` function (the default MemoryCookieStore supports it). - -The `.lastAccessed` property of the returned cookies will have been updated. - -.getCookieString(...) ---------------------- - -Accepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`. - -.getSetCookieStrings(...) -------------------------- - -Accepts the same options as `.getCookies()` but passes an array of strings suitable for Set-Cookie headers (rather than an array of `Cookie`s) to the callback. Simply maps the cookie array via `.toString()`. - -# CookieStore API - -The storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores. - -All `domain` parameters will have been normalized before calling. - -The Cookie store must have all of the following methods. - -store.findCookie(domain, path, key, cb(err,cookie)) ---------------------------------------------------- - -Retrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned. - -Callback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error). - -store.findCookies(domain, path, cb(err,cookies)) ------------------------------------------------- - -Locates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above. - -If no cookies are found, the callback MUST be passed an empty array. - -The resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done. - -As of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only). - -store.putCookie(cookie, cb(err)) --------------------------------- - -Adds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur. - -The `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties. - -Pass an error if the cookie cannot be stored. - -store.updateCookie(oldCookie, newCookie, cb(err)) -------------------------------------------------- - -Update an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store. - -The `.lastAccessed` property will always be different between the two objects and `.created` will always be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are sorted (or selected for deletion). - -Stores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object. - -The `newCookie` and `oldCookie` objects MUST NOT be modified. - -Pass an error if the newCookie cannot be stored. - -store.removeCookie(domain, path, key, cb(err)) ----------------------------------------------- - -Remove a cookie from the store (see notes on `findCookie` about the uniqueness constraint). - -The implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie. - -store.removeCookies(domain, path, cb(err)) ------------------------------------------- - -Removes matching cookies from the store. The `path` paramter is optional, and if missing means all paths in a domain should be removed. - -Pass an error ONLY if removing any existing cookies failed. - -# TODO - - * _full_ RFC5890/RFC5891 canonicalization for domains in `cdomain()` - * the optional `punycode` requirement implements RFC3492, but RFC6265 requires RFC5891 - * better tests for `validate()`? - -# Copyright and License - -(tl;dr: MIT with some MPL/1.1) - -Copyright GoInstant, Inc. and other contributors. All rights reserved. -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. - -Portions may be licensed under different licenses (in particular public-suffix.txt is MPL/1.1); please read the LICENSE file for full details. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js deleted file mode 100644 index a7fa5452..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Copyright GoInstant, Inc. and other contributors. All rights reserved. - * 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. - */ - -var fs = require('fs'); -var assert = require('assert'); -var punycode = require('punycode'); - -fs.readFile('./public-suffix.txt', 'utf8', function(err,string) { - if (err) throw err; - var lines = string.split("\n"); - process.nextTick(function() { - processList(lines); - }); -}); - -var index = {}; - -var COMMENT = new RegExp('//.+'); -function processList(lines) { - while (lines.length) { - var line = lines.shift(); - line = line.replace(COMMENT,'').trim(); - if (!line) continue; - addToIndex(index,line); - } - - pubSufTest(); - - var w = fs.createWriteStream('./lib/pubsuffix.js',{ - flags: 'w', - encoding: 'utf8', - mode: 0644, - }); - w.on('end', process.exit); - w.write("/****************************************************\n"); - w.write(" * AUTOMATICALLY GENERATED by generate-pubsuffix.js *\n"); - w.write(" * DO NOT EDIT! *\n"); - w.write(" ****************************************************/\n\n"); - - w.write("module.exports.getPublicSuffix = "); - w.write(getPublicSuffix.toString()); - w.write(";\n\n"); - - w.write("// The following generated structure is used under the MPL version 1.1\n"); - w.write("// See public-suffix.txt for more information\n\n"); - w.write("var index = module.exports.index = Object.freeze(\n"); - w.write(JSON.stringify(index)); - w.write(");\n\n"); - w.write("// END of automatically generated file\n"); - - w.end(); -} - -function addToIndex(index,line) { - var prefix = ''; - if (line.replace(/^(!|\*\.)/)) { - prefix = RegExp.$1; - line = line.slice(prefix.length); - } - line = prefix + punycode.toASCII(line); - - if (line.substr(0,1) == '!') - index[line.substr(1)] = false; - else - index[line] = true; -} - -// include the licence in the function since it gets written to pubsuffix.js -function getPublicSuffix(domain) { - /* - * Copyright GoInstant, Inc. and other contributors. All rights reserved. - * 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. - */ - if (!domain) return null; - if (domain.match(/^\./)) return null; - - domain = domain.toLowerCase(); - var parts = domain.split('.').reverse(); - - var suffix = ''; - var suffixLen = 0; - for (var i=0; i<parts.length; i++) { - var part = parts[i]; - var starstr = '*'+suffix; - var partstr = part+suffix; - - if (index[starstr]) { // star rule matches - suffixLen = i+1; - if (index[partstr] === false) { // exception rule matches (NB: false, not undefined) - suffixLen--; - } - } else if (index[partstr]) { // exact match, not exception - suffixLen = i+1; - } - - suffix = '.'+part+suffix; - } - - if (index['*'+suffix]) { // *.domain exists (e.g. *.kyoto.jp for domain='kyoto.jp'); - return null; - } - - if (suffixLen && parts.length > suffixLen) { - return parts.slice(0,suffixLen+1).reverse().join('.'); - } - - return null; -} - -function checkPublicSuffix(give,get) { - var got = getPublicSuffix(give); - assert.equal(got, get, give+' should be '+(get==null?'NULL':get)+' but got '+got); -} - -// pubSufTest() was converted to JavaScript from http://publicsuffix.org/list/test.txt -function pubSufTest() { - // For this function-scope and this function-scope ONLY: - // Any copyright is dedicated to the Public Domain. - // http://creativecommons.org/publicdomain/zero/1.0/ - - // NULL input. - checkPublicSuffix(null, null); - // Mixed case. - checkPublicSuffix('COM', null); - checkPublicSuffix('example.COM', 'example.com'); - checkPublicSuffix('WwW.example.COM', 'example.com'); - // Leading dot. - checkPublicSuffix('.com', null); - checkPublicSuffix('.example', null); - checkPublicSuffix('.example.com', null); - checkPublicSuffix('.example.example', null); - // Unlisted TLD. - checkPublicSuffix('example', null); - checkPublicSuffix('example.example', null); - checkPublicSuffix('b.example.example', null); - checkPublicSuffix('a.b.example.example', null); - // Listed, but non-Internet, TLD. - checkPublicSuffix('local', null); - checkPublicSuffix('example.local', null); - checkPublicSuffix('b.example.local', null); - checkPublicSuffix('a.b.example.local', null); - // TLD with only 1 rule. - checkPublicSuffix('biz', null); - checkPublicSuffix('domain.biz', 'domain.biz'); - checkPublicSuffix('b.domain.biz', 'domain.biz'); - checkPublicSuffix('a.b.domain.biz', 'domain.biz'); - // TLD with some 2-level rules. - checkPublicSuffix('com', null); - checkPublicSuffix('example.com', 'example.com'); - checkPublicSuffix('b.example.com', 'example.com'); - checkPublicSuffix('a.b.example.com', 'example.com'); - checkPublicSuffix('uk.com', null); - checkPublicSuffix('example.uk.com', 'example.uk.com'); - checkPublicSuffix('b.example.uk.com', 'example.uk.com'); - checkPublicSuffix('a.b.example.uk.com', 'example.uk.com'); - checkPublicSuffix('test.ac', 'test.ac'); - // TLD with only 1 (wildcard) rule. - checkPublicSuffix('cy', null); - checkPublicSuffix('c.cy', null); - checkPublicSuffix('b.c.cy', 'b.c.cy'); - checkPublicSuffix('a.b.c.cy', 'b.c.cy'); - // More complex TLD. - checkPublicSuffix('jp', null); - checkPublicSuffix('test.jp', 'test.jp'); - checkPublicSuffix('www.test.jp', 'test.jp'); - checkPublicSuffix('ac.jp', null); - checkPublicSuffix('test.ac.jp', 'test.ac.jp'); - checkPublicSuffix('www.test.ac.jp', 'test.ac.jp'); - checkPublicSuffix('kyoto.jp', null); - checkPublicSuffix('c.kyoto.jp', null); - checkPublicSuffix('b.c.kyoto.jp', 'b.c.kyoto.jp'); - checkPublicSuffix('a.b.c.kyoto.jp', 'b.c.kyoto.jp'); - checkPublicSuffix('pref.kyoto.jp', 'pref.kyoto.jp'); // Exception rule. - checkPublicSuffix('www.pref.kyoto.jp', 'pref.kyoto.jp'); // Exception rule. - checkPublicSuffix('city.kyoto.jp', 'city.kyoto.jp'); // Exception rule. - checkPublicSuffix('www.city.kyoto.jp', 'city.kyoto.jp'); // Exception rule. - // TLD with a wildcard rule and exceptions. - checkPublicSuffix('om', null); - checkPublicSuffix('test.om', null); - checkPublicSuffix('b.test.om', 'b.test.om'); - checkPublicSuffix('a.b.test.om', 'b.test.om'); - checkPublicSuffix('songfest.om', 'songfest.om'); - checkPublicSuffix('www.songfest.om', 'songfest.om'); - // US K12. - checkPublicSuffix('us', null); - checkPublicSuffix('test.us', 'test.us'); - checkPublicSuffix('www.test.us', 'test.us'); - checkPublicSuffix('ak.us', null); - checkPublicSuffix('test.ak.us', 'test.ak.us'); - checkPublicSuffix('www.test.ak.us', 'test.ak.us'); - checkPublicSuffix('k12.ak.us', null); - checkPublicSuffix('test.k12.ak.us', 'test.k12.ak.us'); - checkPublicSuffix('www.test.k12.ak.us', 'test.k12.ak.us'); - - -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/cookie.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/cookie.js deleted file mode 100644 index 1d8615b5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/cookie.js +++ /dev/null @@ -1,947 +0,0 @@ -/* - * Copyright GoInstant, Inc. and other contributors. All rights reserved. - * 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. - */ - -/*jshint regexp:false */ -var net = require('net'); -var urlParse = require('url').parse; -var pubsuffix = require('./pubsuffix'); - -var punycode; -try { - punycode = require('punycode'); -} catch(e) { - console.warn("cookie: can't load punycode; won't use punycode for domain normalization"); -} - -var DATE_DELIM = /[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/; - -// From RFC2616 S2.2: -var TOKEN = /[\x21\x23-\x26\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E-\x7A\x7C\x7E]/; - -// From RFC6265 S4.1.1 -// note that it excludes \x3B ";" -var COOKIE_OCTET = /[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]/; -var COOKIE_OCTETS = /^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/; - -// The name/key cannot be empty but the value can (S5.2): -var COOKIE_PAIR_STRICT = new RegExp('^('+TOKEN.source+'+)=("?)('+COOKIE_OCTET.source+'*)\\2'); -var COOKIE_PAIR = /^([^=\s]+)\s*=\s*("?)\s*(.*)\s*\2/; - -// RFC6265 S4.1.1 defines extension-av as 'any CHAR except CTLs or ";"' -// Note ';' is \x3B -var NON_CTL_SEMICOLON = /[\x20-\x3A\x3C-\x7E]+/; -var EXTENSION_AV = NON_CTL_SEMICOLON; -var PATH_VALUE = NON_CTL_SEMICOLON; - -// Used for checking whether or not there is a trailing semi-colon -var TRAILING_SEMICOLON = /;+$/; - -/* RFC6265 S5.1.1.5: - * [fail if] the day-of-month-value is less than 1 or greater than 31 - */ -var DAY_OF_MONTH = /^(0?[1-9]|[12][0-9]|3[01])$/; - -/* RFC6265 S5.1.1.5: - * [fail if] - * * the hour-value is greater than 23, - * * the minute-value is greater than 59, or - * * the second-value is greater than 59. - */ -var TIME = /(0?[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])/; -var STRICT_TIME = /^(0?[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/; - -var MONTH = /^(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)$/i; -var MONTH_TO_NUM = { - jan:0, feb:1, mar:2, apr:3, may:4, jun:5, jul:6, aug:7, sep:8, oct:9, nov:10, dec:11 -}; -var NUM_TO_MONTH = [ - 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec' -]; -var NUM_TO_DAY = [ - 'Sun','Mon','Tue','Wed','Thu','Fri','Sat' -]; - -var YEAR = /^([1-9][0-9]{1,3})$/; // 2 to 4 digits (will check range when parsing) - -var MAX_TIME = 2147483647000; // 31-bit max -var MAX_DATE = new Date(CookieJar.MAX_TIME); // 31-bit max -var MIN_TIME = 0; // 31-bit min -var MIN_DATE = new Date(CookieJar.MIN_TIME); // 31-bit min - - -// RFC6265 S5.1.1 date parser: -function parseDate(str,strict) { - if (!str) return; - var found_time, found_dom, found_month, found_year; - - /* RFC6265 S5.1.1: - * 2. Process each date-token sequentially in the order the date-tokens - * appear in the cookie-date - */ - var tokens = str.split(DATE_DELIM); - if (!tokens) return; - - var date = new Date(); - date.setMilliseconds(0); - - for (var i=0; i<tokens.length; i++) { - var token = tokens[i].trim(); - if (!token.length) continue; - - var result; - - /* 2.1. If the found-time flag is not set and the token matches the time - * production, set the found-time flag and set the hour- value, - * minute-value, and second-value to the numbers denoted by the digits in - * the date-token, respectively. Skip the remaining sub-steps and continue - * to the next date-token. - */ - if (!found_time) { - result = (strict ? STRICT_TIME : TIME).exec(token); - if (result) { - found_time = true; - date.setUTCHours(result[1]); - date.setUTCMinutes(result[2]); - date.setUTCSeconds(result[3]); - continue; - } - } - - /* 2.2. If the found-day-of-month flag is not set and the date-token matches - * the day-of-month production, set the found-day-of- month flag and set - * the day-of-month-value to the number denoted by the date-token. Skip - * the remaining sub-steps and continue to the next date-token. - */ - if (!found_dom) { - result = DAY_OF_MONTH.exec(token); - if (result) { - found_dom = true; - date.setUTCDate(result[1]); - continue; - } - } - - /* 2.3. If the found-month flag is not set and the date-token matches the - * month production, set the found-month flag and set the month-value to - * the month denoted by the date-token. Skip the remaining sub-steps and - * continue to the next date-token. - */ - if (!found_month) { - result = MONTH.exec(token); - if (result) { - found_month = true; - date.setUTCMonth(MONTH_TO_NUM[result[1].toLowerCase()]); - continue; - } - } - - /* 2.4. If the found-year flag is not set and the date-token matches the year - * production, set the found-year flag and set the year-value to the number - * denoted by the date-token. Skip the remaining sub-steps and continue to - * the next date-token. - */ - if (!found_year) { - result = YEAR.exec(token); - if (result) { - var year = result[0]; - /* From S5.1.1: - * 3. If the year-value is greater than or equal to 70 and less - * than or equal to 99, increment the year-value by 1900. - * 4. If the year-value is greater than or equal to 0 and less - * than or equal to 69, increment the year-value by 2000. - */ - if (70 <= year && year <= 99) - year += 1900; - else if (0 <= year && year <= 69) - year += 2000; - - if (year < 1601) - return; // 5. ... the year-value is less than 1601 - - found_year = true; - date.setUTCFullYear(year); - continue; - } - } - } - - if (!(found_time && found_dom && found_month && found_year)) { - return; // 5. ... at least one of the found-day-of-month, found-month, found- - // year, or found-time flags is not set, - } - - return date; -} - -function formatDate(date) { - var d = date.getUTCDate(); d = d >= 10 ? d : '0'+d; - var h = date.getUTCHours(); h = h >= 10 ? h : '0'+h; - var m = date.getUTCMinutes(); m = m >= 10 ? m : '0'+m; - var s = date.getUTCSeconds(); s = s >= 10 ? s : '0'+s; - return NUM_TO_DAY[date.getUTCDay()] + ', ' + - d+' '+ NUM_TO_MONTH[date.getUTCMonth()] +' '+ date.getUTCFullYear() +' '+ - h+':'+m+':'+s+' GMT'; -} - -// S5.1.2 Canonicalized Host Names -function canonicalDomain(str) { - if (str == null) return null; - str = str.trim().replace(/^\./,''); // S4.1.2.3 & S5.2.3: ignore leading . - - // convert to IDN if any non-ASCII characters - if (punycode && /[^\u0001-\u007f]/.test(str)) - str = punycode.toASCII(str); - - return str.toLowerCase(); -} - -// S5.1.3 Domain Matching -function domainMatch(str, domStr, canonicalize) { - if (str == null || domStr == null) return null; - if (canonicalize !== false) { - str = canonicalDomain(str); - domStr = canonicalDomain(domStr); - } - - /* - * "The domain string and the string are identical. (Note that both the - * domain string and the string will have been canonicalized to lower case at - * this point)" - */ - if (str == domStr) return true; - - /* "All of the following [three] conditions hold:" (order adjusted from the RFC) */ - - /* "* The string is a host name (i.e., not an IP address)." */ - if (net.isIP(str)) return false; - - /* "* The domain string is a suffix of the string" */ - var idx = str.indexOf(domStr); - if (idx <= 0) return false; // it's a non-match (-1) or prefix (0) - - // e.g "a.b.c".indexOf("b.c") === 2 - // 5 === 3+2 - if (str.length !== domStr.length + idx) // it's not a suffix - return false; - - /* "* The last character of the string that is not included in the domain - * string is a %x2E (".") character." */ - if (str.substr(idx-1,1) !== '.') return false; - return true; -} - - -// RFC6265 S5.1.4 Paths and Path-Match - -/* - * "The user agent MUST use an algorithm equivalent to the following algorithm - * to compute the default-path of a cookie:" - * - * Assumption: the path (and not query part or absolute uri) is passed in. - */ -function defaultPath(path) { - // "2. If the uri-path is empty or if the first character of the uri-path is not - // a %x2F ("/") character, output %x2F ("/") and skip the remaining steps. - if (!path || path.substr(0,1) !== "/") return "/"; - - // "3. If the uri-path contains no more than one %x2F ("/") character, output - // %x2F ("/") and skip the remaining step." - if (path === "/") return path; - - var rightSlash = path.lastIndexOf("/"); - if (rightSlash === 0) return "/"; - - // "4. Output the characters of the uri-path from the first character up to, - // but not including, the right-most %x2F ("/")." - return path.slice(0, rightSlash); -} - -/* - * "A request-path path-matches a given cookie-path if at least one of the - * following conditions holds:" - */ -function pathMatch(reqPath,cookiePath) { - // "o The cookie-path and the request-path are identical." - if (cookiePath === reqPath) - return true; - - var idx = reqPath.indexOf(cookiePath); - if (idx === 0) { - // "o The cookie-path is a prefix of the request-path, and the last - // character of the cookie-path is %x2F ("/")." - if (cookiePath.substr(-1) === "/") - return true; - - // " o The cookie-path is a prefix of the request-path, and the first - // character of the request-path that is not included in the cookie- path - // is a %x2F ("/") character." - if (reqPath.substr(cookiePath.length,1) === "/") - return true; - } - - return false; -} - -function parse(str, strict) { - str = str.trim(); - - // S4.1.1 Trailing semi-colons are not part of the specification. - // If we are not in strict mode we remove the trailing semi-colons. - var semiColonCheck = TRAILING_SEMICOLON.exec(str); - if (semiColonCheck) { - if (strict) return; - str = str.slice(0, semiColonCheck.index); - } - - // We use a regex to parse the "name-value-pair" part of S5.2 - var firstSemi = str.indexOf(';'); // S5.2 step 1 - var pairRx = strict ? COOKIE_PAIR_STRICT : COOKIE_PAIR; - var result = pairRx.exec(firstSemi === -1 ? str : str.substr(0,firstSemi)); - - // Rx satisfies the "the name string is empty" and "lacks a %x3D ("=")" - // constraints as well as trimming any whitespace. - if (!result) return; - - var c = new Cookie(); - c.key = result[1]; // the regexp should trim() already - c.value = result[3]; // [2] is quotes or empty-string - - if (firstSemi === -1) return c; - - // S5.2.3 "unparsed-attributes consist of the remainder of the set-cookie-string - // (including the %x3B (";") in question)." plus later on in the same section - // "discard the first ";" and trim". - var unparsed = str.slice(firstSemi).replace(/^\s*;\s*/,'').trim(); - - // "If the unparsed-attributes string is empty, skip the rest of these - // steps." - if (unparsed.length === 0) return c; - - /* - * S5.2 says that when looping over the items "[p]rocess the attribute-name - * and attribute-value according to the requirements in the following - * subsections" for every item. Plus, for many of the individual attributes - * in S5.3 it says to use the "attribute-value of the last attribute in the - * cookie-attribute-list". Therefore, in this implementation, we overwrite - * the previous value. - */ - var cookie_avs = unparsed.split(/\s*;\s*/); - while (cookie_avs.length) { - var av = cookie_avs.shift(); - - if (strict && !EXTENSION_AV.test(av)) return; - - var av_sep = av.indexOf('='); - var av_key, av_value; - if (av_sep === -1) { - av_key = av; - av_value = null; - } else { - av_key = av.substr(0,av_sep); - av_value = av.substr(av_sep+1); - } - - av_key = av_key.trim().toLowerCase(); - if (av_value) av_value = av_value.trim(); - - switch(av_key) { - case 'expires': // S5.2.1 - if (!av_value) { if(strict){return}else{break;} } - var exp = parseDate(av_value,strict); - // "If the attribute-value failed to parse as a cookie date, ignore the - // cookie-av." - if (exp == null) { if(strict){return}else{break;} } - c.expires = exp; - // over and underflow not realistically a concern: V8's getTime() seems to - // store something larger than a 32-bit time_t (even with 32-bit node) - break; - - case 'max-age': // S5.2.2 - if (!av_value) { if(strict){return}else{break;} } - // "If the first character of the attribute-value is not a DIGIT or a "-" - // character ...[or]... If the remainder of attribute-value contains a - // non-DIGIT character, ignore the cookie-av." - if (!/^-?[0-9]+$/.test(av_value)) { if(strict){return}else{break;} } - var delta = parseInt(av_value,10); - if (strict && delta <= 0) return; // S4.1.1 - // "If delta-seconds is less than or equal to zero (0), let expiry-time - // be the earliest representable date and time." - c.setMaxAge(delta); - break; - - case 'domain': // S5.2.3 - // "If the attribute-value is empty, the behavior is undefined. However, - // the user agent SHOULD ignore the cookie-av entirely." - if (!av_value) { if(strict){return}else{break;} } - // S5.2.3 "Let cookie-domain be the attribute-value without the leading %x2E - // (".") character." - var domain = av_value.trim().replace(/^\./,''); - if (!domain) { if(strict){return}else{break;} } // see "is empty" above - // "Convert the cookie-domain to lower case." - c.domain = domain.toLowerCase(); - break; - - case 'path': // S5.2.4 - /* - * "If the attribute-value is empty or if the first character of the - * attribute-value is not %x2F ("/"): - * Let cookie-path be the default-path. - * Otherwise: - * Let cookie-path be the attribute-value." - * - * We'll represent the default-path as null since it depends on the - * context of the parsing. - */ - if (!av_value || av_value.substr(0,1) != "/") { if(strict){return}else{break;} } - c.path = av_value; - break; - - case 'secure': // S5.2.5 - /* - * "If the attribute-name case-insensitively matches the string "Secure", - * the user agent MUST append an attribute to the cookie-attribute-list - * with an attribute-name of Secure and an empty attribute-value." - */ - if (av_value != null) { if(strict){return} } - c.secure = true; - break; - - case 'httponly': // S5.2.6 -- effectively the same as 'secure' - if (av_value != null) { if(strict){return} } - c.httpOnly = true; - break; - - default: - c.extensions = c.extensions || []; - c.extensions.push(av); - break; - } - } - - // ensure a default date for sorting: - c.creation = new Date(); - return c; -} - -function fromJSON(str) { - if (!str) return null; - - var obj; - try { - obj = JSON.parse(str); - } catch (e) { - return null; - } - - var c = new Cookie(); - for (var i=0; i<numCookieProperties; i++) { - var prop = cookieProperties[i]; - if (obj[prop] == null) continue; - if (prop === 'expires' || - prop === 'creation' || - prop === 'lastAccessed') - { - c[prop] = obj[prop] == "Infinity" ? "Infinity" : new Date(obj[prop]); - } else { - c[prop] = obj[prop]; - } - } - - - // ensure a default date for sorting: - c.creation = c.creation || new Date(); - - return c; -} - -/* Section 5.4 part 2: - * "* Cookies with longer paths are listed before cookies with - * shorter paths. - * - * * Among cookies that have equal-length path fields, cookies with - * earlier creation-times are listed before cookies with later - * creation-times." - */ - -function cookieCompare(a,b) { - // descending for length: b CMP a - var deltaLen = (b.path ? b.path.length : 0) - (a.path ? a.path.length : 0); - if (deltaLen !== 0) return deltaLen; - // ascending for time: a CMP b - return (a.creation ? a.creation.getTime() : MAX_TIME) - - (b.creation ? b.creation.getTime() : MAX_TIME); -} - -// Gives the permutation of all possible domainMatch()es of a given domain. The -// array is in shortest-to-longest order. Handy for indexing. -function permuteDomain(domain) { - var pubSuf = pubsuffix.getPublicSuffix(domain); - if (!pubSuf) return null; - if (pubSuf == domain) return [domain]; - - var prefix = domain.slice(0,-(pubSuf.length+1)); // ".example.com" - var parts = prefix.split('.').reverse(); - var cur = pubSuf; - var permutations = [cur]; - while (parts.length) { - cur = parts.shift()+'.'+cur; - permutations.push(cur); - } - return permutations; -} - -// Gives the permutation of all possible pathMatch()es of a given path. The -// array is in longest-to-shortest order. Handy for indexing. -function permutePath(path) { - var origPath = path; - if (path === '/') return ['/']; - if (path.lastIndexOf('/') === path.length-1) - path = path.substr(0,path.length-1); - var permutations = [path]; - while (path.length > 1) { - var lindex = path.lastIndexOf('/'); - if (lindex === 0) break; - path = path.substr(0,lindex); - permutations.push(path); - } - permutations.push('/'); - return permutations; -} - - -function Cookie (opts) { - if (typeof opts !== "object") return; - Object.keys(opts).forEach(function (key) { - if (Cookie.prototype.hasOwnProperty(key)) { - this[key] = opts[key] || Cookie.prototype[key]; - } - }.bind(this)); -} - -Cookie.parse = parse; -Cookie.fromJSON = fromJSON; - -Cookie.prototype.key = ""; -Cookie.prototype.value = ""; - -// the order in which the RFC has them: -Cookie.prototype.expires = "Infinity"; // coerces to literal Infinity -Cookie.prototype.maxAge = null; // takes precedence over expires for TTL -Cookie.prototype.domain = null; -Cookie.prototype.path = null; -Cookie.prototype.secure = false; -Cookie.prototype.httpOnly = false; -Cookie.prototype.extensions = null; - -// set by the CookieJar: -Cookie.prototype.hostOnly = null; // boolean when set -Cookie.prototype.pathIsDefault = null; // boolean when set -Cookie.prototype.creation = null; // Date when set; defaulted by Cookie.parse -Cookie.prototype.lastAccessed = null; // Date when set - -var cookieProperties = Object.freeze(Object.keys(Cookie.prototype).map(function(p) { - if (p instanceof Function) return; - return p; -})); -var numCookieProperties = cookieProperties.length; - -Cookie.prototype.inspect = function inspect() { - var now = Date.now(); - return 'Cookie="'+this.toString() + - '; hostOnly='+(this.hostOnly != null ? this.hostOnly : '?') + - '; aAge='+(this.lastAccessed ? (now-this.lastAccessed.getTime())+'ms' : '?') + - '; cAge='+(this.creation ? (now-this.creation.getTime())+'ms' : '?') + - '"'; -}; - -Cookie.prototype.validate = function validate() { - if (!COOKIE_OCTETS.test(this.value)) - return false; - if (this.expires != Infinity && !(this.expires instanceof Date) && !parseDate(this.expires,true)) - return false; - if (this.maxAge != null && this.maxAge <= 0) - return false; // "Max-Age=" non-zero-digit *DIGIT - if (this.path != null && !PATH_VALUE.test(this.path)) - return false; - - var cdomain = this.cdomain(); - if (cdomain) { - if (cdomain.match(/\.$/)) - return false; // S4.1.2.3 suggests that this is bad. domainMatch() tests confirm this - var suffix = pubsuffix.getPublicSuffix(cdomain); - if (suffix == null) // it's a public suffix - return false; - } - return true; -}; - -Cookie.prototype.setExpires = function setExpires(exp) { - if (exp instanceof Date) this.expires = exp; - else this.expires = parseDate(exp) || "Infinity"; -}; - -Cookie.prototype.setMaxAge = function setMaxAge(age) { - if (age === Infinity || age === -Infinity) - this.maxAge = age.toString(); // so JSON.stringify() works - else - this.maxAge = age; -}; - -// gives Cookie header format -Cookie.prototype.cookieString = function cookieString() { - var val = this.value; - if (val == null) val = ''; - if (!val.length || COOKIE_OCTETS.test(val)) - return this.key+'='+val; - else - return this.key+'="'+val+'"'; -}; - -// gives Set-Cookie header format -Cookie.prototype.toString = function toString() { - var str = this.cookieString(); - - if (this.expires != Infinity) { - if (this.expires instanceof Date) - str += '; Expires='+formatDate(this.expires); - else - str += '; Expires='+this.expires; - } - - if (this.maxAge != null && this.maxAge != Infinity) - str += '; Max-Age='+this.maxAge; - - if (this.domain && !this.hostOnly) - str += '; Domain='+this.domain; - if (this.path) - str += '; Path='+this.path; - - if (this.secure) str += '; Secure'; - if (this.httpOnly) str += '; HttpOnly'; - if (this.extensions) { - this.extensions.forEach(function(ext) { - str += '; '+ext; - }); - } - - return str; -}; - -// TTL() partially replaces the "expiry-time" parts of S5.3 step 3 (setCookie() -// elsewhere) -// S5.3 says to give the "latest representable date" for which we use Infinity -// For "expired" we use 0 -Cookie.prototype.TTL = function TTL(now) { - /* RFC6265 S4.1.2.2 If a cookie has both the Max-Age and the Expires - * attribute, the Max-Age attribute has precedence and controls the - * expiration date of the cookie. - * (Concurs with S5.3 step 3) - */ - if (this.maxAge != null) { - return this.maxAge<=0 ? 0 : this.maxAge*1000; - } - - var expires = this.expires; - if (expires != Infinity) { - if (!(expires instanceof Date)) { - expires = parseDate(expires) || Infinity; - } - - if (expires == Infinity) - return Infinity; - - return expires.getTime() - (now || Date.now()); - } - - return Infinity; -}; - -// expiryTime() replaces the "expiry-time" parts of S5.3 step 3 (setCookie() -// elsewhere) -Cookie.prototype.expiryTime = function expiryTime(now) { - if (this.maxAge != null) { - var relativeTo = this.creation || now || new Date(); - var age = (this.maxAge <= 0) ? -Infinity : this.maxAge*1000; - return relativeTo.getTime() + age; - } - - if (this.expires == Infinity) return Infinity; - return this.expires.getTime(); -}; - -// expiryDate() replaces the "expiry-time" parts of S5.3 step 3 (setCookie() -// elsewhere), except it returns a Date -Cookie.prototype.expiryDate = function expiryDate(now) { - var millisec = this.expiryTime(now); - if (millisec == Infinity) return new Date(MAX_TIME); - else if (millisec == -Infinity) return new Date(MIN_TIME); - else return new Date(millisec); -}; - -// This replaces the "persistent-flag" parts of S5.3 step 3 -Cookie.prototype.isPersistent = function isPersistent() { - return (this.maxAge != null || this.expires != Infinity); -}; - -// Mostly S5.1.2 and S5.2.3: -Cookie.prototype.cdomain = -Cookie.prototype.canonicalizedDomain = function canonicalizedDomain() { - if (this.domain == null) return null; - return canonicalDomain(this.domain); -}; - - -var memstore; -function CookieJar(store, rejectPublicSuffixes) { - if (rejectPublicSuffixes != null) this.rejectPublicSuffixes = rejectPublicSuffixes; - if (!store) { - memstore = memstore || require('./memstore'); - store = new memstore.MemoryCookieStore(); - } - this.store = store; -} -CookieJar.prototype.store = null; -CookieJar.prototype.rejectPublicSuffixes = true; - -CookieJar.prototype.setCookie = function setCookie(cookie, url, options, cb) { - var err; - var context = (url instanceof Object) ? url : urlParse(url); - if (options instanceof Function) { - cb = options; - options = {}; - } - - var host = canonicalDomain(context.hostname); - - // S5.3 step 1 - if (!(cookie instanceof Cookie)) - cookie = Cookie.parse(cookie, options.strict === true); - if (!cookie) { - err = new Error("Cookie failed to parse"); - return cb(options.ignoreError ? null : err); - } - - // S5.3 step 2 - var now = options.now || new Date(); // will assign later to save effort in the face of errors - - // S5.3 step 3: NOOP; persistent-flag and expiry-time is handled by getCookie() - - // S5.3 step 4: NOOP; domain is null by default - - // S5.3 step 5: public suffixes - if (this.rejectPublicSuffixes && cookie.domain) { - var suffix = pubsuffix.getPublicSuffix(cookie.cdomain()); - if (suffix == null) { // e.g. "com" - err = new Error("Cookie has domain set to a public suffix"); - return cb(options.ignoreError ? null : err); - } - } - - // S5.3 step 6: - if (cookie.domain) { - if (!domainMatch(host, cookie.cdomain(), false)) { - err = new Error("Cookie not in this host's domain. Cookie:"+cookie.cdomain()+" Request:"+host); - return cb(options.ignoreError ? null : err); - } - - if (cookie.hostOnly == null) // don't reset if already set - cookie.hostOnly = false; - - } else { - cookie.hostOnly = true; - cookie.domain = host; - } - - // S5.3 step 7: "Otherwise, set the cookie's path to the default-path of the - // request-uri" - if (!cookie.path) { - cookie.path = defaultPath(context.pathname); - cookie.pathIsDefault = true; - } else { - if (cookie.path.length > 1 && cookie.path.substr(-1) == '/') - cookie.path = cookie.path.slice(0,-1); - } - - // S5.3 step 8: NOOP; secure attribute - // S5.3 step 9: NOOP; httpOnly attribute - - // S5.3 step 10 - if (options.http === false && cookie.httpOnly) { - err = new Error("Cookie is HttpOnly and this isn't an HTTP API"); - return cb(options.ignoreError ? null : err); - } - - var store = this.store; - - if (!store.updateCookie) { - store.updateCookie = function stubUpdateCookie(oldCookie, newCookie, cb) { - this.putCookie(newCookie, cb); - }; - } - - store.findCookie(cookie.domain, cookie.path, cookie.key, function(err,oldCookie) { - if (err) return cb(err); - - var next = function(err) { - if (err) return cb(err); - else cb(null, cookie); - }; - - if (oldCookie) { - // S5.3 step 11 - "If the cookie store contains a cookie with the same name, - // domain, and path as the newly created cookie:" - if (options.http === false && oldCookie.httpOnly) { // step 11.2 - err = new Error("old Cookie is HttpOnly and this isn't an HTTP API"); - return cb(options.ignoreError ? null : err); - } - cookie.creation = oldCookie.creation; // step 11.3 - cookie.lastAccessed = now; - // Step 11.4 (delete cookie) is implied by just setting the new one: - store.updateCookie(oldCookie, cookie, next); // step 12 - - } else { - cookie.creation = cookie.lastAccessed = now; - store.putCookie(cookie, next); // step 12 - } - }); -}; - -// RFC6365 S5.4 -CookieJar.prototype.getCookies = function getCookies(url, options, cb) { - var context = (url instanceof Object) ? url : urlParse(url); - if (options instanceof Function) { - cb = options; - options = {}; - } - - var host = canonicalDomain(context.hostname); - var path = context.pathname || '/'; - - var secure = options.secure; - if (secure == null && context.protocol && - (context.protocol == 'https:' || context.protocol == 'wss:')) - { - secure = true; - } - - var http = options.http; - if (http == null) http = true; - - var now = options.now || Date.now(); - var expireCheck = options.expire !== false; - var allPaths = !!options.allPaths; - var store = this.store; - - function matchingCookie(c) { - // "Either: - // The cookie's host-only-flag is true and the canonicalized - // request-host is identical to the cookie's domain. - // Or: - // The cookie's host-only-flag is false and the canonicalized - // request-host domain-matches the cookie's domain." - if (c.hostOnly) { - if (c.domain != host) return false; - } else { - if (!domainMatch(host, c.domain, false)) return false; - } - - // "The request-uri's path path-matches the cookie's path." - if (!allPaths && !pathMatch(path, c.path)) - return false; - - // "If the cookie's secure-only-flag is true, then the request-uri's - // scheme must denote a "secure" protocol" - if (c.secure && !secure) - return false; - - // "If the cookie's http-only-flag is true, then exclude the cookie if the - // cookie-string is being generated for a "non-HTTP" API" - if (c.httpOnly && !http) - return false; - - // deferred from S5.3 - // non-RFC: allow retention of expired cookies by choice - if (expireCheck && c.expiryTime() <= now) { - store.removeCookie(c.domain, c.path, c.key, function(){}); // result ignored - return false; - } - - return true; - } - - store.findCookies(host, allPaths ? null : path, function(err,cookies) { - if (err) return cb(err); - - cookies = cookies.filter(matchingCookie); - - // sorting of S5.4 part 2 - if (options.sort !== false) - cookies = cookies.sort(cookieCompare); - - // S5.4 part 3 - var now = new Date(); - cookies.forEach(function(c) { c.lastAccessed = now }); - // TODO persist lastAccessed - - cb(null,cookies); - }); -}; - -CookieJar.prototype.getCookieString = function(/*..., cb*/) { - var args = Array.prototype.slice.call(arguments,0); - var cb = args.pop(); - var next = function(err,cookies) { - if (err) cb(err); - else cb(null, cookies.map(function(c){return c.cookieString()}).join('; ')); - }; - args.push(next); - this.getCookies.apply(this,args); -}; - -CookieJar.prototype.getSetCookieStrings = function(/*..., cb*/) { - var args = Array.prototype.slice.call(arguments,0); - var cb = args.pop(); - var next = function(err,cookies) { - if (err) cb(err); - else cb(null, cookies.map(function(c){return c.toString()})); - }; - args.push(next); - this.getCookies.apply(this,args); -}; - - - -module.exports = { - CookieJar: CookieJar, - Cookie: Cookie, - parseDate: parseDate, - formatDate: formatDate, - parse: parse, - fromJSON: fromJSON, - domainMatch: domainMatch, - defaultPath: defaultPath, - pathMatch: pathMatch, - getPublicSuffix: pubsuffix.getPublicSuffix, - cookieCompare: cookieCompare, - permuteDomain: permuteDomain, - permutePath: permutePath, - canonicalDomain: canonicalDomain, -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/memstore.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/memstore.js deleted file mode 100644 index 66abb376..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/memstore.js +++ /dev/null @@ -1,102 +0,0 @@ -var tough = require('./cookie'); -var permuteDomain = tough.permuteDomain; -var permutePath = tough.permutePath; -var util = require('util'); - -function MemoryCookieStore() { - this.idx = {}; -} -module.exports.MemoryCookieStore = MemoryCookieStore; -MemoryCookieStore.prototype.idx = null; - -// force a default depth: -MemoryCookieStore.prototype.inspect = function inspect() { - return "{ idx: "+util.inspect(this.idx, false, 2)+' }'; -}; - -MemoryCookieStore.prototype.findCookie = function findCookie(domain, path, key, cb) { - if (!this.idx[domain]) return cb(null,undefined); - if (!this.idx[domain][path]) return cb(null,undefined); - return cb(null,this.idx[domain][path][key]||null); -}; - -MemoryCookieStore.prototype.findCookies = function findCookies(domain, path, cb) { - var results = []; - if (!domain) return cb(null,[]); - - var pathMatcher; - if (!path) { - // null or '/' means "all paths" - pathMatcher = function matchAll(domainIndex) { - for (var curPath in domainIndex) { - var pathIndex = domainIndex[curPath]; - for (var key in pathIndex) { - results.push(pathIndex[key]); - } - } - }; - - } else if (path === '/') { - pathMatcher = function matchSlash(domainIndex) { - var pathIndex = domainIndex['/']; - if (!pathIndex) return; - for (var key in pathIndex) { - results.push(pathIndex[key]); - } - }; - - } else { - var paths = permutePath(path) || [path]; - pathMatcher = function matchRFC(domainIndex) { - paths.forEach(function(curPath) { - var pathIndex = domainIndex[curPath]; - if (!pathIndex) return; - for (var key in pathIndex) { - results.push(pathIndex[key]); - } - }); - }; - } - - var domains = permuteDomain(domain) || [domain]; - var idx = this.idx; - domains.forEach(function(curDomain) { - var domainIndex = idx[curDomain]; - if (!domainIndex) return; - pathMatcher(domainIndex); - }); - - cb(null,results); -}; - -MemoryCookieStore.prototype.putCookie = function putCookie(cookie, cb) { - if (!this.idx[cookie.domain]) this.idx[cookie.domain] = {}; - if (!this.idx[cookie.domain][cookie.path]) this.idx[cookie.domain][cookie.path] = {}; - this.idx[cookie.domain][cookie.path][cookie.key] = cookie; - cb(null); -}; - -MemoryCookieStore.prototype.updateCookie = function updateCookie(oldCookie, newCookie, cb) { - // updateCookie() may avoid updating cookies that are identical. For example, - // lastAccessed may not be important to some stores and an equality - // comparison could exclude that field. - this.putCookie(newCookie,cb); -}; - -MemoryCookieStore.prototype.removeCookie = function removeCookie(domain, path, key, cb) { - if (this.idx[domain] && this.idx[domain][path] && this.idx[domain][path][key]) { - delete this.idx[domain][path][key]; - } - cb(null); -}; - -MemoryCookieStore.prototype.removeCookies = function removeCookies(domain, path, cb) { - if (!this.idx[domain]) { - if (path) { - delete this.idx[domain][path]; - } else { - delete this.idx[domain]; - } - } - return cb(null); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js deleted file mode 100644 index a7031473..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************** - * AUTOMATICALLY GENERATED by generate-pubsuffix.js * - * DO NOT EDIT! * - ****************************************************/ - -module.exports.getPublicSuffix = function getPublicSuffix(domain) { - /* - * Copyright GoInstant, Inc. and other contributors. All rights reserved. - * 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. - */ - if (!domain) return null; - if (domain.match(/^\./)) return null; - - domain = domain.toLowerCase(); - var parts = domain.split('.').reverse(); - - var suffix = ''; - var suffixLen = 0; - for (var i=0; i<parts.length; i++) { - var part = parts[i]; - var starstr = '*'+suffix; - var partstr = part+suffix; - - if (index[starstr]) { // star rule matches - suffixLen = i+1; - if (index[partstr] === false) { // exception rule matches (NB: false, not undefined) - suffixLen--; - } - } else if (index[partstr]) { // exact match, not exception - suffixLen = i+1; - } - - suffix = '.'+part+suffix; - } - - if (index['*'+suffix]) { // *.domain exists (e.g. *.kyoto.jp for domain='kyoto.jp'); - return null; - } - - if (suffixLen && parts.length > suffixLen) { - return parts.slice(0,suffixLen+1).reverse().join('.'); - } - - return null; -}; - -// The following generated structure is used under the MPL version 1.1 -// See public-suffix.txt for more information - -var index = module.exports.index = Object.freeze( -{"ac":true,"com.ac":true,"edu.ac":true,"gov.ac":true,"net.ac":true,"mil.ac":true,"org.ac":true,"ad":true,"nom.ad":true,"ae":true,"co.ae":true,"net.ae":true,"org.ae":true,"sch.ae":true,"ac.ae":true,"gov.ae":true,"mil.ae":true,"aero":true,"accident-investigation.aero":true,"accident-prevention.aero":true,"aerobatic.aero":true,"aeroclub.aero":true,"aerodrome.aero":true,"agents.aero":true,"aircraft.aero":true,"airline.aero":true,"airport.aero":true,"air-surveillance.aero":true,"airtraffic.aero":true,"air-traffic-control.aero":true,"ambulance.aero":true,"amusement.aero":true,"association.aero":true,"author.aero":true,"ballooning.aero":true,"broker.aero":true,"caa.aero":true,"cargo.aero":true,"catering.aero":true,"certification.aero":true,"championship.aero":true,"charter.aero":true,"civilaviation.aero":true,"club.aero":true,"conference.aero":true,"consultant.aero":true,"consulting.aero":true,"control.aero":true,"council.aero":true,"crew.aero":true,"design.aero":true,"dgca.aero":true,"educator.aero":true,"emergency.aero":true,"engine.aero":true,"engineer.aero":true,"entertainment.aero":true,"equipment.aero":true,"exchange.aero":true,"express.aero":true,"federation.aero":true,"flight.aero":true,"freight.aero":true,"fuel.aero":true,"gliding.aero":true,"government.aero":true,"groundhandling.aero":true,"group.aero":true,"hanggliding.aero":true,"homebuilt.aero":true,"insurance.aero":true,"journal.aero":true,"journalist.aero":true,"leasing.aero":true,"logistics.aero":true,"magazine.aero":true,"maintenance.aero":true,"marketplace.aero":true,"media.aero":true,"microlight.aero":true,"modelling.aero":true,"navigation.aero":true,"parachuting.aero":true,"paragliding.aero":true,"passenger-association.aero":true,"pilot.aero":true,"press.aero":true,"production.aero":true,"recreation.aero":true,"repbody.aero":true,"res.aero":true,"research.aero":true,"rotorcraft.aero":true,"safety.aero":true,"scientist.aero":true,"services.aero":true,"show.aero":true,"skydiving.aero":true,"software.aero":true,"student.aero":true,"taxi.aero":true,"trader.aero":true,"trading.aero":true,"trainer.aero":true,"union.aero":true,"workinggroup.aero":true,"works.aero":true,"af":true,"gov.af":true,"com.af":true,"org.af":true,"net.af":true,"edu.af":true,"ag":true,"com.ag":true,"org.ag":true,"net.ag":true,"co.ag":true,"nom.ag":true,"ai":true,"off.ai":true,"com.ai":true,"net.ai":true,"org.ai":true,"al":true,"com.al":true,"edu.al":true,"gov.al":true,"mil.al":true,"net.al":true,"org.al":true,"am":true,"an":true,"com.an":true,"net.an":true,"org.an":true,"edu.an":true,"ao":true,"ed.ao":true,"gv.ao":true,"og.ao":true,"co.ao":true,"pb.ao":true,"it.ao":true,"aq":true,"*.ar":true,"congresodelalengua3.ar":false,"educ.ar":false,"gobiernoelectronico.ar":false,"mecon.ar":false,"nacion.ar":false,"nic.ar":false,"promocion.ar":false,"retina.ar":false,"uba.ar":false,"e164.arpa":true,"in-addr.arpa":true,"ip6.arpa":true,"iris.arpa":true,"uri.arpa":true,"urn.arpa":true,"as":true,"gov.as":true,"asia":true,"at":true,"ac.at":true,"co.at":true,"gv.at":true,"or.at":true,"com.au":true,"net.au":true,"org.au":true,"edu.au":true,"gov.au":true,"csiro.au":true,"asn.au":true,"id.au":true,"info.au":true,"conf.au":true,"oz.au":true,"act.au":true,"nsw.au":true,"nt.au":true,"qld.au":true,"sa.au":true,"tas.au":true,"vic.au":true,"wa.au":true,"act.edu.au":true,"nsw.edu.au":true,"nt.edu.au":true,"qld.edu.au":true,"sa.edu.au":true,"tas.edu.au":true,"vic.edu.au":true,"wa.edu.au":true,"act.gov.au":true,"nt.gov.au":true,"qld.gov.au":true,"sa.gov.au":true,"tas.gov.au":true,"vic.gov.au":true,"wa.gov.au":true,"aw":true,"com.aw":true,"ax":true,"az":true,"com.az":true,"net.az":true,"int.az":true,"gov.az":true,"org.az":true,"edu.az":true,"info.az":true,"pp.az":true,"mil.az":true,"name.az":true,"pro.az":true,"biz.az":true,"ba":true,"org.ba":true,"net.ba":true,"edu.ba":true,"gov.ba":true,"mil.ba":true,"unsa.ba":true,"unbi.ba":true,"co.ba":true,"com.ba":true,"rs.ba":true,"bb":true,"biz.bb":true,"com.bb":true,"edu.bb":true,"gov.bb":true,"info.bb":true,"net.bb":true,"org.bb":true,"store.bb":true,"*.bd":true,"be":true,"ac.be":true,"bf":true,"gov.bf":true,"bg":true,"a.bg":true,"b.bg":true,"c.bg":true,"d.bg":true,"e.bg":true,"f.bg":true,"g.bg":true,"h.bg":true,"i.bg":true,"j.bg":true,"k.bg":true,"l.bg":true,"m.bg":true,"n.bg":true,"o.bg":true,"p.bg":true,"q.bg":true,"r.bg":true,"s.bg":true,"t.bg":true,"u.bg":true,"v.bg":true,"w.bg":true,"x.bg":true,"y.bg":true,"z.bg":true,"0.bg":true,"1.bg":true,"2.bg":true,"3.bg":true,"4.bg":true,"5.bg":true,"6.bg":true,"7.bg":true,"8.bg":true,"9.bg":true,"bh":true,"com.bh":true,"edu.bh":true,"net.bh":true,"org.bh":true,"gov.bh":true,"bi":true,"co.bi":true,"com.bi":true,"edu.bi":true,"or.bi":true,"org.bi":true,"biz":true,"bj":true,"asso.bj":true,"barreau.bj":true,"gouv.bj":true,"bm":true,"com.bm":true,"edu.bm":true,"gov.bm":true,"net.bm":true,"org.bm":true,"*.bn":true,"bo":true,"com.bo":true,"edu.bo":true,"gov.bo":true,"gob.bo":true,"int.bo":true,"org.bo":true,"net.bo":true,"mil.bo":true,"tv.bo":true,"br":true,"adm.br":true,"adv.br":true,"agr.br":true,"am.br":true,"arq.br":true,"art.br":true,"ato.br":true,"b.br":true,"bio.br":true,"blog.br":true,"bmd.br":true,"can.br":true,"cim.br":true,"cng.br":true,"cnt.br":true,"com.br":true,"coop.br":true,"ecn.br":true,"edu.br":true,"emp.br":true,"eng.br":true,"esp.br":true,"etc.br":true,"eti.br":true,"far.br":true,"flog.br":true,"fm.br":true,"fnd.br":true,"fot.br":true,"fst.br":true,"g12.br":true,"ggf.br":true,"gov.br":true,"imb.br":true,"ind.br":true,"inf.br":true,"jor.br":true,"jus.br":true,"lel.br":true,"mat.br":true,"med.br":true,"mil.br":true,"mus.br":true,"net.br":true,"nom.br":true,"not.br":true,"ntr.br":true,"odo.br":true,"org.br":true,"ppg.br":true,"pro.br":true,"psc.br":true,"psi.br":true,"qsl.br":true,"radio.br":true,"rec.br":true,"slg.br":true,"srv.br":true,"taxi.br":true,"teo.br":true,"tmp.br":true,"trd.br":true,"tur.br":true,"tv.br":true,"vet.br":true,"vlog.br":true,"wiki.br":true,"zlg.br":true,"bs":true,"com.bs":true,"net.bs":true,"org.bs":true,"edu.bs":true,"gov.bs":true,"bt":true,"com.bt":true,"edu.bt":true,"gov.bt":true,"net.bt":true,"org.bt":true,"bw":true,"co.bw":true,"org.bw":true,"by":true,"gov.by":true,"mil.by":true,"com.by":true,"of.by":true,"bz":true,"com.bz":true,"net.bz":true,"org.bz":true,"edu.bz":true,"gov.bz":true,"ca":true,"ab.ca":true,"bc.ca":true,"mb.ca":true,"nb.ca":true,"nf.ca":true,"nl.ca":true,"ns.ca":true,"nt.ca":true,"nu.ca":true,"on.ca":true,"pe.ca":true,"qc.ca":true,"sk.ca":true,"yk.ca":true,"gc.ca":true,"cat":true,"cc":true,"cd":true,"gov.cd":true,"cf":true,"cg":true,"ch":true,"ci":true,"org.ci":true,"or.ci":true,"com.ci":true,"co.ci":true,"edu.ci":true,"ed.ci":true,"ac.ci":true,"net.ci":true,"go.ci":true,"asso.ci":true,"xn--aroport-bya.ci":true,"int.ci":true,"presse.ci":true,"md.ci":true,"gouv.ci":true,"*.ck":true,"www.ck":false,"cl":true,"gov.cl":true,"gob.cl":true,"co.cl":true,"mil.cl":true,"cm":true,"gov.cm":true,"cn":true,"ac.cn":true,"com.cn":true,"edu.cn":true,"gov.cn":true,"net.cn":true,"org.cn":true,"mil.cn":true,"xn--55qx5d.cn":true,"xn--io0a7i.cn":true,"xn--od0alg.cn":true,"ah.cn":true,"bj.cn":true,"cq.cn":true,"fj.cn":true,"gd.cn":true,"gs.cn":true,"gz.cn":true,"gx.cn":true,"ha.cn":true,"hb.cn":true,"he.cn":true,"hi.cn":true,"hl.cn":true,"hn.cn":true,"jl.cn":true,"js.cn":true,"jx.cn":true,"ln.cn":true,"nm.cn":true,"nx.cn":true,"qh.cn":true,"sc.cn":true,"sd.cn":true,"sh.cn":true,"sn.cn":true,"sx.cn":true,"tj.cn":true,"xj.cn":true,"xz.cn":true,"yn.cn":true,"zj.cn":true,"hk.cn":true,"mo.cn":true,"tw.cn":true,"co":true,"arts.co":true,"com.co":true,"edu.co":true,"firm.co":true,"gov.co":true,"info.co":true,"int.co":true,"mil.co":true,"net.co":true,"nom.co":true,"org.co":true,"rec.co":true,"web.co":true,"com":true,"coop":true,"cr":true,"ac.cr":true,"co.cr":true,"ed.cr":true,"fi.cr":true,"go.cr":true,"or.cr":true,"sa.cr":true,"cu":true,"com.cu":true,"edu.cu":true,"org.cu":true,"net.cu":true,"gov.cu":true,"inf.cu":true,"cv":true,"cx":true,"gov.cx":true,"*.cy":true,"cz":true,"de":true,"dj":true,"dk":true,"dm":true,"com.dm":true,"net.dm":true,"org.dm":true,"edu.dm":true,"gov.dm":true,"do":true,"art.do":true,"com.do":true,"edu.do":true,"gob.do":true,"gov.do":true,"mil.do":true,"net.do":true,"org.do":true,"sld.do":true,"web.do":true,"dz":true,"com.dz":true,"org.dz":true,"net.dz":true,"gov.dz":true,"edu.dz":true,"asso.dz":true,"pol.dz":true,"art.dz":true,"ec":true,"com.ec":true,"info.ec":true,"net.ec":true,"fin.ec":true,"k12.ec":true,"med.ec":true,"pro.ec":true,"org.ec":true,"edu.ec":true,"gov.ec":true,"gob.ec":true,"mil.ec":true,"edu":true,"ee":true,"edu.ee":true,"gov.ee":true,"riik.ee":true,"lib.ee":true,"med.ee":true,"com.ee":true,"pri.ee":true,"aip.ee":true,"org.ee":true,"fie.ee":true,"eg":true,"com.eg":true,"edu.eg":true,"eun.eg":true,"gov.eg":true,"mil.eg":true,"name.eg":true,"net.eg":true,"org.eg":true,"sci.eg":true,"*.er":true,"es":true,"com.es":true,"nom.es":true,"org.es":true,"gob.es":true,"edu.es":true,"*.et":true,"eu":true,"fi":true,"aland.fi":true,"*.fj":true,"*.fk":true,"fm":true,"fo":true,"fr":true,"com.fr":true,"asso.fr":true,"nom.fr":true,"prd.fr":true,"presse.fr":true,"tm.fr":true,"aeroport.fr":true,"assedic.fr":true,"avocat.fr":true,"avoues.fr":true,"cci.fr":true,"chambagri.fr":true,"chirurgiens-dentistes.fr":true,"experts-comptables.fr":true,"geometre-expert.fr":true,"gouv.fr":true,"greta.fr":true,"huissier-justice.fr":true,"medecin.fr":true,"notaires.fr":true,"pharmacien.fr":true,"port.fr":true,"veterinaire.fr":true,"ga":true,"gd":true,"ge":true,"com.ge":true,"edu.ge":true,"gov.ge":true,"org.ge":true,"mil.ge":true,"net.ge":true,"pvt.ge":true,"gf":true,"gg":true,"co.gg":true,"org.gg":true,"net.gg":true,"sch.gg":true,"gov.gg":true,"gh":true,"com.gh":true,"edu.gh":true,"gov.gh":true,"org.gh":true,"mil.gh":true,"gi":true,"com.gi":true,"ltd.gi":true,"gov.gi":true,"mod.gi":true,"edu.gi":true,"org.gi":true,"gl":true,"gm":true,"ac.gn":true,"com.gn":true,"edu.gn":true,"gov.gn":true,"org.gn":true,"net.gn":true,"gov":true,"gp":true,"com.gp":true,"net.gp":true,"mobi.gp":true,"edu.gp":true,"org.gp":true,"asso.gp":true,"gq":true,"gr":true,"com.gr":true,"edu.gr":true,"net.gr":true,"org.gr":true,"gov.gr":true,"gs":true,"*.gt":true,"www.gt":false,"*.gu":true,"gw":true,"gy":true,"co.gy":true,"com.gy":true,"net.gy":true,"hk":true,"com.hk":true,"edu.hk":true,"gov.hk":true,"idv.hk":true,"net.hk":true,"org.hk":true,"xn--55qx5d.hk":true,"xn--wcvs22d.hk":true,"xn--lcvr32d.hk":true,"xn--mxtq1m.hk":true,"xn--gmqw5a.hk":true,"xn--ciqpn.hk":true,"xn--gmq050i.hk":true,"xn--zf0avx.hk":true,"xn--io0a7i.hk":true,"xn--mk0axi.hk":true,"xn--od0alg.hk":true,"xn--od0aq3b.hk":true,"xn--tn0ag.hk":true,"xn--uc0atv.hk":true,"xn--uc0ay4a.hk":true,"hm":true,"hn":true,"com.hn":true,"edu.hn":true,"org.hn":true,"net.hn":true,"mil.hn":true,"gob.hn":true,"hr":true,"iz.hr":true,"from.hr":true,"name.hr":true,"com.hr":true,"ht":true,"com.ht":true,"shop.ht":true,"firm.ht":true,"info.ht":true,"adult.ht":true,"net.ht":true,"pro.ht":true,"org.ht":true,"med.ht":true,"art.ht":true,"coop.ht":true,"pol.ht":true,"asso.ht":true,"edu.ht":true,"rel.ht":true,"gouv.ht":true,"perso.ht":true,"hu":true,"co.hu":true,"info.hu":true,"org.hu":true,"priv.hu":true,"sport.hu":true,"tm.hu":true,"2000.hu":true,"agrar.hu":true,"bolt.hu":true,"casino.hu":true,"city.hu":true,"erotica.hu":true,"erotika.hu":true,"film.hu":true,"forum.hu":true,"games.hu":true,"hotel.hu":true,"ingatlan.hu":true,"jogasz.hu":true,"konyvelo.hu":true,"lakas.hu":true,"media.hu":true,"news.hu":true,"reklam.hu":true,"sex.hu":true,"shop.hu":true,"suli.hu":true,"szex.hu":true,"tozsde.hu":true,"utazas.hu":true,"video.hu":true,"id":true,"ac.id":true,"co.id":true,"go.id":true,"mil.id":true,"net.id":true,"or.id":true,"sch.id":true,"web.id":true,"ie":true,"gov.ie":true,"*.il":true,"im":true,"co.im":true,"ltd.co.im":true,"plc.co.im":true,"net.im":true,"gov.im":true,"org.im":true,"nic.im":true,"ac.im":true,"in":true,"co.in":true,"firm.in":true,"net.in":true,"org.in":true,"gen.in":true,"ind.in":true,"nic.in":true,"ac.in":true,"edu.in":true,"res.in":true,"gov.in":true,"mil.in":true,"info":true,"int":true,"eu.int":true,"io":true,"com.io":true,"iq":true,"gov.iq":true,"edu.iq":true,"mil.iq":true,"com.iq":true,"org.iq":true,"net.iq":true,"ir":true,"ac.ir":true,"co.ir":true,"gov.ir":true,"id.ir":true,"net.ir":true,"org.ir":true,"sch.ir":true,"xn--mgba3a4f16a.ir":true,"xn--mgba3a4fra.ir":true,"is":true,"net.is":true,"com.is":true,"edu.is":true,"gov.is":true,"org.is":true,"int.is":true,"it":true,"gov.it":true,"edu.it":true,"agrigento.it":true,"ag.it":true,"alessandria.it":true,"al.it":true,"ancona.it":true,"an.it":true,"aosta.it":true,"aoste.it":true,"ao.it":true,"arezzo.it":true,"ar.it":true,"ascoli-piceno.it":true,"ascolipiceno.it":true,"ap.it":true,"asti.it":true,"at.it":true,"avellino.it":true,"av.it":true,"bari.it":true,"ba.it":true,"andria-barletta-trani.it":true,"andriabarlettatrani.it":true,"trani-barletta-andria.it":true,"tranibarlettaandria.it":true,"barletta-trani-andria.it":true,"barlettatraniandria.it":true,"andria-trani-barletta.it":true,"andriatranibarletta.it":true,"trani-andria-barletta.it":true,"traniandriabarletta.it":true,"bt.it":true,"belluno.it":true,"bl.it":true,"benevento.it":true,"bn.it":true,"bergamo.it":true,"bg.it":true,"biella.it":true,"bi.it":true,"bologna.it":true,"bo.it":true,"bolzano.it":true,"bozen.it":true,"balsan.it":true,"alto-adige.it":true,"altoadige.it":true,"suedtirol.it":true,"bz.it":true,"brescia.it":true,"bs.it":true,"brindisi.it":true,"br.it":true,"cagliari.it":true,"ca.it":true,"caltanissetta.it":true,"cl.it":true,"campobasso.it":true,"cb.it":true,"carboniaiglesias.it":true,"carbonia-iglesias.it":true,"iglesias-carbonia.it":true,"iglesiascarbonia.it":true,"ci.it":true,"caserta.it":true,"ce.it":true,"catania.it":true,"ct.it":true,"catanzaro.it":true,"cz.it":true,"chieti.it":true,"ch.it":true,"como.it":true,"co.it":true,"cosenza.it":true,"cs.it":true,"cremona.it":true,"cr.it":true,"crotone.it":true,"kr.it":true,"cuneo.it":true,"cn.it":true,"dell-ogliastra.it":true,"dellogliastra.it":true,"ogliastra.it":true,"og.it":true,"enna.it":true,"en.it":true,"ferrara.it":true,"fe.it":true,"fermo.it":true,"fm.it":true,"firenze.it":true,"florence.it":true,"fi.it":true,"foggia.it":true,"fg.it":true,"forli-cesena.it":true,"forlicesena.it":true,"cesena-forli.it":true,"cesenaforli.it":true,"fc.it":true,"frosinone.it":true,"fr.it":true,"genova.it":true,"genoa.it":true,"ge.it":true,"gorizia.it":true,"go.it":true,"grosseto.it":true,"gr.it":true,"imperia.it":true,"im.it":true,"isernia.it":true,"is.it":true,"laquila.it":true,"aquila.it":true,"aq.it":true,"la-spezia.it":true,"laspezia.it":true,"sp.it":true,"latina.it":true,"lt.it":true,"lecce.it":true,"le.it":true,"lecco.it":true,"lc.it":true,"livorno.it":true,"li.it":true,"lodi.it":true,"lo.it":true,"lucca.it":true,"lu.it":true,"macerata.it":true,"mc.it":true,"mantova.it":true,"mn.it":true,"massa-carrara.it":true,"massacarrara.it":true,"carrara-massa.it":true,"carraramassa.it":true,"ms.it":true,"matera.it":true,"mt.it":true,"medio-campidano.it":true,"mediocampidano.it":true,"campidano-medio.it":true,"campidanomedio.it":true,"vs.it":true,"messina.it":true,"me.it":true,"milano.it":true,"milan.it":true,"mi.it":true,"modena.it":true,"mo.it":true,"monza.it":true,"monza-brianza.it":true,"monzabrianza.it":true,"monzaebrianza.it":true,"monzaedellabrianza.it":true,"monza-e-della-brianza.it":true,"mb.it":true,"napoli.it":true,"naples.it":true,"na.it":true,"novara.it":true,"no.it":true,"nuoro.it":true,"nu.it":true,"oristano.it":true,"or.it":true,"padova.it":true,"padua.it":true,"pd.it":true,"palermo.it":true,"pa.it":true,"parma.it":true,"pr.it":true,"pavia.it":true,"pv.it":true,"perugia.it":true,"pg.it":true,"pescara.it":true,"pe.it":true,"pesaro-urbino.it":true,"pesarourbino.it":true,"urbino-pesaro.it":true,"urbinopesaro.it":true,"pu.it":true,"piacenza.it":true,"pc.it":true,"pisa.it":true,"pi.it":true,"pistoia.it":true,"pt.it":true,"pordenone.it":true,"pn.it":true,"potenza.it":true,"pz.it":true,"prato.it":true,"po.it":true,"ragusa.it":true,"rg.it":true,"ravenna.it":true,"ra.it":true,"reggio-calabria.it":true,"reggiocalabria.it":true,"rc.it":true,"reggio-emilia.it":true,"reggioemilia.it":true,"re.it":true,"rieti.it":true,"ri.it":true,"rimini.it":true,"rn.it":true,"roma.it":true,"rome.it":true,"rm.it":true,"rovigo.it":true,"ro.it":true,"salerno.it":true,"sa.it":true,"sassari.it":true,"ss.it":true,"savona.it":true,"sv.it":true,"siena.it":true,"si.it":true,"siracusa.it":true,"sr.it":true,"sondrio.it":true,"so.it":true,"taranto.it":true,"ta.it":true,"tempio-olbia.it":true,"tempioolbia.it":true,"olbia-tempio.it":true,"olbiatempio.it":true,"ot.it":true,"teramo.it":true,"te.it":true,"terni.it":true,"tr.it":true,"torino.it":true,"turin.it":true,"to.it":true,"trapani.it":true,"tp.it":true,"trento.it":true,"trentino.it":true,"tn.it":true,"treviso.it":true,"tv.it":true,"trieste.it":true,"ts.it":true,"udine.it":true,"ud.it":true,"varese.it":true,"va.it":true,"venezia.it":true,"venice.it":true,"ve.it":true,"verbania.it":true,"vb.it":true,"vercelli.it":true,"vc.it":true,"verona.it":true,"vr.it":true,"vibo-valentia.it":true,"vibovalentia.it":true,"vv.it":true,"vicenza.it":true,"vi.it":true,"viterbo.it":true,"vt.it":true,"je":true,"co.je":true,"org.je":true,"net.je":true,"sch.je":true,"gov.je":true,"*.jm":true,"jo":true,"com.jo":true,"org.jo":true,"net.jo":true,"edu.jo":true,"sch.jo":true,"gov.jo":true,"mil.jo":true,"name.jo":true,"jobs":true,"jp":true,"ac.jp":true,"ad.jp":true,"co.jp":true,"ed.jp":true,"go.jp":true,"gr.jp":true,"lg.jp":true,"ne.jp":true,"or.jp":true,"*.aichi.jp":true,"*.akita.jp":true,"*.aomori.jp":true,"*.chiba.jp":true,"*.ehime.jp":true,"*.fukui.jp":true,"*.fukuoka.jp":true,"*.fukushima.jp":true,"*.gifu.jp":true,"*.gunma.jp":true,"*.hiroshima.jp":true,"*.hokkaido.jp":true,"*.hyogo.jp":true,"*.ibaraki.jp":true,"*.ishikawa.jp":true,"*.iwate.jp":true,"*.kagawa.jp":true,"*.kagoshima.jp":true,"*.kanagawa.jp":true,"*.kawasaki.jp":true,"*.kitakyushu.jp":true,"*.kobe.jp":true,"*.kochi.jp":true,"*.kumamoto.jp":true,"*.kyoto.jp":true,"*.mie.jp":true,"*.miyagi.jp":true,"*.miyazaki.jp":true,"*.nagano.jp":true,"*.nagasaki.jp":true,"*.nagoya.jp":true,"*.nara.jp":true,"*.niigata.jp":true,"*.oita.jp":true,"*.okayama.jp":true,"*.okinawa.jp":true,"*.osaka.jp":true,"*.saga.jp":true,"*.saitama.jp":true,"*.sapporo.jp":true,"*.sendai.jp":true,"*.shiga.jp":true,"*.shimane.jp":true,"*.shizuoka.jp":true,"*.tochigi.jp":true,"*.tokushima.jp":true,"*.tokyo.jp":true,"*.tottori.jp":true,"*.toyama.jp":true,"*.wakayama.jp":true,"*.yamagata.jp":true,"*.yamaguchi.jp":true,"*.yamanashi.jp":true,"*.yokohama.jp":true,"metro.tokyo.jp":false,"pref.aichi.jp":false,"pref.akita.jp":false,"pref.aomori.jp":false,"pref.chiba.jp":false,"pref.ehime.jp":false,"pref.fukui.jp":false,"pref.fukuoka.jp":false,"pref.fukushima.jp":false,"pref.gifu.jp":false,"pref.gunma.jp":false,"pref.hiroshima.jp":false,"pref.hokkaido.jp":false,"pref.hyogo.jp":false,"pref.ibaraki.jp":false,"pref.ishikawa.jp":false,"pref.iwate.jp":false,"pref.kagawa.jp":false,"pref.kagoshima.jp":false,"pref.kanagawa.jp":false,"pref.kochi.jp":false,"pref.kumamoto.jp":false,"pref.kyoto.jp":false,"pref.mie.jp":false,"pref.miyagi.jp":false,"pref.miyazaki.jp":false,"pref.nagano.jp":false,"pref.nagasaki.jp":false,"pref.nara.jp":false,"pref.niigata.jp":false,"pref.oita.jp":false,"pref.okayama.jp":false,"pref.okinawa.jp":false,"pref.osaka.jp":false,"pref.saga.jp":false,"pref.saitama.jp":false,"pref.shiga.jp":false,"pref.shimane.jp":false,"pref.shizuoka.jp":false,"pref.tochigi.jp":false,"pref.tokushima.jp":false,"pref.tottori.jp":false,"pref.toyama.jp":false,"pref.wakayama.jp":false,"pref.yamagata.jp":false,"pref.yamaguchi.jp":false,"pref.yamanashi.jp":false,"city.chiba.jp":false,"city.fukuoka.jp":false,"city.hiroshima.jp":false,"city.kawasaki.jp":false,"city.kitakyushu.jp":false,"city.kobe.jp":false,"city.kyoto.jp":false,"city.nagoya.jp":false,"city.niigata.jp":false,"city.okayama.jp":false,"city.osaka.jp":false,"city.saitama.jp":false,"city.sapporo.jp":false,"city.sendai.jp":false,"city.shizuoka.jp":false,"city.yokohama.jp":false,"*.ke":true,"kg":true,"org.kg":true,"net.kg":true,"com.kg":true,"edu.kg":true,"gov.kg":true,"mil.kg":true,"*.kh":true,"ki":true,"edu.ki":true,"biz.ki":true,"net.ki":true,"org.ki":true,"gov.ki":true,"info.ki":true,"com.ki":true,"km":true,"org.km":true,"nom.km":true,"gov.km":true,"prd.km":true,"tm.km":true,"edu.km":true,"mil.km":true,"ass.km":true,"com.km":true,"coop.km":true,"asso.km":true,"presse.km":true,"medecin.km":true,"notaires.km":true,"pharmaciens.km":true,"veterinaire.km":true,"gouv.km":true,"kn":true,"net.kn":true,"org.kn":true,"edu.kn":true,"gov.kn":true,"com.kp":true,"edu.kp":true,"gov.kp":true,"org.kp":true,"rep.kp":true,"tra.kp":true,"kr":true,"ac.kr":true,"co.kr":true,"es.kr":true,"go.kr":true,"hs.kr":true,"kg.kr":true,"mil.kr":true,"ms.kr":true,"ne.kr":true,"or.kr":true,"pe.kr":true,"re.kr":true,"sc.kr":true,"busan.kr":true,"chungbuk.kr":true,"chungnam.kr":true,"daegu.kr":true,"daejeon.kr":true,"gangwon.kr":true,"gwangju.kr":true,"gyeongbuk.kr":true,"gyeonggi.kr":true,"gyeongnam.kr":true,"incheon.kr":true,"jeju.kr":true,"jeonbuk.kr":true,"jeonnam.kr":true,"seoul.kr":true,"ulsan.kr":true,"*.kw":true,"ky":true,"edu.ky":true,"gov.ky":true,"com.ky":true,"org.ky":true,"net.ky":true,"kz":true,"org.kz":true,"edu.kz":true,"net.kz":true,"gov.kz":true,"mil.kz":true,"com.kz":true,"la":true,"int.la":true,"net.la":true,"info.la":true,"edu.la":true,"gov.la":true,"per.la":true,"com.la":true,"org.la":true,"com.lb":true,"edu.lb":true,"gov.lb":true,"net.lb":true,"org.lb":true,"lc":true,"com.lc":true,"net.lc":true,"co.lc":true,"org.lc":true,"edu.lc":true,"gov.lc":true,"li":true,"lk":true,"gov.lk":true,"sch.lk":true,"net.lk":true,"int.lk":true,"com.lk":true,"org.lk":true,"edu.lk":true,"ngo.lk":true,"soc.lk":true,"web.lk":true,"ltd.lk":true,"assn.lk":true,"grp.lk":true,"hotel.lk":true,"com.lr":true,"edu.lr":true,"gov.lr":true,"org.lr":true,"net.lr":true,"ls":true,"co.ls":true,"org.ls":true,"lt":true,"gov.lt":true,"lu":true,"lv":true,"com.lv":true,"edu.lv":true,"gov.lv":true,"org.lv":true,"mil.lv":true,"id.lv":true,"net.lv":true,"asn.lv":true,"conf.lv":true,"ly":true,"com.ly":true,"net.ly":true,"gov.ly":true,"plc.ly":true,"edu.ly":true,"sch.ly":true,"med.ly":true,"org.ly":true,"id.ly":true,"ma":true,"co.ma":true,"net.ma":true,"gov.ma":true,"org.ma":true,"ac.ma":true,"press.ma":true,"mc":true,"tm.mc":true,"asso.mc":true,"md":true,"me":true,"co.me":true,"net.me":true,"org.me":true,"edu.me":true,"ac.me":true,"gov.me":true,"its.me":true,"priv.me":true,"mg":true,"org.mg":true,"nom.mg":true,"gov.mg":true,"prd.mg":true,"tm.mg":true,"edu.mg":true,"mil.mg":true,"com.mg":true,"mh":true,"mil":true,"mk":true,"com.mk":true,"org.mk":true,"net.mk":true,"edu.mk":true,"gov.mk":true,"inf.mk":true,"name.mk":true,"ml":true,"com.ml":true,"edu.ml":true,"gouv.ml":true,"gov.ml":true,"net.ml":true,"org.ml":true,"presse.ml":true,"*.mm":true,"mn":true,"gov.mn":true,"edu.mn":true,"org.mn":true,"mo":true,"com.mo":true,"net.mo":true,"org.mo":true,"edu.mo":true,"gov.mo":true,"mobi":true,"mp":true,"mq":true,"mr":true,"gov.mr":true,"ms":true,"*.mt":true,"mu":true,"com.mu":true,"net.mu":true,"org.mu":true,"gov.mu":true,"ac.mu":true,"co.mu":true,"or.mu":true,"museum":true,"academy.museum":true,"agriculture.museum":true,"air.museum":true,"airguard.museum":true,"alabama.museum":true,"alaska.museum":true,"amber.museum":true,"ambulance.museum":true,"american.museum":true,"americana.museum":true,"americanantiques.museum":true,"americanart.museum":true,"amsterdam.museum":true,"and.museum":true,"annefrank.museum":true,"anthro.museum":true,"anthropology.museum":true,"antiques.museum":true,"aquarium.museum":true,"arboretum.museum":true,"archaeological.museum":true,"archaeology.museum":true,"architecture.museum":true,"art.museum":true,"artanddesign.museum":true,"artcenter.museum":true,"artdeco.museum":true,"arteducation.museum":true,"artgallery.museum":true,"arts.museum":true,"artsandcrafts.museum":true,"asmatart.museum":true,"assassination.museum":true,"assisi.museum":true,"association.museum":true,"astronomy.museum":true,"atlanta.museum":true,"austin.museum":true,"australia.museum":true,"automotive.museum":true,"aviation.museum":true,"axis.museum":true,"badajoz.museum":true,"baghdad.museum":true,"bahn.museum":true,"bale.museum":true,"baltimore.museum":true,"barcelona.museum":true,"baseball.museum":true,"basel.museum":true,"baths.museum":true,"bauern.museum":true,"beauxarts.museum":true,"beeldengeluid.museum":true,"bellevue.museum":true,"bergbau.museum":true,"berkeley.museum":true,"berlin.museum":true,"bern.museum":true,"bible.museum":true,"bilbao.museum":true,"bill.museum":true,"birdart.museum":true,"birthplace.museum":true,"bonn.museum":true,"boston.museum":true,"botanical.museum":true,"botanicalgarden.museum":true,"botanicgarden.museum":true,"botany.museum":true,"brandywinevalley.museum":true,"brasil.museum":true,"bristol.museum":true,"british.museum":true,"britishcolumbia.museum":true,"broadcast.museum":true,"brunel.museum":true,"brussel.museum":true,"brussels.museum":true,"bruxelles.museum":true,"building.museum":true,"burghof.museum":true,"bus.museum":true,"bushey.museum":true,"cadaques.museum":true,"california.museum":true,"cambridge.museum":true,"can.museum":true,"canada.museum":true,"capebreton.museum":true,"carrier.museum":true,"cartoonart.museum":true,"casadelamoneda.museum":true,"castle.museum":true,"castres.museum":true,"celtic.museum":true,"center.museum":true,"chattanooga.museum":true,"cheltenham.museum":true,"chesapeakebay.museum":true,"chicago.museum":true,"children.museum":true,"childrens.museum":true,"childrensgarden.museum":true,"chiropractic.museum":true,"chocolate.museum":true,"christiansburg.museum":true,"cincinnati.museum":true,"cinema.museum":true,"circus.museum":true,"civilisation.museum":true,"civilization.museum":true,"civilwar.museum":true,"clinton.museum":true,"clock.museum":true,"coal.museum":true,"coastaldefence.museum":true,"cody.museum":true,"coldwar.museum":true,"collection.museum":true,"colonialwilliamsburg.museum":true,"coloradoplateau.museum":true,"columbia.museum":true,"columbus.museum":true,"communication.museum":true,"communications.museum":true,"community.museum":true,"computer.museum":true,"computerhistory.museum":true,"xn--comunicaes-v6a2o.museum":true,"contemporary.museum":true,"contemporaryart.museum":true,"convent.museum":true,"copenhagen.museum":true,"corporation.museum":true,"xn--correios-e-telecomunicaes-ghc29a.museum":true,"corvette.museum":true,"costume.museum":true,"countryestate.museum":true,"county.museum":true,"crafts.museum":true,"cranbrook.museum":true,"creation.museum":true,"cultural.museum":true,"culturalcenter.museum":true,"culture.museum":true,"cyber.museum":true,"cymru.museum":true,"dali.museum":true,"dallas.museum":true,"database.museum":true,"ddr.museum":true,"decorativearts.museum":true,"delaware.museum":true,"delmenhorst.museum":true,"denmark.museum":true,"depot.museum":true,"design.museum":true,"detroit.museum":true,"dinosaur.museum":true,"discovery.museum":true,"dolls.museum":true,"donostia.museum":true,"durham.museum":true,"eastafrica.museum":true,"eastcoast.museum":true,"education.museum":true,"educational.museum":true,"egyptian.museum":true,"eisenbahn.museum":true,"elburg.museum":true,"elvendrell.museum":true,"embroidery.museum":true,"encyclopedic.museum":true,"england.museum":true,"entomology.museum":true,"environment.museum":true,"environmentalconservation.museum":true,"epilepsy.museum":true,"essex.museum":true,"estate.museum":true,"ethnology.museum":true,"exeter.museum":true,"exhibition.museum":true,"family.museum":true,"farm.museum":true,"farmequipment.museum":true,"farmers.museum":true,"farmstead.museum":true,"field.museum":true,"figueres.museum":true,"filatelia.museum":true,"film.museum":true,"fineart.museum":true,"finearts.museum":true,"finland.museum":true,"flanders.museum":true,"florida.museum":true,"force.museum":true,"fortmissoula.museum":true,"fortworth.museum":true,"foundation.museum":true,"francaise.museum":true,"frankfurt.museum":true,"franziskaner.museum":true,"freemasonry.museum":true,"freiburg.museum":true,"fribourg.museum":true,"frog.museum":true,"fundacio.museum":true,"furniture.museum":true,"gallery.museum":true,"garden.museum":true,"gateway.museum":true,"geelvinck.museum":true,"gemological.museum":true,"geology.museum":true,"georgia.museum":true,"giessen.museum":true,"glas.museum":true,"glass.museum":true,"gorge.museum":true,"grandrapids.museum":true,"graz.museum":true,"guernsey.museum":true,"halloffame.museum":true,"hamburg.museum":true,"handson.museum":true,"harvestcelebration.museum":true,"hawaii.museum":true,"health.museum":true,"heimatunduhren.museum":true,"hellas.museum":true,"helsinki.museum":true,"hembygdsforbund.museum":true,"heritage.museum":true,"histoire.museum":true,"historical.museum":true,"historicalsociety.museum":true,"historichouses.museum":true,"historisch.museum":true,"historisches.museum":true,"history.museum":true,"historyofscience.museum":true,"horology.museum":true,"house.museum":true,"humanities.museum":true,"illustration.museum":true,"imageandsound.museum":true,"indian.museum":true,"indiana.museum":true,"indianapolis.museum":true,"indianmarket.museum":true,"intelligence.museum":true,"interactive.museum":true,"iraq.museum":true,"iron.museum":true,"isleofman.museum":true,"jamison.museum":true,"jefferson.museum":true,"jerusalem.museum":true,"jewelry.museum":true,"jewish.museum":true,"jewishart.museum":true,"jfk.museum":true,"journalism.museum":true,"judaica.museum":true,"judygarland.museum":true,"juedisches.museum":true,"juif.museum":true,"karate.museum":true,"karikatur.museum":true,"kids.museum":true,"koebenhavn.museum":true,"koeln.museum":true,"kunst.museum":true,"kunstsammlung.museum":true,"kunstunddesign.museum":true,"labor.museum":true,"labour.museum":true,"lajolla.museum":true,"lancashire.museum":true,"landes.museum":true,"lans.museum":true,"xn--lns-qla.museum":true,"larsson.museum":true,"lewismiller.museum":true,"lincoln.museum":true,"linz.museum":true,"living.museum":true,"livinghistory.museum":true,"localhistory.museum":true,"london.museum":true,"losangeles.museum":true,"louvre.museum":true,"loyalist.museum":true,"lucerne.museum":true,"luxembourg.museum":true,"luzern.museum":true,"mad.museum":true,"madrid.museum":true,"mallorca.museum":true,"manchester.museum":true,"mansion.museum":true,"mansions.museum":true,"manx.museum":true,"marburg.museum":true,"maritime.museum":true,"maritimo.museum":true,"maryland.museum":true,"marylhurst.museum":true,"media.museum":true,"medical.museum":true,"medizinhistorisches.museum":true,"meeres.museum":true,"memorial.museum":true,"mesaverde.museum":true,"michigan.museum":true,"midatlantic.museum":true,"military.museum":true,"mill.museum":true,"miners.museum":true,"mining.museum":true,"minnesota.museum":true,"missile.museum":true,"missoula.museum":true,"modern.museum":true,"moma.museum":true,"money.museum":true,"monmouth.museum":true,"monticello.museum":true,"montreal.museum":true,"moscow.museum":true,"motorcycle.museum":true,"muenchen.museum":true,"muenster.museum":true,"mulhouse.museum":true,"muncie.museum":true,"museet.museum":true,"museumcenter.museum":true,"museumvereniging.museum":true,"music.museum":true,"national.museum":true,"nationalfirearms.museum":true,"nationalheritage.museum":true,"nativeamerican.museum":true,"naturalhistory.museum":true,"naturalhistorymuseum.museum":true,"naturalsciences.museum":true,"nature.museum":true,"naturhistorisches.museum":true,"natuurwetenschappen.museum":true,"naumburg.museum":true,"naval.museum":true,"nebraska.museum":true,"neues.museum":true,"newhampshire.museum":true,"newjersey.museum":true,"newmexico.museum":true,"newport.museum":true,"newspaper.museum":true,"newyork.museum":true,"niepce.museum":true,"norfolk.museum":true,"north.museum":true,"nrw.museum":true,"nuernberg.museum":true,"nuremberg.museum":true,"nyc.museum":true,"nyny.museum":true,"oceanographic.museum":true,"oceanographique.museum":true,"omaha.museum":true,"online.museum":true,"ontario.museum":true,"openair.museum":true,"oregon.museum":true,"oregontrail.museum":true,"otago.museum":true,"oxford.museum":true,"pacific.museum":true,"paderborn.museum":true,"palace.museum":true,"paleo.museum":true,"palmsprings.museum":true,"panama.museum":true,"paris.museum":true,"pasadena.museum":true,"pharmacy.museum":true,"philadelphia.museum":true,"philadelphiaarea.museum":true,"philately.museum":true,"phoenix.museum":true,"photography.museum":true,"pilots.museum":true,"pittsburgh.museum":true,"planetarium.museum":true,"plantation.museum":true,"plants.museum":true,"plaza.museum":true,"portal.museum":true,"portland.museum":true,"portlligat.museum":true,"posts-and-telecommunications.museum":true,"preservation.museum":true,"presidio.museum":true,"press.museum":true,"project.museum":true,"public.museum":true,"pubol.museum":true,"quebec.museum":true,"railroad.museum":true,"railway.museum":true,"research.museum":true,"resistance.museum":true,"riodejaneiro.museum":true,"rochester.museum":true,"rockart.museum":true,"roma.museum":true,"russia.museum":true,"saintlouis.museum":true,"salem.museum":true,"salvadordali.museum":true,"salzburg.museum":true,"sandiego.museum":true,"sanfrancisco.museum":true,"santabarbara.museum":true,"santacruz.museum":true,"santafe.museum":true,"saskatchewan.museum":true,"satx.museum":true,"savannahga.museum":true,"schlesisches.museum":true,"schoenbrunn.museum":true,"schokoladen.museum":true,"school.museum":true,"schweiz.museum":true,"science.museum":true,"scienceandhistory.museum":true,"scienceandindustry.museum":true,"sciencecenter.museum":true,"sciencecenters.museum":true,"science-fiction.museum":true,"sciencehistory.museum":true,"sciences.museum":true,"sciencesnaturelles.museum":true,"scotland.museum":true,"seaport.museum":true,"settlement.museum":true,"settlers.museum":true,"shell.museum":true,"sherbrooke.museum":true,"sibenik.museum":true,"silk.museum":true,"ski.museum":true,"skole.museum":true,"society.museum":true,"sologne.museum":true,"soundandvision.museum":true,"southcarolina.museum":true,"southwest.museum":true,"space.museum":true,"spy.museum":true,"square.museum":true,"stadt.museum":true,"stalbans.museum":true,"starnberg.museum":true,"state.museum":true,"stateofdelaware.museum":true,"station.museum":true,"steam.museum":true,"steiermark.museum":true,"stjohn.museum":true,"stockholm.museum":true,"stpetersburg.museum":true,"stuttgart.museum":true,"suisse.museum":true,"surgeonshall.museum":true,"surrey.museum":true,"svizzera.museum":true,"sweden.museum":true,"sydney.museum":true,"tank.museum":true,"tcm.museum":true,"technology.museum":true,"telekommunikation.museum":true,"television.museum":true,"texas.museum":true,"textile.museum":true,"theater.museum":true,"time.museum":true,"timekeeping.museum":true,"topology.museum":true,"torino.museum":true,"touch.museum":true,"town.museum":true,"transport.museum":true,"tree.museum":true,"trolley.museum":true,"trust.museum":true,"trustee.museum":true,"uhren.museum":true,"ulm.museum":true,"undersea.museum":true,"university.museum":true,"usa.museum":true,"usantiques.museum":true,"usarts.museum":true,"uscountryestate.museum":true,"usculture.museum":true,"usdecorativearts.museum":true,"usgarden.museum":true,"ushistory.museum":true,"ushuaia.museum":true,"uslivinghistory.museum":true,"utah.museum":true,"uvic.museum":true,"valley.museum":true,"vantaa.museum":true,"versailles.museum":true,"viking.museum":true,"village.museum":true,"virginia.museum":true,"virtual.museum":true,"virtuel.museum":true,"vlaanderen.museum":true,"volkenkunde.museum":true,"wales.museum":true,"wallonie.museum":true,"war.museum":true,"washingtondc.museum":true,"watchandclock.museum":true,"watch-and-clock.museum":true,"western.museum":true,"westfalen.museum":true,"whaling.museum":true,"wildlife.museum":true,"williamsburg.museum":true,"windmill.museum":true,"workshop.museum":true,"york.museum":true,"yorkshire.museum":true,"yosemite.museum":true,"youth.museum":true,"zoological.museum":true,"zoology.museum":true,"xn--9dbhblg6di.museum":true,"xn--h1aegh.museum":true,"mv":true,"aero.mv":true,"biz.mv":true,"com.mv":true,"coop.mv":true,"edu.mv":true,"gov.mv":true,"info.mv":true,"int.mv":true,"mil.mv":true,"museum.mv":true,"name.mv":true,"net.mv":true,"org.mv":true,"pro.mv":true,"mw":true,"ac.mw":true,"biz.mw":true,"co.mw":true,"com.mw":true,"coop.mw":true,"edu.mw":true,"gov.mw":true,"int.mw":true,"museum.mw":true,"net.mw":true,"org.mw":true,"mx":true,"com.mx":true,"org.mx":true,"gob.mx":true,"edu.mx":true,"net.mx":true,"my":true,"com.my":true,"net.my":true,"org.my":true,"gov.my":true,"edu.my":true,"mil.my":true,"name.my":true,"*.mz":true,"na":true,"info.na":true,"pro.na":true,"name.na":true,"school.na":true,"or.na":true,"dr.na":true,"us.na":true,"mx.na":true,"ca.na":true,"in.na":true,"cc.na":true,"tv.na":true,"ws.na":true,"mobi.na":true,"co.na":true,"com.na":true,"org.na":true,"name":true,"nc":true,"asso.nc":true,"ne":true,"net":true,"nf":true,"com.nf":true,"net.nf":true,"per.nf":true,"rec.nf":true,"web.nf":true,"arts.nf":true,"firm.nf":true,"info.nf":true,"other.nf":true,"store.nf":true,"ac.ng":true,"com.ng":true,"edu.ng":true,"gov.ng":true,"net.ng":true,"org.ng":true,"*.ni":true,"nl":true,"bv.nl":true,"no":true,"fhs.no":true,"vgs.no":true,"fylkesbibl.no":true,"folkebibl.no":true,"museum.no":true,"idrett.no":true,"priv.no":true,"mil.no":true,"stat.no":true,"dep.no":true,"kommune.no":true,"herad.no":true,"aa.no":true,"ah.no":true,"bu.no":true,"fm.no":true,"hl.no":true,"hm.no":true,"jan-mayen.no":true,"mr.no":true,"nl.no":true,"nt.no":true,"of.no":true,"ol.no":true,"oslo.no":true,"rl.no":true,"sf.no":true,"st.no":true,"svalbard.no":true,"tm.no":true,"tr.no":true,"va.no":true,"vf.no":true,"gs.aa.no":true,"gs.ah.no":true,"gs.bu.no":true,"gs.fm.no":true,"gs.hl.no":true,"gs.hm.no":true,"gs.jan-mayen.no":true,"gs.mr.no":true,"gs.nl.no":true,"gs.nt.no":true,"gs.of.no":true,"gs.ol.no":true,"gs.oslo.no":true,"gs.rl.no":true,"gs.sf.no":true,"gs.st.no":true,"gs.svalbard.no":true,"gs.tm.no":true,"gs.tr.no":true,"gs.va.no":true,"gs.vf.no":true,"akrehamn.no":true,"xn--krehamn-dxa.no":true,"algard.no":true,"xn--lgrd-poac.no":true,"arna.no":true,"brumunddal.no":true,"bryne.no":true,"bronnoysund.no":true,"xn--brnnysund-m8ac.no":true,"drobak.no":true,"xn--drbak-wua.no":true,"egersund.no":true,"fetsund.no":true,"floro.no":true,"xn--flor-jra.no":true,"fredrikstad.no":true,"hokksund.no":true,"honefoss.no":true,"xn--hnefoss-q1a.no":true,"jessheim.no":true,"jorpeland.no":true,"xn--jrpeland-54a.no":true,"kirkenes.no":true,"kopervik.no":true,"krokstadelva.no":true,"langevag.no":true,"xn--langevg-jxa.no":true,"leirvik.no":true,"mjondalen.no":true,"xn--mjndalen-64a.no":true,"mo-i-rana.no":true,"mosjoen.no":true,"xn--mosjen-eya.no":true,"nesoddtangen.no":true,"orkanger.no":true,"osoyro.no":true,"xn--osyro-wua.no":true,"raholt.no":true,"xn--rholt-mra.no":true,"sandnessjoen.no":true,"xn--sandnessjen-ogb.no":true,"skedsmokorset.no":true,"slattum.no":true,"spjelkavik.no":true,"stathelle.no":true,"stavern.no":true,"stjordalshalsen.no":true,"xn--stjrdalshalsen-sqb.no":true,"tananger.no":true,"tranby.no":true,"vossevangen.no":true,"afjord.no":true,"xn--fjord-lra.no":true,"agdenes.no":true,"al.no":true,"xn--l-1fa.no":true,"alesund.no":true,"xn--lesund-hua.no":true,"alstahaug.no":true,"alta.no":true,"xn--lt-liac.no":true,"alaheadju.no":true,"xn--laheadju-7ya.no":true,"alvdal.no":true,"amli.no":true,"xn--mli-tla.no":true,"amot.no":true,"xn--mot-tla.no":true,"andebu.no":true,"andoy.no":true,"xn--andy-ira.no":true,"andasuolo.no":true,"ardal.no":true,"xn--rdal-poa.no":true,"aremark.no":true,"arendal.no":true,"xn--s-1fa.no":true,"aseral.no":true,"xn--seral-lra.no":true,"asker.no":true,"askim.no":true,"askvoll.no":true,"askoy.no":true,"xn--asky-ira.no":true,"asnes.no":true,"xn--snes-poa.no":true,"audnedaln.no":true,"aukra.no":true,"aure.no":true,"aurland.no":true,"aurskog-holand.no":true,"xn--aurskog-hland-jnb.no":true,"austevoll.no":true,"austrheim.no":true,"averoy.no":true,"xn--avery-yua.no":true,"balestrand.no":true,"ballangen.no":true,"balat.no":true,"xn--blt-elab.no":true,"balsfjord.no":true,"bahccavuotna.no":true,"xn--bhccavuotna-k7a.no":true,"bamble.no":true,"bardu.no":true,"beardu.no":true,"beiarn.no":true,"bajddar.no":true,"xn--bjddar-pta.no":true,"baidar.no":true,"xn--bidr-5nac.no":true,"berg.no":true,"bergen.no":true,"berlevag.no":true,"xn--berlevg-jxa.no":true,"bearalvahki.no":true,"xn--bearalvhki-y4a.no":true,"bindal.no":true,"birkenes.no":true,"bjarkoy.no":true,"xn--bjarky-fya.no":true,"bjerkreim.no":true,"bjugn.no":true,"bodo.no":true,"xn--bod-2na.no":true,"badaddja.no":true,"xn--bdddj-mrabd.no":true,"budejju.no":true,"bokn.no":true,"bremanger.no":true,"bronnoy.no":true,"xn--brnny-wuac.no":true,"bygland.no":true,"bykle.no":true,"barum.no":true,"xn--brum-voa.no":true,"bo.telemark.no":true,"xn--b-5ga.telemark.no":true,"bo.nordland.no":true,"xn--b-5ga.nordland.no":true,"bievat.no":true,"xn--bievt-0qa.no":true,"bomlo.no":true,"xn--bmlo-gra.no":true,"batsfjord.no":true,"xn--btsfjord-9za.no":true,"bahcavuotna.no":true,"xn--bhcavuotna-s4a.no":true,"dovre.no":true,"drammen.no":true,"drangedal.no":true,"dyroy.no":true,"xn--dyry-ira.no":true,"donna.no":true,"xn--dnna-gra.no":true,"eid.no":true,"eidfjord.no":true,"eidsberg.no":true,"eidskog.no":true,"eidsvoll.no":true,"eigersund.no":true,"elverum.no":true,"enebakk.no":true,"engerdal.no":true,"etne.no":true,"etnedal.no":true,"evenes.no":true,"evenassi.no":true,"xn--eveni-0qa01ga.no":true,"evje-og-hornnes.no":true,"farsund.no":true,"fauske.no":true,"fuossko.no":true,"fuoisku.no":true,"fedje.no":true,"fet.no":true,"finnoy.no":true,"xn--finny-yua.no":true,"fitjar.no":true,"fjaler.no":true,"fjell.no":true,"flakstad.no":true,"flatanger.no":true,"flekkefjord.no":true,"flesberg.no":true,"flora.no":true,"fla.no":true,"xn--fl-zia.no":true,"folldal.no":true,"forsand.no":true,"fosnes.no":true,"frei.no":true,"frogn.no":true,"froland.no":true,"frosta.no":true,"frana.no":true,"xn--frna-woa.no":true,"froya.no":true,"xn--frya-hra.no":true,"fusa.no":true,"fyresdal.no":true,"forde.no":true,"xn--frde-gra.no":true,"gamvik.no":true,"gangaviika.no":true,"xn--ggaviika-8ya47h.no":true,"gaular.no":true,"gausdal.no":true,"gildeskal.no":true,"xn--gildeskl-g0a.no":true,"giske.no":true,"gjemnes.no":true,"gjerdrum.no":true,"gjerstad.no":true,"gjesdal.no":true,"gjovik.no":true,"xn--gjvik-wua.no":true,"gloppen.no":true,"gol.no":true,"gran.no":true,"grane.no":true,"granvin.no":true,"gratangen.no":true,"grimstad.no":true,"grong.no":true,"kraanghke.no":true,"xn--kranghke-b0a.no":true,"grue.no":true,"gulen.no":true,"hadsel.no":true,"halden.no":true,"halsa.no":true,"hamar.no":true,"hamaroy.no":true,"habmer.no":true,"xn--hbmer-xqa.no":true,"hapmir.no":true,"xn--hpmir-xqa.no":true,"hammerfest.no":true,"hammarfeasta.no":true,"xn--hmmrfeasta-s4ac.no":true,"haram.no":true,"hareid.no":true,"harstad.no":true,"hasvik.no":true,"aknoluokta.no":true,"xn--koluokta-7ya57h.no":true,"hattfjelldal.no":true,"aarborte.no":true,"haugesund.no":true,"hemne.no":true,"hemnes.no":true,"hemsedal.no":true,"heroy.more-og-romsdal.no":true,"xn--hery-ira.xn--mre-og-romsdal-qqb.no":true,"heroy.nordland.no":true,"xn--hery-ira.nordland.no":true,"hitra.no":true,"hjartdal.no":true,"hjelmeland.no":true,"hobol.no":true,"xn--hobl-ira.no":true,"hof.no":true,"hol.no":true,"hole.no":true,"holmestrand.no":true,"holtalen.no":true,"xn--holtlen-hxa.no":true,"hornindal.no":true,"horten.no":true,"hurdal.no":true,"hurum.no":true,"hvaler.no":true,"hyllestad.no":true,"hagebostad.no":true,"xn--hgebostad-g3a.no":true,"hoyanger.no":true,"xn--hyanger-q1a.no":true,"hoylandet.no":true,"xn--hylandet-54a.no":true,"ha.no":true,"xn--h-2fa.no":true,"ibestad.no":true,"inderoy.no":true,"xn--indery-fya.no":true,"iveland.no":true,"jevnaker.no":true,"jondal.no":true,"jolster.no":true,"xn--jlster-bya.no":true,"karasjok.no":true,"karasjohka.no":true,"xn--krjohka-hwab49j.no":true,"karlsoy.no":true,"galsa.no":true,"xn--gls-elac.no":true,"karmoy.no":true,"xn--karmy-yua.no":true,"kautokeino.no":true,"guovdageaidnu.no":true,"klepp.no":true,"klabu.no":true,"xn--klbu-woa.no":true,"kongsberg.no":true,"kongsvinger.no":true,"kragero.no":true,"xn--krager-gya.no":true,"kristiansand.no":true,"kristiansund.no":true,"krodsherad.no":true,"xn--krdsherad-m8a.no":true,"kvalsund.no":true,"rahkkeravju.no":true,"xn--rhkkervju-01af.no":true,"kvam.no":true,"kvinesdal.no":true,"kvinnherad.no":true,"kviteseid.no":true,"kvitsoy.no":true,"xn--kvitsy-fya.no":true,"kvafjord.no":true,"xn--kvfjord-nxa.no":true,"giehtavuoatna.no":true,"kvanangen.no":true,"xn--kvnangen-k0a.no":true,"navuotna.no":true,"xn--nvuotna-hwa.no":true,"kafjord.no":true,"xn--kfjord-iua.no":true,"gaivuotna.no":true,"xn--givuotna-8ya.no":true,"larvik.no":true,"lavangen.no":true,"lavagis.no":true,"loabat.no":true,"xn--loabt-0qa.no":true,"lebesby.no":true,"davvesiida.no":true,"leikanger.no":true,"leirfjord.no":true,"leka.no":true,"leksvik.no":true,"lenvik.no":true,"leangaviika.no":true,"xn--leagaviika-52b.no":true,"lesja.no":true,"levanger.no":true,"lier.no":true,"lierne.no":true,"lillehammer.no":true,"lillesand.no":true,"lindesnes.no":true,"lindas.no":true,"xn--linds-pra.no":true,"lom.no":true,"loppa.no":true,"lahppi.no":true,"xn--lhppi-xqa.no":true,"lund.no":true,"lunner.no":true,"luroy.no":true,"xn--lury-ira.no":true,"luster.no":true,"lyngdal.no":true,"lyngen.no":true,"ivgu.no":true,"lardal.no":true,"lerdal.no":true,"xn--lrdal-sra.no":true,"lodingen.no":true,"xn--ldingen-q1a.no":true,"lorenskog.no":true,"xn--lrenskog-54a.no":true,"loten.no":true,"xn--lten-gra.no":true,"malvik.no":true,"masoy.no":true,"xn--msy-ula0h.no":true,"muosat.no":true,"xn--muost-0qa.no":true,"mandal.no":true,"marker.no":true,"marnardal.no":true,"masfjorden.no":true,"meland.no":true,"meldal.no":true,"melhus.no":true,"meloy.no":true,"xn--mely-ira.no":true,"meraker.no":true,"xn--merker-kua.no":true,"moareke.no":true,"xn--moreke-jua.no":true,"midsund.no":true,"midtre-gauldal.no":true,"modalen.no":true,"modum.no":true,"molde.no":true,"moskenes.no":true,"moss.no":true,"mosvik.no":true,"malselv.no":true,"xn--mlselv-iua.no":true,"malatvuopmi.no":true,"xn--mlatvuopmi-s4a.no":true,"namdalseid.no":true,"aejrie.no":true,"namsos.no":true,"namsskogan.no":true,"naamesjevuemie.no":true,"xn--nmesjevuemie-tcba.no":true,"laakesvuemie.no":true,"nannestad.no":true,"narvik.no":true,"narviika.no":true,"naustdal.no":true,"nedre-eiker.no":true,"nes.akershus.no":true,"nes.buskerud.no":true,"nesna.no":true,"nesodden.no":true,"nesseby.no":true,"unjarga.no":true,"xn--unjrga-rta.no":true,"nesset.no":true,"nissedal.no":true,"nittedal.no":true,"nord-aurdal.no":true,"nord-fron.no":true,"nord-odal.no":true,"norddal.no":true,"nordkapp.no":true,"davvenjarga.no":true,"xn--davvenjrga-y4a.no":true,"nordre-land.no":true,"nordreisa.no":true,"raisa.no":true,"xn--risa-5na.no":true,"nore-og-uvdal.no":true,"notodden.no":true,"naroy.no":true,"xn--nry-yla5g.no":true,"notteroy.no":true,"xn--nttery-byae.no":true,"odda.no":true,"oksnes.no":true,"xn--ksnes-uua.no":true,"oppdal.no":true,"oppegard.no":true,"xn--oppegrd-ixa.no":true,"orkdal.no":true,"orland.no":true,"xn--rland-uua.no":true,"orskog.no":true,"xn--rskog-uua.no":true,"orsta.no":true,"xn--rsta-fra.no":true,"os.hedmark.no":true,"os.hordaland.no":true,"osen.no":true,"osteroy.no":true,"xn--ostery-fya.no":true,"ostre-toten.no":true,"xn--stre-toten-zcb.no":true,"overhalla.no":true,"ovre-eiker.no":true,"xn--vre-eiker-k8a.no":true,"oyer.no":true,"xn--yer-zna.no":true,"oygarden.no":true,"xn--ygarden-p1a.no":true,"oystre-slidre.no":true,"xn--ystre-slidre-ujb.no":true,"porsanger.no":true,"porsangu.no":true,"xn--porsgu-sta26f.no":true,"porsgrunn.no":true,"radoy.no":true,"xn--rady-ira.no":true,"rakkestad.no":true,"rana.no":true,"ruovat.no":true,"randaberg.no":true,"rauma.no":true,"rendalen.no":true,"rennebu.no":true,"rennesoy.no":true,"xn--rennesy-v1a.no":true,"rindal.no":true,"ringebu.no":true,"ringerike.no":true,"ringsaker.no":true,"rissa.no":true,"risor.no":true,"xn--risr-ira.no":true,"roan.no":true,"rollag.no":true,"rygge.no":true,"ralingen.no":true,"xn--rlingen-mxa.no":true,"rodoy.no":true,"xn--rdy-0nab.no":true,"romskog.no":true,"xn--rmskog-bya.no":true,"roros.no":true,"xn--rros-gra.no":true,"rost.no":true,"xn--rst-0na.no":true,"royken.no":true,"xn--ryken-vua.no":true,"royrvik.no":true,"xn--ryrvik-bya.no":true,"rade.no":true,"xn--rde-ula.no":true,"salangen.no":true,"siellak.no":true,"saltdal.no":true,"salat.no":true,"xn--slt-elab.no":true,"xn--slat-5na.no":true,"samnanger.no":true,"sande.more-og-romsdal.no":true,"sande.xn--mre-og-romsdal-qqb.no":true,"sande.vestfold.no":true,"sandefjord.no":true,"sandnes.no":true,"sandoy.no":true,"xn--sandy-yua.no":true,"sarpsborg.no":true,"sauda.no":true,"sauherad.no":true,"sel.no":true,"selbu.no":true,"selje.no":true,"seljord.no":true,"sigdal.no":true,"siljan.no":true,"sirdal.no":true,"skaun.no":true,"skedsmo.no":true,"ski.no":true,"skien.no":true,"skiptvet.no":true,"skjervoy.no":true,"xn--skjervy-v1a.no":true,"skierva.no":true,"xn--skierv-uta.no":true,"skjak.no":true,"xn--skjk-soa.no":true,"skodje.no":true,"skanland.no":true,"xn--sknland-fxa.no":true,"skanit.no":true,"xn--sknit-yqa.no":true,"smola.no":true,"xn--smla-hra.no":true,"snillfjord.no":true,"snasa.no":true,"xn--snsa-roa.no":true,"snoasa.no":true,"snaase.no":true,"xn--snase-nra.no":true,"sogndal.no":true,"sokndal.no":true,"sola.no":true,"solund.no":true,"songdalen.no":true,"sortland.no":true,"spydeberg.no":true,"stange.no":true,"stavanger.no":true,"steigen.no":true,"steinkjer.no":true,"stjordal.no":true,"xn--stjrdal-s1a.no":true,"stokke.no":true,"stor-elvdal.no":true,"stord.no":true,"stordal.no":true,"storfjord.no":true,"omasvuotna.no":true,"strand.no":true,"stranda.no":true,"stryn.no":true,"sula.no":true,"suldal.no":true,"sund.no":true,"sunndal.no":true,"surnadal.no":true,"sveio.no":true,"svelvik.no":true,"sykkylven.no":true,"sogne.no":true,"xn--sgne-gra.no":true,"somna.no":true,"xn--smna-gra.no":true,"sondre-land.no":true,"xn--sndre-land-0cb.no":true,"sor-aurdal.no":true,"xn--sr-aurdal-l8a.no":true,"sor-fron.no":true,"xn--sr-fron-q1a.no":true,"sor-odal.no":true,"xn--sr-odal-q1a.no":true,"sor-varanger.no":true,"xn--sr-varanger-ggb.no":true,"matta-varjjat.no":true,"xn--mtta-vrjjat-k7af.no":true,"sorfold.no":true,"xn--srfold-bya.no":true,"sorreisa.no":true,"xn--srreisa-q1a.no":true,"sorum.no":true,"xn--srum-gra.no":true,"tana.no":true,"deatnu.no":true,"time.no":true,"tingvoll.no":true,"tinn.no":true,"tjeldsund.no":true,"dielddanuorri.no":true,"tjome.no":true,"xn--tjme-hra.no":true,"tokke.no":true,"tolga.no":true,"torsken.no":true,"tranoy.no":true,"xn--trany-yua.no":true,"tromso.no":true,"xn--troms-zua.no":true,"tromsa.no":true,"romsa.no":true,"trondheim.no":true,"troandin.no":true,"trysil.no":true,"trana.no":true,"xn--trna-woa.no":true,"trogstad.no":true,"xn--trgstad-r1a.no":true,"tvedestrand.no":true,"tydal.no":true,"tynset.no":true,"tysfjord.no":true,"divtasvuodna.no":true,"divttasvuotna.no":true,"tysnes.no":true,"tysvar.no":true,"xn--tysvr-vra.no":true,"tonsberg.no":true,"xn--tnsberg-q1a.no":true,"ullensaker.no":true,"ullensvang.no":true,"ulvik.no":true,"utsira.no":true,"vadso.no":true,"xn--vads-jra.no":true,"cahcesuolo.no":true,"xn--hcesuolo-7ya35b.no":true,"vaksdal.no":true,"valle.no":true,"vang.no":true,"vanylven.no":true,"vardo.no":true,"xn--vard-jra.no":true,"varggat.no":true,"xn--vrggt-xqad.no":true,"vefsn.no":true,"vaapste.no":true,"vega.no":true,"vegarshei.no":true,"xn--vegrshei-c0a.no":true,"vennesla.no":true,"verdal.no":true,"verran.no":true,"vestby.no":true,"vestnes.no":true,"vestre-slidre.no":true,"vestre-toten.no":true,"vestvagoy.no":true,"xn--vestvgy-ixa6o.no":true,"vevelstad.no":true,"vik.no":true,"vikna.no":true,"vindafjord.no":true,"volda.no":true,"voss.no":true,"varoy.no":true,"xn--vry-yla5g.no":true,"vagan.no":true,"xn--vgan-qoa.no":true,"voagat.no":true,"vagsoy.no":true,"xn--vgsy-qoa0j.no":true,"vaga.no":true,"xn--vg-yiab.no":true,"valer.ostfold.no":true,"xn--vler-qoa.xn--stfold-9xa.no":true,"valer.hedmark.no":true,"xn--vler-qoa.hedmark.no":true,"*.np":true,"nr":true,"biz.nr":true,"info.nr":true,"gov.nr":true,"edu.nr":true,"org.nr":true,"net.nr":true,"com.nr":true,"nu":true,"*.nz":true,"*.om":true,"mediaphone.om":false,"nawrastelecom.om":false,"nawras.om":false,"omanmobile.om":false,"omanpost.om":false,"omantel.om":false,"rakpetroleum.om":false,"siemens.om":false,"songfest.om":false,"statecouncil.om":false,"org":true,"pa":true,"ac.pa":true,"gob.pa":true,"com.pa":true,"org.pa":true,"sld.pa":true,"edu.pa":true,"net.pa":true,"ing.pa":true,"abo.pa":true,"med.pa":true,"nom.pa":true,"pe":true,"edu.pe":true,"gob.pe":true,"nom.pe":true,"mil.pe":true,"org.pe":true,"com.pe":true,"net.pe":true,"pf":true,"com.pf":true,"org.pf":true,"edu.pf":true,"*.pg":true,"ph":true,"com.ph":true,"net.ph":true,"org.ph":true,"gov.ph":true,"edu.ph":true,"ngo.ph":true,"mil.ph":true,"i.ph":true,"pk":true,"com.pk":true,"net.pk":true,"edu.pk":true,"org.pk":true,"fam.pk":true,"biz.pk":true,"web.pk":true,"gov.pk":true,"gob.pk":true,"gok.pk":true,"gon.pk":true,"gop.pk":true,"gos.pk":true,"info.pk":true,"pl":true,"aid.pl":true,"agro.pl":true,"atm.pl":true,"auto.pl":true,"biz.pl":true,"com.pl":true,"edu.pl":true,"gmina.pl":true,"gsm.pl":true,"info.pl":true,"mail.pl":true,"miasta.pl":true,"media.pl":true,"mil.pl":true,"net.pl":true,"nieruchomosci.pl":true,"nom.pl":true,"org.pl":true,"pc.pl":true,"powiat.pl":true,"priv.pl":true,"realestate.pl":true,"rel.pl":true,"sex.pl":true,"shop.pl":true,"sklep.pl":true,"sos.pl":true,"szkola.pl":true,"targi.pl":true,"tm.pl":true,"tourism.pl":true,"travel.pl":true,"turystyka.pl":true,"6bone.pl":true,"art.pl":true,"mbone.pl":true,"gov.pl":true,"uw.gov.pl":true,"um.gov.pl":true,"ug.gov.pl":true,"upow.gov.pl":true,"starostwo.gov.pl":true,"so.gov.pl":true,"sr.gov.pl":true,"po.gov.pl":true,"pa.gov.pl":true,"ngo.pl":true,"irc.pl":true,"usenet.pl":true,"augustow.pl":true,"babia-gora.pl":true,"bedzin.pl":true,"beskidy.pl":true,"bialowieza.pl":true,"bialystok.pl":true,"bielawa.pl":true,"bieszczady.pl":true,"boleslawiec.pl":true,"bydgoszcz.pl":true,"bytom.pl":true,"cieszyn.pl":true,"czeladz.pl":true,"czest.pl":true,"dlugoleka.pl":true,"elblag.pl":true,"elk.pl":true,"glogow.pl":true,"gniezno.pl":true,"gorlice.pl":true,"grajewo.pl":true,"ilawa.pl":true,"jaworzno.pl":true,"jelenia-gora.pl":true,"jgora.pl":true,"kalisz.pl":true,"kazimierz-dolny.pl":true,"karpacz.pl":true,"kartuzy.pl":true,"kaszuby.pl":true,"katowice.pl":true,"kepno.pl":true,"ketrzyn.pl":true,"klodzko.pl":true,"kobierzyce.pl":true,"kolobrzeg.pl":true,"konin.pl":true,"konskowola.pl":true,"kutno.pl":true,"lapy.pl":true,"lebork.pl":true,"legnica.pl":true,"lezajsk.pl":true,"limanowa.pl":true,"lomza.pl":true,"lowicz.pl":true,"lubin.pl":true,"lukow.pl":true,"malbork.pl":true,"malopolska.pl":true,"mazowsze.pl":true,"mazury.pl":true,"mielec.pl":true,"mielno.pl":true,"mragowo.pl":true,"naklo.pl":true,"nowaruda.pl":true,"nysa.pl":true,"olawa.pl":true,"olecko.pl":true,"olkusz.pl":true,"olsztyn.pl":true,"opoczno.pl":true,"opole.pl":true,"ostroda.pl":true,"ostroleka.pl":true,"ostrowiec.pl":true,"ostrowwlkp.pl":true,"pila.pl":true,"pisz.pl":true,"podhale.pl":true,"podlasie.pl":true,"polkowice.pl":true,"pomorze.pl":true,"pomorskie.pl":true,"prochowice.pl":true,"pruszkow.pl":true,"przeworsk.pl":true,"pulawy.pl":true,"radom.pl":true,"rawa-maz.pl":true,"rybnik.pl":true,"rzeszow.pl":true,"sanok.pl":true,"sejny.pl":true,"siedlce.pl":true,"slask.pl":true,"slupsk.pl":true,"sosnowiec.pl":true,"stalowa-wola.pl":true,"skoczow.pl":true,"starachowice.pl":true,"stargard.pl":true,"suwalki.pl":true,"swidnica.pl":true,"swiebodzin.pl":true,"swinoujscie.pl":true,"szczecin.pl":true,"szczytno.pl":true,"tarnobrzeg.pl":true,"tgory.pl":true,"turek.pl":true,"tychy.pl":true,"ustka.pl":true,"walbrzych.pl":true,"warmia.pl":true,"warszawa.pl":true,"waw.pl":true,"wegrow.pl":true,"wielun.pl":true,"wlocl.pl":true,"wloclawek.pl":true,"wodzislaw.pl":true,"wolomin.pl":true,"wroclaw.pl":true,"zachpomor.pl":true,"zagan.pl":true,"zarow.pl":true,"zgora.pl":true,"zgorzelec.pl":true,"gda.pl":true,"gdansk.pl":true,"gdynia.pl":true,"med.pl":true,"sopot.pl":true,"gliwice.pl":true,"krakow.pl":true,"poznan.pl":true,"wroc.pl":true,"zakopane.pl":true,"pm":true,"pn":true,"gov.pn":true,"co.pn":true,"org.pn":true,"edu.pn":true,"net.pn":true,"pr":true,"com.pr":true,"net.pr":true,"org.pr":true,"gov.pr":true,"edu.pr":true,"isla.pr":true,"pro.pr":true,"biz.pr":true,"info.pr":true,"name.pr":true,"est.pr":true,"prof.pr":true,"ac.pr":true,"pro":true,"aca.pro":true,"bar.pro":true,"cpa.pro":true,"jur.pro":true,"law.pro":true,"med.pro":true,"eng.pro":true,"ps":true,"edu.ps":true,"gov.ps":true,"sec.ps":true,"plo.ps":true,"com.ps":true,"org.ps":true,"net.ps":true,"pt":true,"net.pt":true,"gov.pt":true,"org.pt":true,"edu.pt":true,"int.pt":true,"publ.pt":true,"com.pt":true,"nome.pt":true,"pw":true,"co.pw":true,"ne.pw":true,"or.pw":true,"ed.pw":true,"go.pw":true,"belau.pw":true,"*.py":true,"qa":true,"com.qa":true,"edu.qa":true,"gov.qa":true,"mil.qa":true,"name.qa":true,"net.qa":true,"org.qa":true,"sch.qa":true,"re":true,"com.re":true,"asso.re":true,"nom.re":true,"ro":true,"com.ro":true,"org.ro":true,"tm.ro":true,"nt.ro":true,"nom.ro":true,"info.ro":true,"rec.ro":true,"arts.ro":true,"firm.ro":true,"store.ro":true,"www.ro":true,"rs":true,"co.rs":true,"org.rs":true,"edu.rs":true,"ac.rs":true,"gov.rs":true,"in.rs":true,"ru":true,"ac.ru":true,"com.ru":true,"edu.ru":true,"int.ru":true,"net.ru":true,"org.ru":true,"pp.ru":true,"adygeya.ru":true,"altai.ru":true,"amur.ru":true,"arkhangelsk.ru":true,"astrakhan.ru":true,"bashkiria.ru":true,"belgorod.ru":true,"bir.ru":true,"bryansk.ru":true,"buryatia.ru":true,"cbg.ru":true,"chel.ru":true,"chelyabinsk.ru":true,"chita.ru":true,"chukotka.ru":true,"chuvashia.ru":true,"dagestan.ru":true,"dudinka.ru":true,"e-burg.ru":true,"grozny.ru":true,"irkutsk.ru":true,"ivanovo.ru":true,"izhevsk.ru":true,"jar.ru":true,"joshkar-ola.ru":true,"kalmykia.ru":true,"kaluga.ru":true,"kamchatka.ru":true,"karelia.ru":true,"kazan.ru":true,"kchr.ru":true,"kemerovo.ru":true,"khabarovsk.ru":true,"khakassia.ru":true,"khv.ru":true,"kirov.ru":true,"koenig.ru":true,"komi.ru":true,"kostroma.ru":true,"krasnoyarsk.ru":true,"kuban.ru":true,"kurgan.ru":true,"kursk.ru":true,"lipetsk.ru":true,"magadan.ru":true,"mari.ru":true,"mari-el.ru":true,"marine.ru":true,"mordovia.ru":true,"mosreg.ru":true,"msk.ru":true,"murmansk.ru":true,"nalchik.ru":true,"nnov.ru":true,"nov.ru":true,"novosibirsk.ru":true,"nsk.ru":true,"omsk.ru":true,"orenburg.ru":true,"oryol.ru":true,"palana.ru":true,"penza.ru":true,"perm.ru":true,"pskov.ru":true,"ptz.ru":true,"rnd.ru":true,"ryazan.ru":true,"sakhalin.ru":true,"samara.ru":true,"saratov.ru":true,"simbirsk.ru":true,"smolensk.ru":true,"spb.ru":true,"stavropol.ru":true,"stv.ru":true,"surgut.ru":true,"tambov.ru":true,"tatarstan.ru":true,"tom.ru":true,"tomsk.ru":true,"tsaritsyn.ru":true,"tsk.ru":true,"tula.ru":true,"tuva.ru":true,"tver.ru":true,"tyumen.ru":true,"udm.ru":true,"udmurtia.ru":true,"ulan-ude.ru":true,"vladikavkaz.ru":true,"vladimir.ru":true,"vladivostok.ru":true,"volgograd.ru":true,"vologda.ru":true,"voronezh.ru":true,"vrn.ru":true,"vyatka.ru":true,"yakutia.ru":true,"yamal.ru":true,"yaroslavl.ru":true,"yekaterinburg.ru":true,"yuzhno-sakhalinsk.ru":true,"amursk.ru":true,"baikal.ru":true,"cmw.ru":true,"fareast.ru":true,"jamal.ru":true,"kms.ru":true,"k-uralsk.ru":true,"kustanai.ru":true,"kuzbass.ru":true,"magnitka.ru":true,"mytis.ru":true,"nakhodka.ru":true,"nkz.ru":true,"norilsk.ru":true,"oskol.ru":true,"pyatigorsk.ru":true,"rubtsovsk.ru":true,"snz.ru":true,"syzran.ru":true,"vdonsk.ru":true,"zgrad.ru":true,"gov.ru":true,"mil.ru":true,"test.ru":true,"rw":true,"gov.rw":true,"net.rw":true,"edu.rw":true,"ac.rw":true,"com.rw":true,"co.rw":true,"int.rw":true,"mil.rw":true,"gouv.rw":true,"sa":true,"com.sa":true,"net.sa":true,"org.sa":true,"gov.sa":true,"med.sa":true,"pub.sa":true,"edu.sa":true,"sch.sa":true,"sb":true,"com.sb":true,"edu.sb":true,"gov.sb":true,"net.sb":true,"org.sb":true,"sc":true,"com.sc":true,"gov.sc":true,"net.sc":true,"org.sc":true,"edu.sc":true,"sd":true,"com.sd":true,"net.sd":true,"org.sd":true,"edu.sd":true,"med.sd":true,"gov.sd":true,"info.sd":true,"se":true,"a.se":true,"ac.se":true,"b.se":true,"bd.se":true,"brand.se":true,"c.se":true,"d.se":true,"e.se":true,"f.se":true,"fh.se":true,"fhsk.se":true,"fhv.se":true,"g.se":true,"h.se":true,"i.se":true,"k.se":true,"komforb.se":true,"kommunalforbund.se":true,"komvux.se":true,"l.se":true,"lanbib.se":true,"m.se":true,"n.se":true,"naturbruksgymn.se":true,"o.se":true,"org.se":true,"p.se":true,"parti.se":true,"pp.se":true,"press.se":true,"r.se":true,"s.se":true,"sshn.se":true,"t.se":true,"tm.se":true,"u.se":true,"w.se":true,"x.se":true,"y.se":true,"z.se":true,"sg":true,"com.sg":true,"net.sg":true,"org.sg":true,"gov.sg":true,"edu.sg":true,"per.sg":true,"sh":true,"si":true,"sk":true,"sl":true,"com.sl":true,"net.sl":true,"edu.sl":true,"gov.sl":true,"org.sl":true,"sm":true,"sn":true,"art.sn":true,"com.sn":true,"edu.sn":true,"gouv.sn":true,"org.sn":true,"perso.sn":true,"univ.sn":true,"so":true,"com.so":true,"net.so":true,"org.so":true,"sr":true,"st":true,"co.st":true,"com.st":true,"consulado.st":true,"edu.st":true,"embaixada.st":true,"gov.st":true,"mil.st":true,"net.st":true,"org.st":true,"principe.st":true,"saotome.st":true,"store.st":true,"su":true,"*.sv":true,"sy":true,"edu.sy":true,"gov.sy":true,"net.sy":true,"mil.sy":true,"com.sy":true,"org.sy":true,"sz":true,"co.sz":true,"ac.sz":true,"org.sz":true,"tc":true,"td":true,"tel":true,"tf":true,"tg":true,"th":true,"ac.th":true,"co.th":true,"go.th":true,"in.th":true,"mi.th":true,"net.th":true,"or.th":true,"tj":true,"ac.tj":true,"biz.tj":true,"co.tj":true,"com.tj":true,"edu.tj":true,"go.tj":true,"gov.tj":true,"int.tj":true,"mil.tj":true,"name.tj":true,"net.tj":true,"nic.tj":true,"org.tj":true,"test.tj":true,"web.tj":true,"tk":true,"tl":true,"gov.tl":true,"tm":true,"tn":true,"com.tn":true,"ens.tn":true,"fin.tn":true,"gov.tn":true,"ind.tn":true,"intl.tn":true,"nat.tn":true,"net.tn":true,"org.tn":true,"info.tn":true,"perso.tn":true,"tourism.tn":true,"edunet.tn":true,"rnrt.tn":true,"rns.tn":true,"rnu.tn":true,"mincom.tn":true,"agrinet.tn":true,"defense.tn":true,"turen.tn":true,"to":true,"com.to":true,"gov.to":true,"net.to":true,"org.to":true,"edu.to":true,"mil.to":true,"*.tr":true,"nic.tr":false,"gov.nc.tr":true,"travel":true,"tt":true,"co.tt":true,"com.tt":true,"org.tt":true,"net.tt":true,"biz.tt":true,"info.tt":true,"pro.tt":true,"int.tt":true,"coop.tt":true,"jobs.tt":true,"mobi.tt":true,"travel.tt":true,"museum.tt":true,"aero.tt":true,"name.tt":true,"gov.tt":true,"edu.tt":true,"tv":true,"tw":true,"edu.tw":true,"gov.tw":true,"mil.tw":true,"com.tw":true,"net.tw":true,"org.tw":true,"idv.tw":true,"game.tw":true,"ebiz.tw":true,"club.tw":true,"xn--zf0ao64a.tw":true,"xn--uc0atv.tw":true,"xn--czrw28b.tw":true,"ac.tz":true,"co.tz":true,"go.tz":true,"mil.tz":true,"ne.tz":true,"or.tz":true,"sc.tz":true,"ua":true,"com.ua":true,"edu.ua":true,"gov.ua":true,"in.ua":true,"net.ua":true,"org.ua":true,"cherkassy.ua":true,"chernigov.ua":true,"chernovtsy.ua":true,"ck.ua":true,"cn.ua":true,"crimea.ua":true,"cv.ua":true,"dn.ua":true,"dnepropetrovsk.ua":true,"donetsk.ua":true,"dp.ua":true,"if.ua":true,"ivano-frankivsk.ua":true,"kh.ua":true,"kharkov.ua":true,"kherson.ua":true,"khmelnitskiy.ua":true,"kiev.ua":true,"kirovograd.ua":true,"km.ua":true,"kr.ua":true,"ks.ua":true,"kv.ua":true,"lg.ua":true,"lugansk.ua":true,"lutsk.ua":true,"lviv.ua":true,"mk.ua":true,"nikolaev.ua":true,"od.ua":true,"odessa.ua":true,"pl.ua":true,"poltava.ua":true,"rovno.ua":true,"rv.ua":true,"sebastopol.ua":true,"sumy.ua":true,"te.ua":true,"ternopil.ua":true,"uzhgorod.ua":true,"vinnica.ua":true,"vn.ua":true,"zaporizhzhe.ua":true,"zp.ua":true,"zhitomir.ua":true,"zt.ua":true,"co.ua":true,"pp.ua":true,"ug":true,"co.ug":true,"ac.ug":true,"sc.ug":true,"go.ug":true,"ne.ug":true,"or.ug":true,"*.uk":true,"*.sch.uk":true,"bl.uk":false,"british-library.uk":false,"icnet.uk":false,"jet.uk":false,"mod.uk":false,"nel.uk":false,"nhs.uk":false,"nic.uk":false,"nls.uk":false,"national-library-scotland.uk":false,"parliament.uk":false,"police.uk":false,"us":true,"dni.us":true,"fed.us":true,"isa.us":true,"kids.us":true,"nsn.us":true,"ak.us":true,"al.us":true,"ar.us":true,"as.us":true,"az.us":true,"ca.us":true,"co.us":true,"ct.us":true,"dc.us":true,"de.us":true,"fl.us":true,"ga.us":true,"gu.us":true,"hi.us":true,"ia.us":true,"id.us":true,"il.us":true,"in.us":true,"ks.us":true,"ky.us":true,"la.us":true,"ma.us":true,"md.us":true,"me.us":true,"mi.us":true,"mn.us":true,"mo.us":true,"ms.us":true,"mt.us":true,"nc.us":true,"nd.us":true,"ne.us":true,"nh.us":true,"nj.us":true,"nm.us":true,"nv.us":true,"ny.us":true,"oh.us":true,"ok.us":true,"or.us":true,"pa.us":true,"pr.us":true,"ri.us":true,"sc.us":true,"sd.us":true,"tn.us":true,"tx.us":true,"ut.us":true,"vi.us":true,"vt.us":true,"va.us":true,"wa.us":true,"wi.us":true,"wv.us":true,"wy.us":true,"k12.ak.us":true,"k12.al.us":true,"k12.ar.us":true,"k12.as.us":true,"k12.az.us":true,"k12.ca.us":true,"k12.co.us":true,"k12.ct.us":true,"k12.dc.us":true,"k12.de.us":true,"k12.fl.us":true,"k12.ga.us":true,"k12.gu.us":true,"k12.ia.us":true,"k12.id.us":true,"k12.il.us":true,"k12.in.us":true,"k12.ks.us":true,"k12.ky.us":true,"k12.la.us":true,"k12.ma.us":true,"k12.md.us":true,"k12.me.us":true,"k12.mi.us":true,"k12.mn.us":true,"k12.mo.us":true,"k12.ms.us":true,"k12.mt.us":true,"k12.nc.us":true,"k12.nd.us":true,"k12.ne.us":true,"k12.nh.us":true,"k12.nj.us":true,"k12.nm.us":true,"k12.nv.us":true,"k12.ny.us":true,"k12.oh.us":true,"k12.ok.us":true,"k12.or.us":true,"k12.pa.us":true,"k12.pr.us":true,"k12.ri.us":true,"k12.sc.us":true,"k12.sd.us":true,"k12.tn.us":true,"k12.tx.us":true,"k12.ut.us":true,"k12.vi.us":true,"k12.vt.us":true,"k12.va.us":true,"k12.wa.us":true,"k12.wi.us":true,"k12.wv.us":true,"k12.wy.us":true,"cc.ak.us":true,"cc.al.us":true,"cc.ar.us":true,"cc.as.us":true,"cc.az.us":true,"cc.ca.us":true,"cc.co.us":true,"cc.ct.us":true,"cc.dc.us":true,"cc.de.us":true,"cc.fl.us":true,"cc.ga.us":true,"cc.gu.us":true,"cc.hi.us":true,"cc.ia.us":true,"cc.id.us":true,"cc.il.us":true,"cc.in.us":true,"cc.ks.us":true,"cc.ky.us":true,"cc.la.us":true,"cc.ma.us":true,"cc.md.us":true,"cc.me.us":true,"cc.mi.us":true,"cc.mn.us":true,"cc.mo.us":true,"cc.ms.us":true,"cc.mt.us":true,"cc.nc.us":true,"cc.nd.us":true,"cc.ne.us":true,"cc.nh.us":true,"cc.nj.us":true,"cc.nm.us":true,"cc.nv.us":true,"cc.ny.us":true,"cc.oh.us":true,"cc.ok.us":true,"cc.or.us":true,"cc.pa.us":true,"cc.pr.us":true,"cc.ri.us":true,"cc.sc.us":true,"cc.sd.us":true,"cc.tn.us":true,"cc.tx.us":true,"cc.ut.us":true,"cc.vi.us":true,"cc.vt.us":true,"cc.va.us":true,"cc.wa.us":true,"cc.wi.us":true,"cc.wv.us":true,"cc.wy.us":true,"lib.ak.us":true,"lib.al.us":true,"lib.ar.us":true,"lib.as.us":true,"lib.az.us":true,"lib.ca.us":true,"lib.co.us":true,"lib.ct.us":true,"lib.dc.us":true,"lib.de.us":true,"lib.fl.us":true,"lib.ga.us":true,"lib.gu.us":true,"lib.hi.us":true,"lib.ia.us":true,"lib.id.us":true,"lib.il.us":true,"lib.in.us":true,"lib.ks.us":true,"lib.ky.us":true,"lib.la.us":true,"lib.ma.us":true,"lib.md.us":true,"lib.me.us":true,"lib.mi.us":true,"lib.mn.us":true,"lib.mo.us":true,"lib.ms.us":true,"lib.mt.us":true,"lib.nc.us":true,"lib.nd.us":true,"lib.ne.us":true,"lib.nh.us":true,"lib.nj.us":true,"lib.nm.us":true,"lib.nv.us":true,"lib.ny.us":true,"lib.oh.us":true,"lib.ok.us":true,"lib.or.us":true,"lib.pa.us":true,"lib.pr.us":true,"lib.ri.us":true,"lib.sc.us":true,"lib.sd.us":true,"lib.tn.us":true,"lib.tx.us":true,"lib.ut.us":true,"lib.vi.us":true,"lib.vt.us":true,"lib.va.us":true,"lib.wa.us":true,"lib.wi.us":true,"lib.wv.us":true,"lib.wy.us":true,"pvt.k12.ma.us":true,"chtr.k12.ma.us":true,"paroch.k12.ma.us":true,"*.uy":true,"uz":true,"com.uz":true,"co.uz":true,"va":true,"vc":true,"com.vc":true,"net.vc":true,"org.vc":true,"gov.vc":true,"mil.vc":true,"edu.vc":true,"*.ve":true,"vg":true,"vi":true,"co.vi":true,"com.vi":true,"k12.vi":true,"net.vi":true,"org.vi":true,"vn":true,"com.vn":true,"net.vn":true,"org.vn":true,"edu.vn":true,"gov.vn":true,"int.vn":true,"ac.vn":true,"biz.vn":true,"info.vn":true,"name.vn":true,"pro.vn":true,"health.vn":true,"vu":true,"wf":true,"ws":true,"com.ws":true,"net.ws":true,"org.ws":true,"gov.ws":true,"edu.ws":true,"yt":true,"xn--mgbaam7a8h":true,"xn--54b7fta0cc":true,"xn--fiqs8s":true,"xn--fiqz9s":true,"xn--lgbbat1ad8j":true,"xn--wgbh1c":true,"xn--node":true,"xn--j6w193g":true,"xn--h2brj9c":true,"xn--mgbbh1a71e":true,"xn--fpcrj9c3d":true,"xn--gecrj9c":true,"xn--s9brj9c":true,"xn--45brj9c":true,"xn--xkc2dl3a5ee0h":true,"xn--mgba3a4f16a":true,"xn--mgba3a4fra":true,"xn--mgbayh7gpa":true,"xn--3e0b707e":true,"xn--fzc2c9e2c":true,"xn--xkc2al3hye2a":true,"xn--mgbc0a9azcg":true,"xn--mgb9awbf":true,"xn--ygbi2ammx":true,"xn--90a3ac":true,"xn--p1ai":true,"xn--wgbl6a":true,"xn--mgberp4a5d4ar":true,"xn--mgberp4a5d4a87g":true,"xn--mgbqly7c0a67fbc":true,"xn--mgbqly7cvafr":true,"xn--ogbpf8fl":true,"xn--mgbtf8fl":true,"xn--yfro4i67o":true,"xn--clchc0ea0b2g2a9gcd":true,"xn--o3cw4h":true,"xn--pgbs0dh":true,"xn--kpry57d":true,"xn--kprw13d":true,"xn--nnx388a":true,"xn--j1amh":true,"xn--mgb2ddes":true,"xxx":true,"*.ye":true,"*.za":true,"*.zm":true,"*.zw":true,"biz.at":true,"info.at":true,"priv.at":true,"co.ca":true,"ar.com":true,"br.com":true,"cn.com":true,"de.com":true,"eu.com":true,"gb.com":true,"gr.com":true,"hu.com":true,"jpn.com":true,"kr.com":true,"no.com":true,"qc.com":true,"ru.com":true,"sa.com":true,"se.com":true,"uk.com":true,"us.com":true,"uy.com":true,"za.com":true,"gb.net":true,"jp.net":true,"se.net":true,"uk.net":true,"ae.org":true,"us.org":true,"com.de":true,"operaunite.com":true,"appspot.com":true,"iki.fi":true,"c.la":true,"za.net":true,"za.org":true,"co.nl":true,"co.no":true,"co.pl":true,"dyndns-at-home.com":true,"dyndns-at-work.com":true,"dyndns-blog.com":true,"dyndns-free.com":true,"dyndns-home.com":true,"dyndns-ip.com":true,"dyndns-mail.com":true,"dyndns-office.com":true,"dyndns-pics.com":true,"dyndns-remote.com":true,"dyndns-server.com":true,"dyndns-web.com":true,"dyndns-wiki.com":true,"dyndns-work.com":true,"dyndns.biz":true,"dyndns.info":true,"dyndns.org":true,"dyndns.tv":true,"at-band-camp.net":true,"ath.cx":true,"barrel-of-knowledge.info":true,"barrell-of-knowledge.info":true,"better-than.tv":true,"blogdns.com":true,"blogdns.net":true,"blogdns.org":true,"blogsite.org":true,"boldlygoingnowhere.org":true,"broke-it.net":true,"buyshouses.net":true,"cechire.com":true,"dnsalias.com":true,"dnsalias.net":true,"dnsalias.org":true,"dnsdojo.com":true,"dnsdojo.net":true,"dnsdojo.org":true,"does-it.net":true,"doesntexist.com":true,"doesntexist.org":true,"dontexist.com":true,"dontexist.net":true,"dontexist.org":true,"doomdns.com":true,"doomdns.org":true,"dvrdns.org":true,"dyn-o-saur.com":true,"dynalias.com":true,"dynalias.net":true,"dynalias.org":true,"dynathome.net":true,"dyndns.ws":true,"endofinternet.net":true,"endofinternet.org":true,"endoftheinternet.org":true,"est-a-la-maison.com":true,"est-a-la-masion.com":true,"est-le-patron.com":true,"est-mon-blogueur.com":true,"for-better.biz":true,"for-more.biz":true,"for-our.info":true,"for-some.biz":true,"for-the.biz":true,"forgot.her.name":true,"forgot.his.name":true,"from-ak.com":true,"from-al.com":true,"from-ar.com":true,"from-az.net":true,"from-ca.com":true,"from-co.net":true,"from-ct.com":true,"from-dc.com":true,"from-de.com":true,"from-fl.com":true,"from-ga.com":true,"from-hi.com":true,"from-ia.com":true,"from-id.com":true,"from-il.com":true,"from-in.com":true,"from-ks.com":true,"from-ky.com":true,"from-la.net":true,"from-ma.com":true,"from-md.com":true,"from-me.org":true,"from-mi.com":true,"from-mn.com":true,"from-mo.com":true,"from-ms.com":true,"from-mt.com":true,"from-nc.com":true,"from-nd.com":true,"from-ne.com":true,"from-nh.com":true,"from-nj.com":true,"from-nm.com":true,"from-nv.com":true,"from-ny.net":true,"from-oh.com":true,"from-ok.com":true,"from-or.com":true,"from-pa.com":true,"from-pr.com":true,"from-ri.com":true,"from-sc.com":true,"from-sd.com":true,"from-tn.com":true,"from-tx.com":true,"from-ut.com":true,"from-va.com":true,"from-vt.com":true,"from-wa.com":true,"from-wi.com":true,"from-wv.com":true,"from-wy.com":true,"ftpaccess.cc":true,"fuettertdasnetz.de":true,"game-host.org":true,"game-server.cc":true,"getmyip.com":true,"gets-it.net":true,"go.dyndns.org":true,"gotdns.com":true,"gotdns.org":true,"groks-the.info":true,"groks-this.info":true,"ham-radio-op.net":true,"here-for-more.info":true,"hobby-site.com":true,"hobby-site.org":true,"home.dyndns.org":true,"homedns.org":true,"homeftp.net":true,"homeftp.org":true,"homeip.net":true,"homelinux.com":true,"homelinux.net":true,"homelinux.org":true,"homeunix.com":true,"homeunix.net":true,"homeunix.org":true,"iamallama.com":true,"in-the-band.net":true,"is-a-anarchist.com":true,"is-a-blogger.com":true,"is-a-bookkeeper.com":true,"is-a-bruinsfan.org":true,"is-a-bulls-fan.com":true,"is-a-candidate.org":true,"is-a-caterer.com":true,"is-a-celticsfan.org":true,"is-a-chef.com":true,"is-a-chef.net":true,"is-a-chef.org":true,"is-a-conservative.com":true,"is-a-cpa.com":true,"is-a-cubicle-slave.com":true,"is-a-democrat.com":true,"is-a-designer.com":true,"is-a-doctor.com":true,"is-a-financialadvisor.com":true,"is-a-geek.com":true,"is-a-geek.net":true,"is-a-geek.org":true,"is-a-green.com":true,"is-a-guru.com":true,"is-a-hard-worker.com":true,"is-a-hunter.com":true,"is-a-knight.org":true,"is-a-landscaper.com":true,"is-a-lawyer.com":true,"is-a-liberal.com":true,"is-a-libertarian.com":true,"is-a-linux-user.org":true,"is-a-llama.com":true,"is-a-musician.com":true,"is-a-nascarfan.com":true,"is-a-nurse.com":true,"is-a-painter.com":true,"is-a-patsfan.org":true,"is-a-personaltrainer.com":true,"is-a-photographer.com":true,"is-a-player.com":true,"is-a-republican.com":true,"is-a-rockstar.com":true,"is-a-socialist.com":true,"is-a-soxfan.org":true,"is-a-student.com":true,"is-a-teacher.com":true,"is-a-techie.com":true,"is-a-therapist.com":true,"is-an-accountant.com":true,"is-an-actor.com":true,"is-an-actress.com":true,"is-an-anarchist.com":true,"is-an-artist.com":true,"is-an-engineer.com":true,"is-an-entertainer.com":true,"is-by.us":true,"is-certified.com":true,"is-found.org":true,"is-gone.com":true,"is-into-anime.com":true,"is-into-cars.com":true,"is-into-cartoons.com":true,"is-into-games.com":true,"is-leet.com":true,"is-lost.org":true,"is-not-certified.com":true,"is-saved.org":true,"is-slick.com":true,"is-uberleet.com":true,"is-very-bad.org":true,"is-very-evil.org":true,"is-very-good.org":true,"is-very-nice.org":true,"is-very-sweet.org":true,"is-with-theband.com":true,"isa-geek.com":true,"isa-geek.net":true,"isa-geek.org":true,"isa-hockeynut.com":true,"issmarterthanyou.com":true,"isteingeek.de":true,"istmein.de":true,"kicks-ass.net":true,"kicks-ass.org":true,"knowsitall.info":true,"land-4-sale.us":true,"lebtimnetz.de":true,"leitungsen.de":true,"likes-pie.com":true,"likescandy.com":true,"merseine.nu":true,"mine.nu":true,"misconfused.org":true,"mypets.ws":true,"myphotos.cc":true,"neat-url.com":true,"office-on-the.net":true,"on-the-web.tv":true,"podzone.net":true,"podzone.org":true,"readmyblog.org":true,"saves-the-whales.com":true,"scrapper-site.net":true,"scrapping.cc":true,"selfip.biz":true,"selfip.com":true,"selfip.info":true,"selfip.net":true,"selfip.org":true,"sells-for-less.com":true,"sells-for-u.com":true,"sells-it.net":true,"sellsyourhome.org":true,"servebbs.com":true,"servebbs.net":true,"servebbs.org":true,"serveftp.net":true,"serveftp.org":true,"servegame.org":true,"shacknet.nu":true,"simple-url.com":true,"space-to-rent.com":true,"stuff-4-sale.org":true,"stuff-4-sale.us":true,"teaches-yoga.com":true,"thruhere.net":true,"traeumtgerade.de":true,"webhop.biz":true,"webhop.info":true,"webhop.net":true,"webhop.org":true,"worse-than.tv":true,"writesthisblog.com":true}); - -// END of automatically generated file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt deleted file mode 100644 index 11dddd00..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt +++ /dev/null @@ -1,278 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt deleted file mode 100644 index 97067e54..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens <http://mathiasbynens.be/> - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json deleted file mode 100644 index 69e12ae2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "punycode", - "version": "1.2.3", - "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.", - "homepage": "http://mths.be/punycode", - "main": "punycode.js", - "keywords": [ - "punycode", - "unicode", - "idn", - "idna", - "dns", - "url", - "domain" - ], - "licenses": [ - { - "type": "MIT", - "url": "http://mths.be/mit" - }, - { - "type": "GPL", - "url": "http://mths.be/gpl" - } - ], - "author": { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - }, - "contributors": [ - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - }, - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - } - ], - "bugs": { - "url": "https://github.com/bestiejs/punycode.js/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/bestiejs/punycode.js.git" - }, - "engines": [ - "node", - "rhino" - ], - "directories": { - "doc": "docs", - "test": "tests" - }, - "scripts": { - "test": "node tests/tests.js" - }, - "devDependencies": { - "grunt": "~0.4.1", - "grunt-contrib-uglify": "~0.2.2", - "grunt-shell": "~0.2.2", - "istanbul": "~0.1.37", - "qunit-clib": "~1.3.0", - "qunitjs": "~1.11.0", - "requirejs": "~2.1.6" - }, - "readme": "ERROR: No README data found!", - "_id": "punycode@1.2.3", - "dist": { - "shasum": "b4e304471082d783c73b3bafabf2fd9b6a486266" - }, - "_from": "punycode@>=0.2.0", - "_resolved": "https://registry.npmjs.org/punycode/-/punycode-1.2.3.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js deleted file mode 100644 index 41803ba4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js +++ /dev/null @@ -1,508 +0,0 @@ -/*! http://mths.be/punycode v1.2.3 by @mathias */ -;(function(root) { - - /** Detect free variables */ - var freeExports = typeof exports == 'object' && exports; - var freeModule = typeof module == 'object' && module && - module.exports == freeExports && module; - var freeGlobal = typeof global == 'object' && global; - if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { - root = freeGlobal; - } - - /** - * The `punycode` object. - * @name punycode - * @type Object - */ - var punycode, - - /** Highest positive signed 32-bit float value */ - maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 - - /** Bootstring parameters */ - base = 36, - tMin = 1, - tMax = 26, - skew = 38, - damp = 700, - initialBias = 72, - initialN = 128, // 0x80 - delimiter = '-', // '\x2D' - - /** Regular expressions */ - regexPunycode = /^xn--/, - regexNonASCII = /[^ -~]/, // unprintable ASCII chars + non-ASCII chars - regexSeparators = /\x2E|\u3002|\uFF0E|\uFF61/g, // RFC 3490 separators - - /** Error messages */ - errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' - }, - - /** Convenience shortcuts */ - baseMinusTMin = base - tMin, - floor = Math.floor, - stringFromCharCode = String.fromCharCode, - - /** Temporary variable */ - key; - - /*--------------------------------------------------------------------------*/ - - /** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ - function error(type) { - throw RangeError(errors[type]); - } - - /** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ - function map(array, fn) { - var length = array.length; - while (length--) { - array[length] = fn(array[length]); - } - return array; - } - - /** - * A simple `Array#map`-like wrapper to work with domain name strings. - * @private - * @param {String} domain The domain name. - * @param {Function} callback The function that gets called for every - * character. - * @returns {Array} A new string of characters returned by the callback - * function. - */ - function mapDomain(string, fn) { - return map(string.split(regexSeparators), fn).join('.'); - } - - /** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see <http://mathiasbynens.be/notes/javascript-encoding> - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ - function ucs2decode(string) { - var output = [], - counter = 0, - length = string.length, - value, - extra; - while (counter < length) { - value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // high surrogate, and there is a next character - extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // low surrogate - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // unmatched surrogate; only append this code unit, in case the next - // code unit is the high surrogate of a surrogate pair - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; - } - - /** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ - function ucs2encode(array) { - return map(array, function(value) { - var output = ''; - if (value > 0xFFFF) { - value -= 0x10000; - output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); - value = 0xDC00 | value & 0x3FF; - } - output += stringFromCharCode(value); - return output; - }).join(''); - } - - /** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ - function basicToDigit(codePoint) { - if (codePoint - 48 < 10) { - return codePoint - 22; - } - if (codePoint - 65 < 26) { - return codePoint - 65; - } - if (codePoint - 97 < 26) { - return codePoint - 97; - } - return base; - } - - /** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ - function digitToBasic(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); - } - - /** - * Bias adaptation function as per section 3.4 of RFC 3492. - * http://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ - function adapt(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); - } - - /** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ - function decode(input) { - // Don't use UCS-2 - var output = [], - inputLength = input.length, - out, - i = 0, - n = initialN, - bias = initialBias, - basic, - j, - index, - oldi, - w, - k, - digit, - t, - length, - /** Cached calculation results */ - baseMinusT; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - for (oldi = i, w = 1, k = base; /* no condition */; k += base) { - - if (index >= inputLength) { - error('invalid-input'); - } - - digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base || digit > floor((maxInt - i) / w)) { - error('overflow'); - } - - i += digit * w; - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - - if (digit < t) { - break; - } - - baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error('overflow'); - } - - w *= baseMinusT; - - } - - out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output - output.splice(i++, 0, n); - - } - - return ucs2encode(output); - } - - /** - * Converts a string of Unicode symbols to a Punycode string of ASCII-only - * symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ - function encode(input) { - var n, - delta, - handledCPCount, - basicLength, - bias, - j, - m, - q, - k, - t, - currentValue, - output = [], - /** `inputLength` will hold the number of code points in `input`. */ - inputLength, - /** Cached calculation results */ - handledCPCountPlusOne, - baseMinusT, - qMinusT; - - // Convert the input in UCS-2 to Unicode - input = ucs2decode(input); - - // Cache the length - inputLength = input.length; - - // Initialize the state - n = initialN; - delta = 0; - bias = initialBias; - - // Handle the basic code points - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - - handledCPCount = basicLength = output.length; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string - if it is not empty - with a delimiter - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - for (m = maxInt, j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, - // but guard against overflow - handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - - if (currentValue == n) { - // Represent delta as a generalized variable-length integer - for (q = delta, k = base; /* no condition */; k += base) { - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - if (q < t) { - break; - } - qMinusT = q - t; - baseMinusT = base - t; - output.push( - stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) - ); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - - ++delta; - ++n; - - } - return output.join(''); - } - - /** - * Converts a Punycode string representing a domain name to Unicode. Only the - * Punycoded parts of the domain name will be converted, i.e. it doesn't - * matter if you call it on a string that has already been converted to - * Unicode. - * @memberOf punycode - * @param {String} domain The Punycode domain name to convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ - function toUnicode(domain) { - return mapDomain(domain, function(string) { - return regexPunycode.test(string) - ? decode(string.slice(4).toLowerCase()) - : string; - }); - } - - /** - * Converts a Unicode string representing a domain name to Punycode. Only the - * non-ASCII parts of the domain name will be converted, i.e. it doesn't - * matter if you call it with a domain that's already in ASCII. - * @memberOf punycode - * @param {String} domain The domain name to convert, as a Unicode string. - * @returns {String} The Punycode representation of the given domain name. - */ - function toASCII(domain) { - return mapDomain(domain, function(string) { - return regexNonASCII.test(string) - ? 'xn--' + encode(string) - : string; - }); - } - - /*--------------------------------------------------------------------------*/ - - /** Define the public API */ - punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '1.2.3', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see <http://mathiasbynens.be/notes/javascript-encoding> - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode - }; - - /** Expose `punycode` */ - // Some AMD build optimizers, like r.js, check for specific condition patterns - // like the following: - if ( - typeof define == 'function' && - typeof define.amd == 'object' && - define.amd - ) { - define(function() { - return punycode; - }); - } else if (freeExports && !freeExports.nodeType) { - if (freeModule) { // in Node.js or RingoJS v0.8.0+ - freeModule.exports = punycode; - } else { // in Narwhal or RingoJS v0.7.0- - for (key in punycode) { - punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); - } - } - } else { // in Rhino or a web browser - root.punycode = punycode; - } - -}(this)); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js deleted file mode 100644 index ac5d914a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! http://mths.be/punycode v1.2.3 by @mathias */ -(function(o){function e(o){throw RangeError(L[o])}function n(o,e){for(var n=o.length;n--;)o[n]=e(o[n]);return o}function t(o,e){return n(o.split(S),e).join(".")}function r(o){for(var e,n,t=[],r=0,u=o.length;u>r;)e=o.charCodeAt(r++),e>=55296&&56319>=e&&u>r?(n=o.charCodeAt(r++),56320==(64512&n)?t.push(((1023&e)<<10)+(1023&n)+65536):(t.push(e),r--)):t.push(e);return t}function u(o){return n(o,function(o){var e="";return o>65535&&(o-=65536,e+=R(55296|1023&o>>>10),o=56320|1023&o),e+=R(o)}).join("")}function i(o){return 10>o-48?o-22:26>o-65?o-65:26>o-97?o-97:x}function f(o,e){return o+22+75*(26>o)-((0!=e)<<5)}function c(o,e,n){var t=0;for(o=n?P(o/m):o>>1,o+=P(o/e);o>M*y>>1;t+=x)o=P(o/M);return P(t+(M+1)*o/(o+j))}function l(o){var n,t,r,f,l,d,s,a,p,h,v=[],g=o.length,w=0,j=I,m=A;for(t=o.lastIndexOf(F),0>t&&(t=0),r=0;t>r;++r)o.charCodeAt(r)>=128&&e("not-basic"),v.push(o.charCodeAt(r));for(f=t>0?t+1:0;g>f;){for(l=w,d=1,s=x;f>=g&&e("invalid-input"),a=i(o.charCodeAt(f++)),(a>=x||a>P((b-w)/d))&&e("overflow"),w+=a*d,p=m>=s?C:s>=m+y?y:s-m,!(p>a);s+=x)h=x-p,d>P(b/h)&&e("overflow"),d*=h;n=v.length+1,m=c(w-l,n,0==l),P(w/n)>b-j&&e("overflow"),j+=P(w/n),w%=n,v.splice(w++,0,j)}return u(v)}function d(o){var n,t,u,i,l,d,s,a,p,h,v,g,w,j,m,E=[];for(o=r(o),g=o.length,n=I,t=0,l=A,d=0;g>d;++d)v=o[d],128>v&&E.push(R(v));for(u=i=E.length,i&&E.push(F);g>u;){for(s=b,d=0;g>d;++d)v=o[d],v>=n&&s>v&&(s=v);for(w=u+1,s-n>P((b-t)/w)&&e("overflow"),t+=(s-n)*w,n=s,d=0;g>d;++d)if(v=o[d],n>v&&++t>b&&e("overflow"),v==n){for(a=t,p=x;h=l>=p?C:p>=l+y?y:p-l,!(h>a);p+=x)m=a-h,j=x-h,E.push(R(f(h+m%j,0))),a=P(m/j);E.push(R(f(a,0))),l=c(t,w,u==i),t=0,++u}++t,++n}return E.join("")}function s(o){return t(o,function(o){return E.test(o)?l(o.slice(4).toLowerCase()):o})}function a(o){return t(o,function(o){return O.test(o)?"xn--"+d(o):o})}var p="object"==typeof exports&&exports,h="object"==typeof module&&module&&module.exports==p&&module,v="object"==typeof global&&global;(v.global===v||v.window===v)&&(o=v);var g,w,b=2147483647,x=36,C=1,y=26,j=38,m=700,A=72,I=128,F="-",E=/^xn--/,O=/[^ -~]/,S=/\x2E|\u3002|\uFF0E|\uFF61/g,L={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=x-C,P=Math.floor,R=String.fromCharCode;if(g={version:"1.2.3",ucs2:{decode:r,encode:u},decode:l,encode:d,toASCII:a,toUnicode:s},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return g});else if(p&&!p.nodeType)if(h)h.exports=g;else for(w in g)g.hasOwnProperty(w)&&(p[w]=g[w]);else o.punycode=g})(this); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt deleted file mode 100644 index a7501f98..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md deleted file mode 100644 index fbddce91..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# Docdown <sup>v1.0.0</sup> - -A simple JSDoc to Markdown documentation generator. - -## Documentation - -The documentation for Docdown can be viewed here: [/doc/README.md](https://github.com/jdalton/docdown/blob/master/doc/README.md#readme) - -For a list of upcoming features, check out our [roadmap](https://github.com/jdalton/docdown/wiki/Roadmap). - -## Installation and usage - -Usage example: - -```php -require("docdown.php"); - -// generate Markdown -$markdown = docdown(array( - "path" => $filepath, - "url" => "https://github.com/username/project/blob/master/my.js" -)); -``` - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](http://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](http://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md deleted file mode 100644 index 459d36ab..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# Docdown <sup>v1.0.0</sup> - -<!-- div --> - - -<!-- div --> - -## <a id="docdown"></a>`docdown` -* [`docdown`](#docdown$optionsarray) - -<!-- /div --> - - -<!-- /div --> - - -<!-- div --> - - -<!-- div --> - -## `docdown` - -<!-- div --> - -### <a id="docdown$optionsarray"></a>`docdown([$options=array()])` -<a href="#docdown$optionsarray">#</a> [Ⓢ](https://github.com/jdalton/docdown/blob/master/docdown.php#L34 "View in source") [Ⓣ][1] - -Generates Markdown from JSDoc entries in a given file. - -#### Arguments -1. `[$options=array()]` *(Array)*: The options array. - -#### Returns -*(String)*: The generated Markdown. - -#### Example -```php -// specify a file path -$markdown = docdown(array( - // path to js file - 'path' => $filepath, - // url used to reference line numbers in code - 'url' => 'https://github.com/username/project/blob/master/my.js' -)); - -// or pass raw js -$markdown = docdown(array( - // raw JavaScript source - 'source' => $rawJS, - // documentation title - 'title' => 'My API Documentation', - // url used to reference line numbers in code - 'url' => 'https://github.com/username/project/blob/master/my.js' -)); -``` - -* * * - -<!-- /div --> - - -<!-- /div --> - - -<!-- /div --> - - - [1]: #docdown "Jump back to the TOC." \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php deleted file mode 100644 index eca8d145..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php - - // cleanup requested filepath - $file = isset($_GET['f']) ? $_GET['f'] : 'docdown'; - $file = preg_replace('#(\.*[\/])+#', '', $file); - $file .= preg_match('/\.[a-z]+$/', $file) ? '' : '.php'; - - // output filename - if (isset($_GET['o'])) { - $output = $_GET['o']; - } else if (isset($_SERVER['argv'][1])) { - $output = $_SERVER['argv'][1]; - } else { - $output = basename($file); - } - - /*--------------------------------------------------------------------------*/ - - require('../docdown.php'); - - // generate Markdown - $markdown = docdown(array( - 'path' => '../' . $file, - 'title' => 'Docdown <sup>v1.0.0</sup>', - 'url' => 'https://github.com/jdalton/docdown/blob/master/docdown.php' - )); - - // save to a .md file - file_put_contents($output . '.md', $markdown); - - // print - header('Content-Type: text/plain;charset=utf-8'); - echo $markdown . PHP_EOL; - -?> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php deleted file mode 100644 index 4a786d75..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php -/*! - * Docdown v1.0.0-pre - * Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/> - * Available under MIT license <http://mths.be/mit> - */ -require(dirname(__FILE__) . '/src/DocDown/Generator.php'); - -/** - * Generates Markdown from JSDoc entries in a given file. - * - * @param {Array} [$options=array()] The options array. - * @returns {String} The generated Markdown. - * @example - * - * // specify a file path - * $markdown = docdown(array( - * // path to js file - * 'path' => $filepath, - * // url used to reference line numbers in code - * 'url' => 'https://github.com/username/project/blob/master/my.js' - * )); - * - * // or pass raw js - * $markdown = docdown(array( - * // raw JavaScript source - * 'source' => $rawJS, - * // documentation title - * 'title' => 'My API Documentation', - * // url used to reference line numbers in code - * 'url' => 'https://github.com/username/project/blob/master/my.js' - * )); - */ -function docdown( $options = array() ) { - $gen = new Generator($options); - return $gen->generate(); -} -?> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php deleted file mode 100644 index 0a7c552e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php +++ /dev/null @@ -1,226 +0,0 @@ -<?php - -/** - * A class to represent a JSDoc entry alias. - */ -class Alias { - - /** - * The alias owner. - * - * @memberOf Alias - * @type Object - */ - public $owner; - - /*--------------------------------------------------------------------------*/ - - /** - * The Alias constructor. - * - * @constructor - * @param {String} $name The alias name. - * @param {Object} $owner The alias owner. - */ - public function __construct( $name, $owner ) { - $this->owner = $owner; - $this->_name = $name; - $this->_call = $owner->getCall(); - $this->_category = $owner->getCategory(); - $this->_desc = $owner->getDesc(); - $this->_example = $owner->getExample(); - $this->_isCtor = $owner->isCtor(); - $this->_isLicense = $owner->isLicense(); - $this->_isPlugin = $owner->isPlugin(); - $this->_isPrivate = $owner->isPrivate(); - $this->_isStatic = $owner->isStatic(); - $this->_lineNumber = $owner->getLineNumber(); - $this->_members = $owner->getMembers(); - $this->_params = $owner->getParams(); - $this->_returns = $owner->getReturns(); - $this->_type = $owner->getType(); - } - - /*--------------------------------------------------------------------------*/ - - /** - * Extracts the entry's `alias` objects. - * - * @memberOf Alias - * @param {Number} $index The index of the array value to return. - * @returns {Array|String} The entry's `alias` objects. - */ - public function getAliases( $index = null ) { - $result = array(); - return $index !== null - ? @$result[$index] - : $result; - } - - /** - * Extracts the function call from the owner entry. - * - * @memberOf Alias - * @returns {String} The function call. - */ - public function getCall() { - return $this->_call; - } - - /** - * Extracts the owner entry's `category` data. - * - * @memberOf Alias - * @returns {String} The owner entry's `category` data. - */ - public function getCategory() { - return $this->_category; - } - - /** - * Extracts the owner entry's description. - * - * @memberOf Alias - * @returns {String} The owner entry's description. - */ - public function getDesc() { - return $this->_desc; - } - - /** - * Extracts the owner entry's `example` data. - * - * @memberOf Alias - * @returns {String} The owner entry's `example` data. - */ - public function getExample() { - return $this->_example; - } - - /** - * Checks if the entry is an alias. - * - * @memberOf Alias - * @returns {Boolean} Returns `true`. - */ - public function isAlias() { - return true; - } - - /** - * Checks if the owner entry is a constructor. - * - * @memberOf Alias - * @returns {Boolean} Returns `true` if a constructor, else `false`. - */ - public function isCtor() { - return $this->_isCtor; - } - - /** - * Checks if the owner entry is a license. - * - * @memberOf Alias - * @returns {Boolean} Returns `true` if a license, else `false`. - */ - public function isLicense() { - return $this->_isLicense; - } - - /** - * Checks if the owner entry *is* assigned to a prototype. - * - * @memberOf Alias - * @returns {Boolean} Returns `true` if assigned to a prototype, else `false`. - */ - public function isPlugin() { - return $this->_isPlugin; - } - - /** - * Checks if the owner entry is private. - * - * @memberOf Alias - * @returns {Boolean} Returns `true` if private, else `false`. - */ - public function isPrivate() { - return $this->_isPrivate; - } - - /** - * Checks if the owner entry is *not* assigned to a prototype. - * - * @memberOf Alias - * @returns {Boolean} Returns `true` if not assigned to a prototype, else `false`. - */ - public function isStatic() { - return $this->_isStatic; - } - - /** - * Resolves the owner entry's line number. - * - * @memberOf Alias - * @returns {Number} The owner entry's line number. - */ - public function getLineNumber() { - return $this->_lineNumber; - } - - /** - * Extracts the owner entry's `member` data. - * - * @memberOf Alias - * @param {Number} $index The index of the array value to return. - * @returns {Array|String} The owner entry's `member` data. - */ - public function getMembers( $index = null ) { - return $index !== null - ? @$this->_members[$index] - : $this->_members; - } - - /** - * Extracts the owner entry's `name` data. - * - * @memberOf Alias - * @returns {String} The owner entry's `name` data. - */ - public function getName() { - return $this->_name; - } - - /** - * Extracts the owner entry's `param` data. - * - * @memberOf Alias - * @param {Number} $index The index of the array value to return. - * @returns {Array} The owner entry's `param` data. - */ - public function getParams( $index = null ) { - return $index !== null - ? @$this->_params[$index] - : $this->_params; - } - - /** - * Extracts the owner entry's `returns` data. - * - * @memberOf Alias - * @returns {String} The owner entry's `returns` data. - */ - public function getReturns() { - return $this->_returns; - } - - /** - * Extracts the owner entry's `type` data. - * - * @memberOf Alias - * @returns {String} The owner entry's `type` data. - */ - public function getType() { - return $this->_type; - } -} -?> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php deleted file mode 100644 index a973d9a6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php +++ /dev/null @@ -1,442 +0,0 @@ -<?php - -require(dirname(__FILE__) . "/Alias.php"); - -/** - * A class to simplify parsing a single JSDoc entry. - */ -class Entry { - - /** - * The documentation entry. - * - * @memberOf Entry - * @type String - */ - public $entry = ''; - - /** - * The language highlighter used for code examples. - * - * @memberOf Entry - * @type String - */ - public $lang = ''; - - /** - * The source code. - * - * @memberOf Entry - * @type String - */ - public $source = ''; - - /*--------------------------------------------------------------------------*/ - - /** - * The Entry constructor. - * - * @constructor - * @param {String} $entry The documentation entry to analyse. - * @param {String} $source The source code. - * @param {String} [$lang ='js'] The language highlighter used for code examples. - */ - public function __construct( $entry, $source, $lang = 'js' ) { - $this->entry = $entry; - $this->lang = $lang; - $this->source = str_replace(PHP_EOL, "\n", $source); - } - - /*--------------------------------------------------------------------------*/ - - /** - * Extracts the documentation entries from source code. - * - * @static - * @memberOf Entry - * @param {String} $source The source code. - * @returns {Array} The array of entries. - */ - public static function getEntries( $source ) { - preg_match_all('#/\*\*(?![-!])[\s\S]*?\*/\s*.+#', $source, $result); - return array_pop($result); - } - - /*--------------------------------------------------------------------------*/ - - /** - * Checks if the entry is a function reference. - * - * @private - * @memberOf Entry - * @returns {Boolean} Returns `true` if the entry is a function reference, else `false`. - */ - private function isFunction() { - if (!isset($this->_isFunction)) { - $this->_isFunction = !!( - $this->isCtor() || - count($this->getParams()) || - count($this->getReturns()) || - preg_match('/\*[\t ]*@function\b/', $this->entry) - ); - } - return $this->_isFunction; - } - - /*--------------------------------------------------------------------------*/ - - /** - * Extracts the entry's `alias` objects. - * - * @memberOf Entry - * @param {Number} $index The index of the array value to return. - * @returns {Array|String} The entry's `alias` objects. - */ - public function getAliases( $index = null ) { - if (!isset($this->_aliases)) { - preg_match('#\*[\t ]*@alias\s+(.+)#', $this->entry, $result); - - if (count($result)) { - $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); - $result = preg_split('/,\s*/', $result); - natsort($result); - - foreach ($result as $resultIndex => $value) { - $result[$resultIndex] = new Alias($value, $this); - } - } - $this->_aliases = $result; - } - return $index !== null - ? @$this->_aliases[$index] - : $this->_aliases; - } - - /** - * Extracts the function call from the entry. - * - * @memberOf Entry - * @returns {String} The function call. - */ - public function getCall() { - if (isset($this->_call)) { - return $this->_call; - } - - preg_match('#\*/\s*(?:function ([^(]*)|(.*?)(?=[:=,]|return\b))#', $this->entry, $result); - if ($result = array_pop($result)) { - $result = array_pop(explode('var ', trim(trim(array_pop(explode('.', $result))), "'"))); - } - // resolve name - // avoid $this->getName() because it calls $this->getCall() - preg_match('#\*[\t ]*@name\s+(.+)#', $this->entry, $name); - if (count($name)) { - $name = trim($name[1]); - } else { - $name = $result; - } - // compile function call syntax - if ($this->isFunction()) { - // compose parts - $result = array($result); - $params = $this->getParams(); - foreach ($params as $param) { - $result[] = $param[1]; - } - // format - $result = $name .'('. implode(array_slice($result, 1), ', ') .')'; - $result = str_replace(', [', ' [, ', str_replace('], [', ', ', $result)); - } - - $this->_call = $result ? $result : $name; - return $this->_call; - } - - /** - * Extracts the entry's `category` data. - * - * @memberOf Entry - * @returns {String} The entry's `category` data. - */ - public function getCategory() { - if (isset($this->_category)) { - return $this->_category; - } - - preg_match('#\*[\t ]*@category\s+(.+)#', $this->entry, $result); - if (count($result)) { - $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); - } else { - $result = $this->getType() == 'Function' ? 'Methods' : 'Properties'; - } - $this->_category = $result; - return $result; - } - - /** - * Extracts the entry's description. - * - * @memberOf Entry - * @returns {String} The entry's description. - */ - public function getDesc() { - if (isset($this->_desc)) { - return $this->_desc; - } - - preg_match('#/\*\*(?:\s*\*)?([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result); - if (count($result)) { - $type = $this->getType(); - $result = preg_replace('/:\n[\t ]*\*[\t ]*/', ":<br>\n", $result[1]); - $result = preg_replace('/(?:^|\n)[\t ]*\*\n[\t ]*\*[\t ]*/', "\n\n", $result); - $result = preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result); - $result = trim($result); - $result = ($type == 'Function' ? '' : '(' . str_replace('|', ', ', trim($type, '{}')) . '): ') . $result; - } - $this->_desc = $result; - return $result; - } - - /** - * Extracts the entry's `example` data. - * - * @memberOf Entry - * @returns {String} The entry's `example` data. - */ - public function getExample() { - if (isset($this->_example)) { - return $this->_example; - } - - preg_match('#\*[\t ]*@example\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result); - if (count($result)) { - $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', "\n", $result[1])); - $result = '```' . $this->lang . "\n" . $result . "\n```"; - } - $this->_example = $result; - return $result; - } - - /** - * Checks if the entry is an alias. - * - * @memberOf Entry - * @returns {Boolean} Returns `false`. - */ - public function isAlias() { - return false; - } - - /** - * Checks if the entry is a constructor. - * - * @memberOf Entry - * @returns {Boolean} Returns `true` if a constructor, else `false`. - */ - public function isCtor() { - if (!isset($this->_isCtor)) { - $this->_isCtor = !!preg_match('/\*[\t ]*@constructor\b/', $this->entry); - } - return $this->_isCtor; - } - - /** - * Checks if the entry is a license. - * - * @memberOf Entry - * @returns {Boolean} Returns `true` if a license, else `false`. - */ - public function isLicense() { - if (!isset($this->_isLicense)) { - $this->_isLicense = !!preg_match('/\*[\t ]*@license\b/', $this->entry); - } - return $this->_isLicense; - } - - /** - * Checks if the entry *is* assigned to a prototype. - * - * @memberOf Entry - * @returns {Boolean} Returns `true` if assigned to a prototype, else `false`. - */ - public function isPlugin() { - if (!isset($this->_isPlugin)) { - $this->_isPlugin = !$this->isCtor() && !$this->isPrivate() && !$this->isStatic(); - } - return $this->_isPlugin; - } - - /** - * Checks if the entry is private. - * - * @memberOf Entry - * @returns {Boolean} Returns `true` if private, else `false`. - */ - public function isPrivate() { - if (!isset($this->_isPrivate)) { - $this->_isPrivate = $this->isLicense() || !!preg_match('/\*[\t ]*@private\b/', $this->entry) || !preg_match('/\*[\t ]*@[a-z]+\b/', $this->entry); - } - return $this->_isPrivate; - } - - /** - * Checks if the entry is *not* assigned to a prototype. - * - * @memberOf Entry - * @returns {Boolean} Returns `true` if not assigned to a prototype, else `false`. - */ - public function isStatic() { - if (isset($this->_isStatic)) { - return $this->_isStatic; - } - - $public = !$this->isPrivate(); - $result = $public && !!preg_match('/\*[\t ]*@static\b/', $this->entry); - - // set in cases where it isn't explicitly stated - if ($public && !$result) { - if ($parent = array_pop(preg_split('/[#.]/', $this->getMembers(0)))) { - foreach (Entry::getEntries($this->source) as $entry) { - $entry = new Entry($entry, $this->source); - if ($entry->getName() == $parent) { - $result = !$entry->isCtor(); - break; - } - } - } else { - $result = true; - } - } - $this->_isStatic = $result; - return $result; - } - - /** - * Resolves the entry's line number. - * - * @memberOf Entry - * @returns {Number} The entry's line number. - */ - public function getLineNumber() { - if (!isset($this->_lineNumber)) { - preg_match_all('/\n/', substr($this->source, 0, strrpos($this->source, $this->entry) + strlen($this->entry)), $lines); - $this->_lineNumber = count(array_pop($lines)) + 1; - } - return $this->_lineNumber; - } - - /** - * Extracts the entry's `member` data. - * - * @memberOf Entry - * @param {Number} $index The index of the array value to return. - * @returns {Array|String} The entry's `member` data. - */ - public function getMembers( $index = null ) { - if (!isset($this->_members)) { - preg_match('#\*[\t ]*@member(?:Of)?\s+(.+)#', $this->entry, $result); - if (count($result)) { - $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); - $result = preg_split('/,\s*/', $result); - natsort($result); - } - $this->_members = $result; - } - return $index !== null - ? @$this->_members[$index] - : $this->_members; - } - - /** - * Extracts the entry's `name` data. - * - * @memberOf Entry - * @returns {String} The entry's `name` data. - */ - public function getName() { - if (isset($this->_name)) { - return $this->_name; - } - - preg_match('#\*[\t ]*@name\s+(.+)#', $this->entry, $result); - if (count($result)) { - $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); - } else { - $result = array_shift(explode('(', $this->getCall())); - } - $this->_name = $result; - return $result; - } - - /** - * Extracts the entry's `param` data. - * - * @memberOf Entry - * @param {Number} $index The index of the array value to return. - * @returns {Array} The entry's `param` data. - */ - public function getParams( $index = null ) { - if (!isset($this->_params)) { - preg_match_all('#\*[\t ]*@param\s+\{([^}]+)\}\s+(\[.+\]|[$\w|]+(?:\[.+\])?)\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#i', $this->entry, $result); - if (count($result = array_filter(array_slice($result, 1)))) { - // repurpose array - foreach ($result as $param) { - foreach ($param as $key => $value) { - if (!is_array($result[0][$key])) { - $result[0][$key] = array(); - } - $result[0][$key][] = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]*/', ' ', $value)); - } - } - $result = $result[0]; - } - $this->_params = $result; - } - return $index !== null - ? @$this->_params[$index] - : $this->_params; - } - - /** - * Extracts the entry's `returns` data. - * - * @memberOf Entry - * @returns {String} The entry's `returns` data. - */ - public function getReturns() { - if (isset($this->_returns)) { - return $this->_returns; - } - - preg_match('#\*[\t ]*@returns\s+\{([^}]+)\}\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result); - if (count($result)) { - $result = array_map('trim', array_slice($result, 1)); - $result[0] = str_replace('|', ', ', $result[0]); - $result[1] = preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1]); - } - $this->_returns = $result; - return $result; - } - - /** - * Extracts the entry's `type` data. - * - * @memberOf Entry - * @returns {String} The entry's `type` data. - */ - public function getType() { - if (isset($this->_type)) { - return $this->_type; - } - - preg_match('#\*[\t ]*@type\s+(.+)#', $this->entry, $result); - if (count($result)) { - $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); - } else { - $result = $this->isFunction() ? 'Function' : 'Unknown'; - } - $this->_type = $result; - return $result; - } -} -?> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php deleted file mode 100644 index 5dc2583f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php +++ /dev/null @@ -1,563 +0,0 @@ -<?php - -require(dirname(__FILE__) . "/Entry.php"); - -/** - * Generates Markdown from JSDoc entries. - */ -class Generator { - - /** - * The HTML for the close tag. - * - * @static - * @memberOf Generator - * @type String - */ - public $closeTag = "\n<!-- /div -->\n"; - - /** - * An array of JSDoc entries. - * - * @memberOf Generator - * @type Array - */ - public $entries = array(); - - /** - * The HTML for the open tag. - * - * @static - * @memberOf Generator - * @type String - */ - public $openTag = "\n<!-- div -->\n"; - - /** - * An options array used to configure the generator. - * - * @memberOf Generator - * @type Array - */ - public $options = array(); - - /** - * The file's source code. - * - * @memberOf Generator - * @type String - */ - public $source = ''; - - /*--------------------------------------------------------------------------*/ - - /** - * The Generator constructor. - * - * @constructor - * @param {String} $source The source code to parse. - * @param {Array} $options The options array. - */ - public function __construct( $source, $options = array() ) { - // juggle arguments - if (is_array($source)) { - $options = $source; - } else { - $options['source'] = $source; - } - if (isset($options['source']) && realpath($options['source'])) { - $options['path'] = $options['source']; - } - if (isset($options['path'])) { - preg_match('/(?<=\.)[a-z]+$/', $options['path'], $ext); - $options['source'] = file_get_contents($options['path']); - $ext = array_pop($ext); - - if (!isset($options['lang']) && $ext) { - $options['lang'] = $ext; - } - if (!isset($options['title'])) { - $options['title'] = ucfirst(basename($options['path'])) . ' API documentation'; - } - } - if (!isset($options['lang'])) { - $options['lang'] = 'js'; - } - if (!isset($options['toc'])) { - $options['toc'] = 'properties'; - } - - $this->options = $options; - $this->source = str_replace(PHP_EOL, "\n", $options['source']); - $this->entries = Entry::getEntries($this->source); - - foreach ($this->entries as $index => $value) { - $this->entries[$index] = new Entry($value, $this->source, $options['lang']); - } - } - - /*--------------------------------------------------------------------------*/ - - /** - * Performs common string formatting operations. - * - * @private - * @static - * @memberOf Generator - * @param {String} $string The string to format. - * @returns {String} The formatted string. - */ - private static function format( $string ) { - $counter = 0; - - // tokenize inline code snippets - preg_match_all('/`[^`]+`/', $string, $tokenized); - $tokenized = $tokenized[0]; - foreach ($tokenized as $snippet) { - $string = str_replace($snippet, '__token' . ($counter++) .'__', $string); - } - - // italicize parentheses - $string = preg_replace('/(^|\s)(\([^)]+\))/', '$1*$2*', $string); - - // mark numbers as inline code - $string = preg_replace('/[\t ](-?\d+(?:.\d+)?)(?!\.[^\n])/', ' `$1`', $string); - - // detokenize inline code snippets - $counter = 0; - foreach ($tokenized as $snippet) { - $string = str_replace('__token' . ($counter++) . '__', $snippet, $string); - } - - return trim($string); - } - - /** - * Modify a string by replacing named tokens with matching assoc. array values. - * - * @private - * @static - * @memberOf Generator - * @param {String} $string The string to modify. - * @param {Array|Object} $object The template object. - * @returns {String} The modified string. - */ - private static function interpolate( $string, $object ) { - preg_match_all('/#\{([^}]+)\}/', $string, $tokens); - $tokens = array_unique(array_pop($tokens)); - - foreach ($tokens as $token) { - $pattern = '/#\{' . $token . '\}/'; - $replacement = ''; - - if (is_object($object)) { - preg_match('/\(([^)]+?)\)$/', $token, $args); - $args = preg_split('/,\s*/', array_pop($args)); - $method = 'get' . ucfirst(str_replace('/\([^)]+?\)$/', '', $token)); - - if (method_exists($object, $method)) { - $replacement = (string) call_user_func_array(array($object, $method), $args); - } else if (isset($object->{$token})) { - $replacement = (string) $object->{$token}; - } - } else if (isset($object[$token])) { - $replacement = (string) $object[$token]; - } - $string = preg_replace($pattern, trim($replacement), $string); - } - return Generator::format($string); - } - - /*--------------------------------------------------------------------------*/ - - /** - * Adds the given `$entries` to the `$result` array. - * - * @private - * @memberOf Generator - * @param {Array} $result The result array to modify. - * @param {Array} $entries The entries to add to the `$result`. - */ - private function addEntries( &$result, $entries ) { - foreach ($entries as $entry) { - // skip aliases - if ($entry->isAlias()) { - continue; - } - // name and description - array_push( - $result, - $this->openTag, - Generator::interpolate("### <a id=\"#{hash}\"></a>`#{member}#{separator}#{call}`\n<a href=\"##{hash}\">#</a> [Ⓢ](#{href} \"View in source\") [Ⓣ][1]\n\n#{desc}", $entry) - ); - - // @alias - if (count($aliases = $entry->getAliases())) { - array_push($result, '', '#### Aliases'); - foreach ($aliases as $index => $alias) { - $aliases[$index] = $alias->getName(); - } - $result[] = '*' . implode(', ', $aliases) . '*'; - } - // @param - if (count($params = $entry->getParams())) { - array_push($result, '', '#### Arguments'); - foreach ($params as $index => $param) { - $result[] = Generator::interpolate('#{num}. `#{name}` (#{type}): #{desc}', array( - 'desc' => $param[2], - 'name' => $param[1], - 'num' => $index + 1, - 'type' => $param[0] - )); - } - } - // @returns - if (count($returns = $entry->getReturns())) { - array_push( - $result, '', - '#### Returns', - Generator::interpolate('(#{type}): #{desc}', array('desc' => $returns[1], 'type' => $returns[0])) - ); - } - // @example - if ($example = $entry->getExample()) { - array_push($result, '', '#### Example', $example); - } - array_push($result, "\n* * *", $this->closeTag); - } - } - - /** - * Resolves the entry's hash used to navigate the documentation. - * - * @private - * @memberOf Generator - * @param {Number|Object} $entry The entry object. - * @param {String} $member The name of the member. - * @returns {String} The url hash. - */ - private function getHash( $entry, $member = '' ) { - $entry = is_numeric($entry) ? $this->entries[$entry] : $entry; - $member = !$member ? $entry->getMembers(0) : $member; - $result = ($member ? $member . ($entry->isPlugin() ? 'prototype' : '') : '') . $entry->getCall(); - $result = preg_replace('/\(\[|\[\]/', '', $result); - $result = preg_replace('/[ =|\'"{}.()\]]/', '', $result); - $result = preg_replace('/[[#,]/', '-', $result); - return strtolower($result); - } - - /** - * Resolves the entry's url for the specific line number. - * - * @private - * @memberOf Generator - * @param {Number|Object} $entry The entry object. - * @returns {String} The url. - */ - private function getLineUrl( $entry ) { - $entry = is_numeric($entry) ? $this->entries($entry) : $entry; - return $this->options['url'] . '#L' . $entry->getLineNumber(); - } - - /** - * Extracts the character used to separate the entry's name from its member. - * - * @private - * @memberOf Generator - * @param {Number|Object} $entry The entry object. - * @returns {String} The separator. - */ - private function getSeparator( $entry ) { - $entry = is_numeric($entry) ? $this->entries($entry) : $entry; - return $entry->isPlugin() ? '.prototype.' : '.'; - } - - /*--------------------------------------------------------------------------*/ - - /** - * Generates Markdown from JSDoc entries. - * - * @memberOf Generator - * @returns {String} The rendered Markdown. - */ - public function generate() { - $api = array(); - $byCategory = $this->options['toc'] == 'categories'; - $categories = array(); - $closeTag = $this->closeTag; - $compiling = false; - $openTag = $this->openTag; - $result = array('# ' . $this->options['title']); - $toc = 'toc'; - - // initialize $api array - foreach ($this->entries as $entry) { - // skip invalid or private entries - $name = $entry->getName(); - if (!$name || $entry->isPrivate()) { - continue; - } - - $members = $entry->getMembers(); - $members = count($members) ? $members : array(''); - - foreach ($members as $member) { - // create api category arrays - if ($member && !isset($api[$member])) { - // create temporary entry to be replaced later - $api[$member] = new stdClass; - $api[$member]->static = array(); - $api[$member]->plugin = array(); - } - - // append entry to api member - if (!$member || $entry->isCtor() || ($entry->getType() == 'Object' && - !preg_match('/[=:]\s*(?:null|undefined)\s*[,;]?$/', $entry->entry))) { - - // assign the real entry, replacing the temporary entry if it exist - $member = ($member ? $member . ($entry->isPlugin() ? '#' : '.') : '') . $name; - $entry->static = @$api[$member] ? $api[$member]->static : array(); - $entry->plugin = @$api[$member] ? $api[$member]->plugin : array(); - - $api[$member] = $entry; - foreach ($entry->getAliases() as $alias) { - $api[$member]->static[] = $alias; - } - } - else if ($entry->isStatic()) { - $api[$member]->static[] = $entry; - foreach ($entry->getAliases() as $alias) { - $api[$member]->static[] = $alias; - } - } - else if (!$entry->isCtor()) { - $api[$member]->plugin[] = $entry; - foreach ($entry->getAliases() as $alias) { - $api[$member]->plugin[] = $alias; - } - } - } - } - - // add properties to each entry - foreach ($api as $entry) { - $entry->hash = $this->getHash($entry); - $entry->href = $this->getLineUrl($entry); - - $member = $entry->getMembers(0); - $member = ($member ? $member . ($entry->isPlugin() ? '.prototype.' : '.') : '') . $entry->getName(); - $entry->member = preg_replace('/' . $entry->getName() . '$/', '', $member); - - // add properties to static and plugin sub-entries - foreach (array('static', 'plugin') as $kind) { - foreach ($entry->{$kind} as $subentry) { - $subentry->hash = $this->getHash($subentry); - $subentry->href = $this->getLineUrl($subentry); - $subentry->member = $member; - $subentry->separator = $this->getSeparator($subentry); - } - } - } - - /*------------------------------------------------------------------------*/ - - // custom sort for root level entries - // TODO: see how well it handles deeper namespace traversal - function sortCompare($a, $b) { - $score = array( 'a' => 0, 'b' => 0); - foreach (array( 'a' => $a, 'b' => $b) as $key => $value) { - // capitalized properties are last - if (preg_match('/[#.][A-Z]/', $value)) { - $score[$key] = 0; - } - // lowercase prototype properties are next to last - else if (preg_match('/#[a-z]/', $value)) { - $score[$key] = 1; - } - // lowercase static properties next to first - else if (preg_match('/\.[a-z]/', $value)) { - $score[$key] = 2; - } - // root properties are first - else if (preg_match('/^[^#.]+$/', $value)) { - $score[$key] = 3; - } - } - $score = $score['b'] - $score['a']; - return $score ? $score : strcasecmp($a, $b); - } - - uksort($api, 'sortCompare'); - - // sort static and plugin sub-entries - foreach ($api as $entry) { - foreach (array('static', 'plugin') as $kind) { - $sortBy = array( 'a' => array(), 'b' => array(), 'c' => array() ); - foreach ($entry->{$kind} as $subentry) { - $name = $subentry->getName(); - // functions w/o ALL-CAPs names are last - $sortBy['a'][] = $subentry->getType() == 'Function' && !preg_match('/^[A-Z_]+$/', $name); - // ALL-CAPs properties first - $sortBy['b'][] = preg_match('/^[A-Z_]+$/', $name); - // lowercase alphanumeric sort - $sortBy['c'][] = strtolower($name); - } - array_multisort($sortBy['a'], SORT_ASC, $sortBy['b'], SORT_DESC, $sortBy['c'], SORT_ASC, $entry->{$kind}); - } - } - - /*------------------------------------------------------------------------*/ - - // add categories - foreach ($api as $entry) { - $categories[$entry->getCategory()][] = $entry; - foreach (array('static', 'plugin') as $kind) { - foreach ($entry->{$kind} as $subentry) { - $categories[$subentry->getCategory()][] = $subentry; - } - } - } - - // sort categories - ksort($categories); - - foreach(array('Methods', 'Properties') as $category) { - if (isset($categories[$category])) { - $entries = $categories[$category]; - unset($categories[$category]); - $categories[$category] = $entries; - } - } - - /*------------------------------------------------------------------------*/ - - // compile TOC - $result[] = $openTag; - - // compile TOC by categories - if ($byCategory) { - foreach ($categories as $category => $entries) { - if ($compiling) { - $result[] = $closeTag; - } else { - $compiling = true; - } - // assign TOC hash - if (count($result) == 2) { - $toc = $category; - } - // add category - array_push( - $result, - $openTag, '## ' . (count($result) == 2 ? '<a id="' . $toc . '"></a>' : '') . '`' . $category . '`' - ); - // add entries - foreach ($entries as $entry) { - $result[] = Generator::interpolate('* [`#{member}#{separator}#{name}`](##{hash})', $entry); - } - } - } - // compile TOC by namespace - else { - foreach ($api as $entry) { - if ($compiling) { - $result[] = $closeTag; - } else { - $compiling = true; - } - $member = $entry->member . $entry->getName(); - - // assign TOC hash - if (count($result) == 2) { - $toc = $member; - } - // add root entry - array_push( - $result, - $openTag, '## ' . (count($result) == 2 ? '<a id="' . $toc . '"></a>' : '') . '`' . $member . '`', - Generator::interpolate('* [`' . $member . '`](##{hash})', $entry) - ); - - // add static and plugin sub-entries - foreach (array('static', 'plugin') as $kind) { - if ($kind == 'plugin' && count($entry->plugin)) { - array_push( - $result, - $closeTag, - $openTag, - '## `' . $member . ($entry->isCtor() ? '.prototype`' : '`') - ); - } - foreach ($entry->{$kind} as $subentry) { - $subentry->member = $member; - $result[] = Generator::interpolate('* [`#{member}#{separator}#{name}`](##{hash})', $subentry); - } - } - } - } - - array_push($result, $closeTag, $closeTag); - - /*------------------------------------------------------------------------*/ - - // compile content - $compiling = false; - $result[] = $openTag; - - if ($byCategory) { - foreach ($categories as $category => $entries) { - if ($compiling) { - $result[] = $closeTag; - } else { - $compiling = true; - } - if ($category != 'Methods' && $category != 'Properties') { - $category = '“' . $category . '” Methods'; - } - array_push($result, $openTag, '## `' . $category . '`'); - $this->addEntries($result, $entries); - } - } - else { - foreach ($api as $entry) { - // skip aliases - if ($entry->isAlias()) { - continue; - } - if ($compiling) { - $result[] = $closeTag; - } else { - $compiling = true; - } - // add root entry name - $member = $entry->member . $entry->getName(); - array_push($result, $openTag, '## `' . $member . '`'); - - foreach (array($entry, 'static', 'plugin') as $kind) { - $subentries = is_string($kind) ? $entry->{$kind} : array($kind); - - // add sub-entry name - if ($kind != 'static' && $entry->getType() != 'Object' && - count($subentries) && $subentries[0] != $kind) { - if ($kind == 'plugin') { - $result[] = $closeTag; - } - array_push( - $result, - $openTag, - '## `' . $member . ($kind == 'plugin' ? '.prototype`' : '`') - ); - } - $this->addEntries($result, $subentries); - } - } - } - - // close tags add TOC link reference - array_push($result, $closeTag, $closeTag, '', ' [1]: #' . $toc . ' "Jump back to the TOC."'); - - // cleanup whitespace - return trim(preg_replace('/[\t ]+\n/', "\n", join($result, "\n"))); - } -} -?> diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/package.json deleted file mode 100644 index 167c7c6a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "author": { - "name": "Jeremy Stashewsky", - "email": "jeremy@goinstant.com", - "url": "https://github.com/stash" - }, - "name": "tough-cookie", - "description": "RFC6265 Cookies and Cookie Jar for node.js", - "keywords": [ - "HTTP", - "cookie", - "cookies", - "set-cookie", - "cookiejar", - "jar", - "RFC6265", - "RFC2965" - ], - "version": "0.9.15", - "homepage": "https://github.com/goinstant/node-cookie", - "repository": { - "type": "git", - "url": "git://github.com/goinstant/node-cookie.git" - }, - "bugs": { - "url": "https://github.com/goinstant/node-cookie/issues" - }, - "main": "./lib/cookie", - "scripts": { - "test": "vows test.js" - }, - "engines": { - "node": ">=0.4.12" - }, - "dependencies": { - "punycode": ">=0.2.0" - }, - "devDependencies": { - "vows": ">=0.6.0", - "async": ">=0.1.12" - }, - "readme": "[RFC6265](http://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js\n\n![Tough Cookie](http://www.goinstant.com.s3.amazonaws.com/tough-cookie.jpg)\n\n# Synopsis\n\n``` javascript\nvar cookies = require('tough-cookie'); // note: not 'cookie', 'cookies' or 'node-cookie'\nvar Cookie = cookies.Cookie;\nvar cookie = Cookie.parse(header);\ncookie.value = 'somethingdifferent';\nheader = cookie.toString();\n\nvar cookiejar = new cookies.CookieJar();\ncookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb);\n// ...\ncookiejar.getCookies('http://example.com/otherpath',function(err,cookies) {\n res.headers['cookie'] = cookies.join('; ');\n});\n```\n\n# Installation\n\nIt's _so_ easy!\n\n`npm install tough-cookie`\n\nRequires `punycode`, which should get installed automatically for you. Note that node.js v0.6.2+ bundles punycode by default.\n\nWhy the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken.\n\n# API\n\ncookies\n=======\n\nFunctions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be \"bound\".\n\nparseDate(string[,strict])\n-----------------\n\nParse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. If strict is set to true then leading/trailing non-seperator characters around the time part will cause the parsing to fail (e.g. \"Thu, 01 Jan 1970 00:00:010 GMT\" has an extra trailing zero but Chrome, an assumedly RFC-compliant browser, treats this as valid).\n\nformatDate(date)\n----------------\n\nFormat a Date into a RFC1123 string (the RFC6265-recommended format).\n\ncanonicalDomain(str)\n--------------------\n\nTransforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects).\n\ndomainMatch(str,domStr[,canonicalize=true])\n-------------------------------------------\n\nAnswers \"does this real domain match the domain in a cookie?\". The `str` is the \"current\" domain-name and the `domStr` is the \"cookie\" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a \"suffix match\".\n\nThe `canonicalize` parameter will run the other two paramters through `canonicalDomain` or not.\n\ndefaultPath(path)\n-----------------\n\nGiven a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the \"directory\" of a \"file\" in the path, but is specified by Section 5.1.4 of the RFC.\n\nThe `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output.\n\npathMatch(reqPath,cookiePath)\n-----------------------------\n\nAnswers \"does the request-path path-match a given cookie-path?\" as per RFC6265 Section 5.1.4. Returns a boolean.\n\nThis is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`.\n\nparse(header[,strict=false])\n----------------------------\n\nalias for `Cookie.parse(header[,strict])`\n\nfromJSON(string)\n----------------\n\nalias for `Cookie.fromJSON(string)`\n\ngetPublicSuffix(hostname)\n-------------------------\n\nReturns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it.\n\nFor example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`.\n\nFor further information, see http://publicsuffix.org/. This module derives its list from that site.\n\ncookieCompare(a,b)\n------------------\n\nFor use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). Longest `.path`s go first, then sorted oldest to youngest.\n\n``` javascript\nvar cookies = [ /* unsorted array of Cookie objects */ ];\ncookies = cookies.sort(cookieCompare);\n```\n\npermuteDomain(domain)\n---------------------\n\nGenerates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores.\n\n\npermutePath(path)\n-----------------\n\nGenerates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores.\n\nCookie\n======\n\nCookie.parse(header[,strict=false])\n-----------------------------------\n\nParses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. If in strict mode, returns `undefined` if the cookie doesn't follow the guidelines in section 4 of RFC6265. Generally speaking, strict mode can be used to validate your own generated Set-Cookie headers, but acting as a client you want to be lenient and leave strict mode off.\n\nHere's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response:\n\n``` javascript\nif (res.headers['set-cookie'] instanceof Array)\n cookies = res.headers['set-cookie'].map(Cookie.parse);\nelse\n cookies = [Cookie.parse(res.headers['set-cookie'])];\n```\n\nCookie.fromJSON(string)\n-----------------------\n\nConvert a JSON string to a `Cookie` object. Does a `JSON.parse()` and converts the `.created`, `.lastAccessed` and `.expires` properties into `Date` objects.\n\nProperties\n==========\n\n * _key_ - string - the name or key of the cookie (default \"\")\n * _value_ - string - the value of the cookie (default \"\")\n * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `\"Infinity\"`). See `setExpires()`\n * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `\"Infinity\"` and `\"-Infinity\"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()`\n * _domain_ - string - the `Domain=` attribute of the cookie\n * _path_ - string - the `Path=` of the cookie\n * _secure_ - boolean - the `Secure` cookie flag\n * _httpOnly_ - boolean - the `HttpOnly` cookie flag\n * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside)\n \nAfter a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes:\n\n * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied)\n * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one.\n * _created_ - `Date` - when this cookie was added to the jar\n * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute.\n\nConstruction([{options}])\n------------\n\nReceives an options object that can contain any Cookie properties, uses the default for unspecified properties.\n\n.toString()\n-----------\n\nencode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`.\n\n.cookieString()\n---------------\n\nencode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '=').\n\n.setExpires(String)\n-------------------\n\nsets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `\"Infinity\"` (a string) is set.\n\n.setMaxAge(number)\n-------------------\n\nsets the maxAge in seconds. Coerces `-Infinity` to `\"-Infinity\"` and `Infinity` to `\"Infinity\"` so it JSON serializes correctly.\n\n.expiryTime([now=Date.now()])\n-----------------------------\n\n.expiryDate([now=Date.now()])\n-----------------------------\n\nexpiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds.\n\nMax-Age takes precedence over Expires (as per the RFC). The `.created` attribute -- or, by default, the `now` paramter -- is used to offset the `.maxAge` attribute.\n\nIf Expires (`.expires`) is set, that's returned.\n\nOtherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for \"Tue, 19 Jan 2038 03:14:07 GMT\" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents).\n\n.TTL([now=Date.now()])\n---------\n\ncompute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply.\n\nThe \"number\" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned.\n\n.canonicalizedDoman()\n---------------------\n\n.cdomain()\n----------\n\nreturn the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters.\n\n.validate()\n-----------\n\nStatus: *IN PROGRESS*. Works for a few things, but is by no means comprehensive.\n\nvalidates cookie attributes for semantic correctness. Useful for \"lint\" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct:\n\n``` javascript\nif (cookie.validate() === true) {\n // it's tasty\n} else {\n // yuck!\n}\n```\n\nCookieJar\n=========\n\nConstruction([store = new MemoryCookieStore()][, rejectPublicSuffixes])\n------------\n\nSimply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used.\n\n\nAttributes\n----------\n\n * _rejectPublicSuffixes_ - boolean - reject cookies with domains like \"com\" and \"co.uk\" (default: `true`)\n \nSince eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods.\n\n.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie))\n-------------------------------------------------------------------\n\nAttempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.created`, `.lastAccessed` and `.hostOnly` properties.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.\n * _secure_ - boolean - autodetect from url - indicates if this is a \"Secure\" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.\n * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies\n * _strict_ - boolean - default `false` - perform extra checks\n * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. CookieStore errors aren't ignored by this option.\n\nAs per the RFC, the `.hostOnly` property is set if there was no \"Domain=\" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual).\n\n.storeCookie(cookie, [{options},] cb(err,cookie))\n-------------------------------------------------\n\n__REMOVED__ removed in lieu of the CookieStore API below\n \n.getCookies(currentUrl, [{options},] cb(err,cookies))\n-----------------------------------------------------\n\nRetrieve the list of cookies that can be sent in a Cookie header for the current url.\n\nIf an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.\n * _secure_ - boolean - autodetect from url - indicates if this is a \"Secure\" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.\n * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies\n * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially).\n * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the CookieStore `fetchCookies` function (the default MemoryCookieStore supports it).\n\nThe `.lastAccessed` property of the returned cookies will have been updated.\n\n.getCookieString(...)\n---------------------\n\nAccepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`.\n\n.getSetCookieStrings(...)\n-------------------------\n\nAccepts the same options as `.getCookies()` but passes an array of strings suitable for Set-Cookie headers (rather than an array of `Cookie`s) to the callback. Simply maps the cookie array via `.toString()`.\n\n# CookieStore API\n\nThe storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores.\n\nAll `domain` parameters will have been normalized before calling.\n\nThe Cookie store must have all of the following methods.\n\nstore.findCookie(domain, path, key, cb(err,cookie))\n---------------------------------------------------\n\nRetrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned.\n\nCallback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error).\n\nstore.findCookies(domain, path, cb(err,cookies))\n------------------------------------------------\n\nLocates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above.\n\nIf no cookies are found, the callback MUST be passed an empty array.\n\nThe resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done.\n\nAs of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only).\n\nstore.putCookie(cookie, cb(err))\n--------------------------------\n\nAdds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur.\n\nThe `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties.\n\nPass an error if the cookie cannot be stored.\n\nstore.updateCookie(oldCookie, newCookie, cb(err))\n-------------------------------------------------\n\nUpdate an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store.\n\nThe `.lastAccessed` property will always be different between the two objects and `.created` will always be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are sorted (or selected for deletion).\n\nStores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object.\n\nThe `newCookie` and `oldCookie` objects MUST NOT be modified.\n\nPass an error if the newCookie cannot be stored.\n\nstore.removeCookie(domain, path, key, cb(err))\n----------------------------------------------\n\nRemove a cookie from the store (see notes on `findCookie` about the uniqueness constraint).\n\nThe implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie.\n\nstore.removeCookies(domain, path, cb(err))\n------------------------------------------\n\nRemoves matching cookies from the store. The `path` paramter is optional, and if missing means all paths in a domain should be removed.\n\nPass an error ONLY if removing any existing cookies failed.\n\n# TODO\n\n * _full_ RFC5890/RFC5891 canonicalization for domains in `cdomain()`\n * the optional `punycode` requirement implements RFC3492, but RFC6265 requires RFC5891\n * better tests for `validate()`?\n\n# Copyright and License\n\n(tl;dr: MIT with some MPL/1.1)\n\nCopyright GoInstant, Inc. and other contributors. All rights reserved.\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\nPortions may be licensed under different licenses (in particular public-suffix.txt is MPL/1.1); please read the LICENSE file for full details.\n", - "readmeFilename": "README.md", - "_id": "tough-cookie@0.9.15", - "dist": { - "shasum": "0fbda7fb5b5bca17e4f97909a0818dc8c2c12588" - }, - "_from": "tough-cookie@~0.9.15", - "_resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-0.9.15.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/public-suffix.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/public-suffix.txt deleted file mode 100644 index 2c201312..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/public-suffix.txt +++ /dev/null @@ -1,5229 +0,0 @@ -// ***** BEGIN LICENSE BLOCK ***** -// Version: MPL 1.1/GPL 2.0/LGPL 2.1 -// -// The contents of this file are subject to the Mozilla Public License Version -// 1.1 (the "License"); you may not use this file except in compliance with -// the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" basis, -// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -// for the specific language governing rights and limitations under the -// License. -// -// The Original Code is the Public Suffix List. -// -// The Initial Developer of the Original Code is -// Jo Hermans <jo.hermans@gmail.com>. -// Portions created by the Initial Developer are Copyright (C) 2007 -// the Initial Developer. All Rights Reserved. -// -// Contributor(s): -// Ruben Arakelyan <ruben@rubenarakelyan.com> -// Gervase Markham <gerv@gerv.net> -// Pamela Greene <pamg.bugs@gmail.com> -// David Triendl <david@triendl.name> -// Jothan Frakes <jothan@gmail.com> -// The kind representatives of many TLD registries -// -// Alternatively, the contents of this file may be used under the terms of -// either the GNU General Public License Version 2 or later (the "GPL"), or -// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -// in which case the provisions of the GPL or the LGPL are applicable instead -// of those above. If you wish to allow use of your version of this file only -// under the terms of either the GPL or the LGPL, and not to allow others to -// use your version of this file under the terms of the MPL, indicate your -// decision by deleting the provisions above and replace them with the notice -// and other provisions required by the GPL or the LGPL. If you do not delete -// the provisions above, a recipient may use your version of this file under -// the terms of any one of the MPL, the GPL or the LGPL. -// -// ***** END LICENSE BLOCK ***** - -// ===BEGIN ICANN DOMAINS=== - -// ac : http://en.wikipedia.org/wiki/.ac -ac -com.ac -edu.ac -gov.ac -net.ac -mil.ac -org.ac - -// ad : http://en.wikipedia.org/wiki/.ad -ad -nom.ad - -// ae : http://en.wikipedia.org/wiki/.ae -// see also: "Domain Name Eligibility Policy" at http://www.aeda.ae/eng/aepolicy.php -ae -co.ae -net.ae -org.ae -sch.ae -ac.ae -gov.ae -mil.ae - -// aero : see http://www.information.aero/index.php?id=66 -aero -accident-investigation.aero -accident-prevention.aero -aerobatic.aero -aeroclub.aero -aerodrome.aero -agents.aero -aircraft.aero -airline.aero -airport.aero -air-surveillance.aero -airtraffic.aero -air-traffic-control.aero -ambulance.aero -amusement.aero -association.aero -author.aero -ballooning.aero -broker.aero -caa.aero -cargo.aero -catering.aero -certification.aero -championship.aero -charter.aero -civilaviation.aero -club.aero -conference.aero -consultant.aero -consulting.aero -control.aero -council.aero -crew.aero -design.aero -dgca.aero -educator.aero -emergency.aero -engine.aero -engineer.aero -entertainment.aero -equipment.aero -exchange.aero -express.aero -federation.aero -flight.aero -freight.aero -fuel.aero -gliding.aero -government.aero -groundhandling.aero -group.aero -hanggliding.aero -homebuilt.aero -insurance.aero -journal.aero -journalist.aero -leasing.aero -logistics.aero -magazine.aero -maintenance.aero -marketplace.aero -media.aero -microlight.aero -modelling.aero -navigation.aero -parachuting.aero -paragliding.aero -passenger-association.aero -pilot.aero -press.aero -production.aero -recreation.aero -repbody.aero -res.aero -research.aero -rotorcraft.aero -safety.aero -scientist.aero -services.aero -show.aero -skydiving.aero -software.aero -student.aero -taxi.aero -trader.aero -trading.aero -trainer.aero -union.aero -workinggroup.aero -works.aero - -// af : http://www.nic.af/help.jsp -af -gov.af -com.af -org.af -net.af -edu.af - -// ag : http://www.nic.ag/prices.htm -ag -com.ag -org.ag -net.ag -co.ag -nom.ag - -// ai : http://nic.com.ai/ -ai -off.ai -com.ai -net.ai -org.ai - -// al : http://www.ert.gov.al/ert_alb/faq_det.html?Id=31 -al -com.al -edu.al -gov.al -mil.al -net.al -org.al - -// am : http://en.wikipedia.org/wiki/.am -am - -// an : http://www.una.an/an_domreg/default.asp -an -com.an -net.an -org.an -edu.an - -// ao : http://en.wikipedia.org/wiki/.ao -// http://www.dns.ao/REGISTR.DOC -ao -ed.ao -gv.ao -og.ao -co.ao -pb.ao -it.ao - -// aq : http://en.wikipedia.org/wiki/.aq -aq - -// ar : http://en.wikipedia.org/wiki/.ar -*.ar -!congresodelalengua3.ar -!educ.ar -!gobiernoelectronico.ar -!mecon.ar -!nacion.ar -!nic.ar -!promocion.ar -!retina.ar -!uba.ar - -// arpa : http://en.wikipedia.org/wiki/.arpa -// Confirmed by registry <iana-questions@icann.org> 2008-06-18 -e164.arpa -in-addr.arpa -ip6.arpa -iris.arpa -uri.arpa -urn.arpa - -// as : http://en.wikipedia.org/wiki/.as -as -gov.as - -// asia : http://en.wikipedia.org/wiki/.asia -asia - -// at : http://en.wikipedia.org/wiki/.at -// Confirmed by registry <it@nic.at> 2008-06-17 -at -ac.at -co.at -gv.at -or.at - -// au : http://en.wikipedia.org/wiki/.au -// http://www.auda.org.au/ -// 2LDs -com.au -net.au -org.au -edu.au -gov.au -csiro.au -asn.au -id.au -// Historic 2LDs (closed to new registration, but sites still exist) -info.au -conf.au -oz.au -// CGDNs - http://www.cgdn.org.au/ -act.au -nsw.au -nt.au -qld.au -sa.au -tas.au -vic.au -wa.au -// 3LDs -act.edu.au -nsw.edu.au -nt.edu.au -qld.edu.au -sa.edu.au -tas.edu.au -vic.edu.au -wa.edu.au -act.gov.au -// Removed at request of Shae.Donelan@services.nsw.gov.au, 2010-03-04 -// nsw.gov.au -nt.gov.au -qld.gov.au -sa.gov.au -tas.gov.au -vic.gov.au -wa.gov.au - -// aw : http://en.wikipedia.org/wiki/.aw -aw -com.aw - -// ax : http://en.wikipedia.org/wiki/.ax -ax - -// az : http://en.wikipedia.org/wiki/.az -az -com.az -net.az -int.az -gov.az -org.az -edu.az -info.az -pp.az -mil.az -name.az -pro.az -biz.az - -// ba : http://en.wikipedia.org/wiki/.ba -ba -org.ba -net.ba -edu.ba -gov.ba -mil.ba -unsa.ba -unbi.ba -co.ba -com.ba -rs.ba - -// bb : http://en.wikipedia.org/wiki/.bb -bb -biz.bb -com.bb -edu.bb -gov.bb -info.bb -net.bb -org.bb -store.bb - -// bd : http://en.wikipedia.org/wiki/.bd -*.bd - -// be : http://en.wikipedia.org/wiki/.be -// Confirmed by registry <tech@dns.be> 2008-06-08 -be -ac.be - -// bf : http://en.wikipedia.org/wiki/.bf -bf -gov.bf - -// bg : http://en.wikipedia.org/wiki/.bg -// https://www.register.bg/user/static/rules/en/index.html -bg -a.bg -b.bg -c.bg -d.bg -e.bg -f.bg -g.bg -h.bg -i.bg -j.bg -k.bg -l.bg -m.bg -n.bg -o.bg -p.bg -q.bg -r.bg -s.bg -t.bg -u.bg -v.bg -w.bg -x.bg -y.bg -z.bg -0.bg -1.bg -2.bg -3.bg -4.bg -5.bg -6.bg -7.bg -8.bg -9.bg - -// bh : http://en.wikipedia.org/wiki/.bh -bh -com.bh -edu.bh -net.bh -org.bh -gov.bh - -// bi : http://en.wikipedia.org/wiki/.bi -// http://whois.nic.bi/ -bi -co.bi -com.bi -edu.bi -or.bi -org.bi - -// biz : http://en.wikipedia.org/wiki/.biz -biz - -// bj : http://en.wikipedia.org/wiki/.bj -bj -asso.bj -barreau.bj -gouv.bj - -// bm : http://www.bermudanic.bm/dnr-text.txt -bm -com.bm -edu.bm -gov.bm -net.bm -org.bm - -// bn : http://en.wikipedia.org/wiki/.bn -*.bn - -// bo : http://www.nic.bo/ -bo -com.bo -edu.bo -gov.bo -gob.bo -int.bo -org.bo -net.bo -mil.bo -tv.bo - -// br : http://registro.br/dominio/dpn.html -// Updated by registry <fneves@registro.br> 2011-03-01 -br -adm.br -adv.br -agr.br -am.br -arq.br -art.br -ato.br -b.br -bio.br -blog.br -bmd.br -can.br -cim.br -cng.br -cnt.br -com.br -coop.br -ecn.br -edu.br -emp.br -eng.br -esp.br -etc.br -eti.br -far.br -flog.br -fm.br -fnd.br -fot.br -fst.br -g12.br -ggf.br -gov.br -imb.br -ind.br -inf.br -jor.br -jus.br -lel.br -mat.br -med.br -mil.br -mus.br -net.br -nom.br -not.br -ntr.br -odo.br -org.br -ppg.br -pro.br -psc.br -psi.br -qsl.br -radio.br -rec.br -slg.br -srv.br -taxi.br -teo.br -tmp.br -trd.br -tur.br -tv.br -vet.br -vlog.br -wiki.br -zlg.br - -// bs : http://www.nic.bs/rules.html -bs -com.bs -net.bs -org.bs -edu.bs -gov.bs - -// bt : http://en.wikipedia.org/wiki/.bt -bt -com.bt -edu.bt -gov.bt -net.bt -org.bt - -// bv : No registrations at this time. -// Submitted by registry <jarle@uninett.no> 2006-06-16 - -// bw : http://en.wikipedia.org/wiki/.bw -// http://www.gobin.info/domainname/bw.doc -// list of other 2nd level tlds ? -bw -co.bw -org.bw - -// by : http://en.wikipedia.org/wiki/.by -// http://tld.by/rules_2006_en.html -// list of other 2nd level tlds ? -by -gov.by -mil.by -// Official information does not indicate that com.by is a reserved -// second-level domain, but it's being used as one (see www.google.com.by and -// www.yahoo.com.by, for example), so we list it here for safety's sake. -com.by - -// http://hoster.by/ -of.by - -// bz : http://en.wikipedia.org/wiki/.bz -// http://www.belizenic.bz/ -bz -com.bz -net.bz -org.bz -edu.bz -gov.bz - -// ca : http://en.wikipedia.org/wiki/.ca -ca -// ca geographical names -ab.ca -bc.ca -mb.ca -nb.ca -nf.ca -nl.ca -ns.ca -nt.ca -nu.ca -on.ca -pe.ca -qc.ca -sk.ca -yk.ca -// gc.ca: http://en.wikipedia.org/wiki/.gc.ca -// see also: http://registry.gc.ca/en/SubdomainFAQ -gc.ca - -// cat : http://en.wikipedia.org/wiki/.cat -cat - -// cc : http://en.wikipedia.org/wiki/.cc -cc - -// cd : http://en.wikipedia.org/wiki/.cd -// see also: https://www.nic.cd/domain/insertDomain_2.jsp?act=1 -cd -gov.cd - -// cf : http://en.wikipedia.org/wiki/.cf -cf - -// cg : http://en.wikipedia.org/wiki/.cg -cg - -// ch : http://en.wikipedia.org/wiki/.ch -ch - -// ci : http://en.wikipedia.org/wiki/.ci -// http://www.nic.ci/index.php?page=charte -ci -org.ci -or.ci -com.ci -co.ci -edu.ci -ed.ci -ac.ci -net.ci -go.ci -asso.ci -aéroport.ci -int.ci -presse.ci -md.ci -gouv.ci - -// ck : http://en.wikipedia.org/wiki/.ck -*.ck -!www.ck - -// cl : http://en.wikipedia.org/wiki/.cl -cl -gov.cl -gob.cl -co.cl -mil.cl - -// cm : http://en.wikipedia.org/wiki/.cm -cm -gov.cm - -// cn : http://en.wikipedia.org/wiki/.cn -// Submitted by registry <tanyaling@cnnic.cn> 2008-06-11 -cn -ac.cn -com.cn -edu.cn -gov.cn -net.cn -org.cn -mil.cn -公司.cn -网络.cn -網絡.cn -// cn geographic names -ah.cn -bj.cn -cq.cn -fj.cn -gd.cn -gs.cn -gz.cn -gx.cn -ha.cn -hb.cn -he.cn -hi.cn -hl.cn -hn.cn -jl.cn -js.cn -jx.cn -ln.cn -nm.cn -nx.cn -qh.cn -sc.cn -sd.cn -sh.cn -sn.cn -sx.cn -tj.cn -xj.cn -xz.cn -yn.cn -zj.cn -hk.cn -mo.cn -tw.cn - -// co : http://en.wikipedia.org/wiki/.co -// Submitted by registry <tecnico@uniandes.edu.co> 2008-06-11 -co -arts.co -com.co -edu.co -firm.co -gov.co -info.co -int.co -mil.co -net.co -nom.co -org.co -rec.co -web.co - -// com : http://en.wikipedia.org/wiki/.com -com - -// coop : http://en.wikipedia.org/wiki/.coop -coop - -// cr : http://www.nic.cr/niccr_publico/showRegistroDominiosScreen.do -cr -ac.cr -co.cr -ed.cr -fi.cr -go.cr -or.cr -sa.cr - -// cu : http://en.wikipedia.org/wiki/.cu -cu -com.cu -edu.cu -org.cu -net.cu -gov.cu -inf.cu - -// cv : http://en.wikipedia.org/wiki/.cv -cv - -// cx : http://en.wikipedia.org/wiki/.cx -// list of other 2nd level tlds ? -cx -gov.cx - -// cy : http://en.wikipedia.org/wiki/.cy -*.cy - -// cz : http://en.wikipedia.org/wiki/.cz -cz - -// de : http://en.wikipedia.org/wiki/.de -// Confirmed by registry <ops@denic.de> (with technical -// reservations) 2008-07-01 -de - -// dj : http://en.wikipedia.org/wiki/.dj -dj - -// dk : http://en.wikipedia.org/wiki/.dk -// Confirmed by registry <robert@dk-hostmaster.dk> 2008-06-17 -dk - -// dm : http://en.wikipedia.org/wiki/.dm -dm -com.dm -net.dm -org.dm -edu.dm -gov.dm - -// do : http://en.wikipedia.org/wiki/.do -do -art.do -com.do -edu.do -gob.do -gov.do -mil.do -net.do -org.do -sld.do -web.do - -// dz : http://en.wikipedia.org/wiki/.dz -dz -com.dz -org.dz -net.dz -gov.dz -edu.dz -asso.dz -pol.dz -art.dz - -// ec : http://www.nic.ec/reg/paso1.asp -// Submitted by registry <vabboud@nic.ec> 2008-07-04 -ec -com.ec -info.ec -net.ec -fin.ec -k12.ec -med.ec -pro.ec -org.ec -edu.ec -gov.ec -gob.ec -mil.ec - -// edu : http://en.wikipedia.org/wiki/.edu -edu - -// ee : http://www.eenet.ee/EENet/dom_reeglid.html#lisa_B -ee -edu.ee -gov.ee -riik.ee -lib.ee -med.ee -com.ee -pri.ee -aip.ee -org.ee -fie.ee - -// eg : http://en.wikipedia.org/wiki/.eg -eg -com.eg -edu.eg -eun.eg -gov.eg -mil.eg -name.eg -net.eg -org.eg -sci.eg - -// er : http://en.wikipedia.org/wiki/.er -*.er - -// es : https://www.nic.es/site_ingles/ingles/dominios/index.html -es -com.es -nom.es -org.es -gob.es -edu.es - -// et : http://en.wikipedia.org/wiki/.et -*.et - -// eu : http://en.wikipedia.org/wiki/.eu -eu - -// fi : http://en.wikipedia.org/wiki/.fi -fi -// aland.fi : http://en.wikipedia.org/wiki/.ax -// This domain is being phased out in favor of .ax. As there are still many -// domains under aland.fi, we still keep it on the list until aland.fi is -// completely removed. -// TODO: Check for updates (expected to be phased out around Q1/2009) -aland.fi - -// fj : http://en.wikipedia.org/wiki/.fj -*.fj - -// fk : http://en.wikipedia.org/wiki/.fk -*.fk - -// fm : http://en.wikipedia.org/wiki/.fm -fm - -// fo : http://en.wikipedia.org/wiki/.fo -fo - -// fr : http://www.afnic.fr/ -// domaines descriptifs : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-descriptifs -fr -com.fr -asso.fr -nom.fr -prd.fr -presse.fr -tm.fr -// domaines sectoriels : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-sectoriels -aeroport.fr -assedic.fr -avocat.fr -avoues.fr -cci.fr -chambagri.fr -chirurgiens-dentistes.fr -experts-comptables.fr -geometre-expert.fr -gouv.fr -greta.fr -huissier-justice.fr -medecin.fr -notaires.fr -pharmacien.fr -port.fr -veterinaire.fr - -// ga : http://en.wikipedia.org/wiki/.ga -ga - -// gb : This registry is effectively dormant -// Submitted by registry <Damien.Shaw@ja.net> 2008-06-12 - -// gd : http://en.wikipedia.org/wiki/.gd -gd - -// ge : http://www.nic.net.ge/policy_en.pdf -ge -com.ge -edu.ge -gov.ge -org.ge -mil.ge -net.ge -pvt.ge - -// gf : http://en.wikipedia.org/wiki/.gf -gf - -// gg : http://www.channelisles.net/applic/avextn.shtml -gg -co.gg -org.gg -net.gg -sch.gg -gov.gg - -// gh : http://en.wikipedia.org/wiki/.gh -// see also: http://www.nic.gh/reg_now.php -// Although domains directly at second level are not possible at the moment, -// they have been possible for some time and may come back. -gh -com.gh -edu.gh -gov.gh -org.gh -mil.gh - -// gi : http://www.nic.gi/rules.html -gi -com.gi -ltd.gi -gov.gi -mod.gi -edu.gi -org.gi - -// gl : http://en.wikipedia.org/wiki/.gl -// http://nic.gl -gl - -// gm : http://www.nic.gm/htmlpages%5Cgm-policy.htm -gm - -// gn : http://psg.com/dns/gn/gn.txt -// Submitted by registry <randy@psg.com> 2008-06-17 -ac.gn -com.gn -edu.gn -gov.gn -org.gn -net.gn - -// gov : http://en.wikipedia.org/wiki/.gov -gov - -// gp : http://www.nic.gp/index.php?lang=en -gp -com.gp -net.gp -mobi.gp -edu.gp -org.gp -asso.gp - -// gq : http://en.wikipedia.org/wiki/.gq -gq - -// gr : https://grweb.ics.forth.gr/english/1617-B-2005.html -// Submitted by registry <segred@ics.forth.gr> 2008-06-09 -gr -com.gr -edu.gr -net.gr -org.gr -gov.gr - -// gs : http://en.wikipedia.org/wiki/.gs -gs - -// gt : http://www.gt/politicas.html -*.gt -!www.gt - -// gu : http://gadao.gov.gu/registration.txt -*.gu - -// gw : http://en.wikipedia.org/wiki/.gw -gw - -// gy : http://en.wikipedia.org/wiki/.gy -// http://registry.gy/ -gy -co.gy -com.gy -net.gy - -// hk : https://www.hkdnr.hk -// Submitted by registry <hk.tech@hkirc.hk> 2008-06-11 -hk -com.hk -edu.hk -gov.hk -idv.hk -net.hk -org.hk -公司.hk -教育.hk -敎育.hk -政府.hk -個人.hk -个人.hk -箇人.hk -網络.hk -网络.hk -组織.hk -網絡.hk -网絡.hk -组织.hk -組織.hk -組织.hk - -// hm : http://en.wikipedia.org/wiki/.hm -hm - -// hn : http://www.nic.hn/politicas/ps02,,05.html -hn -com.hn -edu.hn -org.hn -net.hn -mil.hn -gob.hn - -// hr : http://www.dns.hr/documents/pdf/HRTLD-regulations.pdf -hr -iz.hr -from.hr -name.hr -com.hr - -// ht : http://www.nic.ht/info/charte.cfm -ht -com.ht -shop.ht -firm.ht -info.ht -adult.ht -net.ht -pro.ht -org.ht -med.ht -art.ht -coop.ht -pol.ht -asso.ht -edu.ht -rel.ht -gouv.ht -perso.ht - -// hu : http://www.domain.hu/domain/English/sld.html -// Confirmed by registry <pasztor@iszt.hu> 2008-06-12 -hu -co.hu -info.hu -org.hu -priv.hu -sport.hu -tm.hu -2000.hu -agrar.hu -bolt.hu -casino.hu -city.hu -erotica.hu -erotika.hu -film.hu -forum.hu -games.hu -hotel.hu -ingatlan.hu -jogasz.hu -konyvelo.hu -lakas.hu -media.hu -news.hu -reklam.hu -sex.hu -shop.hu -suli.hu -szex.hu -tozsde.hu -utazas.hu -video.hu - -// id : http://en.wikipedia.org/wiki/.id -// see also: https://register.pandi.or.id/ -id -ac.id -co.id -go.id -mil.id -net.id -or.id -sch.id -web.id - -// ie : http://en.wikipedia.org/wiki/.ie -ie -gov.ie - -// il : http://en.wikipedia.org/wiki/.il -*.il - -// im : https://www.nic.im/pdfs/imfaqs.pdf -im -co.im -ltd.co.im -plc.co.im -net.im -gov.im -org.im -nic.im -ac.im - -// in : http://en.wikipedia.org/wiki/.in -// see also: http://www.inregistry.in/policies/ -// Please note, that nic.in is not an offical eTLD, but used by most -// government institutions. -in -co.in -firm.in -net.in -org.in -gen.in -ind.in -nic.in -ac.in -edu.in -res.in -gov.in -mil.in - -// info : http://en.wikipedia.org/wiki/.info -info - -// int : http://en.wikipedia.org/wiki/.int -// Confirmed by registry <iana-questions@icann.org> 2008-06-18 -int -eu.int - -// io : http://www.nic.io/rules.html -// list of other 2nd level tlds ? -io -com.io - -// iq : http://www.cmc.iq/english/iq/iqregister1.htm -iq -gov.iq -edu.iq -mil.iq -com.iq -org.iq -net.iq - -// ir : http://www.nic.ir/Terms_and_Conditions_ir,_Appendix_1_Domain_Rules -// Also see http://www.nic.ir/Internationalized_Domain_Names -// Two <iran>.ir entries added at request of <tech-team@nic.ir>, 2010-04-16 -ir -ac.ir -co.ir -gov.ir -id.ir -net.ir -org.ir -sch.ir -// xn--mgba3a4f16a.ir (<iran>.ir, Persian YEH) -ایران.ir -// xn--mgba3a4fra.ir (<iran>.ir, Arabic YEH) -ايران.ir - -// is : http://www.isnic.is/domain/rules.php -// Confirmed by registry <marius@isgate.is> 2008-12-06 -is -net.is -com.is -edu.is -gov.is -org.is -int.is - -// it : http://en.wikipedia.org/wiki/.it -it -gov.it -edu.it -// list of reserved geo-names : -// http://www.nic.it/documenti/regolamenti-e-linee-guida/regolamento-assegnazione-versione-6.0.pdf -// (There is also a list of reserved geo-names corresponding to Italian -// municipalities : http://www.nic.it/documenti/appendice-c.pdf , but it is -// not included here.) -agrigento.it -ag.it -alessandria.it -al.it -ancona.it -an.it -aosta.it -aoste.it -ao.it -arezzo.it -ar.it -ascoli-piceno.it -ascolipiceno.it -ap.it -asti.it -at.it -avellino.it -av.it -bari.it -ba.it -andria-barletta-trani.it -andriabarlettatrani.it -trani-barletta-andria.it -tranibarlettaandria.it -barletta-trani-andria.it -barlettatraniandria.it -andria-trani-barletta.it -andriatranibarletta.it -trani-andria-barletta.it -traniandriabarletta.it -bt.it -belluno.it -bl.it -benevento.it -bn.it -bergamo.it -bg.it -biella.it -bi.it -bologna.it -bo.it -bolzano.it -bozen.it -balsan.it -alto-adige.it -altoadige.it -suedtirol.it -bz.it -brescia.it -bs.it -brindisi.it -br.it -cagliari.it -ca.it -caltanissetta.it -cl.it -campobasso.it -cb.it -carboniaiglesias.it -carbonia-iglesias.it -iglesias-carbonia.it -iglesiascarbonia.it -ci.it -caserta.it -ce.it -catania.it -ct.it -catanzaro.it -cz.it -chieti.it -ch.it -como.it -co.it -cosenza.it -cs.it -cremona.it -cr.it -crotone.it -kr.it -cuneo.it -cn.it -dell-ogliastra.it -dellogliastra.it -ogliastra.it -og.it -enna.it -en.it -ferrara.it -fe.it -fermo.it -fm.it -firenze.it -florence.it -fi.it -foggia.it -fg.it -forli-cesena.it -forlicesena.it -cesena-forli.it -cesenaforli.it -fc.it -frosinone.it -fr.it -genova.it -genoa.it -ge.it -gorizia.it -go.it -grosseto.it -gr.it -imperia.it -im.it -isernia.it -is.it -laquila.it -aquila.it -aq.it -la-spezia.it -laspezia.it -sp.it -latina.it -lt.it -lecce.it -le.it -lecco.it -lc.it -livorno.it -li.it -lodi.it -lo.it -lucca.it -lu.it -macerata.it -mc.it -mantova.it -mn.it -massa-carrara.it -massacarrara.it -carrara-massa.it -carraramassa.it -ms.it -matera.it -mt.it -medio-campidano.it -mediocampidano.it -campidano-medio.it -campidanomedio.it -vs.it -messina.it -me.it -milano.it -milan.it -mi.it -modena.it -mo.it -monza.it -monza-brianza.it -monzabrianza.it -monzaebrianza.it -monzaedellabrianza.it -monza-e-della-brianza.it -mb.it -napoli.it -naples.it -na.it -novara.it -no.it -nuoro.it -nu.it -oristano.it -or.it -padova.it -padua.it -pd.it -palermo.it -pa.it -parma.it -pr.it -pavia.it -pv.it -perugia.it -pg.it -pescara.it -pe.it -pesaro-urbino.it -pesarourbino.it -urbino-pesaro.it -urbinopesaro.it -pu.it -piacenza.it -pc.it -pisa.it -pi.it -pistoia.it -pt.it -pordenone.it -pn.it -potenza.it -pz.it -prato.it -po.it -ragusa.it -rg.it -ravenna.it -ra.it -reggio-calabria.it -reggiocalabria.it -rc.it -reggio-emilia.it -reggioemilia.it -re.it -rieti.it -ri.it -rimini.it -rn.it -roma.it -rome.it -rm.it -rovigo.it -ro.it -salerno.it -sa.it -sassari.it -ss.it -savona.it -sv.it -siena.it -si.it -siracusa.it -sr.it -sondrio.it -so.it -taranto.it -ta.it -tempio-olbia.it -tempioolbia.it -olbia-tempio.it -olbiatempio.it -ot.it -teramo.it -te.it -terni.it -tr.it -torino.it -turin.it -to.it -trapani.it -tp.it -trento.it -trentino.it -tn.it -treviso.it -tv.it -trieste.it -ts.it -udine.it -ud.it -varese.it -va.it -venezia.it -venice.it -ve.it -verbania.it -vb.it -vercelli.it -vc.it -verona.it -vr.it -vibo-valentia.it -vibovalentia.it -vv.it -vicenza.it -vi.it -viterbo.it -vt.it - -// je : http://www.channelisles.net/applic/avextn.shtml -je -co.je -org.je -net.je -sch.je -gov.je - -// jm : http://www.com.jm/register.html -*.jm - -// jo : http://www.dns.jo/Registration_policy.aspx -jo -com.jo -org.jo -net.jo -edu.jo -sch.jo -gov.jo -mil.jo -name.jo - -// jobs : http://en.wikipedia.org/wiki/.jobs -jobs - -// jp : http://en.wikipedia.org/wiki/.jp -// http://jprs.co.jp/en/jpdomain.html -// Submitted by registry <yone@jprs.co.jp> 2008-06-11 -// Updated by registry <yone@jprs.co.jp> 2008-12-04 -jp -// jp organizational type names -ac.jp -ad.jp -co.jp -ed.jp -go.jp -gr.jp -lg.jp -ne.jp -or.jp -// jp geographic type names -// http://jprs.jp/doc/rule/saisoku-1.html -*.aichi.jp -*.akita.jp -*.aomori.jp -*.chiba.jp -*.ehime.jp -*.fukui.jp -*.fukuoka.jp -*.fukushima.jp -*.gifu.jp -*.gunma.jp -*.hiroshima.jp -*.hokkaido.jp -*.hyogo.jp -*.ibaraki.jp -*.ishikawa.jp -*.iwate.jp -*.kagawa.jp -*.kagoshima.jp -*.kanagawa.jp -*.kawasaki.jp -*.kitakyushu.jp -*.kobe.jp -*.kochi.jp -*.kumamoto.jp -*.kyoto.jp -*.mie.jp -*.miyagi.jp -*.miyazaki.jp -*.nagano.jp -*.nagasaki.jp -*.nagoya.jp -*.nara.jp -*.niigata.jp -*.oita.jp -*.okayama.jp -*.okinawa.jp -*.osaka.jp -*.saga.jp -*.saitama.jp -*.sapporo.jp -*.sendai.jp -*.shiga.jp -*.shimane.jp -*.shizuoka.jp -*.tochigi.jp -*.tokushima.jp -*.tokyo.jp -*.tottori.jp -*.toyama.jp -*.wakayama.jp -*.yamagata.jp -*.yamaguchi.jp -*.yamanashi.jp -*.yokohama.jp -!metro.tokyo.jp -!pref.aichi.jp -!pref.akita.jp -!pref.aomori.jp -!pref.chiba.jp -!pref.ehime.jp -!pref.fukui.jp -!pref.fukuoka.jp -!pref.fukushima.jp -!pref.gifu.jp -!pref.gunma.jp -!pref.hiroshima.jp -!pref.hokkaido.jp -!pref.hyogo.jp -!pref.ibaraki.jp -!pref.ishikawa.jp -!pref.iwate.jp -!pref.kagawa.jp -!pref.kagoshima.jp -!pref.kanagawa.jp -!pref.kochi.jp -!pref.kumamoto.jp -!pref.kyoto.jp -!pref.mie.jp -!pref.miyagi.jp -!pref.miyazaki.jp -!pref.nagano.jp -!pref.nagasaki.jp -!pref.nara.jp -!pref.niigata.jp -!pref.oita.jp -!pref.okayama.jp -!pref.okinawa.jp -!pref.osaka.jp -!pref.saga.jp -!pref.saitama.jp -!pref.shiga.jp -!pref.shimane.jp -!pref.shizuoka.jp -!pref.tochigi.jp -!pref.tokushima.jp -!pref.tottori.jp -!pref.toyama.jp -!pref.wakayama.jp -!pref.yamagata.jp -!pref.yamaguchi.jp -!pref.yamanashi.jp -!city.chiba.jp -!city.fukuoka.jp -!city.hiroshima.jp -!city.kawasaki.jp -!city.kitakyushu.jp -!city.kobe.jp -!city.kyoto.jp -!city.nagoya.jp -!city.niigata.jp -!city.okayama.jp -!city.osaka.jp -!city.saitama.jp -!city.sapporo.jp -!city.sendai.jp -!city.shizuoka.jp -!city.yokohama.jp - -// ke : http://www.kenic.or.ke/index.php?option=com_content&task=view&id=117&Itemid=145 -*.ke - -// kg : http://www.domain.kg/dmn_n.html -kg -org.kg -net.kg -com.kg -edu.kg -gov.kg -mil.kg - -// kh : http://www.mptc.gov.kh/dns_registration.htm -*.kh - -// ki : http://www.ki/dns/index.html -ki -edu.ki -biz.ki -net.ki -org.ki -gov.ki -info.ki -com.ki - -// km : http://en.wikipedia.org/wiki/.km -// http://www.domaine.km/documents/charte.doc -km -org.km -nom.km -gov.km -prd.km -tm.km -edu.km -mil.km -ass.km -com.km -// These are only mentioned as proposed suggestions at domaine.km, but -// http://en.wikipedia.org/wiki/.km says they're available for registration: -coop.km -asso.km -presse.km -medecin.km -notaires.km -pharmaciens.km -veterinaire.km -gouv.km - -// kn : http://en.wikipedia.org/wiki/.kn -// http://www.dot.kn/domainRules.html -kn -net.kn -org.kn -edu.kn -gov.kn - -// kp : http://www.kcce.kp/en_index.php -com.kp -edu.kp -gov.kp -org.kp -rep.kp -tra.kp - -// kr : http://en.wikipedia.org/wiki/.kr -// see also: http://domain.nida.or.kr/eng/registration.jsp -kr -ac.kr -co.kr -es.kr -go.kr -hs.kr -kg.kr -mil.kr -ms.kr -ne.kr -or.kr -pe.kr -re.kr -sc.kr -// kr geographical names -busan.kr -chungbuk.kr -chungnam.kr -daegu.kr -daejeon.kr -gangwon.kr -gwangju.kr -gyeongbuk.kr -gyeonggi.kr -gyeongnam.kr -incheon.kr -jeju.kr -jeonbuk.kr -jeonnam.kr -seoul.kr -ulsan.kr - -// kw : http://en.wikipedia.org/wiki/.kw -*.kw - -// ky : http://www.icta.ky/da_ky_reg_dom.php -// Confirmed by registry <kysupport@perimeterusa.com> 2008-06-17 -ky -edu.ky -gov.ky -com.ky -org.ky -net.ky - -// kz : http://en.wikipedia.org/wiki/.kz -// see also: http://www.nic.kz/rules/index.jsp -kz -org.kz -edu.kz -net.kz -gov.kz -mil.kz -com.kz - -// la : http://en.wikipedia.org/wiki/.la -// Submitted by registry <gavin.brown@nic.la> 2008-06-10 -la -int.la -net.la -info.la -edu.la -gov.la -per.la -com.la -org.la - -// lb : http://en.wikipedia.org/wiki/.lb -// Submitted by registry <randy@psg.com> 2008-06-17 -com.lb -edu.lb -gov.lb -net.lb -org.lb - -// lc : http://en.wikipedia.org/wiki/.lc -// see also: http://www.nic.lc/rules.htm -lc -com.lc -net.lc -co.lc -org.lc -edu.lc -gov.lc - -// li : http://en.wikipedia.org/wiki/.li -li - -// lk : http://www.nic.lk/seclevpr.html -lk -gov.lk -sch.lk -net.lk -int.lk -com.lk -org.lk -edu.lk -ngo.lk -soc.lk -web.lk -ltd.lk -assn.lk -grp.lk -hotel.lk - -// lr : http://psg.com/dns/lr/lr.txt -// Submitted by registry <randy@psg.com> 2008-06-17 -com.lr -edu.lr -gov.lr -org.lr -net.lr - -// ls : http://en.wikipedia.org/wiki/.ls -ls -co.ls -org.ls - -// lt : http://en.wikipedia.org/wiki/.lt -lt -// gov.lt : http://www.gov.lt/index_en.php -gov.lt - -// lu : http://www.dns.lu/en/ -lu - -// lv : http://www.nic.lv/DNS/En/generic.php -lv -com.lv -edu.lv -gov.lv -org.lv -mil.lv -id.lv -net.lv -asn.lv -conf.lv - -// ly : http://www.nic.ly/regulations.php -ly -com.ly -net.ly -gov.ly -plc.ly -edu.ly -sch.ly -med.ly -org.ly -id.ly - -// ma : http://en.wikipedia.org/wiki/.ma -// http://www.anrt.ma/fr/admin/download/upload/file_fr782.pdf -ma -co.ma -net.ma -gov.ma -org.ma -ac.ma -press.ma - -// mc : http://www.nic.mc/ -mc -tm.mc -asso.mc - -// md : http://en.wikipedia.org/wiki/.md -md - -// me : http://en.wikipedia.org/wiki/.me -me -co.me -net.me -org.me -edu.me -ac.me -gov.me -its.me -priv.me - -// mg : http://www.nic.mg/tarif.htm -mg -org.mg -nom.mg -gov.mg -prd.mg -tm.mg -edu.mg -mil.mg -com.mg - -// mh : http://en.wikipedia.org/wiki/.mh -mh - -// mil : http://en.wikipedia.org/wiki/.mil -mil - -// mk : http://en.wikipedia.org/wiki/.mk -// see also: http://dns.marnet.net.mk/postapka.php -mk -com.mk -org.mk -net.mk -edu.mk -gov.mk -inf.mk -name.mk - -// ml : http://www.gobin.info/domainname/ml-template.doc -// see also: http://en.wikipedia.org/wiki/.ml -ml -com.ml -edu.ml -gouv.ml -gov.ml -net.ml -org.ml -presse.ml - -// mm : http://en.wikipedia.org/wiki/.mm -*.mm - -// mn : http://en.wikipedia.org/wiki/.mn -mn -gov.mn -edu.mn -org.mn - -// mo : http://www.monic.net.mo/ -mo -com.mo -net.mo -org.mo -edu.mo -gov.mo - -// mobi : http://en.wikipedia.org/wiki/.mobi -mobi - -// mp : http://www.dot.mp/ -// Confirmed by registry <dcamacho@saipan.com> 2008-06-17 -mp - -// mq : http://en.wikipedia.org/wiki/.mq -mq - -// mr : http://en.wikipedia.org/wiki/.mr -mr -gov.mr - -// ms : http://en.wikipedia.org/wiki/.ms -ms - -// mt : https://www.nic.org.mt/dotmt/ -*.mt - -// mu : http://en.wikipedia.org/wiki/.mu -mu -com.mu -net.mu -org.mu -gov.mu -ac.mu -co.mu -or.mu - -// museum : http://about.museum/naming/ -// http://index.museum/ -museum -academy.museum -agriculture.museum -air.museum -airguard.museum -alabama.museum -alaska.museum -amber.museum -ambulance.museum -american.museum -americana.museum -americanantiques.museum -americanart.museum -amsterdam.museum -and.museum -annefrank.museum -anthro.museum -anthropology.museum -antiques.museum -aquarium.museum -arboretum.museum -archaeological.museum -archaeology.museum -architecture.museum -art.museum -artanddesign.museum -artcenter.museum -artdeco.museum -arteducation.museum -artgallery.museum -arts.museum -artsandcrafts.museum -asmatart.museum -assassination.museum -assisi.museum -association.museum -astronomy.museum -atlanta.museum -austin.museum -australia.museum -automotive.museum -aviation.museum -axis.museum -badajoz.museum -baghdad.museum -bahn.museum -bale.museum -baltimore.museum -barcelona.museum -baseball.museum -basel.museum -baths.museum -bauern.museum -beauxarts.museum -beeldengeluid.museum -bellevue.museum -bergbau.museum -berkeley.museum -berlin.museum -bern.museum -bible.museum -bilbao.museum -bill.museum -birdart.museum -birthplace.museum -bonn.museum -boston.museum -botanical.museum -botanicalgarden.museum -botanicgarden.museum -botany.museum -brandywinevalley.museum -brasil.museum -bristol.museum -british.museum -britishcolumbia.museum -broadcast.museum -brunel.museum -brussel.museum -brussels.museum -bruxelles.museum -building.museum -burghof.museum -bus.museum -bushey.museum -cadaques.museum -california.museum -cambridge.museum -can.museum -canada.museum -capebreton.museum -carrier.museum -cartoonart.museum -casadelamoneda.museum -castle.museum -castres.museum -celtic.museum -center.museum -chattanooga.museum -cheltenham.museum -chesapeakebay.museum -chicago.museum -children.museum -childrens.museum -childrensgarden.museum -chiropractic.museum -chocolate.museum -christiansburg.museum -cincinnati.museum -cinema.museum -circus.museum -civilisation.museum -civilization.museum -civilwar.museum -clinton.museum -clock.museum -coal.museum -coastaldefence.museum -cody.museum -coldwar.museum -collection.museum -colonialwilliamsburg.museum -coloradoplateau.museum -columbia.museum -columbus.museum -communication.museum -communications.museum -community.museum -computer.museum -computerhistory.museum -comunicações.museum -contemporary.museum -contemporaryart.museum -convent.museum -copenhagen.museum -corporation.museum -correios-e-telecomunicações.museum -corvette.museum -costume.museum -countryestate.museum -county.museum -crafts.museum -cranbrook.museum -creation.museum -cultural.museum -culturalcenter.museum -culture.museum -cyber.museum -cymru.museum -dali.museum -dallas.museum -database.museum -ddr.museum -decorativearts.museum -delaware.museum -delmenhorst.museum -denmark.museum -depot.museum -design.museum -detroit.museum -dinosaur.museum -discovery.museum -dolls.museum -donostia.museum -durham.museum -eastafrica.museum -eastcoast.museum -education.museum -educational.museum -egyptian.museum -eisenbahn.museum -elburg.museum -elvendrell.museum -embroidery.museum -encyclopedic.museum -england.museum -entomology.museum -environment.museum -environmentalconservation.museum -epilepsy.museum -essex.museum -estate.museum -ethnology.museum -exeter.museum -exhibition.museum -family.museum -farm.museum -farmequipment.museum -farmers.museum -farmstead.museum -field.museum -figueres.museum -filatelia.museum -film.museum -fineart.museum -finearts.museum -finland.museum -flanders.museum -florida.museum -force.museum -fortmissoula.museum -fortworth.museum -foundation.museum -francaise.museum -frankfurt.museum -franziskaner.museum -freemasonry.museum -freiburg.museum -fribourg.museum -frog.museum -fundacio.museum -furniture.museum -gallery.museum -garden.museum -gateway.museum -geelvinck.museum -gemological.museum -geology.museum -georgia.museum -giessen.museum -glas.museum -glass.museum -gorge.museum -grandrapids.museum -graz.museum -guernsey.museum -halloffame.museum -hamburg.museum -handson.museum -harvestcelebration.museum -hawaii.museum -health.museum -heimatunduhren.museum -hellas.museum -helsinki.museum -hembygdsforbund.museum -heritage.museum -histoire.museum -historical.museum -historicalsociety.museum -historichouses.museum -historisch.museum -historisches.museum -history.museum -historyofscience.museum -horology.museum -house.museum -humanities.museum -illustration.museum -imageandsound.museum -indian.museum -indiana.museum -indianapolis.museum -indianmarket.museum -intelligence.museum -interactive.museum -iraq.museum -iron.museum -isleofman.museum -jamison.museum -jefferson.museum -jerusalem.museum -jewelry.museum -jewish.museum -jewishart.museum -jfk.museum -journalism.museum -judaica.museum -judygarland.museum -juedisches.museum -juif.museum -karate.museum -karikatur.museum -kids.museum -koebenhavn.museum -koeln.museum -kunst.museum -kunstsammlung.museum -kunstunddesign.museum -labor.museum -labour.museum -lajolla.museum -lancashire.museum -landes.museum -lans.museum -läns.museum -larsson.museum -lewismiller.museum -lincoln.museum -linz.museum -living.museum -livinghistory.museum -localhistory.museum -london.museum -losangeles.museum -louvre.museum -loyalist.museum -lucerne.museum -luxembourg.museum -luzern.museum -mad.museum -madrid.museum -mallorca.museum -manchester.museum -mansion.museum -mansions.museum -manx.museum -marburg.museum -maritime.museum -maritimo.museum -maryland.museum -marylhurst.museum -media.museum -medical.museum -medizinhistorisches.museum -meeres.museum -memorial.museum -mesaverde.museum -michigan.museum -midatlantic.museum -military.museum -mill.museum -miners.museum -mining.museum -minnesota.museum -missile.museum -missoula.museum -modern.museum -moma.museum -money.museum -monmouth.museum -monticello.museum -montreal.museum -moscow.museum -motorcycle.museum -muenchen.museum -muenster.museum -mulhouse.museum -muncie.museum -museet.museum -museumcenter.museum -museumvereniging.museum -music.museum -national.museum -nationalfirearms.museum -nationalheritage.museum -nativeamerican.museum -naturalhistory.museum -naturalhistorymuseum.museum -naturalsciences.museum -nature.museum -naturhistorisches.museum -natuurwetenschappen.museum -naumburg.museum -naval.museum -nebraska.museum -neues.museum -newhampshire.museum -newjersey.museum -newmexico.museum -newport.museum -newspaper.museum -newyork.museum -niepce.museum -norfolk.museum -north.museum -nrw.museum -nuernberg.museum -nuremberg.museum -nyc.museum -nyny.museum -oceanographic.museum -oceanographique.museum -omaha.museum -online.museum -ontario.museum -openair.museum -oregon.museum -oregontrail.museum -otago.museum -oxford.museum -pacific.museum -paderborn.museum -palace.museum -paleo.museum -palmsprings.museum -panama.museum -paris.museum -pasadena.museum -pharmacy.museum -philadelphia.museum -philadelphiaarea.museum -philately.museum -phoenix.museum -photography.museum -pilots.museum -pittsburgh.museum -planetarium.museum -plantation.museum -plants.museum -plaza.museum -portal.museum -portland.museum -portlligat.museum -posts-and-telecommunications.museum -preservation.museum -presidio.museum -press.museum -project.museum -public.museum -pubol.museum -quebec.museum -railroad.museum -railway.museum -research.museum -resistance.museum -riodejaneiro.museum -rochester.museum -rockart.museum -roma.museum -russia.museum -saintlouis.museum -salem.museum -salvadordali.museum -salzburg.museum -sandiego.museum -sanfrancisco.museum -santabarbara.museum -santacruz.museum -santafe.museum -saskatchewan.museum -satx.museum -savannahga.museum -schlesisches.museum -schoenbrunn.museum -schokoladen.museum -school.museum -schweiz.museum -science.museum -scienceandhistory.museum -scienceandindustry.museum -sciencecenter.museum -sciencecenters.museum -science-fiction.museum -sciencehistory.museum -sciences.museum -sciencesnaturelles.museum -scotland.museum -seaport.museum -settlement.museum -settlers.museum -shell.museum -sherbrooke.museum -sibenik.museum -silk.museum -ski.museum -skole.museum -society.museum -sologne.museum -soundandvision.museum -southcarolina.museum -southwest.museum -space.museum -spy.museum -square.museum -stadt.museum -stalbans.museum -starnberg.museum -state.museum -stateofdelaware.museum -station.museum -steam.museum -steiermark.museum -stjohn.museum -stockholm.museum -stpetersburg.museum -stuttgart.museum -suisse.museum -surgeonshall.museum -surrey.museum -svizzera.museum -sweden.museum -sydney.museum -tank.museum -tcm.museum -technology.museum -telekommunikation.museum -television.museum -texas.museum -textile.museum -theater.museum -time.museum -timekeeping.museum -topology.museum -torino.museum -touch.museum -town.museum -transport.museum -tree.museum -trolley.museum -trust.museum -trustee.museum -uhren.museum -ulm.museum -undersea.museum -university.museum -usa.museum -usantiques.museum -usarts.museum -uscountryestate.museum -usculture.museum -usdecorativearts.museum -usgarden.museum -ushistory.museum -ushuaia.museum -uslivinghistory.museum -utah.museum -uvic.museum -valley.museum -vantaa.museum -versailles.museum -viking.museum -village.museum -virginia.museum -virtual.museum -virtuel.museum -vlaanderen.museum -volkenkunde.museum -wales.museum -wallonie.museum -war.museum -washingtondc.museum -watchandclock.museum -watch-and-clock.museum -western.museum -westfalen.museum -whaling.museum -wildlife.museum -williamsburg.museum -windmill.museum -workshop.museum -york.museum -yorkshire.museum -yosemite.museum -youth.museum -zoological.museum -zoology.museum -ירושלים.museum -иком.museum - -// mv : http://en.wikipedia.org/wiki/.mv -// "mv" included because, contra Wikipedia, google.mv exists. -mv -aero.mv -biz.mv -com.mv -coop.mv -edu.mv -gov.mv -info.mv -int.mv -mil.mv -museum.mv -name.mv -net.mv -org.mv -pro.mv - -// mw : http://www.registrar.mw/ -mw -ac.mw -biz.mw -co.mw -com.mw -coop.mw -edu.mw -gov.mw -int.mw -museum.mw -net.mw -org.mw - -// mx : http://www.nic.mx/ -// Submitted by registry <farias@nic.mx> 2008-06-19 -mx -com.mx -org.mx -gob.mx -edu.mx -net.mx - -// my : http://www.mynic.net.my/ -my -com.my -net.my -org.my -gov.my -edu.my -mil.my -name.my - -// mz : http://www.gobin.info/domainname/mz-template.doc -*.mz - -// na : http://www.na-nic.com.na/ -// http://www.info.na/domain/ -na -info.na -pro.na -name.na -school.na -or.na -dr.na -us.na -mx.na -ca.na -in.na -cc.na -tv.na -ws.na -mobi.na -co.na -com.na -org.na - -// name : has 2nd-level tlds, but there's no list of them -name - -// nc : http://www.cctld.nc/ -nc -asso.nc - -// ne : http://en.wikipedia.org/wiki/.ne -ne - -// net : http://en.wikipedia.org/wiki/.net -net - -// nf : http://en.wikipedia.org/wiki/.nf -nf -com.nf -net.nf -per.nf -rec.nf -web.nf -arts.nf -firm.nf -info.nf -other.nf -store.nf - -// ng : http://psg.com/dns/ng/ -// Submitted by registry <randy@psg.com> 2008-06-17 -ac.ng -com.ng -edu.ng -gov.ng -net.ng -org.ng - -// ni : http://www.nic.ni/dominios.htm -*.ni - -// nl : http://www.domain-registry.nl/ace.php/c,728,122,,,,Home.html -// Confirmed by registry <Antoin.Verschuren@sidn.nl> (with technical -// reservations) 2008-06-08 -nl - -// BV.nl will be a registry for dutch BV's (besloten vennootschap) -bv.nl - -// no : http://www.norid.no/regelverk/index.en.html -// The Norwegian registry has declined to notify us of updates. The web pages -// referenced below are the official source of the data. There is also an -// announce mailing list: -// https://postlister.uninett.no/sympa/info/norid-diskusjon -no -// Norid generic domains : http://www.norid.no/regelverk/vedlegg-c.en.html -fhs.no -vgs.no -fylkesbibl.no -folkebibl.no -museum.no -idrett.no -priv.no -// Non-Norid generic domains : http://www.norid.no/regelverk/vedlegg-d.en.html -mil.no -stat.no -dep.no -kommune.no -herad.no -// no geographical names : http://www.norid.no/regelverk/vedlegg-b.en.html -// counties -aa.no -ah.no -bu.no -fm.no -hl.no -hm.no -jan-mayen.no -mr.no -nl.no -nt.no -of.no -ol.no -oslo.no -rl.no -sf.no -st.no -svalbard.no -tm.no -tr.no -va.no -vf.no -// primary and lower secondary schools per county -gs.aa.no -gs.ah.no -gs.bu.no -gs.fm.no -gs.hl.no -gs.hm.no -gs.jan-mayen.no -gs.mr.no -gs.nl.no -gs.nt.no -gs.of.no -gs.ol.no -gs.oslo.no -gs.rl.no -gs.sf.no -gs.st.no -gs.svalbard.no -gs.tm.no -gs.tr.no -gs.va.no -gs.vf.no -// cities -akrehamn.no -åkrehamn.no -algard.no -ålgård.no -arna.no -brumunddal.no -bryne.no -bronnoysund.no -brønnøysund.no -drobak.no -drøbak.no -egersund.no -fetsund.no -floro.no -florø.no -fredrikstad.no -hokksund.no -honefoss.no -hønefoss.no -jessheim.no -jorpeland.no -jørpeland.no -kirkenes.no -kopervik.no -krokstadelva.no -langevag.no -langevåg.no -leirvik.no -mjondalen.no -mjøndalen.no -mo-i-rana.no -mosjoen.no -mosjøen.no -nesoddtangen.no -orkanger.no -osoyro.no -osøyro.no -raholt.no -råholt.no -sandnessjoen.no -sandnessjøen.no -skedsmokorset.no -slattum.no -spjelkavik.no -stathelle.no -stavern.no -stjordalshalsen.no -stjørdalshalsen.no -tananger.no -tranby.no -vossevangen.no -// communities -afjord.no -åfjord.no -agdenes.no -al.no -ål.no -alesund.no -ålesund.no -alstahaug.no -alta.no -áltá.no -alaheadju.no -álaheadju.no -alvdal.no -amli.no -åmli.no -amot.no -åmot.no -andebu.no -andoy.no -andøy.no -andasuolo.no -ardal.no -årdal.no -aremark.no -arendal.no -ås.no -aseral.no -åseral.no -asker.no -askim.no -askvoll.no -askoy.no -askøy.no -asnes.no -åsnes.no -audnedaln.no -aukra.no -aure.no -aurland.no -aurskog-holand.no -aurskog-høland.no -austevoll.no -austrheim.no -averoy.no -averøy.no -balestrand.no -ballangen.no -balat.no -bálát.no -balsfjord.no -bahccavuotna.no -báhccavuotna.no -bamble.no -bardu.no -beardu.no -beiarn.no -bajddar.no -bájddar.no -baidar.no -báidár.no -berg.no -bergen.no -berlevag.no -berlevåg.no -bearalvahki.no -bearalváhki.no -bindal.no -birkenes.no -bjarkoy.no -bjarkøy.no -bjerkreim.no -bjugn.no -bodo.no -bodø.no -badaddja.no -bådåddjå.no -budejju.no -bokn.no -bremanger.no -bronnoy.no -brønnøy.no -bygland.no -bykle.no -barum.no -bærum.no -bo.telemark.no -bø.telemark.no -bo.nordland.no -bø.nordland.no -bievat.no -bievát.no -bomlo.no -bømlo.no -batsfjord.no -båtsfjord.no -bahcavuotna.no -báhcavuotna.no -dovre.no -drammen.no -drangedal.no -dyroy.no -dyrøy.no -donna.no -dønna.no -eid.no -eidfjord.no -eidsberg.no -eidskog.no -eidsvoll.no -eigersund.no -elverum.no -enebakk.no -engerdal.no -etne.no -etnedal.no -evenes.no -evenassi.no -evenášši.no -evje-og-hornnes.no -farsund.no -fauske.no -fuossko.no -fuoisku.no -fedje.no -fet.no -finnoy.no -finnøy.no -fitjar.no -fjaler.no -fjell.no -flakstad.no -flatanger.no -flekkefjord.no -flesberg.no -flora.no -fla.no -flå.no -folldal.no -forsand.no -fosnes.no -frei.no -frogn.no -froland.no -frosta.no -frana.no -fræna.no -froya.no -frøya.no -fusa.no -fyresdal.no -forde.no -førde.no -gamvik.no -gangaviika.no -gáŋgaviika.no -gaular.no -gausdal.no -gildeskal.no -gildeskål.no -giske.no -gjemnes.no -gjerdrum.no -gjerstad.no -gjesdal.no -gjovik.no -gjøvik.no -gloppen.no -gol.no -gran.no -grane.no -granvin.no -gratangen.no -grimstad.no -grong.no -kraanghke.no -kråanghke.no -grue.no -gulen.no -hadsel.no -halden.no -halsa.no -hamar.no -hamaroy.no -habmer.no -hábmer.no -hapmir.no -hápmir.no -hammerfest.no -hammarfeasta.no -hámmárfeasta.no -haram.no -hareid.no -harstad.no -hasvik.no -aknoluokta.no -ákŋoluokta.no -hattfjelldal.no -aarborte.no -haugesund.no -hemne.no -hemnes.no -hemsedal.no -heroy.more-og-romsdal.no -herøy.møre-og-romsdal.no -heroy.nordland.no -herøy.nordland.no -hitra.no -hjartdal.no -hjelmeland.no -hobol.no -hobøl.no -hof.no -hol.no -hole.no -holmestrand.no -holtalen.no -holtålen.no -hornindal.no -horten.no -hurdal.no -hurum.no -hvaler.no -hyllestad.no -hagebostad.no -hægebostad.no -hoyanger.no -høyanger.no -hoylandet.no -høylandet.no -ha.no -hå.no -ibestad.no -inderoy.no -inderøy.no -iveland.no -jevnaker.no -jondal.no -jolster.no -jølster.no -karasjok.no -karasjohka.no -kárášjohka.no -karlsoy.no -galsa.no -gálsá.no -karmoy.no -karmøy.no -kautokeino.no -guovdageaidnu.no -klepp.no -klabu.no -klæbu.no -kongsberg.no -kongsvinger.no -kragero.no -kragerø.no -kristiansand.no -kristiansund.no -krodsherad.no -krødsherad.no -kvalsund.no -rahkkeravju.no -ráhkkerávju.no -kvam.no -kvinesdal.no -kvinnherad.no -kviteseid.no -kvitsoy.no -kvitsøy.no -kvafjord.no -kvæfjord.no -giehtavuoatna.no -kvanangen.no -kvænangen.no -navuotna.no -návuotna.no -kafjord.no -kåfjord.no -gaivuotna.no -gáivuotna.no -larvik.no -lavangen.no -lavagis.no -loabat.no -loabát.no -lebesby.no -davvesiida.no -leikanger.no -leirfjord.no -leka.no -leksvik.no -lenvik.no -leangaviika.no -leaŋgaviika.no -lesja.no -levanger.no -lier.no -lierne.no -lillehammer.no -lillesand.no -lindesnes.no -lindas.no -lindås.no -lom.no -loppa.no -lahppi.no -láhppi.no -lund.no -lunner.no -luroy.no -lurøy.no -luster.no -lyngdal.no -lyngen.no -ivgu.no -lardal.no -lerdal.no -lærdal.no -lodingen.no -lødingen.no -lorenskog.no -lørenskog.no -loten.no -løten.no -malvik.no -masoy.no -måsøy.no -muosat.no -muosát.no -mandal.no -marker.no -marnardal.no -masfjorden.no -meland.no -meldal.no -melhus.no -meloy.no -meløy.no -meraker.no -meråker.no -moareke.no -moåreke.no -midsund.no -midtre-gauldal.no -modalen.no -modum.no -molde.no -moskenes.no -moss.no -mosvik.no -malselv.no -målselv.no -malatvuopmi.no -málatvuopmi.no -namdalseid.no -aejrie.no -namsos.no -namsskogan.no -naamesjevuemie.no -nååmesjevuemie.no -laakesvuemie.no -nannestad.no -narvik.no -narviika.no -naustdal.no -nedre-eiker.no -nes.akershus.no -nes.buskerud.no -nesna.no -nesodden.no -nesseby.no -unjarga.no -unjárga.no -nesset.no -nissedal.no -nittedal.no -nord-aurdal.no -nord-fron.no -nord-odal.no -norddal.no -nordkapp.no -davvenjarga.no -davvenjárga.no -nordre-land.no -nordreisa.no -raisa.no -ráisa.no -nore-og-uvdal.no -notodden.no -naroy.no -nærøy.no -notteroy.no -nøtterøy.no -odda.no -oksnes.no -øksnes.no -oppdal.no -oppegard.no -oppegård.no -orkdal.no -orland.no -ørland.no -orskog.no -ørskog.no -orsta.no -ørsta.no -os.hedmark.no -os.hordaland.no -osen.no -osteroy.no -osterøy.no -ostre-toten.no -østre-toten.no -overhalla.no -ovre-eiker.no -øvre-eiker.no -oyer.no -øyer.no -oygarden.no -øygarden.no -oystre-slidre.no -øystre-slidre.no -porsanger.no -porsangu.no -porsáŋgu.no -porsgrunn.no -radoy.no -radøy.no -rakkestad.no -rana.no -ruovat.no -randaberg.no -rauma.no -rendalen.no -rennebu.no -rennesoy.no -rennesøy.no -rindal.no -ringebu.no -ringerike.no -ringsaker.no -rissa.no -risor.no -risør.no -roan.no -rollag.no -rygge.no -ralingen.no -rælingen.no -rodoy.no -rødøy.no -romskog.no -rømskog.no -roros.no -røros.no -rost.no -røst.no -royken.no -røyken.no -royrvik.no -røyrvik.no -rade.no -råde.no -salangen.no -siellak.no -saltdal.no -salat.no -sálát.no -sálat.no -samnanger.no -sande.more-og-romsdal.no -sande.møre-og-romsdal.no -sande.vestfold.no -sandefjord.no -sandnes.no -sandoy.no -sandøy.no -sarpsborg.no -sauda.no -sauherad.no -sel.no -selbu.no -selje.no -seljord.no -sigdal.no -siljan.no -sirdal.no -skaun.no -skedsmo.no -ski.no -skien.no -skiptvet.no -skjervoy.no -skjervøy.no -skierva.no -skiervá.no -skjak.no -skjåk.no -skodje.no -skanland.no -skånland.no -skanit.no -skánit.no -smola.no -smøla.no -snillfjord.no -snasa.no -snåsa.no -snoasa.no -snaase.no -snåase.no -sogndal.no -sokndal.no -sola.no -solund.no -songdalen.no -sortland.no -spydeberg.no -stange.no -stavanger.no -steigen.no -steinkjer.no -stjordal.no -stjørdal.no -stokke.no -stor-elvdal.no -stord.no -stordal.no -storfjord.no -omasvuotna.no -strand.no -stranda.no -stryn.no -sula.no -suldal.no -sund.no -sunndal.no -surnadal.no -sveio.no -svelvik.no -sykkylven.no -sogne.no -søgne.no -somna.no -sømna.no -sondre-land.no -søndre-land.no -sor-aurdal.no -sør-aurdal.no -sor-fron.no -sør-fron.no -sor-odal.no -sør-odal.no -sor-varanger.no -sør-varanger.no -matta-varjjat.no -mátta-várjjat.no -sorfold.no -sørfold.no -sorreisa.no -sørreisa.no -sorum.no -sørum.no -tana.no -deatnu.no -time.no -tingvoll.no -tinn.no -tjeldsund.no -dielddanuorri.no -tjome.no -tjøme.no -tokke.no -tolga.no -torsken.no -tranoy.no -tranøy.no -tromso.no -tromsø.no -tromsa.no -romsa.no -trondheim.no -troandin.no -trysil.no -trana.no -træna.no -trogstad.no -trøgstad.no -tvedestrand.no -tydal.no -tynset.no -tysfjord.no -divtasvuodna.no -divttasvuotna.no -tysnes.no -tysvar.no -tysvær.no -tonsberg.no -tønsberg.no -ullensaker.no -ullensvang.no -ulvik.no -utsira.no -vadso.no -vadsø.no -cahcesuolo.no -čáhcesuolo.no -vaksdal.no -valle.no -vang.no -vanylven.no -vardo.no -vardø.no -varggat.no -várggát.no -vefsn.no -vaapste.no -vega.no -vegarshei.no -vegårshei.no -vennesla.no -verdal.no -verran.no -vestby.no -vestnes.no -vestre-slidre.no -vestre-toten.no -vestvagoy.no -vestvågøy.no -vevelstad.no -vik.no -vikna.no -vindafjord.no -volda.no -voss.no -varoy.no -værøy.no -vagan.no -vågan.no -voagat.no -vagsoy.no -vågsøy.no -vaga.no -vågå.no -valer.ostfold.no -våler.østfold.no -valer.hedmark.no -våler.hedmark.no - -// np : http://www.mos.com.np/register.html -*.np - -// nr : http://cenpac.net.nr/dns/index.html -// Confirmed by registry <technician@cenpac.net.nr> 2008-06-17 -nr -biz.nr -info.nr -gov.nr -edu.nr -org.nr -net.nr -com.nr - -// nu : http://en.wikipedia.org/wiki/.nu -nu - -// nz : http://en.wikipedia.org/wiki/.nz -*.nz - -// om : http://en.wikipedia.org/wiki/.om -*.om -!mediaphone.om -!nawrastelecom.om -!nawras.om -!omanmobile.om -!omanpost.om -!omantel.om -!rakpetroleum.om -!siemens.om -!songfest.om -!statecouncil.om - -// org : http://en.wikipedia.org/wiki/.org -org - -// pa : http://www.nic.pa/ -// Some additional second level "domains" resolve directly as hostnames, such as -// pannet.pa, so we add a rule for "pa". -pa -ac.pa -gob.pa -com.pa -org.pa -sld.pa -edu.pa -net.pa -ing.pa -abo.pa -med.pa -nom.pa - -// pe : https://www.nic.pe/InformeFinalComision.pdf -pe -edu.pe -gob.pe -nom.pe -mil.pe -org.pe -com.pe -net.pe - -// pf : http://www.gobin.info/domainname/formulaire-pf.pdf -pf -com.pf -org.pf -edu.pf - -// pg : http://en.wikipedia.org/wiki/.pg -*.pg - -// ph : http://www.domains.ph/FAQ2.asp -// Submitted by registry <jed@email.com.ph> 2008-06-13 -ph -com.ph -net.ph -org.ph -gov.ph -edu.ph -ngo.ph -mil.ph -i.ph - -// pk : http://pk5.pknic.net.pk/pk5/msgNamepk.PK -pk -com.pk -net.pk -edu.pk -org.pk -fam.pk -biz.pk -web.pk -gov.pk -gob.pk -gok.pk -gon.pk -gop.pk -gos.pk -info.pk - -// pl : http://www.dns.pl/english/ -pl -// NASK functional domains (nask.pl / dns.pl) : http://www.dns.pl/english/dns-funk.html -aid.pl -agro.pl -atm.pl -auto.pl -biz.pl -com.pl -edu.pl -gmina.pl -gsm.pl -info.pl -mail.pl -miasta.pl -media.pl -mil.pl -net.pl -nieruchomosci.pl -nom.pl -org.pl -pc.pl -powiat.pl -priv.pl -realestate.pl -rel.pl -sex.pl -shop.pl -sklep.pl -sos.pl -szkola.pl -targi.pl -tm.pl -tourism.pl -travel.pl -turystyka.pl -// ICM functional domains (icm.edu.pl) -6bone.pl -art.pl -mbone.pl -// Government domains (administred by ippt.gov.pl) -gov.pl -uw.gov.pl -um.gov.pl -ug.gov.pl -upow.gov.pl -starostwo.gov.pl -so.gov.pl -sr.gov.pl -po.gov.pl -pa.gov.pl -// other functional domains -ngo.pl -irc.pl -usenet.pl -// NASK geographical domains : http://www.dns.pl/english/dns-regiony.html -augustow.pl -babia-gora.pl -bedzin.pl -beskidy.pl -bialowieza.pl -bialystok.pl -bielawa.pl -bieszczady.pl -boleslawiec.pl -bydgoszcz.pl -bytom.pl -cieszyn.pl -czeladz.pl -czest.pl -dlugoleka.pl -elblag.pl -elk.pl -glogow.pl -gniezno.pl -gorlice.pl -grajewo.pl -ilawa.pl -jaworzno.pl -jelenia-gora.pl -jgora.pl -kalisz.pl -kazimierz-dolny.pl -karpacz.pl -kartuzy.pl -kaszuby.pl -katowice.pl -kepno.pl -ketrzyn.pl -klodzko.pl -kobierzyce.pl -kolobrzeg.pl -konin.pl -konskowola.pl -kutno.pl -lapy.pl -lebork.pl -legnica.pl -lezajsk.pl -limanowa.pl -lomza.pl -lowicz.pl -lubin.pl -lukow.pl -malbork.pl -malopolska.pl -mazowsze.pl -mazury.pl -mielec.pl -mielno.pl -mragowo.pl -naklo.pl -nowaruda.pl -nysa.pl -olawa.pl -olecko.pl -olkusz.pl -olsztyn.pl -opoczno.pl -opole.pl -ostroda.pl -ostroleka.pl -ostrowiec.pl -ostrowwlkp.pl -pila.pl -pisz.pl -podhale.pl -podlasie.pl -polkowice.pl -pomorze.pl -pomorskie.pl -prochowice.pl -pruszkow.pl -przeworsk.pl -pulawy.pl -radom.pl -rawa-maz.pl -rybnik.pl -rzeszow.pl -sanok.pl -sejny.pl -siedlce.pl -slask.pl -slupsk.pl -sosnowiec.pl -stalowa-wola.pl -skoczow.pl -starachowice.pl -stargard.pl -suwalki.pl -swidnica.pl -swiebodzin.pl -swinoujscie.pl -szczecin.pl -szczytno.pl -tarnobrzeg.pl -tgory.pl -turek.pl -tychy.pl -ustka.pl -walbrzych.pl -warmia.pl -warszawa.pl -waw.pl -wegrow.pl -wielun.pl -wlocl.pl -wloclawek.pl -wodzislaw.pl -wolomin.pl -wroclaw.pl -zachpomor.pl -zagan.pl -zarow.pl -zgora.pl -zgorzelec.pl -// TASK geographical domains (www.task.gda.pl/uslugi/dns) -gda.pl -gdansk.pl -gdynia.pl -med.pl -sopot.pl -// other geographical domains -gliwice.pl -krakow.pl -poznan.pl -wroc.pl -zakopane.pl - -// pm : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf -pm - -// pn : http://www.government.pn/PnRegistry/policies.htm -pn -gov.pn -co.pn -org.pn -edu.pn -net.pn - -// pr : http://www.nic.pr/index.asp?f=1 -pr -com.pr -net.pr -org.pr -gov.pr -edu.pr -isla.pr -pro.pr -biz.pr -info.pr -name.pr -// these aren't mentioned on nic.pr, but on http://en.wikipedia.org/wiki/.pr -est.pr -prof.pr -ac.pr - -// pro : http://www.nic.pro/support_faq.htm -pro -aca.pro -bar.pro -cpa.pro -jur.pro -law.pro -med.pro -eng.pro - -// ps : http://en.wikipedia.org/wiki/.ps -// http://www.nic.ps/registration/policy.html#reg -ps -edu.ps -gov.ps -sec.ps -plo.ps -com.ps -org.ps -net.ps - -// pt : http://online.dns.pt/dns/start_dns -pt -net.pt -gov.pt -org.pt -edu.pt -int.pt -publ.pt -com.pt -nome.pt - -// pw : http://en.wikipedia.org/wiki/.pw -pw -co.pw -ne.pw -or.pw -ed.pw -go.pw -belau.pw - -// py : http://www.nic.py/faq_a.html#faq_b -*.py - -// qa : http://domains.qa/en/ -qa -com.qa -edu.qa -gov.qa -mil.qa -name.qa -net.qa -org.qa -sch.qa - -// re : http://www.afnic.re/obtenir/chartes/nommage-re/annexe-descriptifs -re -com.re -asso.re -nom.re - -// ro : http://www.rotld.ro/ -ro -com.ro -org.ro -tm.ro -nt.ro -nom.ro -info.ro -rec.ro -arts.ro -firm.ro -store.ro -www.ro - -// rs : http://en.wikipedia.org/wiki/.rs -rs -co.rs -org.rs -edu.rs -ac.rs -gov.rs -in.rs - -// ru : http://www.cctld.ru/ru/docs/aktiv_8.php -// Industry domains -ru -ac.ru -com.ru -edu.ru -int.ru -net.ru -org.ru -pp.ru -// Geographical domains -adygeya.ru -altai.ru -amur.ru -arkhangelsk.ru -astrakhan.ru -bashkiria.ru -belgorod.ru -bir.ru -bryansk.ru -buryatia.ru -cbg.ru -chel.ru -chelyabinsk.ru -chita.ru -chukotka.ru -chuvashia.ru -dagestan.ru -dudinka.ru -e-burg.ru -grozny.ru -irkutsk.ru -ivanovo.ru -izhevsk.ru -jar.ru -joshkar-ola.ru -kalmykia.ru -kaluga.ru -kamchatka.ru -karelia.ru -kazan.ru -kchr.ru -kemerovo.ru -khabarovsk.ru -khakassia.ru -khv.ru -kirov.ru -koenig.ru -komi.ru -kostroma.ru -krasnoyarsk.ru -kuban.ru -kurgan.ru -kursk.ru -lipetsk.ru -magadan.ru -mari.ru -mari-el.ru -marine.ru -mordovia.ru -mosreg.ru -msk.ru -murmansk.ru -nalchik.ru -nnov.ru -nov.ru -novosibirsk.ru -nsk.ru -omsk.ru -orenburg.ru -oryol.ru -palana.ru -penza.ru -perm.ru -pskov.ru -ptz.ru -rnd.ru -ryazan.ru -sakhalin.ru -samara.ru -saratov.ru -simbirsk.ru -smolensk.ru -spb.ru -stavropol.ru -stv.ru -surgut.ru -tambov.ru -tatarstan.ru -tom.ru -tomsk.ru -tsaritsyn.ru -tsk.ru -tula.ru -tuva.ru -tver.ru -tyumen.ru -udm.ru -udmurtia.ru -ulan-ude.ru -vladikavkaz.ru -vladimir.ru -vladivostok.ru -volgograd.ru -vologda.ru -voronezh.ru -vrn.ru -vyatka.ru -yakutia.ru -yamal.ru -yaroslavl.ru -yekaterinburg.ru -yuzhno-sakhalinsk.ru -// More geographical domains -amursk.ru -baikal.ru -cmw.ru -fareast.ru -jamal.ru -kms.ru -k-uralsk.ru -kustanai.ru -kuzbass.ru -magnitka.ru -mytis.ru -nakhodka.ru -nkz.ru -norilsk.ru -oskol.ru -pyatigorsk.ru -rubtsovsk.ru -snz.ru -syzran.ru -vdonsk.ru -zgrad.ru -// State domains -gov.ru -mil.ru -// Technical domains -test.ru - -// rw : http://www.nic.rw/cgi-bin/policy.pl -rw -gov.rw -net.rw -edu.rw -ac.rw -com.rw -co.rw -int.rw -mil.rw -gouv.rw - -// sa : http://www.nic.net.sa/ -sa -com.sa -net.sa -org.sa -gov.sa -med.sa -pub.sa -edu.sa -sch.sa - -// sb : http://www.sbnic.net.sb/ -// Submitted by registry <lee.humphries@telekom.com.sb> 2008-06-08 -sb -com.sb -edu.sb -gov.sb -net.sb -org.sb - -// sc : http://www.nic.sc/ -sc -com.sc -gov.sc -net.sc -org.sc -edu.sc - -// sd : http://www.isoc.sd/sudanic.isoc.sd/billing_pricing.htm -// Submitted by registry <admin@isoc.sd> 2008-06-17 -sd -com.sd -net.sd -org.sd -edu.sd -med.sd -gov.sd -info.sd - -// se : http://en.wikipedia.org/wiki/.se -// Submitted by registry <Patrik.Wallstrom@iis.se> 2008-06-24 -se -a.se -ac.se -b.se -bd.se -brand.se -c.se -d.se -e.se -f.se -fh.se -fhsk.se -fhv.se -g.se -h.se -i.se -k.se -komforb.se -kommunalforbund.se -komvux.se -l.se -lanbib.se -m.se -n.se -naturbruksgymn.se -o.se -org.se -p.se -parti.se -pp.se -press.se -r.se -s.se -sshn.se -t.se -tm.se -u.se -w.se -x.se -y.se -z.se - -// sg : http://www.nic.net.sg/sub_policies_agreement/2ld.html -sg -com.sg -net.sg -org.sg -gov.sg -edu.sg -per.sg - -// sh : http://www.nic.sh/rules.html -// list of 2nd level domains ? -sh - -// si : http://en.wikipedia.org/wiki/.si -si - -// sj : No registrations at this time. -// Submitted by registry <jarle@uninett.no> 2008-06-16 - -// sk : http://en.wikipedia.org/wiki/.sk -// list of 2nd level domains ? -sk - -// sl : http://www.nic.sl -// Submitted by registry <adam@neoip.com> 2008-06-12 -sl -com.sl -net.sl -edu.sl -gov.sl -org.sl - -// sm : http://en.wikipedia.org/wiki/.sm -sm - -// sn : http://en.wikipedia.org/wiki/.sn -sn -art.sn -com.sn -edu.sn -gouv.sn -org.sn -perso.sn -univ.sn - -// so : http://www.soregistry.com/ -so -com.so -net.so -org.so - -// sr : http://en.wikipedia.org/wiki/.sr -sr - -// st : http://www.nic.st/html/policyrules/ -st -co.st -com.st -consulado.st -edu.st -embaixada.st -gov.st -mil.st -net.st -org.st -principe.st -saotome.st -store.st - -// su : http://en.wikipedia.org/wiki/.su -su - -// sv : http://www.svnet.org.sv/svpolicy.html -*.sv - -// sy : http://en.wikipedia.org/wiki/.sy -// see also: http://www.gobin.info/domainname/sy.doc -sy -edu.sy -gov.sy -net.sy -mil.sy -com.sy -org.sy - -// sz : http://en.wikipedia.org/wiki/.sz -// http://www.sispa.org.sz/ -sz -co.sz -ac.sz -org.sz - -// tc : http://en.wikipedia.org/wiki/.tc -tc - -// td : http://en.wikipedia.org/wiki/.td -td - -// tel: http://en.wikipedia.org/wiki/.tel -// http://www.telnic.org/ -tel - -// tf : http://en.wikipedia.org/wiki/.tf -tf - -// tg : http://en.wikipedia.org/wiki/.tg -// http://www.nic.tg/nictg/index.php implies no reserved 2nd-level domains, -// although this contradicts wikipedia. -tg - -// th : http://en.wikipedia.org/wiki/.th -// Submitted by registry <krit@thains.co.th> 2008-06-17 -th -ac.th -co.th -go.th -in.th -mi.th -net.th -or.th - -// tj : http://www.nic.tj/policy.htm -tj -ac.tj -biz.tj -co.tj -com.tj -edu.tj -go.tj -gov.tj -int.tj -mil.tj -name.tj -net.tj -nic.tj -org.tj -test.tj -web.tj - -// tk : http://en.wikipedia.org/wiki/.tk -tk - -// tl : http://en.wikipedia.org/wiki/.tl -tl -gov.tl - -// tm : http://www.nic.tm/rules.html -// list of 2nd level tlds ? -tm - -// tn : http://en.wikipedia.org/wiki/.tn -// http://whois.ati.tn/ -tn -com.tn -ens.tn -fin.tn -gov.tn -ind.tn -intl.tn -nat.tn -net.tn -org.tn -info.tn -perso.tn -tourism.tn -edunet.tn -rnrt.tn -rns.tn -rnu.tn -mincom.tn -agrinet.tn -defense.tn -turen.tn - -// to : http://en.wikipedia.org/wiki/.to -// Submitted by registry <egullich@colo.to> 2008-06-17 -to -com.to -gov.to -net.to -org.to -edu.to -mil.to - -// tr : http://en.wikipedia.org/wiki/.tr -*.tr -!nic.tr -// Used by government in the TRNC -// http://en.wikipedia.org/wiki/.nc.tr -gov.nc.tr - -// travel : http://en.wikipedia.org/wiki/.travel -travel - -// tt : http://www.nic.tt/ -tt -co.tt -com.tt -org.tt -net.tt -biz.tt -info.tt -pro.tt -int.tt -coop.tt -jobs.tt -mobi.tt -travel.tt -museum.tt -aero.tt -name.tt -gov.tt -edu.tt - -// tv : http://en.wikipedia.org/wiki/.tv -// Not listing any 2LDs as reserved since none seem to exist in practice, -// Wikipedia notwithstanding. -tv - -// tw : http://en.wikipedia.org/wiki/.tw -tw -edu.tw -gov.tw -mil.tw -com.tw -net.tw -org.tw -idv.tw -game.tw -ebiz.tw -club.tw -網路.tw -組織.tw -商業.tw - -// tz : http://en.wikipedia.org/wiki/.tz -// Submitted by registry <randy@psg.com> 2008-06-17 -// Updated from http://www.tznic.or.tz/index.php/domains.html 2010-10-25 -ac.tz -co.tz -go.tz -mil.tz -ne.tz -or.tz -sc.tz - -// ua : http://www.nic.net.ua/ -ua -com.ua -edu.ua -gov.ua -in.ua -net.ua -org.ua -// ua geo-names -cherkassy.ua -chernigov.ua -chernovtsy.ua -ck.ua -cn.ua -crimea.ua -cv.ua -dn.ua -dnepropetrovsk.ua -donetsk.ua -dp.ua -if.ua -ivano-frankivsk.ua -kh.ua -kharkov.ua -kherson.ua -khmelnitskiy.ua -kiev.ua -kirovograd.ua -km.ua -kr.ua -ks.ua -kv.ua -lg.ua -lugansk.ua -lutsk.ua -lviv.ua -mk.ua -nikolaev.ua -od.ua -odessa.ua -pl.ua -poltava.ua -rovno.ua -rv.ua -sebastopol.ua -sumy.ua -te.ua -ternopil.ua -uzhgorod.ua -vinnica.ua -vn.ua -zaporizhzhe.ua -zp.ua -zhitomir.ua -zt.ua - -// Private registries in .ua -co.ua -pp.ua - -// ug : http://www.registry.co.ug/ -ug -co.ug -ac.ug -sc.ug -go.ug -ne.ug -or.ug - -// uk : http://en.wikipedia.org/wiki/.uk -*.uk -*.sch.uk -!bl.uk -!british-library.uk -!icnet.uk -!jet.uk -!mod.uk -!nel.uk -!nhs.uk -!nic.uk -!nls.uk -!national-library-scotland.uk -!parliament.uk -!police.uk - -// us : http://en.wikipedia.org/wiki/.us -us -dni.us -fed.us -isa.us -kids.us -nsn.us -// us geographic names -ak.us -al.us -ar.us -as.us -az.us -ca.us -co.us -ct.us -dc.us -de.us -fl.us -ga.us -gu.us -hi.us -ia.us -id.us -il.us -in.us -ks.us -ky.us -la.us -ma.us -md.us -me.us -mi.us -mn.us -mo.us -ms.us -mt.us -nc.us -nd.us -ne.us -nh.us -nj.us -nm.us -nv.us -ny.us -oh.us -ok.us -or.us -pa.us -pr.us -ri.us -sc.us -sd.us -tn.us -tx.us -ut.us -vi.us -vt.us -va.us -wa.us -wi.us -wv.us -wy.us -// The registrar notes several more specific domains available in each state, -// such as state.*.us, dst.*.us, etc., but resolution of these is somewhat -// haphazard; in some states these domains resolve as addresses, while in others -// only subdomains are available, or even nothing at all. We include the -// most common ones where it's clear that different sites are different -// entities. -k12.ak.us -k12.al.us -k12.ar.us -k12.as.us -k12.az.us -k12.ca.us -k12.co.us -k12.ct.us -k12.dc.us -k12.de.us -k12.fl.us -k12.ga.us -k12.gu.us -// k12.hi.us Hawaii has a state-wide DOE login: bug 614565 -k12.ia.us -k12.id.us -k12.il.us -k12.in.us -k12.ks.us -k12.ky.us -k12.la.us -k12.ma.us -k12.md.us -k12.me.us -k12.mi.us -k12.mn.us -k12.mo.us -k12.ms.us -k12.mt.us -k12.nc.us -k12.nd.us -k12.ne.us -k12.nh.us -k12.nj.us -k12.nm.us -k12.nv.us -k12.ny.us -k12.oh.us -k12.ok.us -k12.or.us -k12.pa.us -k12.pr.us -k12.ri.us -k12.sc.us -k12.sd.us -k12.tn.us -k12.tx.us -k12.ut.us -k12.vi.us -k12.vt.us -k12.va.us -k12.wa.us -k12.wi.us -k12.wv.us -k12.wy.us - -cc.ak.us -cc.al.us -cc.ar.us -cc.as.us -cc.az.us -cc.ca.us -cc.co.us -cc.ct.us -cc.dc.us -cc.de.us -cc.fl.us -cc.ga.us -cc.gu.us -cc.hi.us -cc.ia.us -cc.id.us -cc.il.us -cc.in.us -cc.ks.us -cc.ky.us -cc.la.us -cc.ma.us -cc.md.us -cc.me.us -cc.mi.us -cc.mn.us -cc.mo.us -cc.ms.us -cc.mt.us -cc.nc.us -cc.nd.us -cc.ne.us -cc.nh.us -cc.nj.us -cc.nm.us -cc.nv.us -cc.ny.us -cc.oh.us -cc.ok.us -cc.or.us -cc.pa.us -cc.pr.us -cc.ri.us -cc.sc.us -cc.sd.us -cc.tn.us -cc.tx.us -cc.ut.us -cc.vi.us -cc.vt.us -cc.va.us -cc.wa.us -cc.wi.us -cc.wv.us -cc.wy.us - -lib.ak.us -lib.al.us -lib.ar.us -lib.as.us -lib.az.us -lib.ca.us -lib.co.us -lib.ct.us -lib.dc.us -lib.de.us -lib.fl.us -lib.ga.us -lib.gu.us -lib.hi.us -lib.ia.us -lib.id.us -lib.il.us -lib.in.us -lib.ks.us -lib.ky.us -lib.la.us -lib.ma.us -lib.md.us -lib.me.us -lib.mi.us -lib.mn.us -lib.mo.us -lib.ms.us -lib.mt.us -lib.nc.us -lib.nd.us -lib.ne.us -lib.nh.us -lib.nj.us -lib.nm.us -lib.nv.us -lib.ny.us -lib.oh.us -lib.ok.us -lib.or.us -lib.pa.us -lib.pr.us -lib.ri.us -lib.sc.us -lib.sd.us -lib.tn.us -lib.tx.us -lib.ut.us -lib.vi.us -lib.vt.us -lib.va.us -lib.wa.us -lib.wi.us -lib.wv.us -lib.wy.us - -// k12.ma.us contains school districts in Massachusetts. The 4LDs are -// managed indepedently except for private (PVT), charter (CHTR) and -// parochial (PAROCH) schools. Those are delegated dorectly to the -// 5LD operators. <k12-ma-hostmaster _ at _ rsuc.gweep.net> -pvt.k12.ma.us -chtr.k12.ma.us -paroch.k12.ma.us - -// uy : http://www.antel.com.uy/ -*.uy - -// uz : http://www.reg.uz/registerr.html -// are there other 2nd level tlds ? -uz -com.uz -co.uz - -// va : http://en.wikipedia.org/wiki/.va -va - -// vc : http://en.wikipedia.org/wiki/.vc -// Submitted by registry <kshah@ca.afilias.info> 2008-06-13 -vc -com.vc -net.vc -org.vc -gov.vc -mil.vc -edu.vc - -// ve : http://registro.nic.ve/nicve/registro/index.html -*.ve - -// vg : http://en.wikipedia.org/wiki/.vg -vg - -// vi : http://www.nic.vi/newdomainform.htm -// http://www.nic.vi/Domain_Rules/body_domain_rules.html indicates some other -// TLDs are "reserved", such as edu.vi and gov.vi, but doesn't actually say they -// are available for registration (which they do not seem to be). -vi -co.vi -com.vi -k12.vi -net.vi -org.vi - -// vn : https://www.dot.vn/vnnic/vnnic/domainregistration.jsp -vn -com.vn -net.vn -org.vn -edu.vn -gov.vn -int.vn -ac.vn -biz.vn -info.vn -name.vn -pro.vn -health.vn - -// vu : http://en.wikipedia.org/wiki/.vu -// list of 2nd level tlds ? -vu - -// wf : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf -wf - -// ws : http://en.wikipedia.org/wiki/.ws -// http://samoanic.ws/index.dhtml -ws -com.ws -net.ws -org.ws -gov.ws -edu.ws - -// yt : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf -yt - -// IDN ccTLDs -// Please sort by ISO 3166 ccTLD, then punicode string -// when submitting patches and follow this format: -// <Punicode> ("<english word>" <language>) : <ISO 3166 ccTLD> -// [optional sponsoring org] -// <URL> - -// xn--mgbaam7a8h ("Emerat" Arabic) : AE -//http://nic.ae/english/arabicdomain/rules.jsp -امارات - -// xn--54b7fta0cc ("Bangla" Bangla) : BD -বাংলা - -// xn--fiqs8s ("China" Chinese-Han-Simplified <.Zhonggou>) : CN -// CNNIC -// http://cnnic.cn/html/Dir/2005/10/11/3218.htm -中国 - -// xn--fiqz9s ("China" Chinese-Han-Traditional <.Zhonggou>) : CN -// CNNIC -// http://cnnic.cn/html/Dir/2005/10/11/3218.htm -中國 - -// xn--lgbbat1ad8j ("Algeria / Al Jazair" Arabic) : DZ -الجزائر - -// xn--wgbh1c ("Egypt" Arabic .masr) : EG -// http://www.dotmasr.eg/ -مصر - -// xn--node ("ge" Georgian (Mkhedruli)) : GE -გე - -// xn--j6w193g ("Hong Kong" Chinese-Han) : HK -// https://www2.hkirc.hk/register/rules.jsp -香港 - -// xn--h2brj9c ("Bharat" Devanagari) : IN -// India -भारत - -// xn--mgbbh1a71e ("Bharat" Arabic) : IN -// India -بھارت - -// xn--fpcrj9c3d ("Bharat" Telugu) : IN -// India -భారత్ - -// xn--gecrj9c ("Bharat" Gujarati) : IN -// India -ભારત - -// xn--s9brj9c ("Bharat" Gurmukhi) : IN -// India -ਭਾਰਤ - -// xn--45brj9c ("Bharat" Bengali) : IN -// India -ভারত - -// xn--xkc2dl3a5ee0h ("India" Tamil) : IN -// India -இந்தியா - -// xn--mgba3a4f16a ("Iran" Persian) : IR -ایران - -// xn--mgba3a4fra ("Iran" Arabic) : IR -ايران - -//xn--mgbayh7gpa ("al-Ordon" Arabic) JO -//National Information Technology Center (NITC) -//Royal Scientific Society, Al-Jubeiha -الاردن - -// xn--3e0b707e ("Republic of Korea" Hangul) : KR -한국 - -// xn--fzc2c9e2c ("Lanka" Sinhalese-Sinhala) : LK -// http://nic.lk -ලංකා - -// xn--xkc2al3hye2a ("Ilangai" Tamil) : LK -// http://nic.lk -இலங்கை - -// xn--mgbc0a9azcg ("Morocco / al-Maghrib" Arabic) : MA -المغرب - -// xn--mgb9awbf ("Oman" Arabic) : OM -عمان - -// xn--ygbi2ammx ("Falasteen" Arabic) : PS -// The Palestinian National Internet Naming Authority (PNINA) -// http://www.pnina.ps -فلسطين - -// xn--90a3ac ("srb" Cyrillic) : RS -срб - -// xn--p1ai ("rf" Russian-Cyrillic) : RU -// http://www.cctld.ru/en/docs/rulesrf.php -рф - -// xn--wgbl6a ("Qatar" Arabic) : QA -// http://www.ict.gov.qa/ -قطر - -// xn--mgberp4a5d4ar ("AlSaudiah" Arabic) : SA -// http://www.nic.net.sa/ -السعودية - -// xn--mgberp4a5d4a87g ("AlSaudiah" Arabic) variant : SA -السعودیة - -// xn--mgbqly7c0a67fbc ("AlSaudiah" Arabic) variant : SA -السعودیۃ - -// xn--mgbqly7cvafr ("AlSaudiah" Arabic) variant : SA -السعوديه - -// xn--ogbpf8fl ("Syria" Arabic) : SY -سورية - -// xn--mgbtf8fl ("Syria" Arabic) variant : SY -سوريا - -// xn--yfro4i67o Singapore ("Singapore" Chinese-Han) : SG -新加坡 - -// xn--clchc0ea0b2g2a9gcd ("Singapore" Tamil) : SG -சிங்கப்பூர் - -// xn--o3cw4h ("Thai" Thai) : TH -// http://www.thnic.co.th -ไทย - -// xn--pgbs0dh ("Tunis") : TN -// http://nic.tn -تونس - -// xn--kpry57d ("Taiwan" Chinese-Han-Traditional) : TW -// http://www.twnic.net/english/dn/dn_07a.htm -台灣 - -// xn--kprw13d ("Taiwan" Chinese-Han-Simplified) : TW -// http://www.twnic.net/english/dn/dn_07a.htm -台湾 - -// xn--nnx388a ("Taiwan") variant : TW -臺灣 - -// xn--j1amh ("ukr" Cyrillic) : UA -укр - -// xn--mgb2ddes ("AlYemen" Arabic) : YE -اليمن - -// xxx : http://icmregistry.com -xxx - -// ye : http://www.y.net.ye/services/domain_name.htm -*.ye - -// za : http://www.zadna.org.za/slds.html -*.za - -// zm : http://en.wikipedia.org/wiki/.zm -*.zm - -// zw : http://en.wikipedia.org/wiki/.zw -*.zw - -// ===END ICANN DOMAINS=== -// ===BEGIN PRIVATE DOMAINS=== - -// info.at : http://www.info.at/ -biz.at -info.at - -// priv.at : http://www.nic.priv.at/ -// Submitted by registry <lendl@nic.at> 2008-06-09 -priv.at - -// co.ca : http://registry.co.ca -co.ca - -// CentralNic : http://www.centralnic.com/names/domains -// Confirmed by registry <gavin.brown@centralnic.com> 2008-06-09 -ar.com -br.com -cn.com -de.com -eu.com -gb.com -gr.com -hu.com -jpn.com -kr.com -no.com -qc.com -ru.com -sa.com -se.com -uk.com -us.com -uy.com -za.com -gb.net -jp.net -se.net -uk.net -ae.org -us.org -com.de - -// Opera Software, A.S.A. -// Requested by Yngve Pettersen <yngve@opera.com> 2009-11-26 -operaunite.com - -// Google, Inc. -// Requested by Eduardo Vela <evn@google.com> 2010-09-06 -appspot.com - -// iki.fi : Submitted by Hannu Aronsson <haa@iki.fi> 2009-11-05 -iki.fi - -// c.la : http://www.c.la/ -c.la - -// ZaNiC : http://www.za.net/ -// Confirmed by registry <hostmaster@nic.za.net> 2009-10-03 -za.net -za.org - -// CoDNS B.V. -// Added 2010-05-23. -co.nl -co.no - -// Mainseek Sp. z o.o. : http://www.co.pl/ -co.pl - -// DynDNS.com : http://www.dyndns.com/services/dns/dyndns/ -dyndns-at-home.com -dyndns-at-work.com -dyndns-blog.com -dyndns-free.com -dyndns-home.com -dyndns-ip.com -dyndns-mail.com -dyndns-office.com -dyndns-pics.com -dyndns-remote.com -dyndns-server.com -dyndns-web.com -dyndns-wiki.com -dyndns-work.com -dyndns.biz -dyndns.info -dyndns.org -dyndns.tv -at-band-camp.net -ath.cx -barrel-of-knowledge.info -barrell-of-knowledge.info -better-than.tv -blogdns.com -blogdns.net -blogdns.org -blogsite.org -boldlygoingnowhere.org -broke-it.net -buyshouses.net -cechire.com -dnsalias.com -dnsalias.net -dnsalias.org -dnsdojo.com -dnsdojo.net -dnsdojo.org -does-it.net -doesntexist.com -doesntexist.org -dontexist.com -dontexist.net -dontexist.org -doomdns.com -doomdns.org -dvrdns.org -dyn-o-saur.com -dynalias.com -dynalias.net -dynalias.org -dynathome.net -dyndns.ws -endofinternet.net -endofinternet.org -endoftheinternet.org -est-a-la-maison.com -est-a-la-masion.com -est-le-patron.com -est-mon-blogueur.com -for-better.biz -for-more.biz -for-our.info -for-some.biz -for-the.biz -forgot.her.name -forgot.his.name -from-ak.com -from-al.com -from-ar.com -from-az.net -from-ca.com -from-co.net -from-ct.com -from-dc.com -from-de.com -from-fl.com -from-ga.com -from-hi.com -from-ia.com -from-id.com -from-il.com -from-in.com -from-ks.com -from-ky.com -from-la.net -from-ma.com -from-md.com -from-me.org -from-mi.com -from-mn.com -from-mo.com -from-ms.com -from-mt.com -from-nc.com -from-nd.com -from-ne.com -from-nh.com -from-nj.com -from-nm.com -from-nv.com -from-ny.net -from-oh.com -from-ok.com -from-or.com -from-pa.com -from-pr.com -from-ri.com -from-sc.com -from-sd.com -from-tn.com -from-tx.com -from-ut.com -from-va.com -from-vt.com -from-wa.com -from-wi.com -from-wv.com -from-wy.com -ftpaccess.cc -fuettertdasnetz.de -game-host.org -game-server.cc -getmyip.com -gets-it.net -go.dyndns.org -gotdns.com -gotdns.org -groks-the.info -groks-this.info -ham-radio-op.net -here-for-more.info -hobby-site.com -hobby-site.org -home.dyndns.org -homedns.org -homeftp.net -homeftp.org -homeip.net -homelinux.com -homelinux.net -homelinux.org -homeunix.com -homeunix.net -homeunix.org -iamallama.com -in-the-band.net -is-a-anarchist.com -is-a-blogger.com -is-a-bookkeeper.com -is-a-bruinsfan.org -is-a-bulls-fan.com -is-a-candidate.org -is-a-caterer.com -is-a-celticsfan.org -is-a-chef.com -is-a-chef.net -is-a-chef.org -is-a-conservative.com -is-a-cpa.com -is-a-cubicle-slave.com -is-a-democrat.com -is-a-designer.com -is-a-doctor.com -is-a-financialadvisor.com -is-a-geek.com -is-a-geek.net -is-a-geek.org -is-a-green.com -is-a-guru.com -is-a-hard-worker.com -is-a-hunter.com -is-a-knight.org -is-a-landscaper.com -is-a-lawyer.com -is-a-liberal.com -is-a-libertarian.com -is-a-linux-user.org -is-a-llama.com -is-a-musician.com -is-a-nascarfan.com -is-a-nurse.com -is-a-painter.com -is-a-patsfan.org -is-a-personaltrainer.com -is-a-photographer.com -is-a-player.com -is-a-republican.com -is-a-rockstar.com -is-a-socialist.com -is-a-soxfan.org -is-a-student.com -is-a-teacher.com -is-a-techie.com -is-a-therapist.com -is-an-accountant.com -is-an-actor.com -is-an-actress.com -is-an-anarchist.com -is-an-artist.com -is-an-engineer.com -is-an-entertainer.com -is-by.us -is-certified.com -is-found.org -is-gone.com -is-into-anime.com -is-into-cars.com -is-into-cartoons.com -is-into-games.com -is-leet.com -is-lost.org -is-not-certified.com -is-saved.org -is-slick.com -is-uberleet.com -is-very-bad.org -is-very-evil.org -is-very-good.org -is-very-nice.org -is-very-sweet.org -is-with-theband.com -isa-geek.com -isa-geek.net -isa-geek.org -isa-hockeynut.com -issmarterthanyou.com -isteingeek.de -istmein.de -kicks-ass.net -kicks-ass.org -knowsitall.info -land-4-sale.us -lebtimnetz.de -leitungsen.de -likes-pie.com -likescandy.com -merseine.nu -mine.nu -misconfused.org -mypets.ws -myphotos.cc -neat-url.com -office-on-the.net -on-the-web.tv -podzone.net -podzone.org -readmyblog.org -saves-the-whales.com -scrapper-site.net -scrapping.cc -selfip.biz -selfip.com -selfip.info -selfip.net -selfip.org -sells-for-less.com -sells-for-u.com -sells-it.net -sellsyourhome.org -servebbs.com -servebbs.net -servebbs.org -serveftp.net -serveftp.org -servegame.org -shacknet.nu -simple-url.com -space-to-rent.com -stuff-4-sale.org -stuff-4-sale.us -teaches-yoga.com -thruhere.net -traeumtgerade.de -webhop.biz -webhop.info -webhop.net -webhop.org -worse-than.tv -writesthisblog.com - -// ===END PRIVATE DOMAINS=== diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/test.js deleted file mode 100644 index 3cce815e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/test.js +++ /dev/null @@ -1,1340 +0,0 @@ -/* - * Copyright GoInstant, Inc. and other contributors. All rights reserved. - * 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. - */ - -var vows = require('vows'); -var assert = require('assert'); -var async = require('async'); - -// NOTE use require("tough-cookie") in your own code: -var tough = require('./lib/cookie'); -var Cookie = tough.Cookie; -var CookieJar = tough.CookieJar; - - -function dateVows(table) { - var theVows = { }; - var keys = Object.keys(table).forEach(function(date) { - var expect = table[date]; - theVows[date] = function() { - var got = tough.parseDate(date) ? 'valid' : 'invalid'; - assert.equal(got, expect ? 'valid' : 'invalid'); - }; - }); - return { "date parsing": theVows }; -} - -function matchVows(func,table) { - var theVows = {}; - table.forEach(function(item) { - var str = item[0]; - var dom = item[1]; - var expect = item[2]; - var label = str+(expect?" matches ":" doesn't match ")+dom; - theVows[label] = function() { - assert.equal(func(str,dom),expect); - }; - }); - return theVows; -} - -function defaultPathVows(table) { - var theVows = {}; - table.forEach(function(item) { - var str = item[0]; - var expect = item[1]; - var label = str+" gives "+expect; - theVows[label] = function() { - assert.equal(tough.defaultPath(str),expect); - }; - }); - return theVows; -} - -var atNow = Date.now(); -function at(offset) { return {now: new Date(atNow+offset)} } - -vows.describe('Cookie Jar') -.addBatch({ - "all defined": function() { - assert.ok(Cookie); - assert.ok(CookieJar); - }, -}) -.addBatch( - dateVows({ - "Wed, 09 Jun 2021 10:18:14 GMT": true, - "Wed, 09 Jun 2021 22:18:14 GMT": true, - "Tue, 18 Oct 2011 07:42:42.123 GMT": true, - "18 Oct 2011 07:42:42 GMT": true, - "8 Oct 2011 7:42:42 GMT": true, - "8 Oct 2011 7:2:42 GMT": false, - "Oct 18 2011 07:42:42 GMT": true, - "Tue Oct 18 2011 07:05:03 GMT+0000 (GMT)": true, - "09 Jun 2021 10:18:14 GMT": true, - "99 Jix 3038 48:86:72 ZMT": false, - '01 Jan 1970 00:00:00 GMT': true, - '01 Jan 1600 00:00:00 GMT': false, // before 1601 - '01 Jan 1601 00:00:00 GMT': true, - '10 Feb 81 13:00:00 GMT': true, // implicit year - 'Thu, 01 Jan 1970 00:00:010 GMT': true, // strange time, non-strict OK - 'Thu, 17-Apr-2014 02:12:29 GMT': true, // dashes - 'Thu, 17-Apr-2014 02:12:29 UTC': true, // dashes and UTC - }) -) -.addBatch({ - "strict date parse of Thu, 01 Jan 1970 00:00:010 GMT": { - topic: function() { - return tough.parseDate('Thu, 01 Jan 1970 00:00:010 GMT', true) ? true : false; - }, - "invalid": function(date) { - assert.equal(date,false); - }, - } -}) -.addBatch({ - "formatting": { - "a simple cookie": { - topic: function() { - var c = new Cookie(); - c.key = 'a'; - c.value = 'b'; - return c; - }, - "validates": function(c) { - assert.ok(c.validate()); - }, - "to string": function(c) { - assert.equal(c.toString(), 'a=b'); - }, - }, - "a cookie with spaces in the value": { - topic: function() { - var c = new Cookie(); - c.key = 'a'; - c.value = 'beta gamma'; - return c; - }, - "doesn't validate": function(c) { - assert.ok(!c.validate()); - }, - "to string": function(c) { - assert.equal(c.toString(), 'a="beta gamma"'); - }, - }, - "with an empty value and HttpOnly": { - topic: function() { - var c = new Cookie(); - c.key = 'a'; - c.httpOnly = true; - return c; - }, - "to string": function(c) { - assert.equal(c.toString(), 'a=; HttpOnly'); - } - }, - "with an expiry": { - topic: function() { - var c = new Cookie(); - c.key = 'a'; - c.value = 'b'; - c.setExpires("Oct 18 2011 07:05:03 GMT"); - return c; - }, - "validates": function(c) { - assert.ok(c.validate()); - }, - "to string": function(c) { - assert.equal(c.toString(), 'a=b; Expires=Tue, 18 Oct 2011 07:05:03 GMT'); - }, - "to short string": function(c) { - assert.equal(c.cookieString(), 'a=b'); - }, - }, - "with a max-age": { - topic: function() { - var c = new Cookie(); - c.key = 'a'; - c.value = 'b'; - c.setExpires("Oct 18 2011 07:05:03 GMT"); - c.maxAge = 12345; - return c; - }, - "validates": function(c) { - assert.ok(c.validate()); // mabe this one *shouldn't*? - }, - "to string": function(c) { - assert.equal(c.toString(), 'a=b; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Max-Age=12345'); - }, - }, - "with a bunch of things": function() { - var c = new Cookie(); - c.key = 'a'; - c.value = 'b'; - c.setExpires("Oct 18 2011 07:05:03 GMT"); - c.maxAge = 12345; - c.domain = 'example.com'; - c.path = '/foo'; - c.secure = true; - c.httpOnly = true; - c.extensions = ['MyExtension']; - assert.equal(c.toString(), 'a=b; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Max-Age=12345; Domain=example.com; Path=/foo; Secure; HttpOnly; MyExtension'); - }, - "a host-only cookie": { - topic: function() { - var c = new Cookie(); - c.key = 'a'; - c.value = 'b'; - c.hostOnly = true; - c.domain = 'shouldnt-stringify.example.com'; - c.path = '/should-stringify'; - return c; - }, - "validates": function(c) { - assert.ok(c.validate()); - }, - "to string": function(c) { - assert.equal(c.toString(), 'a=b; Path=/should-stringify'); - }, - }, - "minutes are '10'": { - topic: function() { - var c = new Cookie(); - c.key = 'a'; - c.value = 'b'; - c.expires = new Date(1284113410000); - return c; - }, - "validates": function(c) { - assert.ok(c.validate()); - }, - "to string": function(c) { - var str = c.toString(); - assert.notEqual(str, 'a=b; Expires=Fri, 010 Sep 2010 010:010:010 GMT'); - assert.equal(str, 'a=b; Expires=Fri, 10 Sep 2010 10:10:10 GMT'); - }, - } - } -}) -.addBatch({ - "TTL with max-age": function() { - var c = new Cookie(); - c.maxAge = 123; - assert.equal(c.TTL(), 123000); - assert.equal(c.expiryTime(new Date(9000000)), 9123000); - }, - "TTL with zero max-age": function() { - var c = new Cookie(); - c.key = 'a'; c.value = 'b'; - c.maxAge = 0; // should be treated as "earliest representable" - assert.equal(c.TTL(), 0); - assert.equal(c.expiryTime(new Date(9000000)), -Infinity); - assert.ok(!c.validate()); // not valid, really: non-zero-digit *DIGIT - }, - "TTL with negative max-age": function() { - var c = new Cookie(); - c.key = 'a'; c.value = 'b'; - c.maxAge = -1; // should be treated as "earliest representable" - assert.equal(c.TTL(), 0); - assert.equal(c.expiryTime(new Date(9000000)), -Infinity); - assert.ok(!c.validate()); // not valid, really: non-zero-digit *DIGIT - }, - "TTL with max-age and expires": function() { - var c = new Cookie(); - c.maxAge = 123; - c.expires = new Date(Date.now()+9000); - assert.equal(c.TTL(), 123000); - assert.ok(c.isPersistent()); - }, - "TTL with expires": function() { - var c = new Cookie(); - var now = Date.now(); - c.expires = new Date(now+9000); - assert.equal(c.TTL(now), 9000); - assert.equal(c.expiryTime(), c.expires.getTime()); - }, - "TTL with old expires": function() { - var c = new Cookie(); - c.setExpires('17 Oct 2010 00:00:00 GMT'); - assert.ok(c.TTL() < 0); - assert.ok(c.isPersistent()); - }, - "default TTL": { - topic: function() { return new Cookie() }, - "is Infinite-future": function(c) { assert.equal(c.TTL(), Infinity) }, - "is a 'session' cookie": function(c) { assert.ok(!c.isPersistent()) }, - }, -}).addBatch({ - "Parsing": { - "simple": { - topic: function() { - return Cookie.parse('a=bcd',true) || null; - }, - "parsed": function(c) { assert.ok(c) }, - "key": function(c) { assert.equal(c.key, 'a') }, - "value": function(c) { assert.equal(c.value, 'bcd') }, - "no path": function(c) { assert.equal(c.path, null) }, - "no domain": function(c) { assert.equal(c.domain, null) }, - "no extensions": function(c) { assert.ok(!c.extensions) }, - }, - "with expiry": { - topic: function() { - return Cookie.parse('a=bcd; Expires=Tue, 18 Oct 2011 07:05:03 GMT',true) || null; - }, - "parsed": function(c) { assert.ok(c) }, - "key": function(c) { assert.equal(c.key, 'a') }, - "value": function(c) { assert.equal(c.value, 'bcd') }, - "has expires": function(c) { - assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be'); - assert.equal(c.expires.getTime(), 1318921503000); - }, - }, - "with expiry and path": { - topic: function() { - return Cookie.parse('abc="xyzzy!"; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Path=/aBc',true) || null; - }, - "parsed": function(c) { assert.ok(c) }, - "key": function(c) { assert.equal(c.key, 'abc') }, - "value": function(c) { assert.equal(c.value, 'xyzzy!') }, - "has expires": function(c) { - assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be'); - assert.equal(c.expires.getTime(), 1318921503000); - }, - "has path": function(c) { assert.equal(c.path, '/aBc'); }, - "no httponly or secure": function(c) { - assert.ok(!c.httpOnly); - assert.ok(!c.secure); - }, - }, - "with everything": { - topic: function() { - return Cookie.parse('abc="xyzzy!"; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Path=/aBc; Domain=example.com; Secure; HTTPOnly; Max-Age=1234; Foo=Bar; Baz', true) || null; - }, - "parsed": function(c) { assert.ok(c) }, - "key": function(c) { assert.equal(c.key, 'abc') }, - "value": function(c) { assert.equal(c.value, 'xyzzy!') }, - "has expires": function(c) { - assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be'); - assert.equal(c.expires.getTime(), 1318921503000); - }, - "has path": function(c) { assert.equal(c.path, '/aBc'); }, - "has domain": function(c) { assert.equal(c.domain, 'example.com'); }, - "has httponly": function(c) { assert.equal(c.httpOnly, true); }, - "has secure": function(c) { assert.equal(c.secure, true); }, - "has max-age": function(c) { assert.equal(c.maxAge, 1234); }, - "has extensions": function(c) { - assert.ok(c.extensions); - assert.equal(c.extensions[0], 'Foo=Bar'); - assert.equal(c.extensions[1], 'Baz'); - }, - }, - "invalid expires": { - "strict": function() { assert.ok(!Cookie.parse("a=b; Expires=xyzzy", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; Expires=xyzzy"); - assert.ok(c); - assert.equal(c.expires, Infinity); - }, - }, - "zero max-age": { - "strict": function() { assert.ok(!Cookie.parse("a=b; Max-Age=0", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; Max-Age=0"); - assert.ok(c); - assert.equal(c.maxAge, 0); - }, - }, - "negative max-age": { - "strict": function() { assert.ok(!Cookie.parse("a=b; Max-Age=-1", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; Max-Age=-1"); - assert.ok(c); - assert.equal(c.maxAge, -1); - }, - }, - "empty domain": { - "strict": function() { assert.ok(!Cookie.parse("a=b; domain=", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; domain="); - assert.ok(c); - assert.equal(c.domain, null); - }, - }, - "dot domain": { - "strict": function() { assert.ok(!Cookie.parse("a=b; domain=.", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; domain=."); - assert.ok(c); - assert.equal(c.domain, null); - }, - }, - "uppercase domain": { - "strict lowercases": function() { - var c = Cookie.parse("a=b; domain=EXAMPLE.COM"); - assert.ok(c); - assert.equal(c.domain, 'example.com'); - }, - "non-strict lowercases": function() { - var c = Cookie.parse("a=b; domain=EXAMPLE.COM"); - assert.ok(c); - assert.equal(c.domain, 'example.com'); - }, - }, - "trailing dot in domain": { - topic: function() { - return Cookie.parse("a=b; Domain=example.com.", true) || null; - }, - "has the domain": function(c) { assert.equal(c.domain,"example.com.") }, - "but doesn't validate": function(c) { assert.equal(c.validate(),false) }, - }, - "empty path": { - "strict": function() { assert.ok(!Cookie.parse("a=b; path=", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; path="); - assert.ok(c); - assert.equal(c.path, null); - }, - }, - "no-slash path": { - "strict": function() { assert.ok(!Cookie.parse("a=b; path=xyzzy", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; path=xyzzy"); - assert.ok(c); - assert.equal(c.path, null); - }, - }, - "trailing semi-colons after path": { - topic: function () { - return [ - "a=b; path=/;", - "c=d;;;;" - ]; - }, - "strict": function (t) { - assert.ok(!Cookie.parse(t[0], true)); - assert.ok(!Cookie.parse(t[1], true)); - }, - "non-strict": function (t) { - var c1 = Cookie.parse(t[0]); - var c2 = Cookie.parse(t[1]); - assert.ok(c1); - assert.ok(c2); - assert.equal(c1.path, '/'); - } - }, - "secure-with-value": { - "strict": function() { assert.ok(!Cookie.parse("a=b; Secure=xyzzy", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; Secure=xyzzy"); - assert.ok(c); - assert.equal(c.secure, true); - }, - }, - "httponly-with-value": { - "strict": function() { assert.ok(!Cookie.parse("a=b; HttpOnly=xyzzy", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; HttpOnly=xyzzy"); - assert.ok(c); - assert.equal(c.httpOnly, true); - }, - }, - "garbage": { - topic: function() { - return Cookie.parse("\x08", true) || null; - }, - "doesn't parse": function(c) { assert.equal(c,null) }, - }, - "public suffix domain": { - topic: function() { - return Cookie.parse("a=b; domain=kyoto.jp", true) || null; - }, - "parses fine": function(c) { - assert.ok(c); - assert.equal(c.domain, 'kyoto.jp'); - }, - "but fails validation": function(c) { - assert.ok(c); - assert.ok(!c.validate()); - }, - }, - "Ironically, Google 'GAPS' cookie has very little whitespace": { - topic: function() { - return Cookie.parse("GAPS=1:A1aaaaAaAAa1aaAaAaaAAAaaa1a11a:aaaAaAaAa-aaaA1-;Path=/;Expires=Thu, 17-Apr-2014 02:12:29 GMT;Secure;HttpOnly"); - }, - "parsed": function(c) { assert.ok(c) }, - "key": function(c) { assert.equal(c.key, 'GAPS') }, - "value": function(c) { assert.equal(c.value, '1:A1aaaaAaAAa1aaAaAaaAAAaaa1a11a:aaaAaAaAa-aaaA1-') }, - "path": function(c) { - assert.notEqual(c.path, '/;Expires'); // BUG - assert.equal(c.path, '/'); - }, - "expires": function(c) { - assert.notEqual(c.expires, Infinity); - assert.equal(c.expires.getTime(), 1397700749000); - }, - "secure": function(c) { assert.ok(c.secure) }, - "httponly": function(c) { assert.ok(c.httpOnly) }, - }, - "lots of equal signs": { - topic: function() { - return Cookie.parse("queryPref=b=c&d=e; Path=/f=g; Expires=Thu, 17 Apr 2014 02:12:29 GMT; HttpOnly"); - }, - "parsed": function(c) { assert.ok(c) }, - "key": function(c) { assert.equal(c.key, 'queryPref') }, - "value": function(c) { assert.equal(c.value, 'b=c&d=e') }, - "path": function(c) { - assert.equal(c.path, '/f=g'); - }, - "expires": function(c) { - assert.notEqual(c.expires, Infinity); - assert.equal(c.expires.getTime(), 1397700749000); - }, - "httponly": function(c) { assert.ok(c.httpOnly) }, - } - } -}) -.addBatch({ - "domain normalization": { - "simple": function() { - var c = new Cookie(); - c.domain = "EXAMPLE.com"; - assert.equal(c.canonicalizedDomain(), "example.com"); - }, - "extra dots": function() { - var c = new Cookie(); - c.domain = ".EXAMPLE.com"; - assert.equal(c.cdomain(), "example.com"); - }, - "weird trailing dot": function() { - var c = new Cookie(); - c.domain = "EXAMPLE.ca."; - assert.equal(c.canonicalizedDomain(), "example.ca."); - }, - "weird internal dots": function() { - var c = new Cookie(); - c.domain = "EXAMPLE...ca."; - assert.equal(c.canonicalizedDomain(), "example...ca."); - }, - "IDN": function() { - var c = new Cookie(); - c.domain = "δοκιμή.δοκιμή"; // "test.test" in greek - assert.equal(c.canonicalizedDomain(), "xn--jxalpdlp.xn--jxalpdlp"); - } - } -}) -.addBatch({ - "Domain Match":matchVows(tough.domainMatch, [ - // str, dom, expect - ["example.com", "example.com", true], - ["eXaMpLe.cOm", "ExAmPlE.CoM", true], - ["no.ca", "yes.ca", false], - ["wwwexample.com", "example.com", false], - ["www.example.com", "example.com", true], - ["example.com", "www.example.com", false], - ["www.subdom.example.com", "example.com", true], - ["www.subdom.example.com", "subdom.example.com", true], - ["example.com", "example.com.", false], // RFC6265 S4.1.2.3 - ["192.168.0.1", "168.0.1", false], // S5.1.3 "The string is a host name" - [null, "example.com", null], - ["example.com", null, null], - [null, null, null], - [undefined, undefined, null], - ]) -}) -.addBatch({ - "default-path": defaultPathVows([ - [null,"/"], - ["/","/"], - ["/file","/"], - ["/dir/file","/dir"], - ["noslash","/"], - ]) -}) -.addBatch({ - "Path-Match": matchVows(tough.pathMatch, [ - // request, cookie, match - ["/","/",true], - ["/dir","/",true], - ["/","/dir",false], - ["/dir/","/dir/", true], - ["/dir/file","/dir/",true], - ["/dir/file","/dir",true], - ["/directory","/dir",false], - ]) -}) -.addBatch({ - "Cookie Sorting": { - topic: function() { - var cookies = []; - var now = Date.now(); - cookies.push(Cookie.parse("a=0; Domain=example.com")); - cookies.push(Cookie.parse("b=1; Domain=www.example.com")); - cookies.push(Cookie.parse("c=2; Domain=example.com; Path=/pathA")); - cookies.push(Cookie.parse("d=3; Domain=www.example.com; Path=/pathA")); - cookies.push(Cookie.parse("e=4; Domain=example.com; Path=/pathA/pathB")); - cookies.push(Cookie.parse("f=5; Domain=www.example.com; Path=/pathA/pathB")); - - // force a stable creation time consistent with the order above since - // some may have been created at now + 1ms. - var i = cookies.length; - cookies.forEach(function(cookie) { - cookie.creation = new Date(now - 100*(i--)); - }); - - // weak shuffle: - cookies = cookies.sort(function(){return Math.random()-0.5}); - - cookies = cookies.sort(tough.cookieCompare); - return cookies; - }, - "got": function(cookies) { - assert.lengthOf(cookies, 6); - var names = cookies.map(function(c) {return c.key}); - assert.deepEqual(names, ['e','f','c','d','a','b']); - }, - } -}) -.addBatch({ - "CookieJar": { - "Setting a basic cookie": { - topic: function() { - var cj = new CookieJar(); - var c = Cookie.parse("a=b; Domain=example.com; Path=/"); - assert.strictEqual(c.hostOnly, null); - assert.instanceOf(c.creation, Date); - assert.strictEqual(c.lastAccessed, null); - c.creation = new Date(Date.now()-10000); - cj.setCookie(c, 'http://example.com/index.html', this.callback); - }, - "works": function(c) { assert.instanceOf(c,Cookie) }, // C is for Cookie, good enough for me - "gets timestamped": function(c) { - assert.ok(c.creation); - assert.ok(Date.now() - c.creation.getTime() < 5000); // recently stamped - assert.ok(c.lastAccessed); - assert.equal(c.creation, c.lastAccessed); - assert.equal(c.TTL(), Infinity); - assert.ok(!c.isPersistent()); - }, - }, - "Setting a no-path cookie": { - topic: function() { - var cj = new CookieJar(); - var c = Cookie.parse("a=b; Domain=example.com"); - assert.strictEqual(c.hostOnly, null); - assert.instanceOf(c.creation, Date); - assert.strictEqual(c.lastAccessed, null); - c.creation = new Date(Date.now()-10000); - cj.setCookie(c, 'http://example.com/index.html', this.callback); - }, - "domain": function(c) { assert.equal(c.domain, 'example.com') }, - "path is /": function(c) { assert.equal(c.path, '/') }, - "path was derived": function(c) { assert.strictEqual(c.pathIsDefault, true) }, - }, - "Setting a cookie already marked as host-only": { - topic: function() { - var cj = new CookieJar(); - var c = Cookie.parse("a=b; Domain=example.com"); - assert.strictEqual(c.hostOnly, null); - assert.instanceOf(c.creation, Date); - assert.strictEqual(c.lastAccessed, null); - c.creation = new Date(Date.now()-10000); - c.hostOnly = true; - cj.setCookie(c, 'http://example.com/index.html', this.callback); - }, - "domain": function(c) { assert.equal(c.domain, 'example.com') }, - "still hostOnly": function(c) { assert.strictEqual(c.hostOnly, true) }, - }, - "Setting a session cookie": { - topic: function() { - var cj = new CookieJar(); - var c = Cookie.parse("a=b"); - assert.strictEqual(c.path, null); - cj.setCookie(c, 'http://www.example.com/dir/index.html', this.callback); - }, - "works": function(c) { assert.instanceOf(c,Cookie) }, - "gets the domain": function(c) { assert.equal(c.domain, 'www.example.com') }, - "gets the default path": function(c) { assert.equal(c.path, '/dir') }, - "is 'hostOnly'": function(c) { assert.ok(c.hostOnly) }, - }, - "Setting wrong domain cookie": { - topic: function() { - var cj = new CookieJar(); - var c = Cookie.parse("a=b; Domain=fooxample.com; Path=/"); - cj.setCookie(c, 'http://example.com/index.html', this.callback); - }, - "fails": function(err,c) { - assert.ok(err.message.match(/domain/i)); - assert.ok(!c); - }, - }, - "Setting sub-domain cookie": { - topic: function() { - var cj = new CookieJar(); - var c = Cookie.parse("a=b; Domain=www.example.com; Path=/"); - cj.setCookie(c, 'http://example.com/index.html', this.callback); - }, - "fails": function(err,c) { - assert.ok(err.message.match(/domain/i)); - assert.ok(!c); - }, - }, - "Setting super-domain cookie": { - topic: function() { - var cj = new CookieJar(); - var c = Cookie.parse("a=b; Domain=example.com; Path=/"); - cj.setCookie(c, 'http://www.app.example.com/index.html', this.callback); - }, - "success": function(err,c) { - assert.ok(!err); - assert.equal(c.domain, 'example.com'); - }, - }, - "Setting HttpOnly cookie over non-HTTP API": { - topic: function() { - var cj = new CookieJar(); - var c = Cookie.parse("a=b; Domain=example.com; Path=/; HttpOnly"); - cj.setCookie(c, 'http://example.com/index.html', {http:false}, this.callback); - }, - "fails": function(err,c) { - assert.match(err.message, /HttpOnly/i); - assert.ok(!c); - }, - }, - }, - "Cookie Jar store eight cookies": { - topic: function() { - var cj = new CookieJar(); - var ex = 'http://example.com/index.html'; - var tasks = []; - tasks.push(function(next) { - cj.setCookie('a=1; Domain=example.com; Path=/',ex,at(0),next); - }); - tasks.push(function(next) { - cj.setCookie('b=2; Domain=example.com; Path=/; HttpOnly',ex,at(1000),next); - }); - tasks.push(function(next) { - cj.setCookie('c=3; Domain=example.com; Path=/; Secure',ex,at(2000),next); - }); - tasks.push(function(next) { // path - cj.setCookie('d=4; Domain=example.com; Path=/foo',ex,at(3000),next); - }); - tasks.push(function(next) { // host only - cj.setCookie('e=5',ex,at(4000),next); - }); - tasks.push(function(next) { // other domain - cj.setCookie('f=6; Domain=nodejs.org; Path=/','http://nodejs.org',at(5000),next); - }); - tasks.push(function(next) { // expired - cj.setCookie('g=7; Domain=example.com; Path=/; Expires=Tue, 18 Oct 2011 00:00:00 GMT',ex,at(6000),next); - }); - tasks.push(function(next) { // expired via Max-Age - cj.setCookie('h=8; Domain=example.com; Path=/; Max-Age=1',ex,next); - }); - var cb = this.callback; - async.parallel(tasks, function(err,results){ - setTimeout(function() { - cb(err,cj,results); - }, 2000); // so that 'h=8' expires - }); - }, - "setup ok": function(err,cj,results) { - assert.ok(1); - }, - "then retrieving for http://nodejs.org": { - topic: function(cj,results) { - cj.getCookies('http://nodejs.org',this.callback); - }, - "get a nodejs cookie": function(cookies) { - assert.lengthOf(cookies, 1); - var cookie = cookies[0]; - assert.equal(cookie.domain, 'nodejs.org'); - }, - }, - "then retrieving for https://example.com": { - topic: function(cj,results) { - cj.getCookies('https://example.com',{secure:true},this.callback); - }, - "get a secure example cookie with others": function(cookies) { - var names = cookies.map(function(c) {return c.key}); - assert.deepEqual(names, ['a','b','c','e']); - }, - }, - "then retrieving for https://example.com (missing options)": { - topic: function(cj,results) { - cj.getCookies('https://example.com',this.callback); - }, - "get a secure example cookie with others": function(cookies) { - var names = cookies.map(function(c) {return c.key}); - assert.deepEqual(names, ['a','b','c','e']); - }, - }, - "then retrieving for http://example.com": { - topic: function(cj,results) { - cj.getCookies('http://example.com',this.callback); - }, - "get a bunch of cookies": function(cookies) { - var names = cookies.map(function(c) {return c.key}); - assert.deepEqual(names, ['a','b','e']); - }, - }, - "then retrieving for http://EXAMPlE.com": { - topic: function(cj,results) { - cj.getCookies('http://EXAMPlE.com',this.callback); - }, - "get a bunch of cookies": function(cookies) { - var names = cookies.map(function(c) {return c.key}); - assert.deepEqual(names, ['a','b','e']); - }, - }, - "then retrieving for http://example.com, non-HTTP": { - topic: function(cj,results) { - cj.getCookies('http://example.com',{http:false},this.callback); - }, - "get a bunch of cookies": function(cookies) { - var names = cookies.map(function(c) {return c.key}); - assert.deepEqual(names, ['a','e']); - }, - }, - "then retrieving for http://example.com/foo/bar": { - topic: function(cj,results) { - cj.getCookies('http://example.com/foo/bar',this.callback); - }, - "get a bunch of cookies": function(cookies) { - var names = cookies.map(function(c) {return c.key}); - assert.deepEqual(names, ['d','a','b','e']); - }, - }, - "then retrieving for http://example.com as a string": { - topic: function(cj,results) { - cj.getCookieString('http://example.com',this.callback); - }, - "get a single string": function(cookieHeader) { - assert.equal(cookieHeader, "a=1; b=2; e=5"); - }, - }, - "then retrieving for http://example.com as a set-cookie header": { - topic: function(cj,results) { - cj.getSetCookieStrings('http://example.com',this.callback); - }, - "get a single string": function(cookieHeaders) { - assert.lengthOf(cookieHeaders, 3); - assert.equal(cookieHeaders[0], "a=1; Domain=example.com; Path=/"); - assert.equal(cookieHeaders[1], "b=2; Domain=example.com; Path=/; HttpOnly"); - assert.equal(cookieHeaders[2], "e=5; Path=/"); - }, - }, - "then retrieving for http://www.example.com/": { - topic: function(cj,results) { - cj.getCookies('http://www.example.com/foo/bar',this.callback); - }, - "get a bunch of cookies": function(cookies) { - var names = cookies.map(function(c) {return c.key}); - assert.deepEqual(names, ['d','a','b']); // note lack of 'e' - }, - }, - }, - "Repeated names": { - topic: function() { - var cb = this.callback; - var cj = new CookieJar(); - var ex = 'http://www.example.com/'; - var sc = cj.setCookie; - var tasks = []; - var now = Date.now(); - tasks.push(sc.bind(cj,'aaaa=xxxx',ex,at(0))); - tasks.push(sc.bind(cj,'aaaa=1111; Domain=www.example.com',ex,at(1000))); - tasks.push(sc.bind(cj,'aaaa=2222; Domain=example.com',ex,at(2000))); - tasks.push(sc.bind(cj,'aaaa=3333; Domain=www.example.com; Path=/pathA',ex,at(3000))); - async.series(tasks,function(err,results) { - results = results.filter(function(e) {return e !== undefined}); - cb(err,{cj:cj, cookies:results, now:now}); - }); - }, - "all got set": function(err,t) { - assert.lengthOf(t.cookies,4); - }, - "then getting 'em back": { - topic: function(t) { - var cj = t.cj; - cj.getCookies('http://www.example.com/pathA',this.callback); - }, - "there's just three": function (err,cookies) { - var vals = cookies.map(function(c) {return c.value}); - // may break with sorting; sorting should put 3333 first due to longest path: - assert.deepEqual(vals, ['3333','1111','2222']); - } - }, - }, - "CookieJar setCookie errors": { - "public-suffix domain": { - topic: function() { - var cj = new CookieJar(); - cj.setCookie('i=9; Domain=kyoto.jp; Path=/','kyoto.jp',this.callback); - }, - "errors": function(err,cookie) { - assert.ok(err); - assert.ok(!cookie); - assert.match(err.message, /public suffix/i); - }, - }, - "wrong domain": { - topic: function() { - var cj = new CookieJar(); - cj.setCookie('j=10; Domain=google.com; Path=/','google.ca',this.callback); - }, - "errors": function(err,cookie) { - assert.ok(err); - assert.ok(!cookie); - assert.match(err.message, /not in this host's domain/i); - }, - }, - "old cookie is HttpOnly": { - topic: function() { - var cb = this.callback; - var next = function (err,c) { - return cb(err,cj); - }; - var cj = new CookieJar(); - cj.setCookie('k=11; Domain=example.ca; Path=/; HttpOnly','http://example.ca',{http:true},next); - }, - "initial cookie is set": function(err,cj) { - assert.ok(!err); - }, - "but when trying to overwrite": { - topic: function(cj) { - var cb = this.callback; - cj.setCookie('k=12; Domain=example.ca; Path=/','http://example.ca',{http:false},function(err,c) {cb(null,err)}); - }, - "it's an error": function(err) { - assert.ok(err); - }, - "then, checking the original": { - topic: function(ignored,cj) { - assert.ok(cj instanceof CookieJar); - cj.getCookies('http://example.ca',{http:true},this.callback); - }, - "cookie has original value": function(err,cookies) { - assert.equal(err,null); - assert.lengthOf(cookies, 1); - assert.equal(cookies[0].value,11); - }, - }, - }, - }, - }, -}) -.addBatch({ - "JSON": { - "serialization": { - topic: function() { - var c = Cookie.parse('alpha=beta; Domain=example.com; Path=/foo; Expires=Tue, 19 Jan 2038 03:14:07 GMT; HttpOnly'); - return JSON.stringify(c); - }, - "gives a string": function(str) { - assert.equal(typeof str, "string"); - }, - "date is in ISO format": function(str) { - assert.match(str, /"expires":"2038-01-19T03:14:07\.000Z"/, 'expires is in ISO format'); - }, - }, - "deserialization": { - topic: function() { - var json = '{"key":"alpha","value":"beta","domain":"example.com","path":"/foo","expires":"2038-01-19T03:14:07.000Z","httpOnly":true,"lastAccessed":2000000000123}'; - return Cookie.fromJSON(json); - }, - "works": function(c) { - assert.ok(c); - }, - "key": function(c) { assert.equal(c.key, "alpha") }, - "value": function(c) { assert.equal(c.value, "beta") }, - "domain": function(c) { assert.equal(c.domain, "example.com") }, - "path": function(c) { assert.equal(c.path, "/foo") }, - "httpOnly": function(c) { assert.strictEqual(c.httpOnly, true) }, - "secure": function(c) { assert.strictEqual(c.secure, false) }, - "hostOnly": function(c) { assert.strictEqual(c.hostOnly, null) }, - "expires is a date object": function(c) { - assert.equal(c.expires.getTime(), 2147483647000); - }, - "lastAccessed is a date object": function(c) { - assert.equal(c.lastAccessed.getTime(), 2000000000123); - }, - "creation defaulted": function(c) { - assert.ok(c.creation.getTime()); - } - }, - "null deserialization": { - topic: function() { - return Cookie.fromJSON(null); - }, - "is null": function(cookie) { - assert.equal(cookie,null); - }, - }, - }, - "expiry deserialization": { - "Infinity": { - topic: Cookie.fromJSON.bind(null, '{"expires":"Infinity"}'), - "is infinite": function(c) { - assert.strictEqual(c.expires, "Infinity"); - assert.equal(c.expires, Infinity); - }, - }, - }, - "maxAge serialization": { - topic: function() { - return function(toSet) { - var c = new Cookie(); - c.key = 'foo'; c.value = 'bar'; - c.setMaxAge(toSet); - return JSON.stringify(c); - }; - }, - "zero": { - topic: function(f) { return f(0) }, - "looks good": function(str) { - assert.match(str, /"maxAge":0/); - }, - }, - "Infinity": { - topic: function(f) { return f(Infinity) }, - "looks good": function(str) { - assert.match(str, /"maxAge":"Infinity"/); - }, - }, - "-Infinity": { - topic: function(f) { return f(-Infinity) }, - "looks good": function(str) { - assert.match(str, /"maxAge":"-Infinity"/); - }, - }, - "null": { - topic: function(f) { return f(null) }, - "looks good": function(str) { - assert.match(str, /"maxAge":null/); - }, - }, - }, - "maxAge deserialization": { - "number": { - topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":123}'), - "is the number": function(c) { - assert.strictEqual(c.maxAge, 123); - }, - }, - "null": { - topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":null}'), - "is null": function(c) { - assert.strictEqual(c.maxAge, null); - }, - }, - "less than zero": { - topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":-123}'), - "is -123": function(c) { - assert.strictEqual(c.maxAge, -123); - }, - }, - "Infinity": { - topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":"Infinity"}'), - "is inf-as-string": function(c) { - assert.strictEqual(c.maxAge, "Infinity"); - }, - }, - "-Infinity": { - topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":"-Infinity"}'), - "is inf-as-string": function(c) { - assert.strictEqual(c.maxAge, "-Infinity"); - }, - }, - } -}) -.addBatch({ - "permuteDomain": { - "base case": { - topic: tough.permuteDomain.bind(null,'example.com'), - "got the domain": function(list) { - assert.deepEqual(list, ['example.com']); - }, - }, - "two levels": { - topic: tough.permuteDomain.bind(null,'foo.bar.example.com'), - "got three things": function(list) { - assert.deepEqual(list, ['example.com','bar.example.com','foo.bar.example.com']); - }, - }, - "invalid domain": { - topic: tough.permuteDomain.bind(null,'foo.bar.example.localduhmain'), - "got three things": function(list) { - assert.equal(list, null); - }, - }, - }, - "permutePath": { - "base case": { - topic: tough.permutePath.bind(null,'/'), - "just slash": function(list) { - assert.deepEqual(list,['/']); - }, - }, - "single case": { - topic: tough.permutePath.bind(null,'/foo'), - "two things": function(list) { - assert.deepEqual(list,['/foo','/']); - }, - "path matching": function(list) { - list.forEach(function(e) { - assert.ok(tough.pathMatch('/foo',e)); - }); - }, - }, - "double case": { - topic: tough.permutePath.bind(null,'/foo/bar'), - "four things": function(list) { - assert.deepEqual(list,['/foo/bar','/foo','/']); - }, - "path matching": function(list) { - list.forEach(function(e) { - assert.ok(tough.pathMatch('/foo/bar',e)); - }); - }, - }, - "trailing slash": { - topic: tough.permutePath.bind(null,'/foo/bar/'), - "three things": function(list) { - assert.deepEqual(list,['/foo/bar','/foo','/']); - }, - "path matching": function(list) { - list.forEach(function(e) { - assert.ok(tough.pathMatch('/foo/bar/',e)); - }); - }, - }, - } -}) -.addBatch({ - "Issue 1": { - topic: function() { - var cj = new CookieJar(); - cj.setCookie('hello=world; path=/some/path/', 'http://domain/some/path/file', function(err,cookie) { - this.callback(err,{cj:cj, cookie:cookie}); - }.bind(this)); - }, - "stored a cookie": function(t) { - assert.ok(t.cookie); - }, - "cookie's path was modified to remove unnecessary slash": function(t) { - assert.equal(t.cookie.path, '/some/path'); - }, - "getting it back": { - topic: function(t) { - t.cj.getCookies('http://domain/some/path/file', function(err,cookies) { - this.callback(err, {cj:t.cj, cookies:cookies||[]}); - }.bind(this)); - }, - "got one cookie": function(t) { - assert.lengthOf(t.cookies, 1); - }, - "it's the right one": function(t) { - var c = t.cookies[0]; - assert.equal(c.key, 'hello'); - assert.equal(c.value, 'world'); - }, - } - } -}) -.addBatch({ - "expiry option": { - topic: function() { - var cb = this.callback; - var cj = new CookieJar(); - cj.setCookie('near=expiry; Domain=example.com; Path=/; Max-Age=1','http://www.example.com',at(-1), function(err,cookie) { - - cb(err, {cj:cj, cookie:cookie}); - }); - }, - "set the cookie": function(t) { - assert.ok(t.cookie, "didn't set?!"); - assert.equal(t.cookie.key, 'near'); - }, - "then, retrieving": { - topic: function(t) { - var cb = this.callback; - setTimeout(function() { - t.cj.getCookies('http://www.example.com', {http:true, expire:false}, function(err,cookies) { - t.cookies = cookies; - cb(err,t); - }); - },2000); - }, - "got the cookie": function(t) { - assert.lengthOf(t.cookies, 1); - assert.equal(t.cookies[0].key, 'near'); - }, - } - } -}) -.addBatch({ - "trailing semi-colon set into cj": { - topic: function () { - var cb = this.callback; - var cj = new CookieJar(); - var ex = 'http://www.example.com'; - var tasks = []; - tasks.push(function(next) { - cj.setCookie('broken_path=testme; path=/;',ex,at(-1),next); - }); - tasks.push(function(next) { - cj.setCookie('b=2; Path=/;;;;',ex,at(-1),next); - }); - async.parallel(tasks, function (err, cookies) { - cb(null, { - cj: cj, - cookies: cookies - }); - }); - }, - "check number of cookies": function (t) { - assert.lengthOf(t.cookies, 2, "didn't set"); - }, - "check *broken_path* was set properly": function (t) { - assert.equal(t.cookies[0].key, "broken_path"); - assert.equal(t.cookies[0].value, "testme"); - assert.equal(t.cookies[0].path, "/"); - }, - "check *b* was set properly": function (t) { - assert.equal(t.cookies[1].key, "b"); - assert.equal(t.cookies[1].value, "2"); - assert.equal(t.cookies[1].path, "/"); - }, - "retrieve the cookie": { - topic: function (t) { - var cb = this.callback; - t.cj.getCookies('http://www.example.com', {}, function (err, cookies) { - t.cookies = cookies; - cb(err, t); - }); - }, - "get the cookie": function(t) { - assert.lengthOf(t.cookies, 2); - assert.equal(t.cookies[0].key, 'broken_path'); - assert.equal(t.cookies[0].value, 'testme'); - assert.equal(t.cookies[1].key, "b"); - assert.equal(t.cookies[1].value, "2"); - assert.equal(t.cookies[1].path, "/"); - }, - }, - } -}) -.addBatch({ - "Constructor":{ - topic: function () { - return new Cookie({ - key: 'test', - value: 'b', - maxAge: 60 - }); - }, - 'check for key property': function (c) { - assert.ok(c); - assert.equal(c.key, 'test'); - }, - 'check for value property': function (c) { - assert.equal(c.value, 'b'); - }, - 'check for maxAge': function (c) { - assert.equal(c.maxAge, 60); - }, - 'check for default values for unspecified properties': function (c) { - assert.equal(c.expires, "Infinity"); - assert.equal(c.secure, false); - assert.equal(c.httpOnly, false); - } - } -}) -.addBatch({ - "allPaths option": { - topic: function() { - var cj = new CookieJar(); - var tasks = []; - tasks.push(cj.setCookie.bind(cj, 'nopath_dom=qq; Path=/; Domain=example.com', 'http://example.com', {})); - tasks.push(cj.setCookie.bind(cj, 'path_dom=qq; Path=/foo; Domain=example.com', 'http://example.com', {})); - tasks.push(cj.setCookie.bind(cj, 'nopath_host=qq; Path=/', 'http://www.example.com', {})); - tasks.push(cj.setCookie.bind(cj, 'path_host=qq; Path=/foo', 'http://www.example.com', {})); - tasks.push(cj.setCookie.bind(cj, 'other=qq; Path=/', 'http://other.example.com/', {})); - tasks.push(cj.setCookie.bind(cj, 'other2=qq; Path=/foo', 'http://other.example.com/foo', {})); - var cb = this.callback; - async.parallel(tasks, function(err,results) { - cb(err, {cj:cj, cookies: results}); - }); - }, - "all set": function(t) { - assert.equal(t.cookies.length, 6); - assert.ok(t.cookies.every(function(c) { return !!c })); - }, - "getting without allPaths": { - topic: function(t) { - var cb = this.callback; - var cj = t.cj; - cj.getCookies('http://www.example.com/', {}, function(err,cookies) { - cb(err, {cj:cj, cookies:cookies}); - }); - }, - "found just two cookies": function(t) { - assert.equal(t.cookies.length, 2); - }, - "all are path=/": function(t) { - assert.ok(t.cookies.every(function(c) { return c.path === '/' })); - }, - "no 'other' cookies": function(t) { - assert.ok(!t.cookies.some(function(c) { return (/^other/).test(c.name) })); - }, - }, - "getting without allPaths for /foo": { - topic: function(t) { - var cb = this.callback; - var cj = t.cj; - cj.getCookies('http://www.example.com/foo', {}, function(err,cookies) { - cb(err, {cj:cj, cookies:cookies}); - }); - }, - "found four cookies": function(t) { - assert.equal(t.cookies.length, 4); - }, - "no 'other' cookies": function(t) { - assert.ok(!t.cookies.some(function(c) { return (/^other/).test(c.name) })); - }, - }, - "getting with allPaths:true": { - topic: function(t) { - var cb = this.callback; - var cj = t.cj; - cj.getCookies('http://www.example.com/', {allPaths:true}, function(err,cookies) { - cb(err, {cj:cj, cookies:cookies}); - }); - }, - "found four cookies": function(t) { - assert.equal(t.cookies.length, 4); - }, - "no 'other' cookies": function(t) { - assert.ok(!t.cookies.some(function(c) { return (/^other/).test(c.name) })); - }, - }, - } -}) -.export(module); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/LICENSE deleted file mode 100644 index a4a9aee0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/README.md deleted file mode 100644 index bb533d56..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/README.md +++ /dev/null @@ -1,4 +0,0 @@ -tunnel-agent -============ - -HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/index.js deleted file mode 100644 index 3f7bbb90..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/index.js +++ /dev/null @@ -1,227 +0,0 @@ -'use strict' - -var net = require('net') - , tls = require('tls') - , http = require('http') - , https = require('https') - , events = require('events') - , assert = require('assert') - , util = require('util') - ; - -exports.httpOverHttp = httpOverHttp -exports.httpsOverHttp = httpsOverHttp -exports.httpOverHttps = httpOverHttps -exports.httpsOverHttps = httpsOverHttps - - -function httpOverHttp(options) { - var agent = new TunnelingAgent(options) - agent.request = http.request - return agent -} - -function httpsOverHttp(options) { - var agent = new TunnelingAgent(options) - agent.request = http.request - agent.createSocket = createSecureSocket - return agent -} - -function httpOverHttps(options) { - var agent = new TunnelingAgent(options) - agent.request = https.request - return agent -} - -function httpsOverHttps(options) { - var agent = new TunnelingAgent(options) - agent.request = https.request - agent.createSocket = createSecureSocket - return agent -} - - -function TunnelingAgent(options) { - var self = this - self.options = options || {} - self.proxyOptions = self.options.proxy || {} - self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets - self.requests = [] - self.sockets = [] - - self.on('free', function onFree(socket, host, port) { - for (var i = 0, len = self.requests.length; i < len; ++i) { - var pending = self.requests[i] - if (pending.host === host && pending.port === port) { - // Detect the request to connect same origin server, - // reuse the connection. - self.requests.splice(i, 1) - pending.request.onSocket(socket) - return - } - } - socket.destroy() - self.removeSocket(socket) - }) -} -util.inherits(TunnelingAgent, events.EventEmitter) - -TunnelingAgent.prototype.addRequest = function addRequest(req, host, port) { - var self = this - - if (self.sockets.length >= this.maxSockets) { - // We are over limit so we'll add it to the queue. - self.requests.push({host: host, port: port, request: req}) - return - } - - // If we are under maxSockets create a new one. - self.createSocket({host: host, port: port, request: req}, function(socket) { - socket.on('free', onFree) - socket.on('close', onCloseOrRemove) - socket.on('agentRemove', onCloseOrRemove) - req.onSocket(socket) - - function onFree() { - self.emit('free', socket, host, port) - } - - function onCloseOrRemove(err) { - self.removeSocket() - socket.removeListener('free', onFree) - socket.removeListener('close', onCloseOrRemove) - socket.removeListener('agentRemove', onCloseOrRemove) - } - }) -} - -TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this - var placeholder = {} - self.sockets.push(placeholder) - - var connectOptions = mergeOptions({}, self.proxyOptions, - { method: 'CONNECT' - , path: options.host + ':' + options.port - , agent: false - } - ) - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {} - connectOptions.headers['Proxy-Authorization'] = 'Basic ' + - new Buffer(connectOptions.proxyAuth).toString('base64') - } - - debug('making CONNECT request') - var connectReq = self.request(connectOptions) - connectReq.useChunkedEncodingByDefault = false // for v0.6 - connectReq.once('response', onResponse) // for v0.6 - connectReq.once('upgrade', onUpgrade) // for v0.6 - connectReq.once('connect', onConnect) // for v0.7 or later - connectReq.once('error', onError) - connectReq.end() - - function onResponse(res) { - // Very hacky. This is necessary to avoid http-parser leaks. - res.upgrade = true - } - - function onUpgrade(res, socket, head) { - // Hacky. - process.nextTick(function() { - onConnect(res, socket, head) - }) - } - - function onConnect(res, socket, head) { - connectReq.removeAllListeners() - socket.removeAllListeners() - - if (res.statusCode === 200) { - assert.equal(head.length, 0) - debug('tunneling connection has established') - self.sockets[self.sockets.indexOf(placeholder)] = socket - cb(socket) - } else { - debug('tunneling socket could not be established, statusCode=%d', res.statusCode) - var error = new Error('tunneling socket could not be established, ' + 'statusCode=' + res.statusCode) - error.code = 'ECONNRESET' - options.request.emit('error', error) - self.removeSocket(placeholder) - } - } - - function onError(cause) { - connectReq.removeAllListeners() - - debug('tunneling socket could not be established, cause=%s\n', cause.message, cause.stack) - var error = new Error('tunneling socket could not be established, ' + 'cause=' + cause.message) - error.code = 'ECONNRESET' - options.request.emit('error', error) - self.removeSocket(placeholder) - } -} - -TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket) - if (pos === -1) return - - this.sockets.splice(pos, 1) - - var pending = this.requests.shift() - if (pending) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createSocket(pending, function(socket) { - pending.request.onSocket(socket) - }) - } -} - -function createSecureSocket(options, cb) { - var self = this - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - // 0 is dummy port for v0.6 - var secureSocket = tls.connect(0, mergeOptions({}, self.options, - { servername: options.host - , socket: socket - } - )) - cb(secureSocket) - }) -} - - -function mergeOptions(target) { - for (var i = 1, len = arguments.length; i < len; ++i) { - var overrides = arguments[i] - if (typeof overrides === 'object') { - var keys = Object.keys(overrides) - for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { - var k = keys[j] - if (overrides[k] !== undefined) { - target[k] = overrides[k] - } - } - } - } - return target -} - - -var debug -if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { - var args = Array.prototype.slice.call(arguments) - if (typeof args[0] === 'string') { - args[0] = 'TUNNEL: ' + args[0] - } else { - args.unshift('TUNNEL:') - } - console.error.apply(console, args) - } -} else { - debug = function() {} -} -exports.debug = debug // for test diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/package.json deleted file mode 100644 index acfa6e1c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "author": { - "name": "Mikeal Rogers", - "email": "mikeal.rogers@gmail.com", - "url": "http://www.futurealoof.com" - }, - "name": "tunnel-agent", - "description": "HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.", - "version": "0.3.0", - "repository": { - "url": "https://github.com/mikeal/tunnel-agent" - }, - "main": "index.js", - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "readme": "tunnel-agent\n============\n\nHTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/mikeal/tunnel-agent/issues" - }, - "homepage": "https://github.com/mikeal/tunnel-agent", - "_id": "tunnel-agent@0.3.0", - "dist": { - "shasum": "ad681b68f5321ad2827c4cfb1b7d5df2cfe942ee" - }, - "_from": "tunnel-agent@~0.3.0", - "_resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.3.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/package.json deleted file mode 100755 index 57c99c02..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "request", - "description": "Simplified HTTP request client.", - "tags": [ - "http", - "simple", - "util", - "utility" - ], - "version": "2.31.0", - "author": { - "name": "Mikeal Rogers", - "email": "mikeal.rogers@gmail.com" - }, - "repository": { - "type": "git", - "url": "http://github.com/mikeal/request.git" - }, - "bugs": { - "url": "http://github.com/mikeal/request/issues" - }, - "engines": [ - "node >= 0.8.0" - ], - "main": "index.js", - "dependencies": { - "qs": "~0.6.0", - "json-stringify-safe": "~5.0.0", - "forever-agent": "~0.5.0", - "node-uuid": "~1.4.0", - "mime": "~1.2.9", - "tough-cookie": "~0.9.15", - "form-data": "~0.1.0", - "tunnel-agent": "~0.3.0", - "http-signature": "~0.10.0", - "oauth-sign": "~0.3.0", - "hawk": "~1.0.0", - "aws-sign2": "~0.5.0" - }, - "optionalDependencies": { - "tough-cookie": "~0.9.15", - "form-data": "~0.1.0", - "tunnel-agent": "~0.3.0", - "http-signature": "~0.10.0", - "oauth-sign": "~0.3.0", - "hawk": "~1.0.0", - "aws-sign2": "~0.5.0" - }, - "scripts": { - "test": "node tests/run.js" - }, - "readme": "# Request -- Simplified HTTP client\n\n[![NPM](https://nodei.co/npm/request.png)](https://nodei.co/npm/request/)\n\n## Super simple to use\n\nRequest is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.\n\n```javascript\nvar request = require('request');\nrequest('http://www.google.com', function (error, response, body) {\n if (!error && response.statusCode == 200) {\n console.log(body) // Print the google web page.\n }\n})\n```\n\n## Streaming\n\nYou can stream any response to a file stream.\n\n```javascript\nrequest('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))\n```\n\nYou can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers don’t already provide one).\n\n```javascript\nfs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))\n```\n\nRequest can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers.\n\n```javascript\nrequest.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))\n```\n\nNow let’s get fancy.\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n if (req.method === 'PUT') {\n req.pipe(request.put('http://mysite.com/doodle.png'))\n } else if (req.method === 'GET' || req.method === 'HEAD') {\n request.get('http://mysite.com/doodle.png').pipe(resp)\n }\n }\n})\n```\n\nYou can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do:\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n var x = request('http://mysite.com/doodle.png')\n req.pipe(x)\n x.pipe(resp)\n }\n})\n```\n\nAnd since `pipe()` returns the destination stream in ≥ Node 0.5.x you can do one line proxying. :)\n\n```javascript\nreq.pipe(request('http://mysite.com/doodle.png')).pipe(resp)\n```\n\nAlso, none of this new functionality conflicts with requests previous features, it just expands them.\n\n```javascript\nvar r = request.defaults({'proxy':'http://localproxy.com'})\n\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n r.get('http://google.com/doodle.png').pipe(resp)\n }\n})\n```\n\nYou can still use intermediate proxies, the requests will still follow HTTP forwards, etc.\n\n## Forms\n\n`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API.\n\nURL-encoded forms are simple.\n\n```javascript\nrequest.post('http://service.com/upload', {form:{key:'value'}})\n// or\nrequest.post('http://service.com/upload').form({key:'value'})\n```\n\nFor `multipart/form-data` we use the [form-data](https://github.com/felixge/node-form-data) library by [@felixge](https://github.com/felixge). You don’t need to worry about piping the form object or setting the headers, `request` will handle that for you.\n\n```javascript\nvar r = request.post('http://service.com/upload')\nvar form = r.form()\nform.append('my_field', 'my_value')\nform.append('my_buffer', new Buffer([1, 2, 3]))\nform.append('my_file', fs.createReadStream(path.join(__dirname, 'doodle.png'))\nform.append('remote_file', request('http://google.com/doodle.png'))\n```\n\n## HTTP Authentication\n\n```javascript\nrequest.get('http://some.server.com/').auth('username', 'password', false);\n// or\nrequest.get('http://some.server.com/', {\n 'auth': {\n 'user': 'username',\n 'pass': 'password',\n 'sendImmediately': false\n }\n});\n```\n\nIf passed as an option, `auth` should be a hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). The method form takes parameters `auth(username, password, sendImmediately)`.\n\n`sendImmediately` defaults to `true`, which causes a basic authentication header to be sent. If `sendImmediately` is `false`, then `request` will retry with a proper authentication header after receiving a `401` response from the server (which must contain a `WWW-Authenticate` header indicating the required authentication method).\n\nDigest authentication is supported, but it only works with `sendImmediately` set to `false`; otherwise `request` will send basic authentication on the initial request, which will probably cause the request to fail.\n\n## OAuth Signing\n\n```javascript\n// Twitter OAuth\nvar qs = require('querystring')\n , oauth =\n { callback: 'http://mysite.com/callback/'\n , consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n }\n , url = 'https://api.twitter.com/oauth/request_token'\n ;\nrequest.post({url:url, oauth:oauth}, function (e, r, body) {\n // Ideally, you would take the body in the response\n // and construct a URL that a user clicks on (like a sign in button).\n // The verifier is only available in the response after a user has\n // verified with twitter that they are authorizing your app.\n var access_token = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: access_token.oauth_token\n , verifier: access_token.oauth_verifier\n }\n , url = 'https://api.twitter.com/oauth/access_token'\n ;\n request.post({url:url, oauth:oauth}, function (e, r, body) {\n var perm_token = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: perm_token.oauth_token\n , token_secret: perm_token.oauth_token_secret\n }\n , url = 'https://api.twitter.com/1.1/users/show.json?'\n , params =\n { screen_name: perm_token.screen_name\n , user_id: perm_token.user_id\n }\n ;\n url += qs.stringify(params)\n request.get({url:url, oauth:oauth, json:true}, function (e, r, user) {\n console.log(user)\n })\n })\n})\n```\n\n### Custom HTTP Headers\n\nHTTP Headers, such as `User-Agent`, can be set in the `options` object.\nIn the example below, we call the github API to find out the number\nof stars and forks for the request repository. This requires a\ncustom `User-Agent` header as well as https.\n\n```javascript\nvar request = require('request');\n\nvar options = {\n\turl: 'https://api.github.com/repos/mikeal/request',\n\theaders: {\n\t\t'User-Agent': 'request'\n\t}\n};\n\nfunction callback(error, response, body) {\n\tif (!error && response.statusCode == 200) {\n\t\tvar info = JSON.parse(body);\n\t\tconsole.log(info.stargazers_count + \" Stars\");\n\t\tconsole.log(info.forks_count + \" Forks\");\n\t}\n}\n\nrequest(options, callback);\n```\n\n### request(options, callback)\n\nThe first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional.\n\n* `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()`\n* `qs` - object containing querystring values to be appended to the `uri`\n* `method` - http method (default: `\"GET\"`)\n* `headers` - http headers (default: `{}`)\n* `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`.\n* `form` - when passed an object, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header. When passed no options, a `FormData` instance is returned (and is piped to request).\n* `auth` - A hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). See documentation above.\n* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON.\n* `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below.\n* `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`)\n* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`)\n* `maxRedirects` - the maximum number of redirects to follow (default: `10`)\n* `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`.\n* `pool` - A hash object containing the agents for these requests. If omitted, the request will use the global pool (which is set to node's default `maxSockets`)\n* `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool.\n* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request\n* `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`)\n* `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above.\n* `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).\n* `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option.\n* `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section)\n* `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services)\n* `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.\n* `localAddress` - Local interface to bind for network connections.\n\n\nThe callback argument gets 3 arguments: \n\n1. An `error` when applicable (usually from [`http.ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) object)\n2. An [`http.IncomingMessage`](http://nodejs.org/api/http.html#http_http_incomingmessage) object\n3. The third is the `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied)\n\n## Convenience methods\n\nThere are also shorthand methods for different HTTP METHODs and some other conveniences.\n\n### request.defaults(options)\n\nThis method returns a wrapper around the normal request API that defaults to whatever options you pass in to it.\n\n### request.put\n\nSame as `request()`, but defaults to `method: \"PUT\"`.\n\n```javascript\nrequest.put(url)\n```\n\n### request.patch\n\nSame as `request()`, but defaults to `method: \"PATCH\"`.\n\n```javascript\nrequest.patch(url)\n```\n\n### request.post\n\nSame as `request()`, but defaults to `method: \"POST\"`.\n\n```javascript\nrequest.post(url)\n```\n\n### request.head\n\nSame as request() but defaults to `method: \"HEAD\"`.\n\n```javascript\nrequest.head(url)\n```\n\n### request.del\n\nSame as `request()`, but defaults to `method: \"DELETE\"`.\n\n```javascript\nrequest.del(url)\n```\n\n### request.get\n\nSame as `request()` (for uniformity).\n\n```javascript\nrequest.get(url)\n```\n### request.cookie\n\nFunction that creates a new cookie.\n\n```javascript\nrequest.cookie('cookie_string_here')\n```\n### request.jar\n\nFunction that creates a new cookie jar.\n\n```javascript\nrequest.jar()\n```\n\n\n## Examples:\n\n```javascript\n var request = require('request')\n , rand = Math.floor(Math.random()*100000000).toString()\n ;\n request(\n { method: 'PUT'\n , uri: 'http://mikeal.iriscouch.com/testjs/' + rand\n , multipart:\n [ { 'content-type': 'application/json'\n , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})\n }\n , { body: 'I am an attachment' }\n ]\n }\n , function (error, response, body) {\n if(response.statusCode == 201){\n console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand)\n } else {\n console.log('error: '+ response.statusCode)\n console.log(body)\n }\n }\n )\n```\n\nCookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`).\n\n```javascript\nvar request = request.defaults({jar: true})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\n\nTo use a custom cookie jar (instead `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`)\n\n```javascript\nvar j = request.jar()\nvar request = request.defaults({jar:j})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\nOR\n\nNote that `setCookie` requires at least three parameters, and the last is required to be a callback.\n\n```javascript\nvar j = request.jar()\nvar cookie = request.cookie('your_cookie_here')\nj.setCookie(cookie, uri, function (err, cookie){})\nrequest({url: 'http://www.google.com', jar: j}, function () {\n request('http://images.google.com')\n})\n```\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/mikeal/request", - "_id": "request@2.31.0", - "dist": { - "shasum": "4c8ac967c9a4b9410cb4ba1a61fdb644267eeeff" - }, - "_from": "request@~2.31.0", - "_resolved": "https://registry.npmjs.org/request/-/request-2.31.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/request.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/request.js deleted file mode 100644 index 3c03c47d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/request/request.js +++ /dev/null @@ -1,1260 +0,0 @@ -var optional = require('./lib/optional') - , http = require('http') - , https = optional('https') - , tls = optional('tls') - , url = require('url') - , util = require('util') - , stream = require('stream') - , qs = require('qs') - , querystring = require('querystring') - , crypto = require('crypto') - - , oauth = optional('oauth-sign') - , hawk = optional('hawk') - , aws = optional('aws-sign') - , httpSignature = optional('http-signature') - , uuid = require('node-uuid') - , mime = require('mime') - , tunnel = optional('tunnel-agent') - , _safeStringify = require('json-stringify-safe') - - , ForeverAgent = require('forever-agent') - , FormData = optional('form-data') - - , Cookie = optional('tough-cookie') - , CookieJar = Cookie && Cookie.CookieJar - , cookieJar = CookieJar && new CookieJar - - , copy = require('./lib/copy') - , debug = require('./lib/debug') - , getSafe = require('./lib/getSafe') - ; - -function safeStringify (obj) { - var ret - try { ret = JSON.stringify(obj) } - catch (e) { ret = _safeStringify(obj) } - return ret -} - -var globalPool = {} -var isUrl = /^https?:/i - - -// Hacky fix for pre-0.4.4 https -if (https && !https.Agent) { - https.Agent = function (options) { - http.Agent.call(this, options) - } - util.inherits(https.Agent, http.Agent) - https.Agent.prototype._getConnection = function (host, port, cb) { - var s = tls.connect(port, host, this.options, function () { - // do other checks here? - if (cb) cb() - }) - return s - } -} - -function isReadStream (rs) { - if (rs.readable && rs.path && rs.mode) { - return true - } -} - -function toBase64 (str) { - return (new Buffer(str || "", "ascii")).toString("base64") -} - -function md5 (str) { - return crypto.createHash('md5').update(str).digest('hex') -} - -function Request (options) { - stream.Stream.call(this) - this.readable = true - this.writable = true - - if (typeof options === 'string') { - options = {uri:options} - } - - var reserved = Object.keys(Request.prototype) - for (var i in options) { - if (reserved.indexOf(i) === -1) { - this[i] = options[i] - } else { - if (typeof options[i] === 'function') { - delete options[i] - } - } - } - - if (options.method) { - this.explicitMethod = true - } - - this.canTunnel = options.tunnel !== false && tunnel; - - this.init(options) -} -util.inherits(Request, stream.Stream) -Request.prototype.init = function (options) { - // init() contains all the code to setup the request object. - // the actual outgoing request is not started until start() is called - // this function is called from both the constructor and on redirect. - var self = this - if (!options) options = {} - - if (!self.method) self.method = options.method || 'GET' - self.localAddress = options.localAddress - - debug(options) - if (!self.pool && self.pool !== false) self.pool = globalPool - self.dests = self.dests || [] - self.__isRequestRequest = true - - // Protect against double callback - if (!self._callback && self.callback) { - self._callback = self.callback - self.callback = function () { - if (self._callbackCalled) return // Print a warning maybe? - self._callbackCalled = true - self._callback.apply(self, arguments) - } - self.on('error', self.callback.bind()) - self.on('complete', self.callback.bind(self, null)) - } - - if (self.url && !self.uri) { - // People use this property instead all the time so why not just support it. - self.uri = self.url - delete self.url - } - - if (!self.uri) { - // this will throw if unhandled but is handleable when in a redirect - return self.emit('error', new Error("options.uri is a required argument")) - } else { - if (typeof self.uri == "string") self.uri = url.parse(self.uri) - } - - if (self.strictSSL === false) { - self.rejectUnauthorized = false - } - - if (self.proxy) { - if (typeof self.proxy == 'string') self.proxy = url.parse(self.proxy) - - // do the HTTP CONNECT dance using koichik/node-tunnel - if (http.globalAgent && self.uri.protocol === "https:" && self.canTunnel) { - var tunnelFn = self.proxy.protocol === "http:" - ? tunnel.httpsOverHttp : tunnel.httpsOverHttps - - var tunnelOptions = { proxy: { host: self.proxy.hostname - , port: +self.proxy.port - , proxyAuth: self.proxy.auth - , headers: { Host: self.uri.hostname + ':' + - (self.uri.port || self.uri.protocol === 'https:' ? 443 : 80) }} - , rejectUnauthorized: self.rejectUnauthorized - , ca: this.ca } - - self.agent = tunnelFn(tunnelOptions) - self.tunnel = true - } - } - - if (!self.uri.pathname) {self.uri.pathname = '/'} - - if (!self.uri.host) { - // Invalid URI: it may generate lot of bad errors, like "TypeError: Cannot call method 'indexOf' of undefined" in CookieJar - // Detect and reject it as soon as possible - var faultyUri = url.format(self.uri) - var message = 'Invalid URI "' + faultyUri + '"' - if (Object.keys(options).length === 0) { - // No option ? This can be the sign of a redirect - // As this is a case where the user cannot do anything (they didn't call request directly with this URL) - // they should be warned that it can be caused by a redirection (can save some hair) - message += '. This can be caused by a crappy redirection.' - } - self.emit('error', new Error(message)) - return // This error was fatal - } - - self._redirectsFollowed = self._redirectsFollowed || 0 - self.maxRedirects = (self.maxRedirects !== undefined) ? self.maxRedirects : 10 - self.followRedirect = (self.followRedirect !== undefined) ? self.followRedirect : true - self.followAllRedirects = (self.followAllRedirects !== undefined) ? self.followAllRedirects : false - if (self.followRedirect || self.followAllRedirects) - self.redirects = self.redirects || [] - - self.headers = self.headers ? copy(self.headers) : {} - - self.setHost = false - if (!self.hasHeader('host')) { - self.setHeader('host', self.uri.hostname) - if (self.uri.port) { - if ( !(self.uri.port === 80 && self.uri.protocol === 'http:') && - !(self.uri.port === 443 && self.uri.protocol === 'https:') ) - self.setHeader('host', self.getHeader('host') + (':'+self.uri.port) ) - } - self.setHost = true - } - - self.jar(self._jar || options.jar) - - if (!self.uri.port) { - if (self.uri.protocol == 'http:') {self.uri.port = 80} - else if (self.uri.protocol == 'https:') {self.uri.port = 443} - } - - if (self.proxy && !self.tunnel) { - self.port = self.proxy.port - self.host = self.proxy.hostname - } else { - self.port = self.uri.port - self.host = self.uri.hostname - } - - self.clientErrorHandler = function (error) { - if (self._aborted) return - if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET' - && self.agent.addRequestNoreuse) { - self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) } - self.start() - self.req.end() - return - } - if (self.timeout && self.timeoutTimer) { - clearTimeout(self.timeoutTimer) - self.timeoutTimer = null - } - self.emit('error', error) - } - - self._parserErrorHandler = function (error) { - if (this.res) { - if (this.res.request) { - this.res.request.emit('error', error) - } else { - this.res.emit('error', error) - } - } else { - this._httpMessage.emit('error', error) - } - } - - if (options.form) { - self.form(options.form) - } - - if (options.qs) self.qs(options.qs) - - if (self.uri.path) { - self.path = self.uri.path - } else { - self.path = self.uri.pathname + (self.uri.search || "") - } - - if (self.path.length === 0) self.path = '/' - - - // Auth must happen last in case signing is dependent on other headers - if (options.oauth) { - self.oauth(options.oauth) - } - - if (options.aws) { - self.aws(options.aws) - } - - if (options.hawk) { - self.hawk(options.hawk) - } - - if (options.httpSignature) { - self.httpSignature(options.httpSignature) - } - - if (options.auth) { - if (Object.prototype.hasOwnProperty.call(options.auth, 'username')) options.auth.user = options.auth.username - if (Object.prototype.hasOwnProperty.call(options.auth, 'password')) options.auth.pass = options.auth.password - - self.auth( - options.auth.user, - options.auth.pass, - options.auth.sendImmediately - ) - } - - if (self.uri.auth && !self.hasHeader('authorization')) { - var authPieces = self.uri.auth.split(':').map(function(item){ return querystring.unescape(item) }) - self.auth(authPieces[0], authPieces.slice(1).join(':'), true) - } - if (self.proxy && self.proxy.auth && !self.hasHeader('proxy-authorization') && !self.tunnel) { - self.setHeader('proxy-authorization', "Basic " + toBase64(self.proxy.auth.split(':').map(function(item){ return querystring.unescape(item)}).join(':'))) - } - - - if (self.proxy && !self.tunnel) self.path = (self.uri.protocol + '//' + self.uri.host + self.path) - - if (options.json) { - self.json(options.json) - } else if (options.multipart) { - self.boundary = uuid() - self.multipart(options.multipart) - } - - if (self.body) { - var length = 0 - if (!Buffer.isBuffer(self.body)) { - if (Array.isArray(self.body)) { - for (var i = 0; i < self.body.length; i++) { - length += self.body[i].length - } - } else { - self.body = new Buffer(self.body) - length = self.body.length - } - } else { - length = self.body.length - } - if (length) { - if (!self.hasHeader('content-length')) self.setHeader('content-length', length) - } else { - throw new Error('Argument error, options.body.') - } - } - - var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol - , defaultModules = {'http:':http, 'https:':https} - , httpModules = self.httpModules || {} - ; - self.httpModule = httpModules[protocol] || defaultModules[protocol] - - if (!self.httpModule) return this.emit('error', new Error("Invalid protocol")) - - if (options.ca) self.ca = options.ca - - if (!self.agent) { - if (options.agentOptions) self.agentOptions = options.agentOptions - - if (options.agentClass) { - self.agentClass = options.agentClass - } else if (options.forever) { - self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL - } else { - self.agentClass = self.httpModule.Agent - } - } - - if (self.pool === false) { - self.agent = false - } else { - self.agent = self.agent || self.getAgent() - if (self.maxSockets) { - // Don't use our pooling if node has the refactored client - self.agent.maxSockets = self.maxSockets - } - if (self.pool.maxSockets) { - // Don't use our pooling if node has the refactored client - self.agent.maxSockets = self.pool.maxSockets - } - } - - self.on('pipe', function (src) { - if (self.ntick && self._started) throw new Error("You cannot pipe to this stream after the outbound request has started.") - self.src = src - if (isReadStream(src)) { - if (!self.hasHeader('content-type')) self.setHeader('content-type', mime.lookup(src.path)) - } else { - if (src.headers) { - for (var i in src.headers) { - if (!self.hasHeader(i)) { - self.setHeader(i, src.headers[i]) - } - } - } - if (self._json && !self.hasHeader('content-type')) - self.setHeader('content-type', 'application/json') - if (src.method && !self.explicitMethod) { - self.method = src.method - } - } - - // self.on('pipe', function () { - // console.error("You have already piped to this stream. Pipeing twice is likely to break the request.") - // }) - }) - - process.nextTick(function () { - if (self._aborted) return - - if (self._form) { - self.setHeaders(self._form.getHeaders()) - self._form.pipe(self) - } - if (self.body) { - if (Array.isArray(self.body)) { - self.body.forEach(function (part) { - self.write(part) - }) - } else { - self.write(self.body) - } - self.end() - } else if (self.requestBodyStream) { - console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe.") - self.requestBodyStream.pipe(self) - } else if (!self.src) { - if (self.method !== 'GET' && typeof self.method !== 'undefined') { - self.setHeader('content-length', 0) - } - self.end() - } - self.ntick = true - }) -} - -// Must call this when following a redirect from https to http or vice versa -// Attempts to keep everything as identical as possible, but update the -// httpModule, Tunneling agent, and/or Forever Agent in use. -Request.prototype._updateProtocol = function () { - var self = this - var protocol = self.uri.protocol - - if (protocol === 'https:') { - // previously was doing http, now doing https - // if it's https, then we might need to tunnel now. - if (self.proxy && self.canTunnel) { - self.tunnel = true - var tunnelFn = self.proxy.protocol === 'http:' - ? tunnel.httpsOverHttp : tunnel.httpsOverHttps - var tunnelOptions = { proxy: { host: self.proxy.hostname - , port: +self.proxy.port - , proxyAuth: self.proxy.auth } - , rejectUnauthorized: self.rejectUnauthorized - , ca: self.ca } - self.agent = tunnelFn(tunnelOptions) - return - } - - self.httpModule = https - switch (self.agentClass) { - case ForeverAgent: - self.agentClass = ForeverAgent.SSL - break - case http.Agent: - self.agentClass = https.Agent - break - default: - // nothing we can do. Just hope for the best. - return - } - - // if there's an agent, we need to get a new one. - if (self.agent) self.agent = self.getAgent() - - } else { - // previously was doing https, now doing http - // stop any tunneling. - if (self.tunnel) self.tunnel = false - self.httpModule = http - switch (self.agentClass) { - case ForeverAgent.SSL: - self.agentClass = ForeverAgent - break - case https.Agent: - self.agentClass = http.Agent - break - default: - // nothing we can do. just hope for the best - return - } - - // if there's an agent, then get a new one. - if (self.agent) { - self.agent = null - self.agent = self.getAgent() - } - } -} - -Request.prototype.getAgent = function () { - var Agent = this.agentClass - var options = {} - if (this.agentOptions) { - for (var i in this.agentOptions) { - options[i] = this.agentOptions[i] - } - } - if (this.ca) options.ca = this.ca - if (this.ciphers) options.ciphers = this.ciphers - if (this.secureProtocol) options.secureProtocol = this.secureProtocol - if (typeof this.rejectUnauthorized !== 'undefined') options.rejectUnauthorized = this.rejectUnauthorized - - if (this.cert && this.key) { - options.key = this.key - options.cert = this.cert - } - - var poolKey = '' - - // different types of agents are in different pools - if (Agent !== this.httpModule.Agent) { - poolKey += Agent.name - } - - if (!this.httpModule.globalAgent) { - // node 0.4.x - options.host = this.host - options.port = this.port - if (poolKey) poolKey += ':' - poolKey += this.host + ':' + this.port - } - - // ca option is only relevant if proxy or destination are https - var proxy = this.proxy - if (typeof proxy === 'string') proxy = url.parse(proxy) - var isHttps = (proxy && proxy.protocol === 'https:') || this.uri.protocol === 'https:' - if (isHttps) { - if (options.ca) { - if (poolKey) poolKey += ':' - poolKey += options.ca - } - - if (typeof options.rejectUnauthorized !== 'undefined') { - if (poolKey) poolKey += ':' - poolKey += options.rejectUnauthorized - } - - if (options.cert) - poolKey += options.cert.toString('ascii') + options.key.toString('ascii') - - if (options.ciphers) { - if (poolKey) poolKey += ':' - poolKey += options.ciphers - } - - if (options.secureProtocol) { - if (poolKey) poolKey += ':' - poolKey += options.secureProtocol - } - } - - if (this.pool === globalPool && !poolKey && Object.keys(options).length === 0 && this.httpModule.globalAgent) { - // not doing anything special. Use the globalAgent - return this.httpModule.globalAgent - } - - // we're using a stored agent. Make sure it's protocol-specific - poolKey = this.uri.protocol + poolKey - - // already generated an agent for this setting - if (this.pool[poolKey]) return this.pool[poolKey] - - return this.pool[poolKey] = new Agent(options) -} - -Request.prototype.start = function () { - // start() is called once we are ready to send the outgoing HTTP request. - // this is usually called on the first write(), end() or on nextTick() - var self = this - - if (self._aborted) return - - self._started = true - self.method = self.method || 'GET' - self.href = self.uri.href - - if (self.src && self.src.stat && self.src.stat.size && !self.hasHeader('content-length')) { - self.setHeader('content-length', self.src.stat.size) - } - if (self._aws) { - self.aws(self._aws, true) - } - - // We have a method named auth, which is completely different from the http.request - // auth option. If we don't remove it, we're gonna have a bad time. - var reqOptions = copy(self) - delete reqOptions.auth - - debug('make request', self.uri.href) - self.req = self.httpModule.request(reqOptions, self.onResponse.bind(self)) - - if (self.timeout && !self.timeoutTimer) { - self.timeoutTimer = setTimeout(function () { - self.req.abort() - var e = new Error("ETIMEDOUT") - e.code = "ETIMEDOUT" - self.emit("error", e) - }, self.timeout) - - // Set additional timeout on socket - in case if remote - // server freeze after sending headers - if (self.req.setTimeout) { // only works on node 0.6+ - self.req.setTimeout(self.timeout, function () { - if (self.req) { - self.req.abort() - var e = new Error("ESOCKETTIMEDOUT") - e.code = "ESOCKETTIMEDOUT" - self.emit("error", e) - } - }) - } - } - - self.req.on('error', self.clientErrorHandler) - self.req.on('drain', function() { - self.emit('drain') - }) - self.on('end', function() { - if ( self.req.connection ) self.req.connection.removeListener('error', self._parserErrorHandler) - }) - self.emit('request', self.req) -} -Request.prototype.onResponse = function (response) { - var self = this - debug('onResponse', self.uri.href, response.statusCode, response.headers) - response.on('end', function() { - debug('response end', self.uri.href, response.statusCode, response.headers) - }); - - if (response.connection.listeners('error').indexOf(self._parserErrorHandler) === -1) { - response.connection.once('error', self._parserErrorHandler) - } - if (self._aborted) { - debug('aborted', self.uri.href) - response.resume() - return - } - if (self._paused) response.pause() - else response.resume() - - self.response = response - response.request = self - response.toJSON = toJSON - - // XXX This is different on 0.10, because SSL is strict by default - if (self.httpModule === https && - self.strictSSL && - !response.client.authorized) { - debug('strict ssl error', self.uri.href) - var sslErr = response.client.authorizationError - self.emit('error', new Error('SSL Error: '+ sslErr)) - return - } - - if (self.setHost && self.hasHeader('host')) delete self.headers[self.hasHeader('host')] - if (self.timeout && self.timeoutTimer) { - clearTimeout(self.timeoutTimer) - self.timeoutTimer = null - } - - var addCookie = function (cookie) { - if (self._jar){ - var targetCookieJar = self._jar.setCookie?self._jar:cookieJar; - - //set the cookie if it's domain in the href's domain. - targetCookieJar.setCookie(cookie, self.uri.href, function(err){ - if (err){ - console.warn('set cookie failed,'+ err) - } - }) - } - - } - - if (hasHeader('set-cookie', response.headers) && (!self._disableCookies)) { - var headerName = hasHeader('set-cookie', response.headers) - if (Array.isArray(response.headers[headerName])) response.headers[headerName].forEach(addCookie) - else addCookie(response.headers[headerName]) - } - - var redirectTo = null - if (response.statusCode >= 300 && response.statusCode < 400 && hasHeader('location', response.headers)) { - var location = response.headers[hasHeader('location', response.headers)] - debug('redirect', location) - - if (self.followAllRedirects) { - redirectTo = location - } else if (self.followRedirect) { - switch (self.method) { - case 'PATCH': - case 'PUT': - case 'POST': - case 'DELETE': - // Do not follow redirects - break - default: - redirectTo = location - break - } - } - } else if (response.statusCode == 401 && self._hasAuth && !self._sentAuth) { - var authHeader = response.headers[hasHeader('www-authenticate', response.headers)] - var authVerb = authHeader && authHeader.split(' ')[0] - debug('reauth', authVerb) - - switch (authVerb) { - case 'Basic': - self.auth(self._user, self._pass, true) - redirectTo = self.uri - break - - case 'Digest': - // TODO: More complete implementation of RFC 2617. - // - check challenge.algorithm - // - support algorithm="MD5-sess" - // - handle challenge.domain - // - support qop="auth-int" only - // - handle Authentication-Info (not necessarily?) - // - check challenge.stale (not necessarily?) - // - increase nc (not necessarily?) - // For reference: - // http://tools.ietf.org/html/rfc2617#section-3 - // https://github.com/bagder/curl/blob/master/lib/http_digest.c - - var challenge = {} - var re = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi - for (;;) { - var match = re.exec(authHeader) - if (!match) break - challenge[match[1]] = match[2] || match[3]; - } - - var ha1 = md5(self._user + ':' + challenge.realm + ':' + self._pass) - var ha2 = md5(self.method + ':' + self.uri.path) - var qop = /(^|,)\s*auth\s*($|,)/.test(challenge.qop) && 'auth' - var nc = qop && '00000001' - var cnonce = qop && uuid().replace(/-/g, '') - var digestResponse = qop ? md5(ha1 + ':' + challenge.nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + ha2) : md5(ha1 + ':' + challenge.nonce + ':' + ha2) - var authValues = { - username: self._user, - realm: challenge.realm, - nonce: challenge.nonce, - uri: self.uri.path, - qop: qop, - response: digestResponse, - nc: nc, - cnonce: cnonce, - algorithm: challenge.algorithm, - opaque: challenge.opaque - } - - authHeader = [] - for (var k in authValues) { - if (!authValues[k]) { - //ignore - } else if (k === 'qop' || k === 'nc' || k === 'algorithm') { - authHeader.push(k + '=' + authValues[k]) - } else { - authHeader.push(k + '="' + authValues[k] + '"') - } - } - authHeader = 'Digest ' + authHeader.join(', ') - self.setHeader('authorization', authHeader) - self._sentAuth = true - - redirectTo = self.uri - break - } - } - - if (redirectTo) { - debug('redirect to', redirectTo) - - // ignore any potential response body. it cannot possibly be useful - // to us at this point. - if (self._paused) response.resume() - - if (self._redirectsFollowed >= self.maxRedirects) { - self.emit('error', new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+self.uri.href)) - return - } - self._redirectsFollowed += 1 - - if (!isUrl.test(redirectTo)) { - redirectTo = url.resolve(self.uri.href, redirectTo) - } - - var uriPrev = self.uri - self.uri = url.parse(redirectTo) - - // handle the case where we change protocol from https to http or vice versa - if (self.uri.protocol !== uriPrev.protocol) { - self._updateProtocol() - } - - self.redirects.push( - { statusCode : response.statusCode - , redirectUri: redirectTo - } - ) - if (self.followAllRedirects && response.statusCode != 401) self.method = 'GET' - // self.method = 'GET' // Force all redirects to use GET || commented out fixes #215 - delete self.src - delete self.req - delete self.agent - delete self._started - if (response.statusCode != 401) { - // Remove parameters from the previous response, unless this is the second request - // for a server that requires digest authentication. - delete self.body - delete self._form - if (self.headers) { - if (self.hasHeader('host')) delete self.headers[self.hasHeader('host')] - if (self.hasHeader('content-type')) delete self.headers[self.hasHeader('content-type')] - if (self.hasHeader('content-length')) delete self.headers[self.hasHeader('content-length')] - } - } - - self.emit('redirect'); - - self.init() - return // Ignore the rest of the response - } else { - self._redirectsFollowed = self._redirectsFollowed || 0 - // Be a good stream and emit end when the response is finished. - // Hack to emit end on close because of a core bug that never fires end - response.on('close', function () { - if (!self._ended) self.response.emit('end') - }) - - if (self.encoding) { - if (self.dests.length !== 0) { - console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.") - } else { - response.setEncoding(self.encoding) - } - } - - self.emit('response', response) - - self.dests.forEach(function (dest) { - self.pipeDest(dest) - }) - - response.on("data", function (chunk) { - self._destdata = true - self.emit("data", chunk) - }) - response.on("end", function (chunk) { - self._ended = true - self.emit("end", chunk) - }) - response.on("close", function () {self.emit("close")}) - - if (self.callback) { - var buffer = [] - var bodyLen = 0 - self.on("data", function (chunk) { - buffer.push(chunk) - bodyLen += chunk.length - }) - self.on("end", function () { - debug('end event', self.uri.href) - if (self._aborted) { - debug('aborted', self.uri.href) - return - } - - if (buffer.length && Buffer.isBuffer(buffer[0])) { - debug('has body', self.uri.href, bodyLen) - var body = new Buffer(bodyLen) - var i = 0 - buffer.forEach(function (chunk) { - chunk.copy(body, i, 0, chunk.length) - i += chunk.length - }) - if (self.encoding === null) { - response.body = body - } else { - response.body = body.toString(self.encoding) - } - } else if (buffer.length) { - // The UTF8 BOM [0xEF,0xBB,0xBF] is converted to [0xFE,0xFF] in the JS UTC16/UCS2 representation. - // Strip this value out when the encoding is set to 'utf8', as upstream consumers won't expect it and it breaks JSON.parse(). - if (self.encoding === 'utf8' && buffer[0].length > 0 && buffer[0][0] === "\uFEFF") { - buffer[0] = buffer[0].substring(1) - } - response.body = buffer.join('') - } - - if (self._json) { - try { - response.body = JSON.parse(response.body) - } catch (e) {} - } - debug('emitting complete', self.uri.href) - if(response.body == undefined && !self._json) { - response.body = ""; - } - self.emit('complete', response, response.body) - }) - } - //if no callback - else{ - self.on("end", function () { - if (self._aborted) { - debug('aborted', self.uri.href) - return - } - self.emit('complete', response); - }); - } - } - debug('finish init function', self.uri.href) -} - -Request.prototype.abort = function () { - this._aborted = true - - if (this.req) { - this.req.abort() - } - else if (this.response) { - this.response.abort() - } - - this.emit("abort") -} - -Request.prototype.pipeDest = function (dest) { - var response = this.response - // Called after the response is received - if (dest.headers && !dest.headersSent) { - if (hasHeader('content-type', response.headers)) { - var ctname = hasHeader('content-type', response.headers) - if (dest.setHeader) dest.setHeader(ctname, response.headers[ctname]) - else dest.headers[ctname] = response.headers[ctname] - } - - if (hasHeader('content-length', response.headers)) { - var clname = hasHeader('content-length', response.headers) - if (dest.setHeader) dest.setHeader(clname, response.headers[clname]) - else dest.headers[clname] = response.headers[clname] - } - } - if (dest.setHeader && !dest.headersSent) { - for (var i in response.headers) { - dest.setHeader(i, response.headers[i]) - } - dest.statusCode = response.statusCode - } - if (this.pipefilter) this.pipefilter(response, dest) -} - -// Composable API -Request.prototype.setHeader = function (name, value, clobber) { - if (clobber === undefined) clobber = true - if (clobber || !this.hasHeader(name)) this.headers[name] = value - else this.headers[this.hasHeader(name)] += ',' + value - return this -} -Request.prototype.setHeaders = function (headers) { - for (var i in headers) {this.setHeader(i, headers[i])} - return this -} -Request.prototype.hasHeader = function (header, headers) { - var headers = Object.keys(headers || this.headers) - , lheaders = headers.map(function (h) {return h.toLowerCase()}) - ; - header = header.toLowerCase() - for (var i=0;i<lheaders.length;i++) { - if (lheaders[i] === header) return headers[i] - } - return false -} - -var hasHeader = Request.prototype.hasHeader - -Request.prototype.qs = function (q, clobber) { - var base - if (!clobber && this.uri.query) base = qs.parse(this.uri.query) - else base = {} - - for (var i in q) { - base[i] = q[i] - } - - if (qs.stringify(base) === ''){ - return this - } - - this.uri = url.parse(this.uri.href.split('?')[0] + '?' + qs.stringify(base)) - this.url = this.uri - this.path = this.uri.path - - return this -} -Request.prototype.form = function (form) { - if (form) { - this.setHeader('content-type', 'application/x-www-form-urlencoded; charset=utf-8') - this.body = qs.stringify(form).toString('utf8') - return this - } - // create form-data object - this._form = new FormData() - return this._form -} -Request.prototype.multipart = function (multipart) { - var self = this - self.body = [] - - if (!self.hasHeader('content-type')) { - self.setHeader('content-type', 'multipart/related; boundary=' + self.boundary) - } else { - var headerName = self.hasHeader('content-type'); - self.setHeader(headerName, self.headers[headerName].split(';')[0] + '; boundary=' + self.boundary) - } - - if (!multipart.forEach) throw new Error('Argument error, options.multipart.') - - if (self.preambleCRLF) { - self.body.push(new Buffer('\r\n')) - } - - multipart.forEach(function (part) { - var body = part.body - if(body == null) throw Error('Body attribute missing in multipart.') - delete part.body - var preamble = '--' + self.boundary + '\r\n' - Object.keys(part).forEach(function (key) { - preamble += key + ': ' + part[key] + '\r\n' - }) - preamble += '\r\n' - self.body.push(new Buffer(preamble)) - self.body.push(new Buffer(body)) - self.body.push(new Buffer('\r\n')) - }) - self.body.push(new Buffer('--' + self.boundary + '--')) - return self -} -Request.prototype.json = function (val) { - var self = this - - if (!self.hasHeader('accept')) self.setHeader('accept', 'application/json') - - this._json = true - if (typeof val === 'boolean') { - if (typeof this.body === 'object') { - this.body = safeStringify(this.body) - self.setHeader('content-type', 'application/json') - } - } else { - this.body = safeStringify(val) - self.setHeader('content-type', 'application/json') - } - return this -} -Request.prototype.getHeader = function (name, headers) { - var result, re, match - if (!headers) headers = this.headers - Object.keys(headers).forEach(function (key) { - re = new RegExp(name, 'i') - match = key.match(re) - if (match) result = headers[key] - }) - return result -} -var getHeader = Request.prototype.getHeader - -Request.prototype.auth = function (user, pass, sendImmediately) { - if (typeof user !== 'string' || (pass !== undefined && typeof pass !== 'string')) { - throw new Error('auth() received invalid user or password') - } - this._user = user - this._pass = pass - this._hasAuth = true - var header = typeof pass !== 'undefined' ? user + ':' + pass : user - if (sendImmediately || typeof sendImmediately == 'undefined') { - this.setHeader('authorization', 'Basic ' + toBase64(header)) - this._sentAuth = true - } - return this -} -Request.prototype.aws = function (opts, now) { - if (!now) { - this._aws = opts - return this - } - var date = new Date() - this.setHeader('date', date.toUTCString()) - var auth = - { key: opts.key - , secret: opts.secret - , verb: this.method.toUpperCase() - , date: date - , contentType: this.getHeader('content-type') || '' - , md5: this.getHeader('content-md5') || '' - , amazonHeaders: aws.canonicalizeHeaders(this.headers) - } - if (opts.bucket && this.path) { - auth.resource = '/' + opts.bucket + this.path - } else if (opts.bucket && !this.path) { - auth.resource = '/' + opts.bucket - } else if (!opts.bucket && this.path) { - auth.resource = this.path - } else if (!opts.bucket && !this.path) { - auth.resource = '/' - } - auth.resource = aws.canonicalizeResource(auth.resource) - this.setHeader('authorization', aws.authorization(auth)) - - return this -} -Request.prototype.httpSignature = function (opts) { - var req = this - httpSignature.signRequest({ - getHeader: function(header) { - return getHeader(header, req.headers) - }, - setHeader: function(header, value) { - req.setHeader(header, value) - }, - method: this.method, - path: this.path - }, opts) - debug('httpSignature authorization', this.getHeader('authorization')) - - return this -} - -Request.prototype.hawk = function (opts) { - this.setHeader('Authorization', hawk.client.header(this.uri, this.method, opts).field) -} - -Request.prototype.oauth = function (_oauth) { - var form - if (this.hasHeader('content-type') && - this.getHeader('content-type').slice(0, 'application/x-www-form-urlencoded'.length) === - 'application/x-www-form-urlencoded' - ) { - form = qs.parse(this.body) - } - if (this.uri.query) { - form = qs.parse(this.uri.query) - } - if (!form) form = {} - var oa = {} - for (var i in form) oa[i] = form[i] - for (var i in _oauth) oa['oauth_'+i] = _oauth[i] - if (!oa.oauth_version) oa.oauth_version = '1.0' - if (!oa.oauth_timestamp) oa.oauth_timestamp = Math.floor( Date.now() / 1000 ).toString() - if (!oa.oauth_nonce) oa.oauth_nonce = uuid().replace(/-/g, '') - - oa.oauth_signature_method = 'HMAC-SHA1' - - var consumer_secret = oa.oauth_consumer_secret - delete oa.oauth_consumer_secret - var token_secret = oa.oauth_token_secret - delete oa.oauth_token_secret - var timestamp = oa.oauth_timestamp - - var baseurl = this.uri.protocol + '//' + this.uri.host + this.uri.pathname - var signature = oauth.hmacsign(this.method, baseurl, oa, consumer_secret, token_secret) - - // oa.oauth_signature = signature - for (var i in form) { - if ( i.slice(0, 'oauth_') in _oauth) { - // skip - } else { - delete oa['oauth_'+i] - if (i !== 'x_auth_mode') delete oa[i] - } - } - oa.oauth_timestamp = timestamp - var authHeader = 'OAuth '+Object.keys(oa).sort().map(function (i) {return i+'="'+oauth.rfc3986(oa[i])+'"'}).join(',') - authHeader += ',oauth_signature="' + oauth.rfc3986(signature) + '"' - this.setHeader('Authorization', authHeader) - return this -} -Request.prototype.jar = function (jar) { - var cookies - - if (this._redirectsFollowed === 0) { - this.originalCookieHeader = this.getHeader('cookie') - } - - if (!jar) { - // disable cookies - cookies = false - this._disableCookies = true - } else { - var targetCookieJar = (jar && jar.getCookieString)?jar:cookieJar; - var urihref = this.uri.href - - //fetch cookie in the Specified host - targetCookieJar.getCookieString(urihref, function(err, hrefCookie){ - if (err){ - console.warn('get cookieString failed,' +err) - } else { - cookies = hrefCookie - } - }) - - } - - //if need cookie and cookie is not empty - if (cookies && cookies.length) { - if (this.originalCookieHeader) { - // Don't overwrite existing Cookie header - this.setHeader('cookie', this.originalCookieHeader + '; ' + cookies) - } else { - this.setHeader('cookie', cookies) - } - } - this._jar = jar - return this -} - - -// Stream API -Request.prototype.pipe = function (dest, opts) { - if (this.response) { - if (this._destdata) { - throw new Error("You cannot pipe after data has been emitted from the response.") - } else if (this._ended) { - throw new Error("You cannot pipe after the response has been ended.") - } else { - stream.Stream.prototype.pipe.call(this, dest, opts) - this.pipeDest(dest) - return dest - } - } else { - this.dests.push(dest) - stream.Stream.prototype.pipe.call(this, dest, opts) - return dest - } -} -Request.prototype.write = function () { - if (!this._started) this.start() - return this.req.write.apply(this.req, arguments) -} -Request.prototype.end = function (chunk) { - if (chunk) this.write(chunk) - if (!this._started) this.start() - this.req.end() -} -Request.prototype.pause = function () { - if (!this.response) this._paused = true - else this.response.pause.apply(this.response, arguments) -} -Request.prototype.resume = function () { - if (!this.response) this._paused = false - else this.response.resume.apply(this.response, arguments) -} -Request.prototype.destroy = function () { - if (!this._ended) this.end() - else if (this.response) this.response.destroy() -} - -function toJSON () { - return getSafe(this, '__' + (((1+Math.random())*0x10000)|0).toString(16)) -} - -Request.prototype.toJSON = toJSON - - -module.exports = Request diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.jshintrc b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.jshintrc deleted file mode 100644 index c8ef3ca4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.jshintrc +++ /dev/null @@ -1,59 +0,0 @@ -{ - "predef": [ ] - , "bitwise": false - , "camelcase": false - , "curly": false - , "eqeqeq": false - , "forin": false - , "immed": false - , "latedef": false - , "noarg": true - , "noempty": true - , "nonew": true - , "plusplus": false - , "quotmark": true - , "regexp": false - , "undef": true - , "unused": true - , "strict": false - , "trailing": true - , "maxlen": 120 - , "asi": true - , "boss": true - , "debug": true - , "eqnull": true - , "esnext": true - , "evil": true - , "expr": true - , "funcscope": false - , "globalstrict": false - , "iterator": false - , "lastsemic": true - , "laxbreak": true - , "laxcomma": true - , "loopfunc": true - , "multistr": false - , "onecase": false - , "proto": false - , "regexdash": false - , "scripturl": true - , "smarttabs": false - , "shadow": false - , "sub": true - , "supernew": false - , "validthis": true - , "browser": true - , "couch": false - , "devel": false - , "dojo": false - , "mootools": false - , "node": true - , "nonstandard": true - , "prototypejs": false - , "rhino": false - , "worker": true - , "wsh": false - , "nomen": false - , "onevar": false - , "passfail": false -} \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.travis.yml deleted file mode 100644 index 12b1a310..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: node_js -node_js: -- '0.8' -- '0.10' -- '0.11' -branches: - only: - - master -notifications: - email: - - rod@vagg.org -script: npm test -env: - global: - - SAUCE_USER=through2-sauce - - secure: A8KyygIlklZOcTwTGhZHpkOu7Cn4tI1QQasg75CTSjudczGzkuh1pG2RDIkWqGcrWv9o5CjI6fFYYx0JvQu8o5PO+ZAtV1Z0AlnM965vE8kAx0XEC7giAV323bibfnHwyQu74vIhbOfdes7E4/cYerV2kAjK0T375D4DYEpDuvw= - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/LICENSE deleted file mode 100644 index f6a0029d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/LICENSE +++ /dev/null @@ -1,39 +0,0 @@ -Copyright 2013, Rod Vagg (the "Original Author") -All rights reserved. - -MIT +no-false-attribs License - -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. - -Distributions of all or part of the Software intended to be used -by the recipients as they would use the unmodified Software, -containing modifications that substantially alter, remove, or -disable functionality of the Software, outside of the documented -configuration mechanisms provided by the Software, shall be -modified such that the Original Author's bug reporting email -addresses and urls are either replaced with the contact information -of the parties responsible for the changes, or removed entirely. - -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. - - -Except where noted, this license applies to any and all software -programs and associated documentation files created by the -Original Author, when distributed with the Software. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/README.md deleted file mode 100644 index c9388b38..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/README.md +++ /dev/null @@ -1,131 +0,0 @@ -# through2 - -<!-- - -soon ... - -[![Build Status](https://secure.travis-ci.org/rvagg/through2.png)](http://travis-ci.org/rvagg/through2) - -[![Build Status](https://saucelabs.com/browser-matrix/through2-sauce.svg)](https://travis-ci.org/rvagg/through2) - ---> - -[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/) - -<!-- -not happy with these, we need to peg to readable-stream@1.0.x so it'll always report out-of-date - -[![david-dm](https://david-dm.org/rvagg/through2.png)](https://david-dm.org/rvagg/through2/) -[![david-dm](https://david-dm.org/rvagg/through2/dev-status.png)](https://david-dm.org/rvagg/through2#info=devDependencies/) ---> - -**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise** - -Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`. - -```js -fs.createReadStream('ex.txt') - .pipe(through2(function (chunk, enc, callback) { - - for (var i = 0; i < chunk.length; i++) - if (chunk[i] == 97) - chunk[i] = 122 // swap 'a' for 'z' - - this.push(chunk) - - callback() - - })) - .pipe(fs.createWriteStream('out.txt')) -``` - -Or object streams: - -```js -var all = [] - -fs.createReadStream('data.csv') - .pipe(csv2()) - .pipe(through2.obj(function (chunk, enc, callback) { - - var data = { - name : chunk[0] - , address : chunk[3] - , phone : chunk[10] - } - - this.push(data) - - callback() - - })) - .on('data', function (data) { - all.push(data) - }) - .on('end', function () { - doSomethingSpecial(all) - }) -``` - -Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`. - -## API - -<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b> - -Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`). - -### options - -The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`). - -The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call: - -```js -fs.createReadStream('/tmp/important.dat') - .pipe(through2({ objectMode: true, allowHalfOpen: false }, function (chunk, enc, cb) { - - this.push(new Buffer('wut?')) - cb() - - }) - .pipe(fs.createWriteStream('/tmp/wut.txt')) -``` - -### transformFunction - -The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk. - -To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on. - -If you **do not provide a `transformFunction`** then you will get a simple simple pass-through stream. - -### flushFunction - -The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress. - -<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b> - -Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances. - -```js -var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) { - if (record.temp != null && record.unit = "F") { - record.temp = ( ( record.temp - 32 ) * 5 ) / 9 - record.unit = "C" - } - this.push(record) - callback() -}) - -// Create instances of FToC like so: -var converter = new FToC() -// Or: -var converter = FToC() -// Or specify/override options when you instantiate, if you prefer: -var converter = FToC({objectMode: true}) -``` - -## License - -**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/.npmignore deleted file mode 100644 index 38344f87..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/README.md deleted file mode 100644 index be976683..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/README.md +++ /dev/null @@ -1,768 +0,0 @@ -# readable-stream - -A new class of streams for Node.js - -This module provides the new Stream base classes introduced in Node -v0.10, for use in Node v0.8. You can use it to have programs that -have to work with node v0.8, while being forward-compatible for v0.10 -and beyond. When you drop support for v0.8, you can remove this -module, and only use the native streams. - -This is almost exactly the same codebase as appears in Node v0.10. -However: - -1. The exported object is actually the Readable class. Decorating the - native `stream` module would be global pollution. -2. In v0.10, you can safely use `base64` as an argument to - `setEncoding` in Readable streams. However, in v0.8, the - StringDecoder class has no `end()` method, which is problematic for - Base64. So, don't use that, because it'll break and be weird. - -Other than that, the API is the same as `require('stream')` in v0.10, -so the API docs are reproduced below. - ----------- - - Stability: 2 - Unstable - -A stream is an abstract interface implemented by various objects in -Node. For example a request to an HTTP server is a stream, as is -stdout. Streams are readable, writable, or both. All streams are -instances of [EventEmitter][] - -You can load the Stream base classes by doing `require('stream')`. -There are base classes provided for Readable streams, Writable -streams, Duplex streams, and Transform streams. - -## Compatibility - -In earlier versions of Node, the Readable stream interface was -simpler, but also less powerful and less useful. - -* Rather than waiting for you to call the `read()` method, `'data'` - events would start emitting immediately. If you needed to do some - I/O to decide how to handle data, then you had to store the chunks - in some kind of buffer so that they would not be lost. -* The `pause()` method was advisory, rather than guaranteed. This - meant that you still had to be prepared to receive `'data'` events - even when the stream was in a paused state. - -In Node v0.10, the Readable class described below was added. For -backwards compatibility with older Node programs, Readable streams -switch into "old mode" when a `'data'` event handler is added, or when -the `pause()` or `resume()` methods are called. The effect is that, -even if you are not using the new `read()` method and `'readable'` -event, you no longer have to worry about losing `'data'` chunks. - -Most programs will continue to function normally. However, this -introduces an edge case in the following conditions: - -* No `'data'` event handler is added. -* The `pause()` and `resume()` methods are never called. - -For example, consider the following code: - -```javascript -// WARNING! BROKEN! -net.createServer(function(socket) { - - // we add an 'end' method, but never consume the data - socket.on('end', function() { - // It will never get here. - socket.end('I got your message (but didnt read it)\n'); - }); - -}).listen(1337); -``` - -In versions of node prior to v0.10, the incoming message data would be -simply discarded. However, in Node v0.10 and beyond, the socket will -remain paused forever. - -The workaround in this situation is to call the `resume()` method to -trigger "old mode" behavior: - -```javascript -// Workaround -net.createServer(function(socket) { - - socket.on('end', function() { - socket.end('I got your message (but didnt read it)\n'); - }); - - // start the flow of data, discarding it. - socket.resume(); - -}).listen(1337); -``` - -In addition to new Readable streams switching into old-mode, pre-v0.10 -style streams can be wrapped in a Readable class using the `wrap()` -method. - -## Class: stream.Readable - -<!--type=class--> - -A `Readable Stream` has the following methods, members, and events. - -Note that `stream.Readable` is an abstract class designed to be -extended with an underlying implementation of the `_read(size)` -method. (See below.) - -### new stream.Readable([options]) - -* `options` {Object} - * `highWaterMark` {Number} The maximum number of bytes to store in - the internal buffer before ceasing to read from the underlying - resource. Default=16kb - * `encoding` {String} If specified, then buffers will be decoded to - strings using the specified encoding. Default=null - * `objectMode` {Boolean} Whether this stream should behave - as a stream of objects. Meaning that stream.read(n) returns - a single value instead of a Buffer of size n - -In classes that extend the Readable class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### readable.\_read(size) - -* `size` {Number} Number of bytes to read asynchronously - -Note: **This function should NOT be called directly.** It should be -implemented by child classes, and called by the internal Readable -class methods only. - -All Readable stream implementations must provide a `_read` method -to fetch data from the underlying resource. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -When data is available, put it into the read queue by calling -`readable.push(chunk)`. If `push` returns false, then you should stop -reading. When `_read` is called again, you should start pushing more -data. - -The `size` argument is advisory. Implementations where a "read" is a -single call that returns data can use this to know how much data to -fetch. Implementations where that is not relevant, such as TCP or -TLS, may ignore this argument, and simply provide data whenever it -becomes available. There is no need, for example to "wait" until -`size` bytes are available before calling `stream.push(chunk)`. - -### readable.push(chunk) - -* `chunk` {Buffer | null | String} Chunk of data to push into the read queue -* return {Boolean} Whether or not more pushes should be performed - -Note: **This function should be called by Readable implementors, NOT -by consumers of Readable subclasses.** The `_read()` function will not -be called again until at least one `push(chunk)` call is made. If no -data is available, then you MAY call `push('')` (an empty string) to -allow a future `_read` call, without adding any data to the queue. - -The `Readable` class works by putting data into a read queue to be -pulled out later by calling the `read()` method when the `'readable'` -event fires. - -The `push()` method will explicitly insert some data into the read -queue. If it is called with `null` then it will signal the end of the -data. - -In some cases, you may be wrapping a lower-level source which has some -sort of pause/resume mechanism, and a data callback. In those cases, -you could wrap the low-level source object by doing something like -this: - -```javascript -// source is an object with readStop() and readStart() methods, -// and an `ondata` member that gets called when it has data, and -// an `onend` member that gets called when the data is over. - -var stream = new Readable(); - -source.ondata = function(chunk) { - // if push() returns false, then we need to stop reading from source - if (!stream.push(chunk)) - source.readStop(); -}; - -source.onend = function() { - stream.push(null); -}; - -// _read will be called when the stream wants to pull more data in -// the advisory size argument is ignored in this case. -stream._read = function(n) { - source.readStart(); -}; -``` - -### readable.unshift(chunk) - -* `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue -* return {Boolean} Whether or not more pushes should be performed - -This is the corollary of `readable.push(chunk)`. Rather than putting -the data at the *end* of the read queue, it puts it at the *front* of -the read queue. - -This is useful in certain use-cases where a stream is being consumed -by a parser, which needs to "un-consume" some data that it has -optimistically pulled out of the source. - -```javascript -// A parser for a simple data protocol. -// The "header" is a JSON object, followed by 2 \n characters, and -// then a message body. -// -// Note: This can be done more simply as a Transform stream. See below. - -function SimpleProtocol(source, options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(options); - - Readable.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - - // source is a readable stream, such as a socket or file - this._source = source; - - var self = this; - source.on('end', function() { - self.push(null); - }); - - // give it a kick whenever the source is readable - // read(0) will not consume any bytes - source.on('readable', function() { - self.read(0); - }); - - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype = Object.create( - Readable.prototype, { constructor: { value: SimpleProtocol }}); - -SimpleProtocol.prototype._read = function(n) { - if (!this._inBody) { - var chunk = this._source.read(); - - // if the source doesn't have data, we don't have data yet. - if (chunk === null) - return this.push(''); - - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - this.push(''); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // now, because we got some extra data, unshift the rest - // back into the read queue so that our consumer will see it. - var b = chunk.slice(split); - this.unshift(b); - - // and let them know that we are done parsing the header. - this.emit('header', this.header); - } - } else { - // from there on, just provide the data to our consumer. - // careful not to push(null), since that would indicate EOF. - var chunk = this._source.read(); - if (chunk) this.push(chunk); - } -}; - -// Usage: -var parser = new SimpleProtocol(source); -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - -### readable.wrap(stream) - -* `stream` {Stream} An "old style" readable stream - -If you are using an older Node library that emits `'data'` events and -has a `pause()` method that is advisory only, then you can use the -`wrap()` method to create a Readable stream that uses the old stream -as its data source. - -For example: - -```javascript -var OldReader = require('./old-api-module.js').OldReader; -var oreader = new OldReader; -var Readable = require('stream').Readable; -var myReader = new Readable().wrap(oreader); - -myReader.on('readable', function() { - myReader.read(); // etc. -}); -``` - -### Event: 'readable' - -When there is data ready to be consumed, this event will fire. - -When this event emits, call the `read()` method to consume the data. - -### Event: 'end' - -Emitted when the stream has received an EOF (FIN in TCP terminology). -Indicates that no more `'data'` events will happen. If the stream is -also writable, it may be possible to continue writing. - -### Event: 'data' - -The `'data'` event emits either a `Buffer` (by default) or a string if -`setEncoding()` was used. - -Note that adding a `'data'` event listener will switch the Readable -stream into "old mode", where data is emitted as soon as it is -available, rather than waiting for you to call `read()` to consume it. - -### Event: 'error' - -Emitted if there was an error receiving data. - -### Event: 'close' - -Emitted when the underlying resource (for example, the backing file -descriptor) has been closed. Not all streams will emit this. - -### readable.setEncoding(encoding) - -Makes the `'data'` event emit a string instead of a `Buffer`. `encoding` -can be `'utf8'`, `'utf16le'` (`'ucs2'`), `'ascii'`, or `'hex'`. - -The encoding can also be set by specifying an `encoding` field to the -constructor. - -### readable.read([size]) - -* `size` {Number | null} Optional number of bytes to read. -* Return: {Buffer | String | null} - -Note: **This function SHOULD be called by Readable stream users.** - -Call this method to consume data once the `'readable'` event is -emitted. - -The `size` argument will set a minimum number of bytes that you are -interested in. If not set, then the entire content of the internal -buffer is returned. - -If there is no data to consume, or if there are fewer bytes in the -internal buffer than the `size` argument, then `null` is returned, and -a future `'readable'` event will be emitted when more is available. - -Calling `stream.read(0)` will always return `null`, and will trigger a -refresh of the internal buffer, but otherwise be a no-op. - -### readable.pipe(destination, [options]) - -* `destination` {Writable Stream} -* `options` {Object} Optional - * `end` {Boolean} Default=true - -Connects this readable stream to `destination` WriteStream. Incoming -data on this stream gets written to `destination`. Properly manages -back-pressure so that a slow destination will not be overwhelmed by a -fast readable stream. - -This function returns the `destination` stream. - -For example, emulating the Unix `cat` command: - - process.stdin.pipe(process.stdout); - -By default `end()` is called on the destination when the source stream -emits `end`, so that `destination` is no longer writable. Pass `{ end: -false }` as `options` to keep the destination stream open. - -This keeps `writer` open so that "Goodbye" can be written at the -end. - - reader.pipe(writer, { end: false }); - reader.on("end", function() { - writer.end("Goodbye\n"); - }); - -Note that `process.stderr` and `process.stdout` are never closed until -the process exits, regardless of the specified options. - -### readable.unpipe([destination]) - -* `destination` {Writable Stream} Optional - -Undo a previously established `pipe()`. If no destination is -provided, then all previously established pipes are removed. - -### readable.pause() - -Switches the readable stream into "old mode", where data is emitted -using a `'data'` event rather than being buffered for consumption via -the `read()` method. - -Ceases the flow of data. No `'data'` events are emitted while the -stream is in a paused state. - -### readable.resume() - -Switches the readable stream into "old mode", where data is emitted -using a `'data'` event rather than being buffered for consumption via -the `read()` method. - -Resumes the incoming `'data'` events after a `pause()`. - - -## Class: stream.Writable - -<!--type=class--> - -A `Writable` Stream has the following methods, members, and events. - -Note that `stream.Writable` is an abstract class designed to be -extended with an underlying implementation of the -`_write(chunk, encoding, cb)` method. (See below.) - -### new stream.Writable([options]) - -* `options` {Object} - * `highWaterMark` {Number} Buffer level when `write()` starts - returning false. Default=16kb - * `decodeStrings` {Boolean} Whether or not to decode strings into - Buffers before passing them to `_write()`. Default=true - -In classes that extend the Writable class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### writable.\_write(chunk, encoding, callback) - -* `chunk` {Buffer | String} The chunk to be written. Will always - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. Ignore chunk is a buffer. Note that chunk will - **always** be a buffer unless the `decodeStrings` option is - explicitly set to `false`. -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunk. - -All Writable stream implementations must provide a `_write` method to -send data to the underlying resource. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Writable -class methods only. - -Call the callback using the standard `callback(error)` pattern to -signal that the write completed successfully or with an error. - -If the `decodeStrings` flag is set in the constructor options, then -`chunk` may be a string rather than a Buffer, and `encoding` will -indicate the sort of string that it is. This is to support -implementations that have an optimized handling for certain string -data encodings. If you do not explicitly set the `decodeStrings` -option to `false`, then you can safely ignore the `encoding` argument, -and assume that `chunk` will always be a Buffer. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - - -### writable.write(chunk, [encoding], [callback]) - -* `chunk` {Buffer | String} Data to be written -* `encoding` {String} Optional. If `chunk` is a string, then encoding - defaults to `'utf8'` -* `callback` {Function} Optional. Called when this chunk is - successfully written. -* Returns {Boolean} - -Writes `chunk` to the stream. Returns `true` if the data has been -flushed to the underlying resource. Returns `false` to indicate that -the buffer is full, and the data will be sent out in the future. The -`'drain'` event will indicate when the buffer is empty again. - -The specifics of when `write()` will return false, is determined by -the `highWaterMark` option provided to the constructor. - -### writable.end([chunk], [encoding], [callback]) - -* `chunk` {Buffer | String} Optional final data to be written -* `encoding` {String} Optional. If `chunk` is a string, then encoding - defaults to `'utf8'` -* `callback` {Function} Optional. Called when the final chunk is - successfully written. - -Call this method to signal the end of the data being written to the -stream. - -### Event: 'drain' - -Emitted when the stream's write queue empties and it's safe to write -without buffering again. Listen for it when `stream.write()` returns -`false`. - -### Event: 'close' - -Emitted when the underlying resource (for example, the backing file -descriptor) has been closed. Not all streams will emit this. - -### Event: 'finish' - -When `end()` is called and there are no more chunks to write, this -event is emitted. - -### Event: 'pipe' - -* `source` {Readable Stream} - -Emitted when the stream is passed to a readable stream's pipe method. - -### Event 'unpipe' - -* `source` {Readable Stream} - -Emitted when a previously established `pipe()` is removed using the -source Readable stream's `unpipe()` method. - -## Class: stream.Duplex - -<!--type=class--> - -A "duplex" stream is one that is both Readable and Writable, such as a -TCP socket connection. - -Note that `stream.Duplex` is an abstract class designed to be -extended with an underlying implementation of the `_read(size)` -and `_write(chunk, encoding, callback)` methods as you would with a Readable or -Writable stream class. - -Since JavaScript doesn't have multiple prototypal inheritance, this -class prototypally inherits from Readable, and then parasitically from -Writable. It is thus up to the user to implement both the lowlevel -`_read(n)` method as well as the lowlevel `_write(chunk, encoding, cb)` method -on extension duplex classes. - -### new stream.Duplex(options) - -* `options` {Object} Passed to both Writable and Readable - constructors. Also has the following fields: - * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then - the stream will automatically end the readable side when the - writable side ends and vice versa. - -In classes that extend the Duplex class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -## Class: stream.Transform - -A "transform" stream is a duplex stream where the output is causally -connected in some way to the input, such as a zlib stream or a crypto -stream. - -There is no requirement that the output be the same size as the input, -the same number of chunks, or arrive at the same time. For example, a -Hash stream will only ever have a single chunk of output which is -provided when the input is ended. A zlib stream will either produce -much smaller or much larger than its input. - -Rather than implement the `_read()` and `_write()` methods, Transform -classes must implement the `_transform()` method, and may optionally -also implement the `_flush()` method. (See below.) - -### new stream.Transform([options]) - -* `options` {Object} Passed to both Writable and Readable - constructors. - -In classes that extend the Transform class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### transform.\_transform(chunk, encoding, callback) - -* `chunk` {Buffer | String} The chunk to be transformed. Will always - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. (Ignore if `decodeStrings` chunk is a buffer.) -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunk. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Transform -class methods only. - -All Transform stream implementations must provide a `_transform` -method to accept input and produce output. - -`_transform` should do whatever has to be done in this specific -Transform class, to handle the bytes being written, and pass them off -to the readable portion of the interface. Do asynchronous I/O, -process things, and so on. - -Call `transform.push(outputChunk)` 0 or more times to generate output -from this input chunk, depending on how much data you want to output -as a result of this chunk. - -Call the callback function only when the current chunk is completely -consumed. Note that there may or may not be output as a result of any -particular input chunk. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -### transform.\_flush(callback) - -* `callback` {Function} Call this function (optionally with an error - argument) when you are done flushing any remaining data. - -Note: **This function MUST NOT be called directly.** It MAY be implemented -by child classes, and if so, will be called by the internal Transform -class methods only. - -In some cases, your transform operation may need to emit a bit more -data at the end of the stream. For example, a `Zlib` compression -stream will store up some internal state so that it can optimally -compress the output. At the end, however, it needs to do the best it -can with what is left, so that the data will be complete. - -In those cases, you can implement a `_flush` method, which will be -called at the very end, after all the written data is consumed, but -before emitting `end` to signal the end of the readable side. Just -like with `_transform`, call `transform.push(chunk)` zero or more -times, as appropriate, and call `callback` when the flush operation is -complete. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -### Example: `SimpleProtocol` parser - -The example above of a simple protocol parser can be implemented much -more simply by using the higher level `Transform` stream class. - -In this example, rather than providing the input as an argument, it -would be piped into the parser, which is a more idiomatic Node stream -approach. - -```javascript -function SimpleProtocol(options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(options); - - Transform.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype = Object.create( - Transform.prototype, { constructor: { value: SimpleProtocol }}); - -SimpleProtocol.prototype._transform = function(chunk, encoding, done) { - if (!this._inBody) { - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // and let them know that we are done parsing the header. - this.emit('header', this.header); - - // now, because we got some extra data, emit this first. - this.push(b); - } - } else { - // from there on, just provide the data to our consumer as-is. - this.push(b); - } - done(); -}; - -var parser = new SimpleProtocol(); -source.pipe(parser) - -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - - -## Class: stream.PassThrough - -This is a trivial implementation of a `Transform` stream that simply -passes the input bytes across to the output. Its purpose is mainly -for examples and testing, but there are occasionally use cases where -it can come in handy. - - -[EventEmitter]: events.html#events_class_events_eventemitter diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/duplex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/float.patch b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/float.patch deleted file mode 100644 index 0ad71a1f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/float.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js -index c5a741c..a2e0d8e 100644 ---- a/lib/_stream_duplex.js -+++ b/lib/_stream_duplex.js -@@ -26,8 +26,8 @@ - - module.exports = Duplex; - var util = require('util'); --var Readable = require('_stream_readable'); --var Writable = require('_stream_writable'); -+var Readable = require('./_stream_readable'); -+var Writable = require('./_stream_writable'); - - util.inherits(Duplex, Readable); - -diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js -index a5e9864..330c247 100644 ---- a/lib/_stream_passthrough.js -+++ b/lib/_stream_passthrough.js -@@ -25,7 +25,7 @@ - - module.exports = PassThrough; - --var Transform = require('_stream_transform'); -+var Transform = require('./_stream_transform'); - var util = require('util'); - util.inherits(PassThrough, Transform); - -diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js -index 2259d2e..e6681ee 100644 ---- a/lib/_stream_readable.js -+++ b/lib/_stream_readable.js -@@ -23,6 +23,9 @@ module.exports = Readable; - Readable.ReadableState = ReadableState; - - var EE = require('events').EventEmitter; -+if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { -+ return emitter.listeners(type).length; -+}; - var Stream = require('stream'); - var util = require('util'); - var StringDecoder; -diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js -index e925b4b..f08b05e 100644 ---- a/lib/_stream_transform.js -+++ b/lib/_stream_transform.js -@@ -64,7 +64,7 @@ - - module.exports = Transform; - --var Duplex = require('_stream_duplex'); -+var Duplex = require('./_stream_duplex'); - var util = require('util'); - util.inherits(Transform, Duplex); - -diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js -index a26f711..56ca47d 100644 ---- a/lib/_stream_writable.js -+++ b/lib/_stream_writable.js -@@ -109,7 +109,7 @@ function WritableState(options, stream) { - function Writable(options) { - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. -- if (!(this instanceof Writable) && !(this instanceof Stream.Duplex)) -+ if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) - return new Writable(options); - - this._writableState = new WritableState(options, this); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index a2e0d8e0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -module.exports = Duplex; -var util = require('util'); -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -Object.keys(Writable.prototype).forEach(function(method) { - if (!Duplex.prototype[method]) - Duplex.prototype[method] = Writable.prototype[method]; -}); - -function Duplex(options) { - if (!(this instanceof Duplex)) - return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) - this.readable = false; - - if (options && options.writable === false) - this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) - this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) - return; - - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(this.end.bind(this)); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 330c247d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); -var util = require('util'); -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) - return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function(chunk, encoding, cb) { - cb(null, chunk); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 323f3305..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,927 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -module.exports = Readable; -Readable.ReadableState = ReadableState; - -var EE = require('events').EventEmitter; -if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { - return emitter.listeners(type).length; -}; -var Stream = require('stream'); -var util = require('util'); -var StringDecoder; - -util.inherits(Readable, Stream); - -function ReadableState(options, stream) { - options = options || {}; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = false; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // In streams that never have any data, and do push(null) right away, - // the consumer can miss the 'end' event if they do some I/O before - // consuming the stream. So, we don't emit('end') until some reading - // happens. - this.calledRead = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - if (!(this instanceof Readable)) - return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function(chunk, encoding) { - var state = this._readableState; - - if (typeof chunk === 'string' && !state.objectMode) { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = new Buffer(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function(chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (chunk === null || chunk === undefined) { - state.reading = false; - if (!state.ended) - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var e = new Error('stream.unshift() after end event'); - stream.emit('error', e); - } else { - if (state.decoder && !addToFront && !encoding) - chunk = state.decoder.write(chunk); - - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) { - state.buffer.unshift(chunk); - } else { - state.reading = false; - state.buffer.push(chunk); - } - - if (state.needReadable) - emitReadable(stream); - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - - - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && - (state.needReadable || - state.length < state.highWaterMark || - state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function(enc) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; -}; - -// Don't raise the hwm > 128MB -var MAX_HWM = 0x800000; -function roundUpToNextPowerOf2(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - for (var p = 1; p < 32; p <<= 1) n |= n >> p; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) - return 0; - - if (state.objectMode) - return n === 0 ? 0 : 1; - - if (isNaN(n) || n === null) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) - return state.buffer[0].length; - else - return state.length; - } - - if (n <= 0) - return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) - state.highWaterMark = roundUpToNextPowerOf2(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else - return state.length; - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function(n) { - var state = this._readableState; - state.calledRead = true; - var nOrig = n; - - if (typeof n !== 'number' || n > 0) - state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && - state.needReadable && - (state.length >= state.highWaterMark || state.ended)) { - emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) - endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - - // if we currently have less than the highWaterMark, then also read some - if (state.length - n <= state.highWaterMark) - doRead = true; - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) - doRead = false; - - if (doRead) { - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) - state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read called its callback synchronously, then `reading` - // will be false, and we need to re-evaluate how much data we - // can return to the user. - if (doRead && !state.reading) - n = howMuchToRead(nOrig, state); - - var ret; - if (n > 0) - ret = fromList(n, state); - else - ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) - state.needReadable = true; - - // If we happened to read() exactly the remaining amount in the - // buffer, and the EOF has been seen at this point, then make sure - // that we emit 'end' on the very next tick. - if (state.ended && !state.endEmitted && state.length === 0) - endReadable(this); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode && - !er) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - - -function onEofChunk(stream, state) { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // if we've ended and we have some data left, then emit - // 'readable' now to make sure it gets picked up. - if (state.length > 0) - emitReadable(stream); - else - endReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (state.emittedReadable) - return; - - state.emittedReadable = true; - if (state.sync) - process.nextTick(function() { - emitReadable_(stream); - }); - else - emitReadable_(stream); -} - -function emitReadable_(stream) { - stream.emit('readable'); -} - - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(function() { - maybeReadMore_(stream, state); - }); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && - state.length < state.highWaterMark) { - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break; - else - len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function(n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function(dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && - dest !== process.stdout && - dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) - process.nextTick(endFn); - else - src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - if (readable !== src) return; - cleanup(); - } - - function onend() { - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - function cleanup() { - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (!dest._writableState || dest._writableState.needDrain) - ondrain(); - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - unpipe(); - dest.removeListener('error', onerror); - if (EE.listenerCount(dest, 'error') === 0) - dest.emit('error', er); - } - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. - if (!dest._events || !dest._events.error) - dest.on('error', onerror); - else if (Array.isArray(dest._events.error)) - dest._events.error.unshift(onerror); - else - dest._events.error = [onerror, dest._events.error]; - - - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - // the handler that waits for readable events after all - // the data gets sucked out in flow. - // This would be easier to follow with a .once() handler - // in flow(), but that is too slow. - this.on('readable', pipeOnReadable); - - state.flowing = true; - process.nextTick(function() { - flow(src); - }); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function() { - var dest = this; - var state = src._readableState; - state.awaitDrain--; - if (state.awaitDrain === 0) - flow(src); - }; -} - -function flow(src) { - var state = src._readableState; - var chunk; - state.awaitDrain = 0; - - function write(dest, i, list) { - var written = dest.write(chunk); - if (false === written) { - state.awaitDrain++; - } - } - - while (state.pipesCount && null !== (chunk = src.read())) { - - if (state.pipesCount === 1) - write(state.pipes, 0, null); - else - state.pipes.forEach(write); - - src.emit('data', chunk); - - // if anyone needs a drain, then we have to wait for that. - if (state.awaitDrain > 0) - return; - } - - // if every destination was unpiped, either before entering this - // function, or in the while loop, then stop flowing. - // - // NB: This is a pretty rare edge case. - if (state.pipesCount === 0) { - state.flowing = false; - - // if there were data event listeners added, then switch to old mode. - if (EE.listenerCount(src, 'data') > 0) - emitDataEvents(src); - return; - } - - // at this point, no one needed a drain, so we just ran out of data - // on the next readable event, start it over again. - state.ranOut = true; -} - -function pipeOnReadable() { - if (this._readableState.ranOut) { - this._readableState.ranOut = false; - flow(this); - } -} - - -Readable.prototype.unpipe = function(dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) - return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) - return this; - - if (!dest) - dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - if (dest) - dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - - for (var i = 0; i < len; i++) - dests[i].emit('unpipe', this); - return this; - } - - // try to find the right one. - var i = state.pipes.indexOf(dest); - if (i === -1) - return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) - state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function(ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data' && !this._readableState.flowing) - emitDataEvents(this); - - if (ev === 'readable' && this.readable) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - this.read(0); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function() { - emitDataEvents(this); - this.read(0); - this.emit('resume'); -}; - -Readable.prototype.pause = function() { - emitDataEvents(this, true); - this.emit('pause'); -}; - -function emitDataEvents(stream, startPaused) { - var state = stream._readableState; - - if (state.flowing) { - // https://github.com/isaacs/readable-stream/issues/16 - throw new Error('Cannot switch to old mode now.'); - } - - var paused = startPaused || false; - var readable = false; - - // convert to an old-style stream. - stream.readable = true; - stream.pipe = Stream.prototype.pipe; - stream.on = stream.addListener = Stream.prototype.on; - - stream.on('readable', function() { - readable = true; - - var c; - while (!paused && (null !== (c = stream.read()))) - stream.emit('data', c); - - if (c === null) { - readable = false; - stream._readableState.needReadable = true; - } - }); - - stream.pause = function() { - paused = true; - this.emit('pause'); - }; - - stream.resume = function() { - paused = false; - if (readable) - process.nextTick(function() { - stream.emit('readable'); - }); - else - this.read(0); - this.emit('resume'); - }; - - // now make it start, just in case it hadn't already. - stream.emit('readable'); -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function(stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function() { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) - self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function(chunk) { - if (state.decoder) - chunk = state.decoder.write(chunk); - if (!chunk || !state.objectMode && !chunk.length) - return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (typeof stream[i] === 'function' && - typeof this[i] === 'undefined') { - this[i] = function(method) { return function() { - return stream[method].apply(stream, arguments); - }}(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - events.forEach(function(ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function(n) { - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - - - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) - return null; - - if (length === 0) - ret = null; - else if (objectMode) - ret = list.shift(); - else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) - ret = list.join(''); - else - ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) - ret = ''; - else - ret = new Buffer(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var buf = list[0]; - var cpy = Math.min(n - c, buf.length); - - if (stringMode) - ret += buf.slice(0, cpy); - else - buf.copy(ret, c, 0, cpy); - - if (cpy < buf.length) - list[0] = buf.slice(cpy); - else - list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) - throw new Error('endReadable called on non-empty stream'); - - if (!state.endEmitted && state.calledRead) { - state.ended = true; - process.nextTick(function() { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } - }); - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index 707e4b3b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); -var util = require('util'); -util.inherits(Transform, Duplex); - - -function TransformState(options, stream) { - this.afterTransform = function(er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) - return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (data !== null && data !== undefined) - stream.push(data); - - if (cb) - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - - -function Transform(options) { - if (!(this instanceof Transform)) - return new Transform(options); - - Duplex.call(this, options); - - var ts = this._transformState = new TransformState(options, this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - this.once('finish', function() { - if ('function' === typeof this._flush) - this._flush(function(er) { - done(stream, er); - }); - else - done(stream); - }); -} - -Transform.prototype.push = function(chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function(chunk, encoding, cb) { - throw new Error('not implemented'); -}; - -Transform.prototype._write = function(chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || - rs.needReadable || - rs.length < rs.highWaterMark) - this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function(n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - - -function done(stream, er) { - if (er) - return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var rs = stream._readableState; - var ts = stream._transformState; - - if (ws.length) - throw new Error('calling transform done when ws.length != 0'); - - if (ts.transforming) - throw new Error('calling transform done when still transforming'); - - return stream.push(null); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index 9eaf4ec2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,371 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, cb), and it'll handle all -// the drain event emission and buffering. - -module.exports = Writable; -Writable.WritableState = WritableState; - -var util = require('util'); -var assert = require('assert'); -var Stream = require('stream'); - -util.inherits(Writable, Stream); - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; -} - -function WritableState(options, stream) { - options = options || {}; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function(er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.buffer = []; -} - -function Writable(options) { - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) - return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function() { - this.emit('error', new Error('Cannot pipe. Not readable.')); -}; - - -function writeAfterEnd(stream, state, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); - valid = false; - } - return valid; -} - -Writable.prototype.write = function(chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - else if (!encoding) - encoding = state.defaultEncoding; - - if (typeof cb !== 'function') - cb = function() {}; - - if (state.ended) - writeAfterEnd(this, state, cb); - else if (validChunk(this, state, chunk, cb)) - ret = writeOrBuffer(this, state, chunk, encoding, cb); - - return ret; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && - state.decodeStrings !== false && - typeof chunk === 'string') { - chunk = new Buffer(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) - state.needDrain = true; - - if (state.writing) - state.buffer.push(new WriteReq(chunk, encoding, cb)); - else - doWrite(stream, state, len, chunk, encoding, cb); - - return ret; -} - -function doWrite(stream, state, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - if (sync) - process.nextTick(function() { - cb(er); - }); - else - cb(er); - - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) - onwriteError(stream, state, sync, er, cb); - else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(stream, state); - - if (!finished && !state.bufferProcessing && state.buffer.length) - clearBuffer(stream, state); - - if (sync) { - process.nextTick(function() { - afterWrite(stream, state, finished, cb); - }); - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) - onwriteDrain(stream, state); - cb(); - if (finished) - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - - for (var c = 0; c < state.buffer.length; c++) { - var entry = state.buffer[c]; - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, len, chunk, encoding, cb); - - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - c++; - break; - } - } - - state.bufferProcessing = false; - if (c < state.buffer.length) - state.buffer = state.buffer.slice(c); - else - state.buffer.length = 0; -} - -Writable.prototype._write = function(chunk, encoding, cb) { - cb(new Error('not implemented')); -}; - -Writable.prototype.end = function(chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (typeof chunk !== 'undefined' && chunk !== null) - this.write(chunk, encoding); - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) - endWritable(this, state, cb); -}; - - -function needFinish(stream, state) { - return (state.ending && - state.length === 0 && - !state.finished && - !state.writing); -} - -function finishMaybe(stream, state) { - var need = needFinish(stream, state); - if (need) { - state.finished = true; - stream.emit('finish'); - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) - process.nextTick(cb); - else - stream.once('finish', cb); - } - state.ended = true; -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE deleted file mode 100644 index 6de584a4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md deleted file mode 100644 index 4d2aa001..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md +++ /dev/null @@ -1,7 +0,0 @@ -**string_decoder.js** (`require('string_decoder')`) from Node.js core - -Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. - -Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** - -The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js deleted file mode 100755 index 46470cfd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js +++ /dev/null @@ -1,94 +0,0 @@ -#!/usr/bin/env node - -const hyperquest = require('hyperzip')(require('hyperdirect')) - , bl = require('bl') - , fs = require('fs') - , path = require('path') - , cheerio = require('cheerio') - - , files = require('./files') - , testReplace = require('./test-replacements') - - , srcurlpfx = 'https://raw.github.com/joyent/node/v' + process.argv[2] + '-release/' - , libsrcurl = srcurlpfx + 'lib/' - , testsrcurl = srcurlpfx + 'test/simple/' - , testlisturl = 'https://github.com/joyent/node/tree/v' + process.argv[2] + '-release/test/simple' - , libourroot = path.join(__dirname, '../') - , testourroot = path.join(__dirname, '../test/simple/') - - -function processFile (url, out, replacements) { - hyperquest(url).pipe(bl(function (err, data) { - if (err) - throw err - - data = data.toString() - replacements.forEach(function (replacement) { - data = data.replace.apply(data, replacement) - }) - - fs.writeFile(out, data, 'utf8', function (err) { - if (err) - throw err - - console.log('Wrote', out) - }) - })) -} - -function processLibFile (file) { - var replacements = files[file] - , url = libsrcurl + file - , out = path.join(libourroot, replacements.out || file) - - processFile(url, out, replacements) -} - - -function processTestFile (file) { - var replacements = testReplace.all - , url = testsrcurl + file - , out = path.join(testourroot, file) - - if (testReplace[file]) - replacements = replacements.concat(testReplace[file]) - - processFile(url, out, replacements) -} - - -if (!/0\.1\d\.\d+/.test(process.argv[2])) { - console.log('Usage: build.js <node version>') - return process.exit(-1) -} - - -//-------------------------------------------------------------------- -// Grab & process files in ../lib/ - -Object.keys(files).forEach(processLibFile) - -//-------------------------------------------------------------------- -// Discover, grab and process all test-string-decoder* files on joyent/node - -hyperquest(testlisturl).pipe(bl(function (err, data) { - if (err) - throw err - - var $ = cheerio.load(data.toString()) - - $('table.files .js-directory-link').each(function () { - var file = $(this).text() - if (/^test-string-decoder/.test(file) || file == 'common.js') - processTestFile(file) - }) -})) - -//-------------------------------------------------------------------- -// Grab the joyent/node test/common.js - -processFile( - testsrcurl + '../common.js' - , path.join(testourroot, '../common.js') - , testReplace['common.js'] -) \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js deleted file mode 100644 index 7396a4f4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js +++ /dev/null @@ -1,36 +0,0 @@ -/* This file lists the files to be fetched from the node repo - * in the /lib/ directory which will be placed in the ../lib/ - * directory after having each of the "replacements" in the - * array for that file applied to it. The replacements are - * simply the arguments to String#replace, so they can be - * strings, regexes, functions. - */ - -module.exports['string_decoder.js'] = [ - - // pull in Bufer as a require - // add Buffer.isEncoding where missing - [ - /^(\/\/ USE OR OTHER DEALINGS IN THE SOFTWARE\.)/m - , '$1\n\nvar Buffer = require(\'buffer\').Buffer;' - + '\n' - + '\nvar isBufferEncoding = Buffer.isEncoding' - + '\n || function(encoding) {' - + '\n switch (encoding && encoding.toLowerCase()) {' - + '\n case \'hex\': case \'utf8\': case \'utf-8\': case \'ascii\': case \'binary\': case \'base64\': case \'ucs2\': case \'ucs-2\': case \'utf16le\': case \'utf-16le\': case \'raw\': return true;' - + '\n default: return false;' - + '\n }' - + '\n }' - + '\n' - - ] - - // use custom Buffer.isEncoding reference - , [ - /Buffer\.isEncoding\(/g - , 'isBufferEncoding\(' - ] - -] - -module.exports['string_decoder.js'].out = 'index.js' \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json deleted file mode 100644 index f7ee6a46..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "string_decoder-build", - "version": "0.0.0", - "description": "", - "main": "build.js", - "dependencies": { - "bl": "~0.6.0", - "hyperzip": "0.0.0", - "hyperdirect": "0.0.0", - "cheerio": "~0.13.1" - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js deleted file mode 100644 index 5bbf6028..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js +++ /dev/null @@ -1,24 +0,0 @@ -module.exports.all = [ - [ - /require\(['"]string_decoder['"]\)/g - , 'require(\'../../\')' - ] - -] - -module.exports['common.js'] = [ - [ - /^ setImmediate,$/m - , ' typeof setImmediate == \'undefined\' ? null : setImmediate,' - ] - - , [ - /^ clearImmediate,$/m - , ' typeof clearImmediate == \'undefined\' ? null : clearImmediate,' - ] - - , [ - /^ global];$/m - , ' global].filter(Boolean);' - ] -] diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js deleted file mode 100644 index 2e44a03e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var Buffer = require('buffer').Buffer; - -var isBufferEncoding = Buffer.isEncoding - || function(encoding) { - switch (encoding && encoding.toLowerCase()) { - case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; - default: return false; - } - } - - -function assertEncoding(encoding) { - if (encoding && !isBufferEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} - -var StringDecoder = exports.StringDecoder = function(encoding) { - this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); - assertEncoding(encoding); - switch (this.encoding) { - case 'utf8': - // CESU-8 represents each of Surrogate Pair by 3-bytes - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - // UTF-16 represents each of Surrogate Pair by 2-bytes - this.surrogateSize = 2; - this.detectIncompleteChar = utf16DetectIncompleteChar; - break; - case 'base64': - // Base-64 stores 3 bytes in 4 chars, and pads the remainder. - this.surrogateSize = 3; - this.detectIncompleteChar = base64DetectIncompleteChar; - break; - default: - this.write = passThroughWrite; - return; - } - - this.charBuffer = new Buffer(6); - this.charReceived = 0; - this.charLength = 0; -}; - - -StringDecoder.prototype.write = function(buffer) { - var charStr = ''; - var offset = 0; - - // if our last write ended with an incomplete multibyte character - while (this.charLength) { - // determine how many remaining bytes this buffer has to offer for this char - var i = (buffer.length >= this.charLength - this.charReceived) ? - this.charLength - this.charReceived : - buffer.length; - - // add the new bytes to the char buffer - buffer.copy(this.charBuffer, this.charReceived, offset, i); - this.charReceived += (i - offset); - offset = i; - - if (this.charReceived < this.charLength) { - // still not enough chars in this buffer? wait for more ... - return ''; - } - - // get the character that was split - charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); - - // lead surrogate (D800-DBFF) is also the incomplete character - var charCode = charStr.charCodeAt(charStr.length - 1); - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - this.charLength += this.surrogateSize; - charStr = ''; - continue; - } - this.charReceived = this.charLength = 0; - - // if there are no more bytes in this buffer, just emit our char - if (i == buffer.length) return charStr; - - // otherwise cut off the characters end from the beginning of this buffer - buffer = buffer.slice(i, buffer.length); - break; - } - - var lenIncomplete = this.detectIncompleteChar(buffer); - - var end = buffer.length; - if (this.charLength) { - // buffer the incomplete character bytes we got - buffer.copy(this.charBuffer, 0, buffer.length - lenIncomplete, end); - this.charReceived = lenIncomplete; - end -= lenIncomplete; - } - - charStr += buffer.toString(this.encoding, 0, end); - - var end = charStr.length - 1; - var charCode = charStr.charCodeAt(end); - // lead surrogate (D800-DBFF) is also the incomplete character - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - var size = this.surrogateSize; - this.charLength += size; - this.charReceived += size; - this.charBuffer.copy(this.charBuffer, size, 0, size); - this.charBuffer.write(charStr.charAt(charStr.length - 1), this.encoding); - return charStr.substring(0, end); - } - - // or just emit the charStr - return charStr; -}; - -StringDecoder.prototype.detectIncompleteChar = function(buffer) { - // determine how many bytes we have to check at the end of this buffer - var i = (buffer.length >= 3) ? 3 : buffer.length; - - // Figure out if one of the last i bytes of our buffer announces an - // incomplete char. - for (; i > 0; i--) { - var c = buffer[buffer.length - i]; - - // See http://en.wikipedia.org/wiki/UTF-8#Description - - // 110XXXXX - if (i == 1 && c >> 5 == 0x06) { - this.charLength = 2; - break; - } - - // 1110XXXX - if (i <= 2 && c >> 4 == 0x0E) { - this.charLength = 3; - break; - } - - // 11110XXX - if (i <= 3 && c >> 3 == 0x1E) { - this.charLength = 4; - break; - } - } - - return i; -}; - -StringDecoder.prototype.end = function(buffer) { - var res = ''; - if (buffer && buffer.length) - res = this.write(buffer); - - if (this.charReceived) { - var cr = this.charReceived; - var buf = this.charBuffer; - var enc = this.encoding; - res += buf.slice(0, cr).toString(enc); - } - - return res; -}; - -function passThroughWrite(buffer) { - return buffer.toString(this.encoding); -} - -function utf16DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 2; - this.charLength = incomplete ? 2 : 0; - return incomplete; -} - -function base64DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 3; - this.charLength = incomplete ? 3 : 0; - return incomplete; -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json deleted file mode 100644 index c7cac1a5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "string_decoder", - "version": "0.10.25", - "description": "The string_decoder module from Node core", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "tap": "~0.4.8" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/rvagg/string_decoder.git" - }, - "homepage": "https://github.com/rvagg/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "readme": "**string_decoder.js** (`require('string_decoder')`) from Node.js core\n\nCopyright Joyent, Inc. and other Node contributors. See LICENCE file for details.\n\nVersion numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.**\n\nThe *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version.", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/rvagg/string_decoder/issues" - }, - "_id": "string_decoder@0.10.25", - "dist": { - "shasum": "aa026a29a0177ff13c8df4472dcda2f26d646900" - }, - "_from": "string_decoder@~0.10.x", - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.25.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js deleted file mode 100644 index ed5ff08d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var path = require('path'); -var assert = require('assert'); - -exports.testDir = path.dirname(__filename); -exports.fixturesDir = path.join(exports.testDir, 'fixtures'); -exports.libDir = path.join(exports.testDir, '../lib'); -exports.tmpDir = path.join(exports.testDir, 'tmp'); -exports.PORT = +process.env.NODE_COMMON_PORT || 12346; - -if (process.platform === 'win32') { - exports.PIPE = '\\\\.\\pipe\\libuv-test'; -} else { - exports.PIPE = exports.tmpDir + '/test.sock'; -} - -var util = require('util'); -for (var i in util) exports[i] = util[i]; -//for (var i in exports) global[i] = exports[i]; - -function protoCtrChain(o) { - var result = []; - for (; o; o = o.__proto__) { result.push(o.constructor); } - return result.join(); -} - -exports.indirectInstanceOf = function(obj, cls) { - if (obj instanceof cls) { return true; } - var clsChain = protoCtrChain(cls.prototype); - var objChain = protoCtrChain(obj); - return objChain.slice(-clsChain.length) === clsChain; -}; - - -exports.ddCommand = function(filename, kilobytes) { - if (process.platform === 'win32') { - var p = path.resolve(exports.fixturesDir, 'create-file.js'); - return '"' + process.argv[0] + '" "' + p + '" "' + - filename + '" ' + (kilobytes * 1024); - } else { - return 'dd if=/dev/zero of="' + filename + '" bs=1024 count=' + kilobytes; - } -}; - - -exports.spawnCat = function(options) { - var spawn = require('child_process').spawn; - - if (process.platform === 'win32') { - return spawn('more', [], options); - } else { - return spawn('cat', [], options); - } -}; - - -exports.spawnPwd = function(options) { - var spawn = require('child_process').spawn; - - if (process.platform === 'win32') { - return spawn('cmd.exe', ['/c', 'cd'], options); - } else { - return spawn('pwd', [], options); - } -}; - - -// Turn this off if the test should not check for global leaks. -exports.globalCheck = true; - -process.on('exit', function() { - if (!exports.globalCheck) return; - var knownGlobals = [setTimeout, - setInterval, - typeof setImmediate == 'undefined' ? null : setImmediate, - clearTimeout, - clearInterval, - typeof clearImmediate == 'undefined' ? null : clearImmediate, - console, - Buffer, - process, - global].filter(Boolean); - - if (global.gc) { - knownGlobals.push(gc); - } - - if (global.DTRACE_HTTP_SERVER_RESPONSE) { - knownGlobals.push(DTRACE_HTTP_SERVER_RESPONSE); - knownGlobals.push(DTRACE_HTTP_SERVER_REQUEST); - knownGlobals.push(DTRACE_HTTP_CLIENT_RESPONSE); - knownGlobals.push(DTRACE_HTTP_CLIENT_REQUEST); - knownGlobals.push(DTRACE_NET_STREAM_END); - knownGlobals.push(DTRACE_NET_SERVER_CONNECTION); - knownGlobals.push(DTRACE_NET_SOCKET_READ); - knownGlobals.push(DTRACE_NET_SOCKET_WRITE); - } - if (global.COUNTER_NET_SERVER_CONNECTION) { - knownGlobals.push(COUNTER_NET_SERVER_CONNECTION); - knownGlobals.push(COUNTER_NET_SERVER_CONNECTION_CLOSE); - knownGlobals.push(COUNTER_HTTP_SERVER_REQUEST); - knownGlobals.push(COUNTER_HTTP_SERVER_RESPONSE); - knownGlobals.push(COUNTER_HTTP_CLIENT_REQUEST); - knownGlobals.push(COUNTER_HTTP_CLIENT_RESPONSE); - } - - if (global.ArrayBuffer) { - knownGlobals.push(ArrayBuffer); - knownGlobals.push(Int8Array); - knownGlobals.push(Uint8Array); - knownGlobals.push(Uint8ClampedArray); - knownGlobals.push(Int16Array); - knownGlobals.push(Uint16Array); - knownGlobals.push(Int32Array); - knownGlobals.push(Uint32Array); - knownGlobals.push(Float32Array); - knownGlobals.push(Float64Array); - knownGlobals.push(DataView); - } - - for (var x in global) { - var found = false; - - for (var y in knownGlobals) { - if (global[x] === knownGlobals[y]) { - found = true; - break; - } - } - - if (!found) { - console.error('Unknown global: %s', x); - assert.ok(false, 'Unknown global found'); - } - } -}); - - -var mustCallChecks = []; - - -function runCallChecks(exitCode) { - if (exitCode !== 0) return; - - var failed = mustCallChecks.filter(function(context) { - return context.actual !== context.expected; - }); - - failed.forEach(function(context) { - console.log('Mismatched %s function calls. Expected %d, actual %d.', - context.name, - context.expected, - context.actual); - console.log(context.stack.split('\n').slice(2).join('\n')); - }); - - if (failed.length) process.exit(1); -} - - -exports.mustCall = function(fn, expected) { - if (typeof expected !== 'number') expected = 1; - - var context = { - expected: expected, - actual: 0, - stack: (new Error).stack, - name: fn.name || '<anonymous>' - }; - - // add the exit listener only once to avoid listener leak warnings - if (mustCallChecks.length === 0) process.on('exit', runCallChecks); - - mustCallChecks.push(context); - - return function() { - context.actual++; - return fn.apply(this, arguments); - }; -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js deleted file mode 100644 index 869a4116..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// verify that the string decoder works getting 1 byte at a time, -// the whole buffer at once, and that both match the .toString(enc) -// result of the entire buffer. - -var assert = require('assert'); -var SD = require('../../').StringDecoder; -var encodings = ['base64', 'hex', 'utf8', 'utf16le', 'ucs2']; - -var bufs = [ '☃💩', 'asdf' ].map(function(b) { - return new Buffer(b); -}); - -// also test just arbitrary bytes from 0-15. -for (var i = 1; i <= 16; i++) { - var bytes = new Array(i).join('.').split('.').map(function(_, j) { - return j + 0x78; - }); - bufs.push(new Buffer(bytes)); -} - -encodings.forEach(testEncoding); - -console.log('ok'); - -function testEncoding(encoding) { - bufs.forEach(function(buf) { - testBuf(encoding, buf); - }); -} - -function testBuf(encoding, buf) { - console.error('# %s', encoding, buf); - - // write one byte at a time. - var s = new SD(encoding); - var res1 = ''; - for (var i = 0; i < buf.length; i++) { - res1 += s.write(buf.slice(i, i + 1)); - } - res1 += s.end(); - - // write the whole buffer at once. - var res2 = ''; - var s = new SD(encoding); - res2 += s.write(buf); - res2 += s.end(); - - // .toString() on the buffer - var res3 = buf.toString(encoding); - - console.log('expect=%j', res3); - assert.equal(res1, res3, 'one byte at a time should match toString'); - assert.equal(res2, res3, 'all bytes at once should match toString'); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js deleted file mode 100644 index 7f69f7ea..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var common = require('../common'); -var assert = require('assert'); -var StringDecoder = require('../../').StringDecoder; -var decoder = new StringDecoder('utf8'); - - - -var buffer = new Buffer('$'); -assert.deepEqual('$', decoder.write(buffer)); - -buffer = new Buffer('¢'); -assert.deepEqual('', decoder.write(buffer.slice(0, 1))); -assert.deepEqual('¢', decoder.write(buffer.slice(1, 2))); - -buffer = new Buffer('€'); -assert.deepEqual('', decoder.write(buffer.slice(0, 1))); -assert.deepEqual('', decoder.write(buffer.slice(1, 2))); -assert.deepEqual('€', decoder.write(buffer.slice(2, 3))); - -buffer = new Buffer([0xF0, 0xA4, 0xAD, 0xA2]); -var s = ''; -s += decoder.write(buffer.slice(0, 1)); -s += decoder.write(buffer.slice(1, 2)); -s += decoder.write(buffer.slice(2, 3)); -s += decoder.write(buffer.slice(3, 4)); -assert.ok(s.length > 0); - -// CESU-8 -buffer = new Buffer('EDA0BDEDB18D', 'hex'); // THUMBS UP SIGN (in CESU-8) -var s = ''; -s += decoder.write(buffer.slice(0, 1)); -s += decoder.write(buffer.slice(1, 2)); -s += decoder.write(buffer.slice(2, 3)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(3, 4)); -s += decoder.write(buffer.slice(4, 5)); -s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 2)); -s += decoder.write(buffer.slice(2, 4)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(4, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 3)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(3, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 4)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(4, 5)); -s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 5)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 6)); -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - - -// UCS-2 -decoder = new StringDecoder('ucs2'); -buffer = new Buffer('ab', 'ucs2'); -assert.equal(decoder.write(buffer), 'ab'); // 2 complete chars -buffer = new Buffer('abc', 'ucs2'); -assert.equal(decoder.write(buffer.slice(0, 3)), 'a'); // 'a' and first of 'b' -assert.equal(decoder.write(buffer.slice(3, 6)), 'bc'); // second of 'b' and 'c' - - -// UTF-16LE -buffer = new Buffer('3DD84DDC', 'hex'); // THUMBS UP SIGN (in CESU-8) -var s = ''; -s += decoder.write(buffer.slice(0, 1)); -s += decoder.write(buffer.slice(1, 2)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(2, 3)); -s += decoder.write(buffer.slice(3, 4)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 2)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(2, 4)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 3)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(3, 4)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 4)); -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - - -// A mixed ascii and non-ascii string -// Test stolen from deps/v8/test/cctest/test-strings.cc -// U+02E4 -> CB A4 -// U+0064 -> 64 -// U+12E4 -> E1 8B A4 -// U+0030 -> 30 -// U+3045 -> E3 81 85 -var expected = '\u02e4\u0064\u12e4\u0030\u3045'; -var buffer = new Buffer([0xCB, 0xA4, 0x64, 0xE1, 0x8B, 0xA4, - 0x30, 0xE3, 0x81, 0x85]); -var charLengths = [0, 0, 1, 2, 2, 2, 3, 4, 4, 4, 5, 5]; - -// Split the buffer into 3 segments -// |----|------|-------| -// 0 i j buffer.length -// Scan through every possible 3 segment combination -// and make sure that the string is always parsed. -common.print('scanning '); -for (var j = 2; j < buffer.length; j++) { - for (var i = 1; i < j; i++) { - var decoder = new StringDecoder('utf8'); - - var sum = decoder.write(buffer.slice(0, i)); - - // just check that we've received the right amount - // after the first write - assert.equal(charLengths[i], sum.length); - - sum += decoder.write(buffer.slice(i, j)); - sum += decoder.write(buffer.slice(j, buffer.length)); - assert.equal(expected, sum); - common.print('.'); - } -} -console.log(' crayon!'); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/package.json deleted file mode 100644 index c9e268d0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "readable-stream", - "version": "1.0.25", - "description": "An exploration of a new kind of readable streams for Node.js", - "main": "readable.js", - "dependencies": { - "string_decoder": "~0.10.x" - }, - "devDependencies": { - "tap": "~0.2.6" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/readable-stream" - }, - "keywords": [ - "readable", - "stream", - "pipe" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "BSD", - "readme": "# readable-stream\n\nA new class of streams for Node.js\n\nThis module provides the new Stream base classes introduced in Node\nv0.10, for use in Node v0.8. You can use it to have programs that\nhave to work with node v0.8, while being forward-compatible for v0.10\nand beyond. When you drop support for v0.8, you can remove this\nmodule, and only use the native streams.\n\nThis is almost exactly the same codebase as appears in Node v0.10.\nHowever:\n\n1. The exported object is actually the Readable class. Decorating the\n native `stream` module would be global pollution.\n2. In v0.10, you can safely use `base64` as an argument to\n `setEncoding` in Readable streams. However, in v0.8, the\n StringDecoder class has no `end()` method, which is problematic for\n Base64. So, don't use that, because it'll break and be weird.\n\nOther than that, the API is the same as `require('stream')` in v0.10,\nso the API docs are reproduced below.\n\n----------\n\n Stability: 2 - Unstable\n\nA stream is an abstract interface implemented by various objects in\nNode. For example a request to an HTTP server is a stream, as is\nstdout. Streams are readable, writable, or both. All streams are\ninstances of [EventEmitter][]\n\nYou can load the Stream base classes by doing `require('stream')`.\nThere are base classes provided for Readable streams, Writable\nstreams, Duplex streams, and Transform streams.\n\n## Compatibility\n\nIn earlier versions of Node, the Readable stream interface was\nsimpler, but also less powerful and less useful.\n\n* Rather than waiting for you to call the `read()` method, `'data'`\n events would start emitting immediately. If you needed to do some\n I/O to decide how to handle data, then you had to store the chunks\n in some kind of buffer so that they would not be lost.\n* The `pause()` method was advisory, rather than guaranteed. This\n meant that you still had to be prepared to receive `'data'` events\n even when the stream was in a paused state.\n\nIn Node v0.10, the Readable class described below was added. For\nbackwards compatibility with older Node programs, Readable streams\nswitch into \"old mode\" when a `'data'` event handler is added, or when\nthe `pause()` or `resume()` methods are called. The effect is that,\neven if you are not using the new `read()` method and `'readable'`\nevent, you no longer have to worry about losing `'data'` chunks.\n\nMost programs will continue to function normally. However, this\nintroduces an edge case in the following conditions:\n\n* No `'data'` event handler is added.\n* The `pause()` and `resume()` methods are never called.\n\nFor example, consider the following code:\n\n```javascript\n// WARNING! BROKEN!\nnet.createServer(function(socket) {\n\n // we add an 'end' method, but never consume the data\n socket.on('end', function() {\n // It will never get here.\n socket.end('I got your message (but didnt read it)\\n');\n });\n\n}).listen(1337);\n```\n\nIn versions of node prior to v0.10, the incoming message data would be\nsimply discarded. However, in Node v0.10 and beyond, the socket will\nremain paused forever.\n\nThe workaround in this situation is to call the `resume()` method to\ntrigger \"old mode\" behavior:\n\n```javascript\n// Workaround\nnet.createServer(function(socket) {\n\n socket.on('end', function() {\n socket.end('I got your message (but didnt read it)\\n');\n });\n\n // start the flow of data, discarding it.\n socket.resume();\n\n}).listen(1337);\n```\n\nIn addition to new Readable streams switching into old-mode, pre-v0.10\nstyle streams can be wrapped in a Readable class using the `wrap()`\nmethod.\n\n## Class: stream.Readable\n\n<!--type=class-->\n\nA `Readable Stream` has the following methods, members, and events.\n\nNote that `stream.Readable` is an abstract class designed to be\nextended with an underlying implementation of the `_read(size)`\nmethod. (See below.)\n\n### new stream.Readable([options])\n\n* `options` {Object}\n * `highWaterMark` {Number} The maximum number of bytes to store in\n the internal buffer before ceasing to read from the underlying\n resource. Default=16kb\n * `encoding` {String} If specified, then buffers will be decoded to\n strings using the specified encoding. Default=null\n * `objectMode` {Boolean} Whether this stream should behave\n as a stream of objects. Meaning that stream.read(n) returns\n a single value instead of a Buffer of size n\n\nIn classes that extend the Readable class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### readable.\\_read(size)\n\n* `size` {Number} Number of bytes to read asynchronously\n\nNote: **This function should NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Readable\nclass methods only.\n\nAll Readable stream implementations must provide a `_read` method\nto fetch data from the underlying resource.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\nWhen data is available, put it into the read queue by calling\n`readable.push(chunk)`. If `push` returns false, then you should stop\nreading. When `_read` is called again, you should start pushing more\ndata.\n\nThe `size` argument is advisory. Implementations where a \"read\" is a\nsingle call that returns data can use this to know how much data to\nfetch. Implementations where that is not relevant, such as TCP or\nTLS, may ignore this argument, and simply provide data whenever it\nbecomes available. There is no need, for example to \"wait\" until\n`size` bytes are available before calling `stream.push(chunk)`.\n\n### readable.push(chunk)\n\n* `chunk` {Buffer | null | String} Chunk of data to push into the read queue\n* return {Boolean} Whether or not more pushes should be performed\n\nNote: **This function should be called by Readable implementors, NOT\nby consumers of Readable subclasses.** The `_read()` function will not\nbe called again until at least one `push(chunk)` call is made. If no\ndata is available, then you MAY call `push('')` (an empty string) to\nallow a future `_read` call, without adding any data to the queue.\n\nThe `Readable` class works by putting data into a read queue to be\npulled out later by calling the `read()` method when the `'readable'`\nevent fires.\n\nThe `push()` method will explicitly insert some data into the read\nqueue. If it is called with `null` then it will signal the end of the\ndata.\n\nIn some cases, you may be wrapping a lower-level source which has some\nsort of pause/resume mechanism, and a data callback. In those cases,\nyou could wrap the low-level source object by doing something like\nthis:\n\n```javascript\n// source is an object with readStop() and readStart() methods,\n// and an `ondata` member that gets called when it has data, and\n// an `onend` member that gets called when the data is over.\n\nvar stream = new Readable();\n\nsource.ondata = function(chunk) {\n // if push() returns false, then we need to stop reading from source\n if (!stream.push(chunk))\n source.readStop();\n};\n\nsource.onend = function() {\n stream.push(null);\n};\n\n// _read will be called when the stream wants to pull more data in\n// the advisory size argument is ignored in this case.\nstream._read = function(n) {\n source.readStart();\n};\n```\n\n### readable.unshift(chunk)\n\n* `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue\n* return {Boolean} Whether or not more pushes should be performed\n\nThis is the corollary of `readable.push(chunk)`. Rather than putting\nthe data at the *end* of the read queue, it puts it at the *front* of\nthe read queue.\n\nThis is useful in certain use-cases where a stream is being consumed\nby a parser, which needs to \"un-consume\" some data that it has\noptimistically pulled out of the source.\n\n```javascript\n// A parser for a simple data protocol.\n// The \"header\" is a JSON object, followed by 2 \\n characters, and\n// then a message body.\n//\n// Note: This can be done more simply as a Transform stream. See below.\n\nfunction SimpleProtocol(source, options) {\n if (!(this instanceof SimpleProtocol))\n return new SimpleProtocol(options);\n\n Readable.call(this, options);\n this._inBody = false;\n this._sawFirstCr = false;\n\n // source is a readable stream, such as a socket or file\n this._source = source;\n\n var self = this;\n source.on('end', function() {\n self.push(null);\n });\n\n // give it a kick whenever the source is readable\n // read(0) will not consume any bytes\n source.on('readable', function() {\n self.read(0);\n });\n\n this._rawHeader = [];\n this.header = null;\n}\n\nSimpleProtocol.prototype = Object.create(\n Readable.prototype, { constructor: { value: SimpleProtocol }});\n\nSimpleProtocol.prototype._read = function(n) {\n if (!this._inBody) {\n var chunk = this._source.read();\n\n // if the source doesn't have data, we don't have data yet.\n if (chunk === null)\n return this.push('');\n\n // check if the chunk has a \\n\\n\n var split = -1;\n for (var i = 0; i < chunk.length; i++) {\n if (chunk[i] === 10) { // '\\n'\n if (this._sawFirstCr) {\n split = i;\n break;\n } else {\n this._sawFirstCr = true;\n }\n } else {\n this._sawFirstCr = false;\n }\n }\n\n if (split === -1) {\n // still waiting for the \\n\\n\n // stash the chunk, and try again.\n this._rawHeader.push(chunk);\n this.push('');\n } else {\n this._inBody = true;\n var h = chunk.slice(0, split);\n this._rawHeader.push(h);\n var header = Buffer.concat(this._rawHeader).toString();\n try {\n this.header = JSON.parse(header);\n } catch (er) {\n this.emit('error', new Error('invalid simple protocol data'));\n return;\n }\n // now, because we got some extra data, unshift the rest\n // back into the read queue so that our consumer will see it.\n var b = chunk.slice(split);\n this.unshift(b);\n\n // and let them know that we are done parsing the header.\n this.emit('header', this.header);\n }\n } else {\n // from there on, just provide the data to our consumer.\n // careful not to push(null), since that would indicate EOF.\n var chunk = this._source.read();\n if (chunk) this.push(chunk);\n }\n};\n\n// Usage:\nvar parser = new SimpleProtocol(source);\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.\n```\n\n### readable.wrap(stream)\n\n* `stream` {Stream} An \"old style\" readable stream\n\nIf you are using an older Node library that emits `'data'` events and\nhas a `pause()` method that is advisory only, then you can use the\n`wrap()` method to create a Readable stream that uses the old stream\nas its data source.\n\nFor example:\n\n```javascript\nvar OldReader = require('./old-api-module.js').OldReader;\nvar oreader = new OldReader;\nvar Readable = require('stream').Readable;\nvar myReader = new Readable().wrap(oreader);\n\nmyReader.on('readable', function() {\n myReader.read(); // etc.\n});\n```\n\n### Event: 'readable'\n\nWhen there is data ready to be consumed, this event will fire.\n\nWhen this event emits, call the `read()` method to consume the data.\n\n### Event: 'end'\n\nEmitted when the stream has received an EOF (FIN in TCP terminology).\nIndicates that no more `'data'` events will happen. If the stream is\nalso writable, it may be possible to continue writing.\n\n### Event: 'data'\n\nThe `'data'` event emits either a `Buffer` (by default) or a string if\n`setEncoding()` was used.\n\nNote that adding a `'data'` event listener will switch the Readable\nstream into \"old mode\", where data is emitted as soon as it is\navailable, rather than waiting for you to call `read()` to consume it.\n\n### Event: 'error'\n\nEmitted if there was an error receiving data.\n\n### Event: 'close'\n\nEmitted when the underlying resource (for example, the backing file\ndescriptor) has been closed. Not all streams will emit this.\n\n### readable.setEncoding(encoding)\n\nMakes the `'data'` event emit a string instead of a `Buffer`. `encoding`\ncan be `'utf8'`, `'utf16le'` (`'ucs2'`), `'ascii'`, or `'hex'`.\n\nThe encoding can also be set by specifying an `encoding` field to the\nconstructor.\n\n### readable.read([size])\n\n* `size` {Number | null} Optional number of bytes to read.\n* Return: {Buffer | String | null}\n\nNote: **This function SHOULD be called by Readable stream users.**\n\nCall this method to consume data once the `'readable'` event is\nemitted.\n\nThe `size` argument will set a minimum number of bytes that you are\ninterested in. If not set, then the entire content of the internal\nbuffer is returned.\n\nIf there is no data to consume, or if there are fewer bytes in the\ninternal buffer than the `size` argument, then `null` is returned, and\na future `'readable'` event will be emitted when more is available.\n\nCalling `stream.read(0)` will always return `null`, and will trigger a\nrefresh of the internal buffer, but otherwise be a no-op.\n\n### readable.pipe(destination, [options])\n\n* `destination` {Writable Stream}\n* `options` {Object} Optional\n * `end` {Boolean} Default=true\n\nConnects this readable stream to `destination` WriteStream. Incoming\ndata on this stream gets written to `destination`. Properly manages\nback-pressure so that a slow destination will not be overwhelmed by a\nfast readable stream.\n\nThis function returns the `destination` stream.\n\nFor example, emulating the Unix `cat` command:\n\n process.stdin.pipe(process.stdout);\n\nBy default `end()` is called on the destination when the source stream\nemits `end`, so that `destination` is no longer writable. Pass `{ end:\nfalse }` as `options` to keep the destination stream open.\n\nThis keeps `writer` open so that \"Goodbye\" can be written at the\nend.\n\n reader.pipe(writer, { end: false });\n reader.on(\"end\", function() {\n writer.end(\"Goodbye\\n\");\n });\n\nNote that `process.stderr` and `process.stdout` are never closed until\nthe process exits, regardless of the specified options.\n\n### readable.unpipe([destination])\n\n* `destination` {Writable Stream} Optional\n\nUndo a previously established `pipe()`. If no destination is\nprovided, then all previously established pipes are removed.\n\n### readable.pause()\n\nSwitches the readable stream into \"old mode\", where data is emitted\nusing a `'data'` event rather than being buffered for consumption via\nthe `read()` method.\n\nCeases the flow of data. No `'data'` events are emitted while the\nstream is in a paused state.\n\n### readable.resume()\n\nSwitches the readable stream into \"old mode\", where data is emitted\nusing a `'data'` event rather than being buffered for consumption via\nthe `read()` method.\n\nResumes the incoming `'data'` events after a `pause()`.\n\n\n## Class: stream.Writable\n\n<!--type=class-->\n\nA `Writable` Stream has the following methods, members, and events.\n\nNote that `stream.Writable` is an abstract class designed to be\nextended with an underlying implementation of the\n`_write(chunk, encoding, cb)` method. (See below.)\n\n### new stream.Writable([options])\n\n* `options` {Object}\n * `highWaterMark` {Number} Buffer level when `write()` starts\n returning false. Default=16kb\n * `decodeStrings` {Boolean} Whether or not to decode strings into\n Buffers before passing them to `_write()`. Default=true\n\nIn classes that extend the Writable class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### writable.\\_write(chunk, encoding, callback)\n\n* `chunk` {Buffer | String} The chunk to be written. Will always\n be a buffer unless the `decodeStrings` option was set to `false`.\n* `encoding` {String} If the chunk is a string, then this is the\n encoding type. Ignore chunk is a buffer. Note that chunk will\n **always** be a buffer unless the `decodeStrings` option is\n explicitly set to `false`.\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done processing the supplied chunk.\n\nAll Writable stream implementations must provide a `_write` method to\nsend data to the underlying resource.\n\nNote: **This function MUST NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Writable\nclass methods only.\n\nCall the callback using the standard `callback(error)` pattern to\nsignal that the write completed successfully or with an error.\n\nIf the `decodeStrings` flag is set in the constructor options, then\n`chunk` may be a string rather than a Buffer, and `encoding` will\nindicate the sort of string that it is. This is to support\nimplementations that have an optimized handling for certain string\ndata encodings. If you do not explicitly set the `decodeStrings`\noption to `false`, then you can safely ignore the `encoding` argument,\nand assume that `chunk` will always be a Buffer.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n\n### writable.write(chunk, [encoding], [callback])\n\n* `chunk` {Buffer | String} Data to be written\n* `encoding` {String} Optional. If `chunk` is a string, then encoding\n defaults to `'utf8'`\n* `callback` {Function} Optional. Called when this chunk is\n successfully written.\n* Returns {Boolean}\n\nWrites `chunk` to the stream. Returns `true` if the data has been\nflushed to the underlying resource. Returns `false` to indicate that\nthe buffer is full, and the data will be sent out in the future. The\n`'drain'` event will indicate when the buffer is empty again.\n\nThe specifics of when `write()` will return false, is determined by\nthe `highWaterMark` option provided to the constructor.\n\n### writable.end([chunk], [encoding], [callback])\n\n* `chunk` {Buffer | String} Optional final data to be written\n* `encoding` {String} Optional. If `chunk` is a string, then encoding\n defaults to `'utf8'`\n* `callback` {Function} Optional. Called when the final chunk is\n successfully written.\n\nCall this method to signal the end of the data being written to the\nstream.\n\n### Event: 'drain'\n\nEmitted when the stream's write queue empties and it's safe to write\nwithout buffering again. Listen for it when `stream.write()` returns\n`false`.\n\n### Event: 'close'\n\nEmitted when the underlying resource (for example, the backing file\ndescriptor) has been closed. Not all streams will emit this.\n\n### Event: 'finish'\n\nWhen `end()` is called and there are no more chunks to write, this\nevent is emitted.\n\n### Event: 'pipe'\n\n* `source` {Readable Stream}\n\nEmitted when the stream is passed to a readable stream's pipe method.\n\n### Event 'unpipe'\n\n* `source` {Readable Stream}\n\nEmitted when a previously established `pipe()` is removed using the\nsource Readable stream's `unpipe()` method.\n\n## Class: stream.Duplex\n\n<!--type=class-->\n\nA \"duplex\" stream is one that is both Readable and Writable, such as a\nTCP socket connection.\n\nNote that `stream.Duplex` is an abstract class designed to be\nextended with an underlying implementation of the `_read(size)`\nand `_write(chunk, encoding, callback)` methods as you would with a Readable or\nWritable stream class.\n\nSince JavaScript doesn't have multiple prototypal inheritance, this\nclass prototypally inherits from Readable, and then parasitically from\nWritable. It is thus up to the user to implement both the lowlevel\n`_read(n)` method as well as the lowlevel `_write(chunk, encoding, cb)` method\non extension duplex classes.\n\n### new stream.Duplex(options)\n\n* `options` {Object} Passed to both Writable and Readable\n constructors. Also has the following fields:\n * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then\n the stream will automatically end the readable side when the\n writable side ends and vice versa.\n\nIn classes that extend the Duplex class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n## Class: stream.Transform\n\nA \"transform\" stream is a duplex stream where the output is causally\nconnected in some way to the input, such as a zlib stream or a crypto\nstream.\n\nThere is no requirement that the output be the same size as the input,\nthe same number of chunks, or arrive at the same time. For example, a\nHash stream will only ever have a single chunk of output which is\nprovided when the input is ended. A zlib stream will either produce\nmuch smaller or much larger than its input.\n\nRather than implement the `_read()` and `_write()` methods, Transform\nclasses must implement the `_transform()` method, and may optionally\nalso implement the `_flush()` method. (See below.)\n\n### new stream.Transform([options])\n\n* `options` {Object} Passed to both Writable and Readable\n constructors.\n\nIn classes that extend the Transform class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### transform.\\_transform(chunk, encoding, callback)\n\n* `chunk` {Buffer | String} The chunk to be transformed. Will always\n be a buffer unless the `decodeStrings` option was set to `false`.\n* `encoding` {String} If the chunk is a string, then this is the\n encoding type. (Ignore if `decodeStrings` chunk is a buffer.)\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done processing the supplied chunk.\n\nNote: **This function MUST NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Transform\nclass methods only.\n\nAll Transform stream implementations must provide a `_transform`\nmethod to accept input and produce output.\n\n`_transform` should do whatever has to be done in this specific\nTransform class, to handle the bytes being written, and pass them off\nto the readable portion of the interface. Do asynchronous I/O,\nprocess things, and so on.\n\nCall `transform.push(outputChunk)` 0 or more times to generate output\nfrom this input chunk, depending on how much data you want to output\nas a result of this chunk.\n\nCall the callback function only when the current chunk is completely\nconsumed. Note that there may or may not be output as a result of any\nparticular input chunk.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n### transform.\\_flush(callback)\n\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done flushing any remaining data.\n\nNote: **This function MUST NOT be called directly.** It MAY be implemented\nby child classes, and if so, will be called by the internal Transform\nclass methods only.\n\nIn some cases, your transform operation may need to emit a bit more\ndata at the end of the stream. For example, a `Zlib` compression\nstream will store up some internal state so that it can optimally\ncompress the output. At the end, however, it needs to do the best it\ncan with what is left, so that the data will be complete.\n\nIn those cases, you can implement a `_flush` method, which will be\ncalled at the very end, after all the written data is consumed, but\nbefore emitting `end` to signal the end of the readable side. Just\nlike with `_transform`, call `transform.push(chunk)` zero or more\ntimes, as appropriate, and call `callback` when the flush operation is\ncomplete.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n### Example: `SimpleProtocol` parser\n\nThe example above of a simple protocol parser can be implemented much\nmore simply by using the higher level `Transform` stream class.\n\nIn this example, rather than providing the input as an argument, it\nwould be piped into the parser, which is a more idiomatic Node stream\napproach.\n\n```javascript\nfunction SimpleProtocol(options) {\n if (!(this instanceof SimpleProtocol))\n return new SimpleProtocol(options);\n\n Transform.call(this, options);\n this._inBody = false;\n this._sawFirstCr = false;\n this._rawHeader = [];\n this.header = null;\n}\n\nSimpleProtocol.prototype = Object.create(\n Transform.prototype, { constructor: { value: SimpleProtocol }});\n\nSimpleProtocol.prototype._transform = function(chunk, encoding, done) {\n if (!this._inBody) {\n // check if the chunk has a \\n\\n\n var split = -1;\n for (var i = 0; i < chunk.length; i++) {\n if (chunk[i] === 10) { // '\\n'\n if (this._sawFirstCr) {\n split = i;\n break;\n } else {\n this._sawFirstCr = true;\n }\n } else {\n this._sawFirstCr = false;\n }\n }\n\n if (split === -1) {\n // still waiting for the \\n\\n\n // stash the chunk, and try again.\n this._rawHeader.push(chunk);\n } else {\n this._inBody = true;\n var h = chunk.slice(0, split);\n this._rawHeader.push(h);\n var header = Buffer.concat(this._rawHeader).toString();\n try {\n this.header = JSON.parse(header);\n } catch (er) {\n this.emit('error', new Error('invalid simple protocol data'));\n return;\n }\n // and let them know that we are done parsing the header.\n this.emit('header', this.header);\n\n // now, because we got some extra data, emit this first.\n this.push(b);\n }\n } else {\n // from there on, just provide the data to our consumer as-is.\n this.push(b);\n }\n done();\n};\n\nvar parser = new SimpleProtocol();\nsource.pipe(parser)\n\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.\n```\n\n\n## Class: stream.PassThrough\n\nThis is a trivial implementation of a `Transform` stream that simply\npasses the input bytes across to the output. Its purpose is mainly\nfor examples and testing, but there are occasionally use cases where\nit can come in handy.\n\n\n[EventEmitter]: events.html#events_class_events_eventemitter\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/readable-stream/issues" - }, - "homepage": "https://github.com/isaacs/readable-stream", - "_id": "readable-stream@1.0.25", - "dist": { - "shasum": "3d234b55fd2a25db8327618f088e50a32044df50" - }, - "_from": "readable-stream@~1.0.17", - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.25.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/passthrough.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/readable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/readable.js deleted file mode 100644 index 4d1ddfc7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,6 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/transform.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f07..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/writable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efdf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/LICENCE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/LICENCE deleted file mode 100644 index a23e08a8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 Raynos. - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/Makefile deleted file mode 100644 index d583fcf4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -browser: - node ./support/compile - -.PHONY: browser \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/README.md deleted file mode 100644 index 389adae3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# xtend - -[![browser support][3]][4] - -Extend like a boss - -xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence. - -## Examples - -```js -var extend = require("xtend") - -var combination = extend({ - a: "a" -}, { - b: "b" -}) -// { a: "a", b: "b" } -``` - - -## MIT Licenced - - - [3]: http://ci.testling.com/Raynos/xtend.png - [4]: http://ci.testling.com/Raynos/xtend diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/has-keys.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/has-keys.js deleted file mode 100644 index 62391e78..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/has-keys.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = hasKeys - -function hasKeys(source) { - return source !== null && - (typeof source === "object" || - typeof source === "function") -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/index.js deleted file mode 100644 index 20937d19..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/index.js +++ /dev/null @@ -1,25 +0,0 @@ -var Keys = require("object-keys") -var hasKeys = require("./has-keys") - -module.exports = extend - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - if (!hasKeys(source)) { - continue - } - - var keys = Keys(source) - - for (var j = 0; j < keys.length; j++) { - var name = keys[j] - target[name] = source[name] - } - } - - return target -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/mutable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/mutable.js deleted file mode 100644 index 17454ae4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/mutable.js +++ /dev/null @@ -1,25 +0,0 @@ -var Keys = require("object-keys") -var hasKeys = require("./has-keys") - -module.exports = extend - -function extend(target) { - var sources = [].slice.call(arguments, 1) - - for (var i = 0; i < sources.length; i++) { - var source = sources[i] - - if (!hasKeys(source)) { - continue - } - - var keys = Keys(source) - - for (var j = 0; j < keys.length; j++) { - var name = keys[j] - target[name] = source[name] - } - } - - return target -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml deleted file mode 100644 index 60d00ce1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.8" - - "0.6" diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md deleted file mode 100644 index ab32d0ad..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md +++ /dev/null @@ -1,39 +0,0 @@ -#object-keys <sup>[![Version Badge][2]][1]</sup> - -[![Build Status][3]][4] [![dependency status][5]][6] - -[![browser support][7]][8] - -An Object.keys shim. Uses Object.keys if available. - -## Example - -```js -var keys = require('object-keys'); -var assert = require('assert'); -var obj = { - a: true, - b: true, - c: true -}; - -assert.equal(keys(obj), ['a', 'b', 'c']); -``` - -## Source -Implementation taken directly from [es5-shim]([9]), with modifications, including from [lodash]([10]). - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[1]: https://npmjs.org/package/object-keys -[2]: http://vb.teelaun.ch/ljharb/object-keys.svg -[3]: https://travis-ci.org/ljharb/object-keys.png -[4]: https://travis-ci.org/ljharb/object-keys -[5]: https://david-dm.org/ljharb/object-keys.png -[6]: https://david-dm.org/ljharb/object-keys -[7]: https://ci.testling.com/ljharb/object-keys.png -[8]: https://ci.testling.com/ljharb/object-keys -[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589 -[10]: https://github.com/bestiejs/lodash - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js deleted file mode 100644 index db32d458..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js +++ /dev/null @@ -1,40 +0,0 @@ -var hasOwn = Object.prototype.hasOwnProperty; -var toString = Object.prototype.toString; - -var isFunction = function (fn) { - var isFunc = (typeof fn === 'function' && !(fn instanceof RegExp)) || toString.call(fn) === '[object Function]'; - if (!isFunc && typeof window !== 'undefined') { - isFunc = fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt; - } - return isFunc; -}; - -module.exports = function forEach(obj, fn) { - if (!isFunction(fn)) { - throw new TypeError('iterator must be a function'); - } - var i, k, - isString = typeof obj === 'string', - l = obj.length, - context = arguments.length > 2 ? arguments[2] : null; - if (l === +l) { - for (i = 0; i < l; i++) { - if (context === null) { - fn(isString ? obj.charAt(i) : obj[i], i, obj); - } else { - fn.call(context, isString ? obj.charAt(i) : obj[i], i, obj); - } - } - } else { - for (k in obj) { - if (hasOwn.call(obj, k)) { - if (context === null) { - fn(obj[k], k, obj); - } else { - fn.call(context, obj[k], k, obj); - } - } - } - } -}; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js deleted file mode 100644 index f5b24b6d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js +++ /dev/null @@ -1,2 +0,0 @@ -module.exports = Object.keys || require('./shim'); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js deleted file mode 100644 index 74a09897..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js +++ /dev/null @@ -1,16 +0,0 @@ -var toString = Object.prototype.toString; - -module.exports = function isArguments(value) { - var str = toString.call(value); - var isArguments = str === '[object Arguments]'; - if (!isArguments) { - isArguments = str !== '[object Array]' - && value !== null - && typeof value === 'object' - && typeof value.length === 'number' - && value.length >= 0 - && toString.call(value.callee) === '[object Function]'; - } - return isArguments; -}; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json deleted file mode 100644 index 9dfda8dc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "object-keys", - "version": "0.4.0", - "author": { - "name": "Jordan Harband" - }, - "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/kriskowal/es5-shim", - "license": "MIT", - "main": "index.js", - "scripts": { - "test": "node test/index.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/ljharb/object-keys.git" - }, - "keywords": [ - "Object.keys", - "keys", - "ES5", - "shim" - ], - "dependencies": {}, - "devDependencies": { - "foreach": "~2.0.3", - "is": "~0.2.6", - "tape": "~1.0.4", - "indexof": "~0.0.1" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "readme": "#object-keys <sup>[![Version Badge][2]][1]</sup>\n\n[![Build Status][3]][4] [![dependency status][5]][6]\n\n[![browser support][7]][8]\n\nAn Object.keys shim. Uses Object.keys if available.\n\n## Example\n\n```js\nvar keys = require('object-keys');\nvar assert = require('assert');\nvar obj = {\n\ta: true,\n\tb: true,\n\tc: true\n};\n\nassert.equal(keys(obj), ['a', 'b', 'c']);\n```\n\n## Source\nImplementation taken directly from [es5-shim]([9]), with modifications, including from [lodash]([10]).\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[1]: https://npmjs.org/package/object-keys\n[2]: http://vb.teelaun.ch/ljharb/object-keys.svg\n[3]: https://travis-ci.org/ljharb/object-keys.png\n[4]: https://travis-ci.org/ljharb/object-keys\n[5]: https://david-dm.org/ljharb/object-keys.png\n[6]: https://david-dm.org/ljharb/object-keys\n[7]: https://ci.testling.com/ljharb/object-keys.png\n[8]: https://ci.testling.com/ljharb/object-keys\n[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589\n[10]: https://github.com/bestiejs/lodash\n\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/ljharb/object-keys/issues" - }, - "homepage": "https://github.com/ljharb/object-keys", - "_id": "object-keys@0.4.0", - "dist": { - "shasum": "28a6aae7428dd2c3a92f3d95f21335dd204e0336" - }, - "_from": "object-keys@~0.4.0", - "_resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js deleted file mode 100644 index b88421be..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js +++ /dev/null @@ -1,62 +0,0 @@ -(function () { - "use strict"; - - // modified from https://github.com/kriskowal/es5-shim - var has = Object.prototype.hasOwnProperty, - toString = Object.prototype.toString, - forEach = require('./foreach'), - isArgs = require('./isArguments'), - hasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'), - hasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype'), - dontEnums = [ - "toString", - "toLocaleString", - "valueOf", - "hasOwnProperty", - "isPrototypeOf", - "propertyIsEnumerable", - "constructor" - ], - keysShim; - - keysShim = function keys(object) { - var isObject = object !== null && typeof object === 'object', - isFunction = toString.call(object) === '[object Function]', - isArguments = isArgs(object), - theKeys = []; - - if (!isObject && !isFunction && !isArguments) { - throw new TypeError("Object.keys called on a non-object"); - } - - if (isArguments) { - forEach(object, function (value) { - theKeys.push(value); - }); - } else { - var name, - skipProto = hasProtoEnumBug && isFunction; - - for (name in object) { - if (!(skipProto && name === 'prototype') && has.call(object, name)) { - theKeys.push(name); - } - } - } - - if (hasDontEnumBug) { - var ctor = object.constructor, - skipConstructor = ctor && ctor.prototype === object; - - forEach(dontEnums, function (dontEnum) { - if (!(skipConstructor && dontEnum === 'constructor') && has.call(object, dontEnum)) { - theKeys.push(dontEnum); - } - }); - } - return theKeys; - }; - - module.exports = keysShim; -}()); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js deleted file mode 100644 index f29f065a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js +++ /dev/null @@ -1,156 +0,0 @@ -var test = require('tape'); -var forEach = require('../foreach.js'); - -test('second argument: iterator', function (t) { - var arr = []; - t.throws(function () { forEach(arr); }, TypeError, 'undefined is not a function'); - t.throws(function () { forEach(arr, null); }, TypeError, 'null is not a function'); - t.throws(function () { forEach(arr, ''); }, TypeError, 'string is not a function'); - t.throws(function () { forEach(arr, /a/); }, TypeError, 'regex is not a function'); - t.throws(function () { forEach(arr, true); }, TypeError, 'true is not a function'); - t.throws(function () { forEach(arr, false); }, TypeError, 'false is not a function'); - t.throws(function () { forEach(arr, NaN); }, TypeError, 'NaN is not a function'); - t.throws(function () { forEach(arr, 42); }, TypeError, '42 is not a function'); - t.doesNotThrow(function () { forEach(arr, function () {}); }, 'function is a function'); - t.doesNotThrow(function () { forEach(arr, setTimeout); }, 'setTimeout is a function'); - if (typeof window !== 'undefined') { - t.doesNotThrow(function () { forEach(arr, window.alert); }, 'alert is a function'); - } - t.end(); -}); - -test('array', function (t) { - var arr = [1, 2, 3]; - - t.test('iterates over every item', function (st) { - var index = 0; - forEach(arr, function () { index += 1; }); - st.equal(index, arr.length, 'iterates ' + arr.length + ' times'); - st.end(); - }); - - t.test('first iterator argument', function (st) { - var index = 0; - st.plan(arr.length); - forEach(arr, function (item) { - st.equal(arr[index], item, 'item ' + index + ' is passed as first argument'); - index += 1; - }); - st.end(); - }); - - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(arr.length); - forEach(arr, function (item, index) { - st.equal(counter, index, 'index ' + index + ' is passed as second argument'); - counter += 1; - }); - st.end(); - }); - - t.test('third iterator argument', function (st) { - st.plan(arr.length); - forEach(arr, function (item, index, array) { - st.deepEqual(arr, array, 'array is passed as third argument'); - }); - st.end(); - }); - - t.test('context argument', function (st) { - var context = {}; - st.plan(arr.length); - forEach(arr, function () { - st.equal(this, context, '"this" is the passed context'); - }, context); - st.end(); - }); - - t.end(); -}); - -test('object', function (t) { - var obj = { - a: 1, - b: 2, - c: 3 - }; - var keys = ['a', 'b', 'c']; - - var F = function () { - this.a = 1; - this.b = 2; - }; - F.prototype.c = 3; - var fKeys = ['a', 'b']; - - t.test('iterates over every object literal key', function (st) { - var counter = 0; - forEach(obj, function () { counter += 1; }); - st.equal(counter, keys.length, 'iterated ' + counter + ' times'); - st.end(); - }); - - t.test('iterates only over own keys', function (st) { - var counter = 0; - forEach(new F(), function () { counter += 1; }); - st.equal(counter, fKeys.length, 'iterated ' + fKeys.length + ' times'); - st.end(); - }); - - t.test('first iterator argument', function (st) { - var index = 0; - st.plan(keys.length); - forEach(obj, function (item) { - st.equal(obj[keys[index]], item, 'item at key ' + keys[index] + ' is passed as first argument'); - index += 1; - }); - st.end(); - }); - - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(keys.length); - forEach(obj, function (item, key) { - st.equal(keys[counter], key, 'key ' + key + ' is passed as second argument'); - counter += 1; - }); - st.end(); - }); - - t.test('third iterator argument', function (st) { - st.plan(keys.length); - forEach(obj, function (item, key, object) { - st.deepEqual(obj, object, 'object is passed as third argument'); - }); - st.end(); - }); - - t.test('context argument', function (st) { - var context = {}; - st.plan(1); - forEach({foo: 'bar'}, function () { - st.equal(this, context, '"this" is the passed context'); - }, context); - st.end(); - }); - - t.end(); -}); - - -test('string', function (t) { - var str = 'str'; - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(str.length * 2 + 1); - forEach(str, function (item, index) { - st.equal(counter, index, 'index ' + index + ' is passed as second argument'); - st.equal(str.charAt(index), item); - counter += 1; - }); - st.equal(counter, str.length, 'iterates ' + str.length + ' times'); - }); - t.end(); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js deleted file mode 100644 index 8b77b1fc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js +++ /dev/null @@ -1,6 +0,0 @@ - -require('./foreach'); -require('./isArguments'); - -require('./shim'); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js deleted file mode 100644 index 62a07c2d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js +++ /dev/null @@ -1,10 +0,0 @@ -var test = require('tape'); -var isArguments = require('../isArguments'); - -test('is.arguments', function (t) { - t.notOk(isArguments([]), 'array is not arguments'); - (function () { t.ok(isArguments(arguments), 'arguments is arguments'); }()); - (function () { t.notOk(isArguments(Array.prototype.slice.call(arguments)), 'sliced arguments is not arguments'); }()); - t.end(); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js deleted file mode 100644 index 9d932712..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js +++ /dev/null @@ -1,134 +0,0 @@ -var test = require('tape'); -var shimmedKeys = require('../index.js'); -var is = require('is'); -var keys = require('../shim.js'); -var forEach = require('foreach'); -var indexOf = require('indexof'); - -var obj = { - "str": "boz", - "obj": {}, - "arr": [], - "bool": true, - "num": 42, - "aNull": null, - "undef": undefined -}; -var objKeys = ['str', 'obj', 'arr', 'bool', 'num', 'aNull', 'undef']; - -test('exports a function', function (t) { - if (Object.keys) { - t.equal(Object.keys, shimmedKeys, 'Object.keys is supported and exported'); - } else { - t.equal(keys, shimmedKeys, 'Object.keys is not supported; shim is exported'); - } - t.end(); -}); - -test('working with actual shim', function (t) { - t.notEqual(Object.keys, keys, 'keys shim is not native Object.keys'); - t.end(); -}); - -test('works with an object literal', function (t) { - var theKeys = keys(obj); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, objKeys, 'Object has expected keys'); - t.end(); -}); - -test('works with an array', function (t) { - var arr = [1, 2, 3]; - var theKeys = keys(arr); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, ['0', '1', '2'], 'Array has expected keys'); - t.end(); -}); - -test('works with a function', function (t) { - var foo = function () {}; - foo.a = true; - - t.doesNotThrow(function () { return keys(foo); }, 'does not throw an error'); - t.deepEqual(keys(foo), ['a'], 'returns expected keys'); - t.end(); -}); - -test('returns names which are own properties', function (t) { - forEach(keys(obj), function (name) { - t.equal(obj.hasOwnProperty(name), true, name + ' should be returned'); - }); - t.end(); -}); - -test('returns names which are enumerable', function (t) { - var k, loopedValues = []; - for (k in obj) { - loopedValues.push(k); - } - forEach(keys(obj), function (name) { - t.notEqual(indexOf(loopedValues, name), -1, name + ' is not enumerable'); - }); - t.end(); -}); - -test('throws an error for a non-object', function (t) { - t.throws( - function () { return keys(42); }, - new TypeError('Object.keys called on a non-object'), - 'throws on a non-object' - ); - t.end(); -}); - -test('works with an object instance', function (t) { - var Prototype = function () {}; - Prototype.prototype.foo = true; - var obj = new Prototype(); - obj.bar = true; - var theKeys = keys(obj); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, ['bar'], 'Instance has expected keys'); - t.end(); -}); - -test('works in iOS 5 mobile Safari', function (t) { - var Foo = function () {}; - Foo.a = function () {}; - - // the bug is keys(Foo) => ['a', 'prototype'] instead of ['a'] - t.deepEqual(keys(Foo), ['a'], 'has expected keys'); - t.end(); -}); - -test('works in environments with the dontEnum bug (IE < 9)', function (t) { - var Foo = function () {}; - Foo.prototype.a = function () {}; - - // the bug is keys(Foo.prototype) => ['a', 'constructor'] instead of ['a'] - t.deepEqual(keys(Foo.prototype), ['a'], 'has expected keys'); - t.end(); -}); - -test('shadowed properties', function (t) { - var shadowedProps = [ - 'dummyControlProp', /* just to be sure */ - 'constructor', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'toLocaleString', - 'toString', - 'valueOf' - ]; - shadowedProps.sort(); - var shadowedObject = {}; - forEach(shadowedProps, function (value, index) { - shadowedObject[value] = index; - }); - var shadowedObjectKeys = keys(shadowedObject); - shadowedObjectKeys.sort(); - t.deepEqual(shadowedObjectKeys, shadowedProps, 'troublesome shadowed properties are keys of object literals'); - t.end(); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/package.json deleted file mode 100644 index a761197d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "xtend", - "version": "2.1.2", - "description": "extend like a boss", - "keywords": [ - "extend", - "merge", - "options", - "opts", - "object", - "array" - ], - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Raynos/xtend.git" - }, - "main": "index", - "scripts": { - "test": "node test" - }, - "dependencies": { - "object-keys": "~0.4.0" - }, - "devDependencies": { - "tape": "~1.1.0" - }, - "homepage": "https://github.com/Raynos/xtend", - "contributors": [ - { - "name": "Jake Verbaten" - }, - { - "name": "Matt Esch" - } - ], - "bugs": { - "url": "https://github.com/Raynos/xtend/issues", - "email": "raynos2@gmail.com" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/raynos/xtend/raw/master/LICENSE" - } - ], - "testling": { - "files": "test.js", - "browsers": [ - "ie/7..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "engines": { - "node": ">=0.4" - }, - "readme": "# xtend\n\n[![browser support][3]][4]\n\nExtend like a boss\n\nxtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence.\n\n## Examples\n\n```js\nvar extend = require(\"xtend\")\n\nvar combination = extend({\n a: \"a\"\n}, {\n b: \"b\"\n})\n// { a: \"a\", b: \"b\" }\n```\n\n\n## MIT Licenced\n\n\n [3]: http://ci.testling.com/Raynos/xtend.png\n [4]: http://ci.testling.com/Raynos/xtend\n", - "readmeFilename": "README.md", - "_id": "xtend@2.1.2", - "dist": { - "shasum": "5e8f75d1b0d9ca976fee0f1aa88f80c7619210d5" - }, - "_from": "xtend@~2.1.1", - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/test.js deleted file mode 100644 index 3369d796..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/test.js +++ /dev/null @@ -1,63 +0,0 @@ -var test = require("tape") -var extend = require("./") -var mutableExtend = require("./mutable") - -test("merge", function(assert) { - var a = { a: "foo" } - var b = { b: "bar" } - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("replace", function(assert) { - var a = { a: "foo" } - var b = { a: "bar" } - - assert.deepEqual(extend(a, b), { a: "bar" }) - assert.end() -}) - -test("undefined", function(assert) { - var a = { a: undefined } - var b = { b: "foo" } - - assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) - assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) - assert.end() -}) - -test("handle 0", function(assert) { - var a = { a: "default" } - var b = { a: 0 } - - assert.deepEqual(extend(a, b), { a: 0 }) - assert.deepEqual(extend(b, a), { a: "default" }) - assert.end() -}) - -test("is immutable", function (assert) { - var record = {} - - extend(record, { foo: "bar" }) - assert.equal(record.foo, undefined) - assert.end() -}) - -test("null as argument", function (assert) { - var a = { foo: "bar" } - var b = null - var c = void 0 - - assert.deepEqual(extend(b, a, c), { foo: "bar" }) - assert.end() -}) - -test("mutable", function (assert) { - var a = { foo: "bar" } - - mutableExtend(a, { bar: "baz" }) - - assert.equal(a.bar, "baz") - assert.end() -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/package.json deleted file mode 100644 index 9612fee2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "through2", - "version": "0.4.1", - "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", - "main": "through2.js", - "scripts": { - "test": "node test/test.js", - "test-local": "brtapsauce-local test/basic-test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/rvagg/through2.git" - }, - "keywords": [ - "stream", - "streams2", - "through", - "transform" - ], - "author": { - "name": "Rod Vagg", - "email": "r@va.gg", - "url": "https://github.com/rvagg" - }, - "license": "MIT", - "dependencies": { - "readable-stream": "~1.0.17", - "xtend": "~2.1.1" - }, - "devDependencies": { - "tape": "~2.3.0", - "bl": "~0.6.0", - "stream-spigot": "~3.0.1", - "brtapsauce": "~0.2.2" - }, - "readme": "# through2\n\n<!--\n\nsoon ...\n\n[![Build Status](https://secure.travis-ci.org/rvagg/through2.png)](http://travis-ci.org/rvagg/through2)\n\n[![Build Status](https://saucelabs.com/browser-matrix/through2-sauce.svg)](https://travis-ci.org/rvagg/through2)\n\n-->\n\n[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/) \n\n<!--\nnot happy with these, we need to peg to readable-stream@1.0.x so it'll always report out-of-date\n\n[![david-dm](https://david-dm.org/rvagg/through2.png)](https://david-dm.org/rvagg/through2/)\n[![david-dm](https://david-dm.org/rvagg/through2/dev-status.png)](https://david-dm.org/rvagg/through2#info=devDependencies/)\n-->\n\n**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise**\n\nInspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.\n\n```js\nfs.createReadStream('ex.txt')\n .pipe(through2(function (chunk, enc, callback) {\n\n for (var i = 0; i < chunk.length; i++)\n if (chunk[i] == 97)\n chunk[i] = 122 // swap 'a' for 'z'\n\n this.push(chunk)\n \n callback()\n\n }))\n .pipe(fs.createWriteStream('out.txt'))\n```\n\nOr object streams:\n\n```js\nvar all = []\n\nfs.createReadStream('data.csv')\n .pipe(csv2())\n .pipe(through2.obj(function (chunk, enc, callback) {\n\n var data = {\n name : chunk[0]\n , address : chunk[3]\n , phone : chunk[10]\n }\n \n this.push(data)\n \n callback()\n\n }))\n .on('data', function (data) {\n all.push(data)\n })\n .on('end', function () {\n doSomethingSpecial(all)\n })\n```\n\nNote that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`.\n\n## API\n\n<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b>\n\nConsult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).\n\n### options\n\nThe options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`).\n\nThe `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call:\n\n```js\nfs.createReadStream('/tmp/important.dat')\n .pipe(through2({ objectMode: true, allowHalfOpen: false }, function (chunk, enc, cb) {\n\n this.push(new Buffer('wut?'))\n cb()\n\n })\n .pipe(fs.createWriteStream('/tmp/wut.txt'))\n```\n\n### transformFunction\n\nThe `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk.\n\nTo queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on.\n\nIf you **do not provide a `transformFunction`** then you will get a simple simple pass-through stream.\n\n### flushFunction\n\nThe optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress.\n\n<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b>\n\nInstead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.\n\n```js\nvar FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) {\n if (record.temp != null && record.unit = \"F\") {\n record.temp = ( ( record.temp - 32 ) * 5 ) / 9\n record.unit = \"C\"\n }\n this.push(record)\n callback()\n})\n\n// Create instances of FToC like so:\nvar converter = new FToC()\n// Or:\nvar converter = FToC()\n// Or specify/override options when you instantiate, if you prefer:\nvar converter = FToC({objectMode: true})\n```\n\n## License\n\n**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/rvagg/through2/issues" - }, - "homepage": "https://github.com/rvagg/through2", - "_id": "through2@0.4.1", - "dist": { - "shasum": "48772c8b50c4955c25e7cdbe69f4220f4138178b" - }, - "_from": "through2@~0.4.0", - "_resolved": "https://registry.npmjs.org/through2/-/through2-0.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/basic-test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/basic-test.js deleted file mode 100644 index 9d137c7f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/basic-test.js +++ /dev/null @@ -1,334 +0,0 @@ -const test = require('tape') - , through2 = require('../') - , crypto = require('crypto') - , bl = require('bl') - , spigot = require('stream-spigot') - -test('plain through', function (t) { - var th2 = through2(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') - t.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('pipeable through', function (t) { - var th2 = through2(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - // bl() acts like a proper streams2 stream and passes as much as it's - // asked for, so we really only get one write with such a small amount - // of data - t.equal(s, 'aaaaaaaaaaaaaaaaaaaaaaaaa', 'got transformed string') - t.end() - })) - - var bufs = bl() - bufs.append(crypto.randomBytes(10)) - bufs.append(crypto.randomBytes(5)) - bufs.append(crypto.randomBytes(10)) - bufs.pipe(th2) -}) - -test('object through', function (t) { - t.plan(3) - - var th2 = through2({ objectMode: true}, function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object through with through2.obj', function (t) { - t.plan(3) - - var th2 = through2.obj(function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('flushing through', function (t) { - var th2 = through2(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }, function (callback) { - this.push(new Buffer([ 101, 110, 100 ])) - callback() - }) - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal(s, 'aaaaaaaaaabbbbbccccccccccend', 'got transformed string') - t.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('plain through ctor', function (t) { - var Th2 = through2.ctor(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - var th2 = new Th2() - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') - t.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('reuse through ctor', function (t) { - t.plan(4) - - var Th2 = through2.ctor(function (chunk, enc, callback) { - if (!this._i) { - t.ok(1, 'did not contain previous instance data (this._i)') - this._i = 97 // 'a' - } else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - var th2 = Th2() - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') - - var newInstance = Th2() - newInstance.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaabbbbccccccc', s, 'got transformed string') - })) - - newInstance.write(crypto.randomBytes(7)) - newInstance.write(crypto.randomBytes(4)) - newInstance.write(crypto.randomBytes(7)) - newInstance.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('object through ctor', function (t) { - t.plan(3) - - var Th2 = through2.ctor({ objectMode: true}, function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = new Th2() - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('pipeable object through ctor', function (t) { - t.plan(4) - - var Th2 = through2.ctor({ objectMode: true}, function (record, enc, callback) { - if (record.temp != null && record.unit == 'F') { - record.temp = ( ( record.temp - 32 ) * 5 ) / 9 - record.unit = 'C' - } - this.push(record) - callback() - }) - - var th2 = Th2() - - var expect = [-19, -40, 100, 22] - th2.on('data', function (o) { - t.deepEqual(o, { temp: expect.shift(), unit: 'C' }, 'got transformed object') - }) - - spigot({objectMode: true}, [ - {temp: -2.2, unit: 'F'}, - {temp: -40, unit: 'F'}, - {temp: 212, unit: 'F'}, - {temp: 22, unit: 'C'} - ]).pipe(th2) -}) - -test('object through ctor override', function (t) { - t.plan(3) - - var Th2 = through2.ctor(function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2({objectMode: true}) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object settings available in transform', function (t) { - t.plan(6) - - var Th2 = through2.ctor({objectMode: true, peek: true}, function (chunk, enc, callback) { - t.ok(this.options.peek, "reading options from inside _transform") - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2() - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object settings available in transform override', function (t) { - t.plan(6) - - var Th2 = through2.ctor(function (chunk, enc, callback) { - t.ok(this.options.peek, "reading options from inside _transform") - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2({objectMode: true, peek: true}) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object override extends options', function (t) { - t.plan(6) - - var Th2 = through2.ctor({objectMode: true}, function (chunk, enc, callback) { - t.ok(this.options.peek, "reading options from inside _transform") - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2({peek: true}) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/bench.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/bench.js deleted file mode 100644 index cc10868b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/bench.js +++ /dev/null @@ -1,42 +0,0 @@ -/* -on rvagg@fletcher: - @0.2.3: Ran 36719 iterations in 10000 ms -*/ - -const through2 = require('../') - , bl = require('bl') - , crypto = require('crypto') - , assert = require('assert') - -function run (callback) { - var bufs = Array.apply(null, Array(10)).map(function () { return crypto.randomBytes(32) }) - , stream = through2(function (chunk, env, callback) { - callback(null, chunk.toString('hex')) - }) - - stream.pipe(bl(function (err, data) { - assert(!err) - assert.equal(data.toString(), Buffer.concat(bufs).toString('hex')) - callback() - })) - - bufs.forEach(function (b) { - stream.write(b) - }) - stream.end() -} - -var count = 0 - , start = Date.now() - -;(function exec () { - count++ - run(function () { - if (Date.now() - start < 1000 * 10) { - return setImmediate(exec) - } - console.log('Ran', count, 'iterations in', Date.now() - start, 'ms') - }) -}()) - -console.log('Running for ~10s') \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/sauce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/sauce.js deleted file mode 100644 index a6d28625..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/sauce.js +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env node - -const user = process.env.SAUCE_USER - , key = process.env.SAUCE_KEY - , path = require('path') - , brtapsauce = require('brtapsauce') - , testFile = path.join(__dirname, 'basic-test.js') - - , capabilities = [ - { browserName: 'chrome' , platform: 'Windows XP', version: '' } - , { browserName: 'firefox' , platform: 'Windows 8' , version: '' } - , { browserName: 'firefox' , platform: 'Windows XP', version: '4' } - , { browserName: 'internet explorer' , platform: 'Windows 8' , version: '10' } - , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '9' } - , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '8' } - , { browserName: 'internet explorer' , platform: 'Windows XP', version: '7' } - , { browserName: 'internet explorer' , platform: 'Windows XP', version: '6' } - , { browserName: 'safari' , platform: 'Windows 7' , version: '5' } - , { browserName: 'safari' , platform: 'OS X 10.8' , version: '6' } - , { browserName: 'opera' , platform: 'Windows 7' , version: '' } - , { browserName: 'opera' , platform: 'Windows 7' , version: '11' } - , { browserName: 'ipad' , platform: 'OS X 10.8' , version: '6' } - , { browserName: 'android' , platform: 'Linux' , version: '4.0', 'device-type': 'tablet' } - ] - -if (!user) - throw new Error('Must set a SAUCE_USER env var') -if (!key) - throw new Error('Must set a SAUCE_KEY env var') - -brtapsauce({ - name : 'Traversty' - , user : user - , key : key - , brsrc : testFile - , capabilities : capabilities - , options : { timeout: 60 * 6 } -}) \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/test.js deleted file mode 100644 index aa9b4877..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/test.js +++ /dev/null @@ -1,9 +0,0 @@ -require('./basic-test') - -if (!process.env.SAUCE_KEY || !process.env.SAUCE_USER) - return console.log('SAUCE_KEY and/or SAUCE_USER not set, not running sauce tests') - -if (!/v0\.10/.test(process.version)) - return console.log('Not Node v0.10.x, not running sauce tests') - -require('./sauce.js') \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/through2.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/through2.js deleted file mode 100644 index c1104848..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/through2/through2.js +++ /dev/null @@ -1,78 +0,0 @@ -var Transform = require('readable-stream/transform') - , inherits = require('util').inherits - , xtend = require('xtend') - - -// a noop _transform function -function noop (chunk, enc, callback) { - callback(null, chunk) -} - - -// create a new export function, used by both the main export and -// the .ctor export, contains common logic for dealing with arguments -function through2 (construct) { - return function (options, transform, flush) { - if (typeof options == 'function') { - flush = transform - transform = options - options = {} - } - - if (typeof transform != 'function') - transform = noop - - if (typeof flush != 'function') - flush = null - - return construct(options, transform, flush) - } -} - - -// main export, just make me a transform stream! -module.exports = through2(function (options, transform, flush) { - var t2 = new Transform(options) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) - - -// make me a reusable prototype that I can `new`, or implicitly `new` -// with a constructor call -module.exports.ctor = through2(function (options, transform, flush) { - function Through2 (override) { - if (!(this instanceof Through2)) - return new Through2(override) - - this.options = xtend(options, override) - - Transform.call(this, this.options) - } - - inherits(Through2, Transform) - - Through2.prototype._transform = transform - - if (flush) - Through2.prototype._flush = flush - - return Through2 -}) - - -module.exports.obj = through2(function (options, transform, flush) { - var t2 = new Transform(xtend({ objectMode: true }, options)) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/package.json deleted file mode 100644 index d289871c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "download", - "version": "0.1.10", - "description": "Download and extract files effortlessly", - "keywords": [ - "url", - "http", - "download", - "extract" - ], - "homepage": "https://github.com/kevva/download", - "bugs": { - "url": "https://github.com/kevva/download/issues" - }, - "author": { - "name": "Kevin Martensson", - "email": "kevinmartensson@gmail.com", - "url": "http://kevinmartensson.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/kevva/download.git" - }, - "scripts": { - "test": "mocha --reporter list" - }, - "main": "download.js", - "files": [ - "download.js" - ], - "dependencies": { - "decompress": "~0.1.5", - "each-async": "~0.1.1", - "mkdirp": "~0.3.5", - "request": "~2.31.0", - "through2": "~0.4.0" - }, - "devDependencies": { - "mocha": "~1.17.0", - "nock": "~0.27.1", - "rimraf": "~2.2.5" - }, - "engines": { - "node": ">=0.10.0" - }, - "readme": "# download [![Build Status](https://secure.travis-ci.org/kevva/download.png?branch=master)](http://travis-ci.org/kevva/download)\n\nDownload and extract files effortlessly in Node.js.\n\n## Getting started\n\nInstall with [npm](https://npmjs.org/package/download): `npm install download`\n\n## Examples\n\nIf you're fetching an archive you can set `extract: true` in options and\nit'll extract it for you.\n\n```js\nvar download = require('download');\n\n// download and extract `foo.tar.gz` into `bar/`\ndownload('foo.tar.gz', 'bar', { extract: true });\n\n// download and save `foo.exe` into `bar/foo.exe` with mode `0755`\ndownload('foo.exe', 'bar', { mode: '0755' });\n\n// download and save `foo.zip` into `bar/foobar.zip`\ndownload({ url: 'foo.zip', name: 'foobar.zip' }, 'bar');\n\n// download and save an array of files in `bar/`\nvar files = ['foo.jpg', 'bar.jpg', 'cat.jpg'];\ndownload(files, 'bar');\n\n// download, save and rename an array of files in `bar/`\nvar files = [{\n url: 'foo.jpg',\n name: 'foobar.jpg'\n}, {\n url: 'cat.jpg',\n name: 'dog.jpg'\n}];\ndownload(files, 'bar');\n```\n\n## API\n\n### download(url, dest, opts)\n\nDownload a file or an array of files to a given destination. Returns an EventEmitter \nthat emits the following possible events:\n\n* `response` — Relayed when the underlying `http.ClientRequest` emits the same \nevent. Listeners called with a `http.IncomingMessage` instance.\n* `data` — Relayed when the underlying `http.IncomingMessage` emits the same \nevent. Listeners called with a `Buffer` instance.\n* `error` — Relayed when the underlying `http.ClientRequest` emits the same event \nor when the response status code is not in the 200s. Listeners called with an \n`Error` instance (in the first case) or the response status code.\n* `close` — Relayed when the underlying `stream.Duplex` emits the same event.\n\n## Options\n\nYou can define options accepted by the [request](https://github.com/mikeal/request/) module besides from the options below.\n\n### extract\n\nType: `Boolean` \nDefault: `false`\n\nIf set to `true`, try extracting the file using [decompress](https://github.com/kevva/decompress/).\n\n### mode\n\nType: `String` \nDefault: `undefined`\n\nSet mode on the downloaded files.\n\n### strip\n\nType: `Number` \nDefault: `0`\n\nEquivalent to `--strip-components` for tar.\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com)\n", - "readmeFilename": "README.md", - "_id": "download@0.1.10", - "dist": { - "shasum": "dc5d3ab4a7fc78e374e2de0381273b7b999bc29d" - }, - "_from": "download@~0.1.2", - "_resolved": "https://registry.npmjs.org/download/-/download-0.1.10.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/.npmignore deleted file mode 100644 index 2ccbe465..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/.npmignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules/ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/.travis.yml deleted file mode 100644 index c1ffcb31..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - 0.8 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/History.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/History.md deleted file mode 100644 index d1fa5334..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/History.md +++ /dev/null @@ -1,20 +0,0 @@ - -0.0.2 / 2013-05-29 -================== - - * Updated github url - * Fix bug calling isbin with list of paths - * Add tests for sync version - * Added travis CI passing image to readme - * Added node engines and keywords - * Added travis CI config - * Added basic readme - * Added basic test suite and Makefile - * Add async version - * Some refactorings using 'some' function - * Fixed issue with wrong paths if called multiple times - -0.0.1 / 2012-12-06 -================== - - * Initial release diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/Makefile deleted file mode 100644 index 1a2444a1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -REPORTER ?= dot - -test: - @NODE_ENV=test ./node_modules/mocha/bin/mocha -R $(REPORTER) - -.PHONY: test diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/README.md deleted file mode 100644 index 5224d614..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/README.md +++ /dev/null @@ -1,59 +0,0 @@ -[![Build Status](https://secure.travis-ci.org/mbehrendt/isbin.png?branch=master)](https://travis-ci.org/mbehrendt/isbin) - -# Isbin - -Tiny little helper library to determine if a certain binary is available within $PATH or any additional folder. - -# Installation - -```bash -$ npm install isbin -``` - -# Usage - -```js -var isbin = require('isbin'); - -// Test against $PATH -isbin('mysql', function(exists) { - console.log(exists); // ==> Boolean -}); - -// With additional path to test -isbin('mysql', '/usr/local/bin', function(exists) { - console.log(exists); // ==> Boolean -}); - -// Or multiple ones -isbin('mysql', ['/usr/local/bin', '/home/me/bins'], function(exists) { - console.log(exists); // ==> Boolean -}); -``` - -There are also synchronous versions available - -```js -var exists = isbin('mysql'); -var exists = isbin('mysql', '/usr/local/bin'); -var exists = isbin('mysql', ['/usr/local/bin', '/home/me/bins']); -``` - -# Running the tests - -```bash -$ npm install -$ make test -``` - -# License - -(The MIT License) - -Copyright (c) 2012 Mario Behrendt info@mario-behrendt.de, Stephan Hoyer <ste.hoyer@gmail.com> - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/index.js deleted file mode 100644 index bb0a047c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/lib/index.js deleted file mode 100644 index 1b8a5cac..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/lib/index.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Require dependencies - */ - -var fs = require('fs') - , async = require('async'); - -/** - * Check if given binary exists - * - * @param {String} bin Binary to test - * @param {String|Array} additional Additional paths to check - * @param {Function(result)} isbinChecked Callback when check is done async, optional - * @return {Boolean} True if binary was found - */ - -function isbin(bin, additional, isbinChecked) { - // isbin(bin, cb) - if (!isbinChecked) isbinChecked = additional; - - // Read $PATH to get set up bin folders - var paths = process.env.PATH.split(':') || []; - - // isbin(bin, 'path', cb) - if ('string' === typeof additional) { - paths.push(additional); - } - - // isbin(bin, ['path1', 'path2'], cb) - if ('object' === typeof additional && additional.length !== null) { - paths.concat(additional); - } - - // async check - if ('function' === typeof isbinChecked) { - return async.some(paths, function(path, pathChecked) { - fs.exists(path + '/' + bin, pathChecked); - }, isbinChecked); - } - - // sync check - return paths.reverse().some(function(path) { - return fs.existsSync(path + '/' + bin); - }); -}; - -/** - * Expose module - */ - -module.exports = isbin; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.gitmodules b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.gitmodules deleted file mode 100644 index a9aae984..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.gitmodules +++ /dev/null @@ -1,9 +0,0 @@ -[submodule "deps/nodeunit"] - path = deps/nodeunit - url = git://github.com/caolan/nodeunit.git -[submodule "deps/UglifyJS"] - path = deps/UglifyJS - url = https://github.com/mishoo/UglifyJS.git -[submodule "deps/nodelint"] - path = deps/nodelint - url = https://github.com/tav/nodelint.git diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.npmignore deleted file mode 100644 index 9bdfc97c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -deps -dist -test -nodelint.cfg \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/LICENSE deleted file mode 100644 index b7f9d500..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Caolan McMahon - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/Makefile deleted file mode 100644 index bad647c6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -PACKAGE = asyncjs -NODEJS = $(if $(shell test -f /usr/bin/nodejs && echo "true"),nodejs,node) -CWD := $(shell pwd) -NODEUNIT = $(CWD)/node_modules/nodeunit/bin/nodeunit -UGLIFY = $(CWD)/node_modules/uglify-js/bin/uglifyjs -NODELINT = $(CWD)/node_modules/nodelint/nodelint - -BUILDDIR = dist - -all: clean test build - -build: $(wildcard lib/*.js) - mkdir -p $(BUILDDIR) - $(UGLIFY) lib/async.js > $(BUILDDIR)/async.min.js - -test: - $(NODEUNIT) test - -clean: - rm -rf $(BUILDDIR) - -lint: - $(NODELINT) --config nodelint.cfg lib/async.js - -.PHONY: test build all diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/README.md deleted file mode 100644 index 1bbbc477..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/README.md +++ /dev/null @@ -1,1021 +0,0 @@ -# Async.js - -Async is a utility module which provides straight-forward, powerful functions -for working with asynchronous JavaScript. Although originally designed for -use with [node.js](http://nodejs.org), it can also be used directly in the -browser. - -Async provides around 20 functions that include the usual 'functional' -suspects (map, reduce, filter, forEach…) as well as some common patterns -for asynchronous control flow (parallel, series, waterfall…). All these -functions assume you follow the node.js convention of providing a single -callback as the last argument of your async function. - - -## Quick Examples - - async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file - }); - - async.filter(['file1','file2','file3'], path.exists, function(results){ - // results now equals an array of the existing files - }); - - async.parallel([ - function(){ ... }, - function(){ ... } - ], callback); - - async.series([ - function(){ ... }, - function(){ ... } - ]); - -There are many more functions available so take a look at the docs below for a -full list. This module aims to be comprehensive, so if you feel anything is -missing please create a GitHub issue for it. - - -## Download - -Releases are available for download from -[GitHub](http://github.com/caolan/async/downloads). -Alternatively, you can install using Node Package Manager (npm): - - npm install async - - -__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 17.5kb Uncompressed - -__Production:__ [async.min.js](https://github.com/caolan/async/raw/master/dist/async.min.js) - 1.7kb Packed and Gzipped - - -## In the Browser - -So far its been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage: - - <script type="text/javascript" src="async.js"></script> - <script type="text/javascript"> - - async.map(data, asyncProcess, function(err, results){ - alert(results); - }); - - </script> - - -## Documentation - -### Collections - -* [forEach](#forEach) -* [map](#map) -* [filter](#filter) -* [reject](#reject) -* [reduce](#reduce) -* [detect](#detect) -* [sortBy](#sortBy) -* [some](#some) -* [every](#every) -* [concat](#concat) - -### Control Flow - -* [series](#series) -* [parallel](#parallel) -* [whilst](#whilst) -* [until](#until) -* [waterfall](#waterfall) -* [queue](#queue) -* [auto](#auto) -* [iterator](#iterator) -* [apply](#apply) -* [nextTick](#nextTick) - -### Utils - -* [memoize](#memoize) -* [unmemoize](#unmemoize) -* [log](#log) -* [dir](#dir) -* [noConflict](#noConflict) - - -## Collections - -<a name="forEach" /> -### forEach(arr, iterator, callback) - -Applies an iterator function to each item in an array, in parallel. -The iterator is called with an item from the list and a callback for when it -has finished. If the iterator passes an error to this callback, the main -callback for the forEach function is immediately called with the error. - -Note, that since this function applies the iterator to each item in parallel -there is no guarantee that the iterator functions will complete in order. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(err) - A callback which is called after all the iterator functions - have finished, or an error has occurred. - -__Example__ - - // assuming openFiles is an array of file names and saveFile is a function - // to save the modified contents of that file: - - async.forEach(openFiles, saveFile, function(err){ - // if any of the saves produced an error, err would equal that error - }); - ---------------------------------------- - -<a name="forEachSeries" /> -### forEachSeries(arr, iterator, callback) - -The same as forEach only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. This means the iterator functions will complete in order. - - ---------------------------------------- - -<a name="forEachLimit" /> -### forEachLimit(arr, limit, iterator, callback) - -The same as forEach only the iterator is applied to batches of items in the -array, in series. The next batch of iterators is only called once the current -one has completed processing. - -__Arguments__ - -* arr - An array to iterate over. -* limit - How many items should be in each batch. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(err) - A callback which is called after all the iterator functions - have finished, or an error has occurred. - -__Example__ - - // Assume documents is an array of JSON objects and requestApi is a - // function that interacts with a rate-limited REST api. - - async.forEachLimit(documents, 20, requestApi, function(err){ - // if any of the saves produced an error, err would equal that error - }); ---------------------------------------- - -<a name="map" /> -### map(arr, iterator, callback) - -Produces a new array of values by mapping each value in the given array through -the iterator function. The iterator is called with an item from the array and a -callback for when it has finished processing. The callback takes 2 arguments, -an error and the transformed item from the array. If the iterator passes an -error to this callback, the main callback for the map function is immediately -called with the error. - -Note, that since this function applies the iterator to each item in parallel -there is no guarantee that the iterator functions will complete in order, however -the results array will be in the same order as the original array. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed - with an error (which can be null) and a transformed item. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is an array of the - transformed items from the original array. - -__Example__ - - async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file - }); - ---------------------------------------- - -<a name="mapSeries" /> -### mapSeries(arr, iterator, callback) - -The same as map only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. The results array will be in the same order as the original. - - ---------------------------------------- - -<a name="filter" /> -### filter(arr, iterator, callback) - -__Alias:__ select - -Returns a new array of all the values which pass an async truth test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like path.exists. This operation is -performed in parallel, but the results array will be in the same order as the -original. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(results) - A callback which is called after all the iterator - functions have finished. - -__Example__ - - async.filter(['file1','file2','file3'], path.exists, function(results){ - // results now equals an array of the existing files - }); - ---------------------------------------- - -<a name="filterSeries" /> -### filterSeries(arr, iterator, callback) - -__alias:__ selectSeries - -The same as filter only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. The results array will be in the same order as the original. - ---------------------------------------- - -<a name="reject" /> -### reject(arr, iterator, callback) - -The opposite of filter. Removes values that pass an async truth test. - ---------------------------------------- - -<a name="rejectSeries" /> -### rejectSeries(arr, iterator, callback) - -The same as filter, only the iterator is applied to each item in the array -in series. - - ---------------------------------------- - -<a name="reduce" /> -### reduce(arr, memo, iterator, callback) - -__aliases:__ inject, foldl - -Reduces a list of values into a single value using an async iterator to return -each successive step. Memo is the initial state of the reduction. This -function only operates in series. For performance reasons, it may make sense to -split a call to this function into a parallel map, then use the normal -Array.prototype.reduce on the results. This function is for situations where -each step in the reduction needs to be async, if you can get the data before -reducing it then its probably a good idea to do so. - -__Arguments__ - -* arr - An array to iterate over. -* memo - The initial state of the reduction. -* iterator(memo, item, callback) - A function applied to each item in the - array to produce the next step in the reduction. The iterator is passed a - callback which accepts an optional error as its first argument, and the state - of the reduction as the second. If an error is passed to the callback, the - reduction is stopped and the main callback is immediately called with the - error. -* callback(err, result) - A callback which is called after all the iterator - functions have finished. Result is the reduced value. - -__Example__ - - async.reduce([1,2,3], 0, function(memo, item, callback){ - // pointless async: - process.nextTick(function(){ - callback(null, memo + item) - }); - }, function(err, result){ - // result is now equal to the last value of memo, which is 6 - }); - ---------------------------------------- - -<a name="reduceRight" /> -### reduceRight(arr, memo, iterator, callback) - -__Alias:__ foldr - -Same as reduce, only operates on the items in the array in reverse order. - - ---------------------------------------- - -<a name="detect" /> -### detect(arr, iterator, callback) - -Returns the first value in a list that passes an async truth test. The -iterator is applied in parallel, meaning the first iterator to return true will -fire the detect callback with that result. That means the result might not be -the first item in the original array (in terms of order) that passes the test. - -If order within the original array is important then look at detectSeries. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(result) - A callback which is called as soon as any iterator returns - true, or after all the iterator functions have finished. Result will be - the first item in the array that passes the truth test (iterator) or the - value undefined if none passed. - -__Example__ - - async.detect(['file1','file2','file3'], path.exists, function(result){ - // result now equals the first file in the list that exists - }); - ---------------------------------------- - -<a name="detectSeries" /> -### detectSeries(arr, iterator, callback) - -The same as detect, only the iterator is applied to each item in the array -in series. This means the result is always the first in the original array (in -terms of array order) that passes the truth test. - - ---------------------------------------- - -<a name="sortBy" /> -### sortBy(arr, iterator, callback) - -Sorts a list by the results of running each value through an async iterator. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed - with an error (which can be null) and a value to use as the sort criteria. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is the items from - the original array sorted by the values returned by the iterator calls. - -__Example__ - - async.sortBy(['file1','file2','file3'], function(file, callback){ - fs.stat(file, function(err, stats){ - callback(err, stats.mtime); - }); - }, function(err, results){ - // results is now the original array of files sorted by - // modified date - }); - - ---------------------------------------- - -<a name="some" /> -### some(arr, iterator, callback) - -__Alias:__ any - -Returns true if at least one element in the array satisfies an async test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like path.exists. Once any iterator -call returns true, the main callback is immediately called. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(result) - A callback which is called as soon as any iterator returns - true, or after all the iterator functions have finished. Result will be - either true or false depending on the values of the async tests. - -__Example__ - - async.some(['file1','file2','file3'], path.exists, function(result){ - // if result is true then at least one of the files exists - }); - ---------------------------------------- - -<a name="every" /> -### every(arr, iterator, callback) - -__Alias:__ all - -Returns true if every element in the array satisfies an async test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like path.exists. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(result) - A callback which is called after all the iterator - functions have finished. Result will be either true or false depending on - the values of the async tests. - -__Example__ - - async.every(['file1','file2','file3'], path.exists, function(result){ - // if result is true then every file exists - }); - ---------------------------------------- - -<a name="concat" /> -### concat(arr, iterator, callback) - -Applies an iterator to each item in a list, concatenating the results. Returns the -concatenated list. The iterators are called in parallel, and the results are -concatenated as they return. There is no guarantee that the results array will -be returned in the original order of the arguments passed to the iterator function. - -__Arguments__ - -* arr - An array to iterate over -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed - with an error (which can be null) and an array of results. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is an array containing - the concatenated results of the iterator function. - -__Example__ - - async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ - // files is now a list of filenames that exist in the 3 directories - }); - ---------------------------------------- - -<a name="concatSeries" /> -### concatSeries(arr, iterator, callback) - -Same as async.concat, but executes in series instead of parallel. - - -## Control Flow - -<a name="series" /> -### series(tasks, [callback]) - -Run an array of functions in series, each one running once the previous -function has completed. If any functions in the series pass an error to its -callback, no more functions are run and the callback for the series is -immediately called with the value of the error. Once the tasks have completed, -the results are passed to the final callback as an array. - -It is also possible to use an object instead of an array. Each property will be -run as a function and the results will be passed to the final callback as an object -instead of an array. This can be a more readable way of handling results from -async.series. - - -__Arguments__ - -* tasks - An array or object containing functions to run, each function is passed - a callback it must call on completion. -* callback(err, results) - An optional callback to run once all the functions - have completed. This function gets an array of all the arguments passed to - the callbacks used in the array. - -__Example__ - - async.series([ - function(callback){ - // do some stuff ... - callback(null, 'one'); - }, - function(callback){ - // do some more stuff ... - callback(null, 'two'); - }, - ], - // optional callback - function(err, results){ - // results is now equal to ['one', 'two'] - }); - - - // an example using an object instead of an array - async.series({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - }, - }, - function(err, results) { - // results is now equal to: {one: 1, two: 2} - }); - - ---------------------------------------- - -<a name="parallel" /> -### parallel(tasks, [callback]) - -Run an array of functions in parallel, without waiting until the previous -function has completed. If any of the functions pass an error to its -callback, the main callback is immediately called with the value of the error. -Once the tasks have completed, the results are passed to the final callback as an -array. - -It is also possible to use an object instead of an array. Each property will be -run as a function and the results will be passed to the final callback as an object -instead of an array. This can be a more readable way of handling results from -async.parallel. - - -__Arguments__ - -* tasks - An array or object containing functions to run, each function is passed a - callback it must call on completion. -* callback(err, results) - An optional callback to run once all the functions - have completed. This function gets an array of all the arguments passed to - the callbacks used in the array. - -__Example__ - - async.parallel([ - function(callback){ - setTimeout(function(){ - callback(null, 'one'); - }, 200); - }, - function(callback){ - setTimeout(function(){ - callback(null, 'two'); - }, 100); - }, - ], - // optional callback - function(err, results){ - // the results array will equal ['one','two'] even though - // the second function had a shorter timeout. - }); - - - // an example using an object instead of an array - async.parallel({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - }, - }, - function(err, results) { - // results is now equals to: {one: 1, two: 2} - }); - - ---------------------------------------- - -<a name="whilst" /> -### whilst(test, fn, callback) - -Repeatedly call fn, while test returns true. Calls the callback when stopped, -or an error occurs. - -__Arguments__ - -* test() - synchronous truth test to perform before each execution of fn. -* fn(callback) - A function to call each time the test passes. The function is - passed a callback which must be called once it has completed with an optional - error as the first argument. -* callback(err) - A callback which is called after the test fails and repeated - execution of fn has stopped. - -__Example__ - - var count = 0; - - async.whilst( - function () { return count < 5; }, - function (callback) { - count++; - setTimeout(callback, 1000); - }, - function (err) { - // 5 seconds have passed - } - ); - - ---------------------------------------- - -<a name="until" /> -### until(test, fn, callback) - -Repeatedly call fn, until test returns true. Calls the callback when stopped, -or an error occurs. - -The inverse of async.whilst. - - ---------------------------------------- - -<a name="waterfall" /> -### waterfall(tasks, [callback]) - -Runs an array of functions in series, each passing their results to the next in -the array. However, if any of the functions pass an error to the callback, the -next function is not executed and the main callback is immediately called with -the error. - -__Arguments__ - -* tasks - An array of functions to run, each function is passed a callback it - must call on completion. -* callback(err, [results]) - An optional callback to run once all the functions - have completed. This will be passed the results of the last task's callback. - - - -__Example__ - - async.waterfall([ - function(callback){ - callback(null, 'one', 'two'); - }, - function(arg1, arg2, callback){ - callback(null, 'three'); - }, - function(arg1, callback){ - // arg1 now equals 'three' - callback(null, 'done'); - } - ], function (err, result) { - // result now equals 'done' - }); - - ---------------------------------------- - -<a name="queue" /> -### queue(worker, concurrency) - -Creates a queue object with the specified concurrency. Tasks added to the -queue will be processed in parallel (up to the concurrency limit). If all -workers are in progress, the task is queued until one is available. Once -a worker has completed a task, the task's callback is called. - -__Arguments__ - -* worker(task, callback) - An asynchronous function for processing a queued - task. -* concurrency - An integer for determining how many worker functions should be - run in parallel. - -__Queue objects__ - -The queue object returned by this function has the following properties and -methods: - -* length() - a function returning the number of items waiting to be processed. -* concurrency - an integer for determining how many worker functions should be - run in parallel. This property can be changed after a queue is created to - alter the concurrency on-the-fly. -* push(task, [callback]) - add a new task to the queue, the callback is called - once the worker has finished processing the task. - instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list. -* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued -* empty - a callback that is called when the last item from the queue is given to a worker -* drain - a callback that is called when the last item from the queue has returned from the worker - -__Example__ - - // create a queue object with concurrency 2 - - var q = async.queue(function (task, callback) { - console.log('hello ' + task.name); - callback(); - }, 2); - - - // assign a callback - q.drain = function() { - console.log('all items have been processed'); - } - - // add some items to the queue - - q.push({name: 'foo'}, function (err) { - console.log('finished processing foo'); - }); - q.push({name: 'bar'}, function (err) { - console.log('finished processing bar'); - }); - - // add some items to the queue (batch-wise) - - q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) { - console.log('finished processing bar'); - }); - - ---------------------------------------- - -<a name="auto" /> -### auto(tasks, [callback]) - -Determines the best order for running functions based on their requirements. -Each function can optionally depend on other functions being completed first, -and each function is run as soon as its requirements are satisfied. If any of -the functions pass an error to their callback, that function will not complete -(so any other functions depending on it will not run) and the main callback -will be called immediately with the error. Functions also receive an object -containing the results of functions which have completed so far. - -__Arguments__ - -* tasks - An object literal containing named functions or an array of - requirements, with the function itself the last item in the array. The key - used for each function or array is used when specifying requirements. The - syntax is easier to understand by looking at the example. -* callback(err, results) - An optional callback which is called when all the - tasks have been completed. The callback will receive an error as an argument - if any tasks pass an error to their callback. If all tasks complete - successfully, it will receive an object containing their results. - -__Example__ - - async.auto({ - get_data: function(callback){ - // async code to get some data - }, - make_folder: function(callback){ - // async code to create a directory to store a file in - // this is run at the same time as getting the data - }, - write_file: ['get_data', 'make_folder', function(callback){ - // once there is some data and the directory exists, - // write the data to a file in the directory - callback(null, filename); - }], - email_link: ['write_file', function(callback, results){ - // once the file is written let's email a link to it... - // results.write_file contains the filename returned by write_file. - }] - }); - -This is a fairly trivial example, but to do this using the basic parallel and -series functions would look like this: - - async.parallel([ - function(callback){ - // async code to get some data - }, - function(callback){ - // async code to create a directory to store a file in - // this is run at the same time as getting the data - } - ], - function(results){ - async.series([ - function(callback){ - // once there is some data and the directory exists, - // write the data to a file in the directory - }, - email_link: function(callback){ - // once the file is written let's email a link to it... - } - ]); - }); - -For a complicated series of async tasks using the auto function makes adding -new tasks much easier and makes the code more readable. - - ---------------------------------------- - -<a name="iterator" /> -### iterator(tasks) - -Creates an iterator function which calls the next function in the array, -returning a continuation to call the next one after that. Its also possible to -'peek' the next iterator by doing iterator.next(). - -This function is used internally by the async module but can be useful when -you want to manually control the flow of functions in series. - -__Arguments__ - -* tasks - An array of functions to run, each function is passed a callback it - must call on completion. - -__Example__ - - var iterator = async.iterator([ - function(){ sys.p('one'); }, - function(){ sys.p('two'); }, - function(){ sys.p('three'); } - ]); - - node> var iterator2 = iterator(); - 'one' - node> var iterator3 = iterator2(); - 'two' - node> iterator3(); - 'three' - node> var nextfn = iterator2.next(); - node> nextfn(); - 'three' - - ---------------------------------------- - -<a name="apply" /> -### apply(function, arguments..) - -Creates a continuation function with some arguments already applied, a useful -shorthand when combined with other control flow functions. Any arguments -passed to the returned function are added to the arguments originally passed -to apply. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to automatically apply when the - continuation is called. - -__Example__ - - // using apply - - async.parallel([ - async.apply(fs.writeFile, 'testfile1', 'test1'), - async.apply(fs.writeFile, 'testfile2', 'test2'), - ]); - - - // the same process without using apply - - async.parallel([ - function(callback){ - fs.writeFile('testfile1', 'test1', callback); - }, - function(callback){ - fs.writeFile('testfile2', 'test2', callback); - }, - ]); - -It's possible to pass any number of additional arguments when calling the -continuation: - - node> var fn = async.apply(sys.puts, 'one'); - node> fn('two', 'three'); - one - two - three - ---------------------------------------- - -<a name="nextTick" /> -### nextTick(callback) - -Calls the callback on a later loop around the event loop. In node.js this just -calls process.nextTick, in the browser it falls back to setTimeout(callback, 0), -which means other higher priority events may precede the execution of the callback. - -This is used internally for browser-compatibility purposes. - -__Arguments__ - -* callback - The function to call on a later loop around the event loop. - -__Example__ - - var call_order = []; - async.nextTick(function(){ - call_order.push('two'); - // call_order now equals ['one','two] - }); - call_order.push('one') - - -## Utils - -<a name="memoize" /> -### memoize(fn, [hasher]) - -Caches the results of an async function. When creating a hash to store function -results against, the callback is omitted from the hash and an optional hash -function can be used. - -__Arguments__ - -* fn - the function you to proxy and cache results from. -* hasher - an optional function for generating a custom hash for storing - results, it has all the arguments applied to it apart from the callback, and - must be synchronous. - -__Example__ - - var slow_fn = function (name, callback) { - // do something - callback(null, result); - }; - var fn = async.memoize(slow_fn); - - // fn can now be used as if it were slow_fn - fn('some name', function () { - // callback - }); - -<a name="unmemoize" /> -### unmemoize(fn) - -Undoes a memoized function, reverting it to the original, unmemoized -form. Comes handy in tests. - -__Arguments__ - -* fn - the memoized function - -<a name="log" /> -### log(function, arguments) - -Logs the result of an async function to the console. Only works in node.js or -in browsers that support console.log and console.error (such as FF and Chrome). -If multiple arguments are returned from the async function, console.log is -called on each argument in order. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to apply to the function. - -__Example__ - - var hello = function(name, callback){ - setTimeout(function(){ - callback(null, 'hello ' + name); - }, 1000); - }; - - node> async.log(hello, 'world'); - 'hello world' - - ---------------------------------------- - -<a name="dir" /> -### dir(function, arguments) - -Logs the result of an async function to the console using console.dir to -display the properties of the resulting object. Only works in node.js or -in browsers that support console.dir and console.error (such as FF and Chrome). -If multiple arguments are returned from the async function, console.dir is -called on each argument in order. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to apply to the function. - -__Example__ - - var hello = function(name, callback){ - setTimeout(function(){ - callback(null, {hello: name}); - }, 1000); - }; - - node> async.dir(hello, 'world'); - {hello: 'world'} - - ---------------------------------------- - -<a name="noConflict" /> -### noConflict() - -Changes the value of async back to its original value, returning a reference to the -async object. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/index.js deleted file mode 100644 index 8e238453..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/index.js +++ /dev/null @@ -1,3 +0,0 @@ -// This file is just added for convenience so this repository can be -// directly checked out into a project's deps folder -module.exports = require('./lib/async'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/lib/async.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/lib/async.js deleted file mode 100644 index 7cc4f5ea..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/lib/async.js +++ /dev/null @@ -1,692 +0,0 @@ -/*global setTimeout: false, console: false */ -(function () { - - var async = {}; - - // global on the server, window in the browser - var root = this, - previous_async = root.async; - - if (typeof module !== 'undefined' && module.exports) { - module.exports = async; - } - else { - root.async = async; - } - - async.noConflict = function () { - root.async = previous_async; - return async; - }; - - //// cross-browser compatiblity functions //// - - var _forEach = function (arr, iterator) { - if (arr.forEach) { - return arr.forEach(iterator); - } - for (var i = 0; i < arr.length; i += 1) { - iterator(arr[i], i, arr); - } - }; - - var _map = function (arr, iterator) { - if (arr.map) { - return arr.map(iterator); - } - var results = []; - _forEach(arr, function (x, i, a) { - results.push(iterator(x, i, a)); - }); - return results; - }; - - var _reduce = function (arr, iterator, memo) { - if (arr.reduce) { - return arr.reduce(iterator, memo); - } - _forEach(arr, function (x, i, a) { - memo = iterator(memo, x, i, a); - }); - return memo; - }; - - var _keys = function (obj) { - if (Object.keys) { - return Object.keys(obj); - } - var keys = []; - for (var k in obj) { - if (obj.hasOwnProperty(k)) { - keys.push(k); - } - } - return keys; - }; - - //// exported async module functions //// - - //// nextTick implementation with browser-compatible fallback //// - if (typeof process === 'undefined' || !(process.nextTick)) { - async.nextTick = function (fn) { - setTimeout(fn, 0); - }; - } - else { - async.nextTick = process.nextTick; - } - - async.forEach = function (arr, iterator, callback) { - callback = callback || function () {}; - if (!arr.length) { - return callback(); - } - var completed = 0; - _forEach(arr, function (x) { - iterator(x, function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - if (completed === arr.length) { - callback(null); - } - } - }); - }); - }; - - async.forEachSeries = function (arr, iterator, callback) { - callback = callback || function () {}; - if (!arr.length) { - return callback(); - } - var completed = 0; - var iterate = function () { - iterator(arr[completed], function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - if (completed === arr.length) { - callback(null); - } - else { - iterate(); - } - } - }); - }; - iterate(); - }; - - async.forEachLimit = function (arr, limit, iterator, callback) { - callback = callback || function () {}; - if (!arr.length || limit <= 0) { - return callback(); - } - var completed = 0; - var started = 0; - var running = 0; - - (function replenish () { - if (completed === arr.length) { - return callback(); - } - - while (running < limit && started < arr.length) { - started += 1; - running += 1; - iterator(arr[started - 1], function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - running -= 1; - if (completed === arr.length) { - callback(); - } - else { - replenish(); - } - } - }); - } - })(); - }; - - - var doParallel = function (fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [async.forEach].concat(args)); - }; - }; - var doSeries = function (fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [async.forEachSeries].concat(args)); - }; - }; - - - var _asyncMap = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (err, v) { - results[x.index] = v; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - }; - async.map = doParallel(_asyncMap); - async.mapSeries = doSeries(_asyncMap); - - - // reduce only has a series version, as doing reduce in parallel won't - // work in many situations. - async.reduce = function (arr, memo, iterator, callback) { - async.forEachSeries(arr, function (x, callback) { - iterator(memo, x, function (err, v) { - memo = v; - callback(err); - }); - }, function (err) { - callback(err, memo); - }); - }; - // inject alias - async.inject = async.reduce; - // foldl alias - async.foldl = async.reduce; - - async.reduceRight = function (arr, memo, iterator, callback) { - var reversed = _map(arr, function (x) { - return x; - }).reverse(); - async.reduce(reversed, memo, iterator, callback); - }; - // foldr alias - async.foldr = async.reduceRight; - - var _filter = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (v) { - if (v) { - results.push(x); - } - callback(); - }); - }, function (err) { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - }; - async.filter = doParallel(_filter); - async.filterSeries = doSeries(_filter); - // select alias - async.select = async.filter; - async.selectSeries = async.filterSeries; - - var _reject = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (v) { - if (!v) { - results.push(x); - } - callback(); - }); - }, function (err) { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - }; - async.reject = doParallel(_reject); - async.rejectSeries = doSeries(_reject); - - var _detect = function (eachfn, arr, iterator, main_callback) { - eachfn(arr, function (x, callback) { - iterator(x, function (result) { - if (result) { - main_callback(x); - main_callback = function () {}; - } - else { - callback(); - } - }); - }, function (err) { - main_callback(); - }); - }; - async.detect = doParallel(_detect); - async.detectSeries = doSeries(_detect); - - async.some = function (arr, iterator, main_callback) { - async.forEach(arr, function (x, callback) { - iterator(x, function (v) { - if (v) { - main_callback(true); - main_callback = function () {}; - } - callback(); - }); - }, function (err) { - main_callback(false); - }); - }; - // any alias - async.any = async.some; - - async.every = function (arr, iterator, main_callback) { - async.forEach(arr, function (x, callback) { - iterator(x, function (v) { - if (!v) { - main_callback(false); - main_callback = function () {}; - } - callback(); - }); - }, function (err) { - main_callback(true); - }); - }; - // all alias - async.all = async.every; - - async.sortBy = function (arr, iterator, callback) { - async.map(arr, function (x, callback) { - iterator(x, function (err, criteria) { - if (err) { - callback(err); - } - else { - callback(null, {value: x, criteria: criteria}); - } - }); - }, function (err, results) { - if (err) { - return callback(err); - } - else { - var fn = function (left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }; - callback(null, _map(results.sort(fn), function (x) { - return x.value; - })); - } - }); - }; - - async.auto = function (tasks, callback) { - callback = callback || function () {}; - var keys = _keys(tasks); - if (!keys.length) { - return callback(null); - } - - var results = {}; - - var listeners = []; - var addListener = function (fn) { - listeners.unshift(fn); - }; - var removeListener = function (fn) { - for (var i = 0; i < listeners.length; i += 1) { - if (listeners[i] === fn) { - listeners.splice(i, 1); - return; - } - } - }; - var taskComplete = function () { - _forEach(listeners.slice(0), function (fn) { - fn(); - }); - }; - - addListener(function () { - if (_keys(results).length === keys.length) { - callback(null, results); - callback = function () {}; - } - }); - - _forEach(keys, function (k) { - var task = (tasks[k] instanceof Function) ? [tasks[k]]: tasks[k]; - var taskCallback = function (err) { - if (err) { - callback(err); - // stop subsequent errors hitting callback multiple times - callback = function () {}; - } - else { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - taskComplete(); - } - }; - var requires = task.slice(0, Math.abs(task.length - 1)) || []; - var ready = function () { - return _reduce(requires, function (a, x) { - return (a && results.hasOwnProperty(x)); - }, true) && !results.hasOwnProperty(k); - }; - if (ready()) { - task[task.length - 1](taskCallback, results); - } - else { - var listener = function () { - if (ready()) { - removeListener(listener); - task[task.length - 1](taskCallback, results); - } - }; - addListener(listener); - } - }); - }; - - async.waterfall = function (tasks, callback) { - callback = callback || function () {}; - if (!tasks.length) { - return callback(); - } - var wrapIterator = function (iterator) { - return function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - var args = Array.prototype.slice.call(arguments, 1); - var next = iterator.next(); - if (next) { - args.push(wrapIterator(next)); - } - else { - args.push(callback); - } - async.nextTick(function () { - iterator.apply(null, args); - }); - } - }; - }; - wrapIterator(async.iterator(tasks))(); - }; - - async.parallel = function (tasks, callback) { - callback = callback || function () {}; - if (tasks.constructor === Array) { - async.map(tasks, function (fn, callback) { - if (fn) { - fn(function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - callback.call(null, err, args); - }); - } - }, callback); - } - else { - var results = {}; - async.forEach(_keys(tasks), function (k, callback) { - tasks[k](function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - - async.series = function (tasks, callback) { - callback = callback || function () {}; - if (tasks.constructor === Array) { - async.mapSeries(tasks, function (fn, callback) { - if (fn) { - fn(function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - callback.call(null, err, args); - }); - } - }, callback); - } - else { - var results = {}; - async.forEachSeries(_keys(tasks), function (k, callback) { - tasks[k](function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - - async.iterator = function (tasks) { - var makeCallback = function (index) { - var fn = function () { - if (tasks.length) { - tasks[index].apply(null, arguments); - } - return fn.next(); - }; - fn.next = function () { - return (index < tasks.length - 1) ? makeCallback(index + 1): null; - }; - return fn; - }; - return makeCallback(0); - }; - - async.apply = function (fn) { - var args = Array.prototype.slice.call(arguments, 1); - return function () { - return fn.apply( - null, args.concat(Array.prototype.slice.call(arguments)) - ); - }; - }; - - var _concat = function (eachfn, arr, fn, callback) { - var r = []; - eachfn(arr, function (x, cb) { - fn(x, function (err, y) { - r = r.concat(y || []); - cb(err); - }); - }, function (err) { - callback(err, r); - }); - }; - async.concat = doParallel(_concat); - async.concatSeries = doSeries(_concat); - - async.whilst = function (test, iterator, callback) { - if (test()) { - iterator(function (err) { - if (err) { - return callback(err); - } - async.whilst(test, iterator, callback); - }); - } - else { - callback(); - } - }; - - async.until = function (test, iterator, callback) { - if (!test()) { - iterator(function (err) { - if (err) { - return callback(err); - } - async.until(test, iterator, callback); - }); - } - else { - callback(); - } - }; - - async.queue = function (worker, concurrency) { - var workers = 0; - var q = { - tasks: [], - concurrency: concurrency, - saturated: null, - empty: null, - drain: null, - push: function (data, callback) { - if(data.constructor !== Array) { - data = [data]; - } - _forEach(data, function(task) { - q.tasks.push({ - data: task, - callback: typeof callback === 'function' ? callback : null - }); - if (q.saturated && q.tasks.length == concurrency) { - q.saturated(); - } - async.nextTick(q.process); - }); - }, - process: function () { - if (workers < q.concurrency && q.tasks.length) { - var task = q.tasks.shift(); - if(q.empty && q.tasks.length == 0) q.empty(); - workers += 1; - worker(task.data, function () { - workers -= 1; - if (task.callback) { - task.callback.apply(task, arguments); - } - if(q.drain && q.tasks.length + workers == 0) q.drain(); - q.process(); - }); - } - }, - length: function () { - return q.tasks.length; - }, - running: function () { - return workers; - } - }; - return q; - }; - - var _console_fn = function (name) { - return function (fn) { - var args = Array.prototype.slice.call(arguments, 1); - fn.apply(null, args.concat([function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (typeof console !== 'undefined') { - if (err) { - if (console.error) { - console.error(err); - } - } - else if (console[name]) { - _forEach(args, function (x) { - console[name](x); - }); - } - } - }])); - }; - }; - async.log = _console_fn('log'); - async.dir = _console_fn('dir'); - /*async.info = _console_fn('info'); - async.warn = _console_fn('warn'); - async.error = _console_fn('error');*/ - - async.memoize = function (fn, hasher) { - var memo = {}; - var queues = {}; - hasher = hasher || function (x) { - return x; - }; - var memoized = function () { - var args = Array.prototype.slice.call(arguments); - var callback = args.pop(); - var key = hasher.apply(null, args); - if (key in memo) { - callback.apply(null, memo[key]); - } - else if (key in queues) { - queues[key].push(callback); - } - else { - queues[key] = [callback]; - fn.apply(null, args.concat([function () { - memo[key] = arguments; - var q = queues[key]; - delete queues[key]; - for (var i = 0, l = q.length; i < l; i++) { - q[i].apply(null, arguments); - } - }])); - } - }; - memoized.unmemoized = fn; - return memoized; - }; - - async.unmemoize = function (fn) { - return function () { - return (fn.unmemoized || fn).apply(null, arguments); - }; - }; - -}()); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/package.json deleted file mode 100644 index 31e18559..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "async", - "description": "Higher-order functions and common patterns for asynchronous code", - "main": "./index", - "author": { - "name": "Caolan McMahon" - }, - "version": "0.1.22", - "repository": { - "type": "git", - "url": "http://github.com/caolan/async.git" - }, - "bugs": { - "url": "http://github.com/caolan/async/issues" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/caolan/async/raw/master/LICENSE" - } - ], - "devDependencies": { - "nodeunit": ">0.0.0", - "uglify-js": "1.2.x", - "nodelint": ">0.0.0" - }, - "readme": "# Async.js\n\nAsync is a utility module which provides straight-forward, powerful functions\nfor working with asynchronous JavaScript. Although originally designed for\nuse with [node.js](http://nodejs.org), it can also be used directly in the\nbrowser.\n\nAsync provides around 20 functions that include the usual 'functional'\nsuspects (map, reduce, filter, forEach…) as well as some common patterns\nfor asynchronous control flow (parallel, series, waterfall…). All these\nfunctions assume you follow the node.js convention of providing a single\ncallback as the last argument of your async function.\n\n\n## Quick Examples\n\n async.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n });\n\n async.filter(['file1','file2','file3'], path.exists, function(results){\n // results now equals an array of the existing files\n });\n\n async.parallel([\n function(){ ... },\n function(){ ... }\n ], callback);\n\n async.series([\n function(){ ... },\n function(){ ... }\n ]);\n\nThere are many more functions available so take a look at the docs below for a\nfull list. This module aims to be comprehensive, so if you feel anything is\nmissing please create a GitHub issue for it.\n\n\n## Download\n\nReleases are available for download from\n[GitHub](http://github.com/caolan/async/downloads).\nAlternatively, you can install using Node Package Manager (npm):\n\n npm install async\n\n\n__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 17.5kb Uncompressed\n\n__Production:__ [async.min.js](https://github.com/caolan/async/raw/master/dist/async.min.js) - 1.7kb Packed and Gzipped\n\n\n## In the Browser\n\nSo far its been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage:\n\n <script type=\"text/javascript\" src=\"async.js\"></script>\n <script type=\"text/javascript\">\n\n async.map(data, asyncProcess, function(err, results){\n alert(results);\n });\n\n </script>\n\n\n## Documentation\n\n### Collections\n\n* [forEach](#forEach)\n* [map](#map)\n* [filter](#filter)\n* [reject](#reject)\n* [reduce](#reduce)\n* [detect](#detect)\n* [sortBy](#sortBy)\n* [some](#some)\n* [every](#every)\n* [concat](#concat)\n\n### Control Flow\n\n* [series](#series)\n* [parallel](#parallel)\n* [whilst](#whilst)\n* [until](#until)\n* [waterfall](#waterfall)\n* [queue](#queue)\n* [auto](#auto)\n* [iterator](#iterator)\n* [apply](#apply)\n* [nextTick](#nextTick)\n\n### Utils\n\n* [memoize](#memoize)\n* [unmemoize](#unmemoize)\n* [log](#log)\n* [dir](#dir)\n* [noConflict](#noConflict)\n\n\n## Collections\n\n<a name=\"forEach\" />\n### forEach(arr, iterator, callback)\n\nApplies an iterator function to each item in an array, in parallel.\nThe iterator is called with an item from the list and a callback for when it\nhas finished. If the iterator passes an error to this callback, the main\ncallback for the forEach function is immediately called with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n // assuming openFiles is an array of file names and saveFile is a function\n // to save the modified contents of that file:\n\n async.forEach(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n });\n\n---------------------------------------\n\n<a name=\"forEachSeries\" />\n### forEachSeries(arr, iterator, callback)\n\nThe same as forEach only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. This means the iterator functions will complete in order.\n\n\n---------------------------------------\n\n<a name=\"forEachLimit\" />\n### forEachLimit(arr, limit, iterator, callback)\n\nThe same as forEach only the iterator is applied to batches of items in the\narray, in series. The next batch of iterators is only called once the current\none has completed processing.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - How many items should be in each batch.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n // Assume documents is an array of JSON objects and requestApi is a\n // function that interacts with a rate-limited REST api.\n\n async.forEachLimit(documents, 20, requestApi, function(err){\n // if any of the saves produced an error, err would equal that error\n });\n---------------------------------------\n\n<a name=\"map\" />\n### map(arr, iterator, callback)\n\nProduces a new array of values by mapping each value in the given array through\nthe iterator function. The iterator is called with an item from the array and a\ncallback for when it has finished processing. The callback takes 2 arguments, \nan error and the transformed item from the array. If the iterator passes an\nerror to this callback, the main callback for the map function is immediately\ncalled with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order, however\nthe results array will be in the same order as the original array.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n async.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n });\n\n---------------------------------------\n\n<a name=\"mapSeries\" />\n### mapSeries(arr, iterator, callback)\n\nThe same as map only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n---------------------------------------\n\n<a name=\"filter\" />\n### filter(arr, iterator, callback)\n\n__Alias:__ select\n\nReturns a new array of all the values which pass an async truth test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(results) - A callback which is called after all the iterator\n functions have finished.\n\n__Example__\n\n async.filter(['file1','file2','file3'], path.exists, function(results){\n // results now equals an array of the existing files\n });\n\n---------------------------------------\n\n<a name=\"filterSeries\" />\n### filterSeries(arr, iterator, callback)\n\n__alias:__ selectSeries\n\nThe same as filter only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n---------------------------------------\n\n<a name=\"reject\" />\n### reject(arr, iterator, callback)\n\nThe opposite of filter. Removes values that pass an async truth test.\n\n---------------------------------------\n\n<a name=\"rejectSeries\" />\n### rejectSeries(arr, iterator, callback)\n\nThe same as filter, only the iterator is applied to each item in the array\nin series.\n\n\n---------------------------------------\n\n<a name=\"reduce\" />\n### reduce(arr, memo, iterator, callback)\n\n__aliases:__ inject, foldl\n\nReduces a list of values into a single value using an async iterator to return\neach successive step. Memo is the initial state of the reduction. This\nfunction only operates in series. For performance reasons, it may make sense to\nsplit a call to this function into a parallel map, then use the normal\nArray.prototype.reduce on the results. This function is for situations where\neach step in the reduction needs to be async, if you can get the data before\nreducing it then its probably a good idea to do so.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* memo - The initial state of the reduction.\n* iterator(memo, item, callback) - A function applied to each item in the\n array to produce the next step in the reduction. The iterator is passed a\n callback which accepts an optional error as its first argument, and the state\n of the reduction as the second. If an error is passed to the callback, the\n reduction is stopped and the main callback is immediately called with the\n error.\n* callback(err, result) - A callback which is called after all the iterator\n functions have finished. Result is the reduced value.\n\n__Example__\n\n async.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n }, function(err, result){\n // result is now equal to the last value of memo, which is 6\n });\n\n---------------------------------------\n\n<a name=\"reduceRight\" />\n### reduceRight(arr, memo, iterator, callback)\n\n__Alias:__ foldr\n\nSame as reduce, only operates on the items in the array in reverse order.\n\n\n---------------------------------------\n\n<a name=\"detect\" />\n### detect(arr, iterator, callback)\n\nReturns the first value in a list that passes an async truth test. The\niterator is applied in parallel, meaning the first iterator to return true will\nfire the detect callback with that result. That means the result might not be\nthe first item in the original array (in terms of order) that passes the test.\n\nIf order within the original array is important then look at detectSeries.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value undefined if none passed.\n\n__Example__\n\n async.detect(['file1','file2','file3'], path.exists, function(result){\n // result now equals the first file in the list that exists\n });\n\n---------------------------------------\n\n<a name=\"detectSeries\" />\n### detectSeries(arr, iterator, callback)\n\nThe same as detect, only the iterator is applied to each item in the array\nin series. This means the result is always the first in the original array (in\nterms of array order) that passes the truth test.\n\n\n---------------------------------------\n\n<a name=\"sortBy\" />\n### sortBy(arr, iterator, callback)\n\nSorts a list by the results of running each value through an async iterator.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and a value to use as the sort criteria.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is the items from\n the original array sorted by the values returned by the iterator calls.\n\n__Example__\n\n async.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n }, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n });\n\n\n---------------------------------------\n\n<a name=\"some\" />\n### some(arr, iterator, callback)\n\n__Alias:__ any\n\nReturns true if at least one element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists. Once any iterator\ncall returns true, the main callback is immediately called.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n either true or false depending on the values of the async tests.\n\n__Example__\n\n async.some(['file1','file2','file3'], path.exists, function(result){\n // if result is true then at least one of the files exists\n });\n\n---------------------------------------\n\n<a name=\"every\" />\n### every(arr, iterator, callback)\n\n__Alias:__ all\n\nReturns true if every element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called after all the iterator\n functions have finished. Result will be either true or false depending on\n the values of the async tests.\n\n__Example__\n\n async.every(['file1','file2','file3'], path.exists, function(result){\n // if result is true then every file exists\n });\n\n---------------------------------------\n\n<a name=\"concat\" />\n### concat(arr, iterator, callback)\n\nApplies an iterator to each item in a list, concatenating the results. Returns the\nconcatenated list. The iterators are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of the arguments passed to the iterator function.\n\n__Arguments__\n\n* arr - An array to iterate over\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and an array of results.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array containing\n the concatenated results of the iterator function.\n\n__Example__\n\n async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n });\n\n---------------------------------------\n\n<a name=\"concatSeries\" />\n### concatSeries(arr, iterator, callback)\n\nSame as async.concat, but executes in series instead of parallel.\n\n\n## Control Flow\n\n<a name=\"series\" />\n### series(tasks, [callback])\n\nRun an array of functions in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run and the callback for the series is\nimmediately called with the value of the error. Once the tasks have completed,\nthe results are passed to the final callback as an array.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.series.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed\n a callback it must call on completion.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets an array of all the arguments passed to\n the callbacks used in the array.\n\n__Example__\n\n async.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n },\n ],\n // optional callback\n function(err, results){\n // results is now equal to ['one', 'two']\n });\n\n\n // an example using an object instead of an array\n async.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n },\n },\n function(err, results) {\n // results is now equal to: {one: 1, two: 2}\n });\n\n\n---------------------------------------\n\n<a name=\"parallel\" />\n### parallel(tasks, [callback])\n\nRun an array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main callback is immediately called with the value of the error.\nOnce the tasks have completed, the results are passed to the final callback as an\narray.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.parallel.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed a\n callback it must call on completion.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets an array of all the arguments passed to\n the callbacks used in the array.\n\n__Example__\n\n async.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n },\n ],\n // optional callback\n function(err, results){\n // the results array will equal ['one','two'] even though\n // the second function had a shorter timeout.\n });\n\n\n // an example using an object instead of an array\n async.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n },\n },\n function(err, results) {\n // results is now equals to: {one: 1, two: 2}\n });\n\n\n---------------------------------------\n\n<a name=\"whilst\" />\n### whilst(test, fn, callback)\n\nRepeatedly call fn, while test returns true. Calls the callback when stopped,\nor an error occurs.\n\n__Arguments__\n\n* test() - synchronous truth test to perform before each execution of fn.\n* fn(callback) - A function to call each time the test passes. The function is\n passed a callback which must be called once it has completed with an optional\n error as the first argument.\n* callback(err) - A callback which is called after the test fails and repeated\n execution of fn has stopped.\n\n__Example__\n\n var count = 0;\n\n async.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n );\n\n\n---------------------------------------\n\n<a name=\"until\" />\n### until(test, fn, callback)\n\nRepeatedly call fn, until test returns true. Calls the callback when stopped,\nor an error occurs.\n\nThe inverse of async.whilst.\n\n\n---------------------------------------\n\n<a name=\"waterfall\" />\n### waterfall(tasks, [callback])\n\nRuns an array of functions in series, each passing their results to the next in\nthe array. However, if any of the functions pass an error to the callback, the\nnext function is not executed and the main callback is immediately called with\nthe error.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a callback it\n must call on completion.\n* callback(err, [results]) - An optional callback to run once all the functions\n have completed. This will be passed the results of the last task's callback.\n\n\n\n__Example__\n\n async.waterfall([\n function(callback){\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback){\n callback(null, 'three');\n },\n function(arg1, callback){\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n ], function (err, result) {\n // result now equals 'done' \n });\n\n\n---------------------------------------\n\n<a name=\"queue\" />\n### queue(worker, concurrency)\n\nCreates a queue object with the specified concurrency. Tasks added to the\nqueue will be processed in parallel (up to the concurrency limit). If all\nworkers are in progress, the task is queued until one is available. Once\na worker has completed a task, the task's callback is called.\n\n__Arguments__\n\n* worker(task, callback) - An asynchronous function for processing a queued\n task.\n* concurrency - An integer for determining how many worker functions should be\n run in parallel.\n\n__Queue objects__\n\nThe queue object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* concurrency - an integer for determining how many worker functions should be\n run in parallel. This property can be changed after a queue is created to\n alter the concurrency on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n // create a queue object with concurrency 2\n\n var q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n }, 2);\n\n\n // assign a callback\n q.drain = function() {\n console.log('all items have been processed');\n }\n\n // add some items to the queue\n\n q.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n });\n q.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n });\n\n // add some items to the queue (batch-wise)\n\n q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing bar');\n });\n\n\n---------------------------------------\n\n<a name=\"auto\" />\n### auto(tasks, [callback])\n\nDetermines the best order for running functions based on their requirements.\nEach function can optionally depend on other functions being completed first,\nand each function is run as soon as its requirements are satisfied. If any of\nthe functions pass an error to their callback, that function will not complete\n(so any other functions depending on it will not run) and the main callback\nwill be called immediately with the error. Functions also receive an object\ncontaining the results of functions which have completed so far.\n\n__Arguments__\n\n* tasks - An object literal containing named functions or an array of\n requirements, with the function itself the last item in the array. The key\n used for each function or array is used when specifying requirements. The\n syntax is easier to understand by looking at the example.\n* callback(err, results) - An optional callback which is called when all the\n tasks have been completed. The callback will receive an error as an argument\n if any tasks pass an error to their callback. If all tasks complete\n successfully, it will receive an object containing their results.\n\n__Example__\n\n async.auto({\n get_data: function(callback){\n // async code to get some data\n },\n make_folder: function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n },\n write_file: ['get_data', 'make_folder', function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, filename);\n }],\n email_link: ['write_file', function(callback, results){\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n }]\n });\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n async.parallel([\n function(callback){\n // async code to get some data\n },\n function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n }\n ],\n function(results){\n async.series([\n function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n },\n email_link: function(callback){\n // once the file is written let's email a link to it...\n }\n ]);\n });\n\nFor a complicated series of async tasks using the auto function makes adding\nnew tasks much easier and makes the code more readable.\n\n\n---------------------------------------\n\n<a name=\"iterator\" />\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the array,\nreturning a continuation to call the next one after that. Its also possible to\n'peek' the next iterator by doing iterator.next().\n\nThis function is used internally by the async module but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a callback it\n must call on completion.\n\n__Example__\n\n var iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n ]);\n\n node> var iterator2 = iterator();\n 'one'\n node> var iterator3 = iterator2();\n 'two'\n node> iterator3();\n 'three'\n node> var nextfn = iterator2.next();\n node> nextfn();\n 'three'\n\n\n---------------------------------------\n\n<a name=\"apply\" />\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied, a useful\nshorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n // using apply\n\n async.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n ]);\n\n\n // the same process without using apply\n\n async.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n },\n ]);\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n node> var fn = async.apply(sys.puts, 'one');\n node> fn('two', 'three');\n one\n two\n three\n\n---------------------------------------\n\n<a name=\"nextTick\" />\n### nextTick(callback)\n\nCalls the callback on a later loop around the event loop. In node.js this just\ncalls process.nextTick, in the browser it falls back to setTimeout(callback, 0),\nwhich means other higher priority events may precede the execution of the callback.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* callback - The function to call on a later loop around the event loop.\n\n__Example__\n\n var call_order = [];\n async.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two]\n });\n call_order.push('one')\n\n\n## Utils\n\n<a name=\"memoize\" />\n### memoize(fn, [hasher])\n\nCaches the results of an async function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\n__Arguments__\n\n* fn - the function you to proxy and cache results from.\n* hasher - an optional function for generating a custom hash for storing\n results, it has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n var slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n };\n var fn = async.memoize(slow_fn);\n\n // fn can now be used as if it were slow_fn\n fn('some name', function () {\n // callback\n });\n\n<a name=\"unmemoize\" />\n### unmemoize(fn)\n\nUndoes a memoized function, reverting it to the original, unmemoized\nform. Comes handy in tests.\n\n__Arguments__\n\n* fn - the memoized function\n\n<a name=\"log\" />\n### log(function, arguments)\n\nLogs the result of an async function to the console. Only works in node.js or\nin browsers that support console.log and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.log is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n var hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n };\n\n node> async.log(hello, 'world');\n 'hello world'\n\n\n---------------------------------------\n\n<a name=\"dir\" />\n### dir(function, arguments)\n\nLogs the result of an async function to the console using console.dir to\ndisplay the properties of the resulting object. Only works in node.js or\nin browsers that support console.dir and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.dir is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n var hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n };\n\n node> async.dir(hello, 'world');\n {hello: 'world'}\n\n\n---------------------------------------\n\n<a name=\"noConflict\" />\n### noConflict()\n\nChanges the value of async back to its original value, returning a reference to the\nasync object.\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/caolan/async", - "_id": "async@0.1.22", - "dist": { - "shasum": "3b270eedc0419d6f92a664444ce98e0f59a8fef7" - }, - "_from": "async@0.1.22", - "_resolved": "https://registry.npmjs.org/async/-/async-0.1.22.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/package.json deleted file mode 100644 index 1d8c8459..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "isbin", - "version": "0.0.2", - "description": "Checks for available binaries on unix machines", - "main": "index.js", - "engines": { - "node": ">= 0.8.0" - }, - "keywords": [ - "fs", - "bin", - "binary", - "exists", - "check", - "path" - ], - "scripts": { - "test": "make test" - }, - "repository": { - "type": "git", - "url": "git://github.com/behrendtio/isbin.git" - }, - "author": "", - "license": "MIT", - "dependencies": { - "async": "0.1.22" - }, - "devDependencies": { - "mocha": "1.7.3", - "should": "1.2.1" - }, - "readme": "[![Build Status](https://secure.travis-ci.org/mbehrendt/isbin.png?branch=master)](https://travis-ci.org/mbehrendt/isbin)\n\n# Isbin\n\nTiny little helper library to determine if a certain binary is available within $PATH or any additional folder.\n\n# Installation\n\n```bash\n$ npm install isbin\n```\n\n# Usage\n\n```js\nvar isbin = require('isbin');\n\n// Test against $PATH\nisbin('mysql', function(exists) {\n console.log(exists); // ==> Boolean\n});\n\n// With additional path to test\nisbin('mysql', '/usr/local/bin', function(exists) {\n console.log(exists); // ==> Boolean\n});\n\n// Or multiple ones\nisbin('mysql', ['/usr/local/bin', '/home/me/bins'], function(exists) {\n console.log(exists); // ==> Boolean\n});\n```\n\nThere are also synchronous versions available\n\n```js\nvar exists = isbin('mysql');\nvar exists = isbin('mysql', '/usr/local/bin');\nvar exists = isbin('mysql', ['/usr/local/bin', '/home/me/bins']);\n```\n\n# Running the tests\n\n```bash\n$ npm install\n$ make test\n```\n\n# License\n\n(The MIT License)\n\nCopyright (c) 2012 Mario Behrendt info@mario-behrendt.de, Stephan Hoyer <ste.hoyer@gmail.com>\n\nPermission 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:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE 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.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/behrendtio/isbin/issues" - }, - "homepage": "https://github.com/behrendtio/isbin", - "_id": "isbin@0.0.2", - "dist": { - "shasum": "2a35fb234ad5ee30f78da61b57e8f42ac43ec5a4" - }, - "_from": "isbin@0.0.2", - "_resolved": "https://registry.npmjs.org/isbin/-/isbin-0.0.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/test/isbin.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/test/isbin.js deleted file mode 100644 index 068a38a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/test/isbin.js +++ /dev/null @@ -1,39 +0,0 @@ -var isbin = require('../'); - -describe('isbin', function() { - it('accepts binary, additional path and callback', function(done) { - isbin('ls', '/etc', function(exists) { - exists.should.be.a('boolean'); - done(); - }) - }); - - it('accepts array of paths', function(done) { - isbin('ls', ['/etc', '/home'], function(exists) { - exists.should.be.a('boolean'); - done(); - }); - }); - - it('accepts just binary and callback', function(done) { - isbin('ls', function(exists) { - exists.should.be.a('boolean'); - done(); - }); - }); - - it('accepts binary, additional path and callback', function() { - var exists = isbin('ls', '/etc'); - exists.should.be.a('boolean'); - }); - - it('accepts array of paths', function() { - var exists = isbin('ls', ['/etc', '/home']); - exists.should.be.a('boolean'); - }); - - it('accepts just binary', function() { - var exists = isbin('ls'); - exists.should.be.a('boolean'); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/test/mocha.opts b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/test/mocha.opts deleted file mode 100644 index e5eb9f87..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/isbin/test/mocha.opts +++ /dev/null @@ -1,4 +0,0 @@ ---require should ---bail ---ui bdd ---slow 100 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/.editorconfig b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/.editorconfig deleted file mode 100644 index e036e247..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -; EditorConfig is awesome: http://EditorConfig.org - -; top-most EditorConfig file -root = true - -; base rules -[*] -end_of_line = lf -insert_final_newline = false -indent_style = space -indent_size = 4 -charset = utf-8 -trim_trailing_whitespace = true - -; The default indent on package.json is 2 spaces, better to keep it so we can -; use `npm install --save` and other features that rewrites the package.json -; file automatically -[package.json] -indent_style = space -indent_size = 2 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/.jshintrc b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/.jshintrc deleted file mode 100644 index bbdb29cf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/.jshintrc +++ /dev/null @@ -1,69 +0,0 @@ -{ - // Settings - "passfail" : false, // Stop on first error. - "maxerr" : 50, // Maximum error before stopping. - - - // Predefined globals whom JSHint will ignore. - "browser" : true, // Standard browser globals e.g. `window`, `document`. - "couch" : false, - "dojo" : false, - "jquery" : true, - "mootools" : false, - "node" : false, - "prototypejs" : false, - "rhino" : false, - "wsh" : false, - - // Custom globals. - "predef" : [ - "define", - "require" - ], - - - // Development. - "debug" : false, // Allow debugger statements e.g. browser breakpoints. - "devel" : false, // Allow developments statements e.g. `console.log();`. - - - // EcmaScript 5. - "es5" : false, // Allow EcmaScript 5 syntax. - "globalstrict" : false, // Allow global "use strict" (also enables 'strict'). - "strict" : false, // Require `use strict` pragma in every file. - - - // The Good Parts. - "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons). - "bitwise" : false, // Prohibit bitwise operators (&, |, ^, etc.). - "boss" : true, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments. - "curly" : false, // Require {} for every new block or scope. - "eqeqeq" : true, // Require triple equals i.e. `===`. - "eqnull" : true, // Tolerate use of `== null`. - "evil" : false, // Tolerate use of `eval`. - "expr" : false, // Tolerate `ExpressionStatement` as Programs. - "forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`. - "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` - "latedef" : false, // Prohibit variable use before definition. - "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons. - "loopfunc" : false, // Allow functions to be defined within loops. - "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`. - "regexdash" : true, // Tolerate unescaped last dash i.e. `[-...]`. - "regexp" : false, // Prohibit `.` and `[^...]` in regular expressions. - "scripturl" : false, // Tolerate script-targeted URLs. - "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`. - "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`. - "undef" : false, // Require all non-global variables be declared before they are used. - - - // Personal styling prefrences. - "newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`. - "noempty" : true, // Prohipit use of empty blocks. - "nomen" : false, // Prohibit use of initial or trailing underbars in names. - "nonew" : true, // Prohibit use of constructors for side-effects. - "onevar" : false, // Allow only one `var` statement per function. - "plusplus" : false, // Prohibit use of `++` & `--`. - "sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`. - "trailing" : true, // Prohibit trailing whitespaces. - "white" : false // Check against strict whitespace and indentation rules. -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/.npmignore deleted file mode 100644 index 1341acd9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/.npmignore +++ /dev/null @@ -1,30 +0,0 @@ -# dumb files -# ========== - -.tmp* -.project -.settings/ -.livereload -.DS_Store? -ehthumbs.db -Icon? -Thumbs.db - - -# stuff not needed by node -# ======================== - -node_modules/ -tests/ -_build/ -doc_html/ -coverage/ - -# we keep the doc/ folder in case npm decides to display it in the future -# also good in case user is using an old version or working offline - -# we also keep the src/ folder in case the user still needs the AMD modules -# after build (see issue #102) - -bower.json -build.js diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/.travis.yml deleted file mode 100644 index 36de1532..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ - language: node_js - node_js: - - "0.8" - script: "npm test --coverage" - notifications: - irc: - channels: - - "irc.freenode.org#moutjs" - on_success: always - on_failure: always - use_notice: true - skip_join: true - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/CHANGELOG.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/CHANGELOG.md deleted file mode 100644 index 0f5eac12..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/CHANGELOG.md +++ /dev/null @@ -1,93 +0,0 @@ -mout changelog -============== - -v0.6.0 (2013/05/22) -------------------- - - - add optional delimeter to `string/unCamelCase` - - allow custom char on `number/pad` - - allow underscore characters in `string/removeNonWord` - - accept `level` on `array/flatten` instead of a flag - - convert underscores to camelCase in `string/camelCase` - - remove `create()` from number/currencyFormat - - add `date/dayOfTheYear` - - add `date/diff` - - add `date/isSame` - - add `date/startOf` - - add `date/strftime` - - add `date/timezoneAbbr` - - add `date/timezoneOffset` - - add `date/totalDaysInYear` - - add `date/weekOfTheYear` - - add `function/timeout` - - add `object/bindAll` - - add `object/functions` - - add `time/convert` - - -v0.5.0 (2013/04/04) -------------------- - - - add `array/collect` - - add `callback` parameter to `object/equals` and `object/deepEquals` to allow - custom compare operations. - - normalize behavior in `array/*` methods to treat `null` values as empty - arrays when reading from array - - add `date/parseIso` - - add `date/isLeapYear` - - add `date/totalDaysInMonth` - - add `object/deepMatches` - - change `function/makeIterator_` to use `deepMatches` (affects nearly all - iteration methods) - - add `thisObj` parameter to `array/min` and `array/max` - - -v0.4.0 (2013/02/26) -------------------- - - - add `object/equals` - - add `object/deepEquals` - - add `object/matches`. - - add `lang/is` and `lang/isnt`. - - add `lang/isInteger`. - - add `array/findIndex`. - - add shorthand syntax to `array/*`, `object/*` and `collection/*` methods. - - improve `number/sign` behavior when value is NaN or +0 or -0. - - improve `lang/isNaN` to actually check if value *is not a number* without - coercing value; so `[]`, `""`, `null` and `"12"` are considered NaN (#39). - - improve `string/contains` to match ES6 behavior (add fromIndex argument). - - -v0.3.0 (2013/02/01) -------------------- - - - add `lang/clone`. - - add `lang/toString`. - - add `string/replace`. - - add `string/WHITE_SPACES` - - rename `function/curry` to `function/partial`. - - allow custom chars in `string/trim`, `ltrim`, and `rtrim`. - - convert values to strings in the `string/*` functions. - - -v0.2.0 (2013/01/13) -------------------- - - - fix bug in `math/ceil` for negative radixes. - - change `object/deepFillIn` and `object/deepMixIn` to recurse only if both - existing and new values are plain objects. Will not recurse into arrays - or objects not created by the Object constructor. - - add `lang/isPlainObject` to check if a file is a valid object and is created - by the Object constructor - - change `lang/clone` behavior when dealing with custom types (avoid cloning - it by default) and add second argument to allow custom behavior if needed. - - rename `lang/clone` to `lang/deepClone`. - - add VERSION property to index.js - - simplify `math/floor`, `math/round`, `math/ceil` and `math/countSteps`. - - -v0.1.0 (2013/01/09) -------------------- - -- Rename project from "amd-utils" to "mout" - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/CONTRIBUTING.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/CONTRIBUTING.md deleted file mode 100644 index 65d9add1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/CONTRIBUTING.md +++ /dev/null @@ -1,61 +0,0 @@ -# Contributing - -Fork the repo at https://github.com/mout/mout - - > "Write clearly, don't be too clever" - The Elements of Programming Style - -Avoid unnamed functions and follow the other modules structure. By only using named functions it will be easier to extract the code from the AMD module if needed and it will also give better error messages, JavaScript minifiers like [Google Closure Compiler](http://code.google.com/closure/compiler/) and [UglifyJS](https://github.com/mishoo/UglifyJS) will make sure code is as small/optimized as possible. - - > "Make it clear before you make it faster." - The Elements of Programming Style - -Be sure to always create tests for each proposed module. Features will only be merged if they contain proper tests and documentation. - - > "Good code is its own best documentation." - Steve McConnell - -We should do a code review before merging to make sure names makes sense and implementation is as good as possible. - -Try to split your pull requests into logical groups, the smaller the easier to be reviewed/merged. - - - -## Tests & Code Coverage ## - -Tests can be found inside the `tests` folder, to execute them in the browser open the `tests/runner.html`. The same tests also work on node.js by running `npm test`. - -We should have tests for all methods and ensure we have a high code coverage through our continuous integration server ([travis](https://travis-ci.org/mout/mout)). When you ask for a pull request Travis will automatically run the tests on node.js and check the code coverage as well. - -We run `node build pkg` automatically before any `npm test`, so specs and packages should always be in sync. (will avoid human mistakes) - -To check code coverage run `npm test --coverage`, it will generate the reports inside the `coverage` folder and also log the results. Please note that node.js doesn't execute all code branches since we have some conditionals that are only met on old JavaScript engines (eg. IE 7-8), so we will never have 100% code coverage (but should be close to it). - - - -## Build Script ## - -The [build script](https://github.com/mout/mout/wiki/Build-Script) can be extremely helpful and can avoid human mistakes, use it. - - - -## Admins / Pull Requests ## - -Even if you are an admin (have commit rights) please do pull requests when adding new features or changing current behavior, that way we can review the work and discuss. Feel free to push changes that doesn't affect behavior without asking for a pull request (readme, changelog, build script, typos, refactoring, ...). - - - -## Large changes ## - -If you are proposing some major change, please create an issue to discuss it first. (maybe it's outside the scope of the project) - - - -## Questions / IRC / Wiki / Issue Tracker ## - -When in doubt ask someone on IRC to help you ([#moutjs on irc.freenode.net](http://webchat.freenode.net/?channels=moutjs)) or create a [new issue](http://github.com/mout/mout/issues). - -The [project wiki](https://github.com/mout/mout/wiki) can also be a good resource of information. - - ---- - -Check the [contributors list at github](https://github.com/mout/mout/contributors). - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/LICENSE.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/LICENSE.md deleted file mode 100644 index e9ccc2be..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -# The MIT License (MIT) -## Copyright (c) 2012, 2013 moutjs team and contributors (http://moutjs.com) - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/README.md deleted file mode 100644 index 872943bd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/README.md +++ /dev/null @@ -1,63 +0,0 @@ -![mout](http://moutjs.com/logo.png "Modular JavaScript Utilties") - -http://moutjs.com/ - -[![Build Status](https://travis-ci.org/mout/mout.png?branch=master)](https://travis-ci.org/mout/mout) - -All code is library agnostic and consist mostly of helper methods that aren't -directly related with the DOM, the purpose of this library isn't to replace -Dojo, jQuery, YUI, Mootools, etc, but to provide modular solutions for common -problems that aren't solved by most of them. Consider it as a crossbrowser -JavaScript standard library. - - - -## Main goals ## - - - increase code reuse; - - be clear (code should be clean/readable); - - be easy to debug; - - be easy to maintain; - - follow best practices; - - follow standards when possible; - - **don't convert JavaScript into another language!** - - be compatible with other frameworks; - - be modular; - - have unit tests for all modules; - - work on multiple environments (IE7+, modern browsers, node.js); - - - -## What shouldn't be here ## - - - UI components; - - CSS selector engine; - - Event system - pub/sub; - - Template engine; - - Anything that isn't generic enough to be on a standard library; - - Anything that could be a separate library and/or isn't a modular utility... - - - -## API Documentation ## - -Online documentation can be found at http://moutjs.com/ or inside the -`doc` folder. - - - -## FAQ / Wiki / IRC ## - -For more info about project structure, design decisions, tips, how to -contribute, build system, etc, please check the [project -wiki](https://github.com/mout/mout/wiki). - -We also have an IRC channel [#moutjs on -irc.freenode.net](http://webchat.freenode.net/?channels=moutjs) - - - -## License ## - -Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php). - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array.js deleted file mode 100644 index 89d388ba..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array.js +++ /dev/null @@ -1,46 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'append' : require('./array/append'), - 'collect' : require('./array/collect'), - 'combine' : require('./array/combine'), - 'compact' : require('./array/compact'), - 'contains' : require('./array/contains'), - 'difference' : require('./array/difference'), - 'every' : require('./array/every'), - 'filter' : require('./array/filter'), - 'find' : require('./array/find'), - 'findIndex' : require('./array/findIndex'), - 'flatten' : require('./array/flatten'), - 'forEach' : require('./array/forEach'), - 'indexOf' : require('./array/indexOf'), - 'insert' : require('./array/insert'), - 'intersection' : require('./array/intersection'), - 'invoke' : require('./array/invoke'), - 'join' : require('./array/join'), - 'lastIndexOf' : require('./array/lastIndexOf'), - 'map' : require('./array/map'), - 'max' : require('./array/max'), - 'min' : require('./array/min'), - 'pick' : require('./array/pick'), - 'pluck' : require('./array/pluck'), - 'range' : require('./array/range'), - 'reduce' : require('./array/reduce'), - 'reduceRight' : require('./array/reduceRight'), - 'reject' : require('./array/reject'), - 'remove' : require('./array/remove'), - 'removeAll' : require('./array/removeAll'), - 'shuffle' : require('./array/shuffle'), - 'some' : require('./array/some'), - 'sort' : require('./array/sort'), - 'split' : require('./array/split'), - 'toLookup' : require('./array/toLookup'), - 'union' : require('./array/union'), - 'unique' : require('./array/unique'), - 'xor' : require('./array/xor'), - 'zip' : require('./array/zip') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/append.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/append.js deleted file mode 100644 index bf74037e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/append.js +++ /dev/null @@ -1,21 +0,0 @@ - - - /** - * Appends an array to the end of another. - * The first array will be modified. - */ - function append(arr1, arr2) { - if (arr2 == null) { - return arr1; - } - - var pad = arr1.length, - i = -1, - len = arr2.length; - while (++i < len) { - arr1[pad + i] = arr2[i]; - } - return arr1; - } - module.exports = append; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/collect.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/collect.js deleted file mode 100644 index 58637493..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/collect.js +++ /dev/null @@ -1,27 +0,0 @@ -var append = require('./append'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Maps the items in the array and concatenates the result arrays. - */ - function collect(arr, callback, thisObj){ - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length; - while (++i < len) { - var value = callback(arr[i], i, arr); - if (value != null) { - append(results, value); - } - } - - return results; - } - - module.exports = collect; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/combine.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/combine.js deleted file mode 100644 index d66e6212..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/combine.js +++ /dev/null @@ -1,22 +0,0 @@ -var indexOf = require('./indexOf'); - - /** - * Combines an array with all the items of another. - * Does not allow duplicates and is case and type sensitive. - */ - function combine(arr1, arr2) { - if (arr2 == null) { - return arr1; - } - - var i = -1, len = arr2.length; - while (++i < len) { - if (indexOf(arr1, arr2[i]) === -1) { - arr1.push(arr2[i]); - } - } - - return arr1; - } - module.exports = combine; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/compact.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/compact.js deleted file mode 100644 index 74c176ed..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/compact.js +++ /dev/null @@ -1,13 +0,0 @@ -var filter = require('./filter'); - - /** - * Remove all null/undefined items from array. - */ - function compact(arr) { - return filter(arr, function(val){ - return (val != null); - }); - } - - module.exports = compact; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/contains.js deleted file mode 100644 index 92bb6ad9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/contains.js +++ /dev/null @@ -1,10 +0,0 @@ -var indexOf = require('./indexOf'); - - /** - * If array contains values. - */ - function contains(arr, val) { - return indexOf(arr, val) !== -1; - } - module.exports = contains; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/difference.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/difference.js deleted file mode 100644 index d0570510..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/difference.js +++ /dev/null @@ -1,22 +0,0 @@ -var unique = require('./unique'); -var filter = require('./filter'); -var some = require('./some'); -var contains = require('./contains'); - - - /** - * Return a new Array with elements that aren't present in the other Arrays. - */ - function difference(arr) { - var arrs = Array.prototype.slice.call(arguments, 1), - result = filter(unique(arr), function(needle){ - return !some(arrs, function(haystack){ - return contains(haystack, needle); - }); - }); - return result; - } - - module.exports = difference; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/every.js deleted file mode 100644 index ac598832..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/every.js +++ /dev/null @@ -1,27 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Array every - */ - function every(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = true; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (!callback(arr[i], i, arr) ) { - result = false; - break; - } - } - - return result; - } - - module.exports = every; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/filter.js deleted file mode 100644 index ebeb58dc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/filter.js +++ /dev/null @@ -1,27 +0,0 @@ -var forEach = require('./forEach'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Array filter - */ - function filter(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - if (callback(value, i, arr)) { - results.push(value); - } - } - - return results; - } - - module.exports = filter; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/find.js deleted file mode 100644 index b4a73131..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/find.js +++ /dev/null @@ -1,13 +0,0 @@ -var findIndex = require('./findIndex'); - - /** - * Returns first item that matches criteria - */ - function find(arr, iterator, thisObj){ - var idx = findIndex(arr, iterator, thisObj); - return idx >= 0? arr[idx] : void(0); - } - - module.exports = find; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/findIndex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/findIndex.js deleted file mode 100644 index 53f22a5f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/findIndex.js +++ /dev/null @@ -1,23 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Returns the index of the first item that matches criteria - */ - function findIndex(arr, iterator, thisObj){ - iterator = makeIterator(iterator, thisObj); - if (arr == null) { - return -1; - } - - var i = -1, len = arr.length; - while (++i < len) { - if (iterator(arr[i], i, arr)) { - return i; - } - } - - return -1; - } - - module.exports = findIndex; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/flatten.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/flatten.js deleted file mode 100644 index aa9757ab..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/flatten.js +++ /dev/null @@ -1,43 +0,0 @@ -var isArray = require('../lang/isArray'); -var append = require('./append'); - - /* - * Helper function to flatten to a destination array. - * Used to remove the need to create intermediate arrays while flattening. - */ - function flattenTo(arr, result, level) { - if (arr == null) { - return result; - } else if (level === 0) { - append(result, arr); - return result; - } - - var value, - i = -1, - len = arr.length; - while (++i < len) { - value = arr[i]; - if (isArray(value)) { - flattenTo(value, result, level - 1); - } else { - result.push(value); - } - } - return result; - } - - /** - * Recursively flattens an array. - * A new array containing all the elements is returned. - * If `shallow` is true, it will only flatten one level. - */ - function flatten(arr, level) { - level = level == null? -1 : level; - return flattenTo(arr, [], level); - } - - module.exports = flatten; - - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/forEach.js deleted file mode 100644 index 268e506f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/forEach.js +++ /dev/null @@ -1,23 +0,0 @@ - - - /** - * Array forEach - */ - function forEach(arr, callback, thisObj) { - if (arr == null) { - return; - } - var i = -1, - len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if ( callback.call(thisObj, arr[i], i, arr) === false ) { - break; - } - } - } - - module.exports = forEach; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/indexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/indexOf.js deleted file mode 100644 index 6a9ac832..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/indexOf.js +++ /dev/null @@ -1,28 +0,0 @@ - - - /** - * Array.indexOf - */ - function indexOf(arr, item, fromIndex) { - fromIndex = fromIndex || 0; - if (arr == null) { - return -1; - } - - var len = arr.length, - i = fromIndex < 0 ? len + fromIndex : fromIndex; - while (i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (arr[i] === item) { - return i; - } - - i++; - } - - return -1; - } - - module.exports = indexOf; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/insert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/insert.js deleted file mode 100644 index f1f95b75..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/insert.js +++ /dev/null @@ -1,15 +0,0 @@ -var difference = require('./difference'); -var toArray = require('../lang/toArray'); - - /** - * Insert item into array if not already present. - */ - function insert(arr, rest_items) { - var diff = difference(toArray(arguments).slice(1), arr); - if (diff.length) { - Array.prototype.push.apply(arr, diff); - } - return arr.length; - } - module.exports = insert; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/intersection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/intersection.js deleted file mode 100644 index e6170062..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/intersection.js +++ /dev/null @@ -1,23 +0,0 @@ -var unique = require('./unique'); -var filter = require('./filter'); -var every = require('./every'); -var contains = require('./contains'); - - - /** - * Return a new Array with elements common to all Arrays. - * - based on underscore.js implementation - */ - function intersection(arr) { - var arrs = Array.prototype.slice.call(arguments, 1), - result = filter(unique(arr), function(needle){ - return every(arrs, function(haystack){ - return contains(haystack, needle); - }); - }); - return result; - } - - module.exports = intersection; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/invoke.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/invoke.js deleted file mode 100644 index c01aab1b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/invoke.js +++ /dev/null @@ -1,23 +0,0 @@ -var forEach = require('./forEach'); - - /** - * Call `methodName` on each item of the array passing custom arguments if - * needed. - */ - function invoke(arr, methodName, var_args){ - if (arr == null) { - return arr; - } - - var args = Array.prototype.slice.call(arguments, 2); - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - value[methodName].apply(value, args); - } - - return arr; - } - - module.exports = invoke; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/join.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/join.js deleted file mode 100644 index 71d8bd20..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/join.js +++ /dev/null @@ -1,17 +0,0 @@ -var filter = require('./filter'); - - function isValidString(val) { - return (val != null && val !== ''); - } - - /** - * Joins strings with the specified separator inserted between each value. - * Null values and empty strings will be excluded. - */ - function join(items, separator) { - separator = separator || ''; - return filter(items, isValidString).join(separator); - } - - module.exports = join; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/lastIndexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/lastIndexOf.js deleted file mode 100644 index ee44a25b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/lastIndexOf.js +++ /dev/null @@ -1,28 +0,0 @@ - - - /** - * Array lastIndexOf - */ - function lastIndexOf(arr, item, fromIndex) { - if (arr == null) { - return -1; - } - - var len = arr.length; - fromIndex = (fromIndex == null || fromIndex >= len)? len - 1 : fromIndex; - fromIndex = (fromIndex < 0)? len + fromIndex : fromIndex; - - while (fromIndex >= 0) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (arr[fromIndex] === item) { - return fromIndex; - } - fromIndex--; - } - - return -1; - } - - module.exports = lastIndexOf; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/map.js deleted file mode 100644 index 54064f6b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/map.js +++ /dev/null @@ -1,23 +0,0 @@ -var forEach = require('./forEach'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Array map - */ - function map(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null){ - return results; - } - - var i = -1, len = arr.length; - while (++i < len) { - results[i] = callback(arr[i], i, arr); - } - - return results; - } - - module.exports = map; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/max.js deleted file mode 100644 index 183b10ea..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/max.js +++ /dev/null @@ -1,35 +0,0 @@ -var forEach = require('./forEach'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Return maximum value inside array - */ - function max(arr, iterator, thisObj){ - if (arr == null || !arr.length) { - return Infinity; - } else if (arr.length && !iterator) { - return Math.max.apply(Math, arr); - } else { - iterator = makeIterator(iterator, thisObj); - var result, - compare = -Infinity, - value, - temp; - - var i = -1, len = arr.length; - while (++i < len) { - value = arr[i]; - temp = iterator(value, i, arr); - if (temp > compare) { - compare = temp; - result = value; - } - } - - return result; - } - } - - module.exports = max; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/min.js deleted file mode 100644 index dd00b6cf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/min.js +++ /dev/null @@ -1,35 +0,0 @@ -var forEach = require('./forEach'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Return minimum value inside array - */ - function min(arr, iterator, thisObj){ - if (arr == null || !arr.length) { - return -Infinity; - } else if (arr.length && !iterator) { - return Math.min.apply(Math, arr); - } else { - iterator = makeIterator(iterator, thisObj); - var result, - compare = Infinity, - value, - temp; - - var i = -1, len = arr.length; - while (++i < len) { - value = arr[i]; - temp = iterator(value, i, arr); - if (temp < compare) { - compare = temp; - result = value; - } - } - - return result; - } - } - - module.exports = min; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/pick.js deleted file mode 100644 index 6a54846c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/pick.js +++ /dev/null @@ -1,14 +0,0 @@ -var randInt = require('../random/randInt'); - - /** - * Remove a random item from the Array and return it - */ - function pick(arr){ - if (arr == null || !arr.length) return; - var idx = randInt(0, arr.length - 1); - return arr.splice(idx, 1)[0]; - } - - module.exports = pick; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/pluck.js deleted file mode 100644 index fef4043b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/pluck.js +++ /dev/null @@ -1,12 +0,0 @@ -var map = require('./map'); - - /** - * Extract a list of property values. - */ - function pluck(arr, propName){ - return map(arr, propName); - } - - module.exports = pluck; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/range.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/range.js deleted file mode 100644 index 31d3c770..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/range.js +++ /dev/null @@ -1,27 +0,0 @@ -var countSteps = require('../math/countSteps'); - - /** - * Returns an Array of numbers inside range. - */ - function range(start, stop, step) { - if (stop == null) { - stop = start; - start = 0; - } - step = step || 1; - - var result = [], - nSteps = countSteps(stop - start, step), - i = start; - - while (i <= stop) { - result.push(i); - i += step; - } - - return result; - } - - module.exports = range; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/reduce.js deleted file mode 100644 index 1a350c6e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/reduce.js +++ /dev/null @@ -1,33 +0,0 @@ -var forEach = require('./forEach'); - - /** - * Array reduce - */ - function reduce(arr, fn, initVal) { - // check for args.length since initVal might be "undefined" see #gh-57 - var hasInit = arguments.length > 2, - result = initVal; - - if (arr == null || !arr.length) { - if (!hasInit) { - throw new Error('reduce of empty array with no initial value'); - } else { - return initVal; - } - } - - var i = -1, len = arr.length; - while (++i < len) { - if (!hasInit) { - result = arr[i]; - hasInit = true; - } else { - result = fn(result, arr[i], i, arr); - } - } - - return result; - } - - module.exports = reduce; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/reduceRight.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/reduceRight.js deleted file mode 100644 index e36fd4aa..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/reduceRight.js +++ /dev/null @@ -1,34 +0,0 @@ - - - /** - * Array reduceRight - */ - function reduceRight(arr, fn, initVal) { - // check for args.length since initVal might be "undefined" see #gh-57 - var hasInit = arguments.length > 2; - - if (arr == null || !arr.length) { - if (hasInit) { - return initVal; - } else { - throw new Error('reduce of empty array with no initial value'); - } - } - - var i = arr.length, result = initVal, value; - while (--i >= 0) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - value = arr[i]; - if (!hasInit) { - result = value; - hasInit = true; - } else { - result = fn(result, value, i, arr); - } - } - return result; - } - - module.exports = reduceRight; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/reject.js deleted file mode 100644 index 685f2918..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/reject.js +++ /dev/null @@ -1,26 +0,0 @@ -var forEach = require('./forEach'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Array reject - */ - function reject(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - if (!callback(value, i, arr)) { - results.push(value); - } - } - - return results; - } - - module.exports = reject; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/remove.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/remove.js deleted file mode 100644 index aa6517db..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/remove.js +++ /dev/null @@ -1,13 +0,0 @@ -var indexOf = require('./indexOf'); - - /** - * Remove a single item from the array. - * (it won't remove duplicates, just a single item) - */ - function remove(arr, item){ - var idx = indexOf(arr, item); - if (idx !== -1) arr.splice(idx, 1); - } - - module.exports = remove; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/removeAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/removeAll.js deleted file mode 100644 index d5f7f3b6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/removeAll.js +++ /dev/null @@ -1,15 +0,0 @@ -var indexOf = require('./indexOf'); - - /** - * Remove all instances of an item from array. - */ - function removeAll(arr, item){ - var idx = indexOf(arr, item); - while (idx !== -1) { - arr.splice(idx, 1); - idx = indexOf(arr, item, idx); - } - } - - module.exports = removeAll; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/shuffle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/shuffle.js deleted file mode 100644 index 97805ec8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/shuffle.js +++ /dev/null @@ -1,29 +0,0 @@ -var randInt = require('../random/randInt'); -var forEach = require('./forEach'); - - /** - * Shuffle array items. - */ - function shuffle(arr) { - var results = [], - rnd; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - if (!i) { - results[0] = arr[0]; - } else { - rnd = randInt(0, i); - results[i] = results[rnd]; - results[rnd] = arr[i]; - } - } - - return results; - } - - module.exports = shuffle; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/some.js deleted file mode 100644 index 8d17772b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/some.js +++ /dev/null @@ -1,27 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Array some - */ - function some(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = false; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if ( callback(arr[i], i, arr) ) { - result = true; - break; - } - } - - return result; - } - - module.exports = some; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/sort.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/sort.js deleted file mode 100644 index 7807339b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/sort.js +++ /dev/null @@ -1,55 +0,0 @@ - - - /** - * Merge sort (http://en.wikipedia.org/wiki/Merge_sort) - */ - function mergeSort(arr, compareFn) { - if (arr == null) { - return []; - } else if (arr.length < 2) { - return arr; - } - - if (compareFn == null) { - compareFn = defaultCompare; - } - - var mid, left, right; - - mid = ~~(arr.length / 2); - left = mergeSort( arr.slice(0, mid), compareFn ); - right = mergeSort( arr.slice(mid, arr.length), compareFn ); - - return merge(left, right, compareFn); - } - - function defaultCompare(a, b) { - return a < b ? -1 : (a > b? 1 : 0); - } - - function merge(left, right, compareFn) { - var result = []; - - while (left.length && right.length) { - if (compareFn(left[0], right[0]) <= 0) { - // if 0 it should preserve same order (stable) - result.push(left.shift()); - } else { - result.push(right.shift()); - } - } - - if (left.length) { - result.push.apply(result, left); - } - - if (right.length) { - result.push.apply(result, right); - } - - return result; - } - - module.exports = mergeSort; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/split.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/split.js deleted file mode 100644 index 4f3ba50c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/split.js +++ /dev/null @@ -1,35 +0,0 @@ - - - /** - * Split array into a fixed number of segments. - */ - function split(array, segments) { - segments = segments || 2; - var results = []; - if (array == null) { - return results; - } - - var minLength = Math.floor(array.length / segments), - remainder = array.length % segments, - i = 0, - len = array.length, - segmentIndex = 0, - segmentLength; - - while (i < len) { - segmentLength = minLength; - if (segmentIndex < remainder) { - segmentLength++; - } - - results.push(array.slice(i, i + segmentLength)); - - segmentIndex++; - i += segmentLength; - } - - return results; - } - module.exports = split; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/toLookup.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/toLookup.js deleted file mode 100644 index ce4c55dd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/toLookup.js +++ /dev/null @@ -1,28 +0,0 @@ -var isFunction = require('../lang/isFunction'); - - /** - * Creates an object that holds a lookup for the objects in the array. - */ - function toLookup(arr, key) { - var result = {}; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length, value; - if (isFunction(key)) { - while (++i < len) { - value = arr[i]; - result[key(value)] = value; - } - } else { - while (++i < len) { - value = arr[i]; - result[value[key]] = value; - } - } - - return result; - } - module.exports = toLookup; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/union.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/union.js deleted file mode 100644 index f1334a91..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/union.js +++ /dev/null @@ -1,19 +0,0 @@ -var unique = require('./unique'); -var append = require('./append'); - - /** - * Concat multiple arrays and remove duplicates - */ - function union(arrs) { - var results = []; - var i = -1, len = arguments.length; - while (++i < len) { - append(results, arguments[i]); - } - - return unique(results); - } - - module.exports = union; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/unique.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/unique.js deleted file mode 100644 index 0192b2df..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/unique.js +++ /dev/null @@ -1,17 +0,0 @@ -var indexOf = require('./indexOf'); -var filter = require('./filter'); - - /** - * @return {array} Array of unique items - */ - function unique(arr){ - return filter(arr, isUnique); - } - - function isUnique(item, i, arr){ - return indexOf(arr, item, i+1) === -1; - } - - module.exports = unique; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/xor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/xor.js deleted file mode 100644 index c125a996..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/xor.js +++ /dev/null @@ -1,26 +0,0 @@ -var unique = require('./unique'); -var filter = require('./filter'); -var contains = require('./contains'); - - - /** - * Exclusive OR. Returns items that are present in a single array. - * - like ptyhon's `symmetric_difference` - */ - function xor(arr1, arr2) { - arr1 = unique(arr1); - arr2 = unique(arr2); - - var a1 = filter(arr1, function(item){ - return !contains(arr2, item); - }), - a2 = filter(arr2, function(item){ - return !contains(arr1, item); - }); - - return a1.concat(a2); - } - - module.exports = xor; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/zip.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/zip.js deleted file mode 100644 index 931eb818..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/array/zip.js +++ /dev/null @@ -1,29 +0,0 @@ -var max = require('./max'); -var pluck = require('./pluck'); -var map = require('./map'); - - function getLength(arr) { - return arr == null ? 0 : arr.length; - } - - /** - * Merges together the values of each of the arrays with the values at the - * corresponding position. - */ - function zip(arr){ - var len = arr ? max(map(arguments, getLength)) : 0, - results = [], - i = -1, - item; - while (++i < len) { - results.push(map(arguments, function(item) { - return item == null ? undefined : item[i]; - })); - } - - return results; - } - - module.exports = zip; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection.js deleted file mode 100644 index d5cf6cad..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection.js +++ /dev/null @@ -1,22 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'contains' : require('./collection/contains'), - 'every' : require('./collection/every'), - 'filter' : require('./collection/filter'), - 'find' : require('./collection/find'), - 'forEach' : require('./collection/forEach'), - 'make_' : require('./collection/make_'), - 'map' : require('./collection/map'), - 'max' : require('./collection/max'), - 'min' : require('./collection/min'), - 'pluck' : require('./collection/pluck'), - 'reduce' : require('./collection/reduce'), - 'reject' : require('./collection/reject'), - 'size' : require('./collection/size'), - 'some' : require('./collection/some') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/contains.js deleted file mode 100644 index a73f994b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/contains.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrContains = require('../array/contains'); -var objContains = require('../object/contains'); - - /** - */ - module.exports = make(arrContains, objContains); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/every.js deleted file mode 100644 index 300e03c5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/every.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrEvery = require('../array/every'); -var objEvery = require('../object/every'); - - /** - */ - module.exports = make(arrEvery, objEvery); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/filter.js deleted file mode 100644 index 38757005..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/filter.js +++ /dev/null @@ -1,23 +0,0 @@ -var forEach = require('./forEach'); -var makeIterator = require('../function/makeIterator_'); - - /** - * filter collection values, returns array. - */ - function filter(list, iterator, thisObj) { - iterator = makeIterator(iterator, thisObj); - var results = []; - if (!list) { - return results; - } - forEach(list, function(value, index, list) { - if (iterator(value, index, list)) { - results[results.length] = value; - } - }); - return results; - } - - module.exports = filter; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/find.js deleted file mode 100644 index 14317e64..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/find.js +++ /dev/null @@ -1,10 +0,0 @@ -var make = require('./make_'); -var arrFind = require('../array/find'); -var objFind = require('../object/find'); - - /** - * Find value that returns true on iterator check. - */ - module.exports = make(arrFind, objFind); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/forEach.js deleted file mode 100644 index 6e28dcb1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/forEach.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrForEach = require('../array/forEach'); -var objForEach = require('../object/forOwn'); - - /** - */ - module.exports = make(arrForEach, objForEach); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/make_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/make_.js deleted file mode 100644 index 029d27bf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/make_.js +++ /dev/null @@ -1,19 +0,0 @@ - - - /** - * internal method used to create other collection modules. - */ - function makeCollectionMethod(arrMethod, objMethod, defaultReturn) { - return function(){ - var args = Array.prototype.slice.call(arguments); - if (args[0] == null) { - return defaultReturn; - } - // array-like is treated as array - return (typeof args[0].length === 'number')? arrMethod.apply(null, args) : objMethod.apply(null, args); - }; - } - - module.exports = makeCollectionMethod; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/map.js deleted file mode 100644 index fc157f53..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/map.js +++ /dev/null @@ -1,23 +0,0 @@ -var isObject = require('../lang/isObject'); -var values = require('../object/values'); -var arrMap = require('../array/map'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Map collection values, returns Array. - */ - function map(list, callback, thisObj) { - callback = makeIterator(callback, thisObj); - // list.length to check array-like object, if not array-like - // we simply map all the object values - if( isObject(list) && list.length == null ){ - list = values(list); - } - return arrMap(list, function (val, key, list) { - return callback(val, key, list); - }); - } - - module.exports = map; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/max.js deleted file mode 100644 index a8490e7e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/max.js +++ /dev/null @@ -1,10 +0,0 @@ -var make = require('./make_'); -var arrMax = require('../array/max'); -var objMax = require('../object/max'); - - /** - * Get maximum value inside collection - */ - module.exports = make(arrMax, objMax); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/min.js deleted file mode 100644 index 51d9f148..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/min.js +++ /dev/null @@ -1,10 +0,0 @@ -var make = require('./make_'); -var arrMin = require('../array/min'); -var objMin = require('../object/min'); - - /** - * Get minimum value inside collection. - */ - module.exports = make(arrMin, objMin); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/pluck.js deleted file mode 100644 index 9b283776..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/pluck.js +++ /dev/null @@ -1,14 +0,0 @@ -var map = require('./map'); - - /** - * Extract a list of property values. - */ - function pluck(list, key) { - return map(list, function(value) { - return value[key]; - }); - } - - module.exports = pluck; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/reduce.js deleted file mode 100644 index 4c075735..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/reduce.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrReduce = require('../array/reduce'); -var objReduce = require('../object/reduce'); - - /** - */ - module.exports = make(arrReduce, objReduce); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/reject.js deleted file mode 100644 index 2a92e3b3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/reject.js +++ /dev/null @@ -1,16 +0,0 @@ -var filter = require('./filter'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Inverse or collection/filter - */ - function reject(list, iterator, thisObj) { - iterator = makeIterator(iterator, thisObj); - return filter(list, function(value, index, list) { - return !iterator(value, index, list); - }, thisObj); - } - - module.exports = reject; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/size.js deleted file mode 100644 index 244e33e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/size.js +++ /dev/null @@ -1,19 +0,0 @@ -var isArray = require('../lang/isArray'); -var objSize = require('../object/size'); - - /** - * Get collection size - */ - function size(list) { - if (!list) { - return 0; - } - if (isArray(list)) { - return list.length; - } - return objSize(list); - } - - module.exports = size; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/some.js deleted file mode 100644 index 48fd252e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/collection/some.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrSome = require('../array/some'); -var objSome = require('../object/some'); - - /** - */ - module.exports = make(arrSome, objSome); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date.js deleted file mode 100644 index 1cde1a95..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date.js +++ /dev/null @@ -1,21 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'dayOfTheYear' : require('./date/dayOfTheYear'), - 'diff' : require('./date/diff'), - 'i18n_' : require('./date/i18n_'), - 'isLeapYear' : require('./date/isLeapYear'), - 'isSame' : require('./date/isSame'), - 'parseIso' : require('./date/parseIso'), - 'startOf' : require('./date/startOf'), - 'strftime' : require('./date/strftime'), - 'timezoneAbbr' : require('./date/timezoneAbbr'), - 'timezoneOffset' : require('./date/timezoneOffset'), - 'totalDaysInMonth' : require('./date/totalDaysInMonth'), - 'totalDaysInYear' : require('./date/totalDaysInYear'), - 'weekOfTheYear' : require('./date/weekOfTheYear') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/dayOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/dayOfTheYear.js deleted file mode 100644 index 85905c5a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/dayOfTheYear.js +++ /dev/null @@ -1,13 +0,0 @@ -var isDate = require('../lang/isDate'); - - /** - * return the day of the year (1..366) - */ - function dayOfTheYear(date){ - return (Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) - - Date.UTC(date.getFullYear(), 0, 1)) / 86400000 + 1; - } - - module.exports = dayOfTheYear; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/diff.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/diff.js deleted file mode 100644 index 1131cdcb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/diff.js +++ /dev/null @@ -1,130 +0,0 @@ -var totalDaysInMonth = require('./totalDaysInMonth'); -var totalDaysInYear = require('./totalDaysInYear'); -var convert = require('../time/convert'); - - /** - * calculate the difference between dates (range) - */ - function diff(start, end, unitName){ - // sort the dates to make it easier to process (specially year/month) - if (start > end) { - var swap = start; - start = end; - end = swap; - } - - var output; - - if (unitName === 'month') { - output = getMonthsDiff(start, end); - } else if (unitName === 'year'){ - output = getYearsDiff(start, end); - } else if (unitName != null) { - if (unitName === 'day') { - // ignore timezone difference because of daylight savings time - start = toUtc(start); - end = toUtc(end); - } - output = convert(end - start, 'ms', unitName); - } else { - output = end - start; - } - - return output; - } - - - function toUtc(d){ - // we ignore timezone differences on purpose because of daylight - // savings time, otherwise it would return fractional days/weeks even - // if a full day elapsed. eg: - // Wed Feb 12 2014 00:00:00 GMT-0200 (BRST) - // Sun Feb 16 2014 00:00:00 GMT-0300 (BRT) - // diff should be 4 days and not 4.041666666666667 - return Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), - d.getHours(), d.getMinutes(), d.getSeconds(), - d.getMilliseconds()); - } - - - function getMonthsDiff(start, end){ - return getElapsedMonths(start, end) + - getElapsedYears(start, end) * 12 + - getFractionalMonth(start, end); - } - - - function getYearsDiff(start, end){ - var elapsedYears = getElapsedYears(start, end); - return elapsedYears + getFractionalYear(start, end, elapsedYears); - } - - - function getElapsedMonths(start, end){ - var monthDiff = end.getMonth() - start.getMonth(); - if (monthDiff < 0) { - monthDiff += 12; - } - // less than a full month - if (start.getDate() > end.getDate()) { - monthDiff -= 1; - } - return monthDiff; - } - - - function getElapsedYears(start, end){ - var yearDiff = end.getFullYear() - start.getFullYear(); - // less than a full year - if (start.getMonth() > end.getMonth()) { - yearDiff -= 1; - } - return yearDiff; - } - - - function getFractionalMonth(start, end){ - var fractionalDiff = 0; - var startDay = start.getDate(); - var endDay = end.getDate(); - - if (startDay !== endDay) { - var startTotalDays = totalDaysInMonth(start); - var endTotalDays = totalDaysInMonth(end); - var totalDays; - var daysElapsed; - - if (startDay > endDay) { - // eg: Jan 29 - Feb 27 (29 days elapsed but not a full month) - var baseDay = startTotalDays - startDay; - daysElapsed = endDay + baseDay; - // total days should be relative to 1st day of next month if - // startDay > endTotalDays - totalDays = (startDay > endTotalDays)? - endTotalDays + baseDay + 1 : startDay + baseDay; - } else { - // fractional is only based on endMonth eg: Jan 12 - Feb 18 - // (6 fractional days, 28 days until next full month) - daysElapsed = endDay - startDay; - totalDays = endTotalDays; - } - - fractionalDiff = daysElapsed / totalDays; - } - - return fractionalDiff; - } - - - function getFractionalYear(start, end, elapsedYears){ - var base = elapsedYears? - new Date(end.getFullYear(), start.getMonth(), start.getDate()) : - start; - var elapsedDays = diff(base, end, 'day'); - return elapsedDays / totalDaysInYear(end); - } - - - module.exports = diff; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/i18n/en-US.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/i18n/en-US.js deleted file mode 100644 index f9526ce4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/i18n/en-US.js +++ /dev/null @@ -1,61 +0,0 @@ - - // en-US (English, United States) - module.exports = { - "am" : "AM", - "pm" : "PM", - - "x": "%m/%d/%y", - "X": "%H:%M:%S", - "c": "%a %d %b %Y %I:%M:%S %p %Z", - - "months" : [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" - ], - - "months_abbr" : [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" - ], - - "days" : [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" - ], - - "days_abbr" : [ - "Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat" - ] - }; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/i18n/pt-BR.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/i18n/pt-BR.js deleted file mode 100644 index 71ebadb5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/i18n/pt-BR.js +++ /dev/null @@ -1,61 +0,0 @@ - - // pt-BR (Brazillian Portuguese) - module.exports = { - "am" : "", - "pm" : "", - - "x": "%d/%m/%y", - "X": "%H:%M:%S", - "c": "%a %d %b %Y %H:%M:%S %Z", - - "months" : [ - "Janeiro", - "Fevereiro", - "Março", - "Abril", - "Maio", - "Junho", - "Julho", - "Agosto", - "Setembro", - "Outubro", - "Novembro", - "Dezembro" - ], - - "months_abbr" : [ - "Jan", - "Fev", - "Mar", - "Abr", - "Mai", - "Jun", - "Jul", - "Ago", - "Set", - "Out", - "Nov", - "Dez" - ], - - "days" : [ - "Domingo", - "Segunda", - "Terça", - "Quarta", - "Quinta", - "Sexta", - "Sábado" - ], - - "days_abbr" : [ - "Dom", - "Seg", - "Ter", - "Qua", - "Qui", - "Sex", - "Sáb" - ] - }; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/i18n_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/i18n_.js deleted file mode 100644 index 723fc103..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/i18n_.js +++ /dev/null @@ -1,14 +0,0 @@ -var mixIn = require('../object/mixIn'); -var enUS = require('./i18n/en-US'); - - // we also use mixIn to make sure we don't affect the original locale - var activeLocale = mixIn({}, enUS, { - // we expose a "set" method to allow overriding the global locale - set : function(localeData){ - mixIn(activeLocale, localeData); - } - }); - - module.exports = activeLocale; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/isLeapYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/isLeapYear.js deleted file mode 100644 index 4212870b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/isLeapYear.js +++ /dev/null @@ -1,15 +0,0 @@ -var isDate = require('../lang/isDate'); - - /** - * checks if it's a leap year - */ - function isLeapYear(fullYear){ - if (isDate(fullYear)) { - fullYear = fullYear.getFullYear(); - } - return fullYear % 400 === 0 || (fullYear % 100 !== 0 && fullYear % 4 === 0); - } - - module.exports = isLeapYear; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/isSame.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/isSame.js deleted file mode 100644 index 4097d29b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/isSame.js +++ /dev/null @@ -1,16 +0,0 @@ -var startOf = require('./startOf'); - - /** - * Check if date is "same" with optional period - */ - function isSame(date1, date2, period){ - if (period) { - date1 = startOf(date1, period); - date2 = startOf(date2, period); - } - return Number(date1) === Number(date2); - } - - module.exports = isSame; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/parseIso.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/parseIso.js deleted file mode 100644 index 8ea2b171..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/parseIso.js +++ /dev/null @@ -1,146 +0,0 @@ -var some = require('../array/some'); - - var datePatterns = [ - /^([0-9]{4})$/, // YYYY - /^([0-9]{4})-([0-9]{2})$/, // YYYY-MM (YYYYMM not allowed) - /^([0-9]{4})-?([0-9]{2})-?([0-9]{2})$/ // YYYY-MM-DD or YYYYMMDD - ]; - var ORD_DATE = /^([0-9]{4})-?([0-9]{3})$/; // YYYY-DDD - - var timePatterns = [ - /^([0-9]{2}(?:\.[0-9]*)?)$/, // HH.hh - /^([0-9]{2}):?([0-9]{2}(?:\.[0-9]*)?)$/, // HH:MM.mm - /^([0-9]{2}):?([0-9]{2}):?([0-9]{2}(\.[0-9]*)?)$/ // HH:MM:SS.ss - ]; - - var DATE_TIME = /^(.+)T(.+)$/; - var TIME_ZONE = /^(.+)([+\-])([0-9]{2}):?([0-9]{2})$/; - - function matchAll(str, patterns) { - var match; - var found = some(patterns, function(pattern) { - return !!(match = pattern.exec(str)); - }); - - return found ? match : null; - } - - function getDate(year, month, day) { - var date = new Date(Date.UTC(year, month, day)); - - // Explicitly set year to avoid Date.UTC making dates < 100 relative to - // 1900 - date.setUTCFullYear(year); - - var valid = - date.getUTCFullYear() === year && - date.getUTCMonth() === month && - date.getUTCDate() === day; - return valid ? +date : NaN; - } - - function parseOrdinalDate(str) { - var match = ORD_DATE.exec(str); - if (match ) { - var year = +match[1], - day = +match[2], - date = new Date(Date.UTC(year, 0, day)); - - if (date.getUTCFullYear() === year) { - return +date; - } - } - - return NaN; - } - - function parseDate(str) { - var match, year, month, day; - - var match = matchAll(str, datePatterns); - if (match === null) { - // Ordinal dates are verified differently. - return parseOrdinalDate(str); - } - - year = (match[1] === void 0) ? 0 : +match[1]; - month = (match[2] === void 0) ? 0 : +match[2] - 1; - day = (match[3] === void 0) ? 1 : +match[3]; - - return getDate(year, month, day); - } - - function getTime(hr, min, sec) { - var valid = - (hr < 24 && hr >= 0 && - min < 60 && min >= 0 && - sec < 60 && min >= 0) || - (hr === 24 && min === 0 && sec === 0); - if (!valid) { - return NaN; - } - - return ((hr * 60 + min) * 60 + sec) * 1000; - } - - function parseOffset(str) { - var match; - if (str.charAt(str.length - 1) === 'Z') { - str = str.substring(0, str.length - 1); - } else if ((match = TIME_ZONE.exec(str))) { - var match = TIME_ZONE.exec(str); - if (match) { - var hours = +match[3], - minutes = (match[4] === void 0) ? 0 : +match[4], - offset = getTime(hours, minutes, 0); - - if (match[2] === '-') { - offset *= -1; - } - - return { offset: offset, time: match[1] }; - } - } - - // No time zone specified, assume UTC - return { offset: 0, time: str }; - } - - function parseTime(str) { - var match; - var offset = parseOffset(str); - - str = offset.time; - offset = offset.offset; - if (isNaN(offset)) { - return NaN; - } - - match = matchAll(str, timePatterns); - if (match === null) { - return NaN; - } - - var hours = (match[1] === void 0) ? 0 : +match[1], - minutes = (match[2] === void 0) ? 0 : +match[2], - seconds = (match[3] === void 0) ? 0 : +match[3]; - - return getTime(hours, minutes, seconds) - offset; - } - - /** - * Parse an ISO8601 formatted date string, and return a Date object. - */ - function parseISO8601(str){ - var match = DATE_TIME.exec(str); - if (!match) { - // No time specified - return parseDate(str); - } - - return parseDate(match[1]) + parseTime(match[2]); - } - - module.exports = parseISO8601; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/startOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/startOf.js deleted file mode 100644 index 072bc0ef..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/startOf.js +++ /dev/null @@ -1,54 +0,0 @@ -var clone = require('../lang/clone'); - - /** - * get a new Date object representing start of period - */ - function startOf(date, period){ - date = clone(date); - - // intentionally removed "break" from switch since start of - // month/year/etc should also reset the following periods - switch (period) { - case 'year': - date.setMonth(0); - /* falls through */ - case 'month': - date.setDate(1); - /* falls through */ - case 'week': - case 'day': - date.setHours(0); - /* falls through */ - case 'hour': - date.setMinutes(0); - /* falls through */ - case 'minute': - date.setSeconds(0); - /* falls through */ - case 'second': - date.setMilliseconds(0); - break; - default: - throw new Error('"'+ period +'" is not a valid period'); - } - - // week is the only case that should reset the weekDay and maybe even - // overflow to previous month - if (period === 'week') { - var weekDay = date.getDay(); - var baseDate = date.getDate(); - if (weekDay) { - if (weekDay >= baseDate) { - //start of the week is on previous month - date.setDate(0); - } - date.setDate(date.getDate() - date.getDay()); - } - } - - return date; - } - - module.exports = startOf; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/strftime.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/strftime.js deleted file mode 100644 index f033d10f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/strftime.js +++ /dev/null @@ -1,118 +0,0 @@ -var pad = require('../number/pad'); -var i18n = require('./i18n_'); -var dayOfTheYear = require('./dayOfTheYear'); -var timezoneOffset = require('./timezoneOffset'); -var timezoneAbbr = require('./timezoneAbbr'); -var weekOfTheYear = require('./weekOfTheYear'); - - var _combinations = { - 'D': '%m/%d/%y', - 'F': '%Y-%m-%d', - 'r': '%I:%M:%S %p', - 'R': '%H:%M', - 'T': '%H:%M:%S', - 'x': 'locale', - 'X': 'locale', - 'c': 'locale' - }; - - - /** - * format date based on strftime format - */ - function strftime(date, format, localeData){ - localeData = localeData || i18n; - var reToken = /%([a-z%])/gi; - - function makeIterator(fn) { - return function(match, token){ - return fn(date, token, localeData); - }; - } - - return format - .replace(reToken, makeIterator(expandCombinations)) - .replace(reToken, makeIterator(convertToken)); - } - - - function expandCombinations(date, token, l10n){ - if (token in _combinations) { - var expanded = _combinations[token]; - return expanded === 'locale'? l10n[token] : expanded; - } else { - return '%'+ token; - } - } - - - function convertToken(date, token, l10n){ - switch (token){ - case 'a': - return l10n.days_abbr[date.getDay()]; - case 'A': - return l10n.days[date.getDay()]; - case 'h': - case 'b': - return l10n.months_abbr[date.getMonth()]; - case 'B': - return l10n.months[date.getMonth()]; - case 'C': - return pad(Math.floor(date.getFullYear() / 100), 2); - case 'd': - return pad(date.getDate(), 2); - case 'e': - return pad(date.getDate(), 2, ' '); - case 'H': - return pad(date.getHours(), 2); - case 'I': - return pad(date.getHours() % 12, 2); - case 'j': - return pad(dayOfTheYear(date), 3); - case 'L': - return pad(date.getMilliseconds(), 3); - case 'm': - return pad(date.getMonth() + 1, 2); - case 'M': - return pad(date.getMinutes(), 2); - case 'n': - return '\n'; - case 'p': - return date.getHours() >= 12? l10n.pm : l10n.am; - case 'P': - return convertToken(date, 'p', l10n).toLowerCase(); - case 's': - return date.getTime() / 1000; - case 'S': - return pad(date.getSeconds(), 2); - case 't': - return '\t'; - case 'u': - var day = date.getDay(); - return day === 0? 7 : day; - case 'U': - return pad(weekOfTheYear(date), 2); - case 'w': - return date.getDay(); - case 'W': - return pad(weekOfTheYear(date, 1), 2); - case 'y': - return pad(date.getFullYear() % 100, 2); - case 'Y': - return pad(date.getFullYear(), 4); - case 'z': - return timezoneOffset(date); - case 'Z': - return timezoneAbbr(date); - case '%': - return '%'; - default: - // keep unrecognized tokens - return '%'+ token; - } - } - - - module.exports = strftime; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/timezoneAbbr.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/timezoneAbbr.js deleted file mode 100644 index b1006875..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/timezoneAbbr.js +++ /dev/null @@ -1,17 +0,0 @@ -var timezoneOffset = require('./timezoneOffset'); - - /** - * Abbreviated time zone name or similar information. - */ - function timezoneAbbr(date){ - // Date.toString gives different results depending on the - // browser/system so we fallback to timezone offset - // chrome: 'Mon Apr 08 2013 09:02:04 GMT-0300 (BRT)' - // IE: 'Mon Apr 8 09:02:04 UTC-0300 2013' - var tz = /\(([A-Z]{3,4})\)/.exec(date.toString()); - return tz? tz[1] : timezoneOffset(date); - } - - module.exports = timezoneAbbr; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/timezoneOffset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/timezoneOffset.js deleted file mode 100644 index 9492dceb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/timezoneOffset.js +++ /dev/null @@ -1,16 +0,0 @@ -var pad = require('../number/pad'); - - /** - * time zone as hour and minute offset from UTC (e.g. +0900) - */ - function timezoneOffset(date){ - var offset = date.getTimezoneOffset(); - var abs = Math.abs(offset); - var h = pad(Math.floor(abs / 60), 2); - var m = pad(abs % 60, 2); - return (offset > 0? '-' : '+') + h + m; - } - - module.exports = timezoneOffset; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInMonth.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInMonth.js deleted file mode 100644 index 8aafeb84..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInMonth.js +++ /dev/null @@ -1,25 +0,0 @@ -var isDate = require('../lang/isDate'); -var isLeapYear = require('./isLeapYear'); - - var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; - - /** - * returns the total amount of days in the month (considering leap years) - */ - function totalDaysInMonth(fullYear, monthIndex){ - if (isDate(fullYear)) { - var date = fullYear; - year = date.getFullYear(); - monthIndex = date.getMonth(); - } - - if (monthIndex === 1 && isLeapYear(fullYear)) { - return 29; - } else { - return DAYS_IN_MONTH[monthIndex]; - } - } - - module.exports = totalDaysInMonth; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInYear.js deleted file mode 100644 index b4b7e9b7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInYear.js +++ /dev/null @@ -1,13 +0,0 @@ -var isLeapYear = require('./isLeapYear'); - - /** - * return the amount of days in the year following the gregorian calendar - * and leap years - */ - function totalDaysInYear(fullYear){ - return isLeapYear(fullYear)? 366 : 365; - } - - module.exports = totalDaysInYear; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/weekOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/weekOfTheYear.js deleted file mode 100644 index dd51b7f1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/date/weekOfTheYear.js +++ /dev/null @@ -1,16 +0,0 @@ -var dayOfTheYear = require('./dayOfTheYear'); - - /** - * Return the week of the year based on given firstDayOfWeek - */ - function weekOfTheYear(date, firstDayOfWeek){ - firstDayOfWeek = firstDayOfWeek == null? 0 : firstDayOfWeek; - var doy = dayOfTheYear(date); - var dow = (7 + date.getDay() - firstDayOfWeek) % 7; - var relativeWeekDay = 6 - firstDayOfWeek - dow; - return Math.floor((doy + relativeWeekDay) / 7); - } - - module.exports = weekOfTheYear; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/array.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/array.md deleted file mode 100644 index 1f390fbc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/array.md +++ /dev/null @@ -1,773 +0,0 @@ -# array # - -Array utilities. - - - - -## append(arr1, arr2):Array - -Appends an array to the end of the other. -The first array will be modified and will contain the appended items. - -See: [`union()`](#union), [`combine()`](#combine) - -```js -var foo = ['a', 'b'], - bar = ['b', 'd']; - -append(foo, bar); // ['a', 'b', 'b', 'd'] -``` - - - -## collect(arr, callback, [thisObj]):Array - -Maps the items in `arr` and concatenates the resulting arrays. - -See: [`map()`](#map) - -```js -collect([1, 2, 3], function(val) { - return [val, val % 2]; -}); // [1, 1, 2, 0, 3, 1]; - -collect(['a', 'bb', ''], function(val) { - return val.split(''); -}); // ['a', 'b', 'b'] -``` - -It also supports a shorthand syntax: - -```js -var items = [{ a: [1] }, { b: 'foo' }, { a: [2, 3] }]; -collect(items, 'a'); // [1, 2, 3]; -``` - - - -## combine(arr1, arr2):Array - -Combines an array with all the items of another. -The first array will be modified and will contain the combined items. -Does not allow duplicates and is case and type sensitive. - -See: [`union()`](#union), [`append()`](#append) - -```js -var foo = ['a', 'b'], - bar = ['b', 'd']; - -combine(foo, bar); // ['a', 'b', 'd'] -``` - - - -## compact(arr):Array - -Returns a new Array without any `null` or `undefined` values. Note that it will -keep empty strings and other falsy values (simillar to Ruby Array#compact). - -```js -var arr = [0, 1, null, false, '', 'foo', undefined, 'bar']; -compact(arr); // [0, 1, false, '', 'foo', 'bar']; -``` - - - -## contains(arr, value):Boolean - -Checks if Array contains value. Alias to `indexOf(arr, val) !== -1`. - -```js -var arr = [1, 2, 3]; -contains(arr, 2); // true -contains(arr, 'foo'); // false -``` - - - -## difference(...arrs):Array - -Return a new Array with elements that aren't present in the other Arrays -besides the first one. - -Works like [Python set#difference](http://docs.python.org/library/stdtypes.html#set.difference). - -It will remove duplicates. - -See: [`xor()`](#xor), [`intersection()`](#intersection) - -```js -var a = ['a', 'b', 1]; -var b = ['c', 1]; -difference(a, b); // ['a', 'b'] -``` - - - -## every(arr, callback, [thisObj]):Array - -Crossbrowser `Array.every()`. - -Tests whether all elements in the array pass the test implemented by the provided function. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -```js -var items = [1, 'foo', 'bar']; -every(items, isString); // false -every(items, isFunction); // false -every(items, function(val, key, arr){ - return val != null; -}); // true -``` - -more info at [MDN Array#every](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every) - -It also supports a shorthand syntax: - -```js -var items = [{id:1, active:true}, {id:3, active:true}, {id:8, active:true}]; -// all items with `id === 8` -every(items, {id:8}); // false -// `active` is truthy on all items -every(items, 'active'); // true -``` - - - -## filter(arr, callback, [thisObj]):Array - -Crossbrowser `Array.filter()`. - -Creates a new array with all elements that pass the callback test. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -```js -var nums = [1, 2, 3, 4, 5, 6]; -var oddNumbers = filter(nums, function(val, key, arr){ - return (val % 2) !== 0; -}); -// > [1, 3, 5] -``` - -more info at [MDN Array#filter](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/filter) - -Filter also supports shorthand notation: - -```js -var users = [ - {name:'john', surname:'connor', beard:false}, - {name:'john', surname:'doe', beard:true}, - {name:'jane', surname:'doe', beard:false} -]; -// filter item that matches all properties/values pairs -filter(arr, {name:'john', beard:false}); -// > [{name:'john', surnname:'connor', beard:false}] -// items where 'beard' is a truthy value -filter(arr, 'beard'); -// > [{name:'john', surnname:'doe', beard:true}] -``` - -See [`reject()`](#reject) - - - -## find(arr, callback, [thisObj]):void - -Loops through all the items in the Array and returns the first one that passes -a truth test (callback). - -```js -var arr = [123, {a:'b'}, 'foo', 'bar']; -find(arr, isString); // "foo" -find(arr, isNumber); // 123 -find(arr, isObject); // {a:'b'} -``` - -Find also supports shorthand notation: - -```js -var users = [ - {name:'john', surname:'connor', beard:false}, - {name:'john', surname:'doe', beard:true} -]; -// first item that matches all properties/values pairs -find(arr, {name:'john'}); // {name:'john', surnname:'connor', beard:false} -// first item where 'beard' is a truthy value -find(arr, 'beard'); // {name:'john', surnname:'doe', beard:true} -``` - -See: [findIndex()](#findIndex) - - - -## findIndex(arr, iterator, [thisObj]):Number - -Loops through the items in the Array and returns the index of the first one -that passes a truth test (callback). - -Returns `-1` if no item was found that passes the truth test. - -```js -var arr = [1, { a: 1 }, 'foo', 'bar']; -findIndex(arr, isString); // 2 -findIndex(arr, isNumber); // 0 -findIndex(arr, isObject); // 1 -findIndex(arr, isRegExp); // -1 -``` - -`findIndex` also supports shorthand notation: - -```js -var pets = [ - { pet: 'dog', name: 'Sam' }, - { pet: 'dog', name: 'Maggie' } -]; - -findIndex(pets, { pet: 'dog' }); // 0 -findIndex(pets, { name: 'Maggie' }); // 1 -``` - -See: [find()](#find) - - - -## flatten(arr, [level]):Array - -Recursively flattens an array. A new array containing all the elements is -returned. If `level` is specified, it will only flatten up to that level. - -### Example - -```js -flatten([1, [2], [3, [4, 5]]]); -// > [1, 2, 3, 4, 5] -flatten([1, [2], [3, [4, 5]]], 1); -// > [1, 2, 3, [4, 5]] -``` - - - -## forEach(arr, callback, [thisObj]):void - -Crossbrowser `Array.forEach()`. - -It allows exiting the iteration early by returning `false` on the callback. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -```js -var items = ['foo', 'bar', 'lorem', 'ipsum']; -forEach(items, function(val, key, arr){ - console.log(key +' : '+ val); - if (val === 'lorem') { - // stop iteration (break) - return false; - } -}); -``` - -more info at [MDN Array#forEach](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/forEach) - - - -## indexOf(arr, item, [fromIndex]):Number - -Crossbrowser `Array.indexOf()`. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -more info at [MDN Array#indexOf](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf) - - - - -## insert(arr, ...items):Number - -Push items into array only if they aren't contained by it. Returns the new -`length` of the array. - -See: [`remove()`](#remove), [`removeAll()`](#removeAll), -[`contains()`](#contains) - -```js -var arr = ['a', 'b']; -insert(arr, 'a'); // 2 : ['a', 'b'] -insert(arr, 'c'); // 3 : ['a', 'b', 'c'] -insert(arr, 1, 2, 'b'); // 5 : ['a', 'b', 'c', 1, 2] -``` - - - -## intersection(...arrs):Array - -Return a new Array with elements common to all Arrays. - -Similar to Python set#intersection and underscore.js intersection. - -It will remove duplicates. - -See: [`difference()`](#difference), [`xor()`](#xor) - -```js -var a = ['a', 'b', 1], - b = ['c', 1], - c = [1, 2, 3]; -intersection(a, b, c); // [1] -``` - - - -## invoke(arr, methodName[, ...args]):Array - -Call `methodName` on each item of the array passing custom arguments if needed. - -```js -invoke([[3,2,1], [9,5,2]], 'sort'); // [[1,2,3], [2,5,9]] -``` - - - -## join(arr, [separator]):String - -Joins the strings in `arr`, inserting `separator` between each value. - -This ignores null values and empty strings that are in the array. `separator` -defaults to an empty string. This will convert all non-string objects in the -array to a string. - -### Example - -```js -join(['a', 'b', 'c']); // 'abc' -join(['foo', 'bar'], ', '); // 'foo, bar' -join([null, 'foo', '', 'bar', undefined], ':'); // 'foo:bar' -``` - - - -## lastIndexOf(arr, item, [fromIndex]):Number - -Crossbrowser `Array.lastIndexOf()`. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -more info at [MDN Array#lastIndexOf](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf) - - - -## map(arr, callback, [thisObj]]):Array - -Crossbrowser `Array.map()`. - -Creates a new array with the results of calling a provided function on every -element in this array. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -See: [`collect()`](#collect) - -```js -var nums = [1,2,3,4]; -var double = map(nums, function(val, key, arr){ - return val * 2; -}); -// > [2, 4, 6, 8] -``` - -more info at [MDN Array#map](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/map) - -It also supports a shorthand notation which can be used to achieve same result -as [`array/pluck`](#pluck): - -```js -var src = ['lorem', 'ipsum', 'foo', 'amet']; -// grab the "length" property of all items -var lengths = map(src, 'length'); // [5, 5, 3, 4] -``` - - - -## max(arr, [iterator], [thisObj]):* - -Returns maximum value inside array or use a custom iterator to define how items -should be compared. - -See: [`min()`](#min) - -```js -max([10, 2, 7]); // 10 -max(['foo', 'lorem', 'amet'], function(val){ - return val.length; -}); // 'lorem' -``` - -It also supports a shorthand notation: - -```js -max(['foo', 'lorem', 'amet'], 'length'); // "lorem" -``` - - - -## min(arr, [iterator], [thisObj]):* - -Returns minimum value inside array or use a custom iterator to define how items -should be compared. - -See: [`max()`](#max) - -```js -min([10, 2, 7]); // 2 -min(['foo', 'lorem', 'amet'], function(val){ - return val.length; -}); // 'foo' -``` - -It also supports a shorthand notation: - -```js -min(['foo', 'lorem', 'amet'], 'length'); // "foo" -``` - - - -## pick(arr):* - -Gets a random item and remove it from the array. - -### Example: - - var arr = [1, 2, 3, 4, 5, 6]; - var item_1 = pick(arr); // 4 - var item_2 = pick(arr); // 1 - console.log(arr); // [2, 3, 5, 6] - - - -## pluck(arr, propName):Array - -Extract a list of property values. - -See: [`function/prop()`](function.html#prop) - -```js -var users = [{name : 'John', age: 21}, {name: 'Jane', age : 27}]; -var names = pluck(users, 'name'); // ["John", "Jane"] -var ages = pluck(users, 'age'); // [21, 27] -``` - - - -## range([start], stop[, step]):Array - -Creates a new Array with all the values inside the range. Works similarly to -Python#range or PHP#range. - -### Arguments - - 1. `[start]` (Number) : Range start. Default is `0`. - 2. `stop` (Number) : Range limit. - 3. `[step]` (Number) : Step size. Default is `1`. - -### Example - -```js -range(5); // [0, 1, 2, 3, 4, 5] -range(0, 5); // [0, 1, 2, 3, 4, 5] -range(0, 5, 2); // [0, 2, 4] -range(20, 40, 5); // [20, 25, 30, 35, 40] -``` - - - -## reduce(arr, fn):* - -Crossbrowser `Array.reduce()`. - -Apply a function against an accumulator and each value of the array (from -left-to-right) as to reduce it to a single value. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -more info at [MDN Array#reduce](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduce) - - - -## reduceRight(arr, fn):* - -Crossbrowser `Array.reduceRight()`. - -Apply a function simultaneously against two values of the array (from -right-to-left) as to reduce it to a single value. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -more info at [MDN Array#reduceRight](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduceRight) - - - -## reject(arr, fn, thisObj):Array - -Creates a new array with all the elements that do **not** pass the truth test. -Opposite of [`filter()`](#filter). - -See [`filter()`](#filter) - -### Example - -```js -var numbers = [1, 2, 3, 4, 5, 6]; -reject(numbers, function(x) { return (x % 2) !== 0; }); // [2, 4, 6] -``` - -It also supports a shorthand syntax: - -```js -var users = [ - {name:'john', surname:'connor', beard:false}, - {name:'john', surname:'doe', beard:true}, - {name:'jane', surname:'doe', beard:false} -]; -// reject items that matches all properties/values pairs -reject(arr, {name:'john'}); -// > [{name:'jane', surnname:'doe', beard:false}] -// reject items where 'beard' is a truthy value -filter(arr, 'beard'); -// > [{name:'john', surnname:'connor', beard:false}, -// {name:'jane', surname:'doe', beard:false}] -``` - - - -## remove(arr, item):void - -Remove a single item from the array. - -IMPORTANT: it won't remove duplicates, just a single item. - -### Example - -```js -var foo = [1, 2, 3, 4]; -remove(foo, 2); -console.log(foo); // [1, 3, 4] -``` - - - -## removeAll(arr, item):void - -Remove all instances of an item from the array. - -### Example - -```js -var foo = [1, 2, 3, 4, 2, 2]; -removeAll(foo, 2); -console.log(foo); // [1, 3, 4]; -``` - - - -## shuffle(arr):Array - -Returns a new Array with items randomly sorted (shuffled). Similar to Ruby Array#shuffle. - -### Example - -```js -var arr = ['a', 'b', 'c', 'd', 'e']; -shuffle(arr); // ['b', 'd', 'e', 'c', 'a'] -``` - - - -## some(arr, callback, [thisObj]):Array - -Crossbrowser `Array.some()`. - -Tests whether some element in the array passes the test implemented by the provided function. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -```js -var items = [1, 'foo', 'bar']; -some(items, isString); // true -some(items, isFunction); // false -``` - -more info at [MDN Array#some](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some) - -It also supports a shorthand syntax: - -```js -var items = [{id:1, active:true}, {id:3, active:false}, {id:8, active:false}]; -// at least one item with `id === 8` -some(items, {id:8}); // true -// `active` is truthy on at least one item -some(items, 'active'); // true -``` - -see also: [`object/matches`](object.html#matches) - - - -## sort(arr, [compareFn]):Array - -Returns a sorted Array using the [Merge Sort](http://en.wikipedia.org/wiki/Merge_sort) algorithm (stable sort). - -The `Array.prototype.sort` browser implementations differ since the sorting algorithm isn't described in the ES spec - [in V8 it isn't stable](http://code.google.com/p/v8/issues/detail?id=90) and [on Firefox it is stable](https://bugzilla.mozilla.org/show_bug.cgi?id=224128) - so this function doesn't use the browser native implementation and is recommended in cases where a stable sort is required (items should preserve same order if already sorted). - -**Important:** It does logical comparisson by default (greater/less than) and -not a string comparisson like the native `Array#sort`. - -### compareFn - -If `compareFn` is supplied elements are sorted based on the value returned by -the `compareFn`. - - - If `compareFn(a, b)` is less than `0`, sort `a` to a lower index than `b`. - - If `compareFn(a, b)` returns `0`, leave `a` and `b` unchanged with respect - to each other, but sorted with respect to all different elements. - - If `compareFn(a, b)` is greater than `0`, sort `b` to a lower index than - `a`. - -### Example - -```js -sort([187, 23, 47, 987, 12, 59, 0]); // [0, 12, 23, 47, 59, 187, 987] -sort(['a', 'z', 'c', 'beta', 'b']); // ['a', 'b', 'beta', 'c', 'z'] - -// ['sit', 'amet', 'lorem', 'ipsum'] -sort(['lorem', 'ipsum', 'sit', 'amet'], function(a, b){ - // sort by length, items with same length - // will keep the relative order (stable) - return a.length - b.length; -}); - -// [4, 3, 2, 1] -sort([2, 3, 1, 4], function(a, b){ - // reverse sort - return b - a; -}); -``` - - - -## split(arr, [segments]):Array - -Splits an array into a fixed number of segments. - -The number of segments is specified by `segments` and defaults to 2. If the -array cannot be evenly split, the first segments will contain the extra items. -If `arr` is empty, an empty array is returned. If `arr.length` is less than -`segments`, then the resulting array will have `arr.length` number of -single-element arrays. - -### Example -```js -split([1, 2, 3, 4, 5], 3) // [ [1, 2], [3, 4], [5] ] -split([1, 2, 3, 4, 5]) // [ [1, 2, 3], [4, 5] ] -split([]) // [] -split([1, 2], 3) // [ [1], [2] ] -``` - - - -## toLookup(arr, key):Object - -Create an object that indexes the items in the array by a key. If `key` is a function, the key for each value in the resulting object will be the result of calling the function with the value as an argument. Otherwise `key` specifies the property on each value to use as the key. - -### Example - -```js -var foo = [{ name: 'a', thing: 1 }, { name: 'b', thing: 2 }]; -// { a: { name: 'a', thing: 1 }, b: { name: 'b', thing: 2 } } -toLookup(foo, 'name'); -// same as above -toLookup(foo, function (value) { return value.name; }); -``` - - - -## union(...arrs):Array - -Concat multiple arrays removing duplicates. - -```js -var a = ['a', 'b'], - b = ['c', 'a'], - c = [1, 'b', 2, 3, 'a']; - -//note that unique remove from begin to end -union(a, b, c); // ['c', 1, 'b', 2, 3, 'a'] -``` - - - -## unique(arr):Array - -Return a new Array of unique items. - -### Example - -```js -var foo = [1, 2, 3, 4, 2, 2, 3, 4]; -var bar = unique(foo); -console.log(foo); // [1, 2, 3, 4]; -``` - - - -## xor(arr1, arr2):Array - -Exclusive OR. Returns items that are present in a single array. - -Works like [Python set#symmetric_difference](http://docs.python.org/library/stdtypes.html#set.symmetric_difference) renamed for brevity. - -It will remove duplicates. - -See: [`difference()`](#difference), [`intersection()`](#intersection) - -```js -var a = ['a', 'b', 1]; -var b = ['c', 1]; -xor(a, b); // ['a', 'b', 'c'] -``` - - - -## zip(...arrs):Array - -Groups the elements of each array at their corresponding indexes. - -Useful for separate data sources that are coordinated through matching array -indexes. For a matrix of nested arrays, `zip.apply(...)` can transpose the -matrix in a similar fashion. - -```js -// [['moe', 30, true], ['larry', 40, false], ['curly', 50, false]] -zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]); -``` - - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/collection.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/collection.md deleted file mode 100644 index 2ffcab10..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/collection.md +++ /dev/null @@ -1,233 +0,0 @@ -# collection # - -Methods for dealing with collections (Array or Objects). - - - -## contains(list, value):Boolean - -Checks if collection contains value. - -```js -contains({a: 1, b: 2, c: 'bar'}, 2); // true -contains([1, 2, 3], 'foo'); // false -``` - -See: [array/contains](array.html#contains), [object/contains](object.html#contains) - - - -## every(list, callback, [thisObj]):Boolean - -Tests whether all values in the collection pass the test implemented by the -provided callback. - -```js -var obj = { - a: 1, - b: 2, - c: 3, - d: 'string' -}; - -every(obj, isNumber); // false -``` - -See: [array/every](array.html#every), [object/every](object.html#every) - - - -## filter(list, callback, [thisObj]):Array - -Filter collection properties. - -See: [array/filter](array.html#filter), [object/filter](object.html#filter) - - - -## find(list, callback, [thisObj]):* - -Loops through all the values in the collection and returns the first one that -passes a truth test (callback). - -**Important:** loop order over objects properties isn't guaranteed to be the -same on all environments. - -```js -find({a: 'foo', b: 12}, isString); // 'foo' -find(['foo', 12], isNumber); // 12 -``` - -See: [array/find](array.html#find), [object/find](object.html#find) - - - -## forEach(list, callback, [thisObj]) - -Loop through all values of the collection. - -See: [array/forEach](array.html#forEach), [object/forOwn](object.html#forOwn) - - - -## map(list, callback, [thisObj]):Array - -Returns a new collection where the properties values are the result of calling -the callback for each property in the original collection. - -See: [array/map](array.html#map), [object/map](object.html#map) - - - -## max(list, [iterator]):* - -Returns maximum value inside collection or use a custom iterator to define how -items should be compared. - -See: [`min()`](#min), [array/max](array.html#max), [object/max](object.html#max) - -```js -max({a: 100, b: 2, c: 1, d: 3, e: 200}); // 200 -max(['foo', 'lorem', 'amet'], function(val){ - return val.length; -}); // 'lorem' -``` - - - -## min(list, [iterator]):* - -Returns minimum value inside collection or use a custom iterator to define how -items should be compared. - -See: [`max()`](#max), [array/min](array.html#min), [object/min](object.html#min) - -```js -min([10, 2, 7]); // 2 -min({a: 'foo', b: 'lorem', c: 'amet'}, function(val){ - return val.length; -}); // 'foo' -``` - - - -## pluck(list, propName):Array - -Extract a list of property values. - -```js -var users = [ - { - name : 'John', - age : 21 - }, - { - name : 'Jane', - age : 27 - } -]; - -pluck(users, 'name'); // ["John", "Jane"] -pluck(users, 'age'); // [21, 27] - -users = { - first: { - name : 'John', - age : 21 - }, - second: { - name : 'Mary', - age : 25 - } -}; - -pluck(users, 'name'); // ['John', 'Mary'] -``` - -See: [array/pluck](array.html#pluck), [object/pluck](object.html#pluck) - - - -## reduce(list, callback, initial, [thisObj]):* - -Apply a function against an accumulator and each value in the collection as to -reduce it to a single value. - -```js -var obj = {a: 1, b: 2, c: 3, d: 4}; - -function sum(prev, cur, key, list) { - return prev + cur; -} - -reduce(obj, sum); // 10 -``` - -See: [array/reduce](array.html#reduce), [object/reduce](object.html#reduce) - - - -## reject(list, fn, [thisObj]):Array - -Creates a new array with all the elements that do **not** pass the truth test. -Opposite of [`filter()`](#filter). - -### Example - -```js -var numbers = [1, 2, 3, 4, 5]; -reject(numbers, function(x) { return (x % 2) !== 0; }); // [2, 4] - -var obj = {a: 1, b: 2, c: 3, d: 4, e: 5}; -reject(obj, function(x) { return (x % 2) !== 0; }); // [2, 4] -``` - -See: [array/reject](array.html#reject), [object/reject](object.html#reject) - - - -## size(list):Number - -Returns the number of values in the collection. - -```js -var obj = { - foo : 1, - bar : 2, - lorem : 3 -}; -size(obj); // 3 -size([1,2,3]); // 3 -size(null); // 0 -``` - -See: [object/size](object.html#size) - - - -## some(list, callback, [thisObj]):Boolean - -Tests whether any values in the collection pass the test implemented by the -provided callback. - -```js -var obj = { - a: 1, - b: 2, - c: 3, - d: 'string' -}; - -some(obj, isNumber); // true -some(obj, isString); // true -some([1, 2, 3], isNumber) // true -some([1, 2, 3], isString) // false -``` - -See: [array/some](array.html#some), [object/some](object.html#some) - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/date.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/date.md deleted file mode 100644 index b3f7f40e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/date.md +++ /dev/null @@ -1,295 +0,0 @@ -# date # - -Date utilities. - - -## dayOfTheYear(date):Number - -How many days elapsed since begining of the year (following gregorian -calendar). - -```js -// Jan 1st -dayOfTheYear(new Date(2013, 0, 1)); // 1 -// Dec 31th -dayOfTheYear(new Date(2013, 11, 31)); // 364 -``` - - - -## diff(date1, date2, [unitName]):Number - -Calculate the difference between dates (range). - -The returned value is always positive. The default `unitName` is `"ms"`. - -Available units: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`, -`millisecond`. - -See: [`time/convert()`](time.html#convert) - -```js -var d1 = new Date(2012, 4, 5); -var d2 = new Date(2013, 4, 8); -diff(d1, d2); // 31795200000 -diff(d1, d2, 'hour'); // 8832 -diff(d1, d2, 'week'); // 52.57142857142857 -diff(d1, d2, 'month'); // 12.096774193548388 -diff(d1, d2, 'year'); // 1.0082191780821919 -``` - - - -## isLeapYear(fullYear|date):Boolean - -Checks if it's a [leap year](http://en.wikipedia.org/wiki/Leap_year) according -to the Gregorian calendar. - -see: [`totalDaysInMonth()`](#totalDaysInMonth) - -```js -isLeapYear(2012); // true -isLeapYear(2013); // false -isLeapYear(new Date(2012, 2, 28)); // true -``` - - -## isSame(date1, date2[, period]):Boolean - -Check if both dates are the "same". - -You can pass an optional *period* used to set the comparisson precision. - -Available periods: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`. - -```js -var date1 = new Date(2013, 1, 3); -var date2 = new Date(2013, 2, 9); -isSame(date1, date2); // false -isSame(date1, date2, 'day'); // false -isSame(date1, date2, 'month'); // false -isSame(date1, date2, 'year'); // true -``` - - - -## parseIso(str):Number - -Parses an [ISO8601](http://en.wikipedia.org/wiki/Iso8601) date and returns the -number of milliseconds since January 1, 1970, 00:00:00 UTC, or `NaN` if it is -not a valid ISO8601 date. - -This parses *all* ISO8601 dates, including dates without times, [ordinal -dates](https://en.wikipedia.org/wiki/ISO_8601#Ordinal_dates), and the compact -representation (omitting delimeters). The only exception is [ISO week -dates](https://en.wikipedia.org/wiki/ISO_week_date), which are not parsed. - -If no time zone offset is specified, it assumes UTC time. - -```js -// Jan 01, 1970 00:00 GMT -parseIso('1970-01-01T00:00:00') // 0 -parseIso('1970-001') // 0 -parseIso('1970-01-01') // 0 -parseIso('19700101T000000.00') // 0 -parseIso('1970-01-01T02:00+02:00') // 0 - -// Jan 02, 2000 20:10 GMT+04:00 -parseIso('2000-01-02T20:10+04:00') // 946829400000 -``` - - - -## startOf(date, period):Date - -Get a new Date at the start of the period. - -Available periods: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`. - -```js -// Apr 05 2013 11:27:43 -var date = new Date(2013, 3, 5, 11, 27, 43, 123); -startOf(date, 'year'); // Jan 01 2013 00:00:00 -startOf(date, 'month'); // Apr 01 2013 00:00:00 -startOf(date, 'day'); // Apr 05 2013 00:00:00 -startOf(date, 'hour'); // Apr 05 2013 11:00:00 -``` - - - -## strftime(date, format, [l10n]):String - -Format date based on strftime format. - -Replaced tokens: - -<dl> -<dt>%a</dt><dd> locale's abbreviated weekday name.</dd> -<dt>%A</dt><dd> locale's full weekday name.</dd> -<dt>%b</dt><dd> locale's abbreviated month name.</dd> -<dt>%B</dt><dd> locale's full month name.</dd> -<dt>%c</dt><dd> locale's appropriate date and time representation.</dd> -<dt>%C</dt><dd> century number (the year divided by 100 and truncated -to an integer) as a decimal number [00..99].</dd> -<dt>%d</dt><dd> day of the month as a decimal number [01..31].</dd> -<dt>%D</dt><dd>same as %m/%d/%y.</dd> -<dt>%e</dt><dd> day of the month as a decimal number [1..31]; -a single digit is preceded by a space.</dd> -<dt>%F</dt><dd>The ISO 8601 date format (%Y-%m-%d)</dd> -<dt>%h</dt><dd>same as %b.</dd> -<dt>%H</dt><dd> hour (24-hour clock) as a decimal number [00..23].</dd> -<dt>%I</dt><dd> hour (12-hour clock) as a decimal number [01..12].</dd> -<dt>%j</dt><dd> day of the year as a decimal number [001..366].</dd> -<dt>%L</dt><dd> zero-padded milliseconds [000..999]</dd> -<dt>%m</dt><dd> month as a decimal number [01..12].</dd> -<dt>%M</dt><dd> minute as a decimal number [00..59].</dd> -<dt>%n</dt><dd> newline character.</dd> -<dt>%p</dt><dd> locale's equivalent of either "am" or "pm"</dd> -<dt>%P</dt><dd> locale's equivalent of either "AM" or "PM"</dd> -<dt>%r</dt><dd> time in a.m. and -p.m. notation; in the POSIX locale this is equivalent to %I:%M:%S %p.</dd> -<dt>%R</dt><dd> time in 24 hour notation (%H:%M).</dd> -<dt>%s</dt><dd> seconds since Epoch (1970-01-01 00:00:00 UTC)</dd> -<dt>%S</dt><dd> second as a decimal number [00..60].</dd> -<dt>%t</dt><dd> tab character.</dd> -<dt>%T</dt><dd> time (%H:%M:%S).</dd> -<dt>%u</dt><dd> weekday as a decimal number [1..7], with 1 representing -Monday.</dd> -<dt>%U</dt><dd> week number of the year (Sunday as the first day of -the week) as a decimal number [00..53].</dd> -<del><dt>%V</dt><dd> week number of the year (Monday as the first day of the -week) as a decimal number [01..53]. If the week containing 1 January has -four or more days in the new year, then it is considered week 1. Otherwise, -it is the last week of the previous year, and the next week is week 1.</dd></del> -<dt>%w</dt><dd> weekday as a decimal number [0..6], with 0 representing -Sunday.</dd> -<dt>%W</dt><dd> week number of the year (Monday as the first day of -the week) as a decimal number [00..53]. All days in a new year preceding -the first Monday are considered to be in week 0.</dd> -<dt>%x</dt><dd> locale's appropriate date representation.</dd> -<dt>%X</dt><dd> locale's appropriate time representation.</dd> -<dt>%y</dt><dd> year without century as a decimal number [00..99].</dd> -<dt>%Y</dt><dd> year with century as a decimal number.</dd> -<dt>%Z</dt><dd> timezone name or abbreviation, or by no bytes -if no timezone information exists.</dd> -<dt>%%</dt><dd>is replaced by %.</dd> -</dl> - -```js -var date = new Date(2013, 3, 8, 9, 2, 4); -strftime(date, '%Y-%m-%d'); // "2013-04-08" -strftime(date, '%R'); // "09:02" -strftime(date, '%Y-%m-%dT%H:%M:%S%z'); // "2013-04-08T09:02:04+0000" -``` - -You can also set a custom locale: - -```js -var ptBr = require('mout/date/i18n/pt-BR'); -strftime(date, '%a, %d %b', ptBr); // 'Seg, 08 Abr' -strftime(date, '%A, %d %B', ptBr); // 'Segunda, 08 Abril' -``` - -To set it globally: - -```js -require('mout/date/i18n_').set( customLocaleData ); -``` - -See [date/i18n](https://github.com/mout/mout/tree/master/src/date/i18n) -for localization examples. - - - -## timezoneAbbr(date):String - -Return timezone abbreviation or similar data. - -The result will vary based on the OS/browser since some environments doesn't -provide enough info about the current locale. - -```js -// IE 7-8 -timezoneAbbr(new Date()); // "-0500" -// Chrome, FF, V8 -timezoneAbbr(new Date()); // "EST" -``` - - - -## timezoneOffset(date):String - -Return time zone as hour and minute offset from UTC (e.g. +0900). - -It's important to note that JavaScript Date object will use the system locale -info to determinate the [timezone -offset](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset) -and that daylight saving time affects the result. - -```js -// if system locale is EST -timezoneOffset(new Date()); // -0500 -``` - - - -## totalDaysInMonth(fullYear, monthIndex):Number - -Returns the amount of days in the month taking into consideration leap years -(following Gregorian calendar). - -see: [`isLeapYear()`](#isLeapYear) - -```js -totalDaysInMonth(2008, 1); // 29 (leap year) -totalDaysInMonth(2009, 1); // 28 - -// you can also pass a Date object as single argument -totalDaysInMonth( new Date(2013, 0, 1) ); // 31 -``` - - -## totalDaysInYear(fullYear):Number - -Returns the amount of days in the year taking into consideration leap years -(following Gregorian calendar). - -see: [`isLeapYear()`](#isLeapYear), [`totalDaysInMonth()`](#totalDaysInMonth) - -```js -totalDaysInYear(2008); // 366 (leap year) -totalDaysInYear(2009); // 365 - -// you can also pass a Date object as single argument -totalDaysInYear( new Date(2013, 0, 1) ); // 365 -``` - - - -## weekOfTheYear(date, [firstDayOfWeek]):Number - -Returns how many weeks elapsed since start of the year (`0..53`). - -`firstDayOfWeek` can be `0` (Sunday) or `1` (Monday). By default weeks start at -Sunday. - -It will return `0` if `date` is before the first `firstDayOfWeek` of the year. - -```js -// Tue Jan 01 2013 -weekOfTheYear( new Date(2013,0,1) ); // 0 -// Wed Jan 09 2013 -weekOfTheYear( new Date(2013,0,9) ); // 1 -// Sun Jan 01 2012 -weekOfTheYear( new Date(2012,0,1) ); // 1 -// Mon Jan 09 2012 -weekOfTheYear( new Date(2012,0,9) ); // 2 -``` - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/function.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/function.md deleted file mode 100644 index 2695a025..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/function.md +++ /dev/null @@ -1,174 +0,0 @@ -# function # - -Function*(al)* utilities. - - - -## bind(fn, context, [...args]):Function - -Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. - -### Arguments - - 1. `fn` (Function) : Target Function - 2. `context` (Object) : Execution context (object used as `this`) - 3. `[...args]` (*) : Arguments (0...n arguments) - -See: [`partial()`](#partial), [object/bindAll](./object.html#bindAll) - - - -## compose(...fn):Function - -Returns the composition of a list of functions, where each function consumes -the return value of the function that follows. In math terms, composing the -functions `f()`, `g()`, and `h()` produces `f(g(h()))`. - -```js -function add2(x) { return x + 2 } -function multi2(x) { return x * 2 } -map([1, 2, 3], compose(add2, multi2)); // [4, 6, 8] - -//same as -map([1, 2, 3], function(x){ - return add2( multi2(x) ); -}); -``` - - - -## debounce(fn, delay[, isAsap]):Function - -Creates a function that will delay the execution of `fn` until after `delay` -milliseconds have elapsed since the last time it was invoked. - -Subsequent calls to the debounced function will return the result of the last -`fn` call. - -```js -// sometimes less is more -var lazyRedraw = debounce(redraw, 300); -foo.on.resize.add(lazyRedraw); -``` - -In this visualization, `|` is a debounced-function call and `X` is the actual -callback execution: - - Default - ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| - X X - - Debounced with `isAsap == true`: - ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| - X X - -See: [`throttle()`](#throttle) - - -## func(name):Function - -Returns a function that calls a method with given `name` on supplied object. -Useful for iteration methods like `array/map` and `array/forEach`. - -See: [`prop()`](#prop) - -```js -// will call the method `getName()` for each `user` -var names = map(users, func('getName')); -``` - - - -## partial(fn, [...args]):Function - -Return a partially applied function supplying default arguments. - -This method is similar to [`bind`](#bind), except it does not alter the this -binding. - -### Arguments - - 1. `fn` (Function) : Target Function - 3. `[...args]` (*) : Arguments (0...n arguments) - -See: [`bind()`](#bind) - -```js -function add(a, b){ return a + b } -var add10 = partial(add, 10); -console.log( add10(2) ); // 12 -``` - - - -## prop(name):Function - -Returns a function that gets a property with given `name` from supplied object. -Useful for using in conjunction with `array/map` and/or for creating getters. - -See: [`array/pluck()`](array.html#pluck) - -```js -var users = [{name:"John", age:21}, {name:"Jane", age:25}]; -// ["John", "Jane"] -var names = map(users, prop('name')); -``` - - - -## series(...fn):Function - -Returns a function that will execute all the supplied functions in order and -passing the same parameters to all of them. Useful for combining multiple -`array/forEach` into a single one and/or for debugging. - - -```js -// call `console.log()` and `doStuff()` for each item item in the array -forEach(arr, series(console.log, doStuff)); -``` - - - -## throttle(fn, interval):Function - -Creates a function that, when executed, will only call the `fn` function at -most once per every `interval` milliseconds. - -If the throttled function is invoked more than once during the wait timeout, -`fn` will also be called on the trailing edge of the timeout. - -Subsequent calls to the throttled function will return the result of the last -`fn` call. - -```js -// sometimes less is more -var lazyRedraw = throttle(redraw, 300); -foo.on.resize.add(lazyRedraw); -``` - -In this visualization, `|` is a throttled-function call and `X` is the actual -`fn` execution: - - ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| - X X X X X X X X X X X X - -See: [`debounce()`](#debounce) - - -## timeout(fn, millis, context, [...args]):Number - -Functions as a wrapper for `setTimeout`. Calls a the function `fn` after a given delay `millis` in milliseconds. -The function is called within the specified context. The return value can be used to clear the timeout using `clearTimeout`. - -```js -var id = timeout(doStuff, 300, this); - -clearTimeout(id); -``` - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/lang.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/lang.md deleted file mode 100644 index 56d7879b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/lang.md +++ /dev/null @@ -1,385 +0,0 @@ -# lang # - -Language Utilities. Easier inheritance, scope handling, type checks. - - - -## clone(val):* - -Clone native types like Object, Array, RegExp, Date and primitives. - -This method will not clone values that are referenced within `val`. It will -only copy the value reference to the new value. If the value is not a plain -object but is an object, it will return the value unchanged. - -### Example - -```js -var a = { foo: 'bar' }; -var b = clone(a); -console.log(a === b); // false -console.log(a.foo === b.foo); // true - -var c = [1, 2, 3]; -var d = clone(b); -console.log(c === d); // false -console.log(c); // [1, 2, 3] -``` - -See: [`deepClone()`](#deepClone) - - - -## createObject(parent, [props]):Object - -Create Object using prototypal inheritance and setting custom properties. - -Mix between [Douglas Crockford Prototypal Inheritance](http://javascript.crockford.com/prototypal.html) and the EcmaScript 5 `Object.create()` method. - -### Arguments - - 1. `parent` (Object) : Parent Object - 2. `[props]` (Object) : Object properties - -### Example - -```js -var base = { - trace : function(){ - console.log(this.name); - } -}; - -var myObj = createObject(base, { - name : 'Lorem Ipsum' -}); - -myObject.trace(); // "Lorem Ipsum" -``` - - - -## ctorApply(constructor, args):Object - -Do `Function.prototype.apply()` on a constructor while maintaining prototype -chain. - -```js -function Person(name, surname) { - this.name = name; - this.surname = surname; -} - -Person.prototype.walk = function(){ - console.log(this.name +' is walking'); -}; - -var args = ['John', 'Doe']; - -// "similar" effect as calling `new Person("John", "Doe")` -var john = ctorApply(Person, args); -john.walk(); // "John is walking" -``` - - - -## deepClone(val, [instanceClone]):* - -Deep clone native types like Object, Array, RegExp, Date and primitives. - -The `instanceClone` function will be invoked to clone objects that are not -"plain" objects (as defined by [`isPlainObject`](#isPlainObject)) if it is -provided. If `instanceClone` is not specified, it will not attempt to clone -non-plain objects, and will copy the object reference. - -### Example - -```js -var a = {foo:'bar', obj: {a:1, b:2}}; -var b = deepClone(a); // {foo:'bar', obj: {a:1, b:2}} -console.log( a === b ); // false -console.log( a.obj === b.obj ); // false - -var c = [1, 2, [3, 4]]; -var d = deepClone(c); // [1, 2, [3, 4]] -var e = c.concat(); // [1, 2, [3, 4]] - -console.log( c[2] === d[2] ); // false -// concat doesn't do a deep clone, arrays are passed by reference -console.log( e[2] === d[2] ); // true - -function Custom() { } -function cloneCustom(x) { return new Custom(); } -var f = { test: new Custom() }; -var g = deepClone(f, cloneCustom); -g.test === f.test // false, since new Custom instance will be created -``` - -See: [`clone()`](#clone) - - - -## defaults(val, ...defaults):void - -Return first value that isn't `null` or `undefined`. - - function doSomethingAwesome(foo, bar) { - // default arguments - foo = defaults(foo, 'lorem'); - bar = defaults(bar, 123); - // ... - } - - - -## inheritPrototype(child, parent):void - -Inherit prototype from another Object. - -```js -function Foo(name){ - this.name = name; -} -Foo.prototype = { - getName : function(){ - return this.name; - } -}; - -function Bar(name){ - this.name = name; -} -//should be called before calling constructor -inheritPrototype(Bar, Foo); - -var myObj = new Bar('lorem ipsum'); -myObj.getName(); // "lorem ipsum" -``` - - -## is(x, y):Boolean - -Check if both values are identical/egal. - -```js -// wtfjs -NaN === NaN; // false --0 === +0; // true - -is(NaN, NaN); // true -is(-0, +0); // false -is('a', 'b'); // false -``` - -See: [`isnt()`](#isnt) - - - -## isnt(x, y):Boolean - -Check if both values are not identical/egal. - -```js -// wtfjs -NaN === NaN; // false --0 === +0; // true - -isnt(NaN, NaN); // false -isnt(-0, +0); // true -isnt('a', 'b'); // true -``` - -See: [`is()`](#is) - - - - -## isArguments(val):Boolean - -If value is an "Arguments" object. - - - -## isArray(val):Boolean - -If value is an Array. Uses native ES5 `Array.isArray()` if available. - - - -## isBoolean(val):Boolean - -If value is a Boolean. - - - -## isDate(val):Boolean - -If value is a Date. - - - -## isEmpty(val):Boolean - -Checks if Array/Object/String is empty. - - -```js -isEmpty(''); // true -isEmpty('bar'); // false -isEmpty([]); // true -isEmpty([1, 2]); // false -isEmpty({}); // true -isEmpty({a:1, b:2}); // false -``` - - -## isFinite(val):Boolean - -Checks if value is Finite. - -Note: This is not the same as native `isFinite`, which will return `true` for -booleans and empty strings. See http://es5.github.com/#x15.1.2.5. - - - -## isFunction(val):Boolean - -If value is a Function. - - - -## isKind(val, kind):Boolean - -If value is of "kind". (used internally by some of the *isSomething* checks). - -Favor the other methods since strings are commonly mistyped and also because -some "kinds" can only be accurately checked by using other methods (e.g. -`Arguments`), some of the other checks are also faster. - -```js -isKind([1,2], 'Array'); // true -isKind(3, 'Array'); // false -isKind(3, 'Number'); // true -``` - -See: [`kindOf()`](#kindOf) - - - -## isInteger(val):Boolean - -Check if value is an integer. - -```js -isInteger(123); // true -isInteger(123.45); // false -isInteger({}); // false -isInteger('foo'); // false -isInteger('123'); // false -``` - - - -## isNaN(val):Boolean - -Check if value is `NaN`. - -Note: This is not the same as native `isNaN`, which will return `true` for -`undefined` and other values. See [ES5 isNaN](http://es5.github.com/#x15.1.2.4) - - - -## isNull(val):Boolean - -If value is `null`. - - - -## isNumber(val):Boolean - -If value is a Number. - - - -## isObject(val):Boolean - -If value is an Object. - - - -## isPlainObject(val):Boolean - -If the value is an Object created by the Object constructor. - - - -## isRegExp(val):Boolean - -If value is a RegExp. - - - -## isString(val):Boolean - -If value is a String. - - - -## isUndefined(val):Boolean - -If value is `undefined`. - - - -## kindOf(val):String - -Gets kind of value (e.g. "String", "Number", "RegExp", "Null", "Date"). -Used internally by `isKind()` and most of the other *isSomething* checks. - -```js -kindOf([1,2]); // "Array" -kindOf('foo'); // "String" -kindOf(3); // "Number" -``` - -See: [`isKind()`](#isKind) - - -## toArray(val):Array - -Convert array-like object into Array or wrap value into Array. - -```js -toArray({ - "0" : "foo", - "1" : "bar", - "length" : 2 -}); // ["foo", "bar"] - -function foo(){ - return toArray(arguments); -} -foo("lorem", 123); // ["lorem", 123] - -toArray("lorem ipsum"); // ["lorem ipsum"] -toArray(window); // [window] -toArray({foo:"bar", lorem:123}); // [{foo:"bar", lorem:123}] -``` - -See: object/values() - - - -## toString(val):String - -Convert any value to its string representation. - -Will return an empty string for `undefined` or `null`, otherwise will convert -the value to its string representation. - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/math.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/math.md deleted file mode 100644 index f45be3ed..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/math.md +++ /dev/null @@ -1,298 +0,0 @@ -# math # - -Math utilities. - - -## ceil(val[, step]):Number - -Round value up to full steps. Similar to `Math.ceil()` but can round value -to an arbitrary *radix*. - - ceil(7.2); // 8 - ceil(7.8); // 8 - ceil(7, 5); // 10 - ceil(11, 5); // 15 - ceil(15, 5); // 15 - -### Common use cases - -Round values by increments of 5/10/1000/etc. - -See: [`round()`](#round), [`floor()`](#floor), [`countSteps()`](#countSteps) - - - -## clamp(val, min, max):Number - -Clamps value inside range. - -`clamp()` is extremely useful in cases where you need to limit a value inside -a certain range. So instead of doing a complex `if/else` to filter/process the -value you can restrict it to always be inside the desired range: - - clamp(-5, 0, 10); // 0 - clamp(7, 1, 10); // 7 - clamp(8, 1, 10); // 8 - clamp(10, 1, 10); // 10 - clamp(11, 1, 10); // 10 - -If the value is smaller than `min` it returns the `min`, if `val` is higher -than `max` it returns `max`. - -### Common use cases - -Any situation where you need to limit a number inside a range like: slider -position, image galleries <small>(so user can't skip to an image that doesn't -exist)</small>, drag and drop, scroll boundaries, etc. - -See: [`loop()`](#loop) - - - - -## countSteps(val, step[, overflow]):Number - -Count number of full steps. - -### Arguments: - - 1. `val` (Number) : Value. - 2. `step` (Number) : Step size. - 3. `[overflow]` (Number) : Maximum number of steps, nSteps will loop if -`>=` than overflow. - - -Count steps is very useful for cases where you need to know how many "full -steps" the number *completed*. Think of it as a division that only returns -integers and ignore remainders. - - countSteps(3, 5); // 0 - countSteps(6, 5); // 1 - countSteps(12, 5); // 2 - countSteps(18, 5); // 3 - countSteps(21, 5); // 4 - -You can also set an `overflow` which will reset the *counter* before reaching -this number. - - countSteps(3, 5, 3); // 0 - countSteps(6, 5, 3); // 1 - countSteps(12, 5, 3); // 2 - countSteps(18, 5, 3); // 0 - countSteps(21, 5, 3); // 1 - -### Common use cases - -#### How many items fit inside an area: - - var containerWidth = 100; - var itemWidth = 8; - var howManyFit = countSteps(containerWidth, itemWidth); // 12 - -#### Split value into different scales or convert value from one scale to another - -From [mout/time/parseMs](time.html#parseMs): - - function parseMs(ms){ - return { - milliseconds : countSteps(ms, 1, 1000), - seconds : countSteps(ms, 1000, 60), - minutes : countSteps(ms, 60000, 60), - hours : countSteps(ms, 3600000, 24), - days : countSteps(ms, 86400000) - }; - } - - // {days:27, hours:4, minutes:26, seconds:5, milliseconds:454} - parseMs(2348765454); - - - -## floor(val[, step]):Number - -Round value down to full steps. Similar to `Math.floor()` but can round value -to an arbitrary *radix*. (formerly `snap`) - - floor(7.2); // 7 - floor(7.8); // 7 - floor(7, 5); // 5 - floor(11, 5); // 10 - floor(15, 5); // 15 - -### Common use cases - -Round values by increments of 5/10/1000/etc. - -See: [`round()`](#round), [`ceil()`](#ceil), [`countSteps()`](#countSteps) - - - -## inRange(val, min, max[, threshold]):Boolean - -Checks if value is inside the range. - - inRange(-6, 1, 10); // false - inRange( 5, 1, 10); // true - inRange(12, 1, 10); // false - -The threshold can be useful when you want granular control of what should match -and/or the precision could change at runtime or by some configuration option, -avoids the clutter of adding/subtracting the `threshold` from `mix` and `max`. - - inRange(12, 1, 10, 2); // true - inRange(13, 1, 10, 2); // false - -### Common use cases - -Anything that needs to check if value is inside a range, be it collision -detection, limiting interaction by mouse position, ignoring parts of the logic -that shouldn't happen if value isn't valid, simplify `if/else` conditions, -making code more readable, etc... - - - - -## isNear(val, target, threshold):Boolean - -Check if value is close to target. - -Similar to `inRange()` but used to check if value is close to a certain value -or match the desired value. Basically to simplify `if/else` conditions and to -make code clearer. - - isNear( 10.2, 10, 0.5); // true - isNear( 10.5, 10, 0.5); // true - isNear(10.51, 10, 0.5); // false - -### Common use cases - -Games where a certain action should happen if an *actor* is close to a target, -gravity fields, any numeric check that has some tolerance. - - - - -## lerp(ratio, start, end):Number - -Linear interpolation. - - lerp(0.5, 0, 10); // 5 - lerp(0.75, 0, 10); // 7.5 - -### Common use cases - -Linear interpolation is commonly used to create animations of elements moving -from one point to another, where you simply update the current ratio (which in -this case represents time) and get back the position of the element at that -"frame". - -The core idea of `lerp` is that you are using a number that goes from `0` to -`1` to specify a ratio inside that scale. This concept can be applied to -convert numbers from different scales easily. - -See: [`map()`](#map), [`norm()`](#norm) - - - - -## loop(val, min, max):Number - -Loops value inside range. Will return `min` if `val > max` and `max` if `val -< min`, otherwise it returns `val`. - - loop(-1, 0, 10); // 10 - loop( 1, 0, 10); // 1 - loop( 5, 0, 10); // 5 - loop( 9, 0, 10); // 9 - loop(10, 0, 10); // 10 - loop(11, 0, 10); // 0 - -Similar to [`clamp()`](#clamp) but *loops* the value inside the range when an -overflow occurs. - -### Common use cases - -Image galleries, infinite scroll, any kind of logic that requires that the -first item should be displayed after the last one or the last one should be -displayed after first if going on the opposite direction. - -See: [`clamp()`](#clamp) - - - - -## map(val, min1, max1, min2, max2):Number - -Maps a number from one scale to another. - - map(3, 0, 4, -1, 1) // 0.5 - map(3, 0, 10, 0, 100) // 30 - -### Common use cases - -Very useful to convert values from/to multiple scales. - -Let's suppose we have a slider that needs to go from `2000` to `5000` and that slider -has `300px` of width, here is how we would translate the knob position into the -current value: - - var knobX = 123; - var sliderWid = 300; - var minVal = 2000; - var maxVal = 5000; - - var curVal = map(knobX, 0, sliderWid, minVal, maxVal); // 3230 - -See: [`lerp()`](#lerp), [`norm()`](#norm) - - - - -## norm(val, min, max):Number - -Gets normalized ratio of value inside range. - - norm(50, 0, 100); // 0.5 - norm(75, 0, 100); // 0.75 - -### Common use cases - -Convert values between scales, used by [`map()`](#map) internally. Direct -opposite of [`lerp()`](#lerp). - -See: [`lerp()`](#lerp), [`map()`](#map) - - - -## round(val[, step]):Number - -Round value to full steps. Similar to `Math.round()` but allow setting an -arbitrary *radix*. - - // default - round(0.22); // 0 - round(0.49); // 0 - round(0.51); // 1 - - // custom radix - round(0.22, 0.5); // 0 - round(0.49, 0.5); // 0.5 - round(0.51, 0.5); // 0.5 - round(0.74, 0.5); // 0.5 - round(0.75, 0.5); // 1 - round(1.24, 0.5); // 1 - round(1.25, 0.5); // 1.5 - round(1.74, 0.5); // 1.5 - -### Common use cases - -Round values by increments of 0.5/5/10/1000/etc. - -See: [`floor()`](#floor), [`ceil()`](#ceil), [`countSteps()`](#countSteps) - - - -------------------------------------------------------------------------------- - -For more usage more info check the specs and source code. - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/number.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/number.md deleted file mode 100644 index 8d93865b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/number.md +++ /dev/null @@ -1,225 +0,0 @@ -# number # - -Number utilities. - - -## abbreviate(val[, nDecimalDigits, dictionary]):String - -Abbreviate number to thousands (K), millions (M) or billions (B). - -The default value for `nDecimalDigits` is `1`. - -### Example - - abbreviate(123456); // "123.5K" - abbreviate(12345678); // "12.3M" - abbreviate(1234567890); // "1.2B" - -You can set the amount of decimal digits (default is `1`): - - abbreviate(543); // "0.5K" - abbreviate(543, 1); // "0.5K" - abbreviate(543, 2); // "0.54K" - abbreviate(543, 3); // "0.543K" - -You can customize the abbreviation by passing a custom "dictionary": - - var _ptbrDict = { - thousands : ' mil', - millions : ' Mi', - billions : ' Bi' - }; - function customAbbr(val) { - return abbreviate(val, 1, _ptbrDict); - } - - customAbbr(123456); // "123.5 mil" - customAbbr(12345678); // "12.3 Mi" - customAbbr(1234567890); // "1.2 Bi" - - - -## currencyFormat(val[, nDecimalDigits, decimalSeparator, thousandsSeparator]):String - -Format a number as currency. - -### Example: - - currencyFormat(1000); // "1,000.00" - currencyFormat(1000, 1); // "1,000.0" - currencyFormat(1000, 2, ',', '.'); // "1.000,00" - - - -## enforcePrecision(val, nDecimalDigits):Number - -Enforce a specific amount of decimal digits and also fix floating point -rounding issues. - -### Example: - -```js -enforcePrecision(0.615, 2); // 0.62 -enforcePrecision(0.625, 2); // 0.63 -//floating point rounding "error" (rounds to odd number) -+(0.615).toFixed(2); // 0.61 -+(0.625).toFixed(2); // 0.63 -``` - - - -## MAX_INT:Number - -Maximum 32-bit signed integer value. `Math.pow(2, 31) - 1` - -### Example: - -```js -console.log( MAX_INT ); // 2147483647 -``` - - -## MAX_UINT:Number - -Maximum 32-bit unsigned integer value. `Math.pow(2, 32) - 1` - -### Example: - -```js -console.log( MAX_UINT ); // 4294967295 -``` - - -## MIN_INT:Number - -Minimum 32-bit signed integer value. `Math.pow(2, 31) * -1`. - -### Example: - -```js -console.log( MIN_INT ); // -2147483648 -``` - - -## pad(n, minLength[, char]):String - -Add padding zeros if `n.length` < `minLength`. - -### Example: - -```js -pad(1, 5); // "00001" -pad(12, 5); // "00012" -pad(123, 5); // "00123" -pad(1234, 5); // "01234" -pad(12345, 5); // "12345" -pad(123456, 5); // "123456" - -// you can also specify the "char" used for padding -pad(12, 5, '_'); // "___12" -``` - -see: [string/lpad](./string.html#lpad) - - - -## rol(val, shift):Number - -Bitwise circular shift left. - -More info at [Wikipedia#Circular_shift](http://en.wikipedia.org/wiki/Circular_shift) - - - -## ror(val, shift):Number - -Bitwise circular shift right. - -More info at [Wikipedia#Circular_shift](http://en.wikipedia.org/wiki/Circular_shift) - - - -## sign(val):Number - -Returns `-1` if value is negative, `0` if the value is `0` and `1` if value is positive. Useful for -multiplications. - -```js -sign(-123); // -1 -sign(123); // 1 -sign(0); // 0 -``` - - - -## toInt(val):Number - -"Convert" value into an 32-bit integer. Works like `Math.floor` if `val > 0` and -`Math.ceil` if `val < 0`. - -**IMPORTANT:** val will wrap at [number/MIN_INT](#MIN_INT) and -[number/MAX_INT](#MAX_INT). - -Created because most people don't know bitwise operations and also because this -feature is commonly needed. - -[Perf tests](http://jsperf.com/vs-vs-parseint-bitwise-operators/7) - -### Example: - -```js -toInt(1.25); // 1 -toInt(0.75); // 0 -toInt(-0.55); // 0 -toInt(-5.0001) // -5 -``` - - - -## toUInt(val):Number - -"Convert" value into an 32-bit unsigned integer. - -Works like AS3#uint(). - -**IMPORTANT:** val will wrap at 2^32. - -### Example: - -```js -toUInt(1.25); // 1 -toUInt(0.75); // 0 -toUInt(-0.55); // 0 -toUInt(-5.0001); // 4294967291 -toUInt(Math.pow(2,32) - 0.5); // 4294967295 -toUInt(Math.pow(2,32) + 0.5); // 0 -``` - - -## toUInt31(val):Number - -"Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). - -Useful since all bitwise operators besides `>>>` treat numbers as signed -integers. - -**IMPORTANT:** val will wrap at 2^31 and negative numbers will be treated as -`zero`. - -### Example: - -```js -toUInt31(1.25); // 1 -toUInt31(0.75); // 0 -toUInt31(-0.55); // 0 -toUInt31(-5.0001); // 0 -toUInt31(Math.pow(2,31) - 0.5); // 21474836470 -toUInt31(Math.pow(2,31) + 0.5); // 0 -``` - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/object.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/object.md deleted file mode 100644 index b4d5e483..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/object.md +++ /dev/null @@ -1,780 +0,0 @@ -# object # - -Object utilities. - - - -## bindAll(obj, [...methodNames]):void - -Bind methods of the target object to always execute on its own context -(ovewritting the original function). - -See: [function/bind](./function.html#bind) - -```js -var view = { - name: 'Lorem Ipsum', - logNameOnClick: function() { - console.log(this.name); - } -}; - -// binds all methods by default -bindAll(view); -jQuery('#docs').on('click', view.logNameOnClick); -``` - -You can also specify the list of methods that you want to bind (in case you -just want to bind a few of them). - -```js -// only the listed methods will be bound to `obj` context -bindAll(obj, 'logNameOnClick', 'doAwesomeStuffOnDrag'); -``` - - - -## contains(obj, value):Boolean - -Similar to [Array/contains](array.html#contains). Checks if Object contains -value. - -```js -var obj = { - a: 1, - b: 2, - c: 'bar' -}; -contains(obj, 2); // true -contains(obj, 'foo'); // false -``` - - - -## deepEquals(a, b, [callback]):Boolean - -Recursively tests whether two objects contain the same keys and equal values. - -`callback` specifies the equality comparison function used to compare -non-object values. It defaults to using the strict equals (`===`) operator. - -If the values are both an object, it will recurse into the objects, checking if -their keys/values are equal. It will only check the keys and values contained -by the objects; it will not check the objects' prototypes. If the either of -the values are not objects, they will be checked using the `callback` function. - -Example: - -```js -deepEquals({ a: 1 }, { a: 1 }); // true -deepEquals({ value: { a: 1 } }, { value: { a: 1 } }); // true -deepEquals({ value: { a: 1 } }, { value: { a: 2 } }); // false -deepEquals({ value: { a: 1 } }, { value: { a: 1, b: 2 } }); // false -deepEquals({}, null); // false -deepEquals(null, null); // true -deepEquals( - { a: { b: 1 } }, - { a: { b: '1' } }, - function(a, b) { return a == b; }); // true -``` - -See: [`equals()`](#equals) - - - -## deepFillIn(target, ...objects):Object - -Fill missing properties recursively. - -It's different from `deepMixIn` since it won't override any existing property. -It's also different from `merge` since it won't clone child objects during the -process. - -It returns the target object and mutates it in place. - -See: [`fillIn()`](#fillIn), [`deepMixIn()`](#deepMixIn), [`merge()`](#merge) - -```js -var base = { - foo : { - bar : 123 - }, - lorem : 'ipsum' -}; -var options = deepFillIn({foo : { baz : 45 }, lorem : 'amet'}, base); -// > {foo: {bar:123, baz : 45}, lorem : 'amet'} -``` - - - -## deepMatches(target, pattern):Boolean - -Recursively checks if object contains all properties/value pairs. When both -the target and pattern values are arrays, it checks that the target value -contain matches for all the items in the pattern array (independent of order). - -```js -var john = { - name: 'John', - age: 22, - pets: [ - { type: 'cat', name: 'Grumpy Cat' }, - { type: 'dog', name: 'Hawk' } - ] -}; - -deepMatches(john, { name: 'John' }); // true -deepMatches(john, { age: 21 }); // false -deepMatches(john, { pets: [ { type: 'cat' } ] }); // true -deepMatches(john, { pets: [ { name: 'Hawk' } ] }); // true -deepMatches(john, { pets: [ { name: 'Hairball' } ] }); // false -``` - -See [`matches()`](#matches) - - - -## deepMixIn(target, ...objects):Object - -Mixes objects into the target object, recursively mixing existing child objects -as well. - -It will only recursively mix objects if both (existing and new) values are -plain objects. - -Returns the target object. Like [`merge()`](#merge), but mutates the target -object, and does not clone child objects. - -```js -var target = { - foo: { - name: "foo", - id: 1 - } -}; - -deepMixIn(target, { foo: { id: 2 } }); -console.log(target); // { foo: { name: "foo", id: 2 } } -``` - -See: [`mixIn()`](#mixIn), [`merge()`](#merge), [`deepFillIn()`](#deepFillIn) - - - -## equals(a, b, [callback]):Boolean - -Tests whether two objects contain the same keys and values. - -`callback` specifies the equality comparison function used to compare the -values. It defaults to using the strict equals (`===`) operator. - -It will only check the keys and values contained by the objects; it will not -check the objects' prototypes. If either of the values are not objects, they -will be compared using the `callback` function. - -```js -equals({}, {}); // true -equals({ a: 1 }, { a: 1 }); // true -equals({ a: 1 }, { a: 2 }); // false -equals({ a: 1, b: 2 }, { a: 1 }); // false -equals({ a: 1 }, { a: 1, b: 2 }); // false -equals(null, null); // true -equals(null, {}); // false -equals({ a: 1 }, { a: '1' }, function(a, b) { return a == b; }); // true -``` - - - -## every(obj, callback, [thisObj]):Boolean - -Similar to [Array/every](array.html#every). Tests whether all properties in the -object pass the test implemented by the provided callback. - -```js -var obj = { - a: 1, - b: 2, - c: 3, - d: 'string' -}; - -every(obj, isNumber); // false -``` - - - -## fillIn(obj, ...default):Object - -Fill in missing properties in object with values from the *defaults* objects. - - var base = { - foo : 'bar', - num : 123 - }; - - fillIn({foo:'ipsum'}, base); // {foo:'ipsum', num:123} - -PS: it allows merging multiple objects at once, the first ones will take -precedence. - -See: [`mixIn()`](#mixIn), [`merge()`](#merge), [`deepFillIn()`](#deepFillIn) - - - -## filter(obj, callback, [thisObj]) - -Returns a new object containing all properties where `callback` returns true, -similar to Array/filter. It does not use properties from the object's -prototype. - -Callback receives the same arguments as `forOwn()`. - -See: [`forOwn()`](#forOwn), [`forIn()`](#forIn), [`pick()`](#pick) - -```js -var obj = { - foo: 'value', - bar: 'bar value' -}; - -// returns { bar: 'bar value' } -filter(obj, function(v) { return value.length > 5; }); - -// returns { foo: 'value' } -filter(obj, function(v, k) { return k === 'foo'; }); -``` - - - -## find(obj, callback, [thisObj]) - -Loops through all the properties in the Object and returns the first one that -passes a truth test (callback), similar to [Array/find](array.html#find). -Unlike Array/find, order of iteration is not guaranteed. - -```js -var obj = { - a: 'foo', - b: 12 -}; - -find(obj, isString); // 'foo' -find(obj, isNumber); // 12 -``` - - - -## forIn(obj, callback[, thisObj]) - -Iterate over all properties of an Object, similar to -[Array/forEach](array.html#forEach). - -It [avoids don't enum bug on IE](https://developer.mozilla.org/en/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug). -It **will** iterate over inherited (enumerable) properties from the prototype. - -It allows exiting the iteration early by returning `false` on the callback. - -See: [`forOwn()`](#forOwn), [`keys()`](#keys), [`values()`](#values) - -### Callback arguments - -Callback will receive the following arguments: - - 1. Property Value (*) - 2. Key name (String) - 3. Target object (Object) - -### Example - -```js -function Foo(){ - this.foo = 1; - this.bar = 2; -} - -Foo.prototype.lorem = 4; - -var obj = new Foo(); - -var result = 0; -var keys = []; - -forIn(obj, function(val, key, o){ - result += val; - keys.push(key); -}); - -console.log(result); // 7 -console.log(keys); // ['foo', 'bar', 'lorem'] -``` - - - -## forOwn(obj, callback[, thisObj]) - -Iterate over all own properties from an Object, similar to -[Array/forEach](array.html#forEach). - -It [avoids don't enum bug on IE](https://developer.mozilla.org/en/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug). -Notice that it **won't** iterate over properties from the prototype. - -It allows exiting the iteration early by returning `false` on the callback. - -See: [`forIn()`](#forIn), [`keys()`](#keys), [`values()`](#values) - -### Callback arguments - -Callback will receive the following arguments: - - 1. Property Value (*) - 2. Key name (String) - 3. Target object (Object) - -### Example - -```js -function Foo(){ - this.foo = 1; - this.bar = 2; -} - -// will be ignored -Foo.prototype.lorem = 4; - -var obj = new Foo(); - -var result = 0; -var keys = []; - -forOwn(obj, function(val, key, o){ - result += val; - keys.push(key); -}); - -console.log(result); // 3 -console.log(keys); // ['foo', 'bar'] -``` - - - -## functions(obj):Array - -Returns a sorted list of all enumerable properties that have function values -(including inherited properties). - -```js -var obj = { - foo : function(){}, - bar : 'baz' -}; -functions(obj); // ['foo'] -``` - - - -## get(obj, propName):* - -Returns nested property value. Will return `undefined` if property doesn't -exist. - -See: [`set()`](#set), [`namespace()`](#namespace), [`has()`](#has) - -```js -var lorem = { - ipsum : { - dolor : { - sit : 'amet' - } - } - }; - -get(lorem, 'ipsum.dolor.sit'); // "amet" -get(lorem, 'foo.bar'); // undefined -``` - - - -## has(obj, propName):Boolean - -Checks if object contains a child property. Useful for cases where you need to -check if an object contain a *nested* property. It will get properties -inherited by the prototype. - -see: [`hasOwn()`](#hasOwn), [`get()`](#get) - -```js -var a = { - b : { - c : 123 - } - }; - -has(a, 'b.c'); // true -has(a, 'foo.c'); // false -``` - -### Common use case - -```js -if( has(a, 'foo.c') ){ // false - // ... -} - -if( a.foo.c ){ // ReferenceError: `foo` is not defined - // ... -} -``` - - - -## hasOwn(obj, propName):Boolean - -Safer `Object.hasOwnProperty`. Returns a boolean indicating whether the object -has the specified property. - -see: [`has()`](#has) - -```js -var obj = { - foo: 1, - hasOwnProperty : 'bar' -}; - -obj.hasOwnProperty('foo'); // ERROR! hasOwnProperty is not a function - -hasOwn(obj, 'foo'); // true -hasOwn(obj, 'hasOwnProperty'); // true -hasOwn(obj, 'toString'); // false -``` - - - -## keys(obj):Array - -Returns an array of all own enumerable properties found upon a given object. -It will use the native `Object.keys` if present. - -PS: it won't return properties from the prototype. - -See: [`forOwn()`](#forOwn), [`values()`](#values) - -```js -var obj = { - foo : 1, - bar : 2, - lorem : 3 -}; -keys(obj); // ['foo', 'bar', 'lorem'] -``` - - - -## map(obj, callback, [thisObj]):Object - -Returns a new object where the property values are the result of calling the -callback for each property in the original object, similar to Array/map. - -The callback function receives the same arguments as in `forOwn()`. - -See: [`forOwn()`](#forOwn) - -```js -var obj = { foo: 1, bar: 2 }, - data = { foo: 0, bar: 1 }; - -map(obj, function(v) { return v + 1; }); // { foo: 2, bar: 3 } -map(obj, function(v, k) { return k; }); // { foo: "foo", bar: "bar" } -map(obj, function(v, k) { return this[k]; }, data); // { foo: 0, bar: 1 } -``` - - - -## matches(obj, props):Boolean - -Checks if object contains all properties/values pairs. Useful for validation -and filtering. - -```js -var john = {age:25, hair:'long', beard:true}; -var mark = {age:27, hair:'short', beard:false}; -var hippie = {hair:'long', beard:true}; -matches(john, hippie); // true -matches(mark, hippie); // false -``` - -See [`deepMatches()`](#deepMatches) - - - -## merge(...objects):Object - -Deep merges objects. Note that objects and properties will be cloned during the -process to avoid undesired side effects. It return a new object and won't -affect source objects. - -```js -var obj1 = {a: {b: 1, c: 1, d: {e: 1, f: 1}}}; -var obj2 = {a: {b: 2, d : {f : 'yeah'} }}; - -merge(obj1, obj2); // {a: {b : 2, c : 1, d : {e : 1, f : 'yeah'}}} -``` - -See: [`deepMixIn()`](#deppMixIn), [`deepFillIn()`](#deepFillIn) - - - -## max(obj[, iterator]):* - -Returns maximum value inside object or use a custom iterator to define how -items should be compared. Similar to [Array/max](array.html#max). - -See: [`min()`](#min) - -```js -max({a: 100, b: 2, c: 1, d: 3, e: 200}); // 200 -max({a: 'foo', b: 'lorem', c: 'amet'}, function(val){ - return val.length; -}); // 'lorem' -``` - - - -## min(obj[, iterator]):* - -Returns minimum value inside object or use a custom iterator to define how -items should be compared. Similar to [Array/min](array.html#min). - -See: [`max()`](#max) - -```js -min({a: 100, b: 2, c: 1, d: 3, e: 200}); // 1 -min({a: 'foo', b: 'lorem', c: 'amet'}, function(val){ - return val.length; -}); // 'foo' -``` - - - -## mixIn(target, ...objects):Object - -Combine properties from all the objects into first one. - -This method affects target object in place, if you want to create a new Object -pass an empty object as first parameter. - -### Arguments - - 1. `target` (Object) : Target Object. - 2. `...objects` (...Object) : Objects to be combined (0...n objects). - -### Example - -```js -var a = {foo: "bar"}; -var b = {lorem: 123}; - -mixIn({}, a, b); // {foo: "bar", lorem: 123} -console.log(a); // {foo: "bar"} - -mixIn(a, b); // {foo: "bar", lorem: 123} -console.log(a); // {foo: "bar", lorem: 123} -``` - -See: [`fillIn()`](#fillIn), [`merge()`](#merge) - - - - -## namespace(obj, propName):Object - -Creates an empty object inside namespace if not existent. Will return created -object or existing object. - -See: [`get()`](#get), [`set()`](#set) - -```js -var obj = {}; -namespace(obj, 'foo.bar'); // {} -console.log(obj); // {foo:{bar:{}}} -``` - - - -## pick(obj, ...keys):Object - -Return a copy of the object that contains only the whitelisted keys. - -See: [`filter()`](#filter) - -```js -var user = { - firstName : 'John', - lastName : 'Doe', - dob : '1985/07/23', - gender : 'male' -}; - -// can pass an array of keys as second argument -var keys = ['firstName', 'dob'] -pick(user, keys); // {firstName:"John", dob: "1985/07/23"} - -// or multiple arguments -pick(user, 'firstName', 'lastName'); // {firstName:"John", lastName: "Doe"} -``` - - - -## pluck(obj, propName):Object - -Extract an object containing property values with keys as they appear in the -passed object. - -```js -var users = { - first: { - name : 'John', - age : 21 - }, - second: { - name : 'Mary', - age : 25 - } -}; - -pluck(users, 'name'); // {first: 'John', second: 'Mary'} ); -pluck(users, 'age'); // {first: 21, second: 25} ); -``` - - - -## reduce(obj, callback, initial, [thisObj]):* - -Similar to [Array/reduce](array.html#reduce). - -Apply a function against an accumulator and each property of the object (order -is undefined) as to reduce it to a single value. - -```js -var obj = {a: 1, b: 2, c: 3, d: 4}; - -function sum(prev, cur, key, list) { - compare1.push(prev); - return prev + cur; -} - -reduce(obj, sum); // 10 -``` - - - -## reject(obj, callback, thisObj):Object - -Returns a new object containing all properties where `callback` returns true, -similar to [Array/reject](array.html#reject). It does not use properties from -the object's prototype. Opposite of [`filter()`](#filter). - -See [`filter()`](#filter) - -### Example - -```js -var obj = {a: 1, b: 2, c: 3, d: 4, e: 5}; -reject(obj, function(x) { return (x % 2) !== 0; }); // {b: 2, d: 4} -``` - - - -## values(obj):Array - -Returns an array of all own enumerable properties values found upon a given object. - -PS: it won't return properties from the prototype. - -See: [`forOwn()`](#forOwn), [`keys()`](#keys) - -```js -var obj = { - foo : 1, - bar : 2, - lorem : 3 -}; -values(obj); // [1, 2, 3] -``` - - - -## set(obj, propName, value) - -Sets a nested property value. - -See: [`get()`](#get), [`namespace()`](#namespace) - -```js -var obj = {}; -set(obj, 'foo.bar', 123); -console.log(obj.foo.bar); // 123 -console.log(obj); // {foo:{bar:123}} -``` - - - -## size(obj):Number - -Returns the count of own enumerable properties found upon a given object. - -PS: it won't return properties from the prototype. - -See: [`forOwn()`](#forOwn), [`keys()`](#keys) - -```js -var obj = { - foo : 1, - bar : 2, - lorem : 3 -}; -size(obj); // 3 -``` - - - -## some(obj, callback, [thisObj]):Boolean - -Similar to [Array/some](array.html#some). Tests whether any properties in the -object pass the test implemented by the provided callback. - -```js -var obj = { - a: 1, - b: 2, - c: 3, - d: 'string' -}; - -some(obj, isNumber); // true -``` - - - -## unset(obj, propName):Boolean - -Delete object property if existent and returns a boolean indicating succes. It -will also return `true` if property doesn't exist. - -Some properties can't be deleted, to understand why [check this -article](http://perfectionkills.com/understanding-delete/). - -See: [`set()`](#set) - -```js -var lorem = { - ipsum : { - dolor : { - sit : 'amet' - } - } - }; - -unset(lorem, 'ipsum.dolor.sit'); // true -console.log(lorem.ipsum.dolor); // {} -unset(lorem, 'foo.bar'); // true -``` diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/queryString.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/queryString.md deleted file mode 100644 index 1be3c102..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/queryString.md +++ /dev/null @@ -1,115 +0,0 @@ -# queryString # - -Utilities for query string manipulation. - - - -## contains(url, paramName):Boolen - -Checks if query string contains parameter. - -### Arguments: - - 1. `url` (String) : URL or query string. - 2. `paramName` (String) : Parameter name. - -### Example: - -```js -var url = 'example.com/?lorem=ipsum'; -contains(url, 'lorem'); // true -contains(url, 'foo'); //false -``` - - - -## decode(queryStr[, shouldTypecast]):Object - -Parses query string and creates an object of keys => vals. - -Will typecast value with [`string/typecast`](string.html#typecast) by default -and decode string parameters using `decodeURIComponent()`. - -```js -var query = '?foo=bar&lorem=123'; -decode(query); // {foo: "bar", lorem: 123} -decode(query, false); // {foo: "bar", lorem: "123"} -``` - - -## encode(obj):String - -Encode object into a query string. - -Will encode parameters with `encodeURIComponent()`. - -```js -encode({foo: "bar", lorem: 123}); // "?foo=bar&lorem=123" -``` - - -## getParam(url, param[, shouldTypecast]):* - -Get query parameter value. - -Will typecast value with [`string/typecast`](string.html#typecast) by default. - -See: [`setParam()`](#setParam) - -### Arguments: - - 1. `url` (String) : Url. - 2. `param` (String) : Parameter name. - 3. `[shouldTypecast]` (Boolean) : If it should typecast value. - -### Example: - -```js -var url = 'example.com/?foo=bar&lorem=123&ipsum=false'; -getParam(url, 'dolor'); // "amet" -getParam(url, 'lorem'); // 123 -getParam(url, 'lorem', false); // "123" -``` - - -## parse(url[, shouldTypecast]):Object - -Parses URL, extracts query string and decodes it. - -It will typecast all properties of the query object unless second argument is -`false`. - -Alias to: `decode(getQuery(url))`. - -```js -var url = 'example.com/?lorem=ipsum&a=123'; -parse(url); // {lorem: "ipsum", a: 123} -parse(url, false); // {lorem: "ipsum", a: "123"} -``` - - -## getQuery(url):String - -Gets full query as string with all special chars decoded. - -```js -getQuery('example.com/?lorem=ipsum'); // "?lorem=ipsum" -``` - - -## setParam(url, paramName, value):String - -Add new query string parameter to URL or update existing value. - -See: [`getParam()`](#getParam) - -```js -setParam('?foo=bar&lorem=0', 'lorem', 'ipsum'); // '?foo=bar&lorem=ipsum' -setParam('?lorem=1', 'foo', 123); // '?lorem=1&foo=123' -``` - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/random.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/random.md deleted file mode 100644 index b058b4e0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/random.md +++ /dev/null @@ -1,218 +0,0 @@ -# random # - -Pseudo-random generators. - -mout uses `Math.random` by default on all the pseudo-random generators, if -you need a seeded random or a better algorithm see the [`random()`](#random) -documentation for instructions. - - - -## choice(...items):* - -Returns a random element from the supplied arguments or from an array if single -argument is an array. - -### Example: - -```js -choice(1, 2, 3, 4, 5); // 3 - -var arr = ['lorem', 'ipsum', 'dolor']; -choice(arr); // 'dolor' -``` - - - -## guid():String - -Generates a pseudo-random [Globally Unique Identifier](http://en.wikipedia.org/wiki/Globally_unique_identifier) (v4). - -Since the total number of GUIDs is 2<sup>122</sup> the chance of generating the -same value twice is negligible. - -**Important:** this method uses `Math.random` by default so the UUID isn't -*safe* (sequence of outputs can be predicted in some cases), check the -[`random()`](#random) documentation for more info on how to replace the default -PRNG if you need extra safety or need *seeded* results. - -See: [`randHex()`](#randHex), [`random()`](#random) - -### Example: - -```js -guid(); // 830e9f50-ac7f-4369-a14f-ed0e62b2fa0b -guid(); // 5de3d09b-e79c-4727-932b-48c49228d508 -``` - - - -## rand([min], [max]):Number - -Gets a random number inside range or snap to min/max values. - -### Arguments: - - 1. `[min]` (Number) : Minimum value. Defaults to `number/MIN_INT`. - 2. `[max]` (Number) : Maximum value. Defaults to `number/MAX_INT`. - - -### Example: - -```js -rand(); // 448740433.55274725 -rand(); // -31797596.097682 -rand(0, 10); // 7.369723 -rand(0, 10); // 5.987042 -``` - -See: [`random()`](#random) - - - -## randBit():Number - -Returns a random "bit" (0 or 1). Useful for addition/subtraction. - -It's slightly faster than `choice(0, 1)` since implementation is simpler (not -that it will make a huge difference in most cases). - -See: [`choice()`](#choice) - -### Example: - -```js -randBit(); // 1 -randBit(); // 0 - -//same effect as -choice(0, 1); -``` - - - -## randHex([size]):String - -Returns a random hexadecimal string. - -The default `size` is `6`. - -### Example: - -```js -randHex(); // "dd8575" -randHex(); // "e6baeb" -randHex(2); // "a2" -randHex(30); // "effd7e2ad9a4a3067e30525fab983a" -``` - - - -## randInt([min], [max]):Number - -Gets a random integer inside range or snap to min/max values. - -### Arguments: - - 1. `[min]` (Number) : Minimum value. Defaults to `number/MIN_INT`. - 2. `[max]` (Number) : Maximum value. Defaults to `number/MAX_INT`. - - -### Example: - -```js -randInt(); // 448740433 -randInt(); // -31797596 -randInt(0, 10); // 7 -randInt(0, 10); // 5 -``` - - - -## randSign():Number - -Returns a random "sign" (-1 or 1). Useful for multiplications. - -It's slightly faster than `choice(-1, 1)` since implementation is simpler (not -that it will make a huge difference in most cases). - -See: [`choice()`](#choice) - -### Example: - -```js -randSign(); // -1 -randSign(); // 1 - -//same effect as -choice(-1, 1); -``` - - - -## random():Number - -Returns a random number between `0` and `1`. Same as `Math.random()`. - -```js -random(); // 0.35435103671625257 -random(); // 0.8768321881070733 -``` - -**Important:** No methods inside mout should call `Math.random()` -directly, they all use `random/random` as a proxy, that way we can -inject/replace the pseudo-random number generator if needed (ie. in case we -need a seeded random or a better algorithm than the native one). - -### Replacing the PRNG - -In some cases we might need better/different algorithms than the one provided -by `Math.random` (ie. safer, seeded). - -Because of licensing issues, file size limitations and different needs we -decided to **not** implement a custom PRNG and instead provide a easy way to -override the default behavior. - [issue #99](https://github.com/millermedeiros/amd-utils/issues/99) - -If you are using mout with a loader that supports the [AMD map -config](https://github.com/amdjs/amdjs-api/wiki/Common-Config), such as -[RequireJS](http://requirejs.org/), you can use it to replace the PRNG -(recommended approach): - -```js -requirejs.config({ - map : { - // all modules will load "my_custom_prng" instead of - // "mout/random/random" - '*' : { - 'mout/random/random' : 'my_custom_prng' - } - } -}); -``` - -You also have the option to override `random.get` in case you are using -mout on node.js or with a loader which doesn't support the map config: - -```js -// replace the PRNG -var n = 0; -random.get = function(){ - return ++n % 2? 0 : 1; // not so random :P -}; -random(); // 0 -random(); // 1 -random(); // 0 -random(); // 1 -``` - -See this [detailed explanation about PRNG in -JavaScript](http://baagoe.org/en/w/index.php/Better_random_numbers_for_javascript) -to understand the issues with the native `Math.random` and also for a list of -algorithms that could be used instead. - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/string.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/string.md deleted file mode 100644 index 2b282315..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/string.md +++ /dev/null @@ -1,594 +0,0 @@ -# string # - -String utilities. - - -## camelCase(str):String - -Convert string to "camelCase" text. - -See: [`pascalCase()`](#pascalCase), [`unCamelCase()`](#unCamelCase) - -### Example - -```js -camelCase('lorem-ipsum-dolor'); // "loremIpsumDolor" -camelCase('lorem ipsum dolor'); // "loremIpsumDolor" -``` - - - -## contains(str, substring, [fromIndex]):Boolean - -Checks if string contains the given substring. - -See: [`startsWith()`](#startsWith), [`endsWith()`](#endsWith) - -### Example - -```js -contains('lorem', 'or'); // true -contains('lorem', 'bar'); // false -``` - - - -## crop(str, maxChars, [append]):String - -Truncate string at full words. Alias to `truncate(str, maxChars, append, true);`. - -See: [`truncate()`](#truncate) - -### Example - -```js -crop('lorem ipsum dolor', 10); // "lorem..." -crop('lorem ipsum dolor', 10, '+'); // "lorem+" -``` - - - -## endsWith(str, suffix):Boolean - -Checks if string ends with specified suffix. - -See: [`startsWith()`](#startsWith), [`contains()`](#contains) - -### Example - -```js -endsWith('lorem ipsum', 'lorem'); // false -endsWith('lorem ipsum', 'ipsum'); // true -``` - - - -## escapeHtml(str):String - -Escapes HTML special chars (`>`, `<`, `&`, `"`, `'`). - -See: [`unescapeHtml()`](#unescapeHtml) - -### Example - -```js -escapeHtml('lorem & "ipsum"'); // "lorem &amp; &quot;ipsum&quot;" -``` - - - -## escapeRegExp(str):String - -Escape special chars to be used as literals in RegExp constructors. - -### Example - -```js -str = escapeRegExp('[lorem.ipsum]'); // "\\[lorem\\.ipsum\\]" -reg = new RegExp(str); // /\[lorem\.ipsum\]/ -``` - - - -## escapeUnicode(str[, shouldEscapePrintable]):String - -Unicode escape chars. - -It will only escape non-printable ASCII chars unless `shouldEscapePrintable` is -set to `true`. - -See: [`unescapeUnicode()`](#unescapeUnicode) - -```js -escapeUnicode('føo bår'); -// > "f\u00f8o b\u00e5r" -escapeUnicode('føo bår', true); -// > "\u0066\u00f8\u006f\u0020\u0062\u00e5\u0072" -``` - - - -## hyphenate(str):String - -Replaces spaces with hyphens, split camelCase text, remove non-word chars, -remove accents and convert to lower case. - -See: [`slugify()`](#slugify), [`underscore()`](#underscore), -[`unhyphenate`](#unhyphenate) - -```js -hyphenate(' %# lorem ipsum ? $ dolor'); // "lorem-ipsum-dolor" -hyphenate('spéçïãl çhârs'); // "special-chars" -hyphenate('loremIpsum'); // "lorem-ipsum" -``` - - - -## interpolate(str, replacements[, syntax]):String - -String interpolation. Format/replace tokens with object properties. - -```js -var tmpl = 'Hello {{name}}!'; -interpolate(tmpl, {name: 'World'}); // "Hello World!" -interpolate(tmpl, {name: 'Lorem Ipsum'}); // "Hello Lorem Ipsum!" -``` - -It uses a mustache-like syntax by default but you can set your own format if -needed. You can also use Arrays for the replacements (since Arrays are -objects as well): - -```js -// matches everything inside "${}" -var syntax = /\$\{([^}]+)\}/g; -var tmpl = "Hello ${0}!"; -interpolate(tmpl, ['Foo Bar'], syntax); // "Hello Foo Bar!" -``` - - - -## lowerCase(str):String - -"Safer" `String.toLowerCase()`. (Used internally) - -### Example - -```js -(null).toLowerCase(); // Error! -(undefined).toLowerCase(); // Error! -lowerCase(null); // "" -lowerCase(undefined); // "" -``` - - - -## lpad(str, minLength[, char]):String - -Pad string from left with `char` if its' length is smaller than `minLen`. - -See: [`rpad()`](#rpad) - -### Example - -```js -lpad('a', 5); // " a" -lpad('a', 5, '-'); // "----a" -lpad('abc', 3, '-'); // "abc" -lpad('abc', 4, '-'); // "-abc" -``` - - - -## ltrim(str, [chars]):String - -Remove chars or white-spaces from beginning of string. - -`chars` is an array of chars to remove from the beginning of the string. If -`chars` is not specified, Unicode whitespace chars will be used instead. - -See: [`rtrim()`](#rtrim), [`trim()`](#trim) - -### Example - -```js -ltrim(' lorem ipsum '); // "lorem ipsum " -ltrim('--lorem ipsum--', ['-']); // "lorem ipsum--" -``` - - - -## makePath(...args):String - -Group arguments as path segments, if any of the args is `null` or `undefined` -it will be ignored from resulting path. It will also remove duplicate "/". - -See: [`array/join()`](array.html#join) - -### Example - -```js -makePath('lorem', 'ipsum', null, 'dolor'); // "lorem/ipsum/dolor" -makePath('foo///bar/'); // "foo/bar/" -``` - - - -## normalizeLineBreaks(str, [lineBreak]):String - -Normalize line breaks to a single format. Defaults to Unix `\n`. - -It handles DOS (`\r\n`), Mac (`\r`) and Unix (`\n`) formats. - -### Example - -```js -// "foo\nbar\nlorem\nipsum" -normalizeLineBreaks('foo\nbar\r\nlorem\ripsum'); - -// "foo\rbar\rlorem\ripsum" -normalizeLineBreaks('foo\nbar\r\nlorem\ripsum', '\r'); - -// "foo bar lorem ipsum" -normalizeLineBreaks('foo\nbar\r\nlorem\ripsum', ' '); -``` - - - -## pascalCase(str):String - -Convert string to "PascalCase" text. - -See: [`camelCase()`](#camelCase) - -### Example - -```js -pascalCase('lorem-ipsum-dolor'); // "LoremIpsumDolor" -pascalCase('lorem ipsum dolor'); // "LoremIpsumDolor" -``` - - - -## properCase(str):String - -UPPERCASE first char of each word, lowercase other chars. - -### Example - -```js -properCase('loRem iPSum'); // "Lorem Ipsum" -``` - - - -## removeNonASCII(str):String - -Remove [non-printable ASCII -chars](http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters). - -### Example - -```js -removeNonASCII('äÄçÇéÉêlorem-ipsumöÖÐþúÚ'); // "lorem-ipsum" -``` - - - -## removeNonWord(str):String - -Remove non-word chars. - -### Example - -```js -var str = 'lorem ~!@#$%^&*()_+`-={}[]|\\:";\'/?><., ipsum'; -removeNonWord(str); // "lorem - ipsum" -``` - - - -## repeat(str, n):String - -Repeat string n-times. - -### Example - -```js -repeat('a', 3); // "aaa" -repeat('bc', 2); // "bcbc" -repeat('a', 0); // "" -``` - - - -## replace(str, search, replacements):String - -Replace string(s) with the replacement(s) in the source. - -`search` and `replacements` can be an array, or a single item. For every item -in `search`, it will call `str.replace` with the search item and the matching -replacement in `replacements`. If `replacements` only contains one replacement, -it will be used for all the searches, otherwise it will use the replacement at -the same index as the search. - -### Example - -```js -replace('foo bar', 'foo', 'test'); // "test bar" -replace('test 1 2', ['1', '2'], 'n'); // "test n n" -replace('test 1 2', ['1', '2'], ['one', 'two']); // "test one two" -replace('123abc', [/\d/g, /[a-z]/g], ['0', '.']); // "000..." -``` - - - -## replaceAccents(str):String - -Replaces all accented chars with regular ones. - -**Important:** Only covers **Basic Latin** and **Latin-1** unicode chars. - -### Example - -```js -replaceAccents('spéçïãl çhârs'); // "special chars" -``` - - - -## rpad(str, minLength[, char]):String - -Pad string from right with `char` if its' length is smaller than `minLen`. - -See: [`lpad()`](#lpad) - -### Example - -```js -rpad('a', 5); // "a " -rpad('a', 5, '-'); // "a----" -rpad('abc', 3, '-'); // "abc" -rpad('abc', 4, '-'); // "abc-" -``` - - - -## rtrim(str, [chars]):String - -Remove chars or white-spaces from end of string. - -`chars` is an array of chars to remove from the end of the string. If -`chars` is not specified, Unicode whitespace chars will be used instead. - -See: [`trim()`](#trim), [`ltrim()`](#ltrim) - -### Example - -```js -rtrim(' lorem ipsum '); // " lorem ipsum" -rtrim('--lorem ipsum--', ['-']); // "--lorem ipsum" -``` - - - -## sentenceCase(str):String - -UPPERCASE first char of each sentence and lowercase other chars. - -### Example - -```js -var str = 'Lorem IpSum DoLOr. maeCeNnas Ullamcor.'; -sentenceCase(str); // "Lorem ipsum dolor. Maecennas ullamcor." -``` - - - -## stripHtmlTags(str):String - -Remove HTML/XML tags from string. - -### Example - -```js -var str = '<p><em>lorem</em> <strong>ipsum</strong></p>'; -stripHtmlTags(str); // "lorem ipsum" -``` - - - -## startsWith(str, prefix):Boolean - -Checks if string starts with specified prefix. - -See: [`endsWith()`](#endsWith), [`contains()`](#contains) - -### Example - -```js -startsWith('lorem ipsum', 'lorem'); // true -startsWith('lorem ipsum', 'ipsum'); // false -``` - - - -## slugify(str[, delimeter]):String - -Convert to lower case, remove accents, remove non-word chars and replace spaces -with the delimeter. The default delimeter is a hyphen. - -Note that this does not split camelCase text. - -See: [`hyphenate()`](#hyphenate) and [`underscore()`](#underscore) - -### Example - -```js -var str = 'loremIpsum dolor spéçïãl chârs'; -slugify(str); // "loremipsum-dolor-special-chars" -slugify(str, '_'); // "loremipsum_dolor_special_chars" -``` - - - -## trim(str, [chars]):String - -Remove chars or white-spaces from beginning and end of string. - -`chars` is an array of chars to remove from the beginning and end of the -string. If `chars` is not specified, Unicode whitespace chars will be used -instead. - -See: [`rtrim()`](#rtrim), [`ltrim()`](#ltrim) - -### Example - -```js -trim(' lorem ipsum '); // "lorem ipsum" -trim('-+-lorem ipsum-+-', ['-', '+']); // "lorem ipsum" -``` - - - -## truncate(str, maxChars, [append], [onlyFullWords]):String - -Limit number of chars. Returned string `length` will be `<= maxChars`. - -See: [`crop()`](#crop) - -### Arguments - - 1. `str` (String) : String - 2. `maxChars` (Number) : Maximum number of characters including `append.length`. - 3. `[append]` (String) : Value that should be added to the end of string. - Defaults to "...". - 4. `[onlyFullWords]` (Boolean) : If it shouldn't break words. Default is - `false`. (favor [`crop()`](#crop) since code will be clearer). - -### Example - -```js -truncate('lorem ipsum dolor', 11); // "lorem ip..." -truncate('lorem ipsum dolor', 11, '+'); // "lorem ipsu+" -truncate('lorem ipsum dolor', 11, null, true); // "lorem..." -``` - - - -## typecast(str):* - -Parses string and convert it into a native value. - -### Example - -```js -typecast('lorem ipsum'); // "lorem ipsum" -typecast('123'); // 123 -typecast('123.45'); // 123.45 -typecast('false'); // false -typecast('true'); // true -typecast('null'); // null -typecast('undefined'); // undefined -``` - - - -## unCamelCase(str, [delimiter]):String - -Add the delimiter between camelCase text and convert first char of each word to -lower case. - -The delimiter defaults to a space character. - -See: [`camelCase()`][#camelCase] - -### Example - -```js -unCamelCase('loremIpsumDolor'); // "lorem ipsum dolor" -unCamelCase('loremIpsumDolor', '-'); // "lorem-ipsum-color" -``` - - -## underscore(str):String - -Replaces spaces with underscores, split camelCase text, remove non-word chars, -remove accents and convert to lower case. - -See: [`slugify()`](#slugify), [`hyphenate()`](#hyphenate) - -```js -underscore(' %# lorem ipsum ? $ dolor'); // "lorem_ipsum_dolor" -underscore('spéçïãl çhârs'); // "special_chars" -underscore('loremIpsum'); // "lorem_ipsum" -``` - - - -## unescapeHtml(str):String - -Unescapes HTML special chars (`>`, `<`, `&`, `"`, `'`). - -See: [`escapeHtml()`](#escapeHtml) - -### Example - -```js -unescapeHtml('lorem &amp; &quot;ipsum&quot;'); // 'lorem & "ipsum"' -``` - - - -## unescapeUnicode(str):String - -Unescapes unicode char sequences. - -See: [`escapeUnicode()`](#escapeUnicode) - -```js -unescapeUnicode('\\u0066\\u00f8\\u006f\\u0020\\u0062\\u00e5\\u0072'); -// > 'føo bår' -``` - - - -## unhyphenate(str):String - -Replaces hyphens with spaces. (only hyphens between word chars) - -See : [`hyphenate()`](#hyphenate) - -### Example - -```js -unhyphenate('lorem-ipsum-dolor'); // "lorem ipsum dolor" -``` - - -## upperCase(str):String - -"Safer" `String.toUpperCase()`. (Used internally) - -### Example - -```js -(null).toUpperCase(); // Error! -(undefined).toUpperCase(); // Error! -upperCase(null); // "" -upperCase(undefined); // "" -``` - - - -## WHITE_SPACES:Array - -Constant array of all [Unicode white-space -characters](http://en.wikipedia.org/wiki/Whitespace_character). - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/time.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/time.md deleted file mode 100644 index 628c2a9b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/doc/time.md +++ /dev/null @@ -1,64 +0,0 @@ -# time # - -Utilities for time manipulation. - - -## convert(value, sourceUnit, [destinationUnit]):Number - -Converts time between units. - -Available units: `millisecond`, `second`, `minute`, `hour`, `day`, `week`. -Abbreviations: `ms`, `s`, `m`, `h`, `d`, `w`. - -We do **not** support year and month as a time unit since their values are not -fixed. - -The default `destinationUnit` is `ms`. - -```js -convert(1, 'minute'); // 60000 -convert(2.5, 's', 'ms'); // 2500 -convert(2, 'm', 's'); // 120 -convert(500, 'ms', 's'); // 0.5 -``` - - - -## now():Number - -Returns the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC. -Uses `Date.now()` if available. - -### Example - -```js -now(); // 1335449614650 -``` - - - -## parseMs(ms):Object - -Parse timestamp (milliseconds) into an object `{milliseconds:number, -seconds:number, minutes:number, hours:number, days:number}`. - -### Example - -```js -// {days:27, hours:4, minutes:26, seconds:5, milliseconds:454} -parseMs(2348765454); -``` - - - -## toTimeString(ms):String - -Convert timestamp (milliseconds) into a time string in the format "[H:]MM:SS". - -### Example - -```js -toTimeString(12513); // "00:12" -toTimeString(951233); // "15:51" -toTimeString(8765235); // "2:26:05" -``` diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function.js deleted file mode 100644 index 43a16ef4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function.js +++ /dev/null @@ -1,18 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'bind' : require('./function/bind'), - 'compose' : require('./function/compose'), - 'debounce' : require('./function/debounce'), - 'func' : require('./function/func'), - 'makeIterator_' : require('./function/makeIterator_'), - 'partial' : require('./function/partial'), - 'prop' : require('./function/prop'), - 'series' : require('./function/series'), - 'throttle' : require('./function/throttle'), - 'timeout' : require('./function/timeout') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/bind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/bind.js deleted file mode 100644 index 71bc1257..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/bind.js +++ /dev/null @@ -1,23 +0,0 @@ - - - function slice(arr, offset){ - return Array.prototype.slice.call(arr, offset || 0); - } - - /** - * Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. - * @param {Function} fn Function. - * @param {object} context Execution context. - * @param {rest} args Arguments (0...n arguments). - * @return {Function} Wrapped Function. - */ - function bind(fn, context, args){ - var argsArr = slice(arguments, 2); //curried args - return function(){ - return fn.apply(context, argsArr.concat(slice(arguments))); - }; - } - - module.exports = bind; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/compose.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/compose.js deleted file mode 100644 index 8cd5c5f3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/compose.js +++ /dev/null @@ -1,23 +0,0 @@ - - - /** - * Returns a function that composes multiple functions, passing results to - * each other. - */ - function compose() { - var fns = arguments; - return function(arg){ - // only cares about the first argument since the chain can only - // deal with a single return value anyway. It should start from - // the last fn. - var n = fns.length; - while (n--) { - arg = fns[n].call(this, arg); - } - return arg; - }; - } - - module.exports = compose; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/debounce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/debounce.js deleted file mode 100644 index a0ed07f5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/debounce.js +++ /dev/null @@ -1,29 +0,0 @@ - - - /** - * Debounce callback execution - */ - function debounce(fn, threshold, isAsap){ - var timeout, result; - function debounced(){ - var args = arguments, context = this; - function delayed(){ - if (! isAsap) { - result = fn.apply(context, args); - } - timeout = null; - } - if (timeout) { - clearTimeout(timeout); - } else if (isAsap) { - result = fn.apply(context, args); - } - timeout = setTimeout(delayed, threshold); - return result; - } - return debounced; - } - - module.exports = debounce; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/func.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/func.js deleted file mode 100644 index b81bf0a8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/func.js +++ /dev/null @@ -1,14 +0,0 @@ - - - /** - * Returns a function that call a method on the passed object - */ - function func(name){ - return function(obj){ - return obj[name](); - }; - } - - module.exports = func; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/makeIterator_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/makeIterator_.js deleted file mode 100644 index 767610a5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/makeIterator_.js +++ /dev/null @@ -1,34 +0,0 @@ -var prop = require('./prop'); -var deepMatches = require('../object/deepMatches'); - - /** - * Converts argument into a valid iterator. - * Used internally on most array/object/collection methods that receives a - * callback/iterator providing a shortcut syntax. - */ - function makeIterator(src, thisObj){ - switch(typeof src) { - case 'object': - // typeof null == "object" - return (src != null)? function(val, key, target){ - return deepMatches(val, src); - } : src; - case 'string': - case 'number': - return prop(src); - case 'function': - if (typeof thisObj === 'undefined') { - return src; - } else { - return function(val, i, arr){ - return src.call(thisObj, val, i, arr); - }; - } - default: - return src; - } - } - - module.exports = makeIterator; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/partial.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/partial.js deleted file mode 100644 index d63ff1be..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/partial.js +++ /dev/null @@ -1,19 +0,0 @@ - - - function slice(arr, offset){ - return Array.prototype.slice.call(arr, offset || 0); - } - - /** - * Creates a partially applied function. - */ - function partial(fn, var_args){ - var argsArr = slice(arguments, 1); //curried args - return function(){ - return fn.apply(this, argsArr.concat(slice(arguments))); - }; - } - - module.exports = partial; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/prop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/prop.js deleted file mode 100644 index 734acb7a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/prop.js +++ /dev/null @@ -1,14 +0,0 @@ - - - /** - * Returns a function that gets a property of the passed object - */ - function prop(name){ - return function(obj){ - return obj[name]; - }; - } - - module.exports = prop; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/series.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/series.js deleted file mode 100644 index 25159c2c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/series.js +++ /dev/null @@ -1,22 +0,0 @@ - - - /** - * Returns a function that will execute a list of functions in sequence - * passing the same arguments to each one. (useful for batch processing - * items during a forEach loop) - */ - function series(){ - var fns = arguments; - return function(){ - var i = 0, - n = fns.length; - while (i < n) { - fns[i].apply(this, arguments); - i += 1; - } - }; - } - - module.exports = series; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/throttle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/throttle.js deleted file mode 100644 index 619dc540..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/throttle.js +++ /dev/null @@ -1,32 +0,0 @@ -var now = require('../time/now'); - - /** - */ - function throttle(fn, delay){ - var context, timeout, result, args, - cur, diff, prev = 0; - function delayed(){ - prev = now(); - timeout = null; - result = fn.apply(context, args); - } - function throttled(){ - context = this; - args = arguments; - cur = now(); - diff = delay - (cur - prev); - if (diff <= 0) { - clearTimeout(timeout); - prev = cur; - result = fn.apply(context, args); - } else if (! timeout) { - timeout = setTimeout(delayed, diff); - } - return result; - } - return throttled; - } - - module.exports = throttle; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/timeout.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/timeout.js deleted file mode 100644 index e0d21a66..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/function/timeout.js +++ /dev/null @@ -1,21 +0,0 @@ - - - function slice(arr, offset){ - return Array.prototype.slice.call(arr, offset || 0); - } - - /** - * Delays the call of a function within a given context. - */ - function timeout(fn, millis, context){ - - var args = slice(arguments, 3); - - return setTimeout(function() { - fn.apply(context, args); - }, millis); - } - - module.exports = timeout; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/index.js deleted file mode 100644 index 32a1c639..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/**@license - * mout v0.6.0 | http://moutjs.com | MIT license - */ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'VERSION' : '0.6.0', - 'array' : require('./array'), - 'collection' : require('./collection'), - 'date' : require('./date'), - 'function' : require('./function'), - 'lang' : require('./lang'), - 'math' : require('./math'), - 'number' : require('./number'), - 'object' : require('./object'), - 'queryString' : require('./queryString'), - 'random' : require('./random'), - 'string' : require('./string'), - 'time' : require('./time') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang.js deleted file mode 100644 index b9816218..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang.js +++ /dev/null @@ -1,36 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'clone' : require('./lang/clone'), - 'createObject' : require('./lang/createObject'), - 'ctorApply' : require('./lang/ctorApply'), - 'deepClone' : require('./lang/deepClone'), - 'defaults' : require('./lang/defaults'), - 'inheritPrototype' : require('./lang/inheritPrototype'), - 'is' : require('./lang/is'), - 'isArguments' : require('./lang/isArguments'), - 'isArray' : require('./lang/isArray'), - 'isBoolean' : require('./lang/isBoolean'), - 'isDate' : require('./lang/isDate'), - 'isEmpty' : require('./lang/isEmpty'), - 'isFinite' : require('./lang/isFinite'), - 'isFunction' : require('./lang/isFunction'), - 'isInteger' : require('./lang/isInteger'), - 'isKind' : require('./lang/isKind'), - 'isNaN' : require('./lang/isNaN'), - 'isNull' : require('./lang/isNull'), - 'isNumber' : require('./lang/isNumber'), - 'isObject' : require('./lang/isObject'), - 'isPlainObject' : require('./lang/isPlainObject'), - 'isRegExp' : require('./lang/isRegExp'), - 'isString' : require('./lang/isString'), - 'isUndefined' : require('./lang/isUndefined'), - 'isnt' : require('./lang/isnt'), - 'kindOf' : require('./lang/kindOf'), - 'toArray' : require('./lang/toArray'), - 'toString' : require('./lang/toString') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/clone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/clone.js deleted file mode 100644 index 33c4e949..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/clone.js +++ /dev/null @@ -1,49 +0,0 @@ -var kindOf = require('./kindOf'); -var isPlainObject = require('./isPlainObject'); -var mixIn = require('../object/mixIn'); - - /** - * Clone native types. - */ - function clone(val){ - switch (kindOf(val)) { - case 'Object': - return cloneObject(val); - case 'Array': - return cloneArray(val); - case 'RegExp': - return cloneRegExp(val); - case 'Date': - return cloneDate(val); - default: - return val; - } - } - - function cloneObject(source) { - if (isPlainObject(source)) { - return mixIn({}, source); - } else { - return source; - } - } - - function cloneRegExp(r) { - var flags = ''; - flags += r.multiline ? 'm' : ''; - flags += r.global ? 'g' : ''; - flags += r.ignorecase ? 'i' : ''; - return new RegExp(r.source, flags); - } - - function cloneDate(date) { - return new Date(+date); - } - - function cloneArray(arr) { - return arr.slice(); - } - - module.exports = clone; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/createObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/createObject.js deleted file mode 100644 index bbc14c1d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/createObject.js +++ /dev/null @@ -1,18 +0,0 @@ -var mixIn = require('../object/mixIn'); - - /** - * Create Object using prototypal inheritance and setting custom properties. - * - Mix between Douglas Crockford Prototypal Inheritance <http://javascript.crockford.com/prototypal.html> and the EcmaScript 5 `Object.create()` method. - * @param {object} parent Parent Object. - * @param {object} [props] Object properties. - * @return {object} Created object. - */ - function createObject(parent, props){ - function F(){} - F.prototype = parent; - return mixIn(new F(), props); - - } - module.exports = createObject; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/ctorApply.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/ctorApply.js deleted file mode 100644 index d68dc506..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/ctorApply.js +++ /dev/null @@ -1,17 +0,0 @@ - - - function F(){} - - /** - * Do fn.apply on a constructor. - */ - function ctorApply(ctor, args) { - F.prototype = ctor.prototype; - var instance = new F(); - ctor.apply(instance, args); - return instance; - } - - module.exports = ctorApply; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/deepClone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/deepClone.js deleted file mode 100644 index 25fd95f1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/deepClone.js +++ /dev/null @@ -1,48 +0,0 @@ -var clone = require('./clone'); -var forOwn = require('../object/forOwn'); -var kindOf = require('./kindOf'); -var isPlainObject = require('./isPlainObject'); - - /** - * Recursively clone native types. - */ - function deepClone(val, instanceClone) { - switch ( kindOf(val) ) { - case 'Object': - return cloneObject(val, instanceClone); - case 'Array': - return cloneArray(val, instanceClone); - default: - return clone(val); - } - } - - function cloneObject(source, instanceClone) { - if (isPlainObject(source)) { - var out = {}; - forOwn(source, function(val, key) { - this[key] = deepClone(val, instanceClone); - }, out); - return out; - } else if (instanceClone) { - return instanceClone(source); - } else { - return source; - } - } - - function cloneArray(arr, instanceClone) { - var out = [], - i = -1, - n = arr.length, - val; - while (++i < n) { - out[i] = deepClone(arr[i], instanceClone); - } - return out; - } - - module.exports = deepClone; - - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/defaults.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/defaults.js deleted file mode 100644 index 1111b2ef..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/defaults.js +++ /dev/null @@ -1,17 +0,0 @@ -var toArray = require('./toArray'); -var find = require('../array/find'); - - /** - * Return first non void argument - */ - function defaults(var_args){ - return find(toArray(arguments), nonVoid); - } - - function nonVoid(val){ - return val != null; - } - - module.exports = defaults; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/inheritPrototype.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/inheritPrototype.js deleted file mode 100644 index cd8a379e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/inheritPrototype.js +++ /dev/null @@ -1,16 +0,0 @@ -var createObject = require('./createObject'); - - /** - * Inherit prototype from another Object. - * - inspired by Nicholas Zackas <http://nczonline.net> Solution - * @param {object} child Child object - * @param {object} parent Parent Object - */ - function inheritPrototype(child, parent){ - var p = createObject(parent.prototype); - p.constructor = child; - child.prototype = p; - } - - module.exports = inheritPrototype; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/is.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/is.js deleted file mode 100644 index 4a835739..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/is.js +++ /dev/null @@ -1,23 +0,0 @@ - - - /** - * Check if both arguments are egal. - */ - function is(x, y){ - // implementation borrowed from harmony:egal spec - if (x === y) { - // 0 === -0, but they are not identical - return x !== 0 || 1 / x === 1 / y; - } - - // NaN !== NaN, but they are identical. - // NaNs are the only non-reflexive value, i.e., if x !== x, - // then x is a NaN. - // isNaN is broken: it converts its argument to number, so - // isNaN("foo") => true - return x !== x && y !== y; - } - - module.exports = is; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isArguments.js deleted file mode 100644 index f7b08ba4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isArguments.js +++ /dev/null @@ -1,15 +0,0 @@ -var isKind = require('./isKind'); - - /** - */ - var isArgs = isKind(arguments, 'Arguments')? - function(val){ - return isKind(val, 'Arguments'); - } : - function(val){ - // Arguments is an Object on IE7 - return !!(val && Object.prototype.hasOwnProperty.call(val, 'callee')); - }; - - module.exports = isArgs; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isArray.js deleted file mode 100644 index 262ee400..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isArray.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - var isArray = Array.isArray || function (val) { - return isKind(val, 'Array'); - }; - module.exports = isArray; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isBoolean.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isBoolean.js deleted file mode 100644 index 86557cb9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isBoolean.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isBoolean(val) { - return isKind(val, 'Boolean'); - } - module.exports = isBoolean; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isDate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isDate.js deleted file mode 100644 index 4a5130f2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isDate.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isDate(val) { - return isKind(val, 'Date'); - } - module.exports = isDate; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isEmpty.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isEmpty.js deleted file mode 100644 index 0e9f77da..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isEmpty.js +++ /dev/null @@ -1,24 +0,0 @@ -var forOwn = require('../object/forOwn'); -var isArray = require('./isArray'); - - function isEmpty(val){ - if (val == null) { - // typeof null == 'object' so we check it first - return false; - } else if ( typeof val === 'string' || isArray(val) ) { - return !val.length; - } else if ( typeof val === 'object' || typeof val === 'function' ) { - var result = true; - forOwn(val, function(){ - result = false; - return false; // break loop - }); - return result; - } else { - return false; - } - } - - module.exports = isEmpty; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isFinite.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isFinite.js deleted file mode 100644 index 6d4006f9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isFinite.js +++ /dev/null @@ -1,21 +0,0 @@ -var isNumber = require('./isNumber'); - - var global = this; - - /** - * Check if value is finite - */ - function isFinite(val){ - var is = false; - if (typeof val === 'string' && val !== '') { - is = global.isFinite( parseFloat(val) ); - } else if (isNumber(val)){ - // need to use isNumber because of Number constructor - is = global.isFinite( val ); - } - return is; - } - - module.exports = isFinite; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isFunction.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isFunction.js deleted file mode 100644 index 216879f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isFunction.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isFunction(val) { - return isKind(val, 'Function'); - } - module.exports = isFunction; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isInteger.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isInteger.js deleted file mode 100644 index 29f95d96..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isInteger.js +++ /dev/null @@ -1,12 +0,0 @@ -var isNumber = require('./isNumber'); - - /** - * Check if value is an integer - */ - function isInteger(val){ - return isNumber(val) && (val % 1 === 0); - } - - module.exports = isInteger; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isKind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isKind.js deleted file mode 100644 index 02301e04..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isKind.js +++ /dev/null @@ -1,9 +0,0 @@ -var kindOf = require('./kindOf'); - /** - * Check if value is from a specific "kind". - */ - function isKind(val, kind){ - return kindOf(val) === kind; - } - module.exports = isKind; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isNaN.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isNaN.js deleted file mode 100644 index f6efeb1f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isNaN.js +++ /dev/null @@ -1,15 +0,0 @@ -var isNumber = require('./isNumber'); - - /** - * Check if value is NaN for realz - */ - function isNaN(val){ - // based on the fact that NaN !== NaN - // need to check if it's a number to avoid conflicts with host objects - // also need to coerce ToNumber to avoid edge case `new Number(NaN)` - return !isNumber(val) || val != +val; - } - - module.exports = isNaN; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isNull.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isNull.js deleted file mode 100644 index 6252f9ef..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isNull.js +++ /dev/null @@ -1,9 +0,0 @@ - - /** - */ - function isNull(val){ - return val === null; - } - module.exports = isNull; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isNumber.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isNumber.js deleted file mode 100644 index 126c1cce..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isNumber.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isNumber(val) { - return isKind(val, 'Number'); - } - module.exports = isNumber; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isObject.js deleted file mode 100644 index 7350c891..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isObject.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isObject(val) { - return isKind(val, 'Object'); - } - module.exports = isObject; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isPlainObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isPlainObject.js deleted file mode 100644 index 0d2d7b65..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isPlainObject.js +++ /dev/null @@ -1,14 +0,0 @@ - - - /** - * Checks if the value is created by the `Object` constructor. - */ - function isPlainObject(value) { - return (!!value - && typeof value === 'object' - && value.constructor === Object); - } - - module.exports = isPlainObject; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isRegExp.js deleted file mode 100644 index fc5459a9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isRegExp.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isRegExp(val) { - return isKind(val, 'RegExp'); - } - module.exports = isRegExp; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isString.js deleted file mode 100644 index f8906584..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isString.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isString(val) { - return isKind(val, 'String'); - } - module.exports = isString; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isUndefined.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isUndefined.js deleted file mode 100644 index fb2261df..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isUndefined.js +++ /dev/null @@ -1,10 +0,0 @@ - - var UNDEF; - - /** - */ - function isUndef(val){ - return val === UNDEF; - } - module.exports = isUndef; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isnt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isnt.js deleted file mode 100644 index 9dad58ce..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/isnt.js +++ /dev/null @@ -1,12 +0,0 @@ -var is = require('./is'); - - /** - * Check if both values are not identical/egal - */ - function isnt(x, y){ - return !is(x, y); - } - - module.exports = isnt; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/kindOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/kindOf.js deleted file mode 100644 index 663464d0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/kindOf.js +++ /dev/null @@ -1,20 +0,0 @@ - - - var _rKind = /^\[object (.*)\]$/, - _toString = Object.prototype.toString, - UNDEF; - - /** - * Gets the "kind" of value. (e.g. "String", "Number", etc) - */ - function kindOf(val) { - if (val === null) { - return 'Null'; - } else if (val === UNDEF) { - return 'Undefined'; - } else { - return _rKind.exec( _toString.call(val) )[1]; - } - } - module.exports = kindOf; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/toArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/toArray.js deleted file mode 100644 index e39b8734..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/toArray.js +++ /dev/null @@ -1,31 +0,0 @@ -var kindOf = require('./kindOf'); - - var _win = this; - - /** - * Convert array-like object into array - */ - function toArray(val){ - var ret = [], - kind = kindOf(val), - n; - - if (val != null) { - if ( val.length == null || kind === 'String' || kind === 'Function' || kind === 'RegExp' || val === _win ) { - //string, regexp, function have .length but user probably just want - //to wrap value into an array.. - ret[ret.length] = val; - } else { - //window returns true on isObject in IE7 and may have length - //property. `typeof NodeList` returns `function` on Safari so - //we can't use it (#58) - n = val.length; - while (n--) { - ret[n] = val[n]; - } - } - } - return ret; - } - module.exports = toArray; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/toString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/toString.js deleted file mode 100644 index ae5c2b0f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/lang/toString.js +++ /dev/null @@ -1,13 +0,0 @@ - - - /** - * Typecast a value to a String, using an empty string value for null or - * undefined. - */ - function toString(val){ - return val == null ? '' : val.toString(); - } - - module.exports = toString; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math.js deleted file mode 100644 index c6ee889b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math.js +++ /dev/null @@ -1,19 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'ceil' : require('./math/ceil'), - 'clamp' : require('./math/clamp'), - 'countSteps' : require('./math/countSteps'), - 'floor' : require('./math/floor'), - 'inRange' : require('./math/inRange'), - 'isNear' : require('./math/isNear'), - 'lerp' : require('./math/lerp'), - 'loop' : require('./math/loop'), - 'map' : require('./math/map'), - 'norm' : require('./math/norm'), - 'round' : require('./math/round') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/ceil.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/ceil.js deleted file mode 100644 index a279e158..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/ceil.js +++ /dev/null @@ -1,11 +0,0 @@ - - /** - * Round value up with a custom radix. - */ - function ceil(val, step){ - step = Math.abs(step || 1); - return Math.ceil(val / step) * step; - } - - module.exports = ceil; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/clamp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/clamp.js deleted file mode 100644 index e929a9a6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/clamp.js +++ /dev/null @@ -1,9 +0,0 @@ - - /** - * Clamps value inside range. - */ - function clamp(val, min, max){ - return val < min? min : (val > max? max : val); - } - module.exports = clamp; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/countSteps.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/countSteps.js deleted file mode 100644 index 60ac90c3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/countSteps.js +++ /dev/null @@ -1,16 +0,0 @@ - - /** - * Count number of full steps. - */ - function countSteps(val, step, overflow){ - val = Math.floor(val / step); - - if (overflow) { - return val % overflow; - } - - return val; - } - - module.exports = countSteps; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/floor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/floor.js deleted file mode 100644 index 9de50531..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/floor.js +++ /dev/null @@ -1,10 +0,0 @@ - - /** - * Floor value to full steps. - */ - function floor(val, step){ - step = Math.abs(step || 1); - return Math.floor(val / step) * step; - } - module.exports = floor; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/inRange.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/inRange.js deleted file mode 100644 index 763218f8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/inRange.js +++ /dev/null @@ -1,11 +0,0 @@ - - /** - * Checks if value is inside the range. - */ - function inRange(val, min, max, threshold){ - threshold = threshold || 0; - return (val + threshold >= min && val - threshold <= max); - } - - module.exports = inRange; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/isNear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/isNear.js deleted file mode 100644 index 45486b6d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/isNear.js +++ /dev/null @@ -1,9 +0,0 @@ - - /** - * Check if value is close to target. - */ - function isNear(val, target, threshold){ - return (Math.abs(val - target) <= threshold); - } - module.exports = isNear; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/lerp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/lerp.js deleted file mode 100644 index 111e2717..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/lerp.js +++ /dev/null @@ -1,11 +0,0 @@ - - /** - * Linear interpolation. - * IMPORTANT:will return `Infinity` if numbers overflow Number.MAX_VALUE - */ - function lerp(ratio, start, end){ - return start + (end - start) * ratio; - } - - module.exports = lerp; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/loop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/loop.js deleted file mode 100644 index 35207c1a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/loop.js +++ /dev/null @@ -1,10 +0,0 @@ - - /** - * Loops value inside range. - */ - function loop(val, min, max){ - return val < min? max : (val > max? min : val); - } - - module.exports = loop; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/map.js deleted file mode 100644 index 96c4b787..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/map.js +++ /dev/null @@ -1,11 +0,0 @@ -var lerp = require('./lerp'); -var norm = require('./norm'); - /** - * Maps a number from one scale to another. - * @example map(3, 0, 4, -1, 1) -> 0.5 - */ - function map(val, min1, max1, min2, max2){ - return lerp( norm(val, min1, max1), min2, max2 ); - } - module.exports = map; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/norm.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/norm.js deleted file mode 100644 index 54caf78a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/norm.js +++ /dev/null @@ -1,9 +0,0 @@ - - /** - * Gets normalized ratio of value inside range. - */ - function norm(val, min, max){ - return (val - min) / (max - min); - } - module.exports = norm; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/round.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/round.js deleted file mode 100644 index d108e6cd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/math/round.js +++ /dev/null @@ -1,12 +0,0 @@ - - /** - * Round number to a specific radix - */ - function round(value, radix){ - radix = radix || 1; // default round 1 - return Math.round(value / radix) * radix; - } - - module.exports = round; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number.js deleted file mode 100644 index 0b6186cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number.js +++ /dev/null @@ -1,21 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'MAX_INT' : require('./number/MAX_INT'), - 'MAX_UINT' : require('./number/MAX_UINT'), - 'MIN_INT' : require('./number/MIN_INT'), - 'abbreviate' : require('./number/abbreviate'), - 'currencyFormat' : require('./number/currencyFormat'), - 'enforcePrecision' : require('./number/enforcePrecision'), - 'pad' : require('./number/pad'), - 'rol' : require('./number/rol'), - 'ror' : require('./number/ror'), - 'sign' : require('./number/sign'), - 'toInt' : require('./number/toInt'), - 'toUInt' : require('./number/toUInt'), - 'toUInt31' : require('./number/toUInt31') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/MAX_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/MAX_INT.js deleted file mode 100644 index 1d6f0e48..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/MAX_INT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Maximum 32-bit signed integer value. (2^31 - 1) - */ - - module.exports = 2147483647; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/MAX_UINT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/MAX_UINT.js deleted file mode 100644 index 700da0f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/MAX_UINT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Maximum 32-bit unsigned integet value (2^32 - 1) - */ - - module.exports = 4294967295; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/MIN_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/MIN_INT.js deleted file mode 100644 index b34ab2ce..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/MIN_INT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Minimum 32-bit signed integer value (-2^31). - */ - - module.exports = -2147483648; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/abbreviate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/abbreviate.js deleted file mode 100644 index dd6716b9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/abbreviate.js +++ /dev/null @@ -1,35 +0,0 @@ -var enforcePrecision = require('./enforcePrecision'); - - var _defaultDict = { - thousand : 'K', - million : 'M', - billion : 'B' - }; - - /** - * Abbreviate number if bigger than 1000. (eg: 2.5K, 17.5M, 3.4B, ...) - */ - function abbreviateNumber(val, nDecimals, dict){ - nDecimals = nDecimals != null? nDecimals : 1; - dict = dict || _defaultDict; - val = enforcePrecision(val, nDecimals); - - var str, mod; - - if (val < 1000000) { - mod = enforcePrecision(val / 1000, nDecimals); - // might overflow to next scale during rounding - str = mod < 1000? mod + dict.thousand : 1 + dict.million; - } else if (val < 1000000000) { - mod = enforcePrecision(val / 1000000, nDecimals); - str = mod < 1000? mod + dict.million : 1 + dict.billion; - } else { - str = enforcePrecision(val / 1000000000, nDecimals) + dict.billion; - } - - return str; - } - - module.exports = abbreviateNumber; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/currencyFormat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/currencyFormat.js deleted file mode 100644 index 1cf02497..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/currencyFormat.js +++ /dev/null @@ -1,26 +0,0 @@ - - - /** - * Converts number into currency format - */ - function currencyFormat(val, nDecimalDigits, decimalSeparator, thousandsSeparator) { - nDecimalDigits = nDecimalDigits == null? 2 : nDecimalDigits; - decimalSeparator = decimalSeparator == null? '.' : decimalSeparator; - thousandsSeparator = thousandsSeparator == null? ',' : thousandsSeparator; - - //can't use enforce precision since it returns a number and we are - //doing a RegExp over the string - var fixed = val.toFixed(nDecimalDigits), - //separate begin [$1], middle [$2] and decimal digits [$4] - parts = new RegExp('^(-?\\d{1,3})((?:\\d{3})+)(\\.(\\d{'+ nDecimalDigits +'}))?$').exec( fixed ); - - if(parts){ //val >= 1000 || val <= -1000 - return parts[1] + parts[2].replace(/\d{3}/g, thousandsSeparator + '$&') + (parts[4] ? decimalSeparator + parts[4] : ''); - }else{ - return fixed.replace('.', decimalSeparator); - } - } - - module.exports = currencyFormat; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/enforcePrecision.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/enforcePrecision.js deleted file mode 100644 index f73a92d7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/enforcePrecision.js +++ /dev/null @@ -1,13 +0,0 @@ - - /** - * Enforce a specific amount of decimal digits and also fix floating - * point rounding issues. - * @example `enforcePrecision(0.615, 2) -> 0.62`, `(0.615).toFixed(2) -> - * 0.61` - */ - function enforcePrecision(val, nDecimalDigits){ - var pow = Math.pow(10, nDecimalDigits); - return +(Math.round(val * pow) / pow).toFixed(nDecimalDigits); - } - module.exports = enforcePrecision; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/pad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/pad.js deleted file mode 100644 index da752706..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/pad.js +++ /dev/null @@ -1,12 +0,0 @@ -var lpad = require('../string/lpad'); - - /** - * Add padding zeros if n.length < minLength. - */ - function pad(n, minLength, char){ - return lpad(''+ n, minLength, char || '0'); - } - - module.exports = pad; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/rol.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/rol.js deleted file mode 100644 index ecd58da4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/rol.js +++ /dev/null @@ -1,10 +0,0 @@ - - /** - * Bitwise circular shift left - * http://en.wikipedia.org/wiki/Circular_shift - */ - function rol(val, shift){ - return (val << shift) | (val >> (32 - shift)); - } - module.exports = rol; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/ror.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/ror.js deleted file mode 100644 index 2eda81da..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/ror.js +++ /dev/null @@ -1,10 +0,0 @@ - - /** - * Bitwise circular shift right - * http://en.wikipedia.org/wiki/Circular_shift - */ - function ror(val, shift){ - return (val >> shift) | (val << (32 - shift)); - } - module.exports = ror; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/sign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/sign.js deleted file mode 100644 index b854a4ed..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/sign.js +++ /dev/null @@ -1,15 +0,0 @@ - - - /** - * Get sign of the value. - */ - function sign(val) { - var num = Number(val); - if (num === 0) return num; // +0 and +0 === 0 - if (isNaN(num)) return num; // NaN - return num < 0? -1 : 1; - } - - module.exports = sign; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/toInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/toInt.js deleted file mode 100644 index bcefae0e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/toInt.js +++ /dev/null @@ -1,15 +0,0 @@ - - - /** - * "Convert" value into an 32-bit integer. - * Works like `Math.floor` if val > 0 and `Math.ceil` if val < 0. - * IMPORTANT: val will wrap at 2^31 and -2^31. - * Perf tests: http://jsperf.com/vs-vs-parseint-bitwise-operators/7 - */ - function toInt(val){ - return ~~val; - } - - module.exports = toInt; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/toUInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/toUInt.js deleted file mode 100644 index 5290b627..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/toUInt.js +++ /dev/null @@ -1,13 +0,0 @@ - - - /** - * "Convert" value into a 32-bit unsigned integer. - * IMPORTANT: Value will wrap at 2^32. - */ - function toUInt(val){ - return val >>> 0; - } - - module.exports = toUInt; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/toUInt31.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/toUInt31.js deleted file mode 100644 index fcc5a97c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/number/toUInt31.js +++ /dev/null @@ -1,13 +0,0 @@ -var MAX_INT = require('./MAX_INT'); - - /** - * "Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). - * IMPORTANT: value wil wrap at 2^31, if negative will return 0. - */ - function toUInt31(val){ - return (val <= 0)? 0 : (val > MAX_INT? ~~(val % (MAX_INT + 1)) : ~~val); - } - - module.exports = toUInt31; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object.js deleted file mode 100644 index 76c06424..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object.js +++ /dev/null @@ -1,42 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'bindAll' : require('./object/bindAll'), - 'contains' : require('./object/contains'), - 'deepEquals' : require('./object/deepEquals'), - 'deepFillIn' : require('./object/deepFillIn'), - 'deepMatches' : require('./object/deepMatches'), - 'deepMixIn' : require('./object/deepMixIn'), - 'equals' : require('./object/equals'), - 'every' : require('./object/every'), - 'fillIn' : require('./object/fillIn'), - 'filter' : require('./object/filter'), - 'find' : require('./object/find'), - 'forIn' : require('./object/forIn'), - 'forOwn' : require('./object/forOwn'), - 'functions' : require('./object/functions'), - 'get' : require('./object/get'), - 'has' : require('./object/has'), - 'hasOwn' : require('./object/hasOwn'), - 'keys' : require('./object/keys'), - 'map' : require('./object/map'), - 'matches' : require('./object/matches'), - 'max' : require('./object/max'), - 'merge' : require('./object/merge'), - 'min' : require('./object/min'), - 'mixIn' : require('./object/mixIn'), - 'namespace' : require('./object/namespace'), - 'pick' : require('./object/pick'), - 'pluck' : require('./object/pluck'), - 'reduce' : require('./object/reduce'), - 'reject' : require('./object/reject'), - 'set' : require('./object/set'), - 'size' : require('./object/size'), - 'some' : require('./object/some'), - 'unset' : require('./object/unset'), - 'values' : require('./object/values') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/bindAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/bindAll.js deleted file mode 100644 index b2f27d08..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/bindAll.js +++ /dev/null @@ -1,18 +0,0 @@ -var functions = require('./functions'); -var bind = require('../function/bind'); -var forEach = require('../array/forEach'); - - /** - * Binds methods of the object to be run in it's own context. - */ - function bindAll(obj, rest_methodNames){ - var keys = arguments.length > 1? - Array.prototype.slice.call(arguments, 1) : functions(obj); - forEach(keys, function(key){ - obj[key] = bind(obj[key], obj); - }); - } - - module.exports = bindAll; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/contains.js deleted file mode 100644 index 8076e2c5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/contains.js +++ /dev/null @@ -1,13 +0,0 @@ -var some = require('./some'); - - /** - * Check if object contains value - */ - function contains(obj, needle) { - return some(obj, function(val) { - return (val === needle); - }); - } - module.exports = contains; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/deepEquals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/deepEquals.js deleted file mode 100644 index fcde9449..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/deepEquals.js +++ /dev/null @@ -1,27 +0,0 @@ -var isObject = require('../lang/isObject'); -var equals = require('./equals'); - - function defaultCompare(a, b) { - return a === b; - } - - /** - * Recursively checks for same properties and values. - */ - function deepEquals(a, b, callback){ - callback = callback || defaultCompare; - - if (!isObject(a) || !isObject(b)) { - return callback(a, b); - } - - function compare(a, b){ - return deepEquals(a, b, callback); - } - - return equals(a, b, compare); - } - - module.exports = deepEquals; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/deepFillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/deepFillIn.js deleted file mode 100644 index d27db44d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/deepFillIn.js +++ /dev/null @@ -1,32 +0,0 @@ -var forOwn = require('./forOwn'); -var isPlainObject = require('../lang/isPlainObject'); - - /** - * Deeply copy missing properties in the target from the defaults. - */ - function deepFillIn(target, defaults){ - var i = 0, - n = arguments.length, - obj; - - while(++i < n) { - obj = arguments[i]; - if (obj) { - forOwn(obj, function(newValue, key) { - var curValue = target[key]; - if (curValue == null) { - target[key] = newValue; - } else if (isPlainObject(curValue) - && isPlainObject(newValue)) { - deepFillIn(curValue, newValue); - } - }); - } - } - - return target; - } - - module.exports = deepFillIn; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/deepMatches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/deepMatches.js deleted file mode 100644 index 3366c52d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/deepMatches.js +++ /dev/null @@ -1,55 +0,0 @@ -var forOwn = require('./forOwn'); -var isArray = require('../lang/isArray'); - - function containsMatch(array, pattern) { - var i = -1, length = array.length; - while (++i < length) { - if (deepMatches(array[i], pattern)) { - return true; - } - } - - return false; - } - - function matchArray(target, pattern) { - var i = -1, patternLength = pattern.length; - while (++i < patternLength) { - if (!containsMatch(target, pattern[i])) { - return false; - } - } - - return true; - } - - function matchObject(target, pattern) { - var result = true; - forOwn(pattern, function(val, key) { - if (!deepMatches(target[key], val)) { - // Return false to break out of forOwn early - return (result = false); - } - }); - - return result; - } - - /** - * Recursively check if the objects match. - */ - function deepMatches(target, pattern){ - if (target && typeof target === 'object') { - if (isArray(target) && isArray(pattern)) { - return matchArray(target, pattern); - } else { - return matchObject(target, pattern); - } - } else { - return target === pattern; - } - } - - module.exports = deepMatches; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/deepMixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/deepMixIn.js deleted file mode 100644 index a97e98d0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/deepMixIn.js +++ /dev/null @@ -1,34 +0,0 @@ -var forOwn = require('./forOwn'); -var isPlainObject = require('../lang/isPlainObject'); - - /** - * Mixes objects into the target object, recursively mixing existing child - * objects. - */ - function deepMixIn(target, objects) { - var i = 0, - n = arguments.length, - obj; - - while(++i < n){ - obj = arguments[i]; - if (obj) { - forOwn(obj, copyProp, target); - } - } - - return target; - } - - function copyProp(val, key) { - var existing = this[key]; - if (isPlainObject(val) && isPlainObject(existing)) { - deepMixIn(existing, val); - } else { - this[key] = val; - } - } - - module.exports = deepMixIn; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/equals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/equals.js deleted file mode 100644 index f50cbe4e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/equals.js +++ /dev/null @@ -1,36 +0,0 @@ -var hasOwn = require('./hasOwn'); -var every = require('./every'); -var isObject = require('../lang/isObject'); - - function defaultCompare(a, b) { - return a === b; - } - - // Makes a function to compare the object values from the specified compare - // operation callback. - function makeCompare(callback) { - return function(value, key) { - return hasOwn(this, key) && callback(value, this[key]); - }; - } - - function checkProperties(value, key) { - return hasOwn(this, key); - } - - /** - * Checks if two objects have the same keys and values. - */ - function equals(a, b, callback) { - callback = callback || defaultCompare; - - if (!isObject(a) || !isObject(b)) { - return callback(a, b); - } - - return (every(a, makeCompare(callback), b) && - every(b, checkProperties, a)); - } - - module.exports = equals; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/every.js deleted file mode 100644 index 01106e5f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/every.js +++ /dev/null @@ -1,23 +0,0 @@ -var forOwn = require('./forOwn'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Object every - */ - function every(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = true; - forOwn(obj, function(val, key) { - // we consider any falsy values as "false" on purpose so shorthand - // syntax can be used to check property existence - if (!callback(val, key, obj)) { - result = false; - return false; // break - } - }); - return result; - } - - module.exports = every; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/fillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/fillIn.js deleted file mode 100644 index 80dcdf07..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/fillIn.js +++ /dev/null @@ -1,20 +0,0 @@ -var forEach = require('../array/forEach'); -var forOwn = require('./forOwn'); - - /** - * Copy missing properties in the obj from the defaults. - */ - function fillIn(obj, var_defaults){ - forEach(Array.prototype.slice.call(arguments, 1), function(base){ - forOwn(base, function(val, key){ - if (obj[key] == null) { - obj[key] = val; - } - }); - }); - return obj; - } - - module.exports = fillIn; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/filter.js deleted file mode 100644 index 3a83a92f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/filter.js +++ /dev/null @@ -1,20 +0,0 @@ -var forOwn = require('./forOwn'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Creates a new object with all the properties where the callback returns - * true. - */ - function filterValues(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var output = {}; - forOwn(obj, function(value, key, obj) { - if (callback(value, key, obj)) { - output[key] = value; - } - }); - - return output; - } - module.exports = filterValues; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/find.js deleted file mode 100644 index d39c0706..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/find.js +++ /dev/null @@ -1,21 +0,0 @@ -var some = require('./some'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Returns first item that matches criteria - */ - function find(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result; - some(obj, function(value, key, obj) { - if (callback(value, key, obj)) { - result = value; - return true; //break - } - }); - return result; - } - - module.exports = find; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/forIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/forIn.js deleted file mode 100644 index 367f08ca..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/forIn.js +++ /dev/null @@ -1,62 +0,0 @@ - - - var _hasDontEnumBug, - _dontEnums; - - function checkDontEnum(){ - _dontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' - ]; - - _hasDontEnumBug = true; - - for (var key in {'toString': null}) { - _hasDontEnumBug = false; - } - } - - /** - * Similar to Array/forEach but works over object properties and fixes Don't - * Enum bug on IE. - * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation - */ - function forIn(obj, fn, thisObj){ - var key, i = 0; - // no need to check if argument is a real object that way we can use - // it for arrays, functions, date, etc. - - //post-pone check till needed - if (_hasDontEnumBug == null) checkDontEnum(); - - for (key in obj) { - if (exec(fn, obj, key, thisObj) === false) { - break; - } - } - - if (_hasDontEnumBug) { - while (key = _dontEnums[i++]) { - // since we aren't using hasOwn check we need to make sure the - // property was overwritten - if (obj[key] !== Object.prototype[key]) { - if (exec(fn, obj, key, thisObj) === false) { - break; - } - } - } - } - } - - function exec(fn, obj, key, thisObj){ - return fn.call(thisObj, obj[key], key, obj); - } - - module.exports = forIn; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/forOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/forOwn.js deleted file mode 100644 index 5f2dfbfc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/forOwn.js +++ /dev/null @@ -1,19 +0,0 @@ -var hasOwn = require('./hasOwn'); -var forIn = require('./forIn'); - - /** - * Similar to Array/forEach but works over object properties and fixes Don't - * Enum bug on IE. - * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation - */ - function forOwn(obj, fn, thisObj){ - forIn(obj, function(val, key){ - if (hasOwn(obj, key)) { - return fn.call(thisObj, obj[key], key, obj); - } - }); - } - - module.exports = forOwn; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/functions.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/functions.js deleted file mode 100644 index f5717979..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/functions.js +++ /dev/null @@ -1,18 +0,0 @@ -var forIn = require('./forIn'); - - /** - * return a list of all enumerable properties that have function values - */ - function functions(obj){ - var keys = []; - forIn(obj, function(val, key){ - if (typeof val === 'function'){ - keys.push(key); - } - }); - return keys.sort(); - } - - module.exports = functions; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/get.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/get.js deleted file mode 100644 index 6673561e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/get.js +++ /dev/null @@ -1,20 +0,0 @@ - - - /** - * get "nested" object property - */ - function get(obj, prop){ - var parts = prop.split('.'), - last = parts.pop(); - - while (prop = parts.shift()) { - obj = obj[prop]; - if (typeof obj !== 'object') return; - } - - return obj[last]; - } - - module.exports = get; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/has.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/has.js deleted file mode 100644 index ca9f2289..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/has.js +++ /dev/null @@ -1,15 +0,0 @@ -var get = require('./get'); - - var UNDEF; - - /** - * Check if object has nested property. - */ - function has(obj, prop){ - return get(obj, prop) !== UNDEF; - } - - module.exports = has; - - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/hasOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/hasOwn.js deleted file mode 100644 index 7e3c82ae..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/hasOwn.js +++ /dev/null @@ -1,12 +0,0 @@ - - - /** - * Safer Object.hasOwnProperty - */ - function hasOwn(obj, prop){ - return Object.prototype.hasOwnProperty.call(obj, prop); - } - - module.exports = hasOwn; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/keys.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/keys.js deleted file mode 100644 index dd2f4f55..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/keys.js +++ /dev/null @@ -1,16 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * Get object keys - */ - var keys = Object.keys || function (obj) { - var keys = []; - forOwn(obj, function(val, key){ - keys.push(key); - }); - return keys; - }; - - module.exports = keys; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/map.js deleted file mode 100644 index dd449a78..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/map.js +++ /dev/null @@ -1,18 +0,0 @@ -var forOwn = require('./forOwn'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Creates a new object where all the values are the result of calling - * `callback`. - */ - function mapValues(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var output = {}; - forOwn(obj, function(val, key, obj) { - output[key] = callback(val, key, obj); - }); - - return output; - } - module.exports = mapValues; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/matches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/matches.js deleted file mode 100644 index 6074faa2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/matches.js +++ /dev/null @@ -1,20 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * checks if a object contains all given properties/values - */ - function matches(target, props){ - // can't use "object/every" because of circular dependency - var result = true; - forOwn(props, function(val, key){ - if (target[key] !== val) { - // break loop at first difference - return (result = false); - } - }); - return result; - } - - module.exports = matches; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/max.js deleted file mode 100644 index 3e8e92c7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/max.js +++ /dev/null @@ -1,12 +0,0 @@ -var arrMax = require('../array/max'); -var values = require('./values'); - - /** - * Returns maximum value inside object. - */ - function max(obj, compareFn) { - return arrMax(values(obj), compareFn); - } - - module.exports = max; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/merge.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/merge.js deleted file mode 100644 index 6961f608..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/merge.js +++ /dev/null @@ -1,40 +0,0 @@ -var hasOwn = require('./hasOwn'); -var deepClone = require('../lang/deepClone'); -var isObject = require('../lang/isObject'); - - /** - * Deep merge objects. - */ - function merge() { - var i = 1, - key, val, obj, target; - - // make sure we don't modify source element and it's properties - // objects are passed by reference - target = deepClone( arguments[0] ); - - while (obj = arguments[i++]) { - for (key in obj) { - if ( ! hasOwn(obj, key) ) { - continue; - } - - val = obj[key]; - - if ( isObject(val) && isObject(target[key]) ){ - // inception, deep merge objects - target[key] = merge(target[key], val); - } else { - // make sure arrays, regexp, date, objects are cloned - target[key] = deepClone(val); - } - - } - } - - return target; - } - - module.exports = merge; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/min.js deleted file mode 100644 index e1e66976..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/min.js +++ /dev/null @@ -1,12 +0,0 @@ -var arrMin = require('../array/min'); -var values = require('./values'); - - /** - * Returns minimum value inside object. - */ - function min(obj, iterator) { - return arrMin(values(obj), iterator); - } - - module.exports = min; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/mixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/mixIn.js deleted file mode 100644 index 55ec8fd5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/mixIn.js +++ /dev/null @@ -1,28 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * Combine properties from all the objects into first one. - * - This method affects target object in place, if you want to create a new Object pass an empty object as first param. - * @param {object} target Target Object - * @param {...object} objects Objects to be combined (0...n objects). - * @return {object} Target Object. - */ - function mixIn(target, objects){ - var i = 0, - n = arguments.length, - obj; - while(++i < n){ - obj = arguments[i]; - if (obj != null) { - forOwn(obj, copyProp, target); - } - } - return target; - } - - function copyProp(val, key){ - this[key] = val; - } - - module.exports = mixIn; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/namespace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/namespace.js deleted file mode 100644 index c6e79f63..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/namespace.js +++ /dev/null @@ -1,19 +0,0 @@ -var forEach = require('../array/forEach'); - - /** - * Create nested object if non-existent - */ - function namespace(obj, path){ - if (!path) return obj; - forEach(path.split('.'), function(key){ - if (!obj[key]) { - obj[key] = {}; - } - obj = obj[key]; - }); - return obj; - } - - module.exports = namespace; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/pick.js deleted file mode 100644 index 74e56f98..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/pick.js +++ /dev/null @@ -1,18 +0,0 @@ - - - /** - * Return a copy of the object, filtered to only have values for the whitelisted keys. - */ - function pick(obj, var_keys){ - var keys = typeof arguments[1] !== 'string'? arguments[1] : Array.prototype.slice.call(arguments, 1), - out = {}, - i = 0, key; - while (key = keys[i++]) { - out[key] = obj[key]; - } - return out; - } - - module.exports = pick; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/pluck.js deleted file mode 100644 index e844df47..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/pluck.js +++ /dev/null @@ -1,13 +0,0 @@ -var map = require('./map'); -var prop = require('../function/prop'); - - /** - * Extract a list of property values. - */ - function pluck(obj, propName){ - return map(obj, prop(propName)); - } - - module.exports = pluck; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/reduce.js deleted file mode 100644 index 6f19a3a2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/reduce.js +++ /dev/null @@ -1,29 +0,0 @@ -var forOwn = require('./forOwn'); -var size = require('./size'); - - /** - * Object reduce - */ - function reduce(obj, callback, memo, thisObj) { - var initial = arguments.length > 2; - - if (!size(obj) && !initial) { - throw new Error('reduce of empty object with no initial value'); - } - - forOwn(obj, function(value, key, list) { - if (!initial) { - memo = value; - initial = true; - } - else { - memo = callback.call(thisObj, memo, value, key, list); - } - }); - - return memo; - } - - module.exports = reduce; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/reject.js deleted file mode 100644 index 74643795..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/reject.js +++ /dev/null @@ -1,16 +0,0 @@ -var filter = require('./filter'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Object reject - */ - function reject(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - return filter(obj, function(value, index, obj) { - return !callback(value, index, obj); - }, thisObj); - } - - module.exports = reject; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/set.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/set.js deleted file mode 100644 index 9b3cdc48..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/set.js +++ /dev/null @@ -1,17 +0,0 @@ -var namespace = require('./namespace'); - - /** - * set "nested" object property - */ - function set(obj, prop, val){ - var parts = (/^(.+)\.(.+)$/).exec(prop); - if (parts){ - namespace(obj, parts[1])[parts[2]] = val; - } else { - obj[prop] = val; - } - } - - module.exports = set; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/size.js deleted file mode 100644 index 97885953..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/size.js +++ /dev/null @@ -1,16 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * Get object size - */ - function size(obj) { - var count = 0; - forOwn(obj, function(){ - count++; - }); - return count; - } - - module.exports = size; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/some.js deleted file mode 100644 index 384c6f3c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/some.js +++ /dev/null @@ -1,21 +0,0 @@ -var forOwn = require('./forOwn'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Object some - */ - function some(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = false; - forOwn(obj, function(val, key) { - if (callback(val, key, obj)) { - result = true; - return false; // break - } - }); - return result; - } - - module.exports = some; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/unset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/unset.js deleted file mode 100644 index 343bca0a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/unset.js +++ /dev/null @@ -1,23 +0,0 @@ -var has = require('./has'); - - /** - * Unset object property. - */ - function unset(obj, prop){ - if (has(obj, prop)) { - var parts = prop.split('.'), - last = parts.pop(); - while (prop = parts.shift()) { - obj = obj[prop]; - } - return (delete obj[last]); - - } else { - // if property doesn't exist treat as deleted - return true; - } - } - - module.exports = unset; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/values.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/values.js deleted file mode 100644 index 265a6938..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/object/values.js +++ /dev/null @@ -1,16 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * Get object values - */ - function values(obj) { - var vals = []; - forOwn(obj, function(val, key){ - vals.push(val); - }); - return vals; - } - - module.exports = values; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/package.json deleted file mode 100644 index 76eadf21..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/package.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "name": "mout", - "description": "Modular Utilities", - "version": "0.6.0", - "homepage": "http://moutjs.com/", - "contributors": [ - { - "name": "Adam Nowotny" - }, - { - "name": "André Cruz", - "email": "amdfcruz@gmail.com" - }, - { - "name": "Conrad Zimmerman", - "url": "http://www.conradz.com" - }, - { - "name": "Friedemann Altrock", - "email": "frodenius@gmail.com" - }, - { - "name": "Jarrod Overson", - "url": "http://jarrodoverson.com" - }, - { - "name": "Miller Medeiros", - "email": "contact@millermedeiros.com", - "url": "http://blog.millermedeiros.com" - }, - { - "name": "Zach Shipley" - } - ], - "keywords": [ - "utilities", - "functional", - "amd-utils", - "stdlib" - ], - "repository": { - "type": "git", - "url": "git://github.com/mout/mout.git" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://www.opensource.org/licenses/mit-license.php" - } - ], - "bugs": { - "url": "https://github.com/mout/mout/issues/" - }, - "main": "./index.js", - "scripts": { - "prepublish": "node build cjs .", - "pretest": "node build pkg", - "test": "node node_modules/istanbul/lib/cli test tests/runner.js --hook-run-in-context" - }, - "directories": { - "doc": "./doc" - }, - "devDependencies": { - "istanbul": "~0.1.27", - "jasmine-node": "~1.2.2", - "requirejs": "2.x", - "nodefy": "*", - "mdoc": "~0.3.2", - "handlebars": "~1.0.6", - "commander": "~1.0.5", - "rocambole": "~0.2.3" - }, - "testling": { - "preprocess": "node build testling", - "browsers": { - "ie": [ - 7, - 8, - 9, - 10 - ], - "firefox": [ - 17, - "nightly" - ], - "chrome": [ - 23, - "canary" - ], - "opera": [ - 12, - "next" - ], - "safari": [ - 5.1, - 6 - ], - "iphone": [ - 6 - ], - "ipad": [ - 6 - ] - }, - "scripts": [ - "tests/lib/jasmine/jasmine.js", - "tests/lib/jasmine/jasmine.async.js", - "tests/lib/jasmine/jasmine-tap.js", - "tests/lib/requirejs/require.js", - "tests/testling/src.js", - "tests/testling/specs.js", - "tests/runner.js" - ] - }, - "readme": "![mout](http://moutjs.com/logo.png \"Modular JavaScript Utilties\")\n\nhttp://moutjs.com/\n\n[![Build Status](https://travis-ci.org/mout/mout.png?branch=master)](https://travis-ci.org/mout/mout)\n\nAll code is library agnostic and consist mostly of helper methods that aren't\ndirectly related with the DOM, the purpose of this library isn't to replace\nDojo, jQuery, YUI, Mootools, etc, but to provide modular solutions for common\nproblems that aren't solved by most of them. Consider it as a crossbrowser\nJavaScript standard library.\n\n\n\n## Main goals ##\n\n - increase code reuse;\n - be clear (code should be clean/readable);\n - be easy to debug;\n - be easy to maintain;\n - follow best practices;\n - follow standards when possible;\n - **don't convert JavaScript into another language!**\n - be compatible with other frameworks;\n - be modular;\n - have unit tests for all modules;\n - work on multiple environments (IE7+, modern browsers, node.js);\n\n\n\n## What shouldn't be here ##\n\n - UI components;\n - CSS selector engine;\n - Event system - pub/sub;\n - Template engine;\n - Anything that isn't generic enough to be on a standard library;\n - Anything that could be a separate library and/or isn't a modular utility...\n\n\n\n## API Documentation ##\n\nOnline documentation can be found at http://moutjs.com/ or inside the\n`doc` folder.\n\n\n\n## FAQ / Wiki / IRC ##\n\nFor more info about project structure, design decisions, tips, how to\ncontribute, build system, etc, please check the [project\nwiki](https://github.com/mout/mout/wiki).\n\nWe also have an IRC channel [#moutjs on\nirc.freenode.net](http://webchat.freenode.net/?channels=moutjs)\n\n\n\n## License ##\n\nReleased under the [MIT License](http://www.opensource.org/licenses/mit-license.php).\n\n", - "readmeFilename": "README.md", - "_id": "mout@0.6.0", - "dist": { - "shasum": "d2f7a6e5a796040bf7b6259a41b46705f49d271d" - }, - "_from": "mout@~0.6.0", - "_resolved": "https://registry.npmjs.org/mout/-/mout-0.6.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString.js deleted file mode 100644 index 22685a7f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString.js +++ /dev/null @@ -1,15 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'contains' : require('./queryString/contains'), - 'decode' : require('./queryString/decode'), - 'encode' : require('./queryString/encode'), - 'getParam' : require('./queryString/getParam'), - 'getQuery' : require('./queryString/getQuery'), - 'parse' : require('./queryString/parse'), - 'setParam' : require('./queryString/setParam') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/contains.js deleted file mode 100644 index da678cf4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/contains.js +++ /dev/null @@ -1,12 +0,0 @@ -var getQuery = require('./getQuery'); - - /** - * Checks if query string contains parameter. - */ - function contains(url, paramName) { - var regex = new RegExp('(\\?|&)'+ paramName +'=', 'g'); //matches `?param=` or `¶m=` - return regex.test(getQuery(url)); - } - - module.exports = contains; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/decode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/decode.js deleted file mode 100644 index 7e689990..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/decode.js +++ /dev/null @@ -1,21 +0,0 @@ -var typecast = require('../string/typecast'); -var isString = require('../lang/isString'); - - /** - * Decode query string into an object of keys => vals. - */ - function decode(queryStr, shouldTypecast) { - var queryArr = (queryStr || '').replace('?', '').split('&'), - n = queryArr.length, - obj = {}, - item, val; - while (n--) { - item = queryArr[n].split('='); - val = shouldTypecast === false? item[1] : typecast(item[1]); - obj[item[0]] = isString(val)? decodeURIComponent(val) : val; - } - return obj; - } - - module.exports = decode; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/encode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/encode.js deleted file mode 100644 index 6d2b12f8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/encode.js +++ /dev/null @@ -1,15 +0,0 @@ -var forOwn = require('../object/forOwn'); - - /** - * Encode object into a query string. - */ - function encode(obj){ - var query = []; - forOwn(obj, function(val, key){ - query.push( key +'='+ encodeURIComponent(val) ); - }); - return (query.length)? '?'+ query.join('&') : ''; - } - - module.exports = encode; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/getParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/getParam.js deleted file mode 100644 index f149c3ea..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/getParam.js +++ /dev/null @@ -1,15 +0,0 @@ -var typecast = require('../string/typecast'); -var getQuery = require('./getQuery'); - - /** - * Get query parameter value. - */ - function getParam(url, param, shouldTypecast){ - var regexp = new RegExp('(\\?|&)'+ param + '=([^&]*)'), //matches `?param=value` or `¶m=value`, value = $2 - result = regexp.exec( getQuery(url) ), - val = (result && result[2])? result[2] : null; - return shouldTypecast === false? val : typecast(val); - } - - module.exports = getParam; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/getQuery.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/getQuery.js deleted file mode 100644 index 5194af2d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/getQuery.js +++ /dev/null @@ -1,13 +0,0 @@ - - - /** - * Gets full query as string with all special chars decoded. - */ - function getQuery(url) { - url = url.replace(/#.*/, ''); //removes hash (to avoid getting hash query) - var queryString = /\?[a-zA-Z0-9\=\&\%\$\-\_\.\+\!\*\'\(\)\,]+/.exec(url); //valid chars according to: http://www.ietf.org/rfc/rfc1738.txt - return (queryString)? decodeURIComponent(queryString[0]) : ''; - } - - module.exports = getQuery; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/parse.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/parse.js deleted file mode 100644 index 532906c0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/parse.js +++ /dev/null @@ -1,13 +0,0 @@ -var decode = require('./decode'); -var getQuery = require('./getQuery'); - - /** - * Get query string, parses and decodes it. - */ - function parse(url, shouldTypecast) { - return decode(getQuery(url), shouldTypecast); - } - - module.exports = parse; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/setParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/setParam.js deleted file mode 100644 index 052a9ba6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/queryString/setParam.js +++ /dev/null @@ -1,28 +0,0 @@ - - - /** - * Set query string parameter value - */ - function setParam(url, paramName, value){ - url = url || ''; - - var re = new RegExp('(\\?|&)'+ paramName +'=[^&]*' ); - var param = paramName +'='+ encodeURIComponent( value ); - - if ( re.test(url) ) { - return url.replace(re, '$1'+ param); - } else { - if (url.indexOf('?') === -1) { - url += '?'; - } - if (url.indexOf('=') !== -1) { - url += '&'; - } - return url + param; - } - - } - - module.exports = setParam; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random.js deleted file mode 100644 index d9267f01..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random.js +++ /dev/null @@ -1,16 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'choice' : require('./random/choice'), - 'guid' : require('./random/guid'), - 'rand' : require('./random/rand'), - 'randBit' : require('./random/randBit'), - 'randHex' : require('./random/randHex'), - 'randInt' : require('./random/randInt'), - 'randSign' : require('./random/randSign'), - 'random' : require('./random/random') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/choice.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/choice.js deleted file mode 100644 index 51aa82a2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/choice.js +++ /dev/null @@ -1,15 +0,0 @@ -var randInt = require('./randInt'); -var isArray = require('../lang/isArray'); - - /** - * Returns a random element from the supplied arguments - * or from the array (if single argument is an array). - */ - function choice(items) { - var target = (arguments.length === 1 && isArray(items))? items : arguments; - return target[ randInt(0, target.length - 1) ]; - } - - module.exports = choice; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/guid.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/guid.js deleted file mode 100644 index 41f6eddc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/guid.js +++ /dev/null @@ -1,24 +0,0 @@ -var randHex = require('./randHex'); -var choice = require('./choice'); - - /** - * Returns pseudo-random guid (UUID v4) - * IMPORTANT: it's not totally "safe" since randHex/choice uses Math.random - * by default and sequences can be predicted in some cases. See the - * "random/random" documentation for more info about it and how to replace - * the default PRNG. - */ - function guid() { - return ( - randHex(8)+'-'+ - randHex(4)+'-'+ - // v4 UUID always contain "4" at this position to specify it was - // randomly generated - '4' + randHex(3) +'-'+ - // v4 UUID always contain chars [a,b,8,9] at this position - choice(8, 9, 'a', 'b') + randHex(3)+'-'+ - randHex(12) - ); - } - module.exports = guid; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/rand.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/rand.js deleted file mode 100644 index 782dec88..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/rand.js +++ /dev/null @@ -1,15 +0,0 @@ -var random = require('./random'); -var MIN_INT = require('../number/MIN_INT'); -var MAX_INT = require('../number/MAX_INT'); - - /** - * Returns random number inside range - */ - function rand(min, max){ - min = min == null? MIN_INT : min; - max = max == null? MAX_INT : max; - return min + (max - min) * random(); - } - - module.exports = rand; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/randBit.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/randBit.js deleted file mode 100644 index bd20b4a0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/randBit.js +++ /dev/null @@ -1,11 +0,0 @@ -var random = require('./random'); - - /** - * Returns random bit (0 or 1) - */ - function randomBit() { - return random() > 0.5? 1 : 0; - } - - module.exports = randomBit; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/randHex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/randHex.js deleted file mode 100644 index d8d711c3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/randHex.js +++ /dev/null @@ -1,19 +0,0 @@ -var choice = require('./choice'); - - var _chars = '0123456789abcdef'.split(''); - - /** - * Returns a random hexadecimal string - */ - function randHex(size){ - size = size && size > 0? size : 6; - var str = ''; - while (size--) { - str += choice(_chars); - } - return str; - } - - module.exports = randHex; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/randInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/randInt.js deleted file mode 100644 index e237d964..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/randInt.js +++ /dev/null @@ -1,18 +0,0 @@ -var MIN_INT = require('../number/MIN_INT'); -var MAX_INT = require('../number/MAX_INT'); -var rand = require('./rand'); - - /** - * Gets random integer inside range or snap to min/max values. - */ - function randInt(min, max){ - min = min == null? MIN_INT : ~~min; - max = max == null? MAX_INT : ~~max; - // can't be max + 0.5 otherwise it will round up if `rand` - // returns `max` causing it to overflow range. - // -0.5 and + 0.49 are required to avoid bias caused by rounding - return Math.round( rand(min - 0.5, max + 0.499999999999) ); - } - - module.exports = randInt; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/randSign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/randSign.js deleted file mode 100644 index 5a9fed76..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/randSign.js +++ /dev/null @@ -1,11 +0,0 @@ -var random = require('./random'); - - /** - * Returns random sign (-1 or 1) - */ - function randomSign() { - return random() > 0.5? 1 : -1; - } - - module.exports = randomSign; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/random.js deleted file mode 100644 index 670a3cc4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/random/random.js +++ /dev/null @@ -1,18 +0,0 @@ - - - /** - * Just a wrapper to Math.random. No methods inside mout/random should call - * Math.random() directly so we can inject the pseudo-random number - * generator if needed (ie. in case we need a seeded random or a better - * algorithm than the native one) - */ - function random(){ - return random.get(); - } - - // we expose the method so it can be swapped if needed - random.get = Math.random; - - module.exports = random; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array.js deleted file mode 100644 index 7bcc961b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array.js +++ /dev/null @@ -1,46 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'append' : require('./array/append'), - 'collect' : require('./array/collect'), - 'combine' : require('./array/combine'), - 'compact' : require('./array/compact'), - 'contains' : require('./array/contains'), - 'difference' : require('./array/difference'), - 'every' : require('./array/every'), - 'filter' : require('./array/filter'), - 'find' : require('./array/find'), - 'findIndex' : require('./array/findIndex'), - 'flatten' : require('./array/flatten'), - 'forEach' : require('./array/forEach'), - 'indexOf' : require('./array/indexOf'), - 'insert' : require('./array/insert'), - 'intersection' : require('./array/intersection'), - 'invoke' : require('./array/invoke'), - 'join' : require('./array/join'), - 'lastIndexOf' : require('./array/lastIndexOf'), - 'map' : require('./array/map'), - 'max' : require('./array/max'), - 'min' : require('./array/min'), - 'pick' : require('./array/pick'), - 'pluck' : require('./array/pluck'), - 'range' : require('./array/range'), - 'reduce' : require('./array/reduce'), - 'reduceRight' : require('./array/reduceRight'), - 'reject' : require('./array/reject'), - 'remove' : require('./array/remove'), - 'removeAll' : require('./array/removeAll'), - 'shuffle' : require('./array/shuffle'), - 'some' : require('./array/some'), - 'sort' : require('./array/sort'), - 'split' : require('./array/split'), - 'toLookup' : require('./array/toLookup'), - 'union' : require('./array/union'), - 'unique' : require('./array/unique'), - 'xor' : require('./array/xor'), - 'zip' : require('./array/zip') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/append.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/append.js deleted file mode 100644 index 549d8754..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/append.js +++ /dev/null @@ -1,21 +0,0 @@ -define(function () { - - /** - * Appends an array to the end of another. - * The first array will be modified. - */ - function append(arr1, arr2) { - if (arr2 == null) { - return arr1; - } - - var pad = arr1.length, - i = -1, - len = arr2.length; - while (++i < len) { - arr1[pad + i] = arr2[i]; - } - return arr1; - } - return append; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/collect.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/collect.js deleted file mode 100644 index 8f60cda2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/collect.js +++ /dev/null @@ -1,26 +0,0 @@ -define(['./append', '../function/makeIterator_'], function (append, makeIterator) { - - /** - * Maps the items in the array and concatenates the result arrays. - */ - function collect(arr, callback, thisObj){ - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length; - while (++i < len) { - var value = callback(arr[i], i, arr); - if (value != null) { - append(results, value); - } - } - - return results; - } - - return collect; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/combine.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/combine.js deleted file mode 100644 index 22efb860..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/combine.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['./indexOf'], function (indexOf) { - - /** - * Combines an array with all the items of another. - * Does not allow duplicates and is case and type sensitive. - */ - function combine(arr1, arr2) { - if (arr2 == null) { - return arr1; - } - - var i = -1, len = arr2.length; - while (++i < len) { - if (indexOf(arr1, arr2[i]) === -1) { - arr1.push(arr2[i]); - } - } - - return arr1; - } - return combine; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/compact.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/compact.js deleted file mode 100644 index 02a81098..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/compact.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./filter'], function (filter) { - - /** - * Remove all null/undefined items from array. - */ - function compact(arr) { - return filter(arr, function(val){ - return (val != null); - }); - } - - return compact; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/contains.js deleted file mode 100644 index fca4f7cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/contains.js +++ /dev/null @@ -1,10 +0,0 @@ -define(['./indexOf'], function (indexOf) { - - /** - * If array contains values. - */ - function contains(arr, val) { - return indexOf(arr, val) !== -1; - } - return contains; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/difference.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/difference.js deleted file mode 100644 index 819bda3e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/difference.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['./unique', './filter', './some', './contains'], function (unique, filter, some, contains) { - - - /** - * Return a new Array with elements that aren't present in the other Arrays. - */ - function difference(arr) { - var arrs = Array.prototype.slice.call(arguments, 1), - result = filter(unique(arr), function(needle){ - return !some(arrs, function(haystack){ - return contains(haystack, needle); - }); - }); - return result; - } - - return difference; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/every.js deleted file mode 100644 index 78ba46d3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/every.js +++ /dev/null @@ -1,27 +0,0 @@ -define(['../function/makeIterator_'], function (makeIterator) { - - /** - * Array every - */ - function every(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = true; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (!callback(arr[i], i, arr) ) { - result = false; - break; - } - } - - return result; - } - - return every; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/filter.js deleted file mode 100644 index 52cf685a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/filter.js +++ /dev/null @@ -1,26 +0,0 @@ -define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { - - /** - * Array filter - */ - function filter(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - if (callback(value, i, arr)) { - results.push(value); - } - } - - return results; - } - - return filter; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/find.js deleted file mode 100644 index 3957dcd5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/find.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./findIndex'], function (findIndex) { - - /** - * Returns first item that matches criteria - */ - function find(arr, iterator, thisObj){ - var idx = findIndex(arr, iterator, thisObj); - return idx >= 0? arr[idx] : void(0); - } - - return find; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/findIndex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/findIndex.js deleted file mode 100644 index 59dfeeb9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/findIndex.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['../function/makeIterator_'], function (makeIterator) { - - /** - * Returns the index of the first item that matches criteria - */ - function findIndex(arr, iterator, thisObj){ - iterator = makeIterator(iterator, thisObj); - if (arr == null) { - return -1; - } - - var i = -1, len = arr.length; - while (++i < len) { - if (iterator(arr[i], i, arr)) { - return i; - } - } - - return -1; - } - - return findIndex; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/flatten.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/flatten.js deleted file mode 100644 index 42e87f43..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/flatten.js +++ /dev/null @@ -1,42 +0,0 @@ -define(['../lang/isArray', './append'], function (isArray, append) { - - /* - * Helper function to flatten to a destination array. - * Used to remove the need to create intermediate arrays while flattening. - */ - function flattenTo(arr, result, level) { - if (arr == null) { - return result; - } else if (level === 0) { - append(result, arr); - return result; - } - - var value, - i = -1, - len = arr.length; - while (++i < len) { - value = arr[i]; - if (isArray(value)) { - flattenTo(value, result, level - 1); - } else { - result.push(value); - } - } - return result; - } - - /** - * Recursively flattens an array. - * A new array containing all the elements is returned. - * If `shallow` is true, it will only flatten one level. - */ - function flatten(arr, level) { - level = level == null? -1 : level; - return flattenTo(arr, [], level); - } - - return flatten; - -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/forEach.js deleted file mode 100644 index 0e045868..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/forEach.js +++ /dev/null @@ -1,23 +0,0 @@ -define(function () { - - /** - * Array forEach - */ - function forEach(arr, callback, thisObj) { - if (arr == null) { - return; - } - var i = -1, - len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if ( callback.call(thisObj, arr[i], i, arr) === false ) { - break; - } - } - } - - return forEach; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/indexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/indexOf.js deleted file mode 100644 index 0e75f99b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/indexOf.js +++ /dev/null @@ -1,28 +0,0 @@ -define(function () { - - /** - * Array.indexOf - */ - function indexOf(arr, item, fromIndex) { - fromIndex = fromIndex || 0; - if (arr == null) { - return -1; - } - - var len = arr.length, - i = fromIndex < 0 ? len + fromIndex : fromIndex; - while (i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (arr[i] === item) { - return i; - } - - i++; - } - - return -1; - } - - return indexOf; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/insert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/insert.js deleted file mode 100644 index d8d831f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/insert.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['./difference', '../lang/toArray'], function (difference, toArray) { - - /** - * Insert item into array if not already present. - */ - function insert(arr, rest_items) { - var diff = difference(toArray(arguments).slice(1), arr); - if (diff.length) { - Array.prototype.push.apply(arr, diff); - } - return arr.length; - } - return insert; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/intersection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/intersection.js deleted file mode 100644 index 64e6ee97..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/intersection.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['./unique', './filter', './every', './contains'], function (unique, filter, every, contains) { - - - /** - * Return a new Array with elements common to all Arrays. - * - based on underscore.js implementation - */ - function intersection(arr) { - var arrs = Array.prototype.slice.call(arguments, 1), - result = filter(unique(arr), function(needle){ - return every(arrs, function(haystack){ - return contains(haystack, needle); - }); - }); - return result; - } - - return intersection; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/invoke.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/invoke.js deleted file mode 100644 index a2e78b39..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/invoke.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['./forEach'], function (forEach) { - - /** - * Call `methodName` on each item of the array passing custom arguments if - * needed. - */ - function invoke(arr, methodName, var_args){ - if (arr == null) { - return arr; - } - - var args = Array.prototype.slice.call(arguments, 2); - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - value[methodName].apply(value, args); - } - - return arr; - } - - return invoke; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/join.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/join.js deleted file mode 100644 index 2c618d29..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/join.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['./filter'], function(filter) { - - function isValidString(val) { - return (val != null && val !== ''); - } - - /** - * Joins strings with the specified separator inserted between each value. - * Null values and empty strings will be excluded. - */ - function join(items, separator) { - separator = separator || ''; - return filter(items, isValidString).join(separator); - } - - return join; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/lastIndexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/lastIndexOf.js deleted file mode 100644 index 931235f4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/lastIndexOf.js +++ /dev/null @@ -1,28 +0,0 @@ -define(function () { - - /** - * Array lastIndexOf - */ - function lastIndexOf(arr, item, fromIndex) { - if (arr == null) { - return -1; - } - - var len = arr.length; - fromIndex = (fromIndex == null || fromIndex >= len)? len - 1 : fromIndex; - fromIndex = (fromIndex < 0)? len + fromIndex : fromIndex; - - while (fromIndex >= 0) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (arr[fromIndex] === item) { - return fromIndex; - } - fromIndex--; - } - - return -1; - } - - return lastIndexOf; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/map.js deleted file mode 100644 index 1580b481..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/map.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { - - /** - * Array map - */ - function map(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null){ - return results; - } - - var i = -1, len = arr.length; - while (++i < len) { - results[i] = callback(arr[i], i, arr); - } - - return results; - } - - return map; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/max.js deleted file mode 100644 index a7326c89..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/max.js +++ /dev/null @@ -1,34 +0,0 @@ -define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { - - /** - * Return maximum value inside array - */ - function max(arr, iterator, thisObj){ - if (arr == null || !arr.length) { - return Infinity; - } else if (arr.length && !iterator) { - return Math.max.apply(Math, arr); - } else { - iterator = makeIterator(iterator, thisObj); - var result, - compare = -Infinity, - value, - temp; - - var i = -1, len = arr.length; - while (++i < len) { - value = arr[i]; - temp = iterator(value, i, arr); - if (temp > compare) { - compare = temp; - result = value; - } - } - - return result; - } - } - - return max; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/min.js deleted file mode 100644 index 41644480..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/min.js +++ /dev/null @@ -1,34 +0,0 @@ -define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { - - /** - * Return minimum value inside array - */ - function min(arr, iterator, thisObj){ - if (arr == null || !arr.length) { - return -Infinity; - } else if (arr.length && !iterator) { - return Math.min.apply(Math, arr); - } else { - iterator = makeIterator(iterator, thisObj); - var result, - compare = Infinity, - value, - temp; - - var i = -1, len = arr.length; - while (++i < len) { - value = arr[i]; - temp = iterator(value, i, arr); - if (temp < compare) { - compare = temp; - result = value; - } - } - - return result; - } - } - - return min; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/pick.js deleted file mode 100644 index 97d7f595..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/pick.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../random/randInt'], function (randInt) { - - /** - * Remove a random item from the Array and return it - */ - function pick(arr){ - if (arr == null || !arr.length) return; - var idx = randInt(0, arr.length - 1); - return arr.splice(idx, 1)[0]; - } - - return pick; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/pluck.js deleted file mode 100644 index c908856e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/pluck.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./map'], function (map) { - - /** - * Extract a list of property values. - */ - function pluck(arr, propName){ - return map(arr, propName); - } - - return pluck; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/range.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/range.js deleted file mode 100644 index 148ebf96..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/range.js +++ /dev/null @@ -1,27 +0,0 @@ -define(['../math/countSteps'], function (countSteps) { - - /** - * Returns an Array of numbers inside range. - */ - function range(start, stop, step) { - if (stop == null) { - stop = start; - start = 0; - } - step = step || 1; - - var result = [], - nSteps = countSteps(stop - start, step), - i = start; - - while (i <= stop) { - result.push(i); - i += step; - } - - return result; - } - - return range; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/reduce.js deleted file mode 100644 index 88aacfd5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/reduce.js +++ /dev/null @@ -1,33 +0,0 @@ -define(['./forEach'], function (forEach) { - - /** - * Array reduce - */ - function reduce(arr, fn, initVal) { - // check for args.length since initVal might be "undefined" see #gh-57 - var hasInit = arguments.length > 2, - result = initVal; - - if (arr == null || !arr.length) { - if (!hasInit) { - throw new Error('reduce of empty array with no initial value'); - } else { - return initVal; - } - } - - var i = -1, len = arr.length; - while (++i < len) { - if (!hasInit) { - result = arr[i]; - hasInit = true; - } else { - result = fn(result, arr[i], i, arr); - } - } - - return result; - } - - return reduce; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/reduceRight.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/reduceRight.js deleted file mode 100644 index ddae0e7f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/reduceRight.js +++ /dev/null @@ -1,34 +0,0 @@ -define(function () { - - /** - * Array reduceRight - */ - function reduceRight(arr, fn, initVal) { - // check for args.length since initVal might be "undefined" see #gh-57 - var hasInit = arguments.length > 2; - - if (arr == null || !arr.length) { - if (hasInit) { - return initVal; - } else { - throw new Error('reduce of empty array with no initial value'); - } - } - - var i = arr.length, result = initVal, value; - while (--i >= 0) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - value = arr[i]; - if (!hasInit) { - result = value; - hasInit = true; - } else { - result = fn(result, value, i, arr); - } - } - return result; - } - - return reduceRight; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/reject.js deleted file mode 100644 index db105dde..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/reject.js +++ /dev/null @@ -1,25 +0,0 @@ -define(['./forEach', '../function/makeIterator_'], function(forEach, makeIterator) { - - /** - * Array reject - */ - function reject(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - if (!callback(value, i, arr)) { - results.push(value); - } - } - - return results; - } - - return reject; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/remove.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/remove.js deleted file mode 100644 index dec9134d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/remove.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./indexOf'], function(indexOf){ - - /** - * Remove a single item from the array. - * (it won't remove duplicates, just a single item) - */ - function remove(arr, item){ - var idx = indexOf(arr, item); - if (idx !== -1) arr.splice(idx, 1); - } - - return remove; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/removeAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/removeAll.js deleted file mode 100644 index e81022b8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/removeAll.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./indexOf'], function(indexOf){ - - /** - * Remove all instances of an item from array. - */ - function removeAll(arr, item){ - var idx = indexOf(arr, item); - while (idx !== -1) { - arr.splice(idx, 1); - idx = indexOf(arr, item, idx); - } - } - - return removeAll; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/shuffle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/shuffle.js deleted file mode 100644 index f5a60972..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/shuffle.js +++ /dev/null @@ -1,28 +0,0 @@ -define(['../random/randInt', './forEach'], function (randInt, forEach) { - - /** - * Shuffle array items. - */ - function shuffle(arr) { - var results = [], - rnd; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - if (!i) { - results[0] = arr[0]; - } else { - rnd = randInt(0, i); - results[i] = results[rnd]; - results[rnd] = arr[i]; - } - } - - return results; - } - - return shuffle; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/some.js deleted file mode 100644 index e46a9781..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/some.js +++ /dev/null @@ -1,27 +0,0 @@ -define(['../function/makeIterator_'], function (makeIterator) { - - /** - * Array some - */ - function some(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = false; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if ( callback(arr[i], i, arr) ) { - result = true; - break; - } - } - - return result; - } - - return some; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/sort.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/sort.js deleted file mode 100644 index 4c194042..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/sort.js +++ /dev/null @@ -1,55 +0,0 @@ -define(function () { - - /** - * Merge sort (http://en.wikipedia.org/wiki/Merge_sort) - */ - function mergeSort(arr, compareFn) { - if (arr == null) { - return []; - } else if (arr.length < 2) { - return arr; - } - - if (compareFn == null) { - compareFn = defaultCompare; - } - - var mid, left, right; - - mid = ~~(arr.length / 2); - left = mergeSort( arr.slice(0, mid), compareFn ); - right = mergeSort( arr.slice(mid, arr.length), compareFn ); - - return merge(left, right, compareFn); - } - - function defaultCompare(a, b) { - return a < b ? -1 : (a > b? 1 : 0); - } - - function merge(left, right, compareFn) { - var result = []; - - while (left.length && right.length) { - if (compareFn(left[0], right[0]) <= 0) { - // if 0 it should preserve same order (stable) - result.push(left.shift()); - } else { - result.push(right.shift()); - } - } - - if (left.length) { - result.push.apply(result, left); - } - - if (right.length) { - result.push.apply(result, right); - } - - return result; - } - - return mergeSort; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/split.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/split.js deleted file mode 100644 index a17275eb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/split.js +++ /dev/null @@ -1,35 +0,0 @@ -define(function() { - - /** - * Split array into a fixed number of segments. - */ - function split(array, segments) { - segments = segments || 2; - var results = []; - if (array == null) { - return results; - } - - var minLength = Math.floor(array.length / segments), - remainder = array.length % segments, - i = 0, - len = array.length, - segmentIndex = 0, - segmentLength; - - while (i < len) { - segmentLength = minLength; - if (segmentIndex < remainder) { - segmentLength++; - } - - results.push(array.slice(i, i + segmentLength)); - - segmentIndex++; - i += segmentLength; - } - - return results; - } - return split; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/toLookup.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/toLookup.js deleted file mode 100644 index aac8fd1d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/toLookup.js +++ /dev/null @@ -1,28 +0,0 @@ -define(['../lang/isFunction'], function (isFunction) { - - /** - * Creates an object that holds a lookup for the objects in the array. - */ - function toLookup(arr, key) { - var result = {}; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length, value; - if (isFunction(key)) { - while (++i < len) { - value = arr[i]; - result[key(value)] = value; - } - } else { - while (++i < len) { - value = arr[i]; - result[value[key]] = value; - } - } - - return result; - } - return toLookup; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/union.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/union.js deleted file mode 100644 index 5f9922e5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/union.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['./unique', './append'], function (unique, append) { - - /** - * Concat multiple arrays and remove duplicates - */ - function union(arrs) { - var results = []; - var i = -1, len = arguments.length; - while (++i < len) { - append(results, arguments[i]); - } - - return unique(results); - } - - return union; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/unique.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/unique.js deleted file mode 100644 index c4bd23b4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/unique.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./indexOf', './filter'], function(indexOf, filter){ - - /** - * @return {array} Array of unique items - */ - function unique(arr){ - return filter(arr, isUnique); - } - - function isUnique(item, i, arr){ - return indexOf(arr, item, i+1) === -1; - } - - return unique; -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/xor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/xor.js deleted file mode 100644 index 7df89d9c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/xor.js +++ /dev/null @@ -1,24 +0,0 @@ -define(['./unique', './filter', './contains'], function (unique, filter, contains) { - - - /** - * Exclusive OR. Returns items that are present in a single array. - * - like ptyhon's `symmetric_difference` - */ - function xor(arr1, arr2) { - arr1 = unique(arr1); - arr2 = unique(arr2); - - var a1 = filter(arr1, function(item){ - return !contains(arr2, item); - }), - a2 = filter(arr2, function(item){ - return !contains(arr1, item); - }); - - return a1.concat(a2); - } - - return xor; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/zip.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/zip.js deleted file mode 100644 index 374cd282..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/array/zip.js +++ /dev/null @@ -1,27 +0,0 @@ -define(['./max', './pluck', './map'], function (max, pluck, map) { - - function getLength(arr) { - return arr == null ? 0 : arr.length; - } - - /** - * Merges together the values of each of the arrays with the values at the - * corresponding position. - */ - function zip(arr){ - var len = arr ? max(map(arguments, getLength)) : 0, - results = [], - i = -1, - item; - while (++i < len) { - results.push(map(arguments, function(item) { - return item == null ? undefined : item[i]; - })); - } - - return results; - } - - return zip; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection.js deleted file mode 100644 index 386e6da9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection.js +++ /dev/null @@ -1,22 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'contains' : require('./collection/contains'), - 'every' : require('./collection/every'), - 'filter' : require('./collection/filter'), - 'find' : require('./collection/find'), - 'forEach' : require('./collection/forEach'), - 'make_' : require('./collection/make_'), - 'map' : require('./collection/map'), - 'max' : require('./collection/max'), - 'min' : require('./collection/min'), - 'pluck' : require('./collection/pluck'), - 'reduce' : require('./collection/reduce'), - 'reject' : require('./collection/reject'), - 'size' : require('./collection/size'), - 'some' : require('./collection/some') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/contains.js deleted file mode 100644 index 192167e8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/contains.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/contains', '../object/contains'], function (make, arrContains, objContains) { - - /** - */ - return make(arrContains, objContains); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/every.js deleted file mode 100644 index 6317f503..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/every.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/every', '../object/every'], function (make, arrEvery, objEvery) { - - /** - */ - return make(arrEvery, objEvery); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/filter.js deleted file mode 100644 index 4e7fadc8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/filter.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { - - /** - * filter collection values, returns array. - */ - function filter(list, iterator, thisObj) { - iterator = makeIterator(iterator, thisObj); - var results = []; - if (!list) { - return results; - } - forEach(list, function(value, index, list) { - if (iterator(value, index, list)) { - results[results.length] = value; - } - }); - return results; - } - - return filter; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/find.js deleted file mode 100644 index 681f9414..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/find.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./make_', '../array/find', '../object/find'], function(make, arrFind, objFind) { - - /** - * Find value that returns true on iterator check. - */ - return make(arrFind, objFind); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/forEach.js deleted file mode 100644 index 3b39d3ed..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/forEach.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/forEach', '../object/forOwn'], function (make, arrForEach, objForEach) { - - /** - */ - return make(arrForEach, objForEach); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/make_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/make_.js deleted file mode 100644 index 312e0564..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/make_.js +++ /dev/null @@ -1,19 +0,0 @@ -define(function(){ - - /** - * internal method used to create other collection modules. - */ - function makeCollectionMethod(arrMethod, objMethod, defaultReturn) { - return function(){ - var args = Array.prototype.slice.call(arguments); - if (args[0] == null) { - return defaultReturn; - } - // array-like is treated as array - return (typeof args[0].length === 'number')? arrMethod.apply(null, args) : objMethod.apply(null, args); - }; - } - - return makeCollectionMethod; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/map.js deleted file mode 100644 index 96e24987..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/map.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['../lang/isObject', '../object/values', '../array/map', '../function/makeIterator_'], function (isObject, values, arrMap, makeIterator) { - - /** - * Map collection values, returns Array. - */ - function map(list, callback, thisObj) { - callback = makeIterator(callback, thisObj); - // list.length to check array-like object, if not array-like - // we simply map all the object values - if( isObject(list) && list.length == null ){ - list = values(list); - } - return arrMap(list, function (val, key, list) { - return callback(val, key, list); - }); - } - - return map; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/max.js deleted file mode 100644 index de9a6da5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/max.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./make_', '../array/max', '../object/max'], function (make, arrMax, objMax) { - - /** - * Get maximum value inside collection - */ - return make(arrMax, objMax); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/min.js deleted file mode 100644 index f0c239a6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/min.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./make_', '../array/min', '../object/min'], function (make, arrMin, objMin) { - - /** - * Get minimum value inside collection. - */ - return make(arrMin, objMin); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/pluck.js deleted file mode 100644 index ef784a7a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/pluck.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['./map'], function (map) { - - /** - * Extract a list of property values. - */ - function pluck(list, key) { - return map(list, function(value) { - return value[key]; - }); - } - - return pluck; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/reduce.js deleted file mode 100644 index bd05d43d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/reduce.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/reduce', '../object/reduce'], function (make, arrReduce, objReduce) { - - /** - */ - return make(arrReduce, objReduce); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/reject.js deleted file mode 100644 index 581adfdc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/reject.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./filter', '../function/makeIterator_'], function (filter, makeIterator) { - - /** - * Inverse or collection/filter - */ - function reject(list, iterator, thisObj) { - iterator = makeIterator(iterator, thisObj); - return filter(list, function(value, index, list) { - return !iterator(value, index, list); - }, thisObj); - } - - return reject; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/size.js deleted file mode 100644 index 4e5ab419..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/size.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../lang/isArray', '../object/size'], function (isArray, objSize) { - - /** - * Get collection size - */ - function size(list) { - if (!list) { - return 0; - } - if (isArray(list)) { - return list.length; - } - return objSize(list); - } - - return size; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/some.js deleted file mode 100644 index c0aebee2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/collection/some.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/some', '../object/some'], function (make, arrSome, objSome) { - - /** - */ - return make(arrSome, objSome); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date.js deleted file mode 100644 index 4d449150..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date.js +++ /dev/null @@ -1,21 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'dayOfTheYear' : require('./date/dayOfTheYear'), - 'diff' : require('./date/diff'), - 'i18n_' : require('./date/i18n_'), - 'isLeapYear' : require('./date/isLeapYear'), - 'isSame' : require('./date/isSame'), - 'parseIso' : require('./date/parseIso'), - 'startOf' : require('./date/startOf'), - 'strftime' : require('./date/strftime'), - 'timezoneAbbr' : require('./date/timezoneAbbr'), - 'timezoneOffset' : require('./date/timezoneOffset'), - 'totalDaysInMonth' : require('./date/totalDaysInMonth'), - 'totalDaysInYear' : require('./date/totalDaysInYear'), - 'weekOfTheYear' : require('./date/weekOfTheYear') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/dayOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/dayOfTheYear.js deleted file mode 100644 index dc77ae1b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/dayOfTheYear.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../lang/isDate'], function (isDate) { - - /** - * return the day of the year (1..366) - */ - function dayOfTheYear(date){ - return (Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) - - Date.UTC(date.getFullYear(), 0, 1)) / 86400000 + 1; - } - - return dayOfTheYear; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/diff.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/diff.js deleted file mode 100644 index 667165fe..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/diff.js +++ /dev/null @@ -1,128 +0,0 @@ -define(['./totalDaysInMonth', './totalDaysInYear', '../time/convert'], function(totalDaysInMonth, totalDaysInYear, convert){ - - /** - * calculate the difference between dates (range) - */ - function diff(start, end, unitName){ - // sort the dates to make it easier to process (specially year/month) - if (start > end) { - var swap = start; - start = end; - end = swap; - } - - var output; - - if (unitName === 'month') { - output = getMonthsDiff(start, end); - } else if (unitName === 'year'){ - output = getYearsDiff(start, end); - } else if (unitName != null) { - if (unitName === 'day') { - // ignore timezone difference because of daylight savings time - start = toUtc(start); - end = toUtc(end); - } - output = convert(end - start, 'ms', unitName); - } else { - output = end - start; - } - - return output; - } - - - function toUtc(d){ - // we ignore timezone differences on purpose because of daylight - // savings time, otherwise it would return fractional days/weeks even - // if a full day elapsed. eg: - // Wed Feb 12 2014 00:00:00 GMT-0200 (BRST) - // Sun Feb 16 2014 00:00:00 GMT-0300 (BRT) - // diff should be 4 days and not 4.041666666666667 - return Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), - d.getHours(), d.getMinutes(), d.getSeconds(), - d.getMilliseconds()); - } - - - function getMonthsDiff(start, end){ - return getElapsedMonths(start, end) + - getElapsedYears(start, end) * 12 + - getFractionalMonth(start, end); - } - - - function getYearsDiff(start, end){ - var elapsedYears = getElapsedYears(start, end); - return elapsedYears + getFractionalYear(start, end, elapsedYears); - } - - - function getElapsedMonths(start, end){ - var monthDiff = end.getMonth() - start.getMonth(); - if (monthDiff < 0) { - monthDiff += 12; - } - // less than a full month - if (start.getDate() > end.getDate()) { - monthDiff -= 1; - } - return monthDiff; - } - - - function getElapsedYears(start, end){ - var yearDiff = end.getFullYear() - start.getFullYear(); - // less than a full year - if (start.getMonth() > end.getMonth()) { - yearDiff -= 1; - } - return yearDiff; - } - - - function getFractionalMonth(start, end){ - var fractionalDiff = 0; - var startDay = start.getDate(); - var endDay = end.getDate(); - - if (startDay !== endDay) { - var startTotalDays = totalDaysInMonth(start); - var endTotalDays = totalDaysInMonth(end); - var totalDays; - var daysElapsed; - - if (startDay > endDay) { - // eg: Jan 29 - Feb 27 (29 days elapsed but not a full month) - var baseDay = startTotalDays - startDay; - daysElapsed = endDay + baseDay; - // total days should be relative to 1st day of next month if - // startDay > endTotalDays - totalDays = (startDay > endTotalDays)? - endTotalDays + baseDay + 1 : startDay + baseDay; - } else { - // fractional is only based on endMonth eg: Jan 12 - Feb 18 - // (6 fractional days, 28 days until next full month) - daysElapsed = endDay - startDay; - totalDays = endTotalDays; - } - - fractionalDiff = daysElapsed / totalDays; - } - - return fractionalDiff; - } - - - function getFractionalYear(start, end, elapsedYears){ - var base = elapsedYears? - new Date(end.getFullYear(), start.getMonth(), start.getDate()) : - start; - var elapsedDays = diff(base, end, 'day'); - return elapsedDays / totalDaysInYear(end); - } - - - return diff; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/en-US.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/en-US.js deleted file mode 100644 index 5e640c22..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/en-US.js +++ /dev/null @@ -1,61 +0,0 @@ -define(function(){ - // en-US (English, United States) - return { - "am" : "AM", - "pm" : "PM", - - "x": "%m/%d/%y", - "X": "%H:%M:%S", - "c": "%a %d %b %Y %I:%M:%S %p %Z", - - "months" : [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" - ], - - "months_abbr" : [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" - ], - - "days" : [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" - ], - - "days_abbr" : [ - "Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat" - ] - }; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/pt-BR.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/pt-BR.js deleted file mode 100644 index 47256dd2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/pt-BR.js +++ /dev/null @@ -1,61 +0,0 @@ -define(function(){ - // pt-BR (Brazillian Portuguese) - return { - "am" : "", - "pm" : "", - - "x": "%d/%m/%y", - "X": "%H:%M:%S", - "c": "%a %d %b %Y %H:%M:%S %Z", - - "months" : [ - "Janeiro", - "Fevereiro", - "Março", - "Abril", - "Maio", - "Junho", - "Julho", - "Agosto", - "Setembro", - "Outubro", - "Novembro", - "Dezembro" - ], - - "months_abbr" : [ - "Jan", - "Fev", - "Mar", - "Abr", - "Mai", - "Jun", - "Jul", - "Ago", - "Set", - "Out", - "Nov", - "Dez" - ], - - "days" : [ - "Domingo", - "Segunda", - "Terça", - "Quarta", - "Quinta", - "Sexta", - "Sábado" - ], - - "days_abbr" : [ - "Dom", - "Seg", - "Ter", - "Qua", - "Qui", - "Sex", - "Sáb" - ] - }; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/i18n_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/i18n_.js deleted file mode 100644 index c04ce885..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/i18n_.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../object/mixIn', './i18n/en-US'], function(mixIn, enUS){ - - // we also use mixIn to make sure we don't affect the original locale - var activeLocale = mixIn({}, enUS, { - // we expose a "set" method to allow overriding the global locale - set : function(localeData){ - mixIn(activeLocale, localeData); - } - }); - - return activeLocale; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/isLeapYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/isLeapYear.js deleted file mode 100644 index e400b43d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/isLeapYear.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['../lang/isDate'], function (isDate) { - - /** - * checks if it's a leap year - */ - function isLeapYear(fullYear){ - if (isDate(fullYear)) { - fullYear = fullYear.getFullYear(); - } - return fullYear % 400 === 0 || (fullYear % 100 !== 0 && fullYear % 4 === 0); - } - - return isLeapYear; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/isSame.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/isSame.js deleted file mode 100644 index f30531fc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/isSame.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./startOf'], function (startOf) { - - /** - * Check if date is "same" with optional period - */ - function isSame(date1, date2, period){ - if (period) { - date1 = startOf(date1, period); - date2 = startOf(date2, period); - } - return Number(date1) === Number(date2); - } - - return isSame; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/parseIso.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/parseIso.js deleted file mode 100644 index 9a2aacb0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/parseIso.js +++ /dev/null @@ -1,146 +0,0 @@ -define(['../array/some'], function (some) { - - var datePatterns = [ - /^([0-9]{4})$/, // YYYY - /^([0-9]{4})-([0-9]{2})$/, // YYYY-MM (YYYYMM not allowed) - /^([0-9]{4})-?([0-9]{2})-?([0-9]{2})$/ // YYYY-MM-DD or YYYYMMDD - ]; - var ORD_DATE = /^([0-9]{4})-?([0-9]{3})$/; // YYYY-DDD - - var timePatterns = [ - /^([0-9]{2}(?:\.[0-9]*)?)$/, // HH.hh - /^([0-9]{2}):?([0-9]{2}(?:\.[0-9]*)?)$/, // HH:MM.mm - /^([0-9]{2}):?([0-9]{2}):?([0-9]{2}(\.[0-9]*)?)$/ // HH:MM:SS.ss - ]; - - var DATE_TIME = /^(.+)T(.+)$/; - var TIME_ZONE = /^(.+)([+\-])([0-9]{2}):?([0-9]{2})$/; - - function matchAll(str, patterns) { - var match; - var found = some(patterns, function(pattern) { - return !!(match = pattern.exec(str)); - }); - - return found ? match : null; - } - - function getDate(year, month, day) { - var date = new Date(Date.UTC(year, month, day)); - - // Explicitly set year to avoid Date.UTC making dates < 100 relative to - // 1900 - date.setUTCFullYear(year); - - var valid = - date.getUTCFullYear() === year && - date.getUTCMonth() === month && - date.getUTCDate() === day; - return valid ? +date : NaN; - } - - function parseOrdinalDate(str) { - var match = ORD_DATE.exec(str); - if (match ) { - var year = +match[1], - day = +match[2], - date = new Date(Date.UTC(year, 0, day)); - - if (date.getUTCFullYear() === year) { - return +date; - } - } - - return NaN; - } - - function parseDate(str) { - var match, year, month, day; - - var match = matchAll(str, datePatterns); - if (match === null) { - // Ordinal dates are verified differently. - return parseOrdinalDate(str); - } - - year = (match[1] === void 0) ? 0 : +match[1]; - month = (match[2] === void 0) ? 0 : +match[2] - 1; - day = (match[3] === void 0) ? 1 : +match[3]; - - return getDate(year, month, day); - } - - function getTime(hr, min, sec) { - var valid = - (hr < 24 && hr >= 0 && - min < 60 && min >= 0 && - sec < 60 && min >= 0) || - (hr === 24 && min === 0 && sec === 0); - if (!valid) { - return NaN; - } - - return ((hr * 60 + min) * 60 + sec) * 1000; - } - - function parseOffset(str) { - var match; - if (str.charAt(str.length - 1) === 'Z') { - str = str.substring(0, str.length - 1); - } else if ((match = TIME_ZONE.exec(str))) { - var match = TIME_ZONE.exec(str); - if (match) { - var hours = +match[3], - minutes = (match[4] === void 0) ? 0 : +match[4], - offset = getTime(hours, minutes, 0); - - if (match[2] === '-') { - offset *= -1; - } - - return { offset: offset, time: match[1] }; - } - } - - // No time zone specified, assume UTC - return { offset: 0, time: str }; - } - - function parseTime(str) { - var match; - var offset = parseOffset(str); - - str = offset.time; - offset = offset.offset; - if (isNaN(offset)) { - return NaN; - } - - match = matchAll(str, timePatterns); - if (match === null) { - return NaN; - } - - var hours = (match[1] === void 0) ? 0 : +match[1], - minutes = (match[2] === void 0) ? 0 : +match[2], - seconds = (match[3] === void 0) ? 0 : +match[3]; - - return getTime(hours, minutes, seconds) - offset; - } - - /** - * Parse an ISO8601 formatted date string, and return a Date object. - */ - function parseISO8601(str){ - var match = DATE_TIME.exec(str); - if (!match) { - // No time specified - return parseDate(str); - } - - return parseDate(match[1]) + parseTime(match[2]); - } - - return parseISO8601; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/startOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/startOf.js deleted file mode 100644 index 747f114d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/startOf.js +++ /dev/null @@ -1,54 +0,0 @@ -define(['../lang/clone'], function (clone) { - - /** - * get a new Date object representing start of period - */ - function startOf(date, period){ - date = clone(date); - - // intentionally removed "break" from switch since start of - // month/year/etc should also reset the following periods - switch (period) { - case 'year': - date.setMonth(0); - /* falls through */ - case 'month': - date.setDate(1); - /* falls through */ - case 'week': - case 'day': - date.setHours(0); - /* falls through */ - case 'hour': - date.setMinutes(0); - /* falls through */ - case 'minute': - date.setSeconds(0); - /* falls through */ - case 'second': - date.setMilliseconds(0); - break; - default: - throw new Error('"'+ period +'" is not a valid period'); - } - - // week is the only case that should reset the weekDay and maybe even - // overflow to previous month - if (period === 'week') { - var weekDay = date.getDay(); - var baseDate = date.getDate(); - if (weekDay) { - if (weekDay >= baseDate) { - //start of the week is on previous month - date.setDate(0); - } - date.setDate(date.getDate() - date.getDay()); - } - } - - return date; - } - - return startOf; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/strftime.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/strftime.js deleted file mode 100644 index dd782505..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/strftime.js +++ /dev/null @@ -1,113 +0,0 @@ -define(['../number/pad', './i18n_', './dayOfTheYear', './timezoneOffset', './timezoneAbbr', './weekOfTheYear'], function (pad, i18n, dayOfTheYear, timezoneOffset, timezoneAbbr, weekOfTheYear) { - - var _combinations = { - 'D': '%m/%d/%y', - 'F': '%Y-%m-%d', - 'r': '%I:%M:%S %p', - 'R': '%H:%M', - 'T': '%H:%M:%S', - 'x': 'locale', - 'X': 'locale', - 'c': 'locale' - }; - - - /** - * format date based on strftime format - */ - function strftime(date, format, localeData){ - localeData = localeData || i18n; - var reToken = /%([a-z%])/gi; - - function makeIterator(fn) { - return function(match, token){ - return fn(date, token, localeData); - }; - } - - return format - .replace(reToken, makeIterator(expandCombinations)) - .replace(reToken, makeIterator(convertToken)); - } - - - function expandCombinations(date, token, l10n){ - if (token in _combinations) { - var expanded = _combinations[token]; - return expanded === 'locale'? l10n[token] : expanded; - } else { - return '%'+ token; - } - } - - - function convertToken(date, token, l10n){ - switch (token){ - case 'a': - return l10n.days_abbr[date.getDay()]; - case 'A': - return l10n.days[date.getDay()]; - case 'h': - case 'b': - return l10n.months_abbr[date.getMonth()]; - case 'B': - return l10n.months[date.getMonth()]; - case 'C': - return pad(Math.floor(date.getFullYear() / 100), 2); - case 'd': - return pad(date.getDate(), 2); - case 'e': - return pad(date.getDate(), 2, ' '); - case 'H': - return pad(date.getHours(), 2); - case 'I': - return pad(date.getHours() % 12, 2); - case 'j': - return pad(dayOfTheYear(date), 3); - case 'L': - return pad(date.getMilliseconds(), 3); - case 'm': - return pad(date.getMonth() + 1, 2); - case 'M': - return pad(date.getMinutes(), 2); - case 'n': - return '\n'; - case 'p': - return date.getHours() >= 12? l10n.pm : l10n.am; - case 'P': - return convertToken(date, 'p', l10n).toLowerCase(); - case 's': - return date.getTime() / 1000; - case 'S': - return pad(date.getSeconds(), 2); - case 't': - return '\t'; - case 'u': - var day = date.getDay(); - return day === 0? 7 : day; - case 'U': - return pad(weekOfTheYear(date), 2); - case 'w': - return date.getDay(); - case 'W': - return pad(weekOfTheYear(date, 1), 2); - case 'y': - return pad(date.getFullYear() % 100, 2); - case 'Y': - return pad(date.getFullYear(), 4); - case 'z': - return timezoneOffset(date); - case 'Z': - return timezoneAbbr(date); - case '%': - return '%'; - default: - // keep unrecognized tokens - return '%'+ token; - } - } - - - return strftime; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneAbbr.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneAbbr.js deleted file mode 100644 index 225a6856..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneAbbr.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['./timezoneOffset'], function(timezoneOffset) { - - /** - * Abbreviated time zone name or similar information. - */ - function timezoneAbbr(date){ - // Date.toString gives different results depending on the - // browser/system so we fallback to timezone offset - // chrome: 'Mon Apr 08 2013 09:02:04 GMT-0300 (BRT)' - // IE: 'Mon Apr 8 09:02:04 UTC-0300 2013' - var tz = /\(([A-Z]{3,4})\)/.exec(date.toString()); - return tz? tz[1] : timezoneOffset(date); - } - - return timezoneAbbr; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneOffset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneOffset.js deleted file mode 100644 index ca06705d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneOffset.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['../number/pad'], function (pad) { - - /** - * time zone as hour and minute offset from UTC (e.g. +0900) - */ - function timezoneOffset(date){ - var offset = date.getTimezoneOffset(); - var abs = Math.abs(offset); - var h = pad(Math.floor(abs / 60), 2); - var m = pad(abs % 60, 2); - return (offset > 0? '-' : '+') + h + m; - } - - return timezoneOffset; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInMonth.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInMonth.js deleted file mode 100644 index 98f7e9d1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInMonth.js +++ /dev/null @@ -1,24 +0,0 @@ -define(['../lang/isDate', './isLeapYear'], function (isDate, isLeapYear) { - - var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; - - /** - * returns the total amount of days in the month (considering leap years) - */ - function totalDaysInMonth(fullYear, monthIndex){ - if (isDate(fullYear)) { - var date = fullYear; - year = date.getFullYear(); - monthIndex = date.getMonth(); - } - - if (monthIndex === 1 && isLeapYear(fullYear)) { - return 29; - } else { - return DAYS_IN_MONTH[monthIndex]; - } - } - - return totalDaysInMonth; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInYear.js deleted file mode 100644 index e9036b42..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInYear.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./isLeapYear'], function (isLeapYear) { - - /** - * return the amount of days in the year following the gregorian calendar - * and leap years - */ - function totalDaysInYear(fullYear){ - return isLeapYear(fullYear)? 366 : 365; - } - - return totalDaysInYear; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/weekOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/weekOfTheYear.js deleted file mode 100644 index 8dabc458..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/date/weekOfTheYear.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./dayOfTheYear'], function (dayOfTheYear) { - - /** - * Return the week of the year based on given firstDayOfWeek - */ - function weekOfTheYear(date, firstDayOfWeek){ - firstDayOfWeek = firstDayOfWeek == null? 0 : firstDayOfWeek; - var doy = dayOfTheYear(date); - var dow = (7 + date.getDay() - firstDayOfWeek) % 7; - var relativeWeekDay = 6 - firstDayOfWeek - dow; - return Math.floor((doy + relativeWeekDay) / 7); - } - - return weekOfTheYear; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function.js deleted file mode 100644 index 23f4fd74..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function.js +++ /dev/null @@ -1,18 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'bind' : require('./function/bind'), - 'compose' : require('./function/compose'), - 'debounce' : require('./function/debounce'), - 'func' : require('./function/func'), - 'makeIterator_' : require('./function/makeIterator_'), - 'partial' : require('./function/partial'), - 'prop' : require('./function/prop'), - 'series' : require('./function/series'), - 'throttle' : require('./function/throttle'), - 'timeout' : require('./function/timeout') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/bind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/bind.js deleted file mode 100644 index 09e5e20a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/bind.js +++ /dev/null @@ -1,23 +0,0 @@ -define(function(){ - - function slice(arr, offset){ - return Array.prototype.slice.call(arr, offset || 0); - } - - /** - * Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. - * @param {Function} fn Function. - * @param {object} context Execution context. - * @param {rest} args Arguments (0...n arguments). - * @return {Function} Wrapped Function. - */ - function bind(fn, context, args){ - var argsArr = slice(arguments, 2); //curried args - return function(){ - return fn.apply(context, argsArr.concat(slice(arguments))); - }; - } - - return bind; -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/compose.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/compose.js deleted file mode 100644 index d8b228fa..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/compose.js +++ /dev/null @@ -1,23 +0,0 @@ -define(function () { - - /** - * Returns a function that composes multiple functions, passing results to - * each other. - */ - function compose() { - var fns = arguments; - return function(arg){ - // only cares about the first argument since the chain can only - // deal with a single return value anyway. It should start from - // the last fn. - var n = fns.length; - while (n--) { - arg = fns[n].call(this, arg); - } - return arg; - }; - } - - return compose; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/debounce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/debounce.js deleted file mode 100644 index 21644ecc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/debounce.js +++ /dev/null @@ -1,29 +0,0 @@ -define(function () { - - /** - * Debounce callback execution - */ - function debounce(fn, threshold, isAsap){ - var timeout, result; - function debounced(){ - var args = arguments, context = this; - function delayed(){ - if (! isAsap) { - result = fn.apply(context, args); - } - timeout = null; - } - if (timeout) { - clearTimeout(timeout); - } else if (isAsap) { - result = fn.apply(context, args); - } - timeout = setTimeout(delayed, threshold); - return result; - } - return debounced; - } - - return debounce; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/func.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/func.js deleted file mode 100644 index b920e00e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/func.js +++ /dev/null @@ -1,14 +0,0 @@ -define(function () { - - /** - * Returns a function that call a method on the passed object - */ - function func(name){ - return function(obj){ - return obj[name](); - }; - } - - return func; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/makeIterator_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/makeIterator_.js deleted file mode 100644 index deb6e137..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/makeIterator_.js +++ /dev/null @@ -1,33 +0,0 @@ -define(['./prop', '../object/deepMatches'], function(prop, deepMatches) { - - /** - * Converts argument into a valid iterator. - * Used internally on most array/object/collection methods that receives a - * callback/iterator providing a shortcut syntax. - */ - function makeIterator(src, thisObj){ - switch(typeof src) { - case 'object': - // typeof null == "object" - return (src != null)? function(val, key, target){ - return deepMatches(val, src); - } : src; - case 'string': - case 'number': - return prop(src); - case 'function': - if (typeof thisObj === 'undefined') { - return src; - } else { - return function(val, i, arr){ - return src.call(thisObj, val, i, arr); - }; - } - default: - return src; - } - } - - return makeIterator; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/partial.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/partial.js deleted file mode 100644 index ad730746..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/partial.js +++ /dev/null @@ -1,19 +0,0 @@ -define(function () { - - function slice(arr, offset){ - return Array.prototype.slice.call(arr, offset || 0); - } - - /** - * Creates a partially applied function. - */ - function partial(fn, var_args){ - var argsArr = slice(arguments, 1); //curried args - return function(){ - return fn.apply(this, argsArr.concat(slice(arguments))); - }; - } - - return partial; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/prop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/prop.js deleted file mode 100644 index c9df78ca..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/prop.js +++ /dev/null @@ -1,14 +0,0 @@ -define(function () { - - /** - * Returns a function that gets a property of the passed object - */ - function prop(name){ - return function(obj){ - return obj[name]; - }; - } - - return prop; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/series.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/series.js deleted file mode 100644 index c8856a27..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/series.js +++ /dev/null @@ -1,22 +0,0 @@ -define(function () { - - /** - * Returns a function that will execute a list of functions in sequence - * passing the same arguments to each one. (useful for batch processing - * items during a forEach loop) - */ - function series(){ - var fns = arguments; - return function(){ - var i = 0, - n = fns.length; - while (i < n) { - fns[i].apply(this, arguments); - i += 1; - } - }; - } - - return series; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/throttle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/throttle.js deleted file mode 100644 index 8ce3929a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/throttle.js +++ /dev/null @@ -1,32 +0,0 @@ -define(['../time/now'], function (now) { - - /** - */ - function throttle(fn, delay){ - var context, timeout, result, args, - cur, diff, prev = 0; - function delayed(){ - prev = now(); - timeout = null; - result = fn.apply(context, args); - } - function throttled(){ - context = this; - args = arguments; - cur = now(); - diff = delay - (cur - prev); - if (diff <= 0) { - clearTimeout(timeout); - prev = cur; - result = fn.apply(context, args); - } else if (! timeout) { - timeout = setTimeout(delayed, diff); - } - return result; - } - return throttled; - } - - return throttle; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/timeout.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/timeout.js deleted file mode 100644 index 15388bdd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/function/timeout.js +++ /dev/null @@ -1,21 +0,0 @@ -define(function () { - - function slice(arr, offset){ - return Array.prototype.slice.call(arr, offset || 0); - } - - /** - * Delays the call of a function within a given context. - */ - function timeout(fn, millis, context){ - - var args = slice(arguments, 3); - - return setTimeout(function() { - fn.apply(context, args); - }, millis); - } - - return timeout; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/index.js deleted file mode 100644 index 744bb119..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/**@license - * mout v0.6.0 | http://moutjs.com | MIT license - */ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'VERSION' : '0.6.0', - 'array' : require('./array'), - 'collection' : require('./collection'), - 'date' : require('./date'), - 'function' : require('./function'), - 'lang' : require('./lang'), - 'math' : require('./math'), - 'number' : require('./number'), - 'object' : require('./object'), - 'queryString' : require('./queryString'), - 'random' : require('./random'), - 'string' : require('./string'), - 'time' : require('./time') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang.js deleted file mode 100644 index de16b597..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang.js +++ /dev/null @@ -1,36 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'clone' : require('./lang/clone'), - 'createObject' : require('./lang/createObject'), - 'ctorApply' : require('./lang/ctorApply'), - 'deepClone' : require('./lang/deepClone'), - 'defaults' : require('./lang/defaults'), - 'inheritPrototype' : require('./lang/inheritPrototype'), - 'is' : require('./lang/is'), - 'isArguments' : require('./lang/isArguments'), - 'isArray' : require('./lang/isArray'), - 'isBoolean' : require('./lang/isBoolean'), - 'isDate' : require('./lang/isDate'), - 'isEmpty' : require('./lang/isEmpty'), - 'isFinite' : require('./lang/isFinite'), - 'isFunction' : require('./lang/isFunction'), - 'isInteger' : require('./lang/isInteger'), - 'isKind' : require('./lang/isKind'), - 'isNaN' : require('./lang/isNaN'), - 'isNull' : require('./lang/isNull'), - 'isNumber' : require('./lang/isNumber'), - 'isObject' : require('./lang/isObject'), - 'isPlainObject' : require('./lang/isPlainObject'), - 'isRegExp' : require('./lang/isRegExp'), - 'isString' : require('./lang/isString'), - 'isUndefined' : require('./lang/isUndefined'), - 'isnt' : require('./lang/isnt'), - 'kindOf' : require('./lang/kindOf'), - 'toArray' : require('./lang/toArray'), - 'toString' : require('./lang/toString') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/clone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/clone.js deleted file mode 100644 index 468489a1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/clone.js +++ /dev/null @@ -1,47 +0,0 @@ -define(['./kindOf', './isPlainObject', '../object/mixIn'], function (kindOf, isPlainObject, mixIn) { - - /** - * Clone native types. - */ - function clone(val){ - switch (kindOf(val)) { - case 'Object': - return cloneObject(val); - case 'Array': - return cloneArray(val); - case 'RegExp': - return cloneRegExp(val); - case 'Date': - return cloneDate(val); - default: - return val; - } - } - - function cloneObject(source) { - if (isPlainObject(source)) { - return mixIn({}, source); - } else { - return source; - } - } - - function cloneRegExp(r) { - var flags = ''; - flags += r.multiline ? 'm' : ''; - flags += r.global ? 'g' : ''; - flags += r.ignorecase ? 'i' : ''; - return new RegExp(r.source, flags); - } - - function cloneDate(date) { - return new Date(+date); - } - - function cloneArray(arr) { - return arr.slice(); - } - - return clone; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/createObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/createObject.js deleted file mode 100644 index f7661500..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/createObject.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../object/mixIn'], function(mixIn){ - - /** - * Create Object using prototypal inheritance and setting custom properties. - * - Mix between Douglas Crockford Prototypal Inheritance <http://javascript.crockford.com/prototypal.html> and the EcmaScript 5 `Object.create()` method. - * @param {object} parent Parent Object. - * @param {object} [props] Object properties. - * @return {object} Created object. - */ - function createObject(parent, props){ - function F(){} - F.prototype = parent; - return mixIn(new F(), props); - - } - return createObject; -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/ctorApply.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/ctorApply.js deleted file mode 100644 index a9ac1c54..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/ctorApply.js +++ /dev/null @@ -1,17 +0,0 @@ -define(function () { - - function F(){} - - /** - * Do fn.apply on a constructor. - */ - function ctorApply(ctor, args) { - F.prototype = ctor.prototype; - var instance = new F(); - ctor.apply(instance, args); - return instance; - } - - return ctorApply; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/deepClone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/deepClone.js deleted file mode 100644 index d45c10aa..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/deepClone.js +++ /dev/null @@ -1,45 +0,0 @@ -define(['./clone', '../object/forOwn', './kindOf', './isPlainObject'], function (clone, forOwn, kindOf, isPlainObject) { - - /** - * Recursively clone native types. - */ - function deepClone(val, instanceClone) { - switch ( kindOf(val) ) { - case 'Object': - return cloneObject(val, instanceClone); - case 'Array': - return cloneArray(val, instanceClone); - default: - return clone(val); - } - } - - function cloneObject(source, instanceClone) { - if (isPlainObject(source)) { - var out = {}; - forOwn(source, function(val, key) { - this[key] = deepClone(val, instanceClone); - }, out); - return out; - } else if (instanceClone) { - return instanceClone(source); - } else { - return source; - } - } - - function cloneArray(arr, instanceClone) { - var out = [], - i = -1, - n = arr.length, - val; - while (++i < n) { - out[i] = deepClone(arr[i], instanceClone); - } - return out; - } - - return deepClone; - -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/defaults.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/defaults.js deleted file mode 100644 index 5156b1bb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/defaults.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./toArray', '../array/find'], function (toArray, find) { - - /** - * Return first non void argument - */ - function defaults(var_args){ - return find(toArray(arguments), nonVoid); - } - - function nonVoid(val){ - return val != null; - } - - return defaults; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/inheritPrototype.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/inheritPrototype.js deleted file mode 100644 index c1fda3a7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/inheritPrototype.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./createObject'], function(createObject){ - - /** - * Inherit prototype from another Object. - * - inspired by Nicholas Zackas <http://nczonline.net> Solution - * @param {object} child Child object - * @param {object} parent Parent Object - */ - function inheritPrototype(child, parent){ - var p = createObject(parent.prototype); - p.constructor = child; - child.prototype = p; - } - - return inheritPrototype; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/is.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/is.js deleted file mode 100644 index 261a2077..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/is.js +++ /dev/null @@ -1,23 +0,0 @@ -define(function () { - - /** - * Check if both arguments are egal. - */ - function is(x, y){ - // implementation borrowed from harmony:egal spec - if (x === y) { - // 0 === -0, but they are not identical - return x !== 0 || 1 / x === 1 / y; - } - - // NaN !== NaN, but they are identical. - // NaNs are the only non-reflexive value, i.e., if x !== x, - // then x is a NaN. - // isNaN is broken: it converts its argument to number, so - // isNaN("foo") => true - return x !== x && y !== y; - } - - return is; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isArguments.js deleted file mode 100644 index f889ee8e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isArguments.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./isKind'], function (isKind) { - - /** - */ - var isArgs = isKind(arguments, 'Arguments')? - function(val){ - return isKind(val, 'Arguments'); - } : - function(val){ - // Arguments is an Object on IE7 - return !!(val && Object.prototype.hasOwnProperty.call(val, 'callee')); - }; - - return isArgs; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isArray.js deleted file mode 100644 index 886e2aa5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isArray.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - var isArray = Array.isArray || function (val) { - return isKind(val, 'Array'); - }; - return isArray; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isBoolean.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isBoolean.js deleted file mode 100644 index 1ca27a69..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isBoolean.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isBoolean(val) { - return isKind(val, 'Boolean'); - } - return isBoolean; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isDate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isDate.js deleted file mode 100644 index 2708d676..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isDate.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isDate(val) { - return isKind(val, 'Date'); - } - return isDate; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isEmpty.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isEmpty.js deleted file mode 100644 index 4cc3d2db..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isEmpty.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['../object/forOwn', './isArray'], function (forOwn, isArray) { - - function isEmpty(val){ - if (val == null) { - // typeof null == 'object' so we check it first - return false; - } else if ( typeof val === 'string' || isArray(val) ) { - return !val.length; - } else if ( typeof val === 'object' || typeof val === 'function' ) { - var result = true; - forOwn(val, function(){ - result = false; - return false; // break loop - }); - return result; - } else { - return false; - } - } - - return isEmpty; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isFinite.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isFinite.js deleted file mode 100644 index 5a982f4b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isFinite.js +++ /dev/null @@ -1,21 +0,0 @@ -define(['./isNumber'], function (isNumber) { - - var global = this; - - /** - * Check if value is finite - */ - function isFinite(val){ - var is = false; - if (typeof val === 'string' && val !== '') { - is = global.isFinite( parseFloat(val) ); - } else if (isNumber(val)){ - // need to use isNumber because of Number constructor - is = global.isFinite( val ); - } - return is; - } - - return isFinite; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isFunction.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isFunction.js deleted file mode 100644 index ff5df7f0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isFunction.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isFunction(val) { - return isKind(val, 'Function'); - } - return isFunction; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isInteger.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isInteger.js deleted file mode 100644 index 1931f516..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isInteger.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./isNumber'], function (isNumber) { - - /** - * Check if value is an integer - */ - function isInteger(val){ - return isNumber(val) && (val % 1 === 0); - } - - return isInteger; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isKind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isKind.js deleted file mode 100644 index 6937a12f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isKind.js +++ /dev/null @@ -1,9 +0,0 @@ -define(['./kindOf'], function (kindOf) { - /** - * Check if value is from a specific "kind". - */ - function isKind(val, kind){ - return kindOf(val) === kind; - } - return isKind; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isNaN.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isNaN.js deleted file mode 100644 index 9467a3c8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isNaN.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./isNumber'], function (isNumber) { - - /** - * Check if value is NaN for realz - */ - function isNaN(val){ - // based on the fact that NaN !== NaN - // need to check if it's a number to avoid conflicts with host objects - // also need to coerce ToNumber to avoid edge case `new Number(NaN)` - return !isNumber(val) || val != +val; - } - - return isNaN; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isNull.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isNull.js deleted file mode 100644 index 506e05ea..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isNull.js +++ /dev/null @@ -1,9 +0,0 @@ -define(function () { - /** - */ - function isNull(val){ - return val === null; - } - return isNull; -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isNumber.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isNumber.js deleted file mode 100644 index 9a832c5f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isNumber.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isNumber(val) { - return isKind(val, 'Number'); - } - return isNumber; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isObject.js deleted file mode 100644 index 0befb063..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isObject.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isObject(val) { - return isKind(val, 'Object'); - } - return isObject; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isPlainObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isPlainObject.js deleted file mode 100644 index 6c5854fd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isPlainObject.js +++ /dev/null @@ -1,14 +0,0 @@ -define(function () { - - /** - * Checks if the value is created by the `Object` constructor. - */ - function isPlainObject(value) { - return (!!value - && typeof value === 'object' - && value.constructor === Object); - } - - return isPlainObject; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isRegExp.js deleted file mode 100644 index d78a03da..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isRegExp.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isRegExp(val) { - return isKind(val, 'RegExp'); - } - return isRegExp; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isString.js deleted file mode 100644 index 8a42fe01..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isString.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isString(val) { - return isKind(val, 'String'); - } - return isString; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isUndefined.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isUndefined.js deleted file mode 100644 index c57b28eb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isUndefined.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function () { - var UNDEF; - - /** - */ - function isUndef(val){ - return val === UNDEF; - } - return isUndef; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isnt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isnt.js deleted file mode 100644 index d4336222..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/isnt.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./is'], function (is) { - - /** - * Check if both values are not identical/egal - */ - function isnt(x, y){ - return !is(x, y); - } - - return isnt; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/kindOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/kindOf.js deleted file mode 100644 index 97d21d15..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/kindOf.js +++ /dev/null @@ -1,20 +0,0 @@ -define(function () { - - var _rKind = /^\[object (.*)\]$/, - _toString = Object.prototype.toString, - UNDEF; - - /** - * Gets the "kind" of value. (e.g. "String", "Number", etc) - */ - function kindOf(val) { - if (val === null) { - return 'Null'; - } else if (val === UNDEF) { - return 'Undefined'; - } else { - return _rKind.exec( _toString.call(val) )[1]; - } - } - return kindOf; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/toArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/toArray.js deleted file mode 100644 index 552916f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/toArray.js +++ /dev/null @@ -1,31 +0,0 @@ -define(['./kindOf'], function (kindOf) { - - var _win = this; - - /** - * Convert array-like object into array - */ - function toArray(val){ - var ret = [], - kind = kindOf(val), - n; - - if (val != null) { - if ( val.length == null || kind === 'String' || kind === 'Function' || kind === 'RegExp' || val === _win ) { - //string, regexp, function have .length but user probably just want - //to wrap value into an array.. - ret[ret.length] = val; - } else { - //window returns true on isObject in IE7 and may have length - //property. `typeof NodeList` returns `function` on Safari so - //we can't use it (#58) - n = val.length; - while (n--) { - ret[n] = val[n]; - } - } - } - return ret; - } - return toArray; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/toString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/toString.js deleted file mode 100644 index c28b89af..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/lang/toString.js +++ /dev/null @@ -1,13 +0,0 @@ -define(function () { - - /** - * Typecast a value to a String, using an empty string value for null or - * undefined. - */ - function toString(val){ - return val == null ? '' : val.toString(); - } - - return toString; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math.js deleted file mode 100644 index e2ba8705..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math.js +++ /dev/null @@ -1,19 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'ceil' : require('./math/ceil'), - 'clamp' : require('./math/clamp'), - 'countSteps' : require('./math/countSteps'), - 'floor' : require('./math/floor'), - 'inRange' : require('./math/inRange'), - 'isNear' : require('./math/isNear'), - 'lerp' : require('./math/lerp'), - 'loop' : require('./math/loop'), - 'map' : require('./math/map'), - 'norm' : require('./math/norm'), - 'round' : require('./math/round') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/ceil.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/ceil.js deleted file mode 100644 index d73b0581..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/ceil.js +++ /dev/null @@ -1,11 +0,0 @@ -define(function(){ - /** - * Round value up with a custom radix. - */ - function ceil(val, step){ - step = Math.abs(step || 1); - return Math.ceil(val / step) * step; - } - - return ceil; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/clamp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/clamp.js deleted file mode 100644 index fb5a1484..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/clamp.js +++ /dev/null @@ -1,9 +0,0 @@ -define(function(){ - /** - * Clamps value inside range. - */ - function clamp(val, min, max){ - return val < min? min : (val > max? max : val); - } - return clamp; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/countSteps.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/countSteps.js deleted file mode 100644 index 0ecb32f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/countSteps.js +++ /dev/null @@ -1,16 +0,0 @@ -define(function(){ - /** - * Count number of full steps. - */ - function countSteps(val, step, overflow){ - val = Math.floor(val / step); - - if (overflow) { - return val % overflow; - } - - return val; - } - - return countSteps; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/floor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/floor.js deleted file mode 100644 index 8a4456b6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/floor.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function(){ - /** - * Floor value to full steps. - */ - function floor(val, step){ - step = Math.abs(step || 1); - return Math.floor(val / step) * step; - } - return floor; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/inRange.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/inRange.js deleted file mode 100644 index 0c890536..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/inRange.js +++ /dev/null @@ -1,11 +0,0 @@ -define(function(){ - /** - * Checks if value is inside the range. - */ - function inRange(val, min, max, threshold){ - threshold = threshold || 0; - return (val + threshold >= min && val - threshold <= max); - } - - return inRange; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/isNear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/isNear.js deleted file mode 100644 index b308a0b0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/isNear.js +++ /dev/null @@ -1,9 +0,0 @@ -define(function(){ - /** - * Check if value is close to target. - */ - function isNear(val, target, threshold){ - return (Math.abs(val - target) <= threshold); - } - return isNear; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/lerp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/lerp.js deleted file mode 100644 index 26b99d04..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/lerp.js +++ /dev/null @@ -1,11 +0,0 @@ -define(function(){ - /** - * Linear interpolation. - * IMPORTANT:will return `Infinity` if numbers overflow Number.MAX_VALUE - */ - function lerp(ratio, start, end){ - return start + (end - start) * ratio; - } - - return lerp; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/loop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/loop.js deleted file mode 100644 index c735ecf6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/loop.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function(){ - /** - * Loops value inside range. - */ - function loop(val, min, max){ - return val < min? max : (val > max? min : val); - } - - return loop; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/map.js deleted file mode 100644 index bf7dc5d5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/map.js +++ /dev/null @@ -1,10 +0,0 @@ -define(['./lerp', './norm'], function(lerp, norm){ - /** - * Maps a number from one scale to another. - * @example map(3, 0, 4, -1, 1) -> 0.5 - */ - function map(val, min1, max1, min2, max2){ - return lerp( norm(val, min1, max1), min2, max2 ); - } - return map; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/norm.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/norm.js deleted file mode 100644 index fccae20e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/norm.js +++ /dev/null @@ -1,9 +0,0 @@ -define(function(){ - /** - * Gets normalized ratio of value inside range. - */ - function norm(val, min, max){ - return (val - min) / (max - min); - } - return norm; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/round.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/round.js deleted file mode 100644 index b43e4ac2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/math/round.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function () { - /** - * Round number to a specific radix - */ - function round(value, radix){ - radix = radix || 1; // default round 1 - return Math.round(value / radix) * radix; - } - - return round; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number.js deleted file mode 100644 index cb52fc75..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number.js +++ /dev/null @@ -1,21 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'MAX_INT' : require('./number/MAX_INT'), - 'MAX_UINT' : require('./number/MAX_UINT'), - 'MIN_INT' : require('./number/MIN_INT'), - 'abbreviate' : require('./number/abbreviate'), - 'currencyFormat' : require('./number/currencyFormat'), - 'enforcePrecision' : require('./number/enforcePrecision'), - 'pad' : require('./number/pad'), - 'rol' : require('./number/rol'), - 'ror' : require('./number/ror'), - 'sign' : require('./number/sign'), - 'toInt' : require('./number/toInt'), - 'toUInt' : require('./number/toUInt'), - 'toUInt31' : require('./number/toUInt31') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_INT.js deleted file mode 100644 index 23a6e1a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_INT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Maximum 32-bit signed integer value. (2^31 - 1) - */ -define(function(){ - return 2147483647; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_UINT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_UINT.js deleted file mode 100644 index a035096c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_UINT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Maximum 32-bit unsigned integet value (2^32 - 1) - */ -define(function(){ - return 4294967295; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/MIN_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/MIN_INT.js deleted file mode 100644 index 9b3e9781..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/MIN_INT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Minimum 32-bit signed integer value (-2^31). - */ -define(function(){ - return -2147483648; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/abbreviate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/abbreviate.js deleted file mode 100644 index 7e7405ad..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/abbreviate.js +++ /dev/null @@ -1,35 +0,0 @@ -define(['./enforcePrecision'], function (enforcePrecision) { - - var _defaultDict = { - thousand : 'K', - million : 'M', - billion : 'B' - }; - - /** - * Abbreviate number if bigger than 1000. (eg: 2.5K, 17.5M, 3.4B, ...) - */ - function abbreviateNumber(val, nDecimals, dict){ - nDecimals = nDecimals != null? nDecimals : 1; - dict = dict || _defaultDict; - val = enforcePrecision(val, nDecimals); - - var str, mod; - - if (val < 1000000) { - mod = enforcePrecision(val / 1000, nDecimals); - // might overflow to next scale during rounding - str = mod < 1000? mod + dict.thousand : 1 + dict.million; - } else if (val < 1000000000) { - mod = enforcePrecision(val / 1000000, nDecimals); - str = mod < 1000? mod + dict.million : 1 + dict.billion; - } else { - str = enforcePrecision(val / 1000000000, nDecimals) + dict.billion; - } - - return str; - } - - return abbreviateNumber; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/currencyFormat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/currencyFormat.js deleted file mode 100644 index dcde8fc7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/currencyFormat.js +++ /dev/null @@ -1,26 +0,0 @@ -define(function () { - - /** - * Converts number into currency format - */ - function currencyFormat(val, nDecimalDigits, decimalSeparator, thousandsSeparator) { - nDecimalDigits = nDecimalDigits == null? 2 : nDecimalDigits; - decimalSeparator = decimalSeparator == null? '.' : decimalSeparator; - thousandsSeparator = thousandsSeparator == null? ',' : thousandsSeparator; - - //can't use enforce precision since it returns a number and we are - //doing a RegExp over the string - var fixed = val.toFixed(nDecimalDigits), - //separate begin [$1], middle [$2] and decimal digits [$4] - parts = new RegExp('^(-?\\d{1,3})((?:\\d{3})+)(\\.(\\d{'+ nDecimalDigits +'}))?$').exec( fixed ); - - if(parts){ //val >= 1000 || val <= -1000 - return parts[1] + parts[2].replace(/\d{3}/g, thousandsSeparator + '$&') + (parts[4] ? decimalSeparator + parts[4] : ''); - }else{ - return fixed.replace('.', decimalSeparator); - } - } - - return currencyFormat; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/enforcePrecision.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/enforcePrecision.js deleted file mode 100644 index 84554d0e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/enforcePrecision.js +++ /dev/null @@ -1,13 +0,0 @@ -define(function(){ - /** - * Enforce a specific amount of decimal digits and also fix floating - * point rounding issues. - * @example `enforcePrecision(0.615, 2) -> 0.62`, `(0.615).toFixed(2) -> - * 0.61` - */ - function enforcePrecision(val, nDecimalDigits){ - var pow = Math.pow(10, nDecimalDigits); - return +(Math.round(val * pow) / pow).toFixed(nDecimalDigits); - } - return enforcePrecision; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/pad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/pad.js deleted file mode 100644 index 3b2c062a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/pad.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['../string/lpad'], function(lpad){ - - /** - * Add padding zeros if n.length < minLength. - */ - function pad(n, minLength, char){ - return lpad(''+ n, minLength, char || '0'); - } - - return pad; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/rol.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/rol.js deleted file mode 100644 index a148f444..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/rol.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function(){ - /** - * Bitwise circular shift left - * http://en.wikipedia.org/wiki/Circular_shift - */ - function rol(val, shift){ - return (val << shift) | (val >> (32 - shift)); - } - return rol; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/ror.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/ror.js deleted file mode 100644 index b5c66f92..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/ror.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function(){ - /** - * Bitwise circular shift right - * http://en.wikipedia.org/wiki/Circular_shift - */ - function ror(val, shift){ - return (val >> shift) | (val << (32 - shift)); - } - return ror; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/sign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/sign.js deleted file mode 100644 index dfc131d5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/sign.js +++ /dev/null @@ -1,15 +0,0 @@ -define(function () { - - /** - * Get sign of the value. - */ - function sign(val) { - var num = Number(val); - if (num === 0) return num; // +0 and +0 === 0 - if (isNaN(num)) return num; // NaN - return num < 0? -1 : 1; - } - - return sign; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/toInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/toInt.js deleted file mode 100644 index 1e9b4c0b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/toInt.js +++ /dev/null @@ -1,15 +0,0 @@ -define(function(){ - - /** - * "Convert" value into an 32-bit integer. - * Works like `Math.floor` if val > 0 and `Math.ceil` if val < 0. - * IMPORTANT: val will wrap at 2^31 and -2^31. - * Perf tests: http://jsperf.com/vs-vs-parseint-bitwise-operators/7 - */ - function toInt(val){ - return ~~val; - } - - return toInt; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt.js deleted file mode 100644 index d5b25b2c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt.js +++ /dev/null @@ -1,13 +0,0 @@ -define(function () { - - /** - * "Convert" value into a 32-bit unsigned integer. - * IMPORTANT: Value will wrap at 2^32. - */ - function toUInt(val){ - return val >>> 0; - } - - return toUInt; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt31.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt31.js deleted file mode 100644 index 9785a054..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt31.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./MAX_INT'], function(MAX_INT){ - - /** - * "Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). - * IMPORTANT: value wil wrap at 2^31, if negative will return 0. - */ - function toUInt31(val){ - return (val <= 0)? 0 : (val > MAX_INT? ~~(val % (MAX_INT + 1)) : ~~val); - } - - return toUInt31; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object.js deleted file mode 100644 index 343e7826..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object.js +++ /dev/null @@ -1,42 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'bindAll' : require('./object/bindAll'), - 'contains' : require('./object/contains'), - 'deepEquals' : require('./object/deepEquals'), - 'deepFillIn' : require('./object/deepFillIn'), - 'deepMatches' : require('./object/deepMatches'), - 'deepMixIn' : require('./object/deepMixIn'), - 'equals' : require('./object/equals'), - 'every' : require('./object/every'), - 'fillIn' : require('./object/fillIn'), - 'filter' : require('./object/filter'), - 'find' : require('./object/find'), - 'forIn' : require('./object/forIn'), - 'forOwn' : require('./object/forOwn'), - 'functions' : require('./object/functions'), - 'get' : require('./object/get'), - 'has' : require('./object/has'), - 'hasOwn' : require('./object/hasOwn'), - 'keys' : require('./object/keys'), - 'map' : require('./object/map'), - 'matches' : require('./object/matches'), - 'max' : require('./object/max'), - 'merge' : require('./object/merge'), - 'min' : require('./object/min'), - 'mixIn' : require('./object/mixIn'), - 'namespace' : require('./object/namespace'), - 'pick' : require('./object/pick'), - 'pluck' : require('./object/pluck'), - 'reduce' : require('./object/reduce'), - 'reject' : require('./object/reject'), - 'set' : require('./object/set'), - 'size' : require('./object/size'), - 'some' : require('./object/some'), - 'unset' : require('./object/unset'), - 'values' : require('./object/values') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/bindAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/bindAll.js deleted file mode 100644 index b131ed15..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/bindAll.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./functions', '../function/bind', '../array/forEach'], function (functions, bind, forEach) { - - /** - * Binds methods of the object to be run in it's own context. - */ - function bindAll(obj, rest_methodNames){ - var keys = arguments.length > 1? - Array.prototype.slice.call(arguments, 1) : functions(obj); - forEach(keys, function(key){ - obj[key] = bind(obj[key], obj); - }); - } - - return bindAll; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/contains.js deleted file mode 100644 index 297e8986..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/contains.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./some'], function (some) { - - /** - * Check if object contains value - */ - function contains(obj, needle) { - return some(obj, function(val) { - return (val === needle); - }); - } - return contains; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/deepEquals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/deepEquals.js deleted file mode 100644 index 8b7d5d15..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/deepEquals.js +++ /dev/null @@ -1,26 +0,0 @@ -define(['../lang/isObject', './equals'], function (isObject, equals) { - - function defaultCompare(a, b) { - return a === b; - } - - /** - * Recursively checks for same properties and values. - */ - function deepEquals(a, b, callback){ - callback = callback || defaultCompare; - - if (!isObject(a) || !isObject(b)) { - return callback(a, b); - } - - function compare(a, b){ - return deepEquals(a, b, callback); - } - - return equals(a, b, compare); - } - - return deepEquals; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/deepFillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/deepFillIn.js deleted file mode 100644 index 84ba154a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/deepFillIn.js +++ /dev/null @@ -1,31 +0,0 @@ -define(['./forOwn', '../lang/isPlainObject'], function (forOwn, isPlainObject) { - - /** - * Deeply copy missing properties in the target from the defaults. - */ - function deepFillIn(target, defaults){ - var i = 0, - n = arguments.length, - obj; - - while(++i < n) { - obj = arguments[i]; - if (obj) { - forOwn(obj, function(newValue, key) { - var curValue = target[key]; - if (curValue == null) { - target[key] = newValue; - } else if (isPlainObject(curValue) - && isPlainObject(newValue)) { - deepFillIn(curValue, newValue); - } - }); - } - } - - return target; - } - - return deepFillIn; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/deepMatches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/deepMatches.js deleted file mode 100644 index 2eae6297..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/deepMatches.js +++ /dev/null @@ -1,54 +0,0 @@ -define(['./forOwn', '../lang/isArray'], function(forOwn, isArray) { - - function containsMatch(array, pattern) { - var i = -1, length = array.length; - while (++i < length) { - if (deepMatches(array[i], pattern)) { - return true; - } - } - - return false; - } - - function matchArray(target, pattern) { - var i = -1, patternLength = pattern.length; - while (++i < patternLength) { - if (!containsMatch(target, pattern[i])) { - return false; - } - } - - return true; - } - - function matchObject(target, pattern) { - var result = true; - forOwn(pattern, function(val, key) { - if (!deepMatches(target[key], val)) { - // Return false to break out of forOwn early - return (result = false); - } - }); - - return result; - } - - /** - * Recursively check if the objects match. - */ - function deepMatches(target, pattern){ - if (target && typeof target === 'object') { - if (isArray(target) && isArray(pattern)) { - return matchArray(target, pattern); - } else { - return matchObject(target, pattern); - } - } else { - return target === pattern; - } - } - - return deepMatches; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/deepMixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/deepMixIn.js deleted file mode 100644 index 1b4178ef..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/deepMixIn.js +++ /dev/null @@ -1,33 +0,0 @@ -define(['./forOwn', '../lang/isPlainObject'], function (forOwn, isPlainObject) { - - /** - * Mixes objects into the target object, recursively mixing existing child - * objects. - */ - function deepMixIn(target, objects) { - var i = 0, - n = arguments.length, - obj; - - while(++i < n){ - obj = arguments[i]; - if (obj) { - forOwn(obj, copyProp, target); - } - } - - return target; - } - - function copyProp(val, key) { - var existing = this[key]; - if (isPlainObject(val) && isPlainObject(existing)) { - deepMixIn(existing, val); - } else { - this[key] = val; - } - } - - return deepMixIn; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/equals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/equals.js deleted file mode 100644 index 596cb952..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/equals.js +++ /dev/null @@ -1,34 +0,0 @@ -define(['./hasOwn', './every', '../lang/isObject'], function(hasOwn, every, isObject) { - - function defaultCompare(a, b) { - return a === b; - } - - // Makes a function to compare the object values from the specified compare - // operation callback. - function makeCompare(callback) { - return function(value, key) { - return hasOwn(this, key) && callback(value, this[key]); - }; - } - - function checkProperties(value, key) { - return hasOwn(this, key); - } - - /** - * Checks if two objects have the same keys and values. - */ - function equals(a, b, callback) { - callback = callback || defaultCompare; - - if (!isObject(a) || !isObject(b)) { - return callback(a, b); - } - - return (every(a, makeCompare(callback), b) && - every(b, checkProperties, a)); - } - - return equals; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/every.js deleted file mode 100644 index 52983a5e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/every.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { - - /** - * Object every - */ - function every(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = true; - forOwn(obj, function(val, key) { - // we consider any falsy values as "false" on purpose so shorthand - // syntax can be used to check property existence - if (!callback(val, key, obj)) { - result = false; - return false; // break - } - }); - return result; - } - - return every; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/fillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/fillIn.js deleted file mode 100644 index 0845d3c2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/fillIn.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['../array/forEach', './forOwn'], function (forEach, forOwn) { - - /** - * Copy missing properties in the obj from the defaults. - */ - function fillIn(obj, var_defaults){ - forEach(Array.prototype.slice.call(arguments, 1), function(base){ - forOwn(base, function(val, key){ - if (obj[key] == null) { - obj[key] = val; - } - }); - }); - return obj; - } - - return fillIn; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/filter.js deleted file mode 100644 index f213b915..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/filter.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { - - /** - * Creates a new object with all the properties where the callback returns - * true. - */ - function filterValues(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var output = {}; - forOwn(obj, function(value, key, obj) { - if (callback(value, key, obj)) { - output[key] = value; - } - }); - - return output; - } - return filterValues; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/find.js deleted file mode 100644 index 47e6b09d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/find.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['./some', '../function/makeIterator_'], function(some, makeIterator) { - - /** - * Returns first item that matches criteria - */ - function find(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result; - some(obj, function(value, key, obj) { - if (callback(value, key, obj)) { - result = value; - return true; //break - } - }); - return result; - } - - return find; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/forIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/forIn.js deleted file mode 100644 index 2058e9cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/forIn.js +++ /dev/null @@ -1,62 +0,0 @@ -define(function () { - - var _hasDontEnumBug, - _dontEnums; - - function checkDontEnum(){ - _dontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' - ]; - - _hasDontEnumBug = true; - - for (var key in {'toString': null}) { - _hasDontEnumBug = false; - } - } - - /** - * Similar to Array/forEach but works over object properties and fixes Don't - * Enum bug on IE. - * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation - */ - function forIn(obj, fn, thisObj){ - var key, i = 0; - // no need to check if argument is a real object that way we can use - // it for arrays, functions, date, etc. - - //post-pone check till needed - if (_hasDontEnumBug == null) checkDontEnum(); - - for (key in obj) { - if (exec(fn, obj, key, thisObj) === false) { - break; - } - } - - if (_hasDontEnumBug) { - while (key = _dontEnums[i++]) { - // since we aren't using hasOwn check we need to make sure the - // property was overwritten - if (obj[key] !== Object.prototype[key]) { - if (exec(fn, obj, key, thisObj) === false) { - break; - } - } - } - } - } - - function exec(fn, obj, key, thisObj){ - return fn.call(thisObj, obj[key], key, obj); - } - - return forIn; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/forOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/forOwn.js deleted file mode 100644 index b40cbaf1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/forOwn.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['./hasOwn', './forIn'], function (hasOwn, forIn) { - - /** - * Similar to Array/forEach but works over object properties and fixes Don't - * Enum bug on IE. - * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation - */ - function forOwn(obj, fn, thisObj){ - forIn(obj, function(val, key){ - if (hasOwn(obj, key)) { - return fn.call(thisObj, obj[key], key, obj); - } - }); - } - - return forOwn; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/functions.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/functions.js deleted file mode 100644 index 60fee3dd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/functions.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['./forIn'], function (forIn) { - - /** - * return a list of all enumerable properties that have function values - */ - function functions(obj){ - var keys = []; - forIn(obj, function(val, key){ - if (typeof val === 'function'){ - keys.push(key); - } - }); - return keys.sort(); - } - - return functions; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/get.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/get.js deleted file mode 100644 index ca80b059..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/get.js +++ /dev/null @@ -1,20 +0,0 @@ -define(function () { - - /** - * get "nested" object property - */ - function get(obj, prop){ - var parts = prop.split('.'), - last = parts.pop(); - - while (prop = parts.shift()) { - obj = obj[prop]; - if (typeof obj !== 'object') return; - } - - return obj[last]; - } - - return get; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/has.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/has.js deleted file mode 100644 index cc29817f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/has.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./get'], function (get) { - - var UNDEF; - - /** - * Check if object has nested property. - */ - function has(obj, prop){ - return get(obj, prop) !== UNDEF; - } - - return has; - -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/hasOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/hasOwn.js deleted file mode 100644 index 5c53bcf2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/hasOwn.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function () { - - /** - * Safer Object.hasOwnProperty - */ - function hasOwn(obj, prop){ - return Object.prototype.hasOwnProperty.call(obj, prop); - } - - return hasOwn; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/keys.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/keys.js deleted file mode 100644 index ed7c4f91..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/keys.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./forOwn'], function (forOwn) { - - /** - * Get object keys - */ - var keys = Object.keys || function (obj) { - var keys = []; - forOwn(obj, function(val, key){ - keys.push(key); - }); - return keys; - }; - - return keys; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/map.js deleted file mode 100644 index 2958f6b0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/map.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { - - /** - * Creates a new object where all the values are the result of calling - * `callback`. - */ - function mapValues(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var output = {}; - forOwn(obj, function(val, key, obj) { - output[key] = callback(val, key, obj); - }); - - return output; - } - return mapValues; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/matches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/matches.js deleted file mode 100644 index 73ff427c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/matches.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['./forOwn'], function (forOwn) { - - /** - * checks if a object contains all given properties/values - */ - function matches(target, props){ - // can't use "object/every" because of circular dependency - var result = true; - forOwn(props, function(val, key){ - if (target[key] !== val) { - // break loop at first difference - return (result = false); - } - }); - return result; - } - - return matches; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/max.js deleted file mode 100644 index ef311dcb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/max.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../array/max', './values'], function(arrMax, values) { - - /** - * Returns maximum value inside object. - */ - function max(obj, compareFn) { - return arrMax(values(obj), compareFn); - } - - return max; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/merge.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/merge.js deleted file mode 100644 index d7cfedec..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/merge.js +++ /dev/null @@ -1,38 +0,0 @@ -define(['./hasOwn', '../lang/deepClone', '../lang/isObject'], function (hasOwn, deepClone, isObject) { - - /** - * Deep merge objects. - */ - function merge() { - var i = 1, - key, val, obj, target; - - // make sure we don't modify source element and it's properties - // objects are passed by reference - target = deepClone( arguments[0] ); - - while (obj = arguments[i++]) { - for (key in obj) { - if ( ! hasOwn(obj, key) ) { - continue; - } - - val = obj[key]; - - if ( isObject(val) && isObject(target[key]) ){ - // inception, deep merge objects - target[key] = merge(target[key], val); - } else { - // make sure arrays, regexp, date, objects are cloned - target[key] = deepClone(val); - } - - } - } - - return target; - } - - return merge; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/min.js deleted file mode 100644 index 9fb4c1a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/min.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../array/min', './values'], function(arrMin, values) { - - /** - * Returns minimum value inside object. - */ - function min(obj, iterator) { - return arrMin(values(obj), iterator); - } - - return min; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/mixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/mixIn.js deleted file mode 100644 index 6210b7e7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/mixIn.js +++ /dev/null @@ -1,28 +0,0 @@ -define(['./forOwn'], function(forOwn){ - - /** - * Combine properties from all the objects into first one. - * - This method affects target object in place, if you want to create a new Object pass an empty object as first param. - * @param {object} target Target Object - * @param {...object} objects Objects to be combined (0...n objects). - * @return {object} Target Object. - */ - function mixIn(target, objects){ - var i = 0, - n = arguments.length, - obj; - while(++i < n){ - obj = arguments[i]; - if (obj != null) { - forOwn(obj, copyProp, target); - } - } - return target; - } - - function copyProp(val, key){ - this[key] = val; - } - - return mixIn; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/namespace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/namespace.js deleted file mode 100644 index 7ed65db8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/namespace.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['../array/forEach'], function (forEach) { - - /** - * Create nested object if non-existent - */ - function namespace(obj, path){ - if (!path) return obj; - forEach(path.split('.'), function(key){ - if (!obj[key]) { - obj[key] = {}; - } - obj = obj[key]; - }); - return obj; - } - - return namespace; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/pick.js deleted file mode 100644 index 76e22bfc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/pick.js +++ /dev/null @@ -1,18 +0,0 @@ -define(function(){ - - /** - * Return a copy of the object, filtered to only have values for the whitelisted keys. - */ - function pick(obj, var_keys){ - var keys = typeof arguments[1] !== 'string'? arguments[1] : Array.prototype.slice.call(arguments, 1), - out = {}, - i = 0, key; - while (key = keys[i++]) { - out[key] = obj[key]; - } - return out; - } - - return pick; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/pluck.js deleted file mode 100644 index d47744bd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/pluck.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./map', '../function/prop'], function (map, prop) { - - /** - * Extract a list of property values. - */ - function pluck(obj, propName){ - return map(obj, prop(propName)); - } - - return pluck; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/reduce.js deleted file mode 100644 index d3a57788..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/reduce.js +++ /dev/null @@ -1,28 +0,0 @@ -define(['./forOwn', './size'], function(forOwn, size) { - - /** - * Object reduce - */ - function reduce(obj, callback, memo, thisObj) { - var initial = arguments.length > 2; - - if (!size(obj) && !initial) { - throw new Error('reduce of empty object with no initial value'); - } - - forOwn(obj, function(value, key, list) { - if (!initial) { - memo = value; - initial = true; - } - else { - memo = callback.call(thisObj, memo, value, key, list); - } - }); - - return memo; - } - - return reduce; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/reject.js deleted file mode 100644 index 84296428..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/reject.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./filter', '../function/makeIterator_'], function (filter, makeIterator) { - - /** - * Object reject - */ - function reject(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - return filter(obj, function(value, index, obj) { - return !callback(value, index, obj); - }, thisObj); - } - - return reject; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/set.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/set.js deleted file mode 100644 index b8fa25a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/set.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['./namespace'], function (namespace) { - - /** - * set "nested" object property - */ - function set(obj, prop, val){ - var parts = (/^(.+)\.(.+)$/).exec(prop); - if (parts){ - namespace(obj, parts[1])[parts[2]] = val; - } else { - obj[prop] = val; - } - } - - return set; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/size.js deleted file mode 100644 index c6e377cf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/size.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./forOwn'], function (forOwn) { - - /** - * Get object size - */ - function size(obj) { - var count = 0; - forOwn(obj, function(){ - count++; - }); - return count; - } - - return size; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/some.js deleted file mode 100644 index 1bd6fdae..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/some.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { - - /** - * Object some - */ - function some(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = false; - forOwn(obj, function(val, key) { - if (callback(val, key, obj)) { - result = true; - return false; // break - } - }); - return result; - } - - return some; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/unset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/unset.js deleted file mode 100644 index 787fc19a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/unset.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['./has'], function (has) { - - /** - * Unset object property. - */ - function unset(obj, prop){ - if (has(obj, prop)) { - var parts = prop.split('.'), - last = parts.pop(); - while (prop = parts.shift()) { - obj = obj[prop]; - } - return (delete obj[last]); - - } else { - // if property doesn't exist treat as deleted - return true; - } - } - - return unset; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/values.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/values.js deleted file mode 100644 index b311fd09..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/object/values.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./forOwn'], function (forOwn) { - - /** - * Get object values - */ - function values(obj) { - var vals = []; - forOwn(obj, function(val, key){ - vals.push(val); - }); - return vals; - } - - return values; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString.js deleted file mode 100644 index 44346127..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString.js +++ /dev/null @@ -1,15 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'contains' : require('./queryString/contains'), - 'decode' : require('./queryString/decode'), - 'encode' : require('./queryString/encode'), - 'getParam' : require('./queryString/getParam'), - 'getQuery' : require('./queryString/getQuery'), - 'parse' : require('./queryString/parse'), - 'setParam' : require('./queryString/setParam') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/contains.js deleted file mode 100644 index a6d11cce..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/contains.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./getQuery'], function (getQuery) { - - /** - * Checks if query string contains parameter. - */ - function contains(url, paramName) { - var regex = new RegExp('(\\?|&)'+ paramName +'=', 'g'); //matches `?param=` or `¶m=` - return regex.test(getQuery(url)); - } - - return contains; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/decode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/decode.js deleted file mode 100644 index 02bc1609..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/decode.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['../string/typecast', '../lang/isString'], function (typecast, isString) { - - /** - * Decode query string into an object of keys => vals. - */ - function decode(queryStr, shouldTypecast) { - var queryArr = (queryStr || '').replace('?', '').split('&'), - n = queryArr.length, - obj = {}, - item, val; - while (n--) { - item = queryArr[n].split('='); - val = shouldTypecast === false? item[1] : typecast(item[1]); - obj[item[0]] = isString(val)? decodeURIComponent(val) : val; - } - return obj; - } - - return decode; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/encode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/encode.js deleted file mode 100644 index bd72a5b6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/encode.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['../object/forOwn'], function (forOwn) { - - /** - * Encode object into a query string. - */ - function encode(obj){ - var query = []; - forOwn(obj, function(val, key){ - query.push( key +'='+ encodeURIComponent(val) ); - }); - return (query.length)? '?'+ query.join('&') : ''; - } - - return encode; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/getParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/getParam.js deleted file mode 100644 index d9813724..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/getParam.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../string/typecast', './getQuery'], function (typecast, getQuery) { - - /** - * Get query parameter value. - */ - function getParam(url, param, shouldTypecast){ - var regexp = new RegExp('(\\?|&)'+ param + '=([^&]*)'), //matches `?param=value` or `¶m=value`, value = $2 - result = regexp.exec( getQuery(url) ), - val = (result && result[2])? result[2] : null; - return shouldTypecast === false? val : typecast(val); - } - - return getParam; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/getQuery.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/getQuery.js deleted file mode 100644 index aa3d99f3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/getQuery.js +++ /dev/null @@ -1,13 +0,0 @@ -define(function () { - - /** - * Gets full query as string with all special chars decoded. - */ - function getQuery(url) { - url = url.replace(/#.*/, ''); //removes hash (to avoid getting hash query) - var queryString = /\?[a-zA-Z0-9\=\&\%\$\-\_\.\+\!\*\'\(\)\,]+/.exec(url); //valid chars according to: http://www.ietf.org/rfc/rfc1738.txt - return (queryString)? decodeURIComponent(queryString[0]) : ''; - } - - return getQuery; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/parse.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/parse.js deleted file mode 100644 index ac153e3f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/parse.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./decode', './getQuery'], function (decode, getQuery) { - - /** - * Get query string, parses and decodes it. - */ - function parse(url, shouldTypecast) { - return decode(getQuery(url), shouldTypecast); - } - - return parse; -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/setParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/setParam.js deleted file mode 100644 index 97081aa7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/queryString/setParam.js +++ /dev/null @@ -1,28 +0,0 @@ -define(function () { - - /** - * Set query string parameter value - */ - function setParam(url, paramName, value){ - url = url || ''; - - var re = new RegExp('(\\?|&)'+ paramName +'=[^&]*' ); - var param = paramName +'='+ encodeURIComponent( value ); - - if ( re.test(url) ) { - return url.replace(re, '$1'+ param); - } else { - if (url.indexOf('?') === -1) { - url += '?'; - } - if (url.indexOf('=') !== -1) { - url += '&'; - } - return url + param; - } - - } - - return setParam; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random.js deleted file mode 100644 index b2641ee3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random.js +++ /dev/null @@ -1,16 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'choice' : require('./random/choice'), - 'guid' : require('./random/guid'), - 'rand' : require('./random/rand'), - 'randBit' : require('./random/randBit'), - 'randHex' : require('./random/randHex'), - 'randInt' : require('./random/randInt'), - 'randSign' : require('./random/randSign'), - 'random' : require('./random/random') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/choice.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/choice.js deleted file mode 100644 index 0d0c38df..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/choice.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['./randInt', '../lang/isArray'], function (randInt, isArray) { - - /** - * Returns a random element from the supplied arguments - * or from the array (if single argument is an array). - */ - function choice(items) { - var target = (arguments.length === 1 && isArray(items))? items : arguments; - return target[ randInt(0, target.length - 1) ]; - } - - return choice; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/guid.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/guid.js deleted file mode 100644 index 82f3a2db..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/guid.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['./randHex', './choice'], function (randHex, choice) { - - /** - * Returns pseudo-random guid (UUID v4) - * IMPORTANT: it's not totally "safe" since randHex/choice uses Math.random - * by default and sequences can be predicted in some cases. See the - * "random/random" documentation for more info about it and how to replace - * the default PRNG. - */ - function guid() { - return ( - randHex(8)+'-'+ - randHex(4)+'-'+ - // v4 UUID always contain "4" at this position to specify it was - // randomly generated - '4' + randHex(3) +'-'+ - // v4 UUID always contain chars [a,b,8,9] at this position - choice(8, 9, 'a', 'b') + randHex(3)+'-'+ - randHex(12) - ); - } - return guid; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/rand.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/rand.js deleted file mode 100644 index b8c231dd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/rand.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./random', '../number/MIN_INT', '../number/MAX_INT'], function(random, MIN_INT, MAX_INT){ - - /** - * Returns random number inside range - */ - function rand(min, max){ - min = min == null? MIN_INT : min; - max = max == null? MAX_INT : max; - return min + (max - min) * random(); - } - - return rand; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/randBit.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/randBit.js deleted file mode 100644 index b3422d2d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/randBit.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['./random'], function (random) { - - /** - * Returns random bit (0 or 1) - */ - function randomBit() { - return random() > 0.5? 1 : 0; - } - - return randomBit; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/randHex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/randHex.js deleted file mode 100644 index 6e9bf1c5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/randHex.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['./choice'], function (choice) { - - var _chars = '0123456789abcdef'.split(''); - - /** - * Returns a random hexadecimal string - */ - function randHex(size){ - size = size && size > 0? size : 6; - var str = ''; - while (size--) { - str += choice(_chars); - } - return str; - } - - return randHex; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/randInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/randInt.js deleted file mode 100644 index 1750e9de..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/randInt.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['../number/MIN_INT', '../number/MAX_INT', './rand'], function(MIN_INT, MAX_INT, rand){ - - /** - * Gets random integer inside range or snap to min/max values. - */ - function randInt(min, max){ - min = min == null? MIN_INT : ~~min; - max = max == null? MAX_INT : ~~max; - // can't be max + 0.5 otherwise it will round up if `rand` - // returns `max` causing it to overflow range. - // -0.5 and + 0.49 are required to avoid bias caused by rounding - return Math.round( rand(min - 0.5, max + 0.499999999999) ); - } - - return randInt; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/randSign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/randSign.js deleted file mode 100644 index 4141cdf6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/randSign.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['./random'], function (random) { - - /** - * Returns random sign (-1 or 1) - */ - function randomSign() { - return random() > 0.5? 1 : -1; - } - - return randomSign; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/random.js deleted file mode 100644 index 4270822e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/random/random.js +++ /dev/null @@ -1,18 +0,0 @@ -define(function () { - - /** - * Just a wrapper to Math.random. No methods inside mout/random should call - * Math.random() directly so we can inject the pseudo-random number - * generator if needed (ie. in case we need a seeded random or a better - * algorithm than the native one) - */ - function random(){ - return random.get(); - } - - // we expose the method so it can be swapped if needed - random.get = Math.random; - - return random; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string.js deleted file mode 100644 index 3f5fd804..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string.js +++ /dev/null @@ -1,45 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'WHITE_SPACES' : require('./string/WHITE_SPACES'), - 'camelCase' : require('./string/camelCase'), - 'contains' : require('./string/contains'), - 'crop' : require('./string/crop'), - 'endsWith' : require('./string/endsWith'), - 'escapeHtml' : require('./string/escapeHtml'), - 'escapeRegExp' : require('./string/escapeRegExp'), - 'escapeUnicode' : require('./string/escapeUnicode'), - 'hyphenate' : require('./string/hyphenate'), - 'interpolate' : require('./string/interpolate'), - 'lowerCase' : require('./string/lowerCase'), - 'lpad' : require('./string/lpad'), - 'ltrim' : require('./string/ltrim'), - 'makePath' : require('./string/makePath'), - 'normalizeLineBreaks' : require('./string/normalizeLineBreaks'), - 'pascalCase' : require('./string/pascalCase'), - 'properCase' : require('./string/properCase'), - 'removeNonASCII' : require('./string/removeNonASCII'), - 'removeNonWord' : require('./string/removeNonWord'), - 'repeat' : require('./string/repeat'), - 'replace' : require('./string/replace'), - 'replaceAccents' : require('./string/replaceAccents'), - 'rpad' : require('./string/rpad'), - 'rtrim' : require('./string/rtrim'), - 'sentenceCase' : require('./string/sentenceCase'), - 'slugify' : require('./string/slugify'), - 'startsWith' : require('./string/startsWith'), - 'stripHtmlTags' : require('./string/stripHtmlTags'), - 'trim' : require('./string/trim'), - 'truncate' : require('./string/truncate'), - 'typecast' : require('./string/typecast'), - 'unCamelCase' : require('./string/unCamelCase'), - 'underscore' : require('./string/underscore'), - 'unescapeHtml' : require('./string/unescapeHtml'), - 'unescapeUnicode' : require('./string/unescapeUnicode'), - 'unhyphenate' : require('./string/unhyphenate'), - 'upperCase' : require('./string/upperCase') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/WHITE_SPACES.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/WHITE_SPACES.js deleted file mode 100644 index e830d86d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/WHITE_SPACES.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function() { - /** - * Contains all Unicode white-spaces. Taken from - * http://en.wikipedia.org/wiki/Whitespace_character. - */ - return [ - ' ', '\n', '\r', '\t', '\f', '\v', '\u00A0', '\u1680', '\u180E', - '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', - '\u2007', '\u2008', '\u2009', '\u200A', '\u2028', '\u2029', '\u202F', - '\u205F', '\u3000' - ]; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/camelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/camelCase.js deleted file mode 100644 index 02e6c04d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/camelCase.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['../lang/toString', './replaceAccents', './removeNonWord', './upperCase', './lowerCase'], function(toString, replaceAccents, removeNonWord, upperCase, lowerCase){ - /** - * Convert string to camelCase text. - */ - function camelCase(str){ - str = toString(str); - str = replaceAccents(str); - str = removeNonWord(str) - .replace(/[\-_]/g, ' ') //convert all hyphens and underscores to spaces - .replace(/\s[a-z]/g, upperCase) //convert first char of each word to UPPERCASE - .replace(/\s+/g, '') //remove spaces - .replace(/^[A-Z]/g, lowerCase); //convert first char to lowercase - return str; - } - return camelCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/contains.js deleted file mode 100644 index 825b5a5f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/contains.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../lang/toString'], function(toString) { - - /** - * Searches for a given substring - */ - function contains(str, substring, fromIndex){ - str = toString(str); - substring = toString(substring); - return str.indexOf(substring, fromIndex) !== -1; - } - - return contains; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/crop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/crop.js deleted file mode 100644 index 3c073f05..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/crop.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString', './truncate'], function (toString, truncate) { - /** - * Truncate string at full words. - */ - function crop(str, maxChars, append) { - str = toString(str); - return truncate(str, maxChars, append, true); - } - - return crop; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/endsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/endsWith.js deleted file mode 100644 index 31a73f20..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/endsWith.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../lang/toString'], function(toString) { - /** - * Checks if string ends with specified suffix. - */ - function endsWith(str, suffix) { - str = toString(str); - suffix = toString(suffix); - - return str.indexOf(suffix, str.length - suffix.length) !== -1; - } - - return endsWith; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/escapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/escapeHtml.js deleted file mode 100644 index de34b61b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/escapeHtml.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../lang/toString'], function(toString) { - - /** - * Escapes a string for insertion into HTML. - */ - function escapeHtml(str){ - str = toString(str) - .replace(/&/g, '&') - .replace(/</g, '<') - .replace(/>/g, '>') - .replace(/'/g, ''') - .replace(/"/g, '"'); - return str; - } - - return escapeHtml; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/escapeRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/escapeRegExp.js deleted file mode 100644 index 32facac0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/escapeRegExp.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['../lang/toString'], function(toString) { - - var ESCAPE_CHARS = /[\\.+*?\^$\[\](){}\/'#]/g; - - /** - * Escape RegExp string chars. - */ - function escapeRegExp(str) { - str = toString(str); - return str.replace(ESCAPE_CHARS,'\\$&'); - } - - return escapeRegExp; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/escapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/escapeUnicode.js deleted file mode 100644 index bd5e8c4c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/escapeUnicode.js +++ /dev/null @@ -1,21 +0,0 @@ -define(['../lang/toString'], function(toString) { - - /** - * Escape string into unicode sequences - */ - function escapeUnicode(str, shouldEscapePrintable){ - str = toString(str); - return str.replace(/[\s\S]/g, function(ch){ - // skip printable ASCII chars if we should not escape them - if (!shouldEscapePrintable && (/[\x20-\x7E]/).test(ch)) { - return ch; - } - // we use "000" and slice(-4) for brevity, need to pad zeros, - // unicode escape always have 4 chars after "\u" - return '\\u'+ ('000'+ ch.charCodeAt(0).toString(16)).slice(-4); - }); - } - - return escapeUnicode; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/hyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/hyphenate.js deleted file mode 100644 index 679c405c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/hyphenate.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['../lang/toString', './slugify', './unCamelCase'], function(toString, slugify, unCamelCase){ - /** - * Replaces spaces with hyphens, split camelCase text, remove non-word chars, remove accents and convert to lower case. - */ - function hyphenate(str){ - str = toString(str); - str = unCamelCase(str); - return slugify(str, "-"); - } - - return hyphenate; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/interpolate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/interpolate.js deleted file mode 100644 index ecb8ba80..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/interpolate.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../lang/toString'], function(toString) { - - var stache = /\{\{(\w+)\}\}/g; //mustache-like - - /** - * String interpolation - */ - function interpolate(template, replacements, syntax){ - template = toString(template); - var replaceFn = function(match, prop){ - return (prop in replacements)? toString(replacements[prop]) : ''; - }; - return template.replace(syntax || stache, replaceFn); - } - - return interpolate; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/lowerCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/lowerCase.js deleted file mode 100644 index b045d69c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/lowerCase.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * "Safer" String.toLowerCase() - */ - function lowerCase(str){ - str = toString(str); - return str.toLowerCase(); - } - - return lowerCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/lpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/lpad.js deleted file mode 100644 index ea4f5fbf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/lpad.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['../lang/toString', './repeat'], function(toString, repeat) { - - /** - * Pad string with `char` if its' length is smaller than `minLen` - */ - function lpad(str, minLen, ch) { - str = toString(str); - ch = ch || ' '; - - return ((str.length < minLen) - ? repeat(ch, minLen - str.length) + str : str); - } - - return lpad; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/ltrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/ltrim.js deleted file mode 100644 index 477df953..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/ltrim.js +++ /dev/null @@ -1,33 +0,0 @@ -define(['../lang/toString', './WHITE_SPACES'], function(toString, WHITE_SPACES){ - /** - * Remove chars from beginning of string. - */ - function ltrim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - - var start = 0, - len = str.length, - charLen = chars.length, - found = true, - i, c; - - while (found && start < len) { - found = false; - i = -1; - c = str.charAt(start); - - while (++i < charLen) { - if (c === chars[i]) { - found = true; - start++; - break; - } - } - } - - return (start >= len) ? '' : str.substr(start, len); - } - - return ltrim; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/makePath.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/makePath.js deleted file mode 100644 index 7aa7baba..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/makePath.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../array/join'], function(join){ - - /** - * Group arguments as path segments, if any of the args is `null` or an - * empty string it will be ignored from resulting path. - */ - function makePath(var_args){ - var result = join(Array.prototype.slice.call(arguments), '/'); - return result.replace(/\/{2,}/g, '/'); - } - - return makePath; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/normalizeLineBreaks.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/normalizeLineBreaks.js deleted file mode 100644 index 44e4194f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/normalizeLineBreaks.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../lang/toString'], function (toString) { - - /** - * Convert line-breaks from DOS/MAC to a single standard (UNIX by default) - */ - function normalizeLineBreaks(str, lineEnd) { - str = toString(str); - lineEnd = lineEnd || '\n'; - - return str - .replace(/\r\n/g, lineEnd) // DOS - .replace(/\r/g, lineEnd) // Mac - .replace(/\n/g, lineEnd); // Unix - } - - return normalizeLineBreaks; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/pascalCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/pascalCase.js deleted file mode 100644 index ead9ead4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/pascalCase.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString', './camelCase', './upperCase'], function(toString, camelCase, upperCase){ - /** - * camelCase + UPPERCASE first char - */ - function pascalCase(str){ - str = toString(str); - return camelCase(str).replace(/^[a-z]/, upperCase); - } - - return pascalCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/properCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/properCase.js deleted file mode 100644 index 2987b507..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/properCase.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString', './lowerCase', './upperCase'], function(toString, lowerCase, upperCase){ - /** - * UPPERCASE first char of each word. - */ - function properCase(str){ - str = toString(str); - return lowerCase(str).replace(/^\w|\s\w/g, upperCase); - } - - return properCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonASCII.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonASCII.js deleted file mode 100644 index 4905869d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonASCII.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * Remove non-printable ASCII chars - */ - function removeNonASCII(str){ - str = toString(str); - - // Matches non-printable ASCII chars - - // http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters - return str.replace(/[^\x20-\x7E]/g, ''); - } - - return removeNonASCII; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonWord.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonWord.js deleted file mode 100644 index 2b1a2040..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonWord.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * Remove non-word chars. - */ - function removeNonWord(str){ - str = toString(str); - return str.replace(/[^0-9a-zA-Z\xC0-\xFF \-_]/g, ''); - } - - return removeNonWord; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/repeat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/repeat.js deleted file mode 100644 index 02f5659f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/repeat.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../lang/toString'], function(toString){ - - /** - * Repeat string n times - */ - function repeat(str, n){ - str = toString(str); - return (new Array(n + 1)).join(str); - } - - return repeat; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/replace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/replace.js deleted file mode 100644 index 8b762fdc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/replace.js +++ /dev/null @@ -1,32 +0,0 @@ -define(['../lang/toString', '../lang/toArray'], function (toString, toArray) { - - /** - * Replace string(s) with the replacement(s) in the source. - */ - function replace(str, search, replacements) { - str = toString(str); - search = toArray(search); - replacements = toArray(replacements); - - var searchLength = search.length, - replacementsLength = replacements.length; - - if (replacementsLength !== 1 && searchLength !== replacementsLength) { - throw new Error('Unequal number of searches and replacements'); - } - - var i = -1; - while (++i < searchLength) { - // Use the first replacement for all searches if only one - // replacement is provided - str = str.replace( - search[i], - replacements[(replacementsLength === 1) ? 0 : i]); - } - - return str; - } - - return replace; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/replaceAccents.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/replaceAccents.js deleted file mode 100644 index 3a63f55a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/replaceAccents.js +++ /dev/null @@ -1,36 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * Replaces all accented chars with regular ones - */ - function replaceAccents(str){ - str = toString(str); - - // verifies if the String has accents and replace them - if (str.search(/[\xC0-\xFF]/g) > -1) { - str = str - .replace(/[\xC0-\xC5]/g, "A") - .replace(/[\xC6]/g, "AE") - .replace(/[\xC7]/g, "C") - .replace(/[\xC8-\xCB]/g, "E") - .replace(/[\xCC-\xCF]/g, "I") - .replace(/[\xD0]/g, "D") - .replace(/[\xD1]/g, "N") - .replace(/[\xD2-\xD6\xD8]/g, "O") - .replace(/[\xD9-\xDC]/g, "U") - .replace(/[\xDD]/g, "Y") - .replace(/[\xDE]/g, "P") - .replace(/[\xE0-\xE5]/g, "a") - .replace(/[\xE6]/g, "ae") - .replace(/[\xE7]/g, "c") - .replace(/[\xE8-\xEB]/g, "e") - .replace(/[\xEC-\xEF]/g, "i") - .replace(/[\xF1]/g, "n") - .replace(/[\xF2-\xF6\xF8]/g, "o") - .replace(/[\xF9-\xFC]/g, "u") - .replace(/[\xFE]/g, "p") - .replace(/[\xFD\xFF]/g, "y"); - } - return str; - } - return replaceAccents; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/rpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/rpad.js deleted file mode 100644 index 2efd9c88..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/rpad.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../lang/toString', './repeat'], function (toString, repeat) { - - /** - * Pad string with `char` if its' length is smaller than `minLen` - */ - function rpad(str, minLen, ch) { - str = toString(str); - ch = ch || ' '; - return (str.length < minLen)? str + repeat(ch, minLen - str.length) : str; - } - - return rpad; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/rtrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/rtrim.js deleted file mode 100644 index a4cc282d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/rtrim.js +++ /dev/null @@ -1,32 +0,0 @@ -define(['../lang/toString', './WHITE_SPACES'], function(toString, WHITE_SPACES){ - /** - * Remove chars from end of string. - */ - function rtrim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - - var end = str.length - 1, - charLen = chars.length, - found = true, - i, c; - - while (found && end >= 0) { - found = false; - i = -1; - c = str.charAt(end); - - while (++i < charLen) { - if (c === chars[i]) { - found = true; - end--; - break; - } - } - } - - return (end >= 0) ? str.substring(0, end + 1) : ''; - } - - return rtrim; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/sentenceCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/sentenceCase.js deleted file mode 100644 index cfe45af5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/sentenceCase.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../lang/toString', './lowerCase', './upperCase'], function(toString, lowerCase, upperCase){ - /** - * UPPERCASE first char of each sentence and lowercase other chars. - */ - function sentenceCase(str){ - str = toString(str); - - // Replace first char of each sentence (new line or after '.\s+') to - // UPPERCASE - return lowerCase(str).replace(/(^\w)|\.\s+(\w)/gm, upperCase); - } - return sentenceCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/slugify.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/slugify.js deleted file mode 100644 index c6d68c7e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/slugify.js +++ /dev/null @@ -1,21 +0,0 @@ -define(['../lang/toString', './replaceAccents', './removeNonWord', './trim'], function(toString, replaceAccents, removeNonWord, trim){ - /** - * Convert to lower case, remove accents, remove non-word chars and - * replace spaces with the specified delimeter. - * Does not split camelCase text. - */ - function slugify(str, delimeter){ - str = toString(str); - - if (delimeter == null) { - delimeter = "-"; - } - str = replaceAccents(str); - str = removeNonWord(str); - str = trim(str) //should come after removeNonWord - .replace(/ +/g, delimeter) //replace spaces with delimeter - .toLowerCase(); - return str; - } - return slugify; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/startsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/startsWith.js deleted file mode 100644 index 88ae5453..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/startsWith.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../lang/toString'], function (toString) { - /** - * Checks if string starts with specified prefix. - */ - function startsWith(str, prefix) { - str = toString(str); - prefix = toString(prefix); - - return str.indexOf(prefix) === 0; - } - - return startsWith; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/stripHtmlTags.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/stripHtmlTags.js deleted file mode 100644 index e8da956d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/stripHtmlTags.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * Remove HTML tags from string. - */ - function stripHtmlTags(str){ - str = toString(str); - - return str.replace(/<[^>]*>/g, ''); - } - return stripHtmlTags; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/trim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/trim.js deleted file mode 100644 index 55526041..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/trim.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['../lang/toString', './WHITE_SPACES', './ltrim', './rtrim'], function(toString, WHITE_SPACES, ltrim, rtrim){ - /** - * Remove white-spaces from beginning and end of string. - */ - function trim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - return ltrim(rtrim(str, chars), chars); - } - - return trim; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/truncate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/truncate.js deleted file mode 100644 index 34000d9f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/truncate.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['../lang/toString', './trim'], function(toString, trim){ - /** - * Limit number of chars. - */ - function truncate(str, maxChars, append, onlyFullWords){ - str = toString(str); - append = append || '...'; - maxChars = onlyFullWords? maxChars + 1 : maxChars; - - str = trim(str); - if(str.length <= maxChars){ - return str; - } - str = str.substr(0, maxChars - append.length); - //crop at last space or remove trailing whitespace - str = onlyFullWords? str.substr(0, str.lastIndexOf(' ')) : trim(str); - return str + append; - } - return truncate; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/typecast.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/typecast.js deleted file mode 100644 index a7c83153..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/typecast.js +++ /dev/null @@ -1,29 +0,0 @@ -define(function () { - - var UNDEF; - - /** - * Parses string and convert it into a native value. - */ - function typecast(val) { - var r; - if ( val === null || val === 'null' ) { - r = null; - } else if ( val === 'true' ) { - r = true; - } else if ( val === 'false' ) { - r = false; - } else if ( val === UNDEF || val === 'undefined' ) { - r = UNDEF; - } else if ( val === '' || isNaN(val) ) { - //isNaN('') returns false - r = val; - } else { - //parseFloat(null || '') returns NaN - r = parseFloat(val); - } - return r; - } - - return typecast; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/unCamelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/unCamelCase.js deleted file mode 100644 index eeef39b6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/unCamelCase.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['../lang/toString'], function(toString){ - - var CAMEL_CASE_BORDER = /([a-z\xE0-\xFF])([A-Z\xC0\xDF])/g; - - /** - * Add space between camelCase text. - */ - function unCamelCase(str, delimiter){ - if (delimiter == null) { - delimiter = ' '; - } - - function join(str, c1, c2) { - return c1 + delimiter + c2; - } - - str = toString(str); - str = str.replace(CAMEL_CASE_BORDER, join); - str = str.toLowerCase(); //add space between camelCase text - return str; - } - return unCamelCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/underscore.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/underscore.js deleted file mode 100644 index 75dd4649..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/underscore.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString', './slugify', './unCamelCase'], function(toString, slugify, unCamelCase){ - /** - * Replaces spaces with underscores, split camelCase text, remove non-word chars, remove accents and convert to lower case. - */ - function underscore(str){ - str = toString(str); - str = unCamelCase(str); - return slugify(str, "_"); - } - return underscore; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeHtml.js deleted file mode 100644 index 173c69c2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeHtml.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../lang/toString'], function (toString) { - - /** - * Unescapes HTML special chars - */ - function unescapeHtml(str){ - str = toString(str) - .replace(/&/g , '&') - .replace(/</g , '<') - .replace(/>/g , '>') - .replace(/'/g , "'") - .replace(/"/g, '"'); - return str; - } - - return unescapeHtml; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeUnicode.js deleted file mode 100644 index d4a7ba1d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeUnicode.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['../lang/toString'], function(toString) { - - /** - * Unescape unicode char sequences - */ - function unescapeUnicode(str){ - str = toString(str); - return str.replace(/\\u[0-9a-f]{4}/g, function(ch){ - var code = parseInt(ch.slice(2), 16); - return String.fromCharCode(code); - }); - } - - return unescapeUnicode; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/unhyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/unhyphenate.js deleted file mode 100644 index 6ac2fa4c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/unhyphenate.js +++ /dev/null @@ -1,10 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * Replaces hyphens with spaces. (only hyphens between word chars) - */ - function unhyphenate(str){ - str = toString(str); - return str.replace(/(\w)(-)(\w)/g, '$1 $3'); - } - return unhyphenate; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/upperCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/upperCase.js deleted file mode 100644 index 8b2073e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/string/upperCase.js +++ /dev/null @@ -1,10 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * "Safer" String.toUpperCase() - */ - function upperCase(str){ - str = toString(str); - return str.toUpperCase(); - } - return upperCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time.js deleted file mode 100644 index 67c90685..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'convert' : require('./time/convert'), - 'now' : require('./time/now'), - 'parseMs' : require('./time/parseMs'), - 'toTimeString' : require('./time/toTimeString') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time/convert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time/convert.js deleted file mode 100644 index 2de0cf2e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time/convert.js +++ /dev/null @@ -1,41 +0,0 @@ -define(function () { - - /** - * convert time into another unit - */ - function convert(val, sourceUnitName, destinationUnitName){ - destinationUnitName = destinationUnitName || 'ms'; - return (val * getUnit(sourceUnitName)) / getUnit(destinationUnitName); - } - - - //TODO: maybe extract to a separate module - function getUnit(unitName){ - switch(unitName){ - case 'ms': - case 'millisecond': - return 1; - case 's': - case 'second': - return 1000; - case 'm': - case 'minute': - return 60000; - case 'h': - case 'hour': - return 3600000; - case 'd': - case 'day': - return 86400000; - case 'w': - case 'week': - return 604800000; - default: - throw new Error('"'+ unitName + '" is not a valid unit'); - } - } - - - return convert; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time/now.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time/now.js deleted file mode 100644 index a3a38bcb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time/now.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function () { - - /** - * Get current time in miliseconds - */ - var now = (typeof Date.now === 'function')? Date.now : function(){ - return +(new Date()); - }; - - return now; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time/parseMs.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time/parseMs.js deleted file mode 100644 index 964929ae..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time/parseMs.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['../math/countSteps'], function(countSteps){ - - /** - * Parse timestamp into an object. - */ - function parseMs(ms){ - return { - milliseconds : countSteps(ms, 1, 1000), - seconds : countSteps(ms, 1000, 60), - minutes : countSteps(ms, 60000, 60), - hours : countSteps(ms, 3600000, 24), - days : countSteps(ms, 86400000) - }; - } - - return parseMs; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time/toTimeString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time/toTimeString.js deleted file mode 100644 index edf18218..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/src/time/toTimeString.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['../math/countSteps', '../number/pad'], function(countSteps, pad){ - - var HOUR = 3600000, - MINUTE = 60000, - SECOND = 1000; - - /** - * Format timestamp into a time string. - */ - function toTimeString(ms){ - var h = ms < HOUR ? 0 : countSteps(ms, HOUR), - m = ms < MINUTE ? 0 : countSteps(ms, MINUTE, 60), - s = ms < SECOND ? 0 : countSteps(ms, SECOND, 60), - str = ''; - - str += h? h + ':' : ''; - str += pad(m, 2) + ':'; - str += pad(s, 2); - - return str; - } - return toTimeString; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string.js deleted file mode 100644 index 7f0ca3bd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string.js +++ /dev/null @@ -1,45 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'WHITE_SPACES' : require('./string/WHITE_SPACES'), - 'camelCase' : require('./string/camelCase'), - 'contains' : require('./string/contains'), - 'crop' : require('./string/crop'), - 'endsWith' : require('./string/endsWith'), - 'escapeHtml' : require('./string/escapeHtml'), - 'escapeRegExp' : require('./string/escapeRegExp'), - 'escapeUnicode' : require('./string/escapeUnicode'), - 'hyphenate' : require('./string/hyphenate'), - 'interpolate' : require('./string/interpolate'), - 'lowerCase' : require('./string/lowerCase'), - 'lpad' : require('./string/lpad'), - 'ltrim' : require('./string/ltrim'), - 'makePath' : require('./string/makePath'), - 'normalizeLineBreaks' : require('./string/normalizeLineBreaks'), - 'pascalCase' : require('./string/pascalCase'), - 'properCase' : require('./string/properCase'), - 'removeNonASCII' : require('./string/removeNonASCII'), - 'removeNonWord' : require('./string/removeNonWord'), - 'repeat' : require('./string/repeat'), - 'replace' : require('./string/replace'), - 'replaceAccents' : require('./string/replaceAccents'), - 'rpad' : require('./string/rpad'), - 'rtrim' : require('./string/rtrim'), - 'sentenceCase' : require('./string/sentenceCase'), - 'slugify' : require('./string/slugify'), - 'startsWith' : require('./string/startsWith'), - 'stripHtmlTags' : require('./string/stripHtmlTags'), - 'trim' : require('./string/trim'), - 'truncate' : require('./string/truncate'), - 'typecast' : require('./string/typecast'), - 'unCamelCase' : require('./string/unCamelCase'), - 'underscore' : require('./string/underscore'), - 'unescapeHtml' : require('./string/unescapeHtml'), - 'unescapeUnicode' : require('./string/unescapeUnicode'), - 'unhyphenate' : require('./string/unhyphenate'), - 'upperCase' : require('./string/upperCase') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/WHITE_SPACES.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/WHITE_SPACES.js deleted file mode 100644 index 03e01254..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/WHITE_SPACES.js +++ /dev/null @@ -1,12 +0,0 @@ - - /** - * Contains all Unicode white-spaces. Taken from - * http://en.wikipedia.org/wiki/Whitespace_character. - */ - module.exports = [ - ' ', '\n', '\r', '\t', '\f', '\v', '\u00A0', '\u1680', '\u180E', - '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', - '\u2007', '\u2008', '\u2009', '\u200A', '\u2028', '\u2029', '\u202F', - '\u205F', '\u3000' - ]; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/camelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/camelCase.js deleted file mode 100644 index aadb69a2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/camelCase.js +++ /dev/null @@ -1,20 +0,0 @@ -var toString = require('../lang/toString'); -var replaceAccents = require('./replaceAccents'); -var removeNonWord = require('./removeNonWord'); -var upperCase = require('./upperCase'); -var lowerCase = require('./lowerCase'); - /** - * Convert string to camelCase text. - */ - function camelCase(str){ - str = toString(str); - str = replaceAccents(str); - str = removeNonWord(str) - .replace(/[\-_]/g, ' ') //convert all hyphens and underscores to spaces - .replace(/\s[a-z]/g, upperCase) //convert first char of each word to UPPERCASE - .replace(/\s+/g, '') //remove spaces - .replace(/^[A-Z]/g, lowerCase); //convert first char to lowercase - return str; - } - module.exports = camelCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/contains.js deleted file mode 100644 index cb22cae4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/contains.js +++ /dev/null @@ -1,14 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Searches for a given substring - */ - function contains(str, substring, fromIndex){ - str = toString(str); - substring = toString(substring); - return str.indexOf(substring, fromIndex) !== -1; - } - - module.exports = contains; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/crop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/crop.js deleted file mode 100644 index 53b93b49..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/crop.js +++ /dev/null @@ -1,12 +0,0 @@ -var toString = require('../lang/toString'); -var truncate = require('./truncate'); - /** - * Truncate string at full words. - */ - function crop(str, maxChars, append) { - str = toString(str); - return truncate(str, maxChars, append, true); - } - - module.exports = crop; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/endsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/endsWith.js deleted file mode 100644 index d504e9dd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/endsWith.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Checks if string ends with specified suffix. - */ - function endsWith(str, suffix) { - str = toString(str); - suffix = toString(suffix); - - return str.indexOf(suffix, str.length - suffix.length) !== -1; - } - - module.exports = endsWith; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/escapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/escapeHtml.js deleted file mode 100644 index e67c4b21..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/escapeHtml.js +++ /dev/null @@ -1,18 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Escapes a string for insertion into HTML. - */ - function escapeHtml(str){ - str = toString(str) - .replace(/&/g, '&') - .replace(/</g, '<') - .replace(/>/g, '>') - .replace(/'/g, ''') - .replace(/"/g, '"'); - return str; - } - - module.exports = escapeHtml; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/escapeRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/escapeRegExp.js deleted file mode 100644 index 70cb84ff..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/escapeRegExp.js +++ /dev/null @@ -1,15 +0,0 @@ -var toString = require('../lang/toString'); - - var ESCAPE_CHARS = /[\\.+*?\^$\[\](){}\/'#]/g; - - /** - * Escape RegExp string chars. - */ - function escapeRegExp(str) { - str = toString(str); - return str.replace(ESCAPE_CHARS,'\\$&'); - } - - module.exports = escapeRegExp; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/escapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/escapeUnicode.js deleted file mode 100644 index ec649adf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/escapeUnicode.js +++ /dev/null @@ -1,21 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Escape string into unicode sequences - */ - function escapeUnicode(str, shouldEscapePrintable){ - str = toString(str); - return str.replace(/[\s\S]/g, function(ch){ - // skip printable ASCII chars if we should not escape them - if (!shouldEscapePrintable && (/[\x20-\x7E]/).test(ch)) { - return ch; - } - // we use "000" and slice(-4) for brevity, need to pad zeros, - // unicode escape always have 4 chars after "\u" - return '\\u'+ ('000'+ ch.charCodeAt(0).toString(16)).slice(-4); - }); - } - - module.exports = escapeUnicode; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/hyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/hyphenate.js deleted file mode 100644 index 95e32436..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/hyphenate.js +++ /dev/null @@ -1,14 +0,0 @@ -var toString = require('../lang/toString'); -var slugify = require('./slugify'); -var unCamelCase = require('./unCamelCase'); - /** - * Replaces spaces with hyphens, split camelCase text, remove non-word chars, remove accents and convert to lower case. - */ - function hyphenate(str){ - str = toString(str); - str = unCamelCase(str); - return slugify(str, "-"); - } - - module.exports = hyphenate; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/interpolate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/interpolate.js deleted file mode 100644 index ac88fac2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/interpolate.js +++ /dev/null @@ -1,18 +0,0 @@ -var toString = require('../lang/toString'); - - var stache = /\{\{(\w+)\}\}/g; //mustache-like - - /** - * String interpolation - */ - function interpolate(template, replacements, syntax){ - template = toString(template); - var replaceFn = function(match, prop){ - return (prop in replacements)? toString(replacements[prop]) : ''; - }; - return template.replace(syntax || stache, replaceFn); - } - - module.exports = interpolate; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/lowerCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/lowerCase.js deleted file mode 100644 index 30bb7ad9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/lowerCase.js +++ /dev/null @@ -1,11 +0,0 @@ -var toString = require('../lang/toString'); - /** - * "Safer" String.toLowerCase() - */ - function lowerCase(str){ - str = toString(str); - return str.toLowerCase(); - } - - module.exports = lowerCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/lpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/lpad.js deleted file mode 100644 index 694d711e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/lpad.js +++ /dev/null @@ -1,17 +0,0 @@ -var toString = require('../lang/toString'); -var repeat = require('./repeat'); - - /** - * Pad string with `char` if its' length is smaller than `minLen` - */ - function lpad(str, minLen, ch) { - str = toString(str); - ch = ch || ' '; - - return ((str.length < minLen) - ? repeat(ch, minLen - str.length) + str : str); - } - - module.exports = lpad; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/ltrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/ltrim.js deleted file mode 100644 index 23d7b33f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/ltrim.js +++ /dev/null @@ -1,34 +0,0 @@ -var toString = require('../lang/toString'); -var WHITE_SPACES = require('./WHITE_SPACES'); - /** - * Remove chars from beginning of string. - */ - function ltrim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - - var start = 0, - len = str.length, - charLen = chars.length, - found = true, - i, c; - - while (found && start < len) { - found = false; - i = -1; - c = str.charAt(start); - - while (++i < charLen) { - if (c === chars[i]) { - found = true; - start++; - break; - } - } - } - - return (start >= len) ? '' : str.substr(start, len); - } - - module.exports = ltrim; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/makePath.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/makePath.js deleted file mode 100644 index 69aef310..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/makePath.js +++ /dev/null @@ -1,13 +0,0 @@ -var join = require('../array/join'); - - /** - * Group arguments as path segments, if any of the args is `null` or an - * empty string it will be ignored from resulting path. - */ - function makePath(var_args){ - var result = join(Array.prototype.slice.call(arguments), '/'); - return result.replace(/\/{2,}/g, '/'); - } - - module.exports = makePath; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/normalizeLineBreaks.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/normalizeLineBreaks.js deleted file mode 100644 index 8a8dccfd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/normalizeLineBreaks.js +++ /dev/null @@ -1,18 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Convert line-breaks from DOS/MAC to a single standard (UNIX by default) - */ - function normalizeLineBreaks(str, lineEnd) { - str = toString(str); - lineEnd = lineEnd || '\n'; - - return str - .replace(/\r\n/g, lineEnd) // DOS - .replace(/\r/g, lineEnd) // Mac - .replace(/\n/g, lineEnd); // Unix - } - - module.exports = normalizeLineBreaks; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/pascalCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/pascalCase.js deleted file mode 100644 index fd190353..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/pascalCase.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); -var camelCase = require('./camelCase'); -var upperCase = require('./upperCase'); - /** - * camelCase + UPPERCASE first char - */ - function pascalCase(str){ - str = toString(str); - return camelCase(str).replace(/^[a-z]/, upperCase); - } - - module.exports = pascalCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/properCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/properCase.js deleted file mode 100644 index 61636be4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/properCase.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); -var lowerCase = require('./lowerCase'); -var upperCase = require('./upperCase'); - /** - * UPPERCASE first char of each word. - */ - function properCase(str){ - str = toString(str); - return lowerCase(str).replace(/^\w|\s\w/g, upperCase); - } - - module.exports = properCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/removeNonASCII.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/removeNonASCII.js deleted file mode 100644 index fb463816..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/removeNonASCII.js +++ /dev/null @@ -1,14 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Remove non-printable ASCII chars - */ - function removeNonASCII(str){ - str = toString(str); - - // Matches non-printable ASCII chars - - // http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters - return str.replace(/[^\x20-\x7E]/g, ''); - } - - module.exports = removeNonASCII; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/removeNonWord.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/removeNonWord.js deleted file mode 100644 index bdd153b9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/removeNonWord.js +++ /dev/null @@ -1,11 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Remove non-word chars. - */ - function removeNonWord(str){ - str = toString(str); - return str.replace(/[^0-9a-zA-Z\xC0-\xFF \-_]/g, ''); - } - - module.exports = removeNonWord; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/repeat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/repeat.js deleted file mode 100644 index 0f9b4754..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/repeat.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Repeat string n times - */ - function repeat(str, n){ - str = toString(str); - return (new Array(n + 1)).join(str); - } - - module.exports = repeat; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/replace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/replace.js deleted file mode 100644 index 14433fc7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/replace.js +++ /dev/null @@ -1,33 +0,0 @@ -var toString = require('../lang/toString'); -var toArray = require('../lang/toArray'); - - /** - * Replace string(s) with the replacement(s) in the source. - */ - function replace(str, search, replacements) { - str = toString(str); - search = toArray(search); - replacements = toArray(replacements); - - var searchLength = search.length, - replacementsLength = replacements.length; - - if (replacementsLength !== 1 && searchLength !== replacementsLength) { - throw new Error('Unequal number of searches and replacements'); - } - - var i = -1; - while (++i < searchLength) { - // Use the first replacement for all searches if only one - // replacement is provided - str = str.replace( - search[i], - replacements[(replacementsLength === 1) ? 0 : i]); - } - - return str; - } - - module.exports = replace; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/replaceAccents.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/replaceAccents.js deleted file mode 100644 index bb221265..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/replaceAccents.js +++ /dev/null @@ -1,36 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Replaces all accented chars with regular ones - */ - function replaceAccents(str){ - str = toString(str); - - // verifies if the String has accents and replace them - if (str.search(/[\xC0-\xFF]/g) > -1) { - str = str - .replace(/[\xC0-\xC5]/g, "A") - .replace(/[\xC6]/g, "AE") - .replace(/[\xC7]/g, "C") - .replace(/[\xC8-\xCB]/g, "E") - .replace(/[\xCC-\xCF]/g, "I") - .replace(/[\xD0]/g, "D") - .replace(/[\xD1]/g, "N") - .replace(/[\xD2-\xD6\xD8]/g, "O") - .replace(/[\xD9-\xDC]/g, "U") - .replace(/[\xDD]/g, "Y") - .replace(/[\xDE]/g, "P") - .replace(/[\xE0-\xE5]/g, "a") - .replace(/[\xE6]/g, "ae") - .replace(/[\xE7]/g, "c") - .replace(/[\xE8-\xEB]/g, "e") - .replace(/[\xEC-\xEF]/g, "i") - .replace(/[\xF1]/g, "n") - .replace(/[\xF2-\xF6\xF8]/g, "o") - .replace(/[\xF9-\xFC]/g, "u") - .replace(/[\xFE]/g, "p") - .replace(/[\xFD\xFF]/g, "y"); - } - return str; - } - module.exports = replaceAccents; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/rpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/rpad.js deleted file mode 100644 index 99f6378d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/rpad.js +++ /dev/null @@ -1,15 +0,0 @@ -var toString = require('../lang/toString'); -var repeat = require('./repeat'); - - /** - * Pad string with `char` if its' length is smaller than `minLen` - */ - function rpad(str, minLen, ch) { - str = toString(str); - ch = ch || ' '; - return (str.length < minLen)? str + repeat(ch, minLen - str.length) : str; - } - - module.exports = rpad; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/rtrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/rtrim.js deleted file mode 100644 index 66ba80e9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/rtrim.js +++ /dev/null @@ -1,33 +0,0 @@ -var toString = require('../lang/toString'); -var WHITE_SPACES = require('./WHITE_SPACES'); - /** - * Remove chars from end of string. - */ - function rtrim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - - var end = str.length - 1, - charLen = chars.length, - found = true, - i, c; - - while (found && end >= 0) { - found = false; - i = -1; - c = str.charAt(end); - - while (++i < charLen) { - if (c === chars[i]) { - found = true; - end--; - break; - } - } - } - - return (end >= 0) ? str.substring(0, end + 1) : ''; - } - - module.exports = rtrim; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/sentenceCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/sentenceCase.js deleted file mode 100644 index 354104c6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/sentenceCase.js +++ /dev/null @@ -1,15 +0,0 @@ -var toString = require('../lang/toString'); -var lowerCase = require('./lowerCase'); -var upperCase = require('./upperCase'); - /** - * UPPERCASE first char of each sentence and lowercase other chars. - */ - function sentenceCase(str){ - str = toString(str); - - // Replace first char of each sentence (new line or after '.\s+') to - // UPPERCASE - return lowerCase(str).replace(/(^\w)|\.\s+(\w)/gm, upperCase); - } - module.exports = sentenceCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/slugify.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/slugify.js deleted file mode 100644 index 142f0d9b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/slugify.js +++ /dev/null @@ -1,24 +0,0 @@ -var toString = require('../lang/toString'); -var replaceAccents = require('./replaceAccents'); -var removeNonWord = require('./removeNonWord'); -var trim = require('./trim'); - /** - * Convert to lower case, remove accents, remove non-word chars and - * replace spaces with the specified delimeter. - * Does not split camelCase text. - */ - function slugify(str, delimeter){ - str = toString(str); - - if (delimeter == null) { - delimeter = "-"; - } - str = replaceAccents(str); - str = removeNonWord(str); - str = trim(str) //should come after removeNonWord - .replace(/ +/g, delimeter) //replace spaces with delimeter - .toLowerCase(); - return str; - } - module.exports = slugify; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/startsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/startsWith.js deleted file mode 100644 index bce2bd20..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/startsWith.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Checks if string starts with specified prefix. - */ - function startsWith(str, prefix) { - str = toString(str); - prefix = toString(prefix); - - return str.indexOf(prefix) === 0; - } - - module.exports = startsWith; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/stripHtmlTags.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/stripHtmlTags.js deleted file mode 100644 index 01d17b0e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/stripHtmlTags.js +++ /dev/null @@ -1,11 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Remove HTML tags from string. - */ - function stripHtmlTags(str){ - str = toString(str); - - return str.replace(/<[^>]*>/g, ''); - } - module.exports = stripHtmlTags; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/trim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/trim.js deleted file mode 100644 index 9652b0c7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/trim.js +++ /dev/null @@ -1,15 +0,0 @@ -var toString = require('../lang/toString'); -var WHITE_SPACES = require('./WHITE_SPACES'); -var ltrim = require('./ltrim'); -var rtrim = require('./rtrim'); - /** - * Remove white-spaces from beginning and end of string. - */ - function trim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - return ltrim(rtrim(str, chars), chars); - } - - module.exports = trim; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/truncate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/truncate.js deleted file mode 100644 index a98d6c7d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/truncate.js +++ /dev/null @@ -1,21 +0,0 @@ -var toString = require('../lang/toString'); -var trim = require('./trim'); - /** - * Limit number of chars. - */ - function truncate(str, maxChars, append, onlyFullWords){ - str = toString(str); - append = append || '...'; - maxChars = onlyFullWords? maxChars + 1 : maxChars; - - str = trim(str); - if(str.length <= maxChars){ - return str; - } - str = str.substr(0, maxChars - append.length); - //crop at last space or remove trailing whitespace - str = onlyFullWords? str.substr(0, str.lastIndexOf(' ')) : trim(str); - return str + append; - } - module.exports = truncate; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/typecast.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/typecast.js deleted file mode 100644 index c1386a49..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/typecast.js +++ /dev/null @@ -1,29 +0,0 @@ - - - var UNDEF; - - /** - * Parses string and convert it into a native value. - */ - function typecast(val) { - var r; - if ( val === null || val === 'null' ) { - r = null; - } else if ( val === 'true' ) { - r = true; - } else if ( val === 'false' ) { - r = false; - } else if ( val === UNDEF || val === 'undefined' ) { - r = UNDEF; - } else if ( val === '' || isNaN(val) ) { - //isNaN('') returns false - r = val; - } else { - //parseFloat(null || '') returns NaN - r = parseFloat(val); - } - return r; - } - - module.exports = typecast; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/unCamelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/unCamelCase.js deleted file mode 100644 index 4968f378..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/unCamelCase.js +++ /dev/null @@ -1,23 +0,0 @@ -var toString = require('../lang/toString'); - - var CAMEL_CASE_BORDER = /([a-z\xE0-\xFF])([A-Z\xC0\xDF])/g; - - /** - * Add space between camelCase text. - */ - function unCamelCase(str, delimiter){ - if (delimiter == null) { - delimiter = ' '; - } - - function join(str, c1, c2) { - return c1 + delimiter + c2; - } - - str = toString(str); - str = str.replace(CAMEL_CASE_BORDER, join); - str = str.toLowerCase(); //add space between camelCase text - return str; - } - module.exports = unCamelCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/underscore.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/underscore.js deleted file mode 100644 index ebd6e2b7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/underscore.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); -var slugify = require('./slugify'); -var unCamelCase = require('./unCamelCase'); - /** - * Replaces spaces with underscores, split camelCase text, remove non-word chars, remove accents and convert to lower case. - */ - function underscore(str){ - str = toString(str); - str = unCamelCase(str); - return slugify(str, "_"); - } - module.exports = underscore; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/unescapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/unescapeHtml.js deleted file mode 100644 index 52cf3f45..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/unescapeHtml.js +++ /dev/null @@ -1,18 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Unescapes HTML special chars - */ - function unescapeHtml(str){ - str = toString(str) - .replace(/&/g , '&') - .replace(/</g , '<') - .replace(/>/g , '>') - .replace(/'/g , "'") - .replace(/"/g, '"'); - return str; - } - - module.exports = unescapeHtml; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/unescapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/unescapeUnicode.js deleted file mode 100644 index 0b7fb73b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/unescapeUnicode.js +++ /dev/null @@ -1,16 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Unescape unicode char sequences - */ - function unescapeUnicode(str){ - str = toString(str); - return str.replace(/\\u[0-9a-f]{4}/g, function(ch){ - var code = parseInt(ch.slice(2), 16); - return String.fromCharCode(code); - }); - } - - module.exports = unescapeUnicode; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/unhyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/unhyphenate.js deleted file mode 100644 index 311dfa17..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/unhyphenate.js +++ /dev/null @@ -1,10 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Replaces hyphens with spaces. (only hyphens between word chars) - */ - function unhyphenate(str){ - str = toString(str); - return str.replace(/(\w)(-)(\w)/g, '$1 $3'); - } - module.exports = unhyphenate; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/upperCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/upperCase.js deleted file mode 100644 index 6c92552c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/string/upperCase.js +++ /dev/null @@ -1,10 +0,0 @@ -var toString = require('../lang/toString'); - /** - * "Safer" String.toUpperCase() - */ - function upperCase(str){ - str = toString(str); - return str.toUpperCase(); - } - module.exports = upperCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time.js deleted file mode 100644 index 9f533296..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time.js +++ /dev/null @@ -1,12 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'convert' : require('./time/convert'), - 'now' : require('./time/now'), - 'parseMs' : require('./time/parseMs'), - 'toTimeString' : require('./time/toTimeString') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time/convert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time/convert.js deleted file mode 100644 index 852a0f03..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time/convert.js +++ /dev/null @@ -1,41 +0,0 @@ - - - /** - * convert time into another unit - */ - function convert(val, sourceUnitName, destinationUnitName){ - destinationUnitName = destinationUnitName || 'ms'; - return (val * getUnit(sourceUnitName)) / getUnit(destinationUnitName); - } - - - //TODO: maybe extract to a separate module - function getUnit(unitName){ - switch(unitName){ - case 'ms': - case 'millisecond': - return 1; - case 's': - case 'second': - return 1000; - case 'm': - case 'minute': - return 60000; - case 'h': - case 'hour': - return 3600000; - case 'd': - case 'day': - return 86400000; - case 'w': - case 'week': - return 604800000; - default: - throw new Error('"'+ unitName + '" is not a valid unit'); - } - } - - - module.exports = convert; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time/now.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time/now.js deleted file mode 100644 index effcfbe3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time/now.js +++ /dev/null @@ -1,12 +0,0 @@ - - - /** - * Get current time in miliseconds - */ - var now = (typeof Date.now === 'function')? Date.now : function(){ - return +(new Date()); - }; - - module.exports = now; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time/parseMs.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time/parseMs.js deleted file mode 100644 index 6d997976..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time/parseMs.js +++ /dev/null @@ -1,17 +0,0 @@ -var countSteps = require('../math/countSteps'); - - /** - * Parse timestamp into an object. - */ - function parseMs(ms){ - return { - milliseconds : countSteps(ms, 1, 1000), - seconds : countSteps(ms, 1000, 60), - minutes : countSteps(ms, 60000, 60), - hours : countSteps(ms, 3600000, 24), - days : countSteps(ms, 86400000) - }; - } - - module.exports = parseMs; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time/toTimeString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time/toTimeString.js deleted file mode 100644 index 101d69fc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/mout/time/toTimeString.js +++ /dev/null @@ -1,24 +0,0 @@ -var countSteps = require('../math/countSteps'); -var pad = require('../number/pad'); - - var HOUR = 3600000, - MINUTE = 60000, - SECOND = 1000; - - /** - * Format timestamp into a time string. - */ - function toTimeString(ms){ - var h = ms < HOUR ? 0 : countSteps(ms, HOUR), - m = ms < MINUTE ? 0 : countSteps(ms, MINUTE, 60), - s = ms < SECOND ? 0 : countSteps(ms, SECOND, 60), - str = ''; - - str += h? h + ':' : ''; - str += pad(m, 2) + ':'; - str += pad(s, 2); - - return str; - } - module.exports = toTimeString; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/.npmignore deleted file mode 100644 index f1250e58..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/History.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/History.md deleted file mode 100644 index 88119480..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/History.md +++ /dev/null @@ -1,42 +0,0 @@ - -1.0.0 / 2013-06-18 -================== - - * remove .version - * >=. Closes #19 - * Merge pull request #15 from davglass/readline-osx - * On OSX revert back to terminal hack to avoid a readline bug - -0.1.0 / 2012-09-19 -================== - - * Fixed logic bug that caused bar to jump one extra space at the end [davglass] - * Working with readline impl, even on Windows [davglass] - * Using readline instead of the \r hack [davglass] - -0.0.5 / 2012-08-07 -================== - - * add ability to tick by zero chunks - tick(0) - * fix ETA. Closes #4 [lwille] - -0.0.4 / 2011-11-14 -================== - - * Allow more recent versions of node - -0.0.3 / 2011-04-20 -================== - - * Changed; erase the line when complete - -0.0.2 / 2011-04-20 -================== - - * Added custom tokens support - * Fixed; clear line before writing - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/Makefile deleted file mode 100644 index 36a3ed7d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/Makefile +++ /dev/null @@ -1,5 +0,0 @@ - -test: - @echo "populate me" - -.PHONY: test \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/Readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/Readme.md deleted file mode 100644 index 4e08a49b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/Readme.md +++ /dev/null @@ -1,117 +0,0 @@ -# node-progress - - Flexible ascii progress bar - -## Installation - - npm install progress - -## Usage - - First we create a `ProgressBar`, giving it a format string - as well as the `total`, telling the progress bar when it will - be considered complete. After that all we need to do is `tick()` appropriately. - -```javascript -var ProgressBar = require('progress'); - -var bar = new ProgressBar(':bar', { total: 10 }); -var timer = setInterval(function(){ - bar.tick(); - if (bar.complete) { - console.log('\ncomplete\n'); - clearInterval(timer); - } -}, 100); -``` - -## Options: - - - `total` total number of ticks to complete - - `width` the displayed width of the progress bar defaulting to total - - `stream` the output stream defaulting to stdout - - `complete` completion character defaulting to "=" - - `incomplete` incomplete character defaulting to "-" - - `clear` option to clear the bar on completion defaulting to false - - `callback` optional function to call when the progress bar completes - -## Tokens: - - - `:bar` the progress bar itself - - `:current` current tick number - - `:total` total ticks - - `:elapsed` time elapsed in seconds - - `:percent` completion percentage - - `:eta` estimated completion time in seconds - -## Examples - -### Download - - In our download example each tick has a variable influence, so we pass the chunk length which adjusts the progress bar appropriately relative to the total length. - -```javascript -var ProgressBar = require('../') - , https = require('https'); - -var req = https.request({ - host: 'download.github.com' - , port: 443 - , path: '/visionmedia-node-jscoverage-0d4608a.zip' -}); - -req.on('response', function(res){ - var len = parseInt(res.headers['content-length'], 10); - - console.log(); - var bar = new ProgressBar(' downloading [:bar] :percent :etas', { - complete: '=' - , incomplete: ' ' - , width: 20 - , total: len - }); - - res.on('data', function(chunk){ - bar.tick(chunk.length); - }); - - res.on('end', function(){ - console.log('\n'); - }); -}); - -req.end(); -``` - - The code above will generate a progress bar that looks like this: - -``` -downloading [===== ] 29% 3.7s -``` - -You can see more examples in the `examples` folder. - -## License - -(The MIT License) - -Copyright (c) 2011 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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/index.js deleted file mode 100644 index 4449dd30..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/node-progress'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/lib/node-progress.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/lib/node-progress.js deleted file mode 100644 index ca0ce4f0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/lib/node-progress.js +++ /dev/null @@ -1,183 +0,0 @@ -/*! - * node-progress - * Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca> - * MIT Licensed - */ - -/** - * Expose `ProgressBar`. - */ - -exports = module.exports = ProgressBar; - -/** - * Initialize a `ProgressBar` with the given - * `fmt` string and `options` or `total`. - * - * Options: - * - * - `total` total number of ticks to complete - * - `width` the displayed width of the progress bar defaulting to total - * - `stream` the output stream defaulting to stdout - * - `complete` completion character defaulting to "=" - * - `incomplete` incomplete character defaulting to "-" - * - `callback` optional function to call when the progress bar completes - * - * Tokens: - * - * - `:bar` the progress bar itself - * - `:current` current tick number - * - `:total` total ticks - * - `:elapsed` time elapsed in seconds - * - `:percent` completion percentage - * - `:eta` eta in seconds - * - * @param {String} fmt - * @param {Object|Number} options or total - * @api public - */ - -function ProgressBar(fmt, options) { - this.rl = require('readline').createInterface({ - input: process.stdin, - output: options.stream || process.stdout - }); - this.rl.setPrompt('', 0); - this.rl.clearLine = function() { - this.write(null, {ctrl: true, name: 'u'}); - }; - - if (typeof(options) == 'number') { - var total = options; - options = {}; - options.total = total; - } else { - options = options || {}; - if ('string' != typeof fmt) throw new Error('format required'); - if ('number' != typeof options.total) throw new Error('total required'); - } - - this.fmt = fmt; - this.curr = 0; - this.total = options.total; - this.width = options.width || this.total; - this.clear = options.clear - this.chars = { - complete: options.complete || '=' - , incomplete: options.incomplete || '-' - }; - this.callback = options.callback || function () {}; -} - -/** - * "tick" the progress bar with optional `len` and - * optional `tokens`. - * - * @param {Number|Object} len or tokens - * @param {Object} tokens - * @api public - */ - -ProgressBar.prototype.tick = function(len, tokens){ - if (len !== 0) - len = len || 1; - - // swap tokens - if ('object' == typeof len) tokens = len, len = 1; - - // start time for eta - if (0 == this.curr) this.start = new Date; - - this.curr += len - this.render(tokens); - - // progress complete - if (this.curr >= this.total) { - this.complete = true; - this.terminate(); - this.callback(this); - return; - } -}; - -/** - * Method to render the progress bar with optional `tokens` to - * place in the progress bar's `fmt` field. - * - * @param {Object} tokens - * @api public - */ - -ProgressBar.prototype.render = function(tokens){ - if(!process.stdout.isTTY) { - return; - } - - var ratio = this.curr / this.total; - ratio = Math.min(Math.max(ratio, 0), 1); - - var percent = ratio * 100 - , complete = Math.round(this.width * ratio) - , incomplete - , elapsed = new Date - this.start - , eta = (percent == 100) ? 0 : elapsed * (this.total / this.curr - 1); - - complete = Array(complete).join(this.chars.complete); - incomplete = Array(this.width - complete.length).join(this.chars.incomplete); - - var str = this.fmt - .replace(':bar', complete + incomplete) - .replace(':current', this.curr) - .replace(':total', this.total) - .replace(':elapsed', isNaN(elapsed) ? "0.0" : (elapsed / 1000).toFixed(1)) - .replace(':eta', (isNaN(eta) || !isFinite(eta)) ? "0.0" : (eta / 1000).toFixed(1)) - .replace(':percent', percent.toFixed(0) + '%'); - - if (tokens) { - for (var key in tokens) { - str = str.replace(':' + key, tokens[key]); - } - } - - this.rl.clearLine(); - this.rl.write(str); -}; - -/** - * "update" the progress bar to represent an exact percentage. - * The ratio (between 0 and 1) specified will be multiplied by `total` and - * floored, representing the closest available "tick." For example, if a - * progress bar has a length of 3 and `update(0.5)` is called, the progress - * will be set to 1. - * - * A ratio of 0.5 will attempt to set the progress to halfway. - * - * @param {Number} ratio The ratio (between 0 and 1 inclusive) to set the - * overall completion to. - * @api public - */ - -ProgressBar.prototype.update = function(ratio, tokens) { - var goal = Math.floor(ratio * this.total); - var delta = goal - this.curr; - - this.tick(delta, tokens); -}; - -/** - * Terminates a progress bar. - * - * @api public - */ - -ProgressBar.prototype.terminate = function() { - this.rl.resume(); - - if (this.clear) { - this.rl.clearLine(); - this.rl.close(); - } else { - this.rl.close(); - console.log(); - } -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/package.json deleted file mode 100644 index c4744b51..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/progress/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "progress", - "version": "1.1.3", - "description": "Flexible ascii progress bar", - "keywords": [ - "cli", - "progress" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "dependencies": {}, - "main": "index", - "engines": { - "node": ">=0.4.0" - }, - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/node-progress" - }, - "readme": "# node-progress\n\n Flexible ascii progress bar\n\n## Installation\n\n npm install progress\n\n## Usage\n\n First we create a `ProgressBar`, giving it a format string\n as well as the `total`, telling the progress bar when it will\n be considered complete. After that all we need to do is `tick()` appropriately.\n\n```javascript\nvar ProgressBar = require('progress');\n\nvar bar = new ProgressBar(':bar', { total: 10 });\nvar timer = setInterval(function(){\n bar.tick();\n if (bar.complete) {\n console.log('\\ncomplete\\n');\n clearInterval(timer);\n }\n}, 100);\n```\n\n## Options:\n\n - `total` total number of ticks to complete\n - `width` the displayed width of the progress bar defaulting to total\n - `stream` the output stream defaulting to stdout\n - `complete` completion character defaulting to \"=\"\n - `incomplete` incomplete character defaulting to \"-\"\n - `clear` option to clear the bar on completion defaulting to false\n - `callback` optional function to call when the progress bar completes\n\n## Tokens:\n\n - `:bar` the progress bar itself\n - `:current` current tick number\n - `:total` total ticks\n - `:elapsed` time elapsed in seconds\n - `:percent` completion percentage\n - `:eta` estimated completion time in seconds\n\n## Examples\n\n### Download\n\n In our download example each tick has a variable influence, so we pass the chunk length which adjusts the progress bar appropriately relative to the total length.\n\n```javascript\nvar ProgressBar = require('../')\n , https = require('https');\n\nvar req = https.request({\n host: 'download.github.com'\n , port: 443\n , path: '/visionmedia-node-jscoverage-0d4608a.zip'\n});\n\nreq.on('response', function(res){\n var len = parseInt(res.headers['content-length'], 10);\n\n console.log();\n var bar = new ProgressBar(' downloading [:bar] :percent :etas', {\n complete: '='\n , incomplete: ' '\n , width: 20\n , total: len\n });\n\n res.on('data', function(chunk){\n bar.tick(chunk.length);\n });\n\n res.on('end', function(){\n console.log('\\n');\n });\n});\n\nreq.end();\n```\n\n The code above will generate a progress bar that looks like this:\n\n```\ndownloading [===== ] 29% 3.7s\n```\n\nYou can see more examples in the `examples` folder.\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk `<tj@vision-media.ca>`\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/node-progress/issues" - }, - "homepage": "https://github.com/visionmedia/node-progress", - "_id": "progress@1.1.3", - "dist": { - "shasum": "42f89c5fc3b6f0408a0bdd68993b174f96aababf" - }, - "_from": "progress@~1.1.0", - "_resolved": "https://registry.npmjs.org/progress/-/progress-1.1.3.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/AUTHORS b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/AUTHORS deleted file mode 100644 index 247b7543..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/AUTHORS +++ /dev/null @@ -1,6 +0,0 @@ -# Authors sorted by whether or not they're me. -Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me) -Wayne Larsen <wayne@larsen.st> (http://github.com/wvl) -ritch <skawful@gmail.com> -Marcel Laverdet -Yosef Dinerstein <yosefd@microsoft.com> diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/LICENSE deleted file mode 100644 index 05a40109..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/README.md deleted file mode 100644 index cd123b65..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/README.md +++ /dev/null @@ -1,30 +0,0 @@ -`rm -rf` for node. - -Install with `npm install rimraf`, or just drop rimraf.js somewhere. - -## API - -`rimraf(f, callback)` - -The callback will be called with an error if there is one. Certain -errors are handled for you: - -* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of - `opts.maxBusyTries` times before giving up. -* `ENOENT` - If the file doesn't exist, rimraf will return - successfully, since your desired outcome is already the case. - -## rimraf.sync - -It can remove stuff synchronously, too. But that's not so good. Use -the async API. It's better. - -## CLI - -If installed with `npm install rimraf -g` it can be used as a global -command `rimraf <path>` which is useful for cross platform support. - -## mkdirp - -If you need to create a directory recursively, check out -[mkdirp](https://github.com/substack/node-mkdirp). diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/bin.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/bin.js deleted file mode 100755 index 29bfa8a6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/bin.js +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env node - -var rimraf = require('./') - -var help = false -var dashdash = false -var args = process.argv.slice(2).filter(function(arg) { - if (dashdash) - return !!arg - else if (arg === '--') - dashdash = true - else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) - help = true - else - return !!arg -}); - -if (help || args.length === 0) { - // If they didn't ask for help, then this is not a "success" - var log = help ? console.log : console.error - log('Usage: rimraf <path>') - log('') - log(' Deletes all files and folders at "path" recursively.') - log('') - log('Options:') - log('') - log(' -h, --help Display this usage info') - process.exit(help ? 0 : 1) -} else { - args.forEach(function(arg) { - rimraf.sync(arg) - }) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/package.json deleted file mode 100644 index 211cc9dc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "rimraf", - "version": "2.2.6", - "main": "rimraf.js", - "description": "A deep deletion module for node (like `rm -rf`)", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": { - "type": "MIT", - "url": "https://github.com/isaacs/rimraf/raw/master/LICENSE" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/rimraf.git" - }, - "scripts": { - "test": "cd test && bash run.sh" - }, - "bin": { - "rimraf": "./bin.js" - }, - "contributors": [ - { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - { - "name": "Wayne Larsen", - "email": "wayne@larsen.st", - "url": "http://github.com/wvl" - }, - { - "name": "ritch", - "email": "skawful@gmail.com" - }, - { - "name": "Marcel Laverdet" - }, - { - "name": "Yosef Dinerstein", - "email": "yosefd@microsoft.com" - } - ], - "readme": "`rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one. Certain\nerrors are handled for you:\n\n* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of\n `opts.maxBusyTries` times before giving up.\n* `ENOENT` - If the file doesn't exist, rimraf will return\n successfully, since your desired outcome is already the case.\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too. But that's not so good. Use\nthe async API. It's better.\n\n## CLI\n\nIf installed with `npm install rimraf -g` it can be used as a global\ncommand `rimraf <path>` which is useful for cross platform support.\n\n## mkdirp\n\nIf you need to create a directory recursively, check out\n[mkdirp](https://github.com/substack/node-mkdirp).\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/rimraf/issues" - }, - "homepage": "https://github.com/isaacs/rimraf", - "_id": "rimraf@2.2.6", - "dist": { - "shasum": "7ada6a6d39b2301af3c8fe7b936c2e46e7c4463d" - }, - "_from": "rimraf@~2.2.6", - "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.6.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/rimraf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/rimraf.js deleted file mode 100644 index ce62051f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/rimraf.js +++ /dev/null @@ -1,178 +0,0 @@ -module.exports = rimraf -rimraf.sync = rimrafSync - -var path = require("path") -var fs = require("fs") - -// for EMFILE handling -var timeout = 0 -exports.EMFILE_MAX = 1000 -exports.BUSYTRIES_MAX = 3 - -var isWindows = (process.platform === "win32") - -function rimraf (p, cb) { - if (!cb) throw new Error("No callback passed to rimraf()") - - var busyTries = 0 - rimraf_(p, function CB (er) { - if (er) { - if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY") && - busyTries < exports.BUSYTRIES_MAX) { - busyTries ++ - var time = busyTries * 100 - // try again, with the same exact callback as this one. - return setTimeout(function () { - rimraf_(p, CB) - }, time) - } - - // this one won't happen if graceful-fs is used. - if (er.code === "EMFILE" && timeout < exports.EMFILE_MAX) { - return setTimeout(function () { - rimraf_(p, CB) - }, timeout ++) - } - - // already gone - if (er.code === "ENOENT") er = null - } - - timeout = 0 - cb(er) - }) -} - -// Two possible strategies. -// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR -// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR -// -// Both result in an extra syscall when you guess wrong. However, there -// are likely far more normal files in the world than directories. This -// is based on the assumption that a the average number of files per -// directory is >= 1. -// -// If anyone ever complains about this, then I guess the strategy could -// be made configurable somehow. But until then, YAGNI. -function rimraf_ (p, cb) { - fs.unlink(p, function (er) { - if (er) { - if (er.code === "ENOENT") - return cb(null) - if (er.code === "EPERM") - return (isWindows) ? fixWinEPERM(p, er, cb) : rmdir(p, er, cb) - if (er.code === "EISDIR") - return rmdir(p, er, cb) - } - return cb(er) - }) -} - -function fixWinEPERM (p, er, cb) { - fs.chmod(p, 666, function (er2) { - if (er2) - cb(er2.code === "ENOENT" ? null : er) - else - fs.stat(p, function(er3, stats) { - if (er3) - cb(er3.code === "ENOENT" ? null : er) - else if (stats.isDirectory()) - rmdir(p, er, cb) - else - fs.unlink(p, cb) - }) - }) -} - -function fixWinEPERMSync (p, er, cb) { - try { - fs.chmodSync(p, 666) - } catch (er2) { - if (er2.code !== "ENOENT") - throw er - } - - try { - var stats = fs.statSync(p) - } catch (er3) { - if (er3 !== "ENOENT") - throw er - } - - if (stats.isDirectory()) - rmdirSync(p, er) - else - fs.unlinkSync(p) -} - -function rmdir (p, originalEr, cb) { - // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) - // if we guessed wrong, and it's not a directory, then - // raise the original error. - fs.rmdir(p, function (er) { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) - rmkids(p, cb) - else if (er && er.code === "ENOTDIR") - cb(originalEr) - else - cb(er) - }) -} - -function rmkids(p, cb) { - fs.readdir(p, function (er, files) { - if (er) - return cb(er) - var n = files.length - if (n === 0) - return fs.rmdir(p, cb) - var errState - files.forEach(function (f) { - rimraf(path.join(p, f), function (er) { - if (errState) - return - if (er) - return cb(errState = er) - if (--n === 0) - fs.rmdir(p, cb) - }) - }) - }) -} - -// this looks simpler, and is strictly *faster*, but will -// tie up the JavaScript thread and fail on excessively -// deep directory trees. -function rimrafSync (p) { - try { - fs.unlinkSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - if (er.code === "EPERM") - return isWindows ? fixWinEPERMSync(p, er) : rmdirSync(p, er) - if (er.code !== "EISDIR") - throw er - rmdirSync(p, er) - } -} - -function rmdirSync (p, originalEr) { - try { - fs.rmdirSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - if (er.code === "ENOTDIR") - throw originalEr - if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") - rmkidsSync(p) - } -} - -function rmkidsSync (p) { - fs.readdirSync(p).forEach(function (f) { - rimrafSync(path.join(p, f)) - }) - fs.rmdirSync(p) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/test/run.sh b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/test/run.sh deleted file mode 100644 index 598f0163..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/test/run.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -set -e -for i in test-*.js; do - echo -n $i ... - bash setup.sh - node $i - ! [ -d target ] - echo "pass" -done -rm -rf target diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/test/setup.sh b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/test/setup.sh deleted file mode 100644 index 2602e631..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/test/setup.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -set -e - -files=10 -folders=2 -depth=4 -target="$PWD/target" - -rm -rf target - -fill () { - local depth=$1 - local files=$2 - local folders=$3 - local target=$4 - - if ! [ -d $target ]; then - mkdir -p $target - fi - - local f - - f=$files - while [ $f -gt 0 ]; do - touch "$target/f-$depth-$f" - let f-- - done - - let depth-- - - if [ $depth -le 0 ]; then - return 0 - fi - - f=$folders - while [ $f -gt 0 ]; do - mkdir "$target/folder-$depth-$f" - fill $depth $files $folders "$target/d-$depth-$f" - let f-- - done -} - -fill $depth $files $folders $target - -# sanity assert -[ -d $target ] diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/test/test-async.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/test/test-async.js deleted file mode 100644 index 9c2e0b7b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/test/test-async.js +++ /dev/null @@ -1,5 +0,0 @@ -var rimraf = require("../rimraf") - , path = require("path") -rimraf(path.join(__dirname, "target"), function (er) { - if (er) throw er -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/test/test-sync.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/test/test-sync.js deleted file mode 100644 index eb71f104..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/rimraf/test/test-sync.js +++ /dev/null @@ -1,3 +0,0 @@ -var rimraf = require("../rimraf") - , path = require("path") -rimraf.sync(path.join(__dirname, "target")) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/LICENSE deleted file mode 100644 index 05a40109..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/README.md deleted file mode 100644 index ff1eb531..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The "which" util from npm's guts. - -Finds the first instance of a specified executable in the PATH -environment variable. Does not cache the results, so `hash -r` is not -needed when the PATH changes. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/bin/which b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/bin/which deleted file mode 100755 index 8432ce2f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/bin/which +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env node -var which = require("../") -if (process.argv.length < 3) { - console.error("Usage: which <thing>") - process.exit(1) -} - -which(process.argv[2], function (er, thing) { - if (er) { - console.error(er.message) - process.exit(er.errno || 127) - } - console.log(thing) -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/package.json deleted file mode 100644 index f1938b07..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "name": "which", - "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", - "version": "1.0.5", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-which.git" - }, - "main": "which.js", - "bin": { - "which": "./bin/which" - }, - "engines": { - "node": "*" - }, - "dependencies": {}, - "devDependencies": {}, - "readme": "The \"which\" util from npm's guts.\n\nFinds the first instance of a specified executable in the PATH\nenvironment variable. Does not cache the results, so `hash -r` is not\nneeded when the PATH changes.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/node-which/issues" - }, - "homepage": "https://github.com/isaacs/node-which", - "_id": "which@1.0.5", - "dist": { - "shasum": "195619a6ad7e8fefd0aa76445a6d4c8d370a322c" - }, - "_from": "which@~1.0.5", - "_resolved": "https://registry.npmjs.org/which/-/which-1.0.5.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/which.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/which.js deleted file mode 100644 index db7e8f74..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/which/which.js +++ /dev/null @@ -1,104 +0,0 @@ -module.exports = which -which.sync = whichSync - -var path = require("path") - , fs - , COLON = process.platform === "win32" ? ";" : ":" - , isExe - -try { - fs = require("graceful-fs") -} catch (ex) { - fs = require("fs") -} - -if (process.platform == "win32") { - // On windows, there is no good way to check that a file is executable - isExe = function isExe () { return true } -} else { - isExe = function isExe (mod, uid, gid) { - //console.error(mod, uid, gid); - //console.error("isExe?", (mod & 0111).toString(8)) - var ret = (mod & 0001) - || (mod & 0010) && process.getgid && gid === process.getgid() - || (mod & 0100) && process.getuid && uid === process.getuid() - //console.error("isExe?", ret) - return ret - } -} - - - -function which (cmd, cb) { - if (isAbsolute(cmd)) return cb(null, cmd) - var pathEnv = (process.env.PATH || "").split(COLON) - , pathExt = [""] - if (process.platform === "win32") { - pathEnv.push(process.cwd()) - pathExt = (process.env.PATHEXT || ".EXE").split(COLON) - if (cmd.indexOf(".") !== -1) pathExt.unshift("") - } - //console.error("pathEnv", pathEnv) - ;(function F (i, l) { - if (i === l) return cb(new Error("not found: "+cmd)) - var p = path.resolve(pathEnv[i], cmd) - ;(function E (ii, ll) { - if (ii === ll) return F(i + 1, l) - var ext = pathExt[ii] - //console.error(p + ext) - fs.stat(p + ext, function (er, stat) { - if (!er && - stat && - stat.isFile() && - isExe(stat.mode, stat.uid, stat.gid)) { - //console.error("yes, exe!", p + ext) - return cb(null, p + ext) - } - return E(ii + 1, ll) - }) - })(0, pathExt.length) - })(0, pathEnv.length) -} - -function whichSync (cmd) { - if (isAbsolute(cmd)) return cmd - var pathEnv = (process.env.PATH || "").split(COLON) - , pathExt = [""] - if (process.platform === "win32") { - pathEnv.push(process.cwd()) - pathExt = (process.env.PATHEXT || ".EXE").split(COLON) - if (cmd.indexOf(".") !== -1) pathExt.unshift("") - } - for (var i = 0, l = pathEnv.length; i < l; i ++) { - var p = path.join(pathEnv[i], cmd) - for (var j = 0, ll = pathExt.length; j < ll; j ++) { - var cur = p + pathExt[j] - var stat - try { stat = fs.statSync(cur) } catch (ex) {} - if (stat && - stat.isFile() && - isExe(stat.mode, stat.uid, stat.gid)) return cur - } - } - throw new Error("not found: "+cmd) -} - -var isAbsolute = process.platform === "win32" ? absWin : absUnix - -function absWin (p) { - if (absUnix(p)) return true - // pull off the device/UNC bit from a windows path. - // from node's lib/path.js - var splitDeviceRe = - /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?([\\\/])?/ - , result = splitDeviceRe.exec(p) - , device = result[1] || '' - , isUnc = device && device.charAt(1) !== ':' - , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute - - return isAbsolute -} - -function absUnix (p) { - return p.charAt(0) === "/" || p === "" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/package.json deleted file mode 100644 index 66d4488e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/bin-wrapper/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "bin-wrapper", - "version": "0.1.9", - "description": "Binary wrapper for Node.js that makes your programs seamlessly available as local dependencies", - "keywords": [ - "bin", - "build", - "make", - "wrapper" - ], - "homepage": "https://github.com/kevva/bin-wrapper", - "bugs": { - "url": "https://github.com/kevva/bin-wrapper/issues" - }, - "author": { - "name": "Kevin Martensson", - "email": "kevinmartensson@gmail.com", - "url": "http://kevinmartensson.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/kevva/bin-wrapper.git" - }, - "scripts": { - "test": "mocha --reporter list --timeout 0" - }, - "main": "bin-wrapper.js", - "files": [ - "bin-wrapper.js" - ], - "dependencies": { - "download": "~0.1.2", - "isbin": "0.0.2", - "mout": "~0.6.0", - "progress": "~1.1.0", - "rimraf": "~2.2.6", - "which": "~1.0.5" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "readme": "# bin-wrapper [![Build Status](https://secure.travis-ci.org/kevva/bin-wrapper.png?branch=master)](http://travis-ci.org/kevva/bin-wrapper)\n\nBinary wrapper for Node.js that makes your programs seamlessly available as local dependencies\n\n## Getting started\n\nInstall with [npm](https://npmjs.org/package/bin-wrapper): `npm install bin-wrapper`\n\n## Examples\n\nAll `platform` and `arch` specific options takes precedence over the base \noptions. See [test.js](test.js) for a full fleshed example.\n\n```js\nvar Bin = require('bin-wrapper');\n\nvar opts = {\n name: 'Gifsicle',\n bin: 'gifsicle',\n path: 'vendor',\n url: 'http://url/to/gifsicle',\n src: 'http://www.lcdf.org/gifsicle/gifsicle-1.71.tar.gz',\n buildScript: './configure --bindir=\"vendor\" && make install',\n platform: {\n win32: {\n bin: 'gifsicle.exe',\n url: [\n 'http://url/to/gifsicle.exe'\n 'http://url/to/gifsicle.dll'\n ]\n }\n }\n}\nvar bin = new Bin(opts);\n\nbin.check('--version', function (works) {\n if (!works) {\n console.log('Pre-build test failed, compiling from source');\n return bin.build();\n }\n\n console.log('Binary passed the test');\n});\n```\n\nGet the path to your binary with `bin.path`.\n\n```js\nconsole.log(bin.path);\n// => path/to/vendor/gifsicle\n```\n\n## API\n\n### .check(cmd, cb)\n\nCheck if a binary is present and working. If it isn't, download and test it by \nrunning the binary with `cmd` and see if it exits correctly.\n\n### .build(cb)\n\nDownload the source archive defined in the `src` property and build it using the \nbuild script defined in the `buildScript` property.\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com)\n", - "readmeFilename": "README.md", - "_id": "bin-wrapper@0.1.9", - "dist": { - "shasum": "237ee496fb6049caedaba51ad9e62fc199a86060" - }, - "_from": "bin-wrapper@~0.1.3", - "_resolved": "https://registry.npmjs.org/bin-wrapper/-/bin-wrapper-0.1.9.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/chalk.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/chalk.js deleted file mode 100644 index 17c6dbab..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/chalk.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict'; -var ansi = require('ansi-styles'); -var defineProps = Object.defineProperties; - -ansi.grey = ansi.gray; - -var styles = (function () { - var ret = {}; - - Object.keys(ansi).forEach(function (key) { - ret[key] = { - get: function () { - this._styles.push(key); - return this; - } - }; - }); - - return ret; -})(); - -var chalk = module.exports = defineProps({}, init()); - -function init() { - var ret = {}; - - Object.keys(styles).forEach(function (name) { - ret[name] = { - get: function () { - var obj = defineProps(function self(str) { - if (!chalk.enabled) { - return str; - } - - return self._styles.reduce(function (str, name) { - var code = ansi[name]; - return code[0] + (str || '') + code[1]; - }, str); - }, styles); - - obj._styles = []; - - return obj[name]; - } - } - }); - - return ret; -} - -chalk.styles = ansi; - -chalk.stripColor = function (str) { - return str.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, ''); -}; - -chalk.supportsColor = require('has-color'); - -// detect mode if not set manually -if (chalk.enabled === undefined) { - chalk.enabled = chalk.supportsColor; -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js deleted file mode 100644 index 56a5d19b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; -module.exports = { - reset: ['\x1b[0m', '\x1b[0m'], - - bold: ['\x1b[1m', '\x1b[22m'], - italic: ['\x1b[3m', '\x1b[23m'], - underline: ['\x1b[4m', '\x1b[24m'], - inverse: ['\x1b[7m', '\x1b[27m'], - strikethrough: ['\x1b[9m', '\x1b[29m'], - - black: ['\x1b[30m', '\x1b[39m'], - red: ['\x1b[31m', '\x1b[39m'], - green: ['\x1b[32m', '\x1b[39m'], - yellow: ['\x1b[33m', '\x1b[39m'], - blue: ['\x1b[34m', '\x1b[39m'], - magenta: ['\x1b[35m', '\x1b[39m'], - cyan: ['\x1b[36m', '\x1b[39m'], - white: ['\x1b[37m', '\x1b[39m'], - gray: ['\x1B[90m', '\x1b[39m'], - - bgBlack: ['\x1b[40m', '\x1b[49m'], - bgRed: ['\x1b[41m', '\x1b[49m'], - bgGreen: ['\x1b[42m', '\x1b[49m'], - bgYellow: ['\x1b[43m', '\x1b[49m'], - bgBlue: ['\x1b[44m', '\x1b[49m'], - bgMagenta: ['\x1b[45m', '\x1b[49m'], - bgCyan: ['\x1b[46m', '\x1b[49m'], - bgWhite: ['\x1b[47m', '\x1b[49m'] -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/ansi-styles/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/ansi-styles/package.json deleted file mode 100644 index 8acdb5e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "ansi-styles", - "version": "0.2.0", - "description": "ANSI escape codes for colorizing strings in the terminal", - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "homepage": "https://github.com/sindresorhus/ansi-styles", - "bugs": { - "url": "https://github.com/sindresorhus/ansi-styles/issues" - }, - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "ansi-styles.js" - ], - "main": "ansi-styles", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/ansi-styles.git" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "readme": "# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles)\n\n> ANSI escape codes for colorizing strings in the terminal.\n\nYou probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings.\n\n![screenshot](screenshot.png)\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles`\n\n\n## Example\n\n```js\nvar ansi = require('ansi-styles');\n\nconsole.log(ansi.green[0] + 'Hello world!' + ansi.green[1]);\n```\n\n## API\n\nEach style is an array of a start and end escape code.\n\n\n## Styles\n\n### General\n\n- reset\n- bold\n- italic\n- underline\n- inverse\n- strikethrough\n\n### Text colors\n\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n\n### Background colors\n\n- bgBlack\n- bgRed\n- bgGreen\n- bgYellow\n- bgBlue\n- bgMagenta\n- bgCyan\n- bgWhite\n\n\n## License\n\nMIT License • © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "_id": "ansi-styles@0.2.0", - "dist": { - "shasum": "359ab4b15dcd64ba6d74734b72c36360a9af2c19" - }, - "_from": "ansi-styles@~0.2.0", - "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-0.2.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/ansi-styles/readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/ansi-styles/readme.md deleted file mode 100644 index 646837c6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,65 +0,0 @@ -# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles) - -> ANSI escape codes for colorizing strings in the terminal. - -You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings. - -![screenshot](screenshot.png) - - -## Install - -Install with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles` - - -## Example - -```js -var ansi = require('ansi-styles'); - -console.log(ansi.green[0] + 'Hello world!' + ansi.green[1]); -``` - -## API - -Each style is an array of a start and end escape code. - - -## Styles - -### General - -- reset -- bold -- italic -- underline -- inverse -- strikethrough - -### Text colors - -- black -- red -- green -- yellow -- blue -- magenta -- cyan -- white -- gray - -### Background colors - -- bgBlack -- bgRed -- bgGreen -- bgYellow -- bgBlue -- bgMagenta -- bgCyan -- bgWhite - - -## License - -MIT License • © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/has-color/has-color.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/has-color/has-color.js deleted file mode 100644 index 27316b1f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/has-color/has-color.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; -module.exports = (function () { - if (process.argv.indexOf('--no-color') !== -1) { - return false; - } - - if (process.argv.indexOf('--color') !== -1) { - return true; - } - - if (!process.stdout.isTTY) { - return false; - } - - if (process.platform === 'win32') { - return true; - } - - if ('COLORTERM' in process.env) { - return true; - } - - return /^screen|^xterm|color|ansi|cygwin|linux/i.test(process.env.TERM); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/has-color/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/has-color/package.json deleted file mode 100644 index d60b2d0a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/has-color/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "has-color", - "version": "0.1.4", - "description": "Detect whether a terminal supports color", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "capability", - "detect" - ], - "homepage": "https://github.com/sindresorhus/has-color", - "bugs": { - "url": "https://github.com/sindresorhus/has-color/issues" - }, - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "has-color.js" - ], - "main": "has-color", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/has-color.git" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "readme": "# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color)\n\n> Detect whether a terminal supports color.\n\nUsed in the terminal color module [chalk](https://github.com/sindresorhus/chalk).\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/has-color): `npm install --save has-color`\n\n\n## Example\n\n```js\nvar hasColor = require('has-color');\n\nif (hasColor) {\n\tconsole.log('Terminal supports color.');\n}\n```\n\nIt obeys the CLI flags `--color` and `--no-color`.\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "_id": "has-color@0.1.4", - "dist": { - "shasum": "d1dadeea5b9e8b446bf08603532333710c95a290" - }, - "_from": "has-color@~0.1.0", - "_resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.4.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/has-color/readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/has-color/readme.md deleted file mode 100644 index 0918c851..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/node_modules/has-color/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color) - -> Detect whether a terminal supports color. - -Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). - - -## Install - -Install with [npm](https://npmjs.org/package/has-color): `npm install --save has-color` - - -## Example - -```js -var hasColor = require('has-color'); - -if (hasColor) { - console.log('Terminal supports color.'); -} -``` - -It obeys the CLI flags `--color` and `--no-color`. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/package.json deleted file mode 100644 index 46a63f05..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "chalk", - "version": "0.2.1", - "description": "Terminal string styling done right", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "ansi", - "styles", - "tty", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "homepage": "https://github.com/sindresorhus/chalk", - "bugs": { - "url": "https://github.com/sindresorhus/chalk/issues" - }, - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "chalk.js" - ], - "main": "chalk", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/chalk.git" - }, - "scripts": { - "test": "mocha" - }, - "dependencies": { - "has-color": "~0.1.0", - "ansi-styles": "~0.2.0" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "readme": "# chalk [![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk)\n\n> Terminal string styling done right.\n\n[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of problems. Although there are other ones, they either do too much or not enough.\n\n**Chalk is a clean and focused alternative.**\n\n![screenshot](screenshot.png)\n\n\n## Why\n\n- **Doesn't extend String.prototype**\n- Expressive API\n- Clean and focused\n- Auto-detects color support\n- Actively maintained\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/chalk): `npm install --save chalk`\n\n\n## Example\n\nChalk comes with an easy to use composable API where you just chain the styles you want.\n\n```js\nvar chalk = require('chalk');\n\n// style a string\nconsole.log(chalk.blue('Hello world!'));\n\n// combine styled and normal strings\nconsole.log(chalk.blue('Hello') + 'World' + chalk.red('!'));\n\n// compose multiple styles using the chainable API\nconsole.log(chalk.blue.bgRed.bold('Hello world!'));\n\n// nest styles\nchalk.red('Hello' + chalk.underline.bgBlue('world') + '!');\n```\n\nYou can easily define your own themes.\n\n```js\nvar chalk = require('chalk');\nvar error = chalk.bold.red;\nconsole.log(error('Error!'));\n```\n\n\n## API\n\n### chalk.\\<style>\\[.\\<style>...](string)\n\nChain [styles](#styles) and call the last one as a method with a string argument.\n\n\n### chalk.enabled\n\nColor support is automatically detected, but you can override it.\n\n### chalk.supportsColor\n\nDetect whether the terminal [supports color](https://github.com/sindresorhus/has-color).\n\nCan be overridden by the user with the flags `--color` and `--no-color`.\n\nUsed internally and handled for you, but exposed for convenience.\n\n### chalk.styles\n\nExposes the styles as [ANSI escape codes](https://github.com/sindresorhus/ansi-styles).\n\n```js\nvar chalk = require('chalk');\n\nconsole.log(chalk.styles.red);\n//=> ['\\x1b[31m', '\\x1b[39m']\n\nconsole.log(chalk.styles.red[0] + 'Hello' + chalk.styles.red[1]);\n// first item is the style escape code and second is the reset escape code\n```\n\n### chalk.stripColor(string)\n\nStrip color from a string.\n\n\n## Styles\n\n### General\n\n- reset\n- bold\n- italic\n- underline\n- inverse\n- strikethrough\n\n### Text colors\n\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n\n### Background colors\n\n- bgBlack\n- bgRed\n- bgGreen\n- bgYellow\n- bgBlue\n- bgMagenta\n- bgCyan\n- bgWhite\n\n\n## License\n\nMIT License • © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "_id": "chalk@0.2.1", - "dist": { - "shasum": "7613e1575145b21386483f7f485aa5ffa8cbd10c" - }, - "_from": "chalk@~0.2.0", - "_resolved": "https://registry.npmjs.org/chalk/-/chalk-0.2.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/readme.md deleted file mode 100644 index d369d2ef..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/node_modules/chalk/readme.md +++ /dev/null @@ -1,130 +0,0 @@ -# chalk [![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk) - -> Terminal string styling done right. - -[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of problems. Although there are other ones, they either do too much or not enough. - -**Chalk is a clean and focused alternative.** - -![screenshot](screenshot.png) - - -## Why - -- **Doesn't extend String.prototype** -- Expressive API -- Clean and focused -- Auto-detects color support -- Actively maintained - - -## Install - -Install with [npm](https://npmjs.org/package/chalk): `npm install --save chalk` - - -## Example - -Chalk comes with an easy to use composable API where you just chain the styles you want. - -```js -var chalk = require('chalk'); - -// style a string -console.log(chalk.blue('Hello world!')); - -// combine styled and normal strings -console.log(chalk.blue('Hello') + 'World' + chalk.red('!')); - -// compose multiple styles using the chainable API -console.log(chalk.blue.bgRed.bold('Hello world!')); - -// nest styles -chalk.red('Hello' + chalk.underline.bgBlue('world') + '!'); -``` - -You can easily define your own themes. - -```js -var chalk = require('chalk'); -var error = chalk.bold.red; -console.log(error('Error!')); -``` - - -## API - -### chalk.\<style>\[.\<style>...](string) - -Chain [styles](#styles) and call the last one as a method with a string argument. - - -### chalk.enabled - -Color support is automatically detected, but you can override it. - -### chalk.supportsColor - -Detect whether the terminal [supports color](https://github.com/sindresorhus/has-color). - -Can be overridden by the user with the flags `--color` and `--no-color`. - -Used internally and handled for you, but exposed for convenience. - -### chalk.styles - -Exposes the styles as [ANSI escape codes](https://github.com/sindresorhus/ansi-styles). - -```js -var chalk = require('chalk'); - -console.log(chalk.styles.red); -//=> ['\x1b[31m', '\x1b[39m'] - -console.log(chalk.styles.red[0] + 'Hello' + chalk.styles.red[1]); -// first item is the style escape code and second is the reset escape code -``` - -### chalk.stripColor(string) - -Strip color from a string. - - -## Styles - -### General - -- reset -- bold -- italic -- underline -- inverse -- strikethrough - -### Text colors - -- black -- red -- green -- yellow -- blue -- magenta -- cyan -- white -- gray - -### Background colors - -- bgBlack -- bgRed -- bgGreen -- bgYellow -- bgBlue -- bgMagenta -- bgCyan -- bgWhite - - -## License - -MIT License • © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/package.json deleted file mode 100644 index c5ceffa7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "gifsicle", - "version": "0.1.4", - "description": "gifsicle wrapper that makes it seamlessly available as a local dependency on OS X, Linux and Windows", - "keywords": [ - "gif", - "img", - "image", - "compress", - "minify", - "optimize" - ], - "homepage": "https://github.com/yeoman/node-gifsicle", - "bugs": { - "url": "https://github.com/yeoman/node-gifsicle/issues" - }, - "author": { - "name": "Kevin Martensson", - "email": "kevinmartensson@gmail.com", - "url": "http://kevinmartensson.com" - }, - "license": "BSD", - "repository": { - "type": "git", - "url": "git://github.com/yeoman/node-gifsicle.git" - }, - "main": "lib/gifsicle", - "bin": { - "gifsicle": "bin/gifsicle.js" - }, - "scripts": { - "test": "mocha", - "postinstall": "node lib/check.js" - }, - "dependencies": { - "bin-wrapper": "~0.1.3", - "chalk": "~0.2.0" - }, - "devDependencies": { - "mocha": "~1.13.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "files": [ - "bin", - "lib" - ], - "readme": "# node-gifsicle [![Build Status](https://secure.travis-ci.org/yeoman/node-gifsicle.png?branch=master)](http://travis-ci.org/yeoman/node-gifsicle)\n\n[gifsicle](http://www.lcdf.org/gifsicle/) 1.71 Node.js wrapper that makes it seamlessly available as a local dependency on OS X, Linux and Windows.\n\n> gifsicle manipulates GIF image files in many different ways. Depending on command line options, it can merge several GIFs into a GIF animation; explode an animation into its component frames; change individual frames in an animation; turn interlacing on and off; add transparency and much more.\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/gifsicle): `npm install --save gifsicle`\n\n\n## Example usage\n\n```js\nvar execFile = require('child_process').execFile;\nvar gifsiclePath = require('gifsicle').path;\n\nexecFile(gifsiclePath, ['-o', 'output.gif', 'input.gif'], function() {\n\tconsole.log('Image minified');\n});\n```\n\nCan also be run directly from `./node_modules/.bin/gifsicle`.\n\n\n## Dev\n\nNote to self on how to update the binaries.\n\n### OS X\n\nRun `npm install` on a OS X 10.7 machine to build the binary.\n\n### Linux\n\nRun `npm install` to build the binary.\n\n### Windows\n\n- Download the [Windows files 32/64-bit](http://www.lcdf.org/gifsicle/) on a Windows machine.\n- Run the downloaded file to extract.\n- Go to the `bin` folder at the destination and copy `gifsicle.exe`.\n\n\n## License\n\nEverything excluding the binaries licensed under the [BSD license](http://opensource.org/licenses/bsd-license.php) and copyright Google.\n\ngifsicle licensed under the GNU General Public License, Version 2.\n", - "readmeFilename": "readme.md", - "_id": "gifsicle@0.1.4", - "dist": { - "shasum": "c592c8625fc0ae05f88ceaa8e67ce20351236d3c" - }, - "_from": "gifsicle@~0.1.0", - "_resolved": "https://registry.npmjs.org/gifsicle/-/gifsicle-0.1.4.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/readme.md deleted file mode 100644 index 4d0c7602..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/readme.md +++ /dev/null @@ -1,50 +0,0 @@ -# node-gifsicle [![Build Status](https://secure.travis-ci.org/yeoman/node-gifsicle.png?branch=master)](http://travis-ci.org/yeoman/node-gifsicle) - -[gifsicle](http://www.lcdf.org/gifsicle/) 1.71 Node.js wrapper that makes it seamlessly available as a local dependency on OS X, Linux and Windows. - -> gifsicle manipulates GIF image files in many different ways. Depending on command line options, it can merge several GIFs into a GIF animation; explode an animation into its component frames; change individual frames in an animation; turn interlacing on and off; add transparency and much more. - - -## Install - -Install with [npm](https://npmjs.org/package/gifsicle): `npm install --save gifsicle` - - -## Example usage - -```js -var execFile = require('child_process').execFile; -var gifsiclePath = require('gifsicle').path; - -execFile(gifsiclePath, ['-o', 'output.gif', 'input.gif'], function() { - console.log('Image minified'); -}); -``` - -Can also be run directly from `./node_modules/.bin/gifsicle`. - - -## Dev - -Note to self on how to update the binaries. - -### OS X - -Run `npm install` on a OS X 10.7 machine to build the binary. - -### Linux - -Run `npm install` to build the binary. - -### Windows - -- Download the [Windows files 32/64-bit](http://www.lcdf.org/gifsicle/) on a Windows machine. -- Run the downloaded file to extract. -- Go to the `bin` folder at the destination and copy `gifsicle.exe`. - - -## License - -Everything excluding the binaries licensed under the [BSD license](http://opensource.org/licenses/bsd-license.php) and copyright Google. - -gifsicle licensed under the GNU General Public License, Version 2. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/vendor/gifsicle b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/vendor/gifsicle deleted file mode 100755 index 675d7751..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/gifsicle/vendor/gifsicle and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/bin/jpegtran.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/bin/jpegtran.js deleted file mode 100755 index 3f8cb0ee..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/bin/jpegtran.js +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var binPath = require('../lib/jpegtran').path; -var spawn = require('child_process').spawn; - -spawn(binPath, process.argv.slice(2), { stdio: 'inherit' }) - .on('exit', process.exit); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/lib/check.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/lib/check.js deleted file mode 100644 index e257bb64..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/lib/check.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -var bin = require('./jpegtran').bin; -var chalk = require('chalk'); -var path = require('path'); - -var args = [ - '-copy', 'none', - '-optimize', - '-outfile', path.join(__dirname, '../test/minified.jpg'), - path.join(__dirname, '../test/fixtures/test.jpg') -]; - -bin.check(args, function (w) { - if (!w) { - console.log(chalk.red('✗ pre-build test failed, compiling from source...')); - - if (process.platform === 'win32') { - return console.log(chalk.red('✗ building is not supported on ' + process.platform)); - } - - return bin.build(function (err) { - if (err) { - return console.log(chalk.red('✗ ' + err.message)); - } - - console.log(chalk.green('✓ jpegtran rebuilt successfully')); - }); - } - - console.log(chalk.green('✓ pre-build test passed successfully')); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/lib/jpegtran.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/lib/jpegtran.js deleted file mode 100644 index 30270277..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/lib/jpegtran.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -var Bin = require('bin-wrapper'); -var path = require('path'); - -var options = { - name: 'jpegtran', - bin: 'jpegtran', - path: path.join(__dirname, '../vendor'), - src: 'http://downloads.sourceforge.net/project/libjpeg-turbo/1.3.0/libjpeg-turbo-1.3.0.tar.gz', - buildScript: './configure --disable-shared --prefix="' + path.join(__dirname, '../vendor') + '" && ' + 'make install', - platform: { - darwin: { - url: 'https://raw.github.com/yeoman/node-jpegtran-bin/master/vendor/osx/jpegtran' - }, - freebsd: { - url: 'https://raw.github.com/yeoman/node-jpegtran-bin/master/vendor/freebsd/jpegtran', - }, - linux: { - url: 'https://raw.github.com/yeoman/node-jpegtran-bin/master/vendor/linux/x86/jpegtran', - arch: { - x64: { - url: 'https://raw.github.com/yeoman/node-jpegtran-bin/master/vendor/linux/x64/jpegtran' - } - } - }, - sunos: { - url: 'https://raw.github.com/yeoman/node-jpegtran-bin/master/vendor/sunos/x86/jpegtran', - arch: { - x64: { - url: 'https://raw.github.com/yeoman/node-jpegtran-bin/master/vendor/sunos/x64/jpegtran' - } - } - }, - win32: { - bin: 'jpegtran.exe', - url: [ - 'https://raw.github.com/yeoman/node-jpegtran-bin/master/vendor/win/x86/jpegtran.exe', - 'https://raw.github.com/yeoman/node-jpegtran-bin/master/vendor/win/x86/libjpeg-62.dll' - ], - arch: { - x64: { - url: [ - 'https://raw.github.com/yeoman/node-jpegtran-bin/master/vendor/win/x64/jpegtran.exe', - 'https://raw.github.com/yeoman/node-jpegtran-bin/master/vendor/win/x64/libjpeg-62.dll' - ] - } - } - } - } -}; -var bin = new Bin(options); - -exports.bin = bin; -exports.options = options; -exports.path = bin.path; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/README.md deleted file mode 100644 index 05419cd4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/README.md +++ /dev/null @@ -1,67 +0,0 @@ -# bin-wrapper [![Build Status](https://secure.travis-ci.org/kevva/bin-wrapper.png?branch=master)](http://travis-ci.org/kevva/bin-wrapper) - -Binary wrapper for Node.js that makes your programs seamlessly available as local dependencies - -## Getting started - -Install with [npm](https://npmjs.org/package/bin-wrapper): `npm install bin-wrapper` - -## Examples - -All `platform` and `arch` specific options takes precedence over the base -options. See [test.js](test.js) for a full fleshed example. - -```js -var Bin = require('bin-wrapper'); - -var opts = { - name: 'Gifsicle', - bin: 'gifsicle', - path: 'vendor', - url: 'http://url/to/gifsicle', - src: 'http://www.lcdf.org/gifsicle/gifsicle-1.71.tar.gz', - buildScript: './configure --bindir="vendor" && make install', - platform: { - win32: { - bin: 'gifsicle.exe', - url: [ - 'http://url/to/gifsicle.exe' - 'http://url/to/gifsicle.dll' - ] - } - } -} -var bin = new Bin(opts); - -bin.check('--version', function (works) { - if (!works) { - console.log('Pre-build test failed, compiling from source'); - return bin.build(); - } - - console.log('Binary passed the test'); -}); -``` - -Get the path to your binary with `bin.path`. - -```js -console.log(bin.path); -// => path/to/vendor/gifsicle -``` - -## API - -### .check(cmd, cb) - -Check if a binary is present and working. If it isn't, download and test it by -running the binary with `cmd` and see if it exits correctly. - -### .build(cb) - -Download the source archive defined in the `src` property and build it using the -build script defined in the `buildScript` property. - -## License - -[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/bin-wrapper.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/bin-wrapper.js deleted file mode 100644 index ccfe9342..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/bin-wrapper.js +++ /dev/null @@ -1,222 +0,0 @@ -'use strict'; - -var download = require('download'); -var exec = require('child_process').exec; -var fs = require('fs'); -var hasOwn = require('mout/object/hasOwn'); -var isbin = require('isbin'); -var isFunction = require('mout/lang/isFunction'); -var mixIn = require('mout/object/mixIn'); -var os = require('os'); -var path = require('path'); -var ProgressBar = require('progress'); -var rm = require('rimraf'); -var spawn = require('child_process').spawn; -var which = require('which'); - -/** - * Initialize BinWrapper with options - * - * @param {Object} opts - * @api public - */ - -function BinWrapper(opts) { - opts = opts || {}; - this.opts = this._parse(opts); - this.name = this.opts.name; - this.bin = this.opts.bin; - this.dest = this.opts.path; - this.path = this._path() || path.join(this.dest, this.bin); - this.url = this.opts.url; - this.src = this.opts.src; - this.buildScript = this.opts.buildScript; - this.proxy = process.env.http_proxy || - process.env.HTTP_PROXY || - process.env.https_proxy || - process.env.HTTPS_PROXY || - null; -} - -/** - * Check if a binary is present and working - * - * @param {String|Array} cmd - * @param {Function} cb - * @api public - */ - -BinWrapper.prototype.check = function (cmd, cb) { - var self = this; - - if (!cb && isFunction(cmd)) { - cb = cmd; - cmd = ['--help']; - } - - cmd = cmd; - cmd = Array.isArray(cmd) ? cmd : [cmd]; - - if (this._path()) { - return self._test(cmd, cb); - } - - this._download(this.url, this.dest, { mode: '0755', proxy: this.proxy }) - .on('close', function () { - return self._test(cmd, cb); - }); -}; - -/** - * Download source and build a binary - * - * @param {Function} cb - * @api public - */ - -BinWrapper.prototype.build = function (cb) { - var self = this; - var tmpDir = os.tmpdir ? os.tmpdir() : os.tmpDir(); - var tmp = path.join(tmpDir, this.name); - var get = this._download(this.src, tmp, { mode: '0777', extract: true, strip: '1', proxy: this.proxy }); - - if (!cb || !isFunction(cb)) { - cb = function () {}; - } - - get.on('close', function () { - exec(self.buildScript, { cwd: tmp }, function (err) { - if (err) { - return cb(err); - } - - rm.sync(tmp); - - return cb(); - }); - }); -}; - -/** - * Download a string or an array of files - * - * @param {String|Array} src - * @param {String} dest - * @param {Object} opts - * @api private - */ - -BinWrapper.prototype._download = function (src, dest, opts) { - var get = download(src, dest, opts); - - get.on('response', function (res) { - var len = parseInt(res.headers['content-length'], 10); - var bar = new ProgressBar(' ' + path.basename(src) + ': downloading [:bar] :percent :etas', { - complete: '=', - incomplete: ' ', - width: 20, - total: len - }); - - res.on('data', function (data) { - bar.tick(data.length); - }); - - res.on('end', function () { - console.log('\n'); - }); - }); - - return get; -}; - -/** - * If a binary exists, get its path - * - * @api private - */ - -BinWrapper.prototype._path = function () { - var self = this; - - if (fs.existsSync(path.join(this.dest, this.bin))) { - return path.join(self.dest, self.bin); - } - - if (isbin(this.bin)) { - if (which.sync(self.bin).indexOf('node_modules/.bin') === -1) { - return which.sync(self.bin); - } - } - - return false; -}; - -/** - * Test if a binary is working by checking its exit code - * - * @param {Array} cmd - * @param {Function} cb - * @api private - */ - -BinWrapper.prototype._test = function (cmd, cb) { - var working; - var bin = spawn(this.path, cmd); - - bin.on('error', function () { - working = false; - return cb(working); - }); - - bin.on('exit', function (code) { - working = code === 0; - return cb(working); - }); -}; - -/** - * Parse options - * - * @param {Object} opts - * @api private - */ - -BinWrapper.prototype._parse = function (opts) { - opts.platform = opts.platform || {}; - opts.arch = opts.arch || {}; - - var platform = process.platform; - var arch = process.arch === 'x64' ? 'x64' : process.arch === 'arm' ? 'arm' : 'x86'; - var required = [ - 'bin', - 'name', - 'path', - 'url' - ]; - - if (hasOwn(opts.platform, [platform])) { - opts = mixIn(opts, opts.platform[platform]); - } - - if (hasOwn(opts.arch, [arch])) { - opts = mixIn(opts, opts.arch[arch]); - } - - required.forEach(function (val) { - if (!hasOwn(opts, val)) { - throw new Error(val + ' option is required'); - } - }); - - delete opts.platform; - delete opts.arch; - - return opts; -}; - -/** - * Module exports - */ - -module.exports = BinWrapper; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/.bin/rimraf b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/.bin/rimraf deleted file mode 120000 index 4cd49a49..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/.bin/rimraf +++ /dev/null @@ -1 +0,0 @@ -../rimraf/bin.js \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/.bin/which b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/.bin/which deleted file mode 120000 index f62471c8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/.bin/which +++ /dev/null @@ -1 +0,0 @@ -../which/bin/which \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/README.md deleted file mode 100644 index f57b2f41..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/README.md +++ /dev/null @@ -1,84 +0,0 @@ -# download [![Build Status](https://secure.travis-ci.org/kevva/download.png?branch=master)](http://travis-ci.org/kevva/download) - -Download and extract files effortlessly in Node.js. - -## Getting started - -Install with [npm](https://npmjs.org/package/download): `npm install download` - -## Examples - -If you're fetching an archive you can set `extract: true` in options and -it'll extract it for you. - -```js -var download = require('download'); - -// download and extract `foo.tar.gz` into `bar/` -download('foo.tar.gz', 'bar', { extract: true }); - -// download and save `foo.exe` into `bar/foo.exe` with mode `0755` -download('foo.exe', 'bar', { mode: '0755' }); - -// download and save `foo.zip` into `bar/foobar.zip` -download({ url: 'foo.zip', name: 'foobar.zip' }, 'bar'); - -// download and save an array of files in `bar/` -var files = ['foo.jpg', 'bar.jpg', 'cat.jpg']; -download(files, 'bar'); - -// download, save and rename an array of files in `bar/` -var files = [{ - url: 'foo.jpg', - name: 'foobar.jpg' -}, { - url: 'cat.jpg', - name: 'dog.jpg' -}]; -download(files, 'bar'); -``` - -## API - -### download(url, dest, opts) - -Download a file or an array of files to a given destination. Returns an EventEmitter -that emits the following possible events: - -* `response` — Relayed when the underlying `http.ClientRequest` emits the same -event. Listeners called with a `http.IncomingMessage` instance. -* `data` — Relayed when the underlying `http.IncomingMessage` emits the same -event. Listeners called with a `Buffer` instance. -* `error` — Relayed when the underlying `http.ClientRequest` emits the same event -or when the response status code is not in the 200s. Listeners called with an -`Error` instance (in the first case) or the response status code. -* `close` — Relayed when the underlying `stream.Duplex` emits the same event. - -## Options - -You can define options accepted by the [request](https://github.com/mikeal/request/) module besides from the options below. - -### extract - -Type: `Boolean` -Default: `false` - -If set to `true`, try extracting the file using [decompress](https://github.com/kevva/decompress/). - -### mode - -Type: `String` -Default: `undefined` - -Set mode on the downloaded files. - -### strip - -Type: `Number` -Default: `0` - -Equivalent to `--strip-components` for tar. - -## License - -[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/download.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/download.js deleted file mode 100644 index 4b9c05e2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/download.js +++ /dev/null @@ -1,100 +0,0 @@ -'use strict'; - -var decompress = require('decompress'); -var eachAsync = require('each-async'); -var fs = require('fs'); -var mkdir = require('mkdirp'); -var path = require('path'); -var request = require('request'); -var through = require('through2'); - -/** - * Download a file to a given destination - * - * Options: - * - * - `extract` Try extracting the file - * - `mode` Set mode on the downloaded files - * - `strip` Equivalent to --strip-components for tar - * - * @param {String|Array|Object} url - * @param {String} dest - * @param {Object} opts - * @api public - */ - -module.exports = function (url, dest, opts) { - url = Array.isArray(url) ? url : [url]; - opts = opts || {}; - - var stream = through(); - var strip = opts.strip || '0'; - - eachAsync(url, function (url, index, done) { - opts.url = url; - var target = path.join(dest, path.basename(url)); - - if (url.url && url.name) { - target = path.join(dest, url.name); - opts.url = url.url; - } - - var req = request.get(opts) - .on('response', function (res) { - stream.emit('response', res); - }) - .on('data', function (data) { - stream.emit('data', data); - }) - .on('error', function (err) { - stream.emit('error', err); - }); - - req.on('response', function (res) { - var mime = res.headers['content-type']; - var status = res.statusCode; - var end; - - if (status < 200 || status >= 300) { - stream.emit('error', status); - return; - } - - if (opts.extract && decompress.canExtract(url, mime)) { - var ext; - - if (decompress.canExtract(url)) { - ext = url; - } else { - ext = mime; - } - - end = decompress.extract({ - ext: ext, - path: dest, - strip: strip - }); - } else { - if (!fs.existsSync(dest)) { - mkdir.sync(dest); - } - - end = fs.createWriteStream(target); - } - - req.pipe(end); - - end.on('close', function () { - if (!opts.extract && opts.mode) { - fs.chmodSync(target, opts.mode); - } - - done(); - }); - }); - }, function () { - stream.emit('close'); - }); - - return stream; -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/README.md deleted file mode 100644 index 4226d3f5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# decompress [![Build Status](https://secure.travis-ci.org/kevva/decompress.png?branch=master)](http://travis-ci.org/kevva/decompress) - -Easily extract `.zip`, `.tar` and `.tar.gz` archives. Based on the extract -utility in [Bower](https://github.com/bower/bower). - -## Getting started - -Install with [npm](https://npmjs.org/package/decompress): `npm install decompress` - -## Examples - -You'll only need to pass a type into `ext` and it'll figure the rest out for -you. - -```js -var decompress = require('decompress'); -var fs = require('fs'); - -var src = fs.createReadStream('foo.tar.gz'); -var dest = decompress.extract({ ext: '.tar.gz' }); - -src.pipe(dest); -``` - -## API - -### .extract(opts) - -Extract an archive using the `ext` option to determine which extractor to use. -If no `path` is specified it'll extract it to your current location. - -### .canExtract(src, mime) - -Determine if a file can be extracted or not by checking the file extension -and/or the MIME type. - -```js -decompress.canExtract('foo.zip'); -// => true - -decompress.canExtract('application/zip'); -// => true -``` - -## Options - -### `ext` - -Type: `String` -Default: `''` - -String that can be a file name, URL, MIME type etc. - -### `path` - -Type: `String` -Default: `process.cwd()` - -Path to extract the archive to. If no `path` is defined it'll extract it to your -current location. - -### strip - -Type: `Number` -Default: `0` - -Equivalent to `--strip-components` for tar. - -## License - -[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/decompress.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/decompress.js deleted file mode 100644 index e110d93c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/decompress.js +++ /dev/null @@ -1,168 +0,0 @@ -'use strict'; - -var AdmZip = require('adm-zip'); -var endsWith = require('mout/string/endsWith'); -var find = require('mout/array/find'); -var fs = require('fs'); -var mkdir = require('mkdirp'); -var path = require('path'); -var pipeline = require('stream-combiner'); -var rm = require('rimraf'); -var tar = require('tar'); -var tempfile = require('tempfile'); -var zlib = require('zlib'); - -/** - * Initialize Decompress with options - * - * Options: - * - * - `ext` String with file name, MIME type, etc - * - `path` Path to extract to - * - * @param {Object} opts - * @api private - */ - -function Decompress(opts) { - opts = opts || {}; - opts.strip = opts.strip || 0; - this.opts = opts; - this.path = opts.path || process.cwd(); - this.ext = opts.ext || ''; - this.strip = opts.strip >= 0 ? opts.strip : 0; - this.extractors = { - '.zip': this._extractZip, - '.tar': this._extractTar, - '.tar.gz': this._extractTarGz, - '.tgz': this._extractTarGz, - 'application/zip': this._extractZip, - 'application/x-tar': this._extractTar, - 'application/x-tgz': this._extractTarGz - }; - this.extractorTypes = Object.keys(this.extractors); - this.extractor = this._getExtractor(this.ext); -} - -/** - * Extract an archive - * - * @api public - */ - -Decompress.prototype.extract = function () { - var self = this; - var stream = this.extractor(); - - if (!fs.existsSync(this.path)) { - mkdir.sync(self.path); - } - - return stream; -}; - -/** - * Check if a file can be extracted - * - * @param {String} src - * @param {String} mime - * @api public - */ - -Decompress.prototype.canExtract = function (src, mime) { - if (this._getExtractor(src)) { - return true; - } - - if (mime && this._getExtractor(mime)) { - return true; - } - - return false; -}; - -/** - * Get the extractor for a desired file - * - * @param {String} src - * @api private - */ - -Decompress.prototype._getExtractor = function (src) { - src = src.toLowerCase(); - - var ext = find(this.extractorTypes, function (ext) { - return endsWith(src, ext); - }); - - return ext ? this.extractors[ext] : null; -}; - -/** - * Extract a zip file - * - * @api private - */ - -Decompress.prototype._extractZip = function () { - var self = this; - var tmp = tempfile('.zip'); - - var stream = fs.createWriteStream(tmp).on('close', function () { - var zip = new AdmZip(tmp); - var zipEntries = zip.getEntries(); - - zipEntries.forEach(function (entry) { - if (!entry.isDirectory) { - var entryFile = path.basename(entry.entryName.toString()); - var entryDir = path.dirname(entry.entryName.toString().split('/').slice(self.strip).join('/')); - var dest = path.join(self.path, entryDir, entryFile); - - mkdir.sync(path.dirname(dest)); - fs.writeFileSync(dest, entry.getData()); - } - }); - }); - - return stream.on('close', function () { - rm.sync(tmp); - }); -}; - -/** - * Extract a tar file - * - * @api private - */ - -Decompress.prototype._extractTar = function () { - var stream = tar.Extract(this.opts); - return stream; -}; - -/** - * Extract a tar.gz file - * - * @api private - */ - -Decompress.prototype._extractTarGz = function () { - var stream = zlib.Unzip(); - var dest = tar.Extract(this.opts); - - return pipeline(stream, dest); -}; - -/** - * Module exports - */ - -module.exports.extract = function (opts) { - var decompress = new Decompress(opts); - return decompress.extract(); -}; - -module.exports.canExtract = function (src, mime) { - var decompress = new Decompress(); - return decompress.canExtract(src, mime); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/.idea/scopes/scope_settings.xml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/.idea/scopes/scope_settings.xml deleted file mode 100644 index 0d5175ca..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/.idea/scopes/scope_settings.xml +++ /dev/null @@ -1,5 +0,0 @@ -<component name="DependencyValidationManager"> - <state> - <option name="SKIP_IMPORT_STATEMENTS" value="false" /> - </state> -</component> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/MIT-LICENSE.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/MIT-LICENSE.txt deleted file mode 100644 index 14c3ee5c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/MIT-LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2012 Another-D-Mention Software and other contributors, -http://www.another-d-mention.ro/ - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/README.md deleted file mode 100644 index 030fab8a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/README.md +++ /dev/null @@ -1,64 +0,0 @@ -# ADM-ZIP for NodeJS - -ADM-ZIP is a pure JavaScript implementation for zip data compression for [NodeJS](http://nodejs.org/). - -# Installation - -With [npm](http://npmjs.org) do: - - $ npm install adm-zip - -## What is it good for? -The library allows you to: - -* decompress zip files directly to disk or in memory buffers -* compress files and store them to disk in .zip format or in compressed buffers -* update content of/add new/delete files from an existing .zip - -# Dependencies -There are no other nodeJS libraries that ADM-ZIP is dependent of - -# Examples - -## Basic usage -```javascript - - var AdmZip = require('adm-zip'); - - // reading archives - var zip = new AdmZip("./my_file.zip"); - var zipEntries = zip.getEntries(); // an array of ZipEntry records - - zipEntries.forEach(function(zipEntry) { - console.log(zipEntry.toString()); // outputs zip entries information - if (zipEntry.entryName == "my_file.txt") { - console.log(zipEntry.data.toString('utf8')); - } - }); - // outputs the content of some_folder/my_file.txt - console.log(zip.readAsText("some_folder/my_file.txt")); - // extracts the specified file to the specified location - zip.extractEntryTo(/*entry name*/"some_folder/my_file.txt", /*target path*/"/home/me/tempfolder", /*maintainEntryPath*/false, /*overwrite*/true); - // extracts everything - zip.extractAllTo(/*target path*/"/home/me/zipcontent/", /*overwrite*/true); - - - // creating archives - var zip = new AdmZip(); - - // add file directly - zip.addFile("test.txt", new Buffer("inner content of the file"), "entry comment goes here"); - // add local file - zip.addLocalFile("/home/me/some_picture.png"); - // get everything as a buffer - var willSendthis = zip.toBuffer(); - // or write everything to disk - zip.writeZip(/*target file name*/"/home/me/files.zip"); - - - // ... more examples in the wiki -``` - -For more detailed information please check out the [wiki](https://github.com/cthackers/adm-zip/wiki). - -[![build status](https://secure.travis-ci.org/cthackers/adm-zip.png)](http://travis-ci.org/cthackers/adm-zip) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/adm-zip.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/adm-zip.js deleted file mode 100644 index 46595fc5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/adm-zip.js +++ /dev/null @@ -1,404 +0,0 @@ -var fs = require("fs"), - pth = require("path"); - -fs.existsSync = fs.existsSync || pth.existsSync; - -var ZipEntry = require("./zipEntry"), - ZipFile = require("./zipFile"), - Utils = require("./util"); - -module.exports = function(/*String*/input) { - var _zip = undefined, - _filename = ""; - - if (input && typeof input === "string") { // load zip file - if (fs.existsSync(input)) { - _filename = input; - _zip = new ZipFile(input, Utils.Constants.FILE); - } else { - throw Utils.Errors.INVALID_FILENAME; - } - } else if(input && Buffer.isBuffer(input)) { // load buffer - _zip = new ZipFile(input, Utils.Constants.BUFFER); - } else { // create new zip file - _zip = new ZipFile(null, Utils.Constants.NONE); - } - - function getEntry(/*Object*/entry) { - if (entry && _zip) { - var item; - // If entry was given as a file name - if (typeof entry === "string") - item = _zip.getEntry(entry); - // if entry was given as a ZipEntry object - if (typeof entry === "object" && entry.entryName != undefined && entry.header != undefined) - item = _zip.getEntry(entry.entryName); - - if (item) { - return item; - } - } - return null; - } - - return { - /** - * Extracts the given entry from the archive and returns the content as a Buffer object - * @param entry ZipEntry object or String with the full path of the entry - * - * @return Buffer or Null in case of error - */ - readFile : function(/*Object*/entry) { - var item = getEntry(entry); - return item && item.getData() || null; - }, - - /** - * Asynchronous readFile - * @param entry ZipEntry object or String with the full path of the entry - * @param callback - * - * @return Buffer or Null in case of error - */ - readFileAsync : function(/*Object*/entry, /*Function*/callback) { - var item = getEntry(entry); - if (item) { - item.getDataAsync(callback); - } else { - callback(null,"getEntry failed for:" + entry) - } - }, - - /** - * Extracts the given entry from the archive and returns the content as plain text in the given encoding - * @param entry ZipEntry object or String with the full path of the entry - * @param encoding Optional. If no encoding is specified utf8 is used - * - * @return String - */ - readAsText : function(/*Object*/entry, /*String - Optional*/encoding) { - var item = getEntry(entry); - if (item) { - var data = item.getData(); - if (data && data.length) { - return data.toString(encoding || "utf8"); - } - } - return ""; - }, - - /** - * Asynchronous readAsText - * @param entry ZipEntry object or String with the full path of the entry - * @param callback - * @param encoding Optional. If no encoding is specified utf8 is used - * - * @return String - */ - readAsTextAsync : function(/*Object*/entry, /*Function*/callback, /*String - Optional*/encoding) { - var item = getEntry(entry); - if (item) { - item.getDataAsync(function(data) { - if (data && data.length) { - callback(data.toString(encoding || "utf8")); - } else { - callback(""); - } - }) - } else { - callback(""); - } - }, - - /** - * Remove the entry from the file or the entry and all it's nested directories and files if the given entry is a directory - * - * @param entry - */ - deleteFile : function(/*Object*/entry) { // @TODO: test deleteFile - var item = getEntry(entry); - if (item) { - _zip.deleteEntry(item.entryName); - } - }, - - /** - * Adds a comment to the zip. The zip must be rewritten after adding the comment. - * - * @param comment - */ - addZipComment : function(/*String*/comment) { // @TODO: test addZipComment - _zip.comment = comment; - }, - - /** - * Returns the zip comment - * - * @return String - */ - getZipComment : function() { - return _zip.comment || ''; - }, - - /** - * Adds a comment to a specified zipEntry. The zip must be rewritten after adding the comment - * The comment cannot exceed 65535 characters in length - * - * @param entry - * @param comment - */ - addZipEntryComment : function(/*Object*/entry,/*String*/comment) { - var item = getEntry(entry); - if (item) { - item.comment = comment; - } - }, - - /** - * Returns the comment of the specified entry - * - * @param entry - * @return String - */ - getZipEntryComment : function(/*Object*/entry) { - var item = getEntry(entry); - if (item) { - return item.comment || ''; - } - return '' - }, - - /** - * Updates the content of an existing entry inside the archive. The zip must be rewritten after updating the content - * - * @param entry - * @param content - */ - updateFile : function(/*Object*/entry, /*Buffer*/content) { - var item = getEntry(entry); - if (item) { - item.setData(content); - } - }, - - /** - * Adds a file from the disk to the archive - * - * @param localPath - */ - addLocalFile : function(/*String*/localPath, /*String*/zipPath) { - if (fs.existsSync(localPath)) { - if(zipPath){ - zipPath=zipPath.split("\\").join("/"); - if(zipPath.charAt(zipPath.length - 1) != "/"){ - zipPath += "/"; - } - }else{ - zipPath=""; - } - var p = localPath.split("\\").join("/").split("/").pop(); - - this.addFile(zipPath+p, fs.readFileSync(localPath), "", 0) - } else { - throw Utils.Errors.FILE_NOT_FOUND.replace("%s", localPath); - } - }, - - /** - * Adds a local directory and all its nested files and directories to the archive - * - * @param localPath - */ - addLocalFolder : function(/*String*/localPath, /*String*/zipPath) { - if(zipPath){ - zipPath=zipPath.split("\\").join("/"); - if(zipPath.charAt(zipPath.length - 1) != "/"){ - zipPath += "/"; - } - }else{ - zipPath=""; - } - localPath = localPath.split("\\").join("/"); //windows fix - if (localPath.charAt(localPath.length - 1) != "/") - localPath += "/"; - - if (fs.existsSync(localPath)) { - - var items = Utils.findFiles(localPath), - self = this; - - if (items.length) { - items.forEach(function(path) { - var p = path.split("\\").join("/").replace(localPath, ""); //windows fix - if (p.charAt(p.length - 1) !== "/") { - self.addFile(zipPath+p, fs.readFileSync(path), "", 0) - } else { - self.addFile(zipPath+p, new Buffer(0), "", 0) - } - }); - } - } else { - throw Utils.Errors.FILE_NOT_FOUND.replace("%s", localPath); - } - }, - - /** - * Allows you to create a entry (file or directory) in the zip file. - * If you want to create a directory the entryName must end in / and a null buffer should be provided. - * Comment and attributes are optional - * - * @param entryName - * @param content - * @param comment - * @param attr - */ - addFile : function(/*String*/entryName, /*Buffer*/content, /*String*/comment, /*Number*/attr) { - var entry = new ZipEntry(); - entry.entryName = entryName; - entry.comment = comment || ""; - entry.attr = attr || 438; //0666; - if (entry.isDirectory && content.length) { - // throw Utils.Errors.DIRECTORY_CONTENT_ERROR; - } - entry.setData(content); - _zip.setEntry(entry); - }, - - /** - * Returns an array of ZipEntry objects representing the files and folders inside the archive - * - * @return Array - */ - getEntries : function() { - if (_zip) { - return _zip.entries; - } else { - return []; - } - }, - - /** - * Returns a ZipEntry object representing the file or folder specified by ``name``. - * - * @param name - * @return ZipEntry - */ - getEntry : function(/*String*/name) { - return getEntry(name); - }, - - /** - * Extracts the given entry to the given targetPath - * If the entry is a directory inside the archive, the entire directory and it's subdirectories will be extracted - * - * @param entry ZipEntry object or String with the full path of the entry - * @param targetPath Target folder where to write the file - * @param maintainEntryPath If maintainEntryPath is true and the entry is inside a folder, the entry folder - * will be created in targetPath as well. Default is TRUE - * @param overwrite If the file already exists at the target path, the file will be overwriten if this is true. - * Default is FALSE - * - * @return Boolean - */ - extractEntryTo : function(/*Object*/entry, /*String*/targetPath, /*Boolean*/maintainEntryPath, /*Boolean*/overwrite) { - overwrite = overwrite || false; - maintainEntryPath = typeof maintainEntryPath == "undefined" ? true : maintainEntryPath; - - var item = getEntry(entry); - if (!item) { - throw Utils.Errors.NO_ENTRY; - } - - var target = pth.resolve(targetPath, maintainEntryPath ? item.entryName : pth.basename(item.entryName)); - - if (item.isDirectory) { - target = pth.resolve(target, ".."); - var children = _zip.getEntryChildren(item); - children.forEach(function(child) { - if (child.isDirectory) return; - var content = child.getData(); - if (!content) { - throw Utils.Errors.CANT_EXTRACT_FILE; - } - Utils.writeFileTo(pth.resolve(targetPath, maintainEntryPath ? child.entryName : child.entryName.substr(item.entryName.length)), content, overwrite); - }); - return true; - } - - var content = item.getData(); - if (!content) throw Utils.Errors.CANT_EXTRACT_FILE; - - if (fs.existsSync(targetPath) && !overwrite) { - throw Utils.Errors.CANT_OVERRIDE; - } - Utils.writeFileTo(target, content, overwrite); - - return true; - }, - - /** - * Extracts the entire archive to the given location - * - * @param targetPath Target location - * @param overwrite If the file already exists at the target path, the file will be overwriten if this is true. - * Default is FALSE - */ - extractAllTo : function(/*String*/targetPath, /*Boolean*/overwrite) { - overwrite = overwrite || false; - if (!_zip) { - throw Utils.Errors.NO_ZIP; - } - - _zip.entries.forEach(function(entry) { - if (entry.isDirectory) { - Utils.makeDir(pth.resolve(targetPath, entry.entryName.toString())); - return; - } - var content = entry.getData(); - if (!content) { - throw Utils.Errors.CANT_EXTRACT_FILE + "2"; - } - Utils.writeFileTo(pth.resolve(targetPath, entry.entryName.toString()), content, overwrite); - }) - }, - - /** - * Writes the newly created zip file to disk at the specified location or if a zip was opened and no ``targetFileName`` is provided, it will overwrite the opened zip - * - * @param targetFileName - * @param callback - */ - writeZip : function(/*String*/targetFileName, /*Function*/callback) { - if (arguments.length == 1) { - if (typeof targetFileName == "function") { - callback = targetFileName; - targetFileName = ""; - } - } - - if (!targetFileName && _filename) { - targetFileName = _filename; - } - if (!targetFileName) return; - - var zipData = _zip.compressToBuffer(); - if (zipData) { - Utils.writeFileTo(targetFileName, zipData, true); - } - }, - - /** - * Returns the content of the entire zip file as a Buffer object - * - * @return Buffer - */ - toBuffer : function(/*Function*/onSuccess,/*Function*/onFail,/*Function*/onItemStart,/*Function*/onItemEnd) { - this.valueOf = 2; - if (typeof onSuccess == "function") { - _zip.toAsyncBuffer(onSuccess,onFail,onItemStart,onItemEnd); - return null; - } - return _zip.compressToBuffer() - } - } -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/entryHeader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/entryHeader.js deleted file mode 100644 index a29c70f1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/entryHeader.js +++ /dev/null @@ -1,261 +0,0 @@ -var Utils = require("../util"), - Constants = Utils.Constants; - -/* The central directory file header */ -module.exports = function () { - var _verMade = 0x0A, - _version = 0x0A, - _flags = 0, - _method = 0, - _time = 0, - _crc = 0, - _compressedSize = 0, - _size = 0, - _fnameLen = 0, - _extraLen = 0, - - _comLen = 0, - _diskStart = 0, - _inattr = 0, - _attr = 0, - _offset = 0; - - var _dataHeader = {}; - - function setTime(val) { - var val = new Date(val); - _time = (val.getFullYear() - 1980 & 0x7f) << 25 // b09-16 years from 1980 - | (val.getMonth() + 1) << 21 // b05-08 month - | val.getDay() << 16 // b00-04 hour - - // 2 bytes time - | val.getHours() << 11 // b11-15 hour - | val.getMinutes() << 5 // b05-10 minute - | val.getSeconds() >> 1; // b00-04 seconds divided by 2 - } - - setTime(+new Date()); - - return { - get made () { return _verMade; }, - set made (val) { _verMade = val; }, - - get version () { return _version; }, - set version (val) { _version = val }, - - get flags () { return _flags }, - set flags (val) { _flags = val; }, - - get method () { return _method; }, - set method (val) { _method = val; }, - - get time () { return new Date( - ((_time >> 25) & 0x7f) + 1980, - ((_time >> 21) & 0x0f) - 1, - (_time >> 16) & 0x1f, - (_time >> 11) & 0x1f, - (_time >> 5) & 0x3f, - (_time & 0x1f) << 1 - ); - }, - set time (val) { - setTime(val); - }, - - get crc () { return _crc; }, - set crc (val) { _crc = val; }, - - get compressedSize () { return _compressedSize; }, - set compressedSize (val) { _compressedSize = val; }, - - get size () { return _size; }, - set size (val) { _size = val; }, - - get fileNameLength () { return _fnameLen; }, - set fileNameLength (val) { _fnameLen = val; }, - - get extraLength () { return _extraLen }, - set extraLength (val) { _extraLen = val; }, - - get commentLength () { return _comLen }, - set commentLength (val) { _comLen = val }, - - get diskNumStart () { return _diskStart }, - set diskNumStart (val) { _diskStart = val }, - - get inAttr () { return _inattr }, - set inAttr (val) { _inattr = val }, - - get attr () { return _attr }, - set attr (val) { _attr = val }, - - get offset () { return _offset }, - set offset (val) { _offset = val }, - - get encripted () { return (_flags & 1) == 1 }, - - get entryHeaderSize () { - return Constants.CENHDR + _fnameLen + _extraLen + _comLen; - }, - - get realDataOffset () { - return _offset + Constants.LOCHDR + _dataHeader.fnameLen + _dataHeader.extraLen; - }, - - get dataHeader () { - return _dataHeader; - }, - - loadDataHeaderFromBinary : function(/*Buffer*/input) { - var data = input.slice(_offset, _offset + Constants.LOCHDR); - // 30 bytes and should start with "PK\003\004" - if (data.readUInt32LE(0) != Constants.LOCSIG) { - throw Utils.Errors.INVALID_LOC; - } - _dataHeader = { - // version needed to extract - version : data.readUInt16LE(Constants.LOCVER), - // general purpose bit flag - flags : data.readUInt16LE(Constants.LOCFLG), - // compression method - method : data.readUInt16LE(Constants.LOCHOW), - // modification time (2 bytes time, 2 bytes date) - time : data.readUInt32LE(Constants.LOCTIM), - // uncompressed file crc-32 value - crc : data.readUInt32LE(Constants.LOCCRC), - // compressed size - compressedSize : data.readUInt32LE(Constants.LOCSIZ), - // uncompressed size - size : data.readUInt32LE(Constants.LOCLEN), - // filename length - fnameLen : data.readUInt16LE(Constants.LOCNAM), - // extra field length - extraLen : data.readUInt16LE(Constants.LOCEXT) - } - }, - - loadFromBinary : function(/*Buffer*/data) { - // data should be 46 bytes and start with "PK 01 02" - if (data.length != Constants.CENHDR || data.readUInt32LE(0) != Constants.CENSIG) { - throw Utils.Errors.INVALID_CEN; - } - // version made by - _verMade = data.readUInt16LE(Constants.CENVEM); - // version needed to extract - _version = data.readUInt16LE(Constants.CENVER); - // encrypt, decrypt flags - _flags = data.readUInt16LE(Constants.CENFLG); - // compression method - _method = data.readUInt16LE(Constants.CENHOW); - // modification time (2 bytes time, 2 bytes date) - _time = data.readUInt32LE(Constants.CENTIM); - // uncompressed file crc-32 value - _crc = data.readUInt32LE(Constants.CENCRC); - // compressed size - _compressedSize = data.readUInt32LE(Constants.CENSIZ); - // uncompressed size - _size = data.readUInt32LE(Constants.CENLEN); - // filename length - _fnameLen = data.readUInt16LE(Constants.CENNAM); - // extra field length - _extraLen = data.readUInt16LE(Constants.CENEXT); - // file comment length - _comLen = data.readUInt16LE(Constants.CENCOM); - // volume number start - _diskStart = data.readUInt16LE(Constants.CENDSK); - // internal file attributes - _inattr = data.readUInt16LE(Constants.CENATT); - // external file attributes - _attr = data.readUInt32LE(Constants.CENATX); - // LOC header offset - _offset = data.readUInt32LE(Constants.CENOFF); - }, - - dataHeaderToBinary : function() { - // LOC header size (30 bytes) - var data = new Buffer(Constants.LOCHDR); - // "PK\003\004" - data.writeUInt32LE(Constants.LOCSIG, 0); - // version needed to extract - data.writeUInt16LE(_version, Constants.LOCVER); - // general purpose bit flag - data.writeUInt16LE(_flags, Constants.LOCFLG); - // compression method - data.writeUInt16LE(_method, Constants.LOCHOW); - // modification time (2 bytes time, 2 bytes date) - data.writeUInt32LE(_time, Constants.LOCTIM); - // uncompressed file crc-32 value - data.writeUInt32LE(_crc, Constants.LOCCRC); - // compressed size - data.writeUInt32LE(_compressedSize, Constants.LOCSIZ); - // uncompressed size - data.writeUInt32LE(_size, Constants.LOCLEN); - // filename length - data.writeUInt16LE(_fnameLen, Constants.LOCNAM); - // extra field length - data.writeUInt16LE(_extraLen, Constants.LOCEXT); - return data; - }, - - entryHeaderToBinary : function() { - // CEN header size (46 bytes) - var data = new Buffer(Constants.CENHDR + _fnameLen + _extraLen + _comLen); - // "PK\001\002" - data.writeUInt32LE(Constants.CENSIG, 0); - // version made by - data.writeUInt16LE(_verMade, Constants.CENVEM); - // version needed to extract - data.writeUInt16LE(_version, Constants.CENVER); - // encrypt, decrypt flags - data.writeUInt16LE(_flags, Constants.CENFLG); - // compression method - data.writeUInt16LE(_method, Constants.CENHOW); - // modification time (2 bytes time, 2 bytes date) - data.writeUInt32LE(_time, Constants.CENTIM); - // uncompressed file crc-32 value - data.writeInt32LE(_crc, Constants.CENCRC, true); - // compressed size - data.writeUInt32LE(_compressedSize, Constants.CENSIZ); - // uncompressed size - data.writeUInt32LE(_size, Constants.CENLEN); - // filename length - data.writeUInt16LE(_fnameLen, Constants.CENNAM); - // extra field length - data.writeUInt16LE(_extraLen, Constants.CENEXT); - // file comment length - data.writeUInt16LE(_comLen, Constants.CENCOM); - // volume number start - data.writeUInt16LE(_diskStart, Constants.CENDSK); - // internal file attributes - data.writeUInt16LE(_inattr, Constants.CENATT); - // external file attributes - data.writeUInt32LE(_attr, Constants.CENATX); - // LOC header offset - data.writeUInt32LE(_offset, Constants.CENOFF); - // fill all with - data.fill(0x00, Constants.CENHDR); - return data; - }, - - toString : function() { - return '{\n' + - '\t"made" : ' + _verMade + ",\n" + - '\t"version" : ' + _version + ",\n" + - '\t"flags" : ' + _flags + ",\n" + - '\t"method" : ' + Utils.methodToString(_method) + ",\n" + - '\t"time" : ' + _time + ",\n" + - '\t"crc" : 0x' + _crc.toString(16).toUpperCase() + ",\n" + - '\t"compressedSize" : ' + _compressedSize + " bytes,\n" + - '\t"size" : ' + _size + " bytes,\n" + - '\t"fileNameLength" : ' + _fnameLen + ",\n" + - '\t"extraLength" : ' + _extraLen + " bytes,\n" + - '\t"commentLength" : ' + _comLen + " bytes,\n" + - '\t"diskNumStart" : ' + _diskStart + ",\n" + - '\t"inAttr" : ' + _inattr + ",\n" + - '\t"attr" : ' + _attr + ",\n" + - '\t"offset" : ' + _offset + ",\n" + - '\t"entryHeaderSize" : ' + (Constants.CENHDR + _fnameLen + _extraLen + _comLen) + " bytes\n" + - '}'; - } - } -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/index.js deleted file mode 100644 index b8c67b96..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/index.js +++ /dev/null @@ -1,2 +0,0 @@ -exports.EntryHeader = require("./entryHeader"); -exports.MainHeader = require("./mainHeader"); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/mainHeader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/mainHeader.js deleted file mode 100644 index 002bc8a7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/mainHeader.js +++ /dev/null @@ -1,80 +0,0 @@ -var Utils = require("../util"), - Constants = Utils.Constants; - -/* The entries in the end of central directory */ -module.exports = function () { - var _volumeEntries = 0, - _totalEntries = 0, - _size = 0, - _offset = 0, - _commentLength = 0; - - return { - get diskEntries () { return _volumeEntries }, - set diskEntries (/*Number*/val) { _volumeEntries = _totalEntries = val; }, - - get totalEntries () { return _totalEntries }, - set totalEntries (/*Number*/val) { _totalEntries = _volumeEntries = val; }, - - get size () { return _size }, - set size (/*Number*/val) { _size = val; }, - - get offset () { return _offset }, - set offset (/*Number*/val) { _offset = val; }, - - get commentLength () { return _commentLength }, - set commentLength (/*Number*/val) { _commentLength = val; }, - - get mainHeaderSize () { - return Constants.ENDHDR + _commentLength; - }, - - loadFromBinary : function(/*Buffer*/data) { - // data should be 22 bytes and start with "PK 05 06" - if (data.length != Constants.ENDHDR || data.readUInt32LE(0) != Constants.ENDSIG) - throw Utils.Errors.INVALID_END; - - // number of entries on this volume - _volumeEntries = data.readUInt16LE(Constants.ENDSUB); - // total number of entries - _totalEntries = data.readUInt16LE(Constants.ENDTOT); - // central directory size in bytes - _size = data.readUInt32LE(Constants.ENDSIZ); - // offset of first CEN header - _offset = data.readUInt32LE(Constants.ENDOFF); - // zip file comment length - _commentLength = data.readUInt16LE(Constants.ENDCOM); - }, - - toBinary : function() { - var b = new Buffer(Constants.ENDHDR + _commentLength); - // "PK 05 06" signature - b.writeUInt32LE(Constants.ENDSIG, 0); - b.writeUInt32LE(0, 4); - // number of entries on this volume - b.writeUInt16LE(_volumeEntries, Constants.ENDSUB); - // total number of entries - b.writeUInt16LE(_totalEntries, Constants.ENDTOT); - // central directory size in bytes - b.writeUInt32LE(_size, Constants.ENDSIZ); - // offset of first CEN header - b.writeUInt32LE(_offset, Constants.ENDOFF); - // zip file comment length - b.writeUInt16LE(_commentLength, Constants.ENDCOM); - // fill comment memory with spaces so no garbage is left there - b.fill(" ", Constants.ENDHDR); - - return b; - }, - - toString : function() { - return '{\n' + - '\t"diskEntries" : ' + _volumeEntries + ",\n" + - '\t"totalEntries" : ' + _totalEntries + ",\n" + - '\t"size" : ' + _size + " bytes,\n" + - '\t"offset" : 0x' + _offset.toString(16).toUpperCase() + ",\n" + - '\t"commentLength" : 0x' + _commentLength + "\n" + - '}'; - } - } -}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/deflater.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/deflater.js deleted file mode 100644 index 32679434..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/deflater.js +++ /dev/null @@ -1,1578 +0,0 @@ -/* - * $Id: rawdeflate.js,v 0.5 2013/04/09 14:25:38 dankogai Exp dankogai $ - * - * GNU General Public License, version 2 (GPL-2.0) - * http://opensource.org/licenses/GPL-2.0 - * Original: - * http://www.onicos.com/staff/iz/amuse/javascript/expert/deflate.txt - */ -function JSDeflater(/*inbuff*/inbuf) { - - /* Copyright (C) 1999 Masanao Izumo <iz@onicos.co.jp> - * Version: 1.0.1 - * LastModified: Dec 25 1999 - */ - - var WSIZE = 32768, // Sliding Window size - zip_STORED_BLOCK = 0, - zip_STATIC_TREES = 1, - zip_DYN_TREES = 2, - zip_DEFAULT_LEVEL = 6, - zip_FULL_SEARCH = true, - zip_INBUFSIZ = 32768, // Input buffer size - zip_INBUF_EXTRA = 64, // Extra buffer - zip_OUTBUFSIZ = 1024 * 8, - zip_window_size = 2 * WSIZE, - MIN_MATCH = 3, - MAX_MATCH = 258, - zip_BITS = 16, - LIT_BUFSIZE = 0x2000, - zip_HASH_BITS = 13, - zip_DIST_BUFSIZE = LIT_BUFSIZE, - zip_HASH_SIZE = 1 << zip_HASH_BITS, - zip_HASH_MASK = zip_HASH_SIZE - 1, - zip_WMASK = WSIZE - 1, - zip_NIL = 0, // Tail of hash chains - zip_TOO_FAR = 4096, - zip_MIN_LOOKAHEAD = MAX_MATCH + MIN_MATCH + 1, - zip_MAX_DIST = WSIZE - zip_MIN_LOOKAHEAD, - zip_SMALLEST = 1, - zip_MAX_BITS = 15, - zip_MAX_BL_BITS = 7, - zip_LENGTH_CODES = 29, - zip_LITERALS = 256, - zip_END_BLOCK = 256, - zip_L_CODES = zip_LITERALS + 1 + zip_LENGTH_CODES, - zip_D_CODES = 30, - zip_BL_CODES = 19, - zip_REP_3_6 = 16, - zip_REPZ_3_10 = 17, - zip_REPZ_11_138 = 18, - zip_HEAP_SIZE = 2 * zip_L_CODES + 1, - zip_H_SHIFT = parseInt((zip_HASH_BITS + MIN_MATCH - 1) / MIN_MATCH); - - var zip_free_queue, zip_qhead, zip_qtail, zip_initflag, zip_outbuf = null, zip_outcnt, zip_outoff, zip_complete, - zip_window, zip_d_buf, zip_l_buf, zip_prev, zip_bi_buf, zip_bi_valid, zip_block_start, zip_ins_h, zip_hash_head, - zip_prev_match, zip_match_available, zip_match_length, zip_prev_length, zip_strstart, zip_match_start, zip_eofile, - zip_lookahead, zip_max_chain_length, zip_max_lazy_match, zip_compr_level, zip_good_match, zip_nice_match, - zip_dyn_ltree, zip_dyn_dtree, zip_static_ltree, zip_static_dtree, zip_bl_tree, zip_l_desc, zip_d_desc, zip_bl_desc, - zip_bl_count, zip_heap, zip_heap_len, zip_heap_max, zip_depth, zip_length_code, zip_dist_code, zip_base_length, - zip_base_dist, zip_flag_buf, zip_last_lit, zip_last_dist, zip_last_flags, zip_flags, zip_flag_bit, zip_opt_len, - zip_static_len, zip_deflate_data, zip_deflate_pos; - - var zip_DeflateCT = function () { - this.fc = 0; // frequency count or bit string - this.dl = 0; // father node in Huffman tree or length of bit string - }; - - var zip_DeflateTreeDesc = function () { - this.dyn_tree = null; // the dynamic tree - this.static_tree = null; // corresponding static tree or NULL - this.extra_bits = null; // extra bits for each code or NULL - this.extra_base = 0; // base index for extra_bits - this.elems = 0; // max number of elements in the tree - this.max_length = 0; // max bit length for the codes - this.max_code = 0; // largest code with non zero frequency - }; - - /* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. - */ - var zip_DeflateConfiguration = function (a, b, c, d) { - this.good_length = a; // reduce lazy search above this match length - this.max_lazy = b; // do not perform lazy search above this match length - this.nice_length = c; // quit search above this match length - this.max_chain = d; - }; - - var zip_DeflateBuffer = function () { - this.next = null; - this.len = 0; - this.ptr = new Array(zip_OUTBUFSIZ); - this.off = 0; - }; - - /* constant tables */ - var zip_extra_lbits = new Array( - 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0); - var zip_extra_dbits = new Array( - 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13); - var zip_extra_blbits = new Array( - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7); - var zip_bl_order = new Array( - 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15); - var zip_configuration_table = new Array( - new zip_DeflateConfiguration(0, 0, 0, 0), - new zip_DeflateConfiguration(4, 4, 8, 4), - new zip_DeflateConfiguration(4, 5, 16, 8), - new zip_DeflateConfiguration(4, 6, 32, 32), - new zip_DeflateConfiguration(4, 4, 16, 16), - new zip_DeflateConfiguration(8, 16, 32, 32), - new zip_DeflateConfiguration(8, 16, 128, 128), - new zip_DeflateConfiguration(8, 32, 128, 256), - new zip_DeflateConfiguration(32, 128, 258, 1024), - new zip_DeflateConfiguration(32, 258, 258, 4096)); - - - /* routines (deflate) */ - - var zip_deflate_start = function (level) { - var i; - - if (!level) - level = zip_DEFAULT_LEVEL; - else if (level < 1) - level = 1; - else if (level > 9) - level = 9; - - zip_compr_level = level; - zip_initflag = false; - zip_eofile = false; - if (zip_outbuf != null) - return; - - zip_free_queue = zip_qhead = zip_qtail = null; - zip_outbuf = new Array(zip_OUTBUFSIZ); - zip_window = new Array(zip_window_size); - zip_d_buf = new Array(zip_DIST_BUFSIZE); - zip_l_buf = new Array(zip_INBUFSIZ + zip_INBUF_EXTRA); - zip_prev = new Array(1 << zip_BITS); - zip_dyn_ltree = new Array(zip_HEAP_SIZE); - for (i = 0; i < zip_HEAP_SIZE; i++) zip_dyn_ltree[i] = new zip_DeflateCT(); - zip_dyn_dtree = new Array(2 * zip_D_CODES + 1); - for (i = 0; i < 2 * zip_D_CODES + 1; i++) zip_dyn_dtree[i] = new zip_DeflateCT(); - zip_static_ltree = new Array(zip_L_CODES + 2); - for (i = 0; i < zip_L_CODES + 2; i++) zip_static_ltree[i] = new zip_DeflateCT(); - zip_static_dtree = new Array(zip_D_CODES); - for (i = 0; i < zip_D_CODES; i++) zip_static_dtree[i] = new zip_DeflateCT(); - zip_bl_tree = new Array(2 * zip_BL_CODES + 1); - for (i = 0; i < 2 * zip_BL_CODES + 1; i++) zip_bl_tree[i] = new zip_DeflateCT(); - zip_l_desc = new zip_DeflateTreeDesc(); - zip_d_desc = new zip_DeflateTreeDesc(); - zip_bl_desc = new zip_DeflateTreeDesc(); - zip_bl_count = new Array(zip_MAX_BITS + 1); - zip_heap = new Array(2 * zip_L_CODES + 1); - zip_depth = new Array(2 * zip_L_CODES + 1); - zip_length_code = new Array(MAX_MATCH - MIN_MATCH + 1); - zip_dist_code = new Array(512); - zip_base_length = new Array(zip_LENGTH_CODES); - zip_base_dist = new Array(zip_D_CODES); - zip_flag_buf = new Array(parseInt(LIT_BUFSIZE / 8)); - }; - - var zip_deflate_end = function () { - zip_free_queue = zip_qhead = zip_qtail = null; - zip_outbuf = null; - zip_window = null; - zip_d_buf = null; - zip_l_buf = null; - zip_prev = null; - zip_dyn_ltree = null; - zip_dyn_dtree = null; - zip_static_ltree = null; - zip_static_dtree = null; - zip_bl_tree = null; - zip_l_desc = null; - zip_d_desc = null; - zip_bl_desc = null; - zip_bl_count = null; - zip_heap = null; - zip_depth = null; - zip_length_code = null; - zip_dist_code = null; - zip_base_length = null; - zip_base_dist = null; - zip_flag_buf = null; - }; - - var zip_reuse_queue = function (p) { - p.next = zip_free_queue; - zip_free_queue = p; - }; - - var zip_new_queue = function () { - var p; - - if (zip_free_queue != null) { - p = zip_free_queue; - zip_free_queue = zip_free_queue.next; - } - else - p = new zip_DeflateBuffer(); - p.next = null; - p.len = p.off = 0; - - return p; - }; - - var zip_head1 = function (i) { - return zip_prev[WSIZE + i]; - }; - - var zip_head2 = function (i, val) { - return zip_prev[WSIZE + i] = val; - }; - - /* put_byte is used for the compressed output, put_ubyte for the - * uncompressed output. However unlzw() uses window for its - * suffix table instead of its output buffer, so it does not use put_ubyte - * (to be cleaned up). - */ - var zip_put_byte = function (c) { - zip_outbuf[zip_outoff + zip_outcnt++] = c; - if (zip_outoff + zip_outcnt == zip_OUTBUFSIZ) - zip_qoutbuf(); - }; - - /* Output a 16 bit value, lsb first */ - var zip_put_short = function (w) { - w &= 0xffff; - if (zip_outoff + zip_outcnt < zip_OUTBUFSIZ - 2) { - zip_outbuf[zip_outoff + zip_outcnt++] = (w & 0xff); - zip_outbuf[zip_outoff + zip_outcnt++] = (w >>> 8); - } else { - zip_put_byte(w & 0xff); - zip_put_byte(w >>> 8); - } - }; - - /* ========================================================================== - * Insert string s in the dictionary and set match_head to the previous head - * of the hash chain (the most recent string with same hash key). Return - * the previous length of the hash chain. - * IN assertion: all calls to to INSERT_STRING are made with consecutive - * input characters and the first MIN_MATCH bytes of s are valid - * (except for the last MIN_MATCH-1 bytes of the input file). - */ - var zip_INSERT_STRING = function () { - zip_ins_h = ((zip_ins_h << zip_H_SHIFT) - ^ (zip_window[zip_strstart + MIN_MATCH - 1] & 0xff)) - & zip_HASH_MASK; - zip_hash_head = zip_head1(zip_ins_h); - zip_prev[zip_strstart & zip_WMASK] = zip_hash_head; - zip_head2(zip_ins_h, zip_strstart); - }; - - /* Send a code of the given tree. c and tree must not have side effects */ - var zip_SEND_CODE = function (c, tree) { - zip_send_bits(tree[c].fc, tree[c].dl); - }; - - /* Mapping from a distance to a distance code. dist is the distance - 1 and - * must not have side effects. dist_code[256] and dist_code[257] are never - * used. - */ - var zip_D_CODE = function (dist) { - return (dist < 256 ? zip_dist_code[dist] - : zip_dist_code[256 + (dist >> 7)]) & 0xff; - }; - - /* ========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ - var zip_SMALLER = function (tree, n, m) { - return tree[n].fc < tree[m].fc || - (tree[n].fc == tree[m].fc && zip_depth[n] <= zip_depth[m]); - }; - - /* ========================================================================== - * read string data - */ - var zip_read_buff = function (buff, offset, n) { - var i; - for (i = 0; i < n && zip_deflate_pos < zip_deflate_data.length; i++) - buff[offset + i] = - zip_deflate_data[zip_deflate_pos++] & 0xff; - return i; - }; - - /* ========================================================================== - * Initialize the "longest match" routines for a new file - */ - var zip_lm_init = function () { - var j; - - /* Initialize the hash table. */ - for (j = 0; j < zip_HASH_SIZE; j++) - zip_prev[WSIZE + j] = 0; - zip_max_lazy_match = zip_configuration_table[zip_compr_level].max_lazy; - zip_good_match = zip_configuration_table[zip_compr_level].good_length; - if (!zip_FULL_SEARCH) - zip_nice_match = zip_configuration_table[zip_compr_level].nice_length; - zip_max_chain_length = zip_configuration_table[zip_compr_level].max_chain; - - zip_strstart = 0; - zip_block_start = 0; - - zip_lookahead = zip_read_buff(zip_window, 0, 2 * WSIZE); - if (zip_lookahead <= 0) { - zip_eofile = true; - zip_lookahead = 0; - return; - } - zip_eofile = false; - /* Make sure that we always have enough lookahead. This is important - * if input comes from a device such as a tty. - */ - while (zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile) - zip_fill_window(); - - /* If lookahead < MIN_MATCH, ins_h is garbage, but this is - * not important since only literal bytes will be emitted. - */ - zip_ins_h = 0; - for (j = 0; j < MIN_MATCH - 1; j++) { - zip_ins_h = ((zip_ins_h << zip_H_SHIFT) ^ (zip_window[j] & 0xff)) & zip_HASH_MASK; - } - }; - - /* ========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - */ - var zip_longest_match = function (cur_match) { - var chain_length = zip_max_chain_length; // max hash chain length - var scanp = zip_strstart; // current string - var matchp; // matched string - var len; // length of current match - var best_len = zip_prev_length; // best match length so far - - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - var limit = (zip_strstart > zip_MAX_DIST ? zip_strstart - zip_MAX_DIST : zip_NIL); - - var strendp = zip_strstart + MAX_MATCH; - var scan_end1 = zip_window[scanp + best_len - 1]; - var scan_end = zip_window[scanp + best_len]; - - /* Do not waste too much time if we already have a good match: */ - if (zip_prev_length >= zip_good_match) - chain_length >>= 2; - - do { - matchp = cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2: - */ - if (zip_window[matchp + best_len] != scan_end || - zip_window[matchp + best_len - 1] != scan_end1 || - zip_window[matchp] != zip_window[scanp] || - zip_window[++matchp] != zip_window[scanp + 1]) { - continue; - } - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scanp += 2; - matchp++; - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - } while (zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - scanp < strendp); - - len = MAX_MATCH - (strendp - scanp); - scanp = strendp - MAX_MATCH; - - if (len > best_len) { - zip_match_start = cur_match; - best_len = len; - if (zip_FULL_SEARCH) { - if (len >= MAX_MATCH) break; - } else { - if (len >= zip_nice_match) break; - } - - scan_end1 = zip_window[scanp + best_len - 1]; - scan_end = zip_window[scanp + best_len]; - } - } while ((cur_match = zip_prev[cur_match & zip_WMASK]) > limit - && --chain_length != 0); - - return best_len; - }; - - /* ========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead, and sets eofile if end of input file. - * IN assertion: lookahead < MIN_LOOKAHEAD && strstart + lookahead > 0 - * OUT assertions: at least one byte has been read, or eofile is set; - * file reads are performed for at least two bytes (required for the - * translate_eol option). - */ - var zip_fill_window = function () { - var n, m; - - // Amount of free space at the end of the window. - var more = zip_window_size - zip_lookahead - zip_strstart; - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (more == -1) { - /* Very unlikely, but possible on 16 bit machine if strstart == 0 - * and lookahead == 1 (input done one byte at time) - */ - more--; - } else if (zip_strstart >= WSIZE + zip_MAX_DIST) { - /* By the IN assertion, the window is not empty so we can't confuse - * more == 0 with more == 64K on a 16 bit machine. - */ - for (n = 0; n < WSIZE; n++) - zip_window[n] = zip_window[n + WSIZE]; - - zip_match_start -= WSIZE; - zip_strstart -= WSIZE; - /* we now have strstart >= MAX_DIST: */ - zip_block_start -= WSIZE; - - for (n = 0; n < zip_HASH_SIZE; n++) { - m = zip_head1(n); - zip_head2(n, m >= WSIZE ? m - WSIZE : zip_NIL); - } - for (n = 0; n < WSIZE; n++) { - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - m = zip_prev[n]; - zip_prev[n] = (m >= WSIZE ? m - WSIZE : zip_NIL); - } - more += WSIZE; - } - // At this point, more >= 2 - if (!zip_eofile) { - n = zip_read_buff(zip_window, zip_strstart + zip_lookahead, more); - if (n <= 0) - zip_eofile = true; - else - zip_lookahead += n; - } - }; - - /* ========================================================================== - * Processes a new input file and return its compressed length. This - * function does not perform lazy evaluationof matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. - */ - var zip_deflate_fast = function () { - while (zip_lookahead != 0 && zip_qhead == null) { - var flush; // set if current block must be flushed - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - zip_INSERT_STRING(); - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH - */ - if (zip_hash_head != zip_NIL && - zip_strstart - zip_hash_head <= zip_MAX_DIST) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - zip_match_length = zip_longest_match(zip_hash_head); - /* longest_match() sets match_start */ - if (zip_match_length > zip_lookahead) - zip_match_length = zip_lookahead; - } - if (zip_match_length >= MIN_MATCH) { - flush = zip_ct_tally(zip_strstart - zip_match_start, - zip_match_length - MIN_MATCH); - zip_lookahead -= zip_match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ - if (zip_match_length <= zip_max_lazy_match) { - zip_match_length--; // string at strstart already in hash table - do { - zip_strstart++; - zip_INSERT_STRING(); - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH - * these bytes are garbage, but it does not matter since - * the next lookahead bytes will be emitted as literals. - */ - } while (--zip_match_length != 0); - zip_strstart++; - } else { - zip_strstart += zip_match_length; - zip_match_length = 0; - zip_ins_h = zip_window[zip_strstart] & 0xff; - zip_ins_h = ((zip_ins_h << zip_H_SHIFT) ^ (zip_window[zip_strstart + 1] & 0xff)) & zip_HASH_MASK; - } - } else { - /* No match, output a literal byte */ - flush = zip_ct_tally(0, zip_window[zip_strstart] & 0xff); - zip_lookahead--; - zip_strstart++; - } - if (flush) { - zip_flush_block(0); - zip_block_start = zip_strstart; - } - - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - while (zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile) - zip_fill_window(); - } - }; - - var zip_deflate_better = function () { - /* Process the input block. */ - while (zip_lookahead != 0 && zip_qhead == null) { - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - zip_INSERT_STRING(); - - /* Find the longest match, discarding those <= prev_length. - */ - zip_prev_length = zip_match_length; - zip_prev_match = zip_match_start; - zip_match_length = MIN_MATCH - 1; - - if (zip_hash_head != zip_NIL && - zip_prev_length < zip_max_lazy_match && - zip_strstart - zip_hash_head <= zip_MAX_DIST) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - zip_match_length = zip_longest_match(zip_hash_head); - /* longest_match() sets match_start */ - if (zip_match_length > zip_lookahead) - zip_match_length = zip_lookahead; - - /* Ignore a length 3 match if it is too distant: */ - if (zip_match_length == MIN_MATCH && - zip_strstart - zip_match_start > zip_TOO_FAR) { - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - zip_match_length--; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: - */ - if (zip_prev_length >= MIN_MATCH && - zip_match_length <= zip_prev_length) { - var flush; // set if current block must be flushed - flush = zip_ct_tally(zip_strstart - 1 - zip_prev_match, - zip_prev_length - MIN_MATCH); - - /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. - */ - zip_lookahead -= zip_prev_length - 1; - zip_prev_length -= 2; - do { - zip_strstart++; - zip_INSERT_STRING(); - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH - * these bytes are garbage, but it does not matter since the - * next lookahead bytes will always be emitted as literals. - */ - } while (--zip_prev_length != 0); - zip_match_available = 0; - zip_match_length = MIN_MATCH - 1; - zip_strstart++; - if (flush) { - zip_flush_block(0); - zip_block_start = zip_strstart; - } - } else if (zip_match_available != 0) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - if (zip_ct_tally(0, zip_window[zip_strstart - 1] & 0xff)) { - zip_flush_block(0); - zip_block_start = zip_strstart; - } - zip_strstart++; - zip_lookahead--; - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - zip_match_available = 1; - zip_strstart++; - zip_lookahead--; - } - - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - while (zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile) - zip_fill_window(); - } - }; - - var zip_init_deflate = function () { - if (zip_eofile) - return; - zip_bi_buf = 0; - zip_bi_valid = 0; - zip_ct_init(); - zip_lm_init(); - - zip_qhead = null; - zip_outcnt = 0; - zip_outoff = 0; - zip_match_available = 0; - - if (zip_compr_level <= 3) { - zip_prev_length = MIN_MATCH - 1; - zip_match_length = 0; - } - else { - zip_match_length = MIN_MATCH - 1; - zip_match_available = 0; - zip_match_available = 0; - } - - zip_complete = false; - }; - - /* ========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. - */ - var zip_deflate_internal = function (buff, off, buff_size) { - var n; - - if (!zip_initflag) { - zip_init_deflate(); - zip_initflag = true; - if (zip_lookahead == 0) { // empty - zip_complete = true; - return 0; - } - } - - if ((n = zip_qcopy(buff, off, buff_size)) == buff_size) - return buff_size; - - if (zip_complete) - return n; - - if (zip_compr_level <= 3) // optimized for speed - zip_deflate_fast(); - else - zip_deflate_better(); - if (zip_lookahead == 0) { - if (zip_match_available != 0) - zip_ct_tally(0, zip_window[zip_strstart - 1] & 0xff); - zip_flush_block(1); - zip_complete = true; - } - return n + zip_qcopy(buff, n + off, buff_size - n); - }; - - var zip_qcopy = function (buff, off, buff_size) { - var n, i, j; - - n = 0; - while (zip_qhead != null && n < buff_size) { - i = buff_size - n; - if (i > zip_qhead.len) - i = zip_qhead.len; - for (j = 0; j < i; j++) - buff[off + n + j] = zip_qhead.ptr[zip_qhead.off + j]; - - zip_qhead.off += i; - zip_qhead.len -= i; - n += i; - if (zip_qhead.len == 0) { - var p; - p = zip_qhead; - zip_qhead = zip_qhead.next; - zip_reuse_queue(p); - } - } - - if (n == buff_size) - return n; - - if (zip_outoff < zip_outcnt) { - i = buff_size - n; - if (i > zip_outcnt - zip_outoff) - i = zip_outcnt - zip_outoff; - // System.arraycopy(outbuf, outoff, buff, off + n, i); - for (j = 0; j < i; j++) - buff[off + n + j] = zip_outbuf[zip_outoff + j]; - zip_outoff += i; - n += i; - if (zip_outcnt == zip_outoff) - zip_outcnt = zip_outoff = 0; - } - return n; - }; - - /* ========================================================================== - * Allocate the match buffer, initialize the various tables and save the - * location of the internal file attribute (ascii/binary) and method - * (DEFLATE/STORE). - */ - var zip_ct_init = function () { - var n; // iterates over tree elements - var bits; // bit counter - var length; // length value - var code; // code value - var dist; // distance index - - if (zip_static_dtree[0].dl != 0) return; // ct_init already called - - zip_l_desc.dyn_tree = zip_dyn_ltree; - zip_l_desc.static_tree = zip_static_ltree; - zip_l_desc.extra_bits = zip_extra_lbits; - zip_l_desc.extra_base = zip_LITERALS + 1; - zip_l_desc.elems = zip_L_CODES; - zip_l_desc.max_length = zip_MAX_BITS; - zip_l_desc.max_code = 0; - - zip_d_desc.dyn_tree = zip_dyn_dtree; - zip_d_desc.static_tree = zip_static_dtree; - zip_d_desc.extra_bits = zip_extra_dbits; - zip_d_desc.extra_base = 0; - zip_d_desc.elems = zip_D_CODES; - zip_d_desc.max_length = zip_MAX_BITS; - zip_d_desc.max_code = 0; - - zip_bl_desc.dyn_tree = zip_bl_tree; - zip_bl_desc.static_tree = null; - zip_bl_desc.extra_bits = zip_extra_blbits; - zip_bl_desc.extra_base = 0; - zip_bl_desc.elems = zip_BL_CODES; - zip_bl_desc.max_length = zip_MAX_BL_BITS; - zip_bl_desc.max_code = 0; - - // Initialize the mapping length (0..255) -> length code (0..28) - length = 0; - for (code = 0; code < zip_LENGTH_CODES - 1; code++) { - zip_base_length[code] = length; - for (n = 0; n < (1 << zip_extra_lbits[code]); n++) - zip_length_code[length++] = code; - } - /* Note that the length 255 (match length 258) can be represented - * in two different ways: code 284 + 5 bits or code 285, so we - * overwrite length_code[255] to use the best encoding: - */ - zip_length_code[length - 1] = code; - - /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ - dist = 0; - for (code = 0; code < 16; code++) { - zip_base_dist[code] = dist; - for (n = 0; n < (1 << zip_extra_dbits[code]); n++) { - zip_dist_code[dist++] = code; - } - } - dist >>= 7; // from now on, all distances are divided by 128 - for (; code < zip_D_CODES; code++) { - zip_base_dist[code] = dist << 7; - for (n = 0; n < (1 << (zip_extra_dbits[code] - 7)); n++) - zip_dist_code[256 + dist++] = code; - } - // Construct the codes of the static literal tree - for (bits = 0; bits <= zip_MAX_BITS; bits++) - zip_bl_count[bits] = 0; - n = 0; - while (n <= 143) { - zip_static_ltree[n++].dl = 8; - zip_bl_count[8]++; - } - while (n <= 255) { - zip_static_ltree[n++].dl = 9; - zip_bl_count[9]++; - } - while (n <= 279) { - zip_static_ltree[n++].dl = 7; - zip_bl_count[7]++; - } - while (n <= 287) { - zip_static_ltree[n++].dl = 8; - zip_bl_count[8]++; - } - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - zip_gen_codes(zip_static_ltree, zip_L_CODES + 1); - - /* The static distance tree is trivial: */ - for (n = 0; n < zip_D_CODES; n++) { - zip_static_dtree[n].dl = 5; - zip_static_dtree[n].fc = zip_bi_reverse(n, 5); - } - - // Initialize the first block of the first file: - zip_init_block(); - }; - - /* ========================================================================== - * Initialize a new block. - */ - var zip_init_block = function () { - var n; // iterates over tree elements - - // Initialize the trees. - for (n = 0; n < zip_L_CODES; n++) zip_dyn_ltree[n].fc = 0; - for (n = 0; n < zip_D_CODES; n++) zip_dyn_dtree[n].fc = 0; - for (n = 0; n < zip_BL_CODES; n++) zip_bl_tree[n].fc = 0; - - zip_dyn_ltree[zip_END_BLOCK].fc = 1; - zip_opt_len = zip_static_len = 0; - zip_last_lit = zip_last_dist = zip_last_flags = 0; - zip_flags = 0; - zip_flag_bit = 1; - }; - - /* ========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ - var zip_pqdownheap = function (tree, // the tree to restore - k) { // node to move down - var v = zip_heap[k]; - var j = k << 1; // left son of k - - while (j <= zip_heap_len) { - // Set j to the smallest of the two sons: - if (j < zip_heap_len && - zip_SMALLER(tree, zip_heap[j + 1], zip_heap[j])) - j++; - - // Exit if v is smaller than both sons - if (zip_SMALLER(tree, v, zip_heap[j])) - break; - - // Exchange v with the smallest son - zip_heap[k] = zip_heap[j]; - k = j; - - // And continue down the tree, setting j to the left son of k - j <<= 1; - } - zip_heap[k] = v; - }; - - /* ========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. - */ - var zip_gen_bitlen = function (desc) { // the tree descriptor - var tree = desc.dyn_tree; - var extra = desc.extra_bits; - var base = desc.extra_base; - var max_code = desc.max_code; - var max_length = desc.max_length; - var stree = desc.static_tree; - var h; // heap index - var n, m; // iterate over the tree elements - var bits; // bit length - var xbits; // extra bits - var f; // frequency - var overflow = 0; // number of elements with bit length too large - - for (bits = 0; bits <= zip_MAX_BITS; bits++) - zip_bl_count[bits] = 0; - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[zip_heap[zip_heap_max]].dl = 0; // root of the heap - - for (h = zip_heap_max + 1; h < zip_HEAP_SIZE; h++) { - n = zip_heap[h]; - bits = tree[tree[n].dl].dl + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n].dl = bits; - // We overwrite tree[n].dl which is no longer needed - - if (n > max_code) - continue; // not a leaf node - - zip_bl_count[bits]++; - xbits = 0; - if (n >= base) - xbits = extra[n - base]; - f = tree[n].fc; - zip_opt_len += f * (bits + xbits); - if (stree != null) - zip_static_len += f * (stree[n].dl + xbits); - } - if (overflow == 0) - return; - - // This happens for example on obj2 and pic of the Calgary corpus - - // Find the first bit length which could increase: - do { - bits = max_length - 1; - while (zip_bl_count[bits] == 0) - bits--; - zip_bl_count[bits]--; // move one leaf down the tree - zip_bl_count[bits + 1] += 2; // move one overflow item as its brother - zip_bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits != 0; bits--) { - n = zip_bl_count[bits]; - while (n != 0) { - m = zip_heap[--h]; - if (m > max_code) - continue; - if (tree[m].dl != bits) { - zip_opt_len += (bits - tree[m].dl) * tree[m].fc; - tree[m].fc = bits; - } - n--; - } - } - }; - - /* ========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ - var zip_gen_codes = function (tree, // the tree to decorate - max_code) { // largest code with non zero frequency - var next_code = new Array(zip_MAX_BITS + 1); // next code value for each bit length - var code = 0; // running code value - var bits; // bit index - var n; // code index - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= zip_MAX_BITS; bits++) { - code = ((code + zip_bl_count[bits - 1]) << 1); - next_code[bits] = code; - } - - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - for (n = 0; n <= max_code; n++) { - var len = tree[n].dl; - if (len == 0) - continue; - // Now reverse the bits - tree[n].fc = zip_bi_reverse(next_code[len]++, len); - } - }; - - /* ========================================================================== - * Construct one Huffman tree and assigns the code bit strings and lengths. - * Update the total bit length for the current block. - * IN assertion: the field freq is set for all tree elements. - * OUT assertions: the fields len and code are set to the optimal bit length - * and corresponding code. The length opt_len is updated; static_len is - * also updated if stree is not null. The field max_code is set. - */ - var zip_build_tree = function (desc) { // the tree descriptor - var tree = desc.dyn_tree; - var stree = desc.static_tree; - var elems = desc.elems; - var n, m; // iterate over heap elements - var max_code = -1; // largest code with non zero frequency - var node = elems; // next internal node of the tree - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. - * heap[0] is not used. - */ - zip_heap_len = 0; - zip_heap_max = zip_HEAP_SIZE; - - for (n = 0; n < elems; n++) { - if (tree[n].fc != 0) { - zip_heap[++zip_heap_len] = max_code = n; - zip_depth[n] = 0; - } else - tree[n].dl = 0; - } - - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (zip_heap_len < 2) { - var xnew = zip_heap[++zip_heap_len] = (max_code < 2 ? ++max_code : 0); - tree[xnew].fc = 1; - zip_depth[xnew] = 0; - zip_opt_len--; - if (stree != null) - zip_static_len -= stree[xnew].dl; - // new is 0 or 1 so it does not have extra bits - } - desc.max_code = max_code; - - /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = zip_heap_len >> 1; n >= 1; n--) - zip_pqdownheap(tree, n); - - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - do { - n = zip_heap[zip_SMALLEST]; - zip_heap[zip_SMALLEST] = zip_heap[zip_heap_len--]; - zip_pqdownheap(tree, zip_SMALLEST); - - m = zip_heap[zip_SMALLEST]; // m = node of next least frequency - - // keep the nodes sorted by frequency - zip_heap[--zip_heap_max] = n; - zip_heap[--zip_heap_max] = m; - - // Create a new node father of n and m - tree[node].fc = tree[n].fc + tree[m].fc; - if (zip_depth[n] > zip_depth[m] + 1) - zip_depth[node] = zip_depth[n]; - else - zip_depth[node] = zip_depth[m] + 1; - tree[n].dl = tree[m].dl = node; - - // and insert the new node in the heap - zip_heap[zip_SMALLEST] = node++; - zip_pqdownheap(tree, zip_SMALLEST); - - } while (zip_heap_len >= 2); - - zip_heap[--zip_heap_max] = zip_heap[zip_SMALLEST]; - - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - zip_gen_bitlen(desc); - - // The field len is now set, we can generate the bit codes - zip_gen_codes(tree, max_code); - }; - - /* ========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. Updates opt_len to take into account the repeat - * counts. (The contribution of the bit length codes will be added later - * during the construction of bl_tree.) - */ - var zip_scan_tree = function (tree,// the tree to be scanned - max_code) { // and its largest code of non zero frequency - var n; // iterates over all tree elements - var prevlen = -1; // last emitted length - var curlen; // length of current code - var nextlen = tree[0].dl; // length of next code - var count = 0; // repeat count of the current code - var max_count = 7; // max repeat count - var min_count = 4; // min repeat count - - if (nextlen == 0) { - max_count = 138; - min_count = 3; - } - tree[max_code + 1].dl = 0xffff; // guard - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[n + 1].dl; - if (++count < max_count && curlen == nextlen) - continue; - else if (count < min_count) - zip_bl_tree[curlen].fc += count; - else if (curlen != 0) { - if (curlen != prevlen) - zip_bl_tree[curlen].fc++; - zip_bl_tree[zip_REP_3_6].fc++; - } else if (count <= 10) - zip_bl_tree[zip_REPZ_3_10].fc++; - else - zip_bl_tree[zip_REPZ_11_138].fc++; - count = 0; - prevlen = curlen; - if (nextlen == 0) { - max_count = 138; - min_count = 3; - } else if (curlen == nextlen) { - max_count = 6; - min_count = 3; - } else { - max_count = 7; - min_count = 4; - } - } - }; - - /* ========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. - */ - var zip_send_tree = function (tree, // the tree to be scanned - max_code) { // and its largest code of non zero frequency - var n; // iterates over all tree elements - var prevlen = -1; // last emitted length - var curlen; // length of current code - var nextlen = tree[0].dl; // length of next code - var count = 0; // repeat count of the current code - var max_count = 7; // max repeat count - var min_count = 4; // min repeat count - - /* tree[max_code+1].dl = -1; */ - /* guard already set */ - if (nextlen == 0) { - max_count = 138; - min_count = 3; - } - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[n + 1].dl; - if (++count < max_count && curlen == nextlen) { - continue; - } else if (count < min_count) { - do { - zip_SEND_CODE(curlen, zip_bl_tree); - } while (--count != 0); - } else if (curlen != 0) { - if (curlen != prevlen) { - zip_SEND_CODE(curlen, zip_bl_tree); - count--; - } - // Assert(count >= 3 && count <= 6, " 3_6?"); - zip_SEND_CODE(zip_REP_3_6, zip_bl_tree); - zip_send_bits(count - 3, 2); - } else if (count <= 10) { - zip_SEND_CODE(zip_REPZ_3_10, zip_bl_tree); - zip_send_bits(count - 3, 3); - } else { - zip_SEND_CODE(zip_REPZ_11_138, zip_bl_tree); - zip_send_bits(count - 11, 7); - } - count = 0; - prevlen = curlen; - if (nextlen == 0) { - max_count = 138; - min_count = 3; - } else if (curlen == nextlen) { - max_count = 6; - min_count = 3; - } else { - max_count = 7; - min_count = 4; - } - } - }; - - /* ========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ - var zip_build_bl_tree = function () { - var max_blindex; // index of last bit length code of non zero freq - - // Determine the bit length frequencies for literal and distance trees - zip_scan_tree(zip_dyn_ltree, zip_l_desc.max_code); - zip_scan_tree(zip_dyn_dtree, zip_d_desc.max_code); - - // Build the bit length tree: - zip_build_tree(zip_bl_desc); - /* opt_len now includes the length of the tree representations, except - * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. - */ - - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = zip_BL_CODES - 1; max_blindex >= 3; max_blindex--) { - if (zip_bl_tree[zip_bl_order[max_blindex]].dl != 0) break; - } - /* Update opt_len to include the bit length tree and counts */ - zip_opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; - return max_blindex; - }; - - /* ========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ - var zip_send_all_trees = function (lcodes, dcodes, blcodes) { // number of codes for each tree - var rank; // index in bl_order - zip_send_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt - zip_send_bits(dcodes - 1, 5); - zip_send_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt - for (rank = 0; rank < blcodes; rank++) { - zip_send_bits(zip_bl_tree[zip_bl_order[rank]].dl, 3); - } - - // send the literal tree - zip_send_tree(zip_dyn_ltree, lcodes - 1); - - // send the distance tree - zip_send_tree(zip_dyn_dtree, dcodes - 1); - }; - - /* ========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. - */ - var zip_flush_block = function (eof) { // true if this is the last block for a file - var opt_lenb, static_lenb; // opt_len and static_len in bytes - var max_blindex; // index of last bit length code of non zero freq - var stored_len; // length of input block - - stored_len = zip_strstart - zip_block_start; - zip_flag_buf[zip_last_flags] = zip_flags; // Save the flags for the last 8 items - - // Construct the literal and distance trees - zip_build_tree(zip_l_desc); - zip_build_tree(zip_d_desc); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = zip_build_bl_tree(); - - // Determine the best encoding. Compute first the block length in bytes - opt_lenb = (zip_opt_len + 3 + 7) >> 3; - static_lenb = (zip_static_len + 3 + 7) >> 3; - if (static_lenb <= opt_lenb) - opt_lenb = static_lenb; - if (stored_len + 4 <= opt_lenb // 4: two words for the lengths - && zip_block_start >= 0) { - var i; - - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - zip_send_bits((zip_STORED_BLOCK << 1) + eof, 3); - /* send block type */ - zip_bi_windup(); - /* align on byte boundary */ - zip_put_short(stored_len); - zip_put_short(~stored_len); - - // copy block - for (i = 0; i < stored_len; i++) - zip_put_byte(zip_window[zip_block_start + i]); - - } else if (static_lenb == opt_lenb) { - zip_send_bits((zip_STATIC_TREES << 1) + eof, 3); - zip_compress_block(zip_static_ltree, zip_static_dtree); - } else { - zip_send_bits((zip_DYN_TREES << 1) + eof, 3); - zip_send_all_trees(zip_l_desc.max_code + 1, - zip_d_desc.max_code + 1, - max_blindex + 1); - zip_compress_block(zip_dyn_ltree, zip_dyn_dtree); - } - - zip_init_block(); - - if (eof != 0) - zip_bi_windup(); - }; - - /* ========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ - var zip_ct_tally = function (dist, // distance of matched string - lc) { // match length-MIN_MATCH or unmatched char (if dist==0) - zip_l_buf[zip_last_lit++] = lc; - if (dist == 0) { - // lc is the unmatched char - zip_dyn_ltree[lc].fc++; - } else { - // Here, lc is the match length - MIN_MATCH - dist--; // dist = match distance - 1 - zip_dyn_ltree[zip_length_code[lc] + zip_LITERALS + 1].fc++; - zip_dyn_dtree[zip_D_CODE(dist)].fc++; - - zip_d_buf[zip_last_dist++] = dist; - zip_flags |= zip_flag_bit; - } - zip_flag_bit <<= 1; - - // Output the flags if they fill a byte - if ((zip_last_lit & 7) == 0) { - zip_flag_buf[zip_last_flags++] = zip_flags; - zip_flags = 0; - zip_flag_bit = 1; - } - // Try to guess if it is profitable to stop the current block here - if (zip_compr_level > 2 && (zip_last_lit & 0xfff) == 0) { - // Compute an upper bound for the compressed length - var out_length = zip_last_lit * 8; - var in_length = zip_strstart - zip_block_start; - var dcode; - - for (dcode = 0; dcode < zip_D_CODES; dcode++) { - out_length += zip_dyn_dtree[dcode].fc * (5 + zip_extra_dbits[dcode]); - } - out_length >>= 3; - if (zip_last_dist < parseInt(zip_last_lit / 2) && - out_length < parseInt(in_length / 2)) - return true; - } - return (zip_last_lit == LIT_BUFSIZE - 1 || - zip_last_dist == zip_DIST_BUFSIZE); - /* We avoid equality with LIT_BUFSIZE because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ - }; - - /* ========================================================================== - * Send the block data compressed using the given Huffman trees - */ - var zip_compress_block = function (ltree, // literal tree - dtree) { // distance tree - var dist; // distance of matched string - var lc; // match length or unmatched char (if dist == 0) - var lx = 0; // running index in l_buf - var dx = 0; // running index in d_buf - var fx = 0; // running index in flag_buf - var flag = 0; // current flags - var code; // the code to send - var extra; // number of extra bits to send - - if (zip_last_lit != 0) do { - if ((lx & 7) == 0) - flag = zip_flag_buf[fx++]; - lc = zip_l_buf[lx++] & 0xff; - if ((flag & 1) == 0) { - zip_SEND_CODE(lc, ltree); - /* send a literal byte */ - } else { - // Here, lc is the match length - MIN_MATCH - code = zip_length_code[lc]; - zip_SEND_CODE(code + zip_LITERALS + 1, ltree); // send the length code - extra = zip_extra_lbits[code]; - if (extra != 0) { - lc -= zip_base_length[code]; - zip_send_bits(lc, extra); // send the extra length bits - } - dist = zip_d_buf[dx++]; - // Here, dist is the match distance - 1 - code = zip_D_CODE(dist); - zip_SEND_CODE(code, dtree); // send the distance code - extra = zip_extra_dbits[code]; - if (extra != 0) { - dist -= zip_base_dist[code]; - zip_send_bits(dist, extra); // send the extra distance bits - } - } // literal or match pair ? - flag >>= 1; - } while (lx < zip_last_lit); - - zip_SEND_CODE(zip_END_BLOCK, ltree); - }; - - /* ========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ - var zip_Buf_size = 16; // bit size of bi_buf - var zip_send_bits = function (value, // value to send - length) { // number of bits - /* If not enough room in bi_buf, use (valid) bits from bi_buf and - * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid)) - * unused bits in value. - */ - if (zip_bi_valid > zip_Buf_size - length) { - zip_bi_buf |= (value << zip_bi_valid); - zip_put_short(zip_bi_buf); - zip_bi_buf = (value >> (zip_Buf_size - zip_bi_valid)); - zip_bi_valid += length - zip_Buf_size; - } else { - zip_bi_buf |= value << zip_bi_valid; - zip_bi_valid += length; - } - }; - - /* ========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ - var zip_bi_reverse = function (code, // the value to invert - len) { // its bit length - var res = 0; - do { - res |= code & 1; - code >>= 1; - res <<= 1; - } while (--len > 0); - return res >> 1; - }; - - /* ========================================================================== - * Write out any remaining bits in an incomplete byte. - */ - var zip_bi_windup = function () { - if (zip_bi_valid > 8) { - zip_put_short(zip_bi_buf); - } else if (zip_bi_valid > 0) { - zip_put_byte(zip_bi_buf); - } - zip_bi_buf = 0; - zip_bi_valid = 0; - }; - - var zip_qoutbuf = function () { - if (zip_outcnt != 0) { - var q, i; - q = zip_new_queue(); - if (zip_qhead == null) - zip_qhead = zip_qtail = q; - else - zip_qtail = zip_qtail.next = q; - q.len = zip_outcnt - zip_outoff; - for (i = 0; i < q.len; i++) - q.ptr[i] = zip_outbuf[zip_outoff + i]; - zip_outcnt = zip_outoff = 0; - } - }; - - function deflate(buffData, level) { - zip_deflate_data = buffData; - zip_deflate_pos = 0; - zip_deflate_start(level); - - var buff = new Array(1024), - pages = [], - totalSize = 0, - i; - - for (i = 0; i < 1024; i++) buff[i] = 0; - while ((i = zip_deflate_internal(buff, 0, buff.length)) > 0) { - var buf = new Buffer(buff.slice(0, i)); - pages.push(buf); - totalSize += buf.length; - } - - if (pages.length == 1) { - return pages[0]; - } - - var result = new Buffer(totalSize), - index = 0; - - for (i = 0; i < pages.length; i++) { - pages[i].copy(result, index); - index = index + pages[i].length - } - - return result; - } - - return { - deflate: function () { - return deflate(inbuf, 8); - } - } -} - -module.exports = function (/*Buffer*/inbuf) { - - var zlib = require("zlib"); - - return { - deflate: function () { - return new JSDeflater(inbuf).deflate(); - }, - - deflateAsync: function (/*Function*/callback) { - var tmp = zlib.createDeflateRaw({chunkSize:(parseInt(inbuf.length / 1024) + 1)*1024}), - parts = [], total = 0; - tmp.on('data', function(data) { - parts.push(data); - total += data.length; - }); - tmp.on('end', function() { - var buf = new Buffer(total), written = 0; - buf.fill(0); - - for (var i = 0; i < parts.length; i++) { - var part = parts[i]; - part.copy(buf, written); - written += part.length; - } - callback && callback(buf); - }); - tmp.end(inbuf); - } - } -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/index.js deleted file mode 100644 index ddcbba60..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/index.js +++ /dev/null @@ -1,2 +0,0 @@ -exports.Deflater = require("./deflater"); -exports.Inflater = require("./inflater"); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/inflater.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/inflater.js deleted file mode 100644 index 59536c90..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/inflater.js +++ /dev/null @@ -1,448 +0,0 @@ -var Buffer = require("buffer").Buffer; - -function JSInflater(/*Buffer*/input) { - - var WSIZE = 0x8000, - slide = new Buffer(0x10000), - windowPos = 0, - fixedTableList = null, - fixedTableDist, - fixedLookup, - bitBuf = 0, - bitLen = 0, - method = -1, - eof = false, - copyLen = 0, - copyDist = 0, - tblList, tblDist, bitList, bitdist, - - inputPosition = 0, - - MASK_BITS = [0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff], - LENS = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], - LEXT = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99], - DISTS = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577], - DEXT = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], - BITORDER = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; - - function HuffTable(clen, cnum, cval, blist, elist, lookupm) { - - this.status = 0; - this.root = null; - this.maxbit = 0; - - var el, f, tail, - offsets = [], - countTbl = [], - sTbl = [], - values = [], - tentry = {extra: 0, bitcnt: 0, lbase: 0, next: null}; - - tail = this.root = null; - for(var i = 0; i < 0x11; i++) { countTbl[i] = 0; sTbl[i] = 0; offsets[i] = 0; } - for(i = 0; i < 0x120; i++) values[i] = 0; - - el = cnum > 256 ? clen[256] : 16; - - var pidx = -1; - while (++pidx < cnum) countTbl[clen[pidx]]++; - - if(countTbl[0] == cnum) return; - - for(var j = 1; j <= 16; j++) if(countTbl[j] != 0) break; - var bitLen = j; - for(i = 16; i != 0; i--) if(countTbl[i] != 0) break; - var maxLen = i; - - lookupm < j && (lookupm = j); - - var dCodes = 1 << j; - for(; j < i; j++, dCodes <<= 1) - if((dCodes -= countTbl[j]) < 0) { - this.status = 2; - this.maxbit = lookupm; - return; - } - - if((dCodes -= countTbl[i]) < 0) { - this.status = 2; - this.maxbit = lookupm; - return; - } - - countTbl[i] += dCodes; - offsets[1] = j = 0; - pidx = 1; - var xp = 2; - while(--i > 0) offsets[xp++] = (j += countTbl[pidx++]); - pidx = 0; - i = 0; - do { - (j = clen[pidx++]) && (values[offsets[j]++] = i); - } while(++i < cnum); - cnum = offsets[maxLen]; - offsets[0] = i = 0; - pidx = 0; - - var level = -1, - w = sTbl[0] = 0, - cnode = null, - tblCnt = 0, - tblStack = []; - - for(; bitLen <= maxLen; bitLen++) { - var kccnt = countTbl[bitLen]; - while(kccnt-- > 0) { - while(bitLen > w + sTbl[1 + level]) { - w += sTbl[1 + level]; - level++; - tblCnt = (tblCnt = maxLen - w) > lookupm ? lookupm : tblCnt; - if((f = 1 << (j = bitLen - w)) > kccnt + 1) { - f -= kccnt + 1; - xp = bitLen; - while(++j < tblCnt) { - if((f <<= 1) <= countTbl[++xp]) break; - f -= countTbl[xp]; - } - } - if(w + j > el && w < el) j = el - w; - tblCnt = 1 << j; - sTbl[1 + level] = j; - cnode = []; - while (cnode.length < tblCnt) cnode.push({extra: 0, bitcnt: 0, lbase: 0, next: null}); - if (tail == null) { - tail = this.root = {next:null, list:null}; - } else { - tail = tail.next = {next:null, list:null} - } - tail.next = null; - tail.list = cnode; - - tblStack[level] = cnode; - - if(level > 0) { - offsets[level] = i; - tentry.bitcnt = sTbl[level]; - tentry.extra = 16 + j; - tentry.next = cnode; - j = (i & ((1 << w) - 1)) >> (w - sTbl[level]); - - tblStack[level-1][j].extra = tentry.extra; - tblStack[level-1][j].bitcnt = tentry.bitcnt; - tblStack[level-1][j].lbase = tentry.lbase; - tblStack[level-1][j].next = tentry.next; - } - } - tentry.bitcnt = bitLen - w; - if(pidx >= cnum) - tentry.extra = 99; - else if(values[pidx] < cval) { - tentry.extra = (values[pidx] < 256 ? 16 : 15); - tentry.lbase = values[pidx++]; - } else { - tentry.extra = elist[values[pidx] - cval]; - tentry.lbase = blist[values[pidx++] - cval]; - } - - f = 1 << (bitLen - w); - for(j = i >> w; j < tblCnt; j += f) { - cnode[j].extra = tentry.extra; - cnode[j].bitcnt = tentry.bitcnt; - cnode[j].lbase = tentry.lbase; - cnode[j].next = tentry.next; - } - for(j = 1 << (bitLen - 1); (i & j) != 0; j >>= 1) - i ^= j; - i ^= j; - while((i & ((1 << w) - 1)) != offsets[level]) { - w -= sTbl[level]; - level--; - } - } - } - - this.maxbit = sTbl[1]; - this.status = ((dCodes != 0 && maxLen != 1) ? 1 : 0); - } - - function addBits(n) { - while(bitLen < n) { - bitBuf |= input[inputPosition++] << bitLen; - bitLen += 8; - } - return bitBuf; - } - - function cutBits(n) { - bitLen -= n; - return bitBuf >>= n; - } - - function maskBits(n) { - while(bitLen < n) { - bitBuf |= input[inputPosition++] << bitLen; - bitLen += 8; - } - var res = bitBuf & MASK_BITS[n]; - bitBuf >>= n; - bitLen -= n; - return res; - } - - function codes(buff, off, size) { - var e, t; - if(size == 0) return 0; - - var n = 0; - for(;;) { - t = tblList.list[addBits(bitList) & MASK_BITS[bitList]]; - e = t.extra; - while(e > 16) { - if(e == 99) return -1; - cutBits(t.bitcnt); - e -= 16; - t = t.next[addBits(e) & MASK_BITS[e]]; - e = t.extra; - } - cutBits(t.bitcnt); - if(e == 16) { - windowPos &= WSIZE - 1; - buff[off + n++] = slide[windowPos++] = t.lbase; - if(n == size) return size; - continue; - } - if(e == 15) break; - - copyLen = t.lbase + maskBits(e); - t = tblDist.list[addBits(bitdist) & MASK_BITS[bitdist]]; - e = t.extra; - - while(e > 16) { - if(e == 99) return -1; - cutBits(t.bitcnt); - e -= 16; - t = t.next[addBits(e) & MASK_BITS[e]]; - e = t.extra - } - cutBits(t.bitcnt); - copyDist = windowPos - t.lbase - maskBits(e); - - while(copyLen > 0 && n < size) { - copyLen--; - copyDist &= WSIZE - 1; - windowPos &= WSIZE - 1; - buff[off + n++] = slide[windowPos++] = slide[copyDist++]; - } - - if(n == size) return size; - } - - method = -1; // done - return n; - } - - function stored(buff, off, size) { - cutBits(bitLen & 7); - var n = maskBits(0x10); - if(n != ((~maskBits(0x10)) & 0xffff)) return -1; - copyLen = n; - - n = 0; - while(copyLen > 0 && n < size) { - copyLen--; - windowPos &= WSIZE - 1; - buff[off + n++] = slide[windowPos++] = maskBits(8); - } - - if(copyLen == 0) method = -1; - return n; - } - - function fixed(buff, off, size) { - var fixed_bd = 0; - if(fixedTableList == null) { - var lengths = []; - - for(var symbol = 0; symbol < 144; symbol++) lengths[symbol] = 8; - for(; symbol < 256; symbol++) lengths[symbol] = 9; - for(; symbol < 280; symbol++) lengths[symbol] = 7; - for(; symbol < 288; symbol++) lengths[symbol] = 8; - - fixedLookup = 7; - - var htbl = new HuffTable(lengths, 288, 257, LENS, LEXT, fixedLookup); - - if(htbl.status != 0) return -1; - - fixedTableList = htbl.root; - fixedLookup = htbl.maxbit; - - for(symbol = 0; symbol < 30; symbol++) lengths[symbol] = 5; - fixed_bd = 5; - - htbl = new HuffTable(lengths, 30, 0, DISTS, DEXT, fixed_bd); - if(htbl.status > 1) { - fixedTableList = null; - return -1; - } - fixedTableDist = htbl.root; - fixed_bd = htbl.maxbit; - } - - tblList = fixedTableList; - tblDist = fixedTableDist; - bitList = fixedLookup; - bitdist = fixed_bd; - return codes(buff, off, size); - } - - function dynamic(buff, off, size) { - var ll = new Array(0x023C); - - for (var m = 0; m < 0x023C; m++) ll[m] = 0; - - var llencnt = 257 + maskBits(5), - dcodescnt = 1 + maskBits(5), - bitlencnt = 4 + maskBits(4); - - if(llencnt > 286 || dcodescnt > 30) return -1; - - for(var j = 0; j < bitlencnt; j++) ll[BITORDER[j]] = maskBits(3); - for(; j < 19; j++) ll[BITORDER[j]] = 0; - - // build decoding table for trees--single level, 7 bit lookup - bitList = 7; - var hufTable = new HuffTable(ll, 19, 19, null, null, bitList); - if(hufTable.status != 0) - return -1; // incomplete code set - - tblList = hufTable.root; - bitList = hufTable.maxbit; - var lencnt = llencnt + dcodescnt, - i = 0, - lastLen = 0; - while(i < lencnt) { - var hufLcode = tblList.list[addBits(bitList) & MASK_BITS[bitList]]; - j = hufLcode.bitcnt; - cutBits(j); - j = hufLcode.lbase; - if(j < 16) - ll[i++] = lastLen = j; - else if(j == 16) { - j = 3 + maskBits(2); - if(i + j > lencnt) return -1; - while(j-- > 0) ll[i++] = lastLen; - } else if(j == 17) { - j = 3 + maskBits(3); - if(i + j > lencnt) return -1; - while(j-- > 0) ll[i++] = 0; - lastLen = 0; - } else { - j = 11 + maskBits(7); - if(i + j > lencnt) return -1; - while(j-- > 0) ll[i++] = 0; - lastLen = 0; - } - } - bitList = 9; - hufTable = new HuffTable(ll, llencnt, 257, LENS, LEXT, bitList); - bitList == 0 && (hufTable.status = 1); - - if (hufTable.status != 0) return -1; - - tblList = hufTable.root; - bitList = hufTable.maxbit; - - for(i = 0; i < dcodescnt; i++) ll[i] = ll[i + llencnt]; - bitdist = 6; - hufTable = new HuffTable(ll, dcodescnt, 0, DISTS, DEXT, bitdist); - tblDist = hufTable.root; - bitdist = hufTable.maxbit; - - if((bitdist == 0 && llencnt > 257) || hufTable.status != 0) return -1; - - return codes(buff, off, size); - } - - return { - inflate : function(/*Buffer*/outputBuffer) { - tblList = null; - - var size = outputBuffer.length, - offset = 0, i; - - while(offset < size) { - if(eof && method == -1) return; - if(copyLen > 0) { - if(method != 0) { - while(copyLen > 0 && offset < size) { - copyLen--; - copyDist &= WSIZE - 1; - windowPos &= WSIZE - 1; - outputBuffer[offset++] = (slide[windowPos++] = slide[copyDist++]); - } - } else { - while(copyLen > 0 && offset < size) { - copyLen--; - windowPos &= WSIZE - 1; - outputBuffer[offset++] = (slide[windowPos++] = maskBits(8)); - } - copyLen == 0 && (method = -1); // done - } - if (offset == size) return; - } - - if(method == -1) { - if(eof) break; - eof = maskBits(1) != 0; - method = maskBits(2); - tblList = null; - copyLen = 0; - } - switch(method) { - case 0: i = stored(outputBuffer, offset, size - offset); break; - case 1: i = tblList != null ? codes(outputBuffer, offset, size - offset) : fixed(outputBuffer, offset, size - offset); break; - case 2: i = tblList != null ? codes(outputBuffer, offset, size - offset) : dynamic(outputBuffer, offset, size - offset); break; - default: i = -1; break; - } - - if(i == -1) return; - offset += i; - } - } - }; -} - -module.exports = function(/*Buffer*/inbuf) { - var zlib = require("zlib"); - return { - inflateAsync : function(/*Function*/callback) { - var tmp = zlib.createInflateRaw(), - parts = [], total = 0; - tmp.on('data', function(data) { - parts.push(data); - total += data.length; - }); - tmp.on('end', function() { - var buf = new Buffer(total), written = 0; - buf.fill(0); - - for (var i = 0; i < parts.length; i++) { - var part = parts[i]; - part.copy(buf, written); - written += part.length; - } - callback && callback(buf); - }); - tmp.end(inbuf) - }, - - inflate : function(/*Buffer*/outputBuffer) { - var x = { - x: new JSInflater(inbuf) - }; - x.x.inflate(outputBuffer); - delete(x.x); - } - } -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/package.json deleted file mode 100644 index 807d3cd1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "adm-zip", - "version": "0.4.4", - "description": "A Javascript implementation of zip for nodejs. Allows user to create or extract zip files both in memory or to/from disk", - "keywords": [ - "zip", - "methods", - "archive", - "unzip" - ], - "homepage": "http://github.com/cthackers/adm-zip", - "author": { - "name": "Nasca Iacob", - "email": "sy@another-d-mention.ro", - "url": "https://github.com/cthackers" - }, - "bugs": { - "url": "https://github.com/cthackers/adm-zip/issues", - "email": "sy@another-d-mention.ro" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://raw.github.com/cthackers/adm-zip/master/MIT-LICENSE.txt" - } - ], - "main": "adm-zip.js", - "repository": { - "type": "git", - "url": "https://github.com/cthackers/adm-zip.git" - }, - "engines": { - "node": ">=0.3.0" - }, - "readme": "# ADM-ZIP for NodeJS\r\n\r\nADM-ZIP is a pure JavaScript implementation for zip data compression for [NodeJS](http://nodejs.org/). \r\n\r\n# Installation\r\n\r\nWith [npm](http://npmjs.org) do:\r\n\r\n $ npm install adm-zip\r\n\t\r\n## What is it good for?\r\nThe library allows you to:\r\n\r\n* decompress zip files directly to disk or in memory buffers\r\n* compress files and store them to disk in .zip format or in compressed buffers\r\n* update content of/add new/delete files from an existing .zip\r\n\r\n# Dependencies\r\nThere are no other nodeJS libraries that ADM-ZIP is dependent of\r\n\r\n# Examples\r\n\r\n## Basic usage\r\n```javascript\r\n\r\n\tvar AdmZip = require('adm-zip');\r\n\r\n\t// reading archives\r\n\tvar zip = new AdmZip(\"./my_file.zip\");\r\n\tvar zipEntries = zip.getEntries(); // an array of ZipEntry records\r\n\r\n\tzipEntries.forEach(function(zipEntry) {\r\n\t console.log(zipEntry.toString()); // outputs zip entries information\r\n\t\tif (zipEntry.entryName == \"my_file.txt\") {\r\n\t\t console.log(zipEntry.data.toString('utf8')); \r\n\t\t}\r\n\t});\r\n\t// outputs the content of some_folder/my_file.txt\r\n\tconsole.log(zip.readAsText(\"some_folder/my_file.txt\")); \r\n\t// extracts the specified file to the specified location\r\n\tzip.extractEntryTo(/*entry name*/\"some_folder/my_file.txt\", /*target path*/\"/home/me/tempfolder\", /*maintainEntryPath*/false, /*overwrite*/true);\r\n\t// extracts everything\r\n\tzip.extractAllTo(/*target path*/\"/home/me/zipcontent/\", /*overwrite*/true);\r\n\t\r\n\t\r\n\t// creating archives\r\n\tvar zip = new AdmZip();\r\n\t\r\n\t// add file directly\r\n\tzip.addFile(\"test.txt\", new Buffer(\"inner content of the file\"), \"entry comment goes here\");\r\n\t// add local file\r\n\tzip.addLocalFile(\"/home/me/some_picture.png\");\r\n\t// get everything as a buffer\r\n\tvar willSendthis = zip.toBuffer();\r\n\t// or write everything to disk\r\n\tzip.writeZip(/*target file name*/\"/home/me/files.zip\");\r\n\t\r\n\t\r\n\t// ... more examples in the wiki\r\n```\r\n\r\nFor more detailed information please check out the [wiki](https://github.com/cthackers/adm-zip/wiki).\r\n\r\n[![build status](https://secure.travis-ci.org/cthackers/adm-zip.png)](http://travis-ci.org/cthackers/adm-zip)\r\n", - "readmeFilename": "README.md", - "_id": "adm-zip@0.4.4", - "dist": { - "shasum": "b493a1464b82a89ecd8c77b99faa046d8f03ded4" - }, - "_from": "adm-zip@~0.4.3", - "_resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.4.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test.zip b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test.zip deleted file mode 100644 index d57bfc07..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test.zip and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/hidden.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/hidden.txt deleted file mode 100644 index 3c3ca551..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/hidden.txt +++ /dev/null @@ -1,17 +0,0 @@ -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/hidden_readonly.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/hidden_readonly.txt deleted file mode 100644 index 3c3ca551..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/hidden_readonly.txt +++ /dev/null @@ -1,17 +0,0 @@ -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/readonly.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/readonly.txt deleted file mode 100644 index 3c3ca551..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/readonly.txt +++ /dev/null @@ -1,17 +0,0 @@ -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/somefile.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/somefile.txt deleted file mode 100644 index 3c3ca551..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/somefile.txt +++ /dev/null @@ -1,17 +0,0 @@ -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/asd/New Text Document.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/asd/New Text Document.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/blank file.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/blank file.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/fast.zip b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/fast.zip deleted file mode 100644 index f4ed17b9..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/fast.zip and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/fastest.zip b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/fastest.zip deleted file mode 100644 index f4ed17b9..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/fastest.zip and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/linux_arc.zip b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/linux_arc.zip deleted file mode 100644 index 188eccbe..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/linux_arc.zip and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/maximum.zip b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/maximum.zip deleted file mode 100644 index 86a8ec77..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/maximum.zip and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/normal.zip b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/normal.zip deleted file mode 100644 index b4602c94..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/normal.zip and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/store.zip b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/store.zip deleted file mode 100644 index e2add30d..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/store.zip and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/ultra.zip b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/ultra.zip deleted file mode 100644 index 86a8ec77..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/ultra.zip and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/index.js deleted file mode 100644 index 70acb517..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/index.js +++ /dev/null @@ -1,5 +0,0 @@ -var Attr = require("../util").FileAttr, - Zip = require("../adm-zip"), - fs = require("fs"); - -//zip.addLocalFile("./test/readonly.txt"); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/constants.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/constants.js deleted file mode 100644 index 05480541..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/constants.js +++ /dev/null @@ -1,84 +0,0 @@ -module.exports = { - /* The local file header */ - LOCHDR : 30, // LOC header size - LOCSIG : 0x04034b50, // "PK\003\004" - LOCVER : 4, // version needed to extract - LOCFLG : 6, // general purpose bit flag - LOCHOW : 8, // compression method - LOCTIM : 10, // modification time (2 bytes time, 2 bytes date) - LOCCRC : 14, // uncompressed file crc-32 value - LOCSIZ : 18, // compressed size - LOCLEN : 22, // uncompressed size - LOCNAM : 26, // filename length - LOCEXT : 28, // extra field length - - /* The Data descriptor */ - EXTSIG : 0x08074b50, // "PK\007\008" - EXTHDR : 16, // EXT header size - EXTCRC : 4, // uncompressed file crc-32 value - EXTSIZ : 8, // compressed size - EXTLEN : 12, // uncompressed size - - /* The central directory file header */ - CENHDR : 46, // CEN header size - CENSIG : 0x02014b50, // "PK\001\002" - CENVEM : 4, // version made by - CENVER : 6, // version needed to extract - CENFLG : 8, // encrypt, decrypt flags - CENHOW : 10, // compression method - CENTIM : 12, // modification time (2 bytes time, 2 bytes date) - CENCRC : 16, // uncompressed file crc-32 value - CENSIZ : 20, // compressed size - CENLEN : 24, // uncompressed size - CENNAM : 28, // filename length - CENEXT : 30, // extra field length - CENCOM : 32, // file comment length - CENDSK : 34, // volume number start - CENATT : 36, // internal file attributes - CENATX : 38, // external file attributes (host system dependent) - CENOFF : 42, // LOC header offset - - /* The entries in the end of central directory */ - ENDHDR : 22, // END header size - ENDSIG : 0x06054b50, // "PK\005\006" - ENDSUB : 8, // number of entries on this disk - ENDTOT : 10, // total number of entries - ENDSIZ : 12, // central directory size in bytes - ENDOFF : 16, // offset of first CEN header - ENDCOM : 20, // zip file comment length - - /* Compression methods */ - STORED : 0, // no compression - SHRUNK : 1, // shrunk - REDUCED1 : 2, // reduced with compression factor 1 - REDUCED2 : 3, // reduced with compression factor 2 - REDUCED3 : 4, // reduced with compression factor 3 - REDUCED4 : 5, // reduced with compression factor 4 - IMPLODED : 6, // imploded - // 7 reserved - DEFLATED : 8, // deflated - ENHANCED_DEFLATED: 9, // enhanced deflated - PKWARE : 10,// PKWare DCL imploded - // 11 reserved - BZIP2 : 12, // compressed using BZIP2 - // 13 reserved - LZMA : 14, // LZMA - // 15-17 reserved - IBM_TERSE : 18, // compressed using IBM TERSE - IBM_LZ77 : 19, //IBM LZ77 z - - /* General purpose bit flag */ - FLG_ENC : 0, // encripted file - FLG_COMP1 : 1, // compression option - FLG_COMP2 : 2, // compression option - FLG_DESC : 4, // data descriptor - FLG_ENH : 8, // enhanced deflation - FLG_STR : 16, // strong encryption - FLG_LNG : 1024, // language encoding - FLG_MSK : 4096, // mask header values - - /* Load type */ - FILE : 0, - BUFFER : 1, - NONE : 2 -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/errors.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/errors.js deleted file mode 100644 index db5d69e9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/errors.js +++ /dev/null @@ -1,35 +0,0 @@ -module.exports = { - /* Header error messages */ - "INVALID_LOC" : "Invalid LOC header (bad signature)", - "INVALID_CEN" : "Invalid CEN header (bad signature)", - "INVALID_END" : "Invalid END header (bad signature)", - - /* ZipEntry error messages*/ - "NO_DATA" : "Nothing to decompress", - "BAD_CRC" : "CRC32 checksum failed", - "FILE_IN_THE_WAY" : "There is a file in the way: %s", - "UNKNOWN_METHOD" : "Invalid/unsupported compression method", - - /* Inflater error messages */ - "AVAIL_DATA" : "inflate::Available inflate data did not terminate", - "INVALID_DISTANCE" : "inflate::Invalid literal/length or distance code in fixed or dynamic block", - "TO_MANY_CODES" : "inflate::Dynamic block code description: too many length or distance codes", - "INVALID_REPEAT_LEN" : "inflate::Dynamic block code description: repeat more than specified lengths", - "INVALID_REPEAT_FIRST" : "inflate::Dynamic block code description: repeat lengths with no first length", - "INCOMPLETE_CODES" : "inflate::Dynamic block code description: code lengths codes incomplete", - "INVALID_DYN_DISTANCE": "inflate::Dynamic block code description: invalid distance code lengths", - "INVALID_CODES_LEN": "inflate::Dynamic block code description: invalid literal/length code lengths", - "INVALID_STORE_BLOCK" : "inflate::Stored block length did not match one's complement", - "INVALID_BLOCK_TYPE" : "inflate::Invalid block type (type == 3)", - - /* ADM-ZIP error messages */ - "CANT_EXTRACT_FILE" : "Could not extract the file", - "CANT_OVERRIDE" : "Target file already exists", - "NO_ZIP" : "No zip file was loaded", - "NO_ENTRY" : "Entry doesn't exist", - "DIRECTORY_CONTENT_ERROR" : "A directory cannot have content", - "FILE_NOT_FOUND" : "File not found: %s", - "NOT_IMPLEMENTED" : "Not implemented", - "INVALID_FILENAME" : "Invalid filename", - "INVALID_FORMAT" : "Invalid or unsupported zip format. No END header found" -}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/fattr.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/fattr.js deleted file mode 100644 index 2191ec1c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/fattr.js +++ /dev/null @@ -1,84 +0,0 @@ -var fs = require("fs"), - pth = require("path"); - -fs.existsSync = fs.existsSync || pth.existsSync; - -module.exports = function(/*String*/path) { - - var _path = path || "", - _permissions = 0, - _obj = newAttr(), - _stat = null; - - function newAttr() { - return { - directory : false, - readonly : false, - hidden : false, - executable : false, - mtime : 0, - atime : 0 - } - } - - if (_path && fs.existsSync(_path)) { - _stat = fs.statSync(_path); - _obj.directory = _stat.isDirectory(); - _obj.mtime = _stat.mtime; - _obj.atime = _stat.atime; - _obj.executable = !!(1 & parseInt ((_stat.mode & parseInt ("777", 8)).toString (8)[0])); - _obj.readonly = !!(2 & parseInt ((_stat.mode & parseInt ("777", 8)).toString (8)[0])); - _obj.hidden = pth.basename(_path)[0] === "."; - } else { - console.warn("Invalid path: " + _path) - } - - return { - - get directory () { - return _obj.directory; - }, - - get readOnly () { - return _obj.readonly; - }, - - get hidden () { - return _obj.hidden; - }, - - get mtime () { - return _obj.mtime; - }, - - get atime () { - return _obj.atime; - }, - - - get executable () { - return _obj.executable; - }, - - decodeAttributes : function(val) { - - }, - - encodeAttributes : function (val) { - - }, - - toString : function() { - return '{\n' + - '\t"path" : "' + _path + ",\n" + - '\t"isDirectory" : ' + _obj.directory + ",\n" + - '\t"isReadOnly" : ' + _obj.readonly + ",\n" + - '\t"isHidden" : ' + _obj.hidden + ",\n" + - '\t"isExecutable" : ' + _obj.executable + ",\n" + - '\t"mTime" : ' + _obj.mtime + "\n" + - '\t"aTime" : ' + _obj.atime + "\n" + - '}'; - } - } - -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/index.js deleted file mode 100644 index 935fc1a4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/index.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = require("./utils"); -module.exports.Constants = require("./constants"); -module.exports.Errors = require("./errors"); -module.exports.FileAttr = require("./fattr"); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/utils.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/utils.js deleted file mode 100644 index b14db8c1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/utils.js +++ /dev/null @@ -1,145 +0,0 @@ -var fs = require("fs"), - pth = require('path'); - -fs.existsSync = fs.existsSync || pth.existsSync; - -module.exports = (function() { - - var crcTable = [], - Constants = require('./constants'), - Errors = require('./errors'), - - PATH_SEPARATOR = pth.normalize("/"); - - - function mkdirSync(/*String*/path) { - var resolvedPath = path.split(PATH_SEPARATOR)[0]; - path.split(PATH_SEPARATOR).forEach(function(name) { - if (!name || name.substr(-1,1) == ":") return; - resolvedPath += PATH_SEPARATOR + name; - var stat; - try { - stat = fs.statSync(resolvedPath); - } catch (e) { - fs.mkdirSync(resolvedPath); - } - if (stat && stat.isFile()) - throw Errors.FILE_IN_THE_WAY.replace("%s", resolvedPath); - }); - } - - function findSync(/*String*/root, /*RegExp*/pattern, /*Boolean*/recoursive) { - if (typeof pattern === 'boolean') { - recoursive = pattern; - pattern = undefined; - } - var files = []; - fs.readdirSync(root).forEach(function(file) { - var path = pth.join(root, file); - - if (fs.statSync(path).isDirectory() && recoursive) - files = files.concat(findSync(path, pattern, recoursive)); - - if (!pattern || pattern.test(path)) { - files.push(pth.normalize(path) + (fs.statSync(path).isDirectory() ? PATH_SEPARATOR : "")); - } - - }); - return files; - } - - return { - makeDir : function(/*String*/path) { - mkdirSync(path); - }, - - crc32 : function(buf) { - var b = new Buffer(4); - if (!crcTable.length) { - for (var n = 0; n < 256; n++) { - var c = n; - for (var k = 8; --k >= 0;) // - if ((c & 1) != 0) { c = 0xedb88320 ^ (c >>> 1); } else { c = c >>> 1; } - if (c < 0) { - b.writeInt32LE(c, 0); - c = b.readUInt32LE(0); - } - crcTable[n] = c; - } - } - var crc = 0, off = 0, len = buf.length, c1 = ~crc; - while(--len >= 0) c1 = crcTable[(c1 ^ buf[off++]) & 0xff] ^ (c1 >>> 8); - crc = ~c1; - b.writeInt32LE(crc & 0xffffffff, 0); - return b.readUInt32LE(0); - }, - - methodToString : function(/*Number*/method) { - switch (method) { - case Constants.STORED: - return 'STORED (' + method + ')'; - case Constants.DEFLATED: - return 'DEFLATED (' + method + ')'; - default: - return 'UNSUPPORTED (' + method + ')' - } - - }, - - writeFileTo : function(/*String*/path, /*Buffer*/content, /*Boolean*/overwrite, /*Number*/attr) { - if (fs.existsSync(path)) { - if (!overwrite) - return false; // cannot overwite - - var stat = fs.statSync(path); - if (stat.isDirectory()) { - return false; - } - } - var folder = pth.dirname(path); - if (!fs.existsSync(folder)) { - mkdirSync(folder); - } - - var fd; - try { - fd = fs.openSync(path, 'w', 438); // 0666 - } catch(e) { - fs.chmodSync(path, 438); - fd = fs.openSync(path, 'w', 438); - } - if (fd) { - fs.writeSync(fd, content, 0, content.length, 0); - fs.closeSync(fd); - } - fs.chmodSync(path, attr || 438); - return true; - }, - - findFiles : function(/*String*/path) { - return findSync(path, true); - }, - - getAttributes : function(/*String*/path) { - - }, - - setAttributes : function(/*String*/path) { - - }, - - toBuffer : function(input) { - if (Buffer.isBuffer(input)) { - return input; - } else { - if (input.length == 0) { - return new Buffer(0) - } - return new Buffer(input, 'utf8'); - } - }, - - Constants : Constants, - Errors : Errors - } -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/zipEntry.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/zipEntry.js deleted file mode 100644 index 02c31725..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/zipEntry.js +++ /dev/null @@ -1,224 +0,0 @@ -var Utils = require("./util"), - Headers = require("./headers"), - Constants = Utils.Constants, - Methods = require("./methods"); - -module.exports = function (/*Buffer*/input) { - - var _entryHeader = new Headers.EntryHeader(), - _entryName = new Buffer(0), - _comment = new Buffer(0), - _isDirectory = false, - uncompressedData = null, - _extra = new Buffer(0); - - function getCompressedDataFromZip() { - if (!input || !Buffer.isBuffer(input)) { - return new Buffer(0); - } - _entryHeader.loadDataHeaderFromBinary(input); - return input.slice(_entryHeader.realDataOffset, _entryHeader.realDataOffset + _entryHeader.compressedSize) - } - - function crc32OK(data) { - // if bit 3 (0x08) of the general-purpose flags field is set, then the CRC-32 and file sizes are not known when the header is written - if (_entryHeader.flags & 0x8 != 0x8) { - if (Utils.crc32(data) != _entryHeader.crc) { - return false; - } - } else { - // @TODO: load and check data descriptor header - // The fields in the local header are filled with zero, and the CRC-32 and size are appended in a 12-byte structure - // (optionally preceded by a 4-byte signature) immediately after the compressed data: - } - return true; - } - - function decompress(/*Boolean*/async, /*Function*/callback) { - if (_isDirectory) { - if (async && callback) { - callback(new Buffer(0), Utils.Errors.DIRECTORY_CONTENT_ERROR); //si added error. - } - return new Buffer(0); - } - - var compressedData = getCompressedDataFromZip(); - if (compressedData.length == 0) { - if (async && callback) callback(compressedData, Utils.Errors.NO_DATA);//si added error. - return compressedData; - } - - var data = new Buffer(_entryHeader.size); - data.fill(0); - - switch (_entryHeader.method) { - case Utils.Constants.STORED: - compressedData.copy(data); - if (!crc32OK(data)) { - if (async && callback) callback(data, Utils.Errors.BAD_CRC);//si added error - return Utils.Errors.BAD_CRC; - } else {//si added otherwise did not seem to return data. - if (async && callback) callback(data); - return data; - } - break; - case Utils.Constants.DEFLATED: - var inflater = new Methods.Inflater(compressedData); - if (!async) { - inflater.inflate(data); - if (!crc32OK(data)) { - console.warn(Utils.Errors.BAD_CRC + " " + _entryName.toString()) - } - return data; - } else { - inflater.inflateAsync(function(result) { - result.copy(data, 0); - if (crc32OK(data)) { - if (callback) callback(data, Utils.Errors.BAD_CRC); //si added error - } else { //si added otherwise did not seem to return data. - if (callback) callback(data); - } - }) - } - break; - default: - if (async && callback) callback(new Buffer(0), Utils.Errors.UNKNOWN_METHOD); - return Utils.Errors.UNKNOWN_METHOD; - } - } - - function compress(/*Boolean*/async, /*Function*/callback) { - if ((!uncompressedData || !uncompressedData.length) && Buffer.isBuffer(input)) { - // no data set or the data wasn't changed to require recompression - if (async && callback) callback(getCompressedDataFromZip()); - return getCompressedDataFromZip(); - } - - if (uncompressedData.length && !_isDirectory) { - var compressedData; - // Local file header - switch (_entryHeader.method) { - case Utils.Constants.STORED: - _entryHeader.compressedSize = _entryHeader.size; - - compressedData = new Buffer(uncompressedData.length); - uncompressedData.copy(compressedData); - - if (async && callback) callback(compressedData); - return compressedData; - - break; - default: - case Utils.Constants.DEFLATED: - - var deflater = new Methods.Deflater(uncompressedData); - if (!async) { - var deflated = deflater.deflate(); - _entryHeader.compressedSize = deflated.length; - return deflated; - } else { - deflater.deflateAsync(function(data) { - compressedData = new Buffer(data.length); - _entryHeader.compressedSize = data.length; - data.copy(compressedData); - callback && callback(compressedData); - }) - } - deflater = null; - break; - } - } else { - if (async && callback) { - callback(new Buffer(0)); - } else { - return new Buffer(0); - } - } - } - - return { - get entryName () { return _entryName.toString(); }, - get rawEntryName() { return _entryName; }, - set entryName (val) { - _entryName = Utils.toBuffer(val); - var lastChar = _entryName[_entryName.length - 1]; - _isDirectory = (lastChar == 47) || (lastChar == 92); - _entryHeader.fileNameLength = _entryName.length; - }, - - get extra () { return _extra; }, - set extra (val) { - _extra = val; - _entryHeader.extraLength = val.length; - }, - - get comment () { return _comment.toString(); }, - set comment (val) { - _comment = Utils.toBuffer(val); - _entryHeader.commentLength = _comment.length; - }, - - get name () { var n = _entryName.toString(); return _isDirectory ? n.substr(n.length - 1).split("/").pop() : n.split("/").pop(); }, - get isDirectory () { return _isDirectory }, - - getCompressedData : function() { - return compress(false, null) - }, - - getCompressedDataAsync : function(/*Function*/callback) { - compress(true, callback) - }, - - setData : function(value) { - uncompressedData = Utils.toBuffer(value); - if (!_isDirectory && uncompressedData.length) { - _entryHeader.size = uncompressedData.length; - _entryHeader.method = Utils.Constants.DEFLATED; - _entryHeader.crc = Utils.crc32(value); - } else { // folders and blank files should be stored - _entryHeader.method = Utils.Constants.STORED; - } - }, - - getData : function() { - return decompress(false, null); - }, - - getDataAsync : function(/*Function*/callback) { - decompress(true, callback) - }, - - set header(/*Buffer*/data) { - _entryHeader.loadFromBinary(data); - }, - - get header() { - return _entryHeader; - }, - - packHeader : function() { - var header = _entryHeader.entryHeaderToBinary(); - // add - _entryName.copy(header, Utils.Constants.CENHDR); - if (_entryHeader.extraLength) { - _extra.copy(header, Utils.Constants.CENHDR + _entryName.length) - } - if (_entryHeader.commentLength) { - _comment.copy(header, Utils.Constants.CENHDR + _entryName.length + _entryHeader.extraLength, _comment.length); - } - return header; - }, - - toString : function() { - return '{\n' + - '\t"entryName" : "' + _entryName.toString() + "\",\n" + - '\t"name" : "' + _entryName.toString().split("/").pop() + "\",\n" + - '\t"comment" : "' + _comment.toString() + "\",\n" + - '\t"isDirectory" : ' + _isDirectory + ",\n" + - '\t"header" : ' + _entryHeader.toString().replace(/\t/mg, "\t\t") + ",\n" + - '\t"compressedData" : <' + (input && input.length + " bytes buffer" || "null") + ">\n" + - '\t"data" : <' + (uncompressedData && uncompressedData.length + " bytes buffer" || "null") + ">\n" + - '}'; - } - } -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/zipFile.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/zipFile.js deleted file mode 100644 index f066d7ed..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/zipFile.js +++ /dev/null @@ -1,311 +0,0 @@ -var ZipEntry = require("./zipEntry"), - Headers = require("./headers"), - Utils = require("./util"); - -module.exports = function(/*String|Buffer*/input, /*Number*/inputType) { - var entryList = [], - entryTable = {}, - _comment = new Buffer(0), - filename = "", - fs = require("fs"), - inBuffer = null, - mainHeader = new Headers.MainHeader(); - - if (inputType == Utils.Constants.FILE) { - // is a filename - filename = input; - inBuffer = fs.readFileSync(filename); - readMainHeader(); - } else if (inputType == Utils.Constants.BUFFER) { - // is a memory buffer - inBuffer = input; - readMainHeader(); - } else { - // none. is a new file - } - - function readEntries() { - entryTable = {}; - entryList = new Array(mainHeader.diskEntries); // total number of entries - var index = mainHeader.offset; // offset of first CEN header - for(var i = 0; i < entryList.length; i++) { - - var tmp = index, - entry = new ZipEntry(inBuffer); - entry.header = inBuffer.slice(tmp, tmp += Utils.Constants.CENHDR); - - entry.entryName = inBuffer.slice(tmp, tmp += entry.header.fileNameLength); - - if (entry.header.extraLength) { - entry.extra = inBuffer.slice(tmp, tmp += entry.header.extraLength); - } - - if (entry.header.commentLength) - entry.comment = inBuffer.slice(tmp, tmp + entry.header.commentLength); - - index += entry.header.entryHeaderSize; - - entryList[i] = entry; - entryTable[entry.entryName] = entry; - } - } - - function readMainHeader() { - var i = inBuffer.length - Utils.Constants.ENDHDR, // END header size - n = Math.max(0, i - 0xFFFF), // 0xFFFF is the max zip file comment length - endOffset = 0; // Start offset of the END header - - for (i; i >= n; i--) { - if (inBuffer[i] != 0x50) continue; // quick check that the byte is 'P' - if (inBuffer.readUInt32LE(i) == Utils.Constants.ENDSIG) { // "PK\005\006" - endOffset = i; - break; - } - } - if (!endOffset) - throw Utils.Errors.INVALID_FORMAT; - - mainHeader.loadFromBinary(inBuffer.slice(endOffset, endOffset + Utils.Constants.ENDHDR)); - if (mainHeader.commentLength) { - _comment = inBuffer.slice(endOffset + Utils.Constants.ENDHDR); - } - readEntries(); - } - - return { - /** - * Returns an array of ZipEntry objects existent in the current opened archive - * @return Array - */ - get entries () { - return entryList; - }, - - /** - * Archive comment - * @return {String} - */ - get comment () { return _comment.toString(); }, - set comment(val) { - mainHeader.commentLength = val.length; - _comment = val; - }, - - /** - * Returns a reference to the entry with the given name or null if entry is inexistent - * - * @param entryName - * @return ZipEntry - */ - getEntry : function(/*String*/entryName) { - return entryTable[entryName] || null; - }, - - /** - * Adds the given entry to the entry list - * - * @param entry - */ - setEntry : function(/*ZipEntry*/entry) { - entryList.push(entry); - entryTable[entry.entryName] = entry; - mainHeader.totalEntries = entryList.length; - }, - - /** - * Removes the entry with the given name from the entry list. - * - * If the entry is a directory, then all nested files and directories will be removed - * @param entryName - */ - deleteEntry : function(/*String*/entryName) { - var entry = entryTable[entryName]; - if (entry && entry.isDirectory) { - var _self = this; - this.getEntryChildren(entry).forEach(function(child) { - if (child.entryName != entryName) { - _self.deleteEntry(child.entryName) - } - }) - } - entryList.splice(entryList.indexOf(entry), 1); - delete(entryTable[entryName]); - mainHeader.totalEntries = entryList.length; - }, - - /** - * Iterates and returns all nested files and directories of the given entry - * - * @param entry - * @return Array - */ - getEntryChildren : function(/*ZipEntry*/entry) { - if (entry.isDirectory) { - var list = [], - name = entry.entryName, - len = name.length; - - entryList.forEach(function(zipEntry) { - if (zipEntry.entryName.substr(0, len) == name) { - list.push(zipEntry); - } - }); - return list; - } - return [] - }, - - /** - * Returns the zip file - * - * @return Buffer - */ - compressToBuffer : function() { - if (entryList.length > 1) { - entryList.sort(function(a, b) { - var nameA = a.entryName.toLowerCase(); - var nameB = b.entryName.toLowerCase(); - if (nameA < nameB) {return -1} - if (nameA > nameB) {return 1} - return 0; - }); - } - - var totalSize = 0, - dataBlock = [], - entryHeaders = [], - dindex = 0; - - mainHeader.size = 0; - mainHeader.offset = 0; - - entryList.forEach(function(entry) { - entry.header.offset = dindex; - - // compress data and set local and entry header accordingly. Reason why is called first - var compressedData = entry.getCompressedData(); - // data header - var dataHeader = entry.header.dataHeaderToBinary(); - var postHeader = new Buffer(entry.entryName + entry.extra.toString()); - var dataLength = dataHeader.length + postHeader.length + compressedData.length; - - dindex += dataLength; - - dataBlock.push(dataHeader); - dataBlock.push(postHeader); - dataBlock.push(compressedData); - - var entryHeader = entry.packHeader(); - entryHeaders.push(entryHeader); - mainHeader.size += entryHeader.length; - totalSize += (dataLength + entryHeader.length); - }); - - totalSize += mainHeader.mainHeaderSize; // also includes zip file comment length - // point to end of data and begining of central directory first record - mainHeader.offset = dindex; - - dindex = 0; - var outBuffer = new Buffer(totalSize); - dataBlock.forEach(function(content) { - content.copy(outBuffer, dindex); // write data blocks - dindex += content.length; - }); - entryHeaders.forEach(function(content) { - content.copy(outBuffer, dindex); // write central directory entries - dindex += content.length; - }); - - var mh = mainHeader.toBinary(); - if (_comment) { - _comment.copy(mh, Utils.Constants.ENDHDR); // add zip file comment - } - - mh.copy(outBuffer, dindex); // write main header - - return outBuffer - }, - - toAsyncBuffer : function(/*Function*/onSuccess,/*Function*/onFail,/*Function*/onItemStart,/*Function*/onItemEnd) { - if (entryList.length > 1) { - entryList.sort(function(a, b) { - var nameA = a.entryName.toLowerCase(); - var nameB = b.entryName.toLowerCase(); - if (nameA > nameB) {return -1} - if (nameA < nameB) {return 1} - return 0; - }); - } - - var totalSize = 0, - dataBlock = [], - entryHeaders = [], - dindex = 0; - - mainHeader.size = 0; - mainHeader.offset = 0; - - var compress=function(entryList){ - var self=arguments.callee; - var entry; - if(entryList.length){ - var entry=entryList.pop(); - var name=entry.entryName + entry.extra.toString(); - if(onItemStart)onItemStart(name); - entry.getCompressedDataAsync(function(compressedData){ - if(onItemEnd)onItemEnd(name); - - entry.header.offset = dindex; - // data header - var dataHeader = entry.header.dataHeaderToBinary(); - var postHeader = new Buffer(name); - var dataLength = dataHeader.length + postHeader.length + compressedData.length; - - dindex += dataLength; - - dataBlock.push(dataHeader); - dataBlock.push(postHeader); - dataBlock.push(compressedData); - - var entryHeader = entry.packHeader(); - entryHeaders.push(entryHeader); - mainHeader.size += entryHeader.length; - totalSize += (dataLength + entryHeader.length); - - if(entryList.length){ - self(entryList); - }else{ - - - totalSize += mainHeader.mainHeaderSize; // also includes zip file comment length - // point to end of data and begining of central directory first record - mainHeader.offset = dindex; - - dindex = 0; - var outBuffer = new Buffer(totalSize); - dataBlock.forEach(function(content) { - content.copy(outBuffer, dindex); // write data blocks - dindex += content.length; - }); - entryHeaders.forEach(function(content) { - content.copy(outBuffer, dindex); // write central directory entries - dindex += content.length; - }); - - var mh = mainHeader.toBinary(); - if (_comment) { - _comment.copy(mh, Utils.Constants.ENDHDR); // add zip file comment - } - - mh.copy(outBuffer, dindex); // write main header - - onSuccess(outBuffer); - } - }); - } - }; - - compress(entryList); - } - } -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/.npmignore deleted file mode 100644 index 13abef4f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -node_modules/* -npm_debug.log diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/LICENSE deleted file mode 100644 index 6d03581f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2012 'Dominic Tarr' - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/README.md deleted file mode 100644 index 565e0e26..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# stream-combiner - -<img src=https://secure.travis-ci.org/dominictarr/stream-combiner.png?branch=master> - -## Combine (stream1,...,streamN) - -Turn a pipeline into a single stream. `pipeline` returns a stream that writes to the first stream -and reads from the last stream. - -Listening for 'error' will recieve errors from all streams inside the pipe. - -``` js - var Combine = require('stream-combiner') - var es = require('event-stream') - - Combine( //connect streams together with `pipe` - process.openStdin(), //open stdin - es.split(), //split stream to break on newlines - es.map(function (data, callback) {//turn this async function into a stream - callback(null - , inspect(JSON.parse(data))) //render it nicely - }), - process.stdout // pipe it to stdout ! - ) -``` - -## License - -MIT diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/index.js deleted file mode 100644 index 99cf5b61..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/index.js +++ /dev/null @@ -1,39 +0,0 @@ -var duplexer = require('duplexer') - -module.exports = function () { - - var streams = [].slice.call(arguments) - , first = streams[0] - , last = streams[streams.length - 1] - , thepipe = duplexer(first, last) - - if(streams.length == 1) - return streams[0] - else if (!streams.length) - throw new Error('connect called with empty args') - - //pipe all the streams together - - function recurse (streams) { - if(streams.length < 2) - return - streams[0].pipe(streams[1]) - recurse(streams.slice(1)) - } - - recurse(streams) - - function onerror () { - var args = [].slice.call(arguments) - args.unshift('error') - thepipe.emit.apply(thepipe, args) - } - - //es.duplex already reemits the error from the first and last stream. - //add a listener for the inner streams in the pipeline. - for(var i = 1; i < streams.length - 1; i ++) - streams[i].on('error', onerror) - - return thepipe -} - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/.npmignore deleted file mode 100644 index 062c11e8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -*.log -*.err \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/.travis.yml deleted file mode 100644 index ed05f88d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.11" - - "0.10" - - "0.8" - - "0.6" diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/LICENCE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/LICENCE deleted file mode 100644 index a23e08a8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 Raynos. - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/README.md deleted file mode 100644 index 61ff71aa..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# duplexer - -[![build status][1]][2] [![dependency status][3]][4] - -[![browser support][5]][6] - -Creates a duplex stream - -Taken from [event-stream][7] - -## duplex (writeStream, readStream) - -Takes a writable stream and a readable stream and makes them appear as a readable writable stream. - -It is assumed that the two streams are connected to each other in some way. - -## Example - -```js -var grep = cp.exec('grep Stream') - -duplex(grep.stdin, grep.stdout) -``` - -## Installation - -`npm install duplexer` - -## Tests - -`npm test` - -## Contributors - - - Dominictarr - - Raynos - - samccone - -## MIT Licenced - - [1]: https://secure.travis-ci.org/Raynos/duplexer.png - [2]: https://travis-ci.org/Raynos/duplexer - [3]: https://david-dm.org/Raynos/duplexer.png - [4]: https://david-dm.org/Raynos/duplexer - [5]: https://ci.testling.com/Raynos/duplexer.png - [6]: https://ci.testling.com/Raynos/duplexer - [7]: https://github.com/dominictarr/event-stream#duplex-writestream-readstream diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/index.js deleted file mode 100644 index a188a210..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/index.js +++ /dev/null @@ -1,87 +0,0 @@ -var Stream = require("stream") -var writeMethods = ["write", "end", "destroy"] -var readMethods = ["resume", "pause"] -var readEvents = ["data", "close"] -var slice = Array.prototype.slice - -module.exports = duplex - -function forEach (arr, fn) { - if (arr.forEach) { - return arr.forEach(fn) - } - - for (var i = 0; i < arr.length; i++) { - fn(arr[i], i) - } -} - -function duplex(writer, reader) { - var stream = new Stream() - var ended = false - - forEach(writeMethods, proxyWriter) - - forEach(readMethods, proxyReader) - - forEach(readEvents, proxyStream) - - reader.on("end", handleEnd) - - writer.on("drain", function() { - stream.emit("drain") - }) - - writer.on("error", reemit) - reader.on("error", reemit) - - stream.writable = writer.writable - stream.readable = reader.readable - - return stream - - function proxyWriter(methodName) { - stream[methodName] = method - - function method() { - return writer[methodName].apply(writer, arguments) - } - } - - function proxyReader(methodName) { - stream[methodName] = method - - function method() { - stream.emit(methodName) - var func = reader[methodName] - if (func) { - return func.apply(reader, arguments) - } - reader.emit(methodName) - } - } - - function proxyStream(methodName) { - reader.on(methodName, reemit) - - function reemit() { - var args = slice.call(arguments) - args.unshift(methodName) - stream.emit.apply(stream, args) - } - } - - function handleEnd() { - if (ended) { - return - } - ended = true - var args = slice.call(arguments) - args.unshift("end") - stream.emit.apply(stream, args) - } - - function reemit(err) { - stream.emit("error", err) - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/package.json deleted file mode 100644 index d78e4d07..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "duplexer", - "version": "0.1.1", - "description": "Creates a duplex stream", - "keywords": [], - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Raynos/duplexer.git" - }, - "main": "index", - "homepage": "https://github.com/Raynos/duplexer", - "contributors": [ - { - "name": "Jake Verbaten" - } - ], - "bugs": { - "url": "https://github.com/Raynos/duplexer/issues", - "email": "raynos2@gmail.com" - }, - "devDependencies": { - "tape": "0.3.3", - "through": "~0.1.4" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/Raynos/duplexer/raw/master/LICENSE" - } - ], - "scripts": { - "test": "node test" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "ie/8..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "readme": "# duplexer\n\n[![build status][1]][2] [![dependency status][3]][4]\n\n[![browser support][5]][6]\n\nCreates a duplex stream\n\nTaken from [event-stream][7]\n\n## duplex (writeStream, readStream)\n\nTakes a writable stream and a readable stream and makes them appear as a readable writable stream.\n\nIt is assumed that the two streams are connected to each other in some way.\n\n## Example\n\n```js\nvar grep = cp.exec('grep Stream')\n\nduplex(grep.stdin, grep.stdout)\n```\n\n## Installation\n\n`npm install duplexer`\n\n## Tests\n\n`npm test`\n\n## Contributors\n\n - Dominictarr\n - Raynos\n - samccone\n\n## MIT Licenced\n\n [1]: https://secure.travis-ci.org/Raynos/duplexer.png\n [2]: https://travis-ci.org/Raynos/duplexer\n [3]: https://david-dm.org/Raynos/duplexer.png\n [4]: https://david-dm.org/Raynos/duplexer\n [5]: https://ci.testling.com/Raynos/duplexer.png\n [6]: https://ci.testling.com/Raynos/duplexer\n [7]: https://github.com/dominictarr/event-stream#duplex-writestream-readstream\n", - "readmeFilename": "README.md", - "_id": "duplexer@0.1.1", - "dist": { - "shasum": "7fb4a6591c344b842e6f6764796a996ff912e7f4" - }, - "_from": "duplexer@~0.1.1", - "_resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/test/index.js deleted file mode 100644 index 4988e0d9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/test/index.js +++ /dev/null @@ -1,31 +0,0 @@ -var through = require("through") -var test = require("tape") - -var duplex = require("../index") - -var readable = through() -var writable = through(write) -var written = 0 -var data = 0 - -var stream = duplex(writable, readable) - -function write() { - written++ -} - -stream.on("data", ondata) - -function ondata() { - data++ -} - -test("emit and write", function(t) { - t.plan(2) - - stream.write() - readable.emit("data") - - t.equal(written, 1, "should have written once") - t.equal(data, 1, "should have recived once") -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/package.json deleted file mode 100644 index 3a25f682..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "stream-combiner", - "version": "0.0.4", - "homepage": "https://github.com/dominictarr/stream-combiner", - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/stream-combiner.git" - }, - "dependencies": { - "duplexer": "~0.1.1" - }, - "devDependencies": { - "tape": "~2.3.0", - "event-stream": "~3.0.7" - }, - "scripts": { - "test": "set -e; for t in test/*.js; do node $t; done" - }, - "author": { - "name": "'Dominic Tarr'", - "email": "dominic.tarr@gmail.com", - "url": "http://dominictarr.com" - }, - "license": "MIT", - "readme": "# stream-combiner\n\n<img src=https://secure.travis-ci.org/dominictarr/stream-combiner.png?branch=master>\n\n## Combine (stream1,...,streamN)\n\nTurn a pipeline into a single stream. `pipeline` returns a stream that writes to the first stream\nand reads from the last stream. \n\nListening for 'error' will recieve errors from all streams inside the pipe.\n\n``` js\n var Combine = require('stream-combiner')\n var es = require('event-stream')\n\n Combine( //connect streams together with `pipe`\n process.openStdin(), //open stdin\n es.split(), //split stream to break on newlines\n es.map(function (data, callback) {//turn this async function into a stream\n callback(null\n , inspect(JSON.parse(data))) //render it nicely\n }),\n process.stdout // pipe it to stdout !\n )\n```\n\n## License\n\nMIT\n", - "readmeFilename": "README.md", - "description": "<img src=https://secure.travis-ci.org/dominictarr/stream-combiner.png?branch=master>", - "bugs": { - "url": "https://github.com/dominictarr/stream-combiner/issues" - }, - "_id": "stream-combiner@0.0.4", - "dist": { - "shasum": "0d1c68aea72345d3619884ed3eb44e8a4e583129" - }, - "_from": "stream-combiner@~0.0.2", - "_resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/test/index.js deleted file mode 100644 index d17ddada..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/test/index.js +++ /dev/null @@ -1,52 +0,0 @@ -var es = require('event-stream') -var combine = require('..') -var test = require('tape') - -test('do not duplicate errors', function (test) { - - var errors = 0; - var pipe = combine( - es.through(function(data) { - return this.emit('data', data); - }), - es.through(function(data) { - return this.emit('error', new Error(data)); - }) - ) - - pipe.on('error', function(err) { - errors++ - test.ok(errors, 'expected error count') - process.nextTick(function () { - return test.end(); - }) - }) - - return pipe.write('meh'); -}) - -test('3 pipe do not duplicate errors', function (test) { - - var errors = 0; - var pipe = combine( - es.through(function(data) { - return this.emit('data', data); - }), - es.through(function(data) { - return this.emit('error', new Error(data)); - }), - es.through() - ) - - pipe.on('error', function(err) { - errors++ - test.ok(errors, 'expected error count') - process.nextTick(function () { - return test.end(); - }) - }) - - return pipe.write('meh'); - -}) - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/.npmignore deleted file mode 100644 index c167ad5b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -.*.swp -node_modules -examples/extract/ -test/tmp/ -test/fixtures/ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/.travis.yml deleted file mode 100644 index 2d26206d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - 0.6 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/LICENCE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/LICENCE deleted file mode 100644 index 74489e2e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/LICENCE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) Isaac Z. Schlueter -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/README.md deleted file mode 100644 index 5bcc82cd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# node-tar - -Tar for Node.js. - -[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/) - -## API - -See `examples/` for usage examples. - -### var tar = require('tar') - -Returns an object with `.Pack`, `.Extract` and `.Parse` methods. - -### tar.Pack([properties]) - -Returns a through stream. Use -[fstream](https://npmjs.org/package/fstream) to write files into the -pack stream and you will receive tar archive data from the pack -stream. - -The optional `properties` object are used to set properties in the tar -'Global Extended Header'. - -### tar.Extract([options]) - -Returns a through stream. Write tar data to the stream and the files -in the tarball will be extracted onto the filesystem. - -`options` can be: - -```js -{ - path: '/path/to/extract/tar/into', - strip: 0, // how many path segments to strip from the root when extracting -} -``` - -`options` also get passed to the `fstream.Writer` instance that `tar` -uses internally. - -### tar.Parse() - -Returns a writable stream. Write tar data to it and it will emit -`entry` events for each entry parsed from the tarball. This is used by -`tar.Extract`. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/examples/extracter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/examples/extracter.js deleted file mode 100644 index e150abf2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/examples/extracter.js +++ /dev/null @@ -1,11 +0,0 @@ -var tar = require("../tar.js") - , fs = require("fs") - -fs.createReadStream(__dirname + "/../test/fixtures/c.tar") - .pipe(tar.Extract({ path: __dirname + "/extract" })) - .on("error", function (er) { - console.error("error here") - }) - .on("end", function () { - console.error("done") - }) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/examples/reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/examples/reader.js deleted file mode 100644 index 39f3f088..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/examples/reader.js +++ /dev/null @@ -1,36 +0,0 @@ -var tar = require("../tar.js") - , fs = require("fs") - -fs.createReadStream(__dirname + "/../test/fixtures/c.tar") - .pipe(tar.Parse()) - .on("extendedHeader", function (e) { - console.error("extended pax header", e.props) - e.on("end", function () { - console.error("extended pax fields:", e.fields) - }) - }) - .on("ignoredEntry", function (e) { - console.error("ignoredEntry?!?", e.props) - }) - .on("longLinkpath", function (e) { - console.error("longLinkpath entry", e.props) - e.on("end", function () { - console.error("value=%j", e.body.toString()) - }) - }) - .on("longPath", function (e) { - console.error("longPath entry", e.props) - e.on("end", function () { - console.error("value=%j", e.body.toString()) - }) - }) - .on("entry", function (e) { - console.error("entry", e.props) - e.on("data", function (c) { - console.error(" >>>" + c.toString().replace(/\n/g, "\\n")) - }) - e.on("end", function () { - console.error(" <<<EOF") - }) - }) - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/buffer-entry.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/buffer-entry.js deleted file mode 100644 index 6c1da237..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/buffer-entry.js +++ /dev/null @@ -1,30 +0,0 @@ -// just like the Entry class, but it buffers the contents -// -// XXX It would be good to set a maximum BufferEntry filesize, -// since it eats up memory. In normal operation, -// these are only for long filenames or link names, which are -// rarely very big. - -module.exports = BufferEntry - -var inherits = require("inherits") - , Entry = require("./entry.js") - -function BufferEntry () { - Entry.apply(this, arguments) - this._buffer = new Buffer(this.props.size) - this._offset = 0 - this.body = "" - this.on("end", function () { - this.body = this._buffer.toString().slice(0, -1) - }) -} - -inherits(BufferEntry, Entry) - -// collect the bytes as they come in. -BufferEntry.prototype.write = function (c) { - c.copy(this._buffer, this._offset) - this._offset += c.length - Entry.prototype.write.call(this, c) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/entry-writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/entry-writer.js deleted file mode 100644 index 8e09042d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/entry-writer.js +++ /dev/null @@ -1,169 +0,0 @@ -module.exports = EntryWriter - -var tar = require("../tar.js") - , TarHeader = require("./header.js") - , Entry = require("./entry.js") - , inherits = require("inherits") - , BlockStream = require("block-stream") - , ExtendedHeaderWriter - , Stream = require("stream").Stream - , EOF = {} - -inherits(EntryWriter, Stream) - -function EntryWriter (props) { - var me = this - - if (!(me instanceof EntryWriter)) { - return new EntryWriter(props) - } - - Stream.apply(this) - - me.writable = true - me.readable = true - - me._stream = new BlockStream(512) - - me._stream.on("data", function (c) { - me.emit("data", c) - }) - - me._stream.on("drain", function () { - me.emit("drain") - }) - - me._stream.on("end", function () { - me.emit("end") - me.emit("close") - }) - - me.props = props - if (props.type === "Directory") { - props.size = 0 - } - props.ustar = "ustar\0" - props.ustarver = "00" - me.path = props.path - - me._buffer = [] - me._didHeader = false - me._meta = false - - me.on("pipe", function () { - me._process() - }) -} - -EntryWriter.prototype.write = function (c) { - // console.error(".. ew write") - if (this._ended) return this.emit("error", new Error("write after end")) - this._buffer.push(c) - this._process() - this._needDrain = this._buffer.length > 0 - return !this._needDrain -} - -EntryWriter.prototype.end = function (c) { - // console.error(".. ew end") - if (c) this._buffer.push(c) - this._buffer.push(EOF) - this._ended = true - this._process() - this._needDrain = this._buffer.length > 0 -} - -EntryWriter.prototype.pause = function () { - // console.error(".. ew pause") - this._paused = true - this.emit("pause") -} - -EntryWriter.prototype.resume = function () { - // console.error(".. ew resume") - this._paused = false - this.emit("resume") - this._process() -} - -EntryWriter.prototype.add = function (entry) { - // console.error(".. ew add") - if (!this.parent) return this.emit("error", new Error("no parent")) - - // make sure that the _header and such is emitted, and clear out - // the _currentEntry link on the parent. - if (!this._ended) this.end() - - return this.parent.add(entry) -} - -EntryWriter.prototype._header = function () { - // console.error(".. ew header") - if (this._didHeader) return - this._didHeader = true - - var headerBlock = TarHeader.encode(this.props) - - if (this.props.needExtended && !this._meta) { - var me = this - - ExtendedHeaderWriter = ExtendedHeaderWriter || - require("./extended-header-writer.js") - - ExtendedHeaderWriter(this.props) - .on("data", function (c) { - me.emit("data", c) - }) - .on("error", function (er) { - me.emit("error", er) - }) - .end() - } - - // console.error(".. .. ew headerBlock emitting") - this.emit("data", headerBlock) - this.emit("header") -} - -EntryWriter.prototype._process = function () { - // console.error(".. .. ew process") - if (!this._didHeader && !this._meta) { - this._header() - } - - if (this._paused || this._processing) { - // console.error(".. .. .. paused=%j, processing=%j", this._paused, this._processing) - return - } - - this._processing = true - - var buf = this._buffer - for (var i = 0; i < buf.length; i ++) { - // console.error(".. .. .. i=%d", i) - - var c = buf[i] - - if (c === EOF) this._stream.end() - else this._stream.write(c) - - if (this._paused) { - // console.error(".. .. .. paused mid-emission") - this._processing = false - if (i < buf.length) { - this._needDrain = true - this._buffer = buf.slice(i + 1) - } - return - } - } - - // console.error(".. .. .. emitted") - this._buffer.length = 0 - this._processing = false - - // console.error(".. .. .. emitting drain") - this.emit("drain") -} - -EntryWriter.prototype.destroy = function () {} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/entry.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/entry.js deleted file mode 100644 index 4af5c410..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/entry.js +++ /dev/null @@ -1,213 +0,0 @@ -// A passthrough read/write stream that sets its properties -// based on a header, extendedHeader, and globalHeader -// -// Can be either a file system object of some sort, or -// a pax/ustar metadata entry. - -module.exports = Entry - -var TarHeader = require("./header.js") - , tar = require("../tar") - , assert = require("assert").ok - , Stream = require("stream").Stream - , inherits = require("inherits") - , fstream = require("fstream").Abstract - -function Entry (header, extended, global) { - Stream.call(this) - this.readable = true - this.writable = true - - this._needDrain = false - this._paused = false - this._reading = false - this._ending = false - this._ended = false - this._remaining = 0 - this._queue = [] - this._index = 0 - this._queueLen = 0 - - this._read = this._read.bind(this) - - this.props = {} - this._header = header - this._extended = extended || {} - - // globals can change throughout the course of - // a file parse operation. Freeze it at its current state. - this._global = {} - var me = this - Object.keys(global || {}).forEach(function (g) { - me._global[g] = global[g] - }) - - this._setProps() -} - -inherits(Entry, Stream) - -Entry.prototype.write = function (c) { - if (this._ending) this.error("write() after end()", null, true) - if (this._remaining === 0) { - this.error("invalid bytes past eof") - } - - // often we'll get a bunch of \0 at the end of the last write, - // since chunks will always be 512 bytes when reading a tarball. - if (c.length > this._remaining) { - c = c.slice(0, this._remaining) - } - this._remaining -= c.length - - // put it on the stack. - var ql = this._queueLen - this._queue.push(c) - this._queueLen ++ - - this._read() - - // either paused, or buffered - if (this._paused || ql > 0) { - this._needDrain = true - return false - } - - return true -} - -Entry.prototype.end = function (c) { - if (c) this.write(c) - this._ending = true - this._read() -} - -Entry.prototype.pause = function () { - this._paused = true - this.emit("pause") -} - -Entry.prototype.resume = function () { - // console.error(" Tar Entry resume", this.path) - this.emit("resume") - this._paused = false - this._read() - return this._queueLen - this._index > 1 -} - - // This is bound to the instance -Entry.prototype._read = function () { - // console.error(" Tar Entry _read", this.path) - - if (this._paused || this._reading || this._ended) return - - // set this flag so that event handlers don't inadvertently - // get multiple _read() calls running. - this._reading = true - - // have any data to emit? - while (this._index < this._queueLen && !this._paused) { - var chunk = this._queue[this._index ++] - this.emit("data", chunk) - } - - // check if we're drained - if (this._index >= this._queueLen) { - this._queue.length = this._queueLen = this._index = 0 - if (this._needDrain) { - this._needDrain = false - this.emit("drain") - } - if (this._ending) { - this._ended = true - this.emit("end") - } - } - - // if the queue gets too big, then pluck off whatever we can. - // this should be fairly rare. - var mql = this._maxQueueLen - if (this._queueLen > mql && this._index > 0) { - mql = Math.min(this._index, mql) - this._index -= mql - this._queueLen -= mql - this._queue = this._queue.slice(mql) - } - - this._reading = false -} - -Entry.prototype._setProps = function () { - // props = extended->global->header->{} - var header = this._header - , extended = this._extended - , global = this._global - , props = this.props - - // first get the values from the normal header. - var fields = tar.fields - for (var f = 0; fields[f] !== null; f ++) { - var field = fields[f] - , val = header[field] - if (typeof val !== "undefined") props[field] = val - } - - // next, the global header for this file. - // numeric values, etc, will have already been parsed. - ;[global, extended].forEach(function (p) { - Object.keys(p).forEach(function (f) { - if (typeof p[f] !== "undefined") props[f] = p[f] - }) - }) - - // no nulls allowed in path or linkpath - ;["path", "linkpath"].forEach(function (p) { - if (props.hasOwnProperty(p)) { - props[p] = props[p].split("\0")[0] - } - }) - - - // set date fields to be a proper date - ;["mtime", "ctime", "atime"].forEach(function (p) { - if (props.hasOwnProperty(p)) { - props[p] = new Date(props[p] * 1000) - } - }) - - // set the type so that we know what kind of file to create - var type - switch (tar.types[props.type]) { - case "OldFile": - case "ContiguousFile": - type = "File" - break - - case "GNUDumpDir": - type = "Directory" - break - - case undefined: - type = "Unknown" - break - - case "Link": - case "SymbolicLink": - case "CharacterDevice": - case "BlockDevice": - case "Directory": - case "FIFO": - default: - type = tar.types[props.type] - } - - this.type = type - this.path = props.path - this.size = props.size - - // size is special, since it signals when the file needs to end. - this._remaining = props.size -} - -Entry.prototype.warn = fstream.warn -Entry.prototype.error = fstream.error diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extended-header-writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extended-header-writer.js deleted file mode 100644 index 1728c458..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extended-header-writer.js +++ /dev/null @@ -1,191 +0,0 @@ - -module.exports = ExtendedHeaderWriter - -var inherits = require("inherits") - , EntryWriter = require("./entry-writer.js") - -inherits(ExtendedHeaderWriter, EntryWriter) - -var tar = require("../tar.js") - , path = require("path") - , TarHeader = require("./header.js") - -// props is the props of the thing we need to write an -// extended header for. -// Don't be shy with it. Just encode everything. -function ExtendedHeaderWriter (props) { - // console.error(">> ehw ctor") - var me = this - - if (!(me instanceof ExtendedHeaderWriter)) { - return new ExtendedHeaderWriter(props) - } - - me.fields = props - - var p = - { path : ("PaxHeader" + path.join("/", props.path || "")) - .replace(/\\/g, "/").substr(0, 100) - , mode : props.mode || 0666 - , uid : props.uid || 0 - , gid : props.gid || 0 - , size : 0 // will be set later - , mtime : props.mtime || Date.now() / 1000 - , type : "x" - , linkpath : "" - , ustar : "ustar\0" - , ustarver : "00" - , uname : props.uname || "" - , gname : props.gname || "" - , devmaj : props.devmaj || 0 - , devmin : props.devmin || 0 - } - - - EntryWriter.call(me, p) - // console.error(">> ehw props", me.props) - me.props = p - - me._meta = true -} - -ExtendedHeaderWriter.prototype.end = function () { - // console.error(">> ehw end") - var me = this - - if (me._ended) return - me._ended = true - - me._encodeFields() - - if (me.props.size === 0) { - // nothing to write! - me._ready = true - me._stream.end() - return - } - - me._stream.write(TarHeader.encode(me.props)) - me.body.forEach(function (l) { - me._stream.write(l) - }) - me._ready = true - - // console.error(">> ehw _process calling end()", me.props) - this._stream.end() -} - -ExtendedHeaderWriter.prototype._encodeFields = function () { - // console.error(">> ehw _encodeFields") - this.body = [] - if (this.fields.prefix) { - this.fields.path = this.fields.prefix + "/" + this.fields.path - this.fields.prefix = "" - } - encodeFields(this.fields, "", this.body, this.fields.noProprietary) - var me = this - this.body.forEach(function (l) { - me.props.size += l.length - }) -} - -function encodeFields (fields, prefix, body, nop) { - // console.error(">> >> ehw encodeFields") - // "%d %s=%s\n", <length>, <keyword>, <value> - // The length is a decimal number, and includes itself and the \n - // Numeric values are decimal strings. - - Object.keys(fields).forEach(function (k) { - var val = fields[k] - , numeric = tar.numeric[k] - - if (prefix) k = prefix + "." + k - - // already including NODETAR.type, don't need File=true also - if (k === fields.type && val === true) return - - switch (k) { - // don't include anything that's always handled just fine - // in the normal header, or only meaningful in the context - // of nodetar - case "mode": - case "cksum": - case "ustar": - case "ustarver": - case "prefix": - case "basename": - case "dirname": - case "needExtended": - case "block": - case "filter": - return - - case "rdev": - if (val === 0) return - break - - case "nlink": - case "dev": // Truly a hero among men, Creator of Star! - case "ino": // Speak his name with reverent awe! It is: - k = "SCHILY." + k - break - - default: break - } - - if (val && typeof val === "object" && - !Buffer.isBuffer(val)) encodeFields(val, k, body, nop) - else if (val === null || val === undefined) return - else body.push.apply(body, encodeField(k, val, nop)) - }) - - return body -} - -function encodeField (k, v, nop) { - // lowercase keys must be valid, otherwise prefix with - // "NODETAR." - if (k.charAt(0) === k.charAt(0).toLowerCase()) { - var m = k.split(".")[0] - if (!tar.knownExtended[m]) k = "NODETAR." + k - } - - // no proprietary - if (nop && k.charAt(0) !== k.charAt(0).toLowerCase()) { - return [] - } - - if (typeof val === "number") val = val.toString(10) - - var s = new Buffer(" " + k + "=" + v + "\n") - , digits = Math.floor(Math.log(s.length) / Math.log(10)) + 1 - - // console.error("1 s=%j digits=%j s.length=%d", s.toString(), digits, s.length) - - // if adding that many digits will make it go over that length, - // then add one to it. For example, if the string is: - // " foo=bar\n" - // then that's 9 characters. With the "9", that bumps the length - // up to 10. However, this is invalid: - // "10 foo=bar\n" - // but, since that's actually 11 characters, since 10 adds another - // character to the length, and the length includes the number - // itself. In that case, just bump it up again. - if (s.length + digits >= Math.pow(10, digits)) digits += 1 - // console.error("2 s=%j digits=%j s.length=%d", s.toString(), digits, s.length) - - var len = digits + s.length - // console.error("3 s=%j digits=%j s.length=%d len=%d", s.toString(), digits, s.length, len) - var lenBuf = new Buffer("" + len) - if (lenBuf.length + s.length !== len) { - throw new Error("Bad length calculation\n"+ - "len="+len+"\n"+ - "lenBuf="+JSON.stringify(lenBuf.toString())+"\n"+ - "lenBuf.length="+lenBuf.length+"\n"+ - "digits="+digits+"\n"+ - "s="+JSON.stringify(s.toString())+"\n"+ - "s.length="+s.length) - } - - return [lenBuf, s] -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extended-header.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extended-header.js deleted file mode 100644 index 74f432ce..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extended-header.js +++ /dev/null @@ -1,140 +0,0 @@ -// An Entry consisting of: -// -// "%d %s=%s\n", <length>, <keyword>, <value> -// -// The length is a decimal number, and includes itself and the \n -// \0 does not terminate anything. Only the length terminates the string. -// Numeric values are decimal strings. - -module.exports = ExtendedHeader - -var Entry = require("./entry.js") - , inherits = require("inherits") - , tar = require("../tar.js") - , numeric = tar.numeric - , keyTrans = { "SCHILY.dev": "dev" - , "SCHILY.ino": "ino" - , "SCHILY.nlink": "nlink" } - -function ExtendedHeader () { - Entry.apply(this, arguments) - this.on("data", this._parse) - this.fields = {} - this._position = 0 - this._fieldPos = 0 - this._state = SIZE - this._sizeBuf = [] - this._keyBuf = [] - this._valBuf = [] - this._size = -1 - this._key = "" -} - -inherits(ExtendedHeader, Entry) -ExtendedHeader.prototype._parse = parse - -var s = 0 - , states = ExtendedHeader.states = {} - , SIZE = states.SIZE = s++ - , KEY = states.KEY = s++ - , VAL = states.VAL = s++ - , ERR = states.ERR = s++ - -Object.keys(states).forEach(function (s) { - states[states[s]] = states[s] -}) - -states[s] = null - -// char code values for comparison -var _0 = "0".charCodeAt(0) - , _9 = "9".charCodeAt(0) - , point = ".".charCodeAt(0) - , a = "a".charCodeAt(0) - , Z = "Z".charCodeAt(0) - , a = "a".charCodeAt(0) - , z = "z".charCodeAt(0) - , space = " ".charCodeAt(0) - , eq = "=".charCodeAt(0) - , cr = "\n".charCodeAt(0) - -function parse (c) { - if (this._state === ERR) return - - for ( var i = 0, l = c.length - ; i < l - ; this._position++, this._fieldPos++, i++) { - // console.error("top of loop, size="+this._size) - - var b = c[i] - - if (this._size >= 0 && this._fieldPos > this._size) { - error(this, "field exceeds length="+this._size) - return - } - - switch (this._state) { - case ERR: return - - case SIZE: - // console.error("parsing size, b=%d, rest=%j", b, c.slice(i).toString()) - if (b === space) { - this._state = KEY - // this._fieldPos = this._sizeBuf.length - this._size = parseInt(new Buffer(this._sizeBuf).toString(), 10) - this._sizeBuf.length = 0 - continue - } - if (b < _0 || b > _9) { - error(this, "expected [" + _0 + ".." + _9 + "], got " + b) - return - } - this._sizeBuf.push(b) - continue - - case KEY: - // can be any char except =, not > size. - if (b === eq) { - this._state = VAL - this._key = new Buffer(this._keyBuf).toString() - if (keyTrans[this._key]) this._key = keyTrans[this._key] - this._keyBuf.length = 0 - continue - } - this._keyBuf.push(b) - continue - - case VAL: - // field must end with cr - if (this._fieldPos === this._size - 1) { - // console.error("finished with "+this._key) - if (b !== cr) { - error(this, "expected \\n at end of field") - return - } - var val = new Buffer(this._valBuf).toString() - if (numeric[this._key]) { - val = parseFloat(val) - } - this.fields[this._key] = val - - this._valBuf.length = 0 - this._state = SIZE - this._size = -1 - this._fieldPos = -1 - continue - } - this._valBuf.push(b) - continue - } - } -} - -function error (me, msg) { - msg = "invalid header: " + msg - + "\nposition=" + me._position - + "\nfield position=" + me._fieldPos - - me.error(msg) - me.state = ERR -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extract.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extract.js deleted file mode 100644 index c34a81e2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extract.js +++ /dev/null @@ -1,78 +0,0 @@ -// give it a tarball and a path, and it'll dump the contents - -module.exports = Extract - -var tar = require("../tar.js") - , fstream = require("fstream") - , inherits = require("inherits") - , path = require("path") - -function Extract (opts) { - if (!(this instanceof Extract)) return new Extract(opts) - tar.Parse.apply(this) - - // have to dump into a directory - opts.type = "Directory" - opts.Directory = true - - if (typeof opts !== "object") { - opts = { path: opts } - } - - // better to drop in cwd? seems more standard. - opts.path = opts.path || path.resolve("node-tar-extract") - opts.type = "Directory" - opts.Directory = true - - // similar to --strip or --strip-components - opts.strip = +opts.strip - if (!opts.strip || opts.strip <= 0) opts.strip = 0 - - this._fst = fstream.Writer(opts) - - this.pause() - var me = this - - // Hardlinks in tarballs are relative to the root - // of the tarball. So, they need to be resolved against - // the target directory in order to be created properly. - me.on("entry", function (entry) { - // if there's a "strip" argument, then strip off that many - // path components. - if (opts.strip) { - var p = entry.path.split("/").slice(opts.strip).join("/") - entry.path = entry.props.path = p - if (entry.linkpath) { - var lp = entry.linkpath.split("/").slice(opts.strip).join("/") - entry.linkpath = entry.props.linkpath = lp - } - } - if (entry.type !== "Link") return - entry.linkpath = entry.props.linkpath = - path.join(opts.path, path.join("/", entry.props.linkpath)) - }) - - this._fst.on("ready", function () { - me.pipe(me._fst, { end: false }) - me.resume() - }) - - // this._fst.on("end", function () { - // console.error("\nEEEE Extract End", me._fst.path) - // }) - - this._fst.on("close", function () { - // console.error("\nEEEE Extract End", me._fst.path) - me.emit("end") - me.emit("close") - }) -} - -inherits(Extract, tar.Parse) - -Extract.prototype._streamEnd = function () { - var me = this - if (!me._ended) me.error("unexpected eof") - me._fst.end() - // my .end() is coming later. -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/global-header-writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/global-header-writer.js deleted file mode 100644 index 0bfc7b80..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/global-header-writer.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = GlobalHeaderWriter - -var ExtendedHeaderWriter = require("./extended-header-writer.js") - , inherits = require("inherits") - -inherits(GlobalHeaderWriter, ExtendedHeaderWriter) - -function GlobalHeaderWriter (props) { - if (!(this instanceof GlobalHeaderWriter)) { - return new GlobalHeaderWriter(props) - } - ExtendedHeaderWriter.call(this, props) - this.props.type = "g" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/header.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/header.js deleted file mode 100644 index 05b237c0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/header.js +++ /dev/null @@ -1,385 +0,0 @@ -// parse a 512-byte header block to a data object, or vice-versa -// If the data won't fit nicely in a simple header, then generate -// the appropriate extended header file, and return that. - -module.exports = TarHeader - -var tar = require("../tar.js") - , fields = tar.fields - , fieldOffs = tar.fieldOffs - , fieldEnds = tar.fieldEnds - , fieldSize = tar.fieldSize - , numeric = tar.numeric - , assert = require("assert").ok - , space = " ".charCodeAt(0) - , slash = "/".charCodeAt(0) - , bslash = process.platform === "win32" ? "\\".charCodeAt(0) : null - -function TarHeader (block) { - if (!(this instanceof TarHeader)) return new TarHeader(block) - if (block) this.decode(block) -} - -TarHeader.prototype = - { decode : decode - , encode: encode - , calcSum: calcSum - , checkSum: checkSum - } - -TarHeader.parseNumeric = parseNumeric -TarHeader.encode = encode -TarHeader.decode = decode - -// note that this will only do the normal ustar header, not any kind -// of extended posix header file. If something doesn't fit comfortably, -// then it will set obj.needExtended = true, and set the block to -// the closest approximation. -function encode (obj) { - if (!obj && !(this instanceof TarHeader)) throw new Error( - "encode must be called on a TarHeader, or supplied an object") - - obj = obj || this - var block = obj.block = new Buffer(512) - - // if the object has a "prefix", then that's actually an extension of - // the path field. - if (obj.prefix) { - // console.error("%% header encoding, got a prefix", obj.prefix) - obj.path = obj.prefix + "/" + obj.path - // console.error("%% header encoding, prefixed path", obj.path) - obj.prefix = "" - } - - obj.needExtended = false - - if (obj.mode) { - if (typeof obj.mode === "string") obj.mode = parseInt(obj.mode, 8) - obj.mode = obj.mode & 0777 - } - - for (var f = 0; fields[f] !== null; f ++) { - var field = fields[f] - , off = fieldOffs[f] - , end = fieldEnds[f] - , ret - - switch (field) { - case "cksum": - // special, done below, after all the others - break - - case "prefix": - // special, this is an extension of the "path" field. - // console.error("%% header encoding, skip prefix later") - break - - case "type": - // convert from long name to a single char. - var type = obj.type || "0" - if (type.length > 1) { - type = tar.types[obj.type] - if (!type) type = "0" - } - writeText(block, off, end, type) - break - - case "path": - // uses the "prefix" field if > 100 bytes, but <= 255 - var pathLen = Buffer.byteLength(obj.path) - , pathFSize = fieldSize[fields.path] - , prefFSize = fieldSize[fields.prefix] - - // paths between 100 and 255 should use the prefix field. - // longer than 255 - if (pathLen > pathFSize && - pathLen <= pathFSize + prefFSize) { - // need to find a slash somewhere in the middle so that - // path and prefix both fit in their respective fields - var searchStart = pathLen - 1 - pathFSize - , searchEnd = prefFSize - , found = false - , pathBuf = new Buffer(obj.path) - - for ( var s = searchStart - ; (s <= searchEnd) - ; s ++ ) { - if (pathBuf[s] === slash || pathBuf[s] === bslash) { - found = s - break - } - } - - if (found !== false) { - prefix = pathBuf.slice(0, found).toString("utf8") - path = pathBuf.slice(found + 1).toString("utf8") - - ret = writeText(block, off, end, path) - off = fieldOffs[fields.prefix] - end = fieldEnds[fields.prefix] - // console.error("%% header writing prefix", off, end, prefix) - ret = writeText(block, off, end, prefix) || ret - break - } - } - - // paths less than 100 chars don't need a prefix - // and paths longer than 255 need an extended header and will fail - // on old implementations no matter what we do here. - // Null out the prefix, and fallthrough to default. - // console.error("%% header writing no prefix") - var poff = fieldOffs[fields.prefix] - , pend = fieldEnds[fields.prefix] - writeText(block, poff, pend, "") - // fallthrough - - // all other fields are numeric or text - default: - ret = numeric[field] - ? writeNumeric(block, off, end, obj[field]) - : writeText(block, off, end, obj[field] || "") - break - } - obj.needExtended = obj.needExtended || ret - } - - var off = fieldOffs[fields.cksum] - , end = fieldEnds[fields.cksum] - - writeNumeric(block, off, end, calcSum.call(this, block)) - - return block -} - -// if it's a negative number, or greater than will fit, -// then use write256. -var MAXNUM = { 12: 077777777777 - , 11: 07777777777 - , 8 : 07777777 - , 7 : 0777777 } -function writeNumeric (block, off, end, num) { - var writeLen = end - off - , maxNum = MAXNUM[writeLen] || 0 - - num = num || 0 - // console.error(" numeric", num) - - if (num instanceof Date || - Object.prototype.toString.call(num) === "[object Date]") { - num = num.getTime() / 1000 - } - - if (num > maxNum || num < 0) { - write256(block, off, end, num) - // need an extended header if negative or too big. - return true - } - - // god, tar is so annoying - // if the string is small enough, you should put a space - // between the octal string and the \0, but if it doesn't - // fit, then don't. - var numStr = Math.floor(num).toString(8) - if (num < MAXNUM[writeLen - 1]) numStr += " " - - // pad with "0" chars - if (numStr.length < writeLen) { - numStr = (new Array(writeLen - numStr.length).join("0")) + numStr - } - - if (numStr.length !== writeLen - 1) { - throw new Error("invalid length: " + JSON.stringify(numStr) + "\n" + - "expected: "+writeLen) - } - block.write(numStr, off, writeLen, "utf8") - block[end - 1] = 0 -} - -function write256 (block, off, end, num) { - var buf = block.slice(off, end) - var positive = num >= 0 - buf[0] = positive ? 0x80 : 0xFF - - // get the number as a base-256 tuple - if (!positive) num *= -1 - var tuple = [] - do { - var n = num % 256 - tuple.push(n) - num = (num - n) / 256 - } while (num) - - var bytes = tuple.length - - var fill = buf.length - bytes - for (var i = 1; i < fill; i ++) { - buf[i] = positive ? 0 : 0xFF - } - - // tuple is a base256 number, with [0] as the *least* significant byte - // if it's negative, then we need to flip all the bits once we hit the - // first non-zero bit. The 2's-complement is (0x100 - n), and the 1's- - // complement is (0xFF - n). - var zero = true - for (i = bytes; i > 0; i --) { - var byte = tuple[bytes - i] - if (positive) buf[fill + i] = byte - else if (zero && byte === 0) buf[fill + i] = 0 - else if (zero) { - zero = false - buf[fill + i] = 0x100 - byte - } else buf[fill + i] = 0xFF - byte - } -} - -function writeText (block, off, end, str) { - // strings are written as utf8, then padded with \0 - var strLen = Buffer.byteLength(str) - , writeLen = Math.min(strLen, end - off) - // non-ascii fields need extended headers - // long fields get truncated - , needExtended = strLen !== str.length || strLen > writeLen - - // write the string, and null-pad - if (writeLen > 0) block.write(str, off, writeLen, "utf8") - for (var i = off + writeLen; i < end; i ++) block[i] = 0 - - return needExtended -} - -function calcSum (block) { - block = block || this.block - assert(Buffer.isBuffer(block) && block.length === 512) - - if (!block) throw new Error("Need block to checksum") - - // now figure out what it would be if the cksum was " " - var sum = 0 - , start = fieldOffs[fields.cksum] - , end = fieldEnds[fields.cksum] - - for (var i = 0; i < fieldOffs[fields.cksum]; i ++) { - sum += block[i] - } - - for (var i = start; i < end; i ++) { - sum += space - } - - for (var i = end; i < 512; i ++) { - sum += block[i] - } - - return sum -} - - -function checkSum (block) { - var sum = calcSum.call(this, block) - block = block || this.block - - var cksum = block.slice(fieldOffs[fields.cksum], fieldEnds[fields.cksum]) - cksum = parseNumeric(cksum) - - return cksum === sum -} - -function decode (block) { - block = block || this.block - assert(Buffer.isBuffer(block) && block.length === 512) - - this.block = block - this.cksumValid = this.checkSum() - - var prefix = null - - // slice off each field. - for (var f = 0; fields[f] !== null; f ++) { - var field = fields[f] - , val = block.slice(fieldOffs[f], fieldEnds[f]) - - switch (field) { - case "ustar": - // if not ustar, then everything after that is just padding. - if (val.toString() !== "ustar\0") { - this.ustar = false - return - } else { - // console.error("ustar:", val, val.toString()) - this.ustar = val.toString() - } - break - - // prefix is special, since it might signal the xstar header - case "prefix": - var atime = parseNumeric(val.slice(131, 131 + 12)) - , ctime = parseNumeric(val.slice(131 + 12, 131 + 12 + 12)) - if ((val[130] === 0 || val[130] === space) && - typeof atime === "number" && - typeof ctime === "number" && - val[131 + 12] === space && - val[131 + 12 + 12] === space) { - this.atime = atime - this.ctime = ctime - val = val.slice(0, 130) - } - prefix = val.toString("utf8").replace(/\0+$/, "") - // console.error("%% header reading prefix", prefix) - break - - // all other fields are null-padding text - // or a number. - default: - if (numeric[field]) { - this[field] = parseNumeric(val) - } else { - this[field] = val.toString("utf8").replace(/\0+$/, "") - } - break - } - } - - // if we got a prefix, then prepend it to the path. - if (prefix) { - this.path = prefix + "/" + this.path - // console.error("%% header got a prefix", this.path) - } -} - -function parse256 (buf) { - // first byte MUST be either 80 or FF - // 80 for positive, FF for 2's comp - var positive - if (buf[0] === 0x80) positive = true - else if (buf[0] === 0xFF) positive = false - else return null - - // build up a base-256 tuple from the least sig to the highest - var zero = false - , tuple = [] - for (var i = buf.length - 1; i > 0; i --) { - var byte = buf[i] - if (positive) tuple.push(byte) - else if (zero && byte === 0) tuple.push(0) - else if (zero) { - zero = false - tuple.push(0x100 - byte) - } else tuple.push(0xFF - byte) - } - - for (var sum = 0, i = 0, l = tuple.length; i < l; i ++) { - sum += tuple[i] * Math.pow(256, i) - } - - return positive ? sum : -1 * sum -} - -function parseNumeric (f) { - if (f[0] & 0x80) return parse256(f) - - var str = f.toString("utf8").split("\0")[0].trim() - , res = parseInt(str, 8) - - return isNaN(res) ? null : res -} - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/pack.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/pack.js deleted file mode 100644 index 3ff14dd6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/pack.js +++ /dev/null @@ -1,231 +0,0 @@ -// pipe in an fstream, and it'll make a tarball. -// key-value pair argument is global extended header props. - -module.exports = Pack - -var EntryWriter = require("./entry-writer.js") - , Stream = require("stream").Stream - , path = require("path") - , inherits = require("inherits") - , GlobalHeaderWriter = require("./global-header-writer.js") - , collect = require("fstream").collect - , eof = new Buffer(512) - -for (var i = 0; i < 512; i ++) eof[i] = 0 - -inherits(Pack, Stream) - -function Pack (props) { - // console.error("-- p ctor") - var me = this - if (!(me instanceof Pack)) return new Pack(props) - - if (props) me._noProprietary = props.noProprietary - else me._noProprietary = false - - me._global = props - - me.readable = true - me.writable = true - me._buffer = [] - // console.error("-- -- set current to null in ctor") - me._currentEntry = null - me._processing = false - - me._pipeRoot = null - me.on("pipe", function (src) { - if (src.root === me._pipeRoot) return - me._pipeRoot = src - src.on("end", function () { - me._pipeRoot = null - }) - me.add(src) - }) -} - -Pack.prototype.addGlobal = function (props) { - // console.error("-- p addGlobal") - if (this._didGlobal) return - this._didGlobal = true - - var me = this - GlobalHeaderWriter(props) - .on("data", function (c) { - me.emit("data", c) - }) - .end() -} - -Pack.prototype.add = function (stream) { - if (this._global && !this._didGlobal) this.addGlobal(this._global) - - if (this._ended) return this.emit("error", new Error("add after end")) - - collect(stream) - this._buffer.push(stream) - this._process() - this._needDrain = this._buffer.length > 0 - return !this._needDrain -} - -Pack.prototype.pause = function () { - this._paused = true - if (this._currentEntry) this._currentEntry.pause() - this.emit("pause") -} - -Pack.prototype.resume = function () { - this._paused = false - if (this._currentEntry) this._currentEntry.resume() - this.emit("resume") - this._process() -} - -Pack.prototype.end = function () { - this._ended = true - this._buffer.push(eof) - this._process() -} - -Pack.prototype._process = function () { - var me = this - if (me._paused || me._processing) { - return - } - - var entry = me._buffer.shift() - - if (!entry) { - if (me._needDrain) { - me.emit("drain") - } - return - } - - if (entry.ready === false) { - // console.error("-- entry is not ready", entry) - me._buffer.unshift(entry) - entry.on("ready", function () { - // console.error("-- -- ready!", entry) - me._process() - }) - return - } - - me._processing = true - - if (entry === eof) { - // need 2 ending null blocks. - me.emit("data", eof) - me.emit("data", eof) - me.emit("end") - me.emit("close") - return - } - - // Change the path to be relative to the root dir that was - // added to the tarball. - // - // XXX This should be more like how -C works, so you can - // explicitly set a root dir, and also explicitly set a pathname - // in the tarball to use. That way we can skip a lot of extra - // work when resolving symlinks for bundled dependencies in npm. - - var root = path.dirname((entry.root || entry).path) - var wprops = {} - - Object.keys(entry.props || {}).forEach(function (k) { - wprops[k] = entry.props[k] - }) - - if (me._noProprietary) wprops.noProprietary = true - - wprops.path = path.relative(root, entry.path || '') - - // actually not a matter of opinion or taste. - if (process.platform === "win32") { - wprops.path = wprops.path.replace(/\\/g, "/") - } - - if (!wprops.type) - wprops.type = 'Directory' - - switch (wprops.type) { - // sockets not supported - case "Socket": - return - - case "Directory": - wprops.path += "/" - wprops.size = 0 - break - - case "Link": - var lp = path.resolve(path.dirname(entry.path), entry.linkpath) - wprops.linkpath = path.relative(root, lp) || "." - wprops.size = 0 - break - - case "SymbolicLink": - var lp = path.resolve(path.dirname(entry.path), entry.linkpath) - wprops.linkpath = path.relative(path.dirname(entry.path), lp) || "." - wprops.size = 0 - break - } - - // console.error("-- new writer", wprops) - // if (!wprops.type) { - // // console.error("-- no type?", entry.constructor.name, entry) - // } - - // console.error("-- -- set current to new writer", wprops.path) - var writer = me._currentEntry = EntryWriter(wprops) - - writer.parent = me - - // writer.on("end", function () { - // // console.error("-- -- writer end", writer.path) - // }) - - writer.on("data", function (c) { - me.emit("data", c) - }) - - writer.on("header", function () { - Buffer.prototype.toJSON = function () { - return this.toString().split(/\0/).join(".") - } - // console.error("-- -- writer header %j", writer.props) - if (writer.props.size === 0) nextEntry() - }) - writer.on("close", nextEntry) - - var ended = false - function nextEntry () { - if (ended) return - ended = true - - // console.error("-- -- writer close", writer.path) - // console.error("-- -- set current to null", wprops.path) - me._currentEntry = null - me._processing = false - me._process() - } - - writer.on("error", function (er) { - // console.error("-- -- writer error", writer.path) - me.emit("error", er) - }) - - // if it's the root, then there's no need to add its entries, - // or data, since they'll be added directly. - if (entry === me._pipeRoot) { - // console.error("-- is the root, don't auto-add") - writer.add = null - } - - entry.pipe(writer) -} - -Pack.prototype.destroy = function () {} -Pack.prototype.write = function () {} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/parse.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/parse.js deleted file mode 100644 index 884e73db..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/parse.js +++ /dev/null @@ -1,270 +0,0 @@ - -// A writable stream. -// It emits "entry" events, which provide a readable stream that has -// header info attached. - -module.exports = Parse.create = Parse - -var stream = require("stream") - , Stream = stream.Stream - , BlockStream = require("block-stream") - , tar = require("../tar.js") - , TarHeader = require("./header.js") - , Entry = require("./entry.js") - , BufferEntry = require("./buffer-entry.js") - , ExtendedHeader = require("./extended-header.js") - , assert = require("assert").ok - , inherits = require("inherits") - , fstream = require("fstream") - -// reading a tar is a lot like reading a directory -// However, we're actually not going to run the ctor, -// since it does a stat and various other stuff. -// This inheritance gives us the pause/resume/pipe -// behavior that is desired. -inherits(Parse, fstream.Reader) - -function Parse () { - var me = this - if (!(me instanceof Parse)) return new Parse() - - // doesn't apply fstream.Reader ctor? - // no, becasue we don't want to stat/etc, we just - // want to get the entry/add logic from .pipe() - Stream.apply(me) - - me.writable = true - me.readable = true - me._stream = new BlockStream(512) - me.position = 0 - - me._stream.on("error", function (e) { - me.emit("error", e) - }) - - me._stream.on("data", function (c) { - me._process(c) - }) - - me._stream.on("end", function () { - me._streamEnd() - }) - - me._stream.on("drain", function () { - me.emit("drain") - }) -} - -// overridden in Extract class, since it needs to -// wait for its DirWriter part to finish before -// emitting "end" -Parse.prototype._streamEnd = function () { - var me = this - if (!me._ended) me.error("unexpected eof") - me.emit("end") -} - -// a tar reader is actually a filter, not just a readable stream. -// So, you should pipe a tarball stream into it, and it needs these -// write/end methods to do that. -Parse.prototype.write = function (c) { - if (this._ended) { - // gnutar puts a LOT of nulls at the end. - // you can keep writing these things forever. - // Just ignore them. - for (var i = 0, l = c.length; i > l; i ++) { - if (c[i] !== 0) return this.error("write() after end()") - } - return - } - return this._stream.write(c) -} - -Parse.prototype.end = function (c) { - this._ended = true - return this._stream.end(c) -} - -// don't need to do anything, since we're just -// proxying the data up from the _stream. -// Just need to override the parent's "Not Implemented" -// error-thrower. -Parse.prototype._read = function () {} - -Parse.prototype._process = function (c) { - assert(c && c.length === 512, "block size should be 512") - - // one of three cases. - // 1. A new header - // 2. A part of a file/extended header - // 3. One of two or more EOF null blocks - - if (this._entry) { - var entry = this._entry - entry.write(c) - if (entry._remaining === 0) { - entry.end() - this._entry = null - } - } else { - // either zeroes or a header - var zero = true - for (var i = 0; i < 512 && zero; i ++) { - zero = c[i] === 0 - } - - // eof is *at least* 2 blocks of nulls, and then the end of the - // file. you can put blocks of nulls between entries anywhere, - // so appending one tarball to another is technically valid. - // ending without the eof null blocks is not allowed, however. - if (zero) { - this._ended = this._eofStarted - this._eofStarted = true - } else { - this._ended = this._eofStarted = false - this._startEntry(c) - } - - } - - this.position += 512 -} - -// take a header chunk, start the right kind of entry. -Parse.prototype._startEntry = function (c) { - var header = new TarHeader(c) - , self = this - , entry - , ev - , EntryType - , onend - , meta = false - - if (null === header.size || !header.cksumValid) { - var e = new Error("invalid tar file") - e.header = header - e.tar_file_offset = this.position - e.tar_block = this.position / 512 - this.emit("error", e) - } - - switch (tar.types[header.type]) { - case "File": - case "OldFile": - case "Link": - case "SymbolicLink": - case "CharacterDevice": - case "BlockDevice": - case "Directory": - case "FIFO": - case "ContiguousFile": - case "GNUDumpDir": - // start a file. - // pass in any extended headers - // These ones consumers are typically most interested in. - EntryType = Entry - ev = "entry" - break - - case "GlobalExtendedHeader": - // extended headers that apply to the rest of the tarball - EntryType = ExtendedHeader - onend = function () { - self._global = self._global || {} - Object.keys(entry.fields).forEach(function (k) { - self._global[k] = entry.fields[k] - }) - } - ev = "globalExtendedHeader" - meta = true - break - - case "ExtendedHeader": - case "OldExtendedHeader": - // extended headers that apply to the next entry - EntryType = ExtendedHeader - onend = function () { - self._extended = entry.fields - } - ev = "extendedHeader" - meta = true - break - - case "NextFileHasLongLinkpath": - // set linkpath=<contents> in extended header - EntryType = BufferEntry - onend = function () { - self._extended = self._extended || {} - self._extended.linkpath = entry.body - } - ev = "longLinkpath" - meta = true - break - - case "NextFileHasLongPath": - case "OldGnuLongPath": - // set path=<contents> in file-extended header - EntryType = BufferEntry - onend = function () { - self._extended = self._extended || {} - self._extended.path = entry.body - } - ev = "longPath" - meta = true - break - - default: - // all the rest we skip, but still set the _entry - // member, so that we can skip over their data appropriately. - // emit an event to say that this is an ignored entry type? - EntryType = Entry - ev = "ignoredEntry" - break - } - - var global, extended - if (meta) { - global = extended = null - } else { - var global = this._global - var extended = this._extended - - // extendedHeader only applies to one entry, so once we start - // an entry, it's over. - this._extended = null - } - entry = new EntryType(header, extended, global) - entry.meta = meta - - // only proxy data events of normal files. - if (!meta) { - entry.on("data", function (c) { - me.emit("data", c) - }) - } - - if (onend) entry.on("end", onend) - - this._entry = entry - var me = this - - entry.on("pause", function () { - me.pause() - }) - - entry.on("resume", function () { - me.resume() - }) - - if (this.listeners("*").length) { - this.emit("*", ev, entry) - } - - this.emit(ev, entry) - - // Zero-byte entry. End immediately. - if (entry.props.size === 0) { - entry.end() - this._entry = null - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/LICENCE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/LICENCE deleted file mode 100644 index 74489e2e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/LICENCE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) Isaac Z. Schlueter -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/README.md deleted file mode 100644 index c16e9c46..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# block-stream - -A stream of blocks. - -Write data into it, and it'll output data in buffer blocks the size you -specify, padding with zeroes if necessary. - -```javascript -var block = new BlockStream(512) -fs.createReadStream("some-file").pipe(block) -block.pipe(fs.createWriteStream("block-file")) -``` - -When `.end()` or `.flush()` is called, it'll pad the block with zeroes. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/block-stream-pause.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/block-stream-pause.js deleted file mode 100644 index 9328844a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/block-stream-pause.js +++ /dev/null @@ -1,70 +0,0 @@ -var BlockStream = require("../block-stream.js") - -var blockSizes = [16, 25, 1024] - , writeSizes = [4, 8, 15, 16, 17, 64, 100] - , writeCounts = [1, 10, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize, {nopad: true }) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - - f.on("data", function (c) { - timeouts ++ - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - f.pause() - setTimeout(function () { - timeouts -- - - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - f.resume() - }, 100) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = writeSize * writeCount * 2 - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 100) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/block-stream.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/block-stream.js deleted file mode 100644 index 1141f3a8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/block-stream.js +++ /dev/null @@ -1,68 +0,0 @@ -var BlockStream = require("../block-stream.js") - -var blockSizes = [16, 25, 1024] - , writeSizes = [4, 8, 15, 16, 17, 64, 100] - , writeCounts = [1, 10, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize, {nopad: true }) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - - f.on("data", function (c) { - timeouts ++ - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - setTimeout(function () { - timeouts -- - - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - }, 100) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = writeSize * writeCount * 2 - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 100) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/dropper-pause.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/dropper-pause.js deleted file mode 100644 index 93e4068e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/dropper-pause.js +++ /dev/null @@ -1,70 +0,0 @@ -var BlockStream = require("dropper") - -var blockSizes = [16, 25, 1024] - , writeSizes = [4, 8, 15, 16, 17, 64, 100] - , writeCounts = [1, 10, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize, {nopad: true }) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - - f.on("data", function (c) { - timeouts ++ - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - f.pause() - setTimeout(function () { - timeouts -- - - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - f.resume() - }, 100) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = writeSize * writeCount * 2 - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 100) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/dropper.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/dropper.js deleted file mode 100644 index 55fa1330..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/dropper.js +++ /dev/null @@ -1,68 +0,0 @@ -var BlockStream = require("dropper") - -var blockSizes = [16, 25, 1024] - , writeSizes = [4, 8, 15, 16, 17, 64, 100] - , writeCounts = [1, 10, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize, {nopad: true }) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - - f.on("data", function (c) { - timeouts ++ - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - setTimeout(function () { - timeouts -- - - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - }, 100) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = writeSize * writeCount * 2 - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 100) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/block-stream.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/block-stream.js deleted file mode 100644 index 008de035..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/block-stream.js +++ /dev/null @@ -1,209 +0,0 @@ -// write data to it, and it'll emit data in 512 byte blocks. -// if you .end() or .flush(), it'll emit whatever it's got, -// padded with nulls to 512 bytes. - -module.exports = BlockStream - -var Stream = require("stream").Stream - , inherits = require("inherits") - , assert = require("assert").ok - , debug = process.env.DEBUG ? console.error : function () {} - -function BlockStream (size, opt) { - this.writable = this.readable = true - this._opt = opt || {} - this._chunkSize = size || 512 - this._offset = 0 - this._buffer = [] - this._bufferLength = 0 - if (this._opt.nopad) this._zeroes = false - else { - this._zeroes = new Buffer(this._chunkSize) - for (var i = 0; i < this._chunkSize; i ++) { - this._zeroes[i] = 0 - } - } -} - -inherits(BlockStream, Stream) - -BlockStream.prototype.write = function (c) { - // debug(" BS write", c) - if (this._ended) throw new Error("BlockStream: write after end") - if (c && !Buffer.isBuffer(c)) c = new Buffer(c + "") - if (c.length) { - this._buffer.push(c) - this._bufferLength += c.length - } - // debug("pushed onto buffer", this._bufferLength) - if (this._bufferLength >= this._chunkSize) { - if (this._paused) { - // debug(" BS paused, return false, need drain") - this._needDrain = true - return false - } - this._emitChunk() - } - return true -} - -BlockStream.prototype.pause = function () { - // debug(" BS pausing") - this._paused = true -} - -BlockStream.prototype.resume = function () { - // debug(" BS resume") - this._paused = false - return this._emitChunk() -} - -BlockStream.prototype.end = function (chunk) { - // debug("end", chunk) - if (typeof chunk === "function") cb = chunk, chunk = null - if (chunk) this.write(chunk) - this._ended = true - this.flush() -} - -BlockStream.prototype.flush = function () { - this._emitChunk(true) -} - -BlockStream.prototype._emitChunk = function (flush) { - // debug("emitChunk flush=%j emitting=%j paused=%j", flush, this._emitting, this._paused) - - // emit a <chunkSize> chunk - if (flush && this._zeroes) { - // debug(" BS push zeroes", this._bufferLength) - // push a chunk of zeroes - var padBytes = (this._bufferLength % this._chunkSize) - if (padBytes !== 0) padBytes = this._chunkSize - padBytes - if (padBytes > 0) { - // debug("padBytes", padBytes, this._zeroes.slice(0, padBytes)) - this._buffer.push(this._zeroes.slice(0, padBytes)) - this._bufferLength += padBytes - // debug(this._buffer[this._buffer.length - 1].length, this._bufferLength) - } - } - - if (this._emitting || this._paused) return - this._emitting = true - - // debug(" BS entering loops") - var bufferIndex = 0 - while (this._bufferLength >= this._chunkSize && - (flush || !this._paused)) { - // debug(" BS data emission loop", this._bufferLength) - - var out - , outOffset = 0 - , outHas = this._chunkSize - - while (outHas > 0 && (flush || !this._paused) ) { - // debug(" BS data inner emit loop", this._bufferLength) - var cur = this._buffer[bufferIndex] - , curHas = cur.length - this._offset - // debug("cur=", cur) - // debug("curHas=%j", curHas) - // If it's not big enough to fill the whole thing, then we'll need - // to copy multiple buffers into one. However, if it is big enough, - // then just slice out the part we want, to save unnecessary copying. - // Also, need to copy if we've already done some copying, since buffers - // can't be joined like cons strings. - if (out || curHas < outHas) { - out = out || new Buffer(this._chunkSize) - cur.copy(out, outOffset, - this._offset, this._offset + Math.min(curHas, outHas)) - } else if (cur.length === outHas && this._offset === 0) { - // shortcut -- cur is exactly long enough, and no offset. - out = cur - } else { - // slice out the piece of cur that we need. - out = cur.slice(this._offset, this._offset + outHas) - } - - if (curHas > outHas) { - // means that the current buffer couldn't be completely output - // update this._offset to reflect how much WAS written - this._offset += outHas - outHas = 0 - } else { - // output the entire current chunk. - // toss it away - outHas -= curHas - outOffset += curHas - bufferIndex ++ - this._offset = 0 - } - } - - this._bufferLength -= this._chunkSize - assert(out.length === this._chunkSize) - // debug("emitting data", out) - // debug(" BS emitting, paused=%j", this._paused, this._bufferLength) - this.emit("data", out) - out = null - } - // debug(" BS out of loops", this._bufferLength) - - // whatever is left, it's not enough to fill up a block, or we're paused - this._buffer = this._buffer.slice(bufferIndex) - if (this._paused) { - // debug(" BS paused, leaving", this._bufferLength) - this._needsDrain = true - this._emitting = false - return - } - - // if flushing, and not using null-padding, then need to emit the last - // chunk(s) sitting in the queue. We know that it's not enough to - // fill up a whole block, because otherwise it would have been emitted - // above, but there may be some offset. - var l = this._buffer.length - if (flush && !this._zeroes && l) { - if (l === 1) { - if (this._offset) { - this.emit("data", this._buffer[0].slice(this._offset)) - } else { - this.emit("data", this._buffer[0]) - } - } else { - var outHas = this._bufferLength - , out = new Buffer(outHas) - , outOffset = 0 - for (var i = 0; i < l; i ++) { - var cur = this._buffer[i] - , curHas = cur.length - this._offset - cur.copy(out, outOffset, this._offset) - this._offset = 0 - outOffset += curHas - this._bufferLength -= curHas - } - this.emit("data", out) - } - // truncate - this._buffer.length = 0 - this._bufferLength = 0 - this._offset = 0 - } - - // now either drained or ended - // debug("either draining, or ended", this._bufferLength, this._ended) - // means that we've flushed out all that we can so far. - if (this._needDrain) { - // debug("emitting drain", this._bufferLength) - this._needDrain = false - this.emit("drain") - } - - if ((this._bufferLength === 0) && this._ended && !this._endEmitted) { - // debug("emitting end", this._bufferLength) - this._endEmitted = true - this.emit("end") - } - - this._emitting = false - - // debug(" BS no longer emitting", flush, this._paused, this._emitting, this._bufferLength, this._chunkSize) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/package.json deleted file mode 100644 index a9dec954..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "name": "block-stream", - "description": "a stream of blocks", - "version": "0.0.7", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/block-stream.git" - }, - "engines": { - "node": "0.4 || >=0.5.8" - }, - "main": "block-stream.js", - "dependencies": { - "inherits": "~2.0.0" - }, - "devDependencies": { - "tap": "0.x" - }, - "scripts": { - "test": "tap test/" - }, - "license": "BSD", - "readme": "# block-stream\n\nA stream of blocks.\n\nWrite data into it, and it'll output data in buffer blocks the size you\nspecify, padding with zeroes if necessary.\n\n```javascript\nvar block = new BlockStream(512)\nfs.createReadStream(\"some-file\").pipe(block)\nblock.pipe(fs.createWriteStream(\"block-file\"))\n```\n\nWhen `.end()` or `.flush()` is called, it'll pad the block with zeroes.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/block-stream/issues" - }, - "homepage": "https://github.com/isaacs/block-stream", - "_id": "block-stream@0.0.7", - "dist": { - "shasum": "f02594aed4110922c417d5d634b45e55a4ffaefd" - }, - "_from": "block-stream@*", - "_resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.7.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/basic.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/basic.js deleted file mode 100644 index b4b93051..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/basic.js +++ /dev/null @@ -1,27 +0,0 @@ -var tap = require("tap") - , BlockStream = require("../block-stream.js") - -tap.test("basic test", function (t) { - var b = new BlockStream(16) - var fs = require("fs") - var fstr = fs.createReadStream(__filename, {encoding: "utf8"}) - fstr.pipe(b) - - var stat - t.doesNotThrow(function () { - stat = fs.statSync(__filename) - }, "stat should not throw") - - var totalBytes = 0 - b.on("data", function (c) { - t.equal(c.length, 16, "chunks should be 16 bytes long") - t.type(c, Buffer, "chunks should be buffer objects") - totalBytes += c.length - }) - b.on("end", function () { - var expectedBytes = stat.size + (16 - stat.size % 16) - t.equal(totalBytes, expectedBytes, "Should be multiple of 16") - t.end() - }) - -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/nopad-thorough.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/nopad-thorough.js deleted file mode 100644 index 7a8de88b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/nopad-thorough.js +++ /dev/null @@ -1,68 +0,0 @@ -var BlockStream = require("../block-stream.js") - -var blockSizes = [16]//, 25]//, 1024] - , writeSizes = [4, 15, 16, 17, 64 ]//, 64, 100] - , writeCounts = [1, 10]//, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize, {nopad: true }) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - - f.on("data", function (c) { - timeouts ++ - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - setTimeout(function () { - timeouts -- - - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - }, 100) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = writeSize * writeCount * 2 - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 100) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/nopad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/nopad.js deleted file mode 100644 index 6d38429f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/nopad.js +++ /dev/null @@ -1,57 +0,0 @@ -var BlockStream = require("../") -var tap = require("tap") - - -tap.test("don't pad, small writes", function (t) { - var f = new BlockStream(16, { nopad: true }) - t.plan(1) - - f.on("data", function (c) { - t.equal(c.toString(), "abc", "should get 'abc'") - }) - - f.on("end", function () { t.end() }) - - f.write(new Buffer("a")) - f.write(new Buffer("b")) - f.write(new Buffer("c")) - f.end() -}) - -tap.test("don't pad, exact write", function (t) { - var f = new BlockStream(16, { nopad: true }) - t.plan(1) - - var first = true - f.on("data", function (c) { - if (first) { - first = false - t.equal(c.toString(), "abcdefghijklmnop", "first chunk") - } else { - t.fail("should only get one") - } - }) - - f.on("end", function () { t.end() }) - - f.end(new Buffer("abcdefghijklmnop")) -}) - -tap.test("don't pad, big write", function (t) { - var f = new BlockStream(16, { nopad: true }) - t.plan(2) - - var first = true - f.on("data", function (c) { - if (first) { - first = false - t.equal(c.toString(), "abcdefghijklmnop", "first chunk") - } else { - t.equal(c.toString(), "q") - } - }) - - f.on("end", function () { t.end() }) - - f.end(new Buffer("abcdefghijklmnopq")) -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/pause-resume.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/pause-resume.js deleted file mode 100644 index 64d0d091..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/pause-resume.js +++ /dev/null @@ -1,73 +0,0 @@ -var BlockStream = require("../block-stream.js") - -var blockSizes = [16] - , writeSizes = [15, 16, 17] - , writeCounts = [1, 10]//, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - var paused = false - - f.on("data", function (c) { - timeouts ++ - t.notOk(paused, "should not be paused when emitting data") - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - paused = true - f.pause() - process.nextTick(function () { - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - paused = false - f.resume() - timeouts -- - }) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = expectChunks * blockSize - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 200) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/thorough.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/thorough.js deleted file mode 100644 index 1cc9ea08..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/thorough.js +++ /dev/null @@ -1,68 +0,0 @@ -var BlockStream = require("../block-stream.js") - -var blockSizes = [16]//, 25]//, 1024] - , writeSizes = [4, 15, 16, 17, 64 ]//, 64, 100] - , writeCounts = [1, 10]//, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - - f.on("data", function (c) { - timeouts ++ - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - setTimeout(function () { - timeouts -- - - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - }, 100) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = expectChunks * blockSize - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 100) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/two-stream.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/two-stream.js deleted file mode 100644 index c6db79a4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/two-stream.js +++ /dev/null @@ -1,59 +0,0 @@ -var log = console.log, - assert = require( 'assert' ), - BlockStream = require("../block-stream.js"), - isize = 0, tsize = 0, fsize = 0, psize = 0, i = 0, - filter = null, paper = null, stack = null, - -// a source data buffer -tsize = 1 * 1024; // <- 1K -stack = new Buffer( tsize ); -for ( ; i < tsize; i++) stack[i] = "x".charCodeAt(0); - -isize = 1 * 1024; // <- initial packet size with 4K no bug! -fsize = 2 * 1024 ; // <- first block-stream size -psize = Math.ceil( isize / 6 ); // <- second block-stream size - -fexpected = Math.ceil( tsize / fsize ); // <- packets expected for first -pexpected = Math.ceil( tsize / psize ); // <- packets expected for second - - -filter = new BlockStream( fsize, { nopad : true } ); -paper = new BlockStream( psize, { nopad : true } ); - - -var fcounter = 0; -filter.on( 'data', function (c) { - // verify that they're not null-padded - for (var i = 0; i < c.length; i ++) { - assert.strictEqual(c[i], "x".charCodeAt(0)) - } - ++fcounter; -} ); - -var pcounter = 0; -paper.on( 'data', function (c) { - // verify that they're not null-padded - for (var i = 0; i < c.length; i ++) { - assert.strictEqual(c[i], "x".charCodeAt(0)) - } - ++pcounter; -} ); - -filter.pipe( paper ); - -filter.on( 'end', function () { - log("fcounter: %s === %s", fcounter, fexpected) - assert.strictEqual( fcounter, fexpected ); -} ); - -paper.on( 'end', function () { - log("pcounter: %s === %s", pcounter, pexpected); - assert.strictEqual( pcounter, pexpected ); -} ); - - -for ( i = 0, j = isize; j <= tsize; j += isize ) { - filter.write( stack.slice( j - isize, j ) ); -} - -filter.end(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/.npmignore deleted file mode 100644 index 494272a8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -.*.swp -node_modules/ -examples/deep-copy/ -examples/path/ -examples/filter-copy/ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/.travis.yml deleted file mode 100644 index 2d26206d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - 0.6 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/README.md deleted file mode 100644 index 9d8cb77e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/README.md +++ /dev/null @@ -1,76 +0,0 @@ -Like FS streams, but with stat on them, and supporting directories and -symbolic links, as well as normal files. Also, you can use this to set -the stats on a file, even if you don't change its contents, or to create -a symlink, etc. - -So, for example, you can "write" a directory, and it'll call `mkdir`. You -can specify a uid and gid, and it'll call `chown`. You can specify a -`mtime` and `atime`, and it'll call `utimes`. You can call it a symlink -and provide a `linkpath` and it'll call `symlink`. - -Note that it won't automatically resolve symbolic links. So, if you -call `fstream.Reader('/some/symlink')` then you'll get an object -that stats and then ends immediately (since it has no data). To follow -symbolic links, do this: `fstream.Reader({path:'/some/symlink', follow: -true })`. - -There are various checks to make sure that the bytes emitted are the -same as the intended size, if the size is set. - -## Examples - -```javascript -fstream - .Writer({ path: "path/to/file" - , mode: 0755 - , size: 6 - }) - .write("hello\n") - .end() -``` - -This will create the directories if they're missing, and then write -`hello\n` into the file, chmod it to 0755, and assert that 6 bytes have -been written when it's done. - -```javascript -fstream - .Writer({ path: "path/to/file" - , mode: 0755 - , size: 6 - , flags: "a" - }) - .write("hello\n") - .end() -``` - -You can pass flags in, if you want to append to a file. - -```javascript -fstream - .Writer({ path: "path/to/symlink" - , linkpath: "./file" - , SymbolicLink: true - , mode: "0755" // octal strings supported - }) - .end() -``` - -If isSymbolicLink is a function, it'll be called, and if it returns -true, then it'll treat it as a symlink. If it's not a function, then -any truish value will make a symlink, or you can set `type: -'SymbolicLink'`, which does the same thing. - -Note that the linkpath is relative to the symbolic link location, not -the parent dir or cwd. - -```javascript -fstream - .Reader("path/to/dir") - .pipe(fstream.Writer("path/to/other/dir")) -``` - -This will do like `cp -Rp path/to/dir path/to/other/dir`. If the other -dir exists and isn't a directory, then it'll emit an error. It'll also -set the uid, gid, mode, etc. to be identical. In this way, it's more -like `rsync -a` than simply a copy. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/filter-pipe.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/filter-pipe.js deleted file mode 100644 index c6b55b3e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/filter-pipe.js +++ /dev/null @@ -1,131 +0,0 @@ -var fstream = require("../fstream.js") -var path = require("path") - -var r = fstream.Reader({ path: path.dirname(__dirname) - , filter: function () { - return !this.basename.match(/^\./) && - !this.basename.match(/^node_modules$/) - !this.basename.match(/^deep-copy$/) - !this.basename.match(/^filter-copy$/) - } - }) - -// this writer will only write directories -var w = fstream.Writer({ path: path.resolve(__dirname, "filter-copy") - , type: "Directory" - , filter: function () { - return this.type === "Directory" - } - }) - -var indent = "" -var escape = {} - -r.on("entry", appears) -r.on("ready", function () { - console.error("ready to begin!", r.path) -}) - -function appears (entry) { - console.error(indent + "a %s appears!", entry.type, entry.basename, typeof entry.basename) - if (foggy) { - console.error("FOGGY!") - var p = entry - do { - console.error(p.depth, p.path, p._paused) - } while (p = p.parent) - - throw new Error("\033[mshould not have entries while foggy") - } - indent += "\t" - entry.on("data", missile(entry)) - entry.on("end", runaway(entry)) - entry.on("entry", appears) -} - -var foggy -function missile (entry) { - if (entry.type === "Directory") { - var ended = false - entry.once("end", function () { ended = true }) - return function (c) { - // throw in some pathological pause()/resume() behavior - // just for extra fun. - process.nextTick(function () { - if (!foggy && !ended) { // && Math.random() < 0.3) { - console.error(indent +"%s casts a spell", entry.basename) - console.error("\na slowing fog comes over the battlefield...\n\033[32m") - entry.pause() - entry.once("resume", liftFog) - foggy = setTimeout(liftFog, 1000) - - function liftFog (who) { - if (!foggy) return - if (who) { - console.error("%s breaks the spell!", who && who.path) - } else { - console.error("the spell expires!") - } - console.error("\033[mthe fog lifts!\n") - clearTimeout(foggy) - foggy = null - if (entry._paused) entry.resume() - } - - } - }) - } - } - - return function (c) { - var e = Math.random() < 0.5 - console.error(indent + "%s %s for %d damage!", - entry.basename, - e ? "is struck" : "fires a chunk", - c.length) - } -} - -function runaway (entry) { return function () { - var e = Math.random() < 0.5 - console.error(indent + "%s %s", - entry.basename, - e ? "turns to flee" : "is vanquished!") - indent = indent.slice(0, -1) -}} - - -w.on("entry", attacks) -//w.on("ready", function () { attacks(w) }) -function attacks (entry) { - console.error(indent + "%s %s!", entry.basename, - entry.type === "Directory" ? "calls for backup" : "attacks") - entry.on("entry", attacks) -} - -ended = false -var i = 1 -r.on("end", function () { - if (foggy) clearTimeout(foggy) - console.error("\033[mIT'S OVER!!") - console.error("A WINNAR IS YOU!") - - console.log("ok " + (i ++) + " A WINNAR IS YOU") - ended = true - // now go through and verify that everything in there is a dir. - var p = path.resolve(__dirname, "filter-copy") - var checker = fstream.Reader({ path: p }) - checker.checker = true - checker.on("child", function (e) { - var ok = e.type === "Directory" - console.log((ok ? "" : "not ") + "ok " + (i ++) + - " should be a dir: " + - e.path.substr(checker.path.length + 1)) - }) -}) - -process.on("exit", function () { - console.log((ended ? "" : "not ") + "ok " + (i ++) + " ended") -}) - -r.pipe(w) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/pipe.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/pipe.js deleted file mode 100644 index 648ec849..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/pipe.js +++ /dev/null @@ -1,115 +0,0 @@ -var fstream = require("../fstream.js") -var path = require("path") - -var r = fstream.Reader({ path: path.dirname(__dirname) - , filter: function () { - return !this.basename.match(/^\./) && - !this.basename.match(/^node_modules$/) - !this.basename.match(/^deep-copy$/) - } - }) - -var w = fstream.Writer({ path: path.resolve(__dirname, "deep-copy") - , type: "Directory" - }) - -var indent = "" -var escape = {} - -r.on("entry", appears) -r.on("ready", function () { - console.error("ready to begin!", r.path) -}) - -function appears (entry) { - console.error(indent + "a %s appears!", entry.type, entry.basename, typeof entry.basename, entry) - if (foggy) { - console.error("FOGGY!") - var p = entry - do { - console.error(p.depth, p.path, p._paused) - } while (p = p.parent) - - throw new Error("\033[mshould not have entries while foggy") - } - indent += "\t" - entry.on("data", missile(entry)) - entry.on("end", runaway(entry)) - entry.on("entry", appears) -} - -var foggy -function missile (entry) { - if (entry.type === "Directory") { - var ended = false - entry.once("end", function () { ended = true }) - return function (c) { - // throw in some pathological pause()/resume() behavior - // just for extra fun. - process.nextTick(function () { - if (!foggy && !ended) { // && Math.random() < 0.3) { - console.error(indent +"%s casts a spell", entry.basename) - console.error("\na slowing fog comes over the battlefield...\n\033[32m") - entry.pause() - entry.once("resume", liftFog) - foggy = setTimeout(liftFog, 10) - - function liftFog (who) { - if (!foggy) return - if (who) { - console.error("%s breaks the spell!", who && who.path) - } else { - console.error("the spell expires!") - } - console.error("\033[mthe fog lifts!\n") - clearTimeout(foggy) - foggy = null - if (entry._paused) entry.resume() - } - - } - }) - } - } - - return function (c) { - var e = Math.random() < 0.5 - console.error(indent + "%s %s for %d damage!", - entry.basename, - e ? "is struck" : "fires a chunk", - c.length) - } -} - -function runaway (entry) { return function () { - var e = Math.random() < 0.5 - console.error(indent + "%s %s", - entry.basename, - e ? "turns to flee" : "is vanquished!") - indent = indent.slice(0, -1) -}} - - -w.on("entry", attacks) -//w.on("ready", function () { attacks(w) }) -function attacks (entry) { - console.error(indent + "%s %s!", entry.basename, - entry.type === "Directory" ? "calls for backup" : "attacks") - entry.on("entry", attacks) -} - -ended = false -r.on("end", function () { - if (foggy) clearTimeout(foggy) - console.error("\033[mIT'S OVER!!") - console.error("A WINNAR IS YOU!") - - console.log("ok 1 A WINNAR IS YOU") - ended = true -}) - -process.on("exit", function () { - console.log((ended ? "" : "not ") + "ok 2 ended") -}) - -r.pipe(w) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/reader.js deleted file mode 100644 index 9aa1a953..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/reader.js +++ /dev/null @@ -1,54 +0,0 @@ -var fstream = require("../fstream.js") -var tap = require("tap") -var fs = require("fs") -var path = require("path") -var children = -1 -var dir = path.dirname(__dirname) - -var gotReady = false -var ended = false - -tap.test("reader test", function (t) { - - var r = fstream.Reader({ path: dir - , filter: function () { - // return this.parent === r - return this.parent === r || this === r - } - }) - - r.on("ready", function () { - gotReady = true - children = fs.readdirSync(dir).length - console.error("Setting expected children to "+children) - t.equal(r.type, "Directory", "should be a directory") - }) - - r.on("entry", function (entry) { - children -- - if (!gotReady) { - t.fail("children before ready!") - } - t.equal(entry.dirname, r.path, "basename is parent dir") - }) - - r.on("error", function (er) { - t.fail(er) - t.end() - process.exit(1) - }) - - r.on("end", function () { - t.equal(children, 0, "should have seen all children") - ended = true - }) - - var closed = false - r.on("close", function () { - t.ok(ended, "saw end before close") - t.notOk(closed, "close should only happen once") - closed = true - t.end() - }) - -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/symlink-write.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/symlink-write.js deleted file mode 100644 index d7816d24..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/symlink-write.js +++ /dev/null @@ -1,24 +0,0 @@ -var fstream = require("../fstream.js") - , closed = false - -fstream - .Writer({ path: "path/to/symlink" - , linkpath: "./file" - , isSymbolicLink: true - , mode: "0755" // octal strings supported - }) - .on("close", function () { - closed = true - var fs = require("fs") - var s = fs.lstatSync("path/to/symlink") - var isSym = s.isSymbolicLink() - console.log((isSym?"":"not ") +"ok 1 should be symlink") - var t = fs.readlinkSync("path/to/symlink") - var isTarget = t === "./file" - console.log((isTarget?"":"not ") +"ok 2 should link to ./file") - }) - .end() - -process.on("exit", function () { - console.log((closed?"":"not ")+"ok 3 should be closed") -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/fstream.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/fstream.js deleted file mode 100644 index c66d26f5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/fstream.js +++ /dev/null @@ -1,31 +0,0 @@ -exports.Abstract = require("./lib/abstract.js") -exports.Reader = require("./lib/reader.js") -exports.Writer = require("./lib/writer.js") - -exports.File = - { Reader: require("./lib/file-reader.js") - , Writer: require("./lib/file-writer.js") } - -exports.Dir = - { Reader : require("./lib/dir-reader.js") - , Writer : require("./lib/dir-writer.js") } - -exports.Link = - { Reader : require("./lib/link-reader.js") - , Writer : require("./lib/link-writer.js") } - -exports.Proxy = - { Reader : require("./lib/proxy-reader.js") - , Writer : require("./lib/proxy-writer.js") } - -exports.Reader.Dir = exports.DirReader = exports.Dir.Reader -exports.Reader.File = exports.FileReader = exports.File.Reader -exports.Reader.Link = exports.LinkReader = exports.Link.Reader -exports.Reader.Proxy = exports.ProxyReader = exports.Proxy.Reader - -exports.Writer.Dir = exports.DirWriter = exports.Dir.Writer -exports.Writer.File = exports.FileWriter = exports.File.Writer -exports.Writer.Link = exports.LinkWriter = exports.Link.Writer -exports.Writer.Proxy = exports.ProxyWriter = exports.Proxy.Writer - -exports.collect = require("./lib/collect.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/abstract.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/abstract.js deleted file mode 100644 index 11ef0e28..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/abstract.js +++ /dev/null @@ -1,85 +0,0 @@ -// the parent class for all fstreams. - -module.exports = Abstract - -var Stream = require("stream").Stream - , inherits = require("inherits") - -function Abstract () { - Stream.call(this) -} - -inherits(Abstract, Stream) - -Abstract.prototype.on = function (ev, fn) { - if (ev === "ready" && this.ready) { - process.nextTick(fn.bind(this)) - } else { - Stream.prototype.on.call(this, ev, fn) - } - return this -} - -Abstract.prototype.abort = function () { - this._aborted = true - this.emit("abort") -} - -Abstract.prototype.destroy = function () {} - -Abstract.prototype.warn = function (msg, code) { - var me = this - , er = decorate(msg, code, me) - if (!me.listeners("warn")) { - console.error("%s %s\n" + - "path = %s\n" + - "syscall = %s\n" + - "fstream_type = %s\n" + - "fstream_path = %s\n" + - "fstream_unc_path = %s\n" + - "fstream_class = %s\n" + - "fstream_stack =\n%s\n", - code || "UNKNOWN", - er.stack, - er.path, - er.syscall, - er.fstream_type, - er.fstream_path, - er.fstream_unc_path, - er.fstream_class, - er.fstream_stack.join("\n")) - } else { - me.emit("warn", er) - } -} - -Abstract.prototype.info = function (msg, code) { - this.emit("info", msg, code) -} - -Abstract.prototype.error = function (msg, code, th) { - var er = decorate(msg, code, this) - if (th) throw er - else this.emit("error", er) -} - -function decorate (er, code, me) { - if (!(er instanceof Error)) er = new Error(er) - er.code = er.code || code - er.path = er.path || me.path - er.fstream_type = er.fstream_type || me.type - er.fstream_path = er.fstream_path || me.path - if (me._path !== me.path) { - er.fstream_unc_path = er.fstream_unc_path || me._path - } - if (me.linkpath) { - er.fstream_linkpath = er.fstream_linkpath || me.linkpath - } - er.fstream_class = er.fstream_class || me.constructor.name - er.fstream_stack = er.fstream_stack || - new Error().stack.split(/\n/).slice(3).map(function (s) { - return s.replace(/^ at /, "") - }) - - return er -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/collect.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/collect.js deleted file mode 100644 index a36f780e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/collect.js +++ /dev/null @@ -1,67 +0,0 @@ -module.exports = collect - -function collect (stream) { - if (stream._collected) return - - stream._collected = true - stream.pause() - - stream.on("data", save) - stream.on("end", save) - var buf = [] - function save (b) { - if (typeof b === "string") b = new Buffer(b) - if (Buffer.isBuffer(b) && !b.length) return - buf.push(b) - } - - stream.on("entry", saveEntry) - var entryBuffer = [] - function saveEntry (e) { - collect(e) - entryBuffer.push(e) - } - - stream.on("proxy", proxyPause) - function proxyPause (p) { - p.pause() - } - - - // replace the pipe method with a new version that will - // unlock the buffered stuff. if you just call .pipe() - // without a destination, then it'll re-play the events. - stream.pipe = (function (orig) { return function (dest) { - // console.error(" === open the pipes", dest && dest.path) - - // let the entries flow through one at a time. - // Once they're all done, then we can resume completely. - var e = 0 - ;(function unblockEntry () { - var entry = entryBuffer[e++] - // console.error(" ==== unblock entry", entry && entry.path) - if (!entry) return resume() - entry.on("end", unblockEntry) - if (dest) dest.add(entry) - else stream.emit("entry", entry) - })() - - function resume () { - stream.removeListener("entry", saveEntry) - stream.removeListener("data", save) - stream.removeListener("end", save) - - stream.pipe = orig - if (dest) stream.pipe(dest) - - buf.forEach(function (b) { - if (b) stream.emit("data", b) - else stream.emit("end") - }) - - stream.resume() - } - - return dest - }})(stream.pipe) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/dir-reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/dir-reader.js deleted file mode 100644 index 346ac2b8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/dir-reader.js +++ /dev/null @@ -1,251 +0,0 @@ -// A thing that emits "entry" events with Reader objects -// Pausing it causes it to stop emitting entry events, and also -// pauses the current entry if there is one. - -module.exports = DirReader - -var fs = require("graceful-fs") - , fstream = require("../fstream.js") - , Reader = fstream.Reader - , inherits = require("inherits") - , mkdir = require("mkdirp") - , path = require("path") - , Reader = require("./reader.js") - , assert = require("assert").ok - -inherits(DirReader, Reader) - -function DirReader (props) { - var me = this - if (!(me instanceof DirReader)) throw new Error( - "DirReader must be called as constructor.") - - // should already be established as a Directory type - if (props.type !== "Directory" || !props.Directory) { - throw new Error("Non-directory type "+ props.type) - } - - me.entries = null - me._index = -1 - me._paused = false - me._length = -1 - - if (props.sort) { - this.sort = props.sort - } - - Reader.call(this, props) -} - -DirReader.prototype._getEntries = function () { - var me = this - - // race condition. might pause() before calling _getEntries, - // and then resume, and try to get them a second time. - if (me._gotEntries) return - me._gotEntries = true - - fs.readdir(me._path, function (er, entries) { - if (er) return me.error(er) - - me.entries = entries - - me.emit("entries", entries) - if (me._paused) me.once("resume", processEntries) - else processEntries() - - function processEntries () { - me._length = me.entries.length - if (typeof me.sort === "function") { - me.entries = me.entries.sort(me.sort.bind(me)) - } - me._read() - } - }) -} - -// start walking the dir, and emit an "entry" event for each one. -DirReader.prototype._read = function () { - var me = this - - if (!me.entries) return me._getEntries() - - if (me._paused || me._currentEntry || me._aborted) { - // console.error("DR paused=%j, current=%j, aborted=%j", me._paused, !!me._currentEntry, me._aborted) - return - } - - me._index ++ - if (me._index >= me.entries.length) { - if (!me._ended) { - me._ended = true - me.emit("end") - me.emit("close") - } - return - } - - // ok, handle this one, then. - - // save creating a proxy, by stat'ing the thing now. - var p = path.resolve(me._path, me.entries[me._index]) - assert(p !== me._path) - assert(me.entries[me._index]) - - // set this to prevent trying to _read() again in the stat time. - me._currentEntry = p - fs[ me.props.follow ? "stat" : "lstat" ](p, function (er, stat) { - if (er) return me.error(er) - - var who = me._proxy || me - - stat.path = p - stat.basename = path.basename(p) - stat.dirname = path.dirname(p) - var childProps = me.getChildProps.call(who, stat) - childProps.path = p - childProps.basename = path.basename(p) - childProps.dirname = path.dirname(p) - - var entry = Reader(childProps, stat) - - // console.error("DR Entry", p, stat.size) - - me._currentEntry = entry - - // "entry" events are for direct entries in a specific dir. - // "child" events are for any and all children at all levels. - // This nomenclature is not completely final. - - entry.on("pause", function (who) { - if (!me._paused && !entry._disowned) { - me.pause(who) - } - }) - - entry.on("resume", function (who) { - if (me._paused && !entry._disowned) { - me.resume(who) - } - }) - - entry.on("stat", function (props) { - me.emit("_entryStat", entry, props) - if (entry._aborted) return - if (entry._paused) entry.once("resume", function () { - me.emit("entryStat", entry, props) - }) - else me.emit("entryStat", entry, props) - }) - - entry.on("ready", function EMITCHILD () { - // console.error("DR emit child", entry._path) - if (me._paused) { - // console.error(" DR emit child - try again later") - // pause the child, and emit the "entry" event once we drain. - // console.error("DR pausing child entry") - entry.pause(me) - return me.once("resume", EMITCHILD) - } - - // skip over sockets. they can't be piped around properly, - // so there's really no sense even acknowledging them. - // if someone really wants to see them, they can listen to - // the "socket" events. - if (entry.type === "Socket") { - me.emit("socket", entry) - } else { - me.emitEntry(entry) - } - }) - - var ended = false - entry.on("close", onend) - entry.on("disown", onend) - function onend () { - if (ended) return - ended = true - me.emit("childEnd", entry) - me.emit("entryEnd", entry) - me._currentEntry = null - if (!me._paused) { - me._read() - } - } - - // XXX Remove this. Works in node as of 0.6.2 or so. - // Long filenames should not break stuff. - entry.on("error", function (er) { - if (entry._swallowErrors) { - me.warn(er) - entry.emit("end") - entry.emit("close") - } else { - me.emit("error", er) - } - }) - - // proxy up some events. - ; [ "child" - , "childEnd" - , "warn" - ].forEach(function (ev) { - entry.on(ev, me.emit.bind(me, ev)) - }) - }) -} - -DirReader.prototype.disown = function (entry) { - entry.emit("beforeDisown") - entry._disowned = true - entry.parent = entry.root = null - if (entry === this._currentEntry) { - this._currentEntry = null - } - entry.emit("disown") -} - -DirReader.prototype.getChildProps = function (stat) { - return { depth: this.depth + 1 - , root: this.root || this - , parent: this - , follow: this.follow - , filter: this.filter - , sort: this.props.sort - , hardlinks: this.props.hardlinks - } -} - -DirReader.prototype.pause = function (who) { - var me = this - if (me._paused) return - who = who || me - me._paused = true - if (me._currentEntry && me._currentEntry.pause) { - me._currentEntry.pause(who) - } - me.emit("pause", who) -} - -DirReader.prototype.resume = function (who) { - var me = this - if (!me._paused) return - who = who || me - - me._paused = false - // console.error("DR Emit Resume", me._path) - me.emit("resume", who) - if (me._paused) { - // console.error("DR Re-paused", me._path) - return - } - - if (me._currentEntry) { - if (me._currentEntry.resume) me._currentEntry.resume(who) - } else me._read() -} - -DirReader.prototype.emitEntry = function (entry) { - this.emit("entry", entry) - this.emit("child", entry) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/dir-writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/dir-writer.js deleted file mode 100644 index 7073b883..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/dir-writer.js +++ /dev/null @@ -1,171 +0,0 @@ -// It is expected that, when .add() returns false, the consumer -// of the DirWriter will pause until a "drain" event occurs. Note -// that this is *almost always going to be the case*, unless the -// thing being written is some sort of unsupported type, and thus -// skipped over. - -module.exports = DirWriter - -var fs = require("graceful-fs") - , fstream = require("../fstream.js") - , Writer = require("./writer.js") - , inherits = require("inherits") - , mkdir = require("mkdirp") - , path = require("path") - , collect = require("./collect.js") - -inherits(DirWriter, Writer) - -function DirWriter (props) { - var me = this - if (!(me instanceof DirWriter)) me.error( - "DirWriter must be called as constructor.", null, true) - - // should already be established as a Directory type - if (props.type !== "Directory" || !props.Directory) { - me.error("Non-directory type "+ props.type + " " + - JSON.stringify(props), null, true) - } - - Writer.call(this, props) -} - -DirWriter.prototype._create = function () { - var me = this - mkdir(me._path, Writer.dirmode, function (er) { - if (er) return me.error(er) - // ready to start getting entries! - me.ready = true - me.emit("ready") - me._process() - }) -} - -// a DirWriter has an add(entry) method, but its .write() doesn't -// do anything. Why a no-op rather than a throw? Because this -// leaves open the door for writing directory metadata for -// gnu/solaris style dumpdirs. -DirWriter.prototype.write = function () { - return true -} - -DirWriter.prototype.end = function () { - this._ended = true - this._process() -} - -DirWriter.prototype.add = function (entry) { - var me = this - - // console.error("\tadd", entry._path, "->", me._path) - collect(entry) - if (!me.ready || me._currentEntry) { - me._buffer.push(entry) - return false - } - - // create a new writer, and pipe the incoming entry into it. - if (me._ended) { - return me.error("add after end") - } - - me._buffer.push(entry) - me._process() - - return 0 === this._buffer.length -} - -DirWriter.prototype._process = function () { - var me = this - - // console.error("DW Process p=%j", me._processing, me.basename) - - if (me._processing) return - - var entry = me._buffer.shift() - if (!entry) { - // console.error("DW Drain") - me.emit("drain") - if (me._ended) me._finish() - return - } - - me._processing = true - // console.error("DW Entry", entry._path) - - me.emit("entry", entry) - - // ok, add this entry - // - // don't allow recursive copying - var p = entry - do { - var pp = p._path || p.path - if (pp === me.root._path || pp === me._path || - (pp && pp.indexOf(me._path) === 0)) { - // console.error("DW Exit (recursive)", entry.basename, me._path) - me._processing = false - if (entry._collected) entry.pipe() - return me._process() - } - } while (p = p.parent) - - // console.error("DW not recursive") - - // chop off the entry's root dir, replace with ours - var props = { parent: me - , root: me.root || me - , type: entry.type - , depth: me.depth + 1 } - - var p = entry._path || entry.path || entry.props.path - if (entry.parent) { - p = p.substr(entry.parent._path.length + 1) - } - // get rid of any ../../ shenanigans - props.path = path.join(me.path, path.join("/", p)) - - // if i have a filter, the child should inherit it. - props.filter = me.filter - - // all the rest of the stuff, copy over from the source. - Object.keys(entry.props).forEach(function (k) { - if (!props.hasOwnProperty(k)) { - props[k] = entry.props[k] - } - }) - - // not sure at this point what kind of writer this is. - var child = me._currentChild = new Writer(props) - child.on("ready", function () { - // console.error("DW Child Ready", child.type, child._path) - // console.error(" resuming", entry._path) - entry.pipe(child) - entry.resume() - }) - - // XXX Make this work in node. - // Long filenames should not break stuff. - child.on("error", function (er) { - if (child._swallowErrors) { - me.warn(er) - child.emit("end") - child.emit("close") - } else { - me.emit("error", er) - } - }) - - // we fire _end internally *after* end, so that we don't move on - // until any "end" listeners have had their chance to do stuff. - child.on("close", onend) - var ended = false - function onend () { - if (ended) return - ended = true - // console.error("* DW Child end", child.basename) - me._currentChild = null - me._processing = false - me._process() - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/file-reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/file-reader.js deleted file mode 100644 index b1f98618..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/file-reader.js +++ /dev/null @@ -1,147 +0,0 @@ -// Basically just a wrapper around an fs.ReadStream - -module.exports = FileReader - -var fs = require("graceful-fs") - , fstream = require("../fstream.js") - , Reader = fstream.Reader - , inherits = require("inherits") - , mkdir = require("mkdirp") - , Reader = require("./reader.js") - , EOF = {EOF: true} - , CLOSE = {CLOSE: true} - -inherits(FileReader, Reader) - -function FileReader (props) { - // console.error(" FR create", props.path, props.size, new Error().stack) - var me = this - if (!(me instanceof FileReader)) throw new Error( - "FileReader must be called as constructor.") - - // should already be established as a File type - // XXX Todo: preserve hardlinks by tracking dev+inode+nlink, - // with a HardLinkReader class. - if (!((props.type === "Link" && props.Link) || - (props.type === "File" && props.File))) { - throw new Error("Non-file type "+ props.type) - } - - me._buffer = [] - me._bytesEmitted = 0 - Reader.call(me, props) -} - -FileReader.prototype._getStream = function () { - var me = this - , stream = me._stream = fs.createReadStream(me._path, me.props) - - if (me.props.blksize) { - stream.bufferSize = me.props.blksize - } - - stream.on("open", me.emit.bind(me, "open")) - - stream.on("data", function (c) { - // console.error("\t\t%d %s", c.length, me.basename) - me._bytesEmitted += c.length - // no point saving empty chunks - if (!c.length) return - else if (me._paused || me._buffer.length) { - me._buffer.push(c) - me._read() - } else me.emit("data", c) - }) - - stream.on("end", function () { - if (me._paused || me._buffer.length) { - // console.error("FR Buffering End", me._path) - me._buffer.push(EOF) - me._read() - } else { - me.emit("end") - } - - if (me._bytesEmitted !== me.props.size) { - me.error("Didn't get expected byte count\n"+ - "expect: "+me.props.size + "\n" + - "actual: "+me._bytesEmitted) - } - }) - - stream.on("close", function () { - if (me._paused || me._buffer.length) { - // console.error("FR Buffering Close", me._path) - me._buffer.push(CLOSE) - me._read() - } else { - // console.error("FR close 1", me._path) - me.emit("close") - } - }) - - me._read() -} - -FileReader.prototype._read = function () { - var me = this - // console.error("FR _read", me._path) - if (me._paused) { - // console.error("FR _read paused", me._path) - return - } - - if (!me._stream) { - // console.error("FR _getStream calling", me._path) - return me._getStream() - } - - // clear out the buffer, if there is one. - if (me._buffer.length) { - // console.error("FR _read has buffer", me._buffer.length, me._path) - var buf = me._buffer - for (var i = 0, l = buf.length; i < l; i ++) { - var c = buf[i] - if (c === EOF) { - // console.error("FR Read emitting buffered end", me._path) - me.emit("end") - } else if (c === CLOSE) { - // console.error("FR Read emitting buffered close", me._path) - me.emit("close") - } else { - // console.error("FR Read emitting buffered data", me._path) - me.emit("data", c) - } - - if (me._paused) { - // console.error("FR Read Re-pausing at "+i, me._path) - me._buffer = buf.slice(i) - return - } - } - me._buffer.length = 0 - } - // console.error("FR _read done") - // that's about all there is to it. -} - -FileReader.prototype.pause = function (who) { - var me = this - // console.error("FR Pause", me._path) - if (me._paused) return - who = who || me - me._paused = true - if (me._stream) me._stream.pause() - me.emit("pause", who) -} - -FileReader.prototype.resume = function (who) { - var me = this - // console.error("FR Resume", me._path) - if (!me._paused) return - who = who || me - me.emit("resume", who) - me._paused = false - if (me._stream) me._stream.resume() - me._read() -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/file-writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/file-writer.js deleted file mode 100644 index 68114625..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/file-writer.js +++ /dev/null @@ -1,100 +0,0 @@ -module.exports = FileWriter - -var fs = require("graceful-fs") - , mkdir = require("mkdirp") - , Writer = require("./writer.js") - , inherits = require("inherits") - , EOF = {} - -inherits(FileWriter, Writer) - -function FileWriter (props) { - var me = this - if (!(me instanceof FileWriter)) throw new Error( - "FileWriter must be called as constructor.") - - // should already be established as a File type - if (props.type !== "File" || !props.File) { - throw new Error("Non-file type "+ props.type) - } - - me._buffer = [] - me._bytesWritten = 0 - - Writer.call(this, props) -} - -FileWriter.prototype._create = function () { - var me = this - if (me._stream) return - - var so = {} - if (me.props.flags) so.flags = me.props.flags - so.mode = Writer.filemode - if (me._old && me._old.blksize) so.bufferSize = me._old.blksize - - me._stream = fs.createWriteStream(me._path, so) - - me._stream.on("open", function (fd) { - // console.error("FW open", me._buffer, me._path) - me.ready = true - me._buffer.forEach(function (c) { - if (c === EOF) me._stream.end() - else me._stream.write(c) - }) - me.emit("ready") - // give this a kick just in case it needs it. - me.emit("drain") - }) - - me._stream.on("drain", function () { me.emit("drain") }) - - me._stream.on("close", function () { - // console.error("\n\nFW Stream Close", me._path, me.size) - me._finish() - }) -} - -FileWriter.prototype.write = function (c) { - var me = this - - me._bytesWritten += c.length - - if (!me.ready) { - if (!Buffer.isBuffer(c) && typeof c !== 'string') - throw new Error('invalid write data') - me._buffer.push(c) - return false - } - - var ret = me._stream.write(c) - // console.error("\t-- fw wrote, _stream says", ret, me._stream._queue.length) - - // allow 2 buffered writes, because otherwise there's just too - // much stop and go bs. - return ret || (me._stream._queue && me._stream._queue.length <= 2) -} - -FileWriter.prototype.end = function (c) { - var me = this - - if (c) me.write(c) - - if (!me.ready) { - me._buffer.push(EOF) - return false - } - - return me._stream.end() -} - -FileWriter.prototype._finish = function () { - var me = this - if (typeof me.size === "number" && me._bytesWritten != me.size) { - me.error( - "Did not get expected byte count.\n" + - "expect: " + me.size + "\n" + - "actual: " + me._bytesWritten) - } - Writer.prototype._finish.call(me) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/get-type.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/get-type.js deleted file mode 100644 index cd65c41d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/get-type.js +++ /dev/null @@ -1,32 +0,0 @@ -module.exports = getType - -function getType (st) { - var types = - [ "Directory" - , "File" - , "SymbolicLink" - , "Link" // special for hardlinks from tarballs - , "BlockDevice" - , "CharacterDevice" - , "FIFO" - , "Socket" ] - , type - - if (st.type && -1 !== types.indexOf(st.type)) { - st[st.type] = true - return st.type - } - - for (var i = 0, l = types.length; i < l; i ++) { - type = types[i] - var is = st[type] || st["is" + type] - if (typeof is === "function") is = is.call(st) - if (is) { - st[type] = true - st.type = type - return type - } - } - - return null -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/link-reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/link-reader.js deleted file mode 100644 index 7e7ab6ce..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/link-reader.js +++ /dev/null @@ -1,54 +0,0 @@ -// Basically just a wrapper around an fs.readlink -// -// XXX: Enhance this to support the Link type, by keeping -// a lookup table of {<dev+inode>:<path>}, so that hardlinks -// can be preserved in tarballs. - -module.exports = LinkReader - -var fs = require("graceful-fs") - , fstream = require("../fstream.js") - , inherits = require("inherits") - , mkdir = require("mkdirp") - , Reader = require("./reader.js") - -inherits(LinkReader, Reader) - -function LinkReader (props) { - var me = this - if (!(me instanceof LinkReader)) throw new Error( - "LinkReader must be called as constructor.") - - if (!((props.type === "Link" && props.Link) || - (props.type === "SymbolicLink" && props.SymbolicLink))) { - throw new Error("Non-link type "+ props.type) - } - - Reader.call(me, props) -} - -// When piping a LinkReader into a LinkWriter, we have to -// already have the linkpath property set, so that has to -// happen *before* the "ready" event, which means we need to -// override the _stat method. -LinkReader.prototype._stat = function (currentStat) { - var me = this - fs.readlink(me._path, function (er, linkpath) { - if (er) return me.error(er) - me.linkpath = me.props.linkpath = linkpath - me.emit("linkpath", linkpath) - Reader.prototype._stat.call(me, currentStat) - }) -} - -LinkReader.prototype._read = function () { - var me = this - if (me._paused) return - // basically just a no-op, since we got all the info we need - // from the _stat method - if (!me._ended) { - me.emit("end") - me.emit("close") - me._ended = true - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/link-writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/link-writer.js deleted file mode 100644 index 5c8f1e70..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/link-writer.js +++ /dev/null @@ -1,95 +0,0 @@ - -module.exports = LinkWriter - -var fs = require("graceful-fs") - , Writer = require("./writer.js") - , inherits = require("inherits") - , path = require("path") - , rimraf = require("rimraf") - -inherits(LinkWriter, Writer) - -function LinkWriter (props) { - var me = this - if (!(me instanceof LinkWriter)) throw new Error( - "LinkWriter must be called as constructor.") - - // should already be established as a Link type - if (!((props.type === "Link" && props.Link) || - (props.type === "SymbolicLink" && props.SymbolicLink))) { - throw new Error("Non-link type "+ props.type) - } - - if (props.linkpath === "") props.linkpath = "." - if (!props.linkpath) { - me.error("Need linkpath property to create " + props.type) - } - - Writer.call(this, props) -} - -LinkWriter.prototype._create = function () { - // console.error(" LW _create") - var me = this - , hard = me.type === "Link" || process.platform === "win32" - , link = hard ? "link" : "symlink" - , lp = hard ? path.resolve(me.dirname, me.linkpath) : me.linkpath - - // can only change the link path by clobbering - // For hard links, let's just assume that's always the case, since - // there's no good way to read them if we don't already know. - if (hard) return clobber(me, lp, link) - - fs.readlink(me._path, function (er, p) { - // only skip creation if it's exactly the same link - if (p && p === lp) return finish(me) - clobber(me, lp, link) - }) -} - -function clobber (me, lp, link) { - rimraf(me._path, function (er) { - if (er) return me.error(er) - create(me, lp, link) - }) -} - -function create (me, lp, link) { - fs[link](lp, me._path, function (er) { - // if this is a hard link, and we're in the process of writing out a - // directory, it's very possible that the thing we're linking to - // doesn't exist yet (especially if it was intended as a symlink), - // so swallow ENOENT errors here and just soldier in. - // Additionally, an EPERM or EACCES can happen on win32 if it's trying - // to make a link to a directory. Again, just skip it. - // A better solution would be to have fs.symlink be supported on - // windows in some nice fashion. - if (er) { - if ((er.code === "ENOENT" || - er.code === "EACCES" || - er.code === "EPERM" ) && process.platform === "win32") { - me.ready = true - me.emit("ready") - me.emit("end") - me.emit("close") - me.end = me._finish = function () {} - } else return me.error(er) - } - finish(me) - }) -} - -function finish (me) { - me.ready = true - me.emit("ready") - if (me._ended && !me._finished) me._finish() -} - -LinkWriter.prototype.end = function () { - // console.error("LW finish in end") - this._ended = true - if (this.ready) { - this._finished = true - this._finish() - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/proxy-reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/proxy-reader.js deleted file mode 100644 index a0ece34a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/proxy-reader.js +++ /dev/null @@ -1,93 +0,0 @@ -// A reader for when we don't yet know what kind of thing -// the thing is. - -module.exports = ProxyReader - -var Reader = require("./reader.js") - , getType = require("./get-type.js") - , inherits = require("inherits") - , fs = require("graceful-fs") - -inherits(ProxyReader, Reader) - -function ProxyReader (props) { - var me = this - if (!(me instanceof ProxyReader)) throw new Error( - "ProxyReader must be called as constructor.") - - me.props = props - me._buffer = [] - me.ready = false - - Reader.call(me, props) -} - -ProxyReader.prototype._stat = function () { - var me = this - , props = me.props - // stat the thing to see what the proxy should be. - , stat = props.follow ? "stat" : "lstat" - - fs[stat](props.path, function (er, current) { - var type - if (er || !current) { - type = "File" - } else { - type = getType(current) - } - - props[type] = true - props.type = me.type = type - - me._old = current - me._addProxy(Reader(props, current)) - }) -} - -ProxyReader.prototype._addProxy = function (proxy) { - var me = this - if (me._proxyTarget) { - return me.error("proxy already set") - } - - me._proxyTarget = proxy - proxy._proxy = me - - ; [ "error" - , "data" - , "end" - , "close" - , "linkpath" - , "entry" - , "entryEnd" - , "child" - , "childEnd" - , "warn" - , "stat" - ].forEach(function (ev) { - // console.error("~~ proxy event", ev, me.path) - proxy.on(ev, me.emit.bind(me, ev)) - }) - - me.emit("proxy", proxy) - - proxy.on("ready", function () { - // console.error("~~ proxy is ready!", me.path) - me.ready = true - me.emit("ready") - }) - - var calls = me._buffer - me._buffer.length = 0 - calls.forEach(function (c) { - proxy[c[0]].apply(proxy, c[1]) - }) -} - -ProxyReader.prototype.pause = function () { - return this._proxyTarget ? this._proxyTarget.pause() : false -} - -ProxyReader.prototype.resume = function () { - return this._proxyTarget ? this._proxyTarget.resume() : false -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/proxy-writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/proxy-writer.js deleted file mode 100644 index b0476633..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/proxy-writer.js +++ /dev/null @@ -1,109 +0,0 @@ -// A writer for when we don't know what kind of thing -// the thing is. That is, it's not explicitly set, -// so we're going to make it whatever the thing already -// is, or "File" -// -// Until then, collect all events. - -module.exports = ProxyWriter - -var Writer = require("./writer.js") - , getType = require("./get-type.js") - , inherits = require("inherits") - , collect = require("./collect.js") - , fs = require("fs") - -inherits(ProxyWriter, Writer) - -function ProxyWriter (props) { - var me = this - if (!(me instanceof ProxyWriter)) throw new Error( - "ProxyWriter must be called as constructor.") - - me.props = props - me._needDrain = false - - Writer.call(me, props) -} - -ProxyWriter.prototype._stat = function () { - var me = this - , props = me.props - // stat the thing to see what the proxy should be. - , stat = props.follow ? "stat" : "lstat" - - fs[stat](props.path, function (er, current) { - var type - if (er || !current) { - type = "File" - } else { - type = getType(current) - } - - props[type] = true - props.type = me.type = type - - me._old = current - me._addProxy(Writer(props, current)) - }) -} - -ProxyWriter.prototype._addProxy = function (proxy) { - // console.error("~~ set proxy", this.path) - var me = this - if (me._proxy) { - return me.error("proxy already set") - } - - me._proxy = proxy - ; [ "ready" - , "error" - , "close" - , "pipe" - , "drain" - , "warn" - ].forEach(function (ev) { - proxy.on(ev, me.emit.bind(me, ev)) - }) - - me.emit("proxy", proxy) - - var calls = me._buffer - calls.forEach(function (c) { - // console.error("~~ ~~ proxy buffered call", c[0], c[1]) - proxy[c[0]].apply(proxy, c[1]) - }) - me._buffer.length = 0 - if (me._needsDrain) me.emit("drain") -} - -ProxyWriter.prototype.add = function (entry) { - // console.error("~~ proxy add") - collect(entry) - - if (!this._proxy) { - this._buffer.push(["add", [entry]]) - this._needDrain = true - return false - } - return this._proxy.add(entry) -} - -ProxyWriter.prototype.write = function (c) { - // console.error("~~ proxy write") - if (!this._proxy) { - this._buffer.push(["write", [c]]) - this._needDrain = true - return false - } - return this._proxy.write(c) -} - -ProxyWriter.prototype.end = function (c) { - // console.error("~~ proxy end") - if (!this._proxy) { - this._buffer.push(["end", [c]]) - return false - } - return this._proxy.end(c) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/reader.js deleted file mode 100644 index eaf921cd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/reader.js +++ /dev/null @@ -1,260 +0,0 @@ - -module.exports = Reader - -var fs = require("graceful-fs") - , Stream = require("stream").Stream - , inherits = require("inherits") - , path = require("path") - , getType = require("./get-type.js") - , hardLinks = Reader.hardLinks = {} - , Abstract = require("./abstract.js") - -// Must do this *before* loading the child classes -inherits(Reader, Abstract) - -var DirReader = require("./dir-reader.js") - , FileReader = require("./file-reader.js") - , LinkReader = require("./link-reader.js") - , SocketReader = require("./socket-reader.js") - , ProxyReader = require("./proxy-reader.js") - -function Reader (props, currentStat) { - var me = this - if (!(me instanceof Reader)) return new Reader(props, currentStat) - - if (typeof props === "string") { - props = { path: props } - } - - if (!props.path) { - me.error("Must provide a path", null, true) - } - - // polymorphism. - // call fstream.Reader(dir) to get a DirReader object, etc. - // Note that, unlike in the Writer case, ProxyReader is going - // to be the *normal* state of affairs, since we rarely know - // the type of a file prior to reading it. - - - var type - , ClassType - - if (props.type && typeof props.type === "function") { - type = props.type - ClassType = type - } else { - type = getType(props) - ClassType = Reader - } - - if (currentStat && !type) { - type = getType(currentStat) - props[type] = true - props.type = type - } - - switch (type) { - case "Directory": - ClassType = DirReader - break - - case "Link": - // XXX hard links are just files. - // However, it would be good to keep track of files' dev+inode - // and nlink values, and create a HardLinkReader that emits - // a linkpath value of the original copy, so that the tar - // writer can preserve them. - // ClassType = HardLinkReader - // break - - case "File": - ClassType = FileReader - break - - case "SymbolicLink": - ClassType = LinkReader - break - - case "Socket": - ClassType = SocketReader - break - - case null: - ClassType = ProxyReader - break - } - - if (!(me instanceof ClassType)) { - return new ClassType(props) - } - - Abstract.call(me) - - me.readable = true - me.writable = false - - me.type = type - me.props = props - me.depth = props.depth = props.depth || 0 - me.parent = props.parent || null - me.root = props.root || (props.parent && props.parent.root) || me - - me._path = me.path = path.resolve(props.path) - if (process.platform === "win32") { - me.path = me._path = me.path.replace(/\?/g, "_") - if (me._path.length >= 260) { - // how DOES one create files on the moon? - // if the path has spaces in it, then UNC will fail. - me._swallowErrors = true - //if (me._path.indexOf(" ") === -1) { - me._path = "\\\\?\\" + me.path.replace(/\//g, "\\") - //} - } - } - me.basename = props.basename = path.basename(me.path) - me.dirname = props.dirname = path.dirname(me.path) - - // these have served their purpose, and are now just noisy clutter - props.parent = props.root = null - - // console.error("\n\n\n%s setting size to", props.path, props.size) - me.size = props.size - me.filter = typeof props.filter === "function" ? props.filter : null - if (props.sort === "alpha") props.sort = alphasort - - // start the ball rolling. - // this will stat the thing, and then call me._read() - // to start reading whatever it is. - // console.error("calling stat", props.path, currentStat) - me._stat(currentStat) -} - -function alphasort (a, b) { - return a === b ? 0 - : a.toLowerCase() > b.toLowerCase() ? 1 - : a.toLowerCase() < b.toLowerCase() ? -1 - : a > b ? 1 - : -1 -} - -Reader.prototype._stat = function (currentStat) { - var me = this - , props = me.props - , stat = props.follow ? "stat" : "lstat" - // console.error("Reader._stat", me._path, currentStat) - if (currentStat) process.nextTick(statCb.bind(null, null, currentStat)) - else fs[stat](me._path, statCb) - - - function statCb (er, props_) { - // console.error("Reader._stat, statCb", me._path, props_, props_.nlink) - if (er) return me.error(er) - - Object.keys(props_).forEach(function (k) { - props[k] = props_[k] - }) - - // if it's not the expected size, then abort here. - if (undefined !== me.size && props.size !== me.size) { - return me.error("incorrect size") - } - me.size = props.size - - var type = getType(props) - var handleHardlinks = props.hardlinks !== false - - // special little thing for handling hardlinks. - if (handleHardlinks && type !== "Directory" && props.nlink && props.nlink > 1) { - var k = props.dev + ":" + props.ino - // console.error("Reader has nlink", me._path, k) - if (hardLinks[k] === me._path || !hardLinks[k]) hardLinks[k] = me._path - else { - // switch into hardlink mode. - type = me.type = me.props.type = "Link" - me.Link = me.props.Link = true - me.linkpath = me.props.linkpath = hardLinks[k] - // console.error("Hardlink detected, switching mode", me._path, me.linkpath) - // Setting __proto__ would arguably be the "correct" - // approach here, but that just seems too wrong. - me._stat = me._read = LinkReader.prototype._read - } - } - - if (me.type && me.type !== type) { - me.error("Unexpected type: " + type) - } - - // if the filter doesn't pass, then just skip over this one. - // still have to emit end so that dir-walking can move on. - if (me.filter) { - var who = me._proxy || me - // special handling for ProxyReaders - if (!me.filter.call(who, who, props)) { - if (!me._disowned) { - me.abort() - me.emit("end") - me.emit("close") - } - return - } - } - - // last chance to abort or disown before the flow starts! - var events = ["_stat", "stat", "ready"] - var e = 0 - ;(function go () { - if (me._aborted) { - me.emit("end") - me.emit("close") - return - } - - if (me._paused) { - me.once("resume", go) - return - } - - var ev = events[e ++] - if (!ev) return me._read() - me.emit(ev, props) - go() - })() - } -} - -Reader.prototype.pipe = function (dest, opts) { - var me = this - if (typeof dest.add === "function") { - // piping to a multi-compatible, and we've got directory entries. - me.on("entry", function (entry) { - var ret = dest.add(entry) - if (false === ret) { - me.pause() - } - }) - } - - // console.error("R Pipe apply Stream Pipe") - return Stream.prototype.pipe.apply(this, arguments) -} - -Reader.prototype.pause = function (who) { - this._paused = true - who = who || this - this.emit("pause", who) - if (this._stream) this._stream.pause(who) -} - -Reader.prototype.resume = function (who) { - this._paused = false - who = who || this - this.emit("resume", who) - if (this._stream) this._stream.resume(who) - this._read() -} - -Reader.prototype._read = function () { - this.error("Cannot read unknown type: "+this.type) -} - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/socket-reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/socket-reader.js deleted file mode 100644 index e89c1731..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/socket-reader.js +++ /dev/null @@ -1,38 +0,0 @@ -// Just get the stats, and then don't do anything. -// You can't really "read" from a socket. You "connect" to it. -// Mostly, this is here so that reading a dir with a socket in it -// doesn't blow up. - -module.exports = SocketReader - -var fs = require("graceful-fs") - , fstream = require("../fstream.js") - , inherits = require("inherits") - , mkdir = require("mkdirp") - , Reader = require("./reader.js") - -inherits(SocketReader, Reader) - -function SocketReader (props) { - var me = this - if (!(me instanceof SocketReader)) throw new Error( - "SocketReader must be called as constructor.") - - if (!(props.type === "Socket" && props.Socket)) { - throw new Error("Non-socket type "+ props.type) - } - - Reader.call(me, props) -} - -SocketReader.prototype._read = function () { - var me = this - if (me._paused) return - // basically just a no-op, since we got all the info we have - // from the _stat method - if (!me._ended) { - me.emit("end") - me.emit("close") - me._ended = true - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/writer.js deleted file mode 100644 index 5599fb22..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/writer.js +++ /dev/null @@ -1,389 +0,0 @@ - -module.exports = Writer - -var fs = require("graceful-fs") - , inherits = require("inherits") - , rimraf = require("rimraf") - , mkdir = require("mkdirp") - , path = require("path") - , umask = process.platform === "win32" ? 0 : process.umask() - , getType = require("./get-type.js") - , Abstract = require("./abstract.js") - -// Must do this *before* loading the child classes -inherits(Writer, Abstract) - -Writer.dirmode = 0777 & (~umask) -Writer.filemode = 0666 & (~umask) - -var DirWriter = require("./dir-writer.js") - , LinkWriter = require("./link-writer.js") - , FileWriter = require("./file-writer.js") - , ProxyWriter = require("./proxy-writer.js") - -// props is the desired state. current is optionally the current stat, -// provided here so that subclasses can avoid statting the target -// more than necessary. -function Writer (props, current) { - var me = this - - if (typeof props === "string") { - props = { path: props } - } - - if (!props.path) me.error("Must provide a path", null, true) - - // polymorphism. - // call fstream.Writer(dir) to get a DirWriter object, etc. - var type = getType(props) - , ClassType = Writer - - switch (type) { - case "Directory": - ClassType = DirWriter - break - case "File": - ClassType = FileWriter - break - case "Link": - case "SymbolicLink": - ClassType = LinkWriter - break - case null: - // Don't know yet what type to create, so we wrap in a proxy. - ClassType = ProxyWriter - break - } - - if (!(me instanceof ClassType)) return new ClassType(props) - - // now get down to business. - - Abstract.call(me) - - // props is what we want to set. - // set some convenience properties as well. - me.type = props.type - me.props = props - me.depth = props.depth || 0 - me.clobber = false === props.clobber ? props.clobber : true - me.parent = props.parent || null - me.root = props.root || (props.parent && props.parent.root) || me - - me._path = me.path = path.resolve(props.path) - if (process.platform === "win32") { - me.path = me._path = me.path.replace(/\?/g, "_") - if (me._path.length >= 260) { - me._swallowErrors = true - me._path = "\\\\?\\" + me.path.replace(/\//g, "\\") - } - } - me.basename = path.basename(props.path) - me.dirname = path.dirname(props.path) - me.linkpath = props.linkpath || null - - props.parent = props.root = null - - // console.error("\n\n\n%s setting size to", props.path, props.size) - me.size = props.size - - if (typeof props.mode === "string") { - props.mode = parseInt(props.mode, 8) - } - - me.readable = false - me.writable = true - - // buffer until ready, or while handling another entry - me._buffer = [] - me.ready = false - - me.filter = typeof props.filter === "function" ? props.filter: null - - // start the ball rolling. - // this checks what's there already, and then calls - // me._create() to call the impl-specific creation stuff. - me._stat(current) -} - -// Calling this means that it's something we can't create. -// Just assert that it's already there, otherwise raise a warning. -Writer.prototype._create = function () { - var me = this - fs[me.props.follow ? "stat" : "lstat"](me._path, function (er, current) { - if (er) { - return me.warn("Cannot create " + me._path + "\n" + - "Unsupported type: "+me.type, "ENOTSUP") - } - me._finish() - }) -} - -Writer.prototype._stat = function (current) { - var me = this - , props = me.props - , stat = props.follow ? "stat" : "lstat" - , who = me._proxy || me - - if (current) statCb(null, current) - else fs[stat](me._path, statCb) - - function statCb (er, current) { - if (me.filter && !me.filter.call(who, who, current)) { - me._aborted = true - me.emit("end") - me.emit("close") - return - } - - // if it's not there, great. We'll just create it. - // if it is there, then we'll need to change whatever differs - if (er || !current) { - return create(me) - } - - me._old = current - var currentType = getType(current) - - // if it's a type change, then we need to clobber or error. - // if it's not a type change, then let the impl take care of it. - if (currentType !== me.type) { - return rimraf(me._path, function (er) { - if (er) return me.error(er) - me._old = null - create(me) - }) - } - - // otherwise, just handle in the app-specific way - // this creates a fs.WriteStream, or mkdir's, or whatever - create(me) - } -} - -function create (me) { - // console.error("W create", me._path, Writer.dirmode) - - // XXX Need to clobber non-dirs that are in the way, - // unless { clobber: false } in the props. - mkdir(path.dirname(me._path), Writer.dirmode, function (er, made) { - // console.error("W created", path.dirname(me._path), er) - if (er) return me.error(er) - - // later on, we have to set the mode and owner for these - me._madeDir = made - return me._create() - }) -} - -function endChmod (me, want, current, path, cb) { - var wantMode = want.mode - , chmod = want.follow || me.type !== "SymbolicLink" - ? "chmod" : "lchmod" - - if (!fs[chmod]) return cb() - if (typeof wantMode !== "number") return cb() - - var curMode = current.mode & 0777 - wantMode = wantMode & 0777 - if (wantMode === curMode) return cb() - - fs[chmod](path, wantMode, cb) -} - - -function endChown (me, want, current, path, cb) { - // Don't even try it unless root. Too easy to EPERM. - if (process.platform === "win32") return cb() - if (!process.getuid || !process.getuid() === 0) return cb() - if (typeof want.uid !== "number" && - typeof want.gid !== "number" ) return cb() - - if (current.uid === want.uid && - current.gid === want.gid) return cb() - - var chown = (me.props.follow || me.type !== "SymbolicLink") - ? "chown" : "lchown" - if (!fs[chown]) return cb() - - if (typeof want.uid !== "number") want.uid = current.uid - if (typeof want.gid !== "number") want.gid = current.gid - - fs[chown](path, want.uid, want.gid, cb) -} - -function endUtimes (me, want, current, path, cb) { - if (!fs.utimes || process.platform === "win32") return cb() - - var utimes = (want.follow || me.type !== "SymbolicLink") - ? "utimes" : "lutimes" - - if (utimes === "lutimes" && !fs[utimes]) { - utimes = "utimes" - } - - if (!fs[utimes]) return cb() - - var curA = current.atime - , curM = current.mtime - , meA = want.atime - , meM = want.mtime - - if (meA === undefined) meA = curA - if (meM === undefined) meM = curM - - if (!isDate(meA)) meA = new Date(meA) - if (!isDate(meM)) meA = new Date(meM) - - if (meA.getTime() === curA.getTime() && - meM.getTime() === curM.getTime()) return cb() - - fs[utimes](path, meA, meM, cb) -} - - -// XXX This function is beastly. Break it up! -Writer.prototype._finish = function () { - var me = this - - // console.error(" W Finish", me._path, me.size) - - // set up all the things. - // At this point, we're already done writing whatever we've gotta write, - // adding files to the dir, etc. - var todo = 0 - var errState = null - var done = false - - if (me._old) { - // the times will almost *certainly* have changed. - // adds the utimes syscall, but remove another stat. - me._old.atime = new Date(0) - me._old.mtime = new Date(0) - // console.error(" W Finish Stale Stat", me._path, me.size) - setProps(me._old) - } else { - var stat = me.props.follow ? "stat" : "lstat" - // console.error(" W Finish Stating", me._path, me.size) - fs[stat](me._path, function (er, current) { - // console.error(" W Finish Stated", me._path, me.size, current) - if (er) { - // if we're in the process of writing out a - // directory, it's very possible that the thing we're linking to - // doesn't exist yet (especially if it was intended as a symlink), - // so swallow ENOENT errors here and just soldier on. - if (er.code === "ENOENT" && - (me.type === "Link" || me.type === "SymbolicLink") && - process.platform === "win32") { - me.ready = true - me.emit("ready") - me.emit("end") - me.emit("close") - me.end = me._finish = function () {} - return - } else return me.error(er) - } - setProps(me._old = current) - }) - } - - return - - function setProps (current) { - todo += 3 - endChmod(me, me.props, current, me._path, next("chmod")) - endChown(me, me.props, current, me._path, next("chown")) - endUtimes(me, me.props, current, me._path, next("utimes")) - } - - function next (what) { - return function (er) { - // console.error(" W Finish", what, todo) - if (errState) return - if (er) { - er.fstream_finish_call = what - return me.error(errState = er) - } - if (--todo > 0) return - if (done) return - done = true - - // we may still need to set the mode/etc. on some parent dirs - // that were created previously. delay end/close until then. - if (!me._madeDir) return end() - else endMadeDir(me, me._path, end) - - function end (er) { - if (er) { - er.fstream_finish_call = "setupMadeDir" - return me.error(er) - } - // all the props have been set, so we're completely done. - me.emit("end") - me.emit("close") - } - } - } -} - -function endMadeDir (me, p, cb) { - var made = me._madeDir - // everything *between* made and path.dirname(me._path) - // needs to be set up. Note that this may just be one dir. - var d = path.dirname(p) - - endMadeDir_(me, d, function (er) { - if (er) return cb(er) - if (d === made) { - return cb() - } - endMadeDir(me, d, cb) - }) -} - -function endMadeDir_ (me, p, cb) { - var dirProps = {} - Object.keys(me.props).forEach(function (k) { - dirProps[k] = me.props[k] - - // only make non-readable dirs if explicitly requested. - if (k === "mode" && me.type !== "Directory") { - dirProps[k] = dirProps[k] | 0111 - } - }) - - var todo = 3 - , errState = null - fs.stat(p, function (er, current) { - if (er) return cb(errState = er) - endChmod(me, dirProps, current, p, next) - endChown(me, dirProps, current, p, next) - endUtimes(me, dirProps, current, p, next) - }) - - function next (er) { - if (errState) return - if (er) return cb(errState = er) - if (-- todo === 0) return cb() - } -} - -Writer.prototype.pipe = function () { - this.error("Can't pipe from writable stream") -} - -Writer.prototype.add = function () { - this.error("Cannot add to non-Directory type") -} - -Writer.prototype.write = function () { - return true -} - -function objectToString (d) { - return Object.prototype.toString.call(d) -} - -function isDate(d) { - return typeof d === 'object' && objectToString(d) === '[object Date]'; -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/package.json deleted file mode 100644 index c3b07d0a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "name": "fstream", - "description": "Advanced file system stream things", - "version": "0.1.25", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/fstream.git" - }, - "main": "fstream.js", - "engines": { - "node": ">=0.6" - }, - "dependencies": { - "rimraf": "2", - "mkdirp": "0.3", - "graceful-fs": "~2.0.0", - "inherits": "~2.0.0" - }, - "devDependencies": { - "tap": "" - }, - "scripts": { - "test": "tap examples/*.js" - }, - "license": "BSD", - "readme": "Like FS streams, but with stat on them, and supporting directories and\nsymbolic links, as well as normal files. Also, you can use this to set\nthe stats on a file, even if you don't change its contents, or to create\na symlink, etc.\n\nSo, for example, you can \"write\" a directory, and it'll call `mkdir`. You\ncan specify a uid and gid, and it'll call `chown`. You can specify a\n`mtime` and `atime`, and it'll call `utimes`. You can call it a symlink\nand provide a `linkpath` and it'll call `symlink`.\n\nNote that it won't automatically resolve symbolic links. So, if you\ncall `fstream.Reader('/some/symlink')` then you'll get an object\nthat stats and then ends immediately (since it has no data). To follow\nsymbolic links, do this: `fstream.Reader({path:'/some/symlink', follow:\ntrue })`.\n\nThere are various checks to make sure that the bytes emitted are the\nsame as the intended size, if the size is set.\n\n## Examples\n\n```javascript\nfstream\n .Writer({ path: \"path/to/file\"\n , mode: 0755\n , size: 6\n })\n .write(\"hello\\n\")\n .end()\n```\n\nThis will create the directories if they're missing, and then write\n`hello\\n` into the file, chmod it to 0755, and assert that 6 bytes have\nbeen written when it's done.\n\n```javascript\nfstream\n .Writer({ path: \"path/to/file\"\n , mode: 0755\n , size: 6\n , flags: \"a\"\n })\n .write(\"hello\\n\")\n .end()\n```\n\nYou can pass flags in, if you want to append to a file.\n\n```javascript\nfstream\n .Writer({ path: \"path/to/symlink\"\n , linkpath: \"./file\"\n , SymbolicLink: true\n , mode: \"0755\" // octal strings supported\n })\n .end()\n```\n\nIf isSymbolicLink is a function, it'll be called, and if it returns\ntrue, then it'll treat it as a symlink. If it's not a function, then\nany truish value will make a symlink, or you can set `type:\n'SymbolicLink'`, which does the same thing.\n\nNote that the linkpath is relative to the symbolic link location, not\nthe parent dir or cwd.\n\n```javascript\nfstream\n .Reader(\"path/to/dir\")\n .pipe(fstream.Writer(\"path/to/other/dir\"))\n```\n\nThis will do like `cp -Rp path/to/dir path/to/other/dir`. If the other\ndir exists and isn't a directory, then it'll emit an error. It'll also\nset the uid, gid, mode, etc. to be identical. In this way, it's more\nlike `rsync -a` than simply a copy.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/fstream/issues" - }, - "homepage": "https://github.com/isaacs/fstream", - "_id": "fstream@0.1.25", - "dist": { - "shasum": "cca977eec0cdc5382161b2feeeb567d5f95783b0" - }, - "_from": "fstream@~0.1.8", - "_resolved": "https://registry.npmjs.org/fstream/-/fstream-0.1.25.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/LICENSE deleted file mode 100644 index dea3013d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/README.md deleted file mode 100644 index b1c56658..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/README.md +++ /dev/null @@ -1,42 +0,0 @@ -Browser-friendly inheritance fully compatible with standard node.js -[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). - -This package exports standard `inherits` from node.js `util` module in -node environment, but also provides alternative browser-friendly -implementation through [browser -field](https://gist.github.com/shtylman/4339901). Alternative -implementation is a literal copy of standard one located in standalone -module to avoid requiring of `util`. It also has a shim for old -browsers with no `Object.create` support. - -While keeping you sure you are using standard `inherits` -implementation in node.js environment, it allows bundlers such as -[browserify](https://github.com/substack/node-browserify) to not -include full `util` package to your client code if all you need is -just `inherits` function. It worth, because browser shim for `util` -package is large and `inherits` is often the single function you need -from it. - -It's recommended to use this package instead of -`require('util').inherits` for any code that has chances to be used -not only in node.js but in browser too. - -## usage - -```js -var inherits = require('inherits'); -// then use exactly as the standard one -``` - -## note on version ~1.0 - -Version ~1.0 had completely different motivation and is not compatible -neither with 2.0 nor with standard node.js `inherits`. - -If you are using version ~1.0 and planning to switch to ~2.0, be -careful: - -* new version uses `super_` instead of `super` for referencing - superclass -* new version overwrites current prototype while old one preserves any - existing fields on it diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/inherits.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/inherits.js deleted file mode 100644 index 29f5e24f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/inherits.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('util').inherits diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/inherits_browser.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/inherits_browser.js deleted file mode 100644 index c1e78a75..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/inherits_browser.js +++ /dev/null @@ -1,23 +0,0 @@ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/package.json deleted file mode 100644 index 8b3b563d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "inherits", - "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "version": "2.0.1", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented", - "inherits", - "browser", - "browserify" - ], - "main": "./inherits.js", - "browser": "./inherits_browser.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/inherits" - }, - "license": "ISC", - "scripts": { - "test": "node test" - }, - "readme": "Browser-friendly inheritance fully compatible with standard node.js\n[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).\n\nThis package exports standard `inherits` from node.js `util` module in\nnode environment, but also provides alternative browser-friendly\nimplementation through [browser\nfield](https://gist.github.com/shtylman/4339901). Alternative\nimplementation is a literal copy of standard one located in standalone\nmodule to avoid requiring of `util`. It also has a shim for old\nbrowsers with no `Object.create` support.\n\nWhile keeping you sure you are using standard `inherits`\nimplementation in node.js environment, it allows bundlers such as\n[browserify](https://github.com/substack/node-browserify) to not\ninclude full `util` package to your client code if all you need is\njust `inherits` function. It worth, because browser shim for `util`\npackage is large and `inherits` is often the single function you need\nfrom it.\n\nIt's recommended to use this package instead of\n`require('util').inherits` for any code that has chances to be used\nnot only in node.js but in browser too.\n\n## usage\n\n```js\nvar inherits = require('inherits');\n// then use exactly as the standard one\n```\n\n## note on version ~1.0\n\nVersion ~1.0 had completely different motivation and is not compatible\nneither with 2.0 nor with standard node.js `inherits`.\n\nIf you are using version ~1.0 and planning to switch to ~2.0, be\ncareful:\n\n* new version uses `super_` instead of `super` for referencing\n superclass\n* new version overwrites current prototype while old one preserves any\n existing fields on it\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/inherits/issues" - }, - "homepage": "https://github.com/isaacs/inherits", - "_id": "inherits@2.0.1", - "dist": { - "shasum": "b084742f5bd8d0e2e285cb3a8957f7e733389ef2" - }, - "_from": "inherits@2", - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/test.js deleted file mode 100644 index fc53012d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/test.js +++ /dev/null @@ -1,25 +0,0 @@ -var inherits = require('./inherits.js') -var assert = require('assert') - -function test(c) { - assert(c.constructor === Child) - assert(c.constructor.super_ === Parent) - assert(Object.getPrototypeOf(c) === Child.prototype) - assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) - assert(c instanceof Child) - assert(c instanceof Parent) -} - -function Child() { - Parent.call(this) - test(this) -} - -function Parent() {} - -inherits(Child, Parent) - -var c = new Child -test(c) - -console.log('ok') diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/package.json deleted file mode 100644 index fd335461..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "name": "tar", - "description": "tar for node", - "version": "0.1.19", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-tar.git" - }, - "main": "tar.js", - "scripts": { - "test": "tap test/*.js" - }, - "dependencies": { - "inherits": "2", - "block-stream": "*", - "fstream": "~0.1.8" - }, - "devDependencies": { - "tap": "0.x", - "rimraf": "1.x" - }, - "license": "BSD", - "readme": "# node-tar\n\nTar for Node.js.\n\n[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/)\n\n## API\n\nSee `examples/` for usage examples.\n\n### var tar = require('tar')\n\nReturns an object with `.Pack`, `.Extract` and `.Parse` methods.\n\n### tar.Pack([properties])\n\nReturns a through stream. Use\n[fstream](https://npmjs.org/package/fstream) to write files into the\npack stream and you will receive tar archive data from the pack\nstream.\n\nThe optional `properties` object are used to set properties in the tar\n'Global Extended Header'.\n\n### tar.Extract([options])\n\nReturns a through stream. Write tar data to the stream and the files\nin the tarball will be extracted onto the filesystem.\n\n`options` can be:\n\n```js\n{\n path: '/path/to/extract/tar/into',\n strip: 0, // how many path segments to strip from the root when extracting\n}\n```\n\n`options` also get passed to the `fstream.Writer` instance that `tar`\nuses internally.\n\n### tar.Parse()\n\nReturns a writable stream. Write tar data to it and it will emit\n`entry` events for each entry parsed from the tarball. This is used by\n`tar.Extract`.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/node-tar/issues" - }, - "homepage": "https://github.com/isaacs/node-tar", - "_id": "tar@0.1.19", - "dist": { - "shasum": "bd31a1030d51bfbbbf4b3e174603500389a1250d" - }, - "_from": "tar@~0.1.18", - "_resolved": "https://registry.npmjs.org/tar/-/tar-0.1.19.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/tar.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/tar.js deleted file mode 100644 index a81298b9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/tar.js +++ /dev/null @@ -1,173 +0,0 @@ -// field paths that every tar file must have. -// header is padded to 512 bytes. -var f = 0 - , fields = {} - , path = fields.path = f++ - , mode = fields.mode = f++ - , uid = fields.uid = f++ - , gid = fields.gid = f++ - , size = fields.size = f++ - , mtime = fields.mtime = f++ - , cksum = fields.cksum = f++ - , type = fields.type = f++ - , linkpath = fields.linkpath = f++ - , headerSize = 512 - , blockSize = 512 - , fieldSize = [] - -fieldSize[path] = 100 -fieldSize[mode] = 8 -fieldSize[uid] = 8 -fieldSize[gid] = 8 -fieldSize[size] = 12 -fieldSize[mtime] = 12 -fieldSize[cksum] = 8 -fieldSize[type] = 1 -fieldSize[linkpath] = 100 - -// "ustar\0" may introduce another bunch of headers. -// these are optional, and will be nulled out if not present. - -var ustar = fields.ustar = f++ - , ustarver = fields.ustarver = f++ - , uname = fields.uname = f++ - , gname = fields.gname = f++ - , devmaj = fields.devmaj = f++ - , devmin = fields.devmin = f++ - , prefix = fields.prefix = f++ - , fill = fields.fill = f++ - -// terminate fields. -fields[f] = null - -fieldSize[ustar] = 6 -fieldSize[ustarver] = 2 -fieldSize[uname] = 32 -fieldSize[gname] = 32 -fieldSize[devmaj] = 8 -fieldSize[devmin] = 8 -fieldSize[prefix] = 155 -fieldSize[fill] = 12 - -// nb: prefix field may in fact be 130 bytes of prefix, -// a null char, 12 bytes for atime, 12 bytes for ctime. -// -// To recognize this format: -// 1. prefix[130] === ' ' or '\0' -// 2. atime and ctime are octal numeric values -// 3. atime and ctime have ' ' in their last byte - -var fieldEnds = {} - , fieldOffs = {} - , fe = 0 -for (var i = 0; i < f; i ++) { - fieldOffs[i] = fe - fieldEnds[i] = (fe += fieldSize[i]) -} - -// build a translation table of field paths. -Object.keys(fields).forEach(function (f) { - if (fields[f] !== null) fields[fields[f]] = f -}) - -// different values of the 'type' field -// paths match the values of Stats.isX() functions, where appropriate -var types = - { 0: "File" - , "\0": "OldFile" // like 0 - , "": "OldFile" - , 1: "Link" - , 2: "SymbolicLink" - , 3: "CharacterDevice" - , 4: "BlockDevice" - , 5: "Directory" - , 6: "FIFO" - , 7: "ContiguousFile" // like 0 - // posix headers - , g: "GlobalExtendedHeader" // k=v for the rest of the archive - , x: "ExtendedHeader" // k=v for the next file - // vendor-specific stuff - , A: "SolarisACL" // skip - , D: "GNUDumpDir" // like 5, but with data, which should be skipped - , I: "Inode" // metadata only, skip - , K: "NextFileHasLongLinkpath" // data = link path of next file - , L: "NextFileHasLongPath" // data = path of next file - , M: "ContinuationFile" // skip - , N: "OldGnuLongPath" // like L - , S: "SparseFile" // skip - , V: "TapeVolumeHeader" // skip - , X: "OldExtendedHeader" // like x - } - -Object.keys(types).forEach(function (t) { - types[types[t]] = types[types[t]] || t -}) - -// values for the mode field -var modes = - { suid: 04000 // set uid on extraction - , sgid: 02000 // set gid on extraction - , svtx: 01000 // set restricted deletion flag on dirs on extraction - , uread: 0400 - , uwrite: 0200 - , uexec: 0100 - , gread: 040 - , gwrite: 020 - , gexec: 010 - , oread: 4 - , owrite: 2 - , oexec: 1 - , all: 07777 - } - -var numeric = - { mode: true - , uid: true - , gid: true - , size: true - , mtime: true - , devmaj: true - , devmin: true - , cksum: true - , atime: true - , ctime: true - , dev: true - , ino: true - , nlink: true - } - -Object.keys(modes).forEach(function (t) { - modes[modes[t]] = modes[modes[t]] || t -}) - -var knownExtended = - { atime: true - , charset: true - , comment: true - , ctime: true - , gid: true - , gname: true - , linkpath: true - , mtime: true - , path: true - , realtime: true - , security: true - , size: true - , uid: true - , uname: true } - - -exports.fields = fields -exports.fieldSize = fieldSize -exports.fieldOffs = fieldOffs -exports.fieldEnds = fieldEnds -exports.types = types -exports.modes = modes -exports.numeric = numeric -exports.headerSize = headerSize -exports.blockSize = blockSize -exports.knownExtended = knownExtended - -exports.Pack = require("./lib/pack.js") -exports.Parse = require("./lib/parse.js") -exports.Extract = require("./lib/extract.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/00-setup-fixtures.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/00-setup-fixtures.js deleted file mode 100644 index 1524ff7a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/00-setup-fixtures.js +++ /dev/null @@ -1,53 +0,0 @@ -// the fixtures have some weird stuff that is painful -// to include directly in the repo for various reasons. -// -// So, unpack the fixtures with the system tar first. -// -// This means, of course, that it'll only work if you -// already have a tar implementation, and some of them -// will not properly unpack the fixtures anyway. -// -// But, since usually those tests will fail on Windows -// and other systems with less capable filesystems anyway, -// at least this way we don't cause inconveniences by -// merely cloning the repo or installing the package. - -var tap = require("tap") -, child_process = require("child_process") -, rimraf = require("rimraf") -, test = tap.test -, path = require("path") - -test("clean fixtures", function (t) { - rimraf(path.resolve(__dirname, "fixtures"), function (er) { - t.ifError(er, "rimraf ./fixtures/") - t.end() - }) -}) - -test("clean tmp", function (t) { - rimraf(path.resolve(__dirname, "tmp"), function (er) { - t.ifError(er, "rimraf ./tmp/") - t.end() - }) -}) - -test("extract fixtures", function (t) { - var c = child_process.spawn("tar" - ,["xzvf", "fixtures.tgz"] - ,{ cwd: __dirname }) - - c.stdout.on("data", errwrite) - c.stderr.on("data", errwrite) - function errwrite (chunk) { - process.stderr.write(chunk) - } - - c.on("exit", function (code) { - t.equal(code, 0, "extract fixtures should exit with 0") - if (code) { - t.comment("Note, all tests from here on out will fail because of this.") - } - t.end() - }) -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/extract.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/extract.js deleted file mode 100644 index fff48181..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/extract.js +++ /dev/null @@ -1,358 +0,0 @@ -var tap = require("tap") - , tar = require("../tar.js") - , fs = require("fs") - , path = require("path") - , file = path.resolve(__dirname, "fixtures/c.tar") - , target = path.resolve(__dirname, "tmp/extract-test") - , index = 0 - , fstream = require("fstream") - - , ee = 0 - , expectEntries = -[ { path: 'c.txt', - mode: '644', - type: '0', - depth: undefined, - size: 513, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'cc.txt', - mode: '644', - type: '0', - depth: undefined, - size: 513, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '0', - depth: undefined, - size: 100, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'Ω.txt', - mode: '644', - type: '0', - depth: undefined, - size: 2, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'Ω.txt', - mode: '644', - type: '0', - depth: undefined, - size: 2, - linkpath: '', - nlink: 1, - dev: 234881026, - ino: 51693379 }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '0', - depth: undefined, - size: 200, - linkpath: '', - nlink: 1, - dev: 234881026, - ino: 51681874 }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '0', - depth: undefined, - size: 201, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', - mode: '777', - type: '2', - depth: undefined, - size: 0, - linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: '200-hard', - mode: '644', - type: '0', - depth: undefined, - size: 200, - linkpath: '', - nlink: 2, - dev: 234881026, - ino: 51681874 }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '1', - depth: undefined, - size: 0, - linkpath: path.resolve(target, '200-hard'), - nlink: 2, - dev: 234881026, - ino: 51681874 } ] - - , ef = 0 - , expectFiles = -[ { path: '', - mode: '40755', - type: 'Directory', - depth: 0, - linkpath: undefined }, - { path: '/200-hard', - mode: '100644', - type: 'File', - depth: 1, - size: 200, - linkpath: undefined, - nlink: 2 }, - { path: '/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '100644', - type: 'Link', - depth: 1, - size: 200, - linkpath: path.join(target, '200-hard'), - nlink: 2 }, - { path: '/200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', - mode: '120777', - type: 'SymbolicLink', - depth: 1, - size: 200, - linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - nlink: 1 }, - { path: '/c.txt', - mode: '100644', - type: 'File', - depth: 1, - size: 513, - linkpath: undefined, - nlink: 1 }, - { path: '/cc.txt', - mode: '100644', - type: 'File', - depth: 1, - size: 513, - linkpath: undefined, - nlink: 1 }, - { path: '/r', - mode: '40755', - type: 'Directory', - depth: 1, - linkpath: undefined }, - { path: '/r/e', - mode: '40755', - type: 'Directory', - depth: 2, - linkpath: undefined }, - { path: '/r/e/a', - mode: '40755', - type: 'Directory', - depth: 3, - linkpath: undefined }, - { path: '/r/e/a/l', - mode: '40755', - type: 'Directory', - depth: 4, - linkpath: undefined }, - { path: '/r/e/a/l/l', - mode: '40755', - type: 'Directory', - depth: 5, - linkpath: undefined }, - { path: '/r/e/a/l/l/y', - mode: '40755', - type: 'Directory', - depth: 6, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-', - mode: '40755', - type: 'Directory', - depth: 7, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d', - mode: '40755', - type: 'Directory', - depth: 8, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e', - mode: '40755', - type: 'Directory', - depth: 9, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e', - mode: '40755', - type: 'Directory', - depth: 10, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p', - mode: '40755', - type: 'Directory', - depth: 11, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-', - mode: '40755', - type: 'Directory', - depth: 12, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f', - mode: '40755', - type: 'Directory', - depth: 13, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o', - mode: '40755', - type: 'Directory', - depth: 14, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l', - mode: '40755', - type: 'Directory', - depth: 15, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d', - mode: '40755', - type: 'Directory', - depth: 16, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e', - mode: '40755', - type: 'Directory', - depth: 17, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r', - mode: '40755', - type: 'Directory', - depth: 18, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-', - mode: '40755', - type: 'Directory', - depth: 19, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p', - mode: '40755', - type: 'Directory', - depth: 20, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a', - mode: '40755', - type: 'Directory', - depth: 21, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t', - mode: '40755', - type: 'Directory', - depth: 22, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h', - mode: '40755', - type: 'Directory', - depth: 23, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '100644', - type: 'File', - depth: 24, - size: 100, - linkpath: undefined, - nlink: 1 }, - { path: '/Ω.txt', - mode: '100644', - type: 'File', - depth: 1, - size: 2, - linkpath: undefined, - nlink: 1 } ] - - - -// The extract class basically just pipes the input -// to a Reader, and then to a fstream.DirWriter - -// So, this is as much a test of fstream.Reader and fstream.Writer -// as it is of tar.Extract, but it sort of makes sense. - -tap.test("extract test", function (t) { - var extract = tar.Extract(target) - var inp = fs.createReadStream(file) - - // give it a weird buffer size to try to break in odd places - inp.bufferSize = 1234 - - inp.pipe(extract) - - extract.on("end", function () { - t.equal(ee, expectEntries.length, "should see "+ee+" entries") - - // should get no more entries after end - extract.removeAllListeners("entry") - extract.on("entry", function (e) { - t.fail("Should not get entries after end!") - }) - - next() - }) - - extract.on("entry", function (entry) { - var found = - { path: entry.path - , mode: entry.props.mode.toString(8) - , type: entry.props.type - , depth: entry.props.depth - , size: entry.props.size - , linkpath: entry.props.linkpath - , nlink: entry.props.nlink - , dev: entry.props.dev - , ino: entry.props.ino - } - - var wanted = expectEntries[ee ++] - - t.equivalent(found, wanted, "tar entry " + ee + " " + wanted.path) - }) - - function next () { - var r = fstream.Reader({ path: target - , type: "Directory" - // this is just to encourage consistency - , sort: "alpha" }) - - r.on("ready", function () { - foundEntry(r) - }) - - r.on("end", finish) - - function foundEntry (entry) { - var p = entry.path.substr(target.length) - var found = - { path: p - , mode: entry.props.mode.toString(8) - , type: entry.props.type - , depth: entry.props.depth - , size: entry.props.size - , linkpath: entry.props.linkpath - , nlink: entry.props.nlink - } - - var wanted = expectFiles[ef ++] - - t.has(found, wanted, "unpacked file " + ef + " " + wanted.path) - - entry.on("entry", foundEntry) - } - - function finish () { - t.equal(ef, expectFiles.length, "should have "+ef+" items") - t.end() - } - } -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/fixtures.tgz b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/fixtures.tgz deleted file mode 100644 index 4501bcf2..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/fixtures.tgz and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/header.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/header.js deleted file mode 100644 index 8ea6f795..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/header.js +++ /dev/null @@ -1,183 +0,0 @@ -var tap = require("tap") -var TarHeader = require("../lib/header.js") -var tar = require("../tar.js") -var fs = require("fs") - - -var headers = - { "a.txt file header": - [ "612e747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303430312031313635313336303333332030313234353100203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'a.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 257 - , mtime: 1319493851 - , cksum: 5417 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - - , "omega pax": // the extended header from omega tar. - [ "5061784865616465722fcea92e74787400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303137302031313534333731303631312030313530353100207800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'PaxHeader/Ω.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 120 - , mtime: 1301254537 - , cksum: 6697 - , type: 'x' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } ] - - , "omega file header": - [ "cea92e7478740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303030322031313534333731303631312030313330373200203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'Ω.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 2 - , mtime: 1301254537 - , cksum: 5690 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } ] - - , "foo.js file header": - [ "666f6f2e6a730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303030342031313534333637303734312030313236313700203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'foo.js' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 4 - , mtime: 1301246433 - , cksum: 5519 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - - , "b.txt file header": - [ "622e747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030313030302031313635313336303637372030313234363100203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'b.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 512 - , mtime: 1319494079 - , cksum: 5425 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - - , "deep nested file": - [ "636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363633030303634342000303537373631200030303030323420003030303030303030313434203131363532313531353333203034333331340020300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000075737461720030306973616163730000000000000000000000000000000000000000000000000000737461666600000000000000000000000000000000000000000000000000000030303030303020003030303030302000722f652f612f6c2f6c2f792f2d2f642f652f652f702f2d2f662f6f2f6c2f642f652f722f2d2f702f612f742f680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true, - path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 100 - , mtime: 1319687003 - , cksum: 18124 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - } - -tap.test("parsing", function (t) { - Object.keys(headers).forEach(function (name) { - var h = headers[name] - , header = new Buffer(h[0], "hex") - , expect = h[1] - , parsed = new TarHeader(header) - - // console.error(parsed) - t.has(parsed, expect, "parse " + name) - }) - t.end() -}) - -tap.test("encoding", function (t) { - Object.keys(headers).forEach(function (name) { - var h = headers[name] - , expect = new Buffer(h[0], "hex") - , encoded = TarHeader.encode(h[1]) - - // might have slightly different bytes, since the standard - // isn't very strict, but should have the same semantics - // checkSum will be different, but cksumValid will be true - - var th = new TarHeader(encoded) - delete h[1].block - delete h[1].needExtended - delete h[1].cksum - t.has(th, h[1], "fields "+name) - }) - t.end() -}) - -// test these manually. they're a bit rare to find in the wild -tap.test("parseNumeric tests", function (t) { - var parseNumeric = TarHeader.parseNumeric - , numbers = - { "303737373737373700": 2097151 - , "30373737373737373737373700": 8589934591 - , "303030303036343400": 420 - , "800000ffffffffffff": 281474976710655 - , "ffffff000000000001": -281474976710654 - , "ffffff000000000000": -281474976710655 - , "800000000000200000": 2097152 - , "8000000000001544c5": 1393861 - , "ffffffffffff1544c5": -15383354 } - Object.keys(numbers).forEach(function (n) { - var b = new Buffer(n, "hex") - t.equal(parseNumeric(b), numbers[n], n + " === " + numbers[n]) - }) - t.end() -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/pack-no-proprietary.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/pack-no-proprietary.js deleted file mode 100644 index 5bf0e540..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/pack-no-proprietary.js +++ /dev/null @@ -1,854 +0,0 @@ -// This is exactly like test/pack.js, except that it's excluding -// any proprietary headers. -// -// This loses some information about the filesystem, but creates -// tarballs that are supported by more versions of tar, especially -// old non-spec-compliant copies of gnutar. - -// the symlink file is excluded from git, because it makes -// windows freak the hell out. -var fs = require("fs") - , path = require("path") - , symlink = path.resolve(__dirname, "fixtures/symlink") -try { fs.unlinkSync(symlink) } catch (e) {} -fs.symlinkSync("./hardlink-1", symlink) -process.on("exit", function () { - fs.unlinkSync(symlink) -}) - -var tap = require("tap") - , tar = require("../tar.js") - , pkg = require("../package.json") - , Pack = tar.Pack - , fstream = require("fstream") - , Reader = fstream.Reader - , Writer = fstream.Writer - , input = path.resolve(__dirname, "fixtures/") - , target = path.resolve(__dirname, "tmp/pack.tar") - , uid = process.getuid ? process.getuid() : 0 - , gid = process.getgid ? process.getgid() : 0 - - , entries = - - // the global header and root fixtures/ dir are going to get - // a different date each time, so omit that bit. - // Also, dev/ino values differ across machines, so that's not - // included. - [ [ 'entry', - { path: 'fixtures/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/200cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - uid: uid, - gid: gid, - size: 200 } ] - - , [ 'entry', - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 200, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/a.txt', - mode: 420, - uid: uid, - gid: gid, - size: 257, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/b.txt', - mode: 420, - uid: uid, - gid: gid, - size: 512, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/c.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/cc.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/foo.js', - mode: 420, - uid: uid, - gid: gid, - size: 4, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-1', - mode: 420, - uid: uid, - gid: gid, - size: 200, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-2', - mode: 420, - uid: uid, - gid: gid, - size: 0, - type: '1', - linkpath: 'fixtures/hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/star.4.html', - mode: 420, - uid: uid, - gid: gid, - size: 54081, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/packtest/Ω.txt', - uid: uid, - gid: gid, - size: 2 } ] - - , [ 'entry', - { path: 'fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 100, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/symlink', - uid: uid, - gid: gid, - size: 0, - type: '2', - linkpath: 'hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: "fixtures/Ω.txt" - , uid: uid - , gid: gid - , size: 2 } ] - - , [ 'entry', - { path: 'fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - ] - - -// first, make sure that the hardlinks are actually hardlinks, or this -// won't work. Git has a way of replacing them with a copy. -var hard1 = path.resolve(__dirname, "fixtures/hardlink-1") - , hard2 = path.resolve(__dirname, "fixtures/hardlink-2") - , fs = require("fs") - -try { fs.unlinkSync(hard2) } catch (e) {} -fs.linkSync(hard1, hard2) - -tap.test("with global header", { timeout: 10000 }, function (t) { - runTest(t, true) -}) - -tap.test("without global header", { timeout: 10000 }, function (t) { - runTest(t, false) -}) - -function alphasort (a, b) { - return a === b ? 0 - : a.toLowerCase() > b.toLowerCase() ? 1 - : a.toLowerCase() < b.toLowerCase() ? -1 - : a > b ? 1 - : -1 -} - - -function runTest (t, doGH) { - var reader = Reader({ path: input - , filter: function () { - return !this.path.match(/\.(tar|hex)$/) - } - , sort: alphasort - }) - - var props = doGH ? pkg : {} - props.noProprietary = true - var pack = Pack(props) - var writer = Writer(target) - - // global header should be skipped regardless, since it has no content. - var entry = 0 - - t.ok(reader, "reader ok") - t.ok(pack, "pack ok") - t.ok(writer, "writer ok") - - pack.pipe(writer) - - var parse = tar.Parse() - t.ok(parse, "parser should be ok") - - pack.on("data", function (c) { - // console.error("PACK DATA") - if (c.length !== 512) { - // this one is too noisy, only assert if it'll be relevant - t.equal(c.length, 512, "parser should emit data in 512byte blocks") - } - parse.write(c) - }) - - pack.on("end", function () { - // console.error("PACK END") - t.pass("parser ends") - parse.end() - }) - - pack.on("error", function (er) { - t.fail("pack error", er) - }) - - parse.on("error", function (er) { - t.fail("parse error", er) - }) - - writer.on("error", function (er) { - t.fail("writer error", er) - }) - - reader.on("error", function (er) { - t.fail("reader error", er) - }) - - parse.on("*", function (ev, e) { - var wanted = entries[entry++] - if (!wanted) { - t.fail("unexpected event: "+ev) - return - } - t.equal(ev, wanted[0], "event type should be "+wanted[0]) - - if (ev !== wanted[0] || e.path !== wanted[1].path) { - console.error(wanted) - console.error([ev, e.props]) - e.on("end", function () { - console.error(e.fields) - throw "break" - }) - } - - t.has(e.props, wanted[1], "properties "+wanted[1].path) - if (wanted[2]) { - e.on("end", function () { - if (!e.fields) { - t.ok(e.fields, "should get fields") - } else { - t.has(e.fields, wanted[2], "should get expected fields") - } - }) - } - }) - - reader.pipe(pack) - - writer.on("close", function () { - t.equal(entry, entries.length, "should get all expected entries") - t.pass("it finished") - t.end() - }) - -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/pack.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/pack.js deleted file mode 100644 index 0f509945..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/pack.js +++ /dev/null @@ -1,897 +0,0 @@ - -// the symlink file is excluded from git, because it makes -// windows freak the hell out. -var fs = require("fs") - , path = require("path") - , symlink = path.resolve(__dirname, "fixtures/symlink") -try { fs.unlinkSync(symlink) } catch (e) {} -fs.symlinkSync("./hardlink-1", symlink) -process.on("exit", function () { - fs.unlinkSync(symlink) -}) - - -var tap = require("tap") - , tar = require("../tar.js") - , pkg = require("../package.json") - , Pack = tar.Pack - , fstream = require("fstream") - , Reader = fstream.Reader - , Writer = fstream.Writer - , input = path.resolve(__dirname, "fixtures/") - , target = path.resolve(__dirname, "tmp/pack.tar") - , uid = process.getuid ? process.getuid() : 0 - , gid = process.getgid ? process.getgid() : 0 - - , entries = - - // the global header and root fixtures/ dir are going to get - // a different date each time, so omit that bit. - // Also, dev/ino values differ across machines, so that's not - // included. - [ [ 'globalExtendedHeader', - { path: 'PaxHeader/', - mode: 438, - uid: 0, - gid: 0, - type: 'g', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { "NODETAR.author": pkg.author, - "NODETAR.name": pkg.name, - "NODETAR.description": pkg.description, - "NODETAR.version": pkg.version, - "NODETAR.repository.type": pkg.repository.type, - "NODETAR.repository.url": pkg.repository.url, - "NODETAR.main": pkg.main, - "NODETAR.scripts.test": pkg.scripts.test } ] - - , [ 'entry', - { path: 'fixtures/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/200cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - 'NODETAR.depth': '1', - 'NODETAR.type': 'File', - nlink: 1, - uid: uid, - gid: gid, - size: 200, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 200, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '', - 'NODETAR.depth': '1', - 'NODETAR.type': 'File', - nlink: 1, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/a.txt', - mode: 420, - uid: uid, - gid: gid, - size: 257, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/b.txt', - mode: 420, - uid: uid, - gid: gid, - size: 512, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/c.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/cc.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/foo.js', - mode: 420, - uid: uid, - gid: gid, - size: 4, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-1', - mode: 420, - uid: uid, - gid: gid, - size: 200, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-2', - mode: 420, - uid: uid, - gid: gid, - size: 0, - type: '1', - linkpath: 'fixtures/hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/star.4.html', - mode: 420, - uid: uid, - gid: gid, - size: 54081, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/packtest/Ω.txt', - 'NODETAR.depth': '2', - 'NODETAR.type': 'File', - nlink: 1, - uid: uid, - gid: gid, - size: 2, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '', - 'NODETAR.depth': '2', - 'NODETAR.type': 'File', - nlink: 1, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 100, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/symlink', - uid: uid, - gid: gid, - size: 0, - type: '2', - linkpath: 'hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: "fixtures/Ω.txt" - , "NODETAR.depth": "1" - , "NODETAR.type": "File" - , nlink: 1 - , uid: uid - , gid: gid - , size: 2 - , "NODETAR.blksize": "4096" - , "NODETAR.blocks": "8" } ] - - , [ 'entry', - { path: 'fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '', - 'NODETAR.depth': '1', - 'NODETAR.type': 'File', - nlink: 1, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - ] - - -// first, make sure that the hardlinks are actually hardlinks, or this -// won't work. Git has a way of replacing them with a copy. -var hard1 = path.resolve(__dirname, "fixtures/hardlink-1") - , hard2 = path.resolve(__dirname, "fixtures/hardlink-2") - , fs = require("fs") - -try { fs.unlinkSync(hard2) } catch (e) {} -fs.linkSync(hard1, hard2) - -tap.test("with global header", { timeout: 10000 }, function (t) { - runTest(t, true) -}) - -tap.test("without global header", { timeout: 10000 }, function (t) { - runTest(t, false) -}) - -function alphasort (a, b) { - return a === b ? 0 - : a.toLowerCase() > b.toLowerCase() ? 1 - : a.toLowerCase() < b.toLowerCase() ? -1 - : a > b ? 1 - : -1 -} - - -function runTest (t, doGH) { - var reader = Reader({ path: input - , filter: function () { - return !this.path.match(/\.(tar|hex)$/) - } - , sort: alphasort - }) - - var pack = Pack(doGH ? pkg : null) - var writer = Writer(target) - - // skip the global header if we're not doing that. - var entry = doGH ? 0 : 1 - - t.ok(reader, "reader ok") - t.ok(pack, "pack ok") - t.ok(writer, "writer ok") - - pack.pipe(writer) - - var parse = tar.Parse() - t.ok(parse, "parser should be ok") - - pack.on("data", function (c) { - // console.error("PACK DATA") - if (c.length !== 512) { - // this one is too noisy, only assert if it'll be relevant - t.equal(c.length, 512, "parser should emit data in 512byte blocks") - } - parse.write(c) - }) - - pack.on("end", function () { - // console.error("PACK END") - t.pass("parser ends") - parse.end() - }) - - pack.on("error", function (er) { - t.fail("pack error", er) - }) - - parse.on("error", function (er) { - t.fail("parse error", er) - }) - - writer.on("error", function (er) { - t.fail("writer error", er) - }) - - reader.on("error", function (er) { - t.fail("reader error", er) - }) - - parse.on("*", function (ev, e) { - var wanted = entries[entry++] - if (!wanted) { - t.fail("unexpected event: "+ev) - return - } - t.equal(ev, wanted[0], "event type should be "+wanted[0]) - - // if (ev !== wanted[0] || e.path !== wanted[1].path) { - // console.error(wanted) - // console.error([ev, e.props]) - // throw "break" - // } - - t.has(e.props, wanted[1], "properties "+wanted[1].path) - if (wanted[2]) { - e.on("end", function () { - if (!e.fields) { - t.ok(e.fields, "should get fields") - } else { - t.has(e.fields, wanted[2], "should get expected fields") - } - }) - } - }) - - reader.pipe(pack) - - writer.on("close", function () { - t.equal(entry, entries.length, "should get all expected entries") - t.pass("it finished") - t.end() - }) - -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/parse.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/parse.js deleted file mode 100644 index f765a501..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/parse.js +++ /dev/null @@ -1,359 +0,0 @@ -var tap = require("tap") - , tar = require("../tar.js") - , fs = require("fs") - , path = require("path") - , file = path.resolve(__dirname, "fixtures/c.tar") - , index = 0 - - , expect = -[ [ 'entry', - { path: 'c.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 513, - mtime: new Date('Wed, 26 Oct 2011 01:10:58 GMT'), - cksum: 5422, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'entry', - { path: 'cc.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 513, - mtime: new Date('Wed, 26 Oct 2011 01:11:02 GMT'), - cksum: 5525, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'entry', - { path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 100, - mtime: new Date('Thu, 27 Oct 2011 03:43:23 GMT'), - cksum: 18124, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'entry', - { path: 'Ω.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 2, - mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - cksum: 5695, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/Ω.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 120, - mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - cksum: 6702, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'Ω.txt', - ctime: 1319737909, - atime: 1319739061, - dev: 234881026, - ino: 51693379, - nlink: 1 } ], - [ 'entry', - { path: 'Ω.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 2, - mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - cksum: 5695, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - atime: new Date('Thu, 27 Oct 2011 18:11:01 GMT'), - dev: 234881026, - ino: 51693379, - nlink: 1 }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 353, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 14488, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - ctime: 1319686868, - atime: 1319741254, - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 1 } ], - [ 'entry', - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 200, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 14570, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - atime: new Date('Thu, 27 Oct 2011 18:47:34 GMT'), - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 1 }, - undefined ], - [ 'longPath', - { path: '././@LongLink', - mode: 0, - uid: 0, - gid: 0, - size: 201, - mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), - cksum: 4976, - type: 'L', - linkpath: '', - ustar: false }, - '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ], - [ 'entry', - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 1000, - gid: 1000, - size: 201, - mtime: new Date('Thu, 27 Oct 2011 22:21:50 GMT'), - cksum: 14086, - type: '0', - linkpath: '', - ustar: false }, - undefined ], - [ 'longLinkpath', - { path: '././@LongLink', - mode: 0, - uid: 0, - gid: 0, - size: 201, - mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), - cksum: 4975, - type: 'K', - linkpath: '', - ustar: false }, - '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ], - [ 'longPath', - { path: '././@LongLink', - mode: 0, - uid: 0, - gid: 0, - size: 201, - mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), - cksum: 4976, - type: 'L', - linkpath: '', - ustar: false }, - '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL' ], - [ 'entry', - { path: '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', - mode: 511, - uid: 1000, - gid: 1000, - size: 0, - mtime: new Date('Fri, 28 Oct 2011 23:05:17 GMT'), - cksum: 21603, - type: '2', - linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - ustar: false }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/200-hard', - mode: 420, - uid: 24561, - gid: 20, - size: 143, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 6533, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { ctime: 1320617144, - atime: 1320617232, - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 } ], - [ 'entry', - { path: '200-hard', - mode: 420, - uid: 24561, - gid: 20, - size: 200, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 5526, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Sun, 06 Nov 2011 22:05:44 GMT'), - atime: new Date('Sun, 06 Nov 2011 22:07:12 GMT'), - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 353, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 14488, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - ctime: 1320617144, - atime: 1320617406, - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 } ], - [ 'entry', - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 15173, - type: '1', - linkpath: '200-hard', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Sun, 06 Nov 2011 22:05:44 GMT'), - atime: new Date('Sun, 06 Nov 2011 22:10:06 GMT'), - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 }, - undefined ] ] - - -tap.test("parser test", function (t) { - var parser = tar.Parse() - - parser.on("end", function () { - t.equal(index, expect.length, "saw all expected events") - t.end() - }) - - fs.createReadStream(file) - .pipe(parser) - .on("*", function (ev, entry) { - var wanted = expect[index] - if (!wanted) { - return t.fail("Unexpected event: " + ev) - } - var result = [ev, entry.props] - entry.on("end", function () { - result.push(entry.fields || entry.body) - - t.equal(ev, wanted[0], index + " event type") - t.equivalent(entry.props, wanted[1], wanted[1].path + " entry properties") - if (wanted[2]) { - t.equivalent(result[2], wanted[2], "metadata values") - } - index ++ - }) - }) -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/zz-cleanup.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/zz-cleanup.js deleted file mode 100644 index a00ff7fa..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/zz-cleanup.js +++ /dev/null @@ -1,20 +0,0 @@ -// clean up the fixtures - -var tap = require("tap") -, rimraf = require("rimraf") -, test = tap.test -, path = require("path") - -test("clean fixtures", function (t) { - rimraf(path.resolve(__dirname, "fixtures"), function (er) { - t.ifError(er, "rimraf ./fixtures/") - t.end() - }) -}) - -test("clean tmp", function (t) { - rimraf(path.resolve(__dirname, "tmp"), function (er) { - t.ifError(er, "rimraf ./tmp/") - t.end() - }) -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/index.js deleted file mode 100644 index da99ffef..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; -var path = require('path'); -var tmpdir = require('os').tmpdir(); -var uuid = require('uuid'); - -module.exports = function (ext) { - return path.join(tmpdir, uuid.v4() + (ext || '')); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/.npmignore deleted file mode 100644 index fd4f2b06..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -.DS_Store diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/.travis.yml deleted file mode 100644 index b6d42c3e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - 0.9 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/LICENSE.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/LICENSE.md deleted file mode 100644 index f039427f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/LICENSE.md +++ /dev/null @@ -1,2 +0,0 @@ -Copyright (c) 2010-2012 Robert Kieffer -MIT License - http://opensource.org/licenses/mit-license.php diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/README.md deleted file mode 100644 index d2adba18..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/README.md +++ /dev/null @@ -1,204 +0,0 @@ -# uuid [![Build Status](https://secure.travis-ci.org/shtylman/node-uuid.png?branch=master)](http://travis-ci.org/shtylman/node-uuid) # - -[![browser support](http://ci.testling.com/shtylman/node-uuid.png)](http://ci.testling.com/shtylman/node-uuid) - -Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. - -Features: - -* Generate RFC4122 version 1 or version 4 UUIDs -* Runs in node.js and all browsers. -* Cryptographically strong random # generation on supporting platforms -* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! ) -* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html) - -## Getting Started - -Install it in your browser: - -```html -<script src="uuid.js"></script> -``` - -Or in node.js: - -``` -npm install uuid -``` - -```javascript -var uuid = require('uuid'); - -// Generate a v1 (time-based) id -uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' - -// Generate a v4 (random) id -uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1' -``` - -## API - -### uuid.v1([`options` [, `buffer` [, `offset`]]]) - -Generate and return a RFC4122 v1 (timestamp-based) UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. - * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. - * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used. - * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Notes: - -1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) - -Example: Generate string UUID with fully-specified options - -```javascript -uuid.v1({ - node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], - clockseq: 0x1234, - msecs: new Date('2011-11-01').getTime(), - nsecs: 5678 -}); // -> "710b962e-041c-11e1-9234-0123456789ab" -``` - -Example: In-place generation of two binary IDs - -```javascript -// Generate two ids in an array -var arr = new Array(32); // -> [] -uuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15] -uuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15] - -// Optionally use uuid.unparse() to get stringify the ids -uuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115' -uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115' -``` - -### uuid.v4([`options` [, `buffer` [, `offset`]]]) - -Generate and return a RFC4122 v4 UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values - * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Example: Generate string UUID with fully-specified options - -```javascript -uuid.v4({ - random: [ - 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, - 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 - ] -}); -// -> "109156be-c4fb-41ea-b1b4-efe1671c5836" -``` - -Example: Generate two IDs in a single buffer - -```javascript -var buffer = new Array(32); // (or 'new Buffer' in node.js) -uuid.v4(null, buffer, 0); -uuid.v4(null, buffer, 16); -``` - -### uuid.parse(id[, buffer[, offset]]) -### uuid.unparse(buffer[, offset]) - -Parse and unparse UUIDs - - * `id` - (String) UUID(-like) string - * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used - * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0 - -Example parsing and unparsing a UUID string - -```javascript -var bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> <Buffer 79 7f f0 43 11 eb 11 e1 80 d6 51 09 98 75 5d 10> -var string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10' -``` - -### uuid.noConflict() - -(Browsers only) Set `uuid` property back to it's previous value. - -Returns the uuid object. - -Example: - -```javascript -var myUuid = uuid.noConflict(); -myUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' -``` - -## Deprecated APIs - -Support for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version. - -### uuid([format [, buffer [, offset]]]) - -uuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary). - -### uuid.BufferClass - -The class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API. - -## Testing - -In node.js - -``` -> cd test -> node test.js -``` - -In Browser - -``` -open test/test.html -``` - -### Benchmarking - -Requires node.js - -``` -npm install uuid uuid-js -node benchmark/benchmark.js -``` - -For a more complete discussion of uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/uuid/wiki/Benchmark) - -For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance). - -## Release notes - -### 1.4.0 - -* Improved module context detection -* Removed public RNG functions - -### 1.3.2 - -* Improve tests and handling of v1() options (Issue #24) -* Expose RNG option to allow for perf testing with different generators - -### 1.3.0 - -* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! -* Support for node.js crypto API -* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/README.md deleted file mode 100644 index aaeb2ea0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# node-uuid Benchmarks - -### Results - -To see the results of our benchmarks visit https://github.com/broofa/node-uuid/wiki/Benchmark - -### Run them yourself - -node-uuid comes with some benchmarks to measure performance of generating UUIDs. These can be run using node.js. node-uuid is being benchmarked against some other uuid modules, that are available through npm namely `uuid` and `uuid-js`. - -To prepare and run the benchmark issue; - -``` -npm install uuid uuid-js -node benchmark/benchmark.js -``` - -You'll see an output like this one: - -``` -# v4 -nodeuuid.v4(): 854700 uuids/second -nodeuuid.v4('binary'): 788643 uuids/second -nodeuuid.v4('binary', buffer): 1336898 uuids/second -uuid(): 479386 uuids/second -uuid('binary'): 582072 uuids/second -uuidjs.create(4): 312304 uuids/second - -# v1 -nodeuuid.v1(): 938086 uuids/second -nodeuuid.v1('binary'): 683060 uuids/second -nodeuuid.v1('binary', buffer): 1644736 uuids/second -uuidjs.create(1): 190621 uuids/second -``` - -* The `uuid()` entries are for Nikhil Marathe's [uuid module](https://bitbucket.org/nikhilm/uuidjs) which is a wrapper around the native libuuid library. -* The `uuidjs()` entries are for Patrick Negri's [uuid-js module](https://github.com/pnegri/uuid-js) which is a pure javascript implementation based on [UUID.js](https://github.com/LiosK/UUID.js) by LiosK. - -If you want to get more reliable results you can run the benchmark multiple times and write the output into a log file: - -``` -for i in {0..9}; do node benchmark/benchmark.js >> benchmark/bench_0.4.12.log; done; -``` - -If you're interested in how performance varies between different node versions, you can issue the above command multiple times. - -You can then use the shell script `bench.sh` provided in this directory to calculate the averages over all benchmark runs and draw a nice plot: - -``` -(cd benchmark/ && ./bench.sh) -``` - -This assumes you have [gnuplot](http://www.gnuplot.info/) and [ImageMagick](http://www.imagemagick.org/) installed. You'll find a nice `bench.png` graph in the `benchmark/` directory then. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/bench.gnu b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/bench.gnu deleted file mode 100644 index a342fbbe..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/bench.gnu +++ /dev/null @@ -1,174 +0,0 @@ -#!/opt/local/bin/gnuplot -persist -# -# -# G N U P L O T -# Version 4.4 patchlevel 3 -# last modified March 2011 -# System: Darwin 10.8.0 -# -# Copyright (C) 1986-1993, 1998, 2004, 2007-2010 -# Thomas Williams, Colin Kelley and many others -# -# gnuplot home: http://www.gnuplot.info -# faq, bugs, etc: type "help seeking-assistance" -# immediate help: type "help" -# plot window: hit 'h' -set terminal postscript eps noenhanced defaultplex \ - leveldefault color colortext \ - solid linewidth 1.2 butt noclip \ - palfuncparam 2000,0.003 \ - "Helvetica" 14 -set output 'bench.eps' -unset clip points -set clip one -unset clip two -set bar 1.000000 front -set border 31 front linetype -1 linewidth 1.000 -set xdata -set ydata -set zdata -set x2data -set y2data -set timefmt x "%d/%m/%y,%H:%M" -set timefmt y "%d/%m/%y,%H:%M" -set timefmt z "%d/%m/%y,%H:%M" -set timefmt x2 "%d/%m/%y,%H:%M" -set timefmt y2 "%d/%m/%y,%H:%M" -set timefmt cb "%d/%m/%y,%H:%M" -set boxwidth -set style fill empty border -set style rectangle back fc lt -3 fillstyle solid 1.00 border lt -1 -set style circle radius graph 0.02, first 0, 0 -set dummy x,y -set format x "% g" -set format y "% g" -set format x2 "% g" -set format y2 "% g" -set format z "% g" -set format cb "% g" -set angles radians -unset grid -set key title "" -set key outside left top horizontal Right noreverse enhanced autotitles columnhead nobox -set key noinvert samplen 4 spacing 1 width 0 height 0 -set key maxcolumns 2 maxrows 0 -unset label -unset arrow -set style increment default -unset style line -set style line 1 linetype 1 linewidth 2.000 pointtype 1 pointsize default pointinterval 0 -unset style arrow -set style histogram clustered gap 2 title offset character 0, 0, 0 -unset logscale -set offsets graph 0.05, 0.15, 0, 0 -set pointsize 1.5 -set pointintervalbox 1 -set encoding default -unset polar -unset parametric -unset decimalsign -set view 60, 30, 1, 1 -set samples 100, 100 -set isosamples 10, 10 -set surface -unset contour -set clabel '%8.3g' -set mapping cartesian -set datafile separator whitespace -unset hidden3d -set cntrparam order 4 -set cntrparam linear -set cntrparam levels auto 5 -set cntrparam points 5 -set size ratio 0 1,1 -set origin 0,0 -set style data points -set style function lines -set xzeroaxis linetype -2 linewidth 1.000 -set yzeroaxis linetype -2 linewidth 1.000 -set zzeroaxis linetype -2 linewidth 1.000 -set x2zeroaxis linetype -2 linewidth 1.000 -set y2zeroaxis linetype -2 linewidth 1.000 -set ticslevel 0.5 -set mxtics default -set mytics default -set mztics default -set mx2tics default -set my2tics default -set mcbtics default -set xtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set xtics norangelimit -set xtics () -set ytics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set ytics autofreq norangelimit -set ztics border in scale 1,0.5 nomirror norotate offset character 0, 0, 0 -set ztics autofreq norangelimit -set nox2tics -set noy2tics -set cbtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set cbtics autofreq norangelimit -set title "" -set title offset character 0, 0, 0 font "" norotate -set timestamp bottom -set timestamp "" -set timestamp offset character 0, 0, 0 font "" norotate -set rrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) -set autoscale rfixmin -set autoscale rfixmax -set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] ) -set autoscale tfixmin -set autoscale tfixmax -set urange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale ufixmin -set autoscale ufixmax -set vrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale vfixmin -set autoscale vfixmax -set xlabel "" -set xlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate -set x2label "" -set x2label offset character 0, 0, 0 font "" textcolor lt -1 norotate -set xrange [ * : * ] noreverse nowriteback # (currently [-0.150000:3.15000] ) -set autoscale xfixmin -set autoscale xfixmax -set x2range [ * : * ] noreverse nowriteback # (currently [0.00000:3.00000] ) -set autoscale x2fixmin -set autoscale x2fixmax -set ylabel "" -set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set y2label "" -set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set yrange [ 0.00000 : 1.90000e+06 ] noreverse nowriteback # (currently [:] ) -set autoscale yfixmin -set autoscale yfixmax -set y2range [ * : * ] noreverse nowriteback # (currently [0.00000:1.90000e+06] ) -set autoscale y2fixmin -set autoscale y2fixmax -set zlabel "" -set zlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate -set zrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale zfixmin -set autoscale zfixmax -set cblabel "" -set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set cbrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) -set autoscale cbfixmin -set autoscale cbfixmax -set zero 1e-08 -set lmargin -1 -set bmargin -1 -set rmargin -1 -set tmargin -1 -set pm3d explicit at s -set pm3d scansautomatic -set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean -set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB -set palette rgbformulae 7, 5, 15 -set colorbox default -set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault -set loadpath -set fontpath -set fit noerrorvariables -GNUTERM = "aqua" -plot 'bench_results.txt' using 2:xticlabel(1) w lp lw 2, '' using 3:xticlabel(1) w lp lw 2, '' using 4:xticlabel(1) w lp lw 2, '' using 5:xticlabel(1) w lp lw 2, '' using 6:xticlabel(1) w lp lw 2, '' using 7:xticlabel(1) w lp lw 2, '' using 8:xticlabel(1) w lp lw 2, '' using 9:xticlabel(1) w lp lw 2 -# EOF diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/bench.sh b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/bench.sh deleted file mode 100755 index d870a0cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/bench.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# for a given node version run: -# for i in {0..9}; do node benchmark.js >> bench_0.6.2.log; done; - -PATTERNS=('nodeuuid.v1()' "nodeuuid.v1('binary'," 'nodeuuid.v4()' "nodeuuid.v4('binary'," "uuid()" "uuid('binary')" 'uuidjs.create(1)' 'uuidjs.create(4)' '140byte') -FILES=(node_uuid_v1_string node_uuid_v1_buf node_uuid_v4_string node_uuid_v4_buf libuuid_v4_string libuuid_v4_binary uuidjs_v1_string uuidjs_v4_string 140byte_es) -INDICES=(2 3 2 3 2 2 2 2 2) -VERSIONS=$( ls bench_*.log | sed -e 's/^bench_\([0-9\.]*\)\.log/\1/' | tr "\\n" " " ) -TMPJOIN="tmp_join" -OUTPUT="bench_results.txt" - -for I in ${!FILES[*]}; do - F=${FILES[$I]} - P=${PATTERNS[$I]} - INDEX=${INDICES[$I]} - echo "version $F" > $F - for V in $VERSIONS; do - (VAL=$( grep "$P" bench_$V.log | LC_ALL=en_US awk '{ sum += $'$INDEX' } END { print sum/NR }' ); echo $V $VAL) >> $F - done - if [ $I == 0 ]; then - cat $F > $TMPJOIN - else - join $TMPJOIN $F > $OUTPUT - cp $OUTPUT $TMPJOIN - fi - rm $F -done - -rm $TMPJOIN - -gnuplot bench.gnu -convert -density 200 -resize 800x560 -flatten bench.eps bench.png -rm bench.eps diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/benchmark-native.c b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/benchmark-native.c deleted file mode 100644 index dbfc75f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/benchmark-native.c +++ /dev/null @@ -1,34 +0,0 @@ -/* -Test performance of native C UUID generation - -To Compile: cc -luuid benchmark-native.c -o benchmark-native -*/ - -#include <stdio.h> -#include <unistd.h> -#include <sys/time.h> -#include <uuid/uuid.h> - -int main() { - uuid_t myid; - char buf[36+1]; - int i; - struct timeval t; - double start, finish; - - gettimeofday(&t, NULL); - start = t.tv_sec + t.tv_usec/1e6; - - int n = 2e5; - for (i = 0; i < n; i++) { - uuid_generate(myid); - uuid_unparse(myid, buf); - } - - gettimeofday(&t, NULL); - finish = t.tv_sec + t.tv_usec/1e6; - double dur = finish - start; - - printf("%d uuids/sec", (int)(n/dur)); - return 0; -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/benchmark.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/benchmark.js deleted file mode 100644 index 40e6efbe..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/benchmark.js +++ /dev/null @@ -1,84 +0,0 @@ -try { - var nodeuuid = require('../uuid'); -} catch (e) { - console.error('node-uuid require failed - skipping tests'); -} - -try { - var uuid = require('uuid'); -} catch (e) { - console.error('uuid require failed - skipping tests'); -} - -try { - var uuidjs = require('uuid-js'); -} catch (e) { - console.error('uuid-js require failed - skipping tests'); -} - -var N = 5e5; - -function rate(msg, t) { - console.log(msg + ': ' + - (N / (Date.now() - t) * 1e3 | 0) + - ' uuids/second'); -} - -console.log('# v4'); - -// node-uuid - string form -if (nodeuuid) { - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4(); - rate('nodeuuid.v4() - using node.js crypto RNG', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4({rng: nodeuuid.mathRNG}); - rate('nodeuuid.v4() - using Math.random() RNG', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary'); - rate('nodeuuid.v4(\'binary\')', t); - - var buffer = new nodeuuid.BufferClass(16); - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary', buffer); - rate('nodeuuid.v4(\'binary\', buffer)', t); -} - -// libuuid - string form -if (uuid) { - for (var i = 0, t = Date.now(); i < N; i++) uuid(); - rate('uuid()', t); - - for (var i = 0, t = Date.now(); i < N; i++) uuid('binary'); - rate('uuid(\'binary\')', t); -} - -// uuid-js - string form -if (uuidjs) { - for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(4); - rate('uuidjs.create(4)', t); -} - -// 140byte.es -for (var i = 0, t = Date.now(); i < N; i++) 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(s,r){r=Math.random()*16|0;return (s=='x'?r:r&0x3|0x8).toString(16)}); -rate('140byte.es_v4', t); - -console.log(''); -console.log('# v1'); - -// node-uuid - v1 string form -if (nodeuuid) { - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1(); - rate('nodeuuid.v1()', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary'); - rate('nodeuuid.v1(\'binary\')', t); - - var buffer = new nodeuuid.BufferClass(16); - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary', buffer); - rate('nodeuuid.v1(\'binary\', buffer)', t); -} - -// uuid-js - v1 string form -if (uuidjs) { - for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(1); - rate('uuidjs.create(1)', t); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/misc/compare.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/misc/compare.js deleted file mode 100644 index 3de34151..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/misc/compare.js +++ /dev/null @@ -1,62 +0,0 @@ -var assert = require('assert'), - nodeuuid = require('../'), - uuidjs = require('uuid-js'), - util = require('util'), - exec = require('child_process').exec, - os = require('os'); - -// On Mac Os X / macports there's only the ossp-uuid package that provides uuid -// On Linux there's uuid-runtime which provides uuidgen -var uuidCmd = os.type() === 'Darwin' ? 'uuid -1' : 'uuidgen -t'; - -function compare(ids) { - console.log(ids); - for (var i = 0; i < ids.length; i++) { - var id = ids[i].split('-'); - id = [id[2], id[1], id[0]].join(''); - ids[i] = id; - } - var sorted = ([].concat(ids)).sort(); - - if (sorted.toString() !== ids.toString()) { - console.log('Warning: sorted !== ids'); - } else { - console.log('everything in order!'); - } -} - -// Test time order of v1 uuids -var ids = []; -while (ids.length < 10e3) ids.push(nodeuuid.v1()); - -var max = 10; -console.log('node-uuid:'); -ids = []; -for (var i = 0; i < max; i++) ids.push(nodeuuid.v1()); -compare(ids); - -console.log(''); -console.log('uuidjs:'); -ids = []; -for (var i = 0; i < max; i++) ids.push(uuidjs.create(1).toString()); -compare(ids); - -console.log(''); -console.log('libuuid:'); -ids = []; -var count = 0; -var last = function() { - compare(ids); -} -var cb = function(err, stdout, stderr) { - ids.push(stdout.substring(0, stdout.length-1)); - count++; - if (count < max) { - return next(); - } - last(); -}; -var next = function() { - exec(uuidCmd, cb); -}; -next(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/misc/perf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/misc/perf.js deleted file mode 100644 index bdc9eb46..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/misc/perf.js +++ /dev/null @@ -1,102 +0,0 @@ -var assert = require('assert'); - -var uuid = require('../'); - -var log = console.log; - -var generators = { - v1: uuid.v1, - v4: uuid.v4 -}; - -var UUID_FORMAT = { - v1: /[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i, - v4: /[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i -}; - -var N = 1e4; - -// Get %'age an actual value differs from the ideal value -function divergence(actual, ideal) { - return Math.round(100*100*(actual - ideal)/ideal)/100; -} - -function rate(msg, t) { - log(msg + ': ' + (N / (Date.now() - t) * 1e3 | 0) + ' uuids\/second'); -} - -for (var version in generators) { - var counts = {}, max = 0; - var generator = generators[version]; - var format = UUID_FORMAT[version]; - - log('\nSanity check ' + N + ' ' + version + ' uuids'); - for (var i = 0, ok = 0; i < N; i++) { - id = generator(); - if (!format.test(id)) { - throw Error(id + ' is not a valid UUID string'); - } - - if (id != uuid.unparse(uuid.parse(id))) { - assert(fail, id + ' is not a valid id'); - } - - // Count digits for our randomness check - if (version == 'v4') { - var digits = id.replace(/-/g, '').split(''); - for (var j = digits.length-1; j >= 0; j--) { - var c = digits[j]; - max = Math.max(max, counts[c] = (counts[c] || 0) + 1); - } - } - } - - // Check randomness for v4 UUIDs - if (version == 'v4') { - // Limit that we get worried about randomness. (Purely empirical choice, this!) - var limit = 2*100*Math.sqrt(1/N); - - log('\nChecking v4 randomness. Distribution of Hex Digits (% deviation from ideal)'); - - for (var i = 0; i < 16; i++) { - var c = i.toString(16); - var bar = '', n = counts[c], p = Math.round(n/max*100|0); - - // 1-3,5-8, and D-F: 1:16 odds over 30 digits - var ideal = N*30/16; - if (i == 4) { - // 4: 1:1 odds on 1 digit, plus 1:16 odds on 30 digits - ideal = N*(1 + 30/16); - } else if (i >= 8 && i <= 11) { - // 8-B: 1:4 odds on 1 digit, plus 1:16 odds on 30 digits - ideal = N*(1/4 + 30/16); - } else { - // Otherwise: 1:16 odds on 30 digits - ideal = N*30/16; - } - var d = divergence(n, ideal); - - // Draw bar using UTF squares (just for grins) - var s = n/max*50 | 0; - while (s--) bar += '='; - - assert(Math.abs(d) < limit, c + ' |' + bar + '| ' + counts[c] + ' (' + d + '% < ' + limit + '%)'); - } - } -} - -// Perf tests -for (var version in generators) { - log('\nPerformance testing ' + version + ' UUIDs'); - var generator = generators[version]; - var buf = new uuid.BufferClass(16); - - for (var i = 0, t = Date.now(); i < N; i++) generator(); - rate('uuid.' + version + '()', t); - - for (var i = 0, t = Date.now(); i < N; i++) generator('binary'); - rate('uuid.' + version + '(\'binary\')', t); - - for (var i = 0, t = Date.now(); i < N; i++) generator('binary', buf); - rate('uuid.' + version + '(\'binary\', buffer)', t); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/package.json deleted file mode 100644 index d9f8435b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "uuid", - "version": "1.4.1", - "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", - "keywords": [ - "uuid", - "guid", - "rfc4122" - ], - "author": { - "name": "Robert Kieffer", - "email": "robert@broofa.com" - }, - "contributors": [ - { - "name": "Christoph Tavan", - "email": "dev@tavan.de" - } - ], - "main": "./uuid.js", - "devDependencies": { - "mocha": "1.8.0" - }, - "scripts": { - "test": "mocha test/test.js" - }, - "browser": { - "./rng.js": "./rng-browser.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/shtylman/node-uuid.git" - }, - "testling": { - "browsers": [ - "ie6..latest", - "firefox/3.6..latest", - "chrome/22..latest", - "safari/5.1..latest" - ], - "harness": "mocha-tdd", - "files": "test/*.js" - }, - "readme": "# uuid [![Build Status](https://secure.travis-ci.org/shtylman/node-uuid.png?branch=master)](http://travis-ci.org/shtylman/node-uuid) #\n\n[![browser support](http://ci.testling.com/shtylman/node-uuid.png)](http://ci.testling.com/shtylman/node-uuid)\n\nSimple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.\n\nFeatures:\n\n* Generate RFC4122 version 1 or version 4 UUIDs\n* Runs in node.js and all browsers.\n* Cryptographically strong random # generation on supporting platforms\n* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! )\n* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html)\n\n## Getting Started\n\nInstall it in your browser:\n\n```html\n<script src=\"uuid.js\"></script>\n```\n\nOr in node.js:\n\n```\nnpm install uuid\n```\n\n```javascript\nvar uuid = require('uuid');\n\n// Generate a v1 (time-based) id\nuuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n\n// Generate a v4 (random) id\nuuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'\n```\n\n## API\n\n### uuid.v1([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v1 (timestamp-based) UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1.\n * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.\n * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used.\n * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nNotes:\n\n1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v1({\n node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],\n clockseq: 0x1234,\n msecs: new Date('2011-11-01').getTime(),\n nsecs: 5678\n}); // -> \"710b962e-041c-11e1-9234-0123456789ab\"\n```\n\nExample: In-place generation of two binary IDs\n\n```javascript\n// Generate two ids in an array\nvar arr = new Array(32); // -> []\nuuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\nuuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\n\n// Optionally use uuid.unparse() to get stringify the ids\nuuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115'\nuuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115'\n```\n\n### uuid.v4([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v4 UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values\n * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v4({\n random: [\n 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,\n 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36\n ]\n});\n// -> \"109156be-c4fb-41ea-b1b4-efe1671c5836\"\n```\n\nExample: Generate two IDs in a single buffer\n\n```javascript\nvar buffer = new Array(32); // (or 'new Buffer' in node.js)\nuuid.v4(null, buffer, 0);\nuuid.v4(null, buffer, 16);\n```\n\n### uuid.parse(id[, buffer[, offset]])\n### uuid.unparse(buffer[, offset])\n\nParse and unparse UUIDs\n\n * `id` - (String) UUID(-like) string\n * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used\n * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0\n\nExample parsing and unparsing a UUID string\n\n```javascript\nvar bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> <Buffer 79 7f f0 43 11 eb 11 e1 80 d6 51 09 98 75 5d 10>\nvar string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10'\n```\n\n### uuid.noConflict()\n\n(Browsers only) Set `uuid` property back to it's previous value.\n\nReturns the uuid object.\n\nExample:\n\n```javascript\nvar myUuid = uuid.noConflict();\nmyUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n```\n\n## Deprecated APIs\n\nSupport for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version.\n\n### uuid([format [, buffer [, offset]]])\n\nuuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary).\n\n### uuid.BufferClass\n\nThe class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API.\n\n## Testing\n\nIn node.js\n\n```\n> cd test\n> node test.js\n```\n\nIn Browser\n\n```\nopen test/test.html\n```\n\n### Benchmarking\n\nRequires node.js\n\n```\nnpm install uuid uuid-js\nnode benchmark/benchmark.js\n```\n\nFor a more complete discussion of uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/uuid/wiki/Benchmark)\n\nFor browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance).\n\n## Release notes\n\n### 1.4.0\n\n* Improved module context detection\n* Removed public RNG functions\n\n### 1.3.2\n\n* Improve tests and handling of v1() options (Issue #24)\n* Expose RNG option to allow for perf testing with different generators\n\n### 1.3.0\n\n* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!\n* Support for node.js crypto API\n* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/shtylman/node-uuid/issues" - }, - "homepage": "https://github.com/shtylman/node-uuid", - "_id": "uuid@1.4.1", - "dist": { - "shasum": "4e6bbab179cc65c2f120508576c631bd7751af7c" - }, - "_from": "uuid@~1.4.0", - "_resolved": "https://registry.npmjs.org/uuid/-/uuid-1.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/rng-browser.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/rng-browser.js deleted file mode 100644 index 57b58d4b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/rng-browser.js +++ /dev/null @@ -1,31 +0,0 @@ - -var rng; - -if (global.crypto && crypto.getRandomValues) { - // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto - // Moderately fast, high quality - var _rnds8 = new Uint8Array(16); - rng = function whatwgRNG() { - crypto.getRandomValues(_rnds8); - return _rnds8; - }; -} - -if (!rng) { - // Math.random()-based (RNG) - // - // If all else fails, use Math.random(). It's fast, but is of unspecified - // quality. - var _rnds = new Array(16); - rng = function() { - for (var i = 0, r; i < 16; i++) { - if ((i & 0x03) === 0) r = Math.random() * 0x100000000; - _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; - } - - return _rnds; - }; -} - -module.exports = rng; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/rng.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/rng.js deleted file mode 100644 index 3977f798..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/rng.js +++ /dev/null @@ -1,4 +0,0 @@ -var rb = require('crypto').randomBytes; -module.exports = function() { - return rb(16); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/test/mocha.opts b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/test/mocha.opts deleted file mode 100644 index e2bfcc5a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/test/mocha.opts +++ /dev/null @@ -1 +0,0 @@ ---ui qunit diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/test/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/test/test.js deleted file mode 100644 index 4c9872ff..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/test/test.js +++ /dev/null @@ -1,105 +0,0 @@ -var assert = require('assert'); - -var uuid = require('../'); - -// Verify ordering of v1 ids created with explicit times -var TIME = 1321644961388; // 2011-11-18 11:36:01.388-08:00 - -function compare(name, ids) { - test(name, function() { - // avoid .map for older browsers - for (var i=0 ; i<ids.length ; ++i) { - ids[i] = ids[i].split('-').reverse().join('-'); - } - ids = ids.sort(); - var sorted = ([].concat(ids)).sort(); - - assert(sorted.toString() == ids.toString(), name + ' have expected order'); - }); -} - -// Verify ordering of v1 ids created using default behavior -compare('uuids with current time', [ - uuid.v1(), - uuid.v1(), - uuid.v1(), - uuid.v1(), - uuid.v1() -]); - -// Verify ordering of v1 ids created with explicit times -compare('uuids with time option', [ - uuid.v1({msecs: TIME - 10*3600*1000}), - uuid.v1({msecs: TIME - 1}), - uuid.v1({msecs: TIME}), - uuid.v1({msecs: TIME + 1}), - uuid.v1({msecs: TIME + 28*24*3600*1000}) -]); - -test('msec', function() { - assert( - uuid.v1({msecs: TIME}) != uuid.v1({msecs: TIME}), - 'IDs created at same msec are different' - ); -}); - -test('exception thrown when > 10k ids created in 1ms', function() { - // Verify throw if too many ids created - var thrown = false; - try { - uuid.v1({msecs: TIME, nsecs: 10000}); - } catch (e) { - thrown = true; - } - assert(thrown, 'Exception thrown when > 10K ids created in 1 ms'); -}); - -test('clock regression by msec', function() { - // Verify clock regression bumps clockseq - var uidt = uuid.v1({msecs: TIME}); - var uidtb = uuid.v1({msecs: TIME - 1}); - assert( - parseInt(uidtb.split('-')[3], 16) - parseInt(uidt.split('-')[3], 16) === 1, - 'Clock regression by msec increments the clockseq' - ); -}); - -test('clock regression by nsec', function() { - // Verify clock regression bumps clockseq - var uidtn = uuid.v1({msecs: TIME, nsecs: 10}); - var uidtnb = uuid.v1({msecs: TIME, nsecs: 9}); - assert( - parseInt(uidtnb.split('-')[3], 16) - parseInt(uidtn.split('-')[3], 16) === 1, - 'Clock regression by nsec increments the clockseq' - ); -}); - -test('explicit options product expected id', function() { - // Verify explicit options produce expected id - var id = uuid.v1({ - msecs: 1321651533573, - nsecs: 5432, - clockseq: 0x385c, - node: [ 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10 ] - }); - assert(id == 'd9428888-122b-11e1-b85c-61cd3cbb3210', 'Explicit options produce expected id'); -}); - -test('ids spanning 1ms boundary are 100ns apart', function() { - // Verify adjacent ids across a msec boundary are 1 time unit apart - var u0 = uuid.v1({msecs: TIME, nsecs: 9999}); - var u1 = uuid.v1({msecs: TIME + 1, nsecs: 0}); - - var before = u0.split('-')[0], after = u1.split('-')[0]; - var dt = parseInt(after, 16) - parseInt(before, 16); - assert(dt === 1, 'Ids spanning 1ms boundary are 100ns apart'); -}); - -test('parse/unparse', function() { - var id = '00112233445566778899aabbccddeeff'; - assert(uuid.unparse(uuid.parse(id.substr(0,10))) == - '00112233-4400-0000-0000-000000000000', 'Short parse'); - assert(uuid.unparse(uuid.parse('(this is the uuid -> ' + id + id)) == - '00112233-4455-6677-8899-aabbccddeeff', 'Dirty parse'); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/uuid.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/uuid.js deleted file mode 100644 index d0062fb4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/uuid.js +++ /dev/null @@ -1,187 +0,0 @@ -// uuid.js -// -// Copyright (c) 2010-2012 Robert Kieffer -// MIT License - http://opensource.org/licenses/mit-license.php - -// Unique ID creation requires a high quality random # generator. We feature -// detect to determine the best RNG source, normalizing to a function that -// returns 128-bits of randomness, since that's what's usually required -var _rng = require('./rng'); - -// Buffer class to use -var BufferClass = typeof(Buffer) == 'function' ? Buffer : Array; - -// Maps for number <-> hex string conversion -var _byteToHex = []; -var _hexToByte = {}; -for (var i = 0; i < 256; i++) { - _byteToHex[i] = (i + 0x100).toString(16).substr(1); - _hexToByte[_byteToHex[i]] = i; -} - -// **`parse()` - Parse a UUID into it's component bytes** -function parse(s, buf, offset) { - var i = (buf && offset) || 0, ii = 0; - - buf = buf || []; - s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) { - if (ii < 16) { // Don't overflow! - buf[i + ii++] = _hexToByte[oct]; - } - }); - - // Zero out remaining bytes if string was short - while (ii < 16) { - buf[i + ii++] = 0; - } - - return buf; -} - -// **`unparse()` - Convert UUID byte array (ala parse()) into a string** -function unparse(buf, offset) { - var i = offset || 0, bth = _byteToHex; - return bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]]; -} - -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html - -// random #'s we need to init node and clockseq -var _seedBytes = _rng(); - -// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) -var _nodeId = [ - _seedBytes[0] | 0x01, - _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] -]; - -// Per 4.2.2, randomize (14 bit) clockseq -var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff; - -// Previous uuid creation time -var _lastMSecs = 0, _lastNSecs = 0; - -// See https://github.com/broofa/node-uuid for API details -function v1(options, buf, offset) { - var i = buf && offset || 0; - var b = buf || []; - - options = options || {}; - - var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; - - // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); - - // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; - - // Time since last uuid creation (in msecs) - var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; - - // Per 4.2.1.2, Bump clockseq on clock regression - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } - - // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } - - // Per 4.2.1.2 Throw error if too many uuids are requested - if (nsecs >= 10000) { - throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; - - // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - msecs += 12219292800000; - - // `time_low` - var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; - - // `time_mid` - var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; - - // `time_high_and_version` - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - b[i++] = tmh >>> 16 & 0xff; - - // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - b[i++] = clockseq >>> 8 | 0x80; - - // `clock_seq_low` - b[i++] = clockseq & 0xff; - - // `node` - var node = options.node || _nodeId; - for (var n = 0; n < 6; n++) { - b[i + n] = node[n]; - } - - return buf ? buf : unparse(b); -} - -// **`v4()` - Generate random UUID** - -// See https://github.com/broofa/node-uuid for API details -function v4(options, buf, offset) { - // Deprecated - 'format' argument, as supported in v1.2 - var i = buf && offset || 0; - - if (typeof(options) == 'string') { - buf = options == 'binary' ? new BufferClass(16) : null; - options = null; - } - options = options || {}; - - var rnds = options.random || (options.rng || _rng)(); - - // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - - // Copy bytes to buffer, if provided - if (buf) { - for (var ii = 0; ii < 16; ii++) { - buf[i + ii] = rnds[ii]; - } - } - - return buf || unparse(rnds); -} - -// Export public API -var uuid = v4; -uuid.v1 = v1; -uuid.v4 = v4; -uuid.parse = parse; -uuid.unparse = unparse; -uuid.BufferClass = BufferClass; - -module.exports = uuid; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/package.json deleted file mode 100644 index 561465e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "tempfile", - "version": "0.1.2", - "description": "Get a random temp file path", - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/tempfile" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js" - ], - "keywords": [ - "tmp", - "temp", - "temporary", - "tempfile", - "file", - "path", - "random", - "rand" - ], - "dependencies": { - "uuid": "~1.4.0" - }, - "devDependencies": { - "mocha": "*" - }, - "readme": "# tempfile [![Build Status](https://travis-ci.org/sindresorhus/tempfile.png?branch=master)](http://travis-ci.org/sindresorhus/tempfile)\n\n> Get a random temp file path\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/tempfile)\n\n```\nnpm install --save tempfile\n```\n\n\n## Example\n\n```js\nvar tempfile = require('tempfile');\ntempfile('.png');\n//=> /var/folders/_1/tk89k8215ts0rg0kmb096nj80000gn/T/4049f192-43e7-43b2-98d9-094e6760861b.png\n```\n\n## API\n\n### tempfile(extension)\n\n#### extension\n\nType: `String`\n\nOptionally supply an extension to append to the path.\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "bugs": { - "url": "https://github.com/sindresorhus/tempfile/issues" - }, - "homepage": "https://github.com/sindresorhus/tempfile", - "_id": "tempfile@0.1.2", - "dist": { - "shasum": "81d4e51f35856592f3b51d568135791af3b038e0" - }, - "_from": "tempfile@~0.1.2", - "_resolved": "https://registry.npmjs.org/tempfile/-/tempfile-0.1.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/readme.md deleted file mode 100644 index 672a0ac6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/readme.md +++ /dev/null @@ -1,36 +0,0 @@ -# tempfile [![Build Status](https://travis-ci.org/sindresorhus/tempfile.png?branch=master)](http://travis-ci.org/sindresorhus/tempfile) - -> Get a random temp file path - - -## Install - -Install with [npm](https://npmjs.org/package/tempfile) - -``` -npm install --save tempfile -``` - - -## Example - -```js -var tempfile = require('tempfile'); -tempfile('.png'); -//=> /var/folders/_1/tk89k8215ts0rg0kmb096nj80000gn/T/4049f192-43e7-43b2-98d9-094e6760861b.png -``` - -## API - -### tempfile(extension) - -#### extension - -Type: `String` - -Optionally supply an extension to append to the path. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/package.json deleted file mode 100644 index 6e75932a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "decompress", - "version": "0.1.6", - "description": "Easily extract zip, tar and tar.gz archives", - "keywords": [ - "extract", - "zip", - "tar", - "tar.gz" - ], - "homepage": "https://github.com/kevva/decompress", - "bugs": { - "url": "https://github.com/kevva/decompress/issues" - }, - "author": { - "name": "Kevin Martensson", - "email": "kevinmartensson@gmail.com", - "url": "http://kevinmartensson.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/kevva/decompress.git" - }, - "scripts": { - "test": "mocha --reporter list" - }, - "main": "decompress.js", - "files": [ - "decompress.js" - ], - "dependencies": { - "adm-zip": "~0.4.3", - "mkdirp": "~0.3.5", - "mout": "~0.6.0", - "rimraf": "~2.2.2", - "stream-combiner": "~0.0.2", - "tar": "~0.1.18", - "tempfile": "~0.1.2" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "readme": "# decompress [![Build Status](https://secure.travis-ci.org/kevva/decompress.png?branch=master)](http://travis-ci.org/kevva/decompress)\n\nEasily extract `.zip`, `.tar` and `.tar.gz` archives. Based on the extract \nutility in [Bower](https://github.com/bower/bower).\n\n## Getting started\n\nInstall with [npm](https://npmjs.org/package/decompress): `npm install decompress`\n\n## Examples\n\nYou'll only need to pass a type into `ext` and it'll figure the rest out for \nyou.\n\n```js\nvar decompress = require('decompress');\nvar fs = require('fs');\n\nvar src = fs.createReadStream('foo.tar.gz');\nvar dest = decompress.extract({ ext: '.tar.gz' });\n\nsrc.pipe(dest);\n```\n\n## API\n\n### .extract(opts)\n\nExtract an archive using the `ext` option to determine which extractor to use. \nIf no `path` is specified it'll extract it to your current location.\n\n### .canExtract(src, mime)\n\nDetermine if a file can be extracted or not by checking the file extension \nand/or the MIME type.\n\n```js\ndecompress.canExtract('foo.zip');\n// => true\n\ndecompress.canExtract('application/zip');\n// => true\n```\n\n## Options\n\n### `ext`\n\nType: `String` \nDefault: `''`\n\nString that can be a file name, URL, MIME type etc.\n\n### `path`\n\nType: `String` \nDefault: `process.cwd()`\n\nPath to extract the archive to. If no `path` is defined it'll extract it to your \ncurrent location.\n\n### strip\n\nType: `Number` \nDefault: `0`\n\nEquivalent to `--strip-components` for tar.\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com)\n", - "readmeFilename": "README.md", - "_id": "decompress@0.1.6", - "dist": { - "shasum": "dc920bd81312e06f3e97aa46add56f1e95e21a4e" - }, - "_from": "decompress@~0.1.5", - "_resolved": "https://registry.npmjs.org/decompress/-/decompress-0.1.6.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/each-async.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/each-async.js deleted file mode 100644 index a43b4363..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/each-async.js +++ /dev/null @@ -1,72 +0,0 @@ -/*! - each-async - Async concurrent iterator (async forEach) - https://github.com/sindresorhus/each-async - by Sindre Sorhus - MIT License -*/ -(function () { - 'use strict'; - - function once(fn) { - var called = false; - - if (typeof fn !== 'function') { - throw new TypeError; - } - - return function () { - if (called) { - throw new Error('Callback already called.'); - } - called = true; - fn.apply(this, arguments); - } - } - - function each(arr, next, cb) { - var failed = false; - var count = 0; - - cb = cb || function () {}; - - if (!Array.isArray(arr)) { - throw new TypeError('First argument must be an array'); - } - - if (typeof next !== 'function') { - throw new TypeError('Second argument must be a function'); - } - - var len = arr.length; - - if (!len) { - return cb(); - } - - function callback(err) { - if (failed) { - return; - } - - if (err !== undefined && err !== null) { - failed = true; - return cb(err); - } - - if (++count === len) { - return cb(); - } - } - - for (var i = 0; i < len; i++) { - next(arr[i], i, once(callback)); - } - } - - if (typeof module !== 'undefined' && module.exports) { - module.exports = each; - } else { - window.eachAsync = each; - } -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/package.json deleted file mode 100644 index 8e17c2d0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "each-async", - "version": "0.1.2", - "description": "Async concurrent iterator", - "license": "MIT", - "main": "each-async.js", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/each-async" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "each-async.js" - ], - "keywords": [ - "each", - "async", - "asynchronous", - "iteration", - "iterate", - "loop", - "foreach", - "parallel", - "concurrent", - "array", - "flow", - "control flow" - ], - "devDependencies": { - "mocha": "*" - }, - "readme": "# each-async [![Build Status](https://secure.travis-ci.org/sindresorhus/each-async.png?branch=master)](http://travis-ci.org/sindresorhus/each-async)\n\n> Async concurrent iterator (async forEach)\n\nLike [async.each()](https://github.com/caolan/async#eacharr-iterator-callback), but tiny.\n\nI often use `async.each()` for doing async operations when iterating, but I almost never use the other gadzillion methods in `async`.\n\nAsync iteration is one of the most used async control flow patterns.\n\n\n## Install\n\nDownload [manually](https://github.com/sindresorhus/each-async/releases) or with a package-manager.\n\n#### [npm](https://npmjs.org/package/each-async)\n\n```\nnpm install --save each-async\n```\n\n#### [Bower](http://bower.io)\n\n```\nbower install --save each-async\n```\n\n#### [Component](https://github.com/component/component)\n\n```\ncomponent install sindresorhus/each-async\n```\n\n\n## Examples\n\n### Node.js\n\n```js\neachAsync(['foo','bar','baz'], function (item, index, done) {\n\tconsole.log(item, index);\n\tdone();\n}, function (error) {\n\tconsole.log('finished');\n});\n//=> foo 0\n//=> bar 1\n//=> baz 2\n//=> finished\n```\n\n\n## API\n\n### eachAsync(array, callback, finishedCallback)\n\n#### array\n\nThe array you want to iterate.\n\n#### callback(item, index, done)\n\nA function which is called for each item in the array with the following arguments:\n\n- `item`: the current item in the array\n- `index`: the current index\n- `done([error])`: call this when you're done with an optional error. Supplying anything other than `undefined`/`null` will stop the iteration.\n\nNote that order is not guaranteed since each item is handled concurrently.\n\n#### finishedCallback(error)\n\nA function which is called when the iteration is finished or on the first error. First argument is the error passed from `done()` in the `callback`.\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "bugs": { - "url": "https://github.com/sindresorhus/each-async/issues" - }, - "homepage": "https://github.com/sindresorhus/each-async", - "_id": "each-async@0.1.2", - "dist": { - "shasum": "d5b900bd92705ed5b8cad3307a6536adb0f134c6" - }, - "_from": "each-async@~0.1.1", - "_resolved": "https://registry.npmjs.org/each-async/-/each-async-0.1.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/readme.md deleted file mode 100644 index e5e5bb14..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/readme.md +++ /dev/null @@ -1,78 +0,0 @@ -# each-async [![Build Status](https://secure.travis-ci.org/sindresorhus/each-async.png?branch=master)](http://travis-ci.org/sindresorhus/each-async) - -> Async concurrent iterator (async forEach) - -Like [async.each()](https://github.com/caolan/async#eacharr-iterator-callback), but tiny. - -I often use `async.each()` for doing async operations when iterating, but I almost never use the other gadzillion methods in `async`. - -Async iteration is one of the most used async control flow patterns. - - -## Install - -Download [manually](https://github.com/sindresorhus/each-async/releases) or with a package-manager. - -#### [npm](https://npmjs.org/package/each-async) - -``` -npm install --save each-async -``` - -#### [Bower](http://bower.io) - -``` -bower install --save each-async -``` - -#### [Component](https://github.com/component/component) - -``` -component install sindresorhus/each-async -``` - - -## Examples - -### Node.js - -```js -eachAsync(['foo','bar','baz'], function (item, index, done) { - console.log(item, index); - done(); -}, function (error) { - console.log('finished'); -}); -//=> foo 0 -//=> bar 1 -//=> baz 2 -//=> finished -``` - - -## API - -### eachAsync(array, callback, finishedCallback) - -#### array - -The array you want to iterate. - -#### callback(item, index, done) - -A function which is called for each item in the array with the following arguments: - -- `item`: the current item in the array -- `index`: the current index -- `done([error])`: call this when you're done with an optional error. Supplying anything other than `undefined`/`null` will stop the iteration. - -Note that order is not guaranteed since each item is handled concurrently. - -#### finishedCallback(error) - -A function which is called when the iteration is finished or on the first error. First argument is the error passed from `done()` in the `callback`. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/.npmignore deleted file mode 100644 index 80e59ef5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -tests -node_modules diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/.travis.yml deleted file mode 100644 index 0bce8152..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: node_js -node_js: - - 0.8 - - 0.10 - -env: - - OPTIONALS=Y - - OPTIONALS=N - -install: - - if [[ "$OPTIONALS" == "Y" ]]; then npm install; fi - - if [[ "$OPTIONALS" == "N" ]]; then npm install --no-optional; fi diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/LICENSE deleted file mode 100644 index a4a9aee0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/README.md deleted file mode 100644 index 5c0c081f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/README.md +++ /dev/null @@ -1,366 +0,0 @@ -# Request -- Simplified HTTP client - -[![NPM](https://nodei.co/npm/request.png)](https://nodei.co/npm/request/) - -## Super simple to use - -Request is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default. - -```javascript -var request = require('request'); -request('http://www.google.com', function (error, response, body) { - if (!error && response.statusCode == 200) { - console.log(body) // Print the google web page. - } -}) -``` - -## Streaming - -You can stream any response to a file stream. - -```javascript -request('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png')) -``` - -You can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers don’t already provide one). - -```javascript -fs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json')) -``` - -Request can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers. - -```javascript -request.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png')) -``` - -Now let’s get fancy. - -```javascript -http.createServer(function (req, resp) { - if (req.url === '/doodle.png') { - if (req.method === 'PUT') { - req.pipe(request.put('http://mysite.com/doodle.png')) - } else if (req.method === 'GET' || req.method === 'HEAD') { - request.get('http://mysite.com/doodle.png').pipe(resp) - } - } -}) -``` - -You can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do: - -```javascript -http.createServer(function (req, resp) { - if (req.url === '/doodle.png') { - var x = request('http://mysite.com/doodle.png') - req.pipe(x) - x.pipe(resp) - } -}) -``` - -And since `pipe()` returns the destination stream in ≥ Node 0.5.x you can do one line proxying. :) - -```javascript -req.pipe(request('http://mysite.com/doodle.png')).pipe(resp) -``` - -Also, none of this new functionality conflicts with requests previous features, it just expands them. - -```javascript -var r = request.defaults({'proxy':'http://localproxy.com'}) - -http.createServer(function (req, resp) { - if (req.url === '/doodle.png') { - r.get('http://google.com/doodle.png').pipe(resp) - } -}) -``` - -You can still use intermediate proxies, the requests will still follow HTTP forwards, etc. - -## Forms - -`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API. - -URL-encoded forms are simple. - -```javascript -request.post('http://service.com/upload', {form:{key:'value'}}) -// or -request.post('http://service.com/upload').form({key:'value'}) -``` - -For `multipart/form-data` we use the [form-data](https://github.com/felixge/node-form-data) library by [@felixge](https://github.com/felixge). You don’t need to worry about piping the form object or setting the headers, `request` will handle that for you. - -```javascript -var r = request.post('http://service.com/upload') -var form = r.form() -form.append('my_field', 'my_value') -form.append('my_buffer', new Buffer([1, 2, 3])) -form.append('my_file', fs.createReadStream(path.join(__dirname, 'doodle.png')) -form.append('remote_file', request('http://google.com/doodle.png')) -``` - -## HTTP Authentication - -```javascript -request.get('http://some.server.com/').auth('username', 'password', false); -// or -request.get('http://some.server.com/', { - 'auth': { - 'user': 'username', - 'pass': 'password', - 'sendImmediately': false - } -}); -``` - -If passed as an option, `auth` should be a hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). The method form takes parameters `auth(username, password, sendImmediately)`. - -`sendImmediately` defaults to `true`, which causes a basic authentication header to be sent. If `sendImmediately` is `false`, then `request` will retry with a proper authentication header after receiving a `401` response from the server (which must contain a `WWW-Authenticate` header indicating the required authentication method). - -Digest authentication is supported, but it only works with `sendImmediately` set to `false`; otherwise `request` will send basic authentication on the initial request, which will probably cause the request to fail. - -## OAuth Signing - -```javascript -// Twitter OAuth -var qs = require('querystring') - , oauth = - { callback: 'http://mysite.com/callback/' - , consumer_key: CONSUMER_KEY - , consumer_secret: CONSUMER_SECRET - } - , url = 'https://api.twitter.com/oauth/request_token' - ; -request.post({url:url, oauth:oauth}, function (e, r, body) { - // Ideally, you would take the body in the response - // and construct a URL that a user clicks on (like a sign in button). - // The verifier is only available in the response after a user has - // verified with twitter that they are authorizing your app. - var access_token = qs.parse(body) - , oauth = - { consumer_key: CONSUMER_KEY - , consumer_secret: CONSUMER_SECRET - , token: access_token.oauth_token - , verifier: access_token.oauth_verifier - } - , url = 'https://api.twitter.com/oauth/access_token' - ; - request.post({url:url, oauth:oauth}, function (e, r, body) { - var perm_token = qs.parse(body) - , oauth = - { consumer_key: CONSUMER_KEY - , consumer_secret: CONSUMER_SECRET - , token: perm_token.oauth_token - , token_secret: perm_token.oauth_token_secret - } - , url = 'https://api.twitter.com/1.1/users/show.json?' - , params = - { screen_name: perm_token.screen_name - , user_id: perm_token.user_id - } - ; - url += qs.stringify(params) - request.get({url:url, oauth:oauth, json:true}, function (e, r, user) { - console.log(user) - }) - }) -}) -``` - -### Custom HTTP Headers - -HTTP Headers, such as `User-Agent`, can be set in the `options` object. -In the example below, we call the github API to find out the number -of stars and forks for the request repository. This requires a -custom `User-Agent` header as well as https. - -```javascript -var request = require('request'); - -var options = { - url: 'https://api.github.com/repos/mikeal/request', - headers: { - 'User-Agent': 'request' - } -}; - -function callback(error, response, body) { - if (!error && response.statusCode == 200) { - var info = JSON.parse(body); - console.log(info.stargazers_count + " Stars"); - console.log(info.forks_count + " Forks"); - } -} - -request(options, callback); -``` - -### request(options, callback) - -The first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional. - -* `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()` -* `qs` - object containing querystring values to be appended to the `uri` -* `method` - http method (default: `"GET"`) -* `headers` - http headers (default: `{}`) -* `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`. -* `form` - when passed an object, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header. When passed no options, a `FormData` instance is returned (and is piped to request). -* `auth` - A hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). See documentation above. -* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON. -* `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below. -* `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`) -* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`) -* `maxRedirects` - the maximum number of redirects to follow (default: `10`) -* `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`. -* `pool` - A hash object containing the agents for these requests. If omitted, the request will use the global pool (which is set to node's default `maxSockets`) -* `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool. -* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request -* `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`) -* `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above. -* `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example). -* `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option. -* `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section) -* `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services) -* `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options. -* `localAddress` - Local interface to bind for network connections. - - -The callback argument gets 3 arguments: - -1. An `error` when applicable (usually from [`http.ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) object) -2. An [`http.IncomingMessage`](http://nodejs.org/api/http.html#http_http_incomingmessage) object -3. The third is the `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied) - -## Convenience methods - -There are also shorthand methods for different HTTP METHODs and some other conveniences. - -### request.defaults(options) - -This method returns a wrapper around the normal request API that defaults to whatever options you pass in to it. - -### request.put - -Same as `request()`, but defaults to `method: "PUT"`. - -```javascript -request.put(url) -``` - -### request.patch - -Same as `request()`, but defaults to `method: "PATCH"`. - -```javascript -request.patch(url) -``` - -### request.post - -Same as `request()`, but defaults to `method: "POST"`. - -```javascript -request.post(url) -``` - -### request.head - -Same as request() but defaults to `method: "HEAD"`. - -```javascript -request.head(url) -``` - -### request.del - -Same as `request()`, but defaults to `method: "DELETE"`. - -```javascript -request.del(url) -``` - -### request.get - -Same as `request()` (for uniformity). - -```javascript -request.get(url) -``` -### request.cookie - -Function that creates a new cookie. - -```javascript -request.cookie('cookie_string_here') -``` -### request.jar - -Function that creates a new cookie jar. - -```javascript -request.jar() -``` - - -## Examples: - -```javascript - var request = require('request') - , rand = Math.floor(Math.random()*100000000).toString() - ; - request( - { method: 'PUT' - , uri: 'http://mikeal.iriscouch.com/testjs/' + rand - , multipart: - [ { 'content-type': 'application/json' - , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}}) - } - , { body: 'I am an attachment' } - ] - } - , function (error, response, body) { - if(response.statusCode == 201){ - console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand) - } else { - console.log('error: '+ response.statusCode) - console.log(body) - } - } - ) -``` - -Cookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`). - -```javascript -var request = request.defaults({jar: true}) -request('http://www.google.com', function () { - request('http://images.google.com') -}) -``` - -To use a custom cookie jar (instead `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`) - -```javascript -var j = request.jar() -var request = request.defaults({jar:j}) -request('http://www.google.com', function () { - request('http://images.google.com') -}) -``` -OR - -Note that `setCookie` requires at least three parameters, and the last is required to be a callback. - -```javascript -var j = request.jar() -var cookie = request.cookie('your_cookie_here') -j.setCookie(cookie, uri, function (err, cookie){}) -request({url: 'http://www.google.com', jar: j}, function () { - request('http://images.google.com') -}) -``` diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/dns-request.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/dns-request.js deleted file mode 100644 index 6a847f6d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/dns-request.js +++ /dev/null @@ -1,7 +0,0 @@ -var request = require('request') - , dns = require('dns') - ; - -function wrap (fn) { - var -} \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/index.js deleted file mode 100755 index 465e5ae3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/index.js +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright 2010-2012 Mikeal Rogers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -var optional = require('./lib/optional') - , cookie = optional('tough-cookie') - , Cookie = cookie && cookie.Cookie - , CookieJar = cookie && cookie.CookieJar - , cookieJar = CookieJar && new CookieJar - - , copy = require('./lib/copy') - , Request = require('./request') - ; - - - -// organize params for patch, post, put, head, del -function initParams(uri, options, callback) { - if ((typeof options === 'function') && !callback) callback = options - if (options && typeof options === 'object') { - options.uri = uri - } else if (typeof uri === 'string') { - options = {uri:uri} - } else { - options = uri - uri = options.uri - } - return { uri: uri, options: options, callback: callback } -} - -function request (uri, options, callback) { - if (typeof uri === 'undefined') throw new Error('undefined is not a valid uri or options object.') - if ((typeof options === 'function') && !callback) callback = options - if (options && typeof options === 'object') { - options.uri = uri - } else if (typeof uri === 'string') { - options = {uri:uri} - } else { - options = uri - } - - options = copy(options) - - if (callback) options.callback = callback - var r = new Request(options) - return r -} - -module.exports = request - -request.Request = Request; - -request.debug = process.env.NODE_DEBUG && /request/.test(process.env.NODE_DEBUG) - -request.initParams = initParams - -request.defaults = function (options, requester) { - var def = function (method) { - var d = function (uri, opts, callback) { - var params = initParams(uri, opts, callback) - for (var i in options) { - if (params.options[i] === undefined) params.options[i] = options[i] - } - if(typeof requester === 'function') { - if(method === request) { - method = requester - } else { - params.options._requester = requester - } - } - return method(params.options, params.callback) - } - return d - } - var de = def(request) - de.get = def(request.get) - de.patch = def(request.patch) - de.post = def(request.post) - de.put = def(request.put) - de.head = def(request.head) - de.del = def(request.del) - de.cookie = def(request.cookie) - de.jar = request.jar - return de -} - -function requester(params) { - if(typeof params.options._requester === 'function') { - return params.options._requester - } else { - return request - } -} - -request.forever = function (agentOptions, optionsArg) { - var options = {} - if (optionsArg) { - for (var option in optionsArg) { - options[option] = optionsArg[option] - } - } - if (agentOptions) options.agentOptions = agentOptions - options.forever = true - return request.defaults(options) -} - -request.get = request -request.post = function (uri, options, callback) { - var params = initParams(uri, options, callback) - params.options.method = 'POST' - return requester(params)(params.uri || null, params.options, params.callback) -} -request.put = function (uri, options, callback) { - var params = initParams(uri, options, callback) - params.options.method = 'PUT' - return requester(params)(params.uri || null, params.options, params.callback) -} -request.patch = function (uri, options, callback) { - var params = initParams(uri, options, callback) - params.options.method = 'PATCH' - return requester(params)(params.uri || null, params.options, params.callback) -} -request.head = function (uri, options, callback) { - var params = initParams(uri, options, callback) - params.options.method = 'HEAD' - if (params.options.body || - params.options.requestBodyStream || - (params.options.json && typeof params.options.json !== 'boolean') || - params.options.multipart) { - throw new Error("HTTP HEAD requests MUST NOT include a request body.") - } - - return requester(params)(params.uri || null, params.options, params.callback) -} -request.del = function (uri, options, callback) { - var params = initParams(uri, options, callback) - params.options.method = 'DELETE' - return requester(params)(params.uri || null, params.options, params.callback) -} -request.jar = function () { - return new CookieJar -} -request.cookie = function (str) { - if (str && str.uri) str = str.uri - if (typeof str !== 'string') throw new Error("The cookie function only accepts STRING as param") - return new Cookie(str) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/copy.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/copy.js deleted file mode 100644 index 56831ff8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/copy.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = -function copy (obj) { - var o = {} - Object.keys(obj).forEach(function (i) { - o[i] = obj[i] - }) - return o -} \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/debug.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/debug.js deleted file mode 100644 index fa27b24b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/debug.js +++ /dev/null @@ -1,7 +0,0 @@ -var util = require('util') - -module.exports = -function debug () { - if (/\brequest\b/.test(process.env.NODE_DEBUG)) - console.error('REQUEST %s', util.format.apply(util, arguments)) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/getSafe.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/getSafe.js deleted file mode 100644 index 28e07ea5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/getSafe.js +++ /dev/null @@ -1,34 +0,0 @@ -// Safe toJSON -module.exports = -function getSafe (self, uuid) { - if (typeof self === 'object' || typeof self === 'function') var safe = {} - if (Array.isArray(self)) var safe = [] - - var recurse = [] - - Object.defineProperty(self, uuid, {}) - - var attrs = Object.keys(self).filter(function (i) { - if (i === uuid) return false - if ( (typeof self[i] !== 'object' && typeof self[i] !== 'function') || self[i] === null) return true - return !(Object.getOwnPropertyDescriptor(self[i], uuid)) - }) - - - for (var i=0;i<attrs.length;i++) { - if ( (typeof self[attrs[i]] !== 'object' && typeof self[attrs[i]] !== 'function') || - self[attrs[i]] === null - ) { - safe[attrs[i]] = self[attrs[i]] - } else { - recurse.push(attrs[i]) - Object.defineProperty(self[attrs[i]], uuid, {}) - } - } - - for (var i=0;i<recurse.length;i++) { - safe[recurse[i]] = getSafe(self[recurse[i]], uuid) - } - - return safe -} \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/optional.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/optional.js deleted file mode 100644 index 0c4fe853..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/optional.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = function(module) { - try { - return require(module); - } catch (e) {} -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/LICENSE deleted file mode 100644 index a4a9aee0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/README.md deleted file mode 100644 index 763564e0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/README.md +++ /dev/null @@ -1,4 +0,0 @@ -aws-sign -======== - -AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/index.js deleted file mode 100644 index 576e49dd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/index.js +++ /dev/null @@ -1,202 +0,0 @@ - -/*! - * knox - auth - * Copyright(c) 2010 LearnBoost <dev@learnboost.com> - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var crypto = require('crypto') - , parse = require('url').parse - ; - -/** - * Valid keys. - */ - -var keys = - [ 'acl' - , 'location' - , 'logging' - , 'notification' - , 'partNumber' - , 'policy' - , 'requestPayment' - , 'torrent' - , 'uploadId' - , 'uploads' - , 'versionId' - , 'versioning' - , 'versions' - , 'website' - ] - -/** - * Return an "Authorization" header value with the given `options` - * in the form of "AWS <key>:<signature>" - * - * @param {Object} options - * @return {String} - * @api private - */ - -function authorization (options) { - return 'AWS ' + options.key + ':' + sign(options) -} - -module.exports = authorization -module.exports.authorization = authorization - -/** - * Simple HMAC-SHA1 Wrapper - * - * @param {Object} options - * @return {String} - * @api private - */ - -function hmacSha1 (options) { - return crypto.createHmac('sha1', options.secret).update(options.message).digest('base64') -} - -module.exports.hmacSha1 = hmacSha1 - -/** - * Create a base64 sha1 HMAC for `options`. - * - * @param {Object} options - * @return {String} - * @api private - */ - -function sign (options) { - options.message = stringToSign(options) - return hmacSha1(options) -} -module.exports.sign = sign - -/** - * Create a base64 sha1 HMAC for `options`. - * - * Specifically to be used with S3 presigned URLs - * - * @param {Object} options - * @return {String} - * @api private - */ - -function signQuery (options) { - options.message = queryStringToSign(options) - return hmacSha1(options) -} -module.exports.signQuery= signQuery - -/** - * Return a string for sign() with the given `options`. - * - * Spec: - * - * <verb>\n - * <md5>\n - * <content-type>\n - * <date>\n - * [headers\n] - * <resource> - * - * @param {Object} options - * @return {String} - * @api private - */ - -function stringToSign (options) { - var headers = options.amazonHeaders || '' - if (headers) headers += '\n' - var r = - [ options.verb - , options.md5 - , options.contentType - , options.date ? options.date.toUTCString() : '' - , headers + options.resource - ] - return r.join('\n') -} -module.exports.queryStringToSign = stringToSign - -/** - * Return a string for sign() with the given `options`, but is meant exclusively - * for S3 presigned URLs - * - * Spec: - * - * <date>\n - * <resource> - * - * @param {Object} options - * @return {String} - * @api private - */ - -function queryStringToSign (options){ - return 'GET\n\n\n' + options.date + '\n' + options.resource -} -module.exports.queryStringToSign = queryStringToSign - -/** - * Perform the following: - * - * - ignore non-amazon headers - * - lowercase fields - * - sort lexicographically - * - trim whitespace between ":" - * - join with newline - * - * @param {Object} headers - * @return {String} - * @api private - */ - -function canonicalizeHeaders (headers) { - var buf = [] - , fields = Object.keys(headers) - ; - for (var i = 0, len = fields.length; i < len; ++i) { - var field = fields[i] - , val = headers[field] - , field = field.toLowerCase() - ; - if (0 !== field.indexOf('x-amz')) continue - buf.push(field + ':' + val) - } - return buf.sort().join('\n') -} -module.exports.canonicalizeHeaders = canonicalizeHeaders - -/** - * Perform the following: - * - * - ignore non sub-resources - * - sort lexicographically - * - * @param {String} resource - * @return {String} - * @api private - */ - -function canonicalizeResource (resource) { - var url = parse(resource, true) - , path = url.pathname - , buf = [] - ; - - Object.keys(url.query).forEach(function(key){ - if (!~keys.indexOf(key)) return - var val = '' == url.query[key] ? '' : '=' + encodeURIComponent(url.query[key]) - buf.push(key + val) - }) - - return path + (buf.length ? '?' + buf.sort().join('&') : '') -} -module.exports.canonicalizeResource = canonicalizeResource diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/package.json deleted file mode 100644 index ae98297e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "author": { - "name": "Mikeal Rogers", - "email": "mikeal.rogers@gmail.com", - "url": "http://www.futurealoof.com" - }, - "name": "aws-sign2", - "description": "AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module.", - "version": "0.5.0", - "repository": { - "url": "https://github.com/mikeal/aws-sign" - }, - "main": "index.js", - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "readme": "aws-sign\n========\n\nAWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/mikeal/aws-sign/issues" - }, - "homepage": "https://github.com/mikeal/aws-sign", - "_id": "aws-sign2@0.5.0", - "dist": { - "shasum": "c57103f7a17fc037f02d7c2e64b602ea223f7d63" - }, - "_from": "aws-sign2@~0.5.0", - "_resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/LICENSE deleted file mode 100644 index a4a9aee0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/README.md deleted file mode 100644 index 9d5b6634..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/README.md +++ /dev/null @@ -1,4 +0,0 @@ -forever-agent -============= - -HTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/index.js deleted file mode 100644 index 1e8efcdf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/index.js +++ /dev/null @@ -1,119 +0,0 @@ -module.exports = ForeverAgent -ForeverAgent.SSL = ForeverAgentSSL - -var util = require('util') - , Agent = require('http').Agent - , net = require('net') - , tls = require('tls') - , AgentSSL = require('https').Agent - -function ForeverAgent(options) { - var self = this - self.options = options || {} - self.requests = {} - self.sockets = {} - self.freeSockets = {} - self.maxSockets = self.options.maxSockets || Agent.defaultMaxSockets - self.minSockets = self.options.minSockets || ForeverAgent.defaultMinSockets - self.on('free', function(socket, host, port) { - var name = host + ':' + port - if (self.requests[name] && self.requests[name].length) { - self.requests[name].shift().onSocket(socket) - } else if (self.sockets[name].length < self.minSockets) { - if (!self.freeSockets[name]) self.freeSockets[name] = [] - self.freeSockets[name].push(socket) - - // if an error happens while we don't use the socket anyway, meh, throw the socket away - var onIdleError = function() { - socket.destroy() - } - socket._onIdleError = onIdleError - socket.on('error', onIdleError) - } else { - // If there are no pending requests just destroy the - // socket and it will get removed from the pool. This - // gets us out of timeout issues and allows us to - // default to Connection:keep-alive. - socket.destroy() - } - }) - -} -util.inherits(ForeverAgent, Agent) - -ForeverAgent.defaultMinSockets = 5 - - -ForeverAgent.prototype.createConnection = net.createConnection -ForeverAgent.prototype.addRequestNoreuse = Agent.prototype.addRequest -ForeverAgent.prototype.addRequest = function(req, host, port) { - var name = host + ':' + port - if (this.freeSockets[name] && this.freeSockets[name].length > 0 && !req.useChunkedEncodingByDefault) { - var idleSocket = this.freeSockets[name].pop() - idleSocket.removeListener('error', idleSocket._onIdleError) - delete idleSocket._onIdleError - req._reusedSocket = true - req.onSocket(idleSocket) - } else { - this.addRequestNoreuse(req, host, port) - } -} - -ForeverAgent.prototype.removeSocket = function(s, name, host, port) { - if (this.sockets[name]) { - var index = this.sockets[name].indexOf(s) - if (index !== -1) { - this.sockets[name].splice(index, 1) - } - } else if (this.sockets[name] && this.sockets[name].length === 0) { - // don't leak - delete this.sockets[name] - delete this.requests[name] - } - - if (this.freeSockets[name]) { - var index = this.freeSockets[name].indexOf(s) - if (index !== -1) { - this.freeSockets[name].splice(index, 1) - if (this.freeSockets[name].length === 0) { - delete this.freeSockets[name] - } - } - } - - if (this.requests[name] && this.requests[name].length) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createSocket(name, host, port).emit('free') - } -} - -function ForeverAgentSSL (options) { - ForeverAgent.call(this, options) -} -util.inherits(ForeverAgentSSL, ForeverAgent) - -ForeverAgentSSL.prototype.createConnection = createConnectionSSL -ForeverAgentSSL.prototype.addRequestNoreuse = AgentSSL.prototype.addRequest - -function createConnectionSSL (port, host, options) { - if (typeof port === 'object') { - options = port; - } else if (typeof host === 'object') { - options = host; - } else if (typeof options === 'object') { - options = options; - } else { - options = {}; - } - - if (typeof port === 'number') { - options.port = port; - } - - if (typeof host === 'string') { - options.host = host; - } - - return tls.connect(options); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/package.json deleted file mode 100644 index 2044778a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "author": { - "name": "Mikeal Rogers", - "email": "mikeal.rogers@gmail.com", - "url": "http://www.futurealoof.com" - }, - "name": "forever-agent", - "description": "HTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.", - "version": "0.5.2", - "repository": { - "url": "https://github.com/mikeal/forever-agent" - }, - "main": "index.js", - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "readme": "forever-agent\n=============\n\nHTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/mikeal/forever-agent/issues" - }, - "homepage": "https://github.com/mikeal/forever-agent", - "_id": "forever-agent@0.5.2", - "dist": { - "shasum": "6d0e09c4921f94a27f63d3b49c5feff1ea4c5130" - }, - "_from": "forever-agent@~0.5.0", - "_resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/License b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/License deleted file mode 100644 index c7ff12a2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/License +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors - - 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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/Readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/Readme.md deleted file mode 100644 index dc73c463..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/Readme.md +++ /dev/null @@ -1,163 +0,0 @@ -# Form-Data [![Build Status](https://travis-ci.org/felixge/node-form-data.png?branch=master)](https://travis-ci.org/felixge/node-form-data) [![Dependency Status](https://gemnasium.com/felixge/node-form-data.png)](https://gemnasium.com/felixge/node-form-data) - -A module to create readable ```"multipart/form-data"``` streams. Can be used to submit forms and file uploads to other web applications. - -The API of this module is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd]. - -[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface -[streams2-thing]: http://nodejs.org/api/stream.html#stream_compatibility_with_older_node_versions - -## Install - -``` -npm install form-data -``` - -## Usage - -In this example we are constructing a form with 3 fields that contain a string, -a buffer and a file stream. - -``` javascript -var FormData = require('form-data'); -var fs = require('fs'); - -var form = new FormData(); -form.append('my_field', 'my value'); -form.append('my_buffer', new Buffer(10)); -form.append('my_file', fs.createReadStream('/foo/bar.jpg')); -``` - -Also you can use http-response stream: - -``` javascript -var FormData = require('form-data'); -var http = require('http'); - -var form = new FormData(); - -http.request('http://nodejs.org/images/logo.png', function(response) { - form.append('my_field', 'my value'); - form.append('my_buffer', new Buffer(10)); - form.append('my_logo', response); -}); -``` - -Or @mikeal's request stream: - -``` javascript -var FormData = require('form-data'); -var request = require('request'); - -var form = new FormData(); - -form.append('my_field', 'my value'); -form.append('my_buffer', new Buffer(10)); -form.append('my_logo', request('http://nodejs.org/images/logo.png')); -``` - -In order to submit this form to a web application, call ```submit(url, [callback])``` method: - -``` javascript -form.submit('http://example.org/', function(err, res) { - // res – response object (http.IncomingMessage) // - res.resume(); // for node-0.10.x -}); - -``` - -For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods. - -### Alternative submission methods - -You can use node's http client interface: - -``` javascript -var http = require('http'); - -var request = http.request({ - method: 'post', - host: 'example.org', - path: '/upload', - headers: form.getHeaders() -}); - -form.pipe(request); - -request.on('response', function(res) { - console.log(res.statusCode); -}); -``` - -Or if you would prefer the `'Content-Length'` header to be set for you: - -``` javascript -form.submit('example.org/upload', function(err, res) { - console.log(res.statusCode); -}); -``` - -To use custom headers and pre-known length in parts: - -``` javascript -var CRLF = '\r\n'; -var form = new FormData(); - -var options = { - header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF, - knownLength: 1 -}; - -form.append('my_buffer', buffer, options); - -form.submit('http://example.com/', function(err, res) { - if (err) throw err; - console.log('Done'); -}); -``` - -Form-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide "file"-related information manually: - -``` javascript -someModule.stream(function(err, stdout, stderr) { - if (err) throw err; - - var form = new FormData(); - - form.append('file', stdout, { - filename: 'unicycle.jpg', - contentType: 'image/jpg', - knownLength: 19806 - }); - - form.submit('http://example.com/', function(err, res) { - if (err) throw err; - console.log('Done'); - }); -}); -``` - -For edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter: - -``` javascript -form.submit({ - host: 'example.com', - path: '/probably.php?extra=params', - auth: 'username:password' -}, function(err, res) { - console.log(res.statusCode); -}); -``` - -## Notes - -- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround. -- If it feels like FormData hangs after submit and you're on ```node-0.10```, please check [Compatibility with Older Node Versions][streams2-thing] - -## TODO - -- Add new streams (0.10) support and try really hard not to break it for 0.8.x. - -## License - -Form-Data is licensed under the MIT license. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/lib/form_data.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/lib/form_data.js deleted file mode 100644 index d1064748..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/lib/form_data.js +++ /dev/null @@ -1,325 +0,0 @@ -var CombinedStream = require('combined-stream'); -var util = require('util'); -var path = require('path'); -var http = require('http'); -var https = require('https'); -var parseUrl = require('url').parse; -var fs = require('fs'); -var mime = require('mime'); -var async = require('async'); - -module.exports = FormData; -function FormData() { - this._overheadLength = 0; - this._valueLength = 0; - this._lengthRetrievers = []; - - CombinedStream.call(this); -} -util.inherits(FormData, CombinedStream); - -FormData.LINE_BREAK = '\r\n'; - -FormData.prototype.append = function(field, value, options) { - options = options || {}; - - var append = CombinedStream.prototype.append.bind(this); - - // all that streamy business can't handle numbers - if (typeof value == 'number') value = ''+value; - - // https://github.com/felixge/node-form-data/issues/38 - if (util.isArray(value)) { - // Please convert your array into string - // the way web server expects it - this._error(new Error('Arrays are not supported.')); - return; - } - - var header = this._multiPartHeader(field, value, options); - var footer = this._multiPartFooter(field, value, options); - - append(header); - append(value); - append(footer); - - // pass along options.knownLength - this._trackLength(header, value, options); -}; - -FormData.prototype._trackLength = function(header, value, options) { - var valueLength = 0; - - // used w/ getLengthSync(), when length is known. - // e.g. for streaming directly from a remote server, - // w/ a known file a size, and not wanting to wait for - // incoming file to finish to get its size. - if (options.knownLength != null) { - valueLength += +options.knownLength; - } else if (Buffer.isBuffer(value)) { - valueLength = value.length; - } else if (typeof value === 'string') { - valueLength = Buffer.byteLength(value); - } - - this._valueLength += valueLength; - - // @check why add CRLF? does this account for custom/multiple CRLFs? - this._overheadLength += - Buffer.byteLength(header) + - + FormData.LINE_BREAK.length; - - // empty or either doesn't have path or not an http response - if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) )) { - return; - } - - // no need to bother with the length - if (!options.knownLength) - this._lengthRetrievers.push(function(next) { - - if (value.hasOwnProperty('fd')) { - fs.stat(value.path, function(err, stat) { - if (err) { - next(err); - return; - } - - next(null, stat.size); - }); - - // or http response - } else if (value.hasOwnProperty('httpVersion')) { - next(null, +value.headers['content-length']); - - // or request stream http://github.com/mikeal/request - } else if (value.hasOwnProperty('httpModule')) { - // wait till response come back - value.on('response', function(response) { - value.pause(); - next(null, +response.headers['content-length']); - }); - value.resume(); - - // something else - } else { - next('Unknown stream'); - } - }); -}; - -FormData.prototype._multiPartHeader = function(field, value, options) { - var boundary = this.getBoundary(); - var header = ''; - - // custom header specified (as string)? - // it becomes responsible for boundary - // (e.g. to handle extra CRLFs on .NET servers) - if (options.header != null) { - header = options.header; - } else { - header += '--' + boundary + FormData.LINE_BREAK + - 'Content-Disposition: form-data; name="' + field + '"'; - - // fs- and request- streams have path property - // or use custom filename and/or contentType - // TODO: Use request's response mime-type - if (options.filename || value.path) { - header += - '; filename="' + path.basename(options.filename || value.path) + '"' + FormData.LINE_BREAK + - 'Content-Type: ' + (options.contentType || mime.lookup(options.filename || value.path)); - - // http response has not - } else if (value.readable && value.hasOwnProperty('httpVersion')) { - header += - '; filename="' + path.basename(value.client._httpMessage.path) + '"' + FormData.LINE_BREAK + - 'Content-Type: ' + value.headers['content-type']; - } - - header += FormData.LINE_BREAK + FormData.LINE_BREAK; - } - - return header; -}; - -FormData.prototype._multiPartFooter = function(field, value, options) { - return function(next) { - var footer = FormData.LINE_BREAK; - - var lastPart = (this._streams.length === 0); - if (lastPart) { - footer += this._lastBoundary(); - } - - next(footer); - }.bind(this); -}; - -FormData.prototype._lastBoundary = function() { - return '--' + this.getBoundary() + '--'; -}; - -FormData.prototype.getHeaders = function(userHeaders) { - var formHeaders = { - 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() - }; - - for (var header in userHeaders) { - formHeaders[header.toLowerCase()] = userHeaders[header]; - } - - return formHeaders; -} - -FormData.prototype.getCustomHeaders = function(contentType) { - contentType = contentType ? contentType : 'multipart/form-data'; - - var formHeaders = { - 'content-type': contentType + '; boundary=' + this.getBoundary(), - 'content-length': this.getLengthSync() - }; - - return formHeaders; -} - -FormData.prototype.getBoundary = function() { - if (!this._boundary) { - this._generateBoundary(); - } - - return this._boundary; -}; - -FormData.prototype._generateBoundary = function() { - // This generates a 50 character boundary similar to those used by Firefox. - // They are optimized for boyer-moore parsing. - var boundary = '--------------------------'; - for (var i = 0; i < 24; i++) { - boundary += Math.floor(Math.random() * 10).toString(16); - } - - this._boundary = boundary; -}; - -// Note: getLengthSync DOESN'T calculate streams length -// As workaround one can calculate file size manually -// and add it as knownLength option -FormData.prototype.getLengthSync = function(debug) { - var knownLength = this._overheadLength + this._valueLength; - - // Don't get confused, there are 3 "internal" streams for each keyval pair - // so it basically checks if there is any value added to the form - if (this._streams.length) { - knownLength += this._lastBoundary().length; - } - - // https://github.com/felixge/node-form-data/issues/40 - if (this._lengthRetrievers.length) { - // Some async length retrivers are present - // therefore synchronous length calculation is false. - // Please use getLength(callback) to get proper length - this._error(new Error('Cannot calculate proper length in synchronous way.')); - } - - return knownLength; -}; - -FormData.prototype.getLength = function(cb) { - var knownLength = this._overheadLength + this._valueLength; - - if (this._streams.length) { - knownLength += this._lastBoundary().length; - } - - if (!this._lengthRetrievers.length) { - process.nextTick(cb.bind(this, null, knownLength)); - return; - } - - async.parallel(this._lengthRetrievers, function(err, values) { - if (err) { - cb(err); - return; - } - - values.forEach(function(length) { - knownLength += length; - }); - - cb(null, knownLength); - }); -}; - -FormData.prototype.submit = function(params, cb) { - - var request - , options - , defaults = { - method : 'post', - headers: this.getHeaders() - }; - - // parse provided url if it's string - // or treat it as options object - if (typeof params == 'string') { - params = parseUrl(params); - - options = populate({ - port: params.port, - path: params.pathname, - host: params.hostname - }, defaults); - } - else // use custom params - { - options = populate(params, defaults); - // if no port provided use default one - if (!options.port) { - options.port = options.protocol == 'https:' ? 443 : 80; - } - } - - // https if specified, fallback to http in any other case - if (params.protocol == 'https:') { - request = https.request(options); - } else { - request = http.request(options); - } - - // get content length and fire away - this.getLength(function(err, length) { - - // TODO: Add chunked encoding when no length (if err) - - // add content length - request.setHeader('Content-Length', length); - - this.pipe(request); - if (cb) { - request.on('error', cb); - request.on('response', cb.bind(this, null)); - } - }.bind(this)); - - return request; -}; - -FormData.prototype._error = function(err) { - if (this.error) return; - - this.error = err; - this.pause(); - this.emit('error', err); -}; - -/* - * Santa's little helpers - */ - -// populates missing values -function populate(dst, src) { - for (var prop in src) { - if (!dst[prop]) dst[prop] = src[prop]; - } - return dst; -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/LICENSE deleted file mode 100644 index b7f9d500..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Caolan McMahon - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/README.md deleted file mode 100644 index 951f76e9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/README.md +++ /dev/null @@ -1,1425 +0,0 @@ -# Async.js - -Async is a utility module which provides straight-forward, powerful functions -for working with asynchronous JavaScript. Although originally designed for -use with [node.js](http://nodejs.org), it can also be used directly in the -browser. Also supports [component](https://github.com/component/component). - -Async provides around 20 functions that include the usual 'functional' -suspects (map, reduce, filter, each…) as well as some common patterns -for asynchronous control flow (parallel, series, waterfall…). All these -functions assume you follow the node.js convention of providing a single -callback as the last argument of your async function. - - -## Quick Examples - -```javascript -async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file -}); - -async.filter(['file1','file2','file3'], fs.exists, function(results){ - // results now equals an array of the existing files -}); - -async.parallel([ - function(){ ... }, - function(){ ... } -], callback); - -async.series([ - function(){ ... }, - function(){ ... } -]); -``` - -There are many more functions available so take a look at the docs below for a -full list. This module aims to be comprehensive, so if you feel anything is -missing please create a GitHub issue for it. - -## Common Pitfalls - -### Binding a context to an iterator - -This section is really about bind, not about async. If you are wondering how to -make async execute your iterators in a given context, or are confused as to why -a method of another library isn't working as an iterator, study this example: - -```js -// Here is a simple object with an (unnecessarily roundabout) squaring method -var AsyncSquaringLibrary = { - squareExponent: 2, - square: function(number, callback){ - var result = Math.pow(number, this.squareExponent); - setTimeout(function(){ - callback(null, result); - }, 200); - } -}; - -async.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){ - // result is [NaN, NaN, NaN] - // This fails because the `this.squareExponent` expression in the square - // function is not evaluated in the context of AsyncSquaringLibrary, and is - // therefore undefined. -}); - -async.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){ - // result is [1, 4, 9] - // With the help of bind we can attach a context to the iterator before - // passing it to async. Now the square function will be executed in its - // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent` - // will be as expected. -}); -``` - -## Download - -The source is available for download from -[GitHub](http://github.com/caolan/async). -Alternatively, you can install using Node Package Manager (npm): - - npm install async - -__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed - -## In the Browser - -So far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage: - -```html -<script type="text/javascript" src="async.js"></script> -<script type="text/javascript"> - - async.map(data, asyncProcess, function(err, results){ - alert(results); - }); - -</script> -``` - -## Documentation - -### Collections - -* [each](#each) -* [eachSeries](#eachSeries) -* [eachLimit](#eachLimit) -* [map](#map) -* [mapSeries](#mapSeries) -* [mapLimit](#mapLimit) -* [filter](#filter) -* [filterSeries](#filterSeries) -* [reject](#reject) -* [rejectSeries](#rejectSeries) -* [reduce](#reduce) -* [reduceRight](#reduceRight) -* [detect](#detect) -* [detectSeries](#detectSeries) -* [sortBy](#sortBy) -* [some](#some) -* [every](#every) -* [concat](#concat) -* [concatSeries](#concatSeries) - -### Control Flow - -* [series](#series) -* [parallel](#parallel) -* [parallelLimit](#parallellimittasks-limit-callback) -* [whilst](#whilst) -* [doWhilst](#doWhilst) -* [until](#until) -* [doUntil](#doUntil) -* [forever](#forever) -* [waterfall](#waterfall) -* [compose](#compose) -* [applyEach](#applyEach) -* [applyEachSeries](#applyEachSeries) -* [queue](#queue) -* [cargo](#cargo) -* [auto](#auto) -* [iterator](#iterator) -* [apply](#apply) -* [nextTick](#nextTick) -* [times](#times) -* [timesSeries](#timesSeries) - -### Utils - -* [memoize](#memoize) -* [unmemoize](#unmemoize) -* [log](#log) -* [dir](#dir) -* [noConflict](#noConflict) - - -## Collections - -<a name="forEach" /> -<a name="each" /> -### each(arr, iterator, callback) - -Applies an iterator function to each item in an array, in parallel. -The iterator is called with an item from the list and a callback for when it -has finished. If the iterator passes an error to this callback, the main -callback for the each function is immediately called with the error. - -Note, that since this function applies the iterator to each item in parallel -there is no guarantee that the iterator functions will complete in order. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback(err) which must be called once it has - completed. If no error has occured, the callback should be run without - arguments or with an explicit null argument. -* callback(err) - A callback which is called after all the iterator functions - have finished, or an error has occurred. - -__Example__ - -```js -// assuming openFiles is an array of file names and saveFile is a function -// to save the modified contents of that file: - -async.each(openFiles, saveFile, function(err){ - // if any of the saves produced an error, err would equal that error -}); -``` - ---------------------------------------- - -<a name="forEachSeries" /> -<a name="eachSeries" /> -### eachSeries(arr, iterator, callback) - -The same as each only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. This means the iterator functions will complete in order. - - ---------------------------------------- - -<a name="forEachLimit" /> -<a name="eachLimit" /> -### eachLimit(arr, limit, iterator, callback) - -The same as each only no more than "limit" iterators will be simultaneously -running at any time. - -Note that the items are not processed in batches, so there is no guarantee that - the first "limit" iterator functions will complete before any others are -started. - -__Arguments__ - -* arr - An array to iterate over. -* limit - The maximum number of iterators to run at any time. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback(err) which must be called once it has - completed. If no error has occured, the callback should be run without - arguments or with an explicit null argument. -* callback(err) - A callback which is called after all the iterator functions - have finished, or an error has occurred. - -__Example__ - -```js -// Assume documents is an array of JSON objects and requestApi is a -// function that interacts with a rate-limited REST api. - -async.eachLimit(documents, 20, requestApi, function(err){ - // if any of the saves produced an error, err would equal that error -}); -``` - ---------------------------------------- - -<a name="map" /> -### map(arr, iterator, callback) - -Produces a new array of values by mapping each value in the given array through -the iterator function. The iterator is called with an item from the array and a -callback for when it has finished processing. The callback takes 2 arguments, -an error and the transformed item from the array. If the iterator passes an -error to this callback, the main callback for the map function is immediately -called with the error. - -Note, that since this function applies the iterator to each item in parallel -there is no guarantee that the iterator functions will complete in order, however -the results array will be in the same order as the original array. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback(err, transformed) which must be called once - it has completed with an error (which can be null) and a transformed item. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is an array of the - transformed items from the original array. - -__Example__ - -```js -async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file -}); -``` - ---------------------------------------- - -<a name="mapSeries" /> -### mapSeries(arr, iterator, callback) - -The same as map only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. The results array will be in the same order as the original. - - ---------------------------------------- - -<a name="mapLimit" /> -### mapLimit(arr, limit, iterator, callback) - -The same as map only no more than "limit" iterators will be simultaneously -running at any time. - -Note that the items are not processed in batches, so there is no guarantee that - the first "limit" iterator functions will complete before any others are -started. - -__Arguments__ - -* arr - An array to iterate over. -* limit - The maximum number of iterators to run at any time. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback(err, transformed) which must be called once - it has completed with an error (which can be null) and a transformed item. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is an array of the - transformed items from the original array. - -__Example__ - -```js -async.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){ - // results is now an array of stats for each file -}); -``` - ---------------------------------------- - -<a name="filter" /> -### filter(arr, iterator, callback) - -__Alias:__ select - -Returns a new array of all the values which pass an async truth test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like fs.exists. This operation is -performed in parallel, but the results array will be in the same order as the -original. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback(truthValue) which must be called with a - boolean argument once it has completed. -* callback(results) - A callback which is called after all the iterator - functions have finished. - -__Example__ - -```js -async.filter(['file1','file2','file3'], fs.exists, function(results){ - // results now equals an array of the existing files -}); -``` - ---------------------------------------- - -<a name="filterSeries" /> -### filterSeries(arr, iterator, callback) - -__alias:__ selectSeries - -The same as filter only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. The results array will be in the same order as the original. - ---------------------------------------- - -<a name="reject" /> -### reject(arr, iterator, callback) - -The opposite of filter. Removes values that pass an async truth test. - ---------------------------------------- - -<a name="rejectSeries" /> -### rejectSeries(arr, iterator, callback) - -The same as reject, only the iterator is applied to each item in the array -in series. - - ---------------------------------------- - -<a name="reduce" /> -### reduce(arr, memo, iterator, callback) - -__aliases:__ inject, foldl - -Reduces a list of values into a single value using an async iterator to return -each successive step. Memo is the initial state of the reduction. This -function only operates in series. For performance reasons, it may make sense to -split a call to this function into a parallel map, then use the normal -Array.prototype.reduce on the results. This function is for situations where -each step in the reduction needs to be async, if you can get the data before -reducing it then it's probably a good idea to do so. - -__Arguments__ - -* arr - An array to iterate over. -* memo - The initial state of the reduction. -* iterator(memo, item, callback) - A function applied to each item in the - array to produce the next step in the reduction. The iterator is passed a - callback(err, reduction) which accepts an optional error as its first - argument, and the state of the reduction as the second. If an error is - passed to the callback, the reduction is stopped and the main callback is - immediately called with the error. -* callback(err, result) - A callback which is called after all the iterator - functions have finished. Result is the reduced value. - -__Example__ - -```js -async.reduce([1,2,3], 0, function(memo, item, callback){ - // pointless async: - process.nextTick(function(){ - callback(null, memo + item) - }); -}, function(err, result){ - // result is now equal to the last value of memo, which is 6 -}); -``` - ---------------------------------------- - -<a name="reduceRight" /> -### reduceRight(arr, memo, iterator, callback) - -__Alias:__ foldr - -Same as reduce, only operates on the items in the array in reverse order. - - ---------------------------------------- - -<a name="detect" /> -### detect(arr, iterator, callback) - -Returns the first value in a list that passes an async truth test. The -iterator is applied in parallel, meaning the first iterator to return true will -fire the detect callback with that result. That means the result might not be -the first item in the original array (in terms of order) that passes the test. - -If order within the original array is important then look at detectSeries. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback(truthValue) which must be called with a - boolean argument once it has completed. -* callback(result) - A callback which is called as soon as any iterator returns - true, or after all the iterator functions have finished. Result will be - the first item in the array that passes the truth test (iterator) or the - value undefined if none passed. - -__Example__ - -```js -async.detect(['file1','file2','file3'], fs.exists, function(result){ - // result now equals the first file in the list that exists -}); -``` - ---------------------------------------- - -<a name="detectSeries" /> -### detectSeries(arr, iterator, callback) - -The same as detect, only the iterator is applied to each item in the array -in series. This means the result is always the first in the original array (in -terms of array order) that passes the truth test. - - ---------------------------------------- - -<a name="sortBy" /> -### sortBy(arr, iterator, callback) - -Sorts a list by the results of running each value through an async iterator. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback(err, sortValue) which must be called once it - has completed with an error (which can be null) and a value to use as the sort - criteria. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is the items from - the original array sorted by the values returned by the iterator calls. - -__Example__ - -```js -async.sortBy(['file1','file2','file3'], function(file, callback){ - fs.stat(file, function(err, stats){ - callback(err, stats.mtime); - }); -}, function(err, results){ - // results is now the original array of files sorted by - // modified date -}); -``` - ---------------------------------------- - -<a name="some" /> -### some(arr, iterator, callback) - -__Alias:__ any - -Returns true if at least one element in the array satisfies an async test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like fs.exists. Once any iterator -call returns true, the main callback is immediately called. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback(truthValue) which must be called with a - boolean argument once it has completed. -* callback(result) - A callback which is called as soon as any iterator returns - true, or after all the iterator functions have finished. Result will be - either true or false depending on the values of the async tests. - -__Example__ - -```js -async.some(['file1','file2','file3'], fs.exists, function(result){ - // if result is true then at least one of the files exists -}); -``` - ---------------------------------------- - -<a name="every" /> -### every(arr, iterator, callback) - -__Alias:__ all - -Returns true if every element in the array satisfies an async test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like fs.exists. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback(truthValue) which must be called with a - boolean argument once it has completed. -* callback(result) - A callback which is called after all the iterator - functions have finished. Result will be either true or false depending on - the values of the async tests. - -__Example__ - -```js -async.every(['file1','file2','file3'], fs.exists, function(result){ - // if result is true then every file exists -}); -``` - ---------------------------------------- - -<a name="concat" /> -### concat(arr, iterator, callback) - -Applies an iterator to each item in a list, concatenating the results. Returns the -concatenated list. The iterators are called in parallel, and the results are -concatenated as they return. There is no guarantee that the results array will -be returned in the original order of the arguments passed to the iterator function. - -__Arguments__ - -* arr - An array to iterate over -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback(err, results) which must be called once it - has completed with an error (which can be null) and an array of results. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is an array containing - the concatenated results of the iterator function. - -__Example__ - -```js -async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ - // files is now a list of filenames that exist in the 3 directories -}); -``` - ---------------------------------------- - -<a name="concatSeries" /> -### concatSeries(arr, iterator, callback) - -Same as async.concat, but executes in series instead of parallel. - - -## Control Flow - -<a name="series" /> -### series(tasks, [callback]) - -Run an array of functions in series, each one running once the previous -function has completed. If any functions in the series pass an error to its -callback, no more functions are run and the callback for the series is -immediately called with the value of the error. Once the tasks have completed, -the results are passed to the final callback as an array. - -It is also possible to use an object instead of an array. Each property will be -run as a function and the results will be passed to the final callback as an object -instead of an array. This can be a more readable way of handling results from -async.series. - - -__Arguments__ - -* tasks - An array or object containing functions to run, each function is passed - a callback(err, result) it must call on completion with an error (which can - be null) and an optional result value. -* callback(err, results) - An optional callback to run once all the functions - have completed. This function gets a results array (or object) containing all - the result arguments passed to the task callbacks. - -__Example__ - -```js -async.series([ - function(callback){ - // do some stuff ... - callback(null, 'one'); - }, - function(callback){ - // do some more stuff ... - callback(null, 'two'); - } -], -// optional callback -function(err, results){ - // results is now equal to ['one', 'two'] -}); - - -// an example using an object instead of an array -async.series({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - } -}, -function(err, results) { - // results is now equal to: {one: 1, two: 2} -}); -``` - ---------------------------------------- - -<a name="parallel" /> -### parallel(tasks, [callback]) - -Run an array of functions in parallel, without waiting until the previous -function has completed. If any of the functions pass an error to its -callback, the main callback is immediately called with the value of the error. -Once the tasks have completed, the results are passed to the final callback as an -array. - -It is also possible to use an object instead of an array. Each property will be -run as a function and the results will be passed to the final callback as an object -instead of an array. This can be a more readable way of handling results from -async.parallel. - - -__Arguments__ - -* tasks - An array or object containing functions to run, each function is passed - a callback(err, result) it must call on completion with an error (which can - be null) and an optional result value. -* callback(err, results) - An optional callback to run once all the functions - have completed. This function gets a results array (or object) containing all - the result arguments passed to the task callbacks. - -__Example__ - -```js -async.parallel([ - function(callback){ - setTimeout(function(){ - callback(null, 'one'); - }, 200); - }, - function(callback){ - setTimeout(function(){ - callback(null, 'two'); - }, 100); - } -], -// optional callback -function(err, results){ - // the results array will equal ['one','two'] even though - // the second function had a shorter timeout. -}); - - -// an example using an object instead of an array -async.parallel({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - } -}, -function(err, results) { - // results is now equals to: {one: 1, two: 2} -}); -``` - ---------------------------------------- - -<a name="parallel" /> -### parallelLimit(tasks, limit, [callback]) - -The same as parallel only the tasks are executed in parallel with a maximum of "limit" -tasks executing at any time. - -Note that the tasks are not executed in batches, so there is no guarantee that -the first "limit" tasks will complete before any others are started. - -__Arguments__ - -* tasks - An array or object containing functions to run, each function is passed - a callback(err, result) it must call on completion with an error (which can - be null) and an optional result value. -* limit - The maximum number of tasks to run at any time. -* callback(err, results) - An optional callback to run once all the functions - have completed. This function gets a results array (or object) containing all - the result arguments passed to the task callbacks. - ---------------------------------------- - -<a name="whilst" /> -### whilst(test, fn, callback) - -Repeatedly call fn, while test returns true. Calls the callback when stopped, -or an error occurs. - -__Arguments__ - -* test() - synchronous truth test to perform before each execution of fn. -* fn(callback) - A function to call each time the test passes. The function is - passed a callback(err) which must be called once it has completed with an - optional error argument. -* callback(err) - A callback which is called after the test fails and repeated - execution of fn has stopped. - -__Example__ - -```js -var count = 0; - -async.whilst( - function () { return count < 5; }, - function (callback) { - count++; - setTimeout(callback, 1000); - }, - function (err) { - // 5 seconds have passed - } -); -``` - ---------------------------------------- - -<a name="doWhilst" /> -### doWhilst(fn, test, callback) - -The post check version of whilst. To reflect the difference in the order of operations `test` and `fn` arguments are switched. `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. - ---------------------------------------- - -<a name="until" /> -### until(test, fn, callback) - -Repeatedly call fn, until test returns true. Calls the callback when stopped, -or an error occurs. - -The inverse of async.whilst. - ---------------------------------------- - -<a name="doUntil" /> -### doUntil(fn, test, callback) - -Like doWhilst except the test is inverted. Note the argument ordering differs from `until`. - ---------------------------------------- - -<a name="forever" /> -### forever(fn, callback) - -Calls the asynchronous function 'fn' repeatedly, in series, indefinitely. -If an error is passed to fn's callback then 'callback' is called with the -error, otherwise it will never be called. - ---------------------------------------- - -<a name="waterfall" /> -### waterfall(tasks, [callback]) - -Runs an array of functions in series, each passing their results to the next in -the array. However, if any of the functions pass an error to the callback, the -next function is not executed and the main callback is immediately called with -the error. - -__Arguments__ - -* tasks - An array of functions to run, each function is passed a - callback(err, result1, result2, ...) it must call on completion. The first - argument is an error (which can be null) and any further arguments will be - passed as arguments in order to the next task. -* callback(err, [results]) - An optional callback to run once all the functions - have completed. This will be passed the results of the last task's callback. - - - -__Example__ - -```js -async.waterfall([ - function(callback){ - callback(null, 'one', 'two'); - }, - function(arg1, arg2, callback){ - callback(null, 'three'); - }, - function(arg1, callback){ - // arg1 now equals 'three' - callback(null, 'done'); - } -], function (err, result) { - // result now equals 'done' -}); -``` - ---------------------------------------- -<a name="compose" /> -### compose(fn1, fn2...) - -Creates a function which is a composition of the passed asynchronous -functions. Each function consumes the return value of the function that -follows. Composing functions f(), g() and h() would produce the result of -f(g(h())), only this version uses callbacks to obtain the return values. - -Each function is executed with the `this` binding of the composed function. - -__Arguments__ - -* functions... - the asynchronous functions to compose - - -__Example__ - -```js -function add1(n, callback) { - setTimeout(function () { - callback(null, n + 1); - }, 10); -} - -function mul3(n, callback) { - setTimeout(function () { - callback(null, n * 3); - }, 10); -} - -var add1mul3 = async.compose(mul3, add1); - -add1mul3(4, function (err, result) { - // result now equals 15 -}); -``` - ---------------------------------------- -<a name="applyEach" /> -### applyEach(fns, args..., callback) - -Applies the provided arguments to each function in the array, calling the -callback after all functions have completed. If you only provide the first -argument then it will return a function which lets you pass in the -arguments as if it were a single function call. - -__Arguments__ - -* fns - the asynchronous functions to all call with the same arguments -* args... - any number of separate arguments to pass to the function -* callback - the final argument should be the callback, called when all - functions have completed processing - - -__Example__ - -```js -async.applyEach([enableSearch, updateSchema], 'bucket', callback); - -// partial application example: -async.each( - buckets, - async.applyEach([enableSearch, updateSchema]), - callback -); -``` - ---------------------------------------- - -<a name="applyEachSeries" /> -### applyEachSeries(arr, iterator, callback) - -The same as applyEach only the functions are applied in series. - ---------------------------------------- - -<a name="queue" /> -### queue(worker, concurrency) - -Creates a queue object with the specified concurrency. Tasks added to the -queue will be processed in parallel (up to the concurrency limit). If all -workers are in progress, the task is queued until one is available. Once -a worker has completed a task, the task's callback is called. - -__Arguments__ - -* worker(task, callback) - An asynchronous function for processing a queued - task, which must call its callback(err) argument when finished, with an - optional error as an argument. -* concurrency - An integer for determining how many worker functions should be - run in parallel. - -__Queue objects__ - -The queue object returned by this function has the following properties and -methods: - -* length() - a function returning the number of items waiting to be processed. -* concurrency - an integer for determining how many worker functions should be - run in parallel. This property can be changed after a queue is created to - alter the concurrency on-the-fly. -* push(task, [callback]) - add a new task to the queue, the callback is called - once the worker has finished processing the task. - instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list. -* unshift(task, [callback]) - add a new task to the front of the queue. -* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued -* empty - a callback that is called when the last item from the queue is given to a worker -* drain - a callback that is called when the last item from the queue has returned from the worker - -__Example__ - -```js -// create a queue object with concurrency 2 - -var q = async.queue(function (task, callback) { - console.log('hello ' + task.name); - callback(); -}, 2); - - -// assign a callback -q.drain = function() { - console.log('all items have been processed'); -} - -// add some items to the queue - -q.push({name: 'foo'}, function (err) { - console.log('finished processing foo'); -}); -q.push({name: 'bar'}, function (err) { - console.log('finished processing bar'); -}); - -// add some items to the queue (batch-wise) - -q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) { - console.log('finished processing bar'); -}); - -// add some items to the front of the queue - -q.unshift({name: 'bar'}, function (err) { - console.log('finished processing bar'); -}); -``` - ---------------------------------------- - -<a name="cargo" /> -### cargo(worker, [payload]) - -Creates a cargo object with the specified payload. Tasks added to the -cargo will be processed altogether (up to the payload limit). If the -worker is in progress, the task is queued until it is available. Once -the worker has completed some tasks, each callback of those tasks is called. - -__Arguments__ - -* worker(tasks, callback) - An asynchronous function for processing an array of - queued tasks, which must call its callback(err) argument when finished, with - an optional error as an argument. -* payload - An optional integer for determining how many tasks should be - processed per round; if omitted, the default is unlimited. - -__Cargo objects__ - -The cargo object returned by this function has the following properties and -methods: - -* length() - a function returning the number of items waiting to be processed. -* payload - an integer for determining how many tasks should be - process per round. This property can be changed after a cargo is created to - alter the payload on-the-fly. -* push(task, [callback]) - add a new task to the queue, the callback is called - once the worker has finished processing the task. - instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list. -* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued -* empty - a callback that is called when the last item from the queue is given to a worker -* drain - a callback that is called when the last item from the queue has returned from the worker - -__Example__ - -```js -// create a cargo object with payload 2 - -var cargo = async.cargo(function (tasks, callback) { - for(var i=0; i<tasks.length; i++){ - console.log('hello ' + tasks[i].name); - } - callback(); -}, 2); - - -// add some items - -cargo.push({name: 'foo'}, function (err) { - console.log('finished processing foo'); -}); -cargo.push({name: 'bar'}, function (err) { - console.log('finished processing bar'); -}); -cargo.push({name: 'baz'}, function (err) { - console.log('finished processing baz'); -}); -``` - ---------------------------------------- - -<a name="auto" /> -### auto(tasks, [callback]) - -Determines the best order for running functions based on their requirements. -Each function can optionally depend on other functions being completed first, -and each function is run as soon as its requirements are satisfied. If any of -the functions pass an error to their callback, that function will not complete -(so any other functions depending on it will not run) and the main callback -will be called immediately with the error. Functions also receive an object -containing the results of functions which have completed so far. - -Note, all functions are called with a results object as a second argument, -so it is unsafe to pass functions in the tasks object which cannot handle the -extra argument. For example, this snippet of code: - -```js -async.auto({ - readData: async.apply(fs.readFile, 'data.txt', 'utf-8') -}, callback); -``` - -will have the effect of calling readFile with the results object as the last -argument, which will fail: - -```js -fs.readFile('data.txt', 'utf-8', cb, {}); -``` - -Instead, wrap the call to readFile in a function which does not forward the -results object: - -```js -async.auto({ - readData: function(cb, results){ - fs.readFile('data.txt', 'utf-8', cb); - } -}, callback); -``` - -__Arguments__ - -* tasks - An object literal containing named functions or an array of - requirements, with the function itself the last item in the array. The key - used for each function or array is used when specifying requirements. The - function receives two arguments: (1) a callback(err, result) which must be - called when finished, passing an error (which can be null) and the result of - the function's execution, and (2) a results object, containing the results of - the previously executed functions. -* callback(err, results) - An optional callback which is called when all the - tasks have been completed. The callback will receive an error as an argument - if any tasks pass an error to their callback. Results will always be passed - but if an error occurred, no other tasks will be performed, and the results - object will only contain partial results. - - -__Example__ - -```js -async.auto({ - get_data: function(callback){ - // async code to get some data - }, - make_folder: function(callback){ - // async code to create a directory to store a file in - // this is run at the same time as getting the data - }, - write_file: ['get_data', 'make_folder', function(callback){ - // once there is some data and the directory exists, - // write the data to a file in the directory - callback(null, filename); - }], - email_link: ['write_file', function(callback, results){ - // once the file is written let's email a link to it... - // results.write_file contains the filename returned by write_file. - }] -}); -``` - -This is a fairly trivial example, but to do this using the basic parallel and -series functions would look like this: - -```js -async.parallel([ - function(callback){ - // async code to get some data - }, - function(callback){ - // async code to create a directory to store a file in - // this is run at the same time as getting the data - } -], -function(err, results){ - async.series([ - function(callback){ - // once there is some data and the directory exists, - // write the data to a file in the directory - }, - function(callback){ - // once the file is written let's email a link to it... - } - ]); -}); -``` - -For a complicated series of async tasks using the auto function makes adding -new tasks much easier and makes the code more readable. - - ---------------------------------------- - -<a name="iterator" /> -### iterator(tasks) - -Creates an iterator function which calls the next function in the array, -returning a continuation to call the next one after that. It's also possible to -'peek' the next iterator by doing iterator.next(). - -This function is used internally by the async module but can be useful when -you want to manually control the flow of functions in series. - -__Arguments__ - -* tasks - An array of functions to run. - -__Example__ - -```js -var iterator = async.iterator([ - function(){ sys.p('one'); }, - function(){ sys.p('two'); }, - function(){ sys.p('three'); } -]); - -node> var iterator2 = iterator(); -'one' -node> var iterator3 = iterator2(); -'two' -node> iterator3(); -'three' -node> var nextfn = iterator2.next(); -node> nextfn(); -'three' -``` - ---------------------------------------- - -<a name="apply" /> -### apply(function, arguments..) - -Creates a continuation function with some arguments already applied, a useful -shorthand when combined with other control flow functions. Any arguments -passed to the returned function are added to the arguments originally passed -to apply. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to automatically apply when the - continuation is called. - -__Example__ - -```js -// using apply - -async.parallel([ - async.apply(fs.writeFile, 'testfile1', 'test1'), - async.apply(fs.writeFile, 'testfile2', 'test2'), -]); - - -// the same process without using apply - -async.parallel([ - function(callback){ - fs.writeFile('testfile1', 'test1', callback); - }, - function(callback){ - fs.writeFile('testfile2', 'test2', callback); - } -]); -``` - -It's possible to pass any number of additional arguments when calling the -continuation: - -```js -node> var fn = async.apply(sys.puts, 'one'); -node> fn('two', 'three'); -one -two -three -``` - ---------------------------------------- - -<a name="nextTick" /> -### nextTick(callback) - -Calls the callback on a later loop around the event loop. In node.js this just -calls process.nextTick, in the browser it falls back to setImmediate(callback) -if available, otherwise setTimeout(callback, 0), which means other higher priority -events may precede the execution of the callback. - -This is used internally for browser-compatibility purposes. - -__Arguments__ - -* callback - The function to call on a later loop around the event loop. - -__Example__ - -```js -var call_order = []; -async.nextTick(function(){ - call_order.push('two'); - // call_order now equals ['one','two'] -}); -call_order.push('one') -``` - -<a name="times" /> -### times(n, callback) - -Calls the callback n times and accumulates results in the same manner -you would use with async.map. - -__Arguments__ - -* n - The number of times to run the function. -* callback - The function to call n times. - -__Example__ - -```js -// Pretend this is some complicated async factory -var createUser = function(id, callback) { - callback(null, { - id: 'user' + id - }) -} -// generate 5 users -async.times(5, function(n, next){ - createUser(n, function(err, user) { - next(err, user) - }) -}, function(err, users) { - // we should now have 5 users -}); -``` - -<a name="timesSeries" /> -### timesSeries(n, callback) - -The same as times only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. The results array will be in the same order as the original. - - -## Utils - -<a name="memoize" /> -### memoize(fn, [hasher]) - -Caches the results of an async function. When creating a hash to store function -results against, the callback is omitted from the hash and an optional hash -function can be used. - -The cache of results is exposed as the `memo` property of the function returned -by `memoize`. - -__Arguments__ - -* fn - the function you to proxy and cache results from. -* hasher - an optional function for generating a custom hash for storing - results, it has all the arguments applied to it apart from the callback, and - must be synchronous. - -__Example__ - -```js -var slow_fn = function (name, callback) { - // do something - callback(null, result); -}; -var fn = async.memoize(slow_fn); - -// fn can now be used as if it were slow_fn -fn('some name', function () { - // callback -}); -``` - -<a name="unmemoize" /> -### unmemoize(fn) - -Undoes a memoized function, reverting it to the original, unmemoized -form. Comes handy in tests. - -__Arguments__ - -* fn - the memoized function - -<a name="log" /> -### log(function, arguments) - -Logs the result of an async function to the console. Only works in node.js or -in browsers that support console.log and console.error (such as FF and Chrome). -If multiple arguments are returned from the async function, console.log is -called on each argument in order. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to apply to the function. - -__Example__ - -```js -var hello = function(name, callback){ - setTimeout(function(){ - callback(null, 'hello ' + name); - }, 1000); -}; -``` -```js -node> async.log(hello, 'world'); -'hello world' -``` - ---------------------------------------- - -<a name="dir" /> -### dir(function, arguments) - -Logs the result of an async function to the console using console.dir to -display the properties of the resulting object. Only works in node.js or -in browsers that support console.dir and console.error (such as FF and Chrome). -If multiple arguments are returned from the async function, console.dir is -called on each argument in order. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to apply to the function. - -__Example__ - -```js -var hello = function(name, callback){ - setTimeout(function(){ - callback(null, {hello: name}); - }, 1000); -}; -``` -```js -node> async.dir(hello, 'world'); -{hello: 'world'} -``` - ---------------------------------------- - -<a name="noConflict" /> -### noConflict() - -Changes the value of async back to its original value, returning a reference to the -async object. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/component.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/component.json deleted file mode 100644 index bbb01154..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/component.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "async", - "repo": "caolan/async", - "description": "Higher-order functions and common patterns for asynchronous code", - "version": "0.1.23", - "keywords": [], - "dependencies": {}, - "development": {}, - "main": "lib/async.js", - "scripts": [ "lib/async.js" ] -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js deleted file mode 100755 index 1eebb153..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js +++ /dev/null @@ -1,958 +0,0 @@ -/*global setImmediate: false, setTimeout: false, console: false */ -(function () { - - var async = {}; - - // global on the server, window in the browser - var root, previous_async; - - root = this; - if (root != null) { - previous_async = root.async; - } - - async.noConflict = function () { - root.async = previous_async; - return async; - }; - - function only_once(fn) { - var called = false; - return function() { - if (called) throw new Error("Callback was already called."); - called = true; - fn.apply(root, arguments); - } - } - - //// cross-browser compatiblity functions //// - - var _each = function (arr, iterator) { - if (arr.forEach) { - return arr.forEach(iterator); - } - for (var i = 0; i < arr.length; i += 1) { - iterator(arr[i], i, arr); - } - }; - - var _map = function (arr, iterator) { - if (arr.map) { - return arr.map(iterator); - } - var results = []; - _each(arr, function (x, i, a) { - results.push(iterator(x, i, a)); - }); - return results; - }; - - var _reduce = function (arr, iterator, memo) { - if (arr.reduce) { - return arr.reduce(iterator, memo); - } - _each(arr, function (x, i, a) { - memo = iterator(memo, x, i, a); - }); - return memo; - }; - - var _keys = function (obj) { - if (Object.keys) { - return Object.keys(obj); - } - var keys = []; - for (var k in obj) { - if (obj.hasOwnProperty(k)) { - keys.push(k); - } - } - return keys; - }; - - //// exported async module functions //// - - //// nextTick implementation with browser-compatible fallback //// - if (typeof process === 'undefined' || !(process.nextTick)) { - if (typeof setImmediate === 'function') { - async.nextTick = function (fn) { - // not a direct alias for IE10 compatibility - setImmediate(fn); - }; - async.setImmediate = async.nextTick; - } - else { - async.nextTick = function (fn) { - setTimeout(fn, 0); - }; - async.setImmediate = async.nextTick; - } - } - else { - async.nextTick = process.nextTick; - if (typeof setImmediate !== 'undefined') { - async.setImmediate = function (fn) { - // not a direct alias for IE10 compatibility - setImmediate(fn); - }; - } - else { - async.setImmediate = async.nextTick; - } - } - - async.each = function (arr, iterator, callback) { - callback = callback || function () {}; - if (!arr.length) { - return callback(); - } - var completed = 0; - _each(arr, function (x) { - iterator(x, only_once(function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - if (completed >= arr.length) { - callback(null); - } - } - })); - }); - }; - async.forEach = async.each; - - async.eachSeries = function (arr, iterator, callback) { - callback = callback || function () {}; - if (!arr.length) { - return callback(); - } - var completed = 0; - var iterate = function () { - iterator(arr[completed], function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - if (completed >= arr.length) { - callback(null); - } - else { - iterate(); - } - } - }); - }; - iterate(); - }; - async.forEachSeries = async.eachSeries; - - async.eachLimit = function (arr, limit, iterator, callback) { - var fn = _eachLimit(limit); - fn.apply(null, [arr, iterator, callback]); - }; - async.forEachLimit = async.eachLimit; - - var _eachLimit = function (limit) { - - return function (arr, iterator, callback) { - callback = callback || function () {}; - if (!arr.length || limit <= 0) { - return callback(); - } - var completed = 0; - var started = 0; - var running = 0; - - (function replenish () { - if (completed >= arr.length) { - return callback(); - } - - while (running < limit && started < arr.length) { - started += 1; - running += 1; - iterator(arr[started - 1], function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - running -= 1; - if (completed >= arr.length) { - callback(); - } - else { - replenish(); - } - } - }); - } - })(); - }; - }; - - - var doParallel = function (fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [async.each].concat(args)); - }; - }; - var doParallelLimit = function(limit, fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [_eachLimit(limit)].concat(args)); - }; - }; - var doSeries = function (fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [async.eachSeries].concat(args)); - }; - }; - - - var _asyncMap = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (err, v) { - results[x.index] = v; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - }; - async.map = doParallel(_asyncMap); - async.mapSeries = doSeries(_asyncMap); - async.mapLimit = function (arr, limit, iterator, callback) { - return _mapLimit(limit)(arr, iterator, callback); - }; - - var _mapLimit = function(limit) { - return doParallelLimit(limit, _asyncMap); - }; - - // reduce only has a series version, as doing reduce in parallel won't - // work in many situations. - async.reduce = function (arr, memo, iterator, callback) { - async.eachSeries(arr, function (x, callback) { - iterator(memo, x, function (err, v) { - memo = v; - callback(err); - }); - }, function (err) { - callback(err, memo); - }); - }; - // inject alias - async.inject = async.reduce; - // foldl alias - async.foldl = async.reduce; - - async.reduceRight = function (arr, memo, iterator, callback) { - var reversed = _map(arr, function (x) { - return x; - }).reverse(); - async.reduce(reversed, memo, iterator, callback); - }; - // foldr alias - async.foldr = async.reduceRight; - - var _filter = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (v) { - if (v) { - results.push(x); - } - callback(); - }); - }, function (err) { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - }; - async.filter = doParallel(_filter); - async.filterSeries = doSeries(_filter); - // select alias - async.select = async.filter; - async.selectSeries = async.filterSeries; - - var _reject = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (v) { - if (!v) { - results.push(x); - } - callback(); - }); - }, function (err) { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - }; - async.reject = doParallel(_reject); - async.rejectSeries = doSeries(_reject); - - var _detect = function (eachfn, arr, iterator, main_callback) { - eachfn(arr, function (x, callback) { - iterator(x, function (result) { - if (result) { - main_callback(x); - main_callback = function () {}; - } - else { - callback(); - } - }); - }, function (err) { - main_callback(); - }); - }; - async.detect = doParallel(_detect); - async.detectSeries = doSeries(_detect); - - async.some = function (arr, iterator, main_callback) { - async.each(arr, function (x, callback) { - iterator(x, function (v) { - if (v) { - main_callback(true); - main_callback = function () {}; - } - callback(); - }); - }, function (err) { - main_callback(false); - }); - }; - // any alias - async.any = async.some; - - async.every = function (arr, iterator, main_callback) { - async.each(arr, function (x, callback) { - iterator(x, function (v) { - if (!v) { - main_callback(false); - main_callback = function () {}; - } - callback(); - }); - }, function (err) { - main_callback(true); - }); - }; - // all alias - async.all = async.every; - - async.sortBy = function (arr, iterator, callback) { - async.map(arr, function (x, callback) { - iterator(x, function (err, criteria) { - if (err) { - callback(err); - } - else { - callback(null, {value: x, criteria: criteria}); - } - }); - }, function (err, results) { - if (err) { - return callback(err); - } - else { - var fn = function (left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }; - callback(null, _map(results.sort(fn), function (x) { - return x.value; - })); - } - }); - }; - - async.auto = function (tasks, callback) { - callback = callback || function () {}; - var keys = _keys(tasks); - if (!keys.length) { - return callback(null); - } - - var results = {}; - - var listeners = []; - var addListener = function (fn) { - listeners.unshift(fn); - }; - var removeListener = function (fn) { - for (var i = 0; i < listeners.length; i += 1) { - if (listeners[i] === fn) { - listeners.splice(i, 1); - return; - } - } - }; - var taskComplete = function () { - _each(listeners.slice(0), function (fn) { - fn(); - }); - }; - - addListener(function () { - if (_keys(results).length === keys.length) { - callback(null, results); - callback = function () {}; - } - }); - - _each(keys, function (k) { - var task = (tasks[k] instanceof Function) ? [tasks[k]]: tasks[k]; - var taskCallback = function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - if (err) { - var safeResults = {}; - _each(_keys(results), function(rkey) { - safeResults[rkey] = results[rkey]; - }); - safeResults[k] = args; - callback(err, safeResults); - // stop subsequent errors hitting callback multiple times - callback = function () {}; - } - else { - results[k] = args; - async.setImmediate(taskComplete); - } - }; - var requires = task.slice(0, Math.abs(task.length - 1)) || []; - var ready = function () { - return _reduce(requires, function (a, x) { - return (a && results.hasOwnProperty(x)); - }, true) && !results.hasOwnProperty(k); - }; - if (ready()) { - task[task.length - 1](taskCallback, results); - } - else { - var listener = function () { - if (ready()) { - removeListener(listener); - task[task.length - 1](taskCallback, results); - } - }; - addListener(listener); - } - }); - }; - - async.waterfall = function (tasks, callback) { - callback = callback || function () {}; - if (tasks.constructor !== Array) { - var err = new Error('First argument to waterfall must be an array of functions'); - return callback(err); - } - if (!tasks.length) { - return callback(); - } - var wrapIterator = function (iterator) { - return function (err) { - if (err) { - callback.apply(null, arguments); - callback = function () {}; - } - else { - var args = Array.prototype.slice.call(arguments, 1); - var next = iterator.next(); - if (next) { - args.push(wrapIterator(next)); - } - else { - args.push(callback); - } - async.setImmediate(function () { - iterator.apply(null, args); - }); - } - }; - }; - wrapIterator(async.iterator(tasks))(); - }; - - var _parallel = function(eachfn, tasks, callback) { - callback = callback || function () {}; - if (tasks.constructor === Array) { - eachfn.map(tasks, function (fn, callback) { - if (fn) { - fn(function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - callback.call(null, err, args); - }); - } - }, callback); - } - else { - var results = {}; - eachfn.each(_keys(tasks), function (k, callback) { - tasks[k](function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - - async.parallel = function (tasks, callback) { - _parallel({ map: async.map, each: async.each }, tasks, callback); - }; - - async.parallelLimit = function(tasks, limit, callback) { - _parallel({ map: _mapLimit(limit), each: _eachLimit(limit) }, tasks, callback); - }; - - async.series = function (tasks, callback) { - callback = callback || function () {}; - if (tasks.constructor === Array) { - async.mapSeries(tasks, function (fn, callback) { - if (fn) { - fn(function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - callback.call(null, err, args); - }); - } - }, callback); - } - else { - var results = {}; - async.eachSeries(_keys(tasks), function (k, callback) { - tasks[k](function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - - async.iterator = function (tasks) { - var makeCallback = function (index) { - var fn = function () { - if (tasks.length) { - tasks[index].apply(null, arguments); - } - return fn.next(); - }; - fn.next = function () { - return (index < tasks.length - 1) ? makeCallback(index + 1): null; - }; - return fn; - }; - return makeCallback(0); - }; - - async.apply = function (fn) { - var args = Array.prototype.slice.call(arguments, 1); - return function () { - return fn.apply( - null, args.concat(Array.prototype.slice.call(arguments)) - ); - }; - }; - - var _concat = function (eachfn, arr, fn, callback) { - var r = []; - eachfn(arr, function (x, cb) { - fn(x, function (err, y) { - r = r.concat(y || []); - cb(err); - }); - }, function (err) { - callback(err, r); - }); - }; - async.concat = doParallel(_concat); - async.concatSeries = doSeries(_concat); - - async.whilst = function (test, iterator, callback) { - if (test()) { - iterator(function (err) { - if (err) { - return callback(err); - } - async.whilst(test, iterator, callback); - }); - } - else { - callback(); - } - }; - - async.doWhilst = function (iterator, test, callback) { - iterator(function (err) { - if (err) { - return callback(err); - } - if (test()) { - async.doWhilst(iterator, test, callback); - } - else { - callback(); - } - }); - }; - - async.until = function (test, iterator, callback) { - if (!test()) { - iterator(function (err) { - if (err) { - return callback(err); - } - async.until(test, iterator, callback); - }); - } - else { - callback(); - } - }; - - async.doUntil = function (iterator, test, callback) { - iterator(function (err) { - if (err) { - return callback(err); - } - if (!test()) { - async.doUntil(iterator, test, callback); - } - else { - callback(); - } - }); - }; - - async.queue = function (worker, concurrency) { - if (concurrency === undefined) { - concurrency = 1; - } - function _insert(q, data, pos, callback) { - if(data.constructor !== Array) { - data = [data]; - } - _each(data, function(task) { - var item = { - data: task, - callback: typeof callback === 'function' ? callback : null - }; - - if (pos) { - q.tasks.unshift(item); - } else { - q.tasks.push(item); - } - - if (q.saturated && q.tasks.length === concurrency) { - q.saturated(); - } - async.setImmediate(q.process); - }); - } - - var workers = 0; - var q = { - tasks: [], - concurrency: concurrency, - saturated: null, - empty: null, - drain: null, - push: function (data, callback) { - _insert(q, data, false, callback); - }, - unshift: function (data, callback) { - _insert(q, data, true, callback); - }, - process: function () { - if (workers < q.concurrency && q.tasks.length) { - var task = q.tasks.shift(); - if (q.empty && q.tasks.length === 0) { - q.empty(); - } - workers += 1; - var next = function () { - workers -= 1; - if (task.callback) { - task.callback.apply(task, arguments); - } - if (q.drain && q.tasks.length + workers === 0) { - q.drain(); - } - q.process(); - }; - var cb = only_once(next); - worker(task.data, cb); - } - }, - length: function () { - return q.tasks.length; - }, - running: function () { - return workers; - } - }; - return q; - }; - - async.cargo = function (worker, payload) { - var working = false, - tasks = []; - - var cargo = { - tasks: tasks, - payload: payload, - saturated: null, - empty: null, - drain: null, - push: function (data, callback) { - if(data.constructor !== Array) { - data = [data]; - } - _each(data, function(task) { - tasks.push({ - data: task, - callback: typeof callback === 'function' ? callback : null - }); - if (cargo.saturated && tasks.length === payload) { - cargo.saturated(); - } - }); - async.setImmediate(cargo.process); - }, - process: function process() { - if (working) return; - if (tasks.length === 0) { - if(cargo.drain) cargo.drain(); - return; - } - - var ts = typeof payload === 'number' - ? tasks.splice(0, payload) - : tasks.splice(0); - - var ds = _map(ts, function (task) { - return task.data; - }); - - if(cargo.empty) cargo.empty(); - working = true; - worker(ds, function () { - working = false; - - var args = arguments; - _each(ts, function (data) { - if (data.callback) { - data.callback.apply(null, args); - } - }); - - process(); - }); - }, - length: function () { - return tasks.length; - }, - running: function () { - return working; - } - }; - return cargo; - }; - - var _console_fn = function (name) { - return function (fn) { - var args = Array.prototype.slice.call(arguments, 1); - fn.apply(null, args.concat([function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (typeof console !== 'undefined') { - if (err) { - if (console.error) { - console.error(err); - } - } - else if (console[name]) { - _each(args, function (x) { - console[name](x); - }); - } - } - }])); - }; - }; - async.log = _console_fn('log'); - async.dir = _console_fn('dir'); - /*async.info = _console_fn('info'); - async.warn = _console_fn('warn'); - async.error = _console_fn('error');*/ - - async.memoize = function (fn, hasher) { - var memo = {}; - var queues = {}; - hasher = hasher || function (x) { - return x; - }; - var memoized = function () { - var args = Array.prototype.slice.call(arguments); - var callback = args.pop(); - var key = hasher.apply(null, args); - if (key in memo) { - callback.apply(null, memo[key]); - } - else if (key in queues) { - queues[key].push(callback); - } - else { - queues[key] = [callback]; - fn.apply(null, args.concat([function () { - memo[key] = arguments; - var q = queues[key]; - delete queues[key]; - for (var i = 0, l = q.length; i < l; i++) { - q[i].apply(null, arguments); - } - }])); - } - }; - memoized.memo = memo; - memoized.unmemoized = fn; - return memoized; - }; - - async.unmemoize = function (fn) { - return function () { - return (fn.unmemoized || fn).apply(null, arguments); - }; - }; - - async.times = function (count, iterator, callback) { - var counter = []; - for (var i = 0; i < count; i++) { - counter.push(i); - } - return async.map(counter, iterator, callback); - }; - - async.timesSeries = function (count, iterator, callback) { - var counter = []; - for (var i = 0; i < count; i++) { - counter.push(i); - } - return async.mapSeries(counter, iterator, callback); - }; - - async.compose = function (/* functions... */) { - var fns = Array.prototype.reverse.call(arguments); - return function () { - var that = this; - var args = Array.prototype.slice.call(arguments); - var callback = args.pop(); - async.reduce(fns, args, function (newargs, fn, cb) { - fn.apply(that, newargs.concat([function () { - var err = arguments[0]; - var nextargs = Array.prototype.slice.call(arguments, 1); - cb(err, nextargs); - }])) - }, - function (err, results) { - callback.apply(that, [err].concat(results)); - }); - }; - }; - - var _applyEach = function (eachfn, fns /*args...*/) { - var go = function () { - var that = this; - var args = Array.prototype.slice.call(arguments); - var callback = args.pop(); - return eachfn(fns, function (fn, cb) { - fn.apply(that, args.concat([cb])); - }, - callback); - }; - if (arguments.length > 2) { - var args = Array.prototype.slice.call(arguments, 2); - return go.apply(this, args); - } - else { - return go; - } - }; - async.applyEach = doParallel(_applyEach); - async.applyEachSeries = doSeries(_applyEach); - - async.forever = function (fn, callback) { - function next(err) { - if (err) { - if (callback) { - return callback(err); - } - throw err; - } - fn(next); - } - next(); - }; - - // AMD / RequireJS - if (typeof define !== 'undefined' && define.amd) { - define([], function () { - return async; - }); - } - // Node.js - else if (typeof module !== 'undefined' && module.exports) { - module.exports = async; - } - // included directly via <script> tag - else { - root.async = async; - } - -}()); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/package.json deleted file mode 100644 index c586b717..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "async", - "description": "Higher-order functions and common patterns for asynchronous code", - "main": "./lib/async", - "author": { - "name": "Caolan McMahon" - }, - "version": "0.2.10", - "repository": { - "type": "git", - "url": "https://github.com/caolan/async.git" - }, - "bugs": { - "url": "https://github.com/caolan/async/issues" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/caolan/async/raw/master/LICENSE" - } - ], - "devDependencies": { - "nodeunit": ">0.0.0", - "uglify-js": "1.2.x", - "nodelint": ">0.0.0" - }, - "jam": { - "main": "lib/async.js", - "include": [ - "lib/async.js", - "README.md", - "LICENSE" - ] - }, - "scripts": { - "test": "nodeunit test/test-async.js" - }, - "readme": "# Async.js\n\nAsync is a utility module which provides straight-forward, powerful functions\nfor working with asynchronous JavaScript. Although originally designed for\nuse with [node.js](http://nodejs.org), it can also be used directly in the\nbrowser. Also supports [component](https://github.com/component/component).\n\nAsync provides around 20 functions that include the usual 'functional'\nsuspects (map, reduce, filter, each…) as well as some common patterns\nfor asynchronous control flow (parallel, series, waterfall…). All these\nfunctions assume you follow the node.js convention of providing a single\ncallback as the last argument of your async function.\n\n\n## Quick Examples\n\n```javascript\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n\nasync.parallel([\n function(){ ... },\n function(){ ... }\n], callback);\n\nasync.series([\n function(){ ... },\n function(){ ... }\n]);\n```\n\nThere are many more functions available so take a look at the docs below for a\nfull list. This module aims to be comprehensive, so if you feel anything is\nmissing please create a GitHub issue for it.\n\n## Common Pitfalls\n\n### Binding a context to an iterator\n\nThis section is really about bind, not about async. If you are wondering how to\nmake async execute your iterators in a given context, or are confused as to why\na method of another library isn't working as an iterator, study this example:\n\n```js\n// Here is a simple object with an (unnecessarily roundabout) squaring method\nvar AsyncSquaringLibrary = {\n squareExponent: 2,\n square: function(number, callback){ \n var result = Math.pow(number, this.squareExponent);\n setTimeout(function(){\n callback(null, result);\n }, 200);\n }\n};\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){\n // result is [NaN, NaN, NaN]\n // This fails because the `this.squareExponent` expression in the square\n // function is not evaluated in the context of AsyncSquaringLibrary, and is\n // therefore undefined.\n});\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){\n // result is [1, 4, 9]\n // With the help of bind we can attach a context to the iterator before\n // passing it to async. Now the square function will be executed in its \n // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent`\n // will be as expected.\n});\n```\n\n## Download\n\nThe source is available for download from\n[GitHub](http://github.com/caolan/async).\nAlternatively, you can install using Node Package Manager (npm):\n\n npm install async\n\n__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed\n\n## In the Browser\n\nSo far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage:\n\n```html\n<script type=\"text/javascript\" src=\"async.js\"></script>\n<script type=\"text/javascript\">\n\n async.map(data, asyncProcess, function(err, results){\n alert(results);\n });\n\n</script>\n```\n\n## Documentation\n\n### Collections\n\n* [each](#each)\n* [eachSeries](#eachSeries)\n* [eachLimit](#eachLimit)\n* [map](#map)\n* [mapSeries](#mapSeries)\n* [mapLimit](#mapLimit)\n* [filter](#filter)\n* [filterSeries](#filterSeries)\n* [reject](#reject)\n* [rejectSeries](#rejectSeries)\n* [reduce](#reduce)\n* [reduceRight](#reduceRight)\n* [detect](#detect)\n* [detectSeries](#detectSeries)\n* [sortBy](#sortBy)\n* [some](#some)\n* [every](#every)\n* [concat](#concat)\n* [concatSeries](#concatSeries)\n\n### Control Flow\n\n* [series](#series)\n* [parallel](#parallel)\n* [parallelLimit](#parallellimittasks-limit-callback)\n* [whilst](#whilst)\n* [doWhilst](#doWhilst)\n* [until](#until)\n* [doUntil](#doUntil)\n* [forever](#forever)\n* [waterfall](#waterfall)\n* [compose](#compose)\n* [applyEach](#applyEach)\n* [applyEachSeries](#applyEachSeries)\n* [queue](#queue)\n* [cargo](#cargo)\n* [auto](#auto)\n* [iterator](#iterator)\n* [apply](#apply)\n* [nextTick](#nextTick)\n* [times](#times)\n* [timesSeries](#timesSeries)\n\n### Utils\n\n* [memoize](#memoize)\n* [unmemoize](#unmemoize)\n* [log](#log)\n* [dir](#dir)\n* [noConflict](#noConflict)\n\n\n## Collections\n\n<a name=\"forEach\" />\n<a name=\"each\" />\n### each(arr, iterator, callback)\n\nApplies an iterator function to each item in an array, in parallel.\nThe iterator is called with an item from the list and a callback for when it\nhas finished. If the iterator passes an error to this callback, the main\ncallback for the each function is immediately called with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// assuming openFiles is an array of file names and saveFile is a function\n// to save the modified contents of that file:\n\nasync.each(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n<a name=\"forEachSeries\" />\n<a name=\"eachSeries\" />\n### eachSeries(arr, iterator, callback)\n\nThe same as each only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. This means the iterator functions will complete in order.\n\n\n---------------------------------------\n\n<a name=\"forEachLimit\" />\n<a name=\"eachLimit\" />\n### eachLimit(arr, limit, iterator, callback)\n\nThe same as each only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// Assume documents is an array of JSON objects and requestApi is a\n// function that interacts with a rate-limited REST api.\n\nasync.eachLimit(documents, 20, requestApi, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n<a name=\"map\" />\n### map(arr, iterator, callback)\n\nProduces a new array of values by mapping each value in the given array through\nthe iterator function. The iterator is called with an item from the array and a\ncallback for when it has finished processing. The callback takes 2 arguments, \nan error and the transformed item from the array. If the iterator passes an\nerror to this callback, the main callback for the map function is immediately\ncalled with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order, however\nthe results array will be in the same order as the original array.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n```js\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n<a name=\"mapSeries\" />\n### mapSeries(arr, iterator, callback)\n\nThe same as map only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n---------------------------------------\n\n<a name=\"mapLimit\" />\n### mapLimit(arr, limit, iterator, callback)\n\nThe same as map only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n```js\nasync.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n<a name=\"filter\" />\n### filter(arr, iterator, callback)\n\n__Alias:__ select\n\nReturns a new array of all the values which pass an async truth test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(results) - A callback which is called after all the iterator\n functions have finished.\n\n__Example__\n\n```js\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n```\n\n---------------------------------------\n\n<a name=\"filterSeries\" />\n### filterSeries(arr, iterator, callback)\n\n__alias:__ selectSeries\n\nThe same as filter only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n---------------------------------------\n\n<a name=\"reject\" />\n### reject(arr, iterator, callback)\n\nThe opposite of filter. Removes values that pass an async truth test.\n\n---------------------------------------\n\n<a name=\"rejectSeries\" />\n### rejectSeries(arr, iterator, callback)\n\nThe same as reject, only the iterator is applied to each item in the array\nin series.\n\n\n---------------------------------------\n\n<a name=\"reduce\" />\n### reduce(arr, memo, iterator, callback)\n\n__aliases:__ inject, foldl\n\nReduces a list of values into a single value using an async iterator to return\neach successive step. Memo is the initial state of the reduction. This\nfunction only operates in series. For performance reasons, it may make sense to\nsplit a call to this function into a parallel map, then use the normal\nArray.prototype.reduce on the results. This function is for situations where\neach step in the reduction needs to be async, if you can get the data before\nreducing it then it's probably a good idea to do so.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* memo - The initial state of the reduction.\n* iterator(memo, item, callback) - A function applied to each item in the\n array to produce the next step in the reduction. The iterator is passed a\n callback(err, reduction) which accepts an optional error as its first \n argument, and the state of the reduction as the second. If an error is \n passed to the callback, the reduction is stopped and the main callback is \n immediately called with the error.\n* callback(err, result) - A callback which is called after all the iterator\n functions have finished. Result is the reduced value.\n\n__Example__\n\n```js\nasync.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n}, function(err, result){\n // result is now equal to the last value of memo, which is 6\n});\n```\n\n---------------------------------------\n\n<a name=\"reduceRight\" />\n### reduceRight(arr, memo, iterator, callback)\n\n__Alias:__ foldr\n\nSame as reduce, only operates on the items in the array in reverse order.\n\n\n---------------------------------------\n\n<a name=\"detect\" />\n### detect(arr, iterator, callback)\n\nReturns the first value in a list that passes an async truth test. The\niterator is applied in parallel, meaning the first iterator to return true will\nfire the detect callback with that result. That means the result might not be\nthe first item in the original array (in terms of order) that passes the test.\n\nIf order within the original array is important then look at detectSeries.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value undefined if none passed.\n\n__Example__\n\n```js\nasync.detect(['file1','file2','file3'], fs.exists, function(result){\n // result now equals the first file in the list that exists\n});\n```\n\n---------------------------------------\n\n<a name=\"detectSeries\" />\n### detectSeries(arr, iterator, callback)\n\nThe same as detect, only the iterator is applied to each item in the array\nin series. This means the result is always the first in the original array (in\nterms of array order) that passes the truth test.\n\n\n---------------------------------------\n\n<a name=\"sortBy\" />\n### sortBy(arr, iterator, callback)\n\nSorts a list by the results of running each value through an async iterator.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, sortValue) which must be called once it\n has completed with an error (which can be null) and a value to use as the sort\n criteria.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is the items from\n the original array sorted by the values returned by the iterator calls.\n\n__Example__\n\n```js\nasync.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n}, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n});\n```\n\n---------------------------------------\n\n<a name=\"some\" />\n### some(arr, iterator, callback)\n\n__Alias:__ any\n\nReturns true if at least one element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists. Once any iterator\ncall returns true, the main callback is immediately called.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n either true or false depending on the values of the async tests.\n\n__Example__\n\n```js\nasync.some(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then at least one of the files exists\n});\n```\n\n---------------------------------------\n\n<a name=\"every\" />\n### every(arr, iterator, callback)\n\n__Alias:__ all\n\nReturns true if every element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called after all the iterator\n functions have finished. Result will be either true or false depending on\n the values of the async tests.\n\n__Example__\n\n```js\nasync.every(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then every file exists\n});\n```\n\n---------------------------------------\n\n<a name=\"concat\" />\n### concat(arr, iterator, callback)\n\nApplies an iterator to each item in a list, concatenating the results. Returns the\nconcatenated list. The iterators are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of the arguments passed to the iterator function.\n\n__Arguments__\n\n* arr - An array to iterate over\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, results) which must be called once it \n has completed with an error (which can be null) and an array of results.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array containing\n the concatenated results of the iterator function.\n\n__Example__\n\n```js\nasync.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n});\n```\n\n---------------------------------------\n\n<a name=\"concatSeries\" />\n### concatSeries(arr, iterator, callback)\n\nSame as async.concat, but executes in series instead of parallel.\n\n\n## Control Flow\n\n<a name=\"series\" />\n### series(tasks, [callback])\n\nRun an array of functions in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run and the callback for the series is\nimmediately called with the value of the error. Once the tasks have completed,\nthe results are passed to the final callback as an array.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.series.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed\n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n }\n],\n// optional callback\nfunction(err, results){\n // results is now equal to ['one', 'two']\n});\n\n\n// an example using an object instead of an array\nasync.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equal to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n<a name=\"parallel\" />\n### parallel(tasks, [callback])\n\nRun an array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main callback is immediately called with the value of the error.\nOnce the tasks have completed, the results are passed to the final callback as an\narray.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.parallel.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n }\n],\n// optional callback\nfunction(err, results){\n // the results array will equal ['one','two'] even though\n // the second function had a shorter timeout.\n});\n\n\n// an example using an object instead of an array\nasync.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equals to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n<a name=\"parallel\" />\n### parallelLimit(tasks, limit, [callback])\n\nThe same as parallel only the tasks are executed in parallel with a maximum of \"limit\" \ntasks executing at any time.\n\nNote that the tasks are not executed in batches, so there is no guarantee that \nthe first \"limit\" tasks will complete before any others are started.\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* limit - The maximum number of tasks to run at any time.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n---------------------------------------\n\n<a name=\"whilst\" />\n### whilst(test, fn, callback)\n\nRepeatedly call fn, while test returns true. Calls the callback when stopped,\nor an error occurs.\n\n__Arguments__\n\n* test() - synchronous truth test to perform before each execution of fn.\n* fn(callback) - A function to call each time the test passes. The function is\n passed a callback(err) which must be called once it has completed with an \n optional error argument.\n* callback(err) - A callback which is called after the test fails and repeated\n execution of fn has stopped.\n\n__Example__\n\n```js\nvar count = 0;\n\nasync.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n);\n```\n\n---------------------------------------\n\n<a name=\"doWhilst\" />\n### doWhilst(fn, test, callback)\n\nThe post check version of whilst. To reflect the difference in the order of operations `test` and `fn` arguments are switched. `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.\n\n---------------------------------------\n\n<a name=\"until\" />\n### until(test, fn, callback)\n\nRepeatedly call fn, until test returns true. Calls the callback when stopped,\nor an error occurs.\n\nThe inverse of async.whilst.\n\n---------------------------------------\n\n<a name=\"doUntil\" />\n### doUntil(fn, test, callback)\n\nLike doWhilst except the test is inverted. Note the argument ordering differs from `until`.\n\n---------------------------------------\n\n<a name=\"forever\" />\n### forever(fn, callback)\n\nCalls the asynchronous function 'fn' repeatedly, in series, indefinitely.\nIf an error is passed to fn's callback then 'callback' is called with the\nerror, otherwise it will never be called.\n\n---------------------------------------\n\n<a name=\"waterfall\" />\n### waterfall(tasks, [callback])\n\nRuns an array of functions in series, each passing their results to the next in\nthe array. However, if any of the functions pass an error to the callback, the\nnext function is not executed and the main callback is immediately called with\nthe error.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a \n callback(err, result1, result2, ...) it must call on completion. The first\n argument is an error (which can be null) and any further arguments will be \n passed as arguments in order to the next task.\n* callback(err, [results]) - An optional callback to run once all the functions\n have completed. This will be passed the results of the last task's callback.\n\n\n\n__Example__\n\n```js\nasync.waterfall([\n function(callback){\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback){\n callback(null, 'three');\n },\n function(arg1, callback){\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n], function (err, result) {\n // result now equals 'done' \n});\n```\n\n---------------------------------------\n<a name=\"compose\" />\n### compose(fn1, fn2...)\n\nCreates a function which is a composition of the passed asynchronous\nfunctions. Each function consumes the return value of the function that\nfollows. Composing functions f(), g() and h() would produce the result of\nf(g(h())), only this version uses callbacks to obtain the return values.\n\nEach function is executed with the `this` binding of the composed function.\n\n__Arguments__\n\n* functions... - the asynchronous functions to compose\n\n\n__Example__\n\n```js\nfunction add1(n, callback) {\n setTimeout(function () {\n callback(null, n + 1);\n }, 10);\n}\n\nfunction mul3(n, callback) {\n setTimeout(function () {\n callback(null, n * 3);\n }, 10);\n}\n\nvar add1mul3 = async.compose(mul3, add1);\n\nadd1mul3(4, function (err, result) {\n // result now equals 15\n});\n```\n\n---------------------------------------\n<a name=\"applyEach\" />\n### applyEach(fns, args..., callback)\n\nApplies the provided arguments to each function in the array, calling the\ncallback after all functions have completed. If you only provide the first\nargument then it will return a function which lets you pass in the\narguments as if it were a single function call.\n\n__Arguments__\n\n* fns - the asynchronous functions to all call with the same arguments\n* args... - any number of separate arguments to pass to the function\n* callback - the final argument should be the callback, called when all\n functions have completed processing\n\n\n__Example__\n\n```js\nasync.applyEach([enableSearch, updateSchema], 'bucket', callback);\n\n// partial application example:\nasync.each(\n buckets,\n async.applyEach([enableSearch, updateSchema]),\n callback\n);\n```\n\n---------------------------------------\n\n<a name=\"applyEachSeries\" />\n### applyEachSeries(arr, iterator, callback)\n\nThe same as applyEach only the functions are applied in series.\n\n---------------------------------------\n\n<a name=\"queue\" />\n### queue(worker, concurrency)\n\nCreates a queue object with the specified concurrency. Tasks added to the\nqueue will be processed in parallel (up to the concurrency limit). If all\nworkers are in progress, the task is queued until one is available. Once\na worker has completed a task, the task's callback is called.\n\n__Arguments__\n\n* worker(task, callback) - An asynchronous function for processing a queued\n task, which must call its callback(err) argument when finished, with an \n optional error as an argument.\n* concurrency - An integer for determining how many worker functions should be\n run in parallel.\n\n__Queue objects__\n\nThe queue object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* concurrency - an integer for determining how many worker functions should be\n run in parallel. This property can be changed after a queue is created to\n alter the concurrency on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* unshift(task, [callback]) - add a new task to the front of the queue.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a queue object with concurrency 2\n\nvar q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n}, 2);\n\n\n// assign a callback\nq.drain = function() {\n console.log('all items have been processed');\n}\n\n// add some items to the queue\n\nq.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n});\nq.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the queue (batch-wise)\n\nq.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the front of the queue\n\nq.unshift({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n```\n\n---------------------------------------\n\n<a name=\"cargo\" />\n### cargo(worker, [payload])\n\nCreates a cargo object with the specified payload. Tasks added to the\ncargo will be processed altogether (up to the payload limit). If the\nworker is in progress, the task is queued until it is available. Once\nthe worker has completed some tasks, each callback of those tasks is called.\n\n__Arguments__\n\n* worker(tasks, callback) - An asynchronous function for processing an array of\n queued tasks, which must call its callback(err) argument when finished, with \n an optional error as an argument.\n* payload - An optional integer for determining how many tasks should be\n processed per round; if omitted, the default is unlimited.\n\n__Cargo objects__\n\nThe cargo object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* payload - an integer for determining how many tasks should be\n process per round. This property can be changed after a cargo is created to\n alter the payload on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a cargo object with payload 2\n\nvar cargo = async.cargo(function (tasks, callback) {\n for(var i=0; i<tasks.length; i++){\n console.log('hello ' + tasks[i].name);\n }\n callback();\n}, 2);\n\n\n// add some items\n\ncargo.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n});\ncargo.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\ncargo.push({name: 'baz'}, function (err) {\n console.log('finished processing baz');\n});\n```\n\n---------------------------------------\n\n<a name=\"auto\" />\n### auto(tasks, [callback])\n\nDetermines the best order for running functions based on their requirements.\nEach function can optionally depend on other functions being completed first,\nand each function is run as soon as its requirements are satisfied. If any of\nthe functions pass an error to their callback, that function will not complete\n(so any other functions depending on it will not run) and the main callback\nwill be called immediately with the error. Functions also receive an object\ncontaining the results of functions which have completed so far.\n\nNote, all functions are called with a results object as a second argument, \nso it is unsafe to pass functions in the tasks object which cannot handle the\nextra argument. For example, this snippet of code:\n\n```js\nasync.auto({\n readData: async.apply(fs.readFile, 'data.txt', 'utf-8')\n}, callback);\n```\n\nwill have the effect of calling readFile with the results object as the last\nargument, which will fail:\n\n```js\nfs.readFile('data.txt', 'utf-8', cb, {});\n```\n\nInstead, wrap the call to readFile in a function which does not forward the \nresults object:\n\n```js\nasync.auto({\n readData: function(cb, results){\n fs.readFile('data.txt', 'utf-8', cb);\n }\n}, callback);\n```\n\n__Arguments__\n\n* tasks - An object literal containing named functions or an array of\n requirements, with the function itself the last item in the array. The key\n used for each function or array is used when specifying requirements. The \n function receives two arguments: (1) a callback(err, result) which must be \n called when finished, passing an error (which can be null) and the result of \n the function's execution, and (2) a results object, containing the results of\n the previously executed functions.\n* callback(err, results) - An optional callback which is called when all the\n tasks have been completed. The callback will receive an error as an argument\n if any tasks pass an error to their callback. Results will always be passed\n\tbut if an error occurred, no other tasks will be performed, and the results\n\tobject will only contain partial results.\n \n\n__Example__\n\n```js\nasync.auto({\n get_data: function(callback){\n // async code to get some data\n },\n make_folder: function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n },\n write_file: ['get_data', 'make_folder', function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, filename);\n }],\n email_link: ['write_file', function(callback, results){\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n }]\n});\n```\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n```js\nasync.parallel([\n function(callback){\n // async code to get some data\n },\n function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n }\n],\nfunction(err, results){\n async.series([\n function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n },\n function(callback){\n // once the file is written let's email a link to it...\n }\n ]);\n});\n```\n\nFor a complicated series of async tasks using the auto function makes adding\nnew tasks much easier and makes the code more readable.\n\n\n---------------------------------------\n\n<a name=\"iterator\" />\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the array,\nreturning a continuation to call the next one after that. It's also possible to\n'peek' the next iterator by doing iterator.next().\n\nThis function is used internally by the async module but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* tasks - An array of functions to run.\n\n__Example__\n\n```js\nvar iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n]);\n\nnode> var iterator2 = iterator();\n'one'\nnode> var iterator3 = iterator2();\n'two'\nnode> iterator3();\n'three'\nnode> var nextfn = iterator2.next();\nnode> nextfn();\n'three'\n```\n\n---------------------------------------\n\n<a name=\"apply\" />\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied, a useful\nshorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n```js\n// using apply\n\nasync.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n]);\n\n\n// the same process without using apply\n\nasync.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n }\n]);\n```\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n```js\nnode> var fn = async.apply(sys.puts, 'one');\nnode> fn('two', 'three');\none\ntwo\nthree\n```\n\n---------------------------------------\n\n<a name=\"nextTick\" />\n### nextTick(callback)\n\nCalls the callback on a later loop around the event loop. In node.js this just\ncalls process.nextTick, in the browser it falls back to setImmediate(callback)\nif available, otherwise setTimeout(callback, 0), which means other higher priority\nevents may precede the execution of the callback.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* callback - The function to call on a later loop around the event loop.\n\n__Example__\n\n```js\nvar call_order = [];\nasync.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two']\n});\ncall_order.push('one')\n```\n\n<a name=\"times\" />\n### times(n, callback)\n\nCalls the callback n times and accumulates results in the same manner\nyou would use with async.map.\n\n__Arguments__\n\n* n - The number of times to run the function.\n* callback - The function to call n times.\n\n__Example__\n\n```js\n// Pretend this is some complicated async factory\nvar createUser = function(id, callback) {\n callback(null, {\n id: 'user' + id\n })\n}\n// generate 5 users\nasync.times(5, function(n, next){\n createUser(n, function(err, user) {\n next(err, user)\n })\n}, function(err, users) {\n // we should now have 5 users\n});\n```\n\n<a name=\"timesSeries\" />\n### timesSeries(n, callback)\n\nThe same as times only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n## Utils\n\n<a name=\"memoize\" />\n### memoize(fn, [hasher])\n\nCaches the results of an async function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\nThe cache of results is exposed as the `memo` property of the function returned\nby `memoize`.\n\n__Arguments__\n\n* fn - the function you to proxy and cache results from.\n* hasher - an optional function for generating a custom hash for storing\n results, it has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n```js\nvar slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n};\nvar fn = async.memoize(slow_fn);\n\n// fn can now be used as if it were slow_fn\nfn('some name', function () {\n // callback\n});\n```\n\n<a name=\"unmemoize\" />\n### unmemoize(fn)\n\nUndoes a memoized function, reverting it to the original, unmemoized\nform. Comes handy in tests.\n\n__Arguments__\n\n* fn - the memoized function\n\n<a name=\"log\" />\n### log(function, arguments)\n\nLogs the result of an async function to the console. Only works in node.js or\nin browsers that support console.log and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.log is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n};\n```\n```js\nnode> async.log(hello, 'world');\n'hello world'\n```\n\n---------------------------------------\n\n<a name=\"dir\" />\n### dir(function, arguments)\n\nLogs the result of an async function to the console using console.dir to\ndisplay the properties of the resulting object. Only works in node.js or\nin browsers that support console.dir and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.dir is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n};\n```\n```js\nnode> async.dir(hello, 'world');\n{hello: 'world'}\n```\n\n---------------------------------------\n\n<a name=\"noConflict\" />\n### noConflict()\n\nChanges the value of async back to its original value, returning a reference to the\nasync object.\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/caolan/async", - "_id": "async@0.2.10", - "dist": { - "shasum": "a06e6818541aa1851d6ac822c8dbbfd6206eb72f" - }, - "_from": "async@~0.2.9", - "_resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/.npmignore deleted file mode 100644 index aba34f01..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -*.un~ -/node_modules -/test/tmp diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/License b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/License deleted file mode 100644 index 4804b7ab..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/License +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 Debuggable Limited <felix@debuggable.com> - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/Makefile deleted file mode 100644 index b4ff85a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -SHELL := /bin/bash - -test: - @./test/run.js - -.PHONY: test - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md deleted file mode 100644 index 1a9999eb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md +++ /dev/null @@ -1,132 +0,0 @@ -# combined-stream - -A stream that emits multiple other streams one after another. - -## Installation - -``` bash -npm install combined-stream -``` - -## Usage - -Here is a simple example that shows how you can use combined-stream to combine -two files into one: - -``` javascript -var CombinedStream = require('combined-stream'); -var fs = require('fs'); - -var combinedStream = CombinedStream.create(); -combinedStream.append(fs.createReadStream('file1.txt')); -combinedStream.append(fs.createReadStream('file2.txt')); - -combinedStream.pipe(fs.createWriteStream('combined.txt')); -``` - -While the example above works great, it will pause all source streams until -they are needed. If you don't want that to happen, you can set `pauseStreams` -to `false`: - -``` javascript -var CombinedStream = require('combined-stream'); -var fs = require('fs'); - -var combinedStream = CombinedStream.create({pauseStreams: false}); -combinedStream.append(fs.createReadStream('file1.txt')); -combinedStream.append(fs.createReadStream('file2.txt')); - -combinedStream.pipe(fs.createWriteStream('combined.txt')); -``` - -However, what if you don't have all the source streams yet, or you don't want -to allocate the resources (file descriptors, memory, etc.) for them right away? -Well, in that case you can simply provide a callback that supplies the stream -by calling a `next()` function: - -``` javascript -var CombinedStream = require('combined-stream'); -var fs = require('fs'); - -var combinedStream = CombinedStream.create(); -combinedStream.append(function(next) { - next(fs.createReadStream('file1.txt')); -}); -combinedStream.append(function(next) { - next(fs.createReadStream('file2.txt')); -}); - -combinedStream.pipe(fs.createWriteStream('combined.txt')); -``` - -## API - -### CombinedStream.create([options]) - -Returns a new combined stream object. Available options are: - -* `maxDataSize` -* `pauseStreams` - -The effect of those options is described below. - -### combinedStream.pauseStreams = true - -Whether to apply back pressure to the underlaying streams. If set to `false`, -the underlaying streams will never be paused. If set to `true`, the -underlaying streams will be paused right after being appended, as well as when -`delayedStream.pipe()` wants to throttle. - -### combinedStream.maxDataSize = 2 * 1024 * 1024 - -The maximum amount of bytes (or characters) to buffer for all source streams. -If this value is exceeded, `combinedStream` emits an `'error'` event. - -### combinedStream.dataSize = 0 - -The amount of bytes (or characters) currently buffered by `combinedStream`. - -### combinedStream.append(stream) - -Appends the given `stream` to the combinedStream object. If `pauseStreams` is -set to `true, this stream will also be paused right away. - -`streams` can also be a function that takes one parameter called `next`. `next` -is a function that must be invoked in order to provide the `next` stream, see -example above. - -Regardless of how the `stream` is appended, combined-stream always attaches an -`'error'` listener to it, so you don't have to do that manually. - -Special case: `stream` can also be a String or Buffer. - -### combinedStream.write(data) - -You should not call this, `combinedStream` takes care of piping the appended -streams into itself for you. - -### combinedStream.resume() - -Causes `combinedStream` to start drain the streams it manages. The function is -idempotent, and also emits a `'resume'` event each time which usually goes to -the stream that is currently being drained. - -### combinedStream.pause(); - -If `combinedStream.pauseStreams` is set to `false`, this does nothing. -Otherwise a `'pause'` event is emitted, this goes to the stream that is -currently being drained, so you can use it to apply back pressure. - -### combinedStream.end(); - -Sets `combinedStream.writable` to false, emits an `'end'` event, and removes -all streams from the queue. - -### combinedStream.destroy(); - -Same as `combinedStream.end()`, except it emits a `'close'` event instead of -`'end'`. - -## License - -combined-stream is licensed under the MIT license. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js deleted file mode 100644 index 32849fd1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js +++ /dev/null @@ -1,185 +0,0 @@ -var util = require('util'); -var Stream = require('stream').Stream; -var DelayedStream = require('delayed-stream'); - -module.exports = CombinedStream; -function CombinedStream() { - this.writable = false; - this.readable = true; - this.dataSize = 0; - this.maxDataSize = 2 * 1024 * 1024; - this.pauseStreams = true; - - this._released = false; - this._streams = []; - this._currentStream = null; -} -util.inherits(CombinedStream, Stream); - -CombinedStream.create = function(options) { - var combinedStream = new this(); - - options = options || {}; - for (var option in options) { - combinedStream[option] = options[option]; - } - - return combinedStream; -}; - -CombinedStream.isStreamLike = function(stream) { - return (typeof stream !== 'function') - && (typeof stream !== 'string') - && (typeof stream !== 'boolean') - && (typeof stream !== 'number') - && (!Buffer.isBuffer(stream)); -}; - -CombinedStream.prototype.append = function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); - - if (isStreamLike) { - if (!(stream instanceof DelayedStream)) { - stream.on('data', this._checkDataSize.bind(this)); - - stream = DelayedStream.create(stream, { - maxDataSize: Infinity, - pauseStream: this.pauseStreams, - }); - } - - this._handleErrors(stream); - - if (this.pauseStreams) { - stream.pause(); - } - } - - this._streams.push(stream); - return this; -}; - -CombinedStream.prototype.pipe = function(dest, options) { - Stream.prototype.pipe.call(this, dest, options); - this.resume(); -}; - -CombinedStream.prototype._getNext = function() { - this._currentStream = null; - var stream = this._streams.shift(); - - - if (typeof stream == 'undefined') { - this.end(); - return; - } - - if (typeof stream !== 'function') { - this._pipeNext(stream); - return; - } - - var getStream = stream; - getStream(function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('data', this._checkDataSize.bind(this)); - this._handleErrors(stream); - } - - this._pipeNext(stream); - }.bind(this)); -}; - -CombinedStream.prototype._pipeNext = function(stream) { - this._currentStream = stream; - - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('end', this._getNext.bind(this)) - stream.pipe(this, {end: false}); - return; - } - - var value = stream; - this.write(value); - this._getNext(); -}; - -CombinedStream.prototype._handleErrors = function(stream) { - var self = this; - stream.on('error', function(err) { - self._emitError(err); - }); -}; - -CombinedStream.prototype.write = function(data) { - this.emit('data', data); -}; - -CombinedStream.prototype.pause = function() { - if (!this.pauseStreams) { - return; - } - - this.emit('pause'); -}; - -CombinedStream.prototype.resume = function() { - if (!this._released) { - this._released = true; - this.writable = true; - this._getNext(); - } - - this.emit('resume'); -}; - -CombinedStream.prototype.end = function() { - this._reset(); - this.emit('end'); -}; - -CombinedStream.prototype.destroy = function() { - this._reset(); - this.emit('close'); -}; - -CombinedStream.prototype._reset = function() { - this.writable = false; - this._streams = []; - this._currentStream = null; -}; - -CombinedStream.prototype._checkDataSize = function() { - this._updateDataSize(); - if (this.dataSize <= this.maxDataSize) { - return; - } - - var message = - 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.' - this._emitError(new Error(message)); -}; - -CombinedStream.prototype._updateDataSize = function() { - this.dataSize = 0; - - var self = this; - this._streams.forEach(function(stream) { - if (!stream.dataSize) { - return; - } - - self.dataSize += stream.dataSize; - }); - - if (this._currentStream && this._currentStream.dataSize) { - this.dataSize += this._currentStream.dataSize; - } -}; - -CombinedStream.prototype._emitError = function(err) { - this._reset(); - this.emit('error', err); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/.npmignore deleted file mode 100644 index 2fedb26c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -*.un~ -/node_modules/* diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License deleted file mode 100644 index 4804b7ab..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 Debuggable Limited <felix@debuggable.com> - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile deleted file mode 100644 index b4ff85a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -SHELL := /bin/bash - -test: - @./test/run.js - -.PHONY: test - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md deleted file mode 100644 index 5cb5b35e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md +++ /dev/null @@ -1,154 +0,0 @@ -# delayed-stream - -Buffers events from a stream until you are ready to handle them. - -## Installation - -``` bash -npm install delayed-stream -``` - -## Usage - -The following example shows how to write a http echo server that delays its -response by 1000 ms. - -``` javascript -var DelayedStream = require('delayed-stream'); -var http = require('http'); - -http.createServer(function(req, res) { - var delayed = DelayedStream.create(req); - - setTimeout(function() { - res.writeHead(200); - delayed.pipe(res); - }, 1000); -}); -``` - -If you are not using `Stream#pipe`, you can also manually release the buffered -events by calling `delayedStream.resume()`: - -``` javascript -var delayed = DelayedStream.create(req); - -setTimeout(function() { - // Emit all buffered events and resume underlaying source - delayed.resume(); -}, 1000); -``` - -## Implementation - -In order to use this meta stream properly, here are a few things you should -know about the implementation. - -### Event Buffering / Proxying - -All events of the `source` stream are hijacked by overwriting the `source.emit` -method. Until node implements a catch-all event listener, this is the only way. - -However, delayed-stream still continues to emit all events it captures on the -`source`, regardless of whether you have released the delayed stream yet or -not. - -Upon creation, delayed-stream captures all `source` events and stores them in -an internal event buffer. Once `delayedStream.release()` is called, all -buffered events are emitted on the `delayedStream`, and the event buffer is -cleared. After that, delayed-stream merely acts as a proxy for the underlaying -source. - -### Error handling - -Error events on `source` are buffered / proxied just like any other events. -However, `delayedStream.create` attaches a no-op `'error'` listener to the -`source`. This way you only have to handle errors on the `delayedStream` -object, rather than in two places. - -### Buffer limits - -delayed-stream provides a `maxDataSize` property that can be used to limit -the amount of data being buffered. In order to protect you from bad `source` -streams that don't react to `source.pause()`, this feature is enabled by -default. - -## API - -### DelayedStream.create(source, [options]) - -Returns a new `delayedStream`. Available options are: - -* `pauseStream` -* `maxDataSize` - -The description for those properties can be found below. - -### delayedStream.source - -The `source` stream managed by this object. This is useful if you are -passing your `delayedStream` around, and you still want to access properties -on the `source` object. - -### delayedStream.pauseStream = true - -Whether to pause the underlaying `source` when calling -`DelayedStream.create()`. Modifying this property afterwards has no effect. - -### delayedStream.maxDataSize = 1024 * 1024 - -The amount of data to buffer before emitting an `error`. - -If the underlaying source is emitting `Buffer` objects, the `maxDataSize` -refers to bytes. - -If the underlaying source is emitting JavaScript strings, the size refers to -characters. - -If you know what you are doing, you can set this property to `Infinity` to -disable this feature. You can also modify this property during runtime. - -### delayedStream.maxDataSize = 1024 * 1024 - -The amount of data to buffer before emitting an `error`. - -If the underlaying source is emitting `Buffer` objects, the `maxDataSize` -refers to bytes. - -If the underlaying source is emitting JavaScript strings, the size refers to -characters. - -If you know what you are doing, you can set this property to `Infinity` to -disable this feature. - -### delayedStream.dataSize = 0 - -The amount of data buffered so far. - -### delayedStream.readable - -An ECMA5 getter that returns the value of `source.readable`. - -### delayedStream.resume() - -If the `delayedStream` has not been released so far, `delayedStream.release()` -is called. - -In either case, `source.resume()` is called. - -### delayedStream.pause() - -Calls `source.pause()`. - -### delayedStream.pipe(dest) - -Calls `delayedStream.resume()` and then proxies the arguments to `source.pipe`. - -### delayedStream.release() - -Emits and clears all events that have been buffered up so far. This does not -resume the underlaying source, use `delayedStream.resume()` instead. - -## License - -delayed-stream is licensed under the MIT license. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js deleted file mode 100644 index 7c10d482..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js +++ /dev/null @@ -1,99 +0,0 @@ -var Stream = require('stream').Stream; -var util = require('util'); - -module.exports = DelayedStream; -function DelayedStream() { - this.source = null; - this.dataSize = 0; - this.maxDataSize = 1024 * 1024; - this.pauseStream = true; - - this._maxDataSizeExceeded = false; - this._released = false; - this._bufferedEvents = []; -} -util.inherits(DelayedStream, Stream); - -DelayedStream.create = function(source, options) { - var delayedStream = new this(); - - options = options || {}; - for (var option in options) { - delayedStream[option] = options[option]; - } - - delayedStream.source = source; - - var realEmit = source.emit; - source.emit = function() { - delayedStream._handleEmit(arguments); - return realEmit.apply(source, arguments); - }; - - source.on('error', function() {}); - if (delayedStream.pauseStream) { - source.pause(); - } - - return delayedStream; -}; - -DelayedStream.prototype.__defineGetter__('readable', function() { - return this.source.readable; -}); - -DelayedStream.prototype.resume = function() { - if (!this._released) { - this.release(); - } - - this.source.resume(); -}; - -DelayedStream.prototype.pause = function() { - this.source.pause(); -}; - -DelayedStream.prototype.release = function() { - this._released = true; - - this._bufferedEvents.forEach(function(args) { - this.emit.apply(this, args); - }.bind(this)); - this._bufferedEvents = []; -}; - -DelayedStream.prototype.pipe = function() { - var r = Stream.prototype.pipe.apply(this, arguments); - this.resume(); - return r; -}; - -DelayedStream.prototype._handleEmit = function(args) { - if (this._released) { - this.emit.apply(this, args); - return; - } - - if (args[0] === 'data') { - this.dataSize += args[1].length; - this._checkIfMaxDataSizeExceeded(); - } - - this._bufferedEvents.push(args); -}; - -DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { - if (this._maxDataSizeExceeded) { - return; - } - - if (this.dataSize <= this.maxDataSize) { - return; - } - - this._maxDataSizeExceeded = true; - var message = - 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.' - this.emit('error', new Error(message)); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json deleted file mode 100644 index 2ba5526d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "author": { - "name": "Felix Geisendörfer", - "email": "felix@debuggable.com", - "url": "http://debuggable.com/" - }, - "name": "delayed-stream", - "description": "Buffers events from a stream until you are ready to handle them.", - "version": "0.0.5", - "homepage": "https://github.com/felixge/node-delayed-stream", - "repository": { - "type": "git", - "url": "git://github.com/felixge/node-delayed-stream.git" - }, - "main": "./lib/delayed_stream", - "engines": { - "node": ">=0.4.0" - }, - "dependencies": {}, - "devDependencies": { - "fake": "0.2.0", - "far": "0.0.1" - }, - "readme": "# delayed-stream\n\nBuffers events from a stream until you are ready to handle them.\n\n## Installation\n\n``` bash\nnpm install delayed-stream\n```\n\n## Usage\n\nThe following example shows how to write a http echo server that delays its\nresponse by 1000 ms.\n\n``` javascript\nvar DelayedStream = require('delayed-stream');\nvar http = require('http');\n\nhttp.createServer(function(req, res) {\n var delayed = DelayedStream.create(req);\n\n setTimeout(function() {\n res.writeHead(200);\n delayed.pipe(res);\n }, 1000);\n});\n```\n\nIf you are not using `Stream#pipe`, you can also manually release the buffered\nevents by calling `delayedStream.resume()`:\n\n``` javascript\nvar delayed = DelayedStream.create(req);\n\nsetTimeout(function() {\n // Emit all buffered events and resume underlaying source\n delayed.resume();\n}, 1000);\n```\n\n## Implementation\n\nIn order to use this meta stream properly, here are a few things you should\nknow about the implementation.\n\n### Event Buffering / Proxying\n\nAll events of the `source` stream are hijacked by overwriting the `source.emit`\nmethod. Until node implements a catch-all event listener, this is the only way.\n\nHowever, delayed-stream still continues to emit all events it captures on the\n`source`, regardless of whether you have released the delayed stream yet or\nnot.\n\nUpon creation, delayed-stream captures all `source` events and stores them in\nan internal event buffer. Once `delayedStream.release()` is called, all\nbuffered events are emitted on the `delayedStream`, and the event buffer is\ncleared. After that, delayed-stream merely acts as a proxy for the underlaying\nsource.\n\n### Error handling\n\nError events on `source` are buffered / proxied just like any other events.\nHowever, `delayedStream.create` attaches a no-op `'error'` listener to the\n`source`. This way you only have to handle errors on the `delayedStream`\nobject, rather than in two places.\n\n### Buffer limits\n\ndelayed-stream provides a `maxDataSize` property that can be used to limit\nthe amount of data being buffered. In order to protect you from bad `source`\nstreams that don't react to `source.pause()`, this feature is enabled by\ndefault.\n\n## API\n\n### DelayedStream.create(source, [options])\n\nReturns a new `delayedStream`. Available options are:\n\n* `pauseStream`\n* `maxDataSize`\n\nThe description for those properties can be found below.\n\n### delayedStream.source\n\nThe `source` stream managed by this object. This is useful if you are\npassing your `delayedStream` around, and you still want to access properties\non the `source` object.\n\n### delayedStream.pauseStream = true\n\nWhether to pause the underlaying `source` when calling\n`DelayedStream.create()`. Modifying this property afterwards has no effect.\n\n### delayedStream.maxDataSize = 1024 * 1024\n\nThe amount of data to buffer before emitting an `error`.\n\nIf the underlaying source is emitting `Buffer` objects, the `maxDataSize`\nrefers to bytes.\n\nIf the underlaying source is emitting JavaScript strings, the size refers to\ncharacters.\n\nIf you know what you are doing, you can set this property to `Infinity` to\ndisable this feature. You can also modify this property during runtime.\n\n### delayedStream.maxDataSize = 1024 * 1024\n\nThe amount of data to buffer before emitting an `error`.\n\nIf the underlaying source is emitting `Buffer` objects, the `maxDataSize`\nrefers to bytes.\n\nIf the underlaying source is emitting JavaScript strings, the size refers to\ncharacters.\n\nIf you know what you are doing, you can set this property to `Infinity` to\ndisable this feature.\n\n### delayedStream.dataSize = 0\n\nThe amount of data buffered so far.\n\n### delayedStream.readable\n\nAn ECMA5 getter that returns the value of `source.readable`.\n\n### delayedStream.resume()\n\nIf the `delayedStream` has not been released so far, `delayedStream.release()`\nis called.\n\nIn either case, `source.resume()` is called.\n\n### delayedStream.pause()\n\nCalls `source.pause()`.\n\n### delayedStream.pipe(dest)\n\nCalls `delayedStream.resume()` and then proxies the arguments to `source.pipe`.\n\n### delayedStream.release()\n\nEmits and clears all events that have been buffered up so far. This does not\nresume the underlaying source, use `delayedStream.resume()` instead.\n\n## License\n\ndelayed-stream is licensed under the MIT license.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/felixge/node-delayed-stream/issues" - }, - "_id": "delayed-stream@0.0.5", - "dist": { - "shasum": "66839603c076296710bcc7f2e84ebd3348ae6343" - }, - "_from": "delayed-stream@0.0.5", - "_resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/common.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/common.js deleted file mode 100644 index 4d71b8a6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/common.js +++ /dev/null @@ -1,6 +0,0 @@ -var common = module.exports; - -common.DelayedStream = require('..'); -common.assert = require('assert'); -common.fake = require('fake'); -common.PORT = 49252; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js deleted file mode 100644 index 9ecad5b8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js +++ /dev/null @@ -1,38 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var DelayedStream = common.DelayedStream; -var http = require('http'); - -var UPLOAD = new Buffer(10 * 1024 * 1024); - -var server = http.createServer(function(req, res) { - var delayed = DelayedStream.create(req, {maxDataSize: UPLOAD.length}); - - setTimeout(function() { - res.writeHead(200); - delayed.pipe(res); - }, 10); -}); -server.listen(common.PORT, function() { - var request = http.request({ - method: 'POST', - port: common.PORT, - }); - - request.write(UPLOAD); - request.end(); - - request.on('response', function(res) { - var received = 0; - res - .on('data', function(chunk) { - received += chunk.length; - }) - .on('end', function() { - assert.equal(received, UPLOAD.length); - server.close(); - }); - }); -}); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js deleted file mode 100644 index 6f417f3e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js +++ /dev/null @@ -1,21 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var fake = common.fake.create(); -var DelayedStream = common.DelayedStream; -var Stream = require('stream').Stream; - -(function testAutoPause() { - var source = new Stream(); - - fake.expect(source, 'pause', 1); - var delayedStream = DelayedStream.create(source); - fake.verify(); -})(); - -(function testDisableAutoPause() { - var source = new Stream(); - fake.expect(source, 'pause', 0); - - var delayedStream = DelayedStream.create(source, {pauseStream: false}); - fake.verify(); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js deleted file mode 100644 index b50c3978..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js +++ /dev/null @@ -1,14 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var fake = common.fake.create(); -var DelayedStream = common.DelayedStream; -var Stream = require('stream').Stream; - -(function testDelayEventsUntilResume() { - var source = new Stream(); - var delayedStream = DelayedStream.create(source, {pauseStream: false}); - - fake.expect(source, 'pause'); - delayedStream.pause(); - fake.verify(); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream.js deleted file mode 100644 index fc4047e0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream.js +++ /dev/null @@ -1,48 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var fake = common.fake.create(); -var DelayedStream = common.DelayedStream; -var Stream = require('stream').Stream; - -(function testDelayEventsUntilResume() { - var source = new Stream(); - var delayedStream = DelayedStream.create(source, {pauseStream: false}); - - // delayedStream must not emit until we resume - fake.expect(delayedStream, 'emit', 0); - - // but our original source must emit - var params = []; - source.on('foo', function(param) { - params.push(param); - }); - - source.emit('foo', 1); - source.emit('foo', 2); - - // Make sure delayedStream did not emit, and source did - assert.deepEqual(params, [1, 2]); - fake.verify(); - - // After resume, delayedStream must playback all events - fake - .stub(delayedStream, 'emit') - .times(Infinity) - .withArg(1, 'newListener'); - fake.expect(delayedStream, 'emit', ['foo', 1]); - fake.expect(delayedStream, 'emit', ['foo', 2]); - fake.expect(source, 'resume'); - - delayedStream.resume(); - fake.verify(); - - // Calling resume again will delegate to source - fake.expect(source, 'resume'); - delayedStream.resume(); - fake.verify(); - - // Emitting more events directly leads to them being emitted - fake.expect(delayedStream, 'emit', ['foo', 3]); - source.emit('foo', 3); - fake.verify(); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-handle-source-errors.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-handle-source-errors.js deleted file mode 100644 index a9d35e72..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-handle-source-errors.js +++ /dev/null @@ -1,15 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var fake = common.fake.create(); -var DelayedStream = common.DelayedStream; -var Stream = require('stream').Stream; - -(function testHandleSourceErrors() { - var source = new Stream(); - var delayedStream = DelayedStream.create(source, {pauseStream: false}); - - // We deal with this by attaching a no-op listener to 'error' on the source - // when creating a new DelayedStream. This way error events on the source - // won't throw. - source.emit('error', new Error('something went wrong')); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-max-data-size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-max-data-size.js deleted file mode 100644 index 7638a2bf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-max-data-size.js +++ /dev/null @@ -1,18 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var fake = common.fake.create(); -var DelayedStream = common.DelayedStream; -var Stream = require('stream').Stream; - -(function testMaxDataSize() { - var source = new Stream(); - var delayedStream = DelayedStream.create(source, {maxDataSize: 1024, pauseStream: false}); - - source.emit('data', new Buffer(1024)); - - fake - .expect(delayedStream, 'emit') - .withArg(1, 'error'); - source.emit('data', new Buffer(1)); - fake.verify(); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-pipe-resumes.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-pipe-resumes.js deleted file mode 100644 index 7d312ab1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-pipe-resumes.js +++ /dev/null @@ -1,13 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var fake = common.fake.create(); -var DelayedStream = common.DelayedStream; -var Stream = require('stream').Stream; - -(function testPipeReleases() { - var source = new Stream(); - var delayedStream = DelayedStream.create(source, {pauseStream: false}); - - fake.expect(delayedStream, 'resume'); - delayedStream.pipe(new Stream()); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-proxy-readable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-proxy-readable.js deleted file mode 100644 index d436163b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-proxy-readable.js +++ /dev/null @@ -1,13 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var fake = common.fake.create(); -var DelayedStream = common.DelayedStream; -var Stream = require('stream').Stream; - -(function testProxyReadableProperty() { - var source = new Stream(); - var delayedStream = DelayedStream.create(source, {pauseStream: false}); - - source.readable = fake.value('source.readable'); - assert.strictEqual(delayedStream.readable, source.readable); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js deleted file mode 100755 index 0bb8e822..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -var far = require('far').create(); - -far.add(__dirname); -far.include(/test-.*\.js$/); - -far.execute(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json deleted file mode 100644 index ecc71ada..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": { - "name": "Felix Geisendörfer", - "email": "felix@debuggable.com", - "url": "http://debuggable.com/" - }, - "name": "combined-stream", - "description": "A stream that emits multiple other streams one after another.", - "version": "0.0.4", - "homepage": "https://github.com/felixge/node-combined-stream", - "repository": { - "type": "git", - "url": "git://github.com/felixge/node-combined-stream.git" - }, - "main": "./lib/combined_stream", - "engines": { - "node": "*" - }, - "dependencies": { - "delayed-stream": "0.0.5" - }, - "devDependencies": { - "far": "0.0.1" - }, - "readme": "# combined-stream\n\nA stream that emits multiple other streams one after another.\n\n## Installation\n\n``` bash\nnpm install combined-stream\n```\n\n## Usage\n\nHere is a simple example that shows how you can use combined-stream to combine\ntwo files into one:\n\n``` javascript\nvar CombinedStream = require('combined-stream');\nvar fs = require('fs');\n\nvar combinedStream = CombinedStream.create();\ncombinedStream.append(fs.createReadStream('file1.txt'));\ncombinedStream.append(fs.createReadStream('file2.txt'));\n\ncombinedStream.pipe(fs.createWriteStream('combined.txt'));\n```\n\nWhile the example above works great, it will pause all source streams until\nthey are needed. If you don't want that to happen, you can set `pauseStreams`\nto `false`:\n\n``` javascript\nvar CombinedStream = require('combined-stream');\nvar fs = require('fs');\n\nvar combinedStream = CombinedStream.create({pauseStreams: false});\ncombinedStream.append(fs.createReadStream('file1.txt'));\ncombinedStream.append(fs.createReadStream('file2.txt'));\n\ncombinedStream.pipe(fs.createWriteStream('combined.txt'));\n```\n\nHowever, what if you don't have all the source streams yet, or you don't want\nto allocate the resources (file descriptors, memory, etc.) for them right away?\nWell, in that case you can simply provide a callback that supplies the stream\nby calling a `next()` function:\n\n``` javascript\nvar CombinedStream = require('combined-stream');\nvar fs = require('fs');\n\nvar combinedStream = CombinedStream.create();\ncombinedStream.append(function(next) {\n next(fs.createReadStream('file1.txt'));\n});\ncombinedStream.append(function(next) {\n next(fs.createReadStream('file2.txt'));\n});\n\ncombinedStream.pipe(fs.createWriteStream('combined.txt'));\n```\n\n## API\n\n### CombinedStream.create([options])\n\nReturns a new combined stream object. Available options are:\n\n* `maxDataSize`\n* `pauseStreams`\n\nThe effect of those options is described below.\n\n### combinedStream.pauseStreams = true\n\nWhether to apply back pressure to the underlaying streams. If set to `false`,\nthe underlaying streams will never be paused. If set to `true`, the\nunderlaying streams will be paused right after being appended, as well as when\n`delayedStream.pipe()` wants to throttle.\n\n### combinedStream.maxDataSize = 2 * 1024 * 1024\n\nThe maximum amount of bytes (or characters) to buffer for all source streams.\nIf this value is exceeded, `combinedStream` emits an `'error'` event.\n\n### combinedStream.dataSize = 0\n\nThe amount of bytes (or characters) currently buffered by `combinedStream`.\n\n### combinedStream.append(stream)\n\nAppends the given `stream` to the combinedStream object. If `pauseStreams` is\nset to `true, this stream will also be paused right away.\n\n`streams` can also be a function that takes one parameter called `next`. `next`\nis a function that must be invoked in order to provide the `next` stream, see\nexample above.\n\nRegardless of how the `stream` is appended, combined-stream always attaches an\n`'error'` listener to it, so you don't have to do that manually.\n\nSpecial case: `stream` can also be a String or Buffer.\n\n### combinedStream.write(data)\n\nYou should not call this, `combinedStream` takes care of piping the appended\nstreams into itself for you.\n\n### combinedStream.resume()\n\nCauses `combinedStream` to start drain the streams it manages. The function is\nidempotent, and also emits a `'resume'` event each time which usually goes to\nthe stream that is currently being drained.\n\n### combinedStream.pause();\n\nIf `combinedStream.pauseStreams` is set to `false`, this does nothing.\nOtherwise a `'pause'` event is emitted, this goes to the stream that is\ncurrently being drained, so you can use it to apply back pressure.\n\n### combinedStream.end();\n\nSets `combinedStream.writable` to false, emits an `'end'` event, and removes\nall streams from the queue.\n\n### combinedStream.destroy();\n\nSame as `combinedStream.end()`, except it emits a `'close'` event instead of\n`'end'`.\n\n## License\n\ncombined-stream is licensed under the MIT license.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/felixge/node-combined-stream/issues" - }, - "_id": "combined-stream@0.0.4", - "dist": { - "shasum": "6562a96c9e6862c7a1349ac563047313599d0e86" - }, - "_from": "combined-stream@~0.0.4", - "_resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.4.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/common.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/common.js deleted file mode 100644 index 81543485..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/common.js +++ /dev/null @@ -1,23 +0,0 @@ -var common = module.exports; - -var path = require('path'); -var fs = require('fs'); -var root = path.join(__dirname, '..'); - -common.dir = { - fixture: root + '/test/fixture', - tmp: root + '/test/tmp', -}; - -// Create tmp directory if it does not exist -// Not using fs.exists so as to be node 0.6.x compatible -try { - fs.statSync(common.dir.tmp); -} -catch (e) { - // Dir does not exist - fs.mkdirSync(common.dir.tmp); -} - -common.CombinedStream = require(root); -common.assert = require('assert'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file1.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file1.txt deleted file mode 100644 index 50e0218d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file1.txt +++ /dev/null @@ -1,256 +0,0 @@ -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file2.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file2.txt deleted file mode 100644 index da1d821f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file2.txt +++ /dev/null @@ -1,256 +0,0 @@ -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-callback-streams.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-callback-streams.js deleted file mode 100644 index 44ecabab..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-callback-streams.js +++ /dev/null @@ -1,27 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var fs = require('fs'); - -var FILE1 = common.dir.fixture + '/file1.txt'; -var FILE2 = common.dir.fixture + '/file2.txt'; -var EXPECTED = fs.readFileSync(FILE1) + fs.readFileSync(FILE2); - -(function testDelayedStreams() { - var combinedStream = CombinedStream.create(); - combinedStream.append(function(next) { - next(fs.createReadStream(FILE1)); - }); - combinedStream.append(function(next) { - next(fs.createReadStream(FILE2)); - }); - - var tmpFile = common.dir.tmp + '/combined.txt'; - var dest = fs.createWriteStream(tmpFile); - combinedStream.pipe(dest); - - dest.on('end', function() { - var written = fs.readFileSync(tmpFile, 'utf8'); - assert.strictEqual(written, EXPECTED); - }); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-data-size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-data-size.js deleted file mode 100644 index e3fbd184..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-data-size.js +++ /dev/null @@ -1,34 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; - -(function testDataSizeGetter() { - var combinedStream = CombinedStream.create(); - - assert.strictEqual(combinedStream.dataSize, 0); - - // Test one stream - combinedStream._streams.push({dataSize: 10}); - combinedStream._updateDataSize(); - assert.strictEqual(combinedStream.dataSize, 10); - - // Test two streams - combinedStream._streams.push({dataSize: 23}); - combinedStream._updateDataSize(); - assert.strictEqual(combinedStream.dataSize, 33); - - // Test currentStream - combinedStream._currentStream = {dataSize: 20}; - combinedStream._updateDataSize(); - assert.strictEqual(combinedStream.dataSize, 53); - - // Test currentStream without dataSize - combinedStream._currentStream = {}; - combinedStream._updateDataSize(); - assert.strictEqual(combinedStream.dataSize, 33); - - // Test stream function - combinedStream._streams.push(function() {}); - combinedStream._updateDataSize(); - assert.strictEqual(combinedStream.dataSize, 33); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams-and-buffers-and-strings.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams-and-buffers-and-strings.js deleted file mode 100644 index c678575c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams-and-buffers-and-strings.js +++ /dev/null @@ -1,38 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var fs = require('fs'); - -var FILE1 = common.dir.fixture + '/file1.txt'; -var BUFFER = new Buffer('Bacon is delicious'); -var FILE2 = common.dir.fixture + '/file2.txt'; -var STRING = 'The € kicks the $\'s ass!'; - -var EXPECTED = - fs.readFileSync(FILE1) - + BUFFER - + fs.readFileSync(FILE2) - + STRING; -var GOT; - -(function testDelayedStreams() { - var combinedStream = CombinedStream.create(); - combinedStream.append(fs.createReadStream(FILE1)); - combinedStream.append(BUFFER); - combinedStream.append(fs.createReadStream(FILE2)); - combinedStream.append(function(next) { - next(STRING); - }); - - var tmpFile = common.dir.tmp + '/combined-file1-buffer-file2-string.txt'; - var dest = fs.createWriteStream(tmpFile); - combinedStream.pipe(dest); - - dest.on('close', function() { - GOT = fs.readFileSync(tmpFile, 'utf8'); - }); -})(); - -process.on('exit', function() { - assert.strictEqual(GOT, EXPECTED); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams.js deleted file mode 100644 index 263cfdf7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams.js +++ /dev/null @@ -1,35 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var fs = require('fs'); - -var FILE1 = common.dir.fixture + '/file1.txt'; -var FILE2 = common.dir.fixture + '/file2.txt'; -var EXPECTED = fs.readFileSync(FILE1) + fs.readFileSync(FILE2); -var GOT; - -(function testDelayedStreams() { - var combinedStream = CombinedStream.create(); - combinedStream.append(fs.createReadStream(FILE1)); - combinedStream.append(fs.createReadStream(FILE2)); - - var stream1 = combinedStream._streams[0]; - var stream2 = combinedStream._streams[1]; - - stream1.on('end', function() { - assert.equal(stream2.dataSize, 0); - }); - - var tmpFile = common.dir.tmp + '/combined.txt'; - var dest = fs.createWriteStream(tmpFile); - combinedStream.pipe(dest); - - dest.on('close', function() { - GOT = fs.readFileSync(tmpFile, 'utf8'); - }); -})(); - -process.on('exit', function() { - console.error(GOT.length, EXPECTED.length); - assert.strictEqual(GOT, EXPECTED); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-empty-string.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-empty-string.js deleted file mode 100644 index c3d288d0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-empty-string.js +++ /dev/null @@ -1,39 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var util = require('util'); -var Stream = require('stream').Stream; - -var s = CombinedStream.create(); - - -function StringStream(){ - this.writable=true; - this.str="" -} -util.inherits(StringStream,Stream); - -StringStream.prototype.write=function(chunk,encoding){ - this.str+=chunk.toString(); - this.emit('data',chunk); -} - -StringStream.prototype.end=function(chunk,encoding){ - this.emit('end'); -} - -StringStream.prototype.toString=function(){ - return this.str; -} - - -s.append("foo."); -s.append(""); -s.append("bar"); - -var ss = new StringStream(); - -s.pipe(ss); -s.resume(); - -assert.equal(ss.toString(),"foo.bar"); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-is-stream-like.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-is-stream-like.js deleted file mode 100644 index aefa36e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-is-stream-like.js +++ /dev/null @@ -1,17 +0,0 @@ -var fs = require('fs'); -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var FILE1 = common.dir.fixture + '/file1.txt'; -var fileStream = fs.createReadStream(FILE1); - -var foo = function(){}; - -(function testIsStreamLike() { - assert(! CombinedStream.isStreamLike(true)); - assert(! CombinedStream.isStreamLike("I am a string")); - assert(! CombinedStream.isStreamLike(7)); - assert(! CombinedStream.isStreamLike(foo)); - - assert(CombinedStream.isStreamLike(fileStream)); -})(); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-max-data-size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-max-data-size.js deleted file mode 100644 index 25f47a47..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-max-data-size.js +++ /dev/null @@ -1,24 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var fs = require('fs'); - -var FILE1 = common.dir.fixture + '/file1.txt'; -var FILE2 = common.dir.fixture + '/file2.txt'; -var EXPECTED = fs.readFileSync(FILE1) + fs.readFileSync(FILE2); - -(function testDelayedStreams() { - var combinedStream = CombinedStream.create({pauseStreams: false, maxDataSize: 20736}); - combinedStream.append(fs.createReadStream(FILE1)); - combinedStream.append(fs.createReadStream(FILE2)); - - var gotErr = null; - combinedStream.on('error', function(err) { - gotErr = err; - }); - - process.on('exit', function() { - assert.ok(gotErr); - assert.ok(gotErr.message.match(/bytes/)); - }); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-unpaused-streams.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-unpaused-streams.js deleted file mode 100644 index 30a3a6f8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-unpaused-streams.js +++ /dev/null @@ -1,30 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var fs = require('fs'); - -var FILE1 = common.dir.fixture + '/file1.txt'; -var FILE2 = common.dir.fixture + '/file2.txt'; -var EXPECTED = fs.readFileSync(FILE1) + fs.readFileSync(FILE2); - -(function testDelayedStreams() { - var combinedStream = CombinedStream.create({pauseStreams: false}); - combinedStream.append(fs.createReadStream(FILE1)); - combinedStream.append(fs.createReadStream(FILE2)); - - var stream1 = combinedStream._streams[0]; - var stream2 = combinedStream._streams[1]; - - stream1.on('end', function() { - assert.ok(stream2.dataSize > 0); - }); - - var tmpFile = common.dir.tmp + '/combined.txt'; - var dest = fs.createWriteStream(tmpFile); - combinedStream.pipe(dest); - - dest.on('end', function() { - var written = fs.readFileSync(tmpFile, 'utf8'); - assert.strictEqual(written, EXPECTED); - }); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/run.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/run.js deleted file mode 100755 index 0bb8e822..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/run.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -var far = require('far').create(); - -far.add(__dirname); -far.include(/test-.*\.js$/); - -far.execute(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/package.json deleted file mode 100644 index 5d424f23..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "author": { - "name": "Felix Geisendörfer", - "email": "felix@debuggable.com", - "url": "http://debuggable.com/" - }, - "name": "form-data", - "description": "A module to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.", - "version": "0.1.2", - "repository": { - "type": "git", - "url": "git://github.com/felixge/node-form-data.git" - }, - "main": "./lib/form_data", - "scripts": { - "test": "node test/run.js" - }, - "engines": { - "node": ">= 0.6" - }, - "dependencies": { - "combined-stream": "~0.0.4", - "mime": "~1.2.11", - "async": "~0.2.9" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://raw.github.com/felixge/node-form-data/master/License" - } - ], - "devDependencies": { - "fake": "~0.2.2", - "far": "~0.0.7", - "formidable": "~1.0.14", - "request": "~2.27.0" - }, - "readme": "# Form-Data [![Build Status](https://travis-ci.org/felixge/node-form-data.png?branch=master)](https://travis-ci.org/felixge/node-form-data) [![Dependency Status](https://gemnasium.com/felixge/node-form-data.png)](https://gemnasium.com/felixge/node-form-data)\n\nA module to create readable ```\"multipart/form-data\"``` streams. Can be used to submit forms and file uploads to other web applications.\n\nThe API of this module is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd].\n\n[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface\n[streams2-thing]: http://nodejs.org/api/stream.html#stream_compatibility_with_older_node_versions\n\n## Install\n\n```\nnpm install form-data\n```\n\n## Usage\n\nIn this example we are constructing a form with 3 fields that contain a string,\na buffer and a file stream.\n\n``` javascript\nvar FormData = require('form-data');\nvar fs = require('fs');\n\nvar form = new FormData();\nform.append('my_field', 'my value');\nform.append('my_buffer', new Buffer(10));\nform.append('my_file', fs.createReadStream('/foo/bar.jpg'));\n```\n\nAlso you can use http-response stream:\n\n``` javascript\nvar FormData = require('form-data');\nvar http = require('http');\n\nvar form = new FormData();\n\nhttp.request('http://nodejs.org/images/logo.png', function(response) {\n form.append('my_field', 'my value');\n form.append('my_buffer', new Buffer(10));\n form.append('my_logo', response);\n});\n```\n\nOr @mikeal's request stream:\n\n``` javascript\nvar FormData = require('form-data');\nvar request = require('request');\n\nvar form = new FormData();\n\nform.append('my_field', 'my value');\nform.append('my_buffer', new Buffer(10));\nform.append('my_logo', request('http://nodejs.org/images/logo.png'));\n```\n\nIn order to submit this form to a web application, call ```submit(url, [callback])``` method:\n\n``` javascript\nform.submit('http://example.org/', function(err, res) {\n // res – response object (http.IncomingMessage) //\n res.resume(); // for node-0.10.x\n});\n\n```\n\nFor more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods.\n\n### Alternative submission methods\n\nYou can use node's http client interface:\n\n``` javascript\nvar http = require('http');\n\nvar request = http.request({\n method: 'post',\n host: 'example.org',\n path: '/upload',\n headers: form.getHeaders()\n});\n\nform.pipe(request);\n\nrequest.on('response', function(res) {\n console.log(res.statusCode);\n});\n```\n\nOr if you would prefer the `'Content-Length'` header to be set for you:\n\n``` javascript\nform.submit('example.org/upload', function(err, res) {\n console.log(res.statusCode);\n});\n```\n\nTo use custom headers and pre-known length in parts:\n\n``` javascript\nvar CRLF = '\\r\\n';\nvar form = new FormData();\n\nvar options = {\n header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF,\n knownLength: 1\n};\n\nform.append('my_buffer', buffer, options);\n\nform.submit('http://example.com/', function(err, res) {\n if (err) throw err;\n console.log('Done');\n});\n```\n\nForm-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide \"file\"-related information manually:\n\n``` javascript\nsomeModule.stream(function(err, stdout, stderr) {\n if (err) throw err;\n\n var form = new FormData();\n\n form.append('file', stdout, {\n filename: 'unicycle.jpg',\n contentType: 'image/jpg',\n knownLength: 19806\n });\n\n form.submit('http://example.com/', function(err, res) {\n if (err) throw err;\n console.log('Done');\n });\n});\n```\n\nFor edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter:\n\n``` javascript\nform.submit({\n host: 'example.com',\n path: '/probably.php?extra=params',\n auth: 'username:password'\n}, function(err, res) {\n console.log(res.statusCode);\n});\n```\n\n## Notes\n\n- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround.\n- If it feels like FormData hangs after submit and you're on ```node-0.10```, please check [Compatibility with Older Node Versions][streams2-thing]\n\n## TODO\n\n- Add new streams (0.10) support and try really hard not to break it for 0.8.x.\n\n## License\n\nForm-Data is licensed under the MIT license.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/felixge/node-form-data/issues" - }, - "homepage": "https://github.com/felixge/node-form-data", - "_id": "form-data@0.1.2", - "dist": { - "shasum": "1143c21357911a78dd7913b189b4bab5d5d57445" - }, - "_from": "form-data@~0.1.0", - "_resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/.npmignore deleted file mode 100644 index 77ba16cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/.npmignore +++ /dev/null @@ -1,18 +0,0 @@ -.idea -*.iml -npm-debug.log -dump.rdb -node_modules -results.tap -results.xml -npm-shrinkwrap.json -config.json -.DS_Store -*/.DS_Store -*/*/.DS_Store -._* -*/._* -*/*/._* -coverage.* -lib-cov - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/.travis.yml deleted file mode 100755 index 047f7e3d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js - -node_js: - - 0.10 - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/LICENSE deleted file mode 100755 index e699a7bd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2012-2013, Eran Hammer. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Eran Hammer nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL ERAN HAMMER BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/Makefile deleted file mode 100755 index 5f339bf3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -test: - @node node_modules/lab/bin/lab -test-cov: - @node node_modules/lab/bin/lab -r threshold -t 100 -test-cov-html: - @node node_modules/lab/bin/lab -r html -o coverage.html -complexity: - @node node_modules/complexity-report/src/cli.js -o complexity.md -f markdown lib - -.PHONY: test test-cov test-cov-html complexity diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/README.md deleted file mode 100755 index 010bac6d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/README.md +++ /dev/null @@ -1,627 +0,0 @@ -![hawk Logo](https://raw.github.com/hueniverse/hawk/master/images/hawk.png) - -<img align="right" src="https://raw.github.com/hueniverse/hawk/master/images/logo.png" /> **Hawk** is an HTTP authentication scheme using a message authentication code (MAC) algorithm to provide partial -HTTP request cryptographic verification. For more complex use cases such as access delegation, see [Oz](https://github.com/hueniverse/oz). - -Current version: **1.0** - -[![Build Status](https://secure.travis-ci.org/hueniverse/hawk.png)](http://travis-ci.org/hueniverse/hawk) - -# Table of Content - -- [**Introduction**](#introduction) - - [Replay Protection](#replay-protection) - - [Usage Example](#usage-example) - - [Protocol Example](#protocol-example) - - [Payload Validation](#payload-validation) - - [Response Payload Validation](#response-payload-validation) - - [Browser Support and Considerations](#browser-support-and-considerations) -<p></p> -- [**Single URI Authorization**](#single-uri-authorization) - - [Usage Example](#bewit-usage-example) -<p></p> -- [**Security Considerations**](#security-considerations) - - [MAC Keys Transmission](#mac-keys-transmission) - - [Confidentiality of Requests](#confidentiality-of-requests) - - [Spoofing by Counterfeit Servers](#spoofing-by-counterfeit-servers) - - [Plaintext Storage of Credentials](#plaintext-storage-of-credentials) - - [Entropy of Keys](#entropy-of-keys) - - [Coverage Limitations](#coverage-limitations) - - [Future Time Manipulation](#future-time-manipulation) - - [Client Clock Poisoning](#client-clock-poisoning) - - [Bewit Limitations](#bewit-limitations) - - [Host Header Forgery](#host-header-forgery) -<p></p> -- [**Frequently Asked Questions**](#frequently-asked-questions) -<p></p> -- [**Acknowledgements**](#acknowledgements) - -# Introduction - -**Hawk** is an HTTP authentication scheme providing mechanisms for making authenticated HTTP requests with -partial cryptographic verification of the request and response, covering the HTTP method, request URI, host, -and optionally the request payload. - -Similar to the HTTP [Digest access authentication schemes](http://www.ietf.org/rfc/rfc2617.txt), **Hawk** uses a set of -client credentials which include an identifier (e.g. username) and key (e.g. password). Likewise, just as with the Digest scheme, -the key is never included in authenticated requests. Instead, it is used to calculate a request MAC value which is -included in its place. - -However, **Hawk** has several differences from Digest. In particular, while both use a nonce to limit the possibility of -replay attacks, in **Hawk** the client generates the nonce and uses it in combination with a timestamp, leading to less -"chattiness" (interaction with the server). - -Also unlike Digest, this scheme is not intended to protect the key itself (the password in Digest) because -the client and server must both have access to the key material in the clear. - -The primary design goals of this scheme are to: -* simplify and improve HTTP authentication for services that are unwilling or unable to deploy TLS for all resources, -* secure credentials against leakage (e.g., when the client uses some form of dynamic configuration to determine where - to send an authenticated request), and -* avoid the exposure of credentials sent to a malicious server over an unauthenticated secure channel due to client - failure to validate the server's identity as part of its TLS handshake. - -In addition, **Hawk** supports a method for granting third-parties temporary access to individual resources using -a query parameter called _bewit_ (in falconry, a leather strap used to attach a tracking device to the leg of a hawk). - -The **Hawk** scheme requires the establishment of a shared symmetric key between the client and the server, -which is beyond the scope of this module. Typically, the shared credentials are established via an initial -TLS-protected phase or derived from some other shared confidential information available to both the client -and the server. - - -## Replay Protection - -Without replay protection, an attacker can use a compromised (but otherwise valid and authenticated) request more -than once, gaining access to a protected resource. To mitigate this, clients include both a nonce and a timestamp when -making requests. This gives the server enough information to prevent replay attacks. - -The nonce is generated by the client, and is a string unique across all requests with the same timestamp and -key identifier combination. - -The timestamp enables the server to restrict the validity period of the credentials where requests occuring afterwards -are rejected. It also removes the need for the server to retain an unbounded number of nonce values for future checks. -By default, **Hawk** uses a time window of 1 minute to allow for time skew between the client and server (which in -practice translates to a maximum of 2 minutes as the skew can be positive or negative). - -Using a timestamp requires the client's clock to be in sync with the server's clock. **Hawk** requires both the client -clock and the server clock to use NTP to ensure synchronization. However, given the limitations of some client types -(e.g. browsers) to deploy NTP, the server provides the client with its current time (in seconds precision) in response -to a bad timestamp. - -There is no expectation that the client will adjust its system clock to match the server (in fact, this would be a -potential attack vector). Instead, the client only uses the server's time to calculate an offset used only -for communications with that particular server. The protocol rewards clients with synchronized clocks by reducing -the number of round trips required to authenticate the first request. - - -## Usage Example - -Server code: - -```javascript -var Http = require('http'); -var Hawk = require('hawk'); - - -// Credentials lookup function - -var credentialsFunc = function (id, callback) { - - var credentials = { - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'Steve' - }; - - return callback(null, credentials); -}; - -// Create HTTP server - -var handler = function (req, res) { - - // Authenticate incoming request - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - // Prepare response - - var payload = (!err ? 'Hello ' + credentials.user + ' ' + artifacts.ext : 'Shoosh!'); - var headers = { 'Content-Type': 'text/plain' }; - - // Generate Server-Authorization response header - - var header = Hawk.server.header(credentials, artifacts, { payload: payload, contentType: headers['Content-Type'] }); - headers['Server-Authorization'] = header; - - // Send the response back - - res.writeHead(!err ? 200 : 401, headers); - res.end(payload); - }); -}; - -// Start server - -Http.createServer(handler).listen(8000, 'example.com'); -``` - -Client code: - -```javascript -var Request = require('request'); -var Hawk = require('hawk'); - - -// Client credentials - -var credentials = { - id: 'dh37fgj492je', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256' -} - -// Request options - -var requestOptions = { - uri: 'http://example.com:8000/resource/1?b=1&a=2', - method: 'GET', - headers: {} -}; - -// Generate Authorization request header - -var header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'GET', { credentials: credentials, ext: 'some-app-data' }); -requestOptions.headers.Authorization = header.field; - -// Send authenticated request - -Request(requestOptions, function (error, response, body) { - - // Authenticate the server's response - - var isValid = Hawk.client.authenticate(response, credentials, header.artifacts, { payload: body }); - - // Output results - - console.log(response.statusCode + ': ' + body + (isValid ? ' (valid)' : ' (invalid)')); -}); -``` - -**Hawk** utilized the [**SNTP**](https://github.com/hueniverse/sntp) module for time sync management. By default, the local -machine time is used. To automatically retrieve and synchronice the clock within the application, use the SNTP 'start()' method. - -```javascript -Hawk.sntp.start(); -``` - - -## Protocol Example - -The client attempts to access a protected resource without authentication, sending the following HTTP request to -the resource server: - -``` -GET /resource/1?b=1&a=2 HTTP/1.1 -Host: example.com:8000 -``` - -The resource server returns an authentication challenge. - -``` -HTTP/1.1 401 Unauthorized -WWW-Authenticate: Hawk -``` - -The client has previously obtained a set of **Hawk** credentials for accessing resources on the "http://example.com/" -server. The **Hawk** credentials issued to the client include the following attributes: - -* Key identifier: dh37fgj492je -* Key: werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn -* Algorithm: sha256 - -The client generates the authentication header by calculating a timestamp (e.g. the number of seconds since January 1, -1970 00:00:00 GMT), generating a nonce, and constructing the normalized request string (each value followed by a newline -character): - -``` -hawk.1.header -1353832234 -j4h3g2 -GET -/resource/1?b=1&a=2 -example.com -8000 - -some-app-ext-data - -``` - -The request MAC is calculated using HMAC with the specified hash algorithm "sha256" and the key over the normalized request string. -The result is base64-encoded to produce the request MAC: - -``` -6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE= -``` - -The client includes the **Hawk** key identifier, timestamp, nonce, application specific data, and request MAC with the request using -the HTTP `Authorization` request header field: - -``` -GET /resource/1?b=1&a=2 HTTP/1.1 -Host: example.com:8000 -Authorization: Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", ext="some-app-ext-data", mac="6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE=" -``` - -The server validates the request by calculating the request MAC again based on the request received and verifies the validity -and scope of the **Hawk** credentials. If valid, the server responds with the requested resource. - - -### Payload Validation - -**Hawk** provides optional payload validation. When generating the authentication header, the client calculates a payload hash -using the specified hash algorithm. The hash is calculated over the concatenated value of (each followed by a newline character): -* `hawk.1.payload` -* the content-type in lowercase, without any parameters (e.g. `application/json`) -* the request payload prior to any content encoding (the exact representation requirements should be specified by the server for payloads other than simple single-part ascii to ensure interoperability) - -For example: - -* Payload: `Thank you for flying Hawk` -* Content Type: `text/plain` -* Hash (sha256): `Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=` - -Results in the following input to the payload hash function (newline terminated values): - -``` -hawk.1.payload -text/plain -Thank you for flying Hawk - -``` - -Which produces the following hash value: - -``` -Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY= -``` - -The client constructs the normalized request string (newline terminated values): - -``` -hawk.1.header -1353832234 -j4h3g2 -POST -/resource/1?a=1&b=2 -example.com -8000 -Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY= -some-app-ext-data - -``` - -Then calculates the request MAC and includes the **Hawk** key identifier, timestamp, nonce, payload hash, application specific data, -and request MAC, with the request using the HTTP `Authorization` request header field: - -``` -POST /resource/1?a=1&b=2 HTTP/1.1 -Host: example.com:8000 -Authorization: Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", hash="Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=", ext="some-app-ext-data", mac="aSe1DERmZuRl3pI36/9BdZmnErTw3sNzOOAUlfeKjVw=" -``` - -It is up to the server if and when it validates the payload for any given request, based solely on it's security policy -and the nature of the data included. - -If the payload is available at the time of authentication, the server uses the hash value provided by the client to construct -the normalized string and validates the MAC. If the MAC is valid, the server calculates the payload hash and compares the value -with the provided payload hash in the header. In many cases, checking the MAC first is faster than calculating the payload hash. - -However, if the payload is not available at authentication time (e.g. too large to fit in memory, streamed elsewhere, or processed -at a different stage in the application), the server may choose to defer payload validation for later by retaining the hash value -provided by the client after validating the MAC. - -It is important to note that MAC validation does not mean the hash value provided by the client is valid, only that the value -included in the header was not modified. Without calculating the payload hash on the server and comparing it to the value provided -by the client, the payload may be modified by an attacker. - - -## Response Payload Validation - -**Hawk** provides partial response payload validation. The server includes the `Server-Authorization` response header which enables the -client to authenticate the response and ensure it is talking to the right server. **Hawk** defines the HTTP `Server-Authorization` header -as a response header using the exact same syntax as the `Authorization` request header field. - -The header is contructed using the same process as the client's request header. The server uses the same credentials and other -artifacts provided by the client to constructs the normalized request string. The `ext` and `hash` values are replaced with -new values based on the server response. The rest as identical to those used by the client. - -The result MAC digest is included with the optional `hash` and `ext` values: - -``` -Server-Authorization: Hawk mac="XIJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific" -``` - - -## Browser Support and Considerations - -A browser script is provided for including using a `<script>` tag in [lib/browser.js](/lib/browser.js). - -**Hawk** relies on the _Server-Authorization_ and _WWW-Authenticate_ headers in its response to communicate with the client. -Therefore, in case of CORS requests, it is important to consider sending _Access-Control-Expose-Headers_ with the value -_"WWW-Authenticate, Server-Authorization"_ on each response from your server. As explained in the -[specifications](http://www.w3.org/TR/cors/#access-control-expose-headers-response-header), it will indicate that these headers -can safely be accessed by the client (using getResponseHeader() on the XmlHttpRequest object). Otherwise you will be met with a -["simple response header"](http://www.w3.org/TR/cors/#simple-response-header) which excludes these fields and would prevent the -Hawk client from authenticating the requests.You can read more about the why and how in this -[article](http://www.html5rocks.com/en/tutorials/cors/#toc-adding-cors-support-to-the-server) - - -# Single URI Authorization - -There are cases in which limited and short-term access to a protected resource is granted to a third party which does not -have access to the shared credentials. For example, displaying a protected image on a web page accessed by anyone. **Hawk** -provides limited support for such URIs in the form of a _bewit_ - a URI query parameter appended to the request URI which contains -the necessary credentials to authenticate the request. - -Because of the significant security risks involved in issuing such access, bewit usage is purposely limited only to GET requests -and for a finite period of time. Both the client and server can issue bewit credentials, however, the server should not use the same -credentials as the client to maintain clear traceability as to who issued which credentials. - -In order to simplify implementation, bewit credentials do not support single-use policy and can be replayed multiple times within -the granted access timeframe. - - -## Bewit Usage Example - -Server code: - -```javascript -var Http = require('http'); -var Hawk = require('hawk'); - - -// Credentials lookup function - -var credentialsFunc = function (id, callback) { - - var credentials = { - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256' - }; - - return callback(null, credentials); -}; - -// Create HTTP server - -var handler = function (req, res) { - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - res.writeHead(!err ? 200 : 401, { 'Content-Type': 'text/plain' }); - res.end(!err ? 'Access granted' : 'Shoosh!'); - }); -}; - -Http.createServer(handler).listen(8000, 'example.com'); -``` - -Bewit code generation: - -```javascript -var Request = require('request'); -var Hawk = require('hawk'); - - -// Client credentials - -var credentials = { - id: 'dh37fgj492je', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256' -} - -// Generate bewit - -var duration = 60 * 5; // 5 Minutes -var bewit = Hawk.uri.getBewit('http://example.com:8080/resource/1?b=1&a=2', { credentials: credentials, ttlSec: duration, ext: 'some-app-data' }); -var uri = 'http://example.com:8000/resource/1?b=1&a=2' + '&bewit=' + bewit; -``` - - -# Security Considerations - -The greatest sources of security risks are usually found not in **Hawk** but in the policies and procedures surrounding its use. -Implementers are strongly encouraged to assess how this module addresses their security requirements. This section includes -an incomplete list of security considerations that must be reviewed and understood before deploying **Hawk** on the server. -Many of the protections provided in **Hawk** depends on whether and how they are used. - -### MAC Keys Transmission - -**Hawk** does not provide any mechanism for obtaining or transmitting the set of shared credentials required. Any mechanism used -to obtain **Hawk** credentials must ensure that these transmissions are protected using transport-layer mechanisms such as TLS. - -### Confidentiality of Requests - -While **Hawk** provides a mechanism for verifying the integrity of HTTP requests, it provides no guarantee of request -confidentiality. Unless other precautions are taken, eavesdroppers will have full access to the request content. Servers should -carefully consider the types of data likely to be sent as part of such requests, and employ transport-layer security mechanisms -to protect sensitive resources. - -### Spoofing by Counterfeit Servers - -**Hawk** provides limited verification of the server authenticity. When receiving a response back from the server, the server -may choose to include a response `Server-Authorization` header which the client can use to verify the response. However, it is up to -the server to determine when such measure is included, to up to the client to enforce that policy. - -A hostile party could take advantage of this by intercepting the client's requests and returning misleading or otherwise -incorrect responses. Service providers should consider such attacks when developing services using this protocol, and should -require transport-layer security for any requests where the authenticity of the resource server or of server responses is an issue. - -### Plaintext Storage of Credentials - -The **Hawk** key functions the same way passwords do in traditional authentication systems. In order to compute the request MAC, -the server must have access to the key in plaintext form. This is in contrast, for example, to modern operating systems, which -store only a one-way hash of user credentials. - -If an attacker were to gain access to these keys - or worse, to the server's database of all such keys - he or she would be able -to perform any action on behalf of any resource owner. Accordingly, it is critical that servers protect these keys from unauthorized -access. - -### Entropy of Keys - -Unless a transport-layer security protocol is used, eavesdroppers will have full access to authenticated requests and request -MAC values, and will thus be able to mount offline brute-force attacks to recover the key used. Servers should be careful to -assign keys which are long enough, and random enough, to resist such attacks for at least the length of time that the **Hawk** -credentials are valid. - -For example, if the credentials are valid for two weeks, servers should ensure that it is not possible to mount a brute force -attack that recovers the key in less than two weeks. Of course, servers are urged to err on the side of caution, and use the -longest key reasonable. - -It is equally important that the pseudo-random number generator (PRNG) used to generate these keys be of sufficiently high -quality. Many PRNG implementations generate number sequences that may appear to be random, but which nevertheless exhibit -patterns or other weaknesses which make cryptanalysis or brute force attacks easier. Implementers should be careful to use -cryptographically secure PRNGs to avoid these problems. - -### Coverage Limitations - -The request MAC only covers the HTTP `Host` header and optionally the `Content-Type` header. It does not cover any other headers -which can often affect how the request body is interpreted by the server. If the server behavior is influenced by the presence -or value of such headers, an attacker can manipulate the request headers without being detected. Implementers should use the -`ext` feature to pass application-specific information via the `Authorization` header which is protected by the request MAC. - -The response authentication, when performed, only covers the response payload, content-type, and the request information -provided by the client in it's request (method, resource, timestamp, nonce, etc.). It does not cover the HTTP status code or -any other response header field (e.g. Location) which can affect the client's behaviour. - -### Future Time Manipulation - -The protocol relies on a clock sync between the client and server. To accomplish this, the server informs the client of its -current time when an invalid timestamp is received. - -If an attacker is able to manipulate this information and cause the client to use an incorrect time, it would be able to cause -the client to generate authenticated requests using time in the future. Such requests will fail when sent by the client, and will -not likely leave a trace on the server (given the common implementation of nonce, if at all enforced). The attacker will then -be able to replay the request at the correct time without detection. - -The client must only use the time information provided by the server if: -* it was delivered over a TLS connection and the server identity has been verified, or -* the `tsm` MAC digest calculated using the same client credentials over the timestamp has been verified. - -### Client Clock Poisoning - -When receiving a request with a bad timestamp, the server provides the client with its current time. The client must never use -the time received from the server to adjust its own clock, and must only use it to calculate an offset for communicating with -that particular server. - -### Bewit Limitations - -Special care must be taken when issuing bewit credentials to third parties. Bewit credentials are valid until expiration and cannot -be revoked or limited without using other means. Whatever resource they grant access to will be completely exposed to anyone with -access to the bewit credentials which act as bearer credentials for that particular resource. While bewit usage is limited to GET -requests only and therefore cannot be used to perform transactions or change server state, it can still be used to expose private -and sensitive information. - -### Host Header Forgery - -Hawk validates the incoming request MAC against the incoming HTTP Host header. However, unless the optional `host` and `port` -options are used with `server.authenticate()`, a malicous client can mint new host names pointing to the server's IP address and -use that to craft an attack by sending a valid request that's meant for another hostname than the one used by the server. Server -implementors must manually verify that the host header received matches their expectation (or use the options mentioned above). - -# Frequently Asked Questions - -### Where is the protocol specification? - -If you are looking for some prose explaining how all this works, **this is it**. **Hawk** is being developed as an open source -project instead of a standard. In other words, the [code](/hueniverse/hawk/tree/master/lib) is the specification. Not sure about -something? Open an issue! - -### Is it done? - -At if version 0.10.0, **Hawk** is feature-complete. However, until this module reaches version 1.0.0 it is considered experimental -and is likely to change. This also means your feedback and contribution are very welcome. Feel free to open issues with questions -and suggestions. - -### Where can I find **Hawk** implementations in other languages? - -**Hawk**'s only reference implementation is provided in JavaScript as a node.js module. However, others are actively porting it to other -platforms. There is already a [PHP](https://github.com/alexbilbie/PHP-Hawk), -[.NET](https://github.com/pcibraro/hawknet), and [JAVA](https://github.com/wealdtech/hawk) libraries available. The full list -is maintained [here](https://github.com/hueniverse/hawk/issues?labels=port). Please add an issue if you are working on another -port. A cross-platform test-suite is in the works. - -### Why isn't the algorithm part of the challenge or dynamically negotiated? - -The algorithm used is closely related to the key issued as different algorithms require different key sizes (and other -requirements). While some keys can be used for multiple algorithm, the protocol is designed to closely bind the key and algorithm -together as part of the issued credentials. - -### Why is Host and Content-Type the only headers covered by the request MAC? - -It is really hard to include other headers. Headers can be changed by proxies and other intermediaries and there is no -well-established way to normalize them. Many platforms change the case of header field names and values. The only -straight-forward solution is to include the headers in some blob (say, base64 encoded JSON) and include that with the request, -an approach taken by JWT and other such formats. However, that design violates the HTTP header boundaries, repeats information, -and introduces other security issues because firewalls will not be aware of these "hidden" headers. In addition, any information -repeated must be compared to the duplicated information in the header and therefore only moves the problem elsewhere. - -### Why not just use HTTP Digest? - -Digest requires pre-negotiation to establish a nonce. This means you can't just make a request - you must first send -a protocol handshake to the server. This pattern has become unacceptable for most web services, especially mobile -where extra round-trip are costly. - -### Why bother with all this nonce and timestamp business? - -**Hawk** is an attempt to find a reasonable, practical compromise between security and usability. OAuth 1.0 got timestamp -and nonces halfway right but failed when it came to scalability and consistent developer experience. **Hawk** addresses -it by requiring the client to sync its clock, but provides it with tools to accomplish it. - -In general, replay protection is a matter of application-specific threat model. It is less of an issue on a TLS-protected -system where the clients are implemented using best practices and are under the control of the server. Instead of dropping -replay protection, **Hawk** offers a required time window and an optional nonce verification. Together, it provides developers -with the ability to decide how to enforce their security policy without impacting the client's implementation. - -### What are `app` and `dlg` in the authorization header and normalized mac string? - -The original motivation for **Hawk** was to replace the OAuth 1.0 use cases. This included both a simple client-server mode which -this module is specifically designed for, and a delegated access mode which is being developed separately in -[Oz](https://github.com/hueniverse/oz). In addition to the **Hawk** use cases, Oz requires another attribute: the application id `app`. -This provides binding between the credentials and the application in a way that prevents an attacker from tricking an application -to use credentials issued to someone else. It also has an optional 'delegated-by' attribute `dlg` which is the application id of the -application the credentials were directly issued to. The goal of these two additions is to allow Oz to utilize **Hawk** directly, -but with the additional security of delegated credentials. - -### What is the purpose of the static strings used in each normalized MAC input? - -When calculating a hash or MAC, a static prefix (tag) is added. The prefix is used to prevent MAC values from being -used or reused for a purpose other than what they were created for (i.e. prevents switching MAC values between a request, -response, and a bewit use cases). It also protects against expliots created after a potential change in how the protocol -creates the normalized string. For example, if a future version would switch the order of nonce and timestamp, it -can create an exploit opportunity for cases where the nonce is similar in format to a timestamp. - -### Does **Hawk** have anything to do with OAuth? - -Short answer: no. - -**Hawk** was originally proposed as the OAuth MAC Token specification. However, the OAuth working group in its consistent -incompetence failed to produce a final, usable solution to address one of the most popular use cases of OAuth 1.0 - using it -to authenticate simple client-server transactions (i.e. two-legged). As you can guess, the OAuth working group is still hard -at work to produce more garbage. - -**Hawk** provides a simple HTTP authentication scheme for making client-server requests. It does not address the OAuth use case -of delegating access to a third party. If you are looking for an OAuth alternative, check out [Oz](https://github.com/hueniverse/oz). - - -# Acknowledgements - -**Hawk** is a derivative work of the [HTTP MAC Authentication Scheme](http://tools.ietf.org/html/draft-hammer-oauth-v2-mac-token-05) proposal -co-authored by Ben Adida, Adam Barth, and Eran Hammer, which in turn was based on the OAuth 1.0 community specification. - -Special thanks to Ben Laurie for his always insightful feedback and advice. - -The **Hawk** logo was created by [Chris Carrasco](http://chriscarrasco.com). diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/example/usage.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/example/usage.js deleted file mode 100755 index 8c063f6c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/example/usage.js +++ /dev/null @@ -1,78 +0,0 @@ -// Load modules - -var Http = require('http'); -var Request = require('request'); -var Hawk = require('../lib'); - - -// Declare internals - -var internals = { - credentials: { - dh37fgj492je: { - id: 'dh37fgj492je', // Required by Hawk.client.header - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'Steve' - } - } -}; - - -// Credentials lookup function - -var credentialsFunc = function (id, callback) { - - return callback(null, internals.credentials[id]); -}; - - -// Create HTTP server - -var handler = function (req, res) { - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - var payload = (!err ? 'Hello ' + credentials.user + ' ' + artifacts.ext : 'Shoosh!'); - var headers = { - 'Content-Type': 'text/plain', - 'Server-Authorization': Hawk.server.header(credentials, artifacts, { payload: payload, contentType: 'text/plain' }) - }; - - res.writeHead(!err ? 200 : 401, headers); - res.end(payload); - }); -}; - -Http.createServer(handler).listen(8000, '127.0.0.1'); - - -// Send unauthenticated request - -Request('http://127.0.0.1:8000/resource/1?b=1&a=2', function (error, response, body) { - - console.log(response.statusCode + ': ' + body); -}); - - -// Send authenticated request - -credentialsFunc('dh37fgj492je', function (err, credentials) { - - var header = Hawk.client.header('http://127.0.0.1:8000/resource/1?b=1&a=2', 'GET', { credentials: credentials, ext: 'and welcome!' }); - var options = { - uri: 'http://127.0.0.1:8000/resource/1?b=1&a=2', - method: 'GET', - headers: { - authorization: header.field - } - }; - - Request(options, function (error, response, body) { - - var isValid = Hawk.client.authenticate(response, credentials, header.artifacts, { payload: body }); - console.log(response.statusCode + ': ' + body + (isValid ? ' (valid)' : ' (invalid)')); - process.exit(0); - }); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/images/hawk.png b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/images/hawk.png deleted file mode 100755 index a0e15cda..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/images/hawk.png and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/images/logo.png b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/images/logo.png deleted file mode 100755 index b8ff5901..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/images/logo.png and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/index.js deleted file mode 100755 index 4cc88b35..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib'); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/browser.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/browser.js deleted file mode 100755 index 27494f23..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/browser.js +++ /dev/null @@ -1,485 +0,0 @@ -/* - HTTP Hawk Authentication Scheme - Copyright (c) 2012-2013, Eran Hammer <eran@hueniverse.com> - MIT Licensed -*/ - - -// Declare namespace - -var hawk = {}; - - -// Export if used as a module - -if (typeof module !== "undefined" && module.exports) { - module.exports = hawk; -} - -hawk.client = { - - // Generate an Authorization header for a given request - - /* - uri: 'http://example.com/resource?a=b' - method: HTTP verb (e.g. 'GET', 'POST') - options: { - - // Required - - credentials: { - id: 'dh37fgj492je', - key: 'aoijedoaijsdlaksjdl', - algorithm: 'sha256' // 'sha1', 'sha256' - }, - - // Optional - - ext: 'application-specific', // Application specific data sent via the ext attribute - timestamp: Date.now() / 1000, // A pre-calculated timestamp in seconds - nonce: '2334f34f', // A pre-generated nonce - localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided) - payload: '{"some":"payload"}', // UTF-8 encoded string for body hash generation (ignored if hash provided) - contentType: 'application/json', // Payload content-type (ignored if hash provided) - hash: 'U4MKKSmiVxk37JCCrAVIjV=', // Pre-calculated payload hash - app: '24s23423f34dx', // Oz application id - dlg: '234sz34tww3sd' // Oz delegated-by application id - } - */ - - header: function (uri, method, options) { - - var result = { - field: '', - artifacts: {} - }; - - // Validate inputs - - if (!uri || (typeof uri !== 'string' && typeof uri !== 'object') || - !method || typeof method !== 'string' || - !options || typeof options !== 'object') { - - return result; - } - - // Application time - - var timestamp = options.timestamp || Math.floor((hawk.utils.now() + (options.localtimeOffsetMsec || 0)) / 1000) - - // Validate credentials - - var credentials = options.credentials; - if (!credentials || - !credentials.id || - !credentials.key || - !credentials.algorithm) { - - // Invalid credential object - return result; - } - - if (hawk.crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return result; - } - - // Parse URI - - if (typeof uri === 'string') { - uri = hawk.utils.parseUri(uri); - } - - // Calculate signature - - var artifacts = { - ts: timestamp, - nonce: options.nonce || hawk.utils.randomString(6), - method: method, - resource: uri.relative, - host: uri.hostname, - port: uri.port, - hash: options.hash, - ext: options.ext, - app: options.app, - dlg: options.dlg - }; - - result.artifacts = artifacts; - - // Calculate payload hash - - if (!artifacts.hash && - options.hasOwnProperty('payload')) { - - artifacts.hash = hawk.crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType); - } - - var mac = hawk.crypto.calculateMac('header', credentials, artifacts); - - // Construct header - - var hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== ''; // Other falsey values allowed - var header = 'Hawk id="' + credentials.id + - '", ts="' + artifacts.ts + - '", nonce="' + artifacts.nonce + - (artifacts.hash ? '", hash="' + artifacts.hash : '') + - (hasExt ? '", ext="' + hawk.utils.escapeHeaderAttribute(artifacts.ext) : '') + - '", mac="' + mac + '"'; - - if (artifacts.app) { - header += ', app="' + artifacts.app + - (artifacts.dlg ? '", dlg="' + artifacts.dlg : '') + '"'; - } - - result.field = header; - - return result; - }, - - - // Validate server response - - /* - request: object created via 'new XMLHttpRequest()' after response received - artifacts: object recieved from header().artifacts - options: { - payload: optional payload received - required: specifies if a Server-Authorization header is required. Defaults to 'false' - } - */ - - authenticate: function (request, credentials, artifacts, options) { - - options = options || {}; - - if (request.getResponseHeader('www-authenticate')) { - - // Parse HTTP WWW-Authenticate header - - var attributes = hawk.utils.parseAuthorizationHeader(request.getResponseHeader('www-authenticate'), ['ts', 'tsm', 'error']); - if (!attributes) { - return false; - } - - if (attributes.ts) { - var tsm = hawk.crypto.calculateTsMac(attributes.ts, credentials); - if (tsm !== attributes.tsm) { - return false; - } - - hawk.utils.setNtpOffset(attributes.ts - Math.floor(Date.now() / 1000)); // Keep offset at 1 second precision - } - } - - // Parse HTTP Server-Authorization header - - if (!request.getResponseHeader('server-authorization') && - !options.required) { - - return true; - } - - var attributes = hawk.utils.parseAuthorizationHeader(request.getResponseHeader('server-authorization'), ['mac', 'ext', 'hash']); - if (!attributes) { - return false; - } - - var modArtifacts = { - ts: artifacts.ts, - nonce: artifacts.nonce, - method: artifacts.method, - resource: artifacts.resource, - host: artifacts.host, - port: artifacts.port, - hash: attributes.hash, - ext: attributes.ext, - app: artifacts.app, - dlg: artifacts.dlg - }; - - var mac = hawk.crypto.calculateMac('response', credentials, modArtifacts); - if (mac !== attributes.mac) { - return false; - } - - if (!options.hasOwnProperty('payload')) { - return true; - } - - if (!attributes.hash) { - return false; - } - - var calculatedHash = hawk.crypto.calculatePayloadHash(options.payload, credentials.algorithm, request.getResponseHeader('content-type')); - return (calculatedHash === attributes.hash); - }, - - message: function (host, port, message, options) { - - // Validate inputs - - if (!host || typeof host !== 'string' || - !port || typeof port !== 'number' || - message === null || message === undefined || typeof message !== 'string' || - !options || typeof options !== 'object') { - - return null; - } - - // Application time - - var timestamp = options.timestamp || Math.floor((hawk.utils.now() + (options.localtimeOffsetMsec || 0)) / 1000) - - // Validate credentials - - var credentials = options.credentials; - if (!credentials || - !credentials.id || - !credentials.key || - !credentials.algorithm) { - - // Invalid credential object - return null; - } - - if (hawk.crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return null; - } - - // Calculate signature - - var artifacts = { - ts: timestamp, - nonce: options.nonce || hawk.utils.randomString(6), - host: host, - port: port, - hash: hawk.crypto.calculatePayloadHash(message, credentials.algorithm) - }; - - // Construct authorization - - var result = { - id: credentials.id, - ts: artifacts.ts, - nonce: artifacts.nonce, - hash: artifacts.hash, - mac: hawk.crypto.calculateMac('message', credentials, artifacts) - }; - - return result; - } -}; - - -hawk.crypto = { - - headerVersion: '1', - - algorithms: ['sha1', 'sha256'], - - calculateMac: function (type, credentials, options) { - - var normalized = hawk.crypto.generateNormalizedString(type, options); - - var hmac = CryptoJS['Hmac' + credentials.algorithm.toUpperCase()](normalized, credentials.key); - return hmac.toString(CryptoJS.enc.Base64); - }, - - generateNormalizedString: function (type, options) { - - var normalized = 'hawk.' + hawk.crypto.headerVersion + '.' + type + '\n' + - options.ts + '\n' + - options.nonce + '\n' + - (options.method || '').toUpperCase() + '\n' + - (options.resource || '') + '\n' + - options.host.toLowerCase() + '\n' + - options.port + '\n' + - (options.hash || '') + '\n'; - - if (options.ext) { - normalized += options.ext.replace('\\', '\\\\').replace('\n', '\\n'); - } - - normalized += '\n'; - - if (options.app) { - normalized += options.app + '\n' + - (options.dlg || '') + '\n'; - } - - return normalized; - }, - - calculatePayloadHash: function (payload, algorithm, contentType) { - - var hash = CryptoJS.algo[algorithm.toUpperCase()].create(); - hash.update('hawk.' + hawk.crypto.headerVersion + '.payload\n'); - hash.update(hawk.utils.parseContentType(contentType) + '\n'); - hash.update(payload || ''); - hash.update('\n'); - return hash.finalize().toString(CryptoJS.enc.Base64); - }, - - calculateTsMac: function (ts, credentials) { - - var hash = CryptoJS['Hmac' + credentials.algorithm.toUpperCase()]('hawk.' + hawk.crypto.headerVersion + '.ts\n' + ts + '\n', credentials.key); - return hash.toString(CryptoJS.enc.Base64); - } -}; - - -hawk.utils = { - - storage: { // localStorage compatible interface - _cache: {}, - setItem: function (key, value) { - - hawk.utils.storage._cache[key] = value; - }, - getItem: function (key) { - - return hawk.utils.storage._cache[key]; - } - }, - - setStorage: function (storage) { - - var ntpOffset = hawk.utils.getNtpOffset() || 0; - hawk.utils.storage = storage; - hawk.utils.setNtpOffset(ntpOffset); - }, - - setNtpOffset: function (offset) { - - hawk.utils.storage.setItem('hawk_ntp_offset', offset); - }, - - getNtpOffset: function () { - - return parseInt(hawk.utils.storage.getItem('hawk_ntp_offset') || '0', 10); - }, - - now: function () { - - return Date.now() + hawk.utils.getNtpOffset(); - }, - - escapeHeaderAttribute: function (attribute) { - - return attribute.replace(/\\/g, '\\\\').replace(/\"/g, '\\"'); - }, - - parseContentType: function (header) { - - if (!header) { - return ''; - } - - return header.split(';')[0].trim().toLowerCase(); - }, - - parseAuthorizationHeader: function (header, keys) { - - if (!header) { - return null; - } - - var headerParts = header.match(/^(\w+)(?:\s+(.*))?$/); // Header: scheme[ something] - if (!headerParts) { - return null; - } - - var scheme = headerParts[1]; - if (scheme.toLowerCase() !== 'hawk') { - return null; - } - - var attributesString = headerParts[2]; - if (!attributesString) { - return null; - } - - var attributes = {}; - var verify = attributesString.replace(/(\w+)="([^"\\]*)"\s*(?:,\s*|$)/g, function ($0, $1, $2) { - - // Check valid attribute names - - if (keys.indexOf($1) === -1) { - return; - } - - // Allowed attribute value characters: !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9 - - if ($2.match(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~]+$/) === null) { - return; - } - - // Check for duplicates - - if (attributes.hasOwnProperty($1)) { - return; - } - - attributes[$1] = $2; - return ''; - }); - - if (verify !== '') { - return null; - } - - return attributes; - }, - - randomString: function (size) { - - var randomSource = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; - var len = randomSource.length; - - var result = []; - for (var i = 0; i < size; ++i) { - result[i] = randomSource[Math.floor(Math.random() * len)]; - } - - return result.join(''); - }, - - parseUri: function (input) { - - // Based on: parseURI 1.2.2 - // http://blog.stevenlevithan.com/archives/parseuri - // (c) Steven Levithan <stevenlevithan.com> - // MIT License - - var keys = ['source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'hostname', 'port', 'resource', 'relative', 'pathname', 'directory', 'file', 'query', 'fragment']; - - var uriRegex = /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?(((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?)(?:#(.*))?)/; - var uriByNumber = uriRegex.exec(input); - var uri = {}; - - var i = 15; - while (i--) { - uri[keys[i]] = uriByNumber[i] || ''; - } - - if (uri.port === null || - uri.port === '') { - - uri.port = (uri.protocol.toLowerCase() === 'http' ? '80' : (uri.protocol.toLowerCase() === 'https' ? '443' : '')); - } - - return uri; - } -}; - - -// Based on: Crypto-JS v3.1.2 -// Copyright (c) 2009-2013, Jeff Mott. All rights reserved. -// http://code.google.com/p/crypto-js/ -// http://code.google.com/p/crypto-js/wiki/License - -var CryptoJS=CryptoJS||function(h,r){var k={},l=k.lib={},n=function(){},f=l.Base={extend:function(a){n.prototype=this;var b=new n;a&&b.mixIn(a);b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)});b.init.prototype=b;b.$super=this;return b},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},j=l.WordArray=f.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=r?b:4*a.length},toString:function(a){return(a||s).stringify(this)},concat:function(a){var b=this.words,d=a.words,c=this.sigBytes;a=a.sigBytes;this.clamp();if(c%4)for(var e=0;e<a;e++)b[c+e>>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((c+e)%4);else if(65535<d.length)for(e=0;e<a;e+=4)b[c+e>>>2]=d[e>>>2];else b.push.apply(b,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<<32-8*(b%4);a.length=h.ceil(b/4)},clone:function(){var a=f.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],d=0;d<a;d+=4)b.push(4294967296*h.random()|0);return new j.init(b,a)}}),m=k.enc={},s=m.Hex={stringify:function(a){var b=a.words;a=a.sigBytes;for(var d=[],c=0;c<a;c++){var e=b[c>>>2]>>>24-8*(c%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c<b;c+=2)d[c>>>3]|=parseInt(a.substr(c,2),16)<<24-4*(c%8);return new j.init(d,b/2)}},p=m.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var d=[],c=0;c<a;c++)d.push(String.fromCharCode(b[c>>>2]>>>24-8*(c%4)&255));return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c<b;c++)d[c>>>2]|=(a.charCodeAt(c)&255)<<24-8*(c%4);return new j.init(d,b)}},t=m.Utf8={stringify:function(a){try{return decodeURIComponent(escape(p.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return p.parse(unescape(encodeURIComponent(a)))}},q=l.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new j.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=t.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,d=b.words,c=b.sigBytes,e=this.blockSize,f=c/(4*e),f=a?h.ceil(f):h.max((f|0)-this._minBufferSize,0);a=f*e;c=h.min(4*a,c);if(a){for(var g=0;g<a;g+=e)this._doProcessBlock(d,g);g=d.splice(0,a);b.sigBytes-=c}return new j.init(g,c)},clone:function(){var a=f.clone.call(this);a._data=this._data.clone();return a},_minBufferSize:0});l.Hasher=q.extend({cfg:f.extend(),init:function(a){this.cfg=this.cfg.extend(a);this.reset()},reset:function(){q.reset.call(this);this._doReset()},update:function(a){this._append(a);this._process();return this},finalize:function(a){a&&this._append(a);return this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,d){return(new a.init(d)).finalize(b)}},_createHmacHelper:function(a){return function(b,d){return(new u.HMAC.init(a,d)).finalize(b)}}});var u=k.algo={};return k}(Math); -(function () { var k = CryptoJS, b = k.lib, m = b.WordArray, l = b.Hasher, d = [], b = k.algo.SHA1 = l.extend({ _doReset: function () { this._hash = new m.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (n, p) { for (var a = this._hash.words, e = a[0], f = a[1], h = a[2], j = a[3], b = a[4], c = 0; 80 > c; c++) { if (16 > c) d[c] = n[p + c] | 0; else { var g = d[c - 3] ^ d[c - 8] ^ d[c - 14] ^ d[c - 16]; d[c] = g << 1 | g >>> 31 } g = (e << 5 | e >>> 27) + b + d[c]; g = 20 > c ? g + ((f & h | ~f & j) + 1518500249) : 40 > c ? g + ((f ^ h ^ j) + 1859775393) : 60 > c ? g + ((f & h | f & j | h & j) - 1894007588) : g + ((f ^ h ^ j) - 899497514); b = j; j = h; h = f << 30 | f >>> 2; f = e; e = g } a[0] = a[0] + e | 0; a[1] = a[1] + f | 0; a[2] = a[2] + h | 0; a[3] = a[3] + j | 0; a[4] = a[4] + b | 0 }, _doFinalize: function () { var b = this._data, d = b.words, a = 8 * this._nDataBytes, e = 8 * b.sigBytes; d[e >>> 5] |= 128 << 24 - e % 32; d[(e + 64 >>> 9 << 4) + 14] = Math.floor(a / 4294967296); d[(e + 64 >>> 9 << 4) + 15] = a; b.sigBytes = 4 * d.length; this._process(); return this._hash }, clone: function () { var b = l.clone.call(this); b._hash = this._hash.clone(); return b } }); k.SHA1 = l._createHelper(b); k.HmacSHA1 = l._createHmacHelper(b) })(); -(function (k) { for (var g = CryptoJS, h = g.lib, v = h.WordArray, j = h.Hasher, h = g.algo, s = [], t = [], u = function (q) { return 4294967296 * (q - (q | 0)) | 0 }, l = 2, b = 0; 64 > b;) { var d; a: { d = l; for (var w = k.sqrt(d), r = 2; r <= w; r++) if (!(d % r)) { d = !1; break a } d = !0 } d && (8 > b && (s[b] = u(k.pow(l, 0.5))), t[b] = u(k.pow(l, 1 / 3)), b++); l++ } var n = [], h = h.SHA256 = j.extend({ _doReset: function () { this._hash = new v.init(s.slice(0)) }, _doProcessBlock: function (q, h) { for (var a = this._hash.words, c = a[0], d = a[1], b = a[2], k = a[3], f = a[4], g = a[5], j = a[6], l = a[7], e = 0; 64 > e; e++) { if (16 > e) n[e] = q[h + e] | 0; else { var m = n[e - 15], p = n[e - 2]; n[e] = ((m << 25 | m >>> 7) ^ (m << 14 | m >>> 18) ^ m >>> 3) + n[e - 7] + ((p << 15 | p >>> 17) ^ (p << 13 | p >>> 19) ^ p >>> 10) + n[e - 16] } m = l + ((f << 26 | f >>> 6) ^ (f << 21 | f >>> 11) ^ (f << 7 | f >>> 25)) + (f & g ^ ~f & j) + t[e] + n[e]; p = ((c << 30 | c >>> 2) ^ (c << 19 | c >>> 13) ^ (c << 10 | c >>> 22)) + (c & d ^ c & b ^ d & b); l = j; j = g; g = f; f = k + m | 0; k = b; b = d; d = c; c = m + p | 0 } a[0] = a[0] + c | 0; a[1] = a[1] + d | 0; a[2] = a[2] + b | 0; a[3] = a[3] + k | 0; a[4] = a[4] + f | 0; a[5] = a[5] + g | 0; a[6] = a[6] + j | 0; a[7] = a[7] + l | 0 }, _doFinalize: function () { var d = this._data, b = d.words, a = 8 * this._nDataBytes, c = 8 * d.sigBytes; b[c >>> 5] |= 128 << 24 - c % 32; b[(c + 64 >>> 9 << 4) + 14] = k.floor(a / 4294967296); b[(c + 64 >>> 9 << 4) + 15] = a; d.sigBytes = 4 * b.length; this._process(); return this._hash }, clone: function () { var b = j.clone.call(this); b._hash = this._hash.clone(); return b } }); g.SHA256 = j._createHelper(h); g.HmacSHA256 = j._createHmacHelper(h) })(Math); -(function(){var c=CryptoJS,k=c.enc.Utf8;c.algo.HMAC=c.lib.Base.extend({init:function(a,b){a=this._hasher=new a.init;"string"==typeof b&&(b=k.parse(b));var c=a.blockSize,e=4*c;b.sigBytes>e&&(b=a.finalize(b));b.clamp();for(var f=this._oKey=b.clone(),g=this._iKey=b.clone(),h=f.words,j=g.words,d=0;d<c;d++)h[d]^=1549556828,j[d]^=909522486;f.sigBytes=g.sigBytes=e;this.reset()},reset:function(){var a=this._hasher;a.reset();a.update(this._iKey)},update:function(a){this._hasher.update(a);return this},finalize:function(a){var b=this._hasher;a=b.finalize(a);b.reset();return b.finalize(this._oKey.clone().concat(a))}})})(); -(function(){var h=CryptoJS,j=h.lib.WordArray;h.enc.Base64={stringify:function(b){var e=b.words,f=b.sigBytes,c=this._map;b.clamp();b=[];for(var a=0;a<f;a+=3)for(var d=(e[a>>>2]>>>24-8*(a%4)&255)<<16|(e[a+1>>>2]>>>24-8*((a+1)%4)&255)<<8|e[a+2>>>2]>>>24-8*((a+2)%4)&255,g=0;4>g&&a+0.75*g<f;g++)b.push(c.charAt(d>>>6*(3-g)&63));if(e=c.charAt(64))for(;b.length%4;)b.push(e);return b.join("")},parse:function(b){var e=b.length,f=this._map,c=f.charAt(64);c&&(c=b.indexOf(c),-1!=c&&(e=c));for(var c=[],a=0,d=0;d<e;d++)if(d%4){var g=f.indexOf(b.charAt(d-1))<<2*(d%4),h=f.indexOf(b.charAt(d))>>>6-2*(d%4);c[a>>>2]|=(g|h)<<24-8*(a%4);a++}return j.create(c,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/client.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/client.js deleted file mode 100755 index 41984582..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/client.js +++ /dev/null @@ -1,367 +0,0 @@ -// Load modules - -var Url = require('url'); -var Hoek = require('hoek'); -var Cryptiles = require('cryptiles'); -var Crypto = require('./crypto'); -var Utils = require('./utils'); - - -// Declare internals - -var internals = {}; - - -// Generate an Authorization header for a given request - -/* - uri: 'http://example.com/resource?a=b' or object from Url.parse() - method: HTTP verb (e.g. 'GET', 'POST') - options: { - - // Required - - credentials: { - id: 'dh37fgj492je', - key: 'aoijedoaijsdlaksjdl', - algorithm: 'sha256' // 'sha1', 'sha256' - }, - - // Optional - - ext: 'application-specific', // Application specific data sent via the ext attribute - timestamp: Date.now(), // A pre-calculated timestamp - nonce: '2334f34f', // A pre-generated nonce - localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided) - payload: '{"some":"payload"}', // UTF-8 encoded string for body hash generation (ignored if hash provided) - contentType: 'application/json', // Payload content-type (ignored if hash provided) - hash: 'U4MKKSmiVxk37JCCrAVIjV=', // Pre-calculated payload hash - app: '24s23423f34dx', // Oz application id - dlg: '234sz34tww3sd' // Oz delegated-by application id - } -*/ - -exports.header = function (uri, method, options) { - - var result = { - field: '', - artifacts: {} - }; - - // Validate inputs - - if (!uri || (typeof uri !== 'string' && typeof uri !== 'object') || - !method || typeof method !== 'string' || - !options || typeof options !== 'object') { - - return result; - } - - // Application time - - var timestamp = options.timestamp || Math.floor((Utils.now() + (options.localtimeOffsetMsec || 0)) / 1000) - - // Validate credentials - - var credentials = options.credentials; - if (!credentials || - !credentials.id || - !credentials.key || - !credentials.algorithm) { - - // Invalid credential object - return result; - } - - if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return result; - } - - // Parse URI - - if (typeof uri === 'string') { - uri = Url.parse(uri); - } - - // Calculate signature - - var artifacts = { - ts: timestamp, - nonce: options.nonce || Cryptiles.randomString(6), - method: method, - resource: uri.pathname + (uri.search || ''), // Maintain trailing '?' - host: uri.hostname, - port: uri.port || (uri.protocol === 'http:' ? 80 : 443), - hash: options.hash, - ext: options.ext, - app: options.app, - dlg: options.dlg - }; - - result.artifacts = artifacts; - - // Calculate payload hash - - if (!artifacts.hash && - options.hasOwnProperty('payload')) { - - artifacts.hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType); - } - - var mac = Crypto.calculateMac('header', credentials, artifacts); - - // Construct header - - var hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== ''; // Other falsey values allowed - var header = 'Hawk id="' + credentials.id + - '", ts="' + artifacts.ts + - '", nonce="' + artifacts.nonce + - (artifacts.hash ? '", hash="' + artifacts.hash : '') + - (hasExt ? '", ext="' + Utils.escapeHeaderAttribute(artifacts.ext) : '') + - '", mac="' + mac + '"'; - - if (artifacts.app) { - header += ', app="' + artifacts.app + - (artifacts.dlg ? '", dlg="' + artifacts.dlg : '') + '"'; - } - - result.field = header; - - return result; -}; - - -// Validate server response - -/* - res: node's response object - artifacts: object recieved from header().artifacts - options: { - payload: optional payload received - required: specifies if a Server-Authorization header is required. Defaults to 'false' - } -*/ - -exports.authenticate = function (res, credentials, artifacts, options) { - - artifacts = Hoek.clone(artifacts); - options = options || {}; - - if (res.headers['www-authenticate']) { - - // Parse HTTP WWW-Authenticate header - - var attributes = Utils.parseAuthorizationHeader(res.headers['www-authenticate'], ['ts', 'tsm', 'error']); - if (attributes instanceof Error) { - return false; - } - - if (attributes.ts) { - var tsm = Crypto.calculateTsMac(attributes.ts, credentials); - if (tsm !== attributes.tsm) { - return false; - } - } - } - - // Parse HTTP Server-Authorization header - - if (!res.headers['server-authorization'] && - !options.required) { - - return true; - } - - var attributes = Utils.parseAuthorizationHeader(res.headers['server-authorization'], ['mac', 'ext', 'hash']); - if (attributes instanceof Error) { - return false; - } - - artifacts.ext = attributes.ext; - artifacts.hash = attributes.hash; - - var mac = Crypto.calculateMac('response', credentials, artifacts); - if (mac !== attributes.mac) { - return false; - } - - if (!options.hasOwnProperty('payload')) { - return true; - } - - if (!attributes.hash) { - return false; - } - - var calculatedHash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, res.headers['content-type']); - return (calculatedHash === attributes.hash); -}; - - -// Generate a bewit value for a given URI - -/* - * credentials is an object with the following keys: 'id, 'key', 'algorithm'. - * options is an object with the following optional keys: 'ext', 'localtimeOffsetMsec' - */ -/* - uri: 'http://example.com/resource?a=b' or object from Url.parse() - options: { - - // Required - - credentials: { - id: 'dh37fgj492je', - key: 'aoijedoaijsdlaksjdl', - algorithm: 'sha256' // 'sha1', 'sha256' - }, - ttlSec: 60 * 60, // TTL in seconds - - // Optional - - ext: 'application-specific', // Application specific data sent via the ext attribute - localtimeOffsetMsec: 400 // Time offset to sync with server time - }; -*/ - -exports.getBewit = function (uri, options) { - - // Validate inputs - - if (!uri || - (typeof uri !== 'string' && typeof uri !== 'object') || - !options || - typeof options !== 'object' || - !options.ttlSec) { - - return ''; - } - - options.ext = (options.ext === null || options.ext === undefined ? '' : options.ext); // Zero is valid value - - // Application time - - var now = Utils.now() + (options.localtimeOffsetMsec || 0); - - // Validate credentials - - var credentials = options.credentials; - if (!credentials || - !credentials.id || - !credentials.key || - !credentials.algorithm) { - - return ''; - } - - if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return ''; - } - - // Parse URI - - if (typeof uri === 'string') { - uri = Url.parse(uri); - } - - // Calculate signature - - var exp = Math.floor(now / 1000) + options.ttlSec; - var mac = Crypto.calculateMac('bewit', credentials, { - ts: exp, - nonce: '', - method: 'GET', - resource: uri.pathname + (uri.search || ''), // Maintain trailing '?' - host: uri.hostname, - port: uri.port || (uri.protocol === 'http:' ? 80 : 443), - ext: options.ext - }); - - // Construct bewit: id\exp\mac\ext - - var bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + options.ext; - return Utils.base64urlEncode(bewit); -}; - - -// Generate an authorization string for a message - -/* - host: 'example.com', - port: 8000, - message: '{"some":"payload"}', // UTF-8 encoded string for body hash generation - options: { - - // Required - - credentials: { - id: 'dh37fgj492je', - key: 'aoijedoaijsdlaksjdl', - algorithm: 'sha256' // 'sha1', 'sha256' - }, - - // Optional - - timestamp: Date.now(), // A pre-calculated timestamp - nonce: '2334f34f', // A pre-generated nonce - localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided) - } -*/ - -exports.message = function (host, port, message, options) { - - // Validate inputs - - if (!host || typeof host !== 'string' || - !port || typeof port !== 'number' || - message === null || message === undefined || typeof message !== 'string' || - !options || typeof options !== 'object') { - - return null; - } - - // Application time - - var timestamp = options.timestamp || Math.floor((Utils.now() + (options.localtimeOffsetMsec || 0)) / 1000) - - // Validate credentials - - var credentials = options.credentials; - if (!credentials || - !credentials.id || - !credentials.key || - !credentials.algorithm) { - - // Invalid credential object - return null; - } - - if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return null; - } - - // Calculate signature - - var artifacts = { - ts: timestamp, - nonce: options.nonce || Cryptiles.randomString(6), - host: host, - port: port, - hash: Crypto.calculatePayloadHash(message, credentials.algorithm) - }; - - // Construct authorization - - var result = { - id: credentials.id, - ts: artifacts.ts, - nonce: artifacts.nonce, - hash: artifacts.hash, - mac: Crypto.calculateMac('message', credentials, artifacts) - }; - - return result; -}; - - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/crypto.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/crypto.js deleted file mode 100755 index 150340a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/crypto.js +++ /dev/null @@ -1,111 +0,0 @@ -// Load modules - -var Crypto = require('crypto'); -var Url = require('url'); -var Utils = require('./utils'); - - -// Declare internals - -var internals = {}; - - -// MAC normalization format version - -exports.headerVersion = '1'; // Prevent comparison of mac values generated with different normalized string formats - - -// Supported HMAC algorithms - -exports.algorithms = ['sha1', 'sha256']; - - -// Calculate the request MAC - -/* - type: 'header', // 'header', 'bewit', 'response' - credentials: { - key: 'aoijedoaijsdlaksjdl', - algorithm: 'sha256' // 'sha1', 'sha256' - }, - options: { - method: 'GET', - resource: '/resource?a=1&b=2', - host: 'example.com', - port: 8080, - ts: 1357718381034, - nonce: 'd3d345f', - hash: 'U4MKKSmiVxk37JCCrAVIjV/OhB3y+NdwoCr6RShbVkE=', - ext: 'app-specific-data', - app: 'hf48hd83qwkj', // Application id (Oz) - dlg: 'd8djwekds9cj' // Delegated by application id (Oz), requires options.app - } -*/ - -exports.calculateMac = function (type, credentials, options) { - - var normalized = exports.generateNormalizedString(type, options); - - var hmac = Crypto.createHmac(credentials.algorithm, credentials.key).update(normalized); - var digest = hmac.digest('base64'); - return digest; -}; - - -exports.generateNormalizedString = function (type, options) { - - var normalized = 'hawk.' + exports.headerVersion + '.' + type + '\n' + - options.ts + '\n' + - options.nonce + '\n' + - (options.method || '').toUpperCase() + '\n' + - (options.resource || '') + '\n' + - options.host.toLowerCase() + '\n' + - options.port + '\n' + - (options.hash || '') + '\n'; - - if (options.ext) { - normalized += options.ext.replace('\\', '\\\\').replace('\n', '\\n'); - } - - normalized += '\n'; - - if (options.app) { - normalized += options.app + '\n' + - (options.dlg || '') + '\n'; - } - - return normalized; -}; - - -exports.calculatePayloadHash = function (payload, algorithm, contentType) { - - var hash = exports.initializePayloadHash(algorithm, contentType); - hash.update(payload || ''); - return exports.finalizePayloadHash(hash); -}; - - -exports.initializePayloadHash = function (algorithm, contentType) { - - var hash = Crypto.createHash(algorithm); - hash.update('hawk.' + exports.headerVersion + '.payload\n'); - hash.update(Utils.parseContentType(contentType) + '\n'); - return hash; -}; - - -exports.finalizePayloadHash = function (hash) { - - hash.update('\n'); - return hash.digest('base64'); -}; - - -exports.calculateTsMac = function (ts, credentials) { - - var hmac = Crypto.createHmac(credentials.algorithm, credentials.key); - hmac.update('hawk.' + exports.headerVersion + '.ts\n' + ts + '\n'); - return hmac.digest('base64'); -}; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/index.js deleted file mode 100755 index 1d713cb6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/index.js +++ /dev/null @@ -1,15 +0,0 @@ -// Export sub-modules - -exports.error = exports.Error = require('boom'); -exports.sntp = require('sntp'); -exports.server = require('./server'); -exports.client = require('./client'); -exports.crypto = require('./crypto'); -exports.utils = require('./utils'); - -exports.uri = { - authenticate: exports.server.authenticateBewit, - getBewit: exports.client.getBewit -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/server.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/server.js deleted file mode 100755 index 478c47b3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/server.js +++ /dev/null @@ -1,524 +0,0 @@ -// Load modules - -var Boom = require('boom'); -var Hoek = require('hoek'); -var Cryptiles = require('cryptiles'); -var Crypto = require('./crypto'); -var Utils = require('./utils'); - - -// Declare internals - -var internals = {}; - - -// Hawk authentication - -/* - req: node's HTTP request object or an object as follows: - - var request = { - method: 'GET', - url: '/resource/4?a=1&b=2', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", ext="some-app-ext-data", mac="6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE="' - }; - - credentialsFunc: required function to lookup the set of Hawk credentials based on the provided credentials id. - The credentials include the MAC key, MAC algorithm, and other attributes (such as username) - needed by the application. This function is the equivalent of verifying the username and - password in Basic authentication. - - var credentialsFunc = function (id, callback) { - - // Lookup credentials in database - db.lookup(id, function (err, item) { - - if (err || !item) { - return callback(err); - } - - var credentials = { - // Required - key: item.key, - algorithm: item.algorithm, - // Application specific - user: item.user - }; - - return callback(null, credentials); - }); - }; - - options: { - - hostHeaderName: optional header field name, used to override the default 'Host' header when used - behind a cache of a proxy. Apache2 changes the value of the 'Host' header while preserving - the original (which is what the module must verify) in the 'x-forwarded-host' header field. - Only used when passed a node Http.ServerRequest object. - - nonceFunc: optional nonce validation function. The function signature is function(nonce, ts, callback) - where 'callback' must be called using the signature function(err). - - timestampSkewSec: optional number of seconds of permitted clock skew for incoming timestamps. Defaults to 60 seconds. - Provides a +/- skew which means actual allowed window is double the number of seconds. - - localtimeOffsetMsec: optional local clock time offset express in a number of milliseconds (positive or negative). - Defaults to 0. - - payload: optional payload for validation. The client calculates the hash value and includes it via the 'hash' - header attribute. The server always ensures the value provided has been included in the request - MAC. When this option is provided, it validates the hash value itself. Validation is done by calculating - a hash value over the entire payload (assuming it has already be normalized to the same format and - encoding used by the client to calculate the hash on request). If the payload is not available at the time - of authentication, the authenticatePayload() method can be used by passing it the credentials and - attributes.hash returned in the authenticate callback. - - host: optional host name override. Only used when passed a node request object. - port: optional port override. Only used when passed a node request object. - } - - callback: function (err, credentials, artifacts) { } - */ - -exports.authenticate = function (req, credentialsFunc, options, callback) { - - callback = Utils.nextTick(callback); - - // Default options - - options.nonceFunc = options.nonceFunc || function (nonce, ts, nonceCallback) { return nonceCallback(); }; // No validation - options.timestampSkewSec = options.timestampSkewSec || 60; // 60 seconds - - // Application time - - var now = Utils.now() + (options.localtimeOffsetMsec || 0); // Measure now before any other processing - - // Convert node Http request object to a request configuration object - - var request = Utils.parseRequest(req, options); - if (request instanceof Error) { - return callback(Boom.badRequest(request.message)); - } - - // Parse HTTP Authorization header - - var attributes = Utils.parseAuthorizationHeader(request.authorization); - if (attributes instanceof Error) { - return callback(attributes); - } - - // Construct artifacts container - - var artifacts = { - method: request.method, - host: request.host, - port: request.port, - resource: request.url, - ts: attributes.ts, - nonce: attributes.nonce, - hash: attributes.hash, - ext: attributes.ext, - app: attributes.app, - dlg: attributes.dlg, - mac: attributes.mac, - id: attributes.id - }; - - // Verify required header attributes - - if (!attributes.id || - !attributes.ts || - !attributes.nonce || - !attributes.mac) { - - return callback(Boom.badRequest('Missing attributes'), null, artifacts); - } - - // Fetch Hawk credentials - - credentialsFunc(attributes.id, function (err, credentials) { - - if (err) { - return callback(err, credentials || null, artifacts); - } - - if (!credentials) { - return callback(Boom.unauthorized('Unknown credentials', 'Hawk'), null, artifacts); - } - - if (!credentials.key || - !credentials.algorithm) { - - return callback(Boom.internal('Invalid credentials'), credentials, artifacts); - } - - if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return callback(Boom.internal('Unknown algorithm'), credentials, artifacts); - } - - // Calculate MAC - - var mac = Crypto.calculateMac('header', credentials, artifacts); - if (!Cryptiles.fixedTimeComparison(mac, attributes.mac)) { - return callback(Boom.unauthorized('Bad mac', 'Hawk'), credentials, artifacts); - } - - // Check payload hash - - if (options.payload !== null && - options.payload !== undefined) { // '' is valid - - if (!attributes.hash) { - return callback(Boom.unauthorized('Missing required payload hash', 'Hawk'), credentials, artifacts); - } - - var hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, request.contentType); - if (!Cryptiles.fixedTimeComparison(hash, attributes.hash)) { - return callback(Boom.unauthorized('Bad payload hash', 'Hawk'), credentials, artifacts); - } - } - - // Check nonce - - options.nonceFunc(attributes.nonce, attributes.ts, function (err) { - - if (err) { - return callback(Boom.unauthorized('Invalid nonce', 'Hawk'), credentials, artifacts); - } - - // Check timestamp staleness - - if (Math.abs((attributes.ts * 1000) - now) > (options.timestampSkewSec * 1000)) { - var fresh = Math.floor((Utils.now() + (options.localtimeOffsetMsec || 0)) / 1000); // Get fresh now - var tsm = Crypto.calculateTsMac(fresh, credentials); - return callback(Boom.unauthorized('Stale timestamp', 'Hawk', { ts: fresh, tsm: tsm }), credentials, artifacts); - } - - // Successful authentication - - return callback(null, credentials, artifacts); - }); - }); -}; - - -// Authenticate payload hash - used when payload cannot be provided during authenticate() - -/* - payload: raw request payload - credentials: from authenticate callback - artifacts: from authenticate callback - contentType: req.headers['content-type'] -*/ - -exports.authenticatePayload = function (payload, credentials, artifacts, contentType) { - - var calculatedHash = Crypto.calculatePayloadHash(payload, credentials.algorithm, contentType); - return Cryptiles.fixedTimeComparison(calculatedHash, artifacts.hash); -}; - - -// Generate a Server-Authorization header for a given response - -/* - credentials: {}, // Object received from authenticate() - artifacts: {} // Object received from authenticate(); 'mac', 'hash', and 'ext' - ignored - options: { - ext: 'application-specific', // Application specific data sent via the ext attribute - payload: '{"some":"payload"}', // UTF-8 encoded string for body hash generation (ignored if hash provided) - contentType: 'application/json', // Payload content-type (ignored if hash provided) - hash: 'U4MKKSmiVxk37JCCrAVIjV=' // Pre-calculated payload hash - } -*/ - -exports.header = function (credentials, artifacts, options) { - - // Prepare inputs - - options = options || {}; - - if (!artifacts || - typeof artifacts !== 'object' || - typeof options !== 'object') { - - return ''; - } - - artifacts = Hoek.clone(artifacts); - delete artifacts.mac; - artifacts.hash = options.hash; - artifacts.ext = options.ext; - - // Validate credentials - - if (!credentials || - !credentials.key || - !credentials.algorithm) { - - // Invalid credential object - return ''; - } - - if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return ''; - } - - // Calculate payload hash - - if (!artifacts.hash && - options.hasOwnProperty('payload')) { - - artifacts.hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType); - } - - var mac = Crypto.calculateMac('response', credentials, artifacts); - - // Construct header - - var header = 'Hawk mac="' + mac + '"' + - (artifacts.hash ? ', hash="' + artifacts.hash + '"' : ''); - - if (artifacts.ext !== null && - artifacts.ext !== undefined && - artifacts.ext !== '') { // Other falsey values allowed - - header += ', ext="' + Utils.escapeHeaderAttribute(artifacts.ext) + '"'; - } - - return header; -}; - - -/* - * Arguments and options are the same as authenticate() with the exception that the only supported options are: - * 'hostHeaderName', 'localtimeOffsetMsec', 'host', 'port' - */ - -exports.authenticateBewit = function (req, credentialsFunc, options, callback) { - - callback = Utils.nextTick(callback); - - // Application time - - var now = Utils.now() + (options.localtimeOffsetMsec || 0); - - // Convert node Http request object to a request configuration object - - var request = Utils.parseRequest(req, options); - if (request instanceof Error) { - return callback(Boom.badRequest(request.message)); - } - - // Extract bewit - - // 1 2 3 4 - var resource = request.url.match(/^(\/.*)([\?&])bewit\=([^&$]*)(?:&(.+))?$/); - if (!resource) { - return callback(Boom.unauthorized(null, 'Hawk')); - } - - // Bewit not empty - - if (!resource[3]) { - return callback(Boom.unauthorized('Empty bewit', 'Hawk')); - } - - // Verify method is GET - - if (request.method !== 'GET' && - request.method !== 'HEAD') { - - return callback(Boom.unauthorized('Invalid method', 'Hawk')); - } - - // No other authentication - - if (request.authorization) { - return callback(Boom.badRequest('Multiple authentications', 'Hawk')); - } - - // Parse bewit - - var bewitString = Utils.base64urlDecode(resource[3]); - if (bewitString instanceof Error) { - return callback(Boom.badRequest('Invalid bewit encoding')); - } - - // Bewit format: id\exp\mac\ext ('\' is used because it is a reserved header attribute character) - - var bewitParts = bewitString.split('\\'); - if (!bewitParts || - bewitParts.length !== 4) { - - return callback(Boom.badRequest('Invalid bewit structure')); - } - - var bewit = { - id: bewitParts[0], - exp: parseInt(bewitParts[1], 10), - mac: bewitParts[2], - ext: bewitParts[3] || '' - }; - - if (!bewit.id || - !bewit.exp || - !bewit.mac) { - - return callback(Boom.badRequest('Missing bewit attributes')); - } - - // Construct URL without bewit - - var url = resource[1]; - if (resource[4]) { - url += resource[2] + resource[4]; - } - - // Check expiration - - if (bewit.exp * 1000 <= now) { - return callback(Boom.unauthorized('Access expired', 'Hawk'), null, bewit); - } - - // Fetch Hawk credentials - - credentialsFunc(bewit.id, function (err, credentials) { - - if (err) { - return callback(err, credentials || null, bewit.ext); - } - - if (!credentials) { - return callback(Boom.unauthorized('Unknown credentials', 'Hawk'), null, bewit); - } - - if (!credentials.key || - !credentials.algorithm) { - - return callback(Boom.internal('Invalid credentials'), credentials, bewit); - } - - if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return callback(Boom.internal('Unknown algorithm'), credentials, bewit); - } - - // Calculate MAC - - var mac = Crypto.calculateMac('bewit', credentials, { - ts: bewit.exp, - nonce: '', - method: 'GET', - resource: url, - host: request.host, - port: request.port, - ext: bewit.ext - }); - - if (!Cryptiles.fixedTimeComparison(mac, bewit.mac)) { - return callback(Boom.unauthorized('Bad mac', 'Hawk'), credentials, bewit); - } - - // Successful authentication - - return callback(null, credentials, bewit); - }); -}; - - -/* - * options are the same as authenticate() with the exception that the only supported options are: - * 'nonceFunc', 'timestampSkewSec', 'localtimeOffsetMsec' - */ - -exports.authenticateMessage = function (host, port, message, authorization, credentialsFunc, options, callback) { - - callback = Utils.nextTick(callback); - - // Default options - - options.nonceFunc = options.nonceFunc || function (nonce, ts, nonceCallback) { return nonceCallback(); }; // No validation - options.timestampSkewSec = options.timestampSkewSec || 60; // 60 seconds - - // Application time - - var now = Utils.now() + (options.localtimeOffsetMsec || 0); // Measure now before any other processing - - // Validate authorization - - if (!authorization.id || - !authorization.ts || - !authorization.nonce || - !authorization.hash || - !authorization.mac) { - - return callback(Boom.badRequest('Invalid authorization')) - } - - // Fetch Hawk credentials - - credentialsFunc(authorization.id, function (err, credentials) { - - if (err) { - return callback(err, credentials || null); - } - - if (!credentials) { - return callback(Boom.unauthorized('Unknown credentials', 'Hawk')); - } - - if (!credentials.key || - !credentials.algorithm) { - - return callback(Boom.internal('Invalid credentials'), credentials); - } - - if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return callback(Boom.internal('Unknown algorithm'), credentials); - } - - // Construct artifacts container - - var artifacts = { - ts: authorization.ts, - nonce: authorization.nonce, - host: host, - port: port, - hash: authorization.hash - }; - - // Calculate MAC - - var mac = Crypto.calculateMac('message', credentials, artifacts); - if (!Cryptiles.fixedTimeComparison(mac, authorization.mac)) { - return callback(Boom.unauthorized('Bad mac', 'Hawk'), credentials); - } - - // Check payload hash - - var hash = Crypto.calculatePayloadHash(message, credentials.algorithm); - if (!Cryptiles.fixedTimeComparison(hash, authorization.hash)) { - return callback(Boom.unauthorized('Bad message hash', 'Hawk'), credentials); - } - - // Check nonce - - options.nonceFunc(authorization.nonce, authorization.ts, function (err) { - - if (err) { - return callback(Boom.unauthorized('Invalid nonce', 'Hawk'), credentials); - } - - // Check timestamp staleness - - if (Math.abs((authorization.ts * 1000) - now) > (options.timestampSkewSec * 1000)) { - return callback(Boom.unauthorized('Stale timestamp'), credentials); - } - - // Successful authentication - - return callback(null, credentials); - }); - }); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/utils.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/utils.js deleted file mode 100755 index c8938fe8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/utils.js +++ /dev/null @@ -1,183 +0,0 @@ -// Load modules - -var Hoek = require('hoek'); -var Sntp = require('sntp'); -var Boom = require('boom'); - - -// Declare internals - -var internals = {}; - - -// Import Hoek Utilities - -internals.import = function () { - - for (var i in Hoek) { - if (Hoek.hasOwnProperty(i)) { - exports[i] = Hoek[i]; - } - } -}; - -internals.import(); - - -// Hawk version - -exports.version = function () { - - return exports.loadPackage(__dirname + '/..').version; -}; - - -// Extract host and port from request - -exports.parseHost = function (req, hostHeaderName) { - - hostHeaderName = (hostHeaderName ? hostHeaderName.toLowerCase() : 'host'); - var hostHeader = req.headers[hostHeaderName]; - if (!hostHeader) { - return null; - } - - var hostHeaderRegex; - if (hostHeader[0] === '[') { - hostHeaderRegex = /^(?:(?:\r\n)?\s)*(\[[^\]]+\])(?::(\d+))?(?:(?:\r\n)?\s)*$/; // IPv6 - } - else { - hostHeaderRegex = /^(?:(?:\r\n)?\s)*([^:]+)(?::(\d+))?(?:(?:\r\n)?\s)*$/; // IPv4, hostname - } - - var hostParts = hostHeader.match(hostHeaderRegex); - - if (!hostParts || - hostParts.length !== 3 || - !hostParts[1]) { - - return null; - } - - return { - name: hostParts[1], - port: (hostParts[2] ? hostParts[2] : (req.connection && req.connection.encrypted ? 443 : 80)) - }; -}; - - -// Parse Content-Type header content - -exports.parseContentType = function (header) { - - if (!header) { - return ''; - } - - return header.split(';')[0].trim().toLowerCase(); -}; - - -// Convert node's to request configuration object - -exports.parseRequest = function (req, options) { - - if (!req.headers) { - return req; - } - - // Obtain host and port information - - if (!options.host || !options.port) { - var host = exports.parseHost(req, options.hostHeaderName); - if (!host) { - return new Error('Invalid Host header'); - } - } - - var request = { - method: req.method, - url: req.url, - host: options.host || host.name, - port: options.port || host.port, - authorization: req.headers.authorization, - contentType: req.headers['content-type'] || '' - }; - - return request; -}; - - -exports.now = function () { - - return Sntp.now(); -}; - - -// Parse Hawk HTTP Authorization header - -exports.parseAuthorizationHeader = function (header, keys) { - - keys = keys || ['id', 'ts', 'nonce', 'hash', 'ext', 'mac', 'app', 'dlg']; - - if (!header) { - return Boom.unauthorized(null, 'Hawk'); - } - - var headerParts = header.match(/^(\w+)(?:\s+(.*))?$/); // Header: scheme[ something] - if (!headerParts) { - return Boom.badRequest('Invalid header syntax'); - } - - var scheme = headerParts[1]; - if (scheme.toLowerCase() !== 'hawk') { - return Boom.unauthorized(null, 'Hawk'); - } - - var attributesString = headerParts[2]; - if (!attributesString) { - return Boom.badRequest('Invalid header syntax'); - } - - var attributes = {}; - var errorMessage = ''; - var verify = attributesString.replace(/(\w+)="([^"\\]*)"\s*(?:,\s*|$)/g, function ($0, $1, $2) { - - // Check valid attribute names - - if (keys.indexOf($1) === -1) { - errorMessage = 'Unknown attribute: ' + $1; - return; - } - - // Allowed attribute value characters: !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9 - - if ($2.match(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~]+$/) === null) { - errorMessage = 'Bad attribute value: ' + $1; - return; - } - - // Check for duplicates - - if (attributes.hasOwnProperty($1)) { - errorMessage = 'Duplicate attribute: ' + $1; - return; - } - - attributes[$1] = $2; - return ''; - }); - - if (verify !== '') { - return Boom.badRequest(errorMessage || 'Bad header format'); - } - - return attributes; -}; - - -exports.unauthorized = function (message) { - - return Boom.unauthorized(message, 'Hawk'); -}; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/.npmignore deleted file mode 100644 index 77ba16cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/.npmignore +++ /dev/null @@ -1,18 +0,0 @@ -.idea -*.iml -npm-debug.log -dump.rdb -node_modules -results.tap -results.xml -npm-shrinkwrap.json -config.json -.DS_Store -*/.DS_Store -*/*/.DS_Store -._* -*/._* -*/*/._* -coverage.* -lib-cov - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml deleted file mode 100755 index 047f7e3d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js - -node_js: - - 0.10 - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE deleted file mode 100755 index 911b97ee..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2012-2013, Walmart. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Walmart nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL WALMART BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/Makefile deleted file mode 100755 index 884ec6db..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -test: - @node node_modules/lab/bin/lab -test-cov: - @node node_modules/lab/bin/lab -r threshold -t 100 -test-cov-html: - @node node_modules/lab/bin/lab -r html -o coverage.html -complexity: - @node node_modules/complexity-report/src/cli.js -o complexity.md -f markdown lib - -.PHONY: test test-cov test-cov-html complexity - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/README.md deleted file mode 100755 index 1970b1c4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/README.md +++ /dev/null @@ -1,6 +0,0 @@ -<a href="https://github.com/spumko"><img src="https://raw.github.com/spumko/spumko/master/images/from.png" align="right" /></a> -![boom Logo](https://raw.github.com/spumko/boom/master/images/boom.png) - -HTTP-friendly error objects - -[![Build Status](https://secure.travis-ci.org/spumko/boom.png)](http://travis-ci.org/spumko/boom) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png deleted file mode 100755 index 373bc134..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/index.js deleted file mode 100755 index 4cc88b35..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib'); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js deleted file mode 100755 index 0bbeed95..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js +++ /dev/null @@ -1,207 +0,0 @@ -// Load modules - -var Http = require('http'); -var NodeUtil = require('util'); -var Hoek = require('hoek'); - - -// Declare internals - -var internals = {}; - - -exports = module.exports = internals.Boom = function (/* (new Error) or (code, message) */) { - - var self = this; - - Hoek.assert(this.constructor === internals.Boom, 'Error must be instantiated using new'); - - Error.call(this); - this.isBoom = true; - - this.response = { - code: 0, - payload: {}, - headers: {} - // type: 'content-type' - }; - - if (arguments[0] instanceof Error) { - - // Error - - var error = arguments[0]; - - this.data = error; - this.response.code = error.code || 500; - if (error.message) { - this.message = error.message; - } - } - else { - - // code, message - - var code = arguments[0]; - var message = arguments[1]; - - Hoek.assert(!isNaN(parseFloat(code)) && isFinite(code) && code >= 400, 'First argument must be a number (400+)'); - - this.response.code = code; - if (message) { - this.message = message; - } - } - - // Response format - - this.reformat(); - - return this; -}; - -NodeUtil.inherits(internals.Boom, Error); - - -internals.Boom.prototype.reformat = function () { - - this.response.payload.code = this.response.code; - this.response.payload.error = Http.STATUS_CODES[this.response.code] || 'Unknown'; - if (this.message) { - this.response.payload.message = Hoek.escapeHtml(this.message); // Prevent XSS from error message - } -}; - - -// Utilities - -internals.Boom.badRequest = function (message) { - - return new internals.Boom(400, message); -}; - - -internals.Boom.unauthorized = function (message, scheme, attributes) { // Or function (message, wwwAuthenticate[]) - - var err = new internals.Boom(401, message); - - if (!scheme) { - return err; - } - - var wwwAuthenticate = ''; - - if (typeof scheme === 'string') { - - // function (message, scheme, attributes) - - wwwAuthenticate = scheme; - if (attributes) { - var names = Object.keys(attributes); - for (var i = 0, il = names.length; i < il; ++i) { - if (i) { - wwwAuthenticate += ','; - } - - var value = attributes[names[i]]; - if (value === null || - value === undefined) { // Value can be zero - - value = ''; - } - wwwAuthenticate += ' ' + names[i] + '="' + Hoek.escapeHeaderAttribute(value.toString()) + '"'; - } - } - - if (message) { - if (attributes) { - wwwAuthenticate += ','; - } - wwwAuthenticate += ' error="' + Hoek.escapeHeaderAttribute(message) + '"'; - } - else { - err.isMissing = true; - } - } - else { - - // function (message, wwwAuthenticate[]) - - var wwwArray = scheme; - for (var i = 0, il = wwwArray.length; i < il; ++i) { - if (i) { - wwwAuthenticate += ', '; - } - - wwwAuthenticate += wwwArray[i]; - } - } - - err.response.headers['WWW-Authenticate'] = wwwAuthenticate; - - return err; -}; - - -internals.Boom.clientTimeout = function (message) { - - return new internals.Boom(408, message); -}; - - -internals.Boom.serverTimeout = function (message) { - - return new internals.Boom(503, message); -}; - - -internals.Boom.forbidden = function (message) { - - return new internals.Boom(403, message); -}; - - -internals.Boom.notFound = function (message) { - - return new internals.Boom(404, message); -}; - - -internals.Boom.internal = function (message, data) { - - var err = new internals.Boom(500, message); - - if (data && data.stack) { - err.trace = data.stack.split('\n'); - err.outterTrace = Hoek.displayStack(1); - } - else { - err.trace = Hoek.displayStack(1); - } - - err.data = data; - err.response.payload.message = 'An internal server error occurred'; // Hide actual error from user - - return err; -}; - - -internals.Boom.passThrough = function (code, payload, contentType, headers) { - - var err = new internals.Boom(500, 'Pass-through'); // 500 code is only used to initialize - - err.data = { - code: code, - payload: payload, - type: contentType - }; - - err.response.code = code; - err.response.type = contentType; - err.response.headers = headers; - err.response.payload = payload; - - return err; -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/package.json deleted file mode 100755 index a6c56b90..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "boom", - "description": "HTTP-friendly error objects", - "version": "0.4.2", - "author": { - "name": "Eran Hammer", - "email": "eran@hueniverse.com", - "url": "http://hueniverse.com" - }, - "contributors": [], - "repository": { - "type": "git", - "url": "git://github.com/spumko/boom" - }, - "main": "index", - "keywords": [ - "error", - "http" - ], - "engines": { - "node": ">=0.8.0" - }, - "dependencies": { - "hoek": "0.9.x" - }, - "devDependencies": { - "lab": "0.1.x", - "complexity-report": "0.x.x" - }, - "scripts": { - "test": "make test-cov" - }, - "licenses": [ - { - "type": "BSD", - "url": "http://github.com/spumko/boom/raw/master/LICENSE" - } - ], - "readme": "<a href=\"https://github.com/spumko\"><img src=\"https://raw.github.com/spumko/spumko/master/images/from.png\" align=\"right\" /></a>\n![boom Logo](https://raw.github.com/spumko/boom/master/images/boom.png)\n\nHTTP-friendly error objects\n\n[![Build Status](https://secure.travis-ci.org/spumko/boom.png)](http://travis-ci.org/spumko/boom)\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/spumko/boom/issues" - }, - "homepage": "https://github.com/spumko/boom", - "_id": "boom@0.4.2", - "dist": { - "shasum": "92a32f029aba10e290058f22c83377d073ed5cdd" - }, - "_from": "boom@0.4.x", - "_resolved": "https://registry.npmjs.org/boom/-/boom-0.4.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js deleted file mode 100755 index a20c1c34..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js +++ /dev/null @@ -1,245 +0,0 @@ -// Load modules - -var Lab = require('lab'); -var Boom = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Boom', function () { - - it('returns an error with info when constructed using another error', function (done) { - - var error = new Error('ka-boom'); - error.xyz = 123; - var err = new Boom(error); - expect(err.data.xyz).to.equal(123); - expect(err.message).to.equal('ka-boom'); - expect(err.response).to.deep.equal({ - code: 500, - payload: { - code: 500, - error: 'Internal Server Error', - message: 'ka-boom' - }, - headers: {} - }); - done(); - }); - - describe('#isBoom', function () { - - it('returns true for Boom object', function (done) { - - expect(Boom.badRequest().isBoom).to.equal(true); - done(); - }); - - it('returns false for Error object', function (done) { - - expect(new Error().isBoom).to.not.exist; - done(); - }); - }); - - describe('#badRequest', function () { - - it('returns a 400 error code', function (done) { - - expect(Boom.badRequest().response.code).to.equal(400); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.badRequest('my message').message).to.equal('my message'); - done(); - }); - }); - - describe('#unauthorized', function () { - - it('returns a 401 error code', function (done) { - - var err = Boom.unauthorized(); - expect(err.response.code).to.equal(401); - expect(err.response.headers).to.deep.equal({}); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.unauthorized('my message').message).to.equal('my message'); - done(); - }); - - it('returns a WWW-Authenticate header when passed a scheme', function (done) { - - var err = Boom.unauthorized('boom', 'Test'); - expect(err.response.code).to.equal(401); - expect(err.response.headers['WWW-Authenticate']).to.equal('Test error="boom"'); - done(); - }); - - it('returns a WWW-Authenticate header when passed a scheme and attributes', function (done) { - - var err = Boom.unauthorized('boom', 'Test', { a: 1, b: 'something', c: null, d: 0 }); - expect(err.response.code).to.equal(401); - expect(err.response.headers['WWW-Authenticate']).to.equal('Test a="1", b="something", c="", d="0", error="boom"'); - done(); - }); - - it('sets the isMissing flag when error message is empty', function (done) { - - var err = Boom.unauthorized('', 'Basic'); - expect(err.isMissing).to.equal(true); - done(); - }); - - it('does not set the isMissing flag when error message is not empty', function (done) { - - var err = Boom.unauthorized('message', 'Basic'); - expect(err.isMissing).to.equal(undefined); - done(); - }); - - it('sets a WWW-Authenticate when passed as an array', function (done) { - - var err = Boom.unauthorized('message', ['Basic', 'Example e="1"', 'Another x="3", y="4"']); - expect(err.response.headers['WWW-Authenticate']).to.equal('Basic, Example e="1", Another x="3", y="4"'); - done(); - }); - }); - - describe('#clientTimeout', function () { - - it('returns a 408 error code', function (done) { - - expect(Boom.clientTimeout().response.code).to.equal(408); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.clientTimeout('my message').message).to.equal('my message'); - done(); - }); - }); - - describe('#serverTimeout', function () { - - it('returns a 503 error code', function (done) { - - expect(Boom.serverTimeout().response.code).to.equal(503); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.serverTimeout('my message').message).to.equal('my message'); - done(); - }); - }); - - describe('#forbidden', function () { - - it('returns a 403 error code', function (done) { - - expect(Boom.forbidden().response.code).to.equal(403); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.forbidden('my message').message).to.equal('my message'); - done(); - }); - }); - - describe('#notFound', function () { - - it('returns a 404 error code', function (done) { - - expect(Boom.notFound().response.code).to.equal(404); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.notFound('my message').message).to.equal('my message'); - done(); - }); - }); - - describe('#internal', function () { - - it('returns a 500 error code', function (done) { - - expect(Boom.internal().response.code).to.equal(500); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - var err = Boom.internal('my message'); - expect(err.message).to.equal('my message'); - expect(err.response.payload.message).to.equal('An internal server error occurred'); - done(); - }); - - it('passes data on the callback if its passed in', function (done) { - - expect(Boom.internal('my message', { my: 'data' }).data.my).to.equal('data'); - done(); - }); - - it('uses passed in stack if its available', function (done) { - - var error = new Error(); - error.stack = 'my stack line\nmy second stack line'; - expect(Boom.internal('my message', error).trace[0]).to.equal('my stack line'); - done(); - }); - }); - - describe('#passThrough', function () { - - it('returns a pass-through error', function (done) { - - var err = Boom.passThrough(499, { a: 1 }, 'application/text', { 'X-Test': 'Boom' }); - expect(err.response.code).to.equal(499); - expect(err.message).to.equal('Pass-through'); - expect(err.response).to.deep.equal({ - code: 499, - payload: { a: 1 }, - headers: { 'X-Test': 'Boom' }, - type: 'application/text' - }); - done(); - }); - }); - - describe('#reformat', function () { - - it('encodes any HTML markup in the response payload', function (done) { - - var boom = new Boom(new Error('<script>alert(1)</script>')); - expect(boom.response.payload.message).to.not.contain('<script>'); - done(); - }); - }); -}); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore deleted file mode 100644 index b3bb5176..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore +++ /dev/null @@ -1,18 +0,0 @@ -.idea -*.iml -npm-debug.log -dump.rdb -node_modules -results.tap -results.xml -npm-shrinkwrap.json -config.json -.DS_Store -*/.DS_Store -*/*/.DS_Store -._* -*/._* -*/*/._* -coverage.* -lib-cov - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml deleted file mode 100755 index 40ca59ee..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js - -node_js: - - 0.10 - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE deleted file mode 100755 index e699a7bd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2012-2013, Eran Hammer. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Eran Hammer nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL ERAN HAMMER BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile deleted file mode 100755 index 9e7138c2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -test: - @./node_modules/.bin/lab -test-cov: - @./node_modules/.bin/lab -r threshold -t 100 -test-cov-html: - @./node_modules/.bin/lab -r html -o coverage.html -complexity: - @./node_modules/.bin/cr -o complexity.md -f markdown lib - -.PHONY: test test-cov test-cov-html complexity - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md deleted file mode 100644 index 6a900a49..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md +++ /dev/null @@ -1,6 +0,0 @@ -cryptiles -========= - -General purpose crypto utilities - -[![Build Status](https://secure.travis-ci.org/hueniverse/cryptiles.png)](http://travis-ci.org/hueniverse/cryptiles) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js deleted file mode 100755 index 4cc88b35..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib'); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js deleted file mode 100755 index dcf2bc38..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js +++ /dev/null @@ -1,68 +0,0 @@ -// Load modules - -var Crypto = require('crypto'); -var Boom = require('boom'); - - -// Declare internals - -var internals = {}; - - -// Generate a cryptographically strong pseudo-random data - -exports.randomString = function (size) { - - var buffer = exports.randomBits((size + 1) * 6); - if (buffer instanceof Error) { - return buffer; - } - - var string = buffer.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, ''); - return string.slice(0, size); -}; - - -exports.randomBits = function (bits) { - - if (!bits || - bits < 0) { - - return Boom.internal('Invalid random bits count'); - } - - var bytes = Math.ceil(bits / 8); - try { - return Crypto.randomBytes(bytes); - } - catch (err) { - return Boom.internal('Failed generating random bits: ' + err.message); - } -}; - - -// Compare two strings using fixed time algorithm (to prevent time-based analysis of MAC digest match) - -exports.fixedTimeComparison = function (a, b) { - - if (typeof a !== 'string' || - typeof b !== 'string') { - - return false; - } - - var mismatch = (a.length === b.length ? 0 : 1); - if (mismatch) { - b = a; - } - - for (var i = 0, il = a.length; i < il; ++i) { - var ac = a.charCodeAt(i); - var bc = b.charCodeAt(i); - mismatch += (ac === bc ? 0 : 1); - } - - return (mismatch === 0); -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json deleted file mode 100755 index cafe4c1b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "cryptiles", - "description": "General purpose crypto utilities", - "version": "0.2.2", - "author": { - "name": "Eran Hammer", - "email": "eran@hueniverse.com", - "url": "http://hueniverse.com" - }, - "contributors": [], - "repository": { - "type": "git", - "url": "git://github.com/hueniverse/cryptiles" - }, - "main": "index", - "keywords": [ - "cryptography", - "security", - "utilites" - ], - "engines": { - "node": ">=0.8.0" - }, - "dependencies": { - "boom": "0.4.x" - }, - "devDependencies": { - "lab": "0.1.x", - "complexity-report": "0.x.x" - }, - "scripts": { - "test": "make test-cov" - }, - "licenses": [ - { - "type": "BSD", - "url": "http://github.com/hueniverse/cryptiles/raw/master/LICENSE" - } - ], - "readme": "cryptiles\n=========\n\nGeneral purpose crypto utilities\n\n[![Build Status](https://secure.travis-ci.org/hueniverse/cryptiles.png)](http://travis-ci.org/hueniverse/cryptiles)\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/hueniverse/cryptiles/issues" - }, - "homepage": "https://github.com/hueniverse/cryptiles", - "_id": "cryptiles@0.2.2", - "dist": { - "shasum": "0462e8adb7667ffa104947a34a96e68627d8c95d" - }, - "_from": "cryptiles@0.2.x", - "_resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-0.2.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js deleted file mode 100755 index 58aaa70b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js +++ /dev/null @@ -1,101 +0,0 @@ -// Load modules - -var Lab = require('lab'); -var Cryptiles = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Cryptiles', function () { - - describe('#randomString', function () { - - it('should generate the right length string', function (done) { - - for (var i = 1; i <= 1000; ++i) { - expect(Cryptiles.randomString(i).length).to.equal(i); - } - - done(); - }); - - it('returns an error on invalid bits size', function (done) { - - expect(Cryptiles.randomString(99999999999999999999).message).to.equal('Failed generating random bits: Argument #1 must be number > 0'); - done(); - }); - }); - - describe('#randomBits', function () { - - it('returns an error on invalid input', function (done) { - - expect(Cryptiles.randomBits(0).message).to.equal('Invalid random bits count'); - done(); - }); - }); - - describe('#fixedTimeComparison', function () { - - var a = Cryptiles.randomString(50000); - var b = Cryptiles.randomString(150000); - - it('should take the same amount of time comparing different string sizes', function (done) { - - var now = Date.now(); - Cryptiles.fixedTimeComparison(b, a); - var t1 = Date.now() - now; - - now = Date.now(); - Cryptiles.fixedTimeComparison(b, b); - var t2 = Date.now() - now; - - expect(t2 - t1).to.be.within(-20, 20); - done(); - }); - - it('should return true for equal strings', function (done) { - - expect(Cryptiles.fixedTimeComparison(a, a)).to.equal(true); - done(); - }); - - it('should return false for different strings (size, a < b)', function (done) { - - expect(Cryptiles.fixedTimeComparison(a, a + 'x')).to.equal(false); - done(); - }); - - it('should return false for different strings (size, a > b)', function (done) { - - expect(Cryptiles.fixedTimeComparison(a + 'x', a)).to.equal(false); - done(); - }); - - it('should return false for different strings (size, a = b)', function (done) { - - expect(Cryptiles.fixedTimeComparison(a + 'x', a + 'y')).to.equal(false); - done(); - }); - - it('should return false when not a string', function (done) { - - expect(Cryptiles.fixedTimeComparison('x', null)).to.equal(false); - done(); - }); - }); -}); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore deleted file mode 100644 index 9966e5e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore +++ /dev/null @@ -1,18 +0,0 @@ -.idea -*.iml -npm-debug.log -dump.rdb -node_modules -results.tap -results.xml -npm-shrinkwrap.json -config.json -.DS_Store -*/.DS_Store -*/*/.DS_Store -._* -*/._* -*/*/._* -coverage.* -lib-cov -complexity.md diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml deleted file mode 100755 index 40ca59ee..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js - -node_js: - - 0.10 - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE deleted file mode 100755 index 394adcff..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE +++ /dev/null @@ -1,33 +0,0 @@ -Copyright (c) 2011-2013, Walmart. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Walmart nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL WALMART BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - * * * - - -Portions of this project were initially based on Postmile, Copyright (c) 2011, Yahoo Inc. -Postmile is published at https://github.com/yahoo/postmile and its licensing terms are -published at https://github.com/yahoo/postmile/blob/master/LICENSE. - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile deleted file mode 100755 index e605d6c0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -test: - @node node_modules/lab/bin/lab -test-cov: - @node node_modules/lab/bin/lab -r threshold -t 100 -test-cov-html: - @node node_modules/lab/bin/lab -r html -o coverage.html -complexity: - @node node_modules/complexity-report/src/cli.js -o complexity.md -f markdown lib - -.PHONY: test test-cov test-cov-html complexity diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/README.md deleted file mode 100755 index ac64e2fd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/README.md +++ /dev/null @@ -1,436 +0,0 @@ -<a href="https://github.com/spumko"><img src="https://raw.github.com/spumko/spumko/master/images/from.png" align="right" /></a> -![hoek Logo](https://raw.github.com/spumko/hoek/master/images/hoek.png) - -General purpose node utilities - -[![Build Status](https://secure.travis-ci.org/spumko/hoek.png)](http://travis-ci.org/spumko/hoek) - -# Table of Contents - -* [Introduction](#introduction "Introduction") -* [Object](#object "Object") - * [clone](#cloneobj "clone") - * [merge](#mergetarget-source-isnulloverride-ismergearrays "merge") - * [applyToDefaults](#applytodefaultsdefaults-options "applyToDefaults") - * [unique](#uniquearray-key "unique") - * [mapToObject](#maptoobjectarray-key "mapToObject") - * [intersect](#intersectarray1-array2 "intersect") - * [matchKeys](#matchkeysobj-keys "matchKeys") - * [flatten](#flattenarray-target "flatten") - * [removeKeys](#removekeysobject-keys "removeKeys") - * [reach](#reachobj-chain "reach") - * [inheritAsync](#inheritasyncself-obj-keys "inheritAsync") - * [rename](#renameobj-from-to "rename") -* [Timer](#timer "Timer") -* [Binary Encoding/Decoding](#binary "Binary Encoding/Decoding") - * [base64urlEncode](#binary64urlEncodevalue "binary64urlEncode") - * [base64urlDecode](#binary64urlDecodevalue "binary64urlDecode") -* [Escaping Characters](#escaped "Escaping Characters") - * [escapeHtml](#escapeHtmlstring "escapeHtml") - * [escapeHeaderAttribute](#escapeHeaderAttributeattribute "escapeHeaderAttribute") - * [escapeRegex](#escapeRegexstring "escapeRegex") -* [Errors](#errors "Errors") - * [assert](#assertmessage "assert") - * [abort](#abortmessage "abort") - * [displayStack](#displayStackslice "displayStack") - * [callStack](#callStackslice "callStack") - * [toss](#tosscondition "toss") -* [Load files](#load-files "Load Files") - * [loadPackage](#loadPackagedir "loadpackage") - * [loadDirModules](#loadDirModulespath-excludefiles-target "loaddirmodules") - - - -# Introduction - -The *Hoek* general purpose node utilities library is used to aid in a variety of manners. It comes with useful methods for Arrays (clone, merge, applyToDefaults), Objects (removeKeys, copy), Asserting and more. - -For example, to use Hoek to set configuration with default options: -```javascript -var Hoek = require('hoek'); - -var default = {url : "www.github.com", port : "8000", debug : true} - -var config = Hoek.applyToDefaults(default, {port : "3000", admin : true}); - -// In this case, config would be { url: 'www.github.com', port: '3000', debug: true, admin: true } -``` - -Under each of the sections (such as Array), there are subsections which correspond to Hoek methods. Each subsection will explain how to use the corresponding method. In each js excerpt below, the var Hoek = require('hoek') is omitted for brevity. - -## Object - -Hoek provides several helpful methods for objects and arrays. - -### clone(obj) - -This method is used to clone an object or an array. A *deep copy* is made (duplicates everything, including values that are objects). - -```javascript - -var nestedObj = { - w: /^something$/ig, - x: { - a: [1, 2, 3], - b: 123456, - c: new Date() - }, - y: 'y', - z: new Date() - }; - -var copy = Hoek.clone(nestedObj); - -copy.x.b = 100; - -console.log(copy.y) // results in 'y' -console.log(nestedObj.x.b) // results in 123456 -console.log(copy.x.b) // results in 100 -``` - -### merge(target, source, isNullOverride, isMergeArrays) -isNullOverride, isMergeArrays default to true - -Merge all the properties of source into target, source wins in conflic, and by default null and undefined from source are applied - - -```javascript - -var target = {a: 1, b : 2} -var source = {a: 0, c: 5} -var source2 = {a: null, c: 5} - -var targetArray = [1, 2, 3]; -var sourceArray = [4, 5]; - -var newTarget = Hoek.merge(target, source); // results in {a: 0, b: 2, c: 5} -newTarget = Hoek.merge(target, source2); // results in {a: null, b: 2, c: 5} -newTarget = Hoek.merge(target, source2, false); // results in {a: 1, b: 2, c: 5} - -newTarget = Hoek.merge(targetArray, sourceArray) // results in [1, 2, 3, 4, 5] -newTarget = Hoek.merge(targetArray, sourceArray, true, false) // results in [4, 5] - - - - -``` - -### applyToDefaults(defaults, options) - -Apply options to a copy of the defaults - -```javascript - -var defaults = {host: "localhost", port: 8000}; -var options = {port: 8080}; - -var config = Hoek.applyToDefaults(defaults, options); // results in {host: "localhost", port: 8080}; - - -``` - -### unique(array, key) - -Remove duplicate items from Array - -```javascript - -var array = [1, 2, 2, 3, 3, 4, 5, 6]; - -var newArray = Hoek.unique(array); // results in [1,2,3,4,5,6]; - -array = [{id: 1}, {id: 1}, {id: 2}]; - -newArray = Hoek.unique(array, "id") // results in [{id: 1}, {id: 2}] - -``` - -### mapToObject(array, key) - -Convert an Array into an Object - -```javascript - -var array = [1,2,3]; -var newObject = Hoek.mapToObject(array); // results in [{"1": true}, {"2": true}, {"3": true}] - -array = [{id: 1}, {id: 2}]; -newObject = Hoek.mapToObject(array, "id") // results in [{"id": 1}, {"id": 2}] - -``` -### intersect(array1, array2) - -Find the common unique items in two arrays - -```javascript - -var array1 = [1, 2, 3]; -var array2 = [1, 4, 5]; - -var newArray = Hoek.intersect(array1, array2) // results in [1] - -``` - -### matchKeys(obj, keys) - -Find which keys are present - -```javascript - -var obj = {a: 1, b: 2, c: 3}; -var keys = ["a", "e"]; - -Hoek.matchKeys(obj, keys) // returns ["a"] - -``` - -### flatten(array, target) - -Flatten an array - -```javascript - -var array = [1, 2, 3]; -var target = [4, 5]; - -var flattenedArray = Hoek.flatten(array, target) // results in [4, 5, 1, 2, 3]; - -``` - -### removeKeys(object, keys) - -Remove keys - -```javascript - -var object = {a: 1, b: 2, c: 3, d: 4}; - -var keys = ["a", "b"]; - -Hoek.removeKeys(object, keys) // object is now {c: 3, d: 4} - -``` - -### reach(obj, chain) - -Converts an object key chain string to reference - -```javascript - -var chain = 'a.b.c'; -var obj = {a : {b : { c : 1}}}; - -Hoek.reach(obj, chain) // returns 1 - -``` - -### inheritAsync(self, obj, keys) - -Inherits a selected set of methods from an object, wrapping functions in asynchronous syntax and catching errors - -```javascript - -var targetFunc = function () { }; - -var proto = { - a: function () { - return 'a!'; - }, - b: function () { - return 'b!'; - }, - c: function () { - throw new Error('c!'); - } - }; - -var keys = ['a', 'c']; - -Hoek.inheritAsync(targetFunc, proto, ['a', 'c']); - -var target = new targetFunc(); - -target.a(function(err, result){console.log(result)} // returns 'a!' - -target.c(function(err, result){console.log(result)} // returns undefined - -target.b(function(err, result){console.log(result)} // gives error: Object [object Object] has no method 'b' - -``` - -### rename(obj, from, to) - -Rename a key of an object - -```javascript - -var obj = {a : 1, b : 2}; - -Hoek.rename(obj, "a", "c"); // obj is now {c : 1, b : 2} - -``` - - -# Timer - -A Timer object. Initializing a new timer object sets the ts to the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC. - -```javascript - - -example : - - -var timerObj = new Hoek.Timer(); -console.log("Time is now: " + timerObj.ts) -console.log("Elapsed time from initialization: " + timerObj.elapsed() + 'milliseconds') - -``` - -# Binary Encoding/Decoding - -### base64urlEncode(value) - -Encodes value in Base64 or URL encoding - -### base64urlDecode(value) - -Decodes data in Base64 or URL encoding. -# Escaping Characters - -Hoek provides convenient methods for escaping html characters. The escaped characters are as followed: - -```javascript - -internals.htmlEscaped = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '`': '`' -}; - -``` - -### escapeHtml(string) - -```javascript - -var string = '<html> hey </html>'; -var escapedString = Hoek.escapeHtml(string); // returns <html> hey </html> - -``` - -### escapeHeaderAttribute(attribute) - -Escape attribute value for use in HTTP header - -```javascript - -var a = Hoek.escapeHeaderAttribute('I said "go w\\o me"'); //returns I said \"go w\\o me\" - - -``` - - -### escapeRegex(string) - -Escape string for Regex construction - -```javascript - -var a = Hoek.escapeRegex('4^f$s.4*5+-_?%=#!:@|~\\/`"(>)[<]d{}s,'); // returns 4\^f\$s\.4\*5\+\-_\?%\=#\!\:@\|~\\\/`"\(>\)\[<\]d\{\}s\, - - - -``` - -# Errors - -### assert(message) - -```javascript - -var a = 1, b =2; - -Hoek.assert(a === b, 'a should equal b'); // ABORT: a should equal b - -``` - -### abort(message) - -First checks if process.env.NODE_ENV === 'test', and if so, throws error message. Otherwise, -displays most recent stack and then exits process. - - - -### displayStack(slice) - -Displays the trace stack - -```javascript - -var stack = Hoek.displayStack(); -console.log(stack) // returns something like: - -[ 'null (/Users/user/Desktop/hoek/test.js:4:18)', - 'Module._compile (module.js:449:26)', - 'Module._extensions..js (module.js:467:10)', - 'Module.load (module.js:356:32)', - 'Module._load (module.js:312:12)', - 'Module.runMain (module.js:492:10)', - 'startup.processNextTick.process._tickCallback (node.js:244:9)' ] - -``` - -### callStack(slice) - -Returns a trace stack array. - -```javascript - -var stack = Hoek.callStack(); -console.log(stack) // returns something like: - -[ [ '/Users/user/Desktop/hoek/test.js', 4, 18, null, false ], - [ 'module.js', 449, 26, 'Module._compile', false ], - [ 'module.js', 467, 10, 'Module._extensions..js', false ], - [ 'module.js', 356, 32, 'Module.load', false ], - [ 'module.js', 312, 12, 'Module._load', false ], - [ 'module.js', 492, 10, 'Module.runMain', false ], - [ 'node.js', - 244, - 9, - 'startup.processNextTick.process._tickCallback', - false ] ] - - -``` - -### toss(condition) - -toss(condition /*, [message], callback */) - -Return an error as first argument of a callback - - -# Load Files - -### loadPackage(dir) - -Load and parse package.json process root or given directory - -```javascript - -var pack = Hoek.loadPackage(); // pack.name === 'hoek' - -``` - -### loadDirModules(path, excludeFiles, target) - -Loads modules from a given path; option to exclude files (array). - - - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png deleted file mode 100755 index 6ccfcb12..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/index.js deleted file mode 100755 index 4cc88b35..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib'); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js deleted file mode 100755 index 666b3dc8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js +++ /dev/null @@ -1,132 +0,0 @@ -// Declare internals - -var internals = {}; - - -exports.escapeJavaScript = function (input) { - - if (!input) { - return ''; - } - - var escaped = ''; - - for (var i = 0, il = input.length; i < il; ++i) { - - var charCode = input.charCodeAt(i); - - if (internals.isSafe(charCode)) { - escaped += input[i]; - } - else { - escaped += internals.escapeJavaScriptChar(charCode); - } - } - - return escaped; -}; - - -exports.escapeHtml = function (input) { - - if (!input) { - return ''; - } - - var escaped = ''; - - for (var i = 0, il = input.length; i < il; ++i) { - - var charCode = input.charCodeAt(i); - - if (internals.isSafe(charCode)) { - escaped += input[i]; - } - else { - escaped += internals.escapeHtmlChar(charCode); - } - } - - return escaped; -}; - - -internals.escapeJavaScriptChar = function (charCode) { - - if (charCode >= 256) { - return '\\u' + internals.padLeft('' + charCode, 4); - } - - var hexValue = new Buffer(String.fromCharCode(charCode), 'ascii').toString('hex'); - return '\\x' + internals.padLeft(hexValue, 2); -}; - - -internals.escapeHtmlChar = function (charCode) { - - var namedEscape = internals.namedHtml[charCode]; - if (typeof namedEscape !== 'undefined') { - return namedEscape; - } - - if (charCode >= 256) { - return '&#' + charCode + ';'; - } - - var hexValue = new Buffer(String.fromCharCode(charCode), 'ascii').toString('hex'); - return '&#x' + internals.padLeft(hexValue, 2) + ';'; -}; - - -internals.padLeft = function (str, len) { - - while (str.length < len) { - str = '0' + str; - } - - return str; -}; - - -internals.isSafe = function (charCode) { - - return (typeof internals.safeCharCodes[charCode] !== 'undefined'); -}; - - -internals.namedHtml = { - '38': '&', - '60': '<', - '62': '>', - '34': '"', - '160': ' ', - '162': '¢', - '163': '£', - '164': '¤', - '169': '©', - '174': '®' -}; - - -internals.safeCharCodes = (function () { - - var safe = {}; - - for (var i = 32; i < 123; ++i) { - - if ((i >= 97 && i <= 122) || // a-z - (i >= 65 && i <= 90) || // A-Z - (i >= 48 && i <= 57) || // 0-9 - i === 32 || // space - i === 46 || // . - i === 44 || // , - i === 45 || // - - i === 58 || // : - i === 95) { // _ - - safe[i] = null; - } - } - - return safe; -}()); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js deleted file mode 100755 index 806260d2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js +++ /dev/null @@ -1,585 +0,0 @@ -// Load modules - -var Fs = require('fs'); -var Escape = require('./escape'); - - -// Declare internals - -var internals = {}; - - -// Clone object or array - -exports.clone = function (obj, seen) { - - if (typeof obj !== 'object' || - obj === null) { - - return obj; - } - - seen = seen || { orig: [], copy: [] }; - - var lookup = seen.orig.indexOf(obj); - if (lookup !== -1) { - return seen.copy[lookup]; - } - - var newObj = (obj instanceof Array) ? [] : {}; - - seen.orig.push(obj); - seen.copy.push(newObj); - - for (var i in obj) { - if (obj.hasOwnProperty(i)) { - if (obj[i] instanceof Buffer) { - newObj[i] = new Buffer(obj[i]); - } - else if (obj[i] instanceof Date) { - newObj[i] = new Date(obj[i].getTime()); - } - else if (obj[i] instanceof RegExp) { - var flags = '' + (obj[i].global ? 'g' : '') + (obj[i].ignoreCase ? 'i' : '') + (obj[i].multiline ? 'm' : ''); - newObj[i] = new RegExp(obj[i].source, flags); - } - else { - newObj[i] = exports.clone(obj[i], seen); - } - } - } - - return newObj; -}; - - -// Merge all the properties of source into target, source wins in conflic, and by default null and undefined from source are applied - -exports.merge = function (target, source, isNullOverride /* = true */, isMergeArrays /* = true */) { - - exports.assert(target && typeof target == 'object', 'Invalid target value: must be an object'); - exports.assert(source === null || source === undefined || typeof source === 'object', 'Invalid source value: must be null, undefined, or an object'); - - if (!source) { - return target; - } - - if (source instanceof Array) { - exports.assert(target instanceof Array, 'Cannot merge array onto an object'); - if (isMergeArrays === false) { // isMergeArrays defaults to true - target.length = 0; // Must not change target assignment - } - - for (var i = 0, il = source.length; i < il; ++i) { - target.push(source[i]); - } - - return target; - } - - var keys = Object.keys(source); - for (var k = 0, kl = keys.length; k < kl; ++k) { - var key = keys[k]; - var value = source[key]; - if (value && - typeof value === 'object') { - - if (!target[key] || - typeof target[key] !== 'object') { - - target[key] = exports.clone(value); - } - else { - exports.merge(target[key], source[key], isNullOverride, isMergeArrays); - } - } - else { - if (value !== null && value !== undefined) { // Explicit to preserve empty strings - target[key] = value; - } - else if (isNullOverride !== false) { // Defaults to true - target[key] = value; - } - } - } - - return target; -}; - - -// Apply options to a copy of the defaults - -exports.applyToDefaults = function (defaults, options) { - - exports.assert(defaults && typeof defaults == 'object', 'Invalid defaults value: must be an object'); - exports.assert(!options || options === true || typeof options === 'object', 'Invalid options value: must be true, falsy or an object'); - - if (!options) { // If no options, return null - return null; - } - - var copy = exports.clone(defaults); - - if (options === true) { // If options is set to true, use defaults - return copy; - } - - return exports.merge(copy, options, false, false); -}; - - -// Remove duplicate items from array - -exports.unique = function (array, key) { - - var index = {}; - var result = []; - - for (var i = 0, il = array.length; i < il; ++i) { - var id = (key ? array[i][key] : array[i]); - if (index[id] !== true) { - - result.push(array[i]); - index[id] = true; - } - } - - return result; -}; - - -// Convert array into object - -exports.mapToObject = function (array, key) { - - if (!array) { - return null; - } - - var obj = {}; - for (var i = 0, il = array.length; i < il; ++i) { - if (key) { - if (array[i][key]) { - obj[array[i][key]] = true; - } - } - else { - obj[array[i]] = true; - } - } - - return obj; -}; - - -// Find the common unique items in two arrays - -exports.intersect = function (array1, array2, justFirst) { - - if (!array1 || !array2) { - return []; - } - - var common = []; - var hash = (array1 instanceof Array ? exports.mapToObject(array1) : array1); - var found = {}; - for (var i = 0, il = array2.length; i < il; ++i) { - if (hash[array2[i]] && !found[array2[i]]) { - if (justFirst) { - return array2[i]; - } - - common.push(array2[i]); - found[array2[i]] = true; - } - } - - return (justFirst ? null : common); -}; - - -// Find which keys are present - -exports.matchKeys = function (obj, keys) { - - var matched = []; - for (var i = 0, il = keys.length; i < il; ++i) { - if (obj.hasOwnProperty(keys[i])) { - matched.push(keys[i]); - } - } - return matched; -}; - - -// Flatten array - -exports.flatten = function (array, target) { - - var result = target || []; - - for (var i = 0, il = array.length; i < il; ++i) { - if (Array.isArray(array[i])) { - exports.flatten(array[i], result); - } - else { - result.push(array[i]); - } - } - - return result; -}; - - -// Remove keys - -exports.removeKeys = function (object, keys) { - - for (var i = 0, il = keys.length; i < il; i++) { - delete object[keys[i]]; - } -}; - - -// Convert an object key chain string ('a.b.c') to reference (object[a][b][c]) - -exports.reach = function (obj, chain) { - - var path = chain.split('.'); - var ref = obj; - for (var i = 0, il = path.length; i < il; ++i) { - if (ref) { - ref = ref[path[i]]; - } - } - - return ref; -}; - - -// Inherits a selected set of methods from an object, wrapping functions in asynchronous syntax and catching errors - -exports.inheritAsync = function (self, obj, keys) { - - keys = keys || null; - - for (var i in obj) { - if (obj.hasOwnProperty(i)) { - if (keys instanceof Array && - keys.indexOf(i) < 0) { - - continue; - } - - self.prototype[i] = (function (fn) { - - return function (next) { - - var result = null; - try { - result = fn(); - } - catch (err) { - return next(err); - } - - return next(null, result); - }; - })(obj[i]); - } - } -}; - - -exports.formatStack = function (stack) { - - var trace = []; - for (var i = 0, il = stack.length; i < il; ++i) { - var item = stack[i]; - trace.push([item.getFileName(), item.getLineNumber(), item.getColumnNumber(), item.getFunctionName(), item.isConstructor()]); - } - - return trace; -}; - - -exports.formatTrace = function (trace) { - - var display = []; - - for (var i = 0, il = trace.length; i < il; ++i) { - var row = trace[i]; - display.push((row[4] ? 'new ' : '') + row[3] + ' (' + row[0] + ':' + row[1] + ':' + row[2] + ')'); - } - - return display; -}; - - -exports.callStack = function (slice) { - - // http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi - - var v8 = Error.prepareStackTrace; - Error.prepareStackTrace = function (err, stack) { - - return stack; - }; - - var capture = {}; - Error.captureStackTrace(capture, arguments.callee); - var stack = capture.stack; - - Error.prepareStackTrace = v8; - - var trace = exports.formatStack(stack); - - if (slice) { - return trace.slice(slice); - } - - return trace; -}; - - -exports.displayStack = function (slice) { - - var trace = exports.callStack(slice === undefined ? 1 : slice + 1); - - return exports.formatTrace(trace); -}; - - -exports.abortThrow = false; - - -exports.abort = function (message, hideStack) { - - if (process.env.NODE_ENV === 'test' || exports.abortThrow === true) { - throw new Error(message || 'Unknown error'); - } - - var stack = ''; - if (!hideStack) { - stack = exports.displayStack(1).join('\n\t'); - } - console.log('ABORT: ' + message + '\n\t' + stack); - process.exit(1); -}; - - -exports.assert = function (condition /*, msg1, msg2, msg3 */) { - - if (condition) { - return; - } - - var msgs = Array.prototype.slice.call(arguments, 1); - msgs = msgs.map(function (msg) { - - return typeof msg === 'string' ? msg : msg instanceof Error ? msg.message : JSON.stringify(msg); - }); - throw new Error(msgs.join(' ') || 'Unknown error'); -}; - - -exports.loadDirModules = function (path, excludeFiles, target) { // target(filename, name, capName) - - var exclude = {}; - for (var i = 0, il = excludeFiles.length; i < il; ++i) { - exclude[excludeFiles[i] + '.js'] = true; - } - - var files = Fs.readdirSync(path); - for (i = 0, il = files.length; i < il; ++i) { - var filename = files[i]; - if (/\.js$/.test(filename) && - !exclude[filename]) { - - var name = filename.substr(0, filename.lastIndexOf('.')); - var capName = name.charAt(0).toUpperCase() + name.substr(1).toLowerCase(); - - if (typeof target !== 'function') { - target[capName] = require(path + '/' + name); - } - else { - target(path + '/' + name, name, capName); - } - } - } -}; - - -exports.rename = function (obj, from, to) { - - obj[to] = obj[from]; - delete obj[from]; -}; - - -exports.Timer = function () { - - this.reset(); -}; - - -exports.Timer.prototype.reset = function () { - - this.ts = Date.now(); -}; - - -exports.Timer.prototype.elapsed = function () { - - return Date.now() - this.ts; -}; - - -// Load and parse package.json process root or given directory - -exports.loadPackage = function (dir) { - - var result = {}; - var filepath = (dir || process.env.PWD) + '/package.json'; - if (Fs.existsSync(filepath)) { - try { - result = JSON.parse(Fs.readFileSync(filepath)); - } - catch (e) { } - } - - return result; -}; - - -// Escape string for Regex construction - -exports.escapeRegex = function (string) { - - // Escape ^$.*+-?=!:|\/()[]{}, - return string.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g, '\\$&'); -}; - - -// Return an error as first argument of a callback - -exports.toss = function (condition /*, [message], next */) { - - var message = (arguments.length === 3 ? arguments[1] : ''); - var next = (arguments.length === 3 ? arguments[2] : arguments[1]); - - var err = (message instanceof Error ? message : (message ? new Error(message) : (condition instanceof Error ? condition : new Error()))); - - if (condition instanceof Error || - !condition) { - - return next(err); - } -}; - - -// Base64url (RFC 4648) encode - -exports.base64urlEncode = function (value) { - - return (new Buffer(value, 'binary')).toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, ''); -}; - - -// Base64url (RFC 4648) decode - -exports.base64urlDecode = function (encoded) { - - if (encoded && - !encoded.match(/^[\w\-]*$/)) { - - return new Error('Invalid character'); - } - - try { - return (new Buffer(encoded.replace(/-/g, '+').replace(/:/g, '/'), 'base64')).toString('binary'); - } - catch (err) { - return err; - } -}; - - -// Escape attribute value for use in HTTP header - -exports.escapeHeaderAttribute = function (attribute) { - - // Allowed value characters: !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9, \, " - - exports.assert(attribute.match(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/), 'Bad attribute value (' + attribute + ')'); - - return attribute.replace(/\\/g, '\\\\').replace(/\"/g, '\\"'); // Escape quotes and slash -}; - - -exports.escapeHtml = function (string) { - - return Escape.escapeHtml(string); -}; - - -exports.escapeJavaScript = function (string) { - - return Escape.escapeJavaScript(string); -}; - - -/* -var event = { - timestamp: now.getTime(), - tags: ['tag'], - data: { some: 'data' } -}; -*/ - -exports.consoleFunc = console.log; - -exports.printEvent = function (event) { - - var pad = function (value) { - - return (value < 10 ? '0' : '') + value; - }; - - var now = new Date(event.timestamp); - var timestring = (now.getYear() - 100).toString() + - pad(now.getMonth() + 1) + - pad(now.getDate()) + - '/' + - pad(now.getHours()) + - pad(now.getMinutes()) + - pad(now.getSeconds()) + - '.' + - now.getMilliseconds(); - - var data = event.data; - if (typeof event.data !== 'string') { - try { - data = JSON.stringify(event.data); - } - catch (e) { - data = 'JSON Error: ' + e.message; - } - } - - var output = timestring + ', ' + event.tags[0] + ', ' + data; - exports.consoleFunc(output); -}; - - -exports.nextTick = function (callback) { - - return function () { - - var args = arguments; - process.nextTick(function () { - - callback.apply(null, args); - }); - }; -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/package.json deleted file mode 100755 index 158eb318..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "hoek", - "description": "General purpose node utilities", - "version": "0.9.1", - "author": { - "name": "Eran Hammer", - "email": "eran@hueniverse.com", - "url": "http://hueniverse.com" - }, - "contributors": [ - { - "name": "Van Nguyen", - "email": "the.gol.effect@gmail.com" - } - ], - "repository": { - "type": "git", - "url": "git://github.com/spumko/hoek" - }, - "main": "index", - "keywords": [ - "utilities" - ], - "engines": { - "node": ">=0.8.0" - }, - "dependencies": {}, - "devDependencies": { - "lab": "0.1.x", - "complexity-report": "0.x.x" - }, - "scripts": { - "test": "make test-cov" - }, - "licenses": [ - { - "type": "BSD", - "url": "http://github.com/spumko/hoek/raw/master/LICENSE" - } - ], - "readme": "<a href=\"https://github.com/spumko\"><img src=\"https://raw.github.com/spumko/spumko/master/images/from.png\" align=\"right\" /></a>\r\n![hoek Logo](https://raw.github.com/spumko/hoek/master/images/hoek.png)\r\n\r\nGeneral purpose node utilities\r\n\r\n[![Build Status](https://secure.travis-ci.org/spumko/hoek.png)](http://travis-ci.org/spumko/hoek)\r\n\r\n# Table of Contents\r\n\r\n* [Introduction](#introduction \"Introduction\")\r\n* [Object](#object \"Object\")\r\n * [clone](#cloneobj \"clone\")\r\n * [merge](#mergetarget-source-isnulloverride-ismergearrays \"merge\")\r\n * [applyToDefaults](#applytodefaultsdefaults-options \"applyToDefaults\")\r\n * [unique](#uniquearray-key \"unique\")\r\n * [mapToObject](#maptoobjectarray-key \"mapToObject\")\r\n * [intersect](#intersectarray1-array2 \"intersect\")\r\n * [matchKeys](#matchkeysobj-keys \"matchKeys\")\r\n * [flatten](#flattenarray-target \"flatten\")\r\n * [removeKeys](#removekeysobject-keys \"removeKeys\")\r\n * [reach](#reachobj-chain \"reach\")\r\n * [inheritAsync](#inheritasyncself-obj-keys \"inheritAsync\")\r\n * [rename](#renameobj-from-to \"rename\")\r\n* [Timer](#timer \"Timer\")\r\n* [Binary Encoding/Decoding](#binary \"Binary Encoding/Decoding\")\r\n * [base64urlEncode](#binary64urlEncodevalue \"binary64urlEncode\")\r\n * [base64urlDecode](#binary64urlDecodevalue \"binary64urlDecode\")\r\n* [Escaping Characters](#escaped \"Escaping Characters\")\r\n * [escapeHtml](#escapeHtmlstring \"escapeHtml\")\r\n * [escapeHeaderAttribute](#escapeHeaderAttributeattribute \"escapeHeaderAttribute\")\r\n * [escapeRegex](#escapeRegexstring \"escapeRegex\")\r\n* [Errors](#errors \"Errors\")\r\n * [assert](#assertmessage \"assert\")\r\n * [abort](#abortmessage \"abort\")\r\n * [displayStack](#displayStackslice \"displayStack\")\r\n * [callStack](#callStackslice \"callStack\")\r\n * [toss](#tosscondition \"toss\")\r\n* [Load files](#load-files \"Load Files\")\r\n * [loadPackage](#loadPackagedir \"loadpackage\")\r\n * [loadDirModules](#loadDirModulespath-excludefiles-target \"loaddirmodules\")\r\n\r\n\r\n\r\n# Introduction\r\n\r\nThe *Hoek* general purpose node utilities library is used to aid in a variety of manners. It comes with useful methods for Arrays (clone, merge, applyToDefaults), Objects (removeKeys, copy), Asserting and more. \r\n\r\nFor example, to use Hoek to set configuration with default options:\r\n```javascript\r\nvar Hoek = require('hoek');\r\n\r\nvar default = {url : \"www.github.com\", port : \"8000\", debug : true}\r\n\r\nvar config = Hoek.applyToDefaults(default, {port : \"3000\", admin : true});\r\n\r\n// In this case, config would be { url: 'www.github.com', port: '3000', debug: true, admin: true }\r\n```\r\n\r\nUnder each of the sections (such as Array), there are subsections which correspond to Hoek methods. Each subsection will explain how to use the corresponding method. In each js excerpt below, the var Hoek = require('hoek') is omitted for brevity.\r\n\r\n## Object\r\n\r\nHoek provides several helpful methods for objects and arrays.\r\n\r\n### clone(obj)\r\n\r\nThis method is used to clone an object or an array. A *deep copy* is made (duplicates everything, including values that are objects). \r\n\r\n```javascript\r\n\r\nvar nestedObj = {\r\n w: /^something$/ig,\r\n x: {\r\n a: [1, 2, 3],\r\n b: 123456,\r\n c: new Date()\r\n },\r\n y: 'y',\r\n z: new Date()\r\n };\r\n\r\nvar copy = Hoek.clone(nestedObj);\r\n\r\ncopy.x.b = 100;\r\n\r\nconsole.log(copy.y) // results in 'y'\r\nconsole.log(nestedObj.x.b) // results in 123456\r\nconsole.log(copy.x.b) // results in 100\r\n```\r\n\r\n### merge(target, source, isNullOverride, isMergeArrays)\r\nisNullOverride, isMergeArrays default to true\r\n\r\nMerge all the properties of source into target, source wins in conflic, and by default null and undefined from source are applied\r\n\r\n\r\n```javascript\r\n\r\nvar target = {a: 1, b : 2}\r\nvar source = {a: 0, c: 5}\r\nvar source2 = {a: null, c: 5}\r\n\r\nvar targetArray = [1, 2, 3];\r\nvar sourceArray = [4, 5];\r\n\r\nvar newTarget = Hoek.merge(target, source); // results in {a: 0, b: 2, c: 5}\r\nnewTarget = Hoek.merge(target, source2); // results in {a: null, b: 2, c: 5}\r\nnewTarget = Hoek.merge(target, source2, false); // results in {a: 1, b: 2, c: 5}\r\n\r\nnewTarget = Hoek.merge(targetArray, sourceArray) // results in [1, 2, 3, 4, 5]\r\nnewTarget = Hoek.merge(targetArray, sourceArray, true, false) // results in [4, 5]\r\n\r\n\r\n\r\n\r\n```\r\n\r\n### applyToDefaults(defaults, options)\r\n\r\nApply options to a copy of the defaults\r\n\r\n```javascript\r\n\r\nvar defaults = {host: \"localhost\", port: 8000};\r\nvar options = {port: 8080};\r\n\r\nvar config = Hoek.applyToDefaults(defaults, options); // results in {host: \"localhost\", port: 8080};\r\n\r\n\r\n```\r\n\r\n### unique(array, key)\r\n\r\nRemove duplicate items from Array\r\n\r\n```javascript\r\n\r\nvar array = [1, 2, 2, 3, 3, 4, 5, 6];\r\n\r\nvar newArray = Hoek.unique(array); // results in [1,2,3,4,5,6];\r\n\r\narray = [{id: 1}, {id: 1}, {id: 2}];\r\n\r\nnewArray = Hoek.unique(array, \"id\") // results in [{id: 1}, {id: 2}]\r\n\r\n```\r\n\r\n### mapToObject(array, key)\r\n\r\nConvert an Array into an Object\r\n\r\n```javascript\r\n\r\nvar array = [1,2,3];\r\nvar newObject = Hoek.mapToObject(array); // results in [{\"1\": true}, {\"2\": true}, {\"3\": true}]\r\n\r\narray = [{id: 1}, {id: 2}];\r\nnewObject = Hoek.mapToObject(array, \"id\") // results in [{\"id\": 1}, {\"id\": 2}]\r\n\r\n```\r\n### intersect(array1, array2)\r\n\r\nFind the common unique items in two arrays\r\n\r\n```javascript\r\n\r\nvar array1 = [1, 2, 3];\r\nvar array2 = [1, 4, 5];\r\n\r\nvar newArray = Hoek.intersect(array1, array2) // results in [1]\r\n\r\n```\r\n\r\n### matchKeys(obj, keys) \r\n\r\nFind which keys are present\r\n\r\n```javascript\r\n\r\nvar obj = {a: 1, b: 2, c: 3};\r\nvar keys = [\"a\", \"e\"];\r\n\r\nHoek.matchKeys(obj, keys) // returns [\"a\"]\r\n\r\n```\r\n\r\n### flatten(array, target)\r\n\r\nFlatten an array\r\n\r\n```javascript\r\n\r\nvar array = [1, 2, 3];\r\nvar target = [4, 5]; \r\n\r\nvar flattenedArray = Hoek.flatten(array, target) // results in [4, 5, 1, 2, 3];\r\n\r\n```\r\n\r\n### removeKeys(object, keys)\r\n\r\nRemove keys\r\n\r\n```javascript\r\n\r\nvar object = {a: 1, b: 2, c: 3, d: 4};\r\n\r\nvar keys = [\"a\", \"b\"];\r\n\r\nHoek.removeKeys(object, keys) // object is now {c: 3, d: 4}\r\n\r\n```\r\n\r\n### reach(obj, chain)\r\n\r\nConverts an object key chain string to reference\r\n\r\n```javascript\r\n\r\nvar chain = 'a.b.c';\r\nvar obj = {a : {b : { c : 1}}};\r\n\r\nHoek.reach(obj, chain) // returns 1\r\n\r\n```\r\n\r\n### inheritAsync(self, obj, keys) \r\n\r\nInherits a selected set of methods from an object, wrapping functions in asynchronous syntax and catching errors\r\n\r\n```javascript\r\n\r\nvar targetFunc = function () { };\r\n\r\nvar proto = {\r\n a: function () {\r\n return 'a!';\r\n },\r\n b: function () {\r\n return 'b!';\r\n },\r\n c: function () {\r\n throw new Error('c!');\r\n }\r\n };\r\n\r\nvar keys = ['a', 'c'];\r\n\r\nHoek.inheritAsync(targetFunc, proto, ['a', 'c']);\r\n\r\nvar target = new targetFunc();\r\n\r\ntarget.a(function(err, result){console.log(result)} // returns 'a!' \r\n\r\ntarget.c(function(err, result){console.log(result)} // returns undefined\r\n\r\ntarget.b(function(err, result){console.log(result)} // gives error: Object [object Object] has no method 'b'\r\n\r\n```\r\n\r\n### rename(obj, from, to)\r\n\r\nRename a key of an object\r\n\r\n```javascript\r\n\r\nvar obj = {a : 1, b : 2};\r\n\r\nHoek.rename(obj, \"a\", \"c\"); // obj is now {c : 1, b : 2}\r\n\r\n```\r\n\r\n\r\n# Timer\r\n\r\nA Timer object. Initializing a new timer object sets the ts to the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.\r\n\r\n```javascript\r\n\r\n\r\nexample : \r\n\r\n\r\nvar timerObj = new Hoek.Timer();\r\nconsole.log(\"Time is now: \" + timerObj.ts)\r\nconsole.log(\"Elapsed time from initialization: \" + timerObj.elapsed() + 'milliseconds')\r\n\r\n```\r\n\r\n# Binary Encoding/Decoding\r\n\r\n### base64urlEncode(value)\r\n\r\nEncodes value in Base64 or URL encoding\r\n\r\n### base64urlDecode(value)\r\n\r\nDecodes data in Base64 or URL encoding.\r\n# Escaping Characters\r\n\r\nHoek provides convenient methods for escaping html characters. The escaped characters are as followed:\r\n\r\n```javascript\r\n\r\ninternals.htmlEscaped = {\r\n '&': '&',\r\n '<': '<',\r\n '>': '>',\r\n '\"': '"',\r\n \"'\": ''',\r\n '`': '`'\r\n};\r\n\r\n```\r\n\r\n### escapeHtml(string)\r\n\r\n```javascript\r\n\r\nvar string = '<html> hey </html>';\r\nvar escapedString = Hoek.escapeHtml(string); // returns <html> hey </html>\r\n\r\n```\r\n\r\n### escapeHeaderAttribute(attribute)\r\n\r\nEscape attribute value for use in HTTP header\r\n\r\n```javascript\r\n\r\nvar a = Hoek.escapeHeaderAttribute('I said \"go w\\\\o me\"'); //returns I said \\\"go w\\\\o me\\\"\r\n\r\n\r\n```\r\n\r\n\r\n### escapeRegex(string)\r\n\r\nEscape string for Regex construction\r\n\r\n```javascript\r\n\r\nvar a = Hoek.escapeRegex('4^f$s.4*5+-_?%=#!:@|~\\\\/`\"(>)[<]d{}s,'); // returns 4\\^f\\$s\\.4\\*5\\+\\-_\\?%\\=#\\!\\:@\\|~\\\\\\/`\"\\(>\\)\\[<\\]d\\{\\}s\\,\r\n\r\n\r\n\r\n```\r\n\r\n# Errors\r\n\r\n### assert(message)\r\n\r\n```javascript\r\n\r\nvar a = 1, b =2;\r\n\r\nHoek.assert(a === b, 'a should equal b'); // ABORT: a should equal b\r\n\r\n```\r\n\r\n### abort(message)\r\n\r\nFirst checks if process.env.NODE_ENV === 'test', and if so, throws error message. Otherwise,\r\ndisplays most recent stack and then exits process.\r\n\r\n\r\n\r\n### displayStack(slice)\r\n\r\nDisplays the trace stack\r\n\r\n```javascript\r\n\r\nvar stack = Hoek.displayStack();\r\nconsole.log(stack) // returns something like:\r\n\r\n[ 'null (/Users/user/Desktop/hoek/test.js:4:18)',\r\n 'Module._compile (module.js:449:26)',\r\n 'Module._extensions..js (module.js:467:10)',\r\n 'Module.load (module.js:356:32)',\r\n 'Module._load (module.js:312:12)',\r\n 'Module.runMain (module.js:492:10)',\r\n 'startup.processNextTick.process._tickCallback (node.js:244:9)' ]\r\n\r\n```\r\n\r\n### callStack(slice)\r\n\r\nReturns a trace stack array.\r\n\r\n```javascript\r\n\r\nvar stack = Hoek.callStack();\r\nconsole.log(stack) // returns something like:\r\n\r\n[ [ '/Users/user/Desktop/hoek/test.js', 4, 18, null, false ],\r\n [ 'module.js', 449, 26, 'Module._compile', false ],\r\n [ 'module.js', 467, 10, 'Module._extensions..js', false ],\r\n [ 'module.js', 356, 32, 'Module.load', false ],\r\n [ 'module.js', 312, 12, 'Module._load', false ],\r\n [ 'module.js', 492, 10, 'Module.runMain', false ],\r\n [ 'node.js',\r\n 244,\r\n 9,\r\n 'startup.processNextTick.process._tickCallback',\r\n false ] ]\r\n\r\n\r\n```\r\n\r\n### toss(condition)\r\n\r\ntoss(condition /*, [message], callback */)\r\n\r\nReturn an error as first argument of a callback\r\n\r\n\r\n# Load Files\r\n\r\n### loadPackage(dir)\r\n\r\nLoad and parse package.json process root or given directory\r\n\r\n```javascript\r\n\r\nvar pack = Hoek.loadPackage(); // pack.name === 'hoek'\r\n\r\n```\r\n\r\n### loadDirModules(path, excludeFiles, target) \r\n\r\nLoads modules from a given path; option to exclude files (array).\r\n\r\n\r\n\r\n\r\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/spumko/hoek/issues" - }, - "homepage": "https://github.com/spumko/hoek", - "_id": "hoek@0.9.1", - "dist": { - "shasum": "8525a65589a017e905052fd24b26898c26a20c6f" - }, - "_from": "hoek@0.9.x", - "_resolved": "https://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js deleted file mode 100644 index 4dddd77d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js +++ /dev/null @@ -1,86 +0,0 @@ -// Load modules - -var Lab = require('lab'); -var Hoek = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hoek', function () { - - describe('#escapeJavaScript', function () { - - it('encodes / characters', function (done) { - - var encoded = Hoek.escapeJavaScript('<script>alert(1)</script>'); - expect(encoded).to.equal('\\x3cscript\\x3ealert\\x281\\x29\\x3c\\x2fscript\\x3e'); - done(); - }); - - it('encodes \' characters', function (done) { - - var encoded = Hoek.escapeJavaScript('something(\'param\')'); - expect(encoded).to.equal('something\\x28\\x27param\\x27\\x29'); - done(); - }); - - it('encodes large unicode characters with the correct padding', function (done) { - - var encoded = Hoek.escapeJavaScript(String.fromCharCode(500) + String.fromCharCode(1000)); - expect(encoded).to.equal('\\u0500\\u1000'); - done(); - }); - - it('doesn\'t throw an exception when passed null', function (done) { - - var encoded = Hoek.escapeJavaScript(null); - expect(encoded).to.equal(''); - done(); - }); - }); - - describe('#escapeHtml', function () { - - it('encodes / characters', function (done) { - - var encoded = Hoek.escapeHtml('<script>alert(1)</script>'); - expect(encoded).to.equal('<script>alert(1)</script>'); - done(); - }); - - it('encodes < and > as named characters', function (done) { - - var encoded = Hoek.escapeHtml('<script><>'); - expect(encoded).to.equal('<script><>'); - done(); - }); - - it('encodes large unicode characters', function (done) { - - var encoded = Hoek.escapeHtml(String.fromCharCode(500) + String.fromCharCode(1000)); - expect(encoded).to.equal('ǴϨ'); - done(); - }); - - it('doesn\'t throw an exception when passed null', function (done) { - - var encoded = Hoek.escapeHtml(null); - expect(encoded).to.equal(''); - done(); - }); - }); -}); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js deleted file mode 100755 index c40e3ad9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js +++ /dev/null @@ -1,1078 +0,0 @@ -// Load modules - -var Lab = require('lab'); -var Hoek = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hoek', function () { - - var nestedObj = { - v: [7,8,9], - w: /^something$/igm, - x: { - a: [1, 2, 3], - b: 123456, - c: new Date(), - d: /hi/igm, - e: /hello/ - }, - y: 'y', - z: new Date() - }; - - var dupsArray = [nestedObj, { z: 'z' }, nestedObj]; - var reducedDupsArray = [nestedObj, { z: 'z' }]; - - describe('#clone', function () { - - it('should clone a nested object', function (done) { - - var a = nestedObj; - var b = Hoek.clone(a); - - expect(a).to.deep.equal(b); - expect(a.z.getTime()).to.equal(b.z.getTime()); - done(); - }); - - it('should clone a null object', function (done) { - - var b = Hoek.clone(null); - - expect(b).to.equal(null); - done(); - }); - - it('should not convert undefined properties to null', function (done) { - - var obj = { something: undefined }; - var b = Hoek.clone(obj); - - expect(typeof b.something).to.equal('undefined'); - done(); - }); - - it('should not throw on circular reference', function (done) { - - var a = {}; - a.x = a; - - var test = (function () { - - var b = Hoek.clone(a); - }); - - expect(test).to.not.throw(); - done(); - }); - - it('should properly clone circular reference', function (done) { - - var x = { - 'z': new Date() - }; - x.y = x; - - var b = Hoek.clone(x); - expect(Object.keys(b.y)).to.deep.equal(Object.keys(x)) - expect(b.z).to.not.equal(x.z); - expect(b.y).to.not.equal(x.y); - expect(b.y.z).to.not.equal(x.y.z); - expect(b.y).to.equal(b); - expect(b.y.y.y.y).to.equal(b); - done(); - }); - - it('should properly clone deeply nested object', function (done) { - - var a = { - x: { - y: { - a: [1, 2, 3], - b: 123456, - c: new Date(), - d: /hi/igm, - e: /hello/ - }, - } - }; - - var b = Hoek.clone(a); - - expect(a).to.deep.equal(b); - expect(a.x.y.c.getTime()).to.equal(b.x.y.c.getTime()); - done(); - }); - - it('should properly clone arrays', function (done) { - - var a = [1,2,3]; - - var b = Hoek.clone(a); - - expect(a).to.deep.equal(b); - done(); - }); - - it('should perform actual copy for shallow keys (no pass by reference)', function (done) { - - var x = Hoek.clone(nestedObj); - var y = Hoek.clone(nestedObj); - - // Date - expect(x.z).to.not.equal(nestedObj.z); - expect(x.z).to.not.equal(y.z); - - // Regex - expect(x.w).to.not.equal(nestedObj.w); - expect(x.w).to.not.equal(y.w); - - // Array - expect(x.v).to.not.equal(nestedObj.v); - expect(x.v).to.not.equal(y.v); - - // Immutable(s) - x.y = 5; - expect(x.y).to.not.equal(nestedObj.y); - expect(x.y).to.not.equal(y.y); - - done(); - }); - - it('should perform actual copy for deep keys (no pass by reference)', function (done) { - - var x = Hoek.clone(nestedObj); - var y = Hoek.clone(nestedObj); - - expect(x.x.c).to.not.equal(nestedObj.x.c); - expect(x.x.c).to.not.equal(y.x.c); - - expect(x.x.c.getTime()).to.equal(nestedObj.x.c.getTime()); - expect(x.x.c.getTime()).to.equal(y.x.c.getTime()); - done(); - }); - - it('copies functions with properties', function (done) { - - var a = { - x: function () { return 1; }, - y: {} - }; - a.x.z = 'string in function'; - a.x.v = function () { return 2; }; - a.y.u = a.x; - - var b = Hoek.clone(a); - expect(b.x()).to.equal(1); - expect(b.x.v()).to.equal(2); - expect(b.y.u).to.equal(b.x); - expect(b.x.z).to.equal('string in function'); - done(); - }); - - it('should copy a buffer', function(done){ - var tls = { - key: new Buffer([1,2,3,4,5]), - cert: new Buffer([1,2,3,4,5,6,10]) - } - - copiedTls = Hoek.clone(tls); - expect(Buffer.isBuffer(copiedTls.key)).to.equal(true); - expect(JSON.stringify(copiedTls.key)).to.equal(JSON.stringify(tls.key)) - expect(Buffer.isBuffer(copiedTls.cert)).to.equal(true); - expect(JSON.stringify(copiedTls.cert)).to.equal(JSON.stringify(tls.cert)) - done(); - }); - }); - - describe('#merge', function () { - - it('does not throw if source is null', function (done) { - - var a = {}; - var b = null; - var c = null; - - expect(function () { - - c = Hoek.merge(a, b); - }).to.not.throw(); - - expect(c).to.equal(a); - done(); - }); - - it('does not throw if source is undefined', function (done) { - - var a = {}; - var b = undefined; - var c = null; - - expect(function () { - - c = Hoek.merge(a, b); - }).to.not.throw(); - - expect(c).to.equal(a); - done(); - }); - - it('throws if source is not an object', function (done) { - - expect(function () { - - var a = {}; - var b = 0; - - Hoek.merge(a, b); - }).to.throw('Invalid source value: must be null, undefined, or an object'); - done(); - }); - - it('throws if target is not an object', function (done) { - - expect(function () { - - var a = 0; - var b = {}; - - Hoek.merge(a, b); - }).to.throw('Invalid target value: must be an object'); - done(); - }); - - it('throws if target is not an array and source is', function (done) { - - expect(function () { - - var a = {}; - var b = [1, 2]; - - Hoek.merge(a, b); - }).to.throw('Cannot merge array onto an object'); - done(); - }); - - it('returns the same object when merging arrays', function (done) { - - var a = []; - var b = [1, 2]; - - expect(Hoek.merge(a, b)).to.equal(a); - done(); - }); - - it('should combine an empty object with a non-empty object', function (done) { - - var a = {}; - var b = nestedObj; - - var c = Hoek.merge(a, b); - expect(a).to.deep.equal(b); - expect(c).to.deep.equal(b); - done(); - }); - - it('should override values in target', function (done) { - - var a = { x: 1, y: 2, z: 3, v: 5, t: 'test', m: 'abc' }; - var b = { x: null, z: 4, v: 0, t: { u: 6 }, m: '123' }; - - var c = Hoek.merge(a, b); - expect(c.x).to.equal(null); - expect(c.y).to.equal(2); - expect(c.z).to.equal(4); - expect(c.v).to.equal(0); - expect(c.m).to.equal('123'); - expect(c.t).to.deep.equal({ u: 6 }); - done(); - }); - - it('should override values in target (flip)', function (done) { - - var a = { x: 1, y: 2, z: 3, v: 5, t: 'test', m: 'abc' }; - var b = { x: null, z: 4, v: 0, t: { u: 6 }, m: '123' }; - - var d = Hoek.merge(b, a); - expect(d.x).to.equal(1); - expect(d.y).to.equal(2); - expect(d.z).to.equal(3); - expect(d.v).to.equal(5); - expect(d.m).to.equal('abc'); - expect(d.t).to.deep.equal('test'); - done(); - }); - }); - - describe('#applyToDefaults', function () { - - var defaults = { - a: 1, - b: 2, - c: { - d: 3, - e: [5, 6] - }, - f: 6, - g: 'test' - }; - - it('should return null if options is false', function (done) { - - var result = Hoek.applyToDefaults(defaults, false); - expect(result).to.equal(null); - done(); - }); - - it('should return a copy of defaults if options is true', function (done) { - - var result = Hoek.applyToDefaults(defaults, true); - expect(result).to.deep.equal(result); - done(); - }); - - it('should apply object to defaults', function (done) { - - var obj = { - a: null, - c: { - e: [4] - }, - f: 0, - g: { - h: 5 - } - }; - - var result = Hoek.applyToDefaults(defaults, obj); - expect(result.c.e).to.deep.equal([4]); - expect(result.a).to.equal(1); - expect(result.b).to.equal(2); - expect(result.f).to.equal(0); - expect(result.g).to.deep.equal({ h: 5 }); - done(); - }); - }); - - describe('#unique', function () { - - it('should ensure uniqueness within array of objects based on subkey', function (done) { - - var a = Hoek.unique(dupsArray, 'x'); - expect(a).to.deep.equal(reducedDupsArray); - done(); - }); - - it('removes duplicated without key', function (done) { - - expect(Hoek.unique([1, 2, 3, 4, 2, 1, 5])).to.deep.equal([1, 2, 3, 4, 5]); - done(); - }); - }); - - describe('#mapToObject', function () { - - it('should return null on null array', function (done) { - - var a = Hoek.mapToObject(null); - expect(a).to.equal(null); - done(); - }); - - it('should convert basic array to existential object', function (done) { - - var keys = [1, 2, 3, 4]; - var a = Hoek.mapToObject(keys); - for (var i in keys) { - expect(a[keys[i]]).to.equal(true); - } - done(); - }); - - it('should convert array of objects to existential object', function (done) { - - var keys = [{ x: 1 }, { x: 2 }, { x: 3 }]; - var subkey = 'x'; - var a = Hoek.mapToObject(keys, subkey); - for (var i in keys) { - expect(a[keys[i][subkey]]).to.equal(true); - } - done(); - }); - }); - - describe('#intersect', function () { - - it('should return the common objects of two arrays', function (done) { - - var array1 = [1, 2, 3, 4, 4, 5, 5]; - var array2 = [5, 4, 5, 6, 7]; - var common = Hoek.intersect(array1, array2); - expect(common.length).to.equal(2); - done(); - }); - - it('should return just the first common object of two arrays', function (done) { - - var array1 = [1, 2, 3, 4, 4, 5, 5]; - var array2 = [5, 4, 5, 6, 7]; - var common = Hoek.intersect(array1, array2, true); - expect(common).to.equal(5); - done(); - }); - - it('should return an empty array if either input is null', function (done) { - - expect(Hoek.intersect([1], null).length).to.equal(0); - expect(Hoek.intersect(null, [1]).length).to.equal(0); - done(); - }); - - it('should return the common objects of object and array', function (done) { - - var array1 = [1, 2, 3, 4, 4, 5, 5]; - var array2 = [5, 4, 5, 6, 7]; - var common = Hoek.intersect(Hoek.mapToObject(array1), array2); - expect(common.length).to.equal(2); - done(); - }); - }); - - describe('#matchKeys', function () { - - it('should match the existing object keys', function (done) { - - var obj = { - a: 1, - b: 2, - c: 3, - d: null - }; - - expect(Hoek.matchKeys(obj, ['b', 'c', 'd', 'e'])).to.deep.equal(['b', 'c', 'd']); - done(); - }); - }); - - describe('#flatten', function () { - - it('should return a flat array', function (done) { - - var result = Hoek.flatten([1, 2, [3, 4, [5, 6], [7], 8], [9], [10, [11, 12]], 13]); - expect(result.length).to.equal(13); - expect(result).to.deep.equal([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]); - done(); - }); - }); - - describe('#removeKeys', function () { - - var objWithHiddenKeys = { - location: { - name: 'San Bruno' - }, - company: { - name: '@WalmartLabs' - } - }; - - it('should delete params with definition\'s hide set to true', function (done) { - - var a = Hoek.removeKeys(objWithHiddenKeys, ['location']); - expect(objWithHiddenKeys.location).to.not.exist; - expect(objWithHiddenKeys.company).to.exist; - done(); - }); - }); - - describe('#reach', function () { - - var obj = { - a: { - b: { - c: { - d: 1, - e: 2 - }, - f: 'hello' - }, - g: { - h: 3 - } - }, - i: function () { } - }; - - it('returns a valid member', function (done) { - - expect(Hoek.reach(obj, 'a.b.c.d')).to.equal(1); - done(); - }); - - it('returns null on null object', function (done) { - - expect(Hoek.reach(null, 'a.b.c.d')).to.not.exist; - done(); - }); - - it('returns null on missing member', function (done) { - - expect(Hoek.reach(obj, 'a.b.c.d.x')).to.not.exist; - done(); - }); - - it('returns null on invalid member', function (done) { - - expect(Hoek.reach(obj, 'a.b.c.d-.x')).to.not.exist; - done(); - }); - - it('returns function member', function (done) { - - expect(typeof Hoek.reach(obj, 'i')).to.equal('function'); - done(); - }); - }); - - describe('#inheritAsync', function () { - - it('should inherit selected methods and wrap in async call', function (done) { - - var proto = { - a: function () { - return 'a!'; - }, - b: function () { - return 'b!'; - }, - c: function () { - throw new Error('c!'); - } - }; - - var targetFunc = function () { }; - targetFunc.prototype.c = function () { - - return 'oops'; - }; - - Hoek.inheritAsync(targetFunc, proto, ['a', 'c']); - var target = new targetFunc(); - - expect(typeof target.a).to.equal('function'); - expect(typeof target.c).to.equal('function'); - expect(target.b).to.not.exist; - - target.a(function (err, result) { - - expect(err).to.not.exist; - expect(result).to.equal('a!'); - - target.c(function (err, result) { - - expect(result).to.not.exist; - expect(err.message).to.equal('c!'); - done(); - }); - }); - }); - }); - - describe('#callStack', function () { - - it('should return the full call stack', function (done) { - - var stack = Hoek.callStack(); - expect(stack[0][0]).to.contain('index.js'); - expect(stack[0][2]).to.equal(30); - done(); - }); - }); - - describe('#displayStack ', function () { - - it('should return the full call stack for display', function (done) { - - var stack = Hoek.displayStack(); - expect(stack[0]).to.contain('test/index.js:'); - done(); - }); - - it('should include constructor functions correctly', function (done) { - - var Something = function (next) { - - next(); - }; - - var something = new Something(function () { - - var stack = Hoek.displayStack(); - expect(stack[1]).to.contain('new Something'); - done(); - }); - }); - }); - - describe('#abort', function () { - - it('should exit process when not in test mode', function (done) { - - var env = process.env.NODE_ENV; - var write = process.stdout.write; - var exit = process.exit; - - process.env.NODE_ENV = 'nottatest'; - process.stdout.write = function () { }; - process.exit = function (state) { - - process.exit = exit; - process.env.NODE_ENV = env; - process.stdout.write = write; - - expect(state).to.equal(1); - done(); - }; - - Hoek.abort('Boom'); - }); - - it('should throw when not in test mode and abortThrow is true', function (done) { - - var env = process.env.NODE_ENV; - process.env.NODE_ENV = 'nottatest'; - Hoek.abortThrow = true; - - var fn = function () { - - Hoek.abort('my error message'); - }; - - expect(fn).to.throw('my error message'); - Hoek.abortThrow = false; - process.env.NODE_ENV = env; - - done(); - }); - - - it('should respect hideStack argument', function (done) { - - var env = process.env.NODE_ENV; - var write = process.stdout.write; - var exit = process.exit; - var output = ''; - - process.exit = function () { }; - process.env.NODE_ENV = ''; - process.stdout.write = function (message) { - - output = message; - }; - - Hoek.abort('my error message', true); - - process.env.NODE_ENV = env; - process.stdout.write = write; - process.exit = exit; - - expect(output).to.equal('ABORT: my error message\n\t\n'); - - done(); - }); - - it('should default to showing stack', function (done) { - - var env = process.env.NODE_ENV; - var write = process.stdout.write; - var exit = process.exit; - var output = ''; - - process.exit = function () { }; - process.env.NODE_ENV = ''; - process.stdout.write = function (message) { - - output = message; - }; - - Hoek.abort('my error message'); - - process.env.NODE_ENV = env; - process.stdout.write = write; - process.exit = exit; - - expect(output).to.contain('index.js'); - - done(); - }); - }); - - describe('#assert', function () { - - it('should throw an Error when using assert in a test', function (done) { - - var fn = function () { - - Hoek.assert(false, 'my error message'); - }; - - expect(fn).to.throw('my error message'); - done(); - }); - - it('should throw an Error when using assert in a test with no message', function (done) { - - var fn = function () { - - Hoek.assert(false); - }; - - expect(fn).to.throw('Unknown error'); - done(); - }); - - it('should throw an Error when using assert in a test with multipart message', function (done) { - - var fn = function () { - - Hoek.assert(false, 'This', 'is', 'my message'); - }; - - expect(fn).to.throw('This is my message'); - done(); - }); - - it('should throw an Error when using assert in a test with object message', function (done) { - - var fn = function () { - - Hoek.assert(false, 'This', 'is', { spinal: 'tap' }); - }; - - expect(fn).to.throw('This is {"spinal":"tap"}'); - done(); - }); - - it('should throw an Error when using assert in a test with error object message', function (done) { - - var fn = function () { - - Hoek.assert(false, new Error('This is spinal tap')); - }; - - expect(fn).to.throw('This is spinal tap'); - done(); - }); - }); - - describe('#loadDirModules', function () { - - it('should load modules from directory', function (done) { - - var target = {}; - Hoek.loadDirModules(__dirname + '/modules', ['test2'], target); - expect(target.Test1.x).to.equal(1); - expect(target.Test2).to.not.exist; - expect(target.Test3.z).to.equal(3); - done(); - }); - - it('should list modules from directory into function', function (done) { - - var target = {}; - Hoek.loadDirModules(__dirname + '/modules', ['test2'], function (path, name, capName) { - - target[name] = capName; - }); - - expect(target.test1).to.equal('Test1'); - expect(target.test2).to.not.exist; - expect(target.test3).to.equal('Test3'); - done(); - }); - }); - - describe('#rename', function () { - - it('should rename object key', function (done) { - - var a = { b: 'c' }; - Hoek.rename(a, 'b', 'x'); - expect(a.b).to.not.exist; - expect(a.x).to.equal('c'); - done(); - }); - }); - - describe('Timer', function () { - - it('should return time elapsed', function (done) { - - var timer = new Hoek.Timer(); - setTimeout(function () { - - expect(timer.elapsed()).to.be.above(9); - done(); - }, 12); - }); - }); - - describe('#loadPackage', function () { - - it('should', function (done) { - - var pack = Hoek.loadPackage(); - expect(pack.name).to.equal('hoek'); - done(); - }); - }); - - describe('#escapeRegex', function () { - - it('should escape all special regular expression characters', function (done) { - - var a = Hoek.escapeRegex('4^f$s.4*5+-_?%=#!:@|~\\/`"(>)[<]d{}s,'); - expect(a).to.equal('4\\^f\\$s\\.4\\*5\\+\\-_\\?%\\=#\\!\\:@\\|~\\\\\\/`"\\(>\\)\\[<\\]d\\{\\}s\\,'); - done(); - }); - }); - - describe('#toss', function () { - - it('should call callback with new error', function (done) { - - var callback = function (err) { - - expect(err).to.exist; - expect(err.message).to.equal('bug'); - done(); - }; - - Hoek.toss(true, 'feature', callback); - Hoek.toss(false, 'bug', callback); - }); - - it('should call callback with new error and no message', function (done) { - - Hoek.toss(false, function (err) { - - expect(err).to.exist; - expect(err.message).to.equal(''); - done(); - }); - }); - - it('should call callback with error condition', function (done) { - - Hoek.toss(new Error('boom'), function (err) { - - expect(err).to.exist; - expect(err.message).to.equal('boom'); - done(); - }); - }); - - it('should call callback with new error using message with error condition', function (done) { - - Hoek.toss(new Error('ka'), 'boom', function (err) { - - expect(err).to.exist; - expect(err.message).to.equal('boom'); - done(); - }); - }); - - it('should call callback with new error using passed error with error condition', function (done) { - - Hoek.toss(new Error('ka'), new Error('boom'), function (err) { - - expect(err).to.exist; - expect(err.message).to.equal('boom'); - done(); - }); - }); - }); - - describe('Base64Url', function () { - - var base64str = 'AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0-P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn-AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq-wsbKztLW2t7i5uru8vb6_wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t_g4eLj5OXm5-jp6uvs7e7v8PHy8_T19vf4-fr7_P3-_w'; - var str = unescape('%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%20%21%22%23%24%25%26%27%28%29*+%2C-./0123456789%3A%3B%3C%3D%3E%3F@ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D%7E%7F%80%81%82%83%84%85%86%87%88%89%8A%8B%8C%8D%8E%8F%90%91%92%93%94%95%96%97%98%99%9A%9B%9C%9D%9E%9F%A0%A1%A2%A3%A4%A5%A6%A7%A8%A9%AA%AB%AC%AD%AE%AF%B0%B1%B2%B3%B4%B5%B6%B7%B8%B9%BA%BB%BC%BD%BE%BF%C0%C1%C2%C3%C4%C5%C6%C7%C8%C9%CA%CB%CC%CD%CE%CF%D0%D1%D2%D3%D4%D5%D6%D7%D8%D9%DA%DB%DC%DD%DE%DF%E0%E1%E2%E3%E4%E5%E6%E7%E8%E9%EA%EB%EC%ED%EE%EF%F0%F1%F2%F3%F4%F5%F6%F7%F8%F9%FA%FB%FC%FD%FE%FF'); - - describe('#base64urlEncode', function () { - - it('should base64 URL-safe a string', function (done) { - - expect(Hoek.base64urlEncode(str)).to.equal(base64str); - done(); - }); - }); - - describe('#base64urlDecode', function () { - - it('should un-base64 URL-safe a string', function (done) { - - expect(Hoek.base64urlDecode(base64str)).to.equal(str); - done(); - }); - - it('should return error on undefined input', function (done) { - - expect(Hoek.base64urlDecode().message).to.exist; - done(); - }); - - it('should return error on invalid input', function (done) { - - expect(Hoek.base64urlDecode('*').message).to.exist; - done(); - }); - }); - }); - - describe('#escapeHeaderAttribute', function () { - - it('should not alter ascii values', function (done) { - - var a = Hoek.escapeHeaderAttribute('My Value'); - expect(a).to.equal('My Value'); - done(); - }); - - it('should escape all special HTTP header attribute characters', function (done) { - - var a = Hoek.escapeHeaderAttribute('I said go!!!#"' + String.fromCharCode(92)); - expect(a).to.equal('I said go!!!#\\"\\\\'); - done(); - }); - - it('should throw on large unicode characters', function (done) { - - var fn = function () { - - Hoek.escapeHeaderAttribute('this is a test' + String.fromCharCode(500) + String.fromCharCode(300)); - }; - - expect(fn).to.throw(Error); - done(); - }); - - it('should throw on CRLF to prevent response splitting', function (done) { - - var fn = function () { - - Hoek.escapeHeaderAttribute('this is a test\r\n'); - }; - - expect(fn).to.throw(Error); - done(); - }); - }); - - describe('#escapeHtml', function () { - - it('should escape all special HTML characters', function (done) { - - var a = Hoek.escapeHtml('&<>"\'`'); - expect(a).to.equal('&<>"'`'); - done(); - }); - - it('should return empty string on falsy input', function (done) { - - var a = Hoek.escapeHtml(''); - expect(a).to.equal(''); - done(); - }); - - it('should return unchanged string on no reserved input', function (done) { - - var a = Hoek.escapeHtml('abc'); - expect(a).to.equal('abc'); - done(); - }); - }); - - describe('#printEvent', function () { - - it('outputs event as string', function (done) { - - var event = { - timestamp: (new Date(2013, 1, 1, 6, 30, 45, 123)).getTime(), - tags: ['a', 'b', 'c'], - data: { some: 'data' } - }; - - Hoek.consoleFunc = function (string) { - - Hoek.consoleFunc = console.log; - expect(string).to.equal('130201/063045.123, a, {"some":"data"}'); - done(); - }; - - Hoek.printEvent(event); - }); - - it('outputs JSON error', function (done) { - - var event = { - timestamp: (new Date(2013, 1, 1, 6, 30, 45, 123)).getTime(), - tags: ['a', 'b', 'c'], - data: { some: 'data' } - }; - - event.data.a = event.data; - - Hoek.consoleFunc = function (string) { - - Hoek.consoleFunc = console.log; - expect(string).to.equal('130201/063045.123, a, JSON Error: Converting circular structure to JSON'); - done(); - }; - - Hoek.printEvent(event); - }); - }); - - describe('#nextTick', function () { - - it('calls the provided callback on nextTick', function (done) { - - var a = 0; - - var inc = function (step, next) { - - a += step; - next(); - }; - - var ticked = Hoek.nextTick(inc); - - ticked(5, function () { - - expect(a).to.equal(6); - done(); - }); - - expect(a).to.equal(0); - inc(1, function () { - - expect(a).to.equal(1); - }); - }); - }); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js deleted file mode 100755 index 3f41e601..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js +++ /dev/null @@ -1 +0,0 @@ -exports.x = 1; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js deleted file mode 100755 index 38556b27..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js +++ /dev/null @@ -1 +0,0 @@ -exports.y = 2; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js deleted file mode 100755 index 436b860b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js +++ /dev/null @@ -1 +0,0 @@ -exports.z = 3; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/.npmignore deleted file mode 100644 index 77ba16cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/.npmignore +++ /dev/null @@ -1,18 +0,0 @@ -.idea -*.iml -npm-debug.log -dump.rdb -node_modules -results.tap -results.xml -npm-shrinkwrap.json -config.json -.DS_Store -*/.DS_Store -*/*/.DS_Store -._* -*/._* -*/*/._* -coverage.* -lib-cov - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/.travis.yml deleted file mode 100755 index 047f7e3d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js - -node_js: - - 0.10 - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE deleted file mode 100755 index e699a7bd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2012-2013, Eran Hammer. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Eran Hammer nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL ERAN HAMMER BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile deleted file mode 100755 index 9e7138c2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -test: - @./node_modules/.bin/lab -test-cov: - @./node_modules/.bin/lab -r threshold -t 100 -test-cov-html: - @./node_modules/.bin/lab -r html -o coverage.html -complexity: - @./node_modules/.bin/cr -o complexity.md -f markdown lib - -.PHONY: test test-cov test-cov-html complexity - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/README.md deleted file mode 100755 index 98a6e025..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# sntp - -An SNTP v4 client (RFC4330) for node. Simpy connects to the NTP or SNTP server requested and returns the server time -along with the roundtrip duration and clock offset. To adjust the local time to the NTP time, add the returned `t` offset -to the local time. - -[![Build Status](https://secure.travis-ci.org/hueniverse/sntp.png)](http://travis-ci.org/hueniverse/sntp) - -# Usage - -```javascript -var Sntp = require('sntp'); - -// All options are optional - -var options = { - host: 'nist1-sj.ustiming.org', // Defaults to pool.ntp.org - port: 123, // Defaults to 123 (NTP) - resolveReference: true, // Default to false (not resolving) - timeout: 1000 // Defaults to zero (no timeout) -}; - -// Request server time - -Sntp.time(options, function (err, time) { - - if (err) { - console.log('Failed: ' + err.message); - process.exit(1); - } - - console.log('Local clock is off by: ' + time.t + ' milliseconds'); - process.exit(0); -}); -``` - -If an application needs to maintain continuous time synchronization, the module provides a stateful method for -querying the current offset only when the last one is too old (defaults to daily). - -```javascript -// Request offset once - -Sntp.offset(function (err, offset) { - - console.log(offset); // New (served fresh) - - // Request offset again - - Sntp.offset(function (err, offset) { - - console.log(offset); // Identical (served from cache) - }); -}); -``` - -To set a background offset refresh, start the interval and use the provided now() method. If for any reason the -client fails to obtain an up-to-date offset, the current system clock is used. - -```javascript -var before = Sntp.now(); // System time without offset - -Sntp.start(function () { - - var now = Sntp.now(); // With offset - Sntp.stop(); -}); -``` - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js deleted file mode 100755 index 0303f6dc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js +++ /dev/null @@ -1,16 +0,0 @@ -var Sntp = require('../lib'); - -// Request offset once - -Sntp.offset(function (err, offset) { - - console.log(offset); // New (served fresh) - - // Request offset again - - Sntp.offset(function (err, offset) { - - console.log(offset); // Identical (served from cache) - }); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js deleted file mode 100755 index bd70d0e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js +++ /dev/null @@ -1,25 +0,0 @@ -var Sntp = require('../lib'); - -// All options are optional - -var options = { - host: 'nist1-sj.ustiming.org', // Defaults to pool.ntp.org - port: 123, // Defaults to 123 (NTP) - resolveReference: true, // Default to false (not resolving) - timeout: 1000 // Defaults to zero (no timeout) -}; - -// Request server time - -Sntp.time(options, function (err, time) { - - if (err) { - console.log('Failed: ' + err.message); - process.exit(1); - } - - console.log(time); - console.log('Local clock is off by: ' + time.t + ' milliseconds'); - process.exit(0); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/index.js deleted file mode 100755 index 4cc88b35..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib'); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js deleted file mode 100755 index e492cd93..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js +++ /dev/null @@ -1,409 +0,0 @@ -// Load modules - -var Dgram = require('dgram'); -var Dns = require('dns'); -var Hoek = require('hoek'); - - -// Declare internals - -var internals = {}; - - -exports.time = function (options, callback) { - - if (arguments.length !== 2) { - callback = arguments[0]; - options = {}; - } - - var settings = Hoek.clone(options); - settings.host = settings.host || 'pool.ntp.org'; - settings.port = settings.port || 123; - settings.resolveReference = settings.resolveReference || false; - - // Declare variables used by callback - - var timeoutId = 0; - var sent = 0; - - // Ensure callback is only called once - - var isFinished = false; - var finish = function (err, result) { - - if (timeoutId) { - clearTimeout(timeoutId); - timeoutId = 0; - } - - if (!isFinished) { - isFinished = true; - socket.removeAllListeners(); - socket.close(); - return callback(err, result); - } - }; - - // Create UDP socket - - var socket = Dgram.createSocket('udp4'); - - socket.once('error', function (err) { - - return finish(err); - }); - - // Listen to incoming messages - - socket.on('message', function (buffer, rinfo) { - - var received = Date.now(); - - var message = new internals.NtpMessage(buffer); - if (!message.isValid) { - return finish(new Error('Invalid server response'), message); - } - - if (message.originateTimestamp !== sent) { - return finish(new Error('Wrong originate timestamp'), message); - } - - // Timestamp Name ID When Generated - // ------------------------------------------------------------ - // Originate Timestamp T1 time request sent by client - // Receive Timestamp T2 time request received by server - // Transmit Timestamp T3 time reply sent by server - // Destination Timestamp T4 time reply received by client - // - // The roundtrip delay d and system clock offset t are defined as: - // - // d = (T4 - T1) - (T3 - T2) t = ((T2 - T1) + (T3 - T4)) / 2 - - var T1 = message.originateTimestamp; - var T2 = message.receiveTimestamp; - var T3 = message.transmitTimestamp; - var T4 = received; - - message.d = (T4 - T1) - (T3 - T2); - message.t = ((T2 - T1) + (T3 - T4)) / 2; - message.receivedLocally = received; - - if (!settings.resolveReference || - message.stratum !== 'secondary') { - - return finish(null, message); - } - - // Resolve reference IP address - - Dns.reverse(message.referenceId, function (err, domains) { - - if (!err) { - message.referenceHost = domains[0]; - } - - return finish(null, message); - }); - }); - - // Set timeout - - if (settings.timeout) { - timeoutId = setTimeout(function () { - - timeoutId = 0; - return finish(new Error('Timeout')); - }, settings.timeout); - } - - // Construct NTP message - - var message = new Buffer(48); - for (var i = 0; i < 48; i++) { // Zero message - message[i] = 0; - } - - message[0] = (0 << 6) + (4 << 3) + (3 << 0) // Set version number to 4 and Mode to 3 (client) - sent = Date.now(); - internals.fromMsecs(sent, message, 40); // Set transmit timestamp (returns as originate) - - // Send NTP request - - socket.send(message, 0, message.length, settings.port, settings.host, function (err, bytes) { - - if (err || - bytes !== 48) { - - return finish(err || new Error('Could not send entire message')); - } - }); -}; - - -internals.NtpMessage = function (buffer) { - - this.isValid = false; - - // Validate - - if (buffer.length !== 48) { - return; - } - - // Leap indicator - - var li = (buffer[0] >> 6); - switch (li) { - case 0: this.leapIndicator = 'no-warning'; break; - case 1: this.leapIndicator = 'last-minute-61'; break; - case 2: this.leapIndicator = 'last-minute-59'; break; - case 3: this.leapIndicator = 'alarm'; break; - } - - // Version - - var vn = ((buffer[0] & 0x38) >> 3); - this.version = vn; - - // Mode - - var mode = (buffer[0] & 0x7); - switch (mode) { - case 1: this.mode = 'symmetric-active'; break; - case 2: this.mode = 'symmetric-passive'; break; - case 3: this.mode = 'client'; break; - case 4: this.mode = 'server'; break; - case 5: this.mode = 'broadcast'; break; - case 0: - case 6: - case 7: this.mode = 'reserved'; break; - } - - // Stratum - - var stratum = buffer[1]; - if (stratum === 0) { - this.stratum = 'death'; - } - else if (stratum === 1) { - this.stratum = 'primary'; - } - else if (stratum <= 15) { - this.stratum = 'secondary'; - } - else { - this.stratum = 'reserved'; - } - - // Poll interval (msec) - - this.pollInterval = Math.round(Math.pow(2, buffer[2])) * 1000; - - // Precision (msecs) - - this.precision = Math.pow(2, buffer[3]) * 1000; - - // Root delay (msecs) - - var rootDelay = 256 * (256 * (256 * buffer[4] + buffer[5]) + buffer[6]) + buffer[7]; - this.rootDelay = 1000 * (rootDelay / 0x10000); - - // Root dispersion (msecs) - - this.rootDispersion = ((buffer[8] << 8) + buffer[9] + ((buffer[10] << 8) + buffer[11]) / Math.pow(2, 16)) * 1000; - - // Reference identifier - - this.referenceId = ''; - switch (this.stratum) { - case 'death': - case 'primary': - this.referenceId = String.fromCharCode(buffer[12]) + String.fromCharCode(buffer[13]) + String.fromCharCode(buffer[14]) + String.fromCharCode(buffer[15]); - break; - case 'secondary': - this.referenceId = '' + buffer[12] + '.' + buffer[13] + '.' + buffer[14] + '.' + buffer[15]; - break; - } - - // Reference timestamp - - this.referenceTimestamp = internals.toMsecs(buffer, 16); - - // Originate timestamp - - this.originateTimestamp = internals.toMsecs(buffer, 24); - - // Receive timestamp - - this.receiveTimestamp = internals.toMsecs(buffer, 32); - - // Transmit timestamp - - this.transmitTimestamp = internals.toMsecs(buffer, 40); - - // Validate - - if (this.version === 4 && - this.stratum !== 'reserved' && - this.mode === 'server' && - this.originateTimestamp && - this.receiveTimestamp && - this.transmitTimestamp) { - - this.isValid = true; - } - - return this; -}; - - -internals.toMsecs = function (buffer, offset) { - - var seconds = 0; - var fraction = 0; - - for (var i = 0; i < 4; ++i) { - seconds = (seconds * 256) + buffer[offset + i]; - } - - for (i = 4; i < 8; ++i) { - fraction = (fraction * 256) + buffer[offset + i]; - } - - return ((seconds - 2208988800 + (fraction / Math.pow(2, 32))) * 1000); -}; - - -internals.fromMsecs = function (ts, buffer, offset) { - - var seconds = Math.floor(ts / 1000) + 2208988800; - var fraction = Math.round((ts % 1000) / 1000 * Math.pow(2, 32)); - - buffer[offset + 0] = (seconds & 0xFF000000) >> 24; - buffer[offset + 1] = (seconds & 0x00FF0000) >> 16; - buffer[offset + 2] = (seconds & 0x0000FF00) >> 8; - buffer[offset + 3] = (seconds & 0x000000FF); - - buffer[offset + 4] = (fraction & 0xFF000000) >> 24; - buffer[offset + 5] = (fraction & 0x00FF0000) >> 16; - buffer[offset + 6] = (fraction & 0x0000FF00) >> 8; - buffer[offset + 7] = (fraction & 0x000000FF); -}; - - -// Offset singleton - -internals.last = { - offset: 0, - expires: 0, - host: '', - port: 0 -}; - - -exports.offset = function (options, callback) { - - if (arguments.length !== 2) { - callback = arguments[0]; - options = {}; - } - - var now = Date.now(); - var clockSyncRefresh = options.clockSyncRefresh || 24 * 60 * 60 * 1000; // Daily - - if (internals.last.offset && - internals.last.host === options.host && - internals.last.port === options.port && - now < internals.last.expires) { - - process.nextTick(function () { - - callback(null, internals.last.offset); - }); - - return; - } - - exports.time(options, function (err, time) { - - if (err) { - return callback(err, 0); - } - - internals.last = { - offset: Math.round(time.t), - expires: now + clockSyncRefresh, - host: options.host, - port: options.port - }; - - return callback(null, internals.last.offset); - }); -}; - - -// Now singleton - -internals.now = { - intervalId: 0 -}; - - -exports.start = function (options, callback) { - - if (arguments.length !== 2) { - callback = arguments[0]; - options = {}; - } - - if (internals.now.intervalId) { - process.nextTick(function () { - - callback(); - }); - - return; - } - - exports.offset(options, function (err, offset) { - - internals.now.intervalId = setInterval(function () { - - exports.offset(options, function () { }); - }, options.clockSyncRefresh || 24 * 60 * 60 * 1000); // Daily - - return callback(); - }); -}; - - -exports.stop = function () { - - if (!internals.now.intervalId) { - return; - } - - clearInterval(internals.now.intervalId); - internals.now.intervalId = 0; -}; - - -exports.isLive = function () { - - return !!internals.now.intervalId; -}; - - -exports.now = function () { - - var now = Date.now(); - if (!exports.isLive() || - now >= internals.last.expires) { - - return now; - } - - return now + internals.last.offset; -}; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/package.json deleted file mode 100755 index 8ce7a61f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "sntp", - "description": "SNTP Client", - "version": "0.2.4", - "author": { - "name": "Eran Hammer", - "email": "eran@hueniverse.com", - "url": "http://hueniverse.com" - }, - "contributors": [], - "repository": { - "type": "git", - "url": "git://github.com/hueniverse/sntp" - }, - "main": "index", - "keywords": [ - "sntp", - "ntp", - "time" - ], - "engines": { - "node": ">=0.8.0" - }, - "dependencies": { - "hoek": "0.9.x" - }, - "devDependencies": { - "lab": "0.1.x", - "complexity-report": "0.x.x" - }, - "scripts": { - "test": "make test-cov" - }, - "licenses": [ - { - "type": "BSD", - "url": "http://github.com/hueniverse/sntp/raw/master/LICENSE" - } - ], - "readme": "# sntp\n\nAn SNTP v4 client (RFC4330) for node. Simpy connects to the NTP or SNTP server requested and returns the server time\nalong with the roundtrip duration and clock offset. To adjust the local time to the NTP time, add the returned `t` offset\nto the local time.\n\n[![Build Status](https://secure.travis-ci.org/hueniverse/sntp.png)](http://travis-ci.org/hueniverse/sntp)\n\n# Usage\n\n```javascript\nvar Sntp = require('sntp');\n\n// All options are optional\n\nvar options = {\n host: 'nist1-sj.ustiming.org', // Defaults to pool.ntp.org\n port: 123, // Defaults to 123 (NTP)\n resolveReference: true, // Default to false (not resolving)\n timeout: 1000 // Defaults to zero (no timeout)\n};\n\n// Request server time\n\nSntp.time(options, function (err, time) {\n\n if (err) {\n console.log('Failed: ' + err.message);\n process.exit(1);\n }\n\n console.log('Local clock is off by: ' + time.t + ' milliseconds');\n process.exit(0);\n});\n```\n\nIf an application needs to maintain continuous time synchronization, the module provides a stateful method for\nquerying the current offset only when the last one is too old (defaults to daily).\n\n```javascript\n// Request offset once\n\nSntp.offset(function (err, offset) {\n\n console.log(offset); // New (served fresh)\n\n // Request offset again\n\n Sntp.offset(function (err, offset) {\n\n console.log(offset); // Identical (served from cache)\n });\n});\n```\n\nTo set a background offset refresh, start the interval and use the provided now() method. If for any reason the\nclient fails to obtain an up-to-date offset, the current system clock is used.\n\n```javascript\nvar before = Sntp.now(); // System time without offset\n\nSntp.start(function () {\n\n var now = Sntp.now(); // With offset\n Sntp.stop();\n});\n```\n\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/hueniverse/sntp/issues" - }, - "homepage": "https://github.com/hueniverse/sntp", - "_id": "sntp@0.2.4", - "dist": { - "shasum": "657ad142a4f42d39c3e8f4b507ec2dd8f0ecfd9f" - }, - "_from": "sntp@0.2.x", - "_resolved": "https://registry.npmjs.org/sntp/-/sntp-0.2.4.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js deleted file mode 100755 index 38a55346..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js +++ /dev/null @@ -1,359 +0,0 @@ -// Load modules - -var Dgram = require('dgram'); -var Lab = require('lab'); -var Sntp = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('SNTP', function () { - - describe('#time', function () { - - it('returns consistent result over multiple tries', function (done) { - - Sntp.time(function (err, time) { - - expect(err).to.not.exist; - expect(time).to.exist; - var t1 = time.t; - - Sntp.time(function (err, time) { - - expect(err).to.not.exist; - expect(time).to.exist; - var t2 = time.t; - expect(Math.abs(t1 - t2)).is.below(200); - done(); - }); - }); - }); - - it('resolves reference IP', function (done) { - - Sntp.time({ host: 'ntp.exnet.com', resolveReference: true }, function (err, time) { - - expect(err).to.not.exist; - expect(time).to.exist; - expect(time.referenceHost).to.exist; - done(); - }); - }); - - it('times out on no response', function (done) { - - Sntp.time({ port: 124, timeout: 100 }, function (err, time) { - - expect(err).to.exist; - expect(time).to.not.exist; - expect(err.message).to.equal('Timeout'); - done(); - }); - }); - - it('errors on error event', function (done) { - - var orig = Dgram.createSocket; - Dgram.createSocket = function (type) { - - Dgram.createSocket = orig; - var socket = Dgram.createSocket(type); - process.nextTick(function () { socket.emit('error', new Error('Fake')) }); - return socket; - }; - - Sntp.time(function (err, time) { - - expect(err).to.exist; - expect(time).to.not.exist; - expect(err.message).to.equal('Fake'); - done(); - }); - }); - - it('times out on invalid host', function (done) { - - Sntp.time({ host: 'error', timeout: 10000 }, function (err, time) { - - expect(err).to.exist; - expect(time).to.not.exist; - expect(err.message).to.equal('getaddrinfo ENOTFOUND'); - done(); - }); - }); - - it('fails on bad response buffer size', function (done) { - - var server = Dgram.createSocket('udp4'); - server.on('message', function (message, remote) { - var message = new Buffer(10); - server.send(message, 0, message.length, remote.port, remote.address, function (err, bytes) { - - server.close(); - }); - }); - - server.bind(49123); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(err.message).to.equal('Invalid server response'); - done(); - }); - }); - - var messup = function (bytes) { - - var server = Dgram.createSocket('udp4'); - server.on('message', function (message, remote) { - - var message = new Buffer([ - 0x24, 0x01, 0x00, 0xe3, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x41, 0x43, 0x54, 0x53, - 0xd4, 0xa8, 0x2d, 0xc7, - 0x1c, 0x5d, 0x49, 0x1b, - 0xd4, 0xa8, 0x2d, 0xe6, - 0x67, 0xef, 0x9d, 0xb2, - 0xd4, 0xa8, 0x2d, 0xe6, - 0x71, 0xed, 0xb5, 0xfb, - 0xd4, 0xa8, 0x2d, 0xe6, - 0x71, 0xee, 0x6c, 0xc5 - ]); - - for (var i = 0, il = bytes.length; i < il; ++i) { - message[bytes[i][0]] = bytes[i][1]; - } - - server.send(message, 0, message.length, remote.port, remote.address, function (err, bytes) { - - server.close(); - }); - }); - - server.bind(49123); - }; - - it('fails on bad version', function (done) { - - messup([[0, (0 << 6) + (3 << 3) + (4 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(time.version).to.equal(3); - expect(err.message).to.equal('Invalid server response'); - done(); - }); - }); - - it('fails on bad originate timestamp and alarm li', function (done) { - - messup([[0, (3 << 6) + (4 << 3) + (4 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(err.message).to.equal('Wrong originate timestamp'); - expect(time.leapIndicator).to.equal('alarm'); - done(); - }); - }); - - it('returns time with death stratum and last61 li', function (done) { - - messup([[0, (1 << 6) + (4 << 3) + (4 << 0)], [1, 0]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(time.stratum).to.equal('death'); - expect(time.leapIndicator).to.equal('last-minute-61'); - done(); - }); - }); - - it('returns time with reserved stratum and last59 li', function (done) { - - messup([[0, (2 << 6) + (4 << 3) + (4 << 0)], [1, 0x1f]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(time.stratum).to.equal('reserved'); - expect(time.leapIndicator).to.equal('last-minute-59'); - done(); - }); - }); - - it('fails on bad mode (symmetric-active)', function (done) { - - messup([[0, (0 << 6) + (4 << 3) + (1 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(time.mode).to.equal('symmetric-active'); - done(); - }); - }); - - it('fails on bad mode (symmetric-passive)', function (done) { - - messup([[0, (0 << 6) + (4 << 3) + (2 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(time.mode).to.equal('symmetric-passive'); - done(); - }); - }); - - it('fails on bad mode (client)', function (done) { - - messup([[0, (0 << 6) + (4 << 3) + (3 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(time.mode).to.equal('client'); - done(); - }); - }); - - it('fails on bad mode (broadcast)', function (done) { - - messup([[0, (0 << 6) + (4 << 3) + (5 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(time.mode).to.equal('broadcast'); - done(); - }); - }); - - it('fails on bad mode (reserved)', function (done) { - - messup([[0, (0 << 6) + (4 << 3) + (6 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(time.mode).to.equal('reserved'); - done(); - }); - }); - }); - - describe('#offset', function () { - - it('gets the current offset', function (done) { - - Sntp.offset(function (err, offset) { - - expect(err).to.not.exist; - expect(offset).to.not.equal(0); - done(); - }); - }); - - it('gets the current offset from cache', function (done) { - - Sntp.offset(function (err, offset) { - - expect(err).to.not.exist; - expect(offset).to.not.equal(0); - var offset1 = offset; - Sntp.offset({}, function (err, offset) { - - expect(err).to.not.exist; - expect(offset).to.equal(offset1); - done(); - }); - }); - }); - - it('fails getting the current offset on invalid server', function (done) { - - Sntp.offset({ host: 'error' }, function (err, offset) { - - expect(err).to.exist; - expect(offset).to.equal(0); - done(); - }); - }); - }); - - describe('#now', function () { - - it('starts auto-sync, gets now, then stops', function (done) { - - Sntp.stop(); - - var before = Sntp.now(); - expect(before).to.equal(Date.now()); - - Sntp.start(function () { - - var now = Sntp.now(); - expect(now).to.not.equal(Date.now()); - Sntp.stop(); - - done(); - }); - }); - - it('starts twice', function (done) { - - Sntp.start(function () { - - Sntp.start(function () { - - var now = Sntp.now(); - expect(now).to.not.equal(Date.now()); - Sntp.stop(); - - done(); - }); - }); - }); - - it('starts auto-sync, gets now, waits, gets again after timeout', function (done) { - - Sntp.stop(); - - var before = Sntp.now(); - expect(before).to.equal(Date.now()); - - Sntp.start({ clockSyncRefresh: 100 }, function () { - - var now = Sntp.now(); - expect(now).to.not.equal(Date.now()); - expect(now).to.equal(Sntp.now()); - - setTimeout(function () { - - expect(Sntp.now()).to.not.equal(now); - Sntp.stop(); - done(); - }, 110); - }); - }); - }); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/package.json deleted file mode 100755 index 8bf4c5c7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "hawk", - "description": "HTTP Hawk Authentication Scheme", - "version": "1.0.0", - "author": { - "name": "Eran Hammer", - "email": "eran@hueniverse.com", - "url": "http://hueniverse.com" - }, - "contributors": [], - "repository": { - "type": "git", - "url": "git://github.com/hueniverse/hawk" - }, - "main": "index", - "keywords": [ - "http", - "authentication", - "scheme", - "hawk" - ], - "engines": { - "node": ">=0.8.0" - }, - "dependencies": { - "hoek": "0.9.x", - "boom": "0.4.x", - "cryptiles": "0.2.x", - "sntp": "0.2.x" - }, - "devDependencies": { - "lab": "0.1.x", - "complexity-report": "0.x.x", - "localStorage": "1.0.x" - }, - "scripts": { - "test": "make test-cov" - }, - "licenses": [ - { - "type": "BSD", - "url": "http://github.com/hueniverse/hawk/raw/master/LICENSE" - } - ], - "readme": "![hawk Logo](https://raw.github.com/hueniverse/hawk/master/images/hawk.png)\n\n<img align=\"right\" src=\"https://raw.github.com/hueniverse/hawk/master/images/logo.png\" /> **Hawk** is an HTTP authentication scheme using a message authentication code (MAC) algorithm to provide partial\nHTTP request cryptographic verification. For more complex use cases such as access delegation, see [Oz](https://github.com/hueniverse/oz).\n\nCurrent version: **1.0**\n\n[![Build Status](https://secure.travis-ci.org/hueniverse/hawk.png)](http://travis-ci.org/hueniverse/hawk)\n\n# Table of Content\n\n- [**Introduction**](#introduction)\n - [Replay Protection](#replay-protection)\n - [Usage Example](#usage-example)\n - [Protocol Example](#protocol-example)\n - [Payload Validation](#payload-validation)\n - [Response Payload Validation](#response-payload-validation)\n - [Browser Support and Considerations](#browser-support-and-considerations)\n<p></p>\n- [**Single URI Authorization**](#single-uri-authorization)\n - [Usage Example](#bewit-usage-example)\n<p></p>\n- [**Security Considerations**](#security-considerations)\n - [MAC Keys Transmission](#mac-keys-transmission)\n - [Confidentiality of Requests](#confidentiality-of-requests)\n - [Spoofing by Counterfeit Servers](#spoofing-by-counterfeit-servers)\n - [Plaintext Storage of Credentials](#plaintext-storage-of-credentials)\n - [Entropy of Keys](#entropy-of-keys)\n - [Coverage Limitations](#coverage-limitations)\n - [Future Time Manipulation](#future-time-manipulation)\n - [Client Clock Poisoning](#client-clock-poisoning)\n - [Bewit Limitations](#bewit-limitations)\n - [Host Header Forgery](#host-header-forgery)\n<p></p>\n- [**Frequently Asked Questions**](#frequently-asked-questions)\n<p></p>\n- [**Acknowledgements**](#acknowledgements)\n\n# Introduction\n\n**Hawk** is an HTTP authentication scheme providing mechanisms for making authenticated HTTP requests with\npartial cryptographic verification of the request and response, covering the HTTP method, request URI, host,\nand optionally the request payload.\n\nSimilar to the HTTP [Digest access authentication schemes](http://www.ietf.org/rfc/rfc2617.txt), **Hawk** uses a set of\nclient credentials which include an identifier (e.g. username) and key (e.g. password). Likewise, just as with the Digest scheme,\nthe key is never included in authenticated requests. Instead, it is used to calculate a request MAC value which is\nincluded in its place.\n\nHowever, **Hawk** has several differences from Digest. In particular, while both use a nonce to limit the possibility of\nreplay attacks, in **Hawk** the client generates the nonce and uses it in combination with a timestamp, leading to less\n\"chattiness\" (interaction with the server).\n\nAlso unlike Digest, this scheme is not intended to protect the key itself (the password in Digest) because\nthe client and server must both have access to the key material in the clear.\n\nThe primary design goals of this scheme are to:\n* simplify and improve HTTP authentication for services that are unwilling or unable to deploy TLS for all resources,\n* secure credentials against leakage (e.g., when the client uses some form of dynamic configuration to determine where\n to send an authenticated request), and\n* avoid the exposure of credentials sent to a malicious server over an unauthenticated secure channel due to client\n failure to validate the server's identity as part of its TLS handshake.\n\nIn addition, **Hawk** supports a method for granting third-parties temporary access to individual resources using\na query parameter called _bewit_ (in falconry, a leather strap used to attach a tracking device to the leg of a hawk).\n\nThe **Hawk** scheme requires the establishment of a shared symmetric key between the client and the server,\nwhich is beyond the scope of this module. Typically, the shared credentials are established via an initial\nTLS-protected phase or derived from some other shared confidential information available to both the client\nand the server.\n\n\n## Replay Protection\n\nWithout replay protection, an attacker can use a compromised (but otherwise valid and authenticated) request more \nthan once, gaining access to a protected resource. To mitigate this, clients include both a nonce and a timestamp when \nmaking requests. This gives the server enough information to prevent replay attacks.\n\nThe nonce is generated by the client, and is a string unique across all requests with the same timestamp and\nkey identifier combination. \n\nThe timestamp enables the server to restrict the validity period of the credentials where requests occuring afterwards\nare rejected. It also removes the need for the server to retain an unbounded number of nonce values for future checks.\nBy default, **Hawk** uses a time window of 1 minute to allow for time skew between the client and server (which in\npractice translates to a maximum of 2 minutes as the skew can be positive or negative).\n\nUsing a timestamp requires the client's clock to be in sync with the server's clock. **Hawk** requires both the client\nclock and the server clock to use NTP to ensure synchronization. However, given the limitations of some client types\n(e.g. browsers) to deploy NTP, the server provides the client with its current time (in seconds precision) in response\nto a bad timestamp.\n\nThere is no expectation that the client will adjust its system clock to match the server (in fact, this would be a\npotential attack vector). Instead, the client only uses the server's time to calculate an offset used only\nfor communications with that particular server. The protocol rewards clients with synchronized clocks by reducing\nthe number of round trips required to authenticate the first request.\n\n\n## Usage Example\n\nServer code:\n\n```javascript\nvar Http = require('http');\nvar Hawk = require('hawk');\n\n\n// Credentials lookup function\n\nvar credentialsFunc = function (id, callback) {\n\n var credentials = {\n key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',\n algorithm: 'sha256',\n user: 'Steve'\n };\n\n return callback(null, credentials);\n};\n\n// Create HTTP server\n\nvar handler = function (req, res) {\n\n // Authenticate incoming request\n\n Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {\n\n // Prepare response\n\n var payload = (!err ? 'Hello ' + credentials.user + ' ' + artifacts.ext : 'Shoosh!');\n var headers = { 'Content-Type': 'text/plain' };\n\n // Generate Server-Authorization response header\n\n var header = Hawk.server.header(credentials, artifacts, { payload: payload, contentType: headers['Content-Type'] });\n headers['Server-Authorization'] = header;\n\n // Send the response back\n\n res.writeHead(!err ? 200 : 401, headers);\n res.end(payload);\n });\n};\n\n// Start server\n\nHttp.createServer(handler).listen(8000, 'example.com');\n```\n\nClient code:\n\n```javascript\nvar Request = require('request');\nvar Hawk = require('hawk');\n\n\n// Client credentials\n\nvar credentials = {\n id: 'dh37fgj492je',\n key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',\n algorithm: 'sha256'\n}\n\n// Request options\n\nvar requestOptions = {\n uri: 'http://example.com:8000/resource/1?b=1&a=2',\n method: 'GET',\n headers: {}\n};\n\n// Generate Authorization request header\n\nvar header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'GET', { credentials: credentials, ext: 'some-app-data' });\nrequestOptions.headers.Authorization = header.field;\n\n// Send authenticated request\n\nRequest(requestOptions, function (error, response, body) {\n\n // Authenticate the server's response\n\n var isValid = Hawk.client.authenticate(response, credentials, header.artifacts, { payload: body });\n\n // Output results\n\n console.log(response.statusCode + ': ' + body + (isValid ? ' (valid)' : ' (invalid)'));\n});\n```\n\n**Hawk** utilized the [**SNTP**](https://github.com/hueniverse/sntp) module for time sync management. By default, the local\nmachine time is used. To automatically retrieve and synchronice the clock within the application, use the SNTP 'start()' method.\n\n```javascript\nHawk.sntp.start();\n```\n\n\n## Protocol Example\n\nThe client attempts to access a protected resource without authentication, sending the following HTTP request to\nthe resource server:\n\n```\nGET /resource/1?b=1&a=2 HTTP/1.1\nHost: example.com:8000\n```\n\nThe resource server returns an authentication challenge.\n\n```\nHTTP/1.1 401 Unauthorized\nWWW-Authenticate: Hawk\n```\n\nThe client has previously obtained a set of **Hawk** credentials for accessing resources on the \"http://example.com/\"\nserver. The **Hawk** credentials issued to the client include the following attributes:\n\n* Key identifier: dh37fgj492je\n* Key: werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn\n* Algorithm: sha256\n\nThe client generates the authentication header by calculating a timestamp (e.g. the number of seconds since January 1,\n1970 00:00:00 GMT), generating a nonce, and constructing the normalized request string (each value followed by a newline\ncharacter):\n\n```\nhawk.1.header\n1353832234\nj4h3g2\nGET\n/resource/1?b=1&a=2\nexample.com\n8000\n\nsome-app-ext-data\n\n```\n\nThe request MAC is calculated using HMAC with the specified hash algorithm \"sha256\" and the key over the normalized request string.\nThe result is base64-encoded to produce the request MAC:\n\n```\n6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE=\n```\n\nThe client includes the **Hawk** key identifier, timestamp, nonce, application specific data, and request MAC with the request using\nthe HTTP `Authorization` request header field:\n\n```\nGET /resource/1?b=1&a=2 HTTP/1.1\nHost: example.com:8000\nAuthorization: Hawk id=\"dh37fgj492je\", ts=\"1353832234\", nonce=\"j4h3g2\", ext=\"some-app-ext-data\", mac=\"6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE=\"\n```\n\nThe server validates the request by calculating the request MAC again based on the request received and verifies the validity\nand scope of the **Hawk** credentials. If valid, the server responds with the requested resource.\n\n\n### Payload Validation\n\n**Hawk** provides optional payload validation. When generating the authentication header, the client calculates a payload hash\nusing the specified hash algorithm. The hash is calculated over the concatenated value of (each followed by a newline character):\n* `hawk.1.payload`\n* the content-type in lowercase, without any parameters (e.g. `application/json`)\n* the request payload prior to any content encoding (the exact representation requirements should be specified by the server for payloads other than simple single-part ascii to ensure interoperability)\n\nFor example:\n\n* Payload: `Thank you for flying Hawk`\n* Content Type: `text/plain`\n* Hash (sha256): `Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=`\n\nResults in the following input to the payload hash function (newline terminated values):\n\n```\nhawk.1.payload\ntext/plain\nThank you for flying Hawk\n\n```\n\nWhich produces the following hash value:\n\n```\nYi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=\n```\n\nThe client constructs the normalized request string (newline terminated values):\n\n```\nhawk.1.header\n1353832234\nj4h3g2\nPOST\n/resource/1?a=1&b=2\nexample.com\n8000\nYi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=\nsome-app-ext-data\n\n```\n\nThen calculates the request MAC and includes the **Hawk** key identifier, timestamp, nonce, payload hash, application specific data,\nand request MAC, with the request using the HTTP `Authorization` request header field:\n\n```\nPOST /resource/1?a=1&b=2 HTTP/1.1\nHost: example.com:8000\nAuthorization: Hawk id=\"dh37fgj492je\", ts=\"1353832234\", nonce=\"j4h3g2\", hash=\"Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=\", ext=\"some-app-ext-data\", mac=\"aSe1DERmZuRl3pI36/9BdZmnErTw3sNzOOAUlfeKjVw=\"\n```\n\nIt is up to the server if and when it validates the payload for any given request, based solely on it's security policy\nand the nature of the data included.\n\nIf the payload is available at the time of authentication, the server uses the hash value provided by the client to construct\nthe normalized string and validates the MAC. If the MAC is valid, the server calculates the payload hash and compares the value\nwith the provided payload hash in the header. In many cases, checking the MAC first is faster than calculating the payload hash.\n\nHowever, if the payload is not available at authentication time (e.g. too large to fit in memory, streamed elsewhere, or processed\nat a different stage in the application), the server may choose to defer payload validation for later by retaining the hash value\nprovided by the client after validating the MAC.\n\nIt is important to note that MAC validation does not mean the hash value provided by the client is valid, only that the value\nincluded in the header was not modified. Without calculating the payload hash on the server and comparing it to the value provided\nby the client, the payload may be modified by an attacker.\n\n\n## Response Payload Validation\n\n**Hawk** provides partial response payload validation. The server includes the `Server-Authorization` response header which enables the\nclient to authenticate the response and ensure it is talking to the right server. **Hawk** defines the HTTP `Server-Authorization` header\nas a response header using the exact same syntax as the `Authorization` request header field.\n\nThe header is contructed using the same process as the client's request header. The server uses the same credentials and other\nartifacts provided by the client to constructs the normalized request string. The `ext` and `hash` values are replaced with\nnew values based on the server response. The rest as identical to those used by the client.\n\nThe result MAC digest is included with the optional `hash` and `ext` values:\n\n```\nServer-Authorization: Hawk mac=\"XIJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=\", hash=\"f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=\", ext=\"response-specific\"\n```\n\n\n## Browser Support and Considerations\n\nA browser script is provided for including using a `<script>` tag in [lib/browser.js](/lib/browser.js).\n\n**Hawk** relies on the _Server-Authorization_ and _WWW-Authenticate_ headers in its response to communicate with the client.\nTherefore, in case of CORS requests, it is important to consider sending _Access-Control-Expose-Headers_ with the value\n_\"WWW-Authenticate, Server-Authorization\"_ on each response from your server. As explained in the\n[specifications](http://www.w3.org/TR/cors/#access-control-expose-headers-response-header), it will indicate that these headers\ncan safely be accessed by the client (using getResponseHeader() on the XmlHttpRequest object). Otherwise you will be met with a\n[\"simple response header\"](http://www.w3.org/TR/cors/#simple-response-header) which excludes these fields and would prevent the\nHawk client from authenticating the requests.You can read more about the why and how in this\n[article](http://www.html5rocks.com/en/tutorials/cors/#toc-adding-cors-support-to-the-server)\n\n\n# Single URI Authorization\n\nThere are cases in which limited and short-term access to a protected resource is granted to a third party which does not\nhave access to the shared credentials. For example, displaying a protected image on a web page accessed by anyone. **Hawk**\nprovides limited support for such URIs in the form of a _bewit_ - a URI query parameter appended to the request URI which contains\nthe necessary credentials to authenticate the request.\n\nBecause of the significant security risks involved in issuing such access, bewit usage is purposely limited only to GET requests\nand for a finite period of time. Both the client and server can issue bewit credentials, however, the server should not use the same\ncredentials as the client to maintain clear traceability as to who issued which credentials.\n\nIn order to simplify implementation, bewit credentials do not support single-use policy and can be replayed multiple times within\nthe granted access timeframe. \n\n\n## Bewit Usage Example\n\nServer code:\n\n```javascript\nvar Http = require('http');\nvar Hawk = require('hawk');\n\n\n// Credentials lookup function\n\nvar credentialsFunc = function (id, callback) {\n\n var credentials = {\n key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',\n algorithm: 'sha256'\n };\n\n return callback(null, credentials);\n};\n\n// Create HTTP server\n\nvar handler = function (req, res) {\n\n Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {\n\n res.writeHead(!err ? 200 : 401, { 'Content-Type': 'text/plain' });\n res.end(!err ? 'Access granted' : 'Shoosh!');\n });\n};\n\nHttp.createServer(handler).listen(8000, 'example.com');\n```\n\nBewit code generation:\n\n```javascript\nvar Request = require('request');\nvar Hawk = require('hawk');\n\n\n// Client credentials\n\nvar credentials = {\n id: 'dh37fgj492je',\n key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',\n algorithm: 'sha256'\n}\n\n// Generate bewit\n\nvar duration = 60 * 5; // 5 Minutes\nvar bewit = Hawk.uri.getBewit('http://example.com:8080/resource/1?b=1&a=2', { credentials: credentials, ttlSec: duration, ext: 'some-app-data' });\nvar uri = 'http://example.com:8000/resource/1?b=1&a=2' + '&bewit=' + bewit;\n```\n\n\n# Security Considerations\n\nThe greatest sources of security risks are usually found not in **Hawk** but in the policies and procedures surrounding its use.\nImplementers are strongly encouraged to assess how this module addresses their security requirements. This section includes\nan incomplete list of security considerations that must be reviewed and understood before deploying **Hawk** on the server.\nMany of the protections provided in **Hawk** depends on whether and how they are used.\n\n### MAC Keys Transmission\n\n**Hawk** does not provide any mechanism for obtaining or transmitting the set of shared credentials required. Any mechanism used\nto obtain **Hawk** credentials must ensure that these transmissions are protected using transport-layer mechanisms such as TLS.\n\n### Confidentiality of Requests\n\nWhile **Hawk** provides a mechanism for verifying the integrity of HTTP requests, it provides no guarantee of request\nconfidentiality. Unless other precautions are taken, eavesdroppers will have full access to the request content. Servers should\ncarefully consider the types of data likely to be sent as part of such requests, and employ transport-layer security mechanisms\nto protect sensitive resources.\n\n### Spoofing by Counterfeit Servers\n\n**Hawk** provides limited verification of the server authenticity. When receiving a response back from the server, the server\nmay choose to include a response `Server-Authorization` header which the client can use to verify the response. However, it is up to\nthe server to determine when such measure is included, to up to the client to enforce that policy.\n\nA hostile party could take advantage of this by intercepting the client's requests and returning misleading or otherwise\nincorrect responses. Service providers should consider such attacks when developing services using this protocol, and should\nrequire transport-layer security for any requests where the authenticity of the resource server or of server responses is an issue.\n\n### Plaintext Storage of Credentials\n\nThe **Hawk** key functions the same way passwords do in traditional authentication systems. In order to compute the request MAC,\nthe server must have access to the key in plaintext form. This is in contrast, for example, to modern operating systems, which\nstore only a one-way hash of user credentials.\n\nIf an attacker were to gain access to these keys - or worse, to the server's database of all such keys - he or she would be able\nto perform any action on behalf of any resource owner. Accordingly, it is critical that servers protect these keys from unauthorized\naccess.\n\n### Entropy of Keys\n\nUnless a transport-layer security protocol is used, eavesdroppers will have full access to authenticated requests and request\nMAC values, and will thus be able to mount offline brute-force attacks to recover the key used. Servers should be careful to\nassign keys which are long enough, and random enough, to resist such attacks for at least the length of time that the **Hawk**\ncredentials are valid.\n\nFor example, if the credentials are valid for two weeks, servers should ensure that it is not possible to mount a brute force\nattack that recovers the key in less than two weeks. Of course, servers are urged to err on the side of caution, and use the\nlongest key reasonable.\n\nIt is equally important that the pseudo-random number generator (PRNG) used to generate these keys be of sufficiently high\nquality. Many PRNG implementations generate number sequences that may appear to be random, but which nevertheless exhibit\npatterns or other weaknesses which make cryptanalysis or brute force attacks easier. Implementers should be careful to use\ncryptographically secure PRNGs to avoid these problems.\n\n### Coverage Limitations\n\nThe request MAC only covers the HTTP `Host` header and optionally the `Content-Type` header. It does not cover any other headers\nwhich can often affect how the request body is interpreted by the server. If the server behavior is influenced by the presence\nor value of such headers, an attacker can manipulate the request headers without being detected. Implementers should use the\n`ext` feature to pass application-specific information via the `Authorization` header which is protected by the request MAC.\n\nThe response authentication, when performed, only covers the response payload, content-type, and the request information \nprovided by the client in it's request (method, resource, timestamp, nonce, etc.). It does not cover the HTTP status code or\nany other response header field (e.g. Location) which can affect the client's behaviour.\n\n### Future Time Manipulation\n\nThe protocol relies on a clock sync between the client and server. To accomplish this, the server informs the client of its\ncurrent time when an invalid timestamp is received.\n\nIf an attacker is able to manipulate this information and cause the client to use an incorrect time, it would be able to cause\nthe client to generate authenticated requests using time in the future. Such requests will fail when sent by the client, and will\nnot likely leave a trace on the server (given the common implementation of nonce, if at all enforced). The attacker will then\nbe able to replay the request at the correct time without detection.\n\nThe client must only use the time information provided by the server if:\n* it was delivered over a TLS connection and the server identity has been verified, or\n* the `tsm` MAC digest calculated using the same client credentials over the timestamp has been verified.\n\n### Client Clock Poisoning\n\nWhen receiving a request with a bad timestamp, the server provides the client with its current time. The client must never use\nthe time received from the server to adjust its own clock, and must only use it to calculate an offset for communicating with\nthat particular server.\n\n### Bewit Limitations\n\nSpecial care must be taken when issuing bewit credentials to third parties. Bewit credentials are valid until expiration and cannot\nbe revoked or limited without using other means. Whatever resource they grant access to will be completely exposed to anyone with\naccess to the bewit credentials which act as bearer credentials for that particular resource. While bewit usage is limited to GET\nrequests only and therefore cannot be used to perform transactions or change server state, it can still be used to expose private\nand sensitive information.\n\n### Host Header Forgery\n\nHawk validates the incoming request MAC against the incoming HTTP Host header. However, unless the optional `host` and `port`\noptions are used with `server.authenticate()`, a malicous client can mint new host names pointing to the server's IP address and\nuse that to craft an attack by sending a valid request that's meant for another hostname than the one used by the server. Server\nimplementors must manually verify that the host header received matches their expectation (or use the options mentioned above).\n\n# Frequently Asked Questions\n\n### Where is the protocol specification?\n\nIf you are looking for some prose explaining how all this works, **this is it**. **Hawk** is being developed as an open source\nproject instead of a standard. In other words, the [code](/hueniverse/hawk/tree/master/lib) is the specification. Not sure about\nsomething? Open an issue!\n\n### Is it done?\n\nAt if version 0.10.0, **Hawk** is feature-complete. However, until this module reaches version 1.0.0 it is considered experimental\nand is likely to change. This also means your feedback and contribution are very welcome. Feel free to open issues with questions\nand suggestions.\n\n### Where can I find **Hawk** implementations in other languages?\n\n**Hawk**'s only reference implementation is provided in JavaScript as a node.js module. However, others are actively porting it to other\nplatforms. There is already a [PHP](https://github.com/alexbilbie/PHP-Hawk),\n[.NET](https://github.com/pcibraro/hawknet), and [JAVA](https://github.com/wealdtech/hawk) libraries available. The full list\nis maintained [here](https://github.com/hueniverse/hawk/issues?labels=port). Please add an issue if you are working on another\nport. A cross-platform test-suite is in the works.\n\n### Why isn't the algorithm part of the challenge or dynamically negotiated?\n\nThe algorithm used is closely related to the key issued as different algorithms require different key sizes (and other\nrequirements). While some keys can be used for multiple algorithm, the protocol is designed to closely bind the key and algorithm\ntogether as part of the issued credentials.\n\n### Why is Host and Content-Type the only headers covered by the request MAC?\n\nIt is really hard to include other headers. Headers can be changed by proxies and other intermediaries and there is no\nwell-established way to normalize them. Many platforms change the case of header field names and values. The only\nstraight-forward solution is to include the headers in some blob (say, base64 encoded JSON) and include that with the request,\nan approach taken by JWT and other such formats. However, that design violates the HTTP header boundaries, repeats information,\nand introduces other security issues because firewalls will not be aware of these \"hidden\" headers. In addition, any information\nrepeated must be compared to the duplicated information in the header and therefore only moves the problem elsewhere.\n\n### Why not just use HTTP Digest?\n\nDigest requires pre-negotiation to establish a nonce. This means you can't just make a request - you must first send\na protocol handshake to the server. This pattern has become unacceptable for most web services, especially mobile\nwhere extra round-trip are costly.\n\n### Why bother with all this nonce and timestamp business?\n\n**Hawk** is an attempt to find a reasonable, practical compromise between security and usability. OAuth 1.0 got timestamp\nand nonces halfway right but failed when it came to scalability and consistent developer experience. **Hawk** addresses\nit by requiring the client to sync its clock, but provides it with tools to accomplish it.\n\nIn general, replay protection is a matter of application-specific threat model. It is less of an issue on a TLS-protected\nsystem where the clients are implemented using best practices and are under the control of the server. Instead of dropping\nreplay protection, **Hawk** offers a required time window and an optional nonce verification. Together, it provides developers\nwith the ability to decide how to enforce their security policy without impacting the client's implementation.\n\n### What are `app` and `dlg` in the authorization header and normalized mac string?\n\nThe original motivation for **Hawk** was to replace the OAuth 1.0 use cases. This included both a simple client-server mode which\nthis module is specifically designed for, and a delegated access mode which is being developed separately in\n[Oz](https://github.com/hueniverse/oz). In addition to the **Hawk** use cases, Oz requires another attribute: the application id `app`.\nThis provides binding between the credentials and the application in a way that prevents an attacker from tricking an application\nto use credentials issued to someone else. It also has an optional 'delegated-by' attribute `dlg` which is the application id of the\napplication the credentials were directly issued to. The goal of these two additions is to allow Oz to utilize **Hawk** directly,\nbut with the additional security of delegated credentials.\n\n### What is the purpose of the static strings used in each normalized MAC input?\n\nWhen calculating a hash or MAC, a static prefix (tag) is added. The prefix is used to prevent MAC values from being\nused or reused for a purpose other than what they were created for (i.e. prevents switching MAC values between a request,\nresponse, and a bewit use cases). It also protects against expliots created after a potential change in how the protocol\ncreates the normalized string. For example, if a future version would switch the order of nonce and timestamp, it\ncan create an exploit opportunity for cases where the nonce is similar in format to a timestamp.\n\n### Does **Hawk** have anything to do with OAuth?\n\nShort answer: no.\n\n**Hawk** was originally proposed as the OAuth MAC Token specification. However, the OAuth working group in its consistent\nincompetence failed to produce a final, usable solution to address one of the most popular use cases of OAuth 1.0 - using it\nto authenticate simple client-server transactions (i.e. two-legged). As you can guess, the OAuth working group is still hard\nat work to produce more garbage.\n\n**Hawk** provides a simple HTTP authentication scheme for making client-server requests. It does not address the OAuth use case\nof delegating access to a third party. If you are looking for an OAuth alternative, check out [Oz](https://github.com/hueniverse/oz).\n\n\n# Acknowledgements\n\n**Hawk** is a derivative work of the [HTTP MAC Authentication Scheme](http://tools.ietf.org/html/draft-hammer-oauth-v2-mac-token-05) proposal\nco-authored by Ben Adida, Adam Barth, and Eran Hammer, which in turn was based on the OAuth 1.0 community specification.\n\nSpecial thanks to Ben Laurie for his always insightful feedback and advice.\n\nThe **Hawk** logo was created by [Chris Carrasco](http://chriscarrasco.com).\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/hueniverse/hawk/issues" - }, - "homepage": "https://github.com/hueniverse/hawk", - "_id": "hawk@1.0.0", - "dist": { - "shasum": "54a49d24842997b48ab16d30e69195e4a574149b" - }, - "_from": "hawk@~1.0.0", - "_resolved": "https://registry.npmjs.org/hawk/-/hawk-1.0.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/browser.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/browser.js deleted file mode 100755 index b25a10fd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/browser.js +++ /dev/null @@ -1,771 +0,0 @@ -// Load modules - -var Lab = require('lab'); -var Hoek = require('hoek'); -var Hawk = require('../lib'); -var Browser = require('../lib/browser'); -var LocalStorage = require('localStorage'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Browser', function () { - - var credentialsFunc = function (id, callback) { - - var credentials = { - id: id, - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: (id === '1' ? 'sha1' : 'sha256'), - user: 'steve' - }; - - return callback(null, credentials); - }; - - it('should generate a header then successfully parse it (configuration)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' }).field; - expect(req.authorization).to.exist; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (node request)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com:8080', - 'content-type': 'text/plain;x=y' - } - }; - - var payload = 'some not so random text'; - - credentialsFunc('123456', function (err, credentials) { - - var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] }); - req.headers.authorization = reqHeader.field; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true); - - var res = { - headers: { - 'content-type': 'text/plain' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' }); - expect(res.headers['server-authorization']).to.exist; - - expect(Browser.client.authenticate(res, credentials, artifacts, { payload: 'some reply' })).to.equal(true); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (no server header options)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com:8080', - 'content-type': 'text/plain;x=y' - } - }; - - var payload = 'some not so random text'; - - credentialsFunc('123456', function (err, credentials) { - - var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] }); - req.headers.authorization = reqHeader.field; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true); - - var res = { - headers: { - 'content-type': 'text/plain' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts); - expect(res.headers['server-authorization']).to.exist; - - expect(Browser.client.authenticate(res, credentials, artifacts)).to.equal(true); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (no server header)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com:8080', - 'content-type': 'text/plain;x=y' - } - }; - - var payload = 'some not so random text'; - - credentialsFunc('123456', function (err, credentials) { - - var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] }); - req.headers.authorization = reqHeader.field; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true); - - var res = { - headers: { - 'content-type': 'text/plain' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - expect(Browser.client.authenticate(res, credentials, artifacts)).to.equal(true); - done(); - }); - }); - }); - - it('should generate a header with stale ts and successfully authenticate on second call', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - Browser.utils.setNtpOffset(60 * 60 * 1000); - var header = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' }); - req.authorization = header.field; - expect(req.authorization).to.exist; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.message).to.equal('Stale timestamp'); - - var res = { - headers: { - 'www-authenticate': err.response.headers['WWW-Authenticate'] - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - expect(Browser.utils.getNtpOffset()).to.equal(60 * 60 * 1000); - expect(Browser.client.authenticate(res, credentials, header.artifacts)).to.equal(true); - expect(Browser.utils.getNtpOffset()).to.equal(0); - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' }).field; - expect(req.authorization).to.exist; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - done(); - }); - }); - }); - }); - - it('should generate a header with stale ts and successfully authenticate on second call (manual localStorage)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - Browser.utils.setStorage(LocalStorage) - - Browser.utils.setNtpOffset(60 * 60 * 1000); - var header = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' }); - req.authorization = header.field; - expect(req.authorization).to.exist; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.message).to.equal('Stale timestamp'); - - var res = { - headers: { - 'www-authenticate': err.response.headers['WWW-Authenticate'] - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - expect(parseInt(LocalStorage.getItem('hawk_ntp_offset'))).to.equal(60 * 60 * 1000); - expect(Browser.utils.getNtpOffset()).to.equal(60 * 60 * 1000); - expect(Browser.client.authenticate(res, credentials, header.artifacts)).to.equal(true); - expect(Browser.utils.getNtpOffset()).to.equal(0); - expect(parseInt(LocalStorage.getItem('hawk_ntp_offset'))).to.equal(0); - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' }).field; - expect(req.authorization).to.exist; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - done(); - }); - }); - }); - }); - - it('should generate a header then fails to parse it (missing server header hash)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com:8080', - 'content-type': 'text/plain;x=y' - } - }; - - var payload = 'some not so random text'; - - credentialsFunc('123456', function (err, credentials) { - - var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] }); - req.headers.authorization = reqHeader.field; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true); - - var res = { - headers: { - 'content-type': 'text/plain' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts); - expect(res.headers['server-authorization']).to.exist; - - expect(Browser.client.authenticate(res, credentials, artifacts, { payload: 'some reply' })).to.equal(false); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (with hash)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field; - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it then validate payload', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field; - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload('hola!', credentials, artifacts)).to.be.true; - expect(Hawk.server.authenticatePayload('hello!', credentials, artifacts)).to.be.false; - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (app)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', app: 'asd23ased' }).field; - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(artifacts.app).to.equal('asd23ased'); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (app, dlg)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', app: 'asd23ased', dlg: '23434szr3q4d' }).field; - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(artifacts.app).to.equal('asd23ased'); - expect(artifacts.dlg).to.equal('23434szr3q4d'); - done(); - }); - }); - }); - - it('should generate a header then fail authentication due to bad hash', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field; - Hawk.server.authenticate(req, credentialsFunc, { payload: 'byebye!' }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Bad payload hash'); - done(); - }); - }); - }); - - it('should generate a header for one resource then fail to authenticate another', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' }).field; - req.url = '/something/else'; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(credentials).to.exist; - done(); - }); - }); - }); - - describe('client', function () { - - describe('#header', function () { - - it('should return a valid authorization header (sha1)', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'sha1' - }; - - var header = Browser.client.header('http://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about' }).field; - expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="bsvY3IfUllw6V5rvk4tStEvpBhE=", ext="Bazinga!", mac="qbf1ZPG/r/e06F4ht+T77LXi5vw="'); - done(); - }); - - it('should return a valid authorization header (sha256)', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'sha256' - }; - - var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field; - expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", ext="Bazinga!", mac="q1CwFoSHzPZSkbIvl0oYlD+91rBUEvFk763nMjMndj8="'); - done(); - }); - - it('should return a valid authorization header (no ext)', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'sha256' - }; - - var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field; - expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="'); - done(); - }); - - it('should return an empty authorization header on missing options', function (done) { - - var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST').field; - expect(header).to.equal(''); - done(); - }); - - it('should return an empty authorization header on invalid credentials', function (done) { - - var credentials = { - key: '2983d45yun89q', - algorithm: 'sha256' - }; - - var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207 }).field; - expect(header).to.equal(''); - done(); - }); - - it('should return an empty authorization header on invalid algorithm', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'hmac-sha-0' - }; - - var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, payload: 'something, anything!', ext: 'Bazinga!', timestamp: 1353809207 }).field; - expect(header).to.equal(''); - done(); - }); - }); - - describe('#authenticate', function () { - - it('should return false on invalid header', function (done) { - - var res = { - headers: { - 'server-authorization': 'Hawk mac="abc", bad="xyz"' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - expect(Browser.client.authenticate(res, {})).to.equal(false); - done(); - }); - - it('should return false on invalid mac', function (done) { - - var res = { - headers: { - 'content-type': 'text/plain', - 'server-authorization': 'Hawk mac="_IJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - var artifacts = { - method: 'POST', - host: 'example.com', - port: '8080', - resource: '/resource/4?filter=a', - ts: '1362336900', - nonce: 'eb5S_L', - hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=', - ext: 'some-app-data', - app: undefined, - dlg: undefined, - mac: 'BlmSe8K+pbKIb6YsZCnt4E1GrYvY1AaYayNR82dGpIk=', - id: '123456' - }; - - var credentials = { - id: '123456', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'steve' - }; - - expect(Browser.client.authenticate(res, credentials, artifacts)).to.equal(false); - done(); - }); - - it('should return true on ignoring hash', function (done) { - - var res = { - headers: { - 'content-type': 'text/plain', - 'server-authorization': 'Hawk mac="XIJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - var artifacts = { - method: 'POST', - host: 'example.com', - port: '8080', - resource: '/resource/4?filter=a', - ts: '1362336900', - nonce: 'eb5S_L', - hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=', - ext: 'some-app-data', - app: undefined, - dlg: undefined, - mac: 'BlmSe8K+pbKIb6YsZCnt4E1GrYvY1AaYayNR82dGpIk=', - id: '123456' - }; - - var credentials = { - id: '123456', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'steve' - }; - - expect(Browser.client.authenticate(res, credentials, artifacts)).to.equal(true); - done(); - }); - - it('should fail on invalid WWW-Authenticate header format', function (done) { - - var res = { - headers: { - 'www-authenticate': 'Hawk ts="1362346425875", tsm="PhwayS28vtnn3qbv0mqRBYSXebN/zggEtucfeZ620Zo=", x="Stale timestamp"' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - expect(Browser.client.authenticate(res, {})).to.equal(false); - done(); - }); - - it('should fail on invalid WWW-Authenticate header format', function (done) { - - var credentials = { - id: '123456', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'steve' - }; - - var res = { - headers: { - 'www-authenticate': 'Hawk ts="1362346425875", tsm="hwayS28vtnn3qbv0mqRBYSXebN/zggEtucfeZ620Zo=", error="Stale timestamp"' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - expect(Browser.client.authenticate(res, credentials)).to.equal(false); - done(); - }); - }); - - describe('#message', function () { - it('should generate an authorization then successfully parse it', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - done(); - }); - }); - }); - - it('should fail on missing host', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Browser.client.message(null, 8080, 'some message', { credentials: credentials }); - expect(auth).to.not.exist; - done(); - }); - }); - - it('should fail on missing credentials', function (done) { - - var auth = Browser.client.message('example.com', 8080, 'some message', {}); - expect(auth).to.not.exist; - done(); - }); - - it('should fail on invalid algorithm', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var creds = Hoek.clone(credentials); - creds.algorithm = 'blah'; - var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: creds }); - expect(auth).to.not.exist; - done(); - }); - }); - }); - }); - - describe('#parseAuthorizationHeader', function (done) { - - it('returns null on missing header', function (done) { - - expect(Browser.utils.parseAuthorizationHeader()).to.equal(null); - done(); - }); - - it('returns null on bad header syntax (structure)', function (done) { - - expect(Browser.utils.parseAuthorizationHeader('Hawk')).to.equal(null); - done(); - }); - - it('returns null on bad header syntax (parts)', function (done) { - - expect(Browser.utils.parseAuthorizationHeader(' ')).to.equal(null); - done(); - }); - - it('returns null on bad scheme name', function (done) { - - expect(Browser.utils.parseAuthorizationHeader('Basic asdasd')).to.equal(null); - done(); - }); - - it('returns null on bad attribute value', function (done) { - - expect(Browser.utils.parseAuthorizationHeader('Hawk test="\t"', ['test'])).to.equal(null); - done(); - }); - - it('returns null on duplicated attribute', function (done) { - - expect(Browser.utils.parseAuthorizationHeader('Hawk test="a", test="b"', ['test'])).to.equal(null); - done(); - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/client.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/client.js deleted file mode 100755 index bcc4222a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/client.js +++ /dev/null @@ -1,206 +0,0 @@ -// Load modules - -var Url = require('url'); -var Lab = require('lab'); -var Hawk = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hawk', function () { - - describe('client', function () { - - describe('#header', function () { - - it('should return a valid authorization header (sha1)', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'sha1' - }; - - var header = Hawk.client.header('http://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about' }).field; - expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="bsvY3IfUllw6V5rvk4tStEvpBhE=", ext="Bazinga!", mac="qbf1ZPG/r/e06F4ht+T77LXi5vw="'); - done(); - }); - - it('should return a valid authorization header (sha256)', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'sha256' - }; - - var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field; - expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", ext="Bazinga!", mac="q1CwFoSHzPZSkbIvl0oYlD+91rBUEvFk763nMjMndj8="'); - done(); - }); - - it('should return a valid authorization header (no ext)', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'sha256' - }; - - var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field; - expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="'); - done(); - }); - - it('should return an empty authorization header on missing options', function (done) { - - var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST').field; - expect(header).to.equal(''); - done(); - }); - - it('should return an empty authorization header on invalid credentials', function (done) { - - var credentials = { - key: '2983d45yun89q', - algorithm: 'sha256' - }; - - var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207 }).field; - expect(header).to.equal(''); - done(); - }); - - it('should return an empty authorization header on invalid algorithm', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'hmac-sha-0' - }; - - var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, payload: 'something, anything!', ext: 'Bazinga!', timestamp: 1353809207 }).field; - expect(header).to.equal(''); - done(); - }); - }); - - describe('#authenticate', function () { - - it('should return false on invalid header', function (done) { - - var res = { - headers: { - 'server-authorization': 'Hawk mac="abc", bad="xyz"' - } - }; - - expect(Hawk.client.authenticate(res, {})).to.equal(false); - done(); - }); - - it('should return false on invalid mac', function (done) { - - var res = { - headers: { - 'content-type': 'text/plain', - 'server-authorization': 'Hawk mac="_IJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"' - } - }; - - var artifacts = { - method: 'POST', - host: 'example.com', - port: '8080', - resource: '/resource/4?filter=a', - ts: '1362336900', - nonce: 'eb5S_L', - hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=', - ext: 'some-app-data', - app: undefined, - dlg: undefined, - mac: 'BlmSe8K+pbKIb6YsZCnt4E1GrYvY1AaYayNR82dGpIk=', - id: '123456' - }; - - var credentials = { - id: '123456', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'steve' - }; - - expect(Hawk.client.authenticate(res, credentials, artifacts)).to.equal(false); - done(); - }); - - it('should return true on ignoring hash', function (done) { - - var res = { - headers: { - 'content-type': 'text/plain', - 'server-authorization': 'Hawk mac="XIJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"' - } - }; - - var artifacts = { - method: 'POST', - host: 'example.com', - port: '8080', - resource: '/resource/4?filter=a', - ts: '1362336900', - nonce: 'eb5S_L', - hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=', - ext: 'some-app-data', - app: undefined, - dlg: undefined, - mac: 'BlmSe8K+pbKIb6YsZCnt4E1GrYvY1AaYayNR82dGpIk=', - id: '123456' - }; - - var credentials = { - id: '123456', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'steve' - }; - - expect(Hawk.client.authenticate(res, credentials, artifacts)).to.equal(true); - done(); - }); - - it('should fail on invalid WWW-Authenticate header format', function (done) { - - var header = 'Hawk ts="1362346425875", tsm="PhwayS28vtnn3qbv0mqRBYSXebN/zggEtucfeZ620Zo=", x="Stale timestamp"'; - expect(Hawk.client.authenticate({ headers: { 'www-authenticate': header } }, {})).to.equal(false); - done(); - }); - - it('should fail on invalid WWW-Authenticate header format', function (done) { - - var credentials = { - id: '123456', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'steve' - }; - - var header = 'Hawk ts="1362346425875", tsm="hwayS28vtnn3qbv0mqRBYSXebN/zggEtucfeZ620Zo=", error="Stale timestamp"'; - expect(Hawk.client.authenticate({ headers: { 'www-authenticate': header } }, credentials)).to.equal(false); - done(); - }); - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/crypto.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/crypto.js deleted file mode 100755 index b62c2177..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/crypto.js +++ /dev/null @@ -1,86 +0,0 @@ -// Load modules - -var Lab = require('lab'); -var Hawk = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hawk', function () { - - describe('Crypto', function () { - - describe('#generateNormalizedString', function () { - - it('should return a valid normalized string', function (done) { - - expect(Hawk.crypto.generateNormalizedString('header', { - credentials: { - key: 'dasdfasdf', - algorithm: 'sha256' - }, - ts: 1357747017, - nonce: 'k3k4j5', - method: 'GET', - resource: '/resource/something', - host: 'example.com', - port: 8080 - })).to.equal('hawk.1.header\n1357747017\nk3k4j5\nGET\n/resource/something\nexample.com\n8080\n\n\n'); - - done(); - }); - - it('should return a valid normalized string (ext)', function (done) { - - expect(Hawk.crypto.generateNormalizedString('header', { - credentials: { - key: 'dasdfasdf', - algorithm: 'sha256' - }, - ts: 1357747017, - nonce: 'k3k4j5', - method: 'GET', - resource: '/resource/something', - host: 'example.com', - port: 8080, - ext: 'this is some app data' - })).to.equal('hawk.1.header\n1357747017\nk3k4j5\nGET\n/resource/something\nexample.com\n8080\n\nthis is some app data\n'); - - done(); - }); - - it('should return a valid normalized string (payload + ext)', function (done) { - - expect(Hawk.crypto.generateNormalizedString('header', { - credentials: { - key: 'dasdfasdf', - algorithm: 'sha256' - }, - ts: 1357747017, - nonce: 'k3k4j5', - method: 'GET', - resource: '/resource/something', - host: 'example.com', - port: 8080, - hash: 'U4MKKSmiVxk37JCCrAVIjV/OhB3y+NdwoCr6RShbVkE=', - ext: 'this is some app data' - })).to.equal('hawk.1.header\n1357747017\nk3k4j5\nGET\n/resource/something\nexample.com\n8080\nU4MKKSmiVxk37JCCrAVIjV/OhB3y+NdwoCr6RShbVkE=\nthis is some app data\n'); - - done(); - }); - }); - }); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/index.js deleted file mode 100755 index ba837388..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/index.js +++ /dev/null @@ -1,316 +0,0 @@ -// Load modules - -var Url = require('url'); -var Lab = require('lab'); -var Hawk = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hawk', function () { - - var credentialsFunc = function (id, callback) { - - var credentials = { - id: id, - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: (id === '1' ? 'sha1' : 'sha256'), - user: 'steve' - }; - - return callback(null, credentials); - }; - - it('should generate a header then successfully parse it (configuration)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Hawk.client.header(Url.parse('http://example.com:8080/resource/4?filter=a'), req.method, { credentials: credentials, ext: 'some-app-data' }).field; - expect(req.authorization).to.exist; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (node request)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com:8080', - 'content-type': 'text/plain;x=y' - } - }; - - var payload = 'some not so random text'; - - credentialsFunc('123456', function (err, credentials) { - - var reqHeader = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] }); - req.headers.authorization = reqHeader.field; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true); - - var res = { - headers: { - 'content-type': 'text/plain' - } - }; - - res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' }); - expect(res.headers['server-authorization']).to.exist; - - expect(Hawk.client.authenticate(res, credentials, artifacts, { payload: 'some reply' })).to.equal(true); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (no server header options)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com:8080', - 'content-type': 'text/plain;x=y' - } - }; - - var payload = 'some not so random text'; - - credentialsFunc('123456', function (err, credentials) { - - var reqHeader = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] }); - req.headers.authorization = reqHeader.field; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true); - - var res = { - headers: { - 'content-type': 'text/plain' - } - }; - - res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts); - expect(res.headers['server-authorization']).to.exist; - - expect(Hawk.client.authenticate(res, credentials, artifacts)).to.equal(true); - done(); - }); - }); - }); - - it('should generate a header then fails to parse it (missing server header hash)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com:8080', - 'content-type': 'text/plain;x=y' - } - }; - - var payload = 'some not so random text'; - - credentialsFunc('123456', function (err, credentials) { - - var reqHeader = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] }); - req.headers.authorization = reqHeader.field; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true); - - var res = { - headers: { - 'content-type': 'text/plain' - } - }; - - res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts); - expect(res.headers['server-authorization']).to.exist; - - expect(Hawk.client.authenticate(res, credentials, artifacts, { payload: 'some reply' })).to.equal(false); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (with hash)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field; - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it then validate payload', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field; - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload('hola!', credentials, artifacts)).to.be.true; - expect(Hawk.server.authenticatePayload('hello!', credentials, artifacts)).to.be.false; - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (app)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', app: 'asd23ased' }).field; - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(artifacts.app).to.equal('asd23ased'); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (app, dlg)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', app: 'asd23ased', dlg: '23434szr3q4d' }).field; - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(artifacts.app).to.equal('asd23ased'); - expect(artifacts.dlg).to.equal('23434szr3q4d'); - done(); - }); - }); - }); - - it('should generate a header then fail authentication due to bad hash', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field; - Hawk.server.authenticate(req, credentialsFunc, { payload: 'byebye!' }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Bad payload hash'); - done(); - }); - }); - }); - - it('should generate a header for one resource then fail to authenticate another', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' }).field; - req.url = '/something/else'; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(credentials).to.exist; - done(); - }); - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/message.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/message.js deleted file mode 100755 index 04b91d41..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/message.js +++ /dev/null @@ -1,246 +0,0 @@ -// Load modules - -var Url = require('url'); -var Lab = require('lab'); -var Hoek = require('hoek'); -var Hawk = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hawk', function () { - - var credentialsFunc = function (id, callback) { - - var credentials = { - id: id, - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: (id === '1' ? 'sha1' : 'sha256'), - user: 'steve' - }; - - return callback(null, credentials); - }; - - it('should generate an authorization then successfully parse it', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - done(); - }); - }); - }); - - it('should fail authorization on mismatching host', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - Hawk.server.authenticateMessage('example1.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('Bad mac'); - done(); - }); - }); - }); - - it('should fail authorization on stale timestamp', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, { localtimeOffsetMsec: 100000 }, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('Stale timestamp'); - done(); - }); - }); - }); - - it('should fail authorization on invalid authorization', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - delete auth.id; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('Invalid authorization'); - done(); - }); - }); - }); - - it('should fail authorization on bad hash', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message1', auth, credentialsFunc, {}, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('Bad message hash'); - done(); - }); - }); - }); - - it('should fail authorization on nonce error', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, { nonceFunc: function (nonce, ts, callback) { callback (new Error('kaboom')); } }, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('Invalid nonce'); - done(); - }); - }); - }); - - it('should fail authorization on credentials error', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - var errFunc = function (id, callback) { - - callback(new Error('kablooey')); - }; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('kablooey'); - done(); - }); - }); - }); - - it('should fail authorization on missing credentials', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - var errFunc = function (id, callback) { - - callback(); - }; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('Unknown credentials'); - done(); - }); - }); - }); - - it('should fail authorization on invalid credentials', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - var errFunc = function (id, callback) { - - callback(null, {}); - }; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('Invalid credentials'); - done(); - }); - }); - }); - - it('should fail authorization on invalid credentials algorithm', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - var errFunc = function (id, callback) { - - callback(null, { key: '123', algorithm: '456' }); - }; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('Unknown algorithm'); - done(); - }); - }); - }); - - it('should fail on missing host', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message(null, 8080, 'some message', { credentials: credentials }); - expect(auth).to.not.exist; - done(); - }); - }); - - it('should fail on missing credentials', function (done) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', {}); - expect(auth).to.not.exist; - done(); - }); - - it('should fail on invalid algorithm', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var creds = Hoek.clone(credentials); - creds.algorithm = 'blah'; - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: creds }); - expect(auth).to.not.exist; - done(); - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/readme.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/readme.js deleted file mode 100755 index f39e033d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/readme.js +++ /dev/null @@ -1,98 +0,0 @@ -// Load modules - -var Lab = require('lab'); -var Hoek = require('hoek'); -var Hawk = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hawk', function () { - - describe('README', function () { - - describe('core', function () { - - var credentials = { - id: 'dh37fgj492je', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256' - }; - - var options = { - credentials: credentials, - timestamp: 1353832234, - nonce: 'j4h3g2', - ext: 'some-app-ext-data' - }; - - it('should generate a header protocol example', function (done) { - - var header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'GET', options).field; - - expect(header).to.equal('Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", ext="some-app-ext-data", mac="6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE="'); - done(); - }); - - it('should generate a normalized string protocol example', function (done) { - - var normalized = Hawk.crypto.generateNormalizedString('header', { - credentials: credentials, - ts: options.timestamp, - nonce: options.nonce, - method: 'GET', - resource: '/resource?a=1&b=2', - host: 'example.com', - port: 8000, - ext: options.ext - }); - - expect(normalized).to.equal('hawk.1.header\n1353832234\nj4h3g2\nGET\n/resource?a=1&b=2\nexample.com\n8000\n\nsome-app-ext-data\n'); - done(); - }); - - var payloadOptions = Hoek.clone(options); - payloadOptions.payload = 'Thank you for flying Hawk'; - payloadOptions.contentType = 'text/plain'; - - it('should generate a header protocol example (with payload)', function (done) { - - var header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'POST', payloadOptions).field; - - expect(header).to.equal('Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", hash="Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=", ext="some-app-ext-data", mac="aSe1DERmZuRl3pI36/9BdZmnErTw3sNzOOAUlfeKjVw="'); - done(); - }); - - it('should generate a normalized string protocol example (with payload)', function (done) { - - var normalized = Hawk.crypto.generateNormalizedString('header', { - credentials: credentials, - ts: options.timestamp, - nonce: options.nonce, - method: 'POST', - resource: '/resource?a=1&b=2', - host: 'example.com', - port: 8000, - hash: Hawk.crypto.calculatePayloadHash(payloadOptions.payload, credentials.algorithm, payloadOptions.contentType), - ext: options.ext - }); - - expect(normalized).to.equal('hawk.1.header\n1353832234\nj4h3g2\nPOST\n/resource?a=1&b=2\nexample.com\n8000\nYi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=\nsome-app-ext-data\n'); - done(); - }); - }); - }); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/server.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/server.js deleted file mode 100755 index 3e92427a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/server.js +++ /dev/null @@ -1,686 +0,0 @@ -// Load modules - -var Url = require('url'); -var Lab = require('lab'); -var Hawk = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hawk', function () { - - describe('server', function () { - - var credentialsFunc = function (id, callback) { - - var credentials = { - id: id, - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: (id === '1' ? 'sha1' : 'sha256'), - user: 'steve' - }; - - return callback(null, credentials); - }; - - describe('#authenticate', function () { - - it('should parse a valid authentication header (sha1)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="1", ts="1353788437", nonce="k3j4h2", mac="zy79QQ5/EYFmQqutVnYb73gAc/U=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - done(); - }); - }); - - it('should parse a valid authentication header (sha256)', function (done) { - - var req = { - method: 'GET', - url: '/resource/1?b=1&a=2', - host: 'example.com', - port: 8000, - authorization: 'Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", mac="m8r1rHbXN6NgO+KIIhjO7sFRyd78RNGVUwehe8Cp2dU=", ext="some-app-data"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353832234000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - done(); - }); - }); - - it('should parse a valid authentication header (host override)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - headers: { - host: 'example1.com:8080', - authorization: 'Hawk id="1", ts="1353788437", nonce="k3j4h2", mac="zy79QQ5/EYFmQqutVnYb73gAc/U=", ext="hello"' - } - }; - - Hawk.server.authenticate(req, credentialsFunc, { host: 'example.com', localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - done(); - }); - }); - - it('should parse a valid authentication header (host port override)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - headers: { - host: 'example1.com:80', - authorization: 'Hawk id="1", ts="1353788437", nonce="k3j4h2", mac="zy79QQ5/EYFmQqutVnYb73gAc/U=", ext="hello"' - } - }; - - Hawk.server.authenticate(req, credentialsFunc, { host: 'example.com', port: 8080, localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - done(); - }); - }); - - it('should parse a valid authentication header (POST with payload)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123456", ts="1357926341", nonce="1AwuJD", hash="qAiXIVv+yjDATneWxZP2YCTa9aHRgQdnH9b3Wc+o3dg=", ext="some-app-data", mac="UeYcj5UoTVaAWXNvJfLVia7kU3VabxCqrccXP8sUGC4="' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1357926341000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - done(); - }); - }); - - it('should fail on missing hash', function (done) { - - var req = { - method: 'GET', - url: '/resource/1?b=1&a=2', - host: 'example.com', - port: 8000, - authorization: 'Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", mac="m8r1rHbXN6NgO+KIIhjO7sFRyd78RNGVUwehe8Cp2dU=", ext="some-app-data"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { payload: 'body', localtimeOffsetMsec: 1353832234000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Missing required payload hash'); - done(); - }); - }); - - it('should fail on a stale timestamp', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123456", ts="1362337299", nonce="UzmxSs", ext="some-app-data", mac="wnNUxchvvryMH2RxckTdZ/gY3ijzvccx4keVvELC61w="' - }; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Stale timestamp'); - var header = err.response.headers['WWW-Authenticate']; - var ts = header.match(/^Hawk ts\=\"(\d+)\"\, tsm\=\"([^\"]+)\"\, error=\"Stale timestamp\"$/); - var now = Hawk.utils.now(); - expect(parseInt(ts[1], 10) * 1000).to.be.within(now - 1000, now + 1000); - - var res = { - headers: { - 'www-authenticate': header - } - }; - - expect(Hawk.client.authenticate(res, credentials, artifacts)).to.equal(true); - done(); - }); - }); - - it('should fail on a replay', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="bXx7a7p1h9QYQNZ8x7QhvDQym8ACgab4m3lVSFn4DBw=", ext="hello"' - }; - - var memoryCache = {}; - var options = { - localtimeOffsetMsec: 1353788437000 - Hawk.utils.now(), - nonceFunc: function (nonce, ts, callback) { - - if (memoryCache[nonce]) { - return callback(new Error()); - } - - memoryCache[nonce] = true; - return callback(); - } - }; - - Hawk.server.authenticate(req, credentialsFunc, options, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - - Hawk.server.authenticate(req, credentialsFunc, options, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid nonce'); - done(); - }); - }); - }); - - it('should fail on an invalid authentication header: wrong scheme', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Basic asdasdasdasd' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.not.exist; - done(); - }); - }); - - it('should fail on an invalid authentication header: no scheme', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: '!@#' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid header syntax'); - done(); - }); - }); - - it('should fail on an missing authorization header', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.isMissing).to.equal(true); - done(); - }); - }); - - it('should fail on an missing host header', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - headers: { - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - } - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid Host header'); - done(); - }); - }); - - it('should fail on an missing authorization attribute (id)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Missing attributes'); - done(); - }); - }); - - it('should fail on an missing authorization attribute (ts)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Missing attributes'); - done(); - }); - }); - - it('should fail on an missing authorization attribute (nonce)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Missing attributes'); - done(); - }); - }); - - it('should fail on an missing authorization attribute (mac)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Missing attributes'); - done(); - }); - }); - - it('should fail on an unknown authorization attribute', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", x="3", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Unknown attribute: x'); - done(); - }); - }); - - it('should fail on an bad authorization header format', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123\\", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Bad header format'); - done(); - }); - }); - - it('should fail on an bad authorization attribute value', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="\t", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Bad attribute value: id'); - done(); - }); - }); - - it('should fail on an empty authorization attribute value', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Bad attribute value: id'); - done(); - }); - }); - - it('should fail on duplicated authorization attribute key', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", id="456", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Duplicate attribute: id'); - done(); - }); - }); - - it('should fail on an invalid authorization header format', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid header syntax'); - done(); - }); - }); - - it('should fail on an bad host header (missing host)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - headers: { - host: ':8080', - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - } - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid Host header'); - done(); - }); - }); - - it('should fail on an bad host header (pad port)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - headers: { - host: 'example.com:something', - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - } - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid Host header'); - done(); - }); - }); - - it('should fail on credentialsFunc error', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - var credentialsFunc = function (id, callback) { - - return callback(new Error('Unknown user')); - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.message).to.equal('Unknown user'); - done(); - }); - }); - - it('should fail on missing credentials', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - var credentialsFunc = function (id, callback) { - - return callback(null, null); - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Unknown credentials'); - done(); - }); - }); - - it('should fail on invalid credentials', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - var credentialsFunc = function (id, callback) { - - var credentials = { - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - user: 'steve' - }; - - return callback(null, credentials); - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.message).to.equal('Invalid credentials'); - expect(err.response.payload.message).to.equal('An internal server error occurred'); - done(); - }); - }); - - it('should fail on unknown credentials algorithm', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - var credentialsFunc = function (id, callback) { - - var credentials = { - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'hmac-sha-0', - user: 'steve' - }; - - return callback(null, credentials); - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.message).to.equal('Unknown algorithm'); - expect(err.response.payload.message).to.equal('An internal server error occurred'); - done(); - }); - }); - - it('should fail on unknown bad mac', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcU4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - var credentialsFunc = function (id, callback) { - - var credentials = { - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'steve' - }; - - return callback(null, credentials); - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Bad mac'); - done(); - }); - }); - }); - - describe('#header', function () { - - it('should return an empty authorization header on missing options', function (done) { - - var header = Hawk.server.header(); - expect(header).to.equal(''); - done(); - }); - - it('should return an empty authorization header on missing credentials', function (done) { - - var header = Hawk.server.header(null, {}); - expect(header).to.equal(''); - done(); - }); - - it('should return an empty authorization header on invalid credentials', function (done) { - - var credentials = { - key: '2983d45yun89q' - }; - - var header = Hawk.server.header(credentials); - expect(header).to.equal(''); - done(); - }); - - it('should return an empty authorization header on invalid algorithm', function (done) { - - var artifacts = { - id: '123456' - }; - - var credentials = { - key: '2983d45yun89q', - algorithm: 'hmac-sha-0' - }; - - var header = Hawk.server.header(credentials, artifacts); - expect(header).to.equal(''); - done(); - }); - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/uri.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/uri.js deleted file mode 100755 index 44ffd7fb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/uri.js +++ /dev/null @@ -1,456 +0,0 @@ -// Load modules - -var Http = require('http'); -var Lab = require('lab'); -var Hawk = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hawk', function () { - - describe('Uri', function () { - - var credentialsFunc = function (id, callback) { - - var credentials = { - id: id, - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'steve' - }; - - return callback(null, credentials); - }; - - it('should generate a bewit then successfully authenticate it', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?a=1&b=2', - host: 'example.com', - port: 80 - }; - - credentialsFunc('123456', function (err, credentials) { - - var bewit = Hawk.uri.getBewit('http://example.com/resource/4?a=1&b=2', { credentials: credentials, ttlSec: 60 * 60 * 24 * 365 * 100, ext: 'some-app-data' }); - req.url += '&bewit=' + bewit; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(attributes.ext).to.equal('some-app-data'); - done(); - }); - }); - }); - - it('should generate a bewit then successfully authenticate it (no ext)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?a=1&b=2', - host: 'example.com', - port: 80 - }; - - credentialsFunc('123456', function (err, credentials) { - - var bewit = Hawk.uri.getBewit('http://example.com/resource/4?a=1&b=2', { credentials: credentials, ttlSec: 60 * 60 * 24 * 365 * 100 }); - req.url += '&bewit=' + bewit; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - done(); - }); - }); - }); - - it('should successfully authenticate a request (last param)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?a=1&b=2&bewit=MTIzNDU2XDQ1MTE0ODQ2MjFcMzFjMmNkbUJFd1NJRVZDOVkva1NFb2c3d3YrdEVNWjZ3RXNmOGNHU2FXQT1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(attributes.ext).to.equal('some-app-data'); - done(); - }); - }); - - it('should successfully authenticate a request (first param)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MTE0ODQ2MjFcMzFjMmNkbUJFd1NJRVZDOVkva1NFb2c3d3YrdEVNWjZ3RXNmOGNHU2FXQT1cc29tZS1hcHAtZGF0YQ&a=1&b=2', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(attributes.ext).to.equal('some-app-data'); - done(); - }); - }); - - it('should successfully authenticate a request (only param)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MTE0ODQ2NDFcZm1CdkNWT3MvcElOTUUxSTIwbWhrejQ3UnBwTmo4Y1VrSHpQd3Q5OXJ1cz1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(attributes.ext).to.equal('some-app-data'); - done(); - }); - }); - - it('should fail on multiple authentication', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MTE0ODQ2NDFcZm1CdkNWT3MvcElOTUUxSTIwbWhrejQ3UnBwTmo4Y1VrSHpQd3Q5OXJ1cz1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080, - authorization: 'Basic asdasdasdasd' - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Multiple authentications'); - done(); - }); - }); - - it('should fail on method other than GET', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - var exp = Math.floor(Hawk.utils.now() / 1000) + 60; - var ext = 'some-app-data'; - var mac = Hawk.crypto.calculateMac('bewit', credentials, { - timestamp: exp, - nonce: '', - method: req.method, - resource: req.url, - host: req.host, - port: req.port, - ext: ext - }); - - var bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + ext; - - req.url += '&bewit=' + Hawk.utils.base64urlEncode(bewit); - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid method'); - done(); - }); - }); - }); - - it('should fail on invalid host header', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ', - headers: { - host: 'example.com:something' - } - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid Host header'); - done(); - }); - }); - - it('should fail on empty bewit', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Empty bewit'); - expect(err.isMissing).to.not.exist; - done(); - }); - }); - - it('should fail on invalid bewit', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=*', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid bewit encoding'); - expect(err.isMissing).to.not.exist; - done(); - }); - }); - - it('should fail on missing bewit', function (done) { - - var req = { - method: 'GET', - url: '/resource/4', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.not.exist; - expect(err.isMissing).to.equal(true); - done(); - }); - }); - - it('should fail on invalid bewit structure', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=abc', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid bewit structure'); - done(); - }); - }); - - it('should fail on empty bewit attribute', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=YVxcY1xk', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Missing bewit attributes'); - done(); - }); - }); - - it('should fail on expired access', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?a=1&b=2&bewit=MTIzNDU2XDEzNTY0MTg1ODNcWk1wZlMwWU5KNHV0WHpOMmRucTRydEk3NXNXTjFjeWVITTcrL0tNZFdVQT1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Access expired'); - done(); - }); - }); - - it('should fail on credentials function error', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, function (id, callback) { callback(Hawk.error.badRequest('Boom')); }, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Boom'); - done(); - }); - }); - - it('should fail on null credentials function response', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, function (id, callback) { callback(null, null); }, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Unknown credentials'); - done(); - }); - }); - - it('should fail on invalid credentials function response', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, function (id, callback) { callback(null, {}); }, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.message).to.equal('Invalid credentials'); - done(); - }); - }); - - it('should fail on invalid credentials function response (unknown algorithm)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, function (id, callback) { callback(null, { key: 'xxx', algorithm: 'xxx' }); }, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.message).to.equal('Unknown algorithm'); - done(); - }); - }); - - it('should fail on expired access', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, function (id, callback) { callback(null, { key: 'xxx', algorithm: 'sha256' }); }, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Bad mac'); - done(); - }); - }); - }); - - describe('#getBewit', function () { - - it('should return a valid bewit value', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'sha256' - }; - - var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' }); - expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdca3NjeHdOUjJ0SnBQMVQxekRMTlBiQjVVaUtJVTl0T1NKWFRVZEc3WDloOD1ceGFuZHlhbmR6'); - done(); - }); - - it('should return an empty bewit on invalid credentials', function (done) { - - var credentials = { - key: '2983d45yun89q', - algorithm: 'sha256' - }; - - var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 3000, ext: 'xandyandz' }); - expect(bewit).to.equal(''); - done(); - }); - - it('should return an empty bewit on invalid algorithm', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'hmac-sha-0' - }; - - var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, ext: 'xandyandz' }); - expect(bewit).to.equal(''); - done(); - }); - - it('should return an empty bewit on missing options', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'hmac-sha-0' - }; - - var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow'); - expect(bewit).to.equal(''); - done(); - }); - }); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/utils.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/utils.js deleted file mode 100755 index 0f5fef77..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/utils.js +++ /dev/null @@ -1,120 +0,0 @@ -// Load modules - -var Lab = require('lab'); -var Hawk = require('../lib'); -var Package = require('../package.json'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hawk', function () { - - describe('Utils', function () { - - describe('#parseHost', function () { - - it('returns port 80 for non tls node request', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com', - 'content-type': 'text/plain;x=y' - } - }; - - expect(Hawk.utils.parseHost(req, 'Host').port).to.equal(80); - done(); - }); - - it('returns port 443 for non tls node request', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com', - 'content-type': 'text/plain;x=y' - }, - connection: { - encrypted: true - } - }; - - expect(Hawk.utils.parseHost(req, 'Host').port).to.equal(443); - done(); - }); - - it('returns port 443 for non tls node request (IPv6)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: '[123:123:123]', - 'content-type': 'text/plain;x=y' - }, - connection: { - encrypted: true - } - }; - - expect(Hawk.utils.parseHost(req, 'Host').port).to.equal(443); - done(); - }); - - it('parses IPv6 headers', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: '[123:123:123]:8000', - 'content-type': 'text/plain;x=y' - }, - connection: { - encrypted: true - } - }; - - var host = Hawk.utils.parseHost(req, 'Host'); - expect(host.port).to.equal('8000'); - expect(host.name).to.equal('[123:123:123]'); - done(); - }); - }); - - describe('#version', function () { - - it('returns the correct package version number', function (done) { - - expect(Hawk.utils.version()).to.equal(Package.version); - done(); - }); - }); - - describe('#unauthorized', function () { - - it('returns a hawk 401', function (done) { - - expect(Hawk.utils.unauthorized('kaboom').response.headers['WWW-Authenticate']).to.equal('Hawk error="kaboom"'); - done(); - }); - }); - }); -}); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/.dir-locals.el b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/.dir-locals.el deleted file mode 100644 index 3bc9235f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/.dir-locals.el +++ /dev/null @@ -1,6 +0,0 @@ -((nil . ((indent-tabs-mode . nil) - (tab-width . 8) - (fill-column . 80))) - (js-mode . ((js-indent-level . 2) - (indent-tabs-mode . nil) - ))) \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/.npmignore deleted file mode 100644 index c143fb3a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/.npmignore +++ /dev/null @@ -1,7 +0,0 @@ -.gitmodules -deps -docs -Makefile -node_modules -test -tools \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/LICENSE deleted file mode 100644 index f6d947d2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. All rights reserved. -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/README.md deleted file mode 100644 index 0c707149..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# node-http-signature - -node-http-signature is a node.js library that has client and server components -for Joyent's [HTTP Signature Scheme](http_signing.md). - -## Usage - -Note the example below signs a request with the same key/cert used to start an -HTTP server. This is almost certainly not what you actaully want, but is just -used to illustrate the API calls; you will need to provide your own key -management in addition to this library. - -### Client - - var fs = require('fs'); - var https = require('https'); - var httpSignature = require('http-signature'); - - var key = fs.readFileSync('./key.pem', 'ascii'); - - var options = { - host: 'localhost', - port: 8443, - path: '/', - method: 'GET', - headers: {} - }; - - // Adds a 'Date' header in, signs it, and adds the - // 'Authorization' header in. - var req = https.request(options, function(res) { - console.log(res.statusCode); - }); - - - httpSignature.sign(req, { - key: key, - keyId: './cert.pem' - }); - - req.end(); - -### Server - - var fs = require('fs'); - var https = require('https'); - var httpSignature = require('http-signature'); - - var options = { - key: fs.readFileSync('./key.pem'), - cert: fs.readFileSync('./cert.pem') - }; - - https.createServer(options, function (req, res) { - var rc = 200; - var parsed = httpSignature.parseRequest(req); - var pub = fs.readFileSync(parsed.keyId, 'ascii'); - if (!httpSignature.verifySignature(parsed, pub)) - rc = 401; - - res.writeHead(rc); - res.end(); - }).listen(8443); - -## Installation - - npm install http-signature - -## License - -MIT. - -## Bugs - -See <https://github.com/joyent/node-http-signature/issues>. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/http_signing.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/http_signing.md deleted file mode 100644 index ba7321da..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/http_signing.md +++ /dev/null @@ -1,296 +0,0 @@ -# Abstract - -This document describes a way to add origin authentication, message integrity, -and replay resistance to HTTP REST requests. It is intended to be used over -the HTTPS protocol. - -# Copyright Notice - -Copyright (c) 2011 Joyent, Inc. and the persons identified as document authors. -All rights reserved. - -Code Components extracted from this document must include MIT License text. - -# Introduction - -This protocol is intended to provide a standard way for clients to sign HTTP -requests. RFC2617 (HTTP Authentication) defines Basic and Digest authentication -mechanisms, and RFC5246 (TLS 1.2) defines client-auth, both of which are widely -employed on the Internet today. However, it is common place that the burdens of -PKI prevent web service operators from deploying that methodoloy, and so many -fall back to Basic authentication, which has poor security characteristics. - -Additionally, OAuth provides a fully-specified alternative for authorization -of web service requests, but is not (always) ideal for machine to machine -communication, as the key acquisition steps (generally) imply a fixed -infrastructure that may not make sense to a service provider (e.g., symmetric -keys). - -Several web service providers have invented their own schemes for signing -HTTP requests, but to date, none have been placed in the public domain as a -standard. This document serves that purpose. There are no techniques in this -proposal that are novel beyond previous art, however, this aims to be a simple -mechanism for signing these requests. - -# Signature Authentication Scheme - -The "signature" authentication scheme is based on the model that the client must -authenticate itself with a digital signature produced by either a private -asymmetric key (e.g., RSA) or a shared symmetric key (e.g., HMAC). The scheme -is parameterized enough such that it is not bound to any particular key type or -signing algorithm. However, it does explicitly assume that clients can send an -HTTP `Date` header. - -## Authorization Header - -The client is expected to send an Authorization header (as defined in RFC 2617) -with the following parameterization: - - credentials := "Signature" params - params := 1#(keyId | algorithm | [headers] | [ext] | signature) - digitalSignature := plain-string - - keyId := "keyId" "=" <"> plain-string <"> - algorithm := "algorithm" "=" <"> plain-string <"> - headers := "headers" "=" <"> 1#headers-value <"> - ext := "ext" "=" <"> plain-string <"> - signature := "signature" "=" <"> plain-string <"> - - headers-value := plain-string - plain-string = 1*( %x20-21 / %x23-5B / %x5D-7E ) - -### Signature Parameters - -#### keyId - -REQUIRED. The `keyId` field is an opaque string that the server can use to look -up the component they need to validate the signature. It could be an SSH key -fingerprint, an LDAP DN, etc. Management of keys and assignment of `keyId` is -out of scope for this document. - -#### algorithm - -REQUIRED. The `algorithm` parameter is used if the client and server agree on a -non-standard digital signature algorithm. The full list of supported signature -mechanisms is listed below. - -#### headers - -OPTIONAL. The `headers` parameter is used to specify the list of HTTP headers -used to sign the request. If specified, it should be a quoted list of HTTP -header names, separated by a single space character. By default, only one -HTTP header is signed, which is the `Date` header. Note that the list MUST be -specified in the order the values are concatenated together during signing. To -include the HTTP request line in the signature calculation, use the special -`request-line` value. While this is overloading the definition of `headers` in -HTTP linguism, the request-line is defined in RFC 2616, and as the outlier from -headers in useful signature calculation, it is deemed simpler to simply use -`request-line` than to add a separate parameter for it. - -#### extensions - -OPTIONAL. The `extensions` parameter is used to include additional information -which is covered by the request. The content and format of the string is out of -scope for this document, and expected to be specified by implementors. - -#### signature - -REQUIRED. The `signature` parameter is a `Base64` encoded digital signature -generated by the client. The client uses the `algorithm` and `headers` request -parameters to form a canonicalized `signing string`. This `signing string` is -then signed with the key associated with `keyId` and the algorithm -corresponding to `algorithm`. The `signature` parameter is then set to the -`Base64` encoding of the signature. - -### Signing String Composition - -In order to generate the string that is signed with a key, the client MUST take -the values of each HTTP header specified by `headers` in the order they appear. - -1. If the header name is not `request-line` then append the lowercased header - name followed with an ASCII colon `:` and an ASCII space ` `. -2. If the header name is `request-line` then appened the HTTP request line, - otherwise append the header value. -3. If value is not the last value then append an ASCII newline `\n`. The string - MUST NOT include a trailing ASCII newline. - -# Example Requests - -All requests refer to the following request (body ommitted): - - POST /foo HTTP/1.1 - Host: example.org - Date: Tue, 07 Jun 2011 20:51:35 GMT - Content-Type: application/json - Content-MD5: h0auK8hnYJKmHTLhKtMTkQ== - Content-Length: 123 - -The "rsa-key-1" keyId refers to a private key known to the client and a public -key known to the server. The "hmac-key-1" keyId refers to key known to the -client and server. - -## Default parameterization - -The authorization header and signature would be generated as: - - Authorization: Signature keyId="rsa-key-1",algorithm="rsa-sha256",signature="Base64(RSA-SHA256(signing string))" - -The client would compose the signing string as: - - date: Tue, 07 Jun 2011 20:51:35 GMT - -## Header List - -The authorization header and signature would be generated as: - - Authorization: Signature keyId="rsa-key-1",algorithm="rsa-sha256",headers="request-line date content-type content-md5",signature="Base64(RSA-SHA256(signing string))" - -The client would compose the signing string as (`+ "\n"` inserted for -readability): - - POST /foo HTTP/1.1 + "\n" - date: Tue, 07 Jun 2011 20:51:35 GMT + "\n" - content-type: application/json + "\n" - content-md5: h0auK8hnYJKmHTLhKtMTkQ== - -## Algorithm - -The authorization header and signature would be generated as: - - Authorization: Signature keyId="hmac-key-1",algorithm="hmac-sha1",signature="Base64(HMAC-SHA1(signing string))" - -The client would compose the signing string as: - - date: Tue, 07 Jun 2011 20:51:35 GMT - -# Signing Algorithms - -Currently supported algorithm names are: - -* rsa-sha1 -* rsa-sha256 -* rsa-sha512 -* dsa-sha1 -* hmac-sha1 -* hmac-sha256 -* hmac-sha512 - -# Security Considerations - -## Default Parameters - -Note the default parameterization of the `Signature` scheme is only safe if all -requests are carried over a secure transport (i.e., TLS). Sending the default -scheme over a non-secure transport will leave the request vulnerable to -spoofing, tampering, replay/repudiaton, and integrity violations (if using the -STRIDE threat-modeling methodology). - -## Insecure Transports - -If sending the request over plain HTTP, service providers SHOULD require clients -to sign ALL HTTP headers, and the `request-line`. Additionally, service -providers SHOULD require `Content-MD5` calculations to be performed to ensure -against any tampering from clients. - -## Nonces - -Nonces are out of scope for this document simply because many service providers -fail to implement them correctly, or do not adopt security specfiications -because of the infrastructure complexity. Given the `header` parameterization, -a service provider is fully enabled to add nonce semantics into this scheme by -using something like an `x-request-nonce` header, and ensuring it is signed -with the `Date` header. - -## Clock Skew - -As the default scheme is to sign the `Date` header, service providers SHOULD -protect against logged replay attacks by enforcing a clock skew. The server -SHOULD be synchronized with NTP, and the recommendation in this specification -is to allow 300s of clock skew (in either direction). - -## Required Headers to Sign - -It is out of scope for this document to dictate what headers a service provider -will want to enforce, but service providers SHOULD at minimum include the -`Date` header. - -# References - -## Normative References - -* [RFC2616] Hypertext Transfer Protocol -- HTTP/1.1 -* [RFC2617] HTTP Authentication: Basic and Digest Access Authentication -* [RFC5246] The Transport Layer Security (TLS) Protocol Version 1.2 - -## Informative References - - Name: Mark Cavage (editor) - Company: Joyent, Inc. - Email: mark.cavage@joyent.com - URI: http://www.joyent.com - -# Appendix A - Test Values - -The following test data uses the RSA (2048b) keys, which we will refer -to as `keyId=Test` in the following samples: - - -----BEGIN PUBLIC KEY----- - MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCFENGw33yGihy92pDjZQhl0C3 - 6rPJj+CvfSC8+q28hxA161QFNUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6 - Z4UMR7EOcpfdUE9Hf3m/hs+FUR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJw - oYi+1hqp1fIekaxsyQIDAQAB - -----END PUBLIC KEY----- - - -----BEGIN RSA PRIVATE KEY----- - MIICXgIBAAKBgQDCFENGw33yGihy92pDjZQhl0C36rPJj+CvfSC8+q28hxA161QF - NUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6Z4UMR7EOcpfdUE9Hf3m/hs+F - UR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJwoYi+1hqp1fIekaxsyQIDAQAB - AoGBAJR8ZkCUvx5kzv+utdl7T5MnordT1TvoXXJGXK7ZZ+UuvMNUCdN2QPc4sBiA - QWvLw1cSKt5DsKZ8UETpYPy8pPYnnDEz2dDYiaew9+xEpubyeW2oH4Zx71wqBtOK - kqwrXa/pzdpiucRRjk6vE6YY7EBBs/g7uanVpGibOVAEsqH1AkEA7DkjVH28WDUg - f1nqvfn2Kj6CT7nIcE3jGJsZZ7zlZmBmHFDONMLUrXR/Zm3pR5m0tCmBqa5RK95u - 412jt1dPIwJBANJT3v8pnkth48bQo/fKel6uEYyboRtA5/uHuHkZ6FQF7OUkGogc - mSJluOdc5t6hI1VsLn0QZEjQZMEOWr+wKSMCQQCC4kXJEsHAve77oP6HtG/IiEn7 - kpyUXRNvFsDE0czpJJBvL/aRFUJxuRK91jhjC68sA7NsKMGg5OXb5I5Jj36xAkEA - gIT7aFOYBFwGgQAQkWNKLvySgKbAZRTeLBacpHMuQdl1DfdntvAyqpAZ0lY0RKmW - G6aFKaqQfOXKCyWoUiVknQJAXrlgySFci/2ueKlIE1QqIiLSZ8V8OlpFLRnb1pzI - 7U1yQXnTAEFYM560yJlzUpOb1V4cScGd365tiSMvxLOvTA== - -----END RSA PRIVATE KEY----- - -And all examples use this request: - - POST /foo?param=value&pet=dog HTTP/1.1 - Host: example.com - Date: Thu, 05 Jan 2012 21:31:40 GMT - Content-Type: application/json - Content-MD5: Sd/dVLAcvNLSq16eXua5uQ== - Content-Length: 18 - - {"hello": "world"} - -### Default - -The string to sign would be: - - date: Thu, 05 Jan 2012 21:31:40 GMT - -The Authorization header would be: - - Authorization: Signature keyId="Test",algorithm="rsa-sha256",signature="JldXnt8W9t643M2Sce10gqCh/+E7QIYLiI+bSjnFBGCti7s+mPPvOjVb72sbd1FjeOUwPTDpKbrQQORrm+xBYfAwCxF3LBSSzORvyJ5nRFCFxfJ3nlQD6Kdxhw8wrVZX5nSem4A/W3C8qH5uhFTRwF4ruRjh+ENHWuovPgO/HGQ=" - -### All Headers - -Parameterized to include all headers, the string to sign would be (`+ "\n"` -inserted for readability): - - POST /foo?param=value&pet=dog HTTP/1.1 + "\n" - host: example.com + "\n" - date: Thu, 05 Jan 2012 21:31:40 GMT + "\n" - content-type: application/json + "\n" - content-md5: Sd/dVLAcvNLSq16eXua5uQ== + "\n" - content-length: 18 - -The Authorization header would be: - - Authorization: Signature keyId="Test",algorithm="rsa-sha256",headers="request-line host date content-type content-md5 content-length",signature="Gm7W/r+e90REDpWytALMrft4MqZxCmslOTOvwJX17ViEBA5E65QqvWI0vIH3l/vSsGiaMVmuUgzYsJLYMLcm5dGrv1+a+0fCoUdVKPZWHyImQEqpLkopVwqEH67LVECFBqFTAKlQgBn676zrfXQbb+b/VebAsNUtvQMe6cTjnDY=" - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/index.js deleted file mode 100644 index 3ac70b77..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/index.js +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2011 Joyent, Inc. All rights reserved. - -var parser = require('./parser'); -var signer = require('./signer'); -var verify = require('./verify'); -var util = require('./util'); - - - -///--- API - -module.exports = { - - parse: parser.parseRequest, - parseRequest: parser.parseRequest, - - sign: signer.signRequest, - signRequest: signer.signRequest, - - sshKeyToPEM: util.sshKeyToPEM, - sshKeyFingerprint: util.fingerprint, - - verify: verify.verifySignature, - verifySignature: verify.verifySignature -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/parser.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/parser.js deleted file mode 100644 index fd9ac102..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/parser.js +++ /dev/null @@ -1,304 +0,0 @@ -// Copyright 2012 Joyent, Inc. All rights reserved. - -var assert = require('assert-plus'); -var util = require('util'); - - - -///--- Globals - -var Algorithms = { - 'rsa-sha1': true, - 'rsa-sha256': true, - 'rsa-sha512': true, - 'dsa-sha1': true, - 'hmac-sha1': true, - 'hmac-sha256': true, - 'hmac-sha512': true -}; - -var State = { - New: 0, - Params: 1 -}; - -var ParamsState = { - Name: 0, - Quote: 1, - Value: 2, - Comma: 3 -}; - - - -///--- Specific Errors - -function HttpSignatureError(message, caller) { - if (Error.captureStackTrace) - Error.captureStackTrace(this, caller || HttpSignatureError); - - this.message = message; - this.name = caller.name; -} -util.inherits(HttpSignatureError, Error); - -function ExpiredRequestError(message) { - HttpSignatureError.call(this, message, ExpiredRequestError); -} -util.inherits(ExpiredRequestError, HttpSignatureError); - - -function InvalidHeaderError(message) { - HttpSignatureError.call(this, message, InvalidHeaderError); -} -util.inherits(InvalidHeaderError, HttpSignatureError); - - -function InvalidParamsError(message) { - HttpSignatureError.call(this, message, InvalidParamsError); -} -util.inherits(InvalidParamsError, HttpSignatureError); - - -function MissingHeaderError(message) { - HttpSignatureError.call(this, message, MissingHeaderError); -} -util.inherits(MissingHeaderError, HttpSignatureError); - - - -///--- Exported API - -module.exports = { - - /** - * Parses the 'Authorization' header out of an http.ServerRequest object. - * - * Note that this API will fully validate the Authorization header, and throw - * on any error. It will not however check the signature, or the keyId format - * as those are specific to your environment. You can use the options object - * to pass in extra constraints. - * - * As a response object you can expect this: - * - * { - * "scheme": "Signature", - * "params": { - * "keyId": "foo", - * "algorithm": "rsa-sha256", - * "headers": [ - * "date" or "x-date", - * "content-md5" - * ], - * "signature": "base64" - * }, - * "signingString": "ready to be passed to crypto.verify()" - * } - * - * @param {Object} request an http.ServerRequest. - * @param {Object} options an optional options object with: - * - clockSkew: allowed clock skew in seconds (default 300). - * - headers: required header names (def: date or x-date) - * - algorithms: algorithms to support (default: all). - * @return {Object} parsed out object (see above). - * @throws {TypeError} on invalid input. - * @throws {InvalidHeaderError} on an invalid Authorization header error. - * @throws {InvalidParamsError} if the params in the scheme are invalid. - * @throws {MissingHeaderError} if the params indicate a header not present, - * either in the request headers from the params, - * or not in the params from a required header - * in options. - * @throws {ExpiredRequestError} if the value of date or x-date exceeds skew. - */ - parseRequest: function parseRequest(request, options) { - assert.object(request, 'request'); - assert.object(request.headers, 'request.headers'); - if (options === undefined) { - options = {}; - } - if (options.headers === undefined) { - options.headers = [request.headers['x-date'] ? 'x-date' : 'date']; - } - assert.object(options, 'options'); - assert.arrayOfString(options.headers, 'options.headers'); - assert.optionalNumber(options.clockSkew, 'options.clockSkew'); - - if (!request.headers.authorization) - throw new MissingHeaderError('no authorization header present in ' + - 'the request'); - - options.clockSkew = options.clockSkew || 300; - - - var i = 0; - var state = State.New; - var substate = ParamsState.Name; - var tmpName = ''; - var tmpValue = ''; - - var parsed = { - scheme: '', - params: {}, - signingString: '', - - get algorithm() { - return this.params.algorithm.toUpperCase(); - }, - - get keyId() { - return this.params.keyId; - } - - }; - - var authz = request.headers.authorization; - for (i = 0; i < authz.length; i++) { - var c = authz.charAt(i); - - switch (Number(state)) { - - case State.New: - if (c !== ' ') parsed.scheme += c; - else state = State.Params; - break; - - case State.Params: - switch (Number(substate)) { - - case ParamsState.Name: - var code = c.charCodeAt(0); - // restricted name of A-Z / a-z - if ((code >= 0x41 && code <= 0x5a) || // A-Z - (code >= 0x61 && code <= 0x7a)) { // a-z - tmpName += c; - } else if (c === '=') { - if (tmpName.length === 0) - throw new InvalidHeaderError('bad param format'); - substate = ParamsState.Quote; - } else { - throw new InvalidHeaderError('bad param format'); - } - break; - - case ParamsState.Quote: - if (c === '"') { - tmpValue = ''; - substate = ParamsState.Value; - } else { - throw new InvalidHeaderError('bad param format'); - } - break; - - case ParamsState.Value: - if (c === '"') { - parsed.params[tmpName] = tmpValue; - substate = ParamsState.Comma; - } else { - tmpValue += c; - } - break; - - case ParamsState.Comma: - if (c === ',') { - tmpName = ''; - substate = ParamsState.Name; - } else { - throw new InvalidHeaderError('bad param format'); - } - break; - - default: - throw new Error('Invalid substate'); - } - break; - - default: - throw new Error('Invalid substate'); - } - - } - - if (!parsed.params.headers || parsed.params.headers === '') { - if (request.headers['x-date']) { - parsed.params.headers = ['x-date']; - } else { - parsed.params.headers = ['date']; - } - } else { - parsed.params.headers = parsed.params.headers.split(' '); - } - - // Minimally validate the parsed object - if (!parsed.scheme || parsed.scheme !== 'Signature') - throw new InvalidHeaderError('scheme was not "Signature"'); - - if (!parsed.params.keyId) - throw new InvalidHeaderError('keyId was not specified'); - - if (!parsed.params.algorithm) - throw new InvalidHeaderError('algorithm was not specified'); - - if (!parsed.params.signature) - throw new InvalidHeaderError('signature was not specified'); - - // Check the algorithm against the official list - parsed.params.algorithm = parsed.params.algorithm.toLowerCase(); - if (!Algorithms[parsed.params.algorithm]) - throw new InvalidParamsError(parsed.params.algorithm + - ' is not supported'); - - // Build the signingString - for (i = 0; i < parsed.params.headers.length; i++) { - var h = parsed.params.headers[i].toLowerCase(); - parsed.params.headers[i] = h; - - if (h !== 'request-line') { - var value = request.headers[h]; - if (!value) - throw new MissingHeaderError(h + ' was not in the request'); - parsed.signingString += h + ': ' + value; - } else { - parsed.signingString += - request.method + ' ' + request.url + ' HTTP/' + request.httpVersion; - } - - if ((i + 1) < parsed.params.headers.length) - parsed.signingString += '\n'; - } - - // Check against the constraints - var date; - if (request.headers.date || request.headers['x-date']) { - if (request.headers['x-date']) { - date = new Date(request.headers['x-date']); - } else { - date = new Date(request.headers.date); - } - var now = new Date(); - var skew = Math.abs(now.getTime() - date.getTime()); - - if (skew > options.clockSkew * 1000) { - throw new ExpiredRequestError('clock skew of ' + - (skew / 1000) + - 's was greater than ' + - options.clockSkew + 's'); - } - } - - options.headers.forEach(function (hdr) { - // Remember that we already checked any headers in the params - // were in the request, so if this passes we're good. - if (parsed.params.headers.indexOf(hdr) < 0) - throw new MissingHeaderError(hdr + ' was not a signed header'); - }); - - if (options.algorithms) { - if (options.algorithms.indexOf(parsed.params.algorithm) === -1) - throw new InvalidParamsError(parsed.params.algorithm + - ' is not a supported algorithm'); - } - - return parsed; - } - -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/signer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/signer.js deleted file mode 100644 index 8095f0d1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/signer.js +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright 2012 Joyent, Inc. All rights reserved. - -var assert = require('assert-plus'); -var crypto = require('crypto'); -var http = require('http'); - -var sprintf = require('util').format; - - - -///--- Globals - -var Algorithms = { - 'rsa-sha1': true, - 'rsa-sha256': true, - 'rsa-sha512': true, - 'dsa-sha1': true, - 'hmac-sha1': true, - 'hmac-sha256': true, - 'hmac-sha512': true -}; - -var Authorization = - 'Signature keyId="%s",algorithm="%s",headers="%s",signature="%s"'; - - - -///--- Specific Errors - -function MissingHeaderError(message) { - this.name = 'MissingHeaderError'; - this.message = message; - this.stack = (new Error()).stack; -} -MissingHeaderError.prototype = new Error(); - - -function InvalidAlgorithmError(message) { - this.name = 'InvalidAlgorithmError'; - this.message = message; - this.stack = (new Error()).stack; -} -InvalidAlgorithmError.prototype = new Error(); - - - -///--- Internal Functions - -function _pad(val) { - if (parseInt(val, 10) < 10) { - val = '0' + val; - } - return val; -} - - -function _rfc1123() { - var date = new Date(); - - var months = ['Jan', - 'Feb', - 'Mar', - 'Apr', - 'May', - 'Jun', - 'Jul', - 'Aug', - 'Sep', - 'Oct', - 'Nov', - 'Dec']; - var days = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; - return days[date.getUTCDay()] + ', ' + - _pad(date.getUTCDate()) + ' ' + - months[date.getUTCMonth()] + ' ' + - date.getUTCFullYear() + ' ' + - _pad(date.getUTCHours()) + ':' + - _pad(date.getUTCMinutes()) + ':' + - _pad(date.getUTCSeconds()) + - ' GMT'; -} - - - -///--- Exported API - -module.exports = { - - /** - * Adds an 'Authorization' header to an http.ClientRequest object. - * - * Note that this API will add a Date header if it's not already set. Any - * other headers in the options.headers array MUST be present, or this - * will throw. - * - * You shouldn't need to check the return type; it's just there if you want - * to be pedantic. - * - * @param {Object} request an instance of http.ClientRequest. - * @param {Object} options signing parameters object: - * - {String} keyId required. - * - {String} key required (either a PEM or HMAC key). - * - {Array} headers optional; defaults to ['date']. - * - {String} algorithm optional; defaults to 'rsa-sha256'. - * - {String} httpVersion optional; defaults to '1.1'. - * @return {Boolean} true if Authorization (and optionally Date) were added. - * @throws {TypeError} on bad parameter types (input). - * @throws {InvalidAlgorithmError} if algorithm was bad. - * @throws {MissingHeaderError} if a header to be signed was specified but - * was not present. - */ - signRequest: function signRequest(request, options) { - assert.object(request, 'request'); - assert.object(options, 'options'); - assert.optionalString(options.algorithm, 'options.algorithm'); - assert.string(options.keyId, 'options.keyId'); - assert.optionalArrayOfString(options.headers, 'options.headers'); - assert.optionalString(options.httpVersion, 'options.httpVersion'); - - if (!request.getHeader('Date')) - request.setHeader('Date', _rfc1123()); - if (!options.headers) - options.headers = ['date']; - if (!options.algorithm) - options.algorithm = 'rsa-sha256'; - if (!options.httpVersion) - options.httpVersion = '1.1'; - - options.algorithm = options.algorithm.toLowerCase(); - - if (!Algorithms[options.algorithm]) - throw new InvalidAlgorithmError(options.algorithm + ' is not supported'); - - var i; - var stringToSign = ''; - for (i = 0; i < options.headers.length; i++) { - if (typeof (options.headers[i]) !== 'string') - throw new TypeError('options.headers must be an array of Strings'); - - var h = options.headers[i].toLowerCase(); - - if (h !== 'request-line') { - var value = request.getHeader(h); - if (!value) { - throw new MissingHeaderError(h + ' was not in the request'); - } - stringToSign += h + ': ' + value; - } else { - value = - stringToSign += - request.method + ' ' + request.path + ' HTTP/' + options.httpVersion; - } - - if ((i + 1) < options.headers.length) - stringToSign += '\n'; - } - - var alg = options.algorithm.match(/(hmac|rsa)-(\w+)/); - var signature; - if (alg[1] === 'hmac') { - var hmac = crypto.createHmac(alg[2].toUpperCase(), options.key); - hmac.update(stringToSign); - signature = hmac.digest('base64'); - } else { - var signer = crypto.createSign(options.algorithm.toUpperCase()); - signer.update(stringToSign); - signature = signer.sign(options.key, 'base64'); - } - - request.setHeader('Authorization', sprintf(Authorization, - options.keyId, - options.algorithm, - options.headers.join(' '), - signature)); - - return true; - } - -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/util.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/util.js deleted file mode 100644 index 30bbf045..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/util.js +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright 2012 Joyent, Inc. All rights reserved. - -var assert = require('assert-plus'); -var crypto = require('crypto'); - -var asn1 = require('asn1'); -var ctype = require('ctype'); - - - -///--- Helpers - -function readNext(buffer, offset) { - var len = ctype.ruint32(buffer, 'big', offset); - offset += 4; - - var newOffset = offset + len; - - return { - data: buffer.slice(offset, newOffset), - offset: newOffset - }; -} - - -function writeInt(writer, buffer) { - writer.writeByte(0x02); // ASN1.Integer - writer.writeLength(buffer.length); - - for (var i = 0; i < buffer.length; i++) - writer.writeByte(buffer[i]); - - return writer; -} - - -function rsaToPEM(key) { - var buffer; - var der; - var exponent; - var i; - var modulus; - var newKey = ''; - var offset = 0; - var type; - var tmp; - - try { - buffer = new Buffer(key.split(' ')[1], 'base64'); - - tmp = readNext(buffer, offset); - type = tmp.data.toString(); - offset = tmp.offset; - - if (type !== 'ssh-rsa') - throw new Error('Invalid ssh key type: ' + type); - - tmp = readNext(buffer, offset); - exponent = tmp.data; - offset = tmp.offset; - - tmp = readNext(buffer, offset); - modulus = tmp.data; - } catch (e) { - throw new Error('Invalid ssh key: ' + key); - } - - // DER is a subset of BER - der = new asn1.BerWriter(); - - der.startSequence(); - - der.startSequence(); - der.writeOID('1.2.840.113549.1.1.1'); - der.writeNull(); - der.endSequence(); - - der.startSequence(0x03); // bit string - der.writeByte(0x00); - - // Actual key - der.startSequence(); - writeInt(der, modulus); - writeInt(der, exponent); - der.endSequence(); - - // bit string - der.endSequence(); - - der.endSequence(); - - tmp = der.buffer.toString('base64'); - for (i = 0; i < tmp.length; i++) { - if ((i % 64) === 0) - newKey += '\n'; - newKey += tmp.charAt(i); - } - - if (!/\\n$/.test(newKey)) - newKey += '\n'; - - return '-----BEGIN PUBLIC KEY-----' + newKey + '-----END PUBLIC KEY-----\n'; -} - - -function dsaToPEM(key) { - var buffer; - var offset = 0; - var tmp; - var der; - var newKey = ''; - - var type; - var p; - var q; - var g; - var y; - - try { - buffer = new Buffer(key.split(' ')[1], 'base64'); - - tmp = readNext(buffer, offset); - type = tmp.data.toString(); - offset = tmp.offset; - - /* JSSTYLED */ - if (!/^ssh-ds[as].*/.test(type)) - throw new Error('Invalid ssh key type: ' + type); - - tmp = readNext(buffer, offset); - p = tmp.data; - offset = tmp.offset; - - tmp = readNext(buffer, offset); - q = tmp.data; - offset = tmp.offset; - - tmp = readNext(buffer, offset); - g = tmp.data; - offset = tmp.offset; - - tmp = readNext(buffer, offset); - y = tmp.data; - } catch (e) { - console.log(e.stack); - throw new Error('Invalid ssh key: ' + key); - } - - // DER is a subset of BER - der = new asn1.BerWriter(); - - der.startSequence(); - - der.startSequence(); - der.writeOID('1.2.840.10040.4.1'); - - der.startSequence(); - writeInt(der, p); - writeInt(der, q); - writeInt(der, g); - der.endSequence(); - - der.endSequence(); - - der.startSequence(0x03); // bit string - der.writeByte(0x00); - writeInt(der, y); - der.endSequence(); - - der.endSequence(); - - tmp = der.buffer.toString('base64'); - for (var i = 0; i < tmp.length; i++) { - if ((i % 64) === 0) - newKey += '\n'; - newKey += tmp.charAt(i); - } - - if (!/\\n$/.test(newKey)) - newKey += '\n'; - - return '-----BEGIN PUBLIC KEY-----' + newKey + '-----END PUBLIC KEY-----\n'; -} - - -///--- API - -module.exports = { - - /** - * Converts an OpenSSH public key (rsa only) to a PKCS#8 PEM file. - * - * The intent of this module is to interoperate with OpenSSL only, - * specifically the node crypto module's `verify` method. - * - * @param {String} key an OpenSSH public key. - * @return {String} PEM encoded form of the RSA public key. - * @throws {TypeError} on bad input. - * @throws {Error} on invalid ssh key formatted data. - */ - sshKeyToPEM: function sshKeyToPEM(key) { - assert.string(key, 'ssh_key'); - - /* JSSTYLED */ - if (/^ssh-rsa.*/.test(key)) - return rsaToPEM(key); - - /* JSSTYLED */ - if (/^ssh-ds[as].*/.test(key)) - return dsaToPEM(key); - - throw new Error('Only RSA and DSA public keys are allowed'); - }, - - - /** - * Generates an OpenSSH fingerprint from an ssh public key. - * - * @param {String} key an OpenSSH public key. - * @return {String} key fingerprint. - * @throws {TypeError} on bad input. - * @throws {Error} if what you passed doesn't look like an ssh public key. - */ - fingerprint: function fingerprint(key) { - assert.string(key, 'ssh_key'); - - var pieces = key.split(' '); - if (!pieces || !pieces.length || pieces.length < 2) - throw new Error('invalid ssh key'); - - var data = new Buffer(pieces[1], 'base64'); - - var hash = crypto.createHash('md5'); - hash.update(data); - var digest = hash.digest('hex'); - - var fp = ''; - for (var i = 0; i < digest.length; i++) { - if (i && i % 2 === 0) - fp += ':'; - - fp += digest[i]; - } - - return fp; - } - - -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/verify.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/verify.js deleted file mode 100644 index 5bf95896..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/verify.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2011 Joyent, Inc. All rights reserved. - -var assert = require('assert-plus'); -var crypto = require('crypto'); - - - -///--- Exported API - -module.exports = { - - /** - * Simply wraps up the node crypto operations for you, and returns - * true or false. You are expected to pass in an object that was - * returned from `parse()`. - * - * @param {Object} parsedSignature the object you got from `parse`. - * @param {String} key either an RSA private key PEM or HMAC secret. - * @return {Boolean} true if valid, false otherwise. - * @throws {TypeError} if you pass in bad arguments. - */ - verifySignature: function verifySignature(parsedSignature, key) { - assert.object(parsedSignature, 'parsedSignature'); - assert.string(key, 'key'); - - var alg = parsedSignature.algorithm.match(/(HMAC|RSA|DSA)-(\w+)/); - if (!alg || alg.length !== 3) - throw new TypeError('parsedSignature: unsupported algorithm ' + - parsedSignature.algorithm); - - if (alg[1] === 'HMAC') { - var hmac = crypto.createHmac(alg[2].toUpperCase(), key); - hmac.update(parsedSignature.signingString); - return (hmac.digest('base64') === parsedSignature.params.signature); - } else { - var verify = crypto.createVerify(alg[0]); - verify.update(parsedSignature.signingString); - return verify.verify(key, parsedSignature.params.signature, 'base64'); - } - } - -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/.npmignore deleted file mode 100644 index eb03e3e1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -*.log diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE deleted file mode 100644 index 9b5dcdb7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 Mark Cavage, All rights reserved. - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/README.md deleted file mode 100644 index 7cebf7a2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/README.md +++ /dev/null @@ -1,50 +0,0 @@ -node-asn1 is a library for encoding and decoding ASN.1 datatypes in pure JS. -Currently BER encoding is supported; at some point I'll likely have to do DER. - -## Usage - -Mostly, if you're *actually* needing to read and write ASN.1, you probably don't -need this readme to explain what and why. If you have no idea what ASN.1 is, -see this: ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc - -The source is pretty much self-explanatory, and has read/write methods for the -common types out there. - -### Decoding - -The following reads an ASN.1 sequence with a boolean. - - var Ber = require('asn1').Ber; - - var reader = new Ber.Reader(new Buffer([0x30, 0x03, 0x01, 0x01, 0xff])); - - reader.readSequence(); - console.log('Sequence len: ' + reader.length); - if (reader.peek() === Ber.Boolean) - console.log(reader.readBoolean()); - -### Encoding - -The following generates the same payload as above. - - var Ber = require('asn1').Ber; - - var writer = new Ber.Writer(); - - writer.startSequence(); - writer.writeBoolean(true); - writer.endSequence(); - - console.log(writer.buffer); - -## Installation - - npm install asn1 - -## License - -MIT. - -## Bugs - -See <https://github.com/mcavage/node-asn1/issues>. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js deleted file mode 100644 index ff21d4fa..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. - - -module.exports = { - - newInvalidAsn1Error: function(msg) { - var e = new Error(); - e.name = 'InvalidAsn1Error'; - e.message = msg || ''; - return e; - } - -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js deleted file mode 100644 index 4fb90aea..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. - -var errors = require('./errors'); -var types = require('./types'); - -var Reader = require('./reader'); -var Writer = require('./writer'); - - -///--- Exports - -module.exports = { - - Reader: Reader, - - Writer: Writer - -}; - -for (var t in types) { - if (types.hasOwnProperty(t)) - module.exports[t] = types[t]; -} -for (var e in errors) { - if (errors.hasOwnProperty(e)) - module.exports[e] = errors[e]; -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js deleted file mode 100644 index bd3357a6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. - -var assert = require('assert'); - -var ASN1 = require('./types'); -var errors = require('./errors'); - - -///--- Globals - -var newInvalidAsn1Error = errors.newInvalidAsn1Error; - - - -///--- API - -function Reader(data) { - if (!data || !Buffer.isBuffer(data)) - throw new TypeError('data must be a node Buffer'); - - this._buf = data; - this._size = data.length; - - // These hold the "current" state - this._len = 0; - this._offset = 0; - - var self = this; - this.__defineGetter__('length', function() { return self._len; }); - this.__defineGetter__('offset', function() { return self._offset; }); - this.__defineGetter__('remain', function() { - return self._size - self._offset; - }); - this.__defineGetter__('buffer', function() { - return self._buf.slice(self._offset); - }); -} - - -/** - * Reads a single byte and advances offset; you can pass in `true` to make this - * a "peek" operation (i.e., get the byte, but don't advance the offset). - * - * @param {Boolean} peek true means don't move offset. - * @return {Number} the next byte, null if not enough data. - */ -Reader.prototype.readByte = function(peek) { - if (this._size - this._offset < 1) - return null; - - var b = this._buf[this._offset] & 0xff; - - if (!peek) - this._offset += 1; - - return b; -}; - - -Reader.prototype.peek = function() { - return this.readByte(true); -}; - - -/** - * Reads a (potentially) variable length off the BER buffer. This call is - * not really meant to be called directly, as callers have to manipulate - * the internal buffer afterwards. - * - * As a result of this call, you can call `Reader.length`, until the - * next thing called that does a readLength. - * - * @return {Number} the amount of offset to advance the buffer. - * @throws {InvalidAsn1Error} on bad ASN.1 - */ -Reader.prototype.readLength = function(offset) { - if (offset === undefined) - offset = this._offset; - - if (offset >= this._size) - return null; - - var lenB = this._buf[offset++] & 0xff; - if (lenB === null) - return null; - - if ((lenB & 0x80) == 0x80) { - lenB &= 0x7f; - - if (lenB == 0) - throw newInvalidAsn1Error('Indefinite length not supported'); - - if (lenB > 4) - throw newInvalidAsn1Error('encoding too long'); - - if (this._size - offset < lenB) - return null; - - this._len = 0; - for (var i = 0; i < lenB; i++) - this._len = (this._len << 8) + (this._buf[offset++] & 0xff); - - } else { - // Wasn't a variable length - this._len = lenB; - } - - return offset; -}; - - -/** - * Parses the next sequence in this BER buffer. - * - * To get the length of the sequence, call `Reader.length`. - * - * @return {Number} the sequence's tag. - */ -Reader.prototype.readSequence = function(tag) { - var seq = this.peek(); - if (seq === null) - return null; - if (tag !== undefined && tag !== seq) - throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + - ': got 0x' + seq.toString(16)); - - var o = this.readLength(this._offset + 1); // stored in `length` - if (o === null) - return null; - - this._offset = o; - return seq; -}; - - -Reader.prototype.readInt = function() { - return this._readTag(ASN1.Integer); -}; - - -Reader.prototype.readBoolean = function() { - return (this._readTag(ASN1.Boolean) === 0 ? false : true); -}; - - -Reader.prototype.readEnumeration = function() { - return this._readTag(ASN1.Enumeration); -}; - - -Reader.prototype.readString = function(tag, retbuf) { - if (!tag) - tag = ASN1.OctetString; - - var b = this.peek(); - if (b === null) - return null; - - if (b !== tag) - throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + - ': got 0x' + b.toString(16)); - - var o = this.readLength(this._offset + 1); // stored in `length` - - if (o === null) - return null; - - if (this.length > this._size - o) - return null; - - this._offset = o; - - if (this.length === 0) - return ''; - - var str = this._buf.slice(this._offset, this._offset + this.length); - this._offset += this.length; - - return retbuf ? str : str.toString('utf8'); -}; - -Reader.prototype.readOID = function(tag) { - if (!tag) - tag = ASN1.OID; - - var b = this.peek(); - if (b === null) - return null; - - if (b !== tag) - throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + - ': got 0x' + b.toString(16)); - - var o = this.readLength(this._offset + 1); // stored in `length` - if (o === null) - return null; - - if (this.length > this._size - o) - return null; - - this._offset = o; - - var values = []; - var value = 0; - - for (var i = 0; i < this.length; i++) { - var byte = this._buf[this._offset++] & 0xff; - - value <<= 7; - value += byte & 0x7f; - if ((byte & 0x80) == 0) { - values.push(value); - value = 0; - } - } - - value = values.shift(); - values.unshift(value % 40); - values.unshift((value / 40) >> 0); - - return values.join('.'); -}; - - -Reader.prototype._readTag = function(tag) { - assert.ok(tag !== undefined); - - var b = this.peek(); - - if (b === null) - return null; - - if (b !== tag) - throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + - ': got 0x' + b.toString(16)); - - var o = this.readLength(this._offset + 1); // stored in `length` - if (o === null) - return null; - - if (this.length > 4) - throw newInvalidAsn1Error('Integer too long: ' + this.length); - - if (this.length > this._size - o) - return null; - this._offset = o; - - var fb = this._buf[this._offset++]; - var value = 0; - - value = fb & 0x7F; - for (var i = 1; i < this.length; i++) { - value <<= 8; - value |= (this._buf[this._offset++] & 0xff); - } - - if ((fb & 0x80) == 0x80) - value = -value; - - return value; -}; - - - -///--- Exported API - -module.exports = Reader; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js deleted file mode 100644 index 8aea0001..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. - - -module.exports = { - EOC: 0, - Boolean: 1, - Integer: 2, - BitString: 3, - OctetString: 4, - Null: 5, - OID: 6, - ObjectDescriptor: 7, - External: 8, - Real: 9, // float - Enumeration: 10, - PDV: 11, - Utf8String: 12, - RelativeOID: 13, - Sequence: 16, - Set: 17, - NumericString: 18, - PrintableString: 19, - T61String: 20, - VideotexString: 21, - IA5String: 22, - UTCTime: 23, - GeneralizedTime: 24, - GraphicString: 25, - VisibleString: 26, - GeneralString: 28, - UniversalString: 29, - CharacterString: 30, - BMPString: 31, - Constructor: 32, - Context: 128 -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/writer.js deleted file mode 100644 index 7b445cc6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/writer.js +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. - -var assert = require('assert'); -var ASN1 = require('./types'); -var errors = require('./errors'); - - -///--- Globals - -var newInvalidAsn1Error = errors.newInvalidAsn1Error; - -var DEFAULT_OPTS = { - size: 1024, - growthFactor: 8 -}; - - -///--- Helpers - -function merge(from, to) { - assert.ok(from); - assert.equal(typeof(from), 'object'); - assert.ok(to); - assert.equal(typeof(to), 'object'); - - var keys = Object.getOwnPropertyNames(from); - keys.forEach(function(key) { - if (to[key]) - return; - - var value = Object.getOwnPropertyDescriptor(from, key); - Object.defineProperty(to, key, value); - }); - - return to; -} - - - -///--- API - -function Writer(options) { - options = merge(DEFAULT_OPTS, options || {}); - - this._buf = new Buffer(options.size || 1024); - this._size = this._buf.length; - this._offset = 0; - this._options = options; - - // A list of offsets in the buffer where we need to insert - // sequence tag/len pairs. - this._seq = []; - - var self = this; - this.__defineGetter__('buffer', function() { - if (self._seq.length) - throw new InvalidAsn1Error(self._seq.length + ' unended sequence(s)'); - - return self._buf.slice(0, self._offset); - }); -} - - -Writer.prototype.writeByte = function(b) { - if (typeof(b) !== 'number') - throw new TypeError('argument must be a Number'); - - this._ensure(1); - this._buf[this._offset++] = b; -}; - - -Writer.prototype.writeInt = function(i, tag) { - if (typeof(i) !== 'number') - throw new TypeError('argument must be a Number'); - if (typeof(tag) !== 'number') - tag = ASN1.Integer; - - var sz = 4; - - while ((((i & 0xff800000) === 0) || ((i & 0xff800000) === 0xff800000)) && - (sz > 1)) { - sz--; - i <<= 8; - } - - if (sz > 4) - throw new InvalidAsn1Error('BER ints cannot be > 0xffffffff'); - - this._ensure(2 + sz); - this._buf[this._offset++] = tag; - this._buf[this._offset++] = sz; - - while (sz-- > 0) { - this._buf[this._offset++] = ((i & 0xff000000) >> 24); - i <<= 8; - } - -}; - - -Writer.prototype.writeNull = function() { - this.writeByte(ASN1.Null); - this.writeByte(0x00); -}; - - -Writer.prototype.writeEnumeration = function(i, tag) { - if (typeof(i) !== 'number') - throw new TypeError('argument must be a Number'); - if (typeof(tag) !== 'number') - tag = ASN1.Enumeration; - - return this.writeInt(i, tag); -}; - - -Writer.prototype.writeBoolean = function(b, tag) { - if (typeof(b) !== 'boolean') - throw new TypeError('argument must be a Boolean'); - if (typeof(tag) !== 'number') - tag = ASN1.Boolean; - - this._ensure(3); - this._buf[this._offset++] = tag; - this._buf[this._offset++] = 0x01; - this._buf[this._offset++] = b ? 0xff : 0x00; -}; - - -Writer.prototype.writeString = function(s, tag) { - if (typeof(s) !== 'string') - throw new TypeError('argument must be a string (was: ' + typeof(s) + ')'); - if (typeof(tag) !== 'number') - tag = ASN1.OctetString; - - var len = Buffer.byteLength(s); - this.writeByte(tag); - this.writeLength(len); - if (len) { - this._ensure(len); - this._buf.write(s, this._offset); - this._offset += len; - } -}; - - -Writer.prototype.writeBuffer = function(buf, tag) { - if (typeof(tag) !== 'number') - throw new TypeError('tag must be a number'); - if (!Buffer.isBuffer(buf)) - throw new TypeError('argument must be a buffer'); - - this.writeByte(tag); - this.writeLength(buf.length); - this._ensure(buf.length); - buf.copy(this._buf, this._offset, 0, buf.length); - this._offset += buf.length; -}; - - -Writer.prototype.writeStringArray = function(strings) { - if ((!strings instanceof Array)) - throw new TypeError('argument must be an Array[String]'); - - var self = this; - strings.forEach(function(s) { - self.writeString(s); - }); -}; - -// This is really to solve DER cases, but whatever for now -Writer.prototype.writeOID = function(s, tag) { - if (typeof(s) !== 'string') - throw new TypeError('argument must be a string'); - if (typeof(tag) !== 'number') - tag = ASN1.OID; - - if (!/^([0-9]+\.){3,}[0-9]+$/.test(s)) - throw new Error('argument is not a valid OID string'); - - function encodeOctet(bytes, octet) { - if (octet < 128) { - bytes.push(octet); - } else if (octet < 16384) { - bytes.push((octet >>> 7) | 0x80); - bytes.push(octet & 0x7F); - } else if (octet < 2097152) { - bytes.push((octet >>> 14) | 0x80); - bytes.push(((octet >>> 7) | 0x80) & 0xFF); - bytes.push(octet & 0x7F); - } else if (octet < 268435456) { - bytes.push((octet >>> 21) | 0x80); - bytes.push(((octet >>> 14) | 0x80) & 0xFF); - bytes.push(((octet >>> 7) | 0x80) & 0xFF); - bytes.push(octet & 0x7F); - } else { - bytes.push(((octet >>> 28) | 0x80) & 0xFF); - bytes.push(((octet >>> 21) | 0x80) & 0xFF); - bytes.push(((octet >>> 14) | 0x80) & 0xFF); - bytes.push(((octet >>> 7) | 0x80) & 0xFF); - bytes.push(octet & 0x7F); - } - } - - var tmp = s.split('.'); - var bytes = []; - bytes.push(parseInt(tmp[0], 10) * 40 + parseInt(tmp[1], 10)); - tmp.slice(2).forEach(function(b) { - encodeOctet(bytes, parseInt(b, 10)); - }); - - var self = this; - this._ensure(2 + bytes.length); - this.writeByte(tag); - this.writeLength(bytes.length); - bytes.forEach(function(b) { - self.writeByte(b); - }); -}; - - -Writer.prototype.writeLength = function(len) { - if (typeof(len) !== 'number') - throw new TypeError('argument must be a Number'); - - this._ensure(4); - - if (len <= 0x7f) { - this._buf[this._offset++] = len; - } else if (len <= 0xff) { - this._buf[this._offset++] = 0x81; - this._buf[this._offset++] = len; - } else if (len <= 0xffff) { - this._buf[this._offset++] = 0x82; - this._buf[this._offset++] = len >> 8; - this._buf[this._offset++] = len; - } else if (len <= 0xffffff) { - this._shift(start, len, 1); - this._buf[this._offset++] = 0x83; - this._buf[this._offset++] = len >> 16; - this._buf[this._offset++] = len >> 8; - this._buf[this._offset++] = len; - } else { - throw new InvalidAsn1ERror('Length too long (> 4 bytes)'); - } -}; - -Writer.prototype.startSequence = function(tag) { - if (typeof(tag) !== 'number') - tag = ASN1.Sequence | ASN1.Constructor; - - this.writeByte(tag); - this._seq.push(this._offset); - this._ensure(3); - this._offset += 3; -}; - - -Writer.prototype.endSequence = function() { - var seq = this._seq.pop(); - var start = seq + 3; - var len = this._offset - start; - - if (len <= 0x7f) { - this._shift(start, len, -2); - this._buf[seq] = len; - } else if (len <= 0xff) { - this._shift(start, len, -1); - this._buf[seq] = 0x81; - this._buf[seq + 1] = len; - } else if (len <= 0xffff) { - this._buf[seq] = 0x82; - this._buf[seq + 1] = len >> 8; - this._buf[seq + 2] = len; - } else if (len <= 0xffffff) { - this._shift(start, len, 1); - this._buf[seq] = 0x83; - this._buf[seq + 1] = len >> 16; - this._buf[seq + 2] = len >> 8; - this._buf[seq + 3] = len; - } else { - throw new InvalidAsn1Error('Sequence too long'); - } -}; - - -Writer.prototype._shift = function(start, len, shift) { - assert.ok(start !== undefined); - assert.ok(len !== undefined); - assert.ok(shift); - - this._buf.copy(this._buf, start + shift, start, start + len); - this._offset += shift; -}; - -Writer.prototype._ensure = function(len) { - assert.ok(len); - - if (this._size - this._offset < len) { - var sz = this._size * this._options.growthFactor; - if (sz - this._offset < len) - sz += len; - - var buf = new Buffer(sz); - - this._buf.copy(buf, 0, 0, this._offset); - this._buf = buf; - this._size = sz; - } -}; - - - -///--- Exported API - -module.exports = Writer; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js deleted file mode 100644 index d1766e7a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. - -// If you have no idea what ASN.1 or BER is, see this: -// ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc - -var Ber = require('./ber/index'); - - - -///--- Exported API - -module.exports = { - - Ber: Ber, - - BerReader: Ber.Reader, - - BerWriter: Ber.Writer - -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json deleted file mode 100644 index 8fbee012..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "author": { - "name": "Mark Cavage", - "email": "mcavage@gmail.com" - }, - "contributors": [ - { - "name": "David Gwynne", - "email": "loki@animata.net" - }, - { - "name": "Yunong Xiao", - "email": "yunong@joyent.com" - } - ], - "name": "asn1", - "description": "Contains parsers and serializers for ASN.1 (currently BER only)", - "version": "0.1.11", - "repository": { - "type": "git", - "url": "git://github.com/mcavage/node-asn1.git" - }, - "main": "lib/index.js", - "engines": { - "node": ">=0.4.9" - }, - "dependencies": {}, - "devDependencies": { - "tap": "0.1.4" - }, - "scripts": { - "pretest": "which gjslint; if [[ \"$?\" = 0 ]] ; then gjslint --nojsdoc -r lib -r tst; else echo \"Missing gjslint. Skipping lint\"; fi", - "test": "tap ./tst" - }, - "readme": "node-asn1 is a library for encoding and decoding ASN.1 datatypes in pure JS.\nCurrently BER encoding is supported; at some point I'll likely have to do DER.\n\n## Usage\n\nMostly, if you're *actually* needing to read and write ASN.1, you probably don't\nneed this readme to explain what and why. If you have no idea what ASN.1 is,\nsee this: ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc\n\nThe source is pretty much self-explanatory, and has read/write methods for the\ncommon types out there.\n\n### Decoding\n\nThe following reads an ASN.1 sequence with a boolean.\n\n var Ber = require('asn1').Ber;\n\n var reader = new Ber.Reader(new Buffer([0x30, 0x03, 0x01, 0x01, 0xff]));\n\n reader.readSequence();\n console.log('Sequence len: ' + reader.length);\n if (reader.peek() === Ber.Boolean)\n console.log(reader.readBoolean());\n\n### Encoding\n\nThe following generates the same payload as above.\n\n var Ber = require('asn1').Ber;\n\n var writer = new Ber.Writer();\n\n writer.startSequence();\n writer.writeBoolean(true);\n writer.endSequence();\n\n console.log(writer.buffer);\n\n## Installation\n\n npm install asn1\n\n## License\n\nMIT.\n\n## Bugs\n\nSee <https://github.com/mcavage/node-asn1/issues>.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/mcavage/node-asn1/issues" - }, - "homepage": "https://github.com/mcavage/node-asn1", - "_id": "asn1@0.1.11", - "dist": { - "shasum": "6d27af76b17126a28e5250c7ce288790af7ab63c" - }, - "_from": "asn1@0.1.11", - "_resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/reader.test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/reader.test.js deleted file mode 100644 index 0b78b474..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/reader.test.js +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. - -var test = require('tap').test; - - - -///--- Globals - -var BerReader; - - - -///--- Tests - -test('load library', function(t) { - BerReader = require('../../lib/index').BerReader; - t.ok(BerReader); - try { - new BerReader(); - t.fail('Should have thrown'); - } catch (e) { - t.ok(e instanceof TypeError, 'Should have been a type error'); - } - t.end(); -}); - - -test('read byte', function(t) { - var reader = new BerReader(new Buffer([0xde])); - t.ok(reader); - t.equal(reader.readByte(), 0xde, 'wrong value'); - t.end(); -}); - - -test('read 1 byte int', function(t) { - var reader = new BerReader(new Buffer([0x02, 0x01, 0x03])); - t.ok(reader); - t.equal(reader.readInt(), 0x03, 'wrong value'); - t.equal(reader.length, 0x01, 'wrong length'); - t.end(); -}); - - -test('read 2 byte int', function(t) { - var reader = new BerReader(new Buffer([0x02, 0x02, 0x7e, 0xde])); - t.ok(reader); - t.equal(reader.readInt(), 0x7ede, 'wrong value'); - t.equal(reader.length, 0x02, 'wrong length'); - t.end(); -}); - - -test('read 3 byte int', function(t) { - var reader = new BerReader(new Buffer([0x02, 0x03, 0x7e, 0xde, 0x03])); - t.ok(reader); - t.equal(reader.readInt(), 0x7ede03, 'wrong value'); - t.equal(reader.length, 0x03, 'wrong length'); - t.end(); -}); - - -test('read 4 byte int', function(t) { - var reader = new BerReader(new Buffer([0x02, 0x04, 0x7e, 0xde, 0x03, 0x01])); - t.ok(reader); - t.equal(reader.readInt(), 0x7ede0301, 'wrong value'); - t.equal(reader.length, 0x04, 'wrong length'); - t.end(); -}); - - -test('read boolean true', function(t) { - var reader = new BerReader(new Buffer([0x01, 0x01, 0xff])); - t.ok(reader); - t.equal(reader.readBoolean(), true, 'wrong value'); - t.equal(reader.length, 0x01, 'wrong length'); - t.end(); -}); - - -test('read boolean false', function(t) { - var reader = new BerReader(new Buffer([0x01, 0x01, 0x00])); - t.ok(reader); - t.equal(reader.readBoolean(), false, 'wrong value'); - t.equal(reader.length, 0x01, 'wrong length'); - t.end(); -}); - - -test('read enumeration', function(t) { - var reader = new BerReader(new Buffer([0x0a, 0x01, 0x20])); - t.ok(reader); - t.equal(reader.readEnumeration(), 0x20, 'wrong value'); - t.equal(reader.length, 0x01, 'wrong length'); - t.end(); -}); - - -test('read string', function(t) { - var dn = 'cn=foo,ou=unit,o=test'; - var buf = new Buffer(dn.length + 2); - buf[0] = 0x04; - buf[1] = Buffer.byteLength(dn); - buf.write(dn, 2); - var reader = new BerReader(buf); - t.ok(reader); - t.equal(reader.readString(), dn, 'wrong value'); - t.equal(reader.length, dn.length, 'wrong length'); - t.end(); -}); - - -test('read sequence', function(t) { - var reader = new BerReader(new Buffer([0x30, 0x03, 0x01, 0x01, 0xff])); - t.ok(reader); - t.equal(reader.readSequence(), 0x30, 'wrong value'); - t.equal(reader.length, 0x03, 'wrong length'); - t.equal(reader.readBoolean(), true, 'wrong value'); - t.equal(reader.length, 0x01, 'wrong length'); - t.end(); -}); - - -test('anonymous LDAPv3 bind', function(t) { - var BIND = new Buffer(14); - BIND[0] = 0x30; // Sequence - BIND[1] = 12; // len - BIND[2] = 0x02; // ASN.1 Integer - BIND[3] = 1; // len - BIND[4] = 0x04; // msgid (make up 4) - BIND[5] = 0x60; // Bind Request - BIND[6] = 7; // len - BIND[7] = 0x02; // ASN.1 Integer - BIND[8] = 1; // len - BIND[9] = 0x03; // v3 - BIND[10] = 0x04; // String (bind dn) - BIND[11] = 0; // len - BIND[12] = 0x80; // ContextSpecific (choice) - BIND[13] = 0; // simple bind - - // Start testing ^^ - var ber = new BerReader(BIND); - t.equal(ber.readSequence(), 48, 'Not an ASN.1 Sequence'); - t.equal(ber.length, 12, 'Message length should be 12'); - t.equal(ber.readInt(), 4, 'Message id should have been 4'); - t.equal(ber.readSequence(), 96, 'Bind Request should have been 96'); - t.equal(ber.length, 7, 'Bind length should have been 7'); - t.equal(ber.readInt(), 3, 'LDAP version should have been 3'); - t.equal(ber.readString(), '', 'Bind DN should have been empty'); - t.equal(ber.length, 0, 'string length should have been 0'); - t.equal(ber.readByte(), 0x80, 'Should have been ContextSpecific (choice)'); - t.equal(ber.readByte(), 0, 'Should have been simple bind'); - t.equal(null, ber.readByte(), 'Should be out of data'); - t.end(); -}); - - -test('long string', function(t) { - var buf = new Buffer(256); - var o; - var s = - '2;649;CN=Red Hat CS 71GA Demo,O=Red Hat CS 71GA Demo,C=US;' + - 'CN=RHCS Agent - admin01,UID=admin01,O=redhat,C=US [1] This is ' + - 'Teena Vradmin\'s description.'; - buf[0] = 0x04; - buf[1] = 0x81; - buf[2] = 0x94; - buf.write(s, 3); - var ber = new BerReader(buf.slice(0, 3 + s.length)); - t.equal(ber.readString(), s); - t.end(); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js deleted file mode 100644 index add0b9fd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. - -var test = require('tap').test; -var sys = require('sys'); - -///--- Globals - -var BerWriter; - -var BerReader; - - -///--- Tests - -test('load library', function(t) { - BerWriter = require('../../lib/index').BerWriter; - t.ok(BerWriter); - t.ok(new BerWriter()); - t.end(); -}); - - -test('write byte', function(t) { - var writer = new BerWriter(); - - writer.writeByte(0xC2); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 1, 'Wrong length'); - t.equal(ber[0], 0xC2, 'value wrong'); - - t.end(); -}); - - -test('write 1 byte int', function(t) { - var writer = new BerWriter(); - - writer.writeInt(0x7f); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 3, 'Wrong length for an int: ' + ber.length); - t.equal(ber[0], 0x02, 'ASN.1 tag wrong (2) -> ' + ber[0]); - t.equal(ber[1], 0x01, 'length wrong(1) -> ' + ber[1]); - t.equal(ber[2], 0x7f, 'value wrong(3) -> ' + ber[2]); - - t.end(); -}); - - -test('write 2 byte int', function(t) { - var writer = new BerWriter(); - - writer.writeInt(0x7ffe); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 4, 'Wrong length for an int'); - t.equal(ber[0], 0x02, 'ASN.1 tag wrong'); - t.equal(ber[1], 0x02, 'length wrong'); - t.equal(ber[2], 0x7f, 'value wrong (byte 1)'); - t.equal(ber[3], 0xfe, 'value wrong (byte 2)'); - - t.end(); -}); - - -test('write 3 byte int', function(t) { - var writer = new BerWriter(); - - writer.writeInt(0x7ffffe); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 5, 'Wrong length for an int'); - t.equal(ber[0], 0x02, 'ASN.1 tag wrong'); - t.equal(ber[1], 0x03, 'length wrong'); - t.equal(ber[2], 0x7f, 'value wrong (byte 1)'); - t.equal(ber[3], 0xff, 'value wrong (byte 2)'); - t.equal(ber[4], 0xfe, 'value wrong (byte 3)'); - - t.end(); -}); - - -test('write 4 byte int', function(t) { - var writer = new BerWriter(); - - writer.writeInt(0x7ffffffe); - var ber = writer.buffer; - - t.ok(ber); - - t.equal(ber.length, 6, 'Wrong length for an int'); - t.equal(ber[0], 0x02, 'ASN.1 tag wrong'); - t.equal(ber[1], 0x04, 'length wrong'); - t.equal(ber[2], 0x7f, 'value wrong (byte 1)'); - t.equal(ber[3], 0xff, 'value wrong (byte 2)'); - t.equal(ber[4], 0xff, 'value wrong (byte 3)'); - t.equal(ber[5], 0xfe, 'value wrong (byte 4)'); - - t.end(); -}); - - -test('write boolean', function(t) { - var writer = new BerWriter(); - - writer.writeBoolean(true); - writer.writeBoolean(false); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 6, 'Wrong length'); - t.equal(ber[0], 0x01, 'tag wrong'); - t.equal(ber[1], 0x01, 'length wrong'); - t.equal(ber[2], 0xff, 'value wrong'); - t.equal(ber[3], 0x01, 'tag wrong'); - t.equal(ber[4], 0x01, 'length wrong'); - t.equal(ber[5], 0x00, 'value wrong'); - - t.end(); -}); - - -test('write string', function(t) { - var writer = new BerWriter(); - writer.writeString('hello world'); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 13, 'wrong length'); - t.equal(ber[0], 0x04, 'wrong tag'); - t.equal(ber[1], 11, 'wrong length'); - t.equal(ber.slice(2).toString('utf8'), 'hello world', 'wrong value'); - - t.end(); -}); - -test('write buffer', function(t) { - var writer = new BerWriter(); - // write some stuff to start with - writer.writeString('hello world'); - var ber = writer.buffer; - var buf = new Buffer([0x04, 0x0b, 0x30, 0x09, 0x02, 0x01, 0x0f, 0x01, 0x01, - 0xff, 0x01, 0x01, 0xff]); - writer.writeBuffer(buf.slice(2, buf.length), 0x04); - ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 26, 'wrong length'); - t.equal(ber[0], 0x04, 'wrong tag'); - t.equal(ber[1], 11, 'wrong length'); - t.equal(ber.slice(2, 13).toString('utf8'), 'hello world', 'wrong value'); - t.equal(ber[13], buf[0], 'wrong tag'); - t.equal(ber[14], buf[1], 'wrong length'); - for (var i = 13, j = 0; i < ber.length && j < buf.length; i++, j++) { - t.equal(ber[i], buf[j], 'buffer contents not identical'); - } - t.end(); -}); - -test('write string array', function(t) { - var writer = new BerWriter(); - writer.writeStringArray(['hello world', 'fubar!']); - var ber = writer.buffer; - - t.ok(ber); - - t.equal(ber.length, 21, 'wrong length'); - t.equal(ber[0], 0x04, 'wrong tag'); - t.equal(ber[1], 11, 'wrong length'); - t.equal(ber.slice(2, 13).toString('utf8'), 'hello world', 'wrong value'); - - t.equal(ber[13], 0x04, 'wrong tag'); - t.equal(ber[14], 6, 'wrong length'); - t.equal(ber.slice(15).toString('utf8'), 'fubar!', 'wrong value'); - - t.end(); -}); - - -test('resize internal buffer', function(t) { - var writer = new BerWriter({size: 2}); - writer.writeString('hello world'); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 13, 'wrong length'); - t.equal(ber[0], 0x04, 'wrong tag'); - t.equal(ber[1], 11, 'wrong length'); - t.equal(ber.slice(2).toString('utf8'), 'hello world', 'wrong value'); - - t.end(); -}); - - -test('sequence', function(t) { - var writer = new BerWriter({size: 25}); - writer.startSequence(); - writer.writeString('hello world'); - writer.endSequence(); - var ber = writer.buffer; - - t.ok(ber); - console.log(ber); - t.equal(ber.length, 15, 'wrong length'); - t.equal(ber[0], 0x30, 'wrong tag'); - t.equal(ber[1], 13, 'wrong length'); - t.equal(ber[2], 0x04, 'wrong tag'); - t.equal(ber[3], 11, 'wrong length'); - t.equal(ber.slice(4).toString('utf8'), 'hello world', 'wrong value'); - - t.end(); -}); - - -test('nested sequence', function(t) { - var writer = new BerWriter({size: 25}); - writer.startSequence(); - writer.writeString('hello world'); - writer.startSequence(); - writer.writeString('hello world'); - writer.endSequence(); - writer.endSequence(); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 30, 'wrong length'); - t.equal(ber[0], 0x30, 'wrong tag'); - t.equal(ber[1], 28, 'wrong length'); - t.equal(ber[2], 0x04, 'wrong tag'); - t.equal(ber[3], 11, 'wrong length'); - t.equal(ber.slice(4, 15).toString('utf8'), 'hello world', 'wrong value'); - t.equal(ber[15], 0x30, 'wrong tag'); - t.equal(ber[16], 13, 'wrong length'); - t.equal(ber[17], 0x04, 'wrong tag'); - t.equal(ber[18], 11, 'wrong length'); - t.equal(ber.slice(19, 30).toString('utf8'), 'hello world', 'wrong value'); - - t.end(); -}); - - -test('LDAP bind message', function(t) { - var dn = 'cn=foo,ou=unit,o=test'; - var writer = new BerWriter(); - writer.startSequence(); - writer.writeInt(3); // msgid = 3 - writer.startSequence(0x60); // ldap bind - writer.writeInt(3); // ldap v3 - writer.writeString(dn); - writer.writeByte(0x80); - writer.writeByte(0x00); - writer.endSequence(); - writer.endSequence(); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 35, 'wrong length (buffer)'); - t.equal(ber[0], 0x30, 'wrong tag'); - t.equal(ber[1], 33, 'wrong length'); - t.equal(ber[2], 0x02, 'wrong tag'); - t.equal(ber[3], 1, 'wrong length'); - t.equal(ber[4], 0x03, 'wrong value'); - t.equal(ber[5], 0x60, 'wrong tag'); - t.equal(ber[6], 28, 'wrong length'); - t.equal(ber[7], 0x02, 'wrong tag'); - t.equal(ber[8], 1, 'wrong length'); - t.equal(ber[9], 0x03, 'wrong value'); - t.equal(ber[10], 0x04, 'wrong tag'); - t.equal(ber[11], dn.length, 'wrong length'); - t.equal(ber.slice(12, 33).toString('utf8'), dn, 'wrong value'); - t.equal(ber[33], 0x80, 'wrong tag'); - t.equal(ber[34], 0x00, 'wrong len'); - - t.end(); -}); - - -test('Write OID', function(t) { - var oid = '1.2.840.113549.1.1.1'; - var writer = new BerWriter(); - writer.writeOID(oid); - - var ber = writer.buffer; - t.ok(ber); - console.log(require('util').inspect(ber)); - console.log(require('util').inspect(new Buffer([0x06, 0x09, 0x2a, 0x86, - 0x48, 0x86, 0xf7, 0x0d, - 0x01, 0x01, 0x01]))); - - t.end(); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md deleted file mode 100644 index c0c3a530..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md +++ /dev/null @@ -1,126 +0,0 @@ -# node-assert-plus - -This library is a super small wrapper over node's assert module that has two -things: (1) the ability to disable assertions with the environment variable -NODE_NDEBUG, and (2) some API wrappers for argument testing. Like -`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks -like this: - - var assert = require('assert-plus'); - - function fooAccount(options, callback) { - assert.object(options, 'options'); - assert.number(options.id, 'options.id); - assert.bool(options.isManager, 'options.isManager'); - assert.string(options.name, 'options.name'); - assert.arrayOfString(options.email, 'options.email'); - assert.func(callback, 'callback'); - - // Do stuff - callback(null, {}); - } - -# API - -All methods that *aren't* part of node's core assert API are simply assumed to -take an argument, and then a string 'name' that's not a message; `AssertionError` -will be thrown if the assertion fails with a message like: - - AssertionError: foo (string) is required - at test (/home/mark/work/foo/foo.js:3:9) - at Object.<anonymous> (/home/mark/work/foo/foo.js:15:1) - at Module._compile (module.js:446:26) - at Object..js (module.js:464:10) - at Module.load (module.js:353:31) - at Function._load (module.js:311:12) - at Array.0 (module.js:484:10) - at EventEmitter._tickCallback (node.js:190:38) - -from: - - function test(foo) { - assert.string(foo, 'foo'); - } - -There you go. You can check that arrays are of a homogenous type with `Arrayof$Type`: - - function test(foo) { - assert.arrayOfString(foo, 'foo'); - } - -You can assert IFF an argument is not `undefined` (i.e., an optional arg): - - assert.optionalString(foo, 'foo'); - -Lastly, you can opt-out of assertion checking altogether by setting the -environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have -lots of assertions, and don't want to pay `typeof ()` taxes to v8 in -production. - -The complete list of APIs is: - -* assert.bool -* assert.buffer -* assert.func -* assert.number -* assert.object -* assert.string -* assert.arrayOfBool -* assert.arrayOfFunc -* assert.arrayOfNumber -* assert.arrayOfObject -* assert.arrayOfString -* assert.optionalBool -* assert.optionalBuffer -* assert.optionalFunc -* assert.optionalNumber -* assert.optionalObject -* assert.optionalString -* assert.optionalArrayOfBool -* assert.optionalArrayOfFunc -* assert.optionalArrayOfNumber -* assert.optionalArrayOfObject -* assert.optionalArrayOfString -* assert.AssertionError -* assert.fail -* assert.ok -* assert.equal -* assert.notEqual -* assert.deepEqual -* assert.notDeepEqual -* assert.strictEqual -* assert.notStrictEqual -* assert.throws -* assert.doesNotThrow -* assert.ifError - -# Installation - - npm install assert-plus - -## License - -The MIT License (MIT) -Copyright (c) 2012 Mark Cavage - -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. - -## Bugs - -See <https://github.com/mcavage/node-assert-plus/issues>. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js deleted file mode 100644 index 70583f12..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) 2012, Mark Cavage. All rights reserved. - -var assert = require('assert'); -var Stream = require('stream').Stream; -var util = require('util'); - - - -///--- Globals - -var NDEBUG = process.env.NODE_NDEBUG || false; - - - -///--- Messages - -var ARRAY_TYPE_REQUIRED = '%s ([%s]) required'; -var TYPE_REQUIRED = '%s (%s) is required'; - - - -///--- Internal - -function capitalize(str) { - return (str.charAt(0).toUpperCase() + str.slice(1)); -} - -function uncapitalize(str) { - return (str.charAt(0).toLowerCase() + str.slice(1)); -} - -function _() { - return (util.format.apply(util, arguments)); -} - - -function _assert(arg, type, name, stackFunc) { - if (!NDEBUG) { - name = name || type; - stackFunc = stackFunc || _assert.caller; - var t = typeof (arg); - - if (t !== type) { - throw new assert.AssertionError({ - message: _(TYPE_REQUIRED, name, type), - actual: t, - expected: type, - operator: '===', - stackStartFunction: stackFunc - }); - } - } -} - - - -///--- API - -function array(arr, type, name) { - if (!NDEBUG) { - name = name || type; - - if (!Array.isArray(arr)) { - throw new assert.AssertionError({ - message: _(ARRAY_TYPE_REQUIRED, name, type), - actual: typeof (arr), - expected: 'array', - operator: 'Array.isArray', - stackStartFunction: array.caller - }); - } - - for (var i = 0; i < arr.length; i++) { - _assert(arr[i], type, name, array); - } - } -} - - -function bool(arg, name) { - _assert(arg, 'boolean', name, bool); -} - - -function buffer(arg, name) { - if (!Buffer.isBuffer(arg)) { - throw new assert.AssertionError({ - message: _(TYPE_REQUIRED, name, type), - actual: typeof (arg), - expected: 'buffer', - operator: 'Buffer.isBuffer', - stackStartFunction: buffer - }); - } -} - - -function func(arg, name) { - _assert(arg, 'function', name); -} - - -function number(arg, name) { - _assert(arg, 'number', name); -} - - -function object(arg, name) { - _assert(arg, 'object', name); -} - - -function stream(arg, name) { - if (!(arg instanceof Stream)) { - throw new assert.AssertionError({ - message: _(TYPE_REQUIRED, name, type), - actual: typeof (arg), - expected: 'Stream', - operator: 'instanceof', - stackStartFunction: buffer - }); - } -} - - -function string(arg, name) { - _assert(arg, 'string', name); -} - - - -///--- Exports - -module.exports = { - bool: bool, - buffer: buffer, - func: func, - number: number, - object: object, - stream: stream, - string: string -}; - - -Object.keys(module.exports).forEach(function (k) { - if (k === 'buffer') - return; - - var name = 'arrayOf' + capitalize(k); - - if (k === 'bool') - k = 'boolean'; - if (k === 'func') - k = 'function'; - module.exports[name] = function (arg, name) { - array(arg, k, name); - }; -}); - -Object.keys(module.exports).forEach(function (k) { - var _name = 'optional' + capitalize(k); - var s = uncapitalize(k.replace('arrayOf', '')); - if (s === 'bool') - s = 'boolean'; - if (s === 'func') - s = 'function'; - - if (k.indexOf('arrayOf') !== -1) { - module.exports[_name] = function (arg, name) { - if (!NDEBUG && arg !== undefined) { - array(arg, s, name); - } - }; - } else { - module.exports[_name] = function (arg, name) { - if (!NDEBUG && arg !== undefined) { - _assert(arg, s, name); - } - }; - } -}); - - -// Reexport built-in assertions -Object.keys(assert).forEach(function (k) { - if (k === 'AssertionError') { - module.exports[k] = assert[k]; - return; - } - - module.exports[k] = function () { - if (!NDEBUG) { - assert[k].apply(assert[k], arguments); - } - }; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json deleted file mode 100644 index aade0f97..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "author": { - "name": "Mark Cavage", - "email": "mcavage@gmail.com" - }, - "name": "assert-plus", - "description": "Extra assertions on top of node's assert module", - "version": "0.1.2", - "main": "./assert.js", - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "engines": { - "node": ">=0.6" - }, - "readme": "# node-assert-plus\n\nThis library is a super small wrapper over node's assert module that has two\nthings: (1) the ability to disable assertions with the environment variable\nNODE_NDEBUG, and (2) some API wrappers for argument testing. Like\n`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks\nlike this:\n\n var assert = require('assert-plus');\n\n function fooAccount(options, callback) {\n\t assert.object(options, 'options');\n\t\tassert.number(options.id, 'options.id);\n\t\tassert.bool(options.isManager, 'options.isManager');\n\t\tassert.string(options.name, 'options.name');\n\t\tassert.arrayOfString(options.email, 'options.email');\n\t\tassert.func(callback, 'callback');\n\n // Do stuff\n\t\tcallback(null, {});\n }\n\n# API\n\nAll methods that *aren't* part of node's core assert API are simply assumed to\ntake an argument, and then a string 'name' that's not a message; `AssertionError`\nwill be thrown if the assertion fails with a message like:\n\n AssertionError: foo (string) is required\n\tat test (/home/mark/work/foo/foo.js:3:9)\n\tat Object.<anonymous> (/home/mark/work/foo/foo.js:15:1)\n\tat Module._compile (module.js:446:26)\n\tat Object..js (module.js:464:10)\n\tat Module.load (module.js:353:31)\n\tat Function._load (module.js:311:12)\n\tat Array.0 (module.js:484:10)\n\tat EventEmitter._tickCallback (node.js:190:38)\n\nfrom:\n\n function test(foo) {\n\t assert.string(foo, 'foo');\n }\n\nThere you go. You can check that arrays are of a homogenous type with `Arrayof$Type`:\n\n function test(foo) {\n\t assert.arrayOfString(foo, 'foo');\n }\n\nYou can assert IFF an argument is not `undefined` (i.e., an optional arg):\n\n assert.optionalString(foo, 'foo');\n\nLastly, you can opt-out of assertion checking altogether by setting the\nenvironment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have\nlots of assertions, and don't want to pay `typeof ()` taxes to v8 in\nproduction.\n\nThe complete list of APIs is:\n\n* assert.bool\n* assert.buffer\n* assert.func\n* assert.number\n* assert.object\n* assert.string\n* assert.arrayOfBool\n* assert.arrayOfFunc\n* assert.arrayOfNumber\n* assert.arrayOfObject\n* assert.arrayOfString\n* assert.optionalBool\n* assert.optionalBuffer\n* assert.optionalFunc\n* assert.optionalNumber\n* assert.optionalObject\n* assert.optionalString\n* assert.optionalArrayOfBool\n* assert.optionalArrayOfFunc\n* assert.optionalArrayOfNumber\n* assert.optionalArrayOfObject\n* assert.optionalArrayOfString\n* assert.AssertionError\n* assert.fail\n* assert.ok\n* assert.equal\n* assert.notEqual\n* assert.deepEqual\n* assert.notDeepEqual\n* assert.strictEqual\n* assert.notStrictEqual\n* assert.throws\n* assert.doesNotThrow\n* assert.ifError\n\n# Installation\n\n npm install assert-plus\n\n## License\n\nThe MIT License (MIT)\nCopyright (c) 2012 Mark Cavage\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n## Bugs\n\nSee <https://github.com/mcavage/node-assert-plus/issues>.\n", - "readmeFilename": "README.md", - "_id": "assert-plus@0.1.2", - "dist": { - "shasum": "53cfb5f7859525b28cbf0ba62afc8971ca7ad1a1" - }, - "_from": "assert-plus@0.1.2", - "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG deleted file mode 100644 index 078c03ca..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG +++ /dev/null @@ -1,71 +0,0 @@ -This contains tickets fixed in each version release in reverse chronological -order. There is one ticket per line. Each commits message has the tickets fixed -in it. The commit message also has the corresponding github issue. i.e. CTYPE-42 -would be issue 42. Each issue can be found at: -https://github.com/rmustacc/node-ctype/issues/%d. - -CTYPE v0.5.2 -CTYPE-46 Release 0.5.2 -CTYPE-45 error in setEndian logic - -v0.5.1 -CTYPE-44 Release 0.5.1 -Contributed by Terin Stock: -CTYPE-41 CTypeParser.writeStruct should return its offset -Contributed by Terin Stock: -CTYPE-42 int64_t returns wrong size - -v0.5.0 -CTYPE-40 Release 0.5.0 -CTYPE-39 want > 0.6 engine support - -v0.4.0 -CTYPE-37 Release v0.4.0 -CTYPE-6 want additional entry point for write -CTYPE-20 Add 64-bit int support into core parser -CTYPE-31 Fix bounds errors node/2129 -CTYPE-33 Update copyright holders -CTYPE-34 ctf.js confuses sign bit. -CTYPE-35 Make the README more useful for getting started -CTYPE-36 want manual page on ctio functions - -v0.3.1 -CTYPE-29 Release 0.3.1 -CTYPE-28 Want v0.6 npm support - -v0.3.0 -CTYPE-27 Release v0.3.0 -CTYPE-26 Want alternate default char behavior - -v0.2.1 -CTYPE-25 Release v0.2.1 -CTYPE-24 Writing structs is busted - -v0.2.0: -CTYPE-23 Release v0.2.0 -CTYPE-21 Add support for CTF JSON data -CTYPE-22 Add Javascriptlint profile -CTYPE-15 Pull in ctio updates from node/master - -v0.1.0: -CTYPE-18 Bump version to v0.1.0 -CTYPE-17 Fix nested structures -CTYPE-16 Remove extraneous logging -CTYPE-14 toAbs64 and toApprox64 are not exported - -v0.0.3: -CTYPE-12 Bump version to v0.0.3 -CTYPE-11 fix typo in wuint64 -CTYPE-10 Integrate jsstyle - -v0.0.2: -CTYPE-8 dump npm version to v0.0.2 -CTYPE-9 want changelog -CTYPE-7 fix typo in detypes. - -v0.0.1: -CTYPE-5 Missing from NPM registry -CTYPE-4 int16_t calls wrong read function -CTYPE-3 API example types are missing quotes as strings -CTYPE-2 doc missing 64-bit functions -CTYPE-1 Need license diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE deleted file mode 100644 index 22ced3e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -The following license applies to all files unless the file is specified below. -Each file specified below has its license information embedded in it: - -tools/jsstyle - -Copyright 2011, Robert Mustacchi. All rights reserved. -Copyright 2011, Joyent, Inc. All rights reserved. -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/README b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/README deleted file mode 100644 index 4efd7ee5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/README +++ /dev/null @@ -1,82 +0,0 @@ -Node-CType is a way to read and write binary data in structured and easy to use -format. Its name comes from the C header file. - -To get started, simply clone the repository or use npm to install it. Once it is -there, simply require it. - -git clone git://github.com/rmustacc/node-ctype -npm install ctype -var mod_ctype = require('ctype') - - -There are two APIs that you can use, depending on what abstraction you'd like. -The low level API let's you read and write individual integers and floats from -buffers. The higher level API let's you read and write structures of these. To -illustrate this, let's looks look at how we would read and write a binary -encoded x,y point. - -In C we would define this structure as follows: - -typedef struct point { - uint16_t p_x; - uint16_t p_y; -} point_t; - -To read a binary encoded point from a Buffer, we first need to create a CType -parser (where we specify the endian and other options) and add the typedef. - -var parser = new mod_ctype.Parser({ endian: 'big' }); -parser.typedef('point_t', [ - { x: { type: 'uint16_t' } }, - { y: { type: 'uint16_t' } } -]); - -From here, given a buffer buf and an offset into it, we can read a point. - -var out = parser.readData([ { point: { type: 'point_t' } } ], buffer, 0); -console.log(out); -{ point: { x: 23, y: 42 } } - -Another way to get the same information would be to use the low level methods. -Note that these require you to manually deal with the offset. Here's how we'd -get the same values of x and y from the buffer. - -var x = mod_ctype.ruint16(buf, 'big', 0); -var y = mod_ctype.ruint16(buf, 'big', 2); -console.log(x + ', ' + y); -23, 42 - -The true power of this API comes from the ability to define and nest typedefs, -just as you would in C. By default, the following types are defined by default. -Note that they return a Number, unless indicated otherwise. - - * int8_t - * int16_t - * int32_t - * int64_t (returns an array where val[0] << 32 + val[1] would be the value) - * uint8_t - * uint16_t - * uint32_t - * uint64_t (returns an array where val[0] << 32 + val[1] would be the value) - * float - * double - * char (either returns a buffer with that character or a uint8_t) - * char[] (returns an object with the buffer and the number of characters read which is either the total amount requested or until the first 0) - - -ctf2json integration: - -Node-CType supports consuming the output of ctf2json. Once you read in a JSON file, -all you have to do to add all the definitions it contains is: - -var data, parser; -data = JSON.parse(parsedJSONData); -parser = mod_ctype.parseCTF(data, { endian: 'big' }); - -For more documentation, see the file README.old. Full documentation is in the -process of being rewritten as a series of manual pages which will be available -in the repository and online for viewing. - -To read the ctio manual page simple run, from the root of the workspace: - -man -Mman -s 3ctype ctio diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/README.old b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/README.old deleted file mode 100644 index 9326b725..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/README.old +++ /dev/null @@ -1,298 +0,0 @@ -This library provides a way to read and write binary data. - -Node CType is a way to read and write binary data in structured and easy to use -formats. It's name comes from the header file, though it does not share as much -with it as it perhaps should. - -There are two levels of the API. One is the raw API which everything is built on -top of, while the other provides a much nicer abstraction and is built entirely -by using the lower level API. The hope is that the low level API is both clear -and useful. The low level API gets it's names from stdint.h (a rather -appropriate source). The lower level API is presented at the end of this -document. - -Standard CType API - -The CType interface is presented as a parser object that controls the -endianness combined with a series of methods to change that value, parse and -write out buffers, and a way to provide typedefs. Standard Types - -The CType parser supports the following basic types which return Numbers except -as indicated: - - * int8_t - * int16_t - * int32_t - * int64_t (returns an array where val[0] << 32 + val[1] would be the value) - * uint8_t - * uint16_t - * uint32_t - * uint64_t (returns an array where val[0] << 32 + val[1] would be the value) - * float - * double - * char (returns a buffer with just that single character) - * char[] (returns an object with the buffer and the number of characters read which is either the total amount requested or until the first 0) - -Specifying Structs - -The CType parser also supports the notion of structs. A struct is an array of -JSON objects that defines an order of keys which have types and values. One -would build a struct to represent a point (x,y) as follows: - -[ - { x: { type: 'int16_t' }}, - { y: { type: 'int16_t' }} -] - -When this is passed into the read routine, it would read the first two bytes -(as defined by int16_t) to determine the Number to use for X, and then it would -read the next two bytes to determine the value of Y. When read this could -return something like: - -{ - x: 42, - y: -23 -} - -When someone wants to write values, we use the same format as above, but with -additional value field: - -[ - { x: { type: 'int16_t', value: 42 }}, - { y: { type: 'int16_t', value: -23 }} -] - -Now, the structure above may be optionally annotated with offsets. This tells -us to rather than read continuously we should read the given value at the -specified offset. If an offset is provided, it is is effectively the equivalent -of lseek(offset, SEEK_SET). Thus, subsequent values will be read from that -offset and incremented by the appropriate value. As an example: - -[ - { x: { type: 'int16_t' }}, - { y: { type: 'int16_t', offset: 20 }}, - { z: { type: 'int16_t' }} -] - -We would read x from the first starting offset given to us, for the sake of -example, let's assume that's 0. After reading x, the next offset to read from -would be 2; however, y specifies an offset, thus we jump directly to that -offset and read y from byte 20. We would then read z from byte 22. - -The same offsets may be used when writing values. - -Typedef - -The basic set of types while covers the basics, is somewhat limiting. To make -this richer, there is functionality to typedef something like in C. One can use -typedef to add a new name to an existing type or to define a name to refer to a -struct. Thus the following are all examples of a typedef: - -typedef('size_t', 'uint32_t'); -typedef('ssize_t', 'int32_t'); -typedef('point_t', [ - { x: { type: 'int16_t' }}, - { y: { type: 'int16_t' }} -]); - -Once something has been typedef'd it can be used in any of the definitions -previously shown. - -One cannot remove a typedef once created, this is analogous to C. - -The set of defined types can be printed with lstypes. The format of this output -is subject to change, but likely will look something like: - -> lstypes(); -{ - size_t: 'uint32_t', - ssize_t: 'int32_t', - point_t: [ - { x: { type: 'int16_t' }}, - { y: { type: 'int16_t' }} - ] -} - -Specifying arrays - -Arrays can be specified by appending []s to a type. Arrays must have the size -specified. The size must be specified and it can be done in one of two ways: - - * An explicit non-zero integer size - * A name of a previously declared variable in the struct whose value is a - number. - -Note, that when using the name of a variable, it should be the string name for -the key. This is only valid inside structs and the value must be declared -before the value with the array. The following are examples: - -[ - { ip_addr4: { type: 'uint8_t[4]' }}, - { len: { type: 'uint32_t' }}, - { data: { type: 'uint8_t[len]' }} -] - -Arrays are permitted in typedefs; however, they must have a declared integer -size. The following are examples of valid and invalid arrays: - -typedef('path', 'char[1024]'); /* Good */ -typedef('path', 'char[len]'); /* Bad! */ - -64 bit values: - -Unfortunately Javascript represents values with a double, so you lose precision -and the ability to represent Integers roughly beyond 2^53. To alleviate this, I -propose the following for returning 64 bit integers when read: - -value[2]: Each entry is a 32 bit number which can be reconstructed to the -original by the following formula: - -value[0] << 32 + value[1] (Note this will not work in Javascript) - -CTF JSON data: - -node-ctype can also handle JSON data that mathces the format described in the -documentation of the tool ctf2json. Given the JSON data which specifies type -information, it will transform that into a parser that understands all of the -types defined inside of it. This is useful for more complicated structures that -have a lot of typedefs. - -Interface overview - -The following is the header-file like interface to the parser object: - -/* - * Create a new instance of the parser. Each parser has its own store of - * typedefs and endianness. Conf is an object with the following values: - * - * endian Either 'big' or 'little' do determine the endianness we - * want to read from or write to. - * - */ -function CTypeParser(conf); - -/* - * Parses the CTF JSON data and creates a parser that understands all of those - * types. - * - * data Parsed JSON data that maches that CTF JSON - * specification. - * - * conf The configuration object to create a new CTypeParser - * from. - */ -CTypeParser parseCTF(data, conf); - -/* - * This is what we were born to do. We read the data from a buffer and return it - * in an object whose keys match the values from the object. - * - * def The array definition of the data to read in - * - * buffer The buffer to read data from - * - * offset The offset to start writing to - * - * Returns an object where each key corresponds to an entry in def and the value - * is the read value. - */ -Object CTypeParser.readData(<Type Definition>, buffer, offset); - -/* - * This is the second half of what we were born to do, write out the data - * itself. - * - * def The array definition of the data to write out with - * values - * - * buffer The buffer to write to - * - * offset The offset in the buffer to write to - */ -void CTypeParser.writeData(<Type Definition>, buffer, offset); - -/* - * A user has requested to add a type, let us honor their request. Yet, if their - * request doth spurn us, send them unto the Hells which Dante describes. - * - * name The string for the type definition we're adding - * - * value Either a string that is a type/array name or an object - * that describes a struct. - */ -void CTypeParser.prototype.typedef(name, value); - -Object CTypeParser.prototype.lstypes(); - -/* - * Get the endian value for the current parser - */ -String CTypeParser.prototype.getEndian(); - -/* - * Sets the current endian value for the Parser. If the value is not valid, - * throws an Error. - * - * endian Either 'big' or 'little' do determine the endianness we - * want to read from or write to. - * - */ -void CTypeParser.protoype.setEndian(String); - -/* - * Attempts to convert an array of two integers returned from rsint64 / ruint64 - * into an absolute 64 bit number. If however the value would exceed 2^52 this - * will instead throw an error. The mantissa in a double is a 52 bit number and - * rather than potentially give you a value that is an approximation this will - * error. If you would rather an approximation, please see toApprox64. - * - * val An array of two 32-bit integers - */ -Number function toAbs64(val) - -/* - * Will return the 64 bit value as returned in an array from rsint64 / ruint64 - * to a value as close as it can. Note that Javascript stores all numbers as a - * double and the mantissa only has 52 bits. Thus this version may approximate - * the value. - * - * val An array of two 32-bit integers - */ -Number function toApprox64(val) - -Low Level API - -The following function are provided at the low level: - -Read unsigned integers from a buffer: -Number ruint8(buffer, endian, offset); -Number ruint16(buffer, endian, offset); -Number ruint32(buffer, endian, offset); -Number[] ruint64(buffer, endian, offset); - -Read signed integers from a buffer: -Number rsint8(buffer, endian, offset); -Number rsint16(buffer, endian, offset); -Number rsint32(buffer, endian, offset); -Number[] rsint64(buffer, endian, offset); - -Read floating point numbers from a buffer: -Number rfloat(buffer, endian, offset); /* IEEE-754 Single precision */ -Number rdouble(buffer, endian, offset); /* IEEE-754 Double precision */ - -Write unsigned integers to a buffer: -void wuint8(Number, endian, buffer, offset); -void wuint16(Number, endian, buffer, offset); -void wuint32(Number, endian, buffer, offset); -void wuint64(Number[], endian, buffer, offset); - -Write signed integers from a buffer: -void wsint8(Number, endian, buffer, offset); -void wsint16(Number, endian, buffer, offset); -void wsint32(Number, endian, buffer, offset); -void wsint64(Number[], endian, buffer offset); - -Write floating point numbers from a buffer: -void wfloat(Number, buffer, endian, offset); /* IEEE-754 Single precision */ -void wdouble(Number, buffer, endian, offset); /* IEEE-754 Double precision */ - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js deleted file mode 100644 index 66d5f735..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js +++ /dev/null @@ -1,245 +0,0 @@ -/* - * ctf.js - * - * Understand and parse all of the different JSON formats of CTF data and - * translate that into a series of node-ctype friendly pieces. The reason for - * the abstraction is to handle different changes in the file format. - * - * We have to be careful here that we don't end up using a name that is already - * a built in type. - */ -var mod_assert = require('assert'); -var ASSERT = mod_assert.ok; - -var ctf_versions = [ '1.0' ]; -var ctf_entries = [ 'integer', 'float', 'typedef', 'struct' ]; -var ctf_deftypes = [ 'int8_t', 'uint8_t', 'int16_t', 'uint16_t', 'int32_t', - 'uint32_t', 'float', 'double' ]; - -function ctfParseInteger(entry, ctype) -{ - var name, sign, len, type; - - name = entry['name']; - if (!('signed' in entry['integer'])) - throw (new Error('Malformed CTF JSON: integer missing ' + - 'signed value')); - - - if (!('length' in entry['integer'])) - throw (new Error('Malformed CTF JSON: integer missing ' + - 'length value')); - - sign = entry['integer']['signed']; - len = entry['integer']['length']; - type = null; - - if (sign && len == 1) - type = 'int8_t'; - else if (len == 1) - type = 'uint8_t'; - else if (sign && len == 2) - type = 'int16_t'; - else if (len == 2) - type = 'uint16_t'; - else if (sign && len == 4) - type = 'int32_t'; - else if (len == 4) - type = 'uint32_t'; - else if (sign && len == 8) - type = 'int64_t'; - else if (len == 8) - type = 'uint64_t'; - - if (type === null) - throw (new Error('Malformed CTF JSON: integer has ' + - 'unsupported length and sign - ' + len + '/' + sign)); - - /* - * This means that this is the same as one of our built in types. If - * that's the case defining it would be an error. So instead of trying - * to typedef it, we'll return here. - */ - if (name == type) - return; - - if (name == 'char') { - ASSERT(type == 'int8_t'); - return; - } - - ctype.typedef(name, type); -} - -function ctfParseFloat(entry, ctype) -{ - var name, len; - - name = entry['name']; - if (!('length' in entry['float'])) - throw (new Error('Malformed CTF JSON: float missing ' + - 'length value')); - - len = entry['float']['length']; - if (len != 4 && len != 8) - throw (new Error('Malformed CTF JSON: float has invalid ' + - 'length value')); - - if (len == 4) { - if (name == 'float') - return; - ctype.typedef(name, 'float'); - } else if (len == 8) { - if (name == 'double') - return; - ctype.typedef(name, 'double'); - } -} - -function ctfParseTypedef(entry, ctype) -{ - var name, type, ii; - - name = entry['name']; - if (typeof (entry['typedef']) != 'string') - throw (new Error('Malformed CTF JSON: typedef value in not ' + - 'a string')); - - type = entry['typedef']; - - /* - * We need to ensure that we're not looking at type that's one of our - * built in types. Traditionally in C a uint32_t would be a typedef to - * some kind of integer. However, those size types are built ins. - */ - for (ii = 0; ii < ctf_deftypes.length; ii++) { - if (name == ctf_deftypes[ii]) - return; - } - - ctype.typedef(name, type); -} - -function ctfParseStruct(entry, ctype) -{ - var name, type, ii, val, index, member, push; - - member = []; - if (!Array.isArray(entry['struct'])) - throw (new Error('Malformed CTF JSON: struct value is not ' + - 'an array')); - - for (ii = 0; ii < entry['struct'].length; ii++) { - val = entry['struct'][ii]; - if (!('name' in val)) - throw (new Error('Malformed CTF JSON: struct member ' + - 'missing name')); - - if (!('type' in val)) - throw (new Error('Malformed CTF JSON: struct member ' + - 'missing type')); - - if (typeof (val['name']) != 'string') - throw (new Error('Malformed CTF JSON: struct member ' + - 'name isn\'t a string')); - - if (typeof (val['type']) != 'string') - throw (new Error('Malformed CTF JSON: struct member ' + - 'type isn\'t a string')); - - /* - * CTF version 2 specifies array names as <type> [<num>] where - * as node-ctype does this as <type>[<num>]. - */ - name = val['name']; - type = val['type']; - index = type.indexOf(' ['); - if (index != -1) { - type = type.substring(0, index) + - type.substring(index + 1, type.length); - } - push = {}; - push[name] = { 'type': type }; - member.push(push); - } - - name = entry['name']; - ctype.typedef(name, member); -} - -function ctfParseEntry(entry, ctype) -{ - var ii, found; - - if (!('name' in entry)) - throw (new Error('Malformed CTF JSON: entry missing "name" ' + - 'section')); - - for (ii = 0; ii < ctf_entries.length; ii++) { - if (ctf_entries[ii] in entry) - found++; - } - - if (found === 0) - throw (new Error('Malformed CTF JSON: found no entries')); - - if (found >= 2) - throw (new Error('Malformed CTF JSON: found more than one ' + - 'entry')); - - if ('integer' in entry) { - ctfParseInteger(entry, ctype); - return; - } - - if ('float' in entry) { - ctfParseFloat(entry, ctype); - return; - } - - if ('typedef' in entry) { - ctfParseTypedef(entry, ctype); - return; - } - - if ('struct' in entry) { - ctfParseStruct(entry, ctype); - return; - } - - ASSERT(false, 'shouldn\'t reach here'); -} - -function ctfParseJson(json, ctype) -{ - var version, ii; - - ASSERT(json); - ASSERT(ctype); - if (!('metadata' in json)) - throw (new Error('Invalid CTF JSON: missing metadata section')); - - if (!('ctf2json_version' in json['metadata'])) - throw (new Error('Invalid CTF JSON: missing ctf2json_version')); - - version = json['metadata']['ctf2json_version']; - for (ii = 0; ii < ctf_versions.length; ii++) { - if (ctf_versions[ii] == version) - break; - } - - if (ii == ctf_versions.length) - throw (new Error('Unsuported ctf2json_version: ' + version)); - - if (!('data' in json)) - throw (new Error('Invalid CTF JSON: missing data section')); - - if (!Array.isArray(json['data'])) - throw (new Error('Malformed CTF JSON: data section is not ' + - 'an array')); - - for (ii = 0; ii < json['data'].length; ii++) - ctfParseEntry(json['data'][ii], ctype); -} - -exports.ctfParseJson = ctfParseJson; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js deleted file mode 100644 index 62c5d7b2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js +++ /dev/null @@ -1,1485 +0,0 @@ -/* - * rm - Feb 2011 - * ctio.js: - * - * A simple way to read and write simple ctypes. Of course, as you'll find the - * code isn't as simple as it might appear. The following types are currently - * supported in big and little endian formats: - * - * uint8_t int8_t - * uint16_t int16_t - * uint32_t int32_t - * float (single precision IEEE 754) - * double (double precision IEEE 754) - * - * This is designed to work in Node and v8. It may in fact work in other - * Javascript interpreters (that'd be pretty neat), but it hasn't been tested. - * If you find that it does in fact work, that's pretty cool. Try and pass word - * back to the original author. - * - * Note to the reader: If you're tabstop isn't set to 8, parts of this may look - * weird. - */ - -/* - * Numbers in Javascript have a secret: all numbers must be represented with an - * IEEE-754 double. The double has a mantissa with a length of 52 bits with an - * implicit one. Thus the range of integers that can be represented is limited - * to the size of the mantissa, this makes reading and writing 64-bit integers - * difficult, but far from impossible. - * - * Another side effect of this representation is what happens when you use the - * bitwise operators, i.e. shift left, shift right, and, or, etc. In Javascript, - * each operand and the result is cast to a signed 32-bit number. However, in - * the case of >>> the values are cast to an unsigned number. - */ - -/* - * A reminder on endian related issues: - * - * Big Endian: MSB -> First byte - * Little Endian: MSB->Last byte - */ -var mod_assert = require('assert'); - -/* - * An 8 bit unsigned integer involves doing no significant work. - */ -function ruint8(buffer, endian, offset) -{ - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - return (buffer[offset]); -} - -/* - * For 16 bit unsigned numbers we can do all the casting that we want to do. - */ -function rgint16(buffer, endian, offset) -{ - var val = 0; - - if (endian == 'big') { - val = buffer[offset] << 8; - val |= buffer[offset+1]; - } else { - val = buffer[offset]; - val |= buffer[offset+1] << 8; - } - - return (val); - -} - -function ruint16(buffer, endian, offset) -{ - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 1 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - return (rgint16(buffer, endian, offset)); -} - -/* - * Because most bitshifting is done using signed numbers, if we would go into - * the realm where we use that 32nd bit, we'll end up going into the negative - * range. i.e.: - * > 200 << 24 - * -939524096 - * - * Not the value you'd expect. To work around this, we end up having to do some - * abuse of the JavaScript standard. in this case, we know that a >>> shift is - * defined to cast our value to an *unsigned* 32-bit number. Because of that, we - * use that instead to save us some additional math, though it does feel a - * little weird and it isn't obvious as to why you woul dwant to do this at - * first. - */ -function rgint32(buffer, endian, offset) -{ - var val = 0; - - if (endian == 'big') { - val = buffer[offset+1] << 16; - val |= buffer[offset+2] << 8; - val |= buffer[offset+3]; - val = val + (buffer[offset] << 24 >>> 0); - } else { - val = buffer[offset+2] << 16; - val |= buffer[offset+1] << 8; - val |= buffer[offset]; - val = val + (buffer[offset + 3] << 24 >>> 0); - } - - return (val); -} - -function ruint32(buffer, endian, offset) -{ - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 3 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - return (rgint32(buffer, endian, offset)); -} - -/* - * Reads a 64-bit unsigned number. The astue observer will note that this - * doesn't quite work. Javascript has chosen to only have numbers that can be - * represented by a double. A double only has 52 bits of mantissa with an - * implicit 1, thus we have up to 53 bits to represent an integer. However, 2^53 - * doesn't quite give us what we want. Isn't 53 bits enough for anyone? What - * could you have possibly wanted to represent that was larger than that? Oh, - * maybe a size? You mean we bypassed the 4 GB limit on file sizes, when did - * that happen? - * - * To get around this egregious language issue, we're going to instead construct - * an array of two 32 bit unsigned integers. Where arr[0] << 32 + arr[1] would - * give the actual number. However, note that the above code probably won't - * produce the desired results because of the way Javascript numbers are - * doubles. - */ -function rgint64(buffer, endian, offset) -{ - var val = new Array(2); - - if (endian == 'big') { - val[0] = ruint32(buffer, endian, offset); - val[1] = ruint32(buffer, endian, offset+4); - } else { - val[0] = ruint32(buffer, endian, offset+4); - val[1] = ruint32(buffer, endian, offset); - } - - return (val); -} - -function ruint64(buffer, endian, offset) -{ - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 7 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - return (rgint64(buffer, endian, offset)); -} - - -/* - * Signed integer types, yay team! A reminder on how two's complement actually - * works. The first bit is the signed bit, i.e. tells us whether or not the - * number should be positive or negative. If the two's complement value is - * positive, then we're done, as it's equivalent to the unsigned representation. - * - * Now if the number is positive, you're pretty much done, you can just leverage - * the unsigned translations and return those. Unfortunately, negative numbers - * aren't quite that straightforward. - * - * At first glance, one might be inclined to use the traditional formula to - * translate binary numbers between the positive and negative values in two's - * complement. (Though it doesn't quite work for the most negative value) - * Mainly: - * - invert all the bits - * - add one to the result - * - * Of course, this doesn't quite work in Javascript. Take for example the value - * of -128. This could be represented in 16 bits (big-endian) as 0xff80. But of - * course, Javascript will do the following: - * - * > ~0xff80 - * -65409 - * - * Whoh there, Javascript, that's not quite right. But wait, according to - * Javascript that's perfectly correct. When Javascript ends up seeing the - * constant 0xff80, it has no notion that it is actually a signed number. It - * assumes that we've input the unsigned value 0xff80. Thus, when it does the - * binary negation, it casts it into a signed value, (positive 0xff80). Then - * when you perform binary negation on that, it turns it into a negative number. - * - * Instead, we're going to have to use the following general formula, that works - * in a rather Javascript friendly way. I'm glad we don't support this kind of - * weird numbering scheme in the kernel. - * - * (BIT-MAX - (unsigned)val + 1) * -1 - * - * The astute observer, may think that this doesn't make sense for 8-bit numbers - * (really it isn't necessary for them). However, when you get 16-bit numbers, - * you do. Let's go back to our prior example and see how this will look: - * - * (0xffff - 0xff80 + 1) * -1 - * (0x007f + 1) * -1 - * (0x0080) * -1 - * - * Doing it this way ends up allowing us to treat it appropriately in - * Javascript. Sigh, that's really quite ugly for what should just be a few bit - * shifts, ~ and &. - */ - -/* - * Endianness doesn't matter for 8-bit signed values. We could in fact optimize - * this case because the more traditional methods work, but for consistency, - * we'll keep doing this the same way. - */ -function rsint8(buffer, endian, offset) -{ - var neg; - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - neg = buffer[offset] & 0x80; - if (!neg) - return (buffer[offset]); - - return ((0xff - buffer[offset] + 1) * -1); -} - -/* - * The 16-bit version requires a bit more effort. In this case, we can leverage - * our unsigned code to generate the value we want to return. - */ -function rsint16(buffer, endian, offset) -{ - var neg, val; - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 1 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = rgint16(buffer, endian, offset); - neg = val & 0x8000; - if (!neg) - return (val); - - return ((0xffff - val + 1) * -1); -} - -/* - * We really shouldn't leverage our 32-bit code here and instead utilize the - * fact that we know that since these are signed numbers, we can do all the - * shifting and binary anding to generate the 32-bit number. But, for - * consistency we'll do the same. If we want to do otherwise, we should instead - * make the 32 bit unsigned code do the optimization. But as long as there - * aren't floats secretly under the hood for that, we /should/ be okay. - */ -function rsint32(buffer, endian, offset) -{ - var neg, val; - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 3 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = rgint32(buffer, endian, offset); - neg = val & 0x80000000; - if (!neg) - return (val); - - return ((0xffffffff - val + 1) * -1); -} - -/* - * The signed version of this code suffers from all of the same problems of the - * other 64 bit version. - */ -function rsint64(buffer, endian, offset) -{ - var neg, val; - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 3 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = rgint64(buffer, endian, offset); - neg = val[0] & 0x80000000; - - if (!neg) - return (val); - - val[0] = (0xffffffff - val[0]) * -1; - val[1] = (0xffffffff - val[1] + 1) * -1; - - /* - * If we had the key 0x8000000000000000, that would leave the lower 32 - * bits as 0xffffffff, however, since we're goint to add one, that would - * actually leave the lower 32-bits as 0x100000000, which would break - * our ability to write back a value that we received. To work around - * this, if we actually get that value, we're going to bump the upper - * portion by 1 and set this to zero. - */ - mod_assert.ok(val[1] <= 0x100000000); - if (val[1] == -0x100000000) { - val[1] = 0; - val[0]--; - } - - return (val); -} - -/* - * We now move onto IEEE 754: The traditional form for floating point numbers - * and what is secretly hiding at the heart of everything in this. I really hope - * that someone is actually using this, as otherwise, this effort is probably - * going to be more wasted. - * - * One might be tempted to use parseFloat here, but that wouldn't work at all - * for several reasons. Mostly due to the way floats actually work, and - * parseFloat only actually works in base 10. I don't see base 10 anywhere near - * this file. - * - * In this case we'll implement the single and double precision versions. The - * quadruple precision, while probably useful, wouldn't really be accepted by - * Javascript, so let's not even waste our time. - * - * So let's review how this format looks like. A single precision value is 32 - * bits and has three parts: - * - Sign bit - * - Exponent (Using bias notation) - * - Mantissa - * - * |s|eeeeeeee|mmmmmmmmmmmmmmmmmmmmmmmmm| - * 31| 30-23 | 22 - 0 | - * - * The exponent is stored in a biased input. The bias in this case 127. - * Therefore, our exponent is equal to the 8-bit value - 127. - * - * By default, a number is normalized in IEEE, that means that the mantissa has - * an implicit one that we don't see. So really the value stored is 1.m. - * However, if the exponent is all zeros, then instead we have to shift - * everything to the right one and there is no more implicit one. - * - * Special values: - * - Positive Infinity: - * Sign: 0 - * Exponent: All 1s - * Mantissa: 0 - * - Negative Infinity: - * Sign: 1 - * Exponent: All 1s - * Mantissa: 0 - * - NaN: - * Sign: * - * Exponent: All 1s - * Mantissa: non-zero - * - Zero: - * Sign: * - * Exponent: All 0s - * Mantissa: 0 - * - * In the case of zero, the sign bit determines whether we get a positive or - * negative zero. However, since Javascript cannot determine the difference - * between the two: i.e. -0 == 0, we just always return 0. - * - */ -function rfloat(buffer, endian, offset) -{ - var bytes = []; - var sign, exponent, mantissa, val; - var bias = 127; - var maxexp = 0xff; - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 3 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - /* Normalize the bytes to be in endian order */ - if (endian == 'big') { - bytes[0] = buffer[offset]; - bytes[1] = buffer[offset+1]; - bytes[2] = buffer[offset+2]; - bytes[3] = buffer[offset+3]; - } else { - bytes[3] = buffer[offset]; - bytes[2] = buffer[offset+1]; - bytes[1] = buffer[offset+2]; - bytes[0] = buffer[offset+3]; - } - - sign = bytes[0] & 0x80; - exponent = (bytes[0] & 0x7f) << 1; - exponent |= (bytes[1] & 0x80) >>> 7; - mantissa = (bytes[1] & 0x7f) << 16; - mantissa |= bytes[2] << 8; - mantissa |= bytes[3]; - - /* Check for special cases before we do general parsing */ - if (!sign && exponent == maxexp && mantissa === 0) - return (Number.POSITIVE_INFINITY); - - if (sign && exponent == maxexp && mantissa === 0) - return (Number.NEGATIVE_INFINITY); - - if (exponent == maxexp && mantissa !== 0) - return (Number.NaN); - - /* - * Javascript really doesn't have support for positive or negative zero. - * So we're not going to try and give it to you. That would be just - * plain weird. Besides -0 == 0. - */ - if (exponent === 0 && mantissa === 0) - return (0); - - /* - * Now we can deal with the bias and the determine whether the mantissa - * has the implicit one or not. - */ - exponent -= bias; - if (exponent == -bias) { - exponent++; - val = 0; - } else { - val = 1; - } - - val = (val + mantissa * Math.pow(2, -23)) * Math.pow(2, exponent); - - if (sign) - val *= -1; - - return (val); -} - -/* - * Doubles in IEEE 754 are like their brothers except for a few changes and - * increases in size: - * - The exponent is now 11 bits - * - The mantissa is now 52 bits - * - The bias is now 1023 - * - * |s|eeeeeeeeeee|mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm| - * 63| 62 - 52 | 51 - 0 | - * 63| 62 - 52 | 51 - 0 | - * - * While the size has increased a fair amount, we're going to end up keeping the - * same general formula for calculating the final value. As a reminder, this - * formula is: - * - * (-1)^s * (n + m) * 2^(e-b) - * - * Where: - * s is the sign bit - * n is (exponent > 0) ? 1 : 0 -- Determines whether we're normalized - * or not - * m is the mantissa - * e is the exponent specified - * b is the bias for the exponent - * - */ -function rdouble(buffer, endian, offset) -{ - var bytes = []; - var sign, exponent, mantissa, val, lowmant; - var bias = 1023; - var maxexp = 0x7ff; - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 7 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - /* Normalize the bytes to be in endian order */ - if (endian == 'big') { - bytes[0] = buffer[offset]; - bytes[1] = buffer[offset+1]; - bytes[2] = buffer[offset+2]; - bytes[3] = buffer[offset+3]; - bytes[4] = buffer[offset+4]; - bytes[5] = buffer[offset+5]; - bytes[6] = buffer[offset+6]; - bytes[7] = buffer[offset+7]; - } else { - bytes[7] = buffer[offset]; - bytes[6] = buffer[offset+1]; - bytes[5] = buffer[offset+2]; - bytes[4] = buffer[offset+3]; - bytes[3] = buffer[offset+4]; - bytes[2] = buffer[offset+5]; - bytes[1] = buffer[offset+6]; - bytes[0] = buffer[offset+7]; - } - - /* - * We can construct the exponent and mantissa the same way as we did in - * the case of a float, just increase the range of the exponent. - */ - sign = bytes[0] & 0x80; - exponent = (bytes[0] & 0x7f) << 4; - exponent |= (bytes[1] & 0xf0) >>> 4; - - /* - * This is going to be ugly but then again, we're dealing with IEEE 754. - * This could probably be done as a node add on in a few lines of C++, - * but oh we'll, we've made it this far so let's be native the rest of - * the way... - * - * What we're going to do is break the mantissa into two parts, the - * lower 24 bits and the upper 28 bits. We'll multiply the upper 28 bits - * by the appropriate power and then add in the lower 24-bits. Not - * really that great. It's pretty much a giant kludge to deal with - * Javascript eccentricities around numbers. - */ - lowmant = bytes[7]; - lowmant |= bytes[6] << 8; - lowmant |= bytes[5] << 16; - mantissa = bytes[4]; - mantissa |= bytes[3] << 8; - mantissa |= bytes[2] << 16; - mantissa |= (bytes[1] & 0x0f) << 24; - mantissa *= Math.pow(2, 24); /* Equivalent to << 24, but JS compat */ - mantissa += lowmant; - - /* Check for special cases before we do general parsing */ - if (!sign && exponent == maxexp && mantissa === 0) - return (Number.POSITIVE_INFINITY); - - if (sign && exponent == maxexp && mantissa === 0) - return (Number.NEGATIVE_INFINITY); - - if (exponent == maxexp && mantissa !== 0) - return (Number.NaN); - - /* - * Javascript really doesn't have support for positive or negative zero. - * So we're not going to try and give it to you. That would be just - * plain weird. Besides -0 == 0. - */ - if (exponent === 0 && mantissa === 0) - return (0); - - /* - * Now we can deal with the bias and the determine whether the mantissa - * has the implicit one or not. - */ - exponent -= bias; - if (exponent == -bias) { - exponent++; - val = 0; - } else { - val = 1; - } - - val = (val + mantissa * Math.pow(2, -52)) * Math.pow(2, exponent); - - if (sign) - val *= -1; - - return (val); -} - -/* - * Now that we have gone through the pain of reading the individual types, we're - * probably going to want some way to write these back. None of this is going to - * be good. But since we have Javascript numbers this should certainly be more - * interesting. Though we can constrain this end a little bit more in what is - * valid. For now, let's go back to our friends the unsigned value. - */ - -/* - * Unsigned numbers seem deceptively easy. Here are the general steps and rules - * that we are going to take: - * - If the number is negative, throw an Error - * - Truncate any floating point portion - * - Take the modulus of the number in our base - * - Write it out to the buffer in the endian format requested at the offset - */ - -/* - * We have to make sure that the value is a valid integer. This means that it is - * non-negative. It has no fractional component and that it does not exceed the - * maximum allowed value. - * - * value The number to check for validity - * - * max The maximum value - */ -function prepuint(value, max) -{ - if (typeof (value) != 'number') - throw (new (Error('cannot write a non-number as a number'))); - - if (value < 0) - throw (new Error('specified a negative value for writing an ' + - 'unsigned value')); - - if (value > max) - throw (new Error('value is larger than maximum value for ' + - 'type')); - - if (Math.floor(value) !== value) - throw (new Error('value has a fractional component')); - - return (value); -} - -/* - * 8-bit version, classy. We can ignore endianness which is good. - */ -function wuint8(value, endian, buffer, offset) -{ - var val; - - if (value === undefined) - throw (new Error('missing value')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = prepuint(value, 0xff); - buffer[offset] = val; -} - -/* - * Pretty much the same as the 8-bit version, just this time we need to worry - * about endian related issues. - */ -function wgint16(val, endian, buffer, offset) -{ - if (endian == 'big') { - buffer[offset] = (val & 0xff00) >>> 8; - buffer[offset+1] = val & 0x00ff; - } else { - buffer[offset+1] = (val & 0xff00) >>> 8; - buffer[offset] = val & 0x00ff; - } -} - -function wuint16(value, endian, buffer, offset) -{ - var val; - - if (value === undefined) - throw (new Error('missing value')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 1 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = prepuint(value, 0xffff); - wgint16(val, endian, buffer, offset); -} - -/* - * The 32-bit version is going to have to be a little different unfortunately. - * We can't quite bitshift to get the largest byte, because that would end up - * getting us caught by the signed values. - * - * And yes, we do want to subtract out the lower part by default. This means - * that when we do the division, it will be treated as a bit shift and we won't - * end up generating a floating point value. If we did generate a floating point - * value we'd have to truncate it intelligently, this saves us that problem and - * may even be somewhat faster under the hood. - */ -function wgint32(val, endian, buffer, offset) -{ - if (endian == 'big') { - buffer[offset] = (val - (val & 0x00ffffff)) / Math.pow(2, 24); - buffer[offset+1] = (val >>> 16) & 0xff; - buffer[offset+2] = (val >>> 8) & 0xff; - buffer[offset+3] = val & 0xff; - } else { - buffer[offset+3] = (val - (val & 0x00ffffff)) / - Math.pow(2, 24); - buffer[offset+2] = (val >>> 16) & 0xff; - buffer[offset+1] = (val >>> 8) & 0xff; - buffer[offset] = val & 0xff; - } -} - -function wuint32(value, endian, buffer, offset) -{ - var val; - - if (value === undefined) - throw (new Error('missing value')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 3 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = prepuint(value, 0xffffffff); - wgint32(val, endian, buffer, offset); -} - -/* - * Unlike the other versions, we expect the value to be in the form of two - * arrays where value[0] << 32 + value[1] would result in the value that we - * want. - */ -function wgint64(value, endian, buffer, offset) -{ - if (endian == 'big') { - wgint32(value[0], endian, buffer, offset); - wgint32(value[1], endian, buffer, offset+4); - } else { - wgint32(value[0], endian, buffer, offset+4); - wgint32(value[1], endian, buffer, offset); - } -} - -function wuint64(value, endian, buffer, offset) -{ - if (value === undefined) - throw (new Error('missing value')); - - if (!(value instanceof Array)) - throw (new Error('value must be an array')); - - if (value.length != 2) - throw (new Error('value must be an array of length 2')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 7 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - prepuint(value[0], 0xffffffff); - prepuint(value[1], 0xffffffff); - wgint64(value, endian, buffer, offset); -} - -/* - * We now move onto our friends in the signed number category. Unlike unsigned - * numbers, we're going to have to worry a bit more about how we put values into - * arrays. Since we are only worrying about signed 32-bit values, we're in - * slightly better shape. Unfortunately, we really can't do our favorite binary - * & in this system. It really seems to do the wrong thing. For example: - * - * > -32 & 0xff - * 224 - * - * What's happening above is really: 0xe0 & 0xff = 0xe0. However, the results of - * this aren't treated as a signed number. Ultimately a bad thing. - * - * What we're going to want to do is basically create the unsigned equivalent of - * our representation and pass that off to the wuint* functions. To do that - * we're going to do the following: - * - * - if the value is positive - * we can pass it directly off to the equivalent wuint - * - if the value is negative - * we do the following computation: - * mb + val + 1, where - * mb is the maximum unsigned value in that byte size - * val is the Javascript negative integer - * - * - * As a concrete value, take -128. In signed 16 bits this would be 0xff80. If - * you do out the computations: - * - * 0xffff - 128 + 1 - * 0xffff - 127 - * 0xff80 - * - * You can then encode this value as the signed version. This is really rather - * hacky, but it should work and get the job done which is our goal here. - * - * Thus the overall flow is: - * - Truncate the floating point part of the number - * - We don't have to take the modulus, because the unsigned versions will - * take care of that for us. And we don't have to worry about that - * potentially causing bad things to happen because of sign extension - * - Pass it off to the appropriate unsigned version, potentially modifying - * the negative portions as necessary. - */ - -/* - * A series of checks to make sure we actually have a signed 32-bit number - */ -function prepsint(value, max, min) -{ - if (typeof (value) != 'number') - throw (new (Error('cannot write a non-number as a number'))); - - if (value > max) - throw (new Error('value larger than maximum allowed value')); - - if (value < min) - throw (new Error('value smaller than minimum allowed value')); - - if (Math.floor(value) !== value) - throw (new Error('value has a fractional component')); - - return (value); -} - -/* - * The 8-bit version of the signed value. Overall, fairly straightforward. - */ -function wsint8(value, endian, buffer, offset) -{ - var val; - - if (value === undefined) - throw (new Error('missing value')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = prepsint(value, 0x7f, -0x80); - if (val >= 0) - wuint8(val, endian, buffer, offset); - else - wuint8(0xff + val + 1, endian, buffer, offset); -} - -/* - * The 16-bit version of the signed value. Also, fairly straightforward. - */ -function wsint16(value, endian, buffer, offset) -{ - var val; - - if (value === undefined) - throw (new Error('missing value')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 1 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = prepsint(value, 0x7fff, -0x8000); - if (val >= 0) - wgint16(val, endian, buffer, offset); - else - wgint16(0xffff + val + 1, endian, buffer, offset); - -} - -/* - * We can do this relatively easily by leveraging the code used for 32-bit - * unsigned code. - */ -function wsint32(value, endian, buffer, offset) -{ - var val; - - if (value === undefined) - throw (new Error('missing value')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 3 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = prepsint(value, 0x7fffffff, -0x80000000); - if (val >= 0) - wgint32(val, endian, buffer, offset); - else - wgint32(0xffffffff + val + 1, endian, buffer, offset); -} - -/* - * The signed 64 bit integer should by in the same format as when received. - * Mainly it should ensure that the value is an array of two integers where - * value[0] << 32 + value[1] is the desired number. Furthermore, the two values - * need to be equal. - */ -function wsint64(value, endian, buffer, offset) -{ - var vzpos, vopos; - var vals = new Array(2); - - if (value === undefined) - throw (new Error('missing value')); - - if (!(value instanceof Array)) - throw (new Error('value must be an array')); - - if (value.length != 2) - throw (new Error('value must be an array of length 2')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 7 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - /* - * We need to make sure that we have the same sign on both values. The - * hokiest way to to do this is to multiply the number by +inf. If we do - * this, we'll get either +/-inf depending on the sign of the value. - * Once we have this, we can compare it to +inf to see if the number is - * positive or not. - */ - vzpos = (value[0] * Number.POSITIVE_INFINITY) == - Number.POSITIVE_INFINITY; - vopos = (value[1] * Number.POSITIVE_INFINITY) == - Number.POSITIVE_INFINITY; - - /* - * If either of these is zero, then we don't actually need this check. - */ - if (value[0] != 0 && value[1] != 0 && vzpos != vopos) - throw (new Error('Both entries in the array must have ' + - 'the same sign')); - - /* - * Doing verification for a signed 64-bit integer is actually a big - * trickier than it appears. We can't quite use our standard techniques - * because we need to compare both sets of values. The first value is - * pretty straightforward. If the first value is beond the extremes than - * we error out. However, the valid range of the second value varies - * based on the first one. If the first value is negative, and *not* the - * largest negative value, than it can be any integer within the range [ - * 0, 0xffffffff ]. If it is the largest negative number, it must be - * zero. - * - * If the first number is positive, than it doesn't matter what the - * value is. We just simply have to make sure we have a valid positive - * integer. - */ - if (vzpos) { - prepuint(value[0], 0x7fffffff); - prepuint(value[1], 0xffffffff); - } else { - prepsint(value[0], 0, -0x80000000); - prepsint(value[1], 0, -0xffffffff); - if (value[0] == -0x80000000 && value[1] != 0) - throw (new Error('value smaller than minimum ' + - 'allowed value')); - } - - /* Fix negative numbers */ - if (value[0] < 0 || value[1] < 0) { - vals[0] = 0xffffffff - Math.abs(value[0]); - vals[1] = 0x100000000 - Math.abs(value[1]); - if (vals[1] == 0x100000000) { - vals[1] = 0; - vals[0]++; - } - } else { - vals[0] = value[0]; - vals[1] = value[1]; - } - wgint64(vals, endian, buffer, offset); -} - -/* - * Now we are moving onto the weirder of these, the float and double. For this - * we're going to just have to do something that's pretty weird. First off, we - * have no way to get at the underlying float representation, at least not - * easily. But that doesn't mean we can't figure it out, we just have to use our - * heads. - * - * One might propose to use Number.toString(2). Of course, this is not really - * that good, because the ECMAScript 262 v3 Standard says the following Section - * 15.7.4.2-Number.prototype.toString (radix): - * - * If radix is an integer from 2 to 36, but not 10, the result is a string, the - * choice of which is implementation-dependent. - * - * Well that doesn't really help us one bit now does it? We could use the - * standard base 10 version of the string, but that's just going to create more - * errors as we end up trying to convert it back to a binary value. So, really - * this just means we have to be non-lazy and parse the structure intelligently. - * - * First off, we can do the basic checks: NaN, positive and negative infinity. - * - * Now that those are done we can work backwards to generate the mantissa and - * exponent. - * - * The first thing we need to do is determine the sign bit, easy to do, check - * whether the value is less than 0. And convert the number to its absolute - * value representation. Next, we need to determine if the value is less than - * one or greater than or equal to one and from there determine what power was - * used to get there. What follows is now specific to floats, though the general - * ideas behind this will hold for doubles as well, but the exact numbers - * involved will change. - * - * Once we have that power we can determine the exponent and the mantissa. Call - * the value that has the number of bits to reach the power ebits. In the - * general case they have the following values: - * - * exponent 127 + ebits - * mantissa value * 2^(23 - ebits) & 0x7fffff - * - * In the case where the value of ebits is <= -127 we are now in the case where - * we no longer have normalized numbers. In this case the values take on the - * following values: - * - * exponent 0 - * mantissa value * 2^149 & 0x7fffff - * - * Once we have the values for the sign, mantissa, and exponent. We reconstruct - * the four bytes as follows: - * - * byte0 sign bit and seven most significant bits from the exp - * sign << 7 | (exponent & 0xfe) >>> 1 - * - * byte1 lsb from the exponent and 7 top bits from the mantissa - * (exponent & 0x01) << 7 | (mantissa & 0x7f0000) >>> 16 - * - * byte2 bits 8-15 (zero indexing) from mantissa - * mantissa & 0xff00 >> 8 - * - * byte3 bits 0-7 from mantissa - * mantissa & 0xff - * - * Once we have this we have to assign them into the buffer in proper endian - * order. - */ - -/* - * Compute the log base 2 of the value. Now, someone who remembers basic - * properties of logarithms will point out that we could use the change of base - * formula for logs, and in fact that would be astute, because that's what we'll - * do for now. It feels cleaner, albeit it may be less efficient than just - * iterating and dividing by 2. We may want to come back and revisit that some - * day. - */ -function log2(value) -{ - return (Math.log(value) / Math.log(2)); -} - -/* - * Helper to determine the exponent of the number we're looking at. - */ -function intexp(value) -{ - return (Math.floor(log2(value))); -} - -/* - * Helper to determine the exponent of the fractional part of the value. - */ -function fracexp(value) -{ - return (Math.floor(log2(value))); -} - -function wfloat(value, endian, buffer, offset) -{ - var sign, exponent, mantissa, ebits; - var bytes = []; - - if (value === undefined) - throw (new Error('missing value')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - - if (offset + 3 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - if (isNaN(value)) { - sign = 0; - exponent = 0xff; - mantissa = 23; - } else if (value == Number.POSITIVE_INFINITY) { - sign = 0; - exponent = 0xff; - mantissa = 0; - } else if (value == Number.NEGATIVE_INFINITY) { - sign = 1; - exponent = 0xff; - mantissa = 0; - } else { - /* Well we have some work to do */ - - /* Thankfully the sign bit is trivial */ - if (value < 0) { - sign = 1; - value = Math.abs(value); - } else { - sign = 0; - } - - /* Use the correct function to determine number of bits */ - if (value < 1) - ebits = fracexp(value); - else - ebits = intexp(value); - - /* Time to deal with the issues surrounding normalization */ - if (ebits <= -127) { - exponent = 0; - mantissa = (value * Math.pow(2, 149)) & 0x7fffff; - } else { - exponent = 127 + ebits; - mantissa = value * Math.pow(2, 23 - ebits); - mantissa &= 0x7fffff; - } - } - - bytes[0] = sign << 7 | (exponent & 0xfe) >>> 1; - bytes[1] = (exponent & 0x01) << 7 | (mantissa & 0x7f0000) >>> 16; - bytes[2] = (mantissa & 0x00ff00) >>> 8; - bytes[3] = mantissa & 0x0000ff; - - if (endian == 'big') { - buffer[offset] = bytes[0]; - buffer[offset+1] = bytes[1]; - buffer[offset+2] = bytes[2]; - buffer[offset+3] = bytes[3]; - } else { - buffer[offset] = bytes[3]; - buffer[offset+1] = bytes[2]; - buffer[offset+2] = bytes[1]; - buffer[offset+3] = bytes[0]; - } -} - -/* - * Now we move onto doubles. Doubles are similar to floats in pretty much all - * ways except that the processing isn't quite as straightforward because we - * can't always use shifting, i.e. we have > 32 bit values. - * - * We're going to proceed in an identical fashion to floats and utilize the same - * helper functions. All that really is changing are the specific values that we - * use to do the calculations. Thus, to review we have to do the following. - * - * First get the sign bit and convert the value to its absolute value - * representation. Next, we determine the number of bits that we used to get to - * the value, branching whether the value is greater than or less than 1. Once - * we have that value which we will again call ebits, we have to do the - * following in the general case: - * - * exponent 1023 + ebits - * mantissa [value * 2^(52 - ebits)] % 2^52 - * - * In the case where the value of ebits <= -1023 we no longer use normalized - * numbers, thus like with floats we have to do slightly different processing: - * - * exponent 0 - * mantissa [value * 2^1074] % 2^52 - * - * Once we have determined the sign, exponent and mantissa we can construct the - * bytes as follows: - * - * byte0 sign bit and seven most significant bits form the exp - * sign << 7 | (exponent & 0x7f0) >>> 4 - * - * byte1 Remaining 4 bits from the exponent and the four most - * significant bits from the mantissa 48-51 - * (exponent & 0x00f) << 4 | mantissa >>> 48 - * - * byte2 Bits 40-47 from the mantissa - * (mantissa >>> 40) & 0xff - * - * byte3 Bits 32-39 from the mantissa - * (mantissa >>> 32) & 0xff - * - * byte4 Bits 24-31 from the mantissa - * (mantissa >>> 24) & 0xff - * - * byte5 Bits 16-23 from the Mantissa - * (mantissa >>> 16) & 0xff - * - * byte6 Bits 8-15 from the mantissa - * (mantissa >>> 8) & 0xff - * - * byte7 Bits 0-7 from the mantissa - * mantissa & 0xff - * - * Now we can't quite do the right shifting that we want in bytes 1 - 3, because - * we'll have extended too far and we'll lose those values when we try and do - * the shift. Instead we have to use an alternate approach. To try and stay out - * of floating point, what we'll do is say that mantissa -= bytes[4-7] and then - * divide by 2^32. Once we've done that we can use binary arithmetic. Oof, - * that's ugly, but it seems to avoid using floating point (just based on how v8 - * seems to be optimizing for base 2 arithmetic). - */ -function wdouble(value, endian, buffer, offset) -{ - var sign, exponent, mantissa, ebits; - var bytes = []; - - if (value === undefined) - throw (new Error('missing value')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - - if (offset + 7 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - if (isNaN(value)) { - sign = 0; - exponent = 0x7ff; - mantissa = 23; - } else if (value == Number.POSITIVE_INFINITY) { - sign = 0; - exponent = 0x7ff; - mantissa = 0; - } else if (value == Number.NEGATIVE_INFINITY) { - sign = 1; - exponent = 0x7ff; - mantissa = 0; - } else { - /* Well we have some work to do */ - - /* Thankfully the sign bit is trivial */ - if (value < 0) { - sign = 1; - value = Math.abs(value); - } else { - sign = 0; - } - - /* Use the correct function to determine number of bits */ - if (value < 1) - ebits = fracexp(value); - else - ebits = intexp(value); - - /* - * This is a total hack to determine a denormalized value. - * Unfortunately, we sometimes do not get a proper value for - * ebits, i.e. we lose the values that would get rounded off. - * - * - * The astute observer may wonder why we would be - * multiplying by two Math.pows rather than just summing - * them. Well, that's to get around a small bug in the - * way v8 seems to implement the function. On occasion - * doing: - * - * foo * Math.pow(2, 1023 + 51) - * - * Causes us to overflow to infinity, where as doing: - * - * foo * Math.pow(2, 1023) * Math.pow(2, 51) - * - * Does not cause us to overflow. Go figure. - * - */ - if (value <= 2.225073858507201e-308 || ebits <= -1023) { - exponent = 0; - mantissa = value * Math.pow(2, 1023) * Math.pow(2, 51); - mantissa %= Math.pow(2, 52); - } else { - /* - * We might have gotten fucked by our floating point - * logarithm magic. This is rather crappy, but that's - * our luck. If we just had a log base 2 or access to - * the stupid underlying representation this would have - * been much easier and we wouldn't have such stupid - * kludges or hacks. - */ - if (ebits > 1023) - ebits = 1023; - exponent = 1023 + ebits; - mantissa = value * Math.pow(2, -ebits); - mantissa *= Math.pow(2, 52); - mantissa %= Math.pow(2, 52); - } - } - - /* Fill the bytes in backwards to deal with the size issues */ - bytes[7] = mantissa & 0xff; - bytes[6] = (mantissa >>> 8) & 0xff; - bytes[5] = (mantissa >>> 16) & 0xff; - mantissa = (mantissa - (mantissa & 0xffffff)) / Math.pow(2, 24); - bytes[4] = mantissa & 0xff; - bytes[3] = (mantissa >>> 8) & 0xff; - bytes[2] = (mantissa >>> 16) & 0xff; - bytes[1] = (exponent & 0x00f) << 4 | mantissa >>> 24; - bytes[0] = (sign << 7) | (exponent & 0x7f0) >>> 4; - - if (endian == 'big') { - buffer[offset] = bytes[0]; - buffer[offset+1] = bytes[1]; - buffer[offset+2] = bytes[2]; - buffer[offset+3] = bytes[3]; - buffer[offset+4] = bytes[4]; - buffer[offset+5] = bytes[5]; - buffer[offset+6] = bytes[6]; - buffer[offset+7] = bytes[7]; - } else { - buffer[offset+7] = bytes[0]; - buffer[offset+6] = bytes[1]; - buffer[offset+5] = bytes[2]; - buffer[offset+4] = bytes[3]; - buffer[offset+3] = bytes[4]; - buffer[offset+2] = bytes[5]; - buffer[offset+1] = bytes[6]; - buffer[offset] = bytes[7]; - } -} - -/* - * Actually export our work above. One might argue that we shouldn't expose - * these interfaces and just force people to use the higher level abstractions - * around this work. However, unlike say other libraries we've come across, this - * interface has several properties: it makes sense, it's simple, and it's - * useful. - */ -exports.ruint8 = ruint8; -exports.ruint16 = ruint16; -exports.ruint32 = ruint32; -exports.ruint64 = ruint64; -exports.wuint8 = wuint8; -exports.wuint16 = wuint16; -exports.wuint32 = wuint32; -exports.wuint64 = wuint64; - -exports.rsint8 = rsint8; -exports.rsint16 = rsint16; -exports.rsint32 = rsint32; -exports.rsint64 = rsint64; -exports.wsint8 = wsint8; -exports.wsint16 = wsint16; -exports.wsint32 = wsint32; -exports.wsint64 = wsint64; - -exports.rfloat = rfloat; -exports.rdouble = rdouble; -exports.wfloat = wfloat; -exports.wdouble = wdouble; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js deleted file mode 100644 index 7d2f4a5a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js +++ /dev/null @@ -1,944 +0,0 @@ -/* - * rm - Feb 2011 - * ctype.js - * - * This module provides a simple abstraction towards reading and writing - * different types of binary data. It is designed to use ctio.js and provide a - * richer and more expressive API on top of it. - * - * By default we support the following as built in basic types: - * int8_t - * int16_t - * int32_t - * uint8_t - * uint16_t - * uint32_t - * uint64_t - * float - * double - * char - * char[] - * - * Each type is returned as a Number, with the exception of char and char[] - * which are returned as Node Buffers. A char is considered a uint8_t. - * - * Requests to read and write data are specified as an array of JSON objects. - * This is also the same way that one declares structs. Even if just a single - * value is requested, it must be done as a struct. The array order determines - * the order that we try and read values. Each entry has the following format - * with values marked with a * being optional. - * - * { key: { type: /type/, value*: /value/, offset*: /offset/ } - * - * If offset is defined, we lseek(offset, SEEK_SET) before reading the next - * value. Value is defined when we're writing out data, otherwise it's ignored. - * - */ - -var mod_ctf = require('./ctf.js'); -var mod_ctio = require('./ctio.js'); -var mod_assert = require('assert'); - -/* - * This is the set of basic types that we support. - * - * read The function to call to read in a value from a buffer - * - * write The function to call to write a value to a buffer - * - */ -var deftypes = { - 'uint8_t': { read: ctReadUint8, write: ctWriteUint8 }, - 'uint16_t': { read: ctReadUint16, write: ctWriteUint16 }, - 'uint32_t': { read: ctReadUint32, write: ctWriteUint32 }, - 'uint64_t': { read: ctReadUint64, write: ctWriteUint64 }, - 'int8_t': { read: ctReadSint8, write: ctWriteSint8 }, - 'int16_t': { read: ctReadSint16, write: ctWriteSint16 }, - 'int32_t': { read: ctReadSint32, write: ctWriteSint32 }, - 'int64_t': { read: ctReadSint64, write: ctWriteSint64 }, - 'float': { read: ctReadFloat, write: ctWriteFloat }, - 'double': { read: ctReadDouble, write: ctWriteDouble }, - 'char': { read: ctReadChar, write: ctWriteChar }, - 'char[]': { read: ctReadCharArray, write: ctWriteCharArray } -}; - -/* - * The following are wrappers around the CType IO low level API. They encode - * knowledge about the size and return something in the expected format. - */ -function ctReadUint8(endian, buffer, offset) -{ - var val = mod_ctio.ruint8(buffer, endian, offset); - return ({ value: val, size: 1 }); -} - -function ctReadUint16(endian, buffer, offset) -{ - var val = mod_ctio.ruint16(buffer, endian, offset); - return ({ value: val, size: 2 }); -} - -function ctReadUint32(endian, buffer, offset) -{ - var val = mod_ctio.ruint32(buffer, endian, offset); - return ({ value: val, size: 4 }); -} - -function ctReadUint64(endian, buffer, offset) -{ - var val = mod_ctio.ruint64(buffer, endian, offset); - return ({ value: val, size: 8 }); -} - -function ctReadSint8(endian, buffer, offset) -{ - var val = mod_ctio.rsint8(buffer, endian, offset); - return ({ value: val, size: 1 }); -} - -function ctReadSint16(endian, buffer, offset) -{ - var val = mod_ctio.rsint16(buffer, endian, offset); - return ({ value: val, size: 2 }); -} - -function ctReadSint32(endian, buffer, offset) -{ - var val = mod_ctio.rsint32(buffer, endian, offset); - return ({ value: val, size: 4 }); -} - -function ctReadSint64(endian, buffer, offset) -{ - var val = mod_ctio.rsint64(buffer, endian, offset); - return ({ value: val, size: 8 }); -} - -function ctReadFloat(endian, buffer, offset) -{ - var val = mod_ctio.rfloat(buffer, endian, offset); - return ({ value: val, size: 4 }); -} - -function ctReadDouble(endian, buffer, offset) -{ - var val = mod_ctio.rdouble(buffer, endian, offset); - return ({ value: val, size: 8 }); -} - -/* - * Reads a single character into a node buffer - */ -function ctReadChar(endian, buffer, offset) -{ - var res = new Buffer(1); - res[0] = mod_ctio.ruint8(buffer, endian, offset); - return ({ value: res, size: 1 }); -} - -function ctReadCharArray(length, endian, buffer, offset) -{ - var ii; - var res = new Buffer(length); - - for (ii = 0; ii < length; ii++) - res[ii] = mod_ctio.ruint8(buffer, endian, offset + ii); - - return ({ value: res, size: length }); -} - -function ctWriteUint8(value, endian, buffer, offset) -{ - mod_ctio.wuint8(value, endian, buffer, offset); - return (1); -} - -function ctWriteUint16(value, endian, buffer, offset) -{ - mod_ctio.wuint16(value, endian, buffer, offset); - return (2); -} - -function ctWriteUint32(value, endian, buffer, offset) -{ - mod_ctio.wuint32(value, endian, buffer, offset); - return (4); -} - -function ctWriteUint64(value, endian, buffer, offset) -{ - mod_ctio.wuint64(value, endian, buffer, offset); - return (8); -} - -function ctWriteSint8(value, endian, buffer, offset) -{ - mod_ctio.wsint8(value, endian, buffer, offset); - return (1); -} - -function ctWriteSint16(value, endian, buffer, offset) -{ - mod_ctio.wsint16(value, endian, buffer, offset); - return (2); -} - -function ctWriteSint32(value, endian, buffer, offset) -{ - mod_ctio.wsint32(value, endian, buffer, offset); - return (4); -} - -function ctWriteSint64(value, endian, buffer, offset) -{ - mod_ctio.wsint64(value, endian, buffer, offset); - return (8); -} - -function ctWriteFloat(value, endian, buffer, offset) -{ - mod_ctio.wfloat(value, endian, buffer, offset); - return (4); -} - -function ctWriteDouble(value, endian, buffer, offset) -{ - mod_ctio.wdouble(value, endian, buffer, offset); - return (8); -} - -/* - * Writes a single character into a node buffer - */ -function ctWriteChar(value, endian, buffer, offset) -{ - if (!(value instanceof Buffer)) - throw (new Error('Input must be a buffer')); - - mod_ctio.ruint8(value[0], endian, buffer, offset); - return (1); -} - -/* - * We're going to write 0s into the buffer if the string is shorter than the - * length of the array. - */ -function ctWriteCharArray(value, length, endian, buffer, offset) -{ - var ii; - - if (!(value instanceof Buffer)) - throw (new Error('Input must be a buffer')); - - if (value.length > length) - throw (new Error('value length greater than array length')); - - for (ii = 0; ii < value.length && ii < length; ii++) - mod_ctio.wuint8(value[ii], endian, buffer, offset + ii); - - for (; ii < length; ii++) - mod_ctio.wuint8(0, endian, offset + ii); - - - return (length); -} - -/* - * Each parser has their own set of types. We want to make sure that they each - * get their own copy as they may need to modify it. - */ -function ctGetBasicTypes() -{ - var ret = {}; - var key; - for (key in deftypes) - ret[key] = deftypes[key]; - - return (ret); -} - -/* - * Given a string in the form of type[length] we want to split this into an - * object that extracts that information. We want to note that we could possibly - * have nested arrays so this should only check the furthest one. It may also be - * the case that we have no [] pieces, in which case we just return the current - * type. - */ -function ctParseType(str) -{ - var begInd, endInd; - var type, len; - if (typeof (str) != 'string') - throw (new Error('type must be a Javascript string')); - - endInd = str.lastIndexOf(']'); - if (endInd == -1) { - if (str.lastIndexOf('[') != -1) - throw (new Error('found invalid type with \'[\' but ' + - 'no corresponding \']\'')); - - return ({ type: str }); - } - - begInd = str.lastIndexOf('['); - if (begInd == -1) - throw (new Error('found invalid type with \']\' but ' + - 'no corresponding \'[\'')); - - if (begInd >= endInd) - throw (new Error('malformed type, \']\' appears before \'[\'')); - - type = str.substring(0, begInd); - len = str.substring(begInd + 1, endInd); - - return ({ type: type, len: len }); -} - -/* - * Given a request validate that all of the fields for it are valid and make - * sense. This includes verifying the following notions: - * - Each type requested is present in types - * - Only allow a name for a field to be specified once - * - If an array is specified, validate that the requested field exists and - * comes before it. - * - If fields is defined, check that each entry has the occurrence of field - */ -function ctCheckReq(def, types, fields) -{ - var ii, jj; - var req, keys, key; - var found = {}; - - if (!(def instanceof Array)) - throw (new Error('definition is not an array')); - - if (def.length === 0) - throw (new Error('definition must have at least one element')); - - for (ii = 0; ii < def.length; ii++) { - req = def[ii]; - if (!(req instanceof Object)) - throw (new Error('definition must be an array of' + - 'objects')); - - keys = Object.keys(req); - if (keys.length != 1) - throw (new Error('definition entry must only have ' + - 'one key')); - - if (keys[0] in found) - throw (new Error('Specified name already ' + - 'specified: ' + keys[0])); - - if (!('type' in req[keys[0]])) - throw (new Error('missing required type definition')); - - key = ctParseType(req[keys[0]]['type']); - - /* - * We may have nested arrays, we need to check the validity of - * the types until the len field is undefined in key. However, - * each time len is defined we need to verify it is either an - * integer or corresponds to an already seen key. - */ - while (key['len'] !== undefined) { - if (isNaN(parseInt(key['len'], 10))) { - if (!(key['len'] in found)) - throw (new Error('Given an array ' + - 'length without a matching type')); - - } - - key = ctParseType(key['type']); - } - - /* Now we can validate if the type is valid */ - if (!(key['type'] in types)) - throw (new Error('type not found or typdefed: ' + - key['type'])); - - /* Check for any required fields */ - if (fields !== undefined) { - for (jj = 0; jj < fields.length; jj++) { - if (!(fields[jj] in req[keys[0]])) - throw (new Error('Missing required ' + - 'field: ' + fields[jj])); - } - } - - found[keys[0]] = true; - } -} - - -/* - * Create a new instance of the parser. Each parser has its own store of - * typedefs and endianness. Conf is an object with the following required - * values: - * - * endian Either 'big' or 'little' do determine the endianness we - * want to read from or write to. - * - * And the following optional values: - * - * char-type Valid options here are uint8 and int8. If uint8 is - * specified this changes the default behavior of a single - * char from being a buffer of a single character to being - * a uint8_t. If int8, it becomes an int8_t instead. - */ -function CTypeParser(conf) -{ - if (!conf) throw (new Error('missing required argument')); - - if (!('endian' in conf)) - throw (new Error('missing required endian value')); - - if (conf['endian'] != 'big' && conf['endian'] != 'little') - throw (new Error('Invalid endian type')); - - if ('char-type' in conf && (conf['char-type'] != 'uint8' && - conf['char-type'] != 'int8')) - throw (new Error('invalid option for char-type: ' + - conf['char-type'])); - - this.endian = conf['endian']; - this.types = ctGetBasicTypes(); - - /* - * There may be a more graceful way to do this, but this will have to - * serve. - */ - if ('char-type' in conf && conf['char-type'] == 'uint8') - this.types['char'] = this.types['uint8_t']; - - if ('char-type' in conf && conf['char-type'] == 'int8') - this.types['char'] = this.types['int8_t']; -} - -/* - * Sets the current endian value for the Parser. If the value is not valid, - * throws an Error. - * - * endian Either 'big' or 'little' do determine the endianness we - * want to read from or write to. - * - */ -CTypeParser.prototype.setEndian = function (endian) -{ - if (endian != 'big' && endian != 'little') - throw (new Error('invalid endian type, must be big or ' + - 'little')); - - this.endian = endian; -}; - -/* - * Returns the current value of the endian value for the parser. - */ -CTypeParser.prototype.getEndian = function () -{ - return (this.endian); -}; - -/* - * A user has requested to add a type, let us honor their request. Yet, if their - * request doth spurn us, send them unto the Hells which Dante describes. - * - * name The string for the type definition we're adding - * - * value Either a string that is a type/array name or an object - * that describes a struct. - */ -CTypeParser.prototype.typedef = function (name, value) -{ - var type; - - if (name === undefined) - throw (new (Error('missing required typedef argument: name'))); - - if (value === undefined) - throw (new (Error('missing required typedef argument: value'))); - - if (typeof (name) != 'string') - throw (new (Error('the name of a type must be a string'))); - - type = ctParseType(name); - - if (type['len'] !== undefined) - throw (new Error('Cannot have an array in the typedef name')); - - if (name in this.types) - throw (new Error('typedef name already present: ' + name)); - - if (typeof (value) != 'string' && !(value instanceof Array)) - throw (new Error('typedef value must either be a string or ' + - 'struct')); - - if (typeof (value) == 'string') { - type = ctParseType(value); - if (type['len'] !== undefined) { - if (isNaN(parseInt(type['len'], 10))) - throw (new (Error('typedef value must use ' + - 'fixed size array when outside of a ' + - 'struct'))); - } - - this.types[name] = value; - } else { - /* We have a struct, validate it */ - ctCheckReq(value, this.types); - this.types[name] = value; - } -}; - -/* - * Include all of the typedefs, but none of the built in types. This should be - * treated as read-only. - */ -CTypeParser.prototype.lstypes = function () -{ - var key; - var ret = {}; - - for (key in this.types) { - if (key in deftypes) - continue; - ret[key] = this.types[key]; - } - - return (ret); -}; - -/* - * Given a type string that may have array types that aren't numbers, try and - * fill them in from the values object. The object should be of the format where - * indexing into it should return a number for that type. - * - * str The type string - * - * values An object that can be used to fulfill type information - */ -function ctResolveArray(str, values) -{ - var ret = ''; - var type = ctParseType(str); - - while (type['len'] !== undefined) { - if (isNaN(parseInt(type['len'], 10))) { - if (typeof (values[type['len']]) != 'number') - throw (new Error('cannot sawp in non-number ' + - 'for array value')); - ret = '[' + values[type['len']] + ']' + ret; - } else { - ret = '[' + type['len'] + ']' + ret; - } - type = ctParseType(type['type']); - } - - ret = type['type'] + ret; - - return (ret); -} - -/* - * [private] Either the typedef resolves to another type string or to a struct. - * If it resolves to a struct, we just pass it off to read struct. If not, we - * can just pass it off to read entry. - */ -CTypeParser.prototype.resolveTypedef = function (type, dispatch, buffer, - offset, value) -{ - var pt; - - mod_assert.ok(type in this.types); - if (typeof (this.types[type]) == 'string') { - pt = ctParseType(this.types[type]); - if (dispatch == 'read') - return (this.readEntry(pt, buffer, offset)); - else if (dispatch == 'write') - return (this.writeEntry(value, pt, buffer, offset)); - else - throw (new Error('invalid dispatch type to ' + - 'resolveTypedef')); - } else { - if (dispatch == 'read') - return (this.readStruct(this.types[type], buffer, - offset)); - else if (dispatch == 'write') - return (this.writeStruct(value, this.types[type], - buffer, offset)); - else - throw (new Error('invalid dispatch type to ' + - 'resolveTypedef')); - } - -}; - -/* - * [private] Try and read in the specific entry. - */ -CTypeParser.prototype.readEntry = function (type, buffer, offset) -{ - var parse, len; - - /* - * Because we want to special case char[]s this is unfortunately - * a bit uglier than it really should be. We want to special - * case char[]s so that we return a node buffer, thus they are a - * first class type where as all other arrays just call into a - * generic array routine which calls their data-specific routine - * the specified number of times. - * - * The valid dispatch options we have are: - * - Array and char => char[] handler - * - Generic array handler - * - Generic typedef handler - * - Basic type handler - */ - if (type['len'] !== undefined) { - len = parseInt(type['len'], 10); - if (isNaN(len)) - throw (new Error('somehow got a non-numeric length')); - - if (type['type'] == 'char') - parse = this.types['char[]']['read'](len, - this.endian, buffer, offset); - else - parse = this.readArray(type['type'], - len, buffer, offset); - } else { - if (type['type'] in deftypes) - parse = this.types[type['type']]['read'](this.endian, - buffer, offset); - else - parse = this.resolveTypedef(type['type'], 'read', - buffer, offset); - } - - return (parse); -}; - -/* - * [private] Read an array of data - */ -CTypeParser.prototype.readArray = function (type, length, buffer, offset) -{ - var ii, ent, pt; - var baseOffset = offset; - var ret = new Array(length); - pt = ctParseType(type); - - for (ii = 0; ii < length; ii++) { - ent = this.readEntry(pt, buffer, offset); - offset += ent['size']; - ret[ii] = ent['value']; - } - - return ({ value: ret, size: offset - baseOffset }); -}; - -/* - * [private] Read a single struct in. - */ -CTypeParser.prototype.readStruct = function (def, buffer, offset) -{ - var parse, ii, type, entry, key; - var baseOffset = offset; - var ret = {}; - - /* Walk it and handle doing what's necessary */ - for (ii = 0; ii < def.length; ii++) { - key = Object.keys(def[ii])[0]; - entry = def[ii][key]; - - /* Resolve all array values */ - type = ctParseType(ctResolveArray(entry['type'], ret)); - - if ('offset' in entry) - offset = baseOffset + entry['offset']; - - parse = this.readEntry(type, buffer, offset); - - offset += parse['size']; - ret[key] = parse['value']; - } - - return ({ value: ret, size: (offset-baseOffset)}); -}; - -/* - * This is what we were born to do. We read the data from a buffer and return it - * in an object whose keys match the values from the object. - * - * def The array definition of the data to read in - * - * buffer The buffer to read data from - * - * offset The offset to start writing to - * - * Returns an object where each key corresponds to an entry in def and the value - * is the read value. - */ -CTypeParser.prototype.readData = function (def, buffer, offset) -{ - /* Sanity check for arguments */ - if (def === undefined) - throw (new Error('missing definition for what we should be' + - 'parsing')); - - if (buffer === undefined) - throw (new Error('missing buffer for what we should be ' + - 'parsing')); - - if (offset === undefined) - throw (new Error('missing offset for what we should be ' + - 'parsing')); - - /* Sanity check the object definition */ - ctCheckReq(def, this.types); - - return (this.readStruct(def, buffer, offset)['value']); -}; - -/* - * [private] Write out an array of data - */ -CTypeParser.prototype.writeArray = function (value, type, length, buffer, - offset) -{ - var ii, pt; - var baseOffset = offset; - if (!(value instanceof Array)) - throw (new Error('asked to write an array, but value is not ' + - 'an array')); - - if (value.length != length) - throw (new Error('asked to write array of length ' + length + - ' but that does not match value length: ' + value.length)); - - pt = ctParseType(type); - for (ii = 0; ii < length; ii++) - offset += this.writeEntry(value[ii], pt, buffer, offset); - - return (offset - baseOffset); -}; - -/* - * [private] Write the specific entry - */ -CTypeParser.prototype.writeEntry = function (value, type, buffer, offset) -{ - var len, ret; - - if (type['len'] !== undefined) { - len = parseInt(type['len'], 10); - if (isNaN(len)) - throw (new Error('somehow got a non-numeric length')); - - if (type['type'] == 'char') - ret = this.types['char[]']['write'](value, len, - this.endian, buffer, offset); - else - ret = this.writeArray(value, type['type'], - len, buffer, offset); - } else { - if (type['type'] in deftypes) - ret = this.types[type['type']]['write'](value, - this.endian, buffer, offset); - else - ret = this.resolveTypedef(type['type'], 'write', - buffer, offset, value); - } - - return (ret); -}; - -/* - * [private] Write a single struct out. - */ -CTypeParser.prototype.writeStruct = function (value, def, buffer, offset) -{ - var ii, entry, type, key; - var baseOffset = offset; - var vals = {}; - - for (ii = 0; ii < def.length; ii++) { - key = Object.keys(def[ii])[0]; - entry = def[ii][key]; - - type = ctParseType(ctResolveArray(entry['type'], vals)); - - if ('offset' in entry) - offset = baseOffset + entry['offset']; - - offset += this.writeEntry(value[ii], type, buffer, offset); - /* Now that we've written it out, we can use it for arrays */ - vals[key] = value[ii]; - } - - return (offset); -}; - -/* - * Unfortunately, we're stuck with the sins of an initial poor design. Because - * of that, we are going to have to support the old way of writing data via - * writeData. There we insert the values that you want to write into the - * definition. A little baroque. Internally, we use the new model. So we need to - * just get those values out of there. But to maintain the principle of least - * surprise, we're not going to modify the input data. - */ -function getValues(def) -{ - var ii, out, key; - out = []; - for (ii = 0; ii < def.length; ii++) { - key = Object.keys(def[ii])[0]; - mod_assert.ok('value' in def[ii][key]); - out.push(def[ii][key]['value']); - } - - return (out); -} - -/* - * This is the second half of what we were born to do, write out the data - * itself. Historically this function required you to put your values in the - * definition section. This was not the smartest thing to do and a bit of an - * oversight to be honest. As such, this function now takes a values argument. - * If values is non-null and non-undefined, it will be used to determine the - * values. This means that the old method is still supported, but is no longer - * acceptable. - * - * def The array definition of the data to write out with - * values - * - * buffer The buffer to write to - * - * offset The offset in the buffer to write to - * - * values An array of values to write. - */ -CTypeParser.prototype.writeData = function (def, buffer, offset, values) -{ - var hv; - - if (def === undefined) - throw (new Error('missing definition for what we should be' + - 'parsing')); - - if (buffer === undefined) - throw (new Error('missing buffer for what we should be ' + - 'parsing')); - - if (offset === undefined) - throw (new Error('missing offset for what we should be ' + - 'parsing')); - - hv = (values != null && values != undefined); - if (hv) { - if (!Array.isArray(values)) - throw (new Error('missing values for writing')); - ctCheckReq(def, this.types); - } else { - ctCheckReq(def, this.types, [ 'value' ]); - } - - this.writeStruct(hv ? values : getValues(def), def, buffer, offset); -}; - -/* - * Functions to go to and from 64 bit numbers in a way that is compatible with - * Javascript limitations. There are two sets. One where the user is okay with - * an approximation and one where they are definitely not okay with an - * approximation. - */ - -/* - * Attempts to convert an array of two integers returned from rsint64 / ruint64 - * into an absolute 64 bit number. If however the value would exceed 2^52 this - * will instead throw an error. The mantissa in a double is a 52 bit number and - * rather than potentially give you a value that is an approximation this will - * error. If you would rather an approximation, please see toApprox64. - * - * val An array of two 32-bit integers - */ -function toAbs64(val) -{ - if (val === undefined) - throw (new Error('missing required arg: value')); - - if (!Array.isArray(val)) - throw (new Error('value must be an array')); - - if (val.length != 2) - throw (new Error('value must be an array of length 2')); - - /* We have 20 bits worth of precision in this range */ - if (val[0] >= 0x100000) - throw (new Error('value would become approximated')); - - return (val[0] * Math.pow(2, 32) + val[1]); -} - -/* - * Will return the 64 bit value as returned in an array from rsint64 / ruint64 - * to a value as close as it can. Note that Javascript stores all numbers as a - * double and the mantissa only has 52 bits. Thus this version may approximate - * the value. - * - * val An array of two 32-bit integers - */ -function toApprox64(val) -{ - if (val === undefined) - throw (new Error('missing required arg: value')); - - if (!Array.isArray(val)) - throw (new Error('value must be an array')); - - if (val.length != 2) - throw (new Error('value must be an array of length 2')); - - return (Math.pow(2, 32) * val[0] + val[1]); -} - -function parseCTF(json, conf) -{ - var ctype = new CTypeParser(conf); - mod_ctf.ctfParseJson(json, ctype); - - return (ctype); -} - -/* - * Export the few things we actually want to. Currently this is just the CType - * Parser and ctio. - */ -exports.Parser = CTypeParser; -exports.toAbs64 = toAbs64; -exports.toApprox64 = toApprox64; - -exports.parseCTF = parseCTF; - -exports.ruint8 = mod_ctio.ruint8; -exports.ruint16 = mod_ctio.ruint16; -exports.ruint32 = mod_ctio.ruint32; -exports.ruint64 = mod_ctio.ruint64; -exports.wuint8 = mod_ctio.wuint8; -exports.wuint16 = mod_ctio.wuint16; -exports.wuint32 = mod_ctio.wuint32; -exports.wuint64 = mod_ctio.wuint64; - -exports.rsint8 = mod_ctio.rsint8; -exports.rsint16 = mod_ctio.rsint16; -exports.rsint32 = mod_ctio.rsint32; -exports.rsint64 = mod_ctio.rsint64; -exports.wsint8 = mod_ctio.wsint8; -exports.wsint16 = mod_ctio.wsint16; -exports.wsint32 = mod_ctio.wsint32; -exports.wsint64 = mod_ctio.wsint64; - -exports.rfloat = mod_ctio.rfloat; -exports.rdouble = mod_ctio.rdouble; -exports.wfloat = mod_ctio.wfloat; -exports.wdouble = mod_ctio.wdouble; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype deleted file mode 100644 index 3f94986a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype +++ /dev/null @@ -1,241 +0,0 @@ -'\" te -.\" Copyright (c) 2011, Robert Mustacchi. All Rights Reserved. -.\" Copyright (c) 2011, Joyent, Inc. All Rights Reserved. -.\" -.\" 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. -.TH CTIO 3CTYPE "December 12, 2011" -.SH NAME -ctio, ruint8, ruint16, ruint32, ruint64, wuint8, wuint16, wuint32, wuint64, -rsint8, rsint16, rsint32, rsint64, wsint8, wsint16, wsint32, wsint64, rfloat, -rdouble, wfloat, wdouble \- integer and float operations -.SH SYNOPSIS -.LP -.nf -var mod_ctype = require('ctype'); - -\fBNumber\fR \fBmod_ctype.ruint8\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber\fR \fBmod_ctype.ruint16\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber\fR \fBmod_ctype.ruint32\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber[2]\fR \fBmod_ctype.ruint64\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber\fR \fBmod_ctype.rsint8\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber\fR \fBmod_ctype.rsint16\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber\fR \fBmod_ctype.rsint32\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber[2]\fR \fBmod_ctype.rsint64\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber\fR \fBmod_ctype.rfloat\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber\fR \fBmod_ctype.rdouble\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wuint8\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wuint16\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wuint32\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wuint64\fR(\fBNumber[2]\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wsint8\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wsint16\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wsint32\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wsint64\fR(\fBNumber[2]\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wfloat\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wdouble\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.SH DESCRIPTION -.sp -.LP -The argument \fIbuf\fR refers to a valid buffer (from calling new Buffer()). The -argument \fIendian\fR is either the string 'big' or 'little' and controls -whether the data in the buffer is interpreted as big or little endian. The argument -\fIoffset\fR indicates the starting index into the buffer to read or write. All -functions ensure that starting at \fIoffset\fR does not overflow the end of the -buffer. The argument \fIvalue\fR is a Number that is the valid type for the -specific function. All functions that take \fIvalue\fR as an argument, verify -that the passed value is valid. - -.SS "\fBruint8()\fR, \fBruint16()\fR, \fBruint32()\fR" -.sp -.LP -The \fBruint8()\fR, \fBruint16()\fR, and \fBruint32()\fR functions read an 8, -16, and 32-bit unsigned value from \fIbuf\fR and return it. The value read is -influenced by the values of \fIoffset\fR and \fRendian\fI. - - -.SS "\fBrsint8()\fR, \fBrsint16()\fR, \fBrsint32()\fR" -.sp -.LP -The \fBruint8()\fR, \fBruint16()\fR, and \fBruint32()\fR functions work just as -\fBruint8()\fR, \fBruint16()\fR, and \fBruint32()\fR, except they return signed -integers. - -.SS "\fBruint64()\fR, \fBrsint64()\fR" -.sp -.LP -The \fBruint64()\fR and \fBrsint64()\fR functions read unsigned and signed 64 -bit integers respectively from \fBbuf\fR. Due to the limitations of ECMAScript's -\fBNumber\fR type, they cannot be stored as one value without a loss of -precision. Instead of returning the values as a single \fBNumber\fR, the -functions return an array of two numbers. The first entry always contains the -upper 32-bits and the second value contains the lower 32-bits. The lossy -transformation into a number would be \fIres[0]*Math.pow(2,32)+res[1]\fR. -Note that, unless an entry is zero, both array entries are guaranteed to have -the same sign. - -.SS "\fBwuint8()\fR, \fBwuint16()\fR, \fBwuint32()\fR" -.sp -.LP -The functions \fBwuint8()\fR, \fBwuint16()\fR, and \fBwuint32()\fR modify the -contents of \fBbuf\fR by writing an 8, 16, and 32-bit unsigned integer -respectively to \fBbuf\fR. It is illegal to pass a number that is not an integer -within the domain of the integer size, for example, for \fBwuint8()\fR the valid -range is \fB[0, 255]\fR. The value will be written in either big or little -endian format based upon the value of \fBendian\fR. - - -.SS "\fBwsint8()\fR, \fBwsint16()\fR, \fBwsint32()\fR" -.sp -.LP -The functions \fBwsint8()\fR, \fBwsint16()\fR, and \fBwsint32()\fR function -identically to the functions \fBwuint8()\fR, \fBwuint16()\fR, and -\fBwuint32()\fR except that they the valid domain for \fBvalue\fR is that of a -signed number instead of an unsigned number. For example the \fBwsint8()\fR has -a domain of \fB[-128, 127]\fR. - -.SS "\fBwuint64()\fR, \fBwsint64()\fR" -.sp -.LP -The functions \fBwuint64()\fR and \fBswint64()\fR write out 64-bit unsigned and -signed integers to \fBbuf\fR. The \fBvalue\fR argument must be in the same -format as described in \fBruint64()\fR and \fBrsint64()\fR. - -.SS "\fBrfloat()\fR, \fBrdouble()\fR" -.sp -.LP -The functions "\fBrfloat()\fR and \fBrdouble()\fR" work like the other read -functions, except that they read a single precision and double precision -IEEE-754 floating point value instead. - -.SS "\fBwfloat()\fR, \fBwdouble()\fR" -.sp -.LP -The functions "\fBrfloat()\fR and \fBrdouble()\fR" work like the other write -functions, except that the domain for a float is that of a single precision 4 -byte value. The domain for a double is any \fBNumber\fR in ECMAScript, which is -defined to be represented by a double. - -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Committed -_ -MT-Level See below. -_ -Standard Not standardized. -.TE - -.sp -.LP - -All functions are MT-safe in so far as there aren't shared memory MT concerns in -most node programs. If one where to concoct such an environment, these functions -wouldn't be MT-safe. - -.SH SEE ALSO -.sp -.LP diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json deleted file mode 100644 index 90d917e2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "ctype", - "version": "0.5.2", - "description": "read and write binary structures and data types", - "homepage": "https://github.com/rmustacc/node-ctype", - "author": { - "name": "Robert Mustacchi", - "email": "rm@fingolfin.org" - }, - "engines": { - "node": ">= 0.4" - }, - "main": "ctype.js", - "readme": "Node-CType is a way to read and write binary data in structured and easy to use\nformat. Its name comes from the C header file.\n\nTo get started, simply clone the repository or use npm to install it. Once it is\nthere, simply require it.\n\ngit clone git://github.com/rmustacc/node-ctype\nnpm install ctype\nvar mod_ctype = require('ctype')\n\n\nThere are two APIs that you can use, depending on what abstraction you'd like.\nThe low level API let's you read and write individual integers and floats from\nbuffers. The higher level API let's you read and write structures of these. To\nillustrate this, let's looks look at how we would read and write a binary\nencoded x,y point.\n\nIn C we would define this structure as follows:\n\ntypedef struct point {\n\tuint16_t\tp_x;\n\tuint16_t\tp_y;\n} point_t;\n\nTo read a binary encoded point from a Buffer, we first need to create a CType\nparser (where we specify the endian and other options) and add the typedef.\n\nvar parser = new mod_ctype.Parser({ endian: 'big' });\nparser.typedef('point_t', [\n\t{ x: { type: 'uint16_t' } },\n\t{ y: { type: 'uint16_t' } }\n]);\n\nFrom here, given a buffer buf and an offset into it, we can read a point.\n\nvar out = parser.readData([ { point: { type: 'point_t' } } ], buffer, 0);\nconsole.log(out);\n{ point: { x: 23, y: 42 } }\n\nAnother way to get the same information would be to use the low level methods.\nNote that these require you to manually deal with the offset. Here's how we'd\nget the same values of x and y from the buffer.\n\nvar x = mod_ctype.ruint16(buf, 'big', 0);\nvar y = mod_ctype.ruint16(buf, 'big', 2);\nconsole.log(x + ', ' + y);\n23, 42\n\nThe true power of this API comes from the ability to define and nest typedefs,\njust as you would in C. By default, the following types are defined by default.\nNote that they return a Number, unless indicated otherwise.\n\n * int8_t\n * int16_t\n * int32_t\n * int64_t (returns an array where val[0] << 32 + val[1] would be the value)\n * uint8_t\n * uint16_t\n * uint32_t\n * uint64_t (returns an array where val[0] << 32 + val[1] would be the value)\n * float\n * double\n * char (either returns a buffer with that character or a uint8_t)\n * char[] (returns an object with the buffer and the number of characters read which is either the total amount requested or until the first 0)\n\n\nctf2json integration:\n\nNode-CType supports consuming the output of ctf2json. Once you read in a JSON file,\nall you have to do to add all the definitions it contains is:\n\nvar data, parser;\ndata = JSON.parse(parsedJSONData);\nparser = mod_ctype.parseCTF(data, { endian: 'big' });\n\nFor more documentation, see the file README.old. Full documentation is in the\nprocess of being rewritten as a series of manual pages which will be available\nin the repository and online for viewing.\n\nTo read the ctio manual page simple run, from the root of the workspace:\n\nman -Mman -s 3ctype ctio\n", - "readmeFilename": "README", - "_id": "ctype@0.5.2", - "dist": { - "shasum": "c2ddce3ef5e24701c870d46f42c33b116c8f67da" - }, - "_from": "ctype@0.5.2", - "_resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsl.conf b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsl.conf deleted file mode 100755 index 845f367a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsl.conf +++ /dev/null @@ -1,129 +0,0 @@ -# -# Configuration File for JavaScript Lint 0.3.0 -# Developed by Matthias Miller (http://www.JavaScriptLint.com) -# -# This configuration file can be used to lint a collection of scripts, or to enable -# or disable warnings for scripts that are linted via the command line. -# - -### Warnings -# Enable or disable warnings based on requirements. -# Use "+WarningName" to display or "-WarningName" to suppress. -# -+no_return_value # function {0} does not always return a value -+duplicate_formal # duplicate formal argument {0} -+equal_as_assign # test for equality (==) mistyped as assignment (=)?{0} -+var_hides_arg # variable {0} hides argument -+redeclared_var # redeclaration of {0} {1} -+anon_no_return_value # anonymous function does not always return a value -+missing_semicolon # missing semicolon -+meaningless_block # meaningless block; curly braces have no impact -+comma_separated_stmts # multiple statements separated by commas (use semicolons?) -+unreachable_code # unreachable code -+missing_break # missing break statement -+missing_break_for_last_case # missing break statement for last case in switch -+comparison_type_conv # comparisons against null, 0, true, false, or an empty string allowing implicit type conversion (use === or !==) --inc_dec_within_stmt # increment (++) and decrement (--) operators used as part of greater statement -+useless_void # use of the void type may be unnecessary (void is always undefined) --useless_quotes # quotation marks are unnecessary -+multiple_plus_minus # unknown order of operations for successive plus (e.g. x+++y) or minus (e.g. x---y) signs -+use_of_label # use of label --block_without_braces # block statement without curly braces -+leading_decimal_point # leading decimal point may indicate a number or an object member -+trailing_decimal_point # trailing decimal point may indicate a number or an object member --octal_number # leading zeros make an octal number -+nested_comment # nested comment -+misplaced_regex # regular expressions should be preceded by a left parenthesis, assignment, colon, or comma -+ambiguous_newline # unexpected end of line; it is ambiguous whether these lines are part of the same statement -+empty_statement # empty statement or extra semicolon --missing_option_explicit # the "option explicit" control comment is missing -+partial_option_explicit # the "option explicit" control comment, if used, must be in the first script tag -+dup_option_explicit # duplicate "option explicit" control comment -+useless_assign # useless assignment -+ambiguous_nested_stmt # block statements containing block statements should use curly braces to resolve ambiguity -+ambiguous_else_stmt # the else statement could be matched with one of multiple if statements (use curly braces to indicate intent) -+missing_default_case # missing default case in switch statement -+duplicate_case_in_switch # duplicate case in switch statements -+default_not_at_end # the default case is not at the end of the switch statement -+legacy_cc_not_understood # couldn't understand control comment using /*@keyword@*/ syntax -+jsl_cc_not_understood # couldn't understand control comment using /*jsl:keyword*/ syntax -+useless_comparison # useless comparison; comparing identical expressions -+with_statement # with statement hides undeclared variables; use temporary variable instead -+trailing_comma_in_array # extra comma is not recommended in array initializers -+assign_to_function_call # assignment to a function call -+parseint_missing_radix # parseInt missing radix parameter --unreferenced_argument # argument declared but never referenced: {name} - -### Output format -# Customize the format of the error message. -# __FILE__ indicates current file path -# __FILENAME__ indicates current file name -# __LINE__ indicates current line -# __ERROR__ indicates error message -# -# Visual Studio syntax (default): -+output-format __FILE__(__LINE__): __ERROR__ -# Alternative syntax: -#+output-format __FILE__:__LINE__: __ERROR__ - - -### Context -# Show the in-line position of the error. -# Use "+context" to display or "-context" to suppress. -# -+context - - -### Semicolons -# By default, assignments of an anonymous function to a variable or -# property (such as a function prototype) must be followed by a semicolon. -# -#+lambda_assign_requires_semicolon # deprecated setting - - -### Control Comments -# Both JavaScript Lint and the JScript interpreter confuse each other with the syntax for -# the /*@keyword@*/ control comments and JScript conditional comments. (The latter is -# enabled in JScript with @cc_on@). The /*jsl:keyword*/ syntax is preferred for this reason, -# although legacy control comments are enabled by default for backward compatibility. -# -+legacy_control_comments - - -### JScript Function Extensions -# JScript allows member functions to be defined like this: -# function MyObj() { /*constructor*/ } -# function MyObj.prototype.go() { /*member function*/ } -# -# It also allows events to be attached like this: -# function window::onload() { /*init page*/ } -# -# This is a Microsoft-only JavaScript extension. Enable this setting to allow them. -# -#-jscript_function_extensions # deprecated setting - - -### Defining identifiers -# By default, "option explicit" is enabled on a per-file basis. -# To enable this for all files, use "+always_use_option_explicit" --always_use_option_explicit - -# Define certain identifiers of which the lint is not aware. -# (Use this in conjunction with the "undeclared identifier" warning.) -# -# Common uses for webpages might be: -#+define window -#+define document -+define require -+define exports -+define console -+define Buffer -+define JSON - -### Files -# Specify which files to lint -# Use "+recurse" to enable recursion (disabled by default). -# To add a set of files, use "+process FileName", "+process Folder\Path\*.js", -# or "+process Folder\Path\*.htm". -# -#+process jsl-test.js diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle deleted file mode 100755 index 96c72b6d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle +++ /dev/null @@ -1,839 +0,0 @@ -#!/usr/bin/env perl -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright 2008 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# Copyright 2011 Joyent, Inc. All rights reserved. -# -# jsstyle - check for some common stylistic errors. -# -# jsstyle is a sort of "lint" for Javascript coding style. This tool is -# derived from the cstyle tool, used to check for the style used in the -# Solaris kernel, sometimes known as "Bill Joy Normal Form". -# -# There's a lot this can't check for, like proper indentation of code -# blocks. There's also a lot more this could check for. -# -# A note to the non perl literate: -# -# perl regular expressions are pretty much like egrep -# regular expressions, with the following special symbols -# -# \s any space character -# \S any non-space character -# \w any "word" character [a-zA-Z0-9_] -# \W any non-word character -# \d a digit [0-9] -# \D a non-digit -# \b word boundary (between \w and \W) -# \B non-word boundary -# - -require 5.0; -use IO::File; -use Getopt::Std; -use strict; - -my $usage = -"usage: jsstyle [-chvC] [-o constructs] file ... - -c check continuation indentation inside functions - -h perform heuristic checks that are sometimes wrong - -v verbose - -C don't check anything in header block comments - -o constructs - allow a comma-seperated list of optional constructs: - doxygen allow doxygen-style block comments (/** /*!) - splint allow splint-style lint comments (/*@ ... @*/) -"; - -my %opts; - -if (!getopts("cho:vC", \%opts)) { - print $usage; - exit 2; -} - -my $check_continuation = $opts{'c'}; -my $heuristic = $opts{'h'}; -my $verbose = $opts{'v'}; -my $ignore_hdr_comment = $opts{'C'}; - -my $doxygen_comments = 0; -my $splint_comments = 0; - -if (defined($opts{'o'})) { - for my $x (split /,/, $opts{'o'}) { - if ($x eq "doxygen") { - $doxygen_comments = 1; - } elsif ($x eq "splint") { - $splint_comments = 1; - } else { - print "jsstyle: unrecognized construct \"$x\"\n"; - print $usage; - exit 2; - } - } -} - -my ($filename, $line, $prev); # shared globals - -my $fmt; -my $hdr_comment_start; - -if ($verbose) { - $fmt = "%s: %d: %s\n%s\n"; -} else { - $fmt = "%s: %d: %s\n"; -} - -if ($doxygen_comments) { - # doxygen comments look like "/*!" or "/**"; allow them. - $hdr_comment_start = qr/^\s*\/\*[\!\*]?$/; -} else { - $hdr_comment_start = qr/^\s*\/\*$/; -} - -# Note, following must be in single quotes so that \s and \w work right. -my $lint_re = qr/\/\*(?: - jsl:\w+?|ARGSUSED[0-9]*|NOTREACHED|LINTLIBRARY|VARARGS[0-9]*| - CONSTCOND|CONSTANTCOND|CONSTANTCONDITION|EMPTY| - FALLTHRU|FALLTHROUGH|LINTED.*?|PRINTFLIKE[0-9]*| - PROTOLIB[0-9]*|SCANFLIKE[0-9]*|JSSTYLED.*? - )\*\//x; - -my $splint_re = qr/\/\*@.*?@\*\//x; - -my $err_stat = 0; # exit status - -if ($#ARGV >= 0) { - foreach my $arg (@ARGV) { - my $fh = new IO::File $arg, "r"; - if (!defined($fh)) { - printf "%s: cannot open\n", $arg; - } else { - &jsstyle($arg, $fh); - close $fh; - } - } -} else { - &jsstyle("<stdin>", *STDIN); -} -exit $err_stat; - -my $no_errs = 0; # set for JSSTYLED-protected lines - -sub err($) { - my ($error) = @_; - unless ($no_errs) { - printf $fmt, $filename, $., $error, $line; - $err_stat = 1; - } -} - -sub err_prefix($$) { - my ($prevline, $error) = @_; - my $out = $prevline."\n".$line; - unless ($no_errs) { - printf $fmt, $filename, $., $error, $out; - $err_stat = 1; - } -} - -sub err_prev($) { - my ($error) = @_; - unless ($no_errs) { - printf $fmt, $filename, $. - 1, $error, $prev; - $err_stat = 1; - } -} - -sub jsstyle($$) { - -my ($fn, $filehandle) = @_; -$filename = $fn; # share it globally - -my $in_cpp = 0; -my $next_in_cpp = 0; - -my $in_comment = 0; -my $in_header_comment = 0; -my $comment_done = 0; -my $in_function = 0; -my $in_function_header = 0; -my $in_declaration = 0; -my $note_level = 0; -my $nextok = 0; -my $nocheck = 0; - -my $in_string = 0; - -my ($okmsg, $comment_prefix); - -$line = ''; -$prev = ''; -reset_indent(); - -line: while (<$filehandle>) { - s/\r?\n$//; # strip return and newline - - # save the original line, then remove all text from within - # double or single quotes, we do not want to check such text. - - $line = $_; - - # - # C allows strings to be continued with a backslash at the end of - # the line. We translate that into a quoted string on the previous - # line followed by an initial quote on the next line. - # - # (we assume that no-one will use backslash-continuation with character - # constants) - # - $_ = '"' . $_ if ($in_string && !$nocheck && !$in_comment); - - # - # normal strings and characters - # - s/'([^\\']|\\.)*'/\'\'/g; - s/"([^\\"]|\\.)*"/\"\"/g; - - # - # detect string continuation - # - if ($nocheck || $in_comment) { - $in_string = 0; - } else { - # - # Now that all full strings are replaced with "", we check - # for unfinished strings continuing onto the next line. - # - $in_string = - (s/([^"](?:"")*)"([^\\"]|\\.)*\\$/$1""/ || - s/^("")*"([^\\"]|\\.)*\\$/""/); - } - - # - # figure out if we are in a cpp directive - # - $in_cpp = $next_in_cpp || /^\s*#/; # continued or started - $next_in_cpp = $in_cpp && /\\$/; # only if continued - - # strip off trailing backslashes, which appear in long macros - s/\s*\\$//; - - # an /* END JSSTYLED */ comment ends a no-check block. - if ($nocheck) { - if (/\/\* *END *JSSTYLED *\*\//) { - $nocheck = 0; - } else { - reset_indent(); - next line; - } - } - - # a /*JSSTYLED*/ comment indicates that the next line is ok. - if ($nextok) { - if ($okmsg) { - err($okmsg); - } - $nextok = 0; - $okmsg = 0; - if (/\/\* *JSSTYLED.*\*\//) { - /^.*\/\* *JSSTYLED *(.*) *\*\/.*$/; - $okmsg = $1; - $nextok = 1; - } - $no_errs = 1; - } elsif ($no_errs) { - $no_errs = 0; - } - - # check length of line. - # first, a quick check to see if there is any chance of being too long. - if (($line =~ tr/\t/\t/) * 7 + length($line) > 80) { - # yes, there is a chance. - # replace tabs with spaces and check again. - my $eline = $line; - 1 while $eline =~ - s/\t+/' ' x (length($&) * 8 - length($`) % 8)/e; - if (length($eline) > 80) { - err("line > 80 characters"); - } - } - - # ignore NOTE(...) annotations (assumes NOTE is on lines by itself). - if ($note_level || /\b_?NOTE\s*\(/) { # if in NOTE or this is NOTE - s/[^()]//g; # eliminate all non-parens - $note_level += s/\(//g - length; # update paren nest level - next; - } - - # a /* BEGIN JSSTYLED */ comment starts a no-check block. - if (/\/\* *BEGIN *JSSTYLED *\*\//) { - $nocheck = 1; - } - - # a /*JSSTYLED*/ comment indicates that the next line is ok. - if (/\/\* *JSSTYLED.*\*\//) { - /^.*\/\* *JSSTYLED *(.*) *\*\/.*$/; - $okmsg = $1; - $nextok = 1; - } - if (/\/\/ *JSSTYLED/) { - /^.*\/\/ *JSSTYLED *(.*)$/; - $okmsg = $1; - $nextok = 1; - } - - # universal checks; apply to everything - if (/\t +\t/) { - err("spaces between tabs"); - } - if (/ \t+ /) { - err("tabs between spaces"); - } - if (/\s$/) { - err("space or tab at end of line"); - } - if (/[^ \t(]\/\*/ && !/\w\(\/\*.*\*\/\);/) { - err("comment preceded by non-blank"); - } - - # is this the beginning or ending of a function? - # (not if "struct foo\n{\n") - if (/^{$/ && $prev =~ /\)\s*(const\s*)?(\/\*.*\*\/\s*)?\\?$/) { - $in_function = 1; - $in_declaration = 1; - $in_function_header = 0; - $prev = $line; - next line; - } - if (/^}\s*(\/\*.*\*\/\s*)*$/) { - if ($prev =~ /^\s*return\s*;/) { - err_prev("unneeded return at end of function"); - } - $in_function = 0; - reset_indent(); # we don't check between functions - $prev = $line; - next line; - } - if (/^\w*\($/) { - $in_function_header = 1; - } - - # a blank line terminates the declarations within a function. - # XXX - but still a problem in sub-blocks. - if ($in_declaration && /^$/) { - $in_declaration = 0; - } - - if ($comment_done) { - $in_comment = 0; - $in_header_comment = 0; - $comment_done = 0; - } - # does this looks like the start of a block comment? - if (/$hdr_comment_start/) { - if (!/^\t*\/\*/) { - err("block comment not indented by tabs"); - } - $in_comment = 1; - /^(\s*)\//; - $comment_prefix = $1; - if ($comment_prefix eq "") { - $in_header_comment = 1; - } - $prev = $line; - next line; - } - # are we still in the block comment? - if ($in_comment) { - if (/^$comment_prefix \*\/$/) { - $comment_done = 1; - } elsif (/\*\//) { - $comment_done = 1; - err("improper block comment close") - unless ($ignore_hdr_comment && $in_header_comment); - } elsif (!/^$comment_prefix \*[ \t]/ && - !/^$comment_prefix \*$/) { - err("improper block comment") - unless ($ignore_hdr_comment && $in_header_comment); - } - } - - if ($in_header_comment && $ignore_hdr_comment) { - $prev = $line; - next line; - } - - # check for errors that might occur in comments and in code. - - # allow spaces to be used to draw pictures in header comments. - #if (/[^ ] / && !/".* .*"/ && !$in_header_comment) { - # err("spaces instead of tabs"); - #} - #if (/^ / && !/^ \*[ \t\/]/ && !/^ \*$/ && - # (!/^ \w/ || $in_function != 0)) { - # err("indent by spaces instead of tabs"); - #} - if (/^ {2,}/ && !/^ [^ ]/) { - err("indent by spaces instead of tabs"); - } - if (/^\t+ [^ \t\*]/ || /^\t+ \S/ || /^\t+ \S/) { - err("continuation line not indented by 4 spaces"); - } - - if (/^\s*\/\*./ && !/^\s*\/\*.*\*\// && !/$hdr_comment_start/) { - err("improper first line of block comment"); - } - - if ($in_comment) { # still in comment, don't do further checks - $prev = $line; - next line; - } - - if ((/[^(]\/\*\S/ || /^\/\*\S/) && - !(/$lint_re/ || ($splint_comments && /$splint_re/))) { - err("missing blank after open comment"); - } - if (/\S\*\/[^)]|\S\*\/$/ && - !(/$lint_re/ || ($splint_comments && /$splint_re/))) { - err("missing blank before close comment"); - } - if (/\/\/\S/) { # C++ comments - err("missing blank after start comment"); - } - # check for unterminated single line comments, but allow them when - # they are used to comment out the argument list of a function - # declaration. - if (/\S.*\/\*/ && !/\S.*\/\*.*\*\// && !/\(\/\*/) { - err("unterminated single line comment"); - } - - if (/^(#else|#endif|#include)(.*)$/) { - $prev = $line; - next line; - } - - # - # delete any comments and check everything else. Note that - # ".*?" is a non-greedy match, so that we don't get confused by - # multiple comments on the same line. - # - s/\/\*.*?\*\///g; - s/\/\/.*$//; # C++ comments - - # delete any trailing whitespace; we have already checked for that. - s/\s*$//; - - # following checks do not apply to text in comments. - if (/"/) { - err("literal string using double-quote instead of single"); - } - - if (/[^=!<>\s][!<>=]=/ || /[^<>!=][!<>=]==?[^\s,=]/ || - (/[^->]>[^,=>\s]/ && !/[^->]>$/) || - (/[^<]<[^,=<\s]/ && !/[^<]<$/) || - /[^<\s]<[^<]/ || /[^->\s]>[^>]/) { - err("missing space around relational operator"); - } - if (/\S>>=/ || /\S<<=/ || />>=\S/ || /<<=\S/ || /\S[-+*\/&|^%]=/ || - (/[^-+*\/&|^%!<>=\s]=[^=]/ && !/[^-+*\/&|^%!<>=\s]=$/) || - (/[^!<>=]=[^=\s]/ && !/[^!<>=]=$/)) { - # XXX - should only check this for C++ code - # XXX - there are probably other forms that should be allowed - if (!/\soperator=/) { - err("missing space around assignment operator"); - } - } - if (/[,;]\S/ && !/\bfor \(;;\)/) { - err("comma or semicolon followed by non-blank"); - } - # allow "for" statements to have empty "while" clauses - if (/\s[,;]/ && !/^[\t]+;$/ && !/^\s*for \([^;]*; ;[^;]*\)/) { - err("comma or semicolon preceded by blank"); - } - if (/^\s*(&&|\|\|)/) { - err("improper boolean continuation"); - } - if (/\S *(&&|\|\|)/ || /(&&|\|\|) *\S/) { - err("more than one space around boolean operator"); - } - if (/\b(delete|typeof|instanceOf|throw|with|catch|new|function|in|for|if|while|switch|return|case)\(/) { - err("missing space between keyword and paren"); - } - if (/(\b(catch|for|if|with|while|switch|return)\b.*){2,}/) { - # multiple "case" and "sizeof" allowed - err("more than one keyword on line"); - } - if (/\b(delete|typeof|instanceOf|with|throw|catch|new|function|in|for|if|while|switch|return|case)\s\s+\(/ && - !/^#if\s+\(/) { - err("extra space between keyword and paren"); - } - # try to detect "func (x)" but not "if (x)" or - # "#define foo (x)" or "int (*func)();" - if (/\w\s\(/) { - my $s = $_; - # strip off all keywords on the line - s/\b(delete|typeof|instanceOf|throw|with|catch|new|function|in|for|if|while|switch|return|case)\s\(/XXX(/g; - s/#elif\s\(/XXX(/g; - s/^#define\s+\w+\s+\(/XXX(/; - # do not match things like "void (*f)();" - # or "typedef void (func_t)();" - s/\w\s\(+\*/XXX(*/g; - s/\b(void)\s+\(+/XXX(/og; - if (/\w\s\(/) { - err("extra space between function name and left paren"); - } - $_ = $s; - } - - if (/^\s*return\W[^;]*;/ && !/^\s*return\s*\(.*\);/) { - err("unparenthesized return expression"); - } - if (/\btypeof\b/ && !/\btypeof\s*\(.*\)/) { - err("unparenthesized typeof expression"); - } - if (/\(\s/) { - err("whitespace after left paren"); - } - # allow "for" statements to have empty "continue" clauses - if (/\s\)/ && !/^\s*for \([^;]*;[^;]*; \)/) { - err("whitespace before right paren"); - } - if (/^\s*\(void\)[^ ]/) { - err("missing space after (void) cast"); - } - if (/\S{/ && !/({|\(){/) { - err("missing space before left brace"); - } - if ($in_function && /^\s+{/ && - ($prev =~ /\)\s*$/ || $prev =~ /\bstruct\s+\w+$/)) { - err("left brace starting a line"); - } - if (/}(else|while)/) { - err("missing space after right brace"); - } - if (/}\s\s+(else|while)/) { - err("extra space after right brace"); - } - if (/^\s+#/) { - err("preprocessor statement not in column 1"); - } - if (/^#\s/) { - err("blank after preprocessor #"); - } - - # - # We completely ignore, for purposes of indentation: - # * lines outside of functions - # * preprocessor lines - # - if ($check_continuation && $in_function && !$in_cpp) { - process_indent($_); - } - - if ($heuristic) { - # cannot check this everywhere due to "struct {\n...\n} foo;" - if ($in_function && !$in_declaration && - /}./ && !/}\s+=/ && !/{.*}[;,]$/ && !/}(\s|)*$/ && - !/} (else|while)/ && !/}}/) { - err("possible bad text following right brace"); - } - # cannot check this because sub-blocks in - # the middle of code are ok - if ($in_function && /^\s+{/) { - err("possible left brace starting a line"); - } - } - if (/^\s*else\W/) { - if ($prev =~ /^\s*}$/) { - err_prefix($prev, - "else and right brace should be on same line"); - } - } - $prev = $line; -} - -if ($prev eq "") { - err("last line in file is blank"); -} - -} - -# -# Continuation-line checking -# -# The rest of this file contains the code for the continuation checking -# engine. It's a pretty simple state machine which tracks the expression -# depth (unmatched '('s and '['s). -# -# Keep in mind that the argument to process_indent() has already been heavily -# processed; all comments have been replaced by control-A, and the contents of -# strings and character constants have been elided. -# - -my $cont_in; # currently inside of a continuation -my $cont_off; # skipping an initializer or definition -my $cont_noerr; # suppress cascading errors -my $cont_start; # the line being continued -my $cont_base; # the base indentation -my $cont_first; # this is the first line of a statement -my $cont_multiseg; # this continuation has multiple segments - -my $cont_special; # this is a C statement (if, for, etc.) -my $cont_macro; # this is a macro -my $cont_case; # this is a multi-line case - -my @cont_paren; # the stack of unmatched ( and [s we've seen - -sub -reset_indent() -{ - $cont_in = 0; - $cont_off = 0; -} - -sub -delabel($) -{ - # - # replace labels with tabs. Note that there may be multiple - # labels on a line. - # - local $_ = $_[0]; - - while (/^(\t*)( *(?:(?:\w+\s*)|(?:case\b[^:]*)): *)(.*)$/) { - my ($pre_tabs, $label, $rest) = ($1, $2, $3); - $_ = $pre_tabs; - while ($label =~ s/^([^\t]*)(\t+)//) { - $_ .= "\t" x (length($2) + length($1) / 8); - } - $_ .= ("\t" x (length($label) / 8)).$rest; - } - - return ($_); -} - -sub -process_indent($) -{ - require strict; - local $_ = $_[0]; # preserve the global $_ - - s///g; # No comments - s/\s+$//; # Strip trailing whitespace - - return if (/^$/); # skip empty lines - - # regexps used below; keywords taking (), macros, and continued cases - my $special = '(?:(?:\}\s*)?else\s+)?(?:if|for|while|switch)\b'; - my $macro = '[A-Z_][A-Z_0-9]*\('; - my $case = 'case\b[^:]*$'; - - # skip over enumerations, array definitions, initializers, etc. - if ($cont_off <= 0 && !/^\s*$special/ && - (/(?:(?:\b(?:enum|struct|union)\s*[^\{]*)|(?:\s+=\s*)){/ || - (/^\s*{/ && $prev =~ /=\s*(?:\/\*.*\*\/\s*)*$/))) { - $cont_in = 0; - $cont_off = tr/{/{/ - tr/}/}/; - return; - } - if ($cont_off) { - $cont_off += tr/{/{/ - tr/}/}/; - return; - } - - if (!$cont_in) { - $cont_start = $line; - - if (/^\t* /) { - err("non-continuation indented 4 spaces"); - $cont_noerr = 1; # stop reporting - } - $_ = delabel($_); # replace labels with tabs - - # check if the statement is complete - return if (/^\s*\}?$/); - return if (/^\s*\}?\s*else\s*\{?$/); - return if (/^\s*do\s*\{?$/); - return if (/{$/); - return if (/}[,;]?$/); - - # Allow macros on their own lines - return if (/^\s*[A-Z_][A-Z_0-9]*$/); - - # cases we don't deal with, generally non-kosher - if (/{/) { - err("stuff after {"); - return; - } - - # Get the base line, and set up the state machine - /^(\t*)/; - $cont_base = $1; - $cont_in = 1; - @cont_paren = (); - $cont_first = 1; - $cont_multiseg = 0; - - # certain things need special processing - $cont_special = /^\s*$special/? 1 : 0; - $cont_macro = /^\s*$macro/? 1 : 0; - $cont_case = /^\s*$case/? 1 : 0; - } else { - $cont_first = 0; - - # Strings may be pulled back to an earlier (half-)tabstop - unless ($cont_noerr || /^$cont_base / || - (/^\t*(?: )?(?:gettext\()?\"/ && !/^$cont_base\t/)) { - err_prefix($cont_start, - "continuation should be indented 4 spaces"); - } - } - - my $rest = $_; # keeps the remainder of the line - - # - # The split matches 0 characters, so that each 'special' character - # is processed separately. Parens and brackets are pushed and - # popped off the @cont_paren stack. For normal processing, we wait - # until a ; or { terminates the statement. "special" processing - # (if/for/while/switch) is allowed to stop when the stack empties, - # as is macro processing. Case statements are terminated with a : - # and an empty paren stack. - # - foreach $_ (split /[^\(\)\[\]\{\}\;\:]*/) { - next if (length($_) == 0); - - # rest contains the remainder of the line - my $rxp = "[^\Q$_\E]*\Q$_\E"; - $rest =~ s/^$rxp//; - - if (/\(/ || /\[/) { - push @cont_paren, $_; - } elsif (/\)/ || /\]/) { - my $cur = $_; - tr/\)\]/\(\[/; - - my $old = (pop @cont_paren); - if (!defined($old)) { - err("unexpected '$cur'"); - $cont_in = 0; - last; - } elsif ($old ne $_) { - err("'$cur' mismatched with '$old'"); - $cont_in = 0; - last; - } - - # - # If the stack is now empty, do special processing - # for if/for/while/switch and macro statements. - # - next if (@cont_paren != 0); - if ($cont_special) { - if ($rest =~ /^\s*{?$/) { - $cont_in = 0; - last; - } - if ($rest =~ /^\s*;$/) { - err("empty if/for/while body ". - "not on its own line"); - $cont_in = 0; - last; - } - if (!$cont_first && $cont_multiseg == 1) { - err_prefix($cont_start, - "multiple statements continued ". - "over multiple lines"); - $cont_multiseg = 2; - } elsif ($cont_multiseg == 0) { - $cont_multiseg = 1; - } - # We've finished this section, start - # processing the next. - goto section_ended; - } - if ($cont_macro) { - if ($rest =~ /^$/) { - $cont_in = 0; - last; - } - } - } elsif (/\;/) { - if ($cont_case) { - err("unexpected ;"); - } elsif (!$cont_special) { - err("unexpected ;") if (@cont_paren != 0); - if (!$cont_first && $cont_multiseg == 1) { - err_prefix($cont_start, - "multiple statements continued ". - "over multiple lines"); - $cont_multiseg = 2; - } elsif ($cont_multiseg == 0) { - $cont_multiseg = 1; - } - if ($rest =~ /^$/) { - $cont_in = 0; - last; - } - if ($rest =~ /^\s*special/) { - err("if/for/while/switch not started ". - "on its own line"); - } - goto section_ended; - } - } elsif (/\{/) { - err("{ while in parens/brackets") if (@cont_paren != 0); - err("stuff after {") if ($rest =~ /[^\s}]/); - $cont_in = 0; - last; - } elsif (/\}/) { - err("} while in parens/brackets") if (@cont_paren != 0); - if (!$cont_special && $rest !~ /^\s*(while|else)\b/) { - if ($rest =~ /^$/) { - err("unexpected }"); - } else { - err("stuff after }"); - } - $cont_in = 0; - last; - } - } elsif (/\:/ && $cont_case && @cont_paren == 0) { - err("stuff after multi-line case") if ($rest !~ /$^/); - $cont_in = 0; - last; - } - next; -section_ended: - # End of a statement or if/while/for loop. Reset - # cont_special and cont_macro based on the rest of the - # line. - $cont_special = ($rest =~ /^\s*$special/)? 1 : 0; - $cont_macro = ($rest =~ /^\s*$macro/)? 1 : 0; - $cont_case = 0; - next; - } - $cont_noerr = 0 if (!$cont_in); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/float.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/float.json deleted file mode 100644 index 29d7bd89..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/float.json +++ /dev/null @@ -1,13 +0,0 @@ -{ "metadata": - { - "ctf2json_version": "1.0", - "created_at": 1316563626, - "derived_from": "/lib/libc.so", - "ctf_version": 2, - "requested_types": [ "float" ] - }, -"data": - [ - { "name": "float", "float": { "length": 4 } } - ] -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/int.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/int.json deleted file mode 100644 index f9773a14..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/int.json +++ /dev/null @@ -1,13 +0,0 @@ -{ "metadata": - { - "ctf2json_version": "1.0", - "created_at": 1316563631, - "derived_from": "/lib/libc.so", - "ctf_version": 2, - "requested_types": [ "int" ] - }, -"data": - [ - { "name": "int", "integer": { "length": 4, "signed": true } } - ] -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/psinfo.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/psinfo.json deleted file mode 100644 index e0ee5e0d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/psinfo.json +++ /dev/null @@ -1,104 +0,0 @@ -{ "metadata": - { - "ctf2json_version": "1.0", - "created_at": 1316563573, - "derived_from": "/lib/libc.so", - "ctf_version": 2, - "requested_types": [ "psinfo_t" ] - }, -"data": - [ - { "name": "int", "integer": { "length": 4, "signed": true } }, - { "name": "char", "integer": { "length": 1, "signed": true } }, - { "name": "unsigned short", "integer": { "length": 2, "signed": false } }, - { "name": "long", "integer": { "length": 4, "signed": true } }, - { "name": "unsigned", "integer": { "length": 4, "signed": false } }, - { "name": "size_t", "typedef": "unsigned" }, - { "name": "unsigned long", "integer": { "length": 4, "signed": false } }, - { "name": "time_t", "typedef": "long" }, - { "name": "struct timespec", "struct": [ - { "name": "tv_sec", "type": "time_t" }, - { "name": "tv_nsec", "type": "long" } - ] }, - { "name": "zoneid_t", "typedef": "long" }, - { "name": "taskid_t", "typedef": "long" }, - { "name": "dev_t", "typedef": "unsigned long" }, - { "name": "uid_t", "typedef": "unsigned" }, - { "name": "gid_t", "typedef": "unsigned" }, - { "name": "timestruc_t", "typedef": "struct timespec" }, - { "name": "short", "integer": { "length": 2, "signed": true } }, - { "name": "projid_t", "typedef": "long" }, - { "name": "ushort_t", "typedef": "unsigned short" }, - { "name": "poolid_t", "typedef": "long" }, - { "name": "uintptr_t", "typedef": "unsigned" }, - { "name": "id_t", "typedef": "long" }, - { "name": "pid_t", "typedef": "long" }, - { "name": "processorid_t", "typedef": "int" }, - { "name": "psetid_t", "typedef": "int" }, - { "name": "struct lwpsinfo", "struct": [ - { "name": "pr_flag", "type": "int" }, - { "name": "pr_lwpid", "type": "id_t" }, - { "name": "pr_addr", "type": "uintptr_t" }, - { "name": "pr_wchan", "type": "uintptr_t" }, - { "name": "pr_stype", "type": "char" }, - { "name": "pr_state", "type": "char" }, - { "name": "pr_sname", "type": "char" }, - { "name": "pr_nice", "type": "char" }, - { "name": "pr_syscall", "type": "short" }, - { "name": "pr_oldpri", "type": "char" }, - { "name": "pr_cpu", "type": "char" }, - { "name": "pr_pri", "type": "int" }, - { "name": "pr_pctcpu", "type": "ushort_t" }, - { "name": "pr_pad", "type": "ushort_t" }, - { "name": "pr_start", "type": "timestruc_t" }, - { "name": "pr_time", "type": "timestruc_t" }, - { "name": "pr_clname", "type": "char [8]" }, - { "name": "pr_name", "type": "char [16]" }, - { "name": "pr_onpro", "type": "processorid_t" }, - { "name": "pr_bindpro", "type": "processorid_t" }, - { "name": "pr_bindpset", "type": "psetid_t" }, - { "name": "pr_lgrp", "type": "int" }, - { "name": "pr_filler", "type": "int [4]" } - ] }, - { "name": "lwpsinfo_t", "typedef": "struct lwpsinfo" }, - { "name": "struct psinfo", "struct": [ - { "name": "pr_flag", "type": "int" }, - { "name": "pr_nlwp", "type": "int" }, - { "name": "pr_pid", "type": "pid_t" }, - { "name": "pr_ppid", "type": "pid_t" }, - { "name": "pr_pgid", "type": "pid_t" }, - { "name": "pr_sid", "type": "pid_t" }, - { "name": "pr_uid", "type": "uid_t" }, - { "name": "pr_euid", "type": "uid_t" }, - { "name": "pr_gid", "type": "gid_t" }, - { "name": "pr_egid", "type": "gid_t" }, - { "name": "pr_addr", "type": "uintptr_t" }, - { "name": "pr_size", "type": "size_t" }, - { "name": "pr_rssize", "type": "size_t" }, - { "name": "pr_pad1", "type": "size_t" }, - { "name": "pr_ttydev", "type": "dev_t" }, - { "name": "pr_pctcpu", "type": "ushort_t" }, - { "name": "pr_pctmem", "type": "ushort_t" }, - { "name": "pr_start", "type": "timestruc_t" }, - { "name": "pr_time", "type": "timestruc_t" }, - { "name": "pr_ctime", "type": "timestruc_t" }, - { "name": "pr_fname", "type": "char [16]" }, - { "name": "pr_psargs", "type": "char [80]" }, - { "name": "pr_wstat", "type": "int" }, - { "name": "pr_argc", "type": "int" }, - { "name": "pr_argv", "type": "uintptr_t" }, - { "name": "pr_envp", "type": "uintptr_t" }, - { "name": "pr_dmodel", "type": "char" }, - { "name": "pr_pad2", "type": "char [3]" }, - { "name": "pr_taskid", "type": "taskid_t" }, - { "name": "pr_projid", "type": "projid_t" }, - { "name": "pr_nzomb", "type": "int" }, - { "name": "pr_poolid", "type": "poolid_t" }, - { "name": "pr_zoneid", "type": "zoneid_t" }, - { "name": "pr_contract", "type": "id_t" }, - { "name": "pr_filler", "type": "int [1]" }, - { "name": "pr_lwp", "type": "lwpsinfo_t" } - ] }, - { "name": "psinfo_t", "typedef": "struct psinfo" } - ] -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/struct.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/struct.json deleted file mode 100644 index e0542ff4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/struct.json +++ /dev/null @@ -1,19 +0,0 @@ -{ "metadata": - { - "ctf2json_version": "1.0", - "created_at": 1316563648, - "derived_from": "/lib/libc.so", - "ctf_version": 2, - "requested_types": [ "timestruc_t" ] - }, -"data": - [ - { "name": "long", "integer": { "length": 4, "signed": true } }, - { "name": "time_t", "typedef": "long" }, - { "name": "struct timespec", "struct": [ - { "name": "tv_sec", "type": "time_t" }, - { "name": "tv_nsec", "type": "long" } - ] }, - { "name": "timestruc_t", "typedef": "struct timespec" } - ] -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js deleted file mode 100644 index d6a52cbb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Test several conditions that should always cause us to throw. - */ -var mod_assert = require('assert'); -var mod_ctype = require('../../ctype.js'); - -var cases = [ -{ json: { }, msg: 'bad JSON - no metadata or data' }, -{ json: { metadata: {} }, msg: 'bad JSON - bad metadata section' }, -{ json: { metadata: { 'JSON version': [] } }, - msg: 'bad JSON - bad JSON version' }, -{ json: { metadata: { 'JSON version': 2 } }, - msg: 'bad JSON - bad JSON version' }, -{ json: { metadata: { 'JSON version': '100.20' } }, - msg: 'bad JSON - bad JSON version' }, -{ json: { metadata: { 'JSON version': '1.0' } }, - msg: 'missing data section' }, -{ json: { metadata: { 'JSON version': '1.0' }, data: 1 }, - msg: 'invalid data section' }, -{ json: { metadata: { 'JSON version': '1.0' }, data: 1.1 }, - msg: 'invalid data section' }, -{ json: { metadata: { 'JSON version': '1.0' }, data: '1.1' }, - msg: 'invalid data section' }, -{ json: { metadata: { 'JSON version': '1.0' }, data: {} }, - msg: 'invalid data section' } -]; - -function test() -{ - var ii; - - for (ii = 0; ii < cases.length; ii++) { - mod_assert.throws(function () { - mod_ctype.parseCTF(cases[ii].json); - }, Error, cases[ii].msg); - } -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.float.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.float.js deleted file mode 100644 index f2144994..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.float.js +++ /dev/null @@ -1,14 +0,0 @@ -var mod_fs = require('fs'); -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -function test() -{ - var data, parser; - - data = JSON.parse(mod_fs.readFileSync('./float.json').toString()); - parser = mod_ctype.parseCTF(data, { endian: 'big' }); - mod_assert.deepEqual(parser.lstypes(), {}); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.int.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.int.js deleted file mode 100644 index 0ec0f769..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.int.js +++ /dev/null @@ -1,14 +0,0 @@ -var mod_fs = require('fs'); -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -function test() -{ - var data, parser; - - data = JSON.parse(mod_fs.readFileSync('./int.json').toString()); - parser = mod_ctype.parseCTF(data, { endian: 'big' }); - mod_assert.deepEqual(parser.lstypes(), { 'int': 'int32_t' }); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.psinfo.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.psinfo.js deleted file mode 100644 index ca1a544c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.psinfo.js +++ /dev/null @@ -1,17 +0,0 @@ -var mod_fs = require('fs'); -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -/* - * This is too unwieldly to actually write out. Just make sure we can parse it - * without errrors. - */ -function test() -{ - var data; - - data = JSON.parse(mod_fs.readFileSync('./psinfo.json').toString()); - mod_ctype.parseCTF(data, { endian: 'big' }); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.struct.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.struct.js deleted file mode 100644 index c62f41f9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.struct.js +++ /dev/null @@ -1,18 +0,0 @@ -var mod_fs = require('fs'); -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -function test() -{ - var data, parser; - - data = JSON.parse(mod_fs.readFileSync('./struct.json').toString()); - parser = mod_ctype.parseCTF(data, { endian: 'big' }); - mod_assert.deepEqual(parser.lstypes(), { 'long': 'int32_t', - 'time_t': 'long', - 'timestruc_t': 'struct timespec', - 'struct timespec': [ { 'tv_sec': { 'type': 'time_t' } }, - { 'tv_nsec': { 'type': 'long' } } ] }); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.typedef.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.typedef.js deleted file mode 100644 index 9006cd1b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.typedef.js +++ /dev/null @@ -1,15 +0,0 @@ -var mod_fs = require('fs'); -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -function test() -{ - var data, parser; - - data = JSON.parse(mod_fs.readFileSync('./typedef.json').toString()); - parser = mod_ctype.parseCTF(data, { endian: 'big' }); - mod_assert.deepEqual(parser.lstypes(), { 'bar_t': 'int', - 'int': 'int32_t' }); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/typedef.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/typedef.json deleted file mode 100644 index 35ddb50d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/typedef.json +++ /dev/null @@ -1,14 +0,0 @@ -{ "metadata": - { - "ctf2json_version": "1.0", - "created_at": 1316302348, - "derived_from": "/lib/libc.so", - "ctf_version": 2, - "requested_types": [ "bar_t" ] - }, -"data": - [ - { "name": "int", "integer": { "length": 4, "signed": true } }, - { "name": "bar_t", "typedef": "int" } - ] -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.rfloat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.rfloat.js deleted file mode 100644 index 2c9504a8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.rfloat.js +++ /dev/null @@ -1,767 +0,0 @@ -/* - * Battery of tests to break our floating point implementation. Oh ho ho. - * - * There are a few useful ways to generate the expected output. The first is - * just write a C program and write raw bytes out and inspect with xxd. Remember - * to consider whether or not you're on a big endian or little endian machine. - * Another useful site I found to help with some of this was: - * - * http://babbage.cs.qc.edu/IEEE-754/ - */ - -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - -function testfloat() -{ - var buffer = new Buffer(4); - /* Start off with some of the easy ones: +zero */ - buffer[0] = 0; - buffer[1] = 0; - buffer[2] = 0; - buffer[3] = 0; - - ASSERT.equal(0, mod_ctype.rfloat(buffer, 'big', 0)); - ASSERT.equal(0, mod_ctype.rfloat(buffer, 'little', 0)); - - /* Test -0 */ - buffer[0] = 0x80; - ASSERT.equal(0, mod_ctype.rfloat(buffer, 'big', 0)); - buffer[3] = buffer[0]; - buffer[0] = 0; - ASSERT.equal(0, mod_ctype.rfloat(buffer, 'little', 0)); - - /* Catch +infin */ - buffer[0] = 0x7f; - buffer[1] = 0x80; - buffer[2] = 0x00; - buffer[3] = 0x00; - ASSERT.equal(Number.POSITIVE_INFINITY, - mod_ctype.rfloat(buffer, 'big', 0)); - buffer[3] = 0x7f; - buffer[2] = 0x80; - buffer[1] = 0x00; - buffer[0] = 0x00; - ASSERT.equal(Number.POSITIVE_INFINITY, - mod_ctype.rfloat(buffer, 'litle', 0)); - - /* Catch -infin */ - buffer[0] = 0xff; - buffer[1] = 0x80; - buffer[2] = 0x00; - buffer[3] = 0x00; - ASSERT.equal(Number.NEGATIVE_INFINITY, - mod_ctype.rfloat(buffer, 'big', 0)); - buffer[3] = 0xff; - buffer[2] = 0x80; - buffer[1] = 0x00; - buffer[0] = 0x00; - ASSERT.equal(Number.NEGATIVE_INFINITY, - mod_ctype.rfloat(buffer, 'litle', 0)); - - /* Catch NaN */ - - buffer[0] = 0x7f; - buffer[1] = 0x80; - buffer[2] = 0x00; - buffer[3] = 0x23; - ASSERT.ok(isNaN(mod_ctype.rfloat(buffer, 'big', 0))); - buffer[3] = 0x7f; - buffer[2] = 0x80; - buffer[1] = 0x00; - buffer[0] = 0x23; - ASSERT.ok(isNaN(mod_ctype.rfloat(buffer, 'little', 0))); - - /* Catch -infin */ - buffer[0] = 0xff; - buffer[1] = 0x80; - buffer[2] = 0x00; - buffer[3] = 0x23; - ASSERT.ok(isNaN(mod_ctype.rfloat(buffer, 'big', 0))); - buffer[3] = 0xff; - buffer[2] = 0x80; - buffer[1] = 0x00; - buffer[0] = 0x23; - ASSERT.ok(isNaN(mod_ctype.rfloat(buffer, 'little', 0))); - - /* On to some basic tests */ - /* 1.125 */ - buffer[0] = 0x3f; - buffer[1] = 0x90; - buffer[2] = 0x00; - buffer[3] = 0x00; - ASSERT.equal(1.125, mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x3f; - buffer[2] = 0x90; - buffer[1] = 0x00; - buffer[0] = 0x00; - ASSERT.equal(1.125, mod_ctype.rfloat(buffer, 'little', 0)); - - /* ff34a2b0 -2.4010576103645774e+38 */ - buffer[0] = 0xff; - buffer[1] = 0x34; - buffer[2] = 0xa2; - buffer[3] = 0xb0; - ASSERT.equal(-2.4010576103645774e+38, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0xff; - buffer[2] = 0x34; - buffer[1] = 0xa2; - buffer[0] = 0xb0; - ASSERT.equal(-2.4010576103645774e+38, - mod_ctype.rfloat(buffer, 'little', 0)); - - /* Denormalized tests */ - - /* 0003f89a +/- 3.6468792534053364e-40 */ - buffer[0] = 0x00; - buffer[1] = 0x03; - buffer[2] = 0xf8; - buffer[3] = 0x9a; - ASSERT.equal(3.6468792534053364e-40, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x00; - buffer[2] = 0x03; - buffer[1] = 0xf8; - buffer[0] = 0x9a; - ASSERT.equal(3.6468792534053364e-40, - mod_ctype.rfloat(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0x03; - buffer[2] = 0xf8; - buffer[3] = 0x9a; - ASSERT.equal(-3.6468792534053364e-40, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x80; - buffer[2] = 0x03; - buffer[1] = 0xf8; - buffer[0] = 0x9a; - ASSERT.equal(-3.6468792534053364e-40, - mod_ctype.rfloat(buffer, 'little', 0)); - - - /* Maximum and minimum normalized and denormalized values */ - - /* Largest normalized number +/- 3.4028234663852886e+38 */ - - buffer[0] = 0x7f; - buffer[1] = 0x7f; - buffer[2] = 0xff; - buffer[3] = 0xff; - ASSERT.equal(3.4028234663852886e+38, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x7f; - buffer[2] = 0x7f; - buffer[1] = 0xff; - buffer[0] = 0xff; - ASSERT.equal(3.4028234663852886e+38, - mod_ctype.rfloat(buffer, 'little', 0)); - - buffer[0] = 0xff; - buffer[1] = 0x7f; - buffer[2] = 0xff; - buffer[3] = 0xff; - ASSERT.equal(-3.4028234663852886e+38, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0xff; - buffer[2] = 0x7f; - buffer[1] = 0xff; - buffer[0] = 0xff; - ASSERT.equal(-3.4028234663852886e+38, - mod_ctype.rfloat(buffer, 'little', 0)); - - /* Smallest normalied number +/- 1.1754943508222875e-38 */ - buffer[0] = 0x00; - buffer[1] = 0x80; - buffer[2] = 0x00; - buffer[3] = 0x00; - ASSERT.equal(1.1754943508222875e-38, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x00; - buffer[2] = 0x80; - buffer[1] = 0x00; - buffer[0] = 0x00; - ASSERT.equal(1.1754943508222875e-38, - mod_ctype.rfloat(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0x80; - buffer[2] = 0x00; - buffer[3] = 0x00; - ASSERT.equal(-1.1754943508222875e-38, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x80; - buffer[2] = 0x80; - buffer[1] = 0x00; - buffer[0] = 0x00; - ASSERT.equal(-1.1754943508222875e-38, - mod_ctype.rfloat(buffer, 'little', 0)); - - - /* Smallest denormalized number 1.401298464324817e-45 */ - buffer[0] = 0x00; - buffer[1] = 0x00; - buffer[2] = 0x00; - buffer[3] = 0x01; - ASSERT.equal(1.401298464324817e-45, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x00; - buffer[2] = 0x00; - buffer[1] = 0x00; - buffer[0] = 0x01; - ASSERT.equal(1.401298464324817e-45, - mod_ctype.rfloat(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0x00; - buffer[2] = 0x00; - buffer[3] = 0x01; - ASSERT.equal(-1.401298464324817e-45, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x80; - buffer[2] = 0x00; - buffer[1] = 0x00; - buffer[0] = 0x01; - ASSERT.equal(-1.401298464324817e-45, - mod_ctype.rfloat(buffer, 'little', 0)); - - /* Largest denormalized value +/- 1.1754942106924411e-38 */ - buffer[0] = 0x00; - buffer[1] = 0x7f; - buffer[2] = 0xff; - buffer[3] = 0xff; - ASSERT.equal(1.1754942106924411e-38, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x00; - buffer[2] = 0x7f; - buffer[1] = 0xff; - buffer[0] = 0xff; - ASSERT.equal(1.1754942106924411e-38, - mod_ctype.rfloat(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0x7f; - buffer[2] = 0xff; - buffer[3] = 0xff; - ASSERT.equal(-1.1754942106924411e-38, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x80; - buffer[2] = 0x7f; - buffer[1] = 0xff; - buffer[0] = 0xff; - ASSERT.equal(-1.1754942106924411e-38, - mod_ctype.rfloat(buffer, 'little', 0)); - - /* Do some quick offset testing */ - buffer = new Buffer(6); - buffer[0] = 0x7f; - buffer[1] = 0x4e; - buffer[2] = 0x8a; - buffer[3] = 0x79; - buffer[4] = 0xcd; - buffer[5] = 0x3f; - - ASSERT.equal(2.745399582697325e+38, - mod_ctype.rfloat(buffer, 'big', 0)); - ASSERT.equal(1161619072, - mod_ctype.rfloat(buffer, 'big', 1)); - ASSERT.equal(-1.2027516403607578e-32, - mod_ctype.rfloat(buffer, 'big', 2)); - - ASSERT.equal(8.97661320504413e+34, - mod_ctype.rfloat(buffer, 'little', 0)); - ASSERT.equal(-261661920, - mod_ctype.rfloat(buffer, 'little', 1)); - ASSERT.equal(1.605271577835083, - mod_ctype.rfloat(buffer, 'little', 2)); - -} - -function testdouble() -{ - var buffer = new Buffer(10); - - /* Check 0 */ - buffer[0] = 0; - buffer[1] = 0; - buffer[2] = 0; - buffer[3] = 0; - buffer[4] = 0; - buffer[5] = 0; - buffer[6] = 0; - buffer[7] = 0; - ASSERT.equal(0, - mod_ctype.rdouble(buffer, 'big', 0)); - ASSERT.equal(0, - mod_ctype.rdouble(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0; - buffer[2] = 0; - buffer[3] = 0; - buffer[4] = 0; - buffer[5] = 0; - buffer[6] = 0; - buffer[7] = 0; - ASSERT.equal(0, - mod_ctype.rdouble(buffer, 'big', 0)); - buffer[7] = 0x80; - buffer[6] = 0; - buffer[5] = 0; - buffer[4] = 0; - buffer[3] = 0; - buffer[2] = 0; - buffer[1] = 0; - buffer[0] = 0; - ASSERT.equal(0, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* Check NaN */ - buffer[0] = 0x7f; - buffer[1] = 0xf0; - buffer[2] = 0; - buffer[3] = 0; - buffer[4] = 0; - buffer[5] = 0; - buffer[6] = 0; - buffer[7] = 23; - ASSERT.ok(isNaN(mod_ctype.rdouble(buffer, 'big', 0))); - - buffer[7] = 0x7f; - buffer[6] = 0xf0; - buffer[5] = 0; - buffer[4] = 0; - buffer[3] = 0; - buffer[2] = 0; - buffer[1] = 0; - buffer[0] = 23; - ASSERT.ok(isNaN(mod_ctype.rdouble(buffer, 'little', 0))); - - buffer[0] = 0xff; - buffer[1] = 0xf0; - buffer[2] = 0; - buffer[3] = 0; - buffer[4] = 0; - buffer[5] = 0; - buffer[6] = 0; - buffer[7] = 23; - ASSERT.ok(isNaN(mod_ctype.rdouble(buffer, 'big', 0))); - - buffer[7] = 0xff; - buffer[6] = 0xf0; - buffer[5] = 0; - buffer[4] = 0; - buffer[3] = 0; - buffer[2] = 0; - buffer[1] = 0; - buffer[0] = 23; - ASSERT.ok(isNaN(mod_ctype.rdouble(buffer, 'little', 0))); - - /* pos inf */ - buffer[0] = 0x7f; - buffer[1] = 0xf0; - buffer[2] = 0; - buffer[3] = 0; - buffer[4] = 0; - buffer[5] = 0; - buffer[6] = 0; - buffer[7] = 0; - ASSERT.equal(Number.POSITIVE_INFINITY, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x7f; - buffer[6] = 0xf0; - buffer[5] = 0; - buffer[4] = 0; - buffer[3] = 0; - buffer[2] = 0; - buffer[1] = 0; - buffer[0] = 0; - ASSERT.equal(Number.POSITIVE_INFINITY, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* neg inf */ - buffer[0] = 0xff; - buffer[1] = 0xf0; - buffer[2] = 0; - buffer[3] = 0; - buffer[4] = 0; - buffer[5] = 0; - buffer[6] = 0; - buffer[7] = 0; - ASSERT.equal(Number.NEGATIVE_INFINITY, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0xff; - buffer[6] = 0xf0; - buffer[5] = 0; - buffer[4] = 0; - buffer[3] = 0; - buffer[2] = 0; - buffer[1] = 0; - buffer[0] = 0; - ASSERT.equal(Number.NEGATIVE_INFINITY, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* Simple normalized values */ - - /* +/- 1.125 */ - buffer[0] = 0x3f; - buffer[1] = 0xf2; - buffer[2] = 0; - buffer[3] = 0; - buffer[4] = 0; - buffer[5] = 0; - buffer[6] = 0; - buffer[7] = 0; - ASSERT.equal(1.125, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x3f; - buffer[6] = 0xf2; - buffer[5] = 0; - buffer[4] = 0; - buffer[3] = 0; - buffer[2] = 0; - buffer[1] = 0; - buffer[0] = 0; - ASSERT.equal(1.125, - mod_ctype.rdouble(buffer, 'little', 0)); - - buffer[0] = 0xbf; - buffer[1] = 0xf2; - buffer[2] = 0; - buffer[3] = 0; - buffer[4] = 0; - buffer[5] = 0; - buffer[6] = 0; - buffer[7] = 0; - ASSERT.equal(-1.125, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0xbf; - buffer[6] = 0xf2; - buffer[5] = 0; - buffer[4] = 0; - buffer[3] = 0; - buffer[2] = 0; - buffer[1] = 0; - buffer[0] = 0; - ASSERT.equal(-1.125, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* +/- 1.4397318913736026e+283 */ - buffer[0] = 0x7a; - buffer[1] = 0xb8; - buffer[2] = 0xc9; - buffer[3] = 0x34; - buffer[4] = 0x72; - buffer[5] = 0x16; - buffer[6] = 0xf9; - buffer[7] = 0x0e; - ASSERT.equal(1.4397318913736026e+283, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x7a; - buffer[6] = 0xb8; - buffer[5] = 0xc9; - buffer[4] = 0x34; - buffer[3] = 0x72; - buffer[2] = 0x16; - buffer[1] = 0xf9; - buffer[0] = 0x0e; - ASSERT.equal(1.4397318913736026e+283, - mod_ctype.rdouble(buffer, 'little', 0)); - - buffer[0] = 0xfa; - buffer[1] = 0xb8; - buffer[2] = 0xc9; - buffer[3] = 0x34; - buffer[4] = 0x72; - buffer[5] = 0x16; - buffer[6] = 0xf9; - buffer[7] = 0x0e; - ASSERT.equal(-1.4397318913736026e+283, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0xfa; - buffer[6] = 0xb8; - buffer[5] = 0xc9; - buffer[4] = 0x34; - buffer[3] = 0x72; - buffer[2] = 0x16; - buffer[1] = 0xf9; - buffer[0] = 0x0e; - ASSERT.equal(-1.4397318913736026e+283, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* Denormalized values */ - /* +/- 8.82521232268344e-309 */ - buffer[0] = 0x00; - buffer[1] = 0x06; - buffer[2] = 0x58; - buffer[3] = 0x94; - buffer[4] = 0x13; - buffer[5] = 0x27; - buffer[6] = 0x8a; - buffer[7] = 0xcd; - ASSERT.equal(8.82521232268344e-309, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x00; - buffer[6] = 0x06; - buffer[5] = 0x58; - buffer[4] = 0x94; - buffer[3] = 0x13; - buffer[2] = 0x27; - buffer[1] = 0x8a; - buffer[0] = 0xcd; - ASSERT.equal(8.82521232268344e-309, - mod_ctype.rdouble(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0x06; - buffer[2] = 0x58; - buffer[3] = 0x94; - buffer[4] = 0x13; - buffer[5] = 0x27; - buffer[6] = 0x8a; - buffer[7] = 0xcd; - ASSERT.equal(-8.82521232268344e-309, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x80; - buffer[6] = 0x06; - buffer[5] = 0x58; - buffer[4] = 0x94; - buffer[3] = 0x13; - buffer[2] = 0x27; - buffer[1] = 0x8a; - buffer[0] = 0xcd; - ASSERT.equal(-8.82521232268344e-309, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* Edge cases, maximum and minimum values */ - - /* Smallest denormalized value 5e-324 */ - buffer[0] = 0x00; - buffer[1] = 0x00; - buffer[2] = 0x00; - buffer[3] = 0x00; - buffer[4] = 0x00; - buffer[5] = 0x00; - buffer[6] = 0x00; - buffer[7] = 0x01; - ASSERT.equal(5e-324, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x00; - buffer[6] = 0x00; - buffer[5] = 0x00; - buffer[4] = 0x00; - buffer[3] = 0x00; - buffer[2] = 0x00; - buffer[1] = 0x00; - buffer[0] = 0x01; - ASSERT.equal(5e-324, - mod_ctype.rdouble(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0x00; - buffer[2] = 0x00; - buffer[3] = 0x00; - buffer[4] = 0x00; - buffer[5] = 0x00; - buffer[6] = 0x00; - buffer[7] = 0x01; - ASSERT.equal(-5e-324, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x80; - buffer[6] = 0x00; - buffer[5] = 0x00; - buffer[4] = 0x00; - buffer[3] = 0x00; - buffer[2] = 0x00; - buffer[1] = 0x00; - buffer[0] = 0x01; - ASSERT.equal(-5e-324, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* Largest denormalized value 2.225073858507201e-308 */ - buffer[0] = 0x00; - buffer[1] = 0x0f; - buffer[2] = 0xff; - buffer[3] = 0xff; - buffer[4] = 0xff; - buffer[5] = 0xff; - buffer[6] = 0xff; - buffer[7] = 0xff; - ASSERT.equal(2.225073858507201e-308, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x00; - buffer[6] = 0x0f; - buffer[5] = 0xff; - buffer[4] = 0xff; - buffer[3] = 0xff; - buffer[2] = 0xff; - buffer[1] = 0xff; - buffer[0] = 0xff; - ASSERT.equal(2.225073858507201e-308, - mod_ctype.rdouble(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0x0f; - buffer[2] = 0xff; - buffer[3] = 0xff; - buffer[4] = 0xff; - buffer[5] = 0xff; - buffer[6] = 0xff; - buffer[7] = 0xff; - ASSERT.equal(-2.225073858507201e-308, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x80; - buffer[6] = 0x0f; - buffer[5] = 0xff; - buffer[4] = 0xff; - buffer[3] = 0xff; - buffer[2] = 0xff; - buffer[1] = 0xff; - buffer[0] = 0xff; - ASSERT.equal(-2.225073858507201e-308, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* Smallest normalized value 2.2250738585072014e-308 */ - buffer[0] = 0x00; - buffer[1] = 0x10; - buffer[2] = 0x00; - buffer[3] = 0x00; - buffer[4] = 0x00; - buffer[5] = 0x00; - buffer[6] = 0x00; - buffer[7] = 0x00; - ASSERT.equal(2.2250738585072014e-308, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x00; - buffer[6] = 0x10; - buffer[5] = 0x00; - buffer[4] = 0x00; - buffer[3] = 0x00; - buffer[2] = 0x00; - buffer[1] = 0x00; - buffer[0] = 0x00; - ASSERT.equal(2.2250738585072014e-308, - mod_ctype.rdouble(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0x10; - buffer[2] = 0x00; - buffer[3] = 0x00; - buffer[4] = 0x00; - buffer[5] = 0x00; - buffer[6] = 0x00; - buffer[7] = 0x00; - ASSERT.equal(-2.2250738585072014e-308, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x80; - buffer[6] = 0x10; - buffer[5] = 0x00; - buffer[4] = 0x00; - buffer[3] = 0x00; - buffer[2] = 0x00; - buffer[1] = 0x00; - buffer[0] = 0x00; - ASSERT.equal(-2.2250738585072014e-308, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* Largest normalized value 1.7976931348623157e+308 */ - buffer[0] = 0x7f; - buffer[1] = 0xef; - buffer[2] = 0xff; - buffer[3] = 0xff; - buffer[4] = 0xff; - buffer[5] = 0xff; - buffer[6] = 0xff; - buffer[7] = 0xff; - ASSERT.equal(1.7976931348623157e+308, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x7f; - buffer[6] = 0xef; - buffer[5] = 0xff; - buffer[4] = 0xff; - buffer[3] = 0xff; - buffer[2] = 0xff; - buffer[1] = 0xff; - buffer[0] = 0xff; - ASSERT.equal(1.7976931348623157e+308, - mod_ctype.rdouble(buffer, 'little', 0)); - - buffer[0] = 0xff; - buffer[1] = 0xef; - buffer[2] = 0xff; - buffer[3] = 0xff; - buffer[4] = 0xff; - buffer[5] = 0xff; - buffer[6] = 0xff; - buffer[7] = 0xff; - ASSERT.equal(-1.7976931348623157e+308, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0xff; - buffer[6] = 0xef; - buffer[5] = 0xff; - buffer[4] = 0xff; - buffer[3] = 0xff; - buffer[2] = 0xff; - buffer[1] = 0xff; - buffer[0] = 0xff; - ASSERT.equal(-1.7976931348623157e+308, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* Try offsets */ - buffer[0] = 0xde; - buffer[1] = 0xad; - buffer[2] = 0xbe; - buffer[3] = 0xef; - buffer[4] = 0xba; - buffer[5] = 0xdd; - buffer[6] = 0xca; - buffer[7] = 0xfe; - buffer[8] = 0x16; - buffer[9] = 0x79; - - ASSERT.equal(-1.1885958404126936e+148, - mod_ctype.rdouble(buffer, 'big', 0)); - ASSERT.equal(-2.4299184080448593e-88, - mod_ctype.rdouble(buffer, 'big', 1)); - ASSERT.equal(-0.000015130017658081283, - mod_ctype.rdouble(buffer, 'big', 2)); - - ASSERT.equal(-5.757458694845505e+302, - mod_ctype.rdouble(buffer, 'little', 0)); - ASSERT.equal(6.436459604192476e-198, - mod_ctype.rdouble(buffer, 'little', 1)); - ASSERT.equal(1.9903745632417286e+275, - mod_ctype.rdouble(buffer, 'little', 2)); -} - -testfloat(); -testdouble(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.wfloat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.wfloat.js deleted file mode 100644 index b5fd95cd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.wfloat.js +++ /dev/null @@ -1,753 +0,0 @@ -/* - * Another place to find bugs that may yet plague us. This time with writing out - * floats to arrays. We are lazy and did basically just take the opposite of our - * test code to read in values. - */ - -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - - -/* - * A useful thing to keep around for debugging - * console.log('buffer[0]: ' + buffer[0].toString(16)); - * console.log('buffer[1]: ' + buffer[1].toString(16)); - * console.log('buffer[2]: ' + buffer[2].toString(16)); - * console.log('buffer[3]: ' + buffer[3].toString(16)); - * console.log('buffer[4]: ' + buffer[4].toString(16)); - * console.log('buffer[5]: ' + buffer[5].toString(16)); - * console.log('buffer[6]: ' + buffer[6].toString(16)); - * console.log('buffer[7]: ' + buffer[7].toString(16)); - */ - -function testfloat() -{ - var buffer = new Buffer(4); - mod_ctype.wfloat(0, 'big', buffer, 0); - /* Start off with some of the easy ones: +zero */ - ASSERT.equal(0, buffer[0]); - ASSERT.equal(0, buffer[1]); - ASSERT.equal(0, buffer[2]); - ASSERT.equal(0, buffer[3]); - mod_ctype.wfloat(0, 'little', buffer, 0); - ASSERT.equal(0, buffer[0]); - ASSERT.equal(0, buffer[1]); - ASSERT.equal(0, buffer[2]); - ASSERT.equal(0, buffer[3]); - - /* Catch +infin */ - mod_ctype.wfloat(Number.POSITIVE_INFINITY, 'big', buffer, 0); - ASSERT.equal(0x7f, buffer[0]); - ASSERT.equal(0x80, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - mod_ctype.wfloat(Number.POSITIVE_INFINITY, 'little', buffer, 0); - ASSERT.equal(0x7f, buffer[3]); - ASSERT.equal(0x80, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - /* Catch -infin */ - mod_ctype.wfloat(Number.NEGATIVE_INFINITY, 'big', buffer, 0); - ASSERT.equal(0xff, buffer[0]); - ASSERT.equal(0x80, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - mod_ctype.wfloat(Number.NEGATIVE_INFINITY, 'little', buffer, 0); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0x80, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - /* Catch NaN */ - - /* - * NaN Is a litle weird in its requirements, so we're going to encode a - * bit of how we actually implement it into this test. Probably not the - * best, since technically the sign is a don't care and the mantissa - * needs to just be non-zero. - */ - mod_ctype.wfloat(NaN, 'big', buffer, 0); - ASSERT.equal(0x7f, buffer[0]); - ASSERT.equal(0x80, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x17, buffer[3]); - mod_ctype.wfloat(NaN, 'little', buffer, 0); - ASSERT.equal(0x7f, buffer[3]); - ASSERT.equal(0x80, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x17, buffer[0]); - - /* On to some basic tests */ - /* 1.125 */ - mod_ctype.wfloat(1.125, 'big', buffer, 0); - ASSERT.equal(0x3f, buffer[0]); - ASSERT.equal(0x90, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - mod_ctype.wfloat(1.125, 'little', buffer, 0); - ASSERT.equal(0x3f, buffer[3]); - ASSERT.equal(0x90, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - mod_ctype.wfloat(1.0000001192092896, 'big', buffer, 0); - ASSERT.equal(0x3f, buffer[0]); - ASSERT.equal(0x80, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x01, buffer[3]); - mod_ctype.wfloat(1.0000001192092896, 'little', buffer, 0); - ASSERT.equal(0x3f, buffer[3]); - ASSERT.equal(0x80, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x01, buffer[0]); - - mod_ctype.wfloat(1.0000001192092896, 'big', buffer, 0); - ASSERT.equal(0x3f, buffer[0]); - ASSERT.equal(0x80, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x01, buffer[3]); - mod_ctype.wfloat(1.0000001192092896, 'little', buffer, 0); - ASSERT.equal(0x3f, buffer[3]); - ASSERT.equal(0x80, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x01, buffer[0]); - - mod_ctype.wfloat(2.3283067140944524e-10, 'big', buffer, 0); - ASSERT.equal(0x2f, buffer[0]); - ASSERT.equal(0x80, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x01, buffer[3]); - mod_ctype.wfloat(2.3283067140944524e-10, 'little', buffer, 0); - ASSERT.equal(0x2f, buffer[3]); - ASSERT.equal(0x80, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x01, buffer[0]); - - /* ff34a2b0 -2.4010576103645774e+38 */ - mod_ctype.wfloat(-2.4010576103645774e+38, - 'big', buffer, 0); - ASSERT.equal(0xff, buffer[0]); - ASSERT.equal(0x34, buffer[1]); - ASSERT.equal(0xa2, buffer[2]); - ASSERT.equal(0xb0, buffer[3]); - mod_ctype.wfloat(-2.4010576103645774e+38, - 'little', buffer, 0); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0x34, buffer[2]); - ASSERT.equal(0xa2, buffer[1]); - ASSERT.equal(0xb0, buffer[0]); - - /* Denormalized tests */ - - /* 0003f89a +/- 3.6468792534053364e-40 */ - mod_ctype.wfloat(3.6468792534053364e-40, - 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x03, buffer[1]); - ASSERT.equal(0xf8, buffer[2]); - ASSERT.equal(0x9a, buffer[3]); - mod_ctype.wfloat(3.6468792534053364e-40, - 'little', buffer, 0); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x03, buffer[2]); - ASSERT.equal(0xf8, buffer[1]); - ASSERT.equal(0x9a, buffer[0]); - - mod_ctype.wfloat(-3.6468792534053364e-40, - 'big', buffer, 0); - ASSERT.equal(0x80, buffer[0]); - ASSERT.equal(0x03, buffer[1]); - ASSERT.equal(0xf8, buffer[2]); - ASSERT.equal(0x9a, buffer[3]); - mod_ctype.wfloat(-3.6468792534053364e-40, - 'little', buffer, 0); - ASSERT.equal(0x80, buffer[3]); - ASSERT.equal(0x03, buffer[2]); - ASSERT.equal(0xf8, buffer[1]); - ASSERT.equal(0x9a, buffer[0]); - - /* Maximum and minimum normalized and denormalized values */ - - /* Largest normalized number +/- 3.4028234663852886e+38 */ - - mod_ctype.wfloat(3.4028234663852886e+38, - 'big', buffer, 0); - ASSERT.equal(0x7f, buffer[0]); - ASSERT.equal(0x7f, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - mod_ctype.wfloat(3.4028234663852886e+38, - 'little', buffer, 0); - ASSERT.equal(0x7f, buffer[3]); - ASSERT.equal(0x7f, buffer[2]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[0]); - - mod_ctype.wfloat(-3.4028234663852886e+38, - 'big', buffer, 0); - ASSERT.equal(0xff, buffer[0]); - ASSERT.equal(0x7f, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - mod_ctype.wfloat(-3.4028234663852886e+38, - 'little', buffer, 0); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0x7f, buffer[2]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[0]); - - /* Smallest normalied number +/- 1.1754943508222875e-38 */ - - mod_ctype.wfloat(1.1754943508222875e-38, - 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x80, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - mod_ctype.wfloat(1.1754943508222875e-38, - 'little', buffer, 0); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x80, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - mod_ctype.wfloat(-1.1754943508222875e-38, - 'big', buffer, 0); - ASSERT.equal(0x80, buffer[0]); - ASSERT.equal(0x80, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - mod_ctype.wfloat(-1.1754943508222875e-38, - 'little', buffer, 0); - ASSERT.equal(0x80, buffer[3]); - ASSERT.equal(0x80, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - /* Smallest denormalized number 1.401298464324817e-45 */ - mod_ctype.wfloat(1.401298464324817e-45, - 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x01, buffer[3]); - mod_ctype.wfloat(1.401298464324817e-45, - 'little', buffer, 0); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x01, buffer[0]); - - mod_ctype.wfloat(-1.401298464324817e-45, - 'big', buffer, 0); - ASSERT.equal(0x80, buffer[0]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x01, buffer[3]); - mod_ctype.wfloat(-1.401298464324817e-45, - 'little', buffer, 0); - ASSERT.equal(0x80, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x01, buffer[0]); - - /* Largest denormalized value +/- 1.1754942106924411e-38 */ - - mod_ctype.wfloat(1.1754942106924411e-38, - 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x7f, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - mod_ctype.wfloat(1.1754942106924411e-38, - 'little', buffer, 0); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x7f, buffer[2]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[0]); - - mod_ctype.wfloat(-1.1754942106924411e-38, - 'big', buffer, 0); - ASSERT.equal(0x80, buffer[0]); - ASSERT.equal(0x7f, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - mod_ctype.wfloat(-1.1754942106924411e-38, - 'little', buffer, 0); - ASSERT.equal(0x80, buffer[3]); - ASSERT.equal(0x7f, buffer[2]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[0]); - - /* Do some quick offset testing */ - buffer = new Buffer(6); - mod_ctype.wfloat(-1.2027516403607578e-32, - 'big', buffer, 2); - ASSERT.equal(0x8a, buffer[2]); - ASSERT.equal(0x79, buffer[3]); - ASSERT.equal(0xcd, buffer[4]); - ASSERT.equal(0x3f, buffer[5]); - - mod_ctype.wfloat(-1.2027516403607578e-32, - 'little', buffer, 2); - ASSERT.equal(0x8a, buffer[5]); - ASSERT.equal(0x79, buffer[4]); - ASSERT.equal(0xcd, buffer[3]); - ASSERT.equal(0x3f, buffer[2]); - -} - -function testdouble() -{ - var buffer = new Buffer(10); - - /* Check 0 */ - mod_ctype.wdouble(0, 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[7]); - mod_ctype.wdouble(0, 'little', buffer, 0); - ASSERT.equal(0x00, buffer[7]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - /* Check NaN */ - /* Similar to floats we are only generating a subset of values */ - mod_ctype.wdouble(NaN, 'big', buffer, 0); - ASSERT.equal(0x7f, buffer[0]); - ASSERT.equal(0xf0, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x17, buffer[7]); - mod_ctype.wdouble(NaN, 'little', buffer, 0); - ASSERT.equal(0x7f, buffer[7]); - ASSERT.equal(0xf0, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x17, buffer[0]); - - /* pos inf */ - mod_ctype.wdouble(Number.POSITIVE_INFINITY, - 'big', buffer, 0); - ASSERT.equal(0x7f, buffer[0]); - ASSERT.equal(0xf0, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[7]); - mod_ctype.wdouble(Number.POSITIVE_INFINITY, - 'little', buffer, 0); - ASSERT.equal(0x7f, buffer[7]); - ASSERT.equal(0xf0, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - /* neg inf */ - mod_ctype.wdouble(Number.NEGATIVE_INFINITY, - 'big', buffer, 0); - ASSERT.equal(0xff, buffer[0]); - ASSERT.equal(0xf0, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[7]); - mod_ctype.wdouble(Number.NEGATIVE_INFINITY, - 'little', buffer, 0); - ASSERT.equal(0xff, buffer[7]); - ASSERT.equal(0xf0, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - /* Simple normalized values */ - - /* +/- 1.125 */ - mod_ctype.wdouble(1.125, - 'big', buffer, 0); - ASSERT.equal(0x3f, buffer[0]); - ASSERT.equal(0xf2, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[7]); - - mod_ctype.wdouble(1.125, - 'little', buffer, 0); - ASSERT.equal(0x3f, buffer[7]); - ASSERT.equal(0xf2, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - mod_ctype.wdouble(-1.125, - 'big', buffer, 0); - ASSERT.equal(0xbf, buffer[0]); - ASSERT.equal(0xf2, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[7]); - - mod_ctype.wdouble(-1.125, - 'little', buffer, 0); - ASSERT.equal(0xbf, buffer[7]); - ASSERT.equal(0xf2, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - - /* +/- 1.4397318913736026e+283 */ - mod_ctype.wdouble(1.4397318913736026e+283, - 'big', buffer, 0); - ASSERT.equal(0x7a, buffer[0]); - ASSERT.equal(0xb8, buffer[1]); - ASSERT.equal(0xc9, buffer[2]); - ASSERT.equal(0x34, buffer[3]); - ASSERT.equal(0x72, buffer[4]); - ASSERT.equal(0x16, buffer[5]); - ASSERT.equal(0xf9, buffer[6]); - ASSERT.equal(0x0e, buffer[7]); - - mod_ctype.wdouble(1.4397318913736026e+283, - 'little', buffer, 0); - ASSERT.equal(0x7a, buffer[7]); - ASSERT.equal(0xb8, buffer[6]); - ASSERT.equal(0xc9, buffer[5]); - ASSERT.equal(0x34, buffer[4]); - ASSERT.equal(0x72, buffer[3]); - ASSERT.equal(0x16, buffer[2]); - ASSERT.equal(0xf9, buffer[1]); - ASSERT.equal(0x0e, buffer[0]); - - mod_ctype.wdouble(-1.4397318913736026e+283, - 'big', buffer, 0); - ASSERT.equal(0xfa, buffer[0]); - ASSERT.equal(0xb8, buffer[1]); - ASSERT.equal(0xc9, buffer[2]); - ASSERT.equal(0x34, buffer[3]); - ASSERT.equal(0x72, buffer[4]); - ASSERT.equal(0x16, buffer[5]); - ASSERT.equal(0xf9, buffer[6]); - ASSERT.equal(0x0e, buffer[7]); - - mod_ctype.wdouble(-1.4397318913736026e+283, - 'little', buffer, 0); - ASSERT.equal(0xfa, buffer[7]); - ASSERT.equal(0xb8, buffer[6]); - ASSERT.equal(0xc9, buffer[5]); - ASSERT.equal(0x34, buffer[4]); - ASSERT.equal(0x72, buffer[3]); - ASSERT.equal(0x16, buffer[2]); - ASSERT.equal(0xf9, buffer[1]); - ASSERT.equal(0x0e, buffer[0]); - - /* Denormalized values */ - /* +/- 8.82521232268344e-309 */ - mod_ctype.wdouble(8.82521232268344e-309, - 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x06, buffer[1]); - ASSERT.equal(0x58, buffer[2]); - ASSERT.equal(0x94, buffer[3]); - ASSERT.equal(0x13, buffer[4]); - ASSERT.equal(0x27, buffer[5]); - ASSERT.equal(0x8a, buffer[6]); - ASSERT.equal(0xcd, buffer[7]); - - mod_ctype.wdouble(8.82521232268344e-309, - 'little', buffer, 0); - ASSERT.equal(0x00, buffer[7]); - ASSERT.equal(0x06, buffer[6]); - ASSERT.equal(0x58, buffer[5]); - ASSERT.equal(0x94, buffer[4]); - ASSERT.equal(0x13, buffer[3]); - ASSERT.equal(0x27, buffer[2]); - ASSERT.equal(0x8a, buffer[1]); - ASSERT.equal(0xcd, buffer[0]); - - mod_ctype.wdouble(-8.82521232268344e-309, - 'big', buffer, 0); - ASSERT.equal(0x80, buffer[0]); - ASSERT.equal(0x06, buffer[1]); - ASSERT.equal(0x58, buffer[2]); - ASSERT.equal(0x94, buffer[3]); - ASSERT.equal(0x13, buffer[4]); - ASSERT.equal(0x27, buffer[5]); - ASSERT.equal(0x8a, buffer[6]); - ASSERT.equal(0xcd, buffer[7]); - - mod_ctype.wdouble(-8.82521232268344e-309, - 'little', buffer, 0); - ASSERT.equal(0x80, buffer[7]); - ASSERT.equal(0x06, buffer[6]); - ASSERT.equal(0x58, buffer[5]); - ASSERT.equal(0x94, buffer[4]); - ASSERT.equal(0x13, buffer[3]); - ASSERT.equal(0x27, buffer[2]); - ASSERT.equal(0x8a, buffer[1]); - ASSERT.equal(0xcd, buffer[0]); - - - /* Edge cases, maximum and minimum values */ - - /* Smallest denormalized value 5e-324 */ - mod_ctype.wdouble(5e-324, - 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x01, buffer[7]); - - mod_ctype.wdouble(5e-324, - 'little', buffer, 0); - ASSERT.equal(0x00, buffer[7]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x01, buffer[0]); - - mod_ctype.wdouble(-5e-324, - 'big', buffer, 0); - ASSERT.equal(0x80, buffer[0]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x01, buffer[7]); - - mod_ctype.wdouble(-5e-324, - 'little', buffer, 0); - ASSERT.equal(0x80, buffer[7]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x01, buffer[0]); - - - - /* Largest denormalized value 2.225073858507201e-308 */ - mod_ctype.wdouble(2.225073858507201e-308, - 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x0f, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0xff, buffer[4]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[6]); - ASSERT.equal(0xff, buffer[7]); - - mod_ctype.wdouble(2.225073858507201e-308, - 'little', buffer, 0); - ASSERT.equal(0x00, buffer[7]); - ASSERT.equal(0x0f, buffer[6]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[4]); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[0]); - - mod_ctype.wdouble(-2.225073858507201e-308, - 'big', buffer, 0); - ASSERT.equal(0x80, buffer[0]); - ASSERT.equal(0x0f, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0xff, buffer[4]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[6]); - ASSERT.equal(0xff, buffer[7]); - - mod_ctype.wdouble(-2.225073858507201e-308, - 'little', buffer, 0); - ASSERT.equal(0x80, buffer[7]); - ASSERT.equal(0x0f, buffer[6]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[4]); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[0]); - - - /* Smallest normalized value 2.2250738585072014e-308 */ - mod_ctype.wdouble(2.2250738585072014e-308, - 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x10, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[7]); - - mod_ctype.wdouble(2.2250738585072014e-308, - 'little', buffer, 0); - ASSERT.equal(0x00, buffer[7]); - ASSERT.equal(0x10, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - mod_ctype.wdouble(-2.2250738585072014e-308, - 'big', buffer, 0); - ASSERT.equal(0x80, buffer[0]); - ASSERT.equal(0x10, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[7]); - - mod_ctype.wdouble(-2.2250738585072014e-308, - 'little', buffer, 0); - ASSERT.equal(0x80, buffer[7]); - ASSERT.equal(0x10, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - - /* Largest normalized value 1.7976931348623157e+308 */ - mod_ctype.wdouble(1.7976931348623157e+308, - 'big', buffer, 0); - ASSERT.equal(0x7f, buffer[0]); - ASSERT.equal(0xef, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0xff, buffer[4]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[6]); - ASSERT.equal(0xff, buffer[7]); - - mod_ctype.wdouble(1.7976931348623157e+308, - 'little', buffer, 0); - ASSERT.equal(0x7f, buffer[7]); - ASSERT.equal(0xef, buffer[6]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[4]); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[0]); - - mod_ctype.wdouble(-1.7976931348623157e+308, - 'big', buffer, 0); - ASSERT.equal(0xff, buffer[0]); - ASSERT.equal(0xef, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0xff, buffer[4]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[6]); - ASSERT.equal(0xff, buffer[7]); - - mod_ctype.wdouble(-1.7976931348623157e+308, - 'little', buffer, 0); - ASSERT.equal(0xff, buffer[7]); - ASSERT.equal(0xef, buffer[6]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[4]); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[0]); - - - /* Try offsets */ - buffer[0] = 0xde; - buffer[1] = 0xad; - buffer[2] = 0xbe; - buffer[3] = 0xef; - buffer[4] = 0xba; - buffer[5] = 0xdd; - buffer[6] = 0xca; - buffer[7] = 0xfe; - buffer[8] = 0x16; - buffer[9] = 0x79; - - mod_ctype.wdouble(-0.000015130017658081283, - 'big', buffer, 2); - ASSERT.equal(0xbe, buffer[2]); - ASSERT.equal(0xef, buffer[3]); - ASSERT.equal(0xba, buffer[4]); - ASSERT.equal(0xdd, buffer[5]); - ASSERT.equal(0xca, buffer[6]); - ASSERT.equal(0xfe, buffer[7]); - ASSERT.equal(0x16, buffer[8]); - ASSERT.equal(0x79, buffer[9]); - - mod_ctype.wdouble(-0.000015130017658081283, - 'little', buffer, 2); - ASSERT.equal(0xbe, buffer[9]); - ASSERT.equal(0xef, buffer[8]); - ASSERT.equal(0xba, buffer[7]); - ASSERT.equal(0xdd, buffer[6]); - ASSERT.equal(0xca, buffer[5]); - ASSERT.equal(0xfe, buffer[4]); - ASSERT.equal(0x16, buffer[3]); - ASSERT.equal(0x79, buffer[2]); -} - -testfloat(); -testdouble(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.64.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.64.js deleted file mode 100644 index 1ffdac09..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.64.js +++ /dev/null @@ -1,638 +0,0 @@ -/* - * Test our ability to read and write signed 64-bit integers. - */ - -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - -function testRead() -{ - var res, data; - data = new Buffer(10); - - data[0] = 0x32; - data[1] = 0x65; - data[2] = 0x42; - data[3] = 0x56; - data[4] = 0x23; - data[5] = 0xff; - data[6] = 0xff; - data[7] = 0xff; - data[8] = 0x89; - data[9] = 0x11; - res = mod_ctype.rsint64(data, 'big', 0); - ASSERT.equal(0x32654256, res[0]); - ASSERT.equal(0x23ffffff, res[1]); - res = mod_ctype.rsint64(data, 'big', 1); - ASSERT.equal(0x65425623, res[0]); - ASSERT.equal(0xffffff89, res[1]); - res = mod_ctype.rsint64(data, 'big', 2); - ASSERT.equal(0x425623ff, res[0]); - ASSERT.equal(0xffff8911, res[1]); - res = mod_ctype.rsint64(data, 'little', 0); - ASSERT.equal(-0x000000dc, res[0]); - ASSERT.equal(-0xa9bd9ace, res[1]); - res = mod_ctype.rsint64(data, 'little', 1); - ASSERT.equal(-0x76000000, res[0]); - ASSERT.equal(-0xdca9bd9b, res[1]); - res = mod_ctype.rsint64(data, 'little', 2); - ASSERT.equal(0x1189ffff, res[0]); - ASSERT.equal(0xff235642, res[1]); - - data.fill(0x00); - res = mod_ctype.rsint64(data, 'big', 0); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(0x00000000, res[1]); - res = mod_ctype.rsint64(data, 'big', 1); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(0x00000000, res[1]); - res = mod_ctype.rsint64(data, 'big', 2); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(0x00000000, res[1]); - res = mod_ctype.rsint64(data, 'little', 0); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(0x00000000, res[1]); - res = mod_ctype.rsint64(data, 'little', 1); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(0x00000000, res[1]); - res = mod_ctype.rsint64(data, 'little', 2); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(0x00000000, res[1]); - - data.fill(0xff); - res = mod_ctype.rsint64(data, 'big', 0); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(-1, res[1]); - res = mod_ctype.rsint64(data, 'big', 1); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(-1, res[1]); - res = mod_ctype.rsint64(data, 'big', 2); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(-1, res[1]); - res = mod_ctype.rsint64(data, 'little', 0); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(-1, res[1]); - res = mod_ctype.rsint64(data, 'little', 1); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(-1, res[1]); - res = mod_ctype.rsint64(data, 'little', 2); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(-1, res[1]); - - data[0] = 0x80; - data[1] = 0x00; - data[2] = 0x00; - data[3] = 0x00; - data[4] = 0x00; - data[5] = 0x00; - data[6] = 0x00; - data[7] = 0x00; - res = mod_ctype.rsint64(data, 'big', 0); - ASSERT.equal(-0x80000000, res[0]); - ASSERT.equal(0, res[1]); - - - data[7] = 0x80; - data[6] = 0x00; - data[5] = 0x00; - data[4] = 0x00; - data[3] = 0x00; - data[2] = 0x00; - data[1] = 0x00; - data[0] = 0x00; - res = mod_ctype.rsint64(data, 'little', 0); - ASSERT.equal(-0x80000000, res[0]); - ASSERT.equal(0, res[1]); - - data[0] = 0x80; - data[1] = 0x00; - data[2] = 0x00; - data[3] = 0x00; - data[4] = 0x00; - data[5] = 0x00; - data[6] = 0x00; - data[7] = 0x01; - res = mod_ctype.rsint64(data, 'big', 0); - ASSERT.equal(-0x7fffffff, res[0]); - ASSERT.equal(-0xffffffff, res[1]); - - -} - -function testWriteZero() -{ - var data, buf; - buf = new Buffer(10); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wsint64(data, 'big', buf, 0); - ASSERT.equal(0, buf[0]); - ASSERT.equal(0, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wsint64(data, 'big', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wsint64(data, 'big', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0, buf[8]); - ASSERT.equal(0, buf[9]); - - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wsint64(data, 'little', buf, 0); - ASSERT.equal(0, buf[0]); - ASSERT.equal(0, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wsint64(data, 'little', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wsint64(data, 'little', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0, buf[8]); - ASSERT.equal(0, buf[9]); -} - -/* - * Also include tests that are going to force us to go into a negative value and - * insure that it's written correctly. - */ -function testWrite() -{ - var data, buf; - - buf = new Buffer(10); - data = [ 0x234456, 0x87 ]; - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 0); - ASSERT.equal(0x00, buf[0]); - ASSERT.equal(0x23, buf[1]); - ASSERT.equal(0x44, buf[2]); - ASSERT.equal(0x56, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x87, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x23, buf[2]); - ASSERT.equal(0x44, buf[3]); - ASSERT.equal(0x56, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x87, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x23, buf[3]); - ASSERT.equal(0x44, buf[4]); - ASSERT.equal(0x56, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x00, buf[8]); - ASSERT.equal(0x87, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 0); - ASSERT.equal(0x87, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x56, buf[4]); - ASSERT.equal(0x44, buf[5]); - ASSERT.equal(0x23, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x87, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x56, buf[5]); - ASSERT.equal(0x44, buf[6]); - ASSERT.equal(0x23, buf[7]); - ASSERT.equal(0x00, buf[8]); - ASSERT.equal(0x66, buf[9]); - - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0x87, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x56, buf[6]); - ASSERT.equal(0x44, buf[7]); - ASSERT.equal(0x23, buf[8]); - ASSERT.equal(0x00, buf[9]); - - data = [0x3421, 0x34abcdba]; - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 0); - ASSERT.equal(0x00, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x34, buf[2]); - ASSERT.equal(0x21, buf[3]); - ASSERT.equal(0x34, buf[4]); - ASSERT.equal(0xab, buf[5]); - ASSERT.equal(0xcd, buf[6]); - ASSERT.equal(0xba, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x34, buf[3]); - ASSERT.equal(0x21, buf[4]); - ASSERT.equal(0x34, buf[5]); - ASSERT.equal(0xab, buf[6]); - ASSERT.equal(0xcd, buf[7]); - ASSERT.equal(0xba, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x34, buf[4]); - ASSERT.equal(0x21, buf[5]); - ASSERT.equal(0x34, buf[6]); - ASSERT.equal(0xab, buf[7]); - ASSERT.equal(0xcd, buf[8]); - ASSERT.equal(0xba, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 0); - ASSERT.equal(0xba, buf[0]); - ASSERT.equal(0xcd, buf[1]); - ASSERT.equal(0xab, buf[2]); - ASSERT.equal(0x34, buf[3]); - ASSERT.equal(0x21, buf[4]); - ASSERT.equal(0x34, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0xba, buf[1]); - ASSERT.equal(0xcd, buf[2]); - ASSERT.equal(0xab, buf[3]); - ASSERT.equal(0x34, buf[4]); - ASSERT.equal(0x21, buf[5]); - ASSERT.equal(0x34, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x00, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0xba, buf[2]); - ASSERT.equal(0xcd, buf[3]); - ASSERT.equal(0xab, buf[4]); - ASSERT.equal(0x34, buf[5]); - ASSERT.equal(0x21, buf[6]); - ASSERT.equal(0x34, buf[7]); - ASSERT.equal(0x00, buf[8]); - ASSERT.equal(0x00, buf[9]); - - - data = [ -0x80000000, 0 ]; - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 0); - ASSERT.equal(0x80, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 0); - ASSERT.equal(0x00, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x80, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - data = [ -0x7fffffff, -0xffffffff ]; - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 0); - ASSERT.equal(0x80, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x01, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 0); - ASSERT.equal(0x01, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x80, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - data = [ 0x0, -0x1]; - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 0); - ASSERT.equal(0xff, buf[0]); - ASSERT.equal(0xff, buf[1]); - ASSERT.equal(0xff, buf[2]); - ASSERT.equal(0xff, buf[3]); - ASSERT.equal(0xff, buf[4]); - ASSERT.equal(0xff, buf[5]); - ASSERT.equal(0xff, buf[6]); - ASSERT.equal(0xff, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 0); - ASSERT.equal(0xff, buf[0]); - ASSERT.equal(0xff, buf[1]); - ASSERT.equal(0xff, buf[2]); - ASSERT.equal(0xff, buf[3]); - ASSERT.equal(0xff, buf[4]); - ASSERT.equal(0xff, buf[5]); - ASSERT.equal(0xff, buf[6]); - ASSERT.equal(0xff, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); -} - -/* - * Make sure we catch invalid writes. - */ -function testWriteInvalid() -{ - var data, buf; - - /* Buffer too small */ - buf = new Buffer(4); - data = [ 0, 0]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 0); - }, Error, 'buffer too small'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 0); - }, Error, 'buffer too small'); - - /* Beyond the end of the buffer */ - buf = new Buffer(12); - data = [ 0, 0]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 11); - }, Error, 'write beyond end of buffer'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 11); - }, Error, 'write beyond end of buffer'); - - /* Write fractional values */ - buf = new Buffer(12); - data = [ 3.33, 0 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ 0, 3.3 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ -3.33, 0 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ 0, -3.3 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ 3.33, 2.42 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ 3.33, -2.42 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ -3.33, -2.42 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ -3.33, 2.42 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - /* Signs don't match */ - buf = new Buffer(12); - data = [ 0x800000, -0x32 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ -0x800000, 0x32 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - /* Write values that are too large */ - buf = new Buffer(12); - data = [ 0x80000000, 0 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ 0x7fffffff, 0x100000000 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ 0x00, 0x800000000 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ 0xffffffffff, 0xffffff238 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ 0x23, 0xffffff238 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ -0x80000000, -0xfff238 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ -0x80000004, -0xfff238 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); -} - - -testRead(); -testWrite(); -testWriteZero(); -testWriteInvalid(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.rint.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.rint.js deleted file mode 100644 index 5236d268..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.rint.js +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Tests to verify we're reading in signed integers correctly - */ -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - -/* - * Test 8 bit signed integers - */ -function test8() -{ - var data = new Buffer(4); - - data[0] = 0x23; - ASSERT.equal(0x23, mod_ctype.rsint8(data, 'big', 0)); - ASSERT.equal(0x23, mod_ctype.rsint8(data, 'little', 0)); - - data[0] = 0xff; - ASSERT.equal(-1, mod_ctype.rsint8(data, 'big', 0)); - ASSERT.equal(-1, mod_ctype.rsint8(data, 'little', 0)); - - data[0] = 0x87; - data[1] = 0xab; - data[2] = 0x7c; - data[3] = 0xef; - ASSERT.equal(-121, mod_ctype.rsint8(data, 'big', 0)); - ASSERT.equal(-85, mod_ctype.rsint8(data, 'big', 1)); - ASSERT.equal(124, mod_ctype.rsint8(data, 'big', 2)); - ASSERT.equal(-17, mod_ctype.rsint8(data, 'big', 3)); - ASSERT.equal(-121, mod_ctype.rsint8(data, 'little', 0)); - ASSERT.equal(-85, mod_ctype.rsint8(data, 'little', 1)); - ASSERT.equal(124, mod_ctype.rsint8(data, 'little', 2)); - ASSERT.equal(-17, mod_ctype.rsint8(data, 'little', 3)); -} - -function test16() -{ - var buffer = new Buffer(6); - buffer[0] = 0x16; - buffer[1] = 0x79; - ASSERT.equal(0x1679, mod_ctype.rsint16(buffer, 'big', 0)); - ASSERT.equal(0x7916, mod_ctype.rsint16(buffer, 'little', 0)); - - buffer[0] = 0xff; - buffer[1] = 0x80; - ASSERT.equal(-128, mod_ctype.rsint16(buffer, 'big', 0)); - ASSERT.equal(-32513, mod_ctype.rsint16(buffer, 'little', 0)); - - /* test offset with weenix */ - buffer[0] = 0x77; - buffer[1] = 0x65; - buffer[2] = 0x65; - buffer[3] = 0x6e; - buffer[4] = 0x69; - buffer[5] = 0x78; - ASSERT.equal(0x7765, mod_ctype.rsint16(buffer, 'big', 0)); - ASSERT.equal(0x6565, mod_ctype.rsint16(buffer, 'big', 1)); - ASSERT.equal(0x656e, mod_ctype.rsint16(buffer, 'big', 2)); - ASSERT.equal(0x6e69, mod_ctype.rsint16(buffer, 'big', 3)); - ASSERT.equal(0x6978, mod_ctype.rsint16(buffer, 'big', 4)); - ASSERT.equal(0x6577, mod_ctype.rsint16(buffer, 'little', 0)); - ASSERT.equal(0x6565, mod_ctype.rsint16(buffer, 'little', 1)); - ASSERT.equal(0x6e65, mod_ctype.rsint16(buffer, 'little', 2)); - ASSERT.equal(0x696e, mod_ctype.rsint16(buffer, 'little', 3)); - ASSERT.equal(0x7869, mod_ctype.rsint16(buffer, 'little', 4)); -} - -function test32() -{ - var buffer = new Buffer(6); - buffer[0] = 0x43; - buffer[1] = 0x53; - buffer[2] = 0x16; - buffer[3] = 0x79; - ASSERT.equal(0x43531679, mod_ctype.rsint32(buffer, 'big', 0)); - ASSERT.equal(0x79165343, mod_ctype.rsint32(buffer, 'little', 0)); - - buffer[0] = 0xff; - buffer[1] = 0xfe; - buffer[2] = 0xef; - buffer[3] = 0xfa; - ASSERT.equal(-69638, mod_ctype.rsint32(buffer, 'big', 0)); - ASSERT.equal(-84934913, mod_ctype.rsint32(buffer, 'little', 0)); - - buffer[0] = 0x42; - buffer[1] = 0xc3; - buffer[2] = 0x95; - buffer[3] = 0xa9; - buffer[4] = 0x36; - buffer[5] = 0x17; - ASSERT.equal(0x42c395a9, mod_ctype.rsint32(buffer, 'big', 0)); - ASSERT.equal(-1013601994, mod_ctype.rsint32(buffer, 'big', 1)); - ASSERT.equal(-1784072681, mod_ctype.rsint32(buffer, 'big', 2)); - ASSERT.equal(-1449802942, mod_ctype.rsint32(buffer, 'little', 0)); - ASSERT.equal(917083587, mod_ctype.rsint32(buffer, 'little', 1)); - ASSERT.equal(389458325, mod_ctype.rsint32(buffer, 'little', 2)); -} - -test8(); -test16(); -test32(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wbounds.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wbounds.js deleted file mode 100644 index 5488177b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wbounds.js +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Test to make sure that we properly are erroring whenever we try to write - * beyond the size of the integer. - */ - -var mod_ctio = require('../../../ctio.js'); -var mod_assert = require('assert'); -var tb = new Buffer(16); /* Largest buffer we'll need */ - -var cases = [ - { func: - function () { - mod_ctio.wsint8(0x80, 'big', tb, 0); - }, test: '+int8_t' }, - { func: - function () { - mod_ctio.wsint8(-0x81, 'big', tb, 0); - }, test: '-int8_t' }, - - { func: - function () { - mod_ctio.wsint16(0x8000, 'big', tb, 0); - }, test: '+int16_t' }, - { func: - function () { - mod_ctio.wsint16(-0x8001, 'big', tb, 0); - }, test: '-int16_t' }, - { func: - function () { - mod_ctio.wsint32(0x80000000, 'big', tb, 0); - }, test: '+int32_t' }, - { func: - function () { - mod_ctio.wsint32(-0x80000001, 'big', tb, 0); - }, test: '-int32_t' }, - { func: - function () { - mod_ctio.wsint64([ 0x80000000, 0 ], 'big', tb, 0); - }, test: '+int64_t' }, - { func: - function () { - mod_ctio.wsint64([ -0x80000000, -1 ], 'big', tb, 0); - }, test: '-int64_t' } -]; - -function test() -{ - var ii; - for (ii = 0; ii < cases.length; ii++) - mod_assert.throws(cases[ii]['func'], Error, cases[ii]['test']); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wint.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wint.js deleted file mode 100644 index 98b6a32a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wint.js +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Tests to verify we're writing signed integers correctly - */ -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - -function test8() -{ - var buffer = new Buffer(4); - mod_ctype.wsint8(0x23, 'big', buffer, 0); - mod_ctype.wsint8(0x23, 'little', buffer, 1); - mod_ctype.wsint8(-5, 'big', buffer, 2); - mod_ctype.wsint8(-5, 'little', buffer, 3); - - ASSERT.equal(0x23, buffer[0]); - ASSERT.equal(0x23, buffer[1]); - ASSERT.equal(0xfb, buffer[2]); - ASSERT.equal(0xfb, buffer[3]); - - /* Make sure we handle truncation correctly */ - ASSERT.throws(function () { - mod_ctype.wsint8(0xabc, 'big', buffer, 0); - }); - ASSERT.throws(function () { - mod_ctype.wsint8(0xabc, 'little', buffer, 0); - }); -} - -function test16() -{ - var buffer = new Buffer(6); - mod_ctype.wsint16(0x0023, 'big', buffer, 0); - mod_ctype.wsint16(0x0023, 'little', buffer, 2); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x23, buffer[1]); - ASSERT.equal(0x23, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - mod_ctype.wsint16(-5, 'big', buffer, 0); - mod_ctype.wsint16(-5, 'little', buffer, 2); - ASSERT.equal(0xff, buffer[0]); - ASSERT.equal(0xfb, buffer[1]); - ASSERT.equal(0xfb, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - - mod_ctype.wsint16(-1679, 'big', buffer, 1); - mod_ctype.wsint16(-1679, 'little', buffer, 3); - ASSERT.equal(0xf9, buffer[1]); - ASSERT.equal(0x71, buffer[2]); - ASSERT.equal(0x71, buffer[3]); - ASSERT.equal(0xf9, buffer[4]); -} - -function test32() -{ - var buffer = new Buffer(8); - mod_ctype.wsint32(0x23, 'big', buffer, 0); - mod_ctype.wsint32(0x23, 'little', buffer, 4); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x23, buffer[3]); - ASSERT.equal(0x23, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[7]); - - mod_ctype.wsint32(-5, 'big', buffer, 0); - mod_ctype.wsint32(-5, 'little', buffer, 4); - ASSERT.equal(0xff, buffer[0]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xfb, buffer[3]); - ASSERT.equal(0xfb, buffer[4]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[6]); - ASSERT.equal(0xff, buffer[7]); - - mod_ctype.wsint32(-805306713, 'big', buffer, 0); - mod_ctype.wsint32(-805306713, 'litle', buffer, 4); - ASSERT.equal(0xcf, buffer[0]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xfe, buffer[2]); - ASSERT.equal(0xa7, buffer[3]); - ASSERT.equal(0xa7, buffer[4]); - ASSERT.equal(0xfe, buffer[5]); - ASSERT.equal(0xff, buffer[6]); - ASSERT.equal(0xcf, buffer[7]); -} - -test8(); -test16(); -test32(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.64.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.64.js deleted file mode 100644 index cf66ac7a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.64.js +++ /dev/null @@ -1,451 +0,0 @@ -/* - * Test our ability to read and write unsigned 64-bit integers. - */ - -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - -function testRead() -{ - var res, data; - data = new Buffer(10); - - data[0] = 0x32; - data[1] = 0x65; - data[2] = 0x42; - data[3] = 0x56; - data[4] = 0x23; - data[5] = 0xff; - data[6] = 0xff; - data[7] = 0xff; - data[8] = 0x89; - data[9] = 0x11; - res = mod_ctype.ruint64(data, 'big', 0); - ASSERT.equal(0x32654256, res[0]); - ASSERT.equal(0x23ffffff, res[1]); - res = mod_ctype.ruint64(data, 'big', 1); - ASSERT.equal(0x65425623, res[0]); - ASSERT.equal(0xffffff89, res[1]); - res = mod_ctype.ruint64(data, 'big', 2); - ASSERT.equal(0x425623ff, res[0]); - ASSERT.equal(0xffff8911, res[1]); - res = mod_ctype.ruint64(data, 'little', 0); - ASSERT.equal(0xffffff23, res[0]); - ASSERT.equal(0x56426532, res[1]); - res = mod_ctype.ruint64(data, 'little', 1); - ASSERT.equal(0x89ffffff, res[0]); - ASSERT.equal(0x23564265, res[1]); - res = mod_ctype.ruint64(data, 'little', 2); - ASSERT.equal(0x1189ffff, res[0]); - ASSERT.equal(0xff235642, res[1]); - -} - -function testReadOver() -{ - var res, data; - data = new Buffer(10); - - data[0] = 0x80; - data[1] = 0xff; - data[2] = 0x80; - data[3] = 0xff; - data[4] = 0x80; - data[5] = 0xff; - data[6] = 0x80; - data[7] = 0xff; - data[8] = 0x80; - data[9] = 0xff; - res = mod_ctype.ruint64(data, 'big', 0); - ASSERT.equal(0x80ff80ff, res[0]); - ASSERT.equal(0x80ff80ff, res[1]); - res = mod_ctype.ruint64(data, 'big', 1); - ASSERT.equal(0xff80ff80, res[0]); - ASSERT.equal(0xff80ff80, res[1]); - res = mod_ctype.ruint64(data, 'big', 2); - ASSERT.equal(0x80ff80ff, res[0]); - ASSERT.equal(0x80ff80ff, res[1]); - res = mod_ctype.ruint64(data, 'little', 0); - ASSERT.equal(0xff80ff80, res[0]); - ASSERT.equal(0xff80ff80, res[1]); - res = mod_ctype.ruint64(data, 'little', 1); - ASSERT.equal(0x80ff80ff, res[0]); - ASSERT.equal(0x80ff80ff, res[1]); - res = mod_ctype.ruint64(data, 'little', 2); - ASSERT.equal(0xff80ff80, res[0]); - ASSERT.equal(0xff80ff80, res[1]); -} - -function testWriteZero() -{ - var data, buf; - buf = new Buffer(10); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wuint64(data, 'big', buf, 0); - ASSERT.equal(0, buf[0]); - ASSERT.equal(0, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wuint64(data, 'big', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wuint64(data, 'big', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0, buf[8]); - ASSERT.equal(0, buf[9]); - - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wuint64(data, 'little', buf, 0); - ASSERT.equal(0, buf[0]); - ASSERT.equal(0, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wuint64(data, 'little', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wuint64(data, 'little', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0, buf[8]); - ASSERT.equal(0, buf[9]); -} - -/* - * Also include tests that are going to force us to go into a negative value and - * insure that it's written correctly. - */ -function testWrite() -{ - var data, buf; - - buf = new Buffer(10); - data = [ 0x234456, 0x87 ]; - buf.fill(0x66); - mod_ctype.wuint64(data, 'big', buf, 0); - ASSERT.equal(0x00, buf[0]); - ASSERT.equal(0x23, buf[1]); - ASSERT.equal(0x44, buf[2]); - ASSERT.equal(0x56, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x87, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'big', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x23, buf[2]); - ASSERT.equal(0x44, buf[3]); - ASSERT.equal(0x56, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x87, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'big', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x23, buf[3]); - ASSERT.equal(0x44, buf[4]); - ASSERT.equal(0x56, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x00, buf[8]); - ASSERT.equal(0x87, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'little', buf, 0); - ASSERT.equal(0x87, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x56, buf[4]); - ASSERT.equal(0x44, buf[5]); - ASSERT.equal(0x23, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'little', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x87, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x56, buf[5]); - ASSERT.equal(0x44, buf[6]); - ASSERT.equal(0x23, buf[7]); - ASSERT.equal(0x00, buf[8]); - ASSERT.equal(0x66, buf[9]); - - - buf.fill(0x66); - mod_ctype.wuint64(data, 'little', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0x87, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x56, buf[6]); - ASSERT.equal(0x44, buf[7]); - ASSERT.equal(0x23, buf[8]); - ASSERT.equal(0x00, buf[9]); - - data = [0xffff3421, 0x34abcdba]; - buf.fill(0x66); - mod_ctype.wuint64(data, 'big', buf, 0); - ASSERT.equal(0xff, buf[0]); - ASSERT.equal(0xff, buf[1]); - ASSERT.equal(0x34, buf[2]); - ASSERT.equal(0x21, buf[3]); - ASSERT.equal(0x34, buf[4]); - ASSERT.equal(0xab, buf[5]); - ASSERT.equal(0xcd, buf[6]); - ASSERT.equal(0xba, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'big', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0xff, buf[1]); - ASSERT.equal(0xff, buf[2]); - ASSERT.equal(0x34, buf[3]); - ASSERT.equal(0x21, buf[4]); - ASSERT.equal(0x34, buf[5]); - ASSERT.equal(0xab, buf[6]); - ASSERT.equal(0xcd, buf[7]); - ASSERT.equal(0xba, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'big', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0xff, buf[2]); - ASSERT.equal(0xff, buf[3]); - ASSERT.equal(0x34, buf[4]); - ASSERT.equal(0x21, buf[5]); - ASSERT.equal(0x34, buf[6]); - ASSERT.equal(0xab, buf[7]); - ASSERT.equal(0xcd, buf[8]); - ASSERT.equal(0xba, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'little', buf, 0); - ASSERT.equal(0xba, buf[0]); - ASSERT.equal(0xcd, buf[1]); - ASSERT.equal(0xab, buf[2]); - ASSERT.equal(0x34, buf[3]); - ASSERT.equal(0x21, buf[4]); - ASSERT.equal(0x34, buf[5]); - ASSERT.equal(0xff, buf[6]); - ASSERT.equal(0xff, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'little', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0xba, buf[1]); - ASSERT.equal(0xcd, buf[2]); - ASSERT.equal(0xab, buf[3]); - ASSERT.equal(0x34, buf[4]); - ASSERT.equal(0x21, buf[5]); - ASSERT.equal(0x34, buf[6]); - ASSERT.equal(0xff, buf[7]); - ASSERT.equal(0xff, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'little', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0xba, buf[2]); - ASSERT.equal(0xcd, buf[3]); - ASSERT.equal(0xab, buf[4]); - ASSERT.equal(0x34, buf[5]); - ASSERT.equal(0x21, buf[6]); - ASSERT.equal(0x34, buf[7]); - ASSERT.equal(0xff, buf[8]); - ASSERT.equal(0xff, buf[9]); -} - -/* - * Make sure we catch invalid writes. - */ -function testWriteInvalid() -{ - var data, buf; - - /* Buffer too small */ - buf = new Buffer(4); - data = [ 0, 0]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 0); - }, Error, 'buffer too small'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 0); - }, Error, 'buffer too small'); - - /* Beyond the end of the buffer */ - buf = new Buffer(12); - data = [ 0, 0]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 11); - }, Error, 'write beyond end of buffer'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 11); - }, Error, 'write beyond end of buffer'); - - /* Write negative values */ - buf = new Buffer(12); - data = [ -3, 0 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write negative number'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write negative number'); - - data = [ 0, -3 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write negative number'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write negative number'); - - data = [ -3, -3 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write negative number'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write negative number'); - - - /* Write fractional values */ - buf = new Buffer(12); - data = [ 3.33, 0 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ 0, 3.3 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ 3.33, 2.42 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - /* Write values that are too large */ - buf = new Buffer(12); - data = [ 0xffffffffff, 23 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ 0xffffffffff, 0xffffff238 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ 0x23, 0xffffff238 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write too large'); -} - - -testRead(); -testReadOver(); -testWriteZero(); -testWrite(); -testWriteInvalid(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.roundtrip.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.roundtrip.js deleted file mode 100644 index 87ae59b7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.roundtrip.js +++ /dev/null @@ -1,81 +0,0 @@ -/* - * A battery of tests for sucessful round-trip between writes and reads - */ - -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - - -/* - * What the heck, let's just test every value for 8-bits. - */ - -function test8() { - var data = new Buffer(1); - var i; - for (i = 0; i < 256; i++) { - mod_ctype.wuint8(i, 'big', data, 0); - ASSERT.equal(i, mod_ctype.ruint8(data, 'big', 0)); - mod_ctype.wuint8(i, 'little', data, 0); - ASSERT.equal(i, mod_ctype.ruint8(data, 'little', 0)); - } - ASSERT.ok(true); -} - -/* - * Test a random sample of 256 values in the 16-bit unsigned range - */ - -function test16() { - var data = new Buffer(2); - var i = 0; - for (i = 0; i < 256; i++) { - var value = Math.round(Math.random() * Math.pow(2, 16)); - mod_ctype.wuint16(value, 'big', data, 0); - ASSERT.equal(value, mod_ctype.ruint16(data, 'big', 0)); - mod_ctype.wuint16(value, 'little', data, 0); - ASSERT.equal(value, mod_ctype.ruint16(data, 'little', 0)); - } -} - -/* - * Test a random sample of 256 values in the 32-bit unsigned range - */ - -function test32() { - var data = new Buffer(4); - var i = 0; - for (i = 0; i < 256; i++) { - var value = Math.round(Math.random() * Math.pow(2, 32)); - mod_ctype.wuint32(value, 'big', data, 0); - ASSERT.equal(value, mod_ctype.ruint32(data, 'big', 0)); - mod_ctype.wuint32(value, 'little', data, 0); - ASSERT.equal(value, mod_ctype.ruint32(data, 'little', 0)); - } -} - -/* - * Test a random sample of 256 values in the 64-bit unsigned range - */ - -function test64() { - var data = new Buffer(8); - var i = 0; - for (i = 0; i < 256; i++) { - var low = Math.round(Math.random() * Math.pow(2, 32)); - var high = Math.round(Math.random() * Math.pow(2, 32)); - mod_ctype.wuint64([high, low], 'big', data, 0); - var result = mod_ctype.ruint64(data, 'big', 0); - ASSERT.equal(high, result[0]); - ASSERT.equal(low, result[1]); - mod_ctype.wuint64([high, low], 'little', data, 0); - result = mod_ctype.ruint64(data, 'little', 0); - ASSERT.equal(high, result[0]); - ASSERT.equal(low, result[1]); - } -} - -exports.test8 = test8; -exports.test16 = test16; -exports.test32 = test32; -exports.test64 = test64; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.ruint.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.ruint.js deleted file mode 100644 index b67c077f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.ruint.js +++ /dev/null @@ -1,95 +0,0 @@ -/* - * A battery of tests to help us read a series of uints - */ - -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - -/* - * We need to check the following things: - * - We are correctly resolving big endian (doesn't mean anything for 8 bit) - * - Correctly resolving little endian (doesn't mean anything for 8 bit) - * - Correctly using the offsets - * - Correctly interpreting values that are beyond the signed range as unsigned - */ -function test8() -{ - var data = new Buffer(4); - data[0] = 23; - data[1] = 23; - data[2] = 23; - data[3] = 23; - ASSERT.equal(23, mod_ctype.ruint8(data, 'big', 0)); - ASSERT.equal(23, mod_ctype.ruint8(data, 'little', 0)); - ASSERT.equal(23, mod_ctype.ruint8(data, 'big', 1)); - ASSERT.equal(23, mod_ctype.ruint8(data, 'little', 1)); - ASSERT.equal(23, mod_ctype.ruint8(data, 'big', 2)); - ASSERT.equal(23, mod_ctype.ruint8(data, 'little', 2)); - ASSERT.equal(23, mod_ctype.ruint8(data, 'big', 3)); - ASSERT.equal(23, mod_ctype.ruint8(data, 'little', 3)); - data[0] = 255; /* If it became a signed int, would be -1 */ - ASSERT.equal(255, mod_ctype.ruint8(data, 'big', 0)); - ASSERT.equal(255, mod_ctype.ruint8(data, 'little', 0)); -} - -/* - * Test 16 bit unsigned integers. We need to verify the same set as 8 bit, only - * now some of the issues actually matter: - * - We are correctly resolving big endian - * - Correctly resolving little endian - * - Correctly using the offsets - * - Correctly interpreting values that are beyond the signed range as unsigned - */ -function test16() -{ - var data = new Buffer(4); - /* Test signed values first */ - data[0] = 0; - data[1] = 0x23; - data[2] = 0x42; - data[3] = 0x3f; - - ASSERT.equal(0x23, mod_ctype.ruint16(data, 'big', 0)); - ASSERT.equal(0x2342, mod_ctype.ruint16(data, 'big', 1)); - ASSERT.equal(0x423f, mod_ctype.ruint16(data, 'big', 2)); - - ASSERT.equal(0x2300, mod_ctype.ruint16(data, 'little', 0)); - ASSERT.equal(0x4223, mod_ctype.ruint16(data, 'little', 1)); - ASSERT.equal(0x3f42, mod_ctype.ruint16(data, 'little', 2)); - - data[0] = 0xfe; - data[1] = 0xfe; - - ASSERT.equal(0xfefe, mod_ctype.ruint16(data, 'big', 0)); - ASSERT.equal(0xfefe, mod_ctype.ruint16(data, 'little', 0)); -} - -/* - * Test 32 bit unsigned integers. We need to verify the same set as 8 bit, only - * now some of the issues actually matter: - * - We are correctly resolving big endian - * - Correctly using the offsets - * - Correctly interpreting values that are beyond the signed range as unsigned - */ -function test32() -{ - var data = new Buffer(8); - data[0] = 0x32; - data[1] = 0x65; - data[2] = 0x42; - data[3] = 0x56; - data[4] = 0x23; - data[5] = 0xff; - - ASSERT.equal(0x32654256, mod_ctype.ruint32(data, 'big', 0)); - ASSERT.equal(0x65425623, mod_ctype.ruint32(data, 'big', 1)); - ASSERT.equal(0x425623ff, mod_ctype.ruint32(data, 'big', 2)); - - ASSERT.equal(0x56426532, mod_ctype.ruint32(data, 'little', 0)); - ASSERT.equal(0x23564265, mod_ctype.ruint32(data, 'little', 1)); - ASSERT.equal(0xff235642, mod_ctype.ruint32(data, 'little', 2)); -} - -test8(); -test16(); -test32(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.wuint.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.wuint.js deleted file mode 100644 index d6c4230f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.wuint.js +++ /dev/null @@ -1,156 +0,0 @@ -/* - * A battery of tests to help us read a series of uints - */ - -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - -/* - * We need to check the following things: - * - We are correctly resolving big endian (doesn't mean anything for 8 bit) - * - Correctly resolving little endian (doesn't mean anything for 8 bit) - * - Correctly using the offsets - * - Correctly interpreting values that are beyond the signed range as unsigned - */ -function test8() -{ - var data = new Buffer(4); - mod_ctype.wuint8(23, 'big', data, 0); - mod_ctype.wuint8(23, 'big', data, 1); - mod_ctype.wuint8(23, 'big', data, 2); - mod_ctype.wuint8(23, 'big', data, 3); - ASSERT.equal(23, data[0]); - ASSERT.equal(23, data[1]); - ASSERT.equal(23, data[2]); - ASSERT.equal(23, data[3]); - mod_ctype.wuint8(23, 'little', data, 0); - mod_ctype.wuint8(23, 'little', data, 1); - mod_ctype.wuint8(23, 'little', data, 2); - mod_ctype.wuint8(23, 'little', data, 3); - ASSERT.equal(23, data[0]); - ASSERT.equal(23, data[1]); - ASSERT.equal(23, data[2]); - ASSERT.equal(23, data[3]); - mod_ctype.wuint8(255, 'big', data, 0); - ASSERT.equal(255, data[0]); - mod_ctype.wuint8(255, 'little', data, 0); - ASSERT.equal(255, data[0]); -} - -function test16() -{ - var value = 0x2343; - var data = new Buffer(4); - mod_ctype.wuint16(value, 'big', data, 0); - ASSERT.equal(0x23, data[0]); - ASSERT.equal(0x43, data[1]); - mod_ctype.wuint16(value, 'big', data, 1); - ASSERT.equal(0x23, data[1]); - ASSERT.equal(0x43, data[2]); - mod_ctype.wuint16(value, 'big', data, 2); - ASSERT.equal(0x23, data[2]); - ASSERT.equal(0x43, data[3]); - - mod_ctype.wuint16(value, 'little', data, 0); - ASSERT.equal(0x23, data[1]); - ASSERT.equal(0x43, data[0]); - - mod_ctype.wuint16(value, 'little', data, 1); - ASSERT.equal(0x23, data[2]); - ASSERT.equal(0x43, data[1]); - - mod_ctype.wuint16(value, 'little', data, 2); - ASSERT.equal(0x23, data[3]); - ASSERT.equal(0x43, data[2]); - - value = 0xff80; - mod_ctype.wuint16(value, 'little', data, 0); - ASSERT.equal(0xff, data[1]); - ASSERT.equal(0x80, data[0]); - - mod_ctype.wuint16(value, 'big', data, 0); - ASSERT.equal(0xff, data[0]); - ASSERT.equal(0x80, data[1]); -} - -function test32() -{ - var data = new Buffer(6); - var value = 0xe7f90a6d; - - mod_ctype.wuint32(value, 'big', data, 0); - ASSERT.equal(0xe7, data[0]); - ASSERT.equal(0xf9, data[1]); - ASSERT.equal(0x0a, data[2]); - ASSERT.equal(0x6d, data[3]); - - mod_ctype.wuint32(value, 'big', data, 1); - ASSERT.equal(0xe7, data[1]); - ASSERT.equal(0xf9, data[2]); - ASSERT.equal(0x0a, data[3]); - ASSERT.equal(0x6d, data[4]); - - mod_ctype.wuint32(value, 'big', data, 2); - ASSERT.equal(0xe7, data[2]); - ASSERT.equal(0xf9, data[3]); - ASSERT.equal(0x0a, data[4]); - ASSERT.equal(0x6d, data[5]); - - mod_ctype.wuint32(value, 'little', data, 0); - ASSERT.equal(0xe7, data[3]); - ASSERT.equal(0xf9, data[2]); - ASSERT.equal(0x0a, data[1]); - ASSERT.equal(0x6d, data[0]); - - mod_ctype.wuint32(value, 'little', data, 1); - ASSERT.equal(0xe7, data[4]); - ASSERT.equal(0xf9, data[3]); - ASSERT.equal(0x0a, data[2]); - ASSERT.equal(0x6d, data[1]); - - mod_ctype.wuint32(value, 'little', data, 2); - ASSERT.equal(0xe7, data[5]); - ASSERT.equal(0xf9, data[4]); - ASSERT.equal(0x0a, data[3]); - ASSERT.equal(0x6d, data[2]); -} - -function test64() -{ - var data = new Buffer(10); - var value = 0x0007cda8e7f90a6d; - var high = Math.floor(value / Math.pow(2, 32)); - var low = value - (high * Math.pow(2, 32)); - ASSERT.equal(0x0007cda8, high); - ASSERT.equal(0xe7f90a6d, low); - - mod_ctype.wuint64([high, low], 'big', data, 0); - ASSERT.equal(0x00, data[0]); - ASSERT.equal(0x07, data[1]); - ASSERT.equal(0xcd, data[2]); - ASSERT.equal(0xa8, data[3]); - ASSERT.equal(0xe7, data[4]); - ASSERT.equal(0xf9, data[5]); - ASSERT.equal(0x0a, data[6]); - ASSERT.equal(0x6d, data[7]); - - mod_ctype.wuint64([high, low], 'little', data, 0); - ASSERT.equal(0x6d, data[0]); - ASSERT.equal(0x0a, data[1]); - ASSERT.equal(0xf9, data[2]); - ASSERT.equal(0xe7, data[3]); - ASSERT.equal(0xa8, data[4]); - ASSERT.equal(0xcd, data[5]); - ASSERT.equal(0x07, data[6]); - ASSERT.equal(0x00, data[7]); -} - -test8(); -test16(); -test32(); -test64(); - -exports.test8 = test8; -exports.test16 = test16; -exports.test32 = test32; -exports.test64 = test64; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicr.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicr.js deleted file mode 100644 index e9895152..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicr.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Simple does to see if it works at all - */ -var mod_ctype = require('../../ctype'); -var ASSERT = require('assert'); -var mod_sys = require('sys'); - -function test() -{ - var ii, p, result, buffer; - - p = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer(4); - buffer[0] = 23; - buffer[3] = 42; - result = p.readData([ { x: { type: 'uint8_t' }}, - { y: { type: 'uint8_t', offset: 3 }} - ], buffer, 0); - ASSERT.equal(23, result['x']); - ASSERT.equal(42, result['y']); - - buffer = new Buffer(23); - for (ii = 0; ii < 23; ii++) - buffer[ii] = 0; - - buffer.write('Hello, world!'); - result = p.readData([ { x: { type: 'char[20]' }} ], buffer, 0); - - /* - * This is currently broken behvaior, need to redesign check - * ASSERT.equal('Hello, world!', result['x'].toString('utf-8', 0, - * result['x'].length)); - */ - - buffer = new Buffer(4); - buffer[0] = 0x03; - buffer[1] = 0x24; - buffer[2] = 0x25; - buffer[3] = 0x26; - result = p.readData([ { y: { type: 'uint8_t' }}, - { x: { type: 'uint8_t[y]' }}], buffer, 0); - console.log(mod_sys.inspect(result, true)); - - p.typedef('ssize_t', 'int32_t'); - ASSERT.deepEqual({ 'ssize_t': 'int32_t' }, p.lstypes()); - result = p.readData([ { x: { type: 'ssize_t' } } ], buffer, 0); - ASSERT.equal(0x26252403, result['x']); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicw.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicw.js deleted file mode 100644 index 89d446f2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicw.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Simple does it fucking work at all test - */ - -var mod_ctype = require('../../ctype'); -var ASSERT = require('assert'); -var mod_sys = require('sys'); - -function test() -{ - var ii, p, buffer, buf2; - - p = new mod_ctype.Parser({ endian: 'big' }); - buffer = new Buffer(4); - p.writeData([ { x: { type: 'uint8_t', value: 23 }}, - { y: { type: 'uint8_t', offset: 3, value: 42 }} - ], buffer, 0); - ASSERT.equal(23, buffer[0]); - ASSERT.equal(42, buffer[3]); - - buffer = new Buffer(20); - for (ii = 0; ii < 20; ii++) - buffer[ii] = 0; - - buffer.write('Hello, world!'); - buf2 = new Buffer(22); - p.writeData([ { x: { type: 'char[20]', value: buffer }} ], buf2, 0); - for (ii = 0; ii < 20; ii++) - ASSERT.equal(buffer[ii], buf2[ii]); - /* - * This is currently broken behvaior, need to redesign check - * ASSERT.equal('Hello, world!', result['x'].toString('utf-8', 0, - * result['x'].length)); - */ - - buffer = new Buffer(4); - p.writeData([ { y: { type: 'uint8_t', value: 3 }}, - { x: { type: 'uint8_t[y]', value: [ 0x24, 0x25, 0x26] }}], - buffer, 0); - console.log(mod_sys.inspect(buffer)); - - p.typedef('ssize_t', 'int32_t'); - ASSERT.deepEqual({ 'ssize_t': 'int32_t' }, p.lstypes()); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.char.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.char.js deleted file mode 100644 index 14d9529c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.char.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Test the different forms of reading characters: - * - * - the default, a single element buffer - * - uint8, values are uint8_ts - * - int8, values are int8_ts - */ -var mod_ctype = require('../../ctype'); -var mod_assert = require('assert'); - -function test() -{ - var p, buf, res; - - buf = new Buffer(1); - buf[0] = 255; - - p = new mod_ctype.Parser({ endian: 'little'}); - res = p.readData([ { c: { type: 'char' }} ], buf, 0); - res = res['c']; - mod_assert.ok(res instanceof Buffer); - mod_assert.equal(255, res[0]); - - p = new mod_ctype.Parser({ endian: 'little', - 'char-type': 'int8' }); - res = p.readData([ { c: { type: 'char' }} ], buf, 0); - res = res['c']; - mod_assert.ok(typeof (res) == 'number', 'got typeof (res): ' + - typeof (res)); - mod_assert.equal(-1, res); - - p = new mod_ctype.Parser({ endian: 'little', - 'char-type': 'uint8' }); - res = p.readData([ { c: { type: 'char' }} ], buf, 0); - res = res['c']; - mod_assert.ok(typeof (res) == 'number', 'got typeof (res): ' + - typeof (res)); - mod_assert.equal(255, res); - -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.endian.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.endian.js deleted file mode 100644 index 11fc2d2c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.endian.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Simple test to make sure that the endian setting works. - */ - -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -function test() -{ - var parser, buf; - - parser = new mod_ctype.Parser({ - endian: 'little' - }); - - buf = new Buffer(2); - parser.writeData([ { key: { type: 'uint16_t' } } ], buf, 0, [ 0x1234 ]); - mod_assert.equal(buf[0], 0x34); - mod_assert.equal(buf[1], 0x12); - parser.setEndian('big'); - - parser.writeData([ { key: { type: 'uint16_t' } } ], buf, 0, [ 0x1234 ]); - mod_assert.equal(buf[0], 0x12); - mod_assert.equal(buf[1], 0x34); - - parser.setEndian('little'); - parser.writeData([ { key: { type: 'uint16_t' } } ], buf, 0, [ 0x1234 ]); - mod_assert.equal(buf[0], 0x34); - mod_assert.equal(buf[1], 0x12); -} - -function fail() -{ - var parser; - - parser = new mod_ctype.Parser({ - endian: 'little' - }); - mod_assert.throws(function () { - parser.setEndian('littlebigwrong'); - }); -} - -test(); -fail(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.oldwrite.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.oldwrite.js deleted file mode 100644 index 9491cf6e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.oldwrite.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * A long overdue test to go through and verify that we can read and write - * structures as well as nested structures. - */ - -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -function test() -{ - var parser, buf, data; - parser = new mod_ctype.Parser({ - endian: 'little' - }); - parser.typedef('point_t', [ - { x: { type: 'uint8_t' } }, - { y: { type: 'uint8_t' } } - ]); - buf = new Buffer(2); - data = [ - { point: { type: 'point_t', value: [ 23, 42 ] } } - ]; - parser.writeData(data, buf, 0); - mod_assert.ok(buf[0] == 23); - mod_assert.ok(buf[1] == 42); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.readSize.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.readSize.js deleted file mode 100644 index 6c490a2e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.readSize.js +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Testing to ensure we're reading the expected number bytes - */ -var mod_ctype = require('../../ctype'); -var ASSERT = require('assert'); - -function testUint8() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('80', 'hex'); - result = parser.readStruct([ { item: { type: 'uint8_t' } } ], buffer, - 0); - ASSERT.equal(result['size'], 1); -} - -function testSint8() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('80', 'hex'); - result = parser.readStruct([ { item: { type: 'int8_t' } } ], buffer, 0); - ASSERT.equal(result['size'], 1); -} - -function testUint16() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('8000', 'hex'); - result = parser.readStruct([ { item: { type: 'uint16_t' } } ], buffer, - 0); - ASSERT.equal(result['size'], 2); -} - -function testSint16() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('8000', 'hex'); - result = parser.readStruct([ { item: { type: 'int16_t' } } ], buffer, - 0); - ASSERT.equal(result['size'], 2); -} - -function testUint32() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('80000000', 'hex'); - result = parser.readStruct([ { item: { type: 'uint32_t' } } ], buffer, - 0); - ASSERT.equal(result['size'], 4); -} - -function testSint32() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('80000000', 'hex'); - result = parser.readStruct([ { item: { type: 'int32_t' } } ], buffer, - 0); - ASSERT.equal(result['size'], 4); -} - -function testUint64() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('8000000000000000', 'hex'); - result = parser.readStruct([ { item: { type: 'uint64_t' } } ], buffer, - 0); - ASSERT.equal(result['size'], 8); -} - -function testSint64() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('8000000000000000', 'hex'); - result = parser.readStruct([ { item: { type: 'int64_t' } } ], buffer, - 0); - ASSERT.equal(result['size'], 8); -} - -function testFloat() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('ABAAAA3E', 'hex'); - result = parser.readStruct([ { item: { type: 'float' } } ], buffer, 0); - ASSERT.equal(result['size'], 4); -} - -function testDouble() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('000000000000F03F', 'hex'); - result = parser.readStruct([ { item: { type: 'double' } } ], buffer, 0); - ASSERT.equal(result['size'], 8); -} - -function testChar() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('t'); - result = parser.readStruct([ { item: { type: 'char' } } ], buffer, 0); - ASSERT.equal(result['size'], 1); -} - -function test() -{ - testSint8(); - testUint8(); - testSint16(); - testUint16(); - testSint32(); - testUint32(); - testSint64(); - testUint64(); - testFloat(); - testDouble(); - testChar(); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.structw.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.structw.js deleted file mode 100644 index 09c1a5ba..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.structw.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * A long overdue test to go through and verify that we can read and write - * structures as well as nested structures. - */ - -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -function test() -{ - var parser, buf, data; - parser = new mod_ctype.Parser({ - endian: 'little' - }); - parser.typedef('point_t', [ - { x: { type: 'uint8_t' } }, - { y: { type: 'uint8_t' } } - ]); - buf = new Buffer(2); - data = [ - { point: { type: 'point_t' } } - ]; - parser.writeData(data, buf, 0, [ [ 23, 42 ] ]); - mod_assert.ok(buf[0] == 23); - mod_assert.ok(buf[1] == 42); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.writeStruct.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.writeStruct.js deleted file mode 100644 index 48556667..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.writeStruct.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Test to verify that the offset is incremented when structures are written to. - * Hopefully we will not regress issue #41 - */ - -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -function test() -{ - var parser, buf, data; - parser = new mod_ctype.Parser({ - endian: 'little' - }); - parser.typedef('point_t', [ - { x: { type: 'uint8_t' } }, - { y: { type: 'uint8_t' } } - ]); - buf = new Buffer(4); - data = [ - { point1: { type: 'point_t' } }, - { point2: { type: 'point_t' } } - ]; - parser.writeData(data, buf, 0, [ [ 23, 42 ], [ 91, 18 ] ]); - mod_assert.ok(buf[0] == 23); - mod_assert.ok(buf[1] == 42); - mod_assert.ok(buf[2] == 91); - mod_assert.ok(buf[3] == 18); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/package.json deleted file mode 100644 index 416f618a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "author": { - "name": "Joyent, Inc" - }, - "name": "http-signature", - "description": "Reference implementation of Joyent's HTTP Signature Scheme", - "version": "0.10.0", - "repository": { - "type": "git", - "url": "git://github.com/joyent/node-http-signature.git" - }, - "engines": { - "node": ">=0.8" - }, - "main": "lib/index.js", - "scripts": { - "test": "tap tst/*.js" - }, - "dependencies": { - "assert-plus": "0.1.2", - "asn1": "0.1.11", - "ctype": "0.5.2" - }, - "devDependencies": { - "node-uuid": "1.4.0", - "tap": "0.4.2" - }, - "readme": "# node-http-signature\n\nnode-http-signature is a node.js library that has client and server components\nfor Joyent's [HTTP Signature Scheme](http_signing.md).\n\n## Usage\n\nNote the example below signs a request with the same key/cert used to start an\nHTTP server. This is almost certainly not what you actaully want, but is just\nused to illustrate the API calls; you will need to provide your own key\nmanagement in addition to this library.\n\n### Client\n\n var fs = require('fs');\n var https = require('https');\n var httpSignature = require('http-signature');\n\n var key = fs.readFileSync('./key.pem', 'ascii');\n\n var options = {\n host: 'localhost',\n port: 8443,\n path: '/',\n method: 'GET',\n headers: {}\n };\n\n // Adds a 'Date' header in, signs it, and adds the\n // 'Authorization' header in.\n var req = https.request(options, function(res) {\n console.log(res.statusCode);\n });\n\n\n httpSignature.sign(req, {\n key: key,\n keyId: './cert.pem'\n });\n\n req.end();\n\n### Server\n\n var fs = require('fs');\n var https = require('https');\n var httpSignature = require('http-signature');\n\n var options = {\n key: fs.readFileSync('./key.pem'),\n cert: fs.readFileSync('./cert.pem')\n };\n\n https.createServer(options, function (req, res) {\n var rc = 200;\n var parsed = httpSignature.parseRequest(req);\n var pub = fs.readFileSync(parsed.keyId, 'ascii');\n if (!httpSignature.verifySignature(parsed, pub))\n rc = 401;\n\n res.writeHead(rc);\n res.end();\n }).listen(8443);\n\n## Installation\n\n npm install http-signature\n\n## License\n\nMIT.\n\n## Bugs\n\nSee <https://github.com/joyent/node-http-signature/issues>.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/joyent/node-http-signature/issues" - }, - "homepage": "https://github.com/joyent/node-http-signature", - "_id": "http-signature@0.10.0", - "dist": { - "shasum": "ed3c3415949cf275765bb5394a145ada7a1e506a" - }, - "_from": "http-signature@~0.10.0", - "_resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/README.md deleted file mode 100644 index 5d764f3a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# json-stringify-safe - -Like JSON.stringify, but doesn't throw on circular references. - -## Usage - -Takes the same arguments as `JSON.stringify`. - -```javascript -var stringify = require('json-stringify-safe'); -var circularObj = {}; -circularObj.circularRef = circularObj; -circularObj.list = [ circularObj, circularObj ]; -console.log(stringify(circularObj, null, 2)); -``` - -Output: - -```json -{ - "circularRef": "[Circular]", - "list": [ - "[Circular]", - "[Circular]" - ] -} -``` - -## Details - -``` -stringify(obj, serializer, indent, decycler) -``` - -The first three arguments are the same as to JSON.stringify. The last -is an argument that's only used when the object has been seen already. - -The default `decycler` function returns the string `'[Circular]'`. -If, for example, you pass in `function(k,v){}` (return nothing) then it -will prune cycles. If you pass in `function(k,v){ return {foo: 'bar'}}`, -then cyclical objects will always be represented as `{"foo":"bar"}` in -the result. - -``` -stringify.getSerialize(serializer, decycler) -``` - -Returns a serializer that can be used elsewhere. This is the actual -function that's passed to JSON.stringify. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/package.json deleted file mode 100644 index dc9929d9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "json-stringify-safe", - "version": "5.0.0", - "description": "Like JSON.stringify, but doesn't blow up on circular refs", - "main": "stringify.js", - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/json-stringify-safe" - }, - "keywords": [ - "json", - "stringify", - "circular", - "safe" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "license": "BSD", - "readmeFilename": "README.md", - "readme": "# json-stringify-safe\n\nLike JSON.stringify, but doesn't throw on circular references.\n\n## Usage\n\nTakes the same arguments as `JSON.stringify`.\n\n```javascript\nvar stringify = require('json-stringify-safe');\nvar circularObj = {};\ncircularObj.circularRef = circularObj;\ncircularObj.list = [ circularObj, circularObj ];\nconsole.log(stringify(circularObj, null, 2));\n```\n\nOutput:\n\n```json\n{\n \"circularRef\": \"[Circular]\",\n \"list\": [\n \"[Circular]\",\n \"[Circular]\"\n ]\n}\n```\n\n## Details\n\n```\nstringify(obj, serializer, indent, decycler)\n```\n\nThe first three arguments are the same as to JSON.stringify. The last\nis an argument that's only used when the object has been seen already.\n\nThe default `decycler` function returns the string `'[Circular]'`.\nIf, for example, you pass in `function(k,v){}` (return nothing) then it\nwill prune cycles. If you pass in `function(k,v){ return {foo: 'bar'}}`,\nthen cyclical objects will always be represented as `{\"foo\":\"bar\"}` in\nthe result.\n\n```\nstringify.getSerialize(serializer, decycler)\n```\n\nReturns a serializer that can be used elsewhere. This is the actual\nfunction that's passed to JSON.stringify.\n", - "bugs": { - "url": "https://github.com/isaacs/json-stringify-safe/issues" - }, - "homepage": "https://github.com/isaacs/json-stringify-safe", - "_id": "json-stringify-safe@5.0.0", - "dist": { - "shasum": "3bef04524e23eb51118883db0bcf4e18c49ed92c" - }, - "_from": "json-stringify-safe@~5.0.0", - "_resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/stringify.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/stringify.js deleted file mode 100644 index 853ef9b2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/stringify.js +++ /dev/null @@ -1,39 +0,0 @@ -module.exports = stringify; - -function getSerialize (fn, decycle) { - var seen = [], keys = []; - decycle = decycle || function(key, value) { - return '[Circular ' + getPath(value, seen, keys) + ']' - }; - return function(key, value) { - var ret = value; - if (typeof value === 'object' && value) { - if (seen.indexOf(value) !== -1) - ret = decycle(key, value); - else { - seen.push(value); - keys.push(key); - } - } - if (fn) ret = fn(key, ret); - return ret; - } -} - -function getPath (value, seen, keys) { - var index = seen.indexOf(value); - var path = [ keys[index] ]; - for (index--; index >= 0; index--) { - if (seen[index][ path[0] ] === value) { - value = seen[index]; - path.unshift(keys[index]); - } - } - return '~' + path.join('.'); -} - -function stringify(obj, fn, spaces, decycle) { - return JSON.stringify(obj, getSerialize(fn, decycle), spaces); -} - -stringify.getSerialize = getSerialize; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/test.js deleted file mode 100644 index 991e9197..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/test.js +++ /dev/null @@ -1,128 +0,0 @@ -var stringify = require('./stringify.js'); - -var circularObj = { a: 'b' }; -circularObj.circularRef = circularObj; -circularObj.list = [ circularObj, circularObj ]; - -////////// -// default -var testObj = { - "a": "b", - "circularRef": "[Circular ~]", - "list": [ - "[Circular ~]", - "[Circular ~]" - ] -}; - -var assert = require('assert'); -assert.equal(JSON.stringify(testObj, null, 2), - stringify(circularObj, null, 2)); - -assert.equal(JSON.stringify(testObj, null, 2), - JSON.stringify(circularObj, stringify.getSerialize(), 2)); - - -//////// -// prune -testObj = { - "a": "b", - "list": [ - null, - null - ] -}; - -function prune(k, v) {} - -assert.equal(JSON.stringify(testObj, null, 2), - stringify(circularObj, null, 2, prune)); - -/////////// -// re-cycle -// (throws) -function recycle(k, v) { - return v; -} - -assert.throws(function() { - stringify(circularObj, null, 2, recycle); -}); - -//////// -// fancy -testObj = { - "a": "b", - "circularRef": "circularRef{a:string,circularRef:Object,list:Array}", - "list": [ - "0{a:string,circularRef:Object,list:Array}", - "1{a:string,circularRef:Object,list:Array}" - ] -}; - -function signer(key, value) { - var ret = key + '{'; - var f = false; - for (var i in value) { - if (f) - ret += ','; - f = true; - ret += i + ':'; - var v = value[i]; - switch (typeof v) { - case 'object': - if (!v) - ret += 'null'; - else if (Array.isArray(v)) - ret += 'Array' - else - ret += v.constructor && v.constructor.name || 'Object'; - break; - default: - ret += typeof v; - break; - } - } - ret += '}'; - return ret; -} - -assert.equal(JSON.stringify(testObj, null, 2), - stringify(circularObj, null, 2, signer)); - - -/////// -//multi -var a = { x: 1 }; -a.a = a; -var b = { x: 2 }; -b.a = a; - -var c = { a: a, b: b }; -var d = { list: [ a, b, c ] }; -d.d = d; - -var multi = { - "list": [ - { - "x": 1, - "a": "[Circular ~.list.0]" - }, - { - "x": 2, - "a": "[Circular ~.list.0]" - }, - { - "a": "[Circular ~.list.0]", - "b": "[Circular ~.list.1]" - } - ], - "d": "[Circular ~]" -}; - -assert.equal(JSON.stringify(multi, null, 2), - stringify(d, null, 2)); - -//////// -// pass! -console.log('ok'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/LICENSE deleted file mode 100644 index 451fc455..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Benjamin Thomas, Robert Kieffer - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/README.md deleted file mode 100644 index 6ca19bd1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/README.md +++ /dev/null @@ -1,66 +0,0 @@ -# mime - -Comprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community. - -## Install - -Install with [npm](http://github.com/isaacs/npm): - - npm install mime - -## API - Queries - -### mime.lookup(path) -Get the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g. - - var mime = require('mime'); - - mime.lookup('/path/to/file.txt'); // => 'text/plain' - mime.lookup('file.txt'); // => 'text/plain' - mime.lookup('.TXT'); // => 'text/plain' - mime.lookup('htm'); // => 'text/html' - -### mime.default_type -Sets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.) - -### mime.extension(type) -Get the default extension for `type` - - mime.extension('text/html'); // => 'html' - mime.extension('application/octet-stream'); // => 'bin' - -### mime.charsets.lookup() - -Map mime-type to charset - - mime.charsets.lookup('text/plain'); // => 'UTF-8' - -(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.) - -## API - Defining Custom Types - -The following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/broofa/node-mime/wiki/Requesting-New-Types). - -### mime.define() - -Add custom mime/extension mappings - - mime.define({ - 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'], - 'application/x-my-type': ['x-mt', 'x-mtt'], - // etc ... - }); - - mime.lookup('x-sft'); // => 'text/x-some-format' - -The first entry in the extensions array is returned by `mime.extension()`. E.g. - - mime.extension('text/x-some-format'); // => 'x-sf' - -### mime.load(filepath) - -Load mappings from an Apache ".types" format file - - mime.load('./my_project.types'); - -The .types file format is simple - See the `types` dir for examples. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/mime.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/mime.js deleted file mode 100644 index 48be0c5e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/mime.js +++ /dev/null @@ -1,114 +0,0 @@ -var path = require('path'); -var fs = require('fs'); - -function Mime() { - // Map of extension -> mime type - this.types = Object.create(null); - - // Map of mime type -> extension - this.extensions = Object.create(null); -} - -/** - * Define mimetype -> extension mappings. Each key is a mime-type that maps - * to an array of extensions associated with the type. The first extension is - * used as the default extension for the type. - * - * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']}); - * - * @param map (Object) type definitions - */ -Mime.prototype.define = function (map) { - for (var type in map) { - var exts = map[type]; - - for (var i = 0; i < exts.length; i++) { - if (process.env.DEBUG_MIME && this.types[exts]) { - console.warn(this._loading.replace(/.*\//, ''), 'changes "' + exts[i] + '" extension type from ' + - this.types[exts] + ' to ' + type); - } - - this.types[exts[i]] = type; - } - - // Default extension is the first one we encounter - if (!this.extensions[type]) { - this.extensions[type] = exts[0]; - } - } -}; - -/** - * Load an Apache2-style ".types" file - * - * This may be called multiple times (it's expected). Where files declare - * overlapping types/extensions, the last file wins. - * - * @param file (String) path of file to load. - */ -Mime.prototype.load = function(file) { - - this._loading = file; - // Read file and split into lines - var map = {}, - content = fs.readFileSync(file, 'ascii'), - lines = content.split(/[\r\n]+/); - - lines.forEach(function(line) { - // Clean up whitespace/comments, and split into fields - var fields = line.replace(/\s*#.*|^\s*|\s*$/g, '').split(/\s+/); - map[fields.shift()] = fields; - }); - - this.define(map); - - this._loading = null; -}; - -/** - * Lookup a mime type based on extension - */ -Mime.prototype.lookup = function(path, fallback) { - var ext = path.replace(/.*[\.\/\\]/, '').toLowerCase(); - - return this.types[ext] || fallback || this.default_type; -}; - -/** - * Return file extension associated with a mime type - */ -Mime.prototype.extension = function(mimeType) { - var type = mimeType.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase(); - return this.extensions[type]; -}; - -// Default instance -var mime = new Mime(); - -// Load local copy of -// http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types -mime.load(path.join(__dirname, 'types/mime.types')); - -// Load additional types from node.js community -mime.load(path.join(__dirname, 'types/node.types')); - -// Default type -mime.default_type = mime.lookup('bin'); - -// -// Additional API specific to the default instance -// - -mime.Mime = Mime; - -/** - * Lookup a charset based on mime type. - */ -mime.charsets = { - lookup: function(mimeType, fallback) { - // Assume text types are utf8 - return (/^text\//).test(mimeType) ? 'UTF-8' : fallback; - } -}; - -module.exports = mime; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/package.json deleted file mode 100644 index a9759392..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": { - "name": "Robert Kieffer", - "email": "robert@broofa.com", - "url": "http://github.com/broofa" - }, - "contributors": [ - { - "name": "Benjamin Thomas", - "email": "benjamin@benjaminthomas.org", - "url": "http://github.com/bentomas" - } - ], - "dependencies": {}, - "description": "A comprehensive library for mime-type mapping", - "devDependencies": {}, - "keywords": [ - "util", - "mime" - ], - "main": "mime.js", - "name": "mime", - "repository": { - "url": "https://github.com/broofa/node-mime", - "type": "git" - }, - "version": "1.2.11", - "readme": "# mime\n\nComprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community.\n\n## Install\n\nInstall with [npm](http://github.com/isaacs/npm):\n\n npm install mime\n\n## API - Queries\n\n### mime.lookup(path)\nGet the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g.\n\n var mime = require('mime');\n\n mime.lookup('/path/to/file.txt'); // => 'text/plain'\n mime.lookup('file.txt'); // => 'text/plain'\n mime.lookup('.TXT'); // => 'text/plain'\n mime.lookup('htm'); // => 'text/html'\n\n### mime.default_type\nSets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.)\n\n### mime.extension(type)\nGet the default extension for `type`\n\n mime.extension('text/html'); // => 'html'\n mime.extension('application/octet-stream'); // => 'bin'\n\n### mime.charsets.lookup()\n\nMap mime-type to charset\n\n mime.charsets.lookup('text/plain'); // => 'UTF-8'\n\n(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.)\n\n## API - Defining Custom Types\n\nThe following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/broofa/node-mime/wiki/Requesting-New-Types).\n\n### mime.define()\n\nAdd custom mime/extension mappings\n\n mime.define({\n 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'],\n 'application/x-my-type': ['x-mt', 'x-mtt'],\n // etc ...\n });\n\n mime.lookup('x-sft'); // => 'text/x-some-format'\n\nThe first entry in the extensions array is returned by `mime.extension()`. E.g.\n\n mime.extension('text/x-some-format'); // => 'x-sf'\n\n### mime.load(filepath)\n\nLoad mappings from an Apache \".types\" format file\n\n mime.load('./my_project.types');\n\nThe .types file format is simple - See the `types` dir for examples.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/broofa/node-mime/issues" - }, - "homepage": "https://github.com/broofa/node-mime", - "_id": "mime@1.2.11", - "_from": "mime@~1.2.9" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/test.js deleted file mode 100644 index 2cda1c7a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/test.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Usage: node test.js - */ - -var mime = require('./mime'); -var assert = require('assert'); -var path = require('path'); - -function eq(a, b) { - console.log('Test: ' + a + ' === ' + b); - assert.strictEqual.apply(null, arguments); -} - -console.log(Object.keys(mime.extensions).length + ' types'); -console.log(Object.keys(mime.types).length + ' extensions\n'); - -// -// Test mime lookups -// - -eq('text/plain', mime.lookup('text.txt')); // normal file -eq('text/plain', mime.lookup('TEXT.TXT')); // uppercase -eq('text/plain', mime.lookup('dir/text.txt')); // dir + file -eq('text/plain', mime.lookup('.text.txt')); // hidden file -eq('text/plain', mime.lookup('.txt')); // nameless -eq('text/plain', mime.lookup('txt')); // extension-only -eq('text/plain', mime.lookup('/txt')); // extension-less () -eq('text/plain', mime.lookup('\\txt')); // Windows, extension-less -eq('application/octet-stream', mime.lookup('text.nope')); // unrecognized -eq('fallback', mime.lookup('text.fallback', 'fallback')); // alternate default - -// -// Test extensions -// - -eq('txt', mime.extension(mime.types.text)); -eq('html', mime.extension(mime.types.htm)); -eq('bin', mime.extension('application/octet-stream')); -eq('bin', mime.extension('application/octet-stream ')); -eq('html', mime.extension(' text/html; charset=UTF-8')); -eq('html', mime.extension('text/html; charset=UTF-8 ')); -eq('html', mime.extension('text/html; charset=UTF-8')); -eq('html', mime.extension('text/html ; charset=UTF-8')); -eq('html', mime.extension('text/html;charset=UTF-8')); -eq('html', mime.extension('text/Html;charset=UTF-8')); -eq(undefined, mime.extension('unrecognized')); - -// -// Test node.types lookups -// - -eq('application/font-woff', mime.lookup('file.woff')); -eq('application/octet-stream', mime.lookup('file.buffer')); -eq('audio/mp4', mime.lookup('file.m4a')); -eq('font/opentype', mime.lookup('file.otf')); - -// -// Test charsets -// - -eq('UTF-8', mime.charsets.lookup('text/plain')); -eq(undefined, mime.charsets.lookup(mime.types.js)); -eq('fallback', mime.charsets.lookup('application/octet-stream', 'fallback')); - -// -// Test for overlaps between mime.types and node.types -// - -var apacheTypes = new mime.Mime(), nodeTypes = new mime.Mime(); -apacheTypes.load(path.join(__dirname, 'types/mime.types')); -nodeTypes.load(path.join(__dirname, 'types/node.types')); - -var keys = [].concat(Object.keys(apacheTypes.types)) - .concat(Object.keys(nodeTypes.types)); -keys.sort(); -for (var i = 1; i < keys.length; i++) { - if (keys[i] == keys[i-1]) { - console.warn('Warning: ' + - 'node.types defines ' + keys[i] + '->' + nodeTypes.types[keys[i]] + - ', mime.types defines ' + keys[i] + '->' + apacheTypes.types[keys[i]]); - } -} - -console.log('\nOK'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/types/mime.types b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/types/mime.types deleted file mode 100644 index da8cd691..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/types/mime.types +++ /dev/null @@ -1,1588 +0,0 @@ -# This file maps Internet media types to unique file extension(s). -# Although created for httpd, this file is used by many software systems -# and has been placed in the public domain for unlimited redisribution. -# -# The table below contains both registered and (common) unregistered types. -# A type that has no unique extension can be ignored -- they are listed -# here to guide configurations toward known types and to make it easier to -# identify "new" types. File extensions are also commonly used to indicate -# content languages and encodings, so choose them carefully. -# -# Internet media types should be registered as described in RFC 4288. -# The registry is at <http://www.iana.org/assignments/media-types/>. -# -# MIME type (lowercased) Extensions -# ============================================ ========== -# application/1d-interleaved-parityfec -# application/3gpp-ims+xml -# application/activemessage -application/andrew-inset ez -# application/applefile -application/applixware aw -application/atom+xml atom -application/atomcat+xml atomcat -# application/atomicmail -application/atomsvc+xml atomsvc -# application/auth-policy+xml -# application/batch-smtp -# application/beep+xml -# application/calendar+xml -# application/cals-1840 -# application/ccmp+xml -application/ccxml+xml ccxml -application/cdmi-capability cdmia -application/cdmi-container cdmic -application/cdmi-domain cdmid -application/cdmi-object cdmio -application/cdmi-queue cdmiq -# application/cea-2018+xml -# application/cellml+xml -# application/cfw -# application/cnrp+xml -# application/commonground -# application/conference-info+xml -# application/cpl+xml -# application/csta+xml -# application/cstadata+xml -application/cu-seeme cu -# application/cybercash -application/davmount+xml davmount -# application/dca-rft -# application/dec-dx -# application/dialog-info+xml -# application/dicom -# application/dns -application/docbook+xml dbk -# application/dskpp+xml -application/dssc+der dssc -application/dssc+xml xdssc -# application/dvcs -application/ecmascript ecma -# application/edi-consent -# application/edi-x12 -# application/edifact -application/emma+xml emma -# application/epp+xml -application/epub+zip epub -# application/eshop -# application/example -application/exi exi -# application/fastinfoset -# application/fastsoap -# application/fits -application/font-tdpfr pfr -# application/framework-attributes+xml -application/gml+xml gml -application/gpx+xml gpx -application/gxf gxf -# application/h224 -# application/held+xml -# application/http -application/hyperstudio stk -# application/ibe-key-request+xml -# application/ibe-pkg-reply+xml -# application/ibe-pp-data -# application/iges -# application/im-iscomposing+xml -# application/index -# application/index.cmd -# application/index.obj -# application/index.response -# application/index.vnd -application/inkml+xml ink inkml -# application/iotp -application/ipfix ipfix -# application/ipp -# application/isup -application/java-archive jar -application/java-serialized-object ser -application/java-vm class -application/javascript js -application/json json -application/jsonml+json jsonml -# application/kpml-request+xml -# application/kpml-response+xml -application/lost+xml lostxml -application/mac-binhex40 hqx -application/mac-compactpro cpt -# application/macwriteii -application/mads+xml mads -application/marc mrc -application/marcxml+xml mrcx -application/mathematica ma nb mb -# application/mathml-content+xml -# application/mathml-presentation+xml -application/mathml+xml mathml -# application/mbms-associated-procedure-description+xml -# application/mbms-deregister+xml -# application/mbms-envelope+xml -# application/mbms-msk+xml -# application/mbms-msk-response+xml -# application/mbms-protection-description+xml -# application/mbms-reception-report+xml -# application/mbms-register+xml -# application/mbms-register-response+xml -# application/mbms-user-service-description+xml -application/mbox mbox -# application/media_control+xml -application/mediaservercontrol+xml mscml -application/metalink+xml metalink -application/metalink4+xml meta4 -application/mets+xml mets -# application/mikey -application/mods+xml mods -# application/moss-keys -# application/moss-signature -# application/mosskey-data -# application/mosskey-request -application/mp21 m21 mp21 -application/mp4 mp4s -# application/mpeg4-generic -# application/mpeg4-iod -# application/mpeg4-iod-xmt -# application/msc-ivr+xml -# application/msc-mixer+xml -application/msword doc dot -application/mxf mxf -# application/nasdata -# application/news-checkgroups -# application/news-groupinfo -# application/news-transmission -# application/nss -# application/ocsp-request -# application/ocsp-response -application/octet-stream bin dms lrf mar so dist distz pkg bpk dump elc deploy -application/oda oda -application/oebps-package+xml opf -application/ogg ogx -application/omdoc+xml omdoc -application/onenote onetoc onetoc2 onetmp onepkg -application/oxps oxps -# application/parityfec -application/patch-ops-error+xml xer -application/pdf pdf -application/pgp-encrypted pgp -# application/pgp-keys -application/pgp-signature asc sig -application/pics-rules prf -# application/pidf+xml -# application/pidf-diff+xml -application/pkcs10 p10 -application/pkcs7-mime p7m p7c -application/pkcs7-signature p7s -application/pkcs8 p8 -application/pkix-attr-cert ac -application/pkix-cert cer -application/pkix-crl crl -application/pkix-pkipath pkipath -application/pkixcmp pki -application/pls+xml pls -# application/poc-settings+xml -application/postscript ai eps ps -# application/prs.alvestrand.titrax-sheet -application/prs.cww cww -# application/prs.nprend -# application/prs.plucker -# application/prs.rdf-xml-crypt -# application/prs.xsf+xml -application/pskc+xml pskcxml -# application/qsig -application/rdf+xml rdf -application/reginfo+xml rif -application/relax-ng-compact-syntax rnc -# application/remote-printing -application/resource-lists+xml rl -application/resource-lists-diff+xml rld -# application/riscos -# application/rlmi+xml -application/rls-services+xml rs -application/rpki-ghostbusters gbr -application/rpki-manifest mft -application/rpki-roa roa -# application/rpki-updown -application/rsd+xml rsd -application/rss+xml rss -application/rtf rtf -# application/rtx -# application/samlassertion+xml -# application/samlmetadata+xml -application/sbml+xml sbml -application/scvp-cv-request scq -application/scvp-cv-response scs -application/scvp-vp-request spq -application/scvp-vp-response spp -application/sdp sdp -# application/set-payment -application/set-payment-initiation setpay -# application/set-registration -application/set-registration-initiation setreg -# application/sgml -# application/sgml-open-catalog -application/shf+xml shf -# application/sieve -# application/simple-filter+xml -# application/simple-message-summary -# application/simplesymbolcontainer -# application/slate -# application/smil -application/smil+xml smi smil -# application/soap+fastinfoset -# application/soap+xml -application/sparql-query rq -application/sparql-results+xml srx -# application/spirits-event+xml -application/srgs gram -application/srgs+xml grxml -application/sru+xml sru -application/ssdl+xml ssdl -application/ssml+xml ssml -# application/tamp-apex-update -# application/tamp-apex-update-confirm -# application/tamp-community-update -# application/tamp-community-update-confirm -# application/tamp-error -# application/tamp-sequence-adjust -# application/tamp-sequence-adjust-confirm -# application/tamp-status-query -# application/tamp-status-response -# application/tamp-update -# application/tamp-update-confirm -application/tei+xml tei teicorpus -application/thraud+xml tfi -# application/timestamp-query -# application/timestamp-reply -application/timestamped-data tsd -# application/tve-trigger -# application/ulpfec -# application/vcard+xml -# application/vemmi -# application/vividence.scriptfile -# application/vnd.3gpp.bsf+xml -application/vnd.3gpp.pic-bw-large plb -application/vnd.3gpp.pic-bw-small psb -application/vnd.3gpp.pic-bw-var pvb -# application/vnd.3gpp.sms -# application/vnd.3gpp2.bcmcsinfo+xml -# application/vnd.3gpp2.sms -application/vnd.3gpp2.tcap tcap -application/vnd.3m.post-it-notes pwn -application/vnd.accpac.simply.aso aso -application/vnd.accpac.simply.imp imp -application/vnd.acucobol acu -application/vnd.acucorp atc acutc -application/vnd.adobe.air-application-installer-package+zip air -application/vnd.adobe.formscentral.fcdt fcdt -application/vnd.adobe.fxp fxp fxpl -# application/vnd.adobe.partial-upload -application/vnd.adobe.xdp+xml xdp -application/vnd.adobe.xfdf xfdf -# application/vnd.aether.imp -# application/vnd.ah-barcode -application/vnd.ahead.space ahead -application/vnd.airzip.filesecure.azf azf -application/vnd.airzip.filesecure.azs azs -application/vnd.amazon.ebook azw -application/vnd.americandynamics.acc acc -application/vnd.amiga.ami ami -# application/vnd.amundsen.maze+xml -application/vnd.android.package-archive apk -application/vnd.anser-web-certificate-issue-initiation cii -application/vnd.anser-web-funds-transfer-initiation fti -application/vnd.antix.game-component atx -application/vnd.apple.installer+xml mpkg -application/vnd.apple.mpegurl m3u8 -# application/vnd.arastra.swi -application/vnd.aristanetworks.swi swi -application/vnd.astraea-software.iota iota -application/vnd.audiograph aep -# application/vnd.autopackage -# application/vnd.avistar+xml -application/vnd.blueice.multipass mpm -# application/vnd.bluetooth.ep.oob -application/vnd.bmi bmi -application/vnd.businessobjects rep -# application/vnd.cab-jscript -# application/vnd.canon-cpdl -# application/vnd.canon-lips -# application/vnd.cendio.thinlinc.clientconf -application/vnd.chemdraw+xml cdxml -application/vnd.chipnuts.karaoke-mmd mmd -application/vnd.cinderella cdy -# application/vnd.cirpack.isdn-ext -application/vnd.claymore cla -application/vnd.cloanto.rp9 rp9 -application/vnd.clonk.c4group c4g c4d c4f c4p c4u -application/vnd.cluetrust.cartomobile-config c11amc -application/vnd.cluetrust.cartomobile-config-pkg c11amz -# application/vnd.collection+json -# application/vnd.commerce-battelle -application/vnd.commonspace csp -application/vnd.contact.cmsg cdbcmsg -application/vnd.cosmocaller cmc -application/vnd.crick.clicker clkx -application/vnd.crick.clicker.keyboard clkk -application/vnd.crick.clicker.palette clkp -application/vnd.crick.clicker.template clkt -application/vnd.crick.clicker.wordbank clkw -application/vnd.criticaltools.wbs+xml wbs -application/vnd.ctc-posml pml -# application/vnd.ctct.ws+xml -# application/vnd.cups-pdf -# application/vnd.cups-postscript -application/vnd.cups-ppd ppd -# application/vnd.cups-raster -# application/vnd.cups-raw -# application/vnd.curl -application/vnd.curl.car car -application/vnd.curl.pcurl pcurl -# application/vnd.cybank -application/vnd.dart dart -application/vnd.data-vision.rdz rdz -application/vnd.dece.data uvf uvvf uvd uvvd -application/vnd.dece.ttml+xml uvt uvvt -application/vnd.dece.unspecified uvx uvvx -application/vnd.dece.zip uvz uvvz -application/vnd.denovo.fcselayout-link fe_launch -# application/vnd.dir-bi.plate-dl-nosuffix -application/vnd.dna dna -application/vnd.dolby.mlp mlp -# application/vnd.dolby.mobile.1 -# application/vnd.dolby.mobile.2 -application/vnd.dpgraph dpg -application/vnd.dreamfactory dfac -application/vnd.ds-keypoint kpxx -application/vnd.dvb.ait ait -# application/vnd.dvb.dvbj -# application/vnd.dvb.esgcontainer -# application/vnd.dvb.ipdcdftnotifaccess -# application/vnd.dvb.ipdcesgaccess -# application/vnd.dvb.ipdcesgaccess2 -# application/vnd.dvb.ipdcesgpdd -# application/vnd.dvb.ipdcroaming -# application/vnd.dvb.iptv.alfec-base -# application/vnd.dvb.iptv.alfec-enhancement -# application/vnd.dvb.notif-aggregate-root+xml -# application/vnd.dvb.notif-container+xml -# application/vnd.dvb.notif-generic+xml -# application/vnd.dvb.notif-ia-msglist+xml -# application/vnd.dvb.notif-ia-registration-request+xml -# application/vnd.dvb.notif-ia-registration-response+xml -# application/vnd.dvb.notif-init+xml -# application/vnd.dvb.pfr -application/vnd.dvb.service svc -# application/vnd.dxr -application/vnd.dynageo geo -# application/vnd.easykaraoke.cdgdownload -# application/vnd.ecdis-update -application/vnd.ecowin.chart mag -# application/vnd.ecowin.filerequest -# application/vnd.ecowin.fileupdate -# application/vnd.ecowin.series -# application/vnd.ecowin.seriesrequest -# application/vnd.ecowin.seriesupdate -# application/vnd.emclient.accessrequest+xml -application/vnd.enliven nml -# application/vnd.eprints.data+xml -application/vnd.epson.esf esf -application/vnd.epson.msf msf -application/vnd.epson.quickanime qam -application/vnd.epson.salt slt -application/vnd.epson.ssf ssf -# application/vnd.ericsson.quickcall -application/vnd.eszigno3+xml es3 et3 -# application/vnd.etsi.aoc+xml -# application/vnd.etsi.cug+xml -# application/vnd.etsi.iptvcommand+xml -# application/vnd.etsi.iptvdiscovery+xml -# application/vnd.etsi.iptvprofile+xml -# application/vnd.etsi.iptvsad-bc+xml -# application/vnd.etsi.iptvsad-cod+xml -# application/vnd.etsi.iptvsad-npvr+xml -# application/vnd.etsi.iptvservice+xml -# application/vnd.etsi.iptvsync+xml -# application/vnd.etsi.iptvueprofile+xml -# application/vnd.etsi.mcid+xml -# application/vnd.etsi.overload-control-policy-dataset+xml -# application/vnd.etsi.sci+xml -# application/vnd.etsi.simservs+xml -# application/vnd.etsi.tsl+xml -# application/vnd.etsi.tsl.der -# application/vnd.eudora.data -application/vnd.ezpix-album ez2 -application/vnd.ezpix-package ez3 -# application/vnd.f-secure.mobile -application/vnd.fdf fdf -application/vnd.fdsn.mseed mseed -application/vnd.fdsn.seed seed dataless -# application/vnd.ffsns -# application/vnd.fints -application/vnd.flographit gph -application/vnd.fluxtime.clip ftc -# application/vnd.font-fontforge-sfd -application/vnd.framemaker fm frame maker book -application/vnd.frogans.fnc fnc -application/vnd.frogans.ltf ltf -application/vnd.fsc.weblaunch fsc -application/vnd.fujitsu.oasys oas -application/vnd.fujitsu.oasys2 oa2 -application/vnd.fujitsu.oasys3 oa3 -application/vnd.fujitsu.oasysgp fg5 -application/vnd.fujitsu.oasysprs bh2 -# application/vnd.fujixerox.art-ex -# application/vnd.fujixerox.art4 -# application/vnd.fujixerox.hbpl -application/vnd.fujixerox.ddd ddd -application/vnd.fujixerox.docuworks xdw -application/vnd.fujixerox.docuworks.binder xbd -# application/vnd.fut-misnet -application/vnd.fuzzysheet fzs -application/vnd.genomatix.tuxedo txd -# application/vnd.geocube+xml -application/vnd.geogebra.file ggb -application/vnd.geogebra.tool ggt -application/vnd.geometry-explorer gex gre -application/vnd.geonext gxt -application/vnd.geoplan g2w -application/vnd.geospace g3w -# application/vnd.globalplatform.card-content-mgt -# application/vnd.globalplatform.card-content-mgt-response -application/vnd.gmx gmx -application/vnd.google-earth.kml+xml kml -application/vnd.google-earth.kmz kmz -application/vnd.grafeq gqf gqs -# application/vnd.gridmp -application/vnd.groove-account gac -application/vnd.groove-help ghf -application/vnd.groove-identity-message gim -application/vnd.groove-injector grv -application/vnd.groove-tool-message gtm -application/vnd.groove-tool-template tpl -application/vnd.groove-vcard vcg -# application/vnd.hal+json -application/vnd.hal+xml hal -application/vnd.handheld-entertainment+xml zmm -application/vnd.hbci hbci -# application/vnd.hcl-bireports -application/vnd.hhe.lesson-player les -application/vnd.hp-hpgl hpgl -application/vnd.hp-hpid hpid -application/vnd.hp-hps hps -application/vnd.hp-jlyt jlt -application/vnd.hp-pcl pcl -application/vnd.hp-pclxl pclxl -# application/vnd.httphone -application/vnd.hydrostatix.sof-data sfd-hdstx -# application/vnd.hzn-3d-crossword -# application/vnd.ibm.afplinedata -# application/vnd.ibm.electronic-media -application/vnd.ibm.minipay mpy -application/vnd.ibm.modcap afp listafp list3820 -application/vnd.ibm.rights-management irm -application/vnd.ibm.secure-container sc -application/vnd.iccprofile icc icm -application/vnd.igloader igl -application/vnd.immervision-ivp ivp -application/vnd.immervision-ivu ivu -# application/vnd.informedcontrol.rms+xml -# application/vnd.informix-visionary -# application/vnd.infotech.project -# application/vnd.infotech.project+xml -# application/vnd.innopath.wamp.notification -application/vnd.insors.igm igm -application/vnd.intercon.formnet xpw xpx -application/vnd.intergeo i2g -# application/vnd.intertrust.digibox -# application/vnd.intertrust.nncp -application/vnd.intu.qbo qbo -application/vnd.intu.qfx qfx -# application/vnd.iptc.g2.conceptitem+xml -# application/vnd.iptc.g2.knowledgeitem+xml -# application/vnd.iptc.g2.newsitem+xml -# application/vnd.iptc.g2.newsmessage+xml -# application/vnd.iptc.g2.packageitem+xml -# application/vnd.iptc.g2.planningitem+xml -application/vnd.ipunplugged.rcprofile rcprofile -application/vnd.irepository.package+xml irp -application/vnd.is-xpr xpr -application/vnd.isac.fcs fcs -application/vnd.jam jam -# application/vnd.japannet-directory-service -# application/vnd.japannet-jpnstore-wakeup -# application/vnd.japannet-payment-wakeup -# application/vnd.japannet-registration -# application/vnd.japannet-registration-wakeup -# application/vnd.japannet-setstore-wakeup -# application/vnd.japannet-verification -# application/vnd.japannet-verification-wakeup -application/vnd.jcp.javame.midlet-rms rms -application/vnd.jisp jisp -application/vnd.joost.joda-archive joda -application/vnd.kahootz ktz ktr -application/vnd.kde.karbon karbon -application/vnd.kde.kchart chrt -application/vnd.kde.kformula kfo -application/vnd.kde.kivio flw -application/vnd.kde.kontour kon -application/vnd.kde.kpresenter kpr kpt -application/vnd.kde.kspread ksp -application/vnd.kde.kword kwd kwt -application/vnd.kenameaapp htke -application/vnd.kidspiration kia -application/vnd.kinar kne knp -application/vnd.koan skp skd skt skm -application/vnd.kodak-descriptor sse -application/vnd.las.las+xml lasxml -# application/vnd.liberty-request+xml -application/vnd.llamagraphics.life-balance.desktop lbd -application/vnd.llamagraphics.life-balance.exchange+xml lbe -application/vnd.lotus-1-2-3 123 -application/vnd.lotus-approach apr -application/vnd.lotus-freelance pre -application/vnd.lotus-notes nsf -application/vnd.lotus-organizer org -application/vnd.lotus-screencam scm -application/vnd.lotus-wordpro lwp -application/vnd.macports.portpkg portpkg -# application/vnd.marlin.drm.actiontoken+xml -# application/vnd.marlin.drm.conftoken+xml -# application/vnd.marlin.drm.license+xml -# application/vnd.marlin.drm.mdcf -application/vnd.mcd mcd -application/vnd.medcalcdata mc1 -application/vnd.mediastation.cdkey cdkey -# application/vnd.meridian-slingshot -application/vnd.mfer mwf -application/vnd.mfmp mfm -application/vnd.micrografx.flo flo -application/vnd.micrografx.igx igx -application/vnd.mif mif -# application/vnd.minisoft-hp3000-save -# application/vnd.mitsubishi.misty-guard.trustweb -application/vnd.mobius.daf daf -application/vnd.mobius.dis dis -application/vnd.mobius.mbk mbk -application/vnd.mobius.mqy mqy -application/vnd.mobius.msl msl -application/vnd.mobius.plc plc -application/vnd.mobius.txf txf -application/vnd.mophun.application mpn -application/vnd.mophun.certificate mpc -# application/vnd.motorola.flexsuite -# application/vnd.motorola.flexsuite.adsi -# application/vnd.motorola.flexsuite.fis -# application/vnd.motorola.flexsuite.gotap -# application/vnd.motorola.flexsuite.kmr -# application/vnd.motorola.flexsuite.ttc -# application/vnd.motorola.flexsuite.wem -# application/vnd.motorola.iprm -application/vnd.mozilla.xul+xml xul -application/vnd.ms-artgalry cil -# application/vnd.ms-asf -application/vnd.ms-cab-compressed cab -# application/vnd.ms-color.iccprofile -application/vnd.ms-excel xls xlm xla xlc xlt xlw -application/vnd.ms-excel.addin.macroenabled.12 xlam -application/vnd.ms-excel.sheet.binary.macroenabled.12 xlsb -application/vnd.ms-excel.sheet.macroenabled.12 xlsm -application/vnd.ms-excel.template.macroenabled.12 xltm -application/vnd.ms-fontobject eot -application/vnd.ms-htmlhelp chm -application/vnd.ms-ims ims -application/vnd.ms-lrm lrm -# application/vnd.ms-office.activex+xml -application/vnd.ms-officetheme thmx -# application/vnd.ms-opentype -# application/vnd.ms-package.obfuscated-opentype -application/vnd.ms-pki.seccat cat -application/vnd.ms-pki.stl stl -# application/vnd.ms-playready.initiator+xml -application/vnd.ms-powerpoint ppt pps pot -application/vnd.ms-powerpoint.addin.macroenabled.12 ppam -application/vnd.ms-powerpoint.presentation.macroenabled.12 pptm -application/vnd.ms-powerpoint.slide.macroenabled.12 sldm -application/vnd.ms-powerpoint.slideshow.macroenabled.12 ppsm -application/vnd.ms-powerpoint.template.macroenabled.12 potm -# application/vnd.ms-printing.printticket+xml -application/vnd.ms-project mpp mpt -# application/vnd.ms-tnef -# application/vnd.ms-wmdrm.lic-chlg-req -# application/vnd.ms-wmdrm.lic-resp -# application/vnd.ms-wmdrm.meter-chlg-req -# application/vnd.ms-wmdrm.meter-resp -application/vnd.ms-word.document.macroenabled.12 docm -application/vnd.ms-word.template.macroenabled.12 dotm -application/vnd.ms-works wps wks wcm wdb -application/vnd.ms-wpl wpl -application/vnd.ms-xpsdocument xps -application/vnd.mseq mseq -# application/vnd.msign -# application/vnd.multiad.creator -# application/vnd.multiad.creator.cif -# application/vnd.music-niff -application/vnd.musician mus -application/vnd.muvee.style msty -application/vnd.mynfc taglet -# application/vnd.ncd.control -# application/vnd.ncd.reference -# application/vnd.nervana -# application/vnd.netfpx -application/vnd.neurolanguage.nlu nlu -application/vnd.nitf ntf nitf -application/vnd.noblenet-directory nnd -application/vnd.noblenet-sealer nns -application/vnd.noblenet-web nnw -# application/vnd.nokia.catalogs -# application/vnd.nokia.conml+wbxml -# application/vnd.nokia.conml+xml -# application/vnd.nokia.isds-radio-presets -# application/vnd.nokia.iptv.config+xml -# application/vnd.nokia.landmark+wbxml -# application/vnd.nokia.landmark+xml -# application/vnd.nokia.landmarkcollection+xml -# application/vnd.nokia.n-gage.ac+xml -application/vnd.nokia.n-gage.data ngdat -application/vnd.nokia.n-gage.symbian.install n-gage -# application/vnd.nokia.ncd -# application/vnd.nokia.pcd+wbxml -# application/vnd.nokia.pcd+xml -application/vnd.nokia.radio-preset rpst -application/vnd.nokia.radio-presets rpss -application/vnd.novadigm.edm edm -application/vnd.novadigm.edx edx -application/vnd.novadigm.ext ext -# application/vnd.ntt-local.file-transfer -# application/vnd.ntt-local.sip-ta_remote -# application/vnd.ntt-local.sip-ta_tcp_stream -application/vnd.oasis.opendocument.chart odc -application/vnd.oasis.opendocument.chart-template otc -application/vnd.oasis.opendocument.database odb -application/vnd.oasis.opendocument.formula odf -application/vnd.oasis.opendocument.formula-template odft -application/vnd.oasis.opendocument.graphics odg -application/vnd.oasis.opendocument.graphics-template otg -application/vnd.oasis.opendocument.image odi -application/vnd.oasis.opendocument.image-template oti -application/vnd.oasis.opendocument.presentation odp -application/vnd.oasis.opendocument.presentation-template otp -application/vnd.oasis.opendocument.spreadsheet ods -application/vnd.oasis.opendocument.spreadsheet-template ots -application/vnd.oasis.opendocument.text odt -application/vnd.oasis.opendocument.text-master odm -application/vnd.oasis.opendocument.text-template ott -application/vnd.oasis.opendocument.text-web oth -# application/vnd.obn -# application/vnd.oftn.l10n+json -# application/vnd.oipf.contentaccessdownload+xml -# application/vnd.oipf.contentaccessstreaming+xml -# application/vnd.oipf.cspg-hexbinary -# application/vnd.oipf.dae.svg+xml -# application/vnd.oipf.dae.xhtml+xml -# application/vnd.oipf.mippvcontrolmessage+xml -# application/vnd.oipf.pae.gem -# application/vnd.oipf.spdiscovery+xml -# application/vnd.oipf.spdlist+xml -# application/vnd.oipf.ueprofile+xml -# application/vnd.oipf.userprofile+xml -application/vnd.olpc-sugar xo -# application/vnd.oma-scws-config -# application/vnd.oma-scws-http-request -# application/vnd.oma-scws-http-response -# application/vnd.oma.bcast.associated-procedure-parameter+xml -# application/vnd.oma.bcast.drm-trigger+xml -# application/vnd.oma.bcast.imd+xml -# application/vnd.oma.bcast.ltkm -# application/vnd.oma.bcast.notification+xml -# application/vnd.oma.bcast.provisioningtrigger -# application/vnd.oma.bcast.sgboot -# application/vnd.oma.bcast.sgdd+xml -# application/vnd.oma.bcast.sgdu -# application/vnd.oma.bcast.simple-symbol-container -# application/vnd.oma.bcast.smartcard-trigger+xml -# application/vnd.oma.bcast.sprov+xml -# application/vnd.oma.bcast.stkm -# application/vnd.oma.cab-address-book+xml -# application/vnd.oma.cab-feature-handler+xml -# application/vnd.oma.cab-pcc+xml -# application/vnd.oma.cab-user-prefs+xml -# application/vnd.oma.dcd -# application/vnd.oma.dcdc -application/vnd.oma.dd2+xml dd2 -# application/vnd.oma.drm.risd+xml -# application/vnd.oma.group-usage-list+xml -# application/vnd.oma.pal+xml -# application/vnd.oma.poc.detailed-progress-report+xml -# application/vnd.oma.poc.final-report+xml -# application/vnd.oma.poc.groups+xml -# application/vnd.oma.poc.invocation-descriptor+xml -# application/vnd.oma.poc.optimized-progress-report+xml -# application/vnd.oma.push -# application/vnd.oma.scidm.messages+xml -# application/vnd.oma.xcap-directory+xml -# application/vnd.omads-email+xml -# application/vnd.omads-file+xml -# application/vnd.omads-folder+xml -# application/vnd.omaloc-supl-init -application/vnd.openofficeorg.extension oxt -# application/vnd.openxmlformats-officedocument.custom-properties+xml -# application/vnd.openxmlformats-officedocument.customxmlproperties+xml -# application/vnd.openxmlformats-officedocument.drawing+xml -# application/vnd.openxmlformats-officedocument.drawingml.chart+xml -# application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml -# application/vnd.openxmlformats-officedocument.extended-properties+xml -# application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml -# application/vnd.openxmlformats-officedocument.presentationml.comments+xml -# application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml -# application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml -# application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml -application/vnd.openxmlformats-officedocument.presentationml.presentation pptx -# application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.presprops+xml -application/vnd.openxmlformats-officedocument.presentationml.slide sldx -# application/vnd.openxmlformats-officedocument.presentationml.slide+xml -# application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml -# application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml -application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx -# application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml -# application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml -# application/vnd.openxmlformats-officedocument.presentationml.tags+xml -application/vnd.openxmlformats-officedocument.presentationml.template potx -# application/vnd.openxmlformats-officedocument.presentationml.template.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx -# application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx -# application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml -# application/vnd.openxmlformats-officedocument.theme+xml -# application/vnd.openxmlformats-officedocument.themeoverride+xml -# application/vnd.openxmlformats-officedocument.vmldrawing -# application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.document docx -# application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx -# application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml -# application/vnd.openxmlformats-package.core-properties+xml -# application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml -# application/vnd.openxmlformats-package.relationships+xml -# application/vnd.quobject-quoxdocument -# application/vnd.osa.netdeploy -application/vnd.osgeo.mapguide.package mgp -# application/vnd.osgi.bundle -application/vnd.osgi.dp dp -application/vnd.osgi.subsystem esa -# application/vnd.otps.ct-kip+xml -application/vnd.palm pdb pqa oprc -# application/vnd.paos.xml -application/vnd.pawaafile paw -application/vnd.pg.format str -application/vnd.pg.osasli ei6 -# application/vnd.piaccess.application-licence -application/vnd.picsel efif -application/vnd.pmi.widget wg -# application/vnd.poc.group-advertisement+xml -application/vnd.pocketlearn plf -application/vnd.powerbuilder6 pbd -# application/vnd.powerbuilder6-s -# application/vnd.powerbuilder7 -# application/vnd.powerbuilder7-s -# application/vnd.powerbuilder75 -# application/vnd.powerbuilder75-s -# application/vnd.preminet -application/vnd.previewsystems.box box -application/vnd.proteus.magazine mgz -application/vnd.publishare-delta-tree qps -application/vnd.pvi.ptid1 ptid -# application/vnd.pwg-multiplexed -# application/vnd.pwg-xhtml-print+xml -# application/vnd.qualcomm.brew-app-res -application/vnd.quark.quarkxpress qxd qxt qwd qwt qxl qxb -# application/vnd.radisys.moml+xml -# application/vnd.radisys.msml+xml -# application/vnd.radisys.msml-audit+xml -# application/vnd.radisys.msml-audit-conf+xml -# application/vnd.radisys.msml-audit-conn+xml -# application/vnd.radisys.msml-audit-dialog+xml -# application/vnd.radisys.msml-audit-stream+xml -# application/vnd.radisys.msml-conf+xml -# application/vnd.radisys.msml-dialog+xml -# application/vnd.radisys.msml-dialog-base+xml -# application/vnd.radisys.msml-dialog-fax-detect+xml -# application/vnd.radisys.msml-dialog-fax-sendrecv+xml -# application/vnd.radisys.msml-dialog-group+xml -# application/vnd.radisys.msml-dialog-speech+xml -# application/vnd.radisys.msml-dialog-transform+xml -# application/vnd.rainstor.data -# application/vnd.rapid -application/vnd.realvnc.bed bed -application/vnd.recordare.musicxml mxl -application/vnd.recordare.musicxml+xml musicxml -# application/vnd.renlearn.rlprint -application/vnd.rig.cryptonote cryptonote -application/vnd.rim.cod cod -application/vnd.rn-realmedia rm -application/vnd.rn-realmedia-vbr rmvb -application/vnd.route66.link66+xml link66 -# application/vnd.rs-274x -# application/vnd.ruckus.download -# application/vnd.s3sms -application/vnd.sailingtracker.track st -# application/vnd.sbm.cid -# application/vnd.sbm.mid2 -# application/vnd.scribus -# application/vnd.sealed.3df -# application/vnd.sealed.csf -# application/vnd.sealed.doc -# application/vnd.sealed.eml -# application/vnd.sealed.mht -# application/vnd.sealed.net -# application/vnd.sealed.ppt -# application/vnd.sealed.tiff -# application/vnd.sealed.xls -# application/vnd.sealedmedia.softseal.html -# application/vnd.sealedmedia.softseal.pdf -application/vnd.seemail see -application/vnd.sema sema -application/vnd.semd semd -application/vnd.semf semf -application/vnd.shana.informed.formdata ifm -application/vnd.shana.informed.formtemplate itp -application/vnd.shana.informed.interchange iif -application/vnd.shana.informed.package ipk -application/vnd.simtech-mindmapper twd twds -application/vnd.smaf mmf -# application/vnd.smart.notebook -application/vnd.smart.teacher teacher -# application/vnd.software602.filler.form+xml -# application/vnd.software602.filler.form-xml-zip -application/vnd.solent.sdkm+xml sdkm sdkd -application/vnd.spotfire.dxp dxp -application/vnd.spotfire.sfs sfs -# application/vnd.sss-cod -# application/vnd.sss-dtf -# application/vnd.sss-ntf -application/vnd.stardivision.calc sdc -application/vnd.stardivision.draw sda -application/vnd.stardivision.impress sdd -application/vnd.stardivision.math smf -application/vnd.stardivision.writer sdw vor -application/vnd.stardivision.writer-global sgl -application/vnd.stepmania.package smzip -application/vnd.stepmania.stepchart sm -# application/vnd.street-stream -application/vnd.sun.xml.calc sxc -application/vnd.sun.xml.calc.template stc -application/vnd.sun.xml.draw sxd -application/vnd.sun.xml.draw.template std -application/vnd.sun.xml.impress sxi -application/vnd.sun.xml.impress.template sti -application/vnd.sun.xml.math sxm -application/vnd.sun.xml.writer sxw -application/vnd.sun.xml.writer.global sxg -application/vnd.sun.xml.writer.template stw -# application/vnd.sun.wadl+xml -application/vnd.sus-calendar sus susp -application/vnd.svd svd -# application/vnd.swiftview-ics -application/vnd.symbian.install sis sisx -application/vnd.syncml+xml xsm -application/vnd.syncml.dm+wbxml bdm -application/vnd.syncml.dm+xml xdm -# application/vnd.syncml.dm.notification -# application/vnd.syncml.ds.notification -application/vnd.tao.intent-module-archive tao -application/vnd.tcpdump.pcap pcap cap dmp -application/vnd.tmobile-livetv tmo -application/vnd.trid.tpt tpt -application/vnd.triscape.mxs mxs -application/vnd.trueapp tra -# application/vnd.truedoc -# application/vnd.ubisoft.webplayer -application/vnd.ufdl ufd ufdl -application/vnd.uiq.theme utz -application/vnd.umajin umj -application/vnd.unity unityweb -application/vnd.uoml+xml uoml -# application/vnd.uplanet.alert -# application/vnd.uplanet.alert-wbxml -# application/vnd.uplanet.bearer-choice -# application/vnd.uplanet.bearer-choice-wbxml -# application/vnd.uplanet.cacheop -# application/vnd.uplanet.cacheop-wbxml -# application/vnd.uplanet.channel -# application/vnd.uplanet.channel-wbxml -# application/vnd.uplanet.list -# application/vnd.uplanet.list-wbxml -# application/vnd.uplanet.listcmd -# application/vnd.uplanet.listcmd-wbxml -# application/vnd.uplanet.signal -application/vnd.vcx vcx -# application/vnd.vd-study -# application/vnd.vectorworks -# application/vnd.verimatrix.vcas -# application/vnd.vidsoft.vidconference -application/vnd.visio vsd vst vss vsw -application/vnd.visionary vis -# application/vnd.vividence.scriptfile -application/vnd.vsf vsf -# application/vnd.wap.sic -# application/vnd.wap.slc -application/vnd.wap.wbxml wbxml -application/vnd.wap.wmlc wmlc -application/vnd.wap.wmlscriptc wmlsc -application/vnd.webturbo wtb -# application/vnd.wfa.wsc -# application/vnd.wmc -# application/vnd.wmf.bootstrap -# application/vnd.wolfram.mathematica -# application/vnd.wolfram.mathematica.package -application/vnd.wolfram.player nbp -application/vnd.wordperfect wpd -application/vnd.wqd wqd -# application/vnd.wrq-hp3000-labelled -application/vnd.wt.stf stf -# application/vnd.wv.csp+wbxml -# application/vnd.wv.csp+xml -# application/vnd.wv.ssp+xml -application/vnd.xara xar -application/vnd.xfdl xfdl -# application/vnd.xfdl.webform -# application/vnd.xmi+xml -# application/vnd.xmpie.cpkg -# application/vnd.xmpie.dpkg -# application/vnd.xmpie.plan -# application/vnd.xmpie.ppkg -# application/vnd.xmpie.xlim -application/vnd.yamaha.hv-dic hvd -application/vnd.yamaha.hv-script hvs -application/vnd.yamaha.hv-voice hvp -application/vnd.yamaha.openscoreformat osf -application/vnd.yamaha.openscoreformat.osfpvg+xml osfpvg -# application/vnd.yamaha.remote-setup -application/vnd.yamaha.smaf-audio saf -application/vnd.yamaha.smaf-phrase spf -# application/vnd.yamaha.through-ngn -# application/vnd.yamaha.tunnel-udpencap -application/vnd.yellowriver-custom-menu cmp -application/vnd.zul zir zirz -application/vnd.zzazz.deck+xml zaz -application/voicexml+xml vxml -# application/vq-rtcpxr -# application/watcherinfo+xml -# application/whoispp-query -# application/whoispp-response -application/widget wgt -application/winhlp hlp -# application/wita -# application/wordperfect5.1 -application/wsdl+xml wsdl -application/wspolicy+xml wspolicy -application/x-7z-compressed 7z -application/x-abiword abw -application/x-ace-compressed ace -# application/x-amf -application/x-apple-diskimage dmg -application/x-authorware-bin aab x32 u32 vox -application/x-authorware-map aam -application/x-authorware-seg aas -application/x-bcpio bcpio -application/x-bittorrent torrent -application/x-blorb blb blorb -application/x-bzip bz -application/x-bzip2 bz2 boz -application/x-cbr cbr cba cbt cbz cb7 -application/x-cdlink vcd -application/x-cfs-compressed cfs -application/x-chat chat -application/x-chess-pgn pgn -application/x-conference nsc -# application/x-compress -application/x-cpio cpio -application/x-csh csh -application/x-debian-package deb udeb -application/x-dgc-compressed dgc -application/x-director dir dcr dxr cst cct cxt w3d fgd swa -application/x-doom wad -application/x-dtbncx+xml ncx -application/x-dtbook+xml dtb -application/x-dtbresource+xml res -application/x-dvi dvi -application/x-envoy evy -application/x-eva eva -application/x-font-bdf bdf -# application/x-font-dos -# application/x-font-framemaker -application/x-font-ghostscript gsf -# application/x-font-libgrx -application/x-font-linux-psf psf -application/x-font-otf otf -application/x-font-pcf pcf -application/x-font-snf snf -# application/x-font-speedo -# application/x-font-sunos-news -application/x-font-ttf ttf ttc -application/x-font-type1 pfa pfb pfm afm -application/font-woff woff -# application/x-font-vfont -application/x-freearc arc -application/x-futuresplash spl -application/x-gca-compressed gca -application/x-glulx ulx -application/x-gnumeric gnumeric -application/x-gramps-xml gramps -application/x-gtar gtar -# application/x-gzip -application/x-hdf hdf -application/x-install-instructions install -application/x-iso9660-image iso -application/x-java-jnlp-file jnlp -application/x-latex latex -application/x-lzh-compressed lzh lha -application/x-mie mie -application/x-mobipocket-ebook prc mobi -application/x-ms-application application -application/x-ms-shortcut lnk -application/x-ms-wmd wmd -application/x-ms-wmz wmz -application/x-ms-xbap xbap -application/x-msaccess mdb -application/x-msbinder obd -application/x-mscardfile crd -application/x-msclip clp -application/x-msdownload exe dll com bat msi -application/x-msmediaview mvb m13 m14 -application/x-msmetafile wmf wmz emf emz -application/x-msmoney mny -application/x-mspublisher pub -application/x-msschedule scd -application/x-msterminal trm -application/x-mswrite wri -application/x-netcdf nc cdf -application/x-nzb nzb -application/x-pkcs12 p12 pfx -application/x-pkcs7-certificates p7b spc -application/x-pkcs7-certreqresp p7r -application/x-rar-compressed rar -application/x-research-info-systems ris -application/x-sh sh -application/x-shar shar -application/x-shockwave-flash swf -application/x-silverlight-app xap -application/x-sql sql -application/x-stuffit sit -application/x-stuffitx sitx -application/x-subrip srt -application/x-sv4cpio sv4cpio -application/x-sv4crc sv4crc -application/x-t3vm-image t3 -application/x-tads gam -application/x-tar tar -application/x-tcl tcl -application/x-tex tex -application/x-tex-tfm tfm -application/x-texinfo texinfo texi -application/x-tgif obj -application/x-ustar ustar -application/x-wais-source src -application/x-x509-ca-cert der crt -application/x-xfig fig -application/x-xliff+xml xlf -application/x-xpinstall xpi -application/x-xz xz -application/x-zmachine z1 z2 z3 z4 z5 z6 z7 z8 -# application/x400-bp -application/xaml+xml xaml -# application/xcap-att+xml -# application/xcap-caps+xml -application/xcap-diff+xml xdf -# application/xcap-el+xml -# application/xcap-error+xml -# application/xcap-ns+xml -# application/xcon-conference-info-diff+xml -# application/xcon-conference-info+xml -application/xenc+xml xenc -application/xhtml+xml xhtml xht -# application/xhtml-voice+xml -application/xml xml xsl -application/xml-dtd dtd -# application/xml-external-parsed-entity -# application/xmpp+xml -application/xop+xml xop -application/xproc+xml xpl -application/xslt+xml xslt -application/xspf+xml xspf -application/xv+xml mxml xhvml xvml xvm -application/yang yang -application/yin+xml yin -application/zip zip -# audio/1d-interleaved-parityfec -# audio/32kadpcm -# audio/3gpp -# audio/3gpp2 -# audio/ac3 -audio/adpcm adp -# audio/amr -# audio/amr-wb -# audio/amr-wb+ -# audio/asc -# audio/atrac-advanced-lossless -# audio/atrac-x -# audio/atrac3 -audio/basic au snd -# audio/bv16 -# audio/bv32 -# audio/clearmode -# audio/cn -# audio/dat12 -# audio/dls -# audio/dsr-es201108 -# audio/dsr-es202050 -# audio/dsr-es202211 -# audio/dsr-es202212 -# audio/dv -# audio/dvi4 -# audio/eac3 -# audio/evrc -# audio/evrc-qcp -# audio/evrc0 -# audio/evrc1 -# audio/evrcb -# audio/evrcb0 -# audio/evrcb1 -# audio/evrcwb -# audio/evrcwb0 -# audio/evrcwb1 -# audio/example -# audio/fwdred -# audio/g719 -# audio/g722 -# audio/g7221 -# audio/g723 -# audio/g726-16 -# audio/g726-24 -# audio/g726-32 -# audio/g726-40 -# audio/g728 -# audio/g729 -# audio/g7291 -# audio/g729d -# audio/g729e -# audio/gsm -# audio/gsm-efr -# audio/gsm-hr-08 -# audio/ilbc -# audio/ip-mr_v2.5 -# audio/isac -# audio/l16 -# audio/l20 -# audio/l24 -# audio/l8 -# audio/lpc -audio/midi mid midi kar rmi -# audio/mobile-xmf -audio/mp4 mp4a -# audio/mp4a-latm -# audio/mpa -# audio/mpa-robust -audio/mpeg mpga mp2 mp2a mp3 m2a m3a -# audio/mpeg4-generic -# audio/musepack -audio/ogg oga ogg spx -# audio/opus -# audio/parityfec -# audio/pcma -# audio/pcma-wb -# audio/pcmu-wb -# audio/pcmu -# audio/prs.sid -# audio/qcelp -# audio/red -# audio/rtp-enc-aescm128 -# audio/rtp-midi -# audio/rtx -audio/s3m s3m -audio/silk sil -# audio/smv -# audio/smv0 -# audio/smv-qcp -# audio/sp-midi -# audio/speex -# audio/t140c -# audio/t38 -# audio/telephone-event -# audio/tone -# audio/uemclip -# audio/ulpfec -# audio/vdvi -# audio/vmr-wb -# audio/vnd.3gpp.iufp -# audio/vnd.4sb -# audio/vnd.audiokoz -# audio/vnd.celp -# audio/vnd.cisco.nse -# audio/vnd.cmles.radio-events -# audio/vnd.cns.anp1 -# audio/vnd.cns.inf1 -audio/vnd.dece.audio uva uvva -audio/vnd.digital-winds eol -# audio/vnd.dlna.adts -# audio/vnd.dolby.heaac.1 -# audio/vnd.dolby.heaac.2 -# audio/vnd.dolby.mlp -# audio/vnd.dolby.mps -# audio/vnd.dolby.pl2 -# audio/vnd.dolby.pl2x -# audio/vnd.dolby.pl2z -# audio/vnd.dolby.pulse.1 -audio/vnd.dra dra -audio/vnd.dts dts -audio/vnd.dts.hd dtshd -# audio/vnd.dvb.file -# audio/vnd.everad.plj -# audio/vnd.hns.audio -audio/vnd.lucent.voice lvp -audio/vnd.ms-playready.media.pya pya -# audio/vnd.nokia.mobile-xmf -# audio/vnd.nortel.vbk -audio/vnd.nuera.ecelp4800 ecelp4800 -audio/vnd.nuera.ecelp7470 ecelp7470 -audio/vnd.nuera.ecelp9600 ecelp9600 -# audio/vnd.octel.sbc -# audio/vnd.qcelp -# audio/vnd.rhetorex.32kadpcm -audio/vnd.rip rip -# audio/vnd.sealedmedia.softseal.mpeg -# audio/vnd.vmx.cvsd -# audio/vorbis -# audio/vorbis-config -audio/webm weba -audio/x-aac aac -audio/x-aiff aif aiff aifc -audio/x-caf caf -audio/x-flac flac -audio/x-matroska mka -audio/x-mpegurl m3u -audio/x-ms-wax wax -audio/x-ms-wma wma -audio/x-pn-realaudio ram ra -audio/x-pn-realaudio-plugin rmp -# audio/x-tta -audio/x-wav wav -audio/xm xm -chemical/x-cdx cdx -chemical/x-cif cif -chemical/x-cmdf cmdf -chemical/x-cml cml -chemical/x-csml csml -# chemical/x-pdb -chemical/x-xyz xyz -image/bmp bmp -image/cgm cgm -# image/example -# image/fits -image/g3fax g3 -image/gif gif -image/ief ief -# image/jp2 -image/jpeg jpeg jpg jpe -# image/jpm -# image/jpx -image/ktx ktx -# image/naplps -image/png png -image/prs.btif btif -# image/prs.pti -image/sgi sgi -image/svg+xml svg svgz -# image/t38 -image/tiff tiff tif -# image/tiff-fx -image/vnd.adobe.photoshop psd -# image/vnd.cns.inf2 -image/vnd.dece.graphic uvi uvvi uvg uvvg -image/vnd.dvb.subtitle sub -image/vnd.djvu djvu djv -image/vnd.dwg dwg -image/vnd.dxf dxf -image/vnd.fastbidsheet fbs -image/vnd.fpx fpx -image/vnd.fst fst -image/vnd.fujixerox.edmics-mmr mmr -image/vnd.fujixerox.edmics-rlc rlc -# image/vnd.globalgraphics.pgb -# image/vnd.microsoft.icon -# image/vnd.mix -image/vnd.ms-modi mdi -image/vnd.ms-photo wdp -image/vnd.net-fpx npx -# image/vnd.radiance -# image/vnd.sealed.png -# image/vnd.sealedmedia.softseal.gif -# image/vnd.sealedmedia.softseal.jpg -# image/vnd.svf -image/vnd.wap.wbmp wbmp -image/vnd.xiff xif -image/webp webp -image/x-3ds 3ds -image/x-cmu-raster ras -image/x-cmx cmx -image/x-freehand fh fhc fh4 fh5 fh7 -image/x-icon ico -image/x-mrsid-image sid -image/x-pcx pcx -image/x-pict pic pct -image/x-portable-anymap pnm -image/x-portable-bitmap pbm -image/x-portable-graymap pgm -image/x-portable-pixmap ppm -image/x-rgb rgb -image/x-tga tga -image/x-xbitmap xbm -image/x-xpixmap xpm -image/x-xwindowdump xwd -# message/cpim -# message/delivery-status -# message/disposition-notification -# message/example -# message/external-body -# message/feedback-report -# message/global -# message/global-delivery-status -# message/global-disposition-notification -# message/global-headers -# message/http -# message/imdn+xml -# message/news -# message/partial -message/rfc822 eml mime -# message/s-http -# message/sip -# message/sipfrag -# message/tracking-status -# message/vnd.si.simp -# model/example -model/iges igs iges -model/mesh msh mesh silo -model/vnd.collada+xml dae -model/vnd.dwf dwf -# model/vnd.flatland.3dml -model/vnd.gdl gdl -# model/vnd.gs-gdl -# model/vnd.gs.gdl -model/vnd.gtw gtw -# model/vnd.moml+xml -model/vnd.mts mts -# model/vnd.parasolid.transmit.binary -# model/vnd.parasolid.transmit.text -model/vnd.vtu vtu -model/vrml wrl vrml -model/x3d+binary x3db x3dbz -model/x3d+vrml x3dv x3dvz -model/x3d+xml x3d x3dz -# multipart/alternative -# multipart/appledouble -# multipart/byteranges -# multipart/digest -# multipart/encrypted -# multipart/example -# multipart/form-data -# multipart/header-set -# multipart/mixed -# multipart/parallel -# multipart/related -# multipart/report -# multipart/signed -# multipart/voice-message -# text/1d-interleaved-parityfec -text/cache-manifest appcache -text/calendar ics ifb -text/css css -text/csv csv -# text/directory -# text/dns -# text/ecmascript -# text/enriched -# text/example -# text/fwdred -text/html html htm -# text/javascript -text/n3 n3 -# text/parityfec -text/plain txt text conf def list log in -# text/prs.fallenstein.rst -text/prs.lines.tag dsc -# text/vnd.radisys.msml-basic-layout -# text/red -# text/rfc822-headers -text/richtext rtx -# text/rtf -# text/rtp-enc-aescm128 -# text/rtx -text/sgml sgml sgm -# text/t140 -text/tab-separated-values tsv -text/troff t tr roff man me ms -text/turtle ttl -# text/ulpfec -text/uri-list uri uris urls -text/vcard vcard -# text/vnd.abc -text/vnd.curl curl -text/vnd.curl.dcurl dcurl -text/vnd.curl.scurl scurl -text/vnd.curl.mcurl mcurl -# text/vnd.dmclientscript -text/vnd.dvb.subtitle sub -# text/vnd.esmertec.theme-descriptor -text/vnd.fly fly -text/vnd.fmi.flexstor flx -text/vnd.graphviz gv -text/vnd.in3d.3dml 3dml -text/vnd.in3d.spot spot -# text/vnd.iptc.newsml -# text/vnd.iptc.nitf -# text/vnd.latex-z -# text/vnd.motorola.reflex -# text/vnd.ms-mediapackage -# text/vnd.net2phone.commcenter.command -# text/vnd.si.uricatalogue -text/vnd.sun.j2me.app-descriptor jad -# text/vnd.trolltech.linguist -# text/vnd.wap.si -# text/vnd.wap.sl -text/vnd.wap.wml wml -text/vnd.wap.wmlscript wmls -text/x-asm s asm -text/x-c c cc cxx cpp h hh dic -text/x-fortran f for f77 f90 -text/x-java-source java -text/x-opml opml -text/x-pascal p pas -text/x-nfo nfo -text/x-setext etx -text/x-sfv sfv -text/x-uuencode uu -text/x-vcalendar vcs -text/x-vcard vcf -# text/xml -# text/xml-external-parsed-entity -# video/1d-interleaved-parityfec -video/3gpp 3gp -# video/3gpp-tt -video/3gpp2 3g2 -# video/bmpeg -# video/bt656 -# video/celb -# video/dv -# video/example -video/h261 h261 -video/h263 h263 -# video/h263-1998 -# video/h263-2000 -video/h264 h264 -# video/h264-rcdo -# video/h264-svc -video/jpeg jpgv -# video/jpeg2000 -video/jpm jpm jpgm -video/mj2 mj2 mjp2 -# video/mp1s -# video/mp2p -# video/mp2t -video/mp4 mp4 mp4v mpg4 -# video/mp4v-es -video/mpeg mpeg mpg mpe m1v m2v -# video/mpeg4-generic -# video/mpv -# video/nv -video/ogg ogv -# video/parityfec -# video/pointer -video/quicktime qt mov -# video/raw -# video/rtp-enc-aescm128 -# video/rtx -# video/smpte292m -# video/ulpfec -# video/vc1 -# video/vnd.cctv -video/vnd.dece.hd uvh uvvh -video/vnd.dece.mobile uvm uvvm -# video/vnd.dece.mp4 -video/vnd.dece.pd uvp uvvp -video/vnd.dece.sd uvs uvvs -video/vnd.dece.video uvv uvvv -# video/vnd.directv.mpeg -# video/vnd.directv.mpeg-tts -# video/vnd.dlna.mpeg-tts -video/vnd.dvb.file dvb -video/vnd.fvt fvt -# video/vnd.hns.video -# video/vnd.iptvforum.1dparityfec-1010 -# video/vnd.iptvforum.1dparityfec-2005 -# video/vnd.iptvforum.2dparityfec-1010 -# video/vnd.iptvforum.2dparityfec-2005 -# video/vnd.iptvforum.ttsavc -# video/vnd.iptvforum.ttsmpeg2 -# video/vnd.motorola.video -# video/vnd.motorola.videop -video/vnd.mpegurl mxu m4u -video/vnd.ms-playready.media.pyv pyv -# video/vnd.nokia.interleaved-multimedia -# video/vnd.nokia.videovoip -# video/vnd.objectvideo -# video/vnd.sealed.mpeg1 -# video/vnd.sealed.mpeg4 -# video/vnd.sealed.swf -# video/vnd.sealedmedia.softseal.mov -video/vnd.uvvu.mp4 uvu uvvu -video/vnd.vivo viv -video/webm webm -video/x-f4v f4v -video/x-fli fli -video/x-flv flv -video/x-m4v m4v -video/x-matroska mkv mk3d mks -video/x-mng mng -video/x-ms-asf asf asx -video/x-ms-vob vob -video/x-ms-wm wm -video/x-ms-wmv wmv -video/x-ms-wmx wmx -video/x-ms-wvx wvx -video/x-msvideo avi -video/x-sgi-movie movie -video/x-smv smv -x-conference/x-cooltalk ice diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/types/node.types b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/types/node.types deleted file mode 100644 index 55b2cf79..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/types/node.types +++ /dev/null @@ -1,77 +0,0 @@ -# What: WebVTT -# Why: To allow formats intended for marking up external text track resources. -# http://dev.w3.org/html5/webvtt/ -# Added by: niftylettuce -text/vtt vtt - -# What: Google Chrome Extension -# Why: To allow apps to (work) be served with the right content type header. -# http://codereview.chromium.org/2830017 -# Added by: niftylettuce -application/x-chrome-extension crx - -# What: HTC support -# Why: To properly render .htc files such as CSS3PIE -# Added by: niftylettuce -text/x-component htc - -# What: HTML5 application cache manifes ('.manifest' extension) -# Why: De-facto standard. Required by Mozilla browser when serving HTML5 apps -# per https://developer.mozilla.org/en/offline_resources_in_firefox -# Added by: louisremi -text/cache-manifest manifest - -# What: node binary buffer format -# Why: semi-standard extension w/in the node community -# Added by: tootallnate -application/octet-stream buffer - -# What: The "protected" MP-4 formats used by iTunes. -# Why: Required for streaming music to browsers (?) -# Added by: broofa -application/mp4 m4p -audio/mp4 m4a - -# What: Video format, Part of RFC1890 -# Why: See https://github.com/bentomas/node-mime/pull/6 -# Added by: mjrusso -video/MP2T ts - -# What: EventSource mime type -# Why: mime type of Server-Sent Events stream -# http://www.w3.org/TR/eventsource/#text-event-stream -# Added by: francois2metz -text/event-stream event-stream - -# What: Mozilla App manifest mime type -# Why: https://developer.mozilla.org/en/Apps/Manifest#Serving_manifests -# Added by: ednapiranha -application/x-web-app-manifest+json webapp - -# What: Lua file types -# Why: Googling around shows de-facto consensus on these -# Added by: creationix (Issue #45) -text/x-lua lua -application/x-lua-bytecode luac - -# What: Markdown files, as per http://daringfireball.net/projects/markdown/syntax -# Why: http://stackoverflow.com/questions/10701983/what-is-the-mime-type-for-markdown -# Added by: avoidwork -text/x-markdown markdown md mkd - -# What: ini files -# Why: because they're just text files -# Added by: Matthew Kastor -text/plain ini - -# What: DASH Adaptive Streaming manifest -# Why: https://developer.mozilla.org/en-US/docs/DASH_Adaptive_Streaming_for_HTML_5_Video -# Added by: eelcocramer -application/dash+xml mdp - -# What: OpenType font files - http://www.microsoft.com/typography/otspec/ -# Why: Browsers usually ignore the font MIME types and sniff the content, -# but Chrome, shows a warning if OpenType fonts aren't served with -# the `font/opentype` MIME type: http://i.imgur.com/8c5RN8M.png. -# Added by: alrra -font/opentype otf diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/.npmignore deleted file mode 100644 index fd4f2b06..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -.DS_Store diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/LICENSE.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/LICENSE.md deleted file mode 100644 index f039427f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/LICENSE.md +++ /dev/null @@ -1,2 +0,0 @@ -Copyright (c) 2010-2012 Robert Kieffer -MIT License - http://opensource.org/licenses/mit-license.php diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/README.md deleted file mode 100644 index e436a89f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/README.md +++ /dev/null @@ -1,207 +0,0 @@ -# node-uuid - -Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. - -Features: - -* Generate RFC4122 version 1 or version 4 UUIDs -* Runs in node.js and all browsers. -* Registered as a [ComponentJS](https://github.com/component/component) [component](https://github.com/component/component/wiki/Components) ('broofa/node-uuid'). -* Cryptographically strong random # generation on supporting platforms -* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! ) -* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html) - -## Getting Started - -Install it in your browser: - -```html -<script src="uuid.js"></script> -``` - -Or in node.js: - -``` -npm install node-uuid -``` - -```javascript -var uuid = require('node-uuid'); -``` - -Then create some ids ... - -```javascript -// Generate a v1 (time-based) id -uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' - -// Generate a v4 (random) id -uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1' -``` - -## API - -### uuid.v1([`options` [, `buffer` [, `offset`]]]) - -Generate and return a RFC4122 v1 (timestamp-based) UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. - * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. - * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used. - * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Notes: - -1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) - -Example: Generate string UUID with fully-specified options - -```javascript -uuid.v1({ - node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], - clockseq: 0x1234, - msecs: new Date('2011-11-01').getTime(), - nsecs: 5678 -}); // -> "710b962e-041c-11e1-9234-0123456789ab" -``` - -Example: In-place generation of two binary IDs - -```javascript -// Generate two ids in an array -var arr = new Array(32); // -> [] -uuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15] -uuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15] - -// Optionally use uuid.unparse() to get stringify the ids -uuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115' -uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115' -``` - -### uuid.v4([`options` [, `buffer` [, `offset`]]]) - -Generate and return a RFC4122 v4 UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values - * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Example: Generate string UUID with fully-specified options - -```javascript -uuid.v4({ - random: [ - 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, - 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 - ] -}); -// -> "109156be-c4fb-41ea-b1b4-efe1671c5836" -``` - -Example: Generate two IDs in a single buffer - -```javascript -var buffer = new Array(32); // (or 'new Buffer' in node.js) -uuid.v4(null, buffer, 0); -uuid.v4(null, buffer, 16); -``` - -### uuid.parse(id[, buffer[, offset]]) -### uuid.unparse(buffer[, offset]) - -Parse and unparse UUIDs - - * `id` - (String) UUID(-like) string - * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used - * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0 - -Example parsing and unparsing a UUID string - -```javascript -var bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> <Buffer 79 7f f0 43 11 eb 11 e1 80 d6 51 09 98 75 5d 10> -var string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10' -``` - -### uuid.noConflict() - -(Browsers only) Set `uuid` property back to it's previous value. - -Returns the node-uuid object. - -Example: - -```javascript -var myUuid = uuid.noConflict(); -myUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' -``` - -## Deprecated APIs - -Support for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version. - -### uuid([format [, buffer [, offset]]]) - -uuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary). - -### uuid.BufferClass - -The class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API. - -## Testing - -In node.js - -``` -> cd test -> node test.js -``` - -In Browser - -``` -open test/test.html -``` - -### Benchmarking - -Requires node.js - -``` -npm install uuid uuid-js -node benchmark/benchmark.js -``` - -For a more complete discussion of node-uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/node-uuid/wiki/Benchmark) - -For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance). - -## Release notes - -### 1.4.0 - -* Improved module context detection -* Removed public RNG functions - -### 1.3.2 - -* Improve tests and handling of v1() options (Issue #24) -* Expose RNG option to allow for perf testing with different generators - -### 1.3.0 - -* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! -* Support for node.js crypto API -* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/README.md deleted file mode 100644 index aaeb2ea0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# node-uuid Benchmarks - -### Results - -To see the results of our benchmarks visit https://github.com/broofa/node-uuid/wiki/Benchmark - -### Run them yourself - -node-uuid comes with some benchmarks to measure performance of generating UUIDs. These can be run using node.js. node-uuid is being benchmarked against some other uuid modules, that are available through npm namely `uuid` and `uuid-js`. - -To prepare and run the benchmark issue; - -``` -npm install uuid uuid-js -node benchmark/benchmark.js -``` - -You'll see an output like this one: - -``` -# v4 -nodeuuid.v4(): 854700 uuids/second -nodeuuid.v4('binary'): 788643 uuids/second -nodeuuid.v4('binary', buffer): 1336898 uuids/second -uuid(): 479386 uuids/second -uuid('binary'): 582072 uuids/second -uuidjs.create(4): 312304 uuids/second - -# v1 -nodeuuid.v1(): 938086 uuids/second -nodeuuid.v1('binary'): 683060 uuids/second -nodeuuid.v1('binary', buffer): 1644736 uuids/second -uuidjs.create(1): 190621 uuids/second -``` - -* The `uuid()` entries are for Nikhil Marathe's [uuid module](https://bitbucket.org/nikhilm/uuidjs) which is a wrapper around the native libuuid library. -* The `uuidjs()` entries are for Patrick Negri's [uuid-js module](https://github.com/pnegri/uuid-js) which is a pure javascript implementation based on [UUID.js](https://github.com/LiosK/UUID.js) by LiosK. - -If you want to get more reliable results you can run the benchmark multiple times and write the output into a log file: - -``` -for i in {0..9}; do node benchmark/benchmark.js >> benchmark/bench_0.4.12.log; done; -``` - -If you're interested in how performance varies between different node versions, you can issue the above command multiple times. - -You can then use the shell script `bench.sh` provided in this directory to calculate the averages over all benchmark runs and draw a nice plot: - -``` -(cd benchmark/ && ./bench.sh) -``` - -This assumes you have [gnuplot](http://www.gnuplot.info/) and [ImageMagick](http://www.imagemagick.org/) installed. You'll find a nice `bench.png` graph in the `benchmark/` directory then. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu deleted file mode 100644 index a342fbbe..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu +++ /dev/null @@ -1,174 +0,0 @@ -#!/opt/local/bin/gnuplot -persist -# -# -# G N U P L O T -# Version 4.4 patchlevel 3 -# last modified March 2011 -# System: Darwin 10.8.0 -# -# Copyright (C) 1986-1993, 1998, 2004, 2007-2010 -# Thomas Williams, Colin Kelley and many others -# -# gnuplot home: http://www.gnuplot.info -# faq, bugs, etc: type "help seeking-assistance" -# immediate help: type "help" -# plot window: hit 'h' -set terminal postscript eps noenhanced defaultplex \ - leveldefault color colortext \ - solid linewidth 1.2 butt noclip \ - palfuncparam 2000,0.003 \ - "Helvetica" 14 -set output 'bench.eps' -unset clip points -set clip one -unset clip two -set bar 1.000000 front -set border 31 front linetype -1 linewidth 1.000 -set xdata -set ydata -set zdata -set x2data -set y2data -set timefmt x "%d/%m/%y,%H:%M" -set timefmt y "%d/%m/%y,%H:%M" -set timefmt z "%d/%m/%y,%H:%M" -set timefmt x2 "%d/%m/%y,%H:%M" -set timefmt y2 "%d/%m/%y,%H:%M" -set timefmt cb "%d/%m/%y,%H:%M" -set boxwidth -set style fill empty border -set style rectangle back fc lt -3 fillstyle solid 1.00 border lt -1 -set style circle radius graph 0.02, first 0, 0 -set dummy x,y -set format x "% g" -set format y "% g" -set format x2 "% g" -set format y2 "% g" -set format z "% g" -set format cb "% g" -set angles radians -unset grid -set key title "" -set key outside left top horizontal Right noreverse enhanced autotitles columnhead nobox -set key noinvert samplen 4 spacing 1 width 0 height 0 -set key maxcolumns 2 maxrows 0 -unset label -unset arrow -set style increment default -unset style line -set style line 1 linetype 1 linewidth 2.000 pointtype 1 pointsize default pointinterval 0 -unset style arrow -set style histogram clustered gap 2 title offset character 0, 0, 0 -unset logscale -set offsets graph 0.05, 0.15, 0, 0 -set pointsize 1.5 -set pointintervalbox 1 -set encoding default -unset polar -unset parametric -unset decimalsign -set view 60, 30, 1, 1 -set samples 100, 100 -set isosamples 10, 10 -set surface -unset contour -set clabel '%8.3g' -set mapping cartesian -set datafile separator whitespace -unset hidden3d -set cntrparam order 4 -set cntrparam linear -set cntrparam levels auto 5 -set cntrparam points 5 -set size ratio 0 1,1 -set origin 0,0 -set style data points -set style function lines -set xzeroaxis linetype -2 linewidth 1.000 -set yzeroaxis linetype -2 linewidth 1.000 -set zzeroaxis linetype -2 linewidth 1.000 -set x2zeroaxis linetype -2 linewidth 1.000 -set y2zeroaxis linetype -2 linewidth 1.000 -set ticslevel 0.5 -set mxtics default -set mytics default -set mztics default -set mx2tics default -set my2tics default -set mcbtics default -set xtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set xtics norangelimit -set xtics () -set ytics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set ytics autofreq norangelimit -set ztics border in scale 1,0.5 nomirror norotate offset character 0, 0, 0 -set ztics autofreq norangelimit -set nox2tics -set noy2tics -set cbtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set cbtics autofreq norangelimit -set title "" -set title offset character 0, 0, 0 font "" norotate -set timestamp bottom -set timestamp "" -set timestamp offset character 0, 0, 0 font "" norotate -set rrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) -set autoscale rfixmin -set autoscale rfixmax -set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] ) -set autoscale tfixmin -set autoscale tfixmax -set urange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale ufixmin -set autoscale ufixmax -set vrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale vfixmin -set autoscale vfixmax -set xlabel "" -set xlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate -set x2label "" -set x2label offset character 0, 0, 0 font "" textcolor lt -1 norotate -set xrange [ * : * ] noreverse nowriteback # (currently [-0.150000:3.15000] ) -set autoscale xfixmin -set autoscale xfixmax -set x2range [ * : * ] noreverse nowriteback # (currently [0.00000:3.00000] ) -set autoscale x2fixmin -set autoscale x2fixmax -set ylabel "" -set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set y2label "" -set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set yrange [ 0.00000 : 1.90000e+06 ] noreverse nowriteback # (currently [:] ) -set autoscale yfixmin -set autoscale yfixmax -set y2range [ * : * ] noreverse nowriteback # (currently [0.00000:1.90000e+06] ) -set autoscale y2fixmin -set autoscale y2fixmax -set zlabel "" -set zlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate -set zrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale zfixmin -set autoscale zfixmax -set cblabel "" -set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set cbrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) -set autoscale cbfixmin -set autoscale cbfixmax -set zero 1e-08 -set lmargin -1 -set bmargin -1 -set rmargin -1 -set tmargin -1 -set pm3d explicit at s -set pm3d scansautomatic -set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean -set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB -set palette rgbformulae 7, 5, 15 -set colorbox default -set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault -set loadpath -set fontpath -set fit noerrorvariables -GNUTERM = "aqua" -plot 'bench_results.txt' using 2:xticlabel(1) w lp lw 2, '' using 3:xticlabel(1) w lp lw 2, '' using 4:xticlabel(1) w lp lw 2, '' using 5:xticlabel(1) w lp lw 2, '' using 6:xticlabel(1) w lp lw 2, '' using 7:xticlabel(1) w lp lw 2, '' using 8:xticlabel(1) w lp lw 2, '' using 9:xticlabel(1) w lp lw 2 -# EOF diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/bench.sh b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/bench.sh deleted file mode 100755 index d870a0cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/bench.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# for a given node version run: -# for i in {0..9}; do node benchmark.js >> bench_0.6.2.log; done; - -PATTERNS=('nodeuuid.v1()' "nodeuuid.v1('binary'," 'nodeuuid.v4()' "nodeuuid.v4('binary'," "uuid()" "uuid('binary')" 'uuidjs.create(1)' 'uuidjs.create(4)' '140byte') -FILES=(node_uuid_v1_string node_uuid_v1_buf node_uuid_v4_string node_uuid_v4_buf libuuid_v4_string libuuid_v4_binary uuidjs_v1_string uuidjs_v4_string 140byte_es) -INDICES=(2 3 2 3 2 2 2 2 2) -VERSIONS=$( ls bench_*.log | sed -e 's/^bench_\([0-9\.]*\)\.log/\1/' | tr "\\n" " " ) -TMPJOIN="tmp_join" -OUTPUT="bench_results.txt" - -for I in ${!FILES[*]}; do - F=${FILES[$I]} - P=${PATTERNS[$I]} - INDEX=${INDICES[$I]} - echo "version $F" > $F - for V in $VERSIONS; do - (VAL=$( grep "$P" bench_$V.log | LC_ALL=en_US awk '{ sum += $'$INDEX' } END { print sum/NR }' ); echo $V $VAL) >> $F - done - if [ $I == 0 ]; then - cat $F > $TMPJOIN - else - join $TMPJOIN $F > $OUTPUT - cp $OUTPUT $TMPJOIN - fi - rm $F -done - -rm $TMPJOIN - -gnuplot bench.gnu -convert -density 200 -resize 800x560 -flatten bench.eps bench.png -rm bench.eps diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c deleted file mode 100644 index dbfc75f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c +++ /dev/null @@ -1,34 +0,0 @@ -/* -Test performance of native C UUID generation - -To Compile: cc -luuid benchmark-native.c -o benchmark-native -*/ - -#include <stdio.h> -#include <unistd.h> -#include <sys/time.h> -#include <uuid/uuid.h> - -int main() { - uuid_t myid; - char buf[36+1]; - int i; - struct timeval t; - double start, finish; - - gettimeofday(&t, NULL); - start = t.tv_sec + t.tv_usec/1e6; - - int n = 2e5; - for (i = 0; i < n; i++) { - uuid_generate(myid); - uuid_unparse(myid, buf); - } - - gettimeofday(&t, NULL); - finish = t.tv_sec + t.tv_usec/1e6; - double dur = finish - start; - - printf("%d uuids/sec", (int)(n/dur)); - return 0; -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js deleted file mode 100644 index 40e6efbe..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js +++ /dev/null @@ -1,84 +0,0 @@ -try { - var nodeuuid = require('../uuid'); -} catch (e) { - console.error('node-uuid require failed - skipping tests'); -} - -try { - var uuid = require('uuid'); -} catch (e) { - console.error('uuid require failed - skipping tests'); -} - -try { - var uuidjs = require('uuid-js'); -} catch (e) { - console.error('uuid-js require failed - skipping tests'); -} - -var N = 5e5; - -function rate(msg, t) { - console.log(msg + ': ' + - (N / (Date.now() - t) * 1e3 | 0) + - ' uuids/second'); -} - -console.log('# v4'); - -// node-uuid - string form -if (nodeuuid) { - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4(); - rate('nodeuuid.v4() - using node.js crypto RNG', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4({rng: nodeuuid.mathRNG}); - rate('nodeuuid.v4() - using Math.random() RNG', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary'); - rate('nodeuuid.v4(\'binary\')', t); - - var buffer = new nodeuuid.BufferClass(16); - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary', buffer); - rate('nodeuuid.v4(\'binary\', buffer)', t); -} - -// libuuid - string form -if (uuid) { - for (var i = 0, t = Date.now(); i < N; i++) uuid(); - rate('uuid()', t); - - for (var i = 0, t = Date.now(); i < N; i++) uuid('binary'); - rate('uuid(\'binary\')', t); -} - -// uuid-js - string form -if (uuidjs) { - for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(4); - rate('uuidjs.create(4)', t); -} - -// 140byte.es -for (var i = 0, t = Date.now(); i < N; i++) 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(s,r){r=Math.random()*16|0;return (s=='x'?r:r&0x3|0x8).toString(16)}); -rate('140byte.es_v4', t); - -console.log(''); -console.log('# v1'); - -// node-uuid - v1 string form -if (nodeuuid) { - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1(); - rate('nodeuuid.v1()', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary'); - rate('nodeuuid.v1(\'binary\')', t); - - var buffer = new nodeuuid.BufferClass(16); - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary', buffer); - rate('nodeuuid.v1(\'binary\', buffer)', t); -} - -// uuid-js - v1 string form -if (uuidjs) { - for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(1); - rate('uuidjs.create(1)', t); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/component.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/component.json deleted file mode 100644 index ace21348..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/component.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "node-uuid", - "repo": "broofa/node-uuid", - "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", - "version": "1.4.0", - "author": "Robert Kieffer <robert@broofa.com>", - "contributors": [ - {"name": "Christoph Tavan <dev@tavan.de>", "github": "https://github.com/ctavan"} - ], - "keywords": ["uuid", "guid", "rfc4122"], - "dependencies": {}, - "development": {}, - "main": "uuid.js", - "scripts": [ - "uuid.js" - ], - "license": "MIT" -} \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/package.json deleted file mode 100644 index e6f518be..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "node-uuid", - "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", - "url": "http://github.com/broofa/node-uuid", - "keywords": [ - "uuid", - "guid", - "rfc4122" - ], - "author": { - "name": "Robert Kieffer", - "email": "robert@broofa.com" - }, - "contributors": [ - { - "name": "Christoph Tavan", - "email": "dev@tavan.de" - } - ], - "lib": ".", - "main": "./uuid.js", - "repository": { - "type": "git", - "url": "https://github.com/broofa/node-uuid.git" - }, - "version": "1.4.1", - "readme": "# node-uuid\n\nSimple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.\n\nFeatures:\n\n* Generate RFC4122 version 1 or version 4 UUIDs\n* Runs in node.js and all browsers.\n* Registered as a [ComponentJS](https://github.com/component/component) [component](https://github.com/component/component/wiki/Components) ('broofa/node-uuid').\n* Cryptographically strong random # generation on supporting platforms\n* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! )\n* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html)\n\n## Getting Started\n\nInstall it in your browser:\n\n```html\n<script src=\"uuid.js\"></script>\n```\n\nOr in node.js:\n\n```\nnpm install node-uuid\n```\n\n```javascript\nvar uuid = require('node-uuid');\n```\n\nThen create some ids ...\n\n```javascript\n// Generate a v1 (time-based) id\nuuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n\n// Generate a v4 (random) id\nuuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'\n```\n\n## API\n\n### uuid.v1([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v1 (timestamp-based) UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1.\n * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.\n * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used.\n * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nNotes:\n\n1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v1({\n node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],\n clockseq: 0x1234,\n msecs: new Date('2011-11-01').getTime(),\n nsecs: 5678\n}); // -> \"710b962e-041c-11e1-9234-0123456789ab\"\n```\n\nExample: In-place generation of two binary IDs\n\n```javascript\n// Generate two ids in an array\nvar arr = new Array(32); // -> []\nuuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\nuuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\n\n// Optionally use uuid.unparse() to get stringify the ids\nuuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115'\nuuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115'\n```\n\n### uuid.v4([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v4 UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values\n * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v4({\n random: [\n 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,\n 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36\n ]\n});\n// -> \"109156be-c4fb-41ea-b1b4-efe1671c5836\"\n```\n\nExample: Generate two IDs in a single buffer\n\n```javascript\nvar buffer = new Array(32); // (or 'new Buffer' in node.js)\nuuid.v4(null, buffer, 0);\nuuid.v4(null, buffer, 16);\n```\n\n### uuid.parse(id[, buffer[, offset]])\n### uuid.unparse(buffer[, offset])\n\nParse and unparse UUIDs\n\n * `id` - (String) UUID(-like) string\n * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used\n * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0\n\nExample parsing and unparsing a UUID string\n\n```javascript\nvar bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> <Buffer 79 7f f0 43 11 eb 11 e1 80 d6 51 09 98 75 5d 10>\nvar string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10'\n```\n\n### uuid.noConflict()\n\n(Browsers only) Set `uuid` property back to it's previous value.\n\nReturns the node-uuid object.\n\nExample:\n\n```javascript\nvar myUuid = uuid.noConflict();\nmyUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n```\n\n## Deprecated APIs\n\nSupport for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version.\n\n### uuid([format [, buffer [, offset]]])\n\nuuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary).\n\n### uuid.BufferClass\n\nThe class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API.\n\n## Testing\n\nIn node.js\n\n```\n> cd test\n> node test.js\n```\n\nIn Browser\n\n```\nopen test/test.html\n```\n\n### Benchmarking\n\nRequires node.js\n\n```\nnpm install uuid uuid-js\nnode benchmark/benchmark.js\n```\n\nFor a more complete discussion of node-uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/node-uuid/wiki/Benchmark)\n\nFor browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance).\n\n## Release notes\n\n### 1.4.0\n\n* Improved module context detection\n* Removed public RNG functions\n\n### 1.3.2\n\n* Improve tests and handling of v1() options (Issue #24)\n* Expose RNG option to allow for perf testing with different generators\n\n### 1.3.0\n\n* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!\n* Support for node.js crypto API\n* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/broofa/node-uuid/issues" - }, - "homepage": "https://github.com/broofa/node-uuid", - "_id": "node-uuid@1.4.1", - "dist": { - "shasum": "e937c5cdd70594274f11a11d3ae751f5c5857c73" - }, - "_from": "node-uuid@~1.4.0", - "_resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/compare_v1.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/compare_v1.js deleted file mode 100644 index 05af8221..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/compare_v1.js +++ /dev/null @@ -1,63 +0,0 @@ -var assert = require('assert'), - nodeuuid = require('../uuid'), - uuidjs = require('uuid-js'), - libuuid = require('uuid').generate, - util = require('util'), - exec = require('child_process').exec, - os = require('os'); - -// On Mac Os X / macports there's only the ossp-uuid package that provides uuid -// On Linux there's uuid-runtime which provides uuidgen -var uuidCmd = os.type() === 'Darwin' ? 'uuid -1' : 'uuidgen -t'; - -function compare(ids) { - console.log(ids); - for (var i = 0; i < ids.length; i++) { - var id = ids[i].split('-'); - id = [id[2], id[1], id[0]].join(''); - ids[i] = id; - } - var sorted = ([].concat(ids)).sort(); - - if (sorted.toString() !== ids.toString()) { - console.log('Warning: sorted !== ids'); - } else { - console.log('everything in order!'); - } -} - -// Test time order of v1 uuids -var ids = []; -while (ids.length < 10e3) ids.push(nodeuuid.v1()); - -var max = 10; -console.log('node-uuid:'); -ids = []; -for (var i = 0; i < max; i++) ids.push(nodeuuid.v1()); -compare(ids); - -console.log(''); -console.log('uuidjs:'); -ids = []; -for (var i = 0; i < max; i++) ids.push(uuidjs.create(1).toString()); -compare(ids); - -console.log(''); -console.log('libuuid:'); -ids = []; -var count = 0; -var last = function() { - compare(ids); -} -var cb = function(err, stdout, stderr) { - ids.push(stdout.substring(0, stdout.length-1)); - count++; - if (count < max) { - return next(); - } - last(); -}; -var next = function() { - exec(uuidCmd, cb); -}; -next(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.html b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.html deleted file mode 100644 index d80326ec..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.html +++ /dev/null @@ -1,17 +0,0 @@ -<html> - <head> - <style> - div { - font-family: monospace; - font-size: 8pt; - } - div.log {color: #444;} - div.warn {color: #550;} - div.error {color: #800; font-weight: bold;} - </style> - <script src="../uuid.js"></script> - </head> - <body> - <script src="./test.js"></script> - </body> -</html> diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.js deleted file mode 100644 index 24692256..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.js +++ /dev/null @@ -1,228 +0,0 @@ -if (!this.uuid) { - // node.js - uuid = require('../uuid'); -} - -// -// x-platform log/assert shims -// - -function _log(msg, type) { - type = type || 'log'; - - if (typeof(document) != 'undefined') { - document.write('<div class="' + type + '">' + msg.replace(/\n/g, '<br />') + '</div>'); - } - if (typeof(console) != 'undefined') { - var color = { - log: '\033[39m', - warn: '\033[33m', - error: '\033[31m' - }; - console[type](color[type] + msg + color.log); - } -} - -function log(msg) {_log(msg, 'log');} -function warn(msg) {_log(msg, 'warn');} -function error(msg) {_log(msg, 'error');} - -function assert(res, msg) { - if (!res) { - error('FAIL: ' + msg); - } else { - log('Pass: ' + msg); - } -} - -// -// Unit tests -// - -// Verify ordering of v1 ids created with explicit times -var TIME = 1321644961388; // 2011-11-18 11:36:01.388-08:00 - -function compare(name, ids) { - ids = ids.map(function(id) { - return id.split('-').reverse().join('-'); - }).sort(); - var sorted = ([].concat(ids)).sort(); - - assert(sorted.toString() == ids.toString(), name + ' have expected order'); -} - -// Verify ordering of v1 ids created using default behavior -compare('uuids with current time', [ - uuid.v1(), - uuid.v1(), - uuid.v1(), - uuid.v1(), - uuid.v1() -]); - -// Verify ordering of v1 ids created with explicit times -compare('uuids with time option', [ - uuid.v1({msecs: TIME - 10*3600*1000}), - uuid.v1({msecs: TIME - 1}), - uuid.v1({msecs: TIME}), - uuid.v1({msecs: TIME + 1}), - uuid.v1({msecs: TIME + 28*24*3600*1000}) -]); - -assert( - uuid.v1({msecs: TIME}) != uuid.v1({msecs: TIME}), - 'IDs created at same msec are different' -); - -// Verify throw if too many ids created -var thrown = false; -try { - uuid.v1({msecs: TIME, nsecs: 10000}); -} catch (e) { - thrown = true; -} -assert(thrown, 'Exception thrown when > 10K ids created in 1 ms'); - -// Verify clock regression bumps clockseq -var uidt = uuid.v1({msecs: TIME}); -var uidtb = uuid.v1({msecs: TIME - 1}); -assert( - parseInt(uidtb.split('-')[3], 16) - parseInt(uidt.split('-')[3], 16) === 1, - 'Clock regression by msec increments the clockseq' -); - -// Verify clock regression bumps clockseq -var uidtn = uuid.v1({msecs: TIME, nsecs: 10}); -var uidtnb = uuid.v1({msecs: TIME, nsecs: 9}); -assert( - parseInt(uidtnb.split('-')[3], 16) - parseInt(uidtn.split('-')[3], 16) === 1, - 'Clock regression by nsec increments the clockseq' -); - -// Verify explicit options produce expected id -var id = uuid.v1({ - msecs: 1321651533573, - nsecs: 5432, - clockseq: 0x385c, - node: [ 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10 ] -}); -assert(id == 'd9428888-122b-11e1-b85c-61cd3cbb3210', 'Explicit options produce expected id'); - -// Verify adjacent ids across a msec boundary are 1 time unit apart -var u0 = uuid.v1({msecs: TIME, nsecs: 9999}); -var u1 = uuid.v1({msecs: TIME + 1, nsecs: 0}); - -var before = u0.split('-')[0], after = u1.split('-')[0]; -var dt = parseInt(after, 16) - parseInt(before, 16); -assert(dt === 1, 'Ids spanning 1ms boundary are 100ns apart'); - -// -// Test parse/unparse -// - -id = '00112233445566778899aabbccddeeff'; -assert(uuid.unparse(uuid.parse(id.substr(0,10))) == - '00112233-4400-0000-0000-000000000000', 'Short parse'); -assert(uuid.unparse(uuid.parse('(this is the uuid -> ' + id + id)) == - '00112233-4455-6677-8899-aabbccddeeff', 'Dirty parse'); - -// -// Perf tests -// - -var generators = { - v1: uuid.v1, - v4: uuid.v4 -}; - -var UUID_FORMAT = { - v1: /[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i, - v4: /[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i -}; - -var N = 1e4; - -// Get %'age an actual value differs from the ideal value -function divergence(actual, ideal) { - return Math.round(100*100*(actual - ideal)/ideal)/100; -} - -function rate(msg, t) { - log(msg + ': ' + (N / (Date.now() - t) * 1e3 | 0) + ' uuids\/second'); -} - -for (var version in generators) { - var counts = {}, max = 0; - var generator = generators[version]; - var format = UUID_FORMAT[version]; - - log('\nSanity check ' + N + ' ' + version + ' uuids'); - for (var i = 0, ok = 0; i < N; i++) { - id = generator(); - if (!format.test(id)) { - throw Error(id + ' is not a valid UUID string'); - } - - if (id != uuid.unparse(uuid.parse(id))) { - assert(fail, id + ' is not a valid id'); - } - - // Count digits for our randomness check - if (version == 'v4') { - var digits = id.replace(/-/g, '').split(''); - for (var j = digits.length-1; j >= 0; j--) { - var c = digits[j]; - max = Math.max(max, counts[c] = (counts[c] || 0) + 1); - } - } - } - - // Check randomness for v4 UUIDs - if (version == 'v4') { - // Limit that we get worried about randomness. (Purely empirical choice, this!) - var limit = 2*100*Math.sqrt(1/N); - - log('\nChecking v4 randomness. Distribution of Hex Digits (% deviation from ideal)'); - - for (var i = 0; i < 16; i++) { - var c = i.toString(16); - var bar = '', n = counts[c], p = Math.round(n/max*100|0); - - // 1-3,5-8, and D-F: 1:16 odds over 30 digits - var ideal = N*30/16; - if (i == 4) { - // 4: 1:1 odds on 1 digit, plus 1:16 odds on 30 digits - ideal = N*(1 + 30/16); - } else if (i >= 8 && i <= 11) { - // 8-B: 1:4 odds on 1 digit, plus 1:16 odds on 30 digits - ideal = N*(1/4 + 30/16); - } else { - // Otherwise: 1:16 odds on 30 digits - ideal = N*30/16; - } - var d = divergence(n, ideal); - - // Draw bar using UTF squares (just for grins) - var s = n/max*50 | 0; - while (s--) bar += '='; - - assert(Math.abs(d) < limit, c + ' |' + bar + '| ' + counts[c] + ' (' + d + '% < ' + limit + '%)'); - } - } -} - -// Perf tests -for (var version in generators) { - log('\nPerformance testing ' + version + ' UUIDs'); - var generator = generators[version]; - var buf = new uuid.BufferClass(16); - - for (var i = 0, t = Date.now(); i < N; i++) generator(); - rate('uuid.' + version + '()', t); - - for (var i = 0, t = Date.now(); i < N; i++) generator('binary'); - rate('uuid.' + version + '(\'binary\')', t); - - for (var i = 0, t = Date.now(); i < N; i++) generator('binary', buf); - rate('uuid.' + version + '(\'binary\', buffer)', t); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/uuid.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/uuid.js deleted file mode 100644 index 2fac6dc4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/uuid.js +++ /dev/null @@ -1,245 +0,0 @@ -// uuid.js -// -// Copyright (c) 2010-2012 Robert Kieffer -// MIT License - http://opensource.org/licenses/mit-license.php - -(function() { - var _global = this; - - // Unique ID creation requires a high quality random # generator. We feature - // detect to determine the best RNG source, normalizing to a function that - // returns 128-bits of randomness, since that's what's usually required - var _rng; - - // Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html - // - // Moderately fast, high quality - if (typeof(require) == 'function') { - try { - var _rb = require('crypto').randomBytes; - _rng = _rb && function() {return _rb(16);}; - } catch(e) {} - } - - if (!_rng && _global.crypto && crypto.getRandomValues) { - // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto - // - // Moderately fast, high quality - var _rnds8 = new Uint8Array(16); - _rng = function whatwgRNG() { - crypto.getRandomValues(_rnds8); - return _rnds8; - }; - } - - if (!_rng) { - // Math.random()-based (RNG) - // - // If all else fails, use Math.random(). It's fast, but is of unspecified - // quality. - var _rnds = new Array(16); - _rng = function() { - for (var i = 0, r; i < 16; i++) { - if ((i & 0x03) === 0) r = Math.random() * 0x100000000; - _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; - } - - return _rnds; - }; - } - - // Buffer class to use - var BufferClass = typeof(Buffer) == 'function' ? Buffer : Array; - - // Maps for number <-> hex string conversion - var _byteToHex = []; - var _hexToByte = {}; - for (var i = 0; i < 256; i++) { - _byteToHex[i] = (i + 0x100).toString(16).substr(1); - _hexToByte[_byteToHex[i]] = i; - } - - // **`parse()` - Parse a UUID into it's component bytes** - function parse(s, buf, offset) { - var i = (buf && offset) || 0, ii = 0; - - buf = buf || []; - s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) { - if (ii < 16) { // Don't overflow! - buf[i + ii++] = _hexToByte[oct]; - } - }); - - // Zero out remaining bytes if string was short - while (ii < 16) { - buf[i + ii++] = 0; - } - - return buf; - } - - // **`unparse()` - Convert UUID byte array (ala parse()) into a string** - function unparse(buf, offset) { - var i = offset || 0, bth = _byteToHex; - return bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]]; - } - - // **`v1()` - Generate time-based UUID** - // - // Inspired by https://github.com/LiosK/UUID.js - // and http://docs.python.org/library/uuid.html - - // random #'s we need to init node and clockseq - var _seedBytes = _rng(); - - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - var _nodeId = [ - _seedBytes[0] | 0x01, - _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] - ]; - - // Per 4.2.2, randomize (14 bit) clockseq - var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff; - - // Previous uuid creation time - var _lastMSecs = 0, _lastNSecs = 0; - - // See https://github.com/broofa/node-uuid for API details - function v1(options, buf, offset) { - var i = buf && offset || 0; - var b = buf || []; - - options = options || {}; - - var clockseq = options.clockseq != null ? options.clockseq : _clockseq; - - // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - var msecs = options.msecs != null ? options.msecs : new Date().getTime(); - - // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - var nsecs = options.nsecs != null ? options.nsecs : _lastNSecs + 1; - - // Time since last uuid creation (in msecs) - var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; - - // Per 4.2.1.2, Bump clockseq on clock regression - if (dt < 0 && options.clockseq == null) { - clockseq = clockseq + 1 & 0x3fff; - } - - // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs == null) { - nsecs = 0; - } - - // Per 4.2.1.2 Throw error if too many uuids are requested - if (nsecs >= 10000) { - throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; - - // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - msecs += 12219292800000; - - // `time_low` - var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; - - // `time_mid` - var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; - - // `time_high_and_version` - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - b[i++] = tmh >>> 16 & 0xff; - - // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - b[i++] = clockseq >>> 8 | 0x80; - - // `clock_seq_low` - b[i++] = clockseq & 0xff; - - // `node` - var node = options.node || _nodeId; - for (var n = 0; n < 6; n++) { - b[i + n] = node[n]; - } - - return buf ? buf : unparse(b); - } - - // **`v4()` - Generate random UUID** - - // See https://github.com/broofa/node-uuid for API details - function v4(options, buf, offset) { - // Deprecated - 'format' argument, as supported in v1.2 - var i = buf && offset || 0; - - if (typeof(options) == 'string') { - buf = options == 'binary' ? new BufferClass(16) : null; - options = null; - } - options = options || {}; - - var rnds = options.random || (options.rng || _rng)(); - - // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - - // Copy bytes to buffer, if provided - if (buf) { - for (var ii = 0; ii < 16; ii++) { - buf[i + ii] = rnds[ii]; - } - } - - return buf || unparse(rnds); - } - - // Export public API - var uuid = v4; - uuid.v1 = v1; - uuid.v4 = v4; - uuid.parse = parse; - uuid.unparse = unparse; - uuid.BufferClass = BufferClass; - - if (typeof define === 'function' && define.amd) { - // Publish as AMD module - define(function() {return uuid;}); - } else if (typeof(module) != 'undefined' && module.exports) { - // Publish as node.js module - module.exports = uuid; - } else { - // Publish as global (in browsers) - var _previousRoot = _global.uuid; - - // **`noConflict()` - (browser only) to reset global 'uuid' var** - uuid.noConflict = function() { - _global.uuid = _previousRoot; - return uuid; - }; - - _global.uuid = uuid; - } -}).call(this); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/LICENSE deleted file mode 100644 index a4a9aee0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/README.md deleted file mode 100644 index 34c4a85d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/README.md +++ /dev/null @@ -1,4 +0,0 @@ -oauth-sign -========== - -OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/index.js deleted file mode 100644 index e35bfa67..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/index.js +++ /dev/null @@ -1,43 +0,0 @@ -var crypto = require('crypto') - , qs = require('querystring') - ; - -function sha1 (key, body) { - return crypto.createHmac('sha1', key).update(body).digest('base64') -} - -function rfc3986 (str) { - return encodeURIComponent(str) - .replace(/!/g,'%21') - .replace(/\*/g,'%2A') - .replace(/\(/g,'%28') - .replace(/\)/g,'%29') - .replace(/'/g,'%27') - ; -} - -function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret) { - // adapted from https://dev.twitter.com/docs/auth/oauth and - // https://dev.twitter.com/docs/auth/creating-signature - - var querystring = Object.keys(params).sort().map(function(key){ - // big WTF here with the escape + encoding but it's what twitter wants - return escape(rfc3986(key)) + "%3D" + escape(rfc3986(params[key])) - }).join('%26') - - var base = [ - httpMethod ? httpMethod.toUpperCase() : 'GET', - rfc3986(base_uri), - querystring - ].join('&') - - var key = [ - consumer_secret, - token_secret || '' - ].map(rfc3986).join('&') - - return sha1(key, base) -} - -exports.hmacsign = hmacsign -exports.rfc3986 = rfc3986 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/package.json deleted file mode 100644 index abc9d21d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "author": { - "name": "Mikeal Rogers", - "email": "mikeal.rogers@gmail.com", - "url": "http://www.futurealoof.com" - }, - "name": "oauth-sign", - "description": "OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module.", - "version": "0.3.0", - "repository": { - "url": "https://github.com/mikeal/oauth-sign" - }, - "main": "index.js", - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "scripts": { - "test": "node test.js" - }, - "readme": "oauth-sign\n==========\n\nOAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module. \n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/mikeal/oauth-sign/issues" - }, - "homepage": "https://github.com/mikeal/oauth-sign", - "_id": "oauth-sign@0.3.0", - "dist": { - "shasum": "cb540f93bb2b22a7d5941691a288d60e8ea9386e" - }, - "_from": "oauth-sign@~0.3.0", - "_resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.3.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/test.js deleted file mode 100644 index 46955ff6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/test.js +++ /dev/null @@ -1,49 +0,0 @@ -var hmacsign = require('./index').hmacsign - , assert = require('assert') - , qs = require('querystring') - ; - -// Tests from Twitter documentation https://dev.twitter.com/docs/auth/oauth - -var reqsign = hmacsign('POST', 'https://api.twitter.com/oauth/request_token', - { oauth_callback: 'http://localhost:3005/the_dance/process_callback?service_provider_id=11' - , oauth_consumer_key: 'GDdmIQH6jhtmLUypg82g' - , oauth_nonce: 'QP70eNmVz8jvdPevU3oJD2AfF7R7odC2XJcn4XlZJqk' - , oauth_signature_method: 'HMAC-SHA1' - , oauth_timestamp: '1272323042' - , oauth_version: '1.0' - }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98") - -console.log(reqsign) -console.log('8wUi7m5HFQy76nowoCThusfgB+Q=') -assert.equal(reqsign, '8wUi7m5HFQy76nowoCThusfgB+Q=') - -var accsign = hmacsign('POST', 'https://api.twitter.com/oauth/access_token', - { oauth_consumer_key: 'GDdmIQH6jhtmLUypg82g' - , oauth_nonce: '9zWH6qe0qG7Lc1telCn7FhUbLyVdjEaL3MO5uHxn8' - , oauth_signature_method: 'HMAC-SHA1' - , oauth_token: '8ldIZyxQeVrFZXFOZH5tAwj6vzJYuLQpl0WUEYtWc' - , oauth_timestamp: '1272323047' - , oauth_verifier: 'pDNg57prOHapMbhv25RNf75lVRd6JDsni1AJJIDYoTY' - , oauth_version: '1.0' - }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98", "x6qpRnlEmW9JbQn4PQVVeVG8ZLPEx6A0TOebgwcuA") - -console.log(accsign) -console.log('PUw/dHA4fnlJYM6RhXk5IU/0fCc=') -assert.equal(accsign, 'PUw/dHA4fnlJYM6RhXk5IU/0fCc=') - -var upsign = hmacsign('POST', 'http://api.twitter.com/1/statuses/update.json', - { oauth_consumer_key: "GDdmIQH6jhtmLUypg82g" - , oauth_nonce: "oElnnMTQIZvqvlfXM56aBLAf5noGD0AQR3Fmi7Q6Y" - , oauth_signature_method: "HMAC-SHA1" - , oauth_token: "819797-Jxq8aYUDRmykzVKrgoLhXSq67TEa5ruc4GJC2rWimw" - , oauth_timestamp: "1272325550" - , oauth_version: "1.0" - , status: 'setting up my twitter 私のさえずりを設定する' - }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98", "J6zix3FfA9LofH0awS24M3HcBYXO5nI1iYe8EfBA") - -console.log(upsign) -console.log('yOahq5m0YjDDjfjxHaXEsW9D+X0=') -assert.equal(upsign, 'yOahq5m0YjDDjfjxHaXEsW9D+X0=') - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.gitmodules b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.gitmodules deleted file mode 100644 index 49e31dac..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.gitmodules +++ /dev/null @@ -1,6 +0,0 @@ -[submodule "support/expresso"] - path = support/expresso - url = git://github.com/visionmedia/expresso.git -[submodule "support/should"] - path = support/should - url = git://github.com/visionmedia/should.js.git diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.npmignore deleted file mode 100644 index e85ce2af..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.npmignore +++ /dev/null @@ -1,7 +0,0 @@ -test -.travis.yml -benchmark.js -component.json -examples.js -History.md -Makefile diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/Readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/Readme.md deleted file mode 100644 index 27e54a4a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/Readme.md +++ /dev/null @@ -1,58 +0,0 @@ -# node-querystring - - query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others. - -## Installation - - $ npm install qs - -## Examples - -```js -var qs = require('qs'); - -qs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com'); -// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } } - -qs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }}) -// => user[name]=Tobi&user[email]=tobi%40learnboost.com -``` - -## Testing - -Install dev dependencies: - - $ npm install -d - -and execute: - - $ make test - -browser: - - $ open test/browser/index.html - -## License - -(The MIT License) - -Copyright (c) 2010 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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/index.js deleted file mode 100644 index b05938ac..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/index.js +++ /dev/null @@ -1,366 +0,0 @@ -/** - * Object#toString() ref for stringify(). - */ - -var toString = Object.prototype.toString; - -/** - * Object#hasOwnProperty ref - */ - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -/** - * Array#indexOf shim. - */ - -var indexOf = typeof Array.prototype.indexOf === 'function' - ? function(arr, el) { return arr.indexOf(el); } - : function(arr, el) { - for (var i = 0; i < arr.length; i++) { - if (arr[i] === el) return i; - } - return -1; - }; - -/** - * Array.isArray shim. - */ - -var isArray = Array.isArray || function(arr) { - return toString.call(arr) == '[object Array]'; -}; - -/** - * Object.keys shim. - */ - -var objectKeys = Object.keys || function(obj) { - var ret = []; - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - ret.push(key); - } - } - return ret; -}; - -/** - * Array#forEach shim. - */ - -var forEach = typeof Array.prototype.forEach === 'function' - ? function(arr, fn) { return arr.forEach(fn); } - : function(arr, fn) { - for (var i = 0; i < arr.length; i++) fn(arr[i]); - }; - -/** - * Array#reduce shim. - */ - -var reduce = function(arr, fn, initial) { - if (typeof arr.reduce === 'function') return arr.reduce(fn, initial); - var res = initial; - for (var i = 0; i < arr.length; i++) res = fn(res, arr[i]); - return res; -}; - -/** - * Cache non-integer test regexp. - */ - -var isint = /^[0-9]+$/; - -function promote(parent, key) { - if (parent[key].length == 0) return parent[key] = {} - var t = {}; - for (var i in parent[key]) { - if (hasOwnProperty.call(parent[key], i)) { - t[i] = parent[key][i]; - } - } - parent[key] = t; - return t; -} - -function parse(parts, parent, key, val) { - var part = parts.shift(); - - // illegal - if (Object.getOwnPropertyDescriptor(Object.prototype, key)) return; - - // end - if (!part) { - if (isArray(parent[key])) { - parent[key].push(val); - } else if ('object' == typeof parent[key]) { - parent[key] = val; - } else if ('undefined' == typeof parent[key]) { - parent[key] = val; - } else { - parent[key] = [parent[key], val]; - } - // array - } else { - var obj = parent[key] = parent[key] || []; - if (']' == part) { - if (isArray(obj)) { - if ('' != val) obj.push(val); - } else if ('object' == typeof obj) { - obj[objectKeys(obj).length] = val; - } else { - obj = parent[key] = [parent[key], val]; - } - // prop - } else if (~indexOf(part, ']')) { - part = part.substr(0, part.length - 1); - if (!isint.test(part) && isArray(obj)) obj = promote(parent, key); - parse(parts, obj, part, val); - // key - } else { - if (!isint.test(part) && isArray(obj)) obj = promote(parent, key); - parse(parts, obj, part, val); - } - } -} - -/** - * Merge parent key/val pair. - */ - -function merge(parent, key, val){ - if (~indexOf(key, ']')) { - var parts = key.split('[') - , len = parts.length - , last = len - 1; - parse(parts, parent, 'base', val); - // optimize - } else { - if (!isint.test(key) && isArray(parent.base)) { - var t = {}; - for (var k in parent.base) t[k] = parent.base[k]; - parent.base = t; - } - set(parent.base, key, val); - } - - return parent; -} - -/** - * Compact sparse arrays. - */ - -function compact(obj) { - if ('object' != typeof obj) return obj; - - if (isArray(obj)) { - var ret = []; - - for (var i in obj) { - if (hasOwnProperty.call(obj, i)) { - ret.push(obj[i]); - } - } - - return ret; - } - - for (var key in obj) { - obj[key] = compact(obj[key]); - } - - return obj; -} - -/** - * Parse the given obj. - */ - -function parseObject(obj){ - var ret = { base: {} }; - - forEach(objectKeys(obj), function(name){ - merge(ret, name, obj[name]); - }); - - return compact(ret.base); -} - -/** - * Parse the given str. - */ - -function parseString(str){ - var ret = reduce(String(str).split('&'), function(ret, pair){ - var eql = indexOf(pair, '=') - , brace = lastBraceInKey(pair) - , key = pair.substr(0, brace || eql) - , val = pair.substr(brace || eql, pair.length) - , val = val.substr(indexOf(val, '=') + 1, val.length); - - // ?foo - if ('' == key) key = pair, val = ''; - if ('' == key) return ret; - - return merge(ret, decode(key), decode(val)); - }, { base: {} }).base; - - return compact(ret); -} - -/** - * Parse the given query `str` or `obj`, returning an object. - * - * @param {String} str | {Object} obj - * @return {Object} - * @api public - */ - -exports.parse = function(str){ - if (null == str || '' == str) return {}; - return 'object' == typeof str - ? parseObject(str) - : parseString(str); -}; - -/** - * Turn the given `obj` into a query string - * - * @param {Object} obj - * @return {String} - * @api public - */ - -var stringify = exports.stringify = function(obj, prefix) { - if (isArray(obj)) { - return stringifyArray(obj, prefix); - } else if ('[object Object]' == toString.call(obj)) { - return stringifyObject(obj, prefix); - } else if ('string' == typeof obj) { - return stringifyString(obj, prefix); - } else { - return prefix + '=' + encodeURIComponent(String(obj)); - } -}; - -/** - * Stringify the given `str`. - * - * @param {String} str - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyString(str, prefix) { - if (!prefix) throw new TypeError('stringify expects an object'); - return prefix + '=' + encodeURIComponent(str); -} - -/** - * Stringify the given `arr`. - * - * @param {Array} arr - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyArray(arr, prefix) { - var ret = []; - if (!prefix) throw new TypeError('stringify expects an object'); - for (var i = 0; i < arr.length; i++) { - ret.push(stringify(arr[i], prefix + '[' + i + ']')); - } - return ret.join('&'); -} - -/** - * Stringify the given `obj`. - * - * @param {Object} obj - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyObject(obj, prefix) { - var ret = [] - , keys = objectKeys(obj) - , key; - - for (var i = 0, len = keys.length; i < len; ++i) { - key = keys[i]; - if ('' == key) continue; - if (null == obj[key]) { - ret.push(encodeURIComponent(key) + '='); - } else { - ret.push(stringify(obj[key], prefix - ? prefix + '[' + encodeURIComponent(key) + ']' - : encodeURIComponent(key))); - } - } - - return ret.join('&'); -} - -/** - * Set `obj`'s `key` to `val` respecting - * the weird and wonderful syntax of a qs, - * where "foo=bar&foo=baz" becomes an array. - * - * @param {Object} obj - * @param {String} key - * @param {String} val - * @api private - */ - -function set(obj, key, val) { - var v = obj[key]; - if (Object.getOwnPropertyDescriptor(Object.prototype, key)) return; - if (undefined === v) { - obj[key] = val; - } else if (isArray(v)) { - v.push(val); - } else { - obj[key] = [v, val]; - } -} - -/** - * Locate last brace in `str` within the key. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function lastBraceInKey(str) { - var len = str.length - , brace - , c; - for (var i = 0; i < len; ++i) { - c = str[i]; - if (']' == c) brace = false; - if ('[' == c) brace = true; - if ('=' == c && !brace) return i; - } -} - -/** - * Decode `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -function decode(str) { - try { - return decodeURIComponent(str.replace(/\+/g, ' ')); - } catch (err) { - return str; - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/package.json deleted file mode 100644 index 313485c0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "qs", - "description": "querystring parser", - "version": "0.6.6", - "keywords": [ - "query string", - "parser", - "component" - ], - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/node-querystring.git" - }, - "devDependencies": { - "mocha": "*", - "expect.js": "*" - }, - "scripts": { - "test": "make test" - }, - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - }, - "main": "index", - "engines": { - "node": "*" - }, - "readme": "# node-querystring\n\n query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others.\n\n## Installation\n\n $ npm install qs\n\n## Examples\n\n```js\nvar qs = require('qs');\n\nqs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com');\n// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } }\n\nqs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }})\n// => user[name]=Tobi&user[email]=tobi%40learnboost.com\n```\n\n## Testing\n\nInstall dev dependencies:\n\n $ npm install -d\n\nand execute:\n\n $ make test\n\nbrowser:\n\n $ open test/browser/index.html\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2010 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/node-querystring/issues" - }, - "homepage": "https://github.com/visionmedia/node-querystring", - "_id": "qs@0.6.6", - "_from": "qs@~0.6.0" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.jshintrc b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.jshintrc deleted file mode 100644 index 8fcead4f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.jshintrc +++ /dev/null @@ -1,72 +0,0 @@ -{ - // Settings - "passfail" : false, // Stop on first error. - "maxerr" : 100, // Maximum error before stopping. - - - // Predefined globals whom JSHint will ignore. - "browser" : false, // Standard browser globals e.g. `window`, `document`. - "node" : true, - "rhino" : false, - "couch" : false, - "wsh" : false, // Windows Scripting Host. - - "jquery" : false, - "prototypejs" : false, - "mootools" : false, - "dojo" : false, - - "predef" : [ // Custom globals. - "escape", "unescape" // aren't picked up by node flag above :/ - ], - - - // Development. - "debug" : false, // Allow debugger statements e.g. browser breakpoints. - "devel" : false, // Allow developments statements e.g. `console.log();`. - - - // EcmaScript 5. - "es5" : true, // Allow EcmaScript 5 syntax. - "esnext" : true, // Allow ES "next" syntax, specifically 'const' (V8 has this) - "strict" : false, // Require `use strict` pragma in every file. - "globalstrict" : false, // Allow global "use strict" (also enables 'strict'). - - - // The Good Parts. - "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons). - "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons. - "bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.). - "boss" : false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments. - "curly" : false, // Require {} for every new block or scope. - "eqeqeq" : false, // Require triple equals i.e. `===`. - "eqnull" : true, // Tolerate use of `== null`. - "evil" : false, // Tolerate use of `eval`. - "expr" : true, // Tolerate `ExpressionStatement` as Programs. - "forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`. - "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` - "latedef" : false, // Prohibit variable use before definition. - "loopfunc" : false, // Allow functions to be defined within loops. - "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`. - "regexp" : true, // Prohibit `.` and `[^...]` in regular expressions. - "regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`. - "scripturl" : true, // Tolerate script-targeted URLs. - "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`. - "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`. - "undef" : true, // Require all non-global variables be declared before they are used. - - - // Personal styling prefrences. - "lastsemic" : true, // Prohibit missing semicolon for the last statement in a one-line block - "newcap" : false, // Require capitalization of all constructor functions e.g. `new F()`. - "noempty" : true, // Prohipit use of empty blocks. - "nonew" : true, // Prohibit use of constructors for side-effects. - "nomen" : false, // Prohibit use of initial or trailing underbars in names. - "onevar" : false, // Allow only one `var` statement per function. - "onecase" : false, // Allow switches with one case statement - "plusplus" : false, // Prohibit use of `++` & `--`. - "proto" : false, // Allow use of __proto__ - "sub" : true, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`. - "trailing" : true, // Prohibit trailing whitespaces. - "white" : false // Check against strict whitespace and indentation rules. -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.npmignore deleted file mode 100644 index 54efff98..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules/ -.*.sw[nmop] -npm-debug.log diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/LICENSE deleted file mode 100644 index 3fac4c85..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/LICENSE +++ /dev/null @@ -1,78 +0,0 @@ -Copyright GoInstant, Inc. and other contributors. All rights reserved. -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. - -The following exceptions apply: - -=== - -`pubSufTest()` of generate-pubsuffix.js is in the public domain. - - // Any copyright is dedicated to the Public Domain. - // http://creativecommons.org/publicdomain/zero/1.0/ - -=== - -`public-suffix.txt` was obtained from -<https://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat?raw=1> -via <http://publicsuffix.org>. - -That file contains the usual Mozilla triple-license, for which this project uses it -under the terms of the MPL 1.1: - - // ***** BEGIN LICENSE BLOCK ***** - // Version: MPL 1.1/GPL 2.0/LGPL 2.1 - // - // The contents of this file are subject to the Mozilla Public License Version - // 1.1 (the "License"); you may not use this file except in compliance with - // the License. You may obtain a copy of the License at - // http://www.mozilla.org/MPL/ - // - // Software distributed under the License is distributed on an "AS IS" basis, - // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - // for the specific language governing rights and limitations under the - // License. - // - // The Original Code is the Public Suffix List. - // - // The Initial Developer of the Original Code is - // Jo Hermans <jo.hermans@gmail.com>. - // Portions created by the Initial Developer are Copyright (C) 2007 - // the Initial Developer. All Rights Reserved. - // - // Contributor(s): - // Ruben Arakelyan <ruben@rubenarakelyan.com> - // Gervase Markham <gerv@gerv.net> - // Pamela Greene <pamg.bugs@gmail.com> - // David Triendl <david@triendl.name> - // Jothan Frakes <jothan@gmail.com> - // The kind representatives of many TLD registries - // - // Alternatively, the contents of this file may be used under the terms of - // either the GNU General Public License Version 2 or later (the "GPL"), or - // the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - // in which case the provisions of the GPL or the LGPL are applicable instead - // of those above. If you wish to allow use of your version of this file only - // under the terms of either the GPL or the LGPL, and not to allow others to - // use your version of this file under the terms of the MPL, indicate your - // decision by deleting the provisions above and replace them with the notice - // and other provisions required by the GPL or the LGPL. If you do not delete - // the provisions above, a recipient may use your version of this file under - // the terms of any one of the MPL, the GPL or the LGPL. - // - // ***** END LICENSE BLOCK ***** diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/README.md deleted file mode 100644 index fd1dbb1d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/README.md +++ /dev/null @@ -1,380 +0,0 @@ -[RFC6265](http://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js - -![Tough Cookie](http://www.goinstant.com.s3.amazonaws.com/tough-cookie.jpg) - -# Synopsis - -``` javascript -var cookies = require('tough-cookie'); // note: not 'cookie', 'cookies' or 'node-cookie' -var Cookie = cookies.Cookie; -var cookie = Cookie.parse(header); -cookie.value = 'somethingdifferent'; -header = cookie.toString(); - -var cookiejar = new cookies.CookieJar(); -cookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb); -// ... -cookiejar.getCookies('http://example.com/otherpath',function(err,cookies) { - res.headers['cookie'] = cookies.join('; '); -}); -``` - -# Installation - -It's _so_ easy! - -`npm install tough-cookie` - -Requires `punycode`, which should get installed automatically for you. Note that node.js v0.6.2+ bundles punycode by default. - -Why the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken. - -# API - -cookies -======= - -Functions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be "bound". - -parseDate(string[,strict]) ------------------ - -Parse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. If strict is set to true then leading/trailing non-seperator characters around the time part will cause the parsing to fail (e.g. "Thu, 01 Jan 1970 00:00:010 GMT" has an extra trailing zero but Chrome, an assumedly RFC-compliant browser, treats this as valid). - -formatDate(date) ----------------- - -Format a Date into a RFC1123 string (the RFC6265-recommended format). - -canonicalDomain(str) --------------------- - -Transforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects). - -domainMatch(str,domStr[,canonicalize=true]) -------------------------------------------- - -Answers "does this real domain match the domain in a cookie?". The `str` is the "current" domain-name and the `domStr` is the "cookie" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a "suffix match". - -The `canonicalize` parameter will run the other two paramters through `canonicalDomain` or not. - -defaultPath(path) ------------------ - -Given a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the "directory" of a "file" in the path, but is specified by Section 5.1.4 of the RFC. - -The `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output. - -pathMatch(reqPath,cookiePath) ------------------------------ - -Answers "does the request-path path-match a given cookie-path?" as per RFC6265 Section 5.1.4. Returns a boolean. - -This is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`. - -parse(header[,strict=false]) ----------------------------- - -alias for `Cookie.parse(header[,strict])` - -fromJSON(string) ----------------- - -alias for `Cookie.fromJSON(string)` - -getPublicSuffix(hostname) -------------------------- - -Returns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it. - -For example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`. - -For further information, see http://publicsuffix.org/. This module derives its list from that site. - -cookieCompare(a,b) ------------------- - -For use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). Longest `.path`s go first, then sorted oldest to youngest. - -``` javascript -var cookies = [ /* unsorted array of Cookie objects */ ]; -cookies = cookies.sort(cookieCompare); -``` - -permuteDomain(domain) ---------------------- - -Generates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores. - - -permutePath(path) ------------------ - -Generates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores. - -Cookie -====== - -Cookie.parse(header[,strict=false]) ------------------------------------ - -Parses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. If in strict mode, returns `undefined` if the cookie doesn't follow the guidelines in section 4 of RFC6265. Generally speaking, strict mode can be used to validate your own generated Set-Cookie headers, but acting as a client you want to be lenient and leave strict mode off. - -Here's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response: - -``` javascript -if (res.headers['set-cookie'] instanceof Array) - cookies = res.headers['set-cookie'].map(Cookie.parse); -else - cookies = [Cookie.parse(res.headers['set-cookie'])]; -``` - -Cookie.fromJSON(string) ------------------------ - -Convert a JSON string to a `Cookie` object. Does a `JSON.parse()` and converts the `.created`, `.lastAccessed` and `.expires` properties into `Date` objects. - -Properties -========== - - * _key_ - string - the name or key of the cookie (default "") - * _value_ - string - the value of the cookie (default "") - * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `"Infinity"`). See `setExpires()` - * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `"Infinity"` and `"-Infinity"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()` - * _domain_ - string - the `Domain=` attribute of the cookie - * _path_ - string - the `Path=` of the cookie - * _secure_ - boolean - the `Secure` cookie flag - * _httpOnly_ - boolean - the `HttpOnly` cookie flag - * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside) - -After a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes: - - * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied) - * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one. - * _created_ - `Date` - when this cookie was added to the jar - * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute. - -Construction([{options}]) ------------- - -Receives an options object that can contain any Cookie properties, uses the default for unspecified properties. - -.toString() ------------ - -encode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`. - -.cookieString() ---------------- - -encode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '='). - -.setExpires(String) -------------------- - -sets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `"Infinity"` (a string) is set. - -.setMaxAge(number) -------------------- - -sets the maxAge in seconds. Coerces `-Infinity` to `"-Infinity"` and `Infinity` to `"Infinity"` so it JSON serializes correctly. - -.expiryTime([now=Date.now()]) ------------------------------ - -.expiryDate([now=Date.now()]) ------------------------------ - -expiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds. - -Max-Age takes precedence over Expires (as per the RFC). The `.created` attribute -- or, by default, the `now` paramter -- is used to offset the `.maxAge` attribute. - -If Expires (`.expires`) is set, that's returned. - -Otherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for "Tue, 19 Jan 2038 03:14:07 GMT" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents). - -.TTL([now=Date.now()]) ---------- - -compute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply. - -The "number" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned. - -.canonicalizedDoman() ---------------------- - -.cdomain() ----------- - -return the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters. - -.validate() ------------ - -Status: *IN PROGRESS*. Works for a few things, but is by no means comprehensive. - -validates cookie attributes for semantic correctness. Useful for "lint" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct: - -``` javascript -if (cookie.validate() === true) { - // it's tasty -} else { - // yuck! -} -``` - -CookieJar -========= - -Construction([store = new MemoryCookieStore()][, rejectPublicSuffixes]) ------------- - -Simply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used. - - -Attributes ----------- - - * _rejectPublicSuffixes_ - boolean - reject cookies with domains like "com" and "co.uk" (default: `true`) - -Since eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods. - -.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie)) -------------------------------------------------------------------- - -Attempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.created`, `.lastAccessed` and `.hostOnly` properties. - -The `options` object can be omitted and can have the following properties: - - * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies. - * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`. - * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies - * _strict_ - boolean - default `false` - perform extra checks - * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. CookieStore errors aren't ignored by this option. - -As per the RFC, the `.hostOnly` property is set if there was no "Domain=" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual). - -.storeCookie(cookie, [{options},] cb(err,cookie)) -------------------------------------------------- - -__REMOVED__ removed in lieu of the CookieStore API below - -.getCookies(currentUrl, [{options},] cb(err,cookies)) ------------------------------------------------------ - -Retrieve the list of cookies that can be sent in a Cookie header for the current url. - -If an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given. - -The `options` object can be omitted and can have the following properties: - - * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies. - * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`. - * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies - * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially). - * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the CookieStore `fetchCookies` function (the default MemoryCookieStore supports it). - -The `.lastAccessed` property of the returned cookies will have been updated. - -.getCookieString(...) ---------------------- - -Accepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`. - -.getSetCookieStrings(...) -------------------------- - -Accepts the same options as `.getCookies()` but passes an array of strings suitable for Set-Cookie headers (rather than an array of `Cookie`s) to the callback. Simply maps the cookie array via `.toString()`. - -# CookieStore API - -The storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores. - -All `domain` parameters will have been normalized before calling. - -The Cookie store must have all of the following methods. - -store.findCookie(domain, path, key, cb(err,cookie)) ---------------------------------------------------- - -Retrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned. - -Callback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error). - -store.findCookies(domain, path, cb(err,cookies)) ------------------------------------------------- - -Locates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above. - -If no cookies are found, the callback MUST be passed an empty array. - -The resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done. - -As of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only). - -store.putCookie(cookie, cb(err)) --------------------------------- - -Adds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur. - -The `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties. - -Pass an error if the cookie cannot be stored. - -store.updateCookie(oldCookie, newCookie, cb(err)) -------------------------------------------------- - -Update an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store. - -The `.lastAccessed` property will always be different between the two objects and `.created` will always be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are sorted (or selected for deletion). - -Stores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object. - -The `newCookie` and `oldCookie` objects MUST NOT be modified. - -Pass an error if the newCookie cannot be stored. - -store.removeCookie(domain, path, key, cb(err)) ----------------------------------------------- - -Remove a cookie from the store (see notes on `findCookie` about the uniqueness constraint). - -The implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie. - -store.removeCookies(domain, path, cb(err)) ------------------------------------------- - -Removes matching cookies from the store. The `path` paramter is optional, and if missing means all paths in a domain should be removed. - -Pass an error ONLY if removing any existing cookies failed. - -# TODO - - * _full_ RFC5890/RFC5891 canonicalization for domains in `cdomain()` - * the optional `punycode` requirement implements RFC3492, but RFC6265 requires RFC5891 - * better tests for `validate()`? - -# Copyright and License - -(tl;dr: MIT with some MPL/1.1) - -Copyright GoInstant, Inc. and other contributors. All rights reserved. -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. - -Portions may be licensed under different licenses (in particular public-suffix.txt is MPL/1.1); please read the LICENSE file for full details. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js deleted file mode 100644 index a7fa5452..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Copyright GoInstant, Inc. and other contributors. All rights reserved. - * 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. - */ - -var fs = require('fs'); -var assert = require('assert'); -var punycode = require('punycode'); - -fs.readFile('./public-suffix.txt', 'utf8', function(err,string) { - if (err) throw err; - var lines = string.split("\n"); - process.nextTick(function() { - processList(lines); - }); -}); - -var index = {}; - -var COMMENT = new RegExp('//.+'); -function processList(lines) { - while (lines.length) { - var line = lines.shift(); - line = line.replace(COMMENT,'').trim(); - if (!line) continue; - addToIndex(index,line); - } - - pubSufTest(); - - var w = fs.createWriteStream('./lib/pubsuffix.js',{ - flags: 'w', - encoding: 'utf8', - mode: 0644, - }); - w.on('end', process.exit); - w.write("/****************************************************\n"); - w.write(" * AUTOMATICALLY GENERATED by generate-pubsuffix.js *\n"); - w.write(" * DO NOT EDIT! *\n"); - w.write(" ****************************************************/\n\n"); - - w.write("module.exports.getPublicSuffix = "); - w.write(getPublicSuffix.toString()); - w.write(";\n\n"); - - w.write("// The following generated structure is used under the MPL version 1.1\n"); - w.write("// See public-suffix.txt for more information\n\n"); - w.write("var index = module.exports.index = Object.freeze(\n"); - w.write(JSON.stringify(index)); - w.write(");\n\n"); - w.write("// END of automatically generated file\n"); - - w.end(); -} - -function addToIndex(index,line) { - var prefix = ''; - if (line.replace(/^(!|\*\.)/)) { - prefix = RegExp.$1; - line = line.slice(prefix.length); - } - line = prefix + punycode.toASCII(line); - - if (line.substr(0,1) == '!') - index[line.substr(1)] = false; - else - index[line] = true; -} - -// include the licence in the function since it gets written to pubsuffix.js -function getPublicSuffix(domain) { - /* - * Copyright GoInstant, Inc. and other contributors. All rights reserved. - * 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. - */ - if (!domain) return null; - if (domain.match(/^\./)) return null; - - domain = domain.toLowerCase(); - var parts = domain.split('.').reverse(); - - var suffix = ''; - var suffixLen = 0; - for (var i=0; i<parts.length; i++) { - var part = parts[i]; - var starstr = '*'+suffix; - var partstr = part+suffix; - - if (index[starstr]) { // star rule matches - suffixLen = i+1; - if (index[partstr] === false) { // exception rule matches (NB: false, not undefined) - suffixLen--; - } - } else if (index[partstr]) { // exact match, not exception - suffixLen = i+1; - } - - suffix = '.'+part+suffix; - } - - if (index['*'+suffix]) { // *.domain exists (e.g. *.kyoto.jp for domain='kyoto.jp'); - return null; - } - - if (suffixLen && parts.length > suffixLen) { - return parts.slice(0,suffixLen+1).reverse().join('.'); - } - - return null; -} - -function checkPublicSuffix(give,get) { - var got = getPublicSuffix(give); - assert.equal(got, get, give+' should be '+(get==null?'NULL':get)+' but got '+got); -} - -// pubSufTest() was converted to JavaScript from http://publicsuffix.org/list/test.txt -function pubSufTest() { - // For this function-scope and this function-scope ONLY: - // Any copyright is dedicated to the Public Domain. - // http://creativecommons.org/publicdomain/zero/1.0/ - - // NULL input. - checkPublicSuffix(null, null); - // Mixed case. - checkPublicSuffix('COM', null); - checkPublicSuffix('example.COM', 'example.com'); - checkPublicSuffix('WwW.example.COM', 'example.com'); - // Leading dot. - checkPublicSuffix('.com', null); - checkPublicSuffix('.example', null); - checkPublicSuffix('.example.com', null); - checkPublicSuffix('.example.example', null); - // Unlisted TLD. - checkPublicSuffix('example', null); - checkPublicSuffix('example.example', null); - checkPublicSuffix('b.example.example', null); - checkPublicSuffix('a.b.example.example', null); - // Listed, but non-Internet, TLD. - checkPublicSuffix('local', null); - checkPublicSuffix('example.local', null); - checkPublicSuffix('b.example.local', null); - checkPublicSuffix('a.b.example.local', null); - // TLD with only 1 rule. - checkPublicSuffix('biz', null); - checkPublicSuffix('domain.biz', 'domain.biz'); - checkPublicSuffix('b.domain.biz', 'domain.biz'); - checkPublicSuffix('a.b.domain.biz', 'domain.biz'); - // TLD with some 2-level rules. - checkPublicSuffix('com', null); - checkPublicSuffix('example.com', 'example.com'); - checkPublicSuffix('b.example.com', 'example.com'); - checkPublicSuffix('a.b.example.com', 'example.com'); - checkPublicSuffix('uk.com', null); - checkPublicSuffix('example.uk.com', 'example.uk.com'); - checkPublicSuffix('b.example.uk.com', 'example.uk.com'); - checkPublicSuffix('a.b.example.uk.com', 'example.uk.com'); - checkPublicSuffix('test.ac', 'test.ac'); - // TLD with only 1 (wildcard) rule. - checkPublicSuffix('cy', null); - checkPublicSuffix('c.cy', null); - checkPublicSuffix('b.c.cy', 'b.c.cy'); - checkPublicSuffix('a.b.c.cy', 'b.c.cy'); - // More complex TLD. - checkPublicSuffix('jp', null); - checkPublicSuffix('test.jp', 'test.jp'); - checkPublicSuffix('www.test.jp', 'test.jp'); - checkPublicSuffix('ac.jp', null); - checkPublicSuffix('test.ac.jp', 'test.ac.jp'); - checkPublicSuffix('www.test.ac.jp', 'test.ac.jp'); - checkPublicSuffix('kyoto.jp', null); - checkPublicSuffix('c.kyoto.jp', null); - checkPublicSuffix('b.c.kyoto.jp', 'b.c.kyoto.jp'); - checkPublicSuffix('a.b.c.kyoto.jp', 'b.c.kyoto.jp'); - checkPublicSuffix('pref.kyoto.jp', 'pref.kyoto.jp'); // Exception rule. - checkPublicSuffix('www.pref.kyoto.jp', 'pref.kyoto.jp'); // Exception rule. - checkPublicSuffix('city.kyoto.jp', 'city.kyoto.jp'); // Exception rule. - checkPublicSuffix('www.city.kyoto.jp', 'city.kyoto.jp'); // Exception rule. - // TLD with a wildcard rule and exceptions. - checkPublicSuffix('om', null); - checkPublicSuffix('test.om', null); - checkPublicSuffix('b.test.om', 'b.test.om'); - checkPublicSuffix('a.b.test.om', 'b.test.om'); - checkPublicSuffix('songfest.om', 'songfest.om'); - checkPublicSuffix('www.songfest.om', 'songfest.om'); - // US K12. - checkPublicSuffix('us', null); - checkPublicSuffix('test.us', 'test.us'); - checkPublicSuffix('www.test.us', 'test.us'); - checkPublicSuffix('ak.us', null); - checkPublicSuffix('test.ak.us', 'test.ak.us'); - checkPublicSuffix('www.test.ak.us', 'test.ak.us'); - checkPublicSuffix('k12.ak.us', null); - checkPublicSuffix('test.k12.ak.us', 'test.k12.ak.us'); - checkPublicSuffix('www.test.k12.ak.us', 'test.k12.ak.us'); - - -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/cookie.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/cookie.js deleted file mode 100644 index 1d8615b5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/cookie.js +++ /dev/null @@ -1,947 +0,0 @@ -/* - * Copyright GoInstant, Inc. and other contributors. All rights reserved. - * 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. - */ - -/*jshint regexp:false */ -var net = require('net'); -var urlParse = require('url').parse; -var pubsuffix = require('./pubsuffix'); - -var punycode; -try { - punycode = require('punycode'); -} catch(e) { - console.warn("cookie: can't load punycode; won't use punycode for domain normalization"); -} - -var DATE_DELIM = /[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/; - -// From RFC2616 S2.2: -var TOKEN = /[\x21\x23-\x26\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E-\x7A\x7C\x7E]/; - -// From RFC6265 S4.1.1 -// note that it excludes \x3B ";" -var COOKIE_OCTET = /[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]/; -var COOKIE_OCTETS = /^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/; - -// The name/key cannot be empty but the value can (S5.2): -var COOKIE_PAIR_STRICT = new RegExp('^('+TOKEN.source+'+)=("?)('+COOKIE_OCTET.source+'*)\\2'); -var COOKIE_PAIR = /^([^=\s]+)\s*=\s*("?)\s*(.*)\s*\2/; - -// RFC6265 S4.1.1 defines extension-av as 'any CHAR except CTLs or ";"' -// Note ';' is \x3B -var NON_CTL_SEMICOLON = /[\x20-\x3A\x3C-\x7E]+/; -var EXTENSION_AV = NON_CTL_SEMICOLON; -var PATH_VALUE = NON_CTL_SEMICOLON; - -// Used for checking whether or not there is a trailing semi-colon -var TRAILING_SEMICOLON = /;+$/; - -/* RFC6265 S5.1.1.5: - * [fail if] the day-of-month-value is less than 1 or greater than 31 - */ -var DAY_OF_MONTH = /^(0?[1-9]|[12][0-9]|3[01])$/; - -/* RFC6265 S5.1.1.5: - * [fail if] - * * the hour-value is greater than 23, - * * the minute-value is greater than 59, or - * * the second-value is greater than 59. - */ -var TIME = /(0?[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])/; -var STRICT_TIME = /^(0?[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/; - -var MONTH = /^(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)$/i; -var MONTH_TO_NUM = { - jan:0, feb:1, mar:2, apr:3, may:4, jun:5, jul:6, aug:7, sep:8, oct:9, nov:10, dec:11 -}; -var NUM_TO_MONTH = [ - 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec' -]; -var NUM_TO_DAY = [ - 'Sun','Mon','Tue','Wed','Thu','Fri','Sat' -]; - -var YEAR = /^([1-9][0-9]{1,3})$/; // 2 to 4 digits (will check range when parsing) - -var MAX_TIME = 2147483647000; // 31-bit max -var MAX_DATE = new Date(CookieJar.MAX_TIME); // 31-bit max -var MIN_TIME = 0; // 31-bit min -var MIN_DATE = new Date(CookieJar.MIN_TIME); // 31-bit min - - -// RFC6265 S5.1.1 date parser: -function parseDate(str,strict) { - if (!str) return; - var found_time, found_dom, found_month, found_year; - - /* RFC6265 S5.1.1: - * 2. Process each date-token sequentially in the order the date-tokens - * appear in the cookie-date - */ - var tokens = str.split(DATE_DELIM); - if (!tokens) return; - - var date = new Date(); - date.setMilliseconds(0); - - for (var i=0; i<tokens.length; i++) { - var token = tokens[i].trim(); - if (!token.length) continue; - - var result; - - /* 2.1. If the found-time flag is not set and the token matches the time - * production, set the found-time flag and set the hour- value, - * minute-value, and second-value to the numbers denoted by the digits in - * the date-token, respectively. Skip the remaining sub-steps and continue - * to the next date-token. - */ - if (!found_time) { - result = (strict ? STRICT_TIME : TIME).exec(token); - if (result) { - found_time = true; - date.setUTCHours(result[1]); - date.setUTCMinutes(result[2]); - date.setUTCSeconds(result[3]); - continue; - } - } - - /* 2.2. If the found-day-of-month flag is not set and the date-token matches - * the day-of-month production, set the found-day-of- month flag and set - * the day-of-month-value to the number denoted by the date-token. Skip - * the remaining sub-steps and continue to the next date-token. - */ - if (!found_dom) { - result = DAY_OF_MONTH.exec(token); - if (result) { - found_dom = true; - date.setUTCDate(result[1]); - continue; - } - } - - /* 2.3. If the found-month flag is not set and the date-token matches the - * month production, set the found-month flag and set the month-value to - * the month denoted by the date-token. Skip the remaining sub-steps and - * continue to the next date-token. - */ - if (!found_month) { - result = MONTH.exec(token); - if (result) { - found_month = true; - date.setUTCMonth(MONTH_TO_NUM[result[1].toLowerCase()]); - continue; - } - } - - /* 2.4. If the found-year flag is not set and the date-token matches the year - * production, set the found-year flag and set the year-value to the number - * denoted by the date-token. Skip the remaining sub-steps and continue to - * the next date-token. - */ - if (!found_year) { - result = YEAR.exec(token); - if (result) { - var year = result[0]; - /* From S5.1.1: - * 3. If the year-value is greater than or equal to 70 and less - * than or equal to 99, increment the year-value by 1900. - * 4. If the year-value is greater than or equal to 0 and less - * than or equal to 69, increment the year-value by 2000. - */ - if (70 <= year && year <= 99) - year += 1900; - else if (0 <= year && year <= 69) - year += 2000; - - if (year < 1601) - return; // 5. ... the year-value is less than 1601 - - found_year = true; - date.setUTCFullYear(year); - continue; - } - } - } - - if (!(found_time && found_dom && found_month && found_year)) { - return; // 5. ... at least one of the found-day-of-month, found-month, found- - // year, or found-time flags is not set, - } - - return date; -} - -function formatDate(date) { - var d = date.getUTCDate(); d = d >= 10 ? d : '0'+d; - var h = date.getUTCHours(); h = h >= 10 ? h : '0'+h; - var m = date.getUTCMinutes(); m = m >= 10 ? m : '0'+m; - var s = date.getUTCSeconds(); s = s >= 10 ? s : '0'+s; - return NUM_TO_DAY[date.getUTCDay()] + ', ' + - d+' '+ NUM_TO_MONTH[date.getUTCMonth()] +' '+ date.getUTCFullYear() +' '+ - h+':'+m+':'+s+' GMT'; -} - -// S5.1.2 Canonicalized Host Names -function canonicalDomain(str) { - if (str == null) return null; - str = str.trim().replace(/^\./,''); // S4.1.2.3 & S5.2.3: ignore leading . - - // convert to IDN if any non-ASCII characters - if (punycode && /[^\u0001-\u007f]/.test(str)) - str = punycode.toASCII(str); - - return str.toLowerCase(); -} - -// S5.1.3 Domain Matching -function domainMatch(str, domStr, canonicalize) { - if (str == null || domStr == null) return null; - if (canonicalize !== false) { - str = canonicalDomain(str); - domStr = canonicalDomain(domStr); - } - - /* - * "The domain string and the string are identical. (Note that both the - * domain string and the string will have been canonicalized to lower case at - * this point)" - */ - if (str == domStr) return true; - - /* "All of the following [three] conditions hold:" (order adjusted from the RFC) */ - - /* "* The string is a host name (i.e., not an IP address)." */ - if (net.isIP(str)) return false; - - /* "* The domain string is a suffix of the string" */ - var idx = str.indexOf(domStr); - if (idx <= 0) return false; // it's a non-match (-1) or prefix (0) - - // e.g "a.b.c".indexOf("b.c") === 2 - // 5 === 3+2 - if (str.length !== domStr.length + idx) // it's not a suffix - return false; - - /* "* The last character of the string that is not included in the domain - * string is a %x2E (".") character." */ - if (str.substr(idx-1,1) !== '.') return false; - return true; -} - - -// RFC6265 S5.1.4 Paths and Path-Match - -/* - * "The user agent MUST use an algorithm equivalent to the following algorithm - * to compute the default-path of a cookie:" - * - * Assumption: the path (and not query part or absolute uri) is passed in. - */ -function defaultPath(path) { - // "2. If the uri-path is empty or if the first character of the uri-path is not - // a %x2F ("/") character, output %x2F ("/") and skip the remaining steps. - if (!path || path.substr(0,1) !== "/") return "/"; - - // "3. If the uri-path contains no more than one %x2F ("/") character, output - // %x2F ("/") and skip the remaining step." - if (path === "/") return path; - - var rightSlash = path.lastIndexOf("/"); - if (rightSlash === 0) return "/"; - - // "4. Output the characters of the uri-path from the first character up to, - // but not including, the right-most %x2F ("/")." - return path.slice(0, rightSlash); -} - -/* - * "A request-path path-matches a given cookie-path if at least one of the - * following conditions holds:" - */ -function pathMatch(reqPath,cookiePath) { - // "o The cookie-path and the request-path are identical." - if (cookiePath === reqPath) - return true; - - var idx = reqPath.indexOf(cookiePath); - if (idx === 0) { - // "o The cookie-path is a prefix of the request-path, and the last - // character of the cookie-path is %x2F ("/")." - if (cookiePath.substr(-1) === "/") - return true; - - // " o The cookie-path is a prefix of the request-path, and the first - // character of the request-path that is not included in the cookie- path - // is a %x2F ("/") character." - if (reqPath.substr(cookiePath.length,1) === "/") - return true; - } - - return false; -} - -function parse(str, strict) { - str = str.trim(); - - // S4.1.1 Trailing semi-colons are not part of the specification. - // If we are not in strict mode we remove the trailing semi-colons. - var semiColonCheck = TRAILING_SEMICOLON.exec(str); - if (semiColonCheck) { - if (strict) return; - str = str.slice(0, semiColonCheck.index); - } - - // We use a regex to parse the "name-value-pair" part of S5.2 - var firstSemi = str.indexOf(';'); // S5.2 step 1 - var pairRx = strict ? COOKIE_PAIR_STRICT : COOKIE_PAIR; - var result = pairRx.exec(firstSemi === -1 ? str : str.substr(0,firstSemi)); - - // Rx satisfies the "the name string is empty" and "lacks a %x3D ("=")" - // constraints as well as trimming any whitespace. - if (!result) return; - - var c = new Cookie(); - c.key = result[1]; // the regexp should trim() already - c.value = result[3]; // [2] is quotes or empty-string - - if (firstSemi === -1) return c; - - // S5.2.3 "unparsed-attributes consist of the remainder of the set-cookie-string - // (including the %x3B (";") in question)." plus later on in the same section - // "discard the first ";" and trim". - var unparsed = str.slice(firstSemi).replace(/^\s*;\s*/,'').trim(); - - // "If the unparsed-attributes string is empty, skip the rest of these - // steps." - if (unparsed.length === 0) return c; - - /* - * S5.2 says that when looping over the items "[p]rocess the attribute-name - * and attribute-value according to the requirements in the following - * subsections" for every item. Plus, for many of the individual attributes - * in S5.3 it says to use the "attribute-value of the last attribute in the - * cookie-attribute-list". Therefore, in this implementation, we overwrite - * the previous value. - */ - var cookie_avs = unparsed.split(/\s*;\s*/); - while (cookie_avs.length) { - var av = cookie_avs.shift(); - - if (strict && !EXTENSION_AV.test(av)) return; - - var av_sep = av.indexOf('='); - var av_key, av_value; - if (av_sep === -1) { - av_key = av; - av_value = null; - } else { - av_key = av.substr(0,av_sep); - av_value = av.substr(av_sep+1); - } - - av_key = av_key.trim().toLowerCase(); - if (av_value) av_value = av_value.trim(); - - switch(av_key) { - case 'expires': // S5.2.1 - if (!av_value) { if(strict){return}else{break;} } - var exp = parseDate(av_value,strict); - // "If the attribute-value failed to parse as a cookie date, ignore the - // cookie-av." - if (exp == null) { if(strict){return}else{break;} } - c.expires = exp; - // over and underflow not realistically a concern: V8's getTime() seems to - // store something larger than a 32-bit time_t (even with 32-bit node) - break; - - case 'max-age': // S5.2.2 - if (!av_value) { if(strict){return}else{break;} } - // "If the first character of the attribute-value is not a DIGIT or a "-" - // character ...[or]... If the remainder of attribute-value contains a - // non-DIGIT character, ignore the cookie-av." - if (!/^-?[0-9]+$/.test(av_value)) { if(strict){return}else{break;} } - var delta = parseInt(av_value,10); - if (strict && delta <= 0) return; // S4.1.1 - // "If delta-seconds is less than or equal to zero (0), let expiry-time - // be the earliest representable date and time." - c.setMaxAge(delta); - break; - - case 'domain': // S5.2.3 - // "If the attribute-value is empty, the behavior is undefined. However, - // the user agent SHOULD ignore the cookie-av entirely." - if (!av_value) { if(strict){return}else{break;} } - // S5.2.3 "Let cookie-domain be the attribute-value without the leading %x2E - // (".") character." - var domain = av_value.trim().replace(/^\./,''); - if (!domain) { if(strict){return}else{break;} } // see "is empty" above - // "Convert the cookie-domain to lower case." - c.domain = domain.toLowerCase(); - break; - - case 'path': // S5.2.4 - /* - * "If the attribute-value is empty or if the first character of the - * attribute-value is not %x2F ("/"): - * Let cookie-path be the default-path. - * Otherwise: - * Let cookie-path be the attribute-value." - * - * We'll represent the default-path as null since it depends on the - * context of the parsing. - */ - if (!av_value || av_value.substr(0,1) != "/") { if(strict){return}else{break;} } - c.path = av_value; - break; - - case 'secure': // S5.2.5 - /* - * "If the attribute-name case-insensitively matches the string "Secure", - * the user agent MUST append an attribute to the cookie-attribute-list - * with an attribute-name of Secure and an empty attribute-value." - */ - if (av_value != null) { if(strict){return} } - c.secure = true; - break; - - case 'httponly': // S5.2.6 -- effectively the same as 'secure' - if (av_value != null) { if(strict){return} } - c.httpOnly = true; - break; - - default: - c.extensions = c.extensions || []; - c.extensions.push(av); - break; - } - } - - // ensure a default date for sorting: - c.creation = new Date(); - return c; -} - -function fromJSON(str) { - if (!str) return null; - - var obj; - try { - obj = JSON.parse(str); - } catch (e) { - return null; - } - - var c = new Cookie(); - for (var i=0; i<numCookieProperties; i++) { - var prop = cookieProperties[i]; - if (obj[prop] == null) continue; - if (prop === 'expires' || - prop === 'creation' || - prop === 'lastAccessed') - { - c[prop] = obj[prop] == "Infinity" ? "Infinity" : new Date(obj[prop]); - } else { - c[prop] = obj[prop]; - } - } - - - // ensure a default date for sorting: - c.creation = c.creation || new Date(); - - return c; -} - -/* Section 5.4 part 2: - * "* Cookies with longer paths are listed before cookies with - * shorter paths. - * - * * Among cookies that have equal-length path fields, cookies with - * earlier creation-times are listed before cookies with later - * creation-times." - */ - -function cookieCompare(a,b) { - // descending for length: b CMP a - var deltaLen = (b.path ? b.path.length : 0) - (a.path ? a.path.length : 0); - if (deltaLen !== 0) return deltaLen; - // ascending for time: a CMP b - return (a.creation ? a.creation.getTime() : MAX_TIME) - - (b.creation ? b.creation.getTime() : MAX_TIME); -} - -// Gives the permutation of all possible domainMatch()es of a given domain. The -// array is in shortest-to-longest order. Handy for indexing. -function permuteDomain(domain) { - var pubSuf = pubsuffix.getPublicSuffix(domain); - if (!pubSuf) return null; - if (pubSuf == domain) return [domain]; - - var prefix = domain.slice(0,-(pubSuf.length+1)); // ".example.com" - var parts = prefix.split('.').reverse(); - var cur = pubSuf; - var permutations = [cur]; - while (parts.length) { - cur = parts.shift()+'.'+cur; - permutations.push(cur); - } - return permutations; -} - -// Gives the permutation of all possible pathMatch()es of a given path. The -// array is in longest-to-shortest order. Handy for indexing. -function permutePath(path) { - var origPath = path; - if (path === '/') return ['/']; - if (path.lastIndexOf('/') === path.length-1) - path = path.substr(0,path.length-1); - var permutations = [path]; - while (path.length > 1) { - var lindex = path.lastIndexOf('/'); - if (lindex === 0) break; - path = path.substr(0,lindex); - permutations.push(path); - } - permutations.push('/'); - return permutations; -} - - -function Cookie (opts) { - if (typeof opts !== "object") return; - Object.keys(opts).forEach(function (key) { - if (Cookie.prototype.hasOwnProperty(key)) { - this[key] = opts[key] || Cookie.prototype[key]; - } - }.bind(this)); -} - -Cookie.parse = parse; -Cookie.fromJSON = fromJSON; - -Cookie.prototype.key = ""; -Cookie.prototype.value = ""; - -// the order in which the RFC has them: -Cookie.prototype.expires = "Infinity"; // coerces to literal Infinity -Cookie.prototype.maxAge = null; // takes precedence over expires for TTL -Cookie.prototype.domain = null; -Cookie.prototype.path = null; -Cookie.prototype.secure = false; -Cookie.prototype.httpOnly = false; -Cookie.prototype.extensions = null; - -// set by the CookieJar: -Cookie.prototype.hostOnly = null; // boolean when set -Cookie.prototype.pathIsDefault = null; // boolean when set -Cookie.prototype.creation = null; // Date when set; defaulted by Cookie.parse -Cookie.prototype.lastAccessed = null; // Date when set - -var cookieProperties = Object.freeze(Object.keys(Cookie.prototype).map(function(p) { - if (p instanceof Function) return; - return p; -})); -var numCookieProperties = cookieProperties.length; - -Cookie.prototype.inspect = function inspect() { - var now = Date.now(); - return 'Cookie="'+this.toString() + - '; hostOnly='+(this.hostOnly != null ? this.hostOnly : '?') + - '; aAge='+(this.lastAccessed ? (now-this.lastAccessed.getTime())+'ms' : '?') + - '; cAge='+(this.creation ? (now-this.creation.getTime())+'ms' : '?') + - '"'; -}; - -Cookie.prototype.validate = function validate() { - if (!COOKIE_OCTETS.test(this.value)) - return false; - if (this.expires != Infinity && !(this.expires instanceof Date) && !parseDate(this.expires,true)) - return false; - if (this.maxAge != null && this.maxAge <= 0) - return false; // "Max-Age=" non-zero-digit *DIGIT - if (this.path != null && !PATH_VALUE.test(this.path)) - return false; - - var cdomain = this.cdomain(); - if (cdomain) { - if (cdomain.match(/\.$/)) - return false; // S4.1.2.3 suggests that this is bad. domainMatch() tests confirm this - var suffix = pubsuffix.getPublicSuffix(cdomain); - if (suffix == null) // it's a public suffix - return false; - } - return true; -}; - -Cookie.prototype.setExpires = function setExpires(exp) { - if (exp instanceof Date) this.expires = exp; - else this.expires = parseDate(exp) || "Infinity"; -}; - -Cookie.prototype.setMaxAge = function setMaxAge(age) { - if (age === Infinity || age === -Infinity) - this.maxAge = age.toString(); // so JSON.stringify() works - else - this.maxAge = age; -}; - -// gives Cookie header format -Cookie.prototype.cookieString = function cookieString() { - var val = this.value; - if (val == null) val = ''; - if (!val.length || COOKIE_OCTETS.test(val)) - return this.key+'='+val; - else - return this.key+'="'+val+'"'; -}; - -// gives Set-Cookie header format -Cookie.prototype.toString = function toString() { - var str = this.cookieString(); - - if (this.expires != Infinity) { - if (this.expires instanceof Date) - str += '; Expires='+formatDate(this.expires); - else - str += '; Expires='+this.expires; - } - - if (this.maxAge != null && this.maxAge != Infinity) - str += '; Max-Age='+this.maxAge; - - if (this.domain && !this.hostOnly) - str += '; Domain='+this.domain; - if (this.path) - str += '; Path='+this.path; - - if (this.secure) str += '; Secure'; - if (this.httpOnly) str += '; HttpOnly'; - if (this.extensions) { - this.extensions.forEach(function(ext) { - str += '; '+ext; - }); - } - - return str; -}; - -// TTL() partially replaces the "expiry-time" parts of S5.3 step 3 (setCookie() -// elsewhere) -// S5.3 says to give the "latest representable date" for which we use Infinity -// For "expired" we use 0 -Cookie.prototype.TTL = function TTL(now) { - /* RFC6265 S4.1.2.2 If a cookie has both the Max-Age and the Expires - * attribute, the Max-Age attribute has precedence and controls the - * expiration date of the cookie. - * (Concurs with S5.3 step 3) - */ - if (this.maxAge != null) { - return this.maxAge<=0 ? 0 : this.maxAge*1000; - } - - var expires = this.expires; - if (expires != Infinity) { - if (!(expires instanceof Date)) { - expires = parseDate(expires) || Infinity; - } - - if (expires == Infinity) - return Infinity; - - return expires.getTime() - (now || Date.now()); - } - - return Infinity; -}; - -// expiryTime() replaces the "expiry-time" parts of S5.3 step 3 (setCookie() -// elsewhere) -Cookie.prototype.expiryTime = function expiryTime(now) { - if (this.maxAge != null) { - var relativeTo = this.creation || now || new Date(); - var age = (this.maxAge <= 0) ? -Infinity : this.maxAge*1000; - return relativeTo.getTime() + age; - } - - if (this.expires == Infinity) return Infinity; - return this.expires.getTime(); -}; - -// expiryDate() replaces the "expiry-time" parts of S5.3 step 3 (setCookie() -// elsewhere), except it returns a Date -Cookie.prototype.expiryDate = function expiryDate(now) { - var millisec = this.expiryTime(now); - if (millisec == Infinity) return new Date(MAX_TIME); - else if (millisec == -Infinity) return new Date(MIN_TIME); - else return new Date(millisec); -}; - -// This replaces the "persistent-flag" parts of S5.3 step 3 -Cookie.prototype.isPersistent = function isPersistent() { - return (this.maxAge != null || this.expires != Infinity); -}; - -// Mostly S5.1.2 and S5.2.3: -Cookie.prototype.cdomain = -Cookie.prototype.canonicalizedDomain = function canonicalizedDomain() { - if (this.domain == null) return null; - return canonicalDomain(this.domain); -}; - - -var memstore; -function CookieJar(store, rejectPublicSuffixes) { - if (rejectPublicSuffixes != null) this.rejectPublicSuffixes = rejectPublicSuffixes; - if (!store) { - memstore = memstore || require('./memstore'); - store = new memstore.MemoryCookieStore(); - } - this.store = store; -} -CookieJar.prototype.store = null; -CookieJar.prototype.rejectPublicSuffixes = true; - -CookieJar.prototype.setCookie = function setCookie(cookie, url, options, cb) { - var err; - var context = (url instanceof Object) ? url : urlParse(url); - if (options instanceof Function) { - cb = options; - options = {}; - } - - var host = canonicalDomain(context.hostname); - - // S5.3 step 1 - if (!(cookie instanceof Cookie)) - cookie = Cookie.parse(cookie, options.strict === true); - if (!cookie) { - err = new Error("Cookie failed to parse"); - return cb(options.ignoreError ? null : err); - } - - // S5.3 step 2 - var now = options.now || new Date(); // will assign later to save effort in the face of errors - - // S5.3 step 3: NOOP; persistent-flag and expiry-time is handled by getCookie() - - // S5.3 step 4: NOOP; domain is null by default - - // S5.3 step 5: public suffixes - if (this.rejectPublicSuffixes && cookie.domain) { - var suffix = pubsuffix.getPublicSuffix(cookie.cdomain()); - if (suffix == null) { // e.g. "com" - err = new Error("Cookie has domain set to a public suffix"); - return cb(options.ignoreError ? null : err); - } - } - - // S5.3 step 6: - if (cookie.domain) { - if (!domainMatch(host, cookie.cdomain(), false)) { - err = new Error("Cookie not in this host's domain. Cookie:"+cookie.cdomain()+" Request:"+host); - return cb(options.ignoreError ? null : err); - } - - if (cookie.hostOnly == null) // don't reset if already set - cookie.hostOnly = false; - - } else { - cookie.hostOnly = true; - cookie.domain = host; - } - - // S5.3 step 7: "Otherwise, set the cookie's path to the default-path of the - // request-uri" - if (!cookie.path) { - cookie.path = defaultPath(context.pathname); - cookie.pathIsDefault = true; - } else { - if (cookie.path.length > 1 && cookie.path.substr(-1) == '/') - cookie.path = cookie.path.slice(0,-1); - } - - // S5.3 step 8: NOOP; secure attribute - // S5.3 step 9: NOOP; httpOnly attribute - - // S5.3 step 10 - if (options.http === false && cookie.httpOnly) { - err = new Error("Cookie is HttpOnly and this isn't an HTTP API"); - return cb(options.ignoreError ? null : err); - } - - var store = this.store; - - if (!store.updateCookie) { - store.updateCookie = function stubUpdateCookie(oldCookie, newCookie, cb) { - this.putCookie(newCookie, cb); - }; - } - - store.findCookie(cookie.domain, cookie.path, cookie.key, function(err,oldCookie) { - if (err) return cb(err); - - var next = function(err) { - if (err) return cb(err); - else cb(null, cookie); - }; - - if (oldCookie) { - // S5.3 step 11 - "If the cookie store contains a cookie with the same name, - // domain, and path as the newly created cookie:" - if (options.http === false && oldCookie.httpOnly) { // step 11.2 - err = new Error("old Cookie is HttpOnly and this isn't an HTTP API"); - return cb(options.ignoreError ? null : err); - } - cookie.creation = oldCookie.creation; // step 11.3 - cookie.lastAccessed = now; - // Step 11.4 (delete cookie) is implied by just setting the new one: - store.updateCookie(oldCookie, cookie, next); // step 12 - - } else { - cookie.creation = cookie.lastAccessed = now; - store.putCookie(cookie, next); // step 12 - } - }); -}; - -// RFC6365 S5.4 -CookieJar.prototype.getCookies = function getCookies(url, options, cb) { - var context = (url instanceof Object) ? url : urlParse(url); - if (options instanceof Function) { - cb = options; - options = {}; - } - - var host = canonicalDomain(context.hostname); - var path = context.pathname || '/'; - - var secure = options.secure; - if (secure == null && context.protocol && - (context.protocol == 'https:' || context.protocol == 'wss:')) - { - secure = true; - } - - var http = options.http; - if (http == null) http = true; - - var now = options.now || Date.now(); - var expireCheck = options.expire !== false; - var allPaths = !!options.allPaths; - var store = this.store; - - function matchingCookie(c) { - // "Either: - // The cookie's host-only-flag is true and the canonicalized - // request-host is identical to the cookie's domain. - // Or: - // The cookie's host-only-flag is false and the canonicalized - // request-host domain-matches the cookie's domain." - if (c.hostOnly) { - if (c.domain != host) return false; - } else { - if (!domainMatch(host, c.domain, false)) return false; - } - - // "The request-uri's path path-matches the cookie's path." - if (!allPaths && !pathMatch(path, c.path)) - return false; - - // "If the cookie's secure-only-flag is true, then the request-uri's - // scheme must denote a "secure" protocol" - if (c.secure && !secure) - return false; - - // "If the cookie's http-only-flag is true, then exclude the cookie if the - // cookie-string is being generated for a "non-HTTP" API" - if (c.httpOnly && !http) - return false; - - // deferred from S5.3 - // non-RFC: allow retention of expired cookies by choice - if (expireCheck && c.expiryTime() <= now) { - store.removeCookie(c.domain, c.path, c.key, function(){}); // result ignored - return false; - } - - return true; - } - - store.findCookies(host, allPaths ? null : path, function(err,cookies) { - if (err) return cb(err); - - cookies = cookies.filter(matchingCookie); - - // sorting of S5.4 part 2 - if (options.sort !== false) - cookies = cookies.sort(cookieCompare); - - // S5.4 part 3 - var now = new Date(); - cookies.forEach(function(c) { c.lastAccessed = now }); - // TODO persist lastAccessed - - cb(null,cookies); - }); -}; - -CookieJar.prototype.getCookieString = function(/*..., cb*/) { - var args = Array.prototype.slice.call(arguments,0); - var cb = args.pop(); - var next = function(err,cookies) { - if (err) cb(err); - else cb(null, cookies.map(function(c){return c.cookieString()}).join('; ')); - }; - args.push(next); - this.getCookies.apply(this,args); -}; - -CookieJar.prototype.getSetCookieStrings = function(/*..., cb*/) { - var args = Array.prototype.slice.call(arguments,0); - var cb = args.pop(); - var next = function(err,cookies) { - if (err) cb(err); - else cb(null, cookies.map(function(c){return c.toString()})); - }; - args.push(next); - this.getCookies.apply(this,args); -}; - - - -module.exports = { - CookieJar: CookieJar, - Cookie: Cookie, - parseDate: parseDate, - formatDate: formatDate, - parse: parse, - fromJSON: fromJSON, - domainMatch: domainMatch, - defaultPath: defaultPath, - pathMatch: pathMatch, - getPublicSuffix: pubsuffix.getPublicSuffix, - cookieCompare: cookieCompare, - permuteDomain: permuteDomain, - permutePath: permutePath, - canonicalDomain: canonicalDomain, -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/memstore.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/memstore.js deleted file mode 100644 index 66abb376..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/memstore.js +++ /dev/null @@ -1,102 +0,0 @@ -var tough = require('./cookie'); -var permuteDomain = tough.permuteDomain; -var permutePath = tough.permutePath; -var util = require('util'); - -function MemoryCookieStore() { - this.idx = {}; -} -module.exports.MemoryCookieStore = MemoryCookieStore; -MemoryCookieStore.prototype.idx = null; - -// force a default depth: -MemoryCookieStore.prototype.inspect = function inspect() { - return "{ idx: "+util.inspect(this.idx, false, 2)+' }'; -}; - -MemoryCookieStore.prototype.findCookie = function findCookie(domain, path, key, cb) { - if (!this.idx[domain]) return cb(null,undefined); - if (!this.idx[domain][path]) return cb(null,undefined); - return cb(null,this.idx[domain][path][key]||null); -}; - -MemoryCookieStore.prototype.findCookies = function findCookies(domain, path, cb) { - var results = []; - if (!domain) return cb(null,[]); - - var pathMatcher; - if (!path) { - // null or '/' means "all paths" - pathMatcher = function matchAll(domainIndex) { - for (var curPath in domainIndex) { - var pathIndex = domainIndex[curPath]; - for (var key in pathIndex) { - results.push(pathIndex[key]); - } - } - }; - - } else if (path === '/') { - pathMatcher = function matchSlash(domainIndex) { - var pathIndex = domainIndex['/']; - if (!pathIndex) return; - for (var key in pathIndex) { - results.push(pathIndex[key]); - } - }; - - } else { - var paths = permutePath(path) || [path]; - pathMatcher = function matchRFC(domainIndex) { - paths.forEach(function(curPath) { - var pathIndex = domainIndex[curPath]; - if (!pathIndex) return; - for (var key in pathIndex) { - results.push(pathIndex[key]); - } - }); - }; - } - - var domains = permuteDomain(domain) || [domain]; - var idx = this.idx; - domains.forEach(function(curDomain) { - var domainIndex = idx[curDomain]; - if (!domainIndex) return; - pathMatcher(domainIndex); - }); - - cb(null,results); -}; - -MemoryCookieStore.prototype.putCookie = function putCookie(cookie, cb) { - if (!this.idx[cookie.domain]) this.idx[cookie.domain] = {}; - if (!this.idx[cookie.domain][cookie.path]) this.idx[cookie.domain][cookie.path] = {}; - this.idx[cookie.domain][cookie.path][cookie.key] = cookie; - cb(null); -}; - -MemoryCookieStore.prototype.updateCookie = function updateCookie(oldCookie, newCookie, cb) { - // updateCookie() may avoid updating cookies that are identical. For example, - // lastAccessed may not be important to some stores and an equality - // comparison could exclude that field. - this.putCookie(newCookie,cb); -}; - -MemoryCookieStore.prototype.removeCookie = function removeCookie(domain, path, key, cb) { - if (this.idx[domain] && this.idx[domain][path] && this.idx[domain][path][key]) { - delete this.idx[domain][path][key]; - } - cb(null); -}; - -MemoryCookieStore.prototype.removeCookies = function removeCookies(domain, path, cb) { - if (!this.idx[domain]) { - if (path) { - delete this.idx[domain][path]; - } else { - delete this.idx[domain]; - } - } - return cb(null); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js deleted file mode 100644 index a7031473..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************** - * AUTOMATICALLY GENERATED by generate-pubsuffix.js * - * DO NOT EDIT! * - ****************************************************/ - -module.exports.getPublicSuffix = function getPublicSuffix(domain) { - /* - * Copyright GoInstant, Inc. and other contributors. All rights reserved. - * 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. - */ - if (!domain) return null; - if (domain.match(/^\./)) return null; - - domain = domain.toLowerCase(); - var parts = domain.split('.').reverse(); - - var suffix = ''; - var suffixLen = 0; - for (var i=0; i<parts.length; i++) { - var part = parts[i]; - var starstr = '*'+suffix; - var partstr = part+suffix; - - if (index[starstr]) { // star rule matches - suffixLen = i+1; - if (index[partstr] === false) { // exception rule matches (NB: false, not undefined) - suffixLen--; - } - } else if (index[partstr]) { // exact match, not exception - suffixLen = i+1; - } - - suffix = '.'+part+suffix; - } - - if (index['*'+suffix]) { // *.domain exists (e.g. *.kyoto.jp for domain='kyoto.jp'); - return null; - } - - if (suffixLen && parts.length > suffixLen) { - return parts.slice(0,suffixLen+1).reverse().join('.'); - } - - return null; -}; - -// The following generated structure is used under the MPL version 1.1 -// See public-suffix.txt for more information - -var index = module.exports.index = Object.freeze( -{"ac":true,"com.ac":true,"edu.ac":true,"gov.ac":true,"net.ac":true,"mil.ac":true,"org.ac":true,"ad":true,"nom.ad":true,"ae":true,"co.ae":true,"net.ae":true,"org.ae":true,"sch.ae":true,"ac.ae":true,"gov.ae":true,"mil.ae":true,"aero":true,"accident-investigation.aero":true,"accident-prevention.aero":true,"aerobatic.aero":true,"aeroclub.aero":true,"aerodrome.aero":true,"agents.aero":true,"aircraft.aero":true,"airline.aero":true,"airport.aero":true,"air-surveillance.aero":true,"airtraffic.aero":true,"air-traffic-control.aero":true,"ambulance.aero":true,"amusement.aero":true,"association.aero":true,"author.aero":true,"ballooning.aero":true,"broker.aero":true,"caa.aero":true,"cargo.aero":true,"catering.aero":true,"certification.aero":true,"championship.aero":true,"charter.aero":true,"civilaviation.aero":true,"club.aero":true,"conference.aero":true,"consultant.aero":true,"consulting.aero":true,"control.aero":true,"council.aero":true,"crew.aero":true,"design.aero":true,"dgca.aero":true,"educator.aero":true,"emergency.aero":true,"engine.aero":true,"engineer.aero":true,"entertainment.aero":true,"equipment.aero":true,"exchange.aero":true,"express.aero":true,"federation.aero":true,"flight.aero":true,"freight.aero":true,"fuel.aero":true,"gliding.aero":true,"government.aero":true,"groundhandling.aero":true,"group.aero":true,"hanggliding.aero":true,"homebuilt.aero":true,"insurance.aero":true,"journal.aero":true,"journalist.aero":true,"leasing.aero":true,"logistics.aero":true,"magazine.aero":true,"maintenance.aero":true,"marketplace.aero":true,"media.aero":true,"microlight.aero":true,"modelling.aero":true,"navigation.aero":true,"parachuting.aero":true,"paragliding.aero":true,"passenger-association.aero":true,"pilot.aero":true,"press.aero":true,"production.aero":true,"recreation.aero":true,"repbody.aero":true,"res.aero":true,"research.aero":true,"rotorcraft.aero":true,"safety.aero":true,"scientist.aero":true,"services.aero":true,"show.aero":true,"skydiving.aero":true,"software.aero":true,"student.aero":true,"taxi.aero":true,"trader.aero":true,"trading.aero":true,"trainer.aero":true,"union.aero":true,"workinggroup.aero":true,"works.aero":true,"af":true,"gov.af":true,"com.af":true,"org.af":true,"net.af":true,"edu.af":true,"ag":true,"com.ag":true,"org.ag":true,"net.ag":true,"co.ag":true,"nom.ag":true,"ai":true,"off.ai":true,"com.ai":true,"net.ai":true,"org.ai":true,"al":true,"com.al":true,"edu.al":true,"gov.al":true,"mil.al":true,"net.al":true,"org.al":true,"am":true,"an":true,"com.an":true,"net.an":true,"org.an":true,"edu.an":true,"ao":true,"ed.ao":true,"gv.ao":true,"og.ao":true,"co.ao":true,"pb.ao":true,"it.ao":true,"aq":true,"*.ar":true,"congresodelalengua3.ar":false,"educ.ar":false,"gobiernoelectronico.ar":false,"mecon.ar":false,"nacion.ar":false,"nic.ar":false,"promocion.ar":false,"retina.ar":false,"uba.ar":false,"e164.arpa":true,"in-addr.arpa":true,"ip6.arpa":true,"iris.arpa":true,"uri.arpa":true,"urn.arpa":true,"as":true,"gov.as":true,"asia":true,"at":true,"ac.at":true,"co.at":true,"gv.at":true,"or.at":true,"com.au":true,"net.au":true,"org.au":true,"edu.au":true,"gov.au":true,"csiro.au":true,"asn.au":true,"id.au":true,"info.au":true,"conf.au":true,"oz.au":true,"act.au":true,"nsw.au":true,"nt.au":true,"qld.au":true,"sa.au":true,"tas.au":true,"vic.au":true,"wa.au":true,"act.edu.au":true,"nsw.edu.au":true,"nt.edu.au":true,"qld.edu.au":true,"sa.edu.au":true,"tas.edu.au":true,"vic.edu.au":true,"wa.edu.au":true,"act.gov.au":true,"nt.gov.au":true,"qld.gov.au":true,"sa.gov.au":true,"tas.gov.au":true,"vic.gov.au":true,"wa.gov.au":true,"aw":true,"com.aw":true,"ax":true,"az":true,"com.az":true,"net.az":true,"int.az":true,"gov.az":true,"org.az":true,"edu.az":true,"info.az":true,"pp.az":true,"mil.az":true,"name.az":true,"pro.az":true,"biz.az":true,"ba":true,"org.ba":true,"net.ba":true,"edu.ba":true,"gov.ba":true,"mil.ba":true,"unsa.ba":true,"unbi.ba":true,"co.ba":true,"com.ba":true,"rs.ba":true,"bb":true,"biz.bb":true,"com.bb":true,"edu.bb":true,"gov.bb":true,"info.bb":true,"net.bb":true,"org.bb":true,"store.bb":true,"*.bd":true,"be":true,"ac.be":true,"bf":true,"gov.bf":true,"bg":true,"a.bg":true,"b.bg":true,"c.bg":true,"d.bg":true,"e.bg":true,"f.bg":true,"g.bg":true,"h.bg":true,"i.bg":true,"j.bg":true,"k.bg":true,"l.bg":true,"m.bg":true,"n.bg":true,"o.bg":true,"p.bg":true,"q.bg":true,"r.bg":true,"s.bg":true,"t.bg":true,"u.bg":true,"v.bg":true,"w.bg":true,"x.bg":true,"y.bg":true,"z.bg":true,"0.bg":true,"1.bg":true,"2.bg":true,"3.bg":true,"4.bg":true,"5.bg":true,"6.bg":true,"7.bg":true,"8.bg":true,"9.bg":true,"bh":true,"com.bh":true,"edu.bh":true,"net.bh":true,"org.bh":true,"gov.bh":true,"bi":true,"co.bi":true,"com.bi":true,"edu.bi":true,"or.bi":true,"org.bi":true,"biz":true,"bj":true,"asso.bj":true,"barreau.bj":true,"gouv.bj":true,"bm":true,"com.bm":true,"edu.bm":true,"gov.bm":true,"net.bm":true,"org.bm":true,"*.bn":true,"bo":true,"com.bo":true,"edu.bo":true,"gov.bo":true,"gob.bo":true,"int.bo":true,"org.bo":true,"net.bo":true,"mil.bo":true,"tv.bo":true,"br":true,"adm.br":true,"adv.br":true,"agr.br":true,"am.br":true,"arq.br":true,"art.br":true,"ato.br":true,"b.br":true,"bio.br":true,"blog.br":true,"bmd.br":true,"can.br":true,"cim.br":true,"cng.br":true,"cnt.br":true,"com.br":true,"coop.br":true,"ecn.br":true,"edu.br":true,"emp.br":true,"eng.br":true,"esp.br":true,"etc.br":true,"eti.br":true,"far.br":true,"flog.br":true,"fm.br":true,"fnd.br":true,"fot.br":true,"fst.br":true,"g12.br":true,"ggf.br":true,"gov.br":true,"imb.br":true,"ind.br":true,"inf.br":true,"jor.br":true,"jus.br":true,"lel.br":true,"mat.br":true,"med.br":true,"mil.br":true,"mus.br":true,"net.br":true,"nom.br":true,"not.br":true,"ntr.br":true,"odo.br":true,"org.br":true,"ppg.br":true,"pro.br":true,"psc.br":true,"psi.br":true,"qsl.br":true,"radio.br":true,"rec.br":true,"slg.br":true,"srv.br":true,"taxi.br":true,"teo.br":true,"tmp.br":true,"trd.br":true,"tur.br":true,"tv.br":true,"vet.br":true,"vlog.br":true,"wiki.br":true,"zlg.br":true,"bs":true,"com.bs":true,"net.bs":true,"org.bs":true,"edu.bs":true,"gov.bs":true,"bt":true,"com.bt":true,"edu.bt":true,"gov.bt":true,"net.bt":true,"org.bt":true,"bw":true,"co.bw":true,"org.bw":true,"by":true,"gov.by":true,"mil.by":true,"com.by":true,"of.by":true,"bz":true,"com.bz":true,"net.bz":true,"org.bz":true,"edu.bz":true,"gov.bz":true,"ca":true,"ab.ca":true,"bc.ca":true,"mb.ca":true,"nb.ca":true,"nf.ca":true,"nl.ca":true,"ns.ca":true,"nt.ca":true,"nu.ca":true,"on.ca":true,"pe.ca":true,"qc.ca":true,"sk.ca":true,"yk.ca":true,"gc.ca":true,"cat":true,"cc":true,"cd":true,"gov.cd":true,"cf":true,"cg":true,"ch":true,"ci":true,"org.ci":true,"or.ci":true,"com.ci":true,"co.ci":true,"edu.ci":true,"ed.ci":true,"ac.ci":true,"net.ci":true,"go.ci":true,"asso.ci":true,"xn--aroport-bya.ci":true,"int.ci":true,"presse.ci":true,"md.ci":true,"gouv.ci":true,"*.ck":true,"www.ck":false,"cl":true,"gov.cl":true,"gob.cl":true,"co.cl":true,"mil.cl":true,"cm":true,"gov.cm":true,"cn":true,"ac.cn":true,"com.cn":true,"edu.cn":true,"gov.cn":true,"net.cn":true,"org.cn":true,"mil.cn":true,"xn--55qx5d.cn":true,"xn--io0a7i.cn":true,"xn--od0alg.cn":true,"ah.cn":true,"bj.cn":true,"cq.cn":true,"fj.cn":true,"gd.cn":true,"gs.cn":true,"gz.cn":true,"gx.cn":true,"ha.cn":true,"hb.cn":true,"he.cn":true,"hi.cn":true,"hl.cn":true,"hn.cn":true,"jl.cn":true,"js.cn":true,"jx.cn":true,"ln.cn":true,"nm.cn":true,"nx.cn":true,"qh.cn":true,"sc.cn":true,"sd.cn":true,"sh.cn":true,"sn.cn":true,"sx.cn":true,"tj.cn":true,"xj.cn":true,"xz.cn":true,"yn.cn":true,"zj.cn":true,"hk.cn":true,"mo.cn":true,"tw.cn":true,"co":true,"arts.co":true,"com.co":true,"edu.co":true,"firm.co":true,"gov.co":true,"info.co":true,"int.co":true,"mil.co":true,"net.co":true,"nom.co":true,"org.co":true,"rec.co":true,"web.co":true,"com":true,"coop":true,"cr":true,"ac.cr":true,"co.cr":true,"ed.cr":true,"fi.cr":true,"go.cr":true,"or.cr":true,"sa.cr":true,"cu":true,"com.cu":true,"edu.cu":true,"org.cu":true,"net.cu":true,"gov.cu":true,"inf.cu":true,"cv":true,"cx":true,"gov.cx":true,"*.cy":true,"cz":true,"de":true,"dj":true,"dk":true,"dm":true,"com.dm":true,"net.dm":true,"org.dm":true,"edu.dm":true,"gov.dm":true,"do":true,"art.do":true,"com.do":true,"edu.do":true,"gob.do":true,"gov.do":true,"mil.do":true,"net.do":true,"org.do":true,"sld.do":true,"web.do":true,"dz":true,"com.dz":true,"org.dz":true,"net.dz":true,"gov.dz":true,"edu.dz":true,"asso.dz":true,"pol.dz":true,"art.dz":true,"ec":true,"com.ec":true,"info.ec":true,"net.ec":true,"fin.ec":true,"k12.ec":true,"med.ec":true,"pro.ec":true,"org.ec":true,"edu.ec":true,"gov.ec":true,"gob.ec":true,"mil.ec":true,"edu":true,"ee":true,"edu.ee":true,"gov.ee":true,"riik.ee":true,"lib.ee":true,"med.ee":true,"com.ee":true,"pri.ee":true,"aip.ee":true,"org.ee":true,"fie.ee":true,"eg":true,"com.eg":true,"edu.eg":true,"eun.eg":true,"gov.eg":true,"mil.eg":true,"name.eg":true,"net.eg":true,"org.eg":true,"sci.eg":true,"*.er":true,"es":true,"com.es":true,"nom.es":true,"org.es":true,"gob.es":true,"edu.es":true,"*.et":true,"eu":true,"fi":true,"aland.fi":true,"*.fj":true,"*.fk":true,"fm":true,"fo":true,"fr":true,"com.fr":true,"asso.fr":true,"nom.fr":true,"prd.fr":true,"presse.fr":true,"tm.fr":true,"aeroport.fr":true,"assedic.fr":true,"avocat.fr":true,"avoues.fr":true,"cci.fr":true,"chambagri.fr":true,"chirurgiens-dentistes.fr":true,"experts-comptables.fr":true,"geometre-expert.fr":true,"gouv.fr":true,"greta.fr":true,"huissier-justice.fr":true,"medecin.fr":true,"notaires.fr":true,"pharmacien.fr":true,"port.fr":true,"veterinaire.fr":true,"ga":true,"gd":true,"ge":true,"com.ge":true,"edu.ge":true,"gov.ge":true,"org.ge":true,"mil.ge":true,"net.ge":true,"pvt.ge":true,"gf":true,"gg":true,"co.gg":true,"org.gg":true,"net.gg":true,"sch.gg":true,"gov.gg":true,"gh":true,"com.gh":true,"edu.gh":true,"gov.gh":true,"org.gh":true,"mil.gh":true,"gi":true,"com.gi":true,"ltd.gi":true,"gov.gi":true,"mod.gi":true,"edu.gi":true,"org.gi":true,"gl":true,"gm":true,"ac.gn":true,"com.gn":true,"edu.gn":true,"gov.gn":true,"org.gn":true,"net.gn":true,"gov":true,"gp":true,"com.gp":true,"net.gp":true,"mobi.gp":true,"edu.gp":true,"org.gp":true,"asso.gp":true,"gq":true,"gr":true,"com.gr":true,"edu.gr":true,"net.gr":true,"org.gr":true,"gov.gr":true,"gs":true,"*.gt":true,"www.gt":false,"*.gu":true,"gw":true,"gy":true,"co.gy":true,"com.gy":true,"net.gy":true,"hk":true,"com.hk":true,"edu.hk":true,"gov.hk":true,"idv.hk":true,"net.hk":true,"org.hk":true,"xn--55qx5d.hk":true,"xn--wcvs22d.hk":true,"xn--lcvr32d.hk":true,"xn--mxtq1m.hk":true,"xn--gmqw5a.hk":true,"xn--ciqpn.hk":true,"xn--gmq050i.hk":true,"xn--zf0avx.hk":true,"xn--io0a7i.hk":true,"xn--mk0axi.hk":true,"xn--od0alg.hk":true,"xn--od0aq3b.hk":true,"xn--tn0ag.hk":true,"xn--uc0atv.hk":true,"xn--uc0ay4a.hk":true,"hm":true,"hn":true,"com.hn":true,"edu.hn":true,"org.hn":true,"net.hn":true,"mil.hn":true,"gob.hn":true,"hr":true,"iz.hr":true,"from.hr":true,"name.hr":true,"com.hr":true,"ht":true,"com.ht":true,"shop.ht":true,"firm.ht":true,"info.ht":true,"adult.ht":true,"net.ht":true,"pro.ht":true,"org.ht":true,"med.ht":true,"art.ht":true,"coop.ht":true,"pol.ht":true,"asso.ht":true,"edu.ht":true,"rel.ht":true,"gouv.ht":true,"perso.ht":true,"hu":true,"co.hu":true,"info.hu":true,"org.hu":true,"priv.hu":true,"sport.hu":true,"tm.hu":true,"2000.hu":true,"agrar.hu":true,"bolt.hu":true,"casino.hu":true,"city.hu":true,"erotica.hu":true,"erotika.hu":true,"film.hu":true,"forum.hu":true,"games.hu":true,"hotel.hu":true,"ingatlan.hu":true,"jogasz.hu":true,"konyvelo.hu":true,"lakas.hu":true,"media.hu":true,"news.hu":true,"reklam.hu":true,"sex.hu":true,"shop.hu":true,"suli.hu":true,"szex.hu":true,"tozsde.hu":true,"utazas.hu":true,"video.hu":true,"id":true,"ac.id":true,"co.id":true,"go.id":true,"mil.id":true,"net.id":true,"or.id":true,"sch.id":true,"web.id":true,"ie":true,"gov.ie":true,"*.il":true,"im":true,"co.im":true,"ltd.co.im":true,"plc.co.im":true,"net.im":true,"gov.im":true,"org.im":true,"nic.im":true,"ac.im":true,"in":true,"co.in":true,"firm.in":true,"net.in":true,"org.in":true,"gen.in":true,"ind.in":true,"nic.in":true,"ac.in":true,"edu.in":true,"res.in":true,"gov.in":true,"mil.in":true,"info":true,"int":true,"eu.int":true,"io":true,"com.io":true,"iq":true,"gov.iq":true,"edu.iq":true,"mil.iq":true,"com.iq":true,"org.iq":true,"net.iq":true,"ir":true,"ac.ir":true,"co.ir":true,"gov.ir":true,"id.ir":true,"net.ir":true,"org.ir":true,"sch.ir":true,"xn--mgba3a4f16a.ir":true,"xn--mgba3a4fra.ir":true,"is":true,"net.is":true,"com.is":true,"edu.is":true,"gov.is":true,"org.is":true,"int.is":true,"it":true,"gov.it":true,"edu.it":true,"agrigento.it":true,"ag.it":true,"alessandria.it":true,"al.it":true,"ancona.it":true,"an.it":true,"aosta.it":true,"aoste.it":true,"ao.it":true,"arezzo.it":true,"ar.it":true,"ascoli-piceno.it":true,"ascolipiceno.it":true,"ap.it":true,"asti.it":true,"at.it":true,"avellino.it":true,"av.it":true,"bari.it":true,"ba.it":true,"andria-barletta-trani.it":true,"andriabarlettatrani.it":true,"trani-barletta-andria.it":true,"tranibarlettaandria.it":true,"barletta-trani-andria.it":true,"barlettatraniandria.it":true,"andria-trani-barletta.it":true,"andriatranibarletta.it":true,"trani-andria-barletta.it":true,"traniandriabarletta.it":true,"bt.it":true,"belluno.it":true,"bl.it":true,"benevento.it":true,"bn.it":true,"bergamo.it":true,"bg.it":true,"biella.it":true,"bi.it":true,"bologna.it":true,"bo.it":true,"bolzano.it":true,"bozen.it":true,"balsan.it":true,"alto-adige.it":true,"altoadige.it":true,"suedtirol.it":true,"bz.it":true,"brescia.it":true,"bs.it":true,"brindisi.it":true,"br.it":true,"cagliari.it":true,"ca.it":true,"caltanissetta.it":true,"cl.it":true,"campobasso.it":true,"cb.it":true,"carboniaiglesias.it":true,"carbonia-iglesias.it":true,"iglesias-carbonia.it":true,"iglesiascarbonia.it":true,"ci.it":true,"caserta.it":true,"ce.it":true,"catania.it":true,"ct.it":true,"catanzaro.it":true,"cz.it":true,"chieti.it":true,"ch.it":true,"como.it":true,"co.it":true,"cosenza.it":true,"cs.it":true,"cremona.it":true,"cr.it":true,"crotone.it":true,"kr.it":true,"cuneo.it":true,"cn.it":true,"dell-ogliastra.it":true,"dellogliastra.it":true,"ogliastra.it":true,"og.it":true,"enna.it":true,"en.it":true,"ferrara.it":true,"fe.it":true,"fermo.it":true,"fm.it":true,"firenze.it":true,"florence.it":true,"fi.it":true,"foggia.it":true,"fg.it":true,"forli-cesena.it":true,"forlicesena.it":true,"cesena-forli.it":true,"cesenaforli.it":true,"fc.it":true,"frosinone.it":true,"fr.it":true,"genova.it":true,"genoa.it":true,"ge.it":true,"gorizia.it":true,"go.it":true,"grosseto.it":true,"gr.it":true,"imperia.it":true,"im.it":true,"isernia.it":true,"is.it":true,"laquila.it":true,"aquila.it":true,"aq.it":true,"la-spezia.it":true,"laspezia.it":true,"sp.it":true,"latina.it":true,"lt.it":true,"lecce.it":true,"le.it":true,"lecco.it":true,"lc.it":true,"livorno.it":true,"li.it":true,"lodi.it":true,"lo.it":true,"lucca.it":true,"lu.it":true,"macerata.it":true,"mc.it":true,"mantova.it":true,"mn.it":true,"massa-carrara.it":true,"massacarrara.it":true,"carrara-massa.it":true,"carraramassa.it":true,"ms.it":true,"matera.it":true,"mt.it":true,"medio-campidano.it":true,"mediocampidano.it":true,"campidano-medio.it":true,"campidanomedio.it":true,"vs.it":true,"messina.it":true,"me.it":true,"milano.it":true,"milan.it":true,"mi.it":true,"modena.it":true,"mo.it":true,"monza.it":true,"monza-brianza.it":true,"monzabrianza.it":true,"monzaebrianza.it":true,"monzaedellabrianza.it":true,"monza-e-della-brianza.it":true,"mb.it":true,"napoli.it":true,"naples.it":true,"na.it":true,"novara.it":true,"no.it":true,"nuoro.it":true,"nu.it":true,"oristano.it":true,"or.it":true,"padova.it":true,"padua.it":true,"pd.it":true,"palermo.it":true,"pa.it":true,"parma.it":true,"pr.it":true,"pavia.it":true,"pv.it":true,"perugia.it":true,"pg.it":true,"pescara.it":true,"pe.it":true,"pesaro-urbino.it":true,"pesarourbino.it":true,"urbino-pesaro.it":true,"urbinopesaro.it":true,"pu.it":true,"piacenza.it":true,"pc.it":true,"pisa.it":true,"pi.it":true,"pistoia.it":true,"pt.it":true,"pordenone.it":true,"pn.it":true,"potenza.it":true,"pz.it":true,"prato.it":true,"po.it":true,"ragusa.it":true,"rg.it":true,"ravenna.it":true,"ra.it":true,"reggio-calabria.it":true,"reggiocalabria.it":true,"rc.it":true,"reggio-emilia.it":true,"reggioemilia.it":true,"re.it":true,"rieti.it":true,"ri.it":true,"rimini.it":true,"rn.it":true,"roma.it":true,"rome.it":true,"rm.it":true,"rovigo.it":true,"ro.it":true,"salerno.it":true,"sa.it":true,"sassari.it":true,"ss.it":true,"savona.it":true,"sv.it":true,"siena.it":true,"si.it":true,"siracusa.it":true,"sr.it":true,"sondrio.it":true,"so.it":true,"taranto.it":true,"ta.it":true,"tempio-olbia.it":true,"tempioolbia.it":true,"olbia-tempio.it":true,"olbiatempio.it":true,"ot.it":true,"teramo.it":true,"te.it":true,"terni.it":true,"tr.it":true,"torino.it":true,"turin.it":true,"to.it":true,"trapani.it":true,"tp.it":true,"trento.it":true,"trentino.it":true,"tn.it":true,"treviso.it":true,"tv.it":true,"trieste.it":true,"ts.it":true,"udine.it":true,"ud.it":true,"varese.it":true,"va.it":true,"venezia.it":true,"venice.it":true,"ve.it":true,"verbania.it":true,"vb.it":true,"vercelli.it":true,"vc.it":true,"verona.it":true,"vr.it":true,"vibo-valentia.it":true,"vibovalentia.it":true,"vv.it":true,"vicenza.it":true,"vi.it":true,"viterbo.it":true,"vt.it":true,"je":true,"co.je":true,"org.je":true,"net.je":true,"sch.je":true,"gov.je":true,"*.jm":true,"jo":true,"com.jo":true,"org.jo":true,"net.jo":true,"edu.jo":true,"sch.jo":true,"gov.jo":true,"mil.jo":true,"name.jo":true,"jobs":true,"jp":true,"ac.jp":true,"ad.jp":true,"co.jp":true,"ed.jp":true,"go.jp":true,"gr.jp":true,"lg.jp":true,"ne.jp":true,"or.jp":true,"*.aichi.jp":true,"*.akita.jp":true,"*.aomori.jp":true,"*.chiba.jp":true,"*.ehime.jp":true,"*.fukui.jp":true,"*.fukuoka.jp":true,"*.fukushima.jp":true,"*.gifu.jp":true,"*.gunma.jp":true,"*.hiroshima.jp":true,"*.hokkaido.jp":true,"*.hyogo.jp":true,"*.ibaraki.jp":true,"*.ishikawa.jp":true,"*.iwate.jp":true,"*.kagawa.jp":true,"*.kagoshima.jp":true,"*.kanagawa.jp":true,"*.kawasaki.jp":true,"*.kitakyushu.jp":true,"*.kobe.jp":true,"*.kochi.jp":true,"*.kumamoto.jp":true,"*.kyoto.jp":true,"*.mie.jp":true,"*.miyagi.jp":true,"*.miyazaki.jp":true,"*.nagano.jp":true,"*.nagasaki.jp":true,"*.nagoya.jp":true,"*.nara.jp":true,"*.niigata.jp":true,"*.oita.jp":true,"*.okayama.jp":true,"*.okinawa.jp":true,"*.osaka.jp":true,"*.saga.jp":true,"*.saitama.jp":true,"*.sapporo.jp":true,"*.sendai.jp":true,"*.shiga.jp":true,"*.shimane.jp":true,"*.shizuoka.jp":true,"*.tochigi.jp":true,"*.tokushima.jp":true,"*.tokyo.jp":true,"*.tottori.jp":true,"*.toyama.jp":true,"*.wakayama.jp":true,"*.yamagata.jp":true,"*.yamaguchi.jp":true,"*.yamanashi.jp":true,"*.yokohama.jp":true,"metro.tokyo.jp":false,"pref.aichi.jp":false,"pref.akita.jp":false,"pref.aomori.jp":false,"pref.chiba.jp":false,"pref.ehime.jp":false,"pref.fukui.jp":false,"pref.fukuoka.jp":false,"pref.fukushima.jp":false,"pref.gifu.jp":false,"pref.gunma.jp":false,"pref.hiroshima.jp":false,"pref.hokkaido.jp":false,"pref.hyogo.jp":false,"pref.ibaraki.jp":false,"pref.ishikawa.jp":false,"pref.iwate.jp":false,"pref.kagawa.jp":false,"pref.kagoshima.jp":false,"pref.kanagawa.jp":false,"pref.kochi.jp":false,"pref.kumamoto.jp":false,"pref.kyoto.jp":false,"pref.mie.jp":false,"pref.miyagi.jp":false,"pref.miyazaki.jp":false,"pref.nagano.jp":false,"pref.nagasaki.jp":false,"pref.nara.jp":false,"pref.niigata.jp":false,"pref.oita.jp":false,"pref.okayama.jp":false,"pref.okinawa.jp":false,"pref.osaka.jp":false,"pref.saga.jp":false,"pref.saitama.jp":false,"pref.shiga.jp":false,"pref.shimane.jp":false,"pref.shizuoka.jp":false,"pref.tochigi.jp":false,"pref.tokushima.jp":false,"pref.tottori.jp":false,"pref.toyama.jp":false,"pref.wakayama.jp":false,"pref.yamagata.jp":false,"pref.yamaguchi.jp":false,"pref.yamanashi.jp":false,"city.chiba.jp":false,"city.fukuoka.jp":false,"city.hiroshima.jp":false,"city.kawasaki.jp":false,"city.kitakyushu.jp":false,"city.kobe.jp":false,"city.kyoto.jp":false,"city.nagoya.jp":false,"city.niigata.jp":false,"city.okayama.jp":false,"city.osaka.jp":false,"city.saitama.jp":false,"city.sapporo.jp":false,"city.sendai.jp":false,"city.shizuoka.jp":false,"city.yokohama.jp":false,"*.ke":true,"kg":true,"org.kg":true,"net.kg":true,"com.kg":true,"edu.kg":true,"gov.kg":true,"mil.kg":true,"*.kh":true,"ki":true,"edu.ki":true,"biz.ki":true,"net.ki":true,"org.ki":true,"gov.ki":true,"info.ki":true,"com.ki":true,"km":true,"org.km":true,"nom.km":true,"gov.km":true,"prd.km":true,"tm.km":true,"edu.km":true,"mil.km":true,"ass.km":true,"com.km":true,"coop.km":true,"asso.km":true,"presse.km":true,"medecin.km":true,"notaires.km":true,"pharmaciens.km":true,"veterinaire.km":true,"gouv.km":true,"kn":true,"net.kn":true,"org.kn":true,"edu.kn":true,"gov.kn":true,"com.kp":true,"edu.kp":true,"gov.kp":true,"org.kp":true,"rep.kp":true,"tra.kp":true,"kr":true,"ac.kr":true,"co.kr":true,"es.kr":true,"go.kr":true,"hs.kr":true,"kg.kr":true,"mil.kr":true,"ms.kr":true,"ne.kr":true,"or.kr":true,"pe.kr":true,"re.kr":true,"sc.kr":true,"busan.kr":true,"chungbuk.kr":true,"chungnam.kr":true,"daegu.kr":true,"daejeon.kr":true,"gangwon.kr":true,"gwangju.kr":true,"gyeongbuk.kr":true,"gyeonggi.kr":true,"gyeongnam.kr":true,"incheon.kr":true,"jeju.kr":true,"jeonbuk.kr":true,"jeonnam.kr":true,"seoul.kr":true,"ulsan.kr":true,"*.kw":true,"ky":true,"edu.ky":true,"gov.ky":true,"com.ky":true,"org.ky":true,"net.ky":true,"kz":true,"org.kz":true,"edu.kz":true,"net.kz":true,"gov.kz":true,"mil.kz":true,"com.kz":true,"la":true,"int.la":true,"net.la":true,"info.la":true,"edu.la":true,"gov.la":true,"per.la":true,"com.la":true,"org.la":true,"com.lb":true,"edu.lb":true,"gov.lb":true,"net.lb":true,"org.lb":true,"lc":true,"com.lc":true,"net.lc":true,"co.lc":true,"org.lc":true,"edu.lc":true,"gov.lc":true,"li":true,"lk":true,"gov.lk":true,"sch.lk":true,"net.lk":true,"int.lk":true,"com.lk":true,"org.lk":true,"edu.lk":true,"ngo.lk":true,"soc.lk":true,"web.lk":true,"ltd.lk":true,"assn.lk":true,"grp.lk":true,"hotel.lk":true,"com.lr":true,"edu.lr":true,"gov.lr":true,"org.lr":true,"net.lr":true,"ls":true,"co.ls":true,"org.ls":true,"lt":true,"gov.lt":true,"lu":true,"lv":true,"com.lv":true,"edu.lv":true,"gov.lv":true,"org.lv":true,"mil.lv":true,"id.lv":true,"net.lv":true,"asn.lv":true,"conf.lv":true,"ly":true,"com.ly":true,"net.ly":true,"gov.ly":true,"plc.ly":true,"edu.ly":true,"sch.ly":true,"med.ly":true,"org.ly":true,"id.ly":true,"ma":true,"co.ma":true,"net.ma":true,"gov.ma":true,"org.ma":true,"ac.ma":true,"press.ma":true,"mc":true,"tm.mc":true,"asso.mc":true,"md":true,"me":true,"co.me":true,"net.me":true,"org.me":true,"edu.me":true,"ac.me":true,"gov.me":true,"its.me":true,"priv.me":true,"mg":true,"org.mg":true,"nom.mg":true,"gov.mg":true,"prd.mg":true,"tm.mg":true,"edu.mg":true,"mil.mg":true,"com.mg":true,"mh":true,"mil":true,"mk":true,"com.mk":true,"org.mk":true,"net.mk":true,"edu.mk":true,"gov.mk":true,"inf.mk":true,"name.mk":true,"ml":true,"com.ml":true,"edu.ml":true,"gouv.ml":true,"gov.ml":true,"net.ml":true,"org.ml":true,"presse.ml":true,"*.mm":true,"mn":true,"gov.mn":true,"edu.mn":true,"org.mn":true,"mo":true,"com.mo":true,"net.mo":true,"org.mo":true,"edu.mo":true,"gov.mo":true,"mobi":true,"mp":true,"mq":true,"mr":true,"gov.mr":true,"ms":true,"*.mt":true,"mu":true,"com.mu":true,"net.mu":true,"org.mu":true,"gov.mu":true,"ac.mu":true,"co.mu":true,"or.mu":true,"museum":true,"academy.museum":true,"agriculture.museum":true,"air.museum":true,"airguard.museum":true,"alabama.museum":true,"alaska.museum":true,"amber.museum":true,"ambulance.museum":true,"american.museum":true,"americana.museum":true,"americanantiques.museum":true,"americanart.museum":true,"amsterdam.museum":true,"and.museum":true,"annefrank.museum":true,"anthro.museum":true,"anthropology.museum":true,"antiques.museum":true,"aquarium.museum":true,"arboretum.museum":true,"archaeological.museum":true,"archaeology.museum":true,"architecture.museum":true,"art.museum":true,"artanddesign.museum":true,"artcenter.museum":true,"artdeco.museum":true,"arteducation.museum":true,"artgallery.museum":true,"arts.museum":true,"artsandcrafts.museum":true,"asmatart.museum":true,"assassination.museum":true,"assisi.museum":true,"association.museum":true,"astronomy.museum":true,"atlanta.museum":true,"austin.museum":true,"australia.museum":true,"automotive.museum":true,"aviation.museum":true,"axis.museum":true,"badajoz.museum":true,"baghdad.museum":true,"bahn.museum":true,"bale.museum":true,"baltimore.museum":true,"barcelona.museum":true,"baseball.museum":true,"basel.museum":true,"baths.museum":true,"bauern.museum":true,"beauxarts.museum":true,"beeldengeluid.museum":true,"bellevue.museum":true,"bergbau.museum":true,"berkeley.museum":true,"berlin.museum":true,"bern.museum":true,"bible.museum":true,"bilbao.museum":true,"bill.museum":true,"birdart.museum":true,"birthplace.museum":true,"bonn.museum":true,"boston.museum":true,"botanical.museum":true,"botanicalgarden.museum":true,"botanicgarden.museum":true,"botany.museum":true,"brandywinevalley.museum":true,"brasil.museum":true,"bristol.museum":true,"british.museum":true,"britishcolumbia.museum":true,"broadcast.museum":true,"brunel.museum":true,"brussel.museum":true,"brussels.museum":true,"bruxelles.museum":true,"building.museum":true,"burghof.museum":true,"bus.museum":true,"bushey.museum":true,"cadaques.museum":true,"california.museum":true,"cambridge.museum":true,"can.museum":true,"canada.museum":true,"capebreton.museum":true,"carrier.museum":true,"cartoonart.museum":true,"casadelamoneda.museum":true,"castle.museum":true,"castres.museum":true,"celtic.museum":true,"center.museum":true,"chattanooga.museum":true,"cheltenham.museum":true,"chesapeakebay.museum":true,"chicago.museum":true,"children.museum":true,"childrens.museum":true,"childrensgarden.museum":true,"chiropractic.museum":true,"chocolate.museum":true,"christiansburg.museum":true,"cincinnati.museum":true,"cinema.museum":true,"circus.museum":true,"civilisation.museum":true,"civilization.museum":true,"civilwar.museum":true,"clinton.museum":true,"clock.museum":true,"coal.museum":true,"coastaldefence.museum":true,"cody.museum":true,"coldwar.museum":true,"collection.museum":true,"colonialwilliamsburg.museum":true,"coloradoplateau.museum":true,"columbia.museum":true,"columbus.museum":true,"communication.museum":true,"communications.museum":true,"community.museum":true,"computer.museum":true,"computerhistory.museum":true,"xn--comunicaes-v6a2o.museum":true,"contemporary.museum":true,"contemporaryart.museum":true,"convent.museum":true,"copenhagen.museum":true,"corporation.museum":true,"xn--correios-e-telecomunicaes-ghc29a.museum":true,"corvette.museum":true,"costume.museum":true,"countryestate.museum":true,"county.museum":true,"crafts.museum":true,"cranbrook.museum":true,"creation.museum":true,"cultural.museum":true,"culturalcenter.museum":true,"culture.museum":true,"cyber.museum":true,"cymru.museum":true,"dali.museum":true,"dallas.museum":true,"database.museum":true,"ddr.museum":true,"decorativearts.museum":true,"delaware.museum":true,"delmenhorst.museum":true,"denmark.museum":true,"depot.museum":true,"design.museum":true,"detroit.museum":true,"dinosaur.museum":true,"discovery.museum":true,"dolls.museum":true,"donostia.museum":true,"durham.museum":true,"eastafrica.museum":true,"eastcoast.museum":true,"education.museum":true,"educational.museum":true,"egyptian.museum":true,"eisenbahn.museum":true,"elburg.museum":true,"elvendrell.museum":true,"embroidery.museum":true,"encyclopedic.museum":true,"england.museum":true,"entomology.museum":true,"environment.museum":true,"environmentalconservation.museum":true,"epilepsy.museum":true,"essex.museum":true,"estate.museum":true,"ethnology.museum":true,"exeter.museum":true,"exhibition.museum":true,"family.museum":true,"farm.museum":true,"farmequipment.museum":true,"farmers.museum":true,"farmstead.museum":true,"field.museum":true,"figueres.museum":true,"filatelia.museum":true,"film.museum":true,"fineart.museum":true,"finearts.museum":true,"finland.museum":true,"flanders.museum":true,"florida.museum":true,"force.museum":true,"fortmissoula.museum":true,"fortworth.museum":true,"foundation.museum":true,"francaise.museum":true,"frankfurt.museum":true,"franziskaner.museum":true,"freemasonry.museum":true,"freiburg.museum":true,"fribourg.museum":true,"frog.museum":true,"fundacio.museum":true,"furniture.museum":true,"gallery.museum":true,"garden.museum":true,"gateway.museum":true,"geelvinck.museum":true,"gemological.museum":true,"geology.museum":true,"georgia.museum":true,"giessen.museum":true,"glas.museum":true,"glass.museum":true,"gorge.museum":true,"grandrapids.museum":true,"graz.museum":true,"guernsey.museum":true,"halloffame.museum":true,"hamburg.museum":true,"handson.museum":true,"harvestcelebration.museum":true,"hawaii.museum":true,"health.museum":true,"heimatunduhren.museum":true,"hellas.museum":true,"helsinki.museum":true,"hembygdsforbund.museum":true,"heritage.museum":true,"histoire.museum":true,"historical.museum":true,"historicalsociety.museum":true,"historichouses.museum":true,"historisch.museum":true,"historisches.museum":true,"history.museum":true,"historyofscience.museum":true,"horology.museum":true,"house.museum":true,"humanities.museum":true,"illustration.museum":true,"imageandsound.museum":true,"indian.museum":true,"indiana.museum":true,"indianapolis.museum":true,"indianmarket.museum":true,"intelligence.museum":true,"interactive.museum":true,"iraq.museum":true,"iron.museum":true,"isleofman.museum":true,"jamison.museum":true,"jefferson.museum":true,"jerusalem.museum":true,"jewelry.museum":true,"jewish.museum":true,"jewishart.museum":true,"jfk.museum":true,"journalism.museum":true,"judaica.museum":true,"judygarland.museum":true,"juedisches.museum":true,"juif.museum":true,"karate.museum":true,"karikatur.museum":true,"kids.museum":true,"koebenhavn.museum":true,"koeln.museum":true,"kunst.museum":true,"kunstsammlung.museum":true,"kunstunddesign.museum":true,"labor.museum":true,"labour.museum":true,"lajolla.museum":true,"lancashire.museum":true,"landes.museum":true,"lans.museum":true,"xn--lns-qla.museum":true,"larsson.museum":true,"lewismiller.museum":true,"lincoln.museum":true,"linz.museum":true,"living.museum":true,"livinghistory.museum":true,"localhistory.museum":true,"london.museum":true,"losangeles.museum":true,"louvre.museum":true,"loyalist.museum":true,"lucerne.museum":true,"luxembourg.museum":true,"luzern.museum":true,"mad.museum":true,"madrid.museum":true,"mallorca.museum":true,"manchester.museum":true,"mansion.museum":true,"mansions.museum":true,"manx.museum":true,"marburg.museum":true,"maritime.museum":true,"maritimo.museum":true,"maryland.museum":true,"marylhurst.museum":true,"media.museum":true,"medical.museum":true,"medizinhistorisches.museum":true,"meeres.museum":true,"memorial.museum":true,"mesaverde.museum":true,"michigan.museum":true,"midatlantic.museum":true,"military.museum":true,"mill.museum":true,"miners.museum":true,"mining.museum":true,"minnesota.museum":true,"missile.museum":true,"missoula.museum":true,"modern.museum":true,"moma.museum":true,"money.museum":true,"monmouth.museum":true,"monticello.museum":true,"montreal.museum":true,"moscow.museum":true,"motorcycle.museum":true,"muenchen.museum":true,"muenster.museum":true,"mulhouse.museum":true,"muncie.museum":true,"museet.museum":true,"museumcenter.museum":true,"museumvereniging.museum":true,"music.museum":true,"national.museum":true,"nationalfirearms.museum":true,"nationalheritage.museum":true,"nativeamerican.museum":true,"naturalhistory.museum":true,"naturalhistorymuseum.museum":true,"naturalsciences.museum":true,"nature.museum":true,"naturhistorisches.museum":true,"natuurwetenschappen.museum":true,"naumburg.museum":true,"naval.museum":true,"nebraska.museum":true,"neues.museum":true,"newhampshire.museum":true,"newjersey.museum":true,"newmexico.museum":true,"newport.museum":true,"newspaper.museum":true,"newyork.museum":true,"niepce.museum":true,"norfolk.museum":true,"north.museum":true,"nrw.museum":true,"nuernberg.museum":true,"nuremberg.museum":true,"nyc.museum":true,"nyny.museum":true,"oceanographic.museum":true,"oceanographique.museum":true,"omaha.museum":true,"online.museum":true,"ontario.museum":true,"openair.museum":true,"oregon.museum":true,"oregontrail.museum":true,"otago.museum":true,"oxford.museum":true,"pacific.museum":true,"paderborn.museum":true,"palace.museum":true,"paleo.museum":true,"palmsprings.museum":true,"panama.museum":true,"paris.museum":true,"pasadena.museum":true,"pharmacy.museum":true,"philadelphia.museum":true,"philadelphiaarea.museum":true,"philately.museum":true,"phoenix.museum":true,"photography.museum":true,"pilots.museum":true,"pittsburgh.museum":true,"planetarium.museum":true,"plantation.museum":true,"plants.museum":true,"plaza.museum":true,"portal.museum":true,"portland.museum":true,"portlligat.museum":true,"posts-and-telecommunications.museum":true,"preservation.museum":true,"presidio.museum":true,"press.museum":true,"project.museum":true,"public.museum":true,"pubol.museum":true,"quebec.museum":true,"railroad.museum":true,"railway.museum":true,"research.museum":true,"resistance.museum":true,"riodejaneiro.museum":true,"rochester.museum":true,"rockart.museum":true,"roma.museum":true,"russia.museum":true,"saintlouis.museum":true,"salem.museum":true,"salvadordali.museum":true,"salzburg.museum":true,"sandiego.museum":true,"sanfrancisco.museum":true,"santabarbara.museum":true,"santacruz.museum":true,"santafe.museum":true,"saskatchewan.museum":true,"satx.museum":true,"savannahga.museum":true,"schlesisches.museum":true,"schoenbrunn.museum":true,"schokoladen.museum":true,"school.museum":true,"schweiz.museum":true,"science.museum":true,"scienceandhistory.museum":true,"scienceandindustry.museum":true,"sciencecenter.museum":true,"sciencecenters.museum":true,"science-fiction.museum":true,"sciencehistory.museum":true,"sciences.museum":true,"sciencesnaturelles.museum":true,"scotland.museum":true,"seaport.museum":true,"settlement.museum":true,"settlers.museum":true,"shell.museum":true,"sherbrooke.museum":true,"sibenik.museum":true,"silk.museum":true,"ski.museum":true,"skole.museum":true,"society.museum":true,"sologne.museum":true,"soundandvision.museum":true,"southcarolina.museum":true,"southwest.museum":true,"space.museum":true,"spy.museum":true,"square.museum":true,"stadt.museum":true,"stalbans.museum":true,"starnberg.museum":true,"state.museum":true,"stateofdelaware.museum":true,"station.museum":true,"steam.museum":true,"steiermark.museum":true,"stjohn.museum":true,"stockholm.museum":true,"stpetersburg.museum":true,"stuttgart.museum":true,"suisse.museum":true,"surgeonshall.museum":true,"surrey.museum":true,"svizzera.museum":true,"sweden.museum":true,"sydney.museum":true,"tank.museum":true,"tcm.museum":true,"technology.museum":true,"telekommunikation.museum":true,"television.museum":true,"texas.museum":true,"textile.museum":true,"theater.museum":true,"time.museum":true,"timekeeping.museum":true,"topology.museum":true,"torino.museum":true,"touch.museum":true,"town.museum":true,"transport.museum":true,"tree.museum":true,"trolley.museum":true,"trust.museum":true,"trustee.museum":true,"uhren.museum":true,"ulm.museum":true,"undersea.museum":true,"university.museum":true,"usa.museum":true,"usantiques.museum":true,"usarts.museum":true,"uscountryestate.museum":true,"usculture.museum":true,"usdecorativearts.museum":true,"usgarden.museum":true,"ushistory.museum":true,"ushuaia.museum":true,"uslivinghistory.museum":true,"utah.museum":true,"uvic.museum":true,"valley.museum":true,"vantaa.museum":true,"versailles.museum":true,"viking.museum":true,"village.museum":true,"virginia.museum":true,"virtual.museum":true,"virtuel.museum":true,"vlaanderen.museum":true,"volkenkunde.museum":true,"wales.museum":true,"wallonie.museum":true,"war.museum":true,"washingtondc.museum":true,"watchandclock.museum":true,"watch-and-clock.museum":true,"western.museum":true,"westfalen.museum":true,"whaling.museum":true,"wildlife.museum":true,"williamsburg.museum":true,"windmill.museum":true,"workshop.museum":true,"york.museum":true,"yorkshire.museum":true,"yosemite.museum":true,"youth.museum":true,"zoological.museum":true,"zoology.museum":true,"xn--9dbhblg6di.museum":true,"xn--h1aegh.museum":true,"mv":true,"aero.mv":true,"biz.mv":true,"com.mv":true,"coop.mv":true,"edu.mv":true,"gov.mv":true,"info.mv":true,"int.mv":true,"mil.mv":true,"museum.mv":true,"name.mv":true,"net.mv":true,"org.mv":true,"pro.mv":true,"mw":true,"ac.mw":true,"biz.mw":true,"co.mw":true,"com.mw":true,"coop.mw":true,"edu.mw":true,"gov.mw":true,"int.mw":true,"museum.mw":true,"net.mw":true,"org.mw":true,"mx":true,"com.mx":true,"org.mx":true,"gob.mx":true,"edu.mx":true,"net.mx":true,"my":true,"com.my":true,"net.my":true,"org.my":true,"gov.my":true,"edu.my":true,"mil.my":true,"name.my":true,"*.mz":true,"na":true,"info.na":true,"pro.na":true,"name.na":true,"school.na":true,"or.na":true,"dr.na":true,"us.na":true,"mx.na":true,"ca.na":true,"in.na":true,"cc.na":true,"tv.na":true,"ws.na":true,"mobi.na":true,"co.na":true,"com.na":true,"org.na":true,"name":true,"nc":true,"asso.nc":true,"ne":true,"net":true,"nf":true,"com.nf":true,"net.nf":true,"per.nf":true,"rec.nf":true,"web.nf":true,"arts.nf":true,"firm.nf":true,"info.nf":true,"other.nf":true,"store.nf":true,"ac.ng":true,"com.ng":true,"edu.ng":true,"gov.ng":true,"net.ng":true,"org.ng":true,"*.ni":true,"nl":true,"bv.nl":true,"no":true,"fhs.no":true,"vgs.no":true,"fylkesbibl.no":true,"folkebibl.no":true,"museum.no":true,"idrett.no":true,"priv.no":true,"mil.no":true,"stat.no":true,"dep.no":true,"kommune.no":true,"herad.no":true,"aa.no":true,"ah.no":true,"bu.no":true,"fm.no":true,"hl.no":true,"hm.no":true,"jan-mayen.no":true,"mr.no":true,"nl.no":true,"nt.no":true,"of.no":true,"ol.no":true,"oslo.no":true,"rl.no":true,"sf.no":true,"st.no":true,"svalbard.no":true,"tm.no":true,"tr.no":true,"va.no":true,"vf.no":true,"gs.aa.no":true,"gs.ah.no":true,"gs.bu.no":true,"gs.fm.no":true,"gs.hl.no":true,"gs.hm.no":true,"gs.jan-mayen.no":true,"gs.mr.no":true,"gs.nl.no":true,"gs.nt.no":true,"gs.of.no":true,"gs.ol.no":true,"gs.oslo.no":true,"gs.rl.no":true,"gs.sf.no":true,"gs.st.no":true,"gs.svalbard.no":true,"gs.tm.no":true,"gs.tr.no":true,"gs.va.no":true,"gs.vf.no":true,"akrehamn.no":true,"xn--krehamn-dxa.no":true,"algard.no":true,"xn--lgrd-poac.no":true,"arna.no":true,"brumunddal.no":true,"bryne.no":true,"bronnoysund.no":true,"xn--brnnysund-m8ac.no":true,"drobak.no":true,"xn--drbak-wua.no":true,"egersund.no":true,"fetsund.no":true,"floro.no":true,"xn--flor-jra.no":true,"fredrikstad.no":true,"hokksund.no":true,"honefoss.no":true,"xn--hnefoss-q1a.no":true,"jessheim.no":true,"jorpeland.no":true,"xn--jrpeland-54a.no":true,"kirkenes.no":true,"kopervik.no":true,"krokstadelva.no":true,"langevag.no":true,"xn--langevg-jxa.no":true,"leirvik.no":true,"mjondalen.no":true,"xn--mjndalen-64a.no":true,"mo-i-rana.no":true,"mosjoen.no":true,"xn--mosjen-eya.no":true,"nesoddtangen.no":true,"orkanger.no":true,"osoyro.no":true,"xn--osyro-wua.no":true,"raholt.no":true,"xn--rholt-mra.no":true,"sandnessjoen.no":true,"xn--sandnessjen-ogb.no":true,"skedsmokorset.no":true,"slattum.no":true,"spjelkavik.no":true,"stathelle.no":true,"stavern.no":true,"stjordalshalsen.no":true,"xn--stjrdalshalsen-sqb.no":true,"tananger.no":true,"tranby.no":true,"vossevangen.no":true,"afjord.no":true,"xn--fjord-lra.no":true,"agdenes.no":true,"al.no":true,"xn--l-1fa.no":true,"alesund.no":true,"xn--lesund-hua.no":true,"alstahaug.no":true,"alta.no":true,"xn--lt-liac.no":true,"alaheadju.no":true,"xn--laheadju-7ya.no":true,"alvdal.no":true,"amli.no":true,"xn--mli-tla.no":true,"amot.no":true,"xn--mot-tla.no":true,"andebu.no":true,"andoy.no":true,"xn--andy-ira.no":true,"andasuolo.no":true,"ardal.no":true,"xn--rdal-poa.no":true,"aremark.no":true,"arendal.no":true,"xn--s-1fa.no":true,"aseral.no":true,"xn--seral-lra.no":true,"asker.no":true,"askim.no":true,"askvoll.no":true,"askoy.no":true,"xn--asky-ira.no":true,"asnes.no":true,"xn--snes-poa.no":true,"audnedaln.no":true,"aukra.no":true,"aure.no":true,"aurland.no":true,"aurskog-holand.no":true,"xn--aurskog-hland-jnb.no":true,"austevoll.no":true,"austrheim.no":true,"averoy.no":true,"xn--avery-yua.no":true,"balestrand.no":true,"ballangen.no":true,"balat.no":true,"xn--blt-elab.no":true,"balsfjord.no":true,"bahccavuotna.no":true,"xn--bhccavuotna-k7a.no":true,"bamble.no":true,"bardu.no":true,"beardu.no":true,"beiarn.no":true,"bajddar.no":true,"xn--bjddar-pta.no":true,"baidar.no":true,"xn--bidr-5nac.no":true,"berg.no":true,"bergen.no":true,"berlevag.no":true,"xn--berlevg-jxa.no":true,"bearalvahki.no":true,"xn--bearalvhki-y4a.no":true,"bindal.no":true,"birkenes.no":true,"bjarkoy.no":true,"xn--bjarky-fya.no":true,"bjerkreim.no":true,"bjugn.no":true,"bodo.no":true,"xn--bod-2na.no":true,"badaddja.no":true,"xn--bdddj-mrabd.no":true,"budejju.no":true,"bokn.no":true,"bremanger.no":true,"bronnoy.no":true,"xn--brnny-wuac.no":true,"bygland.no":true,"bykle.no":true,"barum.no":true,"xn--brum-voa.no":true,"bo.telemark.no":true,"xn--b-5ga.telemark.no":true,"bo.nordland.no":true,"xn--b-5ga.nordland.no":true,"bievat.no":true,"xn--bievt-0qa.no":true,"bomlo.no":true,"xn--bmlo-gra.no":true,"batsfjord.no":true,"xn--btsfjord-9za.no":true,"bahcavuotna.no":true,"xn--bhcavuotna-s4a.no":true,"dovre.no":true,"drammen.no":true,"drangedal.no":true,"dyroy.no":true,"xn--dyry-ira.no":true,"donna.no":true,"xn--dnna-gra.no":true,"eid.no":true,"eidfjord.no":true,"eidsberg.no":true,"eidskog.no":true,"eidsvoll.no":true,"eigersund.no":true,"elverum.no":true,"enebakk.no":true,"engerdal.no":true,"etne.no":true,"etnedal.no":true,"evenes.no":true,"evenassi.no":true,"xn--eveni-0qa01ga.no":true,"evje-og-hornnes.no":true,"farsund.no":true,"fauske.no":true,"fuossko.no":true,"fuoisku.no":true,"fedje.no":true,"fet.no":true,"finnoy.no":true,"xn--finny-yua.no":true,"fitjar.no":true,"fjaler.no":true,"fjell.no":true,"flakstad.no":true,"flatanger.no":true,"flekkefjord.no":true,"flesberg.no":true,"flora.no":true,"fla.no":true,"xn--fl-zia.no":true,"folldal.no":true,"forsand.no":true,"fosnes.no":true,"frei.no":true,"frogn.no":true,"froland.no":true,"frosta.no":true,"frana.no":true,"xn--frna-woa.no":true,"froya.no":true,"xn--frya-hra.no":true,"fusa.no":true,"fyresdal.no":true,"forde.no":true,"xn--frde-gra.no":true,"gamvik.no":true,"gangaviika.no":true,"xn--ggaviika-8ya47h.no":true,"gaular.no":true,"gausdal.no":true,"gildeskal.no":true,"xn--gildeskl-g0a.no":true,"giske.no":true,"gjemnes.no":true,"gjerdrum.no":true,"gjerstad.no":true,"gjesdal.no":true,"gjovik.no":true,"xn--gjvik-wua.no":true,"gloppen.no":true,"gol.no":true,"gran.no":true,"grane.no":true,"granvin.no":true,"gratangen.no":true,"grimstad.no":true,"grong.no":true,"kraanghke.no":true,"xn--kranghke-b0a.no":true,"grue.no":true,"gulen.no":true,"hadsel.no":true,"halden.no":true,"halsa.no":true,"hamar.no":true,"hamaroy.no":true,"habmer.no":true,"xn--hbmer-xqa.no":true,"hapmir.no":true,"xn--hpmir-xqa.no":true,"hammerfest.no":true,"hammarfeasta.no":true,"xn--hmmrfeasta-s4ac.no":true,"haram.no":true,"hareid.no":true,"harstad.no":true,"hasvik.no":true,"aknoluokta.no":true,"xn--koluokta-7ya57h.no":true,"hattfjelldal.no":true,"aarborte.no":true,"haugesund.no":true,"hemne.no":true,"hemnes.no":true,"hemsedal.no":true,"heroy.more-og-romsdal.no":true,"xn--hery-ira.xn--mre-og-romsdal-qqb.no":true,"heroy.nordland.no":true,"xn--hery-ira.nordland.no":true,"hitra.no":true,"hjartdal.no":true,"hjelmeland.no":true,"hobol.no":true,"xn--hobl-ira.no":true,"hof.no":true,"hol.no":true,"hole.no":true,"holmestrand.no":true,"holtalen.no":true,"xn--holtlen-hxa.no":true,"hornindal.no":true,"horten.no":true,"hurdal.no":true,"hurum.no":true,"hvaler.no":true,"hyllestad.no":true,"hagebostad.no":true,"xn--hgebostad-g3a.no":true,"hoyanger.no":true,"xn--hyanger-q1a.no":true,"hoylandet.no":true,"xn--hylandet-54a.no":true,"ha.no":true,"xn--h-2fa.no":true,"ibestad.no":true,"inderoy.no":true,"xn--indery-fya.no":true,"iveland.no":true,"jevnaker.no":true,"jondal.no":true,"jolster.no":true,"xn--jlster-bya.no":true,"karasjok.no":true,"karasjohka.no":true,"xn--krjohka-hwab49j.no":true,"karlsoy.no":true,"galsa.no":true,"xn--gls-elac.no":true,"karmoy.no":true,"xn--karmy-yua.no":true,"kautokeino.no":true,"guovdageaidnu.no":true,"klepp.no":true,"klabu.no":true,"xn--klbu-woa.no":true,"kongsberg.no":true,"kongsvinger.no":true,"kragero.no":true,"xn--krager-gya.no":true,"kristiansand.no":true,"kristiansund.no":true,"krodsherad.no":true,"xn--krdsherad-m8a.no":true,"kvalsund.no":true,"rahkkeravju.no":true,"xn--rhkkervju-01af.no":true,"kvam.no":true,"kvinesdal.no":true,"kvinnherad.no":true,"kviteseid.no":true,"kvitsoy.no":true,"xn--kvitsy-fya.no":true,"kvafjord.no":true,"xn--kvfjord-nxa.no":true,"giehtavuoatna.no":true,"kvanangen.no":true,"xn--kvnangen-k0a.no":true,"navuotna.no":true,"xn--nvuotna-hwa.no":true,"kafjord.no":true,"xn--kfjord-iua.no":true,"gaivuotna.no":true,"xn--givuotna-8ya.no":true,"larvik.no":true,"lavangen.no":true,"lavagis.no":true,"loabat.no":true,"xn--loabt-0qa.no":true,"lebesby.no":true,"davvesiida.no":true,"leikanger.no":true,"leirfjord.no":true,"leka.no":true,"leksvik.no":true,"lenvik.no":true,"leangaviika.no":true,"xn--leagaviika-52b.no":true,"lesja.no":true,"levanger.no":true,"lier.no":true,"lierne.no":true,"lillehammer.no":true,"lillesand.no":true,"lindesnes.no":true,"lindas.no":true,"xn--linds-pra.no":true,"lom.no":true,"loppa.no":true,"lahppi.no":true,"xn--lhppi-xqa.no":true,"lund.no":true,"lunner.no":true,"luroy.no":true,"xn--lury-ira.no":true,"luster.no":true,"lyngdal.no":true,"lyngen.no":true,"ivgu.no":true,"lardal.no":true,"lerdal.no":true,"xn--lrdal-sra.no":true,"lodingen.no":true,"xn--ldingen-q1a.no":true,"lorenskog.no":true,"xn--lrenskog-54a.no":true,"loten.no":true,"xn--lten-gra.no":true,"malvik.no":true,"masoy.no":true,"xn--msy-ula0h.no":true,"muosat.no":true,"xn--muost-0qa.no":true,"mandal.no":true,"marker.no":true,"marnardal.no":true,"masfjorden.no":true,"meland.no":true,"meldal.no":true,"melhus.no":true,"meloy.no":true,"xn--mely-ira.no":true,"meraker.no":true,"xn--merker-kua.no":true,"moareke.no":true,"xn--moreke-jua.no":true,"midsund.no":true,"midtre-gauldal.no":true,"modalen.no":true,"modum.no":true,"molde.no":true,"moskenes.no":true,"moss.no":true,"mosvik.no":true,"malselv.no":true,"xn--mlselv-iua.no":true,"malatvuopmi.no":true,"xn--mlatvuopmi-s4a.no":true,"namdalseid.no":true,"aejrie.no":true,"namsos.no":true,"namsskogan.no":true,"naamesjevuemie.no":true,"xn--nmesjevuemie-tcba.no":true,"laakesvuemie.no":true,"nannestad.no":true,"narvik.no":true,"narviika.no":true,"naustdal.no":true,"nedre-eiker.no":true,"nes.akershus.no":true,"nes.buskerud.no":true,"nesna.no":true,"nesodden.no":true,"nesseby.no":true,"unjarga.no":true,"xn--unjrga-rta.no":true,"nesset.no":true,"nissedal.no":true,"nittedal.no":true,"nord-aurdal.no":true,"nord-fron.no":true,"nord-odal.no":true,"norddal.no":true,"nordkapp.no":true,"davvenjarga.no":true,"xn--davvenjrga-y4a.no":true,"nordre-land.no":true,"nordreisa.no":true,"raisa.no":true,"xn--risa-5na.no":true,"nore-og-uvdal.no":true,"notodden.no":true,"naroy.no":true,"xn--nry-yla5g.no":true,"notteroy.no":true,"xn--nttery-byae.no":true,"odda.no":true,"oksnes.no":true,"xn--ksnes-uua.no":true,"oppdal.no":true,"oppegard.no":true,"xn--oppegrd-ixa.no":true,"orkdal.no":true,"orland.no":true,"xn--rland-uua.no":true,"orskog.no":true,"xn--rskog-uua.no":true,"orsta.no":true,"xn--rsta-fra.no":true,"os.hedmark.no":true,"os.hordaland.no":true,"osen.no":true,"osteroy.no":true,"xn--ostery-fya.no":true,"ostre-toten.no":true,"xn--stre-toten-zcb.no":true,"overhalla.no":true,"ovre-eiker.no":true,"xn--vre-eiker-k8a.no":true,"oyer.no":true,"xn--yer-zna.no":true,"oygarden.no":true,"xn--ygarden-p1a.no":true,"oystre-slidre.no":true,"xn--ystre-slidre-ujb.no":true,"porsanger.no":true,"porsangu.no":true,"xn--porsgu-sta26f.no":true,"porsgrunn.no":true,"radoy.no":true,"xn--rady-ira.no":true,"rakkestad.no":true,"rana.no":true,"ruovat.no":true,"randaberg.no":true,"rauma.no":true,"rendalen.no":true,"rennebu.no":true,"rennesoy.no":true,"xn--rennesy-v1a.no":true,"rindal.no":true,"ringebu.no":true,"ringerike.no":true,"ringsaker.no":true,"rissa.no":true,"risor.no":true,"xn--risr-ira.no":true,"roan.no":true,"rollag.no":true,"rygge.no":true,"ralingen.no":true,"xn--rlingen-mxa.no":true,"rodoy.no":true,"xn--rdy-0nab.no":true,"romskog.no":true,"xn--rmskog-bya.no":true,"roros.no":true,"xn--rros-gra.no":true,"rost.no":true,"xn--rst-0na.no":true,"royken.no":true,"xn--ryken-vua.no":true,"royrvik.no":true,"xn--ryrvik-bya.no":true,"rade.no":true,"xn--rde-ula.no":true,"salangen.no":true,"siellak.no":true,"saltdal.no":true,"salat.no":true,"xn--slt-elab.no":true,"xn--slat-5na.no":true,"samnanger.no":true,"sande.more-og-romsdal.no":true,"sande.xn--mre-og-romsdal-qqb.no":true,"sande.vestfold.no":true,"sandefjord.no":true,"sandnes.no":true,"sandoy.no":true,"xn--sandy-yua.no":true,"sarpsborg.no":true,"sauda.no":true,"sauherad.no":true,"sel.no":true,"selbu.no":true,"selje.no":true,"seljord.no":true,"sigdal.no":true,"siljan.no":true,"sirdal.no":true,"skaun.no":true,"skedsmo.no":true,"ski.no":true,"skien.no":true,"skiptvet.no":true,"skjervoy.no":true,"xn--skjervy-v1a.no":true,"skierva.no":true,"xn--skierv-uta.no":true,"skjak.no":true,"xn--skjk-soa.no":true,"skodje.no":true,"skanland.no":true,"xn--sknland-fxa.no":true,"skanit.no":true,"xn--sknit-yqa.no":true,"smola.no":true,"xn--smla-hra.no":true,"snillfjord.no":true,"snasa.no":true,"xn--snsa-roa.no":true,"snoasa.no":true,"snaase.no":true,"xn--snase-nra.no":true,"sogndal.no":true,"sokndal.no":true,"sola.no":true,"solund.no":true,"songdalen.no":true,"sortland.no":true,"spydeberg.no":true,"stange.no":true,"stavanger.no":true,"steigen.no":true,"steinkjer.no":true,"stjordal.no":true,"xn--stjrdal-s1a.no":true,"stokke.no":true,"stor-elvdal.no":true,"stord.no":true,"stordal.no":true,"storfjord.no":true,"omasvuotna.no":true,"strand.no":true,"stranda.no":true,"stryn.no":true,"sula.no":true,"suldal.no":true,"sund.no":true,"sunndal.no":true,"surnadal.no":true,"sveio.no":true,"svelvik.no":true,"sykkylven.no":true,"sogne.no":true,"xn--sgne-gra.no":true,"somna.no":true,"xn--smna-gra.no":true,"sondre-land.no":true,"xn--sndre-land-0cb.no":true,"sor-aurdal.no":true,"xn--sr-aurdal-l8a.no":true,"sor-fron.no":true,"xn--sr-fron-q1a.no":true,"sor-odal.no":true,"xn--sr-odal-q1a.no":true,"sor-varanger.no":true,"xn--sr-varanger-ggb.no":true,"matta-varjjat.no":true,"xn--mtta-vrjjat-k7af.no":true,"sorfold.no":true,"xn--srfold-bya.no":true,"sorreisa.no":true,"xn--srreisa-q1a.no":true,"sorum.no":true,"xn--srum-gra.no":true,"tana.no":true,"deatnu.no":true,"time.no":true,"tingvoll.no":true,"tinn.no":true,"tjeldsund.no":true,"dielddanuorri.no":true,"tjome.no":true,"xn--tjme-hra.no":true,"tokke.no":true,"tolga.no":true,"torsken.no":true,"tranoy.no":true,"xn--trany-yua.no":true,"tromso.no":true,"xn--troms-zua.no":true,"tromsa.no":true,"romsa.no":true,"trondheim.no":true,"troandin.no":true,"trysil.no":true,"trana.no":true,"xn--trna-woa.no":true,"trogstad.no":true,"xn--trgstad-r1a.no":true,"tvedestrand.no":true,"tydal.no":true,"tynset.no":true,"tysfjord.no":true,"divtasvuodna.no":true,"divttasvuotna.no":true,"tysnes.no":true,"tysvar.no":true,"xn--tysvr-vra.no":true,"tonsberg.no":true,"xn--tnsberg-q1a.no":true,"ullensaker.no":true,"ullensvang.no":true,"ulvik.no":true,"utsira.no":true,"vadso.no":true,"xn--vads-jra.no":true,"cahcesuolo.no":true,"xn--hcesuolo-7ya35b.no":true,"vaksdal.no":true,"valle.no":true,"vang.no":true,"vanylven.no":true,"vardo.no":true,"xn--vard-jra.no":true,"varggat.no":true,"xn--vrggt-xqad.no":true,"vefsn.no":true,"vaapste.no":true,"vega.no":true,"vegarshei.no":true,"xn--vegrshei-c0a.no":true,"vennesla.no":true,"verdal.no":true,"verran.no":true,"vestby.no":true,"vestnes.no":true,"vestre-slidre.no":true,"vestre-toten.no":true,"vestvagoy.no":true,"xn--vestvgy-ixa6o.no":true,"vevelstad.no":true,"vik.no":true,"vikna.no":true,"vindafjord.no":true,"volda.no":true,"voss.no":true,"varoy.no":true,"xn--vry-yla5g.no":true,"vagan.no":true,"xn--vgan-qoa.no":true,"voagat.no":true,"vagsoy.no":true,"xn--vgsy-qoa0j.no":true,"vaga.no":true,"xn--vg-yiab.no":true,"valer.ostfold.no":true,"xn--vler-qoa.xn--stfold-9xa.no":true,"valer.hedmark.no":true,"xn--vler-qoa.hedmark.no":true,"*.np":true,"nr":true,"biz.nr":true,"info.nr":true,"gov.nr":true,"edu.nr":true,"org.nr":true,"net.nr":true,"com.nr":true,"nu":true,"*.nz":true,"*.om":true,"mediaphone.om":false,"nawrastelecom.om":false,"nawras.om":false,"omanmobile.om":false,"omanpost.om":false,"omantel.om":false,"rakpetroleum.om":false,"siemens.om":false,"songfest.om":false,"statecouncil.om":false,"org":true,"pa":true,"ac.pa":true,"gob.pa":true,"com.pa":true,"org.pa":true,"sld.pa":true,"edu.pa":true,"net.pa":true,"ing.pa":true,"abo.pa":true,"med.pa":true,"nom.pa":true,"pe":true,"edu.pe":true,"gob.pe":true,"nom.pe":true,"mil.pe":true,"org.pe":true,"com.pe":true,"net.pe":true,"pf":true,"com.pf":true,"org.pf":true,"edu.pf":true,"*.pg":true,"ph":true,"com.ph":true,"net.ph":true,"org.ph":true,"gov.ph":true,"edu.ph":true,"ngo.ph":true,"mil.ph":true,"i.ph":true,"pk":true,"com.pk":true,"net.pk":true,"edu.pk":true,"org.pk":true,"fam.pk":true,"biz.pk":true,"web.pk":true,"gov.pk":true,"gob.pk":true,"gok.pk":true,"gon.pk":true,"gop.pk":true,"gos.pk":true,"info.pk":true,"pl":true,"aid.pl":true,"agro.pl":true,"atm.pl":true,"auto.pl":true,"biz.pl":true,"com.pl":true,"edu.pl":true,"gmina.pl":true,"gsm.pl":true,"info.pl":true,"mail.pl":true,"miasta.pl":true,"media.pl":true,"mil.pl":true,"net.pl":true,"nieruchomosci.pl":true,"nom.pl":true,"org.pl":true,"pc.pl":true,"powiat.pl":true,"priv.pl":true,"realestate.pl":true,"rel.pl":true,"sex.pl":true,"shop.pl":true,"sklep.pl":true,"sos.pl":true,"szkola.pl":true,"targi.pl":true,"tm.pl":true,"tourism.pl":true,"travel.pl":true,"turystyka.pl":true,"6bone.pl":true,"art.pl":true,"mbone.pl":true,"gov.pl":true,"uw.gov.pl":true,"um.gov.pl":true,"ug.gov.pl":true,"upow.gov.pl":true,"starostwo.gov.pl":true,"so.gov.pl":true,"sr.gov.pl":true,"po.gov.pl":true,"pa.gov.pl":true,"ngo.pl":true,"irc.pl":true,"usenet.pl":true,"augustow.pl":true,"babia-gora.pl":true,"bedzin.pl":true,"beskidy.pl":true,"bialowieza.pl":true,"bialystok.pl":true,"bielawa.pl":true,"bieszczady.pl":true,"boleslawiec.pl":true,"bydgoszcz.pl":true,"bytom.pl":true,"cieszyn.pl":true,"czeladz.pl":true,"czest.pl":true,"dlugoleka.pl":true,"elblag.pl":true,"elk.pl":true,"glogow.pl":true,"gniezno.pl":true,"gorlice.pl":true,"grajewo.pl":true,"ilawa.pl":true,"jaworzno.pl":true,"jelenia-gora.pl":true,"jgora.pl":true,"kalisz.pl":true,"kazimierz-dolny.pl":true,"karpacz.pl":true,"kartuzy.pl":true,"kaszuby.pl":true,"katowice.pl":true,"kepno.pl":true,"ketrzyn.pl":true,"klodzko.pl":true,"kobierzyce.pl":true,"kolobrzeg.pl":true,"konin.pl":true,"konskowola.pl":true,"kutno.pl":true,"lapy.pl":true,"lebork.pl":true,"legnica.pl":true,"lezajsk.pl":true,"limanowa.pl":true,"lomza.pl":true,"lowicz.pl":true,"lubin.pl":true,"lukow.pl":true,"malbork.pl":true,"malopolska.pl":true,"mazowsze.pl":true,"mazury.pl":true,"mielec.pl":true,"mielno.pl":true,"mragowo.pl":true,"naklo.pl":true,"nowaruda.pl":true,"nysa.pl":true,"olawa.pl":true,"olecko.pl":true,"olkusz.pl":true,"olsztyn.pl":true,"opoczno.pl":true,"opole.pl":true,"ostroda.pl":true,"ostroleka.pl":true,"ostrowiec.pl":true,"ostrowwlkp.pl":true,"pila.pl":true,"pisz.pl":true,"podhale.pl":true,"podlasie.pl":true,"polkowice.pl":true,"pomorze.pl":true,"pomorskie.pl":true,"prochowice.pl":true,"pruszkow.pl":true,"przeworsk.pl":true,"pulawy.pl":true,"radom.pl":true,"rawa-maz.pl":true,"rybnik.pl":true,"rzeszow.pl":true,"sanok.pl":true,"sejny.pl":true,"siedlce.pl":true,"slask.pl":true,"slupsk.pl":true,"sosnowiec.pl":true,"stalowa-wola.pl":true,"skoczow.pl":true,"starachowice.pl":true,"stargard.pl":true,"suwalki.pl":true,"swidnica.pl":true,"swiebodzin.pl":true,"swinoujscie.pl":true,"szczecin.pl":true,"szczytno.pl":true,"tarnobrzeg.pl":true,"tgory.pl":true,"turek.pl":true,"tychy.pl":true,"ustka.pl":true,"walbrzych.pl":true,"warmia.pl":true,"warszawa.pl":true,"waw.pl":true,"wegrow.pl":true,"wielun.pl":true,"wlocl.pl":true,"wloclawek.pl":true,"wodzislaw.pl":true,"wolomin.pl":true,"wroclaw.pl":true,"zachpomor.pl":true,"zagan.pl":true,"zarow.pl":true,"zgora.pl":true,"zgorzelec.pl":true,"gda.pl":true,"gdansk.pl":true,"gdynia.pl":true,"med.pl":true,"sopot.pl":true,"gliwice.pl":true,"krakow.pl":true,"poznan.pl":true,"wroc.pl":true,"zakopane.pl":true,"pm":true,"pn":true,"gov.pn":true,"co.pn":true,"org.pn":true,"edu.pn":true,"net.pn":true,"pr":true,"com.pr":true,"net.pr":true,"org.pr":true,"gov.pr":true,"edu.pr":true,"isla.pr":true,"pro.pr":true,"biz.pr":true,"info.pr":true,"name.pr":true,"est.pr":true,"prof.pr":true,"ac.pr":true,"pro":true,"aca.pro":true,"bar.pro":true,"cpa.pro":true,"jur.pro":true,"law.pro":true,"med.pro":true,"eng.pro":true,"ps":true,"edu.ps":true,"gov.ps":true,"sec.ps":true,"plo.ps":true,"com.ps":true,"org.ps":true,"net.ps":true,"pt":true,"net.pt":true,"gov.pt":true,"org.pt":true,"edu.pt":true,"int.pt":true,"publ.pt":true,"com.pt":true,"nome.pt":true,"pw":true,"co.pw":true,"ne.pw":true,"or.pw":true,"ed.pw":true,"go.pw":true,"belau.pw":true,"*.py":true,"qa":true,"com.qa":true,"edu.qa":true,"gov.qa":true,"mil.qa":true,"name.qa":true,"net.qa":true,"org.qa":true,"sch.qa":true,"re":true,"com.re":true,"asso.re":true,"nom.re":true,"ro":true,"com.ro":true,"org.ro":true,"tm.ro":true,"nt.ro":true,"nom.ro":true,"info.ro":true,"rec.ro":true,"arts.ro":true,"firm.ro":true,"store.ro":true,"www.ro":true,"rs":true,"co.rs":true,"org.rs":true,"edu.rs":true,"ac.rs":true,"gov.rs":true,"in.rs":true,"ru":true,"ac.ru":true,"com.ru":true,"edu.ru":true,"int.ru":true,"net.ru":true,"org.ru":true,"pp.ru":true,"adygeya.ru":true,"altai.ru":true,"amur.ru":true,"arkhangelsk.ru":true,"astrakhan.ru":true,"bashkiria.ru":true,"belgorod.ru":true,"bir.ru":true,"bryansk.ru":true,"buryatia.ru":true,"cbg.ru":true,"chel.ru":true,"chelyabinsk.ru":true,"chita.ru":true,"chukotka.ru":true,"chuvashia.ru":true,"dagestan.ru":true,"dudinka.ru":true,"e-burg.ru":true,"grozny.ru":true,"irkutsk.ru":true,"ivanovo.ru":true,"izhevsk.ru":true,"jar.ru":true,"joshkar-ola.ru":true,"kalmykia.ru":true,"kaluga.ru":true,"kamchatka.ru":true,"karelia.ru":true,"kazan.ru":true,"kchr.ru":true,"kemerovo.ru":true,"khabarovsk.ru":true,"khakassia.ru":true,"khv.ru":true,"kirov.ru":true,"koenig.ru":true,"komi.ru":true,"kostroma.ru":true,"krasnoyarsk.ru":true,"kuban.ru":true,"kurgan.ru":true,"kursk.ru":true,"lipetsk.ru":true,"magadan.ru":true,"mari.ru":true,"mari-el.ru":true,"marine.ru":true,"mordovia.ru":true,"mosreg.ru":true,"msk.ru":true,"murmansk.ru":true,"nalchik.ru":true,"nnov.ru":true,"nov.ru":true,"novosibirsk.ru":true,"nsk.ru":true,"omsk.ru":true,"orenburg.ru":true,"oryol.ru":true,"palana.ru":true,"penza.ru":true,"perm.ru":true,"pskov.ru":true,"ptz.ru":true,"rnd.ru":true,"ryazan.ru":true,"sakhalin.ru":true,"samara.ru":true,"saratov.ru":true,"simbirsk.ru":true,"smolensk.ru":true,"spb.ru":true,"stavropol.ru":true,"stv.ru":true,"surgut.ru":true,"tambov.ru":true,"tatarstan.ru":true,"tom.ru":true,"tomsk.ru":true,"tsaritsyn.ru":true,"tsk.ru":true,"tula.ru":true,"tuva.ru":true,"tver.ru":true,"tyumen.ru":true,"udm.ru":true,"udmurtia.ru":true,"ulan-ude.ru":true,"vladikavkaz.ru":true,"vladimir.ru":true,"vladivostok.ru":true,"volgograd.ru":true,"vologda.ru":true,"voronezh.ru":true,"vrn.ru":true,"vyatka.ru":true,"yakutia.ru":true,"yamal.ru":true,"yaroslavl.ru":true,"yekaterinburg.ru":true,"yuzhno-sakhalinsk.ru":true,"amursk.ru":true,"baikal.ru":true,"cmw.ru":true,"fareast.ru":true,"jamal.ru":true,"kms.ru":true,"k-uralsk.ru":true,"kustanai.ru":true,"kuzbass.ru":true,"magnitka.ru":true,"mytis.ru":true,"nakhodka.ru":true,"nkz.ru":true,"norilsk.ru":true,"oskol.ru":true,"pyatigorsk.ru":true,"rubtsovsk.ru":true,"snz.ru":true,"syzran.ru":true,"vdonsk.ru":true,"zgrad.ru":true,"gov.ru":true,"mil.ru":true,"test.ru":true,"rw":true,"gov.rw":true,"net.rw":true,"edu.rw":true,"ac.rw":true,"com.rw":true,"co.rw":true,"int.rw":true,"mil.rw":true,"gouv.rw":true,"sa":true,"com.sa":true,"net.sa":true,"org.sa":true,"gov.sa":true,"med.sa":true,"pub.sa":true,"edu.sa":true,"sch.sa":true,"sb":true,"com.sb":true,"edu.sb":true,"gov.sb":true,"net.sb":true,"org.sb":true,"sc":true,"com.sc":true,"gov.sc":true,"net.sc":true,"org.sc":true,"edu.sc":true,"sd":true,"com.sd":true,"net.sd":true,"org.sd":true,"edu.sd":true,"med.sd":true,"gov.sd":true,"info.sd":true,"se":true,"a.se":true,"ac.se":true,"b.se":true,"bd.se":true,"brand.se":true,"c.se":true,"d.se":true,"e.se":true,"f.se":true,"fh.se":true,"fhsk.se":true,"fhv.se":true,"g.se":true,"h.se":true,"i.se":true,"k.se":true,"komforb.se":true,"kommunalforbund.se":true,"komvux.se":true,"l.se":true,"lanbib.se":true,"m.se":true,"n.se":true,"naturbruksgymn.se":true,"o.se":true,"org.se":true,"p.se":true,"parti.se":true,"pp.se":true,"press.se":true,"r.se":true,"s.se":true,"sshn.se":true,"t.se":true,"tm.se":true,"u.se":true,"w.se":true,"x.se":true,"y.se":true,"z.se":true,"sg":true,"com.sg":true,"net.sg":true,"org.sg":true,"gov.sg":true,"edu.sg":true,"per.sg":true,"sh":true,"si":true,"sk":true,"sl":true,"com.sl":true,"net.sl":true,"edu.sl":true,"gov.sl":true,"org.sl":true,"sm":true,"sn":true,"art.sn":true,"com.sn":true,"edu.sn":true,"gouv.sn":true,"org.sn":true,"perso.sn":true,"univ.sn":true,"so":true,"com.so":true,"net.so":true,"org.so":true,"sr":true,"st":true,"co.st":true,"com.st":true,"consulado.st":true,"edu.st":true,"embaixada.st":true,"gov.st":true,"mil.st":true,"net.st":true,"org.st":true,"principe.st":true,"saotome.st":true,"store.st":true,"su":true,"*.sv":true,"sy":true,"edu.sy":true,"gov.sy":true,"net.sy":true,"mil.sy":true,"com.sy":true,"org.sy":true,"sz":true,"co.sz":true,"ac.sz":true,"org.sz":true,"tc":true,"td":true,"tel":true,"tf":true,"tg":true,"th":true,"ac.th":true,"co.th":true,"go.th":true,"in.th":true,"mi.th":true,"net.th":true,"or.th":true,"tj":true,"ac.tj":true,"biz.tj":true,"co.tj":true,"com.tj":true,"edu.tj":true,"go.tj":true,"gov.tj":true,"int.tj":true,"mil.tj":true,"name.tj":true,"net.tj":true,"nic.tj":true,"org.tj":true,"test.tj":true,"web.tj":true,"tk":true,"tl":true,"gov.tl":true,"tm":true,"tn":true,"com.tn":true,"ens.tn":true,"fin.tn":true,"gov.tn":true,"ind.tn":true,"intl.tn":true,"nat.tn":true,"net.tn":true,"org.tn":true,"info.tn":true,"perso.tn":true,"tourism.tn":true,"edunet.tn":true,"rnrt.tn":true,"rns.tn":true,"rnu.tn":true,"mincom.tn":true,"agrinet.tn":true,"defense.tn":true,"turen.tn":true,"to":true,"com.to":true,"gov.to":true,"net.to":true,"org.to":true,"edu.to":true,"mil.to":true,"*.tr":true,"nic.tr":false,"gov.nc.tr":true,"travel":true,"tt":true,"co.tt":true,"com.tt":true,"org.tt":true,"net.tt":true,"biz.tt":true,"info.tt":true,"pro.tt":true,"int.tt":true,"coop.tt":true,"jobs.tt":true,"mobi.tt":true,"travel.tt":true,"museum.tt":true,"aero.tt":true,"name.tt":true,"gov.tt":true,"edu.tt":true,"tv":true,"tw":true,"edu.tw":true,"gov.tw":true,"mil.tw":true,"com.tw":true,"net.tw":true,"org.tw":true,"idv.tw":true,"game.tw":true,"ebiz.tw":true,"club.tw":true,"xn--zf0ao64a.tw":true,"xn--uc0atv.tw":true,"xn--czrw28b.tw":true,"ac.tz":true,"co.tz":true,"go.tz":true,"mil.tz":true,"ne.tz":true,"or.tz":true,"sc.tz":true,"ua":true,"com.ua":true,"edu.ua":true,"gov.ua":true,"in.ua":true,"net.ua":true,"org.ua":true,"cherkassy.ua":true,"chernigov.ua":true,"chernovtsy.ua":true,"ck.ua":true,"cn.ua":true,"crimea.ua":true,"cv.ua":true,"dn.ua":true,"dnepropetrovsk.ua":true,"donetsk.ua":true,"dp.ua":true,"if.ua":true,"ivano-frankivsk.ua":true,"kh.ua":true,"kharkov.ua":true,"kherson.ua":true,"khmelnitskiy.ua":true,"kiev.ua":true,"kirovograd.ua":true,"km.ua":true,"kr.ua":true,"ks.ua":true,"kv.ua":true,"lg.ua":true,"lugansk.ua":true,"lutsk.ua":true,"lviv.ua":true,"mk.ua":true,"nikolaev.ua":true,"od.ua":true,"odessa.ua":true,"pl.ua":true,"poltava.ua":true,"rovno.ua":true,"rv.ua":true,"sebastopol.ua":true,"sumy.ua":true,"te.ua":true,"ternopil.ua":true,"uzhgorod.ua":true,"vinnica.ua":true,"vn.ua":true,"zaporizhzhe.ua":true,"zp.ua":true,"zhitomir.ua":true,"zt.ua":true,"co.ua":true,"pp.ua":true,"ug":true,"co.ug":true,"ac.ug":true,"sc.ug":true,"go.ug":true,"ne.ug":true,"or.ug":true,"*.uk":true,"*.sch.uk":true,"bl.uk":false,"british-library.uk":false,"icnet.uk":false,"jet.uk":false,"mod.uk":false,"nel.uk":false,"nhs.uk":false,"nic.uk":false,"nls.uk":false,"national-library-scotland.uk":false,"parliament.uk":false,"police.uk":false,"us":true,"dni.us":true,"fed.us":true,"isa.us":true,"kids.us":true,"nsn.us":true,"ak.us":true,"al.us":true,"ar.us":true,"as.us":true,"az.us":true,"ca.us":true,"co.us":true,"ct.us":true,"dc.us":true,"de.us":true,"fl.us":true,"ga.us":true,"gu.us":true,"hi.us":true,"ia.us":true,"id.us":true,"il.us":true,"in.us":true,"ks.us":true,"ky.us":true,"la.us":true,"ma.us":true,"md.us":true,"me.us":true,"mi.us":true,"mn.us":true,"mo.us":true,"ms.us":true,"mt.us":true,"nc.us":true,"nd.us":true,"ne.us":true,"nh.us":true,"nj.us":true,"nm.us":true,"nv.us":true,"ny.us":true,"oh.us":true,"ok.us":true,"or.us":true,"pa.us":true,"pr.us":true,"ri.us":true,"sc.us":true,"sd.us":true,"tn.us":true,"tx.us":true,"ut.us":true,"vi.us":true,"vt.us":true,"va.us":true,"wa.us":true,"wi.us":true,"wv.us":true,"wy.us":true,"k12.ak.us":true,"k12.al.us":true,"k12.ar.us":true,"k12.as.us":true,"k12.az.us":true,"k12.ca.us":true,"k12.co.us":true,"k12.ct.us":true,"k12.dc.us":true,"k12.de.us":true,"k12.fl.us":true,"k12.ga.us":true,"k12.gu.us":true,"k12.ia.us":true,"k12.id.us":true,"k12.il.us":true,"k12.in.us":true,"k12.ks.us":true,"k12.ky.us":true,"k12.la.us":true,"k12.ma.us":true,"k12.md.us":true,"k12.me.us":true,"k12.mi.us":true,"k12.mn.us":true,"k12.mo.us":true,"k12.ms.us":true,"k12.mt.us":true,"k12.nc.us":true,"k12.nd.us":true,"k12.ne.us":true,"k12.nh.us":true,"k12.nj.us":true,"k12.nm.us":true,"k12.nv.us":true,"k12.ny.us":true,"k12.oh.us":true,"k12.ok.us":true,"k12.or.us":true,"k12.pa.us":true,"k12.pr.us":true,"k12.ri.us":true,"k12.sc.us":true,"k12.sd.us":true,"k12.tn.us":true,"k12.tx.us":true,"k12.ut.us":true,"k12.vi.us":true,"k12.vt.us":true,"k12.va.us":true,"k12.wa.us":true,"k12.wi.us":true,"k12.wv.us":true,"k12.wy.us":true,"cc.ak.us":true,"cc.al.us":true,"cc.ar.us":true,"cc.as.us":true,"cc.az.us":true,"cc.ca.us":true,"cc.co.us":true,"cc.ct.us":true,"cc.dc.us":true,"cc.de.us":true,"cc.fl.us":true,"cc.ga.us":true,"cc.gu.us":true,"cc.hi.us":true,"cc.ia.us":true,"cc.id.us":true,"cc.il.us":true,"cc.in.us":true,"cc.ks.us":true,"cc.ky.us":true,"cc.la.us":true,"cc.ma.us":true,"cc.md.us":true,"cc.me.us":true,"cc.mi.us":true,"cc.mn.us":true,"cc.mo.us":true,"cc.ms.us":true,"cc.mt.us":true,"cc.nc.us":true,"cc.nd.us":true,"cc.ne.us":true,"cc.nh.us":true,"cc.nj.us":true,"cc.nm.us":true,"cc.nv.us":true,"cc.ny.us":true,"cc.oh.us":true,"cc.ok.us":true,"cc.or.us":true,"cc.pa.us":true,"cc.pr.us":true,"cc.ri.us":true,"cc.sc.us":true,"cc.sd.us":true,"cc.tn.us":true,"cc.tx.us":true,"cc.ut.us":true,"cc.vi.us":true,"cc.vt.us":true,"cc.va.us":true,"cc.wa.us":true,"cc.wi.us":true,"cc.wv.us":true,"cc.wy.us":true,"lib.ak.us":true,"lib.al.us":true,"lib.ar.us":true,"lib.as.us":true,"lib.az.us":true,"lib.ca.us":true,"lib.co.us":true,"lib.ct.us":true,"lib.dc.us":true,"lib.de.us":true,"lib.fl.us":true,"lib.ga.us":true,"lib.gu.us":true,"lib.hi.us":true,"lib.ia.us":true,"lib.id.us":true,"lib.il.us":true,"lib.in.us":true,"lib.ks.us":true,"lib.ky.us":true,"lib.la.us":true,"lib.ma.us":true,"lib.md.us":true,"lib.me.us":true,"lib.mi.us":true,"lib.mn.us":true,"lib.mo.us":true,"lib.ms.us":true,"lib.mt.us":true,"lib.nc.us":true,"lib.nd.us":true,"lib.ne.us":true,"lib.nh.us":true,"lib.nj.us":true,"lib.nm.us":true,"lib.nv.us":true,"lib.ny.us":true,"lib.oh.us":true,"lib.ok.us":true,"lib.or.us":true,"lib.pa.us":true,"lib.pr.us":true,"lib.ri.us":true,"lib.sc.us":true,"lib.sd.us":true,"lib.tn.us":true,"lib.tx.us":true,"lib.ut.us":true,"lib.vi.us":true,"lib.vt.us":true,"lib.va.us":true,"lib.wa.us":true,"lib.wi.us":true,"lib.wv.us":true,"lib.wy.us":true,"pvt.k12.ma.us":true,"chtr.k12.ma.us":true,"paroch.k12.ma.us":true,"*.uy":true,"uz":true,"com.uz":true,"co.uz":true,"va":true,"vc":true,"com.vc":true,"net.vc":true,"org.vc":true,"gov.vc":true,"mil.vc":true,"edu.vc":true,"*.ve":true,"vg":true,"vi":true,"co.vi":true,"com.vi":true,"k12.vi":true,"net.vi":true,"org.vi":true,"vn":true,"com.vn":true,"net.vn":true,"org.vn":true,"edu.vn":true,"gov.vn":true,"int.vn":true,"ac.vn":true,"biz.vn":true,"info.vn":true,"name.vn":true,"pro.vn":true,"health.vn":true,"vu":true,"wf":true,"ws":true,"com.ws":true,"net.ws":true,"org.ws":true,"gov.ws":true,"edu.ws":true,"yt":true,"xn--mgbaam7a8h":true,"xn--54b7fta0cc":true,"xn--fiqs8s":true,"xn--fiqz9s":true,"xn--lgbbat1ad8j":true,"xn--wgbh1c":true,"xn--node":true,"xn--j6w193g":true,"xn--h2brj9c":true,"xn--mgbbh1a71e":true,"xn--fpcrj9c3d":true,"xn--gecrj9c":true,"xn--s9brj9c":true,"xn--45brj9c":true,"xn--xkc2dl3a5ee0h":true,"xn--mgba3a4f16a":true,"xn--mgba3a4fra":true,"xn--mgbayh7gpa":true,"xn--3e0b707e":true,"xn--fzc2c9e2c":true,"xn--xkc2al3hye2a":true,"xn--mgbc0a9azcg":true,"xn--mgb9awbf":true,"xn--ygbi2ammx":true,"xn--90a3ac":true,"xn--p1ai":true,"xn--wgbl6a":true,"xn--mgberp4a5d4ar":true,"xn--mgberp4a5d4a87g":true,"xn--mgbqly7c0a67fbc":true,"xn--mgbqly7cvafr":true,"xn--ogbpf8fl":true,"xn--mgbtf8fl":true,"xn--yfro4i67o":true,"xn--clchc0ea0b2g2a9gcd":true,"xn--o3cw4h":true,"xn--pgbs0dh":true,"xn--kpry57d":true,"xn--kprw13d":true,"xn--nnx388a":true,"xn--j1amh":true,"xn--mgb2ddes":true,"xxx":true,"*.ye":true,"*.za":true,"*.zm":true,"*.zw":true,"biz.at":true,"info.at":true,"priv.at":true,"co.ca":true,"ar.com":true,"br.com":true,"cn.com":true,"de.com":true,"eu.com":true,"gb.com":true,"gr.com":true,"hu.com":true,"jpn.com":true,"kr.com":true,"no.com":true,"qc.com":true,"ru.com":true,"sa.com":true,"se.com":true,"uk.com":true,"us.com":true,"uy.com":true,"za.com":true,"gb.net":true,"jp.net":true,"se.net":true,"uk.net":true,"ae.org":true,"us.org":true,"com.de":true,"operaunite.com":true,"appspot.com":true,"iki.fi":true,"c.la":true,"za.net":true,"za.org":true,"co.nl":true,"co.no":true,"co.pl":true,"dyndns-at-home.com":true,"dyndns-at-work.com":true,"dyndns-blog.com":true,"dyndns-free.com":true,"dyndns-home.com":true,"dyndns-ip.com":true,"dyndns-mail.com":true,"dyndns-office.com":true,"dyndns-pics.com":true,"dyndns-remote.com":true,"dyndns-server.com":true,"dyndns-web.com":true,"dyndns-wiki.com":true,"dyndns-work.com":true,"dyndns.biz":true,"dyndns.info":true,"dyndns.org":true,"dyndns.tv":true,"at-band-camp.net":true,"ath.cx":true,"barrel-of-knowledge.info":true,"barrell-of-knowledge.info":true,"better-than.tv":true,"blogdns.com":true,"blogdns.net":true,"blogdns.org":true,"blogsite.org":true,"boldlygoingnowhere.org":true,"broke-it.net":true,"buyshouses.net":true,"cechire.com":true,"dnsalias.com":true,"dnsalias.net":true,"dnsalias.org":true,"dnsdojo.com":true,"dnsdojo.net":true,"dnsdojo.org":true,"does-it.net":true,"doesntexist.com":true,"doesntexist.org":true,"dontexist.com":true,"dontexist.net":true,"dontexist.org":true,"doomdns.com":true,"doomdns.org":true,"dvrdns.org":true,"dyn-o-saur.com":true,"dynalias.com":true,"dynalias.net":true,"dynalias.org":true,"dynathome.net":true,"dyndns.ws":true,"endofinternet.net":true,"endofinternet.org":true,"endoftheinternet.org":true,"est-a-la-maison.com":true,"est-a-la-masion.com":true,"est-le-patron.com":true,"est-mon-blogueur.com":true,"for-better.biz":true,"for-more.biz":true,"for-our.info":true,"for-some.biz":true,"for-the.biz":true,"forgot.her.name":true,"forgot.his.name":true,"from-ak.com":true,"from-al.com":true,"from-ar.com":true,"from-az.net":true,"from-ca.com":true,"from-co.net":true,"from-ct.com":true,"from-dc.com":true,"from-de.com":true,"from-fl.com":true,"from-ga.com":true,"from-hi.com":true,"from-ia.com":true,"from-id.com":true,"from-il.com":true,"from-in.com":true,"from-ks.com":true,"from-ky.com":true,"from-la.net":true,"from-ma.com":true,"from-md.com":true,"from-me.org":true,"from-mi.com":true,"from-mn.com":true,"from-mo.com":true,"from-ms.com":true,"from-mt.com":true,"from-nc.com":true,"from-nd.com":true,"from-ne.com":true,"from-nh.com":true,"from-nj.com":true,"from-nm.com":true,"from-nv.com":true,"from-ny.net":true,"from-oh.com":true,"from-ok.com":true,"from-or.com":true,"from-pa.com":true,"from-pr.com":true,"from-ri.com":true,"from-sc.com":true,"from-sd.com":true,"from-tn.com":true,"from-tx.com":true,"from-ut.com":true,"from-va.com":true,"from-vt.com":true,"from-wa.com":true,"from-wi.com":true,"from-wv.com":true,"from-wy.com":true,"ftpaccess.cc":true,"fuettertdasnetz.de":true,"game-host.org":true,"game-server.cc":true,"getmyip.com":true,"gets-it.net":true,"go.dyndns.org":true,"gotdns.com":true,"gotdns.org":true,"groks-the.info":true,"groks-this.info":true,"ham-radio-op.net":true,"here-for-more.info":true,"hobby-site.com":true,"hobby-site.org":true,"home.dyndns.org":true,"homedns.org":true,"homeftp.net":true,"homeftp.org":true,"homeip.net":true,"homelinux.com":true,"homelinux.net":true,"homelinux.org":true,"homeunix.com":true,"homeunix.net":true,"homeunix.org":true,"iamallama.com":true,"in-the-band.net":true,"is-a-anarchist.com":true,"is-a-blogger.com":true,"is-a-bookkeeper.com":true,"is-a-bruinsfan.org":true,"is-a-bulls-fan.com":true,"is-a-candidate.org":true,"is-a-caterer.com":true,"is-a-celticsfan.org":true,"is-a-chef.com":true,"is-a-chef.net":true,"is-a-chef.org":true,"is-a-conservative.com":true,"is-a-cpa.com":true,"is-a-cubicle-slave.com":true,"is-a-democrat.com":true,"is-a-designer.com":true,"is-a-doctor.com":true,"is-a-financialadvisor.com":true,"is-a-geek.com":true,"is-a-geek.net":true,"is-a-geek.org":true,"is-a-green.com":true,"is-a-guru.com":true,"is-a-hard-worker.com":true,"is-a-hunter.com":true,"is-a-knight.org":true,"is-a-landscaper.com":true,"is-a-lawyer.com":true,"is-a-liberal.com":true,"is-a-libertarian.com":true,"is-a-linux-user.org":true,"is-a-llama.com":true,"is-a-musician.com":true,"is-a-nascarfan.com":true,"is-a-nurse.com":true,"is-a-painter.com":true,"is-a-patsfan.org":true,"is-a-personaltrainer.com":true,"is-a-photographer.com":true,"is-a-player.com":true,"is-a-republican.com":true,"is-a-rockstar.com":true,"is-a-socialist.com":true,"is-a-soxfan.org":true,"is-a-student.com":true,"is-a-teacher.com":true,"is-a-techie.com":true,"is-a-therapist.com":true,"is-an-accountant.com":true,"is-an-actor.com":true,"is-an-actress.com":true,"is-an-anarchist.com":true,"is-an-artist.com":true,"is-an-engineer.com":true,"is-an-entertainer.com":true,"is-by.us":true,"is-certified.com":true,"is-found.org":true,"is-gone.com":true,"is-into-anime.com":true,"is-into-cars.com":true,"is-into-cartoons.com":true,"is-into-games.com":true,"is-leet.com":true,"is-lost.org":true,"is-not-certified.com":true,"is-saved.org":true,"is-slick.com":true,"is-uberleet.com":true,"is-very-bad.org":true,"is-very-evil.org":true,"is-very-good.org":true,"is-very-nice.org":true,"is-very-sweet.org":true,"is-with-theband.com":true,"isa-geek.com":true,"isa-geek.net":true,"isa-geek.org":true,"isa-hockeynut.com":true,"issmarterthanyou.com":true,"isteingeek.de":true,"istmein.de":true,"kicks-ass.net":true,"kicks-ass.org":true,"knowsitall.info":true,"land-4-sale.us":true,"lebtimnetz.de":true,"leitungsen.de":true,"likes-pie.com":true,"likescandy.com":true,"merseine.nu":true,"mine.nu":true,"misconfused.org":true,"mypets.ws":true,"myphotos.cc":true,"neat-url.com":true,"office-on-the.net":true,"on-the-web.tv":true,"podzone.net":true,"podzone.org":true,"readmyblog.org":true,"saves-the-whales.com":true,"scrapper-site.net":true,"scrapping.cc":true,"selfip.biz":true,"selfip.com":true,"selfip.info":true,"selfip.net":true,"selfip.org":true,"sells-for-less.com":true,"sells-for-u.com":true,"sells-it.net":true,"sellsyourhome.org":true,"servebbs.com":true,"servebbs.net":true,"servebbs.org":true,"serveftp.net":true,"serveftp.org":true,"servegame.org":true,"shacknet.nu":true,"simple-url.com":true,"space-to-rent.com":true,"stuff-4-sale.org":true,"stuff-4-sale.us":true,"teaches-yoga.com":true,"thruhere.net":true,"traeumtgerade.de":true,"webhop.biz":true,"webhop.info":true,"webhop.net":true,"webhop.org":true,"worse-than.tv":true,"writesthisblog.com":true}); - -// END of automatically generated file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt deleted file mode 100644 index 11dddd00..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt +++ /dev/null @@ -1,278 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt deleted file mode 100644 index 97067e54..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens <http://mathiasbynens.be/> - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json deleted file mode 100644 index 69e12ae2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "punycode", - "version": "1.2.3", - "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.", - "homepage": "http://mths.be/punycode", - "main": "punycode.js", - "keywords": [ - "punycode", - "unicode", - "idn", - "idna", - "dns", - "url", - "domain" - ], - "licenses": [ - { - "type": "MIT", - "url": "http://mths.be/mit" - }, - { - "type": "GPL", - "url": "http://mths.be/gpl" - } - ], - "author": { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - }, - "contributors": [ - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - }, - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - } - ], - "bugs": { - "url": "https://github.com/bestiejs/punycode.js/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/bestiejs/punycode.js.git" - }, - "engines": [ - "node", - "rhino" - ], - "directories": { - "doc": "docs", - "test": "tests" - }, - "scripts": { - "test": "node tests/tests.js" - }, - "devDependencies": { - "grunt": "~0.4.1", - "grunt-contrib-uglify": "~0.2.2", - "grunt-shell": "~0.2.2", - "istanbul": "~0.1.37", - "qunit-clib": "~1.3.0", - "qunitjs": "~1.11.0", - "requirejs": "~2.1.6" - }, - "readme": "ERROR: No README data found!", - "_id": "punycode@1.2.3", - "dist": { - "shasum": "b4e304471082d783c73b3bafabf2fd9b6a486266" - }, - "_from": "punycode@>=0.2.0", - "_resolved": "https://registry.npmjs.org/punycode/-/punycode-1.2.3.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js deleted file mode 100644 index 41803ba4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js +++ /dev/null @@ -1,508 +0,0 @@ -/*! http://mths.be/punycode v1.2.3 by @mathias */ -;(function(root) { - - /** Detect free variables */ - var freeExports = typeof exports == 'object' && exports; - var freeModule = typeof module == 'object' && module && - module.exports == freeExports && module; - var freeGlobal = typeof global == 'object' && global; - if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { - root = freeGlobal; - } - - /** - * The `punycode` object. - * @name punycode - * @type Object - */ - var punycode, - - /** Highest positive signed 32-bit float value */ - maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 - - /** Bootstring parameters */ - base = 36, - tMin = 1, - tMax = 26, - skew = 38, - damp = 700, - initialBias = 72, - initialN = 128, // 0x80 - delimiter = '-', // '\x2D' - - /** Regular expressions */ - regexPunycode = /^xn--/, - regexNonASCII = /[^ -~]/, // unprintable ASCII chars + non-ASCII chars - regexSeparators = /\x2E|\u3002|\uFF0E|\uFF61/g, // RFC 3490 separators - - /** Error messages */ - errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' - }, - - /** Convenience shortcuts */ - baseMinusTMin = base - tMin, - floor = Math.floor, - stringFromCharCode = String.fromCharCode, - - /** Temporary variable */ - key; - - /*--------------------------------------------------------------------------*/ - - /** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ - function error(type) { - throw RangeError(errors[type]); - } - - /** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ - function map(array, fn) { - var length = array.length; - while (length--) { - array[length] = fn(array[length]); - } - return array; - } - - /** - * A simple `Array#map`-like wrapper to work with domain name strings. - * @private - * @param {String} domain The domain name. - * @param {Function} callback The function that gets called for every - * character. - * @returns {Array} A new string of characters returned by the callback - * function. - */ - function mapDomain(string, fn) { - return map(string.split(regexSeparators), fn).join('.'); - } - - /** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see <http://mathiasbynens.be/notes/javascript-encoding> - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ - function ucs2decode(string) { - var output = [], - counter = 0, - length = string.length, - value, - extra; - while (counter < length) { - value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // high surrogate, and there is a next character - extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // low surrogate - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // unmatched surrogate; only append this code unit, in case the next - // code unit is the high surrogate of a surrogate pair - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; - } - - /** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ - function ucs2encode(array) { - return map(array, function(value) { - var output = ''; - if (value > 0xFFFF) { - value -= 0x10000; - output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); - value = 0xDC00 | value & 0x3FF; - } - output += stringFromCharCode(value); - return output; - }).join(''); - } - - /** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ - function basicToDigit(codePoint) { - if (codePoint - 48 < 10) { - return codePoint - 22; - } - if (codePoint - 65 < 26) { - return codePoint - 65; - } - if (codePoint - 97 < 26) { - return codePoint - 97; - } - return base; - } - - /** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ - function digitToBasic(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); - } - - /** - * Bias adaptation function as per section 3.4 of RFC 3492. - * http://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ - function adapt(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); - } - - /** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ - function decode(input) { - // Don't use UCS-2 - var output = [], - inputLength = input.length, - out, - i = 0, - n = initialN, - bias = initialBias, - basic, - j, - index, - oldi, - w, - k, - digit, - t, - length, - /** Cached calculation results */ - baseMinusT; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - for (oldi = i, w = 1, k = base; /* no condition */; k += base) { - - if (index >= inputLength) { - error('invalid-input'); - } - - digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base || digit > floor((maxInt - i) / w)) { - error('overflow'); - } - - i += digit * w; - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - - if (digit < t) { - break; - } - - baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error('overflow'); - } - - w *= baseMinusT; - - } - - out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output - output.splice(i++, 0, n); - - } - - return ucs2encode(output); - } - - /** - * Converts a string of Unicode symbols to a Punycode string of ASCII-only - * symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ - function encode(input) { - var n, - delta, - handledCPCount, - basicLength, - bias, - j, - m, - q, - k, - t, - currentValue, - output = [], - /** `inputLength` will hold the number of code points in `input`. */ - inputLength, - /** Cached calculation results */ - handledCPCountPlusOne, - baseMinusT, - qMinusT; - - // Convert the input in UCS-2 to Unicode - input = ucs2decode(input); - - // Cache the length - inputLength = input.length; - - // Initialize the state - n = initialN; - delta = 0; - bias = initialBias; - - // Handle the basic code points - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - - handledCPCount = basicLength = output.length; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string - if it is not empty - with a delimiter - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - for (m = maxInt, j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, - // but guard against overflow - handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - - if (currentValue == n) { - // Represent delta as a generalized variable-length integer - for (q = delta, k = base; /* no condition */; k += base) { - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - if (q < t) { - break; - } - qMinusT = q - t; - baseMinusT = base - t; - output.push( - stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) - ); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - - ++delta; - ++n; - - } - return output.join(''); - } - - /** - * Converts a Punycode string representing a domain name to Unicode. Only the - * Punycoded parts of the domain name will be converted, i.e. it doesn't - * matter if you call it on a string that has already been converted to - * Unicode. - * @memberOf punycode - * @param {String} domain The Punycode domain name to convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ - function toUnicode(domain) { - return mapDomain(domain, function(string) { - return regexPunycode.test(string) - ? decode(string.slice(4).toLowerCase()) - : string; - }); - } - - /** - * Converts a Unicode string representing a domain name to Punycode. Only the - * non-ASCII parts of the domain name will be converted, i.e. it doesn't - * matter if you call it with a domain that's already in ASCII. - * @memberOf punycode - * @param {String} domain The domain name to convert, as a Unicode string. - * @returns {String} The Punycode representation of the given domain name. - */ - function toASCII(domain) { - return mapDomain(domain, function(string) { - return regexNonASCII.test(string) - ? 'xn--' + encode(string) - : string; - }); - } - - /*--------------------------------------------------------------------------*/ - - /** Define the public API */ - punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '1.2.3', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see <http://mathiasbynens.be/notes/javascript-encoding> - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode - }; - - /** Expose `punycode` */ - // Some AMD build optimizers, like r.js, check for specific condition patterns - // like the following: - if ( - typeof define == 'function' && - typeof define.amd == 'object' && - define.amd - ) { - define(function() { - return punycode; - }); - } else if (freeExports && !freeExports.nodeType) { - if (freeModule) { // in Node.js or RingoJS v0.8.0+ - freeModule.exports = punycode; - } else { // in Narwhal or RingoJS v0.7.0- - for (key in punycode) { - punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); - } - } - } else { // in Rhino or a web browser - root.punycode = punycode; - } - -}(this)); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js deleted file mode 100644 index ac5d914a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! http://mths.be/punycode v1.2.3 by @mathias */ -(function(o){function e(o){throw RangeError(L[o])}function n(o,e){for(var n=o.length;n--;)o[n]=e(o[n]);return o}function t(o,e){return n(o.split(S),e).join(".")}function r(o){for(var e,n,t=[],r=0,u=o.length;u>r;)e=o.charCodeAt(r++),e>=55296&&56319>=e&&u>r?(n=o.charCodeAt(r++),56320==(64512&n)?t.push(((1023&e)<<10)+(1023&n)+65536):(t.push(e),r--)):t.push(e);return t}function u(o){return n(o,function(o){var e="";return o>65535&&(o-=65536,e+=R(55296|1023&o>>>10),o=56320|1023&o),e+=R(o)}).join("")}function i(o){return 10>o-48?o-22:26>o-65?o-65:26>o-97?o-97:x}function f(o,e){return o+22+75*(26>o)-((0!=e)<<5)}function c(o,e,n){var t=0;for(o=n?P(o/m):o>>1,o+=P(o/e);o>M*y>>1;t+=x)o=P(o/M);return P(t+(M+1)*o/(o+j))}function l(o){var n,t,r,f,l,d,s,a,p,h,v=[],g=o.length,w=0,j=I,m=A;for(t=o.lastIndexOf(F),0>t&&(t=0),r=0;t>r;++r)o.charCodeAt(r)>=128&&e("not-basic"),v.push(o.charCodeAt(r));for(f=t>0?t+1:0;g>f;){for(l=w,d=1,s=x;f>=g&&e("invalid-input"),a=i(o.charCodeAt(f++)),(a>=x||a>P((b-w)/d))&&e("overflow"),w+=a*d,p=m>=s?C:s>=m+y?y:s-m,!(p>a);s+=x)h=x-p,d>P(b/h)&&e("overflow"),d*=h;n=v.length+1,m=c(w-l,n,0==l),P(w/n)>b-j&&e("overflow"),j+=P(w/n),w%=n,v.splice(w++,0,j)}return u(v)}function d(o){var n,t,u,i,l,d,s,a,p,h,v,g,w,j,m,E=[];for(o=r(o),g=o.length,n=I,t=0,l=A,d=0;g>d;++d)v=o[d],128>v&&E.push(R(v));for(u=i=E.length,i&&E.push(F);g>u;){for(s=b,d=0;g>d;++d)v=o[d],v>=n&&s>v&&(s=v);for(w=u+1,s-n>P((b-t)/w)&&e("overflow"),t+=(s-n)*w,n=s,d=0;g>d;++d)if(v=o[d],n>v&&++t>b&&e("overflow"),v==n){for(a=t,p=x;h=l>=p?C:p>=l+y?y:p-l,!(h>a);p+=x)m=a-h,j=x-h,E.push(R(f(h+m%j,0))),a=P(m/j);E.push(R(f(a,0))),l=c(t,w,u==i),t=0,++u}++t,++n}return E.join("")}function s(o){return t(o,function(o){return E.test(o)?l(o.slice(4).toLowerCase()):o})}function a(o){return t(o,function(o){return O.test(o)?"xn--"+d(o):o})}var p="object"==typeof exports&&exports,h="object"==typeof module&&module&&module.exports==p&&module,v="object"==typeof global&&global;(v.global===v||v.window===v)&&(o=v);var g,w,b=2147483647,x=36,C=1,y=26,j=38,m=700,A=72,I=128,F="-",E=/^xn--/,O=/[^ -~]/,S=/\x2E|\u3002|\uFF0E|\uFF61/g,L={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=x-C,P=Math.floor,R=String.fromCharCode;if(g={version:"1.2.3",ucs2:{decode:r,encode:u},decode:l,encode:d,toASCII:a,toUnicode:s},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return g});else if(p&&!p.nodeType)if(h)h.exports=g;else for(w in g)g.hasOwnProperty(w)&&(p[w]=g[w]);else o.punycode=g})(this); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt deleted file mode 100644 index a7501f98..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md deleted file mode 100644 index fbddce91..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# Docdown <sup>v1.0.0</sup> - -A simple JSDoc to Markdown documentation generator. - -## Documentation - -The documentation for Docdown can be viewed here: [/doc/README.md](https://github.com/jdalton/docdown/blob/master/doc/README.md#readme) - -For a list of upcoming features, check out our [roadmap](https://github.com/jdalton/docdown/wiki/Roadmap). - -## Installation and usage - -Usage example: - -```php -require("docdown.php"); - -// generate Markdown -$markdown = docdown(array( - "path" => $filepath, - "url" => "https://github.com/username/project/blob/master/my.js" -)); -``` - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](http://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](http://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md deleted file mode 100644 index 459d36ab..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# Docdown <sup>v1.0.0</sup> - -<!-- div --> - - -<!-- div --> - -## <a id="docdown"></a>`docdown` -* [`docdown`](#docdown$optionsarray) - -<!-- /div --> - - -<!-- /div --> - - -<!-- div --> - - -<!-- div --> - -## `docdown` - -<!-- div --> - -### <a id="docdown$optionsarray"></a>`docdown([$options=array()])` -<a href="#docdown$optionsarray">#</a> [Ⓢ](https://github.com/jdalton/docdown/blob/master/docdown.php#L34 "View in source") [Ⓣ][1] - -Generates Markdown from JSDoc entries in a given file. - -#### Arguments -1. `[$options=array()]` *(Array)*: The options array. - -#### Returns -*(String)*: The generated Markdown. - -#### Example -```php -// specify a file path -$markdown = docdown(array( - // path to js file - 'path' => $filepath, - // url used to reference line numbers in code - 'url' => 'https://github.com/username/project/blob/master/my.js' -)); - -// or pass raw js -$markdown = docdown(array( - // raw JavaScript source - 'source' => $rawJS, - // documentation title - 'title' => 'My API Documentation', - // url used to reference line numbers in code - 'url' => 'https://github.com/username/project/blob/master/my.js' -)); -``` - -* * * - -<!-- /div --> - - -<!-- /div --> - - -<!-- /div --> - - - [1]: #docdown "Jump back to the TOC." \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php deleted file mode 100644 index eca8d145..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php - - // cleanup requested filepath - $file = isset($_GET['f']) ? $_GET['f'] : 'docdown'; - $file = preg_replace('#(\.*[\/])+#', '', $file); - $file .= preg_match('/\.[a-z]+$/', $file) ? '' : '.php'; - - // output filename - if (isset($_GET['o'])) { - $output = $_GET['o']; - } else if (isset($_SERVER['argv'][1])) { - $output = $_SERVER['argv'][1]; - } else { - $output = basename($file); - } - - /*--------------------------------------------------------------------------*/ - - require('../docdown.php'); - - // generate Markdown - $markdown = docdown(array( - 'path' => '../' . $file, - 'title' => 'Docdown <sup>v1.0.0</sup>', - 'url' => 'https://github.com/jdalton/docdown/blob/master/docdown.php' - )); - - // save to a .md file - file_put_contents($output . '.md', $markdown); - - // print - header('Content-Type: text/plain;charset=utf-8'); - echo $markdown . PHP_EOL; - -?> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php deleted file mode 100644 index 4a786d75..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php -/*! - * Docdown v1.0.0-pre - * Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/> - * Available under MIT license <http://mths.be/mit> - */ -require(dirname(__FILE__) . '/src/DocDown/Generator.php'); - -/** - * Generates Markdown from JSDoc entries in a given file. - * - * @param {Array} [$options=array()] The options array. - * @returns {String} The generated Markdown. - * @example - * - * // specify a file path - * $markdown = docdown(array( - * // path to js file - * 'path' => $filepath, - * // url used to reference line numbers in code - * 'url' => 'https://github.com/username/project/blob/master/my.js' - * )); - * - * // or pass raw js - * $markdown = docdown(array( - * // raw JavaScript source - * 'source' => $rawJS, - * // documentation title - * 'title' => 'My API Documentation', - * // url used to reference line numbers in code - * 'url' => 'https://github.com/username/project/blob/master/my.js' - * )); - */ -function docdown( $options = array() ) { - $gen = new Generator($options); - return $gen->generate(); -} -?> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php deleted file mode 100644 index 0a7c552e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php +++ /dev/null @@ -1,226 +0,0 @@ -<?php - -/** - * A class to represent a JSDoc entry alias. - */ -class Alias { - - /** - * The alias owner. - * - * @memberOf Alias - * @type Object - */ - public $owner; - - /*--------------------------------------------------------------------------*/ - - /** - * The Alias constructor. - * - * @constructor - * @param {String} $name The alias name. - * @param {Object} $owner The alias owner. - */ - public function __construct( $name, $owner ) { - $this->owner = $owner; - $this->_name = $name; - $this->_call = $owner->getCall(); - $this->_category = $owner->getCategory(); - $this->_desc = $owner->getDesc(); - $this->_example = $owner->getExample(); - $this->_isCtor = $owner->isCtor(); - $this->_isLicense = $owner->isLicense(); - $this->_isPlugin = $owner->isPlugin(); - $this->_isPrivate = $owner->isPrivate(); - $this->_isStatic = $owner->isStatic(); - $this->_lineNumber = $owner->getLineNumber(); - $this->_members = $owner->getMembers(); - $this->_params = $owner->getParams(); - $this->_returns = $owner->getReturns(); - $this->_type = $owner->getType(); - } - - /*--------------------------------------------------------------------------*/ - - /** - * Extracts the entry's `alias` objects. - * - * @memberOf Alias - * @param {Number} $index The index of the array value to return. - * @returns {Array|String} The entry's `alias` objects. - */ - public function getAliases( $index = null ) { - $result = array(); - return $index !== null - ? @$result[$index] - : $result; - } - - /** - * Extracts the function call from the owner entry. - * - * @memberOf Alias - * @returns {String} The function call. - */ - public function getCall() { - return $this->_call; - } - - /** - * Extracts the owner entry's `category` data. - * - * @memberOf Alias - * @returns {String} The owner entry's `category` data. - */ - public function getCategory() { - return $this->_category; - } - - /** - * Extracts the owner entry's description. - * - * @memberOf Alias - * @returns {String} The owner entry's description. - */ - public function getDesc() { - return $this->_desc; - } - - /** - * Extracts the owner entry's `example` data. - * - * @memberOf Alias - * @returns {String} The owner entry's `example` data. - */ - public function getExample() { - return $this->_example; - } - - /** - * Checks if the entry is an alias. - * - * @memberOf Alias - * @returns {Boolean} Returns `true`. - */ - public function isAlias() { - return true; - } - - /** - * Checks if the owner entry is a constructor. - * - * @memberOf Alias - * @returns {Boolean} Returns `true` if a constructor, else `false`. - */ - public function isCtor() { - return $this->_isCtor; - } - - /** - * Checks if the owner entry is a license. - * - * @memberOf Alias - * @returns {Boolean} Returns `true` if a license, else `false`. - */ - public function isLicense() { - return $this->_isLicense; - } - - /** - * Checks if the owner entry *is* assigned to a prototype. - * - * @memberOf Alias - * @returns {Boolean} Returns `true` if assigned to a prototype, else `false`. - */ - public function isPlugin() { - return $this->_isPlugin; - } - - /** - * Checks if the owner entry is private. - * - * @memberOf Alias - * @returns {Boolean} Returns `true` if private, else `false`. - */ - public function isPrivate() { - return $this->_isPrivate; - } - - /** - * Checks if the owner entry is *not* assigned to a prototype. - * - * @memberOf Alias - * @returns {Boolean} Returns `true` if not assigned to a prototype, else `false`. - */ - public function isStatic() { - return $this->_isStatic; - } - - /** - * Resolves the owner entry's line number. - * - * @memberOf Alias - * @returns {Number} The owner entry's line number. - */ - public function getLineNumber() { - return $this->_lineNumber; - } - - /** - * Extracts the owner entry's `member` data. - * - * @memberOf Alias - * @param {Number} $index The index of the array value to return. - * @returns {Array|String} The owner entry's `member` data. - */ - public function getMembers( $index = null ) { - return $index !== null - ? @$this->_members[$index] - : $this->_members; - } - - /** - * Extracts the owner entry's `name` data. - * - * @memberOf Alias - * @returns {String} The owner entry's `name` data. - */ - public function getName() { - return $this->_name; - } - - /** - * Extracts the owner entry's `param` data. - * - * @memberOf Alias - * @param {Number} $index The index of the array value to return. - * @returns {Array} The owner entry's `param` data. - */ - public function getParams( $index = null ) { - return $index !== null - ? @$this->_params[$index] - : $this->_params; - } - - /** - * Extracts the owner entry's `returns` data. - * - * @memberOf Alias - * @returns {String} The owner entry's `returns` data. - */ - public function getReturns() { - return $this->_returns; - } - - /** - * Extracts the owner entry's `type` data. - * - * @memberOf Alias - * @returns {String} The owner entry's `type` data. - */ - public function getType() { - return $this->_type; - } -} -?> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php deleted file mode 100644 index a973d9a6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php +++ /dev/null @@ -1,442 +0,0 @@ -<?php - -require(dirname(__FILE__) . "/Alias.php"); - -/** - * A class to simplify parsing a single JSDoc entry. - */ -class Entry { - - /** - * The documentation entry. - * - * @memberOf Entry - * @type String - */ - public $entry = ''; - - /** - * The language highlighter used for code examples. - * - * @memberOf Entry - * @type String - */ - public $lang = ''; - - /** - * The source code. - * - * @memberOf Entry - * @type String - */ - public $source = ''; - - /*--------------------------------------------------------------------------*/ - - /** - * The Entry constructor. - * - * @constructor - * @param {String} $entry The documentation entry to analyse. - * @param {String} $source The source code. - * @param {String} [$lang ='js'] The language highlighter used for code examples. - */ - public function __construct( $entry, $source, $lang = 'js' ) { - $this->entry = $entry; - $this->lang = $lang; - $this->source = str_replace(PHP_EOL, "\n", $source); - } - - /*--------------------------------------------------------------------------*/ - - /** - * Extracts the documentation entries from source code. - * - * @static - * @memberOf Entry - * @param {String} $source The source code. - * @returns {Array} The array of entries. - */ - public static function getEntries( $source ) { - preg_match_all('#/\*\*(?![-!])[\s\S]*?\*/\s*.+#', $source, $result); - return array_pop($result); - } - - /*--------------------------------------------------------------------------*/ - - /** - * Checks if the entry is a function reference. - * - * @private - * @memberOf Entry - * @returns {Boolean} Returns `true` if the entry is a function reference, else `false`. - */ - private function isFunction() { - if (!isset($this->_isFunction)) { - $this->_isFunction = !!( - $this->isCtor() || - count($this->getParams()) || - count($this->getReturns()) || - preg_match('/\*[\t ]*@function\b/', $this->entry) - ); - } - return $this->_isFunction; - } - - /*--------------------------------------------------------------------------*/ - - /** - * Extracts the entry's `alias` objects. - * - * @memberOf Entry - * @param {Number} $index The index of the array value to return. - * @returns {Array|String} The entry's `alias` objects. - */ - public function getAliases( $index = null ) { - if (!isset($this->_aliases)) { - preg_match('#\*[\t ]*@alias\s+(.+)#', $this->entry, $result); - - if (count($result)) { - $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); - $result = preg_split('/,\s*/', $result); - natsort($result); - - foreach ($result as $resultIndex => $value) { - $result[$resultIndex] = new Alias($value, $this); - } - } - $this->_aliases = $result; - } - return $index !== null - ? @$this->_aliases[$index] - : $this->_aliases; - } - - /** - * Extracts the function call from the entry. - * - * @memberOf Entry - * @returns {String} The function call. - */ - public function getCall() { - if (isset($this->_call)) { - return $this->_call; - } - - preg_match('#\*/\s*(?:function ([^(]*)|(.*?)(?=[:=,]|return\b))#', $this->entry, $result); - if ($result = array_pop($result)) { - $result = array_pop(explode('var ', trim(trim(array_pop(explode('.', $result))), "'"))); - } - // resolve name - // avoid $this->getName() because it calls $this->getCall() - preg_match('#\*[\t ]*@name\s+(.+)#', $this->entry, $name); - if (count($name)) { - $name = trim($name[1]); - } else { - $name = $result; - } - // compile function call syntax - if ($this->isFunction()) { - // compose parts - $result = array($result); - $params = $this->getParams(); - foreach ($params as $param) { - $result[] = $param[1]; - } - // format - $result = $name .'('. implode(array_slice($result, 1), ', ') .')'; - $result = str_replace(', [', ' [, ', str_replace('], [', ', ', $result)); - } - - $this->_call = $result ? $result : $name; - return $this->_call; - } - - /** - * Extracts the entry's `category` data. - * - * @memberOf Entry - * @returns {String} The entry's `category` data. - */ - public function getCategory() { - if (isset($this->_category)) { - return $this->_category; - } - - preg_match('#\*[\t ]*@category\s+(.+)#', $this->entry, $result); - if (count($result)) { - $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); - } else { - $result = $this->getType() == 'Function' ? 'Methods' : 'Properties'; - } - $this->_category = $result; - return $result; - } - - /** - * Extracts the entry's description. - * - * @memberOf Entry - * @returns {String} The entry's description. - */ - public function getDesc() { - if (isset($this->_desc)) { - return $this->_desc; - } - - preg_match('#/\*\*(?:\s*\*)?([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result); - if (count($result)) { - $type = $this->getType(); - $result = preg_replace('/:\n[\t ]*\*[\t ]*/', ":<br>\n", $result[1]); - $result = preg_replace('/(?:^|\n)[\t ]*\*\n[\t ]*\*[\t ]*/', "\n\n", $result); - $result = preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result); - $result = trim($result); - $result = ($type == 'Function' ? '' : '(' . str_replace('|', ', ', trim($type, '{}')) . '): ') . $result; - } - $this->_desc = $result; - return $result; - } - - /** - * Extracts the entry's `example` data. - * - * @memberOf Entry - * @returns {String} The entry's `example` data. - */ - public function getExample() { - if (isset($this->_example)) { - return $this->_example; - } - - preg_match('#\*[\t ]*@example\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result); - if (count($result)) { - $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', "\n", $result[1])); - $result = '```' . $this->lang . "\n" . $result . "\n```"; - } - $this->_example = $result; - return $result; - } - - /** - * Checks if the entry is an alias. - * - * @memberOf Entry - * @returns {Boolean} Returns `false`. - */ - public function isAlias() { - return false; - } - - /** - * Checks if the entry is a constructor. - * - * @memberOf Entry - * @returns {Boolean} Returns `true` if a constructor, else `false`. - */ - public function isCtor() { - if (!isset($this->_isCtor)) { - $this->_isCtor = !!preg_match('/\*[\t ]*@constructor\b/', $this->entry); - } - return $this->_isCtor; - } - - /** - * Checks if the entry is a license. - * - * @memberOf Entry - * @returns {Boolean} Returns `true` if a license, else `false`. - */ - public function isLicense() { - if (!isset($this->_isLicense)) { - $this->_isLicense = !!preg_match('/\*[\t ]*@license\b/', $this->entry); - } - return $this->_isLicense; - } - - /** - * Checks if the entry *is* assigned to a prototype. - * - * @memberOf Entry - * @returns {Boolean} Returns `true` if assigned to a prototype, else `false`. - */ - public function isPlugin() { - if (!isset($this->_isPlugin)) { - $this->_isPlugin = !$this->isCtor() && !$this->isPrivate() && !$this->isStatic(); - } - return $this->_isPlugin; - } - - /** - * Checks if the entry is private. - * - * @memberOf Entry - * @returns {Boolean} Returns `true` if private, else `false`. - */ - public function isPrivate() { - if (!isset($this->_isPrivate)) { - $this->_isPrivate = $this->isLicense() || !!preg_match('/\*[\t ]*@private\b/', $this->entry) || !preg_match('/\*[\t ]*@[a-z]+\b/', $this->entry); - } - return $this->_isPrivate; - } - - /** - * Checks if the entry is *not* assigned to a prototype. - * - * @memberOf Entry - * @returns {Boolean} Returns `true` if not assigned to a prototype, else `false`. - */ - public function isStatic() { - if (isset($this->_isStatic)) { - return $this->_isStatic; - } - - $public = !$this->isPrivate(); - $result = $public && !!preg_match('/\*[\t ]*@static\b/', $this->entry); - - // set in cases where it isn't explicitly stated - if ($public && !$result) { - if ($parent = array_pop(preg_split('/[#.]/', $this->getMembers(0)))) { - foreach (Entry::getEntries($this->source) as $entry) { - $entry = new Entry($entry, $this->source); - if ($entry->getName() == $parent) { - $result = !$entry->isCtor(); - break; - } - } - } else { - $result = true; - } - } - $this->_isStatic = $result; - return $result; - } - - /** - * Resolves the entry's line number. - * - * @memberOf Entry - * @returns {Number} The entry's line number. - */ - public function getLineNumber() { - if (!isset($this->_lineNumber)) { - preg_match_all('/\n/', substr($this->source, 0, strrpos($this->source, $this->entry) + strlen($this->entry)), $lines); - $this->_lineNumber = count(array_pop($lines)) + 1; - } - return $this->_lineNumber; - } - - /** - * Extracts the entry's `member` data. - * - * @memberOf Entry - * @param {Number} $index The index of the array value to return. - * @returns {Array|String} The entry's `member` data. - */ - public function getMembers( $index = null ) { - if (!isset($this->_members)) { - preg_match('#\*[\t ]*@member(?:Of)?\s+(.+)#', $this->entry, $result); - if (count($result)) { - $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); - $result = preg_split('/,\s*/', $result); - natsort($result); - } - $this->_members = $result; - } - return $index !== null - ? @$this->_members[$index] - : $this->_members; - } - - /** - * Extracts the entry's `name` data. - * - * @memberOf Entry - * @returns {String} The entry's `name` data. - */ - public function getName() { - if (isset($this->_name)) { - return $this->_name; - } - - preg_match('#\*[\t ]*@name\s+(.+)#', $this->entry, $result); - if (count($result)) { - $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); - } else { - $result = array_shift(explode('(', $this->getCall())); - } - $this->_name = $result; - return $result; - } - - /** - * Extracts the entry's `param` data. - * - * @memberOf Entry - * @param {Number} $index The index of the array value to return. - * @returns {Array} The entry's `param` data. - */ - public function getParams( $index = null ) { - if (!isset($this->_params)) { - preg_match_all('#\*[\t ]*@param\s+\{([^}]+)\}\s+(\[.+\]|[$\w|]+(?:\[.+\])?)\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#i', $this->entry, $result); - if (count($result = array_filter(array_slice($result, 1)))) { - // repurpose array - foreach ($result as $param) { - foreach ($param as $key => $value) { - if (!is_array($result[0][$key])) { - $result[0][$key] = array(); - } - $result[0][$key][] = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]*/', ' ', $value)); - } - } - $result = $result[0]; - } - $this->_params = $result; - } - return $index !== null - ? @$this->_params[$index] - : $this->_params; - } - - /** - * Extracts the entry's `returns` data. - * - * @memberOf Entry - * @returns {String} The entry's `returns` data. - */ - public function getReturns() { - if (isset($this->_returns)) { - return $this->_returns; - } - - preg_match('#\*[\t ]*@returns\s+\{([^}]+)\}\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result); - if (count($result)) { - $result = array_map('trim', array_slice($result, 1)); - $result[0] = str_replace('|', ', ', $result[0]); - $result[1] = preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1]); - } - $this->_returns = $result; - return $result; - } - - /** - * Extracts the entry's `type` data. - * - * @memberOf Entry - * @returns {String} The entry's `type` data. - */ - public function getType() { - if (isset($this->_type)) { - return $this->_type; - } - - preg_match('#\*[\t ]*@type\s+(.+)#', $this->entry, $result); - if (count($result)) { - $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); - } else { - $result = $this->isFunction() ? 'Function' : 'Unknown'; - } - $this->_type = $result; - return $result; - } -} -?> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php deleted file mode 100644 index 5dc2583f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php +++ /dev/null @@ -1,563 +0,0 @@ -<?php - -require(dirname(__FILE__) . "/Entry.php"); - -/** - * Generates Markdown from JSDoc entries. - */ -class Generator { - - /** - * The HTML for the close tag. - * - * @static - * @memberOf Generator - * @type String - */ - public $closeTag = "\n<!-- /div -->\n"; - - /** - * An array of JSDoc entries. - * - * @memberOf Generator - * @type Array - */ - public $entries = array(); - - /** - * The HTML for the open tag. - * - * @static - * @memberOf Generator - * @type String - */ - public $openTag = "\n<!-- div -->\n"; - - /** - * An options array used to configure the generator. - * - * @memberOf Generator - * @type Array - */ - public $options = array(); - - /** - * The file's source code. - * - * @memberOf Generator - * @type String - */ - public $source = ''; - - /*--------------------------------------------------------------------------*/ - - /** - * The Generator constructor. - * - * @constructor - * @param {String} $source The source code to parse. - * @param {Array} $options The options array. - */ - public function __construct( $source, $options = array() ) { - // juggle arguments - if (is_array($source)) { - $options = $source; - } else { - $options['source'] = $source; - } - if (isset($options['source']) && realpath($options['source'])) { - $options['path'] = $options['source']; - } - if (isset($options['path'])) { - preg_match('/(?<=\.)[a-z]+$/', $options['path'], $ext); - $options['source'] = file_get_contents($options['path']); - $ext = array_pop($ext); - - if (!isset($options['lang']) && $ext) { - $options['lang'] = $ext; - } - if (!isset($options['title'])) { - $options['title'] = ucfirst(basename($options['path'])) . ' API documentation'; - } - } - if (!isset($options['lang'])) { - $options['lang'] = 'js'; - } - if (!isset($options['toc'])) { - $options['toc'] = 'properties'; - } - - $this->options = $options; - $this->source = str_replace(PHP_EOL, "\n", $options['source']); - $this->entries = Entry::getEntries($this->source); - - foreach ($this->entries as $index => $value) { - $this->entries[$index] = new Entry($value, $this->source, $options['lang']); - } - } - - /*--------------------------------------------------------------------------*/ - - /** - * Performs common string formatting operations. - * - * @private - * @static - * @memberOf Generator - * @param {String} $string The string to format. - * @returns {String} The formatted string. - */ - private static function format( $string ) { - $counter = 0; - - // tokenize inline code snippets - preg_match_all('/`[^`]+`/', $string, $tokenized); - $tokenized = $tokenized[0]; - foreach ($tokenized as $snippet) { - $string = str_replace($snippet, '__token' . ($counter++) .'__', $string); - } - - // italicize parentheses - $string = preg_replace('/(^|\s)(\([^)]+\))/', '$1*$2*', $string); - - // mark numbers as inline code - $string = preg_replace('/[\t ](-?\d+(?:.\d+)?)(?!\.[^\n])/', ' `$1`', $string); - - // detokenize inline code snippets - $counter = 0; - foreach ($tokenized as $snippet) { - $string = str_replace('__token' . ($counter++) . '__', $snippet, $string); - } - - return trim($string); - } - - /** - * Modify a string by replacing named tokens with matching assoc. array values. - * - * @private - * @static - * @memberOf Generator - * @param {String} $string The string to modify. - * @param {Array|Object} $object The template object. - * @returns {String} The modified string. - */ - private static function interpolate( $string, $object ) { - preg_match_all('/#\{([^}]+)\}/', $string, $tokens); - $tokens = array_unique(array_pop($tokens)); - - foreach ($tokens as $token) { - $pattern = '/#\{' . $token . '\}/'; - $replacement = ''; - - if (is_object($object)) { - preg_match('/\(([^)]+?)\)$/', $token, $args); - $args = preg_split('/,\s*/', array_pop($args)); - $method = 'get' . ucfirst(str_replace('/\([^)]+?\)$/', '', $token)); - - if (method_exists($object, $method)) { - $replacement = (string) call_user_func_array(array($object, $method), $args); - } else if (isset($object->{$token})) { - $replacement = (string) $object->{$token}; - } - } else if (isset($object[$token])) { - $replacement = (string) $object[$token]; - } - $string = preg_replace($pattern, trim($replacement), $string); - } - return Generator::format($string); - } - - /*--------------------------------------------------------------------------*/ - - /** - * Adds the given `$entries` to the `$result` array. - * - * @private - * @memberOf Generator - * @param {Array} $result The result array to modify. - * @param {Array} $entries The entries to add to the `$result`. - */ - private function addEntries( &$result, $entries ) { - foreach ($entries as $entry) { - // skip aliases - if ($entry->isAlias()) { - continue; - } - // name and description - array_push( - $result, - $this->openTag, - Generator::interpolate("### <a id=\"#{hash}\"></a>`#{member}#{separator}#{call}`\n<a href=\"##{hash}\">#</a> [Ⓢ](#{href} \"View in source\") [Ⓣ][1]\n\n#{desc}", $entry) - ); - - // @alias - if (count($aliases = $entry->getAliases())) { - array_push($result, '', '#### Aliases'); - foreach ($aliases as $index => $alias) { - $aliases[$index] = $alias->getName(); - } - $result[] = '*' . implode(', ', $aliases) . '*'; - } - // @param - if (count($params = $entry->getParams())) { - array_push($result, '', '#### Arguments'); - foreach ($params as $index => $param) { - $result[] = Generator::interpolate('#{num}. `#{name}` (#{type}): #{desc}', array( - 'desc' => $param[2], - 'name' => $param[1], - 'num' => $index + 1, - 'type' => $param[0] - )); - } - } - // @returns - if (count($returns = $entry->getReturns())) { - array_push( - $result, '', - '#### Returns', - Generator::interpolate('(#{type}): #{desc}', array('desc' => $returns[1], 'type' => $returns[0])) - ); - } - // @example - if ($example = $entry->getExample()) { - array_push($result, '', '#### Example', $example); - } - array_push($result, "\n* * *", $this->closeTag); - } - } - - /** - * Resolves the entry's hash used to navigate the documentation. - * - * @private - * @memberOf Generator - * @param {Number|Object} $entry The entry object. - * @param {String} $member The name of the member. - * @returns {String} The url hash. - */ - private function getHash( $entry, $member = '' ) { - $entry = is_numeric($entry) ? $this->entries[$entry] : $entry; - $member = !$member ? $entry->getMembers(0) : $member; - $result = ($member ? $member . ($entry->isPlugin() ? 'prototype' : '') : '') . $entry->getCall(); - $result = preg_replace('/\(\[|\[\]/', '', $result); - $result = preg_replace('/[ =|\'"{}.()\]]/', '', $result); - $result = preg_replace('/[[#,]/', '-', $result); - return strtolower($result); - } - - /** - * Resolves the entry's url for the specific line number. - * - * @private - * @memberOf Generator - * @param {Number|Object} $entry The entry object. - * @returns {String} The url. - */ - private function getLineUrl( $entry ) { - $entry = is_numeric($entry) ? $this->entries($entry) : $entry; - return $this->options['url'] . '#L' . $entry->getLineNumber(); - } - - /** - * Extracts the character used to separate the entry's name from its member. - * - * @private - * @memberOf Generator - * @param {Number|Object} $entry The entry object. - * @returns {String} The separator. - */ - private function getSeparator( $entry ) { - $entry = is_numeric($entry) ? $this->entries($entry) : $entry; - return $entry->isPlugin() ? '.prototype.' : '.'; - } - - /*--------------------------------------------------------------------------*/ - - /** - * Generates Markdown from JSDoc entries. - * - * @memberOf Generator - * @returns {String} The rendered Markdown. - */ - public function generate() { - $api = array(); - $byCategory = $this->options['toc'] == 'categories'; - $categories = array(); - $closeTag = $this->closeTag; - $compiling = false; - $openTag = $this->openTag; - $result = array('# ' . $this->options['title']); - $toc = 'toc'; - - // initialize $api array - foreach ($this->entries as $entry) { - // skip invalid or private entries - $name = $entry->getName(); - if (!$name || $entry->isPrivate()) { - continue; - } - - $members = $entry->getMembers(); - $members = count($members) ? $members : array(''); - - foreach ($members as $member) { - // create api category arrays - if ($member && !isset($api[$member])) { - // create temporary entry to be replaced later - $api[$member] = new stdClass; - $api[$member]->static = array(); - $api[$member]->plugin = array(); - } - - // append entry to api member - if (!$member || $entry->isCtor() || ($entry->getType() == 'Object' && - !preg_match('/[=:]\s*(?:null|undefined)\s*[,;]?$/', $entry->entry))) { - - // assign the real entry, replacing the temporary entry if it exist - $member = ($member ? $member . ($entry->isPlugin() ? '#' : '.') : '') . $name; - $entry->static = @$api[$member] ? $api[$member]->static : array(); - $entry->plugin = @$api[$member] ? $api[$member]->plugin : array(); - - $api[$member] = $entry; - foreach ($entry->getAliases() as $alias) { - $api[$member]->static[] = $alias; - } - } - else if ($entry->isStatic()) { - $api[$member]->static[] = $entry; - foreach ($entry->getAliases() as $alias) { - $api[$member]->static[] = $alias; - } - } - else if (!$entry->isCtor()) { - $api[$member]->plugin[] = $entry; - foreach ($entry->getAliases() as $alias) { - $api[$member]->plugin[] = $alias; - } - } - } - } - - // add properties to each entry - foreach ($api as $entry) { - $entry->hash = $this->getHash($entry); - $entry->href = $this->getLineUrl($entry); - - $member = $entry->getMembers(0); - $member = ($member ? $member . ($entry->isPlugin() ? '.prototype.' : '.') : '') . $entry->getName(); - $entry->member = preg_replace('/' . $entry->getName() . '$/', '', $member); - - // add properties to static and plugin sub-entries - foreach (array('static', 'plugin') as $kind) { - foreach ($entry->{$kind} as $subentry) { - $subentry->hash = $this->getHash($subentry); - $subentry->href = $this->getLineUrl($subentry); - $subentry->member = $member; - $subentry->separator = $this->getSeparator($subentry); - } - } - } - - /*------------------------------------------------------------------------*/ - - // custom sort for root level entries - // TODO: see how well it handles deeper namespace traversal - function sortCompare($a, $b) { - $score = array( 'a' => 0, 'b' => 0); - foreach (array( 'a' => $a, 'b' => $b) as $key => $value) { - // capitalized properties are last - if (preg_match('/[#.][A-Z]/', $value)) { - $score[$key] = 0; - } - // lowercase prototype properties are next to last - else if (preg_match('/#[a-z]/', $value)) { - $score[$key] = 1; - } - // lowercase static properties next to first - else if (preg_match('/\.[a-z]/', $value)) { - $score[$key] = 2; - } - // root properties are first - else if (preg_match('/^[^#.]+$/', $value)) { - $score[$key] = 3; - } - } - $score = $score['b'] - $score['a']; - return $score ? $score : strcasecmp($a, $b); - } - - uksort($api, 'sortCompare'); - - // sort static and plugin sub-entries - foreach ($api as $entry) { - foreach (array('static', 'plugin') as $kind) { - $sortBy = array( 'a' => array(), 'b' => array(), 'c' => array() ); - foreach ($entry->{$kind} as $subentry) { - $name = $subentry->getName(); - // functions w/o ALL-CAPs names are last - $sortBy['a'][] = $subentry->getType() == 'Function' && !preg_match('/^[A-Z_]+$/', $name); - // ALL-CAPs properties first - $sortBy['b'][] = preg_match('/^[A-Z_]+$/', $name); - // lowercase alphanumeric sort - $sortBy['c'][] = strtolower($name); - } - array_multisort($sortBy['a'], SORT_ASC, $sortBy['b'], SORT_DESC, $sortBy['c'], SORT_ASC, $entry->{$kind}); - } - } - - /*------------------------------------------------------------------------*/ - - // add categories - foreach ($api as $entry) { - $categories[$entry->getCategory()][] = $entry; - foreach (array('static', 'plugin') as $kind) { - foreach ($entry->{$kind} as $subentry) { - $categories[$subentry->getCategory()][] = $subentry; - } - } - } - - // sort categories - ksort($categories); - - foreach(array('Methods', 'Properties') as $category) { - if (isset($categories[$category])) { - $entries = $categories[$category]; - unset($categories[$category]); - $categories[$category] = $entries; - } - } - - /*------------------------------------------------------------------------*/ - - // compile TOC - $result[] = $openTag; - - // compile TOC by categories - if ($byCategory) { - foreach ($categories as $category => $entries) { - if ($compiling) { - $result[] = $closeTag; - } else { - $compiling = true; - } - // assign TOC hash - if (count($result) == 2) { - $toc = $category; - } - // add category - array_push( - $result, - $openTag, '## ' . (count($result) == 2 ? '<a id="' . $toc . '"></a>' : '') . '`' . $category . '`' - ); - // add entries - foreach ($entries as $entry) { - $result[] = Generator::interpolate('* [`#{member}#{separator}#{name}`](##{hash})', $entry); - } - } - } - // compile TOC by namespace - else { - foreach ($api as $entry) { - if ($compiling) { - $result[] = $closeTag; - } else { - $compiling = true; - } - $member = $entry->member . $entry->getName(); - - // assign TOC hash - if (count($result) == 2) { - $toc = $member; - } - // add root entry - array_push( - $result, - $openTag, '## ' . (count($result) == 2 ? '<a id="' . $toc . '"></a>' : '') . '`' . $member . '`', - Generator::interpolate('* [`' . $member . '`](##{hash})', $entry) - ); - - // add static and plugin sub-entries - foreach (array('static', 'plugin') as $kind) { - if ($kind == 'plugin' && count($entry->plugin)) { - array_push( - $result, - $closeTag, - $openTag, - '## `' . $member . ($entry->isCtor() ? '.prototype`' : '`') - ); - } - foreach ($entry->{$kind} as $subentry) { - $subentry->member = $member; - $result[] = Generator::interpolate('* [`#{member}#{separator}#{name}`](##{hash})', $subentry); - } - } - } - } - - array_push($result, $closeTag, $closeTag); - - /*------------------------------------------------------------------------*/ - - // compile content - $compiling = false; - $result[] = $openTag; - - if ($byCategory) { - foreach ($categories as $category => $entries) { - if ($compiling) { - $result[] = $closeTag; - } else { - $compiling = true; - } - if ($category != 'Methods' && $category != 'Properties') { - $category = '“' . $category . '” Methods'; - } - array_push($result, $openTag, '## `' . $category . '`'); - $this->addEntries($result, $entries); - } - } - else { - foreach ($api as $entry) { - // skip aliases - if ($entry->isAlias()) { - continue; - } - if ($compiling) { - $result[] = $closeTag; - } else { - $compiling = true; - } - // add root entry name - $member = $entry->member . $entry->getName(); - array_push($result, $openTag, '## `' . $member . '`'); - - foreach (array($entry, 'static', 'plugin') as $kind) { - $subentries = is_string($kind) ? $entry->{$kind} : array($kind); - - // add sub-entry name - if ($kind != 'static' && $entry->getType() != 'Object' && - count($subentries) && $subentries[0] != $kind) { - if ($kind == 'plugin') { - $result[] = $closeTag; - } - array_push( - $result, - $openTag, - '## `' . $member . ($kind == 'plugin' ? '.prototype`' : '`') - ); - } - $this->addEntries($result, $subentries); - } - } - } - - // close tags add TOC link reference - array_push($result, $closeTag, $closeTag, '', ' [1]: #' . $toc . ' "Jump back to the TOC."'); - - // cleanup whitespace - return trim(preg_replace('/[\t ]+\n/', "\n", join($result, "\n"))); - } -} -?> diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/package.json deleted file mode 100644 index 167c7c6a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "author": { - "name": "Jeremy Stashewsky", - "email": "jeremy@goinstant.com", - "url": "https://github.com/stash" - }, - "name": "tough-cookie", - "description": "RFC6265 Cookies and Cookie Jar for node.js", - "keywords": [ - "HTTP", - "cookie", - "cookies", - "set-cookie", - "cookiejar", - "jar", - "RFC6265", - "RFC2965" - ], - "version": "0.9.15", - "homepage": "https://github.com/goinstant/node-cookie", - "repository": { - "type": "git", - "url": "git://github.com/goinstant/node-cookie.git" - }, - "bugs": { - "url": "https://github.com/goinstant/node-cookie/issues" - }, - "main": "./lib/cookie", - "scripts": { - "test": "vows test.js" - }, - "engines": { - "node": ">=0.4.12" - }, - "dependencies": { - "punycode": ">=0.2.0" - }, - "devDependencies": { - "vows": ">=0.6.0", - "async": ">=0.1.12" - }, - "readme": "[RFC6265](http://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js\n\n![Tough Cookie](http://www.goinstant.com.s3.amazonaws.com/tough-cookie.jpg)\n\n# Synopsis\n\n``` javascript\nvar cookies = require('tough-cookie'); // note: not 'cookie', 'cookies' or 'node-cookie'\nvar Cookie = cookies.Cookie;\nvar cookie = Cookie.parse(header);\ncookie.value = 'somethingdifferent';\nheader = cookie.toString();\n\nvar cookiejar = new cookies.CookieJar();\ncookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb);\n// ...\ncookiejar.getCookies('http://example.com/otherpath',function(err,cookies) {\n res.headers['cookie'] = cookies.join('; ');\n});\n```\n\n# Installation\n\nIt's _so_ easy!\n\n`npm install tough-cookie`\n\nRequires `punycode`, which should get installed automatically for you. Note that node.js v0.6.2+ bundles punycode by default.\n\nWhy the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken.\n\n# API\n\ncookies\n=======\n\nFunctions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be \"bound\".\n\nparseDate(string[,strict])\n-----------------\n\nParse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. If strict is set to true then leading/trailing non-seperator characters around the time part will cause the parsing to fail (e.g. \"Thu, 01 Jan 1970 00:00:010 GMT\" has an extra trailing zero but Chrome, an assumedly RFC-compliant browser, treats this as valid).\n\nformatDate(date)\n----------------\n\nFormat a Date into a RFC1123 string (the RFC6265-recommended format).\n\ncanonicalDomain(str)\n--------------------\n\nTransforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects).\n\ndomainMatch(str,domStr[,canonicalize=true])\n-------------------------------------------\n\nAnswers \"does this real domain match the domain in a cookie?\". The `str` is the \"current\" domain-name and the `domStr` is the \"cookie\" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a \"suffix match\".\n\nThe `canonicalize` parameter will run the other two paramters through `canonicalDomain` or not.\n\ndefaultPath(path)\n-----------------\n\nGiven a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the \"directory\" of a \"file\" in the path, but is specified by Section 5.1.4 of the RFC.\n\nThe `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output.\n\npathMatch(reqPath,cookiePath)\n-----------------------------\n\nAnswers \"does the request-path path-match a given cookie-path?\" as per RFC6265 Section 5.1.4. Returns a boolean.\n\nThis is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`.\n\nparse(header[,strict=false])\n----------------------------\n\nalias for `Cookie.parse(header[,strict])`\n\nfromJSON(string)\n----------------\n\nalias for `Cookie.fromJSON(string)`\n\ngetPublicSuffix(hostname)\n-------------------------\n\nReturns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it.\n\nFor example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`.\n\nFor further information, see http://publicsuffix.org/. This module derives its list from that site.\n\ncookieCompare(a,b)\n------------------\n\nFor use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). Longest `.path`s go first, then sorted oldest to youngest.\n\n``` javascript\nvar cookies = [ /* unsorted array of Cookie objects */ ];\ncookies = cookies.sort(cookieCompare);\n```\n\npermuteDomain(domain)\n---------------------\n\nGenerates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores.\n\n\npermutePath(path)\n-----------------\n\nGenerates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores.\n\nCookie\n======\n\nCookie.parse(header[,strict=false])\n-----------------------------------\n\nParses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. If in strict mode, returns `undefined` if the cookie doesn't follow the guidelines in section 4 of RFC6265. Generally speaking, strict mode can be used to validate your own generated Set-Cookie headers, but acting as a client you want to be lenient and leave strict mode off.\n\nHere's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response:\n\n``` javascript\nif (res.headers['set-cookie'] instanceof Array)\n cookies = res.headers['set-cookie'].map(Cookie.parse);\nelse\n cookies = [Cookie.parse(res.headers['set-cookie'])];\n```\n\nCookie.fromJSON(string)\n-----------------------\n\nConvert a JSON string to a `Cookie` object. Does a `JSON.parse()` and converts the `.created`, `.lastAccessed` and `.expires` properties into `Date` objects.\n\nProperties\n==========\n\n * _key_ - string - the name or key of the cookie (default \"\")\n * _value_ - string - the value of the cookie (default \"\")\n * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `\"Infinity\"`). See `setExpires()`\n * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `\"Infinity\"` and `\"-Infinity\"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()`\n * _domain_ - string - the `Domain=` attribute of the cookie\n * _path_ - string - the `Path=` of the cookie\n * _secure_ - boolean - the `Secure` cookie flag\n * _httpOnly_ - boolean - the `HttpOnly` cookie flag\n * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside)\n \nAfter a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes:\n\n * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied)\n * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one.\n * _created_ - `Date` - when this cookie was added to the jar\n * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute.\n\nConstruction([{options}])\n------------\n\nReceives an options object that can contain any Cookie properties, uses the default for unspecified properties.\n\n.toString()\n-----------\n\nencode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`.\n\n.cookieString()\n---------------\n\nencode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '=').\n\n.setExpires(String)\n-------------------\n\nsets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `\"Infinity\"` (a string) is set.\n\n.setMaxAge(number)\n-------------------\n\nsets the maxAge in seconds. Coerces `-Infinity` to `\"-Infinity\"` and `Infinity` to `\"Infinity\"` so it JSON serializes correctly.\n\n.expiryTime([now=Date.now()])\n-----------------------------\n\n.expiryDate([now=Date.now()])\n-----------------------------\n\nexpiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds.\n\nMax-Age takes precedence over Expires (as per the RFC). The `.created` attribute -- or, by default, the `now` paramter -- is used to offset the `.maxAge` attribute.\n\nIf Expires (`.expires`) is set, that's returned.\n\nOtherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for \"Tue, 19 Jan 2038 03:14:07 GMT\" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents).\n\n.TTL([now=Date.now()])\n---------\n\ncompute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply.\n\nThe \"number\" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned.\n\n.canonicalizedDoman()\n---------------------\n\n.cdomain()\n----------\n\nreturn the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters.\n\n.validate()\n-----------\n\nStatus: *IN PROGRESS*. Works for a few things, but is by no means comprehensive.\n\nvalidates cookie attributes for semantic correctness. Useful for \"lint\" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct:\n\n``` javascript\nif (cookie.validate() === true) {\n // it's tasty\n} else {\n // yuck!\n}\n```\n\nCookieJar\n=========\n\nConstruction([store = new MemoryCookieStore()][, rejectPublicSuffixes])\n------------\n\nSimply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used.\n\n\nAttributes\n----------\n\n * _rejectPublicSuffixes_ - boolean - reject cookies with domains like \"com\" and \"co.uk\" (default: `true`)\n \nSince eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods.\n\n.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie))\n-------------------------------------------------------------------\n\nAttempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.created`, `.lastAccessed` and `.hostOnly` properties.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.\n * _secure_ - boolean - autodetect from url - indicates if this is a \"Secure\" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.\n * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies\n * _strict_ - boolean - default `false` - perform extra checks\n * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. CookieStore errors aren't ignored by this option.\n\nAs per the RFC, the `.hostOnly` property is set if there was no \"Domain=\" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual).\n\n.storeCookie(cookie, [{options},] cb(err,cookie))\n-------------------------------------------------\n\n__REMOVED__ removed in lieu of the CookieStore API below\n \n.getCookies(currentUrl, [{options},] cb(err,cookies))\n-----------------------------------------------------\n\nRetrieve the list of cookies that can be sent in a Cookie header for the current url.\n\nIf an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.\n * _secure_ - boolean - autodetect from url - indicates if this is a \"Secure\" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.\n * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies\n * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially).\n * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the CookieStore `fetchCookies` function (the default MemoryCookieStore supports it).\n\nThe `.lastAccessed` property of the returned cookies will have been updated.\n\n.getCookieString(...)\n---------------------\n\nAccepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`.\n\n.getSetCookieStrings(...)\n-------------------------\n\nAccepts the same options as `.getCookies()` but passes an array of strings suitable for Set-Cookie headers (rather than an array of `Cookie`s) to the callback. Simply maps the cookie array via `.toString()`.\n\n# CookieStore API\n\nThe storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores.\n\nAll `domain` parameters will have been normalized before calling.\n\nThe Cookie store must have all of the following methods.\n\nstore.findCookie(domain, path, key, cb(err,cookie))\n---------------------------------------------------\n\nRetrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned.\n\nCallback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error).\n\nstore.findCookies(domain, path, cb(err,cookies))\n------------------------------------------------\n\nLocates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above.\n\nIf no cookies are found, the callback MUST be passed an empty array.\n\nThe resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done.\n\nAs of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only).\n\nstore.putCookie(cookie, cb(err))\n--------------------------------\n\nAdds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur.\n\nThe `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties.\n\nPass an error if the cookie cannot be stored.\n\nstore.updateCookie(oldCookie, newCookie, cb(err))\n-------------------------------------------------\n\nUpdate an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store.\n\nThe `.lastAccessed` property will always be different between the two objects and `.created` will always be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are sorted (or selected for deletion).\n\nStores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object.\n\nThe `newCookie` and `oldCookie` objects MUST NOT be modified.\n\nPass an error if the newCookie cannot be stored.\n\nstore.removeCookie(domain, path, key, cb(err))\n----------------------------------------------\n\nRemove a cookie from the store (see notes on `findCookie` about the uniqueness constraint).\n\nThe implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie.\n\nstore.removeCookies(domain, path, cb(err))\n------------------------------------------\n\nRemoves matching cookies from the store. The `path` paramter is optional, and if missing means all paths in a domain should be removed.\n\nPass an error ONLY if removing any existing cookies failed.\n\n# TODO\n\n * _full_ RFC5890/RFC5891 canonicalization for domains in `cdomain()`\n * the optional `punycode` requirement implements RFC3492, but RFC6265 requires RFC5891\n * better tests for `validate()`?\n\n# Copyright and License\n\n(tl;dr: MIT with some MPL/1.1)\n\nCopyright GoInstant, Inc. and other contributors. All rights reserved.\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\nPortions may be licensed under different licenses (in particular public-suffix.txt is MPL/1.1); please read the LICENSE file for full details.\n", - "readmeFilename": "README.md", - "_id": "tough-cookie@0.9.15", - "dist": { - "shasum": "0fbda7fb5b5bca17e4f97909a0818dc8c2c12588" - }, - "_from": "tough-cookie@~0.9.15", - "_resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-0.9.15.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/public-suffix.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/public-suffix.txt deleted file mode 100644 index 2c201312..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/public-suffix.txt +++ /dev/null @@ -1,5229 +0,0 @@ -// ***** BEGIN LICENSE BLOCK ***** -// Version: MPL 1.1/GPL 2.0/LGPL 2.1 -// -// The contents of this file are subject to the Mozilla Public License Version -// 1.1 (the "License"); you may not use this file except in compliance with -// the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" basis, -// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -// for the specific language governing rights and limitations under the -// License. -// -// The Original Code is the Public Suffix List. -// -// The Initial Developer of the Original Code is -// Jo Hermans <jo.hermans@gmail.com>. -// Portions created by the Initial Developer are Copyright (C) 2007 -// the Initial Developer. All Rights Reserved. -// -// Contributor(s): -// Ruben Arakelyan <ruben@rubenarakelyan.com> -// Gervase Markham <gerv@gerv.net> -// Pamela Greene <pamg.bugs@gmail.com> -// David Triendl <david@triendl.name> -// Jothan Frakes <jothan@gmail.com> -// The kind representatives of many TLD registries -// -// Alternatively, the contents of this file may be used under the terms of -// either the GNU General Public License Version 2 or later (the "GPL"), or -// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -// in which case the provisions of the GPL or the LGPL are applicable instead -// of those above. If you wish to allow use of your version of this file only -// under the terms of either the GPL or the LGPL, and not to allow others to -// use your version of this file under the terms of the MPL, indicate your -// decision by deleting the provisions above and replace them with the notice -// and other provisions required by the GPL or the LGPL. If you do not delete -// the provisions above, a recipient may use your version of this file under -// the terms of any one of the MPL, the GPL or the LGPL. -// -// ***** END LICENSE BLOCK ***** - -// ===BEGIN ICANN DOMAINS=== - -// ac : http://en.wikipedia.org/wiki/.ac -ac -com.ac -edu.ac -gov.ac -net.ac -mil.ac -org.ac - -// ad : http://en.wikipedia.org/wiki/.ad -ad -nom.ad - -// ae : http://en.wikipedia.org/wiki/.ae -// see also: "Domain Name Eligibility Policy" at http://www.aeda.ae/eng/aepolicy.php -ae -co.ae -net.ae -org.ae -sch.ae -ac.ae -gov.ae -mil.ae - -// aero : see http://www.information.aero/index.php?id=66 -aero -accident-investigation.aero -accident-prevention.aero -aerobatic.aero -aeroclub.aero -aerodrome.aero -agents.aero -aircraft.aero -airline.aero -airport.aero -air-surveillance.aero -airtraffic.aero -air-traffic-control.aero -ambulance.aero -amusement.aero -association.aero -author.aero -ballooning.aero -broker.aero -caa.aero -cargo.aero -catering.aero -certification.aero -championship.aero -charter.aero -civilaviation.aero -club.aero -conference.aero -consultant.aero -consulting.aero -control.aero -council.aero -crew.aero -design.aero -dgca.aero -educator.aero -emergency.aero -engine.aero -engineer.aero -entertainment.aero -equipment.aero -exchange.aero -express.aero -federation.aero -flight.aero -freight.aero -fuel.aero -gliding.aero -government.aero -groundhandling.aero -group.aero -hanggliding.aero -homebuilt.aero -insurance.aero -journal.aero -journalist.aero -leasing.aero -logistics.aero -magazine.aero -maintenance.aero -marketplace.aero -media.aero -microlight.aero -modelling.aero -navigation.aero -parachuting.aero -paragliding.aero -passenger-association.aero -pilot.aero -press.aero -production.aero -recreation.aero -repbody.aero -res.aero -research.aero -rotorcraft.aero -safety.aero -scientist.aero -services.aero -show.aero -skydiving.aero -software.aero -student.aero -taxi.aero -trader.aero -trading.aero -trainer.aero -union.aero -workinggroup.aero -works.aero - -// af : http://www.nic.af/help.jsp -af -gov.af -com.af -org.af -net.af -edu.af - -// ag : http://www.nic.ag/prices.htm -ag -com.ag -org.ag -net.ag -co.ag -nom.ag - -// ai : http://nic.com.ai/ -ai -off.ai -com.ai -net.ai -org.ai - -// al : http://www.ert.gov.al/ert_alb/faq_det.html?Id=31 -al -com.al -edu.al -gov.al -mil.al -net.al -org.al - -// am : http://en.wikipedia.org/wiki/.am -am - -// an : http://www.una.an/an_domreg/default.asp -an -com.an -net.an -org.an -edu.an - -// ao : http://en.wikipedia.org/wiki/.ao -// http://www.dns.ao/REGISTR.DOC -ao -ed.ao -gv.ao -og.ao -co.ao -pb.ao -it.ao - -// aq : http://en.wikipedia.org/wiki/.aq -aq - -// ar : http://en.wikipedia.org/wiki/.ar -*.ar -!congresodelalengua3.ar -!educ.ar -!gobiernoelectronico.ar -!mecon.ar -!nacion.ar -!nic.ar -!promocion.ar -!retina.ar -!uba.ar - -// arpa : http://en.wikipedia.org/wiki/.arpa -// Confirmed by registry <iana-questions@icann.org> 2008-06-18 -e164.arpa -in-addr.arpa -ip6.arpa -iris.arpa -uri.arpa -urn.arpa - -// as : http://en.wikipedia.org/wiki/.as -as -gov.as - -// asia : http://en.wikipedia.org/wiki/.asia -asia - -// at : http://en.wikipedia.org/wiki/.at -// Confirmed by registry <it@nic.at> 2008-06-17 -at -ac.at -co.at -gv.at -or.at - -// au : http://en.wikipedia.org/wiki/.au -// http://www.auda.org.au/ -// 2LDs -com.au -net.au -org.au -edu.au -gov.au -csiro.au -asn.au -id.au -// Historic 2LDs (closed to new registration, but sites still exist) -info.au -conf.au -oz.au -// CGDNs - http://www.cgdn.org.au/ -act.au -nsw.au -nt.au -qld.au -sa.au -tas.au -vic.au -wa.au -// 3LDs -act.edu.au -nsw.edu.au -nt.edu.au -qld.edu.au -sa.edu.au -tas.edu.au -vic.edu.au -wa.edu.au -act.gov.au -// Removed at request of Shae.Donelan@services.nsw.gov.au, 2010-03-04 -// nsw.gov.au -nt.gov.au -qld.gov.au -sa.gov.au -tas.gov.au -vic.gov.au -wa.gov.au - -// aw : http://en.wikipedia.org/wiki/.aw -aw -com.aw - -// ax : http://en.wikipedia.org/wiki/.ax -ax - -// az : http://en.wikipedia.org/wiki/.az -az -com.az -net.az -int.az -gov.az -org.az -edu.az -info.az -pp.az -mil.az -name.az -pro.az -biz.az - -// ba : http://en.wikipedia.org/wiki/.ba -ba -org.ba -net.ba -edu.ba -gov.ba -mil.ba -unsa.ba -unbi.ba -co.ba -com.ba -rs.ba - -// bb : http://en.wikipedia.org/wiki/.bb -bb -biz.bb -com.bb -edu.bb -gov.bb -info.bb -net.bb -org.bb -store.bb - -// bd : http://en.wikipedia.org/wiki/.bd -*.bd - -// be : http://en.wikipedia.org/wiki/.be -// Confirmed by registry <tech@dns.be> 2008-06-08 -be -ac.be - -// bf : http://en.wikipedia.org/wiki/.bf -bf -gov.bf - -// bg : http://en.wikipedia.org/wiki/.bg -// https://www.register.bg/user/static/rules/en/index.html -bg -a.bg -b.bg -c.bg -d.bg -e.bg -f.bg -g.bg -h.bg -i.bg -j.bg -k.bg -l.bg -m.bg -n.bg -o.bg -p.bg -q.bg -r.bg -s.bg -t.bg -u.bg -v.bg -w.bg -x.bg -y.bg -z.bg -0.bg -1.bg -2.bg -3.bg -4.bg -5.bg -6.bg -7.bg -8.bg -9.bg - -// bh : http://en.wikipedia.org/wiki/.bh -bh -com.bh -edu.bh -net.bh -org.bh -gov.bh - -// bi : http://en.wikipedia.org/wiki/.bi -// http://whois.nic.bi/ -bi -co.bi -com.bi -edu.bi -or.bi -org.bi - -// biz : http://en.wikipedia.org/wiki/.biz -biz - -// bj : http://en.wikipedia.org/wiki/.bj -bj -asso.bj -barreau.bj -gouv.bj - -// bm : http://www.bermudanic.bm/dnr-text.txt -bm -com.bm -edu.bm -gov.bm -net.bm -org.bm - -// bn : http://en.wikipedia.org/wiki/.bn -*.bn - -// bo : http://www.nic.bo/ -bo -com.bo -edu.bo -gov.bo -gob.bo -int.bo -org.bo -net.bo -mil.bo -tv.bo - -// br : http://registro.br/dominio/dpn.html -// Updated by registry <fneves@registro.br> 2011-03-01 -br -adm.br -adv.br -agr.br -am.br -arq.br -art.br -ato.br -b.br -bio.br -blog.br -bmd.br -can.br -cim.br -cng.br -cnt.br -com.br -coop.br -ecn.br -edu.br -emp.br -eng.br -esp.br -etc.br -eti.br -far.br -flog.br -fm.br -fnd.br -fot.br -fst.br -g12.br -ggf.br -gov.br -imb.br -ind.br -inf.br -jor.br -jus.br -lel.br -mat.br -med.br -mil.br -mus.br -net.br -nom.br -not.br -ntr.br -odo.br -org.br -ppg.br -pro.br -psc.br -psi.br -qsl.br -radio.br -rec.br -slg.br -srv.br -taxi.br -teo.br -tmp.br -trd.br -tur.br -tv.br -vet.br -vlog.br -wiki.br -zlg.br - -// bs : http://www.nic.bs/rules.html -bs -com.bs -net.bs -org.bs -edu.bs -gov.bs - -// bt : http://en.wikipedia.org/wiki/.bt -bt -com.bt -edu.bt -gov.bt -net.bt -org.bt - -// bv : No registrations at this time. -// Submitted by registry <jarle@uninett.no> 2006-06-16 - -// bw : http://en.wikipedia.org/wiki/.bw -// http://www.gobin.info/domainname/bw.doc -// list of other 2nd level tlds ? -bw -co.bw -org.bw - -// by : http://en.wikipedia.org/wiki/.by -// http://tld.by/rules_2006_en.html -// list of other 2nd level tlds ? -by -gov.by -mil.by -// Official information does not indicate that com.by is a reserved -// second-level domain, but it's being used as one (see www.google.com.by and -// www.yahoo.com.by, for example), so we list it here for safety's sake. -com.by - -// http://hoster.by/ -of.by - -// bz : http://en.wikipedia.org/wiki/.bz -// http://www.belizenic.bz/ -bz -com.bz -net.bz -org.bz -edu.bz -gov.bz - -// ca : http://en.wikipedia.org/wiki/.ca -ca -// ca geographical names -ab.ca -bc.ca -mb.ca -nb.ca -nf.ca -nl.ca -ns.ca -nt.ca -nu.ca -on.ca -pe.ca -qc.ca -sk.ca -yk.ca -// gc.ca: http://en.wikipedia.org/wiki/.gc.ca -// see also: http://registry.gc.ca/en/SubdomainFAQ -gc.ca - -// cat : http://en.wikipedia.org/wiki/.cat -cat - -// cc : http://en.wikipedia.org/wiki/.cc -cc - -// cd : http://en.wikipedia.org/wiki/.cd -// see also: https://www.nic.cd/domain/insertDomain_2.jsp?act=1 -cd -gov.cd - -// cf : http://en.wikipedia.org/wiki/.cf -cf - -// cg : http://en.wikipedia.org/wiki/.cg -cg - -// ch : http://en.wikipedia.org/wiki/.ch -ch - -// ci : http://en.wikipedia.org/wiki/.ci -// http://www.nic.ci/index.php?page=charte -ci -org.ci -or.ci -com.ci -co.ci -edu.ci -ed.ci -ac.ci -net.ci -go.ci -asso.ci -aéroport.ci -int.ci -presse.ci -md.ci -gouv.ci - -// ck : http://en.wikipedia.org/wiki/.ck -*.ck -!www.ck - -// cl : http://en.wikipedia.org/wiki/.cl -cl -gov.cl -gob.cl -co.cl -mil.cl - -// cm : http://en.wikipedia.org/wiki/.cm -cm -gov.cm - -// cn : http://en.wikipedia.org/wiki/.cn -// Submitted by registry <tanyaling@cnnic.cn> 2008-06-11 -cn -ac.cn -com.cn -edu.cn -gov.cn -net.cn -org.cn -mil.cn -公司.cn -网络.cn -網絡.cn -// cn geographic names -ah.cn -bj.cn -cq.cn -fj.cn -gd.cn -gs.cn -gz.cn -gx.cn -ha.cn -hb.cn -he.cn -hi.cn -hl.cn -hn.cn -jl.cn -js.cn -jx.cn -ln.cn -nm.cn -nx.cn -qh.cn -sc.cn -sd.cn -sh.cn -sn.cn -sx.cn -tj.cn -xj.cn -xz.cn -yn.cn -zj.cn -hk.cn -mo.cn -tw.cn - -// co : http://en.wikipedia.org/wiki/.co -// Submitted by registry <tecnico@uniandes.edu.co> 2008-06-11 -co -arts.co -com.co -edu.co -firm.co -gov.co -info.co -int.co -mil.co -net.co -nom.co -org.co -rec.co -web.co - -// com : http://en.wikipedia.org/wiki/.com -com - -// coop : http://en.wikipedia.org/wiki/.coop -coop - -// cr : http://www.nic.cr/niccr_publico/showRegistroDominiosScreen.do -cr -ac.cr -co.cr -ed.cr -fi.cr -go.cr -or.cr -sa.cr - -// cu : http://en.wikipedia.org/wiki/.cu -cu -com.cu -edu.cu -org.cu -net.cu -gov.cu -inf.cu - -// cv : http://en.wikipedia.org/wiki/.cv -cv - -// cx : http://en.wikipedia.org/wiki/.cx -// list of other 2nd level tlds ? -cx -gov.cx - -// cy : http://en.wikipedia.org/wiki/.cy -*.cy - -// cz : http://en.wikipedia.org/wiki/.cz -cz - -// de : http://en.wikipedia.org/wiki/.de -// Confirmed by registry <ops@denic.de> (with technical -// reservations) 2008-07-01 -de - -// dj : http://en.wikipedia.org/wiki/.dj -dj - -// dk : http://en.wikipedia.org/wiki/.dk -// Confirmed by registry <robert@dk-hostmaster.dk> 2008-06-17 -dk - -// dm : http://en.wikipedia.org/wiki/.dm -dm -com.dm -net.dm -org.dm -edu.dm -gov.dm - -// do : http://en.wikipedia.org/wiki/.do -do -art.do -com.do -edu.do -gob.do -gov.do -mil.do -net.do -org.do -sld.do -web.do - -// dz : http://en.wikipedia.org/wiki/.dz -dz -com.dz -org.dz -net.dz -gov.dz -edu.dz -asso.dz -pol.dz -art.dz - -// ec : http://www.nic.ec/reg/paso1.asp -// Submitted by registry <vabboud@nic.ec> 2008-07-04 -ec -com.ec -info.ec -net.ec -fin.ec -k12.ec -med.ec -pro.ec -org.ec -edu.ec -gov.ec -gob.ec -mil.ec - -// edu : http://en.wikipedia.org/wiki/.edu -edu - -// ee : http://www.eenet.ee/EENet/dom_reeglid.html#lisa_B -ee -edu.ee -gov.ee -riik.ee -lib.ee -med.ee -com.ee -pri.ee -aip.ee -org.ee -fie.ee - -// eg : http://en.wikipedia.org/wiki/.eg -eg -com.eg -edu.eg -eun.eg -gov.eg -mil.eg -name.eg -net.eg -org.eg -sci.eg - -// er : http://en.wikipedia.org/wiki/.er -*.er - -// es : https://www.nic.es/site_ingles/ingles/dominios/index.html -es -com.es -nom.es -org.es -gob.es -edu.es - -// et : http://en.wikipedia.org/wiki/.et -*.et - -// eu : http://en.wikipedia.org/wiki/.eu -eu - -// fi : http://en.wikipedia.org/wiki/.fi -fi -// aland.fi : http://en.wikipedia.org/wiki/.ax -// This domain is being phased out in favor of .ax. As there are still many -// domains under aland.fi, we still keep it on the list until aland.fi is -// completely removed. -// TODO: Check for updates (expected to be phased out around Q1/2009) -aland.fi - -// fj : http://en.wikipedia.org/wiki/.fj -*.fj - -// fk : http://en.wikipedia.org/wiki/.fk -*.fk - -// fm : http://en.wikipedia.org/wiki/.fm -fm - -// fo : http://en.wikipedia.org/wiki/.fo -fo - -// fr : http://www.afnic.fr/ -// domaines descriptifs : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-descriptifs -fr -com.fr -asso.fr -nom.fr -prd.fr -presse.fr -tm.fr -// domaines sectoriels : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-sectoriels -aeroport.fr -assedic.fr -avocat.fr -avoues.fr -cci.fr -chambagri.fr -chirurgiens-dentistes.fr -experts-comptables.fr -geometre-expert.fr -gouv.fr -greta.fr -huissier-justice.fr -medecin.fr -notaires.fr -pharmacien.fr -port.fr -veterinaire.fr - -// ga : http://en.wikipedia.org/wiki/.ga -ga - -// gb : This registry is effectively dormant -// Submitted by registry <Damien.Shaw@ja.net> 2008-06-12 - -// gd : http://en.wikipedia.org/wiki/.gd -gd - -// ge : http://www.nic.net.ge/policy_en.pdf -ge -com.ge -edu.ge -gov.ge -org.ge -mil.ge -net.ge -pvt.ge - -// gf : http://en.wikipedia.org/wiki/.gf -gf - -// gg : http://www.channelisles.net/applic/avextn.shtml -gg -co.gg -org.gg -net.gg -sch.gg -gov.gg - -// gh : http://en.wikipedia.org/wiki/.gh -// see also: http://www.nic.gh/reg_now.php -// Although domains directly at second level are not possible at the moment, -// they have been possible for some time and may come back. -gh -com.gh -edu.gh -gov.gh -org.gh -mil.gh - -// gi : http://www.nic.gi/rules.html -gi -com.gi -ltd.gi -gov.gi -mod.gi -edu.gi -org.gi - -// gl : http://en.wikipedia.org/wiki/.gl -// http://nic.gl -gl - -// gm : http://www.nic.gm/htmlpages%5Cgm-policy.htm -gm - -// gn : http://psg.com/dns/gn/gn.txt -// Submitted by registry <randy@psg.com> 2008-06-17 -ac.gn -com.gn -edu.gn -gov.gn -org.gn -net.gn - -// gov : http://en.wikipedia.org/wiki/.gov -gov - -// gp : http://www.nic.gp/index.php?lang=en -gp -com.gp -net.gp -mobi.gp -edu.gp -org.gp -asso.gp - -// gq : http://en.wikipedia.org/wiki/.gq -gq - -// gr : https://grweb.ics.forth.gr/english/1617-B-2005.html -// Submitted by registry <segred@ics.forth.gr> 2008-06-09 -gr -com.gr -edu.gr -net.gr -org.gr -gov.gr - -// gs : http://en.wikipedia.org/wiki/.gs -gs - -// gt : http://www.gt/politicas.html -*.gt -!www.gt - -// gu : http://gadao.gov.gu/registration.txt -*.gu - -// gw : http://en.wikipedia.org/wiki/.gw -gw - -// gy : http://en.wikipedia.org/wiki/.gy -// http://registry.gy/ -gy -co.gy -com.gy -net.gy - -// hk : https://www.hkdnr.hk -// Submitted by registry <hk.tech@hkirc.hk> 2008-06-11 -hk -com.hk -edu.hk -gov.hk -idv.hk -net.hk -org.hk -公司.hk -教育.hk -敎育.hk -政府.hk -個人.hk -个人.hk -箇人.hk -網络.hk -网络.hk -组織.hk -網絡.hk -网絡.hk -组织.hk -組織.hk -組织.hk - -// hm : http://en.wikipedia.org/wiki/.hm -hm - -// hn : http://www.nic.hn/politicas/ps02,,05.html -hn -com.hn -edu.hn -org.hn -net.hn -mil.hn -gob.hn - -// hr : http://www.dns.hr/documents/pdf/HRTLD-regulations.pdf -hr -iz.hr -from.hr -name.hr -com.hr - -// ht : http://www.nic.ht/info/charte.cfm -ht -com.ht -shop.ht -firm.ht -info.ht -adult.ht -net.ht -pro.ht -org.ht -med.ht -art.ht -coop.ht -pol.ht -asso.ht -edu.ht -rel.ht -gouv.ht -perso.ht - -// hu : http://www.domain.hu/domain/English/sld.html -// Confirmed by registry <pasztor@iszt.hu> 2008-06-12 -hu -co.hu -info.hu -org.hu -priv.hu -sport.hu -tm.hu -2000.hu -agrar.hu -bolt.hu -casino.hu -city.hu -erotica.hu -erotika.hu -film.hu -forum.hu -games.hu -hotel.hu -ingatlan.hu -jogasz.hu -konyvelo.hu -lakas.hu -media.hu -news.hu -reklam.hu -sex.hu -shop.hu -suli.hu -szex.hu -tozsde.hu -utazas.hu -video.hu - -// id : http://en.wikipedia.org/wiki/.id -// see also: https://register.pandi.or.id/ -id -ac.id -co.id -go.id -mil.id -net.id -or.id -sch.id -web.id - -// ie : http://en.wikipedia.org/wiki/.ie -ie -gov.ie - -// il : http://en.wikipedia.org/wiki/.il -*.il - -// im : https://www.nic.im/pdfs/imfaqs.pdf -im -co.im -ltd.co.im -plc.co.im -net.im -gov.im -org.im -nic.im -ac.im - -// in : http://en.wikipedia.org/wiki/.in -// see also: http://www.inregistry.in/policies/ -// Please note, that nic.in is not an offical eTLD, but used by most -// government institutions. -in -co.in -firm.in -net.in -org.in -gen.in -ind.in -nic.in -ac.in -edu.in -res.in -gov.in -mil.in - -// info : http://en.wikipedia.org/wiki/.info -info - -// int : http://en.wikipedia.org/wiki/.int -// Confirmed by registry <iana-questions@icann.org> 2008-06-18 -int -eu.int - -// io : http://www.nic.io/rules.html -// list of other 2nd level tlds ? -io -com.io - -// iq : http://www.cmc.iq/english/iq/iqregister1.htm -iq -gov.iq -edu.iq -mil.iq -com.iq -org.iq -net.iq - -// ir : http://www.nic.ir/Terms_and_Conditions_ir,_Appendix_1_Domain_Rules -// Also see http://www.nic.ir/Internationalized_Domain_Names -// Two <iran>.ir entries added at request of <tech-team@nic.ir>, 2010-04-16 -ir -ac.ir -co.ir -gov.ir -id.ir -net.ir -org.ir -sch.ir -// xn--mgba3a4f16a.ir (<iran>.ir, Persian YEH) -ایران.ir -// xn--mgba3a4fra.ir (<iran>.ir, Arabic YEH) -ايران.ir - -// is : http://www.isnic.is/domain/rules.php -// Confirmed by registry <marius@isgate.is> 2008-12-06 -is -net.is -com.is -edu.is -gov.is -org.is -int.is - -// it : http://en.wikipedia.org/wiki/.it -it -gov.it -edu.it -// list of reserved geo-names : -// http://www.nic.it/documenti/regolamenti-e-linee-guida/regolamento-assegnazione-versione-6.0.pdf -// (There is also a list of reserved geo-names corresponding to Italian -// municipalities : http://www.nic.it/documenti/appendice-c.pdf , but it is -// not included here.) -agrigento.it -ag.it -alessandria.it -al.it -ancona.it -an.it -aosta.it -aoste.it -ao.it -arezzo.it -ar.it -ascoli-piceno.it -ascolipiceno.it -ap.it -asti.it -at.it -avellino.it -av.it -bari.it -ba.it -andria-barletta-trani.it -andriabarlettatrani.it -trani-barletta-andria.it -tranibarlettaandria.it -barletta-trani-andria.it -barlettatraniandria.it -andria-trani-barletta.it -andriatranibarletta.it -trani-andria-barletta.it -traniandriabarletta.it -bt.it -belluno.it -bl.it -benevento.it -bn.it -bergamo.it -bg.it -biella.it -bi.it -bologna.it -bo.it -bolzano.it -bozen.it -balsan.it -alto-adige.it -altoadige.it -suedtirol.it -bz.it -brescia.it -bs.it -brindisi.it -br.it -cagliari.it -ca.it -caltanissetta.it -cl.it -campobasso.it -cb.it -carboniaiglesias.it -carbonia-iglesias.it -iglesias-carbonia.it -iglesiascarbonia.it -ci.it -caserta.it -ce.it -catania.it -ct.it -catanzaro.it -cz.it -chieti.it -ch.it -como.it -co.it -cosenza.it -cs.it -cremona.it -cr.it -crotone.it -kr.it -cuneo.it -cn.it -dell-ogliastra.it -dellogliastra.it -ogliastra.it -og.it -enna.it -en.it -ferrara.it -fe.it -fermo.it -fm.it -firenze.it -florence.it -fi.it -foggia.it -fg.it -forli-cesena.it -forlicesena.it -cesena-forli.it -cesenaforli.it -fc.it -frosinone.it -fr.it -genova.it -genoa.it -ge.it -gorizia.it -go.it -grosseto.it -gr.it -imperia.it -im.it -isernia.it -is.it -laquila.it -aquila.it -aq.it -la-spezia.it -laspezia.it -sp.it -latina.it -lt.it -lecce.it -le.it -lecco.it -lc.it -livorno.it -li.it -lodi.it -lo.it -lucca.it -lu.it -macerata.it -mc.it -mantova.it -mn.it -massa-carrara.it -massacarrara.it -carrara-massa.it -carraramassa.it -ms.it -matera.it -mt.it -medio-campidano.it -mediocampidano.it -campidano-medio.it -campidanomedio.it -vs.it -messina.it -me.it -milano.it -milan.it -mi.it -modena.it -mo.it -monza.it -monza-brianza.it -monzabrianza.it -monzaebrianza.it -monzaedellabrianza.it -monza-e-della-brianza.it -mb.it -napoli.it -naples.it -na.it -novara.it -no.it -nuoro.it -nu.it -oristano.it -or.it -padova.it -padua.it -pd.it -palermo.it -pa.it -parma.it -pr.it -pavia.it -pv.it -perugia.it -pg.it -pescara.it -pe.it -pesaro-urbino.it -pesarourbino.it -urbino-pesaro.it -urbinopesaro.it -pu.it -piacenza.it -pc.it -pisa.it -pi.it -pistoia.it -pt.it -pordenone.it -pn.it -potenza.it -pz.it -prato.it -po.it -ragusa.it -rg.it -ravenna.it -ra.it -reggio-calabria.it -reggiocalabria.it -rc.it -reggio-emilia.it -reggioemilia.it -re.it -rieti.it -ri.it -rimini.it -rn.it -roma.it -rome.it -rm.it -rovigo.it -ro.it -salerno.it -sa.it -sassari.it -ss.it -savona.it -sv.it -siena.it -si.it -siracusa.it -sr.it -sondrio.it -so.it -taranto.it -ta.it -tempio-olbia.it -tempioolbia.it -olbia-tempio.it -olbiatempio.it -ot.it -teramo.it -te.it -terni.it -tr.it -torino.it -turin.it -to.it -trapani.it -tp.it -trento.it -trentino.it -tn.it -treviso.it -tv.it -trieste.it -ts.it -udine.it -ud.it -varese.it -va.it -venezia.it -venice.it -ve.it -verbania.it -vb.it -vercelli.it -vc.it -verona.it -vr.it -vibo-valentia.it -vibovalentia.it -vv.it -vicenza.it -vi.it -viterbo.it -vt.it - -// je : http://www.channelisles.net/applic/avextn.shtml -je -co.je -org.je -net.je -sch.je -gov.je - -// jm : http://www.com.jm/register.html -*.jm - -// jo : http://www.dns.jo/Registration_policy.aspx -jo -com.jo -org.jo -net.jo -edu.jo -sch.jo -gov.jo -mil.jo -name.jo - -// jobs : http://en.wikipedia.org/wiki/.jobs -jobs - -// jp : http://en.wikipedia.org/wiki/.jp -// http://jprs.co.jp/en/jpdomain.html -// Submitted by registry <yone@jprs.co.jp> 2008-06-11 -// Updated by registry <yone@jprs.co.jp> 2008-12-04 -jp -// jp organizational type names -ac.jp -ad.jp -co.jp -ed.jp -go.jp -gr.jp -lg.jp -ne.jp -or.jp -// jp geographic type names -// http://jprs.jp/doc/rule/saisoku-1.html -*.aichi.jp -*.akita.jp -*.aomori.jp -*.chiba.jp -*.ehime.jp -*.fukui.jp -*.fukuoka.jp -*.fukushima.jp -*.gifu.jp -*.gunma.jp -*.hiroshima.jp -*.hokkaido.jp -*.hyogo.jp -*.ibaraki.jp -*.ishikawa.jp -*.iwate.jp -*.kagawa.jp -*.kagoshima.jp -*.kanagawa.jp -*.kawasaki.jp -*.kitakyushu.jp -*.kobe.jp -*.kochi.jp -*.kumamoto.jp -*.kyoto.jp -*.mie.jp -*.miyagi.jp -*.miyazaki.jp -*.nagano.jp -*.nagasaki.jp -*.nagoya.jp -*.nara.jp -*.niigata.jp -*.oita.jp -*.okayama.jp -*.okinawa.jp -*.osaka.jp -*.saga.jp -*.saitama.jp -*.sapporo.jp -*.sendai.jp -*.shiga.jp -*.shimane.jp -*.shizuoka.jp -*.tochigi.jp -*.tokushima.jp -*.tokyo.jp -*.tottori.jp -*.toyama.jp -*.wakayama.jp -*.yamagata.jp -*.yamaguchi.jp -*.yamanashi.jp -*.yokohama.jp -!metro.tokyo.jp -!pref.aichi.jp -!pref.akita.jp -!pref.aomori.jp -!pref.chiba.jp -!pref.ehime.jp -!pref.fukui.jp -!pref.fukuoka.jp -!pref.fukushima.jp -!pref.gifu.jp -!pref.gunma.jp -!pref.hiroshima.jp -!pref.hokkaido.jp -!pref.hyogo.jp -!pref.ibaraki.jp -!pref.ishikawa.jp -!pref.iwate.jp -!pref.kagawa.jp -!pref.kagoshima.jp -!pref.kanagawa.jp -!pref.kochi.jp -!pref.kumamoto.jp -!pref.kyoto.jp -!pref.mie.jp -!pref.miyagi.jp -!pref.miyazaki.jp -!pref.nagano.jp -!pref.nagasaki.jp -!pref.nara.jp -!pref.niigata.jp -!pref.oita.jp -!pref.okayama.jp -!pref.okinawa.jp -!pref.osaka.jp -!pref.saga.jp -!pref.saitama.jp -!pref.shiga.jp -!pref.shimane.jp -!pref.shizuoka.jp -!pref.tochigi.jp -!pref.tokushima.jp -!pref.tottori.jp -!pref.toyama.jp -!pref.wakayama.jp -!pref.yamagata.jp -!pref.yamaguchi.jp -!pref.yamanashi.jp -!city.chiba.jp -!city.fukuoka.jp -!city.hiroshima.jp -!city.kawasaki.jp -!city.kitakyushu.jp -!city.kobe.jp -!city.kyoto.jp -!city.nagoya.jp -!city.niigata.jp -!city.okayama.jp -!city.osaka.jp -!city.saitama.jp -!city.sapporo.jp -!city.sendai.jp -!city.shizuoka.jp -!city.yokohama.jp - -// ke : http://www.kenic.or.ke/index.php?option=com_content&task=view&id=117&Itemid=145 -*.ke - -// kg : http://www.domain.kg/dmn_n.html -kg -org.kg -net.kg -com.kg -edu.kg -gov.kg -mil.kg - -// kh : http://www.mptc.gov.kh/dns_registration.htm -*.kh - -// ki : http://www.ki/dns/index.html -ki -edu.ki -biz.ki -net.ki -org.ki -gov.ki -info.ki -com.ki - -// km : http://en.wikipedia.org/wiki/.km -// http://www.domaine.km/documents/charte.doc -km -org.km -nom.km -gov.km -prd.km -tm.km -edu.km -mil.km -ass.km -com.km -// These are only mentioned as proposed suggestions at domaine.km, but -// http://en.wikipedia.org/wiki/.km says they're available for registration: -coop.km -asso.km -presse.km -medecin.km -notaires.km -pharmaciens.km -veterinaire.km -gouv.km - -// kn : http://en.wikipedia.org/wiki/.kn -// http://www.dot.kn/domainRules.html -kn -net.kn -org.kn -edu.kn -gov.kn - -// kp : http://www.kcce.kp/en_index.php -com.kp -edu.kp -gov.kp -org.kp -rep.kp -tra.kp - -// kr : http://en.wikipedia.org/wiki/.kr -// see also: http://domain.nida.or.kr/eng/registration.jsp -kr -ac.kr -co.kr -es.kr -go.kr -hs.kr -kg.kr -mil.kr -ms.kr -ne.kr -or.kr -pe.kr -re.kr -sc.kr -// kr geographical names -busan.kr -chungbuk.kr -chungnam.kr -daegu.kr -daejeon.kr -gangwon.kr -gwangju.kr -gyeongbuk.kr -gyeonggi.kr -gyeongnam.kr -incheon.kr -jeju.kr -jeonbuk.kr -jeonnam.kr -seoul.kr -ulsan.kr - -// kw : http://en.wikipedia.org/wiki/.kw -*.kw - -// ky : http://www.icta.ky/da_ky_reg_dom.php -// Confirmed by registry <kysupport@perimeterusa.com> 2008-06-17 -ky -edu.ky -gov.ky -com.ky -org.ky -net.ky - -// kz : http://en.wikipedia.org/wiki/.kz -// see also: http://www.nic.kz/rules/index.jsp -kz -org.kz -edu.kz -net.kz -gov.kz -mil.kz -com.kz - -// la : http://en.wikipedia.org/wiki/.la -// Submitted by registry <gavin.brown@nic.la> 2008-06-10 -la -int.la -net.la -info.la -edu.la -gov.la -per.la -com.la -org.la - -// lb : http://en.wikipedia.org/wiki/.lb -// Submitted by registry <randy@psg.com> 2008-06-17 -com.lb -edu.lb -gov.lb -net.lb -org.lb - -// lc : http://en.wikipedia.org/wiki/.lc -// see also: http://www.nic.lc/rules.htm -lc -com.lc -net.lc -co.lc -org.lc -edu.lc -gov.lc - -// li : http://en.wikipedia.org/wiki/.li -li - -// lk : http://www.nic.lk/seclevpr.html -lk -gov.lk -sch.lk -net.lk -int.lk -com.lk -org.lk -edu.lk -ngo.lk -soc.lk -web.lk -ltd.lk -assn.lk -grp.lk -hotel.lk - -// lr : http://psg.com/dns/lr/lr.txt -// Submitted by registry <randy@psg.com> 2008-06-17 -com.lr -edu.lr -gov.lr -org.lr -net.lr - -// ls : http://en.wikipedia.org/wiki/.ls -ls -co.ls -org.ls - -// lt : http://en.wikipedia.org/wiki/.lt -lt -// gov.lt : http://www.gov.lt/index_en.php -gov.lt - -// lu : http://www.dns.lu/en/ -lu - -// lv : http://www.nic.lv/DNS/En/generic.php -lv -com.lv -edu.lv -gov.lv -org.lv -mil.lv -id.lv -net.lv -asn.lv -conf.lv - -// ly : http://www.nic.ly/regulations.php -ly -com.ly -net.ly -gov.ly -plc.ly -edu.ly -sch.ly -med.ly -org.ly -id.ly - -// ma : http://en.wikipedia.org/wiki/.ma -// http://www.anrt.ma/fr/admin/download/upload/file_fr782.pdf -ma -co.ma -net.ma -gov.ma -org.ma -ac.ma -press.ma - -// mc : http://www.nic.mc/ -mc -tm.mc -asso.mc - -// md : http://en.wikipedia.org/wiki/.md -md - -// me : http://en.wikipedia.org/wiki/.me -me -co.me -net.me -org.me -edu.me -ac.me -gov.me -its.me -priv.me - -// mg : http://www.nic.mg/tarif.htm -mg -org.mg -nom.mg -gov.mg -prd.mg -tm.mg -edu.mg -mil.mg -com.mg - -// mh : http://en.wikipedia.org/wiki/.mh -mh - -// mil : http://en.wikipedia.org/wiki/.mil -mil - -// mk : http://en.wikipedia.org/wiki/.mk -// see also: http://dns.marnet.net.mk/postapka.php -mk -com.mk -org.mk -net.mk -edu.mk -gov.mk -inf.mk -name.mk - -// ml : http://www.gobin.info/domainname/ml-template.doc -// see also: http://en.wikipedia.org/wiki/.ml -ml -com.ml -edu.ml -gouv.ml -gov.ml -net.ml -org.ml -presse.ml - -// mm : http://en.wikipedia.org/wiki/.mm -*.mm - -// mn : http://en.wikipedia.org/wiki/.mn -mn -gov.mn -edu.mn -org.mn - -// mo : http://www.monic.net.mo/ -mo -com.mo -net.mo -org.mo -edu.mo -gov.mo - -// mobi : http://en.wikipedia.org/wiki/.mobi -mobi - -// mp : http://www.dot.mp/ -// Confirmed by registry <dcamacho@saipan.com> 2008-06-17 -mp - -// mq : http://en.wikipedia.org/wiki/.mq -mq - -// mr : http://en.wikipedia.org/wiki/.mr -mr -gov.mr - -// ms : http://en.wikipedia.org/wiki/.ms -ms - -// mt : https://www.nic.org.mt/dotmt/ -*.mt - -// mu : http://en.wikipedia.org/wiki/.mu -mu -com.mu -net.mu -org.mu -gov.mu -ac.mu -co.mu -or.mu - -// museum : http://about.museum/naming/ -// http://index.museum/ -museum -academy.museum -agriculture.museum -air.museum -airguard.museum -alabama.museum -alaska.museum -amber.museum -ambulance.museum -american.museum -americana.museum -americanantiques.museum -americanart.museum -amsterdam.museum -and.museum -annefrank.museum -anthro.museum -anthropology.museum -antiques.museum -aquarium.museum -arboretum.museum -archaeological.museum -archaeology.museum -architecture.museum -art.museum -artanddesign.museum -artcenter.museum -artdeco.museum -arteducation.museum -artgallery.museum -arts.museum -artsandcrafts.museum -asmatart.museum -assassination.museum -assisi.museum -association.museum -astronomy.museum -atlanta.museum -austin.museum -australia.museum -automotive.museum -aviation.museum -axis.museum -badajoz.museum -baghdad.museum -bahn.museum -bale.museum -baltimore.museum -barcelona.museum -baseball.museum -basel.museum -baths.museum -bauern.museum -beauxarts.museum -beeldengeluid.museum -bellevue.museum -bergbau.museum -berkeley.museum -berlin.museum -bern.museum -bible.museum -bilbao.museum -bill.museum -birdart.museum -birthplace.museum -bonn.museum -boston.museum -botanical.museum -botanicalgarden.museum -botanicgarden.museum -botany.museum -brandywinevalley.museum -brasil.museum -bristol.museum -british.museum -britishcolumbia.museum -broadcast.museum -brunel.museum -brussel.museum -brussels.museum -bruxelles.museum -building.museum -burghof.museum -bus.museum -bushey.museum -cadaques.museum -california.museum -cambridge.museum -can.museum -canada.museum -capebreton.museum -carrier.museum -cartoonart.museum -casadelamoneda.museum -castle.museum -castres.museum -celtic.museum -center.museum -chattanooga.museum -cheltenham.museum -chesapeakebay.museum -chicago.museum -children.museum -childrens.museum -childrensgarden.museum -chiropractic.museum -chocolate.museum -christiansburg.museum -cincinnati.museum -cinema.museum -circus.museum -civilisation.museum -civilization.museum -civilwar.museum -clinton.museum -clock.museum -coal.museum -coastaldefence.museum -cody.museum -coldwar.museum -collection.museum -colonialwilliamsburg.museum -coloradoplateau.museum -columbia.museum -columbus.museum -communication.museum -communications.museum -community.museum -computer.museum -computerhistory.museum -comunicações.museum -contemporary.museum -contemporaryart.museum -convent.museum -copenhagen.museum -corporation.museum -correios-e-telecomunicações.museum -corvette.museum -costume.museum -countryestate.museum -county.museum -crafts.museum -cranbrook.museum -creation.museum -cultural.museum -culturalcenter.museum -culture.museum -cyber.museum -cymru.museum -dali.museum -dallas.museum -database.museum -ddr.museum -decorativearts.museum -delaware.museum -delmenhorst.museum -denmark.museum -depot.museum -design.museum -detroit.museum -dinosaur.museum -discovery.museum -dolls.museum -donostia.museum -durham.museum -eastafrica.museum -eastcoast.museum -education.museum -educational.museum -egyptian.museum -eisenbahn.museum -elburg.museum -elvendrell.museum -embroidery.museum -encyclopedic.museum -england.museum -entomology.museum -environment.museum -environmentalconservation.museum -epilepsy.museum -essex.museum -estate.museum -ethnology.museum -exeter.museum -exhibition.museum -family.museum -farm.museum -farmequipment.museum -farmers.museum -farmstead.museum -field.museum -figueres.museum -filatelia.museum -film.museum -fineart.museum -finearts.museum -finland.museum -flanders.museum -florida.museum -force.museum -fortmissoula.museum -fortworth.museum -foundation.museum -francaise.museum -frankfurt.museum -franziskaner.museum -freemasonry.museum -freiburg.museum -fribourg.museum -frog.museum -fundacio.museum -furniture.museum -gallery.museum -garden.museum -gateway.museum -geelvinck.museum -gemological.museum -geology.museum -georgia.museum -giessen.museum -glas.museum -glass.museum -gorge.museum -grandrapids.museum -graz.museum -guernsey.museum -halloffame.museum -hamburg.museum -handson.museum -harvestcelebration.museum -hawaii.museum -health.museum -heimatunduhren.museum -hellas.museum -helsinki.museum -hembygdsforbund.museum -heritage.museum -histoire.museum -historical.museum -historicalsociety.museum -historichouses.museum -historisch.museum -historisches.museum -history.museum -historyofscience.museum -horology.museum -house.museum -humanities.museum -illustration.museum -imageandsound.museum -indian.museum -indiana.museum -indianapolis.museum -indianmarket.museum -intelligence.museum -interactive.museum -iraq.museum -iron.museum -isleofman.museum -jamison.museum -jefferson.museum -jerusalem.museum -jewelry.museum -jewish.museum -jewishart.museum -jfk.museum -journalism.museum -judaica.museum -judygarland.museum -juedisches.museum -juif.museum -karate.museum -karikatur.museum -kids.museum -koebenhavn.museum -koeln.museum -kunst.museum -kunstsammlung.museum -kunstunddesign.museum -labor.museum -labour.museum -lajolla.museum -lancashire.museum -landes.museum -lans.museum -läns.museum -larsson.museum -lewismiller.museum -lincoln.museum -linz.museum -living.museum -livinghistory.museum -localhistory.museum -london.museum -losangeles.museum -louvre.museum -loyalist.museum -lucerne.museum -luxembourg.museum -luzern.museum -mad.museum -madrid.museum -mallorca.museum -manchester.museum -mansion.museum -mansions.museum -manx.museum -marburg.museum -maritime.museum -maritimo.museum -maryland.museum -marylhurst.museum -media.museum -medical.museum -medizinhistorisches.museum -meeres.museum -memorial.museum -mesaverde.museum -michigan.museum -midatlantic.museum -military.museum -mill.museum -miners.museum -mining.museum -minnesota.museum -missile.museum -missoula.museum -modern.museum -moma.museum -money.museum -monmouth.museum -monticello.museum -montreal.museum -moscow.museum -motorcycle.museum -muenchen.museum -muenster.museum -mulhouse.museum -muncie.museum -museet.museum -museumcenter.museum -museumvereniging.museum -music.museum -national.museum -nationalfirearms.museum -nationalheritage.museum -nativeamerican.museum -naturalhistory.museum -naturalhistorymuseum.museum -naturalsciences.museum -nature.museum -naturhistorisches.museum -natuurwetenschappen.museum -naumburg.museum -naval.museum -nebraska.museum -neues.museum -newhampshire.museum -newjersey.museum -newmexico.museum -newport.museum -newspaper.museum -newyork.museum -niepce.museum -norfolk.museum -north.museum -nrw.museum -nuernberg.museum -nuremberg.museum -nyc.museum -nyny.museum -oceanographic.museum -oceanographique.museum -omaha.museum -online.museum -ontario.museum -openair.museum -oregon.museum -oregontrail.museum -otago.museum -oxford.museum -pacific.museum -paderborn.museum -palace.museum -paleo.museum -palmsprings.museum -panama.museum -paris.museum -pasadena.museum -pharmacy.museum -philadelphia.museum -philadelphiaarea.museum -philately.museum -phoenix.museum -photography.museum -pilots.museum -pittsburgh.museum -planetarium.museum -plantation.museum -plants.museum -plaza.museum -portal.museum -portland.museum -portlligat.museum -posts-and-telecommunications.museum -preservation.museum -presidio.museum -press.museum -project.museum -public.museum -pubol.museum -quebec.museum -railroad.museum -railway.museum -research.museum -resistance.museum -riodejaneiro.museum -rochester.museum -rockart.museum -roma.museum -russia.museum -saintlouis.museum -salem.museum -salvadordali.museum -salzburg.museum -sandiego.museum -sanfrancisco.museum -santabarbara.museum -santacruz.museum -santafe.museum -saskatchewan.museum -satx.museum -savannahga.museum -schlesisches.museum -schoenbrunn.museum -schokoladen.museum -school.museum -schweiz.museum -science.museum -scienceandhistory.museum -scienceandindustry.museum -sciencecenter.museum -sciencecenters.museum -science-fiction.museum -sciencehistory.museum -sciences.museum -sciencesnaturelles.museum -scotland.museum -seaport.museum -settlement.museum -settlers.museum -shell.museum -sherbrooke.museum -sibenik.museum -silk.museum -ski.museum -skole.museum -society.museum -sologne.museum -soundandvision.museum -southcarolina.museum -southwest.museum -space.museum -spy.museum -square.museum -stadt.museum -stalbans.museum -starnberg.museum -state.museum -stateofdelaware.museum -station.museum -steam.museum -steiermark.museum -stjohn.museum -stockholm.museum -stpetersburg.museum -stuttgart.museum -suisse.museum -surgeonshall.museum -surrey.museum -svizzera.museum -sweden.museum -sydney.museum -tank.museum -tcm.museum -technology.museum -telekommunikation.museum -television.museum -texas.museum -textile.museum -theater.museum -time.museum -timekeeping.museum -topology.museum -torino.museum -touch.museum -town.museum -transport.museum -tree.museum -trolley.museum -trust.museum -trustee.museum -uhren.museum -ulm.museum -undersea.museum -university.museum -usa.museum -usantiques.museum -usarts.museum -uscountryestate.museum -usculture.museum -usdecorativearts.museum -usgarden.museum -ushistory.museum -ushuaia.museum -uslivinghistory.museum -utah.museum -uvic.museum -valley.museum -vantaa.museum -versailles.museum -viking.museum -village.museum -virginia.museum -virtual.museum -virtuel.museum -vlaanderen.museum -volkenkunde.museum -wales.museum -wallonie.museum -war.museum -washingtondc.museum -watchandclock.museum -watch-and-clock.museum -western.museum -westfalen.museum -whaling.museum -wildlife.museum -williamsburg.museum -windmill.museum -workshop.museum -york.museum -yorkshire.museum -yosemite.museum -youth.museum -zoological.museum -zoology.museum -ירושלים.museum -иком.museum - -// mv : http://en.wikipedia.org/wiki/.mv -// "mv" included because, contra Wikipedia, google.mv exists. -mv -aero.mv -biz.mv -com.mv -coop.mv -edu.mv -gov.mv -info.mv -int.mv -mil.mv -museum.mv -name.mv -net.mv -org.mv -pro.mv - -// mw : http://www.registrar.mw/ -mw -ac.mw -biz.mw -co.mw -com.mw -coop.mw -edu.mw -gov.mw -int.mw -museum.mw -net.mw -org.mw - -// mx : http://www.nic.mx/ -// Submitted by registry <farias@nic.mx> 2008-06-19 -mx -com.mx -org.mx -gob.mx -edu.mx -net.mx - -// my : http://www.mynic.net.my/ -my -com.my -net.my -org.my -gov.my -edu.my -mil.my -name.my - -// mz : http://www.gobin.info/domainname/mz-template.doc -*.mz - -// na : http://www.na-nic.com.na/ -// http://www.info.na/domain/ -na -info.na -pro.na -name.na -school.na -or.na -dr.na -us.na -mx.na -ca.na -in.na -cc.na -tv.na -ws.na -mobi.na -co.na -com.na -org.na - -// name : has 2nd-level tlds, but there's no list of them -name - -// nc : http://www.cctld.nc/ -nc -asso.nc - -// ne : http://en.wikipedia.org/wiki/.ne -ne - -// net : http://en.wikipedia.org/wiki/.net -net - -// nf : http://en.wikipedia.org/wiki/.nf -nf -com.nf -net.nf -per.nf -rec.nf -web.nf -arts.nf -firm.nf -info.nf -other.nf -store.nf - -// ng : http://psg.com/dns/ng/ -// Submitted by registry <randy@psg.com> 2008-06-17 -ac.ng -com.ng -edu.ng -gov.ng -net.ng -org.ng - -// ni : http://www.nic.ni/dominios.htm -*.ni - -// nl : http://www.domain-registry.nl/ace.php/c,728,122,,,,Home.html -// Confirmed by registry <Antoin.Verschuren@sidn.nl> (with technical -// reservations) 2008-06-08 -nl - -// BV.nl will be a registry for dutch BV's (besloten vennootschap) -bv.nl - -// no : http://www.norid.no/regelverk/index.en.html -// The Norwegian registry has declined to notify us of updates. The web pages -// referenced below are the official source of the data. There is also an -// announce mailing list: -// https://postlister.uninett.no/sympa/info/norid-diskusjon -no -// Norid generic domains : http://www.norid.no/regelverk/vedlegg-c.en.html -fhs.no -vgs.no -fylkesbibl.no -folkebibl.no -museum.no -idrett.no -priv.no -// Non-Norid generic domains : http://www.norid.no/regelverk/vedlegg-d.en.html -mil.no -stat.no -dep.no -kommune.no -herad.no -// no geographical names : http://www.norid.no/regelverk/vedlegg-b.en.html -// counties -aa.no -ah.no -bu.no -fm.no -hl.no -hm.no -jan-mayen.no -mr.no -nl.no -nt.no -of.no -ol.no -oslo.no -rl.no -sf.no -st.no -svalbard.no -tm.no -tr.no -va.no -vf.no -// primary and lower secondary schools per county -gs.aa.no -gs.ah.no -gs.bu.no -gs.fm.no -gs.hl.no -gs.hm.no -gs.jan-mayen.no -gs.mr.no -gs.nl.no -gs.nt.no -gs.of.no -gs.ol.no -gs.oslo.no -gs.rl.no -gs.sf.no -gs.st.no -gs.svalbard.no -gs.tm.no -gs.tr.no -gs.va.no -gs.vf.no -// cities -akrehamn.no -åkrehamn.no -algard.no -ålgård.no -arna.no -brumunddal.no -bryne.no -bronnoysund.no -brønnøysund.no -drobak.no -drøbak.no -egersund.no -fetsund.no -floro.no -florø.no -fredrikstad.no -hokksund.no -honefoss.no -hønefoss.no -jessheim.no -jorpeland.no -jørpeland.no -kirkenes.no -kopervik.no -krokstadelva.no -langevag.no -langevåg.no -leirvik.no -mjondalen.no -mjøndalen.no -mo-i-rana.no -mosjoen.no -mosjøen.no -nesoddtangen.no -orkanger.no -osoyro.no -osøyro.no -raholt.no -råholt.no -sandnessjoen.no -sandnessjøen.no -skedsmokorset.no -slattum.no -spjelkavik.no -stathelle.no -stavern.no -stjordalshalsen.no -stjørdalshalsen.no -tananger.no -tranby.no -vossevangen.no -// communities -afjord.no -åfjord.no -agdenes.no -al.no -ål.no -alesund.no -ålesund.no -alstahaug.no -alta.no -áltá.no -alaheadju.no -álaheadju.no -alvdal.no -amli.no -åmli.no -amot.no -åmot.no -andebu.no -andoy.no -andøy.no -andasuolo.no -ardal.no -årdal.no -aremark.no -arendal.no -ås.no -aseral.no -åseral.no -asker.no -askim.no -askvoll.no -askoy.no -askøy.no -asnes.no -åsnes.no -audnedaln.no -aukra.no -aure.no -aurland.no -aurskog-holand.no -aurskog-høland.no -austevoll.no -austrheim.no -averoy.no -averøy.no -balestrand.no -ballangen.no -balat.no -bálát.no -balsfjord.no -bahccavuotna.no -báhccavuotna.no -bamble.no -bardu.no -beardu.no -beiarn.no -bajddar.no -bájddar.no -baidar.no -báidár.no -berg.no -bergen.no -berlevag.no -berlevåg.no -bearalvahki.no -bearalváhki.no -bindal.no -birkenes.no -bjarkoy.no -bjarkøy.no -bjerkreim.no -bjugn.no -bodo.no -bodø.no -badaddja.no -bådåddjå.no -budejju.no -bokn.no -bremanger.no -bronnoy.no -brønnøy.no -bygland.no -bykle.no -barum.no -bærum.no -bo.telemark.no -bø.telemark.no -bo.nordland.no -bø.nordland.no -bievat.no -bievát.no -bomlo.no -bømlo.no -batsfjord.no -båtsfjord.no -bahcavuotna.no -báhcavuotna.no -dovre.no -drammen.no -drangedal.no -dyroy.no -dyrøy.no -donna.no -dønna.no -eid.no -eidfjord.no -eidsberg.no -eidskog.no -eidsvoll.no -eigersund.no -elverum.no -enebakk.no -engerdal.no -etne.no -etnedal.no -evenes.no -evenassi.no -evenášši.no -evje-og-hornnes.no -farsund.no -fauske.no -fuossko.no -fuoisku.no -fedje.no -fet.no -finnoy.no -finnøy.no -fitjar.no -fjaler.no -fjell.no -flakstad.no -flatanger.no -flekkefjord.no -flesberg.no -flora.no -fla.no -flå.no -folldal.no -forsand.no -fosnes.no -frei.no -frogn.no -froland.no -frosta.no -frana.no -fræna.no -froya.no -frøya.no -fusa.no -fyresdal.no -forde.no -førde.no -gamvik.no -gangaviika.no -gáŋgaviika.no -gaular.no -gausdal.no -gildeskal.no -gildeskål.no -giske.no -gjemnes.no -gjerdrum.no -gjerstad.no -gjesdal.no -gjovik.no -gjøvik.no -gloppen.no -gol.no -gran.no -grane.no -granvin.no -gratangen.no -grimstad.no -grong.no -kraanghke.no -kråanghke.no -grue.no -gulen.no -hadsel.no -halden.no -halsa.no -hamar.no -hamaroy.no -habmer.no -hábmer.no -hapmir.no -hápmir.no -hammerfest.no -hammarfeasta.no -hámmárfeasta.no -haram.no -hareid.no -harstad.no -hasvik.no -aknoluokta.no -ákŋoluokta.no -hattfjelldal.no -aarborte.no -haugesund.no -hemne.no -hemnes.no -hemsedal.no -heroy.more-og-romsdal.no -herøy.møre-og-romsdal.no -heroy.nordland.no -herøy.nordland.no -hitra.no -hjartdal.no -hjelmeland.no -hobol.no -hobøl.no -hof.no -hol.no -hole.no -holmestrand.no -holtalen.no -holtålen.no -hornindal.no -horten.no -hurdal.no -hurum.no -hvaler.no -hyllestad.no -hagebostad.no -hægebostad.no -hoyanger.no -høyanger.no -hoylandet.no -høylandet.no -ha.no -hå.no -ibestad.no -inderoy.no -inderøy.no -iveland.no -jevnaker.no -jondal.no -jolster.no -jølster.no -karasjok.no -karasjohka.no -kárášjohka.no -karlsoy.no -galsa.no -gálsá.no -karmoy.no -karmøy.no -kautokeino.no -guovdageaidnu.no -klepp.no -klabu.no -klæbu.no -kongsberg.no -kongsvinger.no -kragero.no -kragerø.no -kristiansand.no -kristiansund.no -krodsherad.no -krødsherad.no -kvalsund.no -rahkkeravju.no -ráhkkerávju.no -kvam.no -kvinesdal.no -kvinnherad.no -kviteseid.no -kvitsoy.no -kvitsøy.no -kvafjord.no -kvæfjord.no -giehtavuoatna.no -kvanangen.no -kvænangen.no -navuotna.no -návuotna.no -kafjord.no -kåfjord.no -gaivuotna.no -gáivuotna.no -larvik.no -lavangen.no -lavagis.no -loabat.no -loabát.no -lebesby.no -davvesiida.no -leikanger.no -leirfjord.no -leka.no -leksvik.no -lenvik.no -leangaviika.no -leaŋgaviika.no -lesja.no -levanger.no -lier.no -lierne.no -lillehammer.no -lillesand.no -lindesnes.no -lindas.no -lindås.no -lom.no -loppa.no -lahppi.no -láhppi.no -lund.no -lunner.no -luroy.no -lurøy.no -luster.no -lyngdal.no -lyngen.no -ivgu.no -lardal.no -lerdal.no -lærdal.no -lodingen.no -lødingen.no -lorenskog.no -lørenskog.no -loten.no -løten.no -malvik.no -masoy.no -måsøy.no -muosat.no -muosát.no -mandal.no -marker.no -marnardal.no -masfjorden.no -meland.no -meldal.no -melhus.no -meloy.no -meløy.no -meraker.no -meråker.no -moareke.no -moåreke.no -midsund.no -midtre-gauldal.no -modalen.no -modum.no -molde.no -moskenes.no -moss.no -mosvik.no -malselv.no -målselv.no -malatvuopmi.no -málatvuopmi.no -namdalseid.no -aejrie.no -namsos.no -namsskogan.no -naamesjevuemie.no -nååmesjevuemie.no -laakesvuemie.no -nannestad.no -narvik.no -narviika.no -naustdal.no -nedre-eiker.no -nes.akershus.no -nes.buskerud.no -nesna.no -nesodden.no -nesseby.no -unjarga.no -unjárga.no -nesset.no -nissedal.no -nittedal.no -nord-aurdal.no -nord-fron.no -nord-odal.no -norddal.no -nordkapp.no -davvenjarga.no -davvenjárga.no -nordre-land.no -nordreisa.no -raisa.no -ráisa.no -nore-og-uvdal.no -notodden.no -naroy.no -nærøy.no -notteroy.no -nøtterøy.no -odda.no -oksnes.no -øksnes.no -oppdal.no -oppegard.no -oppegård.no -orkdal.no -orland.no -ørland.no -orskog.no -ørskog.no -orsta.no -ørsta.no -os.hedmark.no -os.hordaland.no -osen.no -osteroy.no -osterøy.no -ostre-toten.no -østre-toten.no -overhalla.no -ovre-eiker.no -øvre-eiker.no -oyer.no -øyer.no -oygarden.no -øygarden.no -oystre-slidre.no -øystre-slidre.no -porsanger.no -porsangu.no -porsáŋgu.no -porsgrunn.no -radoy.no -radøy.no -rakkestad.no -rana.no -ruovat.no -randaberg.no -rauma.no -rendalen.no -rennebu.no -rennesoy.no -rennesøy.no -rindal.no -ringebu.no -ringerike.no -ringsaker.no -rissa.no -risor.no -risør.no -roan.no -rollag.no -rygge.no -ralingen.no -rælingen.no -rodoy.no -rødøy.no -romskog.no -rømskog.no -roros.no -røros.no -rost.no -røst.no -royken.no -røyken.no -royrvik.no -røyrvik.no -rade.no -råde.no -salangen.no -siellak.no -saltdal.no -salat.no -sálát.no -sálat.no -samnanger.no -sande.more-og-romsdal.no -sande.møre-og-romsdal.no -sande.vestfold.no -sandefjord.no -sandnes.no -sandoy.no -sandøy.no -sarpsborg.no -sauda.no -sauherad.no -sel.no -selbu.no -selje.no -seljord.no -sigdal.no -siljan.no -sirdal.no -skaun.no -skedsmo.no -ski.no -skien.no -skiptvet.no -skjervoy.no -skjervøy.no -skierva.no -skiervá.no -skjak.no -skjåk.no -skodje.no -skanland.no -skånland.no -skanit.no -skánit.no -smola.no -smøla.no -snillfjord.no -snasa.no -snåsa.no -snoasa.no -snaase.no -snåase.no -sogndal.no -sokndal.no -sola.no -solund.no -songdalen.no -sortland.no -spydeberg.no -stange.no -stavanger.no -steigen.no -steinkjer.no -stjordal.no -stjørdal.no -stokke.no -stor-elvdal.no -stord.no -stordal.no -storfjord.no -omasvuotna.no -strand.no -stranda.no -stryn.no -sula.no -suldal.no -sund.no -sunndal.no -surnadal.no -sveio.no -svelvik.no -sykkylven.no -sogne.no -søgne.no -somna.no -sømna.no -sondre-land.no -søndre-land.no -sor-aurdal.no -sør-aurdal.no -sor-fron.no -sør-fron.no -sor-odal.no -sør-odal.no -sor-varanger.no -sør-varanger.no -matta-varjjat.no -mátta-várjjat.no -sorfold.no -sørfold.no -sorreisa.no -sørreisa.no -sorum.no -sørum.no -tana.no -deatnu.no -time.no -tingvoll.no -tinn.no -tjeldsund.no -dielddanuorri.no -tjome.no -tjøme.no -tokke.no -tolga.no -torsken.no -tranoy.no -tranøy.no -tromso.no -tromsø.no -tromsa.no -romsa.no -trondheim.no -troandin.no -trysil.no -trana.no -træna.no -trogstad.no -trøgstad.no -tvedestrand.no -tydal.no -tynset.no -tysfjord.no -divtasvuodna.no -divttasvuotna.no -tysnes.no -tysvar.no -tysvær.no -tonsberg.no -tønsberg.no -ullensaker.no -ullensvang.no -ulvik.no -utsira.no -vadso.no -vadsø.no -cahcesuolo.no -čáhcesuolo.no -vaksdal.no -valle.no -vang.no -vanylven.no -vardo.no -vardø.no -varggat.no -várggát.no -vefsn.no -vaapste.no -vega.no -vegarshei.no -vegårshei.no -vennesla.no -verdal.no -verran.no -vestby.no -vestnes.no -vestre-slidre.no -vestre-toten.no -vestvagoy.no -vestvågøy.no -vevelstad.no -vik.no -vikna.no -vindafjord.no -volda.no -voss.no -varoy.no -værøy.no -vagan.no -vågan.no -voagat.no -vagsoy.no -vågsøy.no -vaga.no -vågå.no -valer.ostfold.no -våler.østfold.no -valer.hedmark.no -våler.hedmark.no - -// np : http://www.mos.com.np/register.html -*.np - -// nr : http://cenpac.net.nr/dns/index.html -// Confirmed by registry <technician@cenpac.net.nr> 2008-06-17 -nr -biz.nr -info.nr -gov.nr -edu.nr -org.nr -net.nr -com.nr - -// nu : http://en.wikipedia.org/wiki/.nu -nu - -// nz : http://en.wikipedia.org/wiki/.nz -*.nz - -// om : http://en.wikipedia.org/wiki/.om -*.om -!mediaphone.om -!nawrastelecom.om -!nawras.om -!omanmobile.om -!omanpost.om -!omantel.om -!rakpetroleum.om -!siemens.om -!songfest.om -!statecouncil.om - -// org : http://en.wikipedia.org/wiki/.org -org - -// pa : http://www.nic.pa/ -// Some additional second level "domains" resolve directly as hostnames, such as -// pannet.pa, so we add a rule for "pa". -pa -ac.pa -gob.pa -com.pa -org.pa -sld.pa -edu.pa -net.pa -ing.pa -abo.pa -med.pa -nom.pa - -// pe : https://www.nic.pe/InformeFinalComision.pdf -pe -edu.pe -gob.pe -nom.pe -mil.pe -org.pe -com.pe -net.pe - -// pf : http://www.gobin.info/domainname/formulaire-pf.pdf -pf -com.pf -org.pf -edu.pf - -// pg : http://en.wikipedia.org/wiki/.pg -*.pg - -// ph : http://www.domains.ph/FAQ2.asp -// Submitted by registry <jed@email.com.ph> 2008-06-13 -ph -com.ph -net.ph -org.ph -gov.ph -edu.ph -ngo.ph -mil.ph -i.ph - -// pk : http://pk5.pknic.net.pk/pk5/msgNamepk.PK -pk -com.pk -net.pk -edu.pk -org.pk -fam.pk -biz.pk -web.pk -gov.pk -gob.pk -gok.pk -gon.pk -gop.pk -gos.pk -info.pk - -// pl : http://www.dns.pl/english/ -pl -// NASK functional domains (nask.pl / dns.pl) : http://www.dns.pl/english/dns-funk.html -aid.pl -agro.pl -atm.pl -auto.pl -biz.pl -com.pl -edu.pl -gmina.pl -gsm.pl -info.pl -mail.pl -miasta.pl -media.pl -mil.pl -net.pl -nieruchomosci.pl -nom.pl -org.pl -pc.pl -powiat.pl -priv.pl -realestate.pl -rel.pl -sex.pl -shop.pl -sklep.pl -sos.pl -szkola.pl -targi.pl -tm.pl -tourism.pl -travel.pl -turystyka.pl -// ICM functional domains (icm.edu.pl) -6bone.pl -art.pl -mbone.pl -// Government domains (administred by ippt.gov.pl) -gov.pl -uw.gov.pl -um.gov.pl -ug.gov.pl -upow.gov.pl -starostwo.gov.pl -so.gov.pl -sr.gov.pl -po.gov.pl -pa.gov.pl -// other functional domains -ngo.pl -irc.pl -usenet.pl -// NASK geographical domains : http://www.dns.pl/english/dns-regiony.html -augustow.pl -babia-gora.pl -bedzin.pl -beskidy.pl -bialowieza.pl -bialystok.pl -bielawa.pl -bieszczady.pl -boleslawiec.pl -bydgoszcz.pl -bytom.pl -cieszyn.pl -czeladz.pl -czest.pl -dlugoleka.pl -elblag.pl -elk.pl -glogow.pl -gniezno.pl -gorlice.pl -grajewo.pl -ilawa.pl -jaworzno.pl -jelenia-gora.pl -jgora.pl -kalisz.pl -kazimierz-dolny.pl -karpacz.pl -kartuzy.pl -kaszuby.pl -katowice.pl -kepno.pl -ketrzyn.pl -klodzko.pl -kobierzyce.pl -kolobrzeg.pl -konin.pl -konskowola.pl -kutno.pl -lapy.pl -lebork.pl -legnica.pl -lezajsk.pl -limanowa.pl -lomza.pl -lowicz.pl -lubin.pl -lukow.pl -malbork.pl -malopolska.pl -mazowsze.pl -mazury.pl -mielec.pl -mielno.pl -mragowo.pl -naklo.pl -nowaruda.pl -nysa.pl -olawa.pl -olecko.pl -olkusz.pl -olsztyn.pl -opoczno.pl -opole.pl -ostroda.pl -ostroleka.pl -ostrowiec.pl -ostrowwlkp.pl -pila.pl -pisz.pl -podhale.pl -podlasie.pl -polkowice.pl -pomorze.pl -pomorskie.pl -prochowice.pl -pruszkow.pl -przeworsk.pl -pulawy.pl -radom.pl -rawa-maz.pl -rybnik.pl -rzeszow.pl -sanok.pl -sejny.pl -siedlce.pl -slask.pl -slupsk.pl -sosnowiec.pl -stalowa-wola.pl -skoczow.pl -starachowice.pl -stargard.pl -suwalki.pl -swidnica.pl -swiebodzin.pl -swinoujscie.pl -szczecin.pl -szczytno.pl -tarnobrzeg.pl -tgory.pl -turek.pl -tychy.pl -ustka.pl -walbrzych.pl -warmia.pl -warszawa.pl -waw.pl -wegrow.pl -wielun.pl -wlocl.pl -wloclawek.pl -wodzislaw.pl -wolomin.pl -wroclaw.pl -zachpomor.pl -zagan.pl -zarow.pl -zgora.pl -zgorzelec.pl -// TASK geographical domains (www.task.gda.pl/uslugi/dns) -gda.pl -gdansk.pl -gdynia.pl -med.pl -sopot.pl -// other geographical domains -gliwice.pl -krakow.pl -poznan.pl -wroc.pl -zakopane.pl - -// pm : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf -pm - -// pn : http://www.government.pn/PnRegistry/policies.htm -pn -gov.pn -co.pn -org.pn -edu.pn -net.pn - -// pr : http://www.nic.pr/index.asp?f=1 -pr -com.pr -net.pr -org.pr -gov.pr -edu.pr -isla.pr -pro.pr -biz.pr -info.pr -name.pr -// these aren't mentioned on nic.pr, but on http://en.wikipedia.org/wiki/.pr -est.pr -prof.pr -ac.pr - -// pro : http://www.nic.pro/support_faq.htm -pro -aca.pro -bar.pro -cpa.pro -jur.pro -law.pro -med.pro -eng.pro - -// ps : http://en.wikipedia.org/wiki/.ps -// http://www.nic.ps/registration/policy.html#reg -ps -edu.ps -gov.ps -sec.ps -plo.ps -com.ps -org.ps -net.ps - -// pt : http://online.dns.pt/dns/start_dns -pt -net.pt -gov.pt -org.pt -edu.pt -int.pt -publ.pt -com.pt -nome.pt - -// pw : http://en.wikipedia.org/wiki/.pw -pw -co.pw -ne.pw -or.pw -ed.pw -go.pw -belau.pw - -// py : http://www.nic.py/faq_a.html#faq_b -*.py - -// qa : http://domains.qa/en/ -qa -com.qa -edu.qa -gov.qa -mil.qa -name.qa -net.qa -org.qa -sch.qa - -// re : http://www.afnic.re/obtenir/chartes/nommage-re/annexe-descriptifs -re -com.re -asso.re -nom.re - -// ro : http://www.rotld.ro/ -ro -com.ro -org.ro -tm.ro -nt.ro -nom.ro -info.ro -rec.ro -arts.ro -firm.ro -store.ro -www.ro - -// rs : http://en.wikipedia.org/wiki/.rs -rs -co.rs -org.rs -edu.rs -ac.rs -gov.rs -in.rs - -// ru : http://www.cctld.ru/ru/docs/aktiv_8.php -// Industry domains -ru -ac.ru -com.ru -edu.ru -int.ru -net.ru -org.ru -pp.ru -// Geographical domains -adygeya.ru -altai.ru -amur.ru -arkhangelsk.ru -astrakhan.ru -bashkiria.ru -belgorod.ru -bir.ru -bryansk.ru -buryatia.ru -cbg.ru -chel.ru -chelyabinsk.ru -chita.ru -chukotka.ru -chuvashia.ru -dagestan.ru -dudinka.ru -e-burg.ru -grozny.ru -irkutsk.ru -ivanovo.ru -izhevsk.ru -jar.ru -joshkar-ola.ru -kalmykia.ru -kaluga.ru -kamchatka.ru -karelia.ru -kazan.ru -kchr.ru -kemerovo.ru -khabarovsk.ru -khakassia.ru -khv.ru -kirov.ru -koenig.ru -komi.ru -kostroma.ru -krasnoyarsk.ru -kuban.ru -kurgan.ru -kursk.ru -lipetsk.ru -magadan.ru -mari.ru -mari-el.ru -marine.ru -mordovia.ru -mosreg.ru -msk.ru -murmansk.ru -nalchik.ru -nnov.ru -nov.ru -novosibirsk.ru -nsk.ru -omsk.ru -orenburg.ru -oryol.ru -palana.ru -penza.ru -perm.ru -pskov.ru -ptz.ru -rnd.ru -ryazan.ru -sakhalin.ru -samara.ru -saratov.ru -simbirsk.ru -smolensk.ru -spb.ru -stavropol.ru -stv.ru -surgut.ru -tambov.ru -tatarstan.ru -tom.ru -tomsk.ru -tsaritsyn.ru -tsk.ru -tula.ru -tuva.ru -tver.ru -tyumen.ru -udm.ru -udmurtia.ru -ulan-ude.ru -vladikavkaz.ru -vladimir.ru -vladivostok.ru -volgograd.ru -vologda.ru -voronezh.ru -vrn.ru -vyatka.ru -yakutia.ru -yamal.ru -yaroslavl.ru -yekaterinburg.ru -yuzhno-sakhalinsk.ru -// More geographical domains -amursk.ru -baikal.ru -cmw.ru -fareast.ru -jamal.ru -kms.ru -k-uralsk.ru -kustanai.ru -kuzbass.ru -magnitka.ru -mytis.ru -nakhodka.ru -nkz.ru -norilsk.ru -oskol.ru -pyatigorsk.ru -rubtsovsk.ru -snz.ru -syzran.ru -vdonsk.ru -zgrad.ru -// State domains -gov.ru -mil.ru -// Technical domains -test.ru - -// rw : http://www.nic.rw/cgi-bin/policy.pl -rw -gov.rw -net.rw -edu.rw -ac.rw -com.rw -co.rw -int.rw -mil.rw -gouv.rw - -// sa : http://www.nic.net.sa/ -sa -com.sa -net.sa -org.sa -gov.sa -med.sa -pub.sa -edu.sa -sch.sa - -// sb : http://www.sbnic.net.sb/ -// Submitted by registry <lee.humphries@telekom.com.sb> 2008-06-08 -sb -com.sb -edu.sb -gov.sb -net.sb -org.sb - -// sc : http://www.nic.sc/ -sc -com.sc -gov.sc -net.sc -org.sc -edu.sc - -// sd : http://www.isoc.sd/sudanic.isoc.sd/billing_pricing.htm -// Submitted by registry <admin@isoc.sd> 2008-06-17 -sd -com.sd -net.sd -org.sd -edu.sd -med.sd -gov.sd -info.sd - -// se : http://en.wikipedia.org/wiki/.se -// Submitted by registry <Patrik.Wallstrom@iis.se> 2008-06-24 -se -a.se -ac.se -b.se -bd.se -brand.se -c.se -d.se -e.se -f.se -fh.se -fhsk.se -fhv.se -g.se -h.se -i.se -k.se -komforb.se -kommunalforbund.se -komvux.se -l.se -lanbib.se -m.se -n.se -naturbruksgymn.se -o.se -org.se -p.se -parti.se -pp.se -press.se -r.se -s.se -sshn.se -t.se -tm.se -u.se -w.se -x.se -y.se -z.se - -// sg : http://www.nic.net.sg/sub_policies_agreement/2ld.html -sg -com.sg -net.sg -org.sg -gov.sg -edu.sg -per.sg - -// sh : http://www.nic.sh/rules.html -// list of 2nd level domains ? -sh - -// si : http://en.wikipedia.org/wiki/.si -si - -// sj : No registrations at this time. -// Submitted by registry <jarle@uninett.no> 2008-06-16 - -// sk : http://en.wikipedia.org/wiki/.sk -// list of 2nd level domains ? -sk - -// sl : http://www.nic.sl -// Submitted by registry <adam@neoip.com> 2008-06-12 -sl -com.sl -net.sl -edu.sl -gov.sl -org.sl - -// sm : http://en.wikipedia.org/wiki/.sm -sm - -// sn : http://en.wikipedia.org/wiki/.sn -sn -art.sn -com.sn -edu.sn -gouv.sn -org.sn -perso.sn -univ.sn - -// so : http://www.soregistry.com/ -so -com.so -net.so -org.so - -// sr : http://en.wikipedia.org/wiki/.sr -sr - -// st : http://www.nic.st/html/policyrules/ -st -co.st -com.st -consulado.st -edu.st -embaixada.st -gov.st -mil.st -net.st -org.st -principe.st -saotome.st -store.st - -// su : http://en.wikipedia.org/wiki/.su -su - -// sv : http://www.svnet.org.sv/svpolicy.html -*.sv - -// sy : http://en.wikipedia.org/wiki/.sy -// see also: http://www.gobin.info/domainname/sy.doc -sy -edu.sy -gov.sy -net.sy -mil.sy -com.sy -org.sy - -// sz : http://en.wikipedia.org/wiki/.sz -// http://www.sispa.org.sz/ -sz -co.sz -ac.sz -org.sz - -// tc : http://en.wikipedia.org/wiki/.tc -tc - -// td : http://en.wikipedia.org/wiki/.td -td - -// tel: http://en.wikipedia.org/wiki/.tel -// http://www.telnic.org/ -tel - -// tf : http://en.wikipedia.org/wiki/.tf -tf - -// tg : http://en.wikipedia.org/wiki/.tg -// http://www.nic.tg/nictg/index.php implies no reserved 2nd-level domains, -// although this contradicts wikipedia. -tg - -// th : http://en.wikipedia.org/wiki/.th -// Submitted by registry <krit@thains.co.th> 2008-06-17 -th -ac.th -co.th -go.th -in.th -mi.th -net.th -or.th - -// tj : http://www.nic.tj/policy.htm -tj -ac.tj -biz.tj -co.tj -com.tj -edu.tj -go.tj -gov.tj -int.tj -mil.tj -name.tj -net.tj -nic.tj -org.tj -test.tj -web.tj - -// tk : http://en.wikipedia.org/wiki/.tk -tk - -// tl : http://en.wikipedia.org/wiki/.tl -tl -gov.tl - -// tm : http://www.nic.tm/rules.html -// list of 2nd level tlds ? -tm - -// tn : http://en.wikipedia.org/wiki/.tn -// http://whois.ati.tn/ -tn -com.tn -ens.tn -fin.tn -gov.tn -ind.tn -intl.tn -nat.tn -net.tn -org.tn -info.tn -perso.tn -tourism.tn -edunet.tn -rnrt.tn -rns.tn -rnu.tn -mincom.tn -agrinet.tn -defense.tn -turen.tn - -// to : http://en.wikipedia.org/wiki/.to -// Submitted by registry <egullich@colo.to> 2008-06-17 -to -com.to -gov.to -net.to -org.to -edu.to -mil.to - -// tr : http://en.wikipedia.org/wiki/.tr -*.tr -!nic.tr -// Used by government in the TRNC -// http://en.wikipedia.org/wiki/.nc.tr -gov.nc.tr - -// travel : http://en.wikipedia.org/wiki/.travel -travel - -// tt : http://www.nic.tt/ -tt -co.tt -com.tt -org.tt -net.tt -biz.tt -info.tt -pro.tt -int.tt -coop.tt -jobs.tt -mobi.tt -travel.tt -museum.tt -aero.tt -name.tt -gov.tt -edu.tt - -// tv : http://en.wikipedia.org/wiki/.tv -// Not listing any 2LDs as reserved since none seem to exist in practice, -// Wikipedia notwithstanding. -tv - -// tw : http://en.wikipedia.org/wiki/.tw -tw -edu.tw -gov.tw -mil.tw -com.tw -net.tw -org.tw -idv.tw -game.tw -ebiz.tw -club.tw -網路.tw -組織.tw -商業.tw - -// tz : http://en.wikipedia.org/wiki/.tz -// Submitted by registry <randy@psg.com> 2008-06-17 -// Updated from http://www.tznic.or.tz/index.php/domains.html 2010-10-25 -ac.tz -co.tz -go.tz -mil.tz -ne.tz -or.tz -sc.tz - -// ua : http://www.nic.net.ua/ -ua -com.ua -edu.ua -gov.ua -in.ua -net.ua -org.ua -// ua geo-names -cherkassy.ua -chernigov.ua -chernovtsy.ua -ck.ua -cn.ua -crimea.ua -cv.ua -dn.ua -dnepropetrovsk.ua -donetsk.ua -dp.ua -if.ua -ivano-frankivsk.ua -kh.ua -kharkov.ua -kherson.ua -khmelnitskiy.ua -kiev.ua -kirovograd.ua -km.ua -kr.ua -ks.ua -kv.ua -lg.ua -lugansk.ua -lutsk.ua -lviv.ua -mk.ua -nikolaev.ua -od.ua -odessa.ua -pl.ua -poltava.ua -rovno.ua -rv.ua -sebastopol.ua -sumy.ua -te.ua -ternopil.ua -uzhgorod.ua -vinnica.ua -vn.ua -zaporizhzhe.ua -zp.ua -zhitomir.ua -zt.ua - -// Private registries in .ua -co.ua -pp.ua - -// ug : http://www.registry.co.ug/ -ug -co.ug -ac.ug -sc.ug -go.ug -ne.ug -or.ug - -// uk : http://en.wikipedia.org/wiki/.uk -*.uk -*.sch.uk -!bl.uk -!british-library.uk -!icnet.uk -!jet.uk -!mod.uk -!nel.uk -!nhs.uk -!nic.uk -!nls.uk -!national-library-scotland.uk -!parliament.uk -!police.uk - -// us : http://en.wikipedia.org/wiki/.us -us -dni.us -fed.us -isa.us -kids.us -nsn.us -// us geographic names -ak.us -al.us -ar.us -as.us -az.us -ca.us -co.us -ct.us -dc.us -de.us -fl.us -ga.us -gu.us -hi.us -ia.us -id.us -il.us -in.us -ks.us -ky.us -la.us -ma.us -md.us -me.us -mi.us -mn.us -mo.us -ms.us -mt.us -nc.us -nd.us -ne.us -nh.us -nj.us -nm.us -nv.us -ny.us -oh.us -ok.us -or.us -pa.us -pr.us -ri.us -sc.us -sd.us -tn.us -tx.us -ut.us -vi.us -vt.us -va.us -wa.us -wi.us -wv.us -wy.us -// The registrar notes several more specific domains available in each state, -// such as state.*.us, dst.*.us, etc., but resolution of these is somewhat -// haphazard; in some states these domains resolve as addresses, while in others -// only subdomains are available, or even nothing at all. We include the -// most common ones where it's clear that different sites are different -// entities. -k12.ak.us -k12.al.us -k12.ar.us -k12.as.us -k12.az.us -k12.ca.us -k12.co.us -k12.ct.us -k12.dc.us -k12.de.us -k12.fl.us -k12.ga.us -k12.gu.us -// k12.hi.us Hawaii has a state-wide DOE login: bug 614565 -k12.ia.us -k12.id.us -k12.il.us -k12.in.us -k12.ks.us -k12.ky.us -k12.la.us -k12.ma.us -k12.md.us -k12.me.us -k12.mi.us -k12.mn.us -k12.mo.us -k12.ms.us -k12.mt.us -k12.nc.us -k12.nd.us -k12.ne.us -k12.nh.us -k12.nj.us -k12.nm.us -k12.nv.us -k12.ny.us -k12.oh.us -k12.ok.us -k12.or.us -k12.pa.us -k12.pr.us -k12.ri.us -k12.sc.us -k12.sd.us -k12.tn.us -k12.tx.us -k12.ut.us -k12.vi.us -k12.vt.us -k12.va.us -k12.wa.us -k12.wi.us -k12.wv.us -k12.wy.us - -cc.ak.us -cc.al.us -cc.ar.us -cc.as.us -cc.az.us -cc.ca.us -cc.co.us -cc.ct.us -cc.dc.us -cc.de.us -cc.fl.us -cc.ga.us -cc.gu.us -cc.hi.us -cc.ia.us -cc.id.us -cc.il.us -cc.in.us -cc.ks.us -cc.ky.us -cc.la.us -cc.ma.us -cc.md.us -cc.me.us -cc.mi.us -cc.mn.us -cc.mo.us -cc.ms.us -cc.mt.us -cc.nc.us -cc.nd.us -cc.ne.us -cc.nh.us -cc.nj.us -cc.nm.us -cc.nv.us -cc.ny.us -cc.oh.us -cc.ok.us -cc.or.us -cc.pa.us -cc.pr.us -cc.ri.us -cc.sc.us -cc.sd.us -cc.tn.us -cc.tx.us -cc.ut.us -cc.vi.us -cc.vt.us -cc.va.us -cc.wa.us -cc.wi.us -cc.wv.us -cc.wy.us - -lib.ak.us -lib.al.us -lib.ar.us -lib.as.us -lib.az.us -lib.ca.us -lib.co.us -lib.ct.us -lib.dc.us -lib.de.us -lib.fl.us -lib.ga.us -lib.gu.us -lib.hi.us -lib.ia.us -lib.id.us -lib.il.us -lib.in.us -lib.ks.us -lib.ky.us -lib.la.us -lib.ma.us -lib.md.us -lib.me.us -lib.mi.us -lib.mn.us -lib.mo.us -lib.ms.us -lib.mt.us -lib.nc.us -lib.nd.us -lib.ne.us -lib.nh.us -lib.nj.us -lib.nm.us -lib.nv.us -lib.ny.us -lib.oh.us -lib.ok.us -lib.or.us -lib.pa.us -lib.pr.us -lib.ri.us -lib.sc.us -lib.sd.us -lib.tn.us -lib.tx.us -lib.ut.us -lib.vi.us -lib.vt.us -lib.va.us -lib.wa.us -lib.wi.us -lib.wv.us -lib.wy.us - -// k12.ma.us contains school districts in Massachusetts. The 4LDs are -// managed indepedently except for private (PVT), charter (CHTR) and -// parochial (PAROCH) schools. Those are delegated dorectly to the -// 5LD operators. <k12-ma-hostmaster _ at _ rsuc.gweep.net> -pvt.k12.ma.us -chtr.k12.ma.us -paroch.k12.ma.us - -// uy : http://www.antel.com.uy/ -*.uy - -// uz : http://www.reg.uz/registerr.html -// are there other 2nd level tlds ? -uz -com.uz -co.uz - -// va : http://en.wikipedia.org/wiki/.va -va - -// vc : http://en.wikipedia.org/wiki/.vc -// Submitted by registry <kshah@ca.afilias.info> 2008-06-13 -vc -com.vc -net.vc -org.vc -gov.vc -mil.vc -edu.vc - -// ve : http://registro.nic.ve/nicve/registro/index.html -*.ve - -// vg : http://en.wikipedia.org/wiki/.vg -vg - -// vi : http://www.nic.vi/newdomainform.htm -// http://www.nic.vi/Domain_Rules/body_domain_rules.html indicates some other -// TLDs are "reserved", such as edu.vi and gov.vi, but doesn't actually say they -// are available for registration (which they do not seem to be). -vi -co.vi -com.vi -k12.vi -net.vi -org.vi - -// vn : https://www.dot.vn/vnnic/vnnic/domainregistration.jsp -vn -com.vn -net.vn -org.vn -edu.vn -gov.vn -int.vn -ac.vn -biz.vn -info.vn -name.vn -pro.vn -health.vn - -// vu : http://en.wikipedia.org/wiki/.vu -// list of 2nd level tlds ? -vu - -// wf : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf -wf - -// ws : http://en.wikipedia.org/wiki/.ws -// http://samoanic.ws/index.dhtml -ws -com.ws -net.ws -org.ws -gov.ws -edu.ws - -// yt : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf -yt - -// IDN ccTLDs -// Please sort by ISO 3166 ccTLD, then punicode string -// when submitting patches and follow this format: -// <Punicode> ("<english word>" <language>) : <ISO 3166 ccTLD> -// [optional sponsoring org] -// <URL> - -// xn--mgbaam7a8h ("Emerat" Arabic) : AE -//http://nic.ae/english/arabicdomain/rules.jsp -امارات - -// xn--54b7fta0cc ("Bangla" Bangla) : BD -বাংলা - -// xn--fiqs8s ("China" Chinese-Han-Simplified <.Zhonggou>) : CN -// CNNIC -// http://cnnic.cn/html/Dir/2005/10/11/3218.htm -中国 - -// xn--fiqz9s ("China" Chinese-Han-Traditional <.Zhonggou>) : CN -// CNNIC -// http://cnnic.cn/html/Dir/2005/10/11/3218.htm -中國 - -// xn--lgbbat1ad8j ("Algeria / Al Jazair" Arabic) : DZ -الجزائر - -// xn--wgbh1c ("Egypt" Arabic .masr) : EG -// http://www.dotmasr.eg/ -مصر - -// xn--node ("ge" Georgian (Mkhedruli)) : GE -გე - -// xn--j6w193g ("Hong Kong" Chinese-Han) : HK -// https://www2.hkirc.hk/register/rules.jsp -香港 - -// xn--h2brj9c ("Bharat" Devanagari) : IN -// India -भारत - -// xn--mgbbh1a71e ("Bharat" Arabic) : IN -// India -بھارت - -// xn--fpcrj9c3d ("Bharat" Telugu) : IN -// India -భారత్ - -// xn--gecrj9c ("Bharat" Gujarati) : IN -// India -ભારત - -// xn--s9brj9c ("Bharat" Gurmukhi) : IN -// India -ਭਾਰਤ - -// xn--45brj9c ("Bharat" Bengali) : IN -// India -ভারত - -// xn--xkc2dl3a5ee0h ("India" Tamil) : IN -// India -இந்தியா - -// xn--mgba3a4f16a ("Iran" Persian) : IR -ایران - -// xn--mgba3a4fra ("Iran" Arabic) : IR -ايران - -//xn--mgbayh7gpa ("al-Ordon" Arabic) JO -//National Information Technology Center (NITC) -//Royal Scientific Society, Al-Jubeiha -الاردن - -// xn--3e0b707e ("Republic of Korea" Hangul) : KR -한국 - -// xn--fzc2c9e2c ("Lanka" Sinhalese-Sinhala) : LK -// http://nic.lk -ලංකා - -// xn--xkc2al3hye2a ("Ilangai" Tamil) : LK -// http://nic.lk -இலங்கை - -// xn--mgbc0a9azcg ("Morocco / al-Maghrib" Arabic) : MA -المغرب - -// xn--mgb9awbf ("Oman" Arabic) : OM -عمان - -// xn--ygbi2ammx ("Falasteen" Arabic) : PS -// The Palestinian National Internet Naming Authority (PNINA) -// http://www.pnina.ps -فلسطين - -// xn--90a3ac ("srb" Cyrillic) : RS -срб - -// xn--p1ai ("rf" Russian-Cyrillic) : RU -// http://www.cctld.ru/en/docs/rulesrf.php -рф - -// xn--wgbl6a ("Qatar" Arabic) : QA -// http://www.ict.gov.qa/ -قطر - -// xn--mgberp4a5d4ar ("AlSaudiah" Arabic) : SA -// http://www.nic.net.sa/ -السعودية - -// xn--mgberp4a5d4a87g ("AlSaudiah" Arabic) variant : SA -السعودیة - -// xn--mgbqly7c0a67fbc ("AlSaudiah" Arabic) variant : SA -السعودیۃ - -// xn--mgbqly7cvafr ("AlSaudiah" Arabic) variant : SA -السعوديه - -// xn--ogbpf8fl ("Syria" Arabic) : SY -سورية - -// xn--mgbtf8fl ("Syria" Arabic) variant : SY -سوريا - -// xn--yfro4i67o Singapore ("Singapore" Chinese-Han) : SG -新加坡 - -// xn--clchc0ea0b2g2a9gcd ("Singapore" Tamil) : SG -சிங்கப்பூர் - -// xn--o3cw4h ("Thai" Thai) : TH -// http://www.thnic.co.th -ไทย - -// xn--pgbs0dh ("Tunis") : TN -// http://nic.tn -تونس - -// xn--kpry57d ("Taiwan" Chinese-Han-Traditional) : TW -// http://www.twnic.net/english/dn/dn_07a.htm -台灣 - -// xn--kprw13d ("Taiwan" Chinese-Han-Simplified) : TW -// http://www.twnic.net/english/dn/dn_07a.htm -台湾 - -// xn--nnx388a ("Taiwan") variant : TW -臺灣 - -// xn--j1amh ("ukr" Cyrillic) : UA -укр - -// xn--mgb2ddes ("AlYemen" Arabic) : YE -اليمن - -// xxx : http://icmregistry.com -xxx - -// ye : http://www.y.net.ye/services/domain_name.htm -*.ye - -// za : http://www.zadna.org.za/slds.html -*.za - -// zm : http://en.wikipedia.org/wiki/.zm -*.zm - -// zw : http://en.wikipedia.org/wiki/.zw -*.zw - -// ===END ICANN DOMAINS=== -// ===BEGIN PRIVATE DOMAINS=== - -// info.at : http://www.info.at/ -biz.at -info.at - -// priv.at : http://www.nic.priv.at/ -// Submitted by registry <lendl@nic.at> 2008-06-09 -priv.at - -// co.ca : http://registry.co.ca -co.ca - -// CentralNic : http://www.centralnic.com/names/domains -// Confirmed by registry <gavin.brown@centralnic.com> 2008-06-09 -ar.com -br.com -cn.com -de.com -eu.com -gb.com -gr.com -hu.com -jpn.com -kr.com -no.com -qc.com -ru.com -sa.com -se.com -uk.com -us.com -uy.com -za.com -gb.net -jp.net -se.net -uk.net -ae.org -us.org -com.de - -// Opera Software, A.S.A. -// Requested by Yngve Pettersen <yngve@opera.com> 2009-11-26 -operaunite.com - -// Google, Inc. -// Requested by Eduardo Vela <evn@google.com> 2010-09-06 -appspot.com - -// iki.fi : Submitted by Hannu Aronsson <haa@iki.fi> 2009-11-05 -iki.fi - -// c.la : http://www.c.la/ -c.la - -// ZaNiC : http://www.za.net/ -// Confirmed by registry <hostmaster@nic.za.net> 2009-10-03 -za.net -za.org - -// CoDNS B.V. -// Added 2010-05-23. -co.nl -co.no - -// Mainseek Sp. z o.o. : http://www.co.pl/ -co.pl - -// DynDNS.com : http://www.dyndns.com/services/dns/dyndns/ -dyndns-at-home.com -dyndns-at-work.com -dyndns-blog.com -dyndns-free.com -dyndns-home.com -dyndns-ip.com -dyndns-mail.com -dyndns-office.com -dyndns-pics.com -dyndns-remote.com -dyndns-server.com -dyndns-web.com -dyndns-wiki.com -dyndns-work.com -dyndns.biz -dyndns.info -dyndns.org -dyndns.tv -at-band-camp.net -ath.cx -barrel-of-knowledge.info -barrell-of-knowledge.info -better-than.tv -blogdns.com -blogdns.net -blogdns.org -blogsite.org -boldlygoingnowhere.org -broke-it.net -buyshouses.net -cechire.com -dnsalias.com -dnsalias.net -dnsalias.org -dnsdojo.com -dnsdojo.net -dnsdojo.org -does-it.net -doesntexist.com -doesntexist.org -dontexist.com -dontexist.net -dontexist.org -doomdns.com -doomdns.org -dvrdns.org -dyn-o-saur.com -dynalias.com -dynalias.net -dynalias.org -dynathome.net -dyndns.ws -endofinternet.net -endofinternet.org -endoftheinternet.org -est-a-la-maison.com -est-a-la-masion.com -est-le-patron.com -est-mon-blogueur.com -for-better.biz -for-more.biz -for-our.info -for-some.biz -for-the.biz -forgot.her.name -forgot.his.name -from-ak.com -from-al.com -from-ar.com -from-az.net -from-ca.com -from-co.net -from-ct.com -from-dc.com -from-de.com -from-fl.com -from-ga.com -from-hi.com -from-ia.com -from-id.com -from-il.com -from-in.com -from-ks.com -from-ky.com -from-la.net -from-ma.com -from-md.com -from-me.org -from-mi.com -from-mn.com -from-mo.com -from-ms.com -from-mt.com -from-nc.com -from-nd.com -from-ne.com -from-nh.com -from-nj.com -from-nm.com -from-nv.com -from-ny.net -from-oh.com -from-ok.com -from-or.com -from-pa.com -from-pr.com -from-ri.com -from-sc.com -from-sd.com -from-tn.com -from-tx.com -from-ut.com -from-va.com -from-vt.com -from-wa.com -from-wi.com -from-wv.com -from-wy.com -ftpaccess.cc -fuettertdasnetz.de -game-host.org -game-server.cc -getmyip.com -gets-it.net -go.dyndns.org -gotdns.com -gotdns.org -groks-the.info -groks-this.info -ham-radio-op.net -here-for-more.info -hobby-site.com -hobby-site.org -home.dyndns.org -homedns.org -homeftp.net -homeftp.org -homeip.net -homelinux.com -homelinux.net -homelinux.org -homeunix.com -homeunix.net -homeunix.org -iamallama.com -in-the-band.net -is-a-anarchist.com -is-a-blogger.com -is-a-bookkeeper.com -is-a-bruinsfan.org -is-a-bulls-fan.com -is-a-candidate.org -is-a-caterer.com -is-a-celticsfan.org -is-a-chef.com -is-a-chef.net -is-a-chef.org -is-a-conservative.com -is-a-cpa.com -is-a-cubicle-slave.com -is-a-democrat.com -is-a-designer.com -is-a-doctor.com -is-a-financialadvisor.com -is-a-geek.com -is-a-geek.net -is-a-geek.org -is-a-green.com -is-a-guru.com -is-a-hard-worker.com -is-a-hunter.com -is-a-knight.org -is-a-landscaper.com -is-a-lawyer.com -is-a-liberal.com -is-a-libertarian.com -is-a-linux-user.org -is-a-llama.com -is-a-musician.com -is-a-nascarfan.com -is-a-nurse.com -is-a-painter.com -is-a-patsfan.org -is-a-personaltrainer.com -is-a-photographer.com -is-a-player.com -is-a-republican.com -is-a-rockstar.com -is-a-socialist.com -is-a-soxfan.org -is-a-student.com -is-a-teacher.com -is-a-techie.com -is-a-therapist.com -is-an-accountant.com -is-an-actor.com -is-an-actress.com -is-an-anarchist.com -is-an-artist.com -is-an-engineer.com -is-an-entertainer.com -is-by.us -is-certified.com -is-found.org -is-gone.com -is-into-anime.com -is-into-cars.com -is-into-cartoons.com -is-into-games.com -is-leet.com -is-lost.org -is-not-certified.com -is-saved.org -is-slick.com -is-uberleet.com -is-very-bad.org -is-very-evil.org -is-very-good.org -is-very-nice.org -is-very-sweet.org -is-with-theband.com -isa-geek.com -isa-geek.net -isa-geek.org -isa-hockeynut.com -issmarterthanyou.com -isteingeek.de -istmein.de -kicks-ass.net -kicks-ass.org -knowsitall.info -land-4-sale.us -lebtimnetz.de -leitungsen.de -likes-pie.com -likescandy.com -merseine.nu -mine.nu -misconfused.org -mypets.ws -myphotos.cc -neat-url.com -office-on-the.net -on-the-web.tv -podzone.net -podzone.org -readmyblog.org -saves-the-whales.com -scrapper-site.net -scrapping.cc -selfip.biz -selfip.com -selfip.info -selfip.net -selfip.org -sells-for-less.com -sells-for-u.com -sells-it.net -sellsyourhome.org -servebbs.com -servebbs.net -servebbs.org -serveftp.net -serveftp.org -servegame.org -shacknet.nu -simple-url.com -space-to-rent.com -stuff-4-sale.org -stuff-4-sale.us -teaches-yoga.com -thruhere.net -traeumtgerade.de -webhop.biz -webhop.info -webhop.net -webhop.org -worse-than.tv -writesthisblog.com - -// ===END PRIVATE DOMAINS=== diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/test.js deleted file mode 100644 index 3cce815e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/test.js +++ /dev/null @@ -1,1340 +0,0 @@ -/* - * Copyright GoInstant, Inc. and other contributors. All rights reserved. - * 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. - */ - -var vows = require('vows'); -var assert = require('assert'); -var async = require('async'); - -// NOTE use require("tough-cookie") in your own code: -var tough = require('./lib/cookie'); -var Cookie = tough.Cookie; -var CookieJar = tough.CookieJar; - - -function dateVows(table) { - var theVows = { }; - var keys = Object.keys(table).forEach(function(date) { - var expect = table[date]; - theVows[date] = function() { - var got = tough.parseDate(date) ? 'valid' : 'invalid'; - assert.equal(got, expect ? 'valid' : 'invalid'); - }; - }); - return { "date parsing": theVows }; -} - -function matchVows(func,table) { - var theVows = {}; - table.forEach(function(item) { - var str = item[0]; - var dom = item[1]; - var expect = item[2]; - var label = str+(expect?" matches ":" doesn't match ")+dom; - theVows[label] = function() { - assert.equal(func(str,dom),expect); - }; - }); - return theVows; -} - -function defaultPathVows(table) { - var theVows = {}; - table.forEach(function(item) { - var str = item[0]; - var expect = item[1]; - var label = str+" gives "+expect; - theVows[label] = function() { - assert.equal(tough.defaultPath(str),expect); - }; - }); - return theVows; -} - -var atNow = Date.now(); -function at(offset) { return {now: new Date(atNow+offset)} } - -vows.describe('Cookie Jar') -.addBatch({ - "all defined": function() { - assert.ok(Cookie); - assert.ok(CookieJar); - }, -}) -.addBatch( - dateVows({ - "Wed, 09 Jun 2021 10:18:14 GMT": true, - "Wed, 09 Jun 2021 22:18:14 GMT": true, - "Tue, 18 Oct 2011 07:42:42.123 GMT": true, - "18 Oct 2011 07:42:42 GMT": true, - "8 Oct 2011 7:42:42 GMT": true, - "8 Oct 2011 7:2:42 GMT": false, - "Oct 18 2011 07:42:42 GMT": true, - "Tue Oct 18 2011 07:05:03 GMT+0000 (GMT)": true, - "09 Jun 2021 10:18:14 GMT": true, - "99 Jix 3038 48:86:72 ZMT": false, - '01 Jan 1970 00:00:00 GMT': true, - '01 Jan 1600 00:00:00 GMT': false, // before 1601 - '01 Jan 1601 00:00:00 GMT': true, - '10 Feb 81 13:00:00 GMT': true, // implicit year - 'Thu, 01 Jan 1970 00:00:010 GMT': true, // strange time, non-strict OK - 'Thu, 17-Apr-2014 02:12:29 GMT': true, // dashes - 'Thu, 17-Apr-2014 02:12:29 UTC': true, // dashes and UTC - }) -) -.addBatch({ - "strict date parse of Thu, 01 Jan 1970 00:00:010 GMT": { - topic: function() { - return tough.parseDate('Thu, 01 Jan 1970 00:00:010 GMT', true) ? true : false; - }, - "invalid": function(date) { - assert.equal(date,false); - }, - } -}) -.addBatch({ - "formatting": { - "a simple cookie": { - topic: function() { - var c = new Cookie(); - c.key = 'a'; - c.value = 'b'; - return c; - }, - "validates": function(c) { - assert.ok(c.validate()); - }, - "to string": function(c) { - assert.equal(c.toString(), 'a=b'); - }, - }, - "a cookie with spaces in the value": { - topic: function() { - var c = new Cookie(); - c.key = 'a'; - c.value = 'beta gamma'; - return c; - }, - "doesn't validate": function(c) { - assert.ok(!c.validate()); - }, - "to string": function(c) { - assert.equal(c.toString(), 'a="beta gamma"'); - }, - }, - "with an empty value and HttpOnly": { - topic: function() { - var c = new Cookie(); - c.key = 'a'; - c.httpOnly = true; - return c; - }, - "to string": function(c) { - assert.equal(c.toString(), 'a=; HttpOnly'); - } - }, - "with an expiry": { - topic: function() { - var c = new Cookie(); - c.key = 'a'; - c.value = 'b'; - c.setExpires("Oct 18 2011 07:05:03 GMT"); - return c; - }, - "validates": function(c) { - assert.ok(c.validate()); - }, - "to string": function(c) { - assert.equal(c.toString(), 'a=b; Expires=Tue, 18 Oct 2011 07:05:03 GMT'); - }, - "to short string": function(c) { - assert.equal(c.cookieString(), 'a=b'); - }, - }, - "with a max-age": { - topic: function() { - var c = new Cookie(); - c.key = 'a'; - c.value = 'b'; - c.setExpires("Oct 18 2011 07:05:03 GMT"); - c.maxAge = 12345; - return c; - }, - "validates": function(c) { - assert.ok(c.validate()); // mabe this one *shouldn't*? - }, - "to string": function(c) { - assert.equal(c.toString(), 'a=b; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Max-Age=12345'); - }, - }, - "with a bunch of things": function() { - var c = new Cookie(); - c.key = 'a'; - c.value = 'b'; - c.setExpires("Oct 18 2011 07:05:03 GMT"); - c.maxAge = 12345; - c.domain = 'example.com'; - c.path = '/foo'; - c.secure = true; - c.httpOnly = true; - c.extensions = ['MyExtension']; - assert.equal(c.toString(), 'a=b; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Max-Age=12345; Domain=example.com; Path=/foo; Secure; HttpOnly; MyExtension'); - }, - "a host-only cookie": { - topic: function() { - var c = new Cookie(); - c.key = 'a'; - c.value = 'b'; - c.hostOnly = true; - c.domain = 'shouldnt-stringify.example.com'; - c.path = '/should-stringify'; - return c; - }, - "validates": function(c) { - assert.ok(c.validate()); - }, - "to string": function(c) { - assert.equal(c.toString(), 'a=b; Path=/should-stringify'); - }, - }, - "minutes are '10'": { - topic: function() { - var c = new Cookie(); - c.key = 'a'; - c.value = 'b'; - c.expires = new Date(1284113410000); - return c; - }, - "validates": function(c) { - assert.ok(c.validate()); - }, - "to string": function(c) { - var str = c.toString(); - assert.notEqual(str, 'a=b; Expires=Fri, 010 Sep 2010 010:010:010 GMT'); - assert.equal(str, 'a=b; Expires=Fri, 10 Sep 2010 10:10:10 GMT'); - }, - } - } -}) -.addBatch({ - "TTL with max-age": function() { - var c = new Cookie(); - c.maxAge = 123; - assert.equal(c.TTL(), 123000); - assert.equal(c.expiryTime(new Date(9000000)), 9123000); - }, - "TTL with zero max-age": function() { - var c = new Cookie(); - c.key = 'a'; c.value = 'b'; - c.maxAge = 0; // should be treated as "earliest representable" - assert.equal(c.TTL(), 0); - assert.equal(c.expiryTime(new Date(9000000)), -Infinity); - assert.ok(!c.validate()); // not valid, really: non-zero-digit *DIGIT - }, - "TTL with negative max-age": function() { - var c = new Cookie(); - c.key = 'a'; c.value = 'b'; - c.maxAge = -1; // should be treated as "earliest representable" - assert.equal(c.TTL(), 0); - assert.equal(c.expiryTime(new Date(9000000)), -Infinity); - assert.ok(!c.validate()); // not valid, really: non-zero-digit *DIGIT - }, - "TTL with max-age and expires": function() { - var c = new Cookie(); - c.maxAge = 123; - c.expires = new Date(Date.now()+9000); - assert.equal(c.TTL(), 123000); - assert.ok(c.isPersistent()); - }, - "TTL with expires": function() { - var c = new Cookie(); - var now = Date.now(); - c.expires = new Date(now+9000); - assert.equal(c.TTL(now), 9000); - assert.equal(c.expiryTime(), c.expires.getTime()); - }, - "TTL with old expires": function() { - var c = new Cookie(); - c.setExpires('17 Oct 2010 00:00:00 GMT'); - assert.ok(c.TTL() < 0); - assert.ok(c.isPersistent()); - }, - "default TTL": { - topic: function() { return new Cookie() }, - "is Infinite-future": function(c) { assert.equal(c.TTL(), Infinity) }, - "is a 'session' cookie": function(c) { assert.ok(!c.isPersistent()) }, - }, -}).addBatch({ - "Parsing": { - "simple": { - topic: function() { - return Cookie.parse('a=bcd',true) || null; - }, - "parsed": function(c) { assert.ok(c) }, - "key": function(c) { assert.equal(c.key, 'a') }, - "value": function(c) { assert.equal(c.value, 'bcd') }, - "no path": function(c) { assert.equal(c.path, null) }, - "no domain": function(c) { assert.equal(c.domain, null) }, - "no extensions": function(c) { assert.ok(!c.extensions) }, - }, - "with expiry": { - topic: function() { - return Cookie.parse('a=bcd; Expires=Tue, 18 Oct 2011 07:05:03 GMT',true) || null; - }, - "parsed": function(c) { assert.ok(c) }, - "key": function(c) { assert.equal(c.key, 'a') }, - "value": function(c) { assert.equal(c.value, 'bcd') }, - "has expires": function(c) { - assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be'); - assert.equal(c.expires.getTime(), 1318921503000); - }, - }, - "with expiry and path": { - topic: function() { - return Cookie.parse('abc="xyzzy!"; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Path=/aBc',true) || null; - }, - "parsed": function(c) { assert.ok(c) }, - "key": function(c) { assert.equal(c.key, 'abc') }, - "value": function(c) { assert.equal(c.value, 'xyzzy!') }, - "has expires": function(c) { - assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be'); - assert.equal(c.expires.getTime(), 1318921503000); - }, - "has path": function(c) { assert.equal(c.path, '/aBc'); }, - "no httponly or secure": function(c) { - assert.ok(!c.httpOnly); - assert.ok(!c.secure); - }, - }, - "with everything": { - topic: function() { - return Cookie.parse('abc="xyzzy!"; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Path=/aBc; Domain=example.com; Secure; HTTPOnly; Max-Age=1234; Foo=Bar; Baz', true) || null; - }, - "parsed": function(c) { assert.ok(c) }, - "key": function(c) { assert.equal(c.key, 'abc') }, - "value": function(c) { assert.equal(c.value, 'xyzzy!') }, - "has expires": function(c) { - assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be'); - assert.equal(c.expires.getTime(), 1318921503000); - }, - "has path": function(c) { assert.equal(c.path, '/aBc'); }, - "has domain": function(c) { assert.equal(c.domain, 'example.com'); }, - "has httponly": function(c) { assert.equal(c.httpOnly, true); }, - "has secure": function(c) { assert.equal(c.secure, true); }, - "has max-age": function(c) { assert.equal(c.maxAge, 1234); }, - "has extensions": function(c) { - assert.ok(c.extensions); - assert.equal(c.extensions[0], 'Foo=Bar'); - assert.equal(c.extensions[1], 'Baz'); - }, - }, - "invalid expires": { - "strict": function() { assert.ok(!Cookie.parse("a=b; Expires=xyzzy", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; Expires=xyzzy"); - assert.ok(c); - assert.equal(c.expires, Infinity); - }, - }, - "zero max-age": { - "strict": function() { assert.ok(!Cookie.parse("a=b; Max-Age=0", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; Max-Age=0"); - assert.ok(c); - assert.equal(c.maxAge, 0); - }, - }, - "negative max-age": { - "strict": function() { assert.ok(!Cookie.parse("a=b; Max-Age=-1", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; Max-Age=-1"); - assert.ok(c); - assert.equal(c.maxAge, -1); - }, - }, - "empty domain": { - "strict": function() { assert.ok(!Cookie.parse("a=b; domain=", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; domain="); - assert.ok(c); - assert.equal(c.domain, null); - }, - }, - "dot domain": { - "strict": function() { assert.ok(!Cookie.parse("a=b; domain=.", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; domain=."); - assert.ok(c); - assert.equal(c.domain, null); - }, - }, - "uppercase domain": { - "strict lowercases": function() { - var c = Cookie.parse("a=b; domain=EXAMPLE.COM"); - assert.ok(c); - assert.equal(c.domain, 'example.com'); - }, - "non-strict lowercases": function() { - var c = Cookie.parse("a=b; domain=EXAMPLE.COM"); - assert.ok(c); - assert.equal(c.domain, 'example.com'); - }, - }, - "trailing dot in domain": { - topic: function() { - return Cookie.parse("a=b; Domain=example.com.", true) || null; - }, - "has the domain": function(c) { assert.equal(c.domain,"example.com.") }, - "but doesn't validate": function(c) { assert.equal(c.validate(),false) }, - }, - "empty path": { - "strict": function() { assert.ok(!Cookie.parse("a=b; path=", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; path="); - assert.ok(c); - assert.equal(c.path, null); - }, - }, - "no-slash path": { - "strict": function() { assert.ok(!Cookie.parse("a=b; path=xyzzy", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; path=xyzzy"); - assert.ok(c); - assert.equal(c.path, null); - }, - }, - "trailing semi-colons after path": { - topic: function () { - return [ - "a=b; path=/;", - "c=d;;;;" - ]; - }, - "strict": function (t) { - assert.ok(!Cookie.parse(t[0], true)); - assert.ok(!Cookie.parse(t[1], true)); - }, - "non-strict": function (t) { - var c1 = Cookie.parse(t[0]); - var c2 = Cookie.parse(t[1]); - assert.ok(c1); - assert.ok(c2); - assert.equal(c1.path, '/'); - } - }, - "secure-with-value": { - "strict": function() { assert.ok(!Cookie.parse("a=b; Secure=xyzzy", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; Secure=xyzzy"); - assert.ok(c); - assert.equal(c.secure, true); - }, - }, - "httponly-with-value": { - "strict": function() { assert.ok(!Cookie.parse("a=b; HttpOnly=xyzzy", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; HttpOnly=xyzzy"); - assert.ok(c); - assert.equal(c.httpOnly, true); - }, - }, - "garbage": { - topic: function() { - return Cookie.parse("\x08", true) || null; - }, - "doesn't parse": function(c) { assert.equal(c,null) }, - }, - "public suffix domain": { - topic: function() { - return Cookie.parse("a=b; domain=kyoto.jp", true) || null; - }, - "parses fine": function(c) { - assert.ok(c); - assert.equal(c.domain, 'kyoto.jp'); - }, - "but fails validation": function(c) { - assert.ok(c); - assert.ok(!c.validate()); - }, - }, - "Ironically, Google 'GAPS' cookie has very little whitespace": { - topic: function() { - return Cookie.parse("GAPS=1:A1aaaaAaAAa1aaAaAaaAAAaaa1a11a:aaaAaAaAa-aaaA1-;Path=/;Expires=Thu, 17-Apr-2014 02:12:29 GMT;Secure;HttpOnly"); - }, - "parsed": function(c) { assert.ok(c) }, - "key": function(c) { assert.equal(c.key, 'GAPS') }, - "value": function(c) { assert.equal(c.value, '1:A1aaaaAaAAa1aaAaAaaAAAaaa1a11a:aaaAaAaAa-aaaA1-') }, - "path": function(c) { - assert.notEqual(c.path, '/;Expires'); // BUG - assert.equal(c.path, '/'); - }, - "expires": function(c) { - assert.notEqual(c.expires, Infinity); - assert.equal(c.expires.getTime(), 1397700749000); - }, - "secure": function(c) { assert.ok(c.secure) }, - "httponly": function(c) { assert.ok(c.httpOnly) }, - }, - "lots of equal signs": { - topic: function() { - return Cookie.parse("queryPref=b=c&d=e; Path=/f=g; Expires=Thu, 17 Apr 2014 02:12:29 GMT; HttpOnly"); - }, - "parsed": function(c) { assert.ok(c) }, - "key": function(c) { assert.equal(c.key, 'queryPref') }, - "value": function(c) { assert.equal(c.value, 'b=c&d=e') }, - "path": function(c) { - assert.equal(c.path, '/f=g'); - }, - "expires": function(c) { - assert.notEqual(c.expires, Infinity); - assert.equal(c.expires.getTime(), 1397700749000); - }, - "httponly": function(c) { assert.ok(c.httpOnly) }, - } - } -}) -.addBatch({ - "domain normalization": { - "simple": function() { - var c = new Cookie(); - c.domain = "EXAMPLE.com"; - assert.equal(c.canonicalizedDomain(), "example.com"); - }, - "extra dots": function() { - var c = new Cookie(); - c.domain = ".EXAMPLE.com"; - assert.equal(c.cdomain(), "example.com"); - }, - "weird trailing dot": function() { - var c = new Cookie(); - c.domain = "EXAMPLE.ca."; - assert.equal(c.canonicalizedDomain(), "example.ca."); - }, - "weird internal dots": function() { - var c = new Cookie(); - c.domain = "EXAMPLE...ca."; - assert.equal(c.canonicalizedDomain(), "example...ca."); - }, - "IDN": function() { - var c = new Cookie(); - c.domain = "δοκιμή.δοκιμή"; // "test.test" in greek - assert.equal(c.canonicalizedDomain(), "xn--jxalpdlp.xn--jxalpdlp"); - } - } -}) -.addBatch({ - "Domain Match":matchVows(tough.domainMatch, [ - // str, dom, expect - ["example.com", "example.com", true], - ["eXaMpLe.cOm", "ExAmPlE.CoM", true], - ["no.ca", "yes.ca", false], - ["wwwexample.com", "example.com", false], - ["www.example.com", "example.com", true], - ["example.com", "www.example.com", false], - ["www.subdom.example.com", "example.com", true], - ["www.subdom.example.com", "subdom.example.com", true], - ["example.com", "example.com.", false], // RFC6265 S4.1.2.3 - ["192.168.0.1", "168.0.1", false], // S5.1.3 "The string is a host name" - [null, "example.com", null], - ["example.com", null, null], - [null, null, null], - [undefined, undefined, null], - ]) -}) -.addBatch({ - "default-path": defaultPathVows([ - [null,"/"], - ["/","/"], - ["/file","/"], - ["/dir/file","/dir"], - ["noslash","/"], - ]) -}) -.addBatch({ - "Path-Match": matchVows(tough.pathMatch, [ - // request, cookie, match - ["/","/",true], - ["/dir","/",true], - ["/","/dir",false], - ["/dir/","/dir/", true], - ["/dir/file","/dir/",true], - ["/dir/file","/dir",true], - ["/directory","/dir",false], - ]) -}) -.addBatch({ - "Cookie Sorting": { - topic: function() { - var cookies = []; - var now = Date.now(); - cookies.push(Cookie.parse("a=0; Domain=example.com")); - cookies.push(Cookie.parse("b=1; Domain=www.example.com")); - cookies.push(Cookie.parse("c=2; Domain=example.com; Path=/pathA")); - cookies.push(Cookie.parse("d=3; Domain=www.example.com; Path=/pathA")); - cookies.push(Cookie.parse("e=4; Domain=example.com; Path=/pathA/pathB")); - cookies.push(Cookie.parse("f=5; Domain=www.example.com; Path=/pathA/pathB")); - - // force a stable creation time consistent with the order above since - // some may have been created at now + 1ms. - var i = cookies.length; - cookies.forEach(function(cookie) { - cookie.creation = new Date(now - 100*(i--)); - }); - - // weak shuffle: - cookies = cookies.sort(function(){return Math.random()-0.5}); - - cookies = cookies.sort(tough.cookieCompare); - return cookies; - }, - "got": function(cookies) { - assert.lengthOf(cookies, 6); - var names = cookies.map(function(c) {return c.key}); - assert.deepEqual(names, ['e','f','c','d','a','b']); - }, - } -}) -.addBatch({ - "CookieJar": { - "Setting a basic cookie": { - topic: function() { - var cj = new CookieJar(); - var c = Cookie.parse("a=b; Domain=example.com; Path=/"); - assert.strictEqual(c.hostOnly, null); - assert.instanceOf(c.creation, Date); - assert.strictEqual(c.lastAccessed, null); - c.creation = new Date(Date.now()-10000); - cj.setCookie(c, 'http://example.com/index.html', this.callback); - }, - "works": function(c) { assert.instanceOf(c,Cookie) }, // C is for Cookie, good enough for me - "gets timestamped": function(c) { - assert.ok(c.creation); - assert.ok(Date.now() - c.creation.getTime() < 5000); // recently stamped - assert.ok(c.lastAccessed); - assert.equal(c.creation, c.lastAccessed); - assert.equal(c.TTL(), Infinity); - assert.ok(!c.isPersistent()); - }, - }, - "Setting a no-path cookie": { - topic: function() { - var cj = new CookieJar(); - var c = Cookie.parse("a=b; Domain=example.com"); - assert.strictEqual(c.hostOnly, null); - assert.instanceOf(c.creation, Date); - assert.strictEqual(c.lastAccessed, null); - c.creation = new Date(Date.now()-10000); - cj.setCookie(c, 'http://example.com/index.html', this.callback); - }, - "domain": function(c) { assert.equal(c.domain, 'example.com') }, - "path is /": function(c) { assert.equal(c.path, '/') }, - "path was derived": function(c) { assert.strictEqual(c.pathIsDefault, true) }, - }, - "Setting a cookie already marked as host-only": { - topic: function() { - var cj = new CookieJar(); - var c = Cookie.parse("a=b; Domain=example.com"); - assert.strictEqual(c.hostOnly, null); - assert.instanceOf(c.creation, Date); - assert.strictEqual(c.lastAccessed, null); - c.creation = new Date(Date.now()-10000); - c.hostOnly = true; - cj.setCookie(c, 'http://example.com/index.html', this.callback); - }, - "domain": function(c) { assert.equal(c.domain, 'example.com') }, - "still hostOnly": function(c) { assert.strictEqual(c.hostOnly, true) }, - }, - "Setting a session cookie": { - topic: function() { - var cj = new CookieJar(); - var c = Cookie.parse("a=b"); - assert.strictEqual(c.path, null); - cj.setCookie(c, 'http://www.example.com/dir/index.html', this.callback); - }, - "works": function(c) { assert.instanceOf(c,Cookie) }, - "gets the domain": function(c) { assert.equal(c.domain, 'www.example.com') }, - "gets the default path": function(c) { assert.equal(c.path, '/dir') }, - "is 'hostOnly'": function(c) { assert.ok(c.hostOnly) }, - }, - "Setting wrong domain cookie": { - topic: function() { - var cj = new CookieJar(); - var c = Cookie.parse("a=b; Domain=fooxample.com; Path=/"); - cj.setCookie(c, 'http://example.com/index.html', this.callback); - }, - "fails": function(err,c) { - assert.ok(err.message.match(/domain/i)); - assert.ok(!c); - }, - }, - "Setting sub-domain cookie": { - topic: function() { - var cj = new CookieJar(); - var c = Cookie.parse("a=b; Domain=www.example.com; Path=/"); - cj.setCookie(c, 'http://example.com/index.html', this.callback); - }, - "fails": function(err,c) { - assert.ok(err.message.match(/domain/i)); - assert.ok(!c); - }, - }, - "Setting super-domain cookie": { - topic: function() { - var cj = new CookieJar(); - var c = Cookie.parse("a=b; Domain=example.com; Path=/"); - cj.setCookie(c, 'http://www.app.example.com/index.html', this.callback); - }, - "success": function(err,c) { - assert.ok(!err); - assert.equal(c.domain, 'example.com'); - }, - }, - "Setting HttpOnly cookie over non-HTTP API": { - topic: function() { - var cj = new CookieJar(); - var c = Cookie.parse("a=b; Domain=example.com; Path=/; HttpOnly"); - cj.setCookie(c, 'http://example.com/index.html', {http:false}, this.callback); - }, - "fails": function(err,c) { - assert.match(err.message, /HttpOnly/i); - assert.ok(!c); - }, - }, - }, - "Cookie Jar store eight cookies": { - topic: function() { - var cj = new CookieJar(); - var ex = 'http://example.com/index.html'; - var tasks = []; - tasks.push(function(next) { - cj.setCookie('a=1; Domain=example.com; Path=/',ex,at(0),next); - }); - tasks.push(function(next) { - cj.setCookie('b=2; Domain=example.com; Path=/; HttpOnly',ex,at(1000),next); - }); - tasks.push(function(next) { - cj.setCookie('c=3; Domain=example.com; Path=/; Secure',ex,at(2000),next); - }); - tasks.push(function(next) { // path - cj.setCookie('d=4; Domain=example.com; Path=/foo',ex,at(3000),next); - }); - tasks.push(function(next) { // host only - cj.setCookie('e=5',ex,at(4000),next); - }); - tasks.push(function(next) { // other domain - cj.setCookie('f=6; Domain=nodejs.org; Path=/','http://nodejs.org',at(5000),next); - }); - tasks.push(function(next) { // expired - cj.setCookie('g=7; Domain=example.com; Path=/; Expires=Tue, 18 Oct 2011 00:00:00 GMT',ex,at(6000),next); - }); - tasks.push(function(next) { // expired via Max-Age - cj.setCookie('h=8; Domain=example.com; Path=/; Max-Age=1',ex,next); - }); - var cb = this.callback; - async.parallel(tasks, function(err,results){ - setTimeout(function() { - cb(err,cj,results); - }, 2000); // so that 'h=8' expires - }); - }, - "setup ok": function(err,cj,results) { - assert.ok(1); - }, - "then retrieving for http://nodejs.org": { - topic: function(cj,results) { - cj.getCookies('http://nodejs.org',this.callback); - }, - "get a nodejs cookie": function(cookies) { - assert.lengthOf(cookies, 1); - var cookie = cookies[0]; - assert.equal(cookie.domain, 'nodejs.org'); - }, - }, - "then retrieving for https://example.com": { - topic: function(cj,results) { - cj.getCookies('https://example.com',{secure:true},this.callback); - }, - "get a secure example cookie with others": function(cookies) { - var names = cookies.map(function(c) {return c.key}); - assert.deepEqual(names, ['a','b','c','e']); - }, - }, - "then retrieving for https://example.com (missing options)": { - topic: function(cj,results) { - cj.getCookies('https://example.com',this.callback); - }, - "get a secure example cookie with others": function(cookies) { - var names = cookies.map(function(c) {return c.key}); - assert.deepEqual(names, ['a','b','c','e']); - }, - }, - "then retrieving for http://example.com": { - topic: function(cj,results) { - cj.getCookies('http://example.com',this.callback); - }, - "get a bunch of cookies": function(cookies) { - var names = cookies.map(function(c) {return c.key}); - assert.deepEqual(names, ['a','b','e']); - }, - }, - "then retrieving for http://EXAMPlE.com": { - topic: function(cj,results) { - cj.getCookies('http://EXAMPlE.com',this.callback); - }, - "get a bunch of cookies": function(cookies) { - var names = cookies.map(function(c) {return c.key}); - assert.deepEqual(names, ['a','b','e']); - }, - }, - "then retrieving for http://example.com, non-HTTP": { - topic: function(cj,results) { - cj.getCookies('http://example.com',{http:false},this.callback); - }, - "get a bunch of cookies": function(cookies) { - var names = cookies.map(function(c) {return c.key}); - assert.deepEqual(names, ['a','e']); - }, - }, - "then retrieving for http://example.com/foo/bar": { - topic: function(cj,results) { - cj.getCookies('http://example.com/foo/bar',this.callback); - }, - "get a bunch of cookies": function(cookies) { - var names = cookies.map(function(c) {return c.key}); - assert.deepEqual(names, ['d','a','b','e']); - }, - }, - "then retrieving for http://example.com as a string": { - topic: function(cj,results) { - cj.getCookieString('http://example.com',this.callback); - }, - "get a single string": function(cookieHeader) { - assert.equal(cookieHeader, "a=1; b=2; e=5"); - }, - }, - "then retrieving for http://example.com as a set-cookie header": { - topic: function(cj,results) { - cj.getSetCookieStrings('http://example.com',this.callback); - }, - "get a single string": function(cookieHeaders) { - assert.lengthOf(cookieHeaders, 3); - assert.equal(cookieHeaders[0], "a=1; Domain=example.com; Path=/"); - assert.equal(cookieHeaders[1], "b=2; Domain=example.com; Path=/; HttpOnly"); - assert.equal(cookieHeaders[2], "e=5; Path=/"); - }, - }, - "then retrieving for http://www.example.com/": { - topic: function(cj,results) { - cj.getCookies('http://www.example.com/foo/bar',this.callback); - }, - "get a bunch of cookies": function(cookies) { - var names = cookies.map(function(c) {return c.key}); - assert.deepEqual(names, ['d','a','b']); // note lack of 'e' - }, - }, - }, - "Repeated names": { - topic: function() { - var cb = this.callback; - var cj = new CookieJar(); - var ex = 'http://www.example.com/'; - var sc = cj.setCookie; - var tasks = []; - var now = Date.now(); - tasks.push(sc.bind(cj,'aaaa=xxxx',ex,at(0))); - tasks.push(sc.bind(cj,'aaaa=1111; Domain=www.example.com',ex,at(1000))); - tasks.push(sc.bind(cj,'aaaa=2222; Domain=example.com',ex,at(2000))); - tasks.push(sc.bind(cj,'aaaa=3333; Domain=www.example.com; Path=/pathA',ex,at(3000))); - async.series(tasks,function(err,results) { - results = results.filter(function(e) {return e !== undefined}); - cb(err,{cj:cj, cookies:results, now:now}); - }); - }, - "all got set": function(err,t) { - assert.lengthOf(t.cookies,4); - }, - "then getting 'em back": { - topic: function(t) { - var cj = t.cj; - cj.getCookies('http://www.example.com/pathA',this.callback); - }, - "there's just three": function (err,cookies) { - var vals = cookies.map(function(c) {return c.value}); - // may break with sorting; sorting should put 3333 first due to longest path: - assert.deepEqual(vals, ['3333','1111','2222']); - } - }, - }, - "CookieJar setCookie errors": { - "public-suffix domain": { - topic: function() { - var cj = new CookieJar(); - cj.setCookie('i=9; Domain=kyoto.jp; Path=/','kyoto.jp',this.callback); - }, - "errors": function(err,cookie) { - assert.ok(err); - assert.ok(!cookie); - assert.match(err.message, /public suffix/i); - }, - }, - "wrong domain": { - topic: function() { - var cj = new CookieJar(); - cj.setCookie('j=10; Domain=google.com; Path=/','google.ca',this.callback); - }, - "errors": function(err,cookie) { - assert.ok(err); - assert.ok(!cookie); - assert.match(err.message, /not in this host's domain/i); - }, - }, - "old cookie is HttpOnly": { - topic: function() { - var cb = this.callback; - var next = function (err,c) { - return cb(err,cj); - }; - var cj = new CookieJar(); - cj.setCookie('k=11; Domain=example.ca; Path=/; HttpOnly','http://example.ca',{http:true},next); - }, - "initial cookie is set": function(err,cj) { - assert.ok(!err); - }, - "but when trying to overwrite": { - topic: function(cj) { - var cb = this.callback; - cj.setCookie('k=12; Domain=example.ca; Path=/','http://example.ca',{http:false},function(err,c) {cb(null,err)}); - }, - "it's an error": function(err) { - assert.ok(err); - }, - "then, checking the original": { - topic: function(ignored,cj) { - assert.ok(cj instanceof CookieJar); - cj.getCookies('http://example.ca',{http:true},this.callback); - }, - "cookie has original value": function(err,cookies) { - assert.equal(err,null); - assert.lengthOf(cookies, 1); - assert.equal(cookies[0].value,11); - }, - }, - }, - }, - }, -}) -.addBatch({ - "JSON": { - "serialization": { - topic: function() { - var c = Cookie.parse('alpha=beta; Domain=example.com; Path=/foo; Expires=Tue, 19 Jan 2038 03:14:07 GMT; HttpOnly'); - return JSON.stringify(c); - }, - "gives a string": function(str) { - assert.equal(typeof str, "string"); - }, - "date is in ISO format": function(str) { - assert.match(str, /"expires":"2038-01-19T03:14:07\.000Z"/, 'expires is in ISO format'); - }, - }, - "deserialization": { - topic: function() { - var json = '{"key":"alpha","value":"beta","domain":"example.com","path":"/foo","expires":"2038-01-19T03:14:07.000Z","httpOnly":true,"lastAccessed":2000000000123}'; - return Cookie.fromJSON(json); - }, - "works": function(c) { - assert.ok(c); - }, - "key": function(c) { assert.equal(c.key, "alpha") }, - "value": function(c) { assert.equal(c.value, "beta") }, - "domain": function(c) { assert.equal(c.domain, "example.com") }, - "path": function(c) { assert.equal(c.path, "/foo") }, - "httpOnly": function(c) { assert.strictEqual(c.httpOnly, true) }, - "secure": function(c) { assert.strictEqual(c.secure, false) }, - "hostOnly": function(c) { assert.strictEqual(c.hostOnly, null) }, - "expires is a date object": function(c) { - assert.equal(c.expires.getTime(), 2147483647000); - }, - "lastAccessed is a date object": function(c) { - assert.equal(c.lastAccessed.getTime(), 2000000000123); - }, - "creation defaulted": function(c) { - assert.ok(c.creation.getTime()); - } - }, - "null deserialization": { - topic: function() { - return Cookie.fromJSON(null); - }, - "is null": function(cookie) { - assert.equal(cookie,null); - }, - }, - }, - "expiry deserialization": { - "Infinity": { - topic: Cookie.fromJSON.bind(null, '{"expires":"Infinity"}'), - "is infinite": function(c) { - assert.strictEqual(c.expires, "Infinity"); - assert.equal(c.expires, Infinity); - }, - }, - }, - "maxAge serialization": { - topic: function() { - return function(toSet) { - var c = new Cookie(); - c.key = 'foo'; c.value = 'bar'; - c.setMaxAge(toSet); - return JSON.stringify(c); - }; - }, - "zero": { - topic: function(f) { return f(0) }, - "looks good": function(str) { - assert.match(str, /"maxAge":0/); - }, - }, - "Infinity": { - topic: function(f) { return f(Infinity) }, - "looks good": function(str) { - assert.match(str, /"maxAge":"Infinity"/); - }, - }, - "-Infinity": { - topic: function(f) { return f(-Infinity) }, - "looks good": function(str) { - assert.match(str, /"maxAge":"-Infinity"/); - }, - }, - "null": { - topic: function(f) { return f(null) }, - "looks good": function(str) { - assert.match(str, /"maxAge":null/); - }, - }, - }, - "maxAge deserialization": { - "number": { - topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":123}'), - "is the number": function(c) { - assert.strictEqual(c.maxAge, 123); - }, - }, - "null": { - topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":null}'), - "is null": function(c) { - assert.strictEqual(c.maxAge, null); - }, - }, - "less than zero": { - topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":-123}'), - "is -123": function(c) { - assert.strictEqual(c.maxAge, -123); - }, - }, - "Infinity": { - topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":"Infinity"}'), - "is inf-as-string": function(c) { - assert.strictEqual(c.maxAge, "Infinity"); - }, - }, - "-Infinity": { - topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":"-Infinity"}'), - "is inf-as-string": function(c) { - assert.strictEqual(c.maxAge, "-Infinity"); - }, - }, - } -}) -.addBatch({ - "permuteDomain": { - "base case": { - topic: tough.permuteDomain.bind(null,'example.com'), - "got the domain": function(list) { - assert.deepEqual(list, ['example.com']); - }, - }, - "two levels": { - topic: tough.permuteDomain.bind(null,'foo.bar.example.com'), - "got three things": function(list) { - assert.deepEqual(list, ['example.com','bar.example.com','foo.bar.example.com']); - }, - }, - "invalid domain": { - topic: tough.permuteDomain.bind(null,'foo.bar.example.localduhmain'), - "got three things": function(list) { - assert.equal(list, null); - }, - }, - }, - "permutePath": { - "base case": { - topic: tough.permutePath.bind(null,'/'), - "just slash": function(list) { - assert.deepEqual(list,['/']); - }, - }, - "single case": { - topic: tough.permutePath.bind(null,'/foo'), - "two things": function(list) { - assert.deepEqual(list,['/foo','/']); - }, - "path matching": function(list) { - list.forEach(function(e) { - assert.ok(tough.pathMatch('/foo',e)); - }); - }, - }, - "double case": { - topic: tough.permutePath.bind(null,'/foo/bar'), - "four things": function(list) { - assert.deepEqual(list,['/foo/bar','/foo','/']); - }, - "path matching": function(list) { - list.forEach(function(e) { - assert.ok(tough.pathMatch('/foo/bar',e)); - }); - }, - }, - "trailing slash": { - topic: tough.permutePath.bind(null,'/foo/bar/'), - "three things": function(list) { - assert.deepEqual(list,['/foo/bar','/foo','/']); - }, - "path matching": function(list) { - list.forEach(function(e) { - assert.ok(tough.pathMatch('/foo/bar/',e)); - }); - }, - }, - } -}) -.addBatch({ - "Issue 1": { - topic: function() { - var cj = new CookieJar(); - cj.setCookie('hello=world; path=/some/path/', 'http://domain/some/path/file', function(err,cookie) { - this.callback(err,{cj:cj, cookie:cookie}); - }.bind(this)); - }, - "stored a cookie": function(t) { - assert.ok(t.cookie); - }, - "cookie's path was modified to remove unnecessary slash": function(t) { - assert.equal(t.cookie.path, '/some/path'); - }, - "getting it back": { - topic: function(t) { - t.cj.getCookies('http://domain/some/path/file', function(err,cookies) { - this.callback(err, {cj:t.cj, cookies:cookies||[]}); - }.bind(this)); - }, - "got one cookie": function(t) { - assert.lengthOf(t.cookies, 1); - }, - "it's the right one": function(t) { - var c = t.cookies[0]; - assert.equal(c.key, 'hello'); - assert.equal(c.value, 'world'); - }, - } - } -}) -.addBatch({ - "expiry option": { - topic: function() { - var cb = this.callback; - var cj = new CookieJar(); - cj.setCookie('near=expiry; Domain=example.com; Path=/; Max-Age=1','http://www.example.com',at(-1), function(err,cookie) { - - cb(err, {cj:cj, cookie:cookie}); - }); - }, - "set the cookie": function(t) { - assert.ok(t.cookie, "didn't set?!"); - assert.equal(t.cookie.key, 'near'); - }, - "then, retrieving": { - topic: function(t) { - var cb = this.callback; - setTimeout(function() { - t.cj.getCookies('http://www.example.com', {http:true, expire:false}, function(err,cookies) { - t.cookies = cookies; - cb(err,t); - }); - },2000); - }, - "got the cookie": function(t) { - assert.lengthOf(t.cookies, 1); - assert.equal(t.cookies[0].key, 'near'); - }, - } - } -}) -.addBatch({ - "trailing semi-colon set into cj": { - topic: function () { - var cb = this.callback; - var cj = new CookieJar(); - var ex = 'http://www.example.com'; - var tasks = []; - tasks.push(function(next) { - cj.setCookie('broken_path=testme; path=/;',ex,at(-1),next); - }); - tasks.push(function(next) { - cj.setCookie('b=2; Path=/;;;;',ex,at(-1),next); - }); - async.parallel(tasks, function (err, cookies) { - cb(null, { - cj: cj, - cookies: cookies - }); - }); - }, - "check number of cookies": function (t) { - assert.lengthOf(t.cookies, 2, "didn't set"); - }, - "check *broken_path* was set properly": function (t) { - assert.equal(t.cookies[0].key, "broken_path"); - assert.equal(t.cookies[0].value, "testme"); - assert.equal(t.cookies[0].path, "/"); - }, - "check *b* was set properly": function (t) { - assert.equal(t.cookies[1].key, "b"); - assert.equal(t.cookies[1].value, "2"); - assert.equal(t.cookies[1].path, "/"); - }, - "retrieve the cookie": { - topic: function (t) { - var cb = this.callback; - t.cj.getCookies('http://www.example.com', {}, function (err, cookies) { - t.cookies = cookies; - cb(err, t); - }); - }, - "get the cookie": function(t) { - assert.lengthOf(t.cookies, 2); - assert.equal(t.cookies[0].key, 'broken_path'); - assert.equal(t.cookies[0].value, 'testme'); - assert.equal(t.cookies[1].key, "b"); - assert.equal(t.cookies[1].value, "2"); - assert.equal(t.cookies[1].path, "/"); - }, - }, - } -}) -.addBatch({ - "Constructor":{ - topic: function () { - return new Cookie({ - key: 'test', - value: 'b', - maxAge: 60 - }); - }, - 'check for key property': function (c) { - assert.ok(c); - assert.equal(c.key, 'test'); - }, - 'check for value property': function (c) { - assert.equal(c.value, 'b'); - }, - 'check for maxAge': function (c) { - assert.equal(c.maxAge, 60); - }, - 'check for default values for unspecified properties': function (c) { - assert.equal(c.expires, "Infinity"); - assert.equal(c.secure, false); - assert.equal(c.httpOnly, false); - } - } -}) -.addBatch({ - "allPaths option": { - topic: function() { - var cj = new CookieJar(); - var tasks = []; - tasks.push(cj.setCookie.bind(cj, 'nopath_dom=qq; Path=/; Domain=example.com', 'http://example.com', {})); - tasks.push(cj.setCookie.bind(cj, 'path_dom=qq; Path=/foo; Domain=example.com', 'http://example.com', {})); - tasks.push(cj.setCookie.bind(cj, 'nopath_host=qq; Path=/', 'http://www.example.com', {})); - tasks.push(cj.setCookie.bind(cj, 'path_host=qq; Path=/foo', 'http://www.example.com', {})); - tasks.push(cj.setCookie.bind(cj, 'other=qq; Path=/', 'http://other.example.com/', {})); - tasks.push(cj.setCookie.bind(cj, 'other2=qq; Path=/foo', 'http://other.example.com/foo', {})); - var cb = this.callback; - async.parallel(tasks, function(err,results) { - cb(err, {cj:cj, cookies: results}); - }); - }, - "all set": function(t) { - assert.equal(t.cookies.length, 6); - assert.ok(t.cookies.every(function(c) { return !!c })); - }, - "getting without allPaths": { - topic: function(t) { - var cb = this.callback; - var cj = t.cj; - cj.getCookies('http://www.example.com/', {}, function(err,cookies) { - cb(err, {cj:cj, cookies:cookies}); - }); - }, - "found just two cookies": function(t) { - assert.equal(t.cookies.length, 2); - }, - "all are path=/": function(t) { - assert.ok(t.cookies.every(function(c) { return c.path === '/' })); - }, - "no 'other' cookies": function(t) { - assert.ok(!t.cookies.some(function(c) { return (/^other/).test(c.name) })); - }, - }, - "getting without allPaths for /foo": { - topic: function(t) { - var cb = this.callback; - var cj = t.cj; - cj.getCookies('http://www.example.com/foo', {}, function(err,cookies) { - cb(err, {cj:cj, cookies:cookies}); - }); - }, - "found four cookies": function(t) { - assert.equal(t.cookies.length, 4); - }, - "no 'other' cookies": function(t) { - assert.ok(!t.cookies.some(function(c) { return (/^other/).test(c.name) })); - }, - }, - "getting with allPaths:true": { - topic: function(t) { - var cb = this.callback; - var cj = t.cj; - cj.getCookies('http://www.example.com/', {allPaths:true}, function(err,cookies) { - cb(err, {cj:cj, cookies:cookies}); - }); - }, - "found four cookies": function(t) { - assert.equal(t.cookies.length, 4); - }, - "no 'other' cookies": function(t) { - assert.ok(!t.cookies.some(function(c) { return (/^other/).test(c.name) })); - }, - }, - } -}) -.export(module); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/LICENSE deleted file mode 100644 index a4a9aee0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/README.md deleted file mode 100644 index bb533d56..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/README.md +++ /dev/null @@ -1,4 +0,0 @@ -tunnel-agent -============ - -HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/index.js deleted file mode 100644 index 3f7bbb90..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/index.js +++ /dev/null @@ -1,227 +0,0 @@ -'use strict' - -var net = require('net') - , tls = require('tls') - , http = require('http') - , https = require('https') - , events = require('events') - , assert = require('assert') - , util = require('util') - ; - -exports.httpOverHttp = httpOverHttp -exports.httpsOverHttp = httpsOverHttp -exports.httpOverHttps = httpOverHttps -exports.httpsOverHttps = httpsOverHttps - - -function httpOverHttp(options) { - var agent = new TunnelingAgent(options) - agent.request = http.request - return agent -} - -function httpsOverHttp(options) { - var agent = new TunnelingAgent(options) - agent.request = http.request - agent.createSocket = createSecureSocket - return agent -} - -function httpOverHttps(options) { - var agent = new TunnelingAgent(options) - agent.request = https.request - return agent -} - -function httpsOverHttps(options) { - var agent = new TunnelingAgent(options) - agent.request = https.request - agent.createSocket = createSecureSocket - return agent -} - - -function TunnelingAgent(options) { - var self = this - self.options = options || {} - self.proxyOptions = self.options.proxy || {} - self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets - self.requests = [] - self.sockets = [] - - self.on('free', function onFree(socket, host, port) { - for (var i = 0, len = self.requests.length; i < len; ++i) { - var pending = self.requests[i] - if (pending.host === host && pending.port === port) { - // Detect the request to connect same origin server, - // reuse the connection. - self.requests.splice(i, 1) - pending.request.onSocket(socket) - return - } - } - socket.destroy() - self.removeSocket(socket) - }) -} -util.inherits(TunnelingAgent, events.EventEmitter) - -TunnelingAgent.prototype.addRequest = function addRequest(req, host, port) { - var self = this - - if (self.sockets.length >= this.maxSockets) { - // We are over limit so we'll add it to the queue. - self.requests.push({host: host, port: port, request: req}) - return - } - - // If we are under maxSockets create a new one. - self.createSocket({host: host, port: port, request: req}, function(socket) { - socket.on('free', onFree) - socket.on('close', onCloseOrRemove) - socket.on('agentRemove', onCloseOrRemove) - req.onSocket(socket) - - function onFree() { - self.emit('free', socket, host, port) - } - - function onCloseOrRemove(err) { - self.removeSocket() - socket.removeListener('free', onFree) - socket.removeListener('close', onCloseOrRemove) - socket.removeListener('agentRemove', onCloseOrRemove) - } - }) -} - -TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this - var placeholder = {} - self.sockets.push(placeholder) - - var connectOptions = mergeOptions({}, self.proxyOptions, - { method: 'CONNECT' - , path: options.host + ':' + options.port - , agent: false - } - ) - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {} - connectOptions.headers['Proxy-Authorization'] = 'Basic ' + - new Buffer(connectOptions.proxyAuth).toString('base64') - } - - debug('making CONNECT request') - var connectReq = self.request(connectOptions) - connectReq.useChunkedEncodingByDefault = false // for v0.6 - connectReq.once('response', onResponse) // for v0.6 - connectReq.once('upgrade', onUpgrade) // for v0.6 - connectReq.once('connect', onConnect) // for v0.7 or later - connectReq.once('error', onError) - connectReq.end() - - function onResponse(res) { - // Very hacky. This is necessary to avoid http-parser leaks. - res.upgrade = true - } - - function onUpgrade(res, socket, head) { - // Hacky. - process.nextTick(function() { - onConnect(res, socket, head) - }) - } - - function onConnect(res, socket, head) { - connectReq.removeAllListeners() - socket.removeAllListeners() - - if (res.statusCode === 200) { - assert.equal(head.length, 0) - debug('tunneling connection has established') - self.sockets[self.sockets.indexOf(placeholder)] = socket - cb(socket) - } else { - debug('tunneling socket could not be established, statusCode=%d', res.statusCode) - var error = new Error('tunneling socket could not be established, ' + 'statusCode=' + res.statusCode) - error.code = 'ECONNRESET' - options.request.emit('error', error) - self.removeSocket(placeholder) - } - } - - function onError(cause) { - connectReq.removeAllListeners() - - debug('tunneling socket could not be established, cause=%s\n', cause.message, cause.stack) - var error = new Error('tunneling socket could not be established, ' + 'cause=' + cause.message) - error.code = 'ECONNRESET' - options.request.emit('error', error) - self.removeSocket(placeholder) - } -} - -TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket) - if (pos === -1) return - - this.sockets.splice(pos, 1) - - var pending = this.requests.shift() - if (pending) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createSocket(pending, function(socket) { - pending.request.onSocket(socket) - }) - } -} - -function createSecureSocket(options, cb) { - var self = this - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - // 0 is dummy port for v0.6 - var secureSocket = tls.connect(0, mergeOptions({}, self.options, - { servername: options.host - , socket: socket - } - )) - cb(secureSocket) - }) -} - - -function mergeOptions(target) { - for (var i = 1, len = arguments.length; i < len; ++i) { - var overrides = arguments[i] - if (typeof overrides === 'object') { - var keys = Object.keys(overrides) - for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { - var k = keys[j] - if (overrides[k] !== undefined) { - target[k] = overrides[k] - } - } - } - } - return target -} - - -var debug -if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { - var args = Array.prototype.slice.call(arguments) - if (typeof args[0] === 'string') { - args[0] = 'TUNNEL: ' + args[0] - } else { - args.unshift('TUNNEL:') - } - console.error.apply(console, args) - } -} else { - debug = function() {} -} -exports.debug = debug // for test diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/package.json deleted file mode 100644 index acfa6e1c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "author": { - "name": "Mikeal Rogers", - "email": "mikeal.rogers@gmail.com", - "url": "http://www.futurealoof.com" - }, - "name": "tunnel-agent", - "description": "HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.", - "version": "0.3.0", - "repository": { - "url": "https://github.com/mikeal/tunnel-agent" - }, - "main": "index.js", - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "readme": "tunnel-agent\n============\n\nHTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/mikeal/tunnel-agent/issues" - }, - "homepage": "https://github.com/mikeal/tunnel-agent", - "_id": "tunnel-agent@0.3.0", - "dist": { - "shasum": "ad681b68f5321ad2827c4cfb1b7d5df2cfe942ee" - }, - "_from": "tunnel-agent@~0.3.0", - "_resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.3.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/package.json deleted file mode 100755 index 57c99c02..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "request", - "description": "Simplified HTTP request client.", - "tags": [ - "http", - "simple", - "util", - "utility" - ], - "version": "2.31.0", - "author": { - "name": "Mikeal Rogers", - "email": "mikeal.rogers@gmail.com" - }, - "repository": { - "type": "git", - "url": "http://github.com/mikeal/request.git" - }, - "bugs": { - "url": "http://github.com/mikeal/request/issues" - }, - "engines": [ - "node >= 0.8.0" - ], - "main": "index.js", - "dependencies": { - "qs": "~0.6.0", - "json-stringify-safe": "~5.0.0", - "forever-agent": "~0.5.0", - "node-uuid": "~1.4.0", - "mime": "~1.2.9", - "tough-cookie": "~0.9.15", - "form-data": "~0.1.0", - "tunnel-agent": "~0.3.0", - "http-signature": "~0.10.0", - "oauth-sign": "~0.3.0", - "hawk": "~1.0.0", - "aws-sign2": "~0.5.0" - }, - "optionalDependencies": { - "tough-cookie": "~0.9.15", - "form-data": "~0.1.0", - "tunnel-agent": "~0.3.0", - "http-signature": "~0.10.0", - "oauth-sign": "~0.3.0", - "hawk": "~1.0.0", - "aws-sign2": "~0.5.0" - }, - "scripts": { - "test": "node tests/run.js" - }, - "readme": "# Request -- Simplified HTTP client\n\n[![NPM](https://nodei.co/npm/request.png)](https://nodei.co/npm/request/)\n\n## Super simple to use\n\nRequest is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.\n\n```javascript\nvar request = require('request');\nrequest('http://www.google.com', function (error, response, body) {\n if (!error && response.statusCode == 200) {\n console.log(body) // Print the google web page.\n }\n})\n```\n\n## Streaming\n\nYou can stream any response to a file stream.\n\n```javascript\nrequest('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))\n```\n\nYou can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers don’t already provide one).\n\n```javascript\nfs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))\n```\n\nRequest can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers.\n\n```javascript\nrequest.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))\n```\n\nNow let’s get fancy.\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n if (req.method === 'PUT') {\n req.pipe(request.put('http://mysite.com/doodle.png'))\n } else if (req.method === 'GET' || req.method === 'HEAD') {\n request.get('http://mysite.com/doodle.png').pipe(resp)\n }\n }\n})\n```\n\nYou can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do:\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n var x = request('http://mysite.com/doodle.png')\n req.pipe(x)\n x.pipe(resp)\n }\n})\n```\n\nAnd since `pipe()` returns the destination stream in ≥ Node 0.5.x you can do one line proxying. :)\n\n```javascript\nreq.pipe(request('http://mysite.com/doodle.png')).pipe(resp)\n```\n\nAlso, none of this new functionality conflicts with requests previous features, it just expands them.\n\n```javascript\nvar r = request.defaults({'proxy':'http://localproxy.com'})\n\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n r.get('http://google.com/doodle.png').pipe(resp)\n }\n})\n```\n\nYou can still use intermediate proxies, the requests will still follow HTTP forwards, etc.\n\n## Forms\n\n`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API.\n\nURL-encoded forms are simple.\n\n```javascript\nrequest.post('http://service.com/upload', {form:{key:'value'}})\n// or\nrequest.post('http://service.com/upload').form({key:'value'})\n```\n\nFor `multipart/form-data` we use the [form-data](https://github.com/felixge/node-form-data) library by [@felixge](https://github.com/felixge). You don’t need to worry about piping the form object or setting the headers, `request` will handle that for you.\n\n```javascript\nvar r = request.post('http://service.com/upload')\nvar form = r.form()\nform.append('my_field', 'my_value')\nform.append('my_buffer', new Buffer([1, 2, 3]))\nform.append('my_file', fs.createReadStream(path.join(__dirname, 'doodle.png'))\nform.append('remote_file', request('http://google.com/doodle.png'))\n```\n\n## HTTP Authentication\n\n```javascript\nrequest.get('http://some.server.com/').auth('username', 'password', false);\n// or\nrequest.get('http://some.server.com/', {\n 'auth': {\n 'user': 'username',\n 'pass': 'password',\n 'sendImmediately': false\n }\n});\n```\n\nIf passed as an option, `auth` should be a hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). The method form takes parameters `auth(username, password, sendImmediately)`.\n\n`sendImmediately` defaults to `true`, which causes a basic authentication header to be sent. If `sendImmediately` is `false`, then `request` will retry with a proper authentication header after receiving a `401` response from the server (which must contain a `WWW-Authenticate` header indicating the required authentication method).\n\nDigest authentication is supported, but it only works with `sendImmediately` set to `false`; otherwise `request` will send basic authentication on the initial request, which will probably cause the request to fail.\n\n## OAuth Signing\n\n```javascript\n// Twitter OAuth\nvar qs = require('querystring')\n , oauth =\n { callback: 'http://mysite.com/callback/'\n , consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n }\n , url = 'https://api.twitter.com/oauth/request_token'\n ;\nrequest.post({url:url, oauth:oauth}, function (e, r, body) {\n // Ideally, you would take the body in the response\n // and construct a URL that a user clicks on (like a sign in button).\n // The verifier is only available in the response after a user has\n // verified with twitter that they are authorizing your app.\n var access_token = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: access_token.oauth_token\n , verifier: access_token.oauth_verifier\n }\n , url = 'https://api.twitter.com/oauth/access_token'\n ;\n request.post({url:url, oauth:oauth}, function (e, r, body) {\n var perm_token = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: perm_token.oauth_token\n , token_secret: perm_token.oauth_token_secret\n }\n , url = 'https://api.twitter.com/1.1/users/show.json?'\n , params =\n { screen_name: perm_token.screen_name\n , user_id: perm_token.user_id\n }\n ;\n url += qs.stringify(params)\n request.get({url:url, oauth:oauth, json:true}, function (e, r, user) {\n console.log(user)\n })\n })\n})\n```\n\n### Custom HTTP Headers\n\nHTTP Headers, such as `User-Agent`, can be set in the `options` object.\nIn the example below, we call the github API to find out the number\nof stars and forks for the request repository. This requires a\ncustom `User-Agent` header as well as https.\n\n```javascript\nvar request = require('request');\n\nvar options = {\n\turl: 'https://api.github.com/repos/mikeal/request',\n\theaders: {\n\t\t'User-Agent': 'request'\n\t}\n};\n\nfunction callback(error, response, body) {\n\tif (!error && response.statusCode == 200) {\n\t\tvar info = JSON.parse(body);\n\t\tconsole.log(info.stargazers_count + \" Stars\");\n\t\tconsole.log(info.forks_count + \" Forks\");\n\t}\n}\n\nrequest(options, callback);\n```\n\n### request(options, callback)\n\nThe first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional.\n\n* `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()`\n* `qs` - object containing querystring values to be appended to the `uri`\n* `method` - http method (default: `\"GET\"`)\n* `headers` - http headers (default: `{}`)\n* `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`.\n* `form` - when passed an object, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header. When passed no options, a `FormData` instance is returned (and is piped to request).\n* `auth` - A hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). See documentation above.\n* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON.\n* `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below.\n* `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`)\n* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`)\n* `maxRedirects` - the maximum number of redirects to follow (default: `10`)\n* `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`.\n* `pool` - A hash object containing the agents for these requests. If omitted, the request will use the global pool (which is set to node's default `maxSockets`)\n* `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool.\n* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request\n* `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`)\n* `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above.\n* `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).\n* `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option.\n* `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section)\n* `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services)\n* `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.\n* `localAddress` - Local interface to bind for network connections.\n\n\nThe callback argument gets 3 arguments: \n\n1. An `error` when applicable (usually from [`http.ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) object)\n2. An [`http.IncomingMessage`](http://nodejs.org/api/http.html#http_http_incomingmessage) object\n3. The third is the `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied)\n\n## Convenience methods\n\nThere are also shorthand methods for different HTTP METHODs and some other conveniences.\n\n### request.defaults(options)\n\nThis method returns a wrapper around the normal request API that defaults to whatever options you pass in to it.\n\n### request.put\n\nSame as `request()`, but defaults to `method: \"PUT\"`.\n\n```javascript\nrequest.put(url)\n```\n\n### request.patch\n\nSame as `request()`, but defaults to `method: \"PATCH\"`.\n\n```javascript\nrequest.patch(url)\n```\n\n### request.post\n\nSame as `request()`, but defaults to `method: \"POST\"`.\n\n```javascript\nrequest.post(url)\n```\n\n### request.head\n\nSame as request() but defaults to `method: \"HEAD\"`.\n\n```javascript\nrequest.head(url)\n```\n\n### request.del\n\nSame as `request()`, but defaults to `method: \"DELETE\"`.\n\n```javascript\nrequest.del(url)\n```\n\n### request.get\n\nSame as `request()` (for uniformity).\n\n```javascript\nrequest.get(url)\n```\n### request.cookie\n\nFunction that creates a new cookie.\n\n```javascript\nrequest.cookie('cookie_string_here')\n```\n### request.jar\n\nFunction that creates a new cookie jar.\n\n```javascript\nrequest.jar()\n```\n\n\n## Examples:\n\n```javascript\n var request = require('request')\n , rand = Math.floor(Math.random()*100000000).toString()\n ;\n request(\n { method: 'PUT'\n , uri: 'http://mikeal.iriscouch.com/testjs/' + rand\n , multipart:\n [ { 'content-type': 'application/json'\n , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})\n }\n , { body: 'I am an attachment' }\n ]\n }\n , function (error, response, body) {\n if(response.statusCode == 201){\n console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand)\n } else {\n console.log('error: '+ response.statusCode)\n console.log(body)\n }\n }\n )\n```\n\nCookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`).\n\n```javascript\nvar request = request.defaults({jar: true})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\n\nTo use a custom cookie jar (instead `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`)\n\n```javascript\nvar j = request.jar()\nvar request = request.defaults({jar:j})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\nOR\n\nNote that `setCookie` requires at least three parameters, and the last is required to be a callback.\n\n```javascript\nvar j = request.jar()\nvar cookie = request.cookie('your_cookie_here')\nj.setCookie(cookie, uri, function (err, cookie){})\nrequest({url: 'http://www.google.com', jar: j}, function () {\n request('http://images.google.com')\n})\n```\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/mikeal/request", - "_id": "request@2.31.0", - "dist": { - "shasum": "4c8ac967c9a4b9410cb4ba1a61fdb644267eeeff" - }, - "_from": "request@~2.31.0", - "_resolved": "https://registry.npmjs.org/request/-/request-2.31.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/request.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/request.js deleted file mode 100644 index 3c03c47d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/request.js +++ /dev/null @@ -1,1260 +0,0 @@ -var optional = require('./lib/optional') - , http = require('http') - , https = optional('https') - , tls = optional('tls') - , url = require('url') - , util = require('util') - , stream = require('stream') - , qs = require('qs') - , querystring = require('querystring') - , crypto = require('crypto') - - , oauth = optional('oauth-sign') - , hawk = optional('hawk') - , aws = optional('aws-sign') - , httpSignature = optional('http-signature') - , uuid = require('node-uuid') - , mime = require('mime') - , tunnel = optional('tunnel-agent') - , _safeStringify = require('json-stringify-safe') - - , ForeverAgent = require('forever-agent') - , FormData = optional('form-data') - - , Cookie = optional('tough-cookie') - , CookieJar = Cookie && Cookie.CookieJar - , cookieJar = CookieJar && new CookieJar - - , copy = require('./lib/copy') - , debug = require('./lib/debug') - , getSafe = require('./lib/getSafe') - ; - -function safeStringify (obj) { - var ret - try { ret = JSON.stringify(obj) } - catch (e) { ret = _safeStringify(obj) } - return ret -} - -var globalPool = {} -var isUrl = /^https?:/i - - -// Hacky fix for pre-0.4.4 https -if (https && !https.Agent) { - https.Agent = function (options) { - http.Agent.call(this, options) - } - util.inherits(https.Agent, http.Agent) - https.Agent.prototype._getConnection = function (host, port, cb) { - var s = tls.connect(port, host, this.options, function () { - // do other checks here? - if (cb) cb() - }) - return s - } -} - -function isReadStream (rs) { - if (rs.readable && rs.path && rs.mode) { - return true - } -} - -function toBase64 (str) { - return (new Buffer(str || "", "ascii")).toString("base64") -} - -function md5 (str) { - return crypto.createHash('md5').update(str).digest('hex') -} - -function Request (options) { - stream.Stream.call(this) - this.readable = true - this.writable = true - - if (typeof options === 'string') { - options = {uri:options} - } - - var reserved = Object.keys(Request.prototype) - for (var i in options) { - if (reserved.indexOf(i) === -1) { - this[i] = options[i] - } else { - if (typeof options[i] === 'function') { - delete options[i] - } - } - } - - if (options.method) { - this.explicitMethod = true - } - - this.canTunnel = options.tunnel !== false && tunnel; - - this.init(options) -} -util.inherits(Request, stream.Stream) -Request.prototype.init = function (options) { - // init() contains all the code to setup the request object. - // the actual outgoing request is not started until start() is called - // this function is called from both the constructor and on redirect. - var self = this - if (!options) options = {} - - if (!self.method) self.method = options.method || 'GET' - self.localAddress = options.localAddress - - debug(options) - if (!self.pool && self.pool !== false) self.pool = globalPool - self.dests = self.dests || [] - self.__isRequestRequest = true - - // Protect against double callback - if (!self._callback && self.callback) { - self._callback = self.callback - self.callback = function () { - if (self._callbackCalled) return // Print a warning maybe? - self._callbackCalled = true - self._callback.apply(self, arguments) - } - self.on('error', self.callback.bind()) - self.on('complete', self.callback.bind(self, null)) - } - - if (self.url && !self.uri) { - // People use this property instead all the time so why not just support it. - self.uri = self.url - delete self.url - } - - if (!self.uri) { - // this will throw if unhandled but is handleable when in a redirect - return self.emit('error', new Error("options.uri is a required argument")) - } else { - if (typeof self.uri == "string") self.uri = url.parse(self.uri) - } - - if (self.strictSSL === false) { - self.rejectUnauthorized = false - } - - if (self.proxy) { - if (typeof self.proxy == 'string') self.proxy = url.parse(self.proxy) - - // do the HTTP CONNECT dance using koichik/node-tunnel - if (http.globalAgent && self.uri.protocol === "https:" && self.canTunnel) { - var tunnelFn = self.proxy.protocol === "http:" - ? tunnel.httpsOverHttp : tunnel.httpsOverHttps - - var tunnelOptions = { proxy: { host: self.proxy.hostname - , port: +self.proxy.port - , proxyAuth: self.proxy.auth - , headers: { Host: self.uri.hostname + ':' + - (self.uri.port || self.uri.protocol === 'https:' ? 443 : 80) }} - , rejectUnauthorized: self.rejectUnauthorized - , ca: this.ca } - - self.agent = tunnelFn(tunnelOptions) - self.tunnel = true - } - } - - if (!self.uri.pathname) {self.uri.pathname = '/'} - - if (!self.uri.host) { - // Invalid URI: it may generate lot of bad errors, like "TypeError: Cannot call method 'indexOf' of undefined" in CookieJar - // Detect and reject it as soon as possible - var faultyUri = url.format(self.uri) - var message = 'Invalid URI "' + faultyUri + '"' - if (Object.keys(options).length === 0) { - // No option ? This can be the sign of a redirect - // As this is a case where the user cannot do anything (they didn't call request directly with this URL) - // they should be warned that it can be caused by a redirection (can save some hair) - message += '. This can be caused by a crappy redirection.' - } - self.emit('error', new Error(message)) - return // This error was fatal - } - - self._redirectsFollowed = self._redirectsFollowed || 0 - self.maxRedirects = (self.maxRedirects !== undefined) ? self.maxRedirects : 10 - self.followRedirect = (self.followRedirect !== undefined) ? self.followRedirect : true - self.followAllRedirects = (self.followAllRedirects !== undefined) ? self.followAllRedirects : false - if (self.followRedirect || self.followAllRedirects) - self.redirects = self.redirects || [] - - self.headers = self.headers ? copy(self.headers) : {} - - self.setHost = false - if (!self.hasHeader('host')) { - self.setHeader('host', self.uri.hostname) - if (self.uri.port) { - if ( !(self.uri.port === 80 && self.uri.protocol === 'http:') && - !(self.uri.port === 443 && self.uri.protocol === 'https:') ) - self.setHeader('host', self.getHeader('host') + (':'+self.uri.port) ) - } - self.setHost = true - } - - self.jar(self._jar || options.jar) - - if (!self.uri.port) { - if (self.uri.protocol == 'http:') {self.uri.port = 80} - else if (self.uri.protocol == 'https:') {self.uri.port = 443} - } - - if (self.proxy && !self.tunnel) { - self.port = self.proxy.port - self.host = self.proxy.hostname - } else { - self.port = self.uri.port - self.host = self.uri.hostname - } - - self.clientErrorHandler = function (error) { - if (self._aborted) return - if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET' - && self.agent.addRequestNoreuse) { - self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) } - self.start() - self.req.end() - return - } - if (self.timeout && self.timeoutTimer) { - clearTimeout(self.timeoutTimer) - self.timeoutTimer = null - } - self.emit('error', error) - } - - self._parserErrorHandler = function (error) { - if (this.res) { - if (this.res.request) { - this.res.request.emit('error', error) - } else { - this.res.emit('error', error) - } - } else { - this._httpMessage.emit('error', error) - } - } - - if (options.form) { - self.form(options.form) - } - - if (options.qs) self.qs(options.qs) - - if (self.uri.path) { - self.path = self.uri.path - } else { - self.path = self.uri.pathname + (self.uri.search || "") - } - - if (self.path.length === 0) self.path = '/' - - - // Auth must happen last in case signing is dependent on other headers - if (options.oauth) { - self.oauth(options.oauth) - } - - if (options.aws) { - self.aws(options.aws) - } - - if (options.hawk) { - self.hawk(options.hawk) - } - - if (options.httpSignature) { - self.httpSignature(options.httpSignature) - } - - if (options.auth) { - if (Object.prototype.hasOwnProperty.call(options.auth, 'username')) options.auth.user = options.auth.username - if (Object.prototype.hasOwnProperty.call(options.auth, 'password')) options.auth.pass = options.auth.password - - self.auth( - options.auth.user, - options.auth.pass, - options.auth.sendImmediately - ) - } - - if (self.uri.auth && !self.hasHeader('authorization')) { - var authPieces = self.uri.auth.split(':').map(function(item){ return querystring.unescape(item) }) - self.auth(authPieces[0], authPieces.slice(1).join(':'), true) - } - if (self.proxy && self.proxy.auth && !self.hasHeader('proxy-authorization') && !self.tunnel) { - self.setHeader('proxy-authorization', "Basic " + toBase64(self.proxy.auth.split(':').map(function(item){ return querystring.unescape(item)}).join(':'))) - } - - - if (self.proxy && !self.tunnel) self.path = (self.uri.protocol + '//' + self.uri.host + self.path) - - if (options.json) { - self.json(options.json) - } else if (options.multipart) { - self.boundary = uuid() - self.multipart(options.multipart) - } - - if (self.body) { - var length = 0 - if (!Buffer.isBuffer(self.body)) { - if (Array.isArray(self.body)) { - for (var i = 0; i < self.body.length; i++) { - length += self.body[i].length - } - } else { - self.body = new Buffer(self.body) - length = self.body.length - } - } else { - length = self.body.length - } - if (length) { - if (!self.hasHeader('content-length')) self.setHeader('content-length', length) - } else { - throw new Error('Argument error, options.body.') - } - } - - var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol - , defaultModules = {'http:':http, 'https:':https} - , httpModules = self.httpModules || {} - ; - self.httpModule = httpModules[protocol] || defaultModules[protocol] - - if (!self.httpModule) return this.emit('error', new Error("Invalid protocol")) - - if (options.ca) self.ca = options.ca - - if (!self.agent) { - if (options.agentOptions) self.agentOptions = options.agentOptions - - if (options.agentClass) { - self.agentClass = options.agentClass - } else if (options.forever) { - self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL - } else { - self.agentClass = self.httpModule.Agent - } - } - - if (self.pool === false) { - self.agent = false - } else { - self.agent = self.agent || self.getAgent() - if (self.maxSockets) { - // Don't use our pooling if node has the refactored client - self.agent.maxSockets = self.maxSockets - } - if (self.pool.maxSockets) { - // Don't use our pooling if node has the refactored client - self.agent.maxSockets = self.pool.maxSockets - } - } - - self.on('pipe', function (src) { - if (self.ntick && self._started) throw new Error("You cannot pipe to this stream after the outbound request has started.") - self.src = src - if (isReadStream(src)) { - if (!self.hasHeader('content-type')) self.setHeader('content-type', mime.lookup(src.path)) - } else { - if (src.headers) { - for (var i in src.headers) { - if (!self.hasHeader(i)) { - self.setHeader(i, src.headers[i]) - } - } - } - if (self._json && !self.hasHeader('content-type')) - self.setHeader('content-type', 'application/json') - if (src.method && !self.explicitMethod) { - self.method = src.method - } - } - - // self.on('pipe', function () { - // console.error("You have already piped to this stream. Pipeing twice is likely to break the request.") - // }) - }) - - process.nextTick(function () { - if (self._aborted) return - - if (self._form) { - self.setHeaders(self._form.getHeaders()) - self._form.pipe(self) - } - if (self.body) { - if (Array.isArray(self.body)) { - self.body.forEach(function (part) { - self.write(part) - }) - } else { - self.write(self.body) - } - self.end() - } else if (self.requestBodyStream) { - console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe.") - self.requestBodyStream.pipe(self) - } else if (!self.src) { - if (self.method !== 'GET' && typeof self.method !== 'undefined') { - self.setHeader('content-length', 0) - } - self.end() - } - self.ntick = true - }) -} - -// Must call this when following a redirect from https to http or vice versa -// Attempts to keep everything as identical as possible, but update the -// httpModule, Tunneling agent, and/or Forever Agent in use. -Request.prototype._updateProtocol = function () { - var self = this - var protocol = self.uri.protocol - - if (protocol === 'https:') { - // previously was doing http, now doing https - // if it's https, then we might need to tunnel now. - if (self.proxy && self.canTunnel) { - self.tunnel = true - var tunnelFn = self.proxy.protocol === 'http:' - ? tunnel.httpsOverHttp : tunnel.httpsOverHttps - var tunnelOptions = { proxy: { host: self.proxy.hostname - , port: +self.proxy.port - , proxyAuth: self.proxy.auth } - , rejectUnauthorized: self.rejectUnauthorized - , ca: self.ca } - self.agent = tunnelFn(tunnelOptions) - return - } - - self.httpModule = https - switch (self.agentClass) { - case ForeverAgent: - self.agentClass = ForeverAgent.SSL - break - case http.Agent: - self.agentClass = https.Agent - break - default: - // nothing we can do. Just hope for the best. - return - } - - // if there's an agent, we need to get a new one. - if (self.agent) self.agent = self.getAgent() - - } else { - // previously was doing https, now doing http - // stop any tunneling. - if (self.tunnel) self.tunnel = false - self.httpModule = http - switch (self.agentClass) { - case ForeverAgent.SSL: - self.agentClass = ForeverAgent - break - case https.Agent: - self.agentClass = http.Agent - break - default: - // nothing we can do. just hope for the best - return - } - - // if there's an agent, then get a new one. - if (self.agent) { - self.agent = null - self.agent = self.getAgent() - } - } -} - -Request.prototype.getAgent = function () { - var Agent = this.agentClass - var options = {} - if (this.agentOptions) { - for (var i in this.agentOptions) { - options[i] = this.agentOptions[i] - } - } - if (this.ca) options.ca = this.ca - if (this.ciphers) options.ciphers = this.ciphers - if (this.secureProtocol) options.secureProtocol = this.secureProtocol - if (typeof this.rejectUnauthorized !== 'undefined') options.rejectUnauthorized = this.rejectUnauthorized - - if (this.cert && this.key) { - options.key = this.key - options.cert = this.cert - } - - var poolKey = '' - - // different types of agents are in different pools - if (Agent !== this.httpModule.Agent) { - poolKey += Agent.name - } - - if (!this.httpModule.globalAgent) { - // node 0.4.x - options.host = this.host - options.port = this.port - if (poolKey) poolKey += ':' - poolKey += this.host + ':' + this.port - } - - // ca option is only relevant if proxy or destination are https - var proxy = this.proxy - if (typeof proxy === 'string') proxy = url.parse(proxy) - var isHttps = (proxy && proxy.protocol === 'https:') || this.uri.protocol === 'https:' - if (isHttps) { - if (options.ca) { - if (poolKey) poolKey += ':' - poolKey += options.ca - } - - if (typeof options.rejectUnauthorized !== 'undefined') { - if (poolKey) poolKey += ':' - poolKey += options.rejectUnauthorized - } - - if (options.cert) - poolKey += options.cert.toString('ascii') + options.key.toString('ascii') - - if (options.ciphers) { - if (poolKey) poolKey += ':' - poolKey += options.ciphers - } - - if (options.secureProtocol) { - if (poolKey) poolKey += ':' - poolKey += options.secureProtocol - } - } - - if (this.pool === globalPool && !poolKey && Object.keys(options).length === 0 && this.httpModule.globalAgent) { - // not doing anything special. Use the globalAgent - return this.httpModule.globalAgent - } - - // we're using a stored agent. Make sure it's protocol-specific - poolKey = this.uri.protocol + poolKey - - // already generated an agent for this setting - if (this.pool[poolKey]) return this.pool[poolKey] - - return this.pool[poolKey] = new Agent(options) -} - -Request.prototype.start = function () { - // start() is called once we are ready to send the outgoing HTTP request. - // this is usually called on the first write(), end() or on nextTick() - var self = this - - if (self._aborted) return - - self._started = true - self.method = self.method || 'GET' - self.href = self.uri.href - - if (self.src && self.src.stat && self.src.stat.size && !self.hasHeader('content-length')) { - self.setHeader('content-length', self.src.stat.size) - } - if (self._aws) { - self.aws(self._aws, true) - } - - // We have a method named auth, which is completely different from the http.request - // auth option. If we don't remove it, we're gonna have a bad time. - var reqOptions = copy(self) - delete reqOptions.auth - - debug('make request', self.uri.href) - self.req = self.httpModule.request(reqOptions, self.onResponse.bind(self)) - - if (self.timeout && !self.timeoutTimer) { - self.timeoutTimer = setTimeout(function () { - self.req.abort() - var e = new Error("ETIMEDOUT") - e.code = "ETIMEDOUT" - self.emit("error", e) - }, self.timeout) - - // Set additional timeout on socket - in case if remote - // server freeze after sending headers - if (self.req.setTimeout) { // only works on node 0.6+ - self.req.setTimeout(self.timeout, function () { - if (self.req) { - self.req.abort() - var e = new Error("ESOCKETTIMEDOUT") - e.code = "ESOCKETTIMEDOUT" - self.emit("error", e) - } - }) - } - } - - self.req.on('error', self.clientErrorHandler) - self.req.on('drain', function() { - self.emit('drain') - }) - self.on('end', function() { - if ( self.req.connection ) self.req.connection.removeListener('error', self._parserErrorHandler) - }) - self.emit('request', self.req) -} -Request.prototype.onResponse = function (response) { - var self = this - debug('onResponse', self.uri.href, response.statusCode, response.headers) - response.on('end', function() { - debug('response end', self.uri.href, response.statusCode, response.headers) - }); - - if (response.connection.listeners('error').indexOf(self._parserErrorHandler) === -1) { - response.connection.once('error', self._parserErrorHandler) - } - if (self._aborted) { - debug('aborted', self.uri.href) - response.resume() - return - } - if (self._paused) response.pause() - else response.resume() - - self.response = response - response.request = self - response.toJSON = toJSON - - // XXX This is different on 0.10, because SSL is strict by default - if (self.httpModule === https && - self.strictSSL && - !response.client.authorized) { - debug('strict ssl error', self.uri.href) - var sslErr = response.client.authorizationError - self.emit('error', new Error('SSL Error: '+ sslErr)) - return - } - - if (self.setHost && self.hasHeader('host')) delete self.headers[self.hasHeader('host')] - if (self.timeout && self.timeoutTimer) { - clearTimeout(self.timeoutTimer) - self.timeoutTimer = null - } - - var addCookie = function (cookie) { - if (self._jar){ - var targetCookieJar = self._jar.setCookie?self._jar:cookieJar; - - //set the cookie if it's domain in the href's domain. - targetCookieJar.setCookie(cookie, self.uri.href, function(err){ - if (err){ - console.warn('set cookie failed,'+ err) - } - }) - } - - } - - if (hasHeader('set-cookie', response.headers) && (!self._disableCookies)) { - var headerName = hasHeader('set-cookie', response.headers) - if (Array.isArray(response.headers[headerName])) response.headers[headerName].forEach(addCookie) - else addCookie(response.headers[headerName]) - } - - var redirectTo = null - if (response.statusCode >= 300 && response.statusCode < 400 && hasHeader('location', response.headers)) { - var location = response.headers[hasHeader('location', response.headers)] - debug('redirect', location) - - if (self.followAllRedirects) { - redirectTo = location - } else if (self.followRedirect) { - switch (self.method) { - case 'PATCH': - case 'PUT': - case 'POST': - case 'DELETE': - // Do not follow redirects - break - default: - redirectTo = location - break - } - } - } else if (response.statusCode == 401 && self._hasAuth && !self._sentAuth) { - var authHeader = response.headers[hasHeader('www-authenticate', response.headers)] - var authVerb = authHeader && authHeader.split(' ')[0] - debug('reauth', authVerb) - - switch (authVerb) { - case 'Basic': - self.auth(self._user, self._pass, true) - redirectTo = self.uri - break - - case 'Digest': - // TODO: More complete implementation of RFC 2617. - // - check challenge.algorithm - // - support algorithm="MD5-sess" - // - handle challenge.domain - // - support qop="auth-int" only - // - handle Authentication-Info (not necessarily?) - // - check challenge.stale (not necessarily?) - // - increase nc (not necessarily?) - // For reference: - // http://tools.ietf.org/html/rfc2617#section-3 - // https://github.com/bagder/curl/blob/master/lib/http_digest.c - - var challenge = {} - var re = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi - for (;;) { - var match = re.exec(authHeader) - if (!match) break - challenge[match[1]] = match[2] || match[3]; - } - - var ha1 = md5(self._user + ':' + challenge.realm + ':' + self._pass) - var ha2 = md5(self.method + ':' + self.uri.path) - var qop = /(^|,)\s*auth\s*($|,)/.test(challenge.qop) && 'auth' - var nc = qop && '00000001' - var cnonce = qop && uuid().replace(/-/g, '') - var digestResponse = qop ? md5(ha1 + ':' + challenge.nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + ha2) : md5(ha1 + ':' + challenge.nonce + ':' + ha2) - var authValues = { - username: self._user, - realm: challenge.realm, - nonce: challenge.nonce, - uri: self.uri.path, - qop: qop, - response: digestResponse, - nc: nc, - cnonce: cnonce, - algorithm: challenge.algorithm, - opaque: challenge.opaque - } - - authHeader = [] - for (var k in authValues) { - if (!authValues[k]) { - //ignore - } else if (k === 'qop' || k === 'nc' || k === 'algorithm') { - authHeader.push(k + '=' + authValues[k]) - } else { - authHeader.push(k + '="' + authValues[k] + '"') - } - } - authHeader = 'Digest ' + authHeader.join(', ') - self.setHeader('authorization', authHeader) - self._sentAuth = true - - redirectTo = self.uri - break - } - } - - if (redirectTo) { - debug('redirect to', redirectTo) - - // ignore any potential response body. it cannot possibly be useful - // to us at this point. - if (self._paused) response.resume() - - if (self._redirectsFollowed >= self.maxRedirects) { - self.emit('error', new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+self.uri.href)) - return - } - self._redirectsFollowed += 1 - - if (!isUrl.test(redirectTo)) { - redirectTo = url.resolve(self.uri.href, redirectTo) - } - - var uriPrev = self.uri - self.uri = url.parse(redirectTo) - - // handle the case where we change protocol from https to http or vice versa - if (self.uri.protocol !== uriPrev.protocol) { - self._updateProtocol() - } - - self.redirects.push( - { statusCode : response.statusCode - , redirectUri: redirectTo - } - ) - if (self.followAllRedirects && response.statusCode != 401) self.method = 'GET' - // self.method = 'GET' // Force all redirects to use GET || commented out fixes #215 - delete self.src - delete self.req - delete self.agent - delete self._started - if (response.statusCode != 401) { - // Remove parameters from the previous response, unless this is the second request - // for a server that requires digest authentication. - delete self.body - delete self._form - if (self.headers) { - if (self.hasHeader('host')) delete self.headers[self.hasHeader('host')] - if (self.hasHeader('content-type')) delete self.headers[self.hasHeader('content-type')] - if (self.hasHeader('content-length')) delete self.headers[self.hasHeader('content-length')] - } - } - - self.emit('redirect'); - - self.init() - return // Ignore the rest of the response - } else { - self._redirectsFollowed = self._redirectsFollowed || 0 - // Be a good stream and emit end when the response is finished. - // Hack to emit end on close because of a core bug that never fires end - response.on('close', function () { - if (!self._ended) self.response.emit('end') - }) - - if (self.encoding) { - if (self.dests.length !== 0) { - console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.") - } else { - response.setEncoding(self.encoding) - } - } - - self.emit('response', response) - - self.dests.forEach(function (dest) { - self.pipeDest(dest) - }) - - response.on("data", function (chunk) { - self._destdata = true - self.emit("data", chunk) - }) - response.on("end", function (chunk) { - self._ended = true - self.emit("end", chunk) - }) - response.on("close", function () {self.emit("close")}) - - if (self.callback) { - var buffer = [] - var bodyLen = 0 - self.on("data", function (chunk) { - buffer.push(chunk) - bodyLen += chunk.length - }) - self.on("end", function () { - debug('end event', self.uri.href) - if (self._aborted) { - debug('aborted', self.uri.href) - return - } - - if (buffer.length && Buffer.isBuffer(buffer[0])) { - debug('has body', self.uri.href, bodyLen) - var body = new Buffer(bodyLen) - var i = 0 - buffer.forEach(function (chunk) { - chunk.copy(body, i, 0, chunk.length) - i += chunk.length - }) - if (self.encoding === null) { - response.body = body - } else { - response.body = body.toString(self.encoding) - } - } else if (buffer.length) { - // The UTF8 BOM [0xEF,0xBB,0xBF] is converted to [0xFE,0xFF] in the JS UTC16/UCS2 representation. - // Strip this value out when the encoding is set to 'utf8', as upstream consumers won't expect it and it breaks JSON.parse(). - if (self.encoding === 'utf8' && buffer[0].length > 0 && buffer[0][0] === "\uFEFF") { - buffer[0] = buffer[0].substring(1) - } - response.body = buffer.join('') - } - - if (self._json) { - try { - response.body = JSON.parse(response.body) - } catch (e) {} - } - debug('emitting complete', self.uri.href) - if(response.body == undefined && !self._json) { - response.body = ""; - } - self.emit('complete', response, response.body) - }) - } - //if no callback - else{ - self.on("end", function () { - if (self._aborted) { - debug('aborted', self.uri.href) - return - } - self.emit('complete', response); - }); - } - } - debug('finish init function', self.uri.href) -} - -Request.prototype.abort = function () { - this._aborted = true - - if (this.req) { - this.req.abort() - } - else if (this.response) { - this.response.abort() - } - - this.emit("abort") -} - -Request.prototype.pipeDest = function (dest) { - var response = this.response - // Called after the response is received - if (dest.headers && !dest.headersSent) { - if (hasHeader('content-type', response.headers)) { - var ctname = hasHeader('content-type', response.headers) - if (dest.setHeader) dest.setHeader(ctname, response.headers[ctname]) - else dest.headers[ctname] = response.headers[ctname] - } - - if (hasHeader('content-length', response.headers)) { - var clname = hasHeader('content-length', response.headers) - if (dest.setHeader) dest.setHeader(clname, response.headers[clname]) - else dest.headers[clname] = response.headers[clname] - } - } - if (dest.setHeader && !dest.headersSent) { - for (var i in response.headers) { - dest.setHeader(i, response.headers[i]) - } - dest.statusCode = response.statusCode - } - if (this.pipefilter) this.pipefilter(response, dest) -} - -// Composable API -Request.prototype.setHeader = function (name, value, clobber) { - if (clobber === undefined) clobber = true - if (clobber || !this.hasHeader(name)) this.headers[name] = value - else this.headers[this.hasHeader(name)] += ',' + value - return this -} -Request.prototype.setHeaders = function (headers) { - for (var i in headers) {this.setHeader(i, headers[i])} - return this -} -Request.prototype.hasHeader = function (header, headers) { - var headers = Object.keys(headers || this.headers) - , lheaders = headers.map(function (h) {return h.toLowerCase()}) - ; - header = header.toLowerCase() - for (var i=0;i<lheaders.length;i++) { - if (lheaders[i] === header) return headers[i] - } - return false -} - -var hasHeader = Request.prototype.hasHeader - -Request.prototype.qs = function (q, clobber) { - var base - if (!clobber && this.uri.query) base = qs.parse(this.uri.query) - else base = {} - - for (var i in q) { - base[i] = q[i] - } - - if (qs.stringify(base) === ''){ - return this - } - - this.uri = url.parse(this.uri.href.split('?')[0] + '?' + qs.stringify(base)) - this.url = this.uri - this.path = this.uri.path - - return this -} -Request.prototype.form = function (form) { - if (form) { - this.setHeader('content-type', 'application/x-www-form-urlencoded; charset=utf-8') - this.body = qs.stringify(form).toString('utf8') - return this - } - // create form-data object - this._form = new FormData() - return this._form -} -Request.prototype.multipart = function (multipart) { - var self = this - self.body = [] - - if (!self.hasHeader('content-type')) { - self.setHeader('content-type', 'multipart/related; boundary=' + self.boundary) - } else { - var headerName = self.hasHeader('content-type'); - self.setHeader(headerName, self.headers[headerName].split(';')[0] + '; boundary=' + self.boundary) - } - - if (!multipart.forEach) throw new Error('Argument error, options.multipart.') - - if (self.preambleCRLF) { - self.body.push(new Buffer('\r\n')) - } - - multipart.forEach(function (part) { - var body = part.body - if(body == null) throw Error('Body attribute missing in multipart.') - delete part.body - var preamble = '--' + self.boundary + '\r\n' - Object.keys(part).forEach(function (key) { - preamble += key + ': ' + part[key] + '\r\n' - }) - preamble += '\r\n' - self.body.push(new Buffer(preamble)) - self.body.push(new Buffer(body)) - self.body.push(new Buffer('\r\n')) - }) - self.body.push(new Buffer('--' + self.boundary + '--')) - return self -} -Request.prototype.json = function (val) { - var self = this - - if (!self.hasHeader('accept')) self.setHeader('accept', 'application/json') - - this._json = true - if (typeof val === 'boolean') { - if (typeof this.body === 'object') { - this.body = safeStringify(this.body) - self.setHeader('content-type', 'application/json') - } - } else { - this.body = safeStringify(val) - self.setHeader('content-type', 'application/json') - } - return this -} -Request.prototype.getHeader = function (name, headers) { - var result, re, match - if (!headers) headers = this.headers - Object.keys(headers).forEach(function (key) { - re = new RegExp(name, 'i') - match = key.match(re) - if (match) result = headers[key] - }) - return result -} -var getHeader = Request.prototype.getHeader - -Request.prototype.auth = function (user, pass, sendImmediately) { - if (typeof user !== 'string' || (pass !== undefined && typeof pass !== 'string')) { - throw new Error('auth() received invalid user or password') - } - this._user = user - this._pass = pass - this._hasAuth = true - var header = typeof pass !== 'undefined' ? user + ':' + pass : user - if (sendImmediately || typeof sendImmediately == 'undefined') { - this.setHeader('authorization', 'Basic ' + toBase64(header)) - this._sentAuth = true - } - return this -} -Request.prototype.aws = function (opts, now) { - if (!now) { - this._aws = opts - return this - } - var date = new Date() - this.setHeader('date', date.toUTCString()) - var auth = - { key: opts.key - , secret: opts.secret - , verb: this.method.toUpperCase() - , date: date - , contentType: this.getHeader('content-type') || '' - , md5: this.getHeader('content-md5') || '' - , amazonHeaders: aws.canonicalizeHeaders(this.headers) - } - if (opts.bucket && this.path) { - auth.resource = '/' + opts.bucket + this.path - } else if (opts.bucket && !this.path) { - auth.resource = '/' + opts.bucket - } else if (!opts.bucket && this.path) { - auth.resource = this.path - } else if (!opts.bucket && !this.path) { - auth.resource = '/' - } - auth.resource = aws.canonicalizeResource(auth.resource) - this.setHeader('authorization', aws.authorization(auth)) - - return this -} -Request.prototype.httpSignature = function (opts) { - var req = this - httpSignature.signRequest({ - getHeader: function(header) { - return getHeader(header, req.headers) - }, - setHeader: function(header, value) { - req.setHeader(header, value) - }, - method: this.method, - path: this.path - }, opts) - debug('httpSignature authorization', this.getHeader('authorization')) - - return this -} - -Request.prototype.hawk = function (opts) { - this.setHeader('Authorization', hawk.client.header(this.uri, this.method, opts).field) -} - -Request.prototype.oauth = function (_oauth) { - var form - if (this.hasHeader('content-type') && - this.getHeader('content-type').slice(0, 'application/x-www-form-urlencoded'.length) === - 'application/x-www-form-urlencoded' - ) { - form = qs.parse(this.body) - } - if (this.uri.query) { - form = qs.parse(this.uri.query) - } - if (!form) form = {} - var oa = {} - for (var i in form) oa[i] = form[i] - for (var i in _oauth) oa['oauth_'+i] = _oauth[i] - if (!oa.oauth_version) oa.oauth_version = '1.0' - if (!oa.oauth_timestamp) oa.oauth_timestamp = Math.floor( Date.now() / 1000 ).toString() - if (!oa.oauth_nonce) oa.oauth_nonce = uuid().replace(/-/g, '') - - oa.oauth_signature_method = 'HMAC-SHA1' - - var consumer_secret = oa.oauth_consumer_secret - delete oa.oauth_consumer_secret - var token_secret = oa.oauth_token_secret - delete oa.oauth_token_secret - var timestamp = oa.oauth_timestamp - - var baseurl = this.uri.protocol + '//' + this.uri.host + this.uri.pathname - var signature = oauth.hmacsign(this.method, baseurl, oa, consumer_secret, token_secret) - - // oa.oauth_signature = signature - for (var i in form) { - if ( i.slice(0, 'oauth_') in _oauth) { - // skip - } else { - delete oa['oauth_'+i] - if (i !== 'x_auth_mode') delete oa[i] - } - } - oa.oauth_timestamp = timestamp - var authHeader = 'OAuth '+Object.keys(oa).sort().map(function (i) {return i+'="'+oauth.rfc3986(oa[i])+'"'}).join(',') - authHeader += ',oauth_signature="' + oauth.rfc3986(signature) + '"' - this.setHeader('Authorization', authHeader) - return this -} -Request.prototype.jar = function (jar) { - var cookies - - if (this._redirectsFollowed === 0) { - this.originalCookieHeader = this.getHeader('cookie') - } - - if (!jar) { - // disable cookies - cookies = false - this._disableCookies = true - } else { - var targetCookieJar = (jar && jar.getCookieString)?jar:cookieJar; - var urihref = this.uri.href - - //fetch cookie in the Specified host - targetCookieJar.getCookieString(urihref, function(err, hrefCookie){ - if (err){ - console.warn('get cookieString failed,' +err) - } else { - cookies = hrefCookie - } - }) - - } - - //if need cookie and cookie is not empty - if (cookies && cookies.length) { - if (this.originalCookieHeader) { - // Don't overwrite existing Cookie header - this.setHeader('cookie', this.originalCookieHeader + '; ' + cookies) - } else { - this.setHeader('cookie', cookies) - } - } - this._jar = jar - return this -} - - -// Stream API -Request.prototype.pipe = function (dest, opts) { - if (this.response) { - if (this._destdata) { - throw new Error("You cannot pipe after data has been emitted from the response.") - } else if (this._ended) { - throw new Error("You cannot pipe after the response has been ended.") - } else { - stream.Stream.prototype.pipe.call(this, dest, opts) - this.pipeDest(dest) - return dest - } - } else { - this.dests.push(dest) - stream.Stream.prototype.pipe.call(this, dest, opts) - return dest - } -} -Request.prototype.write = function () { - if (!this._started) this.start() - return this.req.write.apply(this.req, arguments) -} -Request.prototype.end = function (chunk) { - if (chunk) this.write(chunk) - if (!this._started) this.start() - this.req.end() -} -Request.prototype.pause = function () { - if (!this.response) this._paused = true - else this.response.pause.apply(this.response, arguments) -} -Request.prototype.resume = function () { - if (!this.response) this._paused = false - else this.response.resume.apply(this.response, arguments) -} -Request.prototype.destroy = function () { - if (!this._ended) this.end() - else if (this.response) this.response.destroy() -} - -function toJSON () { - return getSafe(this, '__' + (((1+Math.random())*0x10000)|0).toString(16)) -} - -Request.prototype.toJSON = toJSON - - -module.exports = Request diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.jshintrc b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.jshintrc deleted file mode 100644 index c8ef3ca4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.jshintrc +++ /dev/null @@ -1,59 +0,0 @@ -{ - "predef": [ ] - , "bitwise": false - , "camelcase": false - , "curly": false - , "eqeqeq": false - , "forin": false - , "immed": false - , "latedef": false - , "noarg": true - , "noempty": true - , "nonew": true - , "plusplus": false - , "quotmark": true - , "regexp": false - , "undef": true - , "unused": true - , "strict": false - , "trailing": true - , "maxlen": 120 - , "asi": true - , "boss": true - , "debug": true - , "eqnull": true - , "esnext": true - , "evil": true - , "expr": true - , "funcscope": false - , "globalstrict": false - , "iterator": false - , "lastsemic": true - , "laxbreak": true - , "laxcomma": true - , "loopfunc": true - , "multistr": false - , "onecase": false - , "proto": false - , "regexdash": false - , "scripturl": true - , "smarttabs": false - , "shadow": false - , "sub": true - , "supernew": false - , "validthis": true - , "browser": true - , "couch": false - , "devel": false - , "dojo": false - , "mootools": false - , "node": true - , "nonstandard": true - , "prototypejs": false - , "rhino": false - , "worker": true - , "wsh": false - , "nomen": false - , "onevar": false - , "passfail": false -} \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.travis.yml deleted file mode 100644 index 12b1a310..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: node_js -node_js: -- '0.8' -- '0.10' -- '0.11' -branches: - only: - - master -notifications: - email: - - rod@vagg.org -script: npm test -env: - global: - - SAUCE_USER=through2-sauce - - secure: A8KyygIlklZOcTwTGhZHpkOu7Cn4tI1QQasg75CTSjudczGzkuh1pG2RDIkWqGcrWv9o5CjI6fFYYx0JvQu8o5PO+ZAtV1Z0AlnM965vE8kAx0XEC7giAV323bibfnHwyQu74vIhbOfdes7E4/cYerV2kAjK0T375D4DYEpDuvw= - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/LICENSE deleted file mode 100644 index f6a0029d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/LICENSE +++ /dev/null @@ -1,39 +0,0 @@ -Copyright 2013, Rod Vagg (the "Original Author") -All rights reserved. - -MIT +no-false-attribs License - -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. - -Distributions of all or part of the Software intended to be used -by the recipients as they would use the unmodified Software, -containing modifications that substantially alter, remove, or -disable functionality of the Software, outside of the documented -configuration mechanisms provided by the Software, shall be -modified such that the Original Author's bug reporting email -addresses and urls are either replaced with the contact information -of the parties responsible for the changes, or removed entirely. - -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. - - -Except where noted, this license applies to any and all software -programs and associated documentation files created by the -Original Author, when distributed with the Software. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/README.md deleted file mode 100644 index c9388b38..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/README.md +++ /dev/null @@ -1,131 +0,0 @@ -# through2 - -<!-- - -soon ... - -[![Build Status](https://secure.travis-ci.org/rvagg/through2.png)](http://travis-ci.org/rvagg/through2) - -[![Build Status](https://saucelabs.com/browser-matrix/through2-sauce.svg)](https://travis-ci.org/rvagg/through2) - ---> - -[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/) - -<!-- -not happy with these, we need to peg to readable-stream@1.0.x so it'll always report out-of-date - -[![david-dm](https://david-dm.org/rvagg/through2.png)](https://david-dm.org/rvagg/through2/) -[![david-dm](https://david-dm.org/rvagg/through2/dev-status.png)](https://david-dm.org/rvagg/through2#info=devDependencies/) ---> - -**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise** - -Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`. - -```js -fs.createReadStream('ex.txt') - .pipe(through2(function (chunk, enc, callback) { - - for (var i = 0; i < chunk.length; i++) - if (chunk[i] == 97) - chunk[i] = 122 // swap 'a' for 'z' - - this.push(chunk) - - callback() - - })) - .pipe(fs.createWriteStream('out.txt')) -``` - -Or object streams: - -```js -var all = [] - -fs.createReadStream('data.csv') - .pipe(csv2()) - .pipe(through2.obj(function (chunk, enc, callback) { - - var data = { - name : chunk[0] - , address : chunk[3] - , phone : chunk[10] - } - - this.push(data) - - callback() - - })) - .on('data', function (data) { - all.push(data) - }) - .on('end', function () { - doSomethingSpecial(all) - }) -``` - -Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`. - -## API - -<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b> - -Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`). - -### options - -The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`). - -The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call: - -```js -fs.createReadStream('/tmp/important.dat') - .pipe(through2({ objectMode: true, allowHalfOpen: false }, function (chunk, enc, cb) { - - this.push(new Buffer('wut?')) - cb() - - }) - .pipe(fs.createWriteStream('/tmp/wut.txt')) -``` - -### transformFunction - -The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk. - -To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on. - -If you **do not provide a `transformFunction`** then you will get a simple simple pass-through stream. - -### flushFunction - -The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress. - -<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b> - -Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances. - -```js -var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) { - if (record.temp != null && record.unit = "F") { - record.temp = ( ( record.temp - 32 ) * 5 ) / 9 - record.unit = "C" - } - this.push(record) - callback() -}) - -// Create instances of FToC like so: -var converter = new FToC() -// Or: -var converter = FToC() -// Or specify/override options when you instantiate, if you prefer: -var converter = FToC({objectMode: true}) -``` - -## License - -**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/.npmignore deleted file mode 100644 index 38344f87..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/README.md deleted file mode 100644 index be976683..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/README.md +++ /dev/null @@ -1,768 +0,0 @@ -# readable-stream - -A new class of streams for Node.js - -This module provides the new Stream base classes introduced in Node -v0.10, for use in Node v0.8. You can use it to have programs that -have to work with node v0.8, while being forward-compatible for v0.10 -and beyond. When you drop support for v0.8, you can remove this -module, and only use the native streams. - -This is almost exactly the same codebase as appears in Node v0.10. -However: - -1. The exported object is actually the Readable class. Decorating the - native `stream` module would be global pollution. -2. In v0.10, you can safely use `base64` as an argument to - `setEncoding` in Readable streams. However, in v0.8, the - StringDecoder class has no `end()` method, which is problematic for - Base64. So, don't use that, because it'll break and be weird. - -Other than that, the API is the same as `require('stream')` in v0.10, -so the API docs are reproduced below. - ----------- - - Stability: 2 - Unstable - -A stream is an abstract interface implemented by various objects in -Node. For example a request to an HTTP server is a stream, as is -stdout. Streams are readable, writable, or both. All streams are -instances of [EventEmitter][] - -You can load the Stream base classes by doing `require('stream')`. -There are base classes provided for Readable streams, Writable -streams, Duplex streams, and Transform streams. - -## Compatibility - -In earlier versions of Node, the Readable stream interface was -simpler, but also less powerful and less useful. - -* Rather than waiting for you to call the `read()` method, `'data'` - events would start emitting immediately. If you needed to do some - I/O to decide how to handle data, then you had to store the chunks - in some kind of buffer so that they would not be lost. -* The `pause()` method was advisory, rather than guaranteed. This - meant that you still had to be prepared to receive `'data'` events - even when the stream was in a paused state. - -In Node v0.10, the Readable class described below was added. For -backwards compatibility with older Node programs, Readable streams -switch into "old mode" when a `'data'` event handler is added, or when -the `pause()` or `resume()` methods are called. The effect is that, -even if you are not using the new `read()` method and `'readable'` -event, you no longer have to worry about losing `'data'` chunks. - -Most programs will continue to function normally. However, this -introduces an edge case in the following conditions: - -* No `'data'` event handler is added. -* The `pause()` and `resume()` methods are never called. - -For example, consider the following code: - -```javascript -// WARNING! BROKEN! -net.createServer(function(socket) { - - // we add an 'end' method, but never consume the data - socket.on('end', function() { - // It will never get here. - socket.end('I got your message (but didnt read it)\n'); - }); - -}).listen(1337); -``` - -In versions of node prior to v0.10, the incoming message data would be -simply discarded. However, in Node v0.10 and beyond, the socket will -remain paused forever. - -The workaround in this situation is to call the `resume()` method to -trigger "old mode" behavior: - -```javascript -// Workaround -net.createServer(function(socket) { - - socket.on('end', function() { - socket.end('I got your message (but didnt read it)\n'); - }); - - // start the flow of data, discarding it. - socket.resume(); - -}).listen(1337); -``` - -In addition to new Readable streams switching into old-mode, pre-v0.10 -style streams can be wrapped in a Readable class using the `wrap()` -method. - -## Class: stream.Readable - -<!--type=class--> - -A `Readable Stream` has the following methods, members, and events. - -Note that `stream.Readable` is an abstract class designed to be -extended with an underlying implementation of the `_read(size)` -method. (See below.) - -### new stream.Readable([options]) - -* `options` {Object} - * `highWaterMark` {Number} The maximum number of bytes to store in - the internal buffer before ceasing to read from the underlying - resource. Default=16kb - * `encoding` {String} If specified, then buffers will be decoded to - strings using the specified encoding. Default=null - * `objectMode` {Boolean} Whether this stream should behave - as a stream of objects. Meaning that stream.read(n) returns - a single value instead of a Buffer of size n - -In classes that extend the Readable class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### readable.\_read(size) - -* `size` {Number} Number of bytes to read asynchronously - -Note: **This function should NOT be called directly.** It should be -implemented by child classes, and called by the internal Readable -class methods only. - -All Readable stream implementations must provide a `_read` method -to fetch data from the underlying resource. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -When data is available, put it into the read queue by calling -`readable.push(chunk)`. If `push` returns false, then you should stop -reading. When `_read` is called again, you should start pushing more -data. - -The `size` argument is advisory. Implementations where a "read" is a -single call that returns data can use this to know how much data to -fetch. Implementations where that is not relevant, such as TCP or -TLS, may ignore this argument, and simply provide data whenever it -becomes available. There is no need, for example to "wait" until -`size` bytes are available before calling `stream.push(chunk)`. - -### readable.push(chunk) - -* `chunk` {Buffer | null | String} Chunk of data to push into the read queue -* return {Boolean} Whether or not more pushes should be performed - -Note: **This function should be called by Readable implementors, NOT -by consumers of Readable subclasses.** The `_read()` function will not -be called again until at least one `push(chunk)` call is made. If no -data is available, then you MAY call `push('')` (an empty string) to -allow a future `_read` call, without adding any data to the queue. - -The `Readable` class works by putting data into a read queue to be -pulled out later by calling the `read()` method when the `'readable'` -event fires. - -The `push()` method will explicitly insert some data into the read -queue. If it is called with `null` then it will signal the end of the -data. - -In some cases, you may be wrapping a lower-level source which has some -sort of pause/resume mechanism, and a data callback. In those cases, -you could wrap the low-level source object by doing something like -this: - -```javascript -// source is an object with readStop() and readStart() methods, -// and an `ondata` member that gets called when it has data, and -// an `onend` member that gets called when the data is over. - -var stream = new Readable(); - -source.ondata = function(chunk) { - // if push() returns false, then we need to stop reading from source - if (!stream.push(chunk)) - source.readStop(); -}; - -source.onend = function() { - stream.push(null); -}; - -// _read will be called when the stream wants to pull more data in -// the advisory size argument is ignored in this case. -stream._read = function(n) { - source.readStart(); -}; -``` - -### readable.unshift(chunk) - -* `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue -* return {Boolean} Whether or not more pushes should be performed - -This is the corollary of `readable.push(chunk)`. Rather than putting -the data at the *end* of the read queue, it puts it at the *front* of -the read queue. - -This is useful in certain use-cases where a stream is being consumed -by a parser, which needs to "un-consume" some data that it has -optimistically pulled out of the source. - -```javascript -// A parser for a simple data protocol. -// The "header" is a JSON object, followed by 2 \n characters, and -// then a message body. -// -// Note: This can be done more simply as a Transform stream. See below. - -function SimpleProtocol(source, options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(options); - - Readable.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - - // source is a readable stream, such as a socket or file - this._source = source; - - var self = this; - source.on('end', function() { - self.push(null); - }); - - // give it a kick whenever the source is readable - // read(0) will not consume any bytes - source.on('readable', function() { - self.read(0); - }); - - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype = Object.create( - Readable.prototype, { constructor: { value: SimpleProtocol }}); - -SimpleProtocol.prototype._read = function(n) { - if (!this._inBody) { - var chunk = this._source.read(); - - // if the source doesn't have data, we don't have data yet. - if (chunk === null) - return this.push(''); - - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - this.push(''); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // now, because we got some extra data, unshift the rest - // back into the read queue so that our consumer will see it. - var b = chunk.slice(split); - this.unshift(b); - - // and let them know that we are done parsing the header. - this.emit('header', this.header); - } - } else { - // from there on, just provide the data to our consumer. - // careful not to push(null), since that would indicate EOF. - var chunk = this._source.read(); - if (chunk) this.push(chunk); - } -}; - -// Usage: -var parser = new SimpleProtocol(source); -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - -### readable.wrap(stream) - -* `stream` {Stream} An "old style" readable stream - -If you are using an older Node library that emits `'data'` events and -has a `pause()` method that is advisory only, then you can use the -`wrap()` method to create a Readable stream that uses the old stream -as its data source. - -For example: - -```javascript -var OldReader = require('./old-api-module.js').OldReader; -var oreader = new OldReader; -var Readable = require('stream').Readable; -var myReader = new Readable().wrap(oreader); - -myReader.on('readable', function() { - myReader.read(); // etc. -}); -``` - -### Event: 'readable' - -When there is data ready to be consumed, this event will fire. - -When this event emits, call the `read()` method to consume the data. - -### Event: 'end' - -Emitted when the stream has received an EOF (FIN in TCP terminology). -Indicates that no more `'data'` events will happen. If the stream is -also writable, it may be possible to continue writing. - -### Event: 'data' - -The `'data'` event emits either a `Buffer` (by default) or a string if -`setEncoding()` was used. - -Note that adding a `'data'` event listener will switch the Readable -stream into "old mode", where data is emitted as soon as it is -available, rather than waiting for you to call `read()` to consume it. - -### Event: 'error' - -Emitted if there was an error receiving data. - -### Event: 'close' - -Emitted when the underlying resource (for example, the backing file -descriptor) has been closed. Not all streams will emit this. - -### readable.setEncoding(encoding) - -Makes the `'data'` event emit a string instead of a `Buffer`. `encoding` -can be `'utf8'`, `'utf16le'` (`'ucs2'`), `'ascii'`, or `'hex'`. - -The encoding can also be set by specifying an `encoding` field to the -constructor. - -### readable.read([size]) - -* `size` {Number | null} Optional number of bytes to read. -* Return: {Buffer | String | null} - -Note: **This function SHOULD be called by Readable stream users.** - -Call this method to consume data once the `'readable'` event is -emitted. - -The `size` argument will set a minimum number of bytes that you are -interested in. If not set, then the entire content of the internal -buffer is returned. - -If there is no data to consume, or if there are fewer bytes in the -internal buffer than the `size` argument, then `null` is returned, and -a future `'readable'` event will be emitted when more is available. - -Calling `stream.read(0)` will always return `null`, and will trigger a -refresh of the internal buffer, but otherwise be a no-op. - -### readable.pipe(destination, [options]) - -* `destination` {Writable Stream} -* `options` {Object} Optional - * `end` {Boolean} Default=true - -Connects this readable stream to `destination` WriteStream. Incoming -data on this stream gets written to `destination`. Properly manages -back-pressure so that a slow destination will not be overwhelmed by a -fast readable stream. - -This function returns the `destination` stream. - -For example, emulating the Unix `cat` command: - - process.stdin.pipe(process.stdout); - -By default `end()` is called on the destination when the source stream -emits `end`, so that `destination` is no longer writable. Pass `{ end: -false }` as `options` to keep the destination stream open. - -This keeps `writer` open so that "Goodbye" can be written at the -end. - - reader.pipe(writer, { end: false }); - reader.on("end", function() { - writer.end("Goodbye\n"); - }); - -Note that `process.stderr` and `process.stdout` are never closed until -the process exits, regardless of the specified options. - -### readable.unpipe([destination]) - -* `destination` {Writable Stream} Optional - -Undo a previously established `pipe()`. If no destination is -provided, then all previously established pipes are removed. - -### readable.pause() - -Switches the readable stream into "old mode", where data is emitted -using a `'data'` event rather than being buffered for consumption via -the `read()` method. - -Ceases the flow of data. No `'data'` events are emitted while the -stream is in a paused state. - -### readable.resume() - -Switches the readable stream into "old mode", where data is emitted -using a `'data'` event rather than being buffered for consumption via -the `read()` method. - -Resumes the incoming `'data'` events after a `pause()`. - - -## Class: stream.Writable - -<!--type=class--> - -A `Writable` Stream has the following methods, members, and events. - -Note that `stream.Writable` is an abstract class designed to be -extended with an underlying implementation of the -`_write(chunk, encoding, cb)` method. (See below.) - -### new stream.Writable([options]) - -* `options` {Object} - * `highWaterMark` {Number} Buffer level when `write()` starts - returning false. Default=16kb - * `decodeStrings` {Boolean} Whether or not to decode strings into - Buffers before passing them to `_write()`. Default=true - -In classes that extend the Writable class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### writable.\_write(chunk, encoding, callback) - -* `chunk` {Buffer | String} The chunk to be written. Will always - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. Ignore chunk is a buffer. Note that chunk will - **always** be a buffer unless the `decodeStrings` option is - explicitly set to `false`. -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunk. - -All Writable stream implementations must provide a `_write` method to -send data to the underlying resource. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Writable -class methods only. - -Call the callback using the standard `callback(error)` pattern to -signal that the write completed successfully or with an error. - -If the `decodeStrings` flag is set in the constructor options, then -`chunk` may be a string rather than a Buffer, and `encoding` will -indicate the sort of string that it is. This is to support -implementations that have an optimized handling for certain string -data encodings. If you do not explicitly set the `decodeStrings` -option to `false`, then you can safely ignore the `encoding` argument, -and assume that `chunk` will always be a Buffer. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - - -### writable.write(chunk, [encoding], [callback]) - -* `chunk` {Buffer | String} Data to be written -* `encoding` {String} Optional. If `chunk` is a string, then encoding - defaults to `'utf8'` -* `callback` {Function} Optional. Called when this chunk is - successfully written. -* Returns {Boolean} - -Writes `chunk` to the stream. Returns `true` if the data has been -flushed to the underlying resource. Returns `false` to indicate that -the buffer is full, and the data will be sent out in the future. The -`'drain'` event will indicate when the buffer is empty again. - -The specifics of when `write()` will return false, is determined by -the `highWaterMark` option provided to the constructor. - -### writable.end([chunk], [encoding], [callback]) - -* `chunk` {Buffer | String} Optional final data to be written -* `encoding` {String} Optional. If `chunk` is a string, then encoding - defaults to `'utf8'` -* `callback` {Function} Optional. Called when the final chunk is - successfully written. - -Call this method to signal the end of the data being written to the -stream. - -### Event: 'drain' - -Emitted when the stream's write queue empties and it's safe to write -without buffering again. Listen for it when `stream.write()` returns -`false`. - -### Event: 'close' - -Emitted when the underlying resource (for example, the backing file -descriptor) has been closed. Not all streams will emit this. - -### Event: 'finish' - -When `end()` is called and there are no more chunks to write, this -event is emitted. - -### Event: 'pipe' - -* `source` {Readable Stream} - -Emitted when the stream is passed to a readable stream's pipe method. - -### Event 'unpipe' - -* `source` {Readable Stream} - -Emitted when a previously established `pipe()` is removed using the -source Readable stream's `unpipe()` method. - -## Class: stream.Duplex - -<!--type=class--> - -A "duplex" stream is one that is both Readable and Writable, such as a -TCP socket connection. - -Note that `stream.Duplex` is an abstract class designed to be -extended with an underlying implementation of the `_read(size)` -and `_write(chunk, encoding, callback)` methods as you would with a Readable or -Writable stream class. - -Since JavaScript doesn't have multiple prototypal inheritance, this -class prototypally inherits from Readable, and then parasitically from -Writable. It is thus up to the user to implement both the lowlevel -`_read(n)` method as well as the lowlevel `_write(chunk, encoding, cb)` method -on extension duplex classes. - -### new stream.Duplex(options) - -* `options` {Object} Passed to both Writable and Readable - constructors. Also has the following fields: - * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then - the stream will automatically end the readable side when the - writable side ends and vice versa. - -In classes that extend the Duplex class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -## Class: stream.Transform - -A "transform" stream is a duplex stream where the output is causally -connected in some way to the input, such as a zlib stream or a crypto -stream. - -There is no requirement that the output be the same size as the input, -the same number of chunks, or arrive at the same time. For example, a -Hash stream will only ever have a single chunk of output which is -provided when the input is ended. A zlib stream will either produce -much smaller or much larger than its input. - -Rather than implement the `_read()` and `_write()` methods, Transform -classes must implement the `_transform()` method, and may optionally -also implement the `_flush()` method. (See below.) - -### new stream.Transform([options]) - -* `options` {Object} Passed to both Writable and Readable - constructors. - -In classes that extend the Transform class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### transform.\_transform(chunk, encoding, callback) - -* `chunk` {Buffer | String} The chunk to be transformed. Will always - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. (Ignore if `decodeStrings` chunk is a buffer.) -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunk. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Transform -class methods only. - -All Transform stream implementations must provide a `_transform` -method to accept input and produce output. - -`_transform` should do whatever has to be done in this specific -Transform class, to handle the bytes being written, and pass them off -to the readable portion of the interface. Do asynchronous I/O, -process things, and so on. - -Call `transform.push(outputChunk)` 0 or more times to generate output -from this input chunk, depending on how much data you want to output -as a result of this chunk. - -Call the callback function only when the current chunk is completely -consumed. Note that there may or may not be output as a result of any -particular input chunk. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -### transform.\_flush(callback) - -* `callback` {Function} Call this function (optionally with an error - argument) when you are done flushing any remaining data. - -Note: **This function MUST NOT be called directly.** It MAY be implemented -by child classes, and if so, will be called by the internal Transform -class methods only. - -In some cases, your transform operation may need to emit a bit more -data at the end of the stream. For example, a `Zlib` compression -stream will store up some internal state so that it can optimally -compress the output. At the end, however, it needs to do the best it -can with what is left, so that the data will be complete. - -In those cases, you can implement a `_flush` method, which will be -called at the very end, after all the written data is consumed, but -before emitting `end` to signal the end of the readable side. Just -like with `_transform`, call `transform.push(chunk)` zero or more -times, as appropriate, and call `callback` when the flush operation is -complete. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -### Example: `SimpleProtocol` parser - -The example above of a simple protocol parser can be implemented much -more simply by using the higher level `Transform` stream class. - -In this example, rather than providing the input as an argument, it -would be piped into the parser, which is a more idiomatic Node stream -approach. - -```javascript -function SimpleProtocol(options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(options); - - Transform.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype = Object.create( - Transform.prototype, { constructor: { value: SimpleProtocol }}); - -SimpleProtocol.prototype._transform = function(chunk, encoding, done) { - if (!this._inBody) { - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // and let them know that we are done parsing the header. - this.emit('header', this.header); - - // now, because we got some extra data, emit this first. - this.push(b); - } - } else { - // from there on, just provide the data to our consumer as-is. - this.push(b); - } - done(); -}; - -var parser = new SimpleProtocol(); -source.pipe(parser) - -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - - -## Class: stream.PassThrough - -This is a trivial implementation of a `Transform` stream that simply -passes the input bytes across to the output. Its purpose is mainly -for examples and testing, but there are occasionally use cases where -it can come in handy. - - -[EventEmitter]: events.html#events_class_events_eventemitter diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/duplex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/float.patch b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/float.patch deleted file mode 100644 index 0ad71a1f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/float.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js -index c5a741c..a2e0d8e 100644 ---- a/lib/_stream_duplex.js -+++ b/lib/_stream_duplex.js -@@ -26,8 +26,8 @@ - - module.exports = Duplex; - var util = require('util'); --var Readable = require('_stream_readable'); --var Writable = require('_stream_writable'); -+var Readable = require('./_stream_readable'); -+var Writable = require('./_stream_writable'); - - util.inherits(Duplex, Readable); - -diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js -index a5e9864..330c247 100644 ---- a/lib/_stream_passthrough.js -+++ b/lib/_stream_passthrough.js -@@ -25,7 +25,7 @@ - - module.exports = PassThrough; - --var Transform = require('_stream_transform'); -+var Transform = require('./_stream_transform'); - var util = require('util'); - util.inherits(PassThrough, Transform); - -diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js -index 2259d2e..e6681ee 100644 ---- a/lib/_stream_readable.js -+++ b/lib/_stream_readable.js -@@ -23,6 +23,9 @@ module.exports = Readable; - Readable.ReadableState = ReadableState; - - var EE = require('events').EventEmitter; -+if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { -+ return emitter.listeners(type).length; -+}; - var Stream = require('stream'); - var util = require('util'); - var StringDecoder; -diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js -index e925b4b..f08b05e 100644 ---- a/lib/_stream_transform.js -+++ b/lib/_stream_transform.js -@@ -64,7 +64,7 @@ - - module.exports = Transform; - --var Duplex = require('_stream_duplex'); -+var Duplex = require('./_stream_duplex'); - var util = require('util'); - util.inherits(Transform, Duplex); - -diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js -index a26f711..56ca47d 100644 ---- a/lib/_stream_writable.js -+++ b/lib/_stream_writable.js -@@ -109,7 +109,7 @@ function WritableState(options, stream) { - function Writable(options) { - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. -- if (!(this instanceof Writable) && !(this instanceof Stream.Duplex)) -+ if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) - return new Writable(options); - - this._writableState = new WritableState(options, this); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index a2e0d8e0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -module.exports = Duplex; -var util = require('util'); -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -Object.keys(Writable.prototype).forEach(function(method) { - if (!Duplex.prototype[method]) - Duplex.prototype[method] = Writable.prototype[method]; -}); - -function Duplex(options) { - if (!(this instanceof Duplex)) - return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) - this.readable = false; - - if (options && options.writable === false) - this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) - this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) - return; - - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(this.end.bind(this)); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 330c247d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); -var util = require('util'); -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) - return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function(chunk, encoding, cb) { - cb(null, chunk); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 323f3305..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,927 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -module.exports = Readable; -Readable.ReadableState = ReadableState; - -var EE = require('events').EventEmitter; -if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { - return emitter.listeners(type).length; -}; -var Stream = require('stream'); -var util = require('util'); -var StringDecoder; - -util.inherits(Readable, Stream); - -function ReadableState(options, stream) { - options = options || {}; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = false; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // In streams that never have any data, and do push(null) right away, - // the consumer can miss the 'end' event if they do some I/O before - // consuming the stream. So, we don't emit('end') until some reading - // happens. - this.calledRead = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - if (!(this instanceof Readable)) - return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function(chunk, encoding) { - var state = this._readableState; - - if (typeof chunk === 'string' && !state.objectMode) { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = new Buffer(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function(chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (chunk === null || chunk === undefined) { - state.reading = false; - if (!state.ended) - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var e = new Error('stream.unshift() after end event'); - stream.emit('error', e); - } else { - if (state.decoder && !addToFront && !encoding) - chunk = state.decoder.write(chunk); - - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) { - state.buffer.unshift(chunk); - } else { - state.reading = false; - state.buffer.push(chunk); - } - - if (state.needReadable) - emitReadable(stream); - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - - - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && - (state.needReadable || - state.length < state.highWaterMark || - state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function(enc) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; -}; - -// Don't raise the hwm > 128MB -var MAX_HWM = 0x800000; -function roundUpToNextPowerOf2(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - for (var p = 1; p < 32; p <<= 1) n |= n >> p; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) - return 0; - - if (state.objectMode) - return n === 0 ? 0 : 1; - - if (isNaN(n) || n === null) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) - return state.buffer[0].length; - else - return state.length; - } - - if (n <= 0) - return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) - state.highWaterMark = roundUpToNextPowerOf2(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else - return state.length; - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function(n) { - var state = this._readableState; - state.calledRead = true; - var nOrig = n; - - if (typeof n !== 'number' || n > 0) - state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && - state.needReadable && - (state.length >= state.highWaterMark || state.ended)) { - emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) - endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - - // if we currently have less than the highWaterMark, then also read some - if (state.length - n <= state.highWaterMark) - doRead = true; - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) - doRead = false; - - if (doRead) { - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) - state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read called its callback synchronously, then `reading` - // will be false, and we need to re-evaluate how much data we - // can return to the user. - if (doRead && !state.reading) - n = howMuchToRead(nOrig, state); - - var ret; - if (n > 0) - ret = fromList(n, state); - else - ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) - state.needReadable = true; - - // If we happened to read() exactly the remaining amount in the - // buffer, and the EOF has been seen at this point, then make sure - // that we emit 'end' on the very next tick. - if (state.ended && !state.endEmitted && state.length === 0) - endReadable(this); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode && - !er) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - - -function onEofChunk(stream, state) { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // if we've ended and we have some data left, then emit - // 'readable' now to make sure it gets picked up. - if (state.length > 0) - emitReadable(stream); - else - endReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (state.emittedReadable) - return; - - state.emittedReadable = true; - if (state.sync) - process.nextTick(function() { - emitReadable_(stream); - }); - else - emitReadable_(stream); -} - -function emitReadable_(stream) { - stream.emit('readable'); -} - - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(function() { - maybeReadMore_(stream, state); - }); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && - state.length < state.highWaterMark) { - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break; - else - len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function(n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function(dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && - dest !== process.stdout && - dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) - process.nextTick(endFn); - else - src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - if (readable !== src) return; - cleanup(); - } - - function onend() { - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - function cleanup() { - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (!dest._writableState || dest._writableState.needDrain) - ondrain(); - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - unpipe(); - dest.removeListener('error', onerror); - if (EE.listenerCount(dest, 'error') === 0) - dest.emit('error', er); - } - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. - if (!dest._events || !dest._events.error) - dest.on('error', onerror); - else if (Array.isArray(dest._events.error)) - dest._events.error.unshift(onerror); - else - dest._events.error = [onerror, dest._events.error]; - - - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - // the handler that waits for readable events after all - // the data gets sucked out in flow. - // This would be easier to follow with a .once() handler - // in flow(), but that is too slow. - this.on('readable', pipeOnReadable); - - state.flowing = true; - process.nextTick(function() { - flow(src); - }); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function() { - var dest = this; - var state = src._readableState; - state.awaitDrain--; - if (state.awaitDrain === 0) - flow(src); - }; -} - -function flow(src) { - var state = src._readableState; - var chunk; - state.awaitDrain = 0; - - function write(dest, i, list) { - var written = dest.write(chunk); - if (false === written) { - state.awaitDrain++; - } - } - - while (state.pipesCount && null !== (chunk = src.read())) { - - if (state.pipesCount === 1) - write(state.pipes, 0, null); - else - state.pipes.forEach(write); - - src.emit('data', chunk); - - // if anyone needs a drain, then we have to wait for that. - if (state.awaitDrain > 0) - return; - } - - // if every destination was unpiped, either before entering this - // function, or in the while loop, then stop flowing. - // - // NB: This is a pretty rare edge case. - if (state.pipesCount === 0) { - state.flowing = false; - - // if there were data event listeners added, then switch to old mode. - if (EE.listenerCount(src, 'data') > 0) - emitDataEvents(src); - return; - } - - // at this point, no one needed a drain, so we just ran out of data - // on the next readable event, start it over again. - state.ranOut = true; -} - -function pipeOnReadable() { - if (this._readableState.ranOut) { - this._readableState.ranOut = false; - flow(this); - } -} - - -Readable.prototype.unpipe = function(dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) - return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) - return this; - - if (!dest) - dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - if (dest) - dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - - for (var i = 0; i < len; i++) - dests[i].emit('unpipe', this); - return this; - } - - // try to find the right one. - var i = state.pipes.indexOf(dest); - if (i === -1) - return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) - state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function(ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data' && !this._readableState.flowing) - emitDataEvents(this); - - if (ev === 'readable' && this.readable) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - this.read(0); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function() { - emitDataEvents(this); - this.read(0); - this.emit('resume'); -}; - -Readable.prototype.pause = function() { - emitDataEvents(this, true); - this.emit('pause'); -}; - -function emitDataEvents(stream, startPaused) { - var state = stream._readableState; - - if (state.flowing) { - // https://github.com/isaacs/readable-stream/issues/16 - throw new Error('Cannot switch to old mode now.'); - } - - var paused = startPaused || false; - var readable = false; - - // convert to an old-style stream. - stream.readable = true; - stream.pipe = Stream.prototype.pipe; - stream.on = stream.addListener = Stream.prototype.on; - - stream.on('readable', function() { - readable = true; - - var c; - while (!paused && (null !== (c = stream.read()))) - stream.emit('data', c); - - if (c === null) { - readable = false; - stream._readableState.needReadable = true; - } - }); - - stream.pause = function() { - paused = true; - this.emit('pause'); - }; - - stream.resume = function() { - paused = false; - if (readable) - process.nextTick(function() { - stream.emit('readable'); - }); - else - this.read(0); - this.emit('resume'); - }; - - // now make it start, just in case it hadn't already. - stream.emit('readable'); -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function(stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function() { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) - self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function(chunk) { - if (state.decoder) - chunk = state.decoder.write(chunk); - if (!chunk || !state.objectMode && !chunk.length) - return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (typeof stream[i] === 'function' && - typeof this[i] === 'undefined') { - this[i] = function(method) { return function() { - return stream[method].apply(stream, arguments); - }}(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - events.forEach(function(ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function(n) { - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - - - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) - return null; - - if (length === 0) - ret = null; - else if (objectMode) - ret = list.shift(); - else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) - ret = list.join(''); - else - ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) - ret = ''; - else - ret = new Buffer(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var buf = list[0]; - var cpy = Math.min(n - c, buf.length); - - if (stringMode) - ret += buf.slice(0, cpy); - else - buf.copy(ret, c, 0, cpy); - - if (cpy < buf.length) - list[0] = buf.slice(cpy); - else - list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) - throw new Error('endReadable called on non-empty stream'); - - if (!state.endEmitted && state.calledRead) { - state.ended = true; - process.nextTick(function() { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } - }); - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index 707e4b3b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); -var util = require('util'); -util.inherits(Transform, Duplex); - - -function TransformState(options, stream) { - this.afterTransform = function(er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) - return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (data !== null && data !== undefined) - stream.push(data); - - if (cb) - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - - -function Transform(options) { - if (!(this instanceof Transform)) - return new Transform(options); - - Duplex.call(this, options); - - var ts = this._transformState = new TransformState(options, this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - this.once('finish', function() { - if ('function' === typeof this._flush) - this._flush(function(er) { - done(stream, er); - }); - else - done(stream); - }); -} - -Transform.prototype.push = function(chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function(chunk, encoding, cb) { - throw new Error('not implemented'); -}; - -Transform.prototype._write = function(chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || - rs.needReadable || - rs.length < rs.highWaterMark) - this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function(n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - - -function done(stream, er) { - if (er) - return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var rs = stream._readableState; - var ts = stream._transformState; - - if (ws.length) - throw new Error('calling transform done when ws.length != 0'); - - if (ts.transforming) - throw new Error('calling transform done when still transforming'); - - return stream.push(null); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index 9eaf4ec2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,371 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, cb), and it'll handle all -// the drain event emission and buffering. - -module.exports = Writable; -Writable.WritableState = WritableState; - -var util = require('util'); -var assert = require('assert'); -var Stream = require('stream'); - -util.inherits(Writable, Stream); - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; -} - -function WritableState(options, stream) { - options = options || {}; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function(er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.buffer = []; -} - -function Writable(options) { - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) - return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function() { - this.emit('error', new Error('Cannot pipe. Not readable.')); -}; - - -function writeAfterEnd(stream, state, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); - valid = false; - } - return valid; -} - -Writable.prototype.write = function(chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - else if (!encoding) - encoding = state.defaultEncoding; - - if (typeof cb !== 'function') - cb = function() {}; - - if (state.ended) - writeAfterEnd(this, state, cb); - else if (validChunk(this, state, chunk, cb)) - ret = writeOrBuffer(this, state, chunk, encoding, cb); - - return ret; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && - state.decodeStrings !== false && - typeof chunk === 'string') { - chunk = new Buffer(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) - state.needDrain = true; - - if (state.writing) - state.buffer.push(new WriteReq(chunk, encoding, cb)); - else - doWrite(stream, state, len, chunk, encoding, cb); - - return ret; -} - -function doWrite(stream, state, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - if (sync) - process.nextTick(function() { - cb(er); - }); - else - cb(er); - - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) - onwriteError(stream, state, sync, er, cb); - else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(stream, state); - - if (!finished && !state.bufferProcessing && state.buffer.length) - clearBuffer(stream, state); - - if (sync) { - process.nextTick(function() { - afterWrite(stream, state, finished, cb); - }); - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) - onwriteDrain(stream, state); - cb(); - if (finished) - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - - for (var c = 0; c < state.buffer.length; c++) { - var entry = state.buffer[c]; - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, len, chunk, encoding, cb); - - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - c++; - break; - } - } - - state.bufferProcessing = false; - if (c < state.buffer.length) - state.buffer = state.buffer.slice(c); - else - state.buffer.length = 0; -} - -Writable.prototype._write = function(chunk, encoding, cb) { - cb(new Error('not implemented')); -}; - -Writable.prototype.end = function(chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (typeof chunk !== 'undefined' && chunk !== null) - this.write(chunk, encoding); - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) - endWritable(this, state, cb); -}; - - -function needFinish(stream, state) { - return (state.ending && - state.length === 0 && - !state.finished && - !state.writing); -} - -function finishMaybe(stream, state) { - var need = needFinish(stream, state); - if (need) { - state.finished = true; - stream.emit('finish'); - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) - process.nextTick(cb); - else - stream.once('finish', cb); - } - state.ended = true; -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE deleted file mode 100644 index 6de584a4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md deleted file mode 100644 index 4d2aa001..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md +++ /dev/null @@ -1,7 +0,0 @@ -**string_decoder.js** (`require('string_decoder')`) from Node.js core - -Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. - -Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** - -The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js deleted file mode 100755 index 46470cfd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js +++ /dev/null @@ -1,94 +0,0 @@ -#!/usr/bin/env node - -const hyperquest = require('hyperzip')(require('hyperdirect')) - , bl = require('bl') - , fs = require('fs') - , path = require('path') - , cheerio = require('cheerio') - - , files = require('./files') - , testReplace = require('./test-replacements') - - , srcurlpfx = 'https://raw.github.com/joyent/node/v' + process.argv[2] + '-release/' - , libsrcurl = srcurlpfx + 'lib/' - , testsrcurl = srcurlpfx + 'test/simple/' - , testlisturl = 'https://github.com/joyent/node/tree/v' + process.argv[2] + '-release/test/simple' - , libourroot = path.join(__dirname, '../') - , testourroot = path.join(__dirname, '../test/simple/') - - -function processFile (url, out, replacements) { - hyperquest(url).pipe(bl(function (err, data) { - if (err) - throw err - - data = data.toString() - replacements.forEach(function (replacement) { - data = data.replace.apply(data, replacement) - }) - - fs.writeFile(out, data, 'utf8', function (err) { - if (err) - throw err - - console.log('Wrote', out) - }) - })) -} - -function processLibFile (file) { - var replacements = files[file] - , url = libsrcurl + file - , out = path.join(libourroot, replacements.out || file) - - processFile(url, out, replacements) -} - - -function processTestFile (file) { - var replacements = testReplace.all - , url = testsrcurl + file - , out = path.join(testourroot, file) - - if (testReplace[file]) - replacements = replacements.concat(testReplace[file]) - - processFile(url, out, replacements) -} - - -if (!/0\.1\d\.\d+/.test(process.argv[2])) { - console.log('Usage: build.js <node version>') - return process.exit(-1) -} - - -//-------------------------------------------------------------------- -// Grab & process files in ../lib/ - -Object.keys(files).forEach(processLibFile) - -//-------------------------------------------------------------------- -// Discover, grab and process all test-string-decoder* files on joyent/node - -hyperquest(testlisturl).pipe(bl(function (err, data) { - if (err) - throw err - - var $ = cheerio.load(data.toString()) - - $('table.files .js-directory-link').each(function () { - var file = $(this).text() - if (/^test-string-decoder/.test(file) || file == 'common.js') - processTestFile(file) - }) -})) - -//-------------------------------------------------------------------- -// Grab the joyent/node test/common.js - -processFile( - testsrcurl + '../common.js' - , path.join(testourroot, '../common.js') - , testReplace['common.js'] -) \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js deleted file mode 100644 index 7396a4f4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js +++ /dev/null @@ -1,36 +0,0 @@ -/* This file lists the files to be fetched from the node repo - * in the /lib/ directory which will be placed in the ../lib/ - * directory after having each of the "replacements" in the - * array for that file applied to it. The replacements are - * simply the arguments to String#replace, so they can be - * strings, regexes, functions. - */ - -module.exports['string_decoder.js'] = [ - - // pull in Bufer as a require - // add Buffer.isEncoding where missing - [ - /^(\/\/ USE OR OTHER DEALINGS IN THE SOFTWARE\.)/m - , '$1\n\nvar Buffer = require(\'buffer\').Buffer;' - + '\n' - + '\nvar isBufferEncoding = Buffer.isEncoding' - + '\n || function(encoding) {' - + '\n switch (encoding && encoding.toLowerCase()) {' - + '\n case \'hex\': case \'utf8\': case \'utf-8\': case \'ascii\': case \'binary\': case \'base64\': case \'ucs2\': case \'ucs-2\': case \'utf16le\': case \'utf-16le\': case \'raw\': return true;' - + '\n default: return false;' - + '\n }' - + '\n }' - + '\n' - - ] - - // use custom Buffer.isEncoding reference - , [ - /Buffer\.isEncoding\(/g - , 'isBufferEncoding\(' - ] - -] - -module.exports['string_decoder.js'].out = 'index.js' \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json deleted file mode 100644 index f7ee6a46..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "string_decoder-build", - "version": "0.0.0", - "description": "", - "main": "build.js", - "dependencies": { - "bl": "~0.6.0", - "hyperzip": "0.0.0", - "hyperdirect": "0.0.0", - "cheerio": "~0.13.1" - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js deleted file mode 100644 index 5bbf6028..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js +++ /dev/null @@ -1,24 +0,0 @@ -module.exports.all = [ - [ - /require\(['"]string_decoder['"]\)/g - , 'require(\'../../\')' - ] - -] - -module.exports['common.js'] = [ - [ - /^ setImmediate,$/m - , ' typeof setImmediate == \'undefined\' ? null : setImmediate,' - ] - - , [ - /^ clearImmediate,$/m - , ' typeof clearImmediate == \'undefined\' ? null : clearImmediate,' - ] - - , [ - /^ global];$/m - , ' global].filter(Boolean);' - ] -] diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js deleted file mode 100644 index 2e44a03e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var Buffer = require('buffer').Buffer; - -var isBufferEncoding = Buffer.isEncoding - || function(encoding) { - switch (encoding && encoding.toLowerCase()) { - case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; - default: return false; - } - } - - -function assertEncoding(encoding) { - if (encoding && !isBufferEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} - -var StringDecoder = exports.StringDecoder = function(encoding) { - this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); - assertEncoding(encoding); - switch (this.encoding) { - case 'utf8': - // CESU-8 represents each of Surrogate Pair by 3-bytes - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - // UTF-16 represents each of Surrogate Pair by 2-bytes - this.surrogateSize = 2; - this.detectIncompleteChar = utf16DetectIncompleteChar; - break; - case 'base64': - // Base-64 stores 3 bytes in 4 chars, and pads the remainder. - this.surrogateSize = 3; - this.detectIncompleteChar = base64DetectIncompleteChar; - break; - default: - this.write = passThroughWrite; - return; - } - - this.charBuffer = new Buffer(6); - this.charReceived = 0; - this.charLength = 0; -}; - - -StringDecoder.prototype.write = function(buffer) { - var charStr = ''; - var offset = 0; - - // if our last write ended with an incomplete multibyte character - while (this.charLength) { - // determine how many remaining bytes this buffer has to offer for this char - var i = (buffer.length >= this.charLength - this.charReceived) ? - this.charLength - this.charReceived : - buffer.length; - - // add the new bytes to the char buffer - buffer.copy(this.charBuffer, this.charReceived, offset, i); - this.charReceived += (i - offset); - offset = i; - - if (this.charReceived < this.charLength) { - // still not enough chars in this buffer? wait for more ... - return ''; - } - - // get the character that was split - charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); - - // lead surrogate (D800-DBFF) is also the incomplete character - var charCode = charStr.charCodeAt(charStr.length - 1); - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - this.charLength += this.surrogateSize; - charStr = ''; - continue; - } - this.charReceived = this.charLength = 0; - - // if there are no more bytes in this buffer, just emit our char - if (i == buffer.length) return charStr; - - // otherwise cut off the characters end from the beginning of this buffer - buffer = buffer.slice(i, buffer.length); - break; - } - - var lenIncomplete = this.detectIncompleteChar(buffer); - - var end = buffer.length; - if (this.charLength) { - // buffer the incomplete character bytes we got - buffer.copy(this.charBuffer, 0, buffer.length - lenIncomplete, end); - this.charReceived = lenIncomplete; - end -= lenIncomplete; - } - - charStr += buffer.toString(this.encoding, 0, end); - - var end = charStr.length - 1; - var charCode = charStr.charCodeAt(end); - // lead surrogate (D800-DBFF) is also the incomplete character - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - var size = this.surrogateSize; - this.charLength += size; - this.charReceived += size; - this.charBuffer.copy(this.charBuffer, size, 0, size); - this.charBuffer.write(charStr.charAt(charStr.length - 1), this.encoding); - return charStr.substring(0, end); - } - - // or just emit the charStr - return charStr; -}; - -StringDecoder.prototype.detectIncompleteChar = function(buffer) { - // determine how many bytes we have to check at the end of this buffer - var i = (buffer.length >= 3) ? 3 : buffer.length; - - // Figure out if one of the last i bytes of our buffer announces an - // incomplete char. - for (; i > 0; i--) { - var c = buffer[buffer.length - i]; - - // See http://en.wikipedia.org/wiki/UTF-8#Description - - // 110XXXXX - if (i == 1 && c >> 5 == 0x06) { - this.charLength = 2; - break; - } - - // 1110XXXX - if (i <= 2 && c >> 4 == 0x0E) { - this.charLength = 3; - break; - } - - // 11110XXX - if (i <= 3 && c >> 3 == 0x1E) { - this.charLength = 4; - break; - } - } - - return i; -}; - -StringDecoder.prototype.end = function(buffer) { - var res = ''; - if (buffer && buffer.length) - res = this.write(buffer); - - if (this.charReceived) { - var cr = this.charReceived; - var buf = this.charBuffer; - var enc = this.encoding; - res += buf.slice(0, cr).toString(enc); - } - - return res; -}; - -function passThroughWrite(buffer) { - return buffer.toString(this.encoding); -} - -function utf16DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 2; - this.charLength = incomplete ? 2 : 0; - return incomplete; -} - -function base64DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 3; - this.charLength = incomplete ? 3 : 0; - return incomplete; -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json deleted file mode 100644 index c7cac1a5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "string_decoder", - "version": "0.10.25", - "description": "The string_decoder module from Node core", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "tap": "~0.4.8" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/rvagg/string_decoder.git" - }, - "homepage": "https://github.com/rvagg/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "readme": "**string_decoder.js** (`require('string_decoder')`) from Node.js core\n\nCopyright Joyent, Inc. and other Node contributors. See LICENCE file for details.\n\nVersion numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.**\n\nThe *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version.", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/rvagg/string_decoder/issues" - }, - "_id": "string_decoder@0.10.25", - "dist": { - "shasum": "aa026a29a0177ff13c8df4472dcda2f26d646900" - }, - "_from": "string_decoder@~0.10.x", - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.25.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js deleted file mode 100644 index ed5ff08d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var path = require('path'); -var assert = require('assert'); - -exports.testDir = path.dirname(__filename); -exports.fixturesDir = path.join(exports.testDir, 'fixtures'); -exports.libDir = path.join(exports.testDir, '../lib'); -exports.tmpDir = path.join(exports.testDir, 'tmp'); -exports.PORT = +process.env.NODE_COMMON_PORT || 12346; - -if (process.platform === 'win32') { - exports.PIPE = '\\\\.\\pipe\\libuv-test'; -} else { - exports.PIPE = exports.tmpDir + '/test.sock'; -} - -var util = require('util'); -for (var i in util) exports[i] = util[i]; -//for (var i in exports) global[i] = exports[i]; - -function protoCtrChain(o) { - var result = []; - for (; o; o = o.__proto__) { result.push(o.constructor); } - return result.join(); -} - -exports.indirectInstanceOf = function(obj, cls) { - if (obj instanceof cls) { return true; } - var clsChain = protoCtrChain(cls.prototype); - var objChain = protoCtrChain(obj); - return objChain.slice(-clsChain.length) === clsChain; -}; - - -exports.ddCommand = function(filename, kilobytes) { - if (process.platform === 'win32') { - var p = path.resolve(exports.fixturesDir, 'create-file.js'); - return '"' + process.argv[0] + '" "' + p + '" "' + - filename + '" ' + (kilobytes * 1024); - } else { - return 'dd if=/dev/zero of="' + filename + '" bs=1024 count=' + kilobytes; - } -}; - - -exports.spawnCat = function(options) { - var spawn = require('child_process').spawn; - - if (process.platform === 'win32') { - return spawn('more', [], options); - } else { - return spawn('cat', [], options); - } -}; - - -exports.spawnPwd = function(options) { - var spawn = require('child_process').spawn; - - if (process.platform === 'win32') { - return spawn('cmd.exe', ['/c', 'cd'], options); - } else { - return spawn('pwd', [], options); - } -}; - - -// Turn this off if the test should not check for global leaks. -exports.globalCheck = true; - -process.on('exit', function() { - if (!exports.globalCheck) return; - var knownGlobals = [setTimeout, - setInterval, - typeof setImmediate == 'undefined' ? null : setImmediate, - clearTimeout, - clearInterval, - typeof clearImmediate == 'undefined' ? null : clearImmediate, - console, - Buffer, - process, - global].filter(Boolean); - - if (global.gc) { - knownGlobals.push(gc); - } - - if (global.DTRACE_HTTP_SERVER_RESPONSE) { - knownGlobals.push(DTRACE_HTTP_SERVER_RESPONSE); - knownGlobals.push(DTRACE_HTTP_SERVER_REQUEST); - knownGlobals.push(DTRACE_HTTP_CLIENT_RESPONSE); - knownGlobals.push(DTRACE_HTTP_CLIENT_REQUEST); - knownGlobals.push(DTRACE_NET_STREAM_END); - knownGlobals.push(DTRACE_NET_SERVER_CONNECTION); - knownGlobals.push(DTRACE_NET_SOCKET_READ); - knownGlobals.push(DTRACE_NET_SOCKET_WRITE); - } - if (global.COUNTER_NET_SERVER_CONNECTION) { - knownGlobals.push(COUNTER_NET_SERVER_CONNECTION); - knownGlobals.push(COUNTER_NET_SERVER_CONNECTION_CLOSE); - knownGlobals.push(COUNTER_HTTP_SERVER_REQUEST); - knownGlobals.push(COUNTER_HTTP_SERVER_RESPONSE); - knownGlobals.push(COUNTER_HTTP_CLIENT_REQUEST); - knownGlobals.push(COUNTER_HTTP_CLIENT_RESPONSE); - } - - if (global.ArrayBuffer) { - knownGlobals.push(ArrayBuffer); - knownGlobals.push(Int8Array); - knownGlobals.push(Uint8Array); - knownGlobals.push(Uint8ClampedArray); - knownGlobals.push(Int16Array); - knownGlobals.push(Uint16Array); - knownGlobals.push(Int32Array); - knownGlobals.push(Uint32Array); - knownGlobals.push(Float32Array); - knownGlobals.push(Float64Array); - knownGlobals.push(DataView); - } - - for (var x in global) { - var found = false; - - for (var y in knownGlobals) { - if (global[x] === knownGlobals[y]) { - found = true; - break; - } - } - - if (!found) { - console.error('Unknown global: %s', x); - assert.ok(false, 'Unknown global found'); - } - } -}); - - -var mustCallChecks = []; - - -function runCallChecks(exitCode) { - if (exitCode !== 0) return; - - var failed = mustCallChecks.filter(function(context) { - return context.actual !== context.expected; - }); - - failed.forEach(function(context) { - console.log('Mismatched %s function calls. Expected %d, actual %d.', - context.name, - context.expected, - context.actual); - console.log(context.stack.split('\n').slice(2).join('\n')); - }); - - if (failed.length) process.exit(1); -} - - -exports.mustCall = function(fn, expected) { - if (typeof expected !== 'number') expected = 1; - - var context = { - expected: expected, - actual: 0, - stack: (new Error).stack, - name: fn.name || '<anonymous>' - }; - - // add the exit listener only once to avoid listener leak warnings - if (mustCallChecks.length === 0) process.on('exit', runCallChecks); - - mustCallChecks.push(context); - - return function() { - context.actual++; - return fn.apply(this, arguments); - }; -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js deleted file mode 100644 index 869a4116..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// verify that the string decoder works getting 1 byte at a time, -// the whole buffer at once, and that both match the .toString(enc) -// result of the entire buffer. - -var assert = require('assert'); -var SD = require('../../').StringDecoder; -var encodings = ['base64', 'hex', 'utf8', 'utf16le', 'ucs2']; - -var bufs = [ '☃💩', 'asdf' ].map(function(b) { - return new Buffer(b); -}); - -// also test just arbitrary bytes from 0-15. -for (var i = 1; i <= 16; i++) { - var bytes = new Array(i).join('.').split('.').map(function(_, j) { - return j + 0x78; - }); - bufs.push(new Buffer(bytes)); -} - -encodings.forEach(testEncoding); - -console.log('ok'); - -function testEncoding(encoding) { - bufs.forEach(function(buf) { - testBuf(encoding, buf); - }); -} - -function testBuf(encoding, buf) { - console.error('# %s', encoding, buf); - - // write one byte at a time. - var s = new SD(encoding); - var res1 = ''; - for (var i = 0; i < buf.length; i++) { - res1 += s.write(buf.slice(i, i + 1)); - } - res1 += s.end(); - - // write the whole buffer at once. - var res2 = ''; - var s = new SD(encoding); - res2 += s.write(buf); - res2 += s.end(); - - // .toString() on the buffer - var res3 = buf.toString(encoding); - - console.log('expect=%j', res3); - assert.equal(res1, res3, 'one byte at a time should match toString'); - assert.equal(res2, res3, 'all bytes at once should match toString'); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js deleted file mode 100644 index 7f69f7ea..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var common = require('../common'); -var assert = require('assert'); -var StringDecoder = require('../../').StringDecoder; -var decoder = new StringDecoder('utf8'); - - - -var buffer = new Buffer('$'); -assert.deepEqual('$', decoder.write(buffer)); - -buffer = new Buffer('¢'); -assert.deepEqual('', decoder.write(buffer.slice(0, 1))); -assert.deepEqual('¢', decoder.write(buffer.slice(1, 2))); - -buffer = new Buffer('€'); -assert.deepEqual('', decoder.write(buffer.slice(0, 1))); -assert.deepEqual('', decoder.write(buffer.slice(1, 2))); -assert.deepEqual('€', decoder.write(buffer.slice(2, 3))); - -buffer = new Buffer([0xF0, 0xA4, 0xAD, 0xA2]); -var s = ''; -s += decoder.write(buffer.slice(0, 1)); -s += decoder.write(buffer.slice(1, 2)); -s += decoder.write(buffer.slice(2, 3)); -s += decoder.write(buffer.slice(3, 4)); -assert.ok(s.length > 0); - -// CESU-8 -buffer = new Buffer('EDA0BDEDB18D', 'hex'); // THUMBS UP SIGN (in CESU-8) -var s = ''; -s += decoder.write(buffer.slice(0, 1)); -s += decoder.write(buffer.slice(1, 2)); -s += decoder.write(buffer.slice(2, 3)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(3, 4)); -s += decoder.write(buffer.slice(4, 5)); -s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 2)); -s += decoder.write(buffer.slice(2, 4)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(4, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 3)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(3, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 4)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(4, 5)); -s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 5)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 6)); -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - - -// UCS-2 -decoder = new StringDecoder('ucs2'); -buffer = new Buffer('ab', 'ucs2'); -assert.equal(decoder.write(buffer), 'ab'); // 2 complete chars -buffer = new Buffer('abc', 'ucs2'); -assert.equal(decoder.write(buffer.slice(0, 3)), 'a'); // 'a' and first of 'b' -assert.equal(decoder.write(buffer.slice(3, 6)), 'bc'); // second of 'b' and 'c' - - -// UTF-16LE -buffer = new Buffer('3DD84DDC', 'hex'); // THUMBS UP SIGN (in CESU-8) -var s = ''; -s += decoder.write(buffer.slice(0, 1)); -s += decoder.write(buffer.slice(1, 2)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(2, 3)); -s += decoder.write(buffer.slice(3, 4)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 2)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(2, 4)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 3)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(3, 4)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 4)); -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - - -// A mixed ascii and non-ascii string -// Test stolen from deps/v8/test/cctest/test-strings.cc -// U+02E4 -> CB A4 -// U+0064 -> 64 -// U+12E4 -> E1 8B A4 -// U+0030 -> 30 -// U+3045 -> E3 81 85 -var expected = '\u02e4\u0064\u12e4\u0030\u3045'; -var buffer = new Buffer([0xCB, 0xA4, 0x64, 0xE1, 0x8B, 0xA4, - 0x30, 0xE3, 0x81, 0x85]); -var charLengths = [0, 0, 1, 2, 2, 2, 3, 4, 4, 4, 5, 5]; - -// Split the buffer into 3 segments -// |----|------|-------| -// 0 i j buffer.length -// Scan through every possible 3 segment combination -// and make sure that the string is always parsed. -common.print('scanning '); -for (var j = 2; j < buffer.length; j++) { - for (var i = 1; i < j; i++) { - var decoder = new StringDecoder('utf8'); - - var sum = decoder.write(buffer.slice(0, i)); - - // just check that we've received the right amount - // after the first write - assert.equal(charLengths[i], sum.length); - - sum += decoder.write(buffer.slice(i, j)); - sum += decoder.write(buffer.slice(j, buffer.length)); - assert.equal(expected, sum); - common.print('.'); - } -} -console.log(' crayon!'); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/package.json deleted file mode 100644 index c9e268d0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "readable-stream", - "version": "1.0.25", - "description": "An exploration of a new kind of readable streams for Node.js", - "main": "readable.js", - "dependencies": { - "string_decoder": "~0.10.x" - }, - "devDependencies": { - "tap": "~0.2.6" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/readable-stream" - }, - "keywords": [ - "readable", - "stream", - "pipe" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "BSD", - "readme": "# readable-stream\n\nA new class of streams for Node.js\n\nThis module provides the new Stream base classes introduced in Node\nv0.10, for use in Node v0.8. You can use it to have programs that\nhave to work with node v0.8, while being forward-compatible for v0.10\nand beyond. When you drop support for v0.8, you can remove this\nmodule, and only use the native streams.\n\nThis is almost exactly the same codebase as appears in Node v0.10.\nHowever:\n\n1. The exported object is actually the Readable class. Decorating the\n native `stream` module would be global pollution.\n2. In v0.10, you can safely use `base64` as an argument to\n `setEncoding` in Readable streams. However, in v0.8, the\n StringDecoder class has no `end()` method, which is problematic for\n Base64. So, don't use that, because it'll break and be weird.\n\nOther than that, the API is the same as `require('stream')` in v0.10,\nso the API docs are reproduced below.\n\n----------\n\n Stability: 2 - Unstable\n\nA stream is an abstract interface implemented by various objects in\nNode. For example a request to an HTTP server is a stream, as is\nstdout. Streams are readable, writable, or both. All streams are\ninstances of [EventEmitter][]\n\nYou can load the Stream base classes by doing `require('stream')`.\nThere are base classes provided for Readable streams, Writable\nstreams, Duplex streams, and Transform streams.\n\n## Compatibility\n\nIn earlier versions of Node, the Readable stream interface was\nsimpler, but also less powerful and less useful.\n\n* Rather than waiting for you to call the `read()` method, `'data'`\n events would start emitting immediately. If you needed to do some\n I/O to decide how to handle data, then you had to store the chunks\n in some kind of buffer so that they would not be lost.\n* The `pause()` method was advisory, rather than guaranteed. This\n meant that you still had to be prepared to receive `'data'` events\n even when the stream was in a paused state.\n\nIn Node v0.10, the Readable class described below was added. For\nbackwards compatibility with older Node programs, Readable streams\nswitch into \"old mode\" when a `'data'` event handler is added, or when\nthe `pause()` or `resume()` methods are called. The effect is that,\neven if you are not using the new `read()` method and `'readable'`\nevent, you no longer have to worry about losing `'data'` chunks.\n\nMost programs will continue to function normally. However, this\nintroduces an edge case in the following conditions:\n\n* No `'data'` event handler is added.\n* The `pause()` and `resume()` methods are never called.\n\nFor example, consider the following code:\n\n```javascript\n// WARNING! BROKEN!\nnet.createServer(function(socket) {\n\n // we add an 'end' method, but never consume the data\n socket.on('end', function() {\n // It will never get here.\n socket.end('I got your message (but didnt read it)\\n');\n });\n\n}).listen(1337);\n```\n\nIn versions of node prior to v0.10, the incoming message data would be\nsimply discarded. However, in Node v0.10 and beyond, the socket will\nremain paused forever.\n\nThe workaround in this situation is to call the `resume()` method to\ntrigger \"old mode\" behavior:\n\n```javascript\n// Workaround\nnet.createServer(function(socket) {\n\n socket.on('end', function() {\n socket.end('I got your message (but didnt read it)\\n');\n });\n\n // start the flow of data, discarding it.\n socket.resume();\n\n}).listen(1337);\n```\n\nIn addition to new Readable streams switching into old-mode, pre-v0.10\nstyle streams can be wrapped in a Readable class using the `wrap()`\nmethod.\n\n## Class: stream.Readable\n\n<!--type=class-->\n\nA `Readable Stream` has the following methods, members, and events.\n\nNote that `stream.Readable` is an abstract class designed to be\nextended with an underlying implementation of the `_read(size)`\nmethod. (See below.)\n\n### new stream.Readable([options])\n\n* `options` {Object}\n * `highWaterMark` {Number} The maximum number of bytes to store in\n the internal buffer before ceasing to read from the underlying\n resource. Default=16kb\n * `encoding` {String} If specified, then buffers will be decoded to\n strings using the specified encoding. Default=null\n * `objectMode` {Boolean} Whether this stream should behave\n as a stream of objects. Meaning that stream.read(n) returns\n a single value instead of a Buffer of size n\n\nIn classes that extend the Readable class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### readable.\\_read(size)\n\n* `size` {Number} Number of bytes to read asynchronously\n\nNote: **This function should NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Readable\nclass methods only.\n\nAll Readable stream implementations must provide a `_read` method\nto fetch data from the underlying resource.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\nWhen data is available, put it into the read queue by calling\n`readable.push(chunk)`. If `push` returns false, then you should stop\nreading. When `_read` is called again, you should start pushing more\ndata.\n\nThe `size` argument is advisory. Implementations where a \"read\" is a\nsingle call that returns data can use this to know how much data to\nfetch. Implementations where that is not relevant, such as TCP or\nTLS, may ignore this argument, and simply provide data whenever it\nbecomes available. There is no need, for example to \"wait\" until\n`size` bytes are available before calling `stream.push(chunk)`.\n\n### readable.push(chunk)\n\n* `chunk` {Buffer | null | String} Chunk of data to push into the read queue\n* return {Boolean} Whether or not more pushes should be performed\n\nNote: **This function should be called by Readable implementors, NOT\nby consumers of Readable subclasses.** The `_read()` function will not\nbe called again until at least one `push(chunk)` call is made. If no\ndata is available, then you MAY call `push('')` (an empty string) to\nallow a future `_read` call, without adding any data to the queue.\n\nThe `Readable` class works by putting data into a read queue to be\npulled out later by calling the `read()` method when the `'readable'`\nevent fires.\n\nThe `push()` method will explicitly insert some data into the read\nqueue. If it is called with `null` then it will signal the end of the\ndata.\n\nIn some cases, you may be wrapping a lower-level source which has some\nsort of pause/resume mechanism, and a data callback. In those cases,\nyou could wrap the low-level source object by doing something like\nthis:\n\n```javascript\n// source is an object with readStop() and readStart() methods,\n// and an `ondata` member that gets called when it has data, and\n// an `onend` member that gets called when the data is over.\n\nvar stream = new Readable();\n\nsource.ondata = function(chunk) {\n // if push() returns false, then we need to stop reading from source\n if (!stream.push(chunk))\n source.readStop();\n};\n\nsource.onend = function() {\n stream.push(null);\n};\n\n// _read will be called when the stream wants to pull more data in\n// the advisory size argument is ignored in this case.\nstream._read = function(n) {\n source.readStart();\n};\n```\n\n### readable.unshift(chunk)\n\n* `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue\n* return {Boolean} Whether or not more pushes should be performed\n\nThis is the corollary of `readable.push(chunk)`. Rather than putting\nthe data at the *end* of the read queue, it puts it at the *front* of\nthe read queue.\n\nThis is useful in certain use-cases where a stream is being consumed\nby a parser, which needs to \"un-consume\" some data that it has\noptimistically pulled out of the source.\n\n```javascript\n// A parser for a simple data protocol.\n// The \"header\" is a JSON object, followed by 2 \\n characters, and\n// then a message body.\n//\n// Note: This can be done more simply as a Transform stream. See below.\n\nfunction SimpleProtocol(source, options) {\n if (!(this instanceof SimpleProtocol))\n return new SimpleProtocol(options);\n\n Readable.call(this, options);\n this._inBody = false;\n this._sawFirstCr = false;\n\n // source is a readable stream, such as a socket or file\n this._source = source;\n\n var self = this;\n source.on('end', function() {\n self.push(null);\n });\n\n // give it a kick whenever the source is readable\n // read(0) will not consume any bytes\n source.on('readable', function() {\n self.read(0);\n });\n\n this._rawHeader = [];\n this.header = null;\n}\n\nSimpleProtocol.prototype = Object.create(\n Readable.prototype, { constructor: { value: SimpleProtocol }});\n\nSimpleProtocol.prototype._read = function(n) {\n if (!this._inBody) {\n var chunk = this._source.read();\n\n // if the source doesn't have data, we don't have data yet.\n if (chunk === null)\n return this.push('');\n\n // check if the chunk has a \\n\\n\n var split = -1;\n for (var i = 0; i < chunk.length; i++) {\n if (chunk[i] === 10) { // '\\n'\n if (this._sawFirstCr) {\n split = i;\n break;\n } else {\n this._sawFirstCr = true;\n }\n } else {\n this._sawFirstCr = false;\n }\n }\n\n if (split === -1) {\n // still waiting for the \\n\\n\n // stash the chunk, and try again.\n this._rawHeader.push(chunk);\n this.push('');\n } else {\n this._inBody = true;\n var h = chunk.slice(0, split);\n this._rawHeader.push(h);\n var header = Buffer.concat(this._rawHeader).toString();\n try {\n this.header = JSON.parse(header);\n } catch (er) {\n this.emit('error', new Error('invalid simple protocol data'));\n return;\n }\n // now, because we got some extra data, unshift the rest\n // back into the read queue so that our consumer will see it.\n var b = chunk.slice(split);\n this.unshift(b);\n\n // and let them know that we are done parsing the header.\n this.emit('header', this.header);\n }\n } else {\n // from there on, just provide the data to our consumer.\n // careful not to push(null), since that would indicate EOF.\n var chunk = this._source.read();\n if (chunk) this.push(chunk);\n }\n};\n\n// Usage:\nvar parser = new SimpleProtocol(source);\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.\n```\n\n### readable.wrap(stream)\n\n* `stream` {Stream} An \"old style\" readable stream\n\nIf you are using an older Node library that emits `'data'` events and\nhas a `pause()` method that is advisory only, then you can use the\n`wrap()` method to create a Readable stream that uses the old stream\nas its data source.\n\nFor example:\n\n```javascript\nvar OldReader = require('./old-api-module.js').OldReader;\nvar oreader = new OldReader;\nvar Readable = require('stream').Readable;\nvar myReader = new Readable().wrap(oreader);\n\nmyReader.on('readable', function() {\n myReader.read(); // etc.\n});\n```\n\n### Event: 'readable'\n\nWhen there is data ready to be consumed, this event will fire.\n\nWhen this event emits, call the `read()` method to consume the data.\n\n### Event: 'end'\n\nEmitted when the stream has received an EOF (FIN in TCP terminology).\nIndicates that no more `'data'` events will happen. If the stream is\nalso writable, it may be possible to continue writing.\n\n### Event: 'data'\n\nThe `'data'` event emits either a `Buffer` (by default) or a string if\n`setEncoding()` was used.\n\nNote that adding a `'data'` event listener will switch the Readable\nstream into \"old mode\", where data is emitted as soon as it is\navailable, rather than waiting for you to call `read()` to consume it.\n\n### Event: 'error'\n\nEmitted if there was an error receiving data.\n\n### Event: 'close'\n\nEmitted when the underlying resource (for example, the backing file\ndescriptor) has been closed. Not all streams will emit this.\n\n### readable.setEncoding(encoding)\n\nMakes the `'data'` event emit a string instead of a `Buffer`. `encoding`\ncan be `'utf8'`, `'utf16le'` (`'ucs2'`), `'ascii'`, or `'hex'`.\n\nThe encoding can also be set by specifying an `encoding` field to the\nconstructor.\n\n### readable.read([size])\n\n* `size` {Number | null} Optional number of bytes to read.\n* Return: {Buffer | String | null}\n\nNote: **This function SHOULD be called by Readable stream users.**\n\nCall this method to consume data once the `'readable'` event is\nemitted.\n\nThe `size` argument will set a minimum number of bytes that you are\ninterested in. If not set, then the entire content of the internal\nbuffer is returned.\n\nIf there is no data to consume, or if there are fewer bytes in the\ninternal buffer than the `size` argument, then `null` is returned, and\na future `'readable'` event will be emitted when more is available.\n\nCalling `stream.read(0)` will always return `null`, and will trigger a\nrefresh of the internal buffer, but otherwise be a no-op.\n\n### readable.pipe(destination, [options])\n\n* `destination` {Writable Stream}\n* `options` {Object} Optional\n * `end` {Boolean} Default=true\n\nConnects this readable stream to `destination` WriteStream. Incoming\ndata on this stream gets written to `destination`. Properly manages\nback-pressure so that a slow destination will not be overwhelmed by a\nfast readable stream.\n\nThis function returns the `destination` stream.\n\nFor example, emulating the Unix `cat` command:\n\n process.stdin.pipe(process.stdout);\n\nBy default `end()` is called on the destination when the source stream\nemits `end`, so that `destination` is no longer writable. Pass `{ end:\nfalse }` as `options` to keep the destination stream open.\n\nThis keeps `writer` open so that \"Goodbye\" can be written at the\nend.\n\n reader.pipe(writer, { end: false });\n reader.on(\"end\", function() {\n writer.end(\"Goodbye\\n\");\n });\n\nNote that `process.stderr` and `process.stdout` are never closed until\nthe process exits, regardless of the specified options.\n\n### readable.unpipe([destination])\n\n* `destination` {Writable Stream} Optional\n\nUndo a previously established `pipe()`. If no destination is\nprovided, then all previously established pipes are removed.\n\n### readable.pause()\n\nSwitches the readable stream into \"old mode\", where data is emitted\nusing a `'data'` event rather than being buffered for consumption via\nthe `read()` method.\n\nCeases the flow of data. No `'data'` events are emitted while the\nstream is in a paused state.\n\n### readable.resume()\n\nSwitches the readable stream into \"old mode\", where data is emitted\nusing a `'data'` event rather than being buffered for consumption via\nthe `read()` method.\n\nResumes the incoming `'data'` events after a `pause()`.\n\n\n## Class: stream.Writable\n\n<!--type=class-->\n\nA `Writable` Stream has the following methods, members, and events.\n\nNote that `stream.Writable` is an abstract class designed to be\nextended with an underlying implementation of the\n`_write(chunk, encoding, cb)` method. (See below.)\n\n### new stream.Writable([options])\n\n* `options` {Object}\n * `highWaterMark` {Number} Buffer level when `write()` starts\n returning false. Default=16kb\n * `decodeStrings` {Boolean} Whether or not to decode strings into\n Buffers before passing them to `_write()`. Default=true\n\nIn classes that extend the Writable class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### writable.\\_write(chunk, encoding, callback)\n\n* `chunk` {Buffer | String} The chunk to be written. Will always\n be a buffer unless the `decodeStrings` option was set to `false`.\n* `encoding` {String} If the chunk is a string, then this is the\n encoding type. Ignore chunk is a buffer. Note that chunk will\n **always** be a buffer unless the `decodeStrings` option is\n explicitly set to `false`.\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done processing the supplied chunk.\n\nAll Writable stream implementations must provide a `_write` method to\nsend data to the underlying resource.\n\nNote: **This function MUST NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Writable\nclass methods only.\n\nCall the callback using the standard `callback(error)` pattern to\nsignal that the write completed successfully or with an error.\n\nIf the `decodeStrings` flag is set in the constructor options, then\n`chunk` may be a string rather than a Buffer, and `encoding` will\nindicate the sort of string that it is. This is to support\nimplementations that have an optimized handling for certain string\ndata encodings. If you do not explicitly set the `decodeStrings`\noption to `false`, then you can safely ignore the `encoding` argument,\nand assume that `chunk` will always be a Buffer.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n\n### writable.write(chunk, [encoding], [callback])\n\n* `chunk` {Buffer | String} Data to be written\n* `encoding` {String} Optional. If `chunk` is a string, then encoding\n defaults to `'utf8'`\n* `callback` {Function} Optional. Called when this chunk is\n successfully written.\n* Returns {Boolean}\n\nWrites `chunk` to the stream. Returns `true` if the data has been\nflushed to the underlying resource. Returns `false` to indicate that\nthe buffer is full, and the data will be sent out in the future. The\n`'drain'` event will indicate when the buffer is empty again.\n\nThe specifics of when `write()` will return false, is determined by\nthe `highWaterMark` option provided to the constructor.\n\n### writable.end([chunk], [encoding], [callback])\n\n* `chunk` {Buffer | String} Optional final data to be written\n* `encoding` {String} Optional. If `chunk` is a string, then encoding\n defaults to `'utf8'`\n* `callback` {Function} Optional. Called when the final chunk is\n successfully written.\n\nCall this method to signal the end of the data being written to the\nstream.\n\n### Event: 'drain'\n\nEmitted when the stream's write queue empties and it's safe to write\nwithout buffering again. Listen for it when `stream.write()` returns\n`false`.\n\n### Event: 'close'\n\nEmitted when the underlying resource (for example, the backing file\ndescriptor) has been closed. Not all streams will emit this.\n\n### Event: 'finish'\n\nWhen `end()` is called and there are no more chunks to write, this\nevent is emitted.\n\n### Event: 'pipe'\n\n* `source` {Readable Stream}\n\nEmitted when the stream is passed to a readable stream's pipe method.\n\n### Event 'unpipe'\n\n* `source` {Readable Stream}\n\nEmitted when a previously established `pipe()` is removed using the\nsource Readable stream's `unpipe()` method.\n\n## Class: stream.Duplex\n\n<!--type=class-->\n\nA \"duplex\" stream is one that is both Readable and Writable, such as a\nTCP socket connection.\n\nNote that `stream.Duplex` is an abstract class designed to be\nextended with an underlying implementation of the `_read(size)`\nand `_write(chunk, encoding, callback)` methods as you would with a Readable or\nWritable stream class.\n\nSince JavaScript doesn't have multiple prototypal inheritance, this\nclass prototypally inherits from Readable, and then parasitically from\nWritable. It is thus up to the user to implement both the lowlevel\n`_read(n)` method as well as the lowlevel `_write(chunk, encoding, cb)` method\non extension duplex classes.\n\n### new stream.Duplex(options)\n\n* `options` {Object} Passed to both Writable and Readable\n constructors. Also has the following fields:\n * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then\n the stream will automatically end the readable side when the\n writable side ends and vice versa.\n\nIn classes that extend the Duplex class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n## Class: stream.Transform\n\nA \"transform\" stream is a duplex stream where the output is causally\nconnected in some way to the input, such as a zlib stream or a crypto\nstream.\n\nThere is no requirement that the output be the same size as the input,\nthe same number of chunks, or arrive at the same time. For example, a\nHash stream will only ever have a single chunk of output which is\nprovided when the input is ended. A zlib stream will either produce\nmuch smaller or much larger than its input.\n\nRather than implement the `_read()` and `_write()` methods, Transform\nclasses must implement the `_transform()` method, and may optionally\nalso implement the `_flush()` method. (See below.)\n\n### new stream.Transform([options])\n\n* `options` {Object} Passed to both Writable and Readable\n constructors.\n\nIn classes that extend the Transform class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### transform.\\_transform(chunk, encoding, callback)\n\n* `chunk` {Buffer | String} The chunk to be transformed. Will always\n be a buffer unless the `decodeStrings` option was set to `false`.\n* `encoding` {String} If the chunk is a string, then this is the\n encoding type. (Ignore if `decodeStrings` chunk is a buffer.)\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done processing the supplied chunk.\n\nNote: **This function MUST NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Transform\nclass methods only.\n\nAll Transform stream implementations must provide a `_transform`\nmethod to accept input and produce output.\n\n`_transform` should do whatever has to be done in this specific\nTransform class, to handle the bytes being written, and pass them off\nto the readable portion of the interface. Do asynchronous I/O,\nprocess things, and so on.\n\nCall `transform.push(outputChunk)` 0 or more times to generate output\nfrom this input chunk, depending on how much data you want to output\nas a result of this chunk.\n\nCall the callback function only when the current chunk is completely\nconsumed. Note that there may or may not be output as a result of any\nparticular input chunk.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n### transform.\\_flush(callback)\n\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done flushing any remaining data.\n\nNote: **This function MUST NOT be called directly.** It MAY be implemented\nby child classes, and if so, will be called by the internal Transform\nclass methods only.\n\nIn some cases, your transform operation may need to emit a bit more\ndata at the end of the stream. For example, a `Zlib` compression\nstream will store up some internal state so that it can optimally\ncompress the output. At the end, however, it needs to do the best it\ncan with what is left, so that the data will be complete.\n\nIn those cases, you can implement a `_flush` method, which will be\ncalled at the very end, after all the written data is consumed, but\nbefore emitting `end` to signal the end of the readable side. Just\nlike with `_transform`, call `transform.push(chunk)` zero or more\ntimes, as appropriate, and call `callback` when the flush operation is\ncomplete.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n### Example: `SimpleProtocol` parser\n\nThe example above of a simple protocol parser can be implemented much\nmore simply by using the higher level `Transform` stream class.\n\nIn this example, rather than providing the input as an argument, it\nwould be piped into the parser, which is a more idiomatic Node stream\napproach.\n\n```javascript\nfunction SimpleProtocol(options) {\n if (!(this instanceof SimpleProtocol))\n return new SimpleProtocol(options);\n\n Transform.call(this, options);\n this._inBody = false;\n this._sawFirstCr = false;\n this._rawHeader = [];\n this.header = null;\n}\n\nSimpleProtocol.prototype = Object.create(\n Transform.prototype, { constructor: { value: SimpleProtocol }});\n\nSimpleProtocol.prototype._transform = function(chunk, encoding, done) {\n if (!this._inBody) {\n // check if the chunk has a \\n\\n\n var split = -1;\n for (var i = 0; i < chunk.length; i++) {\n if (chunk[i] === 10) { // '\\n'\n if (this._sawFirstCr) {\n split = i;\n break;\n } else {\n this._sawFirstCr = true;\n }\n } else {\n this._sawFirstCr = false;\n }\n }\n\n if (split === -1) {\n // still waiting for the \\n\\n\n // stash the chunk, and try again.\n this._rawHeader.push(chunk);\n } else {\n this._inBody = true;\n var h = chunk.slice(0, split);\n this._rawHeader.push(h);\n var header = Buffer.concat(this._rawHeader).toString();\n try {\n this.header = JSON.parse(header);\n } catch (er) {\n this.emit('error', new Error('invalid simple protocol data'));\n return;\n }\n // and let them know that we are done parsing the header.\n this.emit('header', this.header);\n\n // now, because we got some extra data, emit this first.\n this.push(b);\n }\n } else {\n // from there on, just provide the data to our consumer as-is.\n this.push(b);\n }\n done();\n};\n\nvar parser = new SimpleProtocol();\nsource.pipe(parser)\n\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.\n```\n\n\n## Class: stream.PassThrough\n\nThis is a trivial implementation of a `Transform` stream that simply\npasses the input bytes across to the output. Its purpose is mainly\nfor examples and testing, but there are occasionally use cases where\nit can come in handy.\n\n\n[EventEmitter]: events.html#events_class_events_eventemitter\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/readable-stream/issues" - }, - "homepage": "https://github.com/isaacs/readable-stream", - "_id": "readable-stream@1.0.25", - "dist": { - "shasum": "3d234b55fd2a25db8327618f088e50a32044df50" - }, - "_from": "readable-stream@~1.0.17", - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.25.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/passthrough.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/readable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/readable.js deleted file mode 100644 index 4d1ddfc7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,6 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/transform.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f07..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/writable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efdf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/LICENCE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/LICENCE deleted file mode 100644 index a23e08a8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 Raynos. - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/Makefile deleted file mode 100644 index d583fcf4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -browser: - node ./support/compile - -.PHONY: browser \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/README.md deleted file mode 100644 index 389adae3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# xtend - -[![browser support][3]][4] - -Extend like a boss - -xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence. - -## Examples - -```js -var extend = require("xtend") - -var combination = extend({ - a: "a" -}, { - b: "b" -}) -// { a: "a", b: "b" } -``` - - -## MIT Licenced - - - [3]: http://ci.testling.com/Raynos/xtend.png - [4]: http://ci.testling.com/Raynos/xtend diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/has-keys.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/has-keys.js deleted file mode 100644 index 62391e78..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/has-keys.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = hasKeys - -function hasKeys(source) { - return source !== null && - (typeof source === "object" || - typeof source === "function") -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/index.js deleted file mode 100644 index 20937d19..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/index.js +++ /dev/null @@ -1,25 +0,0 @@ -var Keys = require("object-keys") -var hasKeys = require("./has-keys") - -module.exports = extend - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - if (!hasKeys(source)) { - continue - } - - var keys = Keys(source) - - for (var j = 0; j < keys.length; j++) { - var name = keys[j] - target[name] = source[name] - } - } - - return target -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/mutable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/mutable.js deleted file mode 100644 index 17454ae4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/mutable.js +++ /dev/null @@ -1,25 +0,0 @@ -var Keys = require("object-keys") -var hasKeys = require("./has-keys") - -module.exports = extend - -function extend(target) { - var sources = [].slice.call(arguments, 1) - - for (var i = 0; i < sources.length; i++) { - var source = sources[i] - - if (!hasKeys(source)) { - continue - } - - var keys = Keys(source) - - for (var j = 0; j < keys.length; j++) { - var name = keys[j] - target[name] = source[name] - } - } - - return target -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml deleted file mode 100644 index 60d00ce1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.8" - - "0.6" diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md deleted file mode 100644 index ab32d0ad..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md +++ /dev/null @@ -1,39 +0,0 @@ -#object-keys <sup>[![Version Badge][2]][1]</sup> - -[![Build Status][3]][4] [![dependency status][5]][6] - -[![browser support][7]][8] - -An Object.keys shim. Uses Object.keys if available. - -## Example - -```js -var keys = require('object-keys'); -var assert = require('assert'); -var obj = { - a: true, - b: true, - c: true -}; - -assert.equal(keys(obj), ['a', 'b', 'c']); -``` - -## Source -Implementation taken directly from [es5-shim]([9]), with modifications, including from [lodash]([10]). - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[1]: https://npmjs.org/package/object-keys -[2]: http://vb.teelaun.ch/ljharb/object-keys.svg -[3]: https://travis-ci.org/ljharb/object-keys.png -[4]: https://travis-ci.org/ljharb/object-keys -[5]: https://david-dm.org/ljharb/object-keys.png -[6]: https://david-dm.org/ljharb/object-keys -[7]: https://ci.testling.com/ljharb/object-keys.png -[8]: https://ci.testling.com/ljharb/object-keys -[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589 -[10]: https://github.com/bestiejs/lodash - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js deleted file mode 100644 index db32d458..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js +++ /dev/null @@ -1,40 +0,0 @@ -var hasOwn = Object.prototype.hasOwnProperty; -var toString = Object.prototype.toString; - -var isFunction = function (fn) { - var isFunc = (typeof fn === 'function' && !(fn instanceof RegExp)) || toString.call(fn) === '[object Function]'; - if (!isFunc && typeof window !== 'undefined') { - isFunc = fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt; - } - return isFunc; -}; - -module.exports = function forEach(obj, fn) { - if (!isFunction(fn)) { - throw new TypeError('iterator must be a function'); - } - var i, k, - isString = typeof obj === 'string', - l = obj.length, - context = arguments.length > 2 ? arguments[2] : null; - if (l === +l) { - for (i = 0; i < l; i++) { - if (context === null) { - fn(isString ? obj.charAt(i) : obj[i], i, obj); - } else { - fn.call(context, isString ? obj.charAt(i) : obj[i], i, obj); - } - } - } else { - for (k in obj) { - if (hasOwn.call(obj, k)) { - if (context === null) { - fn(obj[k], k, obj); - } else { - fn.call(context, obj[k], k, obj); - } - } - } - } -}; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js deleted file mode 100644 index f5b24b6d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js +++ /dev/null @@ -1,2 +0,0 @@ -module.exports = Object.keys || require('./shim'); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js deleted file mode 100644 index 74a09897..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js +++ /dev/null @@ -1,16 +0,0 @@ -var toString = Object.prototype.toString; - -module.exports = function isArguments(value) { - var str = toString.call(value); - var isArguments = str === '[object Arguments]'; - if (!isArguments) { - isArguments = str !== '[object Array]' - && value !== null - && typeof value === 'object' - && typeof value.length === 'number' - && value.length >= 0 - && toString.call(value.callee) === '[object Function]'; - } - return isArguments; -}; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json deleted file mode 100644 index 9dfda8dc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "object-keys", - "version": "0.4.0", - "author": { - "name": "Jordan Harband" - }, - "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/kriskowal/es5-shim", - "license": "MIT", - "main": "index.js", - "scripts": { - "test": "node test/index.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/ljharb/object-keys.git" - }, - "keywords": [ - "Object.keys", - "keys", - "ES5", - "shim" - ], - "dependencies": {}, - "devDependencies": { - "foreach": "~2.0.3", - "is": "~0.2.6", - "tape": "~1.0.4", - "indexof": "~0.0.1" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "readme": "#object-keys <sup>[![Version Badge][2]][1]</sup>\n\n[![Build Status][3]][4] [![dependency status][5]][6]\n\n[![browser support][7]][8]\n\nAn Object.keys shim. Uses Object.keys if available.\n\n## Example\n\n```js\nvar keys = require('object-keys');\nvar assert = require('assert');\nvar obj = {\n\ta: true,\n\tb: true,\n\tc: true\n};\n\nassert.equal(keys(obj), ['a', 'b', 'c']);\n```\n\n## Source\nImplementation taken directly from [es5-shim]([9]), with modifications, including from [lodash]([10]).\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[1]: https://npmjs.org/package/object-keys\n[2]: http://vb.teelaun.ch/ljharb/object-keys.svg\n[3]: https://travis-ci.org/ljharb/object-keys.png\n[4]: https://travis-ci.org/ljharb/object-keys\n[5]: https://david-dm.org/ljharb/object-keys.png\n[6]: https://david-dm.org/ljharb/object-keys\n[7]: https://ci.testling.com/ljharb/object-keys.png\n[8]: https://ci.testling.com/ljharb/object-keys\n[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589\n[10]: https://github.com/bestiejs/lodash\n\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/ljharb/object-keys/issues" - }, - "homepage": "https://github.com/ljharb/object-keys", - "_id": "object-keys@0.4.0", - "dist": { - "shasum": "28a6aae7428dd2c3a92f3d95f21335dd204e0336" - }, - "_from": "object-keys@~0.4.0", - "_resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js deleted file mode 100644 index b88421be..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js +++ /dev/null @@ -1,62 +0,0 @@ -(function () { - "use strict"; - - // modified from https://github.com/kriskowal/es5-shim - var has = Object.prototype.hasOwnProperty, - toString = Object.prototype.toString, - forEach = require('./foreach'), - isArgs = require('./isArguments'), - hasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'), - hasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype'), - dontEnums = [ - "toString", - "toLocaleString", - "valueOf", - "hasOwnProperty", - "isPrototypeOf", - "propertyIsEnumerable", - "constructor" - ], - keysShim; - - keysShim = function keys(object) { - var isObject = object !== null && typeof object === 'object', - isFunction = toString.call(object) === '[object Function]', - isArguments = isArgs(object), - theKeys = []; - - if (!isObject && !isFunction && !isArguments) { - throw new TypeError("Object.keys called on a non-object"); - } - - if (isArguments) { - forEach(object, function (value) { - theKeys.push(value); - }); - } else { - var name, - skipProto = hasProtoEnumBug && isFunction; - - for (name in object) { - if (!(skipProto && name === 'prototype') && has.call(object, name)) { - theKeys.push(name); - } - } - } - - if (hasDontEnumBug) { - var ctor = object.constructor, - skipConstructor = ctor && ctor.prototype === object; - - forEach(dontEnums, function (dontEnum) { - if (!(skipConstructor && dontEnum === 'constructor') && has.call(object, dontEnum)) { - theKeys.push(dontEnum); - } - }); - } - return theKeys; - }; - - module.exports = keysShim; -}()); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js deleted file mode 100644 index f29f065a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js +++ /dev/null @@ -1,156 +0,0 @@ -var test = require('tape'); -var forEach = require('../foreach.js'); - -test('second argument: iterator', function (t) { - var arr = []; - t.throws(function () { forEach(arr); }, TypeError, 'undefined is not a function'); - t.throws(function () { forEach(arr, null); }, TypeError, 'null is not a function'); - t.throws(function () { forEach(arr, ''); }, TypeError, 'string is not a function'); - t.throws(function () { forEach(arr, /a/); }, TypeError, 'regex is not a function'); - t.throws(function () { forEach(arr, true); }, TypeError, 'true is not a function'); - t.throws(function () { forEach(arr, false); }, TypeError, 'false is not a function'); - t.throws(function () { forEach(arr, NaN); }, TypeError, 'NaN is not a function'); - t.throws(function () { forEach(arr, 42); }, TypeError, '42 is not a function'); - t.doesNotThrow(function () { forEach(arr, function () {}); }, 'function is a function'); - t.doesNotThrow(function () { forEach(arr, setTimeout); }, 'setTimeout is a function'); - if (typeof window !== 'undefined') { - t.doesNotThrow(function () { forEach(arr, window.alert); }, 'alert is a function'); - } - t.end(); -}); - -test('array', function (t) { - var arr = [1, 2, 3]; - - t.test('iterates over every item', function (st) { - var index = 0; - forEach(arr, function () { index += 1; }); - st.equal(index, arr.length, 'iterates ' + arr.length + ' times'); - st.end(); - }); - - t.test('first iterator argument', function (st) { - var index = 0; - st.plan(arr.length); - forEach(arr, function (item) { - st.equal(arr[index], item, 'item ' + index + ' is passed as first argument'); - index += 1; - }); - st.end(); - }); - - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(arr.length); - forEach(arr, function (item, index) { - st.equal(counter, index, 'index ' + index + ' is passed as second argument'); - counter += 1; - }); - st.end(); - }); - - t.test('third iterator argument', function (st) { - st.plan(arr.length); - forEach(arr, function (item, index, array) { - st.deepEqual(arr, array, 'array is passed as third argument'); - }); - st.end(); - }); - - t.test('context argument', function (st) { - var context = {}; - st.plan(arr.length); - forEach(arr, function () { - st.equal(this, context, '"this" is the passed context'); - }, context); - st.end(); - }); - - t.end(); -}); - -test('object', function (t) { - var obj = { - a: 1, - b: 2, - c: 3 - }; - var keys = ['a', 'b', 'c']; - - var F = function () { - this.a = 1; - this.b = 2; - }; - F.prototype.c = 3; - var fKeys = ['a', 'b']; - - t.test('iterates over every object literal key', function (st) { - var counter = 0; - forEach(obj, function () { counter += 1; }); - st.equal(counter, keys.length, 'iterated ' + counter + ' times'); - st.end(); - }); - - t.test('iterates only over own keys', function (st) { - var counter = 0; - forEach(new F(), function () { counter += 1; }); - st.equal(counter, fKeys.length, 'iterated ' + fKeys.length + ' times'); - st.end(); - }); - - t.test('first iterator argument', function (st) { - var index = 0; - st.plan(keys.length); - forEach(obj, function (item) { - st.equal(obj[keys[index]], item, 'item at key ' + keys[index] + ' is passed as first argument'); - index += 1; - }); - st.end(); - }); - - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(keys.length); - forEach(obj, function (item, key) { - st.equal(keys[counter], key, 'key ' + key + ' is passed as second argument'); - counter += 1; - }); - st.end(); - }); - - t.test('third iterator argument', function (st) { - st.plan(keys.length); - forEach(obj, function (item, key, object) { - st.deepEqual(obj, object, 'object is passed as third argument'); - }); - st.end(); - }); - - t.test('context argument', function (st) { - var context = {}; - st.plan(1); - forEach({foo: 'bar'}, function () { - st.equal(this, context, '"this" is the passed context'); - }, context); - st.end(); - }); - - t.end(); -}); - - -test('string', function (t) { - var str = 'str'; - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(str.length * 2 + 1); - forEach(str, function (item, index) { - st.equal(counter, index, 'index ' + index + ' is passed as second argument'); - st.equal(str.charAt(index), item); - counter += 1; - }); - st.equal(counter, str.length, 'iterates ' + str.length + ' times'); - }); - t.end(); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js deleted file mode 100644 index 8b77b1fc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js +++ /dev/null @@ -1,6 +0,0 @@ - -require('./foreach'); -require('./isArguments'); - -require('./shim'); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js deleted file mode 100644 index 62a07c2d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js +++ /dev/null @@ -1,10 +0,0 @@ -var test = require('tape'); -var isArguments = require('../isArguments'); - -test('is.arguments', function (t) { - t.notOk(isArguments([]), 'array is not arguments'); - (function () { t.ok(isArguments(arguments), 'arguments is arguments'); }()); - (function () { t.notOk(isArguments(Array.prototype.slice.call(arguments)), 'sliced arguments is not arguments'); }()); - t.end(); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js deleted file mode 100644 index 9d932712..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js +++ /dev/null @@ -1,134 +0,0 @@ -var test = require('tape'); -var shimmedKeys = require('../index.js'); -var is = require('is'); -var keys = require('../shim.js'); -var forEach = require('foreach'); -var indexOf = require('indexof'); - -var obj = { - "str": "boz", - "obj": {}, - "arr": [], - "bool": true, - "num": 42, - "aNull": null, - "undef": undefined -}; -var objKeys = ['str', 'obj', 'arr', 'bool', 'num', 'aNull', 'undef']; - -test('exports a function', function (t) { - if (Object.keys) { - t.equal(Object.keys, shimmedKeys, 'Object.keys is supported and exported'); - } else { - t.equal(keys, shimmedKeys, 'Object.keys is not supported; shim is exported'); - } - t.end(); -}); - -test('working with actual shim', function (t) { - t.notEqual(Object.keys, keys, 'keys shim is not native Object.keys'); - t.end(); -}); - -test('works with an object literal', function (t) { - var theKeys = keys(obj); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, objKeys, 'Object has expected keys'); - t.end(); -}); - -test('works with an array', function (t) { - var arr = [1, 2, 3]; - var theKeys = keys(arr); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, ['0', '1', '2'], 'Array has expected keys'); - t.end(); -}); - -test('works with a function', function (t) { - var foo = function () {}; - foo.a = true; - - t.doesNotThrow(function () { return keys(foo); }, 'does not throw an error'); - t.deepEqual(keys(foo), ['a'], 'returns expected keys'); - t.end(); -}); - -test('returns names which are own properties', function (t) { - forEach(keys(obj), function (name) { - t.equal(obj.hasOwnProperty(name), true, name + ' should be returned'); - }); - t.end(); -}); - -test('returns names which are enumerable', function (t) { - var k, loopedValues = []; - for (k in obj) { - loopedValues.push(k); - } - forEach(keys(obj), function (name) { - t.notEqual(indexOf(loopedValues, name), -1, name + ' is not enumerable'); - }); - t.end(); -}); - -test('throws an error for a non-object', function (t) { - t.throws( - function () { return keys(42); }, - new TypeError('Object.keys called on a non-object'), - 'throws on a non-object' - ); - t.end(); -}); - -test('works with an object instance', function (t) { - var Prototype = function () {}; - Prototype.prototype.foo = true; - var obj = new Prototype(); - obj.bar = true; - var theKeys = keys(obj); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, ['bar'], 'Instance has expected keys'); - t.end(); -}); - -test('works in iOS 5 mobile Safari', function (t) { - var Foo = function () {}; - Foo.a = function () {}; - - // the bug is keys(Foo) => ['a', 'prototype'] instead of ['a'] - t.deepEqual(keys(Foo), ['a'], 'has expected keys'); - t.end(); -}); - -test('works in environments with the dontEnum bug (IE < 9)', function (t) { - var Foo = function () {}; - Foo.prototype.a = function () {}; - - // the bug is keys(Foo.prototype) => ['a', 'constructor'] instead of ['a'] - t.deepEqual(keys(Foo.prototype), ['a'], 'has expected keys'); - t.end(); -}); - -test('shadowed properties', function (t) { - var shadowedProps = [ - 'dummyControlProp', /* just to be sure */ - 'constructor', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'toLocaleString', - 'toString', - 'valueOf' - ]; - shadowedProps.sort(); - var shadowedObject = {}; - forEach(shadowedProps, function (value, index) { - shadowedObject[value] = index; - }); - var shadowedObjectKeys = keys(shadowedObject); - shadowedObjectKeys.sort(); - t.deepEqual(shadowedObjectKeys, shadowedProps, 'troublesome shadowed properties are keys of object literals'); - t.end(); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/package.json deleted file mode 100644 index a761197d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "xtend", - "version": "2.1.2", - "description": "extend like a boss", - "keywords": [ - "extend", - "merge", - "options", - "opts", - "object", - "array" - ], - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Raynos/xtend.git" - }, - "main": "index", - "scripts": { - "test": "node test" - }, - "dependencies": { - "object-keys": "~0.4.0" - }, - "devDependencies": { - "tape": "~1.1.0" - }, - "homepage": "https://github.com/Raynos/xtend", - "contributors": [ - { - "name": "Jake Verbaten" - }, - { - "name": "Matt Esch" - } - ], - "bugs": { - "url": "https://github.com/Raynos/xtend/issues", - "email": "raynos2@gmail.com" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/raynos/xtend/raw/master/LICENSE" - } - ], - "testling": { - "files": "test.js", - "browsers": [ - "ie/7..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "engines": { - "node": ">=0.4" - }, - "readme": "# xtend\n\n[![browser support][3]][4]\n\nExtend like a boss\n\nxtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence.\n\n## Examples\n\n```js\nvar extend = require(\"xtend\")\n\nvar combination = extend({\n a: \"a\"\n}, {\n b: \"b\"\n})\n// { a: \"a\", b: \"b\" }\n```\n\n\n## MIT Licenced\n\n\n [3]: http://ci.testling.com/Raynos/xtend.png\n [4]: http://ci.testling.com/Raynos/xtend\n", - "readmeFilename": "README.md", - "_id": "xtend@2.1.2", - "dist": { - "shasum": "5e8f75d1b0d9ca976fee0f1aa88f80c7619210d5" - }, - "_from": "xtend@~2.1.1", - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/test.js deleted file mode 100644 index 3369d796..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/test.js +++ /dev/null @@ -1,63 +0,0 @@ -var test = require("tape") -var extend = require("./") -var mutableExtend = require("./mutable") - -test("merge", function(assert) { - var a = { a: "foo" } - var b = { b: "bar" } - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("replace", function(assert) { - var a = { a: "foo" } - var b = { a: "bar" } - - assert.deepEqual(extend(a, b), { a: "bar" }) - assert.end() -}) - -test("undefined", function(assert) { - var a = { a: undefined } - var b = { b: "foo" } - - assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) - assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) - assert.end() -}) - -test("handle 0", function(assert) { - var a = { a: "default" } - var b = { a: 0 } - - assert.deepEqual(extend(a, b), { a: 0 }) - assert.deepEqual(extend(b, a), { a: "default" }) - assert.end() -}) - -test("is immutable", function (assert) { - var record = {} - - extend(record, { foo: "bar" }) - assert.equal(record.foo, undefined) - assert.end() -}) - -test("null as argument", function (assert) { - var a = { foo: "bar" } - var b = null - var c = void 0 - - assert.deepEqual(extend(b, a, c), { foo: "bar" }) - assert.end() -}) - -test("mutable", function (assert) { - var a = { foo: "bar" } - - mutableExtend(a, { bar: "baz" }) - - assert.equal(a.bar, "baz") - assert.end() -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/package.json deleted file mode 100644 index 9612fee2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "through2", - "version": "0.4.1", - "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", - "main": "through2.js", - "scripts": { - "test": "node test/test.js", - "test-local": "brtapsauce-local test/basic-test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/rvagg/through2.git" - }, - "keywords": [ - "stream", - "streams2", - "through", - "transform" - ], - "author": { - "name": "Rod Vagg", - "email": "r@va.gg", - "url": "https://github.com/rvagg" - }, - "license": "MIT", - "dependencies": { - "readable-stream": "~1.0.17", - "xtend": "~2.1.1" - }, - "devDependencies": { - "tape": "~2.3.0", - "bl": "~0.6.0", - "stream-spigot": "~3.0.1", - "brtapsauce": "~0.2.2" - }, - "readme": "# through2\n\n<!--\n\nsoon ...\n\n[![Build Status](https://secure.travis-ci.org/rvagg/through2.png)](http://travis-ci.org/rvagg/through2)\n\n[![Build Status](https://saucelabs.com/browser-matrix/through2-sauce.svg)](https://travis-ci.org/rvagg/through2)\n\n-->\n\n[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/) \n\n<!--\nnot happy with these, we need to peg to readable-stream@1.0.x so it'll always report out-of-date\n\n[![david-dm](https://david-dm.org/rvagg/through2.png)](https://david-dm.org/rvagg/through2/)\n[![david-dm](https://david-dm.org/rvagg/through2/dev-status.png)](https://david-dm.org/rvagg/through2#info=devDependencies/)\n-->\n\n**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise**\n\nInspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.\n\n```js\nfs.createReadStream('ex.txt')\n .pipe(through2(function (chunk, enc, callback) {\n\n for (var i = 0; i < chunk.length; i++)\n if (chunk[i] == 97)\n chunk[i] = 122 // swap 'a' for 'z'\n\n this.push(chunk)\n \n callback()\n\n }))\n .pipe(fs.createWriteStream('out.txt'))\n```\n\nOr object streams:\n\n```js\nvar all = []\n\nfs.createReadStream('data.csv')\n .pipe(csv2())\n .pipe(through2.obj(function (chunk, enc, callback) {\n\n var data = {\n name : chunk[0]\n , address : chunk[3]\n , phone : chunk[10]\n }\n \n this.push(data)\n \n callback()\n\n }))\n .on('data', function (data) {\n all.push(data)\n })\n .on('end', function () {\n doSomethingSpecial(all)\n })\n```\n\nNote that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`.\n\n## API\n\n<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b>\n\nConsult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).\n\n### options\n\nThe options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`).\n\nThe `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call:\n\n```js\nfs.createReadStream('/tmp/important.dat')\n .pipe(through2({ objectMode: true, allowHalfOpen: false }, function (chunk, enc, cb) {\n\n this.push(new Buffer('wut?'))\n cb()\n\n })\n .pipe(fs.createWriteStream('/tmp/wut.txt'))\n```\n\n### transformFunction\n\nThe `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk.\n\nTo queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on.\n\nIf you **do not provide a `transformFunction`** then you will get a simple simple pass-through stream.\n\n### flushFunction\n\nThe optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress.\n\n<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b>\n\nInstead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.\n\n```js\nvar FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) {\n if (record.temp != null && record.unit = \"F\") {\n record.temp = ( ( record.temp - 32 ) * 5 ) / 9\n record.unit = \"C\"\n }\n this.push(record)\n callback()\n})\n\n// Create instances of FToC like so:\nvar converter = new FToC()\n// Or:\nvar converter = FToC()\n// Or specify/override options when you instantiate, if you prefer:\nvar converter = FToC({objectMode: true})\n```\n\n## License\n\n**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/rvagg/through2/issues" - }, - "homepage": "https://github.com/rvagg/through2", - "_id": "through2@0.4.1", - "dist": { - "shasum": "48772c8b50c4955c25e7cdbe69f4220f4138178b" - }, - "_from": "through2@~0.4.0", - "_resolved": "https://registry.npmjs.org/through2/-/through2-0.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/basic-test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/basic-test.js deleted file mode 100644 index 9d137c7f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/basic-test.js +++ /dev/null @@ -1,334 +0,0 @@ -const test = require('tape') - , through2 = require('../') - , crypto = require('crypto') - , bl = require('bl') - , spigot = require('stream-spigot') - -test('plain through', function (t) { - var th2 = through2(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') - t.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('pipeable through', function (t) { - var th2 = through2(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - // bl() acts like a proper streams2 stream and passes as much as it's - // asked for, so we really only get one write with such a small amount - // of data - t.equal(s, 'aaaaaaaaaaaaaaaaaaaaaaaaa', 'got transformed string') - t.end() - })) - - var bufs = bl() - bufs.append(crypto.randomBytes(10)) - bufs.append(crypto.randomBytes(5)) - bufs.append(crypto.randomBytes(10)) - bufs.pipe(th2) -}) - -test('object through', function (t) { - t.plan(3) - - var th2 = through2({ objectMode: true}, function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object through with through2.obj', function (t) { - t.plan(3) - - var th2 = through2.obj(function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('flushing through', function (t) { - var th2 = through2(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }, function (callback) { - this.push(new Buffer([ 101, 110, 100 ])) - callback() - }) - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal(s, 'aaaaaaaaaabbbbbccccccccccend', 'got transformed string') - t.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('plain through ctor', function (t) { - var Th2 = through2.ctor(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - var th2 = new Th2() - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') - t.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('reuse through ctor', function (t) { - t.plan(4) - - var Th2 = through2.ctor(function (chunk, enc, callback) { - if (!this._i) { - t.ok(1, 'did not contain previous instance data (this._i)') - this._i = 97 // 'a' - } else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - var th2 = Th2() - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') - - var newInstance = Th2() - newInstance.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaabbbbccccccc', s, 'got transformed string') - })) - - newInstance.write(crypto.randomBytes(7)) - newInstance.write(crypto.randomBytes(4)) - newInstance.write(crypto.randomBytes(7)) - newInstance.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('object through ctor', function (t) { - t.plan(3) - - var Th2 = through2.ctor({ objectMode: true}, function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = new Th2() - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('pipeable object through ctor', function (t) { - t.plan(4) - - var Th2 = through2.ctor({ objectMode: true}, function (record, enc, callback) { - if (record.temp != null && record.unit == 'F') { - record.temp = ( ( record.temp - 32 ) * 5 ) / 9 - record.unit = 'C' - } - this.push(record) - callback() - }) - - var th2 = Th2() - - var expect = [-19, -40, 100, 22] - th2.on('data', function (o) { - t.deepEqual(o, { temp: expect.shift(), unit: 'C' }, 'got transformed object') - }) - - spigot({objectMode: true}, [ - {temp: -2.2, unit: 'F'}, - {temp: -40, unit: 'F'}, - {temp: 212, unit: 'F'}, - {temp: 22, unit: 'C'} - ]).pipe(th2) -}) - -test('object through ctor override', function (t) { - t.plan(3) - - var Th2 = through2.ctor(function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2({objectMode: true}) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object settings available in transform', function (t) { - t.plan(6) - - var Th2 = through2.ctor({objectMode: true, peek: true}, function (chunk, enc, callback) { - t.ok(this.options.peek, "reading options from inside _transform") - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2() - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object settings available in transform override', function (t) { - t.plan(6) - - var Th2 = through2.ctor(function (chunk, enc, callback) { - t.ok(this.options.peek, "reading options from inside _transform") - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2({objectMode: true, peek: true}) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object override extends options', function (t) { - t.plan(6) - - var Th2 = through2.ctor({objectMode: true}, function (chunk, enc, callback) { - t.ok(this.options.peek, "reading options from inside _transform") - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2({peek: true}) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/bench.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/bench.js deleted file mode 100644 index cc10868b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/bench.js +++ /dev/null @@ -1,42 +0,0 @@ -/* -on rvagg@fletcher: - @0.2.3: Ran 36719 iterations in 10000 ms -*/ - -const through2 = require('../') - , bl = require('bl') - , crypto = require('crypto') - , assert = require('assert') - -function run (callback) { - var bufs = Array.apply(null, Array(10)).map(function () { return crypto.randomBytes(32) }) - , stream = through2(function (chunk, env, callback) { - callback(null, chunk.toString('hex')) - }) - - stream.pipe(bl(function (err, data) { - assert(!err) - assert.equal(data.toString(), Buffer.concat(bufs).toString('hex')) - callback() - })) - - bufs.forEach(function (b) { - stream.write(b) - }) - stream.end() -} - -var count = 0 - , start = Date.now() - -;(function exec () { - count++ - run(function () { - if (Date.now() - start < 1000 * 10) { - return setImmediate(exec) - } - console.log('Ran', count, 'iterations in', Date.now() - start, 'ms') - }) -}()) - -console.log('Running for ~10s') \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/sauce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/sauce.js deleted file mode 100644 index a6d28625..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/sauce.js +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env node - -const user = process.env.SAUCE_USER - , key = process.env.SAUCE_KEY - , path = require('path') - , brtapsauce = require('brtapsauce') - , testFile = path.join(__dirname, 'basic-test.js') - - , capabilities = [ - { browserName: 'chrome' , platform: 'Windows XP', version: '' } - , { browserName: 'firefox' , platform: 'Windows 8' , version: '' } - , { browserName: 'firefox' , platform: 'Windows XP', version: '4' } - , { browserName: 'internet explorer' , platform: 'Windows 8' , version: '10' } - , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '9' } - , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '8' } - , { browserName: 'internet explorer' , platform: 'Windows XP', version: '7' } - , { browserName: 'internet explorer' , platform: 'Windows XP', version: '6' } - , { browserName: 'safari' , platform: 'Windows 7' , version: '5' } - , { browserName: 'safari' , platform: 'OS X 10.8' , version: '6' } - , { browserName: 'opera' , platform: 'Windows 7' , version: '' } - , { browserName: 'opera' , platform: 'Windows 7' , version: '11' } - , { browserName: 'ipad' , platform: 'OS X 10.8' , version: '6' } - , { browserName: 'android' , platform: 'Linux' , version: '4.0', 'device-type': 'tablet' } - ] - -if (!user) - throw new Error('Must set a SAUCE_USER env var') -if (!key) - throw new Error('Must set a SAUCE_KEY env var') - -brtapsauce({ - name : 'Traversty' - , user : user - , key : key - , brsrc : testFile - , capabilities : capabilities - , options : { timeout: 60 * 6 } -}) \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/test.js deleted file mode 100644 index aa9b4877..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/test.js +++ /dev/null @@ -1,9 +0,0 @@ -require('./basic-test') - -if (!process.env.SAUCE_KEY || !process.env.SAUCE_USER) - return console.log('SAUCE_KEY and/or SAUCE_USER not set, not running sauce tests') - -if (!/v0\.10/.test(process.version)) - return console.log('Not Node v0.10.x, not running sauce tests') - -require('./sauce.js') \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/through2.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/through2.js deleted file mode 100644 index c1104848..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/through2.js +++ /dev/null @@ -1,78 +0,0 @@ -var Transform = require('readable-stream/transform') - , inherits = require('util').inherits - , xtend = require('xtend') - - -// a noop _transform function -function noop (chunk, enc, callback) { - callback(null, chunk) -} - - -// create a new export function, used by both the main export and -// the .ctor export, contains common logic for dealing with arguments -function through2 (construct) { - return function (options, transform, flush) { - if (typeof options == 'function') { - flush = transform - transform = options - options = {} - } - - if (typeof transform != 'function') - transform = noop - - if (typeof flush != 'function') - flush = null - - return construct(options, transform, flush) - } -} - - -// main export, just make me a transform stream! -module.exports = through2(function (options, transform, flush) { - var t2 = new Transform(options) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) - - -// make me a reusable prototype that I can `new`, or implicitly `new` -// with a constructor call -module.exports.ctor = through2(function (options, transform, flush) { - function Through2 (override) { - if (!(this instanceof Through2)) - return new Through2(override) - - this.options = xtend(options, override) - - Transform.call(this, this.options) - } - - inherits(Through2, Transform) - - Through2.prototype._transform = transform - - if (flush) - Through2.prototype._flush = flush - - return Through2 -}) - - -module.exports.obj = through2(function (options, transform, flush) { - var t2 = new Transform(xtend({ objectMode: true }, options)) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/package.json deleted file mode 100644 index d289871c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "download", - "version": "0.1.10", - "description": "Download and extract files effortlessly", - "keywords": [ - "url", - "http", - "download", - "extract" - ], - "homepage": "https://github.com/kevva/download", - "bugs": { - "url": "https://github.com/kevva/download/issues" - }, - "author": { - "name": "Kevin Martensson", - "email": "kevinmartensson@gmail.com", - "url": "http://kevinmartensson.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/kevva/download.git" - }, - "scripts": { - "test": "mocha --reporter list" - }, - "main": "download.js", - "files": [ - "download.js" - ], - "dependencies": { - "decompress": "~0.1.5", - "each-async": "~0.1.1", - "mkdirp": "~0.3.5", - "request": "~2.31.0", - "through2": "~0.4.0" - }, - "devDependencies": { - "mocha": "~1.17.0", - "nock": "~0.27.1", - "rimraf": "~2.2.5" - }, - "engines": { - "node": ">=0.10.0" - }, - "readme": "# download [![Build Status](https://secure.travis-ci.org/kevva/download.png?branch=master)](http://travis-ci.org/kevva/download)\n\nDownload and extract files effortlessly in Node.js.\n\n## Getting started\n\nInstall with [npm](https://npmjs.org/package/download): `npm install download`\n\n## Examples\n\nIf you're fetching an archive you can set `extract: true` in options and\nit'll extract it for you.\n\n```js\nvar download = require('download');\n\n// download and extract `foo.tar.gz` into `bar/`\ndownload('foo.tar.gz', 'bar', { extract: true });\n\n// download and save `foo.exe` into `bar/foo.exe` with mode `0755`\ndownload('foo.exe', 'bar', { mode: '0755' });\n\n// download and save `foo.zip` into `bar/foobar.zip`\ndownload({ url: 'foo.zip', name: 'foobar.zip' }, 'bar');\n\n// download and save an array of files in `bar/`\nvar files = ['foo.jpg', 'bar.jpg', 'cat.jpg'];\ndownload(files, 'bar');\n\n// download, save and rename an array of files in `bar/`\nvar files = [{\n url: 'foo.jpg',\n name: 'foobar.jpg'\n}, {\n url: 'cat.jpg',\n name: 'dog.jpg'\n}];\ndownload(files, 'bar');\n```\n\n## API\n\n### download(url, dest, opts)\n\nDownload a file or an array of files to a given destination. Returns an EventEmitter \nthat emits the following possible events:\n\n* `response` — Relayed when the underlying `http.ClientRequest` emits the same \nevent. Listeners called with a `http.IncomingMessage` instance.\n* `data` — Relayed when the underlying `http.IncomingMessage` emits the same \nevent. Listeners called with a `Buffer` instance.\n* `error` — Relayed when the underlying `http.ClientRequest` emits the same event \nor when the response status code is not in the 200s. Listeners called with an \n`Error` instance (in the first case) or the response status code.\n* `close` — Relayed when the underlying `stream.Duplex` emits the same event.\n\n## Options\n\nYou can define options accepted by the [request](https://github.com/mikeal/request/) module besides from the options below.\n\n### extract\n\nType: `Boolean` \nDefault: `false`\n\nIf set to `true`, try extracting the file using [decompress](https://github.com/kevva/decompress/).\n\n### mode\n\nType: `String` \nDefault: `undefined`\n\nSet mode on the downloaded files.\n\n### strip\n\nType: `Number` \nDefault: `0`\n\nEquivalent to `--strip-components` for tar.\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com)\n", - "readmeFilename": "README.md", - "_id": "download@0.1.10", - "dist": { - "shasum": "dc5d3ab4a7fc78e374e2de0381273b7b999bc29d" - }, - "_from": "download@~0.1.2", - "_resolved": "https://registry.npmjs.org/download/-/download-0.1.10.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/.npmignore deleted file mode 100644 index 2ccbe465..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/.npmignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules/ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/.travis.yml deleted file mode 100644 index c1ffcb31..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - 0.8 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/History.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/History.md deleted file mode 100644 index d1fa5334..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/History.md +++ /dev/null @@ -1,20 +0,0 @@ - -0.0.2 / 2013-05-29 -================== - - * Updated github url - * Fix bug calling isbin with list of paths - * Add tests for sync version - * Added travis CI passing image to readme - * Added node engines and keywords - * Added travis CI config - * Added basic readme - * Added basic test suite and Makefile - * Add async version - * Some refactorings using 'some' function - * Fixed issue with wrong paths if called multiple times - -0.0.1 / 2012-12-06 -================== - - * Initial release diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/Makefile deleted file mode 100644 index 1a2444a1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -REPORTER ?= dot - -test: - @NODE_ENV=test ./node_modules/mocha/bin/mocha -R $(REPORTER) - -.PHONY: test diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/README.md deleted file mode 100644 index 5224d614..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/README.md +++ /dev/null @@ -1,59 +0,0 @@ -[![Build Status](https://secure.travis-ci.org/mbehrendt/isbin.png?branch=master)](https://travis-ci.org/mbehrendt/isbin) - -# Isbin - -Tiny little helper library to determine if a certain binary is available within $PATH or any additional folder. - -# Installation - -```bash -$ npm install isbin -``` - -# Usage - -```js -var isbin = require('isbin'); - -// Test against $PATH -isbin('mysql', function(exists) { - console.log(exists); // ==> Boolean -}); - -// With additional path to test -isbin('mysql', '/usr/local/bin', function(exists) { - console.log(exists); // ==> Boolean -}); - -// Or multiple ones -isbin('mysql', ['/usr/local/bin', '/home/me/bins'], function(exists) { - console.log(exists); // ==> Boolean -}); -``` - -There are also synchronous versions available - -```js -var exists = isbin('mysql'); -var exists = isbin('mysql', '/usr/local/bin'); -var exists = isbin('mysql', ['/usr/local/bin', '/home/me/bins']); -``` - -# Running the tests - -```bash -$ npm install -$ make test -``` - -# License - -(The MIT License) - -Copyright (c) 2012 Mario Behrendt info@mario-behrendt.de, Stephan Hoyer <ste.hoyer@gmail.com> - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/index.js deleted file mode 100644 index bb0a047c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/lib/index.js deleted file mode 100644 index 1b8a5cac..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/lib/index.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Require dependencies - */ - -var fs = require('fs') - , async = require('async'); - -/** - * Check if given binary exists - * - * @param {String} bin Binary to test - * @param {String|Array} additional Additional paths to check - * @param {Function(result)} isbinChecked Callback when check is done async, optional - * @return {Boolean} True if binary was found - */ - -function isbin(bin, additional, isbinChecked) { - // isbin(bin, cb) - if (!isbinChecked) isbinChecked = additional; - - // Read $PATH to get set up bin folders - var paths = process.env.PATH.split(':') || []; - - // isbin(bin, 'path', cb) - if ('string' === typeof additional) { - paths.push(additional); - } - - // isbin(bin, ['path1', 'path2'], cb) - if ('object' === typeof additional && additional.length !== null) { - paths.concat(additional); - } - - // async check - if ('function' === typeof isbinChecked) { - return async.some(paths, function(path, pathChecked) { - fs.exists(path + '/' + bin, pathChecked); - }, isbinChecked); - } - - // sync check - return paths.reverse().some(function(path) { - return fs.existsSync(path + '/' + bin); - }); -}; - -/** - * Expose module - */ - -module.exports = isbin; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.gitmodules b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.gitmodules deleted file mode 100644 index a9aae984..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.gitmodules +++ /dev/null @@ -1,9 +0,0 @@ -[submodule "deps/nodeunit"] - path = deps/nodeunit - url = git://github.com/caolan/nodeunit.git -[submodule "deps/UglifyJS"] - path = deps/UglifyJS - url = https://github.com/mishoo/UglifyJS.git -[submodule "deps/nodelint"] - path = deps/nodelint - url = https://github.com/tav/nodelint.git diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.npmignore deleted file mode 100644 index 9bdfc97c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -deps -dist -test -nodelint.cfg \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/LICENSE deleted file mode 100644 index b7f9d500..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Caolan McMahon - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/Makefile deleted file mode 100644 index bad647c6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -PACKAGE = asyncjs -NODEJS = $(if $(shell test -f /usr/bin/nodejs && echo "true"),nodejs,node) -CWD := $(shell pwd) -NODEUNIT = $(CWD)/node_modules/nodeunit/bin/nodeunit -UGLIFY = $(CWD)/node_modules/uglify-js/bin/uglifyjs -NODELINT = $(CWD)/node_modules/nodelint/nodelint - -BUILDDIR = dist - -all: clean test build - -build: $(wildcard lib/*.js) - mkdir -p $(BUILDDIR) - $(UGLIFY) lib/async.js > $(BUILDDIR)/async.min.js - -test: - $(NODEUNIT) test - -clean: - rm -rf $(BUILDDIR) - -lint: - $(NODELINT) --config nodelint.cfg lib/async.js - -.PHONY: test build all diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/README.md deleted file mode 100644 index 1bbbc477..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/README.md +++ /dev/null @@ -1,1021 +0,0 @@ -# Async.js - -Async is a utility module which provides straight-forward, powerful functions -for working with asynchronous JavaScript. Although originally designed for -use with [node.js](http://nodejs.org), it can also be used directly in the -browser. - -Async provides around 20 functions that include the usual 'functional' -suspects (map, reduce, filter, forEach…) as well as some common patterns -for asynchronous control flow (parallel, series, waterfall…). All these -functions assume you follow the node.js convention of providing a single -callback as the last argument of your async function. - - -## Quick Examples - - async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file - }); - - async.filter(['file1','file2','file3'], path.exists, function(results){ - // results now equals an array of the existing files - }); - - async.parallel([ - function(){ ... }, - function(){ ... } - ], callback); - - async.series([ - function(){ ... }, - function(){ ... } - ]); - -There are many more functions available so take a look at the docs below for a -full list. This module aims to be comprehensive, so if you feel anything is -missing please create a GitHub issue for it. - - -## Download - -Releases are available for download from -[GitHub](http://github.com/caolan/async/downloads). -Alternatively, you can install using Node Package Manager (npm): - - npm install async - - -__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 17.5kb Uncompressed - -__Production:__ [async.min.js](https://github.com/caolan/async/raw/master/dist/async.min.js) - 1.7kb Packed and Gzipped - - -## In the Browser - -So far its been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage: - - <script type="text/javascript" src="async.js"></script> - <script type="text/javascript"> - - async.map(data, asyncProcess, function(err, results){ - alert(results); - }); - - </script> - - -## Documentation - -### Collections - -* [forEach](#forEach) -* [map](#map) -* [filter](#filter) -* [reject](#reject) -* [reduce](#reduce) -* [detect](#detect) -* [sortBy](#sortBy) -* [some](#some) -* [every](#every) -* [concat](#concat) - -### Control Flow - -* [series](#series) -* [parallel](#parallel) -* [whilst](#whilst) -* [until](#until) -* [waterfall](#waterfall) -* [queue](#queue) -* [auto](#auto) -* [iterator](#iterator) -* [apply](#apply) -* [nextTick](#nextTick) - -### Utils - -* [memoize](#memoize) -* [unmemoize](#unmemoize) -* [log](#log) -* [dir](#dir) -* [noConflict](#noConflict) - - -## Collections - -<a name="forEach" /> -### forEach(arr, iterator, callback) - -Applies an iterator function to each item in an array, in parallel. -The iterator is called with an item from the list and a callback for when it -has finished. If the iterator passes an error to this callback, the main -callback for the forEach function is immediately called with the error. - -Note, that since this function applies the iterator to each item in parallel -there is no guarantee that the iterator functions will complete in order. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(err) - A callback which is called after all the iterator functions - have finished, or an error has occurred. - -__Example__ - - // assuming openFiles is an array of file names and saveFile is a function - // to save the modified contents of that file: - - async.forEach(openFiles, saveFile, function(err){ - // if any of the saves produced an error, err would equal that error - }); - ---------------------------------------- - -<a name="forEachSeries" /> -### forEachSeries(arr, iterator, callback) - -The same as forEach only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. This means the iterator functions will complete in order. - - ---------------------------------------- - -<a name="forEachLimit" /> -### forEachLimit(arr, limit, iterator, callback) - -The same as forEach only the iterator is applied to batches of items in the -array, in series. The next batch of iterators is only called once the current -one has completed processing. - -__Arguments__ - -* arr - An array to iterate over. -* limit - How many items should be in each batch. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(err) - A callback which is called after all the iterator functions - have finished, or an error has occurred. - -__Example__ - - // Assume documents is an array of JSON objects and requestApi is a - // function that interacts with a rate-limited REST api. - - async.forEachLimit(documents, 20, requestApi, function(err){ - // if any of the saves produced an error, err would equal that error - }); ---------------------------------------- - -<a name="map" /> -### map(arr, iterator, callback) - -Produces a new array of values by mapping each value in the given array through -the iterator function. The iterator is called with an item from the array and a -callback for when it has finished processing. The callback takes 2 arguments, -an error and the transformed item from the array. If the iterator passes an -error to this callback, the main callback for the map function is immediately -called with the error. - -Note, that since this function applies the iterator to each item in parallel -there is no guarantee that the iterator functions will complete in order, however -the results array will be in the same order as the original array. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed - with an error (which can be null) and a transformed item. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is an array of the - transformed items from the original array. - -__Example__ - - async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file - }); - ---------------------------------------- - -<a name="mapSeries" /> -### mapSeries(arr, iterator, callback) - -The same as map only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. The results array will be in the same order as the original. - - ---------------------------------------- - -<a name="filter" /> -### filter(arr, iterator, callback) - -__Alias:__ select - -Returns a new array of all the values which pass an async truth test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like path.exists. This operation is -performed in parallel, but the results array will be in the same order as the -original. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(results) - A callback which is called after all the iterator - functions have finished. - -__Example__ - - async.filter(['file1','file2','file3'], path.exists, function(results){ - // results now equals an array of the existing files - }); - ---------------------------------------- - -<a name="filterSeries" /> -### filterSeries(arr, iterator, callback) - -__alias:__ selectSeries - -The same as filter only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. The results array will be in the same order as the original. - ---------------------------------------- - -<a name="reject" /> -### reject(arr, iterator, callback) - -The opposite of filter. Removes values that pass an async truth test. - ---------------------------------------- - -<a name="rejectSeries" /> -### rejectSeries(arr, iterator, callback) - -The same as filter, only the iterator is applied to each item in the array -in series. - - ---------------------------------------- - -<a name="reduce" /> -### reduce(arr, memo, iterator, callback) - -__aliases:__ inject, foldl - -Reduces a list of values into a single value using an async iterator to return -each successive step. Memo is the initial state of the reduction. This -function only operates in series. For performance reasons, it may make sense to -split a call to this function into a parallel map, then use the normal -Array.prototype.reduce on the results. This function is for situations where -each step in the reduction needs to be async, if you can get the data before -reducing it then its probably a good idea to do so. - -__Arguments__ - -* arr - An array to iterate over. -* memo - The initial state of the reduction. -* iterator(memo, item, callback) - A function applied to each item in the - array to produce the next step in the reduction. The iterator is passed a - callback which accepts an optional error as its first argument, and the state - of the reduction as the second. If an error is passed to the callback, the - reduction is stopped and the main callback is immediately called with the - error. -* callback(err, result) - A callback which is called after all the iterator - functions have finished. Result is the reduced value. - -__Example__ - - async.reduce([1,2,3], 0, function(memo, item, callback){ - // pointless async: - process.nextTick(function(){ - callback(null, memo + item) - }); - }, function(err, result){ - // result is now equal to the last value of memo, which is 6 - }); - ---------------------------------------- - -<a name="reduceRight" /> -### reduceRight(arr, memo, iterator, callback) - -__Alias:__ foldr - -Same as reduce, only operates on the items in the array in reverse order. - - ---------------------------------------- - -<a name="detect" /> -### detect(arr, iterator, callback) - -Returns the first value in a list that passes an async truth test. The -iterator is applied in parallel, meaning the first iterator to return true will -fire the detect callback with that result. That means the result might not be -the first item in the original array (in terms of order) that passes the test. - -If order within the original array is important then look at detectSeries. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(result) - A callback which is called as soon as any iterator returns - true, or after all the iterator functions have finished. Result will be - the first item in the array that passes the truth test (iterator) or the - value undefined if none passed. - -__Example__ - - async.detect(['file1','file2','file3'], path.exists, function(result){ - // result now equals the first file in the list that exists - }); - ---------------------------------------- - -<a name="detectSeries" /> -### detectSeries(arr, iterator, callback) - -The same as detect, only the iterator is applied to each item in the array -in series. This means the result is always the first in the original array (in -terms of array order) that passes the truth test. - - ---------------------------------------- - -<a name="sortBy" /> -### sortBy(arr, iterator, callback) - -Sorts a list by the results of running each value through an async iterator. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed - with an error (which can be null) and a value to use as the sort criteria. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is the items from - the original array sorted by the values returned by the iterator calls. - -__Example__ - - async.sortBy(['file1','file2','file3'], function(file, callback){ - fs.stat(file, function(err, stats){ - callback(err, stats.mtime); - }); - }, function(err, results){ - // results is now the original array of files sorted by - // modified date - }); - - ---------------------------------------- - -<a name="some" /> -### some(arr, iterator, callback) - -__Alias:__ any - -Returns true if at least one element in the array satisfies an async test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like path.exists. Once any iterator -call returns true, the main callback is immediately called. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(result) - A callback which is called as soon as any iterator returns - true, or after all the iterator functions have finished. Result will be - either true or false depending on the values of the async tests. - -__Example__ - - async.some(['file1','file2','file3'], path.exists, function(result){ - // if result is true then at least one of the files exists - }); - ---------------------------------------- - -<a name="every" /> -### every(arr, iterator, callback) - -__Alias:__ all - -Returns true if every element in the array satisfies an async test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like path.exists. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(result) - A callback which is called after all the iterator - functions have finished. Result will be either true or false depending on - the values of the async tests. - -__Example__ - - async.every(['file1','file2','file3'], path.exists, function(result){ - // if result is true then every file exists - }); - ---------------------------------------- - -<a name="concat" /> -### concat(arr, iterator, callback) - -Applies an iterator to each item in a list, concatenating the results. Returns the -concatenated list. The iterators are called in parallel, and the results are -concatenated as they return. There is no guarantee that the results array will -be returned in the original order of the arguments passed to the iterator function. - -__Arguments__ - -* arr - An array to iterate over -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed - with an error (which can be null) and an array of results. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is an array containing - the concatenated results of the iterator function. - -__Example__ - - async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ - // files is now a list of filenames that exist in the 3 directories - }); - ---------------------------------------- - -<a name="concatSeries" /> -### concatSeries(arr, iterator, callback) - -Same as async.concat, but executes in series instead of parallel. - - -## Control Flow - -<a name="series" /> -### series(tasks, [callback]) - -Run an array of functions in series, each one running once the previous -function has completed. If any functions in the series pass an error to its -callback, no more functions are run and the callback for the series is -immediately called with the value of the error. Once the tasks have completed, -the results are passed to the final callback as an array. - -It is also possible to use an object instead of an array. Each property will be -run as a function and the results will be passed to the final callback as an object -instead of an array. This can be a more readable way of handling results from -async.series. - - -__Arguments__ - -* tasks - An array or object containing functions to run, each function is passed - a callback it must call on completion. -* callback(err, results) - An optional callback to run once all the functions - have completed. This function gets an array of all the arguments passed to - the callbacks used in the array. - -__Example__ - - async.series([ - function(callback){ - // do some stuff ... - callback(null, 'one'); - }, - function(callback){ - // do some more stuff ... - callback(null, 'two'); - }, - ], - // optional callback - function(err, results){ - // results is now equal to ['one', 'two'] - }); - - - // an example using an object instead of an array - async.series({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - }, - }, - function(err, results) { - // results is now equal to: {one: 1, two: 2} - }); - - ---------------------------------------- - -<a name="parallel" /> -### parallel(tasks, [callback]) - -Run an array of functions in parallel, without waiting until the previous -function has completed. If any of the functions pass an error to its -callback, the main callback is immediately called with the value of the error. -Once the tasks have completed, the results are passed to the final callback as an -array. - -It is also possible to use an object instead of an array. Each property will be -run as a function and the results will be passed to the final callback as an object -instead of an array. This can be a more readable way of handling results from -async.parallel. - - -__Arguments__ - -* tasks - An array or object containing functions to run, each function is passed a - callback it must call on completion. -* callback(err, results) - An optional callback to run once all the functions - have completed. This function gets an array of all the arguments passed to - the callbacks used in the array. - -__Example__ - - async.parallel([ - function(callback){ - setTimeout(function(){ - callback(null, 'one'); - }, 200); - }, - function(callback){ - setTimeout(function(){ - callback(null, 'two'); - }, 100); - }, - ], - // optional callback - function(err, results){ - // the results array will equal ['one','two'] even though - // the second function had a shorter timeout. - }); - - - // an example using an object instead of an array - async.parallel({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - }, - }, - function(err, results) { - // results is now equals to: {one: 1, two: 2} - }); - - ---------------------------------------- - -<a name="whilst" /> -### whilst(test, fn, callback) - -Repeatedly call fn, while test returns true. Calls the callback when stopped, -or an error occurs. - -__Arguments__ - -* test() - synchronous truth test to perform before each execution of fn. -* fn(callback) - A function to call each time the test passes. The function is - passed a callback which must be called once it has completed with an optional - error as the first argument. -* callback(err) - A callback which is called after the test fails and repeated - execution of fn has stopped. - -__Example__ - - var count = 0; - - async.whilst( - function () { return count < 5; }, - function (callback) { - count++; - setTimeout(callback, 1000); - }, - function (err) { - // 5 seconds have passed - } - ); - - ---------------------------------------- - -<a name="until" /> -### until(test, fn, callback) - -Repeatedly call fn, until test returns true. Calls the callback when stopped, -or an error occurs. - -The inverse of async.whilst. - - ---------------------------------------- - -<a name="waterfall" /> -### waterfall(tasks, [callback]) - -Runs an array of functions in series, each passing their results to the next in -the array. However, if any of the functions pass an error to the callback, the -next function is not executed and the main callback is immediately called with -the error. - -__Arguments__ - -* tasks - An array of functions to run, each function is passed a callback it - must call on completion. -* callback(err, [results]) - An optional callback to run once all the functions - have completed. This will be passed the results of the last task's callback. - - - -__Example__ - - async.waterfall([ - function(callback){ - callback(null, 'one', 'two'); - }, - function(arg1, arg2, callback){ - callback(null, 'three'); - }, - function(arg1, callback){ - // arg1 now equals 'three' - callback(null, 'done'); - } - ], function (err, result) { - // result now equals 'done' - }); - - ---------------------------------------- - -<a name="queue" /> -### queue(worker, concurrency) - -Creates a queue object with the specified concurrency. Tasks added to the -queue will be processed in parallel (up to the concurrency limit). If all -workers are in progress, the task is queued until one is available. Once -a worker has completed a task, the task's callback is called. - -__Arguments__ - -* worker(task, callback) - An asynchronous function for processing a queued - task. -* concurrency - An integer for determining how many worker functions should be - run in parallel. - -__Queue objects__ - -The queue object returned by this function has the following properties and -methods: - -* length() - a function returning the number of items waiting to be processed. -* concurrency - an integer for determining how many worker functions should be - run in parallel. This property can be changed after a queue is created to - alter the concurrency on-the-fly. -* push(task, [callback]) - add a new task to the queue, the callback is called - once the worker has finished processing the task. - instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list. -* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued -* empty - a callback that is called when the last item from the queue is given to a worker -* drain - a callback that is called when the last item from the queue has returned from the worker - -__Example__ - - // create a queue object with concurrency 2 - - var q = async.queue(function (task, callback) { - console.log('hello ' + task.name); - callback(); - }, 2); - - - // assign a callback - q.drain = function() { - console.log('all items have been processed'); - } - - // add some items to the queue - - q.push({name: 'foo'}, function (err) { - console.log('finished processing foo'); - }); - q.push({name: 'bar'}, function (err) { - console.log('finished processing bar'); - }); - - // add some items to the queue (batch-wise) - - q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) { - console.log('finished processing bar'); - }); - - ---------------------------------------- - -<a name="auto" /> -### auto(tasks, [callback]) - -Determines the best order for running functions based on their requirements. -Each function can optionally depend on other functions being completed first, -and each function is run as soon as its requirements are satisfied. If any of -the functions pass an error to their callback, that function will not complete -(so any other functions depending on it will not run) and the main callback -will be called immediately with the error. Functions also receive an object -containing the results of functions which have completed so far. - -__Arguments__ - -* tasks - An object literal containing named functions or an array of - requirements, with the function itself the last item in the array. The key - used for each function or array is used when specifying requirements. The - syntax is easier to understand by looking at the example. -* callback(err, results) - An optional callback which is called when all the - tasks have been completed. The callback will receive an error as an argument - if any tasks pass an error to their callback. If all tasks complete - successfully, it will receive an object containing their results. - -__Example__ - - async.auto({ - get_data: function(callback){ - // async code to get some data - }, - make_folder: function(callback){ - // async code to create a directory to store a file in - // this is run at the same time as getting the data - }, - write_file: ['get_data', 'make_folder', function(callback){ - // once there is some data and the directory exists, - // write the data to a file in the directory - callback(null, filename); - }], - email_link: ['write_file', function(callback, results){ - // once the file is written let's email a link to it... - // results.write_file contains the filename returned by write_file. - }] - }); - -This is a fairly trivial example, but to do this using the basic parallel and -series functions would look like this: - - async.parallel([ - function(callback){ - // async code to get some data - }, - function(callback){ - // async code to create a directory to store a file in - // this is run at the same time as getting the data - } - ], - function(results){ - async.series([ - function(callback){ - // once there is some data and the directory exists, - // write the data to a file in the directory - }, - email_link: function(callback){ - // once the file is written let's email a link to it... - } - ]); - }); - -For a complicated series of async tasks using the auto function makes adding -new tasks much easier and makes the code more readable. - - ---------------------------------------- - -<a name="iterator" /> -### iterator(tasks) - -Creates an iterator function which calls the next function in the array, -returning a continuation to call the next one after that. Its also possible to -'peek' the next iterator by doing iterator.next(). - -This function is used internally by the async module but can be useful when -you want to manually control the flow of functions in series. - -__Arguments__ - -* tasks - An array of functions to run, each function is passed a callback it - must call on completion. - -__Example__ - - var iterator = async.iterator([ - function(){ sys.p('one'); }, - function(){ sys.p('two'); }, - function(){ sys.p('three'); } - ]); - - node> var iterator2 = iterator(); - 'one' - node> var iterator3 = iterator2(); - 'two' - node> iterator3(); - 'three' - node> var nextfn = iterator2.next(); - node> nextfn(); - 'three' - - ---------------------------------------- - -<a name="apply" /> -### apply(function, arguments..) - -Creates a continuation function with some arguments already applied, a useful -shorthand when combined with other control flow functions. Any arguments -passed to the returned function are added to the arguments originally passed -to apply. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to automatically apply when the - continuation is called. - -__Example__ - - // using apply - - async.parallel([ - async.apply(fs.writeFile, 'testfile1', 'test1'), - async.apply(fs.writeFile, 'testfile2', 'test2'), - ]); - - - // the same process without using apply - - async.parallel([ - function(callback){ - fs.writeFile('testfile1', 'test1', callback); - }, - function(callback){ - fs.writeFile('testfile2', 'test2', callback); - }, - ]); - -It's possible to pass any number of additional arguments when calling the -continuation: - - node> var fn = async.apply(sys.puts, 'one'); - node> fn('two', 'three'); - one - two - three - ---------------------------------------- - -<a name="nextTick" /> -### nextTick(callback) - -Calls the callback on a later loop around the event loop. In node.js this just -calls process.nextTick, in the browser it falls back to setTimeout(callback, 0), -which means other higher priority events may precede the execution of the callback. - -This is used internally for browser-compatibility purposes. - -__Arguments__ - -* callback - The function to call on a later loop around the event loop. - -__Example__ - - var call_order = []; - async.nextTick(function(){ - call_order.push('two'); - // call_order now equals ['one','two] - }); - call_order.push('one') - - -## Utils - -<a name="memoize" /> -### memoize(fn, [hasher]) - -Caches the results of an async function. When creating a hash to store function -results against, the callback is omitted from the hash and an optional hash -function can be used. - -__Arguments__ - -* fn - the function you to proxy and cache results from. -* hasher - an optional function for generating a custom hash for storing - results, it has all the arguments applied to it apart from the callback, and - must be synchronous. - -__Example__ - - var slow_fn = function (name, callback) { - // do something - callback(null, result); - }; - var fn = async.memoize(slow_fn); - - // fn can now be used as if it were slow_fn - fn('some name', function () { - // callback - }); - -<a name="unmemoize" /> -### unmemoize(fn) - -Undoes a memoized function, reverting it to the original, unmemoized -form. Comes handy in tests. - -__Arguments__ - -* fn - the memoized function - -<a name="log" /> -### log(function, arguments) - -Logs the result of an async function to the console. Only works in node.js or -in browsers that support console.log and console.error (such as FF and Chrome). -If multiple arguments are returned from the async function, console.log is -called on each argument in order. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to apply to the function. - -__Example__ - - var hello = function(name, callback){ - setTimeout(function(){ - callback(null, 'hello ' + name); - }, 1000); - }; - - node> async.log(hello, 'world'); - 'hello world' - - ---------------------------------------- - -<a name="dir" /> -### dir(function, arguments) - -Logs the result of an async function to the console using console.dir to -display the properties of the resulting object. Only works in node.js or -in browsers that support console.dir and console.error (such as FF and Chrome). -If multiple arguments are returned from the async function, console.dir is -called on each argument in order. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to apply to the function. - -__Example__ - - var hello = function(name, callback){ - setTimeout(function(){ - callback(null, {hello: name}); - }, 1000); - }; - - node> async.dir(hello, 'world'); - {hello: 'world'} - - ---------------------------------------- - -<a name="noConflict" /> -### noConflict() - -Changes the value of async back to its original value, returning a reference to the -async object. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/index.js deleted file mode 100644 index 8e238453..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/index.js +++ /dev/null @@ -1,3 +0,0 @@ -// This file is just added for convenience so this repository can be -// directly checked out into a project's deps folder -module.exports = require('./lib/async'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/lib/async.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/lib/async.js deleted file mode 100644 index 7cc4f5ea..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/lib/async.js +++ /dev/null @@ -1,692 +0,0 @@ -/*global setTimeout: false, console: false */ -(function () { - - var async = {}; - - // global on the server, window in the browser - var root = this, - previous_async = root.async; - - if (typeof module !== 'undefined' && module.exports) { - module.exports = async; - } - else { - root.async = async; - } - - async.noConflict = function () { - root.async = previous_async; - return async; - }; - - //// cross-browser compatiblity functions //// - - var _forEach = function (arr, iterator) { - if (arr.forEach) { - return arr.forEach(iterator); - } - for (var i = 0; i < arr.length; i += 1) { - iterator(arr[i], i, arr); - } - }; - - var _map = function (arr, iterator) { - if (arr.map) { - return arr.map(iterator); - } - var results = []; - _forEach(arr, function (x, i, a) { - results.push(iterator(x, i, a)); - }); - return results; - }; - - var _reduce = function (arr, iterator, memo) { - if (arr.reduce) { - return arr.reduce(iterator, memo); - } - _forEach(arr, function (x, i, a) { - memo = iterator(memo, x, i, a); - }); - return memo; - }; - - var _keys = function (obj) { - if (Object.keys) { - return Object.keys(obj); - } - var keys = []; - for (var k in obj) { - if (obj.hasOwnProperty(k)) { - keys.push(k); - } - } - return keys; - }; - - //// exported async module functions //// - - //// nextTick implementation with browser-compatible fallback //// - if (typeof process === 'undefined' || !(process.nextTick)) { - async.nextTick = function (fn) { - setTimeout(fn, 0); - }; - } - else { - async.nextTick = process.nextTick; - } - - async.forEach = function (arr, iterator, callback) { - callback = callback || function () {}; - if (!arr.length) { - return callback(); - } - var completed = 0; - _forEach(arr, function (x) { - iterator(x, function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - if (completed === arr.length) { - callback(null); - } - } - }); - }); - }; - - async.forEachSeries = function (arr, iterator, callback) { - callback = callback || function () {}; - if (!arr.length) { - return callback(); - } - var completed = 0; - var iterate = function () { - iterator(arr[completed], function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - if (completed === arr.length) { - callback(null); - } - else { - iterate(); - } - } - }); - }; - iterate(); - }; - - async.forEachLimit = function (arr, limit, iterator, callback) { - callback = callback || function () {}; - if (!arr.length || limit <= 0) { - return callback(); - } - var completed = 0; - var started = 0; - var running = 0; - - (function replenish () { - if (completed === arr.length) { - return callback(); - } - - while (running < limit && started < arr.length) { - started += 1; - running += 1; - iterator(arr[started - 1], function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - running -= 1; - if (completed === arr.length) { - callback(); - } - else { - replenish(); - } - } - }); - } - })(); - }; - - - var doParallel = function (fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [async.forEach].concat(args)); - }; - }; - var doSeries = function (fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [async.forEachSeries].concat(args)); - }; - }; - - - var _asyncMap = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (err, v) { - results[x.index] = v; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - }; - async.map = doParallel(_asyncMap); - async.mapSeries = doSeries(_asyncMap); - - - // reduce only has a series version, as doing reduce in parallel won't - // work in many situations. - async.reduce = function (arr, memo, iterator, callback) { - async.forEachSeries(arr, function (x, callback) { - iterator(memo, x, function (err, v) { - memo = v; - callback(err); - }); - }, function (err) { - callback(err, memo); - }); - }; - // inject alias - async.inject = async.reduce; - // foldl alias - async.foldl = async.reduce; - - async.reduceRight = function (arr, memo, iterator, callback) { - var reversed = _map(arr, function (x) { - return x; - }).reverse(); - async.reduce(reversed, memo, iterator, callback); - }; - // foldr alias - async.foldr = async.reduceRight; - - var _filter = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (v) { - if (v) { - results.push(x); - } - callback(); - }); - }, function (err) { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - }; - async.filter = doParallel(_filter); - async.filterSeries = doSeries(_filter); - // select alias - async.select = async.filter; - async.selectSeries = async.filterSeries; - - var _reject = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (v) { - if (!v) { - results.push(x); - } - callback(); - }); - }, function (err) { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - }; - async.reject = doParallel(_reject); - async.rejectSeries = doSeries(_reject); - - var _detect = function (eachfn, arr, iterator, main_callback) { - eachfn(arr, function (x, callback) { - iterator(x, function (result) { - if (result) { - main_callback(x); - main_callback = function () {}; - } - else { - callback(); - } - }); - }, function (err) { - main_callback(); - }); - }; - async.detect = doParallel(_detect); - async.detectSeries = doSeries(_detect); - - async.some = function (arr, iterator, main_callback) { - async.forEach(arr, function (x, callback) { - iterator(x, function (v) { - if (v) { - main_callback(true); - main_callback = function () {}; - } - callback(); - }); - }, function (err) { - main_callback(false); - }); - }; - // any alias - async.any = async.some; - - async.every = function (arr, iterator, main_callback) { - async.forEach(arr, function (x, callback) { - iterator(x, function (v) { - if (!v) { - main_callback(false); - main_callback = function () {}; - } - callback(); - }); - }, function (err) { - main_callback(true); - }); - }; - // all alias - async.all = async.every; - - async.sortBy = function (arr, iterator, callback) { - async.map(arr, function (x, callback) { - iterator(x, function (err, criteria) { - if (err) { - callback(err); - } - else { - callback(null, {value: x, criteria: criteria}); - } - }); - }, function (err, results) { - if (err) { - return callback(err); - } - else { - var fn = function (left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }; - callback(null, _map(results.sort(fn), function (x) { - return x.value; - })); - } - }); - }; - - async.auto = function (tasks, callback) { - callback = callback || function () {}; - var keys = _keys(tasks); - if (!keys.length) { - return callback(null); - } - - var results = {}; - - var listeners = []; - var addListener = function (fn) { - listeners.unshift(fn); - }; - var removeListener = function (fn) { - for (var i = 0; i < listeners.length; i += 1) { - if (listeners[i] === fn) { - listeners.splice(i, 1); - return; - } - } - }; - var taskComplete = function () { - _forEach(listeners.slice(0), function (fn) { - fn(); - }); - }; - - addListener(function () { - if (_keys(results).length === keys.length) { - callback(null, results); - callback = function () {}; - } - }); - - _forEach(keys, function (k) { - var task = (tasks[k] instanceof Function) ? [tasks[k]]: tasks[k]; - var taskCallback = function (err) { - if (err) { - callback(err); - // stop subsequent errors hitting callback multiple times - callback = function () {}; - } - else { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - taskComplete(); - } - }; - var requires = task.slice(0, Math.abs(task.length - 1)) || []; - var ready = function () { - return _reduce(requires, function (a, x) { - return (a && results.hasOwnProperty(x)); - }, true) && !results.hasOwnProperty(k); - }; - if (ready()) { - task[task.length - 1](taskCallback, results); - } - else { - var listener = function () { - if (ready()) { - removeListener(listener); - task[task.length - 1](taskCallback, results); - } - }; - addListener(listener); - } - }); - }; - - async.waterfall = function (tasks, callback) { - callback = callback || function () {}; - if (!tasks.length) { - return callback(); - } - var wrapIterator = function (iterator) { - return function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - var args = Array.prototype.slice.call(arguments, 1); - var next = iterator.next(); - if (next) { - args.push(wrapIterator(next)); - } - else { - args.push(callback); - } - async.nextTick(function () { - iterator.apply(null, args); - }); - } - }; - }; - wrapIterator(async.iterator(tasks))(); - }; - - async.parallel = function (tasks, callback) { - callback = callback || function () {}; - if (tasks.constructor === Array) { - async.map(tasks, function (fn, callback) { - if (fn) { - fn(function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - callback.call(null, err, args); - }); - } - }, callback); - } - else { - var results = {}; - async.forEach(_keys(tasks), function (k, callback) { - tasks[k](function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - - async.series = function (tasks, callback) { - callback = callback || function () {}; - if (tasks.constructor === Array) { - async.mapSeries(tasks, function (fn, callback) { - if (fn) { - fn(function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - callback.call(null, err, args); - }); - } - }, callback); - } - else { - var results = {}; - async.forEachSeries(_keys(tasks), function (k, callback) { - tasks[k](function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - - async.iterator = function (tasks) { - var makeCallback = function (index) { - var fn = function () { - if (tasks.length) { - tasks[index].apply(null, arguments); - } - return fn.next(); - }; - fn.next = function () { - return (index < tasks.length - 1) ? makeCallback(index + 1): null; - }; - return fn; - }; - return makeCallback(0); - }; - - async.apply = function (fn) { - var args = Array.prototype.slice.call(arguments, 1); - return function () { - return fn.apply( - null, args.concat(Array.prototype.slice.call(arguments)) - ); - }; - }; - - var _concat = function (eachfn, arr, fn, callback) { - var r = []; - eachfn(arr, function (x, cb) { - fn(x, function (err, y) { - r = r.concat(y || []); - cb(err); - }); - }, function (err) { - callback(err, r); - }); - }; - async.concat = doParallel(_concat); - async.concatSeries = doSeries(_concat); - - async.whilst = function (test, iterator, callback) { - if (test()) { - iterator(function (err) { - if (err) { - return callback(err); - } - async.whilst(test, iterator, callback); - }); - } - else { - callback(); - } - }; - - async.until = function (test, iterator, callback) { - if (!test()) { - iterator(function (err) { - if (err) { - return callback(err); - } - async.until(test, iterator, callback); - }); - } - else { - callback(); - } - }; - - async.queue = function (worker, concurrency) { - var workers = 0; - var q = { - tasks: [], - concurrency: concurrency, - saturated: null, - empty: null, - drain: null, - push: function (data, callback) { - if(data.constructor !== Array) { - data = [data]; - } - _forEach(data, function(task) { - q.tasks.push({ - data: task, - callback: typeof callback === 'function' ? callback : null - }); - if (q.saturated && q.tasks.length == concurrency) { - q.saturated(); - } - async.nextTick(q.process); - }); - }, - process: function () { - if (workers < q.concurrency && q.tasks.length) { - var task = q.tasks.shift(); - if(q.empty && q.tasks.length == 0) q.empty(); - workers += 1; - worker(task.data, function () { - workers -= 1; - if (task.callback) { - task.callback.apply(task, arguments); - } - if(q.drain && q.tasks.length + workers == 0) q.drain(); - q.process(); - }); - } - }, - length: function () { - return q.tasks.length; - }, - running: function () { - return workers; - } - }; - return q; - }; - - var _console_fn = function (name) { - return function (fn) { - var args = Array.prototype.slice.call(arguments, 1); - fn.apply(null, args.concat([function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (typeof console !== 'undefined') { - if (err) { - if (console.error) { - console.error(err); - } - } - else if (console[name]) { - _forEach(args, function (x) { - console[name](x); - }); - } - } - }])); - }; - }; - async.log = _console_fn('log'); - async.dir = _console_fn('dir'); - /*async.info = _console_fn('info'); - async.warn = _console_fn('warn'); - async.error = _console_fn('error');*/ - - async.memoize = function (fn, hasher) { - var memo = {}; - var queues = {}; - hasher = hasher || function (x) { - return x; - }; - var memoized = function () { - var args = Array.prototype.slice.call(arguments); - var callback = args.pop(); - var key = hasher.apply(null, args); - if (key in memo) { - callback.apply(null, memo[key]); - } - else if (key in queues) { - queues[key].push(callback); - } - else { - queues[key] = [callback]; - fn.apply(null, args.concat([function () { - memo[key] = arguments; - var q = queues[key]; - delete queues[key]; - for (var i = 0, l = q.length; i < l; i++) { - q[i].apply(null, arguments); - } - }])); - } - }; - memoized.unmemoized = fn; - return memoized; - }; - - async.unmemoize = function (fn) { - return function () { - return (fn.unmemoized || fn).apply(null, arguments); - }; - }; - -}()); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/package.json deleted file mode 100644 index 31e18559..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "async", - "description": "Higher-order functions and common patterns for asynchronous code", - "main": "./index", - "author": { - "name": "Caolan McMahon" - }, - "version": "0.1.22", - "repository": { - "type": "git", - "url": "http://github.com/caolan/async.git" - }, - "bugs": { - "url": "http://github.com/caolan/async/issues" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/caolan/async/raw/master/LICENSE" - } - ], - "devDependencies": { - "nodeunit": ">0.0.0", - "uglify-js": "1.2.x", - "nodelint": ">0.0.0" - }, - "readme": "# Async.js\n\nAsync is a utility module which provides straight-forward, powerful functions\nfor working with asynchronous JavaScript. Although originally designed for\nuse with [node.js](http://nodejs.org), it can also be used directly in the\nbrowser.\n\nAsync provides around 20 functions that include the usual 'functional'\nsuspects (map, reduce, filter, forEach…) as well as some common patterns\nfor asynchronous control flow (parallel, series, waterfall…). All these\nfunctions assume you follow the node.js convention of providing a single\ncallback as the last argument of your async function.\n\n\n## Quick Examples\n\n async.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n });\n\n async.filter(['file1','file2','file3'], path.exists, function(results){\n // results now equals an array of the existing files\n });\n\n async.parallel([\n function(){ ... },\n function(){ ... }\n ], callback);\n\n async.series([\n function(){ ... },\n function(){ ... }\n ]);\n\nThere are many more functions available so take a look at the docs below for a\nfull list. This module aims to be comprehensive, so if you feel anything is\nmissing please create a GitHub issue for it.\n\n\n## Download\n\nReleases are available for download from\n[GitHub](http://github.com/caolan/async/downloads).\nAlternatively, you can install using Node Package Manager (npm):\n\n npm install async\n\n\n__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 17.5kb Uncompressed\n\n__Production:__ [async.min.js](https://github.com/caolan/async/raw/master/dist/async.min.js) - 1.7kb Packed and Gzipped\n\n\n## In the Browser\n\nSo far its been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage:\n\n <script type=\"text/javascript\" src=\"async.js\"></script>\n <script type=\"text/javascript\">\n\n async.map(data, asyncProcess, function(err, results){\n alert(results);\n });\n\n </script>\n\n\n## Documentation\n\n### Collections\n\n* [forEach](#forEach)\n* [map](#map)\n* [filter](#filter)\n* [reject](#reject)\n* [reduce](#reduce)\n* [detect](#detect)\n* [sortBy](#sortBy)\n* [some](#some)\n* [every](#every)\n* [concat](#concat)\n\n### Control Flow\n\n* [series](#series)\n* [parallel](#parallel)\n* [whilst](#whilst)\n* [until](#until)\n* [waterfall](#waterfall)\n* [queue](#queue)\n* [auto](#auto)\n* [iterator](#iterator)\n* [apply](#apply)\n* [nextTick](#nextTick)\n\n### Utils\n\n* [memoize](#memoize)\n* [unmemoize](#unmemoize)\n* [log](#log)\n* [dir](#dir)\n* [noConflict](#noConflict)\n\n\n## Collections\n\n<a name=\"forEach\" />\n### forEach(arr, iterator, callback)\n\nApplies an iterator function to each item in an array, in parallel.\nThe iterator is called with an item from the list and a callback for when it\nhas finished. If the iterator passes an error to this callback, the main\ncallback for the forEach function is immediately called with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n // assuming openFiles is an array of file names and saveFile is a function\n // to save the modified contents of that file:\n\n async.forEach(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n });\n\n---------------------------------------\n\n<a name=\"forEachSeries\" />\n### forEachSeries(arr, iterator, callback)\n\nThe same as forEach only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. This means the iterator functions will complete in order.\n\n\n---------------------------------------\n\n<a name=\"forEachLimit\" />\n### forEachLimit(arr, limit, iterator, callback)\n\nThe same as forEach only the iterator is applied to batches of items in the\narray, in series. The next batch of iterators is only called once the current\none has completed processing.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - How many items should be in each batch.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n // Assume documents is an array of JSON objects and requestApi is a\n // function that interacts with a rate-limited REST api.\n\n async.forEachLimit(documents, 20, requestApi, function(err){\n // if any of the saves produced an error, err would equal that error\n });\n---------------------------------------\n\n<a name=\"map\" />\n### map(arr, iterator, callback)\n\nProduces a new array of values by mapping each value in the given array through\nthe iterator function. The iterator is called with an item from the array and a\ncallback for when it has finished processing. The callback takes 2 arguments, \nan error and the transformed item from the array. If the iterator passes an\nerror to this callback, the main callback for the map function is immediately\ncalled with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order, however\nthe results array will be in the same order as the original array.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n async.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n });\n\n---------------------------------------\n\n<a name=\"mapSeries\" />\n### mapSeries(arr, iterator, callback)\n\nThe same as map only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n---------------------------------------\n\n<a name=\"filter\" />\n### filter(arr, iterator, callback)\n\n__Alias:__ select\n\nReturns a new array of all the values which pass an async truth test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(results) - A callback which is called after all the iterator\n functions have finished.\n\n__Example__\n\n async.filter(['file1','file2','file3'], path.exists, function(results){\n // results now equals an array of the existing files\n });\n\n---------------------------------------\n\n<a name=\"filterSeries\" />\n### filterSeries(arr, iterator, callback)\n\n__alias:__ selectSeries\n\nThe same as filter only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n---------------------------------------\n\n<a name=\"reject\" />\n### reject(arr, iterator, callback)\n\nThe opposite of filter. Removes values that pass an async truth test.\n\n---------------------------------------\n\n<a name=\"rejectSeries\" />\n### rejectSeries(arr, iterator, callback)\n\nThe same as filter, only the iterator is applied to each item in the array\nin series.\n\n\n---------------------------------------\n\n<a name=\"reduce\" />\n### reduce(arr, memo, iterator, callback)\n\n__aliases:__ inject, foldl\n\nReduces a list of values into a single value using an async iterator to return\neach successive step. Memo is the initial state of the reduction. This\nfunction only operates in series. For performance reasons, it may make sense to\nsplit a call to this function into a parallel map, then use the normal\nArray.prototype.reduce on the results. This function is for situations where\neach step in the reduction needs to be async, if you can get the data before\nreducing it then its probably a good idea to do so.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* memo - The initial state of the reduction.\n* iterator(memo, item, callback) - A function applied to each item in the\n array to produce the next step in the reduction. The iterator is passed a\n callback which accepts an optional error as its first argument, and the state\n of the reduction as the second. If an error is passed to the callback, the\n reduction is stopped and the main callback is immediately called with the\n error.\n* callback(err, result) - A callback which is called after all the iterator\n functions have finished. Result is the reduced value.\n\n__Example__\n\n async.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n }, function(err, result){\n // result is now equal to the last value of memo, which is 6\n });\n\n---------------------------------------\n\n<a name=\"reduceRight\" />\n### reduceRight(arr, memo, iterator, callback)\n\n__Alias:__ foldr\n\nSame as reduce, only operates on the items in the array in reverse order.\n\n\n---------------------------------------\n\n<a name=\"detect\" />\n### detect(arr, iterator, callback)\n\nReturns the first value in a list that passes an async truth test. The\niterator is applied in parallel, meaning the first iterator to return true will\nfire the detect callback with that result. That means the result might not be\nthe first item in the original array (in terms of order) that passes the test.\n\nIf order within the original array is important then look at detectSeries.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value undefined if none passed.\n\n__Example__\n\n async.detect(['file1','file2','file3'], path.exists, function(result){\n // result now equals the first file in the list that exists\n });\n\n---------------------------------------\n\n<a name=\"detectSeries\" />\n### detectSeries(arr, iterator, callback)\n\nThe same as detect, only the iterator is applied to each item in the array\nin series. This means the result is always the first in the original array (in\nterms of array order) that passes the truth test.\n\n\n---------------------------------------\n\n<a name=\"sortBy\" />\n### sortBy(arr, iterator, callback)\n\nSorts a list by the results of running each value through an async iterator.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and a value to use as the sort criteria.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is the items from\n the original array sorted by the values returned by the iterator calls.\n\n__Example__\n\n async.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n }, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n });\n\n\n---------------------------------------\n\n<a name=\"some\" />\n### some(arr, iterator, callback)\n\n__Alias:__ any\n\nReturns true if at least one element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists. Once any iterator\ncall returns true, the main callback is immediately called.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n either true or false depending on the values of the async tests.\n\n__Example__\n\n async.some(['file1','file2','file3'], path.exists, function(result){\n // if result is true then at least one of the files exists\n });\n\n---------------------------------------\n\n<a name=\"every\" />\n### every(arr, iterator, callback)\n\n__Alias:__ all\n\nReturns true if every element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called after all the iterator\n functions have finished. Result will be either true or false depending on\n the values of the async tests.\n\n__Example__\n\n async.every(['file1','file2','file3'], path.exists, function(result){\n // if result is true then every file exists\n });\n\n---------------------------------------\n\n<a name=\"concat\" />\n### concat(arr, iterator, callback)\n\nApplies an iterator to each item in a list, concatenating the results. Returns the\nconcatenated list. The iterators are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of the arguments passed to the iterator function.\n\n__Arguments__\n\n* arr - An array to iterate over\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and an array of results.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array containing\n the concatenated results of the iterator function.\n\n__Example__\n\n async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n });\n\n---------------------------------------\n\n<a name=\"concatSeries\" />\n### concatSeries(arr, iterator, callback)\n\nSame as async.concat, but executes in series instead of parallel.\n\n\n## Control Flow\n\n<a name=\"series\" />\n### series(tasks, [callback])\n\nRun an array of functions in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run and the callback for the series is\nimmediately called with the value of the error. Once the tasks have completed,\nthe results are passed to the final callback as an array.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.series.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed\n a callback it must call on completion.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets an array of all the arguments passed to\n the callbacks used in the array.\n\n__Example__\n\n async.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n },\n ],\n // optional callback\n function(err, results){\n // results is now equal to ['one', 'two']\n });\n\n\n // an example using an object instead of an array\n async.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n },\n },\n function(err, results) {\n // results is now equal to: {one: 1, two: 2}\n });\n\n\n---------------------------------------\n\n<a name=\"parallel\" />\n### parallel(tasks, [callback])\n\nRun an array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main callback is immediately called with the value of the error.\nOnce the tasks have completed, the results are passed to the final callback as an\narray.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.parallel.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed a\n callback it must call on completion.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets an array of all the arguments passed to\n the callbacks used in the array.\n\n__Example__\n\n async.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n },\n ],\n // optional callback\n function(err, results){\n // the results array will equal ['one','two'] even though\n // the second function had a shorter timeout.\n });\n\n\n // an example using an object instead of an array\n async.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n },\n },\n function(err, results) {\n // results is now equals to: {one: 1, two: 2}\n });\n\n\n---------------------------------------\n\n<a name=\"whilst\" />\n### whilst(test, fn, callback)\n\nRepeatedly call fn, while test returns true. Calls the callback when stopped,\nor an error occurs.\n\n__Arguments__\n\n* test() - synchronous truth test to perform before each execution of fn.\n* fn(callback) - A function to call each time the test passes. The function is\n passed a callback which must be called once it has completed with an optional\n error as the first argument.\n* callback(err) - A callback which is called after the test fails and repeated\n execution of fn has stopped.\n\n__Example__\n\n var count = 0;\n\n async.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n );\n\n\n---------------------------------------\n\n<a name=\"until\" />\n### until(test, fn, callback)\n\nRepeatedly call fn, until test returns true. Calls the callback when stopped,\nor an error occurs.\n\nThe inverse of async.whilst.\n\n\n---------------------------------------\n\n<a name=\"waterfall\" />\n### waterfall(tasks, [callback])\n\nRuns an array of functions in series, each passing their results to the next in\nthe array. However, if any of the functions pass an error to the callback, the\nnext function is not executed and the main callback is immediately called with\nthe error.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a callback it\n must call on completion.\n* callback(err, [results]) - An optional callback to run once all the functions\n have completed. This will be passed the results of the last task's callback.\n\n\n\n__Example__\n\n async.waterfall([\n function(callback){\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback){\n callback(null, 'three');\n },\n function(arg1, callback){\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n ], function (err, result) {\n // result now equals 'done' \n });\n\n\n---------------------------------------\n\n<a name=\"queue\" />\n### queue(worker, concurrency)\n\nCreates a queue object with the specified concurrency. Tasks added to the\nqueue will be processed in parallel (up to the concurrency limit). If all\nworkers are in progress, the task is queued until one is available. Once\na worker has completed a task, the task's callback is called.\n\n__Arguments__\n\n* worker(task, callback) - An asynchronous function for processing a queued\n task.\n* concurrency - An integer for determining how many worker functions should be\n run in parallel.\n\n__Queue objects__\n\nThe queue object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* concurrency - an integer for determining how many worker functions should be\n run in parallel. This property can be changed after a queue is created to\n alter the concurrency on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n // create a queue object with concurrency 2\n\n var q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n }, 2);\n\n\n // assign a callback\n q.drain = function() {\n console.log('all items have been processed');\n }\n\n // add some items to the queue\n\n q.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n });\n q.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n });\n\n // add some items to the queue (batch-wise)\n\n q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing bar');\n });\n\n\n---------------------------------------\n\n<a name=\"auto\" />\n### auto(tasks, [callback])\n\nDetermines the best order for running functions based on their requirements.\nEach function can optionally depend on other functions being completed first,\nand each function is run as soon as its requirements are satisfied. If any of\nthe functions pass an error to their callback, that function will not complete\n(so any other functions depending on it will not run) and the main callback\nwill be called immediately with the error. Functions also receive an object\ncontaining the results of functions which have completed so far.\n\n__Arguments__\n\n* tasks - An object literal containing named functions or an array of\n requirements, with the function itself the last item in the array. The key\n used for each function or array is used when specifying requirements. The\n syntax is easier to understand by looking at the example.\n* callback(err, results) - An optional callback which is called when all the\n tasks have been completed. The callback will receive an error as an argument\n if any tasks pass an error to their callback. If all tasks complete\n successfully, it will receive an object containing their results.\n\n__Example__\n\n async.auto({\n get_data: function(callback){\n // async code to get some data\n },\n make_folder: function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n },\n write_file: ['get_data', 'make_folder', function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, filename);\n }],\n email_link: ['write_file', function(callback, results){\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n }]\n });\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n async.parallel([\n function(callback){\n // async code to get some data\n },\n function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n }\n ],\n function(results){\n async.series([\n function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n },\n email_link: function(callback){\n // once the file is written let's email a link to it...\n }\n ]);\n });\n\nFor a complicated series of async tasks using the auto function makes adding\nnew tasks much easier and makes the code more readable.\n\n\n---------------------------------------\n\n<a name=\"iterator\" />\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the array,\nreturning a continuation to call the next one after that. Its also possible to\n'peek' the next iterator by doing iterator.next().\n\nThis function is used internally by the async module but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a callback it\n must call on completion.\n\n__Example__\n\n var iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n ]);\n\n node> var iterator2 = iterator();\n 'one'\n node> var iterator3 = iterator2();\n 'two'\n node> iterator3();\n 'three'\n node> var nextfn = iterator2.next();\n node> nextfn();\n 'three'\n\n\n---------------------------------------\n\n<a name=\"apply\" />\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied, a useful\nshorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n // using apply\n\n async.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n ]);\n\n\n // the same process without using apply\n\n async.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n },\n ]);\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n node> var fn = async.apply(sys.puts, 'one');\n node> fn('two', 'three');\n one\n two\n three\n\n---------------------------------------\n\n<a name=\"nextTick\" />\n### nextTick(callback)\n\nCalls the callback on a later loop around the event loop. In node.js this just\ncalls process.nextTick, in the browser it falls back to setTimeout(callback, 0),\nwhich means other higher priority events may precede the execution of the callback.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* callback - The function to call on a later loop around the event loop.\n\n__Example__\n\n var call_order = [];\n async.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two]\n });\n call_order.push('one')\n\n\n## Utils\n\n<a name=\"memoize\" />\n### memoize(fn, [hasher])\n\nCaches the results of an async function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\n__Arguments__\n\n* fn - the function you to proxy and cache results from.\n* hasher - an optional function for generating a custom hash for storing\n results, it has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n var slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n };\n var fn = async.memoize(slow_fn);\n\n // fn can now be used as if it were slow_fn\n fn('some name', function () {\n // callback\n });\n\n<a name=\"unmemoize\" />\n### unmemoize(fn)\n\nUndoes a memoized function, reverting it to the original, unmemoized\nform. Comes handy in tests.\n\n__Arguments__\n\n* fn - the memoized function\n\n<a name=\"log\" />\n### log(function, arguments)\n\nLogs the result of an async function to the console. Only works in node.js or\nin browsers that support console.log and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.log is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n var hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n };\n\n node> async.log(hello, 'world');\n 'hello world'\n\n\n---------------------------------------\n\n<a name=\"dir\" />\n### dir(function, arguments)\n\nLogs the result of an async function to the console using console.dir to\ndisplay the properties of the resulting object. Only works in node.js or\nin browsers that support console.dir and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.dir is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n var hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n };\n\n node> async.dir(hello, 'world');\n {hello: 'world'}\n\n\n---------------------------------------\n\n<a name=\"noConflict\" />\n### noConflict()\n\nChanges the value of async back to its original value, returning a reference to the\nasync object.\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/caolan/async", - "_id": "async@0.1.22", - "dist": { - "shasum": "3b270eedc0419d6f92a664444ce98e0f59a8fef7" - }, - "_from": "async@0.1.22", - "_resolved": "https://registry.npmjs.org/async/-/async-0.1.22.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/package.json deleted file mode 100644 index 1d8c8459..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "isbin", - "version": "0.0.2", - "description": "Checks for available binaries on unix machines", - "main": "index.js", - "engines": { - "node": ">= 0.8.0" - }, - "keywords": [ - "fs", - "bin", - "binary", - "exists", - "check", - "path" - ], - "scripts": { - "test": "make test" - }, - "repository": { - "type": "git", - "url": "git://github.com/behrendtio/isbin.git" - }, - "author": "", - "license": "MIT", - "dependencies": { - "async": "0.1.22" - }, - "devDependencies": { - "mocha": "1.7.3", - "should": "1.2.1" - }, - "readme": "[![Build Status](https://secure.travis-ci.org/mbehrendt/isbin.png?branch=master)](https://travis-ci.org/mbehrendt/isbin)\n\n# Isbin\n\nTiny little helper library to determine if a certain binary is available within $PATH or any additional folder.\n\n# Installation\n\n```bash\n$ npm install isbin\n```\n\n# Usage\n\n```js\nvar isbin = require('isbin');\n\n// Test against $PATH\nisbin('mysql', function(exists) {\n console.log(exists); // ==> Boolean\n});\n\n// With additional path to test\nisbin('mysql', '/usr/local/bin', function(exists) {\n console.log(exists); // ==> Boolean\n});\n\n// Or multiple ones\nisbin('mysql', ['/usr/local/bin', '/home/me/bins'], function(exists) {\n console.log(exists); // ==> Boolean\n});\n```\n\nThere are also synchronous versions available\n\n```js\nvar exists = isbin('mysql');\nvar exists = isbin('mysql', '/usr/local/bin');\nvar exists = isbin('mysql', ['/usr/local/bin', '/home/me/bins']);\n```\n\n# Running the tests\n\n```bash\n$ npm install\n$ make test\n```\n\n# License\n\n(The MIT License)\n\nCopyright (c) 2012 Mario Behrendt info@mario-behrendt.de, Stephan Hoyer <ste.hoyer@gmail.com>\n\nPermission 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:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE 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.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/behrendtio/isbin/issues" - }, - "homepage": "https://github.com/behrendtio/isbin", - "_id": "isbin@0.0.2", - "dist": { - "shasum": "2a35fb234ad5ee30f78da61b57e8f42ac43ec5a4" - }, - "_from": "isbin@0.0.2", - "_resolved": "https://registry.npmjs.org/isbin/-/isbin-0.0.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/test/isbin.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/test/isbin.js deleted file mode 100644 index 068a38a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/test/isbin.js +++ /dev/null @@ -1,39 +0,0 @@ -var isbin = require('../'); - -describe('isbin', function() { - it('accepts binary, additional path and callback', function(done) { - isbin('ls', '/etc', function(exists) { - exists.should.be.a('boolean'); - done(); - }) - }); - - it('accepts array of paths', function(done) { - isbin('ls', ['/etc', '/home'], function(exists) { - exists.should.be.a('boolean'); - done(); - }); - }); - - it('accepts just binary and callback', function(done) { - isbin('ls', function(exists) { - exists.should.be.a('boolean'); - done(); - }); - }); - - it('accepts binary, additional path and callback', function() { - var exists = isbin('ls', '/etc'); - exists.should.be.a('boolean'); - }); - - it('accepts array of paths', function() { - var exists = isbin('ls', ['/etc', '/home']); - exists.should.be.a('boolean'); - }); - - it('accepts just binary', function() { - var exists = isbin('ls'); - exists.should.be.a('boolean'); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/test/mocha.opts b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/test/mocha.opts deleted file mode 100644 index e5eb9f87..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/isbin/test/mocha.opts +++ /dev/null @@ -1,4 +0,0 @@ ---require should ---bail ---ui bdd ---slow 100 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/.editorconfig b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/.editorconfig deleted file mode 100644 index e036e247..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -; EditorConfig is awesome: http://EditorConfig.org - -; top-most EditorConfig file -root = true - -; base rules -[*] -end_of_line = lf -insert_final_newline = false -indent_style = space -indent_size = 4 -charset = utf-8 -trim_trailing_whitespace = true - -; The default indent on package.json is 2 spaces, better to keep it so we can -; use `npm install --save` and other features that rewrites the package.json -; file automatically -[package.json] -indent_style = space -indent_size = 2 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/.jshintrc b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/.jshintrc deleted file mode 100644 index bbdb29cf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/.jshintrc +++ /dev/null @@ -1,69 +0,0 @@ -{ - // Settings - "passfail" : false, // Stop on first error. - "maxerr" : 50, // Maximum error before stopping. - - - // Predefined globals whom JSHint will ignore. - "browser" : true, // Standard browser globals e.g. `window`, `document`. - "couch" : false, - "dojo" : false, - "jquery" : true, - "mootools" : false, - "node" : false, - "prototypejs" : false, - "rhino" : false, - "wsh" : false, - - // Custom globals. - "predef" : [ - "define", - "require" - ], - - - // Development. - "debug" : false, // Allow debugger statements e.g. browser breakpoints. - "devel" : false, // Allow developments statements e.g. `console.log();`. - - - // EcmaScript 5. - "es5" : false, // Allow EcmaScript 5 syntax. - "globalstrict" : false, // Allow global "use strict" (also enables 'strict'). - "strict" : false, // Require `use strict` pragma in every file. - - - // The Good Parts. - "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons). - "bitwise" : false, // Prohibit bitwise operators (&, |, ^, etc.). - "boss" : true, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments. - "curly" : false, // Require {} for every new block or scope. - "eqeqeq" : true, // Require triple equals i.e. `===`. - "eqnull" : true, // Tolerate use of `== null`. - "evil" : false, // Tolerate use of `eval`. - "expr" : false, // Tolerate `ExpressionStatement` as Programs. - "forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`. - "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` - "latedef" : false, // Prohibit variable use before definition. - "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons. - "loopfunc" : false, // Allow functions to be defined within loops. - "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`. - "regexdash" : true, // Tolerate unescaped last dash i.e. `[-...]`. - "regexp" : false, // Prohibit `.` and `[^...]` in regular expressions. - "scripturl" : false, // Tolerate script-targeted URLs. - "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`. - "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`. - "undef" : false, // Require all non-global variables be declared before they are used. - - - // Personal styling prefrences. - "newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`. - "noempty" : true, // Prohipit use of empty blocks. - "nomen" : false, // Prohibit use of initial or trailing underbars in names. - "nonew" : true, // Prohibit use of constructors for side-effects. - "onevar" : false, // Allow only one `var` statement per function. - "plusplus" : false, // Prohibit use of `++` & `--`. - "sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`. - "trailing" : true, // Prohibit trailing whitespaces. - "white" : false // Check against strict whitespace and indentation rules. -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/.npmignore deleted file mode 100644 index 1341acd9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/.npmignore +++ /dev/null @@ -1,30 +0,0 @@ -# dumb files -# ========== - -.tmp* -.project -.settings/ -.livereload -.DS_Store? -ehthumbs.db -Icon? -Thumbs.db - - -# stuff not needed by node -# ======================== - -node_modules/ -tests/ -_build/ -doc_html/ -coverage/ - -# we keep the doc/ folder in case npm decides to display it in the future -# also good in case user is using an old version or working offline - -# we also keep the src/ folder in case the user still needs the AMD modules -# after build (see issue #102) - -bower.json -build.js diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/.travis.yml deleted file mode 100644 index 36de1532..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ - language: node_js - node_js: - - "0.8" - script: "npm test --coverage" - notifications: - irc: - channels: - - "irc.freenode.org#moutjs" - on_success: always - on_failure: always - use_notice: true - skip_join: true - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/CHANGELOG.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/CHANGELOG.md deleted file mode 100644 index 0f5eac12..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/CHANGELOG.md +++ /dev/null @@ -1,93 +0,0 @@ -mout changelog -============== - -v0.6.0 (2013/05/22) -------------------- - - - add optional delimeter to `string/unCamelCase` - - allow custom char on `number/pad` - - allow underscore characters in `string/removeNonWord` - - accept `level` on `array/flatten` instead of a flag - - convert underscores to camelCase in `string/camelCase` - - remove `create()` from number/currencyFormat - - add `date/dayOfTheYear` - - add `date/diff` - - add `date/isSame` - - add `date/startOf` - - add `date/strftime` - - add `date/timezoneAbbr` - - add `date/timezoneOffset` - - add `date/totalDaysInYear` - - add `date/weekOfTheYear` - - add `function/timeout` - - add `object/bindAll` - - add `object/functions` - - add `time/convert` - - -v0.5.0 (2013/04/04) -------------------- - - - add `array/collect` - - add `callback` parameter to `object/equals` and `object/deepEquals` to allow - custom compare operations. - - normalize behavior in `array/*` methods to treat `null` values as empty - arrays when reading from array - - add `date/parseIso` - - add `date/isLeapYear` - - add `date/totalDaysInMonth` - - add `object/deepMatches` - - change `function/makeIterator_` to use `deepMatches` (affects nearly all - iteration methods) - - add `thisObj` parameter to `array/min` and `array/max` - - -v0.4.0 (2013/02/26) -------------------- - - - add `object/equals` - - add `object/deepEquals` - - add `object/matches`. - - add `lang/is` and `lang/isnt`. - - add `lang/isInteger`. - - add `array/findIndex`. - - add shorthand syntax to `array/*`, `object/*` and `collection/*` methods. - - improve `number/sign` behavior when value is NaN or +0 or -0. - - improve `lang/isNaN` to actually check if value *is not a number* without - coercing value; so `[]`, `""`, `null` and `"12"` are considered NaN (#39). - - improve `string/contains` to match ES6 behavior (add fromIndex argument). - - -v0.3.0 (2013/02/01) -------------------- - - - add `lang/clone`. - - add `lang/toString`. - - add `string/replace`. - - add `string/WHITE_SPACES` - - rename `function/curry` to `function/partial`. - - allow custom chars in `string/trim`, `ltrim`, and `rtrim`. - - convert values to strings in the `string/*` functions. - - -v0.2.0 (2013/01/13) -------------------- - - - fix bug in `math/ceil` for negative radixes. - - change `object/deepFillIn` and `object/deepMixIn` to recurse only if both - existing and new values are plain objects. Will not recurse into arrays - or objects not created by the Object constructor. - - add `lang/isPlainObject` to check if a file is a valid object and is created - by the Object constructor - - change `lang/clone` behavior when dealing with custom types (avoid cloning - it by default) and add second argument to allow custom behavior if needed. - - rename `lang/clone` to `lang/deepClone`. - - add VERSION property to index.js - - simplify `math/floor`, `math/round`, `math/ceil` and `math/countSteps`. - - -v0.1.0 (2013/01/09) -------------------- - -- Rename project from "amd-utils" to "mout" - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/CONTRIBUTING.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/CONTRIBUTING.md deleted file mode 100644 index 65d9add1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/CONTRIBUTING.md +++ /dev/null @@ -1,61 +0,0 @@ -# Contributing - -Fork the repo at https://github.com/mout/mout - - > "Write clearly, don't be too clever" - The Elements of Programming Style - -Avoid unnamed functions and follow the other modules structure. By only using named functions it will be easier to extract the code from the AMD module if needed and it will also give better error messages, JavaScript minifiers like [Google Closure Compiler](http://code.google.com/closure/compiler/) and [UglifyJS](https://github.com/mishoo/UglifyJS) will make sure code is as small/optimized as possible. - - > "Make it clear before you make it faster." - The Elements of Programming Style - -Be sure to always create tests for each proposed module. Features will only be merged if they contain proper tests and documentation. - - > "Good code is its own best documentation." - Steve McConnell - -We should do a code review before merging to make sure names makes sense and implementation is as good as possible. - -Try to split your pull requests into logical groups, the smaller the easier to be reviewed/merged. - - - -## Tests & Code Coverage ## - -Tests can be found inside the `tests` folder, to execute them in the browser open the `tests/runner.html`. The same tests also work on node.js by running `npm test`. - -We should have tests for all methods and ensure we have a high code coverage through our continuous integration server ([travis](https://travis-ci.org/mout/mout)). When you ask for a pull request Travis will automatically run the tests on node.js and check the code coverage as well. - -We run `node build pkg` automatically before any `npm test`, so specs and packages should always be in sync. (will avoid human mistakes) - -To check code coverage run `npm test --coverage`, it will generate the reports inside the `coverage` folder and also log the results. Please note that node.js doesn't execute all code branches since we have some conditionals that are only met on old JavaScript engines (eg. IE 7-8), so we will never have 100% code coverage (but should be close to it). - - - -## Build Script ## - -The [build script](https://github.com/mout/mout/wiki/Build-Script) can be extremely helpful and can avoid human mistakes, use it. - - - -## Admins / Pull Requests ## - -Even if you are an admin (have commit rights) please do pull requests when adding new features or changing current behavior, that way we can review the work and discuss. Feel free to push changes that doesn't affect behavior without asking for a pull request (readme, changelog, build script, typos, refactoring, ...). - - - -## Large changes ## - -If you are proposing some major change, please create an issue to discuss it first. (maybe it's outside the scope of the project) - - - -## Questions / IRC / Wiki / Issue Tracker ## - -When in doubt ask someone on IRC to help you ([#moutjs on irc.freenode.net](http://webchat.freenode.net/?channels=moutjs)) or create a [new issue](http://github.com/mout/mout/issues). - -The [project wiki](https://github.com/mout/mout/wiki) can also be a good resource of information. - - ---- - -Check the [contributors list at github](https://github.com/mout/mout/contributors). - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/LICENSE.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/LICENSE.md deleted file mode 100644 index e9ccc2be..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -# The MIT License (MIT) -## Copyright (c) 2012, 2013 moutjs team and contributors (http://moutjs.com) - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/README.md deleted file mode 100644 index 872943bd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/README.md +++ /dev/null @@ -1,63 +0,0 @@ -![mout](http://moutjs.com/logo.png "Modular JavaScript Utilties") - -http://moutjs.com/ - -[![Build Status](https://travis-ci.org/mout/mout.png?branch=master)](https://travis-ci.org/mout/mout) - -All code is library agnostic and consist mostly of helper methods that aren't -directly related with the DOM, the purpose of this library isn't to replace -Dojo, jQuery, YUI, Mootools, etc, but to provide modular solutions for common -problems that aren't solved by most of them. Consider it as a crossbrowser -JavaScript standard library. - - - -## Main goals ## - - - increase code reuse; - - be clear (code should be clean/readable); - - be easy to debug; - - be easy to maintain; - - follow best practices; - - follow standards when possible; - - **don't convert JavaScript into another language!** - - be compatible with other frameworks; - - be modular; - - have unit tests for all modules; - - work on multiple environments (IE7+, modern browsers, node.js); - - - -## What shouldn't be here ## - - - UI components; - - CSS selector engine; - - Event system - pub/sub; - - Template engine; - - Anything that isn't generic enough to be on a standard library; - - Anything that could be a separate library and/or isn't a modular utility... - - - -## API Documentation ## - -Online documentation can be found at http://moutjs.com/ or inside the -`doc` folder. - - - -## FAQ / Wiki / IRC ## - -For more info about project structure, design decisions, tips, how to -contribute, build system, etc, please check the [project -wiki](https://github.com/mout/mout/wiki). - -We also have an IRC channel [#moutjs on -irc.freenode.net](http://webchat.freenode.net/?channels=moutjs) - - - -## License ## - -Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php). - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array.js deleted file mode 100644 index 89d388ba..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array.js +++ /dev/null @@ -1,46 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'append' : require('./array/append'), - 'collect' : require('./array/collect'), - 'combine' : require('./array/combine'), - 'compact' : require('./array/compact'), - 'contains' : require('./array/contains'), - 'difference' : require('./array/difference'), - 'every' : require('./array/every'), - 'filter' : require('./array/filter'), - 'find' : require('./array/find'), - 'findIndex' : require('./array/findIndex'), - 'flatten' : require('./array/flatten'), - 'forEach' : require('./array/forEach'), - 'indexOf' : require('./array/indexOf'), - 'insert' : require('./array/insert'), - 'intersection' : require('./array/intersection'), - 'invoke' : require('./array/invoke'), - 'join' : require('./array/join'), - 'lastIndexOf' : require('./array/lastIndexOf'), - 'map' : require('./array/map'), - 'max' : require('./array/max'), - 'min' : require('./array/min'), - 'pick' : require('./array/pick'), - 'pluck' : require('./array/pluck'), - 'range' : require('./array/range'), - 'reduce' : require('./array/reduce'), - 'reduceRight' : require('./array/reduceRight'), - 'reject' : require('./array/reject'), - 'remove' : require('./array/remove'), - 'removeAll' : require('./array/removeAll'), - 'shuffle' : require('./array/shuffle'), - 'some' : require('./array/some'), - 'sort' : require('./array/sort'), - 'split' : require('./array/split'), - 'toLookup' : require('./array/toLookup'), - 'union' : require('./array/union'), - 'unique' : require('./array/unique'), - 'xor' : require('./array/xor'), - 'zip' : require('./array/zip') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/append.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/append.js deleted file mode 100644 index bf74037e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/append.js +++ /dev/null @@ -1,21 +0,0 @@ - - - /** - * Appends an array to the end of another. - * The first array will be modified. - */ - function append(arr1, arr2) { - if (arr2 == null) { - return arr1; - } - - var pad = arr1.length, - i = -1, - len = arr2.length; - while (++i < len) { - arr1[pad + i] = arr2[i]; - } - return arr1; - } - module.exports = append; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/collect.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/collect.js deleted file mode 100644 index 58637493..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/collect.js +++ /dev/null @@ -1,27 +0,0 @@ -var append = require('./append'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Maps the items in the array and concatenates the result arrays. - */ - function collect(arr, callback, thisObj){ - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length; - while (++i < len) { - var value = callback(arr[i], i, arr); - if (value != null) { - append(results, value); - } - } - - return results; - } - - module.exports = collect; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/combine.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/combine.js deleted file mode 100644 index d66e6212..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/combine.js +++ /dev/null @@ -1,22 +0,0 @@ -var indexOf = require('./indexOf'); - - /** - * Combines an array with all the items of another. - * Does not allow duplicates and is case and type sensitive. - */ - function combine(arr1, arr2) { - if (arr2 == null) { - return arr1; - } - - var i = -1, len = arr2.length; - while (++i < len) { - if (indexOf(arr1, arr2[i]) === -1) { - arr1.push(arr2[i]); - } - } - - return arr1; - } - module.exports = combine; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/compact.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/compact.js deleted file mode 100644 index 74c176ed..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/compact.js +++ /dev/null @@ -1,13 +0,0 @@ -var filter = require('./filter'); - - /** - * Remove all null/undefined items from array. - */ - function compact(arr) { - return filter(arr, function(val){ - return (val != null); - }); - } - - module.exports = compact; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/contains.js deleted file mode 100644 index 92bb6ad9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/contains.js +++ /dev/null @@ -1,10 +0,0 @@ -var indexOf = require('./indexOf'); - - /** - * If array contains values. - */ - function contains(arr, val) { - return indexOf(arr, val) !== -1; - } - module.exports = contains; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/difference.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/difference.js deleted file mode 100644 index d0570510..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/difference.js +++ /dev/null @@ -1,22 +0,0 @@ -var unique = require('./unique'); -var filter = require('./filter'); -var some = require('./some'); -var contains = require('./contains'); - - - /** - * Return a new Array with elements that aren't present in the other Arrays. - */ - function difference(arr) { - var arrs = Array.prototype.slice.call(arguments, 1), - result = filter(unique(arr), function(needle){ - return !some(arrs, function(haystack){ - return contains(haystack, needle); - }); - }); - return result; - } - - module.exports = difference; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/every.js deleted file mode 100644 index ac598832..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/every.js +++ /dev/null @@ -1,27 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Array every - */ - function every(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = true; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (!callback(arr[i], i, arr) ) { - result = false; - break; - } - } - - return result; - } - - module.exports = every; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/filter.js deleted file mode 100644 index ebeb58dc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/filter.js +++ /dev/null @@ -1,27 +0,0 @@ -var forEach = require('./forEach'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Array filter - */ - function filter(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - if (callback(value, i, arr)) { - results.push(value); - } - } - - return results; - } - - module.exports = filter; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/find.js deleted file mode 100644 index b4a73131..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/find.js +++ /dev/null @@ -1,13 +0,0 @@ -var findIndex = require('./findIndex'); - - /** - * Returns first item that matches criteria - */ - function find(arr, iterator, thisObj){ - var idx = findIndex(arr, iterator, thisObj); - return idx >= 0? arr[idx] : void(0); - } - - module.exports = find; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/findIndex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/findIndex.js deleted file mode 100644 index 53f22a5f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/findIndex.js +++ /dev/null @@ -1,23 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Returns the index of the first item that matches criteria - */ - function findIndex(arr, iterator, thisObj){ - iterator = makeIterator(iterator, thisObj); - if (arr == null) { - return -1; - } - - var i = -1, len = arr.length; - while (++i < len) { - if (iterator(arr[i], i, arr)) { - return i; - } - } - - return -1; - } - - module.exports = findIndex; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/flatten.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/flatten.js deleted file mode 100644 index aa9757ab..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/flatten.js +++ /dev/null @@ -1,43 +0,0 @@ -var isArray = require('../lang/isArray'); -var append = require('./append'); - - /* - * Helper function to flatten to a destination array. - * Used to remove the need to create intermediate arrays while flattening. - */ - function flattenTo(arr, result, level) { - if (arr == null) { - return result; - } else if (level === 0) { - append(result, arr); - return result; - } - - var value, - i = -1, - len = arr.length; - while (++i < len) { - value = arr[i]; - if (isArray(value)) { - flattenTo(value, result, level - 1); - } else { - result.push(value); - } - } - return result; - } - - /** - * Recursively flattens an array. - * A new array containing all the elements is returned. - * If `shallow` is true, it will only flatten one level. - */ - function flatten(arr, level) { - level = level == null? -1 : level; - return flattenTo(arr, [], level); - } - - module.exports = flatten; - - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/forEach.js deleted file mode 100644 index 268e506f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/forEach.js +++ /dev/null @@ -1,23 +0,0 @@ - - - /** - * Array forEach - */ - function forEach(arr, callback, thisObj) { - if (arr == null) { - return; - } - var i = -1, - len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if ( callback.call(thisObj, arr[i], i, arr) === false ) { - break; - } - } - } - - module.exports = forEach; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/indexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/indexOf.js deleted file mode 100644 index 6a9ac832..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/indexOf.js +++ /dev/null @@ -1,28 +0,0 @@ - - - /** - * Array.indexOf - */ - function indexOf(arr, item, fromIndex) { - fromIndex = fromIndex || 0; - if (arr == null) { - return -1; - } - - var len = arr.length, - i = fromIndex < 0 ? len + fromIndex : fromIndex; - while (i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (arr[i] === item) { - return i; - } - - i++; - } - - return -1; - } - - module.exports = indexOf; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/insert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/insert.js deleted file mode 100644 index f1f95b75..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/insert.js +++ /dev/null @@ -1,15 +0,0 @@ -var difference = require('./difference'); -var toArray = require('../lang/toArray'); - - /** - * Insert item into array if not already present. - */ - function insert(arr, rest_items) { - var diff = difference(toArray(arguments).slice(1), arr); - if (diff.length) { - Array.prototype.push.apply(arr, diff); - } - return arr.length; - } - module.exports = insert; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/intersection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/intersection.js deleted file mode 100644 index e6170062..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/intersection.js +++ /dev/null @@ -1,23 +0,0 @@ -var unique = require('./unique'); -var filter = require('./filter'); -var every = require('./every'); -var contains = require('./contains'); - - - /** - * Return a new Array with elements common to all Arrays. - * - based on underscore.js implementation - */ - function intersection(arr) { - var arrs = Array.prototype.slice.call(arguments, 1), - result = filter(unique(arr), function(needle){ - return every(arrs, function(haystack){ - return contains(haystack, needle); - }); - }); - return result; - } - - module.exports = intersection; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/invoke.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/invoke.js deleted file mode 100644 index c01aab1b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/invoke.js +++ /dev/null @@ -1,23 +0,0 @@ -var forEach = require('./forEach'); - - /** - * Call `methodName` on each item of the array passing custom arguments if - * needed. - */ - function invoke(arr, methodName, var_args){ - if (arr == null) { - return arr; - } - - var args = Array.prototype.slice.call(arguments, 2); - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - value[methodName].apply(value, args); - } - - return arr; - } - - module.exports = invoke; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/join.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/join.js deleted file mode 100644 index 71d8bd20..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/join.js +++ /dev/null @@ -1,17 +0,0 @@ -var filter = require('./filter'); - - function isValidString(val) { - return (val != null && val !== ''); - } - - /** - * Joins strings with the specified separator inserted between each value. - * Null values and empty strings will be excluded. - */ - function join(items, separator) { - separator = separator || ''; - return filter(items, isValidString).join(separator); - } - - module.exports = join; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/lastIndexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/lastIndexOf.js deleted file mode 100644 index ee44a25b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/lastIndexOf.js +++ /dev/null @@ -1,28 +0,0 @@ - - - /** - * Array lastIndexOf - */ - function lastIndexOf(arr, item, fromIndex) { - if (arr == null) { - return -1; - } - - var len = arr.length; - fromIndex = (fromIndex == null || fromIndex >= len)? len - 1 : fromIndex; - fromIndex = (fromIndex < 0)? len + fromIndex : fromIndex; - - while (fromIndex >= 0) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (arr[fromIndex] === item) { - return fromIndex; - } - fromIndex--; - } - - return -1; - } - - module.exports = lastIndexOf; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/map.js deleted file mode 100644 index 54064f6b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/map.js +++ /dev/null @@ -1,23 +0,0 @@ -var forEach = require('./forEach'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Array map - */ - function map(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null){ - return results; - } - - var i = -1, len = arr.length; - while (++i < len) { - results[i] = callback(arr[i], i, arr); - } - - return results; - } - - module.exports = map; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/max.js deleted file mode 100644 index 183b10ea..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/max.js +++ /dev/null @@ -1,35 +0,0 @@ -var forEach = require('./forEach'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Return maximum value inside array - */ - function max(arr, iterator, thisObj){ - if (arr == null || !arr.length) { - return Infinity; - } else if (arr.length && !iterator) { - return Math.max.apply(Math, arr); - } else { - iterator = makeIterator(iterator, thisObj); - var result, - compare = -Infinity, - value, - temp; - - var i = -1, len = arr.length; - while (++i < len) { - value = arr[i]; - temp = iterator(value, i, arr); - if (temp > compare) { - compare = temp; - result = value; - } - } - - return result; - } - } - - module.exports = max; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/min.js deleted file mode 100644 index dd00b6cf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/min.js +++ /dev/null @@ -1,35 +0,0 @@ -var forEach = require('./forEach'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Return minimum value inside array - */ - function min(arr, iterator, thisObj){ - if (arr == null || !arr.length) { - return -Infinity; - } else if (arr.length && !iterator) { - return Math.min.apply(Math, arr); - } else { - iterator = makeIterator(iterator, thisObj); - var result, - compare = Infinity, - value, - temp; - - var i = -1, len = arr.length; - while (++i < len) { - value = arr[i]; - temp = iterator(value, i, arr); - if (temp < compare) { - compare = temp; - result = value; - } - } - - return result; - } - } - - module.exports = min; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/pick.js deleted file mode 100644 index 6a54846c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/pick.js +++ /dev/null @@ -1,14 +0,0 @@ -var randInt = require('../random/randInt'); - - /** - * Remove a random item from the Array and return it - */ - function pick(arr){ - if (arr == null || !arr.length) return; - var idx = randInt(0, arr.length - 1); - return arr.splice(idx, 1)[0]; - } - - module.exports = pick; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/pluck.js deleted file mode 100644 index fef4043b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/pluck.js +++ /dev/null @@ -1,12 +0,0 @@ -var map = require('./map'); - - /** - * Extract a list of property values. - */ - function pluck(arr, propName){ - return map(arr, propName); - } - - module.exports = pluck; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/range.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/range.js deleted file mode 100644 index 31d3c770..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/range.js +++ /dev/null @@ -1,27 +0,0 @@ -var countSteps = require('../math/countSteps'); - - /** - * Returns an Array of numbers inside range. - */ - function range(start, stop, step) { - if (stop == null) { - stop = start; - start = 0; - } - step = step || 1; - - var result = [], - nSteps = countSteps(stop - start, step), - i = start; - - while (i <= stop) { - result.push(i); - i += step; - } - - return result; - } - - module.exports = range; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/reduce.js deleted file mode 100644 index 1a350c6e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/reduce.js +++ /dev/null @@ -1,33 +0,0 @@ -var forEach = require('./forEach'); - - /** - * Array reduce - */ - function reduce(arr, fn, initVal) { - // check for args.length since initVal might be "undefined" see #gh-57 - var hasInit = arguments.length > 2, - result = initVal; - - if (arr == null || !arr.length) { - if (!hasInit) { - throw new Error('reduce of empty array with no initial value'); - } else { - return initVal; - } - } - - var i = -1, len = arr.length; - while (++i < len) { - if (!hasInit) { - result = arr[i]; - hasInit = true; - } else { - result = fn(result, arr[i], i, arr); - } - } - - return result; - } - - module.exports = reduce; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/reduceRight.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/reduceRight.js deleted file mode 100644 index e36fd4aa..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/reduceRight.js +++ /dev/null @@ -1,34 +0,0 @@ - - - /** - * Array reduceRight - */ - function reduceRight(arr, fn, initVal) { - // check for args.length since initVal might be "undefined" see #gh-57 - var hasInit = arguments.length > 2; - - if (arr == null || !arr.length) { - if (hasInit) { - return initVal; - } else { - throw new Error('reduce of empty array with no initial value'); - } - } - - var i = arr.length, result = initVal, value; - while (--i >= 0) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - value = arr[i]; - if (!hasInit) { - result = value; - hasInit = true; - } else { - result = fn(result, value, i, arr); - } - } - return result; - } - - module.exports = reduceRight; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/reject.js deleted file mode 100644 index 685f2918..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/reject.js +++ /dev/null @@ -1,26 +0,0 @@ -var forEach = require('./forEach'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Array reject - */ - function reject(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - if (!callback(value, i, arr)) { - results.push(value); - } - } - - return results; - } - - module.exports = reject; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/remove.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/remove.js deleted file mode 100644 index aa6517db..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/remove.js +++ /dev/null @@ -1,13 +0,0 @@ -var indexOf = require('./indexOf'); - - /** - * Remove a single item from the array. - * (it won't remove duplicates, just a single item) - */ - function remove(arr, item){ - var idx = indexOf(arr, item); - if (idx !== -1) arr.splice(idx, 1); - } - - module.exports = remove; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/removeAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/removeAll.js deleted file mode 100644 index d5f7f3b6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/removeAll.js +++ /dev/null @@ -1,15 +0,0 @@ -var indexOf = require('./indexOf'); - - /** - * Remove all instances of an item from array. - */ - function removeAll(arr, item){ - var idx = indexOf(arr, item); - while (idx !== -1) { - arr.splice(idx, 1); - idx = indexOf(arr, item, idx); - } - } - - module.exports = removeAll; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/shuffle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/shuffle.js deleted file mode 100644 index 97805ec8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/shuffle.js +++ /dev/null @@ -1,29 +0,0 @@ -var randInt = require('../random/randInt'); -var forEach = require('./forEach'); - - /** - * Shuffle array items. - */ - function shuffle(arr) { - var results = [], - rnd; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - if (!i) { - results[0] = arr[0]; - } else { - rnd = randInt(0, i); - results[i] = results[rnd]; - results[rnd] = arr[i]; - } - } - - return results; - } - - module.exports = shuffle; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/some.js deleted file mode 100644 index 8d17772b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/some.js +++ /dev/null @@ -1,27 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Array some - */ - function some(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = false; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if ( callback(arr[i], i, arr) ) { - result = true; - break; - } - } - - return result; - } - - module.exports = some; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/sort.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/sort.js deleted file mode 100644 index 7807339b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/sort.js +++ /dev/null @@ -1,55 +0,0 @@ - - - /** - * Merge sort (http://en.wikipedia.org/wiki/Merge_sort) - */ - function mergeSort(arr, compareFn) { - if (arr == null) { - return []; - } else if (arr.length < 2) { - return arr; - } - - if (compareFn == null) { - compareFn = defaultCompare; - } - - var mid, left, right; - - mid = ~~(arr.length / 2); - left = mergeSort( arr.slice(0, mid), compareFn ); - right = mergeSort( arr.slice(mid, arr.length), compareFn ); - - return merge(left, right, compareFn); - } - - function defaultCompare(a, b) { - return a < b ? -1 : (a > b? 1 : 0); - } - - function merge(left, right, compareFn) { - var result = []; - - while (left.length && right.length) { - if (compareFn(left[0], right[0]) <= 0) { - // if 0 it should preserve same order (stable) - result.push(left.shift()); - } else { - result.push(right.shift()); - } - } - - if (left.length) { - result.push.apply(result, left); - } - - if (right.length) { - result.push.apply(result, right); - } - - return result; - } - - module.exports = mergeSort; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/split.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/split.js deleted file mode 100644 index 4f3ba50c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/split.js +++ /dev/null @@ -1,35 +0,0 @@ - - - /** - * Split array into a fixed number of segments. - */ - function split(array, segments) { - segments = segments || 2; - var results = []; - if (array == null) { - return results; - } - - var minLength = Math.floor(array.length / segments), - remainder = array.length % segments, - i = 0, - len = array.length, - segmentIndex = 0, - segmentLength; - - while (i < len) { - segmentLength = minLength; - if (segmentIndex < remainder) { - segmentLength++; - } - - results.push(array.slice(i, i + segmentLength)); - - segmentIndex++; - i += segmentLength; - } - - return results; - } - module.exports = split; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/toLookup.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/toLookup.js deleted file mode 100644 index ce4c55dd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/toLookup.js +++ /dev/null @@ -1,28 +0,0 @@ -var isFunction = require('../lang/isFunction'); - - /** - * Creates an object that holds a lookup for the objects in the array. - */ - function toLookup(arr, key) { - var result = {}; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length, value; - if (isFunction(key)) { - while (++i < len) { - value = arr[i]; - result[key(value)] = value; - } - } else { - while (++i < len) { - value = arr[i]; - result[value[key]] = value; - } - } - - return result; - } - module.exports = toLookup; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/union.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/union.js deleted file mode 100644 index f1334a91..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/union.js +++ /dev/null @@ -1,19 +0,0 @@ -var unique = require('./unique'); -var append = require('./append'); - - /** - * Concat multiple arrays and remove duplicates - */ - function union(arrs) { - var results = []; - var i = -1, len = arguments.length; - while (++i < len) { - append(results, arguments[i]); - } - - return unique(results); - } - - module.exports = union; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/unique.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/unique.js deleted file mode 100644 index 0192b2df..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/unique.js +++ /dev/null @@ -1,17 +0,0 @@ -var indexOf = require('./indexOf'); -var filter = require('./filter'); - - /** - * @return {array} Array of unique items - */ - function unique(arr){ - return filter(arr, isUnique); - } - - function isUnique(item, i, arr){ - return indexOf(arr, item, i+1) === -1; - } - - module.exports = unique; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/xor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/xor.js deleted file mode 100644 index c125a996..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/xor.js +++ /dev/null @@ -1,26 +0,0 @@ -var unique = require('./unique'); -var filter = require('./filter'); -var contains = require('./contains'); - - - /** - * Exclusive OR. Returns items that are present in a single array. - * - like ptyhon's `symmetric_difference` - */ - function xor(arr1, arr2) { - arr1 = unique(arr1); - arr2 = unique(arr2); - - var a1 = filter(arr1, function(item){ - return !contains(arr2, item); - }), - a2 = filter(arr2, function(item){ - return !contains(arr1, item); - }); - - return a1.concat(a2); - } - - module.exports = xor; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/zip.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/zip.js deleted file mode 100644 index 931eb818..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/array/zip.js +++ /dev/null @@ -1,29 +0,0 @@ -var max = require('./max'); -var pluck = require('./pluck'); -var map = require('./map'); - - function getLength(arr) { - return arr == null ? 0 : arr.length; - } - - /** - * Merges together the values of each of the arrays with the values at the - * corresponding position. - */ - function zip(arr){ - var len = arr ? max(map(arguments, getLength)) : 0, - results = [], - i = -1, - item; - while (++i < len) { - results.push(map(arguments, function(item) { - return item == null ? undefined : item[i]; - })); - } - - return results; - } - - module.exports = zip; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection.js deleted file mode 100644 index d5cf6cad..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection.js +++ /dev/null @@ -1,22 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'contains' : require('./collection/contains'), - 'every' : require('./collection/every'), - 'filter' : require('./collection/filter'), - 'find' : require('./collection/find'), - 'forEach' : require('./collection/forEach'), - 'make_' : require('./collection/make_'), - 'map' : require('./collection/map'), - 'max' : require('./collection/max'), - 'min' : require('./collection/min'), - 'pluck' : require('./collection/pluck'), - 'reduce' : require('./collection/reduce'), - 'reject' : require('./collection/reject'), - 'size' : require('./collection/size'), - 'some' : require('./collection/some') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/contains.js deleted file mode 100644 index a73f994b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/contains.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrContains = require('../array/contains'); -var objContains = require('../object/contains'); - - /** - */ - module.exports = make(arrContains, objContains); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/every.js deleted file mode 100644 index 300e03c5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/every.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrEvery = require('../array/every'); -var objEvery = require('../object/every'); - - /** - */ - module.exports = make(arrEvery, objEvery); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/filter.js deleted file mode 100644 index 38757005..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/filter.js +++ /dev/null @@ -1,23 +0,0 @@ -var forEach = require('./forEach'); -var makeIterator = require('../function/makeIterator_'); - - /** - * filter collection values, returns array. - */ - function filter(list, iterator, thisObj) { - iterator = makeIterator(iterator, thisObj); - var results = []; - if (!list) { - return results; - } - forEach(list, function(value, index, list) { - if (iterator(value, index, list)) { - results[results.length] = value; - } - }); - return results; - } - - module.exports = filter; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/find.js deleted file mode 100644 index 14317e64..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/find.js +++ /dev/null @@ -1,10 +0,0 @@ -var make = require('./make_'); -var arrFind = require('../array/find'); -var objFind = require('../object/find'); - - /** - * Find value that returns true on iterator check. - */ - module.exports = make(arrFind, objFind); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/forEach.js deleted file mode 100644 index 6e28dcb1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/forEach.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrForEach = require('../array/forEach'); -var objForEach = require('../object/forOwn'); - - /** - */ - module.exports = make(arrForEach, objForEach); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/make_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/make_.js deleted file mode 100644 index 029d27bf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/make_.js +++ /dev/null @@ -1,19 +0,0 @@ - - - /** - * internal method used to create other collection modules. - */ - function makeCollectionMethod(arrMethod, objMethod, defaultReturn) { - return function(){ - var args = Array.prototype.slice.call(arguments); - if (args[0] == null) { - return defaultReturn; - } - // array-like is treated as array - return (typeof args[0].length === 'number')? arrMethod.apply(null, args) : objMethod.apply(null, args); - }; - } - - module.exports = makeCollectionMethod; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/map.js deleted file mode 100644 index fc157f53..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/map.js +++ /dev/null @@ -1,23 +0,0 @@ -var isObject = require('../lang/isObject'); -var values = require('../object/values'); -var arrMap = require('../array/map'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Map collection values, returns Array. - */ - function map(list, callback, thisObj) { - callback = makeIterator(callback, thisObj); - // list.length to check array-like object, if not array-like - // we simply map all the object values - if( isObject(list) && list.length == null ){ - list = values(list); - } - return arrMap(list, function (val, key, list) { - return callback(val, key, list); - }); - } - - module.exports = map; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/max.js deleted file mode 100644 index a8490e7e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/max.js +++ /dev/null @@ -1,10 +0,0 @@ -var make = require('./make_'); -var arrMax = require('../array/max'); -var objMax = require('../object/max'); - - /** - * Get maximum value inside collection - */ - module.exports = make(arrMax, objMax); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/min.js deleted file mode 100644 index 51d9f148..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/min.js +++ /dev/null @@ -1,10 +0,0 @@ -var make = require('./make_'); -var arrMin = require('../array/min'); -var objMin = require('../object/min'); - - /** - * Get minimum value inside collection. - */ - module.exports = make(arrMin, objMin); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/pluck.js deleted file mode 100644 index 9b283776..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/pluck.js +++ /dev/null @@ -1,14 +0,0 @@ -var map = require('./map'); - - /** - * Extract a list of property values. - */ - function pluck(list, key) { - return map(list, function(value) { - return value[key]; - }); - } - - module.exports = pluck; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/reduce.js deleted file mode 100644 index 4c075735..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/reduce.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrReduce = require('../array/reduce'); -var objReduce = require('../object/reduce'); - - /** - */ - module.exports = make(arrReduce, objReduce); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/reject.js deleted file mode 100644 index 2a92e3b3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/reject.js +++ /dev/null @@ -1,16 +0,0 @@ -var filter = require('./filter'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Inverse or collection/filter - */ - function reject(list, iterator, thisObj) { - iterator = makeIterator(iterator, thisObj); - return filter(list, function(value, index, list) { - return !iterator(value, index, list); - }, thisObj); - } - - module.exports = reject; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/size.js deleted file mode 100644 index 244e33e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/size.js +++ /dev/null @@ -1,19 +0,0 @@ -var isArray = require('../lang/isArray'); -var objSize = require('../object/size'); - - /** - * Get collection size - */ - function size(list) { - if (!list) { - return 0; - } - if (isArray(list)) { - return list.length; - } - return objSize(list); - } - - module.exports = size; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/some.js deleted file mode 100644 index 48fd252e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/collection/some.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrSome = require('../array/some'); -var objSome = require('../object/some'); - - /** - */ - module.exports = make(arrSome, objSome); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date.js deleted file mode 100644 index 1cde1a95..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date.js +++ /dev/null @@ -1,21 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'dayOfTheYear' : require('./date/dayOfTheYear'), - 'diff' : require('./date/diff'), - 'i18n_' : require('./date/i18n_'), - 'isLeapYear' : require('./date/isLeapYear'), - 'isSame' : require('./date/isSame'), - 'parseIso' : require('./date/parseIso'), - 'startOf' : require('./date/startOf'), - 'strftime' : require('./date/strftime'), - 'timezoneAbbr' : require('./date/timezoneAbbr'), - 'timezoneOffset' : require('./date/timezoneOffset'), - 'totalDaysInMonth' : require('./date/totalDaysInMonth'), - 'totalDaysInYear' : require('./date/totalDaysInYear'), - 'weekOfTheYear' : require('./date/weekOfTheYear') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/dayOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/dayOfTheYear.js deleted file mode 100644 index 85905c5a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/dayOfTheYear.js +++ /dev/null @@ -1,13 +0,0 @@ -var isDate = require('../lang/isDate'); - - /** - * return the day of the year (1..366) - */ - function dayOfTheYear(date){ - return (Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) - - Date.UTC(date.getFullYear(), 0, 1)) / 86400000 + 1; - } - - module.exports = dayOfTheYear; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/diff.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/diff.js deleted file mode 100644 index 1131cdcb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/diff.js +++ /dev/null @@ -1,130 +0,0 @@ -var totalDaysInMonth = require('./totalDaysInMonth'); -var totalDaysInYear = require('./totalDaysInYear'); -var convert = require('../time/convert'); - - /** - * calculate the difference between dates (range) - */ - function diff(start, end, unitName){ - // sort the dates to make it easier to process (specially year/month) - if (start > end) { - var swap = start; - start = end; - end = swap; - } - - var output; - - if (unitName === 'month') { - output = getMonthsDiff(start, end); - } else if (unitName === 'year'){ - output = getYearsDiff(start, end); - } else if (unitName != null) { - if (unitName === 'day') { - // ignore timezone difference because of daylight savings time - start = toUtc(start); - end = toUtc(end); - } - output = convert(end - start, 'ms', unitName); - } else { - output = end - start; - } - - return output; - } - - - function toUtc(d){ - // we ignore timezone differences on purpose because of daylight - // savings time, otherwise it would return fractional days/weeks even - // if a full day elapsed. eg: - // Wed Feb 12 2014 00:00:00 GMT-0200 (BRST) - // Sun Feb 16 2014 00:00:00 GMT-0300 (BRT) - // diff should be 4 days and not 4.041666666666667 - return Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), - d.getHours(), d.getMinutes(), d.getSeconds(), - d.getMilliseconds()); - } - - - function getMonthsDiff(start, end){ - return getElapsedMonths(start, end) + - getElapsedYears(start, end) * 12 + - getFractionalMonth(start, end); - } - - - function getYearsDiff(start, end){ - var elapsedYears = getElapsedYears(start, end); - return elapsedYears + getFractionalYear(start, end, elapsedYears); - } - - - function getElapsedMonths(start, end){ - var monthDiff = end.getMonth() - start.getMonth(); - if (monthDiff < 0) { - monthDiff += 12; - } - // less than a full month - if (start.getDate() > end.getDate()) { - monthDiff -= 1; - } - return monthDiff; - } - - - function getElapsedYears(start, end){ - var yearDiff = end.getFullYear() - start.getFullYear(); - // less than a full year - if (start.getMonth() > end.getMonth()) { - yearDiff -= 1; - } - return yearDiff; - } - - - function getFractionalMonth(start, end){ - var fractionalDiff = 0; - var startDay = start.getDate(); - var endDay = end.getDate(); - - if (startDay !== endDay) { - var startTotalDays = totalDaysInMonth(start); - var endTotalDays = totalDaysInMonth(end); - var totalDays; - var daysElapsed; - - if (startDay > endDay) { - // eg: Jan 29 - Feb 27 (29 days elapsed but not a full month) - var baseDay = startTotalDays - startDay; - daysElapsed = endDay + baseDay; - // total days should be relative to 1st day of next month if - // startDay > endTotalDays - totalDays = (startDay > endTotalDays)? - endTotalDays + baseDay + 1 : startDay + baseDay; - } else { - // fractional is only based on endMonth eg: Jan 12 - Feb 18 - // (6 fractional days, 28 days until next full month) - daysElapsed = endDay - startDay; - totalDays = endTotalDays; - } - - fractionalDiff = daysElapsed / totalDays; - } - - return fractionalDiff; - } - - - function getFractionalYear(start, end, elapsedYears){ - var base = elapsedYears? - new Date(end.getFullYear(), start.getMonth(), start.getDate()) : - start; - var elapsedDays = diff(base, end, 'day'); - return elapsedDays / totalDaysInYear(end); - } - - - module.exports = diff; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n/en-US.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n/en-US.js deleted file mode 100644 index f9526ce4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n/en-US.js +++ /dev/null @@ -1,61 +0,0 @@ - - // en-US (English, United States) - module.exports = { - "am" : "AM", - "pm" : "PM", - - "x": "%m/%d/%y", - "X": "%H:%M:%S", - "c": "%a %d %b %Y %I:%M:%S %p %Z", - - "months" : [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" - ], - - "months_abbr" : [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" - ], - - "days" : [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" - ], - - "days_abbr" : [ - "Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat" - ] - }; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n/pt-BR.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n/pt-BR.js deleted file mode 100644 index 71ebadb5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n/pt-BR.js +++ /dev/null @@ -1,61 +0,0 @@ - - // pt-BR (Brazillian Portuguese) - module.exports = { - "am" : "", - "pm" : "", - - "x": "%d/%m/%y", - "X": "%H:%M:%S", - "c": "%a %d %b %Y %H:%M:%S %Z", - - "months" : [ - "Janeiro", - "Fevereiro", - "Março", - "Abril", - "Maio", - "Junho", - "Julho", - "Agosto", - "Setembro", - "Outubro", - "Novembro", - "Dezembro" - ], - - "months_abbr" : [ - "Jan", - "Fev", - "Mar", - "Abr", - "Mai", - "Jun", - "Jul", - "Ago", - "Set", - "Out", - "Nov", - "Dez" - ], - - "days" : [ - "Domingo", - "Segunda", - "Terça", - "Quarta", - "Quinta", - "Sexta", - "Sábado" - ], - - "days_abbr" : [ - "Dom", - "Seg", - "Ter", - "Qua", - "Qui", - "Sex", - "Sáb" - ] - }; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n_.js deleted file mode 100644 index 723fc103..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n_.js +++ /dev/null @@ -1,14 +0,0 @@ -var mixIn = require('../object/mixIn'); -var enUS = require('./i18n/en-US'); - - // we also use mixIn to make sure we don't affect the original locale - var activeLocale = mixIn({}, enUS, { - // we expose a "set" method to allow overriding the global locale - set : function(localeData){ - mixIn(activeLocale, localeData); - } - }); - - module.exports = activeLocale; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/isLeapYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/isLeapYear.js deleted file mode 100644 index 4212870b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/isLeapYear.js +++ /dev/null @@ -1,15 +0,0 @@ -var isDate = require('../lang/isDate'); - - /** - * checks if it's a leap year - */ - function isLeapYear(fullYear){ - if (isDate(fullYear)) { - fullYear = fullYear.getFullYear(); - } - return fullYear % 400 === 0 || (fullYear % 100 !== 0 && fullYear % 4 === 0); - } - - module.exports = isLeapYear; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/isSame.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/isSame.js deleted file mode 100644 index 4097d29b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/isSame.js +++ /dev/null @@ -1,16 +0,0 @@ -var startOf = require('./startOf'); - - /** - * Check if date is "same" with optional period - */ - function isSame(date1, date2, period){ - if (period) { - date1 = startOf(date1, period); - date2 = startOf(date2, period); - } - return Number(date1) === Number(date2); - } - - module.exports = isSame; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/parseIso.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/parseIso.js deleted file mode 100644 index 8ea2b171..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/parseIso.js +++ /dev/null @@ -1,146 +0,0 @@ -var some = require('../array/some'); - - var datePatterns = [ - /^([0-9]{4})$/, // YYYY - /^([0-9]{4})-([0-9]{2})$/, // YYYY-MM (YYYYMM not allowed) - /^([0-9]{4})-?([0-9]{2})-?([0-9]{2})$/ // YYYY-MM-DD or YYYYMMDD - ]; - var ORD_DATE = /^([0-9]{4})-?([0-9]{3})$/; // YYYY-DDD - - var timePatterns = [ - /^([0-9]{2}(?:\.[0-9]*)?)$/, // HH.hh - /^([0-9]{2}):?([0-9]{2}(?:\.[0-9]*)?)$/, // HH:MM.mm - /^([0-9]{2}):?([0-9]{2}):?([0-9]{2}(\.[0-9]*)?)$/ // HH:MM:SS.ss - ]; - - var DATE_TIME = /^(.+)T(.+)$/; - var TIME_ZONE = /^(.+)([+\-])([0-9]{2}):?([0-9]{2})$/; - - function matchAll(str, patterns) { - var match; - var found = some(patterns, function(pattern) { - return !!(match = pattern.exec(str)); - }); - - return found ? match : null; - } - - function getDate(year, month, day) { - var date = new Date(Date.UTC(year, month, day)); - - // Explicitly set year to avoid Date.UTC making dates < 100 relative to - // 1900 - date.setUTCFullYear(year); - - var valid = - date.getUTCFullYear() === year && - date.getUTCMonth() === month && - date.getUTCDate() === day; - return valid ? +date : NaN; - } - - function parseOrdinalDate(str) { - var match = ORD_DATE.exec(str); - if (match ) { - var year = +match[1], - day = +match[2], - date = new Date(Date.UTC(year, 0, day)); - - if (date.getUTCFullYear() === year) { - return +date; - } - } - - return NaN; - } - - function parseDate(str) { - var match, year, month, day; - - var match = matchAll(str, datePatterns); - if (match === null) { - // Ordinal dates are verified differently. - return parseOrdinalDate(str); - } - - year = (match[1] === void 0) ? 0 : +match[1]; - month = (match[2] === void 0) ? 0 : +match[2] - 1; - day = (match[3] === void 0) ? 1 : +match[3]; - - return getDate(year, month, day); - } - - function getTime(hr, min, sec) { - var valid = - (hr < 24 && hr >= 0 && - min < 60 && min >= 0 && - sec < 60 && min >= 0) || - (hr === 24 && min === 0 && sec === 0); - if (!valid) { - return NaN; - } - - return ((hr * 60 + min) * 60 + sec) * 1000; - } - - function parseOffset(str) { - var match; - if (str.charAt(str.length - 1) === 'Z') { - str = str.substring(0, str.length - 1); - } else if ((match = TIME_ZONE.exec(str))) { - var match = TIME_ZONE.exec(str); - if (match) { - var hours = +match[3], - minutes = (match[4] === void 0) ? 0 : +match[4], - offset = getTime(hours, minutes, 0); - - if (match[2] === '-') { - offset *= -1; - } - - return { offset: offset, time: match[1] }; - } - } - - // No time zone specified, assume UTC - return { offset: 0, time: str }; - } - - function parseTime(str) { - var match; - var offset = parseOffset(str); - - str = offset.time; - offset = offset.offset; - if (isNaN(offset)) { - return NaN; - } - - match = matchAll(str, timePatterns); - if (match === null) { - return NaN; - } - - var hours = (match[1] === void 0) ? 0 : +match[1], - minutes = (match[2] === void 0) ? 0 : +match[2], - seconds = (match[3] === void 0) ? 0 : +match[3]; - - return getTime(hours, minutes, seconds) - offset; - } - - /** - * Parse an ISO8601 formatted date string, and return a Date object. - */ - function parseISO8601(str){ - var match = DATE_TIME.exec(str); - if (!match) { - // No time specified - return parseDate(str); - } - - return parseDate(match[1]) + parseTime(match[2]); - } - - module.exports = parseISO8601; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/startOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/startOf.js deleted file mode 100644 index 072bc0ef..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/startOf.js +++ /dev/null @@ -1,54 +0,0 @@ -var clone = require('../lang/clone'); - - /** - * get a new Date object representing start of period - */ - function startOf(date, period){ - date = clone(date); - - // intentionally removed "break" from switch since start of - // month/year/etc should also reset the following periods - switch (period) { - case 'year': - date.setMonth(0); - /* falls through */ - case 'month': - date.setDate(1); - /* falls through */ - case 'week': - case 'day': - date.setHours(0); - /* falls through */ - case 'hour': - date.setMinutes(0); - /* falls through */ - case 'minute': - date.setSeconds(0); - /* falls through */ - case 'second': - date.setMilliseconds(0); - break; - default: - throw new Error('"'+ period +'" is not a valid period'); - } - - // week is the only case that should reset the weekDay and maybe even - // overflow to previous month - if (period === 'week') { - var weekDay = date.getDay(); - var baseDate = date.getDate(); - if (weekDay) { - if (weekDay >= baseDate) { - //start of the week is on previous month - date.setDate(0); - } - date.setDate(date.getDate() - date.getDay()); - } - } - - return date; - } - - module.exports = startOf; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/strftime.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/strftime.js deleted file mode 100644 index f033d10f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/strftime.js +++ /dev/null @@ -1,118 +0,0 @@ -var pad = require('../number/pad'); -var i18n = require('./i18n_'); -var dayOfTheYear = require('./dayOfTheYear'); -var timezoneOffset = require('./timezoneOffset'); -var timezoneAbbr = require('./timezoneAbbr'); -var weekOfTheYear = require('./weekOfTheYear'); - - var _combinations = { - 'D': '%m/%d/%y', - 'F': '%Y-%m-%d', - 'r': '%I:%M:%S %p', - 'R': '%H:%M', - 'T': '%H:%M:%S', - 'x': 'locale', - 'X': 'locale', - 'c': 'locale' - }; - - - /** - * format date based on strftime format - */ - function strftime(date, format, localeData){ - localeData = localeData || i18n; - var reToken = /%([a-z%])/gi; - - function makeIterator(fn) { - return function(match, token){ - return fn(date, token, localeData); - }; - } - - return format - .replace(reToken, makeIterator(expandCombinations)) - .replace(reToken, makeIterator(convertToken)); - } - - - function expandCombinations(date, token, l10n){ - if (token in _combinations) { - var expanded = _combinations[token]; - return expanded === 'locale'? l10n[token] : expanded; - } else { - return '%'+ token; - } - } - - - function convertToken(date, token, l10n){ - switch (token){ - case 'a': - return l10n.days_abbr[date.getDay()]; - case 'A': - return l10n.days[date.getDay()]; - case 'h': - case 'b': - return l10n.months_abbr[date.getMonth()]; - case 'B': - return l10n.months[date.getMonth()]; - case 'C': - return pad(Math.floor(date.getFullYear() / 100), 2); - case 'd': - return pad(date.getDate(), 2); - case 'e': - return pad(date.getDate(), 2, ' '); - case 'H': - return pad(date.getHours(), 2); - case 'I': - return pad(date.getHours() % 12, 2); - case 'j': - return pad(dayOfTheYear(date), 3); - case 'L': - return pad(date.getMilliseconds(), 3); - case 'm': - return pad(date.getMonth() + 1, 2); - case 'M': - return pad(date.getMinutes(), 2); - case 'n': - return '\n'; - case 'p': - return date.getHours() >= 12? l10n.pm : l10n.am; - case 'P': - return convertToken(date, 'p', l10n).toLowerCase(); - case 's': - return date.getTime() / 1000; - case 'S': - return pad(date.getSeconds(), 2); - case 't': - return '\t'; - case 'u': - var day = date.getDay(); - return day === 0? 7 : day; - case 'U': - return pad(weekOfTheYear(date), 2); - case 'w': - return date.getDay(); - case 'W': - return pad(weekOfTheYear(date, 1), 2); - case 'y': - return pad(date.getFullYear() % 100, 2); - case 'Y': - return pad(date.getFullYear(), 4); - case 'z': - return timezoneOffset(date); - case 'Z': - return timezoneAbbr(date); - case '%': - return '%'; - default: - // keep unrecognized tokens - return '%'+ token; - } - } - - - module.exports = strftime; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/timezoneAbbr.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/timezoneAbbr.js deleted file mode 100644 index b1006875..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/timezoneAbbr.js +++ /dev/null @@ -1,17 +0,0 @@ -var timezoneOffset = require('./timezoneOffset'); - - /** - * Abbreviated time zone name or similar information. - */ - function timezoneAbbr(date){ - // Date.toString gives different results depending on the - // browser/system so we fallback to timezone offset - // chrome: 'Mon Apr 08 2013 09:02:04 GMT-0300 (BRT)' - // IE: 'Mon Apr 8 09:02:04 UTC-0300 2013' - var tz = /\(([A-Z]{3,4})\)/.exec(date.toString()); - return tz? tz[1] : timezoneOffset(date); - } - - module.exports = timezoneAbbr; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/timezoneOffset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/timezoneOffset.js deleted file mode 100644 index 9492dceb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/timezoneOffset.js +++ /dev/null @@ -1,16 +0,0 @@ -var pad = require('../number/pad'); - - /** - * time zone as hour and minute offset from UTC (e.g. +0900) - */ - function timezoneOffset(date){ - var offset = date.getTimezoneOffset(); - var abs = Math.abs(offset); - var h = pad(Math.floor(abs / 60), 2); - var m = pad(abs % 60, 2); - return (offset > 0? '-' : '+') + h + m; - } - - module.exports = timezoneOffset; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInMonth.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInMonth.js deleted file mode 100644 index 8aafeb84..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInMonth.js +++ /dev/null @@ -1,25 +0,0 @@ -var isDate = require('../lang/isDate'); -var isLeapYear = require('./isLeapYear'); - - var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; - - /** - * returns the total amount of days in the month (considering leap years) - */ - function totalDaysInMonth(fullYear, monthIndex){ - if (isDate(fullYear)) { - var date = fullYear; - year = date.getFullYear(); - monthIndex = date.getMonth(); - } - - if (monthIndex === 1 && isLeapYear(fullYear)) { - return 29; - } else { - return DAYS_IN_MONTH[monthIndex]; - } - } - - module.exports = totalDaysInMonth; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInYear.js deleted file mode 100644 index b4b7e9b7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInYear.js +++ /dev/null @@ -1,13 +0,0 @@ -var isLeapYear = require('./isLeapYear'); - - /** - * return the amount of days in the year following the gregorian calendar - * and leap years - */ - function totalDaysInYear(fullYear){ - return isLeapYear(fullYear)? 366 : 365; - } - - module.exports = totalDaysInYear; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/weekOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/weekOfTheYear.js deleted file mode 100644 index dd51b7f1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/date/weekOfTheYear.js +++ /dev/null @@ -1,16 +0,0 @@ -var dayOfTheYear = require('./dayOfTheYear'); - - /** - * Return the week of the year based on given firstDayOfWeek - */ - function weekOfTheYear(date, firstDayOfWeek){ - firstDayOfWeek = firstDayOfWeek == null? 0 : firstDayOfWeek; - var doy = dayOfTheYear(date); - var dow = (7 + date.getDay() - firstDayOfWeek) % 7; - var relativeWeekDay = 6 - firstDayOfWeek - dow; - return Math.floor((doy + relativeWeekDay) / 7); - } - - module.exports = weekOfTheYear; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/array.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/array.md deleted file mode 100644 index 1f390fbc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/array.md +++ /dev/null @@ -1,773 +0,0 @@ -# array # - -Array utilities. - - - - -## append(arr1, arr2):Array - -Appends an array to the end of the other. -The first array will be modified and will contain the appended items. - -See: [`union()`](#union), [`combine()`](#combine) - -```js -var foo = ['a', 'b'], - bar = ['b', 'd']; - -append(foo, bar); // ['a', 'b', 'b', 'd'] -``` - - - -## collect(arr, callback, [thisObj]):Array - -Maps the items in `arr` and concatenates the resulting arrays. - -See: [`map()`](#map) - -```js -collect([1, 2, 3], function(val) { - return [val, val % 2]; -}); // [1, 1, 2, 0, 3, 1]; - -collect(['a', 'bb', ''], function(val) { - return val.split(''); -}); // ['a', 'b', 'b'] -``` - -It also supports a shorthand syntax: - -```js -var items = [{ a: [1] }, { b: 'foo' }, { a: [2, 3] }]; -collect(items, 'a'); // [1, 2, 3]; -``` - - - -## combine(arr1, arr2):Array - -Combines an array with all the items of another. -The first array will be modified and will contain the combined items. -Does not allow duplicates and is case and type sensitive. - -See: [`union()`](#union), [`append()`](#append) - -```js -var foo = ['a', 'b'], - bar = ['b', 'd']; - -combine(foo, bar); // ['a', 'b', 'd'] -``` - - - -## compact(arr):Array - -Returns a new Array without any `null` or `undefined` values. Note that it will -keep empty strings and other falsy values (simillar to Ruby Array#compact). - -```js -var arr = [0, 1, null, false, '', 'foo', undefined, 'bar']; -compact(arr); // [0, 1, false, '', 'foo', 'bar']; -``` - - - -## contains(arr, value):Boolean - -Checks if Array contains value. Alias to `indexOf(arr, val) !== -1`. - -```js -var arr = [1, 2, 3]; -contains(arr, 2); // true -contains(arr, 'foo'); // false -``` - - - -## difference(...arrs):Array - -Return a new Array with elements that aren't present in the other Arrays -besides the first one. - -Works like [Python set#difference](http://docs.python.org/library/stdtypes.html#set.difference). - -It will remove duplicates. - -See: [`xor()`](#xor), [`intersection()`](#intersection) - -```js -var a = ['a', 'b', 1]; -var b = ['c', 1]; -difference(a, b); // ['a', 'b'] -``` - - - -## every(arr, callback, [thisObj]):Array - -Crossbrowser `Array.every()`. - -Tests whether all elements in the array pass the test implemented by the provided function. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -```js -var items = [1, 'foo', 'bar']; -every(items, isString); // false -every(items, isFunction); // false -every(items, function(val, key, arr){ - return val != null; -}); // true -``` - -more info at [MDN Array#every](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every) - -It also supports a shorthand syntax: - -```js -var items = [{id:1, active:true}, {id:3, active:true}, {id:8, active:true}]; -// all items with `id === 8` -every(items, {id:8}); // false -// `active` is truthy on all items -every(items, 'active'); // true -``` - - - -## filter(arr, callback, [thisObj]):Array - -Crossbrowser `Array.filter()`. - -Creates a new array with all elements that pass the callback test. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -```js -var nums = [1, 2, 3, 4, 5, 6]; -var oddNumbers = filter(nums, function(val, key, arr){ - return (val % 2) !== 0; -}); -// > [1, 3, 5] -``` - -more info at [MDN Array#filter](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/filter) - -Filter also supports shorthand notation: - -```js -var users = [ - {name:'john', surname:'connor', beard:false}, - {name:'john', surname:'doe', beard:true}, - {name:'jane', surname:'doe', beard:false} -]; -// filter item that matches all properties/values pairs -filter(arr, {name:'john', beard:false}); -// > [{name:'john', surnname:'connor', beard:false}] -// items where 'beard' is a truthy value -filter(arr, 'beard'); -// > [{name:'john', surnname:'doe', beard:true}] -``` - -See [`reject()`](#reject) - - - -## find(arr, callback, [thisObj]):void - -Loops through all the items in the Array and returns the first one that passes -a truth test (callback). - -```js -var arr = [123, {a:'b'}, 'foo', 'bar']; -find(arr, isString); // "foo" -find(arr, isNumber); // 123 -find(arr, isObject); // {a:'b'} -``` - -Find also supports shorthand notation: - -```js -var users = [ - {name:'john', surname:'connor', beard:false}, - {name:'john', surname:'doe', beard:true} -]; -// first item that matches all properties/values pairs -find(arr, {name:'john'}); // {name:'john', surnname:'connor', beard:false} -// first item where 'beard' is a truthy value -find(arr, 'beard'); // {name:'john', surnname:'doe', beard:true} -``` - -See: [findIndex()](#findIndex) - - - -## findIndex(arr, iterator, [thisObj]):Number - -Loops through the items in the Array and returns the index of the first one -that passes a truth test (callback). - -Returns `-1` if no item was found that passes the truth test. - -```js -var arr = [1, { a: 1 }, 'foo', 'bar']; -findIndex(arr, isString); // 2 -findIndex(arr, isNumber); // 0 -findIndex(arr, isObject); // 1 -findIndex(arr, isRegExp); // -1 -``` - -`findIndex` also supports shorthand notation: - -```js -var pets = [ - { pet: 'dog', name: 'Sam' }, - { pet: 'dog', name: 'Maggie' } -]; - -findIndex(pets, { pet: 'dog' }); // 0 -findIndex(pets, { name: 'Maggie' }); // 1 -``` - -See: [find()](#find) - - - -## flatten(arr, [level]):Array - -Recursively flattens an array. A new array containing all the elements is -returned. If `level` is specified, it will only flatten up to that level. - -### Example - -```js -flatten([1, [2], [3, [4, 5]]]); -// > [1, 2, 3, 4, 5] -flatten([1, [2], [3, [4, 5]]], 1); -// > [1, 2, 3, [4, 5]] -``` - - - -## forEach(arr, callback, [thisObj]):void - -Crossbrowser `Array.forEach()`. - -It allows exiting the iteration early by returning `false` on the callback. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -```js -var items = ['foo', 'bar', 'lorem', 'ipsum']; -forEach(items, function(val, key, arr){ - console.log(key +' : '+ val); - if (val === 'lorem') { - // stop iteration (break) - return false; - } -}); -``` - -more info at [MDN Array#forEach](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/forEach) - - - -## indexOf(arr, item, [fromIndex]):Number - -Crossbrowser `Array.indexOf()`. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -more info at [MDN Array#indexOf](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf) - - - - -## insert(arr, ...items):Number - -Push items into array only if they aren't contained by it. Returns the new -`length` of the array. - -See: [`remove()`](#remove), [`removeAll()`](#removeAll), -[`contains()`](#contains) - -```js -var arr = ['a', 'b']; -insert(arr, 'a'); // 2 : ['a', 'b'] -insert(arr, 'c'); // 3 : ['a', 'b', 'c'] -insert(arr, 1, 2, 'b'); // 5 : ['a', 'b', 'c', 1, 2] -``` - - - -## intersection(...arrs):Array - -Return a new Array with elements common to all Arrays. - -Similar to Python set#intersection and underscore.js intersection. - -It will remove duplicates. - -See: [`difference()`](#difference), [`xor()`](#xor) - -```js -var a = ['a', 'b', 1], - b = ['c', 1], - c = [1, 2, 3]; -intersection(a, b, c); // [1] -``` - - - -## invoke(arr, methodName[, ...args]):Array - -Call `methodName` on each item of the array passing custom arguments if needed. - -```js -invoke([[3,2,1], [9,5,2]], 'sort'); // [[1,2,3], [2,5,9]] -``` - - - -## join(arr, [separator]):String - -Joins the strings in `arr`, inserting `separator` between each value. - -This ignores null values and empty strings that are in the array. `separator` -defaults to an empty string. This will convert all non-string objects in the -array to a string. - -### Example - -```js -join(['a', 'b', 'c']); // 'abc' -join(['foo', 'bar'], ', '); // 'foo, bar' -join([null, 'foo', '', 'bar', undefined], ':'); // 'foo:bar' -``` - - - -## lastIndexOf(arr, item, [fromIndex]):Number - -Crossbrowser `Array.lastIndexOf()`. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -more info at [MDN Array#lastIndexOf](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf) - - - -## map(arr, callback, [thisObj]]):Array - -Crossbrowser `Array.map()`. - -Creates a new array with the results of calling a provided function on every -element in this array. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -See: [`collect()`](#collect) - -```js -var nums = [1,2,3,4]; -var double = map(nums, function(val, key, arr){ - return val * 2; -}); -// > [2, 4, 6, 8] -``` - -more info at [MDN Array#map](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/map) - -It also supports a shorthand notation which can be used to achieve same result -as [`array/pluck`](#pluck): - -```js -var src = ['lorem', 'ipsum', 'foo', 'amet']; -// grab the "length" property of all items -var lengths = map(src, 'length'); // [5, 5, 3, 4] -``` - - - -## max(arr, [iterator], [thisObj]):* - -Returns maximum value inside array or use a custom iterator to define how items -should be compared. - -See: [`min()`](#min) - -```js -max([10, 2, 7]); // 10 -max(['foo', 'lorem', 'amet'], function(val){ - return val.length; -}); // 'lorem' -``` - -It also supports a shorthand notation: - -```js -max(['foo', 'lorem', 'amet'], 'length'); // "lorem" -``` - - - -## min(arr, [iterator], [thisObj]):* - -Returns minimum value inside array or use a custom iterator to define how items -should be compared. - -See: [`max()`](#max) - -```js -min([10, 2, 7]); // 2 -min(['foo', 'lorem', 'amet'], function(val){ - return val.length; -}); // 'foo' -``` - -It also supports a shorthand notation: - -```js -min(['foo', 'lorem', 'amet'], 'length'); // "foo" -``` - - - -## pick(arr):* - -Gets a random item and remove it from the array. - -### Example: - - var arr = [1, 2, 3, 4, 5, 6]; - var item_1 = pick(arr); // 4 - var item_2 = pick(arr); // 1 - console.log(arr); // [2, 3, 5, 6] - - - -## pluck(arr, propName):Array - -Extract a list of property values. - -See: [`function/prop()`](function.html#prop) - -```js -var users = [{name : 'John', age: 21}, {name: 'Jane', age : 27}]; -var names = pluck(users, 'name'); // ["John", "Jane"] -var ages = pluck(users, 'age'); // [21, 27] -``` - - - -## range([start], stop[, step]):Array - -Creates a new Array with all the values inside the range. Works similarly to -Python#range or PHP#range. - -### Arguments - - 1. `[start]` (Number) : Range start. Default is `0`. - 2. `stop` (Number) : Range limit. - 3. `[step]` (Number) : Step size. Default is `1`. - -### Example - -```js -range(5); // [0, 1, 2, 3, 4, 5] -range(0, 5); // [0, 1, 2, 3, 4, 5] -range(0, 5, 2); // [0, 2, 4] -range(20, 40, 5); // [20, 25, 30, 35, 40] -``` - - - -## reduce(arr, fn):* - -Crossbrowser `Array.reduce()`. - -Apply a function against an accumulator and each value of the array (from -left-to-right) as to reduce it to a single value. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -more info at [MDN Array#reduce](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduce) - - - -## reduceRight(arr, fn):* - -Crossbrowser `Array.reduceRight()`. - -Apply a function simultaneously against two values of the array (from -right-to-left) as to reduce it to a single value. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -more info at [MDN Array#reduceRight](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduceRight) - - - -## reject(arr, fn, thisObj):Array - -Creates a new array with all the elements that do **not** pass the truth test. -Opposite of [`filter()`](#filter). - -See [`filter()`](#filter) - -### Example - -```js -var numbers = [1, 2, 3, 4, 5, 6]; -reject(numbers, function(x) { return (x % 2) !== 0; }); // [2, 4, 6] -``` - -It also supports a shorthand syntax: - -```js -var users = [ - {name:'john', surname:'connor', beard:false}, - {name:'john', surname:'doe', beard:true}, - {name:'jane', surname:'doe', beard:false} -]; -// reject items that matches all properties/values pairs -reject(arr, {name:'john'}); -// > [{name:'jane', surnname:'doe', beard:false}] -// reject items where 'beard' is a truthy value -filter(arr, 'beard'); -// > [{name:'john', surnname:'connor', beard:false}, -// {name:'jane', surname:'doe', beard:false}] -``` - - - -## remove(arr, item):void - -Remove a single item from the array. - -IMPORTANT: it won't remove duplicates, just a single item. - -### Example - -```js -var foo = [1, 2, 3, 4]; -remove(foo, 2); -console.log(foo); // [1, 3, 4] -``` - - - -## removeAll(arr, item):void - -Remove all instances of an item from the array. - -### Example - -```js -var foo = [1, 2, 3, 4, 2, 2]; -removeAll(foo, 2); -console.log(foo); // [1, 3, 4]; -``` - - - -## shuffle(arr):Array - -Returns a new Array with items randomly sorted (shuffled). Similar to Ruby Array#shuffle. - -### Example - -```js -var arr = ['a', 'b', 'c', 'd', 'e']; -shuffle(arr); // ['b', 'd', 'e', 'c', 'a'] -``` - - - -## some(arr, callback, [thisObj]):Array - -Crossbrowser `Array.some()`. - -Tests whether some element in the array passes the test implemented by the provided function. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -```js -var items = [1, 'foo', 'bar']; -some(items, isString); // true -some(items, isFunction); // false -``` - -more info at [MDN Array#some](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some) - -It also supports a shorthand syntax: - -```js -var items = [{id:1, active:true}, {id:3, active:false}, {id:8, active:false}]; -// at least one item with `id === 8` -some(items, {id:8}); // true -// `active` is truthy on at least one item -some(items, 'active'); // true -``` - -see also: [`object/matches`](object.html#matches) - - - -## sort(arr, [compareFn]):Array - -Returns a sorted Array using the [Merge Sort](http://en.wikipedia.org/wiki/Merge_sort) algorithm (stable sort). - -The `Array.prototype.sort` browser implementations differ since the sorting algorithm isn't described in the ES spec - [in V8 it isn't stable](http://code.google.com/p/v8/issues/detail?id=90) and [on Firefox it is stable](https://bugzilla.mozilla.org/show_bug.cgi?id=224128) - so this function doesn't use the browser native implementation and is recommended in cases where a stable sort is required (items should preserve same order if already sorted). - -**Important:** It does logical comparisson by default (greater/less than) and -not a string comparisson like the native `Array#sort`. - -### compareFn - -If `compareFn` is supplied elements are sorted based on the value returned by -the `compareFn`. - - - If `compareFn(a, b)` is less than `0`, sort `a` to a lower index than `b`. - - If `compareFn(a, b)` returns `0`, leave `a` and `b` unchanged with respect - to each other, but sorted with respect to all different elements. - - If `compareFn(a, b)` is greater than `0`, sort `b` to a lower index than - `a`. - -### Example - -```js -sort([187, 23, 47, 987, 12, 59, 0]); // [0, 12, 23, 47, 59, 187, 987] -sort(['a', 'z', 'c', 'beta', 'b']); // ['a', 'b', 'beta', 'c', 'z'] - -// ['sit', 'amet', 'lorem', 'ipsum'] -sort(['lorem', 'ipsum', 'sit', 'amet'], function(a, b){ - // sort by length, items with same length - // will keep the relative order (stable) - return a.length - b.length; -}); - -// [4, 3, 2, 1] -sort([2, 3, 1, 4], function(a, b){ - // reverse sort - return b - a; -}); -``` - - - -## split(arr, [segments]):Array - -Splits an array into a fixed number of segments. - -The number of segments is specified by `segments` and defaults to 2. If the -array cannot be evenly split, the first segments will contain the extra items. -If `arr` is empty, an empty array is returned. If `arr.length` is less than -`segments`, then the resulting array will have `arr.length` number of -single-element arrays. - -### Example -```js -split([1, 2, 3, 4, 5], 3) // [ [1, 2], [3, 4], [5] ] -split([1, 2, 3, 4, 5]) // [ [1, 2, 3], [4, 5] ] -split([]) // [] -split([1, 2], 3) // [ [1], [2] ] -``` - - - -## toLookup(arr, key):Object - -Create an object that indexes the items in the array by a key. If `key` is a function, the key for each value in the resulting object will be the result of calling the function with the value as an argument. Otherwise `key` specifies the property on each value to use as the key. - -### Example - -```js -var foo = [{ name: 'a', thing: 1 }, { name: 'b', thing: 2 }]; -// { a: { name: 'a', thing: 1 }, b: { name: 'b', thing: 2 } } -toLookup(foo, 'name'); -// same as above -toLookup(foo, function (value) { return value.name; }); -``` - - - -## union(...arrs):Array - -Concat multiple arrays removing duplicates. - -```js -var a = ['a', 'b'], - b = ['c', 'a'], - c = [1, 'b', 2, 3, 'a']; - -//note that unique remove from begin to end -union(a, b, c); // ['c', 1, 'b', 2, 3, 'a'] -``` - - - -## unique(arr):Array - -Return a new Array of unique items. - -### Example - -```js -var foo = [1, 2, 3, 4, 2, 2, 3, 4]; -var bar = unique(foo); -console.log(foo); // [1, 2, 3, 4]; -``` - - - -## xor(arr1, arr2):Array - -Exclusive OR. Returns items that are present in a single array. - -Works like [Python set#symmetric_difference](http://docs.python.org/library/stdtypes.html#set.symmetric_difference) renamed for brevity. - -It will remove duplicates. - -See: [`difference()`](#difference), [`intersection()`](#intersection) - -```js -var a = ['a', 'b', 1]; -var b = ['c', 1]; -xor(a, b); // ['a', 'b', 'c'] -``` - - - -## zip(...arrs):Array - -Groups the elements of each array at their corresponding indexes. - -Useful for separate data sources that are coordinated through matching array -indexes. For a matrix of nested arrays, `zip.apply(...)` can transpose the -matrix in a similar fashion. - -```js -// [['moe', 30, true], ['larry', 40, false], ['curly', 50, false]] -zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]); -``` - - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/collection.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/collection.md deleted file mode 100644 index 2ffcab10..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/collection.md +++ /dev/null @@ -1,233 +0,0 @@ -# collection # - -Methods for dealing with collections (Array or Objects). - - - -## contains(list, value):Boolean - -Checks if collection contains value. - -```js -contains({a: 1, b: 2, c: 'bar'}, 2); // true -contains([1, 2, 3], 'foo'); // false -``` - -See: [array/contains](array.html#contains), [object/contains](object.html#contains) - - - -## every(list, callback, [thisObj]):Boolean - -Tests whether all values in the collection pass the test implemented by the -provided callback. - -```js -var obj = { - a: 1, - b: 2, - c: 3, - d: 'string' -}; - -every(obj, isNumber); // false -``` - -See: [array/every](array.html#every), [object/every](object.html#every) - - - -## filter(list, callback, [thisObj]):Array - -Filter collection properties. - -See: [array/filter](array.html#filter), [object/filter](object.html#filter) - - - -## find(list, callback, [thisObj]):* - -Loops through all the values in the collection and returns the first one that -passes a truth test (callback). - -**Important:** loop order over objects properties isn't guaranteed to be the -same on all environments. - -```js -find({a: 'foo', b: 12}, isString); // 'foo' -find(['foo', 12], isNumber); // 12 -``` - -See: [array/find](array.html#find), [object/find](object.html#find) - - - -## forEach(list, callback, [thisObj]) - -Loop through all values of the collection. - -See: [array/forEach](array.html#forEach), [object/forOwn](object.html#forOwn) - - - -## map(list, callback, [thisObj]):Array - -Returns a new collection where the properties values are the result of calling -the callback for each property in the original collection. - -See: [array/map](array.html#map), [object/map](object.html#map) - - - -## max(list, [iterator]):* - -Returns maximum value inside collection or use a custom iterator to define how -items should be compared. - -See: [`min()`](#min), [array/max](array.html#max), [object/max](object.html#max) - -```js -max({a: 100, b: 2, c: 1, d: 3, e: 200}); // 200 -max(['foo', 'lorem', 'amet'], function(val){ - return val.length; -}); // 'lorem' -``` - - - -## min(list, [iterator]):* - -Returns minimum value inside collection or use a custom iterator to define how -items should be compared. - -See: [`max()`](#max), [array/min](array.html#min), [object/min](object.html#min) - -```js -min([10, 2, 7]); // 2 -min({a: 'foo', b: 'lorem', c: 'amet'}, function(val){ - return val.length; -}); // 'foo' -``` - - - -## pluck(list, propName):Array - -Extract a list of property values. - -```js -var users = [ - { - name : 'John', - age : 21 - }, - { - name : 'Jane', - age : 27 - } -]; - -pluck(users, 'name'); // ["John", "Jane"] -pluck(users, 'age'); // [21, 27] - -users = { - first: { - name : 'John', - age : 21 - }, - second: { - name : 'Mary', - age : 25 - } -}; - -pluck(users, 'name'); // ['John', 'Mary'] -``` - -See: [array/pluck](array.html#pluck), [object/pluck](object.html#pluck) - - - -## reduce(list, callback, initial, [thisObj]):* - -Apply a function against an accumulator and each value in the collection as to -reduce it to a single value. - -```js -var obj = {a: 1, b: 2, c: 3, d: 4}; - -function sum(prev, cur, key, list) { - return prev + cur; -} - -reduce(obj, sum); // 10 -``` - -See: [array/reduce](array.html#reduce), [object/reduce](object.html#reduce) - - - -## reject(list, fn, [thisObj]):Array - -Creates a new array with all the elements that do **not** pass the truth test. -Opposite of [`filter()`](#filter). - -### Example - -```js -var numbers = [1, 2, 3, 4, 5]; -reject(numbers, function(x) { return (x % 2) !== 0; }); // [2, 4] - -var obj = {a: 1, b: 2, c: 3, d: 4, e: 5}; -reject(obj, function(x) { return (x % 2) !== 0; }); // [2, 4] -``` - -See: [array/reject](array.html#reject), [object/reject](object.html#reject) - - - -## size(list):Number - -Returns the number of values in the collection. - -```js -var obj = { - foo : 1, - bar : 2, - lorem : 3 -}; -size(obj); // 3 -size([1,2,3]); // 3 -size(null); // 0 -``` - -See: [object/size](object.html#size) - - - -## some(list, callback, [thisObj]):Boolean - -Tests whether any values in the collection pass the test implemented by the -provided callback. - -```js -var obj = { - a: 1, - b: 2, - c: 3, - d: 'string' -}; - -some(obj, isNumber); // true -some(obj, isString); // true -some([1, 2, 3], isNumber) // true -some([1, 2, 3], isString) // false -``` - -See: [array/some](array.html#some), [object/some](object.html#some) - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/date.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/date.md deleted file mode 100644 index b3f7f40e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/date.md +++ /dev/null @@ -1,295 +0,0 @@ -# date # - -Date utilities. - - -## dayOfTheYear(date):Number - -How many days elapsed since begining of the year (following gregorian -calendar). - -```js -// Jan 1st -dayOfTheYear(new Date(2013, 0, 1)); // 1 -// Dec 31th -dayOfTheYear(new Date(2013, 11, 31)); // 364 -``` - - - -## diff(date1, date2, [unitName]):Number - -Calculate the difference between dates (range). - -The returned value is always positive. The default `unitName` is `"ms"`. - -Available units: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`, -`millisecond`. - -See: [`time/convert()`](time.html#convert) - -```js -var d1 = new Date(2012, 4, 5); -var d2 = new Date(2013, 4, 8); -diff(d1, d2); // 31795200000 -diff(d1, d2, 'hour'); // 8832 -diff(d1, d2, 'week'); // 52.57142857142857 -diff(d1, d2, 'month'); // 12.096774193548388 -diff(d1, d2, 'year'); // 1.0082191780821919 -``` - - - -## isLeapYear(fullYear|date):Boolean - -Checks if it's a [leap year](http://en.wikipedia.org/wiki/Leap_year) according -to the Gregorian calendar. - -see: [`totalDaysInMonth()`](#totalDaysInMonth) - -```js -isLeapYear(2012); // true -isLeapYear(2013); // false -isLeapYear(new Date(2012, 2, 28)); // true -``` - - -## isSame(date1, date2[, period]):Boolean - -Check if both dates are the "same". - -You can pass an optional *period* used to set the comparisson precision. - -Available periods: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`. - -```js -var date1 = new Date(2013, 1, 3); -var date2 = new Date(2013, 2, 9); -isSame(date1, date2); // false -isSame(date1, date2, 'day'); // false -isSame(date1, date2, 'month'); // false -isSame(date1, date2, 'year'); // true -``` - - - -## parseIso(str):Number - -Parses an [ISO8601](http://en.wikipedia.org/wiki/Iso8601) date and returns the -number of milliseconds since January 1, 1970, 00:00:00 UTC, or `NaN` if it is -not a valid ISO8601 date. - -This parses *all* ISO8601 dates, including dates without times, [ordinal -dates](https://en.wikipedia.org/wiki/ISO_8601#Ordinal_dates), and the compact -representation (omitting delimeters). The only exception is [ISO week -dates](https://en.wikipedia.org/wiki/ISO_week_date), which are not parsed. - -If no time zone offset is specified, it assumes UTC time. - -```js -// Jan 01, 1970 00:00 GMT -parseIso('1970-01-01T00:00:00') // 0 -parseIso('1970-001') // 0 -parseIso('1970-01-01') // 0 -parseIso('19700101T000000.00') // 0 -parseIso('1970-01-01T02:00+02:00') // 0 - -// Jan 02, 2000 20:10 GMT+04:00 -parseIso('2000-01-02T20:10+04:00') // 946829400000 -``` - - - -## startOf(date, period):Date - -Get a new Date at the start of the period. - -Available periods: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`. - -```js -// Apr 05 2013 11:27:43 -var date = new Date(2013, 3, 5, 11, 27, 43, 123); -startOf(date, 'year'); // Jan 01 2013 00:00:00 -startOf(date, 'month'); // Apr 01 2013 00:00:00 -startOf(date, 'day'); // Apr 05 2013 00:00:00 -startOf(date, 'hour'); // Apr 05 2013 11:00:00 -``` - - - -## strftime(date, format, [l10n]):String - -Format date based on strftime format. - -Replaced tokens: - -<dl> -<dt>%a</dt><dd> locale's abbreviated weekday name.</dd> -<dt>%A</dt><dd> locale's full weekday name.</dd> -<dt>%b</dt><dd> locale's abbreviated month name.</dd> -<dt>%B</dt><dd> locale's full month name.</dd> -<dt>%c</dt><dd> locale's appropriate date and time representation.</dd> -<dt>%C</dt><dd> century number (the year divided by 100 and truncated -to an integer) as a decimal number [00..99].</dd> -<dt>%d</dt><dd> day of the month as a decimal number [01..31].</dd> -<dt>%D</dt><dd>same as %m/%d/%y.</dd> -<dt>%e</dt><dd> day of the month as a decimal number [1..31]; -a single digit is preceded by a space.</dd> -<dt>%F</dt><dd>The ISO 8601 date format (%Y-%m-%d)</dd> -<dt>%h</dt><dd>same as %b.</dd> -<dt>%H</dt><dd> hour (24-hour clock) as a decimal number [00..23].</dd> -<dt>%I</dt><dd> hour (12-hour clock) as a decimal number [01..12].</dd> -<dt>%j</dt><dd> day of the year as a decimal number [001..366].</dd> -<dt>%L</dt><dd> zero-padded milliseconds [000..999]</dd> -<dt>%m</dt><dd> month as a decimal number [01..12].</dd> -<dt>%M</dt><dd> minute as a decimal number [00..59].</dd> -<dt>%n</dt><dd> newline character.</dd> -<dt>%p</dt><dd> locale's equivalent of either "am" or "pm"</dd> -<dt>%P</dt><dd> locale's equivalent of either "AM" or "PM"</dd> -<dt>%r</dt><dd> time in a.m. and -p.m. notation; in the POSIX locale this is equivalent to %I:%M:%S %p.</dd> -<dt>%R</dt><dd> time in 24 hour notation (%H:%M).</dd> -<dt>%s</dt><dd> seconds since Epoch (1970-01-01 00:00:00 UTC)</dd> -<dt>%S</dt><dd> second as a decimal number [00..60].</dd> -<dt>%t</dt><dd> tab character.</dd> -<dt>%T</dt><dd> time (%H:%M:%S).</dd> -<dt>%u</dt><dd> weekday as a decimal number [1..7], with 1 representing -Monday.</dd> -<dt>%U</dt><dd> week number of the year (Sunday as the first day of -the week) as a decimal number [00..53].</dd> -<del><dt>%V</dt><dd> week number of the year (Monday as the first day of the -week) as a decimal number [01..53]. If the week containing 1 January has -four or more days in the new year, then it is considered week 1. Otherwise, -it is the last week of the previous year, and the next week is week 1.</dd></del> -<dt>%w</dt><dd> weekday as a decimal number [0..6], with 0 representing -Sunday.</dd> -<dt>%W</dt><dd> week number of the year (Monday as the first day of -the week) as a decimal number [00..53]. All days in a new year preceding -the first Monday are considered to be in week 0.</dd> -<dt>%x</dt><dd> locale's appropriate date representation.</dd> -<dt>%X</dt><dd> locale's appropriate time representation.</dd> -<dt>%y</dt><dd> year without century as a decimal number [00..99].</dd> -<dt>%Y</dt><dd> year with century as a decimal number.</dd> -<dt>%Z</dt><dd> timezone name or abbreviation, or by no bytes -if no timezone information exists.</dd> -<dt>%%</dt><dd>is replaced by %.</dd> -</dl> - -```js -var date = new Date(2013, 3, 8, 9, 2, 4); -strftime(date, '%Y-%m-%d'); // "2013-04-08" -strftime(date, '%R'); // "09:02" -strftime(date, '%Y-%m-%dT%H:%M:%S%z'); // "2013-04-08T09:02:04+0000" -``` - -You can also set a custom locale: - -```js -var ptBr = require('mout/date/i18n/pt-BR'); -strftime(date, '%a, %d %b', ptBr); // 'Seg, 08 Abr' -strftime(date, '%A, %d %B', ptBr); // 'Segunda, 08 Abril' -``` - -To set it globally: - -```js -require('mout/date/i18n_').set( customLocaleData ); -``` - -See [date/i18n](https://github.com/mout/mout/tree/master/src/date/i18n) -for localization examples. - - - -## timezoneAbbr(date):String - -Return timezone abbreviation or similar data. - -The result will vary based on the OS/browser since some environments doesn't -provide enough info about the current locale. - -```js -// IE 7-8 -timezoneAbbr(new Date()); // "-0500" -// Chrome, FF, V8 -timezoneAbbr(new Date()); // "EST" -``` - - - -## timezoneOffset(date):String - -Return time zone as hour and minute offset from UTC (e.g. +0900). - -It's important to note that JavaScript Date object will use the system locale -info to determinate the [timezone -offset](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset) -and that daylight saving time affects the result. - -```js -// if system locale is EST -timezoneOffset(new Date()); // -0500 -``` - - - -## totalDaysInMonth(fullYear, monthIndex):Number - -Returns the amount of days in the month taking into consideration leap years -(following Gregorian calendar). - -see: [`isLeapYear()`](#isLeapYear) - -```js -totalDaysInMonth(2008, 1); // 29 (leap year) -totalDaysInMonth(2009, 1); // 28 - -// you can also pass a Date object as single argument -totalDaysInMonth( new Date(2013, 0, 1) ); // 31 -``` - - -## totalDaysInYear(fullYear):Number - -Returns the amount of days in the year taking into consideration leap years -(following Gregorian calendar). - -see: [`isLeapYear()`](#isLeapYear), [`totalDaysInMonth()`](#totalDaysInMonth) - -```js -totalDaysInYear(2008); // 366 (leap year) -totalDaysInYear(2009); // 365 - -// you can also pass a Date object as single argument -totalDaysInYear( new Date(2013, 0, 1) ); // 365 -``` - - - -## weekOfTheYear(date, [firstDayOfWeek]):Number - -Returns how many weeks elapsed since start of the year (`0..53`). - -`firstDayOfWeek` can be `0` (Sunday) or `1` (Monday). By default weeks start at -Sunday. - -It will return `0` if `date` is before the first `firstDayOfWeek` of the year. - -```js -// Tue Jan 01 2013 -weekOfTheYear( new Date(2013,0,1) ); // 0 -// Wed Jan 09 2013 -weekOfTheYear( new Date(2013,0,9) ); // 1 -// Sun Jan 01 2012 -weekOfTheYear( new Date(2012,0,1) ); // 1 -// Mon Jan 09 2012 -weekOfTheYear( new Date(2012,0,9) ); // 2 -``` - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/function.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/function.md deleted file mode 100644 index 2695a025..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/function.md +++ /dev/null @@ -1,174 +0,0 @@ -# function # - -Function*(al)* utilities. - - - -## bind(fn, context, [...args]):Function - -Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. - -### Arguments - - 1. `fn` (Function) : Target Function - 2. `context` (Object) : Execution context (object used as `this`) - 3. `[...args]` (*) : Arguments (0...n arguments) - -See: [`partial()`](#partial), [object/bindAll](./object.html#bindAll) - - - -## compose(...fn):Function - -Returns the composition of a list of functions, where each function consumes -the return value of the function that follows. In math terms, composing the -functions `f()`, `g()`, and `h()` produces `f(g(h()))`. - -```js -function add2(x) { return x + 2 } -function multi2(x) { return x * 2 } -map([1, 2, 3], compose(add2, multi2)); // [4, 6, 8] - -//same as -map([1, 2, 3], function(x){ - return add2( multi2(x) ); -}); -``` - - - -## debounce(fn, delay[, isAsap]):Function - -Creates a function that will delay the execution of `fn` until after `delay` -milliseconds have elapsed since the last time it was invoked. - -Subsequent calls to the debounced function will return the result of the last -`fn` call. - -```js -// sometimes less is more -var lazyRedraw = debounce(redraw, 300); -foo.on.resize.add(lazyRedraw); -``` - -In this visualization, `|` is a debounced-function call and `X` is the actual -callback execution: - - Default - ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| - X X - - Debounced with `isAsap == true`: - ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| - X X - -See: [`throttle()`](#throttle) - - -## func(name):Function - -Returns a function that calls a method with given `name` on supplied object. -Useful for iteration methods like `array/map` and `array/forEach`. - -See: [`prop()`](#prop) - -```js -// will call the method `getName()` for each `user` -var names = map(users, func('getName')); -``` - - - -## partial(fn, [...args]):Function - -Return a partially applied function supplying default arguments. - -This method is similar to [`bind`](#bind), except it does not alter the this -binding. - -### Arguments - - 1. `fn` (Function) : Target Function - 3. `[...args]` (*) : Arguments (0...n arguments) - -See: [`bind()`](#bind) - -```js -function add(a, b){ return a + b } -var add10 = partial(add, 10); -console.log( add10(2) ); // 12 -``` - - - -## prop(name):Function - -Returns a function that gets a property with given `name` from supplied object. -Useful for using in conjunction with `array/map` and/or for creating getters. - -See: [`array/pluck()`](array.html#pluck) - -```js -var users = [{name:"John", age:21}, {name:"Jane", age:25}]; -// ["John", "Jane"] -var names = map(users, prop('name')); -``` - - - -## series(...fn):Function - -Returns a function that will execute all the supplied functions in order and -passing the same parameters to all of them. Useful for combining multiple -`array/forEach` into a single one and/or for debugging. - - -```js -// call `console.log()` and `doStuff()` for each item item in the array -forEach(arr, series(console.log, doStuff)); -``` - - - -## throttle(fn, interval):Function - -Creates a function that, when executed, will only call the `fn` function at -most once per every `interval` milliseconds. - -If the throttled function is invoked more than once during the wait timeout, -`fn` will also be called on the trailing edge of the timeout. - -Subsequent calls to the throttled function will return the result of the last -`fn` call. - -```js -// sometimes less is more -var lazyRedraw = throttle(redraw, 300); -foo.on.resize.add(lazyRedraw); -``` - -In this visualization, `|` is a throttled-function call and `X` is the actual -`fn` execution: - - ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| - X X X X X X X X X X X X - -See: [`debounce()`](#debounce) - - -## timeout(fn, millis, context, [...args]):Number - -Functions as a wrapper for `setTimeout`. Calls a the function `fn` after a given delay `millis` in milliseconds. -The function is called within the specified context. The return value can be used to clear the timeout using `clearTimeout`. - -```js -var id = timeout(doStuff, 300, this); - -clearTimeout(id); -``` - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/lang.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/lang.md deleted file mode 100644 index 56d7879b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/lang.md +++ /dev/null @@ -1,385 +0,0 @@ -# lang # - -Language Utilities. Easier inheritance, scope handling, type checks. - - - -## clone(val):* - -Clone native types like Object, Array, RegExp, Date and primitives. - -This method will not clone values that are referenced within `val`. It will -only copy the value reference to the new value. If the value is not a plain -object but is an object, it will return the value unchanged. - -### Example - -```js -var a = { foo: 'bar' }; -var b = clone(a); -console.log(a === b); // false -console.log(a.foo === b.foo); // true - -var c = [1, 2, 3]; -var d = clone(b); -console.log(c === d); // false -console.log(c); // [1, 2, 3] -``` - -See: [`deepClone()`](#deepClone) - - - -## createObject(parent, [props]):Object - -Create Object using prototypal inheritance and setting custom properties. - -Mix between [Douglas Crockford Prototypal Inheritance](http://javascript.crockford.com/prototypal.html) and the EcmaScript 5 `Object.create()` method. - -### Arguments - - 1. `parent` (Object) : Parent Object - 2. `[props]` (Object) : Object properties - -### Example - -```js -var base = { - trace : function(){ - console.log(this.name); - } -}; - -var myObj = createObject(base, { - name : 'Lorem Ipsum' -}); - -myObject.trace(); // "Lorem Ipsum" -``` - - - -## ctorApply(constructor, args):Object - -Do `Function.prototype.apply()` on a constructor while maintaining prototype -chain. - -```js -function Person(name, surname) { - this.name = name; - this.surname = surname; -} - -Person.prototype.walk = function(){ - console.log(this.name +' is walking'); -}; - -var args = ['John', 'Doe']; - -// "similar" effect as calling `new Person("John", "Doe")` -var john = ctorApply(Person, args); -john.walk(); // "John is walking" -``` - - - -## deepClone(val, [instanceClone]):* - -Deep clone native types like Object, Array, RegExp, Date and primitives. - -The `instanceClone` function will be invoked to clone objects that are not -"plain" objects (as defined by [`isPlainObject`](#isPlainObject)) if it is -provided. If `instanceClone` is not specified, it will not attempt to clone -non-plain objects, and will copy the object reference. - -### Example - -```js -var a = {foo:'bar', obj: {a:1, b:2}}; -var b = deepClone(a); // {foo:'bar', obj: {a:1, b:2}} -console.log( a === b ); // false -console.log( a.obj === b.obj ); // false - -var c = [1, 2, [3, 4]]; -var d = deepClone(c); // [1, 2, [3, 4]] -var e = c.concat(); // [1, 2, [3, 4]] - -console.log( c[2] === d[2] ); // false -// concat doesn't do a deep clone, arrays are passed by reference -console.log( e[2] === d[2] ); // true - -function Custom() { } -function cloneCustom(x) { return new Custom(); } -var f = { test: new Custom() }; -var g = deepClone(f, cloneCustom); -g.test === f.test // false, since new Custom instance will be created -``` - -See: [`clone()`](#clone) - - - -## defaults(val, ...defaults):void - -Return first value that isn't `null` or `undefined`. - - function doSomethingAwesome(foo, bar) { - // default arguments - foo = defaults(foo, 'lorem'); - bar = defaults(bar, 123); - // ... - } - - - -## inheritPrototype(child, parent):void - -Inherit prototype from another Object. - -```js -function Foo(name){ - this.name = name; -} -Foo.prototype = { - getName : function(){ - return this.name; - } -}; - -function Bar(name){ - this.name = name; -} -//should be called before calling constructor -inheritPrototype(Bar, Foo); - -var myObj = new Bar('lorem ipsum'); -myObj.getName(); // "lorem ipsum" -``` - - -## is(x, y):Boolean - -Check if both values are identical/egal. - -```js -// wtfjs -NaN === NaN; // false --0 === +0; // true - -is(NaN, NaN); // true -is(-0, +0); // false -is('a', 'b'); // false -``` - -See: [`isnt()`](#isnt) - - - -## isnt(x, y):Boolean - -Check if both values are not identical/egal. - -```js -// wtfjs -NaN === NaN; // false --0 === +0; // true - -isnt(NaN, NaN); // false -isnt(-0, +0); // true -isnt('a', 'b'); // true -``` - -See: [`is()`](#is) - - - - -## isArguments(val):Boolean - -If value is an "Arguments" object. - - - -## isArray(val):Boolean - -If value is an Array. Uses native ES5 `Array.isArray()` if available. - - - -## isBoolean(val):Boolean - -If value is a Boolean. - - - -## isDate(val):Boolean - -If value is a Date. - - - -## isEmpty(val):Boolean - -Checks if Array/Object/String is empty. - - -```js -isEmpty(''); // true -isEmpty('bar'); // false -isEmpty([]); // true -isEmpty([1, 2]); // false -isEmpty({}); // true -isEmpty({a:1, b:2}); // false -``` - - -## isFinite(val):Boolean - -Checks if value is Finite. - -Note: This is not the same as native `isFinite`, which will return `true` for -booleans and empty strings. See http://es5.github.com/#x15.1.2.5. - - - -## isFunction(val):Boolean - -If value is a Function. - - - -## isKind(val, kind):Boolean - -If value is of "kind". (used internally by some of the *isSomething* checks). - -Favor the other methods since strings are commonly mistyped and also because -some "kinds" can only be accurately checked by using other methods (e.g. -`Arguments`), some of the other checks are also faster. - -```js -isKind([1,2], 'Array'); // true -isKind(3, 'Array'); // false -isKind(3, 'Number'); // true -``` - -See: [`kindOf()`](#kindOf) - - - -## isInteger(val):Boolean - -Check if value is an integer. - -```js -isInteger(123); // true -isInteger(123.45); // false -isInteger({}); // false -isInteger('foo'); // false -isInteger('123'); // false -``` - - - -## isNaN(val):Boolean - -Check if value is `NaN`. - -Note: This is not the same as native `isNaN`, which will return `true` for -`undefined` and other values. See [ES5 isNaN](http://es5.github.com/#x15.1.2.4) - - - -## isNull(val):Boolean - -If value is `null`. - - - -## isNumber(val):Boolean - -If value is a Number. - - - -## isObject(val):Boolean - -If value is an Object. - - - -## isPlainObject(val):Boolean - -If the value is an Object created by the Object constructor. - - - -## isRegExp(val):Boolean - -If value is a RegExp. - - - -## isString(val):Boolean - -If value is a String. - - - -## isUndefined(val):Boolean - -If value is `undefined`. - - - -## kindOf(val):String - -Gets kind of value (e.g. "String", "Number", "RegExp", "Null", "Date"). -Used internally by `isKind()` and most of the other *isSomething* checks. - -```js -kindOf([1,2]); // "Array" -kindOf('foo'); // "String" -kindOf(3); // "Number" -``` - -See: [`isKind()`](#isKind) - - -## toArray(val):Array - -Convert array-like object into Array or wrap value into Array. - -```js -toArray({ - "0" : "foo", - "1" : "bar", - "length" : 2 -}); // ["foo", "bar"] - -function foo(){ - return toArray(arguments); -} -foo("lorem", 123); // ["lorem", 123] - -toArray("lorem ipsum"); // ["lorem ipsum"] -toArray(window); // [window] -toArray({foo:"bar", lorem:123}); // [{foo:"bar", lorem:123}] -``` - -See: object/values() - - - -## toString(val):String - -Convert any value to its string representation. - -Will return an empty string for `undefined` or `null`, otherwise will convert -the value to its string representation. - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/math.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/math.md deleted file mode 100644 index f45be3ed..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/math.md +++ /dev/null @@ -1,298 +0,0 @@ -# math # - -Math utilities. - - -## ceil(val[, step]):Number - -Round value up to full steps. Similar to `Math.ceil()` but can round value -to an arbitrary *radix*. - - ceil(7.2); // 8 - ceil(7.8); // 8 - ceil(7, 5); // 10 - ceil(11, 5); // 15 - ceil(15, 5); // 15 - -### Common use cases - -Round values by increments of 5/10/1000/etc. - -See: [`round()`](#round), [`floor()`](#floor), [`countSteps()`](#countSteps) - - - -## clamp(val, min, max):Number - -Clamps value inside range. - -`clamp()` is extremely useful in cases where you need to limit a value inside -a certain range. So instead of doing a complex `if/else` to filter/process the -value you can restrict it to always be inside the desired range: - - clamp(-5, 0, 10); // 0 - clamp(7, 1, 10); // 7 - clamp(8, 1, 10); // 8 - clamp(10, 1, 10); // 10 - clamp(11, 1, 10); // 10 - -If the value is smaller than `min` it returns the `min`, if `val` is higher -than `max` it returns `max`. - -### Common use cases - -Any situation where you need to limit a number inside a range like: slider -position, image galleries <small>(so user can't skip to an image that doesn't -exist)</small>, drag and drop, scroll boundaries, etc. - -See: [`loop()`](#loop) - - - - -## countSteps(val, step[, overflow]):Number - -Count number of full steps. - -### Arguments: - - 1. `val` (Number) : Value. - 2. `step` (Number) : Step size. - 3. `[overflow]` (Number) : Maximum number of steps, nSteps will loop if -`>=` than overflow. - - -Count steps is very useful for cases where you need to know how many "full -steps" the number *completed*. Think of it as a division that only returns -integers and ignore remainders. - - countSteps(3, 5); // 0 - countSteps(6, 5); // 1 - countSteps(12, 5); // 2 - countSteps(18, 5); // 3 - countSteps(21, 5); // 4 - -You can also set an `overflow` which will reset the *counter* before reaching -this number. - - countSteps(3, 5, 3); // 0 - countSteps(6, 5, 3); // 1 - countSteps(12, 5, 3); // 2 - countSteps(18, 5, 3); // 0 - countSteps(21, 5, 3); // 1 - -### Common use cases - -#### How many items fit inside an area: - - var containerWidth = 100; - var itemWidth = 8; - var howManyFit = countSteps(containerWidth, itemWidth); // 12 - -#### Split value into different scales or convert value from one scale to another - -From [mout/time/parseMs](time.html#parseMs): - - function parseMs(ms){ - return { - milliseconds : countSteps(ms, 1, 1000), - seconds : countSteps(ms, 1000, 60), - minutes : countSteps(ms, 60000, 60), - hours : countSteps(ms, 3600000, 24), - days : countSteps(ms, 86400000) - }; - } - - // {days:27, hours:4, minutes:26, seconds:5, milliseconds:454} - parseMs(2348765454); - - - -## floor(val[, step]):Number - -Round value down to full steps. Similar to `Math.floor()` but can round value -to an arbitrary *radix*. (formerly `snap`) - - floor(7.2); // 7 - floor(7.8); // 7 - floor(7, 5); // 5 - floor(11, 5); // 10 - floor(15, 5); // 15 - -### Common use cases - -Round values by increments of 5/10/1000/etc. - -See: [`round()`](#round), [`ceil()`](#ceil), [`countSteps()`](#countSteps) - - - -## inRange(val, min, max[, threshold]):Boolean - -Checks if value is inside the range. - - inRange(-6, 1, 10); // false - inRange( 5, 1, 10); // true - inRange(12, 1, 10); // false - -The threshold can be useful when you want granular control of what should match -and/or the precision could change at runtime or by some configuration option, -avoids the clutter of adding/subtracting the `threshold` from `mix` and `max`. - - inRange(12, 1, 10, 2); // true - inRange(13, 1, 10, 2); // false - -### Common use cases - -Anything that needs to check if value is inside a range, be it collision -detection, limiting interaction by mouse position, ignoring parts of the logic -that shouldn't happen if value isn't valid, simplify `if/else` conditions, -making code more readable, etc... - - - - -## isNear(val, target, threshold):Boolean - -Check if value is close to target. - -Similar to `inRange()` but used to check if value is close to a certain value -or match the desired value. Basically to simplify `if/else` conditions and to -make code clearer. - - isNear( 10.2, 10, 0.5); // true - isNear( 10.5, 10, 0.5); // true - isNear(10.51, 10, 0.5); // false - -### Common use cases - -Games where a certain action should happen if an *actor* is close to a target, -gravity fields, any numeric check that has some tolerance. - - - - -## lerp(ratio, start, end):Number - -Linear interpolation. - - lerp(0.5, 0, 10); // 5 - lerp(0.75, 0, 10); // 7.5 - -### Common use cases - -Linear interpolation is commonly used to create animations of elements moving -from one point to another, where you simply update the current ratio (which in -this case represents time) and get back the position of the element at that -"frame". - -The core idea of `lerp` is that you are using a number that goes from `0` to -`1` to specify a ratio inside that scale. This concept can be applied to -convert numbers from different scales easily. - -See: [`map()`](#map), [`norm()`](#norm) - - - - -## loop(val, min, max):Number - -Loops value inside range. Will return `min` if `val > max` and `max` if `val -< min`, otherwise it returns `val`. - - loop(-1, 0, 10); // 10 - loop( 1, 0, 10); // 1 - loop( 5, 0, 10); // 5 - loop( 9, 0, 10); // 9 - loop(10, 0, 10); // 10 - loop(11, 0, 10); // 0 - -Similar to [`clamp()`](#clamp) but *loops* the value inside the range when an -overflow occurs. - -### Common use cases - -Image galleries, infinite scroll, any kind of logic that requires that the -first item should be displayed after the last one or the last one should be -displayed after first if going on the opposite direction. - -See: [`clamp()`](#clamp) - - - - -## map(val, min1, max1, min2, max2):Number - -Maps a number from one scale to another. - - map(3, 0, 4, -1, 1) // 0.5 - map(3, 0, 10, 0, 100) // 30 - -### Common use cases - -Very useful to convert values from/to multiple scales. - -Let's suppose we have a slider that needs to go from `2000` to `5000` and that slider -has `300px` of width, here is how we would translate the knob position into the -current value: - - var knobX = 123; - var sliderWid = 300; - var minVal = 2000; - var maxVal = 5000; - - var curVal = map(knobX, 0, sliderWid, minVal, maxVal); // 3230 - -See: [`lerp()`](#lerp), [`norm()`](#norm) - - - - -## norm(val, min, max):Number - -Gets normalized ratio of value inside range. - - norm(50, 0, 100); // 0.5 - norm(75, 0, 100); // 0.75 - -### Common use cases - -Convert values between scales, used by [`map()`](#map) internally. Direct -opposite of [`lerp()`](#lerp). - -See: [`lerp()`](#lerp), [`map()`](#map) - - - -## round(val[, step]):Number - -Round value to full steps. Similar to `Math.round()` but allow setting an -arbitrary *radix*. - - // default - round(0.22); // 0 - round(0.49); // 0 - round(0.51); // 1 - - // custom radix - round(0.22, 0.5); // 0 - round(0.49, 0.5); // 0.5 - round(0.51, 0.5); // 0.5 - round(0.74, 0.5); // 0.5 - round(0.75, 0.5); // 1 - round(1.24, 0.5); // 1 - round(1.25, 0.5); // 1.5 - round(1.74, 0.5); // 1.5 - -### Common use cases - -Round values by increments of 0.5/5/10/1000/etc. - -See: [`floor()`](#floor), [`ceil()`](#ceil), [`countSteps()`](#countSteps) - - - -------------------------------------------------------------------------------- - -For more usage more info check the specs and source code. - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/number.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/number.md deleted file mode 100644 index 8d93865b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/number.md +++ /dev/null @@ -1,225 +0,0 @@ -# number # - -Number utilities. - - -## abbreviate(val[, nDecimalDigits, dictionary]):String - -Abbreviate number to thousands (K), millions (M) or billions (B). - -The default value for `nDecimalDigits` is `1`. - -### Example - - abbreviate(123456); // "123.5K" - abbreviate(12345678); // "12.3M" - abbreviate(1234567890); // "1.2B" - -You can set the amount of decimal digits (default is `1`): - - abbreviate(543); // "0.5K" - abbreviate(543, 1); // "0.5K" - abbreviate(543, 2); // "0.54K" - abbreviate(543, 3); // "0.543K" - -You can customize the abbreviation by passing a custom "dictionary": - - var _ptbrDict = { - thousands : ' mil', - millions : ' Mi', - billions : ' Bi' - }; - function customAbbr(val) { - return abbreviate(val, 1, _ptbrDict); - } - - customAbbr(123456); // "123.5 mil" - customAbbr(12345678); // "12.3 Mi" - customAbbr(1234567890); // "1.2 Bi" - - - -## currencyFormat(val[, nDecimalDigits, decimalSeparator, thousandsSeparator]):String - -Format a number as currency. - -### Example: - - currencyFormat(1000); // "1,000.00" - currencyFormat(1000, 1); // "1,000.0" - currencyFormat(1000, 2, ',', '.'); // "1.000,00" - - - -## enforcePrecision(val, nDecimalDigits):Number - -Enforce a specific amount of decimal digits and also fix floating point -rounding issues. - -### Example: - -```js -enforcePrecision(0.615, 2); // 0.62 -enforcePrecision(0.625, 2); // 0.63 -//floating point rounding "error" (rounds to odd number) -+(0.615).toFixed(2); // 0.61 -+(0.625).toFixed(2); // 0.63 -``` - - - -## MAX_INT:Number - -Maximum 32-bit signed integer value. `Math.pow(2, 31) - 1` - -### Example: - -```js -console.log( MAX_INT ); // 2147483647 -``` - - -## MAX_UINT:Number - -Maximum 32-bit unsigned integer value. `Math.pow(2, 32) - 1` - -### Example: - -```js -console.log( MAX_UINT ); // 4294967295 -``` - - -## MIN_INT:Number - -Minimum 32-bit signed integer value. `Math.pow(2, 31) * -1`. - -### Example: - -```js -console.log( MIN_INT ); // -2147483648 -``` - - -## pad(n, minLength[, char]):String - -Add padding zeros if `n.length` < `minLength`. - -### Example: - -```js -pad(1, 5); // "00001" -pad(12, 5); // "00012" -pad(123, 5); // "00123" -pad(1234, 5); // "01234" -pad(12345, 5); // "12345" -pad(123456, 5); // "123456" - -// you can also specify the "char" used for padding -pad(12, 5, '_'); // "___12" -``` - -see: [string/lpad](./string.html#lpad) - - - -## rol(val, shift):Number - -Bitwise circular shift left. - -More info at [Wikipedia#Circular_shift](http://en.wikipedia.org/wiki/Circular_shift) - - - -## ror(val, shift):Number - -Bitwise circular shift right. - -More info at [Wikipedia#Circular_shift](http://en.wikipedia.org/wiki/Circular_shift) - - - -## sign(val):Number - -Returns `-1` if value is negative, `0` if the value is `0` and `1` if value is positive. Useful for -multiplications. - -```js -sign(-123); // -1 -sign(123); // 1 -sign(0); // 0 -``` - - - -## toInt(val):Number - -"Convert" value into an 32-bit integer. Works like `Math.floor` if `val > 0` and -`Math.ceil` if `val < 0`. - -**IMPORTANT:** val will wrap at [number/MIN_INT](#MIN_INT) and -[number/MAX_INT](#MAX_INT). - -Created because most people don't know bitwise operations and also because this -feature is commonly needed. - -[Perf tests](http://jsperf.com/vs-vs-parseint-bitwise-operators/7) - -### Example: - -```js -toInt(1.25); // 1 -toInt(0.75); // 0 -toInt(-0.55); // 0 -toInt(-5.0001) // -5 -``` - - - -## toUInt(val):Number - -"Convert" value into an 32-bit unsigned integer. - -Works like AS3#uint(). - -**IMPORTANT:** val will wrap at 2^32. - -### Example: - -```js -toUInt(1.25); // 1 -toUInt(0.75); // 0 -toUInt(-0.55); // 0 -toUInt(-5.0001); // 4294967291 -toUInt(Math.pow(2,32) - 0.5); // 4294967295 -toUInt(Math.pow(2,32) + 0.5); // 0 -``` - - -## toUInt31(val):Number - -"Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). - -Useful since all bitwise operators besides `>>>` treat numbers as signed -integers. - -**IMPORTANT:** val will wrap at 2^31 and negative numbers will be treated as -`zero`. - -### Example: - -```js -toUInt31(1.25); // 1 -toUInt31(0.75); // 0 -toUInt31(-0.55); // 0 -toUInt31(-5.0001); // 0 -toUInt31(Math.pow(2,31) - 0.5); // 21474836470 -toUInt31(Math.pow(2,31) + 0.5); // 0 -``` - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/object.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/object.md deleted file mode 100644 index b4d5e483..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/object.md +++ /dev/null @@ -1,780 +0,0 @@ -# object # - -Object utilities. - - - -## bindAll(obj, [...methodNames]):void - -Bind methods of the target object to always execute on its own context -(ovewritting the original function). - -See: [function/bind](./function.html#bind) - -```js -var view = { - name: 'Lorem Ipsum', - logNameOnClick: function() { - console.log(this.name); - } -}; - -// binds all methods by default -bindAll(view); -jQuery('#docs').on('click', view.logNameOnClick); -``` - -You can also specify the list of methods that you want to bind (in case you -just want to bind a few of them). - -```js -// only the listed methods will be bound to `obj` context -bindAll(obj, 'logNameOnClick', 'doAwesomeStuffOnDrag'); -``` - - - -## contains(obj, value):Boolean - -Similar to [Array/contains](array.html#contains). Checks if Object contains -value. - -```js -var obj = { - a: 1, - b: 2, - c: 'bar' -}; -contains(obj, 2); // true -contains(obj, 'foo'); // false -``` - - - -## deepEquals(a, b, [callback]):Boolean - -Recursively tests whether two objects contain the same keys and equal values. - -`callback` specifies the equality comparison function used to compare -non-object values. It defaults to using the strict equals (`===`) operator. - -If the values are both an object, it will recurse into the objects, checking if -their keys/values are equal. It will only check the keys and values contained -by the objects; it will not check the objects' prototypes. If the either of -the values are not objects, they will be checked using the `callback` function. - -Example: - -```js -deepEquals({ a: 1 }, { a: 1 }); // true -deepEquals({ value: { a: 1 } }, { value: { a: 1 } }); // true -deepEquals({ value: { a: 1 } }, { value: { a: 2 } }); // false -deepEquals({ value: { a: 1 } }, { value: { a: 1, b: 2 } }); // false -deepEquals({}, null); // false -deepEquals(null, null); // true -deepEquals( - { a: { b: 1 } }, - { a: { b: '1' } }, - function(a, b) { return a == b; }); // true -``` - -See: [`equals()`](#equals) - - - -## deepFillIn(target, ...objects):Object - -Fill missing properties recursively. - -It's different from `deepMixIn` since it won't override any existing property. -It's also different from `merge` since it won't clone child objects during the -process. - -It returns the target object and mutates it in place. - -See: [`fillIn()`](#fillIn), [`deepMixIn()`](#deepMixIn), [`merge()`](#merge) - -```js -var base = { - foo : { - bar : 123 - }, - lorem : 'ipsum' -}; -var options = deepFillIn({foo : { baz : 45 }, lorem : 'amet'}, base); -// > {foo: {bar:123, baz : 45}, lorem : 'amet'} -``` - - - -## deepMatches(target, pattern):Boolean - -Recursively checks if object contains all properties/value pairs. When both -the target and pattern values are arrays, it checks that the target value -contain matches for all the items in the pattern array (independent of order). - -```js -var john = { - name: 'John', - age: 22, - pets: [ - { type: 'cat', name: 'Grumpy Cat' }, - { type: 'dog', name: 'Hawk' } - ] -}; - -deepMatches(john, { name: 'John' }); // true -deepMatches(john, { age: 21 }); // false -deepMatches(john, { pets: [ { type: 'cat' } ] }); // true -deepMatches(john, { pets: [ { name: 'Hawk' } ] }); // true -deepMatches(john, { pets: [ { name: 'Hairball' } ] }); // false -``` - -See [`matches()`](#matches) - - - -## deepMixIn(target, ...objects):Object - -Mixes objects into the target object, recursively mixing existing child objects -as well. - -It will only recursively mix objects if both (existing and new) values are -plain objects. - -Returns the target object. Like [`merge()`](#merge), but mutates the target -object, and does not clone child objects. - -```js -var target = { - foo: { - name: "foo", - id: 1 - } -}; - -deepMixIn(target, { foo: { id: 2 } }); -console.log(target); // { foo: { name: "foo", id: 2 } } -``` - -See: [`mixIn()`](#mixIn), [`merge()`](#merge), [`deepFillIn()`](#deepFillIn) - - - -## equals(a, b, [callback]):Boolean - -Tests whether two objects contain the same keys and values. - -`callback` specifies the equality comparison function used to compare the -values. It defaults to using the strict equals (`===`) operator. - -It will only check the keys and values contained by the objects; it will not -check the objects' prototypes. If either of the values are not objects, they -will be compared using the `callback` function. - -```js -equals({}, {}); // true -equals({ a: 1 }, { a: 1 }); // true -equals({ a: 1 }, { a: 2 }); // false -equals({ a: 1, b: 2 }, { a: 1 }); // false -equals({ a: 1 }, { a: 1, b: 2 }); // false -equals(null, null); // true -equals(null, {}); // false -equals({ a: 1 }, { a: '1' }, function(a, b) { return a == b; }); // true -``` - - - -## every(obj, callback, [thisObj]):Boolean - -Similar to [Array/every](array.html#every). Tests whether all properties in the -object pass the test implemented by the provided callback. - -```js -var obj = { - a: 1, - b: 2, - c: 3, - d: 'string' -}; - -every(obj, isNumber); // false -``` - - - -## fillIn(obj, ...default):Object - -Fill in missing properties in object with values from the *defaults* objects. - - var base = { - foo : 'bar', - num : 123 - }; - - fillIn({foo:'ipsum'}, base); // {foo:'ipsum', num:123} - -PS: it allows merging multiple objects at once, the first ones will take -precedence. - -See: [`mixIn()`](#mixIn), [`merge()`](#merge), [`deepFillIn()`](#deepFillIn) - - - -## filter(obj, callback, [thisObj]) - -Returns a new object containing all properties where `callback` returns true, -similar to Array/filter. It does not use properties from the object's -prototype. - -Callback receives the same arguments as `forOwn()`. - -See: [`forOwn()`](#forOwn), [`forIn()`](#forIn), [`pick()`](#pick) - -```js -var obj = { - foo: 'value', - bar: 'bar value' -}; - -// returns { bar: 'bar value' } -filter(obj, function(v) { return value.length > 5; }); - -// returns { foo: 'value' } -filter(obj, function(v, k) { return k === 'foo'; }); -``` - - - -## find(obj, callback, [thisObj]) - -Loops through all the properties in the Object and returns the first one that -passes a truth test (callback), similar to [Array/find](array.html#find). -Unlike Array/find, order of iteration is not guaranteed. - -```js -var obj = { - a: 'foo', - b: 12 -}; - -find(obj, isString); // 'foo' -find(obj, isNumber); // 12 -``` - - - -## forIn(obj, callback[, thisObj]) - -Iterate over all properties of an Object, similar to -[Array/forEach](array.html#forEach). - -It [avoids don't enum bug on IE](https://developer.mozilla.org/en/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug). -It **will** iterate over inherited (enumerable) properties from the prototype. - -It allows exiting the iteration early by returning `false` on the callback. - -See: [`forOwn()`](#forOwn), [`keys()`](#keys), [`values()`](#values) - -### Callback arguments - -Callback will receive the following arguments: - - 1. Property Value (*) - 2. Key name (String) - 3. Target object (Object) - -### Example - -```js -function Foo(){ - this.foo = 1; - this.bar = 2; -} - -Foo.prototype.lorem = 4; - -var obj = new Foo(); - -var result = 0; -var keys = []; - -forIn(obj, function(val, key, o){ - result += val; - keys.push(key); -}); - -console.log(result); // 7 -console.log(keys); // ['foo', 'bar', 'lorem'] -``` - - - -## forOwn(obj, callback[, thisObj]) - -Iterate over all own properties from an Object, similar to -[Array/forEach](array.html#forEach). - -It [avoids don't enum bug on IE](https://developer.mozilla.org/en/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug). -Notice that it **won't** iterate over properties from the prototype. - -It allows exiting the iteration early by returning `false` on the callback. - -See: [`forIn()`](#forIn), [`keys()`](#keys), [`values()`](#values) - -### Callback arguments - -Callback will receive the following arguments: - - 1. Property Value (*) - 2. Key name (String) - 3. Target object (Object) - -### Example - -```js -function Foo(){ - this.foo = 1; - this.bar = 2; -} - -// will be ignored -Foo.prototype.lorem = 4; - -var obj = new Foo(); - -var result = 0; -var keys = []; - -forOwn(obj, function(val, key, o){ - result += val; - keys.push(key); -}); - -console.log(result); // 3 -console.log(keys); // ['foo', 'bar'] -``` - - - -## functions(obj):Array - -Returns a sorted list of all enumerable properties that have function values -(including inherited properties). - -```js -var obj = { - foo : function(){}, - bar : 'baz' -}; -functions(obj); // ['foo'] -``` - - - -## get(obj, propName):* - -Returns nested property value. Will return `undefined` if property doesn't -exist. - -See: [`set()`](#set), [`namespace()`](#namespace), [`has()`](#has) - -```js -var lorem = { - ipsum : { - dolor : { - sit : 'amet' - } - } - }; - -get(lorem, 'ipsum.dolor.sit'); // "amet" -get(lorem, 'foo.bar'); // undefined -``` - - - -## has(obj, propName):Boolean - -Checks if object contains a child property. Useful for cases where you need to -check if an object contain a *nested* property. It will get properties -inherited by the prototype. - -see: [`hasOwn()`](#hasOwn), [`get()`](#get) - -```js -var a = { - b : { - c : 123 - } - }; - -has(a, 'b.c'); // true -has(a, 'foo.c'); // false -``` - -### Common use case - -```js -if( has(a, 'foo.c') ){ // false - // ... -} - -if( a.foo.c ){ // ReferenceError: `foo` is not defined - // ... -} -``` - - - -## hasOwn(obj, propName):Boolean - -Safer `Object.hasOwnProperty`. Returns a boolean indicating whether the object -has the specified property. - -see: [`has()`](#has) - -```js -var obj = { - foo: 1, - hasOwnProperty : 'bar' -}; - -obj.hasOwnProperty('foo'); // ERROR! hasOwnProperty is not a function - -hasOwn(obj, 'foo'); // true -hasOwn(obj, 'hasOwnProperty'); // true -hasOwn(obj, 'toString'); // false -``` - - - -## keys(obj):Array - -Returns an array of all own enumerable properties found upon a given object. -It will use the native `Object.keys` if present. - -PS: it won't return properties from the prototype. - -See: [`forOwn()`](#forOwn), [`values()`](#values) - -```js -var obj = { - foo : 1, - bar : 2, - lorem : 3 -}; -keys(obj); // ['foo', 'bar', 'lorem'] -``` - - - -## map(obj, callback, [thisObj]):Object - -Returns a new object where the property values are the result of calling the -callback for each property in the original object, similar to Array/map. - -The callback function receives the same arguments as in `forOwn()`. - -See: [`forOwn()`](#forOwn) - -```js -var obj = { foo: 1, bar: 2 }, - data = { foo: 0, bar: 1 }; - -map(obj, function(v) { return v + 1; }); // { foo: 2, bar: 3 } -map(obj, function(v, k) { return k; }); // { foo: "foo", bar: "bar" } -map(obj, function(v, k) { return this[k]; }, data); // { foo: 0, bar: 1 } -``` - - - -## matches(obj, props):Boolean - -Checks if object contains all properties/values pairs. Useful for validation -and filtering. - -```js -var john = {age:25, hair:'long', beard:true}; -var mark = {age:27, hair:'short', beard:false}; -var hippie = {hair:'long', beard:true}; -matches(john, hippie); // true -matches(mark, hippie); // false -``` - -See [`deepMatches()`](#deepMatches) - - - -## merge(...objects):Object - -Deep merges objects. Note that objects and properties will be cloned during the -process to avoid undesired side effects. It return a new object and won't -affect source objects. - -```js -var obj1 = {a: {b: 1, c: 1, d: {e: 1, f: 1}}}; -var obj2 = {a: {b: 2, d : {f : 'yeah'} }}; - -merge(obj1, obj2); // {a: {b : 2, c : 1, d : {e : 1, f : 'yeah'}}} -``` - -See: [`deepMixIn()`](#deppMixIn), [`deepFillIn()`](#deepFillIn) - - - -## max(obj[, iterator]):* - -Returns maximum value inside object or use a custom iterator to define how -items should be compared. Similar to [Array/max](array.html#max). - -See: [`min()`](#min) - -```js -max({a: 100, b: 2, c: 1, d: 3, e: 200}); // 200 -max({a: 'foo', b: 'lorem', c: 'amet'}, function(val){ - return val.length; -}); // 'lorem' -``` - - - -## min(obj[, iterator]):* - -Returns minimum value inside object or use a custom iterator to define how -items should be compared. Similar to [Array/min](array.html#min). - -See: [`max()`](#max) - -```js -min({a: 100, b: 2, c: 1, d: 3, e: 200}); // 1 -min({a: 'foo', b: 'lorem', c: 'amet'}, function(val){ - return val.length; -}); // 'foo' -``` - - - -## mixIn(target, ...objects):Object - -Combine properties from all the objects into first one. - -This method affects target object in place, if you want to create a new Object -pass an empty object as first parameter. - -### Arguments - - 1. `target` (Object) : Target Object. - 2. `...objects` (...Object) : Objects to be combined (0...n objects). - -### Example - -```js -var a = {foo: "bar"}; -var b = {lorem: 123}; - -mixIn({}, a, b); // {foo: "bar", lorem: 123} -console.log(a); // {foo: "bar"} - -mixIn(a, b); // {foo: "bar", lorem: 123} -console.log(a); // {foo: "bar", lorem: 123} -``` - -See: [`fillIn()`](#fillIn), [`merge()`](#merge) - - - - -## namespace(obj, propName):Object - -Creates an empty object inside namespace if not existent. Will return created -object or existing object. - -See: [`get()`](#get), [`set()`](#set) - -```js -var obj = {}; -namespace(obj, 'foo.bar'); // {} -console.log(obj); // {foo:{bar:{}}} -``` - - - -## pick(obj, ...keys):Object - -Return a copy of the object that contains only the whitelisted keys. - -See: [`filter()`](#filter) - -```js -var user = { - firstName : 'John', - lastName : 'Doe', - dob : '1985/07/23', - gender : 'male' -}; - -// can pass an array of keys as second argument -var keys = ['firstName', 'dob'] -pick(user, keys); // {firstName:"John", dob: "1985/07/23"} - -// or multiple arguments -pick(user, 'firstName', 'lastName'); // {firstName:"John", lastName: "Doe"} -``` - - - -## pluck(obj, propName):Object - -Extract an object containing property values with keys as they appear in the -passed object. - -```js -var users = { - first: { - name : 'John', - age : 21 - }, - second: { - name : 'Mary', - age : 25 - } -}; - -pluck(users, 'name'); // {first: 'John', second: 'Mary'} ); -pluck(users, 'age'); // {first: 21, second: 25} ); -``` - - - -## reduce(obj, callback, initial, [thisObj]):* - -Similar to [Array/reduce](array.html#reduce). - -Apply a function against an accumulator and each property of the object (order -is undefined) as to reduce it to a single value. - -```js -var obj = {a: 1, b: 2, c: 3, d: 4}; - -function sum(prev, cur, key, list) { - compare1.push(prev); - return prev + cur; -} - -reduce(obj, sum); // 10 -``` - - - -## reject(obj, callback, thisObj):Object - -Returns a new object containing all properties where `callback` returns true, -similar to [Array/reject](array.html#reject). It does not use properties from -the object's prototype. Opposite of [`filter()`](#filter). - -See [`filter()`](#filter) - -### Example - -```js -var obj = {a: 1, b: 2, c: 3, d: 4, e: 5}; -reject(obj, function(x) { return (x % 2) !== 0; }); // {b: 2, d: 4} -``` - - - -## values(obj):Array - -Returns an array of all own enumerable properties values found upon a given object. - -PS: it won't return properties from the prototype. - -See: [`forOwn()`](#forOwn), [`keys()`](#keys) - -```js -var obj = { - foo : 1, - bar : 2, - lorem : 3 -}; -values(obj); // [1, 2, 3] -``` - - - -## set(obj, propName, value) - -Sets a nested property value. - -See: [`get()`](#get), [`namespace()`](#namespace) - -```js -var obj = {}; -set(obj, 'foo.bar', 123); -console.log(obj.foo.bar); // 123 -console.log(obj); // {foo:{bar:123}} -``` - - - -## size(obj):Number - -Returns the count of own enumerable properties found upon a given object. - -PS: it won't return properties from the prototype. - -See: [`forOwn()`](#forOwn), [`keys()`](#keys) - -```js -var obj = { - foo : 1, - bar : 2, - lorem : 3 -}; -size(obj); // 3 -``` - - - -## some(obj, callback, [thisObj]):Boolean - -Similar to [Array/some](array.html#some). Tests whether any properties in the -object pass the test implemented by the provided callback. - -```js -var obj = { - a: 1, - b: 2, - c: 3, - d: 'string' -}; - -some(obj, isNumber); // true -``` - - - -## unset(obj, propName):Boolean - -Delete object property if existent and returns a boolean indicating succes. It -will also return `true` if property doesn't exist. - -Some properties can't be deleted, to understand why [check this -article](http://perfectionkills.com/understanding-delete/). - -See: [`set()`](#set) - -```js -var lorem = { - ipsum : { - dolor : { - sit : 'amet' - } - } - }; - -unset(lorem, 'ipsum.dolor.sit'); // true -console.log(lorem.ipsum.dolor); // {} -unset(lorem, 'foo.bar'); // true -``` diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/queryString.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/queryString.md deleted file mode 100644 index 1be3c102..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/queryString.md +++ /dev/null @@ -1,115 +0,0 @@ -# queryString # - -Utilities for query string manipulation. - - - -## contains(url, paramName):Boolen - -Checks if query string contains parameter. - -### Arguments: - - 1. `url` (String) : URL or query string. - 2. `paramName` (String) : Parameter name. - -### Example: - -```js -var url = 'example.com/?lorem=ipsum'; -contains(url, 'lorem'); // true -contains(url, 'foo'); //false -``` - - - -## decode(queryStr[, shouldTypecast]):Object - -Parses query string and creates an object of keys => vals. - -Will typecast value with [`string/typecast`](string.html#typecast) by default -and decode string parameters using `decodeURIComponent()`. - -```js -var query = '?foo=bar&lorem=123'; -decode(query); // {foo: "bar", lorem: 123} -decode(query, false); // {foo: "bar", lorem: "123"} -``` - - -## encode(obj):String - -Encode object into a query string. - -Will encode parameters with `encodeURIComponent()`. - -```js -encode({foo: "bar", lorem: 123}); // "?foo=bar&lorem=123" -``` - - -## getParam(url, param[, shouldTypecast]):* - -Get query parameter value. - -Will typecast value with [`string/typecast`](string.html#typecast) by default. - -See: [`setParam()`](#setParam) - -### Arguments: - - 1. `url` (String) : Url. - 2. `param` (String) : Parameter name. - 3. `[shouldTypecast]` (Boolean) : If it should typecast value. - -### Example: - -```js -var url = 'example.com/?foo=bar&lorem=123&ipsum=false'; -getParam(url, 'dolor'); // "amet" -getParam(url, 'lorem'); // 123 -getParam(url, 'lorem', false); // "123" -``` - - -## parse(url[, shouldTypecast]):Object - -Parses URL, extracts query string and decodes it. - -It will typecast all properties of the query object unless second argument is -`false`. - -Alias to: `decode(getQuery(url))`. - -```js -var url = 'example.com/?lorem=ipsum&a=123'; -parse(url); // {lorem: "ipsum", a: 123} -parse(url, false); // {lorem: "ipsum", a: "123"} -``` - - -## getQuery(url):String - -Gets full query as string with all special chars decoded. - -```js -getQuery('example.com/?lorem=ipsum'); // "?lorem=ipsum" -``` - - -## setParam(url, paramName, value):String - -Add new query string parameter to URL or update existing value. - -See: [`getParam()`](#getParam) - -```js -setParam('?foo=bar&lorem=0', 'lorem', 'ipsum'); // '?foo=bar&lorem=ipsum' -setParam('?lorem=1', 'foo', 123); // '?lorem=1&foo=123' -``` - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/random.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/random.md deleted file mode 100644 index b058b4e0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/random.md +++ /dev/null @@ -1,218 +0,0 @@ -# random # - -Pseudo-random generators. - -mout uses `Math.random` by default on all the pseudo-random generators, if -you need a seeded random or a better algorithm see the [`random()`](#random) -documentation for instructions. - - - -## choice(...items):* - -Returns a random element from the supplied arguments or from an array if single -argument is an array. - -### Example: - -```js -choice(1, 2, 3, 4, 5); // 3 - -var arr = ['lorem', 'ipsum', 'dolor']; -choice(arr); // 'dolor' -``` - - - -## guid():String - -Generates a pseudo-random [Globally Unique Identifier](http://en.wikipedia.org/wiki/Globally_unique_identifier) (v4). - -Since the total number of GUIDs is 2<sup>122</sup> the chance of generating the -same value twice is negligible. - -**Important:** this method uses `Math.random` by default so the UUID isn't -*safe* (sequence of outputs can be predicted in some cases), check the -[`random()`](#random) documentation for more info on how to replace the default -PRNG if you need extra safety or need *seeded* results. - -See: [`randHex()`](#randHex), [`random()`](#random) - -### Example: - -```js -guid(); // 830e9f50-ac7f-4369-a14f-ed0e62b2fa0b -guid(); // 5de3d09b-e79c-4727-932b-48c49228d508 -``` - - - -## rand([min], [max]):Number - -Gets a random number inside range or snap to min/max values. - -### Arguments: - - 1. `[min]` (Number) : Minimum value. Defaults to `number/MIN_INT`. - 2. `[max]` (Number) : Maximum value. Defaults to `number/MAX_INT`. - - -### Example: - -```js -rand(); // 448740433.55274725 -rand(); // -31797596.097682 -rand(0, 10); // 7.369723 -rand(0, 10); // 5.987042 -``` - -See: [`random()`](#random) - - - -## randBit():Number - -Returns a random "bit" (0 or 1). Useful for addition/subtraction. - -It's slightly faster than `choice(0, 1)` since implementation is simpler (not -that it will make a huge difference in most cases). - -See: [`choice()`](#choice) - -### Example: - -```js -randBit(); // 1 -randBit(); // 0 - -//same effect as -choice(0, 1); -``` - - - -## randHex([size]):String - -Returns a random hexadecimal string. - -The default `size` is `6`. - -### Example: - -```js -randHex(); // "dd8575" -randHex(); // "e6baeb" -randHex(2); // "a2" -randHex(30); // "effd7e2ad9a4a3067e30525fab983a" -``` - - - -## randInt([min], [max]):Number - -Gets a random integer inside range or snap to min/max values. - -### Arguments: - - 1. `[min]` (Number) : Minimum value. Defaults to `number/MIN_INT`. - 2. `[max]` (Number) : Maximum value. Defaults to `number/MAX_INT`. - - -### Example: - -```js -randInt(); // 448740433 -randInt(); // -31797596 -randInt(0, 10); // 7 -randInt(0, 10); // 5 -``` - - - -## randSign():Number - -Returns a random "sign" (-1 or 1). Useful for multiplications. - -It's slightly faster than `choice(-1, 1)` since implementation is simpler (not -that it will make a huge difference in most cases). - -See: [`choice()`](#choice) - -### Example: - -```js -randSign(); // -1 -randSign(); // 1 - -//same effect as -choice(-1, 1); -``` - - - -## random():Number - -Returns a random number between `0` and `1`. Same as `Math.random()`. - -```js -random(); // 0.35435103671625257 -random(); // 0.8768321881070733 -``` - -**Important:** No methods inside mout should call `Math.random()` -directly, they all use `random/random` as a proxy, that way we can -inject/replace the pseudo-random number generator if needed (ie. in case we -need a seeded random or a better algorithm than the native one). - -### Replacing the PRNG - -In some cases we might need better/different algorithms than the one provided -by `Math.random` (ie. safer, seeded). - -Because of licensing issues, file size limitations and different needs we -decided to **not** implement a custom PRNG and instead provide a easy way to -override the default behavior. - [issue #99](https://github.com/millermedeiros/amd-utils/issues/99) - -If you are using mout with a loader that supports the [AMD map -config](https://github.com/amdjs/amdjs-api/wiki/Common-Config), such as -[RequireJS](http://requirejs.org/), you can use it to replace the PRNG -(recommended approach): - -```js -requirejs.config({ - map : { - // all modules will load "my_custom_prng" instead of - // "mout/random/random" - '*' : { - 'mout/random/random' : 'my_custom_prng' - } - } -}); -``` - -You also have the option to override `random.get` in case you are using -mout on node.js or with a loader which doesn't support the map config: - -```js -// replace the PRNG -var n = 0; -random.get = function(){ - return ++n % 2? 0 : 1; // not so random :P -}; -random(); // 0 -random(); // 1 -random(); // 0 -random(); // 1 -``` - -See this [detailed explanation about PRNG in -JavaScript](http://baagoe.org/en/w/index.php/Better_random_numbers_for_javascript) -to understand the issues with the native `Math.random` and also for a list of -algorithms that could be used instead. - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/string.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/string.md deleted file mode 100644 index 2b282315..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/string.md +++ /dev/null @@ -1,594 +0,0 @@ -# string # - -String utilities. - - -## camelCase(str):String - -Convert string to "camelCase" text. - -See: [`pascalCase()`](#pascalCase), [`unCamelCase()`](#unCamelCase) - -### Example - -```js -camelCase('lorem-ipsum-dolor'); // "loremIpsumDolor" -camelCase('lorem ipsum dolor'); // "loremIpsumDolor" -``` - - - -## contains(str, substring, [fromIndex]):Boolean - -Checks if string contains the given substring. - -See: [`startsWith()`](#startsWith), [`endsWith()`](#endsWith) - -### Example - -```js -contains('lorem', 'or'); // true -contains('lorem', 'bar'); // false -``` - - - -## crop(str, maxChars, [append]):String - -Truncate string at full words. Alias to `truncate(str, maxChars, append, true);`. - -See: [`truncate()`](#truncate) - -### Example - -```js -crop('lorem ipsum dolor', 10); // "lorem..." -crop('lorem ipsum dolor', 10, '+'); // "lorem+" -``` - - - -## endsWith(str, suffix):Boolean - -Checks if string ends with specified suffix. - -See: [`startsWith()`](#startsWith), [`contains()`](#contains) - -### Example - -```js -endsWith('lorem ipsum', 'lorem'); // false -endsWith('lorem ipsum', 'ipsum'); // true -``` - - - -## escapeHtml(str):String - -Escapes HTML special chars (`>`, `<`, `&`, `"`, `'`). - -See: [`unescapeHtml()`](#unescapeHtml) - -### Example - -```js -escapeHtml('lorem & "ipsum"'); // "lorem &amp; &quot;ipsum&quot;" -``` - - - -## escapeRegExp(str):String - -Escape special chars to be used as literals in RegExp constructors. - -### Example - -```js -str = escapeRegExp('[lorem.ipsum]'); // "\\[lorem\\.ipsum\\]" -reg = new RegExp(str); // /\[lorem\.ipsum\]/ -``` - - - -## escapeUnicode(str[, shouldEscapePrintable]):String - -Unicode escape chars. - -It will only escape non-printable ASCII chars unless `shouldEscapePrintable` is -set to `true`. - -See: [`unescapeUnicode()`](#unescapeUnicode) - -```js -escapeUnicode('føo bår'); -// > "f\u00f8o b\u00e5r" -escapeUnicode('føo bår', true); -// > "\u0066\u00f8\u006f\u0020\u0062\u00e5\u0072" -``` - - - -## hyphenate(str):String - -Replaces spaces with hyphens, split camelCase text, remove non-word chars, -remove accents and convert to lower case. - -See: [`slugify()`](#slugify), [`underscore()`](#underscore), -[`unhyphenate`](#unhyphenate) - -```js -hyphenate(' %# lorem ipsum ? $ dolor'); // "lorem-ipsum-dolor" -hyphenate('spéçïãl çhârs'); // "special-chars" -hyphenate('loremIpsum'); // "lorem-ipsum" -``` - - - -## interpolate(str, replacements[, syntax]):String - -String interpolation. Format/replace tokens with object properties. - -```js -var tmpl = 'Hello {{name}}!'; -interpolate(tmpl, {name: 'World'}); // "Hello World!" -interpolate(tmpl, {name: 'Lorem Ipsum'}); // "Hello Lorem Ipsum!" -``` - -It uses a mustache-like syntax by default but you can set your own format if -needed. You can also use Arrays for the replacements (since Arrays are -objects as well): - -```js -// matches everything inside "${}" -var syntax = /\$\{([^}]+)\}/g; -var tmpl = "Hello ${0}!"; -interpolate(tmpl, ['Foo Bar'], syntax); // "Hello Foo Bar!" -``` - - - -## lowerCase(str):String - -"Safer" `String.toLowerCase()`. (Used internally) - -### Example - -```js -(null).toLowerCase(); // Error! -(undefined).toLowerCase(); // Error! -lowerCase(null); // "" -lowerCase(undefined); // "" -``` - - - -## lpad(str, minLength[, char]):String - -Pad string from left with `char` if its' length is smaller than `minLen`. - -See: [`rpad()`](#rpad) - -### Example - -```js -lpad('a', 5); // " a" -lpad('a', 5, '-'); // "----a" -lpad('abc', 3, '-'); // "abc" -lpad('abc', 4, '-'); // "-abc" -``` - - - -## ltrim(str, [chars]):String - -Remove chars or white-spaces from beginning of string. - -`chars` is an array of chars to remove from the beginning of the string. If -`chars` is not specified, Unicode whitespace chars will be used instead. - -See: [`rtrim()`](#rtrim), [`trim()`](#trim) - -### Example - -```js -ltrim(' lorem ipsum '); // "lorem ipsum " -ltrim('--lorem ipsum--', ['-']); // "lorem ipsum--" -``` - - - -## makePath(...args):String - -Group arguments as path segments, if any of the args is `null` or `undefined` -it will be ignored from resulting path. It will also remove duplicate "/". - -See: [`array/join()`](array.html#join) - -### Example - -```js -makePath('lorem', 'ipsum', null, 'dolor'); // "lorem/ipsum/dolor" -makePath('foo///bar/'); // "foo/bar/" -``` - - - -## normalizeLineBreaks(str, [lineBreak]):String - -Normalize line breaks to a single format. Defaults to Unix `\n`. - -It handles DOS (`\r\n`), Mac (`\r`) and Unix (`\n`) formats. - -### Example - -```js -// "foo\nbar\nlorem\nipsum" -normalizeLineBreaks('foo\nbar\r\nlorem\ripsum'); - -// "foo\rbar\rlorem\ripsum" -normalizeLineBreaks('foo\nbar\r\nlorem\ripsum', '\r'); - -// "foo bar lorem ipsum" -normalizeLineBreaks('foo\nbar\r\nlorem\ripsum', ' '); -``` - - - -## pascalCase(str):String - -Convert string to "PascalCase" text. - -See: [`camelCase()`](#camelCase) - -### Example - -```js -pascalCase('lorem-ipsum-dolor'); // "LoremIpsumDolor" -pascalCase('lorem ipsum dolor'); // "LoremIpsumDolor" -``` - - - -## properCase(str):String - -UPPERCASE first char of each word, lowercase other chars. - -### Example - -```js -properCase('loRem iPSum'); // "Lorem Ipsum" -``` - - - -## removeNonASCII(str):String - -Remove [non-printable ASCII -chars](http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters). - -### Example - -```js -removeNonASCII('äÄçÇéÉêlorem-ipsumöÖÐþúÚ'); // "lorem-ipsum" -``` - - - -## removeNonWord(str):String - -Remove non-word chars. - -### Example - -```js -var str = 'lorem ~!@#$%^&*()_+`-={}[]|\\:";\'/?><., ipsum'; -removeNonWord(str); // "lorem - ipsum" -``` - - - -## repeat(str, n):String - -Repeat string n-times. - -### Example - -```js -repeat('a', 3); // "aaa" -repeat('bc', 2); // "bcbc" -repeat('a', 0); // "" -``` - - - -## replace(str, search, replacements):String - -Replace string(s) with the replacement(s) in the source. - -`search` and `replacements` can be an array, or a single item. For every item -in `search`, it will call `str.replace` with the search item and the matching -replacement in `replacements`. If `replacements` only contains one replacement, -it will be used for all the searches, otherwise it will use the replacement at -the same index as the search. - -### Example - -```js -replace('foo bar', 'foo', 'test'); // "test bar" -replace('test 1 2', ['1', '2'], 'n'); // "test n n" -replace('test 1 2', ['1', '2'], ['one', 'two']); // "test one two" -replace('123abc', [/\d/g, /[a-z]/g], ['0', '.']); // "000..." -``` - - - -## replaceAccents(str):String - -Replaces all accented chars with regular ones. - -**Important:** Only covers **Basic Latin** and **Latin-1** unicode chars. - -### Example - -```js -replaceAccents('spéçïãl çhârs'); // "special chars" -``` - - - -## rpad(str, minLength[, char]):String - -Pad string from right with `char` if its' length is smaller than `minLen`. - -See: [`lpad()`](#lpad) - -### Example - -```js -rpad('a', 5); // "a " -rpad('a', 5, '-'); // "a----" -rpad('abc', 3, '-'); // "abc" -rpad('abc', 4, '-'); // "abc-" -``` - - - -## rtrim(str, [chars]):String - -Remove chars or white-spaces from end of string. - -`chars` is an array of chars to remove from the end of the string. If -`chars` is not specified, Unicode whitespace chars will be used instead. - -See: [`trim()`](#trim), [`ltrim()`](#ltrim) - -### Example - -```js -rtrim(' lorem ipsum '); // " lorem ipsum" -rtrim('--lorem ipsum--', ['-']); // "--lorem ipsum" -``` - - - -## sentenceCase(str):String - -UPPERCASE first char of each sentence and lowercase other chars. - -### Example - -```js -var str = 'Lorem IpSum DoLOr. maeCeNnas Ullamcor.'; -sentenceCase(str); // "Lorem ipsum dolor. Maecennas ullamcor." -``` - - - -## stripHtmlTags(str):String - -Remove HTML/XML tags from string. - -### Example - -```js -var str = '<p><em>lorem</em> <strong>ipsum</strong></p>'; -stripHtmlTags(str); // "lorem ipsum" -``` - - - -## startsWith(str, prefix):Boolean - -Checks if string starts with specified prefix. - -See: [`endsWith()`](#endsWith), [`contains()`](#contains) - -### Example - -```js -startsWith('lorem ipsum', 'lorem'); // true -startsWith('lorem ipsum', 'ipsum'); // false -``` - - - -## slugify(str[, delimeter]):String - -Convert to lower case, remove accents, remove non-word chars and replace spaces -with the delimeter. The default delimeter is a hyphen. - -Note that this does not split camelCase text. - -See: [`hyphenate()`](#hyphenate) and [`underscore()`](#underscore) - -### Example - -```js -var str = 'loremIpsum dolor spéçïãl chârs'; -slugify(str); // "loremipsum-dolor-special-chars" -slugify(str, '_'); // "loremipsum_dolor_special_chars" -``` - - - -## trim(str, [chars]):String - -Remove chars or white-spaces from beginning and end of string. - -`chars` is an array of chars to remove from the beginning and end of the -string. If `chars` is not specified, Unicode whitespace chars will be used -instead. - -See: [`rtrim()`](#rtrim), [`ltrim()`](#ltrim) - -### Example - -```js -trim(' lorem ipsum '); // "lorem ipsum" -trim('-+-lorem ipsum-+-', ['-', '+']); // "lorem ipsum" -``` - - - -## truncate(str, maxChars, [append], [onlyFullWords]):String - -Limit number of chars. Returned string `length` will be `<= maxChars`. - -See: [`crop()`](#crop) - -### Arguments - - 1. `str` (String) : String - 2. `maxChars` (Number) : Maximum number of characters including `append.length`. - 3. `[append]` (String) : Value that should be added to the end of string. - Defaults to "...". - 4. `[onlyFullWords]` (Boolean) : If it shouldn't break words. Default is - `false`. (favor [`crop()`](#crop) since code will be clearer). - -### Example - -```js -truncate('lorem ipsum dolor', 11); // "lorem ip..." -truncate('lorem ipsum dolor', 11, '+'); // "lorem ipsu+" -truncate('lorem ipsum dolor', 11, null, true); // "lorem..." -``` - - - -## typecast(str):* - -Parses string and convert it into a native value. - -### Example - -```js -typecast('lorem ipsum'); // "lorem ipsum" -typecast('123'); // 123 -typecast('123.45'); // 123.45 -typecast('false'); // false -typecast('true'); // true -typecast('null'); // null -typecast('undefined'); // undefined -``` - - - -## unCamelCase(str, [delimiter]):String - -Add the delimiter between camelCase text and convert first char of each word to -lower case. - -The delimiter defaults to a space character. - -See: [`camelCase()`][#camelCase] - -### Example - -```js -unCamelCase('loremIpsumDolor'); // "lorem ipsum dolor" -unCamelCase('loremIpsumDolor', '-'); // "lorem-ipsum-color" -``` - - -## underscore(str):String - -Replaces spaces with underscores, split camelCase text, remove non-word chars, -remove accents and convert to lower case. - -See: [`slugify()`](#slugify), [`hyphenate()`](#hyphenate) - -```js -underscore(' %# lorem ipsum ? $ dolor'); // "lorem_ipsum_dolor" -underscore('spéçïãl çhârs'); // "special_chars" -underscore('loremIpsum'); // "lorem_ipsum" -``` - - - -## unescapeHtml(str):String - -Unescapes HTML special chars (`>`, `<`, `&`, `"`, `'`). - -See: [`escapeHtml()`](#escapeHtml) - -### Example - -```js -unescapeHtml('lorem &amp; &quot;ipsum&quot;'); // 'lorem & "ipsum"' -``` - - - -## unescapeUnicode(str):String - -Unescapes unicode char sequences. - -See: [`escapeUnicode()`](#escapeUnicode) - -```js -unescapeUnicode('\\u0066\\u00f8\\u006f\\u0020\\u0062\\u00e5\\u0072'); -// > 'føo bår' -``` - - - -## unhyphenate(str):String - -Replaces hyphens with spaces. (only hyphens between word chars) - -See : [`hyphenate()`](#hyphenate) - -### Example - -```js -unhyphenate('lorem-ipsum-dolor'); // "lorem ipsum dolor" -``` - - -## upperCase(str):String - -"Safer" `String.toUpperCase()`. (Used internally) - -### Example - -```js -(null).toUpperCase(); // Error! -(undefined).toUpperCase(); // Error! -upperCase(null); // "" -upperCase(undefined); // "" -``` - - - -## WHITE_SPACES:Array - -Constant array of all [Unicode white-space -characters](http://en.wikipedia.org/wiki/Whitespace_character). - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/time.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/time.md deleted file mode 100644 index 628c2a9b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/doc/time.md +++ /dev/null @@ -1,64 +0,0 @@ -# time # - -Utilities for time manipulation. - - -## convert(value, sourceUnit, [destinationUnit]):Number - -Converts time between units. - -Available units: `millisecond`, `second`, `minute`, `hour`, `day`, `week`. -Abbreviations: `ms`, `s`, `m`, `h`, `d`, `w`. - -We do **not** support year and month as a time unit since their values are not -fixed. - -The default `destinationUnit` is `ms`. - -```js -convert(1, 'minute'); // 60000 -convert(2.5, 's', 'ms'); // 2500 -convert(2, 'm', 's'); // 120 -convert(500, 'ms', 's'); // 0.5 -``` - - - -## now():Number - -Returns the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC. -Uses `Date.now()` if available. - -### Example - -```js -now(); // 1335449614650 -``` - - - -## parseMs(ms):Object - -Parse timestamp (milliseconds) into an object `{milliseconds:number, -seconds:number, minutes:number, hours:number, days:number}`. - -### Example - -```js -// {days:27, hours:4, minutes:26, seconds:5, milliseconds:454} -parseMs(2348765454); -``` - - - -## toTimeString(ms):String - -Convert timestamp (milliseconds) into a time string in the format "[H:]MM:SS". - -### Example - -```js -toTimeString(12513); // "00:12" -toTimeString(951233); // "15:51" -toTimeString(8765235); // "2:26:05" -``` diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function.js deleted file mode 100644 index 43a16ef4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function.js +++ /dev/null @@ -1,18 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'bind' : require('./function/bind'), - 'compose' : require('./function/compose'), - 'debounce' : require('./function/debounce'), - 'func' : require('./function/func'), - 'makeIterator_' : require('./function/makeIterator_'), - 'partial' : require('./function/partial'), - 'prop' : require('./function/prop'), - 'series' : require('./function/series'), - 'throttle' : require('./function/throttle'), - 'timeout' : require('./function/timeout') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/bind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/bind.js deleted file mode 100644 index 71bc1257..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/bind.js +++ /dev/null @@ -1,23 +0,0 @@ - - - function slice(arr, offset){ - return Array.prototype.slice.call(arr, offset || 0); - } - - /** - * Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. - * @param {Function} fn Function. - * @param {object} context Execution context. - * @param {rest} args Arguments (0...n arguments). - * @return {Function} Wrapped Function. - */ - function bind(fn, context, args){ - var argsArr = slice(arguments, 2); //curried args - return function(){ - return fn.apply(context, argsArr.concat(slice(arguments))); - }; - } - - module.exports = bind; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/compose.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/compose.js deleted file mode 100644 index 8cd5c5f3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/compose.js +++ /dev/null @@ -1,23 +0,0 @@ - - - /** - * Returns a function that composes multiple functions, passing results to - * each other. - */ - function compose() { - var fns = arguments; - return function(arg){ - // only cares about the first argument since the chain can only - // deal with a single return value anyway. It should start from - // the last fn. - var n = fns.length; - while (n--) { - arg = fns[n].call(this, arg); - } - return arg; - }; - } - - module.exports = compose; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/debounce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/debounce.js deleted file mode 100644 index a0ed07f5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/debounce.js +++ /dev/null @@ -1,29 +0,0 @@ - - - /** - * Debounce callback execution - */ - function debounce(fn, threshold, isAsap){ - var timeout, result; - function debounced(){ - var args = arguments, context = this; - function delayed(){ - if (! isAsap) { - result = fn.apply(context, args); - } - timeout = null; - } - if (timeout) { - clearTimeout(timeout); - } else if (isAsap) { - result = fn.apply(context, args); - } - timeout = setTimeout(delayed, threshold); - return result; - } - return debounced; - } - - module.exports = debounce; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/func.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/func.js deleted file mode 100644 index b81bf0a8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/func.js +++ /dev/null @@ -1,14 +0,0 @@ - - - /** - * Returns a function that call a method on the passed object - */ - function func(name){ - return function(obj){ - return obj[name](); - }; - } - - module.exports = func; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/makeIterator_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/makeIterator_.js deleted file mode 100644 index 767610a5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/makeIterator_.js +++ /dev/null @@ -1,34 +0,0 @@ -var prop = require('./prop'); -var deepMatches = require('../object/deepMatches'); - - /** - * Converts argument into a valid iterator. - * Used internally on most array/object/collection methods that receives a - * callback/iterator providing a shortcut syntax. - */ - function makeIterator(src, thisObj){ - switch(typeof src) { - case 'object': - // typeof null == "object" - return (src != null)? function(val, key, target){ - return deepMatches(val, src); - } : src; - case 'string': - case 'number': - return prop(src); - case 'function': - if (typeof thisObj === 'undefined') { - return src; - } else { - return function(val, i, arr){ - return src.call(thisObj, val, i, arr); - }; - } - default: - return src; - } - } - - module.exports = makeIterator; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/partial.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/partial.js deleted file mode 100644 index d63ff1be..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/partial.js +++ /dev/null @@ -1,19 +0,0 @@ - - - function slice(arr, offset){ - return Array.prototype.slice.call(arr, offset || 0); - } - - /** - * Creates a partially applied function. - */ - function partial(fn, var_args){ - var argsArr = slice(arguments, 1); //curried args - return function(){ - return fn.apply(this, argsArr.concat(slice(arguments))); - }; - } - - module.exports = partial; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/prop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/prop.js deleted file mode 100644 index 734acb7a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/prop.js +++ /dev/null @@ -1,14 +0,0 @@ - - - /** - * Returns a function that gets a property of the passed object - */ - function prop(name){ - return function(obj){ - return obj[name]; - }; - } - - module.exports = prop; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/series.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/series.js deleted file mode 100644 index 25159c2c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/series.js +++ /dev/null @@ -1,22 +0,0 @@ - - - /** - * Returns a function that will execute a list of functions in sequence - * passing the same arguments to each one. (useful for batch processing - * items during a forEach loop) - */ - function series(){ - var fns = arguments; - return function(){ - var i = 0, - n = fns.length; - while (i < n) { - fns[i].apply(this, arguments); - i += 1; - } - }; - } - - module.exports = series; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/throttle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/throttle.js deleted file mode 100644 index 619dc540..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/throttle.js +++ /dev/null @@ -1,32 +0,0 @@ -var now = require('../time/now'); - - /** - */ - function throttle(fn, delay){ - var context, timeout, result, args, - cur, diff, prev = 0; - function delayed(){ - prev = now(); - timeout = null; - result = fn.apply(context, args); - } - function throttled(){ - context = this; - args = arguments; - cur = now(); - diff = delay - (cur - prev); - if (diff <= 0) { - clearTimeout(timeout); - prev = cur; - result = fn.apply(context, args); - } else if (! timeout) { - timeout = setTimeout(delayed, diff); - } - return result; - } - return throttled; - } - - module.exports = throttle; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/timeout.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/timeout.js deleted file mode 100644 index e0d21a66..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/function/timeout.js +++ /dev/null @@ -1,21 +0,0 @@ - - - function slice(arr, offset){ - return Array.prototype.slice.call(arr, offset || 0); - } - - /** - * Delays the call of a function within a given context. - */ - function timeout(fn, millis, context){ - - var args = slice(arguments, 3); - - return setTimeout(function() { - fn.apply(context, args); - }, millis); - } - - module.exports = timeout; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/index.js deleted file mode 100644 index 32a1c639..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/**@license - * mout v0.6.0 | http://moutjs.com | MIT license - */ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'VERSION' : '0.6.0', - 'array' : require('./array'), - 'collection' : require('./collection'), - 'date' : require('./date'), - 'function' : require('./function'), - 'lang' : require('./lang'), - 'math' : require('./math'), - 'number' : require('./number'), - 'object' : require('./object'), - 'queryString' : require('./queryString'), - 'random' : require('./random'), - 'string' : require('./string'), - 'time' : require('./time') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang.js deleted file mode 100644 index b9816218..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang.js +++ /dev/null @@ -1,36 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'clone' : require('./lang/clone'), - 'createObject' : require('./lang/createObject'), - 'ctorApply' : require('./lang/ctorApply'), - 'deepClone' : require('./lang/deepClone'), - 'defaults' : require('./lang/defaults'), - 'inheritPrototype' : require('./lang/inheritPrototype'), - 'is' : require('./lang/is'), - 'isArguments' : require('./lang/isArguments'), - 'isArray' : require('./lang/isArray'), - 'isBoolean' : require('./lang/isBoolean'), - 'isDate' : require('./lang/isDate'), - 'isEmpty' : require('./lang/isEmpty'), - 'isFinite' : require('./lang/isFinite'), - 'isFunction' : require('./lang/isFunction'), - 'isInteger' : require('./lang/isInteger'), - 'isKind' : require('./lang/isKind'), - 'isNaN' : require('./lang/isNaN'), - 'isNull' : require('./lang/isNull'), - 'isNumber' : require('./lang/isNumber'), - 'isObject' : require('./lang/isObject'), - 'isPlainObject' : require('./lang/isPlainObject'), - 'isRegExp' : require('./lang/isRegExp'), - 'isString' : require('./lang/isString'), - 'isUndefined' : require('./lang/isUndefined'), - 'isnt' : require('./lang/isnt'), - 'kindOf' : require('./lang/kindOf'), - 'toArray' : require('./lang/toArray'), - 'toString' : require('./lang/toString') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/clone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/clone.js deleted file mode 100644 index 33c4e949..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/clone.js +++ /dev/null @@ -1,49 +0,0 @@ -var kindOf = require('./kindOf'); -var isPlainObject = require('./isPlainObject'); -var mixIn = require('../object/mixIn'); - - /** - * Clone native types. - */ - function clone(val){ - switch (kindOf(val)) { - case 'Object': - return cloneObject(val); - case 'Array': - return cloneArray(val); - case 'RegExp': - return cloneRegExp(val); - case 'Date': - return cloneDate(val); - default: - return val; - } - } - - function cloneObject(source) { - if (isPlainObject(source)) { - return mixIn({}, source); - } else { - return source; - } - } - - function cloneRegExp(r) { - var flags = ''; - flags += r.multiline ? 'm' : ''; - flags += r.global ? 'g' : ''; - flags += r.ignorecase ? 'i' : ''; - return new RegExp(r.source, flags); - } - - function cloneDate(date) { - return new Date(+date); - } - - function cloneArray(arr) { - return arr.slice(); - } - - module.exports = clone; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/createObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/createObject.js deleted file mode 100644 index bbc14c1d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/createObject.js +++ /dev/null @@ -1,18 +0,0 @@ -var mixIn = require('../object/mixIn'); - - /** - * Create Object using prototypal inheritance and setting custom properties. - * - Mix between Douglas Crockford Prototypal Inheritance <http://javascript.crockford.com/prototypal.html> and the EcmaScript 5 `Object.create()` method. - * @param {object} parent Parent Object. - * @param {object} [props] Object properties. - * @return {object} Created object. - */ - function createObject(parent, props){ - function F(){} - F.prototype = parent; - return mixIn(new F(), props); - - } - module.exports = createObject; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/ctorApply.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/ctorApply.js deleted file mode 100644 index d68dc506..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/ctorApply.js +++ /dev/null @@ -1,17 +0,0 @@ - - - function F(){} - - /** - * Do fn.apply on a constructor. - */ - function ctorApply(ctor, args) { - F.prototype = ctor.prototype; - var instance = new F(); - ctor.apply(instance, args); - return instance; - } - - module.exports = ctorApply; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/deepClone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/deepClone.js deleted file mode 100644 index 25fd95f1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/deepClone.js +++ /dev/null @@ -1,48 +0,0 @@ -var clone = require('./clone'); -var forOwn = require('../object/forOwn'); -var kindOf = require('./kindOf'); -var isPlainObject = require('./isPlainObject'); - - /** - * Recursively clone native types. - */ - function deepClone(val, instanceClone) { - switch ( kindOf(val) ) { - case 'Object': - return cloneObject(val, instanceClone); - case 'Array': - return cloneArray(val, instanceClone); - default: - return clone(val); - } - } - - function cloneObject(source, instanceClone) { - if (isPlainObject(source)) { - var out = {}; - forOwn(source, function(val, key) { - this[key] = deepClone(val, instanceClone); - }, out); - return out; - } else if (instanceClone) { - return instanceClone(source); - } else { - return source; - } - } - - function cloneArray(arr, instanceClone) { - var out = [], - i = -1, - n = arr.length, - val; - while (++i < n) { - out[i] = deepClone(arr[i], instanceClone); - } - return out; - } - - module.exports = deepClone; - - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/defaults.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/defaults.js deleted file mode 100644 index 1111b2ef..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/defaults.js +++ /dev/null @@ -1,17 +0,0 @@ -var toArray = require('./toArray'); -var find = require('../array/find'); - - /** - * Return first non void argument - */ - function defaults(var_args){ - return find(toArray(arguments), nonVoid); - } - - function nonVoid(val){ - return val != null; - } - - module.exports = defaults; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/inheritPrototype.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/inheritPrototype.js deleted file mode 100644 index cd8a379e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/inheritPrototype.js +++ /dev/null @@ -1,16 +0,0 @@ -var createObject = require('./createObject'); - - /** - * Inherit prototype from another Object. - * - inspired by Nicholas Zackas <http://nczonline.net> Solution - * @param {object} child Child object - * @param {object} parent Parent Object - */ - function inheritPrototype(child, parent){ - var p = createObject(parent.prototype); - p.constructor = child; - child.prototype = p; - } - - module.exports = inheritPrototype; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/is.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/is.js deleted file mode 100644 index 4a835739..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/is.js +++ /dev/null @@ -1,23 +0,0 @@ - - - /** - * Check if both arguments are egal. - */ - function is(x, y){ - // implementation borrowed from harmony:egal spec - if (x === y) { - // 0 === -0, but they are not identical - return x !== 0 || 1 / x === 1 / y; - } - - // NaN !== NaN, but they are identical. - // NaNs are the only non-reflexive value, i.e., if x !== x, - // then x is a NaN. - // isNaN is broken: it converts its argument to number, so - // isNaN("foo") => true - return x !== x && y !== y; - } - - module.exports = is; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isArguments.js deleted file mode 100644 index f7b08ba4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isArguments.js +++ /dev/null @@ -1,15 +0,0 @@ -var isKind = require('./isKind'); - - /** - */ - var isArgs = isKind(arguments, 'Arguments')? - function(val){ - return isKind(val, 'Arguments'); - } : - function(val){ - // Arguments is an Object on IE7 - return !!(val && Object.prototype.hasOwnProperty.call(val, 'callee')); - }; - - module.exports = isArgs; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isArray.js deleted file mode 100644 index 262ee400..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isArray.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - var isArray = Array.isArray || function (val) { - return isKind(val, 'Array'); - }; - module.exports = isArray; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isBoolean.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isBoolean.js deleted file mode 100644 index 86557cb9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isBoolean.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isBoolean(val) { - return isKind(val, 'Boolean'); - } - module.exports = isBoolean; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isDate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isDate.js deleted file mode 100644 index 4a5130f2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isDate.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isDate(val) { - return isKind(val, 'Date'); - } - module.exports = isDate; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isEmpty.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isEmpty.js deleted file mode 100644 index 0e9f77da..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isEmpty.js +++ /dev/null @@ -1,24 +0,0 @@ -var forOwn = require('../object/forOwn'); -var isArray = require('./isArray'); - - function isEmpty(val){ - if (val == null) { - // typeof null == 'object' so we check it first - return false; - } else if ( typeof val === 'string' || isArray(val) ) { - return !val.length; - } else if ( typeof val === 'object' || typeof val === 'function' ) { - var result = true; - forOwn(val, function(){ - result = false; - return false; // break loop - }); - return result; - } else { - return false; - } - } - - module.exports = isEmpty; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isFinite.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isFinite.js deleted file mode 100644 index 6d4006f9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isFinite.js +++ /dev/null @@ -1,21 +0,0 @@ -var isNumber = require('./isNumber'); - - var global = this; - - /** - * Check if value is finite - */ - function isFinite(val){ - var is = false; - if (typeof val === 'string' && val !== '') { - is = global.isFinite( parseFloat(val) ); - } else if (isNumber(val)){ - // need to use isNumber because of Number constructor - is = global.isFinite( val ); - } - return is; - } - - module.exports = isFinite; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isFunction.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isFunction.js deleted file mode 100644 index 216879f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isFunction.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isFunction(val) { - return isKind(val, 'Function'); - } - module.exports = isFunction; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isInteger.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isInteger.js deleted file mode 100644 index 29f95d96..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isInteger.js +++ /dev/null @@ -1,12 +0,0 @@ -var isNumber = require('./isNumber'); - - /** - * Check if value is an integer - */ - function isInteger(val){ - return isNumber(val) && (val % 1 === 0); - } - - module.exports = isInteger; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isKind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isKind.js deleted file mode 100644 index 02301e04..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isKind.js +++ /dev/null @@ -1,9 +0,0 @@ -var kindOf = require('./kindOf'); - /** - * Check if value is from a specific "kind". - */ - function isKind(val, kind){ - return kindOf(val) === kind; - } - module.exports = isKind; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNaN.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNaN.js deleted file mode 100644 index f6efeb1f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNaN.js +++ /dev/null @@ -1,15 +0,0 @@ -var isNumber = require('./isNumber'); - - /** - * Check if value is NaN for realz - */ - function isNaN(val){ - // based on the fact that NaN !== NaN - // need to check if it's a number to avoid conflicts with host objects - // also need to coerce ToNumber to avoid edge case `new Number(NaN)` - return !isNumber(val) || val != +val; - } - - module.exports = isNaN; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNull.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNull.js deleted file mode 100644 index 6252f9ef..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNull.js +++ /dev/null @@ -1,9 +0,0 @@ - - /** - */ - function isNull(val){ - return val === null; - } - module.exports = isNull; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNumber.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNumber.js deleted file mode 100644 index 126c1cce..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNumber.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isNumber(val) { - return isKind(val, 'Number'); - } - module.exports = isNumber; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isObject.js deleted file mode 100644 index 7350c891..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isObject.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isObject(val) { - return isKind(val, 'Object'); - } - module.exports = isObject; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isPlainObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isPlainObject.js deleted file mode 100644 index 0d2d7b65..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isPlainObject.js +++ /dev/null @@ -1,14 +0,0 @@ - - - /** - * Checks if the value is created by the `Object` constructor. - */ - function isPlainObject(value) { - return (!!value - && typeof value === 'object' - && value.constructor === Object); - } - - module.exports = isPlainObject; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isRegExp.js deleted file mode 100644 index fc5459a9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isRegExp.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isRegExp(val) { - return isKind(val, 'RegExp'); - } - module.exports = isRegExp; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isString.js deleted file mode 100644 index f8906584..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isString.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isString(val) { - return isKind(val, 'String'); - } - module.exports = isString; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isUndefined.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isUndefined.js deleted file mode 100644 index fb2261df..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isUndefined.js +++ /dev/null @@ -1,10 +0,0 @@ - - var UNDEF; - - /** - */ - function isUndef(val){ - return val === UNDEF; - } - module.exports = isUndef; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isnt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isnt.js deleted file mode 100644 index 9dad58ce..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/isnt.js +++ /dev/null @@ -1,12 +0,0 @@ -var is = require('./is'); - - /** - * Check if both values are not identical/egal - */ - function isnt(x, y){ - return !is(x, y); - } - - module.exports = isnt; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/kindOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/kindOf.js deleted file mode 100644 index 663464d0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/kindOf.js +++ /dev/null @@ -1,20 +0,0 @@ - - - var _rKind = /^\[object (.*)\]$/, - _toString = Object.prototype.toString, - UNDEF; - - /** - * Gets the "kind" of value. (e.g. "String", "Number", etc) - */ - function kindOf(val) { - if (val === null) { - return 'Null'; - } else if (val === UNDEF) { - return 'Undefined'; - } else { - return _rKind.exec( _toString.call(val) )[1]; - } - } - module.exports = kindOf; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/toArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/toArray.js deleted file mode 100644 index e39b8734..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/toArray.js +++ /dev/null @@ -1,31 +0,0 @@ -var kindOf = require('./kindOf'); - - var _win = this; - - /** - * Convert array-like object into array - */ - function toArray(val){ - var ret = [], - kind = kindOf(val), - n; - - if (val != null) { - if ( val.length == null || kind === 'String' || kind === 'Function' || kind === 'RegExp' || val === _win ) { - //string, regexp, function have .length but user probably just want - //to wrap value into an array.. - ret[ret.length] = val; - } else { - //window returns true on isObject in IE7 and may have length - //property. `typeof NodeList` returns `function` on Safari so - //we can't use it (#58) - n = val.length; - while (n--) { - ret[n] = val[n]; - } - } - } - return ret; - } - module.exports = toArray; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/toString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/toString.js deleted file mode 100644 index ae5c2b0f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/lang/toString.js +++ /dev/null @@ -1,13 +0,0 @@ - - - /** - * Typecast a value to a String, using an empty string value for null or - * undefined. - */ - function toString(val){ - return val == null ? '' : val.toString(); - } - - module.exports = toString; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math.js deleted file mode 100644 index c6ee889b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math.js +++ /dev/null @@ -1,19 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'ceil' : require('./math/ceil'), - 'clamp' : require('./math/clamp'), - 'countSteps' : require('./math/countSteps'), - 'floor' : require('./math/floor'), - 'inRange' : require('./math/inRange'), - 'isNear' : require('./math/isNear'), - 'lerp' : require('./math/lerp'), - 'loop' : require('./math/loop'), - 'map' : require('./math/map'), - 'norm' : require('./math/norm'), - 'round' : require('./math/round') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/ceil.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/ceil.js deleted file mode 100644 index a279e158..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/ceil.js +++ /dev/null @@ -1,11 +0,0 @@ - - /** - * Round value up with a custom radix. - */ - function ceil(val, step){ - step = Math.abs(step || 1); - return Math.ceil(val / step) * step; - } - - module.exports = ceil; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/clamp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/clamp.js deleted file mode 100644 index e929a9a6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/clamp.js +++ /dev/null @@ -1,9 +0,0 @@ - - /** - * Clamps value inside range. - */ - function clamp(val, min, max){ - return val < min? min : (val > max? max : val); - } - module.exports = clamp; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/countSteps.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/countSteps.js deleted file mode 100644 index 60ac90c3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/countSteps.js +++ /dev/null @@ -1,16 +0,0 @@ - - /** - * Count number of full steps. - */ - function countSteps(val, step, overflow){ - val = Math.floor(val / step); - - if (overflow) { - return val % overflow; - } - - return val; - } - - module.exports = countSteps; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/floor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/floor.js deleted file mode 100644 index 9de50531..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/floor.js +++ /dev/null @@ -1,10 +0,0 @@ - - /** - * Floor value to full steps. - */ - function floor(val, step){ - step = Math.abs(step || 1); - return Math.floor(val / step) * step; - } - module.exports = floor; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/inRange.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/inRange.js deleted file mode 100644 index 763218f8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/inRange.js +++ /dev/null @@ -1,11 +0,0 @@ - - /** - * Checks if value is inside the range. - */ - function inRange(val, min, max, threshold){ - threshold = threshold || 0; - return (val + threshold >= min && val - threshold <= max); - } - - module.exports = inRange; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/isNear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/isNear.js deleted file mode 100644 index 45486b6d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/isNear.js +++ /dev/null @@ -1,9 +0,0 @@ - - /** - * Check if value is close to target. - */ - function isNear(val, target, threshold){ - return (Math.abs(val - target) <= threshold); - } - module.exports = isNear; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/lerp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/lerp.js deleted file mode 100644 index 111e2717..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/lerp.js +++ /dev/null @@ -1,11 +0,0 @@ - - /** - * Linear interpolation. - * IMPORTANT:will return `Infinity` if numbers overflow Number.MAX_VALUE - */ - function lerp(ratio, start, end){ - return start + (end - start) * ratio; - } - - module.exports = lerp; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/loop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/loop.js deleted file mode 100644 index 35207c1a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/loop.js +++ /dev/null @@ -1,10 +0,0 @@ - - /** - * Loops value inside range. - */ - function loop(val, min, max){ - return val < min? max : (val > max? min : val); - } - - module.exports = loop; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/map.js deleted file mode 100644 index 96c4b787..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/map.js +++ /dev/null @@ -1,11 +0,0 @@ -var lerp = require('./lerp'); -var norm = require('./norm'); - /** - * Maps a number from one scale to another. - * @example map(3, 0, 4, -1, 1) -> 0.5 - */ - function map(val, min1, max1, min2, max2){ - return lerp( norm(val, min1, max1), min2, max2 ); - } - module.exports = map; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/norm.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/norm.js deleted file mode 100644 index 54caf78a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/norm.js +++ /dev/null @@ -1,9 +0,0 @@ - - /** - * Gets normalized ratio of value inside range. - */ - function norm(val, min, max){ - return (val - min) / (max - min); - } - module.exports = norm; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/round.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/round.js deleted file mode 100644 index d108e6cd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/math/round.js +++ /dev/null @@ -1,12 +0,0 @@ - - /** - * Round number to a specific radix - */ - function round(value, radix){ - radix = radix || 1; // default round 1 - return Math.round(value / radix) * radix; - } - - module.exports = round; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number.js deleted file mode 100644 index 0b6186cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number.js +++ /dev/null @@ -1,21 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'MAX_INT' : require('./number/MAX_INT'), - 'MAX_UINT' : require('./number/MAX_UINT'), - 'MIN_INT' : require('./number/MIN_INT'), - 'abbreviate' : require('./number/abbreviate'), - 'currencyFormat' : require('./number/currencyFormat'), - 'enforcePrecision' : require('./number/enforcePrecision'), - 'pad' : require('./number/pad'), - 'rol' : require('./number/rol'), - 'ror' : require('./number/ror'), - 'sign' : require('./number/sign'), - 'toInt' : require('./number/toInt'), - 'toUInt' : require('./number/toUInt'), - 'toUInt31' : require('./number/toUInt31') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/MAX_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/MAX_INT.js deleted file mode 100644 index 1d6f0e48..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/MAX_INT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Maximum 32-bit signed integer value. (2^31 - 1) - */ - - module.exports = 2147483647; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/MAX_UINT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/MAX_UINT.js deleted file mode 100644 index 700da0f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/MAX_UINT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Maximum 32-bit unsigned integet value (2^32 - 1) - */ - - module.exports = 4294967295; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/MIN_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/MIN_INT.js deleted file mode 100644 index b34ab2ce..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/MIN_INT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Minimum 32-bit signed integer value (-2^31). - */ - - module.exports = -2147483648; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/abbreviate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/abbreviate.js deleted file mode 100644 index dd6716b9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/abbreviate.js +++ /dev/null @@ -1,35 +0,0 @@ -var enforcePrecision = require('./enforcePrecision'); - - var _defaultDict = { - thousand : 'K', - million : 'M', - billion : 'B' - }; - - /** - * Abbreviate number if bigger than 1000. (eg: 2.5K, 17.5M, 3.4B, ...) - */ - function abbreviateNumber(val, nDecimals, dict){ - nDecimals = nDecimals != null? nDecimals : 1; - dict = dict || _defaultDict; - val = enforcePrecision(val, nDecimals); - - var str, mod; - - if (val < 1000000) { - mod = enforcePrecision(val / 1000, nDecimals); - // might overflow to next scale during rounding - str = mod < 1000? mod + dict.thousand : 1 + dict.million; - } else if (val < 1000000000) { - mod = enforcePrecision(val / 1000000, nDecimals); - str = mod < 1000? mod + dict.million : 1 + dict.billion; - } else { - str = enforcePrecision(val / 1000000000, nDecimals) + dict.billion; - } - - return str; - } - - module.exports = abbreviateNumber; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/currencyFormat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/currencyFormat.js deleted file mode 100644 index 1cf02497..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/currencyFormat.js +++ /dev/null @@ -1,26 +0,0 @@ - - - /** - * Converts number into currency format - */ - function currencyFormat(val, nDecimalDigits, decimalSeparator, thousandsSeparator) { - nDecimalDigits = nDecimalDigits == null? 2 : nDecimalDigits; - decimalSeparator = decimalSeparator == null? '.' : decimalSeparator; - thousandsSeparator = thousandsSeparator == null? ',' : thousandsSeparator; - - //can't use enforce precision since it returns a number and we are - //doing a RegExp over the string - var fixed = val.toFixed(nDecimalDigits), - //separate begin [$1], middle [$2] and decimal digits [$4] - parts = new RegExp('^(-?\\d{1,3})((?:\\d{3})+)(\\.(\\d{'+ nDecimalDigits +'}))?$').exec( fixed ); - - if(parts){ //val >= 1000 || val <= -1000 - return parts[1] + parts[2].replace(/\d{3}/g, thousandsSeparator + '$&') + (parts[4] ? decimalSeparator + parts[4] : ''); - }else{ - return fixed.replace('.', decimalSeparator); - } - } - - module.exports = currencyFormat; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/enforcePrecision.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/enforcePrecision.js deleted file mode 100644 index f73a92d7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/enforcePrecision.js +++ /dev/null @@ -1,13 +0,0 @@ - - /** - * Enforce a specific amount of decimal digits and also fix floating - * point rounding issues. - * @example `enforcePrecision(0.615, 2) -> 0.62`, `(0.615).toFixed(2) -> - * 0.61` - */ - function enforcePrecision(val, nDecimalDigits){ - var pow = Math.pow(10, nDecimalDigits); - return +(Math.round(val * pow) / pow).toFixed(nDecimalDigits); - } - module.exports = enforcePrecision; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/pad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/pad.js deleted file mode 100644 index da752706..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/pad.js +++ /dev/null @@ -1,12 +0,0 @@ -var lpad = require('../string/lpad'); - - /** - * Add padding zeros if n.length < minLength. - */ - function pad(n, minLength, char){ - return lpad(''+ n, minLength, char || '0'); - } - - module.exports = pad; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/rol.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/rol.js deleted file mode 100644 index ecd58da4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/rol.js +++ /dev/null @@ -1,10 +0,0 @@ - - /** - * Bitwise circular shift left - * http://en.wikipedia.org/wiki/Circular_shift - */ - function rol(val, shift){ - return (val << shift) | (val >> (32 - shift)); - } - module.exports = rol; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/ror.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/ror.js deleted file mode 100644 index 2eda81da..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/ror.js +++ /dev/null @@ -1,10 +0,0 @@ - - /** - * Bitwise circular shift right - * http://en.wikipedia.org/wiki/Circular_shift - */ - function ror(val, shift){ - return (val >> shift) | (val << (32 - shift)); - } - module.exports = ror; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/sign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/sign.js deleted file mode 100644 index b854a4ed..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/sign.js +++ /dev/null @@ -1,15 +0,0 @@ - - - /** - * Get sign of the value. - */ - function sign(val) { - var num = Number(val); - if (num === 0) return num; // +0 and +0 === 0 - if (isNaN(num)) return num; // NaN - return num < 0? -1 : 1; - } - - module.exports = sign; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/toInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/toInt.js deleted file mode 100644 index bcefae0e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/toInt.js +++ /dev/null @@ -1,15 +0,0 @@ - - - /** - * "Convert" value into an 32-bit integer. - * Works like `Math.floor` if val > 0 and `Math.ceil` if val < 0. - * IMPORTANT: val will wrap at 2^31 and -2^31. - * Perf tests: http://jsperf.com/vs-vs-parseint-bitwise-operators/7 - */ - function toInt(val){ - return ~~val; - } - - module.exports = toInt; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/toUInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/toUInt.js deleted file mode 100644 index 5290b627..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/toUInt.js +++ /dev/null @@ -1,13 +0,0 @@ - - - /** - * "Convert" value into a 32-bit unsigned integer. - * IMPORTANT: Value will wrap at 2^32. - */ - function toUInt(val){ - return val >>> 0; - } - - module.exports = toUInt; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/toUInt31.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/toUInt31.js deleted file mode 100644 index fcc5a97c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/number/toUInt31.js +++ /dev/null @@ -1,13 +0,0 @@ -var MAX_INT = require('./MAX_INT'); - - /** - * "Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). - * IMPORTANT: value wil wrap at 2^31, if negative will return 0. - */ - function toUInt31(val){ - return (val <= 0)? 0 : (val > MAX_INT? ~~(val % (MAX_INT + 1)) : ~~val); - } - - module.exports = toUInt31; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object.js deleted file mode 100644 index 76c06424..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object.js +++ /dev/null @@ -1,42 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'bindAll' : require('./object/bindAll'), - 'contains' : require('./object/contains'), - 'deepEquals' : require('./object/deepEquals'), - 'deepFillIn' : require('./object/deepFillIn'), - 'deepMatches' : require('./object/deepMatches'), - 'deepMixIn' : require('./object/deepMixIn'), - 'equals' : require('./object/equals'), - 'every' : require('./object/every'), - 'fillIn' : require('./object/fillIn'), - 'filter' : require('./object/filter'), - 'find' : require('./object/find'), - 'forIn' : require('./object/forIn'), - 'forOwn' : require('./object/forOwn'), - 'functions' : require('./object/functions'), - 'get' : require('./object/get'), - 'has' : require('./object/has'), - 'hasOwn' : require('./object/hasOwn'), - 'keys' : require('./object/keys'), - 'map' : require('./object/map'), - 'matches' : require('./object/matches'), - 'max' : require('./object/max'), - 'merge' : require('./object/merge'), - 'min' : require('./object/min'), - 'mixIn' : require('./object/mixIn'), - 'namespace' : require('./object/namespace'), - 'pick' : require('./object/pick'), - 'pluck' : require('./object/pluck'), - 'reduce' : require('./object/reduce'), - 'reject' : require('./object/reject'), - 'set' : require('./object/set'), - 'size' : require('./object/size'), - 'some' : require('./object/some'), - 'unset' : require('./object/unset'), - 'values' : require('./object/values') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/bindAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/bindAll.js deleted file mode 100644 index b2f27d08..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/bindAll.js +++ /dev/null @@ -1,18 +0,0 @@ -var functions = require('./functions'); -var bind = require('../function/bind'); -var forEach = require('../array/forEach'); - - /** - * Binds methods of the object to be run in it's own context. - */ - function bindAll(obj, rest_methodNames){ - var keys = arguments.length > 1? - Array.prototype.slice.call(arguments, 1) : functions(obj); - forEach(keys, function(key){ - obj[key] = bind(obj[key], obj); - }); - } - - module.exports = bindAll; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/contains.js deleted file mode 100644 index 8076e2c5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/contains.js +++ /dev/null @@ -1,13 +0,0 @@ -var some = require('./some'); - - /** - * Check if object contains value - */ - function contains(obj, needle) { - return some(obj, function(val) { - return (val === needle); - }); - } - module.exports = contains; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/deepEquals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/deepEquals.js deleted file mode 100644 index fcde9449..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/deepEquals.js +++ /dev/null @@ -1,27 +0,0 @@ -var isObject = require('../lang/isObject'); -var equals = require('./equals'); - - function defaultCompare(a, b) { - return a === b; - } - - /** - * Recursively checks for same properties and values. - */ - function deepEquals(a, b, callback){ - callback = callback || defaultCompare; - - if (!isObject(a) || !isObject(b)) { - return callback(a, b); - } - - function compare(a, b){ - return deepEquals(a, b, callback); - } - - return equals(a, b, compare); - } - - module.exports = deepEquals; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/deepFillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/deepFillIn.js deleted file mode 100644 index d27db44d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/deepFillIn.js +++ /dev/null @@ -1,32 +0,0 @@ -var forOwn = require('./forOwn'); -var isPlainObject = require('../lang/isPlainObject'); - - /** - * Deeply copy missing properties in the target from the defaults. - */ - function deepFillIn(target, defaults){ - var i = 0, - n = arguments.length, - obj; - - while(++i < n) { - obj = arguments[i]; - if (obj) { - forOwn(obj, function(newValue, key) { - var curValue = target[key]; - if (curValue == null) { - target[key] = newValue; - } else if (isPlainObject(curValue) - && isPlainObject(newValue)) { - deepFillIn(curValue, newValue); - } - }); - } - } - - return target; - } - - module.exports = deepFillIn; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/deepMatches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/deepMatches.js deleted file mode 100644 index 3366c52d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/deepMatches.js +++ /dev/null @@ -1,55 +0,0 @@ -var forOwn = require('./forOwn'); -var isArray = require('../lang/isArray'); - - function containsMatch(array, pattern) { - var i = -1, length = array.length; - while (++i < length) { - if (deepMatches(array[i], pattern)) { - return true; - } - } - - return false; - } - - function matchArray(target, pattern) { - var i = -1, patternLength = pattern.length; - while (++i < patternLength) { - if (!containsMatch(target, pattern[i])) { - return false; - } - } - - return true; - } - - function matchObject(target, pattern) { - var result = true; - forOwn(pattern, function(val, key) { - if (!deepMatches(target[key], val)) { - // Return false to break out of forOwn early - return (result = false); - } - }); - - return result; - } - - /** - * Recursively check if the objects match. - */ - function deepMatches(target, pattern){ - if (target && typeof target === 'object') { - if (isArray(target) && isArray(pattern)) { - return matchArray(target, pattern); - } else { - return matchObject(target, pattern); - } - } else { - return target === pattern; - } - } - - module.exports = deepMatches; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/deepMixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/deepMixIn.js deleted file mode 100644 index a97e98d0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/deepMixIn.js +++ /dev/null @@ -1,34 +0,0 @@ -var forOwn = require('./forOwn'); -var isPlainObject = require('../lang/isPlainObject'); - - /** - * Mixes objects into the target object, recursively mixing existing child - * objects. - */ - function deepMixIn(target, objects) { - var i = 0, - n = arguments.length, - obj; - - while(++i < n){ - obj = arguments[i]; - if (obj) { - forOwn(obj, copyProp, target); - } - } - - return target; - } - - function copyProp(val, key) { - var existing = this[key]; - if (isPlainObject(val) && isPlainObject(existing)) { - deepMixIn(existing, val); - } else { - this[key] = val; - } - } - - module.exports = deepMixIn; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/equals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/equals.js deleted file mode 100644 index f50cbe4e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/equals.js +++ /dev/null @@ -1,36 +0,0 @@ -var hasOwn = require('./hasOwn'); -var every = require('./every'); -var isObject = require('../lang/isObject'); - - function defaultCompare(a, b) { - return a === b; - } - - // Makes a function to compare the object values from the specified compare - // operation callback. - function makeCompare(callback) { - return function(value, key) { - return hasOwn(this, key) && callback(value, this[key]); - }; - } - - function checkProperties(value, key) { - return hasOwn(this, key); - } - - /** - * Checks if two objects have the same keys and values. - */ - function equals(a, b, callback) { - callback = callback || defaultCompare; - - if (!isObject(a) || !isObject(b)) { - return callback(a, b); - } - - return (every(a, makeCompare(callback), b) && - every(b, checkProperties, a)); - } - - module.exports = equals; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/every.js deleted file mode 100644 index 01106e5f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/every.js +++ /dev/null @@ -1,23 +0,0 @@ -var forOwn = require('./forOwn'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Object every - */ - function every(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = true; - forOwn(obj, function(val, key) { - // we consider any falsy values as "false" on purpose so shorthand - // syntax can be used to check property existence - if (!callback(val, key, obj)) { - result = false; - return false; // break - } - }); - return result; - } - - module.exports = every; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/fillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/fillIn.js deleted file mode 100644 index 80dcdf07..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/fillIn.js +++ /dev/null @@ -1,20 +0,0 @@ -var forEach = require('../array/forEach'); -var forOwn = require('./forOwn'); - - /** - * Copy missing properties in the obj from the defaults. - */ - function fillIn(obj, var_defaults){ - forEach(Array.prototype.slice.call(arguments, 1), function(base){ - forOwn(base, function(val, key){ - if (obj[key] == null) { - obj[key] = val; - } - }); - }); - return obj; - } - - module.exports = fillIn; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/filter.js deleted file mode 100644 index 3a83a92f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/filter.js +++ /dev/null @@ -1,20 +0,0 @@ -var forOwn = require('./forOwn'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Creates a new object with all the properties where the callback returns - * true. - */ - function filterValues(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var output = {}; - forOwn(obj, function(value, key, obj) { - if (callback(value, key, obj)) { - output[key] = value; - } - }); - - return output; - } - module.exports = filterValues; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/find.js deleted file mode 100644 index d39c0706..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/find.js +++ /dev/null @@ -1,21 +0,0 @@ -var some = require('./some'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Returns first item that matches criteria - */ - function find(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result; - some(obj, function(value, key, obj) { - if (callback(value, key, obj)) { - result = value; - return true; //break - } - }); - return result; - } - - module.exports = find; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/forIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/forIn.js deleted file mode 100644 index 367f08ca..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/forIn.js +++ /dev/null @@ -1,62 +0,0 @@ - - - var _hasDontEnumBug, - _dontEnums; - - function checkDontEnum(){ - _dontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' - ]; - - _hasDontEnumBug = true; - - for (var key in {'toString': null}) { - _hasDontEnumBug = false; - } - } - - /** - * Similar to Array/forEach but works over object properties and fixes Don't - * Enum bug on IE. - * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation - */ - function forIn(obj, fn, thisObj){ - var key, i = 0; - // no need to check if argument is a real object that way we can use - // it for arrays, functions, date, etc. - - //post-pone check till needed - if (_hasDontEnumBug == null) checkDontEnum(); - - for (key in obj) { - if (exec(fn, obj, key, thisObj) === false) { - break; - } - } - - if (_hasDontEnumBug) { - while (key = _dontEnums[i++]) { - // since we aren't using hasOwn check we need to make sure the - // property was overwritten - if (obj[key] !== Object.prototype[key]) { - if (exec(fn, obj, key, thisObj) === false) { - break; - } - } - } - } - } - - function exec(fn, obj, key, thisObj){ - return fn.call(thisObj, obj[key], key, obj); - } - - module.exports = forIn; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/forOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/forOwn.js deleted file mode 100644 index 5f2dfbfc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/forOwn.js +++ /dev/null @@ -1,19 +0,0 @@ -var hasOwn = require('./hasOwn'); -var forIn = require('./forIn'); - - /** - * Similar to Array/forEach but works over object properties and fixes Don't - * Enum bug on IE. - * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation - */ - function forOwn(obj, fn, thisObj){ - forIn(obj, function(val, key){ - if (hasOwn(obj, key)) { - return fn.call(thisObj, obj[key], key, obj); - } - }); - } - - module.exports = forOwn; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/functions.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/functions.js deleted file mode 100644 index f5717979..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/functions.js +++ /dev/null @@ -1,18 +0,0 @@ -var forIn = require('./forIn'); - - /** - * return a list of all enumerable properties that have function values - */ - function functions(obj){ - var keys = []; - forIn(obj, function(val, key){ - if (typeof val === 'function'){ - keys.push(key); - } - }); - return keys.sort(); - } - - module.exports = functions; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/get.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/get.js deleted file mode 100644 index 6673561e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/get.js +++ /dev/null @@ -1,20 +0,0 @@ - - - /** - * get "nested" object property - */ - function get(obj, prop){ - var parts = prop.split('.'), - last = parts.pop(); - - while (prop = parts.shift()) { - obj = obj[prop]; - if (typeof obj !== 'object') return; - } - - return obj[last]; - } - - module.exports = get; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/has.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/has.js deleted file mode 100644 index ca9f2289..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/has.js +++ /dev/null @@ -1,15 +0,0 @@ -var get = require('./get'); - - var UNDEF; - - /** - * Check if object has nested property. - */ - function has(obj, prop){ - return get(obj, prop) !== UNDEF; - } - - module.exports = has; - - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/hasOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/hasOwn.js deleted file mode 100644 index 7e3c82ae..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/hasOwn.js +++ /dev/null @@ -1,12 +0,0 @@ - - - /** - * Safer Object.hasOwnProperty - */ - function hasOwn(obj, prop){ - return Object.prototype.hasOwnProperty.call(obj, prop); - } - - module.exports = hasOwn; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/keys.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/keys.js deleted file mode 100644 index dd2f4f55..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/keys.js +++ /dev/null @@ -1,16 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * Get object keys - */ - var keys = Object.keys || function (obj) { - var keys = []; - forOwn(obj, function(val, key){ - keys.push(key); - }); - return keys; - }; - - module.exports = keys; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/map.js deleted file mode 100644 index dd449a78..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/map.js +++ /dev/null @@ -1,18 +0,0 @@ -var forOwn = require('./forOwn'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Creates a new object where all the values are the result of calling - * `callback`. - */ - function mapValues(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var output = {}; - forOwn(obj, function(val, key, obj) { - output[key] = callback(val, key, obj); - }); - - return output; - } - module.exports = mapValues; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/matches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/matches.js deleted file mode 100644 index 6074faa2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/matches.js +++ /dev/null @@ -1,20 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * checks if a object contains all given properties/values - */ - function matches(target, props){ - // can't use "object/every" because of circular dependency - var result = true; - forOwn(props, function(val, key){ - if (target[key] !== val) { - // break loop at first difference - return (result = false); - } - }); - return result; - } - - module.exports = matches; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/max.js deleted file mode 100644 index 3e8e92c7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/max.js +++ /dev/null @@ -1,12 +0,0 @@ -var arrMax = require('../array/max'); -var values = require('./values'); - - /** - * Returns maximum value inside object. - */ - function max(obj, compareFn) { - return arrMax(values(obj), compareFn); - } - - module.exports = max; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/merge.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/merge.js deleted file mode 100644 index 6961f608..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/merge.js +++ /dev/null @@ -1,40 +0,0 @@ -var hasOwn = require('./hasOwn'); -var deepClone = require('../lang/deepClone'); -var isObject = require('../lang/isObject'); - - /** - * Deep merge objects. - */ - function merge() { - var i = 1, - key, val, obj, target; - - // make sure we don't modify source element and it's properties - // objects are passed by reference - target = deepClone( arguments[0] ); - - while (obj = arguments[i++]) { - for (key in obj) { - if ( ! hasOwn(obj, key) ) { - continue; - } - - val = obj[key]; - - if ( isObject(val) && isObject(target[key]) ){ - // inception, deep merge objects - target[key] = merge(target[key], val); - } else { - // make sure arrays, regexp, date, objects are cloned - target[key] = deepClone(val); - } - - } - } - - return target; - } - - module.exports = merge; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/min.js deleted file mode 100644 index e1e66976..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/min.js +++ /dev/null @@ -1,12 +0,0 @@ -var arrMin = require('../array/min'); -var values = require('./values'); - - /** - * Returns minimum value inside object. - */ - function min(obj, iterator) { - return arrMin(values(obj), iterator); - } - - module.exports = min; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/mixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/mixIn.js deleted file mode 100644 index 55ec8fd5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/mixIn.js +++ /dev/null @@ -1,28 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * Combine properties from all the objects into first one. - * - This method affects target object in place, if you want to create a new Object pass an empty object as first param. - * @param {object} target Target Object - * @param {...object} objects Objects to be combined (0...n objects). - * @return {object} Target Object. - */ - function mixIn(target, objects){ - var i = 0, - n = arguments.length, - obj; - while(++i < n){ - obj = arguments[i]; - if (obj != null) { - forOwn(obj, copyProp, target); - } - } - return target; - } - - function copyProp(val, key){ - this[key] = val; - } - - module.exports = mixIn; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/namespace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/namespace.js deleted file mode 100644 index c6e79f63..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/namespace.js +++ /dev/null @@ -1,19 +0,0 @@ -var forEach = require('../array/forEach'); - - /** - * Create nested object if non-existent - */ - function namespace(obj, path){ - if (!path) return obj; - forEach(path.split('.'), function(key){ - if (!obj[key]) { - obj[key] = {}; - } - obj = obj[key]; - }); - return obj; - } - - module.exports = namespace; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/pick.js deleted file mode 100644 index 74e56f98..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/pick.js +++ /dev/null @@ -1,18 +0,0 @@ - - - /** - * Return a copy of the object, filtered to only have values for the whitelisted keys. - */ - function pick(obj, var_keys){ - var keys = typeof arguments[1] !== 'string'? arguments[1] : Array.prototype.slice.call(arguments, 1), - out = {}, - i = 0, key; - while (key = keys[i++]) { - out[key] = obj[key]; - } - return out; - } - - module.exports = pick; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/pluck.js deleted file mode 100644 index e844df47..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/pluck.js +++ /dev/null @@ -1,13 +0,0 @@ -var map = require('./map'); -var prop = require('../function/prop'); - - /** - * Extract a list of property values. - */ - function pluck(obj, propName){ - return map(obj, prop(propName)); - } - - module.exports = pluck; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/reduce.js deleted file mode 100644 index 6f19a3a2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/reduce.js +++ /dev/null @@ -1,29 +0,0 @@ -var forOwn = require('./forOwn'); -var size = require('./size'); - - /** - * Object reduce - */ - function reduce(obj, callback, memo, thisObj) { - var initial = arguments.length > 2; - - if (!size(obj) && !initial) { - throw new Error('reduce of empty object with no initial value'); - } - - forOwn(obj, function(value, key, list) { - if (!initial) { - memo = value; - initial = true; - } - else { - memo = callback.call(thisObj, memo, value, key, list); - } - }); - - return memo; - } - - module.exports = reduce; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/reject.js deleted file mode 100644 index 74643795..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/reject.js +++ /dev/null @@ -1,16 +0,0 @@ -var filter = require('./filter'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Object reject - */ - function reject(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - return filter(obj, function(value, index, obj) { - return !callback(value, index, obj); - }, thisObj); - } - - module.exports = reject; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/set.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/set.js deleted file mode 100644 index 9b3cdc48..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/set.js +++ /dev/null @@ -1,17 +0,0 @@ -var namespace = require('./namespace'); - - /** - * set "nested" object property - */ - function set(obj, prop, val){ - var parts = (/^(.+)\.(.+)$/).exec(prop); - if (parts){ - namespace(obj, parts[1])[parts[2]] = val; - } else { - obj[prop] = val; - } - } - - module.exports = set; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/size.js deleted file mode 100644 index 97885953..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/size.js +++ /dev/null @@ -1,16 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * Get object size - */ - function size(obj) { - var count = 0; - forOwn(obj, function(){ - count++; - }); - return count; - } - - module.exports = size; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/some.js deleted file mode 100644 index 384c6f3c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/some.js +++ /dev/null @@ -1,21 +0,0 @@ -var forOwn = require('./forOwn'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Object some - */ - function some(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = false; - forOwn(obj, function(val, key) { - if (callback(val, key, obj)) { - result = true; - return false; // break - } - }); - return result; - } - - module.exports = some; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/unset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/unset.js deleted file mode 100644 index 343bca0a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/unset.js +++ /dev/null @@ -1,23 +0,0 @@ -var has = require('./has'); - - /** - * Unset object property. - */ - function unset(obj, prop){ - if (has(obj, prop)) { - var parts = prop.split('.'), - last = parts.pop(); - while (prop = parts.shift()) { - obj = obj[prop]; - } - return (delete obj[last]); - - } else { - // if property doesn't exist treat as deleted - return true; - } - } - - module.exports = unset; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/values.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/values.js deleted file mode 100644 index 265a6938..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/object/values.js +++ /dev/null @@ -1,16 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * Get object values - */ - function values(obj) { - var vals = []; - forOwn(obj, function(val, key){ - vals.push(val); - }); - return vals; - } - - module.exports = values; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/package.json deleted file mode 100644 index 76eadf21..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/package.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "name": "mout", - "description": "Modular Utilities", - "version": "0.6.0", - "homepage": "http://moutjs.com/", - "contributors": [ - { - "name": "Adam Nowotny" - }, - { - "name": "André Cruz", - "email": "amdfcruz@gmail.com" - }, - { - "name": "Conrad Zimmerman", - "url": "http://www.conradz.com" - }, - { - "name": "Friedemann Altrock", - "email": "frodenius@gmail.com" - }, - { - "name": "Jarrod Overson", - "url": "http://jarrodoverson.com" - }, - { - "name": "Miller Medeiros", - "email": "contact@millermedeiros.com", - "url": "http://blog.millermedeiros.com" - }, - { - "name": "Zach Shipley" - } - ], - "keywords": [ - "utilities", - "functional", - "amd-utils", - "stdlib" - ], - "repository": { - "type": "git", - "url": "git://github.com/mout/mout.git" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://www.opensource.org/licenses/mit-license.php" - } - ], - "bugs": { - "url": "https://github.com/mout/mout/issues/" - }, - "main": "./index.js", - "scripts": { - "prepublish": "node build cjs .", - "pretest": "node build pkg", - "test": "node node_modules/istanbul/lib/cli test tests/runner.js --hook-run-in-context" - }, - "directories": { - "doc": "./doc" - }, - "devDependencies": { - "istanbul": "~0.1.27", - "jasmine-node": "~1.2.2", - "requirejs": "2.x", - "nodefy": "*", - "mdoc": "~0.3.2", - "handlebars": "~1.0.6", - "commander": "~1.0.5", - "rocambole": "~0.2.3" - }, - "testling": { - "preprocess": "node build testling", - "browsers": { - "ie": [ - 7, - 8, - 9, - 10 - ], - "firefox": [ - 17, - "nightly" - ], - "chrome": [ - 23, - "canary" - ], - "opera": [ - 12, - "next" - ], - "safari": [ - 5.1, - 6 - ], - "iphone": [ - 6 - ], - "ipad": [ - 6 - ] - }, - "scripts": [ - "tests/lib/jasmine/jasmine.js", - "tests/lib/jasmine/jasmine.async.js", - "tests/lib/jasmine/jasmine-tap.js", - "tests/lib/requirejs/require.js", - "tests/testling/src.js", - "tests/testling/specs.js", - "tests/runner.js" - ] - }, - "readme": "![mout](http://moutjs.com/logo.png \"Modular JavaScript Utilties\")\n\nhttp://moutjs.com/\n\n[![Build Status](https://travis-ci.org/mout/mout.png?branch=master)](https://travis-ci.org/mout/mout)\n\nAll code is library agnostic and consist mostly of helper methods that aren't\ndirectly related with the DOM, the purpose of this library isn't to replace\nDojo, jQuery, YUI, Mootools, etc, but to provide modular solutions for common\nproblems that aren't solved by most of them. Consider it as a crossbrowser\nJavaScript standard library.\n\n\n\n## Main goals ##\n\n - increase code reuse;\n - be clear (code should be clean/readable);\n - be easy to debug;\n - be easy to maintain;\n - follow best practices;\n - follow standards when possible;\n - **don't convert JavaScript into another language!**\n - be compatible with other frameworks;\n - be modular;\n - have unit tests for all modules;\n - work on multiple environments (IE7+, modern browsers, node.js);\n\n\n\n## What shouldn't be here ##\n\n - UI components;\n - CSS selector engine;\n - Event system - pub/sub;\n - Template engine;\n - Anything that isn't generic enough to be on a standard library;\n - Anything that could be a separate library and/or isn't a modular utility...\n\n\n\n## API Documentation ##\n\nOnline documentation can be found at http://moutjs.com/ or inside the\n`doc` folder.\n\n\n\n## FAQ / Wiki / IRC ##\n\nFor more info about project structure, design decisions, tips, how to\ncontribute, build system, etc, please check the [project\nwiki](https://github.com/mout/mout/wiki).\n\nWe also have an IRC channel [#moutjs on\nirc.freenode.net](http://webchat.freenode.net/?channels=moutjs)\n\n\n\n## License ##\n\nReleased under the [MIT License](http://www.opensource.org/licenses/mit-license.php).\n\n", - "readmeFilename": "README.md", - "_id": "mout@0.6.0", - "dist": { - "shasum": "d2f7a6e5a796040bf7b6259a41b46705f49d271d" - }, - "_from": "mout@~0.6.0", - "_resolved": "https://registry.npmjs.org/mout/-/mout-0.6.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString.js deleted file mode 100644 index 22685a7f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString.js +++ /dev/null @@ -1,15 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'contains' : require('./queryString/contains'), - 'decode' : require('./queryString/decode'), - 'encode' : require('./queryString/encode'), - 'getParam' : require('./queryString/getParam'), - 'getQuery' : require('./queryString/getQuery'), - 'parse' : require('./queryString/parse'), - 'setParam' : require('./queryString/setParam') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/contains.js deleted file mode 100644 index da678cf4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/contains.js +++ /dev/null @@ -1,12 +0,0 @@ -var getQuery = require('./getQuery'); - - /** - * Checks if query string contains parameter. - */ - function contains(url, paramName) { - var regex = new RegExp('(\\?|&)'+ paramName +'=', 'g'); //matches `?param=` or `¶m=` - return regex.test(getQuery(url)); - } - - module.exports = contains; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/decode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/decode.js deleted file mode 100644 index 7e689990..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/decode.js +++ /dev/null @@ -1,21 +0,0 @@ -var typecast = require('../string/typecast'); -var isString = require('../lang/isString'); - - /** - * Decode query string into an object of keys => vals. - */ - function decode(queryStr, shouldTypecast) { - var queryArr = (queryStr || '').replace('?', '').split('&'), - n = queryArr.length, - obj = {}, - item, val; - while (n--) { - item = queryArr[n].split('='); - val = shouldTypecast === false? item[1] : typecast(item[1]); - obj[item[0]] = isString(val)? decodeURIComponent(val) : val; - } - return obj; - } - - module.exports = decode; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/encode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/encode.js deleted file mode 100644 index 6d2b12f8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/encode.js +++ /dev/null @@ -1,15 +0,0 @@ -var forOwn = require('../object/forOwn'); - - /** - * Encode object into a query string. - */ - function encode(obj){ - var query = []; - forOwn(obj, function(val, key){ - query.push( key +'='+ encodeURIComponent(val) ); - }); - return (query.length)? '?'+ query.join('&') : ''; - } - - module.exports = encode; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/getParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/getParam.js deleted file mode 100644 index f149c3ea..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/getParam.js +++ /dev/null @@ -1,15 +0,0 @@ -var typecast = require('../string/typecast'); -var getQuery = require('./getQuery'); - - /** - * Get query parameter value. - */ - function getParam(url, param, shouldTypecast){ - var regexp = new RegExp('(\\?|&)'+ param + '=([^&]*)'), //matches `?param=value` or `¶m=value`, value = $2 - result = regexp.exec( getQuery(url) ), - val = (result && result[2])? result[2] : null; - return shouldTypecast === false? val : typecast(val); - } - - module.exports = getParam; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/getQuery.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/getQuery.js deleted file mode 100644 index 5194af2d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/getQuery.js +++ /dev/null @@ -1,13 +0,0 @@ - - - /** - * Gets full query as string with all special chars decoded. - */ - function getQuery(url) { - url = url.replace(/#.*/, ''); //removes hash (to avoid getting hash query) - var queryString = /\?[a-zA-Z0-9\=\&\%\$\-\_\.\+\!\*\'\(\)\,]+/.exec(url); //valid chars according to: http://www.ietf.org/rfc/rfc1738.txt - return (queryString)? decodeURIComponent(queryString[0]) : ''; - } - - module.exports = getQuery; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/parse.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/parse.js deleted file mode 100644 index 532906c0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/parse.js +++ /dev/null @@ -1,13 +0,0 @@ -var decode = require('./decode'); -var getQuery = require('./getQuery'); - - /** - * Get query string, parses and decodes it. - */ - function parse(url, shouldTypecast) { - return decode(getQuery(url), shouldTypecast); - } - - module.exports = parse; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/setParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/setParam.js deleted file mode 100644 index 052a9ba6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/queryString/setParam.js +++ /dev/null @@ -1,28 +0,0 @@ - - - /** - * Set query string parameter value - */ - function setParam(url, paramName, value){ - url = url || ''; - - var re = new RegExp('(\\?|&)'+ paramName +'=[^&]*' ); - var param = paramName +'='+ encodeURIComponent( value ); - - if ( re.test(url) ) { - return url.replace(re, '$1'+ param); - } else { - if (url.indexOf('?') === -1) { - url += '?'; - } - if (url.indexOf('=') !== -1) { - url += '&'; - } - return url + param; - } - - } - - module.exports = setParam; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random.js deleted file mode 100644 index d9267f01..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random.js +++ /dev/null @@ -1,16 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'choice' : require('./random/choice'), - 'guid' : require('./random/guid'), - 'rand' : require('./random/rand'), - 'randBit' : require('./random/randBit'), - 'randHex' : require('./random/randHex'), - 'randInt' : require('./random/randInt'), - 'randSign' : require('./random/randSign'), - 'random' : require('./random/random') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/choice.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/choice.js deleted file mode 100644 index 51aa82a2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/choice.js +++ /dev/null @@ -1,15 +0,0 @@ -var randInt = require('./randInt'); -var isArray = require('../lang/isArray'); - - /** - * Returns a random element from the supplied arguments - * or from the array (if single argument is an array). - */ - function choice(items) { - var target = (arguments.length === 1 && isArray(items))? items : arguments; - return target[ randInt(0, target.length - 1) ]; - } - - module.exports = choice; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/guid.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/guid.js deleted file mode 100644 index 41f6eddc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/guid.js +++ /dev/null @@ -1,24 +0,0 @@ -var randHex = require('./randHex'); -var choice = require('./choice'); - - /** - * Returns pseudo-random guid (UUID v4) - * IMPORTANT: it's not totally "safe" since randHex/choice uses Math.random - * by default and sequences can be predicted in some cases. See the - * "random/random" documentation for more info about it and how to replace - * the default PRNG. - */ - function guid() { - return ( - randHex(8)+'-'+ - randHex(4)+'-'+ - // v4 UUID always contain "4" at this position to specify it was - // randomly generated - '4' + randHex(3) +'-'+ - // v4 UUID always contain chars [a,b,8,9] at this position - choice(8, 9, 'a', 'b') + randHex(3)+'-'+ - randHex(12) - ); - } - module.exports = guid; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/rand.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/rand.js deleted file mode 100644 index 782dec88..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/rand.js +++ /dev/null @@ -1,15 +0,0 @@ -var random = require('./random'); -var MIN_INT = require('../number/MIN_INT'); -var MAX_INT = require('../number/MAX_INT'); - - /** - * Returns random number inside range - */ - function rand(min, max){ - min = min == null? MIN_INT : min; - max = max == null? MAX_INT : max; - return min + (max - min) * random(); - } - - module.exports = rand; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randBit.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randBit.js deleted file mode 100644 index bd20b4a0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randBit.js +++ /dev/null @@ -1,11 +0,0 @@ -var random = require('./random'); - - /** - * Returns random bit (0 or 1) - */ - function randomBit() { - return random() > 0.5? 1 : 0; - } - - module.exports = randomBit; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randHex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randHex.js deleted file mode 100644 index d8d711c3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randHex.js +++ /dev/null @@ -1,19 +0,0 @@ -var choice = require('./choice'); - - var _chars = '0123456789abcdef'.split(''); - - /** - * Returns a random hexadecimal string - */ - function randHex(size){ - size = size && size > 0? size : 6; - var str = ''; - while (size--) { - str += choice(_chars); - } - return str; - } - - module.exports = randHex; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randInt.js deleted file mode 100644 index e237d964..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randInt.js +++ /dev/null @@ -1,18 +0,0 @@ -var MIN_INT = require('../number/MIN_INT'); -var MAX_INT = require('../number/MAX_INT'); -var rand = require('./rand'); - - /** - * Gets random integer inside range or snap to min/max values. - */ - function randInt(min, max){ - min = min == null? MIN_INT : ~~min; - max = max == null? MAX_INT : ~~max; - // can't be max + 0.5 otherwise it will round up if `rand` - // returns `max` causing it to overflow range. - // -0.5 and + 0.49 are required to avoid bias caused by rounding - return Math.round( rand(min - 0.5, max + 0.499999999999) ); - } - - module.exports = randInt; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randSign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randSign.js deleted file mode 100644 index 5a9fed76..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randSign.js +++ /dev/null @@ -1,11 +0,0 @@ -var random = require('./random'); - - /** - * Returns random sign (-1 or 1) - */ - function randomSign() { - return random() > 0.5? 1 : -1; - } - - module.exports = randomSign; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/random.js deleted file mode 100644 index 670a3cc4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/random.js +++ /dev/null @@ -1,18 +0,0 @@ - - - /** - * Just a wrapper to Math.random. No methods inside mout/random should call - * Math.random() directly so we can inject the pseudo-random number - * generator if needed (ie. in case we need a seeded random or a better - * algorithm than the native one) - */ - function random(){ - return random.get(); - } - - // we expose the method so it can be swapped if needed - random.get = Math.random; - - module.exports = random; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array.js deleted file mode 100644 index 7bcc961b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array.js +++ /dev/null @@ -1,46 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'append' : require('./array/append'), - 'collect' : require('./array/collect'), - 'combine' : require('./array/combine'), - 'compact' : require('./array/compact'), - 'contains' : require('./array/contains'), - 'difference' : require('./array/difference'), - 'every' : require('./array/every'), - 'filter' : require('./array/filter'), - 'find' : require('./array/find'), - 'findIndex' : require('./array/findIndex'), - 'flatten' : require('./array/flatten'), - 'forEach' : require('./array/forEach'), - 'indexOf' : require('./array/indexOf'), - 'insert' : require('./array/insert'), - 'intersection' : require('./array/intersection'), - 'invoke' : require('./array/invoke'), - 'join' : require('./array/join'), - 'lastIndexOf' : require('./array/lastIndexOf'), - 'map' : require('./array/map'), - 'max' : require('./array/max'), - 'min' : require('./array/min'), - 'pick' : require('./array/pick'), - 'pluck' : require('./array/pluck'), - 'range' : require('./array/range'), - 'reduce' : require('./array/reduce'), - 'reduceRight' : require('./array/reduceRight'), - 'reject' : require('./array/reject'), - 'remove' : require('./array/remove'), - 'removeAll' : require('./array/removeAll'), - 'shuffle' : require('./array/shuffle'), - 'some' : require('./array/some'), - 'sort' : require('./array/sort'), - 'split' : require('./array/split'), - 'toLookup' : require('./array/toLookup'), - 'union' : require('./array/union'), - 'unique' : require('./array/unique'), - 'xor' : require('./array/xor'), - 'zip' : require('./array/zip') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/append.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/append.js deleted file mode 100644 index 549d8754..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/append.js +++ /dev/null @@ -1,21 +0,0 @@ -define(function () { - - /** - * Appends an array to the end of another. - * The first array will be modified. - */ - function append(arr1, arr2) { - if (arr2 == null) { - return arr1; - } - - var pad = arr1.length, - i = -1, - len = arr2.length; - while (++i < len) { - arr1[pad + i] = arr2[i]; - } - return arr1; - } - return append; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/collect.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/collect.js deleted file mode 100644 index 8f60cda2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/collect.js +++ /dev/null @@ -1,26 +0,0 @@ -define(['./append', '../function/makeIterator_'], function (append, makeIterator) { - - /** - * Maps the items in the array and concatenates the result arrays. - */ - function collect(arr, callback, thisObj){ - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length; - while (++i < len) { - var value = callback(arr[i], i, arr); - if (value != null) { - append(results, value); - } - } - - return results; - } - - return collect; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/combine.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/combine.js deleted file mode 100644 index 22efb860..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/combine.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['./indexOf'], function (indexOf) { - - /** - * Combines an array with all the items of another. - * Does not allow duplicates and is case and type sensitive. - */ - function combine(arr1, arr2) { - if (arr2 == null) { - return arr1; - } - - var i = -1, len = arr2.length; - while (++i < len) { - if (indexOf(arr1, arr2[i]) === -1) { - arr1.push(arr2[i]); - } - } - - return arr1; - } - return combine; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/compact.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/compact.js deleted file mode 100644 index 02a81098..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/compact.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./filter'], function (filter) { - - /** - * Remove all null/undefined items from array. - */ - function compact(arr) { - return filter(arr, function(val){ - return (val != null); - }); - } - - return compact; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/contains.js deleted file mode 100644 index fca4f7cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/contains.js +++ /dev/null @@ -1,10 +0,0 @@ -define(['./indexOf'], function (indexOf) { - - /** - * If array contains values. - */ - function contains(arr, val) { - return indexOf(arr, val) !== -1; - } - return contains; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/difference.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/difference.js deleted file mode 100644 index 819bda3e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/difference.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['./unique', './filter', './some', './contains'], function (unique, filter, some, contains) { - - - /** - * Return a new Array with elements that aren't present in the other Arrays. - */ - function difference(arr) { - var arrs = Array.prototype.slice.call(arguments, 1), - result = filter(unique(arr), function(needle){ - return !some(arrs, function(haystack){ - return contains(haystack, needle); - }); - }); - return result; - } - - return difference; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/every.js deleted file mode 100644 index 78ba46d3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/every.js +++ /dev/null @@ -1,27 +0,0 @@ -define(['../function/makeIterator_'], function (makeIterator) { - - /** - * Array every - */ - function every(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = true; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (!callback(arr[i], i, arr) ) { - result = false; - break; - } - } - - return result; - } - - return every; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/filter.js deleted file mode 100644 index 52cf685a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/filter.js +++ /dev/null @@ -1,26 +0,0 @@ -define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { - - /** - * Array filter - */ - function filter(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - if (callback(value, i, arr)) { - results.push(value); - } - } - - return results; - } - - return filter; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/find.js deleted file mode 100644 index 3957dcd5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/find.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./findIndex'], function (findIndex) { - - /** - * Returns first item that matches criteria - */ - function find(arr, iterator, thisObj){ - var idx = findIndex(arr, iterator, thisObj); - return idx >= 0? arr[idx] : void(0); - } - - return find; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/findIndex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/findIndex.js deleted file mode 100644 index 59dfeeb9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/findIndex.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['../function/makeIterator_'], function (makeIterator) { - - /** - * Returns the index of the first item that matches criteria - */ - function findIndex(arr, iterator, thisObj){ - iterator = makeIterator(iterator, thisObj); - if (arr == null) { - return -1; - } - - var i = -1, len = arr.length; - while (++i < len) { - if (iterator(arr[i], i, arr)) { - return i; - } - } - - return -1; - } - - return findIndex; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/flatten.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/flatten.js deleted file mode 100644 index 42e87f43..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/flatten.js +++ /dev/null @@ -1,42 +0,0 @@ -define(['../lang/isArray', './append'], function (isArray, append) { - - /* - * Helper function to flatten to a destination array. - * Used to remove the need to create intermediate arrays while flattening. - */ - function flattenTo(arr, result, level) { - if (arr == null) { - return result; - } else if (level === 0) { - append(result, arr); - return result; - } - - var value, - i = -1, - len = arr.length; - while (++i < len) { - value = arr[i]; - if (isArray(value)) { - flattenTo(value, result, level - 1); - } else { - result.push(value); - } - } - return result; - } - - /** - * Recursively flattens an array. - * A new array containing all the elements is returned. - * If `shallow` is true, it will only flatten one level. - */ - function flatten(arr, level) { - level = level == null? -1 : level; - return flattenTo(arr, [], level); - } - - return flatten; - -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/forEach.js deleted file mode 100644 index 0e045868..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/forEach.js +++ /dev/null @@ -1,23 +0,0 @@ -define(function () { - - /** - * Array forEach - */ - function forEach(arr, callback, thisObj) { - if (arr == null) { - return; - } - var i = -1, - len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if ( callback.call(thisObj, arr[i], i, arr) === false ) { - break; - } - } - } - - return forEach; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/indexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/indexOf.js deleted file mode 100644 index 0e75f99b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/indexOf.js +++ /dev/null @@ -1,28 +0,0 @@ -define(function () { - - /** - * Array.indexOf - */ - function indexOf(arr, item, fromIndex) { - fromIndex = fromIndex || 0; - if (arr == null) { - return -1; - } - - var len = arr.length, - i = fromIndex < 0 ? len + fromIndex : fromIndex; - while (i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (arr[i] === item) { - return i; - } - - i++; - } - - return -1; - } - - return indexOf; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/insert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/insert.js deleted file mode 100644 index d8d831f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/insert.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['./difference', '../lang/toArray'], function (difference, toArray) { - - /** - * Insert item into array if not already present. - */ - function insert(arr, rest_items) { - var diff = difference(toArray(arguments).slice(1), arr); - if (diff.length) { - Array.prototype.push.apply(arr, diff); - } - return arr.length; - } - return insert; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/intersection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/intersection.js deleted file mode 100644 index 64e6ee97..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/intersection.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['./unique', './filter', './every', './contains'], function (unique, filter, every, contains) { - - - /** - * Return a new Array with elements common to all Arrays. - * - based on underscore.js implementation - */ - function intersection(arr) { - var arrs = Array.prototype.slice.call(arguments, 1), - result = filter(unique(arr), function(needle){ - return every(arrs, function(haystack){ - return contains(haystack, needle); - }); - }); - return result; - } - - return intersection; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/invoke.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/invoke.js deleted file mode 100644 index a2e78b39..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/invoke.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['./forEach'], function (forEach) { - - /** - * Call `methodName` on each item of the array passing custom arguments if - * needed. - */ - function invoke(arr, methodName, var_args){ - if (arr == null) { - return arr; - } - - var args = Array.prototype.slice.call(arguments, 2); - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - value[methodName].apply(value, args); - } - - return arr; - } - - return invoke; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/join.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/join.js deleted file mode 100644 index 2c618d29..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/join.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['./filter'], function(filter) { - - function isValidString(val) { - return (val != null && val !== ''); - } - - /** - * Joins strings with the specified separator inserted between each value. - * Null values and empty strings will be excluded. - */ - function join(items, separator) { - separator = separator || ''; - return filter(items, isValidString).join(separator); - } - - return join; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/lastIndexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/lastIndexOf.js deleted file mode 100644 index 931235f4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/lastIndexOf.js +++ /dev/null @@ -1,28 +0,0 @@ -define(function () { - - /** - * Array lastIndexOf - */ - function lastIndexOf(arr, item, fromIndex) { - if (arr == null) { - return -1; - } - - var len = arr.length; - fromIndex = (fromIndex == null || fromIndex >= len)? len - 1 : fromIndex; - fromIndex = (fromIndex < 0)? len + fromIndex : fromIndex; - - while (fromIndex >= 0) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (arr[fromIndex] === item) { - return fromIndex; - } - fromIndex--; - } - - return -1; - } - - return lastIndexOf; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/map.js deleted file mode 100644 index 1580b481..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/map.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { - - /** - * Array map - */ - function map(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null){ - return results; - } - - var i = -1, len = arr.length; - while (++i < len) { - results[i] = callback(arr[i], i, arr); - } - - return results; - } - - return map; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/max.js deleted file mode 100644 index a7326c89..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/max.js +++ /dev/null @@ -1,34 +0,0 @@ -define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { - - /** - * Return maximum value inside array - */ - function max(arr, iterator, thisObj){ - if (arr == null || !arr.length) { - return Infinity; - } else if (arr.length && !iterator) { - return Math.max.apply(Math, arr); - } else { - iterator = makeIterator(iterator, thisObj); - var result, - compare = -Infinity, - value, - temp; - - var i = -1, len = arr.length; - while (++i < len) { - value = arr[i]; - temp = iterator(value, i, arr); - if (temp > compare) { - compare = temp; - result = value; - } - } - - return result; - } - } - - return max; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/min.js deleted file mode 100644 index 41644480..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/min.js +++ /dev/null @@ -1,34 +0,0 @@ -define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { - - /** - * Return minimum value inside array - */ - function min(arr, iterator, thisObj){ - if (arr == null || !arr.length) { - return -Infinity; - } else if (arr.length && !iterator) { - return Math.min.apply(Math, arr); - } else { - iterator = makeIterator(iterator, thisObj); - var result, - compare = Infinity, - value, - temp; - - var i = -1, len = arr.length; - while (++i < len) { - value = arr[i]; - temp = iterator(value, i, arr); - if (temp < compare) { - compare = temp; - result = value; - } - } - - return result; - } - } - - return min; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/pick.js deleted file mode 100644 index 97d7f595..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/pick.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../random/randInt'], function (randInt) { - - /** - * Remove a random item from the Array and return it - */ - function pick(arr){ - if (arr == null || !arr.length) return; - var idx = randInt(0, arr.length - 1); - return arr.splice(idx, 1)[0]; - } - - return pick; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/pluck.js deleted file mode 100644 index c908856e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/pluck.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./map'], function (map) { - - /** - * Extract a list of property values. - */ - function pluck(arr, propName){ - return map(arr, propName); - } - - return pluck; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/range.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/range.js deleted file mode 100644 index 148ebf96..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/range.js +++ /dev/null @@ -1,27 +0,0 @@ -define(['../math/countSteps'], function (countSteps) { - - /** - * Returns an Array of numbers inside range. - */ - function range(start, stop, step) { - if (stop == null) { - stop = start; - start = 0; - } - step = step || 1; - - var result = [], - nSteps = countSteps(stop - start, step), - i = start; - - while (i <= stop) { - result.push(i); - i += step; - } - - return result; - } - - return range; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reduce.js deleted file mode 100644 index 88aacfd5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reduce.js +++ /dev/null @@ -1,33 +0,0 @@ -define(['./forEach'], function (forEach) { - - /** - * Array reduce - */ - function reduce(arr, fn, initVal) { - // check for args.length since initVal might be "undefined" see #gh-57 - var hasInit = arguments.length > 2, - result = initVal; - - if (arr == null || !arr.length) { - if (!hasInit) { - throw new Error('reduce of empty array with no initial value'); - } else { - return initVal; - } - } - - var i = -1, len = arr.length; - while (++i < len) { - if (!hasInit) { - result = arr[i]; - hasInit = true; - } else { - result = fn(result, arr[i], i, arr); - } - } - - return result; - } - - return reduce; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reduceRight.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reduceRight.js deleted file mode 100644 index ddae0e7f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reduceRight.js +++ /dev/null @@ -1,34 +0,0 @@ -define(function () { - - /** - * Array reduceRight - */ - function reduceRight(arr, fn, initVal) { - // check for args.length since initVal might be "undefined" see #gh-57 - var hasInit = arguments.length > 2; - - if (arr == null || !arr.length) { - if (hasInit) { - return initVal; - } else { - throw new Error('reduce of empty array with no initial value'); - } - } - - var i = arr.length, result = initVal, value; - while (--i >= 0) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - value = arr[i]; - if (!hasInit) { - result = value; - hasInit = true; - } else { - result = fn(result, value, i, arr); - } - } - return result; - } - - return reduceRight; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reject.js deleted file mode 100644 index db105dde..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reject.js +++ /dev/null @@ -1,25 +0,0 @@ -define(['./forEach', '../function/makeIterator_'], function(forEach, makeIterator) { - - /** - * Array reject - */ - function reject(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - if (!callback(value, i, arr)) { - results.push(value); - } - } - - return results; - } - - return reject; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/remove.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/remove.js deleted file mode 100644 index dec9134d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/remove.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./indexOf'], function(indexOf){ - - /** - * Remove a single item from the array. - * (it won't remove duplicates, just a single item) - */ - function remove(arr, item){ - var idx = indexOf(arr, item); - if (idx !== -1) arr.splice(idx, 1); - } - - return remove; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/removeAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/removeAll.js deleted file mode 100644 index e81022b8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/removeAll.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./indexOf'], function(indexOf){ - - /** - * Remove all instances of an item from array. - */ - function removeAll(arr, item){ - var idx = indexOf(arr, item); - while (idx !== -1) { - arr.splice(idx, 1); - idx = indexOf(arr, item, idx); - } - } - - return removeAll; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/shuffle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/shuffle.js deleted file mode 100644 index f5a60972..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/shuffle.js +++ /dev/null @@ -1,28 +0,0 @@ -define(['../random/randInt', './forEach'], function (randInt, forEach) { - - /** - * Shuffle array items. - */ - function shuffle(arr) { - var results = [], - rnd; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - if (!i) { - results[0] = arr[0]; - } else { - rnd = randInt(0, i); - results[i] = results[rnd]; - results[rnd] = arr[i]; - } - } - - return results; - } - - return shuffle; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/some.js deleted file mode 100644 index e46a9781..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/some.js +++ /dev/null @@ -1,27 +0,0 @@ -define(['../function/makeIterator_'], function (makeIterator) { - - /** - * Array some - */ - function some(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = false; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if ( callback(arr[i], i, arr) ) { - result = true; - break; - } - } - - return result; - } - - return some; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/sort.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/sort.js deleted file mode 100644 index 4c194042..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/sort.js +++ /dev/null @@ -1,55 +0,0 @@ -define(function () { - - /** - * Merge sort (http://en.wikipedia.org/wiki/Merge_sort) - */ - function mergeSort(arr, compareFn) { - if (arr == null) { - return []; - } else if (arr.length < 2) { - return arr; - } - - if (compareFn == null) { - compareFn = defaultCompare; - } - - var mid, left, right; - - mid = ~~(arr.length / 2); - left = mergeSort( arr.slice(0, mid), compareFn ); - right = mergeSort( arr.slice(mid, arr.length), compareFn ); - - return merge(left, right, compareFn); - } - - function defaultCompare(a, b) { - return a < b ? -1 : (a > b? 1 : 0); - } - - function merge(left, right, compareFn) { - var result = []; - - while (left.length && right.length) { - if (compareFn(left[0], right[0]) <= 0) { - // if 0 it should preserve same order (stable) - result.push(left.shift()); - } else { - result.push(right.shift()); - } - } - - if (left.length) { - result.push.apply(result, left); - } - - if (right.length) { - result.push.apply(result, right); - } - - return result; - } - - return mergeSort; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/split.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/split.js deleted file mode 100644 index a17275eb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/split.js +++ /dev/null @@ -1,35 +0,0 @@ -define(function() { - - /** - * Split array into a fixed number of segments. - */ - function split(array, segments) { - segments = segments || 2; - var results = []; - if (array == null) { - return results; - } - - var minLength = Math.floor(array.length / segments), - remainder = array.length % segments, - i = 0, - len = array.length, - segmentIndex = 0, - segmentLength; - - while (i < len) { - segmentLength = minLength; - if (segmentIndex < remainder) { - segmentLength++; - } - - results.push(array.slice(i, i + segmentLength)); - - segmentIndex++; - i += segmentLength; - } - - return results; - } - return split; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/toLookup.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/toLookup.js deleted file mode 100644 index aac8fd1d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/toLookup.js +++ /dev/null @@ -1,28 +0,0 @@ -define(['../lang/isFunction'], function (isFunction) { - - /** - * Creates an object that holds a lookup for the objects in the array. - */ - function toLookup(arr, key) { - var result = {}; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length, value; - if (isFunction(key)) { - while (++i < len) { - value = arr[i]; - result[key(value)] = value; - } - } else { - while (++i < len) { - value = arr[i]; - result[value[key]] = value; - } - } - - return result; - } - return toLookup; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/union.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/union.js deleted file mode 100644 index 5f9922e5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/union.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['./unique', './append'], function (unique, append) { - - /** - * Concat multiple arrays and remove duplicates - */ - function union(arrs) { - var results = []; - var i = -1, len = arguments.length; - while (++i < len) { - append(results, arguments[i]); - } - - return unique(results); - } - - return union; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/unique.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/unique.js deleted file mode 100644 index c4bd23b4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/unique.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./indexOf', './filter'], function(indexOf, filter){ - - /** - * @return {array} Array of unique items - */ - function unique(arr){ - return filter(arr, isUnique); - } - - function isUnique(item, i, arr){ - return indexOf(arr, item, i+1) === -1; - } - - return unique; -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/xor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/xor.js deleted file mode 100644 index 7df89d9c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/xor.js +++ /dev/null @@ -1,24 +0,0 @@ -define(['./unique', './filter', './contains'], function (unique, filter, contains) { - - - /** - * Exclusive OR. Returns items that are present in a single array. - * - like ptyhon's `symmetric_difference` - */ - function xor(arr1, arr2) { - arr1 = unique(arr1); - arr2 = unique(arr2); - - var a1 = filter(arr1, function(item){ - return !contains(arr2, item); - }), - a2 = filter(arr2, function(item){ - return !contains(arr1, item); - }); - - return a1.concat(a2); - } - - return xor; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/zip.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/zip.js deleted file mode 100644 index 374cd282..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/array/zip.js +++ /dev/null @@ -1,27 +0,0 @@ -define(['./max', './pluck', './map'], function (max, pluck, map) { - - function getLength(arr) { - return arr == null ? 0 : arr.length; - } - - /** - * Merges together the values of each of the arrays with the values at the - * corresponding position. - */ - function zip(arr){ - var len = arr ? max(map(arguments, getLength)) : 0, - results = [], - i = -1, - item; - while (++i < len) { - results.push(map(arguments, function(item) { - return item == null ? undefined : item[i]; - })); - } - - return results; - } - - return zip; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection.js deleted file mode 100644 index 386e6da9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection.js +++ /dev/null @@ -1,22 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'contains' : require('./collection/contains'), - 'every' : require('./collection/every'), - 'filter' : require('./collection/filter'), - 'find' : require('./collection/find'), - 'forEach' : require('./collection/forEach'), - 'make_' : require('./collection/make_'), - 'map' : require('./collection/map'), - 'max' : require('./collection/max'), - 'min' : require('./collection/min'), - 'pluck' : require('./collection/pluck'), - 'reduce' : require('./collection/reduce'), - 'reject' : require('./collection/reject'), - 'size' : require('./collection/size'), - 'some' : require('./collection/some') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/contains.js deleted file mode 100644 index 192167e8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/contains.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/contains', '../object/contains'], function (make, arrContains, objContains) { - - /** - */ - return make(arrContains, objContains); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/every.js deleted file mode 100644 index 6317f503..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/every.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/every', '../object/every'], function (make, arrEvery, objEvery) { - - /** - */ - return make(arrEvery, objEvery); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/filter.js deleted file mode 100644 index 4e7fadc8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/filter.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { - - /** - * filter collection values, returns array. - */ - function filter(list, iterator, thisObj) { - iterator = makeIterator(iterator, thisObj); - var results = []; - if (!list) { - return results; - } - forEach(list, function(value, index, list) { - if (iterator(value, index, list)) { - results[results.length] = value; - } - }); - return results; - } - - return filter; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/find.js deleted file mode 100644 index 681f9414..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/find.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./make_', '../array/find', '../object/find'], function(make, arrFind, objFind) { - - /** - * Find value that returns true on iterator check. - */ - return make(arrFind, objFind); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/forEach.js deleted file mode 100644 index 3b39d3ed..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/forEach.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/forEach', '../object/forOwn'], function (make, arrForEach, objForEach) { - - /** - */ - return make(arrForEach, objForEach); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/make_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/make_.js deleted file mode 100644 index 312e0564..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/make_.js +++ /dev/null @@ -1,19 +0,0 @@ -define(function(){ - - /** - * internal method used to create other collection modules. - */ - function makeCollectionMethod(arrMethod, objMethod, defaultReturn) { - return function(){ - var args = Array.prototype.slice.call(arguments); - if (args[0] == null) { - return defaultReturn; - } - // array-like is treated as array - return (typeof args[0].length === 'number')? arrMethod.apply(null, args) : objMethod.apply(null, args); - }; - } - - return makeCollectionMethod; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/map.js deleted file mode 100644 index 96e24987..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/map.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['../lang/isObject', '../object/values', '../array/map', '../function/makeIterator_'], function (isObject, values, arrMap, makeIterator) { - - /** - * Map collection values, returns Array. - */ - function map(list, callback, thisObj) { - callback = makeIterator(callback, thisObj); - // list.length to check array-like object, if not array-like - // we simply map all the object values - if( isObject(list) && list.length == null ){ - list = values(list); - } - return arrMap(list, function (val, key, list) { - return callback(val, key, list); - }); - } - - return map; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/max.js deleted file mode 100644 index de9a6da5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/max.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./make_', '../array/max', '../object/max'], function (make, arrMax, objMax) { - - /** - * Get maximum value inside collection - */ - return make(arrMax, objMax); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/min.js deleted file mode 100644 index f0c239a6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/min.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./make_', '../array/min', '../object/min'], function (make, arrMin, objMin) { - - /** - * Get minimum value inside collection. - */ - return make(arrMin, objMin); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/pluck.js deleted file mode 100644 index ef784a7a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/pluck.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['./map'], function (map) { - - /** - * Extract a list of property values. - */ - function pluck(list, key) { - return map(list, function(value) { - return value[key]; - }); - } - - return pluck; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/reduce.js deleted file mode 100644 index bd05d43d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/reduce.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/reduce', '../object/reduce'], function (make, arrReduce, objReduce) { - - /** - */ - return make(arrReduce, objReduce); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/reject.js deleted file mode 100644 index 581adfdc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/reject.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./filter', '../function/makeIterator_'], function (filter, makeIterator) { - - /** - * Inverse or collection/filter - */ - function reject(list, iterator, thisObj) { - iterator = makeIterator(iterator, thisObj); - return filter(list, function(value, index, list) { - return !iterator(value, index, list); - }, thisObj); - } - - return reject; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/size.js deleted file mode 100644 index 4e5ab419..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/size.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../lang/isArray', '../object/size'], function (isArray, objSize) { - - /** - * Get collection size - */ - function size(list) { - if (!list) { - return 0; - } - if (isArray(list)) { - return list.length; - } - return objSize(list); - } - - return size; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/some.js deleted file mode 100644 index c0aebee2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/some.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/some', '../object/some'], function (make, arrSome, objSome) { - - /** - */ - return make(arrSome, objSome); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date.js deleted file mode 100644 index 4d449150..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date.js +++ /dev/null @@ -1,21 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'dayOfTheYear' : require('./date/dayOfTheYear'), - 'diff' : require('./date/diff'), - 'i18n_' : require('./date/i18n_'), - 'isLeapYear' : require('./date/isLeapYear'), - 'isSame' : require('./date/isSame'), - 'parseIso' : require('./date/parseIso'), - 'startOf' : require('./date/startOf'), - 'strftime' : require('./date/strftime'), - 'timezoneAbbr' : require('./date/timezoneAbbr'), - 'timezoneOffset' : require('./date/timezoneOffset'), - 'totalDaysInMonth' : require('./date/totalDaysInMonth'), - 'totalDaysInYear' : require('./date/totalDaysInYear'), - 'weekOfTheYear' : require('./date/weekOfTheYear') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/dayOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/dayOfTheYear.js deleted file mode 100644 index dc77ae1b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/dayOfTheYear.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../lang/isDate'], function (isDate) { - - /** - * return the day of the year (1..366) - */ - function dayOfTheYear(date){ - return (Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) - - Date.UTC(date.getFullYear(), 0, 1)) / 86400000 + 1; - } - - return dayOfTheYear; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/diff.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/diff.js deleted file mode 100644 index 667165fe..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/diff.js +++ /dev/null @@ -1,128 +0,0 @@ -define(['./totalDaysInMonth', './totalDaysInYear', '../time/convert'], function(totalDaysInMonth, totalDaysInYear, convert){ - - /** - * calculate the difference between dates (range) - */ - function diff(start, end, unitName){ - // sort the dates to make it easier to process (specially year/month) - if (start > end) { - var swap = start; - start = end; - end = swap; - } - - var output; - - if (unitName === 'month') { - output = getMonthsDiff(start, end); - } else if (unitName === 'year'){ - output = getYearsDiff(start, end); - } else if (unitName != null) { - if (unitName === 'day') { - // ignore timezone difference because of daylight savings time - start = toUtc(start); - end = toUtc(end); - } - output = convert(end - start, 'ms', unitName); - } else { - output = end - start; - } - - return output; - } - - - function toUtc(d){ - // we ignore timezone differences on purpose because of daylight - // savings time, otherwise it would return fractional days/weeks even - // if a full day elapsed. eg: - // Wed Feb 12 2014 00:00:00 GMT-0200 (BRST) - // Sun Feb 16 2014 00:00:00 GMT-0300 (BRT) - // diff should be 4 days and not 4.041666666666667 - return Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), - d.getHours(), d.getMinutes(), d.getSeconds(), - d.getMilliseconds()); - } - - - function getMonthsDiff(start, end){ - return getElapsedMonths(start, end) + - getElapsedYears(start, end) * 12 + - getFractionalMonth(start, end); - } - - - function getYearsDiff(start, end){ - var elapsedYears = getElapsedYears(start, end); - return elapsedYears + getFractionalYear(start, end, elapsedYears); - } - - - function getElapsedMonths(start, end){ - var monthDiff = end.getMonth() - start.getMonth(); - if (monthDiff < 0) { - monthDiff += 12; - } - // less than a full month - if (start.getDate() > end.getDate()) { - monthDiff -= 1; - } - return monthDiff; - } - - - function getElapsedYears(start, end){ - var yearDiff = end.getFullYear() - start.getFullYear(); - // less than a full year - if (start.getMonth() > end.getMonth()) { - yearDiff -= 1; - } - return yearDiff; - } - - - function getFractionalMonth(start, end){ - var fractionalDiff = 0; - var startDay = start.getDate(); - var endDay = end.getDate(); - - if (startDay !== endDay) { - var startTotalDays = totalDaysInMonth(start); - var endTotalDays = totalDaysInMonth(end); - var totalDays; - var daysElapsed; - - if (startDay > endDay) { - // eg: Jan 29 - Feb 27 (29 days elapsed but not a full month) - var baseDay = startTotalDays - startDay; - daysElapsed = endDay + baseDay; - // total days should be relative to 1st day of next month if - // startDay > endTotalDays - totalDays = (startDay > endTotalDays)? - endTotalDays + baseDay + 1 : startDay + baseDay; - } else { - // fractional is only based on endMonth eg: Jan 12 - Feb 18 - // (6 fractional days, 28 days until next full month) - daysElapsed = endDay - startDay; - totalDays = endTotalDays; - } - - fractionalDiff = daysElapsed / totalDays; - } - - return fractionalDiff; - } - - - function getFractionalYear(start, end, elapsedYears){ - var base = elapsedYears? - new Date(end.getFullYear(), start.getMonth(), start.getDate()) : - start; - var elapsedDays = diff(base, end, 'day'); - return elapsedDays / totalDaysInYear(end); - } - - - return diff; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/en-US.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/en-US.js deleted file mode 100644 index 5e640c22..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/en-US.js +++ /dev/null @@ -1,61 +0,0 @@ -define(function(){ - // en-US (English, United States) - return { - "am" : "AM", - "pm" : "PM", - - "x": "%m/%d/%y", - "X": "%H:%M:%S", - "c": "%a %d %b %Y %I:%M:%S %p %Z", - - "months" : [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" - ], - - "months_abbr" : [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" - ], - - "days" : [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" - ], - - "days_abbr" : [ - "Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat" - ] - }; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/pt-BR.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/pt-BR.js deleted file mode 100644 index 47256dd2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/pt-BR.js +++ /dev/null @@ -1,61 +0,0 @@ -define(function(){ - // pt-BR (Brazillian Portuguese) - return { - "am" : "", - "pm" : "", - - "x": "%d/%m/%y", - "X": "%H:%M:%S", - "c": "%a %d %b %Y %H:%M:%S %Z", - - "months" : [ - "Janeiro", - "Fevereiro", - "Março", - "Abril", - "Maio", - "Junho", - "Julho", - "Agosto", - "Setembro", - "Outubro", - "Novembro", - "Dezembro" - ], - - "months_abbr" : [ - "Jan", - "Fev", - "Mar", - "Abr", - "Mai", - "Jun", - "Jul", - "Ago", - "Set", - "Out", - "Nov", - "Dez" - ], - - "days" : [ - "Domingo", - "Segunda", - "Terça", - "Quarta", - "Quinta", - "Sexta", - "Sábado" - ], - - "days_abbr" : [ - "Dom", - "Seg", - "Ter", - "Qua", - "Qui", - "Sex", - "Sáb" - ] - }; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n_.js deleted file mode 100644 index c04ce885..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n_.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../object/mixIn', './i18n/en-US'], function(mixIn, enUS){ - - // we also use mixIn to make sure we don't affect the original locale - var activeLocale = mixIn({}, enUS, { - // we expose a "set" method to allow overriding the global locale - set : function(localeData){ - mixIn(activeLocale, localeData); - } - }); - - return activeLocale; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/isLeapYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/isLeapYear.js deleted file mode 100644 index e400b43d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/isLeapYear.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['../lang/isDate'], function (isDate) { - - /** - * checks if it's a leap year - */ - function isLeapYear(fullYear){ - if (isDate(fullYear)) { - fullYear = fullYear.getFullYear(); - } - return fullYear % 400 === 0 || (fullYear % 100 !== 0 && fullYear % 4 === 0); - } - - return isLeapYear; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/isSame.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/isSame.js deleted file mode 100644 index f30531fc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/isSame.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./startOf'], function (startOf) { - - /** - * Check if date is "same" with optional period - */ - function isSame(date1, date2, period){ - if (period) { - date1 = startOf(date1, period); - date2 = startOf(date2, period); - } - return Number(date1) === Number(date2); - } - - return isSame; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/parseIso.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/parseIso.js deleted file mode 100644 index 9a2aacb0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/parseIso.js +++ /dev/null @@ -1,146 +0,0 @@ -define(['../array/some'], function (some) { - - var datePatterns = [ - /^([0-9]{4})$/, // YYYY - /^([0-9]{4})-([0-9]{2})$/, // YYYY-MM (YYYYMM not allowed) - /^([0-9]{4})-?([0-9]{2})-?([0-9]{2})$/ // YYYY-MM-DD or YYYYMMDD - ]; - var ORD_DATE = /^([0-9]{4})-?([0-9]{3})$/; // YYYY-DDD - - var timePatterns = [ - /^([0-9]{2}(?:\.[0-9]*)?)$/, // HH.hh - /^([0-9]{2}):?([0-9]{2}(?:\.[0-9]*)?)$/, // HH:MM.mm - /^([0-9]{2}):?([0-9]{2}):?([0-9]{2}(\.[0-9]*)?)$/ // HH:MM:SS.ss - ]; - - var DATE_TIME = /^(.+)T(.+)$/; - var TIME_ZONE = /^(.+)([+\-])([0-9]{2}):?([0-9]{2})$/; - - function matchAll(str, patterns) { - var match; - var found = some(patterns, function(pattern) { - return !!(match = pattern.exec(str)); - }); - - return found ? match : null; - } - - function getDate(year, month, day) { - var date = new Date(Date.UTC(year, month, day)); - - // Explicitly set year to avoid Date.UTC making dates < 100 relative to - // 1900 - date.setUTCFullYear(year); - - var valid = - date.getUTCFullYear() === year && - date.getUTCMonth() === month && - date.getUTCDate() === day; - return valid ? +date : NaN; - } - - function parseOrdinalDate(str) { - var match = ORD_DATE.exec(str); - if (match ) { - var year = +match[1], - day = +match[2], - date = new Date(Date.UTC(year, 0, day)); - - if (date.getUTCFullYear() === year) { - return +date; - } - } - - return NaN; - } - - function parseDate(str) { - var match, year, month, day; - - var match = matchAll(str, datePatterns); - if (match === null) { - // Ordinal dates are verified differently. - return parseOrdinalDate(str); - } - - year = (match[1] === void 0) ? 0 : +match[1]; - month = (match[2] === void 0) ? 0 : +match[2] - 1; - day = (match[3] === void 0) ? 1 : +match[3]; - - return getDate(year, month, day); - } - - function getTime(hr, min, sec) { - var valid = - (hr < 24 && hr >= 0 && - min < 60 && min >= 0 && - sec < 60 && min >= 0) || - (hr === 24 && min === 0 && sec === 0); - if (!valid) { - return NaN; - } - - return ((hr * 60 + min) * 60 + sec) * 1000; - } - - function parseOffset(str) { - var match; - if (str.charAt(str.length - 1) === 'Z') { - str = str.substring(0, str.length - 1); - } else if ((match = TIME_ZONE.exec(str))) { - var match = TIME_ZONE.exec(str); - if (match) { - var hours = +match[3], - minutes = (match[4] === void 0) ? 0 : +match[4], - offset = getTime(hours, minutes, 0); - - if (match[2] === '-') { - offset *= -1; - } - - return { offset: offset, time: match[1] }; - } - } - - // No time zone specified, assume UTC - return { offset: 0, time: str }; - } - - function parseTime(str) { - var match; - var offset = parseOffset(str); - - str = offset.time; - offset = offset.offset; - if (isNaN(offset)) { - return NaN; - } - - match = matchAll(str, timePatterns); - if (match === null) { - return NaN; - } - - var hours = (match[1] === void 0) ? 0 : +match[1], - minutes = (match[2] === void 0) ? 0 : +match[2], - seconds = (match[3] === void 0) ? 0 : +match[3]; - - return getTime(hours, minutes, seconds) - offset; - } - - /** - * Parse an ISO8601 formatted date string, and return a Date object. - */ - function parseISO8601(str){ - var match = DATE_TIME.exec(str); - if (!match) { - // No time specified - return parseDate(str); - } - - return parseDate(match[1]) + parseTime(match[2]); - } - - return parseISO8601; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/startOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/startOf.js deleted file mode 100644 index 747f114d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/startOf.js +++ /dev/null @@ -1,54 +0,0 @@ -define(['../lang/clone'], function (clone) { - - /** - * get a new Date object representing start of period - */ - function startOf(date, period){ - date = clone(date); - - // intentionally removed "break" from switch since start of - // month/year/etc should also reset the following periods - switch (period) { - case 'year': - date.setMonth(0); - /* falls through */ - case 'month': - date.setDate(1); - /* falls through */ - case 'week': - case 'day': - date.setHours(0); - /* falls through */ - case 'hour': - date.setMinutes(0); - /* falls through */ - case 'minute': - date.setSeconds(0); - /* falls through */ - case 'second': - date.setMilliseconds(0); - break; - default: - throw new Error('"'+ period +'" is not a valid period'); - } - - // week is the only case that should reset the weekDay and maybe even - // overflow to previous month - if (period === 'week') { - var weekDay = date.getDay(); - var baseDate = date.getDate(); - if (weekDay) { - if (weekDay >= baseDate) { - //start of the week is on previous month - date.setDate(0); - } - date.setDate(date.getDate() - date.getDay()); - } - } - - return date; - } - - return startOf; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/strftime.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/strftime.js deleted file mode 100644 index dd782505..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/strftime.js +++ /dev/null @@ -1,113 +0,0 @@ -define(['../number/pad', './i18n_', './dayOfTheYear', './timezoneOffset', './timezoneAbbr', './weekOfTheYear'], function (pad, i18n, dayOfTheYear, timezoneOffset, timezoneAbbr, weekOfTheYear) { - - var _combinations = { - 'D': '%m/%d/%y', - 'F': '%Y-%m-%d', - 'r': '%I:%M:%S %p', - 'R': '%H:%M', - 'T': '%H:%M:%S', - 'x': 'locale', - 'X': 'locale', - 'c': 'locale' - }; - - - /** - * format date based on strftime format - */ - function strftime(date, format, localeData){ - localeData = localeData || i18n; - var reToken = /%([a-z%])/gi; - - function makeIterator(fn) { - return function(match, token){ - return fn(date, token, localeData); - }; - } - - return format - .replace(reToken, makeIterator(expandCombinations)) - .replace(reToken, makeIterator(convertToken)); - } - - - function expandCombinations(date, token, l10n){ - if (token in _combinations) { - var expanded = _combinations[token]; - return expanded === 'locale'? l10n[token] : expanded; - } else { - return '%'+ token; - } - } - - - function convertToken(date, token, l10n){ - switch (token){ - case 'a': - return l10n.days_abbr[date.getDay()]; - case 'A': - return l10n.days[date.getDay()]; - case 'h': - case 'b': - return l10n.months_abbr[date.getMonth()]; - case 'B': - return l10n.months[date.getMonth()]; - case 'C': - return pad(Math.floor(date.getFullYear() / 100), 2); - case 'd': - return pad(date.getDate(), 2); - case 'e': - return pad(date.getDate(), 2, ' '); - case 'H': - return pad(date.getHours(), 2); - case 'I': - return pad(date.getHours() % 12, 2); - case 'j': - return pad(dayOfTheYear(date), 3); - case 'L': - return pad(date.getMilliseconds(), 3); - case 'm': - return pad(date.getMonth() + 1, 2); - case 'M': - return pad(date.getMinutes(), 2); - case 'n': - return '\n'; - case 'p': - return date.getHours() >= 12? l10n.pm : l10n.am; - case 'P': - return convertToken(date, 'p', l10n).toLowerCase(); - case 's': - return date.getTime() / 1000; - case 'S': - return pad(date.getSeconds(), 2); - case 't': - return '\t'; - case 'u': - var day = date.getDay(); - return day === 0? 7 : day; - case 'U': - return pad(weekOfTheYear(date), 2); - case 'w': - return date.getDay(); - case 'W': - return pad(weekOfTheYear(date, 1), 2); - case 'y': - return pad(date.getFullYear() % 100, 2); - case 'Y': - return pad(date.getFullYear(), 4); - case 'z': - return timezoneOffset(date); - case 'Z': - return timezoneAbbr(date); - case '%': - return '%'; - default: - // keep unrecognized tokens - return '%'+ token; - } - } - - - return strftime; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneAbbr.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneAbbr.js deleted file mode 100644 index 225a6856..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneAbbr.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['./timezoneOffset'], function(timezoneOffset) { - - /** - * Abbreviated time zone name or similar information. - */ - function timezoneAbbr(date){ - // Date.toString gives different results depending on the - // browser/system so we fallback to timezone offset - // chrome: 'Mon Apr 08 2013 09:02:04 GMT-0300 (BRT)' - // IE: 'Mon Apr 8 09:02:04 UTC-0300 2013' - var tz = /\(([A-Z]{3,4})\)/.exec(date.toString()); - return tz? tz[1] : timezoneOffset(date); - } - - return timezoneAbbr; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneOffset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneOffset.js deleted file mode 100644 index ca06705d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneOffset.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['../number/pad'], function (pad) { - - /** - * time zone as hour and minute offset from UTC (e.g. +0900) - */ - function timezoneOffset(date){ - var offset = date.getTimezoneOffset(); - var abs = Math.abs(offset); - var h = pad(Math.floor(abs / 60), 2); - var m = pad(abs % 60, 2); - return (offset > 0? '-' : '+') + h + m; - } - - return timezoneOffset; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInMonth.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInMonth.js deleted file mode 100644 index 98f7e9d1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInMonth.js +++ /dev/null @@ -1,24 +0,0 @@ -define(['../lang/isDate', './isLeapYear'], function (isDate, isLeapYear) { - - var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; - - /** - * returns the total amount of days in the month (considering leap years) - */ - function totalDaysInMonth(fullYear, monthIndex){ - if (isDate(fullYear)) { - var date = fullYear; - year = date.getFullYear(); - monthIndex = date.getMonth(); - } - - if (monthIndex === 1 && isLeapYear(fullYear)) { - return 29; - } else { - return DAYS_IN_MONTH[monthIndex]; - } - } - - return totalDaysInMonth; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInYear.js deleted file mode 100644 index e9036b42..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInYear.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./isLeapYear'], function (isLeapYear) { - - /** - * return the amount of days in the year following the gregorian calendar - * and leap years - */ - function totalDaysInYear(fullYear){ - return isLeapYear(fullYear)? 366 : 365; - } - - return totalDaysInYear; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/weekOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/weekOfTheYear.js deleted file mode 100644 index 8dabc458..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/date/weekOfTheYear.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./dayOfTheYear'], function (dayOfTheYear) { - - /** - * Return the week of the year based on given firstDayOfWeek - */ - function weekOfTheYear(date, firstDayOfWeek){ - firstDayOfWeek = firstDayOfWeek == null? 0 : firstDayOfWeek; - var doy = dayOfTheYear(date); - var dow = (7 + date.getDay() - firstDayOfWeek) % 7; - var relativeWeekDay = 6 - firstDayOfWeek - dow; - return Math.floor((doy + relativeWeekDay) / 7); - } - - return weekOfTheYear; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function.js deleted file mode 100644 index 23f4fd74..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function.js +++ /dev/null @@ -1,18 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'bind' : require('./function/bind'), - 'compose' : require('./function/compose'), - 'debounce' : require('./function/debounce'), - 'func' : require('./function/func'), - 'makeIterator_' : require('./function/makeIterator_'), - 'partial' : require('./function/partial'), - 'prop' : require('./function/prop'), - 'series' : require('./function/series'), - 'throttle' : require('./function/throttle'), - 'timeout' : require('./function/timeout') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/bind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/bind.js deleted file mode 100644 index 09e5e20a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/bind.js +++ /dev/null @@ -1,23 +0,0 @@ -define(function(){ - - function slice(arr, offset){ - return Array.prototype.slice.call(arr, offset || 0); - } - - /** - * Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. - * @param {Function} fn Function. - * @param {object} context Execution context. - * @param {rest} args Arguments (0...n arguments). - * @return {Function} Wrapped Function. - */ - function bind(fn, context, args){ - var argsArr = slice(arguments, 2); //curried args - return function(){ - return fn.apply(context, argsArr.concat(slice(arguments))); - }; - } - - return bind; -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/compose.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/compose.js deleted file mode 100644 index d8b228fa..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/compose.js +++ /dev/null @@ -1,23 +0,0 @@ -define(function () { - - /** - * Returns a function that composes multiple functions, passing results to - * each other. - */ - function compose() { - var fns = arguments; - return function(arg){ - // only cares about the first argument since the chain can only - // deal with a single return value anyway. It should start from - // the last fn. - var n = fns.length; - while (n--) { - arg = fns[n].call(this, arg); - } - return arg; - }; - } - - return compose; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/debounce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/debounce.js deleted file mode 100644 index 21644ecc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/debounce.js +++ /dev/null @@ -1,29 +0,0 @@ -define(function () { - - /** - * Debounce callback execution - */ - function debounce(fn, threshold, isAsap){ - var timeout, result; - function debounced(){ - var args = arguments, context = this; - function delayed(){ - if (! isAsap) { - result = fn.apply(context, args); - } - timeout = null; - } - if (timeout) { - clearTimeout(timeout); - } else if (isAsap) { - result = fn.apply(context, args); - } - timeout = setTimeout(delayed, threshold); - return result; - } - return debounced; - } - - return debounce; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/func.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/func.js deleted file mode 100644 index b920e00e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/func.js +++ /dev/null @@ -1,14 +0,0 @@ -define(function () { - - /** - * Returns a function that call a method on the passed object - */ - function func(name){ - return function(obj){ - return obj[name](); - }; - } - - return func; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/makeIterator_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/makeIterator_.js deleted file mode 100644 index deb6e137..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/makeIterator_.js +++ /dev/null @@ -1,33 +0,0 @@ -define(['./prop', '../object/deepMatches'], function(prop, deepMatches) { - - /** - * Converts argument into a valid iterator. - * Used internally on most array/object/collection methods that receives a - * callback/iterator providing a shortcut syntax. - */ - function makeIterator(src, thisObj){ - switch(typeof src) { - case 'object': - // typeof null == "object" - return (src != null)? function(val, key, target){ - return deepMatches(val, src); - } : src; - case 'string': - case 'number': - return prop(src); - case 'function': - if (typeof thisObj === 'undefined') { - return src; - } else { - return function(val, i, arr){ - return src.call(thisObj, val, i, arr); - }; - } - default: - return src; - } - } - - return makeIterator; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/partial.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/partial.js deleted file mode 100644 index ad730746..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/partial.js +++ /dev/null @@ -1,19 +0,0 @@ -define(function () { - - function slice(arr, offset){ - return Array.prototype.slice.call(arr, offset || 0); - } - - /** - * Creates a partially applied function. - */ - function partial(fn, var_args){ - var argsArr = slice(arguments, 1); //curried args - return function(){ - return fn.apply(this, argsArr.concat(slice(arguments))); - }; - } - - return partial; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/prop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/prop.js deleted file mode 100644 index c9df78ca..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/prop.js +++ /dev/null @@ -1,14 +0,0 @@ -define(function () { - - /** - * Returns a function that gets a property of the passed object - */ - function prop(name){ - return function(obj){ - return obj[name]; - }; - } - - return prop; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/series.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/series.js deleted file mode 100644 index c8856a27..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/series.js +++ /dev/null @@ -1,22 +0,0 @@ -define(function () { - - /** - * Returns a function that will execute a list of functions in sequence - * passing the same arguments to each one. (useful for batch processing - * items during a forEach loop) - */ - function series(){ - var fns = arguments; - return function(){ - var i = 0, - n = fns.length; - while (i < n) { - fns[i].apply(this, arguments); - i += 1; - } - }; - } - - return series; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/throttle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/throttle.js deleted file mode 100644 index 8ce3929a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/throttle.js +++ /dev/null @@ -1,32 +0,0 @@ -define(['../time/now'], function (now) { - - /** - */ - function throttle(fn, delay){ - var context, timeout, result, args, - cur, diff, prev = 0; - function delayed(){ - prev = now(); - timeout = null; - result = fn.apply(context, args); - } - function throttled(){ - context = this; - args = arguments; - cur = now(); - diff = delay - (cur - prev); - if (diff <= 0) { - clearTimeout(timeout); - prev = cur; - result = fn.apply(context, args); - } else if (! timeout) { - timeout = setTimeout(delayed, diff); - } - return result; - } - return throttled; - } - - return throttle; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/timeout.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/timeout.js deleted file mode 100644 index 15388bdd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/function/timeout.js +++ /dev/null @@ -1,21 +0,0 @@ -define(function () { - - function slice(arr, offset){ - return Array.prototype.slice.call(arr, offset || 0); - } - - /** - * Delays the call of a function within a given context. - */ - function timeout(fn, millis, context){ - - var args = slice(arguments, 3); - - return setTimeout(function() { - fn.apply(context, args); - }, millis); - } - - return timeout; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/index.js deleted file mode 100644 index 744bb119..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/**@license - * mout v0.6.0 | http://moutjs.com | MIT license - */ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'VERSION' : '0.6.0', - 'array' : require('./array'), - 'collection' : require('./collection'), - 'date' : require('./date'), - 'function' : require('./function'), - 'lang' : require('./lang'), - 'math' : require('./math'), - 'number' : require('./number'), - 'object' : require('./object'), - 'queryString' : require('./queryString'), - 'random' : require('./random'), - 'string' : require('./string'), - 'time' : require('./time') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang.js deleted file mode 100644 index de16b597..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang.js +++ /dev/null @@ -1,36 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'clone' : require('./lang/clone'), - 'createObject' : require('./lang/createObject'), - 'ctorApply' : require('./lang/ctorApply'), - 'deepClone' : require('./lang/deepClone'), - 'defaults' : require('./lang/defaults'), - 'inheritPrototype' : require('./lang/inheritPrototype'), - 'is' : require('./lang/is'), - 'isArguments' : require('./lang/isArguments'), - 'isArray' : require('./lang/isArray'), - 'isBoolean' : require('./lang/isBoolean'), - 'isDate' : require('./lang/isDate'), - 'isEmpty' : require('./lang/isEmpty'), - 'isFinite' : require('./lang/isFinite'), - 'isFunction' : require('./lang/isFunction'), - 'isInteger' : require('./lang/isInteger'), - 'isKind' : require('./lang/isKind'), - 'isNaN' : require('./lang/isNaN'), - 'isNull' : require('./lang/isNull'), - 'isNumber' : require('./lang/isNumber'), - 'isObject' : require('./lang/isObject'), - 'isPlainObject' : require('./lang/isPlainObject'), - 'isRegExp' : require('./lang/isRegExp'), - 'isString' : require('./lang/isString'), - 'isUndefined' : require('./lang/isUndefined'), - 'isnt' : require('./lang/isnt'), - 'kindOf' : require('./lang/kindOf'), - 'toArray' : require('./lang/toArray'), - 'toString' : require('./lang/toString') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/clone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/clone.js deleted file mode 100644 index 468489a1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/clone.js +++ /dev/null @@ -1,47 +0,0 @@ -define(['./kindOf', './isPlainObject', '../object/mixIn'], function (kindOf, isPlainObject, mixIn) { - - /** - * Clone native types. - */ - function clone(val){ - switch (kindOf(val)) { - case 'Object': - return cloneObject(val); - case 'Array': - return cloneArray(val); - case 'RegExp': - return cloneRegExp(val); - case 'Date': - return cloneDate(val); - default: - return val; - } - } - - function cloneObject(source) { - if (isPlainObject(source)) { - return mixIn({}, source); - } else { - return source; - } - } - - function cloneRegExp(r) { - var flags = ''; - flags += r.multiline ? 'm' : ''; - flags += r.global ? 'g' : ''; - flags += r.ignorecase ? 'i' : ''; - return new RegExp(r.source, flags); - } - - function cloneDate(date) { - return new Date(+date); - } - - function cloneArray(arr) { - return arr.slice(); - } - - return clone; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/createObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/createObject.js deleted file mode 100644 index f7661500..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/createObject.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../object/mixIn'], function(mixIn){ - - /** - * Create Object using prototypal inheritance and setting custom properties. - * - Mix between Douglas Crockford Prototypal Inheritance <http://javascript.crockford.com/prototypal.html> and the EcmaScript 5 `Object.create()` method. - * @param {object} parent Parent Object. - * @param {object} [props] Object properties. - * @return {object} Created object. - */ - function createObject(parent, props){ - function F(){} - F.prototype = parent; - return mixIn(new F(), props); - - } - return createObject; -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/ctorApply.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/ctorApply.js deleted file mode 100644 index a9ac1c54..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/ctorApply.js +++ /dev/null @@ -1,17 +0,0 @@ -define(function () { - - function F(){} - - /** - * Do fn.apply on a constructor. - */ - function ctorApply(ctor, args) { - F.prototype = ctor.prototype; - var instance = new F(); - ctor.apply(instance, args); - return instance; - } - - return ctorApply; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/deepClone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/deepClone.js deleted file mode 100644 index d45c10aa..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/deepClone.js +++ /dev/null @@ -1,45 +0,0 @@ -define(['./clone', '../object/forOwn', './kindOf', './isPlainObject'], function (clone, forOwn, kindOf, isPlainObject) { - - /** - * Recursively clone native types. - */ - function deepClone(val, instanceClone) { - switch ( kindOf(val) ) { - case 'Object': - return cloneObject(val, instanceClone); - case 'Array': - return cloneArray(val, instanceClone); - default: - return clone(val); - } - } - - function cloneObject(source, instanceClone) { - if (isPlainObject(source)) { - var out = {}; - forOwn(source, function(val, key) { - this[key] = deepClone(val, instanceClone); - }, out); - return out; - } else if (instanceClone) { - return instanceClone(source); - } else { - return source; - } - } - - function cloneArray(arr, instanceClone) { - var out = [], - i = -1, - n = arr.length, - val; - while (++i < n) { - out[i] = deepClone(arr[i], instanceClone); - } - return out; - } - - return deepClone; - -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/defaults.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/defaults.js deleted file mode 100644 index 5156b1bb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/defaults.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./toArray', '../array/find'], function (toArray, find) { - - /** - * Return first non void argument - */ - function defaults(var_args){ - return find(toArray(arguments), nonVoid); - } - - function nonVoid(val){ - return val != null; - } - - return defaults; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/inheritPrototype.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/inheritPrototype.js deleted file mode 100644 index c1fda3a7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/inheritPrototype.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./createObject'], function(createObject){ - - /** - * Inherit prototype from another Object. - * - inspired by Nicholas Zackas <http://nczonline.net> Solution - * @param {object} child Child object - * @param {object} parent Parent Object - */ - function inheritPrototype(child, parent){ - var p = createObject(parent.prototype); - p.constructor = child; - child.prototype = p; - } - - return inheritPrototype; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/is.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/is.js deleted file mode 100644 index 261a2077..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/is.js +++ /dev/null @@ -1,23 +0,0 @@ -define(function () { - - /** - * Check if both arguments are egal. - */ - function is(x, y){ - // implementation borrowed from harmony:egal spec - if (x === y) { - // 0 === -0, but they are not identical - return x !== 0 || 1 / x === 1 / y; - } - - // NaN !== NaN, but they are identical. - // NaNs are the only non-reflexive value, i.e., if x !== x, - // then x is a NaN. - // isNaN is broken: it converts its argument to number, so - // isNaN("foo") => true - return x !== x && y !== y; - } - - return is; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isArguments.js deleted file mode 100644 index f889ee8e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isArguments.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./isKind'], function (isKind) { - - /** - */ - var isArgs = isKind(arguments, 'Arguments')? - function(val){ - return isKind(val, 'Arguments'); - } : - function(val){ - // Arguments is an Object on IE7 - return !!(val && Object.prototype.hasOwnProperty.call(val, 'callee')); - }; - - return isArgs; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isArray.js deleted file mode 100644 index 886e2aa5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isArray.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - var isArray = Array.isArray || function (val) { - return isKind(val, 'Array'); - }; - return isArray; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isBoolean.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isBoolean.js deleted file mode 100644 index 1ca27a69..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isBoolean.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isBoolean(val) { - return isKind(val, 'Boolean'); - } - return isBoolean; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isDate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isDate.js deleted file mode 100644 index 2708d676..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isDate.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isDate(val) { - return isKind(val, 'Date'); - } - return isDate; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isEmpty.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isEmpty.js deleted file mode 100644 index 4cc3d2db..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isEmpty.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['../object/forOwn', './isArray'], function (forOwn, isArray) { - - function isEmpty(val){ - if (val == null) { - // typeof null == 'object' so we check it first - return false; - } else if ( typeof val === 'string' || isArray(val) ) { - return !val.length; - } else if ( typeof val === 'object' || typeof val === 'function' ) { - var result = true; - forOwn(val, function(){ - result = false; - return false; // break loop - }); - return result; - } else { - return false; - } - } - - return isEmpty; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isFinite.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isFinite.js deleted file mode 100644 index 5a982f4b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isFinite.js +++ /dev/null @@ -1,21 +0,0 @@ -define(['./isNumber'], function (isNumber) { - - var global = this; - - /** - * Check if value is finite - */ - function isFinite(val){ - var is = false; - if (typeof val === 'string' && val !== '') { - is = global.isFinite( parseFloat(val) ); - } else if (isNumber(val)){ - // need to use isNumber because of Number constructor - is = global.isFinite( val ); - } - return is; - } - - return isFinite; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isFunction.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isFunction.js deleted file mode 100644 index ff5df7f0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isFunction.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isFunction(val) { - return isKind(val, 'Function'); - } - return isFunction; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isInteger.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isInteger.js deleted file mode 100644 index 1931f516..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isInteger.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./isNumber'], function (isNumber) { - - /** - * Check if value is an integer - */ - function isInteger(val){ - return isNumber(val) && (val % 1 === 0); - } - - return isInteger; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isKind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isKind.js deleted file mode 100644 index 6937a12f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isKind.js +++ /dev/null @@ -1,9 +0,0 @@ -define(['./kindOf'], function (kindOf) { - /** - * Check if value is from a specific "kind". - */ - function isKind(val, kind){ - return kindOf(val) === kind; - } - return isKind; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNaN.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNaN.js deleted file mode 100644 index 9467a3c8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNaN.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./isNumber'], function (isNumber) { - - /** - * Check if value is NaN for realz - */ - function isNaN(val){ - // based on the fact that NaN !== NaN - // need to check if it's a number to avoid conflicts with host objects - // also need to coerce ToNumber to avoid edge case `new Number(NaN)` - return !isNumber(val) || val != +val; - } - - return isNaN; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNull.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNull.js deleted file mode 100644 index 506e05ea..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNull.js +++ /dev/null @@ -1,9 +0,0 @@ -define(function () { - /** - */ - function isNull(val){ - return val === null; - } - return isNull; -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNumber.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNumber.js deleted file mode 100644 index 9a832c5f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNumber.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isNumber(val) { - return isKind(val, 'Number'); - } - return isNumber; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isObject.js deleted file mode 100644 index 0befb063..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isObject.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isObject(val) { - return isKind(val, 'Object'); - } - return isObject; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isPlainObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isPlainObject.js deleted file mode 100644 index 6c5854fd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isPlainObject.js +++ /dev/null @@ -1,14 +0,0 @@ -define(function () { - - /** - * Checks if the value is created by the `Object` constructor. - */ - function isPlainObject(value) { - return (!!value - && typeof value === 'object' - && value.constructor === Object); - } - - return isPlainObject; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isRegExp.js deleted file mode 100644 index d78a03da..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isRegExp.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isRegExp(val) { - return isKind(val, 'RegExp'); - } - return isRegExp; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isString.js deleted file mode 100644 index 8a42fe01..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isString.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isString(val) { - return isKind(val, 'String'); - } - return isString; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isUndefined.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isUndefined.js deleted file mode 100644 index c57b28eb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isUndefined.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function () { - var UNDEF; - - /** - */ - function isUndef(val){ - return val === UNDEF; - } - return isUndef; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isnt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isnt.js deleted file mode 100644 index d4336222..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isnt.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./is'], function (is) { - - /** - * Check if both values are not identical/egal - */ - function isnt(x, y){ - return !is(x, y); - } - - return isnt; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/kindOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/kindOf.js deleted file mode 100644 index 97d21d15..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/kindOf.js +++ /dev/null @@ -1,20 +0,0 @@ -define(function () { - - var _rKind = /^\[object (.*)\]$/, - _toString = Object.prototype.toString, - UNDEF; - - /** - * Gets the "kind" of value. (e.g. "String", "Number", etc) - */ - function kindOf(val) { - if (val === null) { - return 'Null'; - } else if (val === UNDEF) { - return 'Undefined'; - } else { - return _rKind.exec( _toString.call(val) )[1]; - } - } - return kindOf; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/toArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/toArray.js deleted file mode 100644 index 552916f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/toArray.js +++ /dev/null @@ -1,31 +0,0 @@ -define(['./kindOf'], function (kindOf) { - - var _win = this; - - /** - * Convert array-like object into array - */ - function toArray(val){ - var ret = [], - kind = kindOf(val), - n; - - if (val != null) { - if ( val.length == null || kind === 'String' || kind === 'Function' || kind === 'RegExp' || val === _win ) { - //string, regexp, function have .length but user probably just want - //to wrap value into an array.. - ret[ret.length] = val; - } else { - //window returns true on isObject in IE7 and may have length - //property. `typeof NodeList` returns `function` on Safari so - //we can't use it (#58) - n = val.length; - while (n--) { - ret[n] = val[n]; - } - } - } - return ret; - } - return toArray; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/toString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/toString.js deleted file mode 100644 index c28b89af..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/toString.js +++ /dev/null @@ -1,13 +0,0 @@ -define(function () { - - /** - * Typecast a value to a String, using an empty string value for null or - * undefined. - */ - function toString(val){ - return val == null ? '' : val.toString(); - } - - return toString; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math.js deleted file mode 100644 index e2ba8705..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math.js +++ /dev/null @@ -1,19 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'ceil' : require('./math/ceil'), - 'clamp' : require('./math/clamp'), - 'countSteps' : require('./math/countSteps'), - 'floor' : require('./math/floor'), - 'inRange' : require('./math/inRange'), - 'isNear' : require('./math/isNear'), - 'lerp' : require('./math/lerp'), - 'loop' : require('./math/loop'), - 'map' : require('./math/map'), - 'norm' : require('./math/norm'), - 'round' : require('./math/round') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/ceil.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/ceil.js deleted file mode 100644 index d73b0581..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/ceil.js +++ /dev/null @@ -1,11 +0,0 @@ -define(function(){ - /** - * Round value up with a custom radix. - */ - function ceil(val, step){ - step = Math.abs(step || 1); - return Math.ceil(val / step) * step; - } - - return ceil; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/clamp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/clamp.js deleted file mode 100644 index fb5a1484..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/clamp.js +++ /dev/null @@ -1,9 +0,0 @@ -define(function(){ - /** - * Clamps value inside range. - */ - function clamp(val, min, max){ - return val < min? min : (val > max? max : val); - } - return clamp; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/countSteps.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/countSteps.js deleted file mode 100644 index 0ecb32f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/countSteps.js +++ /dev/null @@ -1,16 +0,0 @@ -define(function(){ - /** - * Count number of full steps. - */ - function countSteps(val, step, overflow){ - val = Math.floor(val / step); - - if (overflow) { - return val % overflow; - } - - return val; - } - - return countSteps; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/floor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/floor.js deleted file mode 100644 index 8a4456b6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/floor.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function(){ - /** - * Floor value to full steps. - */ - function floor(val, step){ - step = Math.abs(step || 1); - return Math.floor(val / step) * step; - } - return floor; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/inRange.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/inRange.js deleted file mode 100644 index 0c890536..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/inRange.js +++ /dev/null @@ -1,11 +0,0 @@ -define(function(){ - /** - * Checks if value is inside the range. - */ - function inRange(val, min, max, threshold){ - threshold = threshold || 0; - return (val + threshold >= min && val - threshold <= max); - } - - return inRange; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/isNear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/isNear.js deleted file mode 100644 index b308a0b0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/isNear.js +++ /dev/null @@ -1,9 +0,0 @@ -define(function(){ - /** - * Check if value is close to target. - */ - function isNear(val, target, threshold){ - return (Math.abs(val - target) <= threshold); - } - return isNear; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/lerp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/lerp.js deleted file mode 100644 index 26b99d04..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/lerp.js +++ /dev/null @@ -1,11 +0,0 @@ -define(function(){ - /** - * Linear interpolation. - * IMPORTANT:will return `Infinity` if numbers overflow Number.MAX_VALUE - */ - function lerp(ratio, start, end){ - return start + (end - start) * ratio; - } - - return lerp; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/loop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/loop.js deleted file mode 100644 index c735ecf6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/loop.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function(){ - /** - * Loops value inside range. - */ - function loop(val, min, max){ - return val < min? max : (val > max? min : val); - } - - return loop; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/map.js deleted file mode 100644 index bf7dc5d5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/map.js +++ /dev/null @@ -1,10 +0,0 @@ -define(['./lerp', './norm'], function(lerp, norm){ - /** - * Maps a number from one scale to another. - * @example map(3, 0, 4, -1, 1) -> 0.5 - */ - function map(val, min1, max1, min2, max2){ - return lerp( norm(val, min1, max1), min2, max2 ); - } - return map; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/norm.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/norm.js deleted file mode 100644 index fccae20e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/norm.js +++ /dev/null @@ -1,9 +0,0 @@ -define(function(){ - /** - * Gets normalized ratio of value inside range. - */ - function norm(val, min, max){ - return (val - min) / (max - min); - } - return norm; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/round.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/round.js deleted file mode 100644 index b43e4ac2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/math/round.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function () { - /** - * Round number to a specific radix - */ - function round(value, radix){ - radix = radix || 1; // default round 1 - return Math.round(value / radix) * radix; - } - - return round; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number.js deleted file mode 100644 index cb52fc75..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number.js +++ /dev/null @@ -1,21 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'MAX_INT' : require('./number/MAX_INT'), - 'MAX_UINT' : require('./number/MAX_UINT'), - 'MIN_INT' : require('./number/MIN_INT'), - 'abbreviate' : require('./number/abbreviate'), - 'currencyFormat' : require('./number/currencyFormat'), - 'enforcePrecision' : require('./number/enforcePrecision'), - 'pad' : require('./number/pad'), - 'rol' : require('./number/rol'), - 'ror' : require('./number/ror'), - 'sign' : require('./number/sign'), - 'toInt' : require('./number/toInt'), - 'toUInt' : require('./number/toUInt'), - 'toUInt31' : require('./number/toUInt31') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_INT.js deleted file mode 100644 index 23a6e1a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_INT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Maximum 32-bit signed integer value. (2^31 - 1) - */ -define(function(){ - return 2147483647; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_UINT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_UINT.js deleted file mode 100644 index a035096c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_UINT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Maximum 32-bit unsigned integet value (2^32 - 1) - */ -define(function(){ - return 4294967295; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MIN_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MIN_INT.js deleted file mode 100644 index 9b3e9781..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MIN_INT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Minimum 32-bit signed integer value (-2^31). - */ -define(function(){ - return -2147483648; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/abbreviate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/abbreviate.js deleted file mode 100644 index 7e7405ad..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/abbreviate.js +++ /dev/null @@ -1,35 +0,0 @@ -define(['./enforcePrecision'], function (enforcePrecision) { - - var _defaultDict = { - thousand : 'K', - million : 'M', - billion : 'B' - }; - - /** - * Abbreviate number if bigger than 1000. (eg: 2.5K, 17.5M, 3.4B, ...) - */ - function abbreviateNumber(val, nDecimals, dict){ - nDecimals = nDecimals != null? nDecimals : 1; - dict = dict || _defaultDict; - val = enforcePrecision(val, nDecimals); - - var str, mod; - - if (val < 1000000) { - mod = enforcePrecision(val / 1000, nDecimals); - // might overflow to next scale during rounding - str = mod < 1000? mod + dict.thousand : 1 + dict.million; - } else if (val < 1000000000) { - mod = enforcePrecision(val / 1000000, nDecimals); - str = mod < 1000? mod + dict.million : 1 + dict.billion; - } else { - str = enforcePrecision(val / 1000000000, nDecimals) + dict.billion; - } - - return str; - } - - return abbreviateNumber; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/currencyFormat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/currencyFormat.js deleted file mode 100644 index dcde8fc7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/currencyFormat.js +++ /dev/null @@ -1,26 +0,0 @@ -define(function () { - - /** - * Converts number into currency format - */ - function currencyFormat(val, nDecimalDigits, decimalSeparator, thousandsSeparator) { - nDecimalDigits = nDecimalDigits == null? 2 : nDecimalDigits; - decimalSeparator = decimalSeparator == null? '.' : decimalSeparator; - thousandsSeparator = thousandsSeparator == null? ',' : thousandsSeparator; - - //can't use enforce precision since it returns a number and we are - //doing a RegExp over the string - var fixed = val.toFixed(nDecimalDigits), - //separate begin [$1], middle [$2] and decimal digits [$4] - parts = new RegExp('^(-?\\d{1,3})((?:\\d{3})+)(\\.(\\d{'+ nDecimalDigits +'}))?$').exec( fixed ); - - if(parts){ //val >= 1000 || val <= -1000 - return parts[1] + parts[2].replace(/\d{3}/g, thousandsSeparator + '$&') + (parts[4] ? decimalSeparator + parts[4] : ''); - }else{ - return fixed.replace('.', decimalSeparator); - } - } - - return currencyFormat; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/enforcePrecision.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/enforcePrecision.js deleted file mode 100644 index 84554d0e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/enforcePrecision.js +++ /dev/null @@ -1,13 +0,0 @@ -define(function(){ - /** - * Enforce a specific amount of decimal digits and also fix floating - * point rounding issues. - * @example `enforcePrecision(0.615, 2) -> 0.62`, `(0.615).toFixed(2) -> - * 0.61` - */ - function enforcePrecision(val, nDecimalDigits){ - var pow = Math.pow(10, nDecimalDigits); - return +(Math.round(val * pow) / pow).toFixed(nDecimalDigits); - } - return enforcePrecision; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/pad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/pad.js deleted file mode 100644 index 3b2c062a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/pad.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['../string/lpad'], function(lpad){ - - /** - * Add padding zeros if n.length < minLength. - */ - function pad(n, minLength, char){ - return lpad(''+ n, minLength, char || '0'); - } - - return pad; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/rol.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/rol.js deleted file mode 100644 index a148f444..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/rol.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function(){ - /** - * Bitwise circular shift left - * http://en.wikipedia.org/wiki/Circular_shift - */ - function rol(val, shift){ - return (val << shift) | (val >> (32 - shift)); - } - return rol; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/ror.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/ror.js deleted file mode 100644 index b5c66f92..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/ror.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function(){ - /** - * Bitwise circular shift right - * http://en.wikipedia.org/wiki/Circular_shift - */ - function ror(val, shift){ - return (val >> shift) | (val << (32 - shift)); - } - return ror; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/sign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/sign.js deleted file mode 100644 index dfc131d5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/sign.js +++ /dev/null @@ -1,15 +0,0 @@ -define(function () { - - /** - * Get sign of the value. - */ - function sign(val) { - var num = Number(val); - if (num === 0) return num; // +0 and +0 === 0 - if (isNaN(num)) return num; // NaN - return num < 0? -1 : 1; - } - - return sign; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toInt.js deleted file mode 100644 index 1e9b4c0b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toInt.js +++ /dev/null @@ -1,15 +0,0 @@ -define(function(){ - - /** - * "Convert" value into an 32-bit integer. - * Works like `Math.floor` if val > 0 and `Math.ceil` if val < 0. - * IMPORTANT: val will wrap at 2^31 and -2^31. - * Perf tests: http://jsperf.com/vs-vs-parseint-bitwise-operators/7 - */ - function toInt(val){ - return ~~val; - } - - return toInt; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt.js deleted file mode 100644 index d5b25b2c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt.js +++ /dev/null @@ -1,13 +0,0 @@ -define(function () { - - /** - * "Convert" value into a 32-bit unsigned integer. - * IMPORTANT: Value will wrap at 2^32. - */ - function toUInt(val){ - return val >>> 0; - } - - return toUInt; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt31.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt31.js deleted file mode 100644 index 9785a054..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt31.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./MAX_INT'], function(MAX_INT){ - - /** - * "Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). - * IMPORTANT: value wil wrap at 2^31, if negative will return 0. - */ - function toUInt31(val){ - return (val <= 0)? 0 : (val > MAX_INT? ~~(val % (MAX_INT + 1)) : ~~val); - } - - return toUInt31; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object.js deleted file mode 100644 index 343e7826..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object.js +++ /dev/null @@ -1,42 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'bindAll' : require('./object/bindAll'), - 'contains' : require('./object/contains'), - 'deepEquals' : require('./object/deepEquals'), - 'deepFillIn' : require('./object/deepFillIn'), - 'deepMatches' : require('./object/deepMatches'), - 'deepMixIn' : require('./object/deepMixIn'), - 'equals' : require('./object/equals'), - 'every' : require('./object/every'), - 'fillIn' : require('./object/fillIn'), - 'filter' : require('./object/filter'), - 'find' : require('./object/find'), - 'forIn' : require('./object/forIn'), - 'forOwn' : require('./object/forOwn'), - 'functions' : require('./object/functions'), - 'get' : require('./object/get'), - 'has' : require('./object/has'), - 'hasOwn' : require('./object/hasOwn'), - 'keys' : require('./object/keys'), - 'map' : require('./object/map'), - 'matches' : require('./object/matches'), - 'max' : require('./object/max'), - 'merge' : require('./object/merge'), - 'min' : require('./object/min'), - 'mixIn' : require('./object/mixIn'), - 'namespace' : require('./object/namespace'), - 'pick' : require('./object/pick'), - 'pluck' : require('./object/pluck'), - 'reduce' : require('./object/reduce'), - 'reject' : require('./object/reject'), - 'set' : require('./object/set'), - 'size' : require('./object/size'), - 'some' : require('./object/some'), - 'unset' : require('./object/unset'), - 'values' : require('./object/values') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/bindAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/bindAll.js deleted file mode 100644 index b131ed15..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/bindAll.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./functions', '../function/bind', '../array/forEach'], function (functions, bind, forEach) { - - /** - * Binds methods of the object to be run in it's own context. - */ - function bindAll(obj, rest_methodNames){ - var keys = arguments.length > 1? - Array.prototype.slice.call(arguments, 1) : functions(obj); - forEach(keys, function(key){ - obj[key] = bind(obj[key], obj); - }); - } - - return bindAll; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/contains.js deleted file mode 100644 index 297e8986..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/contains.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./some'], function (some) { - - /** - * Check if object contains value - */ - function contains(obj, needle) { - return some(obj, function(val) { - return (val === needle); - }); - } - return contains; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepEquals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepEquals.js deleted file mode 100644 index 8b7d5d15..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepEquals.js +++ /dev/null @@ -1,26 +0,0 @@ -define(['../lang/isObject', './equals'], function (isObject, equals) { - - function defaultCompare(a, b) { - return a === b; - } - - /** - * Recursively checks for same properties and values. - */ - function deepEquals(a, b, callback){ - callback = callback || defaultCompare; - - if (!isObject(a) || !isObject(b)) { - return callback(a, b); - } - - function compare(a, b){ - return deepEquals(a, b, callback); - } - - return equals(a, b, compare); - } - - return deepEquals; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepFillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepFillIn.js deleted file mode 100644 index 84ba154a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepFillIn.js +++ /dev/null @@ -1,31 +0,0 @@ -define(['./forOwn', '../lang/isPlainObject'], function (forOwn, isPlainObject) { - - /** - * Deeply copy missing properties in the target from the defaults. - */ - function deepFillIn(target, defaults){ - var i = 0, - n = arguments.length, - obj; - - while(++i < n) { - obj = arguments[i]; - if (obj) { - forOwn(obj, function(newValue, key) { - var curValue = target[key]; - if (curValue == null) { - target[key] = newValue; - } else if (isPlainObject(curValue) - && isPlainObject(newValue)) { - deepFillIn(curValue, newValue); - } - }); - } - } - - return target; - } - - return deepFillIn; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepMatches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepMatches.js deleted file mode 100644 index 2eae6297..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepMatches.js +++ /dev/null @@ -1,54 +0,0 @@ -define(['./forOwn', '../lang/isArray'], function(forOwn, isArray) { - - function containsMatch(array, pattern) { - var i = -1, length = array.length; - while (++i < length) { - if (deepMatches(array[i], pattern)) { - return true; - } - } - - return false; - } - - function matchArray(target, pattern) { - var i = -1, patternLength = pattern.length; - while (++i < patternLength) { - if (!containsMatch(target, pattern[i])) { - return false; - } - } - - return true; - } - - function matchObject(target, pattern) { - var result = true; - forOwn(pattern, function(val, key) { - if (!deepMatches(target[key], val)) { - // Return false to break out of forOwn early - return (result = false); - } - }); - - return result; - } - - /** - * Recursively check if the objects match. - */ - function deepMatches(target, pattern){ - if (target && typeof target === 'object') { - if (isArray(target) && isArray(pattern)) { - return matchArray(target, pattern); - } else { - return matchObject(target, pattern); - } - } else { - return target === pattern; - } - } - - return deepMatches; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepMixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepMixIn.js deleted file mode 100644 index 1b4178ef..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepMixIn.js +++ /dev/null @@ -1,33 +0,0 @@ -define(['./forOwn', '../lang/isPlainObject'], function (forOwn, isPlainObject) { - - /** - * Mixes objects into the target object, recursively mixing existing child - * objects. - */ - function deepMixIn(target, objects) { - var i = 0, - n = arguments.length, - obj; - - while(++i < n){ - obj = arguments[i]; - if (obj) { - forOwn(obj, copyProp, target); - } - } - - return target; - } - - function copyProp(val, key) { - var existing = this[key]; - if (isPlainObject(val) && isPlainObject(existing)) { - deepMixIn(existing, val); - } else { - this[key] = val; - } - } - - return deepMixIn; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/equals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/equals.js deleted file mode 100644 index 596cb952..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/equals.js +++ /dev/null @@ -1,34 +0,0 @@ -define(['./hasOwn', './every', '../lang/isObject'], function(hasOwn, every, isObject) { - - function defaultCompare(a, b) { - return a === b; - } - - // Makes a function to compare the object values from the specified compare - // operation callback. - function makeCompare(callback) { - return function(value, key) { - return hasOwn(this, key) && callback(value, this[key]); - }; - } - - function checkProperties(value, key) { - return hasOwn(this, key); - } - - /** - * Checks if two objects have the same keys and values. - */ - function equals(a, b, callback) { - callback = callback || defaultCompare; - - if (!isObject(a) || !isObject(b)) { - return callback(a, b); - } - - return (every(a, makeCompare(callback), b) && - every(b, checkProperties, a)); - } - - return equals; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/every.js deleted file mode 100644 index 52983a5e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/every.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { - - /** - * Object every - */ - function every(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = true; - forOwn(obj, function(val, key) { - // we consider any falsy values as "false" on purpose so shorthand - // syntax can be used to check property existence - if (!callback(val, key, obj)) { - result = false; - return false; // break - } - }); - return result; - } - - return every; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/fillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/fillIn.js deleted file mode 100644 index 0845d3c2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/fillIn.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['../array/forEach', './forOwn'], function (forEach, forOwn) { - - /** - * Copy missing properties in the obj from the defaults. - */ - function fillIn(obj, var_defaults){ - forEach(Array.prototype.slice.call(arguments, 1), function(base){ - forOwn(base, function(val, key){ - if (obj[key] == null) { - obj[key] = val; - } - }); - }); - return obj; - } - - return fillIn; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/filter.js deleted file mode 100644 index f213b915..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/filter.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { - - /** - * Creates a new object with all the properties where the callback returns - * true. - */ - function filterValues(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var output = {}; - forOwn(obj, function(value, key, obj) { - if (callback(value, key, obj)) { - output[key] = value; - } - }); - - return output; - } - return filterValues; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/find.js deleted file mode 100644 index 47e6b09d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/find.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['./some', '../function/makeIterator_'], function(some, makeIterator) { - - /** - * Returns first item that matches criteria - */ - function find(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result; - some(obj, function(value, key, obj) { - if (callback(value, key, obj)) { - result = value; - return true; //break - } - }); - return result; - } - - return find; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/forIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/forIn.js deleted file mode 100644 index 2058e9cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/forIn.js +++ /dev/null @@ -1,62 +0,0 @@ -define(function () { - - var _hasDontEnumBug, - _dontEnums; - - function checkDontEnum(){ - _dontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' - ]; - - _hasDontEnumBug = true; - - for (var key in {'toString': null}) { - _hasDontEnumBug = false; - } - } - - /** - * Similar to Array/forEach but works over object properties and fixes Don't - * Enum bug on IE. - * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation - */ - function forIn(obj, fn, thisObj){ - var key, i = 0; - // no need to check if argument is a real object that way we can use - // it for arrays, functions, date, etc. - - //post-pone check till needed - if (_hasDontEnumBug == null) checkDontEnum(); - - for (key in obj) { - if (exec(fn, obj, key, thisObj) === false) { - break; - } - } - - if (_hasDontEnumBug) { - while (key = _dontEnums[i++]) { - // since we aren't using hasOwn check we need to make sure the - // property was overwritten - if (obj[key] !== Object.prototype[key]) { - if (exec(fn, obj, key, thisObj) === false) { - break; - } - } - } - } - } - - function exec(fn, obj, key, thisObj){ - return fn.call(thisObj, obj[key], key, obj); - } - - return forIn; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/forOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/forOwn.js deleted file mode 100644 index b40cbaf1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/forOwn.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['./hasOwn', './forIn'], function (hasOwn, forIn) { - - /** - * Similar to Array/forEach but works over object properties and fixes Don't - * Enum bug on IE. - * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation - */ - function forOwn(obj, fn, thisObj){ - forIn(obj, function(val, key){ - if (hasOwn(obj, key)) { - return fn.call(thisObj, obj[key], key, obj); - } - }); - } - - return forOwn; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/functions.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/functions.js deleted file mode 100644 index 60fee3dd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/functions.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['./forIn'], function (forIn) { - - /** - * return a list of all enumerable properties that have function values - */ - function functions(obj){ - var keys = []; - forIn(obj, function(val, key){ - if (typeof val === 'function'){ - keys.push(key); - } - }); - return keys.sort(); - } - - return functions; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/get.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/get.js deleted file mode 100644 index ca80b059..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/get.js +++ /dev/null @@ -1,20 +0,0 @@ -define(function () { - - /** - * get "nested" object property - */ - function get(obj, prop){ - var parts = prop.split('.'), - last = parts.pop(); - - while (prop = parts.shift()) { - obj = obj[prop]; - if (typeof obj !== 'object') return; - } - - return obj[last]; - } - - return get; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/has.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/has.js deleted file mode 100644 index cc29817f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/has.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./get'], function (get) { - - var UNDEF; - - /** - * Check if object has nested property. - */ - function has(obj, prop){ - return get(obj, prop) !== UNDEF; - } - - return has; - -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/hasOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/hasOwn.js deleted file mode 100644 index 5c53bcf2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/hasOwn.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function () { - - /** - * Safer Object.hasOwnProperty - */ - function hasOwn(obj, prop){ - return Object.prototype.hasOwnProperty.call(obj, prop); - } - - return hasOwn; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/keys.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/keys.js deleted file mode 100644 index ed7c4f91..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/keys.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./forOwn'], function (forOwn) { - - /** - * Get object keys - */ - var keys = Object.keys || function (obj) { - var keys = []; - forOwn(obj, function(val, key){ - keys.push(key); - }); - return keys; - }; - - return keys; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/map.js deleted file mode 100644 index 2958f6b0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/map.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { - - /** - * Creates a new object where all the values are the result of calling - * `callback`. - */ - function mapValues(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var output = {}; - forOwn(obj, function(val, key, obj) { - output[key] = callback(val, key, obj); - }); - - return output; - } - return mapValues; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/matches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/matches.js deleted file mode 100644 index 73ff427c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/matches.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['./forOwn'], function (forOwn) { - - /** - * checks if a object contains all given properties/values - */ - function matches(target, props){ - // can't use "object/every" because of circular dependency - var result = true; - forOwn(props, function(val, key){ - if (target[key] !== val) { - // break loop at first difference - return (result = false); - } - }); - return result; - } - - return matches; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/max.js deleted file mode 100644 index ef311dcb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/max.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../array/max', './values'], function(arrMax, values) { - - /** - * Returns maximum value inside object. - */ - function max(obj, compareFn) { - return arrMax(values(obj), compareFn); - } - - return max; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/merge.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/merge.js deleted file mode 100644 index d7cfedec..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/merge.js +++ /dev/null @@ -1,38 +0,0 @@ -define(['./hasOwn', '../lang/deepClone', '../lang/isObject'], function (hasOwn, deepClone, isObject) { - - /** - * Deep merge objects. - */ - function merge() { - var i = 1, - key, val, obj, target; - - // make sure we don't modify source element and it's properties - // objects are passed by reference - target = deepClone( arguments[0] ); - - while (obj = arguments[i++]) { - for (key in obj) { - if ( ! hasOwn(obj, key) ) { - continue; - } - - val = obj[key]; - - if ( isObject(val) && isObject(target[key]) ){ - // inception, deep merge objects - target[key] = merge(target[key], val); - } else { - // make sure arrays, regexp, date, objects are cloned - target[key] = deepClone(val); - } - - } - } - - return target; - } - - return merge; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/min.js deleted file mode 100644 index 9fb4c1a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/min.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../array/min', './values'], function(arrMin, values) { - - /** - * Returns minimum value inside object. - */ - function min(obj, iterator) { - return arrMin(values(obj), iterator); - } - - return min; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/mixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/mixIn.js deleted file mode 100644 index 6210b7e7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/mixIn.js +++ /dev/null @@ -1,28 +0,0 @@ -define(['./forOwn'], function(forOwn){ - - /** - * Combine properties from all the objects into first one. - * - This method affects target object in place, if you want to create a new Object pass an empty object as first param. - * @param {object} target Target Object - * @param {...object} objects Objects to be combined (0...n objects). - * @return {object} Target Object. - */ - function mixIn(target, objects){ - var i = 0, - n = arguments.length, - obj; - while(++i < n){ - obj = arguments[i]; - if (obj != null) { - forOwn(obj, copyProp, target); - } - } - return target; - } - - function copyProp(val, key){ - this[key] = val; - } - - return mixIn; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/namespace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/namespace.js deleted file mode 100644 index 7ed65db8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/namespace.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['../array/forEach'], function (forEach) { - - /** - * Create nested object if non-existent - */ - function namespace(obj, path){ - if (!path) return obj; - forEach(path.split('.'), function(key){ - if (!obj[key]) { - obj[key] = {}; - } - obj = obj[key]; - }); - return obj; - } - - return namespace; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/pick.js deleted file mode 100644 index 76e22bfc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/pick.js +++ /dev/null @@ -1,18 +0,0 @@ -define(function(){ - - /** - * Return a copy of the object, filtered to only have values for the whitelisted keys. - */ - function pick(obj, var_keys){ - var keys = typeof arguments[1] !== 'string'? arguments[1] : Array.prototype.slice.call(arguments, 1), - out = {}, - i = 0, key; - while (key = keys[i++]) { - out[key] = obj[key]; - } - return out; - } - - return pick; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/pluck.js deleted file mode 100644 index d47744bd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/pluck.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./map', '../function/prop'], function (map, prop) { - - /** - * Extract a list of property values. - */ - function pluck(obj, propName){ - return map(obj, prop(propName)); - } - - return pluck; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/reduce.js deleted file mode 100644 index d3a57788..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/reduce.js +++ /dev/null @@ -1,28 +0,0 @@ -define(['./forOwn', './size'], function(forOwn, size) { - - /** - * Object reduce - */ - function reduce(obj, callback, memo, thisObj) { - var initial = arguments.length > 2; - - if (!size(obj) && !initial) { - throw new Error('reduce of empty object with no initial value'); - } - - forOwn(obj, function(value, key, list) { - if (!initial) { - memo = value; - initial = true; - } - else { - memo = callback.call(thisObj, memo, value, key, list); - } - }); - - return memo; - } - - return reduce; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/reject.js deleted file mode 100644 index 84296428..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/reject.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./filter', '../function/makeIterator_'], function (filter, makeIterator) { - - /** - * Object reject - */ - function reject(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - return filter(obj, function(value, index, obj) { - return !callback(value, index, obj); - }, thisObj); - } - - return reject; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/set.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/set.js deleted file mode 100644 index b8fa25a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/set.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['./namespace'], function (namespace) { - - /** - * set "nested" object property - */ - function set(obj, prop, val){ - var parts = (/^(.+)\.(.+)$/).exec(prop); - if (parts){ - namespace(obj, parts[1])[parts[2]] = val; - } else { - obj[prop] = val; - } - } - - return set; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/size.js deleted file mode 100644 index c6e377cf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/size.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./forOwn'], function (forOwn) { - - /** - * Get object size - */ - function size(obj) { - var count = 0; - forOwn(obj, function(){ - count++; - }); - return count; - } - - return size; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/some.js deleted file mode 100644 index 1bd6fdae..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/some.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { - - /** - * Object some - */ - function some(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = false; - forOwn(obj, function(val, key) { - if (callback(val, key, obj)) { - result = true; - return false; // break - } - }); - return result; - } - - return some; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/unset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/unset.js deleted file mode 100644 index 787fc19a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/unset.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['./has'], function (has) { - - /** - * Unset object property. - */ - function unset(obj, prop){ - if (has(obj, prop)) { - var parts = prop.split('.'), - last = parts.pop(); - while (prop = parts.shift()) { - obj = obj[prop]; - } - return (delete obj[last]); - - } else { - // if property doesn't exist treat as deleted - return true; - } - } - - return unset; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/values.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/values.js deleted file mode 100644 index b311fd09..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/object/values.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./forOwn'], function (forOwn) { - - /** - * Get object values - */ - function values(obj) { - var vals = []; - forOwn(obj, function(val, key){ - vals.push(val); - }); - return vals; - } - - return values; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString.js deleted file mode 100644 index 44346127..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString.js +++ /dev/null @@ -1,15 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'contains' : require('./queryString/contains'), - 'decode' : require('./queryString/decode'), - 'encode' : require('./queryString/encode'), - 'getParam' : require('./queryString/getParam'), - 'getQuery' : require('./queryString/getQuery'), - 'parse' : require('./queryString/parse'), - 'setParam' : require('./queryString/setParam') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/contains.js deleted file mode 100644 index a6d11cce..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/contains.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./getQuery'], function (getQuery) { - - /** - * Checks if query string contains parameter. - */ - function contains(url, paramName) { - var regex = new RegExp('(\\?|&)'+ paramName +'=', 'g'); //matches `?param=` or `¶m=` - return regex.test(getQuery(url)); - } - - return contains; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/decode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/decode.js deleted file mode 100644 index 02bc1609..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/decode.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['../string/typecast', '../lang/isString'], function (typecast, isString) { - - /** - * Decode query string into an object of keys => vals. - */ - function decode(queryStr, shouldTypecast) { - var queryArr = (queryStr || '').replace('?', '').split('&'), - n = queryArr.length, - obj = {}, - item, val; - while (n--) { - item = queryArr[n].split('='); - val = shouldTypecast === false? item[1] : typecast(item[1]); - obj[item[0]] = isString(val)? decodeURIComponent(val) : val; - } - return obj; - } - - return decode; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/encode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/encode.js deleted file mode 100644 index bd72a5b6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/encode.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['../object/forOwn'], function (forOwn) { - - /** - * Encode object into a query string. - */ - function encode(obj){ - var query = []; - forOwn(obj, function(val, key){ - query.push( key +'='+ encodeURIComponent(val) ); - }); - return (query.length)? '?'+ query.join('&') : ''; - } - - return encode; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/getParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/getParam.js deleted file mode 100644 index d9813724..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/getParam.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../string/typecast', './getQuery'], function (typecast, getQuery) { - - /** - * Get query parameter value. - */ - function getParam(url, param, shouldTypecast){ - var regexp = new RegExp('(\\?|&)'+ param + '=([^&]*)'), //matches `?param=value` or `¶m=value`, value = $2 - result = regexp.exec( getQuery(url) ), - val = (result && result[2])? result[2] : null; - return shouldTypecast === false? val : typecast(val); - } - - return getParam; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/getQuery.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/getQuery.js deleted file mode 100644 index aa3d99f3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/getQuery.js +++ /dev/null @@ -1,13 +0,0 @@ -define(function () { - - /** - * Gets full query as string with all special chars decoded. - */ - function getQuery(url) { - url = url.replace(/#.*/, ''); //removes hash (to avoid getting hash query) - var queryString = /\?[a-zA-Z0-9\=\&\%\$\-\_\.\+\!\*\'\(\)\,]+/.exec(url); //valid chars according to: http://www.ietf.org/rfc/rfc1738.txt - return (queryString)? decodeURIComponent(queryString[0]) : ''; - } - - return getQuery; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/parse.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/parse.js deleted file mode 100644 index ac153e3f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/parse.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./decode', './getQuery'], function (decode, getQuery) { - - /** - * Get query string, parses and decodes it. - */ - function parse(url, shouldTypecast) { - return decode(getQuery(url), shouldTypecast); - } - - return parse; -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/setParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/setParam.js deleted file mode 100644 index 97081aa7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/setParam.js +++ /dev/null @@ -1,28 +0,0 @@ -define(function () { - - /** - * Set query string parameter value - */ - function setParam(url, paramName, value){ - url = url || ''; - - var re = new RegExp('(\\?|&)'+ paramName +'=[^&]*' ); - var param = paramName +'='+ encodeURIComponent( value ); - - if ( re.test(url) ) { - return url.replace(re, '$1'+ param); - } else { - if (url.indexOf('?') === -1) { - url += '?'; - } - if (url.indexOf('=') !== -1) { - url += '&'; - } - return url + param; - } - - } - - return setParam; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random.js deleted file mode 100644 index b2641ee3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random.js +++ /dev/null @@ -1,16 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'choice' : require('./random/choice'), - 'guid' : require('./random/guid'), - 'rand' : require('./random/rand'), - 'randBit' : require('./random/randBit'), - 'randHex' : require('./random/randHex'), - 'randInt' : require('./random/randInt'), - 'randSign' : require('./random/randSign'), - 'random' : require('./random/random') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/choice.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/choice.js deleted file mode 100644 index 0d0c38df..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/choice.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['./randInt', '../lang/isArray'], function (randInt, isArray) { - - /** - * Returns a random element from the supplied arguments - * or from the array (if single argument is an array). - */ - function choice(items) { - var target = (arguments.length === 1 && isArray(items))? items : arguments; - return target[ randInt(0, target.length - 1) ]; - } - - return choice; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/guid.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/guid.js deleted file mode 100644 index 82f3a2db..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/guid.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['./randHex', './choice'], function (randHex, choice) { - - /** - * Returns pseudo-random guid (UUID v4) - * IMPORTANT: it's not totally "safe" since randHex/choice uses Math.random - * by default and sequences can be predicted in some cases. See the - * "random/random" documentation for more info about it and how to replace - * the default PRNG. - */ - function guid() { - return ( - randHex(8)+'-'+ - randHex(4)+'-'+ - // v4 UUID always contain "4" at this position to specify it was - // randomly generated - '4' + randHex(3) +'-'+ - // v4 UUID always contain chars [a,b,8,9] at this position - choice(8, 9, 'a', 'b') + randHex(3)+'-'+ - randHex(12) - ); - } - return guid; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/rand.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/rand.js deleted file mode 100644 index b8c231dd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/rand.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./random', '../number/MIN_INT', '../number/MAX_INT'], function(random, MIN_INT, MAX_INT){ - - /** - * Returns random number inside range - */ - function rand(min, max){ - min = min == null? MIN_INT : min; - max = max == null? MAX_INT : max; - return min + (max - min) * random(); - } - - return rand; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randBit.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randBit.js deleted file mode 100644 index b3422d2d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randBit.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['./random'], function (random) { - - /** - * Returns random bit (0 or 1) - */ - function randomBit() { - return random() > 0.5? 1 : 0; - } - - return randomBit; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randHex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randHex.js deleted file mode 100644 index 6e9bf1c5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randHex.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['./choice'], function (choice) { - - var _chars = '0123456789abcdef'.split(''); - - /** - * Returns a random hexadecimal string - */ - function randHex(size){ - size = size && size > 0? size : 6; - var str = ''; - while (size--) { - str += choice(_chars); - } - return str; - } - - return randHex; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randInt.js deleted file mode 100644 index 1750e9de..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randInt.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['../number/MIN_INT', '../number/MAX_INT', './rand'], function(MIN_INT, MAX_INT, rand){ - - /** - * Gets random integer inside range or snap to min/max values. - */ - function randInt(min, max){ - min = min == null? MIN_INT : ~~min; - max = max == null? MAX_INT : ~~max; - // can't be max + 0.5 otherwise it will round up if `rand` - // returns `max` causing it to overflow range. - // -0.5 and + 0.49 are required to avoid bias caused by rounding - return Math.round( rand(min - 0.5, max + 0.499999999999) ); - } - - return randInt; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randSign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randSign.js deleted file mode 100644 index 4141cdf6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randSign.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['./random'], function (random) { - - /** - * Returns random sign (-1 or 1) - */ - function randomSign() { - return random() > 0.5? 1 : -1; - } - - return randomSign; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/random.js deleted file mode 100644 index 4270822e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/random/random.js +++ /dev/null @@ -1,18 +0,0 @@ -define(function () { - - /** - * Just a wrapper to Math.random. No methods inside mout/random should call - * Math.random() directly so we can inject the pseudo-random number - * generator if needed (ie. in case we need a seeded random or a better - * algorithm than the native one) - */ - function random(){ - return random.get(); - } - - // we expose the method so it can be swapped if needed - random.get = Math.random; - - return random; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string.js deleted file mode 100644 index 3f5fd804..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string.js +++ /dev/null @@ -1,45 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'WHITE_SPACES' : require('./string/WHITE_SPACES'), - 'camelCase' : require('./string/camelCase'), - 'contains' : require('./string/contains'), - 'crop' : require('./string/crop'), - 'endsWith' : require('./string/endsWith'), - 'escapeHtml' : require('./string/escapeHtml'), - 'escapeRegExp' : require('./string/escapeRegExp'), - 'escapeUnicode' : require('./string/escapeUnicode'), - 'hyphenate' : require('./string/hyphenate'), - 'interpolate' : require('./string/interpolate'), - 'lowerCase' : require('./string/lowerCase'), - 'lpad' : require('./string/lpad'), - 'ltrim' : require('./string/ltrim'), - 'makePath' : require('./string/makePath'), - 'normalizeLineBreaks' : require('./string/normalizeLineBreaks'), - 'pascalCase' : require('./string/pascalCase'), - 'properCase' : require('./string/properCase'), - 'removeNonASCII' : require('./string/removeNonASCII'), - 'removeNonWord' : require('./string/removeNonWord'), - 'repeat' : require('./string/repeat'), - 'replace' : require('./string/replace'), - 'replaceAccents' : require('./string/replaceAccents'), - 'rpad' : require('./string/rpad'), - 'rtrim' : require('./string/rtrim'), - 'sentenceCase' : require('./string/sentenceCase'), - 'slugify' : require('./string/slugify'), - 'startsWith' : require('./string/startsWith'), - 'stripHtmlTags' : require('./string/stripHtmlTags'), - 'trim' : require('./string/trim'), - 'truncate' : require('./string/truncate'), - 'typecast' : require('./string/typecast'), - 'unCamelCase' : require('./string/unCamelCase'), - 'underscore' : require('./string/underscore'), - 'unescapeHtml' : require('./string/unescapeHtml'), - 'unescapeUnicode' : require('./string/unescapeUnicode'), - 'unhyphenate' : require('./string/unhyphenate'), - 'upperCase' : require('./string/upperCase') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/WHITE_SPACES.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/WHITE_SPACES.js deleted file mode 100644 index e830d86d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/WHITE_SPACES.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function() { - /** - * Contains all Unicode white-spaces. Taken from - * http://en.wikipedia.org/wiki/Whitespace_character. - */ - return [ - ' ', '\n', '\r', '\t', '\f', '\v', '\u00A0', '\u1680', '\u180E', - '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', - '\u2007', '\u2008', '\u2009', '\u200A', '\u2028', '\u2029', '\u202F', - '\u205F', '\u3000' - ]; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/camelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/camelCase.js deleted file mode 100644 index 02e6c04d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/camelCase.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['../lang/toString', './replaceAccents', './removeNonWord', './upperCase', './lowerCase'], function(toString, replaceAccents, removeNonWord, upperCase, lowerCase){ - /** - * Convert string to camelCase text. - */ - function camelCase(str){ - str = toString(str); - str = replaceAccents(str); - str = removeNonWord(str) - .replace(/[\-_]/g, ' ') //convert all hyphens and underscores to spaces - .replace(/\s[a-z]/g, upperCase) //convert first char of each word to UPPERCASE - .replace(/\s+/g, '') //remove spaces - .replace(/^[A-Z]/g, lowerCase); //convert first char to lowercase - return str; - } - return camelCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/contains.js deleted file mode 100644 index 825b5a5f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/contains.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../lang/toString'], function(toString) { - - /** - * Searches for a given substring - */ - function contains(str, substring, fromIndex){ - str = toString(str); - substring = toString(substring); - return str.indexOf(substring, fromIndex) !== -1; - } - - return contains; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/crop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/crop.js deleted file mode 100644 index 3c073f05..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/crop.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString', './truncate'], function (toString, truncate) { - /** - * Truncate string at full words. - */ - function crop(str, maxChars, append) { - str = toString(str); - return truncate(str, maxChars, append, true); - } - - return crop; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/endsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/endsWith.js deleted file mode 100644 index 31a73f20..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/endsWith.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../lang/toString'], function(toString) { - /** - * Checks if string ends with specified suffix. - */ - function endsWith(str, suffix) { - str = toString(str); - suffix = toString(suffix); - - return str.indexOf(suffix, str.length - suffix.length) !== -1; - } - - return endsWith; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeHtml.js deleted file mode 100644 index de34b61b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeHtml.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../lang/toString'], function(toString) { - - /** - * Escapes a string for insertion into HTML. - */ - function escapeHtml(str){ - str = toString(str) - .replace(/&/g, '&') - .replace(/</g, '<') - .replace(/>/g, '>') - .replace(/'/g, ''') - .replace(/"/g, '"'); - return str; - } - - return escapeHtml; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeRegExp.js deleted file mode 100644 index 32facac0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeRegExp.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['../lang/toString'], function(toString) { - - var ESCAPE_CHARS = /[\\.+*?\^$\[\](){}\/'#]/g; - - /** - * Escape RegExp string chars. - */ - function escapeRegExp(str) { - str = toString(str); - return str.replace(ESCAPE_CHARS,'\\$&'); - } - - return escapeRegExp; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeUnicode.js deleted file mode 100644 index bd5e8c4c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeUnicode.js +++ /dev/null @@ -1,21 +0,0 @@ -define(['../lang/toString'], function(toString) { - - /** - * Escape string into unicode sequences - */ - function escapeUnicode(str, shouldEscapePrintable){ - str = toString(str); - return str.replace(/[\s\S]/g, function(ch){ - // skip printable ASCII chars if we should not escape them - if (!shouldEscapePrintable && (/[\x20-\x7E]/).test(ch)) { - return ch; - } - // we use "000" and slice(-4) for brevity, need to pad zeros, - // unicode escape always have 4 chars after "\u" - return '\\u'+ ('000'+ ch.charCodeAt(0).toString(16)).slice(-4); - }); - } - - return escapeUnicode; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/hyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/hyphenate.js deleted file mode 100644 index 679c405c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/hyphenate.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['../lang/toString', './slugify', './unCamelCase'], function(toString, slugify, unCamelCase){ - /** - * Replaces spaces with hyphens, split camelCase text, remove non-word chars, remove accents and convert to lower case. - */ - function hyphenate(str){ - str = toString(str); - str = unCamelCase(str); - return slugify(str, "-"); - } - - return hyphenate; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/interpolate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/interpolate.js deleted file mode 100644 index ecb8ba80..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/interpolate.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../lang/toString'], function(toString) { - - var stache = /\{\{(\w+)\}\}/g; //mustache-like - - /** - * String interpolation - */ - function interpolate(template, replacements, syntax){ - template = toString(template); - var replaceFn = function(match, prop){ - return (prop in replacements)? toString(replacements[prop]) : ''; - }; - return template.replace(syntax || stache, replaceFn); - } - - return interpolate; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/lowerCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/lowerCase.js deleted file mode 100644 index b045d69c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/lowerCase.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * "Safer" String.toLowerCase() - */ - function lowerCase(str){ - str = toString(str); - return str.toLowerCase(); - } - - return lowerCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/lpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/lpad.js deleted file mode 100644 index ea4f5fbf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/lpad.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['../lang/toString', './repeat'], function(toString, repeat) { - - /** - * Pad string with `char` if its' length is smaller than `minLen` - */ - function lpad(str, minLen, ch) { - str = toString(str); - ch = ch || ' '; - - return ((str.length < minLen) - ? repeat(ch, minLen - str.length) + str : str); - } - - return lpad; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/ltrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/ltrim.js deleted file mode 100644 index 477df953..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/ltrim.js +++ /dev/null @@ -1,33 +0,0 @@ -define(['../lang/toString', './WHITE_SPACES'], function(toString, WHITE_SPACES){ - /** - * Remove chars from beginning of string. - */ - function ltrim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - - var start = 0, - len = str.length, - charLen = chars.length, - found = true, - i, c; - - while (found && start < len) { - found = false; - i = -1; - c = str.charAt(start); - - while (++i < charLen) { - if (c === chars[i]) { - found = true; - start++; - break; - } - } - } - - return (start >= len) ? '' : str.substr(start, len); - } - - return ltrim; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/makePath.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/makePath.js deleted file mode 100644 index 7aa7baba..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/makePath.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../array/join'], function(join){ - - /** - * Group arguments as path segments, if any of the args is `null` or an - * empty string it will be ignored from resulting path. - */ - function makePath(var_args){ - var result = join(Array.prototype.slice.call(arguments), '/'); - return result.replace(/\/{2,}/g, '/'); - } - - return makePath; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/normalizeLineBreaks.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/normalizeLineBreaks.js deleted file mode 100644 index 44e4194f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/normalizeLineBreaks.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../lang/toString'], function (toString) { - - /** - * Convert line-breaks from DOS/MAC to a single standard (UNIX by default) - */ - function normalizeLineBreaks(str, lineEnd) { - str = toString(str); - lineEnd = lineEnd || '\n'; - - return str - .replace(/\r\n/g, lineEnd) // DOS - .replace(/\r/g, lineEnd) // Mac - .replace(/\n/g, lineEnd); // Unix - } - - return normalizeLineBreaks; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/pascalCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/pascalCase.js deleted file mode 100644 index ead9ead4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/pascalCase.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString', './camelCase', './upperCase'], function(toString, camelCase, upperCase){ - /** - * camelCase + UPPERCASE first char - */ - function pascalCase(str){ - str = toString(str); - return camelCase(str).replace(/^[a-z]/, upperCase); - } - - return pascalCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/properCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/properCase.js deleted file mode 100644 index 2987b507..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/properCase.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString', './lowerCase', './upperCase'], function(toString, lowerCase, upperCase){ - /** - * UPPERCASE first char of each word. - */ - function properCase(str){ - str = toString(str); - return lowerCase(str).replace(/^\w|\s\w/g, upperCase); - } - - return properCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonASCII.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonASCII.js deleted file mode 100644 index 4905869d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonASCII.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * Remove non-printable ASCII chars - */ - function removeNonASCII(str){ - str = toString(str); - - // Matches non-printable ASCII chars - - // http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters - return str.replace(/[^\x20-\x7E]/g, ''); - } - - return removeNonASCII; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonWord.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonWord.js deleted file mode 100644 index 2b1a2040..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonWord.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * Remove non-word chars. - */ - function removeNonWord(str){ - str = toString(str); - return str.replace(/[^0-9a-zA-Z\xC0-\xFF \-_]/g, ''); - } - - return removeNonWord; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/repeat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/repeat.js deleted file mode 100644 index 02f5659f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/repeat.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../lang/toString'], function(toString){ - - /** - * Repeat string n times - */ - function repeat(str, n){ - str = toString(str); - return (new Array(n + 1)).join(str); - } - - return repeat; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/replace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/replace.js deleted file mode 100644 index 8b762fdc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/replace.js +++ /dev/null @@ -1,32 +0,0 @@ -define(['../lang/toString', '../lang/toArray'], function (toString, toArray) { - - /** - * Replace string(s) with the replacement(s) in the source. - */ - function replace(str, search, replacements) { - str = toString(str); - search = toArray(search); - replacements = toArray(replacements); - - var searchLength = search.length, - replacementsLength = replacements.length; - - if (replacementsLength !== 1 && searchLength !== replacementsLength) { - throw new Error('Unequal number of searches and replacements'); - } - - var i = -1; - while (++i < searchLength) { - // Use the first replacement for all searches if only one - // replacement is provided - str = str.replace( - search[i], - replacements[(replacementsLength === 1) ? 0 : i]); - } - - return str; - } - - return replace; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/replaceAccents.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/replaceAccents.js deleted file mode 100644 index 3a63f55a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/replaceAccents.js +++ /dev/null @@ -1,36 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * Replaces all accented chars with regular ones - */ - function replaceAccents(str){ - str = toString(str); - - // verifies if the String has accents and replace them - if (str.search(/[\xC0-\xFF]/g) > -1) { - str = str - .replace(/[\xC0-\xC5]/g, "A") - .replace(/[\xC6]/g, "AE") - .replace(/[\xC7]/g, "C") - .replace(/[\xC8-\xCB]/g, "E") - .replace(/[\xCC-\xCF]/g, "I") - .replace(/[\xD0]/g, "D") - .replace(/[\xD1]/g, "N") - .replace(/[\xD2-\xD6\xD8]/g, "O") - .replace(/[\xD9-\xDC]/g, "U") - .replace(/[\xDD]/g, "Y") - .replace(/[\xDE]/g, "P") - .replace(/[\xE0-\xE5]/g, "a") - .replace(/[\xE6]/g, "ae") - .replace(/[\xE7]/g, "c") - .replace(/[\xE8-\xEB]/g, "e") - .replace(/[\xEC-\xEF]/g, "i") - .replace(/[\xF1]/g, "n") - .replace(/[\xF2-\xF6\xF8]/g, "o") - .replace(/[\xF9-\xFC]/g, "u") - .replace(/[\xFE]/g, "p") - .replace(/[\xFD\xFF]/g, "y"); - } - return str; - } - return replaceAccents; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/rpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/rpad.js deleted file mode 100644 index 2efd9c88..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/rpad.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../lang/toString', './repeat'], function (toString, repeat) { - - /** - * Pad string with `char` if its' length is smaller than `minLen` - */ - function rpad(str, minLen, ch) { - str = toString(str); - ch = ch || ' '; - return (str.length < minLen)? str + repeat(ch, minLen - str.length) : str; - } - - return rpad; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/rtrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/rtrim.js deleted file mode 100644 index a4cc282d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/rtrim.js +++ /dev/null @@ -1,32 +0,0 @@ -define(['../lang/toString', './WHITE_SPACES'], function(toString, WHITE_SPACES){ - /** - * Remove chars from end of string. - */ - function rtrim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - - var end = str.length - 1, - charLen = chars.length, - found = true, - i, c; - - while (found && end >= 0) { - found = false; - i = -1; - c = str.charAt(end); - - while (++i < charLen) { - if (c === chars[i]) { - found = true; - end--; - break; - } - } - } - - return (end >= 0) ? str.substring(0, end + 1) : ''; - } - - return rtrim; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/sentenceCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/sentenceCase.js deleted file mode 100644 index cfe45af5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/sentenceCase.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../lang/toString', './lowerCase', './upperCase'], function(toString, lowerCase, upperCase){ - /** - * UPPERCASE first char of each sentence and lowercase other chars. - */ - function sentenceCase(str){ - str = toString(str); - - // Replace first char of each sentence (new line or after '.\s+') to - // UPPERCASE - return lowerCase(str).replace(/(^\w)|\.\s+(\w)/gm, upperCase); - } - return sentenceCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/slugify.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/slugify.js deleted file mode 100644 index c6d68c7e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/slugify.js +++ /dev/null @@ -1,21 +0,0 @@ -define(['../lang/toString', './replaceAccents', './removeNonWord', './trim'], function(toString, replaceAccents, removeNonWord, trim){ - /** - * Convert to lower case, remove accents, remove non-word chars and - * replace spaces with the specified delimeter. - * Does not split camelCase text. - */ - function slugify(str, delimeter){ - str = toString(str); - - if (delimeter == null) { - delimeter = "-"; - } - str = replaceAccents(str); - str = removeNonWord(str); - str = trim(str) //should come after removeNonWord - .replace(/ +/g, delimeter) //replace spaces with delimeter - .toLowerCase(); - return str; - } - return slugify; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/startsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/startsWith.js deleted file mode 100644 index 88ae5453..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/startsWith.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../lang/toString'], function (toString) { - /** - * Checks if string starts with specified prefix. - */ - function startsWith(str, prefix) { - str = toString(str); - prefix = toString(prefix); - - return str.indexOf(prefix) === 0; - } - - return startsWith; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/stripHtmlTags.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/stripHtmlTags.js deleted file mode 100644 index e8da956d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/stripHtmlTags.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * Remove HTML tags from string. - */ - function stripHtmlTags(str){ - str = toString(str); - - return str.replace(/<[^>]*>/g, ''); - } - return stripHtmlTags; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/trim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/trim.js deleted file mode 100644 index 55526041..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/trim.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['../lang/toString', './WHITE_SPACES', './ltrim', './rtrim'], function(toString, WHITE_SPACES, ltrim, rtrim){ - /** - * Remove white-spaces from beginning and end of string. - */ - function trim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - return ltrim(rtrim(str, chars), chars); - } - - return trim; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/truncate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/truncate.js deleted file mode 100644 index 34000d9f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/truncate.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['../lang/toString', './trim'], function(toString, trim){ - /** - * Limit number of chars. - */ - function truncate(str, maxChars, append, onlyFullWords){ - str = toString(str); - append = append || '...'; - maxChars = onlyFullWords? maxChars + 1 : maxChars; - - str = trim(str); - if(str.length <= maxChars){ - return str; - } - str = str.substr(0, maxChars - append.length); - //crop at last space or remove trailing whitespace - str = onlyFullWords? str.substr(0, str.lastIndexOf(' ')) : trim(str); - return str + append; - } - return truncate; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/typecast.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/typecast.js deleted file mode 100644 index a7c83153..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/typecast.js +++ /dev/null @@ -1,29 +0,0 @@ -define(function () { - - var UNDEF; - - /** - * Parses string and convert it into a native value. - */ - function typecast(val) { - var r; - if ( val === null || val === 'null' ) { - r = null; - } else if ( val === 'true' ) { - r = true; - } else if ( val === 'false' ) { - r = false; - } else if ( val === UNDEF || val === 'undefined' ) { - r = UNDEF; - } else if ( val === '' || isNaN(val) ) { - //isNaN('') returns false - r = val; - } else { - //parseFloat(null || '') returns NaN - r = parseFloat(val); - } - return r; - } - - return typecast; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unCamelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unCamelCase.js deleted file mode 100644 index eeef39b6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unCamelCase.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['../lang/toString'], function(toString){ - - var CAMEL_CASE_BORDER = /([a-z\xE0-\xFF])([A-Z\xC0\xDF])/g; - - /** - * Add space between camelCase text. - */ - function unCamelCase(str, delimiter){ - if (delimiter == null) { - delimiter = ' '; - } - - function join(str, c1, c2) { - return c1 + delimiter + c2; - } - - str = toString(str); - str = str.replace(CAMEL_CASE_BORDER, join); - str = str.toLowerCase(); //add space between camelCase text - return str; - } - return unCamelCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/underscore.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/underscore.js deleted file mode 100644 index 75dd4649..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/underscore.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString', './slugify', './unCamelCase'], function(toString, slugify, unCamelCase){ - /** - * Replaces spaces with underscores, split camelCase text, remove non-word chars, remove accents and convert to lower case. - */ - function underscore(str){ - str = toString(str); - str = unCamelCase(str); - return slugify(str, "_"); - } - return underscore; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeHtml.js deleted file mode 100644 index 173c69c2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeHtml.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../lang/toString'], function (toString) { - - /** - * Unescapes HTML special chars - */ - function unescapeHtml(str){ - str = toString(str) - .replace(/&/g , '&') - .replace(/</g , '<') - .replace(/>/g , '>') - .replace(/'/g , "'") - .replace(/"/g, '"'); - return str; - } - - return unescapeHtml; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeUnicode.js deleted file mode 100644 index d4a7ba1d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeUnicode.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['../lang/toString'], function(toString) { - - /** - * Unescape unicode char sequences - */ - function unescapeUnicode(str){ - str = toString(str); - return str.replace(/\\u[0-9a-f]{4}/g, function(ch){ - var code = parseInt(ch.slice(2), 16); - return String.fromCharCode(code); - }); - } - - return unescapeUnicode; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unhyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unhyphenate.js deleted file mode 100644 index 6ac2fa4c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unhyphenate.js +++ /dev/null @@ -1,10 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * Replaces hyphens with spaces. (only hyphens between word chars) - */ - function unhyphenate(str){ - str = toString(str); - return str.replace(/(\w)(-)(\w)/g, '$1 $3'); - } - return unhyphenate; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/upperCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/upperCase.js deleted file mode 100644 index 8b2073e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/string/upperCase.js +++ /dev/null @@ -1,10 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * "Safer" String.toUpperCase() - */ - function upperCase(str){ - str = toString(str); - return str.toUpperCase(); - } - return upperCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time.js deleted file mode 100644 index 67c90685..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'convert' : require('./time/convert'), - 'now' : require('./time/now'), - 'parseMs' : require('./time/parseMs'), - 'toTimeString' : require('./time/toTimeString') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time/convert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time/convert.js deleted file mode 100644 index 2de0cf2e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time/convert.js +++ /dev/null @@ -1,41 +0,0 @@ -define(function () { - - /** - * convert time into another unit - */ - function convert(val, sourceUnitName, destinationUnitName){ - destinationUnitName = destinationUnitName || 'ms'; - return (val * getUnit(sourceUnitName)) / getUnit(destinationUnitName); - } - - - //TODO: maybe extract to a separate module - function getUnit(unitName){ - switch(unitName){ - case 'ms': - case 'millisecond': - return 1; - case 's': - case 'second': - return 1000; - case 'm': - case 'minute': - return 60000; - case 'h': - case 'hour': - return 3600000; - case 'd': - case 'day': - return 86400000; - case 'w': - case 'week': - return 604800000; - default: - throw new Error('"'+ unitName + '" is not a valid unit'); - } - } - - - return convert; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time/now.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time/now.js deleted file mode 100644 index a3a38bcb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time/now.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function () { - - /** - * Get current time in miliseconds - */ - var now = (typeof Date.now === 'function')? Date.now : function(){ - return +(new Date()); - }; - - return now; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time/parseMs.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time/parseMs.js deleted file mode 100644 index 964929ae..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time/parseMs.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['../math/countSteps'], function(countSteps){ - - /** - * Parse timestamp into an object. - */ - function parseMs(ms){ - return { - milliseconds : countSteps(ms, 1, 1000), - seconds : countSteps(ms, 1000, 60), - minutes : countSteps(ms, 60000, 60), - hours : countSteps(ms, 3600000, 24), - days : countSteps(ms, 86400000) - }; - } - - return parseMs; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time/toTimeString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time/toTimeString.js deleted file mode 100644 index edf18218..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/src/time/toTimeString.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['../math/countSteps', '../number/pad'], function(countSteps, pad){ - - var HOUR = 3600000, - MINUTE = 60000, - SECOND = 1000; - - /** - * Format timestamp into a time string. - */ - function toTimeString(ms){ - var h = ms < HOUR ? 0 : countSteps(ms, HOUR), - m = ms < MINUTE ? 0 : countSteps(ms, MINUTE, 60), - s = ms < SECOND ? 0 : countSteps(ms, SECOND, 60), - str = ''; - - str += h? h + ':' : ''; - str += pad(m, 2) + ':'; - str += pad(s, 2); - - return str; - } - return toTimeString; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string.js deleted file mode 100644 index 7f0ca3bd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string.js +++ /dev/null @@ -1,45 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'WHITE_SPACES' : require('./string/WHITE_SPACES'), - 'camelCase' : require('./string/camelCase'), - 'contains' : require('./string/contains'), - 'crop' : require('./string/crop'), - 'endsWith' : require('./string/endsWith'), - 'escapeHtml' : require('./string/escapeHtml'), - 'escapeRegExp' : require('./string/escapeRegExp'), - 'escapeUnicode' : require('./string/escapeUnicode'), - 'hyphenate' : require('./string/hyphenate'), - 'interpolate' : require('./string/interpolate'), - 'lowerCase' : require('./string/lowerCase'), - 'lpad' : require('./string/lpad'), - 'ltrim' : require('./string/ltrim'), - 'makePath' : require('./string/makePath'), - 'normalizeLineBreaks' : require('./string/normalizeLineBreaks'), - 'pascalCase' : require('./string/pascalCase'), - 'properCase' : require('./string/properCase'), - 'removeNonASCII' : require('./string/removeNonASCII'), - 'removeNonWord' : require('./string/removeNonWord'), - 'repeat' : require('./string/repeat'), - 'replace' : require('./string/replace'), - 'replaceAccents' : require('./string/replaceAccents'), - 'rpad' : require('./string/rpad'), - 'rtrim' : require('./string/rtrim'), - 'sentenceCase' : require('./string/sentenceCase'), - 'slugify' : require('./string/slugify'), - 'startsWith' : require('./string/startsWith'), - 'stripHtmlTags' : require('./string/stripHtmlTags'), - 'trim' : require('./string/trim'), - 'truncate' : require('./string/truncate'), - 'typecast' : require('./string/typecast'), - 'unCamelCase' : require('./string/unCamelCase'), - 'underscore' : require('./string/underscore'), - 'unescapeHtml' : require('./string/unescapeHtml'), - 'unescapeUnicode' : require('./string/unescapeUnicode'), - 'unhyphenate' : require('./string/unhyphenate'), - 'upperCase' : require('./string/upperCase') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/WHITE_SPACES.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/WHITE_SPACES.js deleted file mode 100644 index 03e01254..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/WHITE_SPACES.js +++ /dev/null @@ -1,12 +0,0 @@ - - /** - * Contains all Unicode white-spaces. Taken from - * http://en.wikipedia.org/wiki/Whitespace_character. - */ - module.exports = [ - ' ', '\n', '\r', '\t', '\f', '\v', '\u00A0', '\u1680', '\u180E', - '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', - '\u2007', '\u2008', '\u2009', '\u200A', '\u2028', '\u2029', '\u202F', - '\u205F', '\u3000' - ]; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/camelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/camelCase.js deleted file mode 100644 index aadb69a2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/camelCase.js +++ /dev/null @@ -1,20 +0,0 @@ -var toString = require('../lang/toString'); -var replaceAccents = require('./replaceAccents'); -var removeNonWord = require('./removeNonWord'); -var upperCase = require('./upperCase'); -var lowerCase = require('./lowerCase'); - /** - * Convert string to camelCase text. - */ - function camelCase(str){ - str = toString(str); - str = replaceAccents(str); - str = removeNonWord(str) - .replace(/[\-_]/g, ' ') //convert all hyphens and underscores to spaces - .replace(/\s[a-z]/g, upperCase) //convert first char of each word to UPPERCASE - .replace(/\s+/g, '') //remove spaces - .replace(/^[A-Z]/g, lowerCase); //convert first char to lowercase - return str; - } - module.exports = camelCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/contains.js deleted file mode 100644 index cb22cae4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/contains.js +++ /dev/null @@ -1,14 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Searches for a given substring - */ - function contains(str, substring, fromIndex){ - str = toString(str); - substring = toString(substring); - return str.indexOf(substring, fromIndex) !== -1; - } - - module.exports = contains; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/crop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/crop.js deleted file mode 100644 index 53b93b49..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/crop.js +++ /dev/null @@ -1,12 +0,0 @@ -var toString = require('../lang/toString'); -var truncate = require('./truncate'); - /** - * Truncate string at full words. - */ - function crop(str, maxChars, append) { - str = toString(str); - return truncate(str, maxChars, append, true); - } - - module.exports = crop; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/endsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/endsWith.js deleted file mode 100644 index d504e9dd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/endsWith.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Checks if string ends with specified suffix. - */ - function endsWith(str, suffix) { - str = toString(str); - suffix = toString(suffix); - - return str.indexOf(suffix, str.length - suffix.length) !== -1; - } - - module.exports = endsWith; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeHtml.js deleted file mode 100644 index e67c4b21..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeHtml.js +++ /dev/null @@ -1,18 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Escapes a string for insertion into HTML. - */ - function escapeHtml(str){ - str = toString(str) - .replace(/&/g, '&') - .replace(/</g, '<') - .replace(/>/g, '>') - .replace(/'/g, ''') - .replace(/"/g, '"'); - return str; - } - - module.exports = escapeHtml; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeRegExp.js deleted file mode 100644 index 70cb84ff..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeRegExp.js +++ /dev/null @@ -1,15 +0,0 @@ -var toString = require('../lang/toString'); - - var ESCAPE_CHARS = /[\\.+*?\^$\[\](){}\/'#]/g; - - /** - * Escape RegExp string chars. - */ - function escapeRegExp(str) { - str = toString(str); - return str.replace(ESCAPE_CHARS,'\\$&'); - } - - module.exports = escapeRegExp; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeUnicode.js deleted file mode 100644 index ec649adf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeUnicode.js +++ /dev/null @@ -1,21 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Escape string into unicode sequences - */ - function escapeUnicode(str, shouldEscapePrintable){ - str = toString(str); - return str.replace(/[\s\S]/g, function(ch){ - // skip printable ASCII chars if we should not escape them - if (!shouldEscapePrintable && (/[\x20-\x7E]/).test(ch)) { - return ch; - } - // we use "000" and slice(-4) for brevity, need to pad zeros, - // unicode escape always have 4 chars after "\u" - return '\\u'+ ('000'+ ch.charCodeAt(0).toString(16)).slice(-4); - }); - } - - module.exports = escapeUnicode; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/hyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/hyphenate.js deleted file mode 100644 index 95e32436..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/hyphenate.js +++ /dev/null @@ -1,14 +0,0 @@ -var toString = require('../lang/toString'); -var slugify = require('./slugify'); -var unCamelCase = require('./unCamelCase'); - /** - * Replaces spaces with hyphens, split camelCase text, remove non-word chars, remove accents and convert to lower case. - */ - function hyphenate(str){ - str = toString(str); - str = unCamelCase(str); - return slugify(str, "-"); - } - - module.exports = hyphenate; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/interpolate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/interpolate.js deleted file mode 100644 index ac88fac2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/interpolate.js +++ /dev/null @@ -1,18 +0,0 @@ -var toString = require('../lang/toString'); - - var stache = /\{\{(\w+)\}\}/g; //mustache-like - - /** - * String interpolation - */ - function interpolate(template, replacements, syntax){ - template = toString(template); - var replaceFn = function(match, prop){ - return (prop in replacements)? toString(replacements[prop]) : ''; - }; - return template.replace(syntax || stache, replaceFn); - } - - module.exports = interpolate; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/lowerCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/lowerCase.js deleted file mode 100644 index 30bb7ad9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/lowerCase.js +++ /dev/null @@ -1,11 +0,0 @@ -var toString = require('../lang/toString'); - /** - * "Safer" String.toLowerCase() - */ - function lowerCase(str){ - str = toString(str); - return str.toLowerCase(); - } - - module.exports = lowerCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/lpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/lpad.js deleted file mode 100644 index 694d711e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/lpad.js +++ /dev/null @@ -1,17 +0,0 @@ -var toString = require('../lang/toString'); -var repeat = require('./repeat'); - - /** - * Pad string with `char` if its' length is smaller than `minLen` - */ - function lpad(str, minLen, ch) { - str = toString(str); - ch = ch || ' '; - - return ((str.length < minLen) - ? repeat(ch, minLen - str.length) + str : str); - } - - module.exports = lpad; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/ltrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/ltrim.js deleted file mode 100644 index 23d7b33f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/ltrim.js +++ /dev/null @@ -1,34 +0,0 @@ -var toString = require('../lang/toString'); -var WHITE_SPACES = require('./WHITE_SPACES'); - /** - * Remove chars from beginning of string. - */ - function ltrim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - - var start = 0, - len = str.length, - charLen = chars.length, - found = true, - i, c; - - while (found && start < len) { - found = false; - i = -1; - c = str.charAt(start); - - while (++i < charLen) { - if (c === chars[i]) { - found = true; - start++; - break; - } - } - } - - return (start >= len) ? '' : str.substr(start, len); - } - - module.exports = ltrim; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/makePath.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/makePath.js deleted file mode 100644 index 69aef310..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/makePath.js +++ /dev/null @@ -1,13 +0,0 @@ -var join = require('../array/join'); - - /** - * Group arguments as path segments, if any of the args is `null` or an - * empty string it will be ignored from resulting path. - */ - function makePath(var_args){ - var result = join(Array.prototype.slice.call(arguments), '/'); - return result.replace(/\/{2,}/g, '/'); - } - - module.exports = makePath; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/normalizeLineBreaks.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/normalizeLineBreaks.js deleted file mode 100644 index 8a8dccfd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/normalizeLineBreaks.js +++ /dev/null @@ -1,18 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Convert line-breaks from DOS/MAC to a single standard (UNIX by default) - */ - function normalizeLineBreaks(str, lineEnd) { - str = toString(str); - lineEnd = lineEnd || '\n'; - - return str - .replace(/\r\n/g, lineEnd) // DOS - .replace(/\r/g, lineEnd) // Mac - .replace(/\n/g, lineEnd); // Unix - } - - module.exports = normalizeLineBreaks; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/pascalCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/pascalCase.js deleted file mode 100644 index fd190353..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/pascalCase.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); -var camelCase = require('./camelCase'); -var upperCase = require('./upperCase'); - /** - * camelCase + UPPERCASE first char - */ - function pascalCase(str){ - str = toString(str); - return camelCase(str).replace(/^[a-z]/, upperCase); - } - - module.exports = pascalCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/properCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/properCase.js deleted file mode 100644 index 61636be4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/properCase.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); -var lowerCase = require('./lowerCase'); -var upperCase = require('./upperCase'); - /** - * UPPERCASE first char of each word. - */ - function properCase(str){ - str = toString(str); - return lowerCase(str).replace(/^\w|\s\w/g, upperCase); - } - - module.exports = properCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/removeNonASCII.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/removeNonASCII.js deleted file mode 100644 index fb463816..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/removeNonASCII.js +++ /dev/null @@ -1,14 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Remove non-printable ASCII chars - */ - function removeNonASCII(str){ - str = toString(str); - - // Matches non-printable ASCII chars - - // http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters - return str.replace(/[^\x20-\x7E]/g, ''); - } - - module.exports = removeNonASCII; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/removeNonWord.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/removeNonWord.js deleted file mode 100644 index bdd153b9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/removeNonWord.js +++ /dev/null @@ -1,11 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Remove non-word chars. - */ - function removeNonWord(str){ - str = toString(str); - return str.replace(/[^0-9a-zA-Z\xC0-\xFF \-_]/g, ''); - } - - module.exports = removeNonWord; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/repeat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/repeat.js deleted file mode 100644 index 0f9b4754..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/repeat.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Repeat string n times - */ - function repeat(str, n){ - str = toString(str); - return (new Array(n + 1)).join(str); - } - - module.exports = repeat; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/replace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/replace.js deleted file mode 100644 index 14433fc7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/replace.js +++ /dev/null @@ -1,33 +0,0 @@ -var toString = require('../lang/toString'); -var toArray = require('../lang/toArray'); - - /** - * Replace string(s) with the replacement(s) in the source. - */ - function replace(str, search, replacements) { - str = toString(str); - search = toArray(search); - replacements = toArray(replacements); - - var searchLength = search.length, - replacementsLength = replacements.length; - - if (replacementsLength !== 1 && searchLength !== replacementsLength) { - throw new Error('Unequal number of searches and replacements'); - } - - var i = -1; - while (++i < searchLength) { - // Use the first replacement for all searches if only one - // replacement is provided - str = str.replace( - search[i], - replacements[(replacementsLength === 1) ? 0 : i]); - } - - return str; - } - - module.exports = replace; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/replaceAccents.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/replaceAccents.js deleted file mode 100644 index bb221265..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/replaceAccents.js +++ /dev/null @@ -1,36 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Replaces all accented chars with regular ones - */ - function replaceAccents(str){ - str = toString(str); - - // verifies if the String has accents and replace them - if (str.search(/[\xC0-\xFF]/g) > -1) { - str = str - .replace(/[\xC0-\xC5]/g, "A") - .replace(/[\xC6]/g, "AE") - .replace(/[\xC7]/g, "C") - .replace(/[\xC8-\xCB]/g, "E") - .replace(/[\xCC-\xCF]/g, "I") - .replace(/[\xD0]/g, "D") - .replace(/[\xD1]/g, "N") - .replace(/[\xD2-\xD6\xD8]/g, "O") - .replace(/[\xD9-\xDC]/g, "U") - .replace(/[\xDD]/g, "Y") - .replace(/[\xDE]/g, "P") - .replace(/[\xE0-\xE5]/g, "a") - .replace(/[\xE6]/g, "ae") - .replace(/[\xE7]/g, "c") - .replace(/[\xE8-\xEB]/g, "e") - .replace(/[\xEC-\xEF]/g, "i") - .replace(/[\xF1]/g, "n") - .replace(/[\xF2-\xF6\xF8]/g, "o") - .replace(/[\xF9-\xFC]/g, "u") - .replace(/[\xFE]/g, "p") - .replace(/[\xFD\xFF]/g, "y"); - } - return str; - } - module.exports = replaceAccents; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/rpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/rpad.js deleted file mode 100644 index 99f6378d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/rpad.js +++ /dev/null @@ -1,15 +0,0 @@ -var toString = require('../lang/toString'); -var repeat = require('./repeat'); - - /** - * Pad string with `char` if its' length is smaller than `minLen` - */ - function rpad(str, minLen, ch) { - str = toString(str); - ch = ch || ' '; - return (str.length < minLen)? str + repeat(ch, minLen - str.length) : str; - } - - module.exports = rpad; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/rtrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/rtrim.js deleted file mode 100644 index 66ba80e9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/rtrim.js +++ /dev/null @@ -1,33 +0,0 @@ -var toString = require('../lang/toString'); -var WHITE_SPACES = require('./WHITE_SPACES'); - /** - * Remove chars from end of string. - */ - function rtrim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - - var end = str.length - 1, - charLen = chars.length, - found = true, - i, c; - - while (found && end >= 0) { - found = false; - i = -1; - c = str.charAt(end); - - while (++i < charLen) { - if (c === chars[i]) { - found = true; - end--; - break; - } - } - } - - return (end >= 0) ? str.substring(0, end + 1) : ''; - } - - module.exports = rtrim; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/sentenceCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/sentenceCase.js deleted file mode 100644 index 354104c6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/sentenceCase.js +++ /dev/null @@ -1,15 +0,0 @@ -var toString = require('../lang/toString'); -var lowerCase = require('./lowerCase'); -var upperCase = require('./upperCase'); - /** - * UPPERCASE first char of each sentence and lowercase other chars. - */ - function sentenceCase(str){ - str = toString(str); - - // Replace first char of each sentence (new line or after '.\s+') to - // UPPERCASE - return lowerCase(str).replace(/(^\w)|\.\s+(\w)/gm, upperCase); - } - module.exports = sentenceCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/slugify.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/slugify.js deleted file mode 100644 index 142f0d9b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/slugify.js +++ /dev/null @@ -1,24 +0,0 @@ -var toString = require('../lang/toString'); -var replaceAccents = require('./replaceAccents'); -var removeNonWord = require('./removeNonWord'); -var trim = require('./trim'); - /** - * Convert to lower case, remove accents, remove non-word chars and - * replace spaces with the specified delimeter. - * Does not split camelCase text. - */ - function slugify(str, delimeter){ - str = toString(str); - - if (delimeter == null) { - delimeter = "-"; - } - str = replaceAccents(str); - str = removeNonWord(str); - str = trim(str) //should come after removeNonWord - .replace(/ +/g, delimeter) //replace spaces with delimeter - .toLowerCase(); - return str; - } - module.exports = slugify; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/startsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/startsWith.js deleted file mode 100644 index bce2bd20..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/startsWith.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Checks if string starts with specified prefix. - */ - function startsWith(str, prefix) { - str = toString(str); - prefix = toString(prefix); - - return str.indexOf(prefix) === 0; - } - - module.exports = startsWith; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/stripHtmlTags.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/stripHtmlTags.js deleted file mode 100644 index 01d17b0e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/stripHtmlTags.js +++ /dev/null @@ -1,11 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Remove HTML tags from string. - */ - function stripHtmlTags(str){ - str = toString(str); - - return str.replace(/<[^>]*>/g, ''); - } - module.exports = stripHtmlTags; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/trim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/trim.js deleted file mode 100644 index 9652b0c7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/trim.js +++ /dev/null @@ -1,15 +0,0 @@ -var toString = require('../lang/toString'); -var WHITE_SPACES = require('./WHITE_SPACES'); -var ltrim = require('./ltrim'); -var rtrim = require('./rtrim'); - /** - * Remove white-spaces from beginning and end of string. - */ - function trim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - return ltrim(rtrim(str, chars), chars); - } - - module.exports = trim; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/truncate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/truncate.js deleted file mode 100644 index a98d6c7d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/truncate.js +++ /dev/null @@ -1,21 +0,0 @@ -var toString = require('../lang/toString'); -var trim = require('./trim'); - /** - * Limit number of chars. - */ - function truncate(str, maxChars, append, onlyFullWords){ - str = toString(str); - append = append || '...'; - maxChars = onlyFullWords? maxChars + 1 : maxChars; - - str = trim(str); - if(str.length <= maxChars){ - return str; - } - str = str.substr(0, maxChars - append.length); - //crop at last space or remove trailing whitespace - str = onlyFullWords? str.substr(0, str.lastIndexOf(' ')) : trim(str); - return str + append; - } - module.exports = truncate; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/typecast.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/typecast.js deleted file mode 100644 index c1386a49..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/typecast.js +++ /dev/null @@ -1,29 +0,0 @@ - - - var UNDEF; - - /** - * Parses string and convert it into a native value. - */ - function typecast(val) { - var r; - if ( val === null || val === 'null' ) { - r = null; - } else if ( val === 'true' ) { - r = true; - } else if ( val === 'false' ) { - r = false; - } else if ( val === UNDEF || val === 'undefined' ) { - r = UNDEF; - } else if ( val === '' || isNaN(val) ) { - //isNaN('') returns false - r = val; - } else { - //parseFloat(null || '') returns NaN - r = parseFloat(val); - } - return r; - } - - module.exports = typecast; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/unCamelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/unCamelCase.js deleted file mode 100644 index 4968f378..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/unCamelCase.js +++ /dev/null @@ -1,23 +0,0 @@ -var toString = require('../lang/toString'); - - var CAMEL_CASE_BORDER = /([a-z\xE0-\xFF])([A-Z\xC0\xDF])/g; - - /** - * Add space between camelCase text. - */ - function unCamelCase(str, delimiter){ - if (delimiter == null) { - delimiter = ' '; - } - - function join(str, c1, c2) { - return c1 + delimiter + c2; - } - - str = toString(str); - str = str.replace(CAMEL_CASE_BORDER, join); - str = str.toLowerCase(); //add space between camelCase text - return str; - } - module.exports = unCamelCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/underscore.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/underscore.js deleted file mode 100644 index ebd6e2b7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/underscore.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); -var slugify = require('./slugify'); -var unCamelCase = require('./unCamelCase'); - /** - * Replaces spaces with underscores, split camelCase text, remove non-word chars, remove accents and convert to lower case. - */ - function underscore(str){ - str = toString(str); - str = unCamelCase(str); - return slugify(str, "_"); - } - module.exports = underscore; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/unescapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/unescapeHtml.js deleted file mode 100644 index 52cf3f45..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/unescapeHtml.js +++ /dev/null @@ -1,18 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Unescapes HTML special chars - */ - function unescapeHtml(str){ - str = toString(str) - .replace(/&/g , '&') - .replace(/</g , '<') - .replace(/>/g , '>') - .replace(/'/g , "'") - .replace(/"/g, '"'); - return str; - } - - module.exports = unescapeHtml; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/unescapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/unescapeUnicode.js deleted file mode 100644 index 0b7fb73b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/unescapeUnicode.js +++ /dev/null @@ -1,16 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Unescape unicode char sequences - */ - function unescapeUnicode(str){ - str = toString(str); - return str.replace(/\\u[0-9a-f]{4}/g, function(ch){ - var code = parseInt(ch.slice(2), 16); - return String.fromCharCode(code); - }); - } - - module.exports = unescapeUnicode; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/unhyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/unhyphenate.js deleted file mode 100644 index 311dfa17..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/unhyphenate.js +++ /dev/null @@ -1,10 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Replaces hyphens with spaces. (only hyphens between word chars) - */ - function unhyphenate(str){ - str = toString(str); - return str.replace(/(\w)(-)(\w)/g, '$1 $3'); - } - module.exports = unhyphenate; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/upperCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/upperCase.js deleted file mode 100644 index 6c92552c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/string/upperCase.js +++ /dev/null @@ -1,10 +0,0 @@ -var toString = require('../lang/toString'); - /** - * "Safer" String.toUpperCase() - */ - function upperCase(str){ - str = toString(str); - return str.toUpperCase(); - } - module.exports = upperCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time.js deleted file mode 100644 index 9f533296..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time.js +++ /dev/null @@ -1,12 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'convert' : require('./time/convert'), - 'now' : require('./time/now'), - 'parseMs' : require('./time/parseMs'), - 'toTimeString' : require('./time/toTimeString') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time/convert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time/convert.js deleted file mode 100644 index 852a0f03..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time/convert.js +++ /dev/null @@ -1,41 +0,0 @@ - - - /** - * convert time into another unit - */ - function convert(val, sourceUnitName, destinationUnitName){ - destinationUnitName = destinationUnitName || 'ms'; - return (val * getUnit(sourceUnitName)) / getUnit(destinationUnitName); - } - - - //TODO: maybe extract to a separate module - function getUnit(unitName){ - switch(unitName){ - case 'ms': - case 'millisecond': - return 1; - case 's': - case 'second': - return 1000; - case 'm': - case 'minute': - return 60000; - case 'h': - case 'hour': - return 3600000; - case 'd': - case 'day': - return 86400000; - case 'w': - case 'week': - return 604800000; - default: - throw new Error('"'+ unitName + '" is not a valid unit'); - } - } - - - module.exports = convert; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time/now.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time/now.js deleted file mode 100644 index effcfbe3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time/now.js +++ /dev/null @@ -1,12 +0,0 @@ - - - /** - * Get current time in miliseconds - */ - var now = (typeof Date.now === 'function')? Date.now : function(){ - return +(new Date()); - }; - - module.exports = now; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time/parseMs.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time/parseMs.js deleted file mode 100644 index 6d997976..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time/parseMs.js +++ /dev/null @@ -1,17 +0,0 @@ -var countSteps = require('../math/countSteps'); - - /** - * Parse timestamp into an object. - */ - function parseMs(ms){ - return { - milliseconds : countSteps(ms, 1, 1000), - seconds : countSteps(ms, 1000, 60), - minutes : countSteps(ms, 60000, 60), - hours : countSteps(ms, 3600000, 24), - days : countSteps(ms, 86400000) - }; - } - - module.exports = parseMs; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time/toTimeString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time/toTimeString.js deleted file mode 100644 index 101d69fc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/time/toTimeString.js +++ /dev/null @@ -1,24 +0,0 @@ -var countSteps = require('../math/countSteps'); -var pad = require('../number/pad'); - - var HOUR = 3600000, - MINUTE = 60000, - SECOND = 1000; - - /** - * Format timestamp into a time string. - */ - function toTimeString(ms){ - var h = ms < HOUR ? 0 : countSteps(ms, HOUR), - m = ms < MINUTE ? 0 : countSteps(ms, MINUTE, 60), - s = ms < SECOND ? 0 : countSteps(ms, SECOND, 60), - str = ''; - - str += h? h + ':' : ''; - str += pad(m, 2) + ':'; - str += pad(s, 2); - - return str; - } - module.exports = toTimeString; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/.npmignore deleted file mode 100644 index f1250e58..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/History.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/History.md deleted file mode 100644 index 88119480..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/History.md +++ /dev/null @@ -1,42 +0,0 @@ - -1.0.0 / 2013-06-18 -================== - - * remove .version - * >=. Closes #19 - * Merge pull request #15 from davglass/readline-osx - * On OSX revert back to terminal hack to avoid a readline bug - -0.1.0 / 2012-09-19 -================== - - * Fixed logic bug that caused bar to jump one extra space at the end [davglass] - * Working with readline impl, even on Windows [davglass] - * Using readline instead of the \r hack [davglass] - -0.0.5 / 2012-08-07 -================== - - * add ability to tick by zero chunks - tick(0) - * fix ETA. Closes #4 [lwille] - -0.0.4 / 2011-11-14 -================== - - * Allow more recent versions of node - -0.0.3 / 2011-04-20 -================== - - * Changed; erase the line when complete - -0.0.2 / 2011-04-20 -================== - - * Added custom tokens support - * Fixed; clear line before writing - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/Makefile deleted file mode 100644 index 36a3ed7d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/Makefile +++ /dev/null @@ -1,5 +0,0 @@ - -test: - @echo "populate me" - -.PHONY: test \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/Readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/Readme.md deleted file mode 100644 index 4e08a49b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/Readme.md +++ /dev/null @@ -1,117 +0,0 @@ -# node-progress - - Flexible ascii progress bar - -## Installation - - npm install progress - -## Usage - - First we create a `ProgressBar`, giving it a format string - as well as the `total`, telling the progress bar when it will - be considered complete. After that all we need to do is `tick()` appropriately. - -```javascript -var ProgressBar = require('progress'); - -var bar = new ProgressBar(':bar', { total: 10 }); -var timer = setInterval(function(){ - bar.tick(); - if (bar.complete) { - console.log('\ncomplete\n'); - clearInterval(timer); - } -}, 100); -``` - -## Options: - - - `total` total number of ticks to complete - - `width` the displayed width of the progress bar defaulting to total - - `stream` the output stream defaulting to stdout - - `complete` completion character defaulting to "=" - - `incomplete` incomplete character defaulting to "-" - - `clear` option to clear the bar on completion defaulting to false - - `callback` optional function to call when the progress bar completes - -## Tokens: - - - `:bar` the progress bar itself - - `:current` current tick number - - `:total` total ticks - - `:elapsed` time elapsed in seconds - - `:percent` completion percentage - - `:eta` estimated completion time in seconds - -## Examples - -### Download - - In our download example each tick has a variable influence, so we pass the chunk length which adjusts the progress bar appropriately relative to the total length. - -```javascript -var ProgressBar = require('../') - , https = require('https'); - -var req = https.request({ - host: 'download.github.com' - , port: 443 - , path: '/visionmedia-node-jscoverage-0d4608a.zip' -}); - -req.on('response', function(res){ - var len = parseInt(res.headers['content-length'], 10); - - console.log(); - var bar = new ProgressBar(' downloading [:bar] :percent :etas', { - complete: '=' - , incomplete: ' ' - , width: 20 - , total: len - }); - - res.on('data', function(chunk){ - bar.tick(chunk.length); - }); - - res.on('end', function(){ - console.log('\n'); - }); -}); - -req.end(); -``` - - The code above will generate a progress bar that looks like this: - -``` -downloading [===== ] 29% 3.7s -``` - -You can see more examples in the `examples` folder. - -## License - -(The MIT License) - -Copyright (c) 2011 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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/index.js deleted file mode 100644 index 4449dd30..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/node-progress'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/lib/node-progress.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/lib/node-progress.js deleted file mode 100644 index ca0ce4f0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/lib/node-progress.js +++ /dev/null @@ -1,183 +0,0 @@ -/*! - * node-progress - * Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca> - * MIT Licensed - */ - -/** - * Expose `ProgressBar`. - */ - -exports = module.exports = ProgressBar; - -/** - * Initialize a `ProgressBar` with the given - * `fmt` string and `options` or `total`. - * - * Options: - * - * - `total` total number of ticks to complete - * - `width` the displayed width of the progress bar defaulting to total - * - `stream` the output stream defaulting to stdout - * - `complete` completion character defaulting to "=" - * - `incomplete` incomplete character defaulting to "-" - * - `callback` optional function to call when the progress bar completes - * - * Tokens: - * - * - `:bar` the progress bar itself - * - `:current` current tick number - * - `:total` total ticks - * - `:elapsed` time elapsed in seconds - * - `:percent` completion percentage - * - `:eta` eta in seconds - * - * @param {String} fmt - * @param {Object|Number} options or total - * @api public - */ - -function ProgressBar(fmt, options) { - this.rl = require('readline').createInterface({ - input: process.stdin, - output: options.stream || process.stdout - }); - this.rl.setPrompt('', 0); - this.rl.clearLine = function() { - this.write(null, {ctrl: true, name: 'u'}); - }; - - if (typeof(options) == 'number') { - var total = options; - options = {}; - options.total = total; - } else { - options = options || {}; - if ('string' != typeof fmt) throw new Error('format required'); - if ('number' != typeof options.total) throw new Error('total required'); - } - - this.fmt = fmt; - this.curr = 0; - this.total = options.total; - this.width = options.width || this.total; - this.clear = options.clear - this.chars = { - complete: options.complete || '=' - , incomplete: options.incomplete || '-' - }; - this.callback = options.callback || function () {}; -} - -/** - * "tick" the progress bar with optional `len` and - * optional `tokens`. - * - * @param {Number|Object} len or tokens - * @param {Object} tokens - * @api public - */ - -ProgressBar.prototype.tick = function(len, tokens){ - if (len !== 0) - len = len || 1; - - // swap tokens - if ('object' == typeof len) tokens = len, len = 1; - - // start time for eta - if (0 == this.curr) this.start = new Date; - - this.curr += len - this.render(tokens); - - // progress complete - if (this.curr >= this.total) { - this.complete = true; - this.terminate(); - this.callback(this); - return; - } -}; - -/** - * Method to render the progress bar with optional `tokens` to - * place in the progress bar's `fmt` field. - * - * @param {Object} tokens - * @api public - */ - -ProgressBar.prototype.render = function(tokens){ - if(!process.stdout.isTTY) { - return; - } - - var ratio = this.curr / this.total; - ratio = Math.min(Math.max(ratio, 0), 1); - - var percent = ratio * 100 - , complete = Math.round(this.width * ratio) - , incomplete - , elapsed = new Date - this.start - , eta = (percent == 100) ? 0 : elapsed * (this.total / this.curr - 1); - - complete = Array(complete).join(this.chars.complete); - incomplete = Array(this.width - complete.length).join(this.chars.incomplete); - - var str = this.fmt - .replace(':bar', complete + incomplete) - .replace(':current', this.curr) - .replace(':total', this.total) - .replace(':elapsed', isNaN(elapsed) ? "0.0" : (elapsed / 1000).toFixed(1)) - .replace(':eta', (isNaN(eta) || !isFinite(eta)) ? "0.0" : (eta / 1000).toFixed(1)) - .replace(':percent', percent.toFixed(0) + '%'); - - if (tokens) { - for (var key in tokens) { - str = str.replace(':' + key, tokens[key]); - } - } - - this.rl.clearLine(); - this.rl.write(str); -}; - -/** - * "update" the progress bar to represent an exact percentage. - * The ratio (between 0 and 1) specified will be multiplied by `total` and - * floored, representing the closest available "tick." For example, if a - * progress bar has a length of 3 and `update(0.5)` is called, the progress - * will be set to 1. - * - * A ratio of 0.5 will attempt to set the progress to halfway. - * - * @param {Number} ratio The ratio (between 0 and 1 inclusive) to set the - * overall completion to. - * @api public - */ - -ProgressBar.prototype.update = function(ratio, tokens) { - var goal = Math.floor(ratio * this.total); - var delta = goal - this.curr; - - this.tick(delta, tokens); -}; - -/** - * Terminates a progress bar. - * - * @api public - */ - -ProgressBar.prototype.terminate = function() { - this.rl.resume(); - - if (this.clear) { - this.rl.clearLine(); - this.rl.close(); - } else { - this.rl.close(); - console.log(); - } -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/package.json deleted file mode 100644 index c4744b51..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/progress/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "progress", - "version": "1.1.3", - "description": "Flexible ascii progress bar", - "keywords": [ - "cli", - "progress" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "dependencies": {}, - "main": "index", - "engines": { - "node": ">=0.4.0" - }, - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/node-progress" - }, - "readme": "# node-progress\n\n Flexible ascii progress bar\n\n## Installation\n\n npm install progress\n\n## Usage\n\n First we create a `ProgressBar`, giving it a format string\n as well as the `total`, telling the progress bar when it will\n be considered complete. After that all we need to do is `tick()` appropriately.\n\n```javascript\nvar ProgressBar = require('progress');\n\nvar bar = new ProgressBar(':bar', { total: 10 });\nvar timer = setInterval(function(){\n bar.tick();\n if (bar.complete) {\n console.log('\\ncomplete\\n');\n clearInterval(timer);\n }\n}, 100);\n```\n\n## Options:\n\n - `total` total number of ticks to complete\n - `width` the displayed width of the progress bar defaulting to total\n - `stream` the output stream defaulting to stdout\n - `complete` completion character defaulting to \"=\"\n - `incomplete` incomplete character defaulting to \"-\"\n - `clear` option to clear the bar on completion defaulting to false\n - `callback` optional function to call when the progress bar completes\n\n## Tokens:\n\n - `:bar` the progress bar itself\n - `:current` current tick number\n - `:total` total ticks\n - `:elapsed` time elapsed in seconds\n - `:percent` completion percentage\n - `:eta` estimated completion time in seconds\n\n## Examples\n\n### Download\n\n In our download example each tick has a variable influence, so we pass the chunk length which adjusts the progress bar appropriately relative to the total length.\n\n```javascript\nvar ProgressBar = require('../')\n , https = require('https');\n\nvar req = https.request({\n host: 'download.github.com'\n , port: 443\n , path: '/visionmedia-node-jscoverage-0d4608a.zip'\n});\n\nreq.on('response', function(res){\n var len = parseInt(res.headers['content-length'], 10);\n\n console.log();\n var bar = new ProgressBar(' downloading [:bar] :percent :etas', {\n complete: '='\n , incomplete: ' '\n , width: 20\n , total: len\n });\n\n res.on('data', function(chunk){\n bar.tick(chunk.length);\n });\n\n res.on('end', function(){\n console.log('\\n');\n });\n});\n\nreq.end();\n```\n\n The code above will generate a progress bar that looks like this:\n\n```\ndownloading [===== ] 29% 3.7s\n```\n\nYou can see more examples in the `examples` folder.\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk `<tj@vision-media.ca>`\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/node-progress/issues" - }, - "homepage": "https://github.com/visionmedia/node-progress", - "_id": "progress@1.1.3", - "dist": { - "shasum": "42f89c5fc3b6f0408a0bdd68993b174f96aababf" - }, - "_from": "progress@~1.1.0", - "_resolved": "https://registry.npmjs.org/progress/-/progress-1.1.3.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/AUTHORS b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/AUTHORS deleted file mode 100644 index 247b7543..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/AUTHORS +++ /dev/null @@ -1,6 +0,0 @@ -# Authors sorted by whether or not they're me. -Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me) -Wayne Larsen <wayne@larsen.st> (http://github.com/wvl) -ritch <skawful@gmail.com> -Marcel Laverdet -Yosef Dinerstein <yosefd@microsoft.com> diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/LICENSE deleted file mode 100644 index 05a40109..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/README.md deleted file mode 100644 index cd123b65..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/README.md +++ /dev/null @@ -1,30 +0,0 @@ -`rm -rf` for node. - -Install with `npm install rimraf`, or just drop rimraf.js somewhere. - -## API - -`rimraf(f, callback)` - -The callback will be called with an error if there is one. Certain -errors are handled for you: - -* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of - `opts.maxBusyTries` times before giving up. -* `ENOENT` - If the file doesn't exist, rimraf will return - successfully, since your desired outcome is already the case. - -## rimraf.sync - -It can remove stuff synchronously, too. But that's not so good. Use -the async API. It's better. - -## CLI - -If installed with `npm install rimraf -g` it can be used as a global -command `rimraf <path>` which is useful for cross platform support. - -## mkdirp - -If you need to create a directory recursively, check out -[mkdirp](https://github.com/substack/node-mkdirp). diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/bin.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/bin.js deleted file mode 100755 index 29bfa8a6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/bin.js +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env node - -var rimraf = require('./') - -var help = false -var dashdash = false -var args = process.argv.slice(2).filter(function(arg) { - if (dashdash) - return !!arg - else if (arg === '--') - dashdash = true - else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) - help = true - else - return !!arg -}); - -if (help || args.length === 0) { - // If they didn't ask for help, then this is not a "success" - var log = help ? console.log : console.error - log('Usage: rimraf <path>') - log('') - log(' Deletes all files and folders at "path" recursively.') - log('') - log('Options:') - log('') - log(' -h, --help Display this usage info') - process.exit(help ? 0 : 1) -} else { - args.forEach(function(arg) { - rimraf.sync(arg) - }) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/package.json deleted file mode 100644 index 211cc9dc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "rimraf", - "version": "2.2.6", - "main": "rimraf.js", - "description": "A deep deletion module for node (like `rm -rf`)", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": { - "type": "MIT", - "url": "https://github.com/isaacs/rimraf/raw/master/LICENSE" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/rimraf.git" - }, - "scripts": { - "test": "cd test && bash run.sh" - }, - "bin": { - "rimraf": "./bin.js" - }, - "contributors": [ - { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - { - "name": "Wayne Larsen", - "email": "wayne@larsen.st", - "url": "http://github.com/wvl" - }, - { - "name": "ritch", - "email": "skawful@gmail.com" - }, - { - "name": "Marcel Laverdet" - }, - { - "name": "Yosef Dinerstein", - "email": "yosefd@microsoft.com" - } - ], - "readme": "`rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one. Certain\nerrors are handled for you:\n\n* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of\n `opts.maxBusyTries` times before giving up.\n* `ENOENT` - If the file doesn't exist, rimraf will return\n successfully, since your desired outcome is already the case.\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too. But that's not so good. Use\nthe async API. It's better.\n\n## CLI\n\nIf installed with `npm install rimraf -g` it can be used as a global\ncommand `rimraf <path>` which is useful for cross platform support.\n\n## mkdirp\n\nIf you need to create a directory recursively, check out\n[mkdirp](https://github.com/substack/node-mkdirp).\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/rimraf/issues" - }, - "homepage": "https://github.com/isaacs/rimraf", - "_id": "rimraf@2.2.6", - "dist": { - "shasum": "7ada6a6d39b2301af3c8fe7b936c2e46e7c4463d" - }, - "_from": "rimraf@~2.2.6", - "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.6.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/rimraf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/rimraf.js deleted file mode 100644 index ce62051f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/rimraf.js +++ /dev/null @@ -1,178 +0,0 @@ -module.exports = rimraf -rimraf.sync = rimrafSync - -var path = require("path") -var fs = require("fs") - -// for EMFILE handling -var timeout = 0 -exports.EMFILE_MAX = 1000 -exports.BUSYTRIES_MAX = 3 - -var isWindows = (process.platform === "win32") - -function rimraf (p, cb) { - if (!cb) throw new Error("No callback passed to rimraf()") - - var busyTries = 0 - rimraf_(p, function CB (er) { - if (er) { - if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY") && - busyTries < exports.BUSYTRIES_MAX) { - busyTries ++ - var time = busyTries * 100 - // try again, with the same exact callback as this one. - return setTimeout(function () { - rimraf_(p, CB) - }, time) - } - - // this one won't happen if graceful-fs is used. - if (er.code === "EMFILE" && timeout < exports.EMFILE_MAX) { - return setTimeout(function () { - rimraf_(p, CB) - }, timeout ++) - } - - // already gone - if (er.code === "ENOENT") er = null - } - - timeout = 0 - cb(er) - }) -} - -// Two possible strategies. -// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR -// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR -// -// Both result in an extra syscall when you guess wrong. However, there -// are likely far more normal files in the world than directories. This -// is based on the assumption that a the average number of files per -// directory is >= 1. -// -// If anyone ever complains about this, then I guess the strategy could -// be made configurable somehow. But until then, YAGNI. -function rimraf_ (p, cb) { - fs.unlink(p, function (er) { - if (er) { - if (er.code === "ENOENT") - return cb(null) - if (er.code === "EPERM") - return (isWindows) ? fixWinEPERM(p, er, cb) : rmdir(p, er, cb) - if (er.code === "EISDIR") - return rmdir(p, er, cb) - } - return cb(er) - }) -} - -function fixWinEPERM (p, er, cb) { - fs.chmod(p, 666, function (er2) { - if (er2) - cb(er2.code === "ENOENT" ? null : er) - else - fs.stat(p, function(er3, stats) { - if (er3) - cb(er3.code === "ENOENT" ? null : er) - else if (stats.isDirectory()) - rmdir(p, er, cb) - else - fs.unlink(p, cb) - }) - }) -} - -function fixWinEPERMSync (p, er, cb) { - try { - fs.chmodSync(p, 666) - } catch (er2) { - if (er2.code !== "ENOENT") - throw er - } - - try { - var stats = fs.statSync(p) - } catch (er3) { - if (er3 !== "ENOENT") - throw er - } - - if (stats.isDirectory()) - rmdirSync(p, er) - else - fs.unlinkSync(p) -} - -function rmdir (p, originalEr, cb) { - // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) - // if we guessed wrong, and it's not a directory, then - // raise the original error. - fs.rmdir(p, function (er) { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) - rmkids(p, cb) - else if (er && er.code === "ENOTDIR") - cb(originalEr) - else - cb(er) - }) -} - -function rmkids(p, cb) { - fs.readdir(p, function (er, files) { - if (er) - return cb(er) - var n = files.length - if (n === 0) - return fs.rmdir(p, cb) - var errState - files.forEach(function (f) { - rimraf(path.join(p, f), function (er) { - if (errState) - return - if (er) - return cb(errState = er) - if (--n === 0) - fs.rmdir(p, cb) - }) - }) - }) -} - -// this looks simpler, and is strictly *faster*, but will -// tie up the JavaScript thread and fail on excessively -// deep directory trees. -function rimrafSync (p) { - try { - fs.unlinkSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - if (er.code === "EPERM") - return isWindows ? fixWinEPERMSync(p, er) : rmdirSync(p, er) - if (er.code !== "EISDIR") - throw er - rmdirSync(p, er) - } -} - -function rmdirSync (p, originalEr) { - try { - fs.rmdirSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - if (er.code === "ENOTDIR") - throw originalEr - if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") - rmkidsSync(p) - } -} - -function rmkidsSync (p) { - fs.readdirSync(p).forEach(function (f) { - rimrafSync(path.join(p, f)) - }) - fs.rmdirSync(p) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/test/run.sh b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/test/run.sh deleted file mode 100644 index 598f0163..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/test/run.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -set -e -for i in test-*.js; do - echo -n $i ... - bash setup.sh - node $i - ! [ -d target ] - echo "pass" -done -rm -rf target diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/test/setup.sh b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/test/setup.sh deleted file mode 100644 index 2602e631..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/test/setup.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -set -e - -files=10 -folders=2 -depth=4 -target="$PWD/target" - -rm -rf target - -fill () { - local depth=$1 - local files=$2 - local folders=$3 - local target=$4 - - if ! [ -d $target ]; then - mkdir -p $target - fi - - local f - - f=$files - while [ $f -gt 0 ]; do - touch "$target/f-$depth-$f" - let f-- - done - - let depth-- - - if [ $depth -le 0 ]; then - return 0 - fi - - f=$folders - while [ $f -gt 0 ]; do - mkdir "$target/folder-$depth-$f" - fill $depth $files $folders "$target/d-$depth-$f" - let f-- - done -} - -fill $depth $files $folders $target - -# sanity assert -[ -d $target ] diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/test/test-async.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/test/test-async.js deleted file mode 100644 index 9c2e0b7b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/test/test-async.js +++ /dev/null @@ -1,5 +0,0 @@ -var rimraf = require("../rimraf") - , path = require("path") -rimraf(path.join(__dirname, "target"), function (er) { - if (er) throw er -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/test/test-sync.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/test/test-sync.js deleted file mode 100644 index eb71f104..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/rimraf/test/test-sync.js +++ /dev/null @@ -1,3 +0,0 @@ -var rimraf = require("../rimraf") - , path = require("path") -rimraf.sync(path.join(__dirname, "target")) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/LICENSE deleted file mode 100644 index 05a40109..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/README.md deleted file mode 100644 index ff1eb531..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The "which" util from npm's guts. - -Finds the first instance of a specified executable in the PATH -environment variable. Does not cache the results, so `hash -r` is not -needed when the PATH changes. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/bin/which b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/bin/which deleted file mode 100755 index 8432ce2f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/bin/which +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env node -var which = require("../") -if (process.argv.length < 3) { - console.error("Usage: which <thing>") - process.exit(1) -} - -which(process.argv[2], function (er, thing) { - if (er) { - console.error(er.message) - process.exit(er.errno || 127) - } - console.log(thing) -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/package.json deleted file mode 100644 index f1938b07..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "name": "which", - "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", - "version": "1.0.5", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-which.git" - }, - "main": "which.js", - "bin": { - "which": "./bin/which" - }, - "engines": { - "node": "*" - }, - "dependencies": {}, - "devDependencies": {}, - "readme": "The \"which\" util from npm's guts.\n\nFinds the first instance of a specified executable in the PATH\nenvironment variable. Does not cache the results, so `hash -r` is not\nneeded when the PATH changes.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/node-which/issues" - }, - "homepage": "https://github.com/isaacs/node-which", - "_id": "which@1.0.5", - "dist": { - "shasum": "195619a6ad7e8fefd0aa76445a6d4c8d370a322c" - }, - "_from": "which@~1.0.5", - "_resolved": "https://registry.npmjs.org/which/-/which-1.0.5.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/which.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/which.js deleted file mode 100644 index db7e8f74..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/which/which.js +++ /dev/null @@ -1,104 +0,0 @@ -module.exports = which -which.sync = whichSync - -var path = require("path") - , fs - , COLON = process.platform === "win32" ? ";" : ":" - , isExe - -try { - fs = require("graceful-fs") -} catch (ex) { - fs = require("fs") -} - -if (process.platform == "win32") { - // On windows, there is no good way to check that a file is executable - isExe = function isExe () { return true } -} else { - isExe = function isExe (mod, uid, gid) { - //console.error(mod, uid, gid); - //console.error("isExe?", (mod & 0111).toString(8)) - var ret = (mod & 0001) - || (mod & 0010) && process.getgid && gid === process.getgid() - || (mod & 0100) && process.getuid && uid === process.getuid() - //console.error("isExe?", ret) - return ret - } -} - - - -function which (cmd, cb) { - if (isAbsolute(cmd)) return cb(null, cmd) - var pathEnv = (process.env.PATH || "").split(COLON) - , pathExt = [""] - if (process.platform === "win32") { - pathEnv.push(process.cwd()) - pathExt = (process.env.PATHEXT || ".EXE").split(COLON) - if (cmd.indexOf(".") !== -1) pathExt.unshift("") - } - //console.error("pathEnv", pathEnv) - ;(function F (i, l) { - if (i === l) return cb(new Error("not found: "+cmd)) - var p = path.resolve(pathEnv[i], cmd) - ;(function E (ii, ll) { - if (ii === ll) return F(i + 1, l) - var ext = pathExt[ii] - //console.error(p + ext) - fs.stat(p + ext, function (er, stat) { - if (!er && - stat && - stat.isFile() && - isExe(stat.mode, stat.uid, stat.gid)) { - //console.error("yes, exe!", p + ext) - return cb(null, p + ext) - } - return E(ii + 1, ll) - }) - })(0, pathExt.length) - })(0, pathEnv.length) -} - -function whichSync (cmd) { - if (isAbsolute(cmd)) return cmd - var pathEnv = (process.env.PATH || "").split(COLON) - , pathExt = [""] - if (process.platform === "win32") { - pathEnv.push(process.cwd()) - pathExt = (process.env.PATHEXT || ".EXE").split(COLON) - if (cmd.indexOf(".") !== -1) pathExt.unshift("") - } - for (var i = 0, l = pathEnv.length; i < l; i ++) { - var p = path.join(pathEnv[i], cmd) - for (var j = 0, ll = pathExt.length; j < ll; j ++) { - var cur = p + pathExt[j] - var stat - try { stat = fs.statSync(cur) } catch (ex) {} - if (stat && - stat.isFile() && - isExe(stat.mode, stat.uid, stat.gid)) return cur - } - } - throw new Error("not found: "+cmd) -} - -var isAbsolute = process.platform === "win32" ? absWin : absUnix - -function absWin (p) { - if (absUnix(p)) return true - // pull off the device/UNC bit from a windows path. - // from node's lib/path.js - var splitDeviceRe = - /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?([\\\/])?/ - , result = splitDeviceRe.exec(p) - , device = result[1] || '' - , isUnc = device && device.charAt(1) !== ':' - , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute - - return isAbsolute -} - -function absUnix (p) { - return p.charAt(0) === "/" || p === "" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/package.json deleted file mode 100644 index 66d4488e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "bin-wrapper", - "version": "0.1.9", - "description": "Binary wrapper for Node.js that makes your programs seamlessly available as local dependencies", - "keywords": [ - "bin", - "build", - "make", - "wrapper" - ], - "homepage": "https://github.com/kevva/bin-wrapper", - "bugs": { - "url": "https://github.com/kevva/bin-wrapper/issues" - }, - "author": { - "name": "Kevin Martensson", - "email": "kevinmartensson@gmail.com", - "url": "http://kevinmartensson.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/kevva/bin-wrapper.git" - }, - "scripts": { - "test": "mocha --reporter list --timeout 0" - }, - "main": "bin-wrapper.js", - "files": [ - "bin-wrapper.js" - ], - "dependencies": { - "download": "~0.1.2", - "isbin": "0.0.2", - "mout": "~0.6.0", - "progress": "~1.1.0", - "rimraf": "~2.2.6", - "which": "~1.0.5" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "readme": "# bin-wrapper [![Build Status](https://secure.travis-ci.org/kevva/bin-wrapper.png?branch=master)](http://travis-ci.org/kevva/bin-wrapper)\n\nBinary wrapper for Node.js that makes your programs seamlessly available as local dependencies\n\n## Getting started\n\nInstall with [npm](https://npmjs.org/package/bin-wrapper): `npm install bin-wrapper`\n\n## Examples\n\nAll `platform` and `arch` specific options takes precedence over the base \noptions. See [test.js](test.js) for a full fleshed example.\n\n```js\nvar Bin = require('bin-wrapper');\n\nvar opts = {\n name: 'Gifsicle',\n bin: 'gifsicle',\n path: 'vendor',\n url: 'http://url/to/gifsicle',\n src: 'http://www.lcdf.org/gifsicle/gifsicle-1.71.tar.gz',\n buildScript: './configure --bindir=\"vendor\" && make install',\n platform: {\n win32: {\n bin: 'gifsicle.exe',\n url: [\n 'http://url/to/gifsicle.exe'\n 'http://url/to/gifsicle.dll'\n ]\n }\n }\n}\nvar bin = new Bin(opts);\n\nbin.check('--version', function (works) {\n if (!works) {\n console.log('Pre-build test failed, compiling from source');\n return bin.build();\n }\n\n console.log('Binary passed the test');\n});\n```\n\nGet the path to your binary with `bin.path`.\n\n```js\nconsole.log(bin.path);\n// => path/to/vendor/gifsicle\n```\n\n## API\n\n### .check(cmd, cb)\n\nCheck if a binary is present and working. If it isn't, download and test it by \nrunning the binary with `cmd` and see if it exits correctly.\n\n### .build(cb)\n\nDownload the source archive defined in the `src` property and build it using the \nbuild script defined in the `buildScript` property.\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com)\n", - "readmeFilename": "README.md", - "_id": "bin-wrapper@0.1.9", - "dist": { - "shasum": "237ee496fb6049caedaba51ad9e62fc199a86060" - }, - "_from": "bin-wrapper@~0.1.3", - "_resolved": "https://registry.npmjs.org/bin-wrapper/-/bin-wrapper-0.1.9.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/chalk.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/chalk.js deleted file mode 100644 index 17c6dbab..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/chalk.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict'; -var ansi = require('ansi-styles'); -var defineProps = Object.defineProperties; - -ansi.grey = ansi.gray; - -var styles = (function () { - var ret = {}; - - Object.keys(ansi).forEach(function (key) { - ret[key] = { - get: function () { - this._styles.push(key); - return this; - } - }; - }); - - return ret; -})(); - -var chalk = module.exports = defineProps({}, init()); - -function init() { - var ret = {}; - - Object.keys(styles).forEach(function (name) { - ret[name] = { - get: function () { - var obj = defineProps(function self(str) { - if (!chalk.enabled) { - return str; - } - - return self._styles.reduce(function (str, name) { - var code = ansi[name]; - return code[0] + (str || '') + code[1]; - }, str); - }, styles); - - obj._styles = []; - - return obj[name]; - } - } - }); - - return ret; -} - -chalk.styles = ansi; - -chalk.stripColor = function (str) { - return str.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, ''); -}; - -chalk.supportsColor = require('has-color'); - -// detect mode if not set manually -if (chalk.enabled === undefined) { - chalk.enabled = chalk.supportsColor; -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js deleted file mode 100644 index 56a5d19b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; -module.exports = { - reset: ['\x1b[0m', '\x1b[0m'], - - bold: ['\x1b[1m', '\x1b[22m'], - italic: ['\x1b[3m', '\x1b[23m'], - underline: ['\x1b[4m', '\x1b[24m'], - inverse: ['\x1b[7m', '\x1b[27m'], - strikethrough: ['\x1b[9m', '\x1b[29m'], - - black: ['\x1b[30m', '\x1b[39m'], - red: ['\x1b[31m', '\x1b[39m'], - green: ['\x1b[32m', '\x1b[39m'], - yellow: ['\x1b[33m', '\x1b[39m'], - blue: ['\x1b[34m', '\x1b[39m'], - magenta: ['\x1b[35m', '\x1b[39m'], - cyan: ['\x1b[36m', '\x1b[39m'], - white: ['\x1b[37m', '\x1b[39m'], - gray: ['\x1B[90m', '\x1b[39m'], - - bgBlack: ['\x1b[40m', '\x1b[49m'], - bgRed: ['\x1b[41m', '\x1b[49m'], - bgGreen: ['\x1b[42m', '\x1b[49m'], - bgYellow: ['\x1b[43m', '\x1b[49m'], - bgBlue: ['\x1b[44m', '\x1b[49m'], - bgMagenta: ['\x1b[45m', '\x1b[49m'], - bgCyan: ['\x1b[46m', '\x1b[49m'], - bgWhite: ['\x1b[47m', '\x1b[49m'] -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/ansi-styles/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/ansi-styles/package.json deleted file mode 100644 index 8acdb5e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "ansi-styles", - "version": "0.2.0", - "description": "ANSI escape codes for colorizing strings in the terminal", - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "homepage": "https://github.com/sindresorhus/ansi-styles", - "bugs": { - "url": "https://github.com/sindresorhus/ansi-styles/issues" - }, - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "ansi-styles.js" - ], - "main": "ansi-styles", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/ansi-styles.git" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "readme": "# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles)\n\n> ANSI escape codes for colorizing strings in the terminal.\n\nYou probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings.\n\n![screenshot](screenshot.png)\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles`\n\n\n## Example\n\n```js\nvar ansi = require('ansi-styles');\n\nconsole.log(ansi.green[0] + 'Hello world!' + ansi.green[1]);\n```\n\n## API\n\nEach style is an array of a start and end escape code.\n\n\n## Styles\n\n### General\n\n- reset\n- bold\n- italic\n- underline\n- inverse\n- strikethrough\n\n### Text colors\n\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n\n### Background colors\n\n- bgBlack\n- bgRed\n- bgGreen\n- bgYellow\n- bgBlue\n- bgMagenta\n- bgCyan\n- bgWhite\n\n\n## License\n\nMIT License • © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "_id": "ansi-styles@0.2.0", - "dist": { - "shasum": "359ab4b15dcd64ba6d74734b72c36360a9af2c19" - }, - "_from": "ansi-styles@~0.2.0", - "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-0.2.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/ansi-styles/readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/ansi-styles/readme.md deleted file mode 100644 index 646837c6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,65 +0,0 @@ -# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles) - -> ANSI escape codes for colorizing strings in the terminal. - -You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings. - -![screenshot](screenshot.png) - - -## Install - -Install with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles` - - -## Example - -```js -var ansi = require('ansi-styles'); - -console.log(ansi.green[0] + 'Hello world!' + ansi.green[1]); -``` - -## API - -Each style is an array of a start and end escape code. - - -## Styles - -### General - -- reset -- bold -- italic -- underline -- inverse -- strikethrough - -### Text colors - -- black -- red -- green -- yellow -- blue -- magenta -- cyan -- white -- gray - -### Background colors - -- bgBlack -- bgRed -- bgGreen -- bgYellow -- bgBlue -- bgMagenta -- bgCyan -- bgWhite - - -## License - -MIT License • © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/has-color/has-color.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/has-color/has-color.js deleted file mode 100644 index 27316b1f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/has-color/has-color.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; -module.exports = (function () { - if (process.argv.indexOf('--no-color') !== -1) { - return false; - } - - if (process.argv.indexOf('--color') !== -1) { - return true; - } - - if (!process.stdout.isTTY) { - return false; - } - - if (process.platform === 'win32') { - return true; - } - - if ('COLORTERM' in process.env) { - return true; - } - - return /^screen|^xterm|color|ansi|cygwin|linux/i.test(process.env.TERM); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/has-color/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/has-color/package.json deleted file mode 100644 index d60b2d0a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/has-color/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "has-color", - "version": "0.1.4", - "description": "Detect whether a terminal supports color", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "capability", - "detect" - ], - "homepage": "https://github.com/sindresorhus/has-color", - "bugs": { - "url": "https://github.com/sindresorhus/has-color/issues" - }, - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "has-color.js" - ], - "main": "has-color", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/has-color.git" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "readme": "# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color)\n\n> Detect whether a terminal supports color.\n\nUsed in the terminal color module [chalk](https://github.com/sindresorhus/chalk).\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/has-color): `npm install --save has-color`\n\n\n## Example\n\n```js\nvar hasColor = require('has-color');\n\nif (hasColor) {\n\tconsole.log('Terminal supports color.');\n}\n```\n\nIt obeys the CLI flags `--color` and `--no-color`.\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "_id": "has-color@0.1.4", - "dist": { - "shasum": "d1dadeea5b9e8b446bf08603532333710c95a290" - }, - "_from": "has-color@~0.1.0", - "_resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.4.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/has-color/readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/has-color/readme.md deleted file mode 100644 index 0918c851..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/node_modules/has-color/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color) - -> Detect whether a terminal supports color. - -Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). - - -## Install - -Install with [npm](https://npmjs.org/package/has-color): `npm install --save has-color` - - -## Example - -```js -var hasColor = require('has-color'); - -if (hasColor) { - console.log('Terminal supports color.'); -} -``` - -It obeys the CLI flags `--color` and `--no-color`. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/package.json deleted file mode 100644 index 46a63f05..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "chalk", - "version": "0.2.1", - "description": "Terminal string styling done right", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "ansi", - "styles", - "tty", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "homepage": "https://github.com/sindresorhus/chalk", - "bugs": { - "url": "https://github.com/sindresorhus/chalk/issues" - }, - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "chalk.js" - ], - "main": "chalk", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/chalk.git" - }, - "scripts": { - "test": "mocha" - }, - "dependencies": { - "has-color": "~0.1.0", - "ansi-styles": "~0.2.0" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "readme": "# chalk [![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk)\n\n> Terminal string styling done right.\n\n[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of problems. Although there are other ones, they either do too much or not enough.\n\n**Chalk is a clean and focused alternative.**\n\n![screenshot](screenshot.png)\n\n\n## Why\n\n- **Doesn't extend String.prototype**\n- Expressive API\n- Clean and focused\n- Auto-detects color support\n- Actively maintained\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/chalk): `npm install --save chalk`\n\n\n## Example\n\nChalk comes with an easy to use composable API where you just chain the styles you want.\n\n```js\nvar chalk = require('chalk');\n\n// style a string\nconsole.log(chalk.blue('Hello world!'));\n\n// combine styled and normal strings\nconsole.log(chalk.blue('Hello') + 'World' + chalk.red('!'));\n\n// compose multiple styles using the chainable API\nconsole.log(chalk.blue.bgRed.bold('Hello world!'));\n\n// nest styles\nchalk.red('Hello' + chalk.underline.bgBlue('world') + '!');\n```\n\nYou can easily define your own themes.\n\n```js\nvar chalk = require('chalk');\nvar error = chalk.bold.red;\nconsole.log(error('Error!'));\n```\n\n\n## API\n\n### chalk.\\<style>\\[.\\<style>...](string)\n\nChain [styles](#styles) and call the last one as a method with a string argument.\n\n\n### chalk.enabled\n\nColor support is automatically detected, but you can override it.\n\n### chalk.supportsColor\n\nDetect whether the terminal [supports color](https://github.com/sindresorhus/has-color).\n\nCan be overridden by the user with the flags `--color` and `--no-color`.\n\nUsed internally and handled for you, but exposed for convenience.\n\n### chalk.styles\n\nExposes the styles as [ANSI escape codes](https://github.com/sindresorhus/ansi-styles).\n\n```js\nvar chalk = require('chalk');\n\nconsole.log(chalk.styles.red);\n//=> ['\\x1b[31m', '\\x1b[39m']\n\nconsole.log(chalk.styles.red[0] + 'Hello' + chalk.styles.red[1]);\n// first item is the style escape code and second is the reset escape code\n```\n\n### chalk.stripColor(string)\n\nStrip color from a string.\n\n\n## Styles\n\n### General\n\n- reset\n- bold\n- italic\n- underline\n- inverse\n- strikethrough\n\n### Text colors\n\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n\n### Background colors\n\n- bgBlack\n- bgRed\n- bgGreen\n- bgYellow\n- bgBlue\n- bgMagenta\n- bgCyan\n- bgWhite\n\n\n## License\n\nMIT License • © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "_id": "chalk@0.2.1", - "dist": { - "shasum": "7613e1575145b21386483f7f485aa5ffa8cbd10c" - }, - "_from": "chalk@~0.2.0", - "_resolved": "https://registry.npmjs.org/chalk/-/chalk-0.2.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/readme.md deleted file mode 100644 index d369d2ef..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/chalk/readme.md +++ /dev/null @@ -1,130 +0,0 @@ -# chalk [![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk) - -> Terminal string styling done right. - -[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of problems. Although there are other ones, they either do too much or not enough. - -**Chalk is a clean and focused alternative.** - -![screenshot](screenshot.png) - - -## Why - -- **Doesn't extend String.prototype** -- Expressive API -- Clean and focused -- Auto-detects color support -- Actively maintained - - -## Install - -Install with [npm](https://npmjs.org/package/chalk): `npm install --save chalk` - - -## Example - -Chalk comes with an easy to use composable API where you just chain the styles you want. - -```js -var chalk = require('chalk'); - -// style a string -console.log(chalk.blue('Hello world!')); - -// combine styled and normal strings -console.log(chalk.blue('Hello') + 'World' + chalk.red('!')); - -// compose multiple styles using the chainable API -console.log(chalk.blue.bgRed.bold('Hello world!')); - -// nest styles -chalk.red('Hello' + chalk.underline.bgBlue('world') + '!'); -``` - -You can easily define your own themes. - -```js -var chalk = require('chalk'); -var error = chalk.bold.red; -console.log(error('Error!')); -``` - - -## API - -### chalk.\<style>\[.\<style>...](string) - -Chain [styles](#styles) and call the last one as a method with a string argument. - - -### chalk.enabled - -Color support is automatically detected, but you can override it. - -### chalk.supportsColor - -Detect whether the terminal [supports color](https://github.com/sindresorhus/has-color). - -Can be overridden by the user with the flags `--color` and `--no-color`. - -Used internally and handled for you, but exposed for convenience. - -### chalk.styles - -Exposes the styles as [ANSI escape codes](https://github.com/sindresorhus/ansi-styles). - -```js -var chalk = require('chalk'); - -console.log(chalk.styles.red); -//=> ['\x1b[31m', '\x1b[39m'] - -console.log(chalk.styles.red[0] + 'Hello' + chalk.styles.red[1]); -// first item is the style escape code and second is the reset escape code -``` - -### chalk.stripColor(string) - -Strip color from a string. - - -## Styles - -### General - -- reset -- bold -- italic -- underline -- inverse -- strikethrough - -### Text colors - -- black -- red -- green -- yellow -- blue -- magenta -- cyan -- white -- gray - -### Background colors - -- bgBlack -- bgRed -- bgGreen -- bgYellow -- bgBlue -- bgMagenta -- bgCyan -- bgWhite - - -## License - -MIT License • © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/package.json deleted file mode 100644 index 4206dbf3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "jpegtran-bin", - "version": "0.2.3", - "description": "jpegtran (part of libjpeg-turbo) wrapper that makes it seamlessly available as a local dependency on OS X, Linux, FreeBSD, Solaris and Windows. Most commonly used to losslessly minify JPEG images.", - "keywords": [ - "jpeg", - "jpg", - "img", - "image", - "compress", - "minify", - "optimize" - ], - "homepage": "https://github.com/yeoman/node-jpegtran-bin", - "bugs": { - "url": "https://github.com/yeoman/node-jpegtran-bin/issues" - }, - "license": "BSD", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "maintainers": [ - { - "name": "Duncan Wong" - }, - { - "name": "Kevin Martensson", - "email": "kevinmartensson@gmail.com", - "url": "http://kevinmartensson.com" - } - ], - "main": "lib/jpegtran", - "bin": { - "jpegtran": "bin/jpegtran.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/yeoman/node-jpegtran-bin.git" - }, - "scripts": { - "test": "mocha", - "postinstall": "node lib/check.js" - }, - "engines": { - "node": ">=0.8.0" - }, - "dependencies": { - "bin-wrapper": "~0.1.3", - "chalk": "~0.2.0" - }, - "devDependencies": { - "mocha": "~1.13.0" - }, - "files": [ - "bin", - "lib", - "test" - ], - "readme": "# node-jpegtran-bin [![Build Status](https://secure.travis-ci.org/yeoman/node-jpegtran-bin.png?branch=master)](http://travis-ci.org/yeoman/node-jpegtran-bin)\n\njpegtran 1.3 (part of [libjpeg-turbo](http://libjpeg-turbo.virtualgl.org/)) Node.js wrapper that makes it seamlessly available as a local dependency on OS X, Linux, FreeBSD, Solaris and Windows. Most commonly used to losslessly minify JPEG images.\n\n> libjpeg-turbo is a derivative of libjpeg that uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression on x86, x86-64, and ARM systems. On such systems, libjpeg-turbo is generally 2-4x as fast as the unmodified version of libjpeg, all else being equal.\n\n\n## Install\n\n- Install with [npm](https://npmjs.org/package/jpegtran-bin): `npm install --save jpegtran-bin`\n\n\n## Example usage\n\n```js\nvar execFile = require('child_process').execFile;\nvar jpegtranPath = require('jpegtran-bin').path;\n\nexecFile(jpegtranPath, ['-outfile', 'output.jpg', 'input.jpg'], function() {\n console.log('Image minified');\n});\n```\n\nCan also be run directly from `./node_modules/.bin/jpegtran`.\n\n\n## Dev\n\nNote to self on how to update the binaries.\n\n### OS X and Linux\n\n- Run `npm install` to build the binary.\n\nThe `nasm` (Netwide Assember) package is required to build the binary on Ubuntu.\n\n### Windows\n\n- Download the [Windows files 32/64-bit](http://sourceforge.net/projects/libjpeg-turbo/files/) (GCC compiled) on a Windows machine\n\n (current version 1.3.0, x64 `libjpeg-turbo-1.3.0-gcc64.exe` and for x86 `libjpeg-turbo-1.3.0-gcc.exe`)\n- Run the downloaded file to extract\n- In the extracted folder go to the `bin` folder and copy `jpegtran.exe` and `libjpeg-62.dll` to `jpegtran-bin\\vendor\\` folder\n \n (for `grunt-contrib-imagemin` the folder is `grunt-contrib-imagemin\\node_modules\\jpegtran-bin\\vendor\\`)\n\n\n## License\n\nEverything excluding the binaries licensed under the [BSD license](http://opensource.org/licenses/bsd-license.php) and copyright Google.\n\nlibjpeg-turbo licensed under the BSD license and copyright dcommander.\n", - "readmeFilename": "readme.md", - "_id": "jpegtran-bin@0.2.3", - "dist": { - "shasum": "81fa02d7b3330d5db57f369d4a316601220cd854" - }, - "_from": "jpegtran-bin@~0.2.0", - "_resolved": "https://registry.npmjs.org/jpegtran-bin/-/jpegtran-bin-0.2.3.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/readme.md deleted file mode 100644 index 4e32f68e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/readme.md +++ /dev/null @@ -1,52 +0,0 @@ -# node-jpegtran-bin [![Build Status](https://secure.travis-ci.org/yeoman/node-jpegtran-bin.png?branch=master)](http://travis-ci.org/yeoman/node-jpegtran-bin) - -jpegtran 1.3 (part of [libjpeg-turbo](http://libjpeg-turbo.virtualgl.org/)) Node.js wrapper that makes it seamlessly available as a local dependency on OS X, Linux, FreeBSD, Solaris and Windows. Most commonly used to losslessly minify JPEG images. - -> libjpeg-turbo is a derivative of libjpeg that uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression on x86, x86-64, and ARM systems. On such systems, libjpeg-turbo is generally 2-4x as fast as the unmodified version of libjpeg, all else being equal. - - -## Install - -- Install with [npm](https://npmjs.org/package/jpegtran-bin): `npm install --save jpegtran-bin` - - -## Example usage - -```js -var execFile = require('child_process').execFile; -var jpegtranPath = require('jpegtran-bin').path; - -execFile(jpegtranPath, ['-outfile', 'output.jpg', 'input.jpg'], function() { - console.log('Image minified'); -}); -``` - -Can also be run directly from `./node_modules/.bin/jpegtran`. - - -## Dev - -Note to self on how to update the binaries. - -### OS X and Linux - -- Run `npm install` to build the binary. - -The `nasm` (Netwide Assember) package is required to build the binary on Ubuntu. - -### Windows - -- Download the [Windows files 32/64-bit](http://sourceforge.net/projects/libjpeg-turbo/files/) (GCC compiled) on a Windows machine - - (current version 1.3.0, x64 `libjpeg-turbo-1.3.0-gcc64.exe` and for x86 `libjpeg-turbo-1.3.0-gcc.exe`) -- Run the downloaded file to extract -- In the extracted folder go to the `bin` folder and copy `jpegtran.exe` and `libjpeg-62.dll` to `jpegtran-bin\vendor\` folder - - (for `grunt-contrib-imagemin` the folder is `grunt-contrib-imagemin\node_modules\jpegtran-bin\vendor\`) - - -## License - -Everything excluding the binaries licensed under the [BSD license](http://opensource.org/licenses/bsd-license.php) and copyright Google. - -libjpeg-turbo licensed under the BSD license and copyright dcommander. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/test/fixtures/test.jpg b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/test/fixtures/test.jpg deleted file mode 100644 index 831b4375..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/test/fixtures/test.jpg and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/test/minified.jpg b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/test/minified.jpg deleted file mode 100644 index 22f4cfdb..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/test/minified.jpg and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/test/test-build.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/test/test-build.js deleted file mode 100644 index 3788b95d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/test/test-build.js +++ /dev/null @@ -1,30 +0,0 @@ -/*global describe, it */ -'use strict'; - -var assert = require('assert'); -var Bin = require('bin-wrapper'); -var fs = require('fs'); -var options = require('../lib/jpegtran').options; -var path = require('path'); - -describe('jpegtran.build()', function () { - it('should rebuild the jpegtran binaries', function (cb) { - this.timeout(false); - var bin = new Bin(options); - - bin.path = path.join(__dirname, '../tmp', bin.bin); - bin.buildScript = './configure --disable-shared --prefix="' + bin.path + '" && ' + 'make install'; - - bin.build(function (err) { - if (err) { - cb(err); - } - - var origCTime = fs.statSync(bin.path).ctime; - var actualCTime = fs.statSync(bin.path).ctime; - - assert(actualCTime !== origCTime); - cb(); - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/test/test-path.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/test/test-path.js deleted file mode 100644 index db3690f1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/test/test-path.js +++ /dev/null @@ -1,49 +0,0 @@ -/*global describe, it, after */ -'use strict'; - -var assert = require('assert'); -var execFile = require('child_process').execFile; -var fs = require('fs'); -var path = require('path'); - -describe('jpegtran()', function () { - after(function () { - fs.unlinkSync('test/minified.jpg'); - }); - - it('should return path to jpegtran binary', function (cb) { - var binPath = require('../lib/jpegtran').path; - - execFile(binPath, ['-v', '-'], function (err, stdout, stderr) { - assert(stderr.toString().indexOf('libjpeg-turbo') !== -1); - cb(); - }); - }); - - it('should successfully proxy jpegtran', function (cb) { - var binPath = path.join(__dirname, '../bin/jpegtran.js'); - - execFile('node', [binPath, '-v', '-'], function (err, stdout, stderr) { - assert(stderr.toString().indexOf('libjpeg-turbo') !== -1); - cb(); - }); - }); - - it('should minify a .jpg', function (cb) { - var binPath = path.join(__dirname, '../bin/jpegtran.js'); - var args = [ - '-copy', 'none', - '-optimize', - '-outfile', path.join(__dirname, 'minified.jpg'), - path.join(__dirname, 'fixtures', 'test.jpg') - ]; - - execFile('node', [binPath].concat(args), function () { - var actual = fs.statSync('test/minified.jpg').size; - var original = fs.statSync('test/fixtures/test.jpg').size; - - assert(actual < original); - cb(); - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/vendor/jpegtran b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/vendor/jpegtran deleted file mode 100755 index 04d0dfe4..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/jpegtran-bin/vendor/jpegtran and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/.npmignore deleted file mode 100644 index 9303c347..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/.travis.yml deleted file mode 100644 index 84fd7ca2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - 0.9 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/LICENSE deleted file mode 100644 index 432d1aeb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 2010 James Halliday (mail@substack.net) - -This project is free software released under the MIT/X11 license: - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/examples/pow.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/examples/pow.js deleted file mode 100644 index e6924212..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/examples/pow.js +++ /dev/null @@ -1,6 +0,0 @@ -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/index.js deleted file mode 100644 index fda6de8a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/index.js +++ /dev/null @@ -1,82 +0,0 @@ -var path = require('path'); -var fs = require('fs'); - -module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; - -function mkdirP (p, mode, f, made) { - if (typeof mode === 'function' || mode === undefined) { - f = mode; - mode = 0777 & (~process.umask()); - } - if (!made) made = null; - - var cb = f || function () {}; - if (typeof mode === 'string') mode = parseInt(mode, 8); - p = path.resolve(p); - - fs.mkdir(p, mode, function (er) { - if (!er) { - made = made || p; - return cb(null, made); - } - switch (er.code) { - case 'ENOENT': - mkdirP(path.dirname(p), mode, function (er, made) { - if (er) cb(er, made); - else mkdirP(p, mode, cb, made); - }); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - fs.stat(p, function (er2, stat) { - // if the stat fails, then that's super weird. - // let the original error be the failure reason. - if (er2 || !stat.isDirectory()) cb(er, made) - else cb(null, made); - }); - break; - } - }); -} - -mkdirP.sync = function sync (p, mode, made) { - if (mode === undefined) { - mode = 0777 & (~process.umask()); - } - if (!made) made = null; - - if (typeof mode === 'string') mode = parseInt(mode, 8); - p = path.resolve(p); - - try { - fs.mkdirSync(p, mode); - made = made || p; - } - catch (err0) { - switch (err0.code) { - case 'ENOENT' : - made = sync(path.dirname(p), mode, made); - sync(p, mode, made); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - var stat; - try { - stat = fs.statSync(p); - } - catch (err1) { - throw err0; - } - if (!stat.isDirectory()) throw err0; - break; - } - } - - return made; -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/package.json deleted file mode 100644 index 221a22e3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "mkdirp", - "description": "Recursively mkdir, like `mkdir -p`", - "version": "0.3.5", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "main": "./index", - "keywords": [ - "mkdir", - "directory" - ], - "repository": { - "type": "git", - "url": "http://github.com/substack/node-mkdirp.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "devDependencies": { - "tap": "~0.4.0" - }, - "license": "MIT", - "readme": "# mkdirp\n\nLike `mkdir -p`, but in node.js!\n\n[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)\n\n# example\n\n## pow.js\n\n```js\nvar mkdirp = require('mkdirp');\n \nmkdirp('/tmp/foo/bar/baz', function (err) {\n if (err) console.error(err)\n else console.log('pow!')\n});\n```\n\nOutput\n\n```\npow!\n```\n\nAnd now /tmp/foo/bar/baz exists, huzzah!\n\n# methods\n\n```js\nvar mkdirp = require('mkdirp');\n```\n\n## mkdirp(dir, mode, cb)\n\nCreate a new directory and any necessary subdirectories at `dir` with octal\npermission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\n`cb(err, made)` fires with the error or the first directory `made`\nthat had to be created, if any.\n\n## mkdirp.sync(dir, mode)\n\nSynchronously create a new directory and any necessary subdirectories at `dir`\nwith octal permission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\nReturns the first directory that had to be created, if any.\n\n# install\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install mkdirp\n```\n\n# license\n\nMIT\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/substack/node-mkdirp/issues" - }, - "homepage": "https://github.com/substack/node-mkdirp", - "_id": "mkdirp@0.3.5", - "_from": "mkdirp@~0.3.5" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/readme.markdown b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/readme.markdown deleted file mode 100644 index 83b0216a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/readme.markdown +++ /dev/null @@ -1,63 +0,0 @@ -# mkdirp - -Like `mkdir -p`, but in node.js! - -[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp) - -# example - -## pow.js - -```js -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); -``` - -Output - -``` -pow! -``` - -And now /tmp/foo/bar/baz exists, huzzah! - -# methods - -```js -var mkdirp = require('mkdirp'); -``` - -## mkdirp(dir, mode, cb) - -Create a new directory and any necessary subdirectories at `dir` with octal -permission string `mode`. - -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -`cb(err, made)` fires with the error or the first directory `made` -that had to be created, if any. - -## mkdirp.sync(dir, mode) - -Synchronously create a new directory and any necessary subdirectories at `dir` -with octal permission string `mode`. - -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -Returns the first directory that had to be created, if any. - -# install - -With [npm](http://npmjs.org) do: - -``` -npm install mkdirp -``` - -# license - -MIT diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/chmod.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/chmod.js deleted file mode 100644 index 520dcb8e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/chmod.js +++ /dev/null @@ -1,38 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -test('chmod-pre', function (t) { - var mode = 0744 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.equal(stat && stat.mode & 0777, mode, 'should be 0744'); - t.end(); - }); - }); -}); - -test('chmod', function (t) { - var mode = 0755 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.end(); - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/clobber.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/clobber.js deleted file mode 100644 index 0eb70998..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/clobber.js +++ /dev/null @@ -1,37 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -// a file in the way -var itw = ps.slice(0, 3).join('/'); - - -test('clobber-pre', function (t) { - console.error("about to write to "+itw) - fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); - - fs.stat(itw, function (er, stat) { - t.ifError(er) - t.ok(stat && stat.isFile(), 'should be file') - t.end() - }) -}) - -test('clobber', function (t) { - t.plan(2); - mkdirp(file, 0755, function (err) { - t.ok(err); - t.equal(err.code, 'ENOTDIR'); - t.end(); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/mkdirp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/mkdirp.js deleted file mode 100644 index b07cd70c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/mkdirp.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('woo', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/perm.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/perm.js deleted file mode 100644 index 23a7abbd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/perm.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('async perm', function (t) { - t.plan(2); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); - -test('async root perm', function (t) { - mkdirp('/tmp', 0755, function (err) { - if (err) t.fail(err); - t.end(); - }); - t.end(); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/perm_sync.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/perm_sync.js deleted file mode 100644 index f685f609..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/perm_sync.js +++ /dev/null @@ -1,39 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('sync perm', function (t) { - t.plan(2); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json'; - - mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }); -}); - -test('sync root perm', function (t) { - t.plan(1); - - var file = '/tmp'; - mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/race.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/race.js deleted file mode 100644 index 96a04476..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/race.js +++ /dev/null @@ -1,41 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('race', function (t) { - t.plan(4); - var ps = [ '', 'tmp' ]; - - for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); - } - var file = ps.join('/'); - - var res = 2; - mk(file, function () { - if (--res === 0) t.end(); - }); - - mk(file, function () { - if (--res === 0) t.end(); - }); - - function mk (file, cb) { - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - if (cb) cb(); - } - }) - }) - }); - } -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/rel.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/rel.js deleted file mode 100644 index 79858243..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/rel.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('rel', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var cwd = process.cwd(); - process.chdir('/tmp'); - - var file = [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - process.chdir(cwd); - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/return.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/return.js deleted file mode 100644 index bce68e56..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/return.js +++ /dev/null @@ -1,25 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('return value', function (t) { - t.plan(4); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - // should return the first dir created. - // By this point, it would be profoundly surprising if /tmp didn't - // already exist, since every other test makes things in there. - mkdirp(file, function (err, made) { - t.ifError(err); - t.equal(made, '/tmp/' + x); - mkdirp(file, function (err, made) { - t.ifError(err); - t.equal(made, null); - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/return_sync.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/return_sync.js deleted file mode 100644 index 7c222d35..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/return_sync.js +++ /dev/null @@ -1,24 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('return value', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - // should return the first dir created. - // By this point, it would be profoundly surprising if /tmp didn't - // already exist, since every other test makes things in there. - // Note that this will throw on failure, which will fail the test. - var made = mkdirp.sync(file); - t.equal(made, '/tmp/' + x); - - // making the same file again should have no effect. - made = mkdirp.sync(file); - t.equal(made, null); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/root.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/root.js deleted file mode 100644 index 97ad7a2f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/root.js +++ /dev/null @@ -1,18 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('root', function (t) { - // '/' on unix, 'c:/' on windows. - var file = path.resolve('/'); - - mkdirp(file, 0755, function (err) { - if (err) throw err - fs.stat(file, function (er, stat) { - if (er) throw er - t.ok(stat.isDirectory(), 'target is a directory'); - t.end(); - }) - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/sync.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/sync.js deleted file mode 100644 index 7530cada..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/sync.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('sync', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - try { - mkdirp.sync(file, 0755); - } catch (err) { - t.fail(err); - return t.end(); - } - - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/umask.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/umask.js deleted file mode 100644 index 64ccafe2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/umask.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('implicit mode from umask', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0777 & (~process.umask())); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/umask_sync.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/umask_sync.js deleted file mode 100644 index 35bd5cbb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mkdirp/test/umask_sync.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('umask sync modes', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - try { - mkdirp.sync(file); - } catch (err) { - t.fail(err); - return t.end(); - } - - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, (0777 & (~process.umask()))); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/.editorconfig b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/.editorconfig deleted file mode 100644 index e036e247..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -; EditorConfig is awesome: http://EditorConfig.org - -; top-most EditorConfig file -root = true - -; base rules -[*] -end_of_line = lf -insert_final_newline = false -indent_style = space -indent_size = 4 -charset = utf-8 -trim_trailing_whitespace = true - -; The default indent on package.json is 2 spaces, better to keep it so we can -; use `npm install --save` and other features that rewrites the package.json -; file automatically -[package.json] -indent_style = space -indent_size = 2 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/.jshintrc b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/.jshintrc deleted file mode 100644 index bbdb29cf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/.jshintrc +++ /dev/null @@ -1,69 +0,0 @@ -{ - // Settings - "passfail" : false, // Stop on first error. - "maxerr" : 50, // Maximum error before stopping. - - - // Predefined globals whom JSHint will ignore. - "browser" : true, // Standard browser globals e.g. `window`, `document`. - "couch" : false, - "dojo" : false, - "jquery" : true, - "mootools" : false, - "node" : false, - "prototypejs" : false, - "rhino" : false, - "wsh" : false, - - // Custom globals. - "predef" : [ - "define", - "require" - ], - - - // Development. - "debug" : false, // Allow debugger statements e.g. browser breakpoints. - "devel" : false, // Allow developments statements e.g. `console.log();`. - - - // EcmaScript 5. - "es5" : false, // Allow EcmaScript 5 syntax. - "globalstrict" : false, // Allow global "use strict" (also enables 'strict'). - "strict" : false, // Require `use strict` pragma in every file. - - - // The Good Parts. - "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons). - "bitwise" : false, // Prohibit bitwise operators (&, |, ^, etc.). - "boss" : true, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments. - "curly" : false, // Require {} for every new block or scope. - "eqeqeq" : true, // Require triple equals i.e. `===`. - "eqnull" : true, // Tolerate use of `== null`. - "evil" : false, // Tolerate use of `eval`. - "expr" : false, // Tolerate `ExpressionStatement` as Programs. - "forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`. - "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` - "latedef" : false, // Prohibit variable use before definition. - "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons. - "loopfunc" : false, // Allow functions to be defined within loops. - "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`. - "regexdash" : true, // Tolerate unescaped last dash i.e. `[-...]`. - "regexp" : false, // Prohibit `.` and `[^...]` in regular expressions. - "scripturl" : false, // Tolerate script-targeted URLs. - "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`. - "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`. - "undef" : false, // Require all non-global variables be declared before they are used. - - - // Personal styling prefrences. - "newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`. - "noempty" : true, // Prohipit use of empty blocks. - "nomen" : false, // Prohibit use of initial or trailing underbars in names. - "nonew" : true, // Prohibit use of constructors for side-effects. - "onevar" : false, // Allow only one `var` statement per function. - "plusplus" : false, // Prohibit use of `++` & `--`. - "sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`. - "trailing" : true, // Prohibit trailing whitespaces. - "white" : false // Check against strict whitespace and indentation rules. -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/.npmignore deleted file mode 100644 index 1341acd9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/.npmignore +++ /dev/null @@ -1,30 +0,0 @@ -# dumb files -# ========== - -.tmp* -.project -.settings/ -.livereload -.DS_Store? -ehthumbs.db -Icon? -Thumbs.db - - -# stuff not needed by node -# ======================== - -node_modules/ -tests/ -_build/ -doc_html/ -coverage/ - -# we keep the doc/ folder in case npm decides to display it in the future -# also good in case user is using an old version or working offline - -# we also keep the src/ folder in case the user still needs the AMD modules -# after build (see issue #102) - -bower.json -build.js diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/.travis.yml deleted file mode 100644 index 324041b4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ - language: node_js - node_js: - - "0.8" - script: - - "npm test --coverage" - - "jshint src" - notifications: - irc: - channels: - - "irc.freenode.org#moutjs" - on_success: always - on_failure: always - use_notice: true - skip_join: true - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/CHANGELOG.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/CHANGELOG.md deleted file mode 100644 index 6ce1d6f3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/CHANGELOG.md +++ /dev/null @@ -1,116 +0,0 @@ -mout changelog -============== - -v0.7.1 (2013/09/18) -------------------- - - - fix `null` value handling in object/get. - -v0.7.0 (2013/09/05) -------------------- - - - add bower ignores. - - add german translation for date localization. - - alias `function` package as `fn` since "function" is a reserved keyword. - - allow second argument on `array/pick`. - - improve `string/makePath` to not remove "//" after protocol. - - make sure methods inside `number` package works with mixed types. - - support arrays on `queryString/encode`. - - support multiple values for same property on `queryString/decode`. - - add `cancel()` method to `throttled/debounced` functions. - - add `function/times`. - - add `lang/toNumber`. - - add `string/insert`. - - add `super_` to constructor on `lang/inheritPrototype`. - - -v0.6.0 (2013/05/22) -------------------- - - - add optional delimeter to `string/unCamelCase` - - allow custom char on `number/pad` - - allow underscore characters in `string/removeNonWord` - - accept `level` on `array/flatten` instead of a flag - - convert underscores to camelCase in `string/camelCase` - - remove `create()` from number/currencyFormat - - add `date/dayOfTheYear` - - add `date/diff` - - add `date/isSame` - - add `date/startOf` - - add `date/strftime` - - add `date/timezoneAbbr` - - add `date/timezoneOffset` - - add `date/totalDaysInYear` - - add `date/weekOfTheYear` - - add `function/timeout` - - add `object/bindAll` - - add `object/functions` - - add `time/convert` - - -v0.5.0 (2013/04/04) -------------------- - - - add `array/collect` - - add `callback` parameter to `object/equals` and `object/deepEquals` to allow - custom compare operations. - - normalize behavior in `array/*` methods to treat `null` values as empty - arrays when reading from array - - add `date/parseIso` - - add `date/isLeapYear` - - add `date/totalDaysInMonth` - - add `object/deepMatches` - - change `function/makeIterator_` to use `deepMatches` (affects nearly all - iteration methods) - - add `thisObj` parameter to `array/min` and `array/max` - - -v0.4.0 (2013/02/26) -------------------- - - - add `object/equals` - - add `object/deepEquals` - - add `object/matches`. - - add `lang/is` and `lang/isnt`. - - add `lang/isInteger`. - - add `array/findIndex`. - - add shorthand syntax to `array/*`, `object/*` and `collection/*` methods. - - improve `number/sign` behavior when value is NaN or +0 or -0. - - improve `lang/isNaN` to actually check if value *is not a number* without - coercing value; so `[]`, `""`, `null` and `"12"` are considered NaN (#39). - - improve `string/contains` to match ES6 behavior (add fromIndex argument). - - -v0.3.0 (2013/02/01) -------------------- - - - add `lang/clone`. - - add `lang/toString`. - - add `string/replace`. - - add `string/WHITE_SPACES` - - rename `function/curry` to `function/partial`. - - allow custom chars in `string/trim`, `ltrim`, and `rtrim`. - - convert values to strings in the `string/*` functions. - - -v0.2.0 (2013/01/13) -------------------- - - - fix bug in `math/ceil` for negative radixes. - - change `object/deepFillIn` and `object/deepMixIn` to recurse only if both - existing and new values are plain objects. Will not recurse into arrays - or objects not created by the Object constructor. - - add `lang/isPlainObject` to check if a file is a valid object and is created - by the Object constructor - - change `lang/clone` behavior when dealing with custom types (avoid cloning - it by default) and add second argument to allow custom behavior if needed. - - rename `lang/clone` to `lang/deepClone`. - - add VERSION property to index.js - - simplify `math/floor`, `math/round`, `math/ceil` and `math/countSteps`. - - -v0.1.0 (2013/01/09) -------------------- - -- Rename project from "amd-utils" to "mout" - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/CONTRIBUTING.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/CONTRIBUTING.md deleted file mode 100644 index 65d9add1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/CONTRIBUTING.md +++ /dev/null @@ -1,61 +0,0 @@ -# Contributing - -Fork the repo at https://github.com/mout/mout - - > "Write clearly, don't be too clever" - The Elements of Programming Style - -Avoid unnamed functions and follow the other modules structure. By only using named functions it will be easier to extract the code from the AMD module if needed and it will also give better error messages, JavaScript minifiers like [Google Closure Compiler](http://code.google.com/closure/compiler/) and [UglifyJS](https://github.com/mishoo/UglifyJS) will make sure code is as small/optimized as possible. - - > "Make it clear before you make it faster." - The Elements of Programming Style - -Be sure to always create tests for each proposed module. Features will only be merged if they contain proper tests and documentation. - - > "Good code is its own best documentation." - Steve McConnell - -We should do a code review before merging to make sure names makes sense and implementation is as good as possible. - -Try to split your pull requests into logical groups, the smaller the easier to be reviewed/merged. - - - -## Tests & Code Coverage ## - -Tests can be found inside the `tests` folder, to execute them in the browser open the `tests/runner.html`. The same tests also work on node.js by running `npm test`. - -We should have tests for all methods and ensure we have a high code coverage through our continuous integration server ([travis](https://travis-ci.org/mout/mout)). When you ask for a pull request Travis will automatically run the tests on node.js and check the code coverage as well. - -We run `node build pkg` automatically before any `npm test`, so specs and packages should always be in sync. (will avoid human mistakes) - -To check code coverage run `npm test --coverage`, it will generate the reports inside the `coverage` folder and also log the results. Please note that node.js doesn't execute all code branches since we have some conditionals that are only met on old JavaScript engines (eg. IE 7-8), so we will never have 100% code coverage (but should be close to it). - - - -## Build Script ## - -The [build script](https://github.com/mout/mout/wiki/Build-Script) can be extremely helpful and can avoid human mistakes, use it. - - - -## Admins / Pull Requests ## - -Even if you are an admin (have commit rights) please do pull requests when adding new features or changing current behavior, that way we can review the work and discuss. Feel free to push changes that doesn't affect behavior without asking for a pull request (readme, changelog, build script, typos, refactoring, ...). - - - -## Large changes ## - -If you are proposing some major change, please create an issue to discuss it first. (maybe it's outside the scope of the project) - - - -## Questions / IRC / Wiki / Issue Tracker ## - -When in doubt ask someone on IRC to help you ([#moutjs on irc.freenode.net](http://webchat.freenode.net/?channels=moutjs)) or create a [new issue](http://github.com/mout/mout/issues). - -The [project wiki](https://github.com/mout/mout/wiki) can also be a good resource of information. - - ---- - -Check the [contributors list at github](https://github.com/mout/mout/contributors). - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/LICENSE.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/LICENSE.md deleted file mode 100644 index e9ccc2be..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -# The MIT License (MIT) -## Copyright (c) 2012, 2013 moutjs team and contributors (http://moutjs.com) - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/README.md deleted file mode 100644 index 872943bd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/README.md +++ /dev/null @@ -1,63 +0,0 @@ -![mout](http://moutjs.com/logo.png "Modular JavaScript Utilties") - -http://moutjs.com/ - -[![Build Status](https://travis-ci.org/mout/mout.png?branch=master)](https://travis-ci.org/mout/mout) - -All code is library agnostic and consist mostly of helper methods that aren't -directly related with the DOM, the purpose of this library isn't to replace -Dojo, jQuery, YUI, Mootools, etc, but to provide modular solutions for common -problems that aren't solved by most of them. Consider it as a crossbrowser -JavaScript standard library. - - - -## Main goals ## - - - increase code reuse; - - be clear (code should be clean/readable); - - be easy to debug; - - be easy to maintain; - - follow best practices; - - follow standards when possible; - - **don't convert JavaScript into another language!** - - be compatible with other frameworks; - - be modular; - - have unit tests for all modules; - - work on multiple environments (IE7+, modern browsers, node.js); - - - -## What shouldn't be here ## - - - UI components; - - CSS selector engine; - - Event system - pub/sub; - - Template engine; - - Anything that isn't generic enough to be on a standard library; - - Anything that could be a separate library and/or isn't a modular utility... - - - -## API Documentation ## - -Online documentation can be found at http://moutjs.com/ or inside the -`doc` folder. - - - -## FAQ / Wiki / IRC ## - -For more info about project structure, design decisions, tips, how to -contribute, build system, etc, please check the [project -wiki](https://github.com/mout/mout/wiki). - -We also have an IRC channel [#moutjs on -irc.freenode.net](http://webchat.freenode.net/?channels=moutjs) - - - -## License ## - -Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php). - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array.js deleted file mode 100644 index 89d388ba..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array.js +++ /dev/null @@ -1,46 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'append' : require('./array/append'), - 'collect' : require('./array/collect'), - 'combine' : require('./array/combine'), - 'compact' : require('./array/compact'), - 'contains' : require('./array/contains'), - 'difference' : require('./array/difference'), - 'every' : require('./array/every'), - 'filter' : require('./array/filter'), - 'find' : require('./array/find'), - 'findIndex' : require('./array/findIndex'), - 'flatten' : require('./array/flatten'), - 'forEach' : require('./array/forEach'), - 'indexOf' : require('./array/indexOf'), - 'insert' : require('./array/insert'), - 'intersection' : require('./array/intersection'), - 'invoke' : require('./array/invoke'), - 'join' : require('./array/join'), - 'lastIndexOf' : require('./array/lastIndexOf'), - 'map' : require('./array/map'), - 'max' : require('./array/max'), - 'min' : require('./array/min'), - 'pick' : require('./array/pick'), - 'pluck' : require('./array/pluck'), - 'range' : require('./array/range'), - 'reduce' : require('./array/reduce'), - 'reduceRight' : require('./array/reduceRight'), - 'reject' : require('./array/reject'), - 'remove' : require('./array/remove'), - 'removeAll' : require('./array/removeAll'), - 'shuffle' : require('./array/shuffle'), - 'some' : require('./array/some'), - 'sort' : require('./array/sort'), - 'split' : require('./array/split'), - 'toLookup' : require('./array/toLookup'), - 'union' : require('./array/union'), - 'unique' : require('./array/unique'), - 'xor' : require('./array/xor'), - 'zip' : require('./array/zip') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/append.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/append.js deleted file mode 100644 index bf74037e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/append.js +++ /dev/null @@ -1,21 +0,0 @@ - - - /** - * Appends an array to the end of another. - * The first array will be modified. - */ - function append(arr1, arr2) { - if (arr2 == null) { - return arr1; - } - - var pad = arr1.length, - i = -1, - len = arr2.length; - while (++i < len) { - arr1[pad + i] = arr2[i]; - } - return arr1; - } - module.exports = append; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/collect.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/collect.js deleted file mode 100644 index 58637493..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/collect.js +++ /dev/null @@ -1,27 +0,0 @@ -var append = require('./append'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Maps the items in the array and concatenates the result arrays. - */ - function collect(arr, callback, thisObj){ - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length; - while (++i < len) { - var value = callback(arr[i], i, arr); - if (value != null) { - append(results, value); - } - } - - return results; - } - - module.exports = collect; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/combine.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/combine.js deleted file mode 100644 index d66e6212..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/combine.js +++ /dev/null @@ -1,22 +0,0 @@ -var indexOf = require('./indexOf'); - - /** - * Combines an array with all the items of another. - * Does not allow duplicates and is case and type sensitive. - */ - function combine(arr1, arr2) { - if (arr2 == null) { - return arr1; - } - - var i = -1, len = arr2.length; - while (++i < len) { - if (indexOf(arr1, arr2[i]) === -1) { - arr1.push(arr2[i]); - } - } - - return arr1; - } - module.exports = combine; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/compact.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/compact.js deleted file mode 100644 index 74c176ed..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/compact.js +++ /dev/null @@ -1,13 +0,0 @@ -var filter = require('./filter'); - - /** - * Remove all null/undefined items from array. - */ - function compact(arr) { - return filter(arr, function(val){ - return (val != null); - }); - } - - module.exports = compact; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/contains.js deleted file mode 100644 index 92bb6ad9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/contains.js +++ /dev/null @@ -1,10 +0,0 @@ -var indexOf = require('./indexOf'); - - /** - * If array contains values. - */ - function contains(arr, val) { - return indexOf(arr, val) !== -1; - } - module.exports = contains; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/difference.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/difference.js deleted file mode 100644 index d0570510..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/difference.js +++ /dev/null @@ -1,22 +0,0 @@ -var unique = require('./unique'); -var filter = require('./filter'); -var some = require('./some'); -var contains = require('./contains'); - - - /** - * Return a new Array with elements that aren't present in the other Arrays. - */ - function difference(arr) { - var arrs = Array.prototype.slice.call(arguments, 1), - result = filter(unique(arr), function(needle){ - return !some(arrs, function(haystack){ - return contains(haystack, needle); - }); - }); - return result; - } - - module.exports = difference; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/every.js deleted file mode 100644 index ac598832..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/every.js +++ /dev/null @@ -1,27 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Array every - */ - function every(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = true; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (!callback(arr[i], i, arr) ) { - result = false; - break; - } - } - - return result; - } - - module.exports = every; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/filter.js deleted file mode 100644 index f0e74199..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/filter.js +++ /dev/null @@ -1,26 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Array filter - */ - function filter(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - if (callback(value, i, arr)) { - results.push(value); - } - } - - return results; - } - - module.exports = filter; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/find.js deleted file mode 100644 index b4a73131..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/find.js +++ /dev/null @@ -1,13 +0,0 @@ -var findIndex = require('./findIndex'); - - /** - * Returns first item that matches criteria - */ - function find(arr, iterator, thisObj){ - var idx = findIndex(arr, iterator, thisObj); - return idx >= 0? arr[idx] : void(0); - } - - module.exports = find; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/findIndex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/findIndex.js deleted file mode 100644 index 53f22a5f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/findIndex.js +++ /dev/null @@ -1,23 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Returns the index of the first item that matches criteria - */ - function findIndex(arr, iterator, thisObj){ - iterator = makeIterator(iterator, thisObj); - if (arr == null) { - return -1; - } - - var i = -1, len = arr.length; - while (++i < len) { - if (iterator(arr[i], i, arr)) { - return i; - } - } - - return -1; - } - - module.exports = findIndex; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/flatten.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/flatten.js deleted file mode 100644 index aa9757ab..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/flatten.js +++ /dev/null @@ -1,43 +0,0 @@ -var isArray = require('../lang/isArray'); -var append = require('./append'); - - /* - * Helper function to flatten to a destination array. - * Used to remove the need to create intermediate arrays while flattening. - */ - function flattenTo(arr, result, level) { - if (arr == null) { - return result; - } else if (level === 0) { - append(result, arr); - return result; - } - - var value, - i = -1, - len = arr.length; - while (++i < len) { - value = arr[i]; - if (isArray(value)) { - flattenTo(value, result, level - 1); - } else { - result.push(value); - } - } - return result; - } - - /** - * Recursively flattens an array. - * A new array containing all the elements is returned. - * If `shallow` is true, it will only flatten one level. - */ - function flatten(arr, level) { - level = level == null? -1 : level; - return flattenTo(arr, [], level); - } - - module.exports = flatten; - - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/forEach.js deleted file mode 100644 index 268e506f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/forEach.js +++ /dev/null @@ -1,23 +0,0 @@ - - - /** - * Array forEach - */ - function forEach(arr, callback, thisObj) { - if (arr == null) { - return; - } - var i = -1, - len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if ( callback.call(thisObj, arr[i], i, arr) === false ) { - break; - } - } - } - - module.exports = forEach; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/indexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/indexOf.js deleted file mode 100644 index 6a9ac832..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/indexOf.js +++ /dev/null @@ -1,28 +0,0 @@ - - - /** - * Array.indexOf - */ - function indexOf(arr, item, fromIndex) { - fromIndex = fromIndex || 0; - if (arr == null) { - return -1; - } - - var len = arr.length, - i = fromIndex < 0 ? len + fromIndex : fromIndex; - while (i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (arr[i] === item) { - return i; - } - - i++; - } - - return -1; - } - - module.exports = indexOf; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/insert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/insert.js deleted file mode 100644 index f1f95b75..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/insert.js +++ /dev/null @@ -1,15 +0,0 @@ -var difference = require('./difference'); -var toArray = require('../lang/toArray'); - - /** - * Insert item into array if not already present. - */ - function insert(arr, rest_items) { - var diff = difference(toArray(arguments).slice(1), arr); - if (diff.length) { - Array.prototype.push.apply(arr, diff); - } - return arr.length; - } - module.exports = insert; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/intersection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/intersection.js deleted file mode 100644 index e6170062..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/intersection.js +++ /dev/null @@ -1,23 +0,0 @@ -var unique = require('./unique'); -var filter = require('./filter'); -var every = require('./every'); -var contains = require('./contains'); - - - /** - * Return a new Array with elements common to all Arrays. - * - based on underscore.js implementation - */ - function intersection(arr) { - var arrs = Array.prototype.slice.call(arguments, 1), - result = filter(unique(arr), function(needle){ - return every(arrs, function(haystack){ - return contains(haystack, needle); - }); - }); - return result; - } - - module.exports = intersection; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/invoke.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/invoke.js deleted file mode 100644 index d7be6cdc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/invoke.js +++ /dev/null @@ -1,23 +0,0 @@ - - - /** - * Call `methodName` on each item of the array passing custom arguments if - * needed. - */ - function invoke(arr, methodName, var_args){ - if (arr == null) { - return arr; - } - - var args = Array.prototype.slice.call(arguments, 2); - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - value[methodName].apply(value, args); - } - - return arr; - } - - module.exports = invoke; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/join.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/join.js deleted file mode 100644 index 71d8bd20..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/join.js +++ /dev/null @@ -1,17 +0,0 @@ -var filter = require('./filter'); - - function isValidString(val) { - return (val != null && val !== ''); - } - - /** - * Joins strings with the specified separator inserted between each value. - * Null values and empty strings will be excluded. - */ - function join(items, separator) { - separator = separator || ''; - return filter(items, isValidString).join(separator); - } - - module.exports = join; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/lastIndexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/lastIndexOf.js deleted file mode 100644 index ee44a25b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/lastIndexOf.js +++ /dev/null @@ -1,28 +0,0 @@ - - - /** - * Array lastIndexOf - */ - function lastIndexOf(arr, item, fromIndex) { - if (arr == null) { - return -1; - } - - var len = arr.length; - fromIndex = (fromIndex == null || fromIndex >= len)? len - 1 : fromIndex; - fromIndex = (fromIndex < 0)? len + fromIndex : fromIndex; - - while (fromIndex >= 0) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (arr[fromIndex] === item) { - return fromIndex; - } - fromIndex--; - } - - return -1; - } - - module.exports = lastIndexOf; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/map.js deleted file mode 100644 index 7b7fb331..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/map.js +++ /dev/null @@ -1,22 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Array map - */ - function map(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null){ - return results; - } - - var i = -1, len = arr.length; - while (++i < len) { - results[i] = callback(arr[i], i, arr); - } - - return results; - } - - module.exports = map; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/max.js deleted file mode 100644 index 0b8f2594..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/max.js +++ /dev/null @@ -1,34 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Return maximum value inside array - */ - function max(arr, iterator, thisObj){ - if (arr == null || !arr.length) { - return Infinity; - } else if (arr.length && !iterator) { - return Math.max.apply(Math, arr); - } else { - iterator = makeIterator(iterator, thisObj); - var result, - compare = -Infinity, - value, - temp; - - var i = -1, len = arr.length; - while (++i < len) { - value = arr[i]; - temp = iterator(value, i, arr); - if (temp > compare) { - compare = temp; - result = value; - } - } - - return result; - } - } - - module.exports = max; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/min.js deleted file mode 100644 index ed6cc6a1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/min.js +++ /dev/null @@ -1,34 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Return minimum value inside array - */ - function min(arr, iterator, thisObj){ - if (arr == null || !arr.length) { - return -Infinity; - } else if (arr.length && !iterator) { - return Math.min.apply(Math, arr); - } else { - iterator = makeIterator(iterator, thisObj); - var result, - compare = Infinity, - value, - temp; - - var i = -1, len = arr.length; - while (++i < len) { - value = arr[i]; - temp = iterator(value, i, arr); - if (temp < compare) { - compare = temp; - result = value; - } - } - - return result; - } - } - - module.exports = min; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/pick.js deleted file mode 100644 index 64086784..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/pick.js +++ /dev/null @@ -1,31 +0,0 @@ -var randInt = require('../random/randInt'); - - /** - * Remove random item(s) from the Array and return it. - * Returns an Array of items if [nItems] is provided or a single item if - * it isn't specified. - */ - function pick(arr, nItems){ - if (nItems != null) { - var result = []; - if (nItems > 0 && arr && arr.length) { - nItems = nItems > arr.length? arr.length : nItems; - while (nItems--) { - result.push( pickOne(arr) ); - } - } - return result; - } - return (arr && arr.length)? pickOne(arr) : void(0); - } - - - function pickOne(arr){ - var idx = randInt(0, arr.length - 1); - return arr.splice(idx, 1)[0]; - } - - - module.exports = pick; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/pluck.js deleted file mode 100644 index fef4043b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/pluck.js +++ /dev/null @@ -1,12 +0,0 @@ -var map = require('./map'); - - /** - * Extract a list of property values. - */ - function pluck(arr, propName){ - return map(arr, propName); - } - - module.exports = pluck; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/range.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/range.js deleted file mode 100644 index 31d3c770..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/range.js +++ /dev/null @@ -1,27 +0,0 @@ -var countSteps = require('../math/countSteps'); - - /** - * Returns an Array of numbers inside range. - */ - function range(start, stop, step) { - if (stop == null) { - stop = start; - start = 0; - } - step = step || 1; - - var result = [], - nSteps = countSteps(stop - start, step), - i = start; - - while (i <= stop) { - result.push(i); - i += step; - } - - return result; - } - - module.exports = range; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/reduce.js deleted file mode 100644 index 827f428f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/reduce.js +++ /dev/null @@ -1,33 +0,0 @@ - - - /** - * Array reduce - */ - function reduce(arr, fn, initVal) { - // check for args.length since initVal might be "undefined" see #gh-57 - var hasInit = arguments.length > 2, - result = initVal; - - if (arr == null || !arr.length) { - if (!hasInit) { - throw new Error('reduce of empty array with no initial value'); - } else { - return initVal; - } - } - - var i = -1, len = arr.length; - while (++i < len) { - if (!hasInit) { - result = arr[i]; - hasInit = true; - } else { - result = fn(result, arr[i], i, arr); - } - } - - return result; - } - - module.exports = reduce; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/reduceRight.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/reduceRight.js deleted file mode 100644 index e36fd4aa..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/reduceRight.js +++ /dev/null @@ -1,34 +0,0 @@ - - - /** - * Array reduceRight - */ - function reduceRight(arr, fn, initVal) { - // check for args.length since initVal might be "undefined" see #gh-57 - var hasInit = arguments.length > 2; - - if (arr == null || !arr.length) { - if (hasInit) { - return initVal; - } else { - throw new Error('reduce of empty array with no initial value'); - } - } - - var i = arr.length, result = initVal, value; - while (--i >= 0) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - value = arr[i]; - if (!hasInit) { - result = value; - hasInit = true; - } else { - result = fn(result, value, i, arr); - } - } - return result; - } - - module.exports = reduceRight; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/reject.js deleted file mode 100644 index 0cfc8b1a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/reject.js +++ /dev/null @@ -1,25 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Array reject - */ - function reject(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - if (!callback(value, i, arr)) { - results.push(value); - } - } - - return results; - } - - module.exports = reject; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/remove.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/remove.js deleted file mode 100644 index aa6517db..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/remove.js +++ /dev/null @@ -1,13 +0,0 @@ -var indexOf = require('./indexOf'); - - /** - * Remove a single item from the array. - * (it won't remove duplicates, just a single item) - */ - function remove(arr, item){ - var idx = indexOf(arr, item); - if (idx !== -1) arr.splice(idx, 1); - } - - module.exports = remove; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/removeAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/removeAll.js deleted file mode 100644 index d5f7f3b6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/removeAll.js +++ /dev/null @@ -1,15 +0,0 @@ -var indexOf = require('./indexOf'); - - /** - * Remove all instances of an item from array. - */ - function removeAll(arr, item){ - var idx = indexOf(arr, item); - while (idx !== -1) { - arr.splice(idx, 1); - idx = indexOf(arr, item, idx); - } - } - - module.exports = removeAll; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/shuffle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/shuffle.js deleted file mode 100644 index 99d0660f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/shuffle.js +++ /dev/null @@ -1,28 +0,0 @@ -var randInt = require('../random/randInt'); - - /** - * Shuffle array items. - */ - function shuffle(arr) { - var results = [], - rnd; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - if (!i) { - results[0] = arr[0]; - } else { - rnd = randInt(0, i); - results[i] = results[rnd]; - results[rnd] = arr[i]; - } - } - - return results; - } - - module.exports = shuffle; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/some.js deleted file mode 100644 index 8d17772b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/some.js +++ /dev/null @@ -1,27 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Array some - */ - function some(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = false; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if ( callback(arr[i], i, arr) ) { - result = true; - break; - } - } - - return result; - } - - module.exports = some; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/sort.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/sort.js deleted file mode 100644 index 7807339b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/sort.js +++ /dev/null @@ -1,55 +0,0 @@ - - - /** - * Merge sort (http://en.wikipedia.org/wiki/Merge_sort) - */ - function mergeSort(arr, compareFn) { - if (arr == null) { - return []; - } else if (arr.length < 2) { - return arr; - } - - if (compareFn == null) { - compareFn = defaultCompare; - } - - var mid, left, right; - - mid = ~~(arr.length / 2); - left = mergeSort( arr.slice(0, mid), compareFn ); - right = mergeSort( arr.slice(mid, arr.length), compareFn ); - - return merge(left, right, compareFn); - } - - function defaultCompare(a, b) { - return a < b ? -1 : (a > b? 1 : 0); - } - - function merge(left, right, compareFn) { - var result = []; - - while (left.length && right.length) { - if (compareFn(left[0], right[0]) <= 0) { - // if 0 it should preserve same order (stable) - result.push(left.shift()); - } else { - result.push(right.shift()); - } - } - - if (left.length) { - result.push.apply(result, left); - } - - if (right.length) { - result.push.apply(result, right); - } - - return result; - } - - module.exports = mergeSort; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/split.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/split.js deleted file mode 100644 index 4f3ba50c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/split.js +++ /dev/null @@ -1,35 +0,0 @@ - - - /** - * Split array into a fixed number of segments. - */ - function split(array, segments) { - segments = segments || 2; - var results = []; - if (array == null) { - return results; - } - - var minLength = Math.floor(array.length / segments), - remainder = array.length % segments, - i = 0, - len = array.length, - segmentIndex = 0, - segmentLength; - - while (i < len) { - segmentLength = minLength; - if (segmentIndex < remainder) { - segmentLength++; - } - - results.push(array.slice(i, i + segmentLength)); - - segmentIndex++; - i += segmentLength; - } - - return results; - } - module.exports = split; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/toLookup.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/toLookup.js deleted file mode 100644 index ce4c55dd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/toLookup.js +++ /dev/null @@ -1,28 +0,0 @@ -var isFunction = require('../lang/isFunction'); - - /** - * Creates an object that holds a lookup for the objects in the array. - */ - function toLookup(arr, key) { - var result = {}; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length, value; - if (isFunction(key)) { - while (++i < len) { - value = arr[i]; - result[key(value)] = value; - } - } else { - while (++i < len) { - value = arr[i]; - result[value[key]] = value; - } - } - - return result; - } - module.exports = toLookup; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/union.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/union.js deleted file mode 100644 index f1334a91..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/union.js +++ /dev/null @@ -1,19 +0,0 @@ -var unique = require('./unique'); -var append = require('./append'); - - /** - * Concat multiple arrays and remove duplicates - */ - function union(arrs) { - var results = []; - var i = -1, len = arguments.length; - while (++i < len) { - append(results, arguments[i]); - } - - return unique(results); - } - - module.exports = union; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/unique.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/unique.js deleted file mode 100644 index 0192b2df..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/unique.js +++ /dev/null @@ -1,17 +0,0 @@ -var indexOf = require('./indexOf'); -var filter = require('./filter'); - - /** - * @return {array} Array of unique items - */ - function unique(arr){ - return filter(arr, isUnique); - } - - function isUnique(item, i, arr){ - return indexOf(arr, item, i+1) === -1; - } - - module.exports = unique; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/xor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/xor.js deleted file mode 100644 index c125a996..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/xor.js +++ /dev/null @@ -1,26 +0,0 @@ -var unique = require('./unique'); -var filter = require('./filter'); -var contains = require('./contains'); - - - /** - * Exclusive OR. Returns items that are present in a single array. - * - like ptyhon's `symmetric_difference` - */ - function xor(arr1, arr2) { - arr1 = unique(arr1); - arr2 = unique(arr2); - - var a1 = filter(arr1, function(item){ - return !contains(arr2, item); - }), - a2 = filter(arr2, function(item){ - return !contains(arr1, item); - }); - - return a1.concat(a2); - } - - module.exports = xor; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/zip.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/zip.js deleted file mode 100644 index 8bce9c07..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/array/zip.js +++ /dev/null @@ -1,28 +0,0 @@ -var max = require('./max'); -var map = require('./map'); - - function getLength(arr) { - return arr == null ? 0 : arr.length; - } - - /** - * Merges together the values of each of the arrays with the values at the - * corresponding position. - */ - function zip(arr){ - var len = arr ? max(map(arguments, getLength)) : 0, - results = [], - i = -1; - while (++i < len) { - // jshint loopfunc: true - results.push(map(arguments, function(item) { - return item == null ? undefined : item[i]; - })); - } - - return results; - } - - module.exports = zip; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection.js deleted file mode 100644 index d5cf6cad..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection.js +++ /dev/null @@ -1,22 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'contains' : require('./collection/contains'), - 'every' : require('./collection/every'), - 'filter' : require('./collection/filter'), - 'find' : require('./collection/find'), - 'forEach' : require('./collection/forEach'), - 'make_' : require('./collection/make_'), - 'map' : require('./collection/map'), - 'max' : require('./collection/max'), - 'min' : require('./collection/min'), - 'pluck' : require('./collection/pluck'), - 'reduce' : require('./collection/reduce'), - 'reject' : require('./collection/reject'), - 'size' : require('./collection/size'), - 'some' : require('./collection/some') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/contains.js deleted file mode 100644 index a73f994b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/contains.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrContains = require('../array/contains'); -var objContains = require('../object/contains'); - - /** - */ - module.exports = make(arrContains, objContains); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/every.js deleted file mode 100644 index 300e03c5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/every.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrEvery = require('../array/every'); -var objEvery = require('../object/every'); - - /** - */ - module.exports = make(arrEvery, objEvery); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/filter.js deleted file mode 100644 index 38757005..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/filter.js +++ /dev/null @@ -1,23 +0,0 @@ -var forEach = require('./forEach'); -var makeIterator = require('../function/makeIterator_'); - - /** - * filter collection values, returns array. - */ - function filter(list, iterator, thisObj) { - iterator = makeIterator(iterator, thisObj); - var results = []; - if (!list) { - return results; - } - forEach(list, function(value, index, list) { - if (iterator(value, index, list)) { - results[results.length] = value; - } - }); - return results; - } - - module.exports = filter; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/find.js deleted file mode 100644 index 14317e64..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/find.js +++ /dev/null @@ -1,10 +0,0 @@ -var make = require('./make_'); -var arrFind = require('../array/find'); -var objFind = require('../object/find'); - - /** - * Find value that returns true on iterator check. - */ - module.exports = make(arrFind, objFind); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/forEach.js deleted file mode 100644 index 6e28dcb1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/forEach.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrForEach = require('../array/forEach'); -var objForEach = require('../object/forOwn'); - - /** - */ - module.exports = make(arrForEach, objForEach); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/make_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/make_.js deleted file mode 100644 index 029d27bf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/make_.js +++ /dev/null @@ -1,19 +0,0 @@ - - - /** - * internal method used to create other collection modules. - */ - function makeCollectionMethod(arrMethod, objMethod, defaultReturn) { - return function(){ - var args = Array.prototype.slice.call(arguments); - if (args[0] == null) { - return defaultReturn; - } - // array-like is treated as array - return (typeof args[0].length === 'number')? arrMethod.apply(null, args) : objMethod.apply(null, args); - }; - } - - module.exports = makeCollectionMethod; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/map.js deleted file mode 100644 index fc157f53..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/map.js +++ /dev/null @@ -1,23 +0,0 @@ -var isObject = require('../lang/isObject'); -var values = require('../object/values'); -var arrMap = require('../array/map'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Map collection values, returns Array. - */ - function map(list, callback, thisObj) { - callback = makeIterator(callback, thisObj); - // list.length to check array-like object, if not array-like - // we simply map all the object values - if( isObject(list) && list.length == null ){ - list = values(list); - } - return arrMap(list, function (val, key, list) { - return callback(val, key, list); - }); - } - - module.exports = map; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/max.js deleted file mode 100644 index a8490e7e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/max.js +++ /dev/null @@ -1,10 +0,0 @@ -var make = require('./make_'); -var arrMax = require('../array/max'); -var objMax = require('../object/max'); - - /** - * Get maximum value inside collection - */ - module.exports = make(arrMax, objMax); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/min.js deleted file mode 100644 index 51d9f148..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/min.js +++ /dev/null @@ -1,10 +0,0 @@ -var make = require('./make_'); -var arrMin = require('../array/min'); -var objMin = require('../object/min'); - - /** - * Get minimum value inside collection. - */ - module.exports = make(arrMin, objMin); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/pluck.js deleted file mode 100644 index 9b283776..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/pluck.js +++ /dev/null @@ -1,14 +0,0 @@ -var map = require('./map'); - - /** - * Extract a list of property values. - */ - function pluck(list, key) { - return map(list, function(value) { - return value[key]; - }); - } - - module.exports = pluck; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/reduce.js deleted file mode 100644 index 4c075735..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/reduce.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrReduce = require('../array/reduce'); -var objReduce = require('../object/reduce'); - - /** - */ - module.exports = make(arrReduce, objReduce); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/reject.js deleted file mode 100644 index 2a92e3b3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/reject.js +++ /dev/null @@ -1,16 +0,0 @@ -var filter = require('./filter'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Inverse or collection/filter - */ - function reject(list, iterator, thisObj) { - iterator = makeIterator(iterator, thisObj); - return filter(list, function(value, index, list) { - return !iterator(value, index, list); - }, thisObj); - } - - module.exports = reject; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/size.js deleted file mode 100644 index 244e33e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/size.js +++ /dev/null @@ -1,19 +0,0 @@ -var isArray = require('../lang/isArray'); -var objSize = require('../object/size'); - - /** - * Get collection size - */ - function size(list) { - if (!list) { - return 0; - } - if (isArray(list)) { - return list.length; - } - return objSize(list); - } - - module.exports = size; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/some.js deleted file mode 100644 index 48fd252e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/collection/some.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrSome = require('../array/some'); -var objSome = require('../object/some'); - - /** - */ - module.exports = make(arrSome, objSome); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date.js deleted file mode 100644 index 1cde1a95..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date.js +++ /dev/null @@ -1,21 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'dayOfTheYear' : require('./date/dayOfTheYear'), - 'diff' : require('./date/diff'), - 'i18n_' : require('./date/i18n_'), - 'isLeapYear' : require('./date/isLeapYear'), - 'isSame' : require('./date/isSame'), - 'parseIso' : require('./date/parseIso'), - 'startOf' : require('./date/startOf'), - 'strftime' : require('./date/strftime'), - 'timezoneAbbr' : require('./date/timezoneAbbr'), - 'timezoneOffset' : require('./date/timezoneOffset'), - 'totalDaysInMonth' : require('./date/totalDaysInMonth'), - 'totalDaysInYear' : require('./date/totalDaysInYear'), - 'weekOfTheYear' : require('./date/weekOfTheYear') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/dayOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/dayOfTheYear.js deleted file mode 100644 index 85905c5a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/dayOfTheYear.js +++ /dev/null @@ -1,13 +0,0 @@ -var isDate = require('../lang/isDate'); - - /** - * return the day of the year (1..366) - */ - function dayOfTheYear(date){ - return (Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) - - Date.UTC(date.getFullYear(), 0, 1)) / 86400000 + 1; - } - - module.exports = dayOfTheYear; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/diff.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/diff.js deleted file mode 100644 index 1131cdcb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/diff.js +++ /dev/null @@ -1,130 +0,0 @@ -var totalDaysInMonth = require('./totalDaysInMonth'); -var totalDaysInYear = require('./totalDaysInYear'); -var convert = require('../time/convert'); - - /** - * calculate the difference between dates (range) - */ - function diff(start, end, unitName){ - // sort the dates to make it easier to process (specially year/month) - if (start > end) { - var swap = start; - start = end; - end = swap; - } - - var output; - - if (unitName === 'month') { - output = getMonthsDiff(start, end); - } else if (unitName === 'year'){ - output = getYearsDiff(start, end); - } else if (unitName != null) { - if (unitName === 'day') { - // ignore timezone difference because of daylight savings time - start = toUtc(start); - end = toUtc(end); - } - output = convert(end - start, 'ms', unitName); - } else { - output = end - start; - } - - return output; - } - - - function toUtc(d){ - // we ignore timezone differences on purpose because of daylight - // savings time, otherwise it would return fractional days/weeks even - // if a full day elapsed. eg: - // Wed Feb 12 2014 00:00:00 GMT-0200 (BRST) - // Sun Feb 16 2014 00:00:00 GMT-0300 (BRT) - // diff should be 4 days and not 4.041666666666667 - return Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), - d.getHours(), d.getMinutes(), d.getSeconds(), - d.getMilliseconds()); - } - - - function getMonthsDiff(start, end){ - return getElapsedMonths(start, end) + - getElapsedYears(start, end) * 12 + - getFractionalMonth(start, end); - } - - - function getYearsDiff(start, end){ - var elapsedYears = getElapsedYears(start, end); - return elapsedYears + getFractionalYear(start, end, elapsedYears); - } - - - function getElapsedMonths(start, end){ - var monthDiff = end.getMonth() - start.getMonth(); - if (monthDiff < 0) { - monthDiff += 12; - } - // less than a full month - if (start.getDate() > end.getDate()) { - monthDiff -= 1; - } - return monthDiff; - } - - - function getElapsedYears(start, end){ - var yearDiff = end.getFullYear() - start.getFullYear(); - // less than a full year - if (start.getMonth() > end.getMonth()) { - yearDiff -= 1; - } - return yearDiff; - } - - - function getFractionalMonth(start, end){ - var fractionalDiff = 0; - var startDay = start.getDate(); - var endDay = end.getDate(); - - if (startDay !== endDay) { - var startTotalDays = totalDaysInMonth(start); - var endTotalDays = totalDaysInMonth(end); - var totalDays; - var daysElapsed; - - if (startDay > endDay) { - // eg: Jan 29 - Feb 27 (29 days elapsed but not a full month) - var baseDay = startTotalDays - startDay; - daysElapsed = endDay + baseDay; - // total days should be relative to 1st day of next month if - // startDay > endTotalDays - totalDays = (startDay > endTotalDays)? - endTotalDays + baseDay + 1 : startDay + baseDay; - } else { - // fractional is only based on endMonth eg: Jan 12 - Feb 18 - // (6 fractional days, 28 days until next full month) - daysElapsed = endDay - startDay; - totalDays = endTotalDays; - } - - fractionalDiff = daysElapsed / totalDays; - } - - return fractionalDiff; - } - - - function getFractionalYear(start, end, elapsedYears){ - var base = elapsedYears? - new Date(end.getFullYear(), start.getMonth(), start.getDate()) : - start; - var elapsedDays = diff(base, end, 'day'); - return elapsedDays / totalDaysInYear(end); - } - - - module.exports = diff; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/i18n/de-DE.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/i18n/de-DE.js deleted file mode 100644 index b3ab6207..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/i18n/de-DE.js +++ /dev/null @@ -1,61 +0,0 @@ - - // de-DE (German) - module.exports = { - "am" : "", - "pm" : "", - - "x": "%d/%m/%y", - "X": "%H:%M:%S", - "c": "%a %d %b %Y %H:%M:%S %Z", - - "months" : [ - "Januar", - "Februar", - "März", - "April", - "Mai", - "Juni", - "Juli", - "August", - "September", - "Oktober", - "November", - "Dezember" - ], - - "months_abbr" : [ - "Jan", - "Febr", - "März", - "Apr", - "Mai", - "Juni", - "Juli", - "Aug", - "Sept", - "Okt", - "Nov", - "Dez" - ], - - "days" : [ - "Sonntag", - "Montag", - "Dienstag", - "Mittwoch", - "Donnerstag", - "Freitag", - "Samstag" - ], - - "days_abbr" : [ - "So", - "Mo", - "Di", - "Mi", - "Do", - "Fr", - "Sa" - ] - }; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/i18n/en-US.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/i18n/en-US.js deleted file mode 100644 index f9526ce4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/i18n/en-US.js +++ /dev/null @@ -1,61 +0,0 @@ - - // en-US (English, United States) - module.exports = { - "am" : "AM", - "pm" : "PM", - - "x": "%m/%d/%y", - "X": "%H:%M:%S", - "c": "%a %d %b %Y %I:%M:%S %p %Z", - - "months" : [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" - ], - - "months_abbr" : [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" - ], - - "days" : [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" - ], - - "days_abbr" : [ - "Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat" - ] - }; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/i18n/pt-BR.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/i18n/pt-BR.js deleted file mode 100644 index 71ebadb5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/i18n/pt-BR.js +++ /dev/null @@ -1,61 +0,0 @@ - - // pt-BR (Brazillian Portuguese) - module.exports = { - "am" : "", - "pm" : "", - - "x": "%d/%m/%y", - "X": "%H:%M:%S", - "c": "%a %d %b %Y %H:%M:%S %Z", - - "months" : [ - "Janeiro", - "Fevereiro", - "Março", - "Abril", - "Maio", - "Junho", - "Julho", - "Agosto", - "Setembro", - "Outubro", - "Novembro", - "Dezembro" - ], - - "months_abbr" : [ - "Jan", - "Fev", - "Mar", - "Abr", - "Mai", - "Jun", - "Jul", - "Ago", - "Set", - "Out", - "Nov", - "Dez" - ], - - "days" : [ - "Domingo", - "Segunda", - "Terça", - "Quarta", - "Quinta", - "Sexta", - "Sábado" - ], - - "days_abbr" : [ - "Dom", - "Seg", - "Ter", - "Qua", - "Qui", - "Sex", - "Sáb" - ] - }; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/i18n_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/i18n_.js deleted file mode 100644 index 723fc103..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/i18n_.js +++ /dev/null @@ -1,14 +0,0 @@ -var mixIn = require('../object/mixIn'); -var enUS = require('./i18n/en-US'); - - // we also use mixIn to make sure we don't affect the original locale - var activeLocale = mixIn({}, enUS, { - // we expose a "set" method to allow overriding the global locale - set : function(localeData){ - mixIn(activeLocale, localeData); - } - }); - - module.exports = activeLocale; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/isLeapYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/isLeapYear.js deleted file mode 100644 index 4212870b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/isLeapYear.js +++ /dev/null @@ -1,15 +0,0 @@ -var isDate = require('../lang/isDate'); - - /** - * checks if it's a leap year - */ - function isLeapYear(fullYear){ - if (isDate(fullYear)) { - fullYear = fullYear.getFullYear(); - } - return fullYear % 400 === 0 || (fullYear % 100 !== 0 && fullYear % 4 === 0); - } - - module.exports = isLeapYear; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/isSame.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/isSame.js deleted file mode 100644 index 4097d29b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/isSame.js +++ /dev/null @@ -1,16 +0,0 @@ -var startOf = require('./startOf'); - - /** - * Check if date is "same" with optional period - */ - function isSame(date1, date2, period){ - if (period) { - date1 = startOf(date1, period); - date2 = startOf(date2, period); - } - return Number(date1) === Number(date2); - } - - module.exports = isSame; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/parseIso.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/parseIso.js deleted file mode 100644 index 40a70a88..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/parseIso.js +++ /dev/null @@ -1,146 +0,0 @@ -var some = require('../array/some'); - - var datePatterns = [ - /^([0-9]{4})$/, // YYYY - /^([0-9]{4})-([0-9]{2})$/, // YYYY-MM (YYYYMM not allowed) - /^([0-9]{4})-?([0-9]{2})-?([0-9]{2})$/ // YYYY-MM-DD or YYYYMMDD - ]; - var ORD_DATE = /^([0-9]{4})-?([0-9]{3})$/; // YYYY-DDD - - var timePatterns = [ - /^([0-9]{2}(?:\.[0-9]*)?)$/, // HH.hh - /^([0-9]{2}):?([0-9]{2}(?:\.[0-9]*)?)$/, // HH:MM.mm - /^([0-9]{2}):?([0-9]{2}):?([0-9]{2}(\.[0-9]*)?)$/ // HH:MM:SS.ss - ]; - - var DATE_TIME = /^(.+)T(.+)$/; - var TIME_ZONE = /^(.+)([+\-])([0-9]{2}):?([0-9]{2})$/; - - function matchAll(str, patterns) { - var match; - var found = some(patterns, function(pattern) { - return !!(match = pattern.exec(str)); - }); - - return found ? match : null; - } - - function getDate(year, month, day) { - var date = new Date(Date.UTC(year, month, day)); - - // Explicitly set year to avoid Date.UTC making dates < 100 relative to - // 1900 - date.setUTCFullYear(year); - - var valid = - date.getUTCFullYear() === year && - date.getUTCMonth() === month && - date.getUTCDate() === day; - return valid ? +date : NaN; - } - - function parseOrdinalDate(str) { - var match = ORD_DATE.exec(str); - if (match ) { - var year = +match[1], - day = +match[2], - date = new Date(Date.UTC(year, 0, day)); - - if (date.getUTCFullYear() === year) { - return +date; - } - } - - return NaN; - } - - function parseDate(str) { - var match, year, month, day; - - match = matchAll(str, datePatterns); - if (match === null) { - // Ordinal dates are verified differently. - return parseOrdinalDate(str); - } - - year = (match[1] === void 0) ? 0 : +match[1]; - month = (match[2] === void 0) ? 0 : +match[2] - 1; - day = (match[3] === void 0) ? 1 : +match[3]; - - return getDate(year, month, day); - } - - function getTime(hr, min, sec) { - var valid = - (hr < 24 && hr >= 0 && - min < 60 && min >= 0 && - sec < 60 && min >= 0) || - (hr === 24 && min === 0 && sec === 0); - if (!valid) { - return NaN; - } - - return ((hr * 60 + min) * 60 + sec) * 1000; - } - - function parseOffset(str) { - var match; - if (str.charAt(str.length - 1) === 'Z') { - str = str.substring(0, str.length - 1); - } else { - match = TIME_ZONE.exec(str); - if (match) { - var hours = +match[3], - minutes = (match[4] === void 0) ? 0 : +match[4], - offset = getTime(hours, minutes, 0); - - if (match[2] === '-') { - offset *= -1; - } - - return { offset: offset, time: match[1] }; - } - } - - // No time zone specified, assume UTC - return { offset: 0, time: str }; - } - - function parseTime(str) { - var match; - var offset = parseOffset(str); - - str = offset.time; - offset = offset.offset; - if (isNaN(offset)) { - return NaN; - } - - match = matchAll(str, timePatterns); - if (match === null) { - return NaN; - } - - var hours = (match[1] === void 0) ? 0 : +match[1], - minutes = (match[2] === void 0) ? 0 : +match[2], - seconds = (match[3] === void 0) ? 0 : +match[3]; - - return getTime(hours, minutes, seconds) - offset; - } - - /** - * Parse an ISO8601 formatted date string, and return a Date object. - */ - function parseISO8601(str){ - var match = DATE_TIME.exec(str); - if (!match) { - // No time specified - return parseDate(str); - } - - return parseDate(match[1]) + parseTime(match[2]); - } - - module.exports = parseISO8601; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/startOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/startOf.js deleted file mode 100644 index 072bc0ef..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/startOf.js +++ /dev/null @@ -1,54 +0,0 @@ -var clone = require('../lang/clone'); - - /** - * get a new Date object representing start of period - */ - function startOf(date, period){ - date = clone(date); - - // intentionally removed "break" from switch since start of - // month/year/etc should also reset the following periods - switch (period) { - case 'year': - date.setMonth(0); - /* falls through */ - case 'month': - date.setDate(1); - /* falls through */ - case 'week': - case 'day': - date.setHours(0); - /* falls through */ - case 'hour': - date.setMinutes(0); - /* falls through */ - case 'minute': - date.setSeconds(0); - /* falls through */ - case 'second': - date.setMilliseconds(0); - break; - default: - throw new Error('"'+ period +'" is not a valid period'); - } - - // week is the only case that should reset the weekDay and maybe even - // overflow to previous month - if (period === 'week') { - var weekDay = date.getDay(); - var baseDate = date.getDate(); - if (weekDay) { - if (weekDay >= baseDate) { - //start of the week is on previous month - date.setDate(0); - } - date.setDate(date.getDate() - date.getDay()); - } - } - - return date; - } - - module.exports = startOf; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/strftime.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/strftime.js deleted file mode 100644 index f033d10f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/strftime.js +++ /dev/null @@ -1,118 +0,0 @@ -var pad = require('../number/pad'); -var i18n = require('./i18n_'); -var dayOfTheYear = require('./dayOfTheYear'); -var timezoneOffset = require('./timezoneOffset'); -var timezoneAbbr = require('./timezoneAbbr'); -var weekOfTheYear = require('./weekOfTheYear'); - - var _combinations = { - 'D': '%m/%d/%y', - 'F': '%Y-%m-%d', - 'r': '%I:%M:%S %p', - 'R': '%H:%M', - 'T': '%H:%M:%S', - 'x': 'locale', - 'X': 'locale', - 'c': 'locale' - }; - - - /** - * format date based on strftime format - */ - function strftime(date, format, localeData){ - localeData = localeData || i18n; - var reToken = /%([a-z%])/gi; - - function makeIterator(fn) { - return function(match, token){ - return fn(date, token, localeData); - }; - } - - return format - .replace(reToken, makeIterator(expandCombinations)) - .replace(reToken, makeIterator(convertToken)); - } - - - function expandCombinations(date, token, l10n){ - if (token in _combinations) { - var expanded = _combinations[token]; - return expanded === 'locale'? l10n[token] : expanded; - } else { - return '%'+ token; - } - } - - - function convertToken(date, token, l10n){ - switch (token){ - case 'a': - return l10n.days_abbr[date.getDay()]; - case 'A': - return l10n.days[date.getDay()]; - case 'h': - case 'b': - return l10n.months_abbr[date.getMonth()]; - case 'B': - return l10n.months[date.getMonth()]; - case 'C': - return pad(Math.floor(date.getFullYear() / 100), 2); - case 'd': - return pad(date.getDate(), 2); - case 'e': - return pad(date.getDate(), 2, ' '); - case 'H': - return pad(date.getHours(), 2); - case 'I': - return pad(date.getHours() % 12, 2); - case 'j': - return pad(dayOfTheYear(date), 3); - case 'L': - return pad(date.getMilliseconds(), 3); - case 'm': - return pad(date.getMonth() + 1, 2); - case 'M': - return pad(date.getMinutes(), 2); - case 'n': - return '\n'; - case 'p': - return date.getHours() >= 12? l10n.pm : l10n.am; - case 'P': - return convertToken(date, 'p', l10n).toLowerCase(); - case 's': - return date.getTime() / 1000; - case 'S': - return pad(date.getSeconds(), 2); - case 't': - return '\t'; - case 'u': - var day = date.getDay(); - return day === 0? 7 : day; - case 'U': - return pad(weekOfTheYear(date), 2); - case 'w': - return date.getDay(); - case 'W': - return pad(weekOfTheYear(date, 1), 2); - case 'y': - return pad(date.getFullYear() % 100, 2); - case 'Y': - return pad(date.getFullYear(), 4); - case 'z': - return timezoneOffset(date); - case 'Z': - return timezoneAbbr(date); - case '%': - return '%'; - default: - // keep unrecognized tokens - return '%'+ token; - } - } - - - module.exports = strftime; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/timezoneAbbr.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/timezoneAbbr.js deleted file mode 100644 index b1006875..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/timezoneAbbr.js +++ /dev/null @@ -1,17 +0,0 @@ -var timezoneOffset = require('./timezoneOffset'); - - /** - * Abbreviated time zone name or similar information. - */ - function timezoneAbbr(date){ - // Date.toString gives different results depending on the - // browser/system so we fallback to timezone offset - // chrome: 'Mon Apr 08 2013 09:02:04 GMT-0300 (BRT)' - // IE: 'Mon Apr 8 09:02:04 UTC-0300 2013' - var tz = /\(([A-Z]{3,4})\)/.exec(date.toString()); - return tz? tz[1] : timezoneOffset(date); - } - - module.exports = timezoneAbbr; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/timezoneOffset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/timezoneOffset.js deleted file mode 100644 index 9492dceb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/timezoneOffset.js +++ /dev/null @@ -1,16 +0,0 @@ -var pad = require('../number/pad'); - - /** - * time zone as hour and minute offset from UTC (e.g. +0900) - */ - function timezoneOffset(date){ - var offset = date.getTimezoneOffset(); - var abs = Math.abs(offset); - var h = pad(Math.floor(abs / 60), 2); - var m = pad(abs % 60, 2); - return (offset > 0? '-' : '+') + h + m; - } - - module.exports = timezoneOffset; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/totalDaysInMonth.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/totalDaysInMonth.js deleted file mode 100644 index 8aafeb84..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/totalDaysInMonth.js +++ /dev/null @@ -1,25 +0,0 @@ -var isDate = require('../lang/isDate'); -var isLeapYear = require('./isLeapYear'); - - var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; - - /** - * returns the total amount of days in the month (considering leap years) - */ - function totalDaysInMonth(fullYear, monthIndex){ - if (isDate(fullYear)) { - var date = fullYear; - year = date.getFullYear(); - monthIndex = date.getMonth(); - } - - if (monthIndex === 1 && isLeapYear(fullYear)) { - return 29; - } else { - return DAYS_IN_MONTH[monthIndex]; - } - } - - module.exports = totalDaysInMonth; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/totalDaysInYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/totalDaysInYear.js deleted file mode 100644 index b4b7e9b7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/totalDaysInYear.js +++ /dev/null @@ -1,13 +0,0 @@ -var isLeapYear = require('./isLeapYear'); - - /** - * return the amount of days in the year following the gregorian calendar - * and leap years - */ - function totalDaysInYear(fullYear){ - return isLeapYear(fullYear)? 366 : 365; - } - - module.exports = totalDaysInYear; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/weekOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/weekOfTheYear.js deleted file mode 100644 index dd51b7f1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/date/weekOfTheYear.js +++ /dev/null @@ -1,16 +0,0 @@ -var dayOfTheYear = require('./dayOfTheYear'); - - /** - * Return the week of the year based on given firstDayOfWeek - */ - function weekOfTheYear(date, firstDayOfWeek){ - firstDayOfWeek = firstDayOfWeek == null? 0 : firstDayOfWeek; - var doy = dayOfTheYear(date); - var dow = (7 + date.getDay() - firstDayOfWeek) % 7; - var relativeWeekDay = 6 - firstDayOfWeek - dow; - return Math.floor((doy + relativeWeekDay) / 7); - } - - module.exports = weekOfTheYear; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/array.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/array.md deleted file mode 100644 index a81a50b5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/array.md +++ /dev/null @@ -1,781 +0,0 @@ -# array # - -Array utilities. - - - - -## append(arr1, arr2):Array - -Appends an array to the end of the other. -The first array will be modified and will contain the appended items. - -See: [`union()`](#union), [`combine()`](#combine) - -```js -var foo = ['a', 'b'], - bar = ['b', 'd']; - -append(foo, bar); // ['a', 'b', 'b', 'd'] -``` - - - -## collect(arr, callback, [thisObj]):Array - -Maps the items in `arr` and concatenates the resulting arrays. - -See: [`map()`](#map) - -```js -collect([1, 2, 3], function(val) { - return [val, val % 2]; -}); // [1, 1, 2, 0, 3, 1]; - -collect(['a', 'bb', ''], function(val) { - return val.split(''); -}); // ['a', 'b', 'b'] -``` - -It also supports a shorthand syntax: - -```js -var items = [{ a: [1] }, { b: 'foo' }, { a: [2, 3] }]; -collect(items, 'a'); // [1, 2, 3]; -``` - - - -## combine(arr1, arr2):Array - -Combines an array with all the items of another. -The first array will be modified and will contain the combined items. -Does not allow duplicates and is case and type sensitive. - -See: [`union()`](#union), [`append()`](#append) - -```js -var foo = ['a', 'b'], - bar = ['b', 'd']; - -combine(foo, bar); // ['a', 'b', 'd'] -``` - - - -## compact(arr):Array - -Returns a new Array without any `null` or `undefined` values. Note that it will -keep empty strings and other falsy values (simillar to Ruby Array#compact). - -```js -var arr = [0, 1, null, false, '', 'foo', undefined, 'bar']; -compact(arr); // [0, 1, false, '', 'foo', 'bar']; -``` - - - -## contains(arr, value):Boolean - -Checks if Array contains value. Alias to `indexOf(arr, val) !== -1`. - -```js -var arr = [1, 2, 3]; -contains(arr, 2); // true -contains(arr, 'foo'); // false -``` - - - -## difference(...arrs):Array - -Return a new Array with elements that aren't present in the other Arrays -besides the first one. - -Works like [Python set#difference](http://docs.python.org/library/stdtypes.html#set.difference). - -It will remove duplicates. - -See: [`xor()`](#xor), [`intersection()`](#intersection) - -```js -var a = ['a', 'b', 1]; -var b = ['c', 1]; -difference(a, b); // ['a', 'b'] -``` - - - -## every(arr, callback, [thisObj]):Array - -Crossbrowser `Array.every()`. - -Tests whether all elements in the array pass the test implemented by the provided function. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -```js -var items = [1, 'foo', 'bar']; -every(items, isString); // false -every(items, isFunction); // false -every(items, function(val, key, arr){ - return val != null; -}); // true -``` - -more info at [MDN Array#every](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every) - -It also supports a shorthand syntax: - -```js -var items = [{id:1, active:true}, {id:3, active:true}, {id:8, active:true}]; -// all items with `id === 8` -every(items, {id:8}); // false -// `active` is truthy on all items -every(items, 'active'); // true -``` - - - -## filter(arr, callback, [thisObj]):Array - -Crossbrowser `Array.filter()`. - -Creates a new array with all elements that pass the callback test. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -```js -var nums = [1, 2, 3, 4, 5, 6]; -var oddNumbers = filter(nums, function(val, key, arr){ - return (val % 2) !== 0; -}); -// > [1, 3, 5] -``` - -more info at [MDN Array#filter](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/filter) - -Filter also supports shorthand notation: - -```js -var users = [ - {name:'john', surname:'connor', beard:false}, - {name:'john', surname:'doe', beard:true}, - {name:'jane', surname:'doe', beard:false} -]; -// filter item that matches all properties/values pairs -filter(arr, {name:'john', beard:false}); -// > [{name:'john', surnname:'connor', beard:false}] -// items where 'beard' is a truthy value -filter(arr, 'beard'); -// > [{name:'john', surnname:'doe', beard:true}] -``` - -See [`reject()`](#reject) - - - -## find(arr, callback, [thisObj]):void - -Loops through all the items in the Array and returns the first one that passes -a truth test (callback). - -```js -var arr = [123, {a:'b'}, 'foo', 'bar']; -find(arr, isString); // "foo" -find(arr, isNumber); // 123 -find(arr, isObject); // {a:'b'} -``` - -Find also supports shorthand notation: - -```js -var users = [ - {name:'john', surname:'connor', beard:false}, - {name:'john', surname:'doe', beard:true} -]; -// first item that matches all properties/values pairs -find(arr, {name:'john'}); // {name:'john', surnname:'connor', beard:false} -// first item where 'beard' is a truthy value -find(arr, 'beard'); // {name:'john', surnname:'doe', beard:true} -``` - -See: [findIndex()](#findIndex) - - - -## findIndex(arr, iterator, [thisObj]):Number - -Loops through the items in the Array and returns the index of the first one -that passes a truth test (callback). - -Returns `-1` if no item was found that passes the truth test. - -```js -var arr = [1, { a: 1 }, 'foo', 'bar']; -findIndex(arr, isString); // 2 -findIndex(arr, isNumber); // 0 -findIndex(arr, isObject); // 1 -findIndex(arr, isRegExp); // -1 -``` - -`findIndex` also supports shorthand notation: - -```js -var pets = [ - { pet: 'dog', name: 'Sam' }, - { pet: 'dog', name: 'Maggie' } -]; - -findIndex(pets, { pet: 'dog' }); // 0 -findIndex(pets, { name: 'Maggie' }); // 1 -``` - -See: [find()](#find) - - - -## flatten(arr, [level]):Array - -Recursively flattens an array. A new array containing all the elements is -returned. If `level` is specified, it will only flatten up to that level. - -### Example - -```js -flatten([1, [2], [3, [4, 5]]]); -// > [1, 2, 3, 4, 5] -flatten([1, [2], [3, [4, 5]]], 1); -// > [1, 2, 3, [4, 5]] -``` - - - -## forEach(arr, callback, [thisObj]):void - -Crossbrowser `Array.forEach()`. - -It allows exiting the iteration early by returning `false` on the callback. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -```js -var items = ['foo', 'bar', 'lorem', 'ipsum']; -forEach(items, function(val, key, arr){ - console.log(key +' : '+ val); - if (val === 'lorem') { - // stop iteration (break) - return false; - } -}); -``` - -more info at [MDN Array#forEach](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/forEach) - - - -## indexOf(arr, item, [fromIndex]):Number - -Crossbrowser `Array.indexOf()`. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -more info at [MDN Array#indexOf](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf) - - - - -## insert(arr, ...items):Number - -Push items into array only if they aren't contained by it. Returns the new -`length` of the array. - -See: [`remove()`](#remove), [`removeAll()`](#removeAll), -[`contains()`](#contains) - -```js -var arr = ['a', 'b']; -insert(arr, 'a'); // 2 : ['a', 'b'] -insert(arr, 'c'); // 3 : ['a', 'b', 'c'] -insert(arr, 1, 2, 'b'); // 5 : ['a', 'b', 'c', 1, 2] -``` - - - -## intersection(...arrs):Array - -Return a new Array with elements common to all Arrays. - -Similar to Python set#intersection and underscore.js intersection. - -It will remove duplicates. - -See: [`difference()`](#difference), [`xor()`](#xor) - -```js -var a = ['a', 'b', 1], - b = ['c', 1], - c = [1, 2, 3]; -intersection(a, b, c); // [1] -``` - - - -## invoke(arr, methodName[, ...args]):Array - -Call `methodName` on each item of the array passing custom arguments if needed. - -```js -invoke([[3,2,1], [9,5,2]], 'sort'); // [[1,2,3], [2,5,9]] -``` - - - -## join(arr, [separator]):String - -Joins the strings in `arr`, inserting `separator` between each value. - -This ignores null values and empty strings that are in the array. `separator` -defaults to an empty string. This will convert all non-string objects in the -array to a string. - -### Example - -```js -join(['a', 'b', 'c']); // 'abc' -join(['foo', 'bar'], ', '); // 'foo, bar' -join([null, 'foo', '', 'bar', undefined], ':'); // 'foo:bar' -``` - - - -## lastIndexOf(arr, item, [fromIndex]):Number - -Crossbrowser `Array.lastIndexOf()`. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -more info at [MDN Array#lastIndexOf](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf) - - - -## map(arr, callback, [thisObj]]):Array - -Crossbrowser `Array.map()`. - -Creates a new array with the results of calling a provided function on every -element in this array. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -See: [`collect()`](#collect) - -```js -var nums = [1,2,3,4]; -var double = map(nums, function(val, key, arr){ - return val * 2; -}); -// > [2, 4, 6, 8] -``` - -more info at [MDN Array#map](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/map) - -It also supports a shorthand notation which can be used to achieve same result -as [`array/pluck`](#pluck): - -```js -var src = ['lorem', 'ipsum', 'foo', 'amet']; -// grab the "length" property of all items -var lengths = map(src, 'length'); // [5, 5, 3, 4] -``` - - - -## max(arr, [iterator], [thisObj]):* - -Returns maximum value inside array or use a custom iterator to define how items -should be compared. - -See: [`min()`](#min) - -```js -max([10, 2, 7]); // 10 -max(['foo', 'lorem', 'amet'], function(val){ - return val.length; -}); // 'lorem' -``` - -It also supports a shorthand notation: - -```js -max(['foo', 'lorem', 'amet'], 'length'); // "lorem" -``` - - - -## min(arr, [iterator], [thisObj]):* - -Returns minimum value inside array or use a custom iterator to define how items -should be compared. - -See: [`max()`](#max) - -```js -min([10, 2, 7]); // 2 -min(['foo', 'lorem', 'amet'], function(val){ - return val.length; -}); // 'foo' -``` - -It also supports a shorthand notation: - -```js -min(['foo', 'lorem', 'amet'], 'length'); // "foo" -``` - - - -## pick(arr, [nItems]):* - -Gets random item(s) and removes it from the original array. - -If `nItems` is specified it will return a new Array contained the *picked* -items otherwise it returns a single item. - -See: [`random/choice()`](./random.html#choice) - -### Example: - -```js -var arr = [1, 2, 3, 4, 5, 6]; -var item1 = pick(arr); // 4 -var item2 = pick(arr); // 1 -var items = pick(arr, 2); // [5, 2] -console.log(arr); // [3, 6] -``` - - - -## pluck(arr, propName):Array - -Extract a list of property values. - -See: [`function/prop()`](function.html#prop) - -```js -var users = [{name : 'John', age: 21}, {name: 'Jane', age : 27}]; -var names = pluck(users, 'name'); // ["John", "Jane"] -var ages = pluck(users, 'age'); // [21, 27] -``` - - - -## range([start], stop[, step]):Array - -Creates a new Array with all the values inside the range. Works similarly to -Python#range or PHP#range. - -### Arguments - - 1. `[start]` (Number) : Range start. Default is `0`. - 2. `stop` (Number) : Range limit. - 3. `[step]` (Number) : Step size. Default is `1`. - -### Example - -```js -range(5); // [0, 1, 2, 3, 4, 5] -range(0, 5); // [0, 1, 2, 3, 4, 5] -range(0, 5, 2); // [0, 2, 4] -range(20, 40, 5); // [20, 25, 30, 35, 40] -``` - - - -## reduce(arr, fn):* - -Crossbrowser `Array.reduce()`. - -Apply a function against an accumulator and each value of the array (from -left-to-right) as to reduce it to a single value. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -more info at [MDN Array#reduce](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduce) - - - -## reduceRight(arr, fn):* - -Crossbrowser `Array.reduceRight()`. - -Apply a function simultaneously against two values of the array (from -right-to-left) as to reduce it to a single value. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -more info at [MDN Array#reduceRight](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduceRight) - - - -## reject(arr, fn, thisObj):Array - -Creates a new array with all the elements that do **not** pass the truth test. -Opposite of [`filter()`](#filter). - -See [`filter()`](#filter) - -### Example - -```js -var numbers = [1, 2, 3, 4, 5, 6]; -reject(numbers, function(x) { return (x % 2) !== 0; }); // [2, 4, 6] -``` - -It also supports a shorthand syntax: - -```js -var users = [ - {name:'john', surname:'connor', beard:false}, - {name:'john', surname:'doe', beard:true}, - {name:'jane', surname:'doe', beard:false} -]; -// reject items that matches all properties/values pairs -reject(arr, {name:'john'}); -// > [{name:'jane', surnname:'doe', beard:false}] -// reject items where 'beard' is a truthy value -filter(arr, 'beard'); -// > [{name:'john', surnname:'connor', beard:false}, -// {name:'jane', surname:'doe', beard:false}] -``` - - - -## remove(arr, item):void - -Remove a single item from the array. - -IMPORTANT: it won't remove duplicates, just a single item. - -### Example - -```js -var foo = [1, 2, 3, 4]; -remove(foo, 2); -console.log(foo); // [1, 3, 4] -``` - - - -## removeAll(arr, item):void - -Remove all instances of an item from the array. - -### Example - -```js -var foo = [1, 2, 3, 4, 2, 2]; -removeAll(foo, 2); -console.log(foo); // [1, 3, 4]; -``` - - - -## shuffle(arr):Array - -Returns a new Array with items randomly sorted (shuffled). Similar to Ruby Array#shuffle. - -### Example - -```js -var arr = ['a', 'b', 'c', 'd', 'e']; -shuffle(arr); // ['b', 'd', 'e', 'c', 'a'] -``` - - - -## some(arr, callback, [thisObj]):Array - -Crossbrowser `Array.some()`. - -Tests whether some element in the array passes the test implemented by the provided function. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -```js -var items = [1, 'foo', 'bar']; -some(items, isString); // true -some(items, isFunction); // false -``` - -more info at [MDN Array#some](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some) - -It also supports a shorthand syntax: - -```js -var items = [{id:1, active:true}, {id:3, active:false}, {id:8, active:false}]; -// at least one item with `id === 8` -some(items, {id:8}); // true -// `active` is truthy on at least one item -some(items, 'active'); // true -``` - -see also: [`object/matches`](object.html#matches) - - - -## sort(arr, [compareFn]):Array - -Returns a sorted Array using the [Merge Sort](http://en.wikipedia.org/wiki/Merge_sort) algorithm (stable sort). - -The `Array.prototype.sort` browser implementations differ since the sorting algorithm isn't described in the ES spec - [in V8 it isn't stable](http://code.google.com/p/v8/issues/detail?id=90) and [on Firefox it is stable](https://bugzilla.mozilla.org/show_bug.cgi?id=224128) - so this function doesn't use the browser native implementation and is recommended in cases where a stable sort is required (items should preserve same order if already sorted). - -**Important:** It does logical comparisson by default (greater/less than) and -not a string comparisson like the native `Array#sort`. - -### compareFn - -If `compareFn` is supplied elements are sorted based on the value returned by -the `compareFn`. - - - If `compareFn(a, b)` is less than `0`, sort `a` to a lower index than `b`. - - If `compareFn(a, b)` returns `0`, leave `a` and `b` unchanged with respect - to each other, but sorted with respect to all different elements. - - If `compareFn(a, b)` is greater than `0`, sort `b` to a lower index than - `a`. - -### Example - -```js -sort([187, 23, 47, 987, 12, 59, 0]); // [0, 12, 23, 47, 59, 187, 987] -sort(['a', 'z', 'c', 'beta', 'b']); // ['a', 'b', 'beta', 'c', 'z'] - -// ['sit', 'amet', 'lorem', 'ipsum'] -sort(['lorem', 'ipsum', 'sit', 'amet'], function(a, b){ - // sort by length, items with same length - // will keep the relative order (stable) - return a.length - b.length; -}); - -// [4, 3, 2, 1] -sort([2, 3, 1, 4], function(a, b){ - // reverse sort - return b - a; -}); -``` - - - -## split(arr, [segments]):Array - -Splits an array into a fixed number of segments. - -The number of segments is specified by `segments` and defaults to 2. If the -array cannot be evenly split, the first segments will contain the extra items. -If `arr` is empty, an empty array is returned. If `arr.length` is less than -`segments`, then the resulting array will have `arr.length` number of -single-element arrays. - -### Example -```js -split([1, 2, 3, 4, 5], 3) // [ [1, 2], [3, 4], [5] ] -split([1, 2, 3, 4, 5]) // [ [1, 2, 3], [4, 5] ] -split([]) // [] -split([1, 2], 3) // [ [1], [2] ] -``` - - - -## toLookup(arr, key):Object - -Create an object that indexes the items in the array by a key. If `key` is a function, the key for each value in the resulting object will be the result of calling the function with the value as an argument. Otherwise `key` specifies the property on each value to use as the key. - -### Example - -```js -var foo = [{ name: 'a', thing: 1 }, { name: 'b', thing: 2 }]; -// { a: { name: 'a', thing: 1 }, b: { name: 'b', thing: 2 } } -toLookup(foo, 'name'); -// same as above -toLookup(foo, function (value) { return value.name; }); -``` - - - -## union(...arrs):Array - -Concat multiple arrays removing duplicates. - -```js -var a = ['a', 'b'], - b = ['c', 'a'], - c = [1, 'b', 2, 3, 'a']; - -//note that unique remove from begin to end -union(a, b, c); // ['c', 1, 'b', 2, 3, 'a'] -``` - - - -## unique(arr):Array - -Return a new Array of unique items. - -### Example - -```js -var foo = [1, 2, 3, 4, 2, 2, 3, 4]; -var bar = unique(foo); -console.log(foo); // [1, 2, 3, 4]; -``` - - - -## xor(arr1, arr2):Array - -Exclusive OR. Returns items that are present in a single array. - -Works like [Python set#symmetric_difference](http://docs.python.org/library/stdtypes.html#set.symmetric_difference) renamed for brevity. - -It will remove duplicates. - -See: [`difference()`](#difference), [`intersection()`](#intersection) - -```js -var a = ['a', 'b', 1]; -var b = ['c', 1]; -xor(a, b); // ['a', 'b', 'c'] -``` - - - -## zip(...arrs):Array - -Groups the elements of each array at their corresponding indexes. - -Useful for separate data sources that are coordinated through matching array -indexes. For a matrix of nested arrays, `zip.apply(...)` can transpose the -matrix in a similar fashion. - -```js -// [['moe', 30, true], ['larry', 40, false], ['curly', 50, false]] -zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]); -``` - - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/collection.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/collection.md deleted file mode 100644 index 2ffcab10..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/collection.md +++ /dev/null @@ -1,233 +0,0 @@ -# collection # - -Methods for dealing with collections (Array or Objects). - - - -## contains(list, value):Boolean - -Checks if collection contains value. - -```js -contains({a: 1, b: 2, c: 'bar'}, 2); // true -contains([1, 2, 3], 'foo'); // false -``` - -See: [array/contains](array.html#contains), [object/contains](object.html#contains) - - - -## every(list, callback, [thisObj]):Boolean - -Tests whether all values in the collection pass the test implemented by the -provided callback. - -```js -var obj = { - a: 1, - b: 2, - c: 3, - d: 'string' -}; - -every(obj, isNumber); // false -``` - -See: [array/every](array.html#every), [object/every](object.html#every) - - - -## filter(list, callback, [thisObj]):Array - -Filter collection properties. - -See: [array/filter](array.html#filter), [object/filter](object.html#filter) - - - -## find(list, callback, [thisObj]):* - -Loops through all the values in the collection and returns the first one that -passes a truth test (callback). - -**Important:** loop order over objects properties isn't guaranteed to be the -same on all environments. - -```js -find({a: 'foo', b: 12}, isString); // 'foo' -find(['foo', 12], isNumber); // 12 -``` - -See: [array/find](array.html#find), [object/find](object.html#find) - - - -## forEach(list, callback, [thisObj]) - -Loop through all values of the collection. - -See: [array/forEach](array.html#forEach), [object/forOwn](object.html#forOwn) - - - -## map(list, callback, [thisObj]):Array - -Returns a new collection where the properties values are the result of calling -the callback for each property in the original collection. - -See: [array/map](array.html#map), [object/map](object.html#map) - - - -## max(list, [iterator]):* - -Returns maximum value inside collection or use a custom iterator to define how -items should be compared. - -See: [`min()`](#min), [array/max](array.html#max), [object/max](object.html#max) - -```js -max({a: 100, b: 2, c: 1, d: 3, e: 200}); // 200 -max(['foo', 'lorem', 'amet'], function(val){ - return val.length; -}); // 'lorem' -``` - - - -## min(list, [iterator]):* - -Returns minimum value inside collection or use a custom iterator to define how -items should be compared. - -See: [`max()`](#max), [array/min](array.html#min), [object/min](object.html#min) - -```js -min([10, 2, 7]); // 2 -min({a: 'foo', b: 'lorem', c: 'amet'}, function(val){ - return val.length; -}); // 'foo' -``` - - - -## pluck(list, propName):Array - -Extract a list of property values. - -```js -var users = [ - { - name : 'John', - age : 21 - }, - { - name : 'Jane', - age : 27 - } -]; - -pluck(users, 'name'); // ["John", "Jane"] -pluck(users, 'age'); // [21, 27] - -users = { - first: { - name : 'John', - age : 21 - }, - second: { - name : 'Mary', - age : 25 - } -}; - -pluck(users, 'name'); // ['John', 'Mary'] -``` - -See: [array/pluck](array.html#pluck), [object/pluck](object.html#pluck) - - - -## reduce(list, callback, initial, [thisObj]):* - -Apply a function against an accumulator and each value in the collection as to -reduce it to a single value. - -```js -var obj = {a: 1, b: 2, c: 3, d: 4}; - -function sum(prev, cur, key, list) { - return prev + cur; -} - -reduce(obj, sum); // 10 -``` - -See: [array/reduce](array.html#reduce), [object/reduce](object.html#reduce) - - - -## reject(list, fn, [thisObj]):Array - -Creates a new array with all the elements that do **not** pass the truth test. -Opposite of [`filter()`](#filter). - -### Example - -```js -var numbers = [1, 2, 3, 4, 5]; -reject(numbers, function(x) { return (x % 2) !== 0; }); // [2, 4] - -var obj = {a: 1, b: 2, c: 3, d: 4, e: 5}; -reject(obj, function(x) { return (x % 2) !== 0; }); // [2, 4] -``` - -See: [array/reject](array.html#reject), [object/reject](object.html#reject) - - - -## size(list):Number - -Returns the number of values in the collection. - -```js -var obj = { - foo : 1, - bar : 2, - lorem : 3 -}; -size(obj); // 3 -size([1,2,3]); // 3 -size(null); // 0 -``` - -See: [object/size](object.html#size) - - - -## some(list, callback, [thisObj]):Boolean - -Tests whether any values in the collection pass the test implemented by the -provided callback. - -```js -var obj = { - a: 1, - b: 2, - c: 3, - d: 'string' -}; - -some(obj, isNumber); // true -some(obj, isString); // true -some([1, 2, 3], isNumber) // true -some([1, 2, 3], isString) // false -``` - -See: [array/some](array.html#some), [object/some](object.html#some) - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/date.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/date.md deleted file mode 100644 index b3f7f40e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/date.md +++ /dev/null @@ -1,295 +0,0 @@ -# date # - -Date utilities. - - -## dayOfTheYear(date):Number - -How many days elapsed since begining of the year (following gregorian -calendar). - -```js -// Jan 1st -dayOfTheYear(new Date(2013, 0, 1)); // 1 -// Dec 31th -dayOfTheYear(new Date(2013, 11, 31)); // 364 -``` - - - -## diff(date1, date2, [unitName]):Number - -Calculate the difference between dates (range). - -The returned value is always positive. The default `unitName` is `"ms"`. - -Available units: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`, -`millisecond`. - -See: [`time/convert()`](time.html#convert) - -```js -var d1 = new Date(2012, 4, 5); -var d2 = new Date(2013, 4, 8); -diff(d1, d2); // 31795200000 -diff(d1, d2, 'hour'); // 8832 -diff(d1, d2, 'week'); // 52.57142857142857 -diff(d1, d2, 'month'); // 12.096774193548388 -diff(d1, d2, 'year'); // 1.0082191780821919 -``` - - - -## isLeapYear(fullYear|date):Boolean - -Checks if it's a [leap year](http://en.wikipedia.org/wiki/Leap_year) according -to the Gregorian calendar. - -see: [`totalDaysInMonth()`](#totalDaysInMonth) - -```js -isLeapYear(2012); // true -isLeapYear(2013); // false -isLeapYear(new Date(2012, 2, 28)); // true -``` - - -## isSame(date1, date2[, period]):Boolean - -Check if both dates are the "same". - -You can pass an optional *period* used to set the comparisson precision. - -Available periods: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`. - -```js -var date1 = new Date(2013, 1, 3); -var date2 = new Date(2013, 2, 9); -isSame(date1, date2); // false -isSame(date1, date2, 'day'); // false -isSame(date1, date2, 'month'); // false -isSame(date1, date2, 'year'); // true -``` - - - -## parseIso(str):Number - -Parses an [ISO8601](http://en.wikipedia.org/wiki/Iso8601) date and returns the -number of milliseconds since January 1, 1970, 00:00:00 UTC, or `NaN` if it is -not a valid ISO8601 date. - -This parses *all* ISO8601 dates, including dates without times, [ordinal -dates](https://en.wikipedia.org/wiki/ISO_8601#Ordinal_dates), and the compact -representation (omitting delimeters). The only exception is [ISO week -dates](https://en.wikipedia.org/wiki/ISO_week_date), which are not parsed. - -If no time zone offset is specified, it assumes UTC time. - -```js -// Jan 01, 1970 00:00 GMT -parseIso('1970-01-01T00:00:00') // 0 -parseIso('1970-001') // 0 -parseIso('1970-01-01') // 0 -parseIso('19700101T000000.00') // 0 -parseIso('1970-01-01T02:00+02:00') // 0 - -// Jan 02, 2000 20:10 GMT+04:00 -parseIso('2000-01-02T20:10+04:00') // 946829400000 -``` - - - -## startOf(date, period):Date - -Get a new Date at the start of the period. - -Available periods: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`. - -```js -// Apr 05 2013 11:27:43 -var date = new Date(2013, 3, 5, 11, 27, 43, 123); -startOf(date, 'year'); // Jan 01 2013 00:00:00 -startOf(date, 'month'); // Apr 01 2013 00:00:00 -startOf(date, 'day'); // Apr 05 2013 00:00:00 -startOf(date, 'hour'); // Apr 05 2013 11:00:00 -``` - - - -## strftime(date, format, [l10n]):String - -Format date based on strftime format. - -Replaced tokens: - -<dl> -<dt>%a</dt><dd> locale's abbreviated weekday name.</dd> -<dt>%A</dt><dd> locale's full weekday name.</dd> -<dt>%b</dt><dd> locale's abbreviated month name.</dd> -<dt>%B</dt><dd> locale's full month name.</dd> -<dt>%c</dt><dd> locale's appropriate date and time representation.</dd> -<dt>%C</dt><dd> century number (the year divided by 100 and truncated -to an integer) as a decimal number [00..99].</dd> -<dt>%d</dt><dd> day of the month as a decimal number [01..31].</dd> -<dt>%D</dt><dd>same as %m/%d/%y.</dd> -<dt>%e</dt><dd> day of the month as a decimal number [1..31]; -a single digit is preceded by a space.</dd> -<dt>%F</dt><dd>The ISO 8601 date format (%Y-%m-%d)</dd> -<dt>%h</dt><dd>same as %b.</dd> -<dt>%H</dt><dd> hour (24-hour clock) as a decimal number [00..23].</dd> -<dt>%I</dt><dd> hour (12-hour clock) as a decimal number [01..12].</dd> -<dt>%j</dt><dd> day of the year as a decimal number [001..366].</dd> -<dt>%L</dt><dd> zero-padded milliseconds [000..999]</dd> -<dt>%m</dt><dd> month as a decimal number [01..12].</dd> -<dt>%M</dt><dd> minute as a decimal number [00..59].</dd> -<dt>%n</dt><dd> newline character.</dd> -<dt>%p</dt><dd> locale's equivalent of either "am" or "pm"</dd> -<dt>%P</dt><dd> locale's equivalent of either "AM" or "PM"</dd> -<dt>%r</dt><dd> time in a.m. and -p.m. notation; in the POSIX locale this is equivalent to %I:%M:%S %p.</dd> -<dt>%R</dt><dd> time in 24 hour notation (%H:%M).</dd> -<dt>%s</dt><dd> seconds since Epoch (1970-01-01 00:00:00 UTC)</dd> -<dt>%S</dt><dd> second as a decimal number [00..60].</dd> -<dt>%t</dt><dd> tab character.</dd> -<dt>%T</dt><dd> time (%H:%M:%S).</dd> -<dt>%u</dt><dd> weekday as a decimal number [1..7], with 1 representing -Monday.</dd> -<dt>%U</dt><dd> week number of the year (Sunday as the first day of -the week) as a decimal number [00..53].</dd> -<del><dt>%V</dt><dd> week number of the year (Monday as the first day of the -week) as a decimal number [01..53]. If the week containing 1 January has -four or more days in the new year, then it is considered week 1. Otherwise, -it is the last week of the previous year, and the next week is week 1.</dd></del> -<dt>%w</dt><dd> weekday as a decimal number [0..6], with 0 representing -Sunday.</dd> -<dt>%W</dt><dd> week number of the year (Monday as the first day of -the week) as a decimal number [00..53]. All days in a new year preceding -the first Monday are considered to be in week 0.</dd> -<dt>%x</dt><dd> locale's appropriate date representation.</dd> -<dt>%X</dt><dd> locale's appropriate time representation.</dd> -<dt>%y</dt><dd> year without century as a decimal number [00..99].</dd> -<dt>%Y</dt><dd> year with century as a decimal number.</dd> -<dt>%Z</dt><dd> timezone name or abbreviation, or by no bytes -if no timezone information exists.</dd> -<dt>%%</dt><dd>is replaced by %.</dd> -</dl> - -```js -var date = new Date(2013, 3, 8, 9, 2, 4); -strftime(date, '%Y-%m-%d'); // "2013-04-08" -strftime(date, '%R'); // "09:02" -strftime(date, '%Y-%m-%dT%H:%M:%S%z'); // "2013-04-08T09:02:04+0000" -``` - -You can also set a custom locale: - -```js -var ptBr = require('mout/date/i18n/pt-BR'); -strftime(date, '%a, %d %b', ptBr); // 'Seg, 08 Abr' -strftime(date, '%A, %d %B', ptBr); // 'Segunda, 08 Abril' -``` - -To set it globally: - -```js -require('mout/date/i18n_').set( customLocaleData ); -``` - -See [date/i18n](https://github.com/mout/mout/tree/master/src/date/i18n) -for localization examples. - - - -## timezoneAbbr(date):String - -Return timezone abbreviation or similar data. - -The result will vary based on the OS/browser since some environments doesn't -provide enough info about the current locale. - -```js -// IE 7-8 -timezoneAbbr(new Date()); // "-0500" -// Chrome, FF, V8 -timezoneAbbr(new Date()); // "EST" -``` - - - -## timezoneOffset(date):String - -Return time zone as hour and minute offset from UTC (e.g. +0900). - -It's important to note that JavaScript Date object will use the system locale -info to determinate the [timezone -offset](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset) -and that daylight saving time affects the result. - -```js -// if system locale is EST -timezoneOffset(new Date()); // -0500 -``` - - - -## totalDaysInMonth(fullYear, monthIndex):Number - -Returns the amount of days in the month taking into consideration leap years -(following Gregorian calendar). - -see: [`isLeapYear()`](#isLeapYear) - -```js -totalDaysInMonth(2008, 1); // 29 (leap year) -totalDaysInMonth(2009, 1); // 28 - -// you can also pass a Date object as single argument -totalDaysInMonth( new Date(2013, 0, 1) ); // 31 -``` - - -## totalDaysInYear(fullYear):Number - -Returns the amount of days in the year taking into consideration leap years -(following Gregorian calendar). - -see: [`isLeapYear()`](#isLeapYear), [`totalDaysInMonth()`](#totalDaysInMonth) - -```js -totalDaysInYear(2008); // 366 (leap year) -totalDaysInYear(2009); // 365 - -// you can also pass a Date object as single argument -totalDaysInYear( new Date(2013, 0, 1) ); // 365 -``` - - - -## weekOfTheYear(date, [firstDayOfWeek]):Number - -Returns how many weeks elapsed since start of the year (`0..53`). - -`firstDayOfWeek` can be `0` (Sunday) or `1` (Monday). By default weeks start at -Sunday. - -It will return `0` if `date` is before the first `firstDayOfWeek` of the year. - -```js -// Tue Jan 01 2013 -weekOfTheYear( new Date(2013,0,1) ); // 0 -// Wed Jan 09 2013 -weekOfTheYear( new Date(2013,0,9) ); // 1 -// Sun Jan 01 2012 -weekOfTheYear( new Date(2012,0,1) ); // 1 -// Mon Jan 09 2012 -weekOfTheYear( new Date(2012,0,9) ); // 2 -``` - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/function.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/function.md deleted file mode 100644 index f753744e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/function.md +++ /dev/null @@ -1,210 +0,0 @@ -# function # - -Function*(al)* utilities. - - - -## bind(fn, context, [...args]):Function - -Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. - -### Arguments - - 1. `fn` (Function) : Target Function - 2. `context` (Object) : Execution context (object used as `this`) - 3. `[...args]` (*) : Arguments (0...n arguments) - -See: [`partial()`](#partial), [object/bindAll](./object.html#bindAll) - - - -## compose(...fn):Function - -Returns the composition of a list of functions, where each function consumes -the return value of the function that follows. In math terms, composing the -functions `f()`, `g()`, and `h()` produces `f(g(h()))`. - -```js -function add2(x) { return x + 2 } -function multi2(x) { return x * 2 } -map([1, 2, 3], compose(add2, multi2)); // [4, 6, 8] - -//same as -map([1, 2, 3], function(x){ - return add2( multi2(x) ); -}); -``` - - - -## debounce(fn, delay[, isAsap]):Function - -Creates a function that will delay the execution of `fn` until after `delay` -milliseconds have elapsed since the last time it was invoked. - -Subsequent calls to the debounced function will return the result of the last -`fn` call. - -```js -// sometimes less is more -var lazyRedraw = debounce(redraw, 300); -foo.on.resize.add(lazyRedraw); -``` - -In this visualization, `|` is a debounced-function call and `X` is the actual -callback execution: - - Default - ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| - X X - - Debounced with `isAsap == true`: - ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| - X X - -You also have the option to cancel the debounced call if it didn't happen yet: - -```js -lazyRedraw(); -// lazyRedraw won't be called since `cancel` was called before the `delay` -lazyRedraw.cancel(); -``` - -See: [`throttle()`](#throttle) - - -## func(name):Function - -Returns a function that calls a method with given `name` on supplied object. -Useful for iteration methods like `array/map` and `array/forEach`. - -See: [`prop()`](#prop) - -```js -// will call the method `getName()` for each `user` -var names = map(users, func('getName')); -``` - - - -## partial(fn, [...args]):Function - -Return a partially applied function supplying default arguments. - -This method is similar to [`bind`](#bind), except it does not alter the this -binding. - -### Arguments - - 1. `fn` (Function) : Target Function - 2. `[...args]` (*) : Arguments (0...n arguments) - -See: [`bind()`](#bind) - -```js -function add(a, b){ return a + b } -var add10 = partial(add, 10); -console.log( add10(2) ); // 12 -``` - - - -## prop(name):Function - -Returns a function that gets a property with given `name` from supplied object. -Useful for using in conjunction with `array/map` and/or for creating getters. - -See: [`array/pluck()`](array.html#pluck) - -```js -var users = [{name:"John", age:21}, {name:"Jane", age:25}]; -// ["John", "Jane"] -var names = map(users, prop('name')); -``` - - - -## series(...fn):Function - -Returns a function that will execute all the supplied functions in order and -passing the same parameters to all of them. Useful for combining multiple -`array/forEach` into a single one and/or for debugging. - -```js -// call `console.log()` and `doStuff()` for each item item in the array -forEach(arr, series(console.log, doStuff)); -``` - - - -## throttle(fn, interval):Function - -Creates a function that, when executed, will only call the `fn` function at -most once per every `interval` milliseconds. - -If the throttled function is invoked more than once during the wait timeout, -`fn` will also be called on the trailing edge of the timeout. - -Subsequent calls to the throttled function will return the result of the last -`fn` call. - -```js -// sometimes less is more -var lazyRedraw = throttle(redraw, 300); -foo.on.resize.add(lazyRedraw); -``` - -In this visualization, `|` is a throttled-function call and `X` is the actual -`fn` execution: - - ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| - X X X X X X X X X X X X - -You also have the option to cancel the throttled call if it didn't happen yet: - -```js -lazyRedraw(); -setTimeout(function(){ - lazyRedraw(); - // lazyRedraw will be called only once since `cancel` was called before - // the `interval` for 2nd call completed - lazyRedraw.cancel(); -}, 250); -``` - -See: [`debounce()`](#debounce) - - -## timeout(fn, millis, context, [...args]):Number - -Functions as a wrapper for `setTimeout`. Calls a the function `fn` after a given delay `millis` in milliseconds. -The function is called within the specified context. The return value can be used to clear the timeout using `clearTimeout`. - -```js -var id = timeout(doStuff, 300, this); - -clearTimeout(id); -``` - -## times(n, callback, [context]):void - -Iterates over a callback `n` times. - -### Arguments - - 1. `n` (Number) : Number of iterations - 2. `callback` (Function) : Closure executed for every iteration - 3. `context` (Object) : Execution context (object used as `this`) - -```js -var output = ''; -times(5, function(i) { - output += i.toString(); -}); -// output: 01234 -``` - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/lang.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/lang.md deleted file mode 100644 index 8ad3928b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/lang.md +++ /dev/null @@ -1,464 +0,0 @@ -# lang # - -Language Utilities. Easier inheritance, scope handling, type checks. - - - -## clone(val):* - -Clone native types like Object, Array, RegExp, Date and primitives. - -This method will not clone values that are referenced within `val`. It will -only copy the value reference to the new value. If the value is not a plain -object but is an object, it will return the value unchanged. - -### Example - -```js -var a = { foo: 'bar' }; -var b = clone(a); -console.log(a === b); // false -console.log(a.foo === b.foo); // true - -var c = [1, 2, 3]; -var d = clone(b); -console.log(c === d); // false -console.log(c); // [1, 2, 3] -``` - -See: [`deepClone()`](#deepClone) - - - -## createObject(parent, [props]):Object - -Create Object using prototypal inheritance and setting custom properties. - -Mix between [Douglas Crockford Prototypal Inheritance](http://javascript.crockford.com/prototypal.html) and [`object/mixIn`](./object.html#mixIn). - -### Arguments - - 1. `parent` (Object) : Parent Object - 2. `[props]` (Object) : Object properties - -### Example - -```js -var base = { - trace : function(){ - console.log(this.name); - } -}; - -var myObj = createObject(base, { - name : 'Lorem Ipsum' -}); - -myObject.trace(); // "Lorem Ipsum" -``` - - - -## ctorApply(constructor, args):Object - -Do `Function.prototype.apply()` on a constructor while maintaining prototype -chain. - -```js -function Person(name, surname) { - this.name = name; - this.surname = surname; -} - -Person.prototype.walk = function(){ - console.log(this.name +' is walking'); -}; - -var args = ['John', 'Doe']; - -// "similar" effect as calling `new Person("John", "Doe")` -var john = ctorApply(Person, args); -john.walk(); // "John is walking" -``` - - - -## deepClone(val, [instanceClone]):* - -Deep clone native types like Object, Array, RegExp, Date and primitives. - -The `instanceClone` function will be invoked to clone objects that are not -"plain" objects (as defined by [`isPlainObject`](#isPlainObject)) if it is -provided. If `instanceClone` is not specified, it will not attempt to clone -non-plain objects, and will copy the object reference. - -### Example - -```js -var a = {foo:'bar', obj: {a:1, b:2}}; -var b = deepClone(a); // {foo:'bar', obj: {a:1, b:2}} -console.log( a === b ); // false -console.log( a.obj === b.obj ); // false - -var c = [1, 2, [3, 4]]; -var d = deepClone(c); // [1, 2, [3, 4]] -var e = c.concat(); // [1, 2, [3, 4]] - -console.log( c[2] === d[2] ); // false -// concat doesn't do a deep clone, arrays are passed by reference -console.log( e[2] === d[2] ); // true - -function Custom() { } -function cloneCustom(x) { return new Custom(); } -var f = { test: new Custom() }; -var g = deepClone(f, cloneCustom); -g.test === f.test // false, since new Custom instance will be created -``` - -See: [`clone()`](#clone) - - - -## defaults(val, ...defaults):void - -Return first value that isn't `null` or `undefined`. - - function doSomethingAwesome(foo, bar) { - // default arguments - foo = defaults(foo, 'lorem'); - bar = defaults(bar, 123); - // ... - } - - - -## inheritPrototype(childCtor, parentCtor):void - -Inherit the prototype methods from one constructor into another. - -Similar to [node.js util/inherits](http://nodejs.org/docs/latest/api/util.html#util_util_inherits_constructor_superconstructor). - -```js -function Foo(name){ - this.name = name; -} -Foo.prototype = { - getName : function(){ - return this.name; - } -}; - -function Bar(name){ - Foo.call(this, name); -} -//should be called before calling constructor -inheritPrototype(Bar, Foo); - -var myObj = new Bar('lorem ipsum'); -myObj.getName(); // "lorem ipsum" - -console.log(myObj instanceof Foo); // true - -// you also have access to the "super" constructor -console.log(Bar.super_ === Foo); // true -``` - - -## is(x, y):Boolean - -Check if both values are identical/egal. - -```js -// wtfjs -NaN === NaN; // false --0 === +0; // true - -is(NaN, NaN); // true -is(-0, +0); // false -is('a', 'b'); // false -``` - -See: [`isnt()`](#isnt) - - - -## isnt(x, y):Boolean - -Check if both values are not identical/egal. - -```js -// wtfjs -NaN === NaN; // false --0 === +0; // true - -isnt(NaN, NaN); // false -isnt(-0, +0); // true -isnt('a', 'b'); // true -``` - -See: [`is()`](#is) - - - - -## isArguments(val):Boolean - -If value is an "Arguments" object. - - - -## isArray(val):Boolean - -If value is an Array. Uses native ES5 `Array.isArray()` if available. - - - -## isBoolean(val):Boolean - -If value is a Boolean. - - - -## isDate(val):Boolean - -If value is a Date. - - - -## isEmpty(val):Boolean - -Checks if Array/Object/String is empty. - - -```js -isEmpty(''); // true -isEmpty('bar'); // false -isEmpty([]); // true -isEmpty([1, 2]); // false -isEmpty({}); // true -isEmpty({a:1, b:2}); // false -``` - - -## isFinite(val):Boolean - -Checks if value is Finite. - -**IMPORTANT:** This is not the same as native `isFinite`, which will return -`true` for values that can be coerced into finite numbers. See -http://es5.github.com/#x15.1.2.5. - -```js -isFinite(123); // true -isFinite(Infinity); // false - -// this is different than native behavior -isFinite(''); // false -isFinite(true); // false -isFinite([]); // false -isFinite(null); // false -``` - - -## isFunction(val):Boolean - -If value is a Function. - - - -## isKind(val, kind):Boolean - -If value is of "kind". (used internally by some of the *isSomething* checks). - -Favor the other methods since strings are commonly mistyped and also because -some "kinds" can only be accurately checked by using other methods (e.g. -`Arguments`), some of the other checks are also faster. - -```js -isKind([1,2], 'Array'); // true -isKind(3, 'Array'); // false -isKind(3, 'Number'); // true -``` - -See: [`kindOf()`](#kindOf) - - - -## isInteger(val):Boolean - -Check if value is an integer. - -```js -isInteger(123); // true -isInteger(123.45); // false -isInteger({}); // false -isInteger('foo'); // false -isInteger('123'); // false -``` - - - -## isNaN(val):Boolean - -Check if value is not a number. - -It doesn't coerce value into number before doing the check, giving better -results than native `isNaN`. Returns `true` for everything besides numeric -values. - -**IMPORTANT:** behavior is very different than the native `isNaN` and way more -useful!!! See: http://es5.github.io/#x15.1.2.4 - -```js -isNaN(123); // false - -isNaN(NaN); // true -isNaN({}); // true -isNaN(undefined); // true -isNaN([4,5]); // true - -// these are all "false" on native isNaN and main reason why this module exists -isNaN(''); // true -isNaN(null); // true -isNaN(true); // true -isNaN(false); // true -isNaN("123"); // true -isNaN([]); // true -isNaN([5]); // true -``` - - - -## isNull(val):Boolean - -If value is `null`. - - - -## isNumber(val):Boolean - -If value is a Number. - - - -## isObject(val):Boolean - -If value is an Object. - - - -## isPlainObject(val):Boolean - -If the value is an Object created by the Object constructor. - - - -## isRegExp(val):Boolean - -If value is a RegExp. - - - -## isString(val):Boolean - -If value is a String. - - - -## isUndefined(val):Boolean - -If value is `undefined`. - - - -## kindOf(val):String - -Gets kind of value (e.g. "String", "Number", "RegExp", "Null", "Date"). -Used internally by `isKind()` and most of the other *isSomething* checks. - -```js -kindOf([1,2]); // "Array" -kindOf('foo'); // "String" -kindOf(3); // "Number" -``` - -See: [`isKind()`](#isKind) - - -## toArray(val):Array - -Convert array-like object into Array or wrap value into Array. - -```js -toArray({ - "0" : "foo", - "1" : "bar", - "length" : 2 -}); // ["foo", "bar"] - -function foo(){ - return toArray(arguments); -} -foo("lorem", 123); // ["lorem", 123] - -toArray("lorem ipsum"); // ["lorem ipsum"] -toArray(window); // [window] -toArray({foo:"bar", lorem:123}); // [{foo:"bar", lorem:123}] -``` - -See: object/values() - - - -## toNumber(val):Number - -Convert value into number. - -```js -// numeric values are typecasted as Number -toNumber('123'); // 123 -toNumber(-567); // -567 - -// falsy values returns zero -toNumber(''); // 0 -toNumber(null); // 0 -toNumber(undefined); // 0 -toNumber(false); // 0 - -// non-numeric values returns NaN -toNumber('asd'); // NaN -toNumber({}); // NaN -toNumber([]); // NaN - -// Date objects return milliseconds since epoch -toNumber(new Date(1985, 6, 23)); // 490935600000 -``` - - - -## toString(val):String - -Convert any value to its string representation. - -Will return an empty string for `undefined` or `null`, otherwise will convert -the value to its string representation. - -```js -// null and undefined are converted into empty strings -toString(null); // "" -toString(undefined); // "" - -toString(1); // "1" -toString([1,2,3]); // "1,2,3" -toString(false); // "false" - -// uses `val.toString()` to convert value -toString({toString:funtion(){ return 'foo'; }}); // "foo" -``` - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/math.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/math.md deleted file mode 100644 index f45be3ed..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/math.md +++ /dev/null @@ -1,298 +0,0 @@ -# math # - -Math utilities. - - -## ceil(val[, step]):Number - -Round value up to full steps. Similar to `Math.ceil()` but can round value -to an arbitrary *radix*. - - ceil(7.2); // 8 - ceil(7.8); // 8 - ceil(7, 5); // 10 - ceil(11, 5); // 15 - ceil(15, 5); // 15 - -### Common use cases - -Round values by increments of 5/10/1000/etc. - -See: [`round()`](#round), [`floor()`](#floor), [`countSteps()`](#countSteps) - - - -## clamp(val, min, max):Number - -Clamps value inside range. - -`clamp()` is extremely useful in cases where you need to limit a value inside -a certain range. So instead of doing a complex `if/else` to filter/process the -value you can restrict it to always be inside the desired range: - - clamp(-5, 0, 10); // 0 - clamp(7, 1, 10); // 7 - clamp(8, 1, 10); // 8 - clamp(10, 1, 10); // 10 - clamp(11, 1, 10); // 10 - -If the value is smaller than `min` it returns the `min`, if `val` is higher -than `max` it returns `max`. - -### Common use cases - -Any situation where you need to limit a number inside a range like: slider -position, image galleries <small>(so user can't skip to an image that doesn't -exist)</small>, drag and drop, scroll boundaries, etc. - -See: [`loop()`](#loop) - - - - -## countSteps(val, step[, overflow]):Number - -Count number of full steps. - -### Arguments: - - 1. `val` (Number) : Value. - 2. `step` (Number) : Step size. - 3. `[overflow]` (Number) : Maximum number of steps, nSteps will loop if -`>=` than overflow. - - -Count steps is very useful for cases where you need to know how many "full -steps" the number *completed*. Think of it as a division that only returns -integers and ignore remainders. - - countSteps(3, 5); // 0 - countSteps(6, 5); // 1 - countSteps(12, 5); // 2 - countSteps(18, 5); // 3 - countSteps(21, 5); // 4 - -You can also set an `overflow` which will reset the *counter* before reaching -this number. - - countSteps(3, 5, 3); // 0 - countSteps(6, 5, 3); // 1 - countSteps(12, 5, 3); // 2 - countSteps(18, 5, 3); // 0 - countSteps(21, 5, 3); // 1 - -### Common use cases - -#### How many items fit inside an area: - - var containerWidth = 100; - var itemWidth = 8; - var howManyFit = countSteps(containerWidth, itemWidth); // 12 - -#### Split value into different scales or convert value from one scale to another - -From [mout/time/parseMs](time.html#parseMs): - - function parseMs(ms){ - return { - milliseconds : countSteps(ms, 1, 1000), - seconds : countSteps(ms, 1000, 60), - minutes : countSteps(ms, 60000, 60), - hours : countSteps(ms, 3600000, 24), - days : countSteps(ms, 86400000) - }; - } - - // {days:27, hours:4, minutes:26, seconds:5, milliseconds:454} - parseMs(2348765454); - - - -## floor(val[, step]):Number - -Round value down to full steps. Similar to `Math.floor()` but can round value -to an arbitrary *radix*. (formerly `snap`) - - floor(7.2); // 7 - floor(7.8); // 7 - floor(7, 5); // 5 - floor(11, 5); // 10 - floor(15, 5); // 15 - -### Common use cases - -Round values by increments of 5/10/1000/etc. - -See: [`round()`](#round), [`ceil()`](#ceil), [`countSteps()`](#countSteps) - - - -## inRange(val, min, max[, threshold]):Boolean - -Checks if value is inside the range. - - inRange(-6, 1, 10); // false - inRange( 5, 1, 10); // true - inRange(12, 1, 10); // false - -The threshold can be useful when you want granular control of what should match -and/or the precision could change at runtime or by some configuration option, -avoids the clutter of adding/subtracting the `threshold` from `mix` and `max`. - - inRange(12, 1, 10, 2); // true - inRange(13, 1, 10, 2); // false - -### Common use cases - -Anything that needs to check if value is inside a range, be it collision -detection, limiting interaction by mouse position, ignoring parts of the logic -that shouldn't happen if value isn't valid, simplify `if/else` conditions, -making code more readable, etc... - - - - -## isNear(val, target, threshold):Boolean - -Check if value is close to target. - -Similar to `inRange()` but used to check if value is close to a certain value -or match the desired value. Basically to simplify `if/else` conditions and to -make code clearer. - - isNear( 10.2, 10, 0.5); // true - isNear( 10.5, 10, 0.5); // true - isNear(10.51, 10, 0.5); // false - -### Common use cases - -Games where a certain action should happen if an *actor* is close to a target, -gravity fields, any numeric check that has some tolerance. - - - - -## lerp(ratio, start, end):Number - -Linear interpolation. - - lerp(0.5, 0, 10); // 5 - lerp(0.75, 0, 10); // 7.5 - -### Common use cases - -Linear interpolation is commonly used to create animations of elements moving -from one point to another, where you simply update the current ratio (which in -this case represents time) and get back the position of the element at that -"frame". - -The core idea of `lerp` is that you are using a number that goes from `0` to -`1` to specify a ratio inside that scale. This concept can be applied to -convert numbers from different scales easily. - -See: [`map()`](#map), [`norm()`](#norm) - - - - -## loop(val, min, max):Number - -Loops value inside range. Will return `min` if `val > max` and `max` if `val -< min`, otherwise it returns `val`. - - loop(-1, 0, 10); // 10 - loop( 1, 0, 10); // 1 - loop( 5, 0, 10); // 5 - loop( 9, 0, 10); // 9 - loop(10, 0, 10); // 10 - loop(11, 0, 10); // 0 - -Similar to [`clamp()`](#clamp) but *loops* the value inside the range when an -overflow occurs. - -### Common use cases - -Image galleries, infinite scroll, any kind of logic that requires that the -first item should be displayed after the last one or the last one should be -displayed after first if going on the opposite direction. - -See: [`clamp()`](#clamp) - - - - -## map(val, min1, max1, min2, max2):Number - -Maps a number from one scale to another. - - map(3, 0, 4, -1, 1) // 0.5 - map(3, 0, 10, 0, 100) // 30 - -### Common use cases - -Very useful to convert values from/to multiple scales. - -Let's suppose we have a slider that needs to go from `2000` to `5000` and that slider -has `300px` of width, here is how we would translate the knob position into the -current value: - - var knobX = 123; - var sliderWid = 300; - var minVal = 2000; - var maxVal = 5000; - - var curVal = map(knobX, 0, sliderWid, minVal, maxVal); // 3230 - -See: [`lerp()`](#lerp), [`norm()`](#norm) - - - - -## norm(val, min, max):Number - -Gets normalized ratio of value inside range. - - norm(50, 0, 100); // 0.5 - norm(75, 0, 100); // 0.75 - -### Common use cases - -Convert values between scales, used by [`map()`](#map) internally. Direct -opposite of [`lerp()`](#lerp). - -See: [`lerp()`](#lerp), [`map()`](#map) - - - -## round(val[, step]):Number - -Round value to full steps. Similar to `Math.round()` but allow setting an -arbitrary *radix*. - - // default - round(0.22); // 0 - round(0.49); // 0 - round(0.51); // 1 - - // custom radix - round(0.22, 0.5); // 0 - round(0.49, 0.5); // 0.5 - round(0.51, 0.5); // 0.5 - round(0.74, 0.5); // 0.5 - round(0.75, 0.5); // 1 - round(1.24, 0.5); // 1 - round(1.25, 0.5); // 1.5 - round(1.74, 0.5); // 1.5 - -### Common use cases - -Round values by increments of 0.5/5/10/1000/etc. - -See: [`floor()`](#floor), [`ceil()`](#ceil), [`countSteps()`](#countSteps) - - - -------------------------------------------------------------------------------- - -For more usage more info check the specs and source code. - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/number.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/number.md deleted file mode 100644 index 8d93865b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/number.md +++ /dev/null @@ -1,225 +0,0 @@ -# number # - -Number utilities. - - -## abbreviate(val[, nDecimalDigits, dictionary]):String - -Abbreviate number to thousands (K), millions (M) or billions (B). - -The default value for `nDecimalDigits` is `1`. - -### Example - - abbreviate(123456); // "123.5K" - abbreviate(12345678); // "12.3M" - abbreviate(1234567890); // "1.2B" - -You can set the amount of decimal digits (default is `1`): - - abbreviate(543); // "0.5K" - abbreviate(543, 1); // "0.5K" - abbreviate(543, 2); // "0.54K" - abbreviate(543, 3); // "0.543K" - -You can customize the abbreviation by passing a custom "dictionary": - - var _ptbrDict = { - thousands : ' mil', - millions : ' Mi', - billions : ' Bi' - }; - function customAbbr(val) { - return abbreviate(val, 1, _ptbrDict); - } - - customAbbr(123456); // "123.5 mil" - customAbbr(12345678); // "12.3 Mi" - customAbbr(1234567890); // "1.2 Bi" - - - -## currencyFormat(val[, nDecimalDigits, decimalSeparator, thousandsSeparator]):String - -Format a number as currency. - -### Example: - - currencyFormat(1000); // "1,000.00" - currencyFormat(1000, 1); // "1,000.0" - currencyFormat(1000, 2, ',', '.'); // "1.000,00" - - - -## enforcePrecision(val, nDecimalDigits):Number - -Enforce a specific amount of decimal digits and also fix floating point -rounding issues. - -### Example: - -```js -enforcePrecision(0.615, 2); // 0.62 -enforcePrecision(0.625, 2); // 0.63 -//floating point rounding "error" (rounds to odd number) -+(0.615).toFixed(2); // 0.61 -+(0.625).toFixed(2); // 0.63 -``` - - - -## MAX_INT:Number - -Maximum 32-bit signed integer value. `Math.pow(2, 31) - 1` - -### Example: - -```js -console.log( MAX_INT ); // 2147483647 -``` - - -## MAX_UINT:Number - -Maximum 32-bit unsigned integer value. `Math.pow(2, 32) - 1` - -### Example: - -```js -console.log( MAX_UINT ); // 4294967295 -``` - - -## MIN_INT:Number - -Minimum 32-bit signed integer value. `Math.pow(2, 31) * -1`. - -### Example: - -```js -console.log( MIN_INT ); // -2147483648 -``` - - -## pad(n, minLength[, char]):String - -Add padding zeros if `n.length` < `minLength`. - -### Example: - -```js -pad(1, 5); // "00001" -pad(12, 5); // "00012" -pad(123, 5); // "00123" -pad(1234, 5); // "01234" -pad(12345, 5); // "12345" -pad(123456, 5); // "123456" - -// you can also specify the "char" used for padding -pad(12, 5, '_'); // "___12" -``` - -see: [string/lpad](./string.html#lpad) - - - -## rol(val, shift):Number - -Bitwise circular shift left. - -More info at [Wikipedia#Circular_shift](http://en.wikipedia.org/wiki/Circular_shift) - - - -## ror(val, shift):Number - -Bitwise circular shift right. - -More info at [Wikipedia#Circular_shift](http://en.wikipedia.org/wiki/Circular_shift) - - - -## sign(val):Number - -Returns `-1` if value is negative, `0` if the value is `0` and `1` if value is positive. Useful for -multiplications. - -```js -sign(-123); // -1 -sign(123); // 1 -sign(0); // 0 -``` - - - -## toInt(val):Number - -"Convert" value into an 32-bit integer. Works like `Math.floor` if `val > 0` and -`Math.ceil` if `val < 0`. - -**IMPORTANT:** val will wrap at [number/MIN_INT](#MIN_INT) and -[number/MAX_INT](#MAX_INT). - -Created because most people don't know bitwise operations and also because this -feature is commonly needed. - -[Perf tests](http://jsperf.com/vs-vs-parseint-bitwise-operators/7) - -### Example: - -```js -toInt(1.25); // 1 -toInt(0.75); // 0 -toInt(-0.55); // 0 -toInt(-5.0001) // -5 -``` - - - -## toUInt(val):Number - -"Convert" value into an 32-bit unsigned integer. - -Works like AS3#uint(). - -**IMPORTANT:** val will wrap at 2^32. - -### Example: - -```js -toUInt(1.25); // 1 -toUInt(0.75); // 0 -toUInt(-0.55); // 0 -toUInt(-5.0001); // 4294967291 -toUInt(Math.pow(2,32) - 0.5); // 4294967295 -toUInt(Math.pow(2,32) + 0.5); // 0 -``` - - -## toUInt31(val):Number - -"Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). - -Useful since all bitwise operators besides `>>>` treat numbers as signed -integers. - -**IMPORTANT:** val will wrap at 2^31 and negative numbers will be treated as -`zero`. - -### Example: - -```js -toUInt31(1.25); // 1 -toUInt31(0.75); // 0 -toUInt31(-0.55); // 0 -toUInt31(-5.0001); // 0 -toUInt31(Math.pow(2,31) - 0.5); // 21474836470 -toUInt31(Math.pow(2,31) + 0.5); // 0 -``` - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/object.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/object.md deleted file mode 100644 index b120aeed..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/object.md +++ /dev/null @@ -1,780 +0,0 @@ -# object # - -Object utilities. - - - -## bindAll(obj, [...methodNames]):void - -Bind methods of the target object to always execute on its own context -(ovewritting the original function). - -See: [function/bind](./function.html#bind) - -```js -var view = { - name: 'Lorem Ipsum', - logNameOnClick: function() { - console.log(this.name); - } -}; - -// binds all methods by default -bindAll(view); -jQuery('#docs').on('click', view.logNameOnClick); -``` - -You can also specify the list of methods that you want to bind (in case you -just want to bind a few of them). - -```js -// only the listed methods will be bound to `obj` context -bindAll(obj, 'logNameOnClick', 'doAwesomeStuffOnDrag'); -``` - - - -## contains(obj, value):Boolean - -Similar to [Array/contains](array.html#contains). Checks if Object contains -value. - -```js -var obj = { - a: 1, - b: 2, - c: 'bar' -}; -contains(obj, 2); // true -contains(obj, 'foo'); // false -``` - - - -## deepEquals(a, b, [callback]):Boolean - -Recursively tests whether two objects contain the same keys and equal values. - -`callback` specifies the equality comparison function used to compare -non-object values. It defaults to using the strict equals (`===`) operator. - -If the values are both an object, it will recurse into the objects, checking if -their keys/values are equal. It will only check the keys and values contained -by the objects; it will not check the objects' prototypes. If the either of -the values are not objects, they will be checked using the `callback` function. - -Example: - -```js -deepEquals({ a: 1 }, { a: 1 }); // true -deepEquals({ value: { a: 1 } }, { value: { a: 1 } }); // true -deepEquals({ value: { a: 1 } }, { value: { a: 2 } }); // false -deepEquals({ value: { a: 1 } }, { value: { a: 1, b: 2 } }); // false -deepEquals({}, null); // false -deepEquals(null, null); // true -deepEquals( - { a: { b: 1 } }, - { a: { b: '1' } }, - function(a, b) { return a == b; }); // true -``` - -See: [`equals()`](#equals) - - - -## deepFillIn(target, ...objects):Object - -Fill missing properties recursively. - -It's different from `deepMixIn` since it won't override any existing property. -It's also different from `merge` since it won't clone child objects during the -process. - -It returns the target object and mutates it in place. - -See: [`fillIn()`](#fillIn), [`deepMixIn()`](#deepMixIn), [`merge()`](#merge) - -```js -var base = { - foo : { - bar : 123 - }, - lorem : 'ipsum' -}; -var options = deepFillIn({foo : { baz : 45 }, lorem : 'amet'}, base); -// > {foo: {bar:123, baz : 45}, lorem : 'amet'} -``` - - - -## deepMatches(target, pattern):Boolean - -Recursively checks if object contains all properties/value pairs. When both -the target and pattern values are arrays, it checks that the target value -contain matches for all the items in the pattern array (independent of order). - -```js -var john = { - name: 'John', - age: 22, - pets: [ - { type: 'cat', name: 'Grumpy Cat' }, - { type: 'dog', name: 'Hawk' } - ] -}; - -deepMatches(john, { name: 'John' }); // true -deepMatches(john, { age: 21 }); // false -deepMatches(john, { pets: [ { type: 'cat' } ] }); // true -deepMatches(john, { pets: [ { name: 'Hawk' } ] }); // true -deepMatches(john, { pets: [ { name: 'Hairball' } ] }); // false -``` - -See [`matches()`](#matches) - - - -## deepMixIn(target, ...objects):Object - -Mixes objects into the target object, recursively mixing existing child objects -as well. - -It will only recursively mix objects if both (existing and new) values are -plain objects. - -Returns the target object. Like [`merge()`](#merge), but mutates the target -object, and does not clone child objects. - -```js -var target = { - foo: { - name: "foo", - id: 1 - } -}; - -deepMixIn(target, { foo: { id: 2 } }); -console.log(target); // { foo: { name: "foo", id: 2 } } -``` - -See: [`mixIn()`](#mixIn), [`merge()`](#merge), [`deepFillIn()`](#deepFillIn) - - - -## equals(a, b, [callback]):Boolean - -Tests whether two objects contain the same keys and values. - -`callback` specifies the equality comparison function used to compare the -values. It defaults to using the strict equals (`===`) operator. - -It will only check the keys and values contained by the objects; it will not -check the objects' prototypes. If either of the values are not objects, they -will be compared using the `callback` function. - -```js -equals({}, {}); // true -equals({ a: 1 }, { a: 1 }); // true -equals({ a: 1 }, { a: 2 }); // false -equals({ a: 1, b: 2 }, { a: 1 }); // false -equals({ a: 1 }, { a: 1, b: 2 }); // false -equals(null, null); // true -equals(null, {}); // false -equals({ a: 1 }, { a: '1' }, function(a, b) { return a == b; }); // true -``` - - - -## every(obj, callback, [thisObj]):Boolean - -Similar to [Array/every](array.html#every). Tests whether all properties in the -object pass the test implemented by the provided callback. - -```js -var obj = { - a: 1, - b: 2, - c: 3, - d: 'string' -}; - -every(obj, isNumber); // false -``` - - - -## fillIn(obj, ...default):Object - -Fill in missing properties in object with values from the *defaults* objects. - - var base = { - foo : 'bar', - num : 123 - }; - - fillIn({foo:'ipsum'}, base); // {foo:'ipsum', num:123} - -PS: it allows merging multiple objects at once, the first ones will take -precedence. - -See: [`mixIn()`](#mixIn), [`merge()`](#merge), [`deepFillIn()`](#deepFillIn) - - - -## filter(obj, callback, [thisObj]) - -Returns a new object containing all properties where `callback` returns true, -similar to Array/filter. It does not use properties from the object's -prototype. - -Callback receives the same arguments as `forOwn()`. - -See: [`forOwn()`](#forOwn), [`forIn()`](#forIn), [`pick()`](#pick) - -```js -var obj = { - foo: 'value', - bar: 'bar value' -}; - -// returns { bar: 'bar value' } -filter(obj, function(v) { return value.length > 5; }); - -// returns { foo: 'value' } -filter(obj, function(v, k) { return k === 'foo'; }); -``` - - - -## find(obj, callback, [thisObj]) - -Loops through all the properties in the Object and returns the first one that -passes a truth test (callback), similar to [Array/find](array.html#find). -Unlike Array/find, order of iteration is not guaranteed. - -```js -var obj = { - a: 'foo', - b: 12 -}; - -find(obj, isString); // 'foo' -find(obj, isNumber); // 12 -``` - - - -## forIn(obj, callback[, thisObj]) - -Iterate over all properties of an Object, similar to -[Array/forEach](array.html#forEach). - -It [avoids don't enum bug on IE](https://developer.mozilla.org/en/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug). -It **will** iterate over inherited (enumerable) properties from the prototype. - -It allows exiting the iteration early by returning `false` on the callback. - -See: [`forOwn()`](#forOwn), [`keys()`](#keys), [`values()`](#values) - -### Callback arguments - -Callback will receive the following arguments: - - 1. Property Value (*) - 2. Key name (String) - 3. Target object (Object) - -### Example - -```js -function Foo(){ - this.foo = 1; - this.bar = 2; -} - -Foo.prototype.lorem = 4; - -var obj = new Foo(); - -var result = 0; -var keys = []; - -forIn(obj, function(val, key, o){ - result += val; - keys.push(key); -}); - -console.log(result); // 7 -console.log(keys); // ['foo', 'bar', 'lorem'] -``` - - - -## forOwn(obj, callback[, thisObj]) - -Iterate over all own properties from an Object, similar to -[Array/forEach](array.html#forEach). - -It [avoids don't enum bug on IE](https://developer.mozilla.org/en/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug). -Notice that it **won't** iterate over properties from the prototype. - -It allows exiting the iteration early by returning `false` on the callback. - -See: [`forIn()`](#forIn), [`keys()`](#keys), [`values()`](#values) - -### Callback arguments - -Callback will receive the following arguments: - - 1. Property Value (*) - 2. Key name (String) - 3. Target object (Object) - -### Example - -```js -function Foo(){ - this.foo = 1; - this.bar = 2; -} - -// will be ignored -Foo.prototype.lorem = 4; - -var obj = new Foo(); - -var result = 0; -var keys = []; - -forOwn(obj, function(val, key, o){ - result += val; - keys.push(key); -}); - -console.log(result); // 3 -console.log(keys); // ['foo', 'bar'] -``` - - - -## functions(obj):Array - -Returns a sorted list of all enumerable properties that have function values -(including inherited properties). - -```js -var obj = { - foo : function(){}, - bar : 'baz' -}; -functions(obj); // ['foo'] -``` - - - -## get(obj, propName):* - -Returns nested property value. Will return `undefined` if property doesn't -exist. - -See: [`set()`](#set), [`namespace()`](#namespace), [`has()`](#has) - -```js -var lorem = { - ipsum : { - dolor : { - sit : 'amet' - } - } - }; - -get(lorem, 'ipsum.dolor.sit'); // "amet" -get(lorem, 'foo.bar'); // undefined -``` - - - -## has(obj, propName):Boolean - -Checks if object contains a child property. Useful for cases where you need to -check if an object contain a *nested* property. It will get properties -inherited by the prototype. - -see: [`hasOwn()`](#hasOwn), [`get()`](#get) - -```js -var a = { - b : { - c : 123 - } - }; - -has(a, 'b.c'); // true -has(a, 'foo.c'); // false -``` - -### Common use case - -```js -if( has(a, 'foo.c') ){ // false - // ... -} - -if( a.foo.c ){ // ReferenceError: `foo` is not defined - // ... -} -``` - - - -## hasOwn(obj, propName):Boolean - -Safer `Object.hasOwnProperty`. Returns a boolean indicating whether the object -has the specified property. - -see: [`has()`](#has) - -```js -var obj = { - foo: 1, - hasOwnProperty : 'bar' -}; - -obj.hasOwnProperty('foo'); // ERROR! hasOwnProperty is not a function - -hasOwn(obj, 'foo'); // true -hasOwn(obj, 'hasOwnProperty'); // true -hasOwn(obj, 'toString'); // false -``` - - - -## keys(obj):Array - -Returns an array of all own enumerable properties found upon a given object. -It will use the native `Object.keys` if present. - -PS: it won't return properties from the prototype. - -See: [`forOwn()`](#forOwn), [`values()`](#values) - -```js -var obj = { - foo : 1, - bar : 2, - lorem : 3 -}; -keys(obj); // ['foo', 'bar', 'lorem'] -``` - - - -## map(obj, callback, [thisObj]):Object - -Returns a new object where the property values are the result of calling the -callback for each property in the original object, similar to Array/map. - -The callback function receives the same arguments as in `forOwn()`. - -See: [`forOwn()`](#forOwn) - -```js -var obj = { foo: 1, bar: 2 }, - data = { foo: 0, bar: 1 }; - -map(obj, function(v) { return v + 1; }); // { foo: 2, bar: 3 } -map(obj, function(v, k) { return k; }); // { foo: "foo", bar: "bar" } -map(obj, function(v, k) { return this[k]; }, data); // { foo: 0, bar: 1 } -``` - - - -## matches(obj, props):Boolean - -Checks if object contains all properties/values pairs. Useful for validation -and filtering. - -```js -var john = {age:25, hair:'long', beard:true}; -var mark = {age:27, hair:'short', beard:false}; -var hippie = {hair:'long', beard:true}; -matches(john, hippie); // true -matches(mark, hippie); // false -``` - -See [`deepMatches()`](#deepMatches) - - - -## merge(...objects):Object - -Deep merges objects. Note that objects and properties will be cloned during the -process to avoid undesired side effects. It return a new object and won't -affect source objects. - -```js -var obj1 = {a: {b: 1, c: 1, d: {e: 1, f: 1}}}; -var obj2 = {a: {b: 2, d : {f : 'yeah'} }}; - -merge(obj1, obj2); // {a: {b : 2, c : 1, d : {e : 1, f : 'yeah'}}} -``` - -See: [`deepMixIn()`](#deepMixIn), [`deepFillIn()`](#deepFillIn) - - - -## max(obj[, iterator]):* - -Returns maximum value inside object or use a custom iterator to define how -items should be compared. Similar to [Array/max](array.html#max). - -See: [`min()`](#min) - -```js -max({a: 100, b: 2, c: 1, d: 3, e: 200}); // 200 -max({a: 'foo', b: 'lorem', c: 'amet'}, function(val){ - return val.length; -}); // 'lorem' -``` - - - -## min(obj[, iterator]):* - -Returns minimum value inside object or use a custom iterator to define how -items should be compared. Similar to [Array/min](array.html#min). - -See: [`max()`](#max) - -```js -min({a: 100, b: 2, c: 1, d: 3, e: 200}); // 1 -min({a: 'foo', b: 'lorem', c: 'amet'}, function(val){ - return val.length; -}); // 'foo' -``` - - - -## mixIn(target, ...objects):Object - -Combine properties from all the objects into first one. - -This method affects target object in place, if you want to create a new Object -pass an empty object as first parameter. - -### Arguments - - 1. `target` (Object) : Target Object. - 2. `...objects` (...Object) : Objects to be combined (0...n objects). - -### Example - -```js -var a = {foo: "bar"}; -var b = {lorem: 123}; - -mixIn({}, a, b); // {foo: "bar", lorem: 123} -console.log(a); // {foo: "bar"} - -mixIn(a, b); // {foo: "bar", lorem: 123} -console.log(a); // {foo: "bar", lorem: 123} -``` - -See: [`fillIn()`](#fillIn), [`merge()`](#merge) - - - - -## namespace(obj, propName):Object - -Creates an empty object inside namespace if not existent. Will return created -object or existing object. - -See: [`get()`](#get), [`set()`](#set) - -```js -var obj = {}; -namespace(obj, 'foo.bar'); // {} -console.log(obj); // {foo:{bar:{}}} -``` - - - -## pick(obj, ...keys):Object - -Return a copy of the object that contains only the whitelisted keys. - -See: [`filter()`](#filter) - -```js -var user = { - firstName : 'John', - lastName : 'Doe', - dob : '1985/07/23', - gender : 'male' -}; - -// can pass an array of keys as second argument -var keys = ['firstName', 'dob'] -pick(user, keys); // {firstName:"John", dob: "1985/07/23"} - -// or multiple arguments -pick(user, 'firstName', 'lastName'); // {firstName:"John", lastName: "Doe"} -``` - - - -## pluck(obj, propName):Object - -Extract an object containing property values with keys as they appear in the -passed object. - -```js -var users = { - first: { - name : 'John', - age : 21 - }, - second: { - name : 'Mary', - age : 25 - } -}; - -pluck(users, 'name'); // {first: 'John', second: 'Mary'} ); -pluck(users, 'age'); // {first: 21, second: 25} ); -``` - - - -## reduce(obj, callback, initial, [thisObj]):* - -Similar to [Array/reduce](array.html#reduce). - -Apply a function against an accumulator and each property of the object (order -is undefined) as to reduce it to a single value. - -```js -var obj = {a: 1, b: 2, c: 3, d: 4}; - -function sum(prev, cur, key, list) { - compare1.push(prev); - return prev + cur; -} - -reduce(obj, sum); // 10 -``` - - - -## reject(obj, callback, thisObj):Object - -Returns a new object containing all properties where `callback` returns true, -similar to [Array/reject](array.html#reject). It does not use properties from -the object's prototype. Opposite of [`filter()`](#filter). - -See [`filter()`](#filter) - -### Example - -```js -var obj = {a: 1, b: 2, c: 3, d: 4, e: 5}; -reject(obj, function(x) { return (x % 2) !== 0; }); // {b: 2, d: 4} -``` - - - -## values(obj):Array - -Returns an array of all own enumerable properties values found upon a given object. - -PS: it won't return properties from the prototype. - -See: [`forOwn()`](#forOwn), [`keys()`](#keys) - -```js -var obj = { - foo : 1, - bar : 2, - lorem : 3 -}; -values(obj); // [1, 2, 3] -``` - - - -## set(obj, propName, value) - -Sets a nested property value. - -See: [`get()`](#get), [`namespace()`](#namespace) - -```js -var obj = {}; -set(obj, 'foo.bar', 123); -console.log(obj.foo.bar); // 123 -console.log(obj); // {foo:{bar:123}} -``` - - - -## size(obj):Number - -Returns the count of own enumerable properties found upon a given object. - -PS: it won't return properties from the prototype. - -See: [`forOwn()`](#forOwn), [`keys()`](#keys) - -```js -var obj = { - foo : 1, - bar : 2, - lorem : 3 -}; -size(obj); // 3 -``` - - - -## some(obj, callback, [thisObj]):Boolean - -Similar to [Array/some](array.html#some). Tests whether any properties in the -object pass the test implemented by the provided callback. - -```js -var obj = { - a: 1, - b: 2, - c: 3, - d: 'string' -}; - -some(obj, isNumber); // true -``` - - - -## unset(obj, propName):Boolean - -Delete object property if existent and returns a boolean indicating succes. It -will also return `true` if property doesn't exist. - -Some properties can't be deleted, to understand why [check this -article](http://perfectionkills.com/understanding-delete/). - -See: [`set()`](#set) - -```js -var lorem = { - ipsum : { - dolor : { - sit : 'amet' - } - } - }; - -unset(lorem, 'ipsum.dolor.sit'); // true -console.log(lorem.ipsum.dolor); // {} -unset(lorem, 'foo.bar'); // true -``` diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/queryString.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/queryString.md deleted file mode 100644 index 1be3c102..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/queryString.md +++ /dev/null @@ -1,115 +0,0 @@ -# queryString # - -Utilities for query string manipulation. - - - -## contains(url, paramName):Boolen - -Checks if query string contains parameter. - -### Arguments: - - 1. `url` (String) : URL or query string. - 2. `paramName` (String) : Parameter name. - -### Example: - -```js -var url = 'example.com/?lorem=ipsum'; -contains(url, 'lorem'); // true -contains(url, 'foo'); //false -``` - - - -## decode(queryStr[, shouldTypecast]):Object - -Parses query string and creates an object of keys => vals. - -Will typecast value with [`string/typecast`](string.html#typecast) by default -and decode string parameters using `decodeURIComponent()`. - -```js -var query = '?foo=bar&lorem=123'; -decode(query); // {foo: "bar", lorem: 123} -decode(query, false); // {foo: "bar", lorem: "123"} -``` - - -## encode(obj):String - -Encode object into a query string. - -Will encode parameters with `encodeURIComponent()`. - -```js -encode({foo: "bar", lorem: 123}); // "?foo=bar&lorem=123" -``` - - -## getParam(url, param[, shouldTypecast]):* - -Get query parameter value. - -Will typecast value with [`string/typecast`](string.html#typecast) by default. - -See: [`setParam()`](#setParam) - -### Arguments: - - 1. `url` (String) : Url. - 2. `param` (String) : Parameter name. - 3. `[shouldTypecast]` (Boolean) : If it should typecast value. - -### Example: - -```js -var url = 'example.com/?foo=bar&lorem=123&ipsum=false'; -getParam(url, 'dolor'); // "amet" -getParam(url, 'lorem'); // 123 -getParam(url, 'lorem', false); // "123" -``` - - -## parse(url[, shouldTypecast]):Object - -Parses URL, extracts query string and decodes it. - -It will typecast all properties of the query object unless second argument is -`false`. - -Alias to: `decode(getQuery(url))`. - -```js -var url = 'example.com/?lorem=ipsum&a=123'; -parse(url); // {lorem: "ipsum", a: 123} -parse(url, false); // {lorem: "ipsum", a: "123"} -``` - - -## getQuery(url):String - -Gets full query as string with all special chars decoded. - -```js -getQuery('example.com/?lorem=ipsum'); // "?lorem=ipsum" -``` - - -## setParam(url, paramName, value):String - -Add new query string parameter to URL or update existing value. - -See: [`getParam()`](#getParam) - -```js -setParam('?foo=bar&lorem=0', 'lorem', 'ipsum'); // '?foo=bar&lorem=ipsum' -setParam('?lorem=1', 'foo', 123); // '?lorem=1&foo=123' -``` - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/random.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/random.md deleted file mode 100644 index b058b4e0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/random.md +++ /dev/null @@ -1,218 +0,0 @@ -# random # - -Pseudo-random generators. - -mout uses `Math.random` by default on all the pseudo-random generators, if -you need a seeded random or a better algorithm see the [`random()`](#random) -documentation for instructions. - - - -## choice(...items):* - -Returns a random element from the supplied arguments or from an array if single -argument is an array. - -### Example: - -```js -choice(1, 2, 3, 4, 5); // 3 - -var arr = ['lorem', 'ipsum', 'dolor']; -choice(arr); // 'dolor' -``` - - - -## guid():String - -Generates a pseudo-random [Globally Unique Identifier](http://en.wikipedia.org/wiki/Globally_unique_identifier) (v4). - -Since the total number of GUIDs is 2<sup>122</sup> the chance of generating the -same value twice is negligible. - -**Important:** this method uses `Math.random` by default so the UUID isn't -*safe* (sequence of outputs can be predicted in some cases), check the -[`random()`](#random) documentation for more info on how to replace the default -PRNG if you need extra safety or need *seeded* results. - -See: [`randHex()`](#randHex), [`random()`](#random) - -### Example: - -```js -guid(); // 830e9f50-ac7f-4369-a14f-ed0e62b2fa0b -guid(); // 5de3d09b-e79c-4727-932b-48c49228d508 -``` - - - -## rand([min], [max]):Number - -Gets a random number inside range or snap to min/max values. - -### Arguments: - - 1. `[min]` (Number) : Minimum value. Defaults to `number/MIN_INT`. - 2. `[max]` (Number) : Maximum value. Defaults to `number/MAX_INT`. - - -### Example: - -```js -rand(); // 448740433.55274725 -rand(); // -31797596.097682 -rand(0, 10); // 7.369723 -rand(0, 10); // 5.987042 -``` - -See: [`random()`](#random) - - - -## randBit():Number - -Returns a random "bit" (0 or 1). Useful for addition/subtraction. - -It's slightly faster than `choice(0, 1)` since implementation is simpler (not -that it will make a huge difference in most cases). - -See: [`choice()`](#choice) - -### Example: - -```js -randBit(); // 1 -randBit(); // 0 - -//same effect as -choice(0, 1); -``` - - - -## randHex([size]):String - -Returns a random hexadecimal string. - -The default `size` is `6`. - -### Example: - -```js -randHex(); // "dd8575" -randHex(); // "e6baeb" -randHex(2); // "a2" -randHex(30); // "effd7e2ad9a4a3067e30525fab983a" -``` - - - -## randInt([min], [max]):Number - -Gets a random integer inside range or snap to min/max values. - -### Arguments: - - 1. `[min]` (Number) : Minimum value. Defaults to `number/MIN_INT`. - 2. `[max]` (Number) : Maximum value. Defaults to `number/MAX_INT`. - - -### Example: - -```js -randInt(); // 448740433 -randInt(); // -31797596 -randInt(0, 10); // 7 -randInt(0, 10); // 5 -``` - - - -## randSign():Number - -Returns a random "sign" (-1 or 1). Useful for multiplications. - -It's slightly faster than `choice(-1, 1)` since implementation is simpler (not -that it will make a huge difference in most cases). - -See: [`choice()`](#choice) - -### Example: - -```js -randSign(); // -1 -randSign(); // 1 - -//same effect as -choice(-1, 1); -``` - - - -## random():Number - -Returns a random number between `0` and `1`. Same as `Math.random()`. - -```js -random(); // 0.35435103671625257 -random(); // 0.8768321881070733 -``` - -**Important:** No methods inside mout should call `Math.random()` -directly, they all use `random/random` as a proxy, that way we can -inject/replace the pseudo-random number generator if needed (ie. in case we -need a seeded random or a better algorithm than the native one). - -### Replacing the PRNG - -In some cases we might need better/different algorithms than the one provided -by `Math.random` (ie. safer, seeded). - -Because of licensing issues, file size limitations and different needs we -decided to **not** implement a custom PRNG and instead provide a easy way to -override the default behavior. - [issue #99](https://github.com/millermedeiros/amd-utils/issues/99) - -If you are using mout with a loader that supports the [AMD map -config](https://github.com/amdjs/amdjs-api/wiki/Common-Config), such as -[RequireJS](http://requirejs.org/), you can use it to replace the PRNG -(recommended approach): - -```js -requirejs.config({ - map : { - // all modules will load "my_custom_prng" instead of - // "mout/random/random" - '*' : { - 'mout/random/random' : 'my_custom_prng' - } - } -}); -``` - -You also have the option to override `random.get` in case you are using -mout on node.js or with a loader which doesn't support the map config: - -```js -// replace the PRNG -var n = 0; -random.get = function(){ - return ++n % 2? 0 : 1; // not so random :P -}; -random(); // 0 -random(); // 1 -random(); // 0 -random(); // 1 -``` - -See this [detailed explanation about PRNG in -JavaScript](http://baagoe.org/en/w/index.php/Better_random_numbers_for_javascript) -to understand the issues with the native `Math.random` and also for a list of -algorithms that could be used instead. - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/string.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/string.md deleted file mode 100644 index 04f61a76..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/string.md +++ /dev/null @@ -1,606 +0,0 @@ -# string # - -String utilities. - - -## camelCase(str):String - -Convert string to "camelCase" text. - -See: [`pascalCase()`](#pascalCase), [`unCamelCase()`](#unCamelCase) - -### Example - -```js -camelCase('lorem-ipsum-dolor'); // "loremIpsumDolor" -camelCase('lorem ipsum dolor'); // "loremIpsumDolor" -``` - - - -## contains(str, substring, [fromIndex]):Boolean - -Checks if string contains the given substring. - -See: [`startsWith()`](#startsWith), [`endsWith()`](#endsWith) - -### Example - -```js -contains('lorem', 'or'); // true -contains('lorem', 'bar'); // false -``` - - - -## crop(str, maxChars, [append]):String - -Truncate string at full words. Alias to `truncate(str, maxChars, append, true);`. - -See: [`truncate()`](#truncate) - -### Example - -```js -crop('lorem ipsum dolor', 10); // "lorem..." -crop('lorem ipsum dolor', 10, '+'); // "lorem+" -``` - - - -## endsWith(str, suffix):Boolean - -Checks if string ends with specified suffix. - -See: [`startsWith()`](#startsWith), [`contains()`](#contains) - -### Example - -```js -endsWith('lorem ipsum', 'lorem'); // false -endsWith('lorem ipsum', 'ipsum'); // true -``` - - - -## escapeHtml(str):String - -Escapes HTML special chars (`>`, `<`, `&`, `"`, `'`). - -See: [`unescapeHtml()`](#unescapeHtml) - -### Example - -```js -escapeHtml('lorem & "ipsum"'); // "lorem &amp; &quot;ipsum&quot;" -``` - - - -## escapeRegExp(str):String - -Escape special chars to be used as literals in RegExp constructors. - -### Example - -```js -str = escapeRegExp('[lorem.ipsum]'); // "\\[lorem\\.ipsum\\]" -reg = new RegExp(str); // /\[lorem\.ipsum\]/ -``` - - - -## escapeUnicode(str[, shouldEscapePrintable]):String - -Unicode escape chars. - -It will only escape non-printable ASCII chars unless `shouldEscapePrintable` is -set to `true`. - -See: [`unescapeUnicode()`](#unescapeUnicode) - -```js -escapeUnicode('føo bår'); -// > "f\u00f8o b\u00e5r" -escapeUnicode('føo bår', true); -// > "\u0066\u00f8\u006f\u0020\u0062\u00e5\u0072" -``` - - - -## hyphenate(str):String - -Replaces spaces with hyphens, split camelCase text, remove non-word chars, -remove accents and convert to lower case. - -See: [`slugify()`](#slugify), [`underscore()`](#underscore), -[`unhyphenate`](#unhyphenate) - -```js -hyphenate(' %# lorem ipsum ? $ dolor'); // "lorem-ipsum-dolor" -hyphenate('spéçïãl çhârs'); // "special-chars" -hyphenate('loremIpsum'); // "lorem-ipsum" -``` - - - -## insert(str, index, partial):String - -Inserts a `partial` before the given `index` in the provided `str`. -If the index is larger than the length of the string the partial is appended at the end. -A negative index is treated as `length - index` where `length` is the length or the string. - -```js -insert('this is a sentence', 10, 'sample '); // "this is a sample sentence" -insert('foo', 100, 'bar'); // "foobar" -insert('image.png', -4, '-large'); // "image-large.png" -``` - -## interpolate(str, replacements[, syntax]):String - -String interpolation. Format/replace tokens with object properties. - -```js -var tmpl = 'Hello {{name}}!'; -interpolate(tmpl, {name: 'World'}); // "Hello World!" -interpolate(tmpl, {name: 'Lorem Ipsum'}); // "Hello Lorem Ipsum!" -``` - -It uses a mustache-like syntax by default but you can set your own format if -needed. You can also use Arrays for the replacements (since Arrays are -objects as well): - -```js -// matches everything inside "${}" -var syntax = /\$\{([^}]+)\}/g; -var tmpl = "Hello ${0}!"; -interpolate(tmpl, ['Foo Bar'], syntax); // "Hello Foo Bar!" -``` - - - -## lowerCase(str):String - -"Safer" `String.toLowerCase()`. (Used internally) - -### Example - -```js -(null).toLowerCase(); // Error! -(undefined).toLowerCase(); // Error! -lowerCase(null); // "" -lowerCase(undefined); // "" -``` - - - -## lpad(str, minLength[, char]):String - -Pad string from left with `char` if its' length is smaller than `minLen`. - -See: [`rpad()`](#rpad) - -### Example - -```js -lpad('a', 5); // " a" -lpad('a', 5, '-'); // "----a" -lpad('abc', 3, '-'); // "abc" -lpad('abc', 4, '-'); // "-abc" -``` - - - -## ltrim(str, [chars]):String - -Remove chars or white-spaces from beginning of string. - -`chars` is an array of chars to remove from the beginning of the string. If -`chars` is not specified, Unicode whitespace chars will be used instead. - -See: [`rtrim()`](#rtrim), [`trim()`](#trim) - -### Example - -```js -ltrim(' lorem ipsum '); // "lorem ipsum " -ltrim('--lorem ipsum--', ['-']); // "lorem ipsum--" -``` - - - -## makePath(...args):String - -Group arguments as path segments, if any of the args is `null` or `undefined` -it will be ignored from resulting path. It will also remove duplicate "/". - -See: [`array/join()`](array.html#join) - -### Example - -```js -makePath('lorem', 'ipsum', null, 'dolor'); // "lorem/ipsum/dolor" -makePath('foo///bar/'); // "foo/bar/" -``` - - - -## normalizeLineBreaks(str, [lineBreak]):String - -Normalize line breaks to a single format. Defaults to Unix `\n`. - -It handles DOS (`\r\n`), Mac (`\r`) and Unix (`\n`) formats. - -### Example - -```js -// "foo\nbar\nlorem\nipsum" -normalizeLineBreaks('foo\nbar\r\nlorem\ripsum'); - -// "foo\rbar\rlorem\ripsum" -normalizeLineBreaks('foo\nbar\r\nlorem\ripsum', '\r'); - -// "foo bar lorem ipsum" -normalizeLineBreaks('foo\nbar\r\nlorem\ripsum', ' '); -``` - - - -## pascalCase(str):String - -Convert string to "PascalCase" text. - -See: [`camelCase()`](#camelCase) - -### Example - -```js -pascalCase('lorem-ipsum-dolor'); // "LoremIpsumDolor" -pascalCase('lorem ipsum dolor'); // "LoremIpsumDolor" -``` - - - -## properCase(str):String - -UPPERCASE first char of each word, lowercase other chars. - -### Example - -```js -properCase('loRem iPSum'); // "Lorem Ipsum" -``` - - - -## removeNonASCII(str):String - -Remove [non-printable ASCII -chars](http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters). - -### Example - -```js -removeNonASCII('äÄçÇéÉêlorem-ipsumöÖÐþúÚ'); // "lorem-ipsum" -``` - - - -## removeNonWord(str):String - -Remove non-word chars. - -### Example - -```js -var str = 'lorem ~!@#$%^&*()_+`-={}[]|\\:";\'/?><., ipsum'; -removeNonWord(str); // "lorem - ipsum" -``` - - - -## repeat(str, n):String - -Repeat string n-times. - -### Example - -```js -repeat('a', 3); // "aaa" -repeat('bc', 2); // "bcbc" -repeat('a', 0); // "" -``` - - - -## replace(str, search, replacements):String - -Replace string(s) with the replacement(s) in the source. - -`search` and `replacements` can be an array, or a single item. For every item -in `search`, it will call `str.replace` with the search item and the matching -replacement in `replacements`. If `replacements` only contains one replacement, -it will be used for all the searches, otherwise it will use the replacement at -the same index as the search. - -### Example - -```js -replace('foo bar', 'foo', 'test'); // "test bar" -replace('test 1 2', ['1', '2'], 'n'); // "test n n" -replace('test 1 2', ['1', '2'], ['one', 'two']); // "test one two" -replace('123abc', [/\d/g, /[a-z]/g], ['0', '.']); // "000..." -``` - - - -## replaceAccents(str):String - -Replaces all accented chars with regular ones. - -**Important:** Only covers **Basic Latin** and **Latin-1** unicode chars. - -### Example - -```js -replaceAccents('spéçïãl çhârs'); // "special chars" -``` - - - -## rpad(str, minLength[, char]):String - -Pad string from right with `char` if its' length is smaller than `minLen`. - -See: [`lpad()`](#lpad) - -### Example - -```js -rpad('a', 5); // "a " -rpad('a', 5, '-'); // "a----" -rpad('abc', 3, '-'); // "abc" -rpad('abc', 4, '-'); // "abc-" -``` - - - -## rtrim(str, [chars]):String - -Remove chars or white-spaces from end of string. - -`chars` is an array of chars to remove from the end of the string. If -`chars` is not specified, Unicode whitespace chars will be used instead. - -See: [`trim()`](#trim), [`ltrim()`](#ltrim) - -### Example - -```js -rtrim(' lorem ipsum '); // " lorem ipsum" -rtrim('--lorem ipsum--', ['-']); // "--lorem ipsum" -``` - - - -## sentenceCase(str):String - -UPPERCASE first char of each sentence and lowercase other chars. - -### Example - -```js -var str = 'Lorem IpSum DoLOr. maeCeNnas Ullamcor.'; -sentenceCase(str); // "Lorem ipsum dolor. Maecennas ullamcor." -``` - - - -## stripHtmlTags(str):String - -Remove HTML/XML tags from string. - -### Example - -```js -var str = '<p><em>lorem</em> <strong>ipsum</strong></p>'; -stripHtmlTags(str); // "lorem ipsum" -``` - - - -## startsWith(str, prefix):Boolean - -Checks if string starts with specified prefix. - -See: [`endsWith()`](#endsWith), [`contains()`](#contains) - -### Example - -```js -startsWith('lorem ipsum', 'lorem'); // true -startsWith('lorem ipsum', 'ipsum'); // false -``` - - - -## slugify(str[, delimeter]):String - -Convert to lower case, remove accents, remove non-word chars and replace spaces -with the delimeter. The default delimeter is a hyphen. - -Note that this does not split camelCase text. - -See: [`hyphenate()`](#hyphenate) and [`underscore()`](#underscore) - -### Example - -```js -var str = 'loremIpsum dolor spéçïãl chârs'; -slugify(str); // "loremipsum-dolor-special-chars" -slugify(str, '_'); // "loremipsum_dolor_special_chars" -``` - - - -## trim(str, [chars]):String - -Remove chars or white-spaces from beginning and end of string. - -`chars` is an array of chars to remove from the beginning and end of the -string. If `chars` is not specified, Unicode whitespace chars will be used -instead. - -See: [`rtrim()`](#rtrim), [`ltrim()`](#ltrim) - -### Example - -```js -trim(' lorem ipsum '); // "lorem ipsum" -trim('-+-lorem ipsum-+-', ['-', '+']); // "lorem ipsum" -``` - - - -## truncate(str, maxChars, [append], [onlyFullWords]):String - -Limit number of chars. Returned string `length` will be `<= maxChars`. - -See: [`crop()`](#crop) - -### Arguments - - 1. `str` (String) : String - 2. `maxChars` (Number) : Maximum number of characters including `append.length`. - 3. `[append]` (String) : Value that should be added to the end of string. - Defaults to "...". - 4. `[onlyFullWords]` (Boolean) : If it shouldn't break words. Default is - `false`. (favor [`crop()`](#crop) since code will be clearer). - -### Example - -```js -truncate('lorem ipsum dolor', 11); // "lorem ip..." -truncate('lorem ipsum dolor', 11, '+'); // "lorem ipsu+" -truncate('lorem ipsum dolor', 11, null, true); // "lorem..." -``` - - - -## typecast(str):* - -Parses string and convert it into a native value. - -### Example - -```js -typecast('lorem ipsum'); // "lorem ipsum" -typecast('123'); // 123 -typecast('123.45'); // 123.45 -typecast('false'); // false -typecast('true'); // true -typecast('null'); // null -typecast('undefined'); // undefined -``` - - - -## unCamelCase(str, [delimiter]):String - -Add the delimiter between camelCase text and convert first char of each word to -lower case. - -The delimiter defaults to a space character. - -See: [`camelCase()`][#camelCase] - -### Example - -```js -unCamelCase('loremIpsumDolor'); // "lorem ipsum dolor" -unCamelCase('loremIpsumDolor', '-'); // "lorem-ipsum-color" -``` - - -## underscore(str):String - -Replaces spaces with underscores, split camelCase text, remove non-word chars, -remove accents and convert to lower case. - -See: [`slugify()`](#slugify), [`hyphenate()`](#hyphenate) - -```js -underscore(' %# lorem ipsum ? $ dolor'); // "lorem_ipsum_dolor" -underscore('spéçïãl çhârs'); // "special_chars" -underscore('loremIpsum'); // "lorem_ipsum" -``` - - - -## unescapeHtml(str):String - -Unescapes HTML special chars (`>`, `<`, `&`, `"`, `'`). - -See: [`escapeHtml()`](#escapeHtml) - -### Example - -```js -unescapeHtml('lorem &amp; &quot;ipsum&quot;'); // 'lorem & "ipsum"' -``` - - - -## unescapeUnicode(str):String - -Unescapes unicode char sequences. - -See: [`escapeUnicode()`](#escapeUnicode) - -```js -unescapeUnicode('\\u0066\\u00f8\\u006f\\u0020\\u0062\\u00e5\\u0072'); -// > 'føo bår' -``` - - - -## unhyphenate(str):String - -Replaces hyphens with spaces. (only hyphens between word chars) - -See : [`hyphenate()`](#hyphenate) - -### Example - -```js -unhyphenate('lorem-ipsum-dolor'); // "lorem ipsum dolor" -``` - - -## upperCase(str):String - -"Safer" `String.toUpperCase()`. (Used internally) - -### Example - -```js -(null).toUpperCase(); // Error! -(undefined).toUpperCase(); // Error! -upperCase(null); // "" -upperCase(undefined); // "" -``` - - - -## WHITE_SPACES:Array - -Constant array of all [Unicode white-space -characters](http://en.wikipedia.org/wiki/Whitespace_character). - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/time.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/time.md deleted file mode 100644 index 628c2a9b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/doc/time.md +++ /dev/null @@ -1,64 +0,0 @@ -# time # - -Utilities for time manipulation. - - -## convert(value, sourceUnit, [destinationUnit]):Number - -Converts time between units. - -Available units: `millisecond`, `second`, `minute`, `hour`, `day`, `week`. -Abbreviations: `ms`, `s`, `m`, `h`, `d`, `w`. - -We do **not** support year and month as a time unit since their values are not -fixed. - -The default `destinationUnit` is `ms`. - -```js -convert(1, 'minute'); // 60000 -convert(2.5, 's', 'ms'); // 2500 -convert(2, 'm', 's'); // 120 -convert(500, 'ms', 's'); // 0.5 -``` - - - -## now():Number - -Returns the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC. -Uses `Date.now()` if available. - -### Example - -```js -now(); // 1335449614650 -``` - - - -## parseMs(ms):Object - -Parse timestamp (milliseconds) into an object `{milliseconds:number, -seconds:number, minutes:number, hours:number, days:number}`. - -### Example - -```js -// {days:27, hours:4, minutes:26, seconds:5, milliseconds:454} -parseMs(2348765454); -``` - - - -## toTimeString(ms):String - -Convert timestamp (milliseconds) into a time string in the format "[H:]MM:SS". - -### Example - -```js -toTimeString(12513); // "00:12" -toTimeString(951233); // "15:51" -toTimeString(8765235); // "2:26:05" -``` diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function.js deleted file mode 100644 index 75d0c7e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function.js +++ /dev/null @@ -1,19 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'bind' : require('./function/bind'), - 'compose' : require('./function/compose'), - 'debounce' : require('./function/debounce'), - 'func' : require('./function/func'), - 'makeIterator_' : require('./function/makeIterator_'), - 'partial' : require('./function/partial'), - 'prop' : require('./function/prop'), - 'series' : require('./function/series'), - 'throttle' : require('./function/throttle'), - 'timeout' : require('./function/timeout'), - 'times' : require('./function/times') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/bind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/bind.js deleted file mode 100644 index 71bc1257..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/bind.js +++ /dev/null @@ -1,23 +0,0 @@ - - - function slice(arr, offset){ - return Array.prototype.slice.call(arr, offset || 0); - } - - /** - * Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. - * @param {Function} fn Function. - * @param {object} context Execution context. - * @param {rest} args Arguments (0...n arguments). - * @return {Function} Wrapped Function. - */ - function bind(fn, context, args){ - var argsArr = slice(arguments, 2); //curried args - return function(){ - return fn.apply(context, argsArr.concat(slice(arguments))); - }; - } - - module.exports = bind; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/compose.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/compose.js deleted file mode 100644 index 8cd5c5f3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/compose.js +++ /dev/null @@ -1,23 +0,0 @@ - - - /** - * Returns a function that composes multiple functions, passing results to - * each other. - */ - function compose() { - var fns = arguments; - return function(arg){ - // only cares about the first argument since the chain can only - // deal with a single return value anyway. It should start from - // the last fn. - var n = fns.length; - while (n--) { - arg = fns[n].call(this, arg); - } - return arg; - }; - } - - module.exports = compose; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/debounce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/debounce.js deleted file mode 100644 index 7f6f3021..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/debounce.js +++ /dev/null @@ -1,32 +0,0 @@ - - - /** - * Debounce callback execution - */ - function debounce(fn, threshold, isAsap){ - var timeout, result; - function debounced(){ - var args = arguments, context = this; - function delayed(){ - if (! isAsap) { - result = fn.apply(context, args); - } - timeout = null; - } - if (timeout) { - clearTimeout(timeout); - } else if (isAsap) { - result = fn.apply(context, args); - } - timeout = setTimeout(delayed, threshold); - return result; - } - debounced.cancel = function(){ - clearTimeout(timeout); - }; - return debounced; - } - - module.exports = debounce; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/func.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/func.js deleted file mode 100644 index b81bf0a8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/func.js +++ /dev/null @@ -1,14 +0,0 @@ - - - /** - * Returns a function that call a method on the passed object - */ - function func(name){ - return function(obj){ - return obj[name](); - }; - } - - module.exports = func; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/makeIterator_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/makeIterator_.js deleted file mode 100644 index b6e6a00e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/makeIterator_.js +++ /dev/null @@ -1,31 +0,0 @@ -var prop = require('./prop'); -var deepMatches = require('../object/deepMatches'); - - /** - * Converts argument into a valid iterator. - * Used internally on most array/object/collection methods that receives a - * callback/iterator providing a shortcut syntax. - */ - function makeIterator(src, thisObj){ - switch(typeof src) { - case 'function': - // function is the first to improve perf (most common case) - return (typeof thisObj !== 'undefined')? function(val, i, arr){ - return src.call(thisObj, val, i, arr); - } : src; - case 'object': - // typeof null == "object" - return (src != null)? function(val){ - return deepMatches(val, src); - } : src; - case 'string': - case 'number': - return prop(src); - default: - return src; - } - } - - module.exports = makeIterator; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/partial.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/partial.js deleted file mode 100644 index d63ff1be..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/partial.js +++ /dev/null @@ -1,19 +0,0 @@ - - - function slice(arr, offset){ - return Array.prototype.slice.call(arr, offset || 0); - } - - /** - * Creates a partially applied function. - */ - function partial(fn, var_args){ - var argsArr = slice(arguments, 1); //curried args - return function(){ - return fn.apply(this, argsArr.concat(slice(arguments))); - }; - } - - module.exports = partial; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/prop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/prop.js deleted file mode 100644 index 734acb7a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/prop.js +++ /dev/null @@ -1,14 +0,0 @@ - - - /** - * Returns a function that gets a property of the passed object - */ - function prop(name){ - return function(obj){ - return obj[name]; - }; - } - - module.exports = prop; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/series.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/series.js deleted file mode 100644 index 25159c2c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/series.js +++ /dev/null @@ -1,22 +0,0 @@ - - - /** - * Returns a function that will execute a list of functions in sequence - * passing the same arguments to each one. (useful for batch processing - * items during a forEach loop) - */ - function series(){ - var fns = arguments; - return function(){ - var i = 0, - n = fns.length; - while (i < n) { - fns[i].apply(this, arguments); - i += 1; - } - }; - } - - module.exports = series; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/throttle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/throttle.js deleted file mode 100644 index 10bdc1f0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/throttle.js +++ /dev/null @@ -1,35 +0,0 @@ -var now = require('../time/now'); - - /** - */ - function throttle(fn, delay){ - var context, timeout, result, args, - cur, diff, prev = 0; - function delayed(){ - prev = now(); - timeout = null; - result = fn.apply(context, args); - } - function throttled(){ - context = this; - args = arguments; - cur = now(); - diff = delay - (cur - prev); - if (diff <= 0) { - clearTimeout(timeout); - prev = cur; - result = fn.apply(context, args); - } else if (! timeout) { - timeout = setTimeout(delayed, diff); - } - return result; - } - throttled.cancel = function(){ - clearTimeout(timeout); - }; - return throttled; - } - - module.exports = throttle; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/timeout.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/timeout.js deleted file mode 100644 index e0d21a66..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/timeout.js +++ /dev/null @@ -1,21 +0,0 @@ - - - function slice(arr, offset){ - return Array.prototype.slice.call(arr, offset || 0); - } - - /** - * Delays the call of a function within a given context. - */ - function timeout(fn, millis, context){ - - var args = slice(arguments, 3); - - return setTimeout(function() { - fn.apply(context, args); - }, millis); - } - - module.exports = timeout; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/times.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/times.js deleted file mode 100644 index 04a11c26..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/function/times.js +++ /dev/null @@ -1,17 +0,0 @@ - - - /** - * Iterates over a callback a set amount of times - */ - function times(n, callback, thisObj){ - var i = -1; - while (++i < n) { - if ( callback.call(thisObj, i) === false ) { - break; - } - } - } - - module.exports = times; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/index.js deleted file mode 100644 index 5016d085..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/**@license - * mout v0.7.1 | http://moutjs.com | MIT license - */ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'VERSION' : '0.7.1', - 'array' : require('./array'), - 'collection' : require('./collection'), - 'date' : require('./date'), - 'function' : require('./function'), - 'lang' : require('./lang'), - 'math' : require('./math'), - 'number' : require('./number'), - 'object' : require('./object'), - 'queryString' : require('./queryString'), - 'random' : require('./random'), - 'string' : require('./string'), - 'time' : require('./time'), - 'fn' : require('./function') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang.js deleted file mode 100644 index 024f7fa5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang.js +++ /dev/null @@ -1,37 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'clone' : require('./lang/clone'), - 'createObject' : require('./lang/createObject'), - 'ctorApply' : require('./lang/ctorApply'), - 'deepClone' : require('./lang/deepClone'), - 'defaults' : require('./lang/defaults'), - 'inheritPrototype' : require('./lang/inheritPrototype'), - 'is' : require('./lang/is'), - 'isArguments' : require('./lang/isArguments'), - 'isArray' : require('./lang/isArray'), - 'isBoolean' : require('./lang/isBoolean'), - 'isDate' : require('./lang/isDate'), - 'isEmpty' : require('./lang/isEmpty'), - 'isFinite' : require('./lang/isFinite'), - 'isFunction' : require('./lang/isFunction'), - 'isInteger' : require('./lang/isInteger'), - 'isKind' : require('./lang/isKind'), - 'isNaN' : require('./lang/isNaN'), - 'isNull' : require('./lang/isNull'), - 'isNumber' : require('./lang/isNumber'), - 'isObject' : require('./lang/isObject'), - 'isPlainObject' : require('./lang/isPlainObject'), - 'isRegExp' : require('./lang/isRegExp'), - 'isString' : require('./lang/isString'), - 'isUndefined' : require('./lang/isUndefined'), - 'isnt' : require('./lang/isnt'), - 'kindOf' : require('./lang/kindOf'), - 'toArray' : require('./lang/toArray'), - 'toNumber' : require('./lang/toNumber'), - 'toString' : require('./lang/toString') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/clone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/clone.js deleted file mode 100644 index 33c4e949..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/clone.js +++ /dev/null @@ -1,49 +0,0 @@ -var kindOf = require('./kindOf'); -var isPlainObject = require('./isPlainObject'); -var mixIn = require('../object/mixIn'); - - /** - * Clone native types. - */ - function clone(val){ - switch (kindOf(val)) { - case 'Object': - return cloneObject(val); - case 'Array': - return cloneArray(val); - case 'RegExp': - return cloneRegExp(val); - case 'Date': - return cloneDate(val); - default: - return val; - } - } - - function cloneObject(source) { - if (isPlainObject(source)) { - return mixIn({}, source); - } else { - return source; - } - } - - function cloneRegExp(r) { - var flags = ''; - flags += r.multiline ? 'm' : ''; - flags += r.global ? 'g' : ''; - flags += r.ignorecase ? 'i' : ''; - return new RegExp(r.source, flags); - } - - function cloneDate(date) { - return new Date(+date); - } - - function cloneArray(arr) { - return arr.slice(); - } - - module.exports = clone; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/createObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/createObject.js deleted file mode 100644 index bbc14c1d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/createObject.js +++ /dev/null @@ -1,18 +0,0 @@ -var mixIn = require('../object/mixIn'); - - /** - * Create Object using prototypal inheritance and setting custom properties. - * - Mix between Douglas Crockford Prototypal Inheritance <http://javascript.crockford.com/prototypal.html> and the EcmaScript 5 `Object.create()` method. - * @param {object} parent Parent Object. - * @param {object} [props] Object properties. - * @return {object} Created object. - */ - function createObject(parent, props){ - function F(){} - F.prototype = parent; - return mixIn(new F(), props); - - } - module.exports = createObject; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/ctorApply.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/ctorApply.js deleted file mode 100644 index d68dc506..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/ctorApply.js +++ /dev/null @@ -1,17 +0,0 @@ - - - function F(){} - - /** - * Do fn.apply on a constructor. - */ - function ctorApply(ctor, args) { - F.prototype = ctor.prototype; - var instance = new F(); - ctor.apply(instance, args); - return instance; - } - - module.exports = ctorApply; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/deepClone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/deepClone.js deleted file mode 100644 index 25fd95f1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/deepClone.js +++ /dev/null @@ -1,48 +0,0 @@ -var clone = require('./clone'); -var forOwn = require('../object/forOwn'); -var kindOf = require('./kindOf'); -var isPlainObject = require('./isPlainObject'); - - /** - * Recursively clone native types. - */ - function deepClone(val, instanceClone) { - switch ( kindOf(val) ) { - case 'Object': - return cloneObject(val, instanceClone); - case 'Array': - return cloneArray(val, instanceClone); - default: - return clone(val); - } - } - - function cloneObject(source, instanceClone) { - if (isPlainObject(source)) { - var out = {}; - forOwn(source, function(val, key) { - this[key] = deepClone(val, instanceClone); - }, out); - return out; - } else if (instanceClone) { - return instanceClone(source); - } else { - return source; - } - } - - function cloneArray(arr, instanceClone) { - var out = [], - i = -1, - n = arr.length, - val; - while (++i < n) { - out[i] = deepClone(arr[i], instanceClone); - } - return out; - } - - module.exports = deepClone; - - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/defaults.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/defaults.js deleted file mode 100644 index 1111b2ef..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/defaults.js +++ /dev/null @@ -1,17 +0,0 @@ -var toArray = require('./toArray'); -var find = require('../array/find'); - - /** - * Return first non void argument - */ - function defaults(var_args){ - return find(toArray(arguments), nonVoid); - } - - function nonVoid(val){ - return val != null; - } - - module.exports = defaults; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/inheritPrototype.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/inheritPrototype.js deleted file mode 100644 index eb17b9ca..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/inheritPrototype.js +++ /dev/null @@ -1,17 +0,0 @@ -var createObject = require('./createObject'); - - /** - * Inherit prototype from another Object. - * - inspired by Nicholas Zackas <http://nczonline.net> Solution - * @param {object} child Child object - * @param {object} parent Parent Object - */ - function inheritPrototype(child, parent){ - var p = createObject(parent.prototype); - p.constructor = child; - child.prototype = p; - child.super_ = parent; - } - - module.exports = inheritPrototype; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/is.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/is.js deleted file mode 100644 index 4a835739..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/is.js +++ /dev/null @@ -1,23 +0,0 @@ - - - /** - * Check if both arguments are egal. - */ - function is(x, y){ - // implementation borrowed from harmony:egal spec - if (x === y) { - // 0 === -0, but they are not identical - return x !== 0 || 1 / x === 1 / y; - } - - // NaN !== NaN, but they are identical. - // NaNs are the only non-reflexive value, i.e., if x !== x, - // then x is a NaN. - // isNaN is broken: it converts its argument to number, so - // isNaN("foo") => true - return x !== x && y !== y; - } - - module.exports = is; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isArguments.js deleted file mode 100644 index f7b08ba4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isArguments.js +++ /dev/null @@ -1,15 +0,0 @@ -var isKind = require('./isKind'); - - /** - */ - var isArgs = isKind(arguments, 'Arguments')? - function(val){ - return isKind(val, 'Arguments'); - } : - function(val){ - // Arguments is an Object on IE7 - return !!(val && Object.prototype.hasOwnProperty.call(val, 'callee')); - }; - - module.exports = isArgs; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isArray.js deleted file mode 100644 index 262ee400..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isArray.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - var isArray = Array.isArray || function (val) { - return isKind(val, 'Array'); - }; - module.exports = isArray; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isBoolean.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isBoolean.js deleted file mode 100644 index 86557cb9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isBoolean.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isBoolean(val) { - return isKind(val, 'Boolean'); - } - module.exports = isBoolean; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isDate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isDate.js deleted file mode 100644 index 4a5130f2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isDate.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isDate(val) { - return isKind(val, 'Date'); - } - module.exports = isDate; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isEmpty.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isEmpty.js deleted file mode 100644 index 0e9f77da..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isEmpty.js +++ /dev/null @@ -1,24 +0,0 @@ -var forOwn = require('../object/forOwn'); -var isArray = require('./isArray'); - - function isEmpty(val){ - if (val == null) { - // typeof null == 'object' so we check it first - return false; - } else if ( typeof val === 'string' || isArray(val) ) { - return !val.length; - } else if ( typeof val === 'object' || typeof val === 'function' ) { - var result = true; - forOwn(val, function(){ - result = false; - return false; // break loop - }); - return result; - } else { - return false; - } - } - - module.exports = isEmpty; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isFinite.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isFinite.js deleted file mode 100644 index 6d4006f9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isFinite.js +++ /dev/null @@ -1,21 +0,0 @@ -var isNumber = require('./isNumber'); - - var global = this; - - /** - * Check if value is finite - */ - function isFinite(val){ - var is = false; - if (typeof val === 'string' && val !== '') { - is = global.isFinite( parseFloat(val) ); - } else if (isNumber(val)){ - // need to use isNumber because of Number constructor - is = global.isFinite( val ); - } - return is; - } - - module.exports = isFinite; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isFunction.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isFunction.js deleted file mode 100644 index 216879f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isFunction.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isFunction(val) { - return isKind(val, 'Function'); - } - module.exports = isFunction; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isInteger.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isInteger.js deleted file mode 100644 index 29f95d96..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isInteger.js +++ /dev/null @@ -1,12 +0,0 @@ -var isNumber = require('./isNumber'); - - /** - * Check if value is an integer - */ - function isInteger(val){ - return isNumber(val) && (val % 1 === 0); - } - - module.exports = isInteger; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isKind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isKind.js deleted file mode 100644 index 02301e04..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isKind.js +++ /dev/null @@ -1,9 +0,0 @@ -var kindOf = require('./kindOf'); - /** - * Check if value is from a specific "kind". - */ - function isKind(val, kind){ - return kindOf(val) === kind; - } - module.exports = isKind; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isNaN.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isNaN.js deleted file mode 100644 index 4ea3065d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isNaN.js +++ /dev/null @@ -1,16 +0,0 @@ -var isNumber = require('./isNumber'); - - /** - * Check if value is NaN for realz - */ - function isNaN(val){ - // based on the fact that NaN !== NaN - // need to check if it's a number to avoid conflicts with host objects - // also need to coerce ToNumber to avoid edge case `new Number(NaN)` - // jshint eqeqeq: false - return !isNumber(val) || val != +val; - } - - module.exports = isNaN; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isNull.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isNull.js deleted file mode 100644 index 6252f9ef..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isNull.js +++ /dev/null @@ -1,9 +0,0 @@ - - /** - */ - function isNull(val){ - return val === null; - } - module.exports = isNull; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isNumber.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isNumber.js deleted file mode 100644 index 126c1cce..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isNumber.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isNumber(val) { - return isKind(val, 'Number'); - } - module.exports = isNumber; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isObject.js deleted file mode 100644 index 7350c891..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isObject.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isObject(val) { - return isKind(val, 'Object'); - } - module.exports = isObject; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isPlainObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isPlainObject.js deleted file mode 100644 index b81342ee..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isPlainObject.js +++ /dev/null @@ -1,13 +0,0 @@ - - - /** - * Checks if the value is created by the `Object` constructor. - */ - function isPlainObject(value) { - return (!!value && typeof value === 'object' && - value.constructor === Object); - } - - module.exports = isPlainObject; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isRegExp.js deleted file mode 100644 index fc5459a9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isRegExp.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isRegExp(val) { - return isKind(val, 'RegExp'); - } - module.exports = isRegExp; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isString.js deleted file mode 100644 index f8906584..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isString.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isString(val) { - return isKind(val, 'String'); - } - module.exports = isString; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isUndefined.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isUndefined.js deleted file mode 100644 index fb2261df..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isUndefined.js +++ /dev/null @@ -1,10 +0,0 @@ - - var UNDEF; - - /** - */ - function isUndef(val){ - return val === UNDEF; - } - module.exports = isUndef; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isnt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isnt.js deleted file mode 100644 index 9dad58ce..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/isnt.js +++ /dev/null @@ -1,12 +0,0 @@ -var is = require('./is'); - - /** - * Check if both values are not identical/egal - */ - function isnt(x, y){ - return !is(x, y); - } - - module.exports = isnt; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/kindOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/kindOf.js deleted file mode 100644 index 663464d0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/kindOf.js +++ /dev/null @@ -1,20 +0,0 @@ - - - var _rKind = /^\[object (.*)\]$/, - _toString = Object.prototype.toString, - UNDEF; - - /** - * Gets the "kind" of value. (e.g. "String", "Number", etc) - */ - function kindOf(val) { - if (val === null) { - return 'Null'; - } else if (val === UNDEF) { - return 'Undefined'; - } else { - return _rKind.exec( _toString.call(val) )[1]; - } - } - module.exports = kindOf; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/toArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/toArray.js deleted file mode 100644 index e39b8734..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/toArray.js +++ /dev/null @@ -1,31 +0,0 @@ -var kindOf = require('./kindOf'); - - var _win = this; - - /** - * Convert array-like object into array - */ - function toArray(val){ - var ret = [], - kind = kindOf(val), - n; - - if (val != null) { - if ( val.length == null || kind === 'String' || kind === 'Function' || kind === 'RegExp' || val === _win ) { - //string, regexp, function have .length but user probably just want - //to wrap value into an array.. - ret[ret.length] = val; - } else { - //window returns true on isObject in IE7 and may have length - //property. `typeof NodeList` returns `function` on Safari so - //we can't use it (#58) - n = val.length; - while (n--) { - ret[n] = val[n]; - } - } - } - return ret; - } - module.exports = toArray; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/toNumber.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/toNumber.js deleted file mode 100644 index 8b6df344..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/toNumber.js +++ /dev/null @@ -1,20 +0,0 @@ -var isArray = require('./isArray'); - - /** - * covert value into number if numeric - */ - function toNumber(val){ - // numberic values should come first because of -0 - if (typeof val === 'number') return val; - // we want all falsy values (besides -0) to return zero to avoid - // headaches - if (!val) return 0; - if (typeof val === 'string') return parseFloat(val); - // arrays are edge cases. `Number([4]) === 4` - if (isArray(val)) return NaN; - return Number(val); - } - - module.exports = toNumber; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/toString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/toString.js deleted file mode 100644 index ae5c2b0f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/lang/toString.js +++ /dev/null @@ -1,13 +0,0 @@ - - - /** - * Typecast a value to a String, using an empty string value for null or - * undefined. - */ - function toString(val){ - return val == null ? '' : val.toString(); - } - - module.exports = toString; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math.js deleted file mode 100644 index c6ee889b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math.js +++ /dev/null @@ -1,19 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'ceil' : require('./math/ceil'), - 'clamp' : require('./math/clamp'), - 'countSteps' : require('./math/countSteps'), - 'floor' : require('./math/floor'), - 'inRange' : require('./math/inRange'), - 'isNear' : require('./math/isNear'), - 'lerp' : require('./math/lerp'), - 'loop' : require('./math/loop'), - 'map' : require('./math/map'), - 'norm' : require('./math/norm'), - 'round' : require('./math/round') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/ceil.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/ceil.js deleted file mode 100644 index a279e158..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/ceil.js +++ /dev/null @@ -1,11 +0,0 @@ - - /** - * Round value up with a custom radix. - */ - function ceil(val, step){ - step = Math.abs(step || 1); - return Math.ceil(val / step) * step; - } - - module.exports = ceil; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/clamp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/clamp.js deleted file mode 100644 index e929a9a6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/clamp.js +++ /dev/null @@ -1,9 +0,0 @@ - - /** - * Clamps value inside range. - */ - function clamp(val, min, max){ - return val < min? min : (val > max? max : val); - } - module.exports = clamp; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/countSteps.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/countSteps.js deleted file mode 100644 index 60ac90c3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/countSteps.js +++ /dev/null @@ -1,16 +0,0 @@ - - /** - * Count number of full steps. - */ - function countSteps(val, step, overflow){ - val = Math.floor(val / step); - - if (overflow) { - return val % overflow; - } - - return val; - } - - module.exports = countSteps; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/floor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/floor.js deleted file mode 100644 index 9de50531..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/floor.js +++ /dev/null @@ -1,10 +0,0 @@ - - /** - * Floor value to full steps. - */ - function floor(val, step){ - step = Math.abs(step || 1); - return Math.floor(val / step) * step; - } - module.exports = floor; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/inRange.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/inRange.js deleted file mode 100644 index 763218f8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/inRange.js +++ /dev/null @@ -1,11 +0,0 @@ - - /** - * Checks if value is inside the range. - */ - function inRange(val, min, max, threshold){ - threshold = threshold || 0; - return (val + threshold >= min && val - threshold <= max); - } - - module.exports = inRange; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/isNear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/isNear.js deleted file mode 100644 index 45486b6d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/isNear.js +++ /dev/null @@ -1,9 +0,0 @@ - - /** - * Check if value is close to target. - */ - function isNear(val, target, threshold){ - return (Math.abs(val - target) <= threshold); - } - module.exports = isNear; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/lerp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/lerp.js deleted file mode 100644 index 111e2717..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/lerp.js +++ /dev/null @@ -1,11 +0,0 @@ - - /** - * Linear interpolation. - * IMPORTANT:will return `Infinity` if numbers overflow Number.MAX_VALUE - */ - function lerp(ratio, start, end){ - return start + (end - start) * ratio; - } - - module.exports = lerp; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/loop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/loop.js deleted file mode 100644 index 35207c1a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/loop.js +++ /dev/null @@ -1,10 +0,0 @@ - - /** - * Loops value inside range. - */ - function loop(val, min, max){ - return val < min? max : (val > max? min : val); - } - - module.exports = loop; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/map.js deleted file mode 100644 index 96c4b787..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/map.js +++ /dev/null @@ -1,11 +0,0 @@ -var lerp = require('./lerp'); -var norm = require('./norm'); - /** - * Maps a number from one scale to another. - * @example map(3, 0, 4, -1, 1) -> 0.5 - */ - function map(val, min1, max1, min2, max2){ - return lerp( norm(val, min1, max1), min2, max2 ); - } - module.exports = map; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/norm.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/norm.js deleted file mode 100644 index 54caf78a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/norm.js +++ /dev/null @@ -1,9 +0,0 @@ - - /** - * Gets normalized ratio of value inside range. - */ - function norm(val, min, max){ - return (val - min) / (max - min); - } - module.exports = norm; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/round.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/round.js deleted file mode 100644 index d108e6cd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/math/round.js +++ /dev/null @@ -1,12 +0,0 @@ - - /** - * Round number to a specific radix - */ - function round(value, radix){ - radix = radix || 1; // default round 1 - return Math.round(value / radix) * radix; - } - - module.exports = round; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number.js deleted file mode 100644 index 0b6186cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number.js +++ /dev/null @@ -1,21 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'MAX_INT' : require('./number/MAX_INT'), - 'MAX_UINT' : require('./number/MAX_UINT'), - 'MIN_INT' : require('./number/MIN_INT'), - 'abbreviate' : require('./number/abbreviate'), - 'currencyFormat' : require('./number/currencyFormat'), - 'enforcePrecision' : require('./number/enforcePrecision'), - 'pad' : require('./number/pad'), - 'rol' : require('./number/rol'), - 'ror' : require('./number/ror'), - 'sign' : require('./number/sign'), - 'toInt' : require('./number/toInt'), - 'toUInt' : require('./number/toUInt'), - 'toUInt31' : require('./number/toUInt31') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/MAX_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/MAX_INT.js deleted file mode 100644 index 1d6f0e48..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/MAX_INT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Maximum 32-bit signed integer value. (2^31 - 1) - */ - - module.exports = 2147483647; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/MAX_UINT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/MAX_UINT.js deleted file mode 100644 index 700da0f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/MAX_UINT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Maximum 32-bit unsigned integet value (2^32 - 1) - */ - - module.exports = 4294967295; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/MIN_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/MIN_INT.js deleted file mode 100644 index b34ab2ce..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/MIN_INT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Minimum 32-bit signed integer value (-2^31). - */ - - module.exports = -2147483648; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/abbreviate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/abbreviate.js deleted file mode 100644 index dd6716b9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/abbreviate.js +++ /dev/null @@ -1,35 +0,0 @@ -var enforcePrecision = require('./enforcePrecision'); - - var _defaultDict = { - thousand : 'K', - million : 'M', - billion : 'B' - }; - - /** - * Abbreviate number if bigger than 1000. (eg: 2.5K, 17.5M, 3.4B, ...) - */ - function abbreviateNumber(val, nDecimals, dict){ - nDecimals = nDecimals != null? nDecimals : 1; - dict = dict || _defaultDict; - val = enforcePrecision(val, nDecimals); - - var str, mod; - - if (val < 1000000) { - mod = enforcePrecision(val / 1000, nDecimals); - // might overflow to next scale during rounding - str = mod < 1000? mod + dict.thousand : 1 + dict.million; - } else if (val < 1000000000) { - mod = enforcePrecision(val / 1000000, nDecimals); - str = mod < 1000? mod + dict.million : 1 + dict.billion; - } else { - str = enforcePrecision(val / 1000000000, nDecimals) + dict.billion; - } - - return str; - } - - module.exports = abbreviateNumber; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/currencyFormat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/currencyFormat.js deleted file mode 100644 index c85a6685..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/currencyFormat.js +++ /dev/null @@ -1,27 +0,0 @@ -var toNumber = require('../lang/toNumber'); - - /** - * Converts number into currency format - */ - function currencyFormat(val, nDecimalDigits, decimalSeparator, thousandsSeparator) { - val = toNumber(val); - nDecimalDigits = nDecimalDigits == null? 2 : nDecimalDigits; - decimalSeparator = decimalSeparator == null? '.' : decimalSeparator; - thousandsSeparator = thousandsSeparator == null? ',' : thousandsSeparator; - - //can't use enforce precision since it returns a number and we are - //doing a RegExp over the string - var fixed = val.toFixed(nDecimalDigits), - //separate begin [$1], middle [$2] and decimal digits [$4] - parts = new RegExp('^(-?\\d{1,3})((?:\\d{3})+)(\\.(\\d{'+ nDecimalDigits +'}))?$').exec( fixed ); - - if(parts){ //val >= 1000 || val <= -1000 - return parts[1] + parts[2].replace(/\d{3}/g, thousandsSeparator + '$&') + (parts[4] ? decimalSeparator + parts[4] : ''); - }else{ - return fixed.replace('.', decimalSeparator); - } - } - - module.exports = currencyFormat; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/enforcePrecision.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/enforcePrecision.js deleted file mode 100644 index 3d3b2d40..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/enforcePrecision.js +++ /dev/null @@ -1,12 +0,0 @@ -var toNumber = require('../lang/toNumber'); - /** - * Enforce a specific amount of decimal digits and also fix floating - * point rounding issues. - */ - function enforcePrecision(val, nDecimalDigits){ - val = toNumber(val); - var pow = Math.pow(10, nDecimalDigits); - return +(Math.round(val * pow) / pow).toFixed(nDecimalDigits); - } - module.exports = enforcePrecision; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/pad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/pad.js deleted file mode 100644 index 1f83af45..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/pad.js +++ /dev/null @@ -1,14 +0,0 @@ -var lpad = require('../string/lpad'); -var toNumber = require('../lang/toNumber'); - - /** - * Add padding zeros if n.length < minLength. - */ - function pad(n, minLength, char){ - n = toNumber(n); - return lpad(''+ n, minLength, char || '0'); - } - - module.exports = pad; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/rol.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/rol.js deleted file mode 100644 index ecd58da4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/rol.js +++ /dev/null @@ -1,10 +0,0 @@ - - /** - * Bitwise circular shift left - * http://en.wikipedia.org/wiki/Circular_shift - */ - function rol(val, shift){ - return (val << shift) | (val >> (32 - shift)); - } - module.exports = rol; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/ror.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/ror.js deleted file mode 100644 index 2eda81da..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/ror.js +++ /dev/null @@ -1,10 +0,0 @@ - - /** - * Bitwise circular shift right - * http://en.wikipedia.org/wiki/Circular_shift - */ - function ror(val, shift){ - return (val >> shift) | (val << (32 - shift)); - } - module.exports = ror; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/sign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/sign.js deleted file mode 100644 index 7f9a1e2f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/sign.js +++ /dev/null @@ -1,15 +0,0 @@ -var toNumber = require('../lang/toNumber'); - - /** - * Get sign of the value. - */ - function sign(val) { - var num = toNumber(val); - if (num === 0) return num; // +0 and +0 === 0 - if (isNaN(num)) return num; // NaN - return num < 0? -1 : 1; - } - - module.exports = sign; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/toInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/toInt.js deleted file mode 100644 index 72fd7de4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/toInt.js +++ /dev/null @@ -1,17 +0,0 @@ - - - /** - * "Convert" value into an 32-bit integer. - * Works like `Math.floor` if val > 0 and `Math.ceil` if val < 0. - * IMPORTANT: val will wrap at 2^31 and -2^31. - * Perf tests: http://jsperf.com/vs-vs-parseint-bitwise-operators/7 - */ - function toInt(val){ - // we do not use lang/toNumber because of perf and also because it - // doesn't break the functionality - return ~~val; - } - - module.exports = toInt; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/toUInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/toUInt.js deleted file mode 100644 index d2796563..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/toUInt.js +++ /dev/null @@ -1,15 +0,0 @@ - - - /** - * "Convert" value into a 32-bit unsigned integer. - * IMPORTANT: Value will wrap at 2^32. - */ - function toUInt(val){ - // we do not use lang/toNumber because of perf and also because it - // doesn't break the functionality - return val >>> 0; - } - - module.exports = toUInt; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/toUInt31.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/toUInt31.js deleted file mode 100644 index 6cd3bb52..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/number/toUInt31.js +++ /dev/null @@ -1,15 +0,0 @@ -var MAX_INT = require('./MAX_INT'); - - /** - * "Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). - * IMPORTANT: value wil wrap at 2^31, if negative will return 0. - */ - function toUInt31(val){ - // we do not use lang/toNumber because of perf and also because it - // doesn't break the functionality - return (val <= 0)? 0 : (val > MAX_INT? ~~(val % (MAX_INT + 1)) : ~~val); - } - - module.exports = toUInt31; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object.js deleted file mode 100644 index 76c06424..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object.js +++ /dev/null @@ -1,42 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'bindAll' : require('./object/bindAll'), - 'contains' : require('./object/contains'), - 'deepEquals' : require('./object/deepEquals'), - 'deepFillIn' : require('./object/deepFillIn'), - 'deepMatches' : require('./object/deepMatches'), - 'deepMixIn' : require('./object/deepMixIn'), - 'equals' : require('./object/equals'), - 'every' : require('./object/every'), - 'fillIn' : require('./object/fillIn'), - 'filter' : require('./object/filter'), - 'find' : require('./object/find'), - 'forIn' : require('./object/forIn'), - 'forOwn' : require('./object/forOwn'), - 'functions' : require('./object/functions'), - 'get' : require('./object/get'), - 'has' : require('./object/has'), - 'hasOwn' : require('./object/hasOwn'), - 'keys' : require('./object/keys'), - 'map' : require('./object/map'), - 'matches' : require('./object/matches'), - 'max' : require('./object/max'), - 'merge' : require('./object/merge'), - 'min' : require('./object/min'), - 'mixIn' : require('./object/mixIn'), - 'namespace' : require('./object/namespace'), - 'pick' : require('./object/pick'), - 'pluck' : require('./object/pluck'), - 'reduce' : require('./object/reduce'), - 'reject' : require('./object/reject'), - 'set' : require('./object/set'), - 'size' : require('./object/size'), - 'some' : require('./object/some'), - 'unset' : require('./object/unset'), - 'values' : require('./object/values') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/bindAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/bindAll.js deleted file mode 100644 index b2f27d08..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/bindAll.js +++ /dev/null @@ -1,18 +0,0 @@ -var functions = require('./functions'); -var bind = require('../function/bind'); -var forEach = require('../array/forEach'); - - /** - * Binds methods of the object to be run in it's own context. - */ - function bindAll(obj, rest_methodNames){ - var keys = arguments.length > 1? - Array.prototype.slice.call(arguments, 1) : functions(obj); - forEach(keys, function(key){ - obj[key] = bind(obj[key], obj); - }); - } - - module.exports = bindAll; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/contains.js deleted file mode 100644 index 8076e2c5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/contains.js +++ /dev/null @@ -1,13 +0,0 @@ -var some = require('./some'); - - /** - * Check if object contains value - */ - function contains(obj, needle) { - return some(obj, function(val) { - return (val === needle); - }); - } - module.exports = contains; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/deepEquals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/deepEquals.js deleted file mode 100644 index fcde9449..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/deepEquals.js +++ /dev/null @@ -1,27 +0,0 @@ -var isObject = require('../lang/isObject'); -var equals = require('./equals'); - - function defaultCompare(a, b) { - return a === b; - } - - /** - * Recursively checks for same properties and values. - */ - function deepEquals(a, b, callback){ - callback = callback || defaultCompare; - - if (!isObject(a) || !isObject(b)) { - return callback(a, b); - } - - function compare(a, b){ - return deepEquals(a, b, callback); - } - - return equals(a, b, compare); - } - - module.exports = deepEquals; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/deepFillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/deepFillIn.js deleted file mode 100644 index 6568ea87..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/deepFillIn.js +++ /dev/null @@ -1,33 +0,0 @@ -var forOwn = require('./forOwn'); -var isPlainObject = require('../lang/isPlainObject'); - - /** - * Deeply copy missing properties in the target from the defaults. - */ - function deepFillIn(target, defaults){ - var i = 0, - n = arguments.length, - obj; - - while(++i < n) { - obj = arguments[i]; - if (obj) { - // jshint loopfunc: true - forOwn(obj, function(newValue, key) { - var curValue = target[key]; - if (curValue == null) { - target[key] = newValue; - } else if (isPlainObject(curValue) && - isPlainObject(newValue)) { - deepFillIn(curValue, newValue); - } - }); - } - } - - return target; - } - - module.exports = deepFillIn; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/deepMatches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/deepMatches.js deleted file mode 100644 index 3366c52d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/deepMatches.js +++ /dev/null @@ -1,55 +0,0 @@ -var forOwn = require('./forOwn'); -var isArray = require('../lang/isArray'); - - function containsMatch(array, pattern) { - var i = -1, length = array.length; - while (++i < length) { - if (deepMatches(array[i], pattern)) { - return true; - } - } - - return false; - } - - function matchArray(target, pattern) { - var i = -1, patternLength = pattern.length; - while (++i < patternLength) { - if (!containsMatch(target, pattern[i])) { - return false; - } - } - - return true; - } - - function matchObject(target, pattern) { - var result = true; - forOwn(pattern, function(val, key) { - if (!deepMatches(target[key], val)) { - // Return false to break out of forOwn early - return (result = false); - } - }); - - return result; - } - - /** - * Recursively check if the objects match. - */ - function deepMatches(target, pattern){ - if (target && typeof target === 'object') { - if (isArray(target) && isArray(pattern)) { - return matchArray(target, pattern); - } else { - return matchObject(target, pattern); - } - } else { - return target === pattern; - } - } - - module.exports = deepMatches; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/deepMixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/deepMixIn.js deleted file mode 100644 index a97e98d0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/deepMixIn.js +++ /dev/null @@ -1,34 +0,0 @@ -var forOwn = require('./forOwn'); -var isPlainObject = require('../lang/isPlainObject'); - - /** - * Mixes objects into the target object, recursively mixing existing child - * objects. - */ - function deepMixIn(target, objects) { - var i = 0, - n = arguments.length, - obj; - - while(++i < n){ - obj = arguments[i]; - if (obj) { - forOwn(obj, copyProp, target); - } - } - - return target; - } - - function copyProp(val, key) { - var existing = this[key]; - if (isPlainObject(val) && isPlainObject(existing)) { - deepMixIn(existing, val); - } else { - this[key] = val; - } - } - - module.exports = deepMixIn; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/equals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/equals.js deleted file mode 100644 index f50cbe4e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/equals.js +++ /dev/null @@ -1,36 +0,0 @@ -var hasOwn = require('./hasOwn'); -var every = require('./every'); -var isObject = require('../lang/isObject'); - - function defaultCompare(a, b) { - return a === b; - } - - // Makes a function to compare the object values from the specified compare - // operation callback. - function makeCompare(callback) { - return function(value, key) { - return hasOwn(this, key) && callback(value, this[key]); - }; - } - - function checkProperties(value, key) { - return hasOwn(this, key); - } - - /** - * Checks if two objects have the same keys and values. - */ - function equals(a, b, callback) { - callback = callback || defaultCompare; - - if (!isObject(a) || !isObject(b)) { - return callback(a, b); - } - - return (every(a, makeCompare(callback), b) && - every(b, checkProperties, a)); - } - - module.exports = equals; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/every.js deleted file mode 100644 index 01106e5f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/every.js +++ /dev/null @@ -1,23 +0,0 @@ -var forOwn = require('./forOwn'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Object every - */ - function every(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = true; - forOwn(obj, function(val, key) { - // we consider any falsy values as "false" on purpose so shorthand - // syntax can be used to check property existence - if (!callback(val, key, obj)) { - result = false; - return false; // break - } - }); - return result; - } - - module.exports = every; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/fillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/fillIn.js deleted file mode 100644 index 80dcdf07..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/fillIn.js +++ /dev/null @@ -1,20 +0,0 @@ -var forEach = require('../array/forEach'); -var forOwn = require('./forOwn'); - - /** - * Copy missing properties in the obj from the defaults. - */ - function fillIn(obj, var_defaults){ - forEach(Array.prototype.slice.call(arguments, 1), function(base){ - forOwn(base, function(val, key){ - if (obj[key] == null) { - obj[key] = val; - } - }); - }); - return obj; - } - - module.exports = fillIn; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/filter.js deleted file mode 100644 index 3a83a92f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/filter.js +++ /dev/null @@ -1,20 +0,0 @@ -var forOwn = require('./forOwn'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Creates a new object with all the properties where the callback returns - * true. - */ - function filterValues(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var output = {}; - forOwn(obj, function(value, key, obj) { - if (callback(value, key, obj)) { - output[key] = value; - } - }); - - return output; - } - module.exports = filterValues; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/find.js deleted file mode 100644 index d39c0706..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/find.js +++ /dev/null @@ -1,21 +0,0 @@ -var some = require('./some'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Returns first item that matches criteria - */ - function find(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result; - some(obj, function(value, key, obj) { - if (callback(value, key, obj)) { - result = value; - return true; //break - } - }); - return result; - } - - module.exports = find; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/forIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/forIn.js deleted file mode 100644 index 367f08ca..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/forIn.js +++ /dev/null @@ -1,62 +0,0 @@ - - - var _hasDontEnumBug, - _dontEnums; - - function checkDontEnum(){ - _dontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' - ]; - - _hasDontEnumBug = true; - - for (var key in {'toString': null}) { - _hasDontEnumBug = false; - } - } - - /** - * Similar to Array/forEach but works over object properties and fixes Don't - * Enum bug on IE. - * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation - */ - function forIn(obj, fn, thisObj){ - var key, i = 0; - // no need to check if argument is a real object that way we can use - // it for arrays, functions, date, etc. - - //post-pone check till needed - if (_hasDontEnumBug == null) checkDontEnum(); - - for (key in obj) { - if (exec(fn, obj, key, thisObj) === false) { - break; - } - } - - if (_hasDontEnumBug) { - while (key = _dontEnums[i++]) { - // since we aren't using hasOwn check we need to make sure the - // property was overwritten - if (obj[key] !== Object.prototype[key]) { - if (exec(fn, obj, key, thisObj) === false) { - break; - } - } - } - } - } - - function exec(fn, obj, key, thisObj){ - return fn.call(thisObj, obj[key], key, obj); - } - - module.exports = forIn; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/forOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/forOwn.js deleted file mode 100644 index 5f2dfbfc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/forOwn.js +++ /dev/null @@ -1,19 +0,0 @@ -var hasOwn = require('./hasOwn'); -var forIn = require('./forIn'); - - /** - * Similar to Array/forEach but works over object properties and fixes Don't - * Enum bug on IE. - * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation - */ - function forOwn(obj, fn, thisObj){ - forIn(obj, function(val, key){ - if (hasOwn(obj, key)) { - return fn.call(thisObj, obj[key], key, obj); - } - }); - } - - module.exports = forOwn; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/functions.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/functions.js deleted file mode 100644 index f5717979..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/functions.js +++ /dev/null @@ -1,18 +0,0 @@ -var forIn = require('./forIn'); - - /** - * return a list of all enumerable properties that have function values - */ - function functions(obj){ - var keys = []; - forIn(obj, function(val, key){ - if (typeof val === 'function'){ - keys.push(key); - } - }); - return keys.sort(); - } - - module.exports = functions; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/get.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/get.js deleted file mode 100644 index 7cf9d9bd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/get.js +++ /dev/null @@ -1,20 +0,0 @@ - - - /** - * get "nested" object property - */ - function get(obj, prop){ - var parts = prop.split('.'), - last = parts.pop(); - - while (prop = parts.shift()) { - obj = obj[prop]; - if (typeof obj !== 'object' || !obj) return; - } - - return obj[last]; - } - - module.exports = get; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/has.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/has.js deleted file mode 100644 index ca9f2289..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/has.js +++ /dev/null @@ -1,15 +0,0 @@ -var get = require('./get'); - - var UNDEF; - - /** - * Check if object has nested property. - */ - function has(obj, prop){ - return get(obj, prop) !== UNDEF; - } - - module.exports = has; - - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/hasOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/hasOwn.js deleted file mode 100644 index 7e3c82ae..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/hasOwn.js +++ /dev/null @@ -1,12 +0,0 @@ - - - /** - * Safer Object.hasOwnProperty - */ - function hasOwn(obj, prop){ - return Object.prototype.hasOwnProperty.call(obj, prop); - } - - module.exports = hasOwn; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/keys.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/keys.js deleted file mode 100644 index dd2f4f55..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/keys.js +++ /dev/null @@ -1,16 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * Get object keys - */ - var keys = Object.keys || function (obj) { - var keys = []; - forOwn(obj, function(val, key){ - keys.push(key); - }); - return keys; - }; - - module.exports = keys; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/map.js deleted file mode 100644 index dd449a78..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/map.js +++ /dev/null @@ -1,18 +0,0 @@ -var forOwn = require('./forOwn'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Creates a new object where all the values are the result of calling - * `callback`. - */ - function mapValues(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var output = {}; - forOwn(obj, function(val, key, obj) { - output[key] = callback(val, key, obj); - }); - - return output; - } - module.exports = mapValues; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/matches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/matches.js deleted file mode 100644 index 6074faa2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/matches.js +++ /dev/null @@ -1,20 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * checks if a object contains all given properties/values - */ - function matches(target, props){ - // can't use "object/every" because of circular dependency - var result = true; - forOwn(props, function(val, key){ - if (target[key] !== val) { - // break loop at first difference - return (result = false); - } - }); - return result; - } - - module.exports = matches; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/max.js deleted file mode 100644 index 3e8e92c7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/max.js +++ /dev/null @@ -1,12 +0,0 @@ -var arrMax = require('../array/max'); -var values = require('./values'); - - /** - * Returns maximum value inside object. - */ - function max(obj, compareFn) { - return arrMax(values(obj), compareFn); - } - - module.exports = max; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/merge.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/merge.js deleted file mode 100644 index 6961f608..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/merge.js +++ /dev/null @@ -1,40 +0,0 @@ -var hasOwn = require('./hasOwn'); -var deepClone = require('../lang/deepClone'); -var isObject = require('../lang/isObject'); - - /** - * Deep merge objects. - */ - function merge() { - var i = 1, - key, val, obj, target; - - // make sure we don't modify source element and it's properties - // objects are passed by reference - target = deepClone( arguments[0] ); - - while (obj = arguments[i++]) { - for (key in obj) { - if ( ! hasOwn(obj, key) ) { - continue; - } - - val = obj[key]; - - if ( isObject(val) && isObject(target[key]) ){ - // inception, deep merge objects - target[key] = merge(target[key], val); - } else { - // make sure arrays, regexp, date, objects are cloned - target[key] = deepClone(val); - } - - } - } - - return target; - } - - module.exports = merge; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/min.js deleted file mode 100644 index e1e66976..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/min.js +++ /dev/null @@ -1,12 +0,0 @@ -var arrMin = require('../array/min'); -var values = require('./values'); - - /** - * Returns minimum value inside object. - */ - function min(obj, iterator) { - return arrMin(values(obj), iterator); - } - - module.exports = min; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/mixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/mixIn.js deleted file mode 100644 index 55ec8fd5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/mixIn.js +++ /dev/null @@ -1,28 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * Combine properties from all the objects into first one. - * - This method affects target object in place, if you want to create a new Object pass an empty object as first param. - * @param {object} target Target Object - * @param {...object} objects Objects to be combined (0...n objects). - * @return {object} Target Object. - */ - function mixIn(target, objects){ - var i = 0, - n = arguments.length, - obj; - while(++i < n){ - obj = arguments[i]; - if (obj != null) { - forOwn(obj, copyProp, target); - } - } - return target; - } - - function copyProp(val, key){ - this[key] = val; - } - - module.exports = mixIn; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/namespace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/namespace.js deleted file mode 100644 index c6e79f63..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/namespace.js +++ /dev/null @@ -1,19 +0,0 @@ -var forEach = require('../array/forEach'); - - /** - * Create nested object if non-existent - */ - function namespace(obj, path){ - if (!path) return obj; - forEach(path.split('.'), function(key){ - if (!obj[key]) { - obj[key] = {}; - } - obj = obj[key]; - }); - return obj; - } - - module.exports = namespace; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/pick.js deleted file mode 100644 index 74e56f98..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/pick.js +++ /dev/null @@ -1,18 +0,0 @@ - - - /** - * Return a copy of the object, filtered to only have values for the whitelisted keys. - */ - function pick(obj, var_keys){ - var keys = typeof arguments[1] !== 'string'? arguments[1] : Array.prototype.slice.call(arguments, 1), - out = {}, - i = 0, key; - while (key = keys[i++]) { - out[key] = obj[key]; - } - return out; - } - - module.exports = pick; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/pluck.js deleted file mode 100644 index e844df47..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/pluck.js +++ /dev/null @@ -1,13 +0,0 @@ -var map = require('./map'); -var prop = require('../function/prop'); - - /** - * Extract a list of property values. - */ - function pluck(obj, propName){ - return map(obj, prop(propName)); - } - - module.exports = pluck; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/reduce.js deleted file mode 100644 index 6f19a3a2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/reduce.js +++ /dev/null @@ -1,29 +0,0 @@ -var forOwn = require('./forOwn'); -var size = require('./size'); - - /** - * Object reduce - */ - function reduce(obj, callback, memo, thisObj) { - var initial = arguments.length > 2; - - if (!size(obj) && !initial) { - throw new Error('reduce of empty object with no initial value'); - } - - forOwn(obj, function(value, key, list) { - if (!initial) { - memo = value; - initial = true; - } - else { - memo = callback.call(thisObj, memo, value, key, list); - } - }); - - return memo; - } - - module.exports = reduce; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/reject.js deleted file mode 100644 index 74643795..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/reject.js +++ /dev/null @@ -1,16 +0,0 @@ -var filter = require('./filter'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Object reject - */ - function reject(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - return filter(obj, function(value, index, obj) { - return !callback(value, index, obj); - }, thisObj); - } - - module.exports = reject; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/set.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/set.js deleted file mode 100644 index 9b3cdc48..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/set.js +++ /dev/null @@ -1,17 +0,0 @@ -var namespace = require('./namespace'); - - /** - * set "nested" object property - */ - function set(obj, prop, val){ - var parts = (/^(.+)\.(.+)$/).exec(prop); - if (parts){ - namespace(obj, parts[1])[parts[2]] = val; - } else { - obj[prop] = val; - } - } - - module.exports = set; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/size.js deleted file mode 100644 index 97885953..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/size.js +++ /dev/null @@ -1,16 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * Get object size - */ - function size(obj) { - var count = 0; - forOwn(obj, function(){ - count++; - }); - return count; - } - - module.exports = size; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/some.js deleted file mode 100644 index 384c6f3c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/some.js +++ /dev/null @@ -1,21 +0,0 @@ -var forOwn = require('./forOwn'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Object some - */ - function some(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = false; - forOwn(obj, function(val, key) { - if (callback(val, key, obj)) { - result = true; - return false; // break - } - }); - return result; - } - - module.exports = some; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/unset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/unset.js deleted file mode 100644 index 343bca0a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/unset.js +++ /dev/null @@ -1,23 +0,0 @@ -var has = require('./has'); - - /** - * Unset object property. - */ - function unset(obj, prop){ - if (has(obj, prop)) { - var parts = prop.split('.'), - last = parts.pop(); - while (prop = parts.shift()) { - obj = obj[prop]; - } - return (delete obj[last]); - - } else { - // if property doesn't exist treat as deleted - return true; - } - } - - module.exports = unset; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/values.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/values.js deleted file mode 100644 index 265a6938..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/object/values.js +++ /dev/null @@ -1,16 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * Get object values - */ - function values(obj) { - var vals = []; - forOwn(obj, function(val, key){ - vals.push(val); - }); - return vals; - } - - module.exports = values; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/package.json deleted file mode 100644 index c4fabf3e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/package.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "name": "mout", - "description": "Modular Utilities", - "version": "0.7.1", - "homepage": "http://moutjs.com/", - "contributors": [ - { - "name": "Adam Nowotny" - }, - { - "name": "André Cruz", - "email": "amdfcruz@gmail.com" - }, - { - "name": "Conrad Zimmerman", - "url": "http://www.conradz.com" - }, - { - "name": "Friedemann Altrock", - "email": "frodenius@gmail.com" - }, - { - "name": "Jarrod Overson", - "url": "http://jarrodoverson.com" - }, - { - "name": "Miller Medeiros", - "email": "contact@millermedeiros.com", - "url": "http://blog.millermedeiros.com" - }, - { - "name": "Zach Shipley" - } - ], - "keywords": [ - "utilities", - "functional", - "amd-utils", - "stdlib" - ], - "repository": { - "type": "git", - "url": "git://github.com/mout/mout.git" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://www.opensource.org/licenses/mit-license.php" - } - ], - "bugs": { - "url": "https://github.com/mout/mout/issues/" - }, - "main": "./index.js", - "scripts": { - "prepublish": "node build cjs .", - "pretest": "node build pkg", - "test": "node node_modules/istanbul/lib/cli test tests/runner.js --hook-run-in-context" - }, - "directories": { - "doc": "./doc" - }, - "devDependencies": { - "istanbul": "~0.1.27", - "jasmine-node": "~1.2.2", - "requirejs": "2.x", - "nodefy": "*", - "mdoc": "~0.3.2", - "handlebars": "~1.0.6", - "commander": "~1.0.5", - "rocambole": "~0.2.3", - "jshint": "2.x" - }, - "testling": { - "preprocess": "node build testling", - "browsers": { - "ie": [ - 7, - 8, - 9, - 10 - ], - "firefox": [ - 17, - "nightly" - ], - "chrome": [ - 23, - "canary" - ], - "opera": [ - 12, - "next" - ], - "safari": [ - 5.1, - 6 - ], - "iphone": [ - 6 - ], - "ipad": [ - 6 - ] - }, - "scripts": [ - "tests/lib/jasmine/jasmine.js", - "tests/lib/jasmine/jasmine.async.js", - "tests/lib/jasmine/jasmine-tap.js", - "tests/lib/requirejs/require.js", - "tests/testling/src.js", - "tests/testling/specs.js", - "tests/runner.js" - ] - }, - "readme": "![mout](http://moutjs.com/logo.png \"Modular JavaScript Utilties\")\n\nhttp://moutjs.com/\n\n[![Build Status](https://travis-ci.org/mout/mout.png?branch=master)](https://travis-ci.org/mout/mout)\n\nAll code is library agnostic and consist mostly of helper methods that aren't\ndirectly related with the DOM, the purpose of this library isn't to replace\nDojo, jQuery, YUI, Mootools, etc, but to provide modular solutions for common\nproblems that aren't solved by most of them. Consider it as a crossbrowser\nJavaScript standard library.\n\n\n\n## Main goals ##\n\n - increase code reuse;\n - be clear (code should be clean/readable);\n - be easy to debug;\n - be easy to maintain;\n - follow best practices;\n - follow standards when possible;\n - **don't convert JavaScript into another language!**\n - be compatible with other frameworks;\n - be modular;\n - have unit tests for all modules;\n - work on multiple environments (IE7+, modern browsers, node.js);\n\n\n\n## What shouldn't be here ##\n\n - UI components;\n - CSS selector engine;\n - Event system - pub/sub;\n - Template engine;\n - Anything that isn't generic enough to be on a standard library;\n - Anything that could be a separate library and/or isn't a modular utility...\n\n\n\n## API Documentation ##\n\nOnline documentation can be found at http://moutjs.com/ or inside the\n`doc` folder.\n\n\n\n## FAQ / Wiki / IRC ##\n\nFor more info about project structure, design decisions, tips, how to\ncontribute, build system, etc, please check the [project\nwiki](https://github.com/mout/mout/wiki).\n\nWe also have an IRC channel [#moutjs on\nirc.freenode.net](http://webchat.freenode.net/?channels=moutjs)\n\n\n\n## License ##\n\nReleased under the [MIT License](http://www.opensource.org/licenses/mit-license.php).\n\n", - "readmeFilename": "README.md", - "_id": "mout@0.7.1", - "dist": { - "shasum": "218de2b0880b220d99f4fbaee3fc0c3a5310bda8" - }, - "_from": "mout@~0.7.1", - "_resolved": "https://registry.npmjs.org/mout/-/mout-0.7.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/queryString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/queryString.js deleted file mode 100644 index 22685a7f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/queryString.js +++ /dev/null @@ -1,15 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'contains' : require('./queryString/contains'), - 'decode' : require('./queryString/decode'), - 'encode' : require('./queryString/encode'), - 'getParam' : require('./queryString/getParam'), - 'getQuery' : require('./queryString/getQuery'), - 'parse' : require('./queryString/parse'), - 'setParam' : require('./queryString/setParam') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/queryString/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/queryString/contains.js deleted file mode 100644 index da678cf4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/queryString/contains.js +++ /dev/null @@ -1,12 +0,0 @@ -var getQuery = require('./getQuery'); - - /** - * Checks if query string contains parameter. - */ - function contains(url, paramName) { - var regex = new RegExp('(\\?|&)'+ paramName +'=', 'g'); //matches `?param=` or `¶m=` - return regex.test(getQuery(url)); - } - - module.exports = contains; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/queryString/decode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/queryString/decode.js deleted file mode 100644 index 1c15785b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/queryString/decode.js +++ /dev/null @@ -1,38 +0,0 @@ -var typecast = require('../string/typecast'); -var isString = require('../lang/isString'); -var isArray = require('../lang/isArray'); -var hasOwn = require('../object/hasOwn'); - - /** - * Decode query string into an object of keys => vals. - */ - function decode(queryStr, shouldTypecast) { - var queryArr = (queryStr || '').replace('?', '').split('&'), - count = -1, - length = queryArr.length, - obj = {}, - item, pValue, pName, toSet; - - while (++count < length) { - item = queryArr[count].split('='); - pName = item[0]; - if (!pName || !pName.length){ - continue; - } - pValue = shouldTypecast === false ? item[1] : typecast(item[1]); - toSet = isString(pValue) ? decodeURIComponent(pValue) : pValue; - if (hasOwn(obj,pName)){ - if(isArray(obj[pName])){ - obj[pName].push(toSet); - } else { - obj[pName] = [obj[pName],toSet]; - } - } else { - obj[pName] = toSet; - } - } - return obj; - } - - module.exports = decode; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/queryString/encode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/queryString/encode.js deleted file mode 100644 index 3a4fd0a6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/queryString/encode.js +++ /dev/null @@ -1,27 +0,0 @@ -var forOwn = require('../object/forOwn'); -var isArray = require('../lang/isArray'); -var forEach = require('../array/forEach'); - - /** - * Encode object into a query string. - */ - function encode(obj){ - var query = [], - arrValues, reg; - forOwn(obj, function (val, key) { - if (isArray(val)) { - arrValues = key + '='; - reg = new RegExp('&'+key+'+=$'); - forEach(val, function (aValue) { - arrValues += encodeURIComponent(aValue) + '&' + key + '='; - }); - query.push(arrValues.replace(reg, '')); - } else { - query.push(key + '=' + encodeURIComponent(val)); - } - }); - return (query.length) ? '?' + query.join('&') : ''; - } - - module.exports = encode; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/queryString/getParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/queryString/getParam.js deleted file mode 100644 index f149c3ea..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/queryString/getParam.js +++ /dev/null @@ -1,15 +0,0 @@ -var typecast = require('../string/typecast'); -var getQuery = require('./getQuery'); - - /** - * Get query parameter value. - */ - function getParam(url, param, shouldTypecast){ - var regexp = new RegExp('(\\?|&)'+ param + '=([^&]*)'), //matches `?param=value` or `¶m=value`, value = $2 - result = regexp.exec( getQuery(url) ), - val = (result && result[2])? result[2] : null; - return shouldTypecast === false? val : typecast(val); - } - - module.exports = getParam; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/queryString/getQuery.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/queryString/getQuery.js deleted file mode 100644 index 5194af2d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/queryString/getQuery.js +++ /dev/null @@ -1,13 +0,0 @@ - - - /** - * Gets full query as string with all special chars decoded. - */ - function getQuery(url) { - url = url.replace(/#.*/, ''); //removes hash (to avoid getting hash query) - var queryString = /\?[a-zA-Z0-9\=\&\%\$\-\_\.\+\!\*\'\(\)\,]+/.exec(url); //valid chars according to: http://www.ietf.org/rfc/rfc1738.txt - return (queryString)? decodeURIComponent(queryString[0]) : ''; - } - - module.exports = getQuery; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/queryString/parse.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/queryString/parse.js deleted file mode 100644 index 532906c0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/queryString/parse.js +++ /dev/null @@ -1,13 +0,0 @@ -var decode = require('./decode'); -var getQuery = require('./getQuery'); - - /** - * Get query string, parses and decodes it. - */ - function parse(url, shouldTypecast) { - return decode(getQuery(url), shouldTypecast); - } - - module.exports = parse; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/queryString/setParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/queryString/setParam.js deleted file mode 100644 index 052a9ba6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/queryString/setParam.js +++ /dev/null @@ -1,28 +0,0 @@ - - - /** - * Set query string parameter value - */ - function setParam(url, paramName, value){ - url = url || ''; - - var re = new RegExp('(\\?|&)'+ paramName +'=[^&]*' ); - var param = paramName +'='+ encodeURIComponent( value ); - - if ( re.test(url) ) { - return url.replace(re, '$1'+ param); - } else { - if (url.indexOf('?') === -1) { - url += '?'; - } - if (url.indexOf('=') !== -1) { - url += '&'; - } - return url + param; - } - - } - - module.exports = setParam; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random.js deleted file mode 100644 index d9267f01..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random.js +++ /dev/null @@ -1,16 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'choice' : require('./random/choice'), - 'guid' : require('./random/guid'), - 'rand' : require('./random/rand'), - 'randBit' : require('./random/randBit'), - 'randHex' : require('./random/randHex'), - 'randInt' : require('./random/randInt'), - 'randSign' : require('./random/randSign'), - 'random' : require('./random/random') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random/choice.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random/choice.js deleted file mode 100644 index 51aa82a2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random/choice.js +++ /dev/null @@ -1,15 +0,0 @@ -var randInt = require('./randInt'); -var isArray = require('../lang/isArray'); - - /** - * Returns a random element from the supplied arguments - * or from the array (if single argument is an array). - */ - function choice(items) { - var target = (arguments.length === 1 && isArray(items))? items : arguments; - return target[ randInt(0, target.length - 1) ]; - } - - module.exports = choice; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random/guid.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random/guid.js deleted file mode 100644 index 41f6eddc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random/guid.js +++ /dev/null @@ -1,24 +0,0 @@ -var randHex = require('./randHex'); -var choice = require('./choice'); - - /** - * Returns pseudo-random guid (UUID v4) - * IMPORTANT: it's not totally "safe" since randHex/choice uses Math.random - * by default and sequences can be predicted in some cases. See the - * "random/random" documentation for more info about it and how to replace - * the default PRNG. - */ - function guid() { - return ( - randHex(8)+'-'+ - randHex(4)+'-'+ - // v4 UUID always contain "4" at this position to specify it was - // randomly generated - '4' + randHex(3) +'-'+ - // v4 UUID always contain chars [a,b,8,9] at this position - choice(8, 9, 'a', 'b') + randHex(3)+'-'+ - randHex(12) - ); - } - module.exports = guid; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random/rand.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random/rand.js deleted file mode 100644 index 782dec88..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random/rand.js +++ /dev/null @@ -1,15 +0,0 @@ -var random = require('./random'); -var MIN_INT = require('../number/MIN_INT'); -var MAX_INT = require('../number/MAX_INT'); - - /** - * Returns random number inside range - */ - function rand(min, max){ - min = min == null? MIN_INT : min; - max = max == null? MAX_INT : max; - return min + (max - min) * random(); - } - - module.exports = rand; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random/randBit.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random/randBit.js deleted file mode 100644 index bd20b4a0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random/randBit.js +++ /dev/null @@ -1,11 +0,0 @@ -var random = require('./random'); - - /** - * Returns random bit (0 or 1) - */ - function randomBit() { - return random() > 0.5? 1 : 0; - } - - module.exports = randomBit; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random/randHex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random/randHex.js deleted file mode 100644 index d8d711c3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random/randHex.js +++ /dev/null @@ -1,19 +0,0 @@ -var choice = require('./choice'); - - var _chars = '0123456789abcdef'.split(''); - - /** - * Returns a random hexadecimal string - */ - function randHex(size){ - size = size && size > 0? size : 6; - var str = ''; - while (size--) { - str += choice(_chars); - } - return str; - } - - module.exports = randHex; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random/randInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random/randInt.js deleted file mode 100644 index e237d964..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random/randInt.js +++ /dev/null @@ -1,18 +0,0 @@ -var MIN_INT = require('../number/MIN_INT'); -var MAX_INT = require('../number/MAX_INT'); -var rand = require('./rand'); - - /** - * Gets random integer inside range or snap to min/max values. - */ - function randInt(min, max){ - min = min == null? MIN_INT : ~~min; - max = max == null? MAX_INT : ~~max; - // can't be max + 0.5 otherwise it will round up if `rand` - // returns `max` causing it to overflow range. - // -0.5 and + 0.49 are required to avoid bias caused by rounding - return Math.round( rand(min - 0.5, max + 0.499999999999) ); - } - - module.exports = randInt; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random/randSign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random/randSign.js deleted file mode 100644 index 5a9fed76..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random/randSign.js +++ /dev/null @@ -1,11 +0,0 @@ -var random = require('./random'); - - /** - * Returns random sign (-1 or 1) - */ - function randomSign() { - return random() > 0.5? 1 : -1; - } - - module.exports = randomSign; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random/random.js deleted file mode 100644 index 670a3cc4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/random/random.js +++ /dev/null @@ -1,18 +0,0 @@ - - - /** - * Just a wrapper to Math.random. No methods inside mout/random should call - * Math.random() directly so we can inject the pseudo-random number - * generator if needed (ie. in case we need a seeded random or a better - * algorithm than the native one) - */ - function random(){ - return random.get(); - } - - // we expose the method so it can be swapped if needed - random.get = Math.random; - - module.exports = random; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array.js deleted file mode 100644 index 7bcc961b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array.js +++ /dev/null @@ -1,46 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'append' : require('./array/append'), - 'collect' : require('./array/collect'), - 'combine' : require('./array/combine'), - 'compact' : require('./array/compact'), - 'contains' : require('./array/contains'), - 'difference' : require('./array/difference'), - 'every' : require('./array/every'), - 'filter' : require('./array/filter'), - 'find' : require('./array/find'), - 'findIndex' : require('./array/findIndex'), - 'flatten' : require('./array/flatten'), - 'forEach' : require('./array/forEach'), - 'indexOf' : require('./array/indexOf'), - 'insert' : require('./array/insert'), - 'intersection' : require('./array/intersection'), - 'invoke' : require('./array/invoke'), - 'join' : require('./array/join'), - 'lastIndexOf' : require('./array/lastIndexOf'), - 'map' : require('./array/map'), - 'max' : require('./array/max'), - 'min' : require('./array/min'), - 'pick' : require('./array/pick'), - 'pluck' : require('./array/pluck'), - 'range' : require('./array/range'), - 'reduce' : require('./array/reduce'), - 'reduceRight' : require('./array/reduceRight'), - 'reject' : require('./array/reject'), - 'remove' : require('./array/remove'), - 'removeAll' : require('./array/removeAll'), - 'shuffle' : require('./array/shuffle'), - 'some' : require('./array/some'), - 'sort' : require('./array/sort'), - 'split' : require('./array/split'), - 'toLookup' : require('./array/toLookup'), - 'union' : require('./array/union'), - 'unique' : require('./array/unique'), - 'xor' : require('./array/xor'), - 'zip' : require('./array/zip') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/append.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/append.js deleted file mode 100644 index 549d8754..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/append.js +++ /dev/null @@ -1,21 +0,0 @@ -define(function () { - - /** - * Appends an array to the end of another. - * The first array will be modified. - */ - function append(arr1, arr2) { - if (arr2 == null) { - return arr1; - } - - var pad = arr1.length, - i = -1, - len = arr2.length; - while (++i < len) { - arr1[pad + i] = arr2[i]; - } - return arr1; - } - return append; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/collect.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/collect.js deleted file mode 100644 index 8f60cda2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/collect.js +++ /dev/null @@ -1,26 +0,0 @@ -define(['./append', '../function/makeIterator_'], function (append, makeIterator) { - - /** - * Maps the items in the array and concatenates the result arrays. - */ - function collect(arr, callback, thisObj){ - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length; - while (++i < len) { - var value = callback(arr[i], i, arr); - if (value != null) { - append(results, value); - } - } - - return results; - } - - return collect; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/combine.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/combine.js deleted file mode 100644 index 22efb860..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/combine.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['./indexOf'], function (indexOf) { - - /** - * Combines an array with all the items of another. - * Does not allow duplicates and is case and type sensitive. - */ - function combine(arr1, arr2) { - if (arr2 == null) { - return arr1; - } - - var i = -1, len = arr2.length; - while (++i < len) { - if (indexOf(arr1, arr2[i]) === -1) { - arr1.push(arr2[i]); - } - } - - return arr1; - } - return combine; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/compact.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/compact.js deleted file mode 100644 index 02a81098..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/compact.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./filter'], function (filter) { - - /** - * Remove all null/undefined items from array. - */ - function compact(arr) { - return filter(arr, function(val){ - return (val != null); - }); - } - - return compact; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/contains.js deleted file mode 100644 index fca4f7cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/contains.js +++ /dev/null @@ -1,10 +0,0 @@ -define(['./indexOf'], function (indexOf) { - - /** - * If array contains values. - */ - function contains(arr, val) { - return indexOf(arr, val) !== -1; - } - return contains; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/difference.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/difference.js deleted file mode 100644 index 819bda3e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/difference.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['./unique', './filter', './some', './contains'], function (unique, filter, some, contains) { - - - /** - * Return a new Array with elements that aren't present in the other Arrays. - */ - function difference(arr) { - var arrs = Array.prototype.slice.call(arguments, 1), - result = filter(unique(arr), function(needle){ - return !some(arrs, function(haystack){ - return contains(haystack, needle); - }); - }); - return result; - } - - return difference; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/every.js deleted file mode 100644 index 78ba46d3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/every.js +++ /dev/null @@ -1,27 +0,0 @@ -define(['../function/makeIterator_'], function (makeIterator) { - - /** - * Array every - */ - function every(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = true; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (!callback(arr[i], i, arr) ) { - result = false; - break; - } - } - - return result; - } - - return every; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/filter.js deleted file mode 100644 index 38add180..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/filter.js +++ /dev/null @@ -1,26 +0,0 @@ -define(['../function/makeIterator_'], function (makeIterator) { - - /** - * Array filter - */ - function filter(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - if (callback(value, i, arr)) { - results.push(value); - } - } - - return results; - } - - return filter; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/find.js deleted file mode 100644 index 3957dcd5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/find.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./findIndex'], function (findIndex) { - - /** - * Returns first item that matches criteria - */ - function find(arr, iterator, thisObj){ - var idx = findIndex(arr, iterator, thisObj); - return idx >= 0? arr[idx] : void(0); - } - - return find; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/findIndex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/findIndex.js deleted file mode 100644 index 59dfeeb9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/findIndex.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['../function/makeIterator_'], function (makeIterator) { - - /** - * Returns the index of the first item that matches criteria - */ - function findIndex(arr, iterator, thisObj){ - iterator = makeIterator(iterator, thisObj); - if (arr == null) { - return -1; - } - - var i = -1, len = arr.length; - while (++i < len) { - if (iterator(arr[i], i, arr)) { - return i; - } - } - - return -1; - } - - return findIndex; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/flatten.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/flatten.js deleted file mode 100644 index 42e87f43..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/flatten.js +++ /dev/null @@ -1,42 +0,0 @@ -define(['../lang/isArray', './append'], function (isArray, append) { - - /* - * Helper function to flatten to a destination array. - * Used to remove the need to create intermediate arrays while flattening. - */ - function flattenTo(arr, result, level) { - if (arr == null) { - return result; - } else if (level === 0) { - append(result, arr); - return result; - } - - var value, - i = -1, - len = arr.length; - while (++i < len) { - value = arr[i]; - if (isArray(value)) { - flattenTo(value, result, level - 1); - } else { - result.push(value); - } - } - return result; - } - - /** - * Recursively flattens an array. - * A new array containing all the elements is returned. - * If `shallow` is true, it will only flatten one level. - */ - function flatten(arr, level) { - level = level == null? -1 : level; - return flattenTo(arr, [], level); - } - - return flatten; - -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/forEach.js deleted file mode 100644 index 0e045868..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/forEach.js +++ /dev/null @@ -1,23 +0,0 @@ -define(function () { - - /** - * Array forEach - */ - function forEach(arr, callback, thisObj) { - if (arr == null) { - return; - } - var i = -1, - len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if ( callback.call(thisObj, arr[i], i, arr) === false ) { - break; - } - } - } - - return forEach; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/indexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/indexOf.js deleted file mode 100644 index 0e75f99b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/indexOf.js +++ /dev/null @@ -1,28 +0,0 @@ -define(function () { - - /** - * Array.indexOf - */ - function indexOf(arr, item, fromIndex) { - fromIndex = fromIndex || 0; - if (arr == null) { - return -1; - } - - var len = arr.length, - i = fromIndex < 0 ? len + fromIndex : fromIndex; - while (i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (arr[i] === item) { - return i; - } - - i++; - } - - return -1; - } - - return indexOf; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/insert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/insert.js deleted file mode 100644 index d8d831f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/insert.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['./difference', '../lang/toArray'], function (difference, toArray) { - - /** - * Insert item into array if not already present. - */ - function insert(arr, rest_items) { - var diff = difference(toArray(arguments).slice(1), arr); - if (diff.length) { - Array.prototype.push.apply(arr, diff); - } - return arr.length; - } - return insert; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/intersection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/intersection.js deleted file mode 100644 index 64e6ee97..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/intersection.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['./unique', './filter', './every', './contains'], function (unique, filter, every, contains) { - - - /** - * Return a new Array with elements common to all Arrays. - * - based on underscore.js implementation - */ - function intersection(arr) { - var arrs = Array.prototype.slice.call(arguments, 1), - result = filter(unique(arr), function(needle){ - return every(arrs, function(haystack){ - return contains(haystack, needle); - }); - }); - return result; - } - - return intersection; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/invoke.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/invoke.js deleted file mode 100644 index f94a9a4a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/invoke.js +++ /dev/null @@ -1,23 +0,0 @@ -define(function () { - - /** - * Call `methodName` on each item of the array passing custom arguments if - * needed. - */ - function invoke(arr, methodName, var_args){ - if (arr == null) { - return arr; - } - - var args = Array.prototype.slice.call(arguments, 2); - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - value[methodName].apply(value, args); - } - - return arr; - } - - return invoke; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/join.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/join.js deleted file mode 100644 index 2c618d29..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/join.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['./filter'], function(filter) { - - function isValidString(val) { - return (val != null && val !== ''); - } - - /** - * Joins strings with the specified separator inserted between each value. - * Null values and empty strings will be excluded. - */ - function join(items, separator) { - separator = separator || ''; - return filter(items, isValidString).join(separator); - } - - return join; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/lastIndexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/lastIndexOf.js deleted file mode 100644 index 931235f4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/lastIndexOf.js +++ /dev/null @@ -1,28 +0,0 @@ -define(function () { - - /** - * Array lastIndexOf - */ - function lastIndexOf(arr, item, fromIndex) { - if (arr == null) { - return -1; - } - - var len = arr.length; - fromIndex = (fromIndex == null || fromIndex >= len)? len - 1 : fromIndex; - fromIndex = (fromIndex < 0)? len + fromIndex : fromIndex; - - while (fromIndex >= 0) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (arr[fromIndex] === item) { - return fromIndex; - } - fromIndex--; - } - - return -1; - } - - return lastIndexOf; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/map.js deleted file mode 100644 index 14377ab6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/map.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['../function/makeIterator_'], function (makeIterator) { - - /** - * Array map - */ - function map(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null){ - return results; - } - - var i = -1, len = arr.length; - while (++i < len) { - results[i] = callback(arr[i], i, arr); - } - - return results; - } - - return map; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/max.js deleted file mode 100644 index d0628f0a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/max.js +++ /dev/null @@ -1,34 +0,0 @@ -define(['../function/makeIterator_'], function (makeIterator) { - - /** - * Return maximum value inside array - */ - function max(arr, iterator, thisObj){ - if (arr == null || !arr.length) { - return Infinity; - } else if (arr.length && !iterator) { - return Math.max.apply(Math, arr); - } else { - iterator = makeIterator(iterator, thisObj); - var result, - compare = -Infinity, - value, - temp; - - var i = -1, len = arr.length; - while (++i < len) { - value = arr[i]; - temp = iterator(value, i, arr); - if (temp > compare) { - compare = temp; - result = value; - } - } - - return result; - } - } - - return max; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/min.js deleted file mode 100644 index 07a0c71f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/min.js +++ /dev/null @@ -1,34 +0,0 @@ -define(['../function/makeIterator_'], function (makeIterator) { - - /** - * Return minimum value inside array - */ - function min(arr, iterator, thisObj){ - if (arr == null || !arr.length) { - return -Infinity; - } else if (arr.length && !iterator) { - return Math.min.apply(Math, arr); - } else { - iterator = makeIterator(iterator, thisObj); - var result, - compare = Infinity, - value, - temp; - - var i = -1, len = arr.length; - while (++i < len) { - value = arr[i]; - temp = iterator(value, i, arr); - if (temp < compare) { - compare = temp; - result = value; - } - } - - return result; - } - } - - return min; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/pick.js deleted file mode 100644 index dc5b222f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/pick.js +++ /dev/null @@ -1,31 +0,0 @@ -define(['../random/randInt'], function (randInt) { - - /** - * Remove random item(s) from the Array and return it. - * Returns an Array of items if [nItems] is provided or a single item if - * it isn't specified. - */ - function pick(arr, nItems){ - if (nItems != null) { - var result = []; - if (nItems > 0 && arr && arr.length) { - nItems = nItems > arr.length? arr.length : nItems; - while (nItems--) { - result.push( pickOne(arr) ); - } - } - return result; - } - return (arr && arr.length)? pickOne(arr) : void(0); - } - - - function pickOne(arr){ - var idx = randInt(0, arr.length - 1); - return arr.splice(idx, 1)[0]; - } - - - return pick; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/pluck.js deleted file mode 100644 index c908856e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/pluck.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./map'], function (map) { - - /** - * Extract a list of property values. - */ - function pluck(arr, propName){ - return map(arr, propName); - } - - return pluck; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/range.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/range.js deleted file mode 100644 index 148ebf96..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/range.js +++ /dev/null @@ -1,27 +0,0 @@ -define(['../math/countSteps'], function (countSteps) { - - /** - * Returns an Array of numbers inside range. - */ - function range(start, stop, step) { - if (stop == null) { - stop = start; - start = 0; - } - step = step || 1; - - var result = [], - nSteps = countSteps(stop - start, step), - i = start; - - while (i <= stop) { - result.push(i); - i += step; - } - - return result; - } - - return range; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/reduce.js deleted file mode 100644 index 5f97ae8e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/reduce.js +++ /dev/null @@ -1,33 +0,0 @@ -define(function () { - - /** - * Array reduce - */ - function reduce(arr, fn, initVal) { - // check for args.length since initVal might be "undefined" see #gh-57 - var hasInit = arguments.length > 2, - result = initVal; - - if (arr == null || !arr.length) { - if (!hasInit) { - throw new Error('reduce of empty array with no initial value'); - } else { - return initVal; - } - } - - var i = -1, len = arr.length; - while (++i < len) { - if (!hasInit) { - result = arr[i]; - hasInit = true; - } else { - result = fn(result, arr[i], i, arr); - } - } - - return result; - } - - return reduce; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/reduceRight.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/reduceRight.js deleted file mode 100644 index ddae0e7f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/reduceRight.js +++ /dev/null @@ -1,34 +0,0 @@ -define(function () { - - /** - * Array reduceRight - */ - function reduceRight(arr, fn, initVal) { - // check for args.length since initVal might be "undefined" see #gh-57 - var hasInit = arguments.length > 2; - - if (arr == null || !arr.length) { - if (hasInit) { - return initVal; - } else { - throw new Error('reduce of empty array with no initial value'); - } - } - - var i = arr.length, result = initVal, value; - while (--i >= 0) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - value = arr[i]; - if (!hasInit) { - result = value; - hasInit = true; - } else { - result = fn(result, value, i, arr); - } - } - return result; - } - - return reduceRight; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/reject.js deleted file mode 100644 index cad40384..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/reject.js +++ /dev/null @@ -1,25 +0,0 @@ -define(['../function/makeIterator_'], function(makeIterator) { - - /** - * Array reject - */ - function reject(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - if (!callback(value, i, arr)) { - results.push(value); - } - } - - return results; - } - - return reject; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/remove.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/remove.js deleted file mode 100644 index dec9134d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/remove.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./indexOf'], function(indexOf){ - - /** - * Remove a single item from the array. - * (it won't remove duplicates, just a single item) - */ - function remove(arr, item){ - var idx = indexOf(arr, item); - if (idx !== -1) arr.splice(idx, 1); - } - - return remove; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/removeAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/removeAll.js deleted file mode 100644 index e81022b8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/removeAll.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./indexOf'], function(indexOf){ - - /** - * Remove all instances of an item from array. - */ - function removeAll(arr, item){ - var idx = indexOf(arr, item); - while (idx !== -1) { - arr.splice(idx, 1); - idx = indexOf(arr, item, idx); - } - } - - return removeAll; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/shuffle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/shuffle.js deleted file mode 100644 index 891d1677..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/shuffle.js +++ /dev/null @@ -1,28 +0,0 @@ -define(['../random/randInt'], function (randInt) { - - /** - * Shuffle array items. - */ - function shuffle(arr) { - var results = [], - rnd; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - if (!i) { - results[0] = arr[0]; - } else { - rnd = randInt(0, i); - results[i] = results[rnd]; - results[rnd] = arr[i]; - } - } - - return results; - } - - return shuffle; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/some.js deleted file mode 100644 index e46a9781..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/some.js +++ /dev/null @@ -1,27 +0,0 @@ -define(['../function/makeIterator_'], function (makeIterator) { - - /** - * Array some - */ - function some(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = false; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if ( callback(arr[i], i, arr) ) { - result = true; - break; - } - } - - return result; - } - - return some; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/sort.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/sort.js deleted file mode 100644 index 4c194042..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/sort.js +++ /dev/null @@ -1,55 +0,0 @@ -define(function () { - - /** - * Merge sort (http://en.wikipedia.org/wiki/Merge_sort) - */ - function mergeSort(arr, compareFn) { - if (arr == null) { - return []; - } else if (arr.length < 2) { - return arr; - } - - if (compareFn == null) { - compareFn = defaultCompare; - } - - var mid, left, right; - - mid = ~~(arr.length / 2); - left = mergeSort( arr.slice(0, mid), compareFn ); - right = mergeSort( arr.slice(mid, arr.length), compareFn ); - - return merge(left, right, compareFn); - } - - function defaultCompare(a, b) { - return a < b ? -1 : (a > b? 1 : 0); - } - - function merge(left, right, compareFn) { - var result = []; - - while (left.length && right.length) { - if (compareFn(left[0], right[0]) <= 0) { - // if 0 it should preserve same order (stable) - result.push(left.shift()); - } else { - result.push(right.shift()); - } - } - - if (left.length) { - result.push.apply(result, left); - } - - if (right.length) { - result.push.apply(result, right); - } - - return result; - } - - return mergeSort; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/split.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/split.js deleted file mode 100644 index a17275eb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/split.js +++ /dev/null @@ -1,35 +0,0 @@ -define(function() { - - /** - * Split array into a fixed number of segments. - */ - function split(array, segments) { - segments = segments || 2; - var results = []; - if (array == null) { - return results; - } - - var minLength = Math.floor(array.length / segments), - remainder = array.length % segments, - i = 0, - len = array.length, - segmentIndex = 0, - segmentLength; - - while (i < len) { - segmentLength = minLength; - if (segmentIndex < remainder) { - segmentLength++; - } - - results.push(array.slice(i, i + segmentLength)); - - segmentIndex++; - i += segmentLength; - } - - return results; - } - return split; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/toLookup.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/toLookup.js deleted file mode 100644 index aac8fd1d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/toLookup.js +++ /dev/null @@ -1,28 +0,0 @@ -define(['../lang/isFunction'], function (isFunction) { - - /** - * Creates an object that holds a lookup for the objects in the array. - */ - function toLookup(arr, key) { - var result = {}; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length, value; - if (isFunction(key)) { - while (++i < len) { - value = arr[i]; - result[key(value)] = value; - } - } else { - while (++i < len) { - value = arr[i]; - result[value[key]] = value; - } - } - - return result; - } - return toLookup; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/union.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/union.js deleted file mode 100644 index 5f9922e5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/union.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['./unique', './append'], function (unique, append) { - - /** - * Concat multiple arrays and remove duplicates - */ - function union(arrs) { - var results = []; - var i = -1, len = arguments.length; - while (++i < len) { - append(results, arguments[i]); - } - - return unique(results); - } - - return union; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/unique.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/unique.js deleted file mode 100644 index c4bd23b4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/unique.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./indexOf', './filter'], function(indexOf, filter){ - - /** - * @return {array} Array of unique items - */ - function unique(arr){ - return filter(arr, isUnique); - } - - function isUnique(item, i, arr){ - return indexOf(arr, item, i+1) === -1; - } - - return unique; -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/xor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/xor.js deleted file mode 100644 index 7df89d9c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/xor.js +++ /dev/null @@ -1,24 +0,0 @@ -define(['./unique', './filter', './contains'], function (unique, filter, contains) { - - - /** - * Exclusive OR. Returns items that are present in a single array. - * - like ptyhon's `symmetric_difference` - */ - function xor(arr1, arr2) { - arr1 = unique(arr1); - arr2 = unique(arr2); - - var a1 = filter(arr1, function(item){ - return !contains(arr2, item); - }), - a2 = filter(arr2, function(item){ - return !contains(arr1, item); - }); - - return a1.concat(a2); - } - - return xor; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/zip.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/zip.js deleted file mode 100644 index bd0dbb84..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/array/zip.js +++ /dev/null @@ -1,27 +0,0 @@ -define(['./max', './map'], function (max, map) { - - function getLength(arr) { - return arr == null ? 0 : arr.length; - } - - /** - * Merges together the values of each of the arrays with the values at the - * corresponding position. - */ - function zip(arr){ - var len = arr ? max(map(arguments, getLength)) : 0, - results = [], - i = -1; - while (++i < len) { - // jshint loopfunc: true - results.push(map(arguments, function(item) { - return item == null ? undefined : item[i]; - })); - } - - return results; - } - - return zip; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection.js deleted file mode 100644 index 386e6da9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection.js +++ /dev/null @@ -1,22 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'contains' : require('./collection/contains'), - 'every' : require('./collection/every'), - 'filter' : require('./collection/filter'), - 'find' : require('./collection/find'), - 'forEach' : require('./collection/forEach'), - 'make_' : require('./collection/make_'), - 'map' : require('./collection/map'), - 'max' : require('./collection/max'), - 'min' : require('./collection/min'), - 'pluck' : require('./collection/pluck'), - 'reduce' : require('./collection/reduce'), - 'reject' : require('./collection/reject'), - 'size' : require('./collection/size'), - 'some' : require('./collection/some') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/contains.js deleted file mode 100644 index 192167e8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/contains.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/contains', '../object/contains'], function (make, arrContains, objContains) { - - /** - */ - return make(arrContains, objContains); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/every.js deleted file mode 100644 index 6317f503..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/every.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/every', '../object/every'], function (make, arrEvery, objEvery) { - - /** - */ - return make(arrEvery, objEvery); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/filter.js deleted file mode 100644 index 4e7fadc8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/filter.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { - - /** - * filter collection values, returns array. - */ - function filter(list, iterator, thisObj) { - iterator = makeIterator(iterator, thisObj); - var results = []; - if (!list) { - return results; - } - forEach(list, function(value, index, list) { - if (iterator(value, index, list)) { - results[results.length] = value; - } - }); - return results; - } - - return filter; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/find.js deleted file mode 100644 index 681f9414..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/find.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./make_', '../array/find', '../object/find'], function(make, arrFind, objFind) { - - /** - * Find value that returns true on iterator check. - */ - return make(arrFind, objFind); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/forEach.js deleted file mode 100644 index 3b39d3ed..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/forEach.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/forEach', '../object/forOwn'], function (make, arrForEach, objForEach) { - - /** - */ - return make(arrForEach, objForEach); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/make_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/make_.js deleted file mode 100644 index 312e0564..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/make_.js +++ /dev/null @@ -1,19 +0,0 @@ -define(function(){ - - /** - * internal method used to create other collection modules. - */ - function makeCollectionMethod(arrMethod, objMethod, defaultReturn) { - return function(){ - var args = Array.prototype.slice.call(arguments); - if (args[0] == null) { - return defaultReturn; - } - // array-like is treated as array - return (typeof args[0].length === 'number')? arrMethod.apply(null, args) : objMethod.apply(null, args); - }; - } - - return makeCollectionMethod; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/map.js deleted file mode 100644 index 96e24987..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/map.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['../lang/isObject', '../object/values', '../array/map', '../function/makeIterator_'], function (isObject, values, arrMap, makeIterator) { - - /** - * Map collection values, returns Array. - */ - function map(list, callback, thisObj) { - callback = makeIterator(callback, thisObj); - // list.length to check array-like object, if not array-like - // we simply map all the object values - if( isObject(list) && list.length == null ){ - list = values(list); - } - return arrMap(list, function (val, key, list) { - return callback(val, key, list); - }); - } - - return map; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/max.js deleted file mode 100644 index de9a6da5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/max.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./make_', '../array/max', '../object/max'], function (make, arrMax, objMax) { - - /** - * Get maximum value inside collection - */ - return make(arrMax, objMax); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/min.js deleted file mode 100644 index f0c239a6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/min.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./make_', '../array/min', '../object/min'], function (make, arrMin, objMin) { - - /** - * Get minimum value inside collection. - */ - return make(arrMin, objMin); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/pluck.js deleted file mode 100644 index ef784a7a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/pluck.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['./map'], function (map) { - - /** - * Extract a list of property values. - */ - function pluck(list, key) { - return map(list, function(value) { - return value[key]; - }); - } - - return pluck; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/reduce.js deleted file mode 100644 index bd05d43d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/reduce.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/reduce', '../object/reduce'], function (make, arrReduce, objReduce) { - - /** - */ - return make(arrReduce, objReduce); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/reject.js deleted file mode 100644 index 581adfdc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/reject.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./filter', '../function/makeIterator_'], function (filter, makeIterator) { - - /** - * Inverse or collection/filter - */ - function reject(list, iterator, thisObj) { - iterator = makeIterator(iterator, thisObj); - return filter(list, function(value, index, list) { - return !iterator(value, index, list); - }, thisObj); - } - - return reject; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/size.js deleted file mode 100644 index 4e5ab419..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/size.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../lang/isArray', '../object/size'], function (isArray, objSize) { - - /** - * Get collection size - */ - function size(list) { - if (!list) { - return 0; - } - if (isArray(list)) { - return list.length; - } - return objSize(list); - } - - return size; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/some.js deleted file mode 100644 index c0aebee2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/collection/some.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/some', '../object/some'], function (make, arrSome, objSome) { - - /** - */ - return make(arrSome, objSome); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date.js deleted file mode 100644 index 4d449150..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date.js +++ /dev/null @@ -1,21 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'dayOfTheYear' : require('./date/dayOfTheYear'), - 'diff' : require('./date/diff'), - 'i18n_' : require('./date/i18n_'), - 'isLeapYear' : require('./date/isLeapYear'), - 'isSame' : require('./date/isSame'), - 'parseIso' : require('./date/parseIso'), - 'startOf' : require('./date/startOf'), - 'strftime' : require('./date/strftime'), - 'timezoneAbbr' : require('./date/timezoneAbbr'), - 'timezoneOffset' : require('./date/timezoneOffset'), - 'totalDaysInMonth' : require('./date/totalDaysInMonth'), - 'totalDaysInYear' : require('./date/totalDaysInYear'), - 'weekOfTheYear' : require('./date/weekOfTheYear') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/dayOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/dayOfTheYear.js deleted file mode 100644 index dc77ae1b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/dayOfTheYear.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../lang/isDate'], function (isDate) { - - /** - * return the day of the year (1..366) - */ - function dayOfTheYear(date){ - return (Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) - - Date.UTC(date.getFullYear(), 0, 1)) / 86400000 + 1; - } - - return dayOfTheYear; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/diff.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/diff.js deleted file mode 100644 index 667165fe..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/diff.js +++ /dev/null @@ -1,128 +0,0 @@ -define(['./totalDaysInMonth', './totalDaysInYear', '../time/convert'], function(totalDaysInMonth, totalDaysInYear, convert){ - - /** - * calculate the difference between dates (range) - */ - function diff(start, end, unitName){ - // sort the dates to make it easier to process (specially year/month) - if (start > end) { - var swap = start; - start = end; - end = swap; - } - - var output; - - if (unitName === 'month') { - output = getMonthsDiff(start, end); - } else if (unitName === 'year'){ - output = getYearsDiff(start, end); - } else if (unitName != null) { - if (unitName === 'day') { - // ignore timezone difference because of daylight savings time - start = toUtc(start); - end = toUtc(end); - } - output = convert(end - start, 'ms', unitName); - } else { - output = end - start; - } - - return output; - } - - - function toUtc(d){ - // we ignore timezone differences on purpose because of daylight - // savings time, otherwise it would return fractional days/weeks even - // if a full day elapsed. eg: - // Wed Feb 12 2014 00:00:00 GMT-0200 (BRST) - // Sun Feb 16 2014 00:00:00 GMT-0300 (BRT) - // diff should be 4 days and not 4.041666666666667 - return Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), - d.getHours(), d.getMinutes(), d.getSeconds(), - d.getMilliseconds()); - } - - - function getMonthsDiff(start, end){ - return getElapsedMonths(start, end) + - getElapsedYears(start, end) * 12 + - getFractionalMonth(start, end); - } - - - function getYearsDiff(start, end){ - var elapsedYears = getElapsedYears(start, end); - return elapsedYears + getFractionalYear(start, end, elapsedYears); - } - - - function getElapsedMonths(start, end){ - var monthDiff = end.getMonth() - start.getMonth(); - if (monthDiff < 0) { - monthDiff += 12; - } - // less than a full month - if (start.getDate() > end.getDate()) { - monthDiff -= 1; - } - return monthDiff; - } - - - function getElapsedYears(start, end){ - var yearDiff = end.getFullYear() - start.getFullYear(); - // less than a full year - if (start.getMonth() > end.getMonth()) { - yearDiff -= 1; - } - return yearDiff; - } - - - function getFractionalMonth(start, end){ - var fractionalDiff = 0; - var startDay = start.getDate(); - var endDay = end.getDate(); - - if (startDay !== endDay) { - var startTotalDays = totalDaysInMonth(start); - var endTotalDays = totalDaysInMonth(end); - var totalDays; - var daysElapsed; - - if (startDay > endDay) { - // eg: Jan 29 - Feb 27 (29 days elapsed but not a full month) - var baseDay = startTotalDays - startDay; - daysElapsed = endDay + baseDay; - // total days should be relative to 1st day of next month if - // startDay > endTotalDays - totalDays = (startDay > endTotalDays)? - endTotalDays + baseDay + 1 : startDay + baseDay; - } else { - // fractional is only based on endMonth eg: Jan 12 - Feb 18 - // (6 fractional days, 28 days until next full month) - daysElapsed = endDay - startDay; - totalDays = endTotalDays; - } - - fractionalDiff = daysElapsed / totalDays; - } - - return fractionalDiff; - } - - - function getFractionalYear(start, end, elapsedYears){ - var base = elapsedYears? - new Date(end.getFullYear(), start.getMonth(), start.getDate()) : - start; - var elapsedDays = diff(base, end, 'day'); - return elapsedDays / totalDaysInYear(end); - } - - - return diff; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/i18n/de-DE.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/i18n/de-DE.js deleted file mode 100644 index 46f5c6aa..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/i18n/de-DE.js +++ /dev/null @@ -1,61 +0,0 @@ -define(function(){ - // de-DE (German) - return { - "am" : "", - "pm" : "", - - "x": "%d/%m/%y", - "X": "%H:%M:%S", - "c": "%a %d %b %Y %H:%M:%S %Z", - - "months" : [ - "Januar", - "Februar", - "März", - "April", - "Mai", - "Juni", - "Juli", - "August", - "September", - "Oktober", - "November", - "Dezember" - ], - - "months_abbr" : [ - "Jan", - "Febr", - "März", - "Apr", - "Mai", - "Juni", - "Juli", - "Aug", - "Sept", - "Okt", - "Nov", - "Dez" - ], - - "days" : [ - "Sonntag", - "Montag", - "Dienstag", - "Mittwoch", - "Donnerstag", - "Freitag", - "Samstag" - ], - - "days_abbr" : [ - "So", - "Mo", - "Di", - "Mi", - "Do", - "Fr", - "Sa" - ] - }; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/i18n/en-US.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/i18n/en-US.js deleted file mode 100644 index 5e640c22..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/i18n/en-US.js +++ /dev/null @@ -1,61 +0,0 @@ -define(function(){ - // en-US (English, United States) - return { - "am" : "AM", - "pm" : "PM", - - "x": "%m/%d/%y", - "X": "%H:%M:%S", - "c": "%a %d %b %Y %I:%M:%S %p %Z", - - "months" : [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" - ], - - "months_abbr" : [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" - ], - - "days" : [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" - ], - - "days_abbr" : [ - "Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat" - ] - }; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/i18n/pt-BR.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/i18n/pt-BR.js deleted file mode 100644 index 47256dd2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/i18n/pt-BR.js +++ /dev/null @@ -1,61 +0,0 @@ -define(function(){ - // pt-BR (Brazillian Portuguese) - return { - "am" : "", - "pm" : "", - - "x": "%d/%m/%y", - "X": "%H:%M:%S", - "c": "%a %d %b %Y %H:%M:%S %Z", - - "months" : [ - "Janeiro", - "Fevereiro", - "Março", - "Abril", - "Maio", - "Junho", - "Julho", - "Agosto", - "Setembro", - "Outubro", - "Novembro", - "Dezembro" - ], - - "months_abbr" : [ - "Jan", - "Fev", - "Mar", - "Abr", - "Mai", - "Jun", - "Jul", - "Ago", - "Set", - "Out", - "Nov", - "Dez" - ], - - "days" : [ - "Domingo", - "Segunda", - "Terça", - "Quarta", - "Quinta", - "Sexta", - "Sábado" - ], - - "days_abbr" : [ - "Dom", - "Seg", - "Ter", - "Qua", - "Qui", - "Sex", - "Sáb" - ] - }; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/i18n_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/i18n_.js deleted file mode 100644 index c04ce885..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/i18n_.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../object/mixIn', './i18n/en-US'], function(mixIn, enUS){ - - // we also use mixIn to make sure we don't affect the original locale - var activeLocale = mixIn({}, enUS, { - // we expose a "set" method to allow overriding the global locale - set : function(localeData){ - mixIn(activeLocale, localeData); - } - }); - - return activeLocale; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/isLeapYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/isLeapYear.js deleted file mode 100644 index e400b43d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/isLeapYear.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['../lang/isDate'], function (isDate) { - - /** - * checks if it's a leap year - */ - function isLeapYear(fullYear){ - if (isDate(fullYear)) { - fullYear = fullYear.getFullYear(); - } - return fullYear % 400 === 0 || (fullYear % 100 !== 0 && fullYear % 4 === 0); - } - - return isLeapYear; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/isSame.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/isSame.js deleted file mode 100644 index f30531fc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/isSame.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./startOf'], function (startOf) { - - /** - * Check if date is "same" with optional period - */ - function isSame(date1, date2, period){ - if (period) { - date1 = startOf(date1, period); - date2 = startOf(date2, period); - } - return Number(date1) === Number(date2); - } - - return isSame; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/parseIso.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/parseIso.js deleted file mode 100644 index b21c8797..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/parseIso.js +++ /dev/null @@ -1,146 +0,0 @@ -define(['../array/some'], function (some) { - - var datePatterns = [ - /^([0-9]{4})$/, // YYYY - /^([0-9]{4})-([0-9]{2})$/, // YYYY-MM (YYYYMM not allowed) - /^([0-9]{4})-?([0-9]{2})-?([0-9]{2})$/ // YYYY-MM-DD or YYYYMMDD - ]; - var ORD_DATE = /^([0-9]{4})-?([0-9]{3})$/; // YYYY-DDD - - var timePatterns = [ - /^([0-9]{2}(?:\.[0-9]*)?)$/, // HH.hh - /^([0-9]{2}):?([0-9]{2}(?:\.[0-9]*)?)$/, // HH:MM.mm - /^([0-9]{2}):?([0-9]{2}):?([0-9]{2}(\.[0-9]*)?)$/ // HH:MM:SS.ss - ]; - - var DATE_TIME = /^(.+)T(.+)$/; - var TIME_ZONE = /^(.+)([+\-])([0-9]{2}):?([0-9]{2})$/; - - function matchAll(str, patterns) { - var match; - var found = some(patterns, function(pattern) { - return !!(match = pattern.exec(str)); - }); - - return found ? match : null; - } - - function getDate(year, month, day) { - var date = new Date(Date.UTC(year, month, day)); - - // Explicitly set year to avoid Date.UTC making dates < 100 relative to - // 1900 - date.setUTCFullYear(year); - - var valid = - date.getUTCFullYear() === year && - date.getUTCMonth() === month && - date.getUTCDate() === day; - return valid ? +date : NaN; - } - - function parseOrdinalDate(str) { - var match = ORD_DATE.exec(str); - if (match ) { - var year = +match[1], - day = +match[2], - date = new Date(Date.UTC(year, 0, day)); - - if (date.getUTCFullYear() === year) { - return +date; - } - } - - return NaN; - } - - function parseDate(str) { - var match, year, month, day; - - match = matchAll(str, datePatterns); - if (match === null) { - // Ordinal dates are verified differently. - return parseOrdinalDate(str); - } - - year = (match[1] === void 0) ? 0 : +match[1]; - month = (match[2] === void 0) ? 0 : +match[2] - 1; - day = (match[3] === void 0) ? 1 : +match[3]; - - return getDate(year, month, day); - } - - function getTime(hr, min, sec) { - var valid = - (hr < 24 && hr >= 0 && - min < 60 && min >= 0 && - sec < 60 && min >= 0) || - (hr === 24 && min === 0 && sec === 0); - if (!valid) { - return NaN; - } - - return ((hr * 60 + min) * 60 + sec) * 1000; - } - - function parseOffset(str) { - var match; - if (str.charAt(str.length - 1) === 'Z') { - str = str.substring(0, str.length - 1); - } else { - match = TIME_ZONE.exec(str); - if (match) { - var hours = +match[3], - minutes = (match[4] === void 0) ? 0 : +match[4], - offset = getTime(hours, minutes, 0); - - if (match[2] === '-') { - offset *= -1; - } - - return { offset: offset, time: match[1] }; - } - } - - // No time zone specified, assume UTC - return { offset: 0, time: str }; - } - - function parseTime(str) { - var match; - var offset = parseOffset(str); - - str = offset.time; - offset = offset.offset; - if (isNaN(offset)) { - return NaN; - } - - match = matchAll(str, timePatterns); - if (match === null) { - return NaN; - } - - var hours = (match[1] === void 0) ? 0 : +match[1], - minutes = (match[2] === void 0) ? 0 : +match[2], - seconds = (match[3] === void 0) ? 0 : +match[3]; - - return getTime(hours, minutes, seconds) - offset; - } - - /** - * Parse an ISO8601 formatted date string, and return a Date object. - */ - function parseISO8601(str){ - var match = DATE_TIME.exec(str); - if (!match) { - // No time specified - return parseDate(str); - } - - return parseDate(match[1]) + parseTime(match[2]); - } - - return parseISO8601; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/startOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/startOf.js deleted file mode 100644 index 747f114d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/startOf.js +++ /dev/null @@ -1,54 +0,0 @@ -define(['../lang/clone'], function (clone) { - - /** - * get a new Date object representing start of period - */ - function startOf(date, period){ - date = clone(date); - - // intentionally removed "break" from switch since start of - // month/year/etc should also reset the following periods - switch (period) { - case 'year': - date.setMonth(0); - /* falls through */ - case 'month': - date.setDate(1); - /* falls through */ - case 'week': - case 'day': - date.setHours(0); - /* falls through */ - case 'hour': - date.setMinutes(0); - /* falls through */ - case 'minute': - date.setSeconds(0); - /* falls through */ - case 'second': - date.setMilliseconds(0); - break; - default: - throw new Error('"'+ period +'" is not a valid period'); - } - - // week is the only case that should reset the weekDay and maybe even - // overflow to previous month - if (period === 'week') { - var weekDay = date.getDay(); - var baseDate = date.getDate(); - if (weekDay) { - if (weekDay >= baseDate) { - //start of the week is on previous month - date.setDate(0); - } - date.setDate(date.getDate() - date.getDay()); - } - } - - return date; - } - - return startOf; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/strftime.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/strftime.js deleted file mode 100644 index dd782505..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/strftime.js +++ /dev/null @@ -1,113 +0,0 @@ -define(['../number/pad', './i18n_', './dayOfTheYear', './timezoneOffset', './timezoneAbbr', './weekOfTheYear'], function (pad, i18n, dayOfTheYear, timezoneOffset, timezoneAbbr, weekOfTheYear) { - - var _combinations = { - 'D': '%m/%d/%y', - 'F': '%Y-%m-%d', - 'r': '%I:%M:%S %p', - 'R': '%H:%M', - 'T': '%H:%M:%S', - 'x': 'locale', - 'X': 'locale', - 'c': 'locale' - }; - - - /** - * format date based on strftime format - */ - function strftime(date, format, localeData){ - localeData = localeData || i18n; - var reToken = /%([a-z%])/gi; - - function makeIterator(fn) { - return function(match, token){ - return fn(date, token, localeData); - }; - } - - return format - .replace(reToken, makeIterator(expandCombinations)) - .replace(reToken, makeIterator(convertToken)); - } - - - function expandCombinations(date, token, l10n){ - if (token in _combinations) { - var expanded = _combinations[token]; - return expanded === 'locale'? l10n[token] : expanded; - } else { - return '%'+ token; - } - } - - - function convertToken(date, token, l10n){ - switch (token){ - case 'a': - return l10n.days_abbr[date.getDay()]; - case 'A': - return l10n.days[date.getDay()]; - case 'h': - case 'b': - return l10n.months_abbr[date.getMonth()]; - case 'B': - return l10n.months[date.getMonth()]; - case 'C': - return pad(Math.floor(date.getFullYear() / 100), 2); - case 'd': - return pad(date.getDate(), 2); - case 'e': - return pad(date.getDate(), 2, ' '); - case 'H': - return pad(date.getHours(), 2); - case 'I': - return pad(date.getHours() % 12, 2); - case 'j': - return pad(dayOfTheYear(date), 3); - case 'L': - return pad(date.getMilliseconds(), 3); - case 'm': - return pad(date.getMonth() + 1, 2); - case 'M': - return pad(date.getMinutes(), 2); - case 'n': - return '\n'; - case 'p': - return date.getHours() >= 12? l10n.pm : l10n.am; - case 'P': - return convertToken(date, 'p', l10n).toLowerCase(); - case 's': - return date.getTime() / 1000; - case 'S': - return pad(date.getSeconds(), 2); - case 't': - return '\t'; - case 'u': - var day = date.getDay(); - return day === 0? 7 : day; - case 'U': - return pad(weekOfTheYear(date), 2); - case 'w': - return date.getDay(); - case 'W': - return pad(weekOfTheYear(date, 1), 2); - case 'y': - return pad(date.getFullYear() % 100, 2); - case 'Y': - return pad(date.getFullYear(), 4); - case 'z': - return timezoneOffset(date); - case 'Z': - return timezoneAbbr(date); - case '%': - return '%'; - default: - // keep unrecognized tokens - return '%'+ token; - } - } - - - return strftime; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/timezoneAbbr.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/timezoneAbbr.js deleted file mode 100644 index 225a6856..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/timezoneAbbr.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['./timezoneOffset'], function(timezoneOffset) { - - /** - * Abbreviated time zone name or similar information. - */ - function timezoneAbbr(date){ - // Date.toString gives different results depending on the - // browser/system so we fallback to timezone offset - // chrome: 'Mon Apr 08 2013 09:02:04 GMT-0300 (BRT)' - // IE: 'Mon Apr 8 09:02:04 UTC-0300 2013' - var tz = /\(([A-Z]{3,4})\)/.exec(date.toString()); - return tz? tz[1] : timezoneOffset(date); - } - - return timezoneAbbr; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/timezoneOffset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/timezoneOffset.js deleted file mode 100644 index ca06705d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/timezoneOffset.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['../number/pad'], function (pad) { - - /** - * time zone as hour and minute offset from UTC (e.g. +0900) - */ - function timezoneOffset(date){ - var offset = date.getTimezoneOffset(); - var abs = Math.abs(offset); - var h = pad(Math.floor(abs / 60), 2); - var m = pad(abs % 60, 2); - return (offset > 0? '-' : '+') + h + m; - } - - return timezoneOffset; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/totalDaysInMonth.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/totalDaysInMonth.js deleted file mode 100644 index 98f7e9d1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/totalDaysInMonth.js +++ /dev/null @@ -1,24 +0,0 @@ -define(['../lang/isDate', './isLeapYear'], function (isDate, isLeapYear) { - - var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; - - /** - * returns the total amount of days in the month (considering leap years) - */ - function totalDaysInMonth(fullYear, monthIndex){ - if (isDate(fullYear)) { - var date = fullYear; - year = date.getFullYear(); - monthIndex = date.getMonth(); - } - - if (monthIndex === 1 && isLeapYear(fullYear)) { - return 29; - } else { - return DAYS_IN_MONTH[monthIndex]; - } - } - - return totalDaysInMonth; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/totalDaysInYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/totalDaysInYear.js deleted file mode 100644 index e9036b42..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/totalDaysInYear.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./isLeapYear'], function (isLeapYear) { - - /** - * return the amount of days in the year following the gregorian calendar - * and leap years - */ - function totalDaysInYear(fullYear){ - return isLeapYear(fullYear)? 366 : 365; - } - - return totalDaysInYear; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/weekOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/weekOfTheYear.js deleted file mode 100644 index 8dabc458..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/date/weekOfTheYear.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./dayOfTheYear'], function (dayOfTheYear) { - - /** - * Return the week of the year based on given firstDayOfWeek - */ - function weekOfTheYear(date, firstDayOfWeek){ - firstDayOfWeek = firstDayOfWeek == null? 0 : firstDayOfWeek; - var doy = dayOfTheYear(date); - var dow = (7 + date.getDay() - firstDayOfWeek) % 7; - var relativeWeekDay = 6 - firstDayOfWeek - dow; - return Math.floor((doy + relativeWeekDay) / 7); - } - - return weekOfTheYear; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function.js deleted file mode 100644 index 71307246..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function.js +++ /dev/null @@ -1,19 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'bind' : require('./function/bind'), - 'compose' : require('./function/compose'), - 'debounce' : require('./function/debounce'), - 'func' : require('./function/func'), - 'makeIterator_' : require('./function/makeIterator_'), - 'partial' : require('./function/partial'), - 'prop' : require('./function/prop'), - 'series' : require('./function/series'), - 'throttle' : require('./function/throttle'), - 'timeout' : require('./function/timeout'), - 'times' : require('./function/times') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/bind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/bind.js deleted file mode 100644 index 09e5e20a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/bind.js +++ /dev/null @@ -1,23 +0,0 @@ -define(function(){ - - function slice(arr, offset){ - return Array.prototype.slice.call(arr, offset || 0); - } - - /** - * Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. - * @param {Function} fn Function. - * @param {object} context Execution context. - * @param {rest} args Arguments (0...n arguments). - * @return {Function} Wrapped Function. - */ - function bind(fn, context, args){ - var argsArr = slice(arguments, 2); //curried args - return function(){ - return fn.apply(context, argsArr.concat(slice(arguments))); - }; - } - - return bind; -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/compose.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/compose.js deleted file mode 100644 index d8b228fa..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/compose.js +++ /dev/null @@ -1,23 +0,0 @@ -define(function () { - - /** - * Returns a function that composes multiple functions, passing results to - * each other. - */ - function compose() { - var fns = arguments; - return function(arg){ - // only cares about the first argument since the chain can only - // deal with a single return value anyway. It should start from - // the last fn. - var n = fns.length; - while (n--) { - arg = fns[n].call(this, arg); - } - return arg; - }; - } - - return compose; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/debounce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/debounce.js deleted file mode 100644 index 8c5fd47f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/debounce.js +++ /dev/null @@ -1,32 +0,0 @@ -define(function () { - - /** - * Debounce callback execution - */ - function debounce(fn, threshold, isAsap){ - var timeout, result; - function debounced(){ - var args = arguments, context = this; - function delayed(){ - if (! isAsap) { - result = fn.apply(context, args); - } - timeout = null; - } - if (timeout) { - clearTimeout(timeout); - } else if (isAsap) { - result = fn.apply(context, args); - } - timeout = setTimeout(delayed, threshold); - return result; - } - debounced.cancel = function(){ - clearTimeout(timeout); - }; - return debounced; - } - - return debounce; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/func.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/func.js deleted file mode 100644 index b920e00e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/func.js +++ /dev/null @@ -1,14 +0,0 @@ -define(function () { - - /** - * Returns a function that call a method on the passed object - */ - function func(name){ - return function(obj){ - return obj[name](); - }; - } - - return func; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/makeIterator_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/makeIterator_.js deleted file mode 100644 index c498e131..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/makeIterator_.js +++ /dev/null @@ -1,30 +0,0 @@ -define(['./prop', '../object/deepMatches'], function(prop, deepMatches) { - - /** - * Converts argument into a valid iterator. - * Used internally on most array/object/collection methods that receives a - * callback/iterator providing a shortcut syntax. - */ - function makeIterator(src, thisObj){ - switch(typeof src) { - case 'function': - // function is the first to improve perf (most common case) - return (typeof thisObj !== 'undefined')? function(val, i, arr){ - return src.call(thisObj, val, i, arr); - } : src; - case 'object': - // typeof null == "object" - return (src != null)? function(val){ - return deepMatches(val, src); - } : src; - case 'string': - case 'number': - return prop(src); - default: - return src; - } - } - - return makeIterator; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/partial.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/partial.js deleted file mode 100644 index ad730746..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/partial.js +++ /dev/null @@ -1,19 +0,0 @@ -define(function () { - - function slice(arr, offset){ - return Array.prototype.slice.call(arr, offset || 0); - } - - /** - * Creates a partially applied function. - */ - function partial(fn, var_args){ - var argsArr = slice(arguments, 1); //curried args - return function(){ - return fn.apply(this, argsArr.concat(slice(arguments))); - }; - } - - return partial; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/prop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/prop.js deleted file mode 100644 index c9df78ca..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/prop.js +++ /dev/null @@ -1,14 +0,0 @@ -define(function () { - - /** - * Returns a function that gets a property of the passed object - */ - function prop(name){ - return function(obj){ - return obj[name]; - }; - } - - return prop; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/series.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/series.js deleted file mode 100644 index c8856a27..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/series.js +++ /dev/null @@ -1,22 +0,0 @@ -define(function () { - - /** - * Returns a function that will execute a list of functions in sequence - * passing the same arguments to each one. (useful for batch processing - * items during a forEach loop) - */ - function series(){ - var fns = arguments; - return function(){ - var i = 0, - n = fns.length; - while (i < n) { - fns[i].apply(this, arguments); - i += 1; - } - }; - } - - return series; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/throttle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/throttle.js deleted file mode 100644 index 1885fc6a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/throttle.js +++ /dev/null @@ -1,35 +0,0 @@ -define(['../time/now'], function (now) { - - /** - */ - function throttle(fn, delay){ - var context, timeout, result, args, - cur, diff, prev = 0; - function delayed(){ - prev = now(); - timeout = null; - result = fn.apply(context, args); - } - function throttled(){ - context = this; - args = arguments; - cur = now(); - diff = delay - (cur - prev); - if (diff <= 0) { - clearTimeout(timeout); - prev = cur; - result = fn.apply(context, args); - } else if (! timeout) { - timeout = setTimeout(delayed, diff); - } - return result; - } - throttled.cancel = function(){ - clearTimeout(timeout); - }; - return throttled; - } - - return throttle; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/timeout.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/timeout.js deleted file mode 100644 index 15388bdd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/timeout.js +++ /dev/null @@ -1,21 +0,0 @@ -define(function () { - - function slice(arr, offset){ - return Array.prototype.slice.call(arr, offset || 0); - } - - /** - * Delays the call of a function within a given context. - */ - function timeout(fn, millis, context){ - - var args = slice(arguments, 3); - - return setTimeout(function() { - fn.apply(context, args); - }, millis); - } - - return timeout; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/times.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/times.js deleted file mode 100644 index ec10caeb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/function/times.js +++ /dev/null @@ -1,17 +0,0 @@ -define(function () { - - /** - * Iterates over a callback a set amount of times - */ - function times(n, callback, thisObj){ - var i = -1; - while (++i < n) { - if ( callback.call(thisObj, i) === false ) { - break; - } - } - } - - return times; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/index.js deleted file mode 100644 index 3098aff6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/**@license - * mout v0.7.1 | http://moutjs.com | MIT license - */ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'VERSION' : '0.7.1', - 'array' : require('./array'), - 'collection' : require('./collection'), - 'date' : require('./date'), - 'function' : require('./function'), - 'lang' : require('./lang'), - 'math' : require('./math'), - 'number' : require('./number'), - 'object' : require('./object'), - 'queryString' : require('./queryString'), - 'random' : require('./random'), - 'string' : require('./string'), - 'time' : require('./time'), - 'fn' : require('./function') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang.js deleted file mode 100644 index 434916a7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang.js +++ /dev/null @@ -1,37 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'clone' : require('./lang/clone'), - 'createObject' : require('./lang/createObject'), - 'ctorApply' : require('./lang/ctorApply'), - 'deepClone' : require('./lang/deepClone'), - 'defaults' : require('./lang/defaults'), - 'inheritPrototype' : require('./lang/inheritPrototype'), - 'is' : require('./lang/is'), - 'isArguments' : require('./lang/isArguments'), - 'isArray' : require('./lang/isArray'), - 'isBoolean' : require('./lang/isBoolean'), - 'isDate' : require('./lang/isDate'), - 'isEmpty' : require('./lang/isEmpty'), - 'isFinite' : require('./lang/isFinite'), - 'isFunction' : require('./lang/isFunction'), - 'isInteger' : require('./lang/isInteger'), - 'isKind' : require('./lang/isKind'), - 'isNaN' : require('./lang/isNaN'), - 'isNull' : require('./lang/isNull'), - 'isNumber' : require('./lang/isNumber'), - 'isObject' : require('./lang/isObject'), - 'isPlainObject' : require('./lang/isPlainObject'), - 'isRegExp' : require('./lang/isRegExp'), - 'isString' : require('./lang/isString'), - 'isUndefined' : require('./lang/isUndefined'), - 'isnt' : require('./lang/isnt'), - 'kindOf' : require('./lang/kindOf'), - 'toArray' : require('./lang/toArray'), - 'toNumber' : require('./lang/toNumber'), - 'toString' : require('./lang/toString') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/clone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/clone.js deleted file mode 100644 index 468489a1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/clone.js +++ /dev/null @@ -1,47 +0,0 @@ -define(['./kindOf', './isPlainObject', '../object/mixIn'], function (kindOf, isPlainObject, mixIn) { - - /** - * Clone native types. - */ - function clone(val){ - switch (kindOf(val)) { - case 'Object': - return cloneObject(val); - case 'Array': - return cloneArray(val); - case 'RegExp': - return cloneRegExp(val); - case 'Date': - return cloneDate(val); - default: - return val; - } - } - - function cloneObject(source) { - if (isPlainObject(source)) { - return mixIn({}, source); - } else { - return source; - } - } - - function cloneRegExp(r) { - var flags = ''; - flags += r.multiline ? 'm' : ''; - flags += r.global ? 'g' : ''; - flags += r.ignorecase ? 'i' : ''; - return new RegExp(r.source, flags); - } - - function cloneDate(date) { - return new Date(+date); - } - - function cloneArray(arr) { - return arr.slice(); - } - - return clone; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/createObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/createObject.js deleted file mode 100644 index f7661500..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/createObject.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../object/mixIn'], function(mixIn){ - - /** - * Create Object using prototypal inheritance and setting custom properties. - * - Mix between Douglas Crockford Prototypal Inheritance <http://javascript.crockford.com/prototypal.html> and the EcmaScript 5 `Object.create()` method. - * @param {object} parent Parent Object. - * @param {object} [props] Object properties. - * @return {object} Created object. - */ - function createObject(parent, props){ - function F(){} - F.prototype = parent; - return mixIn(new F(), props); - - } - return createObject; -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/ctorApply.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/ctorApply.js deleted file mode 100644 index a9ac1c54..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/ctorApply.js +++ /dev/null @@ -1,17 +0,0 @@ -define(function () { - - function F(){} - - /** - * Do fn.apply on a constructor. - */ - function ctorApply(ctor, args) { - F.prototype = ctor.prototype; - var instance = new F(); - ctor.apply(instance, args); - return instance; - } - - return ctorApply; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/deepClone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/deepClone.js deleted file mode 100644 index d45c10aa..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/deepClone.js +++ /dev/null @@ -1,45 +0,0 @@ -define(['./clone', '../object/forOwn', './kindOf', './isPlainObject'], function (clone, forOwn, kindOf, isPlainObject) { - - /** - * Recursively clone native types. - */ - function deepClone(val, instanceClone) { - switch ( kindOf(val) ) { - case 'Object': - return cloneObject(val, instanceClone); - case 'Array': - return cloneArray(val, instanceClone); - default: - return clone(val); - } - } - - function cloneObject(source, instanceClone) { - if (isPlainObject(source)) { - var out = {}; - forOwn(source, function(val, key) { - this[key] = deepClone(val, instanceClone); - }, out); - return out; - } else if (instanceClone) { - return instanceClone(source); - } else { - return source; - } - } - - function cloneArray(arr, instanceClone) { - var out = [], - i = -1, - n = arr.length, - val; - while (++i < n) { - out[i] = deepClone(arr[i], instanceClone); - } - return out; - } - - return deepClone; - -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/defaults.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/defaults.js deleted file mode 100644 index 5156b1bb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/defaults.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./toArray', '../array/find'], function (toArray, find) { - - /** - * Return first non void argument - */ - function defaults(var_args){ - return find(toArray(arguments), nonVoid); - } - - function nonVoid(val){ - return val != null; - } - - return defaults; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/inheritPrototype.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/inheritPrototype.js deleted file mode 100644 index d47d0fee..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/inheritPrototype.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['./createObject'], function(createObject){ - - /** - * Inherit prototype from another Object. - * - inspired by Nicholas Zackas <http://nczonline.net> Solution - * @param {object} child Child object - * @param {object} parent Parent Object - */ - function inheritPrototype(child, parent){ - var p = createObject(parent.prototype); - p.constructor = child; - child.prototype = p; - child.super_ = parent; - } - - return inheritPrototype; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/is.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/is.js deleted file mode 100644 index 261a2077..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/is.js +++ /dev/null @@ -1,23 +0,0 @@ -define(function () { - - /** - * Check if both arguments are egal. - */ - function is(x, y){ - // implementation borrowed from harmony:egal spec - if (x === y) { - // 0 === -0, but they are not identical - return x !== 0 || 1 / x === 1 / y; - } - - // NaN !== NaN, but they are identical. - // NaNs are the only non-reflexive value, i.e., if x !== x, - // then x is a NaN. - // isNaN is broken: it converts its argument to number, so - // isNaN("foo") => true - return x !== x && y !== y; - } - - return is; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isArguments.js deleted file mode 100644 index f889ee8e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isArguments.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./isKind'], function (isKind) { - - /** - */ - var isArgs = isKind(arguments, 'Arguments')? - function(val){ - return isKind(val, 'Arguments'); - } : - function(val){ - // Arguments is an Object on IE7 - return !!(val && Object.prototype.hasOwnProperty.call(val, 'callee')); - }; - - return isArgs; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isArray.js deleted file mode 100644 index 886e2aa5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isArray.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - var isArray = Array.isArray || function (val) { - return isKind(val, 'Array'); - }; - return isArray; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isBoolean.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isBoolean.js deleted file mode 100644 index 1ca27a69..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isBoolean.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isBoolean(val) { - return isKind(val, 'Boolean'); - } - return isBoolean; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isDate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isDate.js deleted file mode 100644 index 2708d676..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isDate.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isDate(val) { - return isKind(val, 'Date'); - } - return isDate; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isEmpty.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isEmpty.js deleted file mode 100644 index 4cc3d2db..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isEmpty.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['../object/forOwn', './isArray'], function (forOwn, isArray) { - - function isEmpty(val){ - if (val == null) { - // typeof null == 'object' so we check it first - return false; - } else if ( typeof val === 'string' || isArray(val) ) { - return !val.length; - } else if ( typeof val === 'object' || typeof val === 'function' ) { - var result = true; - forOwn(val, function(){ - result = false; - return false; // break loop - }); - return result; - } else { - return false; - } - } - - return isEmpty; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isFinite.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isFinite.js deleted file mode 100644 index 5a982f4b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isFinite.js +++ /dev/null @@ -1,21 +0,0 @@ -define(['./isNumber'], function (isNumber) { - - var global = this; - - /** - * Check if value is finite - */ - function isFinite(val){ - var is = false; - if (typeof val === 'string' && val !== '') { - is = global.isFinite( parseFloat(val) ); - } else if (isNumber(val)){ - // need to use isNumber because of Number constructor - is = global.isFinite( val ); - } - return is; - } - - return isFinite; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isFunction.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isFunction.js deleted file mode 100644 index ff5df7f0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isFunction.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isFunction(val) { - return isKind(val, 'Function'); - } - return isFunction; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isInteger.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isInteger.js deleted file mode 100644 index 1931f516..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isInteger.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./isNumber'], function (isNumber) { - - /** - * Check if value is an integer - */ - function isInteger(val){ - return isNumber(val) && (val % 1 === 0); - } - - return isInteger; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isKind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isKind.js deleted file mode 100644 index 6937a12f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isKind.js +++ /dev/null @@ -1,9 +0,0 @@ -define(['./kindOf'], function (kindOf) { - /** - * Check if value is from a specific "kind". - */ - function isKind(val, kind){ - return kindOf(val) === kind; - } - return isKind; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isNaN.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isNaN.js deleted file mode 100644 index b25e8c36..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isNaN.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./isNumber'], function (isNumber) { - - /** - * Check if value is NaN for realz - */ - function isNaN(val){ - // based on the fact that NaN !== NaN - // need to check if it's a number to avoid conflicts with host objects - // also need to coerce ToNumber to avoid edge case `new Number(NaN)` - // jshint eqeqeq: false - return !isNumber(val) || val != +val; - } - - return isNaN; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isNull.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isNull.js deleted file mode 100644 index 506e05ea..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isNull.js +++ /dev/null @@ -1,9 +0,0 @@ -define(function () { - /** - */ - function isNull(val){ - return val === null; - } - return isNull; -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isNumber.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isNumber.js deleted file mode 100644 index 9a832c5f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isNumber.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isNumber(val) { - return isKind(val, 'Number'); - } - return isNumber; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isObject.js deleted file mode 100644 index 0befb063..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isObject.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isObject(val) { - return isKind(val, 'Object'); - } - return isObject; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isPlainObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isPlainObject.js deleted file mode 100644 index 406a2797..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isPlainObject.js +++ /dev/null @@ -1,13 +0,0 @@ -define(function () { - - /** - * Checks if the value is created by the `Object` constructor. - */ - function isPlainObject(value) { - return (!!value && typeof value === 'object' && - value.constructor === Object); - } - - return isPlainObject; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isRegExp.js deleted file mode 100644 index d78a03da..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isRegExp.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isRegExp(val) { - return isKind(val, 'RegExp'); - } - return isRegExp; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isString.js deleted file mode 100644 index 8a42fe01..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isString.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isString(val) { - return isKind(val, 'String'); - } - return isString; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isUndefined.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isUndefined.js deleted file mode 100644 index c57b28eb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isUndefined.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function () { - var UNDEF; - - /** - */ - function isUndef(val){ - return val === UNDEF; - } - return isUndef; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isnt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isnt.js deleted file mode 100644 index d4336222..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/isnt.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./is'], function (is) { - - /** - * Check if both values are not identical/egal - */ - function isnt(x, y){ - return !is(x, y); - } - - return isnt; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/kindOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/kindOf.js deleted file mode 100644 index 97d21d15..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/kindOf.js +++ /dev/null @@ -1,20 +0,0 @@ -define(function () { - - var _rKind = /^\[object (.*)\]$/, - _toString = Object.prototype.toString, - UNDEF; - - /** - * Gets the "kind" of value. (e.g. "String", "Number", etc) - */ - function kindOf(val) { - if (val === null) { - return 'Null'; - } else if (val === UNDEF) { - return 'Undefined'; - } else { - return _rKind.exec( _toString.call(val) )[1]; - } - } - return kindOf; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/toArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/toArray.js deleted file mode 100644 index 552916f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/toArray.js +++ /dev/null @@ -1,31 +0,0 @@ -define(['./kindOf'], function (kindOf) { - - var _win = this; - - /** - * Convert array-like object into array - */ - function toArray(val){ - var ret = [], - kind = kindOf(val), - n; - - if (val != null) { - if ( val.length == null || kind === 'String' || kind === 'Function' || kind === 'RegExp' || val === _win ) { - //string, regexp, function have .length but user probably just want - //to wrap value into an array.. - ret[ret.length] = val; - } else { - //window returns true on isObject in IE7 and may have length - //property. `typeof NodeList` returns `function` on Safari so - //we can't use it (#58) - n = val.length; - while (n--) { - ret[n] = val[n]; - } - } - } - return ret; - } - return toArray; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/toNumber.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/toNumber.js deleted file mode 100644 index 39767386..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/toNumber.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['./isArray'], function (isArray) { - - /** - * covert value into number if numeric - */ - function toNumber(val){ - // numberic values should come first because of -0 - if (typeof val === 'number') return val; - // we want all falsy values (besides -0) to return zero to avoid - // headaches - if (!val) return 0; - if (typeof val === 'string') return parseFloat(val); - // arrays are edge cases. `Number([4]) === 4` - if (isArray(val)) return NaN; - return Number(val); - } - - return toNumber; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/toString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/toString.js deleted file mode 100644 index c28b89af..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/lang/toString.js +++ /dev/null @@ -1,13 +0,0 @@ -define(function () { - - /** - * Typecast a value to a String, using an empty string value for null or - * undefined. - */ - function toString(val){ - return val == null ? '' : val.toString(); - } - - return toString; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math.js deleted file mode 100644 index e2ba8705..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math.js +++ /dev/null @@ -1,19 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'ceil' : require('./math/ceil'), - 'clamp' : require('./math/clamp'), - 'countSteps' : require('./math/countSteps'), - 'floor' : require('./math/floor'), - 'inRange' : require('./math/inRange'), - 'isNear' : require('./math/isNear'), - 'lerp' : require('./math/lerp'), - 'loop' : require('./math/loop'), - 'map' : require('./math/map'), - 'norm' : require('./math/norm'), - 'round' : require('./math/round') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/ceil.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/ceil.js deleted file mode 100644 index d73b0581..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/ceil.js +++ /dev/null @@ -1,11 +0,0 @@ -define(function(){ - /** - * Round value up with a custom radix. - */ - function ceil(val, step){ - step = Math.abs(step || 1); - return Math.ceil(val / step) * step; - } - - return ceil; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/clamp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/clamp.js deleted file mode 100644 index fb5a1484..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/clamp.js +++ /dev/null @@ -1,9 +0,0 @@ -define(function(){ - /** - * Clamps value inside range. - */ - function clamp(val, min, max){ - return val < min? min : (val > max? max : val); - } - return clamp; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/countSteps.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/countSteps.js deleted file mode 100644 index 0ecb32f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/countSteps.js +++ /dev/null @@ -1,16 +0,0 @@ -define(function(){ - /** - * Count number of full steps. - */ - function countSteps(val, step, overflow){ - val = Math.floor(val / step); - - if (overflow) { - return val % overflow; - } - - return val; - } - - return countSteps; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/floor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/floor.js deleted file mode 100644 index 8a4456b6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/floor.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function(){ - /** - * Floor value to full steps. - */ - function floor(val, step){ - step = Math.abs(step || 1); - return Math.floor(val / step) * step; - } - return floor; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/inRange.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/inRange.js deleted file mode 100644 index 0c890536..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/inRange.js +++ /dev/null @@ -1,11 +0,0 @@ -define(function(){ - /** - * Checks if value is inside the range. - */ - function inRange(val, min, max, threshold){ - threshold = threshold || 0; - return (val + threshold >= min && val - threshold <= max); - } - - return inRange; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/isNear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/isNear.js deleted file mode 100644 index b308a0b0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/isNear.js +++ /dev/null @@ -1,9 +0,0 @@ -define(function(){ - /** - * Check if value is close to target. - */ - function isNear(val, target, threshold){ - return (Math.abs(val - target) <= threshold); - } - return isNear; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/lerp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/lerp.js deleted file mode 100644 index 26b99d04..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/lerp.js +++ /dev/null @@ -1,11 +0,0 @@ -define(function(){ - /** - * Linear interpolation. - * IMPORTANT:will return `Infinity` if numbers overflow Number.MAX_VALUE - */ - function lerp(ratio, start, end){ - return start + (end - start) * ratio; - } - - return lerp; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/loop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/loop.js deleted file mode 100644 index c735ecf6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/loop.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function(){ - /** - * Loops value inside range. - */ - function loop(val, min, max){ - return val < min? max : (val > max? min : val); - } - - return loop; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/map.js deleted file mode 100644 index bf7dc5d5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/map.js +++ /dev/null @@ -1,10 +0,0 @@ -define(['./lerp', './norm'], function(lerp, norm){ - /** - * Maps a number from one scale to another. - * @example map(3, 0, 4, -1, 1) -> 0.5 - */ - function map(val, min1, max1, min2, max2){ - return lerp( norm(val, min1, max1), min2, max2 ); - } - return map; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/norm.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/norm.js deleted file mode 100644 index fccae20e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/norm.js +++ /dev/null @@ -1,9 +0,0 @@ -define(function(){ - /** - * Gets normalized ratio of value inside range. - */ - function norm(val, min, max){ - return (val - min) / (max - min); - } - return norm; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/round.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/round.js deleted file mode 100644 index b43e4ac2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/math/round.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function () { - /** - * Round number to a specific radix - */ - function round(value, radix){ - radix = radix || 1; // default round 1 - return Math.round(value / radix) * radix; - } - - return round; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number.js deleted file mode 100644 index cb52fc75..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number.js +++ /dev/null @@ -1,21 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'MAX_INT' : require('./number/MAX_INT'), - 'MAX_UINT' : require('./number/MAX_UINT'), - 'MIN_INT' : require('./number/MIN_INT'), - 'abbreviate' : require('./number/abbreviate'), - 'currencyFormat' : require('./number/currencyFormat'), - 'enforcePrecision' : require('./number/enforcePrecision'), - 'pad' : require('./number/pad'), - 'rol' : require('./number/rol'), - 'ror' : require('./number/ror'), - 'sign' : require('./number/sign'), - 'toInt' : require('./number/toInt'), - 'toUInt' : require('./number/toUInt'), - 'toUInt31' : require('./number/toUInt31') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/MAX_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/MAX_INT.js deleted file mode 100644 index 23a6e1a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/MAX_INT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Maximum 32-bit signed integer value. (2^31 - 1) - */ -define(function(){ - return 2147483647; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/MAX_UINT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/MAX_UINT.js deleted file mode 100644 index a035096c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/MAX_UINT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Maximum 32-bit unsigned integet value (2^32 - 1) - */ -define(function(){ - return 4294967295; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/MIN_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/MIN_INT.js deleted file mode 100644 index 9b3e9781..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/MIN_INT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Minimum 32-bit signed integer value (-2^31). - */ -define(function(){ - return -2147483648; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/abbreviate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/abbreviate.js deleted file mode 100644 index 7e7405ad..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/abbreviate.js +++ /dev/null @@ -1,35 +0,0 @@ -define(['./enforcePrecision'], function (enforcePrecision) { - - var _defaultDict = { - thousand : 'K', - million : 'M', - billion : 'B' - }; - - /** - * Abbreviate number if bigger than 1000. (eg: 2.5K, 17.5M, 3.4B, ...) - */ - function abbreviateNumber(val, nDecimals, dict){ - nDecimals = nDecimals != null? nDecimals : 1; - dict = dict || _defaultDict; - val = enforcePrecision(val, nDecimals); - - var str, mod; - - if (val < 1000000) { - mod = enforcePrecision(val / 1000, nDecimals); - // might overflow to next scale during rounding - str = mod < 1000? mod + dict.thousand : 1 + dict.million; - } else if (val < 1000000000) { - mod = enforcePrecision(val / 1000000, nDecimals); - str = mod < 1000? mod + dict.million : 1 + dict.billion; - } else { - str = enforcePrecision(val / 1000000000, nDecimals) + dict.billion; - } - - return str; - } - - return abbreviateNumber; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/currencyFormat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/currencyFormat.js deleted file mode 100644 index 1e5fecba..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/currencyFormat.js +++ /dev/null @@ -1,27 +0,0 @@ -define(['../lang/toNumber'], function (toNumber) { - - /** - * Converts number into currency format - */ - function currencyFormat(val, nDecimalDigits, decimalSeparator, thousandsSeparator) { - val = toNumber(val); - nDecimalDigits = nDecimalDigits == null? 2 : nDecimalDigits; - decimalSeparator = decimalSeparator == null? '.' : decimalSeparator; - thousandsSeparator = thousandsSeparator == null? ',' : thousandsSeparator; - - //can't use enforce precision since it returns a number and we are - //doing a RegExp over the string - var fixed = val.toFixed(nDecimalDigits), - //separate begin [$1], middle [$2] and decimal digits [$4] - parts = new RegExp('^(-?\\d{1,3})((?:\\d{3})+)(\\.(\\d{'+ nDecimalDigits +'}))?$').exec( fixed ); - - if(parts){ //val >= 1000 || val <= -1000 - return parts[1] + parts[2].replace(/\d{3}/g, thousandsSeparator + '$&') + (parts[4] ? decimalSeparator + parts[4] : ''); - }else{ - return fixed.replace('.', decimalSeparator); - } - } - - return currencyFormat; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/enforcePrecision.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/enforcePrecision.js deleted file mode 100644 index 1e65e505..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/enforcePrecision.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['../lang/toNumber'], function(toNumber){ - /** - * Enforce a specific amount of decimal digits and also fix floating - * point rounding issues. - */ - function enforcePrecision(val, nDecimalDigits){ - val = toNumber(val); - var pow = Math.pow(10, nDecimalDigits); - return +(Math.round(val * pow) / pow).toFixed(nDecimalDigits); - } - return enforcePrecision; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/pad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/pad.js deleted file mode 100644 index 194a3df3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/pad.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../string/lpad', '../lang/toNumber'], function(lpad, toNumber){ - - /** - * Add padding zeros if n.length < minLength. - */ - function pad(n, minLength, char){ - n = toNumber(n); - return lpad(''+ n, minLength, char || '0'); - } - - return pad; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/rol.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/rol.js deleted file mode 100644 index a148f444..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/rol.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function(){ - /** - * Bitwise circular shift left - * http://en.wikipedia.org/wiki/Circular_shift - */ - function rol(val, shift){ - return (val << shift) | (val >> (32 - shift)); - } - return rol; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/ror.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/ror.js deleted file mode 100644 index b5c66f92..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/ror.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function(){ - /** - * Bitwise circular shift right - * http://en.wikipedia.org/wiki/Circular_shift - */ - function ror(val, shift){ - return (val >> shift) | (val << (32 - shift)); - } - return ror; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/sign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/sign.js deleted file mode 100644 index b387c957..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/sign.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['../lang/toNumber'], function (toNumber) { - - /** - * Get sign of the value. - */ - function sign(val) { - var num = toNumber(val); - if (num === 0) return num; // +0 and +0 === 0 - if (isNaN(num)) return num; // NaN - return num < 0? -1 : 1; - } - - return sign; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/toInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/toInt.js deleted file mode 100644 index 5ea59e51..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/toInt.js +++ /dev/null @@ -1,17 +0,0 @@ -define(function(){ - - /** - * "Convert" value into an 32-bit integer. - * Works like `Math.floor` if val > 0 and `Math.ceil` if val < 0. - * IMPORTANT: val will wrap at 2^31 and -2^31. - * Perf tests: http://jsperf.com/vs-vs-parseint-bitwise-operators/7 - */ - function toInt(val){ - // we do not use lang/toNumber because of perf and also because it - // doesn't break the functionality - return ~~val; - } - - return toInt; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/toUInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/toUInt.js deleted file mode 100644 index 36bbdadd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/toUInt.js +++ /dev/null @@ -1,15 +0,0 @@ -define(function () { - - /** - * "Convert" value into a 32-bit unsigned integer. - * IMPORTANT: Value will wrap at 2^32. - */ - function toUInt(val){ - // we do not use lang/toNumber because of perf and also because it - // doesn't break the functionality - return val >>> 0; - } - - return toUInt; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/toUInt31.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/toUInt31.js deleted file mode 100644 index c1c4affd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/number/toUInt31.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./MAX_INT'], function(MAX_INT){ - - /** - * "Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). - * IMPORTANT: value wil wrap at 2^31, if negative will return 0. - */ - function toUInt31(val){ - // we do not use lang/toNumber because of perf and also because it - // doesn't break the functionality - return (val <= 0)? 0 : (val > MAX_INT? ~~(val % (MAX_INT + 1)) : ~~val); - } - - return toUInt31; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object.js deleted file mode 100644 index 343e7826..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object.js +++ /dev/null @@ -1,42 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'bindAll' : require('./object/bindAll'), - 'contains' : require('./object/contains'), - 'deepEquals' : require('./object/deepEquals'), - 'deepFillIn' : require('./object/deepFillIn'), - 'deepMatches' : require('./object/deepMatches'), - 'deepMixIn' : require('./object/deepMixIn'), - 'equals' : require('./object/equals'), - 'every' : require('./object/every'), - 'fillIn' : require('./object/fillIn'), - 'filter' : require('./object/filter'), - 'find' : require('./object/find'), - 'forIn' : require('./object/forIn'), - 'forOwn' : require('./object/forOwn'), - 'functions' : require('./object/functions'), - 'get' : require('./object/get'), - 'has' : require('./object/has'), - 'hasOwn' : require('./object/hasOwn'), - 'keys' : require('./object/keys'), - 'map' : require('./object/map'), - 'matches' : require('./object/matches'), - 'max' : require('./object/max'), - 'merge' : require('./object/merge'), - 'min' : require('./object/min'), - 'mixIn' : require('./object/mixIn'), - 'namespace' : require('./object/namespace'), - 'pick' : require('./object/pick'), - 'pluck' : require('./object/pluck'), - 'reduce' : require('./object/reduce'), - 'reject' : require('./object/reject'), - 'set' : require('./object/set'), - 'size' : require('./object/size'), - 'some' : require('./object/some'), - 'unset' : require('./object/unset'), - 'values' : require('./object/values') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/bindAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/bindAll.js deleted file mode 100644 index b131ed15..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/bindAll.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./functions', '../function/bind', '../array/forEach'], function (functions, bind, forEach) { - - /** - * Binds methods of the object to be run in it's own context. - */ - function bindAll(obj, rest_methodNames){ - var keys = arguments.length > 1? - Array.prototype.slice.call(arguments, 1) : functions(obj); - forEach(keys, function(key){ - obj[key] = bind(obj[key], obj); - }); - } - - return bindAll; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/contains.js deleted file mode 100644 index 297e8986..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/contains.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./some'], function (some) { - - /** - * Check if object contains value - */ - function contains(obj, needle) { - return some(obj, function(val) { - return (val === needle); - }); - } - return contains; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/deepEquals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/deepEquals.js deleted file mode 100644 index 8b7d5d15..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/deepEquals.js +++ /dev/null @@ -1,26 +0,0 @@ -define(['../lang/isObject', './equals'], function (isObject, equals) { - - function defaultCompare(a, b) { - return a === b; - } - - /** - * Recursively checks for same properties and values. - */ - function deepEquals(a, b, callback){ - callback = callback || defaultCompare; - - if (!isObject(a) || !isObject(b)) { - return callback(a, b); - } - - function compare(a, b){ - return deepEquals(a, b, callback); - } - - return equals(a, b, compare); - } - - return deepEquals; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/deepFillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/deepFillIn.js deleted file mode 100644 index ee69c3d5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/deepFillIn.js +++ /dev/null @@ -1,32 +0,0 @@ -define(['./forOwn', '../lang/isPlainObject'], function (forOwn, isPlainObject) { - - /** - * Deeply copy missing properties in the target from the defaults. - */ - function deepFillIn(target, defaults){ - var i = 0, - n = arguments.length, - obj; - - while(++i < n) { - obj = arguments[i]; - if (obj) { - // jshint loopfunc: true - forOwn(obj, function(newValue, key) { - var curValue = target[key]; - if (curValue == null) { - target[key] = newValue; - } else if (isPlainObject(curValue) && - isPlainObject(newValue)) { - deepFillIn(curValue, newValue); - } - }); - } - } - - return target; - } - - return deepFillIn; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/deepMatches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/deepMatches.js deleted file mode 100644 index 2eae6297..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/deepMatches.js +++ /dev/null @@ -1,54 +0,0 @@ -define(['./forOwn', '../lang/isArray'], function(forOwn, isArray) { - - function containsMatch(array, pattern) { - var i = -1, length = array.length; - while (++i < length) { - if (deepMatches(array[i], pattern)) { - return true; - } - } - - return false; - } - - function matchArray(target, pattern) { - var i = -1, patternLength = pattern.length; - while (++i < patternLength) { - if (!containsMatch(target, pattern[i])) { - return false; - } - } - - return true; - } - - function matchObject(target, pattern) { - var result = true; - forOwn(pattern, function(val, key) { - if (!deepMatches(target[key], val)) { - // Return false to break out of forOwn early - return (result = false); - } - }); - - return result; - } - - /** - * Recursively check if the objects match. - */ - function deepMatches(target, pattern){ - if (target && typeof target === 'object') { - if (isArray(target) && isArray(pattern)) { - return matchArray(target, pattern); - } else { - return matchObject(target, pattern); - } - } else { - return target === pattern; - } - } - - return deepMatches; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/deepMixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/deepMixIn.js deleted file mode 100644 index 1b4178ef..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/deepMixIn.js +++ /dev/null @@ -1,33 +0,0 @@ -define(['./forOwn', '../lang/isPlainObject'], function (forOwn, isPlainObject) { - - /** - * Mixes objects into the target object, recursively mixing existing child - * objects. - */ - function deepMixIn(target, objects) { - var i = 0, - n = arguments.length, - obj; - - while(++i < n){ - obj = arguments[i]; - if (obj) { - forOwn(obj, copyProp, target); - } - } - - return target; - } - - function copyProp(val, key) { - var existing = this[key]; - if (isPlainObject(val) && isPlainObject(existing)) { - deepMixIn(existing, val); - } else { - this[key] = val; - } - } - - return deepMixIn; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/equals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/equals.js deleted file mode 100644 index 596cb952..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/equals.js +++ /dev/null @@ -1,34 +0,0 @@ -define(['./hasOwn', './every', '../lang/isObject'], function(hasOwn, every, isObject) { - - function defaultCompare(a, b) { - return a === b; - } - - // Makes a function to compare the object values from the specified compare - // operation callback. - function makeCompare(callback) { - return function(value, key) { - return hasOwn(this, key) && callback(value, this[key]); - }; - } - - function checkProperties(value, key) { - return hasOwn(this, key); - } - - /** - * Checks if two objects have the same keys and values. - */ - function equals(a, b, callback) { - callback = callback || defaultCompare; - - if (!isObject(a) || !isObject(b)) { - return callback(a, b); - } - - return (every(a, makeCompare(callback), b) && - every(b, checkProperties, a)); - } - - return equals; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/every.js deleted file mode 100644 index 52983a5e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/every.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { - - /** - * Object every - */ - function every(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = true; - forOwn(obj, function(val, key) { - // we consider any falsy values as "false" on purpose so shorthand - // syntax can be used to check property existence - if (!callback(val, key, obj)) { - result = false; - return false; // break - } - }); - return result; - } - - return every; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/fillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/fillIn.js deleted file mode 100644 index 0845d3c2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/fillIn.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['../array/forEach', './forOwn'], function (forEach, forOwn) { - - /** - * Copy missing properties in the obj from the defaults. - */ - function fillIn(obj, var_defaults){ - forEach(Array.prototype.slice.call(arguments, 1), function(base){ - forOwn(base, function(val, key){ - if (obj[key] == null) { - obj[key] = val; - } - }); - }); - return obj; - } - - return fillIn; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/filter.js deleted file mode 100644 index f213b915..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/filter.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { - - /** - * Creates a new object with all the properties where the callback returns - * true. - */ - function filterValues(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var output = {}; - forOwn(obj, function(value, key, obj) { - if (callback(value, key, obj)) { - output[key] = value; - } - }); - - return output; - } - return filterValues; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/find.js deleted file mode 100644 index 47e6b09d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/find.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['./some', '../function/makeIterator_'], function(some, makeIterator) { - - /** - * Returns first item that matches criteria - */ - function find(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result; - some(obj, function(value, key, obj) { - if (callback(value, key, obj)) { - result = value; - return true; //break - } - }); - return result; - } - - return find; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/forIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/forIn.js deleted file mode 100644 index 2058e9cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/forIn.js +++ /dev/null @@ -1,62 +0,0 @@ -define(function () { - - var _hasDontEnumBug, - _dontEnums; - - function checkDontEnum(){ - _dontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' - ]; - - _hasDontEnumBug = true; - - for (var key in {'toString': null}) { - _hasDontEnumBug = false; - } - } - - /** - * Similar to Array/forEach but works over object properties and fixes Don't - * Enum bug on IE. - * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation - */ - function forIn(obj, fn, thisObj){ - var key, i = 0; - // no need to check if argument is a real object that way we can use - // it for arrays, functions, date, etc. - - //post-pone check till needed - if (_hasDontEnumBug == null) checkDontEnum(); - - for (key in obj) { - if (exec(fn, obj, key, thisObj) === false) { - break; - } - } - - if (_hasDontEnumBug) { - while (key = _dontEnums[i++]) { - // since we aren't using hasOwn check we need to make sure the - // property was overwritten - if (obj[key] !== Object.prototype[key]) { - if (exec(fn, obj, key, thisObj) === false) { - break; - } - } - } - } - } - - function exec(fn, obj, key, thisObj){ - return fn.call(thisObj, obj[key], key, obj); - } - - return forIn; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/forOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/forOwn.js deleted file mode 100644 index b40cbaf1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/forOwn.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['./hasOwn', './forIn'], function (hasOwn, forIn) { - - /** - * Similar to Array/forEach but works over object properties and fixes Don't - * Enum bug on IE. - * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation - */ - function forOwn(obj, fn, thisObj){ - forIn(obj, function(val, key){ - if (hasOwn(obj, key)) { - return fn.call(thisObj, obj[key], key, obj); - } - }); - } - - return forOwn; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/functions.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/functions.js deleted file mode 100644 index 60fee3dd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/functions.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['./forIn'], function (forIn) { - - /** - * return a list of all enumerable properties that have function values - */ - function functions(obj){ - var keys = []; - forIn(obj, function(val, key){ - if (typeof val === 'function'){ - keys.push(key); - } - }); - return keys.sort(); - } - - return functions; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/get.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/get.js deleted file mode 100644 index b498153d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/get.js +++ /dev/null @@ -1,20 +0,0 @@ -define(function () { - - /** - * get "nested" object property - */ - function get(obj, prop){ - var parts = prop.split('.'), - last = parts.pop(); - - while (prop = parts.shift()) { - obj = obj[prop]; - if (typeof obj !== 'object' || !obj) return; - } - - return obj[last]; - } - - return get; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/has.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/has.js deleted file mode 100644 index cc29817f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/has.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./get'], function (get) { - - var UNDEF; - - /** - * Check if object has nested property. - */ - function has(obj, prop){ - return get(obj, prop) !== UNDEF; - } - - return has; - -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/hasOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/hasOwn.js deleted file mode 100644 index 5c53bcf2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/hasOwn.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function () { - - /** - * Safer Object.hasOwnProperty - */ - function hasOwn(obj, prop){ - return Object.prototype.hasOwnProperty.call(obj, prop); - } - - return hasOwn; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/keys.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/keys.js deleted file mode 100644 index ed7c4f91..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/keys.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./forOwn'], function (forOwn) { - - /** - * Get object keys - */ - var keys = Object.keys || function (obj) { - var keys = []; - forOwn(obj, function(val, key){ - keys.push(key); - }); - return keys; - }; - - return keys; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/map.js deleted file mode 100644 index 2958f6b0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/map.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { - - /** - * Creates a new object where all the values are the result of calling - * `callback`. - */ - function mapValues(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var output = {}; - forOwn(obj, function(val, key, obj) { - output[key] = callback(val, key, obj); - }); - - return output; - } - return mapValues; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/matches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/matches.js deleted file mode 100644 index 73ff427c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/matches.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['./forOwn'], function (forOwn) { - - /** - * checks if a object contains all given properties/values - */ - function matches(target, props){ - // can't use "object/every" because of circular dependency - var result = true; - forOwn(props, function(val, key){ - if (target[key] !== val) { - // break loop at first difference - return (result = false); - } - }); - return result; - } - - return matches; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/max.js deleted file mode 100644 index ef311dcb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/max.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../array/max', './values'], function(arrMax, values) { - - /** - * Returns maximum value inside object. - */ - function max(obj, compareFn) { - return arrMax(values(obj), compareFn); - } - - return max; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/merge.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/merge.js deleted file mode 100644 index d7cfedec..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/merge.js +++ /dev/null @@ -1,38 +0,0 @@ -define(['./hasOwn', '../lang/deepClone', '../lang/isObject'], function (hasOwn, deepClone, isObject) { - - /** - * Deep merge objects. - */ - function merge() { - var i = 1, - key, val, obj, target; - - // make sure we don't modify source element and it's properties - // objects are passed by reference - target = deepClone( arguments[0] ); - - while (obj = arguments[i++]) { - for (key in obj) { - if ( ! hasOwn(obj, key) ) { - continue; - } - - val = obj[key]; - - if ( isObject(val) && isObject(target[key]) ){ - // inception, deep merge objects - target[key] = merge(target[key], val); - } else { - // make sure arrays, regexp, date, objects are cloned - target[key] = deepClone(val); - } - - } - } - - return target; - } - - return merge; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/min.js deleted file mode 100644 index 9fb4c1a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/min.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../array/min', './values'], function(arrMin, values) { - - /** - * Returns minimum value inside object. - */ - function min(obj, iterator) { - return arrMin(values(obj), iterator); - } - - return min; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/mixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/mixIn.js deleted file mode 100644 index 6210b7e7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/mixIn.js +++ /dev/null @@ -1,28 +0,0 @@ -define(['./forOwn'], function(forOwn){ - - /** - * Combine properties from all the objects into first one. - * - This method affects target object in place, if you want to create a new Object pass an empty object as first param. - * @param {object} target Target Object - * @param {...object} objects Objects to be combined (0...n objects). - * @return {object} Target Object. - */ - function mixIn(target, objects){ - var i = 0, - n = arguments.length, - obj; - while(++i < n){ - obj = arguments[i]; - if (obj != null) { - forOwn(obj, copyProp, target); - } - } - return target; - } - - function copyProp(val, key){ - this[key] = val; - } - - return mixIn; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/namespace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/namespace.js deleted file mode 100644 index 7ed65db8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/namespace.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['../array/forEach'], function (forEach) { - - /** - * Create nested object if non-existent - */ - function namespace(obj, path){ - if (!path) return obj; - forEach(path.split('.'), function(key){ - if (!obj[key]) { - obj[key] = {}; - } - obj = obj[key]; - }); - return obj; - } - - return namespace; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/pick.js deleted file mode 100644 index 76e22bfc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/pick.js +++ /dev/null @@ -1,18 +0,0 @@ -define(function(){ - - /** - * Return a copy of the object, filtered to only have values for the whitelisted keys. - */ - function pick(obj, var_keys){ - var keys = typeof arguments[1] !== 'string'? arguments[1] : Array.prototype.slice.call(arguments, 1), - out = {}, - i = 0, key; - while (key = keys[i++]) { - out[key] = obj[key]; - } - return out; - } - - return pick; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/pluck.js deleted file mode 100644 index d47744bd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/pluck.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./map', '../function/prop'], function (map, prop) { - - /** - * Extract a list of property values. - */ - function pluck(obj, propName){ - return map(obj, prop(propName)); - } - - return pluck; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/reduce.js deleted file mode 100644 index d3a57788..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/reduce.js +++ /dev/null @@ -1,28 +0,0 @@ -define(['./forOwn', './size'], function(forOwn, size) { - - /** - * Object reduce - */ - function reduce(obj, callback, memo, thisObj) { - var initial = arguments.length > 2; - - if (!size(obj) && !initial) { - throw new Error('reduce of empty object with no initial value'); - } - - forOwn(obj, function(value, key, list) { - if (!initial) { - memo = value; - initial = true; - } - else { - memo = callback.call(thisObj, memo, value, key, list); - } - }); - - return memo; - } - - return reduce; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/reject.js deleted file mode 100644 index 84296428..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/reject.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./filter', '../function/makeIterator_'], function (filter, makeIterator) { - - /** - * Object reject - */ - function reject(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - return filter(obj, function(value, index, obj) { - return !callback(value, index, obj); - }, thisObj); - } - - return reject; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/set.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/set.js deleted file mode 100644 index b8fa25a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/set.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['./namespace'], function (namespace) { - - /** - * set "nested" object property - */ - function set(obj, prop, val){ - var parts = (/^(.+)\.(.+)$/).exec(prop); - if (parts){ - namespace(obj, parts[1])[parts[2]] = val; - } else { - obj[prop] = val; - } - } - - return set; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/size.js deleted file mode 100644 index c6e377cf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/size.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./forOwn'], function (forOwn) { - - /** - * Get object size - */ - function size(obj) { - var count = 0; - forOwn(obj, function(){ - count++; - }); - return count; - } - - return size; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/some.js deleted file mode 100644 index 1bd6fdae..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/some.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { - - /** - * Object some - */ - function some(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = false; - forOwn(obj, function(val, key) { - if (callback(val, key, obj)) { - result = true; - return false; // break - } - }); - return result; - } - - return some; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/unset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/unset.js deleted file mode 100644 index 787fc19a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/unset.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['./has'], function (has) { - - /** - * Unset object property. - */ - function unset(obj, prop){ - if (has(obj, prop)) { - var parts = prop.split('.'), - last = parts.pop(); - while (prop = parts.shift()) { - obj = obj[prop]; - } - return (delete obj[last]); - - } else { - // if property doesn't exist treat as deleted - return true; - } - } - - return unset; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/values.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/values.js deleted file mode 100644 index b311fd09..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/object/values.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./forOwn'], function (forOwn) { - - /** - * Get object values - */ - function values(obj) { - var vals = []; - forOwn(obj, function(val, key){ - vals.push(val); - }); - return vals; - } - - return values; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/queryString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/queryString.js deleted file mode 100644 index 44346127..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/queryString.js +++ /dev/null @@ -1,15 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'contains' : require('./queryString/contains'), - 'decode' : require('./queryString/decode'), - 'encode' : require('./queryString/encode'), - 'getParam' : require('./queryString/getParam'), - 'getQuery' : require('./queryString/getQuery'), - 'parse' : require('./queryString/parse'), - 'setParam' : require('./queryString/setParam') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/queryString/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/queryString/contains.js deleted file mode 100644 index a6d11cce..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/queryString/contains.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./getQuery'], function (getQuery) { - - /** - * Checks if query string contains parameter. - */ - function contains(url, paramName) { - var regex = new RegExp('(\\?|&)'+ paramName +'=', 'g'); //matches `?param=` or `¶m=` - return regex.test(getQuery(url)); - } - - return contains; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/queryString/decode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/queryString/decode.js deleted file mode 100644 index 50da3f66..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/queryString/decode.js +++ /dev/null @@ -1,35 +0,0 @@ -define(['../string/typecast', '../lang/isString', '../lang/isArray', '../object/hasOwn'], function (typecast, isString, isArray, hasOwn) { - - /** - * Decode query string into an object of keys => vals. - */ - function decode(queryStr, shouldTypecast) { - var queryArr = (queryStr || '').replace('?', '').split('&'), - count = -1, - length = queryArr.length, - obj = {}, - item, pValue, pName, toSet; - - while (++count < length) { - item = queryArr[count].split('='); - pName = item[0]; - if (!pName || !pName.length){ - continue; - } - pValue = shouldTypecast === false ? item[1] : typecast(item[1]); - toSet = isString(pValue) ? decodeURIComponent(pValue) : pValue; - if (hasOwn(obj,pName)){ - if(isArray(obj[pName])){ - obj[pName].push(toSet); - } else { - obj[pName] = [obj[pName],toSet]; - } - } else { - obj[pName] = toSet; - } - } - return obj; - } - - return decode; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/queryString/encode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/queryString/encode.js deleted file mode 100644 index c249287a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/queryString/encode.js +++ /dev/null @@ -1,25 +0,0 @@ -define(['../object/forOwn','../lang/isArray','../array/forEach'], function (forOwn,isArray,forEach) { - - /** - * Encode object into a query string. - */ - function encode(obj){ - var query = [], - arrValues, reg; - forOwn(obj, function (val, key) { - if (isArray(val)) { - arrValues = key + '='; - reg = new RegExp('&'+key+'+=$'); - forEach(val, function (aValue) { - arrValues += encodeURIComponent(aValue) + '&' + key + '='; - }); - query.push(arrValues.replace(reg, '')); - } else { - query.push(key + '=' + encodeURIComponent(val)); - } - }); - return (query.length) ? '?' + query.join('&') : ''; - } - - return encode; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/queryString/getParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/queryString/getParam.js deleted file mode 100644 index d9813724..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/queryString/getParam.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../string/typecast', './getQuery'], function (typecast, getQuery) { - - /** - * Get query parameter value. - */ - function getParam(url, param, shouldTypecast){ - var regexp = new RegExp('(\\?|&)'+ param + '=([^&]*)'), //matches `?param=value` or `¶m=value`, value = $2 - result = regexp.exec( getQuery(url) ), - val = (result && result[2])? result[2] : null; - return shouldTypecast === false? val : typecast(val); - } - - return getParam; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/queryString/getQuery.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/queryString/getQuery.js deleted file mode 100644 index aa3d99f3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/queryString/getQuery.js +++ /dev/null @@ -1,13 +0,0 @@ -define(function () { - - /** - * Gets full query as string with all special chars decoded. - */ - function getQuery(url) { - url = url.replace(/#.*/, ''); //removes hash (to avoid getting hash query) - var queryString = /\?[a-zA-Z0-9\=\&\%\$\-\_\.\+\!\*\'\(\)\,]+/.exec(url); //valid chars according to: http://www.ietf.org/rfc/rfc1738.txt - return (queryString)? decodeURIComponent(queryString[0]) : ''; - } - - return getQuery; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/queryString/parse.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/queryString/parse.js deleted file mode 100644 index ac153e3f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/queryString/parse.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./decode', './getQuery'], function (decode, getQuery) { - - /** - * Get query string, parses and decodes it. - */ - function parse(url, shouldTypecast) { - return decode(getQuery(url), shouldTypecast); - } - - return parse; -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/queryString/setParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/queryString/setParam.js deleted file mode 100644 index 97081aa7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/queryString/setParam.js +++ /dev/null @@ -1,28 +0,0 @@ -define(function () { - - /** - * Set query string parameter value - */ - function setParam(url, paramName, value){ - url = url || ''; - - var re = new RegExp('(\\?|&)'+ paramName +'=[^&]*' ); - var param = paramName +'='+ encodeURIComponent( value ); - - if ( re.test(url) ) { - return url.replace(re, '$1'+ param); - } else { - if (url.indexOf('?') === -1) { - url += '?'; - } - if (url.indexOf('=') !== -1) { - url += '&'; - } - return url + param; - } - - } - - return setParam; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random.js deleted file mode 100644 index b2641ee3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random.js +++ /dev/null @@ -1,16 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'choice' : require('./random/choice'), - 'guid' : require('./random/guid'), - 'rand' : require('./random/rand'), - 'randBit' : require('./random/randBit'), - 'randHex' : require('./random/randHex'), - 'randInt' : require('./random/randInt'), - 'randSign' : require('./random/randSign'), - 'random' : require('./random/random') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random/choice.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random/choice.js deleted file mode 100644 index 0d0c38df..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random/choice.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['./randInt', '../lang/isArray'], function (randInt, isArray) { - - /** - * Returns a random element from the supplied arguments - * or from the array (if single argument is an array). - */ - function choice(items) { - var target = (arguments.length === 1 && isArray(items))? items : arguments; - return target[ randInt(0, target.length - 1) ]; - } - - return choice; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random/guid.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random/guid.js deleted file mode 100644 index 82f3a2db..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random/guid.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['./randHex', './choice'], function (randHex, choice) { - - /** - * Returns pseudo-random guid (UUID v4) - * IMPORTANT: it's not totally "safe" since randHex/choice uses Math.random - * by default and sequences can be predicted in some cases. See the - * "random/random" documentation for more info about it and how to replace - * the default PRNG. - */ - function guid() { - return ( - randHex(8)+'-'+ - randHex(4)+'-'+ - // v4 UUID always contain "4" at this position to specify it was - // randomly generated - '4' + randHex(3) +'-'+ - // v4 UUID always contain chars [a,b,8,9] at this position - choice(8, 9, 'a', 'b') + randHex(3)+'-'+ - randHex(12) - ); - } - return guid; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random/rand.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random/rand.js deleted file mode 100644 index b8c231dd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random/rand.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./random', '../number/MIN_INT', '../number/MAX_INT'], function(random, MIN_INT, MAX_INT){ - - /** - * Returns random number inside range - */ - function rand(min, max){ - min = min == null? MIN_INT : min; - max = max == null? MAX_INT : max; - return min + (max - min) * random(); - } - - return rand; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random/randBit.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random/randBit.js deleted file mode 100644 index b3422d2d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random/randBit.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['./random'], function (random) { - - /** - * Returns random bit (0 or 1) - */ - function randomBit() { - return random() > 0.5? 1 : 0; - } - - return randomBit; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random/randHex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random/randHex.js deleted file mode 100644 index 6e9bf1c5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random/randHex.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['./choice'], function (choice) { - - var _chars = '0123456789abcdef'.split(''); - - /** - * Returns a random hexadecimal string - */ - function randHex(size){ - size = size && size > 0? size : 6; - var str = ''; - while (size--) { - str += choice(_chars); - } - return str; - } - - return randHex; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random/randInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random/randInt.js deleted file mode 100644 index 1750e9de..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random/randInt.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['../number/MIN_INT', '../number/MAX_INT', './rand'], function(MIN_INT, MAX_INT, rand){ - - /** - * Gets random integer inside range or snap to min/max values. - */ - function randInt(min, max){ - min = min == null? MIN_INT : ~~min; - max = max == null? MAX_INT : ~~max; - // can't be max + 0.5 otherwise it will round up if `rand` - // returns `max` causing it to overflow range. - // -0.5 and + 0.49 are required to avoid bias caused by rounding - return Math.round( rand(min - 0.5, max + 0.499999999999) ); - } - - return randInt; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random/randSign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random/randSign.js deleted file mode 100644 index 4141cdf6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random/randSign.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['./random'], function (random) { - - /** - * Returns random sign (-1 or 1) - */ - function randomSign() { - return random() > 0.5? 1 : -1; - } - - return randomSign; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random/random.js deleted file mode 100644 index 4270822e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/random/random.js +++ /dev/null @@ -1,18 +0,0 @@ -define(function () { - - /** - * Just a wrapper to Math.random. No methods inside mout/random should call - * Math.random() directly so we can inject the pseudo-random number - * generator if needed (ie. in case we need a seeded random or a better - * algorithm than the native one) - */ - function random(){ - return random.get(); - } - - // we expose the method so it can be swapped if needed - random.get = Math.random; - - return random; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string.js deleted file mode 100644 index a157e4cc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string.js +++ /dev/null @@ -1,46 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'WHITE_SPACES' : require('./string/WHITE_SPACES'), - 'camelCase' : require('./string/camelCase'), - 'contains' : require('./string/contains'), - 'crop' : require('./string/crop'), - 'endsWith' : require('./string/endsWith'), - 'escapeHtml' : require('./string/escapeHtml'), - 'escapeRegExp' : require('./string/escapeRegExp'), - 'escapeUnicode' : require('./string/escapeUnicode'), - 'hyphenate' : require('./string/hyphenate'), - 'insert' : require('./string/insert'), - 'interpolate' : require('./string/interpolate'), - 'lowerCase' : require('./string/lowerCase'), - 'lpad' : require('./string/lpad'), - 'ltrim' : require('./string/ltrim'), - 'makePath' : require('./string/makePath'), - 'normalizeLineBreaks' : require('./string/normalizeLineBreaks'), - 'pascalCase' : require('./string/pascalCase'), - 'properCase' : require('./string/properCase'), - 'removeNonASCII' : require('./string/removeNonASCII'), - 'removeNonWord' : require('./string/removeNonWord'), - 'repeat' : require('./string/repeat'), - 'replace' : require('./string/replace'), - 'replaceAccents' : require('./string/replaceAccents'), - 'rpad' : require('./string/rpad'), - 'rtrim' : require('./string/rtrim'), - 'sentenceCase' : require('./string/sentenceCase'), - 'slugify' : require('./string/slugify'), - 'startsWith' : require('./string/startsWith'), - 'stripHtmlTags' : require('./string/stripHtmlTags'), - 'trim' : require('./string/trim'), - 'truncate' : require('./string/truncate'), - 'typecast' : require('./string/typecast'), - 'unCamelCase' : require('./string/unCamelCase'), - 'underscore' : require('./string/underscore'), - 'unescapeHtml' : require('./string/unescapeHtml'), - 'unescapeUnicode' : require('./string/unescapeUnicode'), - 'unhyphenate' : require('./string/unhyphenate'), - 'upperCase' : require('./string/upperCase') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/WHITE_SPACES.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/WHITE_SPACES.js deleted file mode 100644 index e830d86d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/WHITE_SPACES.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function() { - /** - * Contains all Unicode white-spaces. Taken from - * http://en.wikipedia.org/wiki/Whitespace_character. - */ - return [ - ' ', '\n', '\r', '\t', '\f', '\v', '\u00A0', '\u1680', '\u180E', - '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', - '\u2007', '\u2008', '\u2009', '\u200A', '\u2028', '\u2029', '\u202F', - '\u205F', '\u3000' - ]; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/camelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/camelCase.js deleted file mode 100644 index 02e6c04d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/camelCase.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['../lang/toString', './replaceAccents', './removeNonWord', './upperCase', './lowerCase'], function(toString, replaceAccents, removeNonWord, upperCase, lowerCase){ - /** - * Convert string to camelCase text. - */ - function camelCase(str){ - str = toString(str); - str = replaceAccents(str); - str = removeNonWord(str) - .replace(/[\-_]/g, ' ') //convert all hyphens and underscores to spaces - .replace(/\s[a-z]/g, upperCase) //convert first char of each word to UPPERCASE - .replace(/\s+/g, '') //remove spaces - .replace(/^[A-Z]/g, lowerCase); //convert first char to lowercase - return str; - } - return camelCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/contains.js deleted file mode 100644 index 825b5a5f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/contains.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../lang/toString'], function(toString) { - - /** - * Searches for a given substring - */ - function contains(str, substring, fromIndex){ - str = toString(str); - substring = toString(substring); - return str.indexOf(substring, fromIndex) !== -1; - } - - return contains; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/crop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/crop.js deleted file mode 100644 index 3c073f05..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/crop.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString', './truncate'], function (toString, truncate) { - /** - * Truncate string at full words. - */ - function crop(str, maxChars, append) { - str = toString(str); - return truncate(str, maxChars, append, true); - } - - return crop; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/endsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/endsWith.js deleted file mode 100644 index 31a73f20..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/endsWith.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../lang/toString'], function(toString) { - /** - * Checks if string ends with specified suffix. - */ - function endsWith(str, suffix) { - str = toString(str); - suffix = toString(suffix); - - return str.indexOf(suffix, str.length - suffix.length) !== -1; - } - - return endsWith; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/escapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/escapeHtml.js deleted file mode 100644 index de34b61b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/escapeHtml.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../lang/toString'], function(toString) { - - /** - * Escapes a string for insertion into HTML. - */ - function escapeHtml(str){ - str = toString(str) - .replace(/&/g, '&') - .replace(/</g, '<') - .replace(/>/g, '>') - .replace(/'/g, ''') - .replace(/"/g, '"'); - return str; - } - - return escapeHtml; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/escapeRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/escapeRegExp.js deleted file mode 100644 index 32facac0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/escapeRegExp.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['../lang/toString'], function(toString) { - - var ESCAPE_CHARS = /[\\.+*?\^$\[\](){}\/'#]/g; - - /** - * Escape RegExp string chars. - */ - function escapeRegExp(str) { - str = toString(str); - return str.replace(ESCAPE_CHARS,'\\$&'); - } - - return escapeRegExp; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/escapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/escapeUnicode.js deleted file mode 100644 index bd5e8c4c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/escapeUnicode.js +++ /dev/null @@ -1,21 +0,0 @@ -define(['../lang/toString'], function(toString) { - - /** - * Escape string into unicode sequences - */ - function escapeUnicode(str, shouldEscapePrintable){ - str = toString(str); - return str.replace(/[\s\S]/g, function(ch){ - // skip printable ASCII chars if we should not escape them - if (!shouldEscapePrintable && (/[\x20-\x7E]/).test(ch)) { - return ch; - } - // we use "000" and slice(-4) for brevity, need to pad zeros, - // unicode escape always have 4 chars after "\u" - return '\\u'+ ('000'+ ch.charCodeAt(0).toString(16)).slice(-4); - }); - } - - return escapeUnicode; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/hyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/hyphenate.js deleted file mode 100644 index 679c405c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/hyphenate.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['../lang/toString', './slugify', './unCamelCase'], function(toString, slugify, unCamelCase){ - /** - * Replaces spaces with hyphens, split camelCase text, remove non-word chars, remove accents and convert to lower case. - */ - function hyphenate(str){ - str = toString(str); - str = unCamelCase(str); - return slugify(str, "-"); - } - - return hyphenate; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/insert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/insert.js deleted file mode 100644 index 79c45be7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/insert.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['../math/clamp', '../lang/toString'], function (clamp, toString) { - - /** - * Inserts a string at a given index. - */ - function insert(string, index, partial){ - string = toString(string); - - if (index < 0) { - index = string.length + index; - } - - index = clamp(index, 0, string.length); - - return string.substr(0, index) + partial + string.substr(index); - } - - return insert; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/interpolate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/interpolate.js deleted file mode 100644 index ecb8ba80..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/interpolate.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../lang/toString'], function(toString) { - - var stache = /\{\{(\w+)\}\}/g; //mustache-like - - /** - * String interpolation - */ - function interpolate(template, replacements, syntax){ - template = toString(template); - var replaceFn = function(match, prop){ - return (prop in replacements)? toString(replacements[prop]) : ''; - }; - return template.replace(syntax || stache, replaceFn); - } - - return interpolate; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/lowerCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/lowerCase.js deleted file mode 100644 index b045d69c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/lowerCase.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * "Safer" String.toLowerCase() - */ - function lowerCase(str){ - str = toString(str); - return str.toLowerCase(); - } - - return lowerCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/lpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/lpad.js deleted file mode 100644 index 134b4150..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/lpad.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['../lang/toString', './repeat'], function(toString, repeat) { - - /** - * Pad string with `char` if its' length is smaller than `minLen` - */ - function lpad(str, minLen, ch) { - str = toString(str); - ch = ch || ' '; - - return (str.length < minLen) ? - repeat(ch, minLen - str.length) + str : str; - } - - return lpad; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/ltrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/ltrim.js deleted file mode 100644 index 477df953..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/ltrim.js +++ /dev/null @@ -1,33 +0,0 @@ -define(['../lang/toString', './WHITE_SPACES'], function(toString, WHITE_SPACES){ - /** - * Remove chars from beginning of string. - */ - function ltrim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - - var start = 0, - len = str.length, - charLen = chars.length, - found = true, - i, c; - - while (found && start < len) { - found = false; - i = -1; - c = str.charAt(start); - - while (++i < charLen) { - if (c === chars[i]) { - found = true; - start++; - break; - } - } - } - - return (start >= len) ? '' : str.substr(start, len); - } - - return ltrim; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/makePath.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/makePath.js deleted file mode 100644 index 149275fd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/makePath.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../array/join'], function(join){ - - /** - * Group arguments as path segments, if any of the args is `null` or an - * empty string it will be ignored from resulting path. - */ - function makePath(var_args){ - var result = join(Array.prototype.slice.call(arguments), '/'); - // need to disconsider duplicate '/' after protocol (eg: 'http://') - return result.replace(/([^:\/]|^)\/{2,}/g, '$1/'); - } - - return makePath; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/normalizeLineBreaks.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/normalizeLineBreaks.js deleted file mode 100644 index 44e4194f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/normalizeLineBreaks.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../lang/toString'], function (toString) { - - /** - * Convert line-breaks from DOS/MAC to a single standard (UNIX by default) - */ - function normalizeLineBreaks(str, lineEnd) { - str = toString(str); - lineEnd = lineEnd || '\n'; - - return str - .replace(/\r\n/g, lineEnd) // DOS - .replace(/\r/g, lineEnd) // Mac - .replace(/\n/g, lineEnd); // Unix - } - - return normalizeLineBreaks; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/pascalCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/pascalCase.js deleted file mode 100644 index ead9ead4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/pascalCase.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString', './camelCase', './upperCase'], function(toString, camelCase, upperCase){ - /** - * camelCase + UPPERCASE first char - */ - function pascalCase(str){ - str = toString(str); - return camelCase(str).replace(/^[a-z]/, upperCase); - } - - return pascalCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/properCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/properCase.js deleted file mode 100644 index 2987b507..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/properCase.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString', './lowerCase', './upperCase'], function(toString, lowerCase, upperCase){ - /** - * UPPERCASE first char of each word. - */ - function properCase(str){ - str = toString(str); - return lowerCase(str).replace(/^\w|\s\w/g, upperCase); - } - - return properCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/removeNonASCII.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/removeNonASCII.js deleted file mode 100644 index 4905869d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/removeNonASCII.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * Remove non-printable ASCII chars - */ - function removeNonASCII(str){ - str = toString(str); - - // Matches non-printable ASCII chars - - // http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters - return str.replace(/[^\x20-\x7E]/g, ''); - } - - return removeNonASCII; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/removeNonWord.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/removeNonWord.js deleted file mode 100644 index 2b1a2040..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/removeNonWord.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * Remove non-word chars. - */ - function removeNonWord(str){ - str = toString(str); - return str.replace(/[^0-9a-zA-Z\xC0-\xFF \-_]/g, ''); - } - - return removeNonWord; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/repeat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/repeat.js deleted file mode 100644 index 02f5659f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/repeat.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../lang/toString'], function(toString){ - - /** - * Repeat string n times - */ - function repeat(str, n){ - str = toString(str); - return (new Array(n + 1)).join(str); - } - - return repeat; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/replace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/replace.js deleted file mode 100644 index 8b762fdc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/replace.js +++ /dev/null @@ -1,32 +0,0 @@ -define(['../lang/toString', '../lang/toArray'], function (toString, toArray) { - - /** - * Replace string(s) with the replacement(s) in the source. - */ - function replace(str, search, replacements) { - str = toString(str); - search = toArray(search); - replacements = toArray(replacements); - - var searchLength = search.length, - replacementsLength = replacements.length; - - if (replacementsLength !== 1 && searchLength !== replacementsLength) { - throw new Error('Unequal number of searches and replacements'); - } - - var i = -1; - while (++i < searchLength) { - // Use the first replacement for all searches if only one - // replacement is provided - str = str.replace( - search[i], - replacements[(replacementsLength === 1) ? 0 : i]); - } - - return str; - } - - return replace; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/replaceAccents.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/replaceAccents.js deleted file mode 100644 index 3a63f55a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/replaceAccents.js +++ /dev/null @@ -1,36 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * Replaces all accented chars with regular ones - */ - function replaceAccents(str){ - str = toString(str); - - // verifies if the String has accents and replace them - if (str.search(/[\xC0-\xFF]/g) > -1) { - str = str - .replace(/[\xC0-\xC5]/g, "A") - .replace(/[\xC6]/g, "AE") - .replace(/[\xC7]/g, "C") - .replace(/[\xC8-\xCB]/g, "E") - .replace(/[\xCC-\xCF]/g, "I") - .replace(/[\xD0]/g, "D") - .replace(/[\xD1]/g, "N") - .replace(/[\xD2-\xD6\xD8]/g, "O") - .replace(/[\xD9-\xDC]/g, "U") - .replace(/[\xDD]/g, "Y") - .replace(/[\xDE]/g, "P") - .replace(/[\xE0-\xE5]/g, "a") - .replace(/[\xE6]/g, "ae") - .replace(/[\xE7]/g, "c") - .replace(/[\xE8-\xEB]/g, "e") - .replace(/[\xEC-\xEF]/g, "i") - .replace(/[\xF1]/g, "n") - .replace(/[\xF2-\xF6\xF8]/g, "o") - .replace(/[\xF9-\xFC]/g, "u") - .replace(/[\xFE]/g, "p") - .replace(/[\xFD\xFF]/g, "y"); - } - return str; - } - return replaceAccents; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/rpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/rpad.js deleted file mode 100644 index 2efd9c88..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/rpad.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../lang/toString', './repeat'], function (toString, repeat) { - - /** - * Pad string with `char` if its' length is smaller than `minLen` - */ - function rpad(str, minLen, ch) { - str = toString(str); - ch = ch || ' '; - return (str.length < minLen)? str + repeat(ch, minLen - str.length) : str; - } - - return rpad; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/rtrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/rtrim.js deleted file mode 100644 index a4cc282d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/rtrim.js +++ /dev/null @@ -1,32 +0,0 @@ -define(['../lang/toString', './WHITE_SPACES'], function(toString, WHITE_SPACES){ - /** - * Remove chars from end of string. - */ - function rtrim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - - var end = str.length - 1, - charLen = chars.length, - found = true, - i, c; - - while (found && end >= 0) { - found = false; - i = -1; - c = str.charAt(end); - - while (++i < charLen) { - if (c === chars[i]) { - found = true; - end--; - break; - } - } - } - - return (end >= 0) ? str.substring(0, end + 1) : ''; - } - - return rtrim; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/sentenceCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/sentenceCase.js deleted file mode 100644 index cfe45af5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/sentenceCase.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../lang/toString', './lowerCase', './upperCase'], function(toString, lowerCase, upperCase){ - /** - * UPPERCASE first char of each sentence and lowercase other chars. - */ - function sentenceCase(str){ - str = toString(str); - - // Replace first char of each sentence (new line or after '.\s+') to - // UPPERCASE - return lowerCase(str).replace(/(^\w)|\.\s+(\w)/gm, upperCase); - } - return sentenceCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/slugify.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/slugify.js deleted file mode 100644 index c6d68c7e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/slugify.js +++ /dev/null @@ -1,21 +0,0 @@ -define(['../lang/toString', './replaceAccents', './removeNonWord', './trim'], function(toString, replaceAccents, removeNonWord, trim){ - /** - * Convert to lower case, remove accents, remove non-word chars and - * replace spaces with the specified delimeter. - * Does not split camelCase text. - */ - function slugify(str, delimeter){ - str = toString(str); - - if (delimeter == null) { - delimeter = "-"; - } - str = replaceAccents(str); - str = removeNonWord(str); - str = trim(str) //should come after removeNonWord - .replace(/ +/g, delimeter) //replace spaces with delimeter - .toLowerCase(); - return str; - } - return slugify; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/startsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/startsWith.js deleted file mode 100644 index 88ae5453..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/startsWith.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../lang/toString'], function (toString) { - /** - * Checks if string starts with specified prefix. - */ - function startsWith(str, prefix) { - str = toString(str); - prefix = toString(prefix); - - return str.indexOf(prefix) === 0; - } - - return startsWith; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/stripHtmlTags.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/stripHtmlTags.js deleted file mode 100644 index e8da956d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/stripHtmlTags.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * Remove HTML tags from string. - */ - function stripHtmlTags(str){ - str = toString(str); - - return str.replace(/<[^>]*>/g, ''); - } - return stripHtmlTags; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/trim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/trim.js deleted file mode 100644 index 55526041..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/trim.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['../lang/toString', './WHITE_SPACES', './ltrim', './rtrim'], function(toString, WHITE_SPACES, ltrim, rtrim){ - /** - * Remove white-spaces from beginning and end of string. - */ - function trim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - return ltrim(rtrim(str, chars), chars); - } - - return trim; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/truncate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/truncate.js deleted file mode 100644 index 34000d9f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/truncate.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['../lang/toString', './trim'], function(toString, trim){ - /** - * Limit number of chars. - */ - function truncate(str, maxChars, append, onlyFullWords){ - str = toString(str); - append = append || '...'; - maxChars = onlyFullWords? maxChars + 1 : maxChars; - - str = trim(str); - if(str.length <= maxChars){ - return str; - } - str = str.substr(0, maxChars - append.length); - //crop at last space or remove trailing whitespace - str = onlyFullWords? str.substr(0, str.lastIndexOf(' ')) : trim(str); - return str + append; - } - return truncate; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/typecast.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/typecast.js deleted file mode 100644 index a7c83153..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/typecast.js +++ /dev/null @@ -1,29 +0,0 @@ -define(function () { - - var UNDEF; - - /** - * Parses string and convert it into a native value. - */ - function typecast(val) { - var r; - if ( val === null || val === 'null' ) { - r = null; - } else if ( val === 'true' ) { - r = true; - } else if ( val === 'false' ) { - r = false; - } else if ( val === UNDEF || val === 'undefined' ) { - r = UNDEF; - } else if ( val === '' || isNaN(val) ) { - //isNaN('') returns false - r = val; - } else { - //parseFloat(null || '') returns NaN - r = parseFloat(val); - } - return r; - } - - return typecast; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/unCamelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/unCamelCase.js deleted file mode 100644 index eeef39b6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/unCamelCase.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['../lang/toString'], function(toString){ - - var CAMEL_CASE_BORDER = /([a-z\xE0-\xFF])([A-Z\xC0\xDF])/g; - - /** - * Add space between camelCase text. - */ - function unCamelCase(str, delimiter){ - if (delimiter == null) { - delimiter = ' '; - } - - function join(str, c1, c2) { - return c1 + delimiter + c2; - } - - str = toString(str); - str = str.replace(CAMEL_CASE_BORDER, join); - str = str.toLowerCase(); //add space between camelCase text - return str; - } - return unCamelCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/underscore.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/underscore.js deleted file mode 100644 index 75dd4649..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/underscore.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString', './slugify', './unCamelCase'], function(toString, slugify, unCamelCase){ - /** - * Replaces spaces with underscores, split camelCase text, remove non-word chars, remove accents and convert to lower case. - */ - function underscore(str){ - str = toString(str); - str = unCamelCase(str); - return slugify(str, "_"); - } - return underscore; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/unescapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/unescapeHtml.js deleted file mode 100644 index 173c69c2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/unescapeHtml.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../lang/toString'], function (toString) { - - /** - * Unescapes HTML special chars - */ - function unescapeHtml(str){ - str = toString(str) - .replace(/&/g , '&') - .replace(/</g , '<') - .replace(/>/g , '>') - .replace(/'/g , "'") - .replace(/"/g, '"'); - return str; - } - - return unescapeHtml; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/unescapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/unescapeUnicode.js deleted file mode 100644 index d4a7ba1d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/unescapeUnicode.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['../lang/toString'], function(toString) { - - /** - * Unescape unicode char sequences - */ - function unescapeUnicode(str){ - str = toString(str); - return str.replace(/\\u[0-9a-f]{4}/g, function(ch){ - var code = parseInt(ch.slice(2), 16); - return String.fromCharCode(code); - }); - } - - return unescapeUnicode; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/unhyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/unhyphenate.js deleted file mode 100644 index 6ac2fa4c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/unhyphenate.js +++ /dev/null @@ -1,10 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * Replaces hyphens with spaces. (only hyphens between word chars) - */ - function unhyphenate(str){ - str = toString(str); - return str.replace(/(\w)(-)(\w)/g, '$1 $3'); - } - return unhyphenate; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/upperCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/upperCase.js deleted file mode 100644 index 8b2073e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/string/upperCase.js +++ /dev/null @@ -1,10 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * "Safer" String.toUpperCase() - */ - function upperCase(str){ - str = toString(str); - return str.toUpperCase(); - } - return upperCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/time.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/time.js deleted file mode 100644 index 67c90685..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/time.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'convert' : require('./time/convert'), - 'now' : require('./time/now'), - 'parseMs' : require('./time/parseMs'), - 'toTimeString' : require('./time/toTimeString') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/time/convert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/time/convert.js deleted file mode 100644 index 2de0cf2e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/time/convert.js +++ /dev/null @@ -1,41 +0,0 @@ -define(function () { - - /** - * convert time into another unit - */ - function convert(val, sourceUnitName, destinationUnitName){ - destinationUnitName = destinationUnitName || 'ms'; - return (val * getUnit(sourceUnitName)) / getUnit(destinationUnitName); - } - - - //TODO: maybe extract to a separate module - function getUnit(unitName){ - switch(unitName){ - case 'ms': - case 'millisecond': - return 1; - case 's': - case 'second': - return 1000; - case 'm': - case 'minute': - return 60000; - case 'h': - case 'hour': - return 3600000; - case 'd': - case 'day': - return 86400000; - case 'w': - case 'week': - return 604800000; - default: - throw new Error('"'+ unitName + '" is not a valid unit'); - } - } - - - return convert; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/time/now.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/time/now.js deleted file mode 100644 index a3a38bcb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/time/now.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function () { - - /** - * Get current time in miliseconds - */ - var now = (typeof Date.now === 'function')? Date.now : function(){ - return +(new Date()); - }; - - return now; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/time/parseMs.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/time/parseMs.js deleted file mode 100644 index 964929ae..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/time/parseMs.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['../math/countSteps'], function(countSteps){ - - /** - * Parse timestamp into an object. - */ - function parseMs(ms){ - return { - milliseconds : countSteps(ms, 1, 1000), - seconds : countSteps(ms, 1000, 60), - minutes : countSteps(ms, 60000, 60), - hours : countSteps(ms, 3600000, 24), - days : countSteps(ms, 86400000) - }; - } - - return parseMs; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/time/toTimeString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/time/toTimeString.js deleted file mode 100644 index edf18218..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/src/time/toTimeString.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['../math/countSteps', '../number/pad'], function(countSteps, pad){ - - var HOUR = 3600000, - MINUTE = 60000, - SECOND = 1000; - - /** - * Format timestamp into a time string. - */ - function toTimeString(ms){ - var h = ms < HOUR ? 0 : countSteps(ms, HOUR), - m = ms < MINUTE ? 0 : countSteps(ms, MINUTE, 60), - s = ms < SECOND ? 0 : countSteps(ms, SECOND, 60), - str = ''; - - str += h? h + ':' : ''; - str += pad(m, 2) + ':'; - str += pad(s, 2); - - return str; - } - return toTimeString; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string.js deleted file mode 100644 index 6115811a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string.js +++ /dev/null @@ -1,46 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'WHITE_SPACES' : require('./string/WHITE_SPACES'), - 'camelCase' : require('./string/camelCase'), - 'contains' : require('./string/contains'), - 'crop' : require('./string/crop'), - 'endsWith' : require('./string/endsWith'), - 'escapeHtml' : require('./string/escapeHtml'), - 'escapeRegExp' : require('./string/escapeRegExp'), - 'escapeUnicode' : require('./string/escapeUnicode'), - 'hyphenate' : require('./string/hyphenate'), - 'insert' : require('./string/insert'), - 'interpolate' : require('./string/interpolate'), - 'lowerCase' : require('./string/lowerCase'), - 'lpad' : require('./string/lpad'), - 'ltrim' : require('./string/ltrim'), - 'makePath' : require('./string/makePath'), - 'normalizeLineBreaks' : require('./string/normalizeLineBreaks'), - 'pascalCase' : require('./string/pascalCase'), - 'properCase' : require('./string/properCase'), - 'removeNonASCII' : require('./string/removeNonASCII'), - 'removeNonWord' : require('./string/removeNonWord'), - 'repeat' : require('./string/repeat'), - 'replace' : require('./string/replace'), - 'replaceAccents' : require('./string/replaceAccents'), - 'rpad' : require('./string/rpad'), - 'rtrim' : require('./string/rtrim'), - 'sentenceCase' : require('./string/sentenceCase'), - 'slugify' : require('./string/slugify'), - 'startsWith' : require('./string/startsWith'), - 'stripHtmlTags' : require('./string/stripHtmlTags'), - 'trim' : require('./string/trim'), - 'truncate' : require('./string/truncate'), - 'typecast' : require('./string/typecast'), - 'unCamelCase' : require('./string/unCamelCase'), - 'underscore' : require('./string/underscore'), - 'unescapeHtml' : require('./string/unescapeHtml'), - 'unescapeUnicode' : require('./string/unescapeUnicode'), - 'unhyphenate' : require('./string/unhyphenate'), - 'upperCase' : require('./string/upperCase') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/WHITE_SPACES.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/WHITE_SPACES.js deleted file mode 100644 index 03e01254..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/WHITE_SPACES.js +++ /dev/null @@ -1,12 +0,0 @@ - - /** - * Contains all Unicode white-spaces. Taken from - * http://en.wikipedia.org/wiki/Whitespace_character. - */ - module.exports = [ - ' ', '\n', '\r', '\t', '\f', '\v', '\u00A0', '\u1680', '\u180E', - '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', - '\u2007', '\u2008', '\u2009', '\u200A', '\u2028', '\u2029', '\u202F', - '\u205F', '\u3000' - ]; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/camelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/camelCase.js deleted file mode 100644 index aadb69a2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/camelCase.js +++ /dev/null @@ -1,20 +0,0 @@ -var toString = require('../lang/toString'); -var replaceAccents = require('./replaceAccents'); -var removeNonWord = require('./removeNonWord'); -var upperCase = require('./upperCase'); -var lowerCase = require('./lowerCase'); - /** - * Convert string to camelCase text. - */ - function camelCase(str){ - str = toString(str); - str = replaceAccents(str); - str = removeNonWord(str) - .replace(/[\-_]/g, ' ') //convert all hyphens and underscores to spaces - .replace(/\s[a-z]/g, upperCase) //convert first char of each word to UPPERCASE - .replace(/\s+/g, '') //remove spaces - .replace(/^[A-Z]/g, lowerCase); //convert first char to lowercase - return str; - } - module.exports = camelCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/contains.js deleted file mode 100644 index cb22cae4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/contains.js +++ /dev/null @@ -1,14 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Searches for a given substring - */ - function contains(str, substring, fromIndex){ - str = toString(str); - substring = toString(substring); - return str.indexOf(substring, fromIndex) !== -1; - } - - module.exports = contains; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/crop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/crop.js deleted file mode 100644 index 53b93b49..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/crop.js +++ /dev/null @@ -1,12 +0,0 @@ -var toString = require('../lang/toString'); -var truncate = require('./truncate'); - /** - * Truncate string at full words. - */ - function crop(str, maxChars, append) { - str = toString(str); - return truncate(str, maxChars, append, true); - } - - module.exports = crop; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/endsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/endsWith.js deleted file mode 100644 index d504e9dd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/endsWith.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Checks if string ends with specified suffix. - */ - function endsWith(str, suffix) { - str = toString(str); - suffix = toString(suffix); - - return str.indexOf(suffix, str.length - suffix.length) !== -1; - } - - module.exports = endsWith; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/escapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/escapeHtml.js deleted file mode 100644 index e67c4b21..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/escapeHtml.js +++ /dev/null @@ -1,18 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Escapes a string for insertion into HTML. - */ - function escapeHtml(str){ - str = toString(str) - .replace(/&/g, '&') - .replace(/</g, '<') - .replace(/>/g, '>') - .replace(/'/g, ''') - .replace(/"/g, '"'); - return str; - } - - module.exports = escapeHtml; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/escapeRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/escapeRegExp.js deleted file mode 100644 index 70cb84ff..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/escapeRegExp.js +++ /dev/null @@ -1,15 +0,0 @@ -var toString = require('../lang/toString'); - - var ESCAPE_CHARS = /[\\.+*?\^$\[\](){}\/'#]/g; - - /** - * Escape RegExp string chars. - */ - function escapeRegExp(str) { - str = toString(str); - return str.replace(ESCAPE_CHARS,'\\$&'); - } - - module.exports = escapeRegExp; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/escapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/escapeUnicode.js deleted file mode 100644 index ec649adf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/escapeUnicode.js +++ /dev/null @@ -1,21 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Escape string into unicode sequences - */ - function escapeUnicode(str, shouldEscapePrintable){ - str = toString(str); - return str.replace(/[\s\S]/g, function(ch){ - // skip printable ASCII chars if we should not escape them - if (!shouldEscapePrintable && (/[\x20-\x7E]/).test(ch)) { - return ch; - } - // we use "000" and slice(-4) for brevity, need to pad zeros, - // unicode escape always have 4 chars after "\u" - return '\\u'+ ('000'+ ch.charCodeAt(0).toString(16)).slice(-4); - }); - } - - module.exports = escapeUnicode; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/hyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/hyphenate.js deleted file mode 100644 index 95e32436..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/hyphenate.js +++ /dev/null @@ -1,14 +0,0 @@ -var toString = require('../lang/toString'); -var slugify = require('./slugify'); -var unCamelCase = require('./unCamelCase'); - /** - * Replaces spaces with hyphens, split camelCase text, remove non-word chars, remove accents and convert to lower case. - */ - function hyphenate(str){ - str = toString(str); - str = unCamelCase(str); - return slugify(str, "-"); - } - - module.exports = hyphenate; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/insert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/insert.js deleted file mode 100644 index 8f042c6d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/insert.js +++ /dev/null @@ -1,21 +0,0 @@ -var clamp = require('../math/clamp'); -var toString = require('../lang/toString'); - - /** - * Inserts a string at a given index. - */ - function insert(string, index, partial){ - string = toString(string); - - if (index < 0) { - index = string.length + index; - } - - index = clamp(index, 0, string.length); - - return string.substr(0, index) + partial + string.substr(index); - } - - module.exports = insert; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/interpolate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/interpolate.js deleted file mode 100644 index ac88fac2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/interpolate.js +++ /dev/null @@ -1,18 +0,0 @@ -var toString = require('../lang/toString'); - - var stache = /\{\{(\w+)\}\}/g; //mustache-like - - /** - * String interpolation - */ - function interpolate(template, replacements, syntax){ - template = toString(template); - var replaceFn = function(match, prop){ - return (prop in replacements)? toString(replacements[prop]) : ''; - }; - return template.replace(syntax || stache, replaceFn); - } - - module.exports = interpolate; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/lowerCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/lowerCase.js deleted file mode 100644 index 30bb7ad9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/lowerCase.js +++ /dev/null @@ -1,11 +0,0 @@ -var toString = require('../lang/toString'); - /** - * "Safer" String.toLowerCase() - */ - function lowerCase(str){ - str = toString(str); - return str.toLowerCase(); - } - - module.exports = lowerCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/lpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/lpad.js deleted file mode 100644 index 63641d3f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/lpad.js +++ /dev/null @@ -1,17 +0,0 @@ -var toString = require('../lang/toString'); -var repeat = require('./repeat'); - - /** - * Pad string with `char` if its' length is smaller than `minLen` - */ - function lpad(str, minLen, ch) { - str = toString(str); - ch = ch || ' '; - - return (str.length < minLen) ? - repeat(ch, minLen - str.length) + str : str; - } - - module.exports = lpad; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/ltrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/ltrim.js deleted file mode 100644 index 23d7b33f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/ltrim.js +++ /dev/null @@ -1,34 +0,0 @@ -var toString = require('../lang/toString'); -var WHITE_SPACES = require('./WHITE_SPACES'); - /** - * Remove chars from beginning of string. - */ - function ltrim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - - var start = 0, - len = str.length, - charLen = chars.length, - found = true, - i, c; - - while (found && start < len) { - found = false; - i = -1; - c = str.charAt(start); - - while (++i < charLen) { - if (c === chars[i]) { - found = true; - start++; - break; - } - } - } - - return (start >= len) ? '' : str.substr(start, len); - } - - module.exports = ltrim; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/makePath.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/makePath.js deleted file mode 100644 index 81a1a6e0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/makePath.js +++ /dev/null @@ -1,14 +0,0 @@ -var join = require('../array/join'); - - /** - * Group arguments as path segments, if any of the args is `null` or an - * empty string it will be ignored from resulting path. - */ - function makePath(var_args){ - var result = join(Array.prototype.slice.call(arguments), '/'); - // need to disconsider duplicate '/' after protocol (eg: 'http://') - return result.replace(/([^:\/]|^)\/{2,}/g, '$1/'); - } - - module.exports = makePath; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/normalizeLineBreaks.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/normalizeLineBreaks.js deleted file mode 100644 index 8a8dccfd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/normalizeLineBreaks.js +++ /dev/null @@ -1,18 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Convert line-breaks from DOS/MAC to a single standard (UNIX by default) - */ - function normalizeLineBreaks(str, lineEnd) { - str = toString(str); - lineEnd = lineEnd || '\n'; - - return str - .replace(/\r\n/g, lineEnd) // DOS - .replace(/\r/g, lineEnd) // Mac - .replace(/\n/g, lineEnd); // Unix - } - - module.exports = normalizeLineBreaks; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/pascalCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/pascalCase.js deleted file mode 100644 index fd190353..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/pascalCase.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); -var camelCase = require('./camelCase'); -var upperCase = require('./upperCase'); - /** - * camelCase + UPPERCASE first char - */ - function pascalCase(str){ - str = toString(str); - return camelCase(str).replace(/^[a-z]/, upperCase); - } - - module.exports = pascalCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/properCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/properCase.js deleted file mode 100644 index 61636be4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/properCase.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); -var lowerCase = require('./lowerCase'); -var upperCase = require('./upperCase'); - /** - * UPPERCASE first char of each word. - */ - function properCase(str){ - str = toString(str); - return lowerCase(str).replace(/^\w|\s\w/g, upperCase); - } - - module.exports = properCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/removeNonASCII.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/removeNonASCII.js deleted file mode 100644 index fb463816..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/removeNonASCII.js +++ /dev/null @@ -1,14 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Remove non-printable ASCII chars - */ - function removeNonASCII(str){ - str = toString(str); - - // Matches non-printable ASCII chars - - // http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters - return str.replace(/[^\x20-\x7E]/g, ''); - } - - module.exports = removeNonASCII; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/removeNonWord.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/removeNonWord.js deleted file mode 100644 index bdd153b9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/removeNonWord.js +++ /dev/null @@ -1,11 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Remove non-word chars. - */ - function removeNonWord(str){ - str = toString(str); - return str.replace(/[^0-9a-zA-Z\xC0-\xFF \-_]/g, ''); - } - - module.exports = removeNonWord; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/repeat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/repeat.js deleted file mode 100644 index 0f9b4754..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/repeat.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Repeat string n times - */ - function repeat(str, n){ - str = toString(str); - return (new Array(n + 1)).join(str); - } - - module.exports = repeat; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/replace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/replace.js deleted file mode 100644 index 14433fc7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/replace.js +++ /dev/null @@ -1,33 +0,0 @@ -var toString = require('../lang/toString'); -var toArray = require('../lang/toArray'); - - /** - * Replace string(s) with the replacement(s) in the source. - */ - function replace(str, search, replacements) { - str = toString(str); - search = toArray(search); - replacements = toArray(replacements); - - var searchLength = search.length, - replacementsLength = replacements.length; - - if (replacementsLength !== 1 && searchLength !== replacementsLength) { - throw new Error('Unequal number of searches and replacements'); - } - - var i = -1; - while (++i < searchLength) { - // Use the first replacement for all searches if only one - // replacement is provided - str = str.replace( - search[i], - replacements[(replacementsLength === 1) ? 0 : i]); - } - - return str; - } - - module.exports = replace; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/replaceAccents.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/replaceAccents.js deleted file mode 100644 index bb221265..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/replaceAccents.js +++ /dev/null @@ -1,36 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Replaces all accented chars with regular ones - */ - function replaceAccents(str){ - str = toString(str); - - // verifies if the String has accents and replace them - if (str.search(/[\xC0-\xFF]/g) > -1) { - str = str - .replace(/[\xC0-\xC5]/g, "A") - .replace(/[\xC6]/g, "AE") - .replace(/[\xC7]/g, "C") - .replace(/[\xC8-\xCB]/g, "E") - .replace(/[\xCC-\xCF]/g, "I") - .replace(/[\xD0]/g, "D") - .replace(/[\xD1]/g, "N") - .replace(/[\xD2-\xD6\xD8]/g, "O") - .replace(/[\xD9-\xDC]/g, "U") - .replace(/[\xDD]/g, "Y") - .replace(/[\xDE]/g, "P") - .replace(/[\xE0-\xE5]/g, "a") - .replace(/[\xE6]/g, "ae") - .replace(/[\xE7]/g, "c") - .replace(/[\xE8-\xEB]/g, "e") - .replace(/[\xEC-\xEF]/g, "i") - .replace(/[\xF1]/g, "n") - .replace(/[\xF2-\xF6\xF8]/g, "o") - .replace(/[\xF9-\xFC]/g, "u") - .replace(/[\xFE]/g, "p") - .replace(/[\xFD\xFF]/g, "y"); - } - return str; - } - module.exports = replaceAccents; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/rpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/rpad.js deleted file mode 100644 index 99f6378d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/rpad.js +++ /dev/null @@ -1,15 +0,0 @@ -var toString = require('../lang/toString'); -var repeat = require('./repeat'); - - /** - * Pad string with `char` if its' length is smaller than `minLen` - */ - function rpad(str, minLen, ch) { - str = toString(str); - ch = ch || ' '; - return (str.length < minLen)? str + repeat(ch, minLen - str.length) : str; - } - - module.exports = rpad; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/rtrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/rtrim.js deleted file mode 100644 index 66ba80e9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/rtrim.js +++ /dev/null @@ -1,33 +0,0 @@ -var toString = require('../lang/toString'); -var WHITE_SPACES = require('./WHITE_SPACES'); - /** - * Remove chars from end of string. - */ - function rtrim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - - var end = str.length - 1, - charLen = chars.length, - found = true, - i, c; - - while (found && end >= 0) { - found = false; - i = -1; - c = str.charAt(end); - - while (++i < charLen) { - if (c === chars[i]) { - found = true; - end--; - break; - } - } - } - - return (end >= 0) ? str.substring(0, end + 1) : ''; - } - - module.exports = rtrim; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/sentenceCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/sentenceCase.js deleted file mode 100644 index 354104c6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/sentenceCase.js +++ /dev/null @@ -1,15 +0,0 @@ -var toString = require('../lang/toString'); -var lowerCase = require('./lowerCase'); -var upperCase = require('./upperCase'); - /** - * UPPERCASE first char of each sentence and lowercase other chars. - */ - function sentenceCase(str){ - str = toString(str); - - // Replace first char of each sentence (new line or after '.\s+') to - // UPPERCASE - return lowerCase(str).replace(/(^\w)|\.\s+(\w)/gm, upperCase); - } - module.exports = sentenceCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/slugify.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/slugify.js deleted file mode 100644 index 142f0d9b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/slugify.js +++ /dev/null @@ -1,24 +0,0 @@ -var toString = require('../lang/toString'); -var replaceAccents = require('./replaceAccents'); -var removeNonWord = require('./removeNonWord'); -var trim = require('./trim'); - /** - * Convert to lower case, remove accents, remove non-word chars and - * replace spaces with the specified delimeter. - * Does not split camelCase text. - */ - function slugify(str, delimeter){ - str = toString(str); - - if (delimeter == null) { - delimeter = "-"; - } - str = replaceAccents(str); - str = removeNonWord(str); - str = trim(str) //should come after removeNonWord - .replace(/ +/g, delimeter) //replace spaces with delimeter - .toLowerCase(); - return str; - } - module.exports = slugify; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/startsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/startsWith.js deleted file mode 100644 index bce2bd20..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/startsWith.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Checks if string starts with specified prefix. - */ - function startsWith(str, prefix) { - str = toString(str); - prefix = toString(prefix); - - return str.indexOf(prefix) === 0; - } - - module.exports = startsWith; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/stripHtmlTags.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/stripHtmlTags.js deleted file mode 100644 index 01d17b0e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/stripHtmlTags.js +++ /dev/null @@ -1,11 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Remove HTML tags from string. - */ - function stripHtmlTags(str){ - str = toString(str); - - return str.replace(/<[^>]*>/g, ''); - } - module.exports = stripHtmlTags; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/trim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/trim.js deleted file mode 100644 index 9652b0c7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/trim.js +++ /dev/null @@ -1,15 +0,0 @@ -var toString = require('../lang/toString'); -var WHITE_SPACES = require('./WHITE_SPACES'); -var ltrim = require('./ltrim'); -var rtrim = require('./rtrim'); - /** - * Remove white-spaces from beginning and end of string. - */ - function trim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - return ltrim(rtrim(str, chars), chars); - } - - module.exports = trim; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/truncate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/truncate.js deleted file mode 100644 index a98d6c7d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/truncate.js +++ /dev/null @@ -1,21 +0,0 @@ -var toString = require('../lang/toString'); -var trim = require('./trim'); - /** - * Limit number of chars. - */ - function truncate(str, maxChars, append, onlyFullWords){ - str = toString(str); - append = append || '...'; - maxChars = onlyFullWords? maxChars + 1 : maxChars; - - str = trim(str); - if(str.length <= maxChars){ - return str; - } - str = str.substr(0, maxChars - append.length); - //crop at last space or remove trailing whitespace - str = onlyFullWords? str.substr(0, str.lastIndexOf(' ')) : trim(str); - return str + append; - } - module.exports = truncate; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/typecast.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/typecast.js deleted file mode 100644 index c1386a49..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/typecast.js +++ /dev/null @@ -1,29 +0,0 @@ - - - var UNDEF; - - /** - * Parses string and convert it into a native value. - */ - function typecast(val) { - var r; - if ( val === null || val === 'null' ) { - r = null; - } else if ( val === 'true' ) { - r = true; - } else if ( val === 'false' ) { - r = false; - } else if ( val === UNDEF || val === 'undefined' ) { - r = UNDEF; - } else if ( val === '' || isNaN(val) ) { - //isNaN('') returns false - r = val; - } else { - //parseFloat(null || '') returns NaN - r = parseFloat(val); - } - return r; - } - - module.exports = typecast; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/unCamelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/unCamelCase.js deleted file mode 100644 index 4968f378..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/unCamelCase.js +++ /dev/null @@ -1,23 +0,0 @@ -var toString = require('../lang/toString'); - - var CAMEL_CASE_BORDER = /([a-z\xE0-\xFF])([A-Z\xC0\xDF])/g; - - /** - * Add space between camelCase text. - */ - function unCamelCase(str, delimiter){ - if (delimiter == null) { - delimiter = ' '; - } - - function join(str, c1, c2) { - return c1 + delimiter + c2; - } - - str = toString(str); - str = str.replace(CAMEL_CASE_BORDER, join); - str = str.toLowerCase(); //add space between camelCase text - return str; - } - module.exports = unCamelCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/underscore.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/underscore.js deleted file mode 100644 index ebd6e2b7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/underscore.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); -var slugify = require('./slugify'); -var unCamelCase = require('./unCamelCase'); - /** - * Replaces spaces with underscores, split camelCase text, remove non-word chars, remove accents and convert to lower case. - */ - function underscore(str){ - str = toString(str); - str = unCamelCase(str); - return slugify(str, "_"); - } - module.exports = underscore; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/unescapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/unescapeHtml.js deleted file mode 100644 index 52cf3f45..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/unescapeHtml.js +++ /dev/null @@ -1,18 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Unescapes HTML special chars - */ - function unescapeHtml(str){ - str = toString(str) - .replace(/&/g , '&') - .replace(/</g , '<') - .replace(/>/g , '>') - .replace(/'/g , "'") - .replace(/"/g, '"'); - return str; - } - - module.exports = unescapeHtml; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/unescapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/unescapeUnicode.js deleted file mode 100644 index 0b7fb73b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/unescapeUnicode.js +++ /dev/null @@ -1,16 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Unescape unicode char sequences - */ - function unescapeUnicode(str){ - str = toString(str); - return str.replace(/\\u[0-9a-f]{4}/g, function(ch){ - var code = parseInt(ch.slice(2), 16); - return String.fromCharCode(code); - }); - } - - module.exports = unescapeUnicode; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/unhyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/unhyphenate.js deleted file mode 100644 index 311dfa17..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/unhyphenate.js +++ /dev/null @@ -1,10 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Replaces hyphens with spaces. (only hyphens between word chars) - */ - function unhyphenate(str){ - str = toString(str); - return str.replace(/(\w)(-)(\w)/g, '$1 $3'); - } - module.exports = unhyphenate; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/upperCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/upperCase.js deleted file mode 100644 index 6c92552c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/string/upperCase.js +++ /dev/null @@ -1,10 +0,0 @@ -var toString = require('../lang/toString'); - /** - * "Safer" String.toUpperCase() - */ - function upperCase(str){ - str = toString(str); - return str.toUpperCase(); - } - module.exports = upperCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/time.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/time.js deleted file mode 100644 index 9f533296..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/time.js +++ /dev/null @@ -1,12 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'convert' : require('./time/convert'), - 'now' : require('./time/now'), - 'parseMs' : require('./time/parseMs'), - 'toTimeString' : require('./time/toTimeString') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/time/convert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/time/convert.js deleted file mode 100644 index 852a0f03..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/time/convert.js +++ /dev/null @@ -1,41 +0,0 @@ - - - /** - * convert time into another unit - */ - function convert(val, sourceUnitName, destinationUnitName){ - destinationUnitName = destinationUnitName || 'ms'; - return (val * getUnit(sourceUnitName)) / getUnit(destinationUnitName); - } - - - //TODO: maybe extract to a separate module - function getUnit(unitName){ - switch(unitName){ - case 'ms': - case 'millisecond': - return 1; - case 's': - case 'second': - return 1000; - case 'm': - case 'minute': - return 60000; - case 'h': - case 'hour': - return 3600000; - case 'd': - case 'day': - return 86400000; - case 'w': - case 'week': - return 604800000; - default: - throw new Error('"'+ unitName + '" is not a valid unit'); - } - } - - - module.exports = convert; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/time/now.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/time/now.js deleted file mode 100644 index effcfbe3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/time/now.js +++ /dev/null @@ -1,12 +0,0 @@ - - - /** - * Get current time in miliseconds - */ - var now = (typeof Date.now === 'function')? Date.now : function(){ - return +(new Date()); - }; - - module.exports = now; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/time/parseMs.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/time/parseMs.js deleted file mode 100644 index 6d997976..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/time/parseMs.js +++ /dev/null @@ -1,17 +0,0 @@ -var countSteps = require('../math/countSteps'); - - /** - * Parse timestamp into an object. - */ - function parseMs(ms){ - return { - milliseconds : countSteps(ms, 1, 1000), - seconds : countSteps(ms, 1000, 60), - minutes : countSteps(ms, 60000, 60), - hours : countSteps(ms, 3600000, 24), - days : countSteps(ms, 86400000) - }; - } - - module.exports = parseMs; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/time/toTimeString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/time/toTimeString.js deleted file mode 100644 index 101d69fc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/mout/time/toTimeString.js +++ /dev/null @@ -1,24 +0,0 @@ -var countSteps = require('../math/countSteps'); -var pad = require('../number/pad'); - - var HOUR = 3600000, - MINUTE = 60000, - SECOND = 1000; - - /** - * Format timestamp into a time string. - */ - function toTimeString(ms){ - var h = ms < HOUR ? 0 : countSteps(ms, HOUR), - m = ms < MINUTE ? 0 : countSteps(ms, MINUTE, 60), - s = ms < SECOND ? 0 : countSteps(ms, SECOND, 60), - str = ''; - - str += h? h + ':' : ''; - str += pad(m, 2) + ':'; - str += pad(s, 2); - - return str; - } - module.exports = toTimeString; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/bin/optipng.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/bin/optipng.js deleted file mode 100755 index 311d46f2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/bin/optipng.js +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var binPath = require('../lib/optipng').path; -var spawn = require('child_process').spawn; - -spawn(binPath, process.argv.slice(2), { stdio: 'inherit' }) - .on('exit', process.exit); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/lib/check.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/lib/check.js deleted file mode 100644 index 0ac3db68..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/lib/check.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -var bin = require('./optipng').bin; -var chalk = require('chalk'); - -bin.check(function (w) { - if (!w) { - console.log(chalk.red('✗ pre-build test failed, compiling from source...')); - - if (process.platform === 'win32') { - throw new Error('building is not supported on ' + process.platform); - } - - return bin.build(function (err) { - if (err) { - return console.log(chalk.red('✗ ' + err.message)); - } - - console.log(chalk.green('✓ optipng rebuilt successfully')); - }); - } - - console.log(chalk.green('✓ pre-build test passed successfully')); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/lib/optipng.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/lib/optipng.js deleted file mode 100644 index 45fa96df..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/lib/optipng.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -var Bin = require('bin-wrapper'); -var path = require('path'); - -var options = { - name: 'optipng', - bin: 'optipng', - path: path.join(__dirname, '../vendor'), - src: 'http://downloads.sourceforge.net/project/optipng/OptiPNG/optipng-0.7.4/optipng-0.7.4.tar.gz', - buildScript: './configure --with-system-zlib --bindir="' + path.join(__dirname, '../vendor') + '" && ' + - 'make install', - platform: { - darwin: { - url: 'https://raw.github.com/yeoman/node-optipng-bin/master/vendor/osx/optipng' - }, - freebsd: { - url: 'https://raw.github.com/yeoman/node-optipng-bin/master/vendor/freebsd/optipng' - }, - linux: { - url: 'https://raw.github.com/yeoman/node-optipng-bin/master/vendor/linux/x86/optipng', - arch: { - x64: { - url: 'https://raw.github.com/yeoman/node-optipng-bin/master/vendor/linux/x64/optipng' - } - } - }, - sunos: { - url: 'https://raw.github.com/yeoman/node-optipng-bin/master/vendor/sunos/x86/optipng', - arch: { - x64: { - url: 'https://raw.github.com/yeoman/node-optipng-bin/master/vendor/sunos/x64/optipng', - } - } - }, - win32: { - bin: 'optipng.exe', - url: 'https://raw.github.com/yeoman/node-optipng-bin/master/vendor/win/optipng.exe' - } - } -}; -var bin = new Bin(options); - -exports.bin = bin; -exports.options = options; -exports.path = bin.path; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/README.md deleted file mode 100644 index 05419cd4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/README.md +++ /dev/null @@ -1,67 +0,0 @@ -# bin-wrapper [![Build Status](https://secure.travis-ci.org/kevva/bin-wrapper.png?branch=master)](http://travis-ci.org/kevva/bin-wrapper) - -Binary wrapper for Node.js that makes your programs seamlessly available as local dependencies - -## Getting started - -Install with [npm](https://npmjs.org/package/bin-wrapper): `npm install bin-wrapper` - -## Examples - -All `platform` and `arch` specific options takes precedence over the base -options. See [test.js](test.js) for a full fleshed example. - -```js -var Bin = require('bin-wrapper'); - -var opts = { - name: 'Gifsicle', - bin: 'gifsicle', - path: 'vendor', - url: 'http://url/to/gifsicle', - src: 'http://www.lcdf.org/gifsicle/gifsicle-1.71.tar.gz', - buildScript: './configure --bindir="vendor" && make install', - platform: { - win32: { - bin: 'gifsicle.exe', - url: [ - 'http://url/to/gifsicle.exe' - 'http://url/to/gifsicle.dll' - ] - } - } -} -var bin = new Bin(opts); - -bin.check('--version', function (works) { - if (!works) { - console.log('Pre-build test failed, compiling from source'); - return bin.build(); - } - - console.log('Binary passed the test'); -}); -``` - -Get the path to your binary with `bin.path`. - -```js -console.log(bin.path); -// => path/to/vendor/gifsicle -``` - -## API - -### .check(cmd, cb) - -Check if a binary is present and working. If it isn't, download and test it by -running the binary with `cmd` and see if it exits correctly. - -### .build(cb) - -Download the source archive defined in the `src` property and build it using the -build script defined in the `buildScript` property. - -## License - -[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/bin-wrapper.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/bin-wrapper.js deleted file mode 100644 index ccfe9342..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/bin-wrapper.js +++ /dev/null @@ -1,222 +0,0 @@ -'use strict'; - -var download = require('download'); -var exec = require('child_process').exec; -var fs = require('fs'); -var hasOwn = require('mout/object/hasOwn'); -var isbin = require('isbin'); -var isFunction = require('mout/lang/isFunction'); -var mixIn = require('mout/object/mixIn'); -var os = require('os'); -var path = require('path'); -var ProgressBar = require('progress'); -var rm = require('rimraf'); -var spawn = require('child_process').spawn; -var which = require('which'); - -/** - * Initialize BinWrapper with options - * - * @param {Object} opts - * @api public - */ - -function BinWrapper(opts) { - opts = opts || {}; - this.opts = this._parse(opts); - this.name = this.opts.name; - this.bin = this.opts.bin; - this.dest = this.opts.path; - this.path = this._path() || path.join(this.dest, this.bin); - this.url = this.opts.url; - this.src = this.opts.src; - this.buildScript = this.opts.buildScript; - this.proxy = process.env.http_proxy || - process.env.HTTP_PROXY || - process.env.https_proxy || - process.env.HTTPS_PROXY || - null; -} - -/** - * Check if a binary is present and working - * - * @param {String|Array} cmd - * @param {Function} cb - * @api public - */ - -BinWrapper.prototype.check = function (cmd, cb) { - var self = this; - - if (!cb && isFunction(cmd)) { - cb = cmd; - cmd = ['--help']; - } - - cmd = cmd; - cmd = Array.isArray(cmd) ? cmd : [cmd]; - - if (this._path()) { - return self._test(cmd, cb); - } - - this._download(this.url, this.dest, { mode: '0755', proxy: this.proxy }) - .on('close', function () { - return self._test(cmd, cb); - }); -}; - -/** - * Download source and build a binary - * - * @param {Function} cb - * @api public - */ - -BinWrapper.prototype.build = function (cb) { - var self = this; - var tmpDir = os.tmpdir ? os.tmpdir() : os.tmpDir(); - var tmp = path.join(tmpDir, this.name); - var get = this._download(this.src, tmp, { mode: '0777', extract: true, strip: '1', proxy: this.proxy }); - - if (!cb || !isFunction(cb)) { - cb = function () {}; - } - - get.on('close', function () { - exec(self.buildScript, { cwd: tmp }, function (err) { - if (err) { - return cb(err); - } - - rm.sync(tmp); - - return cb(); - }); - }); -}; - -/** - * Download a string or an array of files - * - * @param {String|Array} src - * @param {String} dest - * @param {Object} opts - * @api private - */ - -BinWrapper.prototype._download = function (src, dest, opts) { - var get = download(src, dest, opts); - - get.on('response', function (res) { - var len = parseInt(res.headers['content-length'], 10); - var bar = new ProgressBar(' ' + path.basename(src) + ': downloading [:bar] :percent :etas', { - complete: '=', - incomplete: ' ', - width: 20, - total: len - }); - - res.on('data', function (data) { - bar.tick(data.length); - }); - - res.on('end', function () { - console.log('\n'); - }); - }); - - return get; -}; - -/** - * If a binary exists, get its path - * - * @api private - */ - -BinWrapper.prototype._path = function () { - var self = this; - - if (fs.existsSync(path.join(this.dest, this.bin))) { - return path.join(self.dest, self.bin); - } - - if (isbin(this.bin)) { - if (which.sync(self.bin).indexOf('node_modules/.bin') === -1) { - return which.sync(self.bin); - } - } - - return false; -}; - -/** - * Test if a binary is working by checking its exit code - * - * @param {Array} cmd - * @param {Function} cb - * @api private - */ - -BinWrapper.prototype._test = function (cmd, cb) { - var working; - var bin = spawn(this.path, cmd); - - bin.on('error', function () { - working = false; - return cb(working); - }); - - bin.on('exit', function (code) { - working = code === 0; - return cb(working); - }); -}; - -/** - * Parse options - * - * @param {Object} opts - * @api private - */ - -BinWrapper.prototype._parse = function (opts) { - opts.platform = opts.platform || {}; - opts.arch = opts.arch || {}; - - var platform = process.platform; - var arch = process.arch === 'x64' ? 'x64' : process.arch === 'arm' ? 'arm' : 'x86'; - var required = [ - 'bin', - 'name', - 'path', - 'url' - ]; - - if (hasOwn(opts.platform, [platform])) { - opts = mixIn(opts, opts.platform[platform]); - } - - if (hasOwn(opts.arch, [arch])) { - opts = mixIn(opts, opts.arch[arch]); - } - - required.forEach(function (val) { - if (!hasOwn(opts, val)) { - throw new Error(val + ' option is required'); - } - }); - - delete opts.platform; - delete opts.arch; - - return opts; -}; - -/** - * Module exports - */ - -module.exports = BinWrapper; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/.bin/rimraf b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/.bin/rimraf deleted file mode 120000 index 4cd49a49..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/.bin/rimraf +++ /dev/null @@ -1 +0,0 @@ -../rimraf/bin.js \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/.bin/which b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/.bin/which deleted file mode 120000 index f62471c8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/.bin/which +++ /dev/null @@ -1 +0,0 @@ -../which/bin/which \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/README.md deleted file mode 100644 index f57b2f41..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/README.md +++ /dev/null @@ -1,84 +0,0 @@ -# download [![Build Status](https://secure.travis-ci.org/kevva/download.png?branch=master)](http://travis-ci.org/kevva/download) - -Download and extract files effortlessly in Node.js. - -## Getting started - -Install with [npm](https://npmjs.org/package/download): `npm install download` - -## Examples - -If you're fetching an archive you can set `extract: true` in options and -it'll extract it for you. - -```js -var download = require('download'); - -// download and extract `foo.tar.gz` into `bar/` -download('foo.tar.gz', 'bar', { extract: true }); - -// download and save `foo.exe` into `bar/foo.exe` with mode `0755` -download('foo.exe', 'bar', { mode: '0755' }); - -// download and save `foo.zip` into `bar/foobar.zip` -download({ url: 'foo.zip', name: 'foobar.zip' }, 'bar'); - -// download and save an array of files in `bar/` -var files = ['foo.jpg', 'bar.jpg', 'cat.jpg']; -download(files, 'bar'); - -// download, save and rename an array of files in `bar/` -var files = [{ - url: 'foo.jpg', - name: 'foobar.jpg' -}, { - url: 'cat.jpg', - name: 'dog.jpg' -}]; -download(files, 'bar'); -``` - -## API - -### download(url, dest, opts) - -Download a file or an array of files to a given destination. Returns an EventEmitter -that emits the following possible events: - -* `response` — Relayed when the underlying `http.ClientRequest` emits the same -event. Listeners called with a `http.IncomingMessage` instance. -* `data` — Relayed when the underlying `http.IncomingMessage` emits the same -event. Listeners called with a `Buffer` instance. -* `error` — Relayed when the underlying `http.ClientRequest` emits the same event -or when the response status code is not in the 200s. Listeners called with an -`Error` instance (in the first case) or the response status code. -* `close` — Relayed when the underlying `stream.Duplex` emits the same event. - -## Options - -You can define options accepted by the [request](https://github.com/mikeal/request/) module besides from the options below. - -### extract - -Type: `Boolean` -Default: `false` - -If set to `true`, try extracting the file using [decompress](https://github.com/kevva/decompress/). - -### mode - -Type: `String` -Default: `undefined` - -Set mode on the downloaded files. - -### strip - -Type: `Number` -Default: `0` - -Equivalent to `--strip-components` for tar. - -## License - -[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/download.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/download.js deleted file mode 100644 index 4b9c05e2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/download.js +++ /dev/null @@ -1,100 +0,0 @@ -'use strict'; - -var decompress = require('decompress'); -var eachAsync = require('each-async'); -var fs = require('fs'); -var mkdir = require('mkdirp'); -var path = require('path'); -var request = require('request'); -var through = require('through2'); - -/** - * Download a file to a given destination - * - * Options: - * - * - `extract` Try extracting the file - * - `mode` Set mode on the downloaded files - * - `strip` Equivalent to --strip-components for tar - * - * @param {String|Array|Object} url - * @param {String} dest - * @param {Object} opts - * @api public - */ - -module.exports = function (url, dest, opts) { - url = Array.isArray(url) ? url : [url]; - opts = opts || {}; - - var stream = through(); - var strip = opts.strip || '0'; - - eachAsync(url, function (url, index, done) { - opts.url = url; - var target = path.join(dest, path.basename(url)); - - if (url.url && url.name) { - target = path.join(dest, url.name); - opts.url = url.url; - } - - var req = request.get(opts) - .on('response', function (res) { - stream.emit('response', res); - }) - .on('data', function (data) { - stream.emit('data', data); - }) - .on('error', function (err) { - stream.emit('error', err); - }); - - req.on('response', function (res) { - var mime = res.headers['content-type']; - var status = res.statusCode; - var end; - - if (status < 200 || status >= 300) { - stream.emit('error', status); - return; - } - - if (opts.extract && decompress.canExtract(url, mime)) { - var ext; - - if (decompress.canExtract(url)) { - ext = url; - } else { - ext = mime; - } - - end = decompress.extract({ - ext: ext, - path: dest, - strip: strip - }); - } else { - if (!fs.existsSync(dest)) { - mkdir.sync(dest); - } - - end = fs.createWriteStream(target); - } - - req.pipe(end); - - end.on('close', function () { - if (!opts.extract && opts.mode) { - fs.chmodSync(target, opts.mode); - } - - done(); - }); - }); - }, function () { - stream.emit('close'); - }); - - return stream; -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/README.md deleted file mode 100644 index 4226d3f5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# decompress [![Build Status](https://secure.travis-ci.org/kevva/decompress.png?branch=master)](http://travis-ci.org/kevva/decompress) - -Easily extract `.zip`, `.tar` and `.tar.gz` archives. Based on the extract -utility in [Bower](https://github.com/bower/bower). - -## Getting started - -Install with [npm](https://npmjs.org/package/decompress): `npm install decompress` - -## Examples - -You'll only need to pass a type into `ext` and it'll figure the rest out for -you. - -```js -var decompress = require('decompress'); -var fs = require('fs'); - -var src = fs.createReadStream('foo.tar.gz'); -var dest = decompress.extract({ ext: '.tar.gz' }); - -src.pipe(dest); -``` - -## API - -### .extract(opts) - -Extract an archive using the `ext` option to determine which extractor to use. -If no `path` is specified it'll extract it to your current location. - -### .canExtract(src, mime) - -Determine if a file can be extracted or not by checking the file extension -and/or the MIME type. - -```js -decompress.canExtract('foo.zip'); -// => true - -decompress.canExtract('application/zip'); -// => true -``` - -## Options - -### `ext` - -Type: `String` -Default: `''` - -String that can be a file name, URL, MIME type etc. - -### `path` - -Type: `String` -Default: `process.cwd()` - -Path to extract the archive to. If no `path` is defined it'll extract it to your -current location. - -### strip - -Type: `Number` -Default: `0` - -Equivalent to `--strip-components` for tar. - -## License - -[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/decompress.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/decompress.js deleted file mode 100644 index e110d93c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/decompress.js +++ /dev/null @@ -1,168 +0,0 @@ -'use strict'; - -var AdmZip = require('adm-zip'); -var endsWith = require('mout/string/endsWith'); -var find = require('mout/array/find'); -var fs = require('fs'); -var mkdir = require('mkdirp'); -var path = require('path'); -var pipeline = require('stream-combiner'); -var rm = require('rimraf'); -var tar = require('tar'); -var tempfile = require('tempfile'); -var zlib = require('zlib'); - -/** - * Initialize Decompress with options - * - * Options: - * - * - `ext` String with file name, MIME type, etc - * - `path` Path to extract to - * - * @param {Object} opts - * @api private - */ - -function Decompress(opts) { - opts = opts || {}; - opts.strip = opts.strip || 0; - this.opts = opts; - this.path = opts.path || process.cwd(); - this.ext = opts.ext || ''; - this.strip = opts.strip >= 0 ? opts.strip : 0; - this.extractors = { - '.zip': this._extractZip, - '.tar': this._extractTar, - '.tar.gz': this._extractTarGz, - '.tgz': this._extractTarGz, - 'application/zip': this._extractZip, - 'application/x-tar': this._extractTar, - 'application/x-tgz': this._extractTarGz - }; - this.extractorTypes = Object.keys(this.extractors); - this.extractor = this._getExtractor(this.ext); -} - -/** - * Extract an archive - * - * @api public - */ - -Decompress.prototype.extract = function () { - var self = this; - var stream = this.extractor(); - - if (!fs.existsSync(this.path)) { - mkdir.sync(self.path); - } - - return stream; -}; - -/** - * Check if a file can be extracted - * - * @param {String} src - * @param {String} mime - * @api public - */ - -Decompress.prototype.canExtract = function (src, mime) { - if (this._getExtractor(src)) { - return true; - } - - if (mime && this._getExtractor(mime)) { - return true; - } - - return false; -}; - -/** - * Get the extractor for a desired file - * - * @param {String} src - * @api private - */ - -Decompress.prototype._getExtractor = function (src) { - src = src.toLowerCase(); - - var ext = find(this.extractorTypes, function (ext) { - return endsWith(src, ext); - }); - - return ext ? this.extractors[ext] : null; -}; - -/** - * Extract a zip file - * - * @api private - */ - -Decompress.prototype._extractZip = function () { - var self = this; - var tmp = tempfile('.zip'); - - var stream = fs.createWriteStream(tmp).on('close', function () { - var zip = new AdmZip(tmp); - var zipEntries = zip.getEntries(); - - zipEntries.forEach(function (entry) { - if (!entry.isDirectory) { - var entryFile = path.basename(entry.entryName.toString()); - var entryDir = path.dirname(entry.entryName.toString().split('/').slice(self.strip).join('/')); - var dest = path.join(self.path, entryDir, entryFile); - - mkdir.sync(path.dirname(dest)); - fs.writeFileSync(dest, entry.getData()); - } - }); - }); - - return stream.on('close', function () { - rm.sync(tmp); - }); -}; - -/** - * Extract a tar file - * - * @api private - */ - -Decompress.prototype._extractTar = function () { - var stream = tar.Extract(this.opts); - return stream; -}; - -/** - * Extract a tar.gz file - * - * @api private - */ - -Decompress.prototype._extractTarGz = function () { - var stream = zlib.Unzip(); - var dest = tar.Extract(this.opts); - - return pipeline(stream, dest); -}; - -/** - * Module exports - */ - -module.exports.extract = function (opts) { - var decompress = new Decompress(opts); - return decompress.extract(); -}; - -module.exports.canExtract = function (src, mime) { - var decompress = new Decompress(); - return decompress.canExtract(src, mime); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/.idea/scopes/scope_settings.xml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/.idea/scopes/scope_settings.xml deleted file mode 100644 index 0d5175ca..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/.idea/scopes/scope_settings.xml +++ /dev/null @@ -1,5 +0,0 @@ -<component name="DependencyValidationManager"> - <state> - <option name="SKIP_IMPORT_STATEMENTS" value="false" /> - </state> -</component> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/MIT-LICENSE.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/MIT-LICENSE.txt deleted file mode 100644 index 14c3ee5c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/MIT-LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2012 Another-D-Mention Software and other contributors, -http://www.another-d-mention.ro/ - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/README.md deleted file mode 100644 index 030fab8a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/README.md +++ /dev/null @@ -1,64 +0,0 @@ -# ADM-ZIP for NodeJS - -ADM-ZIP is a pure JavaScript implementation for zip data compression for [NodeJS](http://nodejs.org/). - -# Installation - -With [npm](http://npmjs.org) do: - - $ npm install adm-zip - -## What is it good for? -The library allows you to: - -* decompress zip files directly to disk or in memory buffers -* compress files and store them to disk in .zip format or in compressed buffers -* update content of/add new/delete files from an existing .zip - -# Dependencies -There are no other nodeJS libraries that ADM-ZIP is dependent of - -# Examples - -## Basic usage -```javascript - - var AdmZip = require('adm-zip'); - - // reading archives - var zip = new AdmZip("./my_file.zip"); - var zipEntries = zip.getEntries(); // an array of ZipEntry records - - zipEntries.forEach(function(zipEntry) { - console.log(zipEntry.toString()); // outputs zip entries information - if (zipEntry.entryName == "my_file.txt") { - console.log(zipEntry.data.toString('utf8')); - } - }); - // outputs the content of some_folder/my_file.txt - console.log(zip.readAsText("some_folder/my_file.txt")); - // extracts the specified file to the specified location - zip.extractEntryTo(/*entry name*/"some_folder/my_file.txt", /*target path*/"/home/me/tempfolder", /*maintainEntryPath*/false, /*overwrite*/true); - // extracts everything - zip.extractAllTo(/*target path*/"/home/me/zipcontent/", /*overwrite*/true); - - - // creating archives - var zip = new AdmZip(); - - // add file directly - zip.addFile("test.txt", new Buffer("inner content of the file"), "entry comment goes here"); - // add local file - zip.addLocalFile("/home/me/some_picture.png"); - // get everything as a buffer - var willSendthis = zip.toBuffer(); - // or write everything to disk - zip.writeZip(/*target file name*/"/home/me/files.zip"); - - - // ... more examples in the wiki -``` - -For more detailed information please check out the [wiki](https://github.com/cthackers/adm-zip/wiki). - -[![build status](https://secure.travis-ci.org/cthackers/adm-zip.png)](http://travis-ci.org/cthackers/adm-zip) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/adm-zip.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/adm-zip.js deleted file mode 100644 index 46595fc5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/adm-zip.js +++ /dev/null @@ -1,404 +0,0 @@ -var fs = require("fs"), - pth = require("path"); - -fs.existsSync = fs.existsSync || pth.existsSync; - -var ZipEntry = require("./zipEntry"), - ZipFile = require("./zipFile"), - Utils = require("./util"); - -module.exports = function(/*String*/input) { - var _zip = undefined, - _filename = ""; - - if (input && typeof input === "string") { // load zip file - if (fs.existsSync(input)) { - _filename = input; - _zip = new ZipFile(input, Utils.Constants.FILE); - } else { - throw Utils.Errors.INVALID_FILENAME; - } - } else if(input && Buffer.isBuffer(input)) { // load buffer - _zip = new ZipFile(input, Utils.Constants.BUFFER); - } else { // create new zip file - _zip = new ZipFile(null, Utils.Constants.NONE); - } - - function getEntry(/*Object*/entry) { - if (entry && _zip) { - var item; - // If entry was given as a file name - if (typeof entry === "string") - item = _zip.getEntry(entry); - // if entry was given as a ZipEntry object - if (typeof entry === "object" && entry.entryName != undefined && entry.header != undefined) - item = _zip.getEntry(entry.entryName); - - if (item) { - return item; - } - } - return null; - } - - return { - /** - * Extracts the given entry from the archive and returns the content as a Buffer object - * @param entry ZipEntry object or String with the full path of the entry - * - * @return Buffer or Null in case of error - */ - readFile : function(/*Object*/entry) { - var item = getEntry(entry); - return item && item.getData() || null; - }, - - /** - * Asynchronous readFile - * @param entry ZipEntry object or String with the full path of the entry - * @param callback - * - * @return Buffer or Null in case of error - */ - readFileAsync : function(/*Object*/entry, /*Function*/callback) { - var item = getEntry(entry); - if (item) { - item.getDataAsync(callback); - } else { - callback(null,"getEntry failed for:" + entry) - } - }, - - /** - * Extracts the given entry from the archive and returns the content as plain text in the given encoding - * @param entry ZipEntry object or String with the full path of the entry - * @param encoding Optional. If no encoding is specified utf8 is used - * - * @return String - */ - readAsText : function(/*Object*/entry, /*String - Optional*/encoding) { - var item = getEntry(entry); - if (item) { - var data = item.getData(); - if (data && data.length) { - return data.toString(encoding || "utf8"); - } - } - return ""; - }, - - /** - * Asynchronous readAsText - * @param entry ZipEntry object or String with the full path of the entry - * @param callback - * @param encoding Optional. If no encoding is specified utf8 is used - * - * @return String - */ - readAsTextAsync : function(/*Object*/entry, /*Function*/callback, /*String - Optional*/encoding) { - var item = getEntry(entry); - if (item) { - item.getDataAsync(function(data) { - if (data && data.length) { - callback(data.toString(encoding || "utf8")); - } else { - callback(""); - } - }) - } else { - callback(""); - } - }, - - /** - * Remove the entry from the file or the entry and all it's nested directories and files if the given entry is a directory - * - * @param entry - */ - deleteFile : function(/*Object*/entry) { // @TODO: test deleteFile - var item = getEntry(entry); - if (item) { - _zip.deleteEntry(item.entryName); - } - }, - - /** - * Adds a comment to the zip. The zip must be rewritten after adding the comment. - * - * @param comment - */ - addZipComment : function(/*String*/comment) { // @TODO: test addZipComment - _zip.comment = comment; - }, - - /** - * Returns the zip comment - * - * @return String - */ - getZipComment : function() { - return _zip.comment || ''; - }, - - /** - * Adds a comment to a specified zipEntry. The zip must be rewritten after adding the comment - * The comment cannot exceed 65535 characters in length - * - * @param entry - * @param comment - */ - addZipEntryComment : function(/*Object*/entry,/*String*/comment) { - var item = getEntry(entry); - if (item) { - item.comment = comment; - } - }, - - /** - * Returns the comment of the specified entry - * - * @param entry - * @return String - */ - getZipEntryComment : function(/*Object*/entry) { - var item = getEntry(entry); - if (item) { - return item.comment || ''; - } - return '' - }, - - /** - * Updates the content of an existing entry inside the archive. The zip must be rewritten after updating the content - * - * @param entry - * @param content - */ - updateFile : function(/*Object*/entry, /*Buffer*/content) { - var item = getEntry(entry); - if (item) { - item.setData(content); - } - }, - - /** - * Adds a file from the disk to the archive - * - * @param localPath - */ - addLocalFile : function(/*String*/localPath, /*String*/zipPath) { - if (fs.existsSync(localPath)) { - if(zipPath){ - zipPath=zipPath.split("\\").join("/"); - if(zipPath.charAt(zipPath.length - 1) != "/"){ - zipPath += "/"; - } - }else{ - zipPath=""; - } - var p = localPath.split("\\").join("/").split("/").pop(); - - this.addFile(zipPath+p, fs.readFileSync(localPath), "", 0) - } else { - throw Utils.Errors.FILE_NOT_FOUND.replace("%s", localPath); - } - }, - - /** - * Adds a local directory and all its nested files and directories to the archive - * - * @param localPath - */ - addLocalFolder : function(/*String*/localPath, /*String*/zipPath) { - if(zipPath){ - zipPath=zipPath.split("\\").join("/"); - if(zipPath.charAt(zipPath.length - 1) != "/"){ - zipPath += "/"; - } - }else{ - zipPath=""; - } - localPath = localPath.split("\\").join("/"); //windows fix - if (localPath.charAt(localPath.length - 1) != "/") - localPath += "/"; - - if (fs.existsSync(localPath)) { - - var items = Utils.findFiles(localPath), - self = this; - - if (items.length) { - items.forEach(function(path) { - var p = path.split("\\").join("/").replace(localPath, ""); //windows fix - if (p.charAt(p.length - 1) !== "/") { - self.addFile(zipPath+p, fs.readFileSync(path), "", 0) - } else { - self.addFile(zipPath+p, new Buffer(0), "", 0) - } - }); - } - } else { - throw Utils.Errors.FILE_NOT_FOUND.replace("%s", localPath); - } - }, - - /** - * Allows you to create a entry (file or directory) in the zip file. - * If you want to create a directory the entryName must end in / and a null buffer should be provided. - * Comment and attributes are optional - * - * @param entryName - * @param content - * @param comment - * @param attr - */ - addFile : function(/*String*/entryName, /*Buffer*/content, /*String*/comment, /*Number*/attr) { - var entry = new ZipEntry(); - entry.entryName = entryName; - entry.comment = comment || ""; - entry.attr = attr || 438; //0666; - if (entry.isDirectory && content.length) { - // throw Utils.Errors.DIRECTORY_CONTENT_ERROR; - } - entry.setData(content); - _zip.setEntry(entry); - }, - - /** - * Returns an array of ZipEntry objects representing the files and folders inside the archive - * - * @return Array - */ - getEntries : function() { - if (_zip) { - return _zip.entries; - } else { - return []; - } - }, - - /** - * Returns a ZipEntry object representing the file or folder specified by ``name``. - * - * @param name - * @return ZipEntry - */ - getEntry : function(/*String*/name) { - return getEntry(name); - }, - - /** - * Extracts the given entry to the given targetPath - * If the entry is a directory inside the archive, the entire directory and it's subdirectories will be extracted - * - * @param entry ZipEntry object or String with the full path of the entry - * @param targetPath Target folder where to write the file - * @param maintainEntryPath If maintainEntryPath is true and the entry is inside a folder, the entry folder - * will be created in targetPath as well. Default is TRUE - * @param overwrite If the file already exists at the target path, the file will be overwriten if this is true. - * Default is FALSE - * - * @return Boolean - */ - extractEntryTo : function(/*Object*/entry, /*String*/targetPath, /*Boolean*/maintainEntryPath, /*Boolean*/overwrite) { - overwrite = overwrite || false; - maintainEntryPath = typeof maintainEntryPath == "undefined" ? true : maintainEntryPath; - - var item = getEntry(entry); - if (!item) { - throw Utils.Errors.NO_ENTRY; - } - - var target = pth.resolve(targetPath, maintainEntryPath ? item.entryName : pth.basename(item.entryName)); - - if (item.isDirectory) { - target = pth.resolve(target, ".."); - var children = _zip.getEntryChildren(item); - children.forEach(function(child) { - if (child.isDirectory) return; - var content = child.getData(); - if (!content) { - throw Utils.Errors.CANT_EXTRACT_FILE; - } - Utils.writeFileTo(pth.resolve(targetPath, maintainEntryPath ? child.entryName : child.entryName.substr(item.entryName.length)), content, overwrite); - }); - return true; - } - - var content = item.getData(); - if (!content) throw Utils.Errors.CANT_EXTRACT_FILE; - - if (fs.existsSync(targetPath) && !overwrite) { - throw Utils.Errors.CANT_OVERRIDE; - } - Utils.writeFileTo(target, content, overwrite); - - return true; - }, - - /** - * Extracts the entire archive to the given location - * - * @param targetPath Target location - * @param overwrite If the file already exists at the target path, the file will be overwriten if this is true. - * Default is FALSE - */ - extractAllTo : function(/*String*/targetPath, /*Boolean*/overwrite) { - overwrite = overwrite || false; - if (!_zip) { - throw Utils.Errors.NO_ZIP; - } - - _zip.entries.forEach(function(entry) { - if (entry.isDirectory) { - Utils.makeDir(pth.resolve(targetPath, entry.entryName.toString())); - return; - } - var content = entry.getData(); - if (!content) { - throw Utils.Errors.CANT_EXTRACT_FILE + "2"; - } - Utils.writeFileTo(pth.resolve(targetPath, entry.entryName.toString()), content, overwrite); - }) - }, - - /** - * Writes the newly created zip file to disk at the specified location or if a zip was opened and no ``targetFileName`` is provided, it will overwrite the opened zip - * - * @param targetFileName - * @param callback - */ - writeZip : function(/*String*/targetFileName, /*Function*/callback) { - if (arguments.length == 1) { - if (typeof targetFileName == "function") { - callback = targetFileName; - targetFileName = ""; - } - } - - if (!targetFileName && _filename) { - targetFileName = _filename; - } - if (!targetFileName) return; - - var zipData = _zip.compressToBuffer(); - if (zipData) { - Utils.writeFileTo(targetFileName, zipData, true); - } - }, - - /** - * Returns the content of the entire zip file as a Buffer object - * - * @return Buffer - */ - toBuffer : function(/*Function*/onSuccess,/*Function*/onFail,/*Function*/onItemStart,/*Function*/onItemEnd) { - this.valueOf = 2; - if (typeof onSuccess == "function") { - _zip.toAsyncBuffer(onSuccess,onFail,onItemStart,onItemEnd); - return null; - } - return _zip.compressToBuffer() - } - } -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/entryHeader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/entryHeader.js deleted file mode 100644 index a29c70f1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/entryHeader.js +++ /dev/null @@ -1,261 +0,0 @@ -var Utils = require("../util"), - Constants = Utils.Constants; - -/* The central directory file header */ -module.exports = function () { - var _verMade = 0x0A, - _version = 0x0A, - _flags = 0, - _method = 0, - _time = 0, - _crc = 0, - _compressedSize = 0, - _size = 0, - _fnameLen = 0, - _extraLen = 0, - - _comLen = 0, - _diskStart = 0, - _inattr = 0, - _attr = 0, - _offset = 0; - - var _dataHeader = {}; - - function setTime(val) { - var val = new Date(val); - _time = (val.getFullYear() - 1980 & 0x7f) << 25 // b09-16 years from 1980 - | (val.getMonth() + 1) << 21 // b05-08 month - | val.getDay() << 16 // b00-04 hour - - // 2 bytes time - | val.getHours() << 11 // b11-15 hour - | val.getMinutes() << 5 // b05-10 minute - | val.getSeconds() >> 1; // b00-04 seconds divided by 2 - } - - setTime(+new Date()); - - return { - get made () { return _verMade; }, - set made (val) { _verMade = val; }, - - get version () { return _version; }, - set version (val) { _version = val }, - - get flags () { return _flags }, - set flags (val) { _flags = val; }, - - get method () { return _method; }, - set method (val) { _method = val; }, - - get time () { return new Date( - ((_time >> 25) & 0x7f) + 1980, - ((_time >> 21) & 0x0f) - 1, - (_time >> 16) & 0x1f, - (_time >> 11) & 0x1f, - (_time >> 5) & 0x3f, - (_time & 0x1f) << 1 - ); - }, - set time (val) { - setTime(val); - }, - - get crc () { return _crc; }, - set crc (val) { _crc = val; }, - - get compressedSize () { return _compressedSize; }, - set compressedSize (val) { _compressedSize = val; }, - - get size () { return _size; }, - set size (val) { _size = val; }, - - get fileNameLength () { return _fnameLen; }, - set fileNameLength (val) { _fnameLen = val; }, - - get extraLength () { return _extraLen }, - set extraLength (val) { _extraLen = val; }, - - get commentLength () { return _comLen }, - set commentLength (val) { _comLen = val }, - - get diskNumStart () { return _diskStart }, - set diskNumStart (val) { _diskStart = val }, - - get inAttr () { return _inattr }, - set inAttr (val) { _inattr = val }, - - get attr () { return _attr }, - set attr (val) { _attr = val }, - - get offset () { return _offset }, - set offset (val) { _offset = val }, - - get encripted () { return (_flags & 1) == 1 }, - - get entryHeaderSize () { - return Constants.CENHDR + _fnameLen + _extraLen + _comLen; - }, - - get realDataOffset () { - return _offset + Constants.LOCHDR + _dataHeader.fnameLen + _dataHeader.extraLen; - }, - - get dataHeader () { - return _dataHeader; - }, - - loadDataHeaderFromBinary : function(/*Buffer*/input) { - var data = input.slice(_offset, _offset + Constants.LOCHDR); - // 30 bytes and should start with "PK\003\004" - if (data.readUInt32LE(0) != Constants.LOCSIG) { - throw Utils.Errors.INVALID_LOC; - } - _dataHeader = { - // version needed to extract - version : data.readUInt16LE(Constants.LOCVER), - // general purpose bit flag - flags : data.readUInt16LE(Constants.LOCFLG), - // compression method - method : data.readUInt16LE(Constants.LOCHOW), - // modification time (2 bytes time, 2 bytes date) - time : data.readUInt32LE(Constants.LOCTIM), - // uncompressed file crc-32 value - crc : data.readUInt32LE(Constants.LOCCRC), - // compressed size - compressedSize : data.readUInt32LE(Constants.LOCSIZ), - // uncompressed size - size : data.readUInt32LE(Constants.LOCLEN), - // filename length - fnameLen : data.readUInt16LE(Constants.LOCNAM), - // extra field length - extraLen : data.readUInt16LE(Constants.LOCEXT) - } - }, - - loadFromBinary : function(/*Buffer*/data) { - // data should be 46 bytes and start with "PK 01 02" - if (data.length != Constants.CENHDR || data.readUInt32LE(0) != Constants.CENSIG) { - throw Utils.Errors.INVALID_CEN; - } - // version made by - _verMade = data.readUInt16LE(Constants.CENVEM); - // version needed to extract - _version = data.readUInt16LE(Constants.CENVER); - // encrypt, decrypt flags - _flags = data.readUInt16LE(Constants.CENFLG); - // compression method - _method = data.readUInt16LE(Constants.CENHOW); - // modification time (2 bytes time, 2 bytes date) - _time = data.readUInt32LE(Constants.CENTIM); - // uncompressed file crc-32 value - _crc = data.readUInt32LE(Constants.CENCRC); - // compressed size - _compressedSize = data.readUInt32LE(Constants.CENSIZ); - // uncompressed size - _size = data.readUInt32LE(Constants.CENLEN); - // filename length - _fnameLen = data.readUInt16LE(Constants.CENNAM); - // extra field length - _extraLen = data.readUInt16LE(Constants.CENEXT); - // file comment length - _comLen = data.readUInt16LE(Constants.CENCOM); - // volume number start - _diskStart = data.readUInt16LE(Constants.CENDSK); - // internal file attributes - _inattr = data.readUInt16LE(Constants.CENATT); - // external file attributes - _attr = data.readUInt32LE(Constants.CENATX); - // LOC header offset - _offset = data.readUInt32LE(Constants.CENOFF); - }, - - dataHeaderToBinary : function() { - // LOC header size (30 bytes) - var data = new Buffer(Constants.LOCHDR); - // "PK\003\004" - data.writeUInt32LE(Constants.LOCSIG, 0); - // version needed to extract - data.writeUInt16LE(_version, Constants.LOCVER); - // general purpose bit flag - data.writeUInt16LE(_flags, Constants.LOCFLG); - // compression method - data.writeUInt16LE(_method, Constants.LOCHOW); - // modification time (2 bytes time, 2 bytes date) - data.writeUInt32LE(_time, Constants.LOCTIM); - // uncompressed file crc-32 value - data.writeUInt32LE(_crc, Constants.LOCCRC); - // compressed size - data.writeUInt32LE(_compressedSize, Constants.LOCSIZ); - // uncompressed size - data.writeUInt32LE(_size, Constants.LOCLEN); - // filename length - data.writeUInt16LE(_fnameLen, Constants.LOCNAM); - // extra field length - data.writeUInt16LE(_extraLen, Constants.LOCEXT); - return data; - }, - - entryHeaderToBinary : function() { - // CEN header size (46 bytes) - var data = new Buffer(Constants.CENHDR + _fnameLen + _extraLen + _comLen); - // "PK\001\002" - data.writeUInt32LE(Constants.CENSIG, 0); - // version made by - data.writeUInt16LE(_verMade, Constants.CENVEM); - // version needed to extract - data.writeUInt16LE(_version, Constants.CENVER); - // encrypt, decrypt flags - data.writeUInt16LE(_flags, Constants.CENFLG); - // compression method - data.writeUInt16LE(_method, Constants.CENHOW); - // modification time (2 bytes time, 2 bytes date) - data.writeUInt32LE(_time, Constants.CENTIM); - // uncompressed file crc-32 value - data.writeInt32LE(_crc, Constants.CENCRC, true); - // compressed size - data.writeUInt32LE(_compressedSize, Constants.CENSIZ); - // uncompressed size - data.writeUInt32LE(_size, Constants.CENLEN); - // filename length - data.writeUInt16LE(_fnameLen, Constants.CENNAM); - // extra field length - data.writeUInt16LE(_extraLen, Constants.CENEXT); - // file comment length - data.writeUInt16LE(_comLen, Constants.CENCOM); - // volume number start - data.writeUInt16LE(_diskStart, Constants.CENDSK); - // internal file attributes - data.writeUInt16LE(_inattr, Constants.CENATT); - // external file attributes - data.writeUInt32LE(_attr, Constants.CENATX); - // LOC header offset - data.writeUInt32LE(_offset, Constants.CENOFF); - // fill all with - data.fill(0x00, Constants.CENHDR); - return data; - }, - - toString : function() { - return '{\n' + - '\t"made" : ' + _verMade + ",\n" + - '\t"version" : ' + _version + ",\n" + - '\t"flags" : ' + _flags + ",\n" + - '\t"method" : ' + Utils.methodToString(_method) + ",\n" + - '\t"time" : ' + _time + ",\n" + - '\t"crc" : 0x' + _crc.toString(16).toUpperCase() + ",\n" + - '\t"compressedSize" : ' + _compressedSize + " bytes,\n" + - '\t"size" : ' + _size + " bytes,\n" + - '\t"fileNameLength" : ' + _fnameLen + ",\n" + - '\t"extraLength" : ' + _extraLen + " bytes,\n" + - '\t"commentLength" : ' + _comLen + " bytes,\n" + - '\t"diskNumStart" : ' + _diskStart + ",\n" + - '\t"inAttr" : ' + _inattr + ",\n" + - '\t"attr" : ' + _attr + ",\n" + - '\t"offset" : ' + _offset + ",\n" + - '\t"entryHeaderSize" : ' + (Constants.CENHDR + _fnameLen + _extraLen + _comLen) + " bytes\n" + - '}'; - } - } -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/index.js deleted file mode 100644 index b8c67b96..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/index.js +++ /dev/null @@ -1,2 +0,0 @@ -exports.EntryHeader = require("./entryHeader"); -exports.MainHeader = require("./mainHeader"); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/mainHeader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/mainHeader.js deleted file mode 100644 index 002bc8a7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/headers/mainHeader.js +++ /dev/null @@ -1,80 +0,0 @@ -var Utils = require("../util"), - Constants = Utils.Constants; - -/* The entries in the end of central directory */ -module.exports = function () { - var _volumeEntries = 0, - _totalEntries = 0, - _size = 0, - _offset = 0, - _commentLength = 0; - - return { - get diskEntries () { return _volumeEntries }, - set diskEntries (/*Number*/val) { _volumeEntries = _totalEntries = val; }, - - get totalEntries () { return _totalEntries }, - set totalEntries (/*Number*/val) { _totalEntries = _volumeEntries = val; }, - - get size () { return _size }, - set size (/*Number*/val) { _size = val; }, - - get offset () { return _offset }, - set offset (/*Number*/val) { _offset = val; }, - - get commentLength () { return _commentLength }, - set commentLength (/*Number*/val) { _commentLength = val; }, - - get mainHeaderSize () { - return Constants.ENDHDR + _commentLength; - }, - - loadFromBinary : function(/*Buffer*/data) { - // data should be 22 bytes and start with "PK 05 06" - if (data.length != Constants.ENDHDR || data.readUInt32LE(0) != Constants.ENDSIG) - throw Utils.Errors.INVALID_END; - - // number of entries on this volume - _volumeEntries = data.readUInt16LE(Constants.ENDSUB); - // total number of entries - _totalEntries = data.readUInt16LE(Constants.ENDTOT); - // central directory size in bytes - _size = data.readUInt32LE(Constants.ENDSIZ); - // offset of first CEN header - _offset = data.readUInt32LE(Constants.ENDOFF); - // zip file comment length - _commentLength = data.readUInt16LE(Constants.ENDCOM); - }, - - toBinary : function() { - var b = new Buffer(Constants.ENDHDR + _commentLength); - // "PK 05 06" signature - b.writeUInt32LE(Constants.ENDSIG, 0); - b.writeUInt32LE(0, 4); - // number of entries on this volume - b.writeUInt16LE(_volumeEntries, Constants.ENDSUB); - // total number of entries - b.writeUInt16LE(_totalEntries, Constants.ENDTOT); - // central directory size in bytes - b.writeUInt32LE(_size, Constants.ENDSIZ); - // offset of first CEN header - b.writeUInt32LE(_offset, Constants.ENDOFF); - // zip file comment length - b.writeUInt16LE(_commentLength, Constants.ENDCOM); - // fill comment memory with spaces so no garbage is left there - b.fill(" ", Constants.ENDHDR); - - return b; - }, - - toString : function() { - return '{\n' + - '\t"diskEntries" : ' + _volumeEntries + ",\n" + - '\t"totalEntries" : ' + _totalEntries + ",\n" + - '\t"size" : ' + _size + " bytes,\n" + - '\t"offset" : 0x' + _offset.toString(16).toUpperCase() + ",\n" + - '\t"commentLength" : 0x' + _commentLength + "\n" + - '}'; - } - } -}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/deflater.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/deflater.js deleted file mode 100644 index 32679434..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/deflater.js +++ /dev/null @@ -1,1578 +0,0 @@ -/* - * $Id: rawdeflate.js,v 0.5 2013/04/09 14:25:38 dankogai Exp dankogai $ - * - * GNU General Public License, version 2 (GPL-2.0) - * http://opensource.org/licenses/GPL-2.0 - * Original: - * http://www.onicos.com/staff/iz/amuse/javascript/expert/deflate.txt - */ -function JSDeflater(/*inbuff*/inbuf) { - - /* Copyright (C) 1999 Masanao Izumo <iz@onicos.co.jp> - * Version: 1.0.1 - * LastModified: Dec 25 1999 - */ - - var WSIZE = 32768, // Sliding Window size - zip_STORED_BLOCK = 0, - zip_STATIC_TREES = 1, - zip_DYN_TREES = 2, - zip_DEFAULT_LEVEL = 6, - zip_FULL_SEARCH = true, - zip_INBUFSIZ = 32768, // Input buffer size - zip_INBUF_EXTRA = 64, // Extra buffer - zip_OUTBUFSIZ = 1024 * 8, - zip_window_size = 2 * WSIZE, - MIN_MATCH = 3, - MAX_MATCH = 258, - zip_BITS = 16, - LIT_BUFSIZE = 0x2000, - zip_HASH_BITS = 13, - zip_DIST_BUFSIZE = LIT_BUFSIZE, - zip_HASH_SIZE = 1 << zip_HASH_BITS, - zip_HASH_MASK = zip_HASH_SIZE - 1, - zip_WMASK = WSIZE - 1, - zip_NIL = 0, // Tail of hash chains - zip_TOO_FAR = 4096, - zip_MIN_LOOKAHEAD = MAX_MATCH + MIN_MATCH + 1, - zip_MAX_DIST = WSIZE - zip_MIN_LOOKAHEAD, - zip_SMALLEST = 1, - zip_MAX_BITS = 15, - zip_MAX_BL_BITS = 7, - zip_LENGTH_CODES = 29, - zip_LITERALS = 256, - zip_END_BLOCK = 256, - zip_L_CODES = zip_LITERALS + 1 + zip_LENGTH_CODES, - zip_D_CODES = 30, - zip_BL_CODES = 19, - zip_REP_3_6 = 16, - zip_REPZ_3_10 = 17, - zip_REPZ_11_138 = 18, - zip_HEAP_SIZE = 2 * zip_L_CODES + 1, - zip_H_SHIFT = parseInt((zip_HASH_BITS + MIN_MATCH - 1) / MIN_MATCH); - - var zip_free_queue, zip_qhead, zip_qtail, zip_initflag, zip_outbuf = null, zip_outcnt, zip_outoff, zip_complete, - zip_window, zip_d_buf, zip_l_buf, zip_prev, zip_bi_buf, zip_bi_valid, zip_block_start, zip_ins_h, zip_hash_head, - zip_prev_match, zip_match_available, zip_match_length, zip_prev_length, zip_strstart, zip_match_start, zip_eofile, - zip_lookahead, zip_max_chain_length, zip_max_lazy_match, zip_compr_level, zip_good_match, zip_nice_match, - zip_dyn_ltree, zip_dyn_dtree, zip_static_ltree, zip_static_dtree, zip_bl_tree, zip_l_desc, zip_d_desc, zip_bl_desc, - zip_bl_count, zip_heap, zip_heap_len, zip_heap_max, zip_depth, zip_length_code, zip_dist_code, zip_base_length, - zip_base_dist, zip_flag_buf, zip_last_lit, zip_last_dist, zip_last_flags, zip_flags, zip_flag_bit, zip_opt_len, - zip_static_len, zip_deflate_data, zip_deflate_pos; - - var zip_DeflateCT = function () { - this.fc = 0; // frequency count or bit string - this.dl = 0; // father node in Huffman tree or length of bit string - }; - - var zip_DeflateTreeDesc = function () { - this.dyn_tree = null; // the dynamic tree - this.static_tree = null; // corresponding static tree or NULL - this.extra_bits = null; // extra bits for each code or NULL - this.extra_base = 0; // base index for extra_bits - this.elems = 0; // max number of elements in the tree - this.max_length = 0; // max bit length for the codes - this.max_code = 0; // largest code with non zero frequency - }; - - /* Values for max_lazy_match, good_match and max_chain_length, depending on - * the desired pack level (0..9). The values given below have been tuned to - * exclude worst case performance for pathological files. Better values may be - * found for specific files. - */ - var zip_DeflateConfiguration = function (a, b, c, d) { - this.good_length = a; // reduce lazy search above this match length - this.max_lazy = b; // do not perform lazy search above this match length - this.nice_length = c; // quit search above this match length - this.max_chain = d; - }; - - var zip_DeflateBuffer = function () { - this.next = null; - this.len = 0; - this.ptr = new Array(zip_OUTBUFSIZ); - this.off = 0; - }; - - /* constant tables */ - var zip_extra_lbits = new Array( - 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0); - var zip_extra_dbits = new Array( - 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13); - var zip_extra_blbits = new Array( - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7); - var zip_bl_order = new Array( - 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15); - var zip_configuration_table = new Array( - new zip_DeflateConfiguration(0, 0, 0, 0), - new zip_DeflateConfiguration(4, 4, 8, 4), - new zip_DeflateConfiguration(4, 5, 16, 8), - new zip_DeflateConfiguration(4, 6, 32, 32), - new zip_DeflateConfiguration(4, 4, 16, 16), - new zip_DeflateConfiguration(8, 16, 32, 32), - new zip_DeflateConfiguration(8, 16, 128, 128), - new zip_DeflateConfiguration(8, 32, 128, 256), - new zip_DeflateConfiguration(32, 128, 258, 1024), - new zip_DeflateConfiguration(32, 258, 258, 4096)); - - - /* routines (deflate) */ - - var zip_deflate_start = function (level) { - var i; - - if (!level) - level = zip_DEFAULT_LEVEL; - else if (level < 1) - level = 1; - else if (level > 9) - level = 9; - - zip_compr_level = level; - zip_initflag = false; - zip_eofile = false; - if (zip_outbuf != null) - return; - - zip_free_queue = zip_qhead = zip_qtail = null; - zip_outbuf = new Array(zip_OUTBUFSIZ); - zip_window = new Array(zip_window_size); - zip_d_buf = new Array(zip_DIST_BUFSIZE); - zip_l_buf = new Array(zip_INBUFSIZ + zip_INBUF_EXTRA); - zip_prev = new Array(1 << zip_BITS); - zip_dyn_ltree = new Array(zip_HEAP_SIZE); - for (i = 0; i < zip_HEAP_SIZE; i++) zip_dyn_ltree[i] = new zip_DeflateCT(); - zip_dyn_dtree = new Array(2 * zip_D_CODES + 1); - for (i = 0; i < 2 * zip_D_CODES + 1; i++) zip_dyn_dtree[i] = new zip_DeflateCT(); - zip_static_ltree = new Array(zip_L_CODES + 2); - for (i = 0; i < zip_L_CODES + 2; i++) zip_static_ltree[i] = new zip_DeflateCT(); - zip_static_dtree = new Array(zip_D_CODES); - for (i = 0; i < zip_D_CODES; i++) zip_static_dtree[i] = new zip_DeflateCT(); - zip_bl_tree = new Array(2 * zip_BL_CODES + 1); - for (i = 0; i < 2 * zip_BL_CODES + 1; i++) zip_bl_tree[i] = new zip_DeflateCT(); - zip_l_desc = new zip_DeflateTreeDesc(); - zip_d_desc = new zip_DeflateTreeDesc(); - zip_bl_desc = new zip_DeflateTreeDesc(); - zip_bl_count = new Array(zip_MAX_BITS + 1); - zip_heap = new Array(2 * zip_L_CODES + 1); - zip_depth = new Array(2 * zip_L_CODES + 1); - zip_length_code = new Array(MAX_MATCH - MIN_MATCH + 1); - zip_dist_code = new Array(512); - zip_base_length = new Array(zip_LENGTH_CODES); - zip_base_dist = new Array(zip_D_CODES); - zip_flag_buf = new Array(parseInt(LIT_BUFSIZE / 8)); - }; - - var zip_deflate_end = function () { - zip_free_queue = zip_qhead = zip_qtail = null; - zip_outbuf = null; - zip_window = null; - zip_d_buf = null; - zip_l_buf = null; - zip_prev = null; - zip_dyn_ltree = null; - zip_dyn_dtree = null; - zip_static_ltree = null; - zip_static_dtree = null; - zip_bl_tree = null; - zip_l_desc = null; - zip_d_desc = null; - zip_bl_desc = null; - zip_bl_count = null; - zip_heap = null; - zip_depth = null; - zip_length_code = null; - zip_dist_code = null; - zip_base_length = null; - zip_base_dist = null; - zip_flag_buf = null; - }; - - var zip_reuse_queue = function (p) { - p.next = zip_free_queue; - zip_free_queue = p; - }; - - var zip_new_queue = function () { - var p; - - if (zip_free_queue != null) { - p = zip_free_queue; - zip_free_queue = zip_free_queue.next; - } - else - p = new zip_DeflateBuffer(); - p.next = null; - p.len = p.off = 0; - - return p; - }; - - var zip_head1 = function (i) { - return zip_prev[WSIZE + i]; - }; - - var zip_head2 = function (i, val) { - return zip_prev[WSIZE + i] = val; - }; - - /* put_byte is used for the compressed output, put_ubyte for the - * uncompressed output. However unlzw() uses window for its - * suffix table instead of its output buffer, so it does not use put_ubyte - * (to be cleaned up). - */ - var zip_put_byte = function (c) { - zip_outbuf[zip_outoff + zip_outcnt++] = c; - if (zip_outoff + zip_outcnt == zip_OUTBUFSIZ) - zip_qoutbuf(); - }; - - /* Output a 16 bit value, lsb first */ - var zip_put_short = function (w) { - w &= 0xffff; - if (zip_outoff + zip_outcnt < zip_OUTBUFSIZ - 2) { - zip_outbuf[zip_outoff + zip_outcnt++] = (w & 0xff); - zip_outbuf[zip_outoff + zip_outcnt++] = (w >>> 8); - } else { - zip_put_byte(w & 0xff); - zip_put_byte(w >>> 8); - } - }; - - /* ========================================================================== - * Insert string s in the dictionary and set match_head to the previous head - * of the hash chain (the most recent string with same hash key). Return - * the previous length of the hash chain. - * IN assertion: all calls to to INSERT_STRING are made with consecutive - * input characters and the first MIN_MATCH bytes of s are valid - * (except for the last MIN_MATCH-1 bytes of the input file). - */ - var zip_INSERT_STRING = function () { - zip_ins_h = ((zip_ins_h << zip_H_SHIFT) - ^ (zip_window[zip_strstart + MIN_MATCH - 1] & 0xff)) - & zip_HASH_MASK; - zip_hash_head = zip_head1(zip_ins_h); - zip_prev[zip_strstart & zip_WMASK] = zip_hash_head; - zip_head2(zip_ins_h, zip_strstart); - }; - - /* Send a code of the given tree. c and tree must not have side effects */ - var zip_SEND_CODE = function (c, tree) { - zip_send_bits(tree[c].fc, tree[c].dl); - }; - - /* Mapping from a distance to a distance code. dist is the distance - 1 and - * must not have side effects. dist_code[256] and dist_code[257] are never - * used. - */ - var zip_D_CODE = function (dist) { - return (dist < 256 ? zip_dist_code[dist] - : zip_dist_code[256 + (dist >> 7)]) & 0xff; - }; - - /* ========================================================================== - * Compares to subtrees, using the tree depth as tie breaker when - * the subtrees have equal frequency. This minimizes the worst case length. - */ - var zip_SMALLER = function (tree, n, m) { - return tree[n].fc < tree[m].fc || - (tree[n].fc == tree[m].fc && zip_depth[n] <= zip_depth[m]); - }; - - /* ========================================================================== - * read string data - */ - var zip_read_buff = function (buff, offset, n) { - var i; - for (i = 0; i < n && zip_deflate_pos < zip_deflate_data.length; i++) - buff[offset + i] = - zip_deflate_data[zip_deflate_pos++] & 0xff; - return i; - }; - - /* ========================================================================== - * Initialize the "longest match" routines for a new file - */ - var zip_lm_init = function () { - var j; - - /* Initialize the hash table. */ - for (j = 0; j < zip_HASH_SIZE; j++) - zip_prev[WSIZE + j] = 0; - zip_max_lazy_match = zip_configuration_table[zip_compr_level].max_lazy; - zip_good_match = zip_configuration_table[zip_compr_level].good_length; - if (!zip_FULL_SEARCH) - zip_nice_match = zip_configuration_table[zip_compr_level].nice_length; - zip_max_chain_length = zip_configuration_table[zip_compr_level].max_chain; - - zip_strstart = 0; - zip_block_start = 0; - - zip_lookahead = zip_read_buff(zip_window, 0, 2 * WSIZE); - if (zip_lookahead <= 0) { - zip_eofile = true; - zip_lookahead = 0; - return; - } - zip_eofile = false; - /* Make sure that we always have enough lookahead. This is important - * if input comes from a device such as a tty. - */ - while (zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile) - zip_fill_window(); - - /* If lookahead < MIN_MATCH, ins_h is garbage, but this is - * not important since only literal bytes will be emitted. - */ - zip_ins_h = 0; - for (j = 0; j < MIN_MATCH - 1; j++) { - zip_ins_h = ((zip_ins_h << zip_H_SHIFT) ^ (zip_window[j] & 0xff)) & zip_HASH_MASK; - } - }; - - /* ========================================================================== - * Set match_start to the longest match starting at the given string and - * return its length. Matches shorter or equal to prev_length are discarded, - * in which case the result is equal to prev_length and match_start is - * garbage. - * IN assertions: cur_match is the head of the hash chain for the current - * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 - */ - var zip_longest_match = function (cur_match) { - var chain_length = zip_max_chain_length; // max hash chain length - var scanp = zip_strstart; // current string - var matchp; // matched string - var len; // length of current match - var best_len = zip_prev_length; // best match length so far - - /* Stop when cur_match becomes <= limit. To simplify the code, - * we prevent matches with the string of window index 0. - */ - var limit = (zip_strstart > zip_MAX_DIST ? zip_strstart - zip_MAX_DIST : zip_NIL); - - var strendp = zip_strstart + MAX_MATCH; - var scan_end1 = zip_window[scanp + best_len - 1]; - var scan_end = zip_window[scanp + best_len]; - - /* Do not waste too much time if we already have a good match: */ - if (zip_prev_length >= zip_good_match) - chain_length >>= 2; - - do { - matchp = cur_match; - - /* Skip to next match if the match length cannot increase - * or if the match length is less than 2: - */ - if (zip_window[matchp + best_len] != scan_end || - zip_window[matchp + best_len - 1] != scan_end1 || - zip_window[matchp] != zip_window[scanp] || - zip_window[++matchp] != zip_window[scanp + 1]) { - continue; - } - - /* The check at best_len-1 can be removed because it will be made - * again later. (This heuristic is not always a win.) - * It is not necessary to compare scan[2] and match[2] since they - * are always equal when the other bytes match, given that - * the hash keys are equal and that HASH_BITS >= 8. - */ - scanp += 2; - matchp++; - - /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. - */ - do { - } while (zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - zip_window[++scanp] == zip_window[++matchp] && - scanp < strendp); - - len = MAX_MATCH - (strendp - scanp); - scanp = strendp - MAX_MATCH; - - if (len > best_len) { - zip_match_start = cur_match; - best_len = len; - if (zip_FULL_SEARCH) { - if (len >= MAX_MATCH) break; - } else { - if (len >= zip_nice_match) break; - } - - scan_end1 = zip_window[scanp + best_len - 1]; - scan_end = zip_window[scanp + best_len]; - } - } while ((cur_match = zip_prev[cur_match & zip_WMASK]) > limit - && --chain_length != 0); - - return best_len; - }; - - /* ========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead, and sets eofile if end of input file. - * IN assertion: lookahead < MIN_LOOKAHEAD && strstart + lookahead > 0 - * OUT assertions: at least one byte has been read, or eofile is set; - * file reads are performed for at least two bytes (required for the - * translate_eol option). - */ - var zip_fill_window = function () { - var n, m; - - // Amount of free space at the end of the window. - var more = zip_window_size - zip_lookahead - zip_strstart; - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (more == -1) { - /* Very unlikely, but possible on 16 bit machine if strstart == 0 - * and lookahead == 1 (input done one byte at time) - */ - more--; - } else if (zip_strstart >= WSIZE + zip_MAX_DIST) { - /* By the IN assertion, the window is not empty so we can't confuse - * more == 0 with more == 64K on a 16 bit machine. - */ - for (n = 0; n < WSIZE; n++) - zip_window[n] = zip_window[n + WSIZE]; - - zip_match_start -= WSIZE; - zip_strstart -= WSIZE; - /* we now have strstart >= MAX_DIST: */ - zip_block_start -= WSIZE; - - for (n = 0; n < zip_HASH_SIZE; n++) { - m = zip_head1(n); - zip_head2(n, m >= WSIZE ? m - WSIZE : zip_NIL); - } - for (n = 0; n < WSIZE; n++) { - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - m = zip_prev[n]; - zip_prev[n] = (m >= WSIZE ? m - WSIZE : zip_NIL); - } - more += WSIZE; - } - // At this point, more >= 2 - if (!zip_eofile) { - n = zip_read_buff(zip_window, zip_strstart + zip_lookahead, more); - if (n <= 0) - zip_eofile = true; - else - zip_lookahead += n; - } - }; - - /* ========================================================================== - * Processes a new input file and return its compressed length. This - * function does not perform lazy evaluationof matches and inserts - * new strings in the dictionary only for unmatched strings or for short - * matches. It is used only for the fast compression options. - */ - var zip_deflate_fast = function () { - while (zip_lookahead != 0 && zip_qhead == null) { - var flush; // set if current block must be flushed - - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - zip_INSERT_STRING(); - - /* Find the longest match, discarding those <= prev_length. - * At this point we have always match_length < MIN_MATCH - */ - if (zip_hash_head != zip_NIL && - zip_strstart - zip_hash_head <= zip_MAX_DIST) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - zip_match_length = zip_longest_match(zip_hash_head); - /* longest_match() sets match_start */ - if (zip_match_length > zip_lookahead) - zip_match_length = zip_lookahead; - } - if (zip_match_length >= MIN_MATCH) { - flush = zip_ct_tally(zip_strstart - zip_match_start, - zip_match_length - MIN_MATCH); - zip_lookahead -= zip_match_length; - - /* Insert new strings in the hash table only if the match length - * is not too large. This saves time but degrades compression. - */ - if (zip_match_length <= zip_max_lazy_match) { - zip_match_length--; // string at strstart already in hash table - do { - zip_strstart++; - zip_INSERT_STRING(); - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH - * these bytes are garbage, but it does not matter since - * the next lookahead bytes will be emitted as literals. - */ - } while (--zip_match_length != 0); - zip_strstart++; - } else { - zip_strstart += zip_match_length; - zip_match_length = 0; - zip_ins_h = zip_window[zip_strstart] & 0xff; - zip_ins_h = ((zip_ins_h << zip_H_SHIFT) ^ (zip_window[zip_strstart + 1] & 0xff)) & zip_HASH_MASK; - } - } else { - /* No match, output a literal byte */ - flush = zip_ct_tally(0, zip_window[zip_strstart] & 0xff); - zip_lookahead--; - zip_strstart++; - } - if (flush) { - zip_flush_block(0); - zip_block_start = zip_strstart; - } - - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - while (zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile) - zip_fill_window(); - } - }; - - var zip_deflate_better = function () { - /* Process the input block. */ - while (zip_lookahead != 0 && zip_qhead == null) { - /* Insert the string window[strstart .. strstart+2] in the - * dictionary, and set hash_head to the head of the hash chain: - */ - zip_INSERT_STRING(); - - /* Find the longest match, discarding those <= prev_length. - */ - zip_prev_length = zip_match_length; - zip_prev_match = zip_match_start; - zip_match_length = MIN_MATCH - 1; - - if (zip_hash_head != zip_NIL && - zip_prev_length < zip_max_lazy_match && - zip_strstart - zip_hash_head <= zip_MAX_DIST) { - /* To simplify the code, we prevent matches with the string - * of window index 0 (in particular we have to avoid a match - * of the string with itself at the start of the input file). - */ - zip_match_length = zip_longest_match(zip_hash_head); - /* longest_match() sets match_start */ - if (zip_match_length > zip_lookahead) - zip_match_length = zip_lookahead; - - /* Ignore a length 3 match if it is too distant: */ - if (zip_match_length == MIN_MATCH && - zip_strstart - zip_match_start > zip_TOO_FAR) { - /* If prev_match is also MIN_MATCH, match_start is garbage - * but we will ignore the current match anyway. - */ - zip_match_length--; - } - } - /* If there was a match at the previous step and the current - * match is not better, output the previous match: - */ - if (zip_prev_length >= MIN_MATCH && - zip_match_length <= zip_prev_length) { - var flush; // set if current block must be flushed - flush = zip_ct_tally(zip_strstart - 1 - zip_prev_match, - zip_prev_length - MIN_MATCH); - - /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. - */ - zip_lookahead -= zip_prev_length - 1; - zip_prev_length -= 2; - do { - zip_strstart++; - zip_INSERT_STRING(); - /* strstart never exceeds WSIZE-MAX_MATCH, so there are - * always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH - * these bytes are garbage, but it does not matter since the - * next lookahead bytes will always be emitted as literals. - */ - } while (--zip_prev_length != 0); - zip_match_available = 0; - zip_match_length = MIN_MATCH - 1; - zip_strstart++; - if (flush) { - zip_flush_block(0); - zip_block_start = zip_strstart; - } - } else if (zip_match_available != 0) { - /* If there was no match at the previous position, output a - * single literal. If there was a match but the current match - * is longer, truncate the previous match to a single literal. - */ - if (zip_ct_tally(0, zip_window[zip_strstart - 1] & 0xff)) { - zip_flush_block(0); - zip_block_start = zip_strstart; - } - zip_strstart++; - zip_lookahead--; - } else { - /* There is no previous match to compare with, wait for - * the next step to decide. - */ - zip_match_available = 1; - zip_strstart++; - zip_lookahead--; - } - - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the next match, plus MIN_MATCH bytes to insert the - * string following the next match. - */ - while (zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile) - zip_fill_window(); - } - }; - - var zip_init_deflate = function () { - if (zip_eofile) - return; - zip_bi_buf = 0; - zip_bi_valid = 0; - zip_ct_init(); - zip_lm_init(); - - zip_qhead = null; - zip_outcnt = 0; - zip_outoff = 0; - zip_match_available = 0; - - if (zip_compr_level <= 3) { - zip_prev_length = MIN_MATCH - 1; - zip_match_length = 0; - } - else { - zip_match_length = MIN_MATCH - 1; - zip_match_available = 0; - zip_match_available = 0; - } - - zip_complete = false; - }; - - /* ========================================================================== - * Same as above, but achieves better compression. We use a lazy - * evaluation for matches: a match is finally adopted only if there is - * no better match at the next window position. - */ - var zip_deflate_internal = function (buff, off, buff_size) { - var n; - - if (!zip_initflag) { - zip_init_deflate(); - zip_initflag = true; - if (zip_lookahead == 0) { // empty - zip_complete = true; - return 0; - } - } - - if ((n = zip_qcopy(buff, off, buff_size)) == buff_size) - return buff_size; - - if (zip_complete) - return n; - - if (zip_compr_level <= 3) // optimized for speed - zip_deflate_fast(); - else - zip_deflate_better(); - if (zip_lookahead == 0) { - if (zip_match_available != 0) - zip_ct_tally(0, zip_window[zip_strstart - 1] & 0xff); - zip_flush_block(1); - zip_complete = true; - } - return n + zip_qcopy(buff, n + off, buff_size - n); - }; - - var zip_qcopy = function (buff, off, buff_size) { - var n, i, j; - - n = 0; - while (zip_qhead != null && n < buff_size) { - i = buff_size - n; - if (i > zip_qhead.len) - i = zip_qhead.len; - for (j = 0; j < i; j++) - buff[off + n + j] = zip_qhead.ptr[zip_qhead.off + j]; - - zip_qhead.off += i; - zip_qhead.len -= i; - n += i; - if (zip_qhead.len == 0) { - var p; - p = zip_qhead; - zip_qhead = zip_qhead.next; - zip_reuse_queue(p); - } - } - - if (n == buff_size) - return n; - - if (zip_outoff < zip_outcnt) { - i = buff_size - n; - if (i > zip_outcnt - zip_outoff) - i = zip_outcnt - zip_outoff; - // System.arraycopy(outbuf, outoff, buff, off + n, i); - for (j = 0; j < i; j++) - buff[off + n + j] = zip_outbuf[zip_outoff + j]; - zip_outoff += i; - n += i; - if (zip_outcnt == zip_outoff) - zip_outcnt = zip_outoff = 0; - } - return n; - }; - - /* ========================================================================== - * Allocate the match buffer, initialize the various tables and save the - * location of the internal file attribute (ascii/binary) and method - * (DEFLATE/STORE). - */ - var zip_ct_init = function () { - var n; // iterates over tree elements - var bits; // bit counter - var length; // length value - var code; // code value - var dist; // distance index - - if (zip_static_dtree[0].dl != 0) return; // ct_init already called - - zip_l_desc.dyn_tree = zip_dyn_ltree; - zip_l_desc.static_tree = zip_static_ltree; - zip_l_desc.extra_bits = zip_extra_lbits; - zip_l_desc.extra_base = zip_LITERALS + 1; - zip_l_desc.elems = zip_L_CODES; - zip_l_desc.max_length = zip_MAX_BITS; - zip_l_desc.max_code = 0; - - zip_d_desc.dyn_tree = zip_dyn_dtree; - zip_d_desc.static_tree = zip_static_dtree; - zip_d_desc.extra_bits = zip_extra_dbits; - zip_d_desc.extra_base = 0; - zip_d_desc.elems = zip_D_CODES; - zip_d_desc.max_length = zip_MAX_BITS; - zip_d_desc.max_code = 0; - - zip_bl_desc.dyn_tree = zip_bl_tree; - zip_bl_desc.static_tree = null; - zip_bl_desc.extra_bits = zip_extra_blbits; - zip_bl_desc.extra_base = 0; - zip_bl_desc.elems = zip_BL_CODES; - zip_bl_desc.max_length = zip_MAX_BL_BITS; - zip_bl_desc.max_code = 0; - - // Initialize the mapping length (0..255) -> length code (0..28) - length = 0; - for (code = 0; code < zip_LENGTH_CODES - 1; code++) { - zip_base_length[code] = length; - for (n = 0; n < (1 << zip_extra_lbits[code]); n++) - zip_length_code[length++] = code; - } - /* Note that the length 255 (match length 258) can be represented - * in two different ways: code 284 + 5 bits or code 285, so we - * overwrite length_code[255] to use the best encoding: - */ - zip_length_code[length - 1] = code; - - /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ - dist = 0; - for (code = 0; code < 16; code++) { - zip_base_dist[code] = dist; - for (n = 0; n < (1 << zip_extra_dbits[code]); n++) { - zip_dist_code[dist++] = code; - } - } - dist >>= 7; // from now on, all distances are divided by 128 - for (; code < zip_D_CODES; code++) { - zip_base_dist[code] = dist << 7; - for (n = 0; n < (1 << (zip_extra_dbits[code] - 7)); n++) - zip_dist_code[256 + dist++] = code; - } - // Construct the codes of the static literal tree - for (bits = 0; bits <= zip_MAX_BITS; bits++) - zip_bl_count[bits] = 0; - n = 0; - while (n <= 143) { - zip_static_ltree[n++].dl = 8; - zip_bl_count[8]++; - } - while (n <= 255) { - zip_static_ltree[n++].dl = 9; - zip_bl_count[9]++; - } - while (n <= 279) { - zip_static_ltree[n++].dl = 7; - zip_bl_count[7]++; - } - while (n <= 287) { - zip_static_ltree[n++].dl = 8; - zip_bl_count[8]++; - } - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - zip_gen_codes(zip_static_ltree, zip_L_CODES + 1); - - /* The static distance tree is trivial: */ - for (n = 0; n < zip_D_CODES; n++) { - zip_static_dtree[n].dl = 5; - zip_static_dtree[n].fc = zip_bi_reverse(n, 5); - } - - // Initialize the first block of the first file: - zip_init_block(); - }; - - /* ========================================================================== - * Initialize a new block. - */ - var zip_init_block = function () { - var n; // iterates over tree elements - - // Initialize the trees. - for (n = 0; n < zip_L_CODES; n++) zip_dyn_ltree[n].fc = 0; - for (n = 0; n < zip_D_CODES; n++) zip_dyn_dtree[n].fc = 0; - for (n = 0; n < zip_BL_CODES; n++) zip_bl_tree[n].fc = 0; - - zip_dyn_ltree[zip_END_BLOCK].fc = 1; - zip_opt_len = zip_static_len = 0; - zip_last_lit = zip_last_dist = zip_last_flags = 0; - zip_flags = 0; - zip_flag_bit = 1; - }; - - /* ========================================================================== - * Restore the heap property by moving down the tree starting at node k, - * exchanging a node with the smallest of its two sons if necessary, stopping - * when the heap property is re-established (each father smaller than its - * two sons). - */ - var zip_pqdownheap = function (tree, // the tree to restore - k) { // node to move down - var v = zip_heap[k]; - var j = k << 1; // left son of k - - while (j <= zip_heap_len) { - // Set j to the smallest of the two sons: - if (j < zip_heap_len && - zip_SMALLER(tree, zip_heap[j + 1], zip_heap[j])) - j++; - - // Exit if v is smaller than both sons - if (zip_SMALLER(tree, v, zip_heap[j])) - break; - - // Exchange v with the smallest son - zip_heap[k] = zip_heap[j]; - k = j; - - // And continue down the tree, setting j to the left son of k - j <<= 1; - } - zip_heap[k] = v; - }; - - /* ========================================================================== - * Compute the optimal bit lengths for a tree and update the total bit length - * for the current block. - * IN assertion: the fields freq and dad are set, heap[heap_max] and - * above are the tree nodes sorted by increasing frequency. - * OUT assertions: the field len is set to the optimal bit length, the - * array bl_count contains the frequencies for each bit length. - * The length opt_len is updated; static_len is also updated if stree is - * not null. - */ - var zip_gen_bitlen = function (desc) { // the tree descriptor - var tree = desc.dyn_tree; - var extra = desc.extra_bits; - var base = desc.extra_base; - var max_code = desc.max_code; - var max_length = desc.max_length; - var stree = desc.static_tree; - var h; // heap index - var n, m; // iterate over the tree elements - var bits; // bit length - var xbits; // extra bits - var f; // frequency - var overflow = 0; // number of elements with bit length too large - - for (bits = 0; bits <= zip_MAX_BITS; bits++) - zip_bl_count[bits] = 0; - - /* In a first pass, compute the optimal bit lengths (which may - * overflow in the case of the bit length tree). - */ - tree[zip_heap[zip_heap_max]].dl = 0; // root of the heap - - for (h = zip_heap_max + 1; h < zip_HEAP_SIZE; h++) { - n = zip_heap[h]; - bits = tree[tree[n].dl].dl + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n].dl = bits; - // We overwrite tree[n].dl which is no longer needed - - if (n > max_code) - continue; // not a leaf node - - zip_bl_count[bits]++; - xbits = 0; - if (n >= base) - xbits = extra[n - base]; - f = tree[n].fc; - zip_opt_len += f * (bits + xbits); - if (stree != null) - zip_static_len += f * (stree[n].dl + xbits); - } - if (overflow == 0) - return; - - // This happens for example on obj2 and pic of the Calgary corpus - - // Find the first bit length which could increase: - do { - bits = max_length - 1; - while (zip_bl_count[bits] == 0) - bits--; - zip_bl_count[bits]--; // move one leaf down the tree - zip_bl_count[bits + 1] += 2; // move one overflow item as its brother - zip_bl_count[max_length]--; - /* The brother of the overflow item also moves one step up, - * but this does not affect bl_count[max_length] - */ - overflow -= 2; - } while (overflow > 0); - - /* Now recompute all bit lengths, scanning in increasing frequency. - * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all - * lengths instead of fixing only the wrong ones. This idea is taken - * from 'ar' written by Haruhiko Okumura.) - */ - for (bits = max_length; bits != 0; bits--) { - n = zip_bl_count[bits]; - while (n != 0) { - m = zip_heap[--h]; - if (m > max_code) - continue; - if (tree[m].dl != bits) { - zip_opt_len += (bits - tree[m].dl) * tree[m].fc; - tree[m].fc = bits; - } - n--; - } - } - }; - - /* ========================================================================== - * Generate the codes for a given tree and bit counts (which need not be - * optimal). - * IN assertion: the array bl_count contains the bit length statistics for - * the given tree and the field len is set for all tree elements. - * OUT assertion: the field code is set for all tree elements of non - * zero code length. - */ - var zip_gen_codes = function (tree, // the tree to decorate - max_code) { // largest code with non zero frequency - var next_code = new Array(zip_MAX_BITS + 1); // next code value for each bit length - var code = 0; // running code value - var bits; // bit index - var n; // code index - - /* The distribution counts are first used to generate the code values - * without bit reversal. - */ - for (bits = 1; bits <= zip_MAX_BITS; bits++) { - code = ((code + zip_bl_count[bits - 1]) << 1); - next_code[bits] = code; - } - - /* Check that the bit counts in bl_count are consistent. The last code - * must be all ones. - */ - for (n = 0; n <= max_code; n++) { - var len = tree[n].dl; - if (len == 0) - continue; - // Now reverse the bits - tree[n].fc = zip_bi_reverse(next_code[len]++, len); - } - }; - - /* ========================================================================== - * Construct one Huffman tree and assigns the code bit strings and lengths. - * Update the total bit length for the current block. - * IN assertion: the field freq is set for all tree elements. - * OUT assertions: the fields len and code are set to the optimal bit length - * and corresponding code. The length opt_len is updated; static_len is - * also updated if stree is not null. The field max_code is set. - */ - var zip_build_tree = function (desc) { // the tree descriptor - var tree = desc.dyn_tree; - var stree = desc.static_tree; - var elems = desc.elems; - var n, m; // iterate over heap elements - var max_code = -1; // largest code with non zero frequency - var node = elems; // next internal node of the tree - - /* Construct the initial heap, with least frequent element in - * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. - * heap[0] is not used. - */ - zip_heap_len = 0; - zip_heap_max = zip_HEAP_SIZE; - - for (n = 0; n < elems; n++) { - if (tree[n].fc != 0) { - zip_heap[++zip_heap_len] = max_code = n; - zip_depth[n] = 0; - } else - tree[n].dl = 0; - } - - /* The pkzip format requires that at least one distance code exists, - * and that at least one bit should be sent even if there is only one - * possible code. So to avoid special checks later on we force at least - * two codes of non zero frequency. - */ - while (zip_heap_len < 2) { - var xnew = zip_heap[++zip_heap_len] = (max_code < 2 ? ++max_code : 0); - tree[xnew].fc = 1; - zip_depth[xnew] = 0; - zip_opt_len--; - if (stree != null) - zip_static_len -= stree[xnew].dl; - // new is 0 or 1 so it does not have extra bits - } - desc.max_code = max_code; - - /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, - * establish sub-heaps of increasing lengths: - */ - for (n = zip_heap_len >> 1; n >= 1; n--) - zip_pqdownheap(tree, n); - - /* Construct the Huffman tree by repeatedly combining the least two - * frequent nodes. - */ - do { - n = zip_heap[zip_SMALLEST]; - zip_heap[zip_SMALLEST] = zip_heap[zip_heap_len--]; - zip_pqdownheap(tree, zip_SMALLEST); - - m = zip_heap[zip_SMALLEST]; // m = node of next least frequency - - // keep the nodes sorted by frequency - zip_heap[--zip_heap_max] = n; - zip_heap[--zip_heap_max] = m; - - // Create a new node father of n and m - tree[node].fc = tree[n].fc + tree[m].fc; - if (zip_depth[n] > zip_depth[m] + 1) - zip_depth[node] = zip_depth[n]; - else - zip_depth[node] = zip_depth[m] + 1; - tree[n].dl = tree[m].dl = node; - - // and insert the new node in the heap - zip_heap[zip_SMALLEST] = node++; - zip_pqdownheap(tree, zip_SMALLEST); - - } while (zip_heap_len >= 2); - - zip_heap[--zip_heap_max] = zip_heap[zip_SMALLEST]; - - /* At this point, the fields freq and dad are set. We can now - * generate the bit lengths. - */ - zip_gen_bitlen(desc); - - // The field len is now set, we can generate the bit codes - zip_gen_codes(tree, max_code); - }; - - /* ========================================================================== - * Scan a literal or distance tree to determine the frequencies of the codes - * in the bit length tree. Updates opt_len to take into account the repeat - * counts. (The contribution of the bit length codes will be added later - * during the construction of bl_tree.) - */ - var zip_scan_tree = function (tree,// the tree to be scanned - max_code) { // and its largest code of non zero frequency - var n; // iterates over all tree elements - var prevlen = -1; // last emitted length - var curlen; // length of current code - var nextlen = tree[0].dl; // length of next code - var count = 0; // repeat count of the current code - var max_count = 7; // max repeat count - var min_count = 4; // min repeat count - - if (nextlen == 0) { - max_count = 138; - min_count = 3; - } - tree[max_code + 1].dl = 0xffff; // guard - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[n + 1].dl; - if (++count < max_count && curlen == nextlen) - continue; - else if (count < min_count) - zip_bl_tree[curlen].fc += count; - else if (curlen != 0) { - if (curlen != prevlen) - zip_bl_tree[curlen].fc++; - zip_bl_tree[zip_REP_3_6].fc++; - } else if (count <= 10) - zip_bl_tree[zip_REPZ_3_10].fc++; - else - zip_bl_tree[zip_REPZ_11_138].fc++; - count = 0; - prevlen = curlen; - if (nextlen == 0) { - max_count = 138; - min_count = 3; - } else if (curlen == nextlen) { - max_count = 6; - min_count = 3; - } else { - max_count = 7; - min_count = 4; - } - } - }; - - /* ========================================================================== - * Send a literal or distance tree in compressed form, using the codes in - * bl_tree. - */ - var zip_send_tree = function (tree, // the tree to be scanned - max_code) { // and its largest code of non zero frequency - var n; // iterates over all tree elements - var prevlen = -1; // last emitted length - var curlen; // length of current code - var nextlen = tree[0].dl; // length of next code - var count = 0; // repeat count of the current code - var max_count = 7; // max repeat count - var min_count = 4; // min repeat count - - /* tree[max_code+1].dl = -1; */ - /* guard already set */ - if (nextlen == 0) { - max_count = 138; - min_count = 3; - } - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[n + 1].dl; - if (++count < max_count && curlen == nextlen) { - continue; - } else if (count < min_count) { - do { - zip_SEND_CODE(curlen, zip_bl_tree); - } while (--count != 0); - } else if (curlen != 0) { - if (curlen != prevlen) { - zip_SEND_CODE(curlen, zip_bl_tree); - count--; - } - // Assert(count >= 3 && count <= 6, " 3_6?"); - zip_SEND_CODE(zip_REP_3_6, zip_bl_tree); - zip_send_bits(count - 3, 2); - } else if (count <= 10) { - zip_SEND_CODE(zip_REPZ_3_10, zip_bl_tree); - zip_send_bits(count - 3, 3); - } else { - zip_SEND_CODE(zip_REPZ_11_138, zip_bl_tree); - zip_send_bits(count - 11, 7); - } - count = 0; - prevlen = curlen; - if (nextlen == 0) { - max_count = 138; - min_count = 3; - } else if (curlen == nextlen) { - max_count = 6; - min_count = 3; - } else { - max_count = 7; - min_count = 4; - } - } - }; - - /* ========================================================================== - * Construct the Huffman tree for the bit lengths and return the index in - * bl_order of the last bit length code to send. - */ - var zip_build_bl_tree = function () { - var max_blindex; // index of last bit length code of non zero freq - - // Determine the bit length frequencies for literal and distance trees - zip_scan_tree(zip_dyn_ltree, zip_l_desc.max_code); - zip_scan_tree(zip_dyn_dtree, zip_d_desc.max_code); - - // Build the bit length tree: - zip_build_tree(zip_bl_desc); - /* opt_len now includes the length of the tree representations, except - * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. - */ - - /* Determine the number of bit length codes to send. The pkzip format - * requires that at least 4 bit length codes be sent. (appnote.txt says - * 3 but the actual value used is 4.) - */ - for (max_blindex = zip_BL_CODES - 1; max_blindex >= 3; max_blindex--) { - if (zip_bl_tree[zip_bl_order[max_blindex]].dl != 0) break; - } - /* Update opt_len to include the bit length tree and counts */ - zip_opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; - return max_blindex; - }; - - /* ========================================================================== - * Send the header for a block using dynamic Huffman trees: the counts, the - * lengths of the bit length codes, the literal tree and the distance tree. - * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - */ - var zip_send_all_trees = function (lcodes, dcodes, blcodes) { // number of codes for each tree - var rank; // index in bl_order - zip_send_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt - zip_send_bits(dcodes - 1, 5); - zip_send_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt - for (rank = 0; rank < blcodes; rank++) { - zip_send_bits(zip_bl_tree[zip_bl_order[rank]].dl, 3); - } - - // send the literal tree - zip_send_tree(zip_dyn_ltree, lcodes - 1); - - // send the distance tree - zip_send_tree(zip_dyn_dtree, dcodes - 1); - }; - - /* ========================================================================== - * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and output the encoded block to the zip file. - */ - var zip_flush_block = function (eof) { // true if this is the last block for a file - var opt_lenb, static_lenb; // opt_len and static_len in bytes - var max_blindex; // index of last bit length code of non zero freq - var stored_len; // length of input block - - stored_len = zip_strstart - zip_block_start; - zip_flag_buf[zip_last_flags] = zip_flags; // Save the flags for the last 8 items - - // Construct the literal and distance trees - zip_build_tree(zip_l_desc); - zip_build_tree(zip_d_desc); - /* At this point, opt_len and static_len are the total bit lengths of - * the compressed block data, excluding the tree representations. - */ - - /* Build the bit length tree for the above two trees, and get the index - * in bl_order of the last bit length code to send. - */ - max_blindex = zip_build_bl_tree(); - - // Determine the best encoding. Compute first the block length in bytes - opt_lenb = (zip_opt_len + 3 + 7) >> 3; - static_lenb = (zip_static_len + 3 + 7) >> 3; - if (static_lenb <= opt_lenb) - opt_lenb = static_lenb; - if (stored_len + 4 <= opt_lenb // 4: two words for the lengths - && zip_block_start >= 0) { - var i; - - /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - * Otherwise we can't have processed more than WSIZE input bytes since - * the last block flush, because compression would have been - * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - * transform a block into a stored block. - */ - zip_send_bits((zip_STORED_BLOCK << 1) + eof, 3); - /* send block type */ - zip_bi_windup(); - /* align on byte boundary */ - zip_put_short(stored_len); - zip_put_short(~stored_len); - - // copy block - for (i = 0; i < stored_len; i++) - zip_put_byte(zip_window[zip_block_start + i]); - - } else if (static_lenb == opt_lenb) { - zip_send_bits((zip_STATIC_TREES << 1) + eof, 3); - zip_compress_block(zip_static_ltree, zip_static_dtree); - } else { - zip_send_bits((zip_DYN_TREES << 1) + eof, 3); - zip_send_all_trees(zip_l_desc.max_code + 1, - zip_d_desc.max_code + 1, - max_blindex + 1); - zip_compress_block(zip_dyn_ltree, zip_dyn_dtree); - } - - zip_init_block(); - - if (eof != 0) - zip_bi_windup(); - }; - - /* ========================================================================== - * Save the match info and tally the frequency counts. Return true if - * the current block must be flushed. - */ - var zip_ct_tally = function (dist, // distance of matched string - lc) { // match length-MIN_MATCH or unmatched char (if dist==0) - zip_l_buf[zip_last_lit++] = lc; - if (dist == 0) { - // lc is the unmatched char - zip_dyn_ltree[lc].fc++; - } else { - // Here, lc is the match length - MIN_MATCH - dist--; // dist = match distance - 1 - zip_dyn_ltree[zip_length_code[lc] + zip_LITERALS + 1].fc++; - zip_dyn_dtree[zip_D_CODE(dist)].fc++; - - zip_d_buf[zip_last_dist++] = dist; - zip_flags |= zip_flag_bit; - } - zip_flag_bit <<= 1; - - // Output the flags if they fill a byte - if ((zip_last_lit & 7) == 0) { - zip_flag_buf[zip_last_flags++] = zip_flags; - zip_flags = 0; - zip_flag_bit = 1; - } - // Try to guess if it is profitable to stop the current block here - if (zip_compr_level > 2 && (zip_last_lit & 0xfff) == 0) { - // Compute an upper bound for the compressed length - var out_length = zip_last_lit * 8; - var in_length = zip_strstart - zip_block_start; - var dcode; - - for (dcode = 0; dcode < zip_D_CODES; dcode++) { - out_length += zip_dyn_dtree[dcode].fc * (5 + zip_extra_dbits[dcode]); - } - out_length >>= 3; - if (zip_last_dist < parseInt(zip_last_lit / 2) && - out_length < parseInt(in_length / 2)) - return true; - } - return (zip_last_lit == LIT_BUFSIZE - 1 || - zip_last_dist == zip_DIST_BUFSIZE); - /* We avoid equality with LIT_BUFSIZE because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ - }; - - /* ========================================================================== - * Send the block data compressed using the given Huffman trees - */ - var zip_compress_block = function (ltree, // literal tree - dtree) { // distance tree - var dist; // distance of matched string - var lc; // match length or unmatched char (if dist == 0) - var lx = 0; // running index in l_buf - var dx = 0; // running index in d_buf - var fx = 0; // running index in flag_buf - var flag = 0; // current flags - var code; // the code to send - var extra; // number of extra bits to send - - if (zip_last_lit != 0) do { - if ((lx & 7) == 0) - flag = zip_flag_buf[fx++]; - lc = zip_l_buf[lx++] & 0xff; - if ((flag & 1) == 0) { - zip_SEND_CODE(lc, ltree); - /* send a literal byte */ - } else { - // Here, lc is the match length - MIN_MATCH - code = zip_length_code[lc]; - zip_SEND_CODE(code + zip_LITERALS + 1, ltree); // send the length code - extra = zip_extra_lbits[code]; - if (extra != 0) { - lc -= zip_base_length[code]; - zip_send_bits(lc, extra); // send the extra length bits - } - dist = zip_d_buf[dx++]; - // Here, dist is the match distance - 1 - code = zip_D_CODE(dist); - zip_SEND_CODE(code, dtree); // send the distance code - extra = zip_extra_dbits[code]; - if (extra != 0) { - dist -= zip_base_dist[code]; - zip_send_bits(dist, extra); // send the extra distance bits - } - } // literal or match pair ? - flag >>= 1; - } while (lx < zip_last_lit); - - zip_SEND_CODE(zip_END_BLOCK, ltree); - }; - - /* ========================================================================== - * Send a value on a given number of bits. - * IN assertion: length <= 16 and value fits in length bits. - */ - var zip_Buf_size = 16; // bit size of bi_buf - var zip_send_bits = function (value, // value to send - length) { // number of bits - /* If not enough room in bi_buf, use (valid) bits from bi_buf and - * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid)) - * unused bits in value. - */ - if (zip_bi_valid > zip_Buf_size - length) { - zip_bi_buf |= (value << zip_bi_valid); - zip_put_short(zip_bi_buf); - zip_bi_buf = (value >> (zip_Buf_size - zip_bi_valid)); - zip_bi_valid += length - zip_Buf_size; - } else { - zip_bi_buf |= value << zip_bi_valid; - zip_bi_valid += length; - } - }; - - /* ========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ - var zip_bi_reverse = function (code, // the value to invert - len) { // its bit length - var res = 0; - do { - res |= code & 1; - code >>= 1; - res <<= 1; - } while (--len > 0); - return res >> 1; - }; - - /* ========================================================================== - * Write out any remaining bits in an incomplete byte. - */ - var zip_bi_windup = function () { - if (zip_bi_valid > 8) { - zip_put_short(zip_bi_buf); - } else if (zip_bi_valid > 0) { - zip_put_byte(zip_bi_buf); - } - zip_bi_buf = 0; - zip_bi_valid = 0; - }; - - var zip_qoutbuf = function () { - if (zip_outcnt != 0) { - var q, i; - q = zip_new_queue(); - if (zip_qhead == null) - zip_qhead = zip_qtail = q; - else - zip_qtail = zip_qtail.next = q; - q.len = zip_outcnt - zip_outoff; - for (i = 0; i < q.len; i++) - q.ptr[i] = zip_outbuf[zip_outoff + i]; - zip_outcnt = zip_outoff = 0; - } - }; - - function deflate(buffData, level) { - zip_deflate_data = buffData; - zip_deflate_pos = 0; - zip_deflate_start(level); - - var buff = new Array(1024), - pages = [], - totalSize = 0, - i; - - for (i = 0; i < 1024; i++) buff[i] = 0; - while ((i = zip_deflate_internal(buff, 0, buff.length)) > 0) { - var buf = new Buffer(buff.slice(0, i)); - pages.push(buf); - totalSize += buf.length; - } - - if (pages.length == 1) { - return pages[0]; - } - - var result = new Buffer(totalSize), - index = 0; - - for (i = 0; i < pages.length; i++) { - pages[i].copy(result, index); - index = index + pages[i].length - } - - return result; - } - - return { - deflate: function () { - return deflate(inbuf, 8); - } - } -} - -module.exports = function (/*Buffer*/inbuf) { - - var zlib = require("zlib"); - - return { - deflate: function () { - return new JSDeflater(inbuf).deflate(); - }, - - deflateAsync: function (/*Function*/callback) { - var tmp = zlib.createDeflateRaw({chunkSize:(parseInt(inbuf.length / 1024) + 1)*1024}), - parts = [], total = 0; - tmp.on('data', function(data) { - parts.push(data); - total += data.length; - }); - tmp.on('end', function() { - var buf = new Buffer(total), written = 0; - buf.fill(0); - - for (var i = 0; i < parts.length; i++) { - var part = parts[i]; - part.copy(buf, written); - written += part.length; - } - callback && callback(buf); - }); - tmp.end(inbuf); - } - } -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/index.js deleted file mode 100644 index ddcbba60..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/index.js +++ /dev/null @@ -1,2 +0,0 @@ -exports.Deflater = require("./deflater"); -exports.Inflater = require("./inflater"); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/inflater.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/inflater.js deleted file mode 100644 index 59536c90..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/methods/inflater.js +++ /dev/null @@ -1,448 +0,0 @@ -var Buffer = require("buffer").Buffer; - -function JSInflater(/*Buffer*/input) { - - var WSIZE = 0x8000, - slide = new Buffer(0x10000), - windowPos = 0, - fixedTableList = null, - fixedTableDist, - fixedLookup, - bitBuf = 0, - bitLen = 0, - method = -1, - eof = false, - copyLen = 0, - copyDist = 0, - tblList, tblDist, bitList, bitdist, - - inputPosition = 0, - - MASK_BITS = [0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff], - LENS = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], - LEXT = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99], - DISTS = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577], - DEXT = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], - BITORDER = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; - - function HuffTable(clen, cnum, cval, blist, elist, lookupm) { - - this.status = 0; - this.root = null; - this.maxbit = 0; - - var el, f, tail, - offsets = [], - countTbl = [], - sTbl = [], - values = [], - tentry = {extra: 0, bitcnt: 0, lbase: 0, next: null}; - - tail = this.root = null; - for(var i = 0; i < 0x11; i++) { countTbl[i] = 0; sTbl[i] = 0; offsets[i] = 0; } - for(i = 0; i < 0x120; i++) values[i] = 0; - - el = cnum > 256 ? clen[256] : 16; - - var pidx = -1; - while (++pidx < cnum) countTbl[clen[pidx]]++; - - if(countTbl[0] == cnum) return; - - for(var j = 1; j <= 16; j++) if(countTbl[j] != 0) break; - var bitLen = j; - for(i = 16; i != 0; i--) if(countTbl[i] != 0) break; - var maxLen = i; - - lookupm < j && (lookupm = j); - - var dCodes = 1 << j; - for(; j < i; j++, dCodes <<= 1) - if((dCodes -= countTbl[j]) < 0) { - this.status = 2; - this.maxbit = lookupm; - return; - } - - if((dCodes -= countTbl[i]) < 0) { - this.status = 2; - this.maxbit = lookupm; - return; - } - - countTbl[i] += dCodes; - offsets[1] = j = 0; - pidx = 1; - var xp = 2; - while(--i > 0) offsets[xp++] = (j += countTbl[pidx++]); - pidx = 0; - i = 0; - do { - (j = clen[pidx++]) && (values[offsets[j]++] = i); - } while(++i < cnum); - cnum = offsets[maxLen]; - offsets[0] = i = 0; - pidx = 0; - - var level = -1, - w = sTbl[0] = 0, - cnode = null, - tblCnt = 0, - tblStack = []; - - for(; bitLen <= maxLen; bitLen++) { - var kccnt = countTbl[bitLen]; - while(kccnt-- > 0) { - while(bitLen > w + sTbl[1 + level]) { - w += sTbl[1 + level]; - level++; - tblCnt = (tblCnt = maxLen - w) > lookupm ? lookupm : tblCnt; - if((f = 1 << (j = bitLen - w)) > kccnt + 1) { - f -= kccnt + 1; - xp = bitLen; - while(++j < tblCnt) { - if((f <<= 1) <= countTbl[++xp]) break; - f -= countTbl[xp]; - } - } - if(w + j > el && w < el) j = el - w; - tblCnt = 1 << j; - sTbl[1 + level] = j; - cnode = []; - while (cnode.length < tblCnt) cnode.push({extra: 0, bitcnt: 0, lbase: 0, next: null}); - if (tail == null) { - tail = this.root = {next:null, list:null}; - } else { - tail = tail.next = {next:null, list:null} - } - tail.next = null; - tail.list = cnode; - - tblStack[level] = cnode; - - if(level > 0) { - offsets[level] = i; - tentry.bitcnt = sTbl[level]; - tentry.extra = 16 + j; - tentry.next = cnode; - j = (i & ((1 << w) - 1)) >> (w - sTbl[level]); - - tblStack[level-1][j].extra = tentry.extra; - tblStack[level-1][j].bitcnt = tentry.bitcnt; - tblStack[level-1][j].lbase = tentry.lbase; - tblStack[level-1][j].next = tentry.next; - } - } - tentry.bitcnt = bitLen - w; - if(pidx >= cnum) - tentry.extra = 99; - else if(values[pidx] < cval) { - tentry.extra = (values[pidx] < 256 ? 16 : 15); - tentry.lbase = values[pidx++]; - } else { - tentry.extra = elist[values[pidx] - cval]; - tentry.lbase = blist[values[pidx++] - cval]; - } - - f = 1 << (bitLen - w); - for(j = i >> w; j < tblCnt; j += f) { - cnode[j].extra = tentry.extra; - cnode[j].bitcnt = tentry.bitcnt; - cnode[j].lbase = tentry.lbase; - cnode[j].next = tentry.next; - } - for(j = 1 << (bitLen - 1); (i & j) != 0; j >>= 1) - i ^= j; - i ^= j; - while((i & ((1 << w) - 1)) != offsets[level]) { - w -= sTbl[level]; - level--; - } - } - } - - this.maxbit = sTbl[1]; - this.status = ((dCodes != 0 && maxLen != 1) ? 1 : 0); - } - - function addBits(n) { - while(bitLen < n) { - bitBuf |= input[inputPosition++] << bitLen; - bitLen += 8; - } - return bitBuf; - } - - function cutBits(n) { - bitLen -= n; - return bitBuf >>= n; - } - - function maskBits(n) { - while(bitLen < n) { - bitBuf |= input[inputPosition++] << bitLen; - bitLen += 8; - } - var res = bitBuf & MASK_BITS[n]; - bitBuf >>= n; - bitLen -= n; - return res; - } - - function codes(buff, off, size) { - var e, t; - if(size == 0) return 0; - - var n = 0; - for(;;) { - t = tblList.list[addBits(bitList) & MASK_BITS[bitList]]; - e = t.extra; - while(e > 16) { - if(e == 99) return -1; - cutBits(t.bitcnt); - e -= 16; - t = t.next[addBits(e) & MASK_BITS[e]]; - e = t.extra; - } - cutBits(t.bitcnt); - if(e == 16) { - windowPos &= WSIZE - 1; - buff[off + n++] = slide[windowPos++] = t.lbase; - if(n == size) return size; - continue; - } - if(e == 15) break; - - copyLen = t.lbase + maskBits(e); - t = tblDist.list[addBits(bitdist) & MASK_BITS[bitdist]]; - e = t.extra; - - while(e > 16) { - if(e == 99) return -1; - cutBits(t.bitcnt); - e -= 16; - t = t.next[addBits(e) & MASK_BITS[e]]; - e = t.extra - } - cutBits(t.bitcnt); - copyDist = windowPos - t.lbase - maskBits(e); - - while(copyLen > 0 && n < size) { - copyLen--; - copyDist &= WSIZE - 1; - windowPos &= WSIZE - 1; - buff[off + n++] = slide[windowPos++] = slide[copyDist++]; - } - - if(n == size) return size; - } - - method = -1; // done - return n; - } - - function stored(buff, off, size) { - cutBits(bitLen & 7); - var n = maskBits(0x10); - if(n != ((~maskBits(0x10)) & 0xffff)) return -1; - copyLen = n; - - n = 0; - while(copyLen > 0 && n < size) { - copyLen--; - windowPos &= WSIZE - 1; - buff[off + n++] = slide[windowPos++] = maskBits(8); - } - - if(copyLen == 0) method = -1; - return n; - } - - function fixed(buff, off, size) { - var fixed_bd = 0; - if(fixedTableList == null) { - var lengths = []; - - for(var symbol = 0; symbol < 144; symbol++) lengths[symbol] = 8; - for(; symbol < 256; symbol++) lengths[symbol] = 9; - for(; symbol < 280; symbol++) lengths[symbol] = 7; - for(; symbol < 288; symbol++) lengths[symbol] = 8; - - fixedLookup = 7; - - var htbl = new HuffTable(lengths, 288, 257, LENS, LEXT, fixedLookup); - - if(htbl.status != 0) return -1; - - fixedTableList = htbl.root; - fixedLookup = htbl.maxbit; - - for(symbol = 0; symbol < 30; symbol++) lengths[symbol] = 5; - fixed_bd = 5; - - htbl = new HuffTable(lengths, 30, 0, DISTS, DEXT, fixed_bd); - if(htbl.status > 1) { - fixedTableList = null; - return -1; - } - fixedTableDist = htbl.root; - fixed_bd = htbl.maxbit; - } - - tblList = fixedTableList; - tblDist = fixedTableDist; - bitList = fixedLookup; - bitdist = fixed_bd; - return codes(buff, off, size); - } - - function dynamic(buff, off, size) { - var ll = new Array(0x023C); - - for (var m = 0; m < 0x023C; m++) ll[m] = 0; - - var llencnt = 257 + maskBits(5), - dcodescnt = 1 + maskBits(5), - bitlencnt = 4 + maskBits(4); - - if(llencnt > 286 || dcodescnt > 30) return -1; - - for(var j = 0; j < bitlencnt; j++) ll[BITORDER[j]] = maskBits(3); - for(; j < 19; j++) ll[BITORDER[j]] = 0; - - // build decoding table for trees--single level, 7 bit lookup - bitList = 7; - var hufTable = new HuffTable(ll, 19, 19, null, null, bitList); - if(hufTable.status != 0) - return -1; // incomplete code set - - tblList = hufTable.root; - bitList = hufTable.maxbit; - var lencnt = llencnt + dcodescnt, - i = 0, - lastLen = 0; - while(i < lencnt) { - var hufLcode = tblList.list[addBits(bitList) & MASK_BITS[bitList]]; - j = hufLcode.bitcnt; - cutBits(j); - j = hufLcode.lbase; - if(j < 16) - ll[i++] = lastLen = j; - else if(j == 16) { - j = 3 + maskBits(2); - if(i + j > lencnt) return -1; - while(j-- > 0) ll[i++] = lastLen; - } else if(j == 17) { - j = 3 + maskBits(3); - if(i + j > lencnt) return -1; - while(j-- > 0) ll[i++] = 0; - lastLen = 0; - } else { - j = 11 + maskBits(7); - if(i + j > lencnt) return -1; - while(j-- > 0) ll[i++] = 0; - lastLen = 0; - } - } - bitList = 9; - hufTable = new HuffTable(ll, llencnt, 257, LENS, LEXT, bitList); - bitList == 0 && (hufTable.status = 1); - - if (hufTable.status != 0) return -1; - - tblList = hufTable.root; - bitList = hufTable.maxbit; - - for(i = 0; i < dcodescnt; i++) ll[i] = ll[i + llencnt]; - bitdist = 6; - hufTable = new HuffTable(ll, dcodescnt, 0, DISTS, DEXT, bitdist); - tblDist = hufTable.root; - bitdist = hufTable.maxbit; - - if((bitdist == 0 && llencnt > 257) || hufTable.status != 0) return -1; - - return codes(buff, off, size); - } - - return { - inflate : function(/*Buffer*/outputBuffer) { - tblList = null; - - var size = outputBuffer.length, - offset = 0, i; - - while(offset < size) { - if(eof && method == -1) return; - if(copyLen > 0) { - if(method != 0) { - while(copyLen > 0 && offset < size) { - copyLen--; - copyDist &= WSIZE - 1; - windowPos &= WSIZE - 1; - outputBuffer[offset++] = (slide[windowPos++] = slide[copyDist++]); - } - } else { - while(copyLen > 0 && offset < size) { - copyLen--; - windowPos &= WSIZE - 1; - outputBuffer[offset++] = (slide[windowPos++] = maskBits(8)); - } - copyLen == 0 && (method = -1); // done - } - if (offset == size) return; - } - - if(method == -1) { - if(eof) break; - eof = maskBits(1) != 0; - method = maskBits(2); - tblList = null; - copyLen = 0; - } - switch(method) { - case 0: i = stored(outputBuffer, offset, size - offset); break; - case 1: i = tblList != null ? codes(outputBuffer, offset, size - offset) : fixed(outputBuffer, offset, size - offset); break; - case 2: i = tblList != null ? codes(outputBuffer, offset, size - offset) : dynamic(outputBuffer, offset, size - offset); break; - default: i = -1; break; - } - - if(i == -1) return; - offset += i; - } - } - }; -} - -module.exports = function(/*Buffer*/inbuf) { - var zlib = require("zlib"); - return { - inflateAsync : function(/*Function*/callback) { - var tmp = zlib.createInflateRaw(), - parts = [], total = 0; - tmp.on('data', function(data) { - parts.push(data); - total += data.length; - }); - tmp.on('end', function() { - var buf = new Buffer(total), written = 0; - buf.fill(0); - - for (var i = 0; i < parts.length; i++) { - var part = parts[i]; - part.copy(buf, written); - written += part.length; - } - callback && callback(buf); - }); - tmp.end(inbuf) - }, - - inflate : function(/*Buffer*/outputBuffer) { - var x = { - x: new JSInflater(inbuf) - }; - x.x.inflate(outputBuffer); - delete(x.x); - } - } -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/package.json deleted file mode 100644 index 807d3cd1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "adm-zip", - "version": "0.4.4", - "description": "A Javascript implementation of zip for nodejs. Allows user to create or extract zip files both in memory or to/from disk", - "keywords": [ - "zip", - "methods", - "archive", - "unzip" - ], - "homepage": "http://github.com/cthackers/adm-zip", - "author": { - "name": "Nasca Iacob", - "email": "sy@another-d-mention.ro", - "url": "https://github.com/cthackers" - }, - "bugs": { - "url": "https://github.com/cthackers/adm-zip/issues", - "email": "sy@another-d-mention.ro" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://raw.github.com/cthackers/adm-zip/master/MIT-LICENSE.txt" - } - ], - "main": "adm-zip.js", - "repository": { - "type": "git", - "url": "https://github.com/cthackers/adm-zip.git" - }, - "engines": { - "node": ">=0.3.0" - }, - "readme": "# ADM-ZIP for NodeJS\r\n\r\nADM-ZIP is a pure JavaScript implementation for zip data compression for [NodeJS](http://nodejs.org/). \r\n\r\n# Installation\r\n\r\nWith [npm](http://npmjs.org) do:\r\n\r\n $ npm install adm-zip\r\n\t\r\n## What is it good for?\r\nThe library allows you to:\r\n\r\n* decompress zip files directly to disk or in memory buffers\r\n* compress files and store them to disk in .zip format or in compressed buffers\r\n* update content of/add new/delete files from an existing .zip\r\n\r\n# Dependencies\r\nThere are no other nodeJS libraries that ADM-ZIP is dependent of\r\n\r\n# Examples\r\n\r\n## Basic usage\r\n```javascript\r\n\r\n\tvar AdmZip = require('adm-zip');\r\n\r\n\t// reading archives\r\n\tvar zip = new AdmZip(\"./my_file.zip\");\r\n\tvar zipEntries = zip.getEntries(); // an array of ZipEntry records\r\n\r\n\tzipEntries.forEach(function(zipEntry) {\r\n\t console.log(zipEntry.toString()); // outputs zip entries information\r\n\t\tif (zipEntry.entryName == \"my_file.txt\") {\r\n\t\t console.log(zipEntry.data.toString('utf8')); \r\n\t\t}\r\n\t});\r\n\t// outputs the content of some_folder/my_file.txt\r\n\tconsole.log(zip.readAsText(\"some_folder/my_file.txt\")); \r\n\t// extracts the specified file to the specified location\r\n\tzip.extractEntryTo(/*entry name*/\"some_folder/my_file.txt\", /*target path*/\"/home/me/tempfolder\", /*maintainEntryPath*/false, /*overwrite*/true);\r\n\t// extracts everything\r\n\tzip.extractAllTo(/*target path*/\"/home/me/zipcontent/\", /*overwrite*/true);\r\n\t\r\n\t\r\n\t// creating archives\r\n\tvar zip = new AdmZip();\r\n\t\r\n\t// add file directly\r\n\tzip.addFile(\"test.txt\", new Buffer(\"inner content of the file\"), \"entry comment goes here\");\r\n\t// add local file\r\n\tzip.addLocalFile(\"/home/me/some_picture.png\");\r\n\t// get everything as a buffer\r\n\tvar willSendthis = zip.toBuffer();\r\n\t// or write everything to disk\r\n\tzip.writeZip(/*target file name*/\"/home/me/files.zip\");\r\n\t\r\n\t\r\n\t// ... more examples in the wiki\r\n```\r\n\r\nFor more detailed information please check out the [wiki](https://github.com/cthackers/adm-zip/wiki).\r\n\r\n[![build status](https://secure.travis-ci.org/cthackers/adm-zip.png)](http://travis-ci.org/cthackers/adm-zip)\r\n", - "readmeFilename": "README.md", - "_id": "adm-zip@0.4.4", - "dist": { - "shasum": "b493a1464b82a89ecd8c77b99faa046d8f03ded4" - }, - "_from": "adm-zip@~0.4.3", - "_resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.4.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test.zip b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test.zip deleted file mode 100644 index d57bfc07..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test.zip and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/hidden.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/hidden.txt deleted file mode 100644 index 3c3ca551..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/hidden.txt +++ /dev/null @@ -1,17 +0,0 @@ -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/hidden_readonly.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/hidden_readonly.txt deleted file mode 100644 index 3c3ca551..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/hidden_readonly.txt +++ /dev/null @@ -1,17 +0,0 @@ -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/readonly.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/readonly.txt deleted file mode 100644 index 3c3ca551..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/readonly.txt +++ /dev/null @@ -1,17 +0,0 @@ -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/somefile.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/somefile.txt deleted file mode 100644 index 3c3ca551..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/New folder/somefile.txt +++ /dev/null @@ -1,17 +0,0 @@ -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/asd/New Text Document.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/asd/New Text Document.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/blank file.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/attributes_test/blank file.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/fast.zip b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/fast.zip deleted file mode 100644 index f4ed17b9..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/fast.zip and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/fastest.zip b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/fastest.zip deleted file mode 100644 index f4ed17b9..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/fastest.zip and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/linux_arc.zip b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/linux_arc.zip deleted file mode 100644 index 188eccbe..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/linux_arc.zip and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/maximum.zip b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/maximum.zip deleted file mode 100644 index 86a8ec77..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/maximum.zip and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/normal.zip b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/normal.zip deleted file mode 100644 index b4602c94..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/normal.zip and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/store.zip b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/store.zip deleted file mode 100644 index e2add30d..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/store.zip and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/ultra.zip b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/ultra.zip deleted file mode 100644 index 86a8ec77..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/assets/ultra.zip and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/index.js deleted file mode 100644 index 70acb517..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/test/index.js +++ /dev/null @@ -1,5 +0,0 @@ -var Attr = require("../util").FileAttr, - Zip = require("../adm-zip"), - fs = require("fs"); - -//zip.addLocalFile("./test/readonly.txt"); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/constants.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/constants.js deleted file mode 100644 index 05480541..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/constants.js +++ /dev/null @@ -1,84 +0,0 @@ -module.exports = { - /* The local file header */ - LOCHDR : 30, // LOC header size - LOCSIG : 0x04034b50, // "PK\003\004" - LOCVER : 4, // version needed to extract - LOCFLG : 6, // general purpose bit flag - LOCHOW : 8, // compression method - LOCTIM : 10, // modification time (2 bytes time, 2 bytes date) - LOCCRC : 14, // uncompressed file crc-32 value - LOCSIZ : 18, // compressed size - LOCLEN : 22, // uncompressed size - LOCNAM : 26, // filename length - LOCEXT : 28, // extra field length - - /* The Data descriptor */ - EXTSIG : 0x08074b50, // "PK\007\008" - EXTHDR : 16, // EXT header size - EXTCRC : 4, // uncompressed file crc-32 value - EXTSIZ : 8, // compressed size - EXTLEN : 12, // uncompressed size - - /* The central directory file header */ - CENHDR : 46, // CEN header size - CENSIG : 0x02014b50, // "PK\001\002" - CENVEM : 4, // version made by - CENVER : 6, // version needed to extract - CENFLG : 8, // encrypt, decrypt flags - CENHOW : 10, // compression method - CENTIM : 12, // modification time (2 bytes time, 2 bytes date) - CENCRC : 16, // uncompressed file crc-32 value - CENSIZ : 20, // compressed size - CENLEN : 24, // uncompressed size - CENNAM : 28, // filename length - CENEXT : 30, // extra field length - CENCOM : 32, // file comment length - CENDSK : 34, // volume number start - CENATT : 36, // internal file attributes - CENATX : 38, // external file attributes (host system dependent) - CENOFF : 42, // LOC header offset - - /* The entries in the end of central directory */ - ENDHDR : 22, // END header size - ENDSIG : 0x06054b50, // "PK\005\006" - ENDSUB : 8, // number of entries on this disk - ENDTOT : 10, // total number of entries - ENDSIZ : 12, // central directory size in bytes - ENDOFF : 16, // offset of first CEN header - ENDCOM : 20, // zip file comment length - - /* Compression methods */ - STORED : 0, // no compression - SHRUNK : 1, // shrunk - REDUCED1 : 2, // reduced with compression factor 1 - REDUCED2 : 3, // reduced with compression factor 2 - REDUCED3 : 4, // reduced with compression factor 3 - REDUCED4 : 5, // reduced with compression factor 4 - IMPLODED : 6, // imploded - // 7 reserved - DEFLATED : 8, // deflated - ENHANCED_DEFLATED: 9, // enhanced deflated - PKWARE : 10,// PKWare DCL imploded - // 11 reserved - BZIP2 : 12, // compressed using BZIP2 - // 13 reserved - LZMA : 14, // LZMA - // 15-17 reserved - IBM_TERSE : 18, // compressed using IBM TERSE - IBM_LZ77 : 19, //IBM LZ77 z - - /* General purpose bit flag */ - FLG_ENC : 0, // encripted file - FLG_COMP1 : 1, // compression option - FLG_COMP2 : 2, // compression option - FLG_DESC : 4, // data descriptor - FLG_ENH : 8, // enhanced deflation - FLG_STR : 16, // strong encryption - FLG_LNG : 1024, // language encoding - FLG_MSK : 4096, // mask header values - - /* Load type */ - FILE : 0, - BUFFER : 1, - NONE : 2 -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/errors.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/errors.js deleted file mode 100644 index db5d69e9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/errors.js +++ /dev/null @@ -1,35 +0,0 @@ -module.exports = { - /* Header error messages */ - "INVALID_LOC" : "Invalid LOC header (bad signature)", - "INVALID_CEN" : "Invalid CEN header (bad signature)", - "INVALID_END" : "Invalid END header (bad signature)", - - /* ZipEntry error messages*/ - "NO_DATA" : "Nothing to decompress", - "BAD_CRC" : "CRC32 checksum failed", - "FILE_IN_THE_WAY" : "There is a file in the way: %s", - "UNKNOWN_METHOD" : "Invalid/unsupported compression method", - - /* Inflater error messages */ - "AVAIL_DATA" : "inflate::Available inflate data did not terminate", - "INVALID_DISTANCE" : "inflate::Invalid literal/length or distance code in fixed or dynamic block", - "TO_MANY_CODES" : "inflate::Dynamic block code description: too many length or distance codes", - "INVALID_REPEAT_LEN" : "inflate::Dynamic block code description: repeat more than specified lengths", - "INVALID_REPEAT_FIRST" : "inflate::Dynamic block code description: repeat lengths with no first length", - "INCOMPLETE_CODES" : "inflate::Dynamic block code description: code lengths codes incomplete", - "INVALID_DYN_DISTANCE": "inflate::Dynamic block code description: invalid distance code lengths", - "INVALID_CODES_LEN": "inflate::Dynamic block code description: invalid literal/length code lengths", - "INVALID_STORE_BLOCK" : "inflate::Stored block length did not match one's complement", - "INVALID_BLOCK_TYPE" : "inflate::Invalid block type (type == 3)", - - /* ADM-ZIP error messages */ - "CANT_EXTRACT_FILE" : "Could not extract the file", - "CANT_OVERRIDE" : "Target file already exists", - "NO_ZIP" : "No zip file was loaded", - "NO_ENTRY" : "Entry doesn't exist", - "DIRECTORY_CONTENT_ERROR" : "A directory cannot have content", - "FILE_NOT_FOUND" : "File not found: %s", - "NOT_IMPLEMENTED" : "Not implemented", - "INVALID_FILENAME" : "Invalid filename", - "INVALID_FORMAT" : "Invalid or unsupported zip format. No END header found" -}; \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/fattr.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/fattr.js deleted file mode 100644 index 2191ec1c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/fattr.js +++ /dev/null @@ -1,84 +0,0 @@ -var fs = require("fs"), - pth = require("path"); - -fs.existsSync = fs.existsSync || pth.existsSync; - -module.exports = function(/*String*/path) { - - var _path = path || "", - _permissions = 0, - _obj = newAttr(), - _stat = null; - - function newAttr() { - return { - directory : false, - readonly : false, - hidden : false, - executable : false, - mtime : 0, - atime : 0 - } - } - - if (_path && fs.existsSync(_path)) { - _stat = fs.statSync(_path); - _obj.directory = _stat.isDirectory(); - _obj.mtime = _stat.mtime; - _obj.atime = _stat.atime; - _obj.executable = !!(1 & parseInt ((_stat.mode & parseInt ("777", 8)).toString (8)[0])); - _obj.readonly = !!(2 & parseInt ((_stat.mode & parseInt ("777", 8)).toString (8)[0])); - _obj.hidden = pth.basename(_path)[0] === "."; - } else { - console.warn("Invalid path: " + _path) - } - - return { - - get directory () { - return _obj.directory; - }, - - get readOnly () { - return _obj.readonly; - }, - - get hidden () { - return _obj.hidden; - }, - - get mtime () { - return _obj.mtime; - }, - - get atime () { - return _obj.atime; - }, - - - get executable () { - return _obj.executable; - }, - - decodeAttributes : function(val) { - - }, - - encodeAttributes : function (val) { - - }, - - toString : function() { - return '{\n' + - '\t"path" : "' + _path + ",\n" + - '\t"isDirectory" : ' + _obj.directory + ",\n" + - '\t"isReadOnly" : ' + _obj.readonly + ",\n" + - '\t"isHidden" : ' + _obj.hidden + ",\n" + - '\t"isExecutable" : ' + _obj.executable + ",\n" + - '\t"mTime" : ' + _obj.mtime + "\n" + - '\t"aTime" : ' + _obj.atime + "\n" + - '}'; - } - } - -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/index.js deleted file mode 100644 index 935fc1a4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/index.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = require("./utils"); -module.exports.Constants = require("./constants"); -module.exports.Errors = require("./errors"); -module.exports.FileAttr = require("./fattr"); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/utils.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/utils.js deleted file mode 100644 index b14db8c1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/util/utils.js +++ /dev/null @@ -1,145 +0,0 @@ -var fs = require("fs"), - pth = require('path'); - -fs.existsSync = fs.existsSync || pth.existsSync; - -module.exports = (function() { - - var crcTable = [], - Constants = require('./constants'), - Errors = require('./errors'), - - PATH_SEPARATOR = pth.normalize("/"); - - - function mkdirSync(/*String*/path) { - var resolvedPath = path.split(PATH_SEPARATOR)[0]; - path.split(PATH_SEPARATOR).forEach(function(name) { - if (!name || name.substr(-1,1) == ":") return; - resolvedPath += PATH_SEPARATOR + name; - var stat; - try { - stat = fs.statSync(resolvedPath); - } catch (e) { - fs.mkdirSync(resolvedPath); - } - if (stat && stat.isFile()) - throw Errors.FILE_IN_THE_WAY.replace("%s", resolvedPath); - }); - } - - function findSync(/*String*/root, /*RegExp*/pattern, /*Boolean*/recoursive) { - if (typeof pattern === 'boolean') { - recoursive = pattern; - pattern = undefined; - } - var files = []; - fs.readdirSync(root).forEach(function(file) { - var path = pth.join(root, file); - - if (fs.statSync(path).isDirectory() && recoursive) - files = files.concat(findSync(path, pattern, recoursive)); - - if (!pattern || pattern.test(path)) { - files.push(pth.normalize(path) + (fs.statSync(path).isDirectory() ? PATH_SEPARATOR : "")); - } - - }); - return files; - } - - return { - makeDir : function(/*String*/path) { - mkdirSync(path); - }, - - crc32 : function(buf) { - var b = new Buffer(4); - if (!crcTable.length) { - for (var n = 0; n < 256; n++) { - var c = n; - for (var k = 8; --k >= 0;) // - if ((c & 1) != 0) { c = 0xedb88320 ^ (c >>> 1); } else { c = c >>> 1; } - if (c < 0) { - b.writeInt32LE(c, 0); - c = b.readUInt32LE(0); - } - crcTable[n] = c; - } - } - var crc = 0, off = 0, len = buf.length, c1 = ~crc; - while(--len >= 0) c1 = crcTable[(c1 ^ buf[off++]) & 0xff] ^ (c1 >>> 8); - crc = ~c1; - b.writeInt32LE(crc & 0xffffffff, 0); - return b.readUInt32LE(0); - }, - - methodToString : function(/*Number*/method) { - switch (method) { - case Constants.STORED: - return 'STORED (' + method + ')'; - case Constants.DEFLATED: - return 'DEFLATED (' + method + ')'; - default: - return 'UNSUPPORTED (' + method + ')' - } - - }, - - writeFileTo : function(/*String*/path, /*Buffer*/content, /*Boolean*/overwrite, /*Number*/attr) { - if (fs.existsSync(path)) { - if (!overwrite) - return false; // cannot overwite - - var stat = fs.statSync(path); - if (stat.isDirectory()) { - return false; - } - } - var folder = pth.dirname(path); - if (!fs.existsSync(folder)) { - mkdirSync(folder); - } - - var fd; - try { - fd = fs.openSync(path, 'w', 438); // 0666 - } catch(e) { - fs.chmodSync(path, 438); - fd = fs.openSync(path, 'w', 438); - } - if (fd) { - fs.writeSync(fd, content, 0, content.length, 0); - fs.closeSync(fd); - } - fs.chmodSync(path, attr || 438); - return true; - }, - - findFiles : function(/*String*/path) { - return findSync(path, true); - }, - - getAttributes : function(/*String*/path) { - - }, - - setAttributes : function(/*String*/path) { - - }, - - toBuffer : function(input) { - if (Buffer.isBuffer(input)) { - return input; - } else { - if (input.length == 0) { - return new Buffer(0) - } - return new Buffer(input, 'utf8'); - } - }, - - Constants : Constants, - Errors : Errors - } -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/zipEntry.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/zipEntry.js deleted file mode 100644 index 02c31725..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/zipEntry.js +++ /dev/null @@ -1,224 +0,0 @@ -var Utils = require("./util"), - Headers = require("./headers"), - Constants = Utils.Constants, - Methods = require("./methods"); - -module.exports = function (/*Buffer*/input) { - - var _entryHeader = new Headers.EntryHeader(), - _entryName = new Buffer(0), - _comment = new Buffer(0), - _isDirectory = false, - uncompressedData = null, - _extra = new Buffer(0); - - function getCompressedDataFromZip() { - if (!input || !Buffer.isBuffer(input)) { - return new Buffer(0); - } - _entryHeader.loadDataHeaderFromBinary(input); - return input.slice(_entryHeader.realDataOffset, _entryHeader.realDataOffset + _entryHeader.compressedSize) - } - - function crc32OK(data) { - // if bit 3 (0x08) of the general-purpose flags field is set, then the CRC-32 and file sizes are not known when the header is written - if (_entryHeader.flags & 0x8 != 0x8) { - if (Utils.crc32(data) != _entryHeader.crc) { - return false; - } - } else { - // @TODO: load and check data descriptor header - // The fields in the local header are filled with zero, and the CRC-32 and size are appended in a 12-byte structure - // (optionally preceded by a 4-byte signature) immediately after the compressed data: - } - return true; - } - - function decompress(/*Boolean*/async, /*Function*/callback) { - if (_isDirectory) { - if (async && callback) { - callback(new Buffer(0), Utils.Errors.DIRECTORY_CONTENT_ERROR); //si added error. - } - return new Buffer(0); - } - - var compressedData = getCompressedDataFromZip(); - if (compressedData.length == 0) { - if (async && callback) callback(compressedData, Utils.Errors.NO_DATA);//si added error. - return compressedData; - } - - var data = new Buffer(_entryHeader.size); - data.fill(0); - - switch (_entryHeader.method) { - case Utils.Constants.STORED: - compressedData.copy(data); - if (!crc32OK(data)) { - if (async && callback) callback(data, Utils.Errors.BAD_CRC);//si added error - return Utils.Errors.BAD_CRC; - } else {//si added otherwise did not seem to return data. - if (async && callback) callback(data); - return data; - } - break; - case Utils.Constants.DEFLATED: - var inflater = new Methods.Inflater(compressedData); - if (!async) { - inflater.inflate(data); - if (!crc32OK(data)) { - console.warn(Utils.Errors.BAD_CRC + " " + _entryName.toString()) - } - return data; - } else { - inflater.inflateAsync(function(result) { - result.copy(data, 0); - if (crc32OK(data)) { - if (callback) callback(data, Utils.Errors.BAD_CRC); //si added error - } else { //si added otherwise did not seem to return data. - if (callback) callback(data); - } - }) - } - break; - default: - if (async && callback) callback(new Buffer(0), Utils.Errors.UNKNOWN_METHOD); - return Utils.Errors.UNKNOWN_METHOD; - } - } - - function compress(/*Boolean*/async, /*Function*/callback) { - if ((!uncompressedData || !uncompressedData.length) && Buffer.isBuffer(input)) { - // no data set or the data wasn't changed to require recompression - if (async && callback) callback(getCompressedDataFromZip()); - return getCompressedDataFromZip(); - } - - if (uncompressedData.length && !_isDirectory) { - var compressedData; - // Local file header - switch (_entryHeader.method) { - case Utils.Constants.STORED: - _entryHeader.compressedSize = _entryHeader.size; - - compressedData = new Buffer(uncompressedData.length); - uncompressedData.copy(compressedData); - - if (async && callback) callback(compressedData); - return compressedData; - - break; - default: - case Utils.Constants.DEFLATED: - - var deflater = new Methods.Deflater(uncompressedData); - if (!async) { - var deflated = deflater.deflate(); - _entryHeader.compressedSize = deflated.length; - return deflated; - } else { - deflater.deflateAsync(function(data) { - compressedData = new Buffer(data.length); - _entryHeader.compressedSize = data.length; - data.copy(compressedData); - callback && callback(compressedData); - }) - } - deflater = null; - break; - } - } else { - if (async && callback) { - callback(new Buffer(0)); - } else { - return new Buffer(0); - } - } - } - - return { - get entryName () { return _entryName.toString(); }, - get rawEntryName() { return _entryName; }, - set entryName (val) { - _entryName = Utils.toBuffer(val); - var lastChar = _entryName[_entryName.length - 1]; - _isDirectory = (lastChar == 47) || (lastChar == 92); - _entryHeader.fileNameLength = _entryName.length; - }, - - get extra () { return _extra; }, - set extra (val) { - _extra = val; - _entryHeader.extraLength = val.length; - }, - - get comment () { return _comment.toString(); }, - set comment (val) { - _comment = Utils.toBuffer(val); - _entryHeader.commentLength = _comment.length; - }, - - get name () { var n = _entryName.toString(); return _isDirectory ? n.substr(n.length - 1).split("/").pop() : n.split("/").pop(); }, - get isDirectory () { return _isDirectory }, - - getCompressedData : function() { - return compress(false, null) - }, - - getCompressedDataAsync : function(/*Function*/callback) { - compress(true, callback) - }, - - setData : function(value) { - uncompressedData = Utils.toBuffer(value); - if (!_isDirectory && uncompressedData.length) { - _entryHeader.size = uncompressedData.length; - _entryHeader.method = Utils.Constants.DEFLATED; - _entryHeader.crc = Utils.crc32(value); - } else { // folders and blank files should be stored - _entryHeader.method = Utils.Constants.STORED; - } - }, - - getData : function() { - return decompress(false, null); - }, - - getDataAsync : function(/*Function*/callback) { - decompress(true, callback) - }, - - set header(/*Buffer*/data) { - _entryHeader.loadFromBinary(data); - }, - - get header() { - return _entryHeader; - }, - - packHeader : function() { - var header = _entryHeader.entryHeaderToBinary(); - // add - _entryName.copy(header, Utils.Constants.CENHDR); - if (_entryHeader.extraLength) { - _extra.copy(header, Utils.Constants.CENHDR + _entryName.length) - } - if (_entryHeader.commentLength) { - _comment.copy(header, Utils.Constants.CENHDR + _entryName.length + _entryHeader.extraLength, _comment.length); - } - return header; - }, - - toString : function() { - return '{\n' + - '\t"entryName" : "' + _entryName.toString() + "\",\n" + - '\t"name" : "' + _entryName.toString().split("/").pop() + "\",\n" + - '\t"comment" : "' + _comment.toString() + "\",\n" + - '\t"isDirectory" : ' + _isDirectory + ",\n" + - '\t"header" : ' + _entryHeader.toString().replace(/\t/mg, "\t\t") + ",\n" + - '\t"compressedData" : <' + (input && input.length + " bytes buffer" || "null") + ">\n" + - '\t"data" : <' + (uncompressedData && uncompressedData.length + " bytes buffer" || "null") + ">\n" + - '}'; - } - } -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/zipFile.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/zipFile.js deleted file mode 100644 index f066d7ed..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/adm-zip/zipFile.js +++ /dev/null @@ -1,311 +0,0 @@ -var ZipEntry = require("./zipEntry"), - Headers = require("./headers"), - Utils = require("./util"); - -module.exports = function(/*String|Buffer*/input, /*Number*/inputType) { - var entryList = [], - entryTable = {}, - _comment = new Buffer(0), - filename = "", - fs = require("fs"), - inBuffer = null, - mainHeader = new Headers.MainHeader(); - - if (inputType == Utils.Constants.FILE) { - // is a filename - filename = input; - inBuffer = fs.readFileSync(filename); - readMainHeader(); - } else if (inputType == Utils.Constants.BUFFER) { - // is a memory buffer - inBuffer = input; - readMainHeader(); - } else { - // none. is a new file - } - - function readEntries() { - entryTable = {}; - entryList = new Array(mainHeader.diskEntries); // total number of entries - var index = mainHeader.offset; // offset of first CEN header - for(var i = 0; i < entryList.length; i++) { - - var tmp = index, - entry = new ZipEntry(inBuffer); - entry.header = inBuffer.slice(tmp, tmp += Utils.Constants.CENHDR); - - entry.entryName = inBuffer.slice(tmp, tmp += entry.header.fileNameLength); - - if (entry.header.extraLength) { - entry.extra = inBuffer.slice(tmp, tmp += entry.header.extraLength); - } - - if (entry.header.commentLength) - entry.comment = inBuffer.slice(tmp, tmp + entry.header.commentLength); - - index += entry.header.entryHeaderSize; - - entryList[i] = entry; - entryTable[entry.entryName] = entry; - } - } - - function readMainHeader() { - var i = inBuffer.length - Utils.Constants.ENDHDR, // END header size - n = Math.max(0, i - 0xFFFF), // 0xFFFF is the max zip file comment length - endOffset = 0; // Start offset of the END header - - for (i; i >= n; i--) { - if (inBuffer[i] != 0x50) continue; // quick check that the byte is 'P' - if (inBuffer.readUInt32LE(i) == Utils.Constants.ENDSIG) { // "PK\005\006" - endOffset = i; - break; - } - } - if (!endOffset) - throw Utils.Errors.INVALID_FORMAT; - - mainHeader.loadFromBinary(inBuffer.slice(endOffset, endOffset + Utils.Constants.ENDHDR)); - if (mainHeader.commentLength) { - _comment = inBuffer.slice(endOffset + Utils.Constants.ENDHDR); - } - readEntries(); - } - - return { - /** - * Returns an array of ZipEntry objects existent in the current opened archive - * @return Array - */ - get entries () { - return entryList; - }, - - /** - * Archive comment - * @return {String} - */ - get comment () { return _comment.toString(); }, - set comment(val) { - mainHeader.commentLength = val.length; - _comment = val; - }, - - /** - * Returns a reference to the entry with the given name or null if entry is inexistent - * - * @param entryName - * @return ZipEntry - */ - getEntry : function(/*String*/entryName) { - return entryTable[entryName] || null; - }, - - /** - * Adds the given entry to the entry list - * - * @param entry - */ - setEntry : function(/*ZipEntry*/entry) { - entryList.push(entry); - entryTable[entry.entryName] = entry; - mainHeader.totalEntries = entryList.length; - }, - - /** - * Removes the entry with the given name from the entry list. - * - * If the entry is a directory, then all nested files and directories will be removed - * @param entryName - */ - deleteEntry : function(/*String*/entryName) { - var entry = entryTable[entryName]; - if (entry && entry.isDirectory) { - var _self = this; - this.getEntryChildren(entry).forEach(function(child) { - if (child.entryName != entryName) { - _self.deleteEntry(child.entryName) - } - }) - } - entryList.splice(entryList.indexOf(entry), 1); - delete(entryTable[entryName]); - mainHeader.totalEntries = entryList.length; - }, - - /** - * Iterates and returns all nested files and directories of the given entry - * - * @param entry - * @return Array - */ - getEntryChildren : function(/*ZipEntry*/entry) { - if (entry.isDirectory) { - var list = [], - name = entry.entryName, - len = name.length; - - entryList.forEach(function(zipEntry) { - if (zipEntry.entryName.substr(0, len) == name) { - list.push(zipEntry); - } - }); - return list; - } - return [] - }, - - /** - * Returns the zip file - * - * @return Buffer - */ - compressToBuffer : function() { - if (entryList.length > 1) { - entryList.sort(function(a, b) { - var nameA = a.entryName.toLowerCase(); - var nameB = b.entryName.toLowerCase(); - if (nameA < nameB) {return -1} - if (nameA > nameB) {return 1} - return 0; - }); - } - - var totalSize = 0, - dataBlock = [], - entryHeaders = [], - dindex = 0; - - mainHeader.size = 0; - mainHeader.offset = 0; - - entryList.forEach(function(entry) { - entry.header.offset = dindex; - - // compress data and set local and entry header accordingly. Reason why is called first - var compressedData = entry.getCompressedData(); - // data header - var dataHeader = entry.header.dataHeaderToBinary(); - var postHeader = new Buffer(entry.entryName + entry.extra.toString()); - var dataLength = dataHeader.length + postHeader.length + compressedData.length; - - dindex += dataLength; - - dataBlock.push(dataHeader); - dataBlock.push(postHeader); - dataBlock.push(compressedData); - - var entryHeader = entry.packHeader(); - entryHeaders.push(entryHeader); - mainHeader.size += entryHeader.length; - totalSize += (dataLength + entryHeader.length); - }); - - totalSize += mainHeader.mainHeaderSize; // also includes zip file comment length - // point to end of data and begining of central directory first record - mainHeader.offset = dindex; - - dindex = 0; - var outBuffer = new Buffer(totalSize); - dataBlock.forEach(function(content) { - content.copy(outBuffer, dindex); // write data blocks - dindex += content.length; - }); - entryHeaders.forEach(function(content) { - content.copy(outBuffer, dindex); // write central directory entries - dindex += content.length; - }); - - var mh = mainHeader.toBinary(); - if (_comment) { - _comment.copy(mh, Utils.Constants.ENDHDR); // add zip file comment - } - - mh.copy(outBuffer, dindex); // write main header - - return outBuffer - }, - - toAsyncBuffer : function(/*Function*/onSuccess,/*Function*/onFail,/*Function*/onItemStart,/*Function*/onItemEnd) { - if (entryList.length > 1) { - entryList.sort(function(a, b) { - var nameA = a.entryName.toLowerCase(); - var nameB = b.entryName.toLowerCase(); - if (nameA > nameB) {return -1} - if (nameA < nameB) {return 1} - return 0; - }); - } - - var totalSize = 0, - dataBlock = [], - entryHeaders = [], - dindex = 0; - - mainHeader.size = 0; - mainHeader.offset = 0; - - var compress=function(entryList){ - var self=arguments.callee; - var entry; - if(entryList.length){ - var entry=entryList.pop(); - var name=entry.entryName + entry.extra.toString(); - if(onItemStart)onItemStart(name); - entry.getCompressedDataAsync(function(compressedData){ - if(onItemEnd)onItemEnd(name); - - entry.header.offset = dindex; - // data header - var dataHeader = entry.header.dataHeaderToBinary(); - var postHeader = new Buffer(name); - var dataLength = dataHeader.length + postHeader.length + compressedData.length; - - dindex += dataLength; - - dataBlock.push(dataHeader); - dataBlock.push(postHeader); - dataBlock.push(compressedData); - - var entryHeader = entry.packHeader(); - entryHeaders.push(entryHeader); - mainHeader.size += entryHeader.length; - totalSize += (dataLength + entryHeader.length); - - if(entryList.length){ - self(entryList); - }else{ - - - totalSize += mainHeader.mainHeaderSize; // also includes zip file comment length - // point to end of data and begining of central directory first record - mainHeader.offset = dindex; - - dindex = 0; - var outBuffer = new Buffer(totalSize); - dataBlock.forEach(function(content) { - content.copy(outBuffer, dindex); // write data blocks - dindex += content.length; - }); - entryHeaders.forEach(function(content) { - content.copy(outBuffer, dindex); // write central directory entries - dindex += content.length; - }); - - var mh = mainHeader.toBinary(); - if (_comment) { - _comment.copy(mh, Utils.Constants.ENDHDR); // add zip file comment - } - - mh.copy(outBuffer, dindex); // write main header - - onSuccess(outBuffer); - } - }); - } - }; - - compress(entryList); - } - } -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/.npmignore deleted file mode 100644 index 13abef4f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -node_modules/* -npm_debug.log diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/LICENSE deleted file mode 100644 index 6d03581f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2012 'Dominic Tarr' - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/README.md deleted file mode 100644 index 565e0e26..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# stream-combiner - -<img src=https://secure.travis-ci.org/dominictarr/stream-combiner.png?branch=master> - -## Combine (stream1,...,streamN) - -Turn a pipeline into a single stream. `pipeline` returns a stream that writes to the first stream -and reads from the last stream. - -Listening for 'error' will recieve errors from all streams inside the pipe. - -``` js - var Combine = require('stream-combiner') - var es = require('event-stream') - - Combine( //connect streams together with `pipe` - process.openStdin(), //open stdin - es.split(), //split stream to break on newlines - es.map(function (data, callback) {//turn this async function into a stream - callback(null - , inspect(JSON.parse(data))) //render it nicely - }), - process.stdout // pipe it to stdout ! - ) -``` - -## License - -MIT diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/index.js deleted file mode 100644 index 99cf5b61..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/index.js +++ /dev/null @@ -1,39 +0,0 @@ -var duplexer = require('duplexer') - -module.exports = function () { - - var streams = [].slice.call(arguments) - , first = streams[0] - , last = streams[streams.length - 1] - , thepipe = duplexer(first, last) - - if(streams.length == 1) - return streams[0] - else if (!streams.length) - throw new Error('connect called with empty args') - - //pipe all the streams together - - function recurse (streams) { - if(streams.length < 2) - return - streams[0].pipe(streams[1]) - recurse(streams.slice(1)) - } - - recurse(streams) - - function onerror () { - var args = [].slice.call(arguments) - args.unshift('error') - thepipe.emit.apply(thepipe, args) - } - - //es.duplex already reemits the error from the first and last stream. - //add a listener for the inner streams in the pipeline. - for(var i = 1; i < streams.length - 1; i ++) - streams[i].on('error', onerror) - - return thepipe -} - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/.npmignore deleted file mode 100644 index 062c11e8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -*.log -*.err \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/.travis.yml deleted file mode 100644 index ed05f88d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.11" - - "0.10" - - "0.8" - - "0.6" diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/LICENCE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/LICENCE deleted file mode 100644 index a23e08a8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 Raynos. - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/README.md deleted file mode 100644 index 61ff71aa..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# duplexer - -[![build status][1]][2] [![dependency status][3]][4] - -[![browser support][5]][6] - -Creates a duplex stream - -Taken from [event-stream][7] - -## duplex (writeStream, readStream) - -Takes a writable stream and a readable stream and makes them appear as a readable writable stream. - -It is assumed that the two streams are connected to each other in some way. - -## Example - -```js -var grep = cp.exec('grep Stream') - -duplex(grep.stdin, grep.stdout) -``` - -## Installation - -`npm install duplexer` - -## Tests - -`npm test` - -## Contributors - - - Dominictarr - - Raynos - - samccone - -## MIT Licenced - - [1]: https://secure.travis-ci.org/Raynos/duplexer.png - [2]: https://travis-ci.org/Raynos/duplexer - [3]: https://david-dm.org/Raynos/duplexer.png - [4]: https://david-dm.org/Raynos/duplexer - [5]: https://ci.testling.com/Raynos/duplexer.png - [6]: https://ci.testling.com/Raynos/duplexer - [7]: https://github.com/dominictarr/event-stream#duplex-writestream-readstream diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/index.js deleted file mode 100644 index a188a210..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/index.js +++ /dev/null @@ -1,87 +0,0 @@ -var Stream = require("stream") -var writeMethods = ["write", "end", "destroy"] -var readMethods = ["resume", "pause"] -var readEvents = ["data", "close"] -var slice = Array.prototype.slice - -module.exports = duplex - -function forEach (arr, fn) { - if (arr.forEach) { - return arr.forEach(fn) - } - - for (var i = 0; i < arr.length; i++) { - fn(arr[i], i) - } -} - -function duplex(writer, reader) { - var stream = new Stream() - var ended = false - - forEach(writeMethods, proxyWriter) - - forEach(readMethods, proxyReader) - - forEach(readEvents, proxyStream) - - reader.on("end", handleEnd) - - writer.on("drain", function() { - stream.emit("drain") - }) - - writer.on("error", reemit) - reader.on("error", reemit) - - stream.writable = writer.writable - stream.readable = reader.readable - - return stream - - function proxyWriter(methodName) { - stream[methodName] = method - - function method() { - return writer[methodName].apply(writer, arguments) - } - } - - function proxyReader(methodName) { - stream[methodName] = method - - function method() { - stream.emit(methodName) - var func = reader[methodName] - if (func) { - return func.apply(reader, arguments) - } - reader.emit(methodName) - } - } - - function proxyStream(methodName) { - reader.on(methodName, reemit) - - function reemit() { - var args = slice.call(arguments) - args.unshift(methodName) - stream.emit.apply(stream, args) - } - } - - function handleEnd() { - if (ended) { - return - } - ended = true - var args = slice.call(arguments) - args.unshift("end") - stream.emit.apply(stream, args) - } - - function reemit(err) { - stream.emit("error", err) - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/package.json deleted file mode 100644 index d78e4d07..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "duplexer", - "version": "0.1.1", - "description": "Creates a duplex stream", - "keywords": [], - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Raynos/duplexer.git" - }, - "main": "index", - "homepage": "https://github.com/Raynos/duplexer", - "contributors": [ - { - "name": "Jake Verbaten" - } - ], - "bugs": { - "url": "https://github.com/Raynos/duplexer/issues", - "email": "raynos2@gmail.com" - }, - "devDependencies": { - "tape": "0.3.3", - "through": "~0.1.4" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/Raynos/duplexer/raw/master/LICENSE" - } - ], - "scripts": { - "test": "node test" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "ie/8..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "readme": "# duplexer\n\n[![build status][1]][2] [![dependency status][3]][4]\n\n[![browser support][5]][6]\n\nCreates a duplex stream\n\nTaken from [event-stream][7]\n\n## duplex (writeStream, readStream)\n\nTakes a writable stream and a readable stream and makes them appear as a readable writable stream.\n\nIt is assumed that the two streams are connected to each other in some way.\n\n## Example\n\n```js\nvar grep = cp.exec('grep Stream')\n\nduplex(grep.stdin, grep.stdout)\n```\n\n## Installation\n\n`npm install duplexer`\n\n## Tests\n\n`npm test`\n\n## Contributors\n\n - Dominictarr\n - Raynos\n - samccone\n\n## MIT Licenced\n\n [1]: https://secure.travis-ci.org/Raynos/duplexer.png\n [2]: https://travis-ci.org/Raynos/duplexer\n [3]: https://david-dm.org/Raynos/duplexer.png\n [4]: https://david-dm.org/Raynos/duplexer\n [5]: https://ci.testling.com/Raynos/duplexer.png\n [6]: https://ci.testling.com/Raynos/duplexer\n [7]: https://github.com/dominictarr/event-stream#duplex-writestream-readstream\n", - "readmeFilename": "README.md", - "_id": "duplexer@0.1.1", - "dist": { - "shasum": "7fb4a6591c344b842e6f6764796a996ff912e7f4" - }, - "_from": "duplexer@~0.1.1", - "_resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/test/index.js deleted file mode 100644 index 4988e0d9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/node_modules/duplexer/test/index.js +++ /dev/null @@ -1,31 +0,0 @@ -var through = require("through") -var test = require("tape") - -var duplex = require("../index") - -var readable = through() -var writable = through(write) -var written = 0 -var data = 0 - -var stream = duplex(writable, readable) - -function write() { - written++ -} - -stream.on("data", ondata) - -function ondata() { - data++ -} - -test("emit and write", function(t) { - t.plan(2) - - stream.write() - readable.emit("data") - - t.equal(written, 1, "should have written once") - t.equal(data, 1, "should have recived once") -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/package.json deleted file mode 100644 index 3a25f682..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "stream-combiner", - "version": "0.0.4", - "homepage": "https://github.com/dominictarr/stream-combiner", - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/stream-combiner.git" - }, - "dependencies": { - "duplexer": "~0.1.1" - }, - "devDependencies": { - "tape": "~2.3.0", - "event-stream": "~3.0.7" - }, - "scripts": { - "test": "set -e; for t in test/*.js; do node $t; done" - }, - "author": { - "name": "'Dominic Tarr'", - "email": "dominic.tarr@gmail.com", - "url": "http://dominictarr.com" - }, - "license": "MIT", - "readme": "# stream-combiner\n\n<img src=https://secure.travis-ci.org/dominictarr/stream-combiner.png?branch=master>\n\n## Combine (stream1,...,streamN)\n\nTurn a pipeline into a single stream. `pipeline` returns a stream that writes to the first stream\nand reads from the last stream. \n\nListening for 'error' will recieve errors from all streams inside the pipe.\n\n``` js\n var Combine = require('stream-combiner')\n var es = require('event-stream')\n\n Combine( //connect streams together with `pipe`\n process.openStdin(), //open stdin\n es.split(), //split stream to break on newlines\n es.map(function (data, callback) {//turn this async function into a stream\n callback(null\n , inspect(JSON.parse(data))) //render it nicely\n }),\n process.stdout // pipe it to stdout !\n )\n```\n\n## License\n\nMIT\n", - "readmeFilename": "README.md", - "description": "<img src=https://secure.travis-ci.org/dominictarr/stream-combiner.png?branch=master>", - "bugs": { - "url": "https://github.com/dominictarr/stream-combiner/issues" - }, - "_id": "stream-combiner@0.0.4", - "dist": { - "shasum": "0d1c68aea72345d3619884ed3eb44e8a4e583129" - }, - "_from": "stream-combiner@~0.0.2", - "_resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/test/index.js deleted file mode 100644 index d17ddada..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/stream-combiner/test/index.js +++ /dev/null @@ -1,52 +0,0 @@ -var es = require('event-stream') -var combine = require('..') -var test = require('tape') - -test('do not duplicate errors', function (test) { - - var errors = 0; - var pipe = combine( - es.through(function(data) { - return this.emit('data', data); - }), - es.through(function(data) { - return this.emit('error', new Error(data)); - }) - ) - - pipe.on('error', function(err) { - errors++ - test.ok(errors, 'expected error count') - process.nextTick(function () { - return test.end(); - }) - }) - - return pipe.write('meh'); -}) - -test('3 pipe do not duplicate errors', function (test) { - - var errors = 0; - var pipe = combine( - es.through(function(data) { - return this.emit('data', data); - }), - es.through(function(data) { - return this.emit('error', new Error(data)); - }), - es.through() - ) - - pipe.on('error', function(err) { - errors++ - test.ok(errors, 'expected error count') - process.nextTick(function () { - return test.end(); - }) - }) - - return pipe.write('meh'); - -}) - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/.npmignore deleted file mode 100644 index c167ad5b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -.*.swp -node_modules -examples/extract/ -test/tmp/ -test/fixtures/ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/.travis.yml deleted file mode 100644 index 2d26206d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - 0.6 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/LICENCE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/LICENCE deleted file mode 100644 index 74489e2e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/LICENCE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) Isaac Z. Schlueter -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/README.md deleted file mode 100644 index 5bcc82cd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# node-tar - -Tar for Node.js. - -[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/) - -## API - -See `examples/` for usage examples. - -### var tar = require('tar') - -Returns an object with `.Pack`, `.Extract` and `.Parse` methods. - -### tar.Pack([properties]) - -Returns a through stream. Use -[fstream](https://npmjs.org/package/fstream) to write files into the -pack stream and you will receive tar archive data from the pack -stream. - -The optional `properties` object are used to set properties in the tar -'Global Extended Header'. - -### tar.Extract([options]) - -Returns a through stream. Write tar data to the stream and the files -in the tarball will be extracted onto the filesystem. - -`options` can be: - -```js -{ - path: '/path/to/extract/tar/into', - strip: 0, // how many path segments to strip from the root when extracting -} -``` - -`options` also get passed to the `fstream.Writer` instance that `tar` -uses internally. - -### tar.Parse() - -Returns a writable stream. Write tar data to it and it will emit -`entry` events for each entry parsed from the tarball. This is used by -`tar.Extract`. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/examples/extracter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/examples/extracter.js deleted file mode 100644 index e150abf2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/examples/extracter.js +++ /dev/null @@ -1,11 +0,0 @@ -var tar = require("../tar.js") - , fs = require("fs") - -fs.createReadStream(__dirname + "/../test/fixtures/c.tar") - .pipe(tar.Extract({ path: __dirname + "/extract" })) - .on("error", function (er) { - console.error("error here") - }) - .on("end", function () { - console.error("done") - }) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/examples/reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/examples/reader.js deleted file mode 100644 index 39f3f088..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/examples/reader.js +++ /dev/null @@ -1,36 +0,0 @@ -var tar = require("../tar.js") - , fs = require("fs") - -fs.createReadStream(__dirname + "/../test/fixtures/c.tar") - .pipe(tar.Parse()) - .on("extendedHeader", function (e) { - console.error("extended pax header", e.props) - e.on("end", function () { - console.error("extended pax fields:", e.fields) - }) - }) - .on("ignoredEntry", function (e) { - console.error("ignoredEntry?!?", e.props) - }) - .on("longLinkpath", function (e) { - console.error("longLinkpath entry", e.props) - e.on("end", function () { - console.error("value=%j", e.body.toString()) - }) - }) - .on("longPath", function (e) { - console.error("longPath entry", e.props) - e.on("end", function () { - console.error("value=%j", e.body.toString()) - }) - }) - .on("entry", function (e) { - console.error("entry", e.props) - e.on("data", function (c) { - console.error(" >>>" + c.toString().replace(/\n/g, "\\n")) - }) - e.on("end", function () { - console.error(" <<<EOF") - }) - }) - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/buffer-entry.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/buffer-entry.js deleted file mode 100644 index 6c1da237..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/buffer-entry.js +++ /dev/null @@ -1,30 +0,0 @@ -// just like the Entry class, but it buffers the contents -// -// XXX It would be good to set a maximum BufferEntry filesize, -// since it eats up memory. In normal operation, -// these are only for long filenames or link names, which are -// rarely very big. - -module.exports = BufferEntry - -var inherits = require("inherits") - , Entry = require("./entry.js") - -function BufferEntry () { - Entry.apply(this, arguments) - this._buffer = new Buffer(this.props.size) - this._offset = 0 - this.body = "" - this.on("end", function () { - this.body = this._buffer.toString().slice(0, -1) - }) -} - -inherits(BufferEntry, Entry) - -// collect the bytes as they come in. -BufferEntry.prototype.write = function (c) { - c.copy(this._buffer, this._offset) - this._offset += c.length - Entry.prototype.write.call(this, c) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/entry-writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/entry-writer.js deleted file mode 100644 index 8e09042d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/entry-writer.js +++ /dev/null @@ -1,169 +0,0 @@ -module.exports = EntryWriter - -var tar = require("../tar.js") - , TarHeader = require("./header.js") - , Entry = require("./entry.js") - , inherits = require("inherits") - , BlockStream = require("block-stream") - , ExtendedHeaderWriter - , Stream = require("stream").Stream - , EOF = {} - -inherits(EntryWriter, Stream) - -function EntryWriter (props) { - var me = this - - if (!(me instanceof EntryWriter)) { - return new EntryWriter(props) - } - - Stream.apply(this) - - me.writable = true - me.readable = true - - me._stream = new BlockStream(512) - - me._stream.on("data", function (c) { - me.emit("data", c) - }) - - me._stream.on("drain", function () { - me.emit("drain") - }) - - me._stream.on("end", function () { - me.emit("end") - me.emit("close") - }) - - me.props = props - if (props.type === "Directory") { - props.size = 0 - } - props.ustar = "ustar\0" - props.ustarver = "00" - me.path = props.path - - me._buffer = [] - me._didHeader = false - me._meta = false - - me.on("pipe", function () { - me._process() - }) -} - -EntryWriter.prototype.write = function (c) { - // console.error(".. ew write") - if (this._ended) return this.emit("error", new Error("write after end")) - this._buffer.push(c) - this._process() - this._needDrain = this._buffer.length > 0 - return !this._needDrain -} - -EntryWriter.prototype.end = function (c) { - // console.error(".. ew end") - if (c) this._buffer.push(c) - this._buffer.push(EOF) - this._ended = true - this._process() - this._needDrain = this._buffer.length > 0 -} - -EntryWriter.prototype.pause = function () { - // console.error(".. ew pause") - this._paused = true - this.emit("pause") -} - -EntryWriter.prototype.resume = function () { - // console.error(".. ew resume") - this._paused = false - this.emit("resume") - this._process() -} - -EntryWriter.prototype.add = function (entry) { - // console.error(".. ew add") - if (!this.parent) return this.emit("error", new Error("no parent")) - - // make sure that the _header and such is emitted, and clear out - // the _currentEntry link on the parent. - if (!this._ended) this.end() - - return this.parent.add(entry) -} - -EntryWriter.prototype._header = function () { - // console.error(".. ew header") - if (this._didHeader) return - this._didHeader = true - - var headerBlock = TarHeader.encode(this.props) - - if (this.props.needExtended && !this._meta) { - var me = this - - ExtendedHeaderWriter = ExtendedHeaderWriter || - require("./extended-header-writer.js") - - ExtendedHeaderWriter(this.props) - .on("data", function (c) { - me.emit("data", c) - }) - .on("error", function (er) { - me.emit("error", er) - }) - .end() - } - - // console.error(".. .. ew headerBlock emitting") - this.emit("data", headerBlock) - this.emit("header") -} - -EntryWriter.prototype._process = function () { - // console.error(".. .. ew process") - if (!this._didHeader && !this._meta) { - this._header() - } - - if (this._paused || this._processing) { - // console.error(".. .. .. paused=%j, processing=%j", this._paused, this._processing) - return - } - - this._processing = true - - var buf = this._buffer - for (var i = 0; i < buf.length; i ++) { - // console.error(".. .. .. i=%d", i) - - var c = buf[i] - - if (c === EOF) this._stream.end() - else this._stream.write(c) - - if (this._paused) { - // console.error(".. .. .. paused mid-emission") - this._processing = false - if (i < buf.length) { - this._needDrain = true - this._buffer = buf.slice(i + 1) - } - return - } - } - - // console.error(".. .. .. emitted") - this._buffer.length = 0 - this._processing = false - - // console.error(".. .. .. emitting drain") - this.emit("drain") -} - -EntryWriter.prototype.destroy = function () {} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/entry.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/entry.js deleted file mode 100644 index 4af5c410..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/entry.js +++ /dev/null @@ -1,213 +0,0 @@ -// A passthrough read/write stream that sets its properties -// based on a header, extendedHeader, and globalHeader -// -// Can be either a file system object of some sort, or -// a pax/ustar metadata entry. - -module.exports = Entry - -var TarHeader = require("./header.js") - , tar = require("../tar") - , assert = require("assert").ok - , Stream = require("stream").Stream - , inherits = require("inherits") - , fstream = require("fstream").Abstract - -function Entry (header, extended, global) { - Stream.call(this) - this.readable = true - this.writable = true - - this._needDrain = false - this._paused = false - this._reading = false - this._ending = false - this._ended = false - this._remaining = 0 - this._queue = [] - this._index = 0 - this._queueLen = 0 - - this._read = this._read.bind(this) - - this.props = {} - this._header = header - this._extended = extended || {} - - // globals can change throughout the course of - // a file parse operation. Freeze it at its current state. - this._global = {} - var me = this - Object.keys(global || {}).forEach(function (g) { - me._global[g] = global[g] - }) - - this._setProps() -} - -inherits(Entry, Stream) - -Entry.prototype.write = function (c) { - if (this._ending) this.error("write() after end()", null, true) - if (this._remaining === 0) { - this.error("invalid bytes past eof") - } - - // often we'll get a bunch of \0 at the end of the last write, - // since chunks will always be 512 bytes when reading a tarball. - if (c.length > this._remaining) { - c = c.slice(0, this._remaining) - } - this._remaining -= c.length - - // put it on the stack. - var ql = this._queueLen - this._queue.push(c) - this._queueLen ++ - - this._read() - - // either paused, or buffered - if (this._paused || ql > 0) { - this._needDrain = true - return false - } - - return true -} - -Entry.prototype.end = function (c) { - if (c) this.write(c) - this._ending = true - this._read() -} - -Entry.prototype.pause = function () { - this._paused = true - this.emit("pause") -} - -Entry.prototype.resume = function () { - // console.error(" Tar Entry resume", this.path) - this.emit("resume") - this._paused = false - this._read() - return this._queueLen - this._index > 1 -} - - // This is bound to the instance -Entry.prototype._read = function () { - // console.error(" Tar Entry _read", this.path) - - if (this._paused || this._reading || this._ended) return - - // set this flag so that event handlers don't inadvertently - // get multiple _read() calls running. - this._reading = true - - // have any data to emit? - while (this._index < this._queueLen && !this._paused) { - var chunk = this._queue[this._index ++] - this.emit("data", chunk) - } - - // check if we're drained - if (this._index >= this._queueLen) { - this._queue.length = this._queueLen = this._index = 0 - if (this._needDrain) { - this._needDrain = false - this.emit("drain") - } - if (this._ending) { - this._ended = true - this.emit("end") - } - } - - // if the queue gets too big, then pluck off whatever we can. - // this should be fairly rare. - var mql = this._maxQueueLen - if (this._queueLen > mql && this._index > 0) { - mql = Math.min(this._index, mql) - this._index -= mql - this._queueLen -= mql - this._queue = this._queue.slice(mql) - } - - this._reading = false -} - -Entry.prototype._setProps = function () { - // props = extended->global->header->{} - var header = this._header - , extended = this._extended - , global = this._global - , props = this.props - - // first get the values from the normal header. - var fields = tar.fields - for (var f = 0; fields[f] !== null; f ++) { - var field = fields[f] - , val = header[field] - if (typeof val !== "undefined") props[field] = val - } - - // next, the global header for this file. - // numeric values, etc, will have already been parsed. - ;[global, extended].forEach(function (p) { - Object.keys(p).forEach(function (f) { - if (typeof p[f] !== "undefined") props[f] = p[f] - }) - }) - - // no nulls allowed in path or linkpath - ;["path", "linkpath"].forEach(function (p) { - if (props.hasOwnProperty(p)) { - props[p] = props[p].split("\0")[0] - } - }) - - - // set date fields to be a proper date - ;["mtime", "ctime", "atime"].forEach(function (p) { - if (props.hasOwnProperty(p)) { - props[p] = new Date(props[p] * 1000) - } - }) - - // set the type so that we know what kind of file to create - var type - switch (tar.types[props.type]) { - case "OldFile": - case "ContiguousFile": - type = "File" - break - - case "GNUDumpDir": - type = "Directory" - break - - case undefined: - type = "Unknown" - break - - case "Link": - case "SymbolicLink": - case "CharacterDevice": - case "BlockDevice": - case "Directory": - case "FIFO": - default: - type = tar.types[props.type] - } - - this.type = type - this.path = props.path - this.size = props.size - - // size is special, since it signals when the file needs to end. - this._remaining = props.size -} - -Entry.prototype.warn = fstream.warn -Entry.prototype.error = fstream.error diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extended-header-writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extended-header-writer.js deleted file mode 100644 index 1728c458..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extended-header-writer.js +++ /dev/null @@ -1,191 +0,0 @@ - -module.exports = ExtendedHeaderWriter - -var inherits = require("inherits") - , EntryWriter = require("./entry-writer.js") - -inherits(ExtendedHeaderWriter, EntryWriter) - -var tar = require("../tar.js") - , path = require("path") - , TarHeader = require("./header.js") - -// props is the props of the thing we need to write an -// extended header for. -// Don't be shy with it. Just encode everything. -function ExtendedHeaderWriter (props) { - // console.error(">> ehw ctor") - var me = this - - if (!(me instanceof ExtendedHeaderWriter)) { - return new ExtendedHeaderWriter(props) - } - - me.fields = props - - var p = - { path : ("PaxHeader" + path.join("/", props.path || "")) - .replace(/\\/g, "/").substr(0, 100) - , mode : props.mode || 0666 - , uid : props.uid || 0 - , gid : props.gid || 0 - , size : 0 // will be set later - , mtime : props.mtime || Date.now() / 1000 - , type : "x" - , linkpath : "" - , ustar : "ustar\0" - , ustarver : "00" - , uname : props.uname || "" - , gname : props.gname || "" - , devmaj : props.devmaj || 0 - , devmin : props.devmin || 0 - } - - - EntryWriter.call(me, p) - // console.error(">> ehw props", me.props) - me.props = p - - me._meta = true -} - -ExtendedHeaderWriter.prototype.end = function () { - // console.error(">> ehw end") - var me = this - - if (me._ended) return - me._ended = true - - me._encodeFields() - - if (me.props.size === 0) { - // nothing to write! - me._ready = true - me._stream.end() - return - } - - me._stream.write(TarHeader.encode(me.props)) - me.body.forEach(function (l) { - me._stream.write(l) - }) - me._ready = true - - // console.error(">> ehw _process calling end()", me.props) - this._stream.end() -} - -ExtendedHeaderWriter.prototype._encodeFields = function () { - // console.error(">> ehw _encodeFields") - this.body = [] - if (this.fields.prefix) { - this.fields.path = this.fields.prefix + "/" + this.fields.path - this.fields.prefix = "" - } - encodeFields(this.fields, "", this.body, this.fields.noProprietary) - var me = this - this.body.forEach(function (l) { - me.props.size += l.length - }) -} - -function encodeFields (fields, prefix, body, nop) { - // console.error(">> >> ehw encodeFields") - // "%d %s=%s\n", <length>, <keyword>, <value> - // The length is a decimal number, and includes itself and the \n - // Numeric values are decimal strings. - - Object.keys(fields).forEach(function (k) { - var val = fields[k] - , numeric = tar.numeric[k] - - if (prefix) k = prefix + "." + k - - // already including NODETAR.type, don't need File=true also - if (k === fields.type && val === true) return - - switch (k) { - // don't include anything that's always handled just fine - // in the normal header, or only meaningful in the context - // of nodetar - case "mode": - case "cksum": - case "ustar": - case "ustarver": - case "prefix": - case "basename": - case "dirname": - case "needExtended": - case "block": - case "filter": - return - - case "rdev": - if (val === 0) return - break - - case "nlink": - case "dev": // Truly a hero among men, Creator of Star! - case "ino": // Speak his name with reverent awe! It is: - k = "SCHILY." + k - break - - default: break - } - - if (val && typeof val === "object" && - !Buffer.isBuffer(val)) encodeFields(val, k, body, nop) - else if (val === null || val === undefined) return - else body.push.apply(body, encodeField(k, val, nop)) - }) - - return body -} - -function encodeField (k, v, nop) { - // lowercase keys must be valid, otherwise prefix with - // "NODETAR." - if (k.charAt(0) === k.charAt(0).toLowerCase()) { - var m = k.split(".")[0] - if (!tar.knownExtended[m]) k = "NODETAR." + k - } - - // no proprietary - if (nop && k.charAt(0) !== k.charAt(0).toLowerCase()) { - return [] - } - - if (typeof val === "number") val = val.toString(10) - - var s = new Buffer(" " + k + "=" + v + "\n") - , digits = Math.floor(Math.log(s.length) / Math.log(10)) + 1 - - // console.error("1 s=%j digits=%j s.length=%d", s.toString(), digits, s.length) - - // if adding that many digits will make it go over that length, - // then add one to it. For example, if the string is: - // " foo=bar\n" - // then that's 9 characters. With the "9", that bumps the length - // up to 10. However, this is invalid: - // "10 foo=bar\n" - // but, since that's actually 11 characters, since 10 adds another - // character to the length, and the length includes the number - // itself. In that case, just bump it up again. - if (s.length + digits >= Math.pow(10, digits)) digits += 1 - // console.error("2 s=%j digits=%j s.length=%d", s.toString(), digits, s.length) - - var len = digits + s.length - // console.error("3 s=%j digits=%j s.length=%d len=%d", s.toString(), digits, s.length, len) - var lenBuf = new Buffer("" + len) - if (lenBuf.length + s.length !== len) { - throw new Error("Bad length calculation\n"+ - "len="+len+"\n"+ - "lenBuf="+JSON.stringify(lenBuf.toString())+"\n"+ - "lenBuf.length="+lenBuf.length+"\n"+ - "digits="+digits+"\n"+ - "s="+JSON.stringify(s.toString())+"\n"+ - "s.length="+s.length) - } - - return [lenBuf, s] -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extended-header.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extended-header.js deleted file mode 100644 index 74f432ce..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extended-header.js +++ /dev/null @@ -1,140 +0,0 @@ -// An Entry consisting of: -// -// "%d %s=%s\n", <length>, <keyword>, <value> -// -// The length is a decimal number, and includes itself and the \n -// \0 does not terminate anything. Only the length terminates the string. -// Numeric values are decimal strings. - -module.exports = ExtendedHeader - -var Entry = require("./entry.js") - , inherits = require("inherits") - , tar = require("../tar.js") - , numeric = tar.numeric - , keyTrans = { "SCHILY.dev": "dev" - , "SCHILY.ino": "ino" - , "SCHILY.nlink": "nlink" } - -function ExtendedHeader () { - Entry.apply(this, arguments) - this.on("data", this._parse) - this.fields = {} - this._position = 0 - this._fieldPos = 0 - this._state = SIZE - this._sizeBuf = [] - this._keyBuf = [] - this._valBuf = [] - this._size = -1 - this._key = "" -} - -inherits(ExtendedHeader, Entry) -ExtendedHeader.prototype._parse = parse - -var s = 0 - , states = ExtendedHeader.states = {} - , SIZE = states.SIZE = s++ - , KEY = states.KEY = s++ - , VAL = states.VAL = s++ - , ERR = states.ERR = s++ - -Object.keys(states).forEach(function (s) { - states[states[s]] = states[s] -}) - -states[s] = null - -// char code values for comparison -var _0 = "0".charCodeAt(0) - , _9 = "9".charCodeAt(0) - , point = ".".charCodeAt(0) - , a = "a".charCodeAt(0) - , Z = "Z".charCodeAt(0) - , a = "a".charCodeAt(0) - , z = "z".charCodeAt(0) - , space = " ".charCodeAt(0) - , eq = "=".charCodeAt(0) - , cr = "\n".charCodeAt(0) - -function parse (c) { - if (this._state === ERR) return - - for ( var i = 0, l = c.length - ; i < l - ; this._position++, this._fieldPos++, i++) { - // console.error("top of loop, size="+this._size) - - var b = c[i] - - if (this._size >= 0 && this._fieldPos > this._size) { - error(this, "field exceeds length="+this._size) - return - } - - switch (this._state) { - case ERR: return - - case SIZE: - // console.error("parsing size, b=%d, rest=%j", b, c.slice(i).toString()) - if (b === space) { - this._state = KEY - // this._fieldPos = this._sizeBuf.length - this._size = parseInt(new Buffer(this._sizeBuf).toString(), 10) - this._sizeBuf.length = 0 - continue - } - if (b < _0 || b > _9) { - error(this, "expected [" + _0 + ".." + _9 + "], got " + b) - return - } - this._sizeBuf.push(b) - continue - - case KEY: - // can be any char except =, not > size. - if (b === eq) { - this._state = VAL - this._key = new Buffer(this._keyBuf).toString() - if (keyTrans[this._key]) this._key = keyTrans[this._key] - this._keyBuf.length = 0 - continue - } - this._keyBuf.push(b) - continue - - case VAL: - // field must end with cr - if (this._fieldPos === this._size - 1) { - // console.error("finished with "+this._key) - if (b !== cr) { - error(this, "expected \\n at end of field") - return - } - var val = new Buffer(this._valBuf).toString() - if (numeric[this._key]) { - val = parseFloat(val) - } - this.fields[this._key] = val - - this._valBuf.length = 0 - this._state = SIZE - this._size = -1 - this._fieldPos = -1 - continue - } - this._valBuf.push(b) - continue - } - } -} - -function error (me, msg) { - msg = "invalid header: " + msg - + "\nposition=" + me._position - + "\nfield position=" + me._fieldPos - - me.error(msg) - me.state = ERR -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extract.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extract.js deleted file mode 100644 index c34a81e2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/extract.js +++ /dev/null @@ -1,78 +0,0 @@ -// give it a tarball and a path, and it'll dump the contents - -module.exports = Extract - -var tar = require("../tar.js") - , fstream = require("fstream") - , inherits = require("inherits") - , path = require("path") - -function Extract (opts) { - if (!(this instanceof Extract)) return new Extract(opts) - tar.Parse.apply(this) - - // have to dump into a directory - opts.type = "Directory" - opts.Directory = true - - if (typeof opts !== "object") { - opts = { path: opts } - } - - // better to drop in cwd? seems more standard. - opts.path = opts.path || path.resolve("node-tar-extract") - opts.type = "Directory" - opts.Directory = true - - // similar to --strip or --strip-components - opts.strip = +opts.strip - if (!opts.strip || opts.strip <= 0) opts.strip = 0 - - this._fst = fstream.Writer(opts) - - this.pause() - var me = this - - // Hardlinks in tarballs are relative to the root - // of the tarball. So, they need to be resolved against - // the target directory in order to be created properly. - me.on("entry", function (entry) { - // if there's a "strip" argument, then strip off that many - // path components. - if (opts.strip) { - var p = entry.path.split("/").slice(opts.strip).join("/") - entry.path = entry.props.path = p - if (entry.linkpath) { - var lp = entry.linkpath.split("/").slice(opts.strip).join("/") - entry.linkpath = entry.props.linkpath = lp - } - } - if (entry.type !== "Link") return - entry.linkpath = entry.props.linkpath = - path.join(opts.path, path.join("/", entry.props.linkpath)) - }) - - this._fst.on("ready", function () { - me.pipe(me._fst, { end: false }) - me.resume() - }) - - // this._fst.on("end", function () { - // console.error("\nEEEE Extract End", me._fst.path) - // }) - - this._fst.on("close", function () { - // console.error("\nEEEE Extract End", me._fst.path) - me.emit("end") - me.emit("close") - }) -} - -inherits(Extract, tar.Parse) - -Extract.prototype._streamEnd = function () { - var me = this - if (!me._ended) me.error("unexpected eof") - me._fst.end() - // my .end() is coming later. -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/global-header-writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/global-header-writer.js deleted file mode 100644 index 0bfc7b80..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/global-header-writer.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = GlobalHeaderWriter - -var ExtendedHeaderWriter = require("./extended-header-writer.js") - , inherits = require("inherits") - -inherits(GlobalHeaderWriter, ExtendedHeaderWriter) - -function GlobalHeaderWriter (props) { - if (!(this instanceof GlobalHeaderWriter)) { - return new GlobalHeaderWriter(props) - } - ExtendedHeaderWriter.call(this, props) - this.props.type = "g" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/header.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/header.js deleted file mode 100644 index 05b237c0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/header.js +++ /dev/null @@ -1,385 +0,0 @@ -// parse a 512-byte header block to a data object, or vice-versa -// If the data won't fit nicely in a simple header, then generate -// the appropriate extended header file, and return that. - -module.exports = TarHeader - -var tar = require("../tar.js") - , fields = tar.fields - , fieldOffs = tar.fieldOffs - , fieldEnds = tar.fieldEnds - , fieldSize = tar.fieldSize - , numeric = tar.numeric - , assert = require("assert").ok - , space = " ".charCodeAt(0) - , slash = "/".charCodeAt(0) - , bslash = process.platform === "win32" ? "\\".charCodeAt(0) : null - -function TarHeader (block) { - if (!(this instanceof TarHeader)) return new TarHeader(block) - if (block) this.decode(block) -} - -TarHeader.prototype = - { decode : decode - , encode: encode - , calcSum: calcSum - , checkSum: checkSum - } - -TarHeader.parseNumeric = parseNumeric -TarHeader.encode = encode -TarHeader.decode = decode - -// note that this will only do the normal ustar header, not any kind -// of extended posix header file. If something doesn't fit comfortably, -// then it will set obj.needExtended = true, and set the block to -// the closest approximation. -function encode (obj) { - if (!obj && !(this instanceof TarHeader)) throw new Error( - "encode must be called on a TarHeader, or supplied an object") - - obj = obj || this - var block = obj.block = new Buffer(512) - - // if the object has a "prefix", then that's actually an extension of - // the path field. - if (obj.prefix) { - // console.error("%% header encoding, got a prefix", obj.prefix) - obj.path = obj.prefix + "/" + obj.path - // console.error("%% header encoding, prefixed path", obj.path) - obj.prefix = "" - } - - obj.needExtended = false - - if (obj.mode) { - if (typeof obj.mode === "string") obj.mode = parseInt(obj.mode, 8) - obj.mode = obj.mode & 0777 - } - - for (var f = 0; fields[f] !== null; f ++) { - var field = fields[f] - , off = fieldOffs[f] - , end = fieldEnds[f] - , ret - - switch (field) { - case "cksum": - // special, done below, after all the others - break - - case "prefix": - // special, this is an extension of the "path" field. - // console.error("%% header encoding, skip prefix later") - break - - case "type": - // convert from long name to a single char. - var type = obj.type || "0" - if (type.length > 1) { - type = tar.types[obj.type] - if (!type) type = "0" - } - writeText(block, off, end, type) - break - - case "path": - // uses the "prefix" field if > 100 bytes, but <= 255 - var pathLen = Buffer.byteLength(obj.path) - , pathFSize = fieldSize[fields.path] - , prefFSize = fieldSize[fields.prefix] - - // paths between 100 and 255 should use the prefix field. - // longer than 255 - if (pathLen > pathFSize && - pathLen <= pathFSize + prefFSize) { - // need to find a slash somewhere in the middle so that - // path and prefix both fit in their respective fields - var searchStart = pathLen - 1 - pathFSize - , searchEnd = prefFSize - , found = false - , pathBuf = new Buffer(obj.path) - - for ( var s = searchStart - ; (s <= searchEnd) - ; s ++ ) { - if (pathBuf[s] === slash || pathBuf[s] === bslash) { - found = s - break - } - } - - if (found !== false) { - prefix = pathBuf.slice(0, found).toString("utf8") - path = pathBuf.slice(found + 1).toString("utf8") - - ret = writeText(block, off, end, path) - off = fieldOffs[fields.prefix] - end = fieldEnds[fields.prefix] - // console.error("%% header writing prefix", off, end, prefix) - ret = writeText(block, off, end, prefix) || ret - break - } - } - - // paths less than 100 chars don't need a prefix - // and paths longer than 255 need an extended header and will fail - // on old implementations no matter what we do here. - // Null out the prefix, and fallthrough to default. - // console.error("%% header writing no prefix") - var poff = fieldOffs[fields.prefix] - , pend = fieldEnds[fields.prefix] - writeText(block, poff, pend, "") - // fallthrough - - // all other fields are numeric or text - default: - ret = numeric[field] - ? writeNumeric(block, off, end, obj[field]) - : writeText(block, off, end, obj[field] || "") - break - } - obj.needExtended = obj.needExtended || ret - } - - var off = fieldOffs[fields.cksum] - , end = fieldEnds[fields.cksum] - - writeNumeric(block, off, end, calcSum.call(this, block)) - - return block -} - -// if it's a negative number, or greater than will fit, -// then use write256. -var MAXNUM = { 12: 077777777777 - , 11: 07777777777 - , 8 : 07777777 - , 7 : 0777777 } -function writeNumeric (block, off, end, num) { - var writeLen = end - off - , maxNum = MAXNUM[writeLen] || 0 - - num = num || 0 - // console.error(" numeric", num) - - if (num instanceof Date || - Object.prototype.toString.call(num) === "[object Date]") { - num = num.getTime() / 1000 - } - - if (num > maxNum || num < 0) { - write256(block, off, end, num) - // need an extended header if negative or too big. - return true - } - - // god, tar is so annoying - // if the string is small enough, you should put a space - // between the octal string and the \0, but if it doesn't - // fit, then don't. - var numStr = Math.floor(num).toString(8) - if (num < MAXNUM[writeLen - 1]) numStr += " " - - // pad with "0" chars - if (numStr.length < writeLen) { - numStr = (new Array(writeLen - numStr.length).join("0")) + numStr - } - - if (numStr.length !== writeLen - 1) { - throw new Error("invalid length: " + JSON.stringify(numStr) + "\n" + - "expected: "+writeLen) - } - block.write(numStr, off, writeLen, "utf8") - block[end - 1] = 0 -} - -function write256 (block, off, end, num) { - var buf = block.slice(off, end) - var positive = num >= 0 - buf[0] = positive ? 0x80 : 0xFF - - // get the number as a base-256 tuple - if (!positive) num *= -1 - var tuple = [] - do { - var n = num % 256 - tuple.push(n) - num = (num - n) / 256 - } while (num) - - var bytes = tuple.length - - var fill = buf.length - bytes - for (var i = 1; i < fill; i ++) { - buf[i] = positive ? 0 : 0xFF - } - - // tuple is a base256 number, with [0] as the *least* significant byte - // if it's negative, then we need to flip all the bits once we hit the - // first non-zero bit. The 2's-complement is (0x100 - n), and the 1's- - // complement is (0xFF - n). - var zero = true - for (i = bytes; i > 0; i --) { - var byte = tuple[bytes - i] - if (positive) buf[fill + i] = byte - else if (zero && byte === 0) buf[fill + i] = 0 - else if (zero) { - zero = false - buf[fill + i] = 0x100 - byte - } else buf[fill + i] = 0xFF - byte - } -} - -function writeText (block, off, end, str) { - // strings are written as utf8, then padded with \0 - var strLen = Buffer.byteLength(str) - , writeLen = Math.min(strLen, end - off) - // non-ascii fields need extended headers - // long fields get truncated - , needExtended = strLen !== str.length || strLen > writeLen - - // write the string, and null-pad - if (writeLen > 0) block.write(str, off, writeLen, "utf8") - for (var i = off + writeLen; i < end; i ++) block[i] = 0 - - return needExtended -} - -function calcSum (block) { - block = block || this.block - assert(Buffer.isBuffer(block) && block.length === 512) - - if (!block) throw new Error("Need block to checksum") - - // now figure out what it would be if the cksum was " " - var sum = 0 - , start = fieldOffs[fields.cksum] - , end = fieldEnds[fields.cksum] - - for (var i = 0; i < fieldOffs[fields.cksum]; i ++) { - sum += block[i] - } - - for (var i = start; i < end; i ++) { - sum += space - } - - for (var i = end; i < 512; i ++) { - sum += block[i] - } - - return sum -} - - -function checkSum (block) { - var sum = calcSum.call(this, block) - block = block || this.block - - var cksum = block.slice(fieldOffs[fields.cksum], fieldEnds[fields.cksum]) - cksum = parseNumeric(cksum) - - return cksum === sum -} - -function decode (block) { - block = block || this.block - assert(Buffer.isBuffer(block) && block.length === 512) - - this.block = block - this.cksumValid = this.checkSum() - - var prefix = null - - // slice off each field. - for (var f = 0; fields[f] !== null; f ++) { - var field = fields[f] - , val = block.slice(fieldOffs[f], fieldEnds[f]) - - switch (field) { - case "ustar": - // if not ustar, then everything after that is just padding. - if (val.toString() !== "ustar\0") { - this.ustar = false - return - } else { - // console.error("ustar:", val, val.toString()) - this.ustar = val.toString() - } - break - - // prefix is special, since it might signal the xstar header - case "prefix": - var atime = parseNumeric(val.slice(131, 131 + 12)) - , ctime = parseNumeric(val.slice(131 + 12, 131 + 12 + 12)) - if ((val[130] === 0 || val[130] === space) && - typeof atime === "number" && - typeof ctime === "number" && - val[131 + 12] === space && - val[131 + 12 + 12] === space) { - this.atime = atime - this.ctime = ctime - val = val.slice(0, 130) - } - prefix = val.toString("utf8").replace(/\0+$/, "") - // console.error("%% header reading prefix", prefix) - break - - // all other fields are null-padding text - // or a number. - default: - if (numeric[field]) { - this[field] = parseNumeric(val) - } else { - this[field] = val.toString("utf8").replace(/\0+$/, "") - } - break - } - } - - // if we got a prefix, then prepend it to the path. - if (prefix) { - this.path = prefix + "/" + this.path - // console.error("%% header got a prefix", this.path) - } -} - -function parse256 (buf) { - // first byte MUST be either 80 or FF - // 80 for positive, FF for 2's comp - var positive - if (buf[0] === 0x80) positive = true - else if (buf[0] === 0xFF) positive = false - else return null - - // build up a base-256 tuple from the least sig to the highest - var zero = false - , tuple = [] - for (var i = buf.length - 1; i > 0; i --) { - var byte = buf[i] - if (positive) tuple.push(byte) - else if (zero && byte === 0) tuple.push(0) - else if (zero) { - zero = false - tuple.push(0x100 - byte) - } else tuple.push(0xFF - byte) - } - - for (var sum = 0, i = 0, l = tuple.length; i < l; i ++) { - sum += tuple[i] * Math.pow(256, i) - } - - return positive ? sum : -1 * sum -} - -function parseNumeric (f) { - if (f[0] & 0x80) return parse256(f) - - var str = f.toString("utf8").split("\0")[0].trim() - , res = parseInt(str, 8) - - return isNaN(res) ? null : res -} - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/pack.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/pack.js deleted file mode 100644 index 3ff14dd6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/pack.js +++ /dev/null @@ -1,231 +0,0 @@ -// pipe in an fstream, and it'll make a tarball. -// key-value pair argument is global extended header props. - -module.exports = Pack - -var EntryWriter = require("./entry-writer.js") - , Stream = require("stream").Stream - , path = require("path") - , inherits = require("inherits") - , GlobalHeaderWriter = require("./global-header-writer.js") - , collect = require("fstream").collect - , eof = new Buffer(512) - -for (var i = 0; i < 512; i ++) eof[i] = 0 - -inherits(Pack, Stream) - -function Pack (props) { - // console.error("-- p ctor") - var me = this - if (!(me instanceof Pack)) return new Pack(props) - - if (props) me._noProprietary = props.noProprietary - else me._noProprietary = false - - me._global = props - - me.readable = true - me.writable = true - me._buffer = [] - // console.error("-- -- set current to null in ctor") - me._currentEntry = null - me._processing = false - - me._pipeRoot = null - me.on("pipe", function (src) { - if (src.root === me._pipeRoot) return - me._pipeRoot = src - src.on("end", function () { - me._pipeRoot = null - }) - me.add(src) - }) -} - -Pack.prototype.addGlobal = function (props) { - // console.error("-- p addGlobal") - if (this._didGlobal) return - this._didGlobal = true - - var me = this - GlobalHeaderWriter(props) - .on("data", function (c) { - me.emit("data", c) - }) - .end() -} - -Pack.prototype.add = function (stream) { - if (this._global && !this._didGlobal) this.addGlobal(this._global) - - if (this._ended) return this.emit("error", new Error("add after end")) - - collect(stream) - this._buffer.push(stream) - this._process() - this._needDrain = this._buffer.length > 0 - return !this._needDrain -} - -Pack.prototype.pause = function () { - this._paused = true - if (this._currentEntry) this._currentEntry.pause() - this.emit("pause") -} - -Pack.prototype.resume = function () { - this._paused = false - if (this._currentEntry) this._currentEntry.resume() - this.emit("resume") - this._process() -} - -Pack.prototype.end = function () { - this._ended = true - this._buffer.push(eof) - this._process() -} - -Pack.prototype._process = function () { - var me = this - if (me._paused || me._processing) { - return - } - - var entry = me._buffer.shift() - - if (!entry) { - if (me._needDrain) { - me.emit("drain") - } - return - } - - if (entry.ready === false) { - // console.error("-- entry is not ready", entry) - me._buffer.unshift(entry) - entry.on("ready", function () { - // console.error("-- -- ready!", entry) - me._process() - }) - return - } - - me._processing = true - - if (entry === eof) { - // need 2 ending null blocks. - me.emit("data", eof) - me.emit("data", eof) - me.emit("end") - me.emit("close") - return - } - - // Change the path to be relative to the root dir that was - // added to the tarball. - // - // XXX This should be more like how -C works, so you can - // explicitly set a root dir, and also explicitly set a pathname - // in the tarball to use. That way we can skip a lot of extra - // work when resolving symlinks for bundled dependencies in npm. - - var root = path.dirname((entry.root || entry).path) - var wprops = {} - - Object.keys(entry.props || {}).forEach(function (k) { - wprops[k] = entry.props[k] - }) - - if (me._noProprietary) wprops.noProprietary = true - - wprops.path = path.relative(root, entry.path || '') - - // actually not a matter of opinion or taste. - if (process.platform === "win32") { - wprops.path = wprops.path.replace(/\\/g, "/") - } - - if (!wprops.type) - wprops.type = 'Directory' - - switch (wprops.type) { - // sockets not supported - case "Socket": - return - - case "Directory": - wprops.path += "/" - wprops.size = 0 - break - - case "Link": - var lp = path.resolve(path.dirname(entry.path), entry.linkpath) - wprops.linkpath = path.relative(root, lp) || "." - wprops.size = 0 - break - - case "SymbolicLink": - var lp = path.resolve(path.dirname(entry.path), entry.linkpath) - wprops.linkpath = path.relative(path.dirname(entry.path), lp) || "." - wprops.size = 0 - break - } - - // console.error("-- new writer", wprops) - // if (!wprops.type) { - // // console.error("-- no type?", entry.constructor.name, entry) - // } - - // console.error("-- -- set current to new writer", wprops.path) - var writer = me._currentEntry = EntryWriter(wprops) - - writer.parent = me - - // writer.on("end", function () { - // // console.error("-- -- writer end", writer.path) - // }) - - writer.on("data", function (c) { - me.emit("data", c) - }) - - writer.on("header", function () { - Buffer.prototype.toJSON = function () { - return this.toString().split(/\0/).join(".") - } - // console.error("-- -- writer header %j", writer.props) - if (writer.props.size === 0) nextEntry() - }) - writer.on("close", nextEntry) - - var ended = false - function nextEntry () { - if (ended) return - ended = true - - // console.error("-- -- writer close", writer.path) - // console.error("-- -- set current to null", wprops.path) - me._currentEntry = null - me._processing = false - me._process() - } - - writer.on("error", function (er) { - // console.error("-- -- writer error", writer.path) - me.emit("error", er) - }) - - // if it's the root, then there's no need to add its entries, - // or data, since they'll be added directly. - if (entry === me._pipeRoot) { - // console.error("-- is the root, don't auto-add") - writer.add = null - } - - entry.pipe(writer) -} - -Pack.prototype.destroy = function () {} -Pack.prototype.write = function () {} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/parse.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/parse.js deleted file mode 100644 index 884e73db..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/lib/parse.js +++ /dev/null @@ -1,270 +0,0 @@ - -// A writable stream. -// It emits "entry" events, which provide a readable stream that has -// header info attached. - -module.exports = Parse.create = Parse - -var stream = require("stream") - , Stream = stream.Stream - , BlockStream = require("block-stream") - , tar = require("../tar.js") - , TarHeader = require("./header.js") - , Entry = require("./entry.js") - , BufferEntry = require("./buffer-entry.js") - , ExtendedHeader = require("./extended-header.js") - , assert = require("assert").ok - , inherits = require("inherits") - , fstream = require("fstream") - -// reading a tar is a lot like reading a directory -// However, we're actually not going to run the ctor, -// since it does a stat and various other stuff. -// This inheritance gives us the pause/resume/pipe -// behavior that is desired. -inherits(Parse, fstream.Reader) - -function Parse () { - var me = this - if (!(me instanceof Parse)) return new Parse() - - // doesn't apply fstream.Reader ctor? - // no, becasue we don't want to stat/etc, we just - // want to get the entry/add logic from .pipe() - Stream.apply(me) - - me.writable = true - me.readable = true - me._stream = new BlockStream(512) - me.position = 0 - - me._stream.on("error", function (e) { - me.emit("error", e) - }) - - me._stream.on("data", function (c) { - me._process(c) - }) - - me._stream.on("end", function () { - me._streamEnd() - }) - - me._stream.on("drain", function () { - me.emit("drain") - }) -} - -// overridden in Extract class, since it needs to -// wait for its DirWriter part to finish before -// emitting "end" -Parse.prototype._streamEnd = function () { - var me = this - if (!me._ended) me.error("unexpected eof") - me.emit("end") -} - -// a tar reader is actually a filter, not just a readable stream. -// So, you should pipe a tarball stream into it, and it needs these -// write/end methods to do that. -Parse.prototype.write = function (c) { - if (this._ended) { - // gnutar puts a LOT of nulls at the end. - // you can keep writing these things forever. - // Just ignore them. - for (var i = 0, l = c.length; i > l; i ++) { - if (c[i] !== 0) return this.error("write() after end()") - } - return - } - return this._stream.write(c) -} - -Parse.prototype.end = function (c) { - this._ended = true - return this._stream.end(c) -} - -// don't need to do anything, since we're just -// proxying the data up from the _stream. -// Just need to override the parent's "Not Implemented" -// error-thrower. -Parse.prototype._read = function () {} - -Parse.prototype._process = function (c) { - assert(c && c.length === 512, "block size should be 512") - - // one of three cases. - // 1. A new header - // 2. A part of a file/extended header - // 3. One of two or more EOF null blocks - - if (this._entry) { - var entry = this._entry - entry.write(c) - if (entry._remaining === 0) { - entry.end() - this._entry = null - } - } else { - // either zeroes or a header - var zero = true - for (var i = 0; i < 512 && zero; i ++) { - zero = c[i] === 0 - } - - // eof is *at least* 2 blocks of nulls, and then the end of the - // file. you can put blocks of nulls between entries anywhere, - // so appending one tarball to another is technically valid. - // ending without the eof null blocks is not allowed, however. - if (zero) { - this._ended = this._eofStarted - this._eofStarted = true - } else { - this._ended = this._eofStarted = false - this._startEntry(c) - } - - } - - this.position += 512 -} - -// take a header chunk, start the right kind of entry. -Parse.prototype._startEntry = function (c) { - var header = new TarHeader(c) - , self = this - , entry - , ev - , EntryType - , onend - , meta = false - - if (null === header.size || !header.cksumValid) { - var e = new Error("invalid tar file") - e.header = header - e.tar_file_offset = this.position - e.tar_block = this.position / 512 - this.emit("error", e) - } - - switch (tar.types[header.type]) { - case "File": - case "OldFile": - case "Link": - case "SymbolicLink": - case "CharacterDevice": - case "BlockDevice": - case "Directory": - case "FIFO": - case "ContiguousFile": - case "GNUDumpDir": - // start a file. - // pass in any extended headers - // These ones consumers are typically most interested in. - EntryType = Entry - ev = "entry" - break - - case "GlobalExtendedHeader": - // extended headers that apply to the rest of the tarball - EntryType = ExtendedHeader - onend = function () { - self._global = self._global || {} - Object.keys(entry.fields).forEach(function (k) { - self._global[k] = entry.fields[k] - }) - } - ev = "globalExtendedHeader" - meta = true - break - - case "ExtendedHeader": - case "OldExtendedHeader": - // extended headers that apply to the next entry - EntryType = ExtendedHeader - onend = function () { - self._extended = entry.fields - } - ev = "extendedHeader" - meta = true - break - - case "NextFileHasLongLinkpath": - // set linkpath=<contents> in extended header - EntryType = BufferEntry - onend = function () { - self._extended = self._extended || {} - self._extended.linkpath = entry.body - } - ev = "longLinkpath" - meta = true - break - - case "NextFileHasLongPath": - case "OldGnuLongPath": - // set path=<contents> in file-extended header - EntryType = BufferEntry - onend = function () { - self._extended = self._extended || {} - self._extended.path = entry.body - } - ev = "longPath" - meta = true - break - - default: - // all the rest we skip, but still set the _entry - // member, so that we can skip over their data appropriately. - // emit an event to say that this is an ignored entry type? - EntryType = Entry - ev = "ignoredEntry" - break - } - - var global, extended - if (meta) { - global = extended = null - } else { - var global = this._global - var extended = this._extended - - // extendedHeader only applies to one entry, so once we start - // an entry, it's over. - this._extended = null - } - entry = new EntryType(header, extended, global) - entry.meta = meta - - // only proxy data events of normal files. - if (!meta) { - entry.on("data", function (c) { - me.emit("data", c) - }) - } - - if (onend) entry.on("end", onend) - - this._entry = entry - var me = this - - entry.on("pause", function () { - me.pause() - }) - - entry.on("resume", function () { - me.resume() - }) - - if (this.listeners("*").length) { - this.emit("*", ev, entry) - } - - this.emit(ev, entry) - - // Zero-byte entry. End immediately. - if (entry.props.size === 0) { - entry.end() - this._entry = null - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/LICENCE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/LICENCE deleted file mode 100644 index 74489e2e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/LICENCE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) Isaac Z. Schlueter -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/README.md deleted file mode 100644 index c16e9c46..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# block-stream - -A stream of blocks. - -Write data into it, and it'll output data in buffer blocks the size you -specify, padding with zeroes if necessary. - -```javascript -var block = new BlockStream(512) -fs.createReadStream("some-file").pipe(block) -block.pipe(fs.createWriteStream("block-file")) -``` - -When `.end()` or `.flush()` is called, it'll pad the block with zeroes. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/block-stream-pause.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/block-stream-pause.js deleted file mode 100644 index 9328844a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/block-stream-pause.js +++ /dev/null @@ -1,70 +0,0 @@ -var BlockStream = require("../block-stream.js") - -var blockSizes = [16, 25, 1024] - , writeSizes = [4, 8, 15, 16, 17, 64, 100] - , writeCounts = [1, 10, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize, {nopad: true }) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - - f.on("data", function (c) { - timeouts ++ - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - f.pause() - setTimeout(function () { - timeouts -- - - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - f.resume() - }, 100) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = writeSize * writeCount * 2 - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 100) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/block-stream.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/block-stream.js deleted file mode 100644 index 1141f3a8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/block-stream.js +++ /dev/null @@ -1,68 +0,0 @@ -var BlockStream = require("../block-stream.js") - -var blockSizes = [16, 25, 1024] - , writeSizes = [4, 8, 15, 16, 17, 64, 100] - , writeCounts = [1, 10, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize, {nopad: true }) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - - f.on("data", function (c) { - timeouts ++ - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - setTimeout(function () { - timeouts -- - - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - }, 100) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = writeSize * writeCount * 2 - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 100) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/dropper-pause.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/dropper-pause.js deleted file mode 100644 index 93e4068e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/dropper-pause.js +++ /dev/null @@ -1,70 +0,0 @@ -var BlockStream = require("dropper") - -var blockSizes = [16, 25, 1024] - , writeSizes = [4, 8, 15, 16, 17, 64, 100] - , writeCounts = [1, 10, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize, {nopad: true }) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - - f.on("data", function (c) { - timeouts ++ - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - f.pause() - setTimeout(function () { - timeouts -- - - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - f.resume() - }, 100) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = writeSize * writeCount * 2 - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 100) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/dropper.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/dropper.js deleted file mode 100644 index 55fa1330..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/bench/dropper.js +++ /dev/null @@ -1,68 +0,0 @@ -var BlockStream = require("dropper") - -var blockSizes = [16, 25, 1024] - , writeSizes = [4, 8, 15, 16, 17, 64, 100] - , writeCounts = [1, 10, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize, {nopad: true }) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - - f.on("data", function (c) { - timeouts ++ - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - setTimeout(function () { - timeouts -- - - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - }, 100) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = writeSize * writeCount * 2 - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 100) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/block-stream.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/block-stream.js deleted file mode 100644 index 008de035..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/block-stream.js +++ /dev/null @@ -1,209 +0,0 @@ -// write data to it, and it'll emit data in 512 byte blocks. -// if you .end() or .flush(), it'll emit whatever it's got, -// padded with nulls to 512 bytes. - -module.exports = BlockStream - -var Stream = require("stream").Stream - , inherits = require("inherits") - , assert = require("assert").ok - , debug = process.env.DEBUG ? console.error : function () {} - -function BlockStream (size, opt) { - this.writable = this.readable = true - this._opt = opt || {} - this._chunkSize = size || 512 - this._offset = 0 - this._buffer = [] - this._bufferLength = 0 - if (this._opt.nopad) this._zeroes = false - else { - this._zeroes = new Buffer(this._chunkSize) - for (var i = 0; i < this._chunkSize; i ++) { - this._zeroes[i] = 0 - } - } -} - -inherits(BlockStream, Stream) - -BlockStream.prototype.write = function (c) { - // debug(" BS write", c) - if (this._ended) throw new Error("BlockStream: write after end") - if (c && !Buffer.isBuffer(c)) c = new Buffer(c + "") - if (c.length) { - this._buffer.push(c) - this._bufferLength += c.length - } - // debug("pushed onto buffer", this._bufferLength) - if (this._bufferLength >= this._chunkSize) { - if (this._paused) { - // debug(" BS paused, return false, need drain") - this._needDrain = true - return false - } - this._emitChunk() - } - return true -} - -BlockStream.prototype.pause = function () { - // debug(" BS pausing") - this._paused = true -} - -BlockStream.prototype.resume = function () { - // debug(" BS resume") - this._paused = false - return this._emitChunk() -} - -BlockStream.prototype.end = function (chunk) { - // debug("end", chunk) - if (typeof chunk === "function") cb = chunk, chunk = null - if (chunk) this.write(chunk) - this._ended = true - this.flush() -} - -BlockStream.prototype.flush = function () { - this._emitChunk(true) -} - -BlockStream.prototype._emitChunk = function (flush) { - // debug("emitChunk flush=%j emitting=%j paused=%j", flush, this._emitting, this._paused) - - // emit a <chunkSize> chunk - if (flush && this._zeroes) { - // debug(" BS push zeroes", this._bufferLength) - // push a chunk of zeroes - var padBytes = (this._bufferLength % this._chunkSize) - if (padBytes !== 0) padBytes = this._chunkSize - padBytes - if (padBytes > 0) { - // debug("padBytes", padBytes, this._zeroes.slice(0, padBytes)) - this._buffer.push(this._zeroes.slice(0, padBytes)) - this._bufferLength += padBytes - // debug(this._buffer[this._buffer.length - 1].length, this._bufferLength) - } - } - - if (this._emitting || this._paused) return - this._emitting = true - - // debug(" BS entering loops") - var bufferIndex = 0 - while (this._bufferLength >= this._chunkSize && - (flush || !this._paused)) { - // debug(" BS data emission loop", this._bufferLength) - - var out - , outOffset = 0 - , outHas = this._chunkSize - - while (outHas > 0 && (flush || !this._paused) ) { - // debug(" BS data inner emit loop", this._bufferLength) - var cur = this._buffer[bufferIndex] - , curHas = cur.length - this._offset - // debug("cur=", cur) - // debug("curHas=%j", curHas) - // If it's not big enough to fill the whole thing, then we'll need - // to copy multiple buffers into one. However, if it is big enough, - // then just slice out the part we want, to save unnecessary copying. - // Also, need to copy if we've already done some copying, since buffers - // can't be joined like cons strings. - if (out || curHas < outHas) { - out = out || new Buffer(this._chunkSize) - cur.copy(out, outOffset, - this._offset, this._offset + Math.min(curHas, outHas)) - } else if (cur.length === outHas && this._offset === 0) { - // shortcut -- cur is exactly long enough, and no offset. - out = cur - } else { - // slice out the piece of cur that we need. - out = cur.slice(this._offset, this._offset + outHas) - } - - if (curHas > outHas) { - // means that the current buffer couldn't be completely output - // update this._offset to reflect how much WAS written - this._offset += outHas - outHas = 0 - } else { - // output the entire current chunk. - // toss it away - outHas -= curHas - outOffset += curHas - bufferIndex ++ - this._offset = 0 - } - } - - this._bufferLength -= this._chunkSize - assert(out.length === this._chunkSize) - // debug("emitting data", out) - // debug(" BS emitting, paused=%j", this._paused, this._bufferLength) - this.emit("data", out) - out = null - } - // debug(" BS out of loops", this._bufferLength) - - // whatever is left, it's not enough to fill up a block, or we're paused - this._buffer = this._buffer.slice(bufferIndex) - if (this._paused) { - // debug(" BS paused, leaving", this._bufferLength) - this._needsDrain = true - this._emitting = false - return - } - - // if flushing, and not using null-padding, then need to emit the last - // chunk(s) sitting in the queue. We know that it's not enough to - // fill up a whole block, because otherwise it would have been emitted - // above, but there may be some offset. - var l = this._buffer.length - if (flush && !this._zeroes && l) { - if (l === 1) { - if (this._offset) { - this.emit("data", this._buffer[0].slice(this._offset)) - } else { - this.emit("data", this._buffer[0]) - } - } else { - var outHas = this._bufferLength - , out = new Buffer(outHas) - , outOffset = 0 - for (var i = 0; i < l; i ++) { - var cur = this._buffer[i] - , curHas = cur.length - this._offset - cur.copy(out, outOffset, this._offset) - this._offset = 0 - outOffset += curHas - this._bufferLength -= curHas - } - this.emit("data", out) - } - // truncate - this._buffer.length = 0 - this._bufferLength = 0 - this._offset = 0 - } - - // now either drained or ended - // debug("either draining, or ended", this._bufferLength, this._ended) - // means that we've flushed out all that we can so far. - if (this._needDrain) { - // debug("emitting drain", this._bufferLength) - this._needDrain = false - this.emit("drain") - } - - if ((this._bufferLength === 0) && this._ended && !this._endEmitted) { - // debug("emitting end", this._bufferLength) - this._endEmitted = true - this.emit("end") - } - - this._emitting = false - - // debug(" BS no longer emitting", flush, this._paused, this._emitting, this._bufferLength, this._chunkSize) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/package.json deleted file mode 100644 index a9dec954..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "name": "block-stream", - "description": "a stream of blocks", - "version": "0.0.7", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/block-stream.git" - }, - "engines": { - "node": "0.4 || >=0.5.8" - }, - "main": "block-stream.js", - "dependencies": { - "inherits": "~2.0.0" - }, - "devDependencies": { - "tap": "0.x" - }, - "scripts": { - "test": "tap test/" - }, - "license": "BSD", - "readme": "# block-stream\n\nA stream of blocks.\n\nWrite data into it, and it'll output data in buffer blocks the size you\nspecify, padding with zeroes if necessary.\n\n```javascript\nvar block = new BlockStream(512)\nfs.createReadStream(\"some-file\").pipe(block)\nblock.pipe(fs.createWriteStream(\"block-file\"))\n```\n\nWhen `.end()` or `.flush()` is called, it'll pad the block with zeroes.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/block-stream/issues" - }, - "homepage": "https://github.com/isaacs/block-stream", - "_id": "block-stream@0.0.7", - "dist": { - "shasum": "f02594aed4110922c417d5d634b45e55a4ffaefd" - }, - "_from": "block-stream@*", - "_resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.7.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/basic.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/basic.js deleted file mode 100644 index b4b93051..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/basic.js +++ /dev/null @@ -1,27 +0,0 @@ -var tap = require("tap") - , BlockStream = require("../block-stream.js") - -tap.test("basic test", function (t) { - var b = new BlockStream(16) - var fs = require("fs") - var fstr = fs.createReadStream(__filename, {encoding: "utf8"}) - fstr.pipe(b) - - var stat - t.doesNotThrow(function () { - stat = fs.statSync(__filename) - }, "stat should not throw") - - var totalBytes = 0 - b.on("data", function (c) { - t.equal(c.length, 16, "chunks should be 16 bytes long") - t.type(c, Buffer, "chunks should be buffer objects") - totalBytes += c.length - }) - b.on("end", function () { - var expectedBytes = stat.size + (16 - stat.size % 16) - t.equal(totalBytes, expectedBytes, "Should be multiple of 16") - t.end() - }) - -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/nopad-thorough.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/nopad-thorough.js deleted file mode 100644 index 7a8de88b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/nopad-thorough.js +++ /dev/null @@ -1,68 +0,0 @@ -var BlockStream = require("../block-stream.js") - -var blockSizes = [16]//, 25]//, 1024] - , writeSizes = [4, 15, 16, 17, 64 ]//, 64, 100] - , writeCounts = [1, 10]//, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize, {nopad: true }) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - - f.on("data", function (c) { - timeouts ++ - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - setTimeout(function () { - timeouts -- - - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - }, 100) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = writeSize * writeCount * 2 - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 100) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/nopad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/nopad.js deleted file mode 100644 index 6d38429f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/nopad.js +++ /dev/null @@ -1,57 +0,0 @@ -var BlockStream = require("../") -var tap = require("tap") - - -tap.test("don't pad, small writes", function (t) { - var f = new BlockStream(16, { nopad: true }) - t.plan(1) - - f.on("data", function (c) { - t.equal(c.toString(), "abc", "should get 'abc'") - }) - - f.on("end", function () { t.end() }) - - f.write(new Buffer("a")) - f.write(new Buffer("b")) - f.write(new Buffer("c")) - f.end() -}) - -tap.test("don't pad, exact write", function (t) { - var f = new BlockStream(16, { nopad: true }) - t.plan(1) - - var first = true - f.on("data", function (c) { - if (first) { - first = false - t.equal(c.toString(), "abcdefghijklmnop", "first chunk") - } else { - t.fail("should only get one") - } - }) - - f.on("end", function () { t.end() }) - - f.end(new Buffer("abcdefghijklmnop")) -}) - -tap.test("don't pad, big write", function (t) { - var f = new BlockStream(16, { nopad: true }) - t.plan(2) - - var first = true - f.on("data", function (c) { - if (first) { - first = false - t.equal(c.toString(), "abcdefghijklmnop", "first chunk") - } else { - t.equal(c.toString(), "q") - } - }) - - f.on("end", function () { t.end() }) - - f.end(new Buffer("abcdefghijklmnopq")) -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/pause-resume.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/pause-resume.js deleted file mode 100644 index 64d0d091..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/pause-resume.js +++ /dev/null @@ -1,73 +0,0 @@ -var BlockStream = require("../block-stream.js") - -var blockSizes = [16] - , writeSizes = [15, 16, 17] - , writeCounts = [1, 10]//, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - var paused = false - - f.on("data", function (c) { - timeouts ++ - t.notOk(paused, "should not be paused when emitting data") - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - paused = true - f.pause() - process.nextTick(function () { - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - paused = false - f.resume() - timeouts -- - }) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = expectChunks * blockSize - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 200) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/thorough.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/thorough.js deleted file mode 100644 index 1cc9ea08..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/thorough.js +++ /dev/null @@ -1,68 +0,0 @@ -var BlockStream = require("../block-stream.js") - -var blockSizes = [16]//, 25]//, 1024] - , writeSizes = [4, 15, 16, 17, 64 ]//, 64, 100] - , writeCounts = [1, 10]//, 100] - , tap = require("tap") - -writeCounts.forEach(function (writeCount) { -blockSizes.forEach(function (blockSize) { -writeSizes.forEach(function (writeSize) { - tap.test("writeSize=" + writeSize + - " blockSize="+blockSize + - " writeCount="+writeCount, function (t) { - var f = new BlockStream(blockSize) - - var actualChunks = 0 - var actualBytes = 0 - var timeouts = 0 - - f.on("data", function (c) { - timeouts ++ - - actualChunks ++ - actualBytes += c.length - - // make sure that no data gets corrupted, and basic sanity - var before = c.toString() - // simulate a slow write operation - setTimeout(function () { - timeouts -- - - var after = c.toString() - t.equal(after, before, "should not change data") - - // now corrupt it, to find leaks. - for (var i = 0; i < c.length; i ++) { - c[i] = "x".charCodeAt(0) - } - }, 100) - }) - - f.on("end", function () { - // round up to the nearest block size - var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize) - var expectBytes = expectChunks * blockSize - t.equal(actualBytes, expectBytes, - "bytes=" + expectBytes + " writeSize=" + writeSize) - t.equal(actualChunks, expectChunks, - "chunks=" + expectChunks + " writeSize=" + writeSize) - - // wait for all the timeout checks to finish, then end the test - setTimeout(function WAIT () { - if (timeouts > 0) return setTimeout(WAIT) - t.end() - }, 100) - }) - - for (var i = 0; i < writeCount; i ++) { - var a = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0) - var b = new Buffer(writeSize); - for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0) - f.write(a) - f.write(b) - } - f.end() - }) -}) }) }) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/two-stream.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/two-stream.js deleted file mode 100644 index c6db79a4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream/test/two-stream.js +++ /dev/null @@ -1,59 +0,0 @@ -var log = console.log, - assert = require( 'assert' ), - BlockStream = require("../block-stream.js"), - isize = 0, tsize = 0, fsize = 0, psize = 0, i = 0, - filter = null, paper = null, stack = null, - -// a source data buffer -tsize = 1 * 1024; // <- 1K -stack = new Buffer( tsize ); -for ( ; i < tsize; i++) stack[i] = "x".charCodeAt(0); - -isize = 1 * 1024; // <- initial packet size with 4K no bug! -fsize = 2 * 1024 ; // <- first block-stream size -psize = Math.ceil( isize / 6 ); // <- second block-stream size - -fexpected = Math.ceil( tsize / fsize ); // <- packets expected for first -pexpected = Math.ceil( tsize / psize ); // <- packets expected for second - - -filter = new BlockStream( fsize, { nopad : true } ); -paper = new BlockStream( psize, { nopad : true } ); - - -var fcounter = 0; -filter.on( 'data', function (c) { - // verify that they're not null-padded - for (var i = 0; i < c.length; i ++) { - assert.strictEqual(c[i], "x".charCodeAt(0)) - } - ++fcounter; -} ); - -var pcounter = 0; -paper.on( 'data', function (c) { - // verify that they're not null-padded - for (var i = 0; i < c.length; i ++) { - assert.strictEqual(c[i], "x".charCodeAt(0)) - } - ++pcounter; -} ); - -filter.pipe( paper ); - -filter.on( 'end', function () { - log("fcounter: %s === %s", fcounter, fexpected) - assert.strictEqual( fcounter, fexpected ); -} ); - -paper.on( 'end', function () { - log("pcounter: %s === %s", pcounter, pexpected); - assert.strictEqual( pcounter, pexpected ); -} ); - - -for ( i = 0, j = isize; j <= tsize; j += isize ) { - filter.write( stack.slice( j - isize, j ) ); -} - -filter.end(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/.npmignore deleted file mode 100644 index 494272a8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -.*.swp -node_modules/ -examples/deep-copy/ -examples/path/ -examples/filter-copy/ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/.travis.yml deleted file mode 100644 index 2d26206d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - 0.6 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/README.md deleted file mode 100644 index 9d8cb77e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/README.md +++ /dev/null @@ -1,76 +0,0 @@ -Like FS streams, but with stat on them, and supporting directories and -symbolic links, as well as normal files. Also, you can use this to set -the stats on a file, even if you don't change its contents, or to create -a symlink, etc. - -So, for example, you can "write" a directory, and it'll call `mkdir`. You -can specify a uid and gid, and it'll call `chown`. You can specify a -`mtime` and `atime`, and it'll call `utimes`. You can call it a symlink -and provide a `linkpath` and it'll call `symlink`. - -Note that it won't automatically resolve symbolic links. So, if you -call `fstream.Reader('/some/symlink')` then you'll get an object -that stats and then ends immediately (since it has no data). To follow -symbolic links, do this: `fstream.Reader({path:'/some/symlink', follow: -true })`. - -There are various checks to make sure that the bytes emitted are the -same as the intended size, if the size is set. - -## Examples - -```javascript -fstream - .Writer({ path: "path/to/file" - , mode: 0755 - , size: 6 - }) - .write("hello\n") - .end() -``` - -This will create the directories if they're missing, and then write -`hello\n` into the file, chmod it to 0755, and assert that 6 bytes have -been written when it's done. - -```javascript -fstream - .Writer({ path: "path/to/file" - , mode: 0755 - , size: 6 - , flags: "a" - }) - .write("hello\n") - .end() -``` - -You can pass flags in, if you want to append to a file. - -```javascript -fstream - .Writer({ path: "path/to/symlink" - , linkpath: "./file" - , SymbolicLink: true - , mode: "0755" // octal strings supported - }) - .end() -``` - -If isSymbolicLink is a function, it'll be called, and if it returns -true, then it'll treat it as a symlink. If it's not a function, then -any truish value will make a symlink, or you can set `type: -'SymbolicLink'`, which does the same thing. - -Note that the linkpath is relative to the symbolic link location, not -the parent dir or cwd. - -```javascript -fstream - .Reader("path/to/dir") - .pipe(fstream.Writer("path/to/other/dir")) -``` - -This will do like `cp -Rp path/to/dir path/to/other/dir`. If the other -dir exists and isn't a directory, then it'll emit an error. It'll also -set the uid, gid, mode, etc. to be identical. In this way, it's more -like `rsync -a` than simply a copy. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/filter-pipe.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/filter-pipe.js deleted file mode 100644 index c6b55b3e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/filter-pipe.js +++ /dev/null @@ -1,131 +0,0 @@ -var fstream = require("../fstream.js") -var path = require("path") - -var r = fstream.Reader({ path: path.dirname(__dirname) - , filter: function () { - return !this.basename.match(/^\./) && - !this.basename.match(/^node_modules$/) - !this.basename.match(/^deep-copy$/) - !this.basename.match(/^filter-copy$/) - } - }) - -// this writer will only write directories -var w = fstream.Writer({ path: path.resolve(__dirname, "filter-copy") - , type: "Directory" - , filter: function () { - return this.type === "Directory" - } - }) - -var indent = "" -var escape = {} - -r.on("entry", appears) -r.on("ready", function () { - console.error("ready to begin!", r.path) -}) - -function appears (entry) { - console.error(indent + "a %s appears!", entry.type, entry.basename, typeof entry.basename) - if (foggy) { - console.error("FOGGY!") - var p = entry - do { - console.error(p.depth, p.path, p._paused) - } while (p = p.parent) - - throw new Error("\033[mshould not have entries while foggy") - } - indent += "\t" - entry.on("data", missile(entry)) - entry.on("end", runaway(entry)) - entry.on("entry", appears) -} - -var foggy -function missile (entry) { - if (entry.type === "Directory") { - var ended = false - entry.once("end", function () { ended = true }) - return function (c) { - // throw in some pathological pause()/resume() behavior - // just for extra fun. - process.nextTick(function () { - if (!foggy && !ended) { // && Math.random() < 0.3) { - console.error(indent +"%s casts a spell", entry.basename) - console.error("\na slowing fog comes over the battlefield...\n\033[32m") - entry.pause() - entry.once("resume", liftFog) - foggy = setTimeout(liftFog, 1000) - - function liftFog (who) { - if (!foggy) return - if (who) { - console.error("%s breaks the spell!", who && who.path) - } else { - console.error("the spell expires!") - } - console.error("\033[mthe fog lifts!\n") - clearTimeout(foggy) - foggy = null - if (entry._paused) entry.resume() - } - - } - }) - } - } - - return function (c) { - var e = Math.random() < 0.5 - console.error(indent + "%s %s for %d damage!", - entry.basename, - e ? "is struck" : "fires a chunk", - c.length) - } -} - -function runaway (entry) { return function () { - var e = Math.random() < 0.5 - console.error(indent + "%s %s", - entry.basename, - e ? "turns to flee" : "is vanquished!") - indent = indent.slice(0, -1) -}} - - -w.on("entry", attacks) -//w.on("ready", function () { attacks(w) }) -function attacks (entry) { - console.error(indent + "%s %s!", entry.basename, - entry.type === "Directory" ? "calls for backup" : "attacks") - entry.on("entry", attacks) -} - -ended = false -var i = 1 -r.on("end", function () { - if (foggy) clearTimeout(foggy) - console.error("\033[mIT'S OVER!!") - console.error("A WINNAR IS YOU!") - - console.log("ok " + (i ++) + " A WINNAR IS YOU") - ended = true - // now go through and verify that everything in there is a dir. - var p = path.resolve(__dirname, "filter-copy") - var checker = fstream.Reader({ path: p }) - checker.checker = true - checker.on("child", function (e) { - var ok = e.type === "Directory" - console.log((ok ? "" : "not ") + "ok " + (i ++) + - " should be a dir: " + - e.path.substr(checker.path.length + 1)) - }) -}) - -process.on("exit", function () { - console.log((ended ? "" : "not ") + "ok " + (i ++) + " ended") -}) - -r.pipe(w) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/pipe.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/pipe.js deleted file mode 100644 index 648ec849..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/pipe.js +++ /dev/null @@ -1,115 +0,0 @@ -var fstream = require("../fstream.js") -var path = require("path") - -var r = fstream.Reader({ path: path.dirname(__dirname) - , filter: function () { - return !this.basename.match(/^\./) && - !this.basename.match(/^node_modules$/) - !this.basename.match(/^deep-copy$/) - } - }) - -var w = fstream.Writer({ path: path.resolve(__dirname, "deep-copy") - , type: "Directory" - }) - -var indent = "" -var escape = {} - -r.on("entry", appears) -r.on("ready", function () { - console.error("ready to begin!", r.path) -}) - -function appears (entry) { - console.error(indent + "a %s appears!", entry.type, entry.basename, typeof entry.basename, entry) - if (foggy) { - console.error("FOGGY!") - var p = entry - do { - console.error(p.depth, p.path, p._paused) - } while (p = p.parent) - - throw new Error("\033[mshould not have entries while foggy") - } - indent += "\t" - entry.on("data", missile(entry)) - entry.on("end", runaway(entry)) - entry.on("entry", appears) -} - -var foggy -function missile (entry) { - if (entry.type === "Directory") { - var ended = false - entry.once("end", function () { ended = true }) - return function (c) { - // throw in some pathological pause()/resume() behavior - // just for extra fun. - process.nextTick(function () { - if (!foggy && !ended) { // && Math.random() < 0.3) { - console.error(indent +"%s casts a spell", entry.basename) - console.error("\na slowing fog comes over the battlefield...\n\033[32m") - entry.pause() - entry.once("resume", liftFog) - foggy = setTimeout(liftFog, 10) - - function liftFog (who) { - if (!foggy) return - if (who) { - console.error("%s breaks the spell!", who && who.path) - } else { - console.error("the spell expires!") - } - console.error("\033[mthe fog lifts!\n") - clearTimeout(foggy) - foggy = null - if (entry._paused) entry.resume() - } - - } - }) - } - } - - return function (c) { - var e = Math.random() < 0.5 - console.error(indent + "%s %s for %d damage!", - entry.basename, - e ? "is struck" : "fires a chunk", - c.length) - } -} - -function runaway (entry) { return function () { - var e = Math.random() < 0.5 - console.error(indent + "%s %s", - entry.basename, - e ? "turns to flee" : "is vanquished!") - indent = indent.slice(0, -1) -}} - - -w.on("entry", attacks) -//w.on("ready", function () { attacks(w) }) -function attacks (entry) { - console.error(indent + "%s %s!", entry.basename, - entry.type === "Directory" ? "calls for backup" : "attacks") - entry.on("entry", attacks) -} - -ended = false -r.on("end", function () { - if (foggy) clearTimeout(foggy) - console.error("\033[mIT'S OVER!!") - console.error("A WINNAR IS YOU!") - - console.log("ok 1 A WINNAR IS YOU") - ended = true -}) - -process.on("exit", function () { - console.log((ended ? "" : "not ") + "ok 2 ended") -}) - -r.pipe(w) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/reader.js deleted file mode 100644 index 9aa1a953..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/reader.js +++ /dev/null @@ -1,54 +0,0 @@ -var fstream = require("../fstream.js") -var tap = require("tap") -var fs = require("fs") -var path = require("path") -var children = -1 -var dir = path.dirname(__dirname) - -var gotReady = false -var ended = false - -tap.test("reader test", function (t) { - - var r = fstream.Reader({ path: dir - , filter: function () { - // return this.parent === r - return this.parent === r || this === r - } - }) - - r.on("ready", function () { - gotReady = true - children = fs.readdirSync(dir).length - console.error("Setting expected children to "+children) - t.equal(r.type, "Directory", "should be a directory") - }) - - r.on("entry", function (entry) { - children -- - if (!gotReady) { - t.fail("children before ready!") - } - t.equal(entry.dirname, r.path, "basename is parent dir") - }) - - r.on("error", function (er) { - t.fail(er) - t.end() - process.exit(1) - }) - - r.on("end", function () { - t.equal(children, 0, "should have seen all children") - ended = true - }) - - var closed = false - r.on("close", function () { - t.ok(ended, "saw end before close") - t.notOk(closed, "close should only happen once") - closed = true - t.end() - }) - -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/symlink-write.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/symlink-write.js deleted file mode 100644 index d7816d24..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/examples/symlink-write.js +++ /dev/null @@ -1,24 +0,0 @@ -var fstream = require("../fstream.js") - , closed = false - -fstream - .Writer({ path: "path/to/symlink" - , linkpath: "./file" - , isSymbolicLink: true - , mode: "0755" // octal strings supported - }) - .on("close", function () { - closed = true - var fs = require("fs") - var s = fs.lstatSync("path/to/symlink") - var isSym = s.isSymbolicLink() - console.log((isSym?"":"not ") +"ok 1 should be symlink") - var t = fs.readlinkSync("path/to/symlink") - var isTarget = t === "./file" - console.log((isTarget?"":"not ") +"ok 2 should link to ./file") - }) - .end() - -process.on("exit", function () { - console.log((closed?"":"not ")+"ok 3 should be closed") -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/fstream.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/fstream.js deleted file mode 100644 index c66d26f5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/fstream.js +++ /dev/null @@ -1,31 +0,0 @@ -exports.Abstract = require("./lib/abstract.js") -exports.Reader = require("./lib/reader.js") -exports.Writer = require("./lib/writer.js") - -exports.File = - { Reader: require("./lib/file-reader.js") - , Writer: require("./lib/file-writer.js") } - -exports.Dir = - { Reader : require("./lib/dir-reader.js") - , Writer : require("./lib/dir-writer.js") } - -exports.Link = - { Reader : require("./lib/link-reader.js") - , Writer : require("./lib/link-writer.js") } - -exports.Proxy = - { Reader : require("./lib/proxy-reader.js") - , Writer : require("./lib/proxy-writer.js") } - -exports.Reader.Dir = exports.DirReader = exports.Dir.Reader -exports.Reader.File = exports.FileReader = exports.File.Reader -exports.Reader.Link = exports.LinkReader = exports.Link.Reader -exports.Reader.Proxy = exports.ProxyReader = exports.Proxy.Reader - -exports.Writer.Dir = exports.DirWriter = exports.Dir.Writer -exports.Writer.File = exports.FileWriter = exports.File.Writer -exports.Writer.Link = exports.LinkWriter = exports.Link.Writer -exports.Writer.Proxy = exports.ProxyWriter = exports.Proxy.Writer - -exports.collect = require("./lib/collect.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/abstract.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/abstract.js deleted file mode 100644 index 11ef0e28..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/abstract.js +++ /dev/null @@ -1,85 +0,0 @@ -// the parent class for all fstreams. - -module.exports = Abstract - -var Stream = require("stream").Stream - , inherits = require("inherits") - -function Abstract () { - Stream.call(this) -} - -inherits(Abstract, Stream) - -Abstract.prototype.on = function (ev, fn) { - if (ev === "ready" && this.ready) { - process.nextTick(fn.bind(this)) - } else { - Stream.prototype.on.call(this, ev, fn) - } - return this -} - -Abstract.prototype.abort = function () { - this._aborted = true - this.emit("abort") -} - -Abstract.prototype.destroy = function () {} - -Abstract.prototype.warn = function (msg, code) { - var me = this - , er = decorate(msg, code, me) - if (!me.listeners("warn")) { - console.error("%s %s\n" + - "path = %s\n" + - "syscall = %s\n" + - "fstream_type = %s\n" + - "fstream_path = %s\n" + - "fstream_unc_path = %s\n" + - "fstream_class = %s\n" + - "fstream_stack =\n%s\n", - code || "UNKNOWN", - er.stack, - er.path, - er.syscall, - er.fstream_type, - er.fstream_path, - er.fstream_unc_path, - er.fstream_class, - er.fstream_stack.join("\n")) - } else { - me.emit("warn", er) - } -} - -Abstract.prototype.info = function (msg, code) { - this.emit("info", msg, code) -} - -Abstract.prototype.error = function (msg, code, th) { - var er = decorate(msg, code, this) - if (th) throw er - else this.emit("error", er) -} - -function decorate (er, code, me) { - if (!(er instanceof Error)) er = new Error(er) - er.code = er.code || code - er.path = er.path || me.path - er.fstream_type = er.fstream_type || me.type - er.fstream_path = er.fstream_path || me.path - if (me._path !== me.path) { - er.fstream_unc_path = er.fstream_unc_path || me._path - } - if (me.linkpath) { - er.fstream_linkpath = er.fstream_linkpath || me.linkpath - } - er.fstream_class = er.fstream_class || me.constructor.name - er.fstream_stack = er.fstream_stack || - new Error().stack.split(/\n/).slice(3).map(function (s) { - return s.replace(/^ at /, "") - }) - - return er -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/collect.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/collect.js deleted file mode 100644 index a36f780e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/collect.js +++ /dev/null @@ -1,67 +0,0 @@ -module.exports = collect - -function collect (stream) { - if (stream._collected) return - - stream._collected = true - stream.pause() - - stream.on("data", save) - stream.on("end", save) - var buf = [] - function save (b) { - if (typeof b === "string") b = new Buffer(b) - if (Buffer.isBuffer(b) && !b.length) return - buf.push(b) - } - - stream.on("entry", saveEntry) - var entryBuffer = [] - function saveEntry (e) { - collect(e) - entryBuffer.push(e) - } - - stream.on("proxy", proxyPause) - function proxyPause (p) { - p.pause() - } - - - // replace the pipe method with a new version that will - // unlock the buffered stuff. if you just call .pipe() - // without a destination, then it'll re-play the events. - stream.pipe = (function (orig) { return function (dest) { - // console.error(" === open the pipes", dest && dest.path) - - // let the entries flow through one at a time. - // Once they're all done, then we can resume completely. - var e = 0 - ;(function unblockEntry () { - var entry = entryBuffer[e++] - // console.error(" ==== unblock entry", entry && entry.path) - if (!entry) return resume() - entry.on("end", unblockEntry) - if (dest) dest.add(entry) - else stream.emit("entry", entry) - })() - - function resume () { - stream.removeListener("entry", saveEntry) - stream.removeListener("data", save) - stream.removeListener("end", save) - - stream.pipe = orig - if (dest) stream.pipe(dest) - - buf.forEach(function (b) { - if (b) stream.emit("data", b) - else stream.emit("end") - }) - - stream.resume() - } - - return dest - }})(stream.pipe) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/dir-reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/dir-reader.js deleted file mode 100644 index 346ac2b8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/dir-reader.js +++ /dev/null @@ -1,251 +0,0 @@ -// A thing that emits "entry" events with Reader objects -// Pausing it causes it to stop emitting entry events, and also -// pauses the current entry if there is one. - -module.exports = DirReader - -var fs = require("graceful-fs") - , fstream = require("../fstream.js") - , Reader = fstream.Reader - , inherits = require("inherits") - , mkdir = require("mkdirp") - , path = require("path") - , Reader = require("./reader.js") - , assert = require("assert").ok - -inherits(DirReader, Reader) - -function DirReader (props) { - var me = this - if (!(me instanceof DirReader)) throw new Error( - "DirReader must be called as constructor.") - - // should already be established as a Directory type - if (props.type !== "Directory" || !props.Directory) { - throw new Error("Non-directory type "+ props.type) - } - - me.entries = null - me._index = -1 - me._paused = false - me._length = -1 - - if (props.sort) { - this.sort = props.sort - } - - Reader.call(this, props) -} - -DirReader.prototype._getEntries = function () { - var me = this - - // race condition. might pause() before calling _getEntries, - // and then resume, and try to get them a second time. - if (me._gotEntries) return - me._gotEntries = true - - fs.readdir(me._path, function (er, entries) { - if (er) return me.error(er) - - me.entries = entries - - me.emit("entries", entries) - if (me._paused) me.once("resume", processEntries) - else processEntries() - - function processEntries () { - me._length = me.entries.length - if (typeof me.sort === "function") { - me.entries = me.entries.sort(me.sort.bind(me)) - } - me._read() - } - }) -} - -// start walking the dir, and emit an "entry" event for each one. -DirReader.prototype._read = function () { - var me = this - - if (!me.entries) return me._getEntries() - - if (me._paused || me._currentEntry || me._aborted) { - // console.error("DR paused=%j, current=%j, aborted=%j", me._paused, !!me._currentEntry, me._aborted) - return - } - - me._index ++ - if (me._index >= me.entries.length) { - if (!me._ended) { - me._ended = true - me.emit("end") - me.emit("close") - } - return - } - - // ok, handle this one, then. - - // save creating a proxy, by stat'ing the thing now. - var p = path.resolve(me._path, me.entries[me._index]) - assert(p !== me._path) - assert(me.entries[me._index]) - - // set this to prevent trying to _read() again in the stat time. - me._currentEntry = p - fs[ me.props.follow ? "stat" : "lstat" ](p, function (er, stat) { - if (er) return me.error(er) - - var who = me._proxy || me - - stat.path = p - stat.basename = path.basename(p) - stat.dirname = path.dirname(p) - var childProps = me.getChildProps.call(who, stat) - childProps.path = p - childProps.basename = path.basename(p) - childProps.dirname = path.dirname(p) - - var entry = Reader(childProps, stat) - - // console.error("DR Entry", p, stat.size) - - me._currentEntry = entry - - // "entry" events are for direct entries in a specific dir. - // "child" events are for any and all children at all levels. - // This nomenclature is not completely final. - - entry.on("pause", function (who) { - if (!me._paused && !entry._disowned) { - me.pause(who) - } - }) - - entry.on("resume", function (who) { - if (me._paused && !entry._disowned) { - me.resume(who) - } - }) - - entry.on("stat", function (props) { - me.emit("_entryStat", entry, props) - if (entry._aborted) return - if (entry._paused) entry.once("resume", function () { - me.emit("entryStat", entry, props) - }) - else me.emit("entryStat", entry, props) - }) - - entry.on("ready", function EMITCHILD () { - // console.error("DR emit child", entry._path) - if (me._paused) { - // console.error(" DR emit child - try again later") - // pause the child, and emit the "entry" event once we drain. - // console.error("DR pausing child entry") - entry.pause(me) - return me.once("resume", EMITCHILD) - } - - // skip over sockets. they can't be piped around properly, - // so there's really no sense even acknowledging them. - // if someone really wants to see them, they can listen to - // the "socket" events. - if (entry.type === "Socket") { - me.emit("socket", entry) - } else { - me.emitEntry(entry) - } - }) - - var ended = false - entry.on("close", onend) - entry.on("disown", onend) - function onend () { - if (ended) return - ended = true - me.emit("childEnd", entry) - me.emit("entryEnd", entry) - me._currentEntry = null - if (!me._paused) { - me._read() - } - } - - // XXX Remove this. Works in node as of 0.6.2 or so. - // Long filenames should not break stuff. - entry.on("error", function (er) { - if (entry._swallowErrors) { - me.warn(er) - entry.emit("end") - entry.emit("close") - } else { - me.emit("error", er) - } - }) - - // proxy up some events. - ; [ "child" - , "childEnd" - , "warn" - ].forEach(function (ev) { - entry.on(ev, me.emit.bind(me, ev)) - }) - }) -} - -DirReader.prototype.disown = function (entry) { - entry.emit("beforeDisown") - entry._disowned = true - entry.parent = entry.root = null - if (entry === this._currentEntry) { - this._currentEntry = null - } - entry.emit("disown") -} - -DirReader.prototype.getChildProps = function (stat) { - return { depth: this.depth + 1 - , root: this.root || this - , parent: this - , follow: this.follow - , filter: this.filter - , sort: this.props.sort - , hardlinks: this.props.hardlinks - } -} - -DirReader.prototype.pause = function (who) { - var me = this - if (me._paused) return - who = who || me - me._paused = true - if (me._currentEntry && me._currentEntry.pause) { - me._currentEntry.pause(who) - } - me.emit("pause", who) -} - -DirReader.prototype.resume = function (who) { - var me = this - if (!me._paused) return - who = who || me - - me._paused = false - // console.error("DR Emit Resume", me._path) - me.emit("resume", who) - if (me._paused) { - // console.error("DR Re-paused", me._path) - return - } - - if (me._currentEntry) { - if (me._currentEntry.resume) me._currentEntry.resume(who) - } else me._read() -} - -DirReader.prototype.emitEntry = function (entry) { - this.emit("entry", entry) - this.emit("child", entry) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/dir-writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/dir-writer.js deleted file mode 100644 index 7073b883..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/dir-writer.js +++ /dev/null @@ -1,171 +0,0 @@ -// It is expected that, when .add() returns false, the consumer -// of the DirWriter will pause until a "drain" event occurs. Note -// that this is *almost always going to be the case*, unless the -// thing being written is some sort of unsupported type, and thus -// skipped over. - -module.exports = DirWriter - -var fs = require("graceful-fs") - , fstream = require("../fstream.js") - , Writer = require("./writer.js") - , inherits = require("inherits") - , mkdir = require("mkdirp") - , path = require("path") - , collect = require("./collect.js") - -inherits(DirWriter, Writer) - -function DirWriter (props) { - var me = this - if (!(me instanceof DirWriter)) me.error( - "DirWriter must be called as constructor.", null, true) - - // should already be established as a Directory type - if (props.type !== "Directory" || !props.Directory) { - me.error("Non-directory type "+ props.type + " " + - JSON.stringify(props), null, true) - } - - Writer.call(this, props) -} - -DirWriter.prototype._create = function () { - var me = this - mkdir(me._path, Writer.dirmode, function (er) { - if (er) return me.error(er) - // ready to start getting entries! - me.ready = true - me.emit("ready") - me._process() - }) -} - -// a DirWriter has an add(entry) method, but its .write() doesn't -// do anything. Why a no-op rather than a throw? Because this -// leaves open the door for writing directory metadata for -// gnu/solaris style dumpdirs. -DirWriter.prototype.write = function () { - return true -} - -DirWriter.prototype.end = function () { - this._ended = true - this._process() -} - -DirWriter.prototype.add = function (entry) { - var me = this - - // console.error("\tadd", entry._path, "->", me._path) - collect(entry) - if (!me.ready || me._currentEntry) { - me._buffer.push(entry) - return false - } - - // create a new writer, and pipe the incoming entry into it. - if (me._ended) { - return me.error("add after end") - } - - me._buffer.push(entry) - me._process() - - return 0 === this._buffer.length -} - -DirWriter.prototype._process = function () { - var me = this - - // console.error("DW Process p=%j", me._processing, me.basename) - - if (me._processing) return - - var entry = me._buffer.shift() - if (!entry) { - // console.error("DW Drain") - me.emit("drain") - if (me._ended) me._finish() - return - } - - me._processing = true - // console.error("DW Entry", entry._path) - - me.emit("entry", entry) - - // ok, add this entry - // - // don't allow recursive copying - var p = entry - do { - var pp = p._path || p.path - if (pp === me.root._path || pp === me._path || - (pp && pp.indexOf(me._path) === 0)) { - // console.error("DW Exit (recursive)", entry.basename, me._path) - me._processing = false - if (entry._collected) entry.pipe() - return me._process() - } - } while (p = p.parent) - - // console.error("DW not recursive") - - // chop off the entry's root dir, replace with ours - var props = { parent: me - , root: me.root || me - , type: entry.type - , depth: me.depth + 1 } - - var p = entry._path || entry.path || entry.props.path - if (entry.parent) { - p = p.substr(entry.parent._path.length + 1) - } - // get rid of any ../../ shenanigans - props.path = path.join(me.path, path.join("/", p)) - - // if i have a filter, the child should inherit it. - props.filter = me.filter - - // all the rest of the stuff, copy over from the source. - Object.keys(entry.props).forEach(function (k) { - if (!props.hasOwnProperty(k)) { - props[k] = entry.props[k] - } - }) - - // not sure at this point what kind of writer this is. - var child = me._currentChild = new Writer(props) - child.on("ready", function () { - // console.error("DW Child Ready", child.type, child._path) - // console.error(" resuming", entry._path) - entry.pipe(child) - entry.resume() - }) - - // XXX Make this work in node. - // Long filenames should not break stuff. - child.on("error", function (er) { - if (child._swallowErrors) { - me.warn(er) - child.emit("end") - child.emit("close") - } else { - me.emit("error", er) - } - }) - - // we fire _end internally *after* end, so that we don't move on - // until any "end" listeners have had their chance to do stuff. - child.on("close", onend) - var ended = false - function onend () { - if (ended) return - ended = true - // console.error("* DW Child end", child.basename) - me._currentChild = null - me._processing = false - me._process() - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/file-reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/file-reader.js deleted file mode 100644 index b1f98618..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/file-reader.js +++ /dev/null @@ -1,147 +0,0 @@ -// Basically just a wrapper around an fs.ReadStream - -module.exports = FileReader - -var fs = require("graceful-fs") - , fstream = require("../fstream.js") - , Reader = fstream.Reader - , inherits = require("inherits") - , mkdir = require("mkdirp") - , Reader = require("./reader.js") - , EOF = {EOF: true} - , CLOSE = {CLOSE: true} - -inherits(FileReader, Reader) - -function FileReader (props) { - // console.error(" FR create", props.path, props.size, new Error().stack) - var me = this - if (!(me instanceof FileReader)) throw new Error( - "FileReader must be called as constructor.") - - // should already be established as a File type - // XXX Todo: preserve hardlinks by tracking dev+inode+nlink, - // with a HardLinkReader class. - if (!((props.type === "Link" && props.Link) || - (props.type === "File" && props.File))) { - throw new Error("Non-file type "+ props.type) - } - - me._buffer = [] - me._bytesEmitted = 0 - Reader.call(me, props) -} - -FileReader.prototype._getStream = function () { - var me = this - , stream = me._stream = fs.createReadStream(me._path, me.props) - - if (me.props.blksize) { - stream.bufferSize = me.props.blksize - } - - stream.on("open", me.emit.bind(me, "open")) - - stream.on("data", function (c) { - // console.error("\t\t%d %s", c.length, me.basename) - me._bytesEmitted += c.length - // no point saving empty chunks - if (!c.length) return - else if (me._paused || me._buffer.length) { - me._buffer.push(c) - me._read() - } else me.emit("data", c) - }) - - stream.on("end", function () { - if (me._paused || me._buffer.length) { - // console.error("FR Buffering End", me._path) - me._buffer.push(EOF) - me._read() - } else { - me.emit("end") - } - - if (me._bytesEmitted !== me.props.size) { - me.error("Didn't get expected byte count\n"+ - "expect: "+me.props.size + "\n" + - "actual: "+me._bytesEmitted) - } - }) - - stream.on("close", function () { - if (me._paused || me._buffer.length) { - // console.error("FR Buffering Close", me._path) - me._buffer.push(CLOSE) - me._read() - } else { - // console.error("FR close 1", me._path) - me.emit("close") - } - }) - - me._read() -} - -FileReader.prototype._read = function () { - var me = this - // console.error("FR _read", me._path) - if (me._paused) { - // console.error("FR _read paused", me._path) - return - } - - if (!me._stream) { - // console.error("FR _getStream calling", me._path) - return me._getStream() - } - - // clear out the buffer, if there is one. - if (me._buffer.length) { - // console.error("FR _read has buffer", me._buffer.length, me._path) - var buf = me._buffer - for (var i = 0, l = buf.length; i < l; i ++) { - var c = buf[i] - if (c === EOF) { - // console.error("FR Read emitting buffered end", me._path) - me.emit("end") - } else if (c === CLOSE) { - // console.error("FR Read emitting buffered close", me._path) - me.emit("close") - } else { - // console.error("FR Read emitting buffered data", me._path) - me.emit("data", c) - } - - if (me._paused) { - // console.error("FR Read Re-pausing at "+i, me._path) - me._buffer = buf.slice(i) - return - } - } - me._buffer.length = 0 - } - // console.error("FR _read done") - // that's about all there is to it. -} - -FileReader.prototype.pause = function (who) { - var me = this - // console.error("FR Pause", me._path) - if (me._paused) return - who = who || me - me._paused = true - if (me._stream) me._stream.pause() - me.emit("pause", who) -} - -FileReader.prototype.resume = function (who) { - var me = this - // console.error("FR Resume", me._path) - if (!me._paused) return - who = who || me - me.emit("resume", who) - me._paused = false - if (me._stream) me._stream.resume() - me._read() -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/file-writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/file-writer.js deleted file mode 100644 index 68114625..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/file-writer.js +++ /dev/null @@ -1,100 +0,0 @@ -module.exports = FileWriter - -var fs = require("graceful-fs") - , mkdir = require("mkdirp") - , Writer = require("./writer.js") - , inherits = require("inherits") - , EOF = {} - -inherits(FileWriter, Writer) - -function FileWriter (props) { - var me = this - if (!(me instanceof FileWriter)) throw new Error( - "FileWriter must be called as constructor.") - - // should already be established as a File type - if (props.type !== "File" || !props.File) { - throw new Error("Non-file type "+ props.type) - } - - me._buffer = [] - me._bytesWritten = 0 - - Writer.call(this, props) -} - -FileWriter.prototype._create = function () { - var me = this - if (me._stream) return - - var so = {} - if (me.props.flags) so.flags = me.props.flags - so.mode = Writer.filemode - if (me._old && me._old.blksize) so.bufferSize = me._old.blksize - - me._stream = fs.createWriteStream(me._path, so) - - me._stream.on("open", function (fd) { - // console.error("FW open", me._buffer, me._path) - me.ready = true - me._buffer.forEach(function (c) { - if (c === EOF) me._stream.end() - else me._stream.write(c) - }) - me.emit("ready") - // give this a kick just in case it needs it. - me.emit("drain") - }) - - me._stream.on("drain", function () { me.emit("drain") }) - - me._stream.on("close", function () { - // console.error("\n\nFW Stream Close", me._path, me.size) - me._finish() - }) -} - -FileWriter.prototype.write = function (c) { - var me = this - - me._bytesWritten += c.length - - if (!me.ready) { - if (!Buffer.isBuffer(c) && typeof c !== 'string') - throw new Error('invalid write data') - me._buffer.push(c) - return false - } - - var ret = me._stream.write(c) - // console.error("\t-- fw wrote, _stream says", ret, me._stream._queue.length) - - // allow 2 buffered writes, because otherwise there's just too - // much stop and go bs. - return ret || (me._stream._queue && me._stream._queue.length <= 2) -} - -FileWriter.prototype.end = function (c) { - var me = this - - if (c) me.write(c) - - if (!me.ready) { - me._buffer.push(EOF) - return false - } - - return me._stream.end() -} - -FileWriter.prototype._finish = function () { - var me = this - if (typeof me.size === "number" && me._bytesWritten != me.size) { - me.error( - "Did not get expected byte count.\n" + - "expect: " + me.size + "\n" + - "actual: " + me._bytesWritten) - } - Writer.prototype._finish.call(me) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/get-type.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/get-type.js deleted file mode 100644 index cd65c41d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/get-type.js +++ /dev/null @@ -1,32 +0,0 @@ -module.exports = getType - -function getType (st) { - var types = - [ "Directory" - , "File" - , "SymbolicLink" - , "Link" // special for hardlinks from tarballs - , "BlockDevice" - , "CharacterDevice" - , "FIFO" - , "Socket" ] - , type - - if (st.type && -1 !== types.indexOf(st.type)) { - st[st.type] = true - return st.type - } - - for (var i = 0, l = types.length; i < l; i ++) { - type = types[i] - var is = st[type] || st["is" + type] - if (typeof is === "function") is = is.call(st) - if (is) { - st[type] = true - st.type = type - return type - } - } - - return null -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/link-reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/link-reader.js deleted file mode 100644 index 7e7ab6ce..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/link-reader.js +++ /dev/null @@ -1,54 +0,0 @@ -// Basically just a wrapper around an fs.readlink -// -// XXX: Enhance this to support the Link type, by keeping -// a lookup table of {<dev+inode>:<path>}, so that hardlinks -// can be preserved in tarballs. - -module.exports = LinkReader - -var fs = require("graceful-fs") - , fstream = require("../fstream.js") - , inherits = require("inherits") - , mkdir = require("mkdirp") - , Reader = require("./reader.js") - -inherits(LinkReader, Reader) - -function LinkReader (props) { - var me = this - if (!(me instanceof LinkReader)) throw new Error( - "LinkReader must be called as constructor.") - - if (!((props.type === "Link" && props.Link) || - (props.type === "SymbolicLink" && props.SymbolicLink))) { - throw new Error("Non-link type "+ props.type) - } - - Reader.call(me, props) -} - -// When piping a LinkReader into a LinkWriter, we have to -// already have the linkpath property set, so that has to -// happen *before* the "ready" event, which means we need to -// override the _stat method. -LinkReader.prototype._stat = function (currentStat) { - var me = this - fs.readlink(me._path, function (er, linkpath) { - if (er) return me.error(er) - me.linkpath = me.props.linkpath = linkpath - me.emit("linkpath", linkpath) - Reader.prototype._stat.call(me, currentStat) - }) -} - -LinkReader.prototype._read = function () { - var me = this - if (me._paused) return - // basically just a no-op, since we got all the info we need - // from the _stat method - if (!me._ended) { - me.emit("end") - me.emit("close") - me._ended = true - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/link-writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/link-writer.js deleted file mode 100644 index 5c8f1e70..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/link-writer.js +++ /dev/null @@ -1,95 +0,0 @@ - -module.exports = LinkWriter - -var fs = require("graceful-fs") - , Writer = require("./writer.js") - , inherits = require("inherits") - , path = require("path") - , rimraf = require("rimraf") - -inherits(LinkWriter, Writer) - -function LinkWriter (props) { - var me = this - if (!(me instanceof LinkWriter)) throw new Error( - "LinkWriter must be called as constructor.") - - // should already be established as a Link type - if (!((props.type === "Link" && props.Link) || - (props.type === "SymbolicLink" && props.SymbolicLink))) { - throw new Error("Non-link type "+ props.type) - } - - if (props.linkpath === "") props.linkpath = "." - if (!props.linkpath) { - me.error("Need linkpath property to create " + props.type) - } - - Writer.call(this, props) -} - -LinkWriter.prototype._create = function () { - // console.error(" LW _create") - var me = this - , hard = me.type === "Link" || process.platform === "win32" - , link = hard ? "link" : "symlink" - , lp = hard ? path.resolve(me.dirname, me.linkpath) : me.linkpath - - // can only change the link path by clobbering - // For hard links, let's just assume that's always the case, since - // there's no good way to read them if we don't already know. - if (hard) return clobber(me, lp, link) - - fs.readlink(me._path, function (er, p) { - // only skip creation if it's exactly the same link - if (p && p === lp) return finish(me) - clobber(me, lp, link) - }) -} - -function clobber (me, lp, link) { - rimraf(me._path, function (er) { - if (er) return me.error(er) - create(me, lp, link) - }) -} - -function create (me, lp, link) { - fs[link](lp, me._path, function (er) { - // if this is a hard link, and we're in the process of writing out a - // directory, it's very possible that the thing we're linking to - // doesn't exist yet (especially if it was intended as a symlink), - // so swallow ENOENT errors here and just soldier in. - // Additionally, an EPERM or EACCES can happen on win32 if it's trying - // to make a link to a directory. Again, just skip it. - // A better solution would be to have fs.symlink be supported on - // windows in some nice fashion. - if (er) { - if ((er.code === "ENOENT" || - er.code === "EACCES" || - er.code === "EPERM" ) && process.platform === "win32") { - me.ready = true - me.emit("ready") - me.emit("end") - me.emit("close") - me.end = me._finish = function () {} - } else return me.error(er) - } - finish(me) - }) -} - -function finish (me) { - me.ready = true - me.emit("ready") - if (me._ended && !me._finished) me._finish() -} - -LinkWriter.prototype.end = function () { - // console.error("LW finish in end") - this._ended = true - if (this.ready) { - this._finished = true - this._finish() - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/proxy-reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/proxy-reader.js deleted file mode 100644 index a0ece34a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/proxy-reader.js +++ /dev/null @@ -1,93 +0,0 @@ -// A reader for when we don't yet know what kind of thing -// the thing is. - -module.exports = ProxyReader - -var Reader = require("./reader.js") - , getType = require("./get-type.js") - , inherits = require("inherits") - , fs = require("graceful-fs") - -inherits(ProxyReader, Reader) - -function ProxyReader (props) { - var me = this - if (!(me instanceof ProxyReader)) throw new Error( - "ProxyReader must be called as constructor.") - - me.props = props - me._buffer = [] - me.ready = false - - Reader.call(me, props) -} - -ProxyReader.prototype._stat = function () { - var me = this - , props = me.props - // stat the thing to see what the proxy should be. - , stat = props.follow ? "stat" : "lstat" - - fs[stat](props.path, function (er, current) { - var type - if (er || !current) { - type = "File" - } else { - type = getType(current) - } - - props[type] = true - props.type = me.type = type - - me._old = current - me._addProxy(Reader(props, current)) - }) -} - -ProxyReader.prototype._addProxy = function (proxy) { - var me = this - if (me._proxyTarget) { - return me.error("proxy already set") - } - - me._proxyTarget = proxy - proxy._proxy = me - - ; [ "error" - , "data" - , "end" - , "close" - , "linkpath" - , "entry" - , "entryEnd" - , "child" - , "childEnd" - , "warn" - , "stat" - ].forEach(function (ev) { - // console.error("~~ proxy event", ev, me.path) - proxy.on(ev, me.emit.bind(me, ev)) - }) - - me.emit("proxy", proxy) - - proxy.on("ready", function () { - // console.error("~~ proxy is ready!", me.path) - me.ready = true - me.emit("ready") - }) - - var calls = me._buffer - me._buffer.length = 0 - calls.forEach(function (c) { - proxy[c[0]].apply(proxy, c[1]) - }) -} - -ProxyReader.prototype.pause = function () { - return this._proxyTarget ? this._proxyTarget.pause() : false -} - -ProxyReader.prototype.resume = function () { - return this._proxyTarget ? this._proxyTarget.resume() : false -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/proxy-writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/proxy-writer.js deleted file mode 100644 index b0476633..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/proxy-writer.js +++ /dev/null @@ -1,109 +0,0 @@ -// A writer for when we don't know what kind of thing -// the thing is. That is, it's not explicitly set, -// so we're going to make it whatever the thing already -// is, or "File" -// -// Until then, collect all events. - -module.exports = ProxyWriter - -var Writer = require("./writer.js") - , getType = require("./get-type.js") - , inherits = require("inherits") - , collect = require("./collect.js") - , fs = require("fs") - -inherits(ProxyWriter, Writer) - -function ProxyWriter (props) { - var me = this - if (!(me instanceof ProxyWriter)) throw new Error( - "ProxyWriter must be called as constructor.") - - me.props = props - me._needDrain = false - - Writer.call(me, props) -} - -ProxyWriter.prototype._stat = function () { - var me = this - , props = me.props - // stat the thing to see what the proxy should be. - , stat = props.follow ? "stat" : "lstat" - - fs[stat](props.path, function (er, current) { - var type - if (er || !current) { - type = "File" - } else { - type = getType(current) - } - - props[type] = true - props.type = me.type = type - - me._old = current - me._addProxy(Writer(props, current)) - }) -} - -ProxyWriter.prototype._addProxy = function (proxy) { - // console.error("~~ set proxy", this.path) - var me = this - if (me._proxy) { - return me.error("proxy already set") - } - - me._proxy = proxy - ; [ "ready" - , "error" - , "close" - , "pipe" - , "drain" - , "warn" - ].forEach(function (ev) { - proxy.on(ev, me.emit.bind(me, ev)) - }) - - me.emit("proxy", proxy) - - var calls = me._buffer - calls.forEach(function (c) { - // console.error("~~ ~~ proxy buffered call", c[0], c[1]) - proxy[c[0]].apply(proxy, c[1]) - }) - me._buffer.length = 0 - if (me._needsDrain) me.emit("drain") -} - -ProxyWriter.prototype.add = function (entry) { - // console.error("~~ proxy add") - collect(entry) - - if (!this._proxy) { - this._buffer.push(["add", [entry]]) - this._needDrain = true - return false - } - return this._proxy.add(entry) -} - -ProxyWriter.prototype.write = function (c) { - // console.error("~~ proxy write") - if (!this._proxy) { - this._buffer.push(["write", [c]]) - this._needDrain = true - return false - } - return this._proxy.write(c) -} - -ProxyWriter.prototype.end = function (c) { - // console.error("~~ proxy end") - if (!this._proxy) { - this._buffer.push(["end", [c]]) - return false - } - return this._proxy.end(c) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/reader.js deleted file mode 100644 index eaf921cd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/reader.js +++ /dev/null @@ -1,260 +0,0 @@ - -module.exports = Reader - -var fs = require("graceful-fs") - , Stream = require("stream").Stream - , inherits = require("inherits") - , path = require("path") - , getType = require("./get-type.js") - , hardLinks = Reader.hardLinks = {} - , Abstract = require("./abstract.js") - -// Must do this *before* loading the child classes -inherits(Reader, Abstract) - -var DirReader = require("./dir-reader.js") - , FileReader = require("./file-reader.js") - , LinkReader = require("./link-reader.js") - , SocketReader = require("./socket-reader.js") - , ProxyReader = require("./proxy-reader.js") - -function Reader (props, currentStat) { - var me = this - if (!(me instanceof Reader)) return new Reader(props, currentStat) - - if (typeof props === "string") { - props = { path: props } - } - - if (!props.path) { - me.error("Must provide a path", null, true) - } - - // polymorphism. - // call fstream.Reader(dir) to get a DirReader object, etc. - // Note that, unlike in the Writer case, ProxyReader is going - // to be the *normal* state of affairs, since we rarely know - // the type of a file prior to reading it. - - - var type - , ClassType - - if (props.type && typeof props.type === "function") { - type = props.type - ClassType = type - } else { - type = getType(props) - ClassType = Reader - } - - if (currentStat && !type) { - type = getType(currentStat) - props[type] = true - props.type = type - } - - switch (type) { - case "Directory": - ClassType = DirReader - break - - case "Link": - // XXX hard links are just files. - // However, it would be good to keep track of files' dev+inode - // and nlink values, and create a HardLinkReader that emits - // a linkpath value of the original copy, so that the tar - // writer can preserve them. - // ClassType = HardLinkReader - // break - - case "File": - ClassType = FileReader - break - - case "SymbolicLink": - ClassType = LinkReader - break - - case "Socket": - ClassType = SocketReader - break - - case null: - ClassType = ProxyReader - break - } - - if (!(me instanceof ClassType)) { - return new ClassType(props) - } - - Abstract.call(me) - - me.readable = true - me.writable = false - - me.type = type - me.props = props - me.depth = props.depth = props.depth || 0 - me.parent = props.parent || null - me.root = props.root || (props.parent && props.parent.root) || me - - me._path = me.path = path.resolve(props.path) - if (process.platform === "win32") { - me.path = me._path = me.path.replace(/\?/g, "_") - if (me._path.length >= 260) { - // how DOES one create files on the moon? - // if the path has spaces in it, then UNC will fail. - me._swallowErrors = true - //if (me._path.indexOf(" ") === -1) { - me._path = "\\\\?\\" + me.path.replace(/\//g, "\\") - //} - } - } - me.basename = props.basename = path.basename(me.path) - me.dirname = props.dirname = path.dirname(me.path) - - // these have served their purpose, and are now just noisy clutter - props.parent = props.root = null - - // console.error("\n\n\n%s setting size to", props.path, props.size) - me.size = props.size - me.filter = typeof props.filter === "function" ? props.filter : null - if (props.sort === "alpha") props.sort = alphasort - - // start the ball rolling. - // this will stat the thing, and then call me._read() - // to start reading whatever it is. - // console.error("calling stat", props.path, currentStat) - me._stat(currentStat) -} - -function alphasort (a, b) { - return a === b ? 0 - : a.toLowerCase() > b.toLowerCase() ? 1 - : a.toLowerCase() < b.toLowerCase() ? -1 - : a > b ? 1 - : -1 -} - -Reader.prototype._stat = function (currentStat) { - var me = this - , props = me.props - , stat = props.follow ? "stat" : "lstat" - // console.error("Reader._stat", me._path, currentStat) - if (currentStat) process.nextTick(statCb.bind(null, null, currentStat)) - else fs[stat](me._path, statCb) - - - function statCb (er, props_) { - // console.error("Reader._stat, statCb", me._path, props_, props_.nlink) - if (er) return me.error(er) - - Object.keys(props_).forEach(function (k) { - props[k] = props_[k] - }) - - // if it's not the expected size, then abort here. - if (undefined !== me.size && props.size !== me.size) { - return me.error("incorrect size") - } - me.size = props.size - - var type = getType(props) - var handleHardlinks = props.hardlinks !== false - - // special little thing for handling hardlinks. - if (handleHardlinks && type !== "Directory" && props.nlink && props.nlink > 1) { - var k = props.dev + ":" + props.ino - // console.error("Reader has nlink", me._path, k) - if (hardLinks[k] === me._path || !hardLinks[k]) hardLinks[k] = me._path - else { - // switch into hardlink mode. - type = me.type = me.props.type = "Link" - me.Link = me.props.Link = true - me.linkpath = me.props.linkpath = hardLinks[k] - // console.error("Hardlink detected, switching mode", me._path, me.linkpath) - // Setting __proto__ would arguably be the "correct" - // approach here, but that just seems too wrong. - me._stat = me._read = LinkReader.prototype._read - } - } - - if (me.type && me.type !== type) { - me.error("Unexpected type: " + type) - } - - // if the filter doesn't pass, then just skip over this one. - // still have to emit end so that dir-walking can move on. - if (me.filter) { - var who = me._proxy || me - // special handling for ProxyReaders - if (!me.filter.call(who, who, props)) { - if (!me._disowned) { - me.abort() - me.emit("end") - me.emit("close") - } - return - } - } - - // last chance to abort or disown before the flow starts! - var events = ["_stat", "stat", "ready"] - var e = 0 - ;(function go () { - if (me._aborted) { - me.emit("end") - me.emit("close") - return - } - - if (me._paused) { - me.once("resume", go) - return - } - - var ev = events[e ++] - if (!ev) return me._read() - me.emit(ev, props) - go() - })() - } -} - -Reader.prototype.pipe = function (dest, opts) { - var me = this - if (typeof dest.add === "function") { - // piping to a multi-compatible, and we've got directory entries. - me.on("entry", function (entry) { - var ret = dest.add(entry) - if (false === ret) { - me.pause() - } - }) - } - - // console.error("R Pipe apply Stream Pipe") - return Stream.prototype.pipe.apply(this, arguments) -} - -Reader.prototype.pause = function (who) { - this._paused = true - who = who || this - this.emit("pause", who) - if (this._stream) this._stream.pause(who) -} - -Reader.prototype.resume = function (who) { - this._paused = false - who = who || this - this.emit("resume", who) - if (this._stream) this._stream.resume(who) - this._read() -} - -Reader.prototype._read = function () { - this.error("Cannot read unknown type: "+this.type) -} - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/socket-reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/socket-reader.js deleted file mode 100644 index e89c1731..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/socket-reader.js +++ /dev/null @@ -1,38 +0,0 @@ -// Just get the stats, and then don't do anything. -// You can't really "read" from a socket. You "connect" to it. -// Mostly, this is here so that reading a dir with a socket in it -// doesn't blow up. - -module.exports = SocketReader - -var fs = require("graceful-fs") - , fstream = require("../fstream.js") - , inherits = require("inherits") - , mkdir = require("mkdirp") - , Reader = require("./reader.js") - -inherits(SocketReader, Reader) - -function SocketReader (props) { - var me = this - if (!(me instanceof SocketReader)) throw new Error( - "SocketReader must be called as constructor.") - - if (!(props.type === "Socket" && props.Socket)) { - throw new Error("Non-socket type "+ props.type) - } - - Reader.call(me, props) -} - -SocketReader.prototype._read = function () { - var me = this - if (me._paused) return - // basically just a no-op, since we got all the info we have - // from the _stat method - if (!me._ended) { - me.emit("end") - me.emit("close") - me._ended = true - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/writer.js deleted file mode 100644 index 5599fb22..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/lib/writer.js +++ /dev/null @@ -1,389 +0,0 @@ - -module.exports = Writer - -var fs = require("graceful-fs") - , inherits = require("inherits") - , rimraf = require("rimraf") - , mkdir = require("mkdirp") - , path = require("path") - , umask = process.platform === "win32" ? 0 : process.umask() - , getType = require("./get-type.js") - , Abstract = require("./abstract.js") - -// Must do this *before* loading the child classes -inherits(Writer, Abstract) - -Writer.dirmode = 0777 & (~umask) -Writer.filemode = 0666 & (~umask) - -var DirWriter = require("./dir-writer.js") - , LinkWriter = require("./link-writer.js") - , FileWriter = require("./file-writer.js") - , ProxyWriter = require("./proxy-writer.js") - -// props is the desired state. current is optionally the current stat, -// provided here so that subclasses can avoid statting the target -// more than necessary. -function Writer (props, current) { - var me = this - - if (typeof props === "string") { - props = { path: props } - } - - if (!props.path) me.error("Must provide a path", null, true) - - // polymorphism. - // call fstream.Writer(dir) to get a DirWriter object, etc. - var type = getType(props) - , ClassType = Writer - - switch (type) { - case "Directory": - ClassType = DirWriter - break - case "File": - ClassType = FileWriter - break - case "Link": - case "SymbolicLink": - ClassType = LinkWriter - break - case null: - // Don't know yet what type to create, so we wrap in a proxy. - ClassType = ProxyWriter - break - } - - if (!(me instanceof ClassType)) return new ClassType(props) - - // now get down to business. - - Abstract.call(me) - - // props is what we want to set. - // set some convenience properties as well. - me.type = props.type - me.props = props - me.depth = props.depth || 0 - me.clobber = false === props.clobber ? props.clobber : true - me.parent = props.parent || null - me.root = props.root || (props.parent && props.parent.root) || me - - me._path = me.path = path.resolve(props.path) - if (process.platform === "win32") { - me.path = me._path = me.path.replace(/\?/g, "_") - if (me._path.length >= 260) { - me._swallowErrors = true - me._path = "\\\\?\\" + me.path.replace(/\//g, "\\") - } - } - me.basename = path.basename(props.path) - me.dirname = path.dirname(props.path) - me.linkpath = props.linkpath || null - - props.parent = props.root = null - - // console.error("\n\n\n%s setting size to", props.path, props.size) - me.size = props.size - - if (typeof props.mode === "string") { - props.mode = parseInt(props.mode, 8) - } - - me.readable = false - me.writable = true - - // buffer until ready, or while handling another entry - me._buffer = [] - me.ready = false - - me.filter = typeof props.filter === "function" ? props.filter: null - - // start the ball rolling. - // this checks what's there already, and then calls - // me._create() to call the impl-specific creation stuff. - me._stat(current) -} - -// Calling this means that it's something we can't create. -// Just assert that it's already there, otherwise raise a warning. -Writer.prototype._create = function () { - var me = this - fs[me.props.follow ? "stat" : "lstat"](me._path, function (er, current) { - if (er) { - return me.warn("Cannot create " + me._path + "\n" + - "Unsupported type: "+me.type, "ENOTSUP") - } - me._finish() - }) -} - -Writer.prototype._stat = function (current) { - var me = this - , props = me.props - , stat = props.follow ? "stat" : "lstat" - , who = me._proxy || me - - if (current) statCb(null, current) - else fs[stat](me._path, statCb) - - function statCb (er, current) { - if (me.filter && !me.filter.call(who, who, current)) { - me._aborted = true - me.emit("end") - me.emit("close") - return - } - - // if it's not there, great. We'll just create it. - // if it is there, then we'll need to change whatever differs - if (er || !current) { - return create(me) - } - - me._old = current - var currentType = getType(current) - - // if it's a type change, then we need to clobber or error. - // if it's not a type change, then let the impl take care of it. - if (currentType !== me.type) { - return rimraf(me._path, function (er) { - if (er) return me.error(er) - me._old = null - create(me) - }) - } - - // otherwise, just handle in the app-specific way - // this creates a fs.WriteStream, or mkdir's, or whatever - create(me) - } -} - -function create (me) { - // console.error("W create", me._path, Writer.dirmode) - - // XXX Need to clobber non-dirs that are in the way, - // unless { clobber: false } in the props. - mkdir(path.dirname(me._path), Writer.dirmode, function (er, made) { - // console.error("W created", path.dirname(me._path), er) - if (er) return me.error(er) - - // later on, we have to set the mode and owner for these - me._madeDir = made - return me._create() - }) -} - -function endChmod (me, want, current, path, cb) { - var wantMode = want.mode - , chmod = want.follow || me.type !== "SymbolicLink" - ? "chmod" : "lchmod" - - if (!fs[chmod]) return cb() - if (typeof wantMode !== "number") return cb() - - var curMode = current.mode & 0777 - wantMode = wantMode & 0777 - if (wantMode === curMode) return cb() - - fs[chmod](path, wantMode, cb) -} - - -function endChown (me, want, current, path, cb) { - // Don't even try it unless root. Too easy to EPERM. - if (process.platform === "win32") return cb() - if (!process.getuid || !process.getuid() === 0) return cb() - if (typeof want.uid !== "number" && - typeof want.gid !== "number" ) return cb() - - if (current.uid === want.uid && - current.gid === want.gid) return cb() - - var chown = (me.props.follow || me.type !== "SymbolicLink") - ? "chown" : "lchown" - if (!fs[chown]) return cb() - - if (typeof want.uid !== "number") want.uid = current.uid - if (typeof want.gid !== "number") want.gid = current.gid - - fs[chown](path, want.uid, want.gid, cb) -} - -function endUtimes (me, want, current, path, cb) { - if (!fs.utimes || process.platform === "win32") return cb() - - var utimes = (want.follow || me.type !== "SymbolicLink") - ? "utimes" : "lutimes" - - if (utimes === "lutimes" && !fs[utimes]) { - utimes = "utimes" - } - - if (!fs[utimes]) return cb() - - var curA = current.atime - , curM = current.mtime - , meA = want.atime - , meM = want.mtime - - if (meA === undefined) meA = curA - if (meM === undefined) meM = curM - - if (!isDate(meA)) meA = new Date(meA) - if (!isDate(meM)) meA = new Date(meM) - - if (meA.getTime() === curA.getTime() && - meM.getTime() === curM.getTime()) return cb() - - fs[utimes](path, meA, meM, cb) -} - - -// XXX This function is beastly. Break it up! -Writer.prototype._finish = function () { - var me = this - - // console.error(" W Finish", me._path, me.size) - - // set up all the things. - // At this point, we're already done writing whatever we've gotta write, - // adding files to the dir, etc. - var todo = 0 - var errState = null - var done = false - - if (me._old) { - // the times will almost *certainly* have changed. - // adds the utimes syscall, but remove another stat. - me._old.atime = new Date(0) - me._old.mtime = new Date(0) - // console.error(" W Finish Stale Stat", me._path, me.size) - setProps(me._old) - } else { - var stat = me.props.follow ? "stat" : "lstat" - // console.error(" W Finish Stating", me._path, me.size) - fs[stat](me._path, function (er, current) { - // console.error(" W Finish Stated", me._path, me.size, current) - if (er) { - // if we're in the process of writing out a - // directory, it's very possible that the thing we're linking to - // doesn't exist yet (especially if it was intended as a symlink), - // so swallow ENOENT errors here and just soldier on. - if (er.code === "ENOENT" && - (me.type === "Link" || me.type === "SymbolicLink") && - process.platform === "win32") { - me.ready = true - me.emit("ready") - me.emit("end") - me.emit("close") - me.end = me._finish = function () {} - return - } else return me.error(er) - } - setProps(me._old = current) - }) - } - - return - - function setProps (current) { - todo += 3 - endChmod(me, me.props, current, me._path, next("chmod")) - endChown(me, me.props, current, me._path, next("chown")) - endUtimes(me, me.props, current, me._path, next("utimes")) - } - - function next (what) { - return function (er) { - // console.error(" W Finish", what, todo) - if (errState) return - if (er) { - er.fstream_finish_call = what - return me.error(errState = er) - } - if (--todo > 0) return - if (done) return - done = true - - // we may still need to set the mode/etc. on some parent dirs - // that were created previously. delay end/close until then. - if (!me._madeDir) return end() - else endMadeDir(me, me._path, end) - - function end (er) { - if (er) { - er.fstream_finish_call = "setupMadeDir" - return me.error(er) - } - // all the props have been set, so we're completely done. - me.emit("end") - me.emit("close") - } - } - } -} - -function endMadeDir (me, p, cb) { - var made = me._madeDir - // everything *between* made and path.dirname(me._path) - // needs to be set up. Note that this may just be one dir. - var d = path.dirname(p) - - endMadeDir_(me, d, function (er) { - if (er) return cb(er) - if (d === made) { - return cb() - } - endMadeDir(me, d, cb) - }) -} - -function endMadeDir_ (me, p, cb) { - var dirProps = {} - Object.keys(me.props).forEach(function (k) { - dirProps[k] = me.props[k] - - // only make non-readable dirs if explicitly requested. - if (k === "mode" && me.type !== "Directory") { - dirProps[k] = dirProps[k] | 0111 - } - }) - - var todo = 3 - , errState = null - fs.stat(p, function (er, current) { - if (er) return cb(errState = er) - endChmod(me, dirProps, current, p, next) - endChown(me, dirProps, current, p, next) - endUtimes(me, dirProps, current, p, next) - }) - - function next (er) { - if (errState) return - if (er) return cb(errState = er) - if (-- todo === 0) return cb() - } -} - -Writer.prototype.pipe = function () { - this.error("Can't pipe from writable stream") -} - -Writer.prototype.add = function () { - this.error("Cannot add to non-Directory type") -} - -Writer.prototype.write = function () { - return true -} - -function objectToString (d) { - return Object.prototype.toString.call(d) -} - -function isDate(d) { - return typeof d === 'object' && objectToString(d) === '[object Date]'; -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/package.json deleted file mode 100644 index c3b07d0a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "name": "fstream", - "description": "Advanced file system stream things", - "version": "0.1.25", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/fstream.git" - }, - "main": "fstream.js", - "engines": { - "node": ">=0.6" - }, - "dependencies": { - "rimraf": "2", - "mkdirp": "0.3", - "graceful-fs": "~2.0.0", - "inherits": "~2.0.0" - }, - "devDependencies": { - "tap": "" - }, - "scripts": { - "test": "tap examples/*.js" - }, - "license": "BSD", - "readme": "Like FS streams, but with stat on them, and supporting directories and\nsymbolic links, as well as normal files. Also, you can use this to set\nthe stats on a file, even if you don't change its contents, or to create\na symlink, etc.\n\nSo, for example, you can \"write\" a directory, and it'll call `mkdir`. You\ncan specify a uid and gid, and it'll call `chown`. You can specify a\n`mtime` and `atime`, and it'll call `utimes`. You can call it a symlink\nand provide a `linkpath` and it'll call `symlink`.\n\nNote that it won't automatically resolve symbolic links. So, if you\ncall `fstream.Reader('/some/symlink')` then you'll get an object\nthat stats and then ends immediately (since it has no data). To follow\nsymbolic links, do this: `fstream.Reader({path:'/some/symlink', follow:\ntrue })`.\n\nThere are various checks to make sure that the bytes emitted are the\nsame as the intended size, if the size is set.\n\n## Examples\n\n```javascript\nfstream\n .Writer({ path: \"path/to/file\"\n , mode: 0755\n , size: 6\n })\n .write(\"hello\\n\")\n .end()\n```\n\nThis will create the directories if they're missing, and then write\n`hello\\n` into the file, chmod it to 0755, and assert that 6 bytes have\nbeen written when it's done.\n\n```javascript\nfstream\n .Writer({ path: \"path/to/file\"\n , mode: 0755\n , size: 6\n , flags: \"a\"\n })\n .write(\"hello\\n\")\n .end()\n```\n\nYou can pass flags in, if you want to append to a file.\n\n```javascript\nfstream\n .Writer({ path: \"path/to/symlink\"\n , linkpath: \"./file\"\n , SymbolicLink: true\n , mode: \"0755\" // octal strings supported\n })\n .end()\n```\n\nIf isSymbolicLink is a function, it'll be called, and if it returns\ntrue, then it'll treat it as a symlink. If it's not a function, then\nany truish value will make a symlink, or you can set `type:\n'SymbolicLink'`, which does the same thing.\n\nNote that the linkpath is relative to the symbolic link location, not\nthe parent dir or cwd.\n\n```javascript\nfstream\n .Reader(\"path/to/dir\")\n .pipe(fstream.Writer(\"path/to/other/dir\"))\n```\n\nThis will do like `cp -Rp path/to/dir path/to/other/dir`. If the other\ndir exists and isn't a directory, then it'll emit an error. It'll also\nset the uid, gid, mode, etc. to be identical. In this way, it's more\nlike `rsync -a` than simply a copy.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/fstream/issues" - }, - "homepage": "https://github.com/isaacs/fstream", - "_id": "fstream@0.1.25", - "dist": { - "shasum": "cca977eec0cdc5382161b2feeeb567d5f95783b0" - }, - "_from": "fstream@~0.1.8", - "_resolved": "https://registry.npmjs.org/fstream/-/fstream-0.1.25.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/LICENSE deleted file mode 100644 index dea3013d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/README.md deleted file mode 100644 index b1c56658..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/README.md +++ /dev/null @@ -1,42 +0,0 @@ -Browser-friendly inheritance fully compatible with standard node.js -[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). - -This package exports standard `inherits` from node.js `util` module in -node environment, but also provides alternative browser-friendly -implementation through [browser -field](https://gist.github.com/shtylman/4339901). Alternative -implementation is a literal copy of standard one located in standalone -module to avoid requiring of `util`. It also has a shim for old -browsers with no `Object.create` support. - -While keeping you sure you are using standard `inherits` -implementation in node.js environment, it allows bundlers such as -[browserify](https://github.com/substack/node-browserify) to not -include full `util` package to your client code if all you need is -just `inherits` function. It worth, because browser shim for `util` -package is large and `inherits` is often the single function you need -from it. - -It's recommended to use this package instead of -`require('util').inherits` for any code that has chances to be used -not only in node.js but in browser too. - -## usage - -```js -var inherits = require('inherits'); -// then use exactly as the standard one -``` - -## note on version ~1.0 - -Version ~1.0 had completely different motivation and is not compatible -neither with 2.0 nor with standard node.js `inherits`. - -If you are using version ~1.0 and planning to switch to ~2.0, be -careful: - -* new version uses `super_` instead of `super` for referencing - superclass -* new version overwrites current prototype while old one preserves any - existing fields on it diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/inherits.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/inherits.js deleted file mode 100644 index 29f5e24f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/inherits.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('util').inherits diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/inherits_browser.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/inherits_browser.js deleted file mode 100644 index c1e78a75..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/inherits_browser.js +++ /dev/null @@ -1,23 +0,0 @@ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/package.json deleted file mode 100644 index 8b3b563d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "inherits", - "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "version": "2.0.1", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented", - "inherits", - "browser", - "browserify" - ], - "main": "./inherits.js", - "browser": "./inherits_browser.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/inherits" - }, - "license": "ISC", - "scripts": { - "test": "node test" - }, - "readme": "Browser-friendly inheritance fully compatible with standard node.js\n[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).\n\nThis package exports standard `inherits` from node.js `util` module in\nnode environment, but also provides alternative browser-friendly\nimplementation through [browser\nfield](https://gist.github.com/shtylman/4339901). Alternative\nimplementation is a literal copy of standard one located in standalone\nmodule to avoid requiring of `util`. It also has a shim for old\nbrowsers with no `Object.create` support.\n\nWhile keeping you sure you are using standard `inherits`\nimplementation in node.js environment, it allows bundlers such as\n[browserify](https://github.com/substack/node-browserify) to not\ninclude full `util` package to your client code if all you need is\njust `inherits` function. It worth, because browser shim for `util`\npackage is large and `inherits` is often the single function you need\nfrom it.\n\nIt's recommended to use this package instead of\n`require('util').inherits` for any code that has chances to be used\nnot only in node.js but in browser too.\n\n## usage\n\n```js\nvar inherits = require('inherits');\n// then use exactly as the standard one\n```\n\n## note on version ~1.0\n\nVersion ~1.0 had completely different motivation and is not compatible\nneither with 2.0 nor with standard node.js `inherits`.\n\nIf you are using version ~1.0 and planning to switch to ~2.0, be\ncareful:\n\n* new version uses `super_` instead of `super` for referencing\n superclass\n* new version overwrites current prototype while old one preserves any\n existing fields on it\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/inherits/issues" - }, - "homepage": "https://github.com/isaacs/inherits", - "_id": "inherits@2.0.1", - "dist": { - "shasum": "b084742f5bd8d0e2e285cb3a8957f7e733389ef2" - }, - "_from": "inherits@2", - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/test.js deleted file mode 100644 index fc53012d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/inherits/test.js +++ /dev/null @@ -1,25 +0,0 @@ -var inherits = require('./inherits.js') -var assert = require('assert') - -function test(c) { - assert(c.constructor === Child) - assert(c.constructor.super_ === Parent) - assert(Object.getPrototypeOf(c) === Child.prototype) - assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) - assert(c instanceof Child) - assert(c instanceof Parent) -} - -function Child() { - Parent.call(this) - test(this) -} - -function Parent() {} - -inherits(Child, Parent) - -var c = new Child -test(c) - -console.log('ok') diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/package.json deleted file mode 100644 index fd335461..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "name": "tar", - "description": "tar for node", - "version": "0.1.19", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-tar.git" - }, - "main": "tar.js", - "scripts": { - "test": "tap test/*.js" - }, - "dependencies": { - "inherits": "2", - "block-stream": "*", - "fstream": "~0.1.8" - }, - "devDependencies": { - "tap": "0.x", - "rimraf": "1.x" - }, - "license": "BSD", - "readme": "# node-tar\n\nTar for Node.js.\n\n[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/)\n\n## API\n\nSee `examples/` for usage examples.\n\n### var tar = require('tar')\n\nReturns an object with `.Pack`, `.Extract` and `.Parse` methods.\n\n### tar.Pack([properties])\n\nReturns a through stream. Use\n[fstream](https://npmjs.org/package/fstream) to write files into the\npack stream and you will receive tar archive data from the pack\nstream.\n\nThe optional `properties` object are used to set properties in the tar\n'Global Extended Header'.\n\n### tar.Extract([options])\n\nReturns a through stream. Write tar data to the stream and the files\nin the tarball will be extracted onto the filesystem.\n\n`options` can be:\n\n```js\n{\n path: '/path/to/extract/tar/into',\n strip: 0, // how many path segments to strip from the root when extracting\n}\n```\n\n`options` also get passed to the `fstream.Writer` instance that `tar`\nuses internally.\n\n### tar.Parse()\n\nReturns a writable stream. Write tar data to it and it will emit\n`entry` events for each entry parsed from the tarball. This is used by\n`tar.Extract`.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/node-tar/issues" - }, - "homepage": "https://github.com/isaacs/node-tar", - "_id": "tar@0.1.19", - "dist": { - "shasum": "bd31a1030d51bfbbbf4b3e174603500389a1250d" - }, - "_from": "tar@~0.1.18", - "_resolved": "https://registry.npmjs.org/tar/-/tar-0.1.19.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/tar.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/tar.js deleted file mode 100644 index a81298b9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/tar.js +++ /dev/null @@ -1,173 +0,0 @@ -// field paths that every tar file must have. -// header is padded to 512 bytes. -var f = 0 - , fields = {} - , path = fields.path = f++ - , mode = fields.mode = f++ - , uid = fields.uid = f++ - , gid = fields.gid = f++ - , size = fields.size = f++ - , mtime = fields.mtime = f++ - , cksum = fields.cksum = f++ - , type = fields.type = f++ - , linkpath = fields.linkpath = f++ - , headerSize = 512 - , blockSize = 512 - , fieldSize = [] - -fieldSize[path] = 100 -fieldSize[mode] = 8 -fieldSize[uid] = 8 -fieldSize[gid] = 8 -fieldSize[size] = 12 -fieldSize[mtime] = 12 -fieldSize[cksum] = 8 -fieldSize[type] = 1 -fieldSize[linkpath] = 100 - -// "ustar\0" may introduce another bunch of headers. -// these are optional, and will be nulled out if not present. - -var ustar = fields.ustar = f++ - , ustarver = fields.ustarver = f++ - , uname = fields.uname = f++ - , gname = fields.gname = f++ - , devmaj = fields.devmaj = f++ - , devmin = fields.devmin = f++ - , prefix = fields.prefix = f++ - , fill = fields.fill = f++ - -// terminate fields. -fields[f] = null - -fieldSize[ustar] = 6 -fieldSize[ustarver] = 2 -fieldSize[uname] = 32 -fieldSize[gname] = 32 -fieldSize[devmaj] = 8 -fieldSize[devmin] = 8 -fieldSize[prefix] = 155 -fieldSize[fill] = 12 - -// nb: prefix field may in fact be 130 bytes of prefix, -// a null char, 12 bytes for atime, 12 bytes for ctime. -// -// To recognize this format: -// 1. prefix[130] === ' ' or '\0' -// 2. atime and ctime are octal numeric values -// 3. atime and ctime have ' ' in their last byte - -var fieldEnds = {} - , fieldOffs = {} - , fe = 0 -for (var i = 0; i < f; i ++) { - fieldOffs[i] = fe - fieldEnds[i] = (fe += fieldSize[i]) -} - -// build a translation table of field paths. -Object.keys(fields).forEach(function (f) { - if (fields[f] !== null) fields[fields[f]] = f -}) - -// different values of the 'type' field -// paths match the values of Stats.isX() functions, where appropriate -var types = - { 0: "File" - , "\0": "OldFile" // like 0 - , "": "OldFile" - , 1: "Link" - , 2: "SymbolicLink" - , 3: "CharacterDevice" - , 4: "BlockDevice" - , 5: "Directory" - , 6: "FIFO" - , 7: "ContiguousFile" // like 0 - // posix headers - , g: "GlobalExtendedHeader" // k=v for the rest of the archive - , x: "ExtendedHeader" // k=v for the next file - // vendor-specific stuff - , A: "SolarisACL" // skip - , D: "GNUDumpDir" // like 5, but with data, which should be skipped - , I: "Inode" // metadata only, skip - , K: "NextFileHasLongLinkpath" // data = link path of next file - , L: "NextFileHasLongPath" // data = path of next file - , M: "ContinuationFile" // skip - , N: "OldGnuLongPath" // like L - , S: "SparseFile" // skip - , V: "TapeVolumeHeader" // skip - , X: "OldExtendedHeader" // like x - } - -Object.keys(types).forEach(function (t) { - types[types[t]] = types[types[t]] || t -}) - -// values for the mode field -var modes = - { suid: 04000 // set uid on extraction - , sgid: 02000 // set gid on extraction - , svtx: 01000 // set restricted deletion flag on dirs on extraction - , uread: 0400 - , uwrite: 0200 - , uexec: 0100 - , gread: 040 - , gwrite: 020 - , gexec: 010 - , oread: 4 - , owrite: 2 - , oexec: 1 - , all: 07777 - } - -var numeric = - { mode: true - , uid: true - , gid: true - , size: true - , mtime: true - , devmaj: true - , devmin: true - , cksum: true - , atime: true - , ctime: true - , dev: true - , ino: true - , nlink: true - } - -Object.keys(modes).forEach(function (t) { - modes[modes[t]] = modes[modes[t]] || t -}) - -var knownExtended = - { atime: true - , charset: true - , comment: true - , ctime: true - , gid: true - , gname: true - , linkpath: true - , mtime: true - , path: true - , realtime: true - , security: true - , size: true - , uid: true - , uname: true } - - -exports.fields = fields -exports.fieldSize = fieldSize -exports.fieldOffs = fieldOffs -exports.fieldEnds = fieldEnds -exports.types = types -exports.modes = modes -exports.numeric = numeric -exports.headerSize = headerSize -exports.blockSize = blockSize -exports.knownExtended = knownExtended - -exports.Pack = require("./lib/pack.js") -exports.Parse = require("./lib/parse.js") -exports.Extract = require("./lib/extract.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/00-setup-fixtures.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/00-setup-fixtures.js deleted file mode 100644 index 1524ff7a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/00-setup-fixtures.js +++ /dev/null @@ -1,53 +0,0 @@ -// the fixtures have some weird stuff that is painful -// to include directly in the repo for various reasons. -// -// So, unpack the fixtures with the system tar first. -// -// This means, of course, that it'll only work if you -// already have a tar implementation, and some of them -// will not properly unpack the fixtures anyway. -// -// But, since usually those tests will fail on Windows -// and other systems with less capable filesystems anyway, -// at least this way we don't cause inconveniences by -// merely cloning the repo or installing the package. - -var tap = require("tap") -, child_process = require("child_process") -, rimraf = require("rimraf") -, test = tap.test -, path = require("path") - -test("clean fixtures", function (t) { - rimraf(path.resolve(__dirname, "fixtures"), function (er) { - t.ifError(er, "rimraf ./fixtures/") - t.end() - }) -}) - -test("clean tmp", function (t) { - rimraf(path.resolve(__dirname, "tmp"), function (er) { - t.ifError(er, "rimraf ./tmp/") - t.end() - }) -}) - -test("extract fixtures", function (t) { - var c = child_process.spawn("tar" - ,["xzvf", "fixtures.tgz"] - ,{ cwd: __dirname }) - - c.stdout.on("data", errwrite) - c.stderr.on("data", errwrite) - function errwrite (chunk) { - process.stderr.write(chunk) - } - - c.on("exit", function (code) { - t.equal(code, 0, "extract fixtures should exit with 0") - if (code) { - t.comment("Note, all tests from here on out will fail because of this.") - } - t.end() - }) -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/extract.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/extract.js deleted file mode 100644 index fff48181..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/extract.js +++ /dev/null @@ -1,358 +0,0 @@ -var tap = require("tap") - , tar = require("../tar.js") - , fs = require("fs") - , path = require("path") - , file = path.resolve(__dirname, "fixtures/c.tar") - , target = path.resolve(__dirname, "tmp/extract-test") - , index = 0 - , fstream = require("fstream") - - , ee = 0 - , expectEntries = -[ { path: 'c.txt', - mode: '644', - type: '0', - depth: undefined, - size: 513, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'cc.txt', - mode: '644', - type: '0', - depth: undefined, - size: 513, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '0', - depth: undefined, - size: 100, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'Ω.txt', - mode: '644', - type: '0', - depth: undefined, - size: 2, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: 'Ω.txt', - mode: '644', - type: '0', - depth: undefined, - size: 2, - linkpath: '', - nlink: 1, - dev: 234881026, - ino: 51693379 }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '0', - depth: undefined, - size: 200, - linkpath: '', - nlink: 1, - dev: 234881026, - ino: 51681874 }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '0', - depth: undefined, - size: 201, - linkpath: '', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', - mode: '777', - type: '2', - depth: undefined, - size: 0, - linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - nlink: undefined, - dev: undefined, - ino: undefined }, - { path: '200-hard', - mode: '644', - type: '0', - depth: undefined, - size: 200, - linkpath: '', - nlink: 2, - dev: 234881026, - ino: 51681874 }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '644', - type: '1', - depth: undefined, - size: 0, - linkpath: path.resolve(target, '200-hard'), - nlink: 2, - dev: 234881026, - ino: 51681874 } ] - - , ef = 0 - , expectFiles = -[ { path: '', - mode: '40755', - type: 'Directory', - depth: 0, - linkpath: undefined }, - { path: '/200-hard', - mode: '100644', - type: 'File', - depth: 1, - size: 200, - linkpath: undefined, - nlink: 2 }, - { path: '/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '100644', - type: 'Link', - depth: 1, - size: 200, - linkpath: path.join(target, '200-hard'), - nlink: 2 }, - { path: '/200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', - mode: '120777', - type: 'SymbolicLink', - depth: 1, - size: 200, - linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - nlink: 1 }, - { path: '/c.txt', - mode: '100644', - type: 'File', - depth: 1, - size: 513, - linkpath: undefined, - nlink: 1 }, - { path: '/cc.txt', - mode: '100644', - type: 'File', - depth: 1, - size: 513, - linkpath: undefined, - nlink: 1 }, - { path: '/r', - mode: '40755', - type: 'Directory', - depth: 1, - linkpath: undefined }, - { path: '/r/e', - mode: '40755', - type: 'Directory', - depth: 2, - linkpath: undefined }, - { path: '/r/e/a', - mode: '40755', - type: 'Directory', - depth: 3, - linkpath: undefined }, - { path: '/r/e/a/l', - mode: '40755', - type: 'Directory', - depth: 4, - linkpath: undefined }, - { path: '/r/e/a/l/l', - mode: '40755', - type: 'Directory', - depth: 5, - linkpath: undefined }, - { path: '/r/e/a/l/l/y', - mode: '40755', - type: 'Directory', - depth: 6, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-', - mode: '40755', - type: 'Directory', - depth: 7, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d', - mode: '40755', - type: 'Directory', - depth: 8, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e', - mode: '40755', - type: 'Directory', - depth: 9, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e', - mode: '40755', - type: 'Directory', - depth: 10, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p', - mode: '40755', - type: 'Directory', - depth: 11, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-', - mode: '40755', - type: 'Directory', - depth: 12, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f', - mode: '40755', - type: 'Directory', - depth: 13, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o', - mode: '40755', - type: 'Directory', - depth: 14, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l', - mode: '40755', - type: 'Directory', - depth: 15, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d', - mode: '40755', - type: 'Directory', - depth: 16, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e', - mode: '40755', - type: 'Directory', - depth: 17, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r', - mode: '40755', - type: 'Directory', - depth: 18, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-', - mode: '40755', - type: 'Directory', - depth: 19, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p', - mode: '40755', - type: 'Directory', - depth: 20, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a', - mode: '40755', - type: 'Directory', - depth: 21, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t', - mode: '40755', - type: 'Directory', - depth: 22, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h', - mode: '40755', - type: 'Directory', - depth: 23, - linkpath: undefined }, - { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: '100644', - type: 'File', - depth: 24, - size: 100, - linkpath: undefined, - nlink: 1 }, - { path: '/Ω.txt', - mode: '100644', - type: 'File', - depth: 1, - size: 2, - linkpath: undefined, - nlink: 1 } ] - - - -// The extract class basically just pipes the input -// to a Reader, and then to a fstream.DirWriter - -// So, this is as much a test of fstream.Reader and fstream.Writer -// as it is of tar.Extract, but it sort of makes sense. - -tap.test("extract test", function (t) { - var extract = tar.Extract(target) - var inp = fs.createReadStream(file) - - // give it a weird buffer size to try to break in odd places - inp.bufferSize = 1234 - - inp.pipe(extract) - - extract.on("end", function () { - t.equal(ee, expectEntries.length, "should see "+ee+" entries") - - // should get no more entries after end - extract.removeAllListeners("entry") - extract.on("entry", function (e) { - t.fail("Should not get entries after end!") - }) - - next() - }) - - extract.on("entry", function (entry) { - var found = - { path: entry.path - , mode: entry.props.mode.toString(8) - , type: entry.props.type - , depth: entry.props.depth - , size: entry.props.size - , linkpath: entry.props.linkpath - , nlink: entry.props.nlink - , dev: entry.props.dev - , ino: entry.props.ino - } - - var wanted = expectEntries[ee ++] - - t.equivalent(found, wanted, "tar entry " + ee + " " + wanted.path) - }) - - function next () { - var r = fstream.Reader({ path: target - , type: "Directory" - // this is just to encourage consistency - , sort: "alpha" }) - - r.on("ready", function () { - foundEntry(r) - }) - - r.on("end", finish) - - function foundEntry (entry) { - var p = entry.path.substr(target.length) - var found = - { path: p - , mode: entry.props.mode.toString(8) - , type: entry.props.type - , depth: entry.props.depth - , size: entry.props.size - , linkpath: entry.props.linkpath - , nlink: entry.props.nlink - } - - var wanted = expectFiles[ef ++] - - t.has(found, wanted, "unpacked file " + ef + " " + wanted.path) - - entry.on("entry", foundEntry) - } - - function finish () { - t.equal(ef, expectFiles.length, "should have "+ef+" items") - t.end() - } - } -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/fixtures.tgz b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/fixtures.tgz deleted file mode 100644 index 4501bcf2..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/fixtures.tgz and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/header.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/header.js deleted file mode 100644 index 8ea6f795..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/header.js +++ /dev/null @@ -1,183 +0,0 @@ -var tap = require("tap") -var TarHeader = require("../lib/header.js") -var tar = require("../tar.js") -var fs = require("fs") - - -var headers = - { "a.txt file header": - [ "612e747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303430312031313635313336303333332030313234353100203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'a.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 257 - , mtime: 1319493851 - , cksum: 5417 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - - , "omega pax": // the extended header from omega tar. - [ "5061784865616465722fcea92e74787400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303137302031313534333731303631312030313530353100207800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'PaxHeader/Ω.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 120 - , mtime: 1301254537 - , cksum: 6697 - , type: 'x' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } ] - - , "omega file header": - [ "cea92e7478740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303030322031313534333731303631312030313330373200203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'Ω.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 2 - , mtime: 1301254537 - , cksum: 5690 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } ] - - , "foo.js file header": - [ "666f6f2e6a730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303030342031313534333637303734312030313236313700203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'foo.js' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 4 - , mtime: 1301246433 - , cksum: 5519 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - - , "b.txt file header": - [ "622e747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030313030302031313635313336303637372030313234363100203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true - , path: 'b.txt' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 512 - , mtime: 1319494079 - , cksum: 5425 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - - , "deep nested file": - [ "636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363633030303634342000303537373631200030303030323420003030303030303030313434203131363532313531353333203034333331340020300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000075737461720030306973616163730000000000000000000000000000000000000000000000000000737461666600000000000000000000000000000000000000000000000000000030303030303020003030303030302000722f652f612f6c2f6c2f792f2d2f642f652f652f702f2d2f662f6f2f6c2f642f652f722f2d2f702f612f742f680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - , { cksumValid: true, - path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' - , mode: 420 - , uid: 24561 - , gid: 20 - , size: 100 - , mtime: 1319687003 - , cksum: 18124 - , type: '0' - , linkpath: '' - , ustar: 'ustar\0' - , ustarver: '00' - , uname: 'isaacs' - , gname: 'staff' - , devmaj: 0 - , devmin: 0 - , fill: '' } - ] - } - -tap.test("parsing", function (t) { - Object.keys(headers).forEach(function (name) { - var h = headers[name] - , header = new Buffer(h[0], "hex") - , expect = h[1] - , parsed = new TarHeader(header) - - // console.error(parsed) - t.has(parsed, expect, "parse " + name) - }) - t.end() -}) - -tap.test("encoding", function (t) { - Object.keys(headers).forEach(function (name) { - var h = headers[name] - , expect = new Buffer(h[0], "hex") - , encoded = TarHeader.encode(h[1]) - - // might have slightly different bytes, since the standard - // isn't very strict, but should have the same semantics - // checkSum will be different, but cksumValid will be true - - var th = new TarHeader(encoded) - delete h[1].block - delete h[1].needExtended - delete h[1].cksum - t.has(th, h[1], "fields "+name) - }) - t.end() -}) - -// test these manually. they're a bit rare to find in the wild -tap.test("parseNumeric tests", function (t) { - var parseNumeric = TarHeader.parseNumeric - , numbers = - { "303737373737373700": 2097151 - , "30373737373737373737373700": 8589934591 - , "303030303036343400": 420 - , "800000ffffffffffff": 281474976710655 - , "ffffff000000000001": -281474976710654 - , "ffffff000000000000": -281474976710655 - , "800000000000200000": 2097152 - , "8000000000001544c5": 1393861 - , "ffffffffffff1544c5": -15383354 } - Object.keys(numbers).forEach(function (n) { - var b = new Buffer(n, "hex") - t.equal(parseNumeric(b), numbers[n], n + " === " + numbers[n]) - }) - t.end() -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/pack-no-proprietary.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/pack-no-proprietary.js deleted file mode 100644 index 5bf0e540..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/pack-no-proprietary.js +++ /dev/null @@ -1,854 +0,0 @@ -// This is exactly like test/pack.js, except that it's excluding -// any proprietary headers. -// -// This loses some information about the filesystem, but creates -// tarballs that are supported by more versions of tar, especially -// old non-spec-compliant copies of gnutar. - -// the symlink file is excluded from git, because it makes -// windows freak the hell out. -var fs = require("fs") - , path = require("path") - , symlink = path.resolve(__dirname, "fixtures/symlink") -try { fs.unlinkSync(symlink) } catch (e) {} -fs.symlinkSync("./hardlink-1", symlink) -process.on("exit", function () { - fs.unlinkSync(symlink) -}) - -var tap = require("tap") - , tar = require("../tar.js") - , pkg = require("../package.json") - , Pack = tar.Pack - , fstream = require("fstream") - , Reader = fstream.Reader - , Writer = fstream.Writer - , input = path.resolve(__dirname, "fixtures/") - , target = path.resolve(__dirname, "tmp/pack.tar") - , uid = process.getuid ? process.getuid() : 0 - , gid = process.getgid ? process.getgid() : 0 - - , entries = - - // the global header and root fixtures/ dir are going to get - // a different date each time, so omit that bit. - // Also, dev/ino values differ across machines, so that's not - // included. - [ [ 'entry', - { path: 'fixtures/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/200cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - uid: uid, - gid: gid, - size: 200 } ] - - , [ 'entry', - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 200, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/a.txt', - mode: 420, - uid: uid, - gid: gid, - size: 257, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/b.txt', - mode: 420, - uid: uid, - gid: gid, - size: 512, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/c.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/cc.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/foo.js', - mode: 420, - uid: uid, - gid: gid, - size: 4, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-1', - mode: 420, - uid: uid, - gid: gid, - size: 200, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-2', - mode: 420, - uid: uid, - gid: gid, - size: 0, - type: '1', - linkpath: 'fixtures/hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/star.4.html', - mode: 420, - uid: uid, - gid: gid, - size: 54081, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/packtest/Ω.txt', - uid: uid, - gid: gid, - size: 2 } ] - - , [ 'entry', - { path: 'fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 100, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/symlink', - uid: uid, - gid: gid, - size: 0, - type: '2', - linkpath: 'hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: "fixtures/Ω.txt" - , uid: uid - , gid: gid - , size: 2 } ] - - , [ 'entry', - { path: 'fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - ] - - -// first, make sure that the hardlinks are actually hardlinks, or this -// won't work. Git has a way of replacing them with a copy. -var hard1 = path.resolve(__dirname, "fixtures/hardlink-1") - , hard2 = path.resolve(__dirname, "fixtures/hardlink-2") - , fs = require("fs") - -try { fs.unlinkSync(hard2) } catch (e) {} -fs.linkSync(hard1, hard2) - -tap.test("with global header", { timeout: 10000 }, function (t) { - runTest(t, true) -}) - -tap.test("without global header", { timeout: 10000 }, function (t) { - runTest(t, false) -}) - -function alphasort (a, b) { - return a === b ? 0 - : a.toLowerCase() > b.toLowerCase() ? 1 - : a.toLowerCase() < b.toLowerCase() ? -1 - : a > b ? 1 - : -1 -} - - -function runTest (t, doGH) { - var reader = Reader({ path: input - , filter: function () { - return !this.path.match(/\.(tar|hex)$/) - } - , sort: alphasort - }) - - var props = doGH ? pkg : {} - props.noProprietary = true - var pack = Pack(props) - var writer = Writer(target) - - // global header should be skipped regardless, since it has no content. - var entry = 0 - - t.ok(reader, "reader ok") - t.ok(pack, "pack ok") - t.ok(writer, "writer ok") - - pack.pipe(writer) - - var parse = tar.Parse() - t.ok(parse, "parser should be ok") - - pack.on("data", function (c) { - // console.error("PACK DATA") - if (c.length !== 512) { - // this one is too noisy, only assert if it'll be relevant - t.equal(c.length, 512, "parser should emit data in 512byte blocks") - } - parse.write(c) - }) - - pack.on("end", function () { - // console.error("PACK END") - t.pass("parser ends") - parse.end() - }) - - pack.on("error", function (er) { - t.fail("pack error", er) - }) - - parse.on("error", function (er) { - t.fail("parse error", er) - }) - - writer.on("error", function (er) { - t.fail("writer error", er) - }) - - reader.on("error", function (er) { - t.fail("reader error", er) - }) - - parse.on("*", function (ev, e) { - var wanted = entries[entry++] - if (!wanted) { - t.fail("unexpected event: "+ev) - return - } - t.equal(ev, wanted[0], "event type should be "+wanted[0]) - - if (ev !== wanted[0] || e.path !== wanted[1].path) { - console.error(wanted) - console.error([ev, e.props]) - e.on("end", function () { - console.error(e.fields) - throw "break" - }) - } - - t.has(e.props, wanted[1], "properties "+wanted[1].path) - if (wanted[2]) { - e.on("end", function () { - if (!e.fields) { - t.ok(e.fields, "should get fields") - } else { - t.has(e.fields, wanted[2], "should get expected fields") - } - }) - } - }) - - reader.pipe(pack) - - writer.on("close", function () { - t.equal(entry, entries.length, "should get all expected entries") - t.pass("it finished") - t.end() - }) - -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/pack.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/pack.js deleted file mode 100644 index 0f509945..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/pack.js +++ /dev/null @@ -1,897 +0,0 @@ - -// the symlink file is excluded from git, because it makes -// windows freak the hell out. -var fs = require("fs") - , path = require("path") - , symlink = path.resolve(__dirname, "fixtures/symlink") -try { fs.unlinkSync(symlink) } catch (e) {} -fs.symlinkSync("./hardlink-1", symlink) -process.on("exit", function () { - fs.unlinkSync(symlink) -}) - - -var tap = require("tap") - , tar = require("../tar.js") - , pkg = require("../package.json") - , Pack = tar.Pack - , fstream = require("fstream") - , Reader = fstream.Reader - , Writer = fstream.Writer - , input = path.resolve(__dirname, "fixtures/") - , target = path.resolve(__dirname, "tmp/pack.tar") - , uid = process.getuid ? process.getuid() : 0 - , gid = process.getgid ? process.getgid() : 0 - - , entries = - - // the global header and root fixtures/ dir are going to get - // a different date each time, so omit that bit. - // Also, dev/ino values differ across machines, so that's not - // included. - [ [ 'globalExtendedHeader', - { path: 'PaxHeader/', - mode: 438, - uid: 0, - gid: 0, - type: 'g', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { "NODETAR.author": pkg.author, - "NODETAR.name": pkg.name, - "NODETAR.description": pkg.description, - "NODETAR.version": pkg.version, - "NODETAR.repository.type": pkg.repository.type, - "NODETAR.repository.url": pkg.repository.url, - "NODETAR.main": pkg.main, - "NODETAR.scripts.test": pkg.scripts.test } ] - - , [ 'entry', - { path: 'fixtures/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/200cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - 'NODETAR.depth': '1', - 'NODETAR.type': 'File', - nlink: 1, - uid: uid, - gid: gid, - size: 200, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 200, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '', - 'NODETAR.depth': '1', - 'NODETAR.type': 'File', - nlink: 1, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/a.txt', - mode: 420, - uid: uid, - gid: gid, - size: 257, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/b.txt', - mode: 420, - uid: uid, - gid: gid, - size: 512, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/c.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/cc.txt', - mode: 420, - uid: uid, - gid: gid, - size: 513, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/foo.js', - mode: 420, - uid: uid, - gid: gid, - size: 4, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-1', - mode: 420, - uid: uid, - gid: gid, - size: 200, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/hardlink-2', - mode: 420, - uid: uid, - gid: gid, - size: 0, - type: '1', - linkpath: 'fixtures/hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/omega.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/packtest/star.4.html', - mode: 420, - uid: uid, - gid: gid, - size: 54081, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'fixtures/packtest/Ω.txt', - 'NODETAR.depth': '2', - 'NODETAR.type': 'File', - nlink: 1, - uid: uid, - gid: gid, - size: 2, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/packtest/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '', - 'NODETAR.depth': '2', - 'NODETAR.type': 'File', - nlink: 1, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - - , [ 'entry', - { path: 'fixtures/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/', - mode: 493, - uid: uid, - gid: gid, - size: 0, - type: '5', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: uid, - gid: gid, - size: 100, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'entry', - { path: 'fixtures/symlink', - uid: uid, - gid: gid, - size: 0, - type: '2', - linkpath: 'hardlink-1', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' } ] - - , [ 'extendedHeader', - { path: 'PaxHeader/fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - type: 'x', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: "fixtures/Ω.txt" - , "NODETAR.depth": "1" - , "NODETAR.type": "File" - , nlink: 1 - , uid: uid - , gid: gid - , size: 2 - , "NODETAR.blksize": "4096" - , "NODETAR.blocks": "8" } ] - - , [ 'entry', - { path: 'fixtures/Ω.txt', - mode: 420, - uid: uid, - gid: gid, - size: 2, - type: '0', - linkpath: '', - ustar: 'ustar\u0000', - ustarver: '00', - uname: '', - gname: '', - devmaj: 0, - devmin: 0, - fill: '', - 'NODETAR.depth': '1', - 'NODETAR.type': 'File', - nlink: 1, - 'NODETAR.blksize': '4096', - 'NODETAR.blocks': '8' } ] - ] - - -// first, make sure that the hardlinks are actually hardlinks, or this -// won't work. Git has a way of replacing them with a copy. -var hard1 = path.resolve(__dirname, "fixtures/hardlink-1") - , hard2 = path.resolve(__dirname, "fixtures/hardlink-2") - , fs = require("fs") - -try { fs.unlinkSync(hard2) } catch (e) {} -fs.linkSync(hard1, hard2) - -tap.test("with global header", { timeout: 10000 }, function (t) { - runTest(t, true) -}) - -tap.test("without global header", { timeout: 10000 }, function (t) { - runTest(t, false) -}) - -function alphasort (a, b) { - return a === b ? 0 - : a.toLowerCase() > b.toLowerCase() ? 1 - : a.toLowerCase() < b.toLowerCase() ? -1 - : a > b ? 1 - : -1 -} - - -function runTest (t, doGH) { - var reader = Reader({ path: input - , filter: function () { - return !this.path.match(/\.(tar|hex)$/) - } - , sort: alphasort - }) - - var pack = Pack(doGH ? pkg : null) - var writer = Writer(target) - - // skip the global header if we're not doing that. - var entry = doGH ? 0 : 1 - - t.ok(reader, "reader ok") - t.ok(pack, "pack ok") - t.ok(writer, "writer ok") - - pack.pipe(writer) - - var parse = tar.Parse() - t.ok(parse, "parser should be ok") - - pack.on("data", function (c) { - // console.error("PACK DATA") - if (c.length !== 512) { - // this one is too noisy, only assert if it'll be relevant - t.equal(c.length, 512, "parser should emit data in 512byte blocks") - } - parse.write(c) - }) - - pack.on("end", function () { - // console.error("PACK END") - t.pass("parser ends") - parse.end() - }) - - pack.on("error", function (er) { - t.fail("pack error", er) - }) - - parse.on("error", function (er) { - t.fail("parse error", er) - }) - - writer.on("error", function (er) { - t.fail("writer error", er) - }) - - reader.on("error", function (er) { - t.fail("reader error", er) - }) - - parse.on("*", function (ev, e) { - var wanted = entries[entry++] - if (!wanted) { - t.fail("unexpected event: "+ev) - return - } - t.equal(ev, wanted[0], "event type should be "+wanted[0]) - - // if (ev !== wanted[0] || e.path !== wanted[1].path) { - // console.error(wanted) - // console.error([ev, e.props]) - // throw "break" - // } - - t.has(e.props, wanted[1], "properties "+wanted[1].path) - if (wanted[2]) { - e.on("end", function () { - if (!e.fields) { - t.ok(e.fields, "should get fields") - } else { - t.has(e.fields, wanted[2], "should get expected fields") - } - }) - } - }) - - reader.pipe(pack) - - writer.on("close", function () { - t.equal(entry, entries.length, "should get all expected entries") - t.pass("it finished") - t.end() - }) - -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/parse.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/parse.js deleted file mode 100644 index f765a501..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/parse.js +++ /dev/null @@ -1,359 +0,0 @@ -var tap = require("tap") - , tar = require("../tar.js") - , fs = require("fs") - , path = require("path") - , file = path.resolve(__dirname, "fixtures/c.tar") - , index = 0 - - , expect = -[ [ 'entry', - { path: 'c.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 513, - mtime: new Date('Wed, 26 Oct 2011 01:10:58 GMT'), - cksum: 5422, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'entry', - { path: 'cc.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 513, - mtime: new Date('Wed, 26 Oct 2011 01:11:02 GMT'), - cksum: 5525, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'entry', - { path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 100, - mtime: new Date('Thu, 27 Oct 2011 03:43:23 GMT'), - cksum: 18124, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'entry', - { path: 'Ω.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 2, - mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - cksum: 5695, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/Ω.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 120, - mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - cksum: 6702, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: 'Ω.txt', - ctime: 1319737909, - atime: 1319739061, - dev: 234881026, - ino: 51693379, - nlink: 1 } ], - [ 'entry', - { path: 'Ω.txt', - mode: 420, - uid: 24561, - gid: 20, - size: 2, - mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - cksum: 5695, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'), - atime: new Date('Thu, 27 Oct 2011 18:11:01 GMT'), - dev: 234881026, - ino: 51693379, - nlink: 1 }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 353, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 14488, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - ctime: 1319686868, - atime: 1319741254, - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 1 } ], - [ 'entry', - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 200, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 14570, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - atime: new Date('Thu, 27 Oct 2011 18:47:34 GMT'), - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 1 }, - undefined ], - [ 'longPath', - { path: '././@LongLink', - mode: 0, - uid: 0, - gid: 0, - size: 201, - mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), - cksum: 4976, - type: 'L', - linkpath: '', - ustar: false }, - '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ], - [ 'entry', - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 1000, - gid: 1000, - size: 201, - mtime: new Date('Thu, 27 Oct 2011 22:21:50 GMT'), - cksum: 14086, - type: '0', - linkpath: '', - ustar: false }, - undefined ], - [ 'longLinkpath', - { path: '././@LongLink', - mode: 0, - uid: 0, - gid: 0, - size: 201, - mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), - cksum: 4975, - type: 'K', - linkpath: '', - ustar: false }, - '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ], - [ 'longPath', - { path: '././@LongLink', - mode: 0, - uid: 0, - gid: 0, - size: 201, - mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'), - cksum: 4976, - type: 'L', - linkpath: '', - ustar: false }, - '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL' ], - [ 'entry', - { path: '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', - mode: 511, - uid: 1000, - gid: 1000, - size: 0, - mtime: new Date('Fri, 28 Oct 2011 23:05:17 GMT'), - cksum: 21603, - type: '2', - linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - ustar: false }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/200-hard', - mode: 420, - uid: 24561, - gid: 20, - size: 143, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 6533, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { ctime: 1320617144, - atime: 1320617232, - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 } ], - [ 'entry', - { path: '200-hard', - mode: 420, - uid: 24561, - gid: 20, - size: 200, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 5526, - type: '0', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Sun, 06 Nov 2011 22:05:44 GMT'), - atime: new Date('Sun, 06 Nov 2011 22:07:12 GMT'), - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 }, - undefined ], - [ 'extendedHeader', - { path: 'PaxHeader/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 353, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 14488, - type: 'x', - linkpath: '', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '' }, - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - ctime: 1320617144, - atime: 1320617406, - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 } ], - [ 'entry', - { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc', - mode: 420, - uid: 24561, - gid: 20, - size: 0, - mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'), - cksum: 15173, - type: '1', - linkpath: '200-hard', - ustar: 'ustar\0', - ustarver: '00', - uname: 'isaacs', - gname: 'staff', - devmaj: 0, - devmin: 0, - fill: '', - ctime: new Date('Sun, 06 Nov 2011 22:05:44 GMT'), - atime: new Date('Sun, 06 Nov 2011 22:10:06 GMT'), - 'LIBARCHIVE.creationtime': '1319686852', - dev: 234881026, - ino: 51681874, - nlink: 2 }, - undefined ] ] - - -tap.test("parser test", function (t) { - var parser = tar.Parse() - - parser.on("end", function () { - t.equal(index, expect.length, "saw all expected events") - t.end() - }) - - fs.createReadStream(file) - .pipe(parser) - .on("*", function (ev, entry) { - var wanted = expect[index] - if (!wanted) { - return t.fail("Unexpected event: " + ev) - } - var result = [ev, entry.props] - entry.on("end", function () { - result.push(entry.fields || entry.body) - - t.equal(ev, wanted[0], index + " event type") - t.equivalent(entry.props, wanted[1], wanted[1].path + " entry properties") - if (wanted[2]) { - t.equivalent(result[2], wanted[2], "metadata values") - } - index ++ - }) - }) -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/zz-cleanup.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/zz-cleanup.js deleted file mode 100644 index a00ff7fa..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tar/test/zz-cleanup.js +++ /dev/null @@ -1,20 +0,0 @@ -// clean up the fixtures - -var tap = require("tap") -, rimraf = require("rimraf") -, test = tap.test -, path = require("path") - -test("clean fixtures", function (t) { - rimraf(path.resolve(__dirname, "fixtures"), function (er) { - t.ifError(er, "rimraf ./fixtures/") - t.end() - }) -}) - -test("clean tmp", function (t) { - rimraf(path.resolve(__dirname, "tmp"), function (er) { - t.ifError(er, "rimraf ./tmp/") - t.end() - }) -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/index.js deleted file mode 100644 index da99ffef..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; -var path = require('path'); -var tmpdir = require('os').tmpdir(); -var uuid = require('uuid'); - -module.exports = function (ext) { - return path.join(tmpdir, uuid.v4() + (ext || '')); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/.npmignore deleted file mode 100644 index fd4f2b06..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -.DS_Store diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/.travis.yml deleted file mode 100644 index b6d42c3e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - 0.9 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/LICENSE.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/LICENSE.md deleted file mode 100644 index f039427f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/LICENSE.md +++ /dev/null @@ -1,2 +0,0 @@ -Copyright (c) 2010-2012 Robert Kieffer -MIT License - http://opensource.org/licenses/mit-license.php diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/README.md deleted file mode 100644 index d2adba18..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/README.md +++ /dev/null @@ -1,204 +0,0 @@ -# uuid [![Build Status](https://secure.travis-ci.org/shtylman/node-uuid.png?branch=master)](http://travis-ci.org/shtylman/node-uuid) # - -[![browser support](http://ci.testling.com/shtylman/node-uuid.png)](http://ci.testling.com/shtylman/node-uuid) - -Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. - -Features: - -* Generate RFC4122 version 1 or version 4 UUIDs -* Runs in node.js and all browsers. -* Cryptographically strong random # generation on supporting platforms -* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! ) -* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html) - -## Getting Started - -Install it in your browser: - -```html -<script src="uuid.js"></script> -``` - -Or in node.js: - -``` -npm install uuid -``` - -```javascript -var uuid = require('uuid'); - -// Generate a v1 (time-based) id -uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' - -// Generate a v4 (random) id -uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1' -``` - -## API - -### uuid.v1([`options` [, `buffer` [, `offset`]]]) - -Generate and return a RFC4122 v1 (timestamp-based) UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. - * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. - * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used. - * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Notes: - -1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) - -Example: Generate string UUID with fully-specified options - -```javascript -uuid.v1({ - node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], - clockseq: 0x1234, - msecs: new Date('2011-11-01').getTime(), - nsecs: 5678 -}); // -> "710b962e-041c-11e1-9234-0123456789ab" -``` - -Example: In-place generation of two binary IDs - -```javascript -// Generate two ids in an array -var arr = new Array(32); // -> [] -uuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15] -uuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15] - -// Optionally use uuid.unparse() to get stringify the ids -uuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115' -uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115' -``` - -### uuid.v4([`options` [, `buffer` [, `offset`]]]) - -Generate and return a RFC4122 v4 UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values - * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Example: Generate string UUID with fully-specified options - -```javascript -uuid.v4({ - random: [ - 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, - 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 - ] -}); -// -> "109156be-c4fb-41ea-b1b4-efe1671c5836" -``` - -Example: Generate two IDs in a single buffer - -```javascript -var buffer = new Array(32); // (or 'new Buffer' in node.js) -uuid.v4(null, buffer, 0); -uuid.v4(null, buffer, 16); -``` - -### uuid.parse(id[, buffer[, offset]]) -### uuid.unparse(buffer[, offset]) - -Parse and unparse UUIDs - - * `id` - (String) UUID(-like) string - * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used - * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0 - -Example parsing and unparsing a UUID string - -```javascript -var bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> <Buffer 79 7f f0 43 11 eb 11 e1 80 d6 51 09 98 75 5d 10> -var string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10' -``` - -### uuid.noConflict() - -(Browsers only) Set `uuid` property back to it's previous value. - -Returns the uuid object. - -Example: - -```javascript -var myUuid = uuid.noConflict(); -myUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' -``` - -## Deprecated APIs - -Support for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version. - -### uuid([format [, buffer [, offset]]]) - -uuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary). - -### uuid.BufferClass - -The class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API. - -## Testing - -In node.js - -``` -> cd test -> node test.js -``` - -In Browser - -``` -open test/test.html -``` - -### Benchmarking - -Requires node.js - -``` -npm install uuid uuid-js -node benchmark/benchmark.js -``` - -For a more complete discussion of uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/uuid/wiki/Benchmark) - -For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance). - -## Release notes - -### 1.4.0 - -* Improved module context detection -* Removed public RNG functions - -### 1.3.2 - -* Improve tests and handling of v1() options (Issue #24) -* Expose RNG option to allow for perf testing with different generators - -### 1.3.0 - -* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! -* Support for node.js crypto API -* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/README.md deleted file mode 100644 index aaeb2ea0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# node-uuid Benchmarks - -### Results - -To see the results of our benchmarks visit https://github.com/broofa/node-uuid/wiki/Benchmark - -### Run them yourself - -node-uuid comes with some benchmarks to measure performance of generating UUIDs. These can be run using node.js. node-uuid is being benchmarked against some other uuid modules, that are available through npm namely `uuid` and `uuid-js`. - -To prepare and run the benchmark issue; - -``` -npm install uuid uuid-js -node benchmark/benchmark.js -``` - -You'll see an output like this one: - -``` -# v4 -nodeuuid.v4(): 854700 uuids/second -nodeuuid.v4('binary'): 788643 uuids/second -nodeuuid.v4('binary', buffer): 1336898 uuids/second -uuid(): 479386 uuids/second -uuid('binary'): 582072 uuids/second -uuidjs.create(4): 312304 uuids/second - -# v1 -nodeuuid.v1(): 938086 uuids/second -nodeuuid.v1('binary'): 683060 uuids/second -nodeuuid.v1('binary', buffer): 1644736 uuids/second -uuidjs.create(1): 190621 uuids/second -``` - -* The `uuid()` entries are for Nikhil Marathe's [uuid module](https://bitbucket.org/nikhilm/uuidjs) which is a wrapper around the native libuuid library. -* The `uuidjs()` entries are for Patrick Negri's [uuid-js module](https://github.com/pnegri/uuid-js) which is a pure javascript implementation based on [UUID.js](https://github.com/LiosK/UUID.js) by LiosK. - -If you want to get more reliable results you can run the benchmark multiple times and write the output into a log file: - -``` -for i in {0..9}; do node benchmark/benchmark.js >> benchmark/bench_0.4.12.log; done; -``` - -If you're interested in how performance varies between different node versions, you can issue the above command multiple times. - -You can then use the shell script `bench.sh` provided in this directory to calculate the averages over all benchmark runs and draw a nice plot: - -``` -(cd benchmark/ && ./bench.sh) -``` - -This assumes you have [gnuplot](http://www.gnuplot.info/) and [ImageMagick](http://www.imagemagick.org/) installed. You'll find a nice `bench.png` graph in the `benchmark/` directory then. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/bench.gnu b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/bench.gnu deleted file mode 100644 index a342fbbe..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/bench.gnu +++ /dev/null @@ -1,174 +0,0 @@ -#!/opt/local/bin/gnuplot -persist -# -# -# G N U P L O T -# Version 4.4 patchlevel 3 -# last modified March 2011 -# System: Darwin 10.8.0 -# -# Copyright (C) 1986-1993, 1998, 2004, 2007-2010 -# Thomas Williams, Colin Kelley and many others -# -# gnuplot home: http://www.gnuplot.info -# faq, bugs, etc: type "help seeking-assistance" -# immediate help: type "help" -# plot window: hit 'h' -set terminal postscript eps noenhanced defaultplex \ - leveldefault color colortext \ - solid linewidth 1.2 butt noclip \ - palfuncparam 2000,0.003 \ - "Helvetica" 14 -set output 'bench.eps' -unset clip points -set clip one -unset clip two -set bar 1.000000 front -set border 31 front linetype -1 linewidth 1.000 -set xdata -set ydata -set zdata -set x2data -set y2data -set timefmt x "%d/%m/%y,%H:%M" -set timefmt y "%d/%m/%y,%H:%M" -set timefmt z "%d/%m/%y,%H:%M" -set timefmt x2 "%d/%m/%y,%H:%M" -set timefmt y2 "%d/%m/%y,%H:%M" -set timefmt cb "%d/%m/%y,%H:%M" -set boxwidth -set style fill empty border -set style rectangle back fc lt -3 fillstyle solid 1.00 border lt -1 -set style circle radius graph 0.02, first 0, 0 -set dummy x,y -set format x "% g" -set format y "% g" -set format x2 "% g" -set format y2 "% g" -set format z "% g" -set format cb "% g" -set angles radians -unset grid -set key title "" -set key outside left top horizontal Right noreverse enhanced autotitles columnhead nobox -set key noinvert samplen 4 spacing 1 width 0 height 0 -set key maxcolumns 2 maxrows 0 -unset label -unset arrow -set style increment default -unset style line -set style line 1 linetype 1 linewidth 2.000 pointtype 1 pointsize default pointinterval 0 -unset style arrow -set style histogram clustered gap 2 title offset character 0, 0, 0 -unset logscale -set offsets graph 0.05, 0.15, 0, 0 -set pointsize 1.5 -set pointintervalbox 1 -set encoding default -unset polar -unset parametric -unset decimalsign -set view 60, 30, 1, 1 -set samples 100, 100 -set isosamples 10, 10 -set surface -unset contour -set clabel '%8.3g' -set mapping cartesian -set datafile separator whitespace -unset hidden3d -set cntrparam order 4 -set cntrparam linear -set cntrparam levels auto 5 -set cntrparam points 5 -set size ratio 0 1,1 -set origin 0,0 -set style data points -set style function lines -set xzeroaxis linetype -2 linewidth 1.000 -set yzeroaxis linetype -2 linewidth 1.000 -set zzeroaxis linetype -2 linewidth 1.000 -set x2zeroaxis linetype -2 linewidth 1.000 -set y2zeroaxis linetype -2 linewidth 1.000 -set ticslevel 0.5 -set mxtics default -set mytics default -set mztics default -set mx2tics default -set my2tics default -set mcbtics default -set xtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set xtics norangelimit -set xtics () -set ytics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set ytics autofreq norangelimit -set ztics border in scale 1,0.5 nomirror norotate offset character 0, 0, 0 -set ztics autofreq norangelimit -set nox2tics -set noy2tics -set cbtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set cbtics autofreq norangelimit -set title "" -set title offset character 0, 0, 0 font "" norotate -set timestamp bottom -set timestamp "" -set timestamp offset character 0, 0, 0 font "" norotate -set rrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) -set autoscale rfixmin -set autoscale rfixmax -set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] ) -set autoscale tfixmin -set autoscale tfixmax -set urange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale ufixmin -set autoscale ufixmax -set vrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale vfixmin -set autoscale vfixmax -set xlabel "" -set xlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate -set x2label "" -set x2label offset character 0, 0, 0 font "" textcolor lt -1 norotate -set xrange [ * : * ] noreverse nowriteback # (currently [-0.150000:3.15000] ) -set autoscale xfixmin -set autoscale xfixmax -set x2range [ * : * ] noreverse nowriteback # (currently [0.00000:3.00000] ) -set autoscale x2fixmin -set autoscale x2fixmax -set ylabel "" -set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set y2label "" -set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set yrange [ 0.00000 : 1.90000e+06 ] noreverse nowriteback # (currently [:] ) -set autoscale yfixmin -set autoscale yfixmax -set y2range [ * : * ] noreverse nowriteback # (currently [0.00000:1.90000e+06] ) -set autoscale y2fixmin -set autoscale y2fixmax -set zlabel "" -set zlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate -set zrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale zfixmin -set autoscale zfixmax -set cblabel "" -set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set cbrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) -set autoscale cbfixmin -set autoscale cbfixmax -set zero 1e-08 -set lmargin -1 -set bmargin -1 -set rmargin -1 -set tmargin -1 -set pm3d explicit at s -set pm3d scansautomatic -set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean -set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB -set palette rgbformulae 7, 5, 15 -set colorbox default -set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault -set loadpath -set fontpath -set fit noerrorvariables -GNUTERM = "aqua" -plot 'bench_results.txt' using 2:xticlabel(1) w lp lw 2, '' using 3:xticlabel(1) w lp lw 2, '' using 4:xticlabel(1) w lp lw 2, '' using 5:xticlabel(1) w lp lw 2, '' using 6:xticlabel(1) w lp lw 2, '' using 7:xticlabel(1) w lp lw 2, '' using 8:xticlabel(1) w lp lw 2, '' using 9:xticlabel(1) w lp lw 2 -# EOF diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/bench.sh b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/bench.sh deleted file mode 100755 index d870a0cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/bench.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# for a given node version run: -# for i in {0..9}; do node benchmark.js >> bench_0.6.2.log; done; - -PATTERNS=('nodeuuid.v1()' "nodeuuid.v1('binary'," 'nodeuuid.v4()' "nodeuuid.v4('binary'," "uuid()" "uuid('binary')" 'uuidjs.create(1)' 'uuidjs.create(4)' '140byte') -FILES=(node_uuid_v1_string node_uuid_v1_buf node_uuid_v4_string node_uuid_v4_buf libuuid_v4_string libuuid_v4_binary uuidjs_v1_string uuidjs_v4_string 140byte_es) -INDICES=(2 3 2 3 2 2 2 2 2) -VERSIONS=$( ls bench_*.log | sed -e 's/^bench_\([0-9\.]*\)\.log/\1/' | tr "\\n" " " ) -TMPJOIN="tmp_join" -OUTPUT="bench_results.txt" - -for I in ${!FILES[*]}; do - F=${FILES[$I]} - P=${PATTERNS[$I]} - INDEX=${INDICES[$I]} - echo "version $F" > $F - for V in $VERSIONS; do - (VAL=$( grep "$P" bench_$V.log | LC_ALL=en_US awk '{ sum += $'$INDEX' } END { print sum/NR }' ); echo $V $VAL) >> $F - done - if [ $I == 0 ]; then - cat $F > $TMPJOIN - else - join $TMPJOIN $F > $OUTPUT - cp $OUTPUT $TMPJOIN - fi - rm $F -done - -rm $TMPJOIN - -gnuplot bench.gnu -convert -density 200 -resize 800x560 -flatten bench.eps bench.png -rm bench.eps diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/benchmark-native.c b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/benchmark-native.c deleted file mode 100644 index dbfc75f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/benchmark-native.c +++ /dev/null @@ -1,34 +0,0 @@ -/* -Test performance of native C UUID generation - -To Compile: cc -luuid benchmark-native.c -o benchmark-native -*/ - -#include <stdio.h> -#include <unistd.h> -#include <sys/time.h> -#include <uuid/uuid.h> - -int main() { - uuid_t myid; - char buf[36+1]; - int i; - struct timeval t; - double start, finish; - - gettimeofday(&t, NULL); - start = t.tv_sec + t.tv_usec/1e6; - - int n = 2e5; - for (i = 0; i < n; i++) { - uuid_generate(myid); - uuid_unparse(myid, buf); - } - - gettimeofday(&t, NULL); - finish = t.tv_sec + t.tv_usec/1e6; - double dur = finish - start; - - printf("%d uuids/sec", (int)(n/dur)); - return 0; -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/benchmark.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/benchmark.js deleted file mode 100644 index 40e6efbe..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/benchmark/benchmark.js +++ /dev/null @@ -1,84 +0,0 @@ -try { - var nodeuuid = require('../uuid'); -} catch (e) { - console.error('node-uuid require failed - skipping tests'); -} - -try { - var uuid = require('uuid'); -} catch (e) { - console.error('uuid require failed - skipping tests'); -} - -try { - var uuidjs = require('uuid-js'); -} catch (e) { - console.error('uuid-js require failed - skipping tests'); -} - -var N = 5e5; - -function rate(msg, t) { - console.log(msg + ': ' + - (N / (Date.now() - t) * 1e3 | 0) + - ' uuids/second'); -} - -console.log('# v4'); - -// node-uuid - string form -if (nodeuuid) { - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4(); - rate('nodeuuid.v4() - using node.js crypto RNG', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4({rng: nodeuuid.mathRNG}); - rate('nodeuuid.v4() - using Math.random() RNG', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary'); - rate('nodeuuid.v4(\'binary\')', t); - - var buffer = new nodeuuid.BufferClass(16); - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary', buffer); - rate('nodeuuid.v4(\'binary\', buffer)', t); -} - -// libuuid - string form -if (uuid) { - for (var i = 0, t = Date.now(); i < N; i++) uuid(); - rate('uuid()', t); - - for (var i = 0, t = Date.now(); i < N; i++) uuid('binary'); - rate('uuid(\'binary\')', t); -} - -// uuid-js - string form -if (uuidjs) { - for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(4); - rate('uuidjs.create(4)', t); -} - -// 140byte.es -for (var i = 0, t = Date.now(); i < N; i++) 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(s,r){r=Math.random()*16|0;return (s=='x'?r:r&0x3|0x8).toString(16)}); -rate('140byte.es_v4', t); - -console.log(''); -console.log('# v1'); - -// node-uuid - v1 string form -if (nodeuuid) { - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1(); - rate('nodeuuid.v1()', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary'); - rate('nodeuuid.v1(\'binary\')', t); - - var buffer = new nodeuuid.BufferClass(16); - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary', buffer); - rate('nodeuuid.v1(\'binary\', buffer)', t); -} - -// uuid-js - v1 string form -if (uuidjs) { - for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(1); - rate('uuidjs.create(1)', t); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/misc/compare.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/misc/compare.js deleted file mode 100644 index 3de34151..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/misc/compare.js +++ /dev/null @@ -1,62 +0,0 @@ -var assert = require('assert'), - nodeuuid = require('../'), - uuidjs = require('uuid-js'), - util = require('util'), - exec = require('child_process').exec, - os = require('os'); - -// On Mac Os X / macports there's only the ossp-uuid package that provides uuid -// On Linux there's uuid-runtime which provides uuidgen -var uuidCmd = os.type() === 'Darwin' ? 'uuid -1' : 'uuidgen -t'; - -function compare(ids) { - console.log(ids); - for (var i = 0; i < ids.length; i++) { - var id = ids[i].split('-'); - id = [id[2], id[1], id[0]].join(''); - ids[i] = id; - } - var sorted = ([].concat(ids)).sort(); - - if (sorted.toString() !== ids.toString()) { - console.log('Warning: sorted !== ids'); - } else { - console.log('everything in order!'); - } -} - -// Test time order of v1 uuids -var ids = []; -while (ids.length < 10e3) ids.push(nodeuuid.v1()); - -var max = 10; -console.log('node-uuid:'); -ids = []; -for (var i = 0; i < max; i++) ids.push(nodeuuid.v1()); -compare(ids); - -console.log(''); -console.log('uuidjs:'); -ids = []; -for (var i = 0; i < max; i++) ids.push(uuidjs.create(1).toString()); -compare(ids); - -console.log(''); -console.log('libuuid:'); -ids = []; -var count = 0; -var last = function() { - compare(ids); -} -var cb = function(err, stdout, stderr) { - ids.push(stdout.substring(0, stdout.length-1)); - count++; - if (count < max) { - return next(); - } - last(); -}; -var next = function() { - exec(uuidCmd, cb); -}; -next(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/misc/perf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/misc/perf.js deleted file mode 100644 index bdc9eb46..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/misc/perf.js +++ /dev/null @@ -1,102 +0,0 @@ -var assert = require('assert'); - -var uuid = require('../'); - -var log = console.log; - -var generators = { - v1: uuid.v1, - v4: uuid.v4 -}; - -var UUID_FORMAT = { - v1: /[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i, - v4: /[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i -}; - -var N = 1e4; - -// Get %'age an actual value differs from the ideal value -function divergence(actual, ideal) { - return Math.round(100*100*(actual - ideal)/ideal)/100; -} - -function rate(msg, t) { - log(msg + ': ' + (N / (Date.now() - t) * 1e3 | 0) + ' uuids\/second'); -} - -for (var version in generators) { - var counts = {}, max = 0; - var generator = generators[version]; - var format = UUID_FORMAT[version]; - - log('\nSanity check ' + N + ' ' + version + ' uuids'); - for (var i = 0, ok = 0; i < N; i++) { - id = generator(); - if (!format.test(id)) { - throw Error(id + ' is not a valid UUID string'); - } - - if (id != uuid.unparse(uuid.parse(id))) { - assert(fail, id + ' is not a valid id'); - } - - // Count digits for our randomness check - if (version == 'v4') { - var digits = id.replace(/-/g, '').split(''); - for (var j = digits.length-1; j >= 0; j--) { - var c = digits[j]; - max = Math.max(max, counts[c] = (counts[c] || 0) + 1); - } - } - } - - // Check randomness for v4 UUIDs - if (version == 'v4') { - // Limit that we get worried about randomness. (Purely empirical choice, this!) - var limit = 2*100*Math.sqrt(1/N); - - log('\nChecking v4 randomness. Distribution of Hex Digits (% deviation from ideal)'); - - for (var i = 0; i < 16; i++) { - var c = i.toString(16); - var bar = '', n = counts[c], p = Math.round(n/max*100|0); - - // 1-3,5-8, and D-F: 1:16 odds over 30 digits - var ideal = N*30/16; - if (i == 4) { - // 4: 1:1 odds on 1 digit, plus 1:16 odds on 30 digits - ideal = N*(1 + 30/16); - } else if (i >= 8 && i <= 11) { - // 8-B: 1:4 odds on 1 digit, plus 1:16 odds on 30 digits - ideal = N*(1/4 + 30/16); - } else { - // Otherwise: 1:16 odds on 30 digits - ideal = N*30/16; - } - var d = divergence(n, ideal); - - // Draw bar using UTF squares (just for grins) - var s = n/max*50 | 0; - while (s--) bar += '='; - - assert(Math.abs(d) < limit, c + ' |' + bar + '| ' + counts[c] + ' (' + d + '% < ' + limit + '%)'); - } - } -} - -// Perf tests -for (var version in generators) { - log('\nPerformance testing ' + version + ' UUIDs'); - var generator = generators[version]; - var buf = new uuid.BufferClass(16); - - for (var i = 0, t = Date.now(); i < N; i++) generator(); - rate('uuid.' + version + '()', t); - - for (var i = 0, t = Date.now(); i < N; i++) generator('binary'); - rate('uuid.' + version + '(\'binary\')', t); - - for (var i = 0, t = Date.now(); i < N; i++) generator('binary', buf); - rate('uuid.' + version + '(\'binary\', buffer)', t); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/package.json deleted file mode 100644 index d9f8435b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "uuid", - "version": "1.4.1", - "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", - "keywords": [ - "uuid", - "guid", - "rfc4122" - ], - "author": { - "name": "Robert Kieffer", - "email": "robert@broofa.com" - }, - "contributors": [ - { - "name": "Christoph Tavan", - "email": "dev@tavan.de" - } - ], - "main": "./uuid.js", - "devDependencies": { - "mocha": "1.8.0" - }, - "scripts": { - "test": "mocha test/test.js" - }, - "browser": { - "./rng.js": "./rng-browser.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/shtylman/node-uuid.git" - }, - "testling": { - "browsers": [ - "ie6..latest", - "firefox/3.6..latest", - "chrome/22..latest", - "safari/5.1..latest" - ], - "harness": "mocha-tdd", - "files": "test/*.js" - }, - "readme": "# uuid [![Build Status](https://secure.travis-ci.org/shtylman/node-uuid.png?branch=master)](http://travis-ci.org/shtylman/node-uuid) #\n\n[![browser support](http://ci.testling.com/shtylman/node-uuid.png)](http://ci.testling.com/shtylman/node-uuid)\n\nSimple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.\n\nFeatures:\n\n* Generate RFC4122 version 1 or version 4 UUIDs\n* Runs in node.js and all browsers.\n* Cryptographically strong random # generation on supporting platforms\n* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! )\n* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html)\n\n## Getting Started\n\nInstall it in your browser:\n\n```html\n<script src=\"uuid.js\"></script>\n```\n\nOr in node.js:\n\n```\nnpm install uuid\n```\n\n```javascript\nvar uuid = require('uuid');\n\n// Generate a v1 (time-based) id\nuuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n\n// Generate a v4 (random) id\nuuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'\n```\n\n## API\n\n### uuid.v1([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v1 (timestamp-based) UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1.\n * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.\n * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used.\n * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nNotes:\n\n1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v1({\n node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],\n clockseq: 0x1234,\n msecs: new Date('2011-11-01').getTime(),\n nsecs: 5678\n}); // -> \"710b962e-041c-11e1-9234-0123456789ab\"\n```\n\nExample: In-place generation of two binary IDs\n\n```javascript\n// Generate two ids in an array\nvar arr = new Array(32); // -> []\nuuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\nuuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\n\n// Optionally use uuid.unparse() to get stringify the ids\nuuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115'\nuuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115'\n```\n\n### uuid.v4([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v4 UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values\n * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v4({\n random: [\n 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,\n 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36\n ]\n});\n// -> \"109156be-c4fb-41ea-b1b4-efe1671c5836\"\n```\n\nExample: Generate two IDs in a single buffer\n\n```javascript\nvar buffer = new Array(32); // (or 'new Buffer' in node.js)\nuuid.v4(null, buffer, 0);\nuuid.v4(null, buffer, 16);\n```\n\n### uuid.parse(id[, buffer[, offset]])\n### uuid.unparse(buffer[, offset])\n\nParse and unparse UUIDs\n\n * `id` - (String) UUID(-like) string\n * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used\n * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0\n\nExample parsing and unparsing a UUID string\n\n```javascript\nvar bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> <Buffer 79 7f f0 43 11 eb 11 e1 80 d6 51 09 98 75 5d 10>\nvar string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10'\n```\n\n### uuid.noConflict()\n\n(Browsers only) Set `uuid` property back to it's previous value.\n\nReturns the uuid object.\n\nExample:\n\n```javascript\nvar myUuid = uuid.noConflict();\nmyUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n```\n\n## Deprecated APIs\n\nSupport for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version.\n\n### uuid([format [, buffer [, offset]]])\n\nuuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary).\n\n### uuid.BufferClass\n\nThe class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API.\n\n## Testing\n\nIn node.js\n\n```\n> cd test\n> node test.js\n```\n\nIn Browser\n\n```\nopen test/test.html\n```\n\n### Benchmarking\n\nRequires node.js\n\n```\nnpm install uuid uuid-js\nnode benchmark/benchmark.js\n```\n\nFor a more complete discussion of uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/uuid/wiki/Benchmark)\n\nFor browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance).\n\n## Release notes\n\n### 1.4.0\n\n* Improved module context detection\n* Removed public RNG functions\n\n### 1.3.2\n\n* Improve tests and handling of v1() options (Issue #24)\n* Expose RNG option to allow for perf testing with different generators\n\n### 1.3.0\n\n* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!\n* Support for node.js crypto API\n* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/shtylman/node-uuid/issues" - }, - "homepage": "https://github.com/shtylman/node-uuid", - "_id": "uuid@1.4.1", - "dist": { - "shasum": "4e6bbab179cc65c2f120508576c631bd7751af7c" - }, - "_from": "uuid@~1.4.0", - "_resolved": "https://registry.npmjs.org/uuid/-/uuid-1.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/rng-browser.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/rng-browser.js deleted file mode 100644 index 57b58d4b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/rng-browser.js +++ /dev/null @@ -1,31 +0,0 @@ - -var rng; - -if (global.crypto && crypto.getRandomValues) { - // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto - // Moderately fast, high quality - var _rnds8 = new Uint8Array(16); - rng = function whatwgRNG() { - crypto.getRandomValues(_rnds8); - return _rnds8; - }; -} - -if (!rng) { - // Math.random()-based (RNG) - // - // If all else fails, use Math.random(). It's fast, but is of unspecified - // quality. - var _rnds = new Array(16); - rng = function() { - for (var i = 0, r; i < 16; i++) { - if ((i & 0x03) === 0) r = Math.random() * 0x100000000; - _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; - } - - return _rnds; - }; -} - -module.exports = rng; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/rng.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/rng.js deleted file mode 100644 index 3977f798..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/rng.js +++ /dev/null @@ -1,4 +0,0 @@ -var rb = require('crypto').randomBytes; -module.exports = function() { - return rb(16); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/test/mocha.opts b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/test/mocha.opts deleted file mode 100644 index e2bfcc5a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/test/mocha.opts +++ /dev/null @@ -1 +0,0 @@ ---ui qunit diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/test/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/test/test.js deleted file mode 100644 index 4c9872ff..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/test/test.js +++ /dev/null @@ -1,105 +0,0 @@ -var assert = require('assert'); - -var uuid = require('../'); - -// Verify ordering of v1 ids created with explicit times -var TIME = 1321644961388; // 2011-11-18 11:36:01.388-08:00 - -function compare(name, ids) { - test(name, function() { - // avoid .map for older browsers - for (var i=0 ; i<ids.length ; ++i) { - ids[i] = ids[i].split('-').reverse().join('-'); - } - ids = ids.sort(); - var sorted = ([].concat(ids)).sort(); - - assert(sorted.toString() == ids.toString(), name + ' have expected order'); - }); -} - -// Verify ordering of v1 ids created using default behavior -compare('uuids with current time', [ - uuid.v1(), - uuid.v1(), - uuid.v1(), - uuid.v1(), - uuid.v1() -]); - -// Verify ordering of v1 ids created with explicit times -compare('uuids with time option', [ - uuid.v1({msecs: TIME - 10*3600*1000}), - uuid.v1({msecs: TIME - 1}), - uuid.v1({msecs: TIME}), - uuid.v1({msecs: TIME + 1}), - uuid.v1({msecs: TIME + 28*24*3600*1000}) -]); - -test('msec', function() { - assert( - uuid.v1({msecs: TIME}) != uuid.v1({msecs: TIME}), - 'IDs created at same msec are different' - ); -}); - -test('exception thrown when > 10k ids created in 1ms', function() { - // Verify throw if too many ids created - var thrown = false; - try { - uuid.v1({msecs: TIME, nsecs: 10000}); - } catch (e) { - thrown = true; - } - assert(thrown, 'Exception thrown when > 10K ids created in 1 ms'); -}); - -test('clock regression by msec', function() { - // Verify clock regression bumps clockseq - var uidt = uuid.v1({msecs: TIME}); - var uidtb = uuid.v1({msecs: TIME - 1}); - assert( - parseInt(uidtb.split('-')[3], 16) - parseInt(uidt.split('-')[3], 16) === 1, - 'Clock regression by msec increments the clockseq' - ); -}); - -test('clock regression by nsec', function() { - // Verify clock regression bumps clockseq - var uidtn = uuid.v1({msecs: TIME, nsecs: 10}); - var uidtnb = uuid.v1({msecs: TIME, nsecs: 9}); - assert( - parseInt(uidtnb.split('-')[3], 16) - parseInt(uidtn.split('-')[3], 16) === 1, - 'Clock regression by nsec increments the clockseq' - ); -}); - -test('explicit options product expected id', function() { - // Verify explicit options produce expected id - var id = uuid.v1({ - msecs: 1321651533573, - nsecs: 5432, - clockseq: 0x385c, - node: [ 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10 ] - }); - assert(id == 'd9428888-122b-11e1-b85c-61cd3cbb3210', 'Explicit options produce expected id'); -}); - -test('ids spanning 1ms boundary are 100ns apart', function() { - // Verify adjacent ids across a msec boundary are 1 time unit apart - var u0 = uuid.v1({msecs: TIME, nsecs: 9999}); - var u1 = uuid.v1({msecs: TIME + 1, nsecs: 0}); - - var before = u0.split('-')[0], after = u1.split('-')[0]; - var dt = parseInt(after, 16) - parseInt(before, 16); - assert(dt === 1, 'Ids spanning 1ms boundary are 100ns apart'); -}); - -test('parse/unparse', function() { - var id = '00112233445566778899aabbccddeeff'; - assert(uuid.unparse(uuid.parse(id.substr(0,10))) == - '00112233-4400-0000-0000-000000000000', 'Short parse'); - assert(uuid.unparse(uuid.parse('(this is the uuid -> ' + id + id)) == - '00112233-4455-6677-8899-aabbccddeeff', 'Dirty parse'); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/uuid.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/uuid.js deleted file mode 100644 index d0062fb4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/node_modules/uuid/uuid.js +++ /dev/null @@ -1,187 +0,0 @@ -// uuid.js -// -// Copyright (c) 2010-2012 Robert Kieffer -// MIT License - http://opensource.org/licenses/mit-license.php - -// Unique ID creation requires a high quality random # generator. We feature -// detect to determine the best RNG source, normalizing to a function that -// returns 128-bits of randomness, since that's what's usually required -var _rng = require('./rng'); - -// Buffer class to use -var BufferClass = typeof(Buffer) == 'function' ? Buffer : Array; - -// Maps for number <-> hex string conversion -var _byteToHex = []; -var _hexToByte = {}; -for (var i = 0; i < 256; i++) { - _byteToHex[i] = (i + 0x100).toString(16).substr(1); - _hexToByte[_byteToHex[i]] = i; -} - -// **`parse()` - Parse a UUID into it's component bytes** -function parse(s, buf, offset) { - var i = (buf && offset) || 0, ii = 0; - - buf = buf || []; - s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) { - if (ii < 16) { // Don't overflow! - buf[i + ii++] = _hexToByte[oct]; - } - }); - - // Zero out remaining bytes if string was short - while (ii < 16) { - buf[i + ii++] = 0; - } - - return buf; -} - -// **`unparse()` - Convert UUID byte array (ala parse()) into a string** -function unparse(buf, offset) { - var i = offset || 0, bth = _byteToHex; - return bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]]; -} - -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html - -// random #'s we need to init node and clockseq -var _seedBytes = _rng(); - -// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) -var _nodeId = [ - _seedBytes[0] | 0x01, - _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] -]; - -// Per 4.2.2, randomize (14 bit) clockseq -var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff; - -// Previous uuid creation time -var _lastMSecs = 0, _lastNSecs = 0; - -// See https://github.com/broofa/node-uuid for API details -function v1(options, buf, offset) { - var i = buf && offset || 0; - var b = buf || []; - - options = options || {}; - - var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; - - // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); - - // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; - - // Time since last uuid creation (in msecs) - var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; - - // Per 4.2.1.2, Bump clockseq on clock regression - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } - - // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } - - // Per 4.2.1.2 Throw error if too many uuids are requested - if (nsecs >= 10000) { - throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; - - // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - msecs += 12219292800000; - - // `time_low` - var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; - - // `time_mid` - var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; - - // `time_high_and_version` - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - b[i++] = tmh >>> 16 & 0xff; - - // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - b[i++] = clockseq >>> 8 | 0x80; - - // `clock_seq_low` - b[i++] = clockseq & 0xff; - - // `node` - var node = options.node || _nodeId; - for (var n = 0; n < 6; n++) { - b[i + n] = node[n]; - } - - return buf ? buf : unparse(b); -} - -// **`v4()` - Generate random UUID** - -// See https://github.com/broofa/node-uuid for API details -function v4(options, buf, offset) { - // Deprecated - 'format' argument, as supported in v1.2 - var i = buf && offset || 0; - - if (typeof(options) == 'string') { - buf = options == 'binary' ? new BufferClass(16) : null; - options = null; - } - options = options || {}; - - var rnds = options.random || (options.rng || _rng)(); - - // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - - // Copy bytes to buffer, if provided - if (buf) { - for (var ii = 0; ii < 16; ii++) { - buf[i + ii] = rnds[ii]; - } - } - - return buf || unparse(rnds); -} - -// Export public API -var uuid = v4; -uuid.v1 = v1; -uuid.v4 = v4; -uuid.parse = parse; -uuid.unparse = unparse; -uuid.BufferClass = BufferClass; - -module.exports = uuid; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/package.json deleted file mode 100644 index 561465e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "tempfile", - "version": "0.1.2", - "description": "Get a random temp file path", - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/tempfile" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js" - ], - "keywords": [ - "tmp", - "temp", - "temporary", - "tempfile", - "file", - "path", - "random", - "rand" - ], - "dependencies": { - "uuid": "~1.4.0" - }, - "devDependencies": { - "mocha": "*" - }, - "readme": "# tempfile [![Build Status](https://travis-ci.org/sindresorhus/tempfile.png?branch=master)](http://travis-ci.org/sindresorhus/tempfile)\n\n> Get a random temp file path\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/tempfile)\n\n```\nnpm install --save tempfile\n```\n\n\n## Example\n\n```js\nvar tempfile = require('tempfile');\ntempfile('.png');\n//=> /var/folders/_1/tk89k8215ts0rg0kmb096nj80000gn/T/4049f192-43e7-43b2-98d9-094e6760861b.png\n```\n\n## API\n\n### tempfile(extension)\n\n#### extension\n\nType: `String`\n\nOptionally supply an extension to append to the path.\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "bugs": { - "url": "https://github.com/sindresorhus/tempfile/issues" - }, - "homepage": "https://github.com/sindresorhus/tempfile", - "_id": "tempfile@0.1.2", - "dist": { - "shasum": "81d4e51f35856592f3b51d568135791af3b038e0" - }, - "_from": "tempfile@~0.1.2", - "_resolved": "https://registry.npmjs.org/tempfile/-/tempfile-0.1.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/readme.md deleted file mode 100644 index 672a0ac6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/node_modules/tempfile/readme.md +++ /dev/null @@ -1,36 +0,0 @@ -# tempfile [![Build Status](https://travis-ci.org/sindresorhus/tempfile.png?branch=master)](http://travis-ci.org/sindresorhus/tempfile) - -> Get a random temp file path - - -## Install - -Install with [npm](https://npmjs.org/package/tempfile) - -``` -npm install --save tempfile -``` - - -## Example - -```js -var tempfile = require('tempfile'); -tempfile('.png'); -//=> /var/folders/_1/tk89k8215ts0rg0kmb096nj80000gn/T/4049f192-43e7-43b2-98d9-094e6760861b.png -``` - -## API - -### tempfile(extension) - -#### extension - -Type: `String` - -Optionally supply an extension to append to the path. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/package.json deleted file mode 100644 index 6e75932a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "decompress", - "version": "0.1.6", - "description": "Easily extract zip, tar and tar.gz archives", - "keywords": [ - "extract", - "zip", - "tar", - "tar.gz" - ], - "homepage": "https://github.com/kevva/decompress", - "bugs": { - "url": "https://github.com/kevva/decompress/issues" - }, - "author": { - "name": "Kevin Martensson", - "email": "kevinmartensson@gmail.com", - "url": "http://kevinmartensson.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/kevva/decompress.git" - }, - "scripts": { - "test": "mocha --reporter list" - }, - "main": "decompress.js", - "files": [ - "decompress.js" - ], - "dependencies": { - "adm-zip": "~0.4.3", - "mkdirp": "~0.3.5", - "mout": "~0.6.0", - "rimraf": "~2.2.2", - "stream-combiner": "~0.0.2", - "tar": "~0.1.18", - "tempfile": "~0.1.2" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "readme": "# decompress [![Build Status](https://secure.travis-ci.org/kevva/decompress.png?branch=master)](http://travis-ci.org/kevva/decompress)\n\nEasily extract `.zip`, `.tar` and `.tar.gz` archives. Based on the extract \nutility in [Bower](https://github.com/bower/bower).\n\n## Getting started\n\nInstall with [npm](https://npmjs.org/package/decompress): `npm install decompress`\n\n## Examples\n\nYou'll only need to pass a type into `ext` and it'll figure the rest out for \nyou.\n\n```js\nvar decompress = require('decompress');\nvar fs = require('fs');\n\nvar src = fs.createReadStream('foo.tar.gz');\nvar dest = decompress.extract({ ext: '.tar.gz' });\n\nsrc.pipe(dest);\n```\n\n## API\n\n### .extract(opts)\n\nExtract an archive using the `ext` option to determine which extractor to use. \nIf no `path` is specified it'll extract it to your current location.\n\n### .canExtract(src, mime)\n\nDetermine if a file can be extracted or not by checking the file extension \nand/or the MIME type.\n\n```js\ndecompress.canExtract('foo.zip');\n// => true\n\ndecompress.canExtract('application/zip');\n// => true\n```\n\n## Options\n\n### `ext`\n\nType: `String` \nDefault: `''`\n\nString that can be a file name, URL, MIME type etc.\n\n### `path`\n\nType: `String` \nDefault: `process.cwd()`\n\nPath to extract the archive to. If no `path` is defined it'll extract it to your \ncurrent location.\n\n### strip\n\nType: `Number` \nDefault: `0`\n\nEquivalent to `--strip-components` for tar.\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com)\n", - "readmeFilename": "README.md", - "_id": "decompress@0.1.6", - "dist": { - "shasum": "dc920bd81312e06f3e97aa46add56f1e95e21a4e" - }, - "_from": "decompress@~0.1.5", - "_resolved": "https://registry.npmjs.org/decompress/-/decompress-0.1.6.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/each-async.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/each-async.js deleted file mode 100644 index a43b4363..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/each-async.js +++ /dev/null @@ -1,72 +0,0 @@ -/*! - each-async - Async concurrent iterator (async forEach) - https://github.com/sindresorhus/each-async - by Sindre Sorhus - MIT License -*/ -(function () { - 'use strict'; - - function once(fn) { - var called = false; - - if (typeof fn !== 'function') { - throw new TypeError; - } - - return function () { - if (called) { - throw new Error('Callback already called.'); - } - called = true; - fn.apply(this, arguments); - } - } - - function each(arr, next, cb) { - var failed = false; - var count = 0; - - cb = cb || function () {}; - - if (!Array.isArray(arr)) { - throw new TypeError('First argument must be an array'); - } - - if (typeof next !== 'function') { - throw new TypeError('Second argument must be a function'); - } - - var len = arr.length; - - if (!len) { - return cb(); - } - - function callback(err) { - if (failed) { - return; - } - - if (err !== undefined && err !== null) { - failed = true; - return cb(err); - } - - if (++count === len) { - return cb(); - } - } - - for (var i = 0; i < len; i++) { - next(arr[i], i, once(callback)); - } - } - - if (typeof module !== 'undefined' && module.exports) { - module.exports = each; - } else { - window.eachAsync = each; - } -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/package.json deleted file mode 100644 index 8e17c2d0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "each-async", - "version": "0.1.2", - "description": "Async concurrent iterator", - "license": "MIT", - "main": "each-async.js", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/each-async" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "each-async.js" - ], - "keywords": [ - "each", - "async", - "asynchronous", - "iteration", - "iterate", - "loop", - "foreach", - "parallel", - "concurrent", - "array", - "flow", - "control flow" - ], - "devDependencies": { - "mocha": "*" - }, - "readme": "# each-async [![Build Status](https://secure.travis-ci.org/sindresorhus/each-async.png?branch=master)](http://travis-ci.org/sindresorhus/each-async)\n\n> Async concurrent iterator (async forEach)\n\nLike [async.each()](https://github.com/caolan/async#eacharr-iterator-callback), but tiny.\n\nI often use `async.each()` for doing async operations when iterating, but I almost never use the other gadzillion methods in `async`.\n\nAsync iteration is one of the most used async control flow patterns.\n\n\n## Install\n\nDownload [manually](https://github.com/sindresorhus/each-async/releases) or with a package-manager.\n\n#### [npm](https://npmjs.org/package/each-async)\n\n```\nnpm install --save each-async\n```\n\n#### [Bower](http://bower.io)\n\n```\nbower install --save each-async\n```\n\n#### [Component](https://github.com/component/component)\n\n```\ncomponent install sindresorhus/each-async\n```\n\n\n## Examples\n\n### Node.js\n\n```js\neachAsync(['foo','bar','baz'], function (item, index, done) {\n\tconsole.log(item, index);\n\tdone();\n}, function (error) {\n\tconsole.log('finished');\n});\n//=> foo 0\n//=> bar 1\n//=> baz 2\n//=> finished\n```\n\n\n## API\n\n### eachAsync(array, callback, finishedCallback)\n\n#### array\n\nThe array you want to iterate.\n\n#### callback(item, index, done)\n\nA function which is called for each item in the array with the following arguments:\n\n- `item`: the current item in the array\n- `index`: the current index\n- `done([error])`: call this when you're done with an optional error. Supplying anything other than `undefined`/`null` will stop the iteration.\n\nNote that order is not guaranteed since each item is handled concurrently.\n\n#### finishedCallback(error)\n\nA function which is called when the iteration is finished or on the first error. First argument is the error passed from `done()` in the `callback`.\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "bugs": { - "url": "https://github.com/sindresorhus/each-async/issues" - }, - "homepage": "https://github.com/sindresorhus/each-async", - "_id": "each-async@0.1.2", - "dist": { - "shasum": "d5b900bd92705ed5b8cad3307a6536adb0f134c6" - }, - "_from": "each-async@~0.1.1", - "_resolved": "https://registry.npmjs.org/each-async/-/each-async-0.1.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/readme.md deleted file mode 100644 index e5e5bb14..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/each-async/readme.md +++ /dev/null @@ -1,78 +0,0 @@ -# each-async [![Build Status](https://secure.travis-ci.org/sindresorhus/each-async.png?branch=master)](http://travis-ci.org/sindresorhus/each-async) - -> Async concurrent iterator (async forEach) - -Like [async.each()](https://github.com/caolan/async#eacharr-iterator-callback), but tiny. - -I often use `async.each()` for doing async operations when iterating, but I almost never use the other gadzillion methods in `async`. - -Async iteration is one of the most used async control flow patterns. - - -## Install - -Download [manually](https://github.com/sindresorhus/each-async/releases) or with a package-manager. - -#### [npm](https://npmjs.org/package/each-async) - -``` -npm install --save each-async -``` - -#### [Bower](http://bower.io) - -``` -bower install --save each-async -``` - -#### [Component](https://github.com/component/component) - -``` -component install sindresorhus/each-async -``` - - -## Examples - -### Node.js - -```js -eachAsync(['foo','bar','baz'], function (item, index, done) { - console.log(item, index); - done(); -}, function (error) { - console.log('finished'); -}); -//=> foo 0 -//=> bar 1 -//=> baz 2 -//=> finished -``` - - -## API - -### eachAsync(array, callback, finishedCallback) - -#### array - -The array you want to iterate. - -#### callback(item, index, done) - -A function which is called for each item in the array with the following arguments: - -- `item`: the current item in the array -- `index`: the current index -- `done([error])`: call this when you're done with an optional error. Supplying anything other than `undefined`/`null` will stop the iteration. - -Note that order is not guaranteed since each item is handled concurrently. - -#### finishedCallback(error) - -A function which is called when the iteration is finished or on the first error. First argument is the error passed from `done()` in the `callback`. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/.npmignore deleted file mode 100644 index 80e59ef5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -tests -node_modules diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/.travis.yml deleted file mode 100644 index 0bce8152..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: node_js -node_js: - - 0.8 - - 0.10 - -env: - - OPTIONALS=Y - - OPTIONALS=N - -install: - - if [[ "$OPTIONALS" == "Y" ]]; then npm install; fi - - if [[ "$OPTIONALS" == "N" ]]; then npm install --no-optional; fi diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/LICENSE deleted file mode 100644 index a4a9aee0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/README.md deleted file mode 100644 index 5c0c081f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/README.md +++ /dev/null @@ -1,366 +0,0 @@ -# Request -- Simplified HTTP client - -[![NPM](https://nodei.co/npm/request.png)](https://nodei.co/npm/request/) - -## Super simple to use - -Request is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default. - -```javascript -var request = require('request'); -request('http://www.google.com', function (error, response, body) { - if (!error && response.statusCode == 200) { - console.log(body) // Print the google web page. - } -}) -``` - -## Streaming - -You can stream any response to a file stream. - -```javascript -request('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png')) -``` - -You can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers don’t already provide one). - -```javascript -fs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json')) -``` - -Request can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers. - -```javascript -request.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png')) -``` - -Now let’s get fancy. - -```javascript -http.createServer(function (req, resp) { - if (req.url === '/doodle.png') { - if (req.method === 'PUT') { - req.pipe(request.put('http://mysite.com/doodle.png')) - } else if (req.method === 'GET' || req.method === 'HEAD') { - request.get('http://mysite.com/doodle.png').pipe(resp) - } - } -}) -``` - -You can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do: - -```javascript -http.createServer(function (req, resp) { - if (req.url === '/doodle.png') { - var x = request('http://mysite.com/doodle.png') - req.pipe(x) - x.pipe(resp) - } -}) -``` - -And since `pipe()` returns the destination stream in ≥ Node 0.5.x you can do one line proxying. :) - -```javascript -req.pipe(request('http://mysite.com/doodle.png')).pipe(resp) -``` - -Also, none of this new functionality conflicts with requests previous features, it just expands them. - -```javascript -var r = request.defaults({'proxy':'http://localproxy.com'}) - -http.createServer(function (req, resp) { - if (req.url === '/doodle.png') { - r.get('http://google.com/doodle.png').pipe(resp) - } -}) -``` - -You can still use intermediate proxies, the requests will still follow HTTP forwards, etc. - -## Forms - -`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API. - -URL-encoded forms are simple. - -```javascript -request.post('http://service.com/upload', {form:{key:'value'}}) -// or -request.post('http://service.com/upload').form({key:'value'}) -``` - -For `multipart/form-data` we use the [form-data](https://github.com/felixge/node-form-data) library by [@felixge](https://github.com/felixge). You don’t need to worry about piping the form object or setting the headers, `request` will handle that for you. - -```javascript -var r = request.post('http://service.com/upload') -var form = r.form() -form.append('my_field', 'my_value') -form.append('my_buffer', new Buffer([1, 2, 3])) -form.append('my_file', fs.createReadStream(path.join(__dirname, 'doodle.png')) -form.append('remote_file', request('http://google.com/doodle.png')) -``` - -## HTTP Authentication - -```javascript -request.get('http://some.server.com/').auth('username', 'password', false); -// or -request.get('http://some.server.com/', { - 'auth': { - 'user': 'username', - 'pass': 'password', - 'sendImmediately': false - } -}); -``` - -If passed as an option, `auth` should be a hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). The method form takes parameters `auth(username, password, sendImmediately)`. - -`sendImmediately` defaults to `true`, which causes a basic authentication header to be sent. If `sendImmediately` is `false`, then `request` will retry with a proper authentication header after receiving a `401` response from the server (which must contain a `WWW-Authenticate` header indicating the required authentication method). - -Digest authentication is supported, but it only works with `sendImmediately` set to `false`; otherwise `request` will send basic authentication on the initial request, which will probably cause the request to fail. - -## OAuth Signing - -```javascript -// Twitter OAuth -var qs = require('querystring') - , oauth = - { callback: 'http://mysite.com/callback/' - , consumer_key: CONSUMER_KEY - , consumer_secret: CONSUMER_SECRET - } - , url = 'https://api.twitter.com/oauth/request_token' - ; -request.post({url:url, oauth:oauth}, function (e, r, body) { - // Ideally, you would take the body in the response - // and construct a URL that a user clicks on (like a sign in button). - // The verifier is only available in the response after a user has - // verified with twitter that they are authorizing your app. - var access_token = qs.parse(body) - , oauth = - { consumer_key: CONSUMER_KEY - , consumer_secret: CONSUMER_SECRET - , token: access_token.oauth_token - , verifier: access_token.oauth_verifier - } - , url = 'https://api.twitter.com/oauth/access_token' - ; - request.post({url:url, oauth:oauth}, function (e, r, body) { - var perm_token = qs.parse(body) - , oauth = - { consumer_key: CONSUMER_KEY - , consumer_secret: CONSUMER_SECRET - , token: perm_token.oauth_token - , token_secret: perm_token.oauth_token_secret - } - , url = 'https://api.twitter.com/1.1/users/show.json?' - , params = - { screen_name: perm_token.screen_name - , user_id: perm_token.user_id - } - ; - url += qs.stringify(params) - request.get({url:url, oauth:oauth, json:true}, function (e, r, user) { - console.log(user) - }) - }) -}) -``` - -### Custom HTTP Headers - -HTTP Headers, such as `User-Agent`, can be set in the `options` object. -In the example below, we call the github API to find out the number -of stars and forks for the request repository. This requires a -custom `User-Agent` header as well as https. - -```javascript -var request = require('request'); - -var options = { - url: 'https://api.github.com/repos/mikeal/request', - headers: { - 'User-Agent': 'request' - } -}; - -function callback(error, response, body) { - if (!error && response.statusCode == 200) { - var info = JSON.parse(body); - console.log(info.stargazers_count + " Stars"); - console.log(info.forks_count + " Forks"); - } -} - -request(options, callback); -``` - -### request(options, callback) - -The first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional. - -* `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()` -* `qs` - object containing querystring values to be appended to the `uri` -* `method` - http method (default: `"GET"`) -* `headers` - http headers (default: `{}`) -* `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`. -* `form` - when passed an object, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header. When passed no options, a `FormData` instance is returned (and is piped to request). -* `auth` - A hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). See documentation above. -* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON. -* `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below. -* `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`) -* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`) -* `maxRedirects` - the maximum number of redirects to follow (default: `10`) -* `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`. -* `pool` - A hash object containing the agents for these requests. If omitted, the request will use the global pool (which is set to node's default `maxSockets`) -* `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool. -* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request -* `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`) -* `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above. -* `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example). -* `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option. -* `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section) -* `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services) -* `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options. -* `localAddress` - Local interface to bind for network connections. - - -The callback argument gets 3 arguments: - -1. An `error` when applicable (usually from [`http.ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) object) -2. An [`http.IncomingMessage`](http://nodejs.org/api/http.html#http_http_incomingmessage) object -3. The third is the `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied) - -## Convenience methods - -There are also shorthand methods for different HTTP METHODs and some other conveniences. - -### request.defaults(options) - -This method returns a wrapper around the normal request API that defaults to whatever options you pass in to it. - -### request.put - -Same as `request()`, but defaults to `method: "PUT"`. - -```javascript -request.put(url) -``` - -### request.patch - -Same as `request()`, but defaults to `method: "PATCH"`. - -```javascript -request.patch(url) -``` - -### request.post - -Same as `request()`, but defaults to `method: "POST"`. - -```javascript -request.post(url) -``` - -### request.head - -Same as request() but defaults to `method: "HEAD"`. - -```javascript -request.head(url) -``` - -### request.del - -Same as `request()`, but defaults to `method: "DELETE"`. - -```javascript -request.del(url) -``` - -### request.get - -Same as `request()` (for uniformity). - -```javascript -request.get(url) -``` -### request.cookie - -Function that creates a new cookie. - -```javascript -request.cookie('cookie_string_here') -``` -### request.jar - -Function that creates a new cookie jar. - -```javascript -request.jar() -``` - - -## Examples: - -```javascript - var request = require('request') - , rand = Math.floor(Math.random()*100000000).toString() - ; - request( - { method: 'PUT' - , uri: 'http://mikeal.iriscouch.com/testjs/' + rand - , multipart: - [ { 'content-type': 'application/json' - , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}}) - } - , { body: 'I am an attachment' } - ] - } - , function (error, response, body) { - if(response.statusCode == 201){ - console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand) - } else { - console.log('error: '+ response.statusCode) - console.log(body) - } - } - ) -``` - -Cookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`). - -```javascript -var request = request.defaults({jar: true}) -request('http://www.google.com', function () { - request('http://images.google.com') -}) -``` - -To use a custom cookie jar (instead `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`) - -```javascript -var j = request.jar() -var request = request.defaults({jar:j}) -request('http://www.google.com', function () { - request('http://images.google.com') -}) -``` -OR - -Note that `setCookie` requires at least three parameters, and the last is required to be a callback. - -```javascript -var j = request.jar() -var cookie = request.cookie('your_cookie_here') -j.setCookie(cookie, uri, function (err, cookie){}) -request({url: 'http://www.google.com', jar: j}, function () { - request('http://images.google.com') -}) -``` diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/dns-request.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/dns-request.js deleted file mode 100644 index 6a847f6d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/dns-request.js +++ /dev/null @@ -1,7 +0,0 @@ -var request = require('request') - , dns = require('dns') - ; - -function wrap (fn) { - var -} \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/index.js deleted file mode 100755 index 465e5ae3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/index.js +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright 2010-2012 Mikeal Rogers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -var optional = require('./lib/optional') - , cookie = optional('tough-cookie') - , Cookie = cookie && cookie.Cookie - , CookieJar = cookie && cookie.CookieJar - , cookieJar = CookieJar && new CookieJar - - , copy = require('./lib/copy') - , Request = require('./request') - ; - - - -// organize params for patch, post, put, head, del -function initParams(uri, options, callback) { - if ((typeof options === 'function') && !callback) callback = options - if (options && typeof options === 'object') { - options.uri = uri - } else if (typeof uri === 'string') { - options = {uri:uri} - } else { - options = uri - uri = options.uri - } - return { uri: uri, options: options, callback: callback } -} - -function request (uri, options, callback) { - if (typeof uri === 'undefined') throw new Error('undefined is not a valid uri or options object.') - if ((typeof options === 'function') && !callback) callback = options - if (options && typeof options === 'object') { - options.uri = uri - } else if (typeof uri === 'string') { - options = {uri:uri} - } else { - options = uri - } - - options = copy(options) - - if (callback) options.callback = callback - var r = new Request(options) - return r -} - -module.exports = request - -request.Request = Request; - -request.debug = process.env.NODE_DEBUG && /request/.test(process.env.NODE_DEBUG) - -request.initParams = initParams - -request.defaults = function (options, requester) { - var def = function (method) { - var d = function (uri, opts, callback) { - var params = initParams(uri, opts, callback) - for (var i in options) { - if (params.options[i] === undefined) params.options[i] = options[i] - } - if(typeof requester === 'function') { - if(method === request) { - method = requester - } else { - params.options._requester = requester - } - } - return method(params.options, params.callback) - } - return d - } - var de = def(request) - de.get = def(request.get) - de.patch = def(request.patch) - de.post = def(request.post) - de.put = def(request.put) - de.head = def(request.head) - de.del = def(request.del) - de.cookie = def(request.cookie) - de.jar = request.jar - return de -} - -function requester(params) { - if(typeof params.options._requester === 'function') { - return params.options._requester - } else { - return request - } -} - -request.forever = function (agentOptions, optionsArg) { - var options = {} - if (optionsArg) { - for (var option in optionsArg) { - options[option] = optionsArg[option] - } - } - if (agentOptions) options.agentOptions = agentOptions - options.forever = true - return request.defaults(options) -} - -request.get = request -request.post = function (uri, options, callback) { - var params = initParams(uri, options, callback) - params.options.method = 'POST' - return requester(params)(params.uri || null, params.options, params.callback) -} -request.put = function (uri, options, callback) { - var params = initParams(uri, options, callback) - params.options.method = 'PUT' - return requester(params)(params.uri || null, params.options, params.callback) -} -request.patch = function (uri, options, callback) { - var params = initParams(uri, options, callback) - params.options.method = 'PATCH' - return requester(params)(params.uri || null, params.options, params.callback) -} -request.head = function (uri, options, callback) { - var params = initParams(uri, options, callback) - params.options.method = 'HEAD' - if (params.options.body || - params.options.requestBodyStream || - (params.options.json && typeof params.options.json !== 'boolean') || - params.options.multipart) { - throw new Error("HTTP HEAD requests MUST NOT include a request body.") - } - - return requester(params)(params.uri || null, params.options, params.callback) -} -request.del = function (uri, options, callback) { - var params = initParams(uri, options, callback) - params.options.method = 'DELETE' - return requester(params)(params.uri || null, params.options, params.callback) -} -request.jar = function () { - return new CookieJar -} -request.cookie = function (str) { - if (str && str.uri) str = str.uri - if (typeof str !== 'string') throw new Error("The cookie function only accepts STRING as param") - return new Cookie(str) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/copy.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/copy.js deleted file mode 100644 index 56831ff8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/copy.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = -function copy (obj) { - var o = {} - Object.keys(obj).forEach(function (i) { - o[i] = obj[i] - }) - return o -} \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/debug.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/debug.js deleted file mode 100644 index fa27b24b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/debug.js +++ /dev/null @@ -1,7 +0,0 @@ -var util = require('util') - -module.exports = -function debug () { - if (/\brequest\b/.test(process.env.NODE_DEBUG)) - console.error('REQUEST %s', util.format.apply(util, arguments)) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/getSafe.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/getSafe.js deleted file mode 100644 index 28e07ea5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/getSafe.js +++ /dev/null @@ -1,34 +0,0 @@ -// Safe toJSON -module.exports = -function getSafe (self, uuid) { - if (typeof self === 'object' || typeof self === 'function') var safe = {} - if (Array.isArray(self)) var safe = [] - - var recurse = [] - - Object.defineProperty(self, uuid, {}) - - var attrs = Object.keys(self).filter(function (i) { - if (i === uuid) return false - if ( (typeof self[i] !== 'object' && typeof self[i] !== 'function') || self[i] === null) return true - return !(Object.getOwnPropertyDescriptor(self[i], uuid)) - }) - - - for (var i=0;i<attrs.length;i++) { - if ( (typeof self[attrs[i]] !== 'object' && typeof self[attrs[i]] !== 'function') || - self[attrs[i]] === null - ) { - safe[attrs[i]] = self[attrs[i]] - } else { - recurse.push(attrs[i]) - Object.defineProperty(self[attrs[i]], uuid, {}) - } - } - - for (var i=0;i<recurse.length;i++) { - safe[recurse[i]] = getSafe(self[recurse[i]], uuid) - } - - return safe -} \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/optional.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/optional.js deleted file mode 100644 index 0c4fe853..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/lib/optional.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = function(module) { - try { - return require(module); - } catch (e) {} -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/LICENSE deleted file mode 100644 index a4a9aee0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/README.md deleted file mode 100644 index 763564e0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/README.md +++ /dev/null @@ -1,4 +0,0 @@ -aws-sign -======== - -AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/index.js deleted file mode 100644 index 576e49dd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/index.js +++ /dev/null @@ -1,202 +0,0 @@ - -/*! - * knox - auth - * Copyright(c) 2010 LearnBoost <dev@learnboost.com> - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var crypto = require('crypto') - , parse = require('url').parse - ; - -/** - * Valid keys. - */ - -var keys = - [ 'acl' - , 'location' - , 'logging' - , 'notification' - , 'partNumber' - , 'policy' - , 'requestPayment' - , 'torrent' - , 'uploadId' - , 'uploads' - , 'versionId' - , 'versioning' - , 'versions' - , 'website' - ] - -/** - * Return an "Authorization" header value with the given `options` - * in the form of "AWS <key>:<signature>" - * - * @param {Object} options - * @return {String} - * @api private - */ - -function authorization (options) { - return 'AWS ' + options.key + ':' + sign(options) -} - -module.exports = authorization -module.exports.authorization = authorization - -/** - * Simple HMAC-SHA1 Wrapper - * - * @param {Object} options - * @return {String} - * @api private - */ - -function hmacSha1 (options) { - return crypto.createHmac('sha1', options.secret).update(options.message).digest('base64') -} - -module.exports.hmacSha1 = hmacSha1 - -/** - * Create a base64 sha1 HMAC for `options`. - * - * @param {Object} options - * @return {String} - * @api private - */ - -function sign (options) { - options.message = stringToSign(options) - return hmacSha1(options) -} -module.exports.sign = sign - -/** - * Create a base64 sha1 HMAC for `options`. - * - * Specifically to be used with S3 presigned URLs - * - * @param {Object} options - * @return {String} - * @api private - */ - -function signQuery (options) { - options.message = queryStringToSign(options) - return hmacSha1(options) -} -module.exports.signQuery= signQuery - -/** - * Return a string for sign() with the given `options`. - * - * Spec: - * - * <verb>\n - * <md5>\n - * <content-type>\n - * <date>\n - * [headers\n] - * <resource> - * - * @param {Object} options - * @return {String} - * @api private - */ - -function stringToSign (options) { - var headers = options.amazonHeaders || '' - if (headers) headers += '\n' - var r = - [ options.verb - , options.md5 - , options.contentType - , options.date ? options.date.toUTCString() : '' - , headers + options.resource - ] - return r.join('\n') -} -module.exports.queryStringToSign = stringToSign - -/** - * Return a string for sign() with the given `options`, but is meant exclusively - * for S3 presigned URLs - * - * Spec: - * - * <date>\n - * <resource> - * - * @param {Object} options - * @return {String} - * @api private - */ - -function queryStringToSign (options){ - return 'GET\n\n\n' + options.date + '\n' + options.resource -} -module.exports.queryStringToSign = queryStringToSign - -/** - * Perform the following: - * - * - ignore non-amazon headers - * - lowercase fields - * - sort lexicographically - * - trim whitespace between ":" - * - join with newline - * - * @param {Object} headers - * @return {String} - * @api private - */ - -function canonicalizeHeaders (headers) { - var buf = [] - , fields = Object.keys(headers) - ; - for (var i = 0, len = fields.length; i < len; ++i) { - var field = fields[i] - , val = headers[field] - , field = field.toLowerCase() - ; - if (0 !== field.indexOf('x-amz')) continue - buf.push(field + ':' + val) - } - return buf.sort().join('\n') -} -module.exports.canonicalizeHeaders = canonicalizeHeaders - -/** - * Perform the following: - * - * - ignore non sub-resources - * - sort lexicographically - * - * @param {String} resource - * @return {String} - * @api private - */ - -function canonicalizeResource (resource) { - var url = parse(resource, true) - , path = url.pathname - , buf = [] - ; - - Object.keys(url.query).forEach(function(key){ - if (!~keys.indexOf(key)) return - var val = '' == url.query[key] ? '' : '=' + encodeURIComponent(url.query[key]) - buf.push(key + val) - }) - - return path + (buf.length ? '?' + buf.sort().join('&') : '') -} -module.exports.canonicalizeResource = canonicalizeResource diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/package.json deleted file mode 100644 index ae98297e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/aws-sign2/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "author": { - "name": "Mikeal Rogers", - "email": "mikeal.rogers@gmail.com", - "url": "http://www.futurealoof.com" - }, - "name": "aws-sign2", - "description": "AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module.", - "version": "0.5.0", - "repository": { - "url": "https://github.com/mikeal/aws-sign" - }, - "main": "index.js", - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "readme": "aws-sign\n========\n\nAWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/mikeal/aws-sign/issues" - }, - "homepage": "https://github.com/mikeal/aws-sign", - "_id": "aws-sign2@0.5.0", - "dist": { - "shasum": "c57103f7a17fc037f02d7c2e64b602ea223f7d63" - }, - "_from": "aws-sign2@~0.5.0", - "_resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/LICENSE deleted file mode 100644 index a4a9aee0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/README.md deleted file mode 100644 index 9d5b6634..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/README.md +++ /dev/null @@ -1,4 +0,0 @@ -forever-agent -============= - -HTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/index.js deleted file mode 100644 index 1e8efcdf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/index.js +++ /dev/null @@ -1,119 +0,0 @@ -module.exports = ForeverAgent -ForeverAgent.SSL = ForeverAgentSSL - -var util = require('util') - , Agent = require('http').Agent - , net = require('net') - , tls = require('tls') - , AgentSSL = require('https').Agent - -function ForeverAgent(options) { - var self = this - self.options = options || {} - self.requests = {} - self.sockets = {} - self.freeSockets = {} - self.maxSockets = self.options.maxSockets || Agent.defaultMaxSockets - self.minSockets = self.options.minSockets || ForeverAgent.defaultMinSockets - self.on('free', function(socket, host, port) { - var name = host + ':' + port - if (self.requests[name] && self.requests[name].length) { - self.requests[name].shift().onSocket(socket) - } else if (self.sockets[name].length < self.minSockets) { - if (!self.freeSockets[name]) self.freeSockets[name] = [] - self.freeSockets[name].push(socket) - - // if an error happens while we don't use the socket anyway, meh, throw the socket away - var onIdleError = function() { - socket.destroy() - } - socket._onIdleError = onIdleError - socket.on('error', onIdleError) - } else { - // If there are no pending requests just destroy the - // socket and it will get removed from the pool. This - // gets us out of timeout issues and allows us to - // default to Connection:keep-alive. - socket.destroy() - } - }) - -} -util.inherits(ForeverAgent, Agent) - -ForeverAgent.defaultMinSockets = 5 - - -ForeverAgent.prototype.createConnection = net.createConnection -ForeverAgent.prototype.addRequestNoreuse = Agent.prototype.addRequest -ForeverAgent.prototype.addRequest = function(req, host, port) { - var name = host + ':' + port - if (this.freeSockets[name] && this.freeSockets[name].length > 0 && !req.useChunkedEncodingByDefault) { - var idleSocket = this.freeSockets[name].pop() - idleSocket.removeListener('error', idleSocket._onIdleError) - delete idleSocket._onIdleError - req._reusedSocket = true - req.onSocket(idleSocket) - } else { - this.addRequestNoreuse(req, host, port) - } -} - -ForeverAgent.prototype.removeSocket = function(s, name, host, port) { - if (this.sockets[name]) { - var index = this.sockets[name].indexOf(s) - if (index !== -1) { - this.sockets[name].splice(index, 1) - } - } else if (this.sockets[name] && this.sockets[name].length === 0) { - // don't leak - delete this.sockets[name] - delete this.requests[name] - } - - if (this.freeSockets[name]) { - var index = this.freeSockets[name].indexOf(s) - if (index !== -1) { - this.freeSockets[name].splice(index, 1) - if (this.freeSockets[name].length === 0) { - delete this.freeSockets[name] - } - } - } - - if (this.requests[name] && this.requests[name].length) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createSocket(name, host, port).emit('free') - } -} - -function ForeverAgentSSL (options) { - ForeverAgent.call(this, options) -} -util.inherits(ForeverAgentSSL, ForeverAgent) - -ForeverAgentSSL.prototype.createConnection = createConnectionSSL -ForeverAgentSSL.prototype.addRequestNoreuse = AgentSSL.prototype.addRequest - -function createConnectionSSL (port, host, options) { - if (typeof port === 'object') { - options = port; - } else if (typeof host === 'object') { - options = host; - } else if (typeof options === 'object') { - options = options; - } else { - options = {}; - } - - if (typeof port === 'number') { - options.port = port; - } - - if (typeof host === 'string') { - options.host = host; - } - - return tls.connect(options); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/package.json deleted file mode 100644 index 2044778a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/forever-agent/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "author": { - "name": "Mikeal Rogers", - "email": "mikeal.rogers@gmail.com", - "url": "http://www.futurealoof.com" - }, - "name": "forever-agent", - "description": "HTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.", - "version": "0.5.2", - "repository": { - "url": "https://github.com/mikeal/forever-agent" - }, - "main": "index.js", - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "readme": "forever-agent\n=============\n\nHTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/mikeal/forever-agent/issues" - }, - "homepage": "https://github.com/mikeal/forever-agent", - "_id": "forever-agent@0.5.2", - "dist": { - "shasum": "6d0e09c4921f94a27f63d3b49c5feff1ea4c5130" - }, - "_from": "forever-agent@~0.5.0", - "_resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/License b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/License deleted file mode 100644 index c7ff12a2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/License +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors - - 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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/Readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/Readme.md deleted file mode 100644 index dc73c463..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/Readme.md +++ /dev/null @@ -1,163 +0,0 @@ -# Form-Data [![Build Status](https://travis-ci.org/felixge/node-form-data.png?branch=master)](https://travis-ci.org/felixge/node-form-data) [![Dependency Status](https://gemnasium.com/felixge/node-form-data.png)](https://gemnasium.com/felixge/node-form-data) - -A module to create readable ```"multipart/form-data"``` streams. Can be used to submit forms and file uploads to other web applications. - -The API of this module is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd]. - -[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface -[streams2-thing]: http://nodejs.org/api/stream.html#stream_compatibility_with_older_node_versions - -## Install - -``` -npm install form-data -``` - -## Usage - -In this example we are constructing a form with 3 fields that contain a string, -a buffer and a file stream. - -``` javascript -var FormData = require('form-data'); -var fs = require('fs'); - -var form = new FormData(); -form.append('my_field', 'my value'); -form.append('my_buffer', new Buffer(10)); -form.append('my_file', fs.createReadStream('/foo/bar.jpg')); -``` - -Also you can use http-response stream: - -``` javascript -var FormData = require('form-data'); -var http = require('http'); - -var form = new FormData(); - -http.request('http://nodejs.org/images/logo.png', function(response) { - form.append('my_field', 'my value'); - form.append('my_buffer', new Buffer(10)); - form.append('my_logo', response); -}); -``` - -Or @mikeal's request stream: - -``` javascript -var FormData = require('form-data'); -var request = require('request'); - -var form = new FormData(); - -form.append('my_field', 'my value'); -form.append('my_buffer', new Buffer(10)); -form.append('my_logo', request('http://nodejs.org/images/logo.png')); -``` - -In order to submit this form to a web application, call ```submit(url, [callback])``` method: - -``` javascript -form.submit('http://example.org/', function(err, res) { - // res – response object (http.IncomingMessage) // - res.resume(); // for node-0.10.x -}); - -``` - -For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods. - -### Alternative submission methods - -You can use node's http client interface: - -``` javascript -var http = require('http'); - -var request = http.request({ - method: 'post', - host: 'example.org', - path: '/upload', - headers: form.getHeaders() -}); - -form.pipe(request); - -request.on('response', function(res) { - console.log(res.statusCode); -}); -``` - -Or if you would prefer the `'Content-Length'` header to be set for you: - -``` javascript -form.submit('example.org/upload', function(err, res) { - console.log(res.statusCode); -}); -``` - -To use custom headers and pre-known length in parts: - -``` javascript -var CRLF = '\r\n'; -var form = new FormData(); - -var options = { - header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF, - knownLength: 1 -}; - -form.append('my_buffer', buffer, options); - -form.submit('http://example.com/', function(err, res) { - if (err) throw err; - console.log('Done'); -}); -``` - -Form-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide "file"-related information manually: - -``` javascript -someModule.stream(function(err, stdout, stderr) { - if (err) throw err; - - var form = new FormData(); - - form.append('file', stdout, { - filename: 'unicycle.jpg', - contentType: 'image/jpg', - knownLength: 19806 - }); - - form.submit('http://example.com/', function(err, res) { - if (err) throw err; - console.log('Done'); - }); -}); -``` - -For edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter: - -``` javascript -form.submit({ - host: 'example.com', - path: '/probably.php?extra=params', - auth: 'username:password' -}, function(err, res) { - console.log(res.statusCode); -}); -``` - -## Notes - -- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround. -- If it feels like FormData hangs after submit and you're on ```node-0.10```, please check [Compatibility with Older Node Versions][streams2-thing] - -## TODO - -- Add new streams (0.10) support and try really hard not to break it for 0.8.x. - -## License - -Form-Data is licensed under the MIT license. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/lib/form_data.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/lib/form_data.js deleted file mode 100644 index d1064748..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/lib/form_data.js +++ /dev/null @@ -1,325 +0,0 @@ -var CombinedStream = require('combined-stream'); -var util = require('util'); -var path = require('path'); -var http = require('http'); -var https = require('https'); -var parseUrl = require('url').parse; -var fs = require('fs'); -var mime = require('mime'); -var async = require('async'); - -module.exports = FormData; -function FormData() { - this._overheadLength = 0; - this._valueLength = 0; - this._lengthRetrievers = []; - - CombinedStream.call(this); -} -util.inherits(FormData, CombinedStream); - -FormData.LINE_BREAK = '\r\n'; - -FormData.prototype.append = function(field, value, options) { - options = options || {}; - - var append = CombinedStream.prototype.append.bind(this); - - // all that streamy business can't handle numbers - if (typeof value == 'number') value = ''+value; - - // https://github.com/felixge/node-form-data/issues/38 - if (util.isArray(value)) { - // Please convert your array into string - // the way web server expects it - this._error(new Error('Arrays are not supported.')); - return; - } - - var header = this._multiPartHeader(field, value, options); - var footer = this._multiPartFooter(field, value, options); - - append(header); - append(value); - append(footer); - - // pass along options.knownLength - this._trackLength(header, value, options); -}; - -FormData.prototype._trackLength = function(header, value, options) { - var valueLength = 0; - - // used w/ getLengthSync(), when length is known. - // e.g. for streaming directly from a remote server, - // w/ a known file a size, and not wanting to wait for - // incoming file to finish to get its size. - if (options.knownLength != null) { - valueLength += +options.knownLength; - } else if (Buffer.isBuffer(value)) { - valueLength = value.length; - } else if (typeof value === 'string') { - valueLength = Buffer.byteLength(value); - } - - this._valueLength += valueLength; - - // @check why add CRLF? does this account for custom/multiple CRLFs? - this._overheadLength += - Buffer.byteLength(header) + - + FormData.LINE_BREAK.length; - - // empty or either doesn't have path or not an http response - if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) )) { - return; - } - - // no need to bother with the length - if (!options.knownLength) - this._lengthRetrievers.push(function(next) { - - if (value.hasOwnProperty('fd')) { - fs.stat(value.path, function(err, stat) { - if (err) { - next(err); - return; - } - - next(null, stat.size); - }); - - // or http response - } else if (value.hasOwnProperty('httpVersion')) { - next(null, +value.headers['content-length']); - - // or request stream http://github.com/mikeal/request - } else if (value.hasOwnProperty('httpModule')) { - // wait till response come back - value.on('response', function(response) { - value.pause(); - next(null, +response.headers['content-length']); - }); - value.resume(); - - // something else - } else { - next('Unknown stream'); - } - }); -}; - -FormData.prototype._multiPartHeader = function(field, value, options) { - var boundary = this.getBoundary(); - var header = ''; - - // custom header specified (as string)? - // it becomes responsible for boundary - // (e.g. to handle extra CRLFs on .NET servers) - if (options.header != null) { - header = options.header; - } else { - header += '--' + boundary + FormData.LINE_BREAK + - 'Content-Disposition: form-data; name="' + field + '"'; - - // fs- and request- streams have path property - // or use custom filename and/or contentType - // TODO: Use request's response mime-type - if (options.filename || value.path) { - header += - '; filename="' + path.basename(options.filename || value.path) + '"' + FormData.LINE_BREAK + - 'Content-Type: ' + (options.contentType || mime.lookup(options.filename || value.path)); - - // http response has not - } else if (value.readable && value.hasOwnProperty('httpVersion')) { - header += - '; filename="' + path.basename(value.client._httpMessage.path) + '"' + FormData.LINE_BREAK + - 'Content-Type: ' + value.headers['content-type']; - } - - header += FormData.LINE_BREAK + FormData.LINE_BREAK; - } - - return header; -}; - -FormData.prototype._multiPartFooter = function(field, value, options) { - return function(next) { - var footer = FormData.LINE_BREAK; - - var lastPart = (this._streams.length === 0); - if (lastPart) { - footer += this._lastBoundary(); - } - - next(footer); - }.bind(this); -}; - -FormData.prototype._lastBoundary = function() { - return '--' + this.getBoundary() + '--'; -}; - -FormData.prototype.getHeaders = function(userHeaders) { - var formHeaders = { - 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() - }; - - for (var header in userHeaders) { - formHeaders[header.toLowerCase()] = userHeaders[header]; - } - - return formHeaders; -} - -FormData.prototype.getCustomHeaders = function(contentType) { - contentType = contentType ? contentType : 'multipart/form-data'; - - var formHeaders = { - 'content-type': contentType + '; boundary=' + this.getBoundary(), - 'content-length': this.getLengthSync() - }; - - return formHeaders; -} - -FormData.prototype.getBoundary = function() { - if (!this._boundary) { - this._generateBoundary(); - } - - return this._boundary; -}; - -FormData.prototype._generateBoundary = function() { - // This generates a 50 character boundary similar to those used by Firefox. - // They are optimized for boyer-moore parsing. - var boundary = '--------------------------'; - for (var i = 0; i < 24; i++) { - boundary += Math.floor(Math.random() * 10).toString(16); - } - - this._boundary = boundary; -}; - -// Note: getLengthSync DOESN'T calculate streams length -// As workaround one can calculate file size manually -// and add it as knownLength option -FormData.prototype.getLengthSync = function(debug) { - var knownLength = this._overheadLength + this._valueLength; - - // Don't get confused, there are 3 "internal" streams for each keyval pair - // so it basically checks if there is any value added to the form - if (this._streams.length) { - knownLength += this._lastBoundary().length; - } - - // https://github.com/felixge/node-form-data/issues/40 - if (this._lengthRetrievers.length) { - // Some async length retrivers are present - // therefore synchronous length calculation is false. - // Please use getLength(callback) to get proper length - this._error(new Error('Cannot calculate proper length in synchronous way.')); - } - - return knownLength; -}; - -FormData.prototype.getLength = function(cb) { - var knownLength = this._overheadLength + this._valueLength; - - if (this._streams.length) { - knownLength += this._lastBoundary().length; - } - - if (!this._lengthRetrievers.length) { - process.nextTick(cb.bind(this, null, knownLength)); - return; - } - - async.parallel(this._lengthRetrievers, function(err, values) { - if (err) { - cb(err); - return; - } - - values.forEach(function(length) { - knownLength += length; - }); - - cb(null, knownLength); - }); -}; - -FormData.prototype.submit = function(params, cb) { - - var request - , options - , defaults = { - method : 'post', - headers: this.getHeaders() - }; - - // parse provided url if it's string - // or treat it as options object - if (typeof params == 'string') { - params = parseUrl(params); - - options = populate({ - port: params.port, - path: params.pathname, - host: params.hostname - }, defaults); - } - else // use custom params - { - options = populate(params, defaults); - // if no port provided use default one - if (!options.port) { - options.port = options.protocol == 'https:' ? 443 : 80; - } - } - - // https if specified, fallback to http in any other case - if (params.protocol == 'https:') { - request = https.request(options); - } else { - request = http.request(options); - } - - // get content length and fire away - this.getLength(function(err, length) { - - // TODO: Add chunked encoding when no length (if err) - - // add content length - request.setHeader('Content-Length', length); - - this.pipe(request); - if (cb) { - request.on('error', cb); - request.on('response', cb.bind(this, null)); - } - }.bind(this)); - - return request; -}; - -FormData.prototype._error = function(err) { - if (this.error) return; - - this.error = err; - this.pause(); - this.emit('error', err); -}; - -/* - * Santa's little helpers - */ - -// populates missing values -function populate(dst, src) { - for (var prop in src) { - if (!dst[prop]) dst[prop] = src[prop]; - } - return dst; -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/LICENSE deleted file mode 100644 index b7f9d500..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Caolan McMahon - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/README.md deleted file mode 100644 index 951f76e9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/README.md +++ /dev/null @@ -1,1425 +0,0 @@ -# Async.js - -Async is a utility module which provides straight-forward, powerful functions -for working with asynchronous JavaScript. Although originally designed for -use with [node.js](http://nodejs.org), it can also be used directly in the -browser. Also supports [component](https://github.com/component/component). - -Async provides around 20 functions that include the usual 'functional' -suspects (map, reduce, filter, each…) as well as some common patterns -for asynchronous control flow (parallel, series, waterfall…). All these -functions assume you follow the node.js convention of providing a single -callback as the last argument of your async function. - - -## Quick Examples - -```javascript -async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file -}); - -async.filter(['file1','file2','file3'], fs.exists, function(results){ - // results now equals an array of the existing files -}); - -async.parallel([ - function(){ ... }, - function(){ ... } -], callback); - -async.series([ - function(){ ... }, - function(){ ... } -]); -``` - -There are many more functions available so take a look at the docs below for a -full list. This module aims to be comprehensive, so if you feel anything is -missing please create a GitHub issue for it. - -## Common Pitfalls - -### Binding a context to an iterator - -This section is really about bind, not about async. If you are wondering how to -make async execute your iterators in a given context, or are confused as to why -a method of another library isn't working as an iterator, study this example: - -```js -// Here is a simple object with an (unnecessarily roundabout) squaring method -var AsyncSquaringLibrary = { - squareExponent: 2, - square: function(number, callback){ - var result = Math.pow(number, this.squareExponent); - setTimeout(function(){ - callback(null, result); - }, 200); - } -}; - -async.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){ - // result is [NaN, NaN, NaN] - // This fails because the `this.squareExponent` expression in the square - // function is not evaluated in the context of AsyncSquaringLibrary, and is - // therefore undefined. -}); - -async.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){ - // result is [1, 4, 9] - // With the help of bind we can attach a context to the iterator before - // passing it to async. Now the square function will be executed in its - // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent` - // will be as expected. -}); -``` - -## Download - -The source is available for download from -[GitHub](http://github.com/caolan/async). -Alternatively, you can install using Node Package Manager (npm): - - npm install async - -__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed - -## In the Browser - -So far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage: - -```html -<script type="text/javascript" src="async.js"></script> -<script type="text/javascript"> - - async.map(data, asyncProcess, function(err, results){ - alert(results); - }); - -</script> -``` - -## Documentation - -### Collections - -* [each](#each) -* [eachSeries](#eachSeries) -* [eachLimit](#eachLimit) -* [map](#map) -* [mapSeries](#mapSeries) -* [mapLimit](#mapLimit) -* [filter](#filter) -* [filterSeries](#filterSeries) -* [reject](#reject) -* [rejectSeries](#rejectSeries) -* [reduce](#reduce) -* [reduceRight](#reduceRight) -* [detect](#detect) -* [detectSeries](#detectSeries) -* [sortBy](#sortBy) -* [some](#some) -* [every](#every) -* [concat](#concat) -* [concatSeries](#concatSeries) - -### Control Flow - -* [series](#series) -* [parallel](#parallel) -* [parallelLimit](#parallellimittasks-limit-callback) -* [whilst](#whilst) -* [doWhilst](#doWhilst) -* [until](#until) -* [doUntil](#doUntil) -* [forever](#forever) -* [waterfall](#waterfall) -* [compose](#compose) -* [applyEach](#applyEach) -* [applyEachSeries](#applyEachSeries) -* [queue](#queue) -* [cargo](#cargo) -* [auto](#auto) -* [iterator](#iterator) -* [apply](#apply) -* [nextTick](#nextTick) -* [times](#times) -* [timesSeries](#timesSeries) - -### Utils - -* [memoize](#memoize) -* [unmemoize](#unmemoize) -* [log](#log) -* [dir](#dir) -* [noConflict](#noConflict) - - -## Collections - -<a name="forEach" /> -<a name="each" /> -### each(arr, iterator, callback) - -Applies an iterator function to each item in an array, in parallel. -The iterator is called with an item from the list and a callback for when it -has finished. If the iterator passes an error to this callback, the main -callback for the each function is immediately called with the error. - -Note, that since this function applies the iterator to each item in parallel -there is no guarantee that the iterator functions will complete in order. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback(err) which must be called once it has - completed. If no error has occured, the callback should be run without - arguments or with an explicit null argument. -* callback(err) - A callback which is called after all the iterator functions - have finished, or an error has occurred. - -__Example__ - -```js -// assuming openFiles is an array of file names and saveFile is a function -// to save the modified contents of that file: - -async.each(openFiles, saveFile, function(err){ - // if any of the saves produced an error, err would equal that error -}); -``` - ---------------------------------------- - -<a name="forEachSeries" /> -<a name="eachSeries" /> -### eachSeries(arr, iterator, callback) - -The same as each only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. This means the iterator functions will complete in order. - - ---------------------------------------- - -<a name="forEachLimit" /> -<a name="eachLimit" /> -### eachLimit(arr, limit, iterator, callback) - -The same as each only no more than "limit" iterators will be simultaneously -running at any time. - -Note that the items are not processed in batches, so there is no guarantee that - the first "limit" iterator functions will complete before any others are -started. - -__Arguments__ - -* arr - An array to iterate over. -* limit - The maximum number of iterators to run at any time. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback(err) which must be called once it has - completed. If no error has occured, the callback should be run without - arguments or with an explicit null argument. -* callback(err) - A callback which is called after all the iterator functions - have finished, or an error has occurred. - -__Example__ - -```js -// Assume documents is an array of JSON objects and requestApi is a -// function that interacts with a rate-limited REST api. - -async.eachLimit(documents, 20, requestApi, function(err){ - // if any of the saves produced an error, err would equal that error -}); -``` - ---------------------------------------- - -<a name="map" /> -### map(arr, iterator, callback) - -Produces a new array of values by mapping each value in the given array through -the iterator function. The iterator is called with an item from the array and a -callback for when it has finished processing. The callback takes 2 arguments, -an error and the transformed item from the array. If the iterator passes an -error to this callback, the main callback for the map function is immediately -called with the error. - -Note, that since this function applies the iterator to each item in parallel -there is no guarantee that the iterator functions will complete in order, however -the results array will be in the same order as the original array. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback(err, transformed) which must be called once - it has completed with an error (which can be null) and a transformed item. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is an array of the - transformed items from the original array. - -__Example__ - -```js -async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file -}); -``` - ---------------------------------------- - -<a name="mapSeries" /> -### mapSeries(arr, iterator, callback) - -The same as map only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. The results array will be in the same order as the original. - - ---------------------------------------- - -<a name="mapLimit" /> -### mapLimit(arr, limit, iterator, callback) - -The same as map only no more than "limit" iterators will be simultaneously -running at any time. - -Note that the items are not processed in batches, so there is no guarantee that - the first "limit" iterator functions will complete before any others are -started. - -__Arguments__ - -* arr - An array to iterate over. -* limit - The maximum number of iterators to run at any time. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback(err, transformed) which must be called once - it has completed with an error (which can be null) and a transformed item. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is an array of the - transformed items from the original array. - -__Example__ - -```js -async.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){ - // results is now an array of stats for each file -}); -``` - ---------------------------------------- - -<a name="filter" /> -### filter(arr, iterator, callback) - -__Alias:__ select - -Returns a new array of all the values which pass an async truth test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like fs.exists. This operation is -performed in parallel, but the results array will be in the same order as the -original. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback(truthValue) which must be called with a - boolean argument once it has completed. -* callback(results) - A callback which is called after all the iterator - functions have finished. - -__Example__ - -```js -async.filter(['file1','file2','file3'], fs.exists, function(results){ - // results now equals an array of the existing files -}); -``` - ---------------------------------------- - -<a name="filterSeries" /> -### filterSeries(arr, iterator, callback) - -__alias:__ selectSeries - -The same as filter only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. The results array will be in the same order as the original. - ---------------------------------------- - -<a name="reject" /> -### reject(arr, iterator, callback) - -The opposite of filter. Removes values that pass an async truth test. - ---------------------------------------- - -<a name="rejectSeries" /> -### rejectSeries(arr, iterator, callback) - -The same as reject, only the iterator is applied to each item in the array -in series. - - ---------------------------------------- - -<a name="reduce" /> -### reduce(arr, memo, iterator, callback) - -__aliases:__ inject, foldl - -Reduces a list of values into a single value using an async iterator to return -each successive step. Memo is the initial state of the reduction. This -function only operates in series. For performance reasons, it may make sense to -split a call to this function into a parallel map, then use the normal -Array.prototype.reduce on the results. This function is for situations where -each step in the reduction needs to be async, if you can get the data before -reducing it then it's probably a good idea to do so. - -__Arguments__ - -* arr - An array to iterate over. -* memo - The initial state of the reduction. -* iterator(memo, item, callback) - A function applied to each item in the - array to produce the next step in the reduction. The iterator is passed a - callback(err, reduction) which accepts an optional error as its first - argument, and the state of the reduction as the second. If an error is - passed to the callback, the reduction is stopped and the main callback is - immediately called with the error. -* callback(err, result) - A callback which is called after all the iterator - functions have finished. Result is the reduced value. - -__Example__ - -```js -async.reduce([1,2,3], 0, function(memo, item, callback){ - // pointless async: - process.nextTick(function(){ - callback(null, memo + item) - }); -}, function(err, result){ - // result is now equal to the last value of memo, which is 6 -}); -``` - ---------------------------------------- - -<a name="reduceRight" /> -### reduceRight(arr, memo, iterator, callback) - -__Alias:__ foldr - -Same as reduce, only operates on the items in the array in reverse order. - - ---------------------------------------- - -<a name="detect" /> -### detect(arr, iterator, callback) - -Returns the first value in a list that passes an async truth test. The -iterator is applied in parallel, meaning the first iterator to return true will -fire the detect callback with that result. That means the result might not be -the first item in the original array (in terms of order) that passes the test. - -If order within the original array is important then look at detectSeries. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback(truthValue) which must be called with a - boolean argument once it has completed. -* callback(result) - A callback which is called as soon as any iterator returns - true, or after all the iterator functions have finished. Result will be - the first item in the array that passes the truth test (iterator) or the - value undefined if none passed. - -__Example__ - -```js -async.detect(['file1','file2','file3'], fs.exists, function(result){ - // result now equals the first file in the list that exists -}); -``` - ---------------------------------------- - -<a name="detectSeries" /> -### detectSeries(arr, iterator, callback) - -The same as detect, only the iterator is applied to each item in the array -in series. This means the result is always the first in the original array (in -terms of array order) that passes the truth test. - - ---------------------------------------- - -<a name="sortBy" /> -### sortBy(arr, iterator, callback) - -Sorts a list by the results of running each value through an async iterator. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback(err, sortValue) which must be called once it - has completed with an error (which can be null) and a value to use as the sort - criteria. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is the items from - the original array sorted by the values returned by the iterator calls. - -__Example__ - -```js -async.sortBy(['file1','file2','file3'], function(file, callback){ - fs.stat(file, function(err, stats){ - callback(err, stats.mtime); - }); -}, function(err, results){ - // results is now the original array of files sorted by - // modified date -}); -``` - ---------------------------------------- - -<a name="some" /> -### some(arr, iterator, callback) - -__Alias:__ any - -Returns true if at least one element in the array satisfies an async test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like fs.exists. Once any iterator -call returns true, the main callback is immediately called. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback(truthValue) which must be called with a - boolean argument once it has completed. -* callback(result) - A callback which is called as soon as any iterator returns - true, or after all the iterator functions have finished. Result will be - either true or false depending on the values of the async tests. - -__Example__ - -```js -async.some(['file1','file2','file3'], fs.exists, function(result){ - // if result is true then at least one of the files exists -}); -``` - ---------------------------------------- - -<a name="every" /> -### every(arr, iterator, callback) - -__Alias:__ all - -Returns true if every element in the array satisfies an async test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like fs.exists. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback(truthValue) which must be called with a - boolean argument once it has completed. -* callback(result) - A callback which is called after all the iterator - functions have finished. Result will be either true or false depending on - the values of the async tests. - -__Example__ - -```js -async.every(['file1','file2','file3'], fs.exists, function(result){ - // if result is true then every file exists -}); -``` - ---------------------------------------- - -<a name="concat" /> -### concat(arr, iterator, callback) - -Applies an iterator to each item in a list, concatenating the results. Returns the -concatenated list. The iterators are called in parallel, and the results are -concatenated as they return. There is no guarantee that the results array will -be returned in the original order of the arguments passed to the iterator function. - -__Arguments__ - -* arr - An array to iterate over -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback(err, results) which must be called once it - has completed with an error (which can be null) and an array of results. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is an array containing - the concatenated results of the iterator function. - -__Example__ - -```js -async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ - // files is now a list of filenames that exist in the 3 directories -}); -``` - ---------------------------------------- - -<a name="concatSeries" /> -### concatSeries(arr, iterator, callback) - -Same as async.concat, but executes in series instead of parallel. - - -## Control Flow - -<a name="series" /> -### series(tasks, [callback]) - -Run an array of functions in series, each one running once the previous -function has completed. If any functions in the series pass an error to its -callback, no more functions are run and the callback for the series is -immediately called with the value of the error. Once the tasks have completed, -the results are passed to the final callback as an array. - -It is also possible to use an object instead of an array. Each property will be -run as a function and the results will be passed to the final callback as an object -instead of an array. This can be a more readable way of handling results from -async.series. - - -__Arguments__ - -* tasks - An array or object containing functions to run, each function is passed - a callback(err, result) it must call on completion with an error (which can - be null) and an optional result value. -* callback(err, results) - An optional callback to run once all the functions - have completed. This function gets a results array (or object) containing all - the result arguments passed to the task callbacks. - -__Example__ - -```js -async.series([ - function(callback){ - // do some stuff ... - callback(null, 'one'); - }, - function(callback){ - // do some more stuff ... - callback(null, 'two'); - } -], -// optional callback -function(err, results){ - // results is now equal to ['one', 'two'] -}); - - -// an example using an object instead of an array -async.series({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - } -}, -function(err, results) { - // results is now equal to: {one: 1, two: 2} -}); -``` - ---------------------------------------- - -<a name="parallel" /> -### parallel(tasks, [callback]) - -Run an array of functions in parallel, without waiting until the previous -function has completed. If any of the functions pass an error to its -callback, the main callback is immediately called with the value of the error. -Once the tasks have completed, the results are passed to the final callback as an -array. - -It is also possible to use an object instead of an array. Each property will be -run as a function and the results will be passed to the final callback as an object -instead of an array. This can be a more readable way of handling results from -async.parallel. - - -__Arguments__ - -* tasks - An array or object containing functions to run, each function is passed - a callback(err, result) it must call on completion with an error (which can - be null) and an optional result value. -* callback(err, results) - An optional callback to run once all the functions - have completed. This function gets a results array (or object) containing all - the result arguments passed to the task callbacks. - -__Example__ - -```js -async.parallel([ - function(callback){ - setTimeout(function(){ - callback(null, 'one'); - }, 200); - }, - function(callback){ - setTimeout(function(){ - callback(null, 'two'); - }, 100); - } -], -// optional callback -function(err, results){ - // the results array will equal ['one','two'] even though - // the second function had a shorter timeout. -}); - - -// an example using an object instead of an array -async.parallel({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - } -}, -function(err, results) { - // results is now equals to: {one: 1, two: 2} -}); -``` - ---------------------------------------- - -<a name="parallel" /> -### parallelLimit(tasks, limit, [callback]) - -The same as parallel only the tasks are executed in parallel with a maximum of "limit" -tasks executing at any time. - -Note that the tasks are not executed in batches, so there is no guarantee that -the first "limit" tasks will complete before any others are started. - -__Arguments__ - -* tasks - An array or object containing functions to run, each function is passed - a callback(err, result) it must call on completion with an error (which can - be null) and an optional result value. -* limit - The maximum number of tasks to run at any time. -* callback(err, results) - An optional callback to run once all the functions - have completed. This function gets a results array (or object) containing all - the result arguments passed to the task callbacks. - ---------------------------------------- - -<a name="whilst" /> -### whilst(test, fn, callback) - -Repeatedly call fn, while test returns true. Calls the callback when stopped, -or an error occurs. - -__Arguments__ - -* test() - synchronous truth test to perform before each execution of fn. -* fn(callback) - A function to call each time the test passes. The function is - passed a callback(err) which must be called once it has completed with an - optional error argument. -* callback(err) - A callback which is called after the test fails and repeated - execution of fn has stopped. - -__Example__ - -```js -var count = 0; - -async.whilst( - function () { return count < 5; }, - function (callback) { - count++; - setTimeout(callback, 1000); - }, - function (err) { - // 5 seconds have passed - } -); -``` - ---------------------------------------- - -<a name="doWhilst" /> -### doWhilst(fn, test, callback) - -The post check version of whilst. To reflect the difference in the order of operations `test` and `fn` arguments are switched. `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. - ---------------------------------------- - -<a name="until" /> -### until(test, fn, callback) - -Repeatedly call fn, until test returns true. Calls the callback when stopped, -or an error occurs. - -The inverse of async.whilst. - ---------------------------------------- - -<a name="doUntil" /> -### doUntil(fn, test, callback) - -Like doWhilst except the test is inverted. Note the argument ordering differs from `until`. - ---------------------------------------- - -<a name="forever" /> -### forever(fn, callback) - -Calls the asynchronous function 'fn' repeatedly, in series, indefinitely. -If an error is passed to fn's callback then 'callback' is called with the -error, otherwise it will never be called. - ---------------------------------------- - -<a name="waterfall" /> -### waterfall(tasks, [callback]) - -Runs an array of functions in series, each passing their results to the next in -the array. However, if any of the functions pass an error to the callback, the -next function is not executed and the main callback is immediately called with -the error. - -__Arguments__ - -* tasks - An array of functions to run, each function is passed a - callback(err, result1, result2, ...) it must call on completion. The first - argument is an error (which can be null) and any further arguments will be - passed as arguments in order to the next task. -* callback(err, [results]) - An optional callback to run once all the functions - have completed. This will be passed the results of the last task's callback. - - - -__Example__ - -```js -async.waterfall([ - function(callback){ - callback(null, 'one', 'two'); - }, - function(arg1, arg2, callback){ - callback(null, 'three'); - }, - function(arg1, callback){ - // arg1 now equals 'three' - callback(null, 'done'); - } -], function (err, result) { - // result now equals 'done' -}); -``` - ---------------------------------------- -<a name="compose" /> -### compose(fn1, fn2...) - -Creates a function which is a composition of the passed asynchronous -functions. Each function consumes the return value of the function that -follows. Composing functions f(), g() and h() would produce the result of -f(g(h())), only this version uses callbacks to obtain the return values. - -Each function is executed with the `this` binding of the composed function. - -__Arguments__ - -* functions... - the asynchronous functions to compose - - -__Example__ - -```js -function add1(n, callback) { - setTimeout(function () { - callback(null, n + 1); - }, 10); -} - -function mul3(n, callback) { - setTimeout(function () { - callback(null, n * 3); - }, 10); -} - -var add1mul3 = async.compose(mul3, add1); - -add1mul3(4, function (err, result) { - // result now equals 15 -}); -``` - ---------------------------------------- -<a name="applyEach" /> -### applyEach(fns, args..., callback) - -Applies the provided arguments to each function in the array, calling the -callback after all functions have completed. If you only provide the first -argument then it will return a function which lets you pass in the -arguments as if it were a single function call. - -__Arguments__ - -* fns - the asynchronous functions to all call with the same arguments -* args... - any number of separate arguments to pass to the function -* callback - the final argument should be the callback, called when all - functions have completed processing - - -__Example__ - -```js -async.applyEach([enableSearch, updateSchema], 'bucket', callback); - -// partial application example: -async.each( - buckets, - async.applyEach([enableSearch, updateSchema]), - callback -); -``` - ---------------------------------------- - -<a name="applyEachSeries" /> -### applyEachSeries(arr, iterator, callback) - -The same as applyEach only the functions are applied in series. - ---------------------------------------- - -<a name="queue" /> -### queue(worker, concurrency) - -Creates a queue object with the specified concurrency. Tasks added to the -queue will be processed in parallel (up to the concurrency limit). If all -workers are in progress, the task is queued until one is available. Once -a worker has completed a task, the task's callback is called. - -__Arguments__ - -* worker(task, callback) - An asynchronous function for processing a queued - task, which must call its callback(err) argument when finished, with an - optional error as an argument. -* concurrency - An integer for determining how many worker functions should be - run in parallel. - -__Queue objects__ - -The queue object returned by this function has the following properties and -methods: - -* length() - a function returning the number of items waiting to be processed. -* concurrency - an integer for determining how many worker functions should be - run in parallel. This property can be changed after a queue is created to - alter the concurrency on-the-fly. -* push(task, [callback]) - add a new task to the queue, the callback is called - once the worker has finished processing the task. - instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list. -* unshift(task, [callback]) - add a new task to the front of the queue. -* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued -* empty - a callback that is called when the last item from the queue is given to a worker -* drain - a callback that is called when the last item from the queue has returned from the worker - -__Example__ - -```js -// create a queue object with concurrency 2 - -var q = async.queue(function (task, callback) { - console.log('hello ' + task.name); - callback(); -}, 2); - - -// assign a callback -q.drain = function() { - console.log('all items have been processed'); -} - -// add some items to the queue - -q.push({name: 'foo'}, function (err) { - console.log('finished processing foo'); -}); -q.push({name: 'bar'}, function (err) { - console.log('finished processing bar'); -}); - -// add some items to the queue (batch-wise) - -q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) { - console.log('finished processing bar'); -}); - -// add some items to the front of the queue - -q.unshift({name: 'bar'}, function (err) { - console.log('finished processing bar'); -}); -``` - ---------------------------------------- - -<a name="cargo" /> -### cargo(worker, [payload]) - -Creates a cargo object with the specified payload. Tasks added to the -cargo will be processed altogether (up to the payload limit). If the -worker is in progress, the task is queued until it is available. Once -the worker has completed some tasks, each callback of those tasks is called. - -__Arguments__ - -* worker(tasks, callback) - An asynchronous function for processing an array of - queued tasks, which must call its callback(err) argument when finished, with - an optional error as an argument. -* payload - An optional integer for determining how many tasks should be - processed per round; if omitted, the default is unlimited. - -__Cargo objects__ - -The cargo object returned by this function has the following properties and -methods: - -* length() - a function returning the number of items waiting to be processed. -* payload - an integer for determining how many tasks should be - process per round. This property can be changed after a cargo is created to - alter the payload on-the-fly. -* push(task, [callback]) - add a new task to the queue, the callback is called - once the worker has finished processing the task. - instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list. -* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued -* empty - a callback that is called when the last item from the queue is given to a worker -* drain - a callback that is called when the last item from the queue has returned from the worker - -__Example__ - -```js -// create a cargo object with payload 2 - -var cargo = async.cargo(function (tasks, callback) { - for(var i=0; i<tasks.length; i++){ - console.log('hello ' + tasks[i].name); - } - callback(); -}, 2); - - -// add some items - -cargo.push({name: 'foo'}, function (err) { - console.log('finished processing foo'); -}); -cargo.push({name: 'bar'}, function (err) { - console.log('finished processing bar'); -}); -cargo.push({name: 'baz'}, function (err) { - console.log('finished processing baz'); -}); -``` - ---------------------------------------- - -<a name="auto" /> -### auto(tasks, [callback]) - -Determines the best order for running functions based on their requirements. -Each function can optionally depend on other functions being completed first, -and each function is run as soon as its requirements are satisfied. If any of -the functions pass an error to their callback, that function will not complete -(so any other functions depending on it will not run) and the main callback -will be called immediately with the error. Functions also receive an object -containing the results of functions which have completed so far. - -Note, all functions are called with a results object as a second argument, -so it is unsafe to pass functions in the tasks object which cannot handle the -extra argument. For example, this snippet of code: - -```js -async.auto({ - readData: async.apply(fs.readFile, 'data.txt', 'utf-8') -}, callback); -``` - -will have the effect of calling readFile with the results object as the last -argument, which will fail: - -```js -fs.readFile('data.txt', 'utf-8', cb, {}); -``` - -Instead, wrap the call to readFile in a function which does not forward the -results object: - -```js -async.auto({ - readData: function(cb, results){ - fs.readFile('data.txt', 'utf-8', cb); - } -}, callback); -``` - -__Arguments__ - -* tasks - An object literal containing named functions or an array of - requirements, with the function itself the last item in the array. The key - used for each function or array is used when specifying requirements. The - function receives two arguments: (1) a callback(err, result) which must be - called when finished, passing an error (which can be null) and the result of - the function's execution, and (2) a results object, containing the results of - the previously executed functions. -* callback(err, results) - An optional callback which is called when all the - tasks have been completed. The callback will receive an error as an argument - if any tasks pass an error to their callback. Results will always be passed - but if an error occurred, no other tasks will be performed, and the results - object will only contain partial results. - - -__Example__ - -```js -async.auto({ - get_data: function(callback){ - // async code to get some data - }, - make_folder: function(callback){ - // async code to create a directory to store a file in - // this is run at the same time as getting the data - }, - write_file: ['get_data', 'make_folder', function(callback){ - // once there is some data and the directory exists, - // write the data to a file in the directory - callback(null, filename); - }], - email_link: ['write_file', function(callback, results){ - // once the file is written let's email a link to it... - // results.write_file contains the filename returned by write_file. - }] -}); -``` - -This is a fairly trivial example, but to do this using the basic parallel and -series functions would look like this: - -```js -async.parallel([ - function(callback){ - // async code to get some data - }, - function(callback){ - // async code to create a directory to store a file in - // this is run at the same time as getting the data - } -], -function(err, results){ - async.series([ - function(callback){ - // once there is some data and the directory exists, - // write the data to a file in the directory - }, - function(callback){ - // once the file is written let's email a link to it... - } - ]); -}); -``` - -For a complicated series of async tasks using the auto function makes adding -new tasks much easier and makes the code more readable. - - ---------------------------------------- - -<a name="iterator" /> -### iterator(tasks) - -Creates an iterator function which calls the next function in the array, -returning a continuation to call the next one after that. It's also possible to -'peek' the next iterator by doing iterator.next(). - -This function is used internally by the async module but can be useful when -you want to manually control the flow of functions in series. - -__Arguments__ - -* tasks - An array of functions to run. - -__Example__ - -```js -var iterator = async.iterator([ - function(){ sys.p('one'); }, - function(){ sys.p('two'); }, - function(){ sys.p('three'); } -]); - -node> var iterator2 = iterator(); -'one' -node> var iterator3 = iterator2(); -'two' -node> iterator3(); -'three' -node> var nextfn = iterator2.next(); -node> nextfn(); -'three' -``` - ---------------------------------------- - -<a name="apply" /> -### apply(function, arguments..) - -Creates a continuation function with some arguments already applied, a useful -shorthand when combined with other control flow functions. Any arguments -passed to the returned function are added to the arguments originally passed -to apply. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to automatically apply when the - continuation is called. - -__Example__ - -```js -// using apply - -async.parallel([ - async.apply(fs.writeFile, 'testfile1', 'test1'), - async.apply(fs.writeFile, 'testfile2', 'test2'), -]); - - -// the same process without using apply - -async.parallel([ - function(callback){ - fs.writeFile('testfile1', 'test1', callback); - }, - function(callback){ - fs.writeFile('testfile2', 'test2', callback); - } -]); -``` - -It's possible to pass any number of additional arguments when calling the -continuation: - -```js -node> var fn = async.apply(sys.puts, 'one'); -node> fn('two', 'three'); -one -two -three -``` - ---------------------------------------- - -<a name="nextTick" /> -### nextTick(callback) - -Calls the callback on a later loop around the event loop. In node.js this just -calls process.nextTick, in the browser it falls back to setImmediate(callback) -if available, otherwise setTimeout(callback, 0), which means other higher priority -events may precede the execution of the callback. - -This is used internally for browser-compatibility purposes. - -__Arguments__ - -* callback - The function to call on a later loop around the event loop. - -__Example__ - -```js -var call_order = []; -async.nextTick(function(){ - call_order.push('two'); - // call_order now equals ['one','two'] -}); -call_order.push('one') -``` - -<a name="times" /> -### times(n, callback) - -Calls the callback n times and accumulates results in the same manner -you would use with async.map. - -__Arguments__ - -* n - The number of times to run the function. -* callback - The function to call n times. - -__Example__ - -```js -// Pretend this is some complicated async factory -var createUser = function(id, callback) { - callback(null, { - id: 'user' + id - }) -} -// generate 5 users -async.times(5, function(n, next){ - createUser(n, function(err, user) { - next(err, user) - }) -}, function(err, users) { - // we should now have 5 users -}); -``` - -<a name="timesSeries" /> -### timesSeries(n, callback) - -The same as times only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. The results array will be in the same order as the original. - - -## Utils - -<a name="memoize" /> -### memoize(fn, [hasher]) - -Caches the results of an async function. When creating a hash to store function -results against, the callback is omitted from the hash and an optional hash -function can be used. - -The cache of results is exposed as the `memo` property of the function returned -by `memoize`. - -__Arguments__ - -* fn - the function you to proxy and cache results from. -* hasher - an optional function for generating a custom hash for storing - results, it has all the arguments applied to it apart from the callback, and - must be synchronous. - -__Example__ - -```js -var slow_fn = function (name, callback) { - // do something - callback(null, result); -}; -var fn = async.memoize(slow_fn); - -// fn can now be used as if it were slow_fn -fn('some name', function () { - // callback -}); -``` - -<a name="unmemoize" /> -### unmemoize(fn) - -Undoes a memoized function, reverting it to the original, unmemoized -form. Comes handy in tests. - -__Arguments__ - -* fn - the memoized function - -<a name="log" /> -### log(function, arguments) - -Logs the result of an async function to the console. Only works in node.js or -in browsers that support console.log and console.error (such as FF and Chrome). -If multiple arguments are returned from the async function, console.log is -called on each argument in order. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to apply to the function. - -__Example__ - -```js -var hello = function(name, callback){ - setTimeout(function(){ - callback(null, 'hello ' + name); - }, 1000); -}; -``` -```js -node> async.log(hello, 'world'); -'hello world' -``` - ---------------------------------------- - -<a name="dir" /> -### dir(function, arguments) - -Logs the result of an async function to the console using console.dir to -display the properties of the resulting object. Only works in node.js or -in browsers that support console.dir and console.error (such as FF and Chrome). -If multiple arguments are returned from the async function, console.dir is -called on each argument in order. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to apply to the function. - -__Example__ - -```js -var hello = function(name, callback){ - setTimeout(function(){ - callback(null, {hello: name}); - }, 1000); -}; -``` -```js -node> async.dir(hello, 'world'); -{hello: 'world'} -``` - ---------------------------------------- - -<a name="noConflict" /> -### noConflict() - -Changes the value of async back to its original value, returning a reference to the -async object. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/component.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/component.json deleted file mode 100644 index bbb01154..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/component.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "async", - "repo": "caolan/async", - "description": "Higher-order functions and common patterns for asynchronous code", - "version": "0.1.23", - "keywords": [], - "dependencies": {}, - "development": {}, - "main": "lib/async.js", - "scripts": [ "lib/async.js" ] -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js deleted file mode 100755 index 1eebb153..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js +++ /dev/null @@ -1,958 +0,0 @@ -/*global setImmediate: false, setTimeout: false, console: false */ -(function () { - - var async = {}; - - // global on the server, window in the browser - var root, previous_async; - - root = this; - if (root != null) { - previous_async = root.async; - } - - async.noConflict = function () { - root.async = previous_async; - return async; - }; - - function only_once(fn) { - var called = false; - return function() { - if (called) throw new Error("Callback was already called."); - called = true; - fn.apply(root, arguments); - } - } - - //// cross-browser compatiblity functions //// - - var _each = function (arr, iterator) { - if (arr.forEach) { - return arr.forEach(iterator); - } - for (var i = 0; i < arr.length; i += 1) { - iterator(arr[i], i, arr); - } - }; - - var _map = function (arr, iterator) { - if (arr.map) { - return arr.map(iterator); - } - var results = []; - _each(arr, function (x, i, a) { - results.push(iterator(x, i, a)); - }); - return results; - }; - - var _reduce = function (arr, iterator, memo) { - if (arr.reduce) { - return arr.reduce(iterator, memo); - } - _each(arr, function (x, i, a) { - memo = iterator(memo, x, i, a); - }); - return memo; - }; - - var _keys = function (obj) { - if (Object.keys) { - return Object.keys(obj); - } - var keys = []; - for (var k in obj) { - if (obj.hasOwnProperty(k)) { - keys.push(k); - } - } - return keys; - }; - - //// exported async module functions //// - - //// nextTick implementation with browser-compatible fallback //// - if (typeof process === 'undefined' || !(process.nextTick)) { - if (typeof setImmediate === 'function') { - async.nextTick = function (fn) { - // not a direct alias for IE10 compatibility - setImmediate(fn); - }; - async.setImmediate = async.nextTick; - } - else { - async.nextTick = function (fn) { - setTimeout(fn, 0); - }; - async.setImmediate = async.nextTick; - } - } - else { - async.nextTick = process.nextTick; - if (typeof setImmediate !== 'undefined') { - async.setImmediate = function (fn) { - // not a direct alias for IE10 compatibility - setImmediate(fn); - }; - } - else { - async.setImmediate = async.nextTick; - } - } - - async.each = function (arr, iterator, callback) { - callback = callback || function () {}; - if (!arr.length) { - return callback(); - } - var completed = 0; - _each(arr, function (x) { - iterator(x, only_once(function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - if (completed >= arr.length) { - callback(null); - } - } - })); - }); - }; - async.forEach = async.each; - - async.eachSeries = function (arr, iterator, callback) { - callback = callback || function () {}; - if (!arr.length) { - return callback(); - } - var completed = 0; - var iterate = function () { - iterator(arr[completed], function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - if (completed >= arr.length) { - callback(null); - } - else { - iterate(); - } - } - }); - }; - iterate(); - }; - async.forEachSeries = async.eachSeries; - - async.eachLimit = function (arr, limit, iterator, callback) { - var fn = _eachLimit(limit); - fn.apply(null, [arr, iterator, callback]); - }; - async.forEachLimit = async.eachLimit; - - var _eachLimit = function (limit) { - - return function (arr, iterator, callback) { - callback = callback || function () {}; - if (!arr.length || limit <= 0) { - return callback(); - } - var completed = 0; - var started = 0; - var running = 0; - - (function replenish () { - if (completed >= arr.length) { - return callback(); - } - - while (running < limit && started < arr.length) { - started += 1; - running += 1; - iterator(arr[started - 1], function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - running -= 1; - if (completed >= arr.length) { - callback(); - } - else { - replenish(); - } - } - }); - } - })(); - }; - }; - - - var doParallel = function (fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [async.each].concat(args)); - }; - }; - var doParallelLimit = function(limit, fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [_eachLimit(limit)].concat(args)); - }; - }; - var doSeries = function (fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [async.eachSeries].concat(args)); - }; - }; - - - var _asyncMap = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (err, v) { - results[x.index] = v; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - }; - async.map = doParallel(_asyncMap); - async.mapSeries = doSeries(_asyncMap); - async.mapLimit = function (arr, limit, iterator, callback) { - return _mapLimit(limit)(arr, iterator, callback); - }; - - var _mapLimit = function(limit) { - return doParallelLimit(limit, _asyncMap); - }; - - // reduce only has a series version, as doing reduce in parallel won't - // work in many situations. - async.reduce = function (arr, memo, iterator, callback) { - async.eachSeries(arr, function (x, callback) { - iterator(memo, x, function (err, v) { - memo = v; - callback(err); - }); - }, function (err) { - callback(err, memo); - }); - }; - // inject alias - async.inject = async.reduce; - // foldl alias - async.foldl = async.reduce; - - async.reduceRight = function (arr, memo, iterator, callback) { - var reversed = _map(arr, function (x) { - return x; - }).reverse(); - async.reduce(reversed, memo, iterator, callback); - }; - // foldr alias - async.foldr = async.reduceRight; - - var _filter = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (v) { - if (v) { - results.push(x); - } - callback(); - }); - }, function (err) { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - }; - async.filter = doParallel(_filter); - async.filterSeries = doSeries(_filter); - // select alias - async.select = async.filter; - async.selectSeries = async.filterSeries; - - var _reject = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (v) { - if (!v) { - results.push(x); - } - callback(); - }); - }, function (err) { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - }; - async.reject = doParallel(_reject); - async.rejectSeries = doSeries(_reject); - - var _detect = function (eachfn, arr, iterator, main_callback) { - eachfn(arr, function (x, callback) { - iterator(x, function (result) { - if (result) { - main_callback(x); - main_callback = function () {}; - } - else { - callback(); - } - }); - }, function (err) { - main_callback(); - }); - }; - async.detect = doParallel(_detect); - async.detectSeries = doSeries(_detect); - - async.some = function (arr, iterator, main_callback) { - async.each(arr, function (x, callback) { - iterator(x, function (v) { - if (v) { - main_callback(true); - main_callback = function () {}; - } - callback(); - }); - }, function (err) { - main_callback(false); - }); - }; - // any alias - async.any = async.some; - - async.every = function (arr, iterator, main_callback) { - async.each(arr, function (x, callback) { - iterator(x, function (v) { - if (!v) { - main_callback(false); - main_callback = function () {}; - } - callback(); - }); - }, function (err) { - main_callback(true); - }); - }; - // all alias - async.all = async.every; - - async.sortBy = function (arr, iterator, callback) { - async.map(arr, function (x, callback) { - iterator(x, function (err, criteria) { - if (err) { - callback(err); - } - else { - callback(null, {value: x, criteria: criteria}); - } - }); - }, function (err, results) { - if (err) { - return callback(err); - } - else { - var fn = function (left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }; - callback(null, _map(results.sort(fn), function (x) { - return x.value; - })); - } - }); - }; - - async.auto = function (tasks, callback) { - callback = callback || function () {}; - var keys = _keys(tasks); - if (!keys.length) { - return callback(null); - } - - var results = {}; - - var listeners = []; - var addListener = function (fn) { - listeners.unshift(fn); - }; - var removeListener = function (fn) { - for (var i = 0; i < listeners.length; i += 1) { - if (listeners[i] === fn) { - listeners.splice(i, 1); - return; - } - } - }; - var taskComplete = function () { - _each(listeners.slice(0), function (fn) { - fn(); - }); - }; - - addListener(function () { - if (_keys(results).length === keys.length) { - callback(null, results); - callback = function () {}; - } - }); - - _each(keys, function (k) { - var task = (tasks[k] instanceof Function) ? [tasks[k]]: tasks[k]; - var taskCallback = function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - if (err) { - var safeResults = {}; - _each(_keys(results), function(rkey) { - safeResults[rkey] = results[rkey]; - }); - safeResults[k] = args; - callback(err, safeResults); - // stop subsequent errors hitting callback multiple times - callback = function () {}; - } - else { - results[k] = args; - async.setImmediate(taskComplete); - } - }; - var requires = task.slice(0, Math.abs(task.length - 1)) || []; - var ready = function () { - return _reduce(requires, function (a, x) { - return (a && results.hasOwnProperty(x)); - }, true) && !results.hasOwnProperty(k); - }; - if (ready()) { - task[task.length - 1](taskCallback, results); - } - else { - var listener = function () { - if (ready()) { - removeListener(listener); - task[task.length - 1](taskCallback, results); - } - }; - addListener(listener); - } - }); - }; - - async.waterfall = function (tasks, callback) { - callback = callback || function () {}; - if (tasks.constructor !== Array) { - var err = new Error('First argument to waterfall must be an array of functions'); - return callback(err); - } - if (!tasks.length) { - return callback(); - } - var wrapIterator = function (iterator) { - return function (err) { - if (err) { - callback.apply(null, arguments); - callback = function () {}; - } - else { - var args = Array.prototype.slice.call(arguments, 1); - var next = iterator.next(); - if (next) { - args.push(wrapIterator(next)); - } - else { - args.push(callback); - } - async.setImmediate(function () { - iterator.apply(null, args); - }); - } - }; - }; - wrapIterator(async.iterator(tasks))(); - }; - - var _parallel = function(eachfn, tasks, callback) { - callback = callback || function () {}; - if (tasks.constructor === Array) { - eachfn.map(tasks, function (fn, callback) { - if (fn) { - fn(function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - callback.call(null, err, args); - }); - } - }, callback); - } - else { - var results = {}; - eachfn.each(_keys(tasks), function (k, callback) { - tasks[k](function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - - async.parallel = function (tasks, callback) { - _parallel({ map: async.map, each: async.each }, tasks, callback); - }; - - async.parallelLimit = function(tasks, limit, callback) { - _parallel({ map: _mapLimit(limit), each: _eachLimit(limit) }, tasks, callback); - }; - - async.series = function (tasks, callback) { - callback = callback || function () {}; - if (tasks.constructor === Array) { - async.mapSeries(tasks, function (fn, callback) { - if (fn) { - fn(function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - callback.call(null, err, args); - }); - } - }, callback); - } - else { - var results = {}; - async.eachSeries(_keys(tasks), function (k, callback) { - tasks[k](function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - - async.iterator = function (tasks) { - var makeCallback = function (index) { - var fn = function () { - if (tasks.length) { - tasks[index].apply(null, arguments); - } - return fn.next(); - }; - fn.next = function () { - return (index < tasks.length - 1) ? makeCallback(index + 1): null; - }; - return fn; - }; - return makeCallback(0); - }; - - async.apply = function (fn) { - var args = Array.prototype.slice.call(arguments, 1); - return function () { - return fn.apply( - null, args.concat(Array.prototype.slice.call(arguments)) - ); - }; - }; - - var _concat = function (eachfn, arr, fn, callback) { - var r = []; - eachfn(arr, function (x, cb) { - fn(x, function (err, y) { - r = r.concat(y || []); - cb(err); - }); - }, function (err) { - callback(err, r); - }); - }; - async.concat = doParallel(_concat); - async.concatSeries = doSeries(_concat); - - async.whilst = function (test, iterator, callback) { - if (test()) { - iterator(function (err) { - if (err) { - return callback(err); - } - async.whilst(test, iterator, callback); - }); - } - else { - callback(); - } - }; - - async.doWhilst = function (iterator, test, callback) { - iterator(function (err) { - if (err) { - return callback(err); - } - if (test()) { - async.doWhilst(iterator, test, callback); - } - else { - callback(); - } - }); - }; - - async.until = function (test, iterator, callback) { - if (!test()) { - iterator(function (err) { - if (err) { - return callback(err); - } - async.until(test, iterator, callback); - }); - } - else { - callback(); - } - }; - - async.doUntil = function (iterator, test, callback) { - iterator(function (err) { - if (err) { - return callback(err); - } - if (!test()) { - async.doUntil(iterator, test, callback); - } - else { - callback(); - } - }); - }; - - async.queue = function (worker, concurrency) { - if (concurrency === undefined) { - concurrency = 1; - } - function _insert(q, data, pos, callback) { - if(data.constructor !== Array) { - data = [data]; - } - _each(data, function(task) { - var item = { - data: task, - callback: typeof callback === 'function' ? callback : null - }; - - if (pos) { - q.tasks.unshift(item); - } else { - q.tasks.push(item); - } - - if (q.saturated && q.tasks.length === concurrency) { - q.saturated(); - } - async.setImmediate(q.process); - }); - } - - var workers = 0; - var q = { - tasks: [], - concurrency: concurrency, - saturated: null, - empty: null, - drain: null, - push: function (data, callback) { - _insert(q, data, false, callback); - }, - unshift: function (data, callback) { - _insert(q, data, true, callback); - }, - process: function () { - if (workers < q.concurrency && q.tasks.length) { - var task = q.tasks.shift(); - if (q.empty && q.tasks.length === 0) { - q.empty(); - } - workers += 1; - var next = function () { - workers -= 1; - if (task.callback) { - task.callback.apply(task, arguments); - } - if (q.drain && q.tasks.length + workers === 0) { - q.drain(); - } - q.process(); - }; - var cb = only_once(next); - worker(task.data, cb); - } - }, - length: function () { - return q.tasks.length; - }, - running: function () { - return workers; - } - }; - return q; - }; - - async.cargo = function (worker, payload) { - var working = false, - tasks = []; - - var cargo = { - tasks: tasks, - payload: payload, - saturated: null, - empty: null, - drain: null, - push: function (data, callback) { - if(data.constructor !== Array) { - data = [data]; - } - _each(data, function(task) { - tasks.push({ - data: task, - callback: typeof callback === 'function' ? callback : null - }); - if (cargo.saturated && tasks.length === payload) { - cargo.saturated(); - } - }); - async.setImmediate(cargo.process); - }, - process: function process() { - if (working) return; - if (tasks.length === 0) { - if(cargo.drain) cargo.drain(); - return; - } - - var ts = typeof payload === 'number' - ? tasks.splice(0, payload) - : tasks.splice(0); - - var ds = _map(ts, function (task) { - return task.data; - }); - - if(cargo.empty) cargo.empty(); - working = true; - worker(ds, function () { - working = false; - - var args = arguments; - _each(ts, function (data) { - if (data.callback) { - data.callback.apply(null, args); - } - }); - - process(); - }); - }, - length: function () { - return tasks.length; - }, - running: function () { - return working; - } - }; - return cargo; - }; - - var _console_fn = function (name) { - return function (fn) { - var args = Array.prototype.slice.call(arguments, 1); - fn.apply(null, args.concat([function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (typeof console !== 'undefined') { - if (err) { - if (console.error) { - console.error(err); - } - } - else if (console[name]) { - _each(args, function (x) { - console[name](x); - }); - } - } - }])); - }; - }; - async.log = _console_fn('log'); - async.dir = _console_fn('dir'); - /*async.info = _console_fn('info'); - async.warn = _console_fn('warn'); - async.error = _console_fn('error');*/ - - async.memoize = function (fn, hasher) { - var memo = {}; - var queues = {}; - hasher = hasher || function (x) { - return x; - }; - var memoized = function () { - var args = Array.prototype.slice.call(arguments); - var callback = args.pop(); - var key = hasher.apply(null, args); - if (key in memo) { - callback.apply(null, memo[key]); - } - else if (key in queues) { - queues[key].push(callback); - } - else { - queues[key] = [callback]; - fn.apply(null, args.concat([function () { - memo[key] = arguments; - var q = queues[key]; - delete queues[key]; - for (var i = 0, l = q.length; i < l; i++) { - q[i].apply(null, arguments); - } - }])); - } - }; - memoized.memo = memo; - memoized.unmemoized = fn; - return memoized; - }; - - async.unmemoize = function (fn) { - return function () { - return (fn.unmemoized || fn).apply(null, arguments); - }; - }; - - async.times = function (count, iterator, callback) { - var counter = []; - for (var i = 0; i < count; i++) { - counter.push(i); - } - return async.map(counter, iterator, callback); - }; - - async.timesSeries = function (count, iterator, callback) { - var counter = []; - for (var i = 0; i < count; i++) { - counter.push(i); - } - return async.mapSeries(counter, iterator, callback); - }; - - async.compose = function (/* functions... */) { - var fns = Array.prototype.reverse.call(arguments); - return function () { - var that = this; - var args = Array.prototype.slice.call(arguments); - var callback = args.pop(); - async.reduce(fns, args, function (newargs, fn, cb) { - fn.apply(that, newargs.concat([function () { - var err = arguments[0]; - var nextargs = Array.prototype.slice.call(arguments, 1); - cb(err, nextargs); - }])) - }, - function (err, results) { - callback.apply(that, [err].concat(results)); - }); - }; - }; - - var _applyEach = function (eachfn, fns /*args...*/) { - var go = function () { - var that = this; - var args = Array.prototype.slice.call(arguments); - var callback = args.pop(); - return eachfn(fns, function (fn, cb) { - fn.apply(that, args.concat([cb])); - }, - callback); - }; - if (arguments.length > 2) { - var args = Array.prototype.slice.call(arguments, 2); - return go.apply(this, args); - } - else { - return go; - } - }; - async.applyEach = doParallel(_applyEach); - async.applyEachSeries = doSeries(_applyEach); - - async.forever = function (fn, callback) { - function next(err) { - if (err) { - if (callback) { - return callback(err); - } - throw err; - } - fn(next); - } - next(); - }; - - // AMD / RequireJS - if (typeof define !== 'undefined' && define.amd) { - define([], function () { - return async; - }); - } - // Node.js - else if (typeof module !== 'undefined' && module.exports) { - module.exports = async; - } - // included directly via <script> tag - else { - root.async = async; - } - -}()); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/package.json deleted file mode 100644 index c586b717..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/async/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "async", - "description": "Higher-order functions and common patterns for asynchronous code", - "main": "./lib/async", - "author": { - "name": "Caolan McMahon" - }, - "version": "0.2.10", - "repository": { - "type": "git", - "url": "https://github.com/caolan/async.git" - }, - "bugs": { - "url": "https://github.com/caolan/async/issues" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/caolan/async/raw/master/LICENSE" - } - ], - "devDependencies": { - "nodeunit": ">0.0.0", - "uglify-js": "1.2.x", - "nodelint": ">0.0.0" - }, - "jam": { - "main": "lib/async.js", - "include": [ - "lib/async.js", - "README.md", - "LICENSE" - ] - }, - "scripts": { - "test": "nodeunit test/test-async.js" - }, - "readme": "# Async.js\n\nAsync is a utility module which provides straight-forward, powerful functions\nfor working with asynchronous JavaScript. Although originally designed for\nuse with [node.js](http://nodejs.org), it can also be used directly in the\nbrowser. Also supports [component](https://github.com/component/component).\n\nAsync provides around 20 functions that include the usual 'functional'\nsuspects (map, reduce, filter, each…) as well as some common patterns\nfor asynchronous control flow (parallel, series, waterfall…). All these\nfunctions assume you follow the node.js convention of providing a single\ncallback as the last argument of your async function.\n\n\n## Quick Examples\n\n```javascript\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n\nasync.parallel([\n function(){ ... },\n function(){ ... }\n], callback);\n\nasync.series([\n function(){ ... },\n function(){ ... }\n]);\n```\n\nThere are many more functions available so take a look at the docs below for a\nfull list. This module aims to be comprehensive, so if you feel anything is\nmissing please create a GitHub issue for it.\n\n## Common Pitfalls\n\n### Binding a context to an iterator\n\nThis section is really about bind, not about async. If you are wondering how to\nmake async execute your iterators in a given context, or are confused as to why\na method of another library isn't working as an iterator, study this example:\n\n```js\n// Here is a simple object with an (unnecessarily roundabout) squaring method\nvar AsyncSquaringLibrary = {\n squareExponent: 2,\n square: function(number, callback){ \n var result = Math.pow(number, this.squareExponent);\n setTimeout(function(){\n callback(null, result);\n }, 200);\n }\n};\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){\n // result is [NaN, NaN, NaN]\n // This fails because the `this.squareExponent` expression in the square\n // function is not evaluated in the context of AsyncSquaringLibrary, and is\n // therefore undefined.\n});\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){\n // result is [1, 4, 9]\n // With the help of bind we can attach a context to the iterator before\n // passing it to async. Now the square function will be executed in its \n // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent`\n // will be as expected.\n});\n```\n\n## Download\n\nThe source is available for download from\n[GitHub](http://github.com/caolan/async).\nAlternatively, you can install using Node Package Manager (npm):\n\n npm install async\n\n__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed\n\n## In the Browser\n\nSo far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage:\n\n```html\n<script type=\"text/javascript\" src=\"async.js\"></script>\n<script type=\"text/javascript\">\n\n async.map(data, asyncProcess, function(err, results){\n alert(results);\n });\n\n</script>\n```\n\n## Documentation\n\n### Collections\n\n* [each](#each)\n* [eachSeries](#eachSeries)\n* [eachLimit](#eachLimit)\n* [map](#map)\n* [mapSeries](#mapSeries)\n* [mapLimit](#mapLimit)\n* [filter](#filter)\n* [filterSeries](#filterSeries)\n* [reject](#reject)\n* [rejectSeries](#rejectSeries)\n* [reduce](#reduce)\n* [reduceRight](#reduceRight)\n* [detect](#detect)\n* [detectSeries](#detectSeries)\n* [sortBy](#sortBy)\n* [some](#some)\n* [every](#every)\n* [concat](#concat)\n* [concatSeries](#concatSeries)\n\n### Control Flow\n\n* [series](#series)\n* [parallel](#parallel)\n* [parallelLimit](#parallellimittasks-limit-callback)\n* [whilst](#whilst)\n* [doWhilst](#doWhilst)\n* [until](#until)\n* [doUntil](#doUntil)\n* [forever](#forever)\n* [waterfall](#waterfall)\n* [compose](#compose)\n* [applyEach](#applyEach)\n* [applyEachSeries](#applyEachSeries)\n* [queue](#queue)\n* [cargo](#cargo)\n* [auto](#auto)\n* [iterator](#iterator)\n* [apply](#apply)\n* [nextTick](#nextTick)\n* [times](#times)\n* [timesSeries](#timesSeries)\n\n### Utils\n\n* [memoize](#memoize)\n* [unmemoize](#unmemoize)\n* [log](#log)\n* [dir](#dir)\n* [noConflict](#noConflict)\n\n\n## Collections\n\n<a name=\"forEach\" />\n<a name=\"each\" />\n### each(arr, iterator, callback)\n\nApplies an iterator function to each item in an array, in parallel.\nThe iterator is called with an item from the list and a callback for when it\nhas finished. If the iterator passes an error to this callback, the main\ncallback for the each function is immediately called with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// assuming openFiles is an array of file names and saveFile is a function\n// to save the modified contents of that file:\n\nasync.each(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n<a name=\"forEachSeries\" />\n<a name=\"eachSeries\" />\n### eachSeries(arr, iterator, callback)\n\nThe same as each only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. This means the iterator functions will complete in order.\n\n\n---------------------------------------\n\n<a name=\"forEachLimit\" />\n<a name=\"eachLimit\" />\n### eachLimit(arr, limit, iterator, callback)\n\nThe same as each only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// Assume documents is an array of JSON objects and requestApi is a\n// function that interacts with a rate-limited REST api.\n\nasync.eachLimit(documents, 20, requestApi, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n<a name=\"map\" />\n### map(arr, iterator, callback)\n\nProduces a new array of values by mapping each value in the given array through\nthe iterator function. The iterator is called with an item from the array and a\ncallback for when it has finished processing. The callback takes 2 arguments, \nan error and the transformed item from the array. If the iterator passes an\nerror to this callback, the main callback for the map function is immediately\ncalled with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order, however\nthe results array will be in the same order as the original array.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n```js\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n<a name=\"mapSeries\" />\n### mapSeries(arr, iterator, callback)\n\nThe same as map only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n---------------------------------------\n\n<a name=\"mapLimit\" />\n### mapLimit(arr, limit, iterator, callback)\n\nThe same as map only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n```js\nasync.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n<a name=\"filter\" />\n### filter(arr, iterator, callback)\n\n__Alias:__ select\n\nReturns a new array of all the values which pass an async truth test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(results) - A callback which is called after all the iterator\n functions have finished.\n\n__Example__\n\n```js\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n```\n\n---------------------------------------\n\n<a name=\"filterSeries\" />\n### filterSeries(arr, iterator, callback)\n\n__alias:__ selectSeries\n\nThe same as filter only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n---------------------------------------\n\n<a name=\"reject\" />\n### reject(arr, iterator, callback)\n\nThe opposite of filter. Removes values that pass an async truth test.\n\n---------------------------------------\n\n<a name=\"rejectSeries\" />\n### rejectSeries(arr, iterator, callback)\n\nThe same as reject, only the iterator is applied to each item in the array\nin series.\n\n\n---------------------------------------\n\n<a name=\"reduce\" />\n### reduce(arr, memo, iterator, callback)\n\n__aliases:__ inject, foldl\n\nReduces a list of values into a single value using an async iterator to return\neach successive step. Memo is the initial state of the reduction. This\nfunction only operates in series. For performance reasons, it may make sense to\nsplit a call to this function into a parallel map, then use the normal\nArray.prototype.reduce on the results. This function is for situations where\neach step in the reduction needs to be async, if you can get the data before\nreducing it then it's probably a good idea to do so.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* memo - The initial state of the reduction.\n* iterator(memo, item, callback) - A function applied to each item in the\n array to produce the next step in the reduction. The iterator is passed a\n callback(err, reduction) which accepts an optional error as its first \n argument, and the state of the reduction as the second. If an error is \n passed to the callback, the reduction is stopped and the main callback is \n immediately called with the error.\n* callback(err, result) - A callback which is called after all the iterator\n functions have finished. Result is the reduced value.\n\n__Example__\n\n```js\nasync.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n}, function(err, result){\n // result is now equal to the last value of memo, which is 6\n});\n```\n\n---------------------------------------\n\n<a name=\"reduceRight\" />\n### reduceRight(arr, memo, iterator, callback)\n\n__Alias:__ foldr\n\nSame as reduce, only operates on the items in the array in reverse order.\n\n\n---------------------------------------\n\n<a name=\"detect\" />\n### detect(arr, iterator, callback)\n\nReturns the first value in a list that passes an async truth test. The\niterator is applied in parallel, meaning the first iterator to return true will\nfire the detect callback with that result. That means the result might not be\nthe first item in the original array (in terms of order) that passes the test.\n\nIf order within the original array is important then look at detectSeries.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value undefined if none passed.\n\n__Example__\n\n```js\nasync.detect(['file1','file2','file3'], fs.exists, function(result){\n // result now equals the first file in the list that exists\n});\n```\n\n---------------------------------------\n\n<a name=\"detectSeries\" />\n### detectSeries(arr, iterator, callback)\n\nThe same as detect, only the iterator is applied to each item in the array\nin series. This means the result is always the first in the original array (in\nterms of array order) that passes the truth test.\n\n\n---------------------------------------\n\n<a name=\"sortBy\" />\n### sortBy(arr, iterator, callback)\n\nSorts a list by the results of running each value through an async iterator.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, sortValue) which must be called once it\n has completed with an error (which can be null) and a value to use as the sort\n criteria.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is the items from\n the original array sorted by the values returned by the iterator calls.\n\n__Example__\n\n```js\nasync.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n}, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n});\n```\n\n---------------------------------------\n\n<a name=\"some\" />\n### some(arr, iterator, callback)\n\n__Alias:__ any\n\nReturns true if at least one element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists. Once any iterator\ncall returns true, the main callback is immediately called.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n either true or false depending on the values of the async tests.\n\n__Example__\n\n```js\nasync.some(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then at least one of the files exists\n});\n```\n\n---------------------------------------\n\n<a name=\"every\" />\n### every(arr, iterator, callback)\n\n__Alias:__ all\n\nReturns true if every element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called after all the iterator\n functions have finished. Result will be either true or false depending on\n the values of the async tests.\n\n__Example__\n\n```js\nasync.every(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then every file exists\n});\n```\n\n---------------------------------------\n\n<a name=\"concat\" />\n### concat(arr, iterator, callback)\n\nApplies an iterator to each item in a list, concatenating the results. Returns the\nconcatenated list. The iterators are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of the arguments passed to the iterator function.\n\n__Arguments__\n\n* arr - An array to iterate over\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, results) which must be called once it \n has completed with an error (which can be null) and an array of results.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array containing\n the concatenated results of the iterator function.\n\n__Example__\n\n```js\nasync.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n});\n```\n\n---------------------------------------\n\n<a name=\"concatSeries\" />\n### concatSeries(arr, iterator, callback)\n\nSame as async.concat, but executes in series instead of parallel.\n\n\n## Control Flow\n\n<a name=\"series\" />\n### series(tasks, [callback])\n\nRun an array of functions in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run and the callback for the series is\nimmediately called with the value of the error. Once the tasks have completed,\nthe results are passed to the final callback as an array.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.series.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed\n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n }\n],\n// optional callback\nfunction(err, results){\n // results is now equal to ['one', 'two']\n});\n\n\n// an example using an object instead of an array\nasync.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equal to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n<a name=\"parallel\" />\n### parallel(tasks, [callback])\n\nRun an array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main callback is immediately called with the value of the error.\nOnce the tasks have completed, the results are passed to the final callback as an\narray.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.parallel.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n }\n],\n// optional callback\nfunction(err, results){\n // the results array will equal ['one','two'] even though\n // the second function had a shorter timeout.\n});\n\n\n// an example using an object instead of an array\nasync.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equals to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n<a name=\"parallel\" />\n### parallelLimit(tasks, limit, [callback])\n\nThe same as parallel only the tasks are executed in parallel with a maximum of \"limit\" \ntasks executing at any time.\n\nNote that the tasks are not executed in batches, so there is no guarantee that \nthe first \"limit\" tasks will complete before any others are started.\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* limit - The maximum number of tasks to run at any time.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n---------------------------------------\n\n<a name=\"whilst\" />\n### whilst(test, fn, callback)\n\nRepeatedly call fn, while test returns true. Calls the callback when stopped,\nor an error occurs.\n\n__Arguments__\n\n* test() - synchronous truth test to perform before each execution of fn.\n* fn(callback) - A function to call each time the test passes. The function is\n passed a callback(err) which must be called once it has completed with an \n optional error argument.\n* callback(err) - A callback which is called after the test fails and repeated\n execution of fn has stopped.\n\n__Example__\n\n```js\nvar count = 0;\n\nasync.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n);\n```\n\n---------------------------------------\n\n<a name=\"doWhilst\" />\n### doWhilst(fn, test, callback)\n\nThe post check version of whilst. To reflect the difference in the order of operations `test` and `fn` arguments are switched. `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.\n\n---------------------------------------\n\n<a name=\"until\" />\n### until(test, fn, callback)\n\nRepeatedly call fn, until test returns true. Calls the callback when stopped,\nor an error occurs.\n\nThe inverse of async.whilst.\n\n---------------------------------------\n\n<a name=\"doUntil\" />\n### doUntil(fn, test, callback)\n\nLike doWhilst except the test is inverted. Note the argument ordering differs from `until`.\n\n---------------------------------------\n\n<a name=\"forever\" />\n### forever(fn, callback)\n\nCalls the asynchronous function 'fn' repeatedly, in series, indefinitely.\nIf an error is passed to fn's callback then 'callback' is called with the\nerror, otherwise it will never be called.\n\n---------------------------------------\n\n<a name=\"waterfall\" />\n### waterfall(tasks, [callback])\n\nRuns an array of functions in series, each passing their results to the next in\nthe array. However, if any of the functions pass an error to the callback, the\nnext function is not executed and the main callback is immediately called with\nthe error.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a \n callback(err, result1, result2, ...) it must call on completion. The first\n argument is an error (which can be null) and any further arguments will be \n passed as arguments in order to the next task.\n* callback(err, [results]) - An optional callback to run once all the functions\n have completed. This will be passed the results of the last task's callback.\n\n\n\n__Example__\n\n```js\nasync.waterfall([\n function(callback){\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback){\n callback(null, 'three');\n },\n function(arg1, callback){\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n], function (err, result) {\n // result now equals 'done' \n});\n```\n\n---------------------------------------\n<a name=\"compose\" />\n### compose(fn1, fn2...)\n\nCreates a function which is a composition of the passed asynchronous\nfunctions. Each function consumes the return value of the function that\nfollows. Composing functions f(), g() and h() would produce the result of\nf(g(h())), only this version uses callbacks to obtain the return values.\n\nEach function is executed with the `this` binding of the composed function.\n\n__Arguments__\n\n* functions... - the asynchronous functions to compose\n\n\n__Example__\n\n```js\nfunction add1(n, callback) {\n setTimeout(function () {\n callback(null, n + 1);\n }, 10);\n}\n\nfunction mul3(n, callback) {\n setTimeout(function () {\n callback(null, n * 3);\n }, 10);\n}\n\nvar add1mul3 = async.compose(mul3, add1);\n\nadd1mul3(4, function (err, result) {\n // result now equals 15\n});\n```\n\n---------------------------------------\n<a name=\"applyEach\" />\n### applyEach(fns, args..., callback)\n\nApplies the provided arguments to each function in the array, calling the\ncallback after all functions have completed. If you only provide the first\nargument then it will return a function which lets you pass in the\narguments as if it were a single function call.\n\n__Arguments__\n\n* fns - the asynchronous functions to all call with the same arguments\n* args... - any number of separate arguments to pass to the function\n* callback - the final argument should be the callback, called when all\n functions have completed processing\n\n\n__Example__\n\n```js\nasync.applyEach([enableSearch, updateSchema], 'bucket', callback);\n\n// partial application example:\nasync.each(\n buckets,\n async.applyEach([enableSearch, updateSchema]),\n callback\n);\n```\n\n---------------------------------------\n\n<a name=\"applyEachSeries\" />\n### applyEachSeries(arr, iterator, callback)\n\nThe same as applyEach only the functions are applied in series.\n\n---------------------------------------\n\n<a name=\"queue\" />\n### queue(worker, concurrency)\n\nCreates a queue object with the specified concurrency. Tasks added to the\nqueue will be processed in parallel (up to the concurrency limit). If all\nworkers are in progress, the task is queued until one is available. Once\na worker has completed a task, the task's callback is called.\n\n__Arguments__\n\n* worker(task, callback) - An asynchronous function for processing a queued\n task, which must call its callback(err) argument when finished, with an \n optional error as an argument.\n* concurrency - An integer for determining how many worker functions should be\n run in parallel.\n\n__Queue objects__\n\nThe queue object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* concurrency - an integer for determining how many worker functions should be\n run in parallel. This property can be changed after a queue is created to\n alter the concurrency on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* unshift(task, [callback]) - add a new task to the front of the queue.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a queue object with concurrency 2\n\nvar q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n}, 2);\n\n\n// assign a callback\nq.drain = function() {\n console.log('all items have been processed');\n}\n\n// add some items to the queue\n\nq.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n});\nq.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the queue (batch-wise)\n\nq.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the front of the queue\n\nq.unshift({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n```\n\n---------------------------------------\n\n<a name=\"cargo\" />\n### cargo(worker, [payload])\n\nCreates a cargo object with the specified payload. Tasks added to the\ncargo will be processed altogether (up to the payload limit). If the\nworker is in progress, the task is queued until it is available. Once\nthe worker has completed some tasks, each callback of those tasks is called.\n\n__Arguments__\n\n* worker(tasks, callback) - An asynchronous function for processing an array of\n queued tasks, which must call its callback(err) argument when finished, with \n an optional error as an argument.\n* payload - An optional integer for determining how many tasks should be\n processed per round; if omitted, the default is unlimited.\n\n__Cargo objects__\n\nThe cargo object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* payload - an integer for determining how many tasks should be\n process per round. This property can be changed after a cargo is created to\n alter the payload on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a cargo object with payload 2\n\nvar cargo = async.cargo(function (tasks, callback) {\n for(var i=0; i<tasks.length; i++){\n console.log('hello ' + tasks[i].name);\n }\n callback();\n}, 2);\n\n\n// add some items\n\ncargo.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n});\ncargo.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\ncargo.push({name: 'baz'}, function (err) {\n console.log('finished processing baz');\n});\n```\n\n---------------------------------------\n\n<a name=\"auto\" />\n### auto(tasks, [callback])\n\nDetermines the best order for running functions based on their requirements.\nEach function can optionally depend on other functions being completed first,\nand each function is run as soon as its requirements are satisfied. If any of\nthe functions pass an error to their callback, that function will not complete\n(so any other functions depending on it will not run) and the main callback\nwill be called immediately with the error. Functions also receive an object\ncontaining the results of functions which have completed so far.\n\nNote, all functions are called with a results object as a second argument, \nso it is unsafe to pass functions in the tasks object which cannot handle the\nextra argument. For example, this snippet of code:\n\n```js\nasync.auto({\n readData: async.apply(fs.readFile, 'data.txt', 'utf-8')\n}, callback);\n```\n\nwill have the effect of calling readFile with the results object as the last\nargument, which will fail:\n\n```js\nfs.readFile('data.txt', 'utf-8', cb, {});\n```\n\nInstead, wrap the call to readFile in a function which does not forward the \nresults object:\n\n```js\nasync.auto({\n readData: function(cb, results){\n fs.readFile('data.txt', 'utf-8', cb);\n }\n}, callback);\n```\n\n__Arguments__\n\n* tasks - An object literal containing named functions or an array of\n requirements, with the function itself the last item in the array. The key\n used for each function or array is used when specifying requirements. The \n function receives two arguments: (1) a callback(err, result) which must be \n called when finished, passing an error (which can be null) and the result of \n the function's execution, and (2) a results object, containing the results of\n the previously executed functions.\n* callback(err, results) - An optional callback which is called when all the\n tasks have been completed. The callback will receive an error as an argument\n if any tasks pass an error to their callback. Results will always be passed\n\tbut if an error occurred, no other tasks will be performed, and the results\n\tobject will only contain partial results.\n \n\n__Example__\n\n```js\nasync.auto({\n get_data: function(callback){\n // async code to get some data\n },\n make_folder: function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n },\n write_file: ['get_data', 'make_folder', function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, filename);\n }],\n email_link: ['write_file', function(callback, results){\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n }]\n});\n```\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n```js\nasync.parallel([\n function(callback){\n // async code to get some data\n },\n function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n }\n],\nfunction(err, results){\n async.series([\n function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n },\n function(callback){\n // once the file is written let's email a link to it...\n }\n ]);\n});\n```\n\nFor a complicated series of async tasks using the auto function makes adding\nnew tasks much easier and makes the code more readable.\n\n\n---------------------------------------\n\n<a name=\"iterator\" />\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the array,\nreturning a continuation to call the next one after that. It's also possible to\n'peek' the next iterator by doing iterator.next().\n\nThis function is used internally by the async module but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* tasks - An array of functions to run.\n\n__Example__\n\n```js\nvar iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n]);\n\nnode> var iterator2 = iterator();\n'one'\nnode> var iterator3 = iterator2();\n'two'\nnode> iterator3();\n'three'\nnode> var nextfn = iterator2.next();\nnode> nextfn();\n'three'\n```\n\n---------------------------------------\n\n<a name=\"apply\" />\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied, a useful\nshorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n```js\n// using apply\n\nasync.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n]);\n\n\n// the same process without using apply\n\nasync.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n }\n]);\n```\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n```js\nnode> var fn = async.apply(sys.puts, 'one');\nnode> fn('two', 'three');\none\ntwo\nthree\n```\n\n---------------------------------------\n\n<a name=\"nextTick\" />\n### nextTick(callback)\n\nCalls the callback on a later loop around the event loop. In node.js this just\ncalls process.nextTick, in the browser it falls back to setImmediate(callback)\nif available, otherwise setTimeout(callback, 0), which means other higher priority\nevents may precede the execution of the callback.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* callback - The function to call on a later loop around the event loop.\n\n__Example__\n\n```js\nvar call_order = [];\nasync.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two']\n});\ncall_order.push('one')\n```\n\n<a name=\"times\" />\n### times(n, callback)\n\nCalls the callback n times and accumulates results in the same manner\nyou would use with async.map.\n\n__Arguments__\n\n* n - The number of times to run the function.\n* callback - The function to call n times.\n\n__Example__\n\n```js\n// Pretend this is some complicated async factory\nvar createUser = function(id, callback) {\n callback(null, {\n id: 'user' + id\n })\n}\n// generate 5 users\nasync.times(5, function(n, next){\n createUser(n, function(err, user) {\n next(err, user)\n })\n}, function(err, users) {\n // we should now have 5 users\n});\n```\n\n<a name=\"timesSeries\" />\n### timesSeries(n, callback)\n\nThe same as times only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n## Utils\n\n<a name=\"memoize\" />\n### memoize(fn, [hasher])\n\nCaches the results of an async function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\nThe cache of results is exposed as the `memo` property of the function returned\nby `memoize`.\n\n__Arguments__\n\n* fn - the function you to proxy and cache results from.\n* hasher - an optional function for generating a custom hash for storing\n results, it has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n```js\nvar slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n};\nvar fn = async.memoize(slow_fn);\n\n// fn can now be used as if it were slow_fn\nfn('some name', function () {\n // callback\n});\n```\n\n<a name=\"unmemoize\" />\n### unmemoize(fn)\n\nUndoes a memoized function, reverting it to the original, unmemoized\nform. Comes handy in tests.\n\n__Arguments__\n\n* fn - the memoized function\n\n<a name=\"log\" />\n### log(function, arguments)\n\nLogs the result of an async function to the console. Only works in node.js or\nin browsers that support console.log and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.log is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n};\n```\n```js\nnode> async.log(hello, 'world');\n'hello world'\n```\n\n---------------------------------------\n\n<a name=\"dir\" />\n### dir(function, arguments)\n\nLogs the result of an async function to the console using console.dir to\ndisplay the properties of the resulting object. Only works in node.js or\nin browsers that support console.dir and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.dir is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n};\n```\n```js\nnode> async.dir(hello, 'world');\n{hello: 'world'}\n```\n\n---------------------------------------\n\n<a name=\"noConflict\" />\n### noConflict()\n\nChanges the value of async back to its original value, returning a reference to the\nasync object.\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/caolan/async", - "_id": "async@0.2.10", - "dist": { - "shasum": "a06e6818541aa1851d6ac822c8dbbfd6206eb72f" - }, - "_from": "async@~0.2.9", - "_resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/.npmignore deleted file mode 100644 index aba34f01..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -*.un~ -/node_modules -/test/tmp diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/License b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/License deleted file mode 100644 index 4804b7ab..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/License +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 Debuggable Limited <felix@debuggable.com> - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/Makefile deleted file mode 100644 index b4ff85a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -SHELL := /bin/bash - -test: - @./test/run.js - -.PHONY: test - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md deleted file mode 100644 index 1a9999eb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md +++ /dev/null @@ -1,132 +0,0 @@ -# combined-stream - -A stream that emits multiple other streams one after another. - -## Installation - -``` bash -npm install combined-stream -``` - -## Usage - -Here is a simple example that shows how you can use combined-stream to combine -two files into one: - -``` javascript -var CombinedStream = require('combined-stream'); -var fs = require('fs'); - -var combinedStream = CombinedStream.create(); -combinedStream.append(fs.createReadStream('file1.txt')); -combinedStream.append(fs.createReadStream('file2.txt')); - -combinedStream.pipe(fs.createWriteStream('combined.txt')); -``` - -While the example above works great, it will pause all source streams until -they are needed. If you don't want that to happen, you can set `pauseStreams` -to `false`: - -``` javascript -var CombinedStream = require('combined-stream'); -var fs = require('fs'); - -var combinedStream = CombinedStream.create({pauseStreams: false}); -combinedStream.append(fs.createReadStream('file1.txt')); -combinedStream.append(fs.createReadStream('file2.txt')); - -combinedStream.pipe(fs.createWriteStream('combined.txt')); -``` - -However, what if you don't have all the source streams yet, or you don't want -to allocate the resources (file descriptors, memory, etc.) for them right away? -Well, in that case you can simply provide a callback that supplies the stream -by calling a `next()` function: - -``` javascript -var CombinedStream = require('combined-stream'); -var fs = require('fs'); - -var combinedStream = CombinedStream.create(); -combinedStream.append(function(next) { - next(fs.createReadStream('file1.txt')); -}); -combinedStream.append(function(next) { - next(fs.createReadStream('file2.txt')); -}); - -combinedStream.pipe(fs.createWriteStream('combined.txt')); -``` - -## API - -### CombinedStream.create([options]) - -Returns a new combined stream object. Available options are: - -* `maxDataSize` -* `pauseStreams` - -The effect of those options is described below. - -### combinedStream.pauseStreams = true - -Whether to apply back pressure to the underlaying streams. If set to `false`, -the underlaying streams will never be paused. If set to `true`, the -underlaying streams will be paused right after being appended, as well as when -`delayedStream.pipe()` wants to throttle. - -### combinedStream.maxDataSize = 2 * 1024 * 1024 - -The maximum amount of bytes (or characters) to buffer for all source streams. -If this value is exceeded, `combinedStream` emits an `'error'` event. - -### combinedStream.dataSize = 0 - -The amount of bytes (or characters) currently buffered by `combinedStream`. - -### combinedStream.append(stream) - -Appends the given `stream` to the combinedStream object. If `pauseStreams` is -set to `true, this stream will also be paused right away. - -`streams` can also be a function that takes one parameter called `next`. `next` -is a function that must be invoked in order to provide the `next` stream, see -example above. - -Regardless of how the `stream` is appended, combined-stream always attaches an -`'error'` listener to it, so you don't have to do that manually. - -Special case: `stream` can also be a String or Buffer. - -### combinedStream.write(data) - -You should not call this, `combinedStream` takes care of piping the appended -streams into itself for you. - -### combinedStream.resume() - -Causes `combinedStream` to start drain the streams it manages. The function is -idempotent, and also emits a `'resume'` event each time which usually goes to -the stream that is currently being drained. - -### combinedStream.pause(); - -If `combinedStream.pauseStreams` is set to `false`, this does nothing. -Otherwise a `'pause'` event is emitted, this goes to the stream that is -currently being drained, so you can use it to apply back pressure. - -### combinedStream.end(); - -Sets `combinedStream.writable` to false, emits an `'end'` event, and removes -all streams from the queue. - -### combinedStream.destroy(); - -Same as `combinedStream.end()`, except it emits a `'close'` event instead of -`'end'`. - -## License - -combined-stream is licensed under the MIT license. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js deleted file mode 100644 index 32849fd1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js +++ /dev/null @@ -1,185 +0,0 @@ -var util = require('util'); -var Stream = require('stream').Stream; -var DelayedStream = require('delayed-stream'); - -module.exports = CombinedStream; -function CombinedStream() { - this.writable = false; - this.readable = true; - this.dataSize = 0; - this.maxDataSize = 2 * 1024 * 1024; - this.pauseStreams = true; - - this._released = false; - this._streams = []; - this._currentStream = null; -} -util.inherits(CombinedStream, Stream); - -CombinedStream.create = function(options) { - var combinedStream = new this(); - - options = options || {}; - for (var option in options) { - combinedStream[option] = options[option]; - } - - return combinedStream; -}; - -CombinedStream.isStreamLike = function(stream) { - return (typeof stream !== 'function') - && (typeof stream !== 'string') - && (typeof stream !== 'boolean') - && (typeof stream !== 'number') - && (!Buffer.isBuffer(stream)); -}; - -CombinedStream.prototype.append = function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); - - if (isStreamLike) { - if (!(stream instanceof DelayedStream)) { - stream.on('data', this._checkDataSize.bind(this)); - - stream = DelayedStream.create(stream, { - maxDataSize: Infinity, - pauseStream: this.pauseStreams, - }); - } - - this._handleErrors(stream); - - if (this.pauseStreams) { - stream.pause(); - } - } - - this._streams.push(stream); - return this; -}; - -CombinedStream.prototype.pipe = function(dest, options) { - Stream.prototype.pipe.call(this, dest, options); - this.resume(); -}; - -CombinedStream.prototype._getNext = function() { - this._currentStream = null; - var stream = this._streams.shift(); - - - if (typeof stream == 'undefined') { - this.end(); - return; - } - - if (typeof stream !== 'function') { - this._pipeNext(stream); - return; - } - - var getStream = stream; - getStream(function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('data', this._checkDataSize.bind(this)); - this._handleErrors(stream); - } - - this._pipeNext(stream); - }.bind(this)); -}; - -CombinedStream.prototype._pipeNext = function(stream) { - this._currentStream = stream; - - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('end', this._getNext.bind(this)) - stream.pipe(this, {end: false}); - return; - } - - var value = stream; - this.write(value); - this._getNext(); -}; - -CombinedStream.prototype._handleErrors = function(stream) { - var self = this; - stream.on('error', function(err) { - self._emitError(err); - }); -}; - -CombinedStream.prototype.write = function(data) { - this.emit('data', data); -}; - -CombinedStream.prototype.pause = function() { - if (!this.pauseStreams) { - return; - } - - this.emit('pause'); -}; - -CombinedStream.prototype.resume = function() { - if (!this._released) { - this._released = true; - this.writable = true; - this._getNext(); - } - - this.emit('resume'); -}; - -CombinedStream.prototype.end = function() { - this._reset(); - this.emit('end'); -}; - -CombinedStream.prototype.destroy = function() { - this._reset(); - this.emit('close'); -}; - -CombinedStream.prototype._reset = function() { - this.writable = false; - this._streams = []; - this._currentStream = null; -}; - -CombinedStream.prototype._checkDataSize = function() { - this._updateDataSize(); - if (this.dataSize <= this.maxDataSize) { - return; - } - - var message = - 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.' - this._emitError(new Error(message)); -}; - -CombinedStream.prototype._updateDataSize = function() { - this.dataSize = 0; - - var self = this; - this._streams.forEach(function(stream) { - if (!stream.dataSize) { - return; - } - - self.dataSize += stream.dataSize; - }); - - if (this._currentStream && this._currentStream.dataSize) { - this.dataSize += this._currentStream.dataSize; - } -}; - -CombinedStream.prototype._emitError = function(err) { - this._reset(); - this.emit('error', err); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/.npmignore deleted file mode 100644 index 2fedb26c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -*.un~ -/node_modules/* diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License deleted file mode 100644 index 4804b7ab..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 Debuggable Limited <felix@debuggable.com> - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile deleted file mode 100644 index b4ff85a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -SHELL := /bin/bash - -test: - @./test/run.js - -.PHONY: test - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md deleted file mode 100644 index 5cb5b35e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md +++ /dev/null @@ -1,154 +0,0 @@ -# delayed-stream - -Buffers events from a stream until you are ready to handle them. - -## Installation - -``` bash -npm install delayed-stream -``` - -## Usage - -The following example shows how to write a http echo server that delays its -response by 1000 ms. - -``` javascript -var DelayedStream = require('delayed-stream'); -var http = require('http'); - -http.createServer(function(req, res) { - var delayed = DelayedStream.create(req); - - setTimeout(function() { - res.writeHead(200); - delayed.pipe(res); - }, 1000); -}); -``` - -If you are not using `Stream#pipe`, you can also manually release the buffered -events by calling `delayedStream.resume()`: - -``` javascript -var delayed = DelayedStream.create(req); - -setTimeout(function() { - // Emit all buffered events and resume underlaying source - delayed.resume(); -}, 1000); -``` - -## Implementation - -In order to use this meta stream properly, here are a few things you should -know about the implementation. - -### Event Buffering / Proxying - -All events of the `source` stream are hijacked by overwriting the `source.emit` -method. Until node implements a catch-all event listener, this is the only way. - -However, delayed-stream still continues to emit all events it captures on the -`source`, regardless of whether you have released the delayed stream yet or -not. - -Upon creation, delayed-stream captures all `source` events and stores them in -an internal event buffer. Once `delayedStream.release()` is called, all -buffered events are emitted on the `delayedStream`, and the event buffer is -cleared. After that, delayed-stream merely acts as a proxy for the underlaying -source. - -### Error handling - -Error events on `source` are buffered / proxied just like any other events. -However, `delayedStream.create` attaches a no-op `'error'` listener to the -`source`. This way you only have to handle errors on the `delayedStream` -object, rather than in two places. - -### Buffer limits - -delayed-stream provides a `maxDataSize` property that can be used to limit -the amount of data being buffered. In order to protect you from bad `source` -streams that don't react to `source.pause()`, this feature is enabled by -default. - -## API - -### DelayedStream.create(source, [options]) - -Returns a new `delayedStream`. Available options are: - -* `pauseStream` -* `maxDataSize` - -The description for those properties can be found below. - -### delayedStream.source - -The `source` stream managed by this object. This is useful if you are -passing your `delayedStream` around, and you still want to access properties -on the `source` object. - -### delayedStream.pauseStream = true - -Whether to pause the underlaying `source` when calling -`DelayedStream.create()`. Modifying this property afterwards has no effect. - -### delayedStream.maxDataSize = 1024 * 1024 - -The amount of data to buffer before emitting an `error`. - -If the underlaying source is emitting `Buffer` objects, the `maxDataSize` -refers to bytes. - -If the underlaying source is emitting JavaScript strings, the size refers to -characters. - -If you know what you are doing, you can set this property to `Infinity` to -disable this feature. You can also modify this property during runtime. - -### delayedStream.maxDataSize = 1024 * 1024 - -The amount of data to buffer before emitting an `error`. - -If the underlaying source is emitting `Buffer` objects, the `maxDataSize` -refers to bytes. - -If the underlaying source is emitting JavaScript strings, the size refers to -characters. - -If you know what you are doing, you can set this property to `Infinity` to -disable this feature. - -### delayedStream.dataSize = 0 - -The amount of data buffered so far. - -### delayedStream.readable - -An ECMA5 getter that returns the value of `source.readable`. - -### delayedStream.resume() - -If the `delayedStream` has not been released so far, `delayedStream.release()` -is called. - -In either case, `source.resume()` is called. - -### delayedStream.pause() - -Calls `source.pause()`. - -### delayedStream.pipe(dest) - -Calls `delayedStream.resume()` and then proxies the arguments to `source.pipe`. - -### delayedStream.release() - -Emits and clears all events that have been buffered up so far. This does not -resume the underlaying source, use `delayedStream.resume()` instead. - -## License - -delayed-stream is licensed under the MIT license. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js deleted file mode 100644 index 7c10d482..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js +++ /dev/null @@ -1,99 +0,0 @@ -var Stream = require('stream').Stream; -var util = require('util'); - -module.exports = DelayedStream; -function DelayedStream() { - this.source = null; - this.dataSize = 0; - this.maxDataSize = 1024 * 1024; - this.pauseStream = true; - - this._maxDataSizeExceeded = false; - this._released = false; - this._bufferedEvents = []; -} -util.inherits(DelayedStream, Stream); - -DelayedStream.create = function(source, options) { - var delayedStream = new this(); - - options = options || {}; - for (var option in options) { - delayedStream[option] = options[option]; - } - - delayedStream.source = source; - - var realEmit = source.emit; - source.emit = function() { - delayedStream._handleEmit(arguments); - return realEmit.apply(source, arguments); - }; - - source.on('error', function() {}); - if (delayedStream.pauseStream) { - source.pause(); - } - - return delayedStream; -}; - -DelayedStream.prototype.__defineGetter__('readable', function() { - return this.source.readable; -}); - -DelayedStream.prototype.resume = function() { - if (!this._released) { - this.release(); - } - - this.source.resume(); -}; - -DelayedStream.prototype.pause = function() { - this.source.pause(); -}; - -DelayedStream.prototype.release = function() { - this._released = true; - - this._bufferedEvents.forEach(function(args) { - this.emit.apply(this, args); - }.bind(this)); - this._bufferedEvents = []; -}; - -DelayedStream.prototype.pipe = function() { - var r = Stream.prototype.pipe.apply(this, arguments); - this.resume(); - return r; -}; - -DelayedStream.prototype._handleEmit = function(args) { - if (this._released) { - this.emit.apply(this, args); - return; - } - - if (args[0] === 'data') { - this.dataSize += args[1].length; - this._checkIfMaxDataSizeExceeded(); - } - - this._bufferedEvents.push(args); -}; - -DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { - if (this._maxDataSizeExceeded) { - return; - } - - if (this.dataSize <= this.maxDataSize) { - return; - } - - this._maxDataSizeExceeded = true; - var message = - 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.' - this.emit('error', new Error(message)); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json deleted file mode 100644 index 2ba5526d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "author": { - "name": "Felix Geisendörfer", - "email": "felix@debuggable.com", - "url": "http://debuggable.com/" - }, - "name": "delayed-stream", - "description": "Buffers events from a stream until you are ready to handle them.", - "version": "0.0.5", - "homepage": "https://github.com/felixge/node-delayed-stream", - "repository": { - "type": "git", - "url": "git://github.com/felixge/node-delayed-stream.git" - }, - "main": "./lib/delayed_stream", - "engines": { - "node": ">=0.4.0" - }, - "dependencies": {}, - "devDependencies": { - "fake": "0.2.0", - "far": "0.0.1" - }, - "readme": "# delayed-stream\n\nBuffers events from a stream until you are ready to handle them.\n\n## Installation\n\n``` bash\nnpm install delayed-stream\n```\n\n## Usage\n\nThe following example shows how to write a http echo server that delays its\nresponse by 1000 ms.\n\n``` javascript\nvar DelayedStream = require('delayed-stream');\nvar http = require('http');\n\nhttp.createServer(function(req, res) {\n var delayed = DelayedStream.create(req);\n\n setTimeout(function() {\n res.writeHead(200);\n delayed.pipe(res);\n }, 1000);\n});\n```\n\nIf you are not using `Stream#pipe`, you can also manually release the buffered\nevents by calling `delayedStream.resume()`:\n\n``` javascript\nvar delayed = DelayedStream.create(req);\n\nsetTimeout(function() {\n // Emit all buffered events and resume underlaying source\n delayed.resume();\n}, 1000);\n```\n\n## Implementation\n\nIn order to use this meta stream properly, here are a few things you should\nknow about the implementation.\n\n### Event Buffering / Proxying\n\nAll events of the `source` stream are hijacked by overwriting the `source.emit`\nmethod. Until node implements a catch-all event listener, this is the only way.\n\nHowever, delayed-stream still continues to emit all events it captures on the\n`source`, regardless of whether you have released the delayed stream yet or\nnot.\n\nUpon creation, delayed-stream captures all `source` events and stores them in\nan internal event buffer. Once `delayedStream.release()` is called, all\nbuffered events are emitted on the `delayedStream`, and the event buffer is\ncleared. After that, delayed-stream merely acts as a proxy for the underlaying\nsource.\n\n### Error handling\n\nError events on `source` are buffered / proxied just like any other events.\nHowever, `delayedStream.create` attaches a no-op `'error'` listener to the\n`source`. This way you only have to handle errors on the `delayedStream`\nobject, rather than in two places.\n\n### Buffer limits\n\ndelayed-stream provides a `maxDataSize` property that can be used to limit\nthe amount of data being buffered. In order to protect you from bad `source`\nstreams that don't react to `source.pause()`, this feature is enabled by\ndefault.\n\n## API\n\n### DelayedStream.create(source, [options])\n\nReturns a new `delayedStream`. Available options are:\n\n* `pauseStream`\n* `maxDataSize`\n\nThe description for those properties can be found below.\n\n### delayedStream.source\n\nThe `source` stream managed by this object. This is useful if you are\npassing your `delayedStream` around, and you still want to access properties\non the `source` object.\n\n### delayedStream.pauseStream = true\n\nWhether to pause the underlaying `source` when calling\n`DelayedStream.create()`. Modifying this property afterwards has no effect.\n\n### delayedStream.maxDataSize = 1024 * 1024\n\nThe amount of data to buffer before emitting an `error`.\n\nIf the underlaying source is emitting `Buffer` objects, the `maxDataSize`\nrefers to bytes.\n\nIf the underlaying source is emitting JavaScript strings, the size refers to\ncharacters.\n\nIf you know what you are doing, you can set this property to `Infinity` to\ndisable this feature. You can also modify this property during runtime.\n\n### delayedStream.maxDataSize = 1024 * 1024\n\nThe amount of data to buffer before emitting an `error`.\n\nIf the underlaying source is emitting `Buffer` objects, the `maxDataSize`\nrefers to bytes.\n\nIf the underlaying source is emitting JavaScript strings, the size refers to\ncharacters.\n\nIf you know what you are doing, you can set this property to `Infinity` to\ndisable this feature.\n\n### delayedStream.dataSize = 0\n\nThe amount of data buffered so far.\n\n### delayedStream.readable\n\nAn ECMA5 getter that returns the value of `source.readable`.\n\n### delayedStream.resume()\n\nIf the `delayedStream` has not been released so far, `delayedStream.release()`\nis called.\n\nIn either case, `source.resume()` is called.\n\n### delayedStream.pause()\n\nCalls `source.pause()`.\n\n### delayedStream.pipe(dest)\n\nCalls `delayedStream.resume()` and then proxies the arguments to `source.pipe`.\n\n### delayedStream.release()\n\nEmits and clears all events that have been buffered up so far. This does not\nresume the underlaying source, use `delayedStream.resume()` instead.\n\n## License\n\ndelayed-stream is licensed under the MIT license.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/felixge/node-delayed-stream/issues" - }, - "_id": "delayed-stream@0.0.5", - "dist": { - "shasum": "66839603c076296710bcc7f2e84ebd3348ae6343" - }, - "_from": "delayed-stream@0.0.5", - "_resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/common.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/common.js deleted file mode 100644 index 4d71b8a6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/common.js +++ /dev/null @@ -1,6 +0,0 @@ -var common = module.exports; - -common.DelayedStream = require('..'); -common.assert = require('assert'); -common.fake = require('fake'); -common.PORT = 49252; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js deleted file mode 100644 index 9ecad5b8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js +++ /dev/null @@ -1,38 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var DelayedStream = common.DelayedStream; -var http = require('http'); - -var UPLOAD = new Buffer(10 * 1024 * 1024); - -var server = http.createServer(function(req, res) { - var delayed = DelayedStream.create(req, {maxDataSize: UPLOAD.length}); - - setTimeout(function() { - res.writeHead(200); - delayed.pipe(res); - }, 10); -}); -server.listen(common.PORT, function() { - var request = http.request({ - method: 'POST', - port: common.PORT, - }); - - request.write(UPLOAD); - request.end(); - - request.on('response', function(res) { - var received = 0; - res - .on('data', function(chunk) { - received += chunk.length; - }) - .on('end', function() { - assert.equal(received, UPLOAD.length); - server.close(); - }); - }); -}); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js deleted file mode 100644 index 6f417f3e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js +++ /dev/null @@ -1,21 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var fake = common.fake.create(); -var DelayedStream = common.DelayedStream; -var Stream = require('stream').Stream; - -(function testAutoPause() { - var source = new Stream(); - - fake.expect(source, 'pause', 1); - var delayedStream = DelayedStream.create(source); - fake.verify(); -})(); - -(function testDisableAutoPause() { - var source = new Stream(); - fake.expect(source, 'pause', 0); - - var delayedStream = DelayedStream.create(source, {pauseStream: false}); - fake.verify(); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js deleted file mode 100644 index b50c3978..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js +++ /dev/null @@ -1,14 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var fake = common.fake.create(); -var DelayedStream = common.DelayedStream; -var Stream = require('stream').Stream; - -(function testDelayEventsUntilResume() { - var source = new Stream(); - var delayedStream = DelayedStream.create(source, {pauseStream: false}); - - fake.expect(source, 'pause'); - delayedStream.pause(); - fake.verify(); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream.js deleted file mode 100644 index fc4047e0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream.js +++ /dev/null @@ -1,48 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var fake = common.fake.create(); -var DelayedStream = common.DelayedStream; -var Stream = require('stream').Stream; - -(function testDelayEventsUntilResume() { - var source = new Stream(); - var delayedStream = DelayedStream.create(source, {pauseStream: false}); - - // delayedStream must not emit until we resume - fake.expect(delayedStream, 'emit', 0); - - // but our original source must emit - var params = []; - source.on('foo', function(param) { - params.push(param); - }); - - source.emit('foo', 1); - source.emit('foo', 2); - - // Make sure delayedStream did not emit, and source did - assert.deepEqual(params, [1, 2]); - fake.verify(); - - // After resume, delayedStream must playback all events - fake - .stub(delayedStream, 'emit') - .times(Infinity) - .withArg(1, 'newListener'); - fake.expect(delayedStream, 'emit', ['foo', 1]); - fake.expect(delayedStream, 'emit', ['foo', 2]); - fake.expect(source, 'resume'); - - delayedStream.resume(); - fake.verify(); - - // Calling resume again will delegate to source - fake.expect(source, 'resume'); - delayedStream.resume(); - fake.verify(); - - // Emitting more events directly leads to them being emitted - fake.expect(delayedStream, 'emit', ['foo', 3]); - source.emit('foo', 3); - fake.verify(); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-handle-source-errors.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-handle-source-errors.js deleted file mode 100644 index a9d35e72..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-handle-source-errors.js +++ /dev/null @@ -1,15 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var fake = common.fake.create(); -var DelayedStream = common.DelayedStream; -var Stream = require('stream').Stream; - -(function testHandleSourceErrors() { - var source = new Stream(); - var delayedStream = DelayedStream.create(source, {pauseStream: false}); - - // We deal with this by attaching a no-op listener to 'error' on the source - // when creating a new DelayedStream. This way error events on the source - // won't throw. - source.emit('error', new Error('something went wrong')); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-max-data-size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-max-data-size.js deleted file mode 100644 index 7638a2bf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-max-data-size.js +++ /dev/null @@ -1,18 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var fake = common.fake.create(); -var DelayedStream = common.DelayedStream; -var Stream = require('stream').Stream; - -(function testMaxDataSize() { - var source = new Stream(); - var delayedStream = DelayedStream.create(source, {maxDataSize: 1024, pauseStream: false}); - - source.emit('data', new Buffer(1024)); - - fake - .expect(delayedStream, 'emit') - .withArg(1, 'error'); - source.emit('data', new Buffer(1)); - fake.verify(); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-pipe-resumes.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-pipe-resumes.js deleted file mode 100644 index 7d312ab1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-pipe-resumes.js +++ /dev/null @@ -1,13 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var fake = common.fake.create(); -var DelayedStream = common.DelayedStream; -var Stream = require('stream').Stream; - -(function testPipeReleases() { - var source = new Stream(); - var delayedStream = DelayedStream.create(source, {pauseStream: false}); - - fake.expect(delayedStream, 'resume'); - delayedStream.pipe(new Stream()); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-proxy-readable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-proxy-readable.js deleted file mode 100644 index d436163b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-proxy-readable.js +++ /dev/null @@ -1,13 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var fake = common.fake.create(); -var DelayedStream = common.DelayedStream; -var Stream = require('stream').Stream; - -(function testProxyReadableProperty() { - var source = new Stream(); - var delayedStream = DelayedStream.create(source, {pauseStream: false}); - - source.readable = fake.value('source.readable'); - assert.strictEqual(delayedStream.readable, source.readable); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js deleted file mode 100755 index 0bb8e822..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -var far = require('far').create(); - -far.add(__dirname); -far.include(/test-.*\.js$/); - -far.execute(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json deleted file mode 100644 index ecc71ada..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": { - "name": "Felix Geisendörfer", - "email": "felix@debuggable.com", - "url": "http://debuggable.com/" - }, - "name": "combined-stream", - "description": "A stream that emits multiple other streams one after another.", - "version": "0.0.4", - "homepage": "https://github.com/felixge/node-combined-stream", - "repository": { - "type": "git", - "url": "git://github.com/felixge/node-combined-stream.git" - }, - "main": "./lib/combined_stream", - "engines": { - "node": "*" - }, - "dependencies": { - "delayed-stream": "0.0.5" - }, - "devDependencies": { - "far": "0.0.1" - }, - "readme": "# combined-stream\n\nA stream that emits multiple other streams one after another.\n\n## Installation\n\n``` bash\nnpm install combined-stream\n```\n\n## Usage\n\nHere is a simple example that shows how you can use combined-stream to combine\ntwo files into one:\n\n``` javascript\nvar CombinedStream = require('combined-stream');\nvar fs = require('fs');\n\nvar combinedStream = CombinedStream.create();\ncombinedStream.append(fs.createReadStream('file1.txt'));\ncombinedStream.append(fs.createReadStream('file2.txt'));\n\ncombinedStream.pipe(fs.createWriteStream('combined.txt'));\n```\n\nWhile the example above works great, it will pause all source streams until\nthey are needed. If you don't want that to happen, you can set `pauseStreams`\nto `false`:\n\n``` javascript\nvar CombinedStream = require('combined-stream');\nvar fs = require('fs');\n\nvar combinedStream = CombinedStream.create({pauseStreams: false});\ncombinedStream.append(fs.createReadStream('file1.txt'));\ncombinedStream.append(fs.createReadStream('file2.txt'));\n\ncombinedStream.pipe(fs.createWriteStream('combined.txt'));\n```\n\nHowever, what if you don't have all the source streams yet, or you don't want\nto allocate the resources (file descriptors, memory, etc.) for them right away?\nWell, in that case you can simply provide a callback that supplies the stream\nby calling a `next()` function:\n\n``` javascript\nvar CombinedStream = require('combined-stream');\nvar fs = require('fs');\n\nvar combinedStream = CombinedStream.create();\ncombinedStream.append(function(next) {\n next(fs.createReadStream('file1.txt'));\n});\ncombinedStream.append(function(next) {\n next(fs.createReadStream('file2.txt'));\n});\n\ncombinedStream.pipe(fs.createWriteStream('combined.txt'));\n```\n\n## API\n\n### CombinedStream.create([options])\n\nReturns a new combined stream object. Available options are:\n\n* `maxDataSize`\n* `pauseStreams`\n\nThe effect of those options is described below.\n\n### combinedStream.pauseStreams = true\n\nWhether to apply back pressure to the underlaying streams. If set to `false`,\nthe underlaying streams will never be paused. If set to `true`, the\nunderlaying streams will be paused right after being appended, as well as when\n`delayedStream.pipe()` wants to throttle.\n\n### combinedStream.maxDataSize = 2 * 1024 * 1024\n\nThe maximum amount of bytes (or characters) to buffer for all source streams.\nIf this value is exceeded, `combinedStream` emits an `'error'` event.\n\n### combinedStream.dataSize = 0\n\nThe amount of bytes (or characters) currently buffered by `combinedStream`.\n\n### combinedStream.append(stream)\n\nAppends the given `stream` to the combinedStream object. If `pauseStreams` is\nset to `true, this stream will also be paused right away.\n\n`streams` can also be a function that takes one parameter called `next`. `next`\nis a function that must be invoked in order to provide the `next` stream, see\nexample above.\n\nRegardless of how the `stream` is appended, combined-stream always attaches an\n`'error'` listener to it, so you don't have to do that manually.\n\nSpecial case: `stream` can also be a String or Buffer.\n\n### combinedStream.write(data)\n\nYou should not call this, `combinedStream` takes care of piping the appended\nstreams into itself for you.\n\n### combinedStream.resume()\n\nCauses `combinedStream` to start drain the streams it manages. The function is\nidempotent, and also emits a `'resume'` event each time which usually goes to\nthe stream that is currently being drained.\n\n### combinedStream.pause();\n\nIf `combinedStream.pauseStreams` is set to `false`, this does nothing.\nOtherwise a `'pause'` event is emitted, this goes to the stream that is\ncurrently being drained, so you can use it to apply back pressure.\n\n### combinedStream.end();\n\nSets `combinedStream.writable` to false, emits an `'end'` event, and removes\nall streams from the queue.\n\n### combinedStream.destroy();\n\nSame as `combinedStream.end()`, except it emits a `'close'` event instead of\n`'end'`.\n\n## License\n\ncombined-stream is licensed under the MIT license.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/felixge/node-combined-stream/issues" - }, - "_id": "combined-stream@0.0.4", - "dist": { - "shasum": "6562a96c9e6862c7a1349ac563047313599d0e86" - }, - "_from": "combined-stream@~0.0.4", - "_resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.4.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/common.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/common.js deleted file mode 100644 index 81543485..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/common.js +++ /dev/null @@ -1,23 +0,0 @@ -var common = module.exports; - -var path = require('path'); -var fs = require('fs'); -var root = path.join(__dirname, '..'); - -common.dir = { - fixture: root + '/test/fixture', - tmp: root + '/test/tmp', -}; - -// Create tmp directory if it does not exist -// Not using fs.exists so as to be node 0.6.x compatible -try { - fs.statSync(common.dir.tmp); -} -catch (e) { - // Dir does not exist - fs.mkdirSync(common.dir.tmp); -} - -common.CombinedStream = require(root); -common.assert = require('assert'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file1.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file1.txt deleted file mode 100644 index 50e0218d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file1.txt +++ /dev/null @@ -1,256 +0,0 @@ -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file2.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file2.txt deleted file mode 100644 index da1d821f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file2.txt +++ /dev/null @@ -1,256 +0,0 @@ -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-callback-streams.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-callback-streams.js deleted file mode 100644 index 44ecabab..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-callback-streams.js +++ /dev/null @@ -1,27 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var fs = require('fs'); - -var FILE1 = common.dir.fixture + '/file1.txt'; -var FILE2 = common.dir.fixture + '/file2.txt'; -var EXPECTED = fs.readFileSync(FILE1) + fs.readFileSync(FILE2); - -(function testDelayedStreams() { - var combinedStream = CombinedStream.create(); - combinedStream.append(function(next) { - next(fs.createReadStream(FILE1)); - }); - combinedStream.append(function(next) { - next(fs.createReadStream(FILE2)); - }); - - var tmpFile = common.dir.tmp + '/combined.txt'; - var dest = fs.createWriteStream(tmpFile); - combinedStream.pipe(dest); - - dest.on('end', function() { - var written = fs.readFileSync(tmpFile, 'utf8'); - assert.strictEqual(written, EXPECTED); - }); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-data-size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-data-size.js deleted file mode 100644 index e3fbd184..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-data-size.js +++ /dev/null @@ -1,34 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; - -(function testDataSizeGetter() { - var combinedStream = CombinedStream.create(); - - assert.strictEqual(combinedStream.dataSize, 0); - - // Test one stream - combinedStream._streams.push({dataSize: 10}); - combinedStream._updateDataSize(); - assert.strictEqual(combinedStream.dataSize, 10); - - // Test two streams - combinedStream._streams.push({dataSize: 23}); - combinedStream._updateDataSize(); - assert.strictEqual(combinedStream.dataSize, 33); - - // Test currentStream - combinedStream._currentStream = {dataSize: 20}; - combinedStream._updateDataSize(); - assert.strictEqual(combinedStream.dataSize, 53); - - // Test currentStream without dataSize - combinedStream._currentStream = {}; - combinedStream._updateDataSize(); - assert.strictEqual(combinedStream.dataSize, 33); - - // Test stream function - combinedStream._streams.push(function() {}); - combinedStream._updateDataSize(); - assert.strictEqual(combinedStream.dataSize, 33); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams-and-buffers-and-strings.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams-and-buffers-and-strings.js deleted file mode 100644 index c678575c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams-and-buffers-and-strings.js +++ /dev/null @@ -1,38 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var fs = require('fs'); - -var FILE1 = common.dir.fixture + '/file1.txt'; -var BUFFER = new Buffer('Bacon is delicious'); -var FILE2 = common.dir.fixture + '/file2.txt'; -var STRING = 'The € kicks the $\'s ass!'; - -var EXPECTED = - fs.readFileSync(FILE1) - + BUFFER - + fs.readFileSync(FILE2) - + STRING; -var GOT; - -(function testDelayedStreams() { - var combinedStream = CombinedStream.create(); - combinedStream.append(fs.createReadStream(FILE1)); - combinedStream.append(BUFFER); - combinedStream.append(fs.createReadStream(FILE2)); - combinedStream.append(function(next) { - next(STRING); - }); - - var tmpFile = common.dir.tmp + '/combined-file1-buffer-file2-string.txt'; - var dest = fs.createWriteStream(tmpFile); - combinedStream.pipe(dest); - - dest.on('close', function() { - GOT = fs.readFileSync(tmpFile, 'utf8'); - }); -})(); - -process.on('exit', function() { - assert.strictEqual(GOT, EXPECTED); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams.js deleted file mode 100644 index 263cfdf7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams.js +++ /dev/null @@ -1,35 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var fs = require('fs'); - -var FILE1 = common.dir.fixture + '/file1.txt'; -var FILE2 = common.dir.fixture + '/file2.txt'; -var EXPECTED = fs.readFileSync(FILE1) + fs.readFileSync(FILE2); -var GOT; - -(function testDelayedStreams() { - var combinedStream = CombinedStream.create(); - combinedStream.append(fs.createReadStream(FILE1)); - combinedStream.append(fs.createReadStream(FILE2)); - - var stream1 = combinedStream._streams[0]; - var stream2 = combinedStream._streams[1]; - - stream1.on('end', function() { - assert.equal(stream2.dataSize, 0); - }); - - var tmpFile = common.dir.tmp + '/combined.txt'; - var dest = fs.createWriteStream(tmpFile); - combinedStream.pipe(dest); - - dest.on('close', function() { - GOT = fs.readFileSync(tmpFile, 'utf8'); - }); -})(); - -process.on('exit', function() { - console.error(GOT.length, EXPECTED.length); - assert.strictEqual(GOT, EXPECTED); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-empty-string.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-empty-string.js deleted file mode 100644 index c3d288d0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-empty-string.js +++ /dev/null @@ -1,39 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var util = require('util'); -var Stream = require('stream').Stream; - -var s = CombinedStream.create(); - - -function StringStream(){ - this.writable=true; - this.str="" -} -util.inherits(StringStream,Stream); - -StringStream.prototype.write=function(chunk,encoding){ - this.str+=chunk.toString(); - this.emit('data',chunk); -} - -StringStream.prototype.end=function(chunk,encoding){ - this.emit('end'); -} - -StringStream.prototype.toString=function(){ - return this.str; -} - - -s.append("foo."); -s.append(""); -s.append("bar"); - -var ss = new StringStream(); - -s.pipe(ss); -s.resume(); - -assert.equal(ss.toString(),"foo.bar"); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-is-stream-like.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-is-stream-like.js deleted file mode 100644 index aefa36e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-is-stream-like.js +++ /dev/null @@ -1,17 +0,0 @@ -var fs = require('fs'); -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var FILE1 = common.dir.fixture + '/file1.txt'; -var fileStream = fs.createReadStream(FILE1); - -var foo = function(){}; - -(function testIsStreamLike() { - assert(! CombinedStream.isStreamLike(true)); - assert(! CombinedStream.isStreamLike("I am a string")); - assert(! CombinedStream.isStreamLike(7)); - assert(! CombinedStream.isStreamLike(foo)); - - assert(CombinedStream.isStreamLike(fileStream)); -})(); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-max-data-size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-max-data-size.js deleted file mode 100644 index 25f47a47..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-max-data-size.js +++ /dev/null @@ -1,24 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var fs = require('fs'); - -var FILE1 = common.dir.fixture + '/file1.txt'; -var FILE2 = common.dir.fixture + '/file2.txt'; -var EXPECTED = fs.readFileSync(FILE1) + fs.readFileSync(FILE2); - -(function testDelayedStreams() { - var combinedStream = CombinedStream.create({pauseStreams: false, maxDataSize: 20736}); - combinedStream.append(fs.createReadStream(FILE1)); - combinedStream.append(fs.createReadStream(FILE2)); - - var gotErr = null; - combinedStream.on('error', function(err) { - gotErr = err; - }); - - process.on('exit', function() { - assert.ok(gotErr); - assert.ok(gotErr.message.match(/bytes/)); - }); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-unpaused-streams.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-unpaused-streams.js deleted file mode 100644 index 30a3a6f8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-unpaused-streams.js +++ /dev/null @@ -1,30 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var fs = require('fs'); - -var FILE1 = common.dir.fixture + '/file1.txt'; -var FILE2 = common.dir.fixture + '/file2.txt'; -var EXPECTED = fs.readFileSync(FILE1) + fs.readFileSync(FILE2); - -(function testDelayedStreams() { - var combinedStream = CombinedStream.create({pauseStreams: false}); - combinedStream.append(fs.createReadStream(FILE1)); - combinedStream.append(fs.createReadStream(FILE2)); - - var stream1 = combinedStream._streams[0]; - var stream2 = combinedStream._streams[1]; - - stream1.on('end', function() { - assert.ok(stream2.dataSize > 0); - }); - - var tmpFile = common.dir.tmp + '/combined.txt'; - var dest = fs.createWriteStream(tmpFile); - combinedStream.pipe(dest); - - dest.on('end', function() { - var written = fs.readFileSync(tmpFile, 'utf8'); - assert.strictEqual(written, EXPECTED); - }); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/run.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/run.js deleted file mode 100755 index 0bb8e822..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/run.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -var far = require('far').create(); - -far.add(__dirname); -far.include(/test-.*\.js$/); - -far.execute(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/package.json deleted file mode 100644 index 5d424f23..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/form-data/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "author": { - "name": "Felix Geisendörfer", - "email": "felix@debuggable.com", - "url": "http://debuggable.com/" - }, - "name": "form-data", - "description": "A module to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.", - "version": "0.1.2", - "repository": { - "type": "git", - "url": "git://github.com/felixge/node-form-data.git" - }, - "main": "./lib/form_data", - "scripts": { - "test": "node test/run.js" - }, - "engines": { - "node": ">= 0.6" - }, - "dependencies": { - "combined-stream": "~0.0.4", - "mime": "~1.2.11", - "async": "~0.2.9" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://raw.github.com/felixge/node-form-data/master/License" - } - ], - "devDependencies": { - "fake": "~0.2.2", - "far": "~0.0.7", - "formidable": "~1.0.14", - "request": "~2.27.0" - }, - "readme": "# Form-Data [![Build Status](https://travis-ci.org/felixge/node-form-data.png?branch=master)](https://travis-ci.org/felixge/node-form-data) [![Dependency Status](https://gemnasium.com/felixge/node-form-data.png)](https://gemnasium.com/felixge/node-form-data)\n\nA module to create readable ```\"multipart/form-data\"``` streams. Can be used to submit forms and file uploads to other web applications.\n\nThe API of this module is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd].\n\n[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface\n[streams2-thing]: http://nodejs.org/api/stream.html#stream_compatibility_with_older_node_versions\n\n## Install\n\n```\nnpm install form-data\n```\n\n## Usage\n\nIn this example we are constructing a form with 3 fields that contain a string,\na buffer and a file stream.\n\n``` javascript\nvar FormData = require('form-data');\nvar fs = require('fs');\n\nvar form = new FormData();\nform.append('my_field', 'my value');\nform.append('my_buffer', new Buffer(10));\nform.append('my_file', fs.createReadStream('/foo/bar.jpg'));\n```\n\nAlso you can use http-response stream:\n\n``` javascript\nvar FormData = require('form-data');\nvar http = require('http');\n\nvar form = new FormData();\n\nhttp.request('http://nodejs.org/images/logo.png', function(response) {\n form.append('my_field', 'my value');\n form.append('my_buffer', new Buffer(10));\n form.append('my_logo', response);\n});\n```\n\nOr @mikeal's request stream:\n\n``` javascript\nvar FormData = require('form-data');\nvar request = require('request');\n\nvar form = new FormData();\n\nform.append('my_field', 'my value');\nform.append('my_buffer', new Buffer(10));\nform.append('my_logo', request('http://nodejs.org/images/logo.png'));\n```\n\nIn order to submit this form to a web application, call ```submit(url, [callback])``` method:\n\n``` javascript\nform.submit('http://example.org/', function(err, res) {\n // res – response object (http.IncomingMessage) //\n res.resume(); // for node-0.10.x\n});\n\n```\n\nFor more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods.\n\n### Alternative submission methods\n\nYou can use node's http client interface:\n\n``` javascript\nvar http = require('http');\n\nvar request = http.request({\n method: 'post',\n host: 'example.org',\n path: '/upload',\n headers: form.getHeaders()\n});\n\nform.pipe(request);\n\nrequest.on('response', function(res) {\n console.log(res.statusCode);\n});\n```\n\nOr if you would prefer the `'Content-Length'` header to be set for you:\n\n``` javascript\nform.submit('example.org/upload', function(err, res) {\n console.log(res.statusCode);\n});\n```\n\nTo use custom headers and pre-known length in parts:\n\n``` javascript\nvar CRLF = '\\r\\n';\nvar form = new FormData();\n\nvar options = {\n header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF,\n knownLength: 1\n};\n\nform.append('my_buffer', buffer, options);\n\nform.submit('http://example.com/', function(err, res) {\n if (err) throw err;\n console.log('Done');\n});\n```\n\nForm-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide \"file\"-related information manually:\n\n``` javascript\nsomeModule.stream(function(err, stdout, stderr) {\n if (err) throw err;\n\n var form = new FormData();\n\n form.append('file', stdout, {\n filename: 'unicycle.jpg',\n contentType: 'image/jpg',\n knownLength: 19806\n });\n\n form.submit('http://example.com/', function(err, res) {\n if (err) throw err;\n console.log('Done');\n });\n});\n```\n\nFor edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter:\n\n``` javascript\nform.submit({\n host: 'example.com',\n path: '/probably.php?extra=params',\n auth: 'username:password'\n}, function(err, res) {\n console.log(res.statusCode);\n});\n```\n\n## Notes\n\n- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround.\n- If it feels like FormData hangs after submit and you're on ```node-0.10```, please check [Compatibility with Older Node Versions][streams2-thing]\n\n## TODO\n\n- Add new streams (0.10) support and try really hard not to break it for 0.8.x.\n\n## License\n\nForm-Data is licensed under the MIT license.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/felixge/node-form-data/issues" - }, - "homepage": "https://github.com/felixge/node-form-data", - "_id": "form-data@0.1.2", - "dist": { - "shasum": "1143c21357911a78dd7913b189b4bab5d5d57445" - }, - "_from": "form-data@~0.1.0", - "_resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/.npmignore deleted file mode 100644 index 77ba16cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/.npmignore +++ /dev/null @@ -1,18 +0,0 @@ -.idea -*.iml -npm-debug.log -dump.rdb -node_modules -results.tap -results.xml -npm-shrinkwrap.json -config.json -.DS_Store -*/.DS_Store -*/*/.DS_Store -._* -*/._* -*/*/._* -coverage.* -lib-cov - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/.travis.yml deleted file mode 100755 index 047f7e3d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js - -node_js: - - 0.10 - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/LICENSE deleted file mode 100755 index e699a7bd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2012-2013, Eran Hammer. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Eran Hammer nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL ERAN HAMMER BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/Makefile deleted file mode 100755 index 5f339bf3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -test: - @node node_modules/lab/bin/lab -test-cov: - @node node_modules/lab/bin/lab -r threshold -t 100 -test-cov-html: - @node node_modules/lab/bin/lab -r html -o coverage.html -complexity: - @node node_modules/complexity-report/src/cli.js -o complexity.md -f markdown lib - -.PHONY: test test-cov test-cov-html complexity diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/README.md deleted file mode 100755 index 010bac6d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/README.md +++ /dev/null @@ -1,627 +0,0 @@ -![hawk Logo](https://raw.github.com/hueniverse/hawk/master/images/hawk.png) - -<img align="right" src="https://raw.github.com/hueniverse/hawk/master/images/logo.png" /> **Hawk** is an HTTP authentication scheme using a message authentication code (MAC) algorithm to provide partial -HTTP request cryptographic verification. For more complex use cases such as access delegation, see [Oz](https://github.com/hueniverse/oz). - -Current version: **1.0** - -[![Build Status](https://secure.travis-ci.org/hueniverse/hawk.png)](http://travis-ci.org/hueniverse/hawk) - -# Table of Content - -- [**Introduction**](#introduction) - - [Replay Protection](#replay-protection) - - [Usage Example](#usage-example) - - [Protocol Example](#protocol-example) - - [Payload Validation](#payload-validation) - - [Response Payload Validation](#response-payload-validation) - - [Browser Support and Considerations](#browser-support-and-considerations) -<p></p> -- [**Single URI Authorization**](#single-uri-authorization) - - [Usage Example](#bewit-usage-example) -<p></p> -- [**Security Considerations**](#security-considerations) - - [MAC Keys Transmission](#mac-keys-transmission) - - [Confidentiality of Requests](#confidentiality-of-requests) - - [Spoofing by Counterfeit Servers](#spoofing-by-counterfeit-servers) - - [Plaintext Storage of Credentials](#plaintext-storage-of-credentials) - - [Entropy of Keys](#entropy-of-keys) - - [Coverage Limitations](#coverage-limitations) - - [Future Time Manipulation](#future-time-manipulation) - - [Client Clock Poisoning](#client-clock-poisoning) - - [Bewit Limitations](#bewit-limitations) - - [Host Header Forgery](#host-header-forgery) -<p></p> -- [**Frequently Asked Questions**](#frequently-asked-questions) -<p></p> -- [**Acknowledgements**](#acknowledgements) - -# Introduction - -**Hawk** is an HTTP authentication scheme providing mechanisms for making authenticated HTTP requests with -partial cryptographic verification of the request and response, covering the HTTP method, request URI, host, -and optionally the request payload. - -Similar to the HTTP [Digest access authentication schemes](http://www.ietf.org/rfc/rfc2617.txt), **Hawk** uses a set of -client credentials which include an identifier (e.g. username) and key (e.g. password). Likewise, just as with the Digest scheme, -the key is never included in authenticated requests. Instead, it is used to calculate a request MAC value which is -included in its place. - -However, **Hawk** has several differences from Digest. In particular, while both use a nonce to limit the possibility of -replay attacks, in **Hawk** the client generates the nonce and uses it in combination with a timestamp, leading to less -"chattiness" (interaction with the server). - -Also unlike Digest, this scheme is not intended to protect the key itself (the password in Digest) because -the client and server must both have access to the key material in the clear. - -The primary design goals of this scheme are to: -* simplify and improve HTTP authentication for services that are unwilling or unable to deploy TLS for all resources, -* secure credentials against leakage (e.g., when the client uses some form of dynamic configuration to determine where - to send an authenticated request), and -* avoid the exposure of credentials sent to a malicious server over an unauthenticated secure channel due to client - failure to validate the server's identity as part of its TLS handshake. - -In addition, **Hawk** supports a method for granting third-parties temporary access to individual resources using -a query parameter called _bewit_ (in falconry, a leather strap used to attach a tracking device to the leg of a hawk). - -The **Hawk** scheme requires the establishment of a shared symmetric key between the client and the server, -which is beyond the scope of this module. Typically, the shared credentials are established via an initial -TLS-protected phase or derived from some other shared confidential information available to both the client -and the server. - - -## Replay Protection - -Without replay protection, an attacker can use a compromised (but otherwise valid and authenticated) request more -than once, gaining access to a protected resource. To mitigate this, clients include both a nonce and a timestamp when -making requests. This gives the server enough information to prevent replay attacks. - -The nonce is generated by the client, and is a string unique across all requests with the same timestamp and -key identifier combination. - -The timestamp enables the server to restrict the validity period of the credentials where requests occuring afterwards -are rejected. It also removes the need for the server to retain an unbounded number of nonce values for future checks. -By default, **Hawk** uses a time window of 1 minute to allow for time skew between the client and server (which in -practice translates to a maximum of 2 minutes as the skew can be positive or negative). - -Using a timestamp requires the client's clock to be in sync with the server's clock. **Hawk** requires both the client -clock and the server clock to use NTP to ensure synchronization. However, given the limitations of some client types -(e.g. browsers) to deploy NTP, the server provides the client with its current time (in seconds precision) in response -to a bad timestamp. - -There is no expectation that the client will adjust its system clock to match the server (in fact, this would be a -potential attack vector). Instead, the client only uses the server's time to calculate an offset used only -for communications with that particular server. The protocol rewards clients with synchronized clocks by reducing -the number of round trips required to authenticate the first request. - - -## Usage Example - -Server code: - -```javascript -var Http = require('http'); -var Hawk = require('hawk'); - - -// Credentials lookup function - -var credentialsFunc = function (id, callback) { - - var credentials = { - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'Steve' - }; - - return callback(null, credentials); -}; - -// Create HTTP server - -var handler = function (req, res) { - - // Authenticate incoming request - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - // Prepare response - - var payload = (!err ? 'Hello ' + credentials.user + ' ' + artifacts.ext : 'Shoosh!'); - var headers = { 'Content-Type': 'text/plain' }; - - // Generate Server-Authorization response header - - var header = Hawk.server.header(credentials, artifacts, { payload: payload, contentType: headers['Content-Type'] }); - headers['Server-Authorization'] = header; - - // Send the response back - - res.writeHead(!err ? 200 : 401, headers); - res.end(payload); - }); -}; - -// Start server - -Http.createServer(handler).listen(8000, 'example.com'); -``` - -Client code: - -```javascript -var Request = require('request'); -var Hawk = require('hawk'); - - -// Client credentials - -var credentials = { - id: 'dh37fgj492je', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256' -} - -// Request options - -var requestOptions = { - uri: 'http://example.com:8000/resource/1?b=1&a=2', - method: 'GET', - headers: {} -}; - -// Generate Authorization request header - -var header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'GET', { credentials: credentials, ext: 'some-app-data' }); -requestOptions.headers.Authorization = header.field; - -// Send authenticated request - -Request(requestOptions, function (error, response, body) { - - // Authenticate the server's response - - var isValid = Hawk.client.authenticate(response, credentials, header.artifacts, { payload: body }); - - // Output results - - console.log(response.statusCode + ': ' + body + (isValid ? ' (valid)' : ' (invalid)')); -}); -``` - -**Hawk** utilized the [**SNTP**](https://github.com/hueniverse/sntp) module for time sync management. By default, the local -machine time is used. To automatically retrieve and synchronice the clock within the application, use the SNTP 'start()' method. - -```javascript -Hawk.sntp.start(); -``` - - -## Protocol Example - -The client attempts to access a protected resource without authentication, sending the following HTTP request to -the resource server: - -``` -GET /resource/1?b=1&a=2 HTTP/1.1 -Host: example.com:8000 -``` - -The resource server returns an authentication challenge. - -``` -HTTP/1.1 401 Unauthorized -WWW-Authenticate: Hawk -``` - -The client has previously obtained a set of **Hawk** credentials for accessing resources on the "http://example.com/" -server. The **Hawk** credentials issued to the client include the following attributes: - -* Key identifier: dh37fgj492je -* Key: werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn -* Algorithm: sha256 - -The client generates the authentication header by calculating a timestamp (e.g. the number of seconds since January 1, -1970 00:00:00 GMT), generating a nonce, and constructing the normalized request string (each value followed by a newline -character): - -``` -hawk.1.header -1353832234 -j4h3g2 -GET -/resource/1?b=1&a=2 -example.com -8000 - -some-app-ext-data - -``` - -The request MAC is calculated using HMAC with the specified hash algorithm "sha256" and the key over the normalized request string. -The result is base64-encoded to produce the request MAC: - -``` -6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE= -``` - -The client includes the **Hawk** key identifier, timestamp, nonce, application specific data, and request MAC with the request using -the HTTP `Authorization` request header field: - -``` -GET /resource/1?b=1&a=2 HTTP/1.1 -Host: example.com:8000 -Authorization: Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", ext="some-app-ext-data", mac="6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE=" -``` - -The server validates the request by calculating the request MAC again based on the request received and verifies the validity -and scope of the **Hawk** credentials. If valid, the server responds with the requested resource. - - -### Payload Validation - -**Hawk** provides optional payload validation. When generating the authentication header, the client calculates a payload hash -using the specified hash algorithm. The hash is calculated over the concatenated value of (each followed by a newline character): -* `hawk.1.payload` -* the content-type in lowercase, without any parameters (e.g. `application/json`) -* the request payload prior to any content encoding (the exact representation requirements should be specified by the server for payloads other than simple single-part ascii to ensure interoperability) - -For example: - -* Payload: `Thank you for flying Hawk` -* Content Type: `text/plain` -* Hash (sha256): `Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=` - -Results in the following input to the payload hash function (newline terminated values): - -``` -hawk.1.payload -text/plain -Thank you for flying Hawk - -``` - -Which produces the following hash value: - -``` -Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY= -``` - -The client constructs the normalized request string (newline terminated values): - -``` -hawk.1.header -1353832234 -j4h3g2 -POST -/resource/1?a=1&b=2 -example.com -8000 -Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY= -some-app-ext-data - -``` - -Then calculates the request MAC and includes the **Hawk** key identifier, timestamp, nonce, payload hash, application specific data, -and request MAC, with the request using the HTTP `Authorization` request header field: - -``` -POST /resource/1?a=1&b=2 HTTP/1.1 -Host: example.com:8000 -Authorization: Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", hash="Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=", ext="some-app-ext-data", mac="aSe1DERmZuRl3pI36/9BdZmnErTw3sNzOOAUlfeKjVw=" -``` - -It is up to the server if and when it validates the payload for any given request, based solely on it's security policy -and the nature of the data included. - -If the payload is available at the time of authentication, the server uses the hash value provided by the client to construct -the normalized string and validates the MAC. If the MAC is valid, the server calculates the payload hash and compares the value -with the provided payload hash in the header. In many cases, checking the MAC first is faster than calculating the payload hash. - -However, if the payload is not available at authentication time (e.g. too large to fit in memory, streamed elsewhere, or processed -at a different stage in the application), the server may choose to defer payload validation for later by retaining the hash value -provided by the client after validating the MAC. - -It is important to note that MAC validation does not mean the hash value provided by the client is valid, only that the value -included in the header was not modified. Without calculating the payload hash on the server and comparing it to the value provided -by the client, the payload may be modified by an attacker. - - -## Response Payload Validation - -**Hawk** provides partial response payload validation. The server includes the `Server-Authorization` response header which enables the -client to authenticate the response and ensure it is talking to the right server. **Hawk** defines the HTTP `Server-Authorization` header -as a response header using the exact same syntax as the `Authorization` request header field. - -The header is contructed using the same process as the client's request header. The server uses the same credentials and other -artifacts provided by the client to constructs the normalized request string. The `ext` and `hash` values are replaced with -new values based on the server response. The rest as identical to those used by the client. - -The result MAC digest is included with the optional `hash` and `ext` values: - -``` -Server-Authorization: Hawk mac="XIJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific" -``` - - -## Browser Support and Considerations - -A browser script is provided for including using a `<script>` tag in [lib/browser.js](/lib/browser.js). - -**Hawk** relies on the _Server-Authorization_ and _WWW-Authenticate_ headers in its response to communicate with the client. -Therefore, in case of CORS requests, it is important to consider sending _Access-Control-Expose-Headers_ with the value -_"WWW-Authenticate, Server-Authorization"_ on each response from your server. As explained in the -[specifications](http://www.w3.org/TR/cors/#access-control-expose-headers-response-header), it will indicate that these headers -can safely be accessed by the client (using getResponseHeader() on the XmlHttpRequest object). Otherwise you will be met with a -["simple response header"](http://www.w3.org/TR/cors/#simple-response-header) which excludes these fields and would prevent the -Hawk client from authenticating the requests.You can read more about the why and how in this -[article](http://www.html5rocks.com/en/tutorials/cors/#toc-adding-cors-support-to-the-server) - - -# Single URI Authorization - -There are cases in which limited and short-term access to a protected resource is granted to a third party which does not -have access to the shared credentials. For example, displaying a protected image on a web page accessed by anyone. **Hawk** -provides limited support for such URIs in the form of a _bewit_ - a URI query parameter appended to the request URI which contains -the necessary credentials to authenticate the request. - -Because of the significant security risks involved in issuing such access, bewit usage is purposely limited only to GET requests -and for a finite period of time. Both the client and server can issue bewit credentials, however, the server should not use the same -credentials as the client to maintain clear traceability as to who issued which credentials. - -In order to simplify implementation, bewit credentials do not support single-use policy and can be replayed multiple times within -the granted access timeframe. - - -## Bewit Usage Example - -Server code: - -```javascript -var Http = require('http'); -var Hawk = require('hawk'); - - -// Credentials lookup function - -var credentialsFunc = function (id, callback) { - - var credentials = { - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256' - }; - - return callback(null, credentials); -}; - -// Create HTTP server - -var handler = function (req, res) { - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - res.writeHead(!err ? 200 : 401, { 'Content-Type': 'text/plain' }); - res.end(!err ? 'Access granted' : 'Shoosh!'); - }); -}; - -Http.createServer(handler).listen(8000, 'example.com'); -``` - -Bewit code generation: - -```javascript -var Request = require('request'); -var Hawk = require('hawk'); - - -// Client credentials - -var credentials = { - id: 'dh37fgj492je', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256' -} - -// Generate bewit - -var duration = 60 * 5; // 5 Minutes -var bewit = Hawk.uri.getBewit('http://example.com:8080/resource/1?b=1&a=2', { credentials: credentials, ttlSec: duration, ext: 'some-app-data' }); -var uri = 'http://example.com:8000/resource/1?b=1&a=2' + '&bewit=' + bewit; -``` - - -# Security Considerations - -The greatest sources of security risks are usually found not in **Hawk** but in the policies and procedures surrounding its use. -Implementers are strongly encouraged to assess how this module addresses their security requirements. This section includes -an incomplete list of security considerations that must be reviewed and understood before deploying **Hawk** on the server. -Many of the protections provided in **Hawk** depends on whether and how they are used. - -### MAC Keys Transmission - -**Hawk** does not provide any mechanism for obtaining or transmitting the set of shared credentials required. Any mechanism used -to obtain **Hawk** credentials must ensure that these transmissions are protected using transport-layer mechanisms such as TLS. - -### Confidentiality of Requests - -While **Hawk** provides a mechanism for verifying the integrity of HTTP requests, it provides no guarantee of request -confidentiality. Unless other precautions are taken, eavesdroppers will have full access to the request content. Servers should -carefully consider the types of data likely to be sent as part of such requests, and employ transport-layer security mechanisms -to protect sensitive resources. - -### Spoofing by Counterfeit Servers - -**Hawk** provides limited verification of the server authenticity. When receiving a response back from the server, the server -may choose to include a response `Server-Authorization` header which the client can use to verify the response. However, it is up to -the server to determine when such measure is included, to up to the client to enforce that policy. - -A hostile party could take advantage of this by intercepting the client's requests and returning misleading or otherwise -incorrect responses. Service providers should consider such attacks when developing services using this protocol, and should -require transport-layer security for any requests where the authenticity of the resource server or of server responses is an issue. - -### Plaintext Storage of Credentials - -The **Hawk** key functions the same way passwords do in traditional authentication systems. In order to compute the request MAC, -the server must have access to the key in plaintext form. This is in contrast, for example, to modern operating systems, which -store only a one-way hash of user credentials. - -If an attacker were to gain access to these keys - or worse, to the server's database of all such keys - he or she would be able -to perform any action on behalf of any resource owner. Accordingly, it is critical that servers protect these keys from unauthorized -access. - -### Entropy of Keys - -Unless a transport-layer security protocol is used, eavesdroppers will have full access to authenticated requests and request -MAC values, and will thus be able to mount offline brute-force attacks to recover the key used. Servers should be careful to -assign keys which are long enough, and random enough, to resist such attacks for at least the length of time that the **Hawk** -credentials are valid. - -For example, if the credentials are valid for two weeks, servers should ensure that it is not possible to mount a brute force -attack that recovers the key in less than two weeks. Of course, servers are urged to err on the side of caution, and use the -longest key reasonable. - -It is equally important that the pseudo-random number generator (PRNG) used to generate these keys be of sufficiently high -quality. Many PRNG implementations generate number sequences that may appear to be random, but which nevertheless exhibit -patterns or other weaknesses which make cryptanalysis or brute force attacks easier. Implementers should be careful to use -cryptographically secure PRNGs to avoid these problems. - -### Coverage Limitations - -The request MAC only covers the HTTP `Host` header and optionally the `Content-Type` header. It does not cover any other headers -which can often affect how the request body is interpreted by the server. If the server behavior is influenced by the presence -or value of such headers, an attacker can manipulate the request headers without being detected. Implementers should use the -`ext` feature to pass application-specific information via the `Authorization` header which is protected by the request MAC. - -The response authentication, when performed, only covers the response payload, content-type, and the request information -provided by the client in it's request (method, resource, timestamp, nonce, etc.). It does not cover the HTTP status code or -any other response header field (e.g. Location) which can affect the client's behaviour. - -### Future Time Manipulation - -The protocol relies on a clock sync between the client and server. To accomplish this, the server informs the client of its -current time when an invalid timestamp is received. - -If an attacker is able to manipulate this information and cause the client to use an incorrect time, it would be able to cause -the client to generate authenticated requests using time in the future. Such requests will fail when sent by the client, and will -not likely leave a trace on the server (given the common implementation of nonce, if at all enforced). The attacker will then -be able to replay the request at the correct time without detection. - -The client must only use the time information provided by the server if: -* it was delivered over a TLS connection and the server identity has been verified, or -* the `tsm` MAC digest calculated using the same client credentials over the timestamp has been verified. - -### Client Clock Poisoning - -When receiving a request with a bad timestamp, the server provides the client with its current time. The client must never use -the time received from the server to adjust its own clock, and must only use it to calculate an offset for communicating with -that particular server. - -### Bewit Limitations - -Special care must be taken when issuing bewit credentials to third parties. Bewit credentials are valid until expiration and cannot -be revoked or limited without using other means. Whatever resource they grant access to will be completely exposed to anyone with -access to the bewit credentials which act as bearer credentials for that particular resource. While bewit usage is limited to GET -requests only and therefore cannot be used to perform transactions or change server state, it can still be used to expose private -and sensitive information. - -### Host Header Forgery - -Hawk validates the incoming request MAC against the incoming HTTP Host header. However, unless the optional `host` and `port` -options are used with `server.authenticate()`, a malicous client can mint new host names pointing to the server's IP address and -use that to craft an attack by sending a valid request that's meant for another hostname than the one used by the server. Server -implementors must manually verify that the host header received matches their expectation (or use the options mentioned above). - -# Frequently Asked Questions - -### Where is the protocol specification? - -If you are looking for some prose explaining how all this works, **this is it**. **Hawk** is being developed as an open source -project instead of a standard. In other words, the [code](/hueniverse/hawk/tree/master/lib) is the specification. Not sure about -something? Open an issue! - -### Is it done? - -At if version 0.10.0, **Hawk** is feature-complete. However, until this module reaches version 1.0.0 it is considered experimental -and is likely to change. This also means your feedback and contribution are very welcome. Feel free to open issues with questions -and suggestions. - -### Where can I find **Hawk** implementations in other languages? - -**Hawk**'s only reference implementation is provided in JavaScript as a node.js module. However, others are actively porting it to other -platforms. There is already a [PHP](https://github.com/alexbilbie/PHP-Hawk), -[.NET](https://github.com/pcibraro/hawknet), and [JAVA](https://github.com/wealdtech/hawk) libraries available. The full list -is maintained [here](https://github.com/hueniverse/hawk/issues?labels=port). Please add an issue if you are working on another -port. A cross-platform test-suite is in the works. - -### Why isn't the algorithm part of the challenge or dynamically negotiated? - -The algorithm used is closely related to the key issued as different algorithms require different key sizes (and other -requirements). While some keys can be used for multiple algorithm, the protocol is designed to closely bind the key and algorithm -together as part of the issued credentials. - -### Why is Host and Content-Type the only headers covered by the request MAC? - -It is really hard to include other headers. Headers can be changed by proxies and other intermediaries and there is no -well-established way to normalize them. Many platforms change the case of header field names and values. The only -straight-forward solution is to include the headers in some blob (say, base64 encoded JSON) and include that with the request, -an approach taken by JWT and other such formats. However, that design violates the HTTP header boundaries, repeats information, -and introduces other security issues because firewalls will not be aware of these "hidden" headers. In addition, any information -repeated must be compared to the duplicated information in the header and therefore only moves the problem elsewhere. - -### Why not just use HTTP Digest? - -Digest requires pre-negotiation to establish a nonce. This means you can't just make a request - you must first send -a protocol handshake to the server. This pattern has become unacceptable for most web services, especially mobile -where extra round-trip are costly. - -### Why bother with all this nonce and timestamp business? - -**Hawk** is an attempt to find a reasonable, practical compromise between security and usability. OAuth 1.0 got timestamp -and nonces halfway right but failed when it came to scalability and consistent developer experience. **Hawk** addresses -it by requiring the client to sync its clock, but provides it with tools to accomplish it. - -In general, replay protection is a matter of application-specific threat model. It is less of an issue on a TLS-protected -system where the clients are implemented using best practices and are under the control of the server. Instead of dropping -replay protection, **Hawk** offers a required time window and an optional nonce verification. Together, it provides developers -with the ability to decide how to enforce their security policy without impacting the client's implementation. - -### What are `app` and `dlg` in the authorization header and normalized mac string? - -The original motivation for **Hawk** was to replace the OAuth 1.0 use cases. This included both a simple client-server mode which -this module is specifically designed for, and a delegated access mode which is being developed separately in -[Oz](https://github.com/hueniverse/oz). In addition to the **Hawk** use cases, Oz requires another attribute: the application id `app`. -This provides binding between the credentials and the application in a way that prevents an attacker from tricking an application -to use credentials issued to someone else. It also has an optional 'delegated-by' attribute `dlg` which is the application id of the -application the credentials were directly issued to. The goal of these two additions is to allow Oz to utilize **Hawk** directly, -but with the additional security of delegated credentials. - -### What is the purpose of the static strings used in each normalized MAC input? - -When calculating a hash or MAC, a static prefix (tag) is added. The prefix is used to prevent MAC values from being -used or reused for a purpose other than what they were created for (i.e. prevents switching MAC values between a request, -response, and a bewit use cases). It also protects against expliots created after a potential change in how the protocol -creates the normalized string. For example, if a future version would switch the order of nonce and timestamp, it -can create an exploit opportunity for cases where the nonce is similar in format to a timestamp. - -### Does **Hawk** have anything to do with OAuth? - -Short answer: no. - -**Hawk** was originally proposed as the OAuth MAC Token specification. However, the OAuth working group in its consistent -incompetence failed to produce a final, usable solution to address one of the most popular use cases of OAuth 1.0 - using it -to authenticate simple client-server transactions (i.e. two-legged). As you can guess, the OAuth working group is still hard -at work to produce more garbage. - -**Hawk** provides a simple HTTP authentication scheme for making client-server requests. It does not address the OAuth use case -of delegating access to a third party. If you are looking for an OAuth alternative, check out [Oz](https://github.com/hueniverse/oz). - - -# Acknowledgements - -**Hawk** is a derivative work of the [HTTP MAC Authentication Scheme](http://tools.ietf.org/html/draft-hammer-oauth-v2-mac-token-05) proposal -co-authored by Ben Adida, Adam Barth, and Eran Hammer, which in turn was based on the OAuth 1.0 community specification. - -Special thanks to Ben Laurie for his always insightful feedback and advice. - -The **Hawk** logo was created by [Chris Carrasco](http://chriscarrasco.com). diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/example/usage.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/example/usage.js deleted file mode 100755 index 8c063f6c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/example/usage.js +++ /dev/null @@ -1,78 +0,0 @@ -// Load modules - -var Http = require('http'); -var Request = require('request'); -var Hawk = require('../lib'); - - -// Declare internals - -var internals = { - credentials: { - dh37fgj492je: { - id: 'dh37fgj492je', // Required by Hawk.client.header - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'Steve' - } - } -}; - - -// Credentials lookup function - -var credentialsFunc = function (id, callback) { - - return callback(null, internals.credentials[id]); -}; - - -// Create HTTP server - -var handler = function (req, res) { - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - var payload = (!err ? 'Hello ' + credentials.user + ' ' + artifacts.ext : 'Shoosh!'); - var headers = { - 'Content-Type': 'text/plain', - 'Server-Authorization': Hawk.server.header(credentials, artifacts, { payload: payload, contentType: 'text/plain' }) - }; - - res.writeHead(!err ? 200 : 401, headers); - res.end(payload); - }); -}; - -Http.createServer(handler).listen(8000, '127.0.0.1'); - - -// Send unauthenticated request - -Request('http://127.0.0.1:8000/resource/1?b=1&a=2', function (error, response, body) { - - console.log(response.statusCode + ': ' + body); -}); - - -// Send authenticated request - -credentialsFunc('dh37fgj492je', function (err, credentials) { - - var header = Hawk.client.header('http://127.0.0.1:8000/resource/1?b=1&a=2', 'GET', { credentials: credentials, ext: 'and welcome!' }); - var options = { - uri: 'http://127.0.0.1:8000/resource/1?b=1&a=2', - method: 'GET', - headers: { - authorization: header.field - } - }; - - Request(options, function (error, response, body) { - - var isValid = Hawk.client.authenticate(response, credentials, header.artifacts, { payload: body }); - console.log(response.statusCode + ': ' + body + (isValid ? ' (valid)' : ' (invalid)')); - process.exit(0); - }); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/images/hawk.png b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/images/hawk.png deleted file mode 100755 index a0e15cda..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/images/hawk.png and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/images/logo.png b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/images/logo.png deleted file mode 100755 index b8ff5901..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/images/logo.png and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/index.js deleted file mode 100755 index 4cc88b35..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib'); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/browser.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/browser.js deleted file mode 100755 index 27494f23..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/browser.js +++ /dev/null @@ -1,485 +0,0 @@ -/* - HTTP Hawk Authentication Scheme - Copyright (c) 2012-2013, Eran Hammer <eran@hueniverse.com> - MIT Licensed -*/ - - -// Declare namespace - -var hawk = {}; - - -// Export if used as a module - -if (typeof module !== "undefined" && module.exports) { - module.exports = hawk; -} - -hawk.client = { - - // Generate an Authorization header for a given request - - /* - uri: 'http://example.com/resource?a=b' - method: HTTP verb (e.g. 'GET', 'POST') - options: { - - // Required - - credentials: { - id: 'dh37fgj492je', - key: 'aoijedoaijsdlaksjdl', - algorithm: 'sha256' // 'sha1', 'sha256' - }, - - // Optional - - ext: 'application-specific', // Application specific data sent via the ext attribute - timestamp: Date.now() / 1000, // A pre-calculated timestamp in seconds - nonce: '2334f34f', // A pre-generated nonce - localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided) - payload: '{"some":"payload"}', // UTF-8 encoded string for body hash generation (ignored if hash provided) - contentType: 'application/json', // Payload content-type (ignored if hash provided) - hash: 'U4MKKSmiVxk37JCCrAVIjV=', // Pre-calculated payload hash - app: '24s23423f34dx', // Oz application id - dlg: '234sz34tww3sd' // Oz delegated-by application id - } - */ - - header: function (uri, method, options) { - - var result = { - field: '', - artifacts: {} - }; - - // Validate inputs - - if (!uri || (typeof uri !== 'string' && typeof uri !== 'object') || - !method || typeof method !== 'string' || - !options || typeof options !== 'object') { - - return result; - } - - // Application time - - var timestamp = options.timestamp || Math.floor((hawk.utils.now() + (options.localtimeOffsetMsec || 0)) / 1000) - - // Validate credentials - - var credentials = options.credentials; - if (!credentials || - !credentials.id || - !credentials.key || - !credentials.algorithm) { - - // Invalid credential object - return result; - } - - if (hawk.crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return result; - } - - // Parse URI - - if (typeof uri === 'string') { - uri = hawk.utils.parseUri(uri); - } - - // Calculate signature - - var artifacts = { - ts: timestamp, - nonce: options.nonce || hawk.utils.randomString(6), - method: method, - resource: uri.relative, - host: uri.hostname, - port: uri.port, - hash: options.hash, - ext: options.ext, - app: options.app, - dlg: options.dlg - }; - - result.artifacts = artifacts; - - // Calculate payload hash - - if (!artifacts.hash && - options.hasOwnProperty('payload')) { - - artifacts.hash = hawk.crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType); - } - - var mac = hawk.crypto.calculateMac('header', credentials, artifacts); - - // Construct header - - var hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== ''; // Other falsey values allowed - var header = 'Hawk id="' + credentials.id + - '", ts="' + artifacts.ts + - '", nonce="' + artifacts.nonce + - (artifacts.hash ? '", hash="' + artifacts.hash : '') + - (hasExt ? '", ext="' + hawk.utils.escapeHeaderAttribute(artifacts.ext) : '') + - '", mac="' + mac + '"'; - - if (artifacts.app) { - header += ', app="' + artifacts.app + - (artifacts.dlg ? '", dlg="' + artifacts.dlg : '') + '"'; - } - - result.field = header; - - return result; - }, - - - // Validate server response - - /* - request: object created via 'new XMLHttpRequest()' after response received - artifacts: object recieved from header().artifacts - options: { - payload: optional payload received - required: specifies if a Server-Authorization header is required. Defaults to 'false' - } - */ - - authenticate: function (request, credentials, artifacts, options) { - - options = options || {}; - - if (request.getResponseHeader('www-authenticate')) { - - // Parse HTTP WWW-Authenticate header - - var attributes = hawk.utils.parseAuthorizationHeader(request.getResponseHeader('www-authenticate'), ['ts', 'tsm', 'error']); - if (!attributes) { - return false; - } - - if (attributes.ts) { - var tsm = hawk.crypto.calculateTsMac(attributes.ts, credentials); - if (tsm !== attributes.tsm) { - return false; - } - - hawk.utils.setNtpOffset(attributes.ts - Math.floor(Date.now() / 1000)); // Keep offset at 1 second precision - } - } - - // Parse HTTP Server-Authorization header - - if (!request.getResponseHeader('server-authorization') && - !options.required) { - - return true; - } - - var attributes = hawk.utils.parseAuthorizationHeader(request.getResponseHeader('server-authorization'), ['mac', 'ext', 'hash']); - if (!attributes) { - return false; - } - - var modArtifacts = { - ts: artifacts.ts, - nonce: artifacts.nonce, - method: artifacts.method, - resource: artifacts.resource, - host: artifacts.host, - port: artifacts.port, - hash: attributes.hash, - ext: attributes.ext, - app: artifacts.app, - dlg: artifacts.dlg - }; - - var mac = hawk.crypto.calculateMac('response', credentials, modArtifacts); - if (mac !== attributes.mac) { - return false; - } - - if (!options.hasOwnProperty('payload')) { - return true; - } - - if (!attributes.hash) { - return false; - } - - var calculatedHash = hawk.crypto.calculatePayloadHash(options.payload, credentials.algorithm, request.getResponseHeader('content-type')); - return (calculatedHash === attributes.hash); - }, - - message: function (host, port, message, options) { - - // Validate inputs - - if (!host || typeof host !== 'string' || - !port || typeof port !== 'number' || - message === null || message === undefined || typeof message !== 'string' || - !options || typeof options !== 'object') { - - return null; - } - - // Application time - - var timestamp = options.timestamp || Math.floor((hawk.utils.now() + (options.localtimeOffsetMsec || 0)) / 1000) - - // Validate credentials - - var credentials = options.credentials; - if (!credentials || - !credentials.id || - !credentials.key || - !credentials.algorithm) { - - // Invalid credential object - return null; - } - - if (hawk.crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return null; - } - - // Calculate signature - - var artifacts = { - ts: timestamp, - nonce: options.nonce || hawk.utils.randomString(6), - host: host, - port: port, - hash: hawk.crypto.calculatePayloadHash(message, credentials.algorithm) - }; - - // Construct authorization - - var result = { - id: credentials.id, - ts: artifacts.ts, - nonce: artifacts.nonce, - hash: artifacts.hash, - mac: hawk.crypto.calculateMac('message', credentials, artifacts) - }; - - return result; - } -}; - - -hawk.crypto = { - - headerVersion: '1', - - algorithms: ['sha1', 'sha256'], - - calculateMac: function (type, credentials, options) { - - var normalized = hawk.crypto.generateNormalizedString(type, options); - - var hmac = CryptoJS['Hmac' + credentials.algorithm.toUpperCase()](normalized, credentials.key); - return hmac.toString(CryptoJS.enc.Base64); - }, - - generateNormalizedString: function (type, options) { - - var normalized = 'hawk.' + hawk.crypto.headerVersion + '.' + type + '\n' + - options.ts + '\n' + - options.nonce + '\n' + - (options.method || '').toUpperCase() + '\n' + - (options.resource || '') + '\n' + - options.host.toLowerCase() + '\n' + - options.port + '\n' + - (options.hash || '') + '\n'; - - if (options.ext) { - normalized += options.ext.replace('\\', '\\\\').replace('\n', '\\n'); - } - - normalized += '\n'; - - if (options.app) { - normalized += options.app + '\n' + - (options.dlg || '') + '\n'; - } - - return normalized; - }, - - calculatePayloadHash: function (payload, algorithm, contentType) { - - var hash = CryptoJS.algo[algorithm.toUpperCase()].create(); - hash.update('hawk.' + hawk.crypto.headerVersion + '.payload\n'); - hash.update(hawk.utils.parseContentType(contentType) + '\n'); - hash.update(payload || ''); - hash.update('\n'); - return hash.finalize().toString(CryptoJS.enc.Base64); - }, - - calculateTsMac: function (ts, credentials) { - - var hash = CryptoJS['Hmac' + credentials.algorithm.toUpperCase()]('hawk.' + hawk.crypto.headerVersion + '.ts\n' + ts + '\n', credentials.key); - return hash.toString(CryptoJS.enc.Base64); - } -}; - - -hawk.utils = { - - storage: { // localStorage compatible interface - _cache: {}, - setItem: function (key, value) { - - hawk.utils.storage._cache[key] = value; - }, - getItem: function (key) { - - return hawk.utils.storage._cache[key]; - } - }, - - setStorage: function (storage) { - - var ntpOffset = hawk.utils.getNtpOffset() || 0; - hawk.utils.storage = storage; - hawk.utils.setNtpOffset(ntpOffset); - }, - - setNtpOffset: function (offset) { - - hawk.utils.storage.setItem('hawk_ntp_offset', offset); - }, - - getNtpOffset: function () { - - return parseInt(hawk.utils.storage.getItem('hawk_ntp_offset') || '0', 10); - }, - - now: function () { - - return Date.now() + hawk.utils.getNtpOffset(); - }, - - escapeHeaderAttribute: function (attribute) { - - return attribute.replace(/\\/g, '\\\\').replace(/\"/g, '\\"'); - }, - - parseContentType: function (header) { - - if (!header) { - return ''; - } - - return header.split(';')[0].trim().toLowerCase(); - }, - - parseAuthorizationHeader: function (header, keys) { - - if (!header) { - return null; - } - - var headerParts = header.match(/^(\w+)(?:\s+(.*))?$/); // Header: scheme[ something] - if (!headerParts) { - return null; - } - - var scheme = headerParts[1]; - if (scheme.toLowerCase() !== 'hawk') { - return null; - } - - var attributesString = headerParts[2]; - if (!attributesString) { - return null; - } - - var attributes = {}; - var verify = attributesString.replace(/(\w+)="([^"\\]*)"\s*(?:,\s*|$)/g, function ($0, $1, $2) { - - // Check valid attribute names - - if (keys.indexOf($1) === -1) { - return; - } - - // Allowed attribute value characters: !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9 - - if ($2.match(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~]+$/) === null) { - return; - } - - // Check for duplicates - - if (attributes.hasOwnProperty($1)) { - return; - } - - attributes[$1] = $2; - return ''; - }); - - if (verify !== '') { - return null; - } - - return attributes; - }, - - randomString: function (size) { - - var randomSource = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; - var len = randomSource.length; - - var result = []; - for (var i = 0; i < size; ++i) { - result[i] = randomSource[Math.floor(Math.random() * len)]; - } - - return result.join(''); - }, - - parseUri: function (input) { - - // Based on: parseURI 1.2.2 - // http://blog.stevenlevithan.com/archives/parseuri - // (c) Steven Levithan <stevenlevithan.com> - // MIT License - - var keys = ['source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'hostname', 'port', 'resource', 'relative', 'pathname', 'directory', 'file', 'query', 'fragment']; - - var uriRegex = /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?(((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?)(?:#(.*))?)/; - var uriByNumber = uriRegex.exec(input); - var uri = {}; - - var i = 15; - while (i--) { - uri[keys[i]] = uriByNumber[i] || ''; - } - - if (uri.port === null || - uri.port === '') { - - uri.port = (uri.protocol.toLowerCase() === 'http' ? '80' : (uri.protocol.toLowerCase() === 'https' ? '443' : '')); - } - - return uri; - } -}; - - -// Based on: Crypto-JS v3.1.2 -// Copyright (c) 2009-2013, Jeff Mott. All rights reserved. -// http://code.google.com/p/crypto-js/ -// http://code.google.com/p/crypto-js/wiki/License - -var CryptoJS=CryptoJS||function(h,r){var k={},l=k.lib={},n=function(){},f=l.Base={extend:function(a){n.prototype=this;var b=new n;a&&b.mixIn(a);b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)});b.init.prototype=b;b.$super=this;return b},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},j=l.WordArray=f.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=r?b:4*a.length},toString:function(a){return(a||s).stringify(this)},concat:function(a){var b=this.words,d=a.words,c=this.sigBytes;a=a.sigBytes;this.clamp();if(c%4)for(var e=0;e<a;e++)b[c+e>>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((c+e)%4);else if(65535<d.length)for(e=0;e<a;e+=4)b[c+e>>>2]=d[e>>>2];else b.push.apply(b,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<<32-8*(b%4);a.length=h.ceil(b/4)},clone:function(){var a=f.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],d=0;d<a;d+=4)b.push(4294967296*h.random()|0);return new j.init(b,a)}}),m=k.enc={},s=m.Hex={stringify:function(a){var b=a.words;a=a.sigBytes;for(var d=[],c=0;c<a;c++){var e=b[c>>>2]>>>24-8*(c%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c<b;c+=2)d[c>>>3]|=parseInt(a.substr(c,2),16)<<24-4*(c%8);return new j.init(d,b/2)}},p=m.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var d=[],c=0;c<a;c++)d.push(String.fromCharCode(b[c>>>2]>>>24-8*(c%4)&255));return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c<b;c++)d[c>>>2]|=(a.charCodeAt(c)&255)<<24-8*(c%4);return new j.init(d,b)}},t=m.Utf8={stringify:function(a){try{return decodeURIComponent(escape(p.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return p.parse(unescape(encodeURIComponent(a)))}},q=l.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new j.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=t.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,d=b.words,c=b.sigBytes,e=this.blockSize,f=c/(4*e),f=a?h.ceil(f):h.max((f|0)-this._minBufferSize,0);a=f*e;c=h.min(4*a,c);if(a){for(var g=0;g<a;g+=e)this._doProcessBlock(d,g);g=d.splice(0,a);b.sigBytes-=c}return new j.init(g,c)},clone:function(){var a=f.clone.call(this);a._data=this._data.clone();return a},_minBufferSize:0});l.Hasher=q.extend({cfg:f.extend(),init:function(a){this.cfg=this.cfg.extend(a);this.reset()},reset:function(){q.reset.call(this);this._doReset()},update:function(a){this._append(a);this._process();return this},finalize:function(a){a&&this._append(a);return this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,d){return(new a.init(d)).finalize(b)}},_createHmacHelper:function(a){return function(b,d){return(new u.HMAC.init(a,d)).finalize(b)}}});var u=k.algo={};return k}(Math); -(function () { var k = CryptoJS, b = k.lib, m = b.WordArray, l = b.Hasher, d = [], b = k.algo.SHA1 = l.extend({ _doReset: function () { this._hash = new m.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (n, p) { for (var a = this._hash.words, e = a[0], f = a[1], h = a[2], j = a[3], b = a[4], c = 0; 80 > c; c++) { if (16 > c) d[c] = n[p + c] | 0; else { var g = d[c - 3] ^ d[c - 8] ^ d[c - 14] ^ d[c - 16]; d[c] = g << 1 | g >>> 31 } g = (e << 5 | e >>> 27) + b + d[c]; g = 20 > c ? g + ((f & h | ~f & j) + 1518500249) : 40 > c ? g + ((f ^ h ^ j) + 1859775393) : 60 > c ? g + ((f & h | f & j | h & j) - 1894007588) : g + ((f ^ h ^ j) - 899497514); b = j; j = h; h = f << 30 | f >>> 2; f = e; e = g } a[0] = a[0] + e | 0; a[1] = a[1] + f | 0; a[2] = a[2] + h | 0; a[3] = a[3] + j | 0; a[4] = a[4] + b | 0 }, _doFinalize: function () { var b = this._data, d = b.words, a = 8 * this._nDataBytes, e = 8 * b.sigBytes; d[e >>> 5] |= 128 << 24 - e % 32; d[(e + 64 >>> 9 << 4) + 14] = Math.floor(a / 4294967296); d[(e + 64 >>> 9 << 4) + 15] = a; b.sigBytes = 4 * d.length; this._process(); return this._hash }, clone: function () { var b = l.clone.call(this); b._hash = this._hash.clone(); return b } }); k.SHA1 = l._createHelper(b); k.HmacSHA1 = l._createHmacHelper(b) })(); -(function (k) { for (var g = CryptoJS, h = g.lib, v = h.WordArray, j = h.Hasher, h = g.algo, s = [], t = [], u = function (q) { return 4294967296 * (q - (q | 0)) | 0 }, l = 2, b = 0; 64 > b;) { var d; a: { d = l; for (var w = k.sqrt(d), r = 2; r <= w; r++) if (!(d % r)) { d = !1; break a } d = !0 } d && (8 > b && (s[b] = u(k.pow(l, 0.5))), t[b] = u(k.pow(l, 1 / 3)), b++); l++ } var n = [], h = h.SHA256 = j.extend({ _doReset: function () { this._hash = new v.init(s.slice(0)) }, _doProcessBlock: function (q, h) { for (var a = this._hash.words, c = a[0], d = a[1], b = a[2], k = a[3], f = a[4], g = a[5], j = a[6], l = a[7], e = 0; 64 > e; e++) { if (16 > e) n[e] = q[h + e] | 0; else { var m = n[e - 15], p = n[e - 2]; n[e] = ((m << 25 | m >>> 7) ^ (m << 14 | m >>> 18) ^ m >>> 3) + n[e - 7] + ((p << 15 | p >>> 17) ^ (p << 13 | p >>> 19) ^ p >>> 10) + n[e - 16] } m = l + ((f << 26 | f >>> 6) ^ (f << 21 | f >>> 11) ^ (f << 7 | f >>> 25)) + (f & g ^ ~f & j) + t[e] + n[e]; p = ((c << 30 | c >>> 2) ^ (c << 19 | c >>> 13) ^ (c << 10 | c >>> 22)) + (c & d ^ c & b ^ d & b); l = j; j = g; g = f; f = k + m | 0; k = b; b = d; d = c; c = m + p | 0 } a[0] = a[0] + c | 0; a[1] = a[1] + d | 0; a[2] = a[2] + b | 0; a[3] = a[3] + k | 0; a[4] = a[4] + f | 0; a[5] = a[5] + g | 0; a[6] = a[6] + j | 0; a[7] = a[7] + l | 0 }, _doFinalize: function () { var d = this._data, b = d.words, a = 8 * this._nDataBytes, c = 8 * d.sigBytes; b[c >>> 5] |= 128 << 24 - c % 32; b[(c + 64 >>> 9 << 4) + 14] = k.floor(a / 4294967296); b[(c + 64 >>> 9 << 4) + 15] = a; d.sigBytes = 4 * b.length; this._process(); return this._hash }, clone: function () { var b = j.clone.call(this); b._hash = this._hash.clone(); return b } }); g.SHA256 = j._createHelper(h); g.HmacSHA256 = j._createHmacHelper(h) })(Math); -(function(){var c=CryptoJS,k=c.enc.Utf8;c.algo.HMAC=c.lib.Base.extend({init:function(a,b){a=this._hasher=new a.init;"string"==typeof b&&(b=k.parse(b));var c=a.blockSize,e=4*c;b.sigBytes>e&&(b=a.finalize(b));b.clamp();for(var f=this._oKey=b.clone(),g=this._iKey=b.clone(),h=f.words,j=g.words,d=0;d<c;d++)h[d]^=1549556828,j[d]^=909522486;f.sigBytes=g.sigBytes=e;this.reset()},reset:function(){var a=this._hasher;a.reset();a.update(this._iKey)},update:function(a){this._hasher.update(a);return this},finalize:function(a){var b=this._hasher;a=b.finalize(a);b.reset();return b.finalize(this._oKey.clone().concat(a))}})})(); -(function(){var h=CryptoJS,j=h.lib.WordArray;h.enc.Base64={stringify:function(b){var e=b.words,f=b.sigBytes,c=this._map;b.clamp();b=[];for(var a=0;a<f;a+=3)for(var d=(e[a>>>2]>>>24-8*(a%4)&255)<<16|(e[a+1>>>2]>>>24-8*((a+1)%4)&255)<<8|e[a+2>>>2]>>>24-8*((a+2)%4)&255,g=0;4>g&&a+0.75*g<f;g++)b.push(c.charAt(d>>>6*(3-g)&63));if(e=c.charAt(64))for(;b.length%4;)b.push(e);return b.join("")},parse:function(b){var e=b.length,f=this._map,c=f.charAt(64);c&&(c=b.indexOf(c),-1!=c&&(e=c));for(var c=[],a=0,d=0;d<e;d++)if(d%4){var g=f.indexOf(b.charAt(d-1))<<2*(d%4),h=f.indexOf(b.charAt(d))>>>6-2*(d%4);c[a>>>2]|=(g|h)<<24-8*(a%4);a++}return j.create(c,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/client.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/client.js deleted file mode 100755 index 41984582..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/client.js +++ /dev/null @@ -1,367 +0,0 @@ -// Load modules - -var Url = require('url'); -var Hoek = require('hoek'); -var Cryptiles = require('cryptiles'); -var Crypto = require('./crypto'); -var Utils = require('./utils'); - - -// Declare internals - -var internals = {}; - - -// Generate an Authorization header for a given request - -/* - uri: 'http://example.com/resource?a=b' or object from Url.parse() - method: HTTP verb (e.g. 'GET', 'POST') - options: { - - // Required - - credentials: { - id: 'dh37fgj492je', - key: 'aoijedoaijsdlaksjdl', - algorithm: 'sha256' // 'sha1', 'sha256' - }, - - // Optional - - ext: 'application-specific', // Application specific data sent via the ext attribute - timestamp: Date.now(), // A pre-calculated timestamp - nonce: '2334f34f', // A pre-generated nonce - localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided) - payload: '{"some":"payload"}', // UTF-8 encoded string for body hash generation (ignored if hash provided) - contentType: 'application/json', // Payload content-type (ignored if hash provided) - hash: 'U4MKKSmiVxk37JCCrAVIjV=', // Pre-calculated payload hash - app: '24s23423f34dx', // Oz application id - dlg: '234sz34tww3sd' // Oz delegated-by application id - } -*/ - -exports.header = function (uri, method, options) { - - var result = { - field: '', - artifacts: {} - }; - - // Validate inputs - - if (!uri || (typeof uri !== 'string' && typeof uri !== 'object') || - !method || typeof method !== 'string' || - !options || typeof options !== 'object') { - - return result; - } - - // Application time - - var timestamp = options.timestamp || Math.floor((Utils.now() + (options.localtimeOffsetMsec || 0)) / 1000) - - // Validate credentials - - var credentials = options.credentials; - if (!credentials || - !credentials.id || - !credentials.key || - !credentials.algorithm) { - - // Invalid credential object - return result; - } - - if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return result; - } - - // Parse URI - - if (typeof uri === 'string') { - uri = Url.parse(uri); - } - - // Calculate signature - - var artifacts = { - ts: timestamp, - nonce: options.nonce || Cryptiles.randomString(6), - method: method, - resource: uri.pathname + (uri.search || ''), // Maintain trailing '?' - host: uri.hostname, - port: uri.port || (uri.protocol === 'http:' ? 80 : 443), - hash: options.hash, - ext: options.ext, - app: options.app, - dlg: options.dlg - }; - - result.artifacts = artifacts; - - // Calculate payload hash - - if (!artifacts.hash && - options.hasOwnProperty('payload')) { - - artifacts.hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType); - } - - var mac = Crypto.calculateMac('header', credentials, artifacts); - - // Construct header - - var hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== ''; // Other falsey values allowed - var header = 'Hawk id="' + credentials.id + - '", ts="' + artifacts.ts + - '", nonce="' + artifacts.nonce + - (artifacts.hash ? '", hash="' + artifacts.hash : '') + - (hasExt ? '", ext="' + Utils.escapeHeaderAttribute(artifacts.ext) : '') + - '", mac="' + mac + '"'; - - if (artifacts.app) { - header += ', app="' + artifacts.app + - (artifacts.dlg ? '", dlg="' + artifacts.dlg : '') + '"'; - } - - result.field = header; - - return result; -}; - - -// Validate server response - -/* - res: node's response object - artifacts: object recieved from header().artifacts - options: { - payload: optional payload received - required: specifies if a Server-Authorization header is required. Defaults to 'false' - } -*/ - -exports.authenticate = function (res, credentials, artifacts, options) { - - artifacts = Hoek.clone(artifacts); - options = options || {}; - - if (res.headers['www-authenticate']) { - - // Parse HTTP WWW-Authenticate header - - var attributes = Utils.parseAuthorizationHeader(res.headers['www-authenticate'], ['ts', 'tsm', 'error']); - if (attributes instanceof Error) { - return false; - } - - if (attributes.ts) { - var tsm = Crypto.calculateTsMac(attributes.ts, credentials); - if (tsm !== attributes.tsm) { - return false; - } - } - } - - // Parse HTTP Server-Authorization header - - if (!res.headers['server-authorization'] && - !options.required) { - - return true; - } - - var attributes = Utils.parseAuthorizationHeader(res.headers['server-authorization'], ['mac', 'ext', 'hash']); - if (attributes instanceof Error) { - return false; - } - - artifacts.ext = attributes.ext; - artifacts.hash = attributes.hash; - - var mac = Crypto.calculateMac('response', credentials, artifacts); - if (mac !== attributes.mac) { - return false; - } - - if (!options.hasOwnProperty('payload')) { - return true; - } - - if (!attributes.hash) { - return false; - } - - var calculatedHash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, res.headers['content-type']); - return (calculatedHash === attributes.hash); -}; - - -// Generate a bewit value for a given URI - -/* - * credentials is an object with the following keys: 'id, 'key', 'algorithm'. - * options is an object with the following optional keys: 'ext', 'localtimeOffsetMsec' - */ -/* - uri: 'http://example.com/resource?a=b' or object from Url.parse() - options: { - - // Required - - credentials: { - id: 'dh37fgj492je', - key: 'aoijedoaijsdlaksjdl', - algorithm: 'sha256' // 'sha1', 'sha256' - }, - ttlSec: 60 * 60, // TTL in seconds - - // Optional - - ext: 'application-specific', // Application specific data sent via the ext attribute - localtimeOffsetMsec: 400 // Time offset to sync with server time - }; -*/ - -exports.getBewit = function (uri, options) { - - // Validate inputs - - if (!uri || - (typeof uri !== 'string' && typeof uri !== 'object') || - !options || - typeof options !== 'object' || - !options.ttlSec) { - - return ''; - } - - options.ext = (options.ext === null || options.ext === undefined ? '' : options.ext); // Zero is valid value - - // Application time - - var now = Utils.now() + (options.localtimeOffsetMsec || 0); - - // Validate credentials - - var credentials = options.credentials; - if (!credentials || - !credentials.id || - !credentials.key || - !credentials.algorithm) { - - return ''; - } - - if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return ''; - } - - // Parse URI - - if (typeof uri === 'string') { - uri = Url.parse(uri); - } - - // Calculate signature - - var exp = Math.floor(now / 1000) + options.ttlSec; - var mac = Crypto.calculateMac('bewit', credentials, { - ts: exp, - nonce: '', - method: 'GET', - resource: uri.pathname + (uri.search || ''), // Maintain trailing '?' - host: uri.hostname, - port: uri.port || (uri.protocol === 'http:' ? 80 : 443), - ext: options.ext - }); - - // Construct bewit: id\exp\mac\ext - - var bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + options.ext; - return Utils.base64urlEncode(bewit); -}; - - -// Generate an authorization string for a message - -/* - host: 'example.com', - port: 8000, - message: '{"some":"payload"}', // UTF-8 encoded string for body hash generation - options: { - - // Required - - credentials: { - id: 'dh37fgj492je', - key: 'aoijedoaijsdlaksjdl', - algorithm: 'sha256' // 'sha1', 'sha256' - }, - - // Optional - - timestamp: Date.now(), // A pre-calculated timestamp - nonce: '2334f34f', // A pre-generated nonce - localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided) - } -*/ - -exports.message = function (host, port, message, options) { - - // Validate inputs - - if (!host || typeof host !== 'string' || - !port || typeof port !== 'number' || - message === null || message === undefined || typeof message !== 'string' || - !options || typeof options !== 'object') { - - return null; - } - - // Application time - - var timestamp = options.timestamp || Math.floor((Utils.now() + (options.localtimeOffsetMsec || 0)) / 1000) - - // Validate credentials - - var credentials = options.credentials; - if (!credentials || - !credentials.id || - !credentials.key || - !credentials.algorithm) { - - // Invalid credential object - return null; - } - - if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return null; - } - - // Calculate signature - - var artifacts = { - ts: timestamp, - nonce: options.nonce || Cryptiles.randomString(6), - host: host, - port: port, - hash: Crypto.calculatePayloadHash(message, credentials.algorithm) - }; - - // Construct authorization - - var result = { - id: credentials.id, - ts: artifacts.ts, - nonce: artifacts.nonce, - hash: artifacts.hash, - mac: Crypto.calculateMac('message', credentials, artifacts) - }; - - return result; -}; - - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/crypto.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/crypto.js deleted file mode 100755 index 150340a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/crypto.js +++ /dev/null @@ -1,111 +0,0 @@ -// Load modules - -var Crypto = require('crypto'); -var Url = require('url'); -var Utils = require('./utils'); - - -// Declare internals - -var internals = {}; - - -// MAC normalization format version - -exports.headerVersion = '1'; // Prevent comparison of mac values generated with different normalized string formats - - -// Supported HMAC algorithms - -exports.algorithms = ['sha1', 'sha256']; - - -// Calculate the request MAC - -/* - type: 'header', // 'header', 'bewit', 'response' - credentials: { - key: 'aoijedoaijsdlaksjdl', - algorithm: 'sha256' // 'sha1', 'sha256' - }, - options: { - method: 'GET', - resource: '/resource?a=1&b=2', - host: 'example.com', - port: 8080, - ts: 1357718381034, - nonce: 'd3d345f', - hash: 'U4MKKSmiVxk37JCCrAVIjV/OhB3y+NdwoCr6RShbVkE=', - ext: 'app-specific-data', - app: 'hf48hd83qwkj', // Application id (Oz) - dlg: 'd8djwekds9cj' // Delegated by application id (Oz), requires options.app - } -*/ - -exports.calculateMac = function (type, credentials, options) { - - var normalized = exports.generateNormalizedString(type, options); - - var hmac = Crypto.createHmac(credentials.algorithm, credentials.key).update(normalized); - var digest = hmac.digest('base64'); - return digest; -}; - - -exports.generateNormalizedString = function (type, options) { - - var normalized = 'hawk.' + exports.headerVersion + '.' + type + '\n' + - options.ts + '\n' + - options.nonce + '\n' + - (options.method || '').toUpperCase() + '\n' + - (options.resource || '') + '\n' + - options.host.toLowerCase() + '\n' + - options.port + '\n' + - (options.hash || '') + '\n'; - - if (options.ext) { - normalized += options.ext.replace('\\', '\\\\').replace('\n', '\\n'); - } - - normalized += '\n'; - - if (options.app) { - normalized += options.app + '\n' + - (options.dlg || '') + '\n'; - } - - return normalized; -}; - - -exports.calculatePayloadHash = function (payload, algorithm, contentType) { - - var hash = exports.initializePayloadHash(algorithm, contentType); - hash.update(payload || ''); - return exports.finalizePayloadHash(hash); -}; - - -exports.initializePayloadHash = function (algorithm, contentType) { - - var hash = Crypto.createHash(algorithm); - hash.update('hawk.' + exports.headerVersion + '.payload\n'); - hash.update(Utils.parseContentType(contentType) + '\n'); - return hash; -}; - - -exports.finalizePayloadHash = function (hash) { - - hash.update('\n'); - return hash.digest('base64'); -}; - - -exports.calculateTsMac = function (ts, credentials) { - - var hmac = Crypto.createHmac(credentials.algorithm, credentials.key); - hmac.update('hawk.' + exports.headerVersion + '.ts\n' + ts + '\n'); - return hmac.digest('base64'); -}; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/index.js deleted file mode 100755 index 1d713cb6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/index.js +++ /dev/null @@ -1,15 +0,0 @@ -// Export sub-modules - -exports.error = exports.Error = require('boom'); -exports.sntp = require('sntp'); -exports.server = require('./server'); -exports.client = require('./client'); -exports.crypto = require('./crypto'); -exports.utils = require('./utils'); - -exports.uri = { - authenticate: exports.server.authenticateBewit, - getBewit: exports.client.getBewit -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/server.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/server.js deleted file mode 100755 index 478c47b3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/server.js +++ /dev/null @@ -1,524 +0,0 @@ -// Load modules - -var Boom = require('boom'); -var Hoek = require('hoek'); -var Cryptiles = require('cryptiles'); -var Crypto = require('./crypto'); -var Utils = require('./utils'); - - -// Declare internals - -var internals = {}; - - -// Hawk authentication - -/* - req: node's HTTP request object or an object as follows: - - var request = { - method: 'GET', - url: '/resource/4?a=1&b=2', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", ext="some-app-ext-data", mac="6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE="' - }; - - credentialsFunc: required function to lookup the set of Hawk credentials based on the provided credentials id. - The credentials include the MAC key, MAC algorithm, and other attributes (such as username) - needed by the application. This function is the equivalent of verifying the username and - password in Basic authentication. - - var credentialsFunc = function (id, callback) { - - // Lookup credentials in database - db.lookup(id, function (err, item) { - - if (err || !item) { - return callback(err); - } - - var credentials = { - // Required - key: item.key, - algorithm: item.algorithm, - // Application specific - user: item.user - }; - - return callback(null, credentials); - }); - }; - - options: { - - hostHeaderName: optional header field name, used to override the default 'Host' header when used - behind a cache of a proxy. Apache2 changes the value of the 'Host' header while preserving - the original (which is what the module must verify) in the 'x-forwarded-host' header field. - Only used when passed a node Http.ServerRequest object. - - nonceFunc: optional nonce validation function. The function signature is function(nonce, ts, callback) - where 'callback' must be called using the signature function(err). - - timestampSkewSec: optional number of seconds of permitted clock skew for incoming timestamps. Defaults to 60 seconds. - Provides a +/- skew which means actual allowed window is double the number of seconds. - - localtimeOffsetMsec: optional local clock time offset express in a number of milliseconds (positive or negative). - Defaults to 0. - - payload: optional payload for validation. The client calculates the hash value and includes it via the 'hash' - header attribute. The server always ensures the value provided has been included in the request - MAC. When this option is provided, it validates the hash value itself. Validation is done by calculating - a hash value over the entire payload (assuming it has already be normalized to the same format and - encoding used by the client to calculate the hash on request). If the payload is not available at the time - of authentication, the authenticatePayload() method can be used by passing it the credentials and - attributes.hash returned in the authenticate callback. - - host: optional host name override. Only used when passed a node request object. - port: optional port override. Only used when passed a node request object. - } - - callback: function (err, credentials, artifacts) { } - */ - -exports.authenticate = function (req, credentialsFunc, options, callback) { - - callback = Utils.nextTick(callback); - - // Default options - - options.nonceFunc = options.nonceFunc || function (nonce, ts, nonceCallback) { return nonceCallback(); }; // No validation - options.timestampSkewSec = options.timestampSkewSec || 60; // 60 seconds - - // Application time - - var now = Utils.now() + (options.localtimeOffsetMsec || 0); // Measure now before any other processing - - // Convert node Http request object to a request configuration object - - var request = Utils.parseRequest(req, options); - if (request instanceof Error) { - return callback(Boom.badRequest(request.message)); - } - - // Parse HTTP Authorization header - - var attributes = Utils.parseAuthorizationHeader(request.authorization); - if (attributes instanceof Error) { - return callback(attributes); - } - - // Construct artifacts container - - var artifacts = { - method: request.method, - host: request.host, - port: request.port, - resource: request.url, - ts: attributes.ts, - nonce: attributes.nonce, - hash: attributes.hash, - ext: attributes.ext, - app: attributes.app, - dlg: attributes.dlg, - mac: attributes.mac, - id: attributes.id - }; - - // Verify required header attributes - - if (!attributes.id || - !attributes.ts || - !attributes.nonce || - !attributes.mac) { - - return callback(Boom.badRequest('Missing attributes'), null, artifacts); - } - - // Fetch Hawk credentials - - credentialsFunc(attributes.id, function (err, credentials) { - - if (err) { - return callback(err, credentials || null, artifacts); - } - - if (!credentials) { - return callback(Boom.unauthorized('Unknown credentials', 'Hawk'), null, artifacts); - } - - if (!credentials.key || - !credentials.algorithm) { - - return callback(Boom.internal('Invalid credentials'), credentials, artifacts); - } - - if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return callback(Boom.internal('Unknown algorithm'), credentials, artifacts); - } - - // Calculate MAC - - var mac = Crypto.calculateMac('header', credentials, artifacts); - if (!Cryptiles.fixedTimeComparison(mac, attributes.mac)) { - return callback(Boom.unauthorized('Bad mac', 'Hawk'), credentials, artifacts); - } - - // Check payload hash - - if (options.payload !== null && - options.payload !== undefined) { // '' is valid - - if (!attributes.hash) { - return callback(Boom.unauthorized('Missing required payload hash', 'Hawk'), credentials, artifacts); - } - - var hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, request.contentType); - if (!Cryptiles.fixedTimeComparison(hash, attributes.hash)) { - return callback(Boom.unauthorized('Bad payload hash', 'Hawk'), credentials, artifacts); - } - } - - // Check nonce - - options.nonceFunc(attributes.nonce, attributes.ts, function (err) { - - if (err) { - return callback(Boom.unauthorized('Invalid nonce', 'Hawk'), credentials, artifacts); - } - - // Check timestamp staleness - - if (Math.abs((attributes.ts * 1000) - now) > (options.timestampSkewSec * 1000)) { - var fresh = Math.floor((Utils.now() + (options.localtimeOffsetMsec || 0)) / 1000); // Get fresh now - var tsm = Crypto.calculateTsMac(fresh, credentials); - return callback(Boom.unauthorized('Stale timestamp', 'Hawk', { ts: fresh, tsm: tsm }), credentials, artifacts); - } - - // Successful authentication - - return callback(null, credentials, artifacts); - }); - }); -}; - - -// Authenticate payload hash - used when payload cannot be provided during authenticate() - -/* - payload: raw request payload - credentials: from authenticate callback - artifacts: from authenticate callback - contentType: req.headers['content-type'] -*/ - -exports.authenticatePayload = function (payload, credentials, artifacts, contentType) { - - var calculatedHash = Crypto.calculatePayloadHash(payload, credentials.algorithm, contentType); - return Cryptiles.fixedTimeComparison(calculatedHash, artifacts.hash); -}; - - -// Generate a Server-Authorization header for a given response - -/* - credentials: {}, // Object received from authenticate() - artifacts: {} // Object received from authenticate(); 'mac', 'hash', and 'ext' - ignored - options: { - ext: 'application-specific', // Application specific data sent via the ext attribute - payload: '{"some":"payload"}', // UTF-8 encoded string for body hash generation (ignored if hash provided) - contentType: 'application/json', // Payload content-type (ignored if hash provided) - hash: 'U4MKKSmiVxk37JCCrAVIjV=' // Pre-calculated payload hash - } -*/ - -exports.header = function (credentials, artifacts, options) { - - // Prepare inputs - - options = options || {}; - - if (!artifacts || - typeof artifacts !== 'object' || - typeof options !== 'object') { - - return ''; - } - - artifacts = Hoek.clone(artifacts); - delete artifacts.mac; - artifacts.hash = options.hash; - artifacts.ext = options.ext; - - // Validate credentials - - if (!credentials || - !credentials.key || - !credentials.algorithm) { - - // Invalid credential object - return ''; - } - - if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return ''; - } - - // Calculate payload hash - - if (!artifacts.hash && - options.hasOwnProperty('payload')) { - - artifacts.hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType); - } - - var mac = Crypto.calculateMac('response', credentials, artifacts); - - // Construct header - - var header = 'Hawk mac="' + mac + '"' + - (artifacts.hash ? ', hash="' + artifacts.hash + '"' : ''); - - if (artifacts.ext !== null && - artifacts.ext !== undefined && - artifacts.ext !== '') { // Other falsey values allowed - - header += ', ext="' + Utils.escapeHeaderAttribute(artifacts.ext) + '"'; - } - - return header; -}; - - -/* - * Arguments and options are the same as authenticate() with the exception that the only supported options are: - * 'hostHeaderName', 'localtimeOffsetMsec', 'host', 'port' - */ - -exports.authenticateBewit = function (req, credentialsFunc, options, callback) { - - callback = Utils.nextTick(callback); - - // Application time - - var now = Utils.now() + (options.localtimeOffsetMsec || 0); - - // Convert node Http request object to a request configuration object - - var request = Utils.parseRequest(req, options); - if (request instanceof Error) { - return callback(Boom.badRequest(request.message)); - } - - // Extract bewit - - // 1 2 3 4 - var resource = request.url.match(/^(\/.*)([\?&])bewit\=([^&$]*)(?:&(.+))?$/); - if (!resource) { - return callback(Boom.unauthorized(null, 'Hawk')); - } - - // Bewit not empty - - if (!resource[3]) { - return callback(Boom.unauthorized('Empty bewit', 'Hawk')); - } - - // Verify method is GET - - if (request.method !== 'GET' && - request.method !== 'HEAD') { - - return callback(Boom.unauthorized('Invalid method', 'Hawk')); - } - - // No other authentication - - if (request.authorization) { - return callback(Boom.badRequest('Multiple authentications', 'Hawk')); - } - - // Parse bewit - - var bewitString = Utils.base64urlDecode(resource[3]); - if (bewitString instanceof Error) { - return callback(Boom.badRequest('Invalid bewit encoding')); - } - - // Bewit format: id\exp\mac\ext ('\' is used because it is a reserved header attribute character) - - var bewitParts = bewitString.split('\\'); - if (!bewitParts || - bewitParts.length !== 4) { - - return callback(Boom.badRequest('Invalid bewit structure')); - } - - var bewit = { - id: bewitParts[0], - exp: parseInt(bewitParts[1], 10), - mac: bewitParts[2], - ext: bewitParts[3] || '' - }; - - if (!bewit.id || - !bewit.exp || - !bewit.mac) { - - return callback(Boom.badRequest('Missing bewit attributes')); - } - - // Construct URL without bewit - - var url = resource[1]; - if (resource[4]) { - url += resource[2] + resource[4]; - } - - // Check expiration - - if (bewit.exp * 1000 <= now) { - return callback(Boom.unauthorized('Access expired', 'Hawk'), null, bewit); - } - - // Fetch Hawk credentials - - credentialsFunc(bewit.id, function (err, credentials) { - - if (err) { - return callback(err, credentials || null, bewit.ext); - } - - if (!credentials) { - return callback(Boom.unauthorized('Unknown credentials', 'Hawk'), null, bewit); - } - - if (!credentials.key || - !credentials.algorithm) { - - return callback(Boom.internal('Invalid credentials'), credentials, bewit); - } - - if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return callback(Boom.internal('Unknown algorithm'), credentials, bewit); - } - - // Calculate MAC - - var mac = Crypto.calculateMac('bewit', credentials, { - ts: bewit.exp, - nonce: '', - method: 'GET', - resource: url, - host: request.host, - port: request.port, - ext: bewit.ext - }); - - if (!Cryptiles.fixedTimeComparison(mac, bewit.mac)) { - return callback(Boom.unauthorized('Bad mac', 'Hawk'), credentials, bewit); - } - - // Successful authentication - - return callback(null, credentials, bewit); - }); -}; - - -/* - * options are the same as authenticate() with the exception that the only supported options are: - * 'nonceFunc', 'timestampSkewSec', 'localtimeOffsetMsec' - */ - -exports.authenticateMessage = function (host, port, message, authorization, credentialsFunc, options, callback) { - - callback = Utils.nextTick(callback); - - // Default options - - options.nonceFunc = options.nonceFunc || function (nonce, ts, nonceCallback) { return nonceCallback(); }; // No validation - options.timestampSkewSec = options.timestampSkewSec || 60; // 60 seconds - - // Application time - - var now = Utils.now() + (options.localtimeOffsetMsec || 0); // Measure now before any other processing - - // Validate authorization - - if (!authorization.id || - !authorization.ts || - !authorization.nonce || - !authorization.hash || - !authorization.mac) { - - return callback(Boom.badRequest('Invalid authorization')) - } - - // Fetch Hawk credentials - - credentialsFunc(authorization.id, function (err, credentials) { - - if (err) { - return callback(err, credentials || null); - } - - if (!credentials) { - return callback(Boom.unauthorized('Unknown credentials', 'Hawk')); - } - - if (!credentials.key || - !credentials.algorithm) { - - return callback(Boom.internal('Invalid credentials'), credentials); - } - - if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { - return callback(Boom.internal('Unknown algorithm'), credentials); - } - - // Construct artifacts container - - var artifacts = { - ts: authorization.ts, - nonce: authorization.nonce, - host: host, - port: port, - hash: authorization.hash - }; - - // Calculate MAC - - var mac = Crypto.calculateMac('message', credentials, artifacts); - if (!Cryptiles.fixedTimeComparison(mac, authorization.mac)) { - return callback(Boom.unauthorized('Bad mac', 'Hawk'), credentials); - } - - // Check payload hash - - var hash = Crypto.calculatePayloadHash(message, credentials.algorithm); - if (!Cryptiles.fixedTimeComparison(hash, authorization.hash)) { - return callback(Boom.unauthorized('Bad message hash', 'Hawk'), credentials); - } - - // Check nonce - - options.nonceFunc(authorization.nonce, authorization.ts, function (err) { - - if (err) { - return callback(Boom.unauthorized('Invalid nonce', 'Hawk'), credentials); - } - - // Check timestamp staleness - - if (Math.abs((authorization.ts * 1000) - now) > (options.timestampSkewSec * 1000)) { - return callback(Boom.unauthorized('Stale timestamp'), credentials); - } - - // Successful authentication - - return callback(null, credentials); - }); - }); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/utils.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/utils.js deleted file mode 100755 index c8938fe8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/lib/utils.js +++ /dev/null @@ -1,183 +0,0 @@ -// Load modules - -var Hoek = require('hoek'); -var Sntp = require('sntp'); -var Boom = require('boom'); - - -// Declare internals - -var internals = {}; - - -// Import Hoek Utilities - -internals.import = function () { - - for (var i in Hoek) { - if (Hoek.hasOwnProperty(i)) { - exports[i] = Hoek[i]; - } - } -}; - -internals.import(); - - -// Hawk version - -exports.version = function () { - - return exports.loadPackage(__dirname + '/..').version; -}; - - -// Extract host and port from request - -exports.parseHost = function (req, hostHeaderName) { - - hostHeaderName = (hostHeaderName ? hostHeaderName.toLowerCase() : 'host'); - var hostHeader = req.headers[hostHeaderName]; - if (!hostHeader) { - return null; - } - - var hostHeaderRegex; - if (hostHeader[0] === '[') { - hostHeaderRegex = /^(?:(?:\r\n)?\s)*(\[[^\]]+\])(?::(\d+))?(?:(?:\r\n)?\s)*$/; // IPv6 - } - else { - hostHeaderRegex = /^(?:(?:\r\n)?\s)*([^:]+)(?::(\d+))?(?:(?:\r\n)?\s)*$/; // IPv4, hostname - } - - var hostParts = hostHeader.match(hostHeaderRegex); - - if (!hostParts || - hostParts.length !== 3 || - !hostParts[1]) { - - return null; - } - - return { - name: hostParts[1], - port: (hostParts[2] ? hostParts[2] : (req.connection && req.connection.encrypted ? 443 : 80)) - }; -}; - - -// Parse Content-Type header content - -exports.parseContentType = function (header) { - - if (!header) { - return ''; - } - - return header.split(';')[0].trim().toLowerCase(); -}; - - -// Convert node's to request configuration object - -exports.parseRequest = function (req, options) { - - if (!req.headers) { - return req; - } - - // Obtain host and port information - - if (!options.host || !options.port) { - var host = exports.parseHost(req, options.hostHeaderName); - if (!host) { - return new Error('Invalid Host header'); - } - } - - var request = { - method: req.method, - url: req.url, - host: options.host || host.name, - port: options.port || host.port, - authorization: req.headers.authorization, - contentType: req.headers['content-type'] || '' - }; - - return request; -}; - - -exports.now = function () { - - return Sntp.now(); -}; - - -// Parse Hawk HTTP Authorization header - -exports.parseAuthorizationHeader = function (header, keys) { - - keys = keys || ['id', 'ts', 'nonce', 'hash', 'ext', 'mac', 'app', 'dlg']; - - if (!header) { - return Boom.unauthorized(null, 'Hawk'); - } - - var headerParts = header.match(/^(\w+)(?:\s+(.*))?$/); // Header: scheme[ something] - if (!headerParts) { - return Boom.badRequest('Invalid header syntax'); - } - - var scheme = headerParts[1]; - if (scheme.toLowerCase() !== 'hawk') { - return Boom.unauthorized(null, 'Hawk'); - } - - var attributesString = headerParts[2]; - if (!attributesString) { - return Boom.badRequest('Invalid header syntax'); - } - - var attributes = {}; - var errorMessage = ''; - var verify = attributesString.replace(/(\w+)="([^"\\]*)"\s*(?:,\s*|$)/g, function ($0, $1, $2) { - - // Check valid attribute names - - if (keys.indexOf($1) === -1) { - errorMessage = 'Unknown attribute: ' + $1; - return; - } - - // Allowed attribute value characters: !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9 - - if ($2.match(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~]+$/) === null) { - errorMessage = 'Bad attribute value: ' + $1; - return; - } - - // Check for duplicates - - if (attributes.hasOwnProperty($1)) { - errorMessage = 'Duplicate attribute: ' + $1; - return; - } - - attributes[$1] = $2; - return ''; - }); - - if (verify !== '') { - return Boom.badRequest(errorMessage || 'Bad header format'); - } - - return attributes; -}; - - -exports.unauthorized = function (message) { - - return Boom.unauthorized(message, 'Hawk'); -}; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/.npmignore deleted file mode 100644 index 77ba16cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/.npmignore +++ /dev/null @@ -1,18 +0,0 @@ -.idea -*.iml -npm-debug.log -dump.rdb -node_modules -results.tap -results.xml -npm-shrinkwrap.json -config.json -.DS_Store -*/.DS_Store -*/*/.DS_Store -._* -*/._* -*/*/._* -coverage.* -lib-cov - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml deleted file mode 100755 index 047f7e3d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js - -node_js: - - 0.10 - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE deleted file mode 100755 index 911b97ee..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2012-2013, Walmart. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Walmart nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL WALMART BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/Makefile deleted file mode 100755 index 884ec6db..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -test: - @node node_modules/lab/bin/lab -test-cov: - @node node_modules/lab/bin/lab -r threshold -t 100 -test-cov-html: - @node node_modules/lab/bin/lab -r html -o coverage.html -complexity: - @node node_modules/complexity-report/src/cli.js -o complexity.md -f markdown lib - -.PHONY: test test-cov test-cov-html complexity - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/README.md deleted file mode 100755 index 1970b1c4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/README.md +++ /dev/null @@ -1,6 +0,0 @@ -<a href="https://github.com/spumko"><img src="https://raw.github.com/spumko/spumko/master/images/from.png" align="right" /></a> -![boom Logo](https://raw.github.com/spumko/boom/master/images/boom.png) - -HTTP-friendly error objects - -[![Build Status](https://secure.travis-ci.org/spumko/boom.png)](http://travis-ci.org/spumko/boom) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png deleted file mode 100755 index 373bc134..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/index.js deleted file mode 100755 index 4cc88b35..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib'); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js deleted file mode 100755 index 0bbeed95..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js +++ /dev/null @@ -1,207 +0,0 @@ -// Load modules - -var Http = require('http'); -var NodeUtil = require('util'); -var Hoek = require('hoek'); - - -// Declare internals - -var internals = {}; - - -exports = module.exports = internals.Boom = function (/* (new Error) or (code, message) */) { - - var self = this; - - Hoek.assert(this.constructor === internals.Boom, 'Error must be instantiated using new'); - - Error.call(this); - this.isBoom = true; - - this.response = { - code: 0, - payload: {}, - headers: {} - // type: 'content-type' - }; - - if (arguments[0] instanceof Error) { - - // Error - - var error = arguments[0]; - - this.data = error; - this.response.code = error.code || 500; - if (error.message) { - this.message = error.message; - } - } - else { - - // code, message - - var code = arguments[0]; - var message = arguments[1]; - - Hoek.assert(!isNaN(parseFloat(code)) && isFinite(code) && code >= 400, 'First argument must be a number (400+)'); - - this.response.code = code; - if (message) { - this.message = message; - } - } - - // Response format - - this.reformat(); - - return this; -}; - -NodeUtil.inherits(internals.Boom, Error); - - -internals.Boom.prototype.reformat = function () { - - this.response.payload.code = this.response.code; - this.response.payload.error = Http.STATUS_CODES[this.response.code] || 'Unknown'; - if (this.message) { - this.response.payload.message = Hoek.escapeHtml(this.message); // Prevent XSS from error message - } -}; - - -// Utilities - -internals.Boom.badRequest = function (message) { - - return new internals.Boom(400, message); -}; - - -internals.Boom.unauthorized = function (message, scheme, attributes) { // Or function (message, wwwAuthenticate[]) - - var err = new internals.Boom(401, message); - - if (!scheme) { - return err; - } - - var wwwAuthenticate = ''; - - if (typeof scheme === 'string') { - - // function (message, scheme, attributes) - - wwwAuthenticate = scheme; - if (attributes) { - var names = Object.keys(attributes); - for (var i = 0, il = names.length; i < il; ++i) { - if (i) { - wwwAuthenticate += ','; - } - - var value = attributes[names[i]]; - if (value === null || - value === undefined) { // Value can be zero - - value = ''; - } - wwwAuthenticate += ' ' + names[i] + '="' + Hoek.escapeHeaderAttribute(value.toString()) + '"'; - } - } - - if (message) { - if (attributes) { - wwwAuthenticate += ','; - } - wwwAuthenticate += ' error="' + Hoek.escapeHeaderAttribute(message) + '"'; - } - else { - err.isMissing = true; - } - } - else { - - // function (message, wwwAuthenticate[]) - - var wwwArray = scheme; - for (var i = 0, il = wwwArray.length; i < il; ++i) { - if (i) { - wwwAuthenticate += ', '; - } - - wwwAuthenticate += wwwArray[i]; - } - } - - err.response.headers['WWW-Authenticate'] = wwwAuthenticate; - - return err; -}; - - -internals.Boom.clientTimeout = function (message) { - - return new internals.Boom(408, message); -}; - - -internals.Boom.serverTimeout = function (message) { - - return new internals.Boom(503, message); -}; - - -internals.Boom.forbidden = function (message) { - - return new internals.Boom(403, message); -}; - - -internals.Boom.notFound = function (message) { - - return new internals.Boom(404, message); -}; - - -internals.Boom.internal = function (message, data) { - - var err = new internals.Boom(500, message); - - if (data && data.stack) { - err.trace = data.stack.split('\n'); - err.outterTrace = Hoek.displayStack(1); - } - else { - err.trace = Hoek.displayStack(1); - } - - err.data = data; - err.response.payload.message = 'An internal server error occurred'; // Hide actual error from user - - return err; -}; - - -internals.Boom.passThrough = function (code, payload, contentType, headers) { - - var err = new internals.Boom(500, 'Pass-through'); // 500 code is only used to initialize - - err.data = { - code: code, - payload: payload, - type: contentType - }; - - err.response.code = code; - err.response.type = contentType; - err.response.headers = headers; - err.response.payload = payload; - - return err; -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/package.json deleted file mode 100755 index a6c56b90..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "boom", - "description": "HTTP-friendly error objects", - "version": "0.4.2", - "author": { - "name": "Eran Hammer", - "email": "eran@hueniverse.com", - "url": "http://hueniverse.com" - }, - "contributors": [], - "repository": { - "type": "git", - "url": "git://github.com/spumko/boom" - }, - "main": "index", - "keywords": [ - "error", - "http" - ], - "engines": { - "node": ">=0.8.0" - }, - "dependencies": { - "hoek": "0.9.x" - }, - "devDependencies": { - "lab": "0.1.x", - "complexity-report": "0.x.x" - }, - "scripts": { - "test": "make test-cov" - }, - "licenses": [ - { - "type": "BSD", - "url": "http://github.com/spumko/boom/raw/master/LICENSE" - } - ], - "readme": "<a href=\"https://github.com/spumko\"><img src=\"https://raw.github.com/spumko/spumko/master/images/from.png\" align=\"right\" /></a>\n![boom Logo](https://raw.github.com/spumko/boom/master/images/boom.png)\n\nHTTP-friendly error objects\n\n[![Build Status](https://secure.travis-ci.org/spumko/boom.png)](http://travis-ci.org/spumko/boom)\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/spumko/boom/issues" - }, - "homepage": "https://github.com/spumko/boom", - "_id": "boom@0.4.2", - "dist": { - "shasum": "92a32f029aba10e290058f22c83377d073ed5cdd" - }, - "_from": "boom@0.4.x", - "_resolved": "https://registry.npmjs.org/boom/-/boom-0.4.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js deleted file mode 100755 index a20c1c34..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js +++ /dev/null @@ -1,245 +0,0 @@ -// Load modules - -var Lab = require('lab'); -var Boom = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Boom', function () { - - it('returns an error with info when constructed using another error', function (done) { - - var error = new Error('ka-boom'); - error.xyz = 123; - var err = new Boom(error); - expect(err.data.xyz).to.equal(123); - expect(err.message).to.equal('ka-boom'); - expect(err.response).to.deep.equal({ - code: 500, - payload: { - code: 500, - error: 'Internal Server Error', - message: 'ka-boom' - }, - headers: {} - }); - done(); - }); - - describe('#isBoom', function () { - - it('returns true for Boom object', function (done) { - - expect(Boom.badRequest().isBoom).to.equal(true); - done(); - }); - - it('returns false for Error object', function (done) { - - expect(new Error().isBoom).to.not.exist; - done(); - }); - }); - - describe('#badRequest', function () { - - it('returns a 400 error code', function (done) { - - expect(Boom.badRequest().response.code).to.equal(400); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.badRequest('my message').message).to.equal('my message'); - done(); - }); - }); - - describe('#unauthorized', function () { - - it('returns a 401 error code', function (done) { - - var err = Boom.unauthorized(); - expect(err.response.code).to.equal(401); - expect(err.response.headers).to.deep.equal({}); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.unauthorized('my message').message).to.equal('my message'); - done(); - }); - - it('returns a WWW-Authenticate header when passed a scheme', function (done) { - - var err = Boom.unauthorized('boom', 'Test'); - expect(err.response.code).to.equal(401); - expect(err.response.headers['WWW-Authenticate']).to.equal('Test error="boom"'); - done(); - }); - - it('returns a WWW-Authenticate header when passed a scheme and attributes', function (done) { - - var err = Boom.unauthorized('boom', 'Test', { a: 1, b: 'something', c: null, d: 0 }); - expect(err.response.code).to.equal(401); - expect(err.response.headers['WWW-Authenticate']).to.equal('Test a="1", b="something", c="", d="0", error="boom"'); - done(); - }); - - it('sets the isMissing flag when error message is empty', function (done) { - - var err = Boom.unauthorized('', 'Basic'); - expect(err.isMissing).to.equal(true); - done(); - }); - - it('does not set the isMissing flag when error message is not empty', function (done) { - - var err = Boom.unauthorized('message', 'Basic'); - expect(err.isMissing).to.equal(undefined); - done(); - }); - - it('sets a WWW-Authenticate when passed as an array', function (done) { - - var err = Boom.unauthorized('message', ['Basic', 'Example e="1"', 'Another x="3", y="4"']); - expect(err.response.headers['WWW-Authenticate']).to.equal('Basic, Example e="1", Another x="3", y="4"'); - done(); - }); - }); - - describe('#clientTimeout', function () { - - it('returns a 408 error code', function (done) { - - expect(Boom.clientTimeout().response.code).to.equal(408); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.clientTimeout('my message').message).to.equal('my message'); - done(); - }); - }); - - describe('#serverTimeout', function () { - - it('returns a 503 error code', function (done) { - - expect(Boom.serverTimeout().response.code).to.equal(503); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.serverTimeout('my message').message).to.equal('my message'); - done(); - }); - }); - - describe('#forbidden', function () { - - it('returns a 403 error code', function (done) { - - expect(Boom.forbidden().response.code).to.equal(403); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.forbidden('my message').message).to.equal('my message'); - done(); - }); - }); - - describe('#notFound', function () { - - it('returns a 404 error code', function (done) { - - expect(Boom.notFound().response.code).to.equal(404); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.notFound('my message').message).to.equal('my message'); - done(); - }); - }); - - describe('#internal', function () { - - it('returns a 500 error code', function (done) { - - expect(Boom.internal().response.code).to.equal(500); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - var err = Boom.internal('my message'); - expect(err.message).to.equal('my message'); - expect(err.response.payload.message).to.equal('An internal server error occurred'); - done(); - }); - - it('passes data on the callback if its passed in', function (done) { - - expect(Boom.internal('my message', { my: 'data' }).data.my).to.equal('data'); - done(); - }); - - it('uses passed in stack if its available', function (done) { - - var error = new Error(); - error.stack = 'my stack line\nmy second stack line'; - expect(Boom.internal('my message', error).trace[0]).to.equal('my stack line'); - done(); - }); - }); - - describe('#passThrough', function () { - - it('returns a pass-through error', function (done) { - - var err = Boom.passThrough(499, { a: 1 }, 'application/text', { 'X-Test': 'Boom' }); - expect(err.response.code).to.equal(499); - expect(err.message).to.equal('Pass-through'); - expect(err.response).to.deep.equal({ - code: 499, - payload: { a: 1 }, - headers: { 'X-Test': 'Boom' }, - type: 'application/text' - }); - done(); - }); - }); - - describe('#reformat', function () { - - it('encodes any HTML markup in the response payload', function (done) { - - var boom = new Boom(new Error('<script>alert(1)</script>')); - expect(boom.response.payload.message).to.not.contain('<script>'); - done(); - }); - }); -}); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore deleted file mode 100644 index b3bb5176..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore +++ /dev/null @@ -1,18 +0,0 @@ -.idea -*.iml -npm-debug.log -dump.rdb -node_modules -results.tap -results.xml -npm-shrinkwrap.json -config.json -.DS_Store -*/.DS_Store -*/*/.DS_Store -._* -*/._* -*/*/._* -coverage.* -lib-cov - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml deleted file mode 100755 index 40ca59ee..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js - -node_js: - - 0.10 - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE deleted file mode 100755 index e699a7bd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2012-2013, Eran Hammer. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Eran Hammer nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL ERAN HAMMER BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile deleted file mode 100755 index 9e7138c2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -test: - @./node_modules/.bin/lab -test-cov: - @./node_modules/.bin/lab -r threshold -t 100 -test-cov-html: - @./node_modules/.bin/lab -r html -o coverage.html -complexity: - @./node_modules/.bin/cr -o complexity.md -f markdown lib - -.PHONY: test test-cov test-cov-html complexity - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md deleted file mode 100644 index 6a900a49..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md +++ /dev/null @@ -1,6 +0,0 @@ -cryptiles -========= - -General purpose crypto utilities - -[![Build Status](https://secure.travis-ci.org/hueniverse/cryptiles.png)](http://travis-ci.org/hueniverse/cryptiles) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js deleted file mode 100755 index 4cc88b35..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib'); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js deleted file mode 100755 index dcf2bc38..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js +++ /dev/null @@ -1,68 +0,0 @@ -// Load modules - -var Crypto = require('crypto'); -var Boom = require('boom'); - - -// Declare internals - -var internals = {}; - - -// Generate a cryptographically strong pseudo-random data - -exports.randomString = function (size) { - - var buffer = exports.randomBits((size + 1) * 6); - if (buffer instanceof Error) { - return buffer; - } - - var string = buffer.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, ''); - return string.slice(0, size); -}; - - -exports.randomBits = function (bits) { - - if (!bits || - bits < 0) { - - return Boom.internal('Invalid random bits count'); - } - - var bytes = Math.ceil(bits / 8); - try { - return Crypto.randomBytes(bytes); - } - catch (err) { - return Boom.internal('Failed generating random bits: ' + err.message); - } -}; - - -// Compare two strings using fixed time algorithm (to prevent time-based analysis of MAC digest match) - -exports.fixedTimeComparison = function (a, b) { - - if (typeof a !== 'string' || - typeof b !== 'string') { - - return false; - } - - var mismatch = (a.length === b.length ? 0 : 1); - if (mismatch) { - b = a; - } - - for (var i = 0, il = a.length; i < il; ++i) { - var ac = a.charCodeAt(i); - var bc = b.charCodeAt(i); - mismatch += (ac === bc ? 0 : 1); - } - - return (mismatch === 0); -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json deleted file mode 100755 index cafe4c1b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "cryptiles", - "description": "General purpose crypto utilities", - "version": "0.2.2", - "author": { - "name": "Eran Hammer", - "email": "eran@hueniverse.com", - "url": "http://hueniverse.com" - }, - "contributors": [], - "repository": { - "type": "git", - "url": "git://github.com/hueniverse/cryptiles" - }, - "main": "index", - "keywords": [ - "cryptography", - "security", - "utilites" - ], - "engines": { - "node": ">=0.8.0" - }, - "dependencies": { - "boom": "0.4.x" - }, - "devDependencies": { - "lab": "0.1.x", - "complexity-report": "0.x.x" - }, - "scripts": { - "test": "make test-cov" - }, - "licenses": [ - { - "type": "BSD", - "url": "http://github.com/hueniverse/cryptiles/raw/master/LICENSE" - } - ], - "readme": "cryptiles\n=========\n\nGeneral purpose crypto utilities\n\n[![Build Status](https://secure.travis-ci.org/hueniverse/cryptiles.png)](http://travis-ci.org/hueniverse/cryptiles)\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/hueniverse/cryptiles/issues" - }, - "homepage": "https://github.com/hueniverse/cryptiles", - "_id": "cryptiles@0.2.2", - "dist": { - "shasum": "0462e8adb7667ffa104947a34a96e68627d8c95d" - }, - "_from": "cryptiles@0.2.x", - "_resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-0.2.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js deleted file mode 100755 index 58aaa70b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js +++ /dev/null @@ -1,101 +0,0 @@ -// Load modules - -var Lab = require('lab'); -var Cryptiles = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Cryptiles', function () { - - describe('#randomString', function () { - - it('should generate the right length string', function (done) { - - for (var i = 1; i <= 1000; ++i) { - expect(Cryptiles.randomString(i).length).to.equal(i); - } - - done(); - }); - - it('returns an error on invalid bits size', function (done) { - - expect(Cryptiles.randomString(99999999999999999999).message).to.equal('Failed generating random bits: Argument #1 must be number > 0'); - done(); - }); - }); - - describe('#randomBits', function () { - - it('returns an error on invalid input', function (done) { - - expect(Cryptiles.randomBits(0).message).to.equal('Invalid random bits count'); - done(); - }); - }); - - describe('#fixedTimeComparison', function () { - - var a = Cryptiles.randomString(50000); - var b = Cryptiles.randomString(150000); - - it('should take the same amount of time comparing different string sizes', function (done) { - - var now = Date.now(); - Cryptiles.fixedTimeComparison(b, a); - var t1 = Date.now() - now; - - now = Date.now(); - Cryptiles.fixedTimeComparison(b, b); - var t2 = Date.now() - now; - - expect(t2 - t1).to.be.within(-20, 20); - done(); - }); - - it('should return true for equal strings', function (done) { - - expect(Cryptiles.fixedTimeComparison(a, a)).to.equal(true); - done(); - }); - - it('should return false for different strings (size, a < b)', function (done) { - - expect(Cryptiles.fixedTimeComparison(a, a + 'x')).to.equal(false); - done(); - }); - - it('should return false for different strings (size, a > b)', function (done) { - - expect(Cryptiles.fixedTimeComparison(a + 'x', a)).to.equal(false); - done(); - }); - - it('should return false for different strings (size, a = b)', function (done) { - - expect(Cryptiles.fixedTimeComparison(a + 'x', a + 'y')).to.equal(false); - done(); - }); - - it('should return false when not a string', function (done) { - - expect(Cryptiles.fixedTimeComparison('x', null)).to.equal(false); - done(); - }); - }); -}); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore deleted file mode 100644 index 9966e5e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore +++ /dev/null @@ -1,18 +0,0 @@ -.idea -*.iml -npm-debug.log -dump.rdb -node_modules -results.tap -results.xml -npm-shrinkwrap.json -config.json -.DS_Store -*/.DS_Store -*/*/.DS_Store -._* -*/._* -*/*/._* -coverage.* -lib-cov -complexity.md diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml deleted file mode 100755 index 40ca59ee..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js - -node_js: - - 0.10 - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE deleted file mode 100755 index 394adcff..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE +++ /dev/null @@ -1,33 +0,0 @@ -Copyright (c) 2011-2013, Walmart. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Walmart nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL WALMART BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - * * * - - -Portions of this project were initially based on Postmile, Copyright (c) 2011, Yahoo Inc. -Postmile is published at https://github.com/yahoo/postmile and its licensing terms are -published at https://github.com/yahoo/postmile/blob/master/LICENSE. - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile deleted file mode 100755 index e605d6c0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -test: - @node node_modules/lab/bin/lab -test-cov: - @node node_modules/lab/bin/lab -r threshold -t 100 -test-cov-html: - @node node_modules/lab/bin/lab -r html -o coverage.html -complexity: - @node node_modules/complexity-report/src/cli.js -o complexity.md -f markdown lib - -.PHONY: test test-cov test-cov-html complexity diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/README.md deleted file mode 100755 index ac64e2fd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/README.md +++ /dev/null @@ -1,436 +0,0 @@ -<a href="https://github.com/spumko"><img src="https://raw.github.com/spumko/spumko/master/images/from.png" align="right" /></a> -![hoek Logo](https://raw.github.com/spumko/hoek/master/images/hoek.png) - -General purpose node utilities - -[![Build Status](https://secure.travis-ci.org/spumko/hoek.png)](http://travis-ci.org/spumko/hoek) - -# Table of Contents - -* [Introduction](#introduction "Introduction") -* [Object](#object "Object") - * [clone](#cloneobj "clone") - * [merge](#mergetarget-source-isnulloverride-ismergearrays "merge") - * [applyToDefaults](#applytodefaultsdefaults-options "applyToDefaults") - * [unique](#uniquearray-key "unique") - * [mapToObject](#maptoobjectarray-key "mapToObject") - * [intersect](#intersectarray1-array2 "intersect") - * [matchKeys](#matchkeysobj-keys "matchKeys") - * [flatten](#flattenarray-target "flatten") - * [removeKeys](#removekeysobject-keys "removeKeys") - * [reach](#reachobj-chain "reach") - * [inheritAsync](#inheritasyncself-obj-keys "inheritAsync") - * [rename](#renameobj-from-to "rename") -* [Timer](#timer "Timer") -* [Binary Encoding/Decoding](#binary "Binary Encoding/Decoding") - * [base64urlEncode](#binary64urlEncodevalue "binary64urlEncode") - * [base64urlDecode](#binary64urlDecodevalue "binary64urlDecode") -* [Escaping Characters](#escaped "Escaping Characters") - * [escapeHtml](#escapeHtmlstring "escapeHtml") - * [escapeHeaderAttribute](#escapeHeaderAttributeattribute "escapeHeaderAttribute") - * [escapeRegex](#escapeRegexstring "escapeRegex") -* [Errors](#errors "Errors") - * [assert](#assertmessage "assert") - * [abort](#abortmessage "abort") - * [displayStack](#displayStackslice "displayStack") - * [callStack](#callStackslice "callStack") - * [toss](#tosscondition "toss") -* [Load files](#load-files "Load Files") - * [loadPackage](#loadPackagedir "loadpackage") - * [loadDirModules](#loadDirModulespath-excludefiles-target "loaddirmodules") - - - -# Introduction - -The *Hoek* general purpose node utilities library is used to aid in a variety of manners. It comes with useful methods for Arrays (clone, merge, applyToDefaults), Objects (removeKeys, copy), Asserting and more. - -For example, to use Hoek to set configuration with default options: -```javascript -var Hoek = require('hoek'); - -var default = {url : "www.github.com", port : "8000", debug : true} - -var config = Hoek.applyToDefaults(default, {port : "3000", admin : true}); - -// In this case, config would be { url: 'www.github.com', port: '3000', debug: true, admin: true } -``` - -Under each of the sections (such as Array), there are subsections which correspond to Hoek methods. Each subsection will explain how to use the corresponding method. In each js excerpt below, the var Hoek = require('hoek') is omitted for brevity. - -## Object - -Hoek provides several helpful methods for objects and arrays. - -### clone(obj) - -This method is used to clone an object or an array. A *deep copy* is made (duplicates everything, including values that are objects). - -```javascript - -var nestedObj = { - w: /^something$/ig, - x: { - a: [1, 2, 3], - b: 123456, - c: new Date() - }, - y: 'y', - z: new Date() - }; - -var copy = Hoek.clone(nestedObj); - -copy.x.b = 100; - -console.log(copy.y) // results in 'y' -console.log(nestedObj.x.b) // results in 123456 -console.log(copy.x.b) // results in 100 -``` - -### merge(target, source, isNullOverride, isMergeArrays) -isNullOverride, isMergeArrays default to true - -Merge all the properties of source into target, source wins in conflic, and by default null and undefined from source are applied - - -```javascript - -var target = {a: 1, b : 2} -var source = {a: 0, c: 5} -var source2 = {a: null, c: 5} - -var targetArray = [1, 2, 3]; -var sourceArray = [4, 5]; - -var newTarget = Hoek.merge(target, source); // results in {a: 0, b: 2, c: 5} -newTarget = Hoek.merge(target, source2); // results in {a: null, b: 2, c: 5} -newTarget = Hoek.merge(target, source2, false); // results in {a: 1, b: 2, c: 5} - -newTarget = Hoek.merge(targetArray, sourceArray) // results in [1, 2, 3, 4, 5] -newTarget = Hoek.merge(targetArray, sourceArray, true, false) // results in [4, 5] - - - - -``` - -### applyToDefaults(defaults, options) - -Apply options to a copy of the defaults - -```javascript - -var defaults = {host: "localhost", port: 8000}; -var options = {port: 8080}; - -var config = Hoek.applyToDefaults(defaults, options); // results in {host: "localhost", port: 8080}; - - -``` - -### unique(array, key) - -Remove duplicate items from Array - -```javascript - -var array = [1, 2, 2, 3, 3, 4, 5, 6]; - -var newArray = Hoek.unique(array); // results in [1,2,3,4,5,6]; - -array = [{id: 1}, {id: 1}, {id: 2}]; - -newArray = Hoek.unique(array, "id") // results in [{id: 1}, {id: 2}] - -``` - -### mapToObject(array, key) - -Convert an Array into an Object - -```javascript - -var array = [1,2,3]; -var newObject = Hoek.mapToObject(array); // results in [{"1": true}, {"2": true}, {"3": true}] - -array = [{id: 1}, {id: 2}]; -newObject = Hoek.mapToObject(array, "id") // results in [{"id": 1}, {"id": 2}] - -``` -### intersect(array1, array2) - -Find the common unique items in two arrays - -```javascript - -var array1 = [1, 2, 3]; -var array2 = [1, 4, 5]; - -var newArray = Hoek.intersect(array1, array2) // results in [1] - -``` - -### matchKeys(obj, keys) - -Find which keys are present - -```javascript - -var obj = {a: 1, b: 2, c: 3}; -var keys = ["a", "e"]; - -Hoek.matchKeys(obj, keys) // returns ["a"] - -``` - -### flatten(array, target) - -Flatten an array - -```javascript - -var array = [1, 2, 3]; -var target = [4, 5]; - -var flattenedArray = Hoek.flatten(array, target) // results in [4, 5, 1, 2, 3]; - -``` - -### removeKeys(object, keys) - -Remove keys - -```javascript - -var object = {a: 1, b: 2, c: 3, d: 4}; - -var keys = ["a", "b"]; - -Hoek.removeKeys(object, keys) // object is now {c: 3, d: 4} - -``` - -### reach(obj, chain) - -Converts an object key chain string to reference - -```javascript - -var chain = 'a.b.c'; -var obj = {a : {b : { c : 1}}}; - -Hoek.reach(obj, chain) // returns 1 - -``` - -### inheritAsync(self, obj, keys) - -Inherits a selected set of methods from an object, wrapping functions in asynchronous syntax and catching errors - -```javascript - -var targetFunc = function () { }; - -var proto = { - a: function () { - return 'a!'; - }, - b: function () { - return 'b!'; - }, - c: function () { - throw new Error('c!'); - } - }; - -var keys = ['a', 'c']; - -Hoek.inheritAsync(targetFunc, proto, ['a', 'c']); - -var target = new targetFunc(); - -target.a(function(err, result){console.log(result)} // returns 'a!' - -target.c(function(err, result){console.log(result)} // returns undefined - -target.b(function(err, result){console.log(result)} // gives error: Object [object Object] has no method 'b' - -``` - -### rename(obj, from, to) - -Rename a key of an object - -```javascript - -var obj = {a : 1, b : 2}; - -Hoek.rename(obj, "a", "c"); // obj is now {c : 1, b : 2} - -``` - - -# Timer - -A Timer object. Initializing a new timer object sets the ts to the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC. - -```javascript - - -example : - - -var timerObj = new Hoek.Timer(); -console.log("Time is now: " + timerObj.ts) -console.log("Elapsed time from initialization: " + timerObj.elapsed() + 'milliseconds') - -``` - -# Binary Encoding/Decoding - -### base64urlEncode(value) - -Encodes value in Base64 or URL encoding - -### base64urlDecode(value) - -Decodes data in Base64 or URL encoding. -# Escaping Characters - -Hoek provides convenient methods for escaping html characters. The escaped characters are as followed: - -```javascript - -internals.htmlEscaped = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '`': '`' -}; - -``` - -### escapeHtml(string) - -```javascript - -var string = '<html> hey </html>'; -var escapedString = Hoek.escapeHtml(string); // returns <html> hey </html> - -``` - -### escapeHeaderAttribute(attribute) - -Escape attribute value for use in HTTP header - -```javascript - -var a = Hoek.escapeHeaderAttribute('I said "go w\\o me"'); //returns I said \"go w\\o me\" - - -``` - - -### escapeRegex(string) - -Escape string for Regex construction - -```javascript - -var a = Hoek.escapeRegex('4^f$s.4*5+-_?%=#!:@|~\\/`"(>)[<]d{}s,'); // returns 4\^f\$s\.4\*5\+\-_\?%\=#\!\:@\|~\\\/`"\(>\)\[<\]d\{\}s\, - - - -``` - -# Errors - -### assert(message) - -```javascript - -var a = 1, b =2; - -Hoek.assert(a === b, 'a should equal b'); // ABORT: a should equal b - -``` - -### abort(message) - -First checks if process.env.NODE_ENV === 'test', and if so, throws error message. Otherwise, -displays most recent stack and then exits process. - - - -### displayStack(slice) - -Displays the trace stack - -```javascript - -var stack = Hoek.displayStack(); -console.log(stack) // returns something like: - -[ 'null (/Users/user/Desktop/hoek/test.js:4:18)', - 'Module._compile (module.js:449:26)', - 'Module._extensions..js (module.js:467:10)', - 'Module.load (module.js:356:32)', - 'Module._load (module.js:312:12)', - 'Module.runMain (module.js:492:10)', - 'startup.processNextTick.process._tickCallback (node.js:244:9)' ] - -``` - -### callStack(slice) - -Returns a trace stack array. - -```javascript - -var stack = Hoek.callStack(); -console.log(stack) // returns something like: - -[ [ '/Users/user/Desktop/hoek/test.js', 4, 18, null, false ], - [ 'module.js', 449, 26, 'Module._compile', false ], - [ 'module.js', 467, 10, 'Module._extensions..js', false ], - [ 'module.js', 356, 32, 'Module.load', false ], - [ 'module.js', 312, 12, 'Module._load', false ], - [ 'module.js', 492, 10, 'Module.runMain', false ], - [ 'node.js', - 244, - 9, - 'startup.processNextTick.process._tickCallback', - false ] ] - - -``` - -### toss(condition) - -toss(condition /*, [message], callback */) - -Return an error as first argument of a callback - - -# Load Files - -### loadPackage(dir) - -Load and parse package.json process root or given directory - -```javascript - -var pack = Hoek.loadPackage(); // pack.name === 'hoek' - -``` - -### loadDirModules(path, excludeFiles, target) - -Loads modules from a given path; option to exclude files (array). - - - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png deleted file mode 100755 index 6ccfcb12..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/index.js deleted file mode 100755 index 4cc88b35..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib'); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js deleted file mode 100755 index 666b3dc8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js +++ /dev/null @@ -1,132 +0,0 @@ -// Declare internals - -var internals = {}; - - -exports.escapeJavaScript = function (input) { - - if (!input) { - return ''; - } - - var escaped = ''; - - for (var i = 0, il = input.length; i < il; ++i) { - - var charCode = input.charCodeAt(i); - - if (internals.isSafe(charCode)) { - escaped += input[i]; - } - else { - escaped += internals.escapeJavaScriptChar(charCode); - } - } - - return escaped; -}; - - -exports.escapeHtml = function (input) { - - if (!input) { - return ''; - } - - var escaped = ''; - - for (var i = 0, il = input.length; i < il; ++i) { - - var charCode = input.charCodeAt(i); - - if (internals.isSafe(charCode)) { - escaped += input[i]; - } - else { - escaped += internals.escapeHtmlChar(charCode); - } - } - - return escaped; -}; - - -internals.escapeJavaScriptChar = function (charCode) { - - if (charCode >= 256) { - return '\\u' + internals.padLeft('' + charCode, 4); - } - - var hexValue = new Buffer(String.fromCharCode(charCode), 'ascii').toString('hex'); - return '\\x' + internals.padLeft(hexValue, 2); -}; - - -internals.escapeHtmlChar = function (charCode) { - - var namedEscape = internals.namedHtml[charCode]; - if (typeof namedEscape !== 'undefined') { - return namedEscape; - } - - if (charCode >= 256) { - return '&#' + charCode + ';'; - } - - var hexValue = new Buffer(String.fromCharCode(charCode), 'ascii').toString('hex'); - return '&#x' + internals.padLeft(hexValue, 2) + ';'; -}; - - -internals.padLeft = function (str, len) { - - while (str.length < len) { - str = '0' + str; - } - - return str; -}; - - -internals.isSafe = function (charCode) { - - return (typeof internals.safeCharCodes[charCode] !== 'undefined'); -}; - - -internals.namedHtml = { - '38': '&', - '60': '<', - '62': '>', - '34': '"', - '160': ' ', - '162': '¢', - '163': '£', - '164': '¤', - '169': '©', - '174': '®' -}; - - -internals.safeCharCodes = (function () { - - var safe = {}; - - for (var i = 32; i < 123; ++i) { - - if ((i >= 97 && i <= 122) || // a-z - (i >= 65 && i <= 90) || // A-Z - (i >= 48 && i <= 57) || // 0-9 - i === 32 || // space - i === 46 || // . - i === 44 || // , - i === 45 || // - - i === 58 || // : - i === 95) { // _ - - safe[i] = null; - } - } - - return safe; -}()); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js deleted file mode 100755 index 806260d2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js +++ /dev/null @@ -1,585 +0,0 @@ -// Load modules - -var Fs = require('fs'); -var Escape = require('./escape'); - - -// Declare internals - -var internals = {}; - - -// Clone object or array - -exports.clone = function (obj, seen) { - - if (typeof obj !== 'object' || - obj === null) { - - return obj; - } - - seen = seen || { orig: [], copy: [] }; - - var lookup = seen.orig.indexOf(obj); - if (lookup !== -1) { - return seen.copy[lookup]; - } - - var newObj = (obj instanceof Array) ? [] : {}; - - seen.orig.push(obj); - seen.copy.push(newObj); - - for (var i in obj) { - if (obj.hasOwnProperty(i)) { - if (obj[i] instanceof Buffer) { - newObj[i] = new Buffer(obj[i]); - } - else if (obj[i] instanceof Date) { - newObj[i] = new Date(obj[i].getTime()); - } - else if (obj[i] instanceof RegExp) { - var flags = '' + (obj[i].global ? 'g' : '') + (obj[i].ignoreCase ? 'i' : '') + (obj[i].multiline ? 'm' : ''); - newObj[i] = new RegExp(obj[i].source, flags); - } - else { - newObj[i] = exports.clone(obj[i], seen); - } - } - } - - return newObj; -}; - - -// Merge all the properties of source into target, source wins in conflic, and by default null and undefined from source are applied - -exports.merge = function (target, source, isNullOverride /* = true */, isMergeArrays /* = true */) { - - exports.assert(target && typeof target == 'object', 'Invalid target value: must be an object'); - exports.assert(source === null || source === undefined || typeof source === 'object', 'Invalid source value: must be null, undefined, or an object'); - - if (!source) { - return target; - } - - if (source instanceof Array) { - exports.assert(target instanceof Array, 'Cannot merge array onto an object'); - if (isMergeArrays === false) { // isMergeArrays defaults to true - target.length = 0; // Must not change target assignment - } - - for (var i = 0, il = source.length; i < il; ++i) { - target.push(source[i]); - } - - return target; - } - - var keys = Object.keys(source); - for (var k = 0, kl = keys.length; k < kl; ++k) { - var key = keys[k]; - var value = source[key]; - if (value && - typeof value === 'object') { - - if (!target[key] || - typeof target[key] !== 'object') { - - target[key] = exports.clone(value); - } - else { - exports.merge(target[key], source[key], isNullOverride, isMergeArrays); - } - } - else { - if (value !== null && value !== undefined) { // Explicit to preserve empty strings - target[key] = value; - } - else if (isNullOverride !== false) { // Defaults to true - target[key] = value; - } - } - } - - return target; -}; - - -// Apply options to a copy of the defaults - -exports.applyToDefaults = function (defaults, options) { - - exports.assert(defaults && typeof defaults == 'object', 'Invalid defaults value: must be an object'); - exports.assert(!options || options === true || typeof options === 'object', 'Invalid options value: must be true, falsy or an object'); - - if (!options) { // If no options, return null - return null; - } - - var copy = exports.clone(defaults); - - if (options === true) { // If options is set to true, use defaults - return copy; - } - - return exports.merge(copy, options, false, false); -}; - - -// Remove duplicate items from array - -exports.unique = function (array, key) { - - var index = {}; - var result = []; - - for (var i = 0, il = array.length; i < il; ++i) { - var id = (key ? array[i][key] : array[i]); - if (index[id] !== true) { - - result.push(array[i]); - index[id] = true; - } - } - - return result; -}; - - -// Convert array into object - -exports.mapToObject = function (array, key) { - - if (!array) { - return null; - } - - var obj = {}; - for (var i = 0, il = array.length; i < il; ++i) { - if (key) { - if (array[i][key]) { - obj[array[i][key]] = true; - } - } - else { - obj[array[i]] = true; - } - } - - return obj; -}; - - -// Find the common unique items in two arrays - -exports.intersect = function (array1, array2, justFirst) { - - if (!array1 || !array2) { - return []; - } - - var common = []; - var hash = (array1 instanceof Array ? exports.mapToObject(array1) : array1); - var found = {}; - for (var i = 0, il = array2.length; i < il; ++i) { - if (hash[array2[i]] && !found[array2[i]]) { - if (justFirst) { - return array2[i]; - } - - common.push(array2[i]); - found[array2[i]] = true; - } - } - - return (justFirst ? null : common); -}; - - -// Find which keys are present - -exports.matchKeys = function (obj, keys) { - - var matched = []; - for (var i = 0, il = keys.length; i < il; ++i) { - if (obj.hasOwnProperty(keys[i])) { - matched.push(keys[i]); - } - } - return matched; -}; - - -// Flatten array - -exports.flatten = function (array, target) { - - var result = target || []; - - for (var i = 0, il = array.length; i < il; ++i) { - if (Array.isArray(array[i])) { - exports.flatten(array[i], result); - } - else { - result.push(array[i]); - } - } - - return result; -}; - - -// Remove keys - -exports.removeKeys = function (object, keys) { - - for (var i = 0, il = keys.length; i < il; i++) { - delete object[keys[i]]; - } -}; - - -// Convert an object key chain string ('a.b.c') to reference (object[a][b][c]) - -exports.reach = function (obj, chain) { - - var path = chain.split('.'); - var ref = obj; - for (var i = 0, il = path.length; i < il; ++i) { - if (ref) { - ref = ref[path[i]]; - } - } - - return ref; -}; - - -// Inherits a selected set of methods from an object, wrapping functions in asynchronous syntax and catching errors - -exports.inheritAsync = function (self, obj, keys) { - - keys = keys || null; - - for (var i in obj) { - if (obj.hasOwnProperty(i)) { - if (keys instanceof Array && - keys.indexOf(i) < 0) { - - continue; - } - - self.prototype[i] = (function (fn) { - - return function (next) { - - var result = null; - try { - result = fn(); - } - catch (err) { - return next(err); - } - - return next(null, result); - }; - })(obj[i]); - } - } -}; - - -exports.formatStack = function (stack) { - - var trace = []; - for (var i = 0, il = stack.length; i < il; ++i) { - var item = stack[i]; - trace.push([item.getFileName(), item.getLineNumber(), item.getColumnNumber(), item.getFunctionName(), item.isConstructor()]); - } - - return trace; -}; - - -exports.formatTrace = function (trace) { - - var display = []; - - for (var i = 0, il = trace.length; i < il; ++i) { - var row = trace[i]; - display.push((row[4] ? 'new ' : '') + row[3] + ' (' + row[0] + ':' + row[1] + ':' + row[2] + ')'); - } - - return display; -}; - - -exports.callStack = function (slice) { - - // http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi - - var v8 = Error.prepareStackTrace; - Error.prepareStackTrace = function (err, stack) { - - return stack; - }; - - var capture = {}; - Error.captureStackTrace(capture, arguments.callee); - var stack = capture.stack; - - Error.prepareStackTrace = v8; - - var trace = exports.formatStack(stack); - - if (slice) { - return trace.slice(slice); - } - - return trace; -}; - - -exports.displayStack = function (slice) { - - var trace = exports.callStack(slice === undefined ? 1 : slice + 1); - - return exports.formatTrace(trace); -}; - - -exports.abortThrow = false; - - -exports.abort = function (message, hideStack) { - - if (process.env.NODE_ENV === 'test' || exports.abortThrow === true) { - throw new Error(message || 'Unknown error'); - } - - var stack = ''; - if (!hideStack) { - stack = exports.displayStack(1).join('\n\t'); - } - console.log('ABORT: ' + message + '\n\t' + stack); - process.exit(1); -}; - - -exports.assert = function (condition /*, msg1, msg2, msg3 */) { - - if (condition) { - return; - } - - var msgs = Array.prototype.slice.call(arguments, 1); - msgs = msgs.map(function (msg) { - - return typeof msg === 'string' ? msg : msg instanceof Error ? msg.message : JSON.stringify(msg); - }); - throw new Error(msgs.join(' ') || 'Unknown error'); -}; - - -exports.loadDirModules = function (path, excludeFiles, target) { // target(filename, name, capName) - - var exclude = {}; - for (var i = 0, il = excludeFiles.length; i < il; ++i) { - exclude[excludeFiles[i] + '.js'] = true; - } - - var files = Fs.readdirSync(path); - for (i = 0, il = files.length; i < il; ++i) { - var filename = files[i]; - if (/\.js$/.test(filename) && - !exclude[filename]) { - - var name = filename.substr(0, filename.lastIndexOf('.')); - var capName = name.charAt(0).toUpperCase() + name.substr(1).toLowerCase(); - - if (typeof target !== 'function') { - target[capName] = require(path + '/' + name); - } - else { - target(path + '/' + name, name, capName); - } - } - } -}; - - -exports.rename = function (obj, from, to) { - - obj[to] = obj[from]; - delete obj[from]; -}; - - -exports.Timer = function () { - - this.reset(); -}; - - -exports.Timer.prototype.reset = function () { - - this.ts = Date.now(); -}; - - -exports.Timer.prototype.elapsed = function () { - - return Date.now() - this.ts; -}; - - -// Load and parse package.json process root or given directory - -exports.loadPackage = function (dir) { - - var result = {}; - var filepath = (dir || process.env.PWD) + '/package.json'; - if (Fs.existsSync(filepath)) { - try { - result = JSON.parse(Fs.readFileSync(filepath)); - } - catch (e) { } - } - - return result; -}; - - -// Escape string for Regex construction - -exports.escapeRegex = function (string) { - - // Escape ^$.*+-?=!:|\/()[]{}, - return string.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g, '\\$&'); -}; - - -// Return an error as first argument of a callback - -exports.toss = function (condition /*, [message], next */) { - - var message = (arguments.length === 3 ? arguments[1] : ''); - var next = (arguments.length === 3 ? arguments[2] : arguments[1]); - - var err = (message instanceof Error ? message : (message ? new Error(message) : (condition instanceof Error ? condition : new Error()))); - - if (condition instanceof Error || - !condition) { - - return next(err); - } -}; - - -// Base64url (RFC 4648) encode - -exports.base64urlEncode = function (value) { - - return (new Buffer(value, 'binary')).toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, ''); -}; - - -// Base64url (RFC 4648) decode - -exports.base64urlDecode = function (encoded) { - - if (encoded && - !encoded.match(/^[\w\-]*$/)) { - - return new Error('Invalid character'); - } - - try { - return (new Buffer(encoded.replace(/-/g, '+').replace(/:/g, '/'), 'base64')).toString('binary'); - } - catch (err) { - return err; - } -}; - - -// Escape attribute value for use in HTTP header - -exports.escapeHeaderAttribute = function (attribute) { - - // Allowed value characters: !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9, \, " - - exports.assert(attribute.match(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/), 'Bad attribute value (' + attribute + ')'); - - return attribute.replace(/\\/g, '\\\\').replace(/\"/g, '\\"'); // Escape quotes and slash -}; - - -exports.escapeHtml = function (string) { - - return Escape.escapeHtml(string); -}; - - -exports.escapeJavaScript = function (string) { - - return Escape.escapeJavaScript(string); -}; - - -/* -var event = { - timestamp: now.getTime(), - tags: ['tag'], - data: { some: 'data' } -}; -*/ - -exports.consoleFunc = console.log; - -exports.printEvent = function (event) { - - var pad = function (value) { - - return (value < 10 ? '0' : '') + value; - }; - - var now = new Date(event.timestamp); - var timestring = (now.getYear() - 100).toString() + - pad(now.getMonth() + 1) + - pad(now.getDate()) + - '/' + - pad(now.getHours()) + - pad(now.getMinutes()) + - pad(now.getSeconds()) + - '.' + - now.getMilliseconds(); - - var data = event.data; - if (typeof event.data !== 'string') { - try { - data = JSON.stringify(event.data); - } - catch (e) { - data = 'JSON Error: ' + e.message; - } - } - - var output = timestring + ', ' + event.tags[0] + ', ' + data; - exports.consoleFunc(output); -}; - - -exports.nextTick = function (callback) { - - return function () { - - var args = arguments; - process.nextTick(function () { - - callback.apply(null, args); - }); - }; -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/package.json deleted file mode 100755 index 158eb318..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "hoek", - "description": "General purpose node utilities", - "version": "0.9.1", - "author": { - "name": "Eran Hammer", - "email": "eran@hueniverse.com", - "url": "http://hueniverse.com" - }, - "contributors": [ - { - "name": "Van Nguyen", - "email": "the.gol.effect@gmail.com" - } - ], - "repository": { - "type": "git", - "url": "git://github.com/spumko/hoek" - }, - "main": "index", - "keywords": [ - "utilities" - ], - "engines": { - "node": ">=0.8.0" - }, - "dependencies": {}, - "devDependencies": { - "lab": "0.1.x", - "complexity-report": "0.x.x" - }, - "scripts": { - "test": "make test-cov" - }, - "licenses": [ - { - "type": "BSD", - "url": "http://github.com/spumko/hoek/raw/master/LICENSE" - } - ], - "readme": "<a href=\"https://github.com/spumko\"><img src=\"https://raw.github.com/spumko/spumko/master/images/from.png\" align=\"right\" /></a>\r\n![hoek Logo](https://raw.github.com/spumko/hoek/master/images/hoek.png)\r\n\r\nGeneral purpose node utilities\r\n\r\n[![Build Status](https://secure.travis-ci.org/spumko/hoek.png)](http://travis-ci.org/spumko/hoek)\r\n\r\n# Table of Contents\r\n\r\n* [Introduction](#introduction \"Introduction\")\r\n* [Object](#object \"Object\")\r\n * [clone](#cloneobj \"clone\")\r\n * [merge](#mergetarget-source-isnulloverride-ismergearrays \"merge\")\r\n * [applyToDefaults](#applytodefaultsdefaults-options \"applyToDefaults\")\r\n * [unique](#uniquearray-key \"unique\")\r\n * [mapToObject](#maptoobjectarray-key \"mapToObject\")\r\n * [intersect](#intersectarray1-array2 \"intersect\")\r\n * [matchKeys](#matchkeysobj-keys \"matchKeys\")\r\n * [flatten](#flattenarray-target \"flatten\")\r\n * [removeKeys](#removekeysobject-keys \"removeKeys\")\r\n * [reach](#reachobj-chain \"reach\")\r\n * [inheritAsync](#inheritasyncself-obj-keys \"inheritAsync\")\r\n * [rename](#renameobj-from-to \"rename\")\r\n* [Timer](#timer \"Timer\")\r\n* [Binary Encoding/Decoding](#binary \"Binary Encoding/Decoding\")\r\n * [base64urlEncode](#binary64urlEncodevalue \"binary64urlEncode\")\r\n * [base64urlDecode](#binary64urlDecodevalue \"binary64urlDecode\")\r\n* [Escaping Characters](#escaped \"Escaping Characters\")\r\n * [escapeHtml](#escapeHtmlstring \"escapeHtml\")\r\n * [escapeHeaderAttribute](#escapeHeaderAttributeattribute \"escapeHeaderAttribute\")\r\n * [escapeRegex](#escapeRegexstring \"escapeRegex\")\r\n* [Errors](#errors \"Errors\")\r\n * [assert](#assertmessage \"assert\")\r\n * [abort](#abortmessage \"abort\")\r\n * [displayStack](#displayStackslice \"displayStack\")\r\n * [callStack](#callStackslice \"callStack\")\r\n * [toss](#tosscondition \"toss\")\r\n* [Load files](#load-files \"Load Files\")\r\n * [loadPackage](#loadPackagedir \"loadpackage\")\r\n * [loadDirModules](#loadDirModulespath-excludefiles-target \"loaddirmodules\")\r\n\r\n\r\n\r\n# Introduction\r\n\r\nThe *Hoek* general purpose node utilities library is used to aid in a variety of manners. It comes with useful methods for Arrays (clone, merge, applyToDefaults), Objects (removeKeys, copy), Asserting and more. \r\n\r\nFor example, to use Hoek to set configuration with default options:\r\n```javascript\r\nvar Hoek = require('hoek');\r\n\r\nvar default = {url : \"www.github.com\", port : \"8000\", debug : true}\r\n\r\nvar config = Hoek.applyToDefaults(default, {port : \"3000\", admin : true});\r\n\r\n// In this case, config would be { url: 'www.github.com', port: '3000', debug: true, admin: true }\r\n```\r\n\r\nUnder each of the sections (such as Array), there are subsections which correspond to Hoek methods. Each subsection will explain how to use the corresponding method. In each js excerpt below, the var Hoek = require('hoek') is omitted for brevity.\r\n\r\n## Object\r\n\r\nHoek provides several helpful methods for objects and arrays.\r\n\r\n### clone(obj)\r\n\r\nThis method is used to clone an object or an array. A *deep copy* is made (duplicates everything, including values that are objects). \r\n\r\n```javascript\r\n\r\nvar nestedObj = {\r\n w: /^something$/ig,\r\n x: {\r\n a: [1, 2, 3],\r\n b: 123456,\r\n c: new Date()\r\n },\r\n y: 'y',\r\n z: new Date()\r\n };\r\n\r\nvar copy = Hoek.clone(nestedObj);\r\n\r\ncopy.x.b = 100;\r\n\r\nconsole.log(copy.y) // results in 'y'\r\nconsole.log(nestedObj.x.b) // results in 123456\r\nconsole.log(copy.x.b) // results in 100\r\n```\r\n\r\n### merge(target, source, isNullOverride, isMergeArrays)\r\nisNullOverride, isMergeArrays default to true\r\n\r\nMerge all the properties of source into target, source wins in conflic, and by default null and undefined from source are applied\r\n\r\n\r\n```javascript\r\n\r\nvar target = {a: 1, b : 2}\r\nvar source = {a: 0, c: 5}\r\nvar source2 = {a: null, c: 5}\r\n\r\nvar targetArray = [1, 2, 3];\r\nvar sourceArray = [4, 5];\r\n\r\nvar newTarget = Hoek.merge(target, source); // results in {a: 0, b: 2, c: 5}\r\nnewTarget = Hoek.merge(target, source2); // results in {a: null, b: 2, c: 5}\r\nnewTarget = Hoek.merge(target, source2, false); // results in {a: 1, b: 2, c: 5}\r\n\r\nnewTarget = Hoek.merge(targetArray, sourceArray) // results in [1, 2, 3, 4, 5]\r\nnewTarget = Hoek.merge(targetArray, sourceArray, true, false) // results in [4, 5]\r\n\r\n\r\n\r\n\r\n```\r\n\r\n### applyToDefaults(defaults, options)\r\n\r\nApply options to a copy of the defaults\r\n\r\n```javascript\r\n\r\nvar defaults = {host: \"localhost\", port: 8000};\r\nvar options = {port: 8080};\r\n\r\nvar config = Hoek.applyToDefaults(defaults, options); // results in {host: \"localhost\", port: 8080};\r\n\r\n\r\n```\r\n\r\n### unique(array, key)\r\n\r\nRemove duplicate items from Array\r\n\r\n```javascript\r\n\r\nvar array = [1, 2, 2, 3, 3, 4, 5, 6];\r\n\r\nvar newArray = Hoek.unique(array); // results in [1,2,3,4,5,6];\r\n\r\narray = [{id: 1}, {id: 1}, {id: 2}];\r\n\r\nnewArray = Hoek.unique(array, \"id\") // results in [{id: 1}, {id: 2}]\r\n\r\n```\r\n\r\n### mapToObject(array, key)\r\n\r\nConvert an Array into an Object\r\n\r\n```javascript\r\n\r\nvar array = [1,2,3];\r\nvar newObject = Hoek.mapToObject(array); // results in [{\"1\": true}, {\"2\": true}, {\"3\": true}]\r\n\r\narray = [{id: 1}, {id: 2}];\r\nnewObject = Hoek.mapToObject(array, \"id\") // results in [{\"id\": 1}, {\"id\": 2}]\r\n\r\n```\r\n### intersect(array1, array2)\r\n\r\nFind the common unique items in two arrays\r\n\r\n```javascript\r\n\r\nvar array1 = [1, 2, 3];\r\nvar array2 = [1, 4, 5];\r\n\r\nvar newArray = Hoek.intersect(array1, array2) // results in [1]\r\n\r\n```\r\n\r\n### matchKeys(obj, keys) \r\n\r\nFind which keys are present\r\n\r\n```javascript\r\n\r\nvar obj = {a: 1, b: 2, c: 3};\r\nvar keys = [\"a\", \"e\"];\r\n\r\nHoek.matchKeys(obj, keys) // returns [\"a\"]\r\n\r\n```\r\n\r\n### flatten(array, target)\r\n\r\nFlatten an array\r\n\r\n```javascript\r\n\r\nvar array = [1, 2, 3];\r\nvar target = [4, 5]; \r\n\r\nvar flattenedArray = Hoek.flatten(array, target) // results in [4, 5, 1, 2, 3];\r\n\r\n```\r\n\r\n### removeKeys(object, keys)\r\n\r\nRemove keys\r\n\r\n```javascript\r\n\r\nvar object = {a: 1, b: 2, c: 3, d: 4};\r\n\r\nvar keys = [\"a\", \"b\"];\r\n\r\nHoek.removeKeys(object, keys) // object is now {c: 3, d: 4}\r\n\r\n```\r\n\r\n### reach(obj, chain)\r\n\r\nConverts an object key chain string to reference\r\n\r\n```javascript\r\n\r\nvar chain = 'a.b.c';\r\nvar obj = {a : {b : { c : 1}}};\r\n\r\nHoek.reach(obj, chain) // returns 1\r\n\r\n```\r\n\r\n### inheritAsync(self, obj, keys) \r\n\r\nInherits a selected set of methods from an object, wrapping functions in asynchronous syntax and catching errors\r\n\r\n```javascript\r\n\r\nvar targetFunc = function () { };\r\n\r\nvar proto = {\r\n a: function () {\r\n return 'a!';\r\n },\r\n b: function () {\r\n return 'b!';\r\n },\r\n c: function () {\r\n throw new Error('c!');\r\n }\r\n };\r\n\r\nvar keys = ['a', 'c'];\r\n\r\nHoek.inheritAsync(targetFunc, proto, ['a', 'c']);\r\n\r\nvar target = new targetFunc();\r\n\r\ntarget.a(function(err, result){console.log(result)} // returns 'a!' \r\n\r\ntarget.c(function(err, result){console.log(result)} // returns undefined\r\n\r\ntarget.b(function(err, result){console.log(result)} // gives error: Object [object Object] has no method 'b'\r\n\r\n```\r\n\r\n### rename(obj, from, to)\r\n\r\nRename a key of an object\r\n\r\n```javascript\r\n\r\nvar obj = {a : 1, b : 2};\r\n\r\nHoek.rename(obj, \"a\", \"c\"); // obj is now {c : 1, b : 2}\r\n\r\n```\r\n\r\n\r\n# Timer\r\n\r\nA Timer object. Initializing a new timer object sets the ts to the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.\r\n\r\n```javascript\r\n\r\n\r\nexample : \r\n\r\n\r\nvar timerObj = new Hoek.Timer();\r\nconsole.log(\"Time is now: \" + timerObj.ts)\r\nconsole.log(\"Elapsed time from initialization: \" + timerObj.elapsed() + 'milliseconds')\r\n\r\n```\r\n\r\n# Binary Encoding/Decoding\r\n\r\n### base64urlEncode(value)\r\n\r\nEncodes value in Base64 or URL encoding\r\n\r\n### base64urlDecode(value)\r\n\r\nDecodes data in Base64 or URL encoding.\r\n# Escaping Characters\r\n\r\nHoek provides convenient methods for escaping html characters. The escaped characters are as followed:\r\n\r\n```javascript\r\n\r\ninternals.htmlEscaped = {\r\n '&': '&',\r\n '<': '<',\r\n '>': '>',\r\n '\"': '"',\r\n \"'\": ''',\r\n '`': '`'\r\n};\r\n\r\n```\r\n\r\n### escapeHtml(string)\r\n\r\n```javascript\r\n\r\nvar string = '<html> hey </html>';\r\nvar escapedString = Hoek.escapeHtml(string); // returns <html> hey </html>\r\n\r\n```\r\n\r\n### escapeHeaderAttribute(attribute)\r\n\r\nEscape attribute value for use in HTTP header\r\n\r\n```javascript\r\n\r\nvar a = Hoek.escapeHeaderAttribute('I said \"go w\\\\o me\"'); //returns I said \\\"go w\\\\o me\\\"\r\n\r\n\r\n```\r\n\r\n\r\n### escapeRegex(string)\r\n\r\nEscape string for Regex construction\r\n\r\n```javascript\r\n\r\nvar a = Hoek.escapeRegex('4^f$s.4*5+-_?%=#!:@|~\\\\/`\"(>)[<]d{}s,'); // returns 4\\^f\\$s\\.4\\*5\\+\\-_\\?%\\=#\\!\\:@\\|~\\\\\\/`\"\\(>\\)\\[<\\]d\\{\\}s\\,\r\n\r\n\r\n\r\n```\r\n\r\n# Errors\r\n\r\n### assert(message)\r\n\r\n```javascript\r\n\r\nvar a = 1, b =2;\r\n\r\nHoek.assert(a === b, 'a should equal b'); // ABORT: a should equal b\r\n\r\n```\r\n\r\n### abort(message)\r\n\r\nFirst checks if process.env.NODE_ENV === 'test', and if so, throws error message. Otherwise,\r\ndisplays most recent stack and then exits process.\r\n\r\n\r\n\r\n### displayStack(slice)\r\n\r\nDisplays the trace stack\r\n\r\n```javascript\r\n\r\nvar stack = Hoek.displayStack();\r\nconsole.log(stack) // returns something like:\r\n\r\n[ 'null (/Users/user/Desktop/hoek/test.js:4:18)',\r\n 'Module._compile (module.js:449:26)',\r\n 'Module._extensions..js (module.js:467:10)',\r\n 'Module.load (module.js:356:32)',\r\n 'Module._load (module.js:312:12)',\r\n 'Module.runMain (module.js:492:10)',\r\n 'startup.processNextTick.process._tickCallback (node.js:244:9)' ]\r\n\r\n```\r\n\r\n### callStack(slice)\r\n\r\nReturns a trace stack array.\r\n\r\n```javascript\r\n\r\nvar stack = Hoek.callStack();\r\nconsole.log(stack) // returns something like:\r\n\r\n[ [ '/Users/user/Desktop/hoek/test.js', 4, 18, null, false ],\r\n [ 'module.js', 449, 26, 'Module._compile', false ],\r\n [ 'module.js', 467, 10, 'Module._extensions..js', false ],\r\n [ 'module.js', 356, 32, 'Module.load', false ],\r\n [ 'module.js', 312, 12, 'Module._load', false ],\r\n [ 'module.js', 492, 10, 'Module.runMain', false ],\r\n [ 'node.js',\r\n 244,\r\n 9,\r\n 'startup.processNextTick.process._tickCallback',\r\n false ] ]\r\n\r\n\r\n```\r\n\r\n### toss(condition)\r\n\r\ntoss(condition /*, [message], callback */)\r\n\r\nReturn an error as first argument of a callback\r\n\r\n\r\n# Load Files\r\n\r\n### loadPackage(dir)\r\n\r\nLoad and parse package.json process root or given directory\r\n\r\n```javascript\r\n\r\nvar pack = Hoek.loadPackage(); // pack.name === 'hoek'\r\n\r\n```\r\n\r\n### loadDirModules(path, excludeFiles, target) \r\n\r\nLoads modules from a given path; option to exclude files (array).\r\n\r\n\r\n\r\n\r\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/spumko/hoek/issues" - }, - "homepage": "https://github.com/spumko/hoek", - "_id": "hoek@0.9.1", - "dist": { - "shasum": "8525a65589a017e905052fd24b26898c26a20c6f" - }, - "_from": "hoek@0.9.x", - "_resolved": "https://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js deleted file mode 100644 index 4dddd77d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js +++ /dev/null @@ -1,86 +0,0 @@ -// Load modules - -var Lab = require('lab'); -var Hoek = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hoek', function () { - - describe('#escapeJavaScript', function () { - - it('encodes / characters', function (done) { - - var encoded = Hoek.escapeJavaScript('<script>alert(1)</script>'); - expect(encoded).to.equal('\\x3cscript\\x3ealert\\x281\\x29\\x3c\\x2fscript\\x3e'); - done(); - }); - - it('encodes \' characters', function (done) { - - var encoded = Hoek.escapeJavaScript('something(\'param\')'); - expect(encoded).to.equal('something\\x28\\x27param\\x27\\x29'); - done(); - }); - - it('encodes large unicode characters with the correct padding', function (done) { - - var encoded = Hoek.escapeJavaScript(String.fromCharCode(500) + String.fromCharCode(1000)); - expect(encoded).to.equal('\\u0500\\u1000'); - done(); - }); - - it('doesn\'t throw an exception when passed null', function (done) { - - var encoded = Hoek.escapeJavaScript(null); - expect(encoded).to.equal(''); - done(); - }); - }); - - describe('#escapeHtml', function () { - - it('encodes / characters', function (done) { - - var encoded = Hoek.escapeHtml('<script>alert(1)</script>'); - expect(encoded).to.equal('<script>alert(1)</script>'); - done(); - }); - - it('encodes < and > as named characters', function (done) { - - var encoded = Hoek.escapeHtml('<script><>'); - expect(encoded).to.equal('<script><>'); - done(); - }); - - it('encodes large unicode characters', function (done) { - - var encoded = Hoek.escapeHtml(String.fromCharCode(500) + String.fromCharCode(1000)); - expect(encoded).to.equal('ǴϨ'); - done(); - }); - - it('doesn\'t throw an exception when passed null', function (done) { - - var encoded = Hoek.escapeHtml(null); - expect(encoded).to.equal(''); - done(); - }); - }); -}); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js deleted file mode 100755 index c40e3ad9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js +++ /dev/null @@ -1,1078 +0,0 @@ -// Load modules - -var Lab = require('lab'); -var Hoek = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hoek', function () { - - var nestedObj = { - v: [7,8,9], - w: /^something$/igm, - x: { - a: [1, 2, 3], - b: 123456, - c: new Date(), - d: /hi/igm, - e: /hello/ - }, - y: 'y', - z: new Date() - }; - - var dupsArray = [nestedObj, { z: 'z' }, nestedObj]; - var reducedDupsArray = [nestedObj, { z: 'z' }]; - - describe('#clone', function () { - - it('should clone a nested object', function (done) { - - var a = nestedObj; - var b = Hoek.clone(a); - - expect(a).to.deep.equal(b); - expect(a.z.getTime()).to.equal(b.z.getTime()); - done(); - }); - - it('should clone a null object', function (done) { - - var b = Hoek.clone(null); - - expect(b).to.equal(null); - done(); - }); - - it('should not convert undefined properties to null', function (done) { - - var obj = { something: undefined }; - var b = Hoek.clone(obj); - - expect(typeof b.something).to.equal('undefined'); - done(); - }); - - it('should not throw on circular reference', function (done) { - - var a = {}; - a.x = a; - - var test = (function () { - - var b = Hoek.clone(a); - }); - - expect(test).to.not.throw(); - done(); - }); - - it('should properly clone circular reference', function (done) { - - var x = { - 'z': new Date() - }; - x.y = x; - - var b = Hoek.clone(x); - expect(Object.keys(b.y)).to.deep.equal(Object.keys(x)) - expect(b.z).to.not.equal(x.z); - expect(b.y).to.not.equal(x.y); - expect(b.y.z).to.not.equal(x.y.z); - expect(b.y).to.equal(b); - expect(b.y.y.y.y).to.equal(b); - done(); - }); - - it('should properly clone deeply nested object', function (done) { - - var a = { - x: { - y: { - a: [1, 2, 3], - b: 123456, - c: new Date(), - d: /hi/igm, - e: /hello/ - }, - } - }; - - var b = Hoek.clone(a); - - expect(a).to.deep.equal(b); - expect(a.x.y.c.getTime()).to.equal(b.x.y.c.getTime()); - done(); - }); - - it('should properly clone arrays', function (done) { - - var a = [1,2,3]; - - var b = Hoek.clone(a); - - expect(a).to.deep.equal(b); - done(); - }); - - it('should perform actual copy for shallow keys (no pass by reference)', function (done) { - - var x = Hoek.clone(nestedObj); - var y = Hoek.clone(nestedObj); - - // Date - expect(x.z).to.not.equal(nestedObj.z); - expect(x.z).to.not.equal(y.z); - - // Regex - expect(x.w).to.not.equal(nestedObj.w); - expect(x.w).to.not.equal(y.w); - - // Array - expect(x.v).to.not.equal(nestedObj.v); - expect(x.v).to.not.equal(y.v); - - // Immutable(s) - x.y = 5; - expect(x.y).to.not.equal(nestedObj.y); - expect(x.y).to.not.equal(y.y); - - done(); - }); - - it('should perform actual copy for deep keys (no pass by reference)', function (done) { - - var x = Hoek.clone(nestedObj); - var y = Hoek.clone(nestedObj); - - expect(x.x.c).to.not.equal(nestedObj.x.c); - expect(x.x.c).to.not.equal(y.x.c); - - expect(x.x.c.getTime()).to.equal(nestedObj.x.c.getTime()); - expect(x.x.c.getTime()).to.equal(y.x.c.getTime()); - done(); - }); - - it('copies functions with properties', function (done) { - - var a = { - x: function () { return 1; }, - y: {} - }; - a.x.z = 'string in function'; - a.x.v = function () { return 2; }; - a.y.u = a.x; - - var b = Hoek.clone(a); - expect(b.x()).to.equal(1); - expect(b.x.v()).to.equal(2); - expect(b.y.u).to.equal(b.x); - expect(b.x.z).to.equal('string in function'); - done(); - }); - - it('should copy a buffer', function(done){ - var tls = { - key: new Buffer([1,2,3,4,5]), - cert: new Buffer([1,2,3,4,5,6,10]) - } - - copiedTls = Hoek.clone(tls); - expect(Buffer.isBuffer(copiedTls.key)).to.equal(true); - expect(JSON.stringify(copiedTls.key)).to.equal(JSON.stringify(tls.key)) - expect(Buffer.isBuffer(copiedTls.cert)).to.equal(true); - expect(JSON.stringify(copiedTls.cert)).to.equal(JSON.stringify(tls.cert)) - done(); - }); - }); - - describe('#merge', function () { - - it('does not throw if source is null', function (done) { - - var a = {}; - var b = null; - var c = null; - - expect(function () { - - c = Hoek.merge(a, b); - }).to.not.throw(); - - expect(c).to.equal(a); - done(); - }); - - it('does not throw if source is undefined', function (done) { - - var a = {}; - var b = undefined; - var c = null; - - expect(function () { - - c = Hoek.merge(a, b); - }).to.not.throw(); - - expect(c).to.equal(a); - done(); - }); - - it('throws if source is not an object', function (done) { - - expect(function () { - - var a = {}; - var b = 0; - - Hoek.merge(a, b); - }).to.throw('Invalid source value: must be null, undefined, or an object'); - done(); - }); - - it('throws if target is not an object', function (done) { - - expect(function () { - - var a = 0; - var b = {}; - - Hoek.merge(a, b); - }).to.throw('Invalid target value: must be an object'); - done(); - }); - - it('throws if target is not an array and source is', function (done) { - - expect(function () { - - var a = {}; - var b = [1, 2]; - - Hoek.merge(a, b); - }).to.throw('Cannot merge array onto an object'); - done(); - }); - - it('returns the same object when merging arrays', function (done) { - - var a = []; - var b = [1, 2]; - - expect(Hoek.merge(a, b)).to.equal(a); - done(); - }); - - it('should combine an empty object with a non-empty object', function (done) { - - var a = {}; - var b = nestedObj; - - var c = Hoek.merge(a, b); - expect(a).to.deep.equal(b); - expect(c).to.deep.equal(b); - done(); - }); - - it('should override values in target', function (done) { - - var a = { x: 1, y: 2, z: 3, v: 5, t: 'test', m: 'abc' }; - var b = { x: null, z: 4, v: 0, t: { u: 6 }, m: '123' }; - - var c = Hoek.merge(a, b); - expect(c.x).to.equal(null); - expect(c.y).to.equal(2); - expect(c.z).to.equal(4); - expect(c.v).to.equal(0); - expect(c.m).to.equal('123'); - expect(c.t).to.deep.equal({ u: 6 }); - done(); - }); - - it('should override values in target (flip)', function (done) { - - var a = { x: 1, y: 2, z: 3, v: 5, t: 'test', m: 'abc' }; - var b = { x: null, z: 4, v: 0, t: { u: 6 }, m: '123' }; - - var d = Hoek.merge(b, a); - expect(d.x).to.equal(1); - expect(d.y).to.equal(2); - expect(d.z).to.equal(3); - expect(d.v).to.equal(5); - expect(d.m).to.equal('abc'); - expect(d.t).to.deep.equal('test'); - done(); - }); - }); - - describe('#applyToDefaults', function () { - - var defaults = { - a: 1, - b: 2, - c: { - d: 3, - e: [5, 6] - }, - f: 6, - g: 'test' - }; - - it('should return null if options is false', function (done) { - - var result = Hoek.applyToDefaults(defaults, false); - expect(result).to.equal(null); - done(); - }); - - it('should return a copy of defaults if options is true', function (done) { - - var result = Hoek.applyToDefaults(defaults, true); - expect(result).to.deep.equal(result); - done(); - }); - - it('should apply object to defaults', function (done) { - - var obj = { - a: null, - c: { - e: [4] - }, - f: 0, - g: { - h: 5 - } - }; - - var result = Hoek.applyToDefaults(defaults, obj); - expect(result.c.e).to.deep.equal([4]); - expect(result.a).to.equal(1); - expect(result.b).to.equal(2); - expect(result.f).to.equal(0); - expect(result.g).to.deep.equal({ h: 5 }); - done(); - }); - }); - - describe('#unique', function () { - - it('should ensure uniqueness within array of objects based on subkey', function (done) { - - var a = Hoek.unique(dupsArray, 'x'); - expect(a).to.deep.equal(reducedDupsArray); - done(); - }); - - it('removes duplicated without key', function (done) { - - expect(Hoek.unique([1, 2, 3, 4, 2, 1, 5])).to.deep.equal([1, 2, 3, 4, 5]); - done(); - }); - }); - - describe('#mapToObject', function () { - - it('should return null on null array', function (done) { - - var a = Hoek.mapToObject(null); - expect(a).to.equal(null); - done(); - }); - - it('should convert basic array to existential object', function (done) { - - var keys = [1, 2, 3, 4]; - var a = Hoek.mapToObject(keys); - for (var i in keys) { - expect(a[keys[i]]).to.equal(true); - } - done(); - }); - - it('should convert array of objects to existential object', function (done) { - - var keys = [{ x: 1 }, { x: 2 }, { x: 3 }]; - var subkey = 'x'; - var a = Hoek.mapToObject(keys, subkey); - for (var i in keys) { - expect(a[keys[i][subkey]]).to.equal(true); - } - done(); - }); - }); - - describe('#intersect', function () { - - it('should return the common objects of two arrays', function (done) { - - var array1 = [1, 2, 3, 4, 4, 5, 5]; - var array2 = [5, 4, 5, 6, 7]; - var common = Hoek.intersect(array1, array2); - expect(common.length).to.equal(2); - done(); - }); - - it('should return just the first common object of two arrays', function (done) { - - var array1 = [1, 2, 3, 4, 4, 5, 5]; - var array2 = [5, 4, 5, 6, 7]; - var common = Hoek.intersect(array1, array2, true); - expect(common).to.equal(5); - done(); - }); - - it('should return an empty array if either input is null', function (done) { - - expect(Hoek.intersect([1], null).length).to.equal(0); - expect(Hoek.intersect(null, [1]).length).to.equal(0); - done(); - }); - - it('should return the common objects of object and array', function (done) { - - var array1 = [1, 2, 3, 4, 4, 5, 5]; - var array2 = [5, 4, 5, 6, 7]; - var common = Hoek.intersect(Hoek.mapToObject(array1), array2); - expect(common.length).to.equal(2); - done(); - }); - }); - - describe('#matchKeys', function () { - - it('should match the existing object keys', function (done) { - - var obj = { - a: 1, - b: 2, - c: 3, - d: null - }; - - expect(Hoek.matchKeys(obj, ['b', 'c', 'd', 'e'])).to.deep.equal(['b', 'c', 'd']); - done(); - }); - }); - - describe('#flatten', function () { - - it('should return a flat array', function (done) { - - var result = Hoek.flatten([1, 2, [3, 4, [5, 6], [7], 8], [9], [10, [11, 12]], 13]); - expect(result.length).to.equal(13); - expect(result).to.deep.equal([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]); - done(); - }); - }); - - describe('#removeKeys', function () { - - var objWithHiddenKeys = { - location: { - name: 'San Bruno' - }, - company: { - name: '@WalmartLabs' - } - }; - - it('should delete params with definition\'s hide set to true', function (done) { - - var a = Hoek.removeKeys(objWithHiddenKeys, ['location']); - expect(objWithHiddenKeys.location).to.not.exist; - expect(objWithHiddenKeys.company).to.exist; - done(); - }); - }); - - describe('#reach', function () { - - var obj = { - a: { - b: { - c: { - d: 1, - e: 2 - }, - f: 'hello' - }, - g: { - h: 3 - } - }, - i: function () { } - }; - - it('returns a valid member', function (done) { - - expect(Hoek.reach(obj, 'a.b.c.d')).to.equal(1); - done(); - }); - - it('returns null on null object', function (done) { - - expect(Hoek.reach(null, 'a.b.c.d')).to.not.exist; - done(); - }); - - it('returns null on missing member', function (done) { - - expect(Hoek.reach(obj, 'a.b.c.d.x')).to.not.exist; - done(); - }); - - it('returns null on invalid member', function (done) { - - expect(Hoek.reach(obj, 'a.b.c.d-.x')).to.not.exist; - done(); - }); - - it('returns function member', function (done) { - - expect(typeof Hoek.reach(obj, 'i')).to.equal('function'); - done(); - }); - }); - - describe('#inheritAsync', function () { - - it('should inherit selected methods and wrap in async call', function (done) { - - var proto = { - a: function () { - return 'a!'; - }, - b: function () { - return 'b!'; - }, - c: function () { - throw new Error('c!'); - } - }; - - var targetFunc = function () { }; - targetFunc.prototype.c = function () { - - return 'oops'; - }; - - Hoek.inheritAsync(targetFunc, proto, ['a', 'c']); - var target = new targetFunc(); - - expect(typeof target.a).to.equal('function'); - expect(typeof target.c).to.equal('function'); - expect(target.b).to.not.exist; - - target.a(function (err, result) { - - expect(err).to.not.exist; - expect(result).to.equal('a!'); - - target.c(function (err, result) { - - expect(result).to.not.exist; - expect(err.message).to.equal('c!'); - done(); - }); - }); - }); - }); - - describe('#callStack', function () { - - it('should return the full call stack', function (done) { - - var stack = Hoek.callStack(); - expect(stack[0][0]).to.contain('index.js'); - expect(stack[0][2]).to.equal(30); - done(); - }); - }); - - describe('#displayStack ', function () { - - it('should return the full call stack for display', function (done) { - - var stack = Hoek.displayStack(); - expect(stack[0]).to.contain('test/index.js:'); - done(); - }); - - it('should include constructor functions correctly', function (done) { - - var Something = function (next) { - - next(); - }; - - var something = new Something(function () { - - var stack = Hoek.displayStack(); - expect(stack[1]).to.contain('new Something'); - done(); - }); - }); - }); - - describe('#abort', function () { - - it('should exit process when not in test mode', function (done) { - - var env = process.env.NODE_ENV; - var write = process.stdout.write; - var exit = process.exit; - - process.env.NODE_ENV = 'nottatest'; - process.stdout.write = function () { }; - process.exit = function (state) { - - process.exit = exit; - process.env.NODE_ENV = env; - process.stdout.write = write; - - expect(state).to.equal(1); - done(); - }; - - Hoek.abort('Boom'); - }); - - it('should throw when not in test mode and abortThrow is true', function (done) { - - var env = process.env.NODE_ENV; - process.env.NODE_ENV = 'nottatest'; - Hoek.abortThrow = true; - - var fn = function () { - - Hoek.abort('my error message'); - }; - - expect(fn).to.throw('my error message'); - Hoek.abortThrow = false; - process.env.NODE_ENV = env; - - done(); - }); - - - it('should respect hideStack argument', function (done) { - - var env = process.env.NODE_ENV; - var write = process.stdout.write; - var exit = process.exit; - var output = ''; - - process.exit = function () { }; - process.env.NODE_ENV = ''; - process.stdout.write = function (message) { - - output = message; - }; - - Hoek.abort('my error message', true); - - process.env.NODE_ENV = env; - process.stdout.write = write; - process.exit = exit; - - expect(output).to.equal('ABORT: my error message\n\t\n'); - - done(); - }); - - it('should default to showing stack', function (done) { - - var env = process.env.NODE_ENV; - var write = process.stdout.write; - var exit = process.exit; - var output = ''; - - process.exit = function () { }; - process.env.NODE_ENV = ''; - process.stdout.write = function (message) { - - output = message; - }; - - Hoek.abort('my error message'); - - process.env.NODE_ENV = env; - process.stdout.write = write; - process.exit = exit; - - expect(output).to.contain('index.js'); - - done(); - }); - }); - - describe('#assert', function () { - - it('should throw an Error when using assert in a test', function (done) { - - var fn = function () { - - Hoek.assert(false, 'my error message'); - }; - - expect(fn).to.throw('my error message'); - done(); - }); - - it('should throw an Error when using assert in a test with no message', function (done) { - - var fn = function () { - - Hoek.assert(false); - }; - - expect(fn).to.throw('Unknown error'); - done(); - }); - - it('should throw an Error when using assert in a test with multipart message', function (done) { - - var fn = function () { - - Hoek.assert(false, 'This', 'is', 'my message'); - }; - - expect(fn).to.throw('This is my message'); - done(); - }); - - it('should throw an Error when using assert in a test with object message', function (done) { - - var fn = function () { - - Hoek.assert(false, 'This', 'is', { spinal: 'tap' }); - }; - - expect(fn).to.throw('This is {"spinal":"tap"}'); - done(); - }); - - it('should throw an Error when using assert in a test with error object message', function (done) { - - var fn = function () { - - Hoek.assert(false, new Error('This is spinal tap')); - }; - - expect(fn).to.throw('This is spinal tap'); - done(); - }); - }); - - describe('#loadDirModules', function () { - - it('should load modules from directory', function (done) { - - var target = {}; - Hoek.loadDirModules(__dirname + '/modules', ['test2'], target); - expect(target.Test1.x).to.equal(1); - expect(target.Test2).to.not.exist; - expect(target.Test3.z).to.equal(3); - done(); - }); - - it('should list modules from directory into function', function (done) { - - var target = {}; - Hoek.loadDirModules(__dirname + '/modules', ['test2'], function (path, name, capName) { - - target[name] = capName; - }); - - expect(target.test1).to.equal('Test1'); - expect(target.test2).to.not.exist; - expect(target.test3).to.equal('Test3'); - done(); - }); - }); - - describe('#rename', function () { - - it('should rename object key', function (done) { - - var a = { b: 'c' }; - Hoek.rename(a, 'b', 'x'); - expect(a.b).to.not.exist; - expect(a.x).to.equal('c'); - done(); - }); - }); - - describe('Timer', function () { - - it('should return time elapsed', function (done) { - - var timer = new Hoek.Timer(); - setTimeout(function () { - - expect(timer.elapsed()).to.be.above(9); - done(); - }, 12); - }); - }); - - describe('#loadPackage', function () { - - it('should', function (done) { - - var pack = Hoek.loadPackage(); - expect(pack.name).to.equal('hoek'); - done(); - }); - }); - - describe('#escapeRegex', function () { - - it('should escape all special regular expression characters', function (done) { - - var a = Hoek.escapeRegex('4^f$s.4*5+-_?%=#!:@|~\\/`"(>)[<]d{}s,'); - expect(a).to.equal('4\\^f\\$s\\.4\\*5\\+\\-_\\?%\\=#\\!\\:@\\|~\\\\\\/`"\\(>\\)\\[<\\]d\\{\\}s\\,'); - done(); - }); - }); - - describe('#toss', function () { - - it('should call callback with new error', function (done) { - - var callback = function (err) { - - expect(err).to.exist; - expect(err.message).to.equal('bug'); - done(); - }; - - Hoek.toss(true, 'feature', callback); - Hoek.toss(false, 'bug', callback); - }); - - it('should call callback with new error and no message', function (done) { - - Hoek.toss(false, function (err) { - - expect(err).to.exist; - expect(err.message).to.equal(''); - done(); - }); - }); - - it('should call callback with error condition', function (done) { - - Hoek.toss(new Error('boom'), function (err) { - - expect(err).to.exist; - expect(err.message).to.equal('boom'); - done(); - }); - }); - - it('should call callback with new error using message with error condition', function (done) { - - Hoek.toss(new Error('ka'), 'boom', function (err) { - - expect(err).to.exist; - expect(err.message).to.equal('boom'); - done(); - }); - }); - - it('should call callback with new error using passed error with error condition', function (done) { - - Hoek.toss(new Error('ka'), new Error('boom'), function (err) { - - expect(err).to.exist; - expect(err.message).to.equal('boom'); - done(); - }); - }); - }); - - describe('Base64Url', function () { - - var base64str = 'AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0-P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn-AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq-wsbKztLW2t7i5uru8vb6_wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t_g4eLj5OXm5-jp6uvs7e7v8PHy8_T19vf4-fr7_P3-_w'; - var str = unescape('%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%20%21%22%23%24%25%26%27%28%29*+%2C-./0123456789%3A%3B%3C%3D%3E%3F@ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D%7E%7F%80%81%82%83%84%85%86%87%88%89%8A%8B%8C%8D%8E%8F%90%91%92%93%94%95%96%97%98%99%9A%9B%9C%9D%9E%9F%A0%A1%A2%A3%A4%A5%A6%A7%A8%A9%AA%AB%AC%AD%AE%AF%B0%B1%B2%B3%B4%B5%B6%B7%B8%B9%BA%BB%BC%BD%BE%BF%C0%C1%C2%C3%C4%C5%C6%C7%C8%C9%CA%CB%CC%CD%CE%CF%D0%D1%D2%D3%D4%D5%D6%D7%D8%D9%DA%DB%DC%DD%DE%DF%E0%E1%E2%E3%E4%E5%E6%E7%E8%E9%EA%EB%EC%ED%EE%EF%F0%F1%F2%F3%F4%F5%F6%F7%F8%F9%FA%FB%FC%FD%FE%FF'); - - describe('#base64urlEncode', function () { - - it('should base64 URL-safe a string', function (done) { - - expect(Hoek.base64urlEncode(str)).to.equal(base64str); - done(); - }); - }); - - describe('#base64urlDecode', function () { - - it('should un-base64 URL-safe a string', function (done) { - - expect(Hoek.base64urlDecode(base64str)).to.equal(str); - done(); - }); - - it('should return error on undefined input', function (done) { - - expect(Hoek.base64urlDecode().message).to.exist; - done(); - }); - - it('should return error on invalid input', function (done) { - - expect(Hoek.base64urlDecode('*').message).to.exist; - done(); - }); - }); - }); - - describe('#escapeHeaderAttribute', function () { - - it('should not alter ascii values', function (done) { - - var a = Hoek.escapeHeaderAttribute('My Value'); - expect(a).to.equal('My Value'); - done(); - }); - - it('should escape all special HTTP header attribute characters', function (done) { - - var a = Hoek.escapeHeaderAttribute('I said go!!!#"' + String.fromCharCode(92)); - expect(a).to.equal('I said go!!!#\\"\\\\'); - done(); - }); - - it('should throw on large unicode characters', function (done) { - - var fn = function () { - - Hoek.escapeHeaderAttribute('this is a test' + String.fromCharCode(500) + String.fromCharCode(300)); - }; - - expect(fn).to.throw(Error); - done(); - }); - - it('should throw on CRLF to prevent response splitting', function (done) { - - var fn = function () { - - Hoek.escapeHeaderAttribute('this is a test\r\n'); - }; - - expect(fn).to.throw(Error); - done(); - }); - }); - - describe('#escapeHtml', function () { - - it('should escape all special HTML characters', function (done) { - - var a = Hoek.escapeHtml('&<>"\'`'); - expect(a).to.equal('&<>"'`'); - done(); - }); - - it('should return empty string on falsy input', function (done) { - - var a = Hoek.escapeHtml(''); - expect(a).to.equal(''); - done(); - }); - - it('should return unchanged string on no reserved input', function (done) { - - var a = Hoek.escapeHtml('abc'); - expect(a).to.equal('abc'); - done(); - }); - }); - - describe('#printEvent', function () { - - it('outputs event as string', function (done) { - - var event = { - timestamp: (new Date(2013, 1, 1, 6, 30, 45, 123)).getTime(), - tags: ['a', 'b', 'c'], - data: { some: 'data' } - }; - - Hoek.consoleFunc = function (string) { - - Hoek.consoleFunc = console.log; - expect(string).to.equal('130201/063045.123, a, {"some":"data"}'); - done(); - }; - - Hoek.printEvent(event); - }); - - it('outputs JSON error', function (done) { - - var event = { - timestamp: (new Date(2013, 1, 1, 6, 30, 45, 123)).getTime(), - tags: ['a', 'b', 'c'], - data: { some: 'data' } - }; - - event.data.a = event.data; - - Hoek.consoleFunc = function (string) { - - Hoek.consoleFunc = console.log; - expect(string).to.equal('130201/063045.123, a, JSON Error: Converting circular structure to JSON'); - done(); - }; - - Hoek.printEvent(event); - }); - }); - - describe('#nextTick', function () { - - it('calls the provided callback on nextTick', function (done) { - - var a = 0; - - var inc = function (step, next) { - - a += step; - next(); - }; - - var ticked = Hoek.nextTick(inc); - - ticked(5, function () { - - expect(a).to.equal(6); - done(); - }); - - expect(a).to.equal(0); - inc(1, function () { - - expect(a).to.equal(1); - }); - }); - }); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js deleted file mode 100755 index 3f41e601..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js +++ /dev/null @@ -1 +0,0 @@ -exports.x = 1; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js deleted file mode 100755 index 38556b27..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js +++ /dev/null @@ -1 +0,0 @@ -exports.y = 2; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js deleted file mode 100755 index 436b860b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js +++ /dev/null @@ -1 +0,0 @@ -exports.z = 3; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/.npmignore deleted file mode 100644 index 77ba16cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/.npmignore +++ /dev/null @@ -1,18 +0,0 @@ -.idea -*.iml -npm-debug.log -dump.rdb -node_modules -results.tap -results.xml -npm-shrinkwrap.json -config.json -.DS_Store -*/.DS_Store -*/*/.DS_Store -._* -*/._* -*/*/._* -coverage.* -lib-cov - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/.travis.yml deleted file mode 100755 index 047f7e3d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js - -node_js: - - 0.10 - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE deleted file mode 100755 index e699a7bd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2012-2013, Eran Hammer. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Eran Hammer nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL ERAN HAMMER BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile deleted file mode 100755 index 9e7138c2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -test: - @./node_modules/.bin/lab -test-cov: - @./node_modules/.bin/lab -r threshold -t 100 -test-cov-html: - @./node_modules/.bin/lab -r html -o coverage.html -complexity: - @./node_modules/.bin/cr -o complexity.md -f markdown lib - -.PHONY: test test-cov test-cov-html complexity - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/README.md deleted file mode 100755 index 98a6e025..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# sntp - -An SNTP v4 client (RFC4330) for node. Simpy connects to the NTP or SNTP server requested and returns the server time -along with the roundtrip duration and clock offset. To adjust the local time to the NTP time, add the returned `t` offset -to the local time. - -[![Build Status](https://secure.travis-ci.org/hueniverse/sntp.png)](http://travis-ci.org/hueniverse/sntp) - -# Usage - -```javascript -var Sntp = require('sntp'); - -// All options are optional - -var options = { - host: 'nist1-sj.ustiming.org', // Defaults to pool.ntp.org - port: 123, // Defaults to 123 (NTP) - resolveReference: true, // Default to false (not resolving) - timeout: 1000 // Defaults to zero (no timeout) -}; - -// Request server time - -Sntp.time(options, function (err, time) { - - if (err) { - console.log('Failed: ' + err.message); - process.exit(1); - } - - console.log('Local clock is off by: ' + time.t + ' milliseconds'); - process.exit(0); -}); -``` - -If an application needs to maintain continuous time synchronization, the module provides a stateful method for -querying the current offset only when the last one is too old (defaults to daily). - -```javascript -// Request offset once - -Sntp.offset(function (err, offset) { - - console.log(offset); // New (served fresh) - - // Request offset again - - Sntp.offset(function (err, offset) { - - console.log(offset); // Identical (served from cache) - }); -}); -``` - -To set a background offset refresh, start the interval and use the provided now() method. If for any reason the -client fails to obtain an up-to-date offset, the current system clock is used. - -```javascript -var before = Sntp.now(); // System time without offset - -Sntp.start(function () { - - var now = Sntp.now(); // With offset - Sntp.stop(); -}); -``` - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js deleted file mode 100755 index 0303f6dc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js +++ /dev/null @@ -1,16 +0,0 @@ -var Sntp = require('../lib'); - -// Request offset once - -Sntp.offset(function (err, offset) { - - console.log(offset); // New (served fresh) - - // Request offset again - - Sntp.offset(function (err, offset) { - - console.log(offset); // Identical (served from cache) - }); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js deleted file mode 100755 index bd70d0e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js +++ /dev/null @@ -1,25 +0,0 @@ -var Sntp = require('../lib'); - -// All options are optional - -var options = { - host: 'nist1-sj.ustiming.org', // Defaults to pool.ntp.org - port: 123, // Defaults to 123 (NTP) - resolveReference: true, // Default to false (not resolving) - timeout: 1000 // Defaults to zero (no timeout) -}; - -// Request server time - -Sntp.time(options, function (err, time) { - - if (err) { - console.log('Failed: ' + err.message); - process.exit(1); - } - - console.log(time); - console.log('Local clock is off by: ' + time.t + ' milliseconds'); - process.exit(0); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/index.js deleted file mode 100755 index 4cc88b35..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib'); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js deleted file mode 100755 index e492cd93..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js +++ /dev/null @@ -1,409 +0,0 @@ -// Load modules - -var Dgram = require('dgram'); -var Dns = require('dns'); -var Hoek = require('hoek'); - - -// Declare internals - -var internals = {}; - - -exports.time = function (options, callback) { - - if (arguments.length !== 2) { - callback = arguments[0]; - options = {}; - } - - var settings = Hoek.clone(options); - settings.host = settings.host || 'pool.ntp.org'; - settings.port = settings.port || 123; - settings.resolveReference = settings.resolveReference || false; - - // Declare variables used by callback - - var timeoutId = 0; - var sent = 0; - - // Ensure callback is only called once - - var isFinished = false; - var finish = function (err, result) { - - if (timeoutId) { - clearTimeout(timeoutId); - timeoutId = 0; - } - - if (!isFinished) { - isFinished = true; - socket.removeAllListeners(); - socket.close(); - return callback(err, result); - } - }; - - // Create UDP socket - - var socket = Dgram.createSocket('udp4'); - - socket.once('error', function (err) { - - return finish(err); - }); - - // Listen to incoming messages - - socket.on('message', function (buffer, rinfo) { - - var received = Date.now(); - - var message = new internals.NtpMessage(buffer); - if (!message.isValid) { - return finish(new Error('Invalid server response'), message); - } - - if (message.originateTimestamp !== sent) { - return finish(new Error('Wrong originate timestamp'), message); - } - - // Timestamp Name ID When Generated - // ------------------------------------------------------------ - // Originate Timestamp T1 time request sent by client - // Receive Timestamp T2 time request received by server - // Transmit Timestamp T3 time reply sent by server - // Destination Timestamp T4 time reply received by client - // - // The roundtrip delay d and system clock offset t are defined as: - // - // d = (T4 - T1) - (T3 - T2) t = ((T2 - T1) + (T3 - T4)) / 2 - - var T1 = message.originateTimestamp; - var T2 = message.receiveTimestamp; - var T3 = message.transmitTimestamp; - var T4 = received; - - message.d = (T4 - T1) - (T3 - T2); - message.t = ((T2 - T1) + (T3 - T4)) / 2; - message.receivedLocally = received; - - if (!settings.resolveReference || - message.stratum !== 'secondary') { - - return finish(null, message); - } - - // Resolve reference IP address - - Dns.reverse(message.referenceId, function (err, domains) { - - if (!err) { - message.referenceHost = domains[0]; - } - - return finish(null, message); - }); - }); - - // Set timeout - - if (settings.timeout) { - timeoutId = setTimeout(function () { - - timeoutId = 0; - return finish(new Error('Timeout')); - }, settings.timeout); - } - - // Construct NTP message - - var message = new Buffer(48); - for (var i = 0; i < 48; i++) { // Zero message - message[i] = 0; - } - - message[0] = (0 << 6) + (4 << 3) + (3 << 0) // Set version number to 4 and Mode to 3 (client) - sent = Date.now(); - internals.fromMsecs(sent, message, 40); // Set transmit timestamp (returns as originate) - - // Send NTP request - - socket.send(message, 0, message.length, settings.port, settings.host, function (err, bytes) { - - if (err || - bytes !== 48) { - - return finish(err || new Error('Could not send entire message')); - } - }); -}; - - -internals.NtpMessage = function (buffer) { - - this.isValid = false; - - // Validate - - if (buffer.length !== 48) { - return; - } - - // Leap indicator - - var li = (buffer[0] >> 6); - switch (li) { - case 0: this.leapIndicator = 'no-warning'; break; - case 1: this.leapIndicator = 'last-minute-61'; break; - case 2: this.leapIndicator = 'last-minute-59'; break; - case 3: this.leapIndicator = 'alarm'; break; - } - - // Version - - var vn = ((buffer[0] & 0x38) >> 3); - this.version = vn; - - // Mode - - var mode = (buffer[0] & 0x7); - switch (mode) { - case 1: this.mode = 'symmetric-active'; break; - case 2: this.mode = 'symmetric-passive'; break; - case 3: this.mode = 'client'; break; - case 4: this.mode = 'server'; break; - case 5: this.mode = 'broadcast'; break; - case 0: - case 6: - case 7: this.mode = 'reserved'; break; - } - - // Stratum - - var stratum = buffer[1]; - if (stratum === 0) { - this.stratum = 'death'; - } - else if (stratum === 1) { - this.stratum = 'primary'; - } - else if (stratum <= 15) { - this.stratum = 'secondary'; - } - else { - this.stratum = 'reserved'; - } - - // Poll interval (msec) - - this.pollInterval = Math.round(Math.pow(2, buffer[2])) * 1000; - - // Precision (msecs) - - this.precision = Math.pow(2, buffer[3]) * 1000; - - // Root delay (msecs) - - var rootDelay = 256 * (256 * (256 * buffer[4] + buffer[5]) + buffer[6]) + buffer[7]; - this.rootDelay = 1000 * (rootDelay / 0x10000); - - // Root dispersion (msecs) - - this.rootDispersion = ((buffer[8] << 8) + buffer[9] + ((buffer[10] << 8) + buffer[11]) / Math.pow(2, 16)) * 1000; - - // Reference identifier - - this.referenceId = ''; - switch (this.stratum) { - case 'death': - case 'primary': - this.referenceId = String.fromCharCode(buffer[12]) + String.fromCharCode(buffer[13]) + String.fromCharCode(buffer[14]) + String.fromCharCode(buffer[15]); - break; - case 'secondary': - this.referenceId = '' + buffer[12] + '.' + buffer[13] + '.' + buffer[14] + '.' + buffer[15]; - break; - } - - // Reference timestamp - - this.referenceTimestamp = internals.toMsecs(buffer, 16); - - // Originate timestamp - - this.originateTimestamp = internals.toMsecs(buffer, 24); - - // Receive timestamp - - this.receiveTimestamp = internals.toMsecs(buffer, 32); - - // Transmit timestamp - - this.transmitTimestamp = internals.toMsecs(buffer, 40); - - // Validate - - if (this.version === 4 && - this.stratum !== 'reserved' && - this.mode === 'server' && - this.originateTimestamp && - this.receiveTimestamp && - this.transmitTimestamp) { - - this.isValid = true; - } - - return this; -}; - - -internals.toMsecs = function (buffer, offset) { - - var seconds = 0; - var fraction = 0; - - for (var i = 0; i < 4; ++i) { - seconds = (seconds * 256) + buffer[offset + i]; - } - - for (i = 4; i < 8; ++i) { - fraction = (fraction * 256) + buffer[offset + i]; - } - - return ((seconds - 2208988800 + (fraction / Math.pow(2, 32))) * 1000); -}; - - -internals.fromMsecs = function (ts, buffer, offset) { - - var seconds = Math.floor(ts / 1000) + 2208988800; - var fraction = Math.round((ts % 1000) / 1000 * Math.pow(2, 32)); - - buffer[offset + 0] = (seconds & 0xFF000000) >> 24; - buffer[offset + 1] = (seconds & 0x00FF0000) >> 16; - buffer[offset + 2] = (seconds & 0x0000FF00) >> 8; - buffer[offset + 3] = (seconds & 0x000000FF); - - buffer[offset + 4] = (fraction & 0xFF000000) >> 24; - buffer[offset + 5] = (fraction & 0x00FF0000) >> 16; - buffer[offset + 6] = (fraction & 0x0000FF00) >> 8; - buffer[offset + 7] = (fraction & 0x000000FF); -}; - - -// Offset singleton - -internals.last = { - offset: 0, - expires: 0, - host: '', - port: 0 -}; - - -exports.offset = function (options, callback) { - - if (arguments.length !== 2) { - callback = arguments[0]; - options = {}; - } - - var now = Date.now(); - var clockSyncRefresh = options.clockSyncRefresh || 24 * 60 * 60 * 1000; // Daily - - if (internals.last.offset && - internals.last.host === options.host && - internals.last.port === options.port && - now < internals.last.expires) { - - process.nextTick(function () { - - callback(null, internals.last.offset); - }); - - return; - } - - exports.time(options, function (err, time) { - - if (err) { - return callback(err, 0); - } - - internals.last = { - offset: Math.round(time.t), - expires: now + clockSyncRefresh, - host: options.host, - port: options.port - }; - - return callback(null, internals.last.offset); - }); -}; - - -// Now singleton - -internals.now = { - intervalId: 0 -}; - - -exports.start = function (options, callback) { - - if (arguments.length !== 2) { - callback = arguments[0]; - options = {}; - } - - if (internals.now.intervalId) { - process.nextTick(function () { - - callback(); - }); - - return; - } - - exports.offset(options, function (err, offset) { - - internals.now.intervalId = setInterval(function () { - - exports.offset(options, function () { }); - }, options.clockSyncRefresh || 24 * 60 * 60 * 1000); // Daily - - return callback(); - }); -}; - - -exports.stop = function () { - - if (!internals.now.intervalId) { - return; - } - - clearInterval(internals.now.intervalId); - internals.now.intervalId = 0; -}; - - -exports.isLive = function () { - - return !!internals.now.intervalId; -}; - - -exports.now = function () { - - var now = Date.now(); - if (!exports.isLive() || - now >= internals.last.expires) { - - return now; - } - - return now + internals.last.offset; -}; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/package.json deleted file mode 100755 index 8ce7a61f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "sntp", - "description": "SNTP Client", - "version": "0.2.4", - "author": { - "name": "Eran Hammer", - "email": "eran@hueniverse.com", - "url": "http://hueniverse.com" - }, - "contributors": [], - "repository": { - "type": "git", - "url": "git://github.com/hueniverse/sntp" - }, - "main": "index", - "keywords": [ - "sntp", - "ntp", - "time" - ], - "engines": { - "node": ">=0.8.0" - }, - "dependencies": { - "hoek": "0.9.x" - }, - "devDependencies": { - "lab": "0.1.x", - "complexity-report": "0.x.x" - }, - "scripts": { - "test": "make test-cov" - }, - "licenses": [ - { - "type": "BSD", - "url": "http://github.com/hueniverse/sntp/raw/master/LICENSE" - } - ], - "readme": "# sntp\n\nAn SNTP v4 client (RFC4330) for node. Simpy connects to the NTP or SNTP server requested and returns the server time\nalong with the roundtrip duration and clock offset. To adjust the local time to the NTP time, add the returned `t` offset\nto the local time.\n\n[![Build Status](https://secure.travis-ci.org/hueniverse/sntp.png)](http://travis-ci.org/hueniverse/sntp)\n\n# Usage\n\n```javascript\nvar Sntp = require('sntp');\n\n// All options are optional\n\nvar options = {\n host: 'nist1-sj.ustiming.org', // Defaults to pool.ntp.org\n port: 123, // Defaults to 123 (NTP)\n resolveReference: true, // Default to false (not resolving)\n timeout: 1000 // Defaults to zero (no timeout)\n};\n\n// Request server time\n\nSntp.time(options, function (err, time) {\n\n if (err) {\n console.log('Failed: ' + err.message);\n process.exit(1);\n }\n\n console.log('Local clock is off by: ' + time.t + ' milliseconds');\n process.exit(0);\n});\n```\n\nIf an application needs to maintain continuous time synchronization, the module provides a stateful method for\nquerying the current offset only when the last one is too old (defaults to daily).\n\n```javascript\n// Request offset once\n\nSntp.offset(function (err, offset) {\n\n console.log(offset); // New (served fresh)\n\n // Request offset again\n\n Sntp.offset(function (err, offset) {\n\n console.log(offset); // Identical (served from cache)\n });\n});\n```\n\nTo set a background offset refresh, start the interval and use the provided now() method. If for any reason the\nclient fails to obtain an up-to-date offset, the current system clock is used.\n\n```javascript\nvar before = Sntp.now(); // System time without offset\n\nSntp.start(function () {\n\n var now = Sntp.now(); // With offset\n Sntp.stop();\n});\n```\n\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/hueniverse/sntp/issues" - }, - "homepage": "https://github.com/hueniverse/sntp", - "_id": "sntp@0.2.4", - "dist": { - "shasum": "657ad142a4f42d39c3e8f4b507ec2dd8f0ecfd9f" - }, - "_from": "sntp@0.2.x", - "_resolved": "https://registry.npmjs.org/sntp/-/sntp-0.2.4.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js deleted file mode 100755 index 38a55346..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js +++ /dev/null @@ -1,359 +0,0 @@ -// Load modules - -var Dgram = require('dgram'); -var Lab = require('lab'); -var Sntp = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('SNTP', function () { - - describe('#time', function () { - - it('returns consistent result over multiple tries', function (done) { - - Sntp.time(function (err, time) { - - expect(err).to.not.exist; - expect(time).to.exist; - var t1 = time.t; - - Sntp.time(function (err, time) { - - expect(err).to.not.exist; - expect(time).to.exist; - var t2 = time.t; - expect(Math.abs(t1 - t2)).is.below(200); - done(); - }); - }); - }); - - it('resolves reference IP', function (done) { - - Sntp.time({ host: 'ntp.exnet.com', resolveReference: true }, function (err, time) { - - expect(err).to.not.exist; - expect(time).to.exist; - expect(time.referenceHost).to.exist; - done(); - }); - }); - - it('times out on no response', function (done) { - - Sntp.time({ port: 124, timeout: 100 }, function (err, time) { - - expect(err).to.exist; - expect(time).to.not.exist; - expect(err.message).to.equal('Timeout'); - done(); - }); - }); - - it('errors on error event', function (done) { - - var orig = Dgram.createSocket; - Dgram.createSocket = function (type) { - - Dgram.createSocket = orig; - var socket = Dgram.createSocket(type); - process.nextTick(function () { socket.emit('error', new Error('Fake')) }); - return socket; - }; - - Sntp.time(function (err, time) { - - expect(err).to.exist; - expect(time).to.not.exist; - expect(err.message).to.equal('Fake'); - done(); - }); - }); - - it('times out on invalid host', function (done) { - - Sntp.time({ host: 'error', timeout: 10000 }, function (err, time) { - - expect(err).to.exist; - expect(time).to.not.exist; - expect(err.message).to.equal('getaddrinfo ENOTFOUND'); - done(); - }); - }); - - it('fails on bad response buffer size', function (done) { - - var server = Dgram.createSocket('udp4'); - server.on('message', function (message, remote) { - var message = new Buffer(10); - server.send(message, 0, message.length, remote.port, remote.address, function (err, bytes) { - - server.close(); - }); - }); - - server.bind(49123); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(err.message).to.equal('Invalid server response'); - done(); - }); - }); - - var messup = function (bytes) { - - var server = Dgram.createSocket('udp4'); - server.on('message', function (message, remote) { - - var message = new Buffer([ - 0x24, 0x01, 0x00, 0xe3, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x41, 0x43, 0x54, 0x53, - 0xd4, 0xa8, 0x2d, 0xc7, - 0x1c, 0x5d, 0x49, 0x1b, - 0xd4, 0xa8, 0x2d, 0xe6, - 0x67, 0xef, 0x9d, 0xb2, - 0xd4, 0xa8, 0x2d, 0xe6, - 0x71, 0xed, 0xb5, 0xfb, - 0xd4, 0xa8, 0x2d, 0xe6, - 0x71, 0xee, 0x6c, 0xc5 - ]); - - for (var i = 0, il = bytes.length; i < il; ++i) { - message[bytes[i][0]] = bytes[i][1]; - } - - server.send(message, 0, message.length, remote.port, remote.address, function (err, bytes) { - - server.close(); - }); - }); - - server.bind(49123); - }; - - it('fails on bad version', function (done) { - - messup([[0, (0 << 6) + (3 << 3) + (4 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(time.version).to.equal(3); - expect(err.message).to.equal('Invalid server response'); - done(); - }); - }); - - it('fails on bad originate timestamp and alarm li', function (done) { - - messup([[0, (3 << 6) + (4 << 3) + (4 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(err.message).to.equal('Wrong originate timestamp'); - expect(time.leapIndicator).to.equal('alarm'); - done(); - }); - }); - - it('returns time with death stratum and last61 li', function (done) { - - messup([[0, (1 << 6) + (4 << 3) + (4 << 0)], [1, 0]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(time.stratum).to.equal('death'); - expect(time.leapIndicator).to.equal('last-minute-61'); - done(); - }); - }); - - it('returns time with reserved stratum and last59 li', function (done) { - - messup([[0, (2 << 6) + (4 << 3) + (4 << 0)], [1, 0x1f]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(time.stratum).to.equal('reserved'); - expect(time.leapIndicator).to.equal('last-minute-59'); - done(); - }); - }); - - it('fails on bad mode (symmetric-active)', function (done) { - - messup([[0, (0 << 6) + (4 << 3) + (1 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(time.mode).to.equal('symmetric-active'); - done(); - }); - }); - - it('fails on bad mode (symmetric-passive)', function (done) { - - messup([[0, (0 << 6) + (4 << 3) + (2 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(time.mode).to.equal('symmetric-passive'); - done(); - }); - }); - - it('fails on bad mode (client)', function (done) { - - messup([[0, (0 << 6) + (4 << 3) + (3 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(time.mode).to.equal('client'); - done(); - }); - }); - - it('fails on bad mode (broadcast)', function (done) { - - messup([[0, (0 << 6) + (4 << 3) + (5 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(time.mode).to.equal('broadcast'); - done(); - }); - }); - - it('fails on bad mode (reserved)', function (done) { - - messup([[0, (0 << 6) + (4 << 3) + (6 << 0)]]); - - Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) { - - expect(err).to.exist; - expect(time.mode).to.equal('reserved'); - done(); - }); - }); - }); - - describe('#offset', function () { - - it('gets the current offset', function (done) { - - Sntp.offset(function (err, offset) { - - expect(err).to.not.exist; - expect(offset).to.not.equal(0); - done(); - }); - }); - - it('gets the current offset from cache', function (done) { - - Sntp.offset(function (err, offset) { - - expect(err).to.not.exist; - expect(offset).to.not.equal(0); - var offset1 = offset; - Sntp.offset({}, function (err, offset) { - - expect(err).to.not.exist; - expect(offset).to.equal(offset1); - done(); - }); - }); - }); - - it('fails getting the current offset on invalid server', function (done) { - - Sntp.offset({ host: 'error' }, function (err, offset) { - - expect(err).to.exist; - expect(offset).to.equal(0); - done(); - }); - }); - }); - - describe('#now', function () { - - it('starts auto-sync, gets now, then stops', function (done) { - - Sntp.stop(); - - var before = Sntp.now(); - expect(before).to.equal(Date.now()); - - Sntp.start(function () { - - var now = Sntp.now(); - expect(now).to.not.equal(Date.now()); - Sntp.stop(); - - done(); - }); - }); - - it('starts twice', function (done) { - - Sntp.start(function () { - - Sntp.start(function () { - - var now = Sntp.now(); - expect(now).to.not.equal(Date.now()); - Sntp.stop(); - - done(); - }); - }); - }); - - it('starts auto-sync, gets now, waits, gets again after timeout', function (done) { - - Sntp.stop(); - - var before = Sntp.now(); - expect(before).to.equal(Date.now()); - - Sntp.start({ clockSyncRefresh: 100 }, function () { - - var now = Sntp.now(); - expect(now).to.not.equal(Date.now()); - expect(now).to.equal(Sntp.now()); - - setTimeout(function () { - - expect(Sntp.now()).to.not.equal(now); - Sntp.stop(); - done(); - }, 110); - }); - }); - }); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/package.json deleted file mode 100755 index 8bf4c5c7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "hawk", - "description": "HTTP Hawk Authentication Scheme", - "version": "1.0.0", - "author": { - "name": "Eran Hammer", - "email": "eran@hueniverse.com", - "url": "http://hueniverse.com" - }, - "contributors": [], - "repository": { - "type": "git", - "url": "git://github.com/hueniverse/hawk" - }, - "main": "index", - "keywords": [ - "http", - "authentication", - "scheme", - "hawk" - ], - "engines": { - "node": ">=0.8.0" - }, - "dependencies": { - "hoek": "0.9.x", - "boom": "0.4.x", - "cryptiles": "0.2.x", - "sntp": "0.2.x" - }, - "devDependencies": { - "lab": "0.1.x", - "complexity-report": "0.x.x", - "localStorage": "1.0.x" - }, - "scripts": { - "test": "make test-cov" - }, - "licenses": [ - { - "type": "BSD", - "url": "http://github.com/hueniverse/hawk/raw/master/LICENSE" - } - ], - "readme": "![hawk Logo](https://raw.github.com/hueniverse/hawk/master/images/hawk.png)\n\n<img align=\"right\" src=\"https://raw.github.com/hueniverse/hawk/master/images/logo.png\" /> **Hawk** is an HTTP authentication scheme using a message authentication code (MAC) algorithm to provide partial\nHTTP request cryptographic verification. For more complex use cases such as access delegation, see [Oz](https://github.com/hueniverse/oz).\n\nCurrent version: **1.0**\n\n[![Build Status](https://secure.travis-ci.org/hueniverse/hawk.png)](http://travis-ci.org/hueniverse/hawk)\n\n# Table of Content\n\n- [**Introduction**](#introduction)\n - [Replay Protection](#replay-protection)\n - [Usage Example](#usage-example)\n - [Protocol Example](#protocol-example)\n - [Payload Validation](#payload-validation)\n - [Response Payload Validation](#response-payload-validation)\n - [Browser Support and Considerations](#browser-support-and-considerations)\n<p></p>\n- [**Single URI Authorization**](#single-uri-authorization)\n - [Usage Example](#bewit-usage-example)\n<p></p>\n- [**Security Considerations**](#security-considerations)\n - [MAC Keys Transmission](#mac-keys-transmission)\n - [Confidentiality of Requests](#confidentiality-of-requests)\n - [Spoofing by Counterfeit Servers](#spoofing-by-counterfeit-servers)\n - [Plaintext Storage of Credentials](#plaintext-storage-of-credentials)\n - [Entropy of Keys](#entropy-of-keys)\n - [Coverage Limitations](#coverage-limitations)\n - [Future Time Manipulation](#future-time-manipulation)\n - [Client Clock Poisoning](#client-clock-poisoning)\n - [Bewit Limitations](#bewit-limitations)\n - [Host Header Forgery](#host-header-forgery)\n<p></p>\n- [**Frequently Asked Questions**](#frequently-asked-questions)\n<p></p>\n- [**Acknowledgements**](#acknowledgements)\n\n# Introduction\n\n**Hawk** is an HTTP authentication scheme providing mechanisms for making authenticated HTTP requests with\npartial cryptographic verification of the request and response, covering the HTTP method, request URI, host,\nand optionally the request payload.\n\nSimilar to the HTTP [Digest access authentication schemes](http://www.ietf.org/rfc/rfc2617.txt), **Hawk** uses a set of\nclient credentials which include an identifier (e.g. username) and key (e.g. password). Likewise, just as with the Digest scheme,\nthe key is never included in authenticated requests. Instead, it is used to calculate a request MAC value which is\nincluded in its place.\n\nHowever, **Hawk** has several differences from Digest. In particular, while both use a nonce to limit the possibility of\nreplay attacks, in **Hawk** the client generates the nonce and uses it in combination with a timestamp, leading to less\n\"chattiness\" (interaction with the server).\n\nAlso unlike Digest, this scheme is not intended to protect the key itself (the password in Digest) because\nthe client and server must both have access to the key material in the clear.\n\nThe primary design goals of this scheme are to:\n* simplify and improve HTTP authentication for services that are unwilling or unable to deploy TLS for all resources,\n* secure credentials against leakage (e.g., when the client uses some form of dynamic configuration to determine where\n to send an authenticated request), and\n* avoid the exposure of credentials sent to a malicious server over an unauthenticated secure channel due to client\n failure to validate the server's identity as part of its TLS handshake.\n\nIn addition, **Hawk** supports a method for granting third-parties temporary access to individual resources using\na query parameter called _bewit_ (in falconry, a leather strap used to attach a tracking device to the leg of a hawk).\n\nThe **Hawk** scheme requires the establishment of a shared symmetric key between the client and the server,\nwhich is beyond the scope of this module. Typically, the shared credentials are established via an initial\nTLS-protected phase or derived from some other shared confidential information available to both the client\nand the server.\n\n\n## Replay Protection\n\nWithout replay protection, an attacker can use a compromised (but otherwise valid and authenticated) request more \nthan once, gaining access to a protected resource. To mitigate this, clients include both a nonce and a timestamp when \nmaking requests. This gives the server enough information to prevent replay attacks.\n\nThe nonce is generated by the client, and is a string unique across all requests with the same timestamp and\nkey identifier combination. \n\nThe timestamp enables the server to restrict the validity period of the credentials where requests occuring afterwards\nare rejected. It also removes the need for the server to retain an unbounded number of nonce values for future checks.\nBy default, **Hawk** uses a time window of 1 minute to allow for time skew between the client and server (which in\npractice translates to a maximum of 2 minutes as the skew can be positive or negative).\n\nUsing a timestamp requires the client's clock to be in sync with the server's clock. **Hawk** requires both the client\nclock and the server clock to use NTP to ensure synchronization. However, given the limitations of some client types\n(e.g. browsers) to deploy NTP, the server provides the client with its current time (in seconds precision) in response\nto a bad timestamp.\n\nThere is no expectation that the client will adjust its system clock to match the server (in fact, this would be a\npotential attack vector). Instead, the client only uses the server's time to calculate an offset used only\nfor communications with that particular server. The protocol rewards clients with synchronized clocks by reducing\nthe number of round trips required to authenticate the first request.\n\n\n## Usage Example\n\nServer code:\n\n```javascript\nvar Http = require('http');\nvar Hawk = require('hawk');\n\n\n// Credentials lookup function\n\nvar credentialsFunc = function (id, callback) {\n\n var credentials = {\n key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',\n algorithm: 'sha256',\n user: 'Steve'\n };\n\n return callback(null, credentials);\n};\n\n// Create HTTP server\n\nvar handler = function (req, res) {\n\n // Authenticate incoming request\n\n Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {\n\n // Prepare response\n\n var payload = (!err ? 'Hello ' + credentials.user + ' ' + artifacts.ext : 'Shoosh!');\n var headers = { 'Content-Type': 'text/plain' };\n\n // Generate Server-Authorization response header\n\n var header = Hawk.server.header(credentials, artifacts, { payload: payload, contentType: headers['Content-Type'] });\n headers['Server-Authorization'] = header;\n\n // Send the response back\n\n res.writeHead(!err ? 200 : 401, headers);\n res.end(payload);\n });\n};\n\n// Start server\n\nHttp.createServer(handler).listen(8000, 'example.com');\n```\n\nClient code:\n\n```javascript\nvar Request = require('request');\nvar Hawk = require('hawk');\n\n\n// Client credentials\n\nvar credentials = {\n id: 'dh37fgj492je',\n key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',\n algorithm: 'sha256'\n}\n\n// Request options\n\nvar requestOptions = {\n uri: 'http://example.com:8000/resource/1?b=1&a=2',\n method: 'GET',\n headers: {}\n};\n\n// Generate Authorization request header\n\nvar header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'GET', { credentials: credentials, ext: 'some-app-data' });\nrequestOptions.headers.Authorization = header.field;\n\n// Send authenticated request\n\nRequest(requestOptions, function (error, response, body) {\n\n // Authenticate the server's response\n\n var isValid = Hawk.client.authenticate(response, credentials, header.artifacts, { payload: body });\n\n // Output results\n\n console.log(response.statusCode + ': ' + body + (isValid ? ' (valid)' : ' (invalid)'));\n});\n```\n\n**Hawk** utilized the [**SNTP**](https://github.com/hueniverse/sntp) module for time sync management. By default, the local\nmachine time is used. To automatically retrieve and synchronice the clock within the application, use the SNTP 'start()' method.\n\n```javascript\nHawk.sntp.start();\n```\n\n\n## Protocol Example\n\nThe client attempts to access a protected resource without authentication, sending the following HTTP request to\nthe resource server:\n\n```\nGET /resource/1?b=1&a=2 HTTP/1.1\nHost: example.com:8000\n```\n\nThe resource server returns an authentication challenge.\n\n```\nHTTP/1.1 401 Unauthorized\nWWW-Authenticate: Hawk\n```\n\nThe client has previously obtained a set of **Hawk** credentials for accessing resources on the \"http://example.com/\"\nserver. The **Hawk** credentials issued to the client include the following attributes:\n\n* Key identifier: dh37fgj492je\n* Key: werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn\n* Algorithm: sha256\n\nThe client generates the authentication header by calculating a timestamp (e.g. the number of seconds since January 1,\n1970 00:00:00 GMT), generating a nonce, and constructing the normalized request string (each value followed by a newline\ncharacter):\n\n```\nhawk.1.header\n1353832234\nj4h3g2\nGET\n/resource/1?b=1&a=2\nexample.com\n8000\n\nsome-app-ext-data\n\n```\n\nThe request MAC is calculated using HMAC with the specified hash algorithm \"sha256\" and the key over the normalized request string.\nThe result is base64-encoded to produce the request MAC:\n\n```\n6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE=\n```\n\nThe client includes the **Hawk** key identifier, timestamp, nonce, application specific data, and request MAC with the request using\nthe HTTP `Authorization` request header field:\n\n```\nGET /resource/1?b=1&a=2 HTTP/1.1\nHost: example.com:8000\nAuthorization: Hawk id=\"dh37fgj492je\", ts=\"1353832234\", nonce=\"j4h3g2\", ext=\"some-app-ext-data\", mac=\"6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE=\"\n```\n\nThe server validates the request by calculating the request MAC again based on the request received and verifies the validity\nand scope of the **Hawk** credentials. If valid, the server responds with the requested resource.\n\n\n### Payload Validation\n\n**Hawk** provides optional payload validation. When generating the authentication header, the client calculates a payload hash\nusing the specified hash algorithm. The hash is calculated over the concatenated value of (each followed by a newline character):\n* `hawk.1.payload`\n* the content-type in lowercase, without any parameters (e.g. `application/json`)\n* the request payload prior to any content encoding (the exact representation requirements should be specified by the server for payloads other than simple single-part ascii to ensure interoperability)\n\nFor example:\n\n* Payload: `Thank you for flying Hawk`\n* Content Type: `text/plain`\n* Hash (sha256): `Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=`\n\nResults in the following input to the payload hash function (newline terminated values):\n\n```\nhawk.1.payload\ntext/plain\nThank you for flying Hawk\n\n```\n\nWhich produces the following hash value:\n\n```\nYi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=\n```\n\nThe client constructs the normalized request string (newline terminated values):\n\n```\nhawk.1.header\n1353832234\nj4h3g2\nPOST\n/resource/1?a=1&b=2\nexample.com\n8000\nYi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=\nsome-app-ext-data\n\n```\n\nThen calculates the request MAC and includes the **Hawk** key identifier, timestamp, nonce, payload hash, application specific data,\nand request MAC, with the request using the HTTP `Authorization` request header field:\n\n```\nPOST /resource/1?a=1&b=2 HTTP/1.1\nHost: example.com:8000\nAuthorization: Hawk id=\"dh37fgj492je\", ts=\"1353832234\", nonce=\"j4h3g2\", hash=\"Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=\", ext=\"some-app-ext-data\", mac=\"aSe1DERmZuRl3pI36/9BdZmnErTw3sNzOOAUlfeKjVw=\"\n```\n\nIt is up to the server if and when it validates the payload for any given request, based solely on it's security policy\nand the nature of the data included.\n\nIf the payload is available at the time of authentication, the server uses the hash value provided by the client to construct\nthe normalized string and validates the MAC. If the MAC is valid, the server calculates the payload hash and compares the value\nwith the provided payload hash in the header. In many cases, checking the MAC first is faster than calculating the payload hash.\n\nHowever, if the payload is not available at authentication time (e.g. too large to fit in memory, streamed elsewhere, or processed\nat a different stage in the application), the server may choose to defer payload validation for later by retaining the hash value\nprovided by the client after validating the MAC.\n\nIt is important to note that MAC validation does not mean the hash value provided by the client is valid, only that the value\nincluded in the header was not modified. Without calculating the payload hash on the server and comparing it to the value provided\nby the client, the payload may be modified by an attacker.\n\n\n## Response Payload Validation\n\n**Hawk** provides partial response payload validation. The server includes the `Server-Authorization` response header which enables the\nclient to authenticate the response and ensure it is talking to the right server. **Hawk** defines the HTTP `Server-Authorization` header\nas a response header using the exact same syntax as the `Authorization` request header field.\n\nThe header is contructed using the same process as the client's request header. The server uses the same credentials and other\nartifacts provided by the client to constructs the normalized request string. The `ext` and `hash` values are replaced with\nnew values based on the server response. The rest as identical to those used by the client.\n\nThe result MAC digest is included with the optional `hash` and `ext` values:\n\n```\nServer-Authorization: Hawk mac=\"XIJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=\", hash=\"f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=\", ext=\"response-specific\"\n```\n\n\n## Browser Support and Considerations\n\nA browser script is provided for including using a `<script>` tag in [lib/browser.js](/lib/browser.js).\n\n**Hawk** relies on the _Server-Authorization_ and _WWW-Authenticate_ headers in its response to communicate with the client.\nTherefore, in case of CORS requests, it is important to consider sending _Access-Control-Expose-Headers_ with the value\n_\"WWW-Authenticate, Server-Authorization\"_ on each response from your server. As explained in the\n[specifications](http://www.w3.org/TR/cors/#access-control-expose-headers-response-header), it will indicate that these headers\ncan safely be accessed by the client (using getResponseHeader() on the XmlHttpRequest object). Otherwise you will be met with a\n[\"simple response header\"](http://www.w3.org/TR/cors/#simple-response-header) which excludes these fields and would prevent the\nHawk client from authenticating the requests.You can read more about the why and how in this\n[article](http://www.html5rocks.com/en/tutorials/cors/#toc-adding-cors-support-to-the-server)\n\n\n# Single URI Authorization\n\nThere are cases in which limited and short-term access to a protected resource is granted to a third party which does not\nhave access to the shared credentials. For example, displaying a protected image on a web page accessed by anyone. **Hawk**\nprovides limited support for such URIs in the form of a _bewit_ - a URI query parameter appended to the request URI which contains\nthe necessary credentials to authenticate the request.\n\nBecause of the significant security risks involved in issuing such access, bewit usage is purposely limited only to GET requests\nand for a finite period of time. Both the client and server can issue bewit credentials, however, the server should not use the same\ncredentials as the client to maintain clear traceability as to who issued which credentials.\n\nIn order to simplify implementation, bewit credentials do not support single-use policy and can be replayed multiple times within\nthe granted access timeframe. \n\n\n## Bewit Usage Example\n\nServer code:\n\n```javascript\nvar Http = require('http');\nvar Hawk = require('hawk');\n\n\n// Credentials lookup function\n\nvar credentialsFunc = function (id, callback) {\n\n var credentials = {\n key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',\n algorithm: 'sha256'\n };\n\n return callback(null, credentials);\n};\n\n// Create HTTP server\n\nvar handler = function (req, res) {\n\n Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {\n\n res.writeHead(!err ? 200 : 401, { 'Content-Type': 'text/plain' });\n res.end(!err ? 'Access granted' : 'Shoosh!');\n });\n};\n\nHttp.createServer(handler).listen(8000, 'example.com');\n```\n\nBewit code generation:\n\n```javascript\nvar Request = require('request');\nvar Hawk = require('hawk');\n\n\n// Client credentials\n\nvar credentials = {\n id: 'dh37fgj492je',\n key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',\n algorithm: 'sha256'\n}\n\n// Generate bewit\n\nvar duration = 60 * 5; // 5 Minutes\nvar bewit = Hawk.uri.getBewit('http://example.com:8080/resource/1?b=1&a=2', { credentials: credentials, ttlSec: duration, ext: 'some-app-data' });\nvar uri = 'http://example.com:8000/resource/1?b=1&a=2' + '&bewit=' + bewit;\n```\n\n\n# Security Considerations\n\nThe greatest sources of security risks are usually found not in **Hawk** but in the policies and procedures surrounding its use.\nImplementers are strongly encouraged to assess how this module addresses their security requirements. This section includes\nan incomplete list of security considerations that must be reviewed and understood before deploying **Hawk** on the server.\nMany of the protections provided in **Hawk** depends on whether and how they are used.\n\n### MAC Keys Transmission\n\n**Hawk** does not provide any mechanism for obtaining or transmitting the set of shared credentials required. Any mechanism used\nto obtain **Hawk** credentials must ensure that these transmissions are protected using transport-layer mechanisms such as TLS.\n\n### Confidentiality of Requests\n\nWhile **Hawk** provides a mechanism for verifying the integrity of HTTP requests, it provides no guarantee of request\nconfidentiality. Unless other precautions are taken, eavesdroppers will have full access to the request content. Servers should\ncarefully consider the types of data likely to be sent as part of such requests, and employ transport-layer security mechanisms\nto protect sensitive resources.\n\n### Spoofing by Counterfeit Servers\n\n**Hawk** provides limited verification of the server authenticity. When receiving a response back from the server, the server\nmay choose to include a response `Server-Authorization` header which the client can use to verify the response. However, it is up to\nthe server to determine when such measure is included, to up to the client to enforce that policy.\n\nA hostile party could take advantage of this by intercepting the client's requests and returning misleading or otherwise\nincorrect responses. Service providers should consider such attacks when developing services using this protocol, and should\nrequire transport-layer security for any requests where the authenticity of the resource server or of server responses is an issue.\n\n### Plaintext Storage of Credentials\n\nThe **Hawk** key functions the same way passwords do in traditional authentication systems. In order to compute the request MAC,\nthe server must have access to the key in plaintext form. This is in contrast, for example, to modern operating systems, which\nstore only a one-way hash of user credentials.\n\nIf an attacker were to gain access to these keys - or worse, to the server's database of all such keys - he or she would be able\nto perform any action on behalf of any resource owner. Accordingly, it is critical that servers protect these keys from unauthorized\naccess.\n\n### Entropy of Keys\n\nUnless a transport-layer security protocol is used, eavesdroppers will have full access to authenticated requests and request\nMAC values, and will thus be able to mount offline brute-force attacks to recover the key used. Servers should be careful to\nassign keys which are long enough, and random enough, to resist such attacks for at least the length of time that the **Hawk**\ncredentials are valid.\n\nFor example, if the credentials are valid for two weeks, servers should ensure that it is not possible to mount a brute force\nattack that recovers the key in less than two weeks. Of course, servers are urged to err on the side of caution, and use the\nlongest key reasonable.\n\nIt is equally important that the pseudo-random number generator (PRNG) used to generate these keys be of sufficiently high\nquality. Many PRNG implementations generate number sequences that may appear to be random, but which nevertheless exhibit\npatterns or other weaknesses which make cryptanalysis or brute force attacks easier. Implementers should be careful to use\ncryptographically secure PRNGs to avoid these problems.\n\n### Coverage Limitations\n\nThe request MAC only covers the HTTP `Host` header and optionally the `Content-Type` header. It does not cover any other headers\nwhich can often affect how the request body is interpreted by the server. If the server behavior is influenced by the presence\nor value of such headers, an attacker can manipulate the request headers without being detected. Implementers should use the\n`ext` feature to pass application-specific information via the `Authorization` header which is protected by the request MAC.\n\nThe response authentication, when performed, only covers the response payload, content-type, and the request information \nprovided by the client in it's request (method, resource, timestamp, nonce, etc.). It does not cover the HTTP status code or\nany other response header field (e.g. Location) which can affect the client's behaviour.\n\n### Future Time Manipulation\n\nThe protocol relies on a clock sync between the client and server. To accomplish this, the server informs the client of its\ncurrent time when an invalid timestamp is received.\n\nIf an attacker is able to manipulate this information and cause the client to use an incorrect time, it would be able to cause\nthe client to generate authenticated requests using time in the future. Such requests will fail when sent by the client, and will\nnot likely leave a trace on the server (given the common implementation of nonce, if at all enforced). The attacker will then\nbe able to replay the request at the correct time without detection.\n\nThe client must only use the time information provided by the server if:\n* it was delivered over a TLS connection and the server identity has been verified, or\n* the `tsm` MAC digest calculated using the same client credentials over the timestamp has been verified.\n\n### Client Clock Poisoning\n\nWhen receiving a request with a bad timestamp, the server provides the client with its current time. The client must never use\nthe time received from the server to adjust its own clock, and must only use it to calculate an offset for communicating with\nthat particular server.\n\n### Bewit Limitations\n\nSpecial care must be taken when issuing bewit credentials to third parties. Bewit credentials are valid until expiration and cannot\nbe revoked or limited without using other means. Whatever resource they grant access to will be completely exposed to anyone with\naccess to the bewit credentials which act as bearer credentials for that particular resource. While bewit usage is limited to GET\nrequests only and therefore cannot be used to perform transactions or change server state, it can still be used to expose private\nand sensitive information.\n\n### Host Header Forgery\n\nHawk validates the incoming request MAC against the incoming HTTP Host header. However, unless the optional `host` and `port`\noptions are used with `server.authenticate()`, a malicous client can mint new host names pointing to the server's IP address and\nuse that to craft an attack by sending a valid request that's meant for another hostname than the one used by the server. Server\nimplementors must manually verify that the host header received matches their expectation (or use the options mentioned above).\n\n# Frequently Asked Questions\n\n### Where is the protocol specification?\n\nIf you are looking for some prose explaining how all this works, **this is it**. **Hawk** is being developed as an open source\nproject instead of a standard. In other words, the [code](/hueniverse/hawk/tree/master/lib) is the specification. Not sure about\nsomething? Open an issue!\n\n### Is it done?\n\nAt if version 0.10.0, **Hawk** is feature-complete. However, until this module reaches version 1.0.0 it is considered experimental\nand is likely to change. This also means your feedback and contribution are very welcome. Feel free to open issues with questions\nand suggestions.\n\n### Where can I find **Hawk** implementations in other languages?\n\n**Hawk**'s only reference implementation is provided in JavaScript as a node.js module. However, others are actively porting it to other\nplatforms. There is already a [PHP](https://github.com/alexbilbie/PHP-Hawk),\n[.NET](https://github.com/pcibraro/hawknet), and [JAVA](https://github.com/wealdtech/hawk) libraries available. The full list\nis maintained [here](https://github.com/hueniverse/hawk/issues?labels=port). Please add an issue if you are working on another\nport. A cross-platform test-suite is in the works.\n\n### Why isn't the algorithm part of the challenge or dynamically negotiated?\n\nThe algorithm used is closely related to the key issued as different algorithms require different key sizes (and other\nrequirements). While some keys can be used for multiple algorithm, the protocol is designed to closely bind the key and algorithm\ntogether as part of the issued credentials.\n\n### Why is Host and Content-Type the only headers covered by the request MAC?\n\nIt is really hard to include other headers. Headers can be changed by proxies and other intermediaries and there is no\nwell-established way to normalize them. Many platforms change the case of header field names and values. The only\nstraight-forward solution is to include the headers in some blob (say, base64 encoded JSON) and include that with the request,\nan approach taken by JWT and other such formats. However, that design violates the HTTP header boundaries, repeats information,\nand introduces other security issues because firewalls will not be aware of these \"hidden\" headers. In addition, any information\nrepeated must be compared to the duplicated information in the header and therefore only moves the problem elsewhere.\n\n### Why not just use HTTP Digest?\n\nDigest requires pre-negotiation to establish a nonce. This means you can't just make a request - you must first send\na protocol handshake to the server. This pattern has become unacceptable for most web services, especially mobile\nwhere extra round-trip are costly.\n\n### Why bother with all this nonce and timestamp business?\n\n**Hawk** is an attempt to find a reasonable, practical compromise between security and usability. OAuth 1.0 got timestamp\nand nonces halfway right but failed when it came to scalability and consistent developer experience. **Hawk** addresses\nit by requiring the client to sync its clock, but provides it with tools to accomplish it.\n\nIn general, replay protection is a matter of application-specific threat model. It is less of an issue on a TLS-protected\nsystem where the clients are implemented using best practices and are under the control of the server. Instead of dropping\nreplay protection, **Hawk** offers a required time window and an optional nonce verification. Together, it provides developers\nwith the ability to decide how to enforce their security policy without impacting the client's implementation.\n\n### What are `app` and `dlg` in the authorization header and normalized mac string?\n\nThe original motivation for **Hawk** was to replace the OAuth 1.0 use cases. This included both a simple client-server mode which\nthis module is specifically designed for, and a delegated access mode which is being developed separately in\n[Oz](https://github.com/hueniverse/oz). In addition to the **Hawk** use cases, Oz requires another attribute: the application id `app`.\nThis provides binding between the credentials and the application in a way that prevents an attacker from tricking an application\nto use credentials issued to someone else. It also has an optional 'delegated-by' attribute `dlg` which is the application id of the\napplication the credentials were directly issued to. The goal of these two additions is to allow Oz to utilize **Hawk** directly,\nbut with the additional security of delegated credentials.\n\n### What is the purpose of the static strings used in each normalized MAC input?\n\nWhen calculating a hash or MAC, a static prefix (tag) is added. The prefix is used to prevent MAC values from being\nused or reused for a purpose other than what they were created for (i.e. prevents switching MAC values between a request,\nresponse, and a bewit use cases). It also protects against expliots created after a potential change in how the protocol\ncreates the normalized string. For example, if a future version would switch the order of nonce and timestamp, it\ncan create an exploit opportunity for cases where the nonce is similar in format to a timestamp.\n\n### Does **Hawk** have anything to do with OAuth?\n\nShort answer: no.\n\n**Hawk** was originally proposed as the OAuth MAC Token specification. However, the OAuth working group in its consistent\nincompetence failed to produce a final, usable solution to address one of the most popular use cases of OAuth 1.0 - using it\nto authenticate simple client-server transactions (i.e. two-legged). As you can guess, the OAuth working group is still hard\nat work to produce more garbage.\n\n**Hawk** provides a simple HTTP authentication scheme for making client-server requests. It does not address the OAuth use case\nof delegating access to a third party. If you are looking for an OAuth alternative, check out [Oz](https://github.com/hueniverse/oz).\n\n\n# Acknowledgements\n\n**Hawk** is a derivative work of the [HTTP MAC Authentication Scheme](http://tools.ietf.org/html/draft-hammer-oauth-v2-mac-token-05) proposal\nco-authored by Ben Adida, Adam Barth, and Eran Hammer, which in turn was based on the OAuth 1.0 community specification.\n\nSpecial thanks to Ben Laurie for his always insightful feedback and advice.\n\nThe **Hawk** logo was created by [Chris Carrasco](http://chriscarrasco.com).\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/hueniverse/hawk/issues" - }, - "homepage": "https://github.com/hueniverse/hawk", - "_id": "hawk@1.0.0", - "dist": { - "shasum": "54a49d24842997b48ab16d30e69195e4a574149b" - }, - "_from": "hawk@~1.0.0", - "_resolved": "https://registry.npmjs.org/hawk/-/hawk-1.0.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/browser.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/browser.js deleted file mode 100755 index b25a10fd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/browser.js +++ /dev/null @@ -1,771 +0,0 @@ -// Load modules - -var Lab = require('lab'); -var Hoek = require('hoek'); -var Hawk = require('../lib'); -var Browser = require('../lib/browser'); -var LocalStorage = require('localStorage'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Browser', function () { - - var credentialsFunc = function (id, callback) { - - var credentials = { - id: id, - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: (id === '1' ? 'sha1' : 'sha256'), - user: 'steve' - }; - - return callback(null, credentials); - }; - - it('should generate a header then successfully parse it (configuration)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' }).field; - expect(req.authorization).to.exist; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (node request)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com:8080', - 'content-type': 'text/plain;x=y' - } - }; - - var payload = 'some not so random text'; - - credentialsFunc('123456', function (err, credentials) { - - var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] }); - req.headers.authorization = reqHeader.field; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true); - - var res = { - headers: { - 'content-type': 'text/plain' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' }); - expect(res.headers['server-authorization']).to.exist; - - expect(Browser.client.authenticate(res, credentials, artifacts, { payload: 'some reply' })).to.equal(true); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (no server header options)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com:8080', - 'content-type': 'text/plain;x=y' - } - }; - - var payload = 'some not so random text'; - - credentialsFunc('123456', function (err, credentials) { - - var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] }); - req.headers.authorization = reqHeader.field; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true); - - var res = { - headers: { - 'content-type': 'text/plain' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts); - expect(res.headers['server-authorization']).to.exist; - - expect(Browser.client.authenticate(res, credentials, artifacts)).to.equal(true); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (no server header)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com:8080', - 'content-type': 'text/plain;x=y' - } - }; - - var payload = 'some not so random text'; - - credentialsFunc('123456', function (err, credentials) { - - var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] }); - req.headers.authorization = reqHeader.field; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true); - - var res = { - headers: { - 'content-type': 'text/plain' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - expect(Browser.client.authenticate(res, credentials, artifacts)).to.equal(true); - done(); - }); - }); - }); - - it('should generate a header with stale ts and successfully authenticate on second call', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - Browser.utils.setNtpOffset(60 * 60 * 1000); - var header = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' }); - req.authorization = header.field; - expect(req.authorization).to.exist; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.message).to.equal('Stale timestamp'); - - var res = { - headers: { - 'www-authenticate': err.response.headers['WWW-Authenticate'] - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - expect(Browser.utils.getNtpOffset()).to.equal(60 * 60 * 1000); - expect(Browser.client.authenticate(res, credentials, header.artifacts)).to.equal(true); - expect(Browser.utils.getNtpOffset()).to.equal(0); - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' }).field; - expect(req.authorization).to.exist; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - done(); - }); - }); - }); - }); - - it('should generate a header with stale ts and successfully authenticate on second call (manual localStorage)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - Browser.utils.setStorage(LocalStorage) - - Browser.utils.setNtpOffset(60 * 60 * 1000); - var header = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' }); - req.authorization = header.field; - expect(req.authorization).to.exist; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.message).to.equal('Stale timestamp'); - - var res = { - headers: { - 'www-authenticate': err.response.headers['WWW-Authenticate'] - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - expect(parseInt(LocalStorage.getItem('hawk_ntp_offset'))).to.equal(60 * 60 * 1000); - expect(Browser.utils.getNtpOffset()).to.equal(60 * 60 * 1000); - expect(Browser.client.authenticate(res, credentials, header.artifacts)).to.equal(true); - expect(Browser.utils.getNtpOffset()).to.equal(0); - expect(parseInt(LocalStorage.getItem('hawk_ntp_offset'))).to.equal(0); - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' }).field; - expect(req.authorization).to.exist; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - done(); - }); - }); - }); - }); - - it('should generate a header then fails to parse it (missing server header hash)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com:8080', - 'content-type': 'text/plain;x=y' - } - }; - - var payload = 'some not so random text'; - - credentialsFunc('123456', function (err, credentials) { - - var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] }); - req.headers.authorization = reqHeader.field; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true); - - var res = { - headers: { - 'content-type': 'text/plain' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts); - expect(res.headers['server-authorization']).to.exist; - - expect(Browser.client.authenticate(res, credentials, artifacts, { payload: 'some reply' })).to.equal(false); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (with hash)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field; - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it then validate payload', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field; - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload('hola!', credentials, artifacts)).to.be.true; - expect(Hawk.server.authenticatePayload('hello!', credentials, artifacts)).to.be.false; - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (app)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', app: 'asd23ased' }).field; - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(artifacts.app).to.equal('asd23ased'); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (app, dlg)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', app: 'asd23ased', dlg: '23434szr3q4d' }).field; - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(artifacts.app).to.equal('asd23ased'); - expect(artifacts.dlg).to.equal('23434szr3q4d'); - done(); - }); - }); - }); - - it('should generate a header then fail authentication due to bad hash', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field; - Hawk.server.authenticate(req, credentialsFunc, { payload: 'byebye!' }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Bad payload hash'); - done(); - }); - }); - }); - - it('should generate a header for one resource then fail to authenticate another', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' }).field; - req.url = '/something/else'; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(credentials).to.exist; - done(); - }); - }); - }); - - describe('client', function () { - - describe('#header', function () { - - it('should return a valid authorization header (sha1)', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'sha1' - }; - - var header = Browser.client.header('http://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about' }).field; - expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="bsvY3IfUllw6V5rvk4tStEvpBhE=", ext="Bazinga!", mac="qbf1ZPG/r/e06F4ht+T77LXi5vw="'); - done(); - }); - - it('should return a valid authorization header (sha256)', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'sha256' - }; - - var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field; - expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", ext="Bazinga!", mac="q1CwFoSHzPZSkbIvl0oYlD+91rBUEvFk763nMjMndj8="'); - done(); - }); - - it('should return a valid authorization header (no ext)', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'sha256' - }; - - var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field; - expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="'); - done(); - }); - - it('should return an empty authorization header on missing options', function (done) { - - var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST').field; - expect(header).to.equal(''); - done(); - }); - - it('should return an empty authorization header on invalid credentials', function (done) { - - var credentials = { - key: '2983d45yun89q', - algorithm: 'sha256' - }; - - var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207 }).field; - expect(header).to.equal(''); - done(); - }); - - it('should return an empty authorization header on invalid algorithm', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'hmac-sha-0' - }; - - var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, payload: 'something, anything!', ext: 'Bazinga!', timestamp: 1353809207 }).field; - expect(header).to.equal(''); - done(); - }); - }); - - describe('#authenticate', function () { - - it('should return false on invalid header', function (done) { - - var res = { - headers: { - 'server-authorization': 'Hawk mac="abc", bad="xyz"' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - expect(Browser.client.authenticate(res, {})).to.equal(false); - done(); - }); - - it('should return false on invalid mac', function (done) { - - var res = { - headers: { - 'content-type': 'text/plain', - 'server-authorization': 'Hawk mac="_IJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - var artifacts = { - method: 'POST', - host: 'example.com', - port: '8080', - resource: '/resource/4?filter=a', - ts: '1362336900', - nonce: 'eb5S_L', - hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=', - ext: 'some-app-data', - app: undefined, - dlg: undefined, - mac: 'BlmSe8K+pbKIb6YsZCnt4E1GrYvY1AaYayNR82dGpIk=', - id: '123456' - }; - - var credentials = { - id: '123456', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'steve' - }; - - expect(Browser.client.authenticate(res, credentials, artifacts)).to.equal(false); - done(); - }); - - it('should return true on ignoring hash', function (done) { - - var res = { - headers: { - 'content-type': 'text/plain', - 'server-authorization': 'Hawk mac="XIJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - var artifacts = { - method: 'POST', - host: 'example.com', - port: '8080', - resource: '/resource/4?filter=a', - ts: '1362336900', - nonce: 'eb5S_L', - hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=', - ext: 'some-app-data', - app: undefined, - dlg: undefined, - mac: 'BlmSe8K+pbKIb6YsZCnt4E1GrYvY1AaYayNR82dGpIk=', - id: '123456' - }; - - var credentials = { - id: '123456', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'steve' - }; - - expect(Browser.client.authenticate(res, credentials, artifacts)).to.equal(true); - done(); - }); - - it('should fail on invalid WWW-Authenticate header format', function (done) { - - var res = { - headers: { - 'www-authenticate': 'Hawk ts="1362346425875", tsm="PhwayS28vtnn3qbv0mqRBYSXebN/zggEtucfeZ620Zo=", x="Stale timestamp"' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - expect(Browser.client.authenticate(res, {})).to.equal(false); - done(); - }); - - it('should fail on invalid WWW-Authenticate header format', function (done) { - - var credentials = { - id: '123456', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'steve' - }; - - var res = { - headers: { - 'www-authenticate': 'Hawk ts="1362346425875", tsm="hwayS28vtnn3qbv0mqRBYSXebN/zggEtucfeZ620Zo=", error="Stale timestamp"' - }, - getResponseHeader: function (header) { - - return res.headers[header.toLowerCase()]; - } - }; - - expect(Browser.client.authenticate(res, credentials)).to.equal(false); - done(); - }); - }); - - describe('#message', function () { - it('should generate an authorization then successfully parse it', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - done(); - }); - }); - }); - - it('should fail on missing host', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Browser.client.message(null, 8080, 'some message', { credentials: credentials }); - expect(auth).to.not.exist; - done(); - }); - }); - - it('should fail on missing credentials', function (done) { - - var auth = Browser.client.message('example.com', 8080, 'some message', {}); - expect(auth).to.not.exist; - done(); - }); - - it('should fail on invalid algorithm', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var creds = Hoek.clone(credentials); - creds.algorithm = 'blah'; - var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: creds }); - expect(auth).to.not.exist; - done(); - }); - }); - }); - }); - - describe('#parseAuthorizationHeader', function (done) { - - it('returns null on missing header', function (done) { - - expect(Browser.utils.parseAuthorizationHeader()).to.equal(null); - done(); - }); - - it('returns null on bad header syntax (structure)', function (done) { - - expect(Browser.utils.parseAuthorizationHeader('Hawk')).to.equal(null); - done(); - }); - - it('returns null on bad header syntax (parts)', function (done) { - - expect(Browser.utils.parseAuthorizationHeader(' ')).to.equal(null); - done(); - }); - - it('returns null on bad scheme name', function (done) { - - expect(Browser.utils.parseAuthorizationHeader('Basic asdasd')).to.equal(null); - done(); - }); - - it('returns null on bad attribute value', function (done) { - - expect(Browser.utils.parseAuthorizationHeader('Hawk test="\t"', ['test'])).to.equal(null); - done(); - }); - - it('returns null on duplicated attribute', function (done) { - - expect(Browser.utils.parseAuthorizationHeader('Hawk test="a", test="b"', ['test'])).to.equal(null); - done(); - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/client.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/client.js deleted file mode 100755 index bcc4222a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/client.js +++ /dev/null @@ -1,206 +0,0 @@ -// Load modules - -var Url = require('url'); -var Lab = require('lab'); -var Hawk = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hawk', function () { - - describe('client', function () { - - describe('#header', function () { - - it('should return a valid authorization header (sha1)', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'sha1' - }; - - var header = Hawk.client.header('http://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about' }).field; - expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="bsvY3IfUllw6V5rvk4tStEvpBhE=", ext="Bazinga!", mac="qbf1ZPG/r/e06F4ht+T77LXi5vw="'); - done(); - }); - - it('should return a valid authorization header (sha256)', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'sha256' - }; - - var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field; - expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", ext="Bazinga!", mac="q1CwFoSHzPZSkbIvl0oYlD+91rBUEvFk763nMjMndj8="'); - done(); - }); - - it('should return a valid authorization header (no ext)', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'sha256' - }; - - var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field; - expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="'); - done(); - }); - - it('should return an empty authorization header on missing options', function (done) { - - var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST').field; - expect(header).to.equal(''); - done(); - }); - - it('should return an empty authorization header on invalid credentials', function (done) { - - var credentials = { - key: '2983d45yun89q', - algorithm: 'sha256' - }; - - var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207 }).field; - expect(header).to.equal(''); - done(); - }); - - it('should return an empty authorization header on invalid algorithm', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'hmac-sha-0' - }; - - var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, payload: 'something, anything!', ext: 'Bazinga!', timestamp: 1353809207 }).field; - expect(header).to.equal(''); - done(); - }); - }); - - describe('#authenticate', function () { - - it('should return false on invalid header', function (done) { - - var res = { - headers: { - 'server-authorization': 'Hawk mac="abc", bad="xyz"' - } - }; - - expect(Hawk.client.authenticate(res, {})).to.equal(false); - done(); - }); - - it('should return false on invalid mac', function (done) { - - var res = { - headers: { - 'content-type': 'text/plain', - 'server-authorization': 'Hawk mac="_IJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"' - } - }; - - var artifacts = { - method: 'POST', - host: 'example.com', - port: '8080', - resource: '/resource/4?filter=a', - ts: '1362336900', - nonce: 'eb5S_L', - hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=', - ext: 'some-app-data', - app: undefined, - dlg: undefined, - mac: 'BlmSe8K+pbKIb6YsZCnt4E1GrYvY1AaYayNR82dGpIk=', - id: '123456' - }; - - var credentials = { - id: '123456', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'steve' - }; - - expect(Hawk.client.authenticate(res, credentials, artifacts)).to.equal(false); - done(); - }); - - it('should return true on ignoring hash', function (done) { - - var res = { - headers: { - 'content-type': 'text/plain', - 'server-authorization': 'Hawk mac="XIJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", hash="f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=", ext="response-specific"' - } - }; - - var artifacts = { - method: 'POST', - host: 'example.com', - port: '8080', - resource: '/resource/4?filter=a', - ts: '1362336900', - nonce: 'eb5S_L', - hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=', - ext: 'some-app-data', - app: undefined, - dlg: undefined, - mac: 'BlmSe8K+pbKIb6YsZCnt4E1GrYvY1AaYayNR82dGpIk=', - id: '123456' - }; - - var credentials = { - id: '123456', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'steve' - }; - - expect(Hawk.client.authenticate(res, credentials, artifacts)).to.equal(true); - done(); - }); - - it('should fail on invalid WWW-Authenticate header format', function (done) { - - var header = 'Hawk ts="1362346425875", tsm="PhwayS28vtnn3qbv0mqRBYSXebN/zggEtucfeZ620Zo=", x="Stale timestamp"'; - expect(Hawk.client.authenticate({ headers: { 'www-authenticate': header } }, {})).to.equal(false); - done(); - }); - - it('should fail on invalid WWW-Authenticate header format', function (done) { - - var credentials = { - id: '123456', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'steve' - }; - - var header = 'Hawk ts="1362346425875", tsm="hwayS28vtnn3qbv0mqRBYSXebN/zggEtucfeZ620Zo=", error="Stale timestamp"'; - expect(Hawk.client.authenticate({ headers: { 'www-authenticate': header } }, credentials)).to.equal(false); - done(); - }); - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/crypto.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/crypto.js deleted file mode 100755 index b62c2177..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/crypto.js +++ /dev/null @@ -1,86 +0,0 @@ -// Load modules - -var Lab = require('lab'); -var Hawk = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hawk', function () { - - describe('Crypto', function () { - - describe('#generateNormalizedString', function () { - - it('should return a valid normalized string', function (done) { - - expect(Hawk.crypto.generateNormalizedString('header', { - credentials: { - key: 'dasdfasdf', - algorithm: 'sha256' - }, - ts: 1357747017, - nonce: 'k3k4j5', - method: 'GET', - resource: '/resource/something', - host: 'example.com', - port: 8080 - })).to.equal('hawk.1.header\n1357747017\nk3k4j5\nGET\n/resource/something\nexample.com\n8080\n\n\n'); - - done(); - }); - - it('should return a valid normalized string (ext)', function (done) { - - expect(Hawk.crypto.generateNormalizedString('header', { - credentials: { - key: 'dasdfasdf', - algorithm: 'sha256' - }, - ts: 1357747017, - nonce: 'k3k4j5', - method: 'GET', - resource: '/resource/something', - host: 'example.com', - port: 8080, - ext: 'this is some app data' - })).to.equal('hawk.1.header\n1357747017\nk3k4j5\nGET\n/resource/something\nexample.com\n8080\n\nthis is some app data\n'); - - done(); - }); - - it('should return a valid normalized string (payload + ext)', function (done) { - - expect(Hawk.crypto.generateNormalizedString('header', { - credentials: { - key: 'dasdfasdf', - algorithm: 'sha256' - }, - ts: 1357747017, - nonce: 'k3k4j5', - method: 'GET', - resource: '/resource/something', - host: 'example.com', - port: 8080, - hash: 'U4MKKSmiVxk37JCCrAVIjV/OhB3y+NdwoCr6RShbVkE=', - ext: 'this is some app data' - })).to.equal('hawk.1.header\n1357747017\nk3k4j5\nGET\n/resource/something\nexample.com\n8080\nU4MKKSmiVxk37JCCrAVIjV/OhB3y+NdwoCr6RShbVkE=\nthis is some app data\n'); - - done(); - }); - }); - }); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/index.js deleted file mode 100755 index ba837388..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/index.js +++ /dev/null @@ -1,316 +0,0 @@ -// Load modules - -var Url = require('url'); -var Lab = require('lab'); -var Hawk = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hawk', function () { - - var credentialsFunc = function (id, callback) { - - var credentials = { - id: id, - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: (id === '1' ? 'sha1' : 'sha256'), - user: 'steve' - }; - - return callback(null, credentials); - }; - - it('should generate a header then successfully parse it (configuration)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Hawk.client.header(Url.parse('http://example.com:8080/resource/4?filter=a'), req.method, { credentials: credentials, ext: 'some-app-data' }).field; - expect(req.authorization).to.exist; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (node request)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com:8080', - 'content-type': 'text/plain;x=y' - } - }; - - var payload = 'some not so random text'; - - credentialsFunc('123456', function (err, credentials) { - - var reqHeader = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] }); - req.headers.authorization = reqHeader.field; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true); - - var res = { - headers: { - 'content-type': 'text/plain' - } - }; - - res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' }); - expect(res.headers['server-authorization']).to.exist; - - expect(Hawk.client.authenticate(res, credentials, artifacts, { payload: 'some reply' })).to.equal(true); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (no server header options)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com:8080', - 'content-type': 'text/plain;x=y' - } - }; - - var payload = 'some not so random text'; - - credentialsFunc('123456', function (err, credentials) { - - var reqHeader = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] }); - req.headers.authorization = reqHeader.field; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true); - - var res = { - headers: { - 'content-type': 'text/plain' - } - }; - - res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts); - expect(res.headers['server-authorization']).to.exist; - - expect(Hawk.client.authenticate(res, credentials, artifacts)).to.equal(true); - done(); - }); - }); - }); - - it('should generate a header then fails to parse it (missing server header hash)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com:8080', - 'content-type': 'text/plain;x=y' - } - }; - - var payload = 'some not so random text'; - - credentialsFunc('123456', function (err, credentials) { - - var reqHeader = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] }); - req.headers.authorization = reqHeader.field; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true); - - var res = { - headers: { - 'content-type': 'text/plain' - } - }; - - res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts); - expect(res.headers['server-authorization']).to.exist; - - expect(Hawk.client.authenticate(res, credentials, artifacts, { payload: 'some reply' })).to.equal(false); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (with hash)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field; - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it then validate payload', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field; - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(Hawk.server.authenticatePayload('hola!', credentials, artifacts)).to.be.true; - expect(Hawk.server.authenticatePayload('hello!', credentials, artifacts)).to.be.false; - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (app)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', app: 'asd23ased' }).field; - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(artifacts.app).to.equal('asd23ased'); - done(); - }); - }); - }); - - it('should generate a header then successfully parse it (app, dlg)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', app: 'asd23ased', dlg: '23434szr3q4d' }).field; - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(artifacts.ext).to.equal('some-app-data'); - expect(artifacts.app).to.equal('asd23ased'); - expect(artifacts.dlg).to.equal('23434szr3q4d'); - done(); - }); - }); - }); - - it('should generate a header then fail authentication due to bad hash', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field; - Hawk.server.authenticate(req, credentialsFunc, { payload: 'byebye!' }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Bad payload hash'); - done(); - }); - }); - }); - - it('should generate a header for one resource then fail to authenticate another', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - credentialsFunc('123456', function (err, credentials) { - - req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' }).field; - req.url = '/something/else'; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(credentials).to.exist; - done(); - }); - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/message.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/message.js deleted file mode 100755 index 04b91d41..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/message.js +++ /dev/null @@ -1,246 +0,0 @@ -// Load modules - -var Url = require('url'); -var Lab = require('lab'); -var Hoek = require('hoek'); -var Hawk = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hawk', function () { - - var credentialsFunc = function (id, callback) { - - var credentials = { - id: id, - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: (id === '1' ? 'sha1' : 'sha256'), - user: 'steve' - }; - - return callback(null, credentials); - }; - - it('should generate an authorization then successfully parse it', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - done(); - }); - }); - }); - - it('should fail authorization on mismatching host', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - Hawk.server.authenticateMessage('example1.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('Bad mac'); - done(); - }); - }); - }); - - it('should fail authorization on stale timestamp', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, { localtimeOffsetMsec: 100000 }, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('Stale timestamp'); - done(); - }); - }); - }); - - it('should fail authorization on invalid authorization', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - delete auth.id; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('Invalid authorization'); - done(); - }); - }); - }); - - it('should fail authorization on bad hash', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message1', auth, credentialsFunc, {}, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('Bad message hash'); - done(); - }); - }); - }); - - it('should fail authorization on nonce error', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, { nonceFunc: function (nonce, ts, callback) { callback (new Error('kaboom')); } }, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('Invalid nonce'); - done(); - }); - }); - }); - - it('should fail authorization on credentials error', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - var errFunc = function (id, callback) { - - callback(new Error('kablooey')); - }; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('kablooey'); - done(); - }); - }); - }); - - it('should fail authorization on missing credentials', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - var errFunc = function (id, callback) { - - callback(); - }; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('Unknown credentials'); - done(); - }); - }); - }); - - it('should fail authorization on invalid credentials', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - var errFunc = function (id, callback) { - - callback(null, {}); - }; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('Invalid credentials'); - done(); - }); - }); - }); - - it('should fail authorization on invalid credentials algorithm', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials }); - expect(auth).to.exist; - - var errFunc = function (id, callback) { - - callback(null, { key: '123', algorithm: '456' }); - }; - - Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials) { - - expect(err).to.exist; - expect(err.message).to.equal('Unknown algorithm'); - done(); - }); - }); - }); - - it('should fail on missing host', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var auth = Hawk.client.message(null, 8080, 'some message', { credentials: credentials }); - expect(auth).to.not.exist; - done(); - }); - }); - - it('should fail on missing credentials', function (done) { - - var auth = Hawk.client.message('example.com', 8080, 'some message', {}); - expect(auth).to.not.exist; - done(); - }); - - it('should fail on invalid algorithm', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var creds = Hoek.clone(credentials); - creds.algorithm = 'blah'; - var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: creds }); - expect(auth).to.not.exist; - done(); - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/readme.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/readme.js deleted file mode 100755 index f39e033d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/readme.js +++ /dev/null @@ -1,98 +0,0 @@ -// Load modules - -var Lab = require('lab'); -var Hoek = require('hoek'); -var Hawk = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hawk', function () { - - describe('README', function () { - - describe('core', function () { - - var credentials = { - id: 'dh37fgj492je', - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256' - }; - - var options = { - credentials: credentials, - timestamp: 1353832234, - nonce: 'j4h3g2', - ext: 'some-app-ext-data' - }; - - it('should generate a header protocol example', function (done) { - - var header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'GET', options).field; - - expect(header).to.equal('Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", ext="some-app-ext-data", mac="6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE="'); - done(); - }); - - it('should generate a normalized string protocol example', function (done) { - - var normalized = Hawk.crypto.generateNormalizedString('header', { - credentials: credentials, - ts: options.timestamp, - nonce: options.nonce, - method: 'GET', - resource: '/resource?a=1&b=2', - host: 'example.com', - port: 8000, - ext: options.ext - }); - - expect(normalized).to.equal('hawk.1.header\n1353832234\nj4h3g2\nGET\n/resource?a=1&b=2\nexample.com\n8000\n\nsome-app-ext-data\n'); - done(); - }); - - var payloadOptions = Hoek.clone(options); - payloadOptions.payload = 'Thank you for flying Hawk'; - payloadOptions.contentType = 'text/plain'; - - it('should generate a header protocol example (with payload)', function (done) { - - var header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'POST', payloadOptions).field; - - expect(header).to.equal('Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", hash="Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=", ext="some-app-ext-data", mac="aSe1DERmZuRl3pI36/9BdZmnErTw3sNzOOAUlfeKjVw="'); - done(); - }); - - it('should generate a normalized string protocol example (with payload)', function (done) { - - var normalized = Hawk.crypto.generateNormalizedString('header', { - credentials: credentials, - ts: options.timestamp, - nonce: options.nonce, - method: 'POST', - resource: '/resource?a=1&b=2', - host: 'example.com', - port: 8000, - hash: Hawk.crypto.calculatePayloadHash(payloadOptions.payload, credentials.algorithm, payloadOptions.contentType), - ext: options.ext - }); - - expect(normalized).to.equal('hawk.1.header\n1353832234\nj4h3g2\nPOST\n/resource?a=1&b=2\nexample.com\n8000\nYi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=\nsome-app-ext-data\n'); - done(); - }); - }); - }); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/server.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/server.js deleted file mode 100755 index 3e92427a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/server.js +++ /dev/null @@ -1,686 +0,0 @@ -// Load modules - -var Url = require('url'); -var Lab = require('lab'); -var Hawk = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hawk', function () { - - describe('server', function () { - - var credentialsFunc = function (id, callback) { - - var credentials = { - id: id, - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: (id === '1' ? 'sha1' : 'sha256'), - user: 'steve' - }; - - return callback(null, credentials); - }; - - describe('#authenticate', function () { - - it('should parse a valid authentication header (sha1)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="1", ts="1353788437", nonce="k3j4h2", mac="zy79QQ5/EYFmQqutVnYb73gAc/U=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - done(); - }); - }); - - it('should parse a valid authentication header (sha256)', function (done) { - - var req = { - method: 'GET', - url: '/resource/1?b=1&a=2', - host: 'example.com', - port: 8000, - authorization: 'Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", mac="m8r1rHbXN6NgO+KIIhjO7sFRyd78RNGVUwehe8Cp2dU=", ext="some-app-data"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353832234000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - done(); - }); - }); - - it('should parse a valid authentication header (host override)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - headers: { - host: 'example1.com:8080', - authorization: 'Hawk id="1", ts="1353788437", nonce="k3j4h2", mac="zy79QQ5/EYFmQqutVnYb73gAc/U=", ext="hello"' - } - }; - - Hawk.server.authenticate(req, credentialsFunc, { host: 'example.com', localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - done(); - }); - }); - - it('should parse a valid authentication header (host port override)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - headers: { - host: 'example1.com:80', - authorization: 'Hawk id="1", ts="1353788437", nonce="k3j4h2", mac="zy79QQ5/EYFmQqutVnYb73gAc/U=", ext="hello"' - } - }; - - Hawk.server.authenticate(req, credentialsFunc, { host: 'example.com', port: 8080, localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - done(); - }); - }); - - it('should parse a valid authentication header (POST with payload)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123456", ts="1357926341", nonce="1AwuJD", hash="qAiXIVv+yjDATneWxZP2YCTa9aHRgQdnH9b3Wc+o3dg=", ext="some-app-data", mac="UeYcj5UoTVaAWXNvJfLVia7kU3VabxCqrccXP8sUGC4="' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1357926341000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - done(); - }); - }); - - it('should fail on missing hash', function (done) { - - var req = { - method: 'GET', - url: '/resource/1?b=1&a=2', - host: 'example.com', - port: 8000, - authorization: 'Hawk id="dh37fgj492je", ts="1353832234", nonce="j4h3g2", mac="m8r1rHbXN6NgO+KIIhjO7sFRyd78RNGVUwehe8Cp2dU=", ext="some-app-data"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { payload: 'body', localtimeOffsetMsec: 1353832234000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Missing required payload hash'); - done(); - }); - }); - - it('should fail on a stale timestamp', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123456", ts="1362337299", nonce="UzmxSs", ext="some-app-data", mac="wnNUxchvvryMH2RxckTdZ/gY3ijzvccx4keVvELC61w="' - }; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Stale timestamp'); - var header = err.response.headers['WWW-Authenticate']; - var ts = header.match(/^Hawk ts\=\"(\d+)\"\, tsm\=\"([^\"]+)\"\, error=\"Stale timestamp\"$/); - var now = Hawk.utils.now(); - expect(parseInt(ts[1], 10) * 1000).to.be.within(now - 1000, now + 1000); - - var res = { - headers: { - 'www-authenticate': header - } - }; - - expect(Hawk.client.authenticate(res, credentials, artifacts)).to.equal(true); - done(); - }); - }); - - it('should fail on a replay', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="bXx7a7p1h9QYQNZ8x7QhvDQym8ACgab4m3lVSFn4DBw=", ext="hello"' - }; - - var memoryCache = {}; - var options = { - localtimeOffsetMsec: 1353788437000 - Hawk.utils.now(), - nonceFunc: function (nonce, ts, callback) { - - if (memoryCache[nonce]) { - return callback(new Error()); - } - - memoryCache[nonce] = true; - return callback(); - } - }; - - Hawk.server.authenticate(req, credentialsFunc, options, function (err, credentials, artifacts) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - - Hawk.server.authenticate(req, credentialsFunc, options, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid nonce'); - done(); - }); - }); - }); - - it('should fail on an invalid authentication header: wrong scheme', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Basic asdasdasdasd' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.not.exist; - done(); - }); - }); - - it('should fail on an invalid authentication header: no scheme', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: '!@#' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid header syntax'); - done(); - }); - }); - - it('should fail on an missing authorization header', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.isMissing).to.equal(true); - done(); - }); - }); - - it('should fail on an missing host header', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - headers: { - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - } - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid Host header'); - done(); - }); - }); - - it('should fail on an missing authorization attribute (id)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Missing attributes'); - done(); - }); - }); - - it('should fail on an missing authorization attribute (ts)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Missing attributes'); - done(); - }); - }); - - it('should fail on an missing authorization attribute (nonce)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Missing attributes'); - done(); - }); - }); - - it('should fail on an missing authorization attribute (mac)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Missing attributes'); - done(); - }); - }); - - it('should fail on an unknown authorization attribute', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", x="3", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Unknown attribute: x'); - done(); - }); - }); - - it('should fail on an bad authorization header format', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123\\", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Bad header format'); - done(); - }); - }); - - it('should fail on an bad authorization attribute value', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="\t", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Bad attribute value: id'); - done(); - }); - }); - - it('should fail on an empty authorization attribute value', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Bad attribute value: id'); - done(); - }); - }); - - it('should fail on duplicated authorization attribute key', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", id="456", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Duplicate attribute: id'); - done(); - }); - }); - - it('should fail on an invalid authorization header format', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk' - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid header syntax'); - done(); - }); - }); - - it('should fail on an bad host header (missing host)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - headers: { - host: ':8080', - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - } - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid Host header'); - done(); - }); - }); - - it('should fail on an bad host header (pad port)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - headers: { - host: 'example.com:something', - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - } - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid Host header'); - done(); - }); - }); - - it('should fail on credentialsFunc error', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - var credentialsFunc = function (id, callback) { - - return callback(new Error('Unknown user')); - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.message).to.equal('Unknown user'); - done(); - }); - }); - - it('should fail on missing credentials', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - var credentialsFunc = function (id, callback) { - - return callback(null, null); - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Unknown credentials'); - done(); - }); - }); - - it('should fail on invalid credentials', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - var credentialsFunc = function (id, callback) { - - var credentials = { - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - user: 'steve' - }; - - return callback(null, credentials); - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.message).to.equal('Invalid credentials'); - expect(err.response.payload.message).to.equal('An internal server error occurred'); - done(); - }); - }); - - it('should fail on unknown credentials algorithm', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - var credentialsFunc = function (id, callback) { - - var credentials = { - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'hmac-sha-0', - user: 'steve' - }; - - return callback(null, credentials); - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.message).to.equal('Unknown algorithm'); - expect(err.response.payload.message).to.equal('An internal server error occurred'); - done(); - }); - }); - - it('should fail on unknown bad mac', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080, - authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcU4jlr7T/wuKe3dKijvTvSos=", ext="hello"' - }; - - var credentialsFunc = function (id, callback) { - - var credentials = { - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'steve' - }; - - return callback(null, credentials); - }; - - Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Bad mac'); - done(); - }); - }); - }); - - describe('#header', function () { - - it('should return an empty authorization header on missing options', function (done) { - - var header = Hawk.server.header(); - expect(header).to.equal(''); - done(); - }); - - it('should return an empty authorization header on missing credentials', function (done) { - - var header = Hawk.server.header(null, {}); - expect(header).to.equal(''); - done(); - }); - - it('should return an empty authorization header on invalid credentials', function (done) { - - var credentials = { - key: '2983d45yun89q' - }; - - var header = Hawk.server.header(credentials); - expect(header).to.equal(''); - done(); - }); - - it('should return an empty authorization header on invalid algorithm', function (done) { - - var artifacts = { - id: '123456' - }; - - var credentials = { - key: '2983d45yun89q', - algorithm: 'hmac-sha-0' - }; - - var header = Hawk.server.header(credentials, artifacts); - expect(header).to.equal(''); - done(); - }); - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/uri.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/uri.js deleted file mode 100755 index 44ffd7fb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/uri.js +++ /dev/null @@ -1,456 +0,0 @@ -// Load modules - -var Http = require('http'); -var Lab = require('lab'); -var Hawk = require('../lib'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hawk', function () { - - describe('Uri', function () { - - var credentialsFunc = function (id, callback) { - - var credentials = { - id: id, - key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', - algorithm: 'sha256', - user: 'steve' - }; - - return callback(null, credentials); - }; - - it('should generate a bewit then successfully authenticate it', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?a=1&b=2', - host: 'example.com', - port: 80 - }; - - credentialsFunc('123456', function (err, credentials) { - - var bewit = Hawk.uri.getBewit('http://example.com/resource/4?a=1&b=2', { credentials: credentials, ttlSec: 60 * 60 * 24 * 365 * 100, ext: 'some-app-data' }); - req.url += '&bewit=' + bewit; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(attributes.ext).to.equal('some-app-data'); - done(); - }); - }); - }); - - it('should generate a bewit then successfully authenticate it (no ext)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?a=1&b=2', - host: 'example.com', - port: 80 - }; - - credentialsFunc('123456', function (err, credentials) { - - var bewit = Hawk.uri.getBewit('http://example.com/resource/4?a=1&b=2', { credentials: credentials, ttlSec: 60 * 60 * 24 * 365 * 100 }); - req.url += '&bewit=' + bewit; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - done(); - }); - }); - }); - - it('should successfully authenticate a request (last param)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?a=1&b=2&bewit=MTIzNDU2XDQ1MTE0ODQ2MjFcMzFjMmNkbUJFd1NJRVZDOVkva1NFb2c3d3YrdEVNWjZ3RXNmOGNHU2FXQT1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(attributes.ext).to.equal('some-app-data'); - done(); - }); - }); - - it('should successfully authenticate a request (first param)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MTE0ODQ2MjFcMzFjMmNkbUJFd1NJRVZDOVkva1NFb2c3d3YrdEVNWjZ3RXNmOGNHU2FXQT1cc29tZS1hcHAtZGF0YQ&a=1&b=2', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(attributes.ext).to.equal('some-app-data'); - done(); - }); - }); - - it('should successfully authenticate a request (only param)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MTE0ODQ2NDFcZm1CdkNWT3MvcElOTUUxSTIwbWhrejQ3UnBwTmo4Y1VrSHpQd3Q5OXJ1cz1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.not.exist; - expect(credentials.user).to.equal('steve'); - expect(attributes.ext).to.equal('some-app-data'); - done(); - }); - }); - - it('should fail on multiple authentication', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MTE0ODQ2NDFcZm1CdkNWT3MvcElOTUUxSTIwbWhrejQ3UnBwTmo4Y1VrSHpQd3Q5OXJ1cz1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080, - authorization: 'Basic asdasdasdasd' - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Multiple authentications'); - done(); - }); - }); - - it('should fail on method other than GET', function (done) { - - credentialsFunc('123456', function (err, credentials) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - host: 'example.com', - port: 8080 - }; - - var exp = Math.floor(Hawk.utils.now() / 1000) + 60; - var ext = 'some-app-data'; - var mac = Hawk.crypto.calculateMac('bewit', credentials, { - timestamp: exp, - nonce: '', - method: req.method, - resource: req.url, - host: req.host, - port: req.port, - ext: ext - }); - - var bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + ext; - - req.url += '&bewit=' + Hawk.utils.base64urlEncode(bewit); - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid method'); - done(); - }); - }); - }); - - it('should fail on invalid host header', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ', - headers: { - host: 'example.com:something' - } - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid Host header'); - done(); - }); - }); - - it('should fail on empty bewit', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Empty bewit'); - expect(err.isMissing).to.not.exist; - done(); - }); - }); - - it('should fail on invalid bewit', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=*', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid bewit encoding'); - expect(err.isMissing).to.not.exist; - done(); - }); - }); - - it('should fail on missing bewit', function (done) { - - var req = { - method: 'GET', - url: '/resource/4', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.not.exist; - expect(err.isMissing).to.equal(true); - done(); - }); - }); - - it('should fail on invalid bewit structure', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=abc', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Invalid bewit structure'); - done(); - }); - }); - - it('should fail on empty bewit attribute', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=YVxcY1xk', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Missing bewit attributes'); - done(); - }); - }); - - it('should fail on expired access', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?a=1&b=2&bewit=MTIzNDU2XDEzNTY0MTg1ODNcWk1wZlMwWU5KNHV0WHpOMmRucTRydEk3NXNXTjFjeWVITTcrL0tNZFdVQT1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Access expired'); - done(); - }); - }); - - it('should fail on credentials function error', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, function (id, callback) { callback(Hawk.error.badRequest('Boom')); }, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Boom'); - done(); - }); - }); - - it('should fail on null credentials function response', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, function (id, callback) { callback(null, null); }, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Unknown credentials'); - done(); - }); - }); - - it('should fail on invalid credentials function response', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, function (id, callback) { callback(null, {}); }, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.message).to.equal('Invalid credentials'); - done(); - }); - }); - - it('should fail on invalid credentials function response (unknown algorithm)', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, function (id, callback) { callback(null, { key: 'xxx', algorithm: 'xxx' }); }, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.message).to.equal('Unknown algorithm'); - done(); - }); - }); - - it('should fail on expired access', function (done) { - - var req = { - method: 'GET', - url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ', - host: 'example.com', - port: 8080 - }; - - Hawk.uri.authenticate(req, function (id, callback) { callback(null, { key: 'xxx', algorithm: 'sha256' }); }, {}, function (err, credentials, attributes) { - - expect(err).to.exist; - expect(err.response.payload.message).to.equal('Bad mac'); - done(); - }); - }); - }); - - describe('#getBewit', function () { - - it('should return a valid bewit value', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'sha256' - }; - - var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' }); - expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdca3NjeHdOUjJ0SnBQMVQxekRMTlBiQjVVaUtJVTl0T1NKWFRVZEc3WDloOD1ceGFuZHlhbmR6'); - done(); - }); - - it('should return an empty bewit on invalid credentials', function (done) { - - var credentials = { - key: '2983d45yun89q', - algorithm: 'sha256' - }; - - var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 3000, ext: 'xandyandz' }); - expect(bewit).to.equal(''); - done(); - }); - - it('should return an empty bewit on invalid algorithm', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'hmac-sha-0' - }; - - var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, ext: 'xandyandz' }); - expect(bewit).to.equal(''); - done(); - }); - - it('should return an empty bewit on missing options', function (done) { - - var credentials = { - id: '123456', - key: '2983d45yun89q', - algorithm: 'hmac-sha-0' - }; - - var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow'); - expect(bewit).to.equal(''); - done(); - }); - }); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/utils.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/utils.js deleted file mode 100755 index 0f5fef77..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/hawk/test/utils.js +++ /dev/null @@ -1,120 +0,0 @@ -// Load modules - -var Lab = require('lab'); -var Hawk = require('../lib'); -var Package = require('../package.json'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var expect = Lab.expect; -var before = Lab.before; -var after = Lab.after; -var describe = Lab.experiment; -var it = Lab.test; - - -describe('Hawk', function () { - - describe('Utils', function () { - - describe('#parseHost', function () { - - it('returns port 80 for non tls node request', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com', - 'content-type': 'text/plain;x=y' - } - }; - - expect(Hawk.utils.parseHost(req, 'Host').port).to.equal(80); - done(); - }); - - it('returns port 443 for non tls node request', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: 'example.com', - 'content-type': 'text/plain;x=y' - }, - connection: { - encrypted: true - } - }; - - expect(Hawk.utils.parseHost(req, 'Host').port).to.equal(443); - done(); - }); - - it('returns port 443 for non tls node request (IPv6)', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: '[123:123:123]', - 'content-type': 'text/plain;x=y' - }, - connection: { - encrypted: true - } - }; - - expect(Hawk.utils.parseHost(req, 'Host').port).to.equal(443); - done(); - }); - - it('parses IPv6 headers', function (done) { - - var req = { - method: 'POST', - url: '/resource/4?filter=a', - headers: { - host: '[123:123:123]:8000', - 'content-type': 'text/plain;x=y' - }, - connection: { - encrypted: true - } - }; - - var host = Hawk.utils.parseHost(req, 'Host'); - expect(host.port).to.equal('8000'); - expect(host.name).to.equal('[123:123:123]'); - done(); - }); - }); - - describe('#version', function () { - - it('returns the correct package version number', function (done) { - - expect(Hawk.utils.version()).to.equal(Package.version); - done(); - }); - }); - - describe('#unauthorized', function () { - - it('returns a hawk 401', function (done) { - - expect(Hawk.utils.unauthorized('kaboom').response.headers['WWW-Authenticate']).to.equal('Hawk error="kaboom"'); - done(); - }); - }); - }); -}); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/.dir-locals.el b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/.dir-locals.el deleted file mode 100644 index 3bc9235f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/.dir-locals.el +++ /dev/null @@ -1,6 +0,0 @@ -((nil . ((indent-tabs-mode . nil) - (tab-width . 8) - (fill-column . 80))) - (js-mode . ((js-indent-level . 2) - (indent-tabs-mode . nil) - ))) \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/.npmignore deleted file mode 100644 index c143fb3a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/.npmignore +++ /dev/null @@ -1,7 +0,0 @@ -.gitmodules -deps -docs -Makefile -node_modules -test -tools \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/LICENSE deleted file mode 100644 index f6d947d2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright Joyent, Inc. All rights reserved. -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/README.md deleted file mode 100644 index 0c707149..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# node-http-signature - -node-http-signature is a node.js library that has client and server components -for Joyent's [HTTP Signature Scheme](http_signing.md). - -## Usage - -Note the example below signs a request with the same key/cert used to start an -HTTP server. This is almost certainly not what you actaully want, but is just -used to illustrate the API calls; you will need to provide your own key -management in addition to this library. - -### Client - - var fs = require('fs'); - var https = require('https'); - var httpSignature = require('http-signature'); - - var key = fs.readFileSync('./key.pem', 'ascii'); - - var options = { - host: 'localhost', - port: 8443, - path: '/', - method: 'GET', - headers: {} - }; - - // Adds a 'Date' header in, signs it, and adds the - // 'Authorization' header in. - var req = https.request(options, function(res) { - console.log(res.statusCode); - }); - - - httpSignature.sign(req, { - key: key, - keyId: './cert.pem' - }); - - req.end(); - -### Server - - var fs = require('fs'); - var https = require('https'); - var httpSignature = require('http-signature'); - - var options = { - key: fs.readFileSync('./key.pem'), - cert: fs.readFileSync('./cert.pem') - }; - - https.createServer(options, function (req, res) { - var rc = 200; - var parsed = httpSignature.parseRequest(req); - var pub = fs.readFileSync(parsed.keyId, 'ascii'); - if (!httpSignature.verifySignature(parsed, pub)) - rc = 401; - - res.writeHead(rc); - res.end(); - }).listen(8443); - -## Installation - - npm install http-signature - -## License - -MIT. - -## Bugs - -See <https://github.com/joyent/node-http-signature/issues>. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/http_signing.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/http_signing.md deleted file mode 100644 index ba7321da..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/http_signing.md +++ /dev/null @@ -1,296 +0,0 @@ -# Abstract - -This document describes a way to add origin authentication, message integrity, -and replay resistance to HTTP REST requests. It is intended to be used over -the HTTPS protocol. - -# Copyright Notice - -Copyright (c) 2011 Joyent, Inc. and the persons identified as document authors. -All rights reserved. - -Code Components extracted from this document must include MIT License text. - -# Introduction - -This protocol is intended to provide a standard way for clients to sign HTTP -requests. RFC2617 (HTTP Authentication) defines Basic and Digest authentication -mechanisms, and RFC5246 (TLS 1.2) defines client-auth, both of which are widely -employed on the Internet today. However, it is common place that the burdens of -PKI prevent web service operators from deploying that methodoloy, and so many -fall back to Basic authentication, which has poor security characteristics. - -Additionally, OAuth provides a fully-specified alternative for authorization -of web service requests, but is not (always) ideal for machine to machine -communication, as the key acquisition steps (generally) imply a fixed -infrastructure that may not make sense to a service provider (e.g., symmetric -keys). - -Several web service providers have invented their own schemes for signing -HTTP requests, but to date, none have been placed in the public domain as a -standard. This document serves that purpose. There are no techniques in this -proposal that are novel beyond previous art, however, this aims to be a simple -mechanism for signing these requests. - -# Signature Authentication Scheme - -The "signature" authentication scheme is based on the model that the client must -authenticate itself with a digital signature produced by either a private -asymmetric key (e.g., RSA) or a shared symmetric key (e.g., HMAC). The scheme -is parameterized enough such that it is not bound to any particular key type or -signing algorithm. However, it does explicitly assume that clients can send an -HTTP `Date` header. - -## Authorization Header - -The client is expected to send an Authorization header (as defined in RFC 2617) -with the following parameterization: - - credentials := "Signature" params - params := 1#(keyId | algorithm | [headers] | [ext] | signature) - digitalSignature := plain-string - - keyId := "keyId" "=" <"> plain-string <"> - algorithm := "algorithm" "=" <"> plain-string <"> - headers := "headers" "=" <"> 1#headers-value <"> - ext := "ext" "=" <"> plain-string <"> - signature := "signature" "=" <"> plain-string <"> - - headers-value := plain-string - plain-string = 1*( %x20-21 / %x23-5B / %x5D-7E ) - -### Signature Parameters - -#### keyId - -REQUIRED. The `keyId` field is an opaque string that the server can use to look -up the component they need to validate the signature. It could be an SSH key -fingerprint, an LDAP DN, etc. Management of keys and assignment of `keyId` is -out of scope for this document. - -#### algorithm - -REQUIRED. The `algorithm` parameter is used if the client and server agree on a -non-standard digital signature algorithm. The full list of supported signature -mechanisms is listed below. - -#### headers - -OPTIONAL. The `headers` parameter is used to specify the list of HTTP headers -used to sign the request. If specified, it should be a quoted list of HTTP -header names, separated by a single space character. By default, only one -HTTP header is signed, which is the `Date` header. Note that the list MUST be -specified in the order the values are concatenated together during signing. To -include the HTTP request line in the signature calculation, use the special -`request-line` value. While this is overloading the definition of `headers` in -HTTP linguism, the request-line is defined in RFC 2616, and as the outlier from -headers in useful signature calculation, it is deemed simpler to simply use -`request-line` than to add a separate parameter for it. - -#### extensions - -OPTIONAL. The `extensions` parameter is used to include additional information -which is covered by the request. The content and format of the string is out of -scope for this document, and expected to be specified by implementors. - -#### signature - -REQUIRED. The `signature` parameter is a `Base64` encoded digital signature -generated by the client. The client uses the `algorithm` and `headers` request -parameters to form a canonicalized `signing string`. This `signing string` is -then signed with the key associated with `keyId` and the algorithm -corresponding to `algorithm`. The `signature` parameter is then set to the -`Base64` encoding of the signature. - -### Signing String Composition - -In order to generate the string that is signed with a key, the client MUST take -the values of each HTTP header specified by `headers` in the order they appear. - -1. If the header name is not `request-line` then append the lowercased header - name followed with an ASCII colon `:` and an ASCII space ` `. -2. If the header name is `request-line` then appened the HTTP request line, - otherwise append the header value. -3. If value is not the last value then append an ASCII newline `\n`. The string - MUST NOT include a trailing ASCII newline. - -# Example Requests - -All requests refer to the following request (body ommitted): - - POST /foo HTTP/1.1 - Host: example.org - Date: Tue, 07 Jun 2011 20:51:35 GMT - Content-Type: application/json - Content-MD5: h0auK8hnYJKmHTLhKtMTkQ== - Content-Length: 123 - -The "rsa-key-1" keyId refers to a private key known to the client and a public -key known to the server. The "hmac-key-1" keyId refers to key known to the -client and server. - -## Default parameterization - -The authorization header and signature would be generated as: - - Authorization: Signature keyId="rsa-key-1",algorithm="rsa-sha256",signature="Base64(RSA-SHA256(signing string))" - -The client would compose the signing string as: - - date: Tue, 07 Jun 2011 20:51:35 GMT - -## Header List - -The authorization header and signature would be generated as: - - Authorization: Signature keyId="rsa-key-1",algorithm="rsa-sha256",headers="request-line date content-type content-md5",signature="Base64(RSA-SHA256(signing string))" - -The client would compose the signing string as (`+ "\n"` inserted for -readability): - - POST /foo HTTP/1.1 + "\n" - date: Tue, 07 Jun 2011 20:51:35 GMT + "\n" - content-type: application/json + "\n" - content-md5: h0auK8hnYJKmHTLhKtMTkQ== - -## Algorithm - -The authorization header and signature would be generated as: - - Authorization: Signature keyId="hmac-key-1",algorithm="hmac-sha1",signature="Base64(HMAC-SHA1(signing string))" - -The client would compose the signing string as: - - date: Tue, 07 Jun 2011 20:51:35 GMT - -# Signing Algorithms - -Currently supported algorithm names are: - -* rsa-sha1 -* rsa-sha256 -* rsa-sha512 -* dsa-sha1 -* hmac-sha1 -* hmac-sha256 -* hmac-sha512 - -# Security Considerations - -## Default Parameters - -Note the default parameterization of the `Signature` scheme is only safe if all -requests are carried over a secure transport (i.e., TLS). Sending the default -scheme over a non-secure transport will leave the request vulnerable to -spoofing, tampering, replay/repudiaton, and integrity violations (if using the -STRIDE threat-modeling methodology). - -## Insecure Transports - -If sending the request over plain HTTP, service providers SHOULD require clients -to sign ALL HTTP headers, and the `request-line`. Additionally, service -providers SHOULD require `Content-MD5` calculations to be performed to ensure -against any tampering from clients. - -## Nonces - -Nonces are out of scope for this document simply because many service providers -fail to implement them correctly, or do not adopt security specfiications -because of the infrastructure complexity. Given the `header` parameterization, -a service provider is fully enabled to add nonce semantics into this scheme by -using something like an `x-request-nonce` header, and ensuring it is signed -with the `Date` header. - -## Clock Skew - -As the default scheme is to sign the `Date` header, service providers SHOULD -protect against logged replay attacks by enforcing a clock skew. The server -SHOULD be synchronized with NTP, and the recommendation in this specification -is to allow 300s of clock skew (in either direction). - -## Required Headers to Sign - -It is out of scope for this document to dictate what headers a service provider -will want to enforce, but service providers SHOULD at minimum include the -`Date` header. - -# References - -## Normative References - -* [RFC2616] Hypertext Transfer Protocol -- HTTP/1.1 -* [RFC2617] HTTP Authentication: Basic and Digest Access Authentication -* [RFC5246] The Transport Layer Security (TLS) Protocol Version 1.2 - -## Informative References - - Name: Mark Cavage (editor) - Company: Joyent, Inc. - Email: mark.cavage@joyent.com - URI: http://www.joyent.com - -# Appendix A - Test Values - -The following test data uses the RSA (2048b) keys, which we will refer -to as `keyId=Test` in the following samples: - - -----BEGIN PUBLIC KEY----- - MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCFENGw33yGihy92pDjZQhl0C3 - 6rPJj+CvfSC8+q28hxA161QFNUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6 - Z4UMR7EOcpfdUE9Hf3m/hs+FUR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJw - oYi+1hqp1fIekaxsyQIDAQAB - -----END PUBLIC KEY----- - - -----BEGIN RSA PRIVATE KEY----- - MIICXgIBAAKBgQDCFENGw33yGihy92pDjZQhl0C36rPJj+CvfSC8+q28hxA161QF - NUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6Z4UMR7EOcpfdUE9Hf3m/hs+F - UR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJwoYi+1hqp1fIekaxsyQIDAQAB - AoGBAJR8ZkCUvx5kzv+utdl7T5MnordT1TvoXXJGXK7ZZ+UuvMNUCdN2QPc4sBiA - QWvLw1cSKt5DsKZ8UETpYPy8pPYnnDEz2dDYiaew9+xEpubyeW2oH4Zx71wqBtOK - kqwrXa/pzdpiucRRjk6vE6YY7EBBs/g7uanVpGibOVAEsqH1AkEA7DkjVH28WDUg - f1nqvfn2Kj6CT7nIcE3jGJsZZ7zlZmBmHFDONMLUrXR/Zm3pR5m0tCmBqa5RK95u - 412jt1dPIwJBANJT3v8pnkth48bQo/fKel6uEYyboRtA5/uHuHkZ6FQF7OUkGogc - mSJluOdc5t6hI1VsLn0QZEjQZMEOWr+wKSMCQQCC4kXJEsHAve77oP6HtG/IiEn7 - kpyUXRNvFsDE0czpJJBvL/aRFUJxuRK91jhjC68sA7NsKMGg5OXb5I5Jj36xAkEA - gIT7aFOYBFwGgQAQkWNKLvySgKbAZRTeLBacpHMuQdl1DfdntvAyqpAZ0lY0RKmW - G6aFKaqQfOXKCyWoUiVknQJAXrlgySFci/2ueKlIE1QqIiLSZ8V8OlpFLRnb1pzI - 7U1yQXnTAEFYM560yJlzUpOb1V4cScGd365tiSMvxLOvTA== - -----END RSA PRIVATE KEY----- - -And all examples use this request: - - POST /foo?param=value&pet=dog HTTP/1.1 - Host: example.com - Date: Thu, 05 Jan 2012 21:31:40 GMT - Content-Type: application/json - Content-MD5: Sd/dVLAcvNLSq16eXua5uQ== - Content-Length: 18 - - {"hello": "world"} - -### Default - -The string to sign would be: - - date: Thu, 05 Jan 2012 21:31:40 GMT - -The Authorization header would be: - - Authorization: Signature keyId="Test",algorithm="rsa-sha256",signature="JldXnt8W9t643M2Sce10gqCh/+E7QIYLiI+bSjnFBGCti7s+mPPvOjVb72sbd1FjeOUwPTDpKbrQQORrm+xBYfAwCxF3LBSSzORvyJ5nRFCFxfJ3nlQD6Kdxhw8wrVZX5nSem4A/W3C8qH5uhFTRwF4ruRjh+ENHWuovPgO/HGQ=" - -### All Headers - -Parameterized to include all headers, the string to sign would be (`+ "\n"` -inserted for readability): - - POST /foo?param=value&pet=dog HTTP/1.1 + "\n" - host: example.com + "\n" - date: Thu, 05 Jan 2012 21:31:40 GMT + "\n" - content-type: application/json + "\n" - content-md5: Sd/dVLAcvNLSq16eXua5uQ== + "\n" - content-length: 18 - -The Authorization header would be: - - Authorization: Signature keyId="Test",algorithm="rsa-sha256",headers="request-line host date content-type content-md5 content-length",signature="Gm7W/r+e90REDpWytALMrft4MqZxCmslOTOvwJX17ViEBA5E65QqvWI0vIH3l/vSsGiaMVmuUgzYsJLYMLcm5dGrv1+a+0fCoUdVKPZWHyImQEqpLkopVwqEH67LVECFBqFTAKlQgBn676zrfXQbb+b/VebAsNUtvQMe6cTjnDY=" - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/index.js deleted file mode 100644 index 3ac70b77..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/index.js +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2011 Joyent, Inc. All rights reserved. - -var parser = require('./parser'); -var signer = require('./signer'); -var verify = require('./verify'); -var util = require('./util'); - - - -///--- API - -module.exports = { - - parse: parser.parseRequest, - parseRequest: parser.parseRequest, - - sign: signer.signRequest, - signRequest: signer.signRequest, - - sshKeyToPEM: util.sshKeyToPEM, - sshKeyFingerprint: util.fingerprint, - - verify: verify.verifySignature, - verifySignature: verify.verifySignature -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/parser.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/parser.js deleted file mode 100644 index fd9ac102..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/parser.js +++ /dev/null @@ -1,304 +0,0 @@ -// Copyright 2012 Joyent, Inc. All rights reserved. - -var assert = require('assert-plus'); -var util = require('util'); - - - -///--- Globals - -var Algorithms = { - 'rsa-sha1': true, - 'rsa-sha256': true, - 'rsa-sha512': true, - 'dsa-sha1': true, - 'hmac-sha1': true, - 'hmac-sha256': true, - 'hmac-sha512': true -}; - -var State = { - New: 0, - Params: 1 -}; - -var ParamsState = { - Name: 0, - Quote: 1, - Value: 2, - Comma: 3 -}; - - - -///--- Specific Errors - -function HttpSignatureError(message, caller) { - if (Error.captureStackTrace) - Error.captureStackTrace(this, caller || HttpSignatureError); - - this.message = message; - this.name = caller.name; -} -util.inherits(HttpSignatureError, Error); - -function ExpiredRequestError(message) { - HttpSignatureError.call(this, message, ExpiredRequestError); -} -util.inherits(ExpiredRequestError, HttpSignatureError); - - -function InvalidHeaderError(message) { - HttpSignatureError.call(this, message, InvalidHeaderError); -} -util.inherits(InvalidHeaderError, HttpSignatureError); - - -function InvalidParamsError(message) { - HttpSignatureError.call(this, message, InvalidParamsError); -} -util.inherits(InvalidParamsError, HttpSignatureError); - - -function MissingHeaderError(message) { - HttpSignatureError.call(this, message, MissingHeaderError); -} -util.inherits(MissingHeaderError, HttpSignatureError); - - - -///--- Exported API - -module.exports = { - - /** - * Parses the 'Authorization' header out of an http.ServerRequest object. - * - * Note that this API will fully validate the Authorization header, and throw - * on any error. It will not however check the signature, or the keyId format - * as those are specific to your environment. You can use the options object - * to pass in extra constraints. - * - * As a response object you can expect this: - * - * { - * "scheme": "Signature", - * "params": { - * "keyId": "foo", - * "algorithm": "rsa-sha256", - * "headers": [ - * "date" or "x-date", - * "content-md5" - * ], - * "signature": "base64" - * }, - * "signingString": "ready to be passed to crypto.verify()" - * } - * - * @param {Object} request an http.ServerRequest. - * @param {Object} options an optional options object with: - * - clockSkew: allowed clock skew in seconds (default 300). - * - headers: required header names (def: date or x-date) - * - algorithms: algorithms to support (default: all). - * @return {Object} parsed out object (see above). - * @throws {TypeError} on invalid input. - * @throws {InvalidHeaderError} on an invalid Authorization header error. - * @throws {InvalidParamsError} if the params in the scheme are invalid. - * @throws {MissingHeaderError} if the params indicate a header not present, - * either in the request headers from the params, - * or not in the params from a required header - * in options. - * @throws {ExpiredRequestError} if the value of date or x-date exceeds skew. - */ - parseRequest: function parseRequest(request, options) { - assert.object(request, 'request'); - assert.object(request.headers, 'request.headers'); - if (options === undefined) { - options = {}; - } - if (options.headers === undefined) { - options.headers = [request.headers['x-date'] ? 'x-date' : 'date']; - } - assert.object(options, 'options'); - assert.arrayOfString(options.headers, 'options.headers'); - assert.optionalNumber(options.clockSkew, 'options.clockSkew'); - - if (!request.headers.authorization) - throw new MissingHeaderError('no authorization header present in ' + - 'the request'); - - options.clockSkew = options.clockSkew || 300; - - - var i = 0; - var state = State.New; - var substate = ParamsState.Name; - var tmpName = ''; - var tmpValue = ''; - - var parsed = { - scheme: '', - params: {}, - signingString: '', - - get algorithm() { - return this.params.algorithm.toUpperCase(); - }, - - get keyId() { - return this.params.keyId; - } - - }; - - var authz = request.headers.authorization; - for (i = 0; i < authz.length; i++) { - var c = authz.charAt(i); - - switch (Number(state)) { - - case State.New: - if (c !== ' ') parsed.scheme += c; - else state = State.Params; - break; - - case State.Params: - switch (Number(substate)) { - - case ParamsState.Name: - var code = c.charCodeAt(0); - // restricted name of A-Z / a-z - if ((code >= 0x41 && code <= 0x5a) || // A-Z - (code >= 0x61 && code <= 0x7a)) { // a-z - tmpName += c; - } else if (c === '=') { - if (tmpName.length === 0) - throw new InvalidHeaderError('bad param format'); - substate = ParamsState.Quote; - } else { - throw new InvalidHeaderError('bad param format'); - } - break; - - case ParamsState.Quote: - if (c === '"') { - tmpValue = ''; - substate = ParamsState.Value; - } else { - throw new InvalidHeaderError('bad param format'); - } - break; - - case ParamsState.Value: - if (c === '"') { - parsed.params[tmpName] = tmpValue; - substate = ParamsState.Comma; - } else { - tmpValue += c; - } - break; - - case ParamsState.Comma: - if (c === ',') { - tmpName = ''; - substate = ParamsState.Name; - } else { - throw new InvalidHeaderError('bad param format'); - } - break; - - default: - throw new Error('Invalid substate'); - } - break; - - default: - throw new Error('Invalid substate'); - } - - } - - if (!parsed.params.headers || parsed.params.headers === '') { - if (request.headers['x-date']) { - parsed.params.headers = ['x-date']; - } else { - parsed.params.headers = ['date']; - } - } else { - parsed.params.headers = parsed.params.headers.split(' '); - } - - // Minimally validate the parsed object - if (!parsed.scheme || parsed.scheme !== 'Signature') - throw new InvalidHeaderError('scheme was not "Signature"'); - - if (!parsed.params.keyId) - throw new InvalidHeaderError('keyId was not specified'); - - if (!parsed.params.algorithm) - throw new InvalidHeaderError('algorithm was not specified'); - - if (!parsed.params.signature) - throw new InvalidHeaderError('signature was not specified'); - - // Check the algorithm against the official list - parsed.params.algorithm = parsed.params.algorithm.toLowerCase(); - if (!Algorithms[parsed.params.algorithm]) - throw new InvalidParamsError(parsed.params.algorithm + - ' is not supported'); - - // Build the signingString - for (i = 0; i < parsed.params.headers.length; i++) { - var h = parsed.params.headers[i].toLowerCase(); - parsed.params.headers[i] = h; - - if (h !== 'request-line') { - var value = request.headers[h]; - if (!value) - throw new MissingHeaderError(h + ' was not in the request'); - parsed.signingString += h + ': ' + value; - } else { - parsed.signingString += - request.method + ' ' + request.url + ' HTTP/' + request.httpVersion; - } - - if ((i + 1) < parsed.params.headers.length) - parsed.signingString += '\n'; - } - - // Check against the constraints - var date; - if (request.headers.date || request.headers['x-date']) { - if (request.headers['x-date']) { - date = new Date(request.headers['x-date']); - } else { - date = new Date(request.headers.date); - } - var now = new Date(); - var skew = Math.abs(now.getTime() - date.getTime()); - - if (skew > options.clockSkew * 1000) { - throw new ExpiredRequestError('clock skew of ' + - (skew / 1000) + - 's was greater than ' + - options.clockSkew + 's'); - } - } - - options.headers.forEach(function (hdr) { - // Remember that we already checked any headers in the params - // were in the request, so if this passes we're good. - if (parsed.params.headers.indexOf(hdr) < 0) - throw new MissingHeaderError(hdr + ' was not a signed header'); - }); - - if (options.algorithms) { - if (options.algorithms.indexOf(parsed.params.algorithm) === -1) - throw new InvalidParamsError(parsed.params.algorithm + - ' is not a supported algorithm'); - } - - return parsed; - } - -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/signer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/signer.js deleted file mode 100644 index 8095f0d1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/signer.js +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright 2012 Joyent, Inc. All rights reserved. - -var assert = require('assert-plus'); -var crypto = require('crypto'); -var http = require('http'); - -var sprintf = require('util').format; - - - -///--- Globals - -var Algorithms = { - 'rsa-sha1': true, - 'rsa-sha256': true, - 'rsa-sha512': true, - 'dsa-sha1': true, - 'hmac-sha1': true, - 'hmac-sha256': true, - 'hmac-sha512': true -}; - -var Authorization = - 'Signature keyId="%s",algorithm="%s",headers="%s",signature="%s"'; - - - -///--- Specific Errors - -function MissingHeaderError(message) { - this.name = 'MissingHeaderError'; - this.message = message; - this.stack = (new Error()).stack; -} -MissingHeaderError.prototype = new Error(); - - -function InvalidAlgorithmError(message) { - this.name = 'InvalidAlgorithmError'; - this.message = message; - this.stack = (new Error()).stack; -} -InvalidAlgorithmError.prototype = new Error(); - - - -///--- Internal Functions - -function _pad(val) { - if (parseInt(val, 10) < 10) { - val = '0' + val; - } - return val; -} - - -function _rfc1123() { - var date = new Date(); - - var months = ['Jan', - 'Feb', - 'Mar', - 'Apr', - 'May', - 'Jun', - 'Jul', - 'Aug', - 'Sep', - 'Oct', - 'Nov', - 'Dec']; - var days = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; - return days[date.getUTCDay()] + ', ' + - _pad(date.getUTCDate()) + ' ' + - months[date.getUTCMonth()] + ' ' + - date.getUTCFullYear() + ' ' + - _pad(date.getUTCHours()) + ':' + - _pad(date.getUTCMinutes()) + ':' + - _pad(date.getUTCSeconds()) + - ' GMT'; -} - - - -///--- Exported API - -module.exports = { - - /** - * Adds an 'Authorization' header to an http.ClientRequest object. - * - * Note that this API will add a Date header if it's not already set. Any - * other headers in the options.headers array MUST be present, or this - * will throw. - * - * You shouldn't need to check the return type; it's just there if you want - * to be pedantic. - * - * @param {Object} request an instance of http.ClientRequest. - * @param {Object} options signing parameters object: - * - {String} keyId required. - * - {String} key required (either a PEM or HMAC key). - * - {Array} headers optional; defaults to ['date']. - * - {String} algorithm optional; defaults to 'rsa-sha256'. - * - {String} httpVersion optional; defaults to '1.1'. - * @return {Boolean} true if Authorization (and optionally Date) were added. - * @throws {TypeError} on bad parameter types (input). - * @throws {InvalidAlgorithmError} if algorithm was bad. - * @throws {MissingHeaderError} if a header to be signed was specified but - * was not present. - */ - signRequest: function signRequest(request, options) { - assert.object(request, 'request'); - assert.object(options, 'options'); - assert.optionalString(options.algorithm, 'options.algorithm'); - assert.string(options.keyId, 'options.keyId'); - assert.optionalArrayOfString(options.headers, 'options.headers'); - assert.optionalString(options.httpVersion, 'options.httpVersion'); - - if (!request.getHeader('Date')) - request.setHeader('Date', _rfc1123()); - if (!options.headers) - options.headers = ['date']; - if (!options.algorithm) - options.algorithm = 'rsa-sha256'; - if (!options.httpVersion) - options.httpVersion = '1.1'; - - options.algorithm = options.algorithm.toLowerCase(); - - if (!Algorithms[options.algorithm]) - throw new InvalidAlgorithmError(options.algorithm + ' is not supported'); - - var i; - var stringToSign = ''; - for (i = 0; i < options.headers.length; i++) { - if (typeof (options.headers[i]) !== 'string') - throw new TypeError('options.headers must be an array of Strings'); - - var h = options.headers[i].toLowerCase(); - - if (h !== 'request-line') { - var value = request.getHeader(h); - if (!value) { - throw new MissingHeaderError(h + ' was not in the request'); - } - stringToSign += h + ': ' + value; - } else { - value = - stringToSign += - request.method + ' ' + request.path + ' HTTP/' + options.httpVersion; - } - - if ((i + 1) < options.headers.length) - stringToSign += '\n'; - } - - var alg = options.algorithm.match(/(hmac|rsa)-(\w+)/); - var signature; - if (alg[1] === 'hmac') { - var hmac = crypto.createHmac(alg[2].toUpperCase(), options.key); - hmac.update(stringToSign); - signature = hmac.digest('base64'); - } else { - var signer = crypto.createSign(options.algorithm.toUpperCase()); - signer.update(stringToSign); - signature = signer.sign(options.key, 'base64'); - } - - request.setHeader('Authorization', sprintf(Authorization, - options.keyId, - options.algorithm, - options.headers.join(' '), - signature)); - - return true; - } - -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/util.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/util.js deleted file mode 100644 index 30bbf045..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/util.js +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright 2012 Joyent, Inc. All rights reserved. - -var assert = require('assert-plus'); -var crypto = require('crypto'); - -var asn1 = require('asn1'); -var ctype = require('ctype'); - - - -///--- Helpers - -function readNext(buffer, offset) { - var len = ctype.ruint32(buffer, 'big', offset); - offset += 4; - - var newOffset = offset + len; - - return { - data: buffer.slice(offset, newOffset), - offset: newOffset - }; -} - - -function writeInt(writer, buffer) { - writer.writeByte(0x02); // ASN1.Integer - writer.writeLength(buffer.length); - - for (var i = 0; i < buffer.length; i++) - writer.writeByte(buffer[i]); - - return writer; -} - - -function rsaToPEM(key) { - var buffer; - var der; - var exponent; - var i; - var modulus; - var newKey = ''; - var offset = 0; - var type; - var tmp; - - try { - buffer = new Buffer(key.split(' ')[1], 'base64'); - - tmp = readNext(buffer, offset); - type = tmp.data.toString(); - offset = tmp.offset; - - if (type !== 'ssh-rsa') - throw new Error('Invalid ssh key type: ' + type); - - tmp = readNext(buffer, offset); - exponent = tmp.data; - offset = tmp.offset; - - tmp = readNext(buffer, offset); - modulus = tmp.data; - } catch (e) { - throw new Error('Invalid ssh key: ' + key); - } - - // DER is a subset of BER - der = new asn1.BerWriter(); - - der.startSequence(); - - der.startSequence(); - der.writeOID('1.2.840.113549.1.1.1'); - der.writeNull(); - der.endSequence(); - - der.startSequence(0x03); // bit string - der.writeByte(0x00); - - // Actual key - der.startSequence(); - writeInt(der, modulus); - writeInt(der, exponent); - der.endSequence(); - - // bit string - der.endSequence(); - - der.endSequence(); - - tmp = der.buffer.toString('base64'); - for (i = 0; i < tmp.length; i++) { - if ((i % 64) === 0) - newKey += '\n'; - newKey += tmp.charAt(i); - } - - if (!/\\n$/.test(newKey)) - newKey += '\n'; - - return '-----BEGIN PUBLIC KEY-----' + newKey + '-----END PUBLIC KEY-----\n'; -} - - -function dsaToPEM(key) { - var buffer; - var offset = 0; - var tmp; - var der; - var newKey = ''; - - var type; - var p; - var q; - var g; - var y; - - try { - buffer = new Buffer(key.split(' ')[1], 'base64'); - - tmp = readNext(buffer, offset); - type = tmp.data.toString(); - offset = tmp.offset; - - /* JSSTYLED */ - if (!/^ssh-ds[as].*/.test(type)) - throw new Error('Invalid ssh key type: ' + type); - - tmp = readNext(buffer, offset); - p = tmp.data; - offset = tmp.offset; - - tmp = readNext(buffer, offset); - q = tmp.data; - offset = tmp.offset; - - tmp = readNext(buffer, offset); - g = tmp.data; - offset = tmp.offset; - - tmp = readNext(buffer, offset); - y = tmp.data; - } catch (e) { - console.log(e.stack); - throw new Error('Invalid ssh key: ' + key); - } - - // DER is a subset of BER - der = new asn1.BerWriter(); - - der.startSequence(); - - der.startSequence(); - der.writeOID('1.2.840.10040.4.1'); - - der.startSequence(); - writeInt(der, p); - writeInt(der, q); - writeInt(der, g); - der.endSequence(); - - der.endSequence(); - - der.startSequence(0x03); // bit string - der.writeByte(0x00); - writeInt(der, y); - der.endSequence(); - - der.endSequence(); - - tmp = der.buffer.toString('base64'); - for (var i = 0; i < tmp.length; i++) { - if ((i % 64) === 0) - newKey += '\n'; - newKey += tmp.charAt(i); - } - - if (!/\\n$/.test(newKey)) - newKey += '\n'; - - return '-----BEGIN PUBLIC KEY-----' + newKey + '-----END PUBLIC KEY-----\n'; -} - - -///--- API - -module.exports = { - - /** - * Converts an OpenSSH public key (rsa only) to a PKCS#8 PEM file. - * - * The intent of this module is to interoperate with OpenSSL only, - * specifically the node crypto module's `verify` method. - * - * @param {String} key an OpenSSH public key. - * @return {String} PEM encoded form of the RSA public key. - * @throws {TypeError} on bad input. - * @throws {Error} on invalid ssh key formatted data. - */ - sshKeyToPEM: function sshKeyToPEM(key) { - assert.string(key, 'ssh_key'); - - /* JSSTYLED */ - if (/^ssh-rsa.*/.test(key)) - return rsaToPEM(key); - - /* JSSTYLED */ - if (/^ssh-ds[as].*/.test(key)) - return dsaToPEM(key); - - throw new Error('Only RSA and DSA public keys are allowed'); - }, - - - /** - * Generates an OpenSSH fingerprint from an ssh public key. - * - * @param {String} key an OpenSSH public key. - * @return {String} key fingerprint. - * @throws {TypeError} on bad input. - * @throws {Error} if what you passed doesn't look like an ssh public key. - */ - fingerprint: function fingerprint(key) { - assert.string(key, 'ssh_key'); - - var pieces = key.split(' '); - if (!pieces || !pieces.length || pieces.length < 2) - throw new Error('invalid ssh key'); - - var data = new Buffer(pieces[1], 'base64'); - - var hash = crypto.createHash('md5'); - hash.update(data); - var digest = hash.digest('hex'); - - var fp = ''; - for (var i = 0; i < digest.length; i++) { - if (i && i % 2 === 0) - fp += ':'; - - fp += digest[i]; - } - - return fp; - } - - -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/verify.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/verify.js deleted file mode 100644 index 5bf95896..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/lib/verify.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2011 Joyent, Inc. All rights reserved. - -var assert = require('assert-plus'); -var crypto = require('crypto'); - - - -///--- Exported API - -module.exports = { - - /** - * Simply wraps up the node crypto operations for you, and returns - * true or false. You are expected to pass in an object that was - * returned from `parse()`. - * - * @param {Object} parsedSignature the object you got from `parse`. - * @param {String} key either an RSA private key PEM or HMAC secret. - * @return {Boolean} true if valid, false otherwise. - * @throws {TypeError} if you pass in bad arguments. - */ - verifySignature: function verifySignature(parsedSignature, key) { - assert.object(parsedSignature, 'parsedSignature'); - assert.string(key, 'key'); - - var alg = parsedSignature.algorithm.match(/(HMAC|RSA|DSA)-(\w+)/); - if (!alg || alg.length !== 3) - throw new TypeError('parsedSignature: unsupported algorithm ' + - parsedSignature.algorithm); - - if (alg[1] === 'HMAC') { - var hmac = crypto.createHmac(alg[2].toUpperCase(), key); - hmac.update(parsedSignature.signingString); - return (hmac.digest('base64') === parsedSignature.params.signature); - } else { - var verify = crypto.createVerify(alg[0]); - verify.update(parsedSignature.signingString); - return verify.verify(key, parsedSignature.params.signature, 'base64'); - } - } - -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/.npmignore deleted file mode 100644 index eb03e3e1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -*.log diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE deleted file mode 100644 index 9b5dcdb7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 Mark Cavage, All rights reserved. - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/README.md deleted file mode 100644 index 7cebf7a2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/README.md +++ /dev/null @@ -1,50 +0,0 @@ -node-asn1 is a library for encoding and decoding ASN.1 datatypes in pure JS. -Currently BER encoding is supported; at some point I'll likely have to do DER. - -## Usage - -Mostly, if you're *actually* needing to read and write ASN.1, you probably don't -need this readme to explain what and why. If you have no idea what ASN.1 is, -see this: ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc - -The source is pretty much self-explanatory, and has read/write methods for the -common types out there. - -### Decoding - -The following reads an ASN.1 sequence with a boolean. - - var Ber = require('asn1').Ber; - - var reader = new Ber.Reader(new Buffer([0x30, 0x03, 0x01, 0x01, 0xff])); - - reader.readSequence(); - console.log('Sequence len: ' + reader.length); - if (reader.peek() === Ber.Boolean) - console.log(reader.readBoolean()); - -### Encoding - -The following generates the same payload as above. - - var Ber = require('asn1').Ber; - - var writer = new Ber.Writer(); - - writer.startSequence(); - writer.writeBoolean(true); - writer.endSequence(); - - console.log(writer.buffer); - -## Installation - - npm install asn1 - -## License - -MIT. - -## Bugs - -See <https://github.com/mcavage/node-asn1/issues>. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js deleted file mode 100644 index ff21d4fa..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. - - -module.exports = { - - newInvalidAsn1Error: function(msg) { - var e = new Error(); - e.name = 'InvalidAsn1Error'; - e.message = msg || ''; - return e; - } - -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js deleted file mode 100644 index 4fb90aea..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. - -var errors = require('./errors'); -var types = require('./types'); - -var Reader = require('./reader'); -var Writer = require('./writer'); - - -///--- Exports - -module.exports = { - - Reader: Reader, - - Writer: Writer - -}; - -for (var t in types) { - if (types.hasOwnProperty(t)) - module.exports[t] = types[t]; -} -for (var e in errors) { - if (errors.hasOwnProperty(e)) - module.exports[e] = errors[e]; -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js deleted file mode 100644 index bd3357a6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. - -var assert = require('assert'); - -var ASN1 = require('./types'); -var errors = require('./errors'); - - -///--- Globals - -var newInvalidAsn1Error = errors.newInvalidAsn1Error; - - - -///--- API - -function Reader(data) { - if (!data || !Buffer.isBuffer(data)) - throw new TypeError('data must be a node Buffer'); - - this._buf = data; - this._size = data.length; - - // These hold the "current" state - this._len = 0; - this._offset = 0; - - var self = this; - this.__defineGetter__('length', function() { return self._len; }); - this.__defineGetter__('offset', function() { return self._offset; }); - this.__defineGetter__('remain', function() { - return self._size - self._offset; - }); - this.__defineGetter__('buffer', function() { - return self._buf.slice(self._offset); - }); -} - - -/** - * Reads a single byte and advances offset; you can pass in `true` to make this - * a "peek" operation (i.e., get the byte, but don't advance the offset). - * - * @param {Boolean} peek true means don't move offset. - * @return {Number} the next byte, null if not enough data. - */ -Reader.prototype.readByte = function(peek) { - if (this._size - this._offset < 1) - return null; - - var b = this._buf[this._offset] & 0xff; - - if (!peek) - this._offset += 1; - - return b; -}; - - -Reader.prototype.peek = function() { - return this.readByte(true); -}; - - -/** - * Reads a (potentially) variable length off the BER buffer. This call is - * not really meant to be called directly, as callers have to manipulate - * the internal buffer afterwards. - * - * As a result of this call, you can call `Reader.length`, until the - * next thing called that does a readLength. - * - * @return {Number} the amount of offset to advance the buffer. - * @throws {InvalidAsn1Error} on bad ASN.1 - */ -Reader.prototype.readLength = function(offset) { - if (offset === undefined) - offset = this._offset; - - if (offset >= this._size) - return null; - - var lenB = this._buf[offset++] & 0xff; - if (lenB === null) - return null; - - if ((lenB & 0x80) == 0x80) { - lenB &= 0x7f; - - if (lenB == 0) - throw newInvalidAsn1Error('Indefinite length not supported'); - - if (lenB > 4) - throw newInvalidAsn1Error('encoding too long'); - - if (this._size - offset < lenB) - return null; - - this._len = 0; - for (var i = 0; i < lenB; i++) - this._len = (this._len << 8) + (this._buf[offset++] & 0xff); - - } else { - // Wasn't a variable length - this._len = lenB; - } - - return offset; -}; - - -/** - * Parses the next sequence in this BER buffer. - * - * To get the length of the sequence, call `Reader.length`. - * - * @return {Number} the sequence's tag. - */ -Reader.prototype.readSequence = function(tag) { - var seq = this.peek(); - if (seq === null) - return null; - if (tag !== undefined && tag !== seq) - throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + - ': got 0x' + seq.toString(16)); - - var o = this.readLength(this._offset + 1); // stored in `length` - if (o === null) - return null; - - this._offset = o; - return seq; -}; - - -Reader.prototype.readInt = function() { - return this._readTag(ASN1.Integer); -}; - - -Reader.prototype.readBoolean = function() { - return (this._readTag(ASN1.Boolean) === 0 ? false : true); -}; - - -Reader.prototype.readEnumeration = function() { - return this._readTag(ASN1.Enumeration); -}; - - -Reader.prototype.readString = function(tag, retbuf) { - if (!tag) - tag = ASN1.OctetString; - - var b = this.peek(); - if (b === null) - return null; - - if (b !== tag) - throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + - ': got 0x' + b.toString(16)); - - var o = this.readLength(this._offset + 1); // stored in `length` - - if (o === null) - return null; - - if (this.length > this._size - o) - return null; - - this._offset = o; - - if (this.length === 0) - return ''; - - var str = this._buf.slice(this._offset, this._offset + this.length); - this._offset += this.length; - - return retbuf ? str : str.toString('utf8'); -}; - -Reader.prototype.readOID = function(tag) { - if (!tag) - tag = ASN1.OID; - - var b = this.peek(); - if (b === null) - return null; - - if (b !== tag) - throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + - ': got 0x' + b.toString(16)); - - var o = this.readLength(this._offset + 1); // stored in `length` - if (o === null) - return null; - - if (this.length > this._size - o) - return null; - - this._offset = o; - - var values = []; - var value = 0; - - for (var i = 0; i < this.length; i++) { - var byte = this._buf[this._offset++] & 0xff; - - value <<= 7; - value += byte & 0x7f; - if ((byte & 0x80) == 0) { - values.push(value); - value = 0; - } - } - - value = values.shift(); - values.unshift(value % 40); - values.unshift((value / 40) >> 0); - - return values.join('.'); -}; - - -Reader.prototype._readTag = function(tag) { - assert.ok(tag !== undefined); - - var b = this.peek(); - - if (b === null) - return null; - - if (b !== tag) - throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + - ': got 0x' + b.toString(16)); - - var o = this.readLength(this._offset + 1); // stored in `length` - if (o === null) - return null; - - if (this.length > 4) - throw newInvalidAsn1Error('Integer too long: ' + this.length); - - if (this.length > this._size - o) - return null; - this._offset = o; - - var fb = this._buf[this._offset++]; - var value = 0; - - value = fb & 0x7F; - for (var i = 1; i < this.length; i++) { - value <<= 8; - value |= (this._buf[this._offset++] & 0xff); - } - - if ((fb & 0x80) == 0x80) - value = -value; - - return value; -}; - - - -///--- Exported API - -module.exports = Reader; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js deleted file mode 100644 index 8aea0001..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. - - -module.exports = { - EOC: 0, - Boolean: 1, - Integer: 2, - BitString: 3, - OctetString: 4, - Null: 5, - OID: 6, - ObjectDescriptor: 7, - External: 8, - Real: 9, // float - Enumeration: 10, - PDV: 11, - Utf8String: 12, - RelativeOID: 13, - Sequence: 16, - Set: 17, - NumericString: 18, - PrintableString: 19, - T61String: 20, - VideotexString: 21, - IA5String: 22, - UTCTime: 23, - GeneralizedTime: 24, - GraphicString: 25, - VisibleString: 26, - GeneralString: 28, - UniversalString: 29, - CharacterString: 30, - BMPString: 31, - Constructor: 32, - Context: 128 -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/writer.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/writer.js deleted file mode 100644 index 7b445cc6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/writer.js +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. - -var assert = require('assert'); -var ASN1 = require('./types'); -var errors = require('./errors'); - - -///--- Globals - -var newInvalidAsn1Error = errors.newInvalidAsn1Error; - -var DEFAULT_OPTS = { - size: 1024, - growthFactor: 8 -}; - - -///--- Helpers - -function merge(from, to) { - assert.ok(from); - assert.equal(typeof(from), 'object'); - assert.ok(to); - assert.equal(typeof(to), 'object'); - - var keys = Object.getOwnPropertyNames(from); - keys.forEach(function(key) { - if (to[key]) - return; - - var value = Object.getOwnPropertyDescriptor(from, key); - Object.defineProperty(to, key, value); - }); - - return to; -} - - - -///--- API - -function Writer(options) { - options = merge(DEFAULT_OPTS, options || {}); - - this._buf = new Buffer(options.size || 1024); - this._size = this._buf.length; - this._offset = 0; - this._options = options; - - // A list of offsets in the buffer where we need to insert - // sequence tag/len pairs. - this._seq = []; - - var self = this; - this.__defineGetter__('buffer', function() { - if (self._seq.length) - throw new InvalidAsn1Error(self._seq.length + ' unended sequence(s)'); - - return self._buf.slice(0, self._offset); - }); -} - - -Writer.prototype.writeByte = function(b) { - if (typeof(b) !== 'number') - throw new TypeError('argument must be a Number'); - - this._ensure(1); - this._buf[this._offset++] = b; -}; - - -Writer.prototype.writeInt = function(i, tag) { - if (typeof(i) !== 'number') - throw new TypeError('argument must be a Number'); - if (typeof(tag) !== 'number') - tag = ASN1.Integer; - - var sz = 4; - - while ((((i & 0xff800000) === 0) || ((i & 0xff800000) === 0xff800000)) && - (sz > 1)) { - sz--; - i <<= 8; - } - - if (sz > 4) - throw new InvalidAsn1Error('BER ints cannot be > 0xffffffff'); - - this._ensure(2 + sz); - this._buf[this._offset++] = tag; - this._buf[this._offset++] = sz; - - while (sz-- > 0) { - this._buf[this._offset++] = ((i & 0xff000000) >> 24); - i <<= 8; - } - -}; - - -Writer.prototype.writeNull = function() { - this.writeByte(ASN1.Null); - this.writeByte(0x00); -}; - - -Writer.prototype.writeEnumeration = function(i, tag) { - if (typeof(i) !== 'number') - throw new TypeError('argument must be a Number'); - if (typeof(tag) !== 'number') - tag = ASN1.Enumeration; - - return this.writeInt(i, tag); -}; - - -Writer.prototype.writeBoolean = function(b, tag) { - if (typeof(b) !== 'boolean') - throw new TypeError('argument must be a Boolean'); - if (typeof(tag) !== 'number') - tag = ASN1.Boolean; - - this._ensure(3); - this._buf[this._offset++] = tag; - this._buf[this._offset++] = 0x01; - this._buf[this._offset++] = b ? 0xff : 0x00; -}; - - -Writer.prototype.writeString = function(s, tag) { - if (typeof(s) !== 'string') - throw new TypeError('argument must be a string (was: ' + typeof(s) + ')'); - if (typeof(tag) !== 'number') - tag = ASN1.OctetString; - - var len = Buffer.byteLength(s); - this.writeByte(tag); - this.writeLength(len); - if (len) { - this._ensure(len); - this._buf.write(s, this._offset); - this._offset += len; - } -}; - - -Writer.prototype.writeBuffer = function(buf, tag) { - if (typeof(tag) !== 'number') - throw new TypeError('tag must be a number'); - if (!Buffer.isBuffer(buf)) - throw new TypeError('argument must be a buffer'); - - this.writeByte(tag); - this.writeLength(buf.length); - this._ensure(buf.length); - buf.copy(this._buf, this._offset, 0, buf.length); - this._offset += buf.length; -}; - - -Writer.prototype.writeStringArray = function(strings) { - if ((!strings instanceof Array)) - throw new TypeError('argument must be an Array[String]'); - - var self = this; - strings.forEach(function(s) { - self.writeString(s); - }); -}; - -// This is really to solve DER cases, but whatever for now -Writer.prototype.writeOID = function(s, tag) { - if (typeof(s) !== 'string') - throw new TypeError('argument must be a string'); - if (typeof(tag) !== 'number') - tag = ASN1.OID; - - if (!/^([0-9]+\.){3,}[0-9]+$/.test(s)) - throw new Error('argument is not a valid OID string'); - - function encodeOctet(bytes, octet) { - if (octet < 128) { - bytes.push(octet); - } else if (octet < 16384) { - bytes.push((octet >>> 7) | 0x80); - bytes.push(octet & 0x7F); - } else if (octet < 2097152) { - bytes.push((octet >>> 14) | 0x80); - bytes.push(((octet >>> 7) | 0x80) & 0xFF); - bytes.push(octet & 0x7F); - } else if (octet < 268435456) { - bytes.push((octet >>> 21) | 0x80); - bytes.push(((octet >>> 14) | 0x80) & 0xFF); - bytes.push(((octet >>> 7) | 0x80) & 0xFF); - bytes.push(octet & 0x7F); - } else { - bytes.push(((octet >>> 28) | 0x80) & 0xFF); - bytes.push(((octet >>> 21) | 0x80) & 0xFF); - bytes.push(((octet >>> 14) | 0x80) & 0xFF); - bytes.push(((octet >>> 7) | 0x80) & 0xFF); - bytes.push(octet & 0x7F); - } - } - - var tmp = s.split('.'); - var bytes = []; - bytes.push(parseInt(tmp[0], 10) * 40 + parseInt(tmp[1], 10)); - tmp.slice(2).forEach(function(b) { - encodeOctet(bytes, parseInt(b, 10)); - }); - - var self = this; - this._ensure(2 + bytes.length); - this.writeByte(tag); - this.writeLength(bytes.length); - bytes.forEach(function(b) { - self.writeByte(b); - }); -}; - - -Writer.prototype.writeLength = function(len) { - if (typeof(len) !== 'number') - throw new TypeError('argument must be a Number'); - - this._ensure(4); - - if (len <= 0x7f) { - this._buf[this._offset++] = len; - } else if (len <= 0xff) { - this._buf[this._offset++] = 0x81; - this._buf[this._offset++] = len; - } else if (len <= 0xffff) { - this._buf[this._offset++] = 0x82; - this._buf[this._offset++] = len >> 8; - this._buf[this._offset++] = len; - } else if (len <= 0xffffff) { - this._shift(start, len, 1); - this._buf[this._offset++] = 0x83; - this._buf[this._offset++] = len >> 16; - this._buf[this._offset++] = len >> 8; - this._buf[this._offset++] = len; - } else { - throw new InvalidAsn1ERror('Length too long (> 4 bytes)'); - } -}; - -Writer.prototype.startSequence = function(tag) { - if (typeof(tag) !== 'number') - tag = ASN1.Sequence | ASN1.Constructor; - - this.writeByte(tag); - this._seq.push(this._offset); - this._ensure(3); - this._offset += 3; -}; - - -Writer.prototype.endSequence = function() { - var seq = this._seq.pop(); - var start = seq + 3; - var len = this._offset - start; - - if (len <= 0x7f) { - this._shift(start, len, -2); - this._buf[seq] = len; - } else if (len <= 0xff) { - this._shift(start, len, -1); - this._buf[seq] = 0x81; - this._buf[seq + 1] = len; - } else if (len <= 0xffff) { - this._buf[seq] = 0x82; - this._buf[seq + 1] = len >> 8; - this._buf[seq + 2] = len; - } else if (len <= 0xffffff) { - this._shift(start, len, 1); - this._buf[seq] = 0x83; - this._buf[seq + 1] = len >> 16; - this._buf[seq + 2] = len >> 8; - this._buf[seq + 3] = len; - } else { - throw new InvalidAsn1Error('Sequence too long'); - } -}; - - -Writer.prototype._shift = function(start, len, shift) { - assert.ok(start !== undefined); - assert.ok(len !== undefined); - assert.ok(shift); - - this._buf.copy(this._buf, start + shift, start, start + len); - this._offset += shift; -}; - -Writer.prototype._ensure = function(len) { - assert.ok(len); - - if (this._size - this._offset < len) { - var sz = this._size * this._options.growthFactor; - if (sz - this._offset < len) - sz += len; - - var buf = new Buffer(sz); - - this._buf.copy(buf, 0, 0, this._offset); - this._buf = buf; - this._size = sz; - } -}; - - - -///--- Exported API - -module.exports = Writer; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js deleted file mode 100644 index d1766e7a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. - -// If you have no idea what ASN.1 or BER is, see this: -// ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc - -var Ber = require('./ber/index'); - - - -///--- Exported API - -module.exports = { - - Ber: Ber, - - BerReader: Ber.Reader, - - BerWriter: Ber.Writer - -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json deleted file mode 100644 index 8fbee012..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "author": { - "name": "Mark Cavage", - "email": "mcavage@gmail.com" - }, - "contributors": [ - { - "name": "David Gwynne", - "email": "loki@animata.net" - }, - { - "name": "Yunong Xiao", - "email": "yunong@joyent.com" - } - ], - "name": "asn1", - "description": "Contains parsers and serializers for ASN.1 (currently BER only)", - "version": "0.1.11", - "repository": { - "type": "git", - "url": "git://github.com/mcavage/node-asn1.git" - }, - "main": "lib/index.js", - "engines": { - "node": ">=0.4.9" - }, - "dependencies": {}, - "devDependencies": { - "tap": "0.1.4" - }, - "scripts": { - "pretest": "which gjslint; if [[ \"$?\" = 0 ]] ; then gjslint --nojsdoc -r lib -r tst; else echo \"Missing gjslint. Skipping lint\"; fi", - "test": "tap ./tst" - }, - "readme": "node-asn1 is a library for encoding and decoding ASN.1 datatypes in pure JS.\nCurrently BER encoding is supported; at some point I'll likely have to do DER.\n\n## Usage\n\nMostly, if you're *actually* needing to read and write ASN.1, you probably don't\nneed this readme to explain what and why. If you have no idea what ASN.1 is,\nsee this: ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc\n\nThe source is pretty much self-explanatory, and has read/write methods for the\ncommon types out there.\n\n### Decoding\n\nThe following reads an ASN.1 sequence with a boolean.\n\n var Ber = require('asn1').Ber;\n\n var reader = new Ber.Reader(new Buffer([0x30, 0x03, 0x01, 0x01, 0xff]));\n\n reader.readSequence();\n console.log('Sequence len: ' + reader.length);\n if (reader.peek() === Ber.Boolean)\n console.log(reader.readBoolean());\n\n### Encoding\n\nThe following generates the same payload as above.\n\n var Ber = require('asn1').Ber;\n\n var writer = new Ber.Writer();\n\n writer.startSequence();\n writer.writeBoolean(true);\n writer.endSequence();\n\n console.log(writer.buffer);\n\n## Installation\n\n npm install asn1\n\n## License\n\nMIT.\n\n## Bugs\n\nSee <https://github.com/mcavage/node-asn1/issues>.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/mcavage/node-asn1/issues" - }, - "homepage": "https://github.com/mcavage/node-asn1", - "_id": "asn1@0.1.11", - "dist": { - "shasum": "6d27af76b17126a28e5250c7ce288790af7ab63c" - }, - "_from": "asn1@0.1.11", - "_resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/reader.test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/reader.test.js deleted file mode 100644 index 0b78b474..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/reader.test.js +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. - -var test = require('tap').test; - - - -///--- Globals - -var BerReader; - - - -///--- Tests - -test('load library', function(t) { - BerReader = require('../../lib/index').BerReader; - t.ok(BerReader); - try { - new BerReader(); - t.fail('Should have thrown'); - } catch (e) { - t.ok(e instanceof TypeError, 'Should have been a type error'); - } - t.end(); -}); - - -test('read byte', function(t) { - var reader = new BerReader(new Buffer([0xde])); - t.ok(reader); - t.equal(reader.readByte(), 0xde, 'wrong value'); - t.end(); -}); - - -test('read 1 byte int', function(t) { - var reader = new BerReader(new Buffer([0x02, 0x01, 0x03])); - t.ok(reader); - t.equal(reader.readInt(), 0x03, 'wrong value'); - t.equal(reader.length, 0x01, 'wrong length'); - t.end(); -}); - - -test('read 2 byte int', function(t) { - var reader = new BerReader(new Buffer([0x02, 0x02, 0x7e, 0xde])); - t.ok(reader); - t.equal(reader.readInt(), 0x7ede, 'wrong value'); - t.equal(reader.length, 0x02, 'wrong length'); - t.end(); -}); - - -test('read 3 byte int', function(t) { - var reader = new BerReader(new Buffer([0x02, 0x03, 0x7e, 0xde, 0x03])); - t.ok(reader); - t.equal(reader.readInt(), 0x7ede03, 'wrong value'); - t.equal(reader.length, 0x03, 'wrong length'); - t.end(); -}); - - -test('read 4 byte int', function(t) { - var reader = new BerReader(new Buffer([0x02, 0x04, 0x7e, 0xde, 0x03, 0x01])); - t.ok(reader); - t.equal(reader.readInt(), 0x7ede0301, 'wrong value'); - t.equal(reader.length, 0x04, 'wrong length'); - t.end(); -}); - - -test('read boolean true', function(t) { - var reader = new BerReader(new Buffer([0x01, 0x01, 0xff])); - t.ok(reader); - t.equal(reader.readBoolean(), true, 'wrong value'); - t.equal(reader.length, 0x01, 'wrong length'); - t.end(); -}); - - -test('read boolean false', function(t) { - var reader = new BerReader(new Buffer([0x01, 0x01, 0x00])); - t.ok(reader); - t.equal(reader.readBoolean(), false, 'wrong value'); - t.equal(reader.length, 0x01, 'wrong length'); - t.end(); -}); - - -test('read enumeration', function(t) { - var reader = new BerReader(new Buffer([0x0a, 0x01, 0x20])); - t.ok(reader); - t.equal(reader.readEnumeration(), 0x20, 'wrong value'); - t.equal(reader.length, 0x01, 'wrong length'); - t.end(); -}); - - -test('read string', function(t) { - var dn = 'cn=foo,ou=unit,o=test'; - var buf = new Buffer(dn.length + 2); - buf[0] = 0x04; - buf[1] = Buffer.byteLength(dn); - buf.write(dn, 2); - var reader = new BerReader(buf); - t.ok(reader); - t.equal(reader.readString(), dn, 'wrong value'); - t.equal(reader.length, dn.length, 'wrong length'); - t.end(); -}); - - -test('read sequence', function(t) { - var reader = new BerReader(new Buffer([0x30, 0x03, 0x01, 0x01, 0xff])); - t.ok(reader); - t.equal(reader.readSequence(), 0x30, 'wrong value'); - t.equal(reader.length, 0x03, 'wrong length'); - t.equal(reader.readBoolean(), true, 'wrong value'); - t.equal(reader.length, 0x01, 'wrong length'); - t.end(); -}); - - -test('anonymous LDAPv3 bind', function(t) { - var BIND = new Buffer(14); - BIND[0] = 0x30; // Sequence - BIND[1] = 12; // len - BIND[2] = 0x02; // ASN.1 Integer - BIND[3] = 1; // len - BIND[4] = 0x04; // msgid (make up 4) - BIND[5] = 0x60; // Bind Request - BIND[6] = 7; // len - BIND[7] = 0x02; // ASN.1 Integer - BIND[8] = 1; // len - BIND[9] = 0x03; // v3 - BIND[10] = 0x04; // String (bind dn) - BIND[11] = 0; // len - BIND[12] = 0x80; // ContextSpecific (choice) - BIND[13] = 0; // simple bind - - // Start testing ^^ - var ber = new BerReader(BIND); - t.equal(ber.readSequence(), 48, 'Not an ASN.1 Sequence'); - t.equal(ber.length, 12, 'Message length should be 12'); - t.equal(ber.readInt(), 4, 'Message id should have been 4'); - t.equal(ber.readSequence(), 96, 'Bind Request should have been 96'); - t.equal(ber.length, 7, 'Bind length should have been 7'); - t.equal(ber.readInt(), 3, 'LDAP version should have been 3'); - t.equal(ber.readString(), '', 'Bind DN should have been empty'); - t.equal(ber.length, 0, 'string length should have been 0'); - t.equal(ber.readByte(), 0x80, 'Should have been ContextSpecific (choice)'); - t.equal(ber.readByte(), 0, 'Should have been simple bind'); - t.equal(null, ber.readByte(), 'Should be out of data'); - t.end(); -}); - - -test('long string', function(t) { - var buf = new Buffer(256); - var o; - var s = - '2;649;CN=Red Hat CS 71GA Demo,O=Red Hat CS 71GA Demo,C=US;' + - 'CN=RHCS Agent - admin01,UID=admin01,O=redhat,C=US [1] This is ' + - 'Teena Vradmin\'s description.'; - buf[0] = 0x04; - buf[1] = 0x81; - buf[2] = 0x94; - buf.write(s, 3); - var ber = new BerReader(buf.slice(0, 3 + s.length)); - t.equal(ber.readString(), s); - t.end(); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js deleted file mode 100644 index add0b9fd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved. - -var test = require('tap').test; -var sys = require('sys'); - -///--- Globals - -var BerWriter; - -var BerReader; - - -///--- Tests - -test('load library', function(t) { - BerWriter = require('../../lib/index').BerWriter; - t.ok(BerWriter); - t.ok(new BerWriter()); - t.end(); -}); - - -test('write byte', function(t) { - var writer = new BerWriter(); - - writer.writeByte(0xC2); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 1, 'Wrong length'); - t.equal(ber[0], 0xC2, 'value wrong'); - - t.end(); -}); - - -test('write 1 byte int', function(t) { - var writer = new BerWriter(); - - writer.writeInt(0x7f); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 3, 'Wrong length for an int: ' + ber.length); - t.equal(ber[0], 0x02, 'ASN.1 tag wrong (2) -> ' + ber[0]); - t.equal(ber[1], 0x01, 'length wrong(1) -> ' + ber[1]); - t.equal(ber[2], 0x7f, 'value wrong(3) -> ' + ber[2]); - - t.end(); -}); - - -test('write 2 byte int', function(t) { - var writer = new BerWriter(); - - writer.writeInt(0x7ffe); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 4, 'Wrong length for an int'); - t.equal(ber[0], 0x02, 'ASN.1 tag wrong'); - t.equal(ber[1], 0x02, 'length wrong'); - t.equal(ber[2], 0x7f, 'value wrong (byte 1)'); - t.equal(ber[3], 0xfe, 'value wrong (byte 2)'); - - t.end(); -}); - - -test('write 3 byte int', function(t) { - var writer = new BerWriter(); - - writer.writeInt(0x7ffffe); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 5, 'Wrong length for an int'); - t.equal(ber[0], 0x02, 'ASN.1 tag wrong'); - t.equal(ber[1], 0x03, 'length wrong'); - t.equal(ber[2], 0x7f, 'value wrong (byte 1)'); - t.equal(ber[3], 0xff, 'value wrong (byte 2)'); - t.equal(ber[4], 0xfe, 'value wrong (byte 3)'); - - t.end(); -}); - - -test('write 4 byte int', function(t) { - var writer = new BerWriter(); - - writer.writeInt(0x7ffffffe); - var ber = writer.buffer; - - t.ok(ber); - - t.equal(ber.length, 6, 'Wrong length for an int'); - t.equal(ber[0], 0x02, 'ASN.1 tag wrong'); - t.equal(ber[1], 0x04, 'length wrong'); - t.equal(ber[2], 0x7f, 'value wrong (byte 1)'); - t.equal(ber[3], 0xff, 'value wrong (byte 2)'); - t.equal(ber[4], 0xff, 'value wrong (byte 3)'); - t.equal(ber[5], 0xfe, 'value wrong (byte 4)'); - - t.end(); -}); - - -test('write boolean', function(t) { - var writer = new BerWriter(); - - writer.writeBoolean(true); - writer.writeBoolean(false); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 6, 'Wrong length'); - t.equal(ber[0], 0x01, 'tag wrong'); - t.equal(ber[1], 0x01, 'length wrong'); - t.equal(ber[2], 0xff, 'value wrong'); - t.equal(ber[3], 0x01, 'tag wrong'); - t.equal(ber[4], 0x01, 'length wrong'); - t.equal(ber[5], 0x00, 'value wrong'); - - t.end(); -}); - - -test('write string', function(t) { - var writer = new BerWriter(); - writer.writeString('hello world'); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 13, 'wrong length'); - t.equal(ber[0], 0x04, 'wrong tag'); - t.equal(ber[1], 11, 'wrong length'); - t.equal(ber.slice(2).toString('utf8'), 'hello world', 'wrong value'); - - t.end(); -}); - -test('write buffer', function(t) { - var writer = new BerWriter(); - // write some stuff to start with - writer.writeString('hello world'); - var ber = writer.buffer; - var buf = new Buffer([0x04, 0x0b, 0x30, 0x09, 0x02, 0x01, 0x0f, 0x01, 0x01, - 0xff, 0x01, 0x01, 0xff]); - writer.writeBuffer(buf.slice(2, buf.length), 0x04); - ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 26, 'wrong length'); - t.equal(ber[0], 0x04, 'wrong tag'); - t.equal(ber[1], 11, 'wrong length'); - t.equal(ber.slice(2, 13).toString('utf8'), 'hello world', 'wrong value'); - t.equal(ber[13], buf[0], 'wrong tag'); - t.equal(ber[14], buf[1], 'wrong length'); - for (var i = 13, j = 0; i < ber.length && j < buf.length; i++, j++) { - t.equal(ber[i], buf[j], 'buffer contents not identical'); - } - t.end(); -}); - -test('write string array', function(t) { - var writer = new BerWriter(); - writer.writeStringArray(['hello world', 'fubar!']); - var ber = writer.buffer; - - t.ok(ber); - - t.equal(ber.length, 21, 'wrong length'); - t.equal(ber[0], 0x04, 'wrong tag'); - t.equal(ber[1], 11, 'wrong length'); - t.equal(ber.slice(2, 13).toString('utf8'), 'hello world', 'wrong value'); - - t.equal(ber[13], 0x04, 'wrong tag'); - t.equal(ber[14], 6, 'wrong length'); - t.equal(ber.slice(15).toString('utf8'), 'fubar!', 'wrong value'); - - t.end(); -}); - - -test('resize internal buffer', function(t) { - var writer = new BerWriter({size: 2}); - writer.writeString('hello world'); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 13, 'wrong length'); - t.equal(ber[0], 0x04, 'wrong tag'); - t.equal(ber[1], 11, 'wrong length'); - t.equal(ber.slice(2).toString('utf8'), 'hello world', 'wrong value'); - - t.end(); -}); - - -test('sequence', function(t) { - var writer = new BerWriter({size: 25}); - writer.startSequence(); - writer.writeString('hello world'); - writer.endSequence(); - var ber = writer.buffer; - - t.ok(ber); - console.log(ber); - t.equal(ber.length, 15, 'wrong length'); - t.equal(ber[0], 0x30, 'wrong tag'); - t.equal(ber[1], 13, 'wrong length'); - t.equal(ber[2], 0x04, 'wrong tag'); - t.equal(ber[3], 11, 'wrong length'); - t.equal(ber.slice(4).toString('utf8'), 'hello world', 'wrong value'); - - t.end(); -}); - - -test('nested sequence', function(t) { - var writer = new BerWriter({size: 25}); - writer.startSequence(); - writer.writeString('hello world'); - writer.startSequence(); - writer.writeString('hello world'); - writer.endSequence(); - writer.endSequence(); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 30, 'wrong length'); - t.equal(ber[0], 0x30, 'wrong tag'); - t.equal(ber[1], 28, 'wrong length'); - t.equal(ber[2], 0x04, 'wrong tag'); - t.equal(ber[3], 11, 'wrong length'); - t.equal(ber.slice(4, 15).toString('utf8'), 'hello world', 'wrong value'); - t.equal(ber[15], 0x30, 'wrong tag'); - t.equal(ber[16], 13, 'wrong length'); - t.equal(ber[17], 0x04, 'wrong tag'); - t.equal(ber[18], 11, 'wrong length'); - t.equal(ber.slice(19, 30).toString('utf8'), 'hello world', 'wrong value'); - - t.end(); -}); - - -test('LDAP bind message', function(t) { - var dn = 'cn=foo,ou=unit,o=test'; - var writer = new BerWriter(); - writer.startSequence(); - writer.writeInt(3); // msgid = 3 - writer.startSequence(0x60); // ldap bind - writer.writeInt(3); // ldap v3 - writer.writeString(dn); - writer.writeByte(0x80); - writer.writeByte(0x00); - writer.endSequence(); - writer.endSequence(); - var ber = writer.buffer; - - t.ok(ber); - t.equal(ber.length, 35, 'wrong length (buffer)'); - t.equal(ber[0], 0x30, 'wrong tag'); - t.equal(ber[1], 33, 'wrong length'); - t.equal(ber[2], 0x02, 'wrong tag'); - t.equal(ber[3], 1, 'wrong length'); - t.equal(ber[4], 0x03, 'wrong value'); - t.equal(ber[5], 0x60, 'wrong tag'); - t.equal(ber[6], 28, 'wrong length'); - t.equal(ber[7], 0x02, 'wrong tag'); - t.equal(ber[8], 1, 'wrong length'); - t.equal(ber[9], 0x03, 'wrong value'); - t.equal(ber[10], 0x04, 'wrong tag'); - t.equal(ber[11], dn.length, 'wrong length'); - t.equal(ber.slice(12, 33).toString('utf8'), dn, 'wrong value'); - t.equal(ber[33], 0x80, 'wrong tag'); - t.equal(ber[34], 0x00, 'wrong len'); - - t.end(); -}); - - -test('Write OID', function(t) { - var oid = '1.2.840.113549.1.1.1'; - var writer = new BerWriter(); - writer.writeOID(oid); - - var ber = writer.buffer; - t.ok(ber); - console.log(require('util').inspect(ber)); - console.log(require('util').inspect(new Buffer([0x06, 0x09, 0x2a, 0x86, - 0x48, 0x86, 0xf7, 0x0d, - 0x01, 0x01, 0x01]))); - - t.end(); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md deleted file mode 100644 index c0c3a530..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md +++ /dev/null @@ -1,126 +0,0 @@ -# node-assert-plus - -This library is a super small wrapper over node's assert module that has two -things: (1) the ability to disable assertions with the environment variable -NODE_NDEBUG, and (2) some API wrappers for argument testing. Like -`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks -like this: - - var assert = require('assert-plus'); - - function fooAccount(options, callback) { - assert.object(options, 'options'); - assert.number(options.id, 'options.id); - assert.bool(options.isManager, 'options.isManager'); - assert.string(options.name, 'options.name'); - assert.arrayOfString(options.email, 'options.email'); - assert.func(callback, 'callback'); - - // Do stuff - callback(null, {}); - } - -# API - -All methods that *aren't* part of node's core assert API are simply assumed to -take an argument, and then a string 'name' that's not a message; `AssertionError` -will be thrown if the assertion fails with a message like: - - AssertionError: foo (string) is required - at test (/home/mark/work/foo/foo.js:3:9) - at Object.<anonymous> (/home/mark/work/foo/foo.js:15:1) - at Module._compile (module.js:446:26) - at Object..js (module.js:464:10) - at Module.load (module.js:353:31) - at Function._load (module.js:311:12) - at Array.0 (module.js:484:10) - at EventEmitter._tickCallback (node.js:190:38) - -from: - - function test(foo) { - assert.string(foo, 'foo'); - } - -There you go. You can check that arrays are of a homogenous type with `Arrayof$Type`: - - function test(foo) { - assert.arrayOfString(foo, 'foo'); - } - -You can assert IFF an argument is not `undefined` (i.e., an optional arg): - - assert.optionalString(foo, 'foo'); - -Lastly, you can opt-out of assertion checking altogether by setting the -environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have -lots of assertions, and don't want to pay `typeof ()` taxes to v8 in -production. - -The complete list of APIs is: - -* assert.bool -* assert.buffer -* assert.func -* assert.number -* assert.object -* assert.string -* assert.arrayOfBool -* assert.arrayOfFunc -* assert.arrayOfNumber -* assert.arrayOfObject -* assert.arrayOfString -* assert.optionalBool -* assert.optionalBuffer -* assert.optionalFunc -* assert.optionalNumber -* assert.optionalObject -* assert.optionalString -* assert.optionalArrayOfBool -* assert.optionalArrayOfFunc -* assert.optionalArrayOfNumber -* assert.optionalArrayOfObject -* assert.optionalArrayOfString -* assert.AssertionError -* assert.fail -* assert.ok -* assert.equal -* assert.notEqual -* assert.deepEqual -* assert.notDeepEqual -* assert.strictEqual -* assert.notStrictEqual -* assert.throws -* assert.doesNotThrow -* assert.ifError - -# Installation - - npm install assert-plus - -## License - -The MIT License (MIT) -Copyright (c) 2012 Mark Cavage - -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. - -## Bugs - -See <https://github.com/mcavage/node-assert-plus/issues>. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js deleted file mode 100644 index 70583f12..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) 2012, Mark Cavage. All rights reserved. - -var assert = require('assert'); -var Stream = require('stream').Stream; -var util = require('util'); - - - -///--- Globals - -var NDEBUG = process.env.NODE_NDEBUG || false; - - - -///--- Messages - -var ARRAY_TYPE_REQUIRED = '%s ([%s]) required'; -var TYPE_REQUIRED = '%s (%s) is required'; - - - -///--- Internal - -function capitalize(str) { - return (str.charAt(0).toUpperCase() + str.slice(1)); -} - -function uncapitalize(str) { - return (str.charAt(0).toLowerCase() + str.slice(1)); -} - -function _() { - return (util.format.apply(util, arguments)); -} - - -function _assert(arg, type, name, stackFunc) { - if (!NDEBUG) { - name = name || type; - stackFunc = stackFunc || _assert.caller; - var t = typeof (arg); - - if (t !== type) { - throw new assert.AssertionError({ - message: _(TYPE_REQUIRED, name, type), - actual: t, - expected: type, - operator: '===', - stackStartFunction: stackFunc - }); - } - } -} - - - -///--- API - -function array(arr, type, name) { - if (!NDEBUG) { - name = name || type; - - if (!Array.isArray(arr)) { - throw new assert.AssertionError({ - message: _(ARRAY_TYPE_REQUIRED, name, type), - actual: typeof (arr), - expected: 'array', - operator: 'Array.isArray', - stackStartFunction: array.caller - }); - } - - for (var i = 0; i < arr.length; i++) { - _assert(arr[i], type, name, array); - } - } -} - - -function bool(arg, name) { - _assert(arg, 'boolean', name, bool); -} - - -function buffer(arg, name) { - if (!Buffer.isBuffer(arg)) { - throw new assert.AssertionError({ - message: _(TYPE_REQUIRED, name, type), - actual: typeof (arg), - expected: 'buffer', - operator: 'Buffer.isBuffer', - stackStartFunction: buffer - }); - } -} - - -function func(arg, name) { - _assert(arg, 'function', name); -} - - -function number(arg, name) { - _assert(arg, 'number', name); -} - - -function object(arg, name) { - _assert(arg, 'object', name); -} - - -function stream(arg, name) { - if (!(arg instanceof Stream)) { - throw new assert.AssertionError({ - message: _(TYPE_REQUIRED, name, type), - actual: typeof (arg), - expected: 'Stream', - operator: 'instanceof', - stackStartFunction: buffer - }); - } -} - - -function string(arg, name) { - _assert(arg, 'string', name); -} - - - -///--- Exports - -module.exports = { - bool: bool, - buffer: buffer, - func: func, - number: number, - object: object, - stream: stream, - string: string -}; - - -Object.keys(module.exports).forEach(function (k) { - if (k === 'buffer') - return; - - var name = 'arrayOf' + capitalize(k); - - if (k === 'bool') - k = 'boolean'; - if (k === 'func') - k = 'function'; - module.exports[name] = function (arg, name) { - array(arg, k, name); - }; -}); - -Object.keys(module.exports).forEach(function (k) { - var _name = 'optional' + capitalize(k); - var s = uncapitalize(k.replace('arrayOf', '')); - if (s === 'bool') - s = 'boolean'; - if (s === 'func') - s = 'function'; - - if (k.indexOf('arrayOf') !== -1) { - module.exports[_name] = function (arg, name) { - if (!NDEBUG && arg !== undefined) { - array(arg, s, name); - } - }; - } else { - module.exports[_name] = function (arg, name) { - if (!NDEBUG && arg !== undefined) { - _assert(arg, s, name); - } - }; - } -}); - - -// Reexport built-in assertions -Object.keys(assert).forEach(function (k) { - if (k === 'AssertionError') { - module.exports[k] = assert[k]; - return; - } - - module.exports[k] = function () { - if (!NDEBUG) { - assert[k].apply(assert[k], arguments); - } - }; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json deleted file mode 100644 index aade0f97..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "author": { - "name": "Mark Cavage", - "email": "mcavage@gmail.com" - }, - "name": "assert-plus", - "description": "Extra assertions on top of node's assert module", - "version": "0.1.2", - "main": "./assert.js", - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "engines": { - "node": ">=0.6" - }, - "readme": "# node-assert-plus\n\nThis library is a super small wrapper over node's assert module that has two\nthings: (1) the ability to disable assertions with the environment variable\nNODE_NDEBUG, and (2) some API wrappers for argument testing. Like\n`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks\nlike this:\n\n var assert = require('assert-plus');\n\n function fooAccount(options, callback) {\n\t assert.object(options, 'options');\n\t\tassert.number(options.id, 'options.id);\n\t\tassert.bool(options.isManager, 'options.isManager');\n\t\tassert.string(options.name, 'options.name');\n\t\tassert.arrayOfString(options.email, 'options.email');\n\t\tassert.func(callback, 'callback');\n\n // Do stuff\n\t\tcallback(null, {});\n }\n\n# API\n\nAll methods that *aren't* part of node's core assert API are simply assumed to\ntake an argument, and then a string 'name' that's not a message; `AssertionError`\nwill be thrown if the assertion fails with a message like:\n\n AssertionError: foo (string) is required\n\tat test (/home/mark/work/foo/foo.js:3:9)\n\tat Object.<anonymous> (/home/mark/work/foo/foo.js:15:1)\n\tat Module._compile (module.js:446:26)\n\tat Object..js (module.js:464:10)\n\tat Module.load (module.js:353:31)\n\tat Function._load (module.js:311:12)\n\tat Array.0 (module.js:484:10)\n\tat EventEmitter._tickCallback (node.js:190:38)\n\nfrom:\n\n function test(foo) {\n\t assert.string(foo, 'foo');\n }\n\nThere you go. You can check that arrays are of a homogenous type with `Arrayof$Type`:\n\n function test(foo) {\n\t assert.arrayOfString(foo, 'foo');\n }\n\nYou can assert IFF an argument is not `undefined` (i.e., an optional arg):\n\n assert.optionalString(foo, 'foo');\n\nLastly, you can opt-out of assertion checking altogether by setting the\nenvironment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have\nlots of assertions, and don't want to pay `typeof ()` taxes to v8 in\nproduction.\n\nThe complete list of APIs is:\n\n* assert.bool\n* assert.buffer\n* assert.func\n* assert.number\n* assert.object\n* assert.string\n* assert.arrayOfBool\n* assert.arrayOfFunc\n* assert.arrayOfNumber\n* assert.arrayOfObject\n* assert.arrayOfString\n* assert.optionalBool\n* assert.optionalBuffer\n* assert.optionalFunc\n* assert.optionalNumber\n* assert.optionalObject\n* assert.optionalString\n* assert.optionalArrayOfBool\n* assert.optionalArrayOfFunc\n* assert.optionalArrayOfNumber\n* assert.optionalArrayOfObject\n* assert.optionalArrayOfString\n* assert.AssertionError\n* assert.fail\n* assert.ok\n* assert.equal\n* assert.notEqual\n* assert.deepEqual\n* assert.notDeepEqual\n* assert.strictEqual\n* assert.notStrictEqual\n* assert.throws\n* assert.doesNotThrow\n* assert.ifError\n\n# Installation\n\n npm install assert-plus\n\n## License\n\nThe MIT License (MIT)\nCopyright (c) 2012 Mark Cavage\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n## Bugs\n\nSee <https://github.com/mcavage/node-assert-plus/issues>.\n", - "readmeFilename": "README.md", - "_id": "assert-plus@0.1.2", - "dist": { - "shasum": "53cfb5f7859525b28cbf0ba62afc8971ca7ad1a1" - }, - "_from": "assert-plus@0.1.2", - "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG deleted file mode 100644 index 078c03ca..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG +++ /dev/null @@ -1,71 +0,0 @@ -This contains tickets fixed in each version release in reverse chronological -order. There is one ticket per line. Each commits message has the tickets fixed -in it. The commit message also has the corresponding github issue. i.e. CTYPE-42 -would be issue 42. Each issue can be found at: -https://github.com/rmustacc/node-ctype/issues/%d. - -CTYPE v0.5.2 -CTYPE-46 Release 0.5.2 -CTYPE-45 error in setEndian logic - -v0.5.1 -CTYPE-44 Release 0.5.1 -Contributed by Terin Stock: -CTYPE-41 CTypeParser.writeStruct should return its offset -Contributed by Terin Stock: -CTYPE-42 int64_t returns wrong size - -v0.5.0 -CTYPE-40 Release 0.5.0 -CTYPE-39 want > 0.6 engine support - -v0.4.0 -CTYPE-37 Release v0.4.0 -CTYPE-6 want additional entry point for write -CTYPE-20 Add 64-bit int support into core parser -CTYPE-31 Fix bounds errors node/2129 -CTYPE-33 Update copyright holders -CTYPE-34 ctf.js confuses sign bit. -CTYPE-35 Make the README more useful for getting started -CTYPE-36 want manual page on ctio functions - -v0.3.1 -CTYPE-29 Release 0.3.1 -CTYPE-28 Want v0.6 npm support - -v0.3.0 -CTYPE-27 Release v0.3.0 -CTYPE-26 Want alternate default char behavior - -v0.2.1 -CTYPE-25 Release v0.2.1 -CTYPE-24 Writing structs is busted - -v0.2.0: -CTYPE-23 Release v0.2.0 -CTYPE-21 Add support for CTF JSON data -CTYPE-22 Add Javascriptlint profile -CTYPE-15 Pull in ctio updates from node/master - -v0.1.0: -CTYPE-18 Bump version to v0.1.0 -CTYPE-17 Fix nested structures -CTYPE-16 Remove extraneous logging -CTYPE-14 toAbs64 and toApprox64 are not exported - -v0.0.3: -CTYPE-12 Bump version to v0.0.3 -CTYPE-11 fix typo in wuint64 -CTYPE-10 Integrate jsstyle - -v0.0.2: -CTYPE-8 dump npm version to v0.0.2 -CTYPE-9 want changelog -CTYPE-7 fix typo in detypes. - -v0.0.1: -CTYPE-5 Missing from NPM registry -CTYPE-4 int16_t calls wrong read function -CTYPE-3 API example types are missing quotes as strings -CTYPE-2 doc missing 64-bit functions -CTYPE-1 Need license diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE deleted file mode 100644 index 22ced3e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -The following license applies to all files unless the file is specified below. -Each file specified below has its license information embedded in it: - -tools/jsstyle - -Copyright 2011, Robert Mustacchi. All rights reserved. -Copyright 2011, Joyent, Inc. All rights reserved. -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/README b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/README deleted file mode 100644 index 4efd7ee5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/README +++ /dev/null @@ -1,82 +0,0 @@ -Node-CType is a way to read and write binary data in structured and easy to use -format. Its name comes from the C header file. - -To get started, simply clone the repository or use npm to install it. Once it is -there, simply require it. - -git clone git://github.com/rmustacc/node-ctype -npm install ctype -var mod_ctype = require('ctype') - - -There are two APIs that you can use, depending on what abstraction you'd like. -The low level API let's you read and write individual integers and floats from -buffers. The higher level API let's you read and write structures of these. To -illustrate this, let's looks look at how we would read and write a binary -encoded x,y point. - -In C we would define this structure as follows: - -typedef struct point { - uint16_t p_x; - uint16_t p_y; -} point_t; - -To read a binary encoded point from a Buffer, we first need to create a CType -parser (where we specify the endian and other options) and add the typedef. - -var parser = new mod_ctype.Parser({ endian: 'big' }); -parser.typedef('point_t', [ - { x: { type: 'uint16_t' } }, - { y: { type: 'uint16_t' } } -]); - -From here, given a buffer buf and an offset into it, we can read a point. - -var out = parser.readData([ { point: { type: 'point_t' } } ], buffer, 0); -console.log(out); -{ point: { x: 23, y: 42 } } - -Another way to get the same information would be to use the low level methods. -Note that these require you to manually deal with the offset. Here's how we'd -get the same values of x and y from the buffer. - -var x = mod_ctype.ruint16(buf, 'big', 0); -var y = mod_ctype.ruint16(buf, 'big', 2); -console.log(x + ', ' + y); -23, 42 - -The true power of this API comes from the ability to define and nest typedefs, -just as you would in C. By default, the following types are defined by default. -Note that they return a Number, unless indicated otherwise. - - * int8_t - * int16_t - * int32_t - * int64_t (returns an array where val[0] << 32 + val[1] would be the value) - * uint8_t - * uint16_t - * uint32_t - * uint64_t (returns an array where val[0] << 32 + val[1] would be the value) - * float - * double - * char (either returns a buffer with that character or a uint8_t) - * char[] (returns an object with the buffer and the number of characters read which is either the total amount requested or until the first 0) - - -ctf2json integration: - -Node-CType supports consuming the output of ctf2json. Once you read in a JSON file, -all you have to do to add all the definitions it contains is: - -var data, parser; -data = JSON.parse(parsedJSONData); -parser = mod_ctype.parseCTF(data, { endian: 'big' }); - -For more documentation, see the file README.old. Full documentation is in the -process of being rewritten as a series of manual pages which will be available -in the repository and online for viewing. - -To read the ctio manual page simple run, from the root of the workspace: - -man -Mman -s 3ctype ctio diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/README.old b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/README.old deleted file mode 100644 index 9326b725..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/README.old +++ /dev/null @@ -1,298 +0,0 @@ -This library provides a way to read and write binary data. - -Node CType is a way to read and write binary data in structured and easy to use -formats. It's name comes from the header file, though it does not share as much -with it as it perhaps should. - -There are two levels of the API. One is the raw API which everything is built on -top of, while the other provides a much nicer abstraction and is built entirely -by using the lower level API. The hope is that the low level API is both clear -and useful. The low level API gets it's names from stdint.h (a rather -appropriate source). The lower level API is presented at the end of this -document. - -Standard CType API - -The CType interface is presented as a parser object that controls the -endianness combined with a series of methods to change that value, parse and -write out buffers, and a way to provide typedefs. Standard Types - -The CType parser supports the following basic types which return Numbers except -as indicated: - - * int8_t - * int16_t - * int32_t - * int64_t (returns an array where val[0] << 32 + val[1] would be the value) - * uint8_t - * uint16_t - * uint32_t - * uint64_t (returns an array where val[0] << 32 + val[1] would be the value) - * float - * double - * char (returns a buffer with just that single character) - * char[] (returns an object with the buffer and the number of characters read which is either the total amount requested or until the first 0) - -Specifying Structs - -The CType parser also supports the notion of structs. A struct is an array of -JSON objects that defines an order of keys which have types and values. One -would build a struct to represent a point (x,y) as follows: - -[ - { x: { type: 'int16_t' }}, - { y: { type: 'int16_t' }} -] - -When this is passed into the read routine, it would read the first two bytes -(as defined by int16_t) to determine the Number to use for X, and then it would -read the next two bytes to determine the value of Y. When read this could -return something like: - -{ - x: 42, - y: -23 -} - -When someone wants to write values, we use the same format as above, but with -additional value field: - -[ - { x: { type: 'int16_t', value: 42 }}, - { y: { type: 'int16_t', value: -23 }} -] - -Now, the structure above may be optionally annotated with offsets. This tells -us to rather than read continuously we should read the given value at the -specified offset. If an offset is provided, it is is effectively the equivalent -of lseek(offset, SEEK_SET). Thus, subsequent values will be read from that -offset and incremented by the appropriate value. As an example: - -[ - { x: { type: 'int16_t' }}, - { y: { type: 'int16_t', offset: 20 }}, - { z: { type: 'int16_t' }} -] - -We would read x from the first starting offset given to us, for the sake of -example, let's assume that's 0. After reading x, the next offset to read from -would be 2; however, y specifies an offset, thus we jump directly to that -offset and read y from byte 20. We would then read z from byte 22. - -The same offsets may be used when writing values. - -Typedef - -The basic set of types while covers the basics, is somewhat limiting. To make -this richer, there is functionality to typedef something like in C. One can use -typedef to add a new name to an existing type or to define a name to refer to a -struct. Thus the following are all examples of a typedef: - -typedef('size_t', 'uint32_t'); -typedef('ssize_t', 'int32_t'); -typedef('point_t', [ - { x: { type: 'int16_t' }}, - { y: { type: 'int16_t' }} -]); - -Once something has been typedef'd it can be used in any of the definitions -previously shown. - -One cannot remove a typedef once created, this is analogous to C. - -The set of defined types can be printed with lstypes. The format of this output -is subject to change, but likely will look something like: - -> lstypes(); -{ - size_t: 'uint32_t', - ssize_t: 'int32_t', - point_t: [ - { x: { type: 'int16_t' }}, - { y: { type: 'int16_t' }} - ] -} - -Specifying arrays - -Arrays can be specified by appending []s to a type. Arrays must have the size -specified. The size must be specified and it can be done in one of two ways: - - * An explicit non-zero integer size - * A name of a previously declared variable in the struct whose value is a - number. - -Note, that when using the name of a variable, it should be the string name for -the key. This is only valid inside structs and the value must be declared -before the value with the array. The following are examples: - -[ - { ip_addr4: { type: 'uint8_t[4]' }}, - { len: { type: 'uint32_t' }}, - { data: { type: 'uint8_t[len]' }} -] - -Arrays are permitted in typedefs; however, they must have a declared integer -size. The following are examples of valid and invalid arrays: - -typedef('path', 'char[1024]'); /* Good */ -typedef('path', 'char[len]'); /* Bad! */ - -64 bit values: - -Unfortunately Javascript represents values with a double, so you lose precision -and the ability to represent Integers roughly beyond 2^53. To alleviate this, I -propose the following for returning 64 bit integers when read: - -value[2]: Each entry is a 32 bit number which can be reconstructed to the -original by the following formula: - -value[0] << 32 + value[1] (Note this will not work in Javascript) - -CTF JSON data: - -node-ctype can also handle JSON data that mathces the format described in the -documentation of the tool ctf2json. Given the JSON data which specifies type -information, it will transform that into a parser that understands all of the -types defined inside of it. This is useful for more complicated structures that -have a lot of typedefs. - -Interface overview - -The following is the header-file like interface to the parser object: - -/* - * Create a new instance of the parser. Each parser has its own store of - * typedefs and endianness. Conf is an object with the following values: - * - * endian Either 'big' or 'little' do determine the endianness we - * want to read from or write to. - * - */ -function CTypeParser(conf); - -/* - * Parses the CTF JSON data and creates a parser that understands all of those - * types. - * - * data Parsed JSON data that maches that CTF JSON - * specification. - * - * conf The configuration object to create a new CTypeParser - * from. - */ -CTypeParser parseCTF(data, conf); - -/* - * This is what we were born to do. We read the data from a buffer and return it - * in an object whose keys match the values from the object. - * - * def The array definition of the data to read in - * - * buffer The buffer to read data from - * - * offset The offset to start writing to - * - * Returns an object where each key corresponds to an entry in def and the value - * is the read value. - */ -Object CTypeParser.readData(<Type Definition>, buffer, offset); - -/* - * This is the second half of what we were born to do, write out the data - * itself. - * - * def The array definition of the data to write out with - * values - * - * buffer The buffer to write to - * - * offset The offset in the buffer to write to - */ -void CTypeParser.writeData(<Type Definition>, buffer, offset); - -/* - * A user has requested to add a type, let us honor their request. Yet, if their - * request doth spurn us, send them unto the Hells which Dante describes. - * - * name The string for the type definition we're adding - * - * value Either a string that is a type/array name or an object - * that describes a struct. - */ -void CTypeParser.prototype.typedef(name, value); - -Object CTypeParser.prototype.lstypes(); - -/* - * Get the endian value for the current parser - */ -String CTypeParser.prototype.getEndian(); - -/* - * Sets the current endian value for the Parser. If the value is not valid, - * throws an Error. - * - * endian Either 'big' or 'little' do determine the endianness we - * want to read from or write to. - * - */ -void CTypeParser.protoype.setEndian(String); - -/* - * Attempts to convert an array of two integers returned from rsint64 / ruint64 - * into an absolute 64 bit number. If however the value would exceed 2^52 this - * will instead throw an error. The mantissa in a double is a 52 bit number and - * rather than potentially give you a value that is an approximation this will - * error. If you would rather an approximation, please see toApprox64. - * - * val An array of two 32-bit integers - */ -Number function toAbs64(val) - -/* - * Will return the 64 bit value as returned in an array from rsint64 / ruint64 - * to a value as close as it can. Note that Javascript stores all numbers as a - * double and the mantissa only has 52 bits. Thus this version may approximate - * the value. - * - * val An array of two 32-bit integers - */ -Number function toApprox64(val) - -Low Level API - -The following function are provided at the low level: - -Read unsigned integers from a buffer: -Number ruint8(buffer, endian, offset); -Number ruint16(buffer, endian, offset); -Number ruint32(buffer, endian, offset); -Number[] ruint64(buffer, endian, offset); - -Read signed integers from a buffer: -Number rsint8(buffer, endian, offset); -Number rsint16(buffer, endian, offset); -Number rsint32(buffer, endian, offset); -Number[] rsint64(buffer, endian, offset); - -Read floating point numbers from a buffer: -Number rfloat(buffer, endian, offset); /* IEEE-754 Single precision */ -Number rdouble(buffer, endian, offset); /* IEEE-754 Double precision */ - -Write unsigned integers to a buffer: -void wuint8(Number, endian, buffer, offset); -void wuint16(Number, endian, buffer, offset); -void wuint32(Number, endian, buffer, offset); -void wuint64(Number[], endian, buffer, offset); - -Write signed integers from a buffer: -void wsint8(Number, endian, buffer, offset); -void wsint16(Number, endian, buffer, offset); -void wsint32(Number, endian, buffer, offset); -void wsint64(Number[], endian, buffer offset); - -Write floating point numbers from a buffer: -void wfloat(Number, buffer, endian, offset); /* IEEE-754 Single precision */ -void wdouble(Number, buffer, endian, offset); /* IEEE-754 Double precision */ - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js deleted file mode 100644 index 66d5f735..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js +++ /dev/null @@ -1,245 +0,0 @@ -/* - * ctf.js - * - * Understand and parse all of the different JSON formats of CTF data and - * translate that into a series of node-ctype friendly pieces. The reason for - * the abstraction is to handle different changes in the file format. - * - * We have to be careful here that we don't end up using a name that is already - * a built in type. - */ -var mod_assert = require('assert'); -var ASSERT = mod_assert.ok; - -var ctf_versions = [ '1.0' ]; -var ctf_entries = [ 'integer', 'float', 'typedef', 'struct' ]; -var ctf_deftypes = [ 'int8_t', 'uint8_t', 'int16_t', 'uint16_t', 'int32_t', - 'uint32_t', 'float', 'double' ]; - -function ctfParseInteger(entry, ctype) -{ - var name, sign, len, type; - - name = entry['name']; - if (!('signed' in entry['integer'])) - throw (new Error('Malformed CTF JSON: integer missing ' + - 'signed value')); - - - if (!('length' in entry['integer'])) - throw (new Error('Malformed CTF JSON: integer missing ' + - 'length value')); - - sign = entry['integer']['signed']; - len = entry['integer']['length']; - type = null; - - if (sign && len == 1) - type = 'int8_t'; - else if (len == 1) - type = 'uint8_t'; - else if (sign && len == 2) - type = 'int16_t'; - else if (len == 2) - type = 'uint16_t'; - else if (sign && len == 4) - type = 'int32_t'; - else if (len == 4) - type = 'uint32_t'; - else if (sign && len == 8) - type = 'int64_t'; - else if (len == 8) - type = 'uint64_t'; - - if (type === null) - throw (new Error('Malformed CTF JSON: integer has ' + - 'unsupported length and sign - ' + len + '/' + sign)); - - /* - * This means that this is the same as one of our built in types. If - * that's the case defining it would be an error. So instead of trying - * to typedef it, we'll return here. - */ - if (name == type) - return; - - if (name == 'char') { - ASSERT(type == 'int8_t'); - return; - } - - ctype.typedef(name, type); -} - -function ctfParseFloat(entry, ctype) -{ - var name, len; - - name = entry['name']; - if (!('length' in entry['float'])) - throw (new Error('Malformed CTF JSON: float missing ' + - 'length value')); - - len = entry['float']['length']; - if (len != 4 && len != 8) - throw (new Error('Malformed CTF JSON: float has invalid ' + - 'length value')); - - if (len == 4) { - if (name == 'float') - return; - ctype.typedef(name, 'float'); - } else if (len == 8) { - if (name == 'double') - return; - ctype.typedef(name, 'double'); - } -} - -function ctfParseTypedef(entry, ctype) -{ - var name, type, ii; - - name = entry['name']; - if (typeof (entry['typedef']) != 'string') - throw (new Error('Malformed CTF JSON: typedef value in not ' + - 'a string')); - - type = entry['typedef']; - - /* - * We need to ensure that we're not looking at type that's one of our - * built in types. Traditionally in C a uint32_t would be a typedef to - * some kind of integer. However, those size types are built ins. - */ - for (ii = 0; ii < ctf_deftypes.length; ii++) { - if (name == ctf_deftypes[ii]) - return; - } - - ctype.typedef(name, type); -} - -function ctfParseStruct(entry, ctype) -{ - var name, type, ii, val, index, member, push; - - member = []; - if (!Array.isArray(entry['struct'])) - throw (new Error('Malformed CTF JSON: struct value is not ' + - 'an array')); - - for (ii = 0; ii < entry['struct'].length; ii++) { - val = entry['struct'][ii]; - if (!('name' in val)) - throw (new Error('Malformed CTF JSON: struct member ' + - 'missing name')); - - if (!('type' in val)) - throw (new Error('Malformed CTF JSON: struct member ' + - 'missing type')); - - if (typeof (val['name']) != 'string') - throw (new Error('Malformed CTF JSON: struct member ' + - 'name isn\'t a string')); - - if (typeof (val['type']) != 'string') - throw (new Error('Malformed CTF JSON: struct member ' + - 'type isn\'t a string')); - - /* - * CTF version 2 specifies array names as <type> [<num>] where - * as node-ctype does this as <type>[<num>]. - */ - name = val['name']; - type = val['type']; - index = type.indexOf(' ['); - if (index != -1) { - type = type.substring(0, index) + - type.substring(index + 1, type.length); - } - push = {}; - push[name] = { 'type': type }; - member.push(push); - } - - name = entry['name']; - ctype.typedef(name, member); -} - -function ctfParseEntry(entry, ctype) -{ - var ii, found; - - if (!('name' in entry)) - throw (new Error('Malformed CTF JSON: entry missing "name" ' + - 'section')); - - for (ii = 0; ii < ctf_entries.length; ii++) { - if (ctf_entries[ii] in entry) - found++; - } - - if (found === 0) - throw (new Error('Malformed CTF JSON: found no entries')); - - if (found >= 2) - throw (new Error('Malformed CTF JSON: found more than one ' + - 'entry')); - - if ('integer' in entry) { - ctfParseInteger(entry, ctype); - return; - } - - if ('float' in entry) { - ctfParseFloat(entry, ctype); - return; - } - - if ('typedef' in entry) { - ctfParseTypedef(entry, ctype); - return; - } - - if ('struct' in entry) { - ctfParseStruct(entry, ctype); - return; - } - - ASSERT(false, 'shouldn\'t reach here'); -} - -function ctfParseJson(json, ctype) -{ - var version, ii; - - ASSERT(json); - ASSERT(ctype); - if (!('metadata' in json)) - throw (new Error('Invalid CTF JSON: missing metadata section')); - - if (!('ctf2json_version' in json['metadata'])) - throw (new Error('Invalid CTF JSON: missing ctf2json_version')); - - version = json['metadata']['ctf2json_version']; - for (ii = 0; ii < ctf_versions.length; ii++) { - if (ctf_versions[ii] == version) - break; - } - - if (ii == ctf_versions.length) - throw (new Error('Unsuported ctf2json_version: ' + version)); - - if (!('data' in json)) - throw (new Error('Invalid CTF JSON: missing data section')); - - if (!Array.isArray(json['data'])) - throw (new Error('Malformed CTF JSON: data section is not ' + - 'an array')); - - for (ii = 0; ii < json['data'].length; ii++) - ctfParseEntry(json['data'][ii], ctype); -} - -exports.ctfParseJson = ctfParseJson; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js deleted file mode 100644 index 62c5d7b2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js +++ /dev/null @@ -1,1485 +0,0 @@ -/* - * rm - Feb 2011 - * ctio.js: - * - * A simple way to read and write simple ctypes. Of course, as you'll find the - * code isn't as simple as it might appear. The following types are currently - * supported in big and little endian formats: - * - * uint8_t int8_t - * uint16_t int16_t - * uint32_t int32_t - * float (single precision IEEE 754) - * double (double precision IEEE 754) - * - * This is designed to work in Node and v8. It may in fact work in other - * Javascript interpreters (that'd be pretty neat), but it hasn't been tested. - * If you find that it does in fact work, that's pretty cool. Try and pass word - * back to the original author. - * - * Note to the reader: If you're tabstop isn't set to 8, parts of this may look - * weird. - */ - -/* - * Numbers in Javascript have a secret: all numbers must be represented with an - * IEEE-754 double. The double has a mantissa with a length of 52 bits with an - * implicit one. Thus the range of integers that can be represented is limited - * to the size of the mantissa, this makes reading and writing 64-bit integers - * difficult, but far from impossible. - * - * Another side effect of this representation is what happens when you use the - * bitwise operators, i.e. shift left, shift right, and, or, etc. In Javascript, - * each operand and the result is cast to a signed 32-bit number. However, in - * the case of >>> the values are cast to an unsigned number. - */ - -/* - * A reminder on endian related issues: - * - * Big Endian: MSB -> First byte - * Little Endian: MSB->Last byte - */ -var mod_assert = require('assert'); - -/* - * An 8 bit unsigned integer involves doing no significant work. - */ -function ruint8(buffer, endian, offset) -{ - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - return (buffer[offset]); -} - -/* - * For 16 bit unsigned numbers we can do all the casting that we want to do. - */ -function rgint16(buffer, endian, offset) -{ - var val = 0; - - if (endian == 'big') { - val = buffer[offset] << 8; - val |= buffer[offset+1]; - } else { - val = buffer[offset]; - val |= buffer[offset+1] << 8; - } - - return (val); - -} - -function ruint16(buffer, endian, offset) -{ - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 1 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - return (rgint16(buffer, endian, offset)); -} - -/* - * Because most bitshifting is done using signed numbers, if we would go into - * the realm where we use that 32nd bit, we'll end up going into the negative - * range. i.e.: - * > 200 << 24 - * -939524096 - * - * Not the value you'd expect. To work around this, we end up having to do some - * abuse of the JavaScript standard. in this case, we know that a >>> shift is - * defined to cast our value to an *unsigned* 32-bit number. Because of that, we - * use that instead to save us some additional math, though it does feel a - * little weird and it isn't obvious as to why you woul dwant to do this at - * first. - */ -function rgint32(buffer, endian, offset) -{ - var val = 0; - - if (endian == 'big') { - val = buffer[offset+1] << 16; - val |= buffer[offset+2] << 8; - val |= buffer[offset+3]; - val = val + (buffer[offset] << 24 >>> 0); - } else { - val = buffer[offset+2] << 16; - val |= buffer[offset+1] << 8; - val |= buffer[offset]; - val = val + (buffer[offset + 3] << 24 >>> 0); - } - - return (val); -} - -function ruint32(buffer, endian, offset) -{ - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 3 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - return (rgint32(buffer, endian, offset)); -} - -/* - * Reads a 64-bit unsigned number. The astue observer will note that this - * doesn't quite work. Javascript has chosen to only have numbers that can be - * represented by a double. A double only has 52 bits of mantissa with an - * implicit 1, thus we have up to 53 bits to represent an integer. However, 2^53 - * doesn't quite give us what we want. Isn't 53 bits enough for anyone? What - * could you have possibly wanted to represent that was larger than that? Oh, - * maybe a size? You mean we bypassed the 4 GB limit on file sizes, when did - * that happen? - * - * To get around this egregious language issue, we're going to instead construct - * an array of two 32 bit unsigned integers. Where arr[0] << 32 + arr[1] would - * give the actual number. However, note that the above code probably won't - * produce the desired results because of the way Javascript numbers are - * doubles. - */ -function rgint64(buffer, endian, offset) -{ - var val = new Array(2); - - if (endian == 'big') { - val[0] = ruint32(buffer, endian, offset); - val[1] = ruint32(buffer, endian, offset+4); - } else { - val[0] = ruint32(buffer, endian, offset+4); - val[1] = ruint32(buffer, endian, offset); - } - - return (val); -} - -function ruint64(buffer, endian, offset) -{ - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 7 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - return (rgint64(buffer, endian, offset)); -} - - -/* - * Signed integer types, yay team! A reminder on how two's complement actually - * works. The first bit is the signed bit, i.e. tells us whether or not the - * number should be positive or negative. If the two's complement value is - * positive, then we're done, as it's equivalent to the unsigned representation. - * - * Now if the number is positive, you're pretty much done, you can just leverage - * the unsigned translations and return those. Unfortunately, negative numbers - * aren't quite that straightforward. - * - * At first glance, one might be inclined to use the traditional formula to - * translate binary numbers between the positive and negative values in two's - * complement. (Though it doesn't quite work for the most negative value) - * Mainly: - * - invert all the bits - * - add one to the result - * - * Of course, this doesn't quite work in Javascript. Take for example the value - * of -128. This could be represented in 16 bits (big-endian) as 0xff80. But of - * course, Javascript will do the following: - * - * > ~0xff80 - * -65409 - * - * Whoh there, Javascript, that's not quite right. But wait, according to - * Javascript that's perfectly correct. When Javascript ends up seeing the - * constant 0xff80, it has no notion that it is actually a signed number. It - * assumes that we've input the unsigned value 0xff80. Thus, when it does the - * binary negation, it casts it into a signed value, (positive 0xff80). Then - * when you perform binary negation on that, it turns it into a negative number. - * - * Instead, we're going to have to use the following general formula, that works - * in a rather Javascript friendly way. I'm glad we don't support this kind of - * weird numbering scheme in the kernel. - * - * (BIT-MAX - (unsigned)val + 1) * -1 - * - * The astute observer, may think that this doesn't make sense for 8-bit numbers - * (really it isn't necessary for them). However, when you get 16-bit numbers, - * you do. Let's go back to our prior example and see how this will look: - * - * (0xffff - 0xff80 + 1) * -1 - * (0x007f + 1) * -1 - * (0x0080) * -1 - * - * Doing it this way ends up allowing us to treat it appropriately in - * Javascript. Sigh, that's really quite ugly for what should just be a few bit - * shifts, ~ and &. - */ - -/* - * Endianness doesn't matter for 8-bit signed values. We could in fact optimize - * this case because the more traditional methods work, but for consistency, - * we'll keep doing this the same way. - */ -function rsint8(buffer, endian, offset) -{ - var neg; - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - neg = buffer[offset] & 0x80; - if (!neg) - return (buffer[offset]); - - return ((0xff - buffer[offset] + 1) * -1); -} - -/* - * The 16-bit version requires a bit more effort. In this case, we can leverage - * our unsigned code to generate the value we want to return. - */ -function rsint16(buffer, endian, offset) -{ - var neg, val; - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 1 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = rgint16(buffer, endian, offset); - neg = val & 0x8000; - if (!neg) - return (val); - - return ((0xffff - val + 1) * -1); -} - -/* - * We really shouldn't leverage our 32-bit code here and instead utilize the - * fact that we know that since these are signed numbers, we can do all the - * shifting and binary anding to generate the 32-bit number. But, for - * consistency we'll do the same. If we want to do otherwise, we should instead - * make the 32 bit unsigned code do the optimization. But as long as there - * aren't floats secretly under the hood for that, we /should/ be okay. - */ -function rsint32(buffer, endian, offset) -{ - var neg, val; - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 3 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = rgint32(buffer, endian, offset); - neg = val & 0x80000000; - if (!neg) - return (val); - - return ((0xffffffff - val + 1) * -1); -} - -/* - * The signed version of this code suffers from all of the same problems of the - * other 64 bit version. - */ -function rsint64(buffer, endian, offset) -{ - var neg, val; - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 3 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = rgint64(buffer, endian, offset); - neg = val[0] & 0x80000000; - - if (!neg) - return (val); - - val[0] = (0xffffffff - val[0]) * -1; - val[1] = (0xffffffff - val[1] + 1) * -1; - - /* - * If we had the key 0x8000000000000000, that would leave the lower 32 - * bits as 0xffffffff, however, since we're goint to add one, that would - * actually leave the lower 32-bits as 0x100000000, which would break - * our ability to write back a value that we received. To work around - * this, if we actually get that value, we're going to bump the upper - * portion by 1 and set this to zero. - */ - mod_assert.ok(val[1] <= 0x100000000); - if (val[1] == -0x100000000) { - val[1] = 0; - val[0]--; - } - - return (val); -} - -/* - * We now move onto IEEE 754: The traditional form for floating point numbers - * and what is secretly hiding at the heart of everything in this. I really hope - * that someone is actually using this, as otherwise, this effort is probably - * going to be more wasted. - * - * One might be tempted to use parseFloat here, but that wouldn't work at all - * for several reasons. Mostly due to the way floats actually work, and - * parseFloat only actually works in base 10. I don't see base 10 anywhere near - * this file. - * - * In this case we'll implement the single and double precision versions. The - * quadruple precision, while probably useful, wouldn't really be accepted by - * Javascript, so let's not even waste our time. - * - * So let's review how this format looks like. A single precision value is 32 - * bits and has three parts: - * - Sign bit - * - Exponent (Using bias notation) - * - Mantissa - * - * |s|eeeeeeee|mmmmmmmmmmmmmmmmmmmmmmmmm| - * 31| 30-23 | 22 - 0 | - * - * The exponent is stored in a biased input. The bias in this case 127. - * Therefore, our exponent is equal to the 8-bit value - 127. - * - * By default, a number is normalized in IEEE, that means that the mantissa has - * an implicit one that we don't see. So really the value stored is 1.m. - * However, if the exponent is all zeros, then instead we have to shift - * everything to the right one and there is no more implicit one. - * - * Special values: - * - Positive Infinity: - * Sign: 0 - * Exponent: All 1s - * Mantissa: 0 - * - Negative Infinity: - * Sign: 1 - * Exponent: All 1s - * Mantissa: 0 - * - NaN: - * Sign: * - * Exponent: All 1s - * Mantissa: non-zero - * - Zero: - * Sign: * - * Exponent: All 0s - * Mantissa: 0 - * - * In the case of zero, the sign bit determines whether we get a positive or - * negative zero. However, since Javascript cannot determine the difference - * between the two: i.e. -0 == 0, we just always return 0. - * - */ -function rfloat(buffer, endian, offset) -{ - var bytes = []; - var sign, exponent, mantissa, val; - var bias = 127; - var maxexp = 0xff; - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 3 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - /* Normalize the bytes to be in endian order */ - if (endian == 'big') { - bytes[0] = buffer[offset]; - bytes[1] = buffer[offset+1]; - bytes[2] = buffer[offset+2]; - bytes[3] = buffer[offset+3]; - } else { - bytes[3] = buffer[offset]; - bytes[2] = buffer[offset+1]; - bytes[1] = buffer[offset+2]; - bytes[0] = buffer[offset+3]; - } - - sign = bytes[0] & 0x80; - exponent = (bytes[0] & 0x7f) << 1; - exponent |= (bytes[1] & 0x80) >>> 7; - mantissa = (bytes[1] & 0x7f) << 16; - mantissa |= bytes[2] << 8; - mantissa |= bytes[3]; - - /* Check for special cases before we do general parsing */ - if (!sign && exponent == maxexp && mantissa === 0) - return (Number.POSITIVE_INFINITY); - - if (sign && exponent == maxexp && mantissa === 0) - return (Number.NEGATIVE_INFINITY); - - if (exponent == maxexp && mantissa !== 0) - return (Number.NaN); - - /* - * Javascript really doesn't have support for positive or negative zero. - * So we're not going to try and give it to you. That would be just - * plain weird. Besides -0 == 0. - */ - if (exponent === 0 && mantissa === 0) - return (0); - - /* - * Now we can deal with the bias and the determine whether the mantissa - * has the implicit one or not. - */ - exponent -= bias; - if (exponent == -bias) { - exponent++; - val = 0; - } else { - val = 1; - } - - val = (val + mantissa * Math.pow(2, -23)) * Math.pow(2, exponent); - - if (sign) - val *= -1; - - return (val); -} - -/* - * Doubles in IEEE 754 are like their brothers except for a few changes and - * increases in size: - * - The exponent is now 11 bits - * - The mantissa is now 52 bits - * - The bias is now 1023 - * - * |s|eeeeeeeeeee|mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm| - * 63| 62 - 52 | 51 - 0 | - * 63| 62 - 52 | 51 - 0 | - * - * While the size has increased a fair amount, we're going to end up keeping the - * same general formula for calculating the final value. As a reminder, this - * formula is: - * - * (-1)^s * (n + m) * 2^(e-b) - * - * Where: - * s is the sign bit - * n is (exponent > 0) ? 1 : 0 -- Determines whether we're normalized - * or not - * m is the mantissa - * e is the exponent specified - * b is the bias for the exponent - * - */ -function rdouble(buffer, endian, offset) -{ - var bytes = []; - var sign, exponent, mantissa, val, lowmant; - var bias = 1023; - var maxexp = 0x7ff; - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 7 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - /* Normalize the bytes to be in endian order */ - if (endian == 'big') { - bytes[0] = buffer[offset]; - bytes[1] = buffer[offset+1]; - bytes[2] = buffer[offset+2]; - bytes[3] = buffer[offset+3]; - bytes[4] = buffer[offset+4]; - bytes[5] = buffer[offset+5]; - bytes[6] = buffer[offset+6]; - bytes[7] = buffer[offset+7]; - } else { - bytes[7] = buffer[offset]; - bytes[6] = buffer[offset+1]; - bytes[5] = buffer[offset+2]; - bytes[4] = buffer[offset+3]; - bytes[3] = buffer[offset+4]; - bytes[2] = buffer[offset+5]; - bytes[1] = buffer[offset+6]; - bytes[0] = buffer[offset+7]; - } - - /* - * We can construct the exponent and mantissa the same way as we did in - * the case of a float, just increase the range of the exponent. - */ - sign = bytes[0] & 0x80; - exponent = (bytes[0] & 0x7f) << 4; - exponent |= (bytes[1] & 0xf0) >>> 4; - - /* - * This is going to be ugly but then again, we're dealing with IEEE 754. - * This could probably be done as a node add on in a few lines of C++, - * but oh we'll, we've made it this far so let's be native the rest of - * the way... - * - * What we're going to do is break the mantissa into two parts, the - * lower 24 bits and the upper 28 bits. We'll multiply the upper 28 bits - * by the appropriate power and then add in the lower 24-bits. Not - * really that great. It's pretty much a giant kludge to deal with - * Javascript eccentricities around numbers. - */ - lowmant = bytes[7]; - lowmant |= bytes[6] << 8; - lowmant |= bytes[5] << 16; - mantissa = bytes[4]; - mantissa |= bytes[3] << 8; - mantissa |= bytes[2] << 16; - mantissa |= (bytes[1] & 0x0f) << 24; - mantissa *= Math.pow(2, 24); /* Equivalent to << 24, but JS compat */ - mantissa += lowmant; - - /* Check for special cases before we do general parsing */ - if (!sign && exponent == maxexp && mantissa === 0) - return (Number.POSITIVE_INFINITY); - - if (sign && exponent == maxexp && mantissa === 0) - return (Number.NEGATIVE_INFINITY); - - if (exponent == maxexp && mantissa !== 0) - return (Number.NaN); - - /* - * Javascript really doesn't have support for positive or negative zero. - * So we're not going to try and give it to you. That would be just - * plain weird. Besides -0 == 0. - */ - if (exponent === 0 && mantissa === 0) - return (0); - - /* - * Now we can deal with the bias and the determine whether the mantissa - * has the implicit one or not. - */ - exponent -= bias; - if (exponent == -bias) { - exponent++; - val = 0; - } else { - val = 1; - } - - val = (val + mantissa * Math.pow(2, -52)) * Math.pow(2, exponent); - - if (sign) - val *= -1; - - return (val); -} - -/* - * Now that we have gone through the pain of reading the individual types, we're - * probably going to want some way to write these back. None of this is going to - * be good. But since we have Javascript numbers this should certainly be more - * interesting. Though we can constrain this end a little bit more in what is - * valid. For now, let's go back to our friends the unsigned value. - */ - -/* - * Unsigned numbers seem deceptively easy. Here are the general steps and rules - * that we are going to take: - * - If the number is negative, throw an Error - * - Truncate any floating point portion - * - Take the modulus of the number in our base - * - Write it out to the buffer in the endian format requested at the offset - */ - -/* - * We have to make sure that the value is a valid integer. This means that it is - * non-negative. It has no fractional component and that it does not exceed the - * maximum allowed value. - * - * value The number to check for validity - * - * max The maximum value - */ -function prepuint(value, max) -{ - if (typeof (value) != 'number') - throw (new (Error('cannot write a non-number as a number'))); - - if (value < 0) - throw (new Error('specified a negative value for writing an ' + - 'unsigned value')); - - if (value > max) - throw (new Error('value is larger than maximum value for ' + - 'type')); - - if (Math.floor(value) !== value) - throw (new Error('value has a fractional component')); - - return (value); -} - -/* - * 8-bit version, classy. We can ignore endianness which is good. - */ -function wuint8(value, endian, buffer, offset) -{ - var val; - - if (value === undefined) - throw (new Error('missing value')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = prepuint(value, 0xff); - buffer[offset] = val; -} - -/* - * Pretty much the same as the 8-bit version, just this time we need to worry - * about endian related issues. - */ -function wgint16(val, endian, buffer, offset) -{ - if (endian == 'big') { - buffer[offset] = (val & 0xff00) >>> 8; - buffer[offset+1] = val & 0x00ff; - } else { - buffer[offset+1] = (val & 0xff00) >>> 8; - buffer[offset] = val & 0x00ff; - } -} - -function wuint16(value, endian, buffer, offset) -{ - var val; - - if (value === undefined) - throw (new Error('missing value')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 1 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = prepuint(value, 0xffff); - wgint16(val, endian, buffer, offset); -} - -/* - * The 32-bit version is going to have to be a little different unfortunately. - * We can't quite bitshift to get the largest byte, because that would end up - * getting us caught by the signed values. - * - * And yes, we do want to subtract out the lower part by default. This means - * that when we do the division, it will be treated as a bit shift and we won't - * end up generating a floating point value. If we did generate a floating point - * value we'd have to truncate it intelligently, this saves us that problem and - * may even be somewhat faster under the hood. - */ -function wgint32(val, endian, buffer, offset) -{ - if (endian == 'big') { - buffer[offset] = (val - (val & 0x00ffffff)) / Math.pow(2, 24); - buffer[offset+1] = (val >>> 16) & 0xff; - buffer[offset+2] = (val >>> 8) & 0xff; - buffer[offset+3] = val & 0xff; - } else { - buffer[offset+3] = (val - (val & 0x00ffffff)) / - Math.pow(2, 24); - buffer[offset+2] = (val >>> 16) & 0xff; - buffer[offset+1] = (val >>> 8) & 0xff; - buffer[offset] = val & 0xff; - } -} - -function wuint32(value, endian, buffer, offset) -{ - var val; - - if (value === undefined) - throw (new Error('missing value')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 3 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = prepuint(value, 0xffffffff); - wgint32(val, endian, buffer, offset); -} - -/* - * Unlike the other versions, we expect the value to be in the form of two - * arrays where value[0] << 32 + value[1] would result in the value that we - * want. - */ -function wgint64(value, endian, buffer, offset) -{ - if (endian == 'big') { - wgint32(value[0], endian, buffer, offset); - wgint32(value[1], endian, buffer, offset+4); - } else { - wgint32(value[0], endian, buffer, offset+4); - wgint32(value[1], endian, buffer, offset); - } -} - -function wuint64(value, endian, buffer, offset) -{ - if (value === undefined) - throw (new Error('missing value')); - - if (!(value instanceof Array)) - throw (new Error('value must be an array')); - - if (value.length != 2) - throw (new Error('value must be an array of length 2')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 7 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - prepuint(value[0], 0xffffffff); - prepuint(value[1], 0xffffffff); - wgint64(value, endian, buffer, offset); -} - -/* - * We now move onto our friends in the signed number category. Unlike unsigned - * numbers, we're going to have to worry a bit more about how we put values into - * arrays. Since we are only worrying about signed 32-bit values, we're in - * slightly better shape. Unfortunately, we really can't do our favorite binary - * & in this system. It really seems to do the wrong thing. For example: - * - * > -32 & 0xff - * 224 - * - * What's happening above is really: 0xe0 & 0xff = 0xe0. However, the results of - * this aren't treated as a signed number. Ultimately a bad thing. - * - * What we're going to want to do is basically create the unsigned equivalent of - * our representation and pass that off to the wuint* functions. To do that - * we're going to do the following: - * - * - if the value is positive - * we can pass it directly off to the equivalent wuint - * - if the value is negative - * we do the following computation: - * mb + val + 1, where - * mb is the maximum unsigned value in that byte size - * val is the Javascript negative integer - * - * - * As a concrete value, take -128. In signed 16 bits this would be 0xff80. If - * you do out the computations: - * - * 0xffff - 128 + 1 - * 0xffff - 127 - * 0xff80 - * - * You can then encode this value as the signed version. This is really rather - * hacky, but it should work and get the job done which is our goal here. - * - * Thus the overall flow is: - * - Truncate the floating point part of the number - * - We don't have to take the modulus, because the unsigned versions will - * take care of that for us. And we don't have to worry about that - * potentially causing bad things to happen because of sign extension - * - Pass it off to the appropriate unsigned version, potentially modifying - * the negative portions as necessary. - */ - -/* - * A series of checks to make sure we actually have a signed 32-bit number - */ -function prepsint(value, max, min) -{ - if (typeof (value) != 'number') - throw (new (Error('cannot write a non-number as a number'))); - - if (value > max) - throw (new Error('value larger than maximum allowed value')); - - if (value < min) - throw (new Error('value smaller than minimum allowed value')); - - if (Math.floor(value) !== value) - throw (new Error('value has a fractional component')); - - return (value); -} - -/* - * The 8-bit version of the signed value. Overall, fairly straightforward. - */ -function wsint8(value, endian, buffer, offset) -{ - var val; - - if (value === undefined) - throw (new Error('missing value')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = prepsint(value, 0x7f, -0x80); - if (val >= 0) - wuint8(val, endian, buffer, offset); - else - wuint8(0xff + val + 1, endian, buffer, offset); -} - -/* - * The 16-bit version of the signed value. Also, fairly straightforward. - */ -function wsint16(value, endian, buffer, offset) -{ - var val; - - if (value === undefined) - throw (new Error('missing value')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 1 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = prepsint(value, 0x7fff, -0x8000); - if (val >= 0) - wgint16(val, endian, buffer, offset); - else - wgint16(0xffff + val + 1, endian, buffer, offset); - -} - -/* - * We can do this relatively easily by leveraging the code used for 32-bit - * unsigned code. - */ -function wsint32(value, endian, buffer, offset) -{ - var val; - - if (value === undefined) - throw (new Error('missing value')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 3 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - val = prepsint(value, 0x7fffffff, -0x80000000); - if (val >= 0) - wgint32(val, endian, buffer, offset); - else - wgint32(0xffffffff + val + 1, endian, buffer, offset); -} - -/* - * The signed 64 bit integer should by in the same format as when received. - * Mainly it should ensure that the value is an array of two integers where - * value[0] << 32 + value[1] is the desired number. Furthermore, the two values - * need to be equal. - */ -function wsint64(value, endian, buffer, offset) -{ - var vzpos, vopos; - var vals = new Array(2); - - if (value === undefined) - throw (new Error('missing value')); - - if (!(value instanceof Array)) - throw (new Error('value must be an array')); - - if (value.length != 2) - throw (new Error('value must be an array of length 2')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - if (offset + 7 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - /* - * We need to make sure that we have the same sign on both values. The - * hokiest way to to do this is to multiply the number by +inf. If we do - * this, we'll get either +/-inf depending on the sign of the value. - * Once we have this, we can compare it to +inf to see if the number is - * positive or not. - */ - vzpos = (value[0] * Number.POSITIVE_INFINITY) == - Number.POSITIVE_INFINITY; - vopos = (value[1] * Number.POSITIVE_INFINITY) == - Number.POSITIVE_INFINITY; - - /* - * If either of these is zero, then we don't actually need this check. - */ - if (value[0] != 0 && value[1] != 0 && vzpos != vopos) - throw (new Error('Both entries in the array must have ' + - 'the same sign')); - - /* - * Doing verification for a signed 64-bit integer is actually a big - * trickier than it appears. We can't quite use our standard techniques - * because we need to compare both sets of values. The first value is - * pretty straightforward. If the first value is beond the extremes than - * we error out. However, the valid range of the second value varies - * based on the first one. If the first value is negative, and *not* the - * largest negative value, than it can be any integer within the range [ - * 0, 0xffffffff ]. If it is the largest negative number, it must be - * zero. - * - * If the first number is positive, than it doesn't matter what the - * value is. We just simply have to make sure we have a valid positive - * integer. - */ - if (vzpos) { - prepuint(value[0], 0x7fffffff); - prepuint(value[1], 0xffffffff); - } else { - prepsint(value[0], 0, -0x80000000); - prepsint(value[1], 0, -0xffffffff); - if (value[0] == -0x80000000 && value[1] != 0) - throw (new Error('value smaller than minimum ' + - 'allowed value')); - } - - /* Fix negative numbers */ - if (value[0] < 0 || value[1] < 0) { - vals[0] = 0xffffffff - Math.abs(value[0]); - vals[1] = 0x100000000 - Math.abs(value[1]); - if (vals[1] == 0x100000000) { - vals[1] = 0; - vals[0]++; - } - } else { - vals[0] = value[0]; - vals[1] = value[1]; - } - wgint64(vals, endian, buffer, offset); -} - -/* - * Now we are moving onto the weirder of these, the float and double. For this - * we're going to just have to do something that's pretty weird. First off, we - * have no way to get at the underlying float representation, at least not - * easily. But that doesn't mean we can't figure it out, we just have to use our - * heads. - * - * One might propose to use Number.toString(2). Of course, this is not really - * that good, because the ECMAScript 262 v3 Standard says the following Section - * 15.7.4.2-Number.prototype.toString (radix): - * - * If radix is an integer from 2 to 36, but not 10, the result is a string, the - * choice of which is implementation-dependent. - * - * Well that doesn't really help us one bit now does it? We could use the - * standard base 10 version of the string, but that's just going to create more - * errors as we end up trying to convert it back to a binary value. So, really - * this just means we have to be non-lazy and parse the structure intelligently. - * - * First off, we can do the basic checks: NaN, positive and negative infinity. - * - * Now that those are done we can work backwards to generate the mantissa and - * exponent. - * - * The first thing we need to do is determine the sign bit, easy to do, check - * whether the value is less than 0. And convert the number to its absolute - * value representation. Next, we need to determine if the value is less than - * one or greater than or equal to one and from there determine what power was - * used to get there. What follows is now specific to floats, though the general - * ideas behind this will hold for doubles as well, but the exact numbers - * involved will change. - * - * Once we have that power we can determine the exponent and the mantissa. Call - * the value that has the number of bits to reach the power ebits. In the - * general case they have the following values: - * - * exponent 127 + ebits - * mantissa value * 2^(23 - ebits) & 0x7fffff - * - * In the case where the value of ebits is <= -127 we are now in the case where - * we no longer have normalized numbers. In this case the values take on the - * following values: - * - * exponent 0 - * mantissa value * 2^149 & 0x7fffff - * - * Once we have the values for the sign, mantissa, and exponent. We reconstruct - * the four bytes as follows: - * - * byte0 sign bit and seven most significant bits from the exp - * sign << 7 | (exponent & 0xfe) >>> 1 - * - * byte1 lsb from the exponent and 7 top bits from the mantissa - * (exponent & 0x01) << 7 | (mantissa & 0x7f0000) >>> 16 - * - * byte2 bits 8-15 (zero indexing) from mantissa - * mantissa & 0xff00 >> 8 - * - * byte3 bits 0-7 from mantissa - * mantissa & 0xff - * - * Once we have this we have to assign them into the buffer in proper endian - * order. - */ - -/* - * Compute the log base 2 of the value. Now, someone who remembers basic - * properties of logarithms will point out that we could use the change of base - * formula for logs, and in fact that would be astute, because that's what we'll - * do for now. It feels cleaner, albeit it may be less efficient than just - * iterating and dividing by 2. We may want to come back and revisit that some - * day. - */ -function log2(value) -{ - return (Math.log(value) / Math.log(2)); -} - -/* - * Helper to determine the exponent of the number we're looking at. - */ -function intexp(value) -{ - return (Math.floor(log2(value))); -} - -/* - * Helper to determine the exponent of the fractional part of the value. - */ -function fracexp(value) -{ - return (Math.floor(log2(value))); -} - -function wfloat(value, endian, buffer, offset) -{ - var sign, exponent, mantissa, ebits; - var bytes = []; - - if (value === undefined) - throw (new Error('missing value')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - - if (offset + 3 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - if (isNaN(value)) { - sign = 0; - exponent = 0xff; - mantissa = 23; - } else if (value == Number.POSITIVE_INFINITY) { - sign = 0; - exponent = 0xff; - mantissa = 0; - } else if (value == Number.NEGATIVE_INFINITY) { - sign = 1; - exponent = 0xff; - mantissa = 0; - } else { - /* Well we have some work to do */ - - /* Thankfully the sign bit is trivial */ - if (value < 0) { - sign = 1; - value = Math.abs(value); - } else { - sign = 0; - } - - /* Use the correct function to determine number of bits */ - if (value < 1) - ebits = fracexp(value); - else - ebits = intexp(value); - - /* Time to deal with the issues surrounding normalization */ - if (ebits <= -127) { - exponent = 0; - mantissa = (value * Math.pow(2, 149)) & 0x7fffff; - } else { - exponent = 127 + ebits; - mantissa = value * Math.pow(2, 23 - ebits); - mantissa &= 0x7fffff; - } - } - - bytes[0] = sign << 7 | (exponent & 0xfe) >>> 1; - bytes[1] = (exponent & 0x01) << 7 | (mantissa & 0x7f0000) >>> 16; - bytes[2] = (mantissa & 0x00ff00) >>> 8; - bytes[3] = mantissa & 0x0000ff; - - if (endian == 'big') { - buffer[offset] = bytes[0]; - buffer[offset+1] = bytes[1]; - buffer[offset+2] = bytes[2]; - buffer[offset+3] = bytes[3]; - } else { - buffer[offset] = bytes[3]; - buffer[offset+1] = bytes[2]; - buffer[offset+2] = bytes[1]; - buffer[offset+3] = bytes[0]; - } -} - -/* - * Now we move onto doubles. Doubles are similar to floats in pretty much all - * ways except that the processing isn't quite as straightforward because we - * can't always use shifting, i.e. we have > 32 bit values. - * - * We're going to proceed in an identical fashion to floats and utilize the same - * helper functions. All that really is changing are the specific values that we - * use to do the calculations. Thus, to review we have to do the following. - * - * First get the sign bit and convert the value to its absolute value - * representation. Next, we determine the number of bits that we used to get to - * the value, branching whether the value is greater than or less than 1. Once - * we have that value which we will again call ebits, we have to do the - * following in the general case: - * - * exponent 1023 + ebits - * mantissa [value * 2^(52 - ebits)] % 2^52 - * - * In the case where the value of ebits <= -1023 we no longer use normalized - * numbers, thus like with floats we have to do slightly different processing: - * - * exponent 0 - * mantissa [value * 2^1074] % 2^52 - * - * Once we have determined the sign, exponent and mantissa we can construct the - * bytes as follows: - * - * byte0 sign bit and seven most significant bits form the exp - * sign << 7 | (exponent & 0x7f0) >>> 4 - * - * byte1 Remaining 4 bits from the exponent and the four most - * significant bits from the mantissa 48-51 - * (exponent & 0x00f) << 4 | mantissa >>> 48 - * - * byte2 Bits 40-47 from the mantissa - * (mantissa >>> 40) & 0xff - * - * byte3 Bits 32-39 from the mantissa - * (mantissa >>> 32) & 0xff - * - * byte4 Bits 24-31 from the mantissa - * (mantissa >>> 24) & 0xff - * - * byte5 Bits 16-23 from the Mantissa - * (mantissa >>> 16) & 0xff - * - * byte6 Bits 8-15 from the mantissa - * (mantissa >>> 8) & 0xff - * - * byte7 Bits 0-7 from the mantissa - * mantissa & 0xff - * - * Now we can't quite do the right shifting that we want in bytes 1 - 3, because - * we'll have extended too far and we'll lose those values when we try and do - * the shift. Instead we have to use an alternate approach. To try and stay out - * of floating point, what we'll do is say that mantissa -= bytes[4-7] and then - * divide by 2^32. Once we've done that we can use binary arithmetic. Oof, - * that's ugly, but it seems to avoid using floating point (just based on how v8 - * seems to be optimizing for base 2 arithmetic). - */ -function wdouble(value, endian, buffer, offset) -{ - var sign, exponent, mantissa, ebits; - var bytes = []; - - if (value === undefined) - throw (new Error('missing value')); - - if (endian === undefined) - throw (new Error('missing endian')); - - if (buffer === undefined) - throw (new Error('missing buffer')); - - if (offset === undefined) - throw (new Error('missing offset')); - - - if (offset + 7 >= buffer.length) - throw (new Error('Trying to read beyond buffer length')); - - if (isNaN(value)) { - sign = 0; - exponent = 0x7ff; - mantissa = 23; - } else if (value == Number.POSITIVE_INFINITY) { - sign = 0; - exponent = 0x7ff; - mantissa = 0; - } else if (value == Number.NEGATIVE_INFINITY) { - sign = 1; - exponent = 0x7ff; - mantissa = 0; - } else { - /* Well we have some work to do */ - - /* Thankfully the sign bit is trivial */ - if (value < 0) { - sign = 1; - value = Math.abs(value); - } else { - sign = 0; - } - - /* Use the correct function to determine number of bits */ - if (value < 1) - ebits = fracexp(value); - else - ebits = intexp(value); - - /* - * This is a total hack to determine a denormalized value. - * Unfortunately, we sometimes do not get a proper value for - * ebits, i.e. we lose the values that would get rounded off. - * - * - * The astute observer may wonder why we would be - * multiplying by two Math.pows rather than just summing - * them. Well, that's to get around a small bug in the - * way v8 seems to implement the function. On occasion - * doing: - * - * foo * Math.pow(2, 1023 + 51) - * - * Causes us to overflow to infinity, where as doing: - * - * foo * Math.pow(2, 1023) * Math.pow(2, 51) - * - * Does not cause us to overflow. Go figure. - * - */ - if (value <= 2.225073858507201e-308 || ebits <= -1023) { - exponent = 0; - mantissa = value * Math.pow(2, 1023) * Math.pow(2, 51); - mantissa %= Math.pow(2, 52); - } else { - /* - * We might have gotten fucked by our floating point - * logarithm magic. This is rather crappy, but that's - * our luck. If we just had a log base 2 or access to - * the stupid underlying representation this would have - * been much easier and we wouldn't have such stupid - * kludges or hacks. - */ - if (ebits > 1023) - ebits = 1023; - exponent = 1023 + ebits; - mantissa = value * Math.pow(2, -ebits); - mantissa *= Math.pow(2, 52); - mantissa %= Math.pow(2, 52); - } - } - - /* Fill the bytes in backwards to deal with the size issues */ - bytes[7] = mantissa & 0xff; - bytes[6] = (mantissa >>> 8) & 0xff; - bytes[5] = (mantissa >>> 16) & 0xff; - mantissa = (mantissa - (mantissa & 0xffffff)) / Math.pow(2, 24); - bytes[4] = mantissa & 0xff; - bytes[3] = (mantissa >>> 8) & 0xff; - bytes[2] = (mantissa >>> 16) & 0xff; - bytes[1] = (exponent & 0x00f) << 4 | mantissa >>> 24; - bytes[0] = (sign << 7) | (exponent & 0x7f0) >>> 4; - - if (endian == 'big') { - buffer[offset] = bytes[0]; - buffer[offset+1] = bytes[1]; - buffer[offset+2] = bytes[2]; - buffer[offset+3] = bytes[3]; - buffer[offset+4] = bytes[4]; - buffer[offset+5] = bytes[5]; - buffer[offset+6] = bytes[6]; - buffer[offset+7] = bytes[7]; - } else { - buffer[offset+7] = bytes[0]; - buffer[offset+6] = bytes[1]; - buffer[offset+5] = bytes[2]; - buffer[offset+4] = bytes[3]; - buffer[offset+3] = bytes[4]; - buffer[offset+2] = bytes[5]; - buffer[offset+1] = bytes[6]; - buffer[offset] = bytes[7]; - } -} - -/* - * Actually export our work above. One might argue that we shouldn't expose - * these interfaces and just force people to use the higher level abstractions - * around this work. However, unlike say other libraries we've come across, this - * interface has several properties: it makes sense, it's simple, and it's - * useful. - */ -exports.ruint8 = ruint8; -exports.ruint16 = ruint16; -exports.ruint32 = ruint32; -exports.ruint64 = ruint64; -exports.wuint8 = wuint8; -exports.wuint16 = wuint16; -exports.wuint32 = wuint32; -exports.wuint64 = wuint64; - -exports.rsint8 = rsint8; -exports.rsint16 = rsint16; -exports.rsint32 = rsint32; -exports.rsint64 = rsint64; -exports.wsint8 = wsint8; -exports.wsint16 = wsint16; -exports.wsint32 = wsint32; -exports.wsint64 = wsint64; - -exports.rfloat = rfloat; -exports.rdouble = rdouble; -exports.wfloat = wfloat; -exports.wdouble = wdouble; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js deleted file mode 100644 index 7d2f4a5a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js +++ /dev/null @@ -1,944 +0,0 @@ -/* - * rm - Feb 2011 - * ctype.js - * - * This module provides a simple abstraction towards reading and writing - * different types of binary data. It is designed to use ctio.js and provide a - * richer and more expressive API on top of it. - * - * By default we support the following as built in basic types: - * int8_t - * int16_t - * int32_t - * uint8_t - * uint16_t - * uint32_t - * uint64_t - * float - * double - * char - * char[] - * - * Each type is returned as a Number, with the exception of char and char[] - * which are returned as Node Buffers. A char is considered a uint8_t. - * - * Requests to read and write data are specified as an array of JSON objects. - * This is also the same way that one declares structs. Even if just a single - * value is requested, it must be done as a struct. The array order determines - * the order that we try and read values. Each entry has the following format - * with values marked with a * being optional. - * - * { key: { type: /type/, value*: /value/, offset*: /offset/ } - * - * If offset is defined, we lseek(offset, SEEK_SET) before reading the next - * value. Value is defined when we're writing out data, otherwise it's ignored. - * - */ - -var mod_ctf = require('./ctf.js'); -var mod_ctio = require('./ctio.js'); -var mod_assert = require('assert'); - -/* - * This is the set of basic types that we support. - * - * read The function to call to read in a value from a buffer - * - * write The function to call to write a value to a buffer - * - */ -var deftypes = { - 'uint8_t': { read: ctReadUint8, write: ctWriteUint8 }, - 'uint16_t': { read: ctReadUint16, write: ctWriteUint16 }, - 'uint32_t': { read: ctReadUint32, write: ctWriteUint32 }, - 'uint64_t': { read: ctReadUint64, write: ctWriteUint64 }, - 'int8_t': { read: ctReadSint8, write: ctWriteSint8 }, - 'int16_t': { read: ctReadSint16, write: ctWriteSint16 }, - 'int32_t': { read: ctReadSint32, write: ctWriteSint32 }, - 'int64_t': { read: ctReadSint64, write: ctWriteSint64 }, - 'float': { read: ctReadFloat, write: ctWriteFloat }, - 'double': { read: ctReadDouble, write: ctWriteDouble }, - 'char': { read: ctReadChar, write: ctWriteChar }, - 'char[]': { read: ctReadCharArray, write: ctWriteCharArray } -}; - -/* - * The following are wrappers around the CType IO low level API. They encode - * knowledge about the size and return something in the expected format. - */ -function ctReadUint8(endian, buffer, offset) -{ - var val = mod_ctio.ruint8(buffer, endian, offset); - return ({ value: val, size: 1 }); -} - -function ctReadUint16(endian, buffer, offset) -{ - var val = mod_ctio.ruint16(buffer, endian, offset); - return ({ value: val, size: 2 }); -} - -function ctReadUint32(endian, buffer, offset) -{ - var val = mod_ctio.ruint32(buffer, endian, offset); - return ({ value: val, size: 4 }); -} - -function ctReadUint64(endian, buffer, offset) -{ - var val = mod_ctio.ruint64(buffer, endian, offset); - return ({ value: val, size: 8 }); -} - -function ctReadSint8(endian, buffer, offset) -{ - var val = mod_ctio.rsint8(buffer, endian, offset); - return ({ value: val, size: 1 }); -} - -function ctReadSint16(endian, buffer, offset) -{ - var val = mod_ctio.rsint16(buffer, endian, offset); - return ({ value: val, size: 2 }); -} - -function ctReadSint32(endian, buffer, offset) -{ - var val = mod_ctio.rsint32(buffer, endian, offset); - return ({ value: val, size: 4 }); -} - -function ctReadSint64(endian, buffer, offset) -{ - var val = mod_ctio.rsint64(buffer, endian, offset); - return ({ value: val, size: 8 }); -} - -function ctReadFloat(endian, buffer, offset) -{ - var val = mod_ctio.rfloat(buffer, endian, offset); - return ({ value: val, size: 4 }); -} - -function ctReadDouble(endian, buffer, offset) -{ - var val = mod_ctio.rdouble(buffer, endian, offset); - return ({ value: val, size: 8 }); -} - -/* - * Reads a single character into a node buffer - */ -function ctReadChar(endian, buffer, offset) -{ - var res = new Buffer(1); - res[0] = mod_ctio.ruint8(buffer, endian, offset); - return ({ value: res, size: 1 }); -} - -function ctReadCharArray(length, endian, buffer, offset) -{ - var ii; - var res = new Buffer(length); - - for (ii = 0; ii < length; ii++) - res[ii] = mod_ctio.ruint8(buffer, endian, offset + ii); - - return ({ value: res, size: length }); -} - -function ctWriteUint8(value, endian, buffer, offset) -{ - mod_ctio.wuint8(value, endian, buffer, offset); - return (1); -} - -function ctWriteUint16(value, endian, buffer, offset) -{ - mod_ctio.wuint16(value, endian, buffer, offset); - return (2); -} - -function ctWriteUint32(value, endian, buffer, offset) -{ - mod_ctio.wuint32(value, endian, buffer, offset); - return (4); -} - -function ctWriteUint64(value, endian, buffer, offset) -{ - mod_ctio.wuint64(value, endian, buffer, offset); - return (8); -} - -function ctWriteSint8(value, endian, buffer, offset) -{ - mod_ctio.wsint8(value, endian, buffer, offset); - return (1); -} - -function ctWriteSint16(value, endian, buffer, offset) -{ - mod_ctio.wsint16(value, endian, buffer, offset); - return (2); -} - -function ctWriteSint32(value, endian, buffer, offset) -{ - mod_ctio.wsint32(value, endian, buffer, offset); - return (4); -} - -function ctWriteSint64(value, endian, buffer, offset) -{ - mod_ctio.wsint64(value, endian, buffer, offset); - return (8); -} - -function ctWriteFloat(value, endian, buffer, offset) -{ - mod_ctio.wfloat(value, endian, buffer, offset); - return (4); -} - -function ctWriteDouble(value, endian, buffer, offset) -{ - mod_ctio.wdouble(value, endian, buffer, offset); - return (8); -} - -/* - * Writes a single character into a node buffer - */ -function ctWriteChar(value, endian, buffer, offset) -{ - if (!(value instanceof Buffer)) - throw (new Error('Input must be a buffer')); - - mod_ctio.ruint8(value[0], endian, buffer, offset); - return (1); -} - -/* - * We're going to write 0s into the buffer if the string is shorter than the - * length of the array. - */ -function ctWriteCharArray(value, length, endian, buffer, offset) -{ - var ii; - - if (!(value instanceof Buffer)) - throw (new Error('Input must be a buffer')); - - if (value.length > length) - throw (new Error('value length greater than array length')); - - for (ii = 0; ii < value.length && ii < length; ii++) - mod_ctio.wuint8(value[ii], endian, buffer, offset + ii); - - for (; ii < length; ii++) - mod_ctio.wuint8(0, endian, offset + ii); - - - return (length); -} - -/* - * Each parser has their own set of types. We want to make sure that they each - * get their own copy as they may need to modify it. - */ -function ctGetBasicTypes() -{ - var ret = {}; - var key; - for (key in deftypes) - ret[key] = deftypes[key]; - - return (ret); -} - -/* - * Given a string in the form of type[length] we want to split this into an - * object that extracts that information. We want to note that we could possibly - * have nested arrays so this should only check the furthest one. It may also be - * the case that we have no [] pieces, in which case we just return the current - * type. - */ -function ctParseType(str) -{ - var begInd, endInd; - var type, len; - if (typeof (str) != 'string') - throw (new Error('type must be a Javascript string')); - - endInd = str.lastIndexOf(']'); - if (endInd == -1) { - if (str.lastIndexOf('[') != -1) - throw (new Error('found invalid type with \'[\' but ' + - 'no corresponding \']\'')); - - return ({ type: str }); - } - - begInd = str.lastIndexOf('['); - if (begInd == -1) - throw (new Error('found invalid type with \']\' but ' + - 'no corresponding \'[\'')); - - if (begInd >= endInd) - throw (new Error('malformed type, \']\' appears before \'[\'')); - - type = str.substring(0, begInd); - len = str.substring(begInd + 1, endInd); - - return ({ type: type, len: len }); -} - -/* - * Given a request validate that all of the fields for it are valid and make - * sense. This includes verifying the following notions: - * - Each type requested is present in types - * - Only allow a name for a field to be specified once - * - If an array is specified, validate that the requested field exists and - * comes before it. - * - If fields is defined, check that each entry has the occurrence of field - */ -function ctCheckReq(def, types, fields) -{ - var ii, jj; - var req, keys, key; - var found = {}; - - if (!(def instanceof Array)) - throw (new Error('definition is not an array')); - - if (def.length === 0) - throw (new Error('definition must have at least one element')); - - for (ii = 0; ii < def.length; ii++) { - req = def[ii]; - if (!(req instanceof Object)) - throw (new Error('definition must be an array of' + - 'objects')); - - keys = Object.keys(req); - if (keys.length != 1) - throw (new Error('definition entry must only have ' + - 'one key')); - - if (keys[0] in found) - throw (new Error('Specified name already ' + - 'specified: ' + keys[0])); - - if (!('type' in req[keys[0]])) - throw (new Error('missing required type definition')); - - key = ctParseType(req[keys[0]]['type']); - - /* - * We may have nested arrays, we need to check the validity of - * the types until the len field is undefined in key. However, - * each time len is defined we need to verify it is either an - * integer or corresponds to an already seen key. - */ - while (key['len'] !== undefined) { - if (isNaN(parseInt(key['len'], 10))) { - if (!(key['len'] in found)) - throw (new Error('Given an array ' + - 'length without a matching type')); - - } - - key = ctParseType(key['type']); - } - - /* Now we can validate if the type is valid */ - if (!(key['type'] in types)) - throw (new Error('type not found or typdefed: ' + - key['type'])); - - /* Check for any required fields */ - if (fields !== undefined) { - for (jj = 0; jj < fields.length; jj++) { - if (!(fields[jj] in req[keys[0]])) - throw (new Error('Missing required ' + - 'field: ' + fields[jj])); - } - } - - found[keys[0]] = true; - } -} - - -/* - * Create a new instance of the parser. Each parser has its own store of - * typedefs and endianness. Conf is an object with the following required - * values: - * - * endian Either 'big' or 'little' do determine the endianness we - * want to read from or write to. - * - * And the following optional values: - * - * char-type Valid options here are uint8 and int8. If uint8 is - * specified this changes the default behavior of a single - * char from being a buffer of a single character to being - * a uint8_t. If int8, it becomes an int8_t instead. - */ -function CTypeParser(conf) -{ - if (!conf) throw (new Error('missing required argument')); - - if (!('endian' in conf)) - throw (new Error('missing required endian value')); - - if (conf['endian'] != 'big' && conf['endian'] != 'little') - throw (new Error('Invalid endian type')); - - if ('char-type' in conf && (conf['char-type'] != 'uint8' && - conf['char-type'] != 'int8')) - throw (new Error('invalid option for char-type: ' + - conf['char-type'])); - - this.endian = conf['endian']; - this.types = ctGetBasicTypes(); - - /* - * There may be a more graceful way to do this, but this will have to - * serve. - */ - if ('char-type' in conf && conf['char-type'] == 'uint8') - this.types['char'] = this.types['uint8_t']; - - if ('char-type' in conf && conf['char-type'] == 'int8') - this.types['char'] = this.types['int8_t']; -} - -/* - * Sets the current endian value for the Parser. If the value is not valid, - * throws an Error. - * - * endian Either 'big' or 'little' do determine the endianness we - * want to read from or write to. - * - */ -CTypeParser.prototype.setEndian = function (endian) -{ - if (endian != 'big' && endian != 'little') - throw (new Error('invalid endian type, must be big or ' + - 'little')); - - this.endian = endian; -}; - -/* - * Returns the current value of the endian value for the parser. - */ -CTypeParser.prototype.getEndian = function () -{ - return (this.endian); -}; - -/* - * A user has requested to add a type, let us honor their request. Yet, if their - * request doth spurn us, send them unto the Hells which Dante describes. - * - * name The string for the type definition we're adding - * - * value Either a string that is a type/array name or an object - * that describes a struct. - */ -CTypeParser.prototype.typedef = function (name, value) -{ - var type; - - if (name === undefined) - throw (new (Error('missing required typedef argument: name'))); - - if (value === undefined) - throw (new (Error('missing required typedef argument: value'))); - - if (typeof (name) != 'string') - throw (new (Error('the name of a type must be a string'))); - - type = ctParseType(name); - - if (type['len'] !== undefined) - throw (new Error('Cannot have an array in the typedef name')); - - if (name in this.types) - throw (new Error('typedef name already present: ' + name)); - - if (typeof (value) != 'string' && !(value instanceof Array)) - throw (new Error('typedef value must either be a string or ' + - 'struct')); - - if (typeof (value) == 'string') { - type = ctParseType(value); - if (type['len'] !== undefined) { - if (isNaN(parseInt(type['len'], 10))) - throw (new (Error('typedef value must use ' + - 'fixed size array when outside of a ' + - 'struct'))); - } - - this.types[name] = value; - } else { - /* We have a struct, validate it */ - ctCheckReq(value, this.types); - this.types[name] = value; - } -}; - -/* - * Include all of the typedefs, but none of the built in types. This should be - * treated as read-only. - */ -CTypeParser.prototype.lstypes = function () -{ - var key; - var ret = {}; - - for (key in this.types) { - if (key in deftypes) - continue; - ret[key] = this.types[key]; - } - - return (ret); -}; - -/* - * Given a type string that may have array types that aren't numbers, try and - * fill them in from the values object. The object should be of the format where - * indexing into it should return a number for that type. - * - * str The type string - * - * values An object that can be used to fulfill type information - */ -function ctResolveArray(str, values) -{ - var ret = ''; - var type = ctParseType(str); - - while (type['len'] !== undefined) { - if (isNaN(parseInt(type['len'], 10))) { - if (typeof (values[type['len']]) != 'number') - throw (new Error('cannot sawp in non-number ' + - 'for array value')); - ret = '[' + values[type['len']] + ']' + ret; - } else { - ret = '[' + type['len'] + ']' + ret; - } - type = ctParseType(type['type']); - } - - ret = type['type'] + ret; - - return (ret); -} - -/* - * [private] Either the typedef resolves to another type string or to a struct. - * If it resolves to a struct, we just pass it off to read struct. If not, we - * can just pass it off to read entry. - */ -CTypeParser.prototype.resolveTypedef = function (type, dispatch, buffer, - offset, value) -{ - var pt; - - mod_assert.ok(type in this.types); - if (typeof (this.types[type]) == 'string') { - pt = ctParseType(this.types[type]); - if (dispatch == 'read') - return (this.readEntry(pt, buffer, offset)); - else if (dispatch == 'write') - return (this.writeEntry(value, pt, buffer, offset)); - else - throw (new Error('invalid dispatch type to ' + - 'resolveTypedef')); - } else { - if (dispatch == 'read') - return (this.readStruct(this.types[type], buffer, - offset)); - else if (dispatch == 'write') - return (this.writeStruct(value, this.types[type], - buffer, offset)); - else - throw (new Error('invalid dispatch type to ' + - 'resolveTypedef')); - } - -}; - -/* - * [private] Try and read in the specific entry. - */ -CTypeParser.prototype.readEntry = function (type, buffer, offset) -{ - var parse, len; - - /* - * Because we want to special case char[]s this is unfortunately - * a bit uglier than it really should be. We want to special - * case char[]s so that we return a node buffer, thus they are a - * first class type where as all other arrays just call into a - * generic array routine which calls their data-specific routine - * the specified number of times. - * - * The valid dispatch options we have are: - * - Array and char => char[] handler - * - Generic array handler - * - Generic typedef handler - * - Basic type handler - */ - if (type['len'] !== undefined) { - len = parseInt(type['len'], 10); - if (isNaN(len)) - throw (new Error('somehow got a non-numeric length')); - - if (type['type'] == 'char') - parse = this.types['char[]']['read'](len, - this.endian, buffer, offset); - else - parse = this.readArray(type['type'], - len, buffer, offset); - } else { - if (type['type'] in deftypes) - parse = this.types[type['type']]['read'](this.endian, - buffer, offset); - else - parse = this.resolveTypedef(type['type'], 'read', - buffer, offset); - } - - return (parse); -}; - -/* - * [private] Read an array of data - */ -CTypeParser.prototype.readArray = function (type, length, buffer, offset) -{ - var ii, ent, pt; - var baseOffset = offset; - var ret = new Array(length); - pt = ctParseType(type); - - for (ii = 0; ii < length; ii++) { - ent = this.readEntry(pt, buffer, offset); - offset += ent['size']; - ret[ii] = ent['value']; - } - - return ({ value: ret, size: offset - baseOffset }); -}; - -/* - * [private] Read a single struct in. - */ -CTypeParser.prototype.readStruct = function (def, buffer, offset) -{ - var parse, ii, type, entry, key; - var baseOffset = offset; - var ret = {}; - - /* Walk it and handle doing what's necessary */ - for (ii = 0; ii < def.length; ii++) { - key = Object.keys(def[ii])[0]; - entry = def[ii][key]; - - /* Resolve all array values */ - type = ctParseType(ctResolveArray(entry['type'], ret)); - - if ('offset' in entry) - offset = baseOffset + entry['offset']; - - parse = this.readEntry(type, buffer, offset); - - offset += parse['size']; - ret[key] = parse['value']; - } - - return ({ value: ret, size: (offset-baseOffset)}); -}; - -/* - * This is what we were born to do. We read the data from a buffer and return it - * in an object whose keys match the values from the object. - * - * def The array definition of the data to read in - * - * buffer The buffer to read data from - * - * offset The offset to start writing to - * - * Returns an object where each key corresponds to an entry in def and the value - * is the read value. - */ -CTypeParser.prototype.readData = function (def, buffer, offset) -{ - /* Sanity check for arguments */ - if (def === undefined) - throw (new Error('missing definition for what we should be' + - 'parsing')); - - if (buffer === undefined) - throw (new Error('missing buffer for what we should be ' + - 'parsing')); - - if (offset === undefined) - throw (new Error('missing offset for what we should be ' + - 'parsing')); - - /* Sanity check the object definition */ - ctCheckReq(def, this.types); - - return (this.readStruct(def, buffer, offset)['value']); -}; - -/* - * [private] Write out an array of data - */ -CTypeParser.prototype.writeArray = function (value, type, length, buffer, - offset) -{ - var ii, pt; - var baseOffset = offset; - if (!(value instanceof Array)) - throw (new Error('asked to write an array, but value is not ' + - 'an array')); - - if (value.length != length) - throw (new Error('asked to write array of length ' + length + - ' but that does not match value length: ' + value.length)); - - pt = ctParseType(type); - for (ii = 0; ii < length; ii++) - offset += this.writeEntry(value[ii], pt, buffer, offset); - - return (offset - baseOffset); -}; - -/* - * [private] Write the specific entry - */ -CTypeParser.prototype.writeEntry = function (value, type, buffer, offset) -{ - var len, ret; - - if (type['len'] !== undefined) { - len = parseInt(type['len'], 10); - if (isNaN(len)) - throw (new Error('somehow got a non-numeric length')); - - if (type['type'] == 'char') - ret = this.types['char[]']['write'](value, len, - this.endian, buffer, offset); - else - ret = this.writeArray(value, type['type'], - len, buffer, offset); - } else { - if (type['type'] in deftypes) - ret = this.types[type['type']]['write'](value, - this.endian, buffer, offset); - else - ret = this.resolveTypedef(type['type'], 'write', - buffer, offset, value); - } - - return (ret); -}; - -/* - * [private] Write a single struct out. - */ -CTypeParser.prototype.writeStruct = function (value, def, buffer, offset) -{ - var ii, entry, type, key; - var baseOffset = offset; - var vals = {}; - - for (ii = 0; ii < def.length; ii++) { - key = Object.keys(def[ii])[0]; - entry = def[ii][key]; - - type = ctParseType(ctResolveArray(entry['type'], vals)); - - if ('offset' in entry) - offset = baseOffset + entry['offset']; - - offset += this.writeEntry(value[ii], type, buffer, offset); - /* Now that we've written it out, we can use it for arrays */ - vals[key] = value[ii]; - } - - return (offset); -}; - -/* - * Unfortunately, we're stuck with the sins of an initial poor design. Because - * of that, we are going to have to support the old way of writing data via - * writeData. There we insert the values that you want to write into the - * definition. A little baroque. Internally, we use the new model. So we need to - * just get those values out of there. But to maintain the principle of least - * surprise, we're not going to modify the input data. - */ -function getValues(def) -{ - var ii, out, key; - out = []; - for (ii = 0; ii < def.length; ii++) { - key = Object.keys(def[ii])[0]; - mod_assert.ok('value' in def[ii][key]); - out.push(def[ii][key]['value']); - } - - return (out); -} - -/* - * This is the second half of what we were born to do, write out the data - * itself. Historically this function required you to put your values in the - * definition section. This was not the smartest thing to do and a bit of an - * oversight to be honest. As such, this function now takes a values argument. - * If values is non-null and non-undefined, it will be used to determine the - * values. This means that the old method is still supported, but is no longer - * acceptable. - * - * def The array definition of the data to write out with - * values - * - * buffer The buffer to write to - * - * offset The offset in the buffer to write to - * - * values An array of values to write. - */ -CTypeParser.prototype.writeData = function (def, buffer, offset, values) -{ - var hv; - - if (def === undefined) - throw (new Error('missing definition for what we should be' + - 'parsing')); - - if (buffer === undefined) - throw (new Error('missing buffer for what we should be ' + - 'parsing')); - - if (offset === undefined) - throw (new Error('missing offset for what we should be ' + - 'parsing')); - - hv = (values != null && values != undefined); - if (hv) { - if (!Array.isArray(values)) - throw (new Error('missing values for writing')); - ctCheckReq(def, this.types); - } else { - ctCheckReq(def, this.types, [ 'value' ]); - } - - this.writeStruct(hv ? values : getValues(def), def, buffer, offset); -}; - -/* - * Functions to go to and from 64 bit numbers in a way that is compatible with - * Javascript limitations. There are two sets. One where the user is okay with - * an approximation and one where they are definitely not okay with an - * approximation. - */ - -/* - * Attempts to convert an array of two integers returned from rsint64 / ruint64 - * into an absolute 64 bit number. If however the value would exceed 2^52 this - * will instead throw an error. The mantissa in a double is a 52 bit number and - * rather than potentially give you a value that is an approximation this will - * error. If you would rather an approximation, please see toApprox64. - * - * val An array of two 32-bit integers - */ -function toAbs64(val) -{ - if (val === undefined) - throw (new Error('missing required arg: value')); - - if (!Array.isArray(val)) - throw (new Error('value must be an array')); - - if (val.length != 2) - throw (new Error('value must be an array of length 2')); - - /* We have 20 bits worth of precision in this range */ - if (val[0] >= 0x100000) - throw (new Error('value would become approximated')); - - return (val[0] * Math.pow(2, 32) + val[1]); -} - -/* - * Will return the 64 bit value as returned in an array from rsint64 / ruint64 - * to a value as close as it can. Note that Javascript stores all numbers as a - * double and the mantissa only has 52 bits. Thus this version may approximate - * the value. - * - * val An array of two 32-bit integers - */ -function toApprox64(val) -{ - if (val === undefined) - throw (new Error('missing required arg: value')); - - if (!Array.isArray(val)) - throw (new Error('value must be an array')); - - if (val.length != 2) - throw (new Error('value must be an array of length 2')); - - return (Math.pow(2, 32) * val[0] + val[1]); -} - -function parseCTF(json, conf) -{ - var ctype = new CTypeParser(conf); - mod_ctf.ctfParseJson(json, ctype); - - return (ctype); -} - -/* - * Export the few things we actually want to. Currently this is just the CType - * Parser and ctio. - */ -exports.Parser = CTypeParser; -exports.toAbs64 = toAbs64; -exports.toApprox64 = toApprox64; - -exports.parseCTF = parseCTF; - -exports.ruint8 = mod_ctio.ruint8; -exports.ruint16 = mod_ctio.ruint16; -exports.ruint32 = mod_ctio.ruint32; -exports.ruint64 = mod_ctio.ruint64; -exports.wuint8 = mod_ctio.wuint8; -exports.wuint16 = mod_ctio.wuint16; -exports.wuint32 = mod_ctio.wuint32; -exports.wuint64 = mod_ctio.wuint64; - -exports.rsint8 = mod_ctio.rsint8; -exports.rsint16 = mod_ctio.rsint16; -exports.rsint32 = mod_ctio.rsint32; -exports.rsint64 = mod_ctio.rsint64; -exports.wsint8 = mod_ctio.wsint8; -exports.wsint16 = mod_ctio.wsint16; -exports.wsint32 = mod_ctio.wsint32; -exports.wsint64 = mod_ctio.wsint64; - -exports.rfloat = mod_ctio.rfloat; -exports.rdouble = mod_ctio.rdouble; -exports.wfloat = mod_ctio.wfloat; -exports.wdouble = mod_ctio.wdouble; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype deleted file mode 100644 index 3f94986a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype +++ /dev/null @@ -1,241 +0,0 @@ -'\" te -.\" Copyright (c) 2011, Robert Mustacchi. All Rights Reserved. -.\" Copyright (c) 2011, Joyent, Inc. All Rights Reserved. -.\" -.\" 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. -.TH CTIO 3CTYPE "December 12, 2011" -.SH NAME -ctio, ruint8, ruint16, ruint32, ruint64, wuint8, wuint16, wuint32, wuint64, -rsint8, rsint16, rsint32, rsint64, wsint8, wsint16, wsint32, wsint64, rfloat, -rdouble, wfloat, wdouble \- integer and float operations -.SH SYNOPSIS -.LP -.nf -var mod_ctype = require('ctype'); - -\fBNumber\fR \fBmod_ctype.ruint8\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber\fR \fBmod_ctype.ruint16\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber\fR \fBmod_ctype.ruint32\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber[2]\fR \fBmod_ctype.ruint64\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber\fR \fBmod_ctype.rsint8\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber\fR \fBmod_ctype.rsint16\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber\fR \fBmod_ctype.rsint32\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber[2]\fR \fBmod_ctype.rsint64\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber\fR \fBmod_ctype.rfloat\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBNumber\fR \fBmod_ctype.rdouble\fR(\fBBuffer\fR \fIbuf\fR, \fBString\fR \fIendian\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wuint8\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wuint16\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wuint32\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wuint64\fR(\fBNumber[2]\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wsint8\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wsint16\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wsint32\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wsint64\fR(\fBNumber[2]\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wfloat\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.LP -.nf -\fBvoid\fR \fBmod_ctype.wdouble\fR(\fBNumber\fR value, \fBString\fR \fIendian\fR, \fBBuffer\fR \fIbuf\fR, \fBNumber\fR \fIoffset\fR); -.fi - -.SH DESCRIPTION -.sp -.LP -The argument \fIbuf\fR refers to a valid buffer (from calling new Buffer()). The -argument \fIendian\fR is either the string 'big' or 'little' and controls -whether the data in the buffer is interpreted as big or little endian. The argument -\fIoffset\fR indicates the starting index into the buffer to read or write. All -functions ensure that starting at \fIoffset\fR does not overflow the end of the -buffer. The argument \fIvalue\fR is a Number that is the valid type for the -specific function. All functions that take \fIvalue\fR as an argument, verify -that the passed value is valid. - -.SS "\fBruint8()\fR, \fBruint16()\fR, \fBruint32()\fR" -.sp -.LP -The \fBruint8()\fR, \fBruint16()\fR, and \fBruint32()\fR functions read an 8, -16, and 32-bit unsigned value from \fIbuf\fR and return it. The value read is -influenced by the values of \fIoffset\fR and \fRendian\fI. - - -.SS "\fBrsint8()\fR, \fBrsint16()\fR, \fBrsint32()\fR" -.sp -.LP -The \fBruint8()\fR, \fBruint16()\fR, and \fBruint32()\fR functions work just as -\fBruint8()\fR, \fBruint16()\fR, and \fBruint32()\fR, except they return signed -integers. - -.SS "\fBruint64()\fR, \fBrsint64()\fR" -.sp -.LP -The \fBruint64()\fR and \fBrsint64()\fR functions read unsigned and signed 64 -bit integers respectively from \fBbuf\fR. Due to the limitations of ECMAScript's -\fBNumber\fR type, they cannot be stored as one value without a loss of -precision. Instead of returning the values as a single \fBNumber\fR, the -functions return an array of two numbers. The first entry always contains the -upper 32-bits and the second value contains the lower 32-bits. The lossy -transformation into a number would be \fIres[0]*Math.pow(2,32)+res[1]\fR. -Note that, unless an entry is zero, both array entries are guaranteed to have -the same sign. - -.SS "\fBwuint8()\fR, \fBwuint16()\fR, \fBwuint32()\fR" -.sp -.LP -The functions \fBwuint8()\fR, \fBwuint16()\fR, and \fBwuint32()\fR modify the -contents of \fBbuf\fR by writing an 8, 16, and 32-bit unsigned integer -respectively to \fBbuf\fR. It is illegal to pass a number that is not an integer -within the domain of the integer size, for example, for \fBwuint8()\fR the valid -range is \fB[0, 255]\fR. The value will be written in either big or little -endian format based upon the value of \fBendian\fR. - - -.SS "\fBwsint8()\fR, \fBwsint16()\fR, \fBwsint32()\fR" -.sp -.LP -The functions \fBwsint8()\fR, \fBwsint16()\fR, and \fBwsint32()\fR function -identically to the functions \fBwuint8()\fR, \fBwuint16()\fR, and -\fBwuint32()\fR except that they the valid domain for \fBvalue\fR is that of a -signed number instead of an unsigned number. For example the \fBwsint8()\fR has -a domain of \fB[-128, 127]\fR. - -.SS "\fBwuint64()\fR, \fBwsint64()\fR" -.sp -.LP -The functions \fBwuint64()\fR and \fBswint64()\fR write out 64-bit unsigned and -signed integers to \fBbuf\fR. The \fBvalue\fR argument must be in the same -format as described in \fBruint64()\fR and \fBrsint64()\fR. - -.SS "\fBrfloat()\fR, \fBrdouble()\fR" -.sp -.LP -The functions "\fBrfloat()\fR and \fBrdouble()\fR" work like the other read -functions, except that they read a single precision and double precision -IEEE-754 floating point value instead. - -.SS "\fBwfloat()\fR, \fBwdouble()\fR" -.sp -.LP -The functions "\fBrfloat()\fR and \fBrdouble()\fR" work like the other write -functions, except that the domain for a float is that of a single precision 4 -byte value. The domain for a double is any \fBNumber\fR in ECMAScript, which is -defined to be represented by a double. - -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Committed -_ -MT-Level See below. -_ -Standard Not standardized. -.TE - -.sp -.LP - -All functions are MT-safe in so far as there aren't shared memory MT concerns in -most node programs. If one where to concoct such an environment, these functions -wouldn't be MT-safe. - -.SH SEE ALSO -.sp -.LP diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json deleted file mode 100644 index 90d917e2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "ctype", - "version": "0.5.2", - "description": "read and write binary structures and data types", - "homepage": "https://github.com/rmustacc/node-ctype", - "author": { - "name": "Robert Mustacchi", - "email": "rm@fingolfin.org" - }, - "engines": { - "node": ">= 0.4" - }, - "main": "ctype.js", - "readme": "Node-CType is a way to read and write binary data in structured and easy to use\nformat. Its name comes from the C header file.\n\nTo get started, simply clone the repository or use npm to install it. Once it is\nthere, simply require it.\n\ngit clone git://github.com/rmustacc/node-ctype\nnpm install ctype\nvar mod_ctype = require('ctype')\n\n\nThere are two APIs that you can use, depending on what abstraction you'd like.\nThe low level API let's you read and write individual integers and floats from\nbuffers. The higher level API let's you read and write structures of these. To\nillustrate this, let's looks look at how we would read and write a binary\nencoded x,y point.\n\nIn C we would define this structure as follows:\n\ntypedef struct point {\n\tuint16_t\tp_x;\n\tuint16_t\tp_y;\n} point_t;\n\nTo read a binary encoded point from a Buffer, we first need to create a CType\nparser (where we specify the endian and other options) and add the typedef.\n\nvar parser = new mod_ctype.Parser({ endian: 'big' });\nparser.typedef('point_t', [\n\t{ x: { type: 'uint16_t' } },\n\t{ y: { type: 'uint16_t' } }\n]);\n\nFrom here, given a buffer buf and an offset into it, we can read a point.\n\nvar out = parser.readData([ { point: { type: 'point_t' } } ], buffer, 0);\nconsole.log(out);\n{ point: { x: 23, y: 42 } }\n\nAnother way to get the same information would be to use the low level methods.\nNote that these require you to manually deal with the offset. Here's how we'd\nget the same values of x and y from the buffer.\n\nvar x = mod_ctype.ruint16(buf, 'big', 0);\nvar y = mod_ctype.ruint16(buf, 'big', 2);\nconsole.log(x + ', ' + y);\n23, 42\n\nThe true power of this API comes from the ability to define and nest typedefs,\njust as you would in C. By default, the following types are defined by default.\nNote that they return a Number, unless indicated otherwise.\n\n * int8_t\n * int16_t\n * int32_t\n * int64_t (returns an array where val[0] << 32 + val[1] would be the value)\n * uint8_t\n * uint16_t\n * uint32_t\n * uint64_t (returns an array where val[0] << 32 + val[1] would be the value)\n * float\n * double\n * char (either returns a buffer with that character or a uint8_t)\n * char[] (returns an object with the buffer and the number of characters read which is either the total amount requested or until the first 0)\n\n\nctf2json integration:\n\nNode-CType supports consuming the output of ctf2json. Once you read in a JSON file,\nall you have to do to add all the definitions it contains is:\n\nvar data, parser;\ndata = JSON.parse(parsedJSONData);\nparser = mod_ctype.parseCTF(data, { endian: 'big' });\n\nFor more documentation, see the file README.old. Full documentation is in the\nprocess of being rewritten as a series of manual pages which will be available\nin the repository and online for viewing.\n\nTo read the ctio manual page simple run, from the root of the workspace:\n\nman -Mman -s 3ctype ctio\n", - "readmeFilename": "README", - "_id": "ctype@0.5.2", - "dist": { - "shasum": "c2ddce3ef5e24701c870d46f42c33b116c8f67da" - }, - "_from": "ctype@0.5.2", - "_resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsl.conf b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsl.conf deleted file mode 100755 index 845f367a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsl.conf +++ /dev/null @@ -1,129 +0,0 @@ -# -# Configuration File for JavaScript Lint 0.3.0 -# Developed by Matthias Miller (http://www.JavaScriptLint.com) -# -# This configuration file can be used to lint a collection of scripts, or to enable -# or disable warnings for scripts that are linted via the command line. -# - -### Warnings -# Enable or disable warnings based on requirements. -# Use "+WarningName" to display or "-WarningName" to suppress. -# -+no_return_value # function {0} does not always return a value -+duplicate_formal # duplicate formal argument {0} -+equal_as_assign # test for equality (==) mistyped as assignment (=)?{0} -+var_hides_arg # variable {0} hides argument -+redeclared_var # redeclaration of {0} {1} -+anon_no_return_value # anonymous function does not always return a value -+missing_semicolon # missing semicolon -+meaningless_block # meaningless block; curly braces have no impact -+comma_separated_stmts # multiple statements separated by commas (use semicolons?) -+unreachable_code # unreachable code -+missing_break # missing break statement -+missing_break_for_last_case # missing break statement for last case in switch -+comparison_type_conv # comparisons against null, 0, true, false, or an empty string allowing implicit type conversion (use === or !==) --inc_dec_within_stmt # increment (++) and decrement (--) operators used as part of greater statement -+useless_void # use of the void type may be unnecessary (void is always undefined) --useless_quotes # quotation marks are unnecessary -+multiple_plus_minus # unknown order of operations for successive plus (e.g. x+++y) or minus (e.g. x---y) signs -+use_of_label # use of label --block_without_braces # block statement without curly braces -+leading_decimal_point # leading decimal point may indicate a number or an object member -+trailing_decimal_point # trailing decimal point may indicate a number or an object member --octal_number # leading zeros make an octal number -+nested_comment # nested comment -+misplaced_regex # regular expressions should be preceded by a left parenthesis, assignment, colon, or comma -+ambiguous_newline # unexpected end of line; it is ambiguous whether these lines are part of the same statement -+empty_statement # empty statement or extra semicolon --missing_option_explicit # the "option explicit" control comment is missing -+partial_option_explicit # the "option explicit" control comment, if used, must be in the first script tag -+dup_option_explicit # duplicate "option explicit" control comment -+useless_assign # useless assignment -+ambiguous_nested_stmt # block statements containing block statements should use curly braces to resolve ambiguity -+ambiguous_else_stmt # the else statement could be matched with one of multiple if statements (use curly braces to indicate intent) -+missing_default_case # missing default case in switch statement -+duplicate_case_in_switch # duplicate case in switch statements -+default_not_at_end # the default case is not at the end of the switch statement -+legacy_cc_not_understood # couldn't understand control comment using /*@keyword@*/ syntax -+jsl_cc_not_understood # couldn't understand control comment using /*jsl:keyword*/ syntax -+useless_comparison # useless comparison; comparing identical expressions -+with_statement # with statement hides undeclared variables; use temporary variable instead -+trailing_comma_in_array # extra comma is not recommended in array initializers -+assign_to_function_call # assignment to a function call -+parseint_missing_radix # parseInt missing radix parameter --unreferenced_argument # argument declared but never referenced: {name} - -### Output format -# Customize the format of the error message. -# __FILE__ indicates current file path -# __FILENAME__ indicates current file name -# __LINE__ indicates current line -# __ERROR__ indicates error message -# -# Visual Studio syntax (default): -+output-format __FILE__(__LINE__): __ERROR__ -# Alternative syntax: -#+output-format __FILE__:__LINE__: __ERROR__ - - -### Context -# Show the in-line position of the error. -# Use "+context" to display or "-context" to suppress. -# -+context - - -### Semicolons -# By default, assignments of an anonymous function to a variable or -# property (such as a function prototype) must be followed by a semicolon. -# -#+lambda_assign_requires_semicolon # deprecated setting - - -### Control Comments -# Both JavaScript Lint and the JScript interpreter confuse each other with the syntax for -# the /*@keyword@*/ control comments and JScript conditional comments. (The latter is -# enabled in JScript with @cc_on@). The /*jsl:keyword*/ syntax is preferred for this reason, -# although legacy control comments are enabled by default for backward compatibility. -# -+legacy_control_comments - - -### JScript Function Extensions -# JScript allows member functions to be defined like this: -# function MyObj() { /*constructor*/ } -# function MyObj.prototype.go() { /*member function*/ } -# -# It also allows events to be attached like this: -# function window::onload() { /*init page*/ } -# -# This is a Microsoft-only JavaScript extension. Enable this setting to allow them. -# -#-jscript_function_extensions # deprecated setting - - -### Defining identifiers -# By default, "option explicit" is enabled on a per-file basis. -# To enable this for all files, use "+always_use_option_explicit" --always_use_option_explicit - -# Define certain identifiers of which the lint is not aware. -# (Use this in conjunction with the "undeclared identifier" warning.) -# -# Common uses for webpages might be: -#+define window -#+define document -+define require -+define exports -+define console -+define Buffer -+define JSON - -### Files -# Specify which files to lint -# Use "+recurse" to enable recursion (disabled by default). -# To add a set of files, use "+process FileName", "+process Folder\Path\*.js", -# or "+process Folder\Path\*.htm". -# -#+process jsl-test.js diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle deleted file mode 100755 index 96c72b6d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle +++ /dev/null @@ -1,839 +0,0 @@ -#!/usr/bin/env perl -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright 2008 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# Copyright 2011 Joyent, Inc. All rights reserved. -# -# jsstyle - check for some common stylistic errors. -# -# jsstyle is a sort of "lint" for Javascript coding style. This tool is -# derived from the cstyle tool, used to check for the style used in the -# Solaris kernel, sometimes known as "Bill Joy Normal Form". -# -# There's a lot this can't check for, like proper indentation of code -# blocks. There's also a lot more this could check for. -# -# A note to the non perl literate: -# -# perl regular expressions are pretty much like egrep -# regular expressions, with the following special symbols -# -# \s any space character -# \S any non-space character -# \w any "word" character [a-zA-Z0-9_] -# \W any non-word character -# \d a digit [0-9] -# \D a non-digit -# \b word boundary (between \w and \W) -# \B non-word boundary -# - -require 5.0; -use IO::File; -use Getopt::Std; -use strict; - -my $usage = -"usage: jsstyle [-chvC] [-o constructs] file ... - -c check continuation indentation inside functions - -h perform heuristic checks that are sometimes wrong - -v verbose - -C don't check anything in header block comments - -o constructs - allow a comma-seperated list of optional constructs: - doxygen allow doxygen-style block comments (/** /*!) - splint allow splint-style lint comments (/*@ ... @*/) -"; - -my %opts; - -if (!getopts("cho:vC", \%opts)) { - print $usage; - exit 2; -} - -my $check_continuation = $opts{'c'}; -my $heuristic = $opts{'h'}; -my $verbose = $opts{'v'}; -my $ignore_hdr_comment = $opts{'C'}; - -my $doxygen_comments = 0; -my $splint_comments = 0; - -if (defined($opts{'o'})) { - for my $x (split /,/, $opts{'o'}) { - if ($x eq "doxygen") { - $doxygen_comments = 1; - } elsif ($x eq "splint") { - $splint_comments = 1; - } else { - print "jsstyle: unrecognized construct \"$x\"\n"; - print $usage; - exit 2; - } - } -} - -my ($filename, $line, $prev); # shared globals - -my $fmt; -my $hdr_comment_start; - -if ($verbose) { - $fmt = "%s: %d: %s\n%s\n"; -} else { - $fmt = "%s: %d: %s\n"; -} - -if ($doxygen_comments) { - # doxygen comments look like "/*!" or "/**"; allow them. - $hdr_comment_start = qr/^\s*\/\*[\!\*]?$/; -} else { - $hdr_comment_start = qr/^\s*\/\*$/; -} - -# Note, following must be in single quotes so that \s and \w work right. -my $lint_re = qr/\/\*(?: - jsl:\w+?|ARGSUSED[0-9]*|NOTREACHED|LINTLIBRARY|VARARGS[0-9]*| - CONSTCOND|CONSTANTCOND|CONSTANTCONDITION|EMPTY| - FALLTHRU|FALLTHROUGH|LINTED.*?|PRINTFLIKE[0-9]*| - PROTOLIB[0-9]*|SCANFLIKE[0-9]*|JSSTYLED.*? - )\*\//x; - -my $splint_re = qr/\/\*@.*?@\*\//x; - -my $err_stat = 0; # exit status - -if ($#ARGV >= 0) { - foreach my $arg (@ARGV) { - my $fh = new IO::File $arg, "r"; - if (!defined($fh)) { - printf "%s: cannot open\n", $arg; - } else { - &jsstyle($arg, $fh); - close $fh; - } - } -} else { - &jsstyle("<stdin>", *STDIN); -} -exit $err_stat; - -my $no_errs = 0; # set for JSSTYLED-protected lines - -sub err($) { - my ($error) = @_; - unless ($no_errs) { - printf $fmt, $filename, $., $error, $line; - $err_stat = 1; - } -} - -sub err_prefix($$) { - my ($prevline, $error) = @_; - my $out = $prevline."\n".$line; - unless ($no_errs) { - printf $fmt, $filename, $., $error, $out; - $err_stat = 1; - } -} - -sub err_prev($) { - my ($error) = @_; - unless ($no_errs) { - printf $fmt, $filename, $. - 1, $error, $prev; - $err_stat = 1; - } -} - -sub jsstyle($$) { - -my ($fn, $filehandle) = @_; -$filename = $fn; # share it globally - -my $in_cpp = 0; -my $next_in_cpp = 0; - -my $in_comment = 0; -my $in_header_comment = 0; -my $comment_done = 0; -my $in_function = 0; -my $in_function_header = 0; -my $in_declaration = 0; -my $note_level = 0; -my $nextok = 0; -my $nocheck = 0; - -my $in_string = 0; - -my ($okmsg, $comment_prefix); - -$line = ''; -$prev = ''; -reset_indent(); - -line: while (<$filehandle>) { - s/\r?\n$//; # strip return and newline - - # save the original line, then remove all text from within - # double or single quotes, we do not want to check such text. - - $line = $_; - - # - # C allows strings to be continued with a backslash at the end of - # the line. We translate that into a quoted string on the previous - # line followed by an initial quote on the next line. - # - # (we assume that no-one will use backslash-continuation with character - # constants) - # - $_ = '"' . $_ if ($in_string && !$nocheck && !$in_comment); - - # - # normal strings and characters - # - s/'([^\\']|\\.)*'/\'\'/g; - s/"([^\\"]|\\.)*"/\"\"/g; - - # - # detect string continuation - # - if ($nocheck || $in_comment) { - $in_string = 0; - } else { - # - # Now that all full strings are replaced with "", we check - # for unfinished strings continuing onto the next line. - # - $in_string = - (s/([^"](?:"")*)"([^\\"]|\\.)*\\$/$1""/ || - s/^("")*"([^\\"]|\\.)*\\$/""/); - } - - # - # figure out if we are in a cpp directive - # - $in_cpp = $next_in_cpp || /^\s*#/; # continued or started - $next_in_cpp = $in_cpp && /\\$/; # only if continued - - # strip off trailing backslashes, which appear in long macros - s/\s*\\$//; - - # an /* END JSSTYLED */ comment ends a no-check block. - if ($nocheck) { - if (/\/\* *END *JSSTYLED *\*\//) { - $nocheck = 0; - } else { - reset_indent(); - next line; - } - } - - # a /*JSSTYLED*/ comment indicates that the next line is ok. - if ($nextok) { - if ($okmsg) { - err($okmsg); - } - $nextok = 0; - $okmsg = 0; - if (/\/\* *JSSTYLED.*\*\//) { - /^.*\/\* *JSSTYLED *(.*) *\*\/.*$/; - $okmsg = $1; - $nextok = 1; - } - $no_errs = 1; - } elsif ($no_errs) { - $no_errs = 0; - } - - # check length of line. - # first, a quick check to see if there is any chance of being too long. - if (($line =~ tr/\t/\t/) * 7 + length($line) > 80) { - # yes, there is a chance. - # replace tabs with spaces and check again. - my $eline = $line; - 1 while $eline =~ - s/\t+/' ' x (length($&) * 8 - length($`) % 8)/e; - if (length($eline) > 80) { - err("line > 80 characters"); - } - } - - # ignore NOTE(...) annotations (assumes NOTE is on lines by itself). - if ($note_level || /\b_?NOTE\s*\(/) { # if in NOTE or this is NOTE - s/[^()]//g; # eliminate all non-parens - $note_level += s/\(//g - length; # update paren nest level - next; - } - - # a /* BEGIN JSSTYLED */ comment starts a no-check block. - if (/\/\* *BEGIN *JSSTYLED *\*\//) { - $nocheck = 1; - } - - # a /*JSSTYLED*/ comment indicates that the next line is ok. - if (/\/\* *JSSTYLED.*\*\//) { - /^.*\/\* *JSSTYLED *(.*) *\*\/.*$/; - $okmsg = $1; - $nextok = 1; - } - if (/\/\/ *JSSTYLED/) { - /^.*\/\/ *JSSTYLED *(.*)$/; - $okmsg = $1; - $nextok = 1; - } - - # universal checks; apply to everything - if (/\t +\t/) { - err("spaces between tabs"); - } - if (/ \t+ /) { - err("tabs between spaces"); - } - if (/\s$/) { - err("space or tab at end of line"); - } - if (/[^ \t(]\/\*/ && !/\w\(\/\*.*\*\/\);/) { - err("comment preceded by non-blank"); - } - - # is this the beginning or ending of a function? - # (not if "struct foo\n{\n") - if (/^{$/ && $prev =~ /\)\s*(const\s*)?(\/\*.*\*\/\s*)?\\?$/) { - $in_function = 1; - $in_declaration = 1; - $in_function_header = 0; - $prev = $line; - next line; - } - if (/^}\s*(\/\*.*\*\/\s*)*$/) { - if ($prev =~ /^\s*return\s*;/) { - err_prev("unneeded return at end of function"); - } - $in_function = 0; - reset_indent(); # we don't check between functions - $prev = $line; - next line; - } - if (/^\w*\($/) { - $in_function_header = 1; - } - - # a blank line terminates the declarations within a function. - # XXX - but still a problem in sub-blocks. - if ($in_declaration && /^$/) { - $in_declaration = 0; - } - - if ($comment_done) { - $in_comment = 0; - $in_header_comment = 0; - $comment_done = 0; - } - # does this looks like the start of a block comment? - if (/$hdr_comment_start/) { - if (!/^\t*\/\*/) { - err("block comment not indented by tabs"); - } - $in_comment = 1; - /^(\s*)\//; - $comment_prefix = $1; - if ($comment_prefix eq "") { - $in_header_comment = 1; - } - $prev = $line; - next line; - } - # are we still in the block comment? - if ($in_comment) { - if (/^$comment_prefix \*\/$/) { - $comment_done = 1; - } elsif (/\*\//) { - $comment_done = 1; - err("improper block comment close") - unless ($ignore_hdr_comment && $in_header_comment); - } elsif (!/^$comment_prefix \*[ \t]/ && - !/^$comment_prefix \*$/) { - err("improper block comment") - unless ($ignore_hdr_comment && $in_header_comment); - } - } - - if ($in_header_comment && $ignore_hdr_comment) { - $prev = $line; - next line; - } - - # check for errors that might occur in comments and in code. - - # allow spaces to be used to draw pictures in header comments. - #if (/[^ ] / && !/".* .*"/ && !$in_header_comment) { - # err("spaces instead of tabs"); - #} - #if (/^ / && !/^ \*[ \t\/]/ && !/^ \*$/ && - # (!/^ \w/ || $in_function != 0)) { - # err("indent by spaces instead of tabs"); - #} - if (/^ {2,}/ && !/^ [^ ]/) { - err("indent by spaces instead of tabs"); - } - if (/^\t+ [^ \t\*]/ || /^\t+ \S/ || /^\t+ \S/) { - err("continuation line not indented by 4 spaces"); - } - - if (/^\s*\/\*./ && !/^\s*\/\*.*\*\// && !/$hdr_comment_start/) { - err("improper first line of block comment"); - } - - if ($in_comment) { # still in comment, don't do further checks - $prev = $line; - next line; - } - - if ((/[^(]\/\*\S/ || /^\/\*\S/) && - !(/$lint_re/ || ($splint_comments && /$splint_re/))) { - err("missing blank after open comment"); - } - if (/\S\*\/[^)]|\S\*\/$/ && - !(/$lint_re/ || ($splint_comments && /$splint_re/))) { - err("missing blank before close comment"); - } - if (/\/\/\S/) { # C++ comments - err("missing blank after start comment"); - } - # check for unterminated single line comments, but allow them when - # they are used to comment out the argument list of a function - # declaration. - if (/\S.*\/\*/ && !/\S.*\/\*.*\*\// && !/\(\/\*/) { - err("unterminated single line comment"); - } - - if (/^(#else|#endif|#include)(.*)$/) { - $prev = $line; - next line; - } - - # - # delete any comments and check everything else. Note that - # ".*?" is a non-greedy match, so that we don't get confused by - # multiple comments on the same line. - # - s/\/\*.*?\*\///g; - s/\/\/.*$//; # C++ comments - - # delete any trailing whitespace; we have already checked for that. - s/\s*$//; - - # following checks do not apply to text in comments. - if (/"/) { - err("literal string using double-quote instead of single"); - } - - if (/[^=!<>\s][!<>=]=/ || /[^<>!=][!<>=]==?[^\s,=]/ || - (/[^->]>[^,=>\s]/ && !/[^->]>$/) || - (/[^<]<[^,=<\s]/ && !/[^<]<$/) || - /[^<\s]<[^<]/ || /[^->\s]>[^>]/) { - err("missing space around relational operator"); - } - if (/\S>>=/ || /\S<<=/ || />>=\S/ || /<<=\S/ || /\S[-+*\/&|^%]=/ || - (/[^-+*\/&|^%!<>=\s]=[^=]/ && !/[^-+*\/&|^%!<>=\s]=$/) || - (/[^!<>=]=[^=\s]/ && !/[^!<>=]=$/)) { - # XXX - should only check this for C++ code - # XXX - there are probably other forms that should be allowed - if (!/\soperator=/) { - err("missing space around assignment operator"); - } - } - if (/[,;]\S/ && !/\bfor \(;;\)/) { - err("comma or semicolon followed by non-blank"); - } - # allow "for" statements to have empty "while" clauses - if (/\s[,;]/ && !/^[\t]+;$/ && !/^\s*for \([^;]*; ;[^;]*\)/) { - err("comma or semicolon preceded by blank"); - } - if (/^\s*(&&|\|\|)/) { - err("improper boolean continuation"); - } - if (/\S *(&&|\|\|)/ || /(&&|\|\|) *\S/) { - err("more than one space around boolean operator"); - } - if (/\b(delete|typeof|instanceOf|throw|with|catch|new|function|in|for|if|while|switch|return|case)\(/) { - err("missing space between keyword and paren"); - } - if (/(\b(catch|for|if|with|while|switch|return)\b.*){2,}/) { - # multiple "case" and "sizeof" allowed - err("more than one keyword on line"); - } - if (/\b(delete|typeof|instanceOf|with|throw|catch|new|function|in|for|if|while|switch|return|case)\s\s+\(/ && - !/^#if\s+\(/) { - err("extra space between keyword and paren"); - } - # try to detect "func (x)" but not "if (x)" or - # "#define foo (x)" or "int (*func)();" - if (/\w\s\(/) { - my $s = $_; - # strip off all keywords on the line - s/\b(delete|typeof|instanceOf|throw|with|catch|new|function|in|for|if|while|switch|return|case)\s\(/XXX(/g; - s/#elif\s\(/XXX(/g; - s/^#define\s+\w+\s+\(/XXX(/; - # do not match things like "void (*f)();" - # or "typedef void (func_t)();" - s/\w\s\(+\*/XXX(*/g; - s/\b(void)\s+\(+/XXX(/og; - if (/\w\s\(/) { - err("extra space between function name and left paren"); - } - $_ = $s; - } - - if (/^\s*return\W[^;]*;/ && !/^\s*return\s*\(.*\);/) { - err("unparenthesized return expression"); - } - if (/\btypeof\b/ && !/\btypeof\s*\(.*\)/) { - err("unparenthesized typeof expression"); - } - if (/\(\s/) { - err("whitespace after left paren"); - } - # allow "for" statements to have empty "continue" clauses - if (/\s\)/ && !/^\s*for \([^;]*;[^;]*; \)/) { - err("whitespace before right paren"); - } - if (/^\s*\(void\)[^ ]/) { - err("missing space after (void) cast"); - } - if (/\S{/ && !/({|\(){/) { - err("missing space before left brace"); - } - if ($in_function && /^\s+{/ && - ($prev =~ /\)\s*$/ || $prev =~ /\bstruct\s+\w+$/)) { - err("left brace starting a line"); - } - if (/}(else|while)/) { - err("missing space after right brace"); - } - if (/}\s\s+(else|while)/) { - err("extra space after right brace"); - } - if (/^\s+#/) { - err("preprocessor statement not in column 1"); - } - if (/^#\s/) { - err("blank after preprocessor #"); - } - - # - # We completely ignore, for purposes of indentation: - # * lines outside of functions - # * preprocessor lines - # - if ($check_continuation && $in_function && !$in_cpp) { - process_indent($_); - } - - if ($heuristic) { - # cannot check this everywhere due to "struct {\n...\n} foo;" - if ($in_function && !$in_declaration && - /}./ && !/}\s+=/ && !/{.*}[;,]$/ && !/}(\s|)*$/ && - !/} (else|while)/ && !/}}/) { - err("possible bad text following right brace"); - } - # cannot check this because sub-blocks in - # the middle of code are ok - if ($in_function && /^\s+{/) { - err("possible left brace starting a line"); - } - } - if (/^\s*else\W/) { - if ($prev =~ /^\s*}$/) { - err_prefix($prev, - "else and right brace should be on same line"); - } - } - $prev = $line; -} - -if ($prev eq "") { - err("last line in file is blank"); -} - -} - -# -# Continuation-line checking -# -# The rest of this file contains the code for the continuation checking -# engine. It's a pretty simple state machine which tracks the expression -# depth (unmatched '('s and '['s). -# -# Keep in mind that the argument to process_indent() has already been heavily -# processed; all comments have been replaced by control-A, and the contents of -# strings and character constants have been elided. -# - -my $cont_in; # currently inside of a continuation -my $cont_off; # skipping an initializer or definition -my $cont_noerr; # suppress cascading errors -my $cont_start; # the line being continued -my $cont_base; # the base indentation -my $cont_first; # this is the first line of a statement -my $cont_multiseg; # this continuation has multiple segments - -my $cont_special; # this is a C statement (if, for, etc.) -my $cont_macro; # this is a macro -my $cont_case; # this is a multi-line case - -my @cont_paren; # the stack of unmatched ( and [s we've seen - -sub -reset_indent() -{ - $cont_in = 0; - $cont_off = 0; -} - -sub -delabel($) -{ - # - # replace labels with tabs. Note that there may be multiple - # labels on a line. - # - local $_ = $_[0]; - - while (/^(\t*)( *(?:(?:\w+\s*)|(?:case\b[^:]*)): *)(.*)$/) { - my ($pre_tabs, $label, $rest) = ($1, $2, $3); - $_ = $pre_tabs; - while ($label =~ s/^([^\t]*)(\t+)//) { - $_ .= "\t" x (length($2) + length($1) / 8); - } - $_ .= ("\t" x (length($label) / 8)).$rest; - } - - return ($_); -} - -sub -process_indent($) -{ - require strict; - local $_ = $_[0]; # preserve the global $_ - - s///g; # No comments - s/\s+$//; # Strip trailing whitespace - - return if (/^$/); # skip empty lines - - # regexps used below; keywords taking (), macros, and continued cases - my $special = '(?:(?:\}\s*)?else\s+)?(?:if|for|while|switch)\b'; - my $macro = '[A-Z_][A-Z_0-9]*\('; - my $case = 'case\b[^:]*$'; - - # skip over enumerations, array definitions, initializers, etc. - if ($cont_off <= 0 && !/^\s*$special/ && - (/(?:(?:\b(?:enum|struct|union)\s*[^\{]*)|(?:\s+=\s*)){/ || - (/^\s*{/ && $prev =~ /=\s*(?:\/\*.*\*\/\s*)*$/))) { - $cont_in = 0; - $cont_off = tr/{/{/ - tr/}/}/; - return; - } - if ($cont_off) { - $cont_off += tr/{/{/ - tr/}/}/; - return; - } - - if (!$cont_in) { - $cont_start = $line; - - if (/^\t* /) { - err("non-continuation indented 4 spaces"); - $cont_noerr = 1; # stop reporting - } - $_ = delabel($_); # replace labels with tabs - - # check if the statement is complete - return if (/^\s*\}?$/); - return if (/^\s*\}?\s*else\s*\{?$/); - return if (/^\s*do\s*\{?$/); - return if (/{$/); - return if (/}[,;]?$/); - - # Allow macros on their own lines - return if (/^\s*[A-Z_][A-Z_0-9]*$/); - - # cases we don't deal with, generally non-kosher - if (/{/) { - err("stuff after {"); - return; - } - - # Get the base line, and set up the state machine - /^(\t*)/; - $cont_base = $1; - $cont_in = 1; - @cont_paren = (); - $cont_first = 1; - $cont_multiseg = 0; - - # certain things need special processing - $cont_special = /^\s*$special/? 1 : 0; - $cont_macro = /^\s*$macro/? 1 : 0; - $cont_case = /^\s*$case/? 1 : 0; - } else { - $cont_first = 0; - - # Strings may be pulled back to an earlier (half-)tabstop - unless ($cont_noerr || /^$cont_base / || - (/^\t*(?: )?(?:gettext\()?\"/ && !/^$cont_base\t/)) { - err_prefix($cont_start, - "continuation should be indented 4 spaces"); - } - } - - my $rest = $_; # keeps the remainder of the line - - # - # The split matches 0 characters, so that each 'special' character - # is processed separately. Parens and brackets are pushed and - # popped off the @cont_paren stack. For normal processing, we wait - # until a ; or { terminates the statement. "special" processing - # (if/for/while/switch) is allowed to stop when the stack empties, - # as is macro processing. Case statements are terminated with a : - # and an empty paren stack. - # - foreach $_ (split /[^\(\)\[\]\{\}\;\:]*/) { - next if (length($_) == 0); - - # rest contains the remainder of the line - my $rxp = "[^\Q$_\E]*\Q$_\E"; - $rest =~ s/^$rxp//; - - if (/\(/ || /\[/) { - push @cont_paren, $_; - } elsif (/\)/ || /\]/) { - my $cur = $_; - tr/\)\]/\(\[/; - - my $old = (pop @cont_paren); - if (!defined($old)) { - err("unexpected '$cur'"); - $cont_in = 0; - last; - } elsif ($old ne $_) { - err("'$cur' mismatched with '$old'"); - $cont_in = 0; - last; - } - - # - # If the stack is now empty, do special processing - # for if/for/while/switch and macro statements. - # - next if (@cont_paren != 0); - if ($cont_special) { - if ($rest =~ /^\s*{?$/) { - $cont_in = 0; - last; - } - if ($rest =~ /^\s*;$/) { - err("empty if/for/while body ". - "not on its own line"); - $cont_in = 0; - last; - } - if (!$cont_first && $cont_multiseg == 1) { - err_prefix($cont_start, - "multiple statements continued ". - "over multiple lines"); - $cont_multiseg = 2; - } elsif ($cont_multiseg == 0) { - $cont_multiseg = 1; - } - # We've finished this section, start - # processing the next. - goto section_ended; - } - if ($cont_macro) { - if ($rest =~ /^$/) { - $cont_in = 0; - last; - } - } - } elsif (/\;/) { - if ($cont_case) { - err("unexpected ;"); - } elsif (!$cont_special) { - err("unexpected ;") if (@cont_paren != 0); - if (!$cont_first && $cont_multiseg == 1) { - err_prefix($cont_start, - "multiple statements continued ". - "over multiple lines"); - $cont_multiseg = 2; - } elsif ($cont_multiseg == 0) { - $cont_multiseg = 1; - } - if ($rest =~ /^$/) { - $cont_in = 0; - last; - } - if ($rest =~ /^\s*special/) { - err("if/for/while/switch not started ". - "on its own line"); - } - goto section_ended; - } - } elsif (/\{/) { - err("{ while in parens/brackets") if (@cont_paren != 0); - err("stuff after {") if ($rest =~ /[^\s}]/); - $cont_in = 0; - last; - } elsif (/\}/) { - err("} while in parens/brackets") if (@cont_paren != 0); - if (!$cont_special && $rest !~ /^\s*(while|else)\b/) { - if ($rest =~ /^$/) { - err("unexpected }"); - } else { - err("stuff after }"); - } - $cont_in = 0; - last; - } - } elsif (/\:/ && $cont_case && @cont_paren == 0) { - err("stuff after multi-line case") if ($rest !~ /$^/); - $cont_in = 0; - last; - } - next; -section_ended: - # End of a statement or if/while/for loop. Reset - # cont_special and cont_macro based on the rest of the - # line. - $cont_special = ($rest =~ /^\s*$special/)? 1 : 0; - $cont_macro = ($rest =~ /^\s*$macro/)? 1 : 0; - $cont_case = 0; - next; - } - $cont_noerr = 0 if (!$cont_in); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/float.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/float.json deleted file mode 100644 index 29d7bd89..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/float.json +++ /dev/null @@ -1,13 +0,0 @@ -{ "metadata": - { - "ctf2json_version": "1.0", - "created_at": 1316563626, - "derived_from": "/lib/libc.so", - "ctf_version": 2, - "requested_types": [ "float" ] - }, -"data": - [ - { "name": "float", "float": { "length": 4 } } - ] -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/int.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/int.json deleted file mode 100644 index f9773a14..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/int.json +++ /dev/null @@ -1,13 +0,0 @@ -{ "metadata": - { - "ctf2json_version": "1.0", - "created_at": 1316563631, - "derived_from": "/lib/libc.so", - "ctf_version": 2, - "requested_types": [ "int" ] - }, -"data": - [ - { "name": "int", "integer": { "length": 4, "signed": true } } - ] -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/psinfo.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/psinfo.json deleted file mode 100644 index e0ee5e0d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/psinfo.json +++ /dev/null @@ -1,104 +0,0 @@ -{ "metadata": - { - "ctf2json_version": "1.0", - "created_at": 1316563573, - "derived_from": "/lib/libc.so", - "ctf_version": 2, - "requested_types": [ "psinfo_t" ] - }, -"data": - [ - { "name": "int", "integer": { "length": 4, "signed": true } }, - { "name": "char", "integer": { "length": 1, "signed": true } }, - { "name": "unsigned short", "integer": { "length": 2, "signed": false } }, - { "name": "long", "integer": { "length": 4, "signed": true } }, - { "name": "unsigned", "integer": { "length": 4, "signed": false } }, - { "name": "size_t", "typedef": "unsigned" }, - { "name": "unsigned long", "integer": { "length": 4, "signed": false } }, - { "name": "time_t", "typedef": "long" }, - { "name": "struct timespec", "struct": [ - { "name": "tv_sec", "type": "time_t" }, - { "name": "tv_nsec", "type": "long" } - ] }, - { "name": "zoneid_t", "typedef": "long" }, - { "name": "taskid_t", "typedef": "long" }, - { "name": "dev_t", "typedef": "unsigned long" }, - { "name": "uid_t", "typedef": "unsigned" }, - { "name": "gid_t", "typedef": "unsigned" }, - { "name": "timestruc_t", "typedef": "struct timespec" }, - { "name": "short", "integer": { "length": 2, "signed": true } }, - { "name": "projid_t", "typedef": "long" }, - { "name": "ushort_t", "typedef": "unsigned short" }, - { "name": "poolid_t", "typedef": "long" }, - { "name": "uintptr_t", "typedef": "unsigned" }, - { "name": "id_t", "typedef": "long" }, - { "name": "pid_t", "typedef": "long" }, - { "name": "processorid_t", "typedef": "int" }, - { "name": "psetid_t", "typedef": "int" }, - { "name": "struct lwpsinfo", "struct": [ - { "name": "pr_flag", "type": "int" }, - { "name": "pr_lwpid", "type": "id_t" }, - { "name": "pr_addr", "type": "uintptr_t" }, - { "name": "pr_wchan", "type": "uintptr_t" }, - { "name": "pr_stype", "type": "char" }, - { "name": "pr_state", "type": "char" }, - { "name": "pr_sname", "type": "char" }, - { "name": "pr_nice", "type": "char" }, - { "name": "pr_syscall", "type": "short" }, - { "name": "pr_oldpri", "type": "char" }, - { "name": "pr_cpu", "type": "char" }, - { "name": "pr_pri", "type": "int" }, - { "name": "pr_pctcpu", "type": "ushort_t" }, - { "name": "pr_pad", "type": "ushort_t" }, - { "name": "pr_start", "type": "timestruc_t" }, - { "name": "pr_time", "type": "timestruc_t" }, - { "name": "pr_clname", "type": "char [8]" }, - { "name": "pr_name", "type": "char [16]" }, - { "name": "pr_onpro", "type": "processorid_t" }, - { "name": "pr_bindpro", "type": "processorid_t" }, - { "name": "pr_bindpset", "type": "psetid_t" }, - { "name": "pr_lgrp", "type": "int" }, - { "name": "pr_filler", "type": "int [4]" } - ] }, - { "name": "lwpsinfo_t", "typedef": "struct lwpsinfo" }, - { "name": "struct psinfo", "struct": [ - { "name": "pr_flag", "type": "int" }, - { "name": "pr_nlwp", "type": "int" }, - { "name": "pr_pid", "type": "pid_t" }, - { "name": "pr_ppid", "type": "pid_t" }, - { "name": "pr_pgid", "type": "pid_t" }, - { "name": "pr_sid", "type": "pid_t" }, - { "name": "pr_uid", "type": "uid_t" }, - { "name": "pr_euid", "type": "uid_t" }, - { "name": "pr_gid", "type": "gid_t" }, - { "name": "pr_egid", "type": "gid_t" }, - { "name": "pr_addr", "type": "uintptr_t" }, - { "name": "pr_size", "type": "size_t" }, - { "name": "pr_rssize", "type": "size_t" }, - { "name": "pr_pad1", "type": "size_t" }, - { "name": "pr_ttydev", "type": "dev_t" }, - { "name": "pr_pctcpu", "type": "ushort_t" }, - { "name": "pr_pctmem", "type": "ushort_t" }, - { "name": "pr_start", "type": "timestruc_t" }, - { "name": "pr_time", "type": "timestruc_t" }, - { "name": "pr_ctime", "type": "timestruc_t" }, - { "name": "pr_fname", "type": "char [16]" }, - { "name": "pr_psargs", "type": "char [80]" }, - { "name": "pr_wstat", "type": "int" }, - { "name": "pr_argc", "type": "int" }, - { "name": "pr_argv", "type": "uintptr_t" }, - { "name": "pr_envp", "type": "uintptr_t" }, - { "name": "pr_dmodel", "type": "char" }, - { "name": "pr_pad2", "type": "char [3]" }, - { "name": "pr_taskid", "type": "taskid_t" }, - { "name": "pr_projid", "type": "projid_t" }, - { "name": "pr_nzomb", "type": "int" }, - { "name": "pr_poolid", "type": "poolid_t" }, - { "name": "pr_zoneid", "type": "zoneid_t" }, - { "name": "pr_contract", "type": "id_t" }, - { "name": "pr_filler", "type": "int [1]" }, - { "name": "pr_lwp", "type": "lwpsinfo_t" } - ] }, - { "name": "psinfo_t", "typedef": "struct psinfo" } - ] -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/struct.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/struct.json deleted file mode 100644 index e0542ff4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/struct.json +++ /dev/null @@ -1,19 +0,0 @@ -{ "metadata": - { - "ctf2json_version": "1.0", - "created_at": 1316563648, - "derived_from": "/lib/libc.so", - "ctf_version": 2, - "requested_types": [ "timestruc_t" ] - }, -"data": - [ - { "name": "long", "integer": { "length": 4, "signed": true } }, - { "name": "time_t", "typedef": "long" }, - { "name": "struct timespec", "struct": [ - { "name": "tv_sec", "type": "time_t" }, - { "name": "tv_nsec", "type": "long" } - ] }, - { "name": "timestruc_t", "typedef": "struct timespec" } - ] -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js deleted file mode 100644 index d6a52cbb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Test several conditions that should always cause us to throw. - */ -var mod_assert = require('assert'); -var mod_ctype = require('../../ctype.js'); - -var cases = [ -{ json: { }, msg: 'bad JSON - no metadata or data' }, -{ json: { metadata: {} }, msg: 'bad JSON - bad metadata section' }, -{ json: { metadata: { 'JSON version': [] } }, - msg: 'bad JSON - bad JSON version' }, -{ json: { metadata: { 'JSON version': 2 } }, - msg: 'bad JSON - bad JSON version' }, -{ json: { metadata: { 'JSON version': '100.20' } }, - msg: 'bad JSON - bad JSON version' }, -{ json: { metadata: { 'JSON version': '1.0' } }, - msg: 'missing data section' }, -{ json: { metadata: { 'JSON version': '1.0' }, data: 1 }, - msg: 'invalid data section' }, -{ json: { metadata: { 'JSON version': '1.0' }, data: 1.1 }, - msg: 'invalid data section' }, -{ json: { metadata: { 'JSON version': '1.0' }, data: '1.1' }, - msg: 'invalid data section' }, -{ json: { metadata: { 'JSON version': '1.0' }, data: {} }, - msg: 'invalid data section' } -]; - -function test() -{ - var ii; - - for (ii = 0; ii < cases.length; ii++) { - mod_assert.throws(function () { - mod_ctype.parseCTF(cases[ii].json); - }, Error, cases[ii].msg); - } -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.float.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.float.js deleted file mode 100644 index f2144994..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.float.js +++ /dev/null @@ -1,14 +0,0 @@ -var mod_fs = require('fs'); -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -function test() -{ - var data, parser; - - data = JSON.parse(mod_fs.readFileSync('./float.json').toString()); - parser = mod_ctype.parseCTF(data, { endian: 'big' }); - mod_assert.deepEqual(parser.lstypes(), {}); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.int.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.int.js deleted file mode 100644 index 0ec0f769..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.int.js +++ /dev/null @@ -1,14 +0,0 @@ -var mod_fs = require('fs'); -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -function test() -{ - var data, parser; - - data = JSON.parse(mod_fs.readFileSync('./int.json').toString()); - parser = mod_ctype.parseCTF(data, { endian: 'big' }); - mod_assert.deepEqual(parser.lstypes(), { 'int': 'int32_t' }); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.psinfo.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.psinfo.js deleted file mode 100644 index ca1a544c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.psinfo.js +++ /dev/null @@ -1,17 +0,0 @@ -var mod_fs = require('fs'); -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -/* - * This is too unwieldly to actually write out. Just make sure we can parse it - * without errrors. - */ -function test() -{ - var data; - - data = JSON.parse(mod_fs.readFileSync('./psinfo.json').toString()); - mod_ctype.parseCTF(data, { endian: 'big' }); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.struct.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.struct.js deleted file mode 100644 index c62f41f9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.struct.js +++ /dev/null @@ -1,18 +0,0 @@ -var mod_fs = require('fs'); -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -function test() -{ - var data, parser; - - data = JSON.parse(mod_fs.readFileSync('./struct.json').toString()); - parser = mod_ctype.parseCTF(data, { endian: 'big' }); - mod_assert.deepEqual(parser.lstypes(), { 'long': 'int32_t', - 'time_t': 'long', - 'timestruc_t': 'struct timespec', - 'struct timespec': [ { 'tv_sec': { 'type': 'time_t' } }, - { 'tv_nsec': { 'type': 'long' } } ] }); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.typedef.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.typedef.js deleted file mode 100644 index 9006cd1b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.typedef.js +++ /dev/null @@ -1,15 +0,0 @@ -var mod_fs = require('fs'); -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -function test() -{ - var data, parser; - - data = JSON.parse(mod_fs.readFileSync('./typedef.json').toString()); - parser = mod_ctype.parseCTF(data, { endian: 'big' }); - mod_assert.deepEqual(parser.lstypes(), { 'bar_t': 'int', - 'int': 'int32_t' }); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/typedef.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/typedef.json deleted file mode 100644 index 35ddb50d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/typedef.json +++ /dev/null @@ -1,14 +0,0 @@ -{ "metadata": - { - "ctf2json_version": "1.0", - "created_at": 1316302348, - "derived_from": "/lib/libc.so", - "ctf_version": 2, - "requested_types": [ "bar_t" ] - }, -"data": - [ - { "name": "int", "integer": { "length": 4, "signed": true } }, - { "name": "bar_t", "typedef": "int" } - ] -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.rfloat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.rfloat.js deleted file mode 100644 index 2c9504a8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.rfloat.js +++ /dev/null @@ -1,767 +0,0 @@ -/* - * Battery of tests to break our floating point implementation. Oh ho ho. - * - * There are a few useful ways to generate the expected output. The first is - * just write a C program and write raw bytes out and inspect with xxd. Remember - * to consider whether or not you're on a big endian or little endian machine. - * Another useful site I found to help with some of this was: - * - * http://babbage.cs.qc.edu/IEEE-754/ - */ - -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - -function testfloat() -{ - var buffer = new Buffer(4); - /* Start off with some of the easy ones: +zero */ - buffer[0] = 0; - buffer[1] = 0; - buffer[2] = 0; - buffer[3] = 0; - - ASSERT.equal(0, mod_ctype.rfloat(buffer, 'big', 0)); - ASSERT.equal(0, mod_ctype.rfloat(buffer, 'little', 0)); - - /* Test -0 */ - buffer[0] = 0x80; - ASSERT.equal(0, mod_ctype.rfloat(buffer, 'big', 0)); - buffer[3] = buffer[0]; - buffer[0] = 0; - ASSERT.equal(0, mod_ctype.rfloat(buffer, 'little', 0)); - - /* Catch +infin */ - buffer[0] = 0x7f; - buffer[1] = 0x80; - buffer[2] = 0x00; - buffer[3] = 0x00; - ASSERT.equal(Number.POSITIVE_INFINITY, - mod_ctype.rfloat(buffer, 'big', 0)); - buffer[3] = 0x7f; - buffer[2] = 0x80; - buffer[1] = 0x00; - buffer[0] = 0x00; - ASSERT.equal(Number.POSITIVE_INFINITY, - mod_ctype.rfloat(buffer, 'litle', 0)); - - /* Catch -infin */ - buffer[0] = 0xff; - buffer[1] = 0x80; - buffer[2] = 0x00; - buffer[3] = 0x00; - ASSERT.equal(Number.NEGATIVE_INFINITY, - mod_ctype.rfloat(buffer, 'big', 0)); - buffer[3] = 0xff; - buffer[2] = 0x80; - buffer[1] = 0x00; - buffer[0] = 0x00; - ASSERT.equal(Number.NEGATIVE_INFINITY, - mod_ctype.rfloat(buffer, 'litle', 0)); - - /* Catch NaN */ - - buffer[0] = 0x7f; - buffer[1] = 0x80; - buffer[2] = 0x00; - buffer[3] = 0x23; - ASSERT.ok(isNaN(mod_ctype.rfloat(buffer, 'big', 0))); - buffer[3] = 0x7f; - buffer[2] = 0x80; - buffer[1] = 0x00; - buffer[0] = 0x23; - ASSERT.ok(isNaN(mod_ctype.rfloat(buffer, 'little', 0))); - - /* Catch -infin */ - buffer[0] = 0xff; - buffer[1] = 0x80; - buffer[2] = 0x00; - buffer[3] = 0x23; - ASSERT.ok(isNaN(mod_ctype.rfloat(buffer, 'big', 0))); - buffer[3] = 0xff; - buffer[2] = 0x80; - buffer[1] = 0x00; - buffer[0] = 0x23; - ASSERT.ok(isNaN(mod_ctype.rfloat(buffer, 'little', 0))); - - /* On to some basic tests */ - /* 1.125 */ - buffer[0] = 0x3f; - buffer[1] = 0x90; - buffer[2] = 0x00; - buffer[3] = 0x00; - ASSERT.equal(1.125, mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x3f; - buffer[2] = 0x90; - buffer[1] = 0x00; - buffer[0] = 0x00; - ASSERT.equal(1.125, mod_ctype.rfloat(buffer, 'little', 0)); - - /* ff34a2b0 -2.4010576103645774e+38 */ - buffer[0] = 0xff; - buffer[1] = 0x34; - buffer[2] = 0xa2; - buffer[3] = 0xb0; - ASSERT.equal(-2.4010576103645774e+38, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0xff; - buffer[2] = 0x34; - buffer[1] = 0xa2; - buffer[0] = 0xb0; - ASSERT.equal(-2.4010576103645774e+38, - mod_ctype.rfloat(buffer, 'little', 0)); - - /* Denormalized tests */ - - /* 0003f89a +/- 3.6468792534053364e-40 */ - buffer[0] = 0x00; - buffer[1] = 0x03; - buffer[2] = 0xf8; - buffer[3] = 0x9a; - ASSERT.equal(3.6468792534053364e-40, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x00; - buffer[2] = 0x03; - buffer[1] = 0xf8; - buffer[0] = 0x9a; - ASSERT.equal(3.6468792534053364e-40, - mod_ctype.rfloat(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0x03; - buffer[2] = 0xf8; - buffer[3] = 0x9a; - ASSERT.equal(-3.6468792534053364e-40, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x80; - buffer[2] = 0x03; - buffer[1] = 0xf8; - buffer[0] = 0x9a; - ASSERT.equal(-3.6468792534053364e-40, - mod_ctype.rfloat(buffer, 'little', 0)); - - - /* Maximum and minimum normalized and denormalized values */ - - /* Largest normalized number +/- 3.4028234663852886e+38 */ - - buffer[0] = 0x7f; - buffer[1] = 0x7f; - buffer[2] = 0xff; - buffer[3] = 0xff; - ASSERT.equal(3.4028234663852886e+38, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x7f; - buffer[2] = 0x7f; - buffer[1] = 0xff; - buffer[0] = 0xff; - ASSERT.equal(3.4028234663852886e+38, - mod_ctype.rfloat(buffer, 'little', 0)); - - buffer[0] = 0xff; - buffer[1] = 0x7f; - buffer[2] = 0xff; - buffer[3] = 0xff; - ASSERT.equal(-3.4028234663852886e+38, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0xff; - buffer[2] = 0x7f; - buffer[1] = 0xff; - buffer[0] = 0xff; - ASSERT.equal(-3.4028234663852886e+38, - mod_ctype.rfloat(buffer, 'little', 0)); - - /* Smallest normalied number +/- 1.1754943508222875e-38 */ - buffer[0] = 0x00; - buffer[1] = 0x80; - buffer[2] = 0x00; - buffer[3] = 0x00; - ASSERT.equal(1.1754943508222875e-38, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x00; - buffer[2] = 0x80; - buffer[1] = 0x00; - buffer[0] = 0x00; - ASSERT.equal(1.1754943508222875e-38, - mod_ctype.rfloat(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0x80; - buffer[2] = 0x00; - buffer[3] = 0x00; - ASSERT.equal(-1.1754943508222875e-38, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x80; - buffer[2] = 0x80; - buffer[1] = 0x00; - buffer[0] = 0x00; - ASSERT.equal(-1.1754943508222875e-38, - mod_ctype.rfloat(buffer, 'little', 0)); - - - /* Smallest denormalized number 1.401298464324817e-45 */ - buffer[0] = 0x00; - buffer[1] = 0x00; - buffer[2] = 0x00; - buffer[3] = 0x01; - ASSERT.equal(1.401298464324817e-45, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x00; - buffer[2] = 0x00; - buffer[1] = 0x00; - buffer[0] = 0x01; - ASSERT.equal(1.401298464324817e-45, - mod_ctype.rfloat(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0x00; - buffer[2] = 0x00; - buffer[3] = 0x01; - ASSERT.equal(-1.401298464324817e-45, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x80; - buffer[2] = 0x00; - buffer[1] = 0x00; - buffer[0] = 0x01; - ASSERT.equal(-1.401298464324817e-45, - mod_ctype.rfloat(buffer, 'little', 0)); - - /* Largest denormalized value +/- 1.1754942106924411e-38 */ - buffer[0] = 0x00; - buffer[1] = 0x7f; - buffer[2] = 0xff; - buffer[3] = 0xff; - ASSERT.equal(1.1754942106924411e-38, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x00; - buffer[2] = 0x7f; - buffer[1] = 0xff; - buffer[0] = 0xff; - ASSERT.equal(1.1754942106924411e-38, - mod_ctype.rfloat(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0x7f; - buffer[2] = 0xff; - buffer[3] = 0xff; - ASSERT.equal(-1.1754942106924411e-38, - mod_ctype.rfloat(buffer, 'big', 0)); - - buffer[3] = 0x80; - buffer[2] = 0x7f; - buffer[1] = 0xff; - buffer[0] = 0xff; - ASSERT.equal(-1.1754942106924411e-38, - mod_ctype.rfloat(buffer, 'little', 0)); - - /* Do some quick offset testing */ - buffer = new Buffer(6); - buffer[0] = 0x7f; - buffer[1] = 0x4e; - buffer[2] = 0x8a; - buffer[3] = 0x79; - buffer[4] = 0xcd; - buffer[5] = 0x3f; - - ASSERT.equal(2.745399582697325e+38, - mod_ctype.rfloat(buffer, 'big', 0)); - ASSERT.equal(1161619072, - mod_ctype.rfloat(buffer, 'big', 1)); - ASSERT.equal(-1.2027516403607578e-32, - mod_ctype.rfloat(buffer, 'big', 2)); - - ASSERT.equal(8.97661320504413e+34, - mod_ctype.rfloat(buffer, 'little', 0)); - ASSERT.equal(-261661920, - mod_ctype.rfloat(buffer, 'little', 1)); - ASSERT.equal(1.605271577835083, - mod_ctype.rfloat(buffer, 'little', 2)); - -} - -function testdouble() -{ - var buffer = new Buffer(10); - - /* Check 0 */ - buffer[0] = 0; - buffer[1] = 0; - buffer[2] = 0; - buffer[3] = 0; - buffer[4] = 0; - buffer[5] = 0; - buffer[6] = 0; - buffer[7] = 0; - ASSERT.equal(0, - mod_ctype.rdouble(buffer, 'big', 0)); - ASSERT.equal(0, - mod_ctype.rdouble(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0; - buffer[2] = 0; - buffer[3] = 0; - buffer[4] = 0; - buffer[5] = 0; - buffer[6] = 0; - buffer[7] = 0; - ASSERT.equal(0, - mod_ctype.rdouble(buffer, 'big', 0)); - buffer[7] = 0x80; - buffer[6] = 0; - buffer[5] = 0; - buffer[4] = 0; - buffer[3] = 0; - buffer[2] = 0; - buffer[1] = 0; - buffer[0] = 0; - ASSERT.equal(0, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* Check NaN */ - buffer[0] = 0x7f; - buffer[1] = 0xf0; - buffer[2] = 0; - buffer[3] = 0; - buffer[4] = 0; - buffer[5] = 0; - buffer[6] = 0; - buffer[7] = 23; - ASSERT.ok(isNaN(mod_ctype.rdouble(buffer, 'big', 0))); - - buffer[7] = 0x7f; - buffer[6] = 0xf0; - buffer[5] = 0; - buffer[4] = 0; - buffer[3] = 0; - buffer[2] = 0; - buffer[1] = 0; - buffer[0] = 23; - ASSERT.ok(isNaN(mod_ctype.rdouble(buffer, 'little', 0))); - - buffer[0] = 0xff; - buffer[1] = 0xf0; - buffer[2] = 0; - buffer[3] = 0; - buffer[4] = 0; - buffer[5] = 0; - buffer[6] = 0; - buffer[7] = 23; - ASSERT.ok(isNaN(mod_ctype.rdouble(buffer, 'big', 0))); - - buffer[7] = 0xff; - buffer[6] = 0xf0; - buffer[5] = 0; - buffer[4] = 0; - buffer[3] = 0; - buffer[2] = 0; - buffer[1] = 0; - buffer[0] = 23; - ASSERT.ok(isNaN(mod_ctype.rdouble(buffer, 'little', 0))); - - /* pos inf */ - buffer[0] = 0x7f; - buffer[1] = 0xf0; - buffer[2] = 0; - buffer[3] = 0; - buffer[4] = 0; - buffer[5] = 0; - buffer[6] = 0; - buffer[7] = 0; - ASSERT.equal(Number.POSITIVE_INFINITY, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x7f; - buffer[6] = 0xf0; - buffer[5] = 0; - buffer[4] = 0; - buffer[3] = 0; - buffer[2] = 0; - buffer[1] = 0; - buffer[0] = 0; - ASSERT.equal(Number.POSITIVE_INFINITY, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* neg inf */ - buffer[0] = 0xff; - buffer[1] = 0xf0; - buffer[2] = 0; - buffer[3] = 0; - buffer[4] = 0; - buffer[5] = 0; - buffer[6] = 0; - buffer[7] = 0; - ASSERT.equal(Number.NEGATIVE_INFINITY, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0xff; - buffer[6] = 0xf0; - buffer[5] = 0; - buffer[4] = 0; - buffer[3] = 0; - buffer[2] = 0; - buffer[1] = 0; - buffer[0] = 0; - ASSERT.equal(Number.NEGATIVE_INFINITY, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* Simple normalized values */ - - /* +/- 1.125 */ - buffer[0] = 0x3f; - buffer[1] = 0xf2; - buffer[2] = 0; - buffer[3] = 0; - buffer[4] = 0; - buffer[5] = 0; - buffer[6] = 0; - buffer[7] = 0; - ASSERT.equal(1.125, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x3f; - buffer[6] = 0xf2; - buffer[5] = 0; - buffer[4] = 0; - buffer[3] = 0; - buffer[2] = 0; - buffer[1] = 0; - buffer[0] = 0; - ASSERT.equal(1.125, - mod_ctype.rdouble(buffer, 'little', 0)); - - buffer[0] = 0xbf; - buffer[1] = 0xf2; - buffer[2] = 0; - buffer[3] = 0; - buffer[4] = 0; - buffer[5] = 0; - buffer[6] = 0; - buffer[7] = 0; - ASSERT.equal(-1.125, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0xbf; - buffer[6] = 0xf2; - buffer[5] = 0; - buffer[4] = 0; - buffer[3] = 0; - buffer[2] = 0; - buffer[1] = 0; - buffer[0] = 0; - ASSERT.equal(-1.125, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* +/- 1.4397318913736026e+283 */ - buffer[0] = 0x7a; - buffer[1] = 0xb8; - buffer[2] = 0xc9; - buffer[3] = 0x34; - buffer[4] = 0x72; - buffer[5] = 0x16; - buffer[6] = 0xf9; - buffer[7] = 0x0e; - ASSERT.equal(1.4397318913736026e+283, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x7a; - buffer[6] = 0xb8; - buffer[5] = 0xc9; - buffer[4] = 0x34; - buffer[3] = 0x72; - buffer[2] = 0x16; - buffer[1] = 0xf9; - buffer[0] = 0x0e; - ASSERT.equal(1.4397318913736026e+283, - mod_ctype.rdouble(buffer, 'little', 0)); - - buffer[0] = 0xfa; - buffer[1] = 0xb8; - buffer[2] = 0xc9; - buffer[3] = 0x34; - buffer[4] = 0x72; - buffer[5] = 0x16; - buffer[6] = 0xf9; - buffer[7] = 0x0e; - ASSERT.equal(-1.4397318913736026e+283, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0xfa; - buffer[6] = 0xb8; - buffer[5] = 0xc9; - buffer[4] = 0x34; - buffer[3] = 0x72; - buffer[2] = 0x16; - buffer[1] = 0xf9; - buffer[0] = 0x0e; - ASSERT.equal(-1.4397318913736026e+283, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* Denormalized values */ - /* +/- 8.82521232268344e-309 */ - buffer[0] = 0x00; - buffer[1] = 0x06; - buffer[2] = 0x58; - buffer[3] = 0x94; - buffer[4] = 0x13; - buffer[5] = 0x27; - buffer[6] = 0x8a; - buffer[7] = 0xcd; - ASSERT.equal(8.82521232268344e-309, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x00; - buffer[6] = 0x06; - buffer[5] = 0x58; - buffer[4] = 0x94; - buffer[3] = 0x13; - buffer[2] = 0x27; - buffer[1] = 0x8a; - buffer[0] = 0xcd; - ASSERT.equal(8.82521232268344e-309, - mod_ctype.rdouble(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0x06; - buffer[2] = 0x58; - buffer[3] = 0x94; - buffer[4] = 0x13; - buffer[5] = 0x27; - buffer[6] = 0x8a; - buffer[7] = 0xcd; - ASSERT.equal(-8.82521232268344e-309, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x80; - buffer[6] = 0x06; - buffer[5] = 0x58; - buffer[4] = 0x94; - buffer[3] = 0x13; - buffer[2] = 0x27; - buffer[1] = 0x8a; - buffer[0] = 0xcd; - ASSERT.equal(-8.82521232268344e-309, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* Edge cases, maximum and minimum values */ - - /* Smallest denormalized value 5e-324 */ - buffer[0] = 0x00; - buffer[1] = 0x00; - buffer[2] = 0x00; - buffer[3] = 0x00; - buffer[4] = 0x00; - buffer[5] = 0x00; - buffer[6] = 0x00; - buffer[7] = 0x01; - ASSERT.equal(5e-324, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x00; - buffer[6] = 0x00; - buffer[5] = 0x00; - buffer[4] = 0x00; - buffer[3] = 0x00; - buffer[2] = 0x00; - buffer[1] = 0x00; - buffer[0] = 0x01; - ASSERT.equal(5e-324, - mod_ctype.rdouble(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0x00; - buffer[2] = 0x00; - buffer[3] = 0x00; - buffer[4] = 0x00; - buffer[5] = 0x00; - buffer[6] = 0x00; - buffer[7] = 0x01; - ASSERT.equal(-5e-324, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x80; - buffer[6] = 0x00; - buffer[5] = 0x00; - buffer[4] = 0x00; - buffer[3] = 0x00; - buffer[2] = 0x00; - buffer[1] = 0x00; - buffer[0] = 0x01; - ASSERT.equal(-5e-324, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* Largest denormalized value 2.225073858507201e-308 */ - buffer[0] = 0x00; - buffer[1] = 0x0f; - buffer[2] = 0xff; - buffer[3] = 0xff; - buffer[4] = 0xff; - buffer[5] = 0xff; - buffer[6] = 0xff; - buffer[7] = 0xff; - ASSERT.equal(2.225073858507201e-308, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x00; - buffer[6] = 0x0f; - buffer[5] = 0xff; - buffer[4] = 0xff; - buffer[3] = 0xff; - buffer[2] = 0xff; - buffer[1] = 0xff; - buffer[0] = 0xff; - ASSERT.equal(2.225073858507201e-308, - mod_ctype.rdouble(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0x0f; - buffer[2] = 0xff; - buffer[3] = 0xff; - buffer[4] = 0xff; - buffer[5] = 0xff; - buffer[6] = 0xff; - buffer[7] = 0xff; - ASSERT.equal(-2.225073858507201e-308, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x80; - buffer[6] = 0x0f; - buffer[5] = 0xff; - buffer[4] = 0xff; - buffer[3] = 0xff; - buffer[2] = 0xff; - buffer[1] = 0xff; - buffer[0] = 0xff; - ASSERT.equal(-2.225073858507201e-308, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* Smallest normalized value 2.2250738585072014e-308 */ - buffer[0] = 0x00; - buffer[1] = 0x10; - buffer[2] = 0x00; - buffer[3] = 0x00; - buffer[4] = 0x00; - buffer[5] = 0x00; - buffer[6] = 0x00; - buffer[7] = 0x00; - ASSERT.equal(2.2250738585072014e-308, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x00; - buffer[6] = 0x10; - buffer[5] = 0x00; - buffer[4] = 0x00; - buffer[3] = 0x00; - buffer[2] = 0x00; - buffer[1] = 0x00; - buffer[0] = 0x00; - ASSERT.equal(2.2250738585072014e-308, - mod_ctype.rdouble(buffer, 'little', 0)); - - buffer[0] = 0x80; - buffer[1] = 0x10; - buffer[2] = 0x00; - buffer[3] = 0x00; - buffer[4] = 0x00; - buffer[5] = 0x00; - buffer[6] = 0x00; - buffer[7] = 0x00; - ASSERT.equal(-2.2250738585072014e-308, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x80; - buffer[6] = 0x10; - buffer[5] = 0x00; - buffer[4] = 0x00; - buffer[3] = 0x00; - buffer[2] = 0x00; - buffer[1] = 0x00; - buffer[0] = 0x00; - ASSERT.equal(-2.2250738585072014e-308, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* Largest normalized value 1.7976931348623157e+308 */ - buffer[0] = 0x7f; - buffer[1] = 0xef; - buffer[2] = 0xff; - buffer[3] = 0xff; - buffer[4] = 0xff; - buffer[5] = 0xff; - buffer[6] = 0xff; - buffer[7] = 0xff; - ASSERT.equal(1.7976931348623157e+308, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0x7f; - buffer[6] = 0xef; - buffer[5] = 0xff; - buffer[4] = 0xff; - buffer[3] = 0xff; - buffer[2] = 0xff; - buffer[1] = 0xff; - buffer[0] = 0xff; - ASSERT.equal(1.7976931348623157e+308, - mod_ctype.rdouble(buffer, 'little', 0)); - - buffer[0] = 0xff; - buffer[1] = 0xef; - buffer[2] = 0xff; - buffer[3] = 0xff; - buffer[4] = 0xff; - buffer[5] = 0xff; - buffer[6] = 0xff; - buffer[7] = 0xff; - ASSERT.equal(-1.7976931348623157e+308, - mod_ctype.rdouble(buffer, 'big', 0)); - - buffer[7] = 0xff; - buffer[6] = 0xef; - buffer[5] = 0xff; - buffer[4] = 0xff; - buffer[3] = 0xff; - buffer[2] = 0xff; - buffer[1] = 0xff; - buffer[0] = 0xff; - ASSERT.equal(-1.7976931348623157e+308, - mod_ctype.rdouble(buffer, 'little', 0)); - - /* Try offsets */ - buffer[0] = 0xde; - buffer[1] = 0xad; - buffer[2] = 0xbe; - buffer[3] = 0xef; - buffer[4] = 0xba; - buffer[5] = 0xdd; - buffer[6] = 0xca; - buffer[7] = 0xfe; - buffer[8] = 0x16; - buffer[9] = 0x79; - - ASSERT.equal(-1.1885958404126936e+148, - mod_ctype.rdouble(buffer, 'big', 0)); - ASSERT.equal(-2.4299184080448593e-88, - mod_ctype.rdouble(buffer, 'big', 1)); - ASSERT.equal(-0.000015130017658081283, - mod_ctype.rdouble(buffer, 'big', 2)); - - ASSERT.equal(-5.757458694845505e+302, - mod_ctype.rdouble(buffer, 'little', 0)); - ASSERT.equal(6.436459604192476e-198, - mod_ctype.rdouble(buffer, 'little', 1)); - ASSERT.equal(1.9903745632417286e+275, - mod_ctype.rdouble(buffer, 'little', 2)); -} - -testfloat(); -testdouble(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.wfloat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.wfloat.js deleted file mode 100644 index b5fd95cd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.wfloat.js +++ /dev/null @@ -1,753 +0,0 @@ -/* - * Another place to find bugs that may yet plague us. This time with writing out - * floats to arrays. We are lazy and did basically just take the opposite of our - * test code to read in values. - */ - -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - - -/* - * A useful thing to keep around for debugging - * console.log('buffer[0]: ' + buffer[0].toString(16)); - * console.log('buffer[1]: ' + buffer[1].toString(16)); - * console.log('buffer[2]: ' + buffer[2].toString(16)); - * console.log('buffer[3]: ' + buffer[3].toString(16)); - * console.log('buffer[4]: ' + buffer[4].toString(16)); - * console.log('buffer[5]: ' + buffer[5].toString(16)); - * console.log('buffer[6]: ' + buffer[6].toString(16)); - * console.log('buffer[7]: ' + buffer[7].toString(16)); - */ - -function testfloat() -{ - var buffer = new Buffer(4); - mod_ctype.wfloat(0, 'big', buffer, 0); - /* Start off with some of the easy ones: +zero */ - ASSERT.equal(0, buffer[0]); - ASSERT.equal(0, buffer[1]); - ASSERT.equal(0, buffer[2]); - ASSERT.equal(0, buffer[3]); - mod_ctype.wfloat(0, 'little', buffer, 0); - ASSERT.equal(0, buffer[0]); - ASSERT.equal(0, buffer[1]); - ASSERT.equal(0, buffer[2]); - ASSERT.equal(0, buffer[3]); - - /* Catch +infin */ - mod_ctype.wfloat(Number.POSITIVE_INFINITY, 'big', buffer, 0); - ASSERT.equal(0x7f, buffer[0]); - ASSERT.equal(0x80, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - mod_ctype.wfloat(Number.POSITIVE_INFINITY, 'little', buffer, 0); - ASSERT.equal(0x7f, buffer[3]); - ASSERT.equal(0x80, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - /* Catch -infin */ - mod_ctype.wfloat(Number.NEGATIVE_INFINITY, 'big', buffer, 0); - ASSERT.equal(0xff, buffer[0]); - ASSERT.equal(0x80, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - mod_ctype.wfloat(Number.NEGATIVE_INFINITY, 'little', buffer, 0); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0x80, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - /* Catch NaN */ - - /* - * NaN Is a litle weird in its requirements, so we're going to encode a - * bit of how we actually implement it into this test. Probably not the - * best, since technically the sign is a don't care and the mantissa - * needs to just be non-zero. - */ - mod_ctype.wfloat(NaN, 'big', buffer, 0); - ASSERT.equal(0x7f, buffer[0]); - ASSERT.equal(0x80, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x17, buffer[3]); - mod_ctype.wfloat(NaN, 'little', buffer, 0); - ASSERT.equal(0x7f, buffer[3]); - ASSERT.equal(0x80, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x17, buffer[0]); - - /* On to some basic tests */ - /* 1.125 */ - mod_ctype.wfloat(1.125, 'big', buffer, 0); - ASSERT.equal(0x3f, buffer[0]); - ASSERT.equal(0x90, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - mod_ctype.wfloat(1.125, 'little', buffer, 0); - ASSERT.equal(0x3f, buffer[3]); - ASSERT.equal(0x90, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - mod_ctype.wfloat(1.0000001192092896, 'big', buffer, 0); - ASSERT.equal(0x3f, buffer[0]); - ASSERT.equal(0x80, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x01, buffer[3]); - mod_ctype.wfloat(1.0000001192092896, 'little', buffer, 0); - ASSERT.equal(0x3f, buffer[3]); - ASSERT.equal(0x80, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x01, buffer[0]); - - mod_ctype.wfloat(1.0000001192092896, 'big', buffer, 0); - ASSERT.equal(0x3f, buffer[0]); - ASSERT.equal(0x80, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x01, buffer[3]); - mod_ctype.wfloat(1.0000001192092896, 'little', buffer, 0); - ASSERT.equal(0x3f, buffer[3]); - ASSERT.equal(0x80, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x01, buffer[0]); - - mod_ctype.wfloat(2.3283067140944524e-10, 'big', buffer, 0); - ASSERT.equal(0x2f, buffer[0]); - ASSERT.equal(0x80, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x01, buffer[3]); - mod_ctype.wfloat(2.3283067140944524e-10, 'little', buffer, 0); - ASSERT.equal(0x2f, buffer[3]); - ASSERT.equal(0x80, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x01, buffer[0]); - - /* ff34a2b0 -2.4010576103645774e+38 */ - mod_ctype.wfloat(-2.4010576103645774e+38, - 'big', buffer, 0); - ASSERT.equal(0xff, buffer[0]); - ASSERT.equal(0x34, buffer[1]); - ASSERT.equal(0xa2, buffer[2]); - ASSERT.equal(0xb0, buffer[3]); - mod_ctype.wfloat(-2.4010576103645774e+38, - 'little', buffer, 0); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0x34, buffer[2]); - ASSERT.equal(0xa2, buffer[1]); - ASSERT.equal(0xb0, buffer[0]); - - /* Denormalized tests */ - - /* 0003f89a +/- 3.6468792534053364e-40 */ - mod_ctype.wfloat(3.6468792534053364e-40, - 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x03, buffer[1]); - ASSERT.equal(0xf8, buffer[2]); - ASSERT.equal(0x9a, buffer[3]); - mod_ctype.wfloat(3.6468792534053364e-40, - 'little', buffer, 0); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x03, buffer[2]); - ASSERT.equal(0xf8, buffer[1]); - ASSERT.equal(0x9a, buffer[0]); - - mod_ctype.wfloat(-3.6468792534053364e-40, - 'big', buffer, 0); - ASSERT.equal(0x80, buffer[0]); - ASSERT.equal(0x03, buffer[1]); - ASSERT.equal(0xf8, buffer[2]); - ASSERT.equal(0x9a, buffer[3]); - mod_ctype.wfloat(-3.6468792534053364e-40, - 'little', buffer, 0); - ASSERT.equal(0x80, buffer[3]); - ASSERT.equal(0x03, buffer[2]); - ASSERT.equal(0xf8, buffer[1]); - ASSERT.equal(0x9a, buffer[0]); - - /* Maximum and minimum normalized and denormalized values */ - - /* Largest normalized number +/- 3.4028234663852886e+38 */ - - mod_ctype.wfloat(3.4028234663852886e+38, - 'big', buffer, 0); - ASSERT.equal(0x7f, buffer[0]); - ASSERT.equal(0x7f, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - mod_ctype.wfloat(3.4028234663852886e+38, - 'little', buffer, 0); - ASSERT.equal(0x7f, buffer[3]); - ASSERT.equal(0x7f, buffer[2]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[0]); - - mod_ctype.wfloat(-3.4028234663852886e+38, - 'big', buffer, 0); - ASSERT.equal(0xff, buffer[0]); - ASSERT.equal(0x7f, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - mod_ctype.wfloat(-3.4028234663852886e+38, - 'little', buffer, 0); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0x7f, buffer[2]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[0]); - - /* Smallest normalied number +/- 1.1754943508222875e-38 */ - - mod_ctype.wfloat(1.1754943508222875e-38, - 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x80, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - mod_ctype.wfloat(1.1754943508222875e-38, - 'little', buffer, 0); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x80, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - mod_ctype.wfloat(-1.1754943508222875e-38, - 'big', buffer, 0); - ASSERT.equal(0x80, buffer[0]); - ASSERT.equal(0x80, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - mod_ctype.wfloat(-1.1754943508222875e-38, - 'little', buffer, 0); - ASSERT.equal(0x80, buffer[3]); - ASSERT.equal(0x80, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - /* Smallest denormalized number 1.401298464324817e-45 */ - mod_ctype.wfloat(1.401298464324817e-45, - 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x01, buffer[3]); - mod_ctype.wfloat(1.401298464324817e-45, - 'little', buffer, 0); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x01, buffer[0]); - - mod_ctype.wfloat(-1.401298464324817e-45, - 'big', buffer, 0); - ASSERT.equal(0x80, buffer[0]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x01, buffer[3]); - mod_ctype.wfloat(-1.401298464324817e-45, - 'little', buffer, 0); - ASSERT.equal(0x80, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x01, buffer[0]); - - /* Largest denormalized value +/- 1.1754942106924411e-38 */ - - mod_ctype.wfloat(1.1754942106924411e-38, - 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x7f, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - mod_ctype.wfloat(1.1754942106924411e-38, - 'little', buffer, 0); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x7f, buffer[2]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[0]); - - mod_ctype.wfloat(-1.1754942106924411e-38, - 'big', buffer, 0); - ASSERT.equal(0x80, buffer[0]); - ASSERT.equal(0x7f, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - mod_ctype.wfloat(-1.1754942106924411e-38, - 'little', buffer, 0); - ASSERT.equal(0x80, buffer[3]); - ASSERT.equal(0x7f, buffer[2]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[0]); - - /* Do some quick offset testing */ - buffer = new Buffer(6); - mod_ctype.wfloat(-1.2027516403607578e-32, - 'big', buffer, 2); - ASSERT.equal(0x8a, buffer[2]); - ASSERT.equal(0x79, buffer[3]); - ASSERT.equal(0xcd, buffer[4]); - ASSERT.equal(0x3f, buffer[5]); - - mod_ctype.wfloat(-1.2027516403607578e-32, - 'little', buffer, 2); - ASSERT.equal(0x8a, buffer[5]); - ASSERT.equal(0x79, buffer[4]); - ASSERT.equal(0xcd, buffer[3]); - ASSERT.equal(0x3f, buffer[2]); - -} - -function testdouble() -{ - var buffer = new Buffer(10); - - /* Check 0 */ - mod_ctype.wdouble(0, 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[7]); - mod_ctype.wdouble(0, 'little', buffer, 0); - ASSERT.equal(0x00, buffer[7]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - /* Check NaN */ - /* Similar to floats we are only generating a subset of values */ - mod_ctype.wdouble(NaN, 'big', buffer, 0); - ASSERT.equal(0x7f, buffer[0]); - ASSERT.equal(0xf0, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x17, buffer[7]); - mod_ctype.wdouble(NaN, 'little', buffer, 0); - ASSERT.equal(0x7f, buffer[7]); - ASSERT.equal(0xf0, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x17, buffer[0]); - - /* pos inf */ - mod_ctype.wdouble(Number.POSITIVE_INFINITY, - 'big', buffer, 0); - ASSERT.equal(0x7f, buffer[0]); - ASSERT.equal(0xf0, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[7]); - mod_ctype.wdouble(Number.POSITIVE_INFINITY, - 'little', buffer, 0); - ASSERT.equal(0x7f, buffer[7]); - ASSERT.equal(0xf0, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - /* neg inf */ - mod_ctype.wdouble(Number.NEGATIVE_INFINITY, - 'big', buffer, 0); - ASSERT.equal(0xff, buffer[0]); - ASSERT.equal(0xf0, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[7]); - mod_ctype.wdouble(Number.NEGATIVE_INFINITY, - 'little', buffer, 0); - ASSERT.equal(0xff, buffer[7]); - ASSERT.equal(0xf0, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - /* Simple normalized values */ - - /* +/- 1.125 */ - mod_ctype.wdouble(1.125, - 'big', buffer, 0); - ASSERT.equal(0x3f, buffer[0]); - ASSERT.equal(0xf2, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[7]); - - mod_ctype.wdouble(1.125, - 'little', buffer, 0); - ASSERT.equal(0x3f, buffer[7]); - ASSERT.equal(0xf2, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - mod_ctype.wdouble(-1.125, - 'big', buffer, 0); - ASSERT.equal(0xbf, buffer[0]); - ASSERT.equal(0xf2, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[7]); - - mod_ctype.wdouble(-1.125, - 'little', buffer, 0); - ASSERT.equal(0xbf, buffer[7]); - ASSERT.equal(0xf2, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - - /* +/- 1.4397318913736026e+283 */ - mod_ctype.wdouble(1.4397318913736026e+283, - 'big', buffer, 0); - ASSERT.equal(0x7a, buffer[0]); - ASSERT.equal(0xb8, buffer[1]); - ASSERT.equal(0xc9, buffer[2]); - ASSERT.equal(0x34, buffer[3]); - ASSERT.equal(0x72, buffer[4]); - ASSERT.equal(0x16, buffer[5]); - ASSERT.equal(0xf9, buffer[6]); - ASSERT.equal(0x0e, buffer[7]); - - mod_ctype.wdouble(1.4397318913736026e+283, - 'little', buffer, 0); - ASSERT.equal(0x7a, buffer[7]); - ASSERT.equal(0xb8, buffer[6]); - ASSERT.equal(0xc9, buffer[5]); - ASSERT.equal(0x34, buffer[4]); - ASSERT.equal(0x72, buffer[3]); - ASSERT.equal(0x16, buffer[2]); - ASSERT.equal(0xf9, buffer[1]); - ASSERT.equal(0x0e, buffer[0]); - - mod_ctype.wdouble(-1.4397318913736026e+283, - 'big', buffer, 0); - ASSERT.equal(0xfa, buffer[0]); - ASSERT.equal(0xb8, buffer[1]); - ASSERT.equal(0xc9, buffer[2]); - ASSERT.equal(0x34, buffer[3]); - ASSERT.equal(0x72, buffer[4]); - ASSERT.equal(0x16, buffer[5]); - ASSERT.equal(0xf9, buffer[6]); - ASSERT.equal(0x0e, buffer[7]); - - mod_ctype.wdouble(-1.4397318913736026e+283, - 'little', buffer, 0); - ASSERT.equal(0xfa, buffer[7]); - ASSERT.equal(0xb8, buffer[6]); - ASSERT.equal(0xc9, buffer[5]); - ASSERT.equal(0x34, buffer[4]); - ASSERT.equal(0x72, buffer[3]); - ASSERT.equal(0x16, buffer[2]); - ASSERT.equal(0xf9, buffer[1]); - ASSERT.equal(0x0e, buffer[0]); - - /* Denormalized values */ - /* +/- 8.82521232268344e-309 */ - mod_ctype.wdouble(8.82521232268344e-309, - 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x06, buffer[1]); - ASSERT.equal(0x58, buffer[2]); - ASSERT.equal(0x94, buffer[3]); - ASSERT.equal(0x13, buffer[4]); - ASSERT.equal(0x27, buffer[5]); - ASSERT.equal(0x8a, buffer[6]); - ASSERT.equal(0xcd, buffer[7]); - - mod_ctype.wdouble(8.82521232268344e-309, - 'little', buffer, 0); - ASSERT.equal(0x00, buffer[7]); - ASSERT.equal(0x06, buffer[6]); - ASSERT.equal(0x58, buffer[5]); - ASSERT.equal(0x94, buffer[4]); - ASSERT.equal(0x13, buffer[3]); - ASSERT.equal(0x27, buffer[2]); - ASSERT.equal(0x8a, buffer[1]); - ASSERT.equal(0xcd, buffer[0]); - - mod_ctype.wdouble(-8.82521232268344e-309, - 'big', buffer, 0); - ASSERT.equal(0x80, buffer[0]); - ASSERT.equal(0x06, buffer[1]); - ASSERT.equal(0x58, buffer[2]); - ASSERT.equal(0x94, buffer[3]); - ASSERT.equal(0x13, buffer[4]); - ASSERT.equal(0x27, buffer[5]); - ASSERT.equal(0x8a, buffer[6]); - ASSERT.equal(0xcd, buffer[7]); - - mod_ctype.wdouble(-8.82521232268344e-309, - 'little', buffer, 0); - ASSERT.equal(0x80, buffer[7]); - ASSERT.equal(0x06, buffer[6]); - ASSERT.equal(0x58, buffer[5]); - ASSERT.equal(0x94, buffer[4]); - ASSERT.equal(0x13, buffer[3]); - ASSERT.equal(0x27, buffer[2]); - ASSERT.equal(0x8a, buffer[1]); - ASSERT.equal(0xcd, buffer[0]); - - - /* Edge cases, maximum and minimum values */ - - /* Smallest denormalized value 5e-324 */ - mod_ctype.wdouble(5e-324, - 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x01, buffer[7]); - - mod_ctype.wdouble(5e-324, - 'little', buffer, 0); - ASSERT.equal(0x00, buffer[7]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x01, buffer[0]); - - mod_ctype.wdouble(-5e-324, - 'big', buffer, 0); - ASSERT.equal(0x80, buffer[0]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x01, buffer[7]); - - mod_ctype.wdouble(-5e-324, - 'little', buffer, 0); - ASSERT.equal(0x80, buffer[7]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x01, buffer[0]); - - - - /* Largest denormalized value 2.225073858507201e-308 */ - mod_ctype.wdouble(2.225073858507201e-308, - 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x0f, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0xff, buffer[4]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[6]); - ASSERT.equal(0xff, buffer[7]); - - mod_ctype.wdouble(2.225073858507201e-308, - 'little', buffer, 0); - ASSERT.equal(0x00, buffer[7]); - ASSERT.equal(0x0f, buffer[6]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[4]); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[0]); - - mod_ctype.wdouble(-2.225073858507201e-308, - 'big', buffer, 0); - ASSERT.equal(0x80, buffer[0]); - ASSERT.equal(0x0f, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0xff, buffer[4]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[6]); - ASSERT.equal(0xff, buffer[7]); - - mod_ctype.wdouble(-2.225073858507201e-308, - 'little', buffer, 0); - ASSERT.equal(0x80, buffer[7]); - ASSERT.equal(0x0f, buffer[6]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[4]); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[0]); - - - /* Smallest normalized value 2.2250738585072014e-308 */ - mod_ctype.wdouble(2.2250738585072014e-308, - 'big', buffer, 0); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x10, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[7]); - - mod_ctype.wdouble(2.2250738585072014e-308, - 'little', buffer, 0); - ASSERT.equal(0x00, buffer[7]); - ASSERT.equal(0x10, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - mod_ctype.wdouble(-2.2250738585072014e-308, - 'big', buffer, 0); - ASSERT.equal(0x80, buffer[0]); - ASSERT.equal(0x10, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[7]); - - mod_ctype.wdouble(-2.2250738585072014e-308, - 'little', buffer, 0); - ASSERT.equal(0x80, buffer[7]); - ASSERT.equal(0x10, buffer[6]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[4]); - ASSERT.equal(0x00, buffer[3]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[0]); - - - /* Largest normalized value 1.7976931348623157e+308 */ - mod_ctype.wdouble(1.7976931348623157e+308, - 'big', buffer, 0); - ASSERT.equal(0x7f, buffer[0]); - ASSERT.equal(0xef, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0xff, buffer[4]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[6]); - ASSERT.equal(0xff, buffer[7]); - - mod_ctype.wdouble(1.7976931348623157e+308, - 'little', buffer, 0); - ASSERT.equal(0x7f, buffer[7]); - ASSERT.equal(0xef, buffer[6]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[4]); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[0]); - - mod_ctype.wdouble(-1.7976931348623157e+308, - 'big', buffer, 0); - ASSERT.equal(0xff, buffer[0]); - ASSERT.equal(0xef, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0xff, buffer[4]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[6]); - ASSERT.equal(0xff, buffer[7]); - - mod_ctype.wdouble(-1.7976931348623157e+308, - 'little', buffer, 0); - ASSERT.equal(0xff, buffer[7]); - ASSERT.equal(0xef, buffer[6]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[4]); - ASSERT.equal(0xff, buffer[3]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[0]); - - - /* Try offsets */ - buffer[0] = 0xde; - buffer[1] = 0xad; - buffer[2] = 0xbe; - buffer[3] = 0xef; - buffer[4] = 0xba; - buffer[5] = 0xdd; - buffer[6] = 0xca; - buffer[7] = 0xfe; - buffer[8] = 0x16; - buffer[9] = 0x79; - - mod_ctype.wdouble(-0.000015130017658081283, - 'big', buffer, 2); - ASSERT.equal(0xbe, buffer[2]); - ASSERT.equal(0xef, buffer[3]); - ASSERT.equal(0xba, buffer[4]); - ASSERT.equal(0xdd, buffer[5]); - ASSERT.equal(0xca, buffer[6]); - ASSERT.equal(0xfe, buffer[7]); - ASSERT.equal(0x16, buffer[8]); - ASSERT.equal(0x79, buffer[9]); - - mod_ctype.wdouble(-0.000015130017658081283, - 'little', buffer, 2); - ASSERT.equal(0xbe, buffer[9]); - ASSERT.equal(0xef, buffer[8]); - ASSERT.equal(0xba, buffer[7]); - ASSERT.equal(0xdd, buffer[6]); - ASSERT.equal(0xca, buffer[5]); - ASSERT.equal(0xfe, buffer[4]); - ASSERT.equal(0x16, buffer[3]); - ASSERT.equal(0x79, buffer[2]); -} - -testfloat(); -testdouble(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.64.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.64.js deleted file mode 100644 index 1ffdac09..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.64.js +++ /dev/null @@ -1,638 +0,0 @@ -/* - * Test our ability to read and write signed 64-bit integers. - */ - -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - -function testRead() -{ - var res, data; - data = new Buffer(10); - - data[0] = 0x32; - data[1] = 0x65; - data[2] = 0x42; - data[3] = 0x56; - data[4] = 0x23; - data[5] = 0xff; - data[6] = 0xff; - data[7] = 0xff; - data[8] = 0x89; - data[9] = 0x11; - res = mod_ctype.rsint64(data, 'big', 0); - ASSERT.equal(0x32654256, res[0]); - ASSERT.equal(0x23ffffff, res[1]); - res = mod_ctype.rsint64(data, 'big', 1); - ASSERT.equal(0x65425623, res[0]); - ASSERT.equal(0xffffff89, res[1]); - res = mod_ctype.rsint64(data, 'big', 2); - ASSERT.equal(0x425623ff, res[0]); - ASSERT.equal(0xffff8911, res[1]); - res = mod_ctype.rsint64(data, 'little', 0); - ASSERT.equal(-0x000000dc, res[0]); - ASSERT.equal(-0xa9bd9ace, res[1]); - res = mod_ctype.rsint64(data, 'little', 1); - ASSERT.equal(-0x76000000, res[0]); - ASSERT.equal(-0xdca9bd9b, res[1]); - res = mod_ctype.rsint64(data, 'little', 2); - ASSERT.equal(0x1189ffff, res[0]); - ASSERT.equal(0xff235642, res[1]); - - data.fill(0x00); - res = mod_ctype.rsint64(data, 'big', 0); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(0x00000000, res[1]); - res = mod_ctype.rsint64(data, 'big', 1); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(0x00000000, res[1]); - res = mod_ctype.rsint64(data, 'big', 2); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(0x00000000, res[1]); - res = mod_ctype.rsint64(data, 'little', 0); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(0x00000000, res[1]); - res = mod_ctype.rsint64(data, 'little', 1); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(0x00000000, res[1]); - res = mod_ctype.rsint64(data, 'little', 2); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(0x00000000, res[1]); - - data.fill(0xff); - res = mod_ctype.rsint64(data, 'big', 0); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(-1, res[1]); - res = mod_ctype.rsint64(data, 'big', 1); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(-1, res[1]); - res = mod_ctype.rsint64(data, 'big', 2); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(-1, res[1]); - res = mod_ctype.rsint64(data, 'little', 0); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(-1, res[1]); - res = mod_ctype.rsint64(data, 'little', 1); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(-1, res[1]); - res = mod_ctype.rsint64(data, 'little', 2); - ASSERT.equal(0x00000000, res[0]); - ASSERT.equal(-1, res[1]); - - data[0] = 0x80; - data[1] = 0x00; - data[2] = 0x00; - data[3] = 0x00; - data[4] = 0x00; - data[5] = 0x00; - data[6] = 0x00; - data[7] = 0x00; - res = mod_ctype.rsint64(data, 'big', 0); - ASSERT.equal(-0x80000000, res[0]); - ASSERT.equal(0, res[1]); - - - data[7] = 0x80; - data[6] = 0x00; - data[5] = 0x00; - data[4] = 0x00; - data[3] = 0x00; - data[2] = 0x00; - data[1] = 0x00; - data[0] = 0x00; - res = mod_ctype.rsint64(data, 'little', 0); - ASSERT.equal(-0x80000000, res[0]); - ASSERT.equal(0, res[1]); - - data[0] = 0x80; - data[1] = 0x00; - data[2] = 0x00; - data[3] = 0x00; - data[4] = 0x00; - data[5] = 0x00; - data[6] = 0x00; - data[7] = 0x01; - res = mod_ctype.rsint64(data, 'big', 0); - ASSERT.equal(-0x7fffffff, res[0]); - ASSERT.equal(-0xffffffff, res[1]); - - -} - -function testWriteZero() -{ - var data, buf; - buf = new Buffer(10); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wsint64(data, 'big', buf, 0); - ASSERT.equal(0, buf[0]); - ASSERT.equal(0, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wsint64(data, 'big', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wsint64(data, 'big', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0, buf[8]); - ASSERT.equal(0, buf[9]); - - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wsint64(data, 'little', buf, 0); - ASSERT.equal(0, buf[0]); - ASSERT.equal(0, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wsint64(data, 'little', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wsint64(data, 'little', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0, buf[8]); - ASSERT.equal(0, buf[9]); -} - -/* - * Also include tests that are going to force us to go into a negative value and - * insure that it's written correctly. - */ -function testWrite() -{ - var data, buf; - - buf = new Buffer(10); - data = [ 0x234456, 0x87 ]; - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 0); - ASSERT.equal(0x00, buf[0]); - ASSERT.equal(0x23, buf[1]); - ASSERT.equal(0x44, buf[2]); - ASSERT.equal(0x56, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x87, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x23, buf[2]); - ASSERT.equal(0x44, buf[3]); - ASSERT.equal(0x56, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x87, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x23, buf[3]); - ASSERT.equal(0x44, buf[4]); - ASSERT.equal(0x56, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x00, buf[8]); - ASSERT.equal(0x87, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 0); - ASSERT.equal(0x87, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x56, buf[4]); - ASSERT.equal(0x44, buf[5]); - ASSERT.equal(0x23, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x87, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x56, buf[5]); - ASSERT.equal(0x44, buf[6]); - ASSERT.equal(0x23, buf[7]); - ASSERT.equal(0x00, buf[8]); - ASSERT.equal(0x66, buf[9]); - - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0x87, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x56, buf[6]); - ASSERT.equal(0x44, buf[7]); - ASSERT.equal(0x23, buf[8]); - ASSERT.equal(0x00, buf[9]); - - data = [0x3421, 0x34abcdba]; - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 0); - ASSERT.equal(0x00, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x34, buf[2]); - ASSERT.equal(0x21, buf[3]); - ASSERT.equal(0x34, buf[4]); - ASSERT.equal(0xab, buf[5]); - ASSERT.equal(0xcd, buf[6]); - ASSERT.equal(0xba, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x34, buf[3]); - ASSERT.equal(0x21, buf[4]); - ASSERT.equal(0x34, buf[5]); - ASSERT.equal(0xab, buf[6]); - ASSERT.equal(0xcd, buf[7]); - ASSERT.equal(0xba, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x34, buf[4]); - ASSERT.equal(0x21, buf[5]); - ASSERT.equal(0x34, buf[6]); - ASSERT.equal(0xab, buf[7]); - ASSERT.equal(0xcd, buf[8]); - ASSERT.equal(0xba, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 0); - ASSERT.equal(0xba, buf[0]); - ASSERT.equal(0xcd, buf[1]); - ASSERT.equal(0xab, buf[2]); - ASSERT.equal(0x34, buf[3]); - ASSERT.equal(0x21, buf[4]); - ASSERT.equal(0x34, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0xba, buf[1]); - ASSERT.equal(0xcd, buf[2]); - ASSERT.equal(0xab, buf[3]); - ASSERT.equal(0x34, buf[4]); - ASSERT.equal(0x21, buf[5]); - ASSERT.equal(0x34, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x00, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0xba, buf[2]); - ASSERT.equal(0xcd, buf[3]); - ASSERT.equal(0xab, buf[4]); - ASSERT.equal(0x34, buf[5]); - ASSERT.equal(0x21, buf[6]); - ASSERT.equal(0x34, buf[7]); - ASSERT.equal(0x00, buf[8]); - ASSERT.equal(0x00, buf[9]); - - - data = [ -0x80000000, 0 ]; - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 0); - ASSERT.equal(0x80, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 0); - ASSERT.equal(0x00, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x80, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - data = [ -0x7fffffff, -0xffffffff ]; - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 0); - ASSERT.equal(0x80, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x01, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 0); - ASSERT.equal(0x01, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x80, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - data = [ 0x0, -0x1]; - buf.fill(0x66); - mod_ctype.wsint64(data, 'big', buf, 0); - ASSERT.equal(0xff, buf[0]); - ASSERT.equal(0xff, buf[1]); - ASSERT.equal(0xff, buf[2]); - ASSERT.equal(0xff, buf[3]); - ASSERT.equal(0xff, buf[4]); - ASSERT.equal(0xff, buf[5]); - ASSERT.equal(0xff, buf[6]); - ASSERT.equal(0xff, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wsint64(data, 'little', buf, 0); - ASSERT.equal(0xff, buf[0]); - ASSERT.equal(0xff, buf[1]); - ASSERT.equal(0xff, buf[2]); - ASSERT.equal(0xff, buf[3]); - ASSERT.equal(0xff, buf[4]); - ASSERT.equal(0xff, buf[5]); - ASSERT.equal(0xff, buf[6]); - ASSERT.equal(0xff, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); -} - -/* - * Make sure we catch invalid writes. - */ -function testWriteInvalid() -{ - var data, buf; - - /* Buffer too small */ - buf = new Buffer(4); - data = [ 0, 0]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 0); - }, Error, 'buffer too small'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 0); - }, Error, 'buffer too small'); - - /* Beyond the end of the buffer */ - buf = new Buffer(12); - data = [ 0, 0]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 11); - }, Error, 'write beyond end of buffer'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 11); - }, Error, 'write beyond end of buffer'); - - /* Write fractional values */ - buf = new Buffer(12); - data = [ 3.33, 0 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ 0, 3.3 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ -3.33, 0 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ 0, -3.3 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ 3.33, 2.42 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ 3.33, -2.42 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ -3.33, -2.42 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ -3.33, 2.42 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - /* Signs don't match */ - buf = new Buffer(12); - data = [ 0x800000, -0x32 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ -0x800000, 0x32 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - /* Write values that are too large */ - buf = new Buffer(12); - data = [ 0x80000000, 0 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ 0x7fffffff, 0x100000000 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ 0x00, 0x800000000 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ 0xffffffffff, 0xffffff238 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ 0x23, 0xffffff238 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ -0x80000000, -0xfff238 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ -0x80000004, -0xfff238 ]; - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wsint64(data, 'little', buf, 1); - }, Error, 'write too large'); -} - - -testRead(); -testWrite(); -testWriteZero(); -testWriteInvalid(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.rint.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.rint.js deleted file mode 100644 index 5236d268..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.rint.js +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Tests to verify we're reading in signed integers correctly - */ -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - -/* - * Test 8 bit signed integers - */ -function test8() -{ - var data = new Buffer(4); - - data[0] = 0x23; - ASSERT.equal(0x23, mod_ctype.rsint8(data, 'big', 0)); - ASSERT.equal(0x23, mod_ctype.rsint8(data, 'little', 0)); - - data[0] = 0xff; - ASSERT.equal(-1, mod_ctype.rsint8(data, 'big', 0)); - ASSERT.equal(-1, mod_ctype.rsint8(data, 'little', 0)); - - data[0] = 0x87; - data[1] = 0xab; - data[2] = 0x7c; - data[3] = 0xef; - ASSERT.equal(-121, mod_ctype.rsint8(data, 'big', 0)); - ASSERT.equal(-85, mod_ctype.rsint8(data, 'big', 1)); - ASSERT.equal(124, mod_ctype.rsint8(data, 'big', 2)); - ASSERT.equal(-17, mod_ctype.rsint8(data, 'big', 3)); - ASSERT.equal(-121, mod_ctype.rsint8(data, 'little', 0)); - ASSERT.equal(-85, mod_ctype.rsint8(data, 'little', 1)); - ASSERT.equal(124, mod_ctype.rsint8(data, 'little', 2)); - ASSERT.equal(-17, mod_ctype.rsint8(data, 'little', 3)); -} - -function test16() -{ - var buffer = new Buffer(6); - buffer[0] = 0x16; - buffer[1] = 0x79; - ASSERT.equal(0x1679, mod_ctype.rsint16(buffer, 'big', 0)); - ASSERT.equal(0x7916, mod_ctype.rsint16(buffer, 'little', 0)); - - buffer[0] = 0xff; - buffer[1] = 0x80; - ASSERT.equal(-128, mod_ctype.rsint16(buffer, 'big', 0)); - ASSERT.equal(-32513, mod_ctype.rsint16(buffer, 'little', 0)); - - /* test offset with weenix */ - buffer[0] = 0x77; - buffer[1] = 0x65; - buffer[2] = 0x65; - buffer[3] = 0x6e; - buffer[4] = 0x69; - buffer[5] = 0x78; - ASSERT.equal(0x7765, mod_ctype.rsint16(buffer, 'big', 0)); - ASSERT.equal(0x6565, mod_ctype.rsint16(buffer, 'big', 1)); - ASSERT.equal(0x656e, mod_ctype.rsint16(buffer, 'big', 2)); - ASSERT.equal(0x6e69, mod_ctype.rsint16(buffer, 'big', 3)); - ASSERT.equal(0x6978, mod_ctype.rsint16(buffer, 'big', 4)); - ASSERT.equal(0x6577, mod_ctype.rsint16(buffer, 'little', 0)); - ASSERT.equal(0x6565, mod_ctype.rsint16(buffer, 'little', 1)); - ASSERT.equal(0x6e65, mod_ctype.rsint16(buffer, 'little', 2)); - ASSERT.equal(0x696e, mod_ctype.rsint16(buffer, 'little', 3)); - ASSERT.equal(0x7869, mod_ctype.rsint16(buffer, 'little', 4)); -} - -function test32() -{ - var buffer = new Buffer(6); - buffer[0] = 0x43; - buffer[1] = 0x53; - buffer[2] = 0x16; - buffer[3] = 0x79; - ASSERT.equal(0x43531679, mod_ctype.rsint32(buffer, 'big', 0)); - ASSERT.equal(0x79165343, mod_ctype.rsint32(buffer, 'little', 0)); - - buffer[0] = 0xff; - buffer[1] = 0xfe; - buffer[2] = 0xef; - buffer[3] = 0xfa; - ASSERT.equal(-69638, mod_ctype.rsint32(buffer, 'big', 0)); - ASSERT.equal(-84934913, mod_ctype.rsint32(buffer, 'little', 0)); - - buffer[0] = 0x42; - buffer[1] = 0xc3; - buffer[2] = 0x95; - buffer[3] = 0xa9; - buffer[4] = 0x36; - buffer[5] = 0x17; - ASSERT.equal(0x42c395a9, mod_ctype.rsint32(buffer, 'big', 0)); - ASSERT.equal(-1013601994, mod_ctype.rsint32(buffer, 'big', 1)); - ASSERT.equal(-1784072681, mod_ctype.rsint32(buffer, 'big', 2)); - ASSERT.equal(-1449802942, mod_ctype.rsint32(buffer, 'little', 0)); - ASSERT.equal(917083587, mod_ctype.rsint32(buffer, 'little', 1)); - ASSERT.equal(389458325, mod_ctype.rsint32(buffer, 'little', 2)); -} - -test8(); -test16(); -test32(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wbounds.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wbounds.js deleted file mode 100644 index 5488177b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wbounds.js +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Test to make sure that we properly are erroring whenever we try to write - * beyond the size of the integer. - */ - -var mod_ctio = require('../../../ctio.js'); -var mod_assert = require('assert'); -var tb = new Buffer(16); /* Largest buffer we'll need */ - -var cases = [ - { func: - function () { - mod_ctio.wsint8(0x80, 'big', tb, 0); - }, test: '+int8_t' }, - { func: - function () { - mod_ctio.wsint8(-0x81, 'big', tb, 0); - }, test: '-int8_t' }, - - { func: - function () { - mod_ctio.wsint16(0x8000, 'big', tb, 0); - }, test: '+int16_t' }, - { func: - function () { - mod_ctio.wsint16(-0x8001, 'big', tb, 0); - }, test: '-int16_t' }, - { func: - function () { - mod_ctio.wsint32(0x80000000, 'big', tb, 0); - }, test: '+int32_t' }, - { func: - function () { - mod_ctio.wsint32(-0x80000001, 'big', tb, 0); - }, test: '-int32_t' }, - { func: - function () { - mod_ctio.wsint64([ 0x80000000, 0 ], 'big', tb, 0); - }, test: '+int64_t' }, - { func: - function () { - mod_ctio.wsint64([ -0x80000000, -1 ], 'big', tb, 0); - }, test: '-int64_t' } -]; - -function test() -{ - var ii; - for (ii = 0; ii < cases.length; ii++) - mod_assert.throws(cases[ii]['func'], Error, cases[ii]['test']); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wint.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wint.js deleted file mode 100644 index 98b6a32a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wint.js +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Tests to verify we're writing signed integers correctly - */ -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - -function test8() -{ - var buffer = new Buffer(4); - mod_ctype.wsint8(0x23, 'big', buffer, 0); - mod_ctype.wsint8(0x23, 'little', buffer, 1); - mod_ctype.wsint8(-5, 'big', buffer, 2); - mod_ctype.wsint8(-5, 'little', buffer, 3); - - ASSERT.equal(0x23, buffer[0]); - ASSERT.equal(0x23, buffer[1]); - ASSERT.equal(0xfb, buffer[2]); - ASSERT.equal(0xfb, buffer[3]); - - /* Make sure we handle truncation correctly */ - ASSERT.throws(function () { - mod_ctype.wsint8(0xabc, 'big', buffer, 0); - }); - ASSERT.throws(function () { - mod_ctype.wsint8(0xabc, 'little', buffer, 0); - }); -} - -function test16() -{ - var buffer = new Buffer(6); - mod_ctype.wsint16(0x0023, 'big', buffer, 0); - mod_ctype.wsint16(0x0023, 'little', buffer, 2); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x23, buffer[1]); - ASSERT.equal(0x23, buffer[2]); - ASSERT.equal(0x00, buffer[3]); - mod_ctype.wsint16(-5, 'big', buffer, 0); - mod_ctype.wsint16(-5, 'little', buffer, 2); - ASSERT.equal(0xff, buffer[0]); - ASSERT.equal(0xfb, buffer[1]); - ASSERT.equal(0xfb, buffer[2]); - ASSERT.equal(0xff, buffer[3]); - - mod_ctype.wsint16(-1679, 'big', buffer, 1); - mod_ctype.wsint16(-1679, 'little', buffer, 3); - ASSERT.equal(0xf9, buffer[1]); - ASSERT.equal(0x71, buffer[2]); - ASSERT.equal(0x71, buffer[3]); - ASSERT.equal(0xf9, buffer[4]); -} - -function test32() -{ - var buffer = new Buffer(8); - mod_ctype.wsint32(0x23, 'big', buffer, 0); - mod_ctype.wsint32(0x23, 'little', buffer, 4); - ASSERT.equal(0x00, buffer[0]); - ASSERT.equal(0x00, buffer[1]); - ASSERT.equal(0x00, buffer[2]); - ASSERT.equal(0x23, buffer[3]); - ASSERT.equal(0x23, buffer[4]); - ASSERT.equal(0x00, buffer[5]); - ASSERT.equal(0x00, buffer[6]); - ASSERT.equal(0x00, buffer[7]); - - mod_ctype.wsint32(-5, 'big', buffer, 0); - mod_ctype.wsint32(-5, 'little', buffer, 4); - ASSERT.equal(0xff, buffer[0]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xff, buffer[2]); - ASSERT.equal(0xfb, buffer[3]); - ASSERT.equal(0xfb, buffer[4]); - ASSERT.equal(0xff, buffer[5]); - ASSERT.equal(0xff, buffer[6]); - ASSERT.equal(0xff, buffer[7]); - - mod_ctype.wsint32(-805306713, 'big', buffer, 0); - mod_ctype.wsint32(-805306713, 'litle', buffer, 4); - ASSERT.equal(0xcf, buffer[0]); - ASSERT.equal(0xff, buffer[1]); - ASSERT.equal(0xfe, buffer[2]); - ASSERT.equal(0xa7, buffer[3]); - ASSERT.equal(0xa7, buffer[4]); - ASSERT.equal(0xfe, buffer[5]); - ASSERT.equal(0xff, buffer[6]); - ASSERT.equal(0xcf, buffer[7]); -} - -test8(); -test16(); -test32(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.64.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.64.js deleted file mode 100644 index cf66ac7a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.64.js +++ /dev/null @@ -1,451 +0,0 @@ -/* - * Test our ability to read and write unsigned 64-bit integers. - */ - -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - -function testRead() -{ - var res, data; - data = new Buffer(10); - - data[0] = 0x32; - data[1] = 0x65; - data[2] = 0x42; - data[3] = 0x56; - data[4] = 0x23; - data[5] = 0xff; - data[6] = 0xff; - data[7] = 0xff; - data[8] = 0x89; - data[9] = 0x11; - res = mod_ctype.ruint64(data, 'big', 0); - ASSERT.equal(0x32654256, res[0]); - ASSERT.equal(0x23ffffff, res[1]); - res = mod_ctype.ruint64(data, 'big', 1); - ASSERT.equal(0x65425623, res[0]); - ASSERT.equal(0xffffff89, res[1]); - res = mod_ctype.ruint64(data, 'big', 2); - ASSERT.equal(0x425623ff, res[0]); - ASSERT.equal(0xffff8911, res[1]); - res = mod_ctype.ruint64(data, 'little', 0); - ASSERT.equal(0xffffff23, res[0]); - ASSERT.equal(0x56426532, res[1]); - res = mod_ctype.ruint64(data, 'little', 1); - ASSERT.equal(0x89ffffff, res[0]); - ASSERT.equal(0x23564265, res[1]); - res = mod_ctype.ruint64(data, 'little', 2); - ASSERT.equal(0x1189ffff, res[0]); - ASSERT.equal(0xff235642, res[1]); - -} - -function testReadOver() -{ - var res, data; - data = new Buffer(10); - - data[0] = 0x80; - data[1] = 0xff; - data[2] = 0x80; - data[3] = 0xff; - data[4] = 0x80; - data[5] = 0xff; - data[6] = 0x80; - data[7] = 0xff; - data[8] = 0x80; - data[9] = 0xff; - res = mod_ctype.ruint64(data, 'big', 0); - ASSERT.equal(0x80ff80ff, res[0]); - ASSERT.equal(0x80ff80ff, res[1]); - res = mod_ctype.ruint64(data, 'big', 1); - ASSERT.equal(0xff80ff80, res[0]); - ASSERT.equal(0xff80ff80, res[1]); - res = mod_ctype.ruint64(data, 'big', 2); - ASSERT.equal(0x80ff80ff, res[0]); - ASSERT.equal(0x80ff80ff, res[1]); - res = mod_ctype.ruint64(data, 'little', 0); - ASSERT.equal(0xff80ff80, res[0]); - ASSERT.equal(0xff80ff80, res[1]); - res = mod_ctype.ruint64(data, 'little', 1); - ASSERT.equal(0x80ff80ff, res[0]); - ASSERT.equal(0x80ff80ff, res[1]); - res = mod_ctype.ruint64(data, 'little', 2); - ASSERT.equal(0xff80ff80, res[0]); - ASSERT.equal(0xff80ff80, res[1]); -} - -function testWriteZero() -{ - var data, buf; - buf = new Buffer(10); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wuint64(data, 'big', buf, 0); - ASSERT.equal(0, buf[0]); - ASSERT.equal(0, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wuint64(data, 'big', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wuint64(data, 'big', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0, buf[8]); - ASSERT.equal(0, buf[9]); - - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wuint64(data, 'little', buf, 0); - ASSERT.equal(0, buf[0]); - ASSERT.equal(0, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wuint64(data, 'little', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - data = [0, 0]; - mod_ctype.wuint64(data, 'little', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0, buf[2]); - ASSERT.equal(0, buf[3]); - ASSERT.equal(0, buf[4]); - ASSERT.equal(0, buf[5]); - ASSERT.equal(0, buf[6]); - ASSERT.equal(0, buf[7]); - ASSERT.equal(0, buf[8]); - ASSERT.equal(0, buf[9]); -} - -/* - * Also include tests that are going to force us to go into a negative value and - * insure that it's written correctly. - */ -function testWrite() -{ - var data, buf; - - buf = new Buffer(10); - data = [ 0x234456, 0x87 ]; - buf.fill(0x66); - mod_ctype.wuint64(data, 'big', buf, 0); - ASSERT.equal(0x00, buf[0]); - ASSERT.equal(0x23, buf[1]); - ASSERT.equal(0x44, buf[2]); - ASSERT.equal(0x56, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x87, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'big', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x23, buf[2]); - ASSERT.equal(0x44, buf[3]); - ASSERT.equal(0x56, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x87, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'big', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x23, buf[3]); - ASSERT.equal(0x44, buf[4]); - ASSERT.equal(0x56, buf[5]); - ASSERT.equal(0x00, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x00, buf[8]); - ASSERT.equal(0x87, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'little', buf, 0); - ASSERT.equal(0x87, buf[0]); - ASSERT.equal(0x00, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x56, buf[4]); - ASSERT.equal(0x44, buf[5]); - ASSERT.equal(0x23, buf[6]); - ASSERT.equal(0x00, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'little', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x87, buf[1]); - ASSERT.equal(0x00, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x56, buf[5]); - ASSERT.equal(0x44, buf[6]); - ASSERT.equal(0x23, buf[7]); - ASSERT.equal(0x00, buf[8]); - ASSERT.equal(0x66, buf[9]); - - - buf.fill(0x66); - mod_ctype.wuint64(data, 'little', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0x87, buf[2]); - ASSERT.equal(0x00, buf[3]); - ASSERT.equal(0x00, buf[4]); - ASSERT.equal(0x00, buf[5]); - ASSERT.equal(0x56, buf[6]); - ASSERT.equal(0x44, buf[7]); - ASSERT.equal(0x23, buf[8]); - ASSERT.equal(0x00, buf[9]); - - data = [0xffff3421, 0x34abcdba]; - buf.fill(0x66); - mod_ctype.wuint64(data, 'big', buf, 0); - ASSERT.equal(0xff, buf[0]); - ASSERT.equal(0xff, buf[1]); - ASSERT.equal(0x34, buf[2]); - ASSERT.equal(0x21, buf[3]); - ASSERT.equal(0x34, buf[4]); - ASSERT.equal(0xab, buf[5]); - ASSERT.equal(0xcd, buf[6]); - ASSERT.equal(0xba, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'big', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0xff, buf[1]); - ASSERT.equal(0xff, buf[2]); - ASSERT.equal(0x34, buf[3]); - ASSERT.equal(0x21, buf[4]); - ASSERT.equal(0x34, buf[5]); - ASSERT.equal(0xab, buf[6]); - ASSERT.equal(0xcd, buf[7]); - ASSERT.equal(0xba, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'big', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0xff, buf[2]); - ASSERT.equal(0xff, buf[3]); - ASSERT.equal(0x34, buf[4]); - ASSERT.equal(0x21, buf[5]); - ASSERT.equal(0x34, buf[6]); - ASSERT.equal(0xab, buf[7]); - ASSERT.equal(0xcd, buf[8]); - ASSERT.equal(0xba, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'little', buf, 0); - ASSERT.equal(0xba, buf[0]); - ASSERT.equal(0xcd, buf[1]); - ASSERT.equal(0xab, buf[2]); - ASSERT.equal(0x34, buf[3]); - ASSERT.equal(0x21, buf[4]); - ASSERT.equal(0x34, buf[5]); - ASSERT.equal(0xff, buf[6]); - ASSERT.equal(0xff, buf[7]); - ASSERT.equal(0x66, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'little', buf, 1); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0xba, buf[1]); - ASSERT.equal(0xcd, buf[2]); - ASSERT.equal(0xab, buf[3]); - ASSERT.equal(0x34, buf[4]); - ASSERT.equal(0x21, buf[5]); - ASSERT.equal(0x34, buf[6]); - ASSERT.equal(0xff, buf[7]); - ASSERT.equal(0xff, buf[8]); - ASSERT.equal(0x66, buf[9]); - - buf.fill(0x66); - mod_ctype.wuint64(data, 'little', buf, 2); - ASSERT.equal(0x66, buf[0]); - ASSERT.equal(0x66, buf[1]); - ASSERT.equal(0xba, buf[2]); - ASSERT.equal(0xcd, buf[3]); - ASSERT.equal(0xab, buf[4]); - ASSERT.equal(0x34, buf[5]); - ASSERT.equal(0x21, buf[6]); - ASSERT.equal(0x34, buf[7]); - ASSERT.equal(0xff, buf[8]); - ASSERT.equal(0xff, buf[9]); -} - -/* - * Make sure we catch invalid writes. - */ -function testWriteInvalid() -{ - var data, buf; - - /* Buffer too small */ - buf = new Buffer(4); - data = [ 0, 0]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 0); - }, Error, 'buffer too small'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 0); - }, Error, 'buffer too small'); - - /* Beyond the end of the buffer */ - buf = new Buffer(12); - data = [ 0, 0]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 11); - }, Error, 'write beyond end of buffer'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 11); - }, Error, 'write beyond end of buffer'); - - /* Write negative values */ - buf = new Buffer(12); - data = [ -3, 0 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write negative number'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write negative number'); - - data = [ 0, -3 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write negative number'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write negative number'); - - data = [ -3, -3 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write negative number'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write negative number'); - - - /* Write fractional values */ - buf = new Buffer(12); - data = [ 3.33, 0 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ 0, 3.3 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - data = [ 3.33, 2.42 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write fractions'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write fractions'); - - /* Write values that are too large */ - buf = new Buffer(12); - data = [ 0xffffffffff, 23 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ 0xffffffffff, 0xffffff238 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write too large'); - - data = [ 0x23, 0xffffff238 ]; - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'big', buf, 1); - }, Error, 'write too large'); - ASSERT.throws(function () { - mod_ctype.wuint64(data, 'little', buf, 1); - }, Error, 'write too large'); -} - - -testRead(); -testReadOver(); -testWriteZero(); -testWrite(); -testWriteInvalid(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.roundtrip.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.roundtrip.js deleted file mode 100644 index 87ae59b7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.roundtrip.js +++ /dev/null @@ -1,81 +0,0 @@ -/* - * A battery of tests for sucessful round-trip between writes and reads - */ - -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - - -/* - * What the heck, let's just test every value for 8-bits. - */ - -function test8() { - var data = new Buffer(1); - var i; - for (i = 0; i < 256; i++) { - mod_ctype.wuint8(i, 'big', data, 0); - ASSERT.equal(i, mod_ctype.ruint8(data, 'big', 0)); - mod_ctype.wuint8(i, 'little', data, 0); - ASSERT.equal(i, mod_ctype.ruint8(data, 'little', 0)); - } - ASSERT.ok(true); -} - -/* - * Test a random sample of 256 values in the 16-bit unsigned range - */ - -function test16() { - var data = new Buffer(2); - var i = 0; - for (i = 0; i < 256; i++) { - var value = Math.round(Math.random() * Math.pow(2, 16)); - mod_ctype.wuint16(value, 'big', data, 0); - ASSERT.equal(value, mod_ctype.ruint16(data, 'big', 0)); - mod_ctype.wuint16(value, 'little', data, 0); - ASSERT.equal(value, mod_ctype.ruint16(data, 'little', 0)); - } -} - -/* - * Test a random sample of 256 values in the 32-bit unsigned range - */ - -function test32() { - var data = new Buffer(4); - var i = 0; - for (i = 0; i < 256; i++) { - var value = Math.round(Math.random() * Math.pow(2, 32)); - mod_ctype.wuint32(value, 'big', data, 0); - ASSERT.equal(value, mod_ctype.ruint32(data, 'big', 0)); - mod_ctype.wuint32(value, 'little', data, 0); - ASSERT.equal(value, mod_ctype.ruint32(data, 'little', 0)); - } -} - -/* - * Test a random sample of 256 values in the 64-bit unsigned range - */ - -function test64() { - var data = new Buffer(8); - var i = 0; - for (i = 0; i < 256; i++) { - var low = Math.round(Math.random() * Math.pow(2, 32)); - var high = Math.round(Math.random() * Math.pow(2, 32)); - mod_ctype.wuint64([high, low], 'big', data, 0); - var result = mod_ctype.ruint64(data, 'big', 0); - ASSERT.equal(high, result[0]); - ASSERT.equal(low, result[1]); - mod_ctype.wuint64([high, low], 'little', data, 0); - result = mod_ctype.ruint64(data, 'little', 0); - ASSERT.equal(high, result[0]); - ASSERT.equal(low, result[1]); - } -} - -exports.test8 = test8; -exports.test16 = test16; -exports.test32 = test32; -exports.test64 = test64; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.ruint.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.ruint.js deleted file mode 100644 index b67c077f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.ruint.js +++ /dev/null @@ -1,95 +0,0 @@ -/* - * A battery of tests to help us read a series of uints - */ - -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - -/* - * We need to check the following things: - * - We are correctly resolving big endian (doesn't mean anything for 8 bit) - * - Correctly resolving little endian (doesn't mean anything for 8 bit) - * - Correctly using the offsets - * - Correctly interpreting values that are beyond the signed range as unsigned - */ -function test8() -{ - var data = new Buffer(4); - data[0] = 23; - data[1] = 23; - data[2] = 23; - data[3] = 23; - ASSERT.equal(23, mod_ctype.ruint8(data, 'big', 0)); - ASSERT.equal(23, mod_ctype.ruint8(data, 'little', 0)); - ASSERT.equal(23, mod_ctype.ruint8(data, 'big', 1)); - ASSERT.equal(23, mod_ctype.ruint8(data, 'little', 1)); - ASSERT.equal(23, mod_ctype.ruint8(data, 'big', 2)); - ASSERT.equal(23, mod_ctype.ruint8(data, 'little', 2)); - ASSERT.equal(23, mod_ctype.ruint8(data, 'big', 3)); - ASSERT.equal(23, mod_ctype.ruint8(data, 'little', 3)); - data[0] = 255; /* If it became a signed int, would be -1 */ - ASSERT.equal(255, mod_ctype.ruint8(data, 'big', 0)); - ASSERT.equal(255, mod_ctype.ruint8(data, 'little', 0)); -} - -/* - * Test 16 bit unsigned integers. We need to verify the same set as 8 bit, only - * now some of the issues actually matter: - * - We are correctly resolving big endian - * - Correctly resolving little endian - * - Correctly using the offsets - * - Correctly interpreting values that are beyond the signed range as unsigned - */ -function test16() -{ - var data = new Buffer(4); - /* Test signed values first */ - data[0] = 0; - data[1] = 0x23; - data[2] = 0x42; - data[3] = 0x3f; - - ASSERT.equal(0x23, mod_ctype.ruint16(data, 'big', 0)); - ASSERT.equal(0x2342, mod_ctype.ruint16(data, 'big', 1)); - ASSERT.equal(0x423f, mod_ctype.ruint16(data, 'big', 2)); - - ASSERT.equal(0x2300, mod_ctype.ruint16(data, 'little', 0)); - ASSERT.equal(0x4223, mod_ctype.ruint16(data, 'little', 1)); - ASSERT.equal(0x3f42, mod_ctype.ruint16(data, 'little', 2)); - - data[0] = 0xfe; - data[1] = 0xfe; - - ASSERT.equal(0xfefe, mod_ctype.ruint16(data, 'big', 0)); - ASSERT.equal(0xfefe, mod_ctype.ruint16(data, 'little', 0)); -} - -/* - * Test 32 bit unsigned integers. We need to verify the same set as 8 bit, only - * now some of the issues actually matter: - * - We are correctly resolving big endian - * - Correctly using the offsets - * - Correctly interpreting values that are beyond the signed range as unsigned - */ -function test32() -{ - var data = new Buffer(8); - data[0] = 0x32; - data[1] = 0x65; - data[2] = 0x42; - data[3] = 0x56; - data[4] = 0x23; - data[5] = 0xff; - - ASSERT.equal(0x32654256, mod_ctype.ruint32(data, 'big', 0)); - ASSERT.equal(0x65425623, mod_ctype.ruint32(data, 'big', 1)); - ASSERT.equal(0x425623ff, mod_ctype.ruint32(data, 'big', 2)); - - ASSERT.equal(0x56426532, mod_ctype.ruint32(data, 'little', 0)); - ASSERT.equal(0x23564265, mod_ctype.ruint32(data, 'little', 1)); - ASSERT.equal(0xff235642, mod_ctype.ruint32(data, 'little', 2)); -} - -test8(); -test16(); -test32(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.wuint.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.wuint.js deleted file mode 100644 index d6c4230f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.wuint.js +++ /dev/null @@ -1,156 +0,0 @@ -/* - * A battery of tests to help us read a series of uints - */ - -var mod_ctype = require('../../../ctio.js'); -var ASSERT = require('assert'); - -/* - * We need to check the following things: - * - We are correctly resolving big endian (doesn't mean anything for 8 bit) - * - Correctly resolving little endian (doesn't mean anything for 8 bit) - * - Correctly using the offsets - * - Correctly interpreting values that are beyond the signed range as unsigned - */ -function test8() -{ - var data = new Buffer(4); - mod_ctype.wuint8(23, 'big', data, 0); - mod_ctype.wuint8(23, 'big', data, 1); - mod_ctype.wuint8(23, 'big', data, 2); - mod_ctype.wuint8(23, 'big', data, 3); - ASSERT.equal(23, data[0]); - ASSERT.equal(23, data[1]); - ASSERT.equal(23, data[2]); - ASSERT.equal(23, data[3]); - mod_ctype.wuint8(23, 'little', data, 0); - mod_ctype.wuint8(23, 'little', data, 1); - mod_ctype.wuint8(23, 'little', data, 2); - mod_ctype.wuint8(23, 'little', data, 3); - ASSERT.equal(23, data[0]); - ASSERT.equal(23, data[1]); - ASSERT.equal(23, data[2]); - ASSERT.equal(23, data[3]); - mod_ctype.wuint8(255, 'big', data, 0); - ASSERT.equal(255, data[0]); - mod_ctype.wuint8(255, 'little', data, 0); - ASSERT.equal(255, data[0]); -} - -function test16() -{ - var value = 0x2343; - var data = new Buffer(4); - mod_ctype.wuint16(value, 'big', data, 0); - ASSERT.equal(0x23, data[0]); - ASSERT.equal(0x43, data[1]); - mod_ctype.wuint16(value, 'big', data, 1); - ASSERT.equal(0x23, data[1]); - ASSERT.equal(0x43, data[2]); - mod_ctype.wuint16(value, 'big', data, 2); - ASSERT.equal(0x23, data[2]); - ASSERT.equal(0x43, data[3]); - - mod_ctype.wuint16(value, 'little', data, 0); - ASSERT.equal(0x23, data[1]); - ASSERT.equal(0x43, data[0]); - - mod_ctype.wuint16(value, 'little', data, 1); - ASSERT.equal(0x23, data[2]); - ASSERT.equal(0x43, data[1]); - - mod_ctype.wuint16(value, 'little', data, 2); - ASSERT.equal(0x23, data[3]); - ASSERT.equal(0x43, data[2]); - - value = 0xff80; - mod_ctype.wuint16(value, 'little', data, 0); - ASSERT.equal(0xff, data[1]); - ASSERT.equal(0x80, data[0]); - - mod_ctype.wuint16(value, 'big', data, 0); - ASSERT.equal(0xff, data[0]); - ASSERT.equal(0x80, data[1]); -} - -function test32() -{ - var data = new Buffer(6); - var value = 0xe7f90a6d; - - mod_ctype.wuint32(value, 'big', data, 0); - ASSERT.equal(0xe7, data[0]); - ASSERT.equal(0xf9, data[1]); - ASSERT.equal(0x0a, data[2]); - ASSERT.equal(0x6d, data[3]); - - mod_ctype.wuint32(value, 'big', data, 1); - ASSERT.equal(0xe7, data[1]); - ASSERT.equal(0xf9, data[2]); - ASSERT.equal(0x0a, data[3]); - ASSERT.equal(0x6d, data[4]); - - mod_ctype.wuint32(value, 'big', data, 2); - ASSERT.equal(0xe7, data[2]); - ASSERT.equal(0xf9, data[3]); - ASSERT.equal(0x0a, data[4]); - ASSERT.equal(0x6d, data[5]); - - mod_ctype.wuint32(value, 'little', data, 0); - ASSERT.equal(0xe7, data[3]); - ASSERT.equal(0xf9, data[2]); - ASSERT.equal(0x0a, data[1]); - ASSERT.equal(0x6d, data[0]); - - mod_ctype.wuint32(value, 'little', data, 1); - ASSERT.equal(0xe7, data[4]); - ASSERT.equal(0xf9, data[3]); - ASSERT.equal(0x0a, data[2]); - ASSERT.equal(0x6d, data[1]); - - mod_ctype.wuint32(value, 'little', data, 2); - ASSERT.equal(0xe7, data[5]); - ASSERT.equal(0xf9, data[4]); - ASSERT.equal(0x0a, data[3]); - ASSERT.equal(0x6d, data[2]); -} - -function test64() -{ - var data = new Buffer(10); - var value = 0x0007cda8e7f90a6d; - var high = Math.floor(value / Math.pow(2, 32)); - var low = value - (high * Math.pow(2, 32)); - ASSERT.equal(0x0007cda8, high); - ASSERT.equal(0xe7f90a6d, low); - - mod_ctype.wuint64([high, low], 'big', data, 0); - ASSERT.equal(0x00, data[0]); - ASSERT.equal(0x07, data[1]); - ASSERT.equal(0xcd, data[2]); - ASSERT.equal(0xa8, data[3]); - ASSERT.equal(0xe7, data[4]); - ASSERT.equal(0xf9, data[5]); - ASSERT.equal(0x0a, data[6]); - ASSERT.equal(0x6d, data[7]); - - mod_ctype.wuint64([high, low], 'little', data, 0); - ASSERT.equal(0x6d, data[0]); - ASSERT.equal(0x0a, data[1]); - ASSERT.equal(0xf9, data[2]); - ASSERT.equal(0xe7, data[3]); - ASSERT.equal(0xa8, data[4]); - ASSERT.equal(0xcd, data[5]); - ASSERT.equal(0x07, data[6]); - ASSERT.equal(0x00, data[7]); -} - -test8(); -test16(); -test32(); -test64(); - -exports.test8 = test8; -exports.test16 = test16; -exports.test32 = test32; -exports.test64 = test64; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicr.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicr.js deleted file mode 100644 index e9895152..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicr.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Simple does to see if it works at all - */ -var mod_ctype = require('../../ctype'); -var ASSERT = require('assert'); -var mod_sys = require('sys'); - -function test() -{ - var ii, p, result, buffer; - - p = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer(4); - buffer[0] = 23; - buffer[3] = 42; - result = p.readData([ { x: { type: 'uint8_t' }}, - { y: { type: 'uint8_t', offset: 3 }} - ], buffer, 0); - ASSERT.equal(23, result['x']); - ASSERT.equal(42, result['y']); - - buffer = new Buffer(23); - for (ii = 0; ii < 23; ii++) - buffer[ii] = 0; - - buffer.write('Hello, world!'); - result = p.readData([ { x: { type: 'char[20]' }} ], buffer, 0); - - /* - * This is currently broken behvaior, need to redesign check - * ASSERT.equal('Hello, world!', result['x'].toString('utf-8', 0, - * result['x'].length)); - */ - - buffer = new Buffer(4); - buffer[0] = 0x03; - buffer[1] = 0x24; - buffer[2] = 0x25; - buffer[3] = 0x26; - result = p.readData([ { y: { type: 'uint8_t' }}, - { x: { type: 'uint8_t[y]' }}], buffer, 0); - console.log(mod_sys.inspect(result, true)); - - p.typedef('ssize_t', 'int32_t'); - ASSERT.deepEqual({ 'ssize_t': 'int32_t' }, p.lstypes()); - result = p.readData([ { x: { type: 'ssize_t' } } ], buffer, 0); - ASSERT.equal(0x26252403, result['x']); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicw.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicw.js deleted file mode 100644 index 89d446f2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicw.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Simple does it fucking work at all test - */ - -var mod_ctype = require('../../ctype'); -var ASSERT = require('assert'); -var mod_sys = require('sys'); - -function test() -{ - var ii, p, buffer, buf2; - - p = new mod_ctype.Parser({ endian: 'big' }); - buffer = new Buffer(4); - p.writeData([ { x: { type: 'uint8_t', value: 23 }}, - { y: { type: 'uint8_t', offset: 3, value: 42 }} - ], buffer, 0); - ASSERT.equal(23, buffer[0]); - ASSERT.equal(42, buffer[3]); - - buffer = new Buffer(20); - for (ii = 0; ii < 20; ii++) - buffer[ii] = 0; - - buffer.write('Hello, world!'); - buf2 = new Buffer(22); - p.writeData([ { x: { type: 'char[20]', value: buffer }} ], buf2, 0); - for (ii = 0; ii < 20; ii++) - ASSERT.equal(buffer[ii], buf2[ii]); - /* - * This is currently broken behvaior, need to redesign check - * ASSERT.equal('Hello, world!', result['x'].toString('utf-8', 0, - * result['x'].length)); - */ - - buffer = new Buffer(4); - p.writeData([ { y: { type: 'uint8_t', value: 3 }}, - { x: { type: 'uint8_t[y]', value: [ 0x24, 0x25, 0x26] }}], - buffer, 0); - console.log(mod_sys.inspect(buffer)); - - p.typedef('ssize_t', 'int32_t'); - ASSERT.deepEqual({ 'ssize_t': 'int32_t' }, p.lstypes()); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.char.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.char.js deleted file mode 100644 index 14d9529c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.char.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Test the different forms of reading characters: - * - * - the default, a single element buffer - * - uint8, values are uint8_ts - * - int8, values are int8_ts - */ -var mod_ctype = require('../../ctype'); -var mod_assert = require('assert'); - -function test() -{ - var p, buf, res; - - buf = new Buffer(1); - buf[0] = 255; - - p = new mod_ctype.Parser({ endian: 'little'}); - res = p.readData([ { c: { type: 'char' }} ], buf, 0); - res = res['c']; - mod_assert.ok(res instanceof Buffer); - mod_assert.equal(255, res[0]); - - p = new mod_ctype.Parser({ endian: 'little', - 'char-type': 'int8' }); - res = p.readData([ { c: { type: 'char' }} ], buf, 0); - res = res['c']; - mod_assert.ok(typeof (res) == 'number', 'got typeof (res): ' + - typeof (res)); - mod_assert.equal(-1, res); - - p = new mod_ctype.Parser({ endian: 'little', - 'char-type': 'uint8' }); - res = p.readData([ { c: { type: 'char' }} ], buf, 0); - res = res['c']; - mod_assert.ok(typeof (res) == 'number', 'got typeof (res): ' + - typeof (res)); - mod_assert.equal(255, res); - -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.endian.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.endian.js deleted file mode 100644 index 11fc2d2c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.endian.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Simple test to make sure that the endian setting works. - */ - -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -function test() -{ - var parser, buf; - - parser = new mod_ctype.Parser({ - endian: 'little' - }); - - buf = new Buffer(2); - parser.writeData([ { key: { type: 'uint16_t' } } ], buf, 0, [ 0x1234 ]); - mod_assert.equal(buf[0], 0x34); - mod_assert.equal(buf[1], 0x12); - parser.setEndian('big'); - - parser.writeData([ { key: { type: 'uint16_t' } } ], buf, 0, [ 0x1234 ]); - mod_assert.equal(buf[0], 0x12); - mod_assert.equal(buf[1], 0x34); - - parser.setEndian('little'); - parser.writeData([ { key: { type: 'uint16_t' } } ], buf, 0, [ 0x1234 ]); - mod_assert.equal(buf[0], 0x34); - mod_assert.equal(buf[1], 0x12); -} - -function fail() -{ - var parser; - - parser = new mod_ctype.Parser({ - endian: 'little' - }); - mod_assert.throws(function () { - parser.setEndian('littlebigwrong'); - }); -} - -test(); -fail(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.oldwrite.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.oldwrite.js deleted file mode 100644 index 9491cf6e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.oldwrite.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * A long overdue test to go through and verify that we can read and write - * structures as well as nested structures. - */ - -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -function test() -{ - var parser, buf, data; - parser = new mod_ctype.Parser({ - endian: 'little' - }); - parser.typedef('point_t', [ - { x: { type: 'uint8_t' } }, - { y: { type: 'uint8_t' } } - ]); - buf = new Buffer(2); - data = [ - { point: { type: 'point_t', value: [ 23, 42 ] } } - ]; - parser.writeData(data, buf, 0); - mod_assert.ok(buf[0] == 23); - mod_assert.ok(buf[1] == 42); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.readSize.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.readSize.js deleted file mode 100644 index 6c490a2e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.readSize.js +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Testing to ensure we're reading the expected number bytes - */ -var mod_ctype = require('../../ctype'); -var ASSERT = require('assert'); - -function testUint8() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('80', 'hex'); - result = parser.readStruct([ { item: { type: 'uint8_t' } } ], buffer, - 0); - ASSERT.equal(result['size'], 1); -} - -function testSint8() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('80', 'hex'); - result = parser.readStruct([ { item: { type: 'int8_t' } } ], buffer, 0); - ASSERT.equal(result['size'], 1); -} - -function testUint16() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('8000', 'hex'); - result = parser.readStruct([ { item: { type: 'uint16_t' } } ], buffer, - 0); - ASSERT.equal(result['size'], 2); -} - -function testSint16() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('8000', 'hex'); - result = parser.readStruct([ { item: { type: 'int16_t' } } ], buffer, - 0); - ASSERT.equal(result['size'], 2); -} - -function testUint32() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('80000000', 'hex'); - result = parser.readStruct([ { item: { type: 'uint32_t' } } ], buffer, - 0); - ASSERT.equal(result['size'], 4); -} - -function testSint32() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('80000000', 'hex'); - result = parser.readStruct([ { item: { type: 'int32_t' } } ], buffer, - 0); - ASSERT.equal(result['size'], 4); -} - -function testUint64() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('8000000000000000', 'hex'); - result = parser.readStruct([ { item: { type: 'uint64_t' } } ], buffer, - 0); - ASSERT.equal(result['size'], 8); -} - -function testSint64() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('8000000000000000', 'hex'); - result = parser.readStruct([ { item: { type: 'int64_t' } } ], buffer, - 0); - ASSERT.equal(result['size'], 8); -} - -function testFloat() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('ABAAAA3E', 'hex'); - result = parser.readStruct([ { item: { type: 'float' } } ], buffer, 0); - ASSERT.equal(result['size'], 4); -} - -function testDouble() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('000000000000F03F', 'hex'); - result = parser.readStruct([ { item: { type: 'double' } } ], buffer, 0); - ASSERT.equal(result['size'], 8); -} - -function testChar() -{ - var parser, result, buffer; - parser = new mod_ctype.Parser({ endian: 'little' }); - buffer = new Buffer('t'); - result = parser.readStruct([ { item: { type: 'char' } } ], buffer, 0); - ASSERT.equal(result['size'], 1); -} - -function test() -{ - testSint8(); - testUint8(); - testSint16(); - testUint16(); - testSint32(); - testUint32(); - testSint64(); - testUint64(); - testFloat(); - testDouble(); - testChar(); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.structw.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.structw.js deleted file mode 100644 index 09c1a5ba..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.structw.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * A long overdue test to go through and verify that we can read and write - * structures as well as nested structures. - */ - -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -function test() -{ - var parser, buf, data; - parser = new mod_ctype.Parser({ - endian: 'little' - }); - parser.typedef('point_t', [ - { x: { type: 'uint8_t' } }, - { y: { type: 'uint8_t' } } - ]); - buf = new Buffer(2); - data = [ - { point: { type: 'point_t' } } - ]; - parser.writeData(data, buf, 0, [ [ 23, 42 ] ]); - mod_assert.ok(buf[0] == 23); - mod_assert.ok(buf[1] == 42); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.writeStruct.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.writeStruct.js deleted file mode 100644 index 48556667..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.writeStruct.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Test to verify that the offset is incremented when structures are written to. - * Hopefully we will not regress issue #41 - */ - -var mod_ctype = require('../../ctype.js'); -var mod_assert = require('assert'); - -function test() -{ - var parser, buf, data; - parser = new mod_ctype.Parser({ - endian: 'little' - }); - parser.typedef('point_t', [ - { x: { type: 'uint8_t' } }, - { y: { type: 'uint8_t' } } - ]); - buf = new Buffer(4); - data = [ - { point1: { type: 'point_t' } }, - { point2: { type: 'point_t' } } - ]; - parser.writeData(data, buf, 0, [ [ 23, 42 ], [ 91, 18 ] ]); - mod_assert.ok(buf[0] == 23); - mod_assert.ok(buf[1] == 42); - mod_assert.ok(buf[2] == 91); - mod_assert.ok(buf[3] == 18); -} - -test(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/package.json deleted file mode 100644 index 416f618a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/http-signature/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "author": { - "name": "Joyent, Inc" - }, - "name": "http-signature", - "description": "Reference implementation of Joyent's HTTP Signature Scheme", - "version": "0.10.0", - "repository": { - "type": "git", - "url": "git://github.com/joyent/node-http-signature.git" - }, - "engines": { - "node": ">=0.8" - }, - "main": "lib/index.js", - "scripts": { - "test": "tap tst/*.js" - }, - "dependencies": { - "assert-plus": "0.1.2", - "asn1": "0.1.11", - "ctype": "0.5.2" - }, - "devDependencies": { - "node-uuid": "1.4.0", - "tap": "0.4.2" - }, - "readme": "# node-http-signature\n\nnode-http-signature is a node.js library that has client and server components\nfor Joyent's [HTTP Signature Scheme](http_signing.md).\n\n## Usage\n\nNote the example below signs a request with the same key/cert used to start an\nHTTP server. This is almost certainly not what you actaully want, but is just\nused to illustrate the API calls; you will need to provide your own key\nmanagement in addition to this library.\n\n### Client\n\n var fs = require('fs');\n var https = require('https');\n var httpSignature = require('http-signature');\n\n var key = fs.readFileSync('./key.pem', 'ascii');\n\n var options = {\n host: 'localhost',\n port: 8443,\n path: '/',\n method: 'GET',\n headers: {}\n };\n\n // Adds a 'Date' header in, signs it, and adds the\n // 'Authorization' header in.\n var req = https.request(options, function(res) {\n console.log(res.statusCode);\n });\n\n\n httpSignature.sign(req, {\n key: key,\n keyId: './cert.pem'\n });\n\n req.end();\n\n### Server\n\n var fs = require('fs');\n var https = require('https');\n var httpSignature = require('http-signature');\n\n var options = {\n key: fs.readFileSync('./key.pem'),\n cert: fs.readFileSync('./cert.pem')\n };\n\n https.createServer(options, function (req, res) {\n var rc = 200;\n var parsed = httpSignature.parseRequest(req);\n var pub = fs.readFileSync(parsed.keyId, 'ascii');\n if (!httpSignature.verifySignature(parsed, pub))\n rc = 401;\n\n res.writeHead(rc);\n res.end();\n }).listen(8443);\n\n## Installation\n\n npm install http-signature\n\n## License\n\nMIT.\n\n## Bugs\n\nSee <https://github.com/joyent/node-http-signature/issues>.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/joyent/node-http-signature/issues" - }, - "homepage": "https://github.com/joyent/node-http-signature", - "_id": "http-signature@0.10.0", - "dist": { - "shasum": "ed3c3415949cf275765bb5394a145ada7a1e506a" - }, - "_from": "http-signature@~0.10.0", - "_resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/README.md deleted file mode 100644 index 5d764f3a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# json-stringify-safe - -Like JSON.stringify, but doesn't throw on circular references. - -## Usage - -Takes the same arguments as `JSON.stringify`. - -```javascript -var stringify = require('json-stringify-safe'); -var circularObj = {}; -circularObj.circularRef = circularObj; -circularObj.list = [ circularObj, circularObj ]; -console.log(stringify(circularObj, null, 2)); -``` - -Output: - -```json -{ - "circularRef": "[Circular]", - "list": [ - "[Circular]", - "[Circular]" - ] -} -``` - -## Details - -``` -stringify(obj, serializer, indent, decycler) -``` - -The first three arguments are the same as to JSON.stringify. The last -is an argument that's only used when the object has been seen already. - -The default `decycler` function returns the string `'[Circular]'`. -If, for example, you pass in `function(k,v){}` (return nothing) then it -will prune cycles. If you pass in `function(k,v){ return {foo: 'bar'}}`, -then cyclical objects will always be represented as `{"foo":"bar"}` in -the result. - -``` -stringify.getSerialize(serializer, decycler) -``` - -Returns a serializer that can be used elsewhere. This is the actual -function that's passed to JSON.stringify. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/package.json deleted file mode 100644 index dc9929d9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "json-stringify-safe", - "version": "5.0.0", - "description": "Like JSON.stringify, but doesn't blow up on circular refs", - "main": "stringify.js", - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/json-stringify-safe" - }, - "keywords": [ - "json", - "stringify", - "circular", - "safe" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "license": "BSD", - "readmeFilename": "README.md", - "readme": "# json-stringify-safe\n\nLike JSON.stringify, but doesn't throw on circular references.\n\n## Usage\n\nTakes the same arguments as `JSON.stringify`.\n\n```javascript\nvar stringify = require('json-stringify-safe');\nvar circularObj = {};\ncircularObj.circularRef = circularObj;\ncircularObj.list = [ circularObj, circularObj ];\nconsole.log(stringify(circularObj, null, 2));\n```\n\nOutput:\n\n```json\n{\n \"circularRef\": \"[Circular]\",\n \"list\": [\n \"[Circular]\",\n \"[Circular]\"\n ]\n}\n```\n\n## Details\n\n```\nstringify(obj, serializer, indent, decycler)\n```\n\nThe first three arguments are the same as to JSON.stringify. The last\nis an argument that's only used when the object has been seen already.\n\nThe default `decycler` function returns the string `'[Circular]'`.\nIf, for example, you pass in `function(k,v){}` (return nothing) then it\nwill prune cycles. If you pass in `function(k,v){ return {foo: 'bar'}}`,\nthen cyclical objects will always be represented as `{\"foo\":\"bar\"}` in\nthe result.\n\n```\nstringify.getSerialize(serializer, decycler)\n```\n\nReturns a serializer that can be used elsewhere. This is the actual\nfunction that's passed to JSON.stringify.\n", - "bugs": { - "url": "https://github.com/isaacs/json-stringify-safe/issues" - }, - "homepage": "https://github.com/isaacs/json-stringify-safe", - "_id": "json-stringify-safe@5.0.0", - "dist": { - "shasum": "3bef04524e23eb51118883db0bcf4e18c49ed92c" - }, - "_from": "json-stringify-safe@~5.0.0", - "_resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/stringify.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/stringify.js deleted file mode 100644 index 853ef9b2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/stringify.js +++ /dev/null @@ -1,39 +0,0 @@ -module.exports = stringify; - -function getSerialize (fn, decycle) { - var seen = [], keys = []; - decycle = decycle || function(key, value) { - return '[Circular ' + getPath(value, seen, keys) + ']' - }; - return function(key, value) { - var ret = value; - if (typeof value === 'object' && value) { - if (seen.indexOf(value) !== -1) - ret = decycle(key, value); - else { - seen.push(value); - keys.push(key); - } - } - if (fn) ret = fn(key, ret); - return ret; - } -} - -function getPath (value, seen, keys) { - var index = seen.indexOf(value); - var path = [ keys[index] ]; - for (index--; index >= 0; index--) { - if (seen[index][ path[0] ] === value) { - value = seen[index]; - path.unshift(keys[index]); - } - } - return '~' + path.join('.'); -} - -function stringify(obj, fn, spaces, decycle) { - return JSON.stringify(obj, getSerialize(fn, decycle), spaces); -} - -stringify.getSerialize = getSerialize; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/test.js deleted file mode 100644 index 991e9197..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/json-stringify-safe/test.js +++ /dev/null @@ -1,128 +0,0 @@ -var stringify = require('./stringify.js'); - -var circularObj = { a: 'b' }; -circularObj.circularRef = circularObj; -circularObj.list = [ circularObj, circularObj ]; - -////////// -// default -var testObj = { - "a": "b", - "circularRef": "[Circular ~]", - "list": [ - "[Circular ~]", - "[Circular ~]" - ] -}; - -var assert = require('assert'); -assert.equal(JSON.stringify(testObj, null, 2), - stringify(circularObj, null, 2)); - -assert.equal(JSON.stringify(testObj, null, 2), - JSON.stringify(circularObj, stringify.getSerialize(), 2)); - - -//////// -// prune -testObj = { - "a": "b", - "list": [ - null, - null - ] -}; - -function prune(k, v) {} - -assert.equal(JSON.stringify(testObj, null, 2), - stringify(circularObj, null, 2, prune)); - -/////////// -// re-cycle -// (throws) -function recycle(k, v) { - return v; -} - -assert.throws(function() { - stringify(circularObj, null, 2, recycle); -}); - -//////// -// fancy -testObj = { - "a": "b", - "circularRef": "circularRef{a:string,circularRef:Object,list:Array}", - "list": [ - "0{a:string,circularRef:Object,list:Array}", - "1{a:string,circularRef:Object,list:Array}" - ] -}; - -function signer(key, value) { - var ret = key + '{'; - var f = false; - for (var i in value) { - if (f) - ret += ','; - f = true; - ret += i + ':'; - var v = value[i]; - switch (typeof v) { - case 'object': - if (!v) - ret += 'null'; - else if (Array.isArray(v)) - ret += 'Array' - else - ret += v.constructor && v.constructor.name || 'Object'; - break; - default: - ret += typeof v; - break; - } - } - ret += '}'; - return ret; -} - -assert.equal(JSON.stringify(testObj, null, 2), - stringify(circularObj, null, 2, signer)); - - -/////// -//multi -var a = { x: 1 }; -a.a = a; -var b = { x: 2 }; -b.a = a; - -var c = { a: a, b: b }; -var d = { list: [ a, b, c ] }; -d.d = d; - -var multi = { - "list": [ - { - "x": 1, - "a": "[Circular ~.list.0]" - }, - { - "x": 2, - "a": "[Circular ~.list.0]" - }, - { - "a": "[Circular ~.list.0]", - "b": "[Circular ~.list.1]" - } - ], - "d": "[Circular ~]" -}; - -assert.equal(JSON.stringify(multi, null, 2), - stringify(d, null, 2)); - -//////// -// pass! -console.log('ok'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/LICENSE deleted file mode 100644 index 451fc455..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Benjamin Thomas, Robert Kieffer - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/README.md deleted file mode 100644 index 6ca19bd1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/README.md +++ /dev/null @@ -1,66 +0,0 @@ -# mime - -Comprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community. - -## Install - -Install with [npm](http://github.com/isaacs/npm): - - npm install mime - -## API - Queries - -### mime.lookup(path) -Get the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g. - - var mime = require('mime'); - - mime.lookup('/path/to/file.txt'); // => 'text/plain' - mime.lookup('file.txt'); // => 'text/plain' - mime.lookup('.TXT'); // => 'text/plain' - mime.lookup('htm'); // => 'text/html' - -### mime.default_type -Sets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.) - -### mime.extension(type) -Get the default extension for `type` - - mime.extension('text/html'); // => 'html' - mime.extension('application/octet-stream'); // => 'bin' - -### mime.charsets.lookup() - -Map mime-type to charset - - mime.charsets.lookup('text/plain'); // => 'UTF-8' - -(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.) - -## API - Defining Custom Types - -The following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/broofa/node-mime/wiki/Requesting-New-Types). - -### mime.define() - -Add custom mime/extension mappings - - mime.define({ - 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'], - 'application/x-my-type': ['x-mt', 'x-mtt'], - // etc ... - }); - - mime.lookup('x-sft'); // => 'text/x-some-format' - -The first entry in the extensions array is returned by `mime.extension()`. E.g. - - mime.extension('text/x-some-format'); // => 'x-sf' - -### mime.load(filepath) - -Load mappings from an Apache ".types" format file - - mime.load('./my_project.types'); - -The .types file format is simple - See the `types` dir for examples. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/mime.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/mime.js deleted file mode 100644 index 48be0c5e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/mime.js +++ /dev/null @@ -1,114 +0,0 @@ -var path = require('path'); -var fs = require('fs'); - -function Mime() { - // Map of extension -> mime type - this.types = Object.create(null); - - // Map of mime type -> extension - this.extensions = Object.create(null); -} - -/** - * Define mimetype -> extension mappings. Each key is a mime-type that maps - * to an array of extensions associated with the type. The first extension is - * used as the default extension for the type. - * - * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']}); - * - * @param map (Object) type definitions - */ -Mime.prototype.define = function (map) { - for (var type in map) { - var exts = map[type]; - - for (var i = 0; i < exts.length; i++) { - if (process.env.DEBUG_MIME && this.types[exts]) { - console.warn(this._loading.replace(/.*\//, ''), 'changes "' + exts[i] + '" extension type from ' + - this.types[exts] + ' to ' + type); - } - - this.types[exts[i]] = type; - } - - // Default extension is the first one we encounter - if (!this.extensions[type]) { - this.extensions[type] = exts[0]; - } - } -}; - -/** - * Load an Apache2-style ".types" file - * - * This may be called multiple times (it's expected). Where files declare - * overlapping types/extensions, the last file wins. - * - * @param file (String) path of file to load. - */ -Mime.prototype.load = function(file) { - - this._loading = file; - // Read file and split into lines - var map = {}, - content = fs.readFileSync(file, 'ascii'), - lines = content.split(/[\r\n]+/); - - lines.forEach(function(line) { - // Clean up whitespace/comments, and split into fields - var fields = line.replace(/\s*#.*|^\s*|\s*$/g, '').split(/\s+/); - map[fields.shift()] = fields; - }); - - this.define(map); - - this._loading = null; -}; - -/** - * Lookup a mime type based on extension - */ -Mime.prototype.lookup = function(path, fallback) { - var ext = path.replace(/.*[\.\/\\]/, '').toLowerCase(); - - return this.types[ext] || fallback || this.default_type; -}; - -/** - * Return file extension associated with a mime type - */ -Mime.prototype.extension = function(mimeType) { - var type = mimeType.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase(); - return this.extensions[type]; -}; - -// Default instance -var mime = new Mime(); - -// Load local copy of -// http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types -mime.load(path.join(__dirname, 'types/mime.types')); - -// Load additional types from node.js community -mime.load(path.join(__dirname, 'types/node.types')); - -// Default type -mime.default_type = mime.lookup('bin'); - -// -// Additional API specific to the default instance -// - -mime.Mime = Mime; - -/** - * Lookup a charset based on mime type. - */ -mime.charsets = { - lookup: function(mimeType, fallback) { - // Assume text types are utf8 - return (/^text\//).test(mimeType) ? 'UTF-8' : fallback; - } -}; - -module.exports = mime; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/package.json deleted file mode 100644 index a9759392..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": { - "name": "Robert Kieffer", - "email": "robert@broofa.com", - "url": "http://github.com/broofa" - }, - "contributors": [ - { - "name": "Benjamin Thomas", - "email": "benjamin@benjaminthomas.org", - "url": "http://github.com/bentomas" - } - ], - "dependencies": {}, - "description": "A comprehensive library for mime-type mapping", - "devDependencies": {}, - "keywords": [ - "util", - "mime" - ], - "main": "mime.js", - "name": "mime", - "repository": { - "url": "https://github.com/broofa/node-mime", - "type": "git" - }, - "version": "1.2.11", - "readme": "# mime\n\nComprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community.\n\n## Install\n\nInstall with [npm](http://github.com/isaacs/npm):\n\n npm install mime\n\n## API - Queries\n\n### mime.lookup(path)\nGet the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g.\n\n var mime = require('mime');\n\n mime.lookup('/path/to/file.txt'); // => 'text/plain'\n mime.lookup('file.txt'); // => 'text/plain'\n mime.lookup('.TXT'); // => 'text/plain'\n mime.lookup('htm'); // => 'text/html'\n\n### mime.default_type\nSets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.)\n\n### mime.extension(type)\nGet the default extension for `type`\n\n mime.extension('text/html'); // => 'html'\n mime.extension('application/octet-stream'); // => 'bin'\n\n### mime.charsets.lookup()\n\nMap mime-type to charset\n\n mime.charsets.lookup('text/plain'); // => 'UTF-8'\n\n(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.)\n\n## API - Defining Custom Types\n\nThe following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/broofa/node-mime/wiki/Requesting-New-Types).\n\n### mime.define()\n\nAdd custom mime/extension mappings\n\n mime.define({\n 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'],\n 'application/x-my-type': ['x-mt', 'x-mtt'],\n // etc ...\n });\n\n mime.lookup('x-sft'); // => 'text/x-some-format'\n\nThe first entry in the extensions array is returned by `mime.extension()`. E.g.\n\n mime.extension('text/x-some-format'); // => 'x-sf'\n\n### mime.load(filepath)\n\nLoad mappings from an Apache \".types\" format file\n\n mime.load('./my_project.types');\n\nThe .types file format is simple - See the `types` dir for examples.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/broofa/node-mime/issues" - }, - "homepage": "https://github.com/broofa/node-mime", - "_id": "mime@1.2.11", - "_from": "mime@~1.2.9" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/test.js deleted file mode 100644 index 2cda1c7a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/test.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Usage: node test.js - */ - -var mime = require('./mime'); -var assert = require('assert'); -var path = require('path'); - -function eq(a, b) { - console.log('Test: ' + a + ' === ' + b); - assert.strictEqual.apply(null, arguments); -} - -console.log(Object.keys(mime.extensions).length + ' types'); -console.log(Object.keys(mime.types).length + ' extensions\n'); - -// -// Test mime lookups -// - -eq('text/plain', mime.lookup('text.txt')); // normal file -eq('text/plain', mime.lookup('TEXT.TXT')); // uppercase -eq('text/plain', mime.lookup('dir/text.txt')); // dir + file -eq('text/plain', mime.lookup('.text.txt')); // hidden file -eq('text/plain', mime.lookup('.txt')); // nameless -eq('text/plain', mime.lookup('txt')); // extension-only -eq('text/plain', mime.lookup('/txt')); // extension-less () -eq('text/plain', mime.lookup('\\txt')); // Windows, extension-less -eq('application/octet-stream', mime.lookup('text.nope')); // unrecognized -eq('fallback', mime.lookup('text.fallback', 'fallback')); // alternate default - -// -// Test extensions -// - -eq('txt', mime.extension(mime.types.text)); -eq('html', mime.extension(mime.types.htm)); -eq('bin', mime.extension('application/octet-stream')); -eq('bin', mime.extension('application/octet-stream ')); -eq('html', mime.extension(' text/html; charset=UTF-8')); -eq('html', mime.extension('text/html; charset=UTF-8 ')); -eq('html', mime.extension('text/html; charset=UTF-8')); -eq('html', mime.extension('text/html ; charset=UTF-8')); -eq('html', mime.extension('text/html;charset=UTF-8')); -eq('html', mime.extension('text/Html;charset=UTF-8')); -eq(undefined, mime.extension('unrecognized')); - -// -// Test node.types lookups -// - -eq('application/font-woff', mime.lookup('file.woff')); -eq('application/octet-stream', mime.lookup('file.buffer')); -eq('audio/mp4', mime.lookup('file.m4a')); -eq('font/opentype', mime.lookup('file.otf')); - -// -// Test charsets -// - -eq('UTF-8', mime.charsets.lookup('text/plain')); -eq(undefined, mime.charsets.lookup(mime.types.js)); -eq('fallback', mime.charsets.lookup('application/octet-stream', 'fallback')); - -// -// Test for overlaps between mime.types and node.types -// - -var apacheTypes = new mime.Mime(), nodeTypes = new mime.Mime(); -apacheTypes.load(path.join(__dirname, 'types/mime.types')); -nodeTypes.load(path.join(__dirname, 'types/node.types')); - -var keys = [].concat(Object.keys(apacheTypes.types)) - .concat(Object.keys(nodeTypes.types)); -keys.sort(); -for (var i = 1; i < keys.length; i++) { - if (keys[i] == keys[i-1]) { - console.warn('Warning: ' + - 'node.types defines ' + keys[i] + '->' + nodeTypes.types[keys[i]] + - ', mime.types defines ' + keys[i] + '->' + apacheTypes.types[keys[i]]); - } -} - -console.log('\nOK'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/types/mime.types b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/types/mime.types deleted file mode 100644 index da8cd691..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/types/mime.types +++ /dev/null @@ -1,1588 +0,0 @@ -# This file maps Internet media types to unique file extension(s). -# Although created for httpd, this file is used by many software systems -# and has been placed in the public domain for unlimited redisribution. -# -# The table below contains both registered and (common) unregistered types. -# A type that has no unique extension can be ignored -- they are listed -# here to guide configurations toward known types and to make it easier to -# identify "new" types. File extensions are also commonly used to indicate -# content languages and encodings, so choose them carefully. -# -# Internet media types should be registered as described in RFC 4288. -# The registry is at <http://www.iana.org/assignments/media-types/>. -# -# MIME type (lowercased) Extensions -# ============================================ ========== -# application/1d-interleaved-parityfec -# application/3gpp-ims+xml -# application/activemessage -application/andrew-inset ez -# application/applefile -application/applixware aw -application/atom+xml atom -application/atomcat+xml atomcat -# application/atomicmail -application/atomsvc+xml atomsvc -# application/auth-policy+xml -# application/batch-smtp -# application/beep+xml -# application/calendar+xml -# application/cals-1840 -# application/ccmp+xml -application/ccxml+xml ccxml -application/cdmi-capability cdmia -application/cdmi-container cdmic -application/cdmi-domain cdmid -application/cdmi-object cdmio -application/cdmi-queue cdmiq -# application/cea-2018+xml -# application/cellml+xml -# application/cfw -# application/cnrp+xml -# application/commonground -# application/conference-info+xml -# application/cpl+xml -# application/csta+xml -# application/cstadata+xml -application/cu-seeme cu -# application/cybercash -application/davmount+xml davmount -# application/dca-rft -# application/dec-dx -# application/dialog-info+xml -# application/dicom -# application/dns -application/docbook+xml dbk -# application/dskpp+xml -application/dssc+der dssc -application/dssc+xml xdssc -# application/dvcs -application/ecmascript ecma -# application/edi-consent -# application/edi-x12 -# application/edifact -application/emma+xml emma -# application/epp+xml -application/epub+zip epub -# application/eshop -# application/example -application/exi exi -# application/fastinfoset -# application/fastsoap -# application/fits -application/font-tdpfr pfr -# application/framework-attributes+xml -application/gml+xml gml -application/gpx+xml gpx -application/gxf gxf -# application/h224 -# application/held+xml -# application/http -application/hyperstudio stk -# application/ibe-key-request+xml -# application/ibe-pkg-reply+xml -# application/ibe-pp-data -# application/iges -# application/im-iscomposing+xml -# application/index -# application/index.cmd -# application/index.obj -# application/index.response -# application/index.vnd -application/inkml+xml ink inkml -# application/iotp -application/ipfix ipfix -# application/ipp -# application/isup -application/java-archive jar -application/java-serialized-object ser -application/java-vm class -application/javascript js -application/json json -application/jsonml+json jsonml -# application/kpml-request+xml -# application/kpml-response+xml -application/lost+xml lostxml -application/mac-binhex40 hqx -application/mac-compactpro cpt -# application/macwriteii -application/mads+xml mads -application/marc mrc -application/marcxml+xml mrcx -application/mathematica ma nb mb -# application/mathml-content+xml -# application/mathml-presentation+xml -application/mathml+xml mathml -# application/mbms-associated-procedure-description+xml -# application/mbms-deregister+xml -# application/mbms-envelope+xml -# application/mbms-msk+xml -# application/mbms-msk-response+xml -# application/mbms-protection-description+xml -# application/mbms-reception-report+xml -# application/mbms-register+xml -# application/mbms-register-response+xml -# application/mbms-user-service-description+xml -application/mbox mbox -# application/media_control+xml -application/mediaservercontrol+xml mscml -application/metalink+xml metalink -application/metalink4+xml meta4 -application/mets+xml mets -# application/mikey -application/mods+xml mods -# application/moss-keys -# application/moss-signature -# application/mosskey-data -# application/mosskey-request -application/mp21 m21 mp21 -application/mp4 mp4s -# application/mpeg4-generic -# application/mpeg4-iod -# application/mpeg4-iod-xmt -# application/msc-ivr+xml -# application/msc-mixer+xml -application/msword doc dot -application/mxf mxf -# application/nasdata -# application/news-checkgroups -# application/news-groupinfo -# application/news-transmission -# application/nss -# application/ocsp-request -# application/ocsp-response -application/octet-stream bin dms lrf mar so dist distz pkg bpk dump elc deploy -application/oda oda -application/oebps-package+xml opf -application/ogg ogx -application/omdoc+xml omdoc -application/onenote onetoc onetoc2 onetmp onepkg -application/oxps oxps -# application/parityfec -application/patch-ops-error+xml xer -application/pdf pdf -application/pgp-encrypted pgp -# application/pgp-keys -application/pgp-signature asc sig -application/pics-rules prf -# application/pidf+xml -# application/pidf-diff+xml -application/pkcs10 p10 -application/pkcs7-mime p7m p7c -application/pkcs7-signature p7s -application/pkcs8 p8 -application/pkix-attr-cert ac -application/pkix-cert cer -application/pkix-crl crl -application/pkix-pkipath pkipath -application/pkixcmp pki -application/pls+xml pls -# application/poc-settings+xml -application/postscript ai eps ps -# application/prs.alvestrand.titrax-sheet -application/prs.cww cww -# application/prs.nprend -# application/prs.plucker -# application/prs.rdf-xml-crypt -# application/prs.xsf+xml -application/pskc+xml pskcxml -# application/qsig -application/rdf+xml rdf -application/reginfo+xml rif -application/relax-ng-compact-syntax rnc -# application/remote-printing -application/resource-lists+xml rl -application/resource-lists-diff+xml rld -# application/riscos -# application/rlmi+xml -application/rls-services+xml rs -application/rpki-ghostbusters gbr -application/rpki-manifest mft -application/rpki-roa roa -# application/rpki-updown -application/rsd+xml rsd -application/rss+xml rss -application/rtf rtf -# application/rtx -# application/samlassertion+xml -# application/samlmetadata+xml -application/sbml+xml sbml -application/scvp-cv-request scq -application/scvp-cv-response scs -application/scvp-vp-request spq -application/scvp-vp-response spp -application/sdp sdp -# application/set-payment -application/set-payment-initiation setpay -# application/set-registration -application/set-registration-initiation setreg -# application/sgml -# application/sgml-open-catalog -application/shf+xml shf -# application/sieve -# application/simple-filter+xml -# application/simple-message-summary -# application/simplesymbolcontainer -# application/slate -# application/smil -application/smil+xml smi smil -# application/soap+fastinfoset -# application/soap+xml -application/sparql-query rq -application/sparql-results+xml srx -# application/spirits-event+xml -application/srgs gram -application/srgs+xml grxml -application/sru+xml sru -application/ssdl+xml ssdl -application/ssml+xml ssml -# application/tamp-apex-update -# application/tamp-apex-update-confirm -# application/tamp-community-update -# application/tamp-community-update-confirm -# application/tamp-error -# application/tamp-sequence-adjust -# application/tamp-sequence-adjust-confirm -# application/tamp-status-query -# application/tamp-status-response -# application/tamp-update -# application/tamp-update-confirm -application/tei+xml tei teicorpus -application/thraud+xml tfi -# application/timestamp-query -# application/timestamp-reply -application/timestamped-data tsd -# application/tve-trigger -# application/ulpfec -# application/vcard+xml -# application/vemmi -# application/vividence.scriptfile -# application/vnd.3gpp.bsf+xml -application/vnd.3gpp.pic-bw-large plb -application/vnd.3gpp.pic-bw-small psb -application/vnd.3gpp.pic-bw-var pvb -# application/vnd.3gpp.sms -# application/vnd.3gpp2.bcmcsinfo+xml -# application/vnd.3gpp2.sms -application/vnd.3gpp2.tcap tcap -application/vnd.3m.post-it-notes pwn -application/vnd.accpac.simply.aso aso -application/vnd.accpac.simply.imp imp -application/vnd.acucobol acu -application/vnd.acucorp atc acutc -application/vnd.adobe.air-application-installer-package+zip air -application/vnd.adobe.formscentral.fcdt fcdt -application/vnd.adobe.fxp fxp fxpl -# application/vnd.adobe.partial-upload -application/vnd.adobe.xdp+xml xdp -application/vnd.adobe.xfdf xfdf -# application/vnd.aether.imp -# application/vnd.ah-barcode -application/vnd.ahead.space ahead -application/vnd.airzip.filesecure.azf azf -application/vnd.airzip.filesecure.azs azs -application/vnd.amazon.ebook azw -application/vnd.americandynamics.acc acc -application/vnd.amiga.ami ami -# application/vnd.amundsen.maze+xml -application/vnd.android.package-archive apk -application/vnd.anser-web-certificate-issue-initiation cii -application/vnd.anser-web-funds-transfer-initiation fti -application/vnd.antix.game-component atx -application/vnd.apple.installer+xml mpkg -application/vnd.apple.mpegurl m3u8 -# application/vnd.arastra.swi -application/vnd.aristanetworks.swi swi -application/vnd.astraea-software.iota iota -application/vnd.audiograph aep -# application/vnd.autopackage -# application/vnd.avistar+xml -application/vnd.blueice.multipass mpm -# application/vnd.bluetooth.ep.oob -application/vnd.bmi bmi -application/vnd.businessobjects rep -# application/vnd.cab-jscript -# application/vnd.canon-cpdl -# application/vnd.canon-lips -# application/vnd.cendio.thinlinc.clientconf -application/vnd.chemdraw+xml cdxml -application/vnd.chipnuts.karaoke-mmd mmd -application/vnd.cinderella cdy -# application/vnd.cirpack.isdn-ext -application/vnd.claymore cla -application/vnd.cloanto.rp9 rp9 -application/vnd.clonk.c4group c4g c4d c4f c4p c4u -application/vnd.cluetrust.cartomobile-config c11amc -application/vnd.cluetrust.cartomobile-config-pkg c11amz -# application/vnd.collection+json -# application/vnd.commerce-battelle -application/vnd.commonspace csp -application/vnd.contact.cmsg cdbcmsg -application/vnd.cosmocaller cmc -application/vnd.crick.clicker clkx -application/vnd.crick.clicker.keyboard clkk -application/vnd.crick.clicker.palette clkp -application/vnd.crick.clicker.template clkt -application/vnd.crick.clicker.wordbank clkw -application/vnd.criticaltools.wbs+xml wbs -application/vnd.ctc-posml pml -# application/vnd.ctct.ws+xml -# application/vnd.cups-pdf -# application/vnd.cups-postscript -application/vnd.cups-ppd ppd -# application/vnd.cups-raster -# application/vnd.cups-raw -# application/vnd.curl -application/vnd.curl.car car -application/vnd.curl.pcurl pcurl -# application/vnd.cybank -application/vnd.dart dart -application/vnd.data-vision.rdz rdz -application/vnd.dece.data uvf uvvf uvd uvvd -application/vnd.dece.ttml+xml uvt uvvt -application/vnd.dece.unspecified uvx uvvx -application/vnd.dece.zip uvz uvvz -application/vnd.denovo.fcselayout-link fe_launch -# application/vnd.dir-bi.plate-dl-nosuffix -application/vnd.dna dna -application/vnd.dolby.mlp mlp -# application/vnd.dolby.mobile.1 -# application/vnd.dolby.mobile.2 -application/vnd.dpgraph dpg -application/vnd.dreamfactory dfac -application/vnd.ds-keypoint kpxx -application/vnd.dvb.ait ait -# application/vnd.dvb.dvbj -# application/vnd.dvb.esgcontainer -# application/vnd.dvb.ipdcdftnotifaccess -# application/vnd.dvb.ipdcesgaccess -# application/vnd.dvb.ipdcesgaccess2 -# application/vnd.dvb.ipdcesgpdd -# application/vnd.dvb.ipdcroaming -# application/vnd.dvb.iptv.alfec-base -# application/vnd.dvb.iptv.alfec-enhancement -# application/vnd.dvb.notif-aggregate-root+xml -# application/vnd.dvb.notif-container+xml -# application/vnd.dvb.notif-generic+xml -# application/vnd.dvb.notif-ia-msglist+xml -# application/vnd.dvb.notif-ia-registration-request+xml -# application/vnd.dvb.notif-ia-registration-response+xml -# application/vnd.dvb.notif-init+xml -# application/vnd.dvb.pfr -application/vnd.dvb.service svc -# application/vnd.dxr -application/vnd.dynageo geo -# application/vnd.easykaraoke.cdgdownload -# application/vnd.ecdis-update -application/vnd.ecowin.chart mag -# application/vnd.ecowin.filerequest -# application/vnd.ecowin.fileupdate -# application/vnd.ecowin.series -# application/vnd.ecowin.seriesrequest -# application/vnd.ecowin.seriesupdate -# application/vnd.emclient.accessrequest+xml -application/vnd.enliven nml -# application/vnd.eprints.data+xml -application/vnd.epson.esf esf -application/vnd.epson.msf msf -application/vnd.epson.quickanime qam -application/vnd.epson.salt slt -application/vnd.epson.ssf ssf -# application/vnd.ericsson.quickcall -application/vnd.eszigno3+xml es3 et3 -# application/vnd.etsi.aoc+xml -# application/vnd.etsi.cug+xml -# application/vnd.etsi.iptvcommand+xml -# application/vnd.etsi.iptvdiscovery+xml -# application/vnd.etsi.iptvprofile+xml -# application/vnd.etsi.iptvsad-bc+xml -# application/vnd.etsi.iptvsad-cod+xml -# application/vnd.etsi.iptvsad-npvr+xml -# application/vnd.etsi.iptvservice+xml -# application/vnd.etsi.iptvsync+xml -# application/vnd.etsi.iptvueprofile+xml -# application/vnd.etsi.mcid+xml -# application/vnd.etsi.overload-control-policy-dataset+xml -# application/vnd.etsi.sci+xml -# application/vnd.etsi.simservs+xml -# application/vnd.etsi.tsl+xml -# application/vnd.etsi.tsl.der -# application/vnd.eudora.data -application/vnd.ezpix-album ez2 -application/vnd.ezpix-package ez3 -# application/vnd.f-secure.mobile -application/vnd.fdf fdf -application/vnd.fdsn.mseed mseed -application/vnd.fdsn.seed seed dataless -# application/vnd.ffsns -# application/vnd.fints -application/vnd.flographit gph -application/vnd.fluxtime.clip ftc -# application/vnd.font-fontforge-sfd -application/vnd.framemaker fm frame maker book -application/vnd.frogans.fnc fnc -application/vnd.frogans.ltf ltf -application/vnd.fsc.weblaunch fsc -application/vnd.fujitsu.oasys oas -application/vnd.fujitsu.oasys2 oa2 -application/vnd.fujitsu.oasys3 oa3 -application/vnd.fujitsu.oasysgp fg5 -application/vnd.fujitsu.oasysprs bh2 -# application/vnd.fujixerox.art-ex -# application/vnd.fujixerox.art4 -# application/vnd.fujixerox.hbpl -application/vnd.fujixerox.ddd ddd -application/vnd.fujixerox.docuworks xdw -application/vnd.fujixerox.docuworks.binder xbd -# application/vnd.fut-misnet -application/vnd.fuzzysheet fzs -application/vnd.genomatix.tuxedo txd -# application/vnd.geocube+xml -application/vnd.geogebra.file ggb -application/vnd.geogebra.tool ggt -application/vnd.geometry-explorer gex gre -application/vnd.geonext gxt -application/vnd.geoplan g2w -application/vnd.geospace g3w -# application/vnd.globalplatform.card-content-mgt -# application/vnd.globalplatform.card-content-mgt-response -application/vnd.gmx gmx -application/vnd.google-earth.kml+xml kml -application/vnd.google-earth.kmz kmz -application/vnd.grafeq gqf gqs -# application/vnd.gridmp -application/vnd.groove-account gac -application/vnd.groove-help ghf -application/vnd.groove-identity-message gim -application/vnd.groove-injector grv -application/vnd.groove-tool-message gtm -application/vnd.groove-tool-template tpl -application/vnd.groove-vcard vcg -# application/vnd.hal+json -application/vnd.hal+xml hal -application/vnd.handheld-entertainment+xml zmm -application/vnd.hbci hbci -# application/vnd.hcl-bireports -application/vnd.hhe.lesson-player les -application/vnd.hp-hpgl hpgl -application/vnd.hp-hpid hpid -application/vnd.hp-hps hps -application/vnd.hp-jlyt jlt -application/vnd.hp-pcl pcl -application/vnd.hp-pclxl pclxl -# application/vnd.httphone -application/vnd.hydrostatix.sof-data sfd-hdstx -# application/vnd.hzn-3d-crossword -# application/vnd.ibm.afplinedata -# application/vnd.ibm.electronic-media -application/vnd.ibm.minipay mpy -application/vnd.ibm.modcap afp listafp list3820 -application/vnd.ibm.rights-management irm -application/vnd.ibm.secure-container sc -application/vnd.iccprofile icc icm -application/vnd.igloader igl -application/vnd.immervision-ivp ivp -application/vnd.immervision-ivu ivu -# application/vnd.informedcontrol.rms+xml -# application/vnd.informix-visionary -# application/vnd.infotech.project -# application/vnd.infotech.project+xml -# application/vnd.innopath.wamp.notification -application/vnd.insors.igm igm -application/vnd.intercon.formnet xpw xpx -application/vnd.intergeo i2g -# application/vnd.intertrust.digibox -# application/vnd.intertrust.nncp -application/vnd.intu.qbo qbo -application/vnd.intu.qfx qfx -# application/vnd.iptc.g2.conceptitem+xml -# application/vnd.iptc.g2.knowledgeitem+xml -# application/vnd.iptc.g2.newsitem+xml -# application/vnd.iptc.g2.newsmessage+xml -# application/vnd.iptc.g2.packageitem+xml -# application/vnd.iptc.g2.planningitem+xml -application/vnd.ipunplugged.rcprofile rcprofile -application/vnd.irepository.package+xml irp -application/vnd.is-xpr xpr -application/vnd.isac.fcs fcs -application/vnd.jam jam -# application/vnd.japannet-directory-service -# application/vnd.japannet-jpnstore-wakeup -# application/vnd.japannet-payment-wakeup -# application/vnd.japannet-registration -# application/vnd.japannet-registration-wakeup -# application/vnd.japannet-setstore-wakeup -# application/vnd.japannet-verification -# application/vnd.japannet-verification-wakeup -application/vnd.jcp.javame.midlet-rms rms -application/vnd.jisp jisp -application/vnd.joost.joda-archive joda -application/vnd.kahootz ktz ktr -application/vnd.kde.karbon karbon -application/vnd.kde.kchart chrt -application/vnd.kde.kformula kfo -application/vnd.kde.kivio flw -application/vnd.kde.kontour kon -application/vnd.kde.kpresenter kpr kpt -application/vnd.kde.kspread ksp -application/vnd.kde.kword kwd kwt -application/vnd.kenameaapp htke -application/vnd.kidspiration kia -application/vnd.kinar kne knp -application/vnd.koan skp skd skt skm -application/vnd.kodak-descriptor sse -application/vnd.las.las+xml lasxml -# application/vnd.liberty-request+xml -application/vnd.llamagraphics.life-balance.desktop lbd -application/vnd.llamagraphics.life-balance.exchange+xml lbe -application/vnd.lotus-1-2-3 123 -application/vnd.lotus-approach apr -application/vnd.lotus-freelance pre -application/vnd.lotus-notes nsf -application/vnd.lotus-organizer org -application/vnd.lotus-screencam scm -application/vnd.lotus-wordpro lwp -application/vnd.macports.portpkg portpkg -# application/vnd.marlin.drm.actiontoken+xml -# application/vnd.marlin.drm.conftoken+xml -# application/vnd.marlin.drm.license+xml -# application/vnd.marlin.drm.mdcf -application/vnd.mcd mcd -application/vnd.medcalcdata mc1 -application/vnd.mediastation.cdkey cdkey -# application/vnd.meridian-slingshot -application/vnd.mfer mwf -application/vnd.mfmp mfm -application/vnd.micrografx.flo flo -application/vnd.micrografx.igx igx -application/vnd.mif mif -# application/vnd.minisoft-hp3000-save -# application/vnd.mitsubishi.misty-guard.trustweb -application/vnd.mobius.daf daf -application/vnd.mobius.dis dis -application/vnd.mobius.mbk mbk -application/vnd.mobius.mqy mqy -application/vnd.mobius.msl msl -application/vnd.mobius.plc plc -application/vnd.mobius.txf txf -application/vnd.mophun.application mpn -application/vnd.mophun.certificate mpc -# application/vnd.motorola.flexsuite -# application/vnd.motorola.flexsuite.adsi -# application/vnd.motorola.flexsuite.fis -# application/vnd.motorola.flexsuite.gotap -# application/vnd.motorola.flexsuite.kmr -# application/vnd.motorola.flexsuite.ttc -# application/vnd.motorola.flexsuite.wem -# application/vnd.motorola.iprm -application/vnd.mozilla.xul+xml xul -application/vnd.ms-artgalry cil -# application/vnd.ms-asf -application/vnd.ms-cab-compressed cab -# application/vnd.ms-color.iccprofile -application/vnd.ms-excel xls xlm xla xlc xlt xlw -application/vnd.ms-excel.addin.macroenabled.12 xlam -application/vnd.ms-excel.sheet.binary.macroenabled.12 xlsb -application/vnd.ms-excel.sheet.macroenabled.12 xlsm -application/vnd.ms-excel.template.macroenabled.12 xltm -application/vnd.ms-fontobject eot -application/vnd.ms-htmlhelp chm -application/vnd.ms-ims ims -application/vnd.ms-lrm lrm -# application/vnd.ms-office.activex+xml -application/vnd.ms-officetheme thmx -# application/vnd.ms-opentype -# application/vnd.ms-package.obfuscated-opentype -application/vnd.ms-pki.seccat cat -application/vnd.ms-pki.stl stl -# application/vnd.ms-playready.initiator+xml -application/vnd.ms-powerpoint ppt pps pot -application/vnd.ms-powerpoint.addin.macroenabled.12 ppam -application/vnd.ms-powerpoint.presentation.macroenabled.12 pptm -application/vnd.ms-powerpoint.slide.macroenabled.12 sldm -application/vnd.ms-powerpoint.slideshow.macroenabled.12 ppsm -application/vnd.ms-powerpoint.template.macroenabled.12 potm -# application/vnd.ms-printing.printticket+xml -application/vnd.ms-project mpp mpt -# application/vnd.ms-tnef -# application/vnd.ms-wmdrm.lic-chlg-req -# application/vnd.ms-wmdrm.lic-resp -# application/vnd.ms-wmdrm.meter-chlg-req -# application/vnd.ms-wmdrm.meter-resp -application/vnd.ms-word.document.macroenabled.12 docm -application/vnd.ms-word.template.macroenabled.12 dotm -application/vnd.ms-works wps wks wcm wdb -application/vnd.ms-wpl wpl -application/vnd.ms-xpsdocument xps -application/vnd.mseq mseq -# application/vnd.msign -# application/vnd.multiad.creator -# application/vnd.multiad.creator.cif -# application/vnd.music-niff -application/vnd.musician mus -application/vnd.muvee.style msty -application/vnd.mynfc taglet -# application/vnd.ncd.control -# application/vnd.ncd.reference -# application/vnd.nervana -# application/vnd.netfpx -application/vnd.neurolanguage.nlu nlu -application/vnd.nitf ntf nitf -application/vnd.noblenet-directory nnd -application/vnd.noblenet-sealer nns -application/vnd.noblenet-web nnw -# application/vnd.nokia.catalogs -# application/vnd.nokia.conml+wbxml -# application/vnd.nokia.conml+xml -# application/vnd.nokia.isds-radio-presets -# application/vnd.nokia.iptv.config+xml -# application/vnd.nokia.landmark+wbxml -# application/vnd.nokia.landmark+xml -# application/vnd.nokia.landmarkcollection+xml -# application/vnd.nokia.n-gage.ac+xml -application/vnd.nokia.n-gage.data ngdat -application/vnd.nokia.n-gage.symbian.install n-gage -# application/vnd.nokia.ncd -# application/vnd.nokia.pcd+wbxml -# application/vnd.nokia.pcd+xml -application/vnd.nokia.radio-preset rpst -application/vnd.nokia.radio-presets rpss -application/vnd.novadigm.edm edm -application/vnd.novadigm.edx edx -application/vnd.novadigm.ext ext -# application/vnd.ntt-local.file-transfer -# application/vnd.ntt-local.sip-ta_remote -# application/vnd.ntt-local.sip-ta_tcp_stream -application/vnd.oasis.opendocument.chart odc -application/vnd.oasis.opendocument.chart-template otc -application/vnd.oasis.opendocument.database odb -application/vnd.oasis.opendocument.formula odf -application/vnd.oasis.opendocument.formula-template odft -application/vnd.oasis.opendocument.graphics odg -application/vnd.oasis.opendocument.graphics-template otg -application/vnd.oasis.opendocument.image odi -application/vnd.oasis.opendocument.image-template oti -application/vnd.oasis.opendocument.presentation odp -application/vnd.oasis.opendocument.presentation-template otp -application/vnd.oasis.opendocument.spreadsheet ods -application/vnd.oasis.opendocument.spreadsheet-template ots -application/vnd.oasis.opendocument.text odt -application/vnd.oasis.opendocument.text-master odm -application/vnd.oasis.opendocument.text-template ott -application/vnd.oasis.opendocument.text-web oth -# application/vnd.obn -# application/vnd.oftn.l10n+json -# application/vnd.oipf.contentaccessdownload+xml -# application/vnd.oipf.contentaccessstreaming+xml -# application/vnd.oipf.cspg-hexbinary -# application/vnd.oipf.dae.svg+xml -# application/vnd.oipf.dae.xhtml+xml -# application/vnd.oipf.mippvcontrolmessage+xml -# application/vnd.oipf.pae.gem -# application/vnd.oipf.spdiscovery+xml -# application/vnd.oipf.spdlist+xml -# application/vnd.oipf.ueprofile+xml -# application/vnd.oipf.userprofile+xml -application/vnd.olpc-sugar xo -# application/vnd.oma-scws-config -# application/vnd.oma-scws-http-request -# application/vnd.oma-scws-http-response -# application/vnd.oma.bcast.associated-procedure-parameter+xml -# application/vnd.oma.bcast.drm-trigger+xml -# application/vnd.oma.bcast.imd+xml -# application/vnd.oma.bcast.ltkm -# application/vnd.oma.bcast.notification+xml -# application/vnd.oma.bcast.provisioningtrigger -# application/vnd.oma.bcast.sgboot -# application/vnd.oma.bcast.sgdd+xml -# application/vnd.oma.bcast.sgdu -# application/vnd.oma.bcast.simple-symbol-container -# application/vnd.oma.bcast.smartcard-trigger+xml -# application/vnd.oma.bcast.sprov+xml -# application/vnd.oma.bcast.stkm -# application/vnd.oma.cab-address-book+xml -# application/vnd.oma.cab-feature-handler+xml -# application/vnd.oma.cab-pcc+xml -# application/vnd.oma.cab-user-prefs+xml -# application/vnd.oma.dcd -# application/vnd.oma.dcdc -application/vnd.oma.dd2+xml dd2 -# application/vnd.oma.drm.risd+xml -# application/vnd.oma.group-usage-list+xml -# application/vnd.oma.pal+xml -# application/vnd.oma.poc.detailed-progress-report+xml -# application/vnd.oma.poc.final-report+xml -# application/vnd.oma.poc.groups+xml -# application/vnd.oma.poc.invocation-descriptor+xml -# application/vnd.oma.poc.optimized-progress-report+xml -# application/vnd.oma.push -# application/vnd.oma.scidm.messages+xml -# application/vnd.oma.xcap-directory+xml -# application/vnd.omads-email+xml -# application/vnd.omads-file+xml -# application/vnd.omads-folder+xml -# application/vnd.omaloc-supl-init -application/vnd.openofficeorg.extension oxt -# application/vnd.openxmlformats-officedocument.custom-properties+xml -# application/vnd.openxmlformats-officedocument.customxmlproperties+xml -# application/vnd.openxmlformats-officedocument.drawing+xml -# application/vnd.openxmlformats-officedocument.drawingml.chart+xml -# application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml -# application/vnd.openxmlformats-officedocument.extended-properties+xml -# application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml -# application/vnd.openxmlformats-officedocument.presentationml.comments+xml -# application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml -# application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml -# application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml -application/vnd.openxmlformats-officedocument.presentationml.presentation pptx -# application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.presprops+xml -application/vnd.openxmlformats-officedocument.presentationml.slide sldx -# application/vnd.openxmlformats-officedocument.presentationml.slide+xml -# application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml -# application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml -application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx -# application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml -# application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml -# application/vnd.openxmlformats-officedocument.presentationml.tags+xml -application/vnd.openxmlformats-officedocument.presentationml.template potx -# application/vnd.openxmlformats-officedocument.presentationml.template.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx -# application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx -# application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml -# application/vnd.openxmlformats-officedocument.theme+xml -# application/vnd.openxmlformats-officedocument.themeoverride+xml -# application/vnd.openxmlformats-officedocument.vmldrawing -# application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.document docx -# application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx -# application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml -# application/vnd.openxmlformats-package.core-properties+xml -# application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml -# application/vnd.openxmlformats-package.relationships+xml -# application/vnd.quobject-quoxdocument -# application/vnd.osa.netdeploy -application/vnd.osgeo.mapguide.package mgp -# application/vnd.osgi.bundle -application/vnd.osgi.dp dp -application/vnd.osgi.subsystem esa -# application/vnd.otps.ct-kip+xml -application/vnd.palm pdb pqa oprc -# application/vnd.paos.xml -application/vnd.pawaafile paw -application/vnd.pg.format str -application/vnd.pg.osasli ei6 -# application/vnd.piaccess.application-licence -application/vnd.picsel efif -application/vnd.pmi.widget wg -# application/vnd.poc.group-advertisement+xml -application/vnd.pocketlearn plf -application/vnd.powerbuilder6 pbd -# application/vnd.powerbuilder6-s -# application/vnd.powerbuilder7 -# application/vnd.powerbuilder7-s -# application/vnd.powerbuilder75 -# application/vnd.powerbuilder75-s -# application/vnd.preminet -application/vnd.previewsystems.box box -application/vnd.proteus.magazine mgz -application/vnd.publishare-delta-tree qps -application/vnd.pvi.ptid1 ptid -# application/vnd.pwg-multiplexed -# application/vnd.pwg-xhtml-print+xml -# application/vnd.qualcomm.brew-app-res -application/vnd.quark.quarkxpress qxd qxt qwd qwt qxl qxb -# application/vnd.radisys.moml+xml -# application/vnd.radisys.msml+xml -# application/vnd.radisys.msml-audit+xml -# application/vnd.radisys.msml-audit-conf+xml -# application/vnd.radisys.msml-audit-conn+xml -# application/vnd.radisys.msml-audit-dialog+xml -# application/vnd.radisys.msml-audit-stream+xml -# application/vnd.radisys.msml-conf+xml -# application/vnd.radisys.msml-dialog+xml -# application/vnd.radisys.msml-dialog-base+xml -# application/vnd.radisys.msml-dialog-fax-detect+xml -# application/vnd.radisys.msml-dialog-fax-sendrecv+xml -# application/vnd.radisys.msml-dialog-group+xml -# application/vnd.radisys.msml-dialog-speech+xml -# application/vnd.radisys.msml-dialog-transform+xml -# application/vnd.rainstor.data -# application/vnd.rapid -application/vnd.realvnc.bed bed -application/vnd.recordare.musicxml mxl -application/vnd.recordare.musicxml+xml musicxml -# application/vnd.renlearn.rlprint -application/vnd.rig.cryptonote cryptonote -application/vnd.rim.cod cod -application/vnd.rn-realmedia rm -application/vnd.rn-realmedia-vbr rmvb -application/vnd.route66.link66+xml link66 -# application/vnd.rs-274x -# application/vnd.ruckus.download -# application/vnd.s3sms -application/vnd.sailingtracker.track st -# application/vnd.sbm.cid -# application/vnd.sbm.mid2 -# application/vnd.scribus -# application/vnd.sealed.3df -# application/vnd.sealed.csf -# application/vnd.sealed.doc -# application/vnd.sealed.eml -# application/vnd.sealed.mht -# application/vnd.sealed.net -# application/vnd.sealed.ppt -# application/vnd.sealed.tiff -# application/vnd.sealed.xls -# application/vnd.sealedmedia.softseal.html -# application/vnd.sealedmedia.softseal.pdf -application/vnd.seemail see -application/vnd.sema sema -application/vnd.semd semd -application/vnd.semf semf -application/vnd.shana.informed.formdata ifm -application/vnd.shana.informed.formtemplate itp -application/vnd.shana.informed.interchange iif -application/vnd.shana.informed.package ipk -application/vnd.simtech-mindmapper twd twds -application/vnd.smaf mmf -# application/vnd.smart.notebook -application/vnd.smart.teacher teacher -# application/vnd.software602.filler.form+xml -# application/vnd.software602.filler.form-xml-zip -application/vnd.solent.sdkm+xml sdkm sdkd -application/vnd.spotfire.dxp dxp -application/vnd.spotfire.sfs sfs -# application/vnd.sss-cod -# application/vnd.sss-dtf -# application/vnd.sss-ntf -application/vnd.stardivision.calc sdc -application/vnd.stardivision.draw sda -application/vnd.stardivision.impress sdd -application/vnd.stardivision.math smf -application/vnd.stardivision.writer sdw vor -application/vnd.stardivision.writer-global sgl -application/vnd.stepmania.package smzip -application/vnd.stepmania.stepchart sm -# application/vnd.street-stream -application/vnd.sun.xml.calc sxc -application/vnd.sun.xml.calc.template stc -application/vnd.sun.xml.draw sxd -application/vnd.sun.xml.draw.template std -application/vnd.sun.xml.impress sxi -application/vnd.sun.xml.impress.template sti -application/vnd.sun.xml.math sxm -application/vnd.sun.xml.writer sxw -application/vnd.sun.xml.writer.global sxg -application/vnd.sun.xml.writer.template stw -# application/vnd.sun.wadl+xml -application/vnd.sus-calendar sus susp -application/vnd.svd svd -# application/vnd.swiftview-ics -application/vnd.symbian.install sis sisx -application/vnd.syncml+xml xsm -application/vnd.syncml.dm+wbxml bdm -application/vnd.syncml.dm+xml xdm -# application/vnd.syncml.dm.notification -# application/vnd.syncml.ds.notification -application/vnd.tao.intent-module-archive tao -application/vnd.tcpdump.pcap pcap cap dmp -application/vnd.tmobile-livetv tmo -application/vnd.trid.tpt tpt -application/vnd.triscape.mxs mxs -application/vnd.trueapp tra -# application/vnd.truedoc -# application/vnd.ubisoft.webplayer -application/vnd.ufdl ufd ufdl -application/vnd.uiq.theme utz -application/vnd.umajin umj -application/vnd.unity unityweb -application/vnd.uoml+xml uoml -# application/vnd.uplanet.alert -# application/vnd.uplanet.alert-wbxml -# application/vnd.uplanet.bearer-choice -# application/vnd.uplanet.bearer-choice-wbxml -# application/vnd.uplanet.cacheop -# application/vnd.uplanet.cacheop-wbxml -# application/vnd.uplanet.channel -# application/vnd.uplanet.channel-wbxml -# application/vnd.uplanet.list -# application/vnd.uplanet.list-wbxml -# application/vnd.uplanet.listcmd -# application/vnd.uplanet.listcmd-wbxml -# application/vnd.uplanet.signal -application/vnd.vcx vcx -# application/vnd.vd-study -# application/vnd.vectorworks -# application/vnd.verimatrix.vcas -# application/vnd.vidsoft.vidconference -application/vnd.visio vsd vst vss vsw -application/vnd.visionary vis -# application/vnd.vividence.scriptfile -application/vnd.vsf vsf -# application/vnd.wap.sic -# application/vnd.wap.slc -application/vnd.wap.wbxml wbxml -application/vnd.wap.wmlc wmlc -application/vnd.wap.wmlscriptc wmlsc -application/vnd.webturbo wtb -# application/vnd.wfa.wsc -# application/vnd.wmc -# application/vnd.wmf.bootstrap -# application/vnd.wolfram.mathematica -# application/vnd.wolfram.mathematica.package -application/vnd.wolfram.player nbp -application/vnd.wordperfect wpd -application/vnd.wqd wqd -# application/vnd.wrq-hp3000-labelled -application/vnd.wt.stf stf -# application/vnd.wv.csp+wbxml -# application/vnd.wv.csp+xml -# application/vnd.wv.ssp+xml -application/vnd.xara xar -application/vnd.xfdl xfdl -# application/vnd.xfdl.webform -# application/vnd.xmi+xml -# application/vnd.xmpie.cpkg -# application/vnd.xmpie.dpkg -# application/vnd.xmpie.plan -# application/vnd.xmpie.ppkg -# application/vnd.xmpie.xlim -application/vnd.yamaha.hv-dic hvd -application/vnd.yamaha.hv-script hvs -application/vnd.yamaha.hv-voice hvp -application/vnd.yamaha.openscoreformat osf -application/vnd.yamaha.openscoreformat.osfpvg+xml osfpvg -# application/vnd.yamaha.remote-setup -application/vnd.yamaha.smaf-audio saf -application/vnd.yamaha.smaf-phrase spf -# application/vnd.yamaha.through-ngn -# application/vnd.yamaha.tunnel-udpencap -application/vnd.yellowriver-custom-menu cmp -application/vnd.zul zir zirz -application/vnd.zzazz.deck+xml zaz -application/voicexml+xml vxml -# application/vq-rtcpxr -# application/watcherinfo+xml -# application/whoispp-query -# application/whoispp-response -application/widget wgt -application/winhlp hlp -# application/wita -# application/wordperfect5.1 -application/wsdl+xml wsdl -application/wspolicy+xml wspolicy -application/x-7z-compressed 7z -application/x-abiword abw -application/x-ace-compressed ace -# application/x-amf -application/x-apple-diskimage dmg -application/x-authorware-bin aab x32 u32 vox -application/x-authorware-map aam -application/x-authorware-seg aas -application/x-bcpio bcpio -application/x-bittorrent torrent -application/x-blorb blb blorb -application/x-bzip bz -application/x-bzip2 bz2 boz -application/x-cbr cbr cba cbt cbz cb7 -application/x-cdlink vcd -application/x-cfs-compressed cfs -application/x-chat chat -application/x-chess-pgn pgn -application/x-conference nsc -# application/x-compress -application/x-cpio cpio -application/x-csh csh -application/x-debian-package deb udeb -application/x-dgc-compressed dgc -application/x-director dir dcr dxr cst cct cxt w3d fgd swa -application/x-doom wad -application/x-dtbncx+xml ncx -application/x-dtbook+xml dtb -application/x-dtbresource+xml res -application/x-dvi dvi -application/x-envoy evy -application/x-eva eva -application/x-font-bdf bdf -# application/x-font-dos -# application/x-font-framemaker -application/x-font-ghostscript gsf -# application/x-font-libgrx -application/x-font-linux-psf psf -application/x-font-otf otf -application/x-font-pcf pcf -application/x-font-snf snf -# application/x-font-speedo -# application/x-font-sunos-news -application/x-font-ttf ttf ttc -application/x-font-type1 pfa pfb pfm afm -application/font-woff woff -# application/x-font-vfont -application/x-freearc arc -application/x-futuresplash spl -application/x-gca-compressed gca -application/x-glulx ulx -application/x-gnumeric gnumeric -application/x-gramps-xml gramps -application/x-gtar gtar -# application/x-gzip -application/x-hdf hdf -application/x-install-instructions install -application/x-iso9660-image iso -application/x-java-jnlp-file jnlp -application/x-latex latex -application/x-lzh-compressed lzh lha -application/x-mie mie -application/x-mobipocket-ebook prc mobi -application/x-ms-application application -application/x-ms-shortcut lnk -application/x-ms-wmd wmd -application/x-ms-wmz wmz -application/x-ms-xbap xbap -application/x-msaccess mdb -application/x-msbinder obd -application/x-mscardfile crd -application/x-msclip clp -application/x-msdownload exe dll com bat msi -application/x-msmediaview mvb m13 m14 -application/x-msmetafile wmf wmz emf emz -application/x-msmoney mny -application/x-mspublisher pub -application/x-msschedule scd -application/x-msterminal trm -application/x-mswrite wri -application/x-netcdf nc cdf -application/x-nzb nzb -application/x-pkcs12 p12 pfx -application/x-pkcs7-certificates p7b spc -application/x-pkcs7-certreqresp p7r -application/x-rar-compressed rar -application/x-research-info-systems ris -application/x-sh sh -application/x-shar shar -application/x-shockwave-flash swf -application/x-silverlight-app xap -application/x-sql sql -application/x-stuffit sit -application/x-stuffitx sitx -application/x-subrip srt -application/x-sv4cpio sv4cpio -application/x-sv4crc sv4crc -application/x-t3vm-image t3 -application/x-tads gam -application/x-tar tar -application/x-tcl tcl -application/x-tex tex -application/x-tex-tfm tfm -application/x-texinfo texinfo texi -application/x-tgif obj -application/x-ustar ustar -application/x-wais-source src -application/x-x509-ca-cert der crt -application/x-xfig fig -application/x-xliff+xml xlf -application/x-xpinstall xpi -application/x-xz xz -application/x-zmachine z1 z2 z3 z4 z5 z6 z7 z8 -# application/x400-bp -application/xaml+xml xaml -# application/xcap-att+xml -# application/xcap-caps+xml -application/xcap-diff+xml xdf -# application/xcap-el+xml -# application/xcap-error+xml -# application/xcap-ns+xml -# application/xcon-conference-info-diff+xml -# application/xcon-conference-info+xml -application/xenc+xml xenc -application/xhtml+xml xhtml xht -# application/xhtml-voice+xml -application/xml xml xsl -application/xml-dtd dtd -# application/xml-external-parsed-entity -# application/xmpp+xml -application/xop+xml xop -application/xproc+xml xpl -application/xslt+xml xslt -application/xspf+xml xspf -application/xv+xml mxml xhvml xvml xvm -application/yang yang -application/yin+xml yin -application/zip zip -# audio/1d-interleaved-parityfec -# audio/32kadpcm -# audio/3gpp -# audio/3gpp2 -# audio/ac3 -audio/adpcm adp -# audio/amr -# audio/amr-wb -# audio/amr-wb+ -# audio/asc -# audio/atrac-advanced-lossless -# audio/atrac-x -# audio/atrac3 -audio/basic au snd -# audio/bv16 -# audio/bv32 -# audio/clearmode -# audio/cn -# audio/dat12 -# audio/dls -# audio/dsr-es201108 -# audio/dsr-es202050 -# audio/dsr-es202211 -# audio/dsr-es202212 -# audio/dv -# audio/dvi4 -# audio/eac3 -# audio/evrc -# audio/evrc-qcp -# audio/evrc0 -# audio/evrc1 -# audio/evrcb -# audio/evrcb0 -# audio/evrcb1 -# audio/evrcwb -# audio/evrcwb0 -# audio/evrcwb1 -# audio/example -# audio/fwdred -# audio/g719 -# audio/g722 -# audio/g7221 -# audio/g723 -# audio/g726-16 -# audio/g726-24 -# audio/g726-32 -# audio/g726-40 -# audio/g728 -# audio/g729 -# audio/g7291 -# audio/g729d -# audio/g729e -# audio/gsm -# audio/gsm-efr -# audio/gsm-hr-08 -# audio/ilbc -# audio/ip-mr_v2.5 -# audio/isac -# audio/l16 -# audio/l20 -# audio/l24 -# audio/l8 -# audio/lpc -audio/midi mid midi kar rmi -# audio/mobile-xmf -audio/mp4 mp4a -# audio/mp4a-latm -# audio/mpa -# audio/mpa-robust -audio/mpeg mpga mp2 mp2a mp3 m2a m3a -# audio/mpeg4-generic -# audio/musepack -audio/ogg oga ogg spx -# audio/opus -# audio/parityfec -# audio/pcma -# audio/pcma-wb -# audio/pcmu-wb -# audio/pcmu -# audio/prs.sid -# audio/qcelp -# audio/red -# audio/rtp-enc-aescm128 -# audio/rtp-midi -# audio/rtx -audio/s3m s3m -audio/silk sil -# audio/smv -# audio/smv0 -# audio/smv-qcp -# audio/sp-midi -# audio/speex -# audio/t140c -# audio/t38 -# audio/telephone-event -# audio/tone -# audio/uemclip -# audio/ulpfec -# audio/vdvi -# audio/vmr-wb -# audio/vnd.3gpp.iufp -# audio/vnd.4sb -# audio/vnd.audiokoz -# audio/vnd.celp -# audio/vnd.cisco.nse -# audio/vnd.cmles.radio-events -# audio/vnd.cns.anp1 -# audio/vnd.cns.inf1 -audio/vnd.dece.audio uva uvva -audio/vnd.digital-winds eol -# audio/vnd.dlna.adts -# audio/vnd.dolby.heaac.1 -# audio/vnd.dolby.heaac.2 -# audio/vnd.dolby.mlp -# audio/vnd.dolby.mps -# audio/vnd.dolby.pl2 -# audio/vnd.dolby.pl2x -# audio/vnd.dolby.pl2z -# audio/vnd.dolby.pulse.1 -audio/vnd.dra dra -audio/vnd.dts dts -audio/vnd.dts.hd dtshd -# audio/vnd.dvb.file -# audio/vnd.everad.plj -# audio/vnd.hns.audio -audio/vnd.lucent.voice lvp -audio/vnd.ms-playready.media.pya pya -# audio/vnd.nokia.mobile-xmf -# audio/vnd.nortel.vbk -audio/vnd.nuera.ecelp4800 ecelp4800 -audio/vnd.nuera.ecelp7470 ecelp7470 -audio/vnd.nuera.ecelp9600 ecelp9600 -# audio/vnd.octel.sbc -# audio/vnd.qcelp -# audio/vnd.rhetorex.32kadpcm -audio/vnd.rip rip -# audio/vnd.sealedmedia.softseal.mpeg -# audio/vnd.vmx.cvsd -# audio/vorbis -# audio/vorbis-config -audio/webm weba -audio/x-aac aac -audio/x-aiff aif aiff aifc -audio/x-caf caf -audio/x-flac flac -audio/x-matroska mka -audio/x-mpegurl m3u -audio/x-ms-wax wax -audio/x-ms-wma wma -audio/x-pn-realaudio ram ra -audio/x-pn-realaudio-plugin rmp -# audio/x-tta -audio/x-wav wav -audio/xm xm -chemical/x-cdx cdx -chemical/x-cif cif -chemical/x-cmdf cmdf -chemical/x-cml cml -chemical/x-csml csml -# chemical/x-pdb -chemical/x-xyz xyz -image/bmp bmp -image/cgm cgm -# image/example -# image/fits -image/g3fax g3 -image/gif gif -image/ief ief -# image/jp2 -image/jpeg jpeg jpg jpe -# image/jpm -# image/jpx -image/ktx ktx -# image/naplps -image/png png -image/prs.btif btif -# image/prs.pti -image/sgi sgi -image/svg+xml svg svgz -# image/t38 -image/tiff tiff tif -# image/tiff-fx -image/vnd.adobe.photoshop psd -# image/vnd.cns.inf2 -image/vnd.dece.graphic uvi uvvi uvg uvvg -image/vnd.dvb.subtitle sub -image/vnd.djvu djvu djv -image/vnd.dwg dwg -image/vnd.dxf dxf -image/vnd.fastbidsheet fbs -image/vnd.fpx fpx -image/vnd.fst fst -image/vnd.fujixerox.edmics-mmr mmr -image/vnd.fujixerox.edmics-rlc rlc -# image/vnd.globalgraphics.pgb -# image/vnd.microsoft.icon -# image/vnd.mix -image/vnd.ms-modi mdi -image/vnd.ms-photo wdp -image/vnd.net-fpx npx -# image/vnd.radiance -# image/vnd.sealed.png -# image/vnd.sealedmedia.softseal.gif -# image/vnd.sealedmedia.softseal.jpg -# image/vnd.svf -image/vnd.wap.wbmp wbmp -image/vnd.xiff xif -image/webp webp -image/x-3ds 3ds -image/x-cmu-raster ras -image/x-cmx cmx -image/x-freehand fh fhc fh4 fh5 fh7 -image/x-icon ico -image/x-mrsid-image sid -image/x-pcx pcx -image/x-pict pic pct -image/x-portable-anymap pnm -image/x-portable-bitmap pbm -image/x-portable-graymap pgm -image/x-portable-pixmap ppm -image/x-rgb rgb -image/x-tga tga -image/x-xbitmap xbm -image/x-xpixmap xpm -image/x-xwindowdump xwd -# message/cpim -# message/delivery-status -# message/disposition-notification -# message/example -# message/external-body -# message/feedback-report -# message/global -# message/global-delivery-status -# message/global-disposition-notification -# message/global-headers -# message/http -# message/imdn+xml -# message/news -# message/partial -message/rfc822 eml mime -# message/s-http -# message/sip -# message/sipfrag -# message/tracking-status -# message/vnd.si.simp -# model/example -model/iges igs iges -model/mesh msh mesh silo -model/vnd.collada+xml dae -model/vnd.dwf dwf -# model/vnd.flatland.3dml -model/vnd.gdl gdl -# model/vnd.gs-gdl -# model/vnd.gs.gdl -model/vnd.gtw gtw -# model/vnd.moml+xml -model/vnd.mts mts -# model/vnd.parasolid.transmit.binary -# model/vnd.parasolid.transmit.text -model/vnd.vtu vtu -model/vrml wrl vrml -model/x3d+binary x3db x3dbz -model/x3d+vrml x3dv x3dvz -model/x3d+xml x3d x3dz -# multipart/alternative -# multipart/appledouble -# multipart/byteranges -# multipart/digest -# multipart/encrypted -# multipart/example -# multipart/form-data -# multipart/header-set -# multipart/mixed -# multipart/parallel -# multipart/related -# multipart/report -# multipart/signed -# multipart/voice-message -# text/1d-interleaved-parityfec -text/cache-manifest appcache -text/calendar ics ifb -text/css css -text/csv csv -# text/directory -# text/dns -# text/ecmascript -# text/enriched -# text/example -# text/fwdred -text/html html htm -# text/javascript -text/n3 n3 -# text/parityfec -text/plain txt text conf def list log in -# text/prs.fallenstein.rst -text/prs.lines.tag dsc -# text/vnd.radisys.msml-basic-layout -# text/red -# text/rfc822-headers -text/richtext rtx -# text/rtf -# text/rtp-enc-aescm128 -# text/rtx -text/sgml sgml sgm -# text/t140 -text/tab-separated-values tsv -text/troff t tr roff man me ms -text/turtle ttl -# text/ulpfec -text/uri-list uri uris urls -text/vcard vcard -# text/vnd.abc -text/vnd.curl curl -text/vnd.curl.dcurl dcurl -text/vnd.curl.scurl scurl -text/vnd.curl.mcurl mcurl -# text/vnd.dmclientscript -text/vnd.dvb.subtitle sub -# text/vnd.esmertec.theme-descriptor -text/vnd.fly fly -text/vnd.fmi.flexstor flx -text/vnd.graphviz gv -text/vnd.in3d.3dml 3dml -text/vnd.in3d.spot spot -# text/vnd.iptc.newsml -# text/vnd.iptc.nitf -# text/vnd.latex-z -# text/vnd.motorola.reflex -# text/vnd.ms-mediapackage -# text/vnd.net2phone.commcenter.command -# text/vnd.si.uricatalogue -text/vnd.sun.j2me.app-descriptor jad -# text/vnd.trolltech.linguist -# text/vnd.wap.si -# text/vnd.wap.sl -text/vnd.wap.wml wml -text/vnd.wap.wmlscript wmls -text/x-asm s asm -text/x-c c cc cxx cpp h hh dic -text/x-fortran f for f77 f90 -text/x-java-source java -text/x-opml opml -text/x-pascal p pas -text/x-nfo nfo -text/x-setext etx -text/x-sfv sfv -text/x-uuencode uu -text/x-vcalendar vcs -text/x-vcard vcf -# text/xml -# text/xml-external-parsed-entity -# video/1d-interleaved-parityfec -video/3gpp 3gp -# video/3gpp-tt -video/3gpp2 3g2 -# video/bmpeg -# video/bt656 -# video/celb -# video/dv -# video/example -video/h261 h261 -video/h263 h263 -# video/h263-1998 -# video/h263-2000 -video/h264 h264 -# video/h264-rcdo -# video/h264-svc -video/jpeg jpgv -# video/jpeg2000 -video/jpm jpm jpgm -video/mj2 mj2 mjp2 -# video/mp1s -# video/mp2p -# video/mp2t -video/mp4 mp4 mp4v mpg4 -# video/mp4v-es -video/mpeg mpeg mpg mpe m1v m2v -# video/mpeg4-generic -# video/mpv -# video/nv -video/ogg ogv -# video/parityfec -# video/pointer -video/quicktime qt mov -# video/raw -# video/rtp-enc-aescm128 -# video/rtx -# video/smpte292m -# video/ulpfec -# video/vc1 -# video/vnd.cctv -video/vnd.dece.hd uvh uvvh -video/vnd.dece.mobile uvm uvvm -# video/vnd.dece.mp4 -video/vnd.dece.pd uvp uvvp -video/vnd.dece.sd uvs uvvs -video/vnd.dece.video uvv uvvv -# video/vnd.directv.mpeg -# video/vnd.directv.mpeg-tts -# video/vnd.dlna.mpeg-tts -video/vnd.dvb.file dvb -video/vnd.fvt fvt -# video/vnd.hns.video -# video/vnd.iptvforum.1dparityfec-1010 -# video/vnd.iptvforum.1dparityfec-2005 -# video/vnd.iptvforum.2dparityfec-1010 -# video/vnd.iptvforum.2dparityfec-2005 -# video/vnd.iptvforum.ttsavc -# video/vnd.iptvforum.ttsmpeg2 -# video/vnd.motorola.video -# video/vnd.motorola.videop -video/vnd.mpegurl mxu m4u -video/vnd.ms-playready.media.pyv pyv -# video/vnd.nokia.interleaved-multimedia -# video/vnd.nokia.videovoip -# video/vnd.objectvideo -# video/vnd.sealed.mpeg1 -# video/vnd.sealed.mpeg4 -# video/vnd.sealed.swf -# video/vnd.sealedmedia.softseal.mov -video/vnd.uvvu.mp4 uvu uvvu -video/vnd.vivo viv -video/webm webm -video/x-f4v f4v -video/x-fli fli -video/x-flv flv -video/x-m4v m4v -video/x-matroska mkv mk3d mks -video/x-mng mng -video/x-ms-asf asf asx -video/x-ms-vob vob -video/x-ms-wm wm -video/x-ms-wmv wmv -video/x-ms-wmx wmx -video/x-ms-wvx wvx -video/x-msvideo avi -video/x-sgi-movie movie -video/x-smv smv -x-conference/x-cooltalk ice diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/types/node.types b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/types/node.types deleted file mode 100644 index 55b2cf79..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/mime/types/node.types +++ /dev/null @@ -1,77 +0,0 @@ -# What: WebVTT -# Why: To allow formats intended for marking up external text track resources. -# http://dev.w3.org/html5/webvtt/ -# Added by: niftylettuce -text/vtt vtt - -# What: Google Chrome Extension -# Why: To allow apps to (work) be served with the right content type header. -# http://codereview.chromium.org/2830017 -# Added by: niftylettuce -application/x-chrome-extension crx - -# What: HTC support -# Why: To properly render .htc files such as CSS3PIE -# Added by: niftylettuce -text/x-component htc - -# What: HTML5 application cache manifes ('.manifest' extension) -# Why: De-facto standard. Required by Mozilla browser when serving HTML5 apps -# per https://developer.mozilla.org/en/offline_resources_in_firefox -# Added by: louisremi -text/cache-manifest manifest - -# What: node binary buffer format -# Why: semi-standard extension w/in the node community -# Added by: tootallnate -application/octet-stream buffer - -# What: The "protected" MP-4 formats used by iTunes. -# Why: Required for streaming music to browsers (?) -# Added by: broofa -application/mp4 m4p -audio/mp4 m4a - -# What: Video format, Part of RFC1890 -# Why: See https://github.com/bentomas/node-mime/pull/6 -# Added by: mjrusso -video/MP2T ts - -# What: EventSource mime type -# Why: mime type of Server-Sent Events stream -# http://www.w3.org/TR/eventsource/#text-event-stream -# Added by: francois2metz -text/event-stream event-stream - -# What: Mozilla App manifest mime type -# Why: https://developer.mozilla.org/en/Apps/Manifest#Serving_manifests -# Added by: ednapiranha -application/x-web-app-manifest+json webapp - -# What: Lua file types -# Why: Googling around shows de-facto consensus on these -# Added by: creationix (Issue #45) -text/x-lua lua -application/x-lua-bytecode luac - -# What: Markdown files, as per http://daringfireball.net/projects/markdown/syntax -# Why: http://stackoverflow.com/questions/10701983/what-is-the-mime-type-for-markdown -# Added by: avoidwork -text/x-markdown markdown md mkd - -# What: ini files -# Why: because they're just text files -# Added by: Matthew Kastor -text/plain ini - -# What: DASH Adaptive Streaming manifest -# Why: https://developer.mozilla.org/en-US/docs/DASH_Adaptive_Streaming_for_HTML_5_Video -# Added by: eelcocramer -application/dash+xml mdp - -# What: OpenType font files - http://www.microsoft.com/typography/otspec/ -# Why: Browsers usually ignore the font MIME types and sniff the content, -# but Chrome, shows a warning if OpenType fonts aren't served with -# the `font/opentype` MIME type: http://i.imgur.com/8c5RN8M.png. -# Added by: alrra -font/opentype otf diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/.npmignore deleted file mode 100644 index fd4f2b06..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -.DS_Store diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/LICENSE.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/LICENSE.md deleted file mode 100644 index f039427f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/LICENSE.md +++ /dev/null @@ -1,2 +0,0 @@ -Copyright (c) 2010-2012 Robert Kieffer -MIT License - http://opensource.org/licenses/mit-license.php diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/README.md deleted file mode 100644 index e436a89f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/README.md +++ /dev/null @@ -1,207 +0,0 @@ -# node-uuid - -Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. - -Features: - -* Generate RFC4122 version 1 or version 4 UUIDs -* Runs in node.js and all browsers. -* Registered as a [ComponentJS](https://github.com/component/component) [component](https://github.com/component/component/wiki/Components) ('broofa/node-uuid'). -* Cryptographically strong random # generation on supporting platforms -* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! ) -* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html) - -## Getting Started - -Install it in your browser: - -```html -<script src="uuid.js"></script> -``` - -Or in node.js: - -``` -npm install node-uuid -``` - -```javascript -var uuid = require('node-uuid'); -``` - -Then create some ids ... - -```javascript -// Generate a v1 (time-based) id -uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' - -// Generate a v4 (random) id -uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1' -``` - -## API - -### uuid.v1([`options` [, `buffer` [, `offset`]]]) - -Generate and return a RFC4122 v1 (timestamp-based) UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. - * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. - * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used. - * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Notes: - -1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) - -Example: Generate string UUID with fully-specified options - -```javascript -uuid.v1({ - node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], - clockseq: 0x1234, - msecs: new Date('2011-11-01').getTime(), - nsecs: 5678 -}); // -> "710b962e-041c-11e1-9234-0123456789ab" -``` - -Example: In-place generation of two binary IDs - -```javascript -// Generate two ids in an array -var arr = new Array(32); // -> [] -uuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15] -uuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15] - -// Optionally use uuid.unparse() to get stringify the ids -uuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115' -uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115' -``` - -### uuid.v4([`options` [, `buffer` [, `offset`]]]) - -Generate and return a RFC4122 v4 UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values - * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Example: Generate string UUID with fully-specified options - -```javascript -uuid.v4({ - random: [ - 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, - 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 - ] -}); -// -> "109156be-c4fb-41ea-b1b4-efe1671c5836" -``` - -Example: Generate two IDs in a single buffer - -```javascript -var buffer = new Array(32); // (or 'new Buffer' in node.js) -uuid.v4(null, buffer, 0); -uuid.v4(null, buffer, 16); -``` - -### uuid.parse(id[, buffer[, offset]]) -### uuid.unparse(buffer[, offset]) - -Parse and unparse UUIDs - - * `id` - (String) UUID(-like) string - * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used - * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0 - -Example parsing and unparsing a UUID string - -```javascript -var bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> <Buffer 79 7f f0 43 11 eb 11 e1 80 d6 51 09 98 75 5d 10> -var string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10' -``` - -### uuid.noConflict() - -(Browsers only) Set `uuid` property back to it's previous value. - -Returns the node-uuid object. - -Example: - -```javascript -var myUuid = uuid.noConflict(); -myUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' -``` - -## Deprecated APIs - -Support for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version. - -### uuid([format [, buffer [, offset]]]) - -uuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary). - -### uuid.BufferClass - -The class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API. - -## Testing - -In node.js - -``` -> cd test -> node test.js -``` - -In Browser - -``` -open test/test.html -``` - -### Benchmarking - -Requires node.js - -``` -npm install uuid uuid-js -node benchmark/benchmark.js -``` - -For a more complete discussion of node-uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/node-uuid/wiki/Benchmark) - -For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance). - -## Release notes - -### 1.4.0 - -* Improved module context detection -* Removed public RNG functions - -### 1.3.2 - -* Improve tests and handling of v1() options (Issue #24) -* Expose RNG option to allow for perf testing with different generators - -### 1.3.0 - -* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! -* Support for node.js crypto API -* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/README.md deleted file mode 100644 index aaeb2ea0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# node-uuid Benchmarks - -### Results - -To see the results of our benchmarks visit https://github.com/broofa/node-uuid/wiki/Benchmark - -### Run them yourself - -node-uuid comes with some benchmarks to measure performance of generating UUIDs. These can be run using node.js. node-uuid is being benchmarked against some other uuid modules, that are available through npm namely `uuid` and `uuid-js`. - -To prepare and run the benchmark issue; - -``` -npm install uuid uuid-js -node benchmark/benchmark.js -``` - -You'll see an output like this one: - -``` -# v4 -nodeuuid.v4(): 854700 uuids/second -nodeuuid.v4('binary'): 788643 uuids/second -nodeuuid.v4('binary', buffer): 1336898 uuids/second -uuid(): 479386 uuids/second -uuid('binary'): 582072 uuids/second -uuidjs.create(4): 312304 uuids/second - -# v1 -nodeuuid.v1(): 938086 uuids/second -nodeuuid.v1('binary'): 683060 uuids/second -nodeuuid.v1('binary', buffer): 1644736 uuids/second -uuidjs.create(1): 190621 uuids/second -``` - -* The `uuid()` entries are for Nikhil Marathe's [uuid module](https://bitbucket.org/nikhilm/uuidjs) which is a wrapper around the native libuuid library. -* The `uuidjs()` entries are for Patrick Negri's [uuid-js module](https://github.com/pnegri/uuid-js) which is a pure javascript implementation based on [UUID.js](https://github.com/LiosK/UUID.js) by LiosK. - -If you want to get more reliable results you can run the benchmark multiple times and write the output into a log file: - -``` -for i in {0..9}; do node benchmark/benchmark.js >> benchmark/bench_0.4.12.log; done; -``` - -If you're interested in how performance varies between different node versions, you can issue the above command multiple times. - -You can then use the shell script `bench.sh` provided in this directory to calculate the averages over all benchmark runs and draw a nice plot: - -``` -(cd benchmark/ && ./bench.sh) -``` - -This assumes you have [gnuplot](http://www.gnuplot.info/) and [ImageMagick](http://www.imagemagick.org/) installed. You'll find a nice `bench.png` graph in the `benchmark/` directory then. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu deleted file mode 100644 index a342fbbe..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu +++ /dev/null @@ -1,174 +0,0 @@ -#!/opt/local/bin/gnuplot -persist -# -# -# G N U P L O T -# Version 4.4 patchlevel 3 -# last modified March 2011 -# System: Darwin 10.8.0 -# -# Copyright (C) 1986-1993, 1998, 2004, 2007-2010 -# Thomas Williams, Colin Kelley and many others -# -# gnuplot home: http://www.gnuplot.info -# faq, bugs, etc: type "help seeking-assistance" -# immediate help: type "help" -# plot window: hit 'h' -set terminal postscript eps noenhanced defaultplex \ - leveldefault color colortext \ - solid linewidth 1.2 butt noclip \ - palfuncparam 2000,0.003 \ - "Helvetica" 14 -set output 'bench.eps' -unset clip points -set clip one -unset clip two -set bar 1.000000 front -set border 31 front linetype -1 linewidth 1.000 -set xdata -set ydata -set zdata -set x2data -set y2data -set timefmt x "%d/%m/%y,%H:%M" -set timefmt y "%d/%m/%y,%H:%M" -set timefmt z "%d/%m/%y,%H:%M" -set timefmt x2 "%d/%m/%y,%H:%M" -set timefmt y2 "%d/%m/%y,%H:%M" -set timefmt cb "%d/%m/%y,%H:%M" -set boxwidth -set style fill empty border -set style rectangle back fc lt -3 fillstyle solid 1.00 border lt -1 -set style circle radius graph 0.02, first 0, 0 -set dummy x,y -set format x "% g" -set format y "% g" -set format x2 "% g" -set format y2 "% g" -set format z "% g" -set format cb "% g" -set angles radians -unset grid -set key title "" -set key outside left top horizontal Right noreverse enhanced autotitles columnhead nobox -set key noinvert samplen 4 spacing 1 width 0 height 0 -set key maxcolumns 2 maxrows 0 -unset label -unset arrow -set style increment default -unset style line -set style line 1 linetype 1 linewidth 2.000 pointtype 1 pointsize default pointinterval 0 -unset style arrow -set style histogram clustered gap 2 title offset character 0, 0, 0 -unset logscale -set offsets graph 0.05, 0.15, 0, 0 -set pointsize 1.5 -set pointintervalbox 1 -set encoding default -unset polar -unset parametric -unset decimalsign -set view 60, 30, 1, 1 -set samples 100, 100 -set isosamples 10, 10 -set surface -unset contour -set clabel '%8.3g' -set mapping cartesian -set datafile separator whitespace -unset hidden3d -set cntrparam order 4 -set cntrparam linear -set cntrparam levels auto 5 -set cntrparam points 5 -set size ratio 0 1,1 -set origin 0,0 -set style data points -set style function lines -set xzeroaxis linetype -2 linewidth 1.000 -set yzeroaxis linetype -2 linewidth 1.000 -set zzeroaxis linetype -2 linewidth 1.000 -set x2zeroaxis linetype -2 linewidth 1.000 -set y2zeroaxis linetype -2 linewidth 1.000 -set ticslevel 0.5 -set mxtics default -set mytics default -set mztics default -set mx2tics default -set my2tics default -set mcbtics default -set xtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set xtics norangelimit -set xtics () -set ytics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set ytics autofreq norangelimit -set ztics border in scale 1,0.5 nomirror norotate offset character 0, 0, 0 -set ztics autofreq norangelimit -set nox2tics -set noy2tics -set cbtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set cbtics autofreq norangelimit -set title "" -set title offset character 0, 0, 0 font "" norotate -set timestamp bottom -set timestamp "" -set timestamp offset character 0, 0, 0 font "" norotate -set rrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) -set autoscale rfixmin -set autoscale rfixmax -set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] ) -set autoscale tfixmin -set autoscale tfixmax -set urange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale ufixmin -set autoscale ufixmax -set vrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale vfixmin -set autoscale vfixmax -set xlabel "" -set xlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate -set x2label "" -set x2label offset character 0, 0, 0 font "" textcolor lt -1 norotate -set xrange [ * : * ] noreverse nowriteback # (currently [-0.150000:3.15000] ) -set autoscale xfixmin -set autoscale xfixmax -set x2range [ * : * ] noreverse nowriteback # (currently [0.00000:3.00000] ) -set autoscale x2fixmin -set autoscale x2fixmax -set ylabel "" -set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set y2label "" -set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set yrange [ 0.00000 : 1.90000e+06 ] noreverse nowriteback # (currently [:] ) -set autoscale yfixmin -set autoscale yfixmax -set y2range [ * : * ] noreverse nowriteback # (currently [0.00000:1.90000e+06] ) -set autoscale y2fixmin -set autoscale y2fixmax -set zlabel "" -set zlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate -set zrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale zfixmin -set autoscale zfixmax -set cblabel "" -set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set cbrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) -set autoscale cbfixmin -set autoscale cbfixmax -set zero 1e-08 -set lmargin -1 -set bmargin -1 -set rmargin -1 -set tmargin -1 -set pm3d explicit at s -set pm3d scansautomatic -set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean -set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB -set palette rgbformulae 7, 5, 15 -set colorbox default -set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault -set loadpath -set fontpath -set fit noerrorvariables -GNUTERM = "aqua" -plot 'bench_results.txt' using 2:xticlabel(1) w lp lw 2, '' using 3:xticlabel(1) w lp lw 2, '' using 4:xticlabel(1) w lp lw 2, '' using 5:xticlabel(1) w lp lw 2, '' using 6:xticlabel(1) w lp lw 2, '' using 7:xticlabel(1) w lp lw 2, '' using 8:xticlabel(1) w lp lw 2, '' using 9:xticlabel(1) w lp lw 2 -# EOF diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/bench.sh b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/bench.sh deleted file mode 100755 index d870a0cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/bench.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# for a given node version run: -# for i in {0..9}; do node benchmark.js >> bench_0.6.2.log; done; - -PATTERNS=('nodeuuid.v1()' "nodeuuid.v1('binary'," 'nodeuuid.v4()' "nodeuuid.v4('binary'," "uuid()" "uuid('binary')" 'uuidjs.create(1)' 'uuidjs.create(4)' '140byte') -FILES=(node_uuid_v1_string node_uuid_v1_buf node_uuid_v4_string node_uuid_v4_buf libuuid_v4_string libuuid_v4_binary uuidjs_v1_string uuidjs_v4_string 140byte_es) -INDICES=(2 3 2 3 2 2 2 2 2) -VERSIONS=$( ls bench_*.log | sed -e 's/^bench_\([0-9\.]*\)\.log/\1/' | tr "\\n" " " ) -TMPJOIN="tmp_join" -OUTPUT="bench_results.txt" - -for I in ${!FILES[*]}; do - F=${FILES[$I]} - P=${PATTERNS[$I]} - INDEX=${INDICES[$I]} - echo "version $F" > $F - for V in $VERSIONS; do - (VAL=$( grep "$P" bench_$V.log | LC_ALL=en_US awk '{ sum += $'$INDEX' } END { print sum/NR }' ); echo $V $VAL) >> $F - done - if [ $I == 0 ]; then - cat $F > $TMPJOIN - else - join $TMPJOIN $F > $OUTPUT - cp $OUTPUT $TMPJOIN - fi - rm $F -done - -rm $TMPJOIN - -gnuplot bench.gnu -convert -density 200 -resize 800x560 -flatten bench.eps bench.png -rm bench.eps diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c deleted file mode 100644 index dbfc75f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c +++ /dev/null @@ -1,34 +0,0 @@ -/* -Test performance of native C UUID generation - -To Compile: cc -luuid benchmark-native.c -o benchmark-native -*/ - -#include <stdio.h> -#include <unistd.h> -#include <sys/time.h> -#include <uuid/uuid.h> - -int main() { - uuid_t myid; - char buf[36+1]; - int i; - struct timeval t; - double start, finish; - - gettimeofday(&t, NULL); - start = t.tv_sec + t.tv_usec/1e6; - - int n = 2e5; - for (i = 0; i < n; i++) { - uuid_generate(myid); - uuid_unparse(myid, buf); - } - - gettimeofday(&t, NULL); - finish = t.tv_sec + t.tv_usec/1e6; - double dur = finish - start; - - printf("%d uuids/sec", (int)(n/dur)); - return 0; -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js deleted file mode 100644 index 40e6efbe..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js +++ /dev/null @@ -1,84 +0,0 @@ -try { - var nodeuuid = require('../uuid'); -} catch (e) { - console.error('node-uuid require failed - skipping tests'); -} - -try { - var uuid = require('uuid'); -} catch (e) { - console.error('uuid require failed - skipping tests'); -} - -try { - var uuidjs = require('uuid-js'); -} catch (e) { - console.error('uuid-js require failed - skipping tests'); -} - -var N = 5e5; - -function rate(msg, t) { - console.log(msg + ': ' + - (N / (Date.now() - t) * 1e3 | 0) + - ' uuids/second'); -} - -console.log('# v4'); - -// node-uuid - string form -if (nodeuuid) { - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4(); - rate('nodeuuid.v4() - using node.js crypto RNG', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4({rng: nodeuuid.mathRNG}); - rate('nodeuuid.v4() - using Math.random() RNG', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary'); - rate('nodeuuid.v4(\'binary\')', t); - - var buffer = new nodeuuid.BufferClass(16); - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary', buffer); - rate('nodeuuid.v4(\'binary\', buffer)', t); -} - -// libuuid - string form -if (uuid) { - for (var i = 0, t = Date.now(); i < N; i++) uuid(); - rate('uuid()', t); - - for (var i = 0, t = Date.now(); i < N; i++) uuid('binary'); - rate('uuid(\'binary\')', t); -} - -// uuid-js - string form -if (uuidjs) { - for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(4); - rate('uuidjs.create(4)', t); -} - -// 140byte.es -for (var i = 0, t = Date.now(); i < N; i++) 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(s,r){r=Math.random()*16|0;return (s=='x'?r:r&0x3|0x8).toString(16)}); -rate('140byte.es_v4', t); - -console.log(''); -console.log('# v1'); - -// node-uuid - v1 string form -if (nodeuuid) { - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1(); - rate('nodeuuid.v1()', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary'); - rate('nodeuuid.v1(\'binary\')', t); - - var buffer = new nodeuuid.BufferClass(16); - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary', buffer); - rate('nodeuuid.v1(\'binary\', buffer)', t); -} - -// uuid-js - v1 string form -if (uuidjs) { - for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(1); - rate('uuidjs.create(1)', t); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/component.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/component.json deleted file mode 100644 index ace21348..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/component.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "node-uuid", - "repo": "broofa/node-uuid", - "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", - "version": "1.4.0", - "author": "Robert Kieffer <robert@broofa.com>", - "contributors": [ - {"name": "Christoph Tavan <dev@tavan.de>", "github": "https://github.com/ctavan"} - ], - "keywords": ["uuid", "guid", "rfc4122"], - "dependencies": {}, - "development": {}, - "main": "uuid.js", - "scripts": [ - "uuid.js" - ], - "license": "MIT" -} \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/package.json deleted file mode 100644 index e6f518be..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "node-uuid", - "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", - "url": "http://github.com/broofa/node-uuid", - "keywords": [ - "uuid", - "guid", - "rfc4122" - ], - "author": { - "name": "Robert Kieffer", - "email": "robert@broofa.com" - }, - "contributors": [ - { - "name": "Christoph Tavan", - "email": "dev@tavan.de" - } - ], - "lib": ".", - "main": "./uuid.js", - "repository": { - "type": "git", - "url": "https://github.com/broofa/node-uuid.git" - }, - "version": "1.4.1", - "readme": "# node-uuid\n\nSimple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.\n\nFeatures:\n\n* Generate RFC4122 version 1 or version 4 UUIDs\n* Runs in node.js and all browsers.\n* Registered as a [ComponentJS](https://github.com/component/component) [component](https://github.com/component/component/wiki/Components) ('broofa/node-uuid').\n* Cryptographically strong random # generation on supporting platforms\n* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! )\n* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html)\n\n## Getting Started\n\nInstall it in your browser:\n\n```html\n<script src=\"uuid.js\"></script>\n```\n\nOr in node.js:\n\n```\nnpm install node-uuid\n```\n\n```javascript\nvar uuid = require('node-uuid');\n```\n\nThen create some ids ...\n\n```javascript\n// Generate a v1 (time-based) id\nuuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n\n// Generate a v4 (random) id\nuuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'\n```\n\n## API\n\n### uuid.v1([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v1 (timestamp-based) UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1.\n * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.\n * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used.\n * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nNotes:\n\n1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v1({\n node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],\n clockseq: 0x1234,\n msecs: new Date('2011-11-01').getTime(),\n nsecs: 5678\n}); // -> \"710b962e-041c-11e1-9234-0123456789ab\"\n```\n\nExample: In-place generation of two binary IDs\n\n```javascript\n// Generate two ids in an array\nvar arr = new Array(32); // -> []\nuuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\nuuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\n\n// Optionally use uuid.unparse() to get stringify the ids\nuuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115'\nuuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115'\n```\n\n### uuid.v4([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v4 UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values\n * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v4({\n random: [\n 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,\n 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36\n ]\n});\n// -> \"109156be-c4fb-41ea-b1b4-efe1671c5836\"\n```\n\nExample: Generate two IDs in a single buffer\n\n```javascript\nvar buffer = new Array(32); // (or 'new Buffer' in node.js)\nuuid.v4(null, buffer, 0);\nuuid.v4(null, buffer, 16);\n```\n\n### uuid.parse(id[, buffer[, offset]])\n### uuid.unparse(buffer[, offset])\n\nParse and unparse UUIDs\n\n * `id` - (String) UUID(-like) string\n * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used\n * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0\n\nExample parsing and unparsing a UUID string\n\n```javascript\nvar bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> <Buffer 79 7f f0 43 11 eb 11 e1 80 d6 51 09 98 75 5d 10>\nvar string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10'\n```\n\n### uuid.noConflict()\n\n(Browsers only) Set `uuid` property back to it's previous value.\n\nReturns the node-uuid object.\n\nExample:\n\n```javascript\nvar myUuid = uuid.noConflict();\nmyUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n```\n\n## Deprecated APIs\n\nSupport for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version.\n\n### uuid([format [, buffer [, offset]]])\n\nuuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary).\n\n### uuid.BufferClass\n\nThe class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API.\n\n## Testing\n\nIn node.js\n\n```\n> cd test\n> node test.js\n```\n\nIn Browser\n\n```\nopen test/test.html\n```\n\n### Benchmarking\n\nRequires node.js\n\n```\nnpm install uuid uuid-js\nnode benchmark/benchmark.js\n```\n\nFor a more complete discussion of node-uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/node-uuid/wiki/Benchmark)\n\nFor browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance).\n\n## Release notes\n\n### 1.4.0\n\n* Improved module context detection\n* Removed public RNG functions\n\n### 1.3.2\n\n* Improve tests and handling of v1() options (Issue #24)\n* Expose RNG option to allow for perf testing with different generators\n\n### 1.3.0\n\n* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!\n* Support for node.js crypto API\n* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/broofa/node-uuid/issues" - }, - "homepage": "https://github.com/broofa/node-uuid", - "_id": "node-uuid@1.4.1", - "dist": { - "shasum": "e937c5cdd70594274f11a11d3ae751f5c5857c73" - }, - "_from": "node-uuid@~1.4.0", - "_resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/compare_v1.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/compare_v1.js deleted file mode 100644 index 05af8221..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/compare_v1.js +++ /dev/null @@ -1,63 +0,0 @@ -var assert = require('assert'), - nodeuuid = require('../uuid'), - uuidjs = require('uuid-js'), - libuuid = require('uuid').generate, - util = require('util'), - exec = require('child_process').exec, - os = require('os'); - -// On Mac Os X / macports there's only the ossp-uuid package that provides uuid -// On Linux there's uuid-runtime which provides uuidgen -var uuidCmd = os.type() === 'Darwin' ? 'uuid -1' : 'uuidgen -t'; - -function compare(ids) { - console.log(ids); - for (var i = 0; i < ids.length; i++) { - var id = ids[i].split('-'); - id = [id[2], id[1], id[0]].join(''); - ids[i] = id; - } - var sorted = ([].concat(ids)).sort(); - - if (sorted.toString() !== ids.toString()) { - console.log('Warning: sorted !== ids'); - } else { - console.log('everything in order!'); - } -} - -// Test time order of v1 uuids -var ids = []; -while (ids.length < 10e3) ids.push(nodeuuid.v1()); - -var max = 10; -console.log('node-uuid:'); -ids = []; -for (var i = 0; i < max; i++) ids.push(nodeuuid.v1()); -compare(ids); - -console.log(''); -console.log('uuidjs:'); -ids = []; -for (var i = 0; i < max; i++) ids.push(uuidjs.create(1).toString()); -compare(ids); - -console.log(''); -console.log('libuuid:'); -ids = []; -var count = 0; -var last = function() { - compare(ids); -} -var cb = function(err, stdout, stderr) { - ids.push(stdout.substring(0, stdout.length-1)); - count++; - if (count < max) { - return next(); - } - last(); -}; -var next = function() { - exec(uuidCmd, cb); -}; -next(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.html b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.html deleted file mode 100644 index d80326ec..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.html +++ /dev/null @@ -1,17 +0,0 @@ -<html> - <head> - <style> - div { - font-family: monospace; - font-size: 8pt; - } - div.log {color: #444;} - div.warn {color: #550;} - div.error {color: #800; font-weight: bold;} - </style> - <script src="../uuid.js"></script> - </head> - <body> - <script src="./test.js"></script> - </body> -</html> diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.js deleted file mode 100644 index 24692256..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/test/test.js +++ /dev/null @@ -1,228 +0,0 @@ -if (!this.uuid) { - // node.js - uuid = require('../uuid'); -} - -// -// x-platform log/assert shims -// - -function _log(msg, type) { - type = type || 'log'; - - if (typeof(document) != 'undefined') { - document.write('<div class="' + type + '">' + msg.replace(/\n/g, '<br />') + '</div>'); - } - if (typeof(console) != 'undefined') { - var color = { - log: '\033[39m', - warn: '\033[33m', - error: '\033[31m' - }; - console[type](color[type] + msg + color.log); - } -} - -function log(msg) {_log(msg, 'log');} -function warn(msg) {_log(msg, 'warn');} -function error(msg) {_log(msg, 'error');} - -function assert(res, msg) { - if (!res) { - error('FAIL: ' + msg); - } else { - log('Pass: ' + msg); - } -} - -// -// Unit tests -// - -// Verify ordering of v1 ids created with explicit times -var TIME = 1321644961388; // 2011-11-18 11:36:01.388-08:00 - -function compare(name, ids) { - ids = ids.map(function(id) { - return id.split('-').reverse().join('-'); - }).sort(); - var sorted = ([].concat(ids)).sort(); - - assert(sorted.toString() == ids.toString(), name + ' have expected order'); -} - -// Verify ordering of v1 ids created using default behavior -compare('uuids with current time', [ - uuid.v1(), - uuid.v1(), - uuid.v1(), - uuid.v1(), - uuid.v1() -]); - -// Verify ordering of v1 ids created with explicit times -compare('uuids with time option', [ - uuid.v1({msecs: TIME - 10*3600*1000}), - uuid.v1({msecs: TIME - 1}), - uuid.v1({msecs: TIME}), - uuid.v1({msecs: TIME + 1}), - uuid.v1({msecs: TIME + 28*24*3600*1000}) -]); - -assert( - uuid.v1({msecs: TIME}) != uuid.v1({msecs: TIME}), - 'IDs created at same msec are different' -); - -// Verify throw if too many ids created -var thrown = false; -try { - uuid.v1({msecs: TIME, nsecs: 10000}); -} catch (e) { - thrown = true; -} -assert(thrown, 'Exception thrown when > 10K ids created in 1 ms'); - -// Verify clock regression bumps clockseq -var uidt = uuid.v1({msecs: TIME}); -var uidtb = uuid.v1({msecs: TIME - 1}); -assert( - parseInt(uidtb.split('-')[3], 16) - parseInt(uidt.split('-')[3], 16) === 1, - 'Clock regression by msec increments the clockseq' -); - -// Verify clock regression bumps clockseq -var uidtn = uuid.v1({msecs: TIME, nsecs: 10}); -var uidtnb = uuid.v1({msecs: TIME, nsecs: 9}); -assert( - parseInt(uidtnb.split('-')[3], 16) - parseInt(uidtn.split('-')[3], 16) === 1, - 'Clock regression by nsec increments the clockseq' -); - -// Verify explicit options produce expected id -var id = uuid.v1({ - msecs: 1321651533573, - nsecs: 5432, - clockseq: 0x385c, - node: [ 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10 ] -}); -assert(id == 'd9428888-122b-11e1-b85c-61cd3cbb3210', 'Explicit options produce expected id'); - -// Verify adjacent ids across a msec boundary are 1 time unit apart -var u0 = uuid.v1({msecs: TIME, nsecs: 9999}); -var u1 = uuid.v1({msecs: TIME + 1, nsecs: 0}); - -var before = u0.split('-')[0], after = u1.split('-')[0]; -var dt = parseInt(after, 16) - parseInt(before, 16); -assert(dt === 1, 'Ids spanning 1ms boundary are 100ns apart'); - -// -// Test parse/unparse -// - -id = '00112233445566778899aabbccddeeff'; -assert(uuid.unparse(uuid.parse(id.substr(0,10))) == - '00112233-4400-0000-0000-000000000000', 'Short parse'); -assert(uuid.unparse(uuid.parse('(this is the uuid -> ' + id + id)) == - '00112233-4455-6677-8899-aabbccddeeff', 'Dirty parse'); - -// -// Perf tests -// - -var generators = { - v1: uuid.v1, - v4: uuid.v4 -}; - -var UUID_FORMAT = { - v1: /[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i, - v4: /[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i -}; - -var N = 1e4; - -// Get %'age an actual value differs from the ideal value -function divergence(actual, ideal) { - return Math.round(100*100*(actual - ideal)/ideal)/100; -} - -function rate(msg, t) { - log(msg + ': ' + (N / (Date.now() - t) * 1e3 | 0) + ' uuids\/second'); -} - -for (var version in generators) { - var counts = {}, max = 0; - var generator = generators[version]; - var format = UUID_FORMAT[version]; - - log('\nSanity check ' + N + ' ' + version + ' uuids'); - for (var i = 0, ok = 0; i < N; i++) { - id = generator(); - if (!format.test(id)) { - throw Error(id + ' is not a valid UUID string'); - } - - if (id != uuid.unparse(uuid.parse(id))) { - assert(fail, id + ' is not a valid id'); - } - - // Count digits for our randomness check - if (version == 'v4') { - var digits = id.replace(/-/g, '').split(''); - for (var j = digits.length-1; j >= 0; j--) { - var c = digits[j]; - max = Math.max(max, counts[c] = (counts[c] || 0) + 1); - } - } - } - - // Check randomness for v4 UUIDs - if (version == 'v4') { - // Limit that we get worried about randomness. (Purely empirical choice, this!) - var limit = 2*100*Math.sqrt(1/N); - - log('\nChecking v4 randomness. Distribution of Hex Digits (% deviation from ideal)'); - - for (var i = 0; i < 16; i++) { - var c = i.toString(16); - var bar = '', n = counts[c], p = Math.round(n/max*100|0); - - // 1-3,5-8, and D-F: 1:16 odds over 30 digits - var ideal = N*30/16; - if (i == 4) { - // 4: 1:1 odds on 1 digit, plus 1:16 odds on 30 digits - ideal = N*(1 + 30/16); - } else if (i >= 8 && i <= 11) { - // 8-B: 1:4 odds on 1 digit, plus 1:16 odds on 30 digits - ideal = N*(1/4 + 30/16); - } else { - // Otherwise: 1:16 odds on 30 digits - ideal = N*30/16; - } - var d = divergence(n, ideal); - - // Draw bar using UTF squares (just for grins) - var s = n/max*50 | 0; - while (s--) bar += '='; - - assert(Math.abs(d) < limit, c + ' |' + bar + '| ' + counts[c] + ' (' + d + '% < ' + limit + '%)'); - } - } -} - -// Perf tests -for (var version in generators) { - log('\nPerformance testing ' + version + ' UUIDs'); - var generator = generators[version]; - var buf = new uuid.BufferClass(16); - - for (var i = 0, t = Date.now(); i < N; i++) generator(); - rate('uuid.' + version + '()', t); - - for (var i = 0, t = Date.now(); i < N; i++) generator('binary'); - rate('uuid.' + version + '(\'binary\')', t); - - for (var i = 0, t = Date.now(); i < N; i++) generator('binary', buf); - rate('uuid.' + version + '(\'binary\', buffer)', t); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/uuid.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/uuid.js deleted file mode 100644 index 2fac6dc4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/node-uuid/uuid.js +++ /dev/null @@ -1,245 +0,0 @@ -// uuid.js -// -// Copyright (c) 2010-2012 Robert Kieffer -// MIT License - http://opensource.org/licenses/mit-license.php - -(function() { - var _global = this; - - // Unique ID creation requires a high quality random # generator. We feature - // detect to determine the best RNG source, normalizing to a function that - // returns 128-bits of randomness, since that's what's usually required - var _rng; - - // Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html - // - // Moderately fast, high quality - if (typeof(require) == 'function') { - try { - var _rb = require('crypto').randomBytes; - _rng = _rb && function() {return _rb(16);}; - } catch(e) {} - } - - if (!_rng && _global.crypto && crypto.getRandomValues) { - // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto - // - // Moderately fast, high quality - var _rnds8 = new Uint8Array(16); - _rng = function whatwgRNG() { - crypto.getRandomValues(_rnds8); - return _rnds8; - }; - } - - if (!_rng) { - // Math.random()-based (RNG) - // - // If all else fails, use Math.random(). It's fast, but is of unspecified - // quality. - var _rnds = new Array(16); - _rng = function() { - for (var i = 0, r; i < 16; i++) { - if ((i & 0x03) === 0) r = Math.random() * 0x100000000; - _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; - } - - return _rnds; - }; - } - - // Buffer class to use - var BufferClass = typeof(Buffer) == 'function' ? Buffer : Array; - - // Maps for number <-> hex string conversion - var _byteToHex = []; - var _hexToByte = {}; - for (var i = 0; i < 256; i++) { - _byteToHex[i] = (i + 0x100).toString(16).substr(1); - _hexToByte[_byteToHex[i]] = i; - } - - // **`parse()` - Parse a UUID into it's component bytes** - function parse(s, buf, offset) { - var i = (buf && offset) || 0, ii = 0; - - buf = buf || []; - s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) { - if (ii < 16) { // Don't overflow! - buf[i + ii++] = _hexToByte[oct]; - } - }); - - // Zero out remaining bytes if string was short - while (ii < 16) { - buf[i + ii++] = 0; - } - - return buf; - } - - // **`unparse()` - Convert UUID byte array (ala parse()) into a string** - function unparse(buf, offset) { - var i = offset || 0, bth = _byteToHex; - return bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]]; - } - - // **`v1()` - Generate time-based UUID** - // - // Inspired by https://github.com/LiosK/UUID.js - // and http://docs.python.org/library/uuid.html - - // random #'s we need to init node and clockseq - var _seedBytes = _rng(); - - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - var _nodeId = [ - _seedBytes[0] | 0x01, - _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] - ]; - - // Per 4.2.2, randomize (14 bit) clockseq - var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff; - - // Previous uuid creation time - var _lastMSecs = 0, _lastNSecs = 0; - - // See https://github.com/broofa/node-uuid for API details - function v1(options, buf, offset) { - var i = buf && offset || 0; - var b = buf || []; - - options = options || {}; - - var clockseq = options.clockseq != null ? options.clockseq : _clockseq; - - // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - var msecs = options.msecs != null ? options.msecs : new Date().getTime(); - - // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - var nsecs = options.nsecs != null ? options.nsecs : _lastNSecs + 1; - - // Time since last uuid creation (in msecs) - var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; - - // Per 4.2.1.2, Bump clockseq on clock regression - if (dt < 0 && options.clockseq == null) { - clockseq = clockseq + 1 & 0x3fff; - } - - // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs == null) { - nsecs = 0; - } - - // Per 4.2.1.2 Throw error if too many uuids are requested - if (nsecs >= 10000) { - throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; - - // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - msecs += 12219292800000; - - // `time_low` - var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; - - // `time_mid` - var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; - - // `time_high_and_version` - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - b[i++] = tmh >>> 16 & 0xff; - - // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - b[i++] = clockseq >>> 8 | 0x80; - - // `clock_seq_low` - b[i++] = clockseq & 0xff; - - // `node` - var node = options.node || _nodeId; - for (var n = 0; n < 6; n++) { - b[i + n] = node[n]; - } - - return buf ? buf : unparse(b); - } - - // **`v4()` - Generate random UUID** - - // See https://github.com/broofa/node-uuid for API details - function v4(options, buf, offset) { - // Deprecated - 'format' argument, as supported in v1.2 - var i = buf && offset || 0; - - if (typeof(options) == 'string') { - buf = options == 'binary' ? new BufferClass(16) : null; - options = null; - } - options = options || {}; - - var rnds = options.random || (options.rng || _rng)(); - - // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - - // Copy bytes to buffer, if provided - if (buf) { - for (var ii = 0; ii < 16; ii++) { - buf[i + ii] = rnds[ii]; - } - } - - return buf || unparse(rnds); - } - - // Export public API - var uuid = v4; - uuid.v1 = v1; - uuid.v4 = v4; - uuid.parse = parse; - uuid.unparse = unparse; - uuid.BufferClass = BufferClass; - - if (typeof define === 'function' && define.amd) { - // Publish as AMD module - define(function() {return uuid;}); - } else if (typeof(module) != 'undefined' && module.exports) { - // Publish as node.js module - module.exports = uuid; - } else { - // Publish as global (in browsers) - var _previousRoot = _global.uuid; - - // **`noConflict()` - (browser only) to reset global 'uuid' var** - uuid.noConflict = function() { - _global.uuid = _previousRoot; - return uuid; - }; - - _global.uuid = uuid; - } -}).call(this); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/LICENSE deleted file mode 100644 index a4a9aee0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/README.md deleted file mode 100644 index 34c4a85d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/README.md +++ /dev/null @@ -1,4 +0,0 @@ -oauth-sign -========== - -OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/index.js deleted file mode 100644 index e35bfa67..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/index.js +++ /dev/null @@ -1,43 +0,0 @@ -var crypto = require('crypto') - , qs = require('querystring') - ; - -function sha1 (key, body) { - return crypto.createHmac('sha1', key).update(body).digest('base64') -} - -function rfc3986 (str) { - return encodeURIComponent(str) - .replace(/!/g,'%21') - .replace(/\*/g,'%2A') - .replace(/\(/g,'%28') - .replace(/\)/g,'%29') - .replace(/'/g,'%27') - ; -} - -function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret) { - // adapted from https://dev.twitter.com/docs/auth/oauth and - // https://dev.twitter.com/docs/auth/creating-signature - - var querystring = Object.keys(params).sort().map(function(key){ - // big WTF here with the escape + encoding but it's what twitter wants - return escape(rfc3986(key)) + "%3D" + escape(rfc3986(params[key])) - }).join('%26') - - var base = [ - httpMethod ? httpMethod.toUpperCase() : 'GET', - rfc3986(base_uri), - querystring - ].join('&') - - var key = [ - consumer_secret, - token_secret || '' - ].map(rfc3986).join('&') - - return sha1(key, base) -} - -exports.hmacsign = hmacsign -exports.rfc3986 = rfc3986 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/package.json deleted file mode 100644 index abc9d21d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "author": { - "name": "Mikeal Rogers", - "email": "mikeal.rogers@gmail.com", - "url": "http://www.futurealoof.com" - }, - "name": "oauth-sign", - "description": "OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module.", - "version": "0.3.0", - "repository": { - "url": "https://github.com/mikeal/oauth-sign" - }, - "main": "index.js", - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "scripts": { - "test": "node test.js" - }, - "readme": "oauth-sign\n==========\n\nOAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module. \n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/mikeal/oauth-sign/issues" - }, - "homepage": "https://github.com/mikeal/oauth-sign", - "_id": "oauth-sign@0.3.0", - "dist": { - "shasum": "cb540f93bb2b22a7d5941691a288d60e8ea9386e" - }, - "_from": "oauth-sign@~0.3.0", - "_resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.3.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/test.js deleted file mode 100644 index 46955ff6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/oauth-sign/test.js +++ /dev/null @@ -1,49 +0,0 @@ -var hmacsign = require('./index').hmacsign - , assert = require('assert') - , qs = require('querystring') - ; - -// Tests from Twitter documentation https://dev.twitter.com/docs/auth/oauth - -var reqsign = hmacsign('POST', 'https://api.twitter.com/oauth/request_token', - { oauth_callback: 'http://localhost:3005/the_dance/process_callback?service_provider_id=11' - , oauth_consumer_key: 'GDdmIQH6jhtmLUypg82g' - , oauth_nonce: 'QP70eNmVz8jvdPevU3oJD2AfF7R7odC2XJcn4XlZJqk' - , oauth_signature_method: 'HMAC-SHA1' - , oauth_timestamp: '1272323042' - , oauth_version: '1.0' - }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98") - -console.log(reqsign) -console.log('8wUi7m5HFQy76nowoCThusfgB+Q=') -assert.equal(reqsign, '8wUi7m5HFQy76nowoCThusfgB+Q=') - -var accsign = hmacsign('POST', 'https://api.twitter.com/oauth/access_token', - { oauth_consumer_key: 'GDdmIQH6jhtmLUypg82g' - , oauth_nonce: '9zWH6qe0qG7Lc1telCn7FhUbLyVdjEaL3MO5uHxn8' - , oauth_signature_method: 'HMAC-SHA1' - , oauth_token: '8ldIZyxQeVrFZXFOZH5tAwj6vzJYuLQpl0WUEYtWc' - , oauth_timestamp: '1272323047' - , oauth_verifier: 'pDNg57prOHapMbhv25RNf75lVRd6JDsni1AJJIDYoTY' - , oauth_version: '1.0' - }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98", "x6qpRnlEmW9JbQn4PQVVeVG8ZLPEx6A0TOebgwcuA") - -console.log(accsign) -console.log('PUw/dHA4fnlJYM6RhXk5IU/0fCc=') -assert.equal(accsign, 'PUw/dHA4fnlJYM6RhXk5IU/0fCc=') - -var upsign = hmacsign('POST', 'http://api.twitter.com/1/statuses/update.json', - { oauth_consumer_key: "GDdmIQH6jhtmLUypg82g" - , oauth_nonce: "oElnnMTQIZvqvlfXM56aBLAf5noGD0AQR3Fmi7Q6Y" - , oauth_signature_method: "HMAC-SHA1" - , oauth_token: "819797-Jxq8aYUDRmykzVKrgoLhXSq67TEa5ruc4GJC2rWimw" - , oauth_timestamp: "1272325550" - , oauth_version: "1.0" - , status: 'setting up my twitter 私のさえずりを設定する' - }, "MCD8BKwGdgPHvAuvgvz4EQpqDAtx89grbuNMRd7Eh98", "J6zix3FfA9LofH0awS24M3HcBYXO5nI1iYe8EfBA") - -console.log(upsign) -console.log('yOahq5m0YjDDjfjxHaXEsW9D+X0=') -assert.equal(upsign, 'yOahq5m0YjDDjfjxHaXEsW9D+X0=') - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.gitmodules b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.gitmodules deleted file mode 100644 index 49e31dac..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.gitmodules +++ /dev/null @@ -1,6 +0,0 @@ -[submodule "support/expresso"] - path = support/expresso - url = git://github.com/visionmedia/expresso.git -[submodule "support/should"] - path = support/should - url = git://github.com/visionmedia/should.js.git diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.npmignore deleted file mode 100644 index e85ce2af..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/.npmignore +++ /dev/null @@ -1,7 +0,0 @@ -test -.travis.yml -benchmark.js -component.json -examples.js -History.md -Makefile diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/Readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/Readme.md deleted file mode 100644 index 27e54a4a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/Readme.md +++ /dev/null @@ -1,58 +0,0 @@ -# node-querystring - - query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others. - -## Installation - - $ npm install qs - -## Examples - -```js -var qs = require('qs'); - -qs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com'); -// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } } - -qs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }}) -// => user[name]=Tobi&user[email]=tobi%40learnboost.com -``` - -## Testing - -Install dev dependencies: - - $ npm install -d - -and execute: - - $ make test - -browser: - - $ open test/browser/index.html - -## License - -(The MIT License) - -Copyright (c) 2010 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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/index.js deleted file mode 100644 index b05938ac..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/index.js +++ /dev/null @@ -1,366 +0,0 @@ -/** - * Object#toString() ref for stringify(). - */ - -var toString = Object.prototype.toString; - -/** - * Object#hasOwnProperty ref - */ - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -/** - * Array#indexOf shim. - */ - -var indexOf = typeof Array.prototype.indexOf === 'function' - ? function(arr, el) { return arr.indexOf(el); } - : function(arr, el) { - for (var i = 0; i < arr.length; i++) { - if (arr[i] === el) return i; - } - return -1; - }; - -/** - * Array.isArray shim. - */ - -var isArray = Array.isArray || function(arr) { - return toString.call(arr) == '[object Array]'; -}; - -/** - * Object.keys shim. - */ - -var objectKeys = Object.keys || function(obj) { - var ret = []; - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - ret.push(key); - } - } - return ret; -}; - -/** - * Array#forEach shim. - */ - -var forEach = typeof Array.prototype.forEach === 'function' - ? function(arr, fn) { return arr.forEach(fn); } - : function(arr, fn) { - for (var i = 0; i < arr.length; i++) fn(arr[i]); - }; - -/** - * Array#reduce shim. - */ - -var reduce = function(arr, fn, initial) { - if (typeof arr.reduce === 'function') return arr.reduce(fn, initial); - var res = initial; - for (var i = 0; i < arr.length; i++) res = fn(res, arr[i]); - return res; -}; - -/** - * Cache non-integer test regexp. - */ - -var isint = /^[0-9]+$/; - -function promote(parent, key) { - if (parent[key].length == 0) return parent[key] = {} - var t = {}; - for (var i in parent[key]) { - if (hasOwnProperty.call(parent[key], i)) { - t[i] = parent[key][i]; - } - } - parent[key] = t; - return t; -} - -function parse(parts, parent, key, val) { - var part = parts.shift(); - - // illegal - if (Object.getOwnPropertyDescriptor(Object.prototype, key)) return; - - // end - if (!part) { - if (isArray(parent[key])) { - parent[key].push(val); - } else if ('object' == typeof parent[key]) { - parent[key] = val; - } else if ('undefined' == typeof parent[key]) { - parent[key] = val; - } else { - parent[key] = [parent[key], val]; - } - // array - } else { - var obj = parent[key] = parent[key] || []; - if (']' == part) { - if (isArray(obj)) { - if ('' != val) obj.push(val); - } else if ('object' == typeof obj) { - obj[objectKeys(obj).length] = val; - } else { - obj = parent[key] = [parent[key], val]; - } - // prop - } else if (~indexOf(part, ']')) { - part = part.substr(0, part.length - 1); - if (!isint.test(part) && isArray(obj)) obj = promote(parent, key); - parse(parts, obj, part, val); - // key - } else { - if (!isint.test(part) && isArray(obj)) obj = promote(parent, key); - parse(parts, obj, part, val); - } - } -} - -/** - * Merge parent key/val pair. - */ - -function merge(parent, key, val){ - if (~indexOf(key, ']')) { - var parts = key.split('[') - , len = parts.length - , last = len - 1; - parse(parts, parent, 'base', val); - // optimize - } else { - if (!isint.test(key) && isArray(parent.base)) { - var t = {}; - for (var k in parent.base) t[k] = parent.base[k]; - parent.base = t; - } - set(parent.base, key, val); - } - - return parent; -} - -/** - * Compact sparse arrays. - */ - -function compact(obj) { - if ('object' != typeof obj) return obj; - - if (isArray(obj)) { - var ret = []; - - for (var i in obj) { - if (hasOwnProperty.call(obj, i)) { - ret.push(obj[i]); - } - } - - return ret; - } - - for (var key in obj) { - obj[key] = compact(obj[key]); - } - - return obj; -} - -/** - * Parse the given obj. - */ - -function parseObject(obj){ - var ret = { base: {} }; - - forEach(objectKeys(obj), function(name){ - merge(ret, name, obj[name]); - }); - - return compact(ret.base); -} - -/** - * Parse the given str. - */ - -function parseString(str){ - var ret = reduce(String(str).split('&'), function(ret, pair){ - var eql = indexOf(pair, '=') - , brace = lastBraceInKey(pair) - , key = pair.substr(0, brace || eql) - , val = pair.substr(brace || eql, pair.length) - , val = val.substr(indexOf(val, '=') + 1, val.length); - - // ?foo - if ('' == key) key = pair, val = ''; - if ('' == key) return ret; - - return merge(ret, decode(key), decode(val)); - }, { base: {} }).base; - - return compact(ret); -} - -/** - * Parse the given query `str` or `obj`, returning an object. - * - * @param {String} str | {Object} obj - * @return {Object} - * @api public - */ - -exports.parse = function(str){ - if (null == str || '' == str) return {}; - return 'object' == typeof str - ? parseObject(str) - : parseString(str); -}; - -/** - * Turn the given `obj` into a query string - * - * @param {Object} obj - * @return {String} - * @api public - */ - -var stringify = exports.stringify = function(obj, prefix) { - if (isArray(obj)) { - return stringifyArray(obj, prefix); - } else if ('[object Object]' == toString.call(obj)) { - return stringifyObject(obj, prefix); - } else if ('string' == typeof obj) { - return stringifyString(obj, prefix); - } else { - return prefix + '=' + encodeURIComponent(String(obj)); - } -}; - -/** - * Stringify the given `str`. - * - * @param {String} str - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyString(str, prefix) { - if (!prefix) throw new TypeError('stringify expects an object'); - return prefix + '=' + encodeURIComponent(str); -} - -/** - * Stringify the given `arr`. - * - * @param {Array} arr - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyArray(arr, prefix) { - var ret = []; - if (!prefix) throw new TypeError('stringify expects an object'); - for (var i = 0; i < arr.length; i++) { - ret.push(stringify(arr[i], prefix + '[' + i + ']')); - } - return ret.join('&'); -} - -/** - * Stringify the given `obj`. - * - * @param {Object} obj - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyObject(obj, prefix) { - var ret = [] - , keys = objectKeys(obj) - , key; - - for (var i = 0, len = keys.length; i < len; ++i) { - key = keys[i]; - if ('' == key) continue; - if (null == obj[key]) { - ret.push(encodeURIComponent(key) + '='); - } else { - ret.push(stringify(obj[key], prefix - ? prefix + '[' + encodeURIComponent(key) + ']' - : encodeURIComponent(key))); - } - } - - return ret.join('&'); -} - -/** - * Set `obj`'s `key` to `val` respecting - * the weird and wonderful syntax of a qs, - * where "foo=bar&foo=baz" becomes an array. - * - * @param {Object} obj - * @param {String} key - * @param {String} val - * @api private - */ - -function set(obj, key, val) { - var v = obj[key]; - if (Object.getOwnPropertyDescriptor(Object.prototype, key)) return; - if (undefined === v) { - obj[key] = val; - } else if (isArray(v)) { - v.push(val); - } else { - obj[key] = [v, val]; - } -} - -/** - * Locate last brace in `str` within the key. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function lastBraceInKey(str) { - var len = str.length - , brace - , c; - for (var i = 0; i < len; ++i) { - c = str[i]; - if (']' == c) brace = false; - if ('[' == c) brace = true; - if ('=' == c && !brace) return i; - } -} - -/** - * Decode `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -function decode(str) { - try { - return decodeURIComponent(str.replace(/\+/g, ' ')); - } catch (err) { - return str; - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/package.json deleted file mode 100644 index 313485c0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/qs/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "qs", - "description": "querystring parser", - "version": "0.6.6", - "keywords": [ - "query string", - "parser", - "component" - ], - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/node-querystring.git" - }, - "devDependencies": { - "mocha": "*", - "expect.js": "*" - }, - "scripts": { - "test": "make test" - }, - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - }, - "main": "index", - "engines": { - "node": "*" - }, - "readme": "# node-querystring\n\n query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others.\n\n## Installation\n\n $ npm install qs\n\n## Examples\n\n```js\nvar qs = require('qs');\n\nqs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com');\n// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } }\n\nqs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }})\n// => user[name]=Tobi&user[email]=tobi%40learnboost.com\n```\n\n## Testing\n\nInstall dev dependencies:\n\n $ npm install -d\n\nand execute:\n\n $ make test\n\nbrowser:\n\n $ open test/browser/index.html\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2010 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/node-querystring/issues" - }, - "homepage": "https://github.com/visionmedia/node-querystring", - "_id": "qs@0.6.6", - "_from": "qs@~0.6.0" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.jshintrc b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.jshintrc deleted file mode 100644 index 8fcead4f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.jshintrc +++ /dev/null @@ -1,72 +0,0 @@ -{ - // Settings - "passfail" : false, // Stop on first error. - "maxerr" : 100, // Maximum error before stopping. - - - // Predefined globals whom JSHint will ignore. - "browser" : false, // Standard browser globals e.g. `window`, `document`. - "node" : true, - "rhino" : false, - "couch" : false, - "wsh" : false, // Windows Scripting Host. - - "jquery" : false, - "prototypejs" : false, - "mootools" : false, - "dojo" : false, - - "predef" : [ // Custom globals. - "escape", "unescape" // aren't picked up by node flag above :/ - ], - - - // Development. - "debug" : false, // Allow debugger statements e.g. browser breakpoints. - "devel" : false, // Allow developments statements e.g. `console.log();`. - - - // EcmaScript 5. - "es5" : true, // Allow EcmaScript 5 syntax. - "esnext" : true, // Allow ES "next" syntax, specifically 'const' (V8 has this) - "strict" : false, // Require `use strict` pragma in every file. - "globalstrict" : false, // Allow global "use strict" (also enables 'strict'). - - - // The Good Parts. - "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons). - "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons. - "bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.). - "boss" : false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments. - "curly" : false, // Require {} for every new block or scope. - "eqeqeq" : false, // Require triple equals i.e. `===`. - "eqnull" : true, // Tolerate use of `== null`. - "evil" : false, // Tolerate use of `eval`. - "expr" : true, // Tolerate `ExpressionStatement` as Programs. - "forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`. - "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` - "latedef" : false, // Prohibit variable use before definition. - "loopfunc" : false, // Allow functions to be defined within loops. - "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`. - "regexp" : true, // Prohibit `.` and `[^...]` in regular expressions. - "regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`. - "scripturl" : true, // Tolerate script-targeted URLs. - "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`. - "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`. - "undef" : true, // Require all non-global variables be declared before they are used. - - - // Personal styling prefrences. - "lastsemic" : true, // Prohibit missing semicolon for the last statement in a one-line block - "newcap" : false, // Require capitalization of all constructor functions e.g. `new F()`. - "noempty" : true, // Prohipit use of empty blocks. - "nonew" : true, // Prohibit use of constructors for side-effects. - "nomen" : false, // Prohibit use of initial or trailing underbars in names. - "onevar" : false, // Allow only one `var` statement per function. - "onecase" : false, // Allow switches with one case statement - "plusplus" : false, // Prohibit use of `++` & `--`. - "proto" : false, // Allow use of __proto__ - "sub" : true, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`. - "trailing" : true, // Prohibit trailing whitespaces. - "white" : false // Check against strict whitespace and indentation rules. -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.npmignore deleted file mode 100644 index 54efff98..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules/ -.*.sw[nmop] -npm-debug.log diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/LICENSE deleted file mode 100644 index 3fac4c85..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/LICENSE +++ /dev/null @@ -1,78 +0,0 @@ -Copyright GoInstant, Inc. and other contributors. All rights reserved. -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. - -The following exceptions apply: - -=== - -`pubSufTest()` of generate-pubsuffix.js is in the public domain. - - // Any copyright is dedicated to the Public Domain. - // http://creativecommons.org/publicdomain/zero/1.0/ - -=== - -`public-suffix.txt` was obtained from -<https://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat?raw=1> -via <http://publicsuffix.org>. - -That file contains the usual Mozilla triple-license, for which this project uses it -under the terms of the MPL 1.1: - - // ***** BEGIN LICENSE BLOCK ***** - // Version: MPL 1.1/GPL 2.0/LGPL 2.1 - // - // The contents of this file are subject to the Mozilla Public License Version - // 1.1 (the "License"); you may not use this file except in compliance with - // the License. You may obtain a copy of the License at - // http://www.mozilla.org/MPL/ - // - // Software distributed under the License is distributed on an "AS IS" basis, - // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - // for the specific language governing rights and limitations under the - // License. - // - // The Original Code is the Public Suffix List. - // - // The Initial Developer of the Original Code is - // Jo Hermans <jo.hermans@gmail.com>. - // Portions created by the Initial Developer are Copyright (C) 2007 - // the Initial Developer. All Rights Reserved. - // - // Contributor(s): - // Ruben Arakelyan <ruben@rubenarakelyan.com> - // Gervase Markham <gerv@gerv.net> - // Pamela Greene <pamg.bugs@gmail.com> - // David Triendl <david@triendl.name> - // Jothan Frakes <jothan@gmail.com> - // The kind representatives of many TLD registries - // - // Alternatively, the contents of this file may be used under the terms of - // either the GNU General Public License Version 2 or later (the "GPL"), or - // the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - // in which case the provisions of the GPL or the LGPL are applicable instead - // of those above. If you wish to allow use of your version of this file only - // under the terms of either the GPL or the LGPL, and not to allow others to - // use your version of this file under the terms of the MPL, indicate your - // decision by deleting the provisions above and replace them with the notice - // and other provisions required by the GPL or the LGPL. If you do not delete - // the provisions above, a recipient may use your version of this file under - // the terms of any one of the MPL, the GPL or the LGPL. - // - // ***** END LICENSE BLOCK ***** diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/README.md deleted file mode 100644 index fd1dbb1d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/README.md +++ /dev/null @@ -1,380 +0,0 @@ -[RFC6265](http://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js - -![Tough Cookie](http://www.goinstant.com.s3.amazonaws.com/tough-cookie.jpg) - -# Synopsis - -``` javascript -var cookies = require('tough-cookie'); // note: not 'cookie', 'cookies' or 'node-cookie' -var Cookie = cookies.Cookie; -var cookie = Cookie.parse(header); -cookie.value = 'somethingdifferent'; -header = cookie.toString(); - -var cookiejar = new cookies.CookieJar(); -cookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb); -// ... -cookiejar.getCookies('http://example.com/otherpath',function(err,cookies) { - res.headers['cookie'] = cookies.join('; '); -}); -``` - -# Installation - -It's _so_ easy! - -`npm install tough-cookie` - -Requires `punycode`, which should get installed automatically for you. Note that node.js v0.6.2+ bundles punycode by default. - -Why the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken. - -# API - -cookies -======= - -Functions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be "bound". - -parseDate(string[,strict]) ------------------ - -Parse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. If strict is set to true then leading/trailing non-seperator characters around the time part will cause the parsing to fail (e.g. "Thu, 01 Jan 1970 00:00:010 GMT" has an extra trailing zero but Chrome, an assumedly RFC-compliant browser, treats this as valid). - -formatDate(date) ----------------- - -Format a Date into a RFC1123 string (the RFC6265-recommended format). - -canonicalDomain(str) --------------------- - -Transforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects). - -domainMatch(str,domStr[,canonicalize=true]) -------------------------------------------- - -Answers "does this real domain match the domain in a cookie?". The `str` is the "current" domain-name and the `domStr` is the "cookie" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a "suffix match". - -The `canonicalize` parameter will run the other two paramters through `canonicalDomain` or not. - -defaultPath(path) ------------------ - -Given a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the "directory" of a "file" in the path, but is specified by Section 5.1.4 of the RFC. - -The `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output. - -pathMatch(reqPath,cookiePath) ------------------------------ - -Answers "does the request-path path-match a given cookie-path?" as per RFC6265 Section 5.1.4. Returns a boolean. - -This is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`. - -parse(header[,strict=false]) ----------------------------- - -alias for `Cookie.parse(header[,strict])` - -fromJSON(string) ----------------- - -alias for `Cookie.fromJSON(string)` - -getPublicSuffix(hostname) -------------------------- - -Returns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it. - -For example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`. - -For further information, see http://publicsuffix.org/. This module derives its list from that site. - -cookieCompare(a,b) ------------------- - -For use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). Longest `.path`s go first, then sorted oldest to youngest. - -``` javascript -var cookies = [ /* unsorted array of Cookie objects */ ]; -cookies = cookies.sort(cookieCompare); -``` - -permuteDomain(domain) ---------------------- - -Generates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores. - - -permutePath(path) ------------------ - -Generates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores. - -Cookie -====== - -Cookie.parse(header[,strict=false]) ------------------------------------ - -Parses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. If in strict mode, returns `undefined` if the cookie doesn't follow the guidelines in section 4 of RFC6265. Generally speaking, strict mode can be used to validate your own generated Set-Cookie headers, but acting as a client you want to be lenient and leave strict mode off. - -Here's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response: - -``` javascript -if (res.headers['set-cookie'] instanceof Array) - cookies = res.headers['set-cookie'].map(Cookie.parse); -else - cookies = [Cookie.parse(res.headers['set-cookie'])]; -``` - -Cookie.fromJSON(string) ------------------------ - -Convert a JSON string to a `Cookie` object. Does a `JSON.parse()` and converts the `.created`, `.lastAccessed` and `.expires` properties into `Date` objects. - -Properties -========== - - * _key_ - string - the name or key of the cookie (default "") - * _value_ - string - the value of the cookie (default "") - * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `"Infinity"`). See `setExpires()` - * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `"Infinity"` and `"-Infinity"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()` - * _domain_ - string - the `Domain=` attribute of the cookie - * _path_ - string - the `Path=` of the cookie - * _secure_ - boolean - the `Secure` cookie flag - * _httpOnly_ - boolean - the `HttpOnly` cookie flag - * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside) - -After a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes: - - * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied) - * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one. - * _created_ - `Date` - when this cookie was added to the jar - * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute. - -Construction([{options}]) ------------- - -Receives an options object that can contain any Cookie properties, uses the default for unspecified properties. - -.toString() ------------ - -encode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`. - -.cookieString() ---------------- - -encode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '='). - -.setExpires(String) -------------------- - -sets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `"Infinity"` (a string) is set. - -.setMaxAge(number) -------------------- - -sets the maxAge in seconds. Coerces `-Infinity` to `"-Infinity"` and `Infinity` to `"Infinity"` so it JSON serializes correctly. - -.expiryTime([now=Date.now()]) ------------------------------ - -.expiryDate([now=Date.now()]) ------------------------------ - -expiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds. - -Max-Age takes precedence over Expires (as per the RFC). The `.created` attribute -- or, by default, the `now` paramter -- is used to offset the `.maxAge` attribute. - -If Expires (`.expires`) is set, that's returned. - -Otherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for "Tue, 19 Jan 2038 03:14:07 GMT" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents). - -.TTL([now=Date.now()]) ---------- - -compute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply. - -The "number" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned. - -.canonicalizedDoman() ---------------------- - -.cdomain() ----------- - -return the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters. - -.validate() ------------ - -Status: *IN PROGRESS*. Works for a few things, but is by no means comprehensive. - -validates cookie attributes for semantic correctness. Useful for "lint" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct: - -``` javascript -if (cookie.validate() === true) { - // it's tasty -} else { - // yuck! -} -``` - -CookieJar -========= - -Construction([store = new MemoryCookieStore()][, rejectPublicSuffixes]) ------------- - -Simply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used. - - -Attributes ----------- - - * _rejectPublicSuffixes_ - boolean - reject cookies with domains like "com" and "co.uk" (default: `true`) - -Since eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods. - -.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie)) -------------------------------------------------------------------- - -Attempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.created`, `.lastAccessed` and `.hostOnly` properties. - -The `options` object can be omitted and can have the following properties: - - * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies. - * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`. - * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies - * _strict_ - boolean - default `false` - perform extra checks - * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. CookieStore errors aren't ignored by this option. - -As per the RFC, the `.hostOnly` property is set if there was no "Domain=" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual). - -.storeCookie(cookie, [{options},] cb(err,cookie)) -------------------------------------------------- - -__REMOVED__ removed in lieu of the CookieStore API below - -.getCookies(currentUrl, [{options},] cb(err,cookies)) ------------------------------------------------------ - -Retrieve the list of cookies that can be sent in a Cookie header for the current url. - -If an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given. - -The `options` object can be omitted and can have the following properties: - - * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies. - * _secure_ - boolean - autodetect from url - indicates if this is a "Secure" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`. - * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies - * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially). - * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the CookieStore `fetchCookies` function (the default MemoryCookieStore supports it). - -The `.lastAccessed` property of the returned cookies will have been updated. - -.getCookieString(...) ---------------------- - -Accepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`. - -.getSetCookieStrings(...) -------------------------- - -Accepts the same options as `.getCookies()` but passes an array of strings suitable for Set-Cookie headers (rather than an array of `Cookie`s) to the callback. Simply maps the cookie array via `.toString()`. - -# CookieStore API - -The storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores. - -All `domain` parameters will have been normalized before calling. - -The Cookie store must have all of the following methods. - -store.findCookie(domain, path, key, cb(err,cookie)) ---------------------------------------------------- - -Retrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned. - -Callback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error). - -store.findCookies(domain, path, cb(err,cookies)) ------------------------------------------------- - -Locates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above. - -If no cookies are found, the callback MUST be passed an empty array. - -The resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done. - -As of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only). - -store.putCookie(cookie, cb(err)) --------------------------------- - -Adds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur. - -The `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties. - -Pass an error if the cookie cannot be stored. - -store.updateCookie(oldCookie, newCookie, cb(err)) -------------------------------------------------- - -Update an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store. - -The `.lastAccessed` property will always be different between the two objects and `.created` will always be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are sorted (or selected for deletion). - -Stores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object. - -The `newCookie` and `oldCookie` objects MUST NOT be modified. - -Pass an error if the newCookie cannot be stored. - -store.removeCookie(domain, path, key, cb(err)) ----------------------------------------------- - -Remove a cookie from the store (see notes on `findCookie` about the uniqueness constraint). - -The implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie. - -store.removeCookies(domain, path, cb(err)) ------------------------------------------- - -Removes matching cookies from the store. The `path` paramter is optional, and if missing means all paths in a domain should be removed. - -Pass an error ONLY if removing any existing cookies failed. - -# TODO - - * _full_ RFC5890/RFC5891 canonicalization for domains in `cdomain()` - * the optional `punycode` requirement implements RFC3492, but RFC6265 requires RFC5891 - * better tests for `validate()`? - -# Copyright and License - -(tl;dr: MIT with some MPL/1.1) - -Copyright GoInstant, Inc. and other contributors. All rights reserved. -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. - -Portions may be licensed under different licenses (in particular public-suffix.txt is MPL/1.1); please read the LICENSE file for full details. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js deleted file mode 100644 index a7fa5452..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Copyright GoInstant, Inc. and other contributors. All rights reserved. - * 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. - */ - -var fs = require('fs'); -var assert = require('assert'); -var punycode = require('punycode'); - -fs.readFile('./public-suffix.txt', 'utf8', function(err,string) { - if (err) throw err; - var lines = string.split("\n"); - process.nextTick(function() { - processList(lines); - }); -}); - -var index = {}; - -var COMMENT = new RegExp('//.+'); -function processList(lines) { - while (lines.length) { - var line = lines.shift(); - line = line.replace(COMMENT,'').trim(); - if (!line) continue; - addToIndex(index,line); - } - - pubSufTest(); - - var w = fs.createWriteStream('./lib/pubsuffix.js',{ - flags: 'w', - encoding: 'utf8', - mode: 0644, - }); - w.on('end', process.exit); - w.write("/****************************************************\n"); - w.write(" * AUTOMATICALLY GENERATED by generate-pubsuffix.js *\n"); - w.write(" * DO NOT EDIT! *\n"); - w.write(" ****************************************************/\n\n"); - - w.write("module.exports.getPublicSuffix = "); - w.write(getPublicSuffix.toString()); - w.write(";\n\n"); - - w.write("// The following generated structure is used under the MPL version 1.1\n"); - w.write("// See public-suffix.txt for more information\n\n"); - w.write("var index = module.exports.index = Object.freeze(\n"); - w.write(JSON.stringify(index)); - w.write(");\n\n"); - w.write("// END of automatically generated file\n"); - - w.end(); -} - -function addToIndex(index,line) { - var prefix = ''; - if (line.replace(/^(!|\*\.)/)) { - prefix = RegExp.$1; - line = line.slice(prefix.length); - } - line = prefix + punycode.toASCII(line); - - if (line.substr(0,1) == '!') - index[line.substr(1)] = false; - else - index[line] = true; -} - -// include the licence in the function since it gets written to pubsuffix.js -function getPublicSuffix(domain) { - /* - * Copyright GoInstant, Inc. and other contributors. All rights reserved. - * 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. - */ - if (!domain) return null; - if (domain.match(/^\./)) return null; - - domain = domain.toLowerCase(); - var parts = domain.split('.').reverse(); - - var suffix = ''; - var suffixLen = 0; - for (var i=0; i<parts.length; i++) { - var part = parts[i]; - var starstr = '*'+suffix; - var partstr = part+suffix; - - if (index[starstr]) { // star rule matches - suffixLen = i+1; - if (index[partstr] === false) { // exception rule matches (NB: false, not undefined) - suffixLen--; - } - } else if (index[partstr]) { // exact match, not exception - suffixLen = i+1; - } - - suffix = '.'+part+suffix; - } - - if (index['*'+suffix]) { // *.domain exists (e.g. *.kyoto.jp for domain='kyoto.jp'); - return null; - } - - if (suffixLen && parts.length > suffixLen) { - return parts.slice(0,suffixLen+1).reverse().join('.'); - } - - return null; -} - -function checkPublicSuffix(give,get) { - var got = getPublicSuffix(give); - assert.equal(got, get, give+' should be '+(get==null?'NULL':get)+' but got '+got); -} - -// pubSufTest() was converted to JavaScript from http://publicsuffix.org/list/test.txt -function pubSufTest() { - // For this function-scope and this function-scope ONLY: - // Any copyright is dedicated to the Public Domain. - // http://creativecommons.org/publicdomain/zero/1.0/ - - // NULL input. - checkPublicSuffix(null, null); - // Mixed case. - checkPublicSuffix('COM', null); - checkPublicSuffix('example.COM', 'example.com'); - checkPublicSuffix('WwW.example.COM', 'example.com'); - // Leading dot. - checkPublicSuffix('.com', null); - checkPublicSuffix('.example', null); - checkPublicSuffix('.example.com', null); - checkPublicSuffix('.example.example', null); - // Unlisted TLD. - checkPublicSuffix('example', null); - checkPublicSuffix('example.example', null); - checkPublicSuffix('b.example.example', null); - checkPublicSuffix('a.b.example.example', null); - // Listed, but non-Internet, TLD. - checkPublicSuffix('local', null); - checkPublicSuffix('example.local', null); - checkPublicSuffix('b.example.local', null); - checkPublicSuffix('a.b.example.local', null); - // TLD with only 1 rule. - checkPublicSuffix('biz', null); - checkPublicSuffix('domain.biz', 'domain.biz'); - checkPublicSuffix('b.domain.biz', 'domain.biz'); - checkPublicSuffix('a.b.domain.biz', 'domain.biz'); - // TLD with some 2-level rules. - checkPublicSuffix('com', null); - checkPublicSuffix('example.com', 'example.com'); - checkPublicSuffix('b.example.com', 'example.com'); - checkPublicSuffix('a.b.example.com', 'example.com'); - checkPublicSuffix('uk.com', null); - checkPublicSuffix('example.uk.com', 'example.uk.com'); - checkPublicSuffix('b.example.uk.com', 'example.uk.com'); - checkPublicSuffix('a.b.example.uk.com', 'example.uk.com'); - checkPublicSuffix('test.ac', 'test.ac'); - // TLD with only 1 (wildcard) rule. - checkPublicSuffix('cy', null); - checkPublicSuffix('c.cy', null); - checkPublicSuffix('b.c.cy', 'b.c.cy'); - checkPublicSuffix('a.b.c.cy', 'b.c.cy'); - // More complex TLD. - checkPublicSuffix('jp', null); - checkPublicSuffix('test.jp', 'test.jp'); - checkPublicSuffix('www.test.jp', 'test.jp'); - checkPublicSuffix('ac.jp', null); - checkPublicSuffix('test.ac.jp', 'test.ac.jp'); - checkPublicSuffix('www.test.ac.jp', 'test.ac.jp'); - checkPublicSuffix('kyoto.jp', null); - checkPublicSuffix('c.kyoto.jp', null); - checkPublicSuffix('b.c.kyoto.jp', 'b.c.kyoto.jp'); - checkPublicSuffix('a.b.c.kyoto.jp', 'b.c.kyoto.jp'); - checkPublicSuffix('pref.kyoto.jp', 'pref.kyoto.jp'); // Exception rule. - checkPublicSuffix('www.pref.kyoto.jp', 'pref.kyoto.jp'); // Exception rule. - checkPublicSuffix('city.kyoto.jp', 'city.kyoto.jp'); // Exception rule. - checkPublicSuffix('www.city.kyoto.jp', 'city.kyoto.jp'); // Exception rule. - // TLD with a wildcard rule and exceptions. - checkPublicSuffix('om', null); - checkPublicSuffix('test.om', null); - checkPublicSuffix('b.test.om', 'b.test.om'); - checkPublicSuffix('a.b.test.om', 'b.test.om'); - checkPublicSuffix('songfest.om', 'songfest.om'); - checkPublicSuffix('www.songfest.om', 'songfest.om'); - // US K12. - checkPublicSuffix('us', null); - checkPublicSuffix('test.us', 'test.us'); - checkPublicSuffix('www.test.us', 'test.us'); - checkPublicSuffix('ak.us', null); - checkPublicSuffix('test.ak.us', 'test.ak.us'); - checkPublicSuffix('www.test.ak.us', 'test.ak.us'); - checkPublicSuffix('k12.ak.us', null); - checkPublicSuffix('test.k12.ak.us', 'test.k12.ak.us'); - checkPublicSuffix('www.test.k12.ak.us', 'test.k12.ak.us'); - - -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/cookie.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/cookie.js deleted file mode 100644 index 1d8615b5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/cookie.js +++ /dev/null @@ -1,947 +0,0 @@ -/* - * Copyright GoInstant, Inc. and other contributors. All rights reserved. - * 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. - */ - -/*jshint regexp:false */ -var net = require('net'); -var urlParse = require('url').parse; -var pubsuffix = require('./pubsuffix'); - -var punycode; -try { - punycode = require('punycode'); -} catch(e) { - console.warn("cookie: can't load punycode; won't use punycode for domain normalization"); -} - -var DATE_DELIM = /[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/; - -// From RFC2616 S2.2: -var TOKEN = /[\x21\x23-\x26\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E-\x7A\x7C\x7E]/; - -// From RFC6265 S4.1.1 -// note that it excludes \x3B ";" -var COOKIE_OCTET = /[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]/; -var COOKIE_OCTETS = /^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/; - -// The name/key cannot be empty but the value can (S5.2): -var COOKIE_PAIR_STRICT = new RegExp('^('+TOKEN.source+'+)=("?)('+COOKIE_OCTET.source+'*)\\2'); -var COOKIE_PAIR = /^([^=\s]+)\s*=\s*("?)\s*(.*)\s*\2/; - -// RFC6265 S4.1.1 defines extension-av as 'any CHAR except CTLs or ";"' -// Note ';' is \x3B -var NON_CTL_SEMICOLON = /[\x20-\x3A\x3C-\x7E]+/; -var EXTENSION_AV = NON_CTL_SEMICOLON; -var PATH_VALUE = NON_CTL_SEMICOLON; - -// Used for checking whether or not there is a trailing semi-colon -var TRAILING_SEMICOLON = /;+$/; - -/* RFC6265 S5.1.1.5: - * [fail if] the day-of-month-value is less than 1 or greater than 31 - */ -var DAY_OF_MONTH = /^(0?[1-9]|[12][0-9]|3[01])$/; - -/* RFC6265 S5.1.1.5: - * [fail if] - * * the hour-value is greater than 23, - * * the minute-value is greater than 59, or - * * the second-value is greater than 59. - */ -var TIME = /(0?[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])/; -var STRICT_TIME = /^(0?[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/; - -var MONTH = /^(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)$/i; -var MONTH_TO_NUM = { - jan:0, feb:1, mar:2, apr:3, may:4, jun:5, jul:6, aug:7, sep:8, oct:9, nov:10, dec:11 -}; -var NUM_TO_MONTH = [ - 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec' -]; -var NUM_TO_DAY = [ - 'Sun','Mon','Tue','Wed','Thu','Fri','Sat' -]; - -var YEAR = /^([1-9][0-9]{1,3})$/; // 2 to 4 digits (will check range when parsing) - -var MAX_TIME = 2147483647000; // 31-bit max -var MAX_DATE = new Date(CookieJar.MAX_TIME); // 31-bit max -var MIN_TIME = 0; // 31-bit min -var MIN_DATE = new Date(CookieJar.MIN_TIME); // 31-bit min - - -// RFC6265 S5.1.1 date parser: -function parseDate(str,strict) { - if (!str) return; - var found_time, found_dom, found_month, found_year; - - /* RFC6265 S5.1.1: - * 2. Process each date-token sequentially in the order the date-tokens - * appear in the cookie-date - */ - var tokens = str.split(DATE_DELIM); - if (!tokens) return; - - var date = new Date(); - date.setMilliseconds(0); - - for (var i=0; i<tokens.length; i++) { - var token = tokens[i].trim(); - if (!token.length) continue; - - var result; - - /* 2.1. If the found-time flag is not set and the token matches the time - * production, set the found-time flag and set the hour- value, - * minute-value, and second-value to the numbers denoted by the digits in - * the date-token, respectively. Skip the remaining sub-steps and continue - * to the next date-token. - */ - if (!found_time) { - result = (strict ? STRICT_TIME : TIME).exec(token); - if (result) { - found_time = true; - date.setUTCHours(result[1]); - date.setUTCMinutes(result[2]); - date.setUTCSeconds(result[3]); - continue; - } - } - - /* 2.2. If the found-day-of-month flag is not set and the date-token matches - * the day-of-month production, set the found-day-of- month flag and set - * the day-of-month-value to the number denoted by the date-token. Skip - * the remaining sub-steps and continue to the next date-token. - */ - if (!found_dom) { - result = DAY_OF_MONTH.exec(token); - if (result) { - found_dom = true; - date.setUTCDate(result[1]); - continue; - } - } - - /* 2.3. If the found-month flag is not set and the date-token matches the - * month production, set the found-month flag and set the month-value to - * the month denoted by the date-token. Skip the remaining sub-steps and - * continue to the next date-token. - */ - if (!found_month) { - result = MONTH.exec(token); - if (result) { - found_month = true; - date.setUTCMonth(MONTH_TO_NUM[result[1].toLowerCase()]); - continue; - } - } - - /* 2.4. If the found-year flag is not set and the date-token matches the year - * production, set the found-year flag and set the year-value to the number - * denoted by the date-token. Skip the remaining sub-steps and continue to - * the next date-token. - */ - if (!found_year) { - result = YEAR.exec(token); - if (result) { - var year = result[0]; - /* From S5.1.1: - * 3. If the year-value is greater than or equal to 70 and less - * than or equal to 99, increment the year-value by 1900. - * 4. If the year-value is greater than or equal to 0 and less - * than or equal to 69, increment the year-value by 2000. - */ - if (70 <= year && year <= 99) - year += 1900; - else if (0 <= year && year <= 69) - year += 2000; - - if (year < 1601) - return; // 5. ... the year-value is less than 1601 - - found_year = true; - date.setUTCFullYear(year); - continue; - } - } - } - - if (!(found_time && found_dom && found_month && found_year)) { - return; // 5. ... at least one of the found-day-of-month, found-month, found- - // year, or found-time flags is not set, - } - - return date; -} - -function formatDate(date) { - var d = date.getUTCDate(); d = d >= 10 ? d : '0'+d; - var h = date.getUTCHours(); h = h >= 10 ? h : '0'+h; - var m = date.getUTCMinutes(); m = m >= 10 ? m : '0'+m; - var s = date.getUTCSeconds(); s = s >= 10 ? s : '0'+s; - return NUM_TO_DAY[date.getUTCDay()] + ', ' + - d+' '+ NUM_TO_MONTH[date.getUTCMonth()] +' '+ date.getUTCFullYear() +' '+ - h+':'+m+':'+s+' GMT'; -} - -// S5.1.2 Canonicalized Host Names -function canonicalDomain(str) { - if (str == null) return null; - str = str.trim().replace(/^\./,''); // S4.1.2.3 & S5.2.3: ignore leading . - - // convert to IDN if any non-ASCII characters - if (punycode && /[^\u0001-\u007f]/.test(str)) - str = punycode.toASCII(str); - - return str.toLowerCase(); -} - -// S5.1.3 Domain Matching -function domainMatch(str, domStr, canonicalize) { - if (str == null || domStr == null) return null; - if (canonicalize !== false) { - str = canonicalDomain(str); - domStr = canonicalDomain(domStr); - } - - /* - * "The domain string and the string are identical. (Note that both the - * domain string and the string will have been canonicalized to lower case at - * this point)" - */ - if (str == domStr) return true; - - /* "All of the following [three] conditions hold:" (order adjusted from the RFC) */ - - /* "* The string is a host name (i.e., not an IP address)." */ - if (net.isIP(str)) return false; - - /* "* The domain string is a suffix of the string" */ - var idx = str.indexOf(domStr); - if (idx <= 0) return false; // it's a non-match (-1) or prefix (0) - - // e.g "a.b.c".indexOf("b.c") === 2 - // 5 === 3+2 - if (str.length !== domStr.length + idx) // it's not a suffix - return false; - - /* "* The last character of the string that is not included in the domain - * string is a %x2E (".") character." */ - if (str.substr(idx-1,1) !== '.') return false; - return true; -} - - -// RFC6265 S5.1.4 Paths and Path-Match - -/* - * "The user agent MUST use an algorithm equivalent to the following algorithm - * to compute the default-path of a cookie:" - * - * Assumption: the path (and not query part or absolute uri) is passed in. - */ -function defaultPath(path) { - // "2. If the uri-path is empty or if the first character of the uri-path is not - // a %x2F ("/") character, output %x2F ("/") and skip the remaining steps. - if (!path || path.substr(0,1) !== "/") return "/"; - - // "3. If the uri-path contains no more than one %x2F ("/") character, output - // %x2F ("/") and skip the remaining step." - if (path === "/") return path; - - var rightSlash = path.lastIndexOf("/"); - if (rightSlash === 0) return "/"; - - // "4. Output the characters of the uri-path from the first character up to, - // but not including, the right-most %x2F ("/")." - return path.slice(0, rightSlash); -} - -/* - * "A request-path path-matches a given cookie-path if at least one of the - * following conditions holds:" - */ -function pathMatch(reqPath,cookiePath) { - // "o The cookie-path and the request-path are identical." - if (cookiePath === reqPath) - return true; - - var idx = reqPath.indexOf(cookiePath); - if (idx === 0) { - // "o The cookie-path is a prefix of the request-path, and the last - // character of the cookie-path is %x2F ("/")." - if (cookiePath.substr(-1) === "/") - return true; - - // " o The cookie-path is a prefix of the request-path, and the first - // character of the request-path that is not included in the cookie- path - // is a %x2F ("/") character." - if (reqPath.substr(cookiePath.length,1) === "/") - return true; - } - - return false; -} - -function parse(str, strict) { - str = str.trim(); - - // S4.1.1 Trailing semi-colons are not part of the specification. - // If we are not in strict mode we remove the trailing semi-colons. - var semiColonCheck = TRAILING_SEMICOLON.exec(str); - if (semiColonCheck) { - if (strict) return; - str = str.slice(0, semiColonCheck.index); - } - - // We use a regex to parse the "name-value-pair" part of S5.2 - var firstSemi = str.indexOf(';'); // S5.2 step 1 - var pairRx = strict ? COOKIE_PAIR_STRICT : COOKIE_PAIR; - var result = pairRx.exec(firstSemi === -1 ? str : str.substr(0,firstSemi)); - - // Rx satisfies the "the name string is empty" and "lacks a %x3D ("=")" - // constraints as well as trimming any whitespace. - if (!result) return; - - var c = new Cookie(); - c.key = result[1]; // the regexp should trim() already - c.value = result[3]; // [2] is quotes or empty-string - - if (firstSemi === -1) return c; - - // S5.2.3 "unparsed-attributes consist of the remainder of the set-cookie-string - // (including the %x3B (";") in question)." plus later on in the same section - // "discard the first ";" and trim". - var unparsed = str.slice(firstSemi).replace(/^\s*;\s*/,'').trim(); - - // "If the unparsed-attributes string is empty, skip the rest of these - // steps." - if (unparsed.length === 0) return c; - - /* - * S5.2 says that when looping over the items "[p]rocess the attribute-name - * and attribute-value according to the requirements in the following - * subsections" for every item. Plus, for many of the individual attributes - * in S5.3 it says to use the "attribute-value of the last attribute in the - * cookie-attribute-list". Therefore, in this implementation, we overwrite - * the previous value. - */ - var cookie_avs = unparsed.split(/\s*;\s*/); - while (cookie_avs.length) { - var av = cookie_avs.shift(); - - if (strict && !EXTENSION_AV.test(av)) return; - - var av_sep = av.indexOf('='); - var av_key, av_value; - if (av_sep === -1) { - av_key = av; - av_value = null; - } else { - av_key = av.substr(0,av_sep); - av_value = av.substr(av_sep+1); - } - - av_key = av_key.trim().toLowerCase(); - if (av_value) av_value = av_value.trim(); - - switch(av_key) { - case 'expires': // S5.2.1 - if (!av_value) { if(strict){return}else{break;} } - var exp = parseDate(av_value,strict); - // "If the attribute-value failed to parse as a cookie date, ignore the - // cookie-av." - if (exp == null) { if(strict){return}else{break;} } - c.expires = exp; - // over and underflow not realistically a concern: V8's getTime() seems to - // store something larger than a 32-bit time_t (even with 32-bit node) - break; - - case 'max-age': // S5.2.2 - if (!av_value) { if(strict){return}else{break;} } - // "If the first character of the attribute-value is not a DIGIT or a "-" - // character ...[or]... If the remainder of attribute-value contains a - // non-DIGIT character, ignore the cookie-av." - if (!/^-?[0-9]+$/.test(av_value)) { if(strict){return}else{break;} } - var delta = parseInt(av_value,10); - if (strict && delta <= 0) return; // S4.1.1 - // "If delta-seconds is less than or equal to zero (0), let expiry-time - // be the earliest representable date and time." - c.setMaxAge(delta); - break; - - case 'domain': // S5.2.3 - // "If the attribute-value is empty, the behavior is undefined. However, - // the user agent SHOULD ignore the cookie-av entirely." - if (!av_value) { if(strict){return}else{break;} } - // S5.2.3 "Let cookie-domain be the attribute-value without the leading %x2E - // (".") character." - var domain = av_value.trim().replace(/^\./,''); - if (!domain) { if(strict){return}else{break;} } // see "is empty" above - // "Convert the cookie-domain to lower case." - c.domain = domain.toLowerCase(); - break; - - case 'path': // S5.2.4 - /* - * "If the attribute-value is empty or if the first character of the - * attribute-value is not %x2F ("/"): - * Let cookie-path be the default-path. - * Otherwise: - * Let cookie-path be the attribute-value." - * - * We'll represent the default-path as null since it depends on the - * context of the parsing. - */ - if (!av_value || av_value.substr(0,1) != "/") { if(strict){return}else{break;} } - c.path = av_value; - break; - - case 'secure': // S5.2.5 - /* - * "If the attribute-name case-insensitively matches the string "Secure", - * the user agent MUST append an attribute to the cookie-attribute-list - * with an attribute-name of Secure and an empty attribute-value." - */ - if (av_value != null) { if(strict){return} } - c.secure = true; - break; - - case 'httponly': // S5.2.6 -- effectively the same as 'secure' - if (av_value != null) { if(strict){return} } - c.httpOnly = true; - break; - - default: - c.extensions = c.extensions || []; - c.extensions.push(av); - break; - } - } - - // ensure a default date for sorting: - c.creation = new Date(); - return c; -} - -function fromJSON(str) { - if (!str) return null; - - var obj; - try { - obj = JSON.parse(str); - } catch (e) { - return null; - } - - var c = new Cookie(); - for (var i=0; i<numCookieProperties; i++) { - var prop = cookieProperties[i]; - if (obj[prop] == null) continue; - if (prop === 'expires' || - prop === 'creation' || - prop === 'lastAccessed') - { - c[prop] = obj[prop] == "Infinity" ? "Infinity" : new Date(obj[prop]); - } else { - c[prop] = obj[prop]; - } - } - - - // ensure a default date for sorting: - c.creation = c.creation || new Date(); - - return c; -} - -/* Section 5.4 part 2: - * "* Cookies with longer paths are listed before cookies with - * shorter paths. - * - * * Among cookies that have equal-length path fields, cookies with - * earlier creation-times are listed before cookies with later - * creation-times." - */ - -function cookieCompare(a,b) { - // descending for length: b CMP a - var deltaLen = (b.path ? b.path.length : 0) - (a.path ? a.path.length : 0); - if (deltaLen !== 0) return deltaLen; - // ascending for time: a CMP b - return (a.creation ? a.creation.getTime() : MAX_TIME) - - (b.creation ? b.creation.getTime() : MAX_TIME); -} - -// Gives the permutation of all possible domainMatch()es of a given domain. The -// array is in shortest-to-longest order. Handy for indexing. -function permuteDomain(domain) { - var pubSuf = pubsuffix.getPublicSuffix(domain); - if (!pubSuf) return null; - if (pubSuf == domain) return [domain]; - - var prefix = domain.slice(0,-(pubSuf.length+1)); // ".example.com" - var parts = prefix.split('.').reverse(); - var cur = pubSuf; - var permutations = [cur]; - while (parts.length) { - cur = parts.shift()+'.'+cur; - permutations.push(cur); - } - return permutations; -} - -// Gives the permutation of all possible pathMatch()es of a given path. The -// array is in longest-to-shortest order. Handy for indexing. -function permutePath(path) { - var origPath = path; - if (path === '/') return ['/']; - if (path.lastIndexOf('/') === path.length-1) - path = path.substr(0,path.length-1); - var permutations = [path]; - while (path.length > 1) { - var lindex = path.lastIndexOf('/'); - if (lindex === 0) break; - path = path.substr(0,lindex); - permutations.push(path); - } - permutations.push('/'); - return permutations; -} - - -function Cookie (opts) { - if (typeof opts !== "object") return; - Object.keys(opts).forEach(function (key) { - if (Cookie.prototype.hasOwnProperty(key)) { - this[key] = opts[key] || Cookie.prototype[key]; - } - }.bind(this)); -} - -Cookie.parse = parse; -Cookie.fromJSON = fromJSON; - -Cookie.prototype.key = ""; -Cookie.prototype.value = ""; - -// the order in which the RFC has them: -Cookie.prototype.expires = "Infinity"; // coerces to literal Infinity -Cookie.prototype.maxAge = null; // takes precedence over expires for TTL -Cookie.prototype.domain = null; -Cookie.prototype.path = null; -Cookie.prototype.secure = false; -Cookie.prototype.httpOnly = false; -Cookie.prototype.extensions = null; - -// set by the CookieJar: -Cookie.prototype.hostOnly = null; // boolean when set -Cookie.prototype.pathIsDefault = null; // boolean when set -Cookie.prototype.creation = null; // Date when set; defaulted by Cookie.parse -Cookie.prototype.lastAccessed = null; // Date when set - -var cookieProperties = Object.freeze(Object.keys(Cookie.prototype).map(function(p) { - if (p instanceof Function) return; - return p; -})); -var numCookieProperties = cookieProperties.length; - -Cookie.prototype.inspect = function inspect() { - var now = Date.now(); - return 'Cookie="'+this.toString() + - '; hostOnly='+(this.hostOnly != null ? this.hostOnly : '?') + - '; aAge='+(this.lastAccessed ? (now-this.lastAccessed.getTime())+'ms' : '?') + - '; cAge='+(this.creation ? (now-this.creation.getTime())+'ms' : '?') + - '"'; -}; - -Cookie.prototype.validate = function validate() { - if (!COOKIE_OCTETS.test(this.value)) - return false; - if (this.expires != Infinity && !(this.expires instanceof Date) && !parseDate(this.expires,true)) - return false; - if (this.maxAge != null && this.maxAge <= 0) - return false; // "Max-Age=" non-zero-digit *DIGIT - if (this.path != null && !PATH_VALUE.test(this.path)) - return false; - - var cdomain = this.cdomain(); - if (cdomain) { - if (cdomain.match(/\.$/)) - return false; // S4.1.2.3 suggests that this is bad. domainMatch() tests confirm this - var suffix = pubsuffix.getPublicSuffix(cdomain); - if (suffix == null) // it's a public suffix - return false; - } - return true; -}; - -Cookie.prototype.setExpires = function setExpires(exp) { - if (exp instanceof Date) this.expires = exp; - else this.expires = parseDate(exp) || "Infinity"; -}; - -Cookie.prototype.setMaxAge = function setMaxAge(age) { - if (age === Infinity || age === -Infinity) - this.maxAge = age.toString(); // so JSON.stringify() works - else - this.maxAge = age; -}; - -// gives Cookie header format -Cookie.prototype.cookieString = function cookieString() { - var val = this.value; - if (val == null) val = ''; - if (!val.length || COOKIE_OCTETS.test(val)) - return this.key+'='+val; - else - return this.key+'="'+val+'"'; -}; - -// gives Set-Cookie header format -Cookie.prototype.toString = function toString() { - var str = this.cookieString(); - - if (this.expires != Infinity) { - if (this.expires instanceof Date) - str += '; Expires='+formatDate(this.expires); - else - str += '; Expires='+this.expires; - } - - if (this.maxAge != null && this.maxAge != Infinity) - str += '; Max-Age='+this.maxAge; - - if (this.domain && !this.hostOnly) - str += '; Domain='+this.domain; - if (this.path) - str += '; Path='+this.path; - - if (this.secure) str += '; Secure'; - if (this.httpOnly) str += '; HttpOnly'; - if (this.extensions) { - this.extensions.forEach(function(ext) { - str += '; '+ext; - }); - } - - return str; -}; - -// TTL() partially replaces the "expiry-time" parts of S5.3 step 3 (setCookie() -// elsewhere) -// S5.3 says to give the "latest representable date" for which we use Infinity -// For "expired" we use 0 -Cookie.prototype.TTL = function TTL(now) { - /* RFC6265 S4.1.2.2 If a cookie has both the Max-Age and the Expires - * attribute, the Max-Age attribute has precedence and controls the - * expiration date of the cookie. - * (Concurs with S5.3 step 3) - */ - if (this.maxAge != null) { - return this.maxAge<=0 ? 0 : this.maxAge*1000; - } - - var expires = this.expires; - if (expires != Infinity) { - if (!(expires instanceof Date)) { - expires = parseDate(expires) || Infinity; - } - - if (expires == Infinity) - return Infinity; - - return expires.getTime() - (now || Date.now()); - } - - return Infinity; -}; - -// expiryTime() replaces the "expiry-time" parts of S5.3 step 3 (setCookie() -// elsewhere) -Cookie.prototype.expiryTime = function expiryTime(now) { - if (this.maxAge != null) { - var relativeTo = this.creation || now || new Date(); - var age = (this.maxAge <= 0) ? -Infinity : this.maxAge*1000; - return relativeTo.getTime() + age; - } - - if (this.expires == Infinity) return Infinity; - return this.expires.getTime(); -}; - -// expiryDate() replaces the "expiry-time" parts of S5.3 step 3 (setCookie() -// elsewhere), except it returns a Date -Cookie.prototype.expiryDate = function expiryDate(now) { - var millisec = this.expiryTime(now); - if (millisec == Infinity) return new Date(MAX_TIME); - else if (millisec == -Infinity) return new Date(MIN_TIME); - else return new Date(millisec); -}; - -// This replaces the "persistent-flag" parts of S5.3 step 3 -Cookie.prototype.isPersistent = function isPersistent() { - return (this.maxAge != null || this.expires != Infinity); -}; - -// Mostly S5.1.2 and S5.2.3: -Cookie.prototype.cdomain = -Cookie.prototype.canonicalizedDomain = function canonicalizedDomain() { - if (this.domain == null) return null; - return canonicalDomain(this.domain); -}; - - -var memstore; -function CookieJar(store, rejectPublicSuffixes) { - if (rejectPublicSuffixes != null) this.rejectPublicSuffixes = rejectPublicSuffixes; - if (!store) { - memstore = memstore || require('./memstore'); - store = new memstore.MemoryCookieStore(); - } - this.store = store; -} -CookieJar.prototype.store = null; -CookieJar.prototype.rejectPublicSuffixes = true; - -CookieJar.prototype.setCookie = function setCookie(cookie, url, options, cb) { - var err; - var context = (url instanceof Object) ? url : urlParse(url); - if (options instanceof Function) { - cb = options; - options = {}; - } - - var host = canonicalDomain(context.hostname); - - // S5.3 step 1 - if (!(cookie instanceof Cookie)) - cookie = Cookie.parse(cookie, options.strict === true); - if (!cookie) { - err = new Error("Cookie failed to parse"); - return cb(options.ignoreError ? null : err); - } - - // S5.3 step 2 - var now = options.now || new Date(); // will assign later to save effort in the face of errors - - // S5.3 step 3: NOOP; persistent-flag and expiry-time is handled by getCookie() - - // S5.3 step 4: NOOP; domain is null by default - - // S5.3 step 5: public suffixes - if (this.rejectPublicSuffixes && cookie.domain) { - var suffix = pubsuffix.getPublicSuffix(cookie.cdomain()); - if (suffix == null) { // e.g. "com" - err = new Error("Cookie has domain set to a public suffix"); - return cb(options.ignoreError ? null : err); - } - } - - // S5.3 step 6: - if (cookie.domain) { - if (!domainMatch(host, cookie.cdomain(), false)) { - err = new Error("Cookie not in this host's domain. Cookie:"+cookie.cdomain()+" Request:"+host); - return cb(options.ignoreError ? null : err); - } - - if (cookie.hostOnly == null) // don't reset if already set - cookie.hostOnly = false; - - } else { - cookie.hostOnly = true; - cookie.domain = host; - } - - // S5.3 step 7: "Otherwise, set the cookie's path to the default-path of the - // request-uri" - if (!cookie.path) { - cookie.path = defaultPath(context.pathname); - cookie.pathIsDefault = true; - } else { - if (cookie.path.length > 1 && cookie.path.substr(-1) == '/') - cookie.path = cookie.path.slice(0,-1); - } - - // S5.3 step 8: NOOP; secure attribute - // S5.3 step 9: NOOP; httpOnly attribute - - // S5.3 step 10 - if (options.http === false && cookie.httpOnly) { - err = new Error("Cookie is HttpOnly and this isn't an HTTP API"); - return cb(options.ignoreError ? null : err); - } - - var store = this.store; - - if (!store.updateCookie) { - store.updateCookie = function stubUpdateCookie(oldCookie, newCookie, cb) { - this.putCookie(newCookie, cb); - }; - } - - store.findCookie(cookie.domain, cookie.path, cookie.key, function(err,oldCookie) { - if (err) return cb(err); - - var next = function(err) { - if (err) return cb(err); - else cb(null, cookie); - }; - - if (oldCookie) { - // S5.3 step 11 - "If the cookie store contains a cookie with the same name, - // domain, and path as the newly created cookie:" - if (options.http === false && oldCookie.httpOnly) { // step 11.2 - err = new Error("old Cookie is HttpOnly and this isn't an HTTP API"); - return cb(options.ignoreError ? null : err); - } - cookie.creation = oldCookie.creation; // step 11.3 - cookie.lastAccessed = now; - // Step 11.4 (delete cookie) is implied by just setting the new one: - store.updateCookie(oldCookie, cookie, next); // step 12 - - } else { - cookie.creation = cookie.lastAccessed = now; - store.putCookie(cookie, next); // step 12 - } - }); -}; - -// RFC6365 S5.4 -CookieJar.prototype.getCookies = function getCookies(url, options, cb) { - var context = (url instanceof Object) ? url : urlParse(url); - if (options instanceof Function) { - cb = options; - options = {}; - } - - var host = canonicalDomain(context.hostname); - var path = context.pathname || '/'; - - var secure = options.secure; - if (secure == null && context.protocol && - (context.protocol == 'https:' || context.protocol == 'wss:')) - { - secure = true; - } - - var http = options.http; - if (http == null) http = true; - - var now = options.now || Date.now(); - var expireCheck = options.expire !== false; - var allPaths = !!options.allPaths; - var store = this.store; - - function matchingCookie(c) { - // "Either: - // The cookie's host-only-flag is true and the canonicalized - // request-host is identical to the cookie's domain. - // Or: - // The cookie's host-only-flag is false and the canonicalized - // request-host domain-matches the cookie's domain." - if (c.hostOnly) { - if (c.domain != host) return false; - } else { - if (!domainMatch(host, c.domain, false)) return false; - } - - // "The request-uri's path path-matches the cookie's path." - if (!allPaths && !pathMatch(path, c.path)) - return false; - - // "If the cookie's secure-only-flag is true, then the request-uri's - // scheme must denote a "secure" protocol" - if (c.secure && !secure) - return false; - - // "If the cookie's http-only-flag is true, then exclude the cookie if the - // cookie-string is being generated for a "non-HTTP" API" - if (c.httpOnly && !http) - return false; - - // deferred from S5.3 - // non-RFC: allow retention of expired cookies by choice - if (expireCheck && c.expiryTime() <= now) { - store.removeCookie(c.domain, c.path, c.key, function(){}); // result ignored - return false; - } - - return true; - } - - store.findCookies(host, allPaths ? null : path, function(err,cookies) { - if (err) return cb(err); - - cookies = cookies.filter(matchingCookie); - - // sorting of S5.4 part 2 - if (options.sort !== false) - cookies = cookies.sort(cookieCompare); - - // S5.4 part 3 - var now = new Date(); - cookies.forEach(function(c) { c.lastAccessed = now }); - // TODO persist lastAccessed - - cb(null,cookies); - }); -}; - -CookieJar.prototype.getCookieString = function(/*..., cb*/) { - var args = Array.prototype.slice.call(arguments,0); - var cb = args.pop(); - var next = function(err,cookies) { - if (err) cb(err); - else cb(null, cookies.map(function(c){return c.cookieString()}).join('; ')); - }; - args.push(next); - this.getCookies.apply(this,args); -}; - -CookieJar.prototype.getSetCookieStrings = function(/*..., cb*/) { - var args = Array.prototype.slice.call(arguments,0); - var cb = args.pop(); - var next = function(err,cookies) { - if (err) cb(err); - else cb(null, cookies.map(function(c){return c.toString()})); - }; - args.push(next); - this.getCookies.apply(this,args); -}; - - - -module.exports = { - CookieJar: CookieJar, - Cookie: Cookie, - parseDate: parseDate, - formatDate: formatDate, - parse: parse, - fromJSON: fromJSON, - domainMatch: domainMatch, - defaultPath: defaultPath, - pathMatch: pathMatch, - getPublicSuffix: pubsuffix.getPublicSuffix, - cookieCompare: cookieCompare, - permuteDomain: permuteDomain, - permutePath: permutePath, - canonicalDomain: canonicalDomain, -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/memstore.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/memstore.js deleted file mode 100644 index 66abb376..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/memstore.js +++ /dev/null @@ -1,102 +0,0 @@ -var tough = require('./cookie'); -var permuteDomain = tough.permuteDomain; -var permutePath = tough.permutePath; -var util = require('util'); - -function MemoryCookieStore() { - this.idx = {}; -} -module.exports.MemoryCookieStore = MemoryCookieStore; -MemoryCookieStore.prototype.idx = null; - -// force a default depth: -MemoryCookieStore.prototype.inspect = function inspect() { - return "{ idx: "+util.inspect(this.idx, false, 2)+' }'; -}; - -MemoryCookieStore.prototype.findCookie = function findCookie(domain, path, key, cb) { - if (!this.idx[domain]) return cb(null,undefined); - if (!this.idx[domain][path]) return cb(null,undefined); - return cb(null,this.idx[domain][path][key]||null); -}; - -MemoryCookieStore.prototype.findCookies = function findCookies(domain, path, cb) { - var results = []; - if (!domain) return cb(null,[]); - - var pathMatcher; - if (!path) { - // null or '/' means "all paths" - pathMatcher = function matchAll(domainIndex) { - for (var curPath in domainIndex) { - var pathIndex = domainIndex[curPath]; - for (var key in pathIndex) { - results.push(pathIndex[key]); - } - } - }; - - } else if (path === '/') { - pathMatcher = function matchSlash(domainIndex) { - var pathIndex = domainIndex['/']; - if (!pathIndex) return; - for (var key in pathIndex) { - results.push(pathIndex[key]); - } - }; - - } else { - var paths = permutePath(path) || [path]; - pathMatcher = function matchRFC(domainIndex) { - paths.forEach(function(curPath) { - var pathIndex = domainIndex[curPath]; - if (!pathIndex) return; - for (var key in pathIndex) { - results.push(pathIndex[key]); - } - }); - }; - } - - var domains = permuteDomain(domain) || [domain]; - var idx = this.idx; - domains.forEach(function(curDomain) { - var domainIndex = idx[curDomain]; - if (!domainIndex) return; - pathMatcher(domainIndex); - }); - - cb(null,results); -}; - -MemoryCookieStore.prototype.putCookie = function putCookie(cookie, cb) { - if (!this.idx[cookie.domain]) this.idx[cookie.domain] = {}; - if (!this.idx[cookie.domain][cookie.path]) this.idx[cookie.domain][cookie.path] = {}; - this.idx[cookie.domain][cookie.path][cookie.key] = cookie; - cb(null); -}; - -MemoryCookieStore.prototype.updateCookie = function updateCookie(oldCookie, newCookie, cb) { - // updateCookie() may avoid updating cookies that are identical. For example, - // lastAccessed may not be important to some stores and an equality - // comparison could exclude that field. - this.putCookie(newCookie,cb); -}; - -MemoryCookieStore.prototype.removeCookie = function removeCookie(domain, path, key, cb) { - if (this.idx[domain] && this.idx[domain][path] && this.idx[domain][path][key]) { - delete this.idx[domain][path][key]; - } - cb(null); -}; - -MemoryCookieStore.prototype.removeCookies = function removeCookies(domain, path, cb) { - if (!this.idx[domain]) { - if (path) { - delete this.idx[domain][path]; - } else { - delete this.idx[domain]; - } - } - return cb(null); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js deleted file mode 100644 index a7031473..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************** - * AUTOMATICALLY GENERATED by generate-pubsuffix.js * - * DO NOT EDIT! * - ****************************************************/ - -module.exports.getPublicSuffix = function getPublicSuffix(domain) { - /* - * Copyright GoInstant, Inc. and other contributors. All rights reserved. - * 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. - */ - if (!domain) return null; - if (domain.match(/^\./)) return null; - - domain = domain.toLowerCase(); - var parts = domain.split('.').reverse(); - - var suffix = ''; - var suffixLen = 0; - for (var i=0; i<parts.length; i++) { - var part = parts[i]; - var starstr = '*'+suffix; - var partstr = part+suffix; - - if (index[starstr]) { // star rule matches - suffixLen = i+1; - if (index[partstr] === false) { // exception rule matches (NB: false, not undefined) - suffixLen--; - } - } else if (index[partstr]) { // exact match, not exception - suffixLen = i+1; - } - - suffix = '.'+part+suffix; - } - - if (index['*'+suffix]) { // *.domain exists (e.g. *.kyoto.jp for domain='kyoto.jp'); - return null; - } - - if (suffixLen && parts.length > suffixLen) { - return parts.slice(0,suffixLen+1).reverse().join('.'); - } - - return null; -}; - -// The following generated structure is used under the MPL version 1.1 -// See public-suffix.txt for more information - -var index = module.exports.index = Object.freeze( -{"ac":true,"com.ac":true,"edu.ac":true,"gov.ac":true,"net.ac":true,"mil.ac":true,"org.ac":true,"ad":true,"nom.ad":true,"ae":true,"co.ae":true,"net.ae":true,"org.ae":true,"sch.ae":true,"ac.ae":true,"gov.ae":true,"mil.ae":true,"aero":true,"accident-investigation.aero":true,"accident-prevention.aero":true,"aerobatic.aero":true,"aeroclub.aero":true,"aerodrome.aero":true,"agents.aero":true,"aircraft.aero":true,"airline.aero":true,"airport.aero":true,"air-surveillance.aero":true,"airtraffic.aero":true,"air-traffic-control.aero":true,"ambulance.aero":true,"amusement.aero":true,"association.aero":true,"author.aero":true,"ballooning.aero":true,"broker.aero":true,"caa.aero":true,"cargo.aero":true,"catering.aero":true,"certification.aero":true,"championship.aero":true,"charter.aero":true,"civilaviation.aero":true,"club.aero":true,"conference.aero":true,"consultant.aero":true,"consulting.aero":true,"control.aero":true,"council.aero":true,"crew.aero":true,"design.aero":true,"dgca.aero":true,"educator.aero":true,"emergency.aero":true,"engine.aero":true,"engineer.aero":true,"entertainment.aero":true,"equipment.aero":true,"exchange.aero":true,"express.aero":true,"federation.aero":true,"flight.aero":true,"freight.aero":true,"fuel.aero":true,"gliding.aero":true,"government.aero":true,"groundhandling.aero":true,"group.aero":true,"hanggliding.aero":true,"homebuilt.aero":true,"insurance.aero":true,"journal.aero":true,"journalist.aero":true,"leasing.aero":true,"logistics.aero":true,"magazine.aero":true,"maintenance.aero":true,"marketplace.aero":true,"media.aero":true,"microlight.aero":true,"modelling.aero":true,"navigation.aero":true,"parachuting.aero":true,"paragliding.aero":true,"passenger-association.aero":true,"pilot.aero":true,"press.aero":true,"production.aero":true,"recreation.aero":true,"repbody.aero":true,"res.aero":true,"research.aero":true,"rotorcraft.aero":true,"safety.aero":true,"scientist.aero":true,"services.aero":true,"show.aero":true,"skydiving.aero":true,"software.aero":true,"student.aero":true,"taxi.aero":true,"trader.aero":true,"trading.aero":true,"trainer.aero":true,"union.aero":true,"workinggroup.aero":true,"works.aero":true,"af":true,"gov.af":true,"com.af":true,"org.af":true,"net.af":true,"edu.af":true,"ag":true,"com.ag":true,"org.ag":true,"net.ag":true,"co.ag":true,"nom.ag":true,"ai":true,"off.ai":true,"com.ai":true,"net.ai":true,"org.ai":true,"al":true,"com.al":true,"edu.al":true,"gov.al":true,"mil.al":true,"net.al":true,"org.al":true,"am":true,"an":true,"com.an":true,"net.an":true,"org.an":true,"edu.an":true,"ao":true,"ed.ao":true,"gv.ao":true,"og.ao":true,"co.ao":true,"pb.ao":true,"it.ao":true,"aq":true,"*.ar":true,"congresodelalengua3.ar":false,"educ.ar":false,"gobiernoelectronico.ar":false,"mecon.ar":false,"nacion.ar":false,"nic.ar":false,"promocion.ar":false,"retina.ar":false,"uba.ar":false,"e164.arpa":true,"in-addr.arpa":true,"ip6.arpa":true,"iris.arpa":true,"uri.arpa":true,"urn.arpa":true,"as":true,"gov.as":true,"asia":true,"at":true,"ac.at":true,"co.at":true,"gv.at":true,"or.at":true,"com.au":true,"net.au":true,"org.au":true,"edu.au":true,"gov.au":true,"csiro.au":true,"asn.au":true,"id.au":true,"info.au":true,"conf.au":true,"oz.au":true,"act.au":true,"nsw.au":true,"nt.au":true,"qld.au":true,"sa.au":true,"tas.au":true,"vic.au":true,"wa.au":true,"act.edu.au":true,"nsw.edu.au":true,"nt.edu.au":true,"qld.edu.au":true,"sa.edu.au":true,"tas.edu.au":true,"vic.edu.au":true,"wa.edu.au":true,"act.gov.au":true,"nt.gov.au":true,"qld.gov.au":true,"sa.gov.au":true,"tas.gov.au":true,"vic.gov.au":true,"wa.gov.au":true,"aw":true,"com.aw":true,"ax":true,"az":true,"com.az":true,"net.az":true,"int.az":true,"gov.az":true,"org.az":true,"edu.az":true,"info.az":true,"pp.az":true,"mil.az":true,"name.az":true,"pro.az":true,"biz.az":true,"ba":true,"org.ba":true,"net.ba":true,"edu.ba":true,"gov.ba":true,"mil.ba":true,"unsa.ba":true,"unbi.ba":true,"co.ba":true,"com.ba":true,"rs.ba":true,"bb":true,"biz.bb":true,"com.bb":true,"edu.bb":true,"gov.bb":true,"info.bb":true,"net.bb":true,"org.bb":true,"store.bb":true,"*.bd":true,"be":true,"ac.be":true,"bf":true,"gov.bf":true,"bg":true,"a.bg":true,"b.bg":true,"c.bg":true,"d.bg":true,"e.bg":true,"f.bg":true,"g.bg":true,"h.bg":true,"i.bg":true,"j.bg":true,"k.bg":true,"l.bg":true,"m.bg":true,"n.bg":true,"o.bg":true,"p.bg":true,"q.bg":true,"r.bg":true,"s.bg":true,"t.bg":true,"u.bg":true,"v.bg":true,"w.bg":true,"x.bg":true,"y.bg":true,"z.bg":true,"0.bg":true,"1.bg":true,"2.bg":true,"3.bg":true,"4.bg":true,"5.bg":true,"6.bg":true,"7.bg":true,"8.bg":true,"9.bg":true,"bh":true,"com.bh":true,"edu.bh":true,"net.bh":true,"org.bh":true,"gov.bh":true,"bi":true,"co.bi":true,"com.bi":true,"edu.bi":true,"or.bi":true,"org.bi":true,"biz":true,"bj":true,"asso.bj":true,"barreau.bj":true,"gouv.bj":true,"bm":true,"com.bm":true,"edu.bm":true,"gov.bm":true,"net.bm":true,"org.bm":true,"*.bn":true,"bo":true,"com.bo":true,"edu.bo":true,"gov.bo":true,"gob.bo":true,"int.bo":true,"org.bo":true,"net.bo":true,"mil.bo":true,"tv.bo":true,"br":true,"adm.br":true,"adv.br":true,"agr.br":true,"am.br":true,"arq.br":true,"art.br":true,"ato.br":true,"b.br":true,"bio.br":true,"blog.br":true,"bmd.br":true,"can.br":true,"cim.br":true,"cng.br":true,"cnt.br":true,"com.br":true,"coop.br":true,"ecn.br":true,"edu.br":true,"emp.br":true,"eng.br":true,"esp.br":true,"etc.br":true,"eti.br":true,"far.br":true,"flog.br":true,"fm.br":true,"fnd.br":true,"fot.br":true,"fst.br":true,"g12.br":true,"ggf.br":true,"gov.br":true,"imb.br":true,"ind.br":true,"inf.br":true,"jor.br":true,"jus.br":true,"lel.br":true,"mat.br":true,"med.br":true,"mil.br":true,"mus.br":true,"net.br":true,"nom.br":true,"not.br":true,"ntr.br":true,"odo.br":true,"org.br":true,"ppg.br":true,"pro.br":true,"psc.br":true,"psi.br":true,"qsl.br":true,"radio.br":true,"rec.br":true,"slg.br":true,"srv.br":true,"taxi.br":true,"teo.br":true,"tmp.br":true,"trd.br":true,"tur.br":true,"tv.br":true,"vet.br":true,"vlog.br":true,"wiki.br":true,"zlg.br":true,"bs":true,"com.bs":true,"net.bs":true,"org.bs":true,"edu.bs":true,"gov.bs":true,"bt":true,"com.bt":true,"edu.bt":true,"gov.bt":true,"net.bt":true,"org.bt":true,"bw":true,"co.bw":true,"org.bw":true,"by":true,"gov.by":true,"mil.by":true,"com.by":true,"of.by":true,"bz":true,"com.bz":true,"net.bz":true,"org.bz":true,"edu.bz":true,"gov.bz":true,"ca":true,"ab.ca":true,"bc.ca":true,"mb.ca":true,"nb.ca":true,"nf.ca":true,"nl.ca":true,"ns.ca":true,"nt.ca":true,"nu.ca":true,"on.ca":true,"pe.ca":true,"qc.ca":true,"sk.ca":true,"yk.ca":true,"gc.ca":true,"cat":true,"cc":true,"cd":true,"gov.cd":true,"cf":true,"cg":true,"ch":true,"ci":true,"org.ci":true,"or.ci":true,"com.ci":true,"co.ci":true,"edu.ci":true,"ed.ci":true,"ac.ci":true,"net.ci":true,"go.ci":true,"asso.ci":true,"xn--aroport-bya.ci":true,"int.ci":true,"presse.ci":true,"md.ci":true,"gouv.ci":true,"*.ck":true,"www.ck":false,"cl":true,"gov.cl":true,"gob.cl":true,"co.cl":true,"mil.cl":true,"cm":true,"gov.cm":true,"cn":true,"ac.cn":true,"com.cn":true,"edu.cn":true,"gov.cn":true,"net.cn":true,"org.cn":true,"mil.cn":true,"xn--55qx5d.cn":true,"xn--io0a7i.cn":true,"xn--od0alg.cn":true,"ah.cn":true,"bj.cn":true,"cq.cn":true,"fj.cn":true,"gd.cn":true,"gs.cn":true,"gz.cn":true,"gx.cn":true,"ha.cn":true,"hb.cn":true,"he.cn":true,"hi.cn":true,"hl.cn":true,"hn.cn":true,"jl.cn":true,"js.cn":true,"jx.cn":true,"ln.cn":true,"nm.cn":true,"nx.cn":true,"qh.cn":true,"sc.cn":true,"sd.cn":true,"sh.cn":true,"sn.cn":true,"sx.cn":true,"tj.cn":true,"xj.cn":true,"xz.cn":true,"yn.cn":true,"zj.cn":true,"hk.cn":true,"mo.cn":true,"tw.cn":true,"co":true,"arts.co":true,"com.co":true,"edu.co":true,"firm.co":true,"gov.co":true,"info.co":true,"int.co":true,"mil.co":true,"net.co":true,"nom.co":true,"org.co":true,"rec.co":true,"web.co":true,"com":true,"coop":true,"cr":true,"ac.cr":true,"co.cr":true,"ed.cr":true,"fi.cr":true,"go.cr":true,"or.cr":true,"sa.cr":true,"cu":true,"com.cu":true,"edu.cu":true,"org.cu":true,"net.cu":true,"gov.cu":true,"inf.cu":true,"cv":true,"cx":true,"gov.cx":true,"*.cy":true,"cz":true,"de":true,"dj":true,"dk":true,"dm":true,"com.dm":true,"net.dm":true,"org.dm":true,"edu.dm":true,"gov.dm":true,"do":true,"art.do":true,"com.do":true,"edu.do":true,"gob.do":true,"gov.do":true,"mil.do":true,"net.do":true,"org.do":true,"sld.do":true,"web.do":true,"dz":true,"com.dz":true,"org.dz":true,"net.dz":true,"gov.dz":true,"edu.dz":true,"asso.dz":true,"pol.dz":true,"art.dz":true,"ec":true,"com.ec":true,"info.ec":true,"net.ec":true,"fin.ec":true,"k12.ec":true,"med.ec":true,"pro.ec":true,"org.ec":true,"edu.ec":true,"gov.ec":true,"gob.ec":true,"mil.ec":true,"edu":true,"ee":true,"edu.ee":true,"gov.ee":true,"riik.ee":true,"lib.ee":true,"med.ee":true,"com.ee":true,"pri.ee":true,"aip.ee":true,"org.ee":true,"fie.ee":true,"eg":true,"com.eg":true,"edu.eg":true,"eun.eg":true,"gov.eg":true,"mil.eg":true,"name.eg":true,"net.eg":true,"org.eg":true,"sci.eg":true,"*.er":true,"es":true,"com.es":true,"nom.es":true,"org.es":true,"gob.es":true,"edu.es":true,"*.et":true,"eu":true,"fi":true,"aland.fi":true,"*.fj":true,"*.fk":true,"fm":true,"fo":true,"fr":true,"com.fr":true,"asso.fr":true,"nom.fr":true,"prd.fr":true,"presse.fr":true,"tm.fr":true,"aeroport.fr":true,"assedic.fr":true,"avocat.fr":true,"avoues.fr":true,"cci.fr":true,"chambagri.fr":true,"chirurgiens-dentistes.fr":true,"experts-comptables.fr":true,"geometre-expert.fr":true,"gouv.fr":true,"greta.fr":true,"huissier-justice.fr":true,"medecin.fr":true,"notaires.fr":true,"pharmacien.fr":true,"port.fr":true,"veterinaire.fr":true,"ga":true,"gd":true,"ge":true,"com.ge":true,"edu.ge":true,"gov.ge":true,"org.ge":true,"mil.ge":true,"net.ge":true,"pvt.ge":true,"gf":true,"gg":true,"co.gg":true,"org.gg":true,"net.gg":true,"sch.gg":true,"gov.gg":true,"gh":true,"com.gh":true,"edu.gh":true,"gov.gh":true,"org.gh":true,"mil.gh":true,"gi":true,"com.gi":true,"ltd.gi":true,"gov.gi":true,"mod.gi":true,"edu.gi":true,"org.gi":true,"gl":true,"gm":true,"ac.gn":true,"com.gn":true,"edu.gn":true,"gov.gn":true,"org.gn":true,"net.gn":true,"gov":true,"gp":true,"com.gp":true,"net.gp":true,"mobi.gp":true,"edu.gp":true,"org.gp":true,"asso.gp":true,"gq":true,"gr":true,"com.gr":true,"edu.gr":true,"net.gr":true,"org.gr":true,"gov.gr":true,"gs":true,"*.gt":true,"www.gt":false,"*.gu":true,"gw":true,"gy":true,"co.gy":true,"com.gy":true,"net.gy":true,"hk":true,"com.hk":true,"edu.hk":true,"gov.hk":true,"idv.hk":true,"net.hk":true,"org.hk":true,"xn--55qx5d.hk":true,"xn--wcvs22d.hk":true,"xn--lcvr32d.hk":true,"xn--mxtq1m.hk":true,"xn--gmqw5a.hk":true,"xn--ciqpn.hk":true,"xn--gmq050i.hk":true,"xn--zf0avx.hk":true,"xn--io0a7i.hk":true,"xn--mk0axi.hk":true,"xn--od0alg.hk":true,"xn--od0aq3b.hk":true,"xn--tn0ag.hk":true,"xn--uc0atv.hk":true,"xn--uc0ay4a.hk":true,"hm":true,"hn":true,"com.hn":true,"edu.hn":true,"org.hn":true,"net.hn":true,"mil.hn":true,"gob.hn":true,"hr":true,"iz.hr":true,"from.hr":true,"name.hr":true,"com.hr":true,"ht":true,"com.ht":true,"shop.ht":true,"firm.ht":true,"info.ht":true,"adult.ht":true,"net.ht":true,"pro.ht":true,"org.ht":true,"med.ht":true,"art.ht":true,"coop.ht":true,"pol.ht":true,"asso.ht":true,"edu.ht":true,"rel.ht":true,"gouv.ht":true,"perso.ht":true,"hu":true,"co.hu":true,"info.hu":true,"org.hu":true,"priv.hu":true,"sport.hu":true,"tm.hu":true,"2000.hu":true,"agrar.hu":true,"bolt.hu":true,"casino.hu":true,"city.hu":true,"erotica.hu":true,"erotika.hu":true,"film.hu":true,"forum.hu":true,"games.hu":true,"hotel.hu":true,"ingatlan.hu":true,"jogasz.hu":true,"konyvelo.hu":true,"lakas.hu":true,"media.hu":true,"news.hu":true,"reklam.hu":true,"sex.hu":true,"shop.hu":true,"suli.hu":true,"szex.hu":true,"tozsde.hu":true,"utazas.hu":true,"video.hu":true,"id":true,"ac.id":true,"co.id":true,"go.id":true,"mil.id":true,"net.id":true,"or.id":true,"sch.id":true,"web.id":true,"ie":true,"gov.ie":true,"*.il":true,"im":true,"co.im":true,"ltd.co.im":true,"plc.co.im":true,"net.im":true,"gov.im":true,"org.im":true,"nic.im":true,"ac.im":true,"in":true,"co.in":true,"firm.in":true,"net.in":true,"org.in":true,"gen.in":true,"ind.in":true,"nic.in":true,"ac.in":true,"edu.in":true,"res.in":true,"gov.in":true,"mil.in":true,"info":true,"int":true,"eu.int":true,"io":true,"com.io":true,"iq":true,"gov.iq":true,"edu.iq":true,"mil.iq":true,"com.iq":true,"org.iq":true,"net.iq":true,"ir":true,"ac.ir":true,"co.ir":true,"gov.ir":true,"id.ir":true,"net.ir":true,"org.ir":true,"sch.ir":true,"xn--mgba3a4f16a.ir":true,"xn--mgba3a4fra.ir":true,"is":true,"net.is":true,"com.is":true,"edu.is":true,"gov.is":true,"org.is":true,"int.is":true,"it":true,"gov.it":true,"edu.it":true,"agrigento.it":true,"ag.it":true,"alessandria.it":true,"al.it":true,"ancona.it":true,"an.it":true,"aosta.it":true,"aoste.it":true,"ao.it":true,"arezzo.it":true,"ar.it":true,"ascoli-piceno.it":true,"ascolipiceno.it":true,"ap.it":true,"asti.it":true,"at.it":true,"avellino.it":true,"av.it":true,"bari.it":true,"ba.it":true,"andria-barletta-trani.it":true,"andriabarlettatrani.it":true,"trani-barletta-andria.it":true,"tranibarlettaandria.it":true,"barletta-trani-andria.it":true,"barlettatraniandria.it":true,"andria-trani-barletta.it":true,"andriatranibarletta.it":true,"trani-andria-barletta.it":true,"traniandriabarletta.it":true,"bt.it":true,"belluno.it":true,"bl.it":true,"benevento.it":true,"bn.it":true,"bergamo.it":true,"bg.it":true,"biella.it":true,"bi.it":true,"bologna.it":true,"bo.it":true,"bolzano.it":true,"bozen.it":true,"balsan.it":true,"alto-adige.it":true,"altoadige.it":true,"suedtirol.it":true,"bz.it":true,"brescia.it":true,"bs.it":true,"brindisi.it":true,"br.it":true,"cagliari.it":true,"ca.it":true,"caltanissetta.it":true,"cl.it":true,"campobasso.it":true,"cb.it":true,"carboniaiglesias.it":true,"carbonia-iglesias.it":true,"iglesias-carbonia.it":true,"iglesiascarbonia.it":true,"ci.it":true,"caserta.it":true,"ce.it":true,"catania.it":true,"ct.it":true,"catanzaro.it":true,"cz.it":true,"chieti.it":true,"ch.it":true,"como.it":true,"co.it":true,"cosenza.it":true,"cs.it":true,"cremona.it":true,"cr.it":true,"crotone.it":true,"kr.it":true,"cuneo.it":true,"cn.it":true,"dell-ogliastra.it":true,"dellogliastra.it":true,"ogliastra.it":true,"og.it":true,"enna.it":true,"en.it":true,"ferrara.it":true,"fe.it":true,"fermo.it":true,"fm.it":true,"firenze.it":true,"florence.it":true,"fi.it":true,"foggia.it":true,"fg.it":true,"forli-cesena.it":true,"forlicesena.it":true,"cesena-forli.it":true,"cesenaforli.it":true,"fc.it":true,"frosinone.it":true,"fr.it":true,"genova.it":true,"genoa.it":true,"ge.it":true,"gorizia.it":true,"go.it":true,"grosseto.it":true,"gr.it":true,"imperia.it":true,"im.it":true,"isernia.it":true,"is.it":true,"laquila.it":true,"aquila.it":true,"aq.it":true,"la-spezia.it":true,"laspezia.it":true,"sp.it":true,"latina.it":true,"lt.it":true,"lecce.it":true,"le.it":true,"lecco.it":true,"lc.it":true,"livorno.it":true,"li.it":true,"lodi.it":true,"lo.it":true,"lucca.it":true,"lu.it":true,"macerata.it":true,"mc.it":true,"mantova.it":true,"mn.it":true,"massa-carrara.it":true,"massacarrara.it":true,"carrara-massa.it":true,"carraramassa.it":true,"ms.it":true,"matera.it":true,"mt.it":true,"medio-campidano.it":true,"mediocampidano.it":true,"campidano-medio.it":true,"campidanomedio.it":true,"vs.it":true,"messina.it":true,"me.it":true,"milano.it":true,"milan.it":true,"mi.it":true,"modena.it":true,"mo.it":true,"monza.it":true,"monza-brianza.it":true,"monzabrianza.it":true,"monzaebrianza.it":true,"monzaedellabrianza.it":true,"monza-e-della-brianza.it":true,"mb.it":true,"napoli.it":true,"naples.it":true,"na.it":true,"novara.it":true,"no.it":true,"nuoro.it":true,"nu.it":true,"oristano.it":true,"or.it":true,"padova.it":true,"padua.it":true,"pd.it":true,"palermo.it":true,"pa.it":true,"parma.it":true,"pr.it":true,"pavia.it":true,"pv.it":true,"perugia.it":true,"pg.it":true,"pescara.it":true,"pe.it":true,"pesaro-urbino.it":true,"pesarourbino.it":true,"urbino-pesaro.it":true,"urbinopesaro.it":true,"pu.it":true,"piacenza.it":true,"pc.it":true,"pisa.it":true,"pi.it":true,"pistoia.it":true,"pt.it":true,"pordenone.it":true,"pn.it":true,"potenza.it":true,"pz.it":true,"prato.it":true,"po.it":true,"ragusa.it":true,"rg.it":true,"ravenna.it":true,"ra.it":true,"reggio-calabria.it":true,"reggiocalabria.it":true,"rc.it":true,"reggio-emilia.it":true,"reggioemilia.it":true,"re.it":true,"rieti.it":true,"ri.it":true,"rimini.it":true,"rn.it":true,"roma.it":true,"rome.it":true,"rm.it":true,"rovigo.it":true,"ro.it":true,"salerno.it":true,"sa.it":true,"sassari.it":true,"ss.it":true,"savona.it":true,"sv.it":true,"siena.it":true,"si.it":true,"siracusa.it":true,"sr.it":true,"sondrio.it":true,"so.it":true,"taranto.it":true,"ta.it":true,"tempio-olbia.it":true,"tempioolbia.it":true,"olbia-tempio.it":true,"olbiatempio.it":true,"ot.it":true,"teramo.it":true,"te.it":true,"terni.it":true,"tr.it":true,"torino.it":true,"turin.it":true,"to.it":true,"trapani.it":true,"tp.it":true,"trento.it":true,"trentino.it":true,"tn.it":true,"treviso.it":true,"tv.it":true,"trieste.it":true,"ts.it":true,"udine.it":true,"ud.it":true,"varese.it":true,"va.it":true,"venezia.it":true,"venice.it":true,"ve.it":true,"verbania.it":true,"vb.it":true,"vercelli.it":true,"vc.it":true,"verona.it":true,"vr.it":true,"vibo-valentia.it":true,"vibovalentia.it":true,"vv.it":true,"vicenza.it":true,"vi.it":true,"viterbo.it":true,"vt.it":true,"je":true,"co.je":true,"org.je":true,"net.je":true,"sch.je":true,"gov.je":true,"*.jm":true,"jo":true,"com.jo":true,"org.jo":true,"net.jo":true,"edu.jo":true,"sch.jo":true,"gov.jo":true,"mil.jo":true,"name.jo":true,"jobs":true,"jp":true,"ac.jp":true,"ad.jp":true,"co.jp":true,"ed.jp":true,"go.jp":true,"gr.jp":true,"lg.jp":true,"ne.jp":true,"or.jp":true,"*.aichi.jp":true,"*.akita.jp":true,"*.aomori.jp":true,"*.chiba.jp":true,"*.ehime.jp":true,"*.fukui.jp":true,"*.fukuoka.jp":true,"*.fukushima.jp":true,"*.gifu.jp":true,"*.gunma.jp":true,"*.hiroshima.jp":true,"*.hokkaido.jp":true,"*.hyogo.jp":true,"*.ibaraki.jp":true,"*.ishikawa.jp":true,"*.iwate.jp":true,"*.kagawa.jp":true,"*.kagoshima.jp":true,"*.kanagawa.jp":true,"*.kawasaki.jp":true,"*.kitakyushu.jp":true,"*.kobe.jp":true,"*.kochi.jp":true,"*.kumamoto.jp":true,"*.kyoto.jp":true,"*.mie.jp":true,"*.miyagi.jp":true,"*.miyazaki.jp":true,"*.nagano.jp":true,"*.nagasaki.jp":true,"*.nagoya.jp":true,"*.nara.jp":true,"*.niigata.jp":true,"*.oita.jp":true,"*.okayama.jp":true,"*.okinawa.jp":true,"*.osaka.jp":true,"*.saga.jp":true,"*.saitama.jp":true,"*.sapporo.jp":true,"*.sendai.jp":true,"*.shiga.jp":true,"*.shimane.jp":true,"*.shizuoka.jp":true,"*.tochigi.jp":true,"*.tokushima.jp":true,"*.tokyo.jp":true,"*.tottori.jp":true,"*.toyama.jp":true,"*.wakayama.jp":true,"*.yamagata.jp":true,"*.yamaguchi.jp":true,"*.yamanashi.jp":true,"*.yokohama.jp":true,"metro.tokyo.jp":false,"pref.aichi.jp":false,"pref.akita.jp":false,"pref.aomori.jp":false,"pref.chiba.jp":false,"pref.ehime.jp":false,"pref.fukui.jp":false,"pref.fukuoka.jp":false,"pref.fukushima.jp":false,"pref.gifu.jp":false,"pref.gunma.jp":false,"pref.hiroshima.jp":false,"pref.hokkaido.jp":false,"pref.hyogo.jp":false,"pref.ibaraki.jp":false,"pref.ishikawa.jp":false,"pref.iwate.jp":false,"pref.kagawa.jp":false,"pref.kagoshima.jp":false,"pref.kanagawa.jp":false,"pref.kochi.jp":false,"pref.kumamoto.jp":false,"pref.kyoto.jp":false,"pref.mie.jp":false,"pref.miyagi.jp":false,"pref.miyazaki.jp":false,"pref.nagano.jp":false,"pref.nagasaki.jp":false,"pref.nara.jp":false,"pref.niigata.jp":false,"pref.oita.jp":false,"pref.okayama.jp":false,"pref.okinawa.jp":false,"pref.osaka.jp":false,"pref.saga.jp":false,"pref.saitama.jp":false,"pref.shiga.jp":false,"pref.shimane.jp":false,"pref.shizuoka.jp":false,"pref.tochigi.jp":false,"pref.tokushima.jp":false,"pref.tottori.jp":false,"pref.toyama.jp":false,"pref.wakayama.jp":false,"pref.yamagata.jp":false,"pref.yamaguchi.jp":false,"pref.yamanashi.jp":false,"city.chiba.jp":false,"city.fukuoka.jp":false,"city.hiroshima.jp":false,"city.kawasaki.jp":false,"city.kitakyushu.jp":false,"city.kobe.jp":false,"city.kyoto.jp":false,"city.nagoya.jp":false,"city.niigata.jp":false,"city.okayama.jp":false,"city.osaka.jp":false,"city.saitama.jp":false,"city.sapporo.jp":false,"city.sendai.jp":false,"city.shizuoka.jp":false,"city.yokohama.jp":false,"*.ke":true,"kg":true,"org.kg":true,"net.kg":true,"com.kg":true,"edu.kg":true,"gov.kg":true,"mil.kg":true,"*.kh":true,"ki":true,"edu.ki":true,"biz.ki":true,"net.ki":true,"org.ki":true,"gov.ki":true,"info.ki":true,"com.ki":true,"km":true,"org.km":true,"nom.km":true,"gov.km":true,"prd.km":true,"tm.km":true,"edu.km":true,"mil.km":true,"ass.km":true,"com.km":true,"coop.km":true,"asso.km":true,"presse.km":true,"medecin.km":true,"notaires.km":true,"pharmaciens.km":true,"veterinaire.km":true,"gouv.km":true,"kn":true,"net.kn":true,"org.kn":true,"edu.kn":true,"gov.kn":true,"com.kp":true,"edu.kp":true,"gov.kp":true,"org.kp":true,"rep.kp":true,"tra.kp":true,"kr":true,"ac.kr":true,"co.kr":true,"es.kr":true,"go.kr":true,"hs.kr":true,"kg.kr":true,"mil.kr":true,"ms.kr":true,"ne.kr":true,"or.kr":true,"pe.kr":true,"re.kr":true,"sc.kr":true,"busan.kr":true,"chungbuk.kr":true,"chungnam.kr":true,"daegu.kr":true,"daejeon.kr":true,"gangwon.kr":true,"gwangju.kr":true,"gyeongbuk.kr":true,"gyeonggi.kr":true,"gyeongnam.kr":true,"incheon.kr":true,"jeju.kr":true,"jeonbuk.kr":true,"jeonnam.kr":true,"seoul.kr":true,"ulsan.kr":true,"*.kw":true,"ky":true,"edu.ky":true,"gov.ky":true,"com.ky":true,"org.ky":true,"net.ky":true,"kz":true,"org.kz":true,"edu.kz":true,"net.kz":true,"gov.kz":true,"mil.kz":true,"com.kz":true,"la":true,"int.la":true,"net.la":true,"info.la":true,"edu.la":true,"gov.la":true,"per.la":true,"com.la":true,"org.la":true,"com.lb":true,"edu.lb":true,"gov.lb":true,"net.lb":true,"org.lb":true,"lc":true,"com.lc":true,"net.lc":true,"co.lc":true,"org.lc":true,"edu.lc":true,"gov.lc":true,"li":true,"lk":true,"gov.lk":true,"sch.lk":true,"net.lk":true,"int.lk":true,"com.lk":true,"org.lk":true,"edu.lk":true,"ngo.lk":true,"soc.lk":true,"web.lk":true,"ltd.lk":true,"assn.lk":true,"grp.lk":true,"hotel.lk":true,"com.lr":true,"edu.lr":true,"gov.lr":true,"org.lr":true,"net.lr":true,"ls":true,"co.ls":true,"org.ls":true,"lt":true,"gov.lt":true,"lu":true,"lv":true,"com.lv":true,"edu.lv":true,"gov.lv":true,"org.lv":true,"mil.lv":true,"id.lv":true,"net.lv":true,"asn.lv":true,"conf.lv":true,"ly":true,"com.ly":true,"net.ly":true,"gov.ly":true,"plc.ly":true,"edu.ly":true,"sch.ly":true,"med.ly":true,"org.ly":true,"id.ly":true,"ma":true,"co.ma":true,"net.ma":true,"gov.ma":true,"org.ma":true,"ac.ma":true,"press.ma":true,"mc":true,"tm.mc":true,"asso.mc":true,"md":true,"me":true,"co.me":true,"net.me":true,"org.me":true,"edu.me":true,"ac.me":true,"gov.me":true,"its.me":true,"priv.me":true,"mg":true,"org.mg":true,"nom.mg":true,"gov.mg":true,"prd.mg":true,"tm.mg":true,"edu.mg":true,"mil.mg":true,"com.mg":true,"mh":true,"mil":true,"mk":true,"com.mk":true,"org.mk":true,"net.mk":true,"edu.mk":true,"gov.mk":true,"inf.mk":true,"name.mk":true,"ml":true,"com.ml":true,"edu.ml":true,"gouv.ml":true,"gov.ml":true,"net.ml":true,"org.ml":true,"presse.ml":true,"*.mm":true,"mn":true,"gov.mn":true,"edu.mn":true,"org.mn":true,"mo":true,"com.mo":true,"net.mo":true,"org.mo":true,"edu.mo":true,"gov.mo":true,"mobi":true,"mp":true,"mq":true,"mr":true,"gov.mr":true,"ms":true,"*.mt":true,"mu":true,"com.mu":true,"net.mu":true,"org.mu":true,"gov.mu":true,"ac.mu":true,"co.mu":true,"or.mu":true,"museum":true,"academy.museum":true,"agriculture.museum":true,"air.museum":true,"airguard.museum":true,"alabama.museum":true,"alaska.museum":true,"amber.museum":true,"ambulance.museum":true,"american.museum":true,"americana.museum":true,"americanantiques.museum":true,"americanart.museum":true,"amsterdam.museum":true,"and.museum":true,"annefrank.museum":true,"anthro.museum":true,"anthropology.museum":true,"antiques.museum":true,"aquarium.museum":true,"arboretum.museum":true,"archaeological.museum":true,"archaeology.museum":true,"architecture.museum":true,"art.museum":true,"artanddesign.museum":true,"artcenter.museum":true,"artdeco.museum":true,"arteducation.museum":true,"artgallery.museum":true,"arts.museum":true,"artsandcrafts.museum":true,"asmatart.museum":true,"assassination.museum":true,"assisi.museum":true,"association.museum":true,"astronomy.museum":true,"atlanta.museum":true,"austin.museum":true,"australia.museum":true,"automotive.museum":true,"aviation.museum":true,"axis.museum":true,"badajoz.museum":true,"baghdad.museum":true,"bahn.museum":true,"bale.museum":true,"baltimore.museum":true,"barcelona.museum":true,"baseball.museum":true,"basel.museum":true,"baths.museum":true,"bauern.museum":true,"beauxarts.museum":true,"beeldengeluid.museum":true,"bellevue.museum":true,"bergbau.museum":true,"berkeley.museum":true,"berlin.museum":true,"bern.museum":true,"bible.museum":true,"bilbao.museum":true,"bill.museum":true,"birdart.museum":true,"birthplace.museum":true,"bonn.museum":true,"boston.museum":true,"botanical.museum":true,"botanicalgarden.museum":true,"botanicgarden.museum":true,"botany.museum":true,"brandywinevalley.museum":true,"brasil.museum":true,"bristol.museum":true,"british.museum":true,"britishcolumbia.museum":true,"broadcast.museum":true,"brunel.museum":true,"brussel.museum":true,"brussels.museum":true,"bruxelles.museum":true,"building.museum":true,"burghof.museum":true,"bus.museum":true,"bushey.museum":true,"cadaques.museum":true,"california.museum":true,"cambridge.museum":true,"can.museum":true,"canada.museum":true,"capebreton.museum":true,"carrier.museum":true,"cartoonart.museum":true,"casadelamoneda.museum":true,"castle.museum":true,"castres.museum":true,"celtic.museum":true,"center.museum":true,"chattanooga.museum":true,"cheltenham.museum":true,"chesapeakebay.museum":true,"chicago.museum":true,"children.museum":true,"childrens.museum":true,"childrensgarden.museum":true,"chiropractic.museum":true,"chocolate.museum":true,"christiansburg.museum":true,"cincinnati.museum":true,"cinema.museum":true,"circus.museum":true,"civilisation.museum":true,"civilization.museum":true,"civilwar.museum":true,"clinton.museum":true,"clock.museum":true,"coal.museum":true,"coastaldefence.museum":true,"cody.museum":true,"coldwar.museum":true,"collection.museum":true,"colonialwilliamsburg.museum":true,"coloradoplateau.museum":true,"columbia.museum":true,"columbus.museum":true,"communication.museum":true,"communications.museum":true,"community.museum":true,"computer.museum":true,"computerhistory.museum":true,"xn--comunicaes-v6a2o.museum":true,"contemporary.museum":true,"contemporaryart.museum":true,"convent.museum":true,"copenhagen.museum":true,"corporation.museum":true,"xn--correios-e-telecomunicaes-ghc29a.museum":true,"corvette.museum":true,"costume.museum":true,"countryestate.museum":true,"county.museum":true,"crafts.museum":true,"cranbrook.museum":true,"creation.museum":true,"cultural.museum":true,"culturalcenter.museum":true,"culture.museum":true,"cyber.museum":true,"cymru.museum":true,"dali.museum":true,"dallas.museum":true,"database.museum":true,"ddr.museum":true,"decorativearts.museum":true,"delaware.museum":true,"delmenhorst.museum":true,"denmark.museum":true,"depot.museum":true,"design.museum":true,"detroit.museum":true,"dinosaur.museum":true,"discovery.museum":true,"dolls.museum":true,"donostia.museum":true,"durham.museum":true,"eastafrica.museum":true,"eastcoast.museum":true,"education.museum":true,"educational.museum":true,"egyptian.museum":true,"eisenbahn.museum":true,"elburg.museum":true,"elvendrell.museum":true,"embroidery.museum":true,"encyclopedic.museum":true,"england.museum":true,"entomology.museum":true,"environment.museum":true,"environmentalconservation.museum":true,"epilepsy.museum":true,"essex.museum":true,"estate.museum":true,"ethnology.museum":true,"exeter.museum":true,"exhibition.museum":true,"family.museum":true,"farm.museum":true,"farmequipment.museum":true,"farmers.museum":true,"farmstead.museum":true,"field.museum":true,"figueres.museum":true,"filatelia.museum":true,"film.museum":true,"fineart.museum":true,"finearts.museum":true,"finland.museum":true,"flanders.museum":true,"florida.museum":true,"force.museum":true,"fortmissoula.museum":true,"fortworth.museum":true,"foundation.museum":true,"francaise.museum":true,"frankfurt.museum":true,"franziskaner.museum":true,"freemasonry.museum":true,"freiburg.museum":true,"fribourg.museum":true,"frog.museum":true,"fundacio.museum":true,"furniture.museum":true,"gallery.museum":true,"garden.museum":true,"gateway.museum":true,"geelvinck.museum":true,"gemological.museum":true,"geology.museum":true,"georgia.museum":true,"giessen.museum":true,"glas.museum":true,"glass.museum":true,"gorge.museum":true,"grandrapids.museum":true,"graz.museum":true,"guernsey.museum":true,"halloffame.museum":true,"hamburg.museum":true,"handson.museum":true,"harvestcelebration.museum":true,"hawaii.museum":true,"health.museum":true,"heimatunduhren.museum":true,"hellas.museum":true,"helsinki.museum":true,"hembygdsforbund.museum":true,"heritage.museum":true,"histoire.museum":true,"historical.museum":true,"historicalsociety.museum":true,"historichouses.museum":true,"historisch.museum":true,"historisches.museum":true,"history.museum":true,"historyofscience.museum":true,"horology.museum":true,"house.museum":true,"humanities.museum":true,"illustration.museum":true,"imageandsound.museum":true,"indian.museum":true,"indiana.museum":true,"indianapolis.museum":true,"indianmarket.museum":true,"intelligence.museum":true,"interactive.museum":true,"iraq.museum":true,"iron.museum":true,"isleofman.museum":true,"jamison.museum":true,"jefferson.museum":true,"jerusalem.museum":true,"jewelry.museum":true,"jewish.museum":true,"jewishart.museum":true,"jfk.museum":true,"journalism.museum":true,"judaica.museum":true,"judygarland.museum":true,"juedisches.museum":true,"juif.museum":true,"karate.museum":true,"karikatur.museum":true,"kids.museum":true,"koebenhavn.museum":true,"koeln.museum":true,"kunst.museum":true,"kunstsammlung.museum":true,"kunstunddesign.museum":true,"labor.museum":true,"labour.museum":true,"lajolla.museum":true,"lancashire.museum":true,"landes.museum":true,"lans.museum":true,"xn--lns-qla.museum":true,"larsson.museum":true,"lewismiller.museum":true,"lincoln.museum":true,"linz.museum":true,"living.museum":true,"livinghistory.museum":true,"localhistory.museum":true,"london.museum":true,"losangeles.museum":true,"louvre.museum":true,"loyalist.museum":true,"lucerne.museum":true,"luxembourg.museum":true,"luzern.museum":true,"mad.museum":true,"madrid.museum":true,"mallorca.museum":true,"manchester.museum":true,"mansion.museum":true,"mansions.museum":true,"manx.museum":true,"marburg.museum":true,"maritime.museum":true,"maritimo.museum":true,"maryland.museum":true,"marylhurst.museum":true,"media.museum":true,"medical.museum":true,"medizinhistorisches.museum":true,"meeres.museum":true,"memorial.museum":true,"mesaverde.museum":true,"michigan.museum":true,"midatlantic.museum":true,"military.museum":true,"mill.museum":true,"miners.museum":true,"mining.museum":true,"minnesota.museum":true,"missile.museum":true,"missoula.museum":true,"modern.museum":true,"moma.museum":true,"money.museum":true,"monmouth.museum":true,"monticello.museum":true,"montreal.museum":true,"moscow.museum":true,"motorcycle.museum":true,"muenchen.museum":true,"muenster.museum":true,"mulhouse.museum":true,"muncie.museum":true,"museet.museum":true,"museumcenter.museum":true,"museumvereniging.museum":true,"music.museum":true,"national.museum":true,"nationalfirearms.museum":true,"nationalheritage.museum":true,"nativeamerican.museum":true,"naturalhistory.museum":true,"naturalhistorymuseum.museum":true,"naturalsciences.museum":true,"nature.museum":true,"naturhistorisches.museum":true,"natuurwetenschappen.museum":true,"naumburg.museum":true,"naval.museum":true,"nebraska.museum":true,"neues.museum":true,"newhampshire.museum":true,"newjersey.museum":true,"newmexico.museum":true,"newport.museum":true,"newspaper.museum":true,"newyork.museum":true,"niepce.museum":true,"norfolk.museum":true,"north.museum":true,"nrw.museum":true,"nuernberg.museum":true,"nuremberg.museum":true,"nyc.museum":true,"nyny.museum":true,"oceanographic.museum":true,"oceanographique.museum":true,"omaha.museum":true,"online.museum":true,"ontario.museum":true,"openair.museum":true,"oregon.museum":true,"oregontrail.museum":true,"otago.museum":true,"oxford.museum":true,"pacific.museum":true,"paderborn.museum":true,"palace.museum":true,"paleo.museum":true,"palmsprings.museum":true,"panama.museum":true,"paris.museum":true,"pasadena.museum":true,"pharmacy.museum":true,"philadelphia.museum":true,"philadelphiaarea.museum":true,"philately.museum":true,"phoenix.museum":true,"photography.museum":true,"pilots.museum":true,"pittsburgh.museum":true,"planetarium.museum":true,"plantation.museum":true,"plants.museum":true,"plaza.museum":true,"portal.museum":true,"portland.museum":true,"portlligat.museum":true,"posts-and-telecommunications.museum":true,"preservation.museum":true,"presidio.museum":true,"press.museum":true,"project.museum":true,"public.museum":true,"pubol.museum":true,"quebec.museum":true,"railroad.museum":true,"railway.museum":true,"research.museum":true,"resistance.museum":true,"riodejaneiro.museum":true,"rochester.museum":true,"rockart.museum":true,"roma.museum":true,"russia.museum":true,"saintlouis.museum":true,"salem.museum":true,"salvadordali.museum":true,"salzburg.museum":true,"sandiego.museum":true,"sanfrancisco.museum":true,"santabarbara.museum":true,"santacruz.museum":true,"santafe.museum":true,"saskatchewan.museum":true,"satx.museum":true,"savannahga.museum":true,"schlesisches.museum":true,"schoenbrunn.museum":true,"schokoladen.museum":true,"school.museum":true,"schweiz.museum":true,"science.museum":true,"scienceandhistory.museum":true,"scienceandindustry.museum":true,"sciencecenter.museum":true,"sciencecenters.museum":true,"science-fiction.museum":true,"sciencehistory.museum":true,"sciences.museum":true,"sciencesnaturelles.museum":true,"scotland.museum":true,"seaport.museum":true,"settlement.museum":true,"settlers.museum":true,"shell.museum":true,"sherbrooke.museum":true,"sibenik.museum":true,"silk.museum":true,"ski.museum":true,"skole.museum":true,"society.museum":true,"sologne.museum":true,"soundandvision.museum":true,"southcarolina.museum":true,"southwest.museum":true,"space.museum":true,"spy.museum":true,"square.museum":true,"stadt.museum":true,"stalbans.museum":true,"starnberg.museum":true,"state.museum":true,"stateofdelaware.museum":true,"station.museum":true,"steam.museum":true,"steiermark.museum":true,"stjohn.museum":true,"stockholm.museum":true,"stpetersburg.museum":true,"stuttgart.museum":true,"suisse.museum":true,"surgeonshall.museum":true,"surrey.museum":true,"svizzera.museum":true,"sweden.museum":true,"sydney.museum":true,"tank.museum":true,"tcm.museum":true,"technology.museum":true,"telekommunikation.museum":true,"television.museum":true,"texas.museum":true,"textile.museum":true,"theater.museum":true,"time.museum":true,"timekeeping.museum":true,"topology.museum":true,"torino.museum":true,"touch.museum":true,"town.museum":true,"transport.museum":true,"tree.museum":true,"trolley.museum":true,"trust.museum":true,"trustee.museum":true,"uhren.museum":true,"ulm.museum":true,"undersea.museum":true,"university.museum":true,"usa.museum":true,"usantiques.museum":true,"usarts.museum":true,"uscountryestate.museum":true,"usculture.museum":true,"usdecorativearts.museum":true,"usgarden.museum":true,"ushistory.museum":true,"ushuaia.museum":true,"uslivinghistory.museum":true,"utah.museum":true,"uvic.museum":true,"valley.museum":true,"vantaa.museum":true,"versailles.museum":true,"viking.museum":true,"village.museum":true,"virginia.museum":true,"virtual.museum":true,"virtuel.museum":true,"vlaanderen.museum":true,"volkenkunde.museum":true,"wales.museum":true,"wallonie.museum":true,"war.museum":true,"washingtondc.museum":true,"watchandclock.museum":true,"watch-and-clock.museum":true,"western.museum":true,"westfalen.museum":true,"whaling.museum":true,"wildlife.museum":true,"williamsburg.museum":true,"windmill.museum":true,"workshop.museum":true,"york.museum":true,"yorkshire.museum":true,"yosemite.museum":true,"youth.museum":true,"zoological.museum":true,"zoology.museum":true,"xn--9dbhblg6di.museum":true,"xn--h1aegh.museum":true,"mv":true,"aero.mv":true,"biz.mv":true,"com.mv":true,"coop.mv":true,"edu.mv":true,"gov.mv":true,"info.mv":true,"int.mv":true,"mil.mv":true,"museum.mv":true,"name.mv":true,"net.mv":true,"org.mv":true,"pro.mv":true,"mw":true,"ac.mw":true,"biz.mw":true,"co.mw":true,"com.mw":true,"coop.mw":true,"edu.mw":true,"gov.mw":true,"int.mw":true,"museum.mw":true,"net.mw":true,"org.mw":true,"mx":true,"com.mx":true,"org.mx":true,"gob.mx":true,"edu.mx":true,"net.mx":true,"my":true,"com.my":true,"net.my":true,"org.my":true,"gov.my":true,"edu.my":true,"mil.my":true,"name.my":true,"*.mz":true,"na":true,"info.na":true,"pro.na":true,"name.na":true,"school.na":true,"or.na":true,"dr.na":true,"us.na":true,"mx.na":true,"ca.na":true,"in.na":true,"cc.na":true,"tv.na":true,"ws.na":true,"mobi.na":true,"co.na":true,"com.na":true,"org.na":true,"name":true,"nc":true,"asso.nc":true,"ne":true,"net":true,"nf":true,"com.nf":true,"net.nf":true,"per.nf":true,"rec.nf":true,"web.nf":true,"arts.nf":true,"firm.nf":true,"info.nf":true,"other.nf":true,"store.nf":true,"ac.ng":true,"com.ng":true,"edu.ng":true,"gov.ng":true,"net.ng":true,"org.ng":true,"*.ni":true,"nl":true,"bv.nl":true,"no":true,"fhs.no":true,"vgs.no":true,"fylkesbibl.no":true,"folkebibl.no":true,"museum.no":true,"idrett.no":true,"priv.no":true,"mil.no":true,"stat.no":true,"dep.no":true,"kommune.no":true,"herad.no":true,"aa.no":true,"ah.no":true,"bu.no":true,"fm.no":true,"hl.no":true,"hm.no":true,"jan-mayen.no":true,"mr.no":true,"nl.no":true,"nt.no":true,"of.no":true,"ol.no":true,"oslo.no":true,"rl.no":true,"sf.no":true,"st.no":true,"svalbard.no":true,"tm.no":true,"tr.no":true,"va.no":true,"vf.no":true,"gs.aa.no":true,"gs.ah.no":true,"gs.bu.no":true,"gs.fm.no":true,"gs.hl.no":true,"gs.hm.no":true,"gs.jan-mayen.no":true,"gs.mr.no":true,"gs.nl.no":true,"gs.nt.no":true,"gs.of.no":true,"gs.ol.no":true,"gs.oslo.no":true,"gs.rl.no":true,"gs.sf.no":true,"gs.st.no":true,"gs.svalbard.no":true,"gs.tm.no":true,"gs.tr.no":true,"gs.va.no":true,"gs.vf.no":true,"akrehamn.no":true,"xn--krehamn-dxa.no":true,"algard.no":true,"xn--lgrd-poac.no":true,"arna.no":true,"brumunddal.no":true,"bryne.no":true,"bronnoysund.no":true,"xn--brnnysund-m8ac.no":true,"drobak.no":true,"xn--drbak-wua.no":true,"egersund.no":true,"fetsund.no":true,"floro.no":true,"xn--flor-jra.no":true,"fredrikstad.no":true,"hokksund.no":true,"honefoss.no":true,"xn--hnefoss-q1a.no":true,"jessheim.no":true,"jorpeland.no":true,"xn--jrpeland-54a.no":true,"kirkenes.no":true,"kopervik.no":true,"krokstadelva.no":true,"langevag.no":true,"xn--langevg-jxa.no":true,"leirvik.no":true,"mjondalen.no":true,"xn--mjndalen-64a.no":true,"mo-i-rana.no":true,"mosjoen.no":true,"xn--mosjen-eya.no":true,"nesoddtangen.no":true,"orkanger.no":true,"osoyro.no":true,"xn--osyro-wua.no":true,"raholt.no":true,"xn--rholt-mra.no":true,"sandnessjoen.no":true,"xn--sandnessjen-ogb.no":true,"skedsmokorset.no":true,"slattum.no":true,"spjelkavik.no":true,"stathelle.no":true,"stavern.no":true,"stjordalshalsen.no":true,"xn--stjrdalshalsen-sqb.no":true,"tananger.no":true,"tranby.no":true,"vossevangen.no":true,"afjord.no":true,"xn--fjord-lra.no":true,"agdenes.no":true,"al.no":true,"xn--l-1fa.no":true,"alesund.no":true,"xn--lesund-hua.no":true,"alstahaug.no":true,"alta.no":true,"xn--lt-liac.no":true,"alaheadju.no":true,"xn--laheadju-7ya.no":true,"alvdal.no":true,"amli.no":true,"xn--mli-tla.no":true,"amot.no":true,"xn--mot-tla.no":true,"andebu.no":true,"andoy.no":true,"xn--andy-ira.no":true,"andasuolo.no":true,"ardal.no":true,"xn--rdal-poa.no":true,"aremark.no":true,"arendal.no":true,"xn--s-1fa.no":true,"aseral.no":true,"xn--seral-lra.no":true,"asker.no":true,"askim.no":true,"askvoll.no":true,"askoy.no":true,"xn--asky-ira.no":true,"asnes.no":true,"xn--snes-poa.no":true,"audnedaln.no":true,"aukra.no":true,"aure.no":true,"aurland.no":true,"aurskog-holand.no":true,"xn--aurskog-hland-jnb.no":true,"austevoll.no":true,"austrheim.no":true,"averoy.no":true,"xn--avery-yua.no":true,"balestrand.no":true,"ballangen.no":true,"balat.no":true,"xn--blt-elab.no":true,"balsfjord.no":true,"bahccavuotna.no":true,"xn--bhccavuotna-k7a.no":true,"bamble.no":true,"bardu.no":true,"beardu.no":true,"beiarn.no":true,"bajddar.no":true,"xn--bjddar-pta.no":true,"baidar.no":true,"xn--bidr-5nac.no":true,"berg.no":true,"bergen.no":true,"berlevag.no":true,"xn--berlevg-jxa.no":true,"bearalvahki.no":true,"xn--bearalvhki-y4a.no":true,"bindal.no":true,"birkenes.no":true,"bjarkoy.no":true,"xn--bjarky-fya.no":true,"bjerkreim.no":true,"bjugn.no":true,"bodo.no":true,"xn--bod-2na.no":true,"badaddja.no":true,"xn--bdddj-mrabd.no":true,"budejju.no":true,"bokn.no":true,"bremanger.no":true,"bronnoy.no":true,"xn--brnny-wuac.no":true,"bygland.no":true,"bykle.no":true,"barum.no":true,"xn--brum-voa.no":true,"bo.telemark.no":true,"xn--b-5ga.telemark.no":true,"bo.nordland.no":true,"xn--b-5ga.nordland.no":true,"bievat.no":true,"xn--bievt-0qa.no":true,"bomlo.no":true,"xn--bmlo-gra.no":true,"batsfjord.no":true,"xn--btsfjord-9za.no":true,"bahcavuotna.no":true,"xn--bhcavuotna-s4a.no":true,"dovre.no":true,"drammen.no":true,"drangedal.no":true,"dyroy.no":true,"xn--dyry-ira.no":true,"donna.no":true,"xn--dnna-gra.no":true,"eid.no":true,"eidfjord.no":true,"eidsberg.no":true,"eidskog.no":true,"eidsvoll.no":true,"eigersund.no":true,"elverum.no":true,"enebakk.no":true,"engerdal.no":true,"etne.no":true,"etnedal.no":true,"evenes.no":true,"evenassi.no":true,"xn--eveni-0qa01ga.no":true,"evje-og-hornnes.no":true,"farsund.no":true,"fauske.no":true,"fuossko.no":true,"fuoisku.no":true,"fedje.no":true,"fet.no":true,"finnoy.no":true,"xn--finny-yua.no":true,"fitjar.no":true,"fjaler.no":true,"fjell.no":true,"flakstad.no":true,"flatanger.no":true,"flekkefjord.no":true,"flesberg.no":true,"flora.no":true,"fla.no":true,"xn--fl-zia.no":true,"folldal.no":true,"forsand.no":true,"fosnes.no":true,"frei.no":true,"frogn.no":true,"froland.no":true,"frosta.no":true,"frana.no":true,"xn--frna-woa.no":true,"froya.no":true,"xn--frya-hra.no":true,"fusa.no":true,"fyresdal.no":true,"forde.no":true,"xn--frde-gra.no":true,"gamvik.no":true,"gangaviika.no":true,"xn--ggaviika-8ya47h.no":true,"gaular.no":true,"gausdal.no":true,"gildeskal.no":true,"xn--gildeskl-g0a.no":true,"giske.no":true,"gjemnes.no":true,"gjerdrum.no":true,"gjerstad.no":true,"gjesdal.no":true,"gjovik.no":true,"xn--gjvik-wua.no":true,"gloppen.no":true,"gol.no":true,"gran.no":true,"grane.no":true,"granvin.no":true,"gratangen.no":true,"grimstad.no":true,"grong.no":true,"kraanghke.no":true,"xn--kranghke-b0a.no":true,"grue.no":true,"gulen.no":true,"hadsel.no":true,"halden.no":true,"halsa.no":true,"hamar.no":true,"hamaroy.no":true,"habmer.no":true,"xn--hbmer-xqa.no":true,"hapmir.no":true,"xn--hpmir-xqa.no":true,"hammerfest.no":true,"hammarfeasta.no":true,"xn--hmmrfeasta-s4ac.no":true,"haram.no":true,"hareid.no":true,"harstad.no":true,"hasvik.no":true,"aknoluokta.no":true,"xn--koluokta-7ya57h.no":true,"hattfjelldal.no":true,"aarborte.no":true,"haugesund.no":true,"hemne.no":true,"hemnes.no":true,"hemsedal.no":true,"heroy.more-og-romsdal.no":true,"xn--hery-ira.xn--mre-og-romsdal-qqb.no":true,"heroy.nordland.no":true,"xn--hery-ira.nordland.no":true,"hitra.no":true,"hjartdal.no":true,"hjelmeland.no":true,"hobol.no":true,"xn--hobl-ira.no":true,"hof.no":true,"hol.no":true,"hole.no":true,"holmestrand.no":true,"holtalen.no":true,"xn--holtlen-hxa.no":true,"hornindal.no":true,"horten.no":true,"hurdal.no":true,"hurum.no":true,"hvaler.no":true,"hyllestad.no":true,"hagebostad.no":true,"xn--hgebostad-g3a.no":true,"hoyanger.no":true,"xn--hyanger-q1a.no":true,"hoylandet.no":true,"xn--hylandet-54a.no":true,"ha.no":true,"xn--h-2fa.no":true,"ibestad.no":true,"inderoy.no":true,"xn--indery-fya.no":true,"iveland.no":true,"jevnaker.no":true,"jondal.no":true,"jolster.no":true,"xn--jlster-bya.no":true,"karasjok.no":true,"karasjohka.no":true,"xn--krjohka-hwab49j.no":true,"karlsoy.no":true,"galsa.no":true,"xn--gls-elac.no":true,"karmoy.no":true,"xn--karmy-yua.no":true,"kautokeino.no":true,"guovdageaidnu.no":true,"klepp.no":true,"klabu.no":true,"xn--klbu-woa.no":true,"kongsberg.no":true,"kongsvinger.no":true,"kragero.no":true,"xn--krager-gya.no":true,"kristiansand.no":true,"kristiansund.no":true,"krodsherad.no":true,"xn--krdsherad-m8a.no":true,"kvalsund.no":true,"rahkkeravju.no":true,"xn--rhkkervju-01af.no":true,"kvam.no":true,"kvinesdal.no":true,"kvinnherad.no":true,"kviteseid.no":true,"kvitsoy.no":true,"xn--kvitsy-fya.no":true,"kvafjord.no":true,"xn--kvfjord-nxa.no":true,"giehtavuoatna.no":true,"kvanangen.no":true,"xn--kvnangen-k0a.no":true,"navuotna.no":true,"xn--nvuotna-hwa.no":true,"kafjord.no":true,"xn--kfjord-iua.no":true,"gaivuotna.no":true,"xn--givuotna-8ya.no":true,"larvik.no":true,"lavangen.no":true,"lavagis.no":true,"loabat.no":true,"xn--loabt-0qa.no":true,"lebesby.no":true,"davvesiida.no":true,"leikanger.no":true,"leirfjord.no":true,"leka.no":true,"leksvik.no":true,"lenvik.no":true,"leangaviika.no":true,"xn--leagaviika-52b.no":true,"lesja.no":true,"levanger.no":true,"lier.no":true,"lierne.no":true,"lillehammer.no":true,"lillesand.no":true,"lindesnes.no":true,"lindas.no":true,"xn--linds-pra.no":true,"lom.no":true,"loppa.no":true,"lahppi.no":true,"xn--lhppi-xqa.no":true,"lund.no":true,"lunner.no":true,"luroy.no":true,"xn--lury-ira.no":true,"luster.no":true,"lyngdal.no":true,"lyngen.no":true,"ivgu.no":true,"lardal.no":true,"lerdal.no":true,"xn--lrdal-sra.no":true,"lodingen.no":true,"xn--ldingen-q1a.no":true,"lorenskog.no":true,"xn--lrenskog-54a.no":true,"loten.no":true,"xn--lten-gra.no":true,"malvik.no":true,"masoy.no":true,"xn--msy-ula0h.no":true,"muosat.no":true,"xn--muost-0qa.no":true,"mandal.no":true,"marker.no":true,"marnardal.no":true,"masfjorden.no":true,"meland.no":true,"meldal.no":true,"melhus.no":true,"meloy.no":true,"xn--mely-ira.no":true,"meraker.no":true,"xn--merker-kua.no":true,"moareke.no":true,"xn--moreke-jua.no":true,"midsund.no":true,"midtre-gauldal.no":true,"modalen.no":true,"modum.no":true,"molde.no":true,"moskenes.no":true,"moss.no":true,"mosvik.no":true,"malselv.no":true,"xn--mlselv-iua.no":true,"malatvuopmi.no":true,"xn--mlatvuopmi-s4a.no":true,"namdalseid.no":true,"aejrie.no":true,"namsos.no":true,"namsskogan.no":true,"naamesjevuemie.no":true,"xn--nmesjevuemie-tcba.no":true,"laakesvuemie.no":true,"nannestad.no":true,"narvik.no":true,"narviika.no":true,"naustdal.no":true,"nedre-eiker.no":true,"nes.akershus.no":true,"nes.buskerud.no":true,"nesna.no":true,"nesodden.no":true,"nesseby.no":true,"unjarga.no":true,"xn--unjrga-rta.no":true,"nesset.no":true,"nissedal.no":true,"nittedal.no":true,"nord-aurdal.no":true,"nord-fron.no":true,"nord-odal.no":true,"norddal.no":true,"nordkapp.no":true,"davvenjarga.no":true,"xn--davvenjrga-y4a.no":true,"nordre-land.no":true,"nordreisa.no":true,"raisa.no":true,"xn--risa-5na.no":true,"nore-og-uvdal.no":true,"notodden.no":true,"naroy.no":true,"xn--nry-yla5g.no":true,"notteroy.no":true,"xn--nttery-byae.no":true,"odda.no":true,"oksnes.no":true,"xn--ksnes-uua.no":true,"oppdal.no":true,"oppegard.no":true,"xn--oppegrd-ixa.no":true,"orkdal.no":true,"orland.no":true,"xn--rland-uua.no":true,"orskog.no":true,"xn--rskog-uua.no":true,"orsta.no":true,"xn--rsta-fra.no":true,"os.hedmark.no":true,"os.hordaland.no":true,"osen.no":true,"osteroy.no":true,"xn--ostery-fya.no":true,"ostre-toten.no":true,"xn--stre-toten-zcb.no":true,"overhalla.no":true,"ovre-eiker.no":true,"xn--vre-eiker-k8a.no":true,"oyer.no":true,"xn--yer-zna.no":true,"oygarden.no":true,"xn--ygarden-p1a.no":true,"oystre-slidre.no":true,"xn--ystre-slidre-ujb.no":true,"porsanger.no":true,"porsangu.no":true,"xn--porsgu-sta26f.no":true,"porsgrunn.no":true,"radoy.no":true,"xn--rady-ira.no":true,"rakkestad.no":true,"rana.no":true,"ruovat.no":true,"randaberg.no":true,"rauma.no":true,"rendalen.no":true,"rennebu.no":true,"rennesoy.no":true,"xn--rennesy-v1a.no":true,"rindal.no":true,"ringebu.no":true,"ringerike.no":true,"ringsaker.no":true,"rissa.no":true,"risor.no":true,"xn--risr-ira.no":true,"roan.no":true,"rollag.no":true,"rygge.no":true,"ralingen.no":true,"xn--rlingen-mxa.no":true,"rodoy.no":true,"xn--rdy-0nab.no":true,"romskog.no":true,"xn--rmskog-bya.no":true,"roros.no":true,"xn--rros-gra.no":true,"rost.no":true,"xn--rst-0na.no":true,"royken.no":true,"xn--ryken-vua.no":true,"royrvik.no":true,"xn--ryrvik-bya.no":true,"rade.no":true,"xn--rde-ula.no":true,"salangen.no":true,"siellak.no":true,"saltdal.no":true,"salat.no":true,"xn--slt-elab.no":true,"xn--slat-5na.no":true,"samnanger.no":true,"sande.more-og-romsdal.no":true,"sande.xn--mre-og-romsdal-qqb.no":true,"sande.vestfold.no":true,"sandefjord.no":true,"sandnes.no":true,"sandoy.no":true,"xn--sandy-yua.no":true,"sarpsborg.no":true,"sauda.no":true,"sauherad.no":true,"sel.no":true,"selbu.no":true,"selje.no":true,"seljord.no":true,"sigdal.no":true,"siljan.no":true,"sirdal.no":true,"skaun.no":true,"skedsmo.no":true,"ski.no":true,"skien.no":true,"skiptvet.no":true,"skjervoy.no":true,"xn--skjervy-v1a.no":true,"skierva.no":true,"xn--skierv-uta.no":true,"skjak.no":true,"xn--skjk-soa.no":true,"skodje.no":true,"skanland.no":true,"xn--sknland-fxa.no":true,"skanit.no":true,"xn--sknit-yqa.no":true,"smola.no":true,"xn--smla-hra.no":true,"snillfjord.no":true,"snasa.no":true,"xn--snsa-roa.no":true,"snoasa.no":true,"snaase.no":true,"xn--snase-nra.no":true,"sogndal.no":true,"sokndal.no":true,"sola.no":true,"solund.no":true,"songdalen.no":true,"sortland.no":true,"spydeberg.no":true,"stange.no":true,"stavanger.no":true,"steigen.no":true,"steinkjer.no":true,"stjordal.no":true,"xn--stjrdal-s1a.no":true,"stokke.no":true,"stor-elvdal.no":true,"stord.no":true,"stordal.no":true,"storfjord.no":true,"omasvuotna.no":true,"strand.no":true,"stranda.no":true,"stryn.no":true,"sula.no":true,"suldal.no":true,"sund.no":true,"sunndal.no":true,"surnadal.no":true,"sveio.no":true,"svelvik.no":true,"sykkylven.no":true,"sogne.no":true,"xn--sgne-gra.no":true,"somna.no":true,"xn--smna-gra.no":true,"sondre-land.no":true,"xn--sndre-land-0cb.no":true,"sor-aurdal.no":true,"xn--sr-aurdal-l8a.no":true,"sor-fron.no":true,"xn--sr-fron-q1a.no":true,"sor-odal.no":true,"xn--sr-odal-q1a.no":true,"sor-varanger.no":true,"xn--sr-varanger-ggb.no":true,"matta-varjjat.no":true,"xn--mtta-vrjjat-k7af.no":true,"sorfold.no":true,"xn--srfold-bya.no":true,"sorreisa.no":true,"xn--srreisa-q1a.no":true,"sorum.no":true,"xn--srum-gra.no":true,"tana.no":true,"deatnu.no":true,"time.no":true,"tingvoll.no":true,"tinn.no":true,"tjeldsund.no":true,"dielddanuorri.no":true,"tjome.no":true,"xn--tjme-hra.no":true,"tokke.no":true,"tolga.no":true,"torsken.no":true,"tranoy.no":true,"xn--trany-yua.no":true,"tromso.no":true,"xn--troms-zua.no":true,"tromsa.no":true,"romsa.no":true,"trondheim.no":true,"troandin.no":true,"trysil.no":true,"trana.no":true,"xn--trna-woa.no":true,"trogstad.no":true,"xn--trgstad-r1a.no":true,"tvedestrand.no":true,"tydal.no":true,"tynset.no":true,"tysfjord.no":true,"divtasvuodna.no":true,"divttasvuotna.no":true,"tysnes.no":true,"tysvar.no":true,"xn--tysvr-vra.no":true,"tonsberg.no":true,"xn--tnsberg-q1a.no":true,"ullensaker.no":true,"ullensvang.no":true,"ulvik.no":true,"utsira.no":true,"vadso.no":true,"xn--vads-jra.no":true,"cahcesuolo.no":true,"xn--hcesuolo-7ya35b.no":true,"vaksdal.no":true,"valle.no":true,"vang.no":true,"vanylven.no":true,"vardo.no":true,"xn--vard-jra.no":true,"varggat.no":true,"xn--vrggt-xqad.no":true,"vefsn.no":true,"vaapste.no":true,"vega.no":true,"vegarshei.no":true,"xn--vegrshei-c0a.no":true,"vennesla.no":true,"verdal.no":true,"verran.no":true,"vestby.no":true,"vestnes.no":true,"vestre-slidre.no":true,"vestre-toten.no":true,"vestvagoy.no":true,"xn--vestvgy-ixa6o.no":true,"vevelstad.no":true,"vik.no":true,"vikna.no":true,"vindafjord.no":true,"volda.no":true,"voss.no":true,"varoy.no":true,"xn--vry-yla5g.no":true,"vagan.no":true,"xn--vgan-qoa.no":true,"voagat.no":true,"vagsoy.no":true,"xn--vgsy-qoa0j.no":true,"vaga.no":true,"xn--vg-yiab.no":true,"valer.ostfold.no":true,"xn--vler-qoa.xn--stfold-9xa.no":true,"valer.hedmark.no":true,"xn--vler-qoa.hedmark.no":true,"*.np":true,"nr":true,"biz.nr":true,"info.nr":true,"gov.nr":true,"edu.nr":true,"org.nr":true,"net.nr":true,"com.nr":true,"nu":true,"*.nz":true,"*.om":true,"mediaphone.om":false,"nawrastelecom.om":false,"nawras.om":false,"omanmobile.om":false,"omanpost.om":false,"omantel.om":false,"rakpetroleum.om":false,"siemens.om":false,"songfest.om":false,"statecouncil.om":false,"org":true,"pa":true,"ac.pa":true,"gob.pa":true,"com.pa":true,"org.pa":true,"sld.pa":true,"edu.pa":true,"net.pa":true,"ing.pa":true,"abo.pa":true,"med.pa":true,"nom.pa":true,"pe":true,"edu.pe":true,"gob.pe":true,"nom.pe":true,"mil.pe":true,"org.pe":true,"com.pe":true,"net.pe":true,"pf":true,"com.pf":true,"org.pf":true,"edu.pf":true,"*.pg":true,"ph":true,"com.ph":true,"net.ph":true,"org.ph":true,"gov.ph":true,"edu.ph":true,"ngo.ph":true,"mil.ph":true,"i.ph":true,"pk":true,"com.pk":true,"net.pk":true,"edu.pk":true,"org.pk":true,"fam.pk":true,"biz.pk":true,"web.pk":true,"gov.pk":true,"gob.pk":true,"gok.pk":true,"gon.pk":true,"gop.pk":true,"gos.pk":true,"info.pk":true,"pl":true,"aid.pl":true,"agro.pl":true,"atm.pl":true,"auto.pl":true,"biz.pl":true,"com.pl":true,"edu.pl":true,"gmina.pl":true,"gsm.pl":true,"info.pl":true,"mail.pl":true,"miasta.pl":true,"media.pl":true,"mil.pl":true,"net.pl":true,"nieruchomosci.pl":true,"nom.pl":true,"org.pl":true,"pc.pl":true,"powiat.pl":true,"priv.pl":true,"realestate.pl":true,"rel.pl":true,"sex.pl":true,"shop.pl":true,"sklep.pl":true,"sos.pl":true,"szkola.pl":true,"targi.pl":true,"tm.pl":true,"tourism.pl":true,"travel.pl":true,"turystyka.pl":true,"6bone.pl":true,"art.pl":true,"mbone.pl":true,"gov.pl":true,"uw.gov.pl":true,"um.gov.pl":true,"ug.gov.pl":true,"upow.gov.pl":true,"starostwo.gov.pl":true,"so.gov.pl":true,"sr.gov.pl":true,"po.gov.pl":true,"pa.gov.pl":true,"ngo.pl":true,"irc.pl":true,"usenet.pl":true,"augustow.pl":true,"babia-gora.pl":true,"bedzin.pl":true,"beskidy.pl":true,"bialowieza.pl":true,"bialystok.pl":true,"bielawa.pl":true,"bieszczady.pl":true,"boleslawiec.pl":true,"bydgoszcz.pl":true,"bytom.pl":true,"cieszyn.pl":true,"czeladz.pl":true,"czest.pl":true,"dlugoleka.pl":true,"elblag.pl":true,"elk.pl":true,"glogow.pl":true,"gniezno.pl":true,"gorlice.pl":true,"grajewo.pl":true,"ilawa.pl":true,"jaworzno.pl":true,"jelenia-gora.pl":true,"jgora.pl":true,"kalisz.pl":true,"kazimierz-dolny.pl":true,"karpacz.pl":true,"kartuzy.pl":true,"kaszuby.pl":true,"katowice.pl":true,"kepno.pl":true,"ketrzyn.pl":true,"klodzko.pl":true,"kobierzyce.pl":true,"kolobrzeg.pl":true,"konin.pl":true,"konskowola.pl":true,"kutno.pl":true,"lapy.pl":true,"lebork.pl":true,"legnica.pl":true,"lezajsk.pl":true,"limanowa.pl":true,"lomza.pl":true,"lowicz.pl":true,"lubin.pl":true,"lukow.pl":true,"malbork.pl":true,"malopolska.pl":true,"mazowsze.pl":true,"mazury.pl":true,"mielec.pl":true,"mielno.pl":true,"mragowo.pl":true,"naklo.pl":true,"nowaruda.pl":true,"nysa.pl":true,"olawa.pl":true,"olecko.pl":true,"olkusz.pl":true,"olsztyn.pl":true,"opoczno.pl":true,"opole.pl":true,"ostroda.pl":true,"ostroleka.pl":true,"ostrowiec.pl":true,"ostrowwlkp.pl":true,"pila.pl":true,"pisz.pl":true,"podhale.pl":true,"podlasie.pl":true,"polkowice.pl":true,"pomorze.pl":true,"pomorskie.pl":true,"prochowice.pl":true,"pruszkow.pl":true,"przeworsk.pl":true,"pulawy.pl":true,"radom.pl":true,"rawa-maz.pl":true,"rybnik.pl":true,"rzeszow.pl":true,"sanok.pl":true,"sejny.pl":true,"siedlce.pl":true,"slask.pl":true,"slupsk.pl":true,"sosnowiec.pl":true,"stalowa-wola.pl":true,"skoczow.pl":true,"starachowice.pl":true,"stargard.pl":true,"suwalki.pl":true,"swidnica.pl":true,"swiebodzin.pl":true,"swinoujscie.pl":true,"szczecin.pl":true,"szczytno.pl":true,"tarnobrzeg.pl":true,"tgory.pl":true,"turek.pl":true,"tychy.pl":true,"ustka.pl":true,"walbrzych.pl":true,"warmia.pl":true,"warszawa.pl":true,"waw.pl":true,"wegrow.pl":true,"wielun.pl":true,"wlocl.pl":true,"wloclawek.pl":true,"wodzislaw.pl":true,"wolomin.pl":true,"wroclaw.pl":true,"zachpomor.pl":true,"zagan.pl":true,"zarow.pl":true,"zgora.pl":true,"zgorzelec.pl":true,"gda.pl":true,"gdansk.pl":true,"gdynia.pl":true,"med.pl":true,"sopot.pl":true,"gliwice.pl":true,"krakow.pl":true,"poznan.pl":true,"wroc.pl":true,"zakopane.pl":true,"pm":true,"pn":true,"gov.pn":true,"co.pn":true,"org.pn":true,"edu.pn":true,"net.pn":true,"pr":true,"com.pr":true,"net.pr":true,"org.pr":true,"gov.pr":true,"edu.pr":true,"isla.pr":true,"pro.pr":true,"biz.pr":true,"info.pr":true,"name.pr":true,"est.pr":true,"prof.pr":true,"ac.pr":true,"pro":true,"aca.pro":true,"bar.pro":true,"cpa.pro":true,"jur.pro":true,"law.pro":true,"med.pro":true,"eng.pro":true,"ps":true,"edu.ps":true,"gov.ps":true,"sec.ps":true,"plo.ps":true,"com.ps":true,"org.ps":true,"net.ps":true,"pt":true,"net.pt":true,"gov.pt":true,"org.pt":true,"edu.pt":true,"int.pt":true,"publ.pt":true,"com.pt":true,"nome.pt":true,"pw":true,"co.pw":true,"ne.pw":true,"or.pw":true,"ed.pw":true,"go.pw":true,"belau.pw":true,"*.py":true,"qa":true,"com.qa":true,"edu.qa":true,"gov.qa":true,"mil.qa":true,"name.qa":true,"net.qa":true,"org.qa":true,"sch.qa":true,"re":true,"com.re":true,"asso.re":true,"nom.re":true,"ro":true,"com.ro":true,"org.ro":true,"tm.ro":true,"nt.ro":true,"nom.ro":true,"info.ro":true,"rec.ro":true,"arts.ro":true,"firm.ro":true,"store.ro":true,"www.ro":true,"rs":true,"co.rs":true,"org.rs":true,"edu.rs":true,"ac.rs":true,"gov.rs":true,"in.rs":true,"ru":true,"ac.ru":true,"com.ru":true,"edu.ru":true,"int.ru":true,"net.ru":true,"org.ru":true,"pp.ru":true,"adygeya.ru":true,"altai.ru":true,"amur.ru":true,"arkhangelsk.ru":true,"astrakhan.ru":true,"bashkiria.ru":true,"belgorod.ru":true,"bir.ru":true,"bryansk.ru":true,"buryatia.ru":true,"cbg.ru":true,"chel.ru":true,"chelyabinsk.ru":true,"chita.ru":true,"chukotka.ru":true,"chuvashia.ru":true,"dagestan.ru":true,"dudinka.ru":true,"e-burg.ru":true,"grozny.ru":true,"irkutsk.ru":true,"ivanovo.ru":true,"izhevsk.ru":true,"jar.ru":true,"joshkar-ola.ru":true,"kalmykia.ru":true,"kaluga.ru":true,"kamchatka.ru":true,"karelia.ru":true,"kazan.ru":true,"kchr.ru":true,"kemerovo.ru":true,"khabarovsk.ru":true,"khakassia.ru":true,"khv.ru":true,"kirov.ru":true,"koenig.ru":true,"komi.ru":true,"kostroma.ru":true,"krasnoyarsk.ru":true,"kuban.ru":true,"kurgan.ru":true,"kursk.ru":true,"lipetsk.ru":true,"magadan.ru":true,"mari.ru":true,"mari-el.ru":true,"marine.ru":true,"mordovia.ru":true,"mosreg.ru":true,"msk.ru":true,"murmansk.ru":true,"nalchik.ru":true,"nnov.ru":true,"nov.ru":true,"novosibirsk.ru":true,"nsk.ru":true,"omsk.ru":true,"orenburg.ru":true,"oryol.ru":true,"palana.ru":true,"penza.ru":true,"perm.ru":true,"pskov.ru":true,"ptz.ru":true,"rnd.ru":true,"ryazan.ru":true,"sakhalin.ru":true,"samara.ru":true,"saratov.ru":true,"simbirsk.ru":true,"smolensk.ru":true,"spb.ru":true,"stavropol.ru":true,"stv.ru":true,"surgut.ru":true,"tambov.ru":true,"tatarstan.ru":true,"tom.ru":true,"tomsk.ru":true,"tsaritsyn.ru":true,"tsk.ru":true,"tula.ru":true,"tuva.ru":true,"tver.ru":true,"tyumen.ru":true,"udm.ru":true,"udmurtia.ru":true,"ulan-ude.ru":true,"vladikavkaz.ru":true,"vladimir.ru":true,"vladivostok.ru":true,"volgograd.ru":true,"vologda.ru":true,"voronezh.ru":true,"vrn.ru":true,"vyatka.ru":true,"yakutia.ru":true,"yamal.ru":true,"yaroslavl.ru":true,"yekaterinburg.ru":true,"yuzhno-sakhalinsk.ru":true,"amursk.ru":true,"baikal.ru":true,"cmw.ru":true,"fareast.ru":true,"jamal.ru":true,"kms.ru":true,"k-uralsk.ru":true,"kustanai.ru":true,"kuzbass.ru":true,"magnitka.ru":true,"mytis.ru":true,"nakhodka.ru":true,"nkz.ru":true,"norilsk.ru":true,"oskol.ru":true,"pyatigorsk.ru":true,"rubtsovsk.ru":true,"snz.ru":true,"syzran.ru":true,"vdonsk.ru":true,"zgrad.ru":true,"gov.ru":true,"mil.ru":true,"test.ru":true,"rw":true,"gov.rw":true,"net.rw":true,"edu.rw":true,"ac.rw":true,"com.rw":true,"co.rw":true,"int.rw":true,"mil.rw":true,"gouv.rw":true,"sa":true,"com.sa":true,"net.sa":true,"org.sa":true,"gov.sa":true,"med.sa":true,"pub.sa":true,"edu.sa":true,"sch.sa":true,"sb":true,"com.sb":true,"edu.sb":true,"gov.sb":true,"net.sb":true,"org.sb":true,"sc":true,"com.sc":true,"gov.sc":true,"net.sc":true,"org.sc":true,"edu.sc":true,"sd":true,"com.sd":true,"net.sd":true,"org.sd":true,"edu.sd":true,"med.sd":true,"gov.sd":true,"info.sd":true,"se":true,"a.se":true,"ac.se":true,"b.se":true,"bd.se":true,"brand.se":true,"c.se":true,"d.se":true,"e.se":true,"f.se":true,"fh.se":true,"fhsk.se":true,"fhv.se":true,"g.se":true,"h.se":true,"i.se":true,"k.se":true,"komforb.se":true,"kommunalforbund.se":true,"komvux.se":true,"l.se":true,"lanbib.se":true,"m.se":true,"n.se":true,"naturbruksgymn.se":true,"o.se":true,"org.se":true,"p.se":true,"parti.se":true,"pp.se":true,"press.se":true,"r.se":true,"s.se":true,"sshn.se":true,"t.se":true,"tm.se":true,"u.se":true,"w.se":true,"x.se":true,"y.se":true,"z.se":true,"sg":true,"com.sg":true,"net.sg":true,"org.sg":true,"gov.sg":true,"edu.sg":true,"per.sg":true,"sh":true,"si":true,"sk":true,"sl":true,"com.sl":true,"net.sl":true,"edu.sl":true,"gov.sl":true,"org.sl":true,"sm":true,"sn":true,"art.sn":true,"com.sn":true,"edu.sn":true,"gouv.sn":true,"org.sn":true,"perso.sn":true,"univ.sn":true,"so":true,"com.so":true,"net.so":true,"org.so":true,"sr":true,"st":true,"co.st":true,"com.st":true,"consulado.st":true,"edu.st":true,"embaixada.st":true,"gov.st":true,"mil.st":true,"net.st":true,"org.st":true,"principe.st":true,"saotome.st":true,"store.st":true,"su":true,"*.sv":true,"sy":true,"edu.sy":true,"gov.sy":true,"net.sy":true,"mil.sy":true,"com.sy":true,"org.sy":true,"sz":true,"co.sz":true,"ac.sz":true,"org.sz":true,"tc":true,"td":true,"tel":true,"tf":true,"tg":true,"th":true,"ac.th":true,"co.th":true,"go.th":true,"in.th":true,"mi.th":true,"net.th":true,"or.th":true,"tj":true,"ac.tj":true,"biz.tj":true,"co.tj":true,"com.tj":true,"edu.tj":true,"go.tj":true,"gov.tj":true,"int.tj":true,"mil.tj":true,"name.tj":true,"net.tj":true,"nic.tj":true,"org.tj":true,"test.tj":true,"web.tj":true,"tk":true,"tl":true,"gov.tl":true,"tm":true,"tn":true,"com.tn":true,"ens.tn":true,"fin.tn":true,"gov.tn":true,"ind.tn":true,"intl.tn":true,"nat.tn":true,"net.tn":true,"org.tn":true,"info.tn":true,"perso.tn":true,"tourism.tn":true,"edunet.tn":true,"rnrt.tn":true,"rns.tn":true,"rnu.tn":true,"mincom.tn":true,"agrinet.tn":true,"defense.tn":true,"turen.tn":true,"to":true,"com.to":true,"gov.to":true,"net.to":true,"org.to":true,"edu.to":true,"mil.to":true,"*.tr":true,"nic.tr":false,"gov.nc.tr":true,"travel":true,"tt":true,"co.tt":true,"com.tt":true,"org.tt":true,"net.tt":true,"biz.tt":true,"info.tt":true,"pro.tt":true,"int.tt":true,"coop.tt":true,"jobs.tt":true,"mobi.tt":true,"travel.tt":true,"museum.tt":true,"aero.tt":true,"name.tt":true,"gov.tt":true,"edu.tt":true,"tv":true,"tw":true,"edu.tw":true,"gov.tw":true,"mil.tw":true,"com.tw":true,"net.tw":true,"org.tw":true,"idv.tw":true,"game.tw":true,"ebiz.tw":true,"club.tw":true,"xn--zf0ao64a.tw":true,"xn--uc0atv.tw":true,"xn--czrw28b.tw":true,"ac.tz":true,"co.tz":true,"go.tz":true,"mil.tz":true,"ne.tz":true,"or.tz":true,"sc.tz":true,"ua":true,"com.ua":true,"edu.ua":true,"gov.ua":true,"in.ua":true,"net.ua":true,"org.ua":true,"cherkassy.ua":true,"chernigov.ua":true,"chernovtsy.ua":true,"ck.ua":true,"cn.ua":true,"crimea.ua":true,"cv.ua":true,"dn.ua":true,"dnepropetrovsk.ua":true,"donetsk.ua":true,"dp.ua":true,"if.ua":true,"ivano-frankivsk.ua":true,"kh.ua":true,"kharkov.ua":true,"kherson.ua":true,"khmelnitskiy.ua":true,"kiev.ua":true,"kirovograd.ua":true,"km.ua":true,"kr.ua":true,"ks.ua":true,"kv.ua":true,"lg.ua":true,"lugansk.ua":true,"lutsk.ua":true,"lviv.ua":true,"mk.ua":true,"nikolaev.ua":true,"od.ua":true,"odessa.ua":true,"pl.ua":true,"poltava.ua":true,"rovno.ua":true,"rv.ua":true,"sebastopol.ua":true,"sumy.ua":true,"te.ua":true,"ternopil.ua":true,"uzhgorod.ua":true,"vinnica.ua":true,"vn.ua":true,"zaporizhzhe.ua":true,"zp.ua":true,"zhitomir.ua":true,"zt.ua":true,"co.ua":true,"pp.ua":true,"ug":true,"co.ug":true,"ac.ug":true,"sc.ug":true,"go.ug":true,"ne.ug":true,"or.ug":true,"*.uk":true,"*.sch.uk":true,"bl.uk":false,"british-library.uk":false,"icnet.uk":false,"jet.uk":false,"mod.uk":false,"nel.uk":false,"nhs.uk":false,"nic.uk":false,"nls.uk":false,"national-library-scotland.uk":false,"parliament.uk":false,"police.uk":false,"us":true,"dni.us":true,"fed.us":true,"isa.us":true,"kids.us":true,"nsn.us":true,"ak.us":true,"al.us":true,"ar.us":true,"as.us":true,"az.us":true,"ca.us":true,"co.us":true,"ct.us":true,"dc.us":true,"de.us":true,"fl.us":true,"ga.us":true,"gu.us":true,"hi.us":true,"ia.us":true,"id.us":true,"il.us":true,"in.us":true,"ks.us":true,"ky.us":true,"la.us":true,"ma.us":true,"md.us":true,"me.us":true,"mi.us":true,"mn.us":true,"mo.us":true,"ms.us":true,"mt.us":true,"nc.us":true,"nd.us":true,"ne.us":true,"nh.us":true,"nj.us":true,"nm.us":true,"nv.us":true,"ny.us":true,"oh.us":true,"ok.us":true,"or.us":true,"pa.us":true,"pr.us":true,"ri.us":true,"sc.us":true,"sd.us":true,"tn.us":true,"tx.us":true,"ut.us":true,"vi.us":true,"vt.us":true,"va.us":true,"wa.us":true,"wi.us":true,"wv.us":true,"wy.us":true,"k12.ak.us":true,"k12.al.us":true,"k12.ar.us":true,"k12.as.us":true,"k12.az.us":true,"k12.ca.us":true,"k12.co.us":true,"k12.ct.us":true,"k12.dc.us":true,"k12.de.us":true,"k12.fl.us":true,"k12.ga.us":true,"k12.gu.us":true,"k12.ia.us":true,"k12.id.us":true,"k12.il.us":true,"k12.in.us":true,"k12.ks.us":true,"k12.ky.us":true,"k12.la.us":true,"k12.ma.us":true,"k12.md.us":true,"k12.me.us":true,"k12.mi.us":true,"k12.mn.us":true,"k12.mo.us":true,"k12.ms.us":true,"k12.mt.us":true,"k12.nc.us":true,"k12.nd.us":true,"k12.ne.us":true,"k12.nh.us":true,"k12.nj.us":true,"k12.nm.us":true,"k12.nv.us":true,"k12.ny.us":true,"k12.oh.us":true,"k12.ok.us":true,"k12.or.us":true,"k12.pa.us":true,"k12.pr.us":true,"k12.ri.us":true,"k12.sc.us":true,"k12.sd.us":true,"k12.tn.us":true,"k12.tx.us":true,"k12.ut.us":true,"k12.vi.us":true,"k12.vt.us":true,"k12.va.us":true,"k12.wa.us":true,"k12.wi.us":true,"k12.wv.us":true,"k12.wy.us":true,"cc.ak.us":true,"cc.al.us":true,"cc.ar.us":true,"cc.as.us":true,"cc.az.us":true,"cc.ca.us":true,"cc.co.us":true,"cc.ct.us":true,"cc.dc.us":true,"cc.de.us":true,"cc.fl.us":true,"cc.ga.us":true,"cc.gu.us":true,"cc.hi.us":true,"cc.ia.us":true,"cc.id.us":true,"cc.il.us":true,"cc.in.us":true,"cc.ks.us":true,"cc.ky.us":true,"cc.la.us":true,"cc.ma.us":true,"cc.md.us":true,"cc.me.us":true,"cc.mi.us":true,"cc.mn.us":true,"cc.mo.us":true,"cc.ms.us":true,"cc.mt.us":true,"cc.nc.us":true,"cc.nd.us":true,"cc.ne.us":true,"cc.nh.us":true,"cc.nj.us":true,"cc.nm.us":true,"cc.nv.us":true,"cc.ny.us":true,"cc.oh.us":true,"cc.ok.us":true,"cc.or.us":true,"cc.pa.us":true,"cc.pr.us":true,"cc.ri.us":true,"cc.sc.us":true,"cc.sd.us":true,"cc.tn.us":true,"cc.tx.us":true,"cc.ut.us":true,"cc.vi.us":true,"cc.vt.us":true,"cc.va.us":true,"cc.wa.us":true,"cc.wi.us":true,"cc.wv.us":true,"cc.wy.us":true,"lib.ak.us":true,"lib.al.us":true,"lib.ar.us":true,"lib.as.us":true,"lib.az.us":true,"lib.ca.us":true,"lib.co.us":true,"lib.ct.us":true,"lib.dc.us":true,"lib.de.us":true,"lib.fl.us":true,"lib.ga.us":true,"lib.gu.us":true,"lib.hi.us":true,"lib.ia.us":true,"lib.id.us":true,"lib.il.us":true,"lib.in.us":true,"lib.ks.us":true,"lib.ky.us":true,"lib.la.us":true,"lib.ma.us":true,"lib.md.us":true,"lib.me.us":true,"lib.mi.us":true,"lib.mn.us":true,"lib.mo.us":true,"lib.ms.us":true,"lib.mt.us":true,"lib.nc.us":true,"lib.nd.us":true,"lib.ne.us":true,"lib.nh.us":true,"lib.nj.us":true,"lib.nm.us":true,"lib.nv.us":true,"lib.ny.us":true,"lib.oh.us":true,"lib.ok.us":true,"lib.or.us":true,"lib.pa.us":true,"lib.pr.us":true,"lib.ri.us":true,"lib.sc.us":true,"lib.sd.us":true,"lib.tn.us":true,"lib.tx.us":true,"lib.ut.us":true,"lib.vi.us":true,"lib.vt.us":true,"lib.va.us":true,"lib.wa.us":true,"lib.wi.us":true,"lib.wv.us":true,"lib.wy.us":true,"pvt.k12.ma.us":true,"chtr.k12.ma.us":true,"paroch.k12.ma.us":true,"*.uy":true,"uz":true,"com.uz":true,"co.uz":true,"va":true,"vc":true,"com.vc":true,"net.vc":true,"org.vc":true,"gov.vc":true,"mil.vc":true,"edu.vc":true,"*.ve":true,"vg":true,"vi":true,"co.vi":true,"com.vi":true,"k12.vi":true,"net.vi":true,"org.vi":true,"vn":true,"com.vn":true,"net.vn":true,"org.vn":true,"edu.vn":true,"gov.vn":true,"int.vn":true,"ac.vn":true,"biz.vn":true,"info.vn":true,"name.vn":true,"pro.vn":true,"health.vn":true,"vu":true,"wf":true,"ws":true,"com.ws":true,"net.ws":true,"org.ws":true,"gov.ws":true,"edu.ws":true,"yt":true,"xn--mgbaam7a8h":true,"xn--54b7fta0cc":true,"xn--fiqs8s":true,"xn--fiqz9s":true,"xn--lgbbat1ad8j":true,"xn--wgbh1c":true,"xn--node":true,"xn--j6w193g":true,"xn--h2brj9c":true,"xn--mgbbh1a71e":true,"xn--fpcrj9c3d":true,"xn--gecrj9c":true,"xn--s9brj9c":true,"xn--45brj9c":true,"xn--xkc2dl3a5ee0h":true,"xn--mgba3a4f16a":true,"xn--mgba3a4fra":true,"xn--mgbayh7gpa":true,"xn--3e0b707e":true,"xn--fzc2c9e2c":true,"xn--xkc2al3hye2a":true,"xn--mgbc0a9azcg":true,"xn--mgb9awbf":true,"xn--ygbi2ammx":true,"xn--90a3ac":true,"xn--p1ai":true,"xn--wgbl6a":true,"xn--mgberp4a5d4ar":true,"xn--mgberp4a5d4a87g":true,"xn--mgbqly7c0a67fbc":true,"xn--mgbqly7cvafr":true,"xn--ogbpf8fl":true,"xn--mgbtf8fl":true,"xn--yfro4i67o":true,"xn--clchc0ea0b2g2a9gcd":true,"xn--o3cw4h":true,"xn--pgbs0dh":true,"xn--kpry57d":true,"xn--kprw13d":true,"xn--nnx388a":true,"xn--j1amh":true,"xn--mgb2ddes":true,"xxx":true,"*.ye":true,"*.za":true,"*.zm":true,"*.zw":true,"biz.at":true,"info.at":true,"priv.at":true,"co.ca":true,"ar.com":true,"br.com":true,"cn.com":true,"de.com":true,"eu.com":true,"gb.com":true,"gr.com":true,"hu.com":true,"jpn.com":true,"kr.com":true,"no.com":true,"qc.com":true,"ru.com":true,"sa.com":true,"se.com":true,"uk.com":true,"us.com":true,"uy.com":true,"za.com":true,"gb.net":true,"jp.net":true,"se.net":true,"uk.net":true,"ae.org":true,"us.org":true,"com.de":true,"operaunite.com":true,"appspot.com":true,"iki.fi":true,"c.la":true,"za.net":true,"za.org":true,"co.nl":true,"co.no":true,"co.pl":true,"dyndns-at-home.com":true,"dyndns-at-work.com":true,"dyndns-blog.com":true,"dyndns-free.com":true,"dyndns-home.com":true,"dyndns-ip.com":true,"dyndns-mail.com":true,"dyndns-office.com":true,"dyndns-pics.com":true,"dyndns-remote.com":true,"dyndns-server.com":true,"dyndns-web.com":true,"dyndns-wiki.com":true,"dyndns-work.com":true,"dyndns.biz":true,"dyndns.info":true,"dyndns.org":true,"dyndns.tv":true,"at-band-camp.net":true,"ath.cx":true,"barrel-of-knowledge.info":true,"barrell-of-knowledge.info":true,"better-than.tv":true,"blogdns.com":true,"blogdns.net":true,"blogdns.org":true,"blogsite.org":true,"boldlygoingnowhere.org":true,"broke-it.net":true,"buyshouses.net":true,"cechire.com":true,"dnsalias.com":true,"dnsalias.net":true,"dnsalias.org":true,"dnsdojo.com":true,"dnsdojo.net":true,"dnsdojo.org":true,"does-it.net":true,"doesntexist.com":true,"doesntexist.org":true,"dontexist.com":true,"dontexist.net":true,"dontexist.org":true,"doomdns.com":true,"doomdns.org":true,"dvrdns.org":true,"dyn-o-saur.com":true,"dynalias.com":true,"dynalias.net":true,"dynalias.org":true,"dynathome.net":true,"dyndns.ws":true,"endofinternet.net":true,"endofinternet.org":true,"endoftheinternet.org":true,"est-a-la-maison.com":true,"est-a-la-masion.com":true,"est-le-patron.com":true,"est-mon-blogueur.com":true,"for-better.biz":true,"for-more.biz":true,"for-our.info":true,"for-some.biz":true,"for-the.biz":true,"forgot.her.name":true,"forgot.his.name":true,"from-ak.com":true,"from-al.com":true,"from-ar.com":true,"from-az.net":true,"from-ca.com":true,"from-co.net":true,"from-ct.com":true,"from-dc.com":true,"from-de.com":true,"from-fl.com":true,"from-ga.com":true,"from-hi.com":true,"from-ia.com":true,"from-id.com":true,"from-il.com":true,"from-in.com":true,"from-ks.com":true,"from-ky.com":true,"from-la.net":true,"from-ma.com":true,"from-md.com":true,"from-me.org":true,"from-mi.com":true,"from-mn.com":true,"from-mo.com":true,"from-ms.com":true,"from-mt.com":true,"from-nc.com":true,"from-nd.com":true,"from-ne.com":true,"from-nh.com":true,"from-nj.com":true,"from-nm.com":true,"from-nv.com":true,"from-ny.net":true,"from-oh.com":true,"from-ok.com":true,"from-or.com":true,"from-pa.com":true,"from-pr.com":true,"from-ri.com":true,"from-sc.com":true,"from-sd.com":true,"from-tn.com":true,"from-tx.com":true,"from-ut.com":true,"from-va.com":true,"from-vt.com":true,"from-wa.com":true,"from-wi.com":true,"from-wv.com":true,"from-wy.com":true,"ftpaccess.cc":true,"fuettertdasnetz.de":true,"game-host.org":true,"game-server.cc":true,"getmyip.com":true,"gets-it.net":true,"go.dyndns.org":true,"gotdns.com":true,"gotdns.org":true,"groks-the.info":true,"groks-this.info":true,"ham-radio-op.net":true,"here-for-more.info":true,"hobby-site.com":true,"hobby-site.org":true,"home.dyndns.org":true,"homedns.org":true,"homeftp.net":true,"homeftp.org":true,"homeip.net":true,"homelinux.com":true,"homelinux.net":true,"homelinux.org":true,"homeunix.com":true,"homeunix.net":true,"homeunix.org":true,"iamallama.com":true,"in-the-band.net":true,"is-a-anarchist.com":true,"is-a-blogger.com":true,"is-a-bookkeeper.com":true,"is-a-bruinsfan.org":true,"is-a-bulls-fan.com":true,"is-a-candidate.org":true,"is-a-caterer.com":true,"is-a-celticsfan.org":true,"is-a-chef.com":true,"is-a-chef.net":true,"is-a-chef.org":true,"is-a-conservative.com":true,"is-a-cpa.com":true,"is-a-cubicle-slave.com":true,"is-a-democrat.com":true,"is-a-designer.com":true,"is-a-doctor.com":true,"is-a-financialadvisor.com":true,"is-a-geek.com":true,"is-a-geek.net":true,"is-a-geek.org":true,"is-a-green.com":true,"is-a-guru.com":true,"is-a-hard-worker.com":true,"is-a-hunter.com":true,"is-a-knight.org":true,"is-a-landscaper.com":true,"is-a-lawyer.com":true,"is-a-liberal.com":true,"is-a-libertarian.com":true,"is-a-linux-user.org":true,"is-a-llama.com":true,"is-a-musician.com":true,"is-a-nascarfan.com":true,"is-a-nurse.com":true,"is-a-painter.com":true,"is-a-patsfan.org":true,"is-a-personaltrainer.com":true,"is-a-photographer.com":true,"is-a-player.com":true,"is-a-republican.com":true,"is-a-rockstar.com":true,"is-a-socialist.com":true,"is-a-soxfan.org":true,"is-a-student.com":true,"is-a-teacher.com":true,"is-a-techie.com":true,"is-a-therapist.com":true,"is-an-accountant.com":true,"is-an-actor.com":true,"is-an-actress.com":true,"is-an-anarchist.com":true,"is-an-artist.com":true,"is-an-engineer.com":true,"is-an-entertainer.com":true,"is-by.us":true,"is-certified.com":true,"is-found.org":true,"is-gone.com":true,"is-into-anime.com":true,"is-into-cars.com":true,"is-into-cartoons.com":true,"is-into-games.com":true,"is-leet.com":true,"is-lost.org":true,"is-not-certified.com":true,"is-saved.org":true,"is-slick.com":true,"is-uberleet.com":true,"is-very-bad.org":true,"is-very-evil.org":true,"is-very-good.org":true,"is-very-nice.org":true,"is-very-sweet.org":true,"is-with-theband.com":true,"isa-geek.com":true,"isa-geek.net":true,"isa-geek.org":true,"isa-hockeynut.com":true,"issmarterthanyou.com":true,"isteingeek.de":true,"istmein.de":true,"kicks-ass.net":true,"kicks-ass.org":true,"knowsitall.info":true,"land-4-sale.us":true,"lebtimnetz.de":true,"leitungsen.de":true,"likes-pie.com":true,"likescandy.com":true,"merseine.nu":true,"mine.nu":true,"misconfused.org":true,"mypets.ws":true,"myphotos.cc":true,"neat-url.com":true,"office-on-the.net":true,"on-the-web.tv":true,"podzone.net":true,"podzone.org":true,"readmyblog.org":true,"saves-the-whales.com":true,"scrapper-site.net":true,"scrapping.cc":true,"selfip.biz":true,"selfip.com":true,"selfip.info":true,"selfip.net":true,"selfip.org":true,"sells-for-less.com":true,"sells-for-u.com":true,"sells-it.net":true,"sellsyourhome.org":true,"servebbs.com":true,"servebbs.net":true,"servebbs.org":true,"serveftp.net":true,"serveftp.org":true,"servegame.org":true,"shacknet.nu":true,"simple-url.com":true,"space-to-rent.com":true,"stuff-4-sale.org":true,"stuff-4-sale.us":true,"teaches-yoga.com":true,"thruhere.net":true,"traeumtgerade.de":true,"webhop.biz":true,"webhop.info":true,"webhop.net":true,"webhop.org":true,"worse-than.tv":true,"writesthisblog.com":true}); - -// END of automatically generated file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt deleted file mode 100644 index 11dddd00..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-GPL.txt +++ /dev/null @@ -1,278 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt deleted file mode 100644 index 97067e54..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens <http://mathiasbynens.be/> - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json deleted file mode 100644 index 69e12ae2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "punycode", - "version": "1.2.3", - "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.", - "homepage": "http://mths.be/punycode", - "main": "punycode.js", - "keywords": [ - "punycode", - "unicode", - "idn", - "idna", - "dns", - "url", - "domain" - ], - "licenses": [ - { - "type": "MIT", - "url": "http://mths.be/mit" - }, - { - "type": "GPL", - "url": "http://mths.be/gpl" - } - ], - "author": { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - }, - "contributors": [ - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - }, - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - } - ], - "bugs": { - "url": "https://github.com/bestiejs/punycode.js/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/bestiejs/punycode.js.git" - }, - "engines": [ - "node", - "rhino" - ], - "directories": { - "doc": "docs", - "test": "tests" - }, - "scripts": { - "test": "node tests/tests.js" - }, - "devDependencies": { - "grunt": "~0.4.1", - "grunt-contrib-uglify": "~0.2.2", - "grunt-shell": "~0.2.2", - "istanbul": "~0.1.37", - "qunit-clib": "~1.3.0", - "qunitjs": "~1.11.0", - "requirejs": "~2.1.6" - }, - "readme": "ERROR: No README data found!", - "_id": "punycode@1.2.3", - "dist": { - "shasum": "b4e304471082d783c73b3bafabf2fd9b6a486266" - }, - "_from": "punycode@>=0.2.0", - "_resolved": "https://registry.npmjs.org/punycode/-/punycode-1.2.3.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js deleted file mode 100644 index 41803ba4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js +++ /dev/null @@ -1,508 +0,0 @@ -/*! http://mths.be/punycode v1.2.3 by @mathias */ -;(function(root) { - - /** Detect free variables */ - var freeExports = typeof exports == 'object' && exports; - var freeModule = typeof module == 'object' && module && - module.exports == freeExports && module; - var freeGlobal = typeof global == 'object' && global; - if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { - root = freeGlobal; - } - - /** - * The `punycode` object. - * @name punycode - * @type Object - */ - var punycode, - - /** Highest positive signed 32-bit float value */ - maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 - - /** Bootstring parameters */ - base = 36, - tMin = 1, - tMax = 26, - skew = 38, - damp = 700, - initialBias = 72, - initialN = 128, // 0x80 - delimiter = '-', // '\x2D' - - /** Regular expressions */ - regexPunycode = /^xn--/, - regexNonASCII = /[^ -~]/, // unprintable ASCII chars + non-ASCII chars - regexSeparators = /\x2E|\u3002|\uFF0E|\uFF61/g, // RFC 3490 separators - - /** Error messages */ - errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' - }, - - /** Convenience shortcuts */ - baseMinusTMin = base - tMin, - floor = Math.floor, - stringFromCharCode = String.fromCharCode, - - /** Temporary variable */ - key; - - /*--------------------------------------------------------------------------*/ - - /** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ - function error(type) { - throw RangeError(errors[type]); - } - - /** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ - function map(array, fn) { - var length = array.length; - while (length--) { - array[length] = fn(array[length]); - } - return array; - } - - /** - * A simple `Array#map`-like wrapper to work with domain name strings. - * @private - * @param {String} domain The domain name. - * @param {Function} callback The function that gets called for every - * character. - * @returns {Array} A new string of characters returned by the callback - * function. - */ - function mapDomain(string, fn) { - return map(string.split(regexSeparators), fn).join('.'); - } - - /** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see <http://mathiasbynens.be/notes/javascript-encoding> - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ - function ucs2decode(string) { - var output = [], - counter = 0, - length = string.length, - value, - extra; - while (counter < length) { - value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // high surrogate, and there is a next character - extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // low surrogate - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // unmatched surrogate; only append this code unit, in case the next - // code unit is the high surrogate of a surrogate pair - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; - } - - /** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ - function ucs2encode(array) { - return map(array, function(value) { - var output = ''; - if (value > 0xFFFF) { - value -= 0x10000; - output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); - value = 0xDC00 | value & 0x3FF; - } - output += stringFromCharCode(value); - return output; - }).join(''); - } - - /** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ - function basicToDigit(codePoint) { - if (codePoint - 48 < 10) { - return codePoint - 22; - } - if (codePoint - 65 < 26) { - return codePoint - 65; - } - if (codePoint - 97 < 26) { - return codePoint - 97; - } - return base; - } - - /** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ - function digitToBasic(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); - } - - /** - * Bias adaptation function as per section 3.4 of RFC 3492. - * http://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ - function adapt(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); - } - - /** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ - function decode(input) { - // Don't use UCS-2 - var output = [], - inputLength = input.length, - out, - i = 0, - n = initialN, - bias = initialBias, - basic, - j, - index, - oldi, - w, - k, - digit, - t, - length, - /** Cached calculation results */ - baseMinusT; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - for (oldi = i, w = 1, k = base; /* no condition */; k += base) { - - if (index >= inputLength) { - error('invalid-input'); - } - - digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base || digit > floor((maxInt - i) / w)) { - error('overflow'); - } - - i += digit * w; - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - - if (digit < t) { - break; - } - - baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error('overflow'); - } - - w *= baseMinusT; - - } - - out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output - output.splice(i++, 0, n); - - } - - return ucs2encode(output); - } - - /** - * Converts a string of Unicode symbols to a Punycode string of ASCII-only - * symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ - function encode(input) { - var n, - delta, - handledCPCount, - basicLength, - bias, - j, - m, - q, - k, - t, - currentValue, - output = [], - /** `inputLength` will hold the number of code points in `input`. */ - inputLength, - /** Cached calculation results */ - handledCPCountPlusOne, - baseMinusT, - qMinusT; - - // Convert the input in UCS-2 to Unicode - input = ucs2decode(input); - - // Cache the length - inputLength = input.length; - - // Initialize the state - n = initialN; - delta = 0; - bias = initialBias; - - // Handle the basic code points - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - - handledCPCount = basicLength = output.length; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string - if it is not empty - with a delimiter - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - for (m = maxInt, j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, - // but guard against overflow - handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - - if (currentValue == n) { - // Represent delta as a generalized variable-length integer - for (q = delta, k = base; /* no condition */; k += base) { - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - if (q < t) { - break; - } - qMinusT = q - t; - baseMinusT = base - t; - output.push( - stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) - ); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - - ++delta; - ++n; - - } - return output.join(''); - } - - /** - * Converts a Punycode string representing a domain name to Unicode. Only the - * Punycoded parts of the domain name will be converted, i.e. it doesn't - * matter if you call it on a string that has already been converted to - * Unicode. - * @memberOf punycode - * @param {String} domain The Punycode domain name to convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ - function toUnicode(domain) { - return mapDomain(domain, function(string) { - return regexPunycode.test(string) - ? decode(string.slice(4).toLowerCase()) - : string; - }); - } - - /** - * Converts a Unicode string representing a domain name to Punycode. Only the - * non-ASCII parts of the domain name will be converted, i.e. it doesn't - * matter if you call it with a domain that's already in ASCII. - * @memberOf punycode - * @param {String} domain The domain name to convert, as a Unicode string. - * @returns {String} The Punycode representation of the given domain name. - */ - function toASCII(domain) { - return mapDomain(domain, function(string) { - return regexNonASCII.test(string) - ? 'xn--' + encode(string) - : string; - }); - } - - /*--------------------------------------------------------------------------*/ - - /** Define the public API */ - punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '1.2.3', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see <http://mathiasbynens.be/notes/javascript-encoding> - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode - }; - - /** Expose `punycode` */ - // Some AMD build optimizers, like r.js, check for specific condition patterns - // like the following: - if ( - typeof define == 'function' && - typeof define.amd == 'object' && - define.amd - ) { - define(function() { - return punycode; - }); - } else if (freeExports && !freeExports.nodeType) { - if (freeModule) { // in Node.js or RingoJS v0.8.0+ - freeModule.exports = punycode; - } else { // in Narwhal or RingoJS v0.7.0- - for (key in punycode) { - punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); - } - } - } else { // in Rhino or a web browser - root.punycode = punycode; - } - -}(this)); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js deleted file mode 100644 index ac5d914a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! http://mths.be/punycode v1.2.3 by @mathias */ -(function(o){function e(o){throw RangeError(L[o])}function n(o,e){for(var n=o.length;n--;)o[n]=e(o[n]);return o}function t(o,e){return n(o.split(S),e).join(".")}function r(o){for(var e,n,t=[],r=0,u=o.length;u>r;)e=o.charCodeAt(r++),e>=55296&&56319>=e&&u>r?(n=o.charCodeAt(r++),56320==(64512&n)?t.push(((1023&e)<<10)+(1023&n)+65536):(t.push(e),r--)):t.push(e);return t}function u(o){return n(o,function(o){var e="";return o>65535&&(o-=65536,e+=R(55296|1023&o>>>10),o=56320|1023&o),e+=R(o)}).join("")}function i(o){return 10>o-48?o-22:26>o-65?o-65:26>o-97?o-97:x}function f(o,e){return o+22+75*(26>o)-((0!=e)<<5)}function c(o,e,n){var t=0;for(o=n?P(o/m):o>>1,o+=P(o/e);o>M*y>>1;t+=x)o=P(o/M);return P(t+(M+1)*o/(o+j))}function l(o){var n,t,r,f,l,d,s,a,p,h,v=[],g=o.length,w=0,j=I,m=A;for(t=o.lastIndexOf(F),0>t&&(t=0),r=0;t>r;++r)o.charCodeAt(r)>=128&&e("not-basic"),v.push(o.charCodeAt(r));for(f=t>0?t+1:0;g>f;){for(l=w,d=1,s=x;f>=g&&e("invalid-input"),a=i(o.charCodeAt(f++)),(a>=x||a>P((b-w)/d))&&e("overflow"),w+=a*d,p=m>=s?C:s>=m+y?y:s-m,!(p>a);s+=x)h=x-p,d>P(b/h)&&e("overflow"),d*=h;n=v.length+1,m=c(w-l,n,0==l),P(w/n)>b-j&&e("overflow"),j+=P(w/n),w%=n,v.splice(w++,0,j)}return u(v)}function d(o){var n,t,u,i,l,d,s,a,p,h,v,g,w,j,m,E=[];for(o=r(o),g=o.length,n=I,t=0,l=A,d=0;g>d;++d)v=o[d],128>v&&E.push(R(v));for(u=i=E.length,i&&E.push(F);g>u;){for(s=b,d=0;g>d;++d)v=o[d],v>=n&&s>v&&(s=v);for(w=u+1,s-n>P((b-t)/w)&&e("overflow"),t+=(s-n)*w,n=s,d=0;g>d;++d)if(v=o[d],n>v&&++t>b&&e("overflow"),v==n){for(a=t,p=x;h=l>=p?C:p>=l+y?y:p-l,!(h>a);p+=x)m=a-h,j=x-h,E.push(R(f(h+m%j,0))),a=P(m/j);E.push(R(f(a,0))),l=c(t,w,u==i),t=0,++u}++t,++n}return E.join("")}function s(o){return t(o,function(o){return E.test(o)?l(o.slice(4).toLowerCase()):o})}function a(o){return t(o,function(o){return O.test(o)?"xn--"+d(o):o})}var p="object"==typeof exports&&exports,h="object"==typeof module&&module&&module.exports==p&&module,v="object"==typeof global&&global;(v.global===v||v.window===v)&&(o=v);var g,w,b=2147483647,x=36,C=1,y=26,j=38,m=700,A=72,I=128,F="-",E=/^xn--/,O=/[^ -~]/,S=/\x2E|\u3002|\uFF0E|\uFF61/g,L={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=x-C,P=Math.floor,R=String.fromCharCode;if(g={version:"1.2.3",ucs2:{decode:r,encode:u},decode:l,encode:d,toASCII:a,toUnicode:s},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return g});else if(p&&!p.nodeType)if(h)h.exports=g;else for(w in g)g.hasOwnProperty(w)&&(p[w]=g[w]);else o.punycode=g})(this); \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt deleted file mode 100644 index a7501f98..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md deleted file mode 100644 index fbddce91..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# Docdown <sup>v1.0.0</sup> - -A simple JSDoc to Markdown documentation generator. - -## Documentation - -The documentation for Docdown can be viewed here: [/doc/README.md](https://github.com/jdalton/docdown/blob/master/doc/README.md#readme) - -For a list of upcoming features, check out our [roadmap](https://github.com/jdalton/docdown/wiki/Roadmap). - -## Installation and usage - -Usage example: - -```php -require("docdown.php"); - -// generate Markdown -$markdown = docdown(array( - "path" => $filepath, - "url" => "https://github.com/username/project/blob/master/my.js" -)); -``` - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](http://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](http://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md deleted file mode 100644 index 459d36ab..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# Docdown <sup>v1.0.0</sup> - -<!-- div --> - - -<!-- div --> - -## <a id="docdown"></a>`docdown` -* [`docdown`](#docdown$optionsarray) - -<!-- /div --> - - -<!-- /div --> - - -<!-- div --> - - -<!-- div --> - -## `docdown` - -<!-- div --> - -### <a id="docdown$optionsarray"></a>`docdown([$options=array()])` -<a href="#docdown$optionsarray">#</a> [Ⓢ](https://github.com/jdalton/docdown/blob/master/docdown.php#L34 "View in source") [Ⓣ][1] - -Generates Markdown from JSDoc entries in a given file. - -#### Arguments -1. `[$options=array()]` *(Array)*: The options array. - -#### Returns -*(String)*: The generated Markdown. - -#### Example -```php -// specify a file path -$markdown = docdown(array( - // path to js file - 'path' => $filepath, - // url used to reference line numbers in code - 'url' => 'https://github.com/username/project/blob/master/my.js' -)); - -// or pass raw js -$markdown = docdown(array( - // raw JavaScript source - 'source' => $rawJS, - // documentation title - 'title' => 'My API Documentation', - // url used to reference line numbers in code - 'url' => 'https://github.com/username/project/blob/master/my.js' -)); -``` - -* * * - -<!-- /div --> - - -<!-- /div --> - - -<!-- /div --> - - - [1]: #docdown "Jump back to the TOC." \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php deleted file mode 100644 index eca8d145..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php - - // cleanup requested filepath - $file = isset($_GET['f']) ? $_GET['f'] : 'docdown'; - $file = preg_replace('#(\.*[\/])+#', '', $file); - $file .= preg_match('/\.[a-z]+$/', $file) ? '' : '.php'; - - // output filename - if (isset($_GET['o'])) { - $output = $_GET['o']; - } else if (isset($_SERVER['argv'][1])) { - $output = $_SERVER['argv'][1]; - } else { - $output = basename($file); - } - - /*--------------------------------------------------------------------------*/ - - require('../docdown.php'); - - // generate Markdown - $markdown = docdown(array( - 'path' => '../' . $file, - 'title' => 'Docdown <sup>v1.0.0</sup>', - 'url' => 'https://github.com/jdalton/docdown/blob/master/docdown.php' - )); - - // save to a .md file - file_put_contents($output . '.md', $markdown); - - // print - header('Content-Type: text/plain;charset=utf-8'); - echo $markdown . PHP_EOL; - -?> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php deleted file mode 100644 index 4a786d75..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php -/*! - * Docdown v1.0.0-pre - * Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/> - * Available under MIT license <http://mths.be/mit> - */ -require(dirname(__FILE__) . '/src/DocDown/Generator.php'); - -/** - * Generates Markdown from JSDoc entries in a given file. - * - * @param {Array} [$options=array()] The options array. - * @returns {String} The generated Markdown. - * @example - * - * // specify a file path - * $markdown = docdown(array( - * // path to js file - * 'path' => $filepath, - * // url used to reference line numbers in code - * 'url' => 'https://github.com/username/project/blob/master/my.js' - * )); - * - * // or pass raw js - * $markdown = docdown(array( - * // raw JavaScript source - * 'source' => $rawJS, - * // documentation title - * 'title' => 'My API Documentation', - * // url used to reference line numbers in code - * 'url' => 'https://github.com/username/project/blob/master/my.js' - * )); - */ -function docdown( $options = array() ) { - $gen = new Generator($options); - return $gen->generate(); -} -?> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php deleted file mode 100644 index 0a7c552e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php +++ /dev/null @@ -1,226 +0,0 @@ -<?php - -/** - * A class to represent a JSDoc entry alias. - */ -class Alias { - - /** - * The alias owner. - * - * @memberOf Alias - * @type Object - */ - public $owner; - - /*--------------------------------------------------------------------------*/ - - /** - * The Alias constructor. - * - * @constructor - * @param {String} $name The alias name. - * @param {Object} $owner The alias owner. - */ - public function __construct( $name, $owner ) { - $this->owner = $owner; - $this->_name = $name; - $this->_call = $owner->getCall(); - $this->_category = $owner->getCategory(); - $this->_desc = $owner->getDesc(); - $this->_example = $owner->getExample(); - $this->_isCtor = $owner->isCtor(); - $this->_isLicense = $owner->isLicense(); - $this->_isPlugin = $owner->isPlugin(); - $this->_isPrivate = $owner->isPrivate(); - $this->_isStatic = $owner->isStatic(); - $this->_lineNumber = $owner->getLineNumber(); - $this->_members = $owner->getMembers(); - $this->_params = $owner->getParams(); - $this->_returns = $owner->getReturns(); - $this->_type = $owner->getType(); - } - - /*--------------------------------------------------------------------------*/ - - /** - * Extracts the entry's `alias` objects. - * - * @memberOf Alias - * @param {Number} $index The index of the array value to return. - * @returns {Array|String} The entry's `alias` objects. - */ - public function getAliases( $index = null ) { - $result = array(); - return $index !== null - ? @$result[$index] - : $result; - } - - /** - * Extracts the function call from the owner entry. - * - * @memberOf Alias - * @returns {String} The function call. - */ - public function getCall() { - return $this->_call; - } - - /** - * Extracts the owner entry's `category` data. - * - * @memberOf Alias - * @returns {String} The owner entry's `category` data. - */ - public function getCategory() { - return $this->_category; - } - - /** - * Extracts the owner entry's description. - * - * @memberOf Alias - * @returns {String} The owner entry's description. - */ - public function getDesc() { - return $this->_desc; - } - - /** - * Extracts the owner entry's `example` data. - * - * @memberOf Alias - * @returns {String} The owner entry's `example` data. - */ - public function getExample() { - return $this->_example; - } - - /** - * Checks if the entry is an alias. - * - * @memberOf Alias - * @returns {Boolean} Returns `true`. - */ - public function isAlias() { - return true; - } - - /** - * Checks if the owner entry is a constructor. - * - * @memberOf Alias - * @returns {Boolean} Returns `true` if a constructor, else `false`. - */ - public function isCtor() { - return $this->_isCtor; - } - - /** - * Checks if the owner entry is a license. - * - * @memberOf Alias - * @returns {Boolean} Returns `true` if a license, else `false`. - */ - public function isLicense() { - return $this->_isLicense; - } - - /** - * Checks if the owner entry *is* assigned to a prototype. - * - * @memberOf Alias - * @returns {Boolean} Returns `true` if assigned to a prototype, else `false`. - */ - public function isPlugin() { - return $this->_isPlugin; - } - - /** - * Checks if the owner entry is private. - * - * @memberOf Alias - * @returns {Boolean} Returns `true` if private, else `false`. - */ - public function isPrivate() { - return $this->_isPrivate; - } - - /** - * Checks if the owner entry is *not* assigned to a prototype. - * - * @memberOf Alias - * @returns {Boolean} Returns `true` if not assigned to a prototype, else `false`. - */ - public function isStatic() { - return $this->_isStatic; - } - - /** - * Resolves the owner entry's line number. - * - * @memberOf Alias - * @returns {Number} The owner entry's line number. - */ - public function getLineNumber() { - return $this->_lineNumber; - } - - /** - * Extracts the owner entry's `member` data. - * - * @memberOf Alias - * @param {Number} $index The index of the array value to return. - * @returns {Array|String} The owner entry's `member` data. - */ - public function getMembers( $index = null ) { - return $index !== null - ? @$this->_members[$index] - : $this->_members; - } - - /** - * Extracts the owner entry's `name` data. - * - * @memberOf Alias - * @returns {String} The owner entry's `name` data. - */ - public function getName() { - return $this->_name; - } - - /** - * Extracts the owner entry's `param` data. - * - * @memberOf Alias - * @param {Number} $index The index of the array value to return. - * @returns {Array} The owner entry's `param` data. - */ - public function getParams( $index = null ) { - return $index !== null - ? @$this->_params[$index] - : $this->_params; - } - - /** - * Extracts the owner entry's `returns` data. - * - * @memberOf Alias - * @returns {String} The owner entry's `returns` data. - */ - public function getReturns() { - return $this->_returns; - } - - /** - * Extracts the owner entry's `type` data. - * - * @memberOf Alias - * @returns {String} The owner entry's `type` data. - */ - public function getType() { - return $this->_type; - } -} -?> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php deleted file mode 100644 index a973d9a6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php +++ /dev/null @@ -1,442 +0,0 @@ -<?php - -require(dirname(__FILE__) . "/Alias.php"); - -/** - * A class to simplify parsing a single JSDoc entry. - */ -class Entry { - - /** - * The documentation entry. - * - * @memberOf Entry - * @type String - */ - public $entry = ''; - - /** - * The language highlighter used for code examples. - * - * @memberOf Entry - * @type String - */ - public $lang = ''; - - /** - * The source code. - * - * @memberOf Entry - * @type String - */ - public $source = ''; - - /*--------------------------------------------------------------------------*/ - - /** - * The Entry constructor. - * - * @constructor - * @param {String} $entry The documentation entry to analyse. - * @param {String} $source The source code. - * @param {String} [$lang ='js'] The language highlighter used for code examples. - */ - public function __construct( $entry, $source, $lang = 'js' ) { - $this->entry = $entry; - $this->lang = $lang; - $this->source = str_replace(PHP_EOL, "\n", $source); - } - - /*--------------------------------------------------------------------------*/ - - /** - * Extracts the documentation entries from source code. - * - * @static - * @memberOf Entry - * @param {String} $source The source code. - * @returns {Array} The array of entries. - */ - public static function getEntries( $source ) { - preg_match_all('#/\*\*(?![-!])[\s\S]*?\*/\s*.+#', $source, $result); - return array_pop($result); - } - - /*--------------------------------------------------------------------------*/ - - /** - * Checks if the entry is a function reference. - * - * @private - * @memberOf Entry - * @returns {Boolean} Returns `true` if the entry is a function reference, else `false`. - */ - private function isFunction() { - if (!isset($this->_isFunction)) { - $this->_isFunction = !!( - $this->isCtor() || - count($this->getParams()) || - count($this->getReturns()) || - preg_match('/\*[\t ]*@function\b/', $this->entry) - ); - } - return $this->_isFunction; - } - - /*--------------------------------------------------------------------------*/ - - /** - * Extracts the entry's `alias` objects. - * - * @memberOf Entry - * @param {Number} $index The index of the array value to return. - * @returns {Array|String} The entry's `alias` objects. - */ - public function getAliases( $index = null ) { - if (!isset($this->_aliases)) { - preg_match('#\*[\t ]*@alias\s+(.+)#', $this->entry, $result); - - if (count($result)) { - $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); - $result = preg_split('/,\s*/', $result); - natsort($result); - - foreach ($result as $resultIndex => $value) { - $result[$resultIndex] = new Alias($value, $this); - } - } - $this->_aliases = $result; - } - return $index !== null - ? @$this->_aliases[$index] - : $this->_aliases; - } - - /** - * Extracts the function call from the entry. - * - * @memberOf Entry - * @returns {String} The function call. - */ - public function getCall() { - if (isset($this->_call)) { - return $this->_call; - } - - preg_match('#\*/\s*(?:function ([^(]*)|(.*?)(?=[:=,]|return\b))#', $this->entry, $result); - if ($result = array_pop($result)) { - $result = array_pop(explode('var ', trim(trim(array_pop(explode('.', $result))), "'"))); - } - // resolve name - // avoid $this->getName() because it calls $this->getCall() - preg_match('#\*[\t ]*@name\s+(.+)#', $this->entry, $name); - if (count($name)) { - $name = trim($name[1]); - } else { - $name = $result; - } - // compile function call syntax - if ($this->isFunction()) { - // compose parts - $result = array($result); - $params = $this->getParams(); - foreach ($params as $param) { - $result[] = $param[1]; - } - // format - $result = $name .'('. implode(array_slice($result, 1), ', ') .')'; - $result = str_replace(', [', ' [, ', str_replace('], [', ', ', $result)); - } - - $this->_call = $result ? $result : $name; - return $this->_call; - } - - /** - * Extracts the entry's `category` data. - * - * @memberOf Entry - * @returns {String} The entry's `category` data. - */ - public function getCategory() { - if (isset($this->_category)) { - return $this->_category; - } - - preg_match('#\*[\t ]*@category\s+(.+)#', $this->entry, $result); - if (count($result)) { - $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); - } else { - $result = $this->getType() == 'Function' ? 'Methods' : 'Properties'; - } - $this->_category = $result; - return $result; - } - - /** - * Extracts the entry's description. - * - * @memberOf Entry - * @returns {String} The entry's description. - */ - public function getDesc() { - if (isset($this->_desc)) { - return $this->_desc; - } - - preg_match('#/\*\*(?:\s*\*)?([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result); - if (count($result)) { - $type = $this->getType(); - $result = preg_replace('/:\n[\t ]*\*[\t ]*/', ":<br>\n", $result[1]); - $result = preg_replace('/(?:^|\n)[\t ]*\*\n[\t ]*\*[\t ]*/', "\n\n", $result); - $result = preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result); - $result = trim($result); - $result = ($type == 'Function' ? '' : '(' . str_replace('|', ', ', trim($type, '{}')) . '): ') . $result; - } - $this->_desc = $result; - return $result; - } - - /** - * Extracts the entry's `example` data. - * - * @memberOf Entry - * @returns {String} The entry's `example` data. - */ - public function getExample() { - if (isset($this->_example)) { - return $this->_example; - } - - preg_match('#\*[\t ]*@example\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result); - if (count($result)) { - $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', "\n", $result[1])); - $result = '```' . $this->lang . "\n" . $result . "\n```"; - } - $this->_example = $result; - return $result; - } - - /** - * Checks if the entry is an alias. - * - * @memberOf Entry - * @returns {Boolean} Returns `false`. - */ - public function isAlias() { - return false; - } - - /** - * Checks if the entry is a constructor. - * - * @memberOf Entry - * @returns {Boolean} Returns `true` if a constructor, else `false`. - */ - public function isCtor() { - if (!isset($this->_isCtor)) { - $this->_isCtor = !!preg_match('/\*[\t ]*@constructor\b/', $this->entry); - } - return $this->_isCtor; - } - - /** - * Checks if the entry is a license. - * - * @memberOf Entry - * @returns {Boolean} Returns `true` if a license, else `false`. - */ - public function isLicense() { - if (!isset($this->_isLicense)) { - $this->_isLicense = !!preg_match('/\*[\t ]*@license\b/', $this->entry); - } - return $this->_isLicense; - } - - /** - * Checks if the entry *is* assigned to a prototype. - * - * @memberOf Entry - * @returns {Boolean} Returns `true` if assigned to a prototype, else `false`. - */ - public function isPlugin() { - if (!isset($this->_isPlugin)) { - $this->_isPlugin = !$this->isCtor() && !$this->isPrivate() && !$this->isStatic(); - } - return $this->_isPlugin; - } - - /** - * Checks if the entry is private. - * - * @memberOf Entry - * @returns {Boolean} Returns `true` if private, else `false`. - */ - public function isPrivate() { - if (!isset($this->_isPrivate)) { - $this->_isPrivate = $this->isLicense() || !!preg_match('/\*[\t ]*@private\b/', $this->entry) || !preg_match('/\*[\t ]*@[a-z]+\b/', $this->entry); - } - return $this->_isPrivate; - } - - /** - * Checks if the entry is *not* assigned to a prototype. - * - * @memberOf Entry - * @returns {Boolean} Returns `true` if not assigned to a prototype, else `false`. - */ - public function isStatic() { - if (isset($this->_isStatic)) { - return $this->_isStatic; - } - - $public = !$this->isPrivate(); - $result = $public && !!preg_match('/\*[\t ]*@static\b/', $this->entry); - - // set in cases where it isn't explicitly stated - if ($public && !$result) { - if ($parent = array_pop(preg_split('/[#.]/', $this->getMembers(0)))) { - foreach (Entry::getEntries($this->source) as $entry) { - $entry = new Entry($entry, $this->source); - if ($entry->getName() == $parent) { - $result = !$entry->isCtor(); - break; - } - } - } else { - $result = true; - } - } - $this->_isStatic = $result; - return $result; - } - - /** - * Resolves the entry's line number. - * - * @memberOf Entry - * @returns {Number} The entry's line number. - */ - public function getLineNumber() { - if (!isset($this->_lineNumber)) { - preg_match_all('/\n/', substr($this->source, 0, strrpos($this->source, $this->entry) + strlen($this->entry)), $lines); - $this->_lineNumber = count(array_pop($lines)) + 1; - } - return $this->_lineNumber; - } - - /** - * Extracts the entry's `member` data. - * - * @memberOf Entry - * @param {Number} $index The index of the array value to return. - * @returns {Array|String} The entry's `member` data. - */ - public function getMembers( $index = null ) { - if (!isset($this->_members)) { - preg_match('#\*[\t ]*@member(?:Of)?\s+(.+)#', $this->entry, $result); - if (count($result)) { - $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); - $result = preg_split('/,\s*/', $result); - natsort($result); - } - $this->_members = $result; - } - return $index !== null - ? @$this->_members[$index] - : $this->_members; - } - - /** - * Extracts the entry's `name` data. - * - * @memberOf Entry - * @returns {String} The entry's `name` data. - */ - public function getName() { - if (isset($this->_name)) { - return $this->_name; - } - - preg_match('#\*[\t ]*@name\s+(.+)#', $this->entry, $result); - if (count($result)) { - $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); - } else { - $result = array_shift(explode('(', $this->getCall())); - } - $this->_name = $result; - return $result; - } - - /** - * Extracts the entry's `param` data. - * - * @memberOf Entry - * @param {Number} $index The index of the array value to return. - * @returns {Array} The entry's `param` data. - */ - public function getParams( $index = null ) { - if (!isset($this->_params)) { - preg_match_all('#\*[\t ]*@param\s+\{([^}]+)\}\s+(\[.+\]|[$\w|]+(?:\[.+\])?)\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#i', $this->entry, $result); - if (count($result = array_filter(array_slice($result, 1)))) { - // repurpose array - foreach ($result as $param) { - foreach ($param as $key => $value) { - if (!is_array($result[0][$key])) { - $result[0][$key] = array(); - } - $result[0][$key][] = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]*/', ' ', $value)); - } - } - $result = $result[0]; - } - $this->_params = $result; - } - return $index !== null - ? @$this->_params[$index] - : $this->_params; - } - - /** - * Extracts the entry's `returns` data. - * - * @memberOf Entry - * @returns {String} The entry's `returns` data. - */ - public function getReturns() { - if (isset($this->_returns)) { - return $this->_returns; - } - - preg_match('#\*[\t ]*@returns\s+\{([^}]+)\}\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result); - if (count($result)) { - $result = array_map('trim', array_slice($result, 1)); - $result[0] = str_replace('|', ', ', $result[0]); - $result[1] = preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1]); - } - $this->_returns = $result; - return $result; - } - - /** - * Extracts the entry's `type` data. - * - * @memberOf Entry - * @returns {String} The entry's `type` data. - */ - public function getType() { - if (isset($this->_type)) { - return $this->_type; - } - - preg_match('#\*[\t ]*@type\s+(.+)#', $this->entry, $result); - if (count($result)) { - $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); - } else { - $result = $this->isFunction() ? 'Function' : 'Unknown'; - } - $this->_type = $result; - return $result; - } -} -?> \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php deleted file mode 100644 index 5dc2583f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php +++ /dev/null @@ -1,563 +0,0 @@ -<?php - -require(dirname(__FILE__) . "/Entry.php"); - -/** - * Generates Markdown from JSDoc entries. - */ -class Generator { - - /** - * The HTML for the close tag. - * - * @static - * @memberOf Generator - * @type String - */ - public $closeTag = "\n<!-- /div -->\n"; - - /** - * An array of JSDoc entries. - * - * @memberOf Generator - * @type Array - */ - public $entries = array(); - - /** - * The HTML for the open tag. - * - * @static - * @memberOf Generator - * @type String - */ - public $openTag = "\n<!-- div -->\n"; - - /** - * An options array used to configure the generator. - * - * @memberOf Generator - * @type Array - */ - public $options = array(); - - /** - * The file's source code. - * - * @memberOf Generator - * @type String - */ - public $source = ''; - - /*--------------------------------------------------------------------------*/ - - /** - * The Generator constructor. - * - * @constructor - * @param {String} $source The source code to parse. - * @param {Array} $options The options array. - */ - public function __construct( $source, $options = array() ) { - // juggle arguments - if (is_array($source)) { - $options = $source; - } else { - $options['source'] = $source; - } - if (isset($options['source']) && realpath($options['source'])) { - $options['path'] = $options['source']; - } - if (isset($options['path'])) { - preg_match('/(?<=\.)[a-z]+$/', $options['path'], $ext); - $options['source'] = file_get_contents($options['path']); - $ext = array_pop($ext); - - if (!isset($options['lang']) && $ext) { - $options['lang'] = $ext; - } - if (!isset($options['title'])) { - $options['title'] = ucfirst(basename($options['path'])) . ' API documentation'; - } - } - if (!isset($options['lang'])) { - $options['lang'] = 'js'; - } - if (!isset($options['toc'])) { - $options['toc'] = 'properties'; - } - - $this->options = $options; - $this->source = str_replace(PHP_EOL, "\n", $options['source']); - $this->entries = Entry::getEntries($this->source); - - foreach ($this->entries as $index => $value) { - $this->entries[$index] = new Entry($value, $this->source, $options['lang']); - } - } - - /*--------------------------------------------------------------------------*/ - - /** - * Performs common string formatting operations. - * - * @private - * @static - * @memberOf Generator - * @param {String} $string The string to format. - * @returns {String} The formatted string. - */ - private static function format( $string ) { - $counter = 0; - - // tokenize inline code snippets - preg_match_all('/`[^`]+`/', $string, $tokenized); - $tokenized = $tokenized[0]; - foreach ($tokenized as $snippet) { - $string = str_replace($snippet, '__token' . ($counter++) .'__', $string); - } - - // italicize parentheses - $string = preg_replace('/(^|\s)(\([^)]+\))/', '$1*$2*', $string); - - // mark numbers as inline code - $string = preg_replace('/[\t ](-?\d+(?:.\d+)?)(?!\.[^\n])/', ' `$1`', $string); - - // detokenize inline code snippets - $counter = 0; - foreach ($tokenized as $snippet) { - $string = str_replace('__token' . ($counter++) . '__', $snippet, $string); - } - - return trim($string); - } - - /** - * Modify a string by replacing named tokens with matching assoc. array values. - * - * @private - * @static - * @memberOf Generator - * @param {String} $string The string to modify. - * @param {Array|Object} $object The template object. - * @returns {String} The modified string. - */ - private static function interpolate( $string, $object ) { - preg_match_all('/#\{([^}]+)\}/', $string, $tokens); - $tokens = array_unique(array_pop($tokens)); - - foreach ($tokens as $token) { - $pattern = '/#\{' . $token . '\}/'; - $replacement = ''; - - if (is_object($object)) { - preg_match('/\(([^)]+?)\)$/', $token, $args); - $args = preg_split('/,\s*/', array_pop($args)); - $method = 'get' . ucfirst(str_replace('/\([^)]+?\)$/', '', $token)); - - if (method_exists($object, $method)) { - $replacement = (string) call_user_func_array(array($object, $method), $args); - } else if (isset($object->{$token})) { - $replacement = (string) $object->{$token}; - } - } else if (isset($object[$token])) { - $replacement = (string) $object[$token]; - } - $string = preg_replace($pattern, trim($replacement), $string); - } - return Generator::format($string); - } - - /*--------------------------------------------------------------------------*/ - - /** - * Adds the given `$entries` to the `$result` array. - * - * @private - * @memberOf Generator - * @param {Array} $result The result array to modify. - * @param {Array} $entries The entries to add to the `$result`. - */ - private function addEntries( &$result, $entries ) { - foreach ($entries as $entry) { - // skip aliases - if ($entry->isAlias()) { - continue; - } - // name and description - array_push( - $result, - $this->openTag, - Generator::interpolate("### <a id=\"#{hash}\"></a>`#{member}#{separator}#{call}`\n<a href=\"##{hash}\">#</a> [Ⓢ](#{href} \"View in source\") [Ⓣ][1]\n\n#{desc}", $entry) - ); - - // @alias - if (count($aliases = $entry->getAliases())) { - array_push($result, '', '#### Aliases'); - foreach ($aliases as $index => $alias) { - $aliases[$index] = $alias->getName(); - } - $result[] = '*' . implode(', ', $aliases) . '*'; - } - // @param - if (count($params = $entry->getParams())) { - array_push($result, '', '#### Arguments'); - foreach ($params as $index => $param) { - $result[] = Generator::interpolate('#{num}. `#{name}` (#{type}): #{desc}', array( - 'desc' => $param[2], - 'name' => $param[1], - 'num' => $index + 1, - 'type' => $param[0] - )); - } - } - // @returns - if (count($returns = $entry->getReturns())) { - array_push( - $result, '', - '#### Returns', - Generator::interpolate('(#{type}): #{desc}', array('desc' => $returns[1], 'type' => $returns[0])) - ); - } - // @example - if ($example = $entry->getExample()) { - array_push($result, '', '#### Example', $example); - } - array_push($result, "\n* * *", $this->closeTag); - } - } - - /** - * Resolves the entry's hash used to navigate the documentation. - * - * @private - * @memberOf Generator - * @param {Number|Object} $entry The entry object. - * @param {String} $member The name of the member. - * @returns {String} The url hash. - */ - private function getHash( $entry, $member = '' ) { - $entry = is_numeric($entry) ? $this->entries[$entry] : $entry; - $member = !$member ? $entry->getMembers(0) : $member; - $result = ($member ? $member . ($entry->isPlugin() ? 'prototype' : '') : '') . $entry->getCall(); - $result = preg_replace('/\(\[|\[\]/', '', $result); - $result = preg_replace('/[ =|\'"{}.()\]]/', '', $result); - $result = preg_replace('/[[#,]/', '-', $result); - return strtolower($result); - } - - /** - * Resolves the entry's url for the specific line number. - * - * @private - * @memberOf Generator - * @param {Number|Object} $entry The entry object. - * @returns {String} The url. - */ - private function getLineUrl( $entry ) { - $entry = is_numeric($entry) ? $this->entries($entry) : $entry; - return $this->options['url'] . '#L' . $entry->getLineNumber(); - } - - /** - * Extracts the character used to separate the entry's name from its member. - * - * @private - * @memberOf Generator - * @param {Number|Object} $entry The entry object. - * @returns {String} The separator. - */ - private function getSeparator( $entry ) { - $entry = is_numeric($entry) ? $this->entries($entry) : $entry; - return $entry->isPlugin() ? '.prototype.' : '.'; - } - - /*--------------------------------------------------------------------------*/ - - /** - * Generates Markdown from JSDoc entries. - * - * @memberOf Generator - * @returns {String} The rendered Markdown. - */ - public function generate() { - $api = array(); - $byCategory = $this->options['toc'] == 'categories'; - $categories = array(); - $closeTag = $this->closeTag; - $compiling = false; - $openTag = $this->openTag; - $result = array('# ' . $this->options['title']); - $toc = 'toc'; - - // initialize $api array - foreach ($this->entries as $entry) { - // skip invalid or private entries - $name = $entry->getName(); - if (!$name || $entry->isPrivate()) { - continue; - } - - $members = $entry->getMembers(); - $members = count($members) ? $members : array(''); - - foreach ($members as $member) { - // create api category arrays - if ($member && !isset($api[$member])) { - // create temporary entry to be replaced later - $api[$member] = new stdClass; - $api[$member]->static = array(); - $api[$member]->plugin = array(); - } - - // append entry to api member - if (!$member || $entry->isCtor() || ($entry->getType() == 'Object' && - !preg_match('/[=:]\s*(?:null|undefined)\s*[,;]?$/', $entry->entry))) { - - // assign the real entry, replacing the temporary entry if it exist - $member = ($member ? $member . ($entry->isPlugin() ? '#' : '.') : '') . $name; - $entry->static = @$api[$member] ? $api[$member]->static : array(); - $entry->plugin = @$api[$member] ? $api[$member]->plugin : array(); - - $api[$member] = $entry; - foreach ($entry->getAliases() as $alias) { - $api[$member]->static[] = $alias; - } - } - else if ($entry->isStatic()) { - $api[$member]->static[] = $entry; - foreach ($entry->getAliases() as $alias) { - $api[$member]->static[] = $alias; - } - } - else if (!$entry->isCtor()) { - $api[$member]->plugin[] = $entry; - foreach ($entry->getAliases() as $alias) { - $api[$member]->plugin[] = $alias; - } - } - } - } - - // add properties to each entry - foreach ($api as $entry) { - $entry->hash = $this->getHash($entry); - $entry->href = $this->getLineUrl($entry); - - $member = $entry->getMembers(0); - $member = ($member ? $member . ($entry->isPlugin() ? '.prototype.' : '.') : '') . $entry->getName(); - $entry->member = preg_replace('/' . $entry->getName() . '$/', '', $member); - - // add properties to static and plugin sub-entries - foreach (array('static', 'plugin') as $kind) { - foreach ($entry->{$kind} as $subentry) { - $subentry->hash = $this->getHash($subentry); - $subentry->href = $this->getLineUrl($subentry); - $subentry->member = $member; - $subentry->separator = $this->getSeparator($subentry); - } - } - } - - /*------------------------------------------------------------------------*/ - - // custom sort for root level entries - // TODO: see how well it handles deeper namespace traversal - function sortCompare($a, $b) { - $score = array( 'a' => 0, 'b' => 0); - foreach (array( 'a' => $a, 'b' => $b) as $key => $value) { - // capitalized properties are last - if (preg_match('/[#.][A-Z]/', $value)) { - $score[$key] = 0; - } - // lowercase prototype properties are next to last - else if (preg_match('/#[a-z]/', $value)) { - $score[$key] = 1; - } - // lowercase static properties next to first - else if (preg_match('/\.[a-z]/', $value)) { - $score[$key] = 2; - } - // root properties are first - else if (preg_match('/^[^#.]+$/', $value)) { - $score[$key] = 3; - } - } - $score = $score['b'] - $score['a']; - return $score ? $score : strcasecmp($a, $b); - } - - uksort($api, 'sortCompare'); - - // sort static and plugin sub-entries - foreach ($api as $entry) { - foreach (array('static', 'plugin') as $kind) { - $sortBy = array( 'a' => array(), 'b' => array(), 'c' => array() ); - foreach ($entry->{$kind} as $subentry) { - $name = $subentry->getName(); - // functions w/o ALL-CAPs names are last - $sortBy['a'][] = $subentry->getType() == 'Function' && !preg_match('/^[A-Z_]+$/', $name); - // ALL-CAPs properties first - $sortBy['b'][] = preg_match('/^[A-Z_]+$/', $name); - // lowercase alphanumeric sort - $sortBy['c'][] = strtolower($name); - } - array_multisort($sortBy['a'], SORT_ASC, $sortBy['b'], SORT_DESC, $sortBy['c'], SORT_ASC, $entry->{$kind}); - } - } - - /*------------------------------------------------------------------------*/ - - // add categories - foreach ($api as $entry) { - $categories[$entry->getCategory()][] = $entry; - foreach (array('static', 'plugin') as $kind) { - foreach ($entry->{$kind} as $subentry) { - $categories[$subentry->getCategory()][] = $subentry; - } - } - } - - // sort categories - ksort($categories); - - foreach(array('Methods', 'Properties') as $category) { - if (isset($categories[$category])) { - $entries = $categories[$category]; - unset($categories[$category]); - $categories[$category] = $entries; - } - } - - /*------------------------------------------------------------------------*/ - - // compile TOC - $result[] = $openTag; - - // compile TOC by categories - if ($byCategory) { - foreach ($categories as $category => $entries) { - if ($compiling) { - $result[] = $closeTag; - } else { - $compiling = true; - } - // assign TOC hash - if (count($result) == 2) { - $toc = $category; - } - // add category - array_push( - $result, - $openTag, '## ' . (count($result) == 2 ? '<a id="' . $toc . '"></a>' : '') . '`' . $category . '`' - ); - // add entries - foreach ($entries as $entry) { - $result[] = Generator::interpolate('* [`#{member}#{separator}#{name}`](##{hash})', $entry); - } - } - } - // compile TOC by namespace - else { - foreach ($api as $entry) { - if ($compiling) { - $result[] = $closeTag; - } else { - $compiling = true; - } - $member = $entry->member . $entry->getName(); - - // assign TOC hash - if (count($result) == 2) { - $toc = $member; - } - // add root entry - array_push( - $result, - $openTag, '## ' . (count($result) == 2 ? '<a id="' . $toc . '"></a>' : '') . '`' . $member . '`', - Generator::interpolate('* [`' . $member . '`](##{hash})', $entry) - ); - - // add static and plugin sub-entries - foreach (array('static', 'plugin') as $kind) { - if ($kind == 'plugin' && count($entry->plugin)) { - array_push( - $result, - $closeTag, - $openTag, - '## `' . $member . ($entry->isCtor() ? '.prototype`' : '`') - ); - } - foreach ($entry->{$kind} as $subentry) { - $subentry->member = $member; - $result[] = Generator::interpolate('* [`#{member}#{separator}#{name}`](##{hash})', $subentry); - } - } - } - } - - array_push($result, $closeTag, $closeTag); - - /*------------------------------------------------------------------------*/ - - // compile content - $compiling = false; - $result[] = $openTag; - - if ($byCategory) { - foreach ($categories as $category => $entries) { - if ($compiling) { - $result[] = $closeTag; - } else { - $compiling = true; - } - if ($category != 'Methods' && $category != 'Properties') { - $category = '“' . $category . '” Methods'; - } - array_push($result, $openTag, '## `' . $category . '`'); - $this->addEntries($result, $entries); - } - } - else { - foreach ($api as $entry) { - // skip aliases - if ($entry->isAlias()) { - continue; - } - if ($compiling) { - $result[] = $closeTag; - } else { - $compiling = true; - } - // add root entry name - $member = $entry->member . $entry->getName(); - array_push($result, $openTag, '## `' . $member . '`'); - - foreach (array($entry, 'static', 'plugin') as $kind) { - $subentries = is_string($kind) ? $entry->{$kind} : array($kind); - - // add sub-entry name - if ($kind != 'static' && $entry->getType() != 'Object' && - count($subentries) && $subentries[0] != $kind) { - if ($kind == 'plugin') { - $result[] = $closeTag; - } - array_push( - $result, - $openTag, - '## `' . $member . ($kind == 'plugin' ? '.prototype`' : '`') - ); - } - $this->addEntries($result, $subentries); - } - } - } - - // close tags add TOC link reference - array_push($result, $closeTag, $closeTag, '', ' [1]: #' . $toc . ' "Jump back to the TOC."'); - - // cleanup whitespace - return trim(preg_replace('/[\t ]+\n/', "\n", join($result, "\n"))); - } -} -?> diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/package.json deleted file mode 100644 index 167c7c6a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "author": { - "name": "Jeremy Stashewsky", - "email": "jeremy@goinstant.com", - "url": "https://github.com/stash" - }, - "name": "tough-cookie", - "description": "RFC6265 Cookies and Cookie Jar for node.js", - "keywords": [ - "HTTP", - "cookie", - "cookies", - "set-cookie", - "cookiejar", - "jar", - "RFC6265", - "RFC2965" - ], - "version": "0.9.15", - "homepage": "https://github.com/goinstant/node-cookie", - "repository": { - "type": "git", - "url": "git://github.com/goinstant/node-cookie.git" - }, - "bugs": { - "url": "https://github.com/goinstant/node-cookie/issues" - }, - "main": "./lib/cookie", - "scripts": { - "test": "vows test.js" - }, - "engines": { - "node": ">=0.4.12" - }, - "dependencies": { - "punycode": ">=0.2.0" - }, - "devDependencies": { - "vows": ">=0.6.0", - "async": ">=0.1.12" - }, - "readme": "[RFC6265](http://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js\n\n![Tough Cookie](http://www.goinstant.com.s3.amazonaws.com/tough-cookie.jpg)\n\n# Synopsis\n\n``` javascript\nvar cookies = require('tough-cookie'); // note: not 'cookie', 'cookies' or 'node-cookie'\nvar Cookie = cookies.Cookie;\nvar cookie = Cookie.parse(header);\ncookie.value = 'somethingdifferent';\nheader = cookie.toString();\n\nvar cookiejar = new cookies.CookieJar();\ncookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb);\n// ...\ncookiejar.getCookies('http://example.com/otherpath',function(err,cookies) {\n res.headers['cookie'] = cookies.join('; ');\n});\n```\n\n# Installation\n\nIt's _so_ easy!\n\n`npm install tough-cookie`\n\nRequires `punycode`, which should get installed automatically for you. Note that node.js v0.6.2+ bundles punycode by default.\n\nWhy the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken.\n\n# API\n\ncookies\n=======\n\nFunctions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be \"bound\".\n\nparseDate(string[,strict])\n-----------------\n\nParse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. If strict is set to true then leading/trailing non-seperator characters around the time part will cause the parsing to fail (e.g. \"Thu, 01 Jan 1970 00:00:010 GMT\" has an extra trailing zero but Chrome, an assumedly RFC-compliant browser, treats this as valid).\n\nformatDate(date)\n----------------\n\nFormat a Date into a RFC1123 string (the RFC6265-recommended format).\n\ncanonicalDomain(str)\n--------------------\n\nTransforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects).\n\ndomainMatch(str,domStr[,canonicalize=true])\n-------------------------------------------\n\nAnswers \"does this real domain match the domain in a cookie?\". The `str` is the \"current\" domain-name and the `domStr` is the \"cookie\" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a \"suffix match\".\n\nThe `canonicalize` parameter will run the other two paramters through `canonicalDomain` or not.\n\ndefaultPath(path)\n-----------------\n\nGiven a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the \"directory\" of a \"file\" in the path, but is specified by Section 5.1.4 of the RFC.\n\nThe `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output.\n\npathMatch(reqPath,cookiePath)\n-----------------------------\n\nAnswers \"does the request-path path-match a given cookie-path?\" as per RFC6265 Section 5.1.4. Returns a boolean.\n\nThis is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`.\n\nparse(header[,strict=false])\n----------------------------\n\nalias for `Cookie.parse(header[,strict])`\n\nfromJSON(string)\n----------------\n\nalias for `Cookie.fromJSON(string)`\n\ngetPublicSuffix(hostname)\n-------------------------\n\nReturns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it.\n\nFor example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`.\n\nFor further information, see http://publicsuffix.org/. This module derives its list from that site.\n\ncookieCompare(a,b)\n------------------\n\nFor use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). Longest `.path`s go first, then sorted oldest to youngest.\n\n``` javascript\nvar cookies = [ /* unsorted array of Cookie objects */ ];\ncookies = cookies.sort(cookieCompare);\n```\n\npermuteDomain(domain)\n---------------------\n\nGenerates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores.\n\n\npermutePath(path)\n-----------------\n\nGenerates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores.\n\nCookie\n======\n\nCookie.parse(header[,strict=false])\n-----------------------------------\n\nParses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. If in strict mode, returns `undefined` if the cookie doesn't follow the guidelines in section 4 of RFC6265. Generally speaking, strict mode can be used to validate your own generated Set-Cookie headers, but acting as a client you want to be lenient and leave strict mode off.\n\nHere's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response:\n\n``` javascript\nif (res.headers['set-cookie'] instanceof Array)\n cookies = res.headers['set-cookie'].map(Cookie.parse);\nelse\n cookies = [Cookie.parse(res.headers['set-cookie'])];\n```\n\nCookie.fromJSON(string)\n-----------------------\n\nConvert a JSON string to a `Cookie` object. Does a `JSON.parse()` and converts the `.created`, `.lastAccessed` and `.expires` properties into `Date` objects.\n\nProperties\n==========\n\n * _key_ - string - the name or key of the cookie (default \"\")\n * _value_ - string - the value of the cookie (default \"\")\n * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `\"Infinity\"`). See `setExpires()`\n * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `\"Infinity\"` and `\"-Infinity\"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()`\n * _domain_ - string - the `Domain=` attribute of the cookie\n * _path_ - string - the `Path=` of the cookie\n * _secure_ - boolean - the `Secure` cookie flag\n * _httpOnly_ - boolean - the `HttpOnly` cookie flag\n * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside)\n \nAfter a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes:\n\n * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied)\n * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one.\n * _created_ - `Date` - when this cookie was added to the jar\n * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute.\n\nConstruction([{options}])\n------------\n\nReceives an options object that can contain any Cookie properties, uses the default for unspecified properties.\n\n.toString()\n-----------\n\nencode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`.\n\n.cookieString()\n---------------\n\nencode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '=').\n\n.setExpires(String)\n-------------------\n\nsets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `\"Infinity\"` (a string) is set.\n\n.setMaxAge(number)\n-------------------\n\nsets the maxAge in seconds. Coerces `-Infinity` to `\"-Infinity\"` and `Infinity` to `\"Infinity\"` so it JSON serializes correctly.\n\n.expiryTime([now=Date.now()])\n-----------------------------\n\n.expiryDate([now=Date.now()])\n-----------------------------\n\nexpiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds.\n\nMax-Age takes precedence over Expires (as per the RFC). The `.created` attribute -- or, by default, the `now` paramter -- is used to offset the `.maxAge` attribute.\n\nIf Expires (`.expires`) is set, that's returned.\n\nOtherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for \"Tue, 19 Jan 2038 03:14:07 GMT\" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents).\n\n.TTL([now=Date.now()])\n---------\n\ncompute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply.\n\nThe \"number\" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned.\n\n.canonicalizedDoman()\n---------------------\n\n.cdomain()\n----------\n\nreturn the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters.\n\n.validate()\n-----------\n\nStatus: *IN PROGRESS*. Works for a few things, but is by no means comprehensive.\n\nvalidates cookie attributes for semantic correctness. Useful for \"lint\" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct:\n\n``` javascript\nif (cookie.validate() === true) {\n // it's tasty\n} else {\n // yuck!\n}\n```\n\nCookieJar\n=========\n\nConstruction([store = new MemoryCookieStore()][, rejectPublicSuffixes])\n------------\n\nSimply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used.\n\n\nAttributes\n----------\n\n * _rejectPublicSuffixes_ - boolean - reject cookies with domains like \"com\" and \"co.uk\" (default: `true`)\n \nSince eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods.\n\n.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie))\n-------------------------------------------------------------------\n\nAttempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.created`, `.lastAccessed` and `.hostOnly` properties.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.\n * _secure_ - boolean - autodetect from url - indicates if this is a \"Secure\" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.\n * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies\n * _strict_ - boolean - default `false` - perform extra checks\n * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. CookieStore errors aren't ignored by this option.\n\nAs per the RFC, the `.hostOnly` property is set if there was no \"Domain=\" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual).\n\n.storeCookie(cookie, [{options},] cb(err,cookie))\n-------------------------------------------------\n\n__REMOVED__ removed in lieu of the CookieStore API below\n \n.getCookies(currentUrl, [{options},] cb(err,cookies))\n-----------------------------------------------------\n\nRetrieve the list of cookies that can be sent in a Cookie header for the current url.\n\nIf an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.\n * _secure_ - boolean - autodetect from url - indicates if this is a \"Secure\" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.\n * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies\n * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially).\n * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the CookieStore `fetchCookies` function (the default MemoryCookieStore supports it).\n\nThe `.lastAccessed` property of the returned cookies will have been updated.\n\n.getCookieString(...)\n---------------------\n\nAccepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`.\n\n.getSetCookieStrings(...)\n-------------------------\n\nAccepts the same options as `.getCookies()` but passes an array of strings suitable for Set-Cookie headers (rather than an array of `Cookie`s) to the callback. Simply maps the cookie array via `.toString()`.\n\n# CookieStore API\n\nThe storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores.\n\nAll `domain` parameters will have been normalized before calling.\n\nThe Cookie store must have all of the following methods.\n\nstore.findCookie(domain, path, key, cb(err,cookie))\n---------------------------------------------------\n\nRetrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned.\n\nCallback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error).\n\nstore.findCookies(domain, path, cb(err,cookies))\n------------------------------------------------\n\nLocates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above.\n\nIf no cookies are found, the callback MUST be passed an empty array.\n\nThe resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done.\n\nAs of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only).\n\nstore.putCookie(cookie, cb(err))\n--------------------------------\n\nAdds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur.\n\nThe `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties.\n\nPass an error if the cookie cannot be stored.\n\nstore.updateCookie(oldCookie, newCookie, cb(err))\n-------------------------------------------------\n\nUpdate an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store.\n\nThe `.lastAccessed` property will always be different between the two objects and `.created` will always be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are sorted (or selected for deletion).\n\nStores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object.\n\nThe `newCookie` and `oldCookie` objects MUST NOT be modified.\n\nPass an error if the newCookie cannot be stored.\n\nstore.removeCookie(domain, path, key, cb(err))\n----------------------------------------------\n\nRemove a cookie from the store (see notes on `findCookie` about the uniqueness constraint).\n\nThe implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie.\n\nstore.removeCookies(domain, path, cb(err))\n------------------------------------------\n\nRemoves matching cookies from the store. The `path` paramter is optional, and if missing means all paths in a domain should be removed.\n\nPass an error ONLY if removing any existing cookies failed.\n\n# TODO\n\n * _full_ RFC5890/RFC5891 canonicalization for domains in `cdomain()`\n * the optional `punycode` requirement implements RFC3492, but RFC6265 requires RFC5891\n * better tests for `validate()`?\n\n# Copyright and License\n\n(tl;dr: MIT with some MPL/1.1)\n\nCopyright GoInstant, Inc. and other contributors. All rights reserved.\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\nPortions may be licensed under different licenses (in particular public-suffix.txt is MPL/1.1); please read the LICENSE file for full details.\n", - "readmeFilename": "README.md", - "_id": "tough-cookie@0.9.15", - "dist": { - "shasum": "0fbda7fb5b5bca17e4f97909a0818dc8c2c12588" - }, - "_from": "tough-cookie@~0.9.15", - "_resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-0.9.15.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/public-suffix.txt b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/public-suffix.txt deleted file mode 100644 index 2c201312..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/public-suffix.txt +++ /dev/null @@ -1,5229 +0,0 @@ -// ***** BEGIN LICENSE BLOCK ***** -// Version: MPL 1.1/GPL 2.0/LGPL 2.1 -// -// The contents of this file are subject to the Mozilla Public License Version -// 1.1 (the "License"); you may not use this file except in compliance with -// the License. You may obtain a copy of the License at -// http://www.mozilla.org/MPL/ -// -// Software distributed under the License is distributed on an "AS IS" basis, -// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -// for the specific language governing rights and limitations under the -// License. -// -// The Original Code is the Public Suffix List. -// -// The Initial Developer of the Original Code is -// Jo Hermans <jo.hermans@gmail.com>. -// Portions created by the Initial Developer are Copyright (C) 2007 -// the Initial Developer. All Rights Reserved. -// -// Contributor(s): -// Ruben Arakelyan <ruben@rubenarakelyan.com> -// Gervase Markham <gerv@gerv.net> -// Pamela Greene <pamg.bugs@gmail.com> -// David Triendl <david@triendl.name> -// Jothan Frakes <jothan@gmail.com> -// The kind representatives of many TLD registries -// -// Alternatively, the contents of this file may be used under the terms of -// either the GNU General Public License Version 2 or later (the "GPL"), or -// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -// in which case the provisions of the GPL or the LGPL are applicable instead -// of those above. If you wish to allow use of your version of this file only -// under the terms of either the GPL or the LGPL, and not to allow others to -// use your version of this file under the terms of the MPL, indicate your -// decision by deleting the provisions above and replace them with the notice -// and other provisions required by the GPL or the LGPL. If you do not delete -// the provisions above, a recipient may use your version of this file under -// the terms of any one of the MPL, the GPL or the LGPL. -// -// ***** END LICENSE BLOCK ***** - -// ===BEGIN ICANN DOMAINS=== - -// ac : http://en.wikipedia.org/wiki/.ac -ac -com.ac -edu.ac -gov.ac -net.ac -mil.ac -org.ac - -// ad : http://en.wikipedia.org/wiki/.ad -ad -nom.ad - -// ae : http://en.wikipedia.org/wiki/.ae -// see also: "Domain Name Eligibility Policy" at http://www.aeda.ae/eng/aepolicy.php -ae -co.ae -net.ae -org.ae -sch.ae -ac.ae -gov.ae -mil.ae - -// aero : see http://www.information.aero/index.php?id=66 -aero -accident-investigation.aero -accident-prevention.aero -aerobatic.aero -aeroclub.aero -aerodrome.aero -agents.aero -aircraft.aero -airline.aero -airport.aero -air-surveillance.aero -airtraffic.aero -air-traffic-control.aero -ambulance.aero -amusement.aero -association.aero -author.aero -ballooning.aero -broker.aero -caa.aero -cargo.aero -catering.aero -certification.aero -championship.aero -charter.aero -civilaviation.aero -club.aero -conference.aero -consultant.aero -consulting.aero -control.aero -council.aero -crew.aero -design.aero -dgca.aero -educator.aero -emergency.aero -engine.aero -engineer.aero -entertainment.aero -equipment.aero -exchange.aero -express.aero -federation.aero -flight.aero -freight.aero -fuel.aero -gliding.aero -government.aero -groundhandling.aero -group.aero -hanggliding.aero -homebuilt.aero -insurance.aero -journal.aero -journalist.aero -leasing.aero -logistics.aero -magazine.aero -maintenance.aero -marketplace.aero -media.aero -microlight.aero -modelling.aero -navigation.aero -parachuting.aero -paragliding.aero -passenger-association.aero -pilot.aero -press.aero -production.aero -recreation.aero -repbody.aero -res.aero -research.aero -rotorcraft.aero -safety.aero -scientist.aero -services.aero -show.aero -skydiving.aero -software.aero -student.aero -taxi.aero -trader.aero -trading.aero -trainer.aero -union.aero -workinggroup.aero -works.aero - -// af : http://www.nic.af/help.jsp -af -gov.af -com.af -org.af -net.af -edu.af - -// ag : http://www.nic.ag/prices.htm -ag -com.ag -org.ag -net.ag -co.ag -nom.ag - -// ai : http://nic.com.ai/ -ai -off.ai -com.ai -net.ai -org.ai - -// al : http://www.ert.gov.al/ert_alb/faq_det.html?Id=31 -al -com.al -edu.al -gov.al -mil.al -net.al -org.al - -// am : http://en.wikipedia.org/wiki/.am -am - -// an : http://www.una.an/an_domreg/default.asp -an -com.an -net.an -org.an -edu.an - -// ao : http://en.wikipedia.org/wiki/.ao -// http://www.dns.ao/REGISTR.DOC -ao -ed.ao -gv.ao -og.ao -co.ao -pb.ao -it.ao - -// aq : http://en.wikipedia.org/wiki/.aq -aq - -// ar : http://en.wikipedia.org/wiki/.ar -*.ar -!congresodelalengua3.ar -!educ.ar -!gobiernoelectronico.ar -!mecon.ar -!nacion.ar -!nic.ar -!promocion.ar -!retina.ar -!uba.ar - -// arpa : http://en.wikipedia.org/wiki/.arpa -// Confirmed by registry <iana-questions@icann.org> 2008-06-18 -e164.arpa -in-addr.arpa -ip6.arpa -iris.arpa -uri.arpa -urn.arpa - -// as : http://en.wikipedia.org/wiki/.as -as -gov.as - -// asia : http://en.wikipedia.org/wiki/.asia -asia - -// at : http://en.wikipedia.org/wiki/.at -// Confirmed by registry <it@nic.at> 2008-06-17 -at -ac.at -co.at -gv.at -or.at - -// au : http://en.wikipedia.org/wiki/.au -// http://www.auda.org.au/ -// 2LDs -com.au -net.au -org.au -edu.au -gov.au -csiro.au -asn.au -id.au -// Historic 2LDs (closed to new registration, but sites still exist) -info.au -conf.au -oz.au -// CGDNs - http://www.cgdn.org.au/ -act.au -nsw.au -nt.au -qld.au -sa.au -tas.au -vic.au -wa.au -// 3LDs -act.edu.au -nsw.edu.au -nt.edu.au -qld.edu.au -sa.edu.au -tas.edu.au -vic.edu.au -wa.edu.au -act.gov.au -// Removed at request of Shae.Donelan@services.nsw.gov.au, 2010-03-04 -// nsw.gov.au -nt.gov.au -qld.gov.au -sa.gov.au -tas.gov.au -vic.gov.au -wa.gov.au - -// aw : http://en.wikipedia.org/wiki/.aw -aw -com.aw - -// ax : http://en.wikipedia.org/wiki/.ax -ax - -// az : http://en.wikipedia.org/wiki/.az -az -com.az -net.az -int.az -gov.az -org.az -edu.az -info.az -pp.az -mil.az -name.az -pro.az -biz.az - -// ba : http://en.wikipedia.org/wiki/.ba -ba -org.ba -net.ba -edu.ba -gov.ba -mil.ba -unsa.ba -unbi.ba -co.ba -com.ba -rs.ba - -// bb : http://en.wikipedia.org/wiki/.bb -bb -biz.bb -com.bb -edu.bb -gov.bb -info.bb -net.bb -org.bb -store.bb - -// bd : http://en.wikipedia.org/wiki/.bd -*.bd - -// be : http://en.wikipedia.org/wiki/.be -// Confirmed by registry <tech@dns.be> 2008-06-08 -be -ac.be - -// bf : http://en.wikipedia.org/wiki/.bf -bf -gov.bf - -// bg : http://en.wikipedia.org/wiki/.bg -// https://www.register.bg/user/static/rules/en/index.html -bg -a.bg -b.bg -c.bg -d.bg -e.bg -f.bg -g.bg -h.bg -i.bg -j.bg -k.bg -l.bg -m.bg -n.bg -o.bg -p.bg -q.bg -r.bg -s.bg -t.bg -u.bg -v.bg -w.bg -x.bg -y.bg -z.bg -0.bg -1.bg -2.bg -3.bg -4.bg -5.bg -6.bg -7.bg -8.bg -9.bg - -// bh : http://en.wikipedia.org/wiki/.bh -bh -com.bh -edu.bh -net.bh -org.bh -gov.bh - -// bi : http://en.wikipedia.org/wiki/.bi -// http://whois.nic.bi/ -bi -co.bi -com.bi -edu.bi -or.bi -org.bi - -// biz : http://en.wikipedia.org/wiki/.biz -biz - -// bj : http://en.wikipedia.org/wiki/.bj -bj -asso.bj -barreau.bj -gouv.bj - -// bm : http://www.bermudanic.bm/dnr-text.txt -bm -com.bm -edu.bm -gov.bm -net.bm -org.bm - -// bn : http://en.wikipedia.org/wiki/.bn -*.bn - -// bo : http://www.nic.bo/ -bo -com.bo -edu.bo -gov.bo -gob.bo -int.bo -org.bo -net.bo -mil.bo -tv.bo - -// br : http://registro.br/dominio/dpn.html -// Updated by registry <fneves@registro.br> 2011-03-01 -br -adm.br -adv.br -agr.br -am.br -arq.br -art.br -ato.br -b.br -bio.br -blog.br -bmd.br -can.br -cim.br -cng.br -cnt.br -com.br -coop.br -ecn.br -edu.br -emp.br -eng.br -esp.br -etc.br -eti.br -far.br -flog.br -fm.br -fnd.br -fot.br -fst.br -g12.br -ggf.br -gov.br -imb.br -ind.br -inf.br -jor.br -jus.br -lel.br -mat.br -med.br -mil.br -mus.br -net.br -nom.br -not.br -ntr.br -odo.br -org.br -ppg.br -pro.br -psc.br -psi.br -qsl.br -radio.br -rec.br -slg.br -srv.br -taxi.br -teo.br -tmp.br -trd.br -tur.br -tv.br -vet.br -vlog.br -wiki.br -zlg.br - -// bs : http://www.nic.bs/rules.html -bs -com.bs -net.bs -org.bs -edu.bs -gov.bs - -// bt : http://en.wikipedia.org/wiki/.bt -bt -com.bt -edu.bt -gov.bt -net.bt -org.bt - -// bv : No registrations at this time. -// Submitted by registry <jarle@uninett.no> 2006-06-16 - -// bw : http://en.wikipedia.org/wiki/.bw -// http://www.gobin.info/domainname/bw.doc -// list of other 2nd level tlds ? -bw -co.bw -org.bw - -// by : http://en.wikipedia.org/wiki/.by -// http://tld.by/rules_2006_en.html -// list of other 2nd level tlds ? -by -gov.by -mil.by -// Official information does not indicate that com.by is a reserved -// second-level domain, but it's being used as one (see www.google.com.by and -// www.yahoo.com.by, for example), so we list it here for safety's sake. -com.by - -// http://hoster.by/ -of.by - -// bz : http://en.wikipedia.org/wiki/.bz -// http://www.belizenic.bz/ -bz -com.bz -net.bz -org.bz -edu.bz -gov.bz - -// ca : http://en.wikipedia.org/wiki/.ca -ca -// ca geographical names -ab.ca -bc.ca -mb.ca -nb.ca -nf.ca -nl.ca -ns.ca -nt.ca -nu.ca -on.ca -pe.ca -qc.ca -sk.ca -yk.ca -// gc.ca: http://en.wikipedia.org/wiki/.gc.ca -// see also: http://registry.gc.ca/en/SubdomainFAQ -gc.ca - -// cat : http://en.wikipedia.org/wiki/.cat -cat - -// cc : http://en.wikipedia.org/wiki/.cc -cc - -// cd : http://en.wikipedia.org/wiki/.cd -// see also: https://www.nic.cd/domain/insertDomain_2.jsp?act=1 -cd -gov.cd - -// cf : http://en.wikipedia.org/wiki/.cf -cf - -// cg : http://en.wikipedia.org/wiki/.cg -cg - -// ch : http://en.wikipedia.org/wiki/.ch -ch - -// ci : http://en.wikipedia.org/wiki/.ci -// http://www.nic.ci/index.php?page=charte -ci -org.ci -or.ci -com.ci -co.ci -edu.ci -ed.ci -ac.ci -net.ci -go.ci -asso.ci -aéroport.ci -int.ci -presse.ci -md.ci -gouv.ci - -// ck : http://en.wikipedia.org/wiki/.ck -*.ck -!www.ck - -// cl : http://en.wikipedia.org/wiki/.cl -cl -gov.cl -gob.cl -co.cl -mil.cl - -// cm : http://en.wikipedia.org/wiki/.cm -cm -gov.cm - -// cn : http://en.wikipedia.org/wiki/.cn -// Submitted by registry <tanyaling@cnnic.cn> 2008-06-11 -cn -ac.cn -com.cn -edu.cn -gov.cn -net.cn -org.cn -mil.cn -公司.cn -网络.cn -網絡.cn -// cn geographic names -ah.cn -bj.cn -cq.cn -fj.cn -gd.cn -gs.cn -gz.cn -gx.cn -ha.cn -hb.cn -he.cn -hi.cn -hl.cn -hn.cn -jl.cn -js.cn -jx.cn -ln.cn -nm.cn -nx.cn -qh.cn -sc.cn -sd.cn -sh.cn -sn.cn -sx.cn -tj.cn -xj.cn -xz.cn -yn.cn -zj.cn -hk.cn -mo.cn -tw.cn - -// co : http://en.wikipedia.org/wiki/.co -// Submitted by registry <tecnico@uniandes.edu.co> 2008-06-11 -co -arts.co -com.co -edu.co -firm.co -gov.co -info.co -int.co -mil.co -net.co -nom.co -org.co -rec.co -web.co - -// com : http://en.wikipedia.org/wiki/.com -com - -// coop : http://en.wikipedia.org/wiki/.coop -coop - -// cr : http://www.nic.cr/niccr_publico/showRegistroDominiosScreen.do -cr -ac.cr -co.cr -ed.cr -fi.cr -go.cr -or.cr -sa.cr - -// cu : http://en.wikipedia.org/wiki/.cu -cu -com.cu -edu.cu -org.cu -net.cu -gov.cu -inf.cu - -// cv : http://en.wikipedia.org/wiki/.cv -cv - -// cx : http://en.wikipedia.org/wiki/.cx -// list of other 2nd level tlds ? -cx -gov.cx - -// cy : http://en.wikipedia.org/wiki/.cy -*.cy - -// cz : http://en.wikipedia.org/wiki/.cz -cz - -// de : http://en.wikipedia.org/wiki/.de -// Confirmed by registry <ops@denic.de> (with technical -// reservations) 2008-07-01 -de - -// dj : http://en.wikipedia.org/wiki/.dj -dj - -// dk : http://en.wikipedia.org/wiki/.dk -// Confirmed by registry <robert@dk-hostmaster.dk> 2008-06-17 -dk - -// dm : http://en.wikipedia.org/wiki/.dm -dm -com.dm -net.dm -org.dm -edu.dm -gov.dm - -// do : http://en.wikipedia.org/wiki/.do -do -art.do -com.do -edu.do -gob.do -gov.do -mil.do -net.do -org.do -sld.do -web.do - -// dz : http://en.wikipedia.org/wiki/.dz -dz -com.dz -org.dz -net.dz -gov.dz -edu.dz -asso.dz -pol.dz -art.dz - -// ec : http://www.nic.ec/reg/paso1.asp -// Submitted by registry <vabboud@nic.ec> 2008-07-04 -ec -com.ec -info.ec -net.ec -fin.ec -k12.ec -med.ec -pro.ec -org.ec -edu.ec -gov.ec -gob.ec -mil.ec - -// edu : http://en.wikipedia.org/wiki/.edu -edu - -// ee : http://www.eenet.ee/EENet/dom_reeglid.html#lisa_B -ee -edu.ee -gov.ee -riik.ee -lib.ee -med.ee -com.ee -pri.ee -aip.ee -org.ee -fie.ee - -// eg : http://en.wikipedia.org/wiki/.eg -eg -com.eg -edu.eg -eun.eg -gov.eg -mil.eg -name.eg -net.eg -org.eg -sci.eg - -// er : http://en.wikipedia.org/wiki/.er -*.er - -// es : https://www.nic.es/site_ingles/ingles/dominios/index.html -es -com.es -nom.es -org.es -gob.es -edu.es - -// et : http://en.wikipedia.org/wiki/.et -*.et - -// eu : http://en.wikipedia.org/wiki/.eu -eu - -// fi : http://en.wikipedia.org/wiki/.fi -fi -// aland.fi : http://en.wikipedia.org/wiki/.ax -// This domain is being phased out in favor of .ax. As there are still many -// domains under aland.fi, we still keep it on the list until aland.fi is -// completely removed. -// TODO: Check for updates (expected to be phased out around Q1/2009) -aland.fi - -// fj : http://en.wikipedia.org/wiki/.fj -*.fj - -// fk : http://en.wikipedia.org/wiki/.fk -*.fk - -// fm : http://en.wikipedia.org/wiki/.fm -fm - -// fo : http://en.wikipedia.org/wiki/.fo -fo - -// fr : http://www.afnic.fr/ -// domaines descriptifs : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-descriptifs -fr -com.fr -asso.fr -nom.fr -prd.fr -presse.fr -tm.fr -// domaines sectoriels : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-sectoriels -aeroport.fr -assedic.fr -avocat.fr -avoues.fr -cci.fr -chambagri.fr -chirurgiens-dentistes.fr -experts-comptables.fr -geometre-expert.fr -gouv.fr -greta.fr -huissier-justice.fr -medecin.fr -notaires.fr -pharmacien.fr -port.fr -veterinaire.fr - -// ga : http://en.wikipedia.org/wiki/.ga -ga - -// gb : This registry is effectively dormant -// Submitted by registry <Damien.Shaw@ja.net> 2008-06-12 - -// gd : http://en.wikipedia.org/wiki/.gd -gd - -// ge : http://www.nic.net.ge/policy_en.pdf -ge -com.ge -edu.ge -gov.ge -org.ge -mil.ge -net.ge -pvt.ge - -// gf : http://en.wikipedia.org/wiki/.gf -gf - -// gg : http://www.channelisles.net/applic/avextn.shtml -gg -co.gg -org.gg -net.gg -sch.gg -gov.gg - -// gh : http://en.wikipedia.org/wiki/.gh -// see also: http://www.nic.gh/reg_now.php -// Although domains directly at second level are not possible at the moment, -// they have been possible for some time and may come back. -gh -com.gh -edu.gh -gov.gh -org.gh -mil.gh - -// gi : http://www.nic.gi/rules.html -gi -com.gi -ltd.gi -gov.gi -mod.gi -edu.gi -org.gi - -// gl : http://en.wikipedia.org/wiki/.gl -// http://nic.gl -gl - -// gm : http://www.nic.gm/htmlpages%5Cgm-policy.htm -gm - -// gn : http://psg.com/dns/gn/gn.txt -// Submitted by registry <randy@psg.com> 2008-06-17 -ac.gn -com.gn -edu.gn -gov.gn -org.gn -net.gn - -// gov : http://en.wikipedia.org/wiki/.gov -gov - -// gp : http://www.nic.gp/index.php?lang=en -gp -com.gp -net.gp -mobi.gp -edu.gp -org.gp -asso.gp - -// gq : http://en.wikipedia.org/wiki/.gq -gq - -// gr : https://grweb.ics.forth.gr/english/1617-B-2005.html -// Submitted by registry <segred@ics.forth.gr> 2008-06-09 -gr -com.gr -edu.gr -net.gr -org.gr -gov.gr - -// gs : http://en.wikipedia.org/wiki/.gs -gs - -// gt : http://www.gt/politicas.html -*.gt -!www.gt - -// gu : http://gadao.gov.gu/registration.txt -*.gu - -// gw : http://en.wikipedia.org/wiki/.gw -gw - -// gy : http://en.wikipedia.org/wiki/.gy -// http://registry.gy/ -gy -co.gy -com.gy -net.gy - -// hk : https://www.hkdnr.hk -// Submitted by registry <hk.tech@hkirc.hk> 2008-06-11 -hk -com.hk -edu.hk -gov.hk -idv.hk -net.hk -org.hk -公司.hk -教育.hk -敎育.hk -政府.hk -個人.hk -个人.hk -箇人.hk -網络.hk -网络.hk -组織.hk -網絡.hk -网絡.hk -组织.hk -組織.hk -組织.hk - -// hm : http://en.wikipedia.org/wiki/.hm -hm - -// hn : http://www.nic.hn/politicas/ps02,,05.html -hn -com.hn -edu.hn -org.hn -net.hn -mil.hn -gob.hn - -// hr : http://www.dns.hr/documents/pdf/HRTLD-regulations.pdf -hr -iz.hr -from.hr -name.hr -com.hr - -// ht : http://www.nic.ht/info/charte.cfm -ht -com.ht -shop.ht -firm.ht -info.ht -adult.ht -net.ht -pro.ht -org.ht -med.ht -art.ht -coop.ht -pol.ht -asso.ht -edu.ht -rel.ht -gouv.ht -perso.ht - -// hu : http://www.domain.hu/domain/English/sld.html -// Confirmed by registry <pasztor@iszt.hu> 2008-06-12 -hu -co.hu -info.hu -org.hu -priv.hu -sport.hu -tm.hu -2000.hu -agrar.hu -bolt.hu -casino.hu -city.hu -erotica.hu -erotika.hu -film.hu -forum.hu -games.hu -hotel.hu -ingatlan.hu -jogasz.hu -konyvelo.hu -lakas.hu -media.hu -news.hu -reklam.hu -sex.hu -shop.hu -suli.hu -szex.hu -tozsde.hu -utazas.hu -video.hu - -// id : http://en.wikipedia.org/wiki/.id -// see also: https://register.pandi.or.id/ -id -ac.id -co.id -go.id -mil.id -net.id -or.id -sch.id -web.id - -// ie : http://en.wikipedia.org/wiki/.ie -ie -gov.ie - -// il : http://en.wikipedia.org/wiki/.il -*.il - -// im : https://www.nic.im/pdfs/imfaqs.pdf -im -co.im -ltd.co.im -plc.co.im -net.im -gov.im -org.im -nic.im -ac.im - -// in : http://en.wikipedia.org/wiki/.in -// see also: http://www.inregistry.in/policies/ -// Please note, that nic.in is not an offical eTLD, but used by most -// government institutions. -in -co.in -firm.in -net.in -org.in -gen.in -ind.in -nic.in -ac.in -edu.in -res.in -gov.in -mil.in - -// info : http://en.wikipedia.org/wiki/.info -info - -// int : http://en.wikipedia.org/wiki/.int -// Confirmed by registry <iana-questions@icann.org> 2008-06-18 -int -eu.int - -// io : http://www.nic.io/rules.html -// list of other 2nd level tlds ? -io -com.io - -// iq : http://www.cmc.iq/english/iq/iqregister1.htm -iq -gov.iq -edu.iq -mil.iq -com.iq -org.iq -net.iq - -// ir : http://www.nic.ir/Terms_and_Conditions_ir,_Appendix_1_Domain_Rules -// Also see http://www.nic.ir/Internationalized_Domain_Names -// Two <iran>.ir entries added at request of <tech-team@nic.ir>, 2010-04-16 -ir -ac.ir -co.ir -gov.ir -id.ir -net.ir -org.ir -sch.ir -// xn--mgba3a4f16a.ir (<iran>.ir, Persian YEH) -ایران.ir -// xn--mgba3a4fra.ir (<iran>.ir, Arabic YEH) -ايران.ir - -// is : http://www.isnic.is/domain/rules.php -// Confirmed by registry <marius@isgate.is> 2008-12-06 -is -net.is -com.is -edu.is -gov.is -org.is -int.is - -// it : http://en.wikipedia.org/wiki/.it -it -gov.it -edu.it -// list of reserved geo-names : -// http://www.nic.it/documenti/regolamenti-e-linee-guida/regolamento-assegnazione-versione-6.0.pdf -// (There is also a list of reserved geo-names corresponding to Italian -// municipalities : http://www.nic.it/documenti/appendice-c.pdf , but it is -// not included here.) -agrigento.it -ag.it -alessandria.it -al.it -ancona.it -an.it -aosta.it -aoste.it -ao.it -arezzo.it -ar.it -ascoli-piceno.it -ascolipiceno.it -ap.it -asti.it -at.it -avellino.it -av.it -bari.it -ba.it -andria-barletta-trani.it -andriabarlettatrani.it -trani-barletta-andria.it -tranibarlettaandria.it -barletta-trani-andria.it -barlettatraniandria.it -andria-trani-barletta.it -andriatranibarletta.it -trani-andria-barletta.it -traniandriabarletta.it -bt.it -belluno.it -bl.it -benevento.it -bn.it -bergamo.it -bg.it -biella.it -bi.it -bologna.it -bo.it -bolzano.it -bozen.it -balsan.it -alto-adige.it -altoadige.it -suedtirol.it -bz.it -brescia.it -bs.it -brindisi.it -br.it -cagliari.it -ca.it -caltanissetta.it -cl.it -campobasso.it -cb.it -carboniaiglesias.it -carbonia-iglesias.it -iglesias-carbonia.it -iglesiascarbonia.it -ci.it -caserta.it -ce.it -catania.it -ct.it -catanzaro.it -cz.it -chieti.it -ch.it -como.it -co.it -cosenza.it -cs.it -cremona.it -cr.it -crotone.it -kr.it -cuneo.it -cn.it -dell-ogliastra.it -dellogliastra.it -ogliastra.it -og.it -enna.it -en.it -ferrara.it -fe.it -fermo.it -fm.it -firenze.it -florence.it -fi.it -foggia.it -fg.it -forli-cesena.it -forlicesena.it -cesena-forli.it -cesenaforli.it -fc.it -frosinone.it -fr.it -genova.it -genoa.it -ge.it -gorizia.it -go.it -grosseto.it -gr.it -imperia.it -im.it -isernia.it -is.it -laquila.it -aquila.it -aq.it -la-spezia.it -laspezia.it -sp.it -latina.it -lt.it -lecce.it -le.it -lecco.it -lc.it -livorno.it -li.it -lodi.it -lo.it -lucca.it -lu.it -macerata.it -mc.it -mantova.it -mn.it -massa-carrara.it -massacarrara.it -carrara-massa.it -carraramassa.it -ms.it -matera.it -mt.it -medio-campidano.it -mediocampidano.it -campidano-medio.it -campidanomedio.it -vs.it -messina.it -me.it -milano.it -milan.it -mi.it -modena.it -mo.it -monza.it -monza-brianza.it -monzabrianza.it -monzaebrianza.it -monzaedellabrianza.it -monza-e-della-brianza.it -mb.it -napoli.it -naples.it -na.it -novara.it -no.it -nuoro.it -nu.it -oristano.it -or.it -padova.it -padua.it -pd.it -palermo.it -pa.it -parma.it -pr.it -pavia.it -pv.it -perugia.it -pg.it -pescara.it -pe.it -pesaro-urbino.it -pesarourbino.it -urbino-pesaro.it -urbinopesaro.it -pu.it -piacenza.it -pc.it -pisa.it -pi.it -pistoia.it -pt.it -pordenone.it -pn.it -potenza.it -pz.it -prato.it -po.it -ragusa.it -rg.it -ravenna.it -ra.it -reggio-calabria.it -reggiocalabria.it -rc.it -reggio-emilia.it -reggioemilia.it -re.it -rieti.it -ri.it -rimini.it -rn.it -roma.it -rome.it -rm.it -rovigo.it -ro.it -salerno.it -sa.it -sassari.it -ss.it -savona.it -sv.it -siena.it -si.it -siracusa.it -sr.it -sondrio.it -so.it -taranto.it -ta.it -tempio-olbia.it -tempioolbia.it -olbia-tempio.it -olbiatempio.it -ot.it -teramo.it -te.it -terni.it -tr.it -torino.it -turin.it -to.it -trapani.it -tp.it -trento.it -trentino.it -tn.it -treviso.it -tv.it -trieste.it -ts.it -udine.it -ud.it -varese.it -va.it -venezia.it -venice.it -ve.it -verbania.it -vb.it -vercelli.it -vc.it -verona.it -vr.it -vibo-valentia.it -vibovalentia.it -vv.it -vicenza.it -vi.it -viterbo.it -vt.it - -// je : http://www.channelisles.net/applic/avextn.shtml -je -co.je -org.je -net.je -sch.je -gov.je - -// jm : http://www.com.jm/register.html -*.jm - -// jo : http://www.dns.jo/Registration_policy.aspx -jo -com.jo -org.jo -net.jo -edu.jo -sch.jo -gov.jo -mil.jo -name.jo - -// jobs : http://en.wikipedia.org/wiki/.jobs -jobs - -// jp : http://en.wikipedia.org/wiki/.jp -// http://jprs.co.jp/en/jpdomain.html -// Submitted by registry <yone@jprs.co.jp> 2008-06-11 -// Updated by registry <yone@jprs.co.jp> 2008-12-04 -jp -// jp organizational type names -ac.jp -ad.jp -co.jp -ed.jp -go.jp -gr.jp -lg.jp -ne.jp -or.jp -// jp geographic type names -// http://jprs.jp/doc/rule/saisoku-1.html -*.aichi.jp -*.akita.jp -*.aomori.jp -*.chiba.jp -*.ehime.jp -*.fukui.jp -*.fukuoka.jp -*.fukushima.jp -*.gifu.jp -*.gunma.jp -*.hiroshima.jp -*.hokkaido.jp -*.hyogo.jp -*.ibaraki.jp -*.ishikawa.jp -*.iwate.jp -*.kagawa.jp -*.kagoshima.jp -*.kanagawa.jp -*.kawasaki.jp -*.kitakyushu.jp -*.kobe.jp -*.kochi.jp -*.kumamoto.jp -*.kyoto.jp -*.mie.jp -*.miyagi.jp -*.miyazaki.jp -*.nagano.jp -*.nagasaki.jp -*.nagoya.jp -*.nara.jp -*.niigata.jp -*.oita.jp -*.okayama.jp -*.okinawa.jp -*.osaka.jp -*.saga.jp -*.saitama.jp -*.sapporo.jp -*.sendai.jp -*.shiga.jp -*.shimane.jp -*.shizuoka.jp -*.tochigi.jp -*.tokushima.jp -*.tokyo.jp -*.tottori.jp -*.toyama.jp -*.wakayama.jp -*.yamagata.jp -*.yamaguchi.jp -*.yamanashi.jp -*.yokohama.jp -!metro.tokyo.jp -!pref.aichi.jp -!pref.akita.jp -!pref.aomori.jp -!pref.chiba.jp -!pref.ehime.jp -!pref.fukui.jp -!pref.fukuoka.jp -!pref.fukushima.jp -!pref.gifu.jp -!pref.gunma.jp -!pref.hiroshima.jp -!pref.hokkaido.jp -!pref.hyogo.jp -!pref.ibaraki.jp -!pref.ishikawa.jp -!pref.iwate.jp -!pref.kagawa.jp -!pref.kagoshima.jp -!pref.kanagawa.jp -!pref.kochi.jp -!pref.kumamoto.jp -!pref.kyoto.jp -!pref.mie.jp -!pref.miyagi.jp -!pref.miyazaki.jp -!pref.nagano.jp -!pref.nagasaki.jp -!pref.nara.jp -!pref.niigata.jp -!pref.oita.jp -!pref.okayama.jp -!pref.okinawa.jp -!pref.osaka.jp -!pref.saga.jp -!pref.saitama.jp -!pref.shiga.jp -!pref.shimane.jp -!pref.shizuoka.jp -!pref.tochigi.jp -!pref.tokushima.jp -!pref.tottori.jp -!pref.toyama.jp -!pref.wakayama.jp -!pref.yamagata.jp -!pref.yamaguchi.jp -!pref.yamanashi.jp -!city.chiba.jp -!city.fukuoka.jp -!city.hiroshima.jp -!city.kawasaki.jp -!city.kitakyushu.jp -!city.kobe.jp -!city.kyoto.jp -!city.nagoya.jp -!city.niigata.jp -!city.okayama.jp -!city.osaka.jp -!city.saitama.jp -!city.sapporo.jp -!city.sendai.jp -!city.shizuoka.jp -!city.yokohama.jp - -// ke : http://www.kenic.or.ke/index.php?option=com_content&task=view&id=117&Itemid=145 -*.ke - -// kg : http://www.domain.kg/dmn_n.html -kg -org.kg -net.kg -com.kg -edu.kg -gov.kg -mil.kg - -// kh : http://www.mptc.gov.kh/dns_registration.htm -*.kh - -// ki : http://www.ki/dns/index.html -ki -edu.ki -biz.ki -net.ki -org.ki -gov.ki -info.ki -com.ki - -// km : http://en.wikipedia.org/wiki/.km -// http://www.domaine.km/documents/charte.doc -km -org.km -nom.km -gov.km -prd.km -tm.km -edu.km -mil.km -ass.km -com.km -// These are only mentioned as proposed suggestions at domaine.km, but -// http://en.wikipedia.org/wiki/.km says they're available for registration: -coop.km -asso.km -presse.km -medecin.km -notaires.km -pharmaciens.km -veterinaire.km -gouv.km - -// kn : http://en.wikipedia.org/wiki/.kn -// http://www.dot.kn/domainRules.html -kn -net.kn -org.kn -edu.kn -gov.kn - -// kp : http://www.kcce.kp/en_index.php -com.kp -edu.kp -gov.kp -org.kp -rep.kp -tra.kp - -// kr : http://en.wikipedia.org/wiki/.kr -// see also: http://domain.nida.or.kr/eng/registration.jsp -kr -ac.kr -co.kr -es.kr -go.kr -hs.kr -kg.kr -mil.kr -ms.kr -ne.kr -or.kr -pe.kr -re.kr -sc.kr -// kr geographical names -busan.kr -chungbuk.kr -chungnam.kr -daegu.kr -daejeon.kr -gangwon.kr -gwangju.kr -gyeongbuk.kr -gyeonggi.kr -gyeongnam.kr -incheon.kr -jeju.kr -jeonbuk.kr -jeonnam.kr -seoul.kr -ulsan.kr - -// kw : http://en.wikipedia.org/wiki/.kw -*.kw - -// ky : http://www.icta.ky/da_ky_reg_dom.php -// Confirmed by registry <kysupport@perimeterusa.com> 2008-06-17 -ky -edu.ky -gov.ky -com.ky -org.ky -net.ky - -// kz : http://en.wikipedia.org/wiki/.kz -// see also: http://www.nic.kz/rules/index.jsp -kz -org.kz -edu.kz -net.kz -gov.kz -mil.kz -com.kz - -// la : http://en.wikipedia.org/wiki/.la -// Submitted by registry <gavin.brown@nic.la> 2008-06-10 -la -int.la -net.la -info.la -edu.la -gov.la -per.la -com.la -org.la - -// lb : http://en.wikipedia.org/wiki/.lb -// Submitted by registry <randy@psg.com> 2008-06-17 -com.lb -edu.lb -gov.lb -net.lb -org.lb - -// lc : http://en.wikipedia.org/wiki/.lc -// see also: http://www.nic.lc/rules.htm -lc -com.lc -net.lc -co.lc -org.lc -edu.lc -gov.lc - -// li : http://en.wikipedia.org/wiki/.li -li - -// lk : http://www.nic.lk/seclevpr.html -lk -gov.lk -sch.lk -net.lk -int.lk -com.lk -org.lk -edu.lk -ngo.lk -soc.lk -web.lk -ltd.lk -assn.lk -grp.lk -hotel.lk - -// lr : http://psg.com/dns/lr/lr.txt -// Submitted by registry <randy@psg.com> 2008-06-17 -com.lr -edu.lr -gov.lr -org.lr -net.lr - -// ls : http://en.wikipedia.org/wiki/.ls -ls -co.ls -org.ls - -// lt : http://en.wikipedia.org/wiki/.lt -lt -// gov.lt : http://www.gov.lt/index_en.php -gov.lt - -// lu : http://www.dns.lu/en/ -lu - -// lv : http://www.nic.lv/DNS/En/generic.php -lv -com.lv -edu.lv -gov.lv -org.lv -mil.lv -id.lv -net.lv -asn.lv -conf.lv - -// ly : http://www.nic.ly/regulations.php -ly -com.ly -net.ly -gov.ly -plc.ly -edu.ly -sch.ly -med.ly -org.ly -id.ly - -// ma : http://en.wikipedia.org/wiki/.ma -// http://www.anrt.ma/fr/admin/download/upload/file_fr782.pdf -ma -co.ma -net.ma -gov.ma -org.ma -ac.ma -press.ma - -// mc : http://www.nic.mc/ -mc -tm.mc -asso.mc - -// md : http://en.wikipedia.org/wiki/.md -md - -// me : http://en.wikipedia.org/wiki/.me -me -co.me -net.me -org.me -edu.me -ac.me -gov.me -its.me -priv.me - -// mg : http://www.nic.mg/tarif.htm -mg -org.mg -nom.mg -gov.mg -prd.mg -tm.mg -edu.mg -mil.mg -com.mg - -// mh : http://en.wikipedia.org/wiki/.mh -mh - -// mil : http://en.wikipedia.org/wiki/.mil -mil - -// mk : http://en.wikipedia.org/wiki/.mk -// see also: http://dns.marnet.net.mk/postapka.php -mk -com.mk -org.mk -net.mk -edu.mk -gov.mk -inf.mk -name.mk - -// ml : http://www.gobin.info/domainname/ml-template.doc -// see also: http://en.wikipedia.org/wiki/.ml -ml -com.ml -edu.ml -gouv.ml -gov.ml -net.ml -org.ml -presse.ml - -// mm : http://en.wikipedia.org/wiki/.mm -*.mm - -// mn : http://en.wikipedia.org/wiki/.mn -mn -gov.mn -edu.mn -org.mn - -// mo : http://www.monic.net.mo/ -mo -com.mo -net.mo -org.mo -edu.mo -gov.mo - -// mobi : http://en.wikipedia.org/wiki/.mobi -mobi - -// mp : http://www.dot.mp/ -// Confirmed by registry <dcamacho@saipan.com> 2008-06-17 -mp - -// mq : http://en.wikipedia.org/wiki/.mq -mq - -// mr : http://en.wikipedia.org/wiki/.mr -mr -gov.mr - -// ms : http://en.wikipedia.org/wiki/.ms -ms - -// mt : https://www.nic.org.mt/dotmt/ -*.mt - -// mu : http://en.wikipedia.org/wiki/.mu -mu -com.mu -net.mu -org.mu -gov.mu -ac.mu -co.mu -or.mu - -// museum : http://about.museum/naming/ -// http://index.museum/ -museum -academy.museum -agriculture.museum -air.museum -airguard.museum -alabama.museum -alaska.museum -amber.museum -ambulance.museum -american.museum -americana.museum -americanantiques.museum -americanart.museum -amsterdam.museum -and.museum -annefrank.museum -anthro.museum -anthropology.museum -antiques.museum -aquarium.museum -arboretum.museum -archaeological.museum -archaeology.museum -architecture.museum -art.museum -artanddesign.museum -artcenter.museum -artdeco.museum -arteducation.museum -artgallery.museum -arts.museum -artsandcrafts.museum -asmatart.museum -assassination.museum -assisi.museum -association.museum -astronomy.museum -atlanta.museum -austin.museum -australia.museum -automotive.museum -aviation.museum -axis.museum -badajoz.museum -baghdad.museum -bahn.museum -bale.museum -baltimore.museum -barcelona.museum -baseball.museum -basel.museum -baths.museum -bauern.museum -beauxarts.museum -beeldengeluid.museum -bellevue.museum -bergbau.museum -berkeley.museum -berlin.museum -bern.museum -bible.museum -bilbao.museum -bill.museum -birdart.museum -birthplace.museum -bonn.museum -boston.museum -botanical.museum -botanicalgarden.museum -botanicgarden.museum -botany.museum -brandywinevalley.museum -brasil.museum -bristol.museum -british.museum -britishcolumbia.museum -broadcast.museum -brunel.museum -brussel.museum -brussels.museum -bruxelles.museum -building.museum -burghof.museum -bus.museum -bushey.museum -cadaques.museum -california.museum -cambridge.museum -can.museum -canada.museum -capebreton.museum -carrier.museum -cartoonart.museum -casadelamoneda.museum -castle.museum -castres.museum -celtic.museum -center.museum -chattanooga.museum -cheltenham.museum -chesapeakebay.museum -chicago.museum -children.museum -childrens.museum -childrensgarden.museum -chiropractic.museum -chocolate.museum -christiansburg.museum -cincinnati.museum -cinema.museum -circus.museum -civilisation.museum -civilization.museum -civilwar.museum -clinton.museum -clock.museum -coal.museum -coastaldefence.museum -cody.museum -coldwar.museum -collection.museum -colonialwilliamsburg.museum -coloradoplateau.museum -columbia.museum -columbus.museum -communication.museum -communications.museum -community.museum -computer.museum -computerhistory.museum -comunicações.museum -contemporary.museum -contemporaryart.museum -convent.museum -copenhagen.museum -corporation.museum -correios-e-telecomunicações.museum -corvette.museum -costume.museum -countryestate.museum -county.museum -crafts.museum -cranbrook.museum -creation.museum -cultural.museum -culturalcenter.museum -culture.museum -cyber.museum -cymru.museum -dali.museum -dallas.museum -database.museum -ddr.museum -decorativearts.museum -delaware.museum -delmenhorst.museum -denmark.museum -depot.museum -design.museum -detroit.museum -dinosaur.museum -discovery.museum -dolls.museum -donostia.museum -durham.museum -eastafrica.museum -eastcoast.museum -education.museum -educational.museum -egyptian.museum -eisenbahn.museum -elburg.museum -elvendrell.museum -embroidery.museum -encyclopedic.museum -england.museum -entomology.museum -environment.museum -environmentalconservation.museum -epilepsy.museum -essex.museum -estate.museum -ethnology.museum -exeter.museum -exhibition.museum -family.museum -farm.museum -farmequipment.museum -farmers.museum -farmstead.museum -field.museum -figueres.museum -filatelia.museum -film.museum -fineart.museum -finearts.museum -finland.museum -flanders.museum -florida.museum -force.museum -fortmissoula.museum -fortworth.museum -foundation.museum -francaise.museum -frankfurt.museum -franziskaner.museum -freemasonry.museum -freiburg.museum -fribourg.museum -frog.museum -fundacio.museum -furniture.museum -gallery.museum -garden.museum -gateway.museum -geelvinck.museum -gemological.museum -geology.museum -georgia.museum -giessen.museum -glas.museum -glass.museum -gorge.museum -grandrapids.museum -graz.museum -guernsey.museum -halloffame.museum -hamburg.museum -handson.museum -harvestcelebration.museum -hawaii.museum -health.museum -heimatunduhren.museum -hellas.museum -helsinki.museum -hembygdsforbund.museum -heritage.museum -histoire.museum -historical.museum -historicalsociety.museum -historichouses.museum -historisch.museum -historisches.museum -history.museum -historyofscience.museum -horology.museum -house.museum -humanities.museum -illustration.museum -imageandsound.museum -indian.museum -indiana.museum -indianapolis.museum -indianmarket.museum -intelligence.museum -interactive.museum -iraq.museum -iron.museum -isleofman.museum -jamison.museum -jefferson.museum -jerusalem.museum -jewelry.museum -jewish.museum -jewishart.museum -jfk.museum -journalism.museum -judaica.museum -judygarland.museum -juedisches.museum -juif.museum -karate.museum -karikatur.museum -kids.museum -koebenhavn.museum -koeln.museum -kunst.museum -kunstsammlung.museum -kunstunddesign.museum -labor.museum -labour.museum -lajolla.museum -lancashire.museum -landes.museum -lans.museum -läns.museum -larsson.museum -lewismiller.museum -lincoln.museum -linz.museum -living.museum -livinghistory.museum -localhistory.museum -london.museum -losangeles.museum -louvre.museum -loyalist.museum -lucerne.museum -luxembourg.museum -luzern.museum -mad.museum -madrid.museum -mallorca.museum -manchester.museum -mansion.museum -mansions.museum -manx.museum -marburg.museum -maritime.museum -maritimo.museum -maryland.museum -marylhurst.museum -media.museum -medical.museum -medizinhistorisches.museum -meeres.museum -memorial.museum -mesaverde.museum -michigan.museum -midatlantic.museum -military.museum -mill.museum -miners.museum -mining.museum -minnesota.museum -missile.museum -missoula.museum -modern.museum -moma.museum -money.museum -monmouth.museum -monticello.museum -montreal.museum -moscow.museum -motorcycle.museum -muenchen.museum -muenster.museum -mulhouse.museum -muncie.museum -museet.museum -museumcenter.museum -museumvereniging.museum -music.museum -national.museum -nationalfirearms.museum -nationalheritage.museum -nativeamerican.museum -naturalhistory.museum -naturalhistorymuseum.museum -naturalsciences.museum -nature.museum -naturhistorisches.museum -natuurwetenschappen.museum -naumburg.museum -naval.museum -nebraska.museum -neues.museum -newhampshire.museum -newjersey.museum -newmexico.museum -newport.museum -newspaper.museum -newyork.museum -niepce.museum -norfolk.museum -north.museum -nrw.museum -nuernberg.museum -nuremberg.museum -nyc.museum -nyny.museum -oceanographic.museum -oceanographique.museum -omaha.museum -online.museum -ontario.museum -openair.museum -oregon.museum -oregontrail.museum -otago.museum -oxford.museum -pacific.museum -paderborn.museum -palace.museum -paleo.museum -palmsprings.museum -panama.museum -paris.museum -pasadena.museum -pharmacy.museum -philadelphia.museum -philadelphiaarea.museum -philately.museum -phoenix.museum -photography.museum -pilots.museum -pittsburgh.museum -planetarium.museum -plantation.museum -plants.museum -plaza.museum -portal.museum -portland.museum -portlligat.museum -posts-and-telecommunications.museum -preservation.museum -presidio.museum -press.museum -project.museum -public.museum -pubol.museum -quebec.museum -railroad.museum -railway.museum -research.museum -resistance.museum -riodejaneiro.museum -rochester.museum -rockart.museum -roma.museum -russia.museum -saintlouis.museum -salem.museum -salvadordali.museum -salzburg.museum -sandiego.museum -sanfrancisco.museum -santabarbara.museum -santacruz.museum -santafe.museum -saskatchewan.museum -satx.museum -savannahga.museum -schlesisches.museum -schoenbrunn.museum -schokoladen.museum -school.museum -schweiz.museum -science.museum -scienceandhistory.museum -scienceandindustry.museum -sciencecenter.museum -sciencecenters.museum -science-fiction.museum -sciencehistory.museum -sciences.museum -sciencesnaturelles.museum -scotland.museum -seaport.museum -settlement.museum -settlers.museum -shell.museum -sherbrooke.museum -sibenik.museum -silk.museum -ski.museum -skole.museum -society.museum -sologne.museum -soundandvision.museum -southcarolina.museum -southwest.museum -space.museum -spy.museum -square.museum -stadt.museum -stalbans.museum -starnberg.museum -state.museum -stateofdelaware.museum -station.museum -steam.museum -steiermark.museum -stjohn.museum -stockholm.museum -stpetersburg.museum -stuttgart.museum -suisse.museum -surgeonshall.museum -surrey.museum -svizzera.museum -sweden.museum -sydney.museum -tank.museum -tcm.museum -technology.museum -telekommunikation.museum -television.museum -texas.museum -textile.museum -theater.museum -time.museum -timekeeping.museum -topology.museum -torino.museum -touch.museum -town.museum -transport.museum -tree.museum -trolley.museum -trust.museum -trustee.museum -uhren.museum -ulm.museum -undersea.museum -university.museum -usa.museum -usantiques.museum -usarts.museum -uscountryestate.museum -usculture.museum -usdecorativearts.museum -usgarden.museum -ushistory.museum -ushuaia.museum -uslivinghistory.museum -utah.museum -uvic.museum -valley.museum -vantaa.museum -versailles.museum -viking.museum -village.museum -virginia.museum -virtual.museum -virtuel.museum -vlaanderen.museum -volkenkunde.museum -wales.museum -wallonie.museum -war.museum -washingtondc.museum -watchandclock.museum -watch-and-clock.museum -western.museum -westfalen.museum -whaling.museum -wildlife.museum -williamsburg.museum -windmill.museum -workshop.museum -york.museum -yorkshire.museum -yosemite.museum -youth.museum -zoological.museum -zoology.museum -ירושלים.museum -иком.museum - -// mv : http://en.wikipedia.org/wiki/.mv -// "mv" included because, contra Wikipedia, google.mv exists. -mv -aero.mv -biz.mv -com.mv -coop.mv -edu.mv -gov.mv -info.mv -int.mv -mil.mv -museum.mv -name.mv -net.mv -org.mv -pro.mv - -// mw : http://www.registrar.mw/ -mw -ac.mw -biz.mw -co.mw -com.mw -coop.mw -edu.mw -gov.mw -int.mw -museum.mw -net.mw -org.mw - -// mx : http://www.nic.mx/ -// Submitted by registry <farias@nic.mx> 2008-06-19 -mx -com.mx -org.mx -gob.mx -edu.mx -net.mx - -// my : http://www.mynic.net.my/ -my -com.my -net.my -org.my -gov.my -edu.my -mil.my -name.my - -// mz : http://www.gobin.info/domainname/mz-template.doc -*.mz - -// na : http://www.na-nic.com.na/ -// http://www.info.na/domain/ -na -info.na -pro.na -name.na -school.na -or.na -dr.na -us.na -mx.na -ca.na -in.na -cc.na -tv.na -ws.na -mobi.na -co.na -com.na -org.na - -// name : has 2nd-level tlds, but there's no list of them -name - -// nc : http://www.cctld.nc/ -nc -asso.nc - -// ne : http://en.wikipedia.org/wiki/.ne -ne - -// net : http://en.wikipedia.org/wiki/.net -net - -// nf : http://en.wikipedia.org/wiki/.nf -nf -com.nf -net.nf -per.nf -rec.nf -web.nf -arts.nf -firm.nf -info.nf -other.nf -store.nf - -// ng : http://psg.com/dns/ng/ -// Submitted by registry <randy@psg.com> 2008-06-17 -ac.ng -com.ng -edu.ng -gov.ng -net.ng -org.ng - -// ni : http://www.nic.ni/dominios.htm -*.ni - -// nl : http://www.domain-registry.nl/ace.php/c,728,122,,,,Home.html -// Confirmed by registry <Antoin.Verschuren@sidn.nl> (with technical -// reservations) 2008-06-08 -nl - -// BV.nl will be a registry for dutch BV's (besloten vennootschap) -bv.nl - -// no : http://www.norid.no/regelverk/index.en.html -// The Norwegian registry has declined to notify us of updates. The web pages -// referenced below are the official source of the data. There is also an -// announce mailing list: -// https://postlister.uninett.no/sympa/info/norid-diskusjon -no -// Norid generic domains : http://www.norid.no/regelverk/vedlegg-c.en.html -fhs.no -vgs.no -fylkesbibl.no -folkebibl.no -museum.no -idrett.no -priv.no -// Non-Norid generic domains : http://www.norid.no/regelverk/vedlegg-d.en.html -mil.no -stat.no -dep.no -kommune.no -herad.no -// no geographical names : http://www.norid.no/regelverk/vedlegg-b.en.html -// counties -aa.no -ah.no -bu.no -fm.no -hl.no -hm.no -jan-mayen.no -mr.no -nl.no -nt.no -of.no -ol.no -oslo.no -rl.no -sf.no -st.no -svalbard.no -tm.no -tr.no -va.no -vf.no -// primary and lower secondary schools per county -gs.aa.no -gs.ah.no -gs.bu.no -gs.fm.no -gs.hl.no -gs.hm.no -gs.jan-mayen.no -gs.mr.no -gs.nl.no -gs.nt.no -gs.of.no -gs.ol.no -gs.oslo.no -gs.rl.no -gs.sf.no -gs.st.no -gs.svalbard.no -gs.tm.no -gs.tr.no -gs.va.no -gs.vf.no -// cities -akrehamn.no -åkrehamn.no -algard.no -ålgård.no -arna.no -brumunddal.no -bryne.no -bronnoysund.no -brønnøysund.no -drobak.no -drøbak.no -egersund.no -fetsund.no -floro.no -florø.no -fredrikstad.no -hokksund.no -honefoss.no -hønefoss.no -jessheim.no -jorpeland.no -jørpeland.no -kirkenes.no -kopervik.no -krokstadelva.no -langevag.no -langevåg.no -leirvik.no -mjondalen.no -mjøndalen.no -mo-i-rana.no -mosjoen.no -mosjøen.no -nesoddtangen.no -orkanger.no -osoyro.no -osøyro.no -raholt.no -råholt.no -sandnessjoen.no -sandnessjøen.no -skedsmokorset.no -slattum.no -spjelkavik.no -stathelle.no -stavern.no -stjordalshalsen.no -stjørdalshalsen.no -tananger.no -tranby.no -vossevangen.no -// communities -afjord.no -åfjord.no -agdenes.no -al.no -ål.no -alesund.no -ålesund.no -alstahaug.no -alta.no -áltá.no -alaheadju.no -álaheadju.no -alvdal.no -amli.no -åmli.no -amot.no -åmot.no -andebu.no -andoy.no -andøy.no -andasuolo.no -ardal.no -årdal.no -aremark.no -arendal.no -ås.no -aseral.no -åseral.no -asker.no -askim.no -askvoll.no -askoy.no -askøy.no -asnes.no -åsnes.no -audnedaln.no -aukra.no -aure.no -aurland.no -aurskog-holand.no -aurskog-høland.no -austevoll.no -austrheim.no -averoy.no -averøy.no -balestrand.no -ballangen.no -balat.no -bálát.no -balsfjord.no -bahccavuotna.no -báhccavuotna.no -bamble.no -bardu.no -beardu.no -beiarn.no -bajddar.no -bájddar.no -baidar.no -báidár.no -berg.no -bergen.no -berlevag.no -berlevåg.no -bearalvahki.no -bearalváhki.no -bindal.no -birkenes.no -bjarkoy.no -bjarkøy.no -bjerkreim.no -bjugn.no -bodo.no -bodø.no -badaddja.no -bådåddjå.no -budejju.no -bokn.no -bremanger.no -bronnoy.no -brønnøy.no -bygland.no -bykle.no -barum.no -bærum.no -bo.telemark.no -bø.telemark.no -bo.nordland.no -bø.nordland.no -bievat.no -bievát.no -bomlo.no -bømlo.no -batsfjord.no -båtsfjord.no -bahcavuotna.no -báhcavuotna.no -dovre.no -drammen.no -drangedal.no -dyroy.no -dyrøy.no -donna.no -dønna.no -eid.no -eidfjord.no -eidsberg.no -eidskog.no -eidsvoll.no -eigersund.no -elverum.no -enebakk.no -engerdal.no -etne.no -etnedal.no -evenes.no -evenassi.no -evenášši.no -evje-og-hornnes.no -farsund.no -fauske.no -fuossko.no -fuoisku.no -fedje.no -fet.no -finnoy.no -finnøy.no -fitjar.no -fjaler.no -fjell.no -flakstad.no -flatanger.no -flekkefjord.no -flesberg.no -flora.no -fla.no -flå.no -folldal.no -forsand.no -fosnes.no -frei.no -frogn.no -froland.no -frosta.no -frana.no -fræna.no -froya.no -frøya.no -fusa.no -fyresdal.no -forde.no -førde.no -gamvik.no -gangaviika.no -gáŋgaviika.no -gaular.no -gausdal.no -gildeskal.no -gildeskål.no -giske.no -gjemnes.no -gjerdrum.no -gjerstad.no -gjesdal.no -gjovik.no -gjøvik.no -gloppen.no -gol.no -gran.no -grane.no -granvin.no -gratangen.no -grimstad.no -grong.no -kraanghke.no -kråanghke.no -grue.no -gulen.no -hadsel.no -halden.no -halsa.no -hamar.no -hamaroy.no -habmer.no -hábmer.no -hapmir.no -hápmir.no -hammerfest.no -hammarfeasta.no -hámmárfeasta.no -haram.no -hareid.no -harstad.no -hasvik.no -aknoluokta.no -ákŋoluokta.no -hattfjelldal.no -aarborte.no -haugesund.no -hemne.no -hemnes.no -hemsedal.no -heroy.more-og-romsdal.no -herøy.møre-og-romsdal.no -heroy.nordland.no -herøy.nordland.no -hitra.no -hjartdal.no -hjelmeland.no -hobol.no -hobøl.no -hof.no -hol.no -hole.no -holmestrand.no -holtalen.no -holtålen.no -hornindal.no -horten.no -hurdal.no -hurum.no -hvaler.no -hyllestad.no -hagebostad.no -hægebostad.no -hoyanger.no -høyanger.no -hoylandet.no -høylandet.no -ha.no -hå.no -ibestad.no -inderoy.no -inderøy.no -iveland.no -jevnaker.no -jondal.no -jolster.no -jølster.no -karasjok.no -karasjohka.no -kárášjohka.no -karlsoy.no -galsa.no -gálsá.no -karmoy.no -karmøy.no -kautokeino.no -guovdageaidnu.no -klepp.no -klabu.no -klæbu.no -kongsberg.no -kongsvinger.no -kragero.no -kragerø.no -kristiansand.no -kristiansund.no -krodsherad.no -krødsherad.no -kvalsund.no -rahkkeravju.no -ráhkkerávju.no -kvam.no -kvinesdal.no -kvinnherad.no -kviteseid.no -kvitsoy.no -kvitsøy.no -kvafjord.no -kvæfjord.no -giehtavuoatna.no -kvanangen.no -kvænangen.no -navuotna.no -návuotna.no -kafjord.no -kåfjord.no -gaivuotna.no -gáivuotna.no -larvik.no -lavangen.no -lavagis.no -loabat.no -loabát.no -lebesby.no -davvesiida.no -leikanger.no -leirfjord.no -leka.no -leksvik.no -lenvik.no -leangaviika.no -leaŋgaviika.no -lesja.no -levanger.no -lier.no -lierne.no -lillehammer.no -lillesand.no -lindesnes.no -lindas.no -lindås.no -lom.no -loppa.no -lahppi.no -láhppi.no -lund.no -lunner.no -luroy.no -lurøy.no -luster.no -lyngdal.no -lyngen.no -ivgu.no -lardal.no -lerdal.no -lærdal.no -lodingen.no -lødingen.no -lorenskog.no -lørenskog.no -loten.no -løten.no -malvik.no -masoy.no -måsøy.no -muosat.no -muosát.no -mandal.no -marker.no -marnardal.no -masfjorden.no -meland.no -meldal.no -melhus.no -meloy.no -meløy.no -meraker.no -meråker.no -moareke.no -moåreke.no -midsund.no -midtre-gauldal.no -modalen.no -modum.no -molde.no -moskenes.no -moss.no -mosvik.no -malselv.no -målselv.no -malatvuopmi.no -málatvuopmi.no -namdalseid.no -aejrie.no -namsos.no -namsskogan.no -naamesjevuemie.no -nååmesjevuemie.no -laakesvuemie.no -nannestad.no -narvik.no -narviika.no -naustdal.no -nedre-eiker.no -nes.akershus.no -nes.buskerud.no -nesna.no -nesodden.no -nesseby.no -unjarga.no -unjárga.no -nesset.no -nissedal.no -nittedal.no -nord-aurdal.no -nord-fron.no -nord-odal.no -norddal.no -nordkapp.no -davvenjarga.no -davvenjárga.no -nordre-land.no -nordreisa.no -raisa.no -ráisa.no -nore-og-uvdal.no -notodden.no -naroy.no -nærøy.no -notteroy.no -nøtterøy.no -odda.no -oksnes.no -øksnes.no -oppdal.no -oppegard.no -oppegård.no -orkdal.no -orland.no -ørland.no -orskog.no -ørskog.no -orsta.no -ørsta.no -os.hedmark.no -os.hordaland.no -osen.no -osteroy.no -osterøy.no -ostre-toten.no -østre-toten.no -overhalla.no -ovre-eiker.no -øvre-eiker.no -oyer.no -øyer.no -oygarden.no -øygarden.no -oystre-slidre.no -øystre-slidre.no -porsanger.no -porsangu.no -porsáŋgu.no -porsgrunn.no -radoy.no -radøy.no -rakkestad.no -rana.no -ruovat.no -randaberg.no -rauma.no -rendalen.no -rennebu.no -rennesoy.no -rennesøy.no -rindal.no -ringebu.no -ringerike.no -ringsaker.no -rissa.no -risor.no -risør.no -roan.no -rollag.no -rygge.no -ralingen.no -rælingen.no -rodoy.no -rødøy.no -romskog.no -rømskog.no -roros.no -røros.no -rost.no -røst.no -royken.no -røyken.no -royrvik.no -røyrvik.no -rade.no -råde.no -salangen.no -siellak.no -saltdal.no -salat.no -sálát.no -sálat.no -samnanger.no -sande.more-og-romsdal.no -sande.møre-og-romsdal.no -sande.vestfold.no -sandefjord.no -sandnes.no -sandoy.no -sandøy.no -sarpsborg.no -sauda.no -sauherad.no -sel.no -selbu.no -selje.no -seljord.no -sigdal.no -siljan.no -sirdal.no -skaun.no -skedsmo.no -ski.no -skien.no -skiptvet.no -skjervoy.no -skjervøy.no -skierva.no -skiervá.no -skjak.no -skjåk.no -skodje.no -skanland.no -skånland.no -skanit.no -skánit.no -smola.no -smøla.no -snillfjord.no -snasa.no -snåsa.no -snoasa.no -snaase.no -snåase.no -sogndal.no -sokndal.no -sola.no -solund.no -songdalen.no -sortland.no -spydeberg.no -stange.no -stavanger.no -steigen.no -steinkjer.no -stjordal.no -stjørdal.no -stokke.no -stor-elvdal.no -stord.no -stordal.no -storfjord.no -omasvuotna.no -strand.no -stranda.no -stryn.no -sula.no -suldal.no -sund.no -sunndal.no -surnadal.no -sveio.no -svelvik.no -sykkylven.no -sogne.no -søgne.no -somna.no -sømna.no -sondre-land.no -søndre-land.no -sor-aurdal.no -sør-aurdal.no -sor-fron.no -sør-fron.no -sor-odal.no -sør-odal.no -sor-varanger.no -sør-varanger.no -matta-varjjat.no -mátta-várjjat.no -sorfold.no -sørfold.no -sorreisa.no -sørreisa.no -sorum.no -sørum.no -tana.no -deatnu.no -time.no -tingvoll.no -tinn.no -tjeldsund.no -dielddanuorri.no -tjome.no -tjøme.no -tokke.no -tolga.no -torsken.no -tranoy.no -tranøy.no -tromso.no -tromsø.no -tromsa.no -romsa.no -trondheim.no -troandin.no -trysil.no -trana.no -træna.no -trogstad.no -trøgstad.no -tvedestrand.no -tydal.no -tynset.no -tysfjord.no -divtasvuodna.no -divttasvuotna.no -tysnes.no -tysvar.no -tysvær.no -tonsberg.no -tønsberg.no -ullensaker.no -ullensvang.no -ulvik.no -utsira.no -vadso.no -vadsø.no -cahcesuolo.no -čáhcesuolo.no -vaksdal.no -valle.no -vang.no -vanylven.no -vardo.no -vardø.no -varggat.no -várggát.no -vefsn.no -vaapste.no -vega.no -vegarshei.no -vegårshei.no -vennesla.no -verdal.no -verran.no -vestby.no -vestnes.no -vestre-slidre.no -vestre-toten.no -vestvagoy.no -vestvågøy.no -vevelstad.no -vik.no -vikna.no -vindafjord.no -volda.no -voss.no -varoy.no -værøy.no -vagan.no -vågan.no -voagat.no -vagsoy.no -vågsøy.no -vaga.no -vågå.no -valer.ostfold.no -våler.østfold.no -valer.hedmark.no -våler.hedmark.no - -// np : http://www.mos.com.np/register.html -*.np - -// nr : http://cenpac.net.nr/dns/index.html -// Confirmed by registry <technician@cenpac.net.nr> 2008-06-17 -nr -biz.nr -info.nr -gov.nr -edu.nr -org.nr -net.nr -com.nr - -// nu : http://en.wikipedia.org/wiki/.nu -nu - -// nz : http://en.wikipedia.org/wiki/.nz -*.nz - -// om : http://en.wikipedia.org/wiki/.om -*.om -!mediaphone.om -!nawrastelecom.om -!nawras.om -!omanmobile.om -!omanpost.om -!omantel.om -!rakpetroleum.om -!siemens.om -!songfest.om -!statecouncil.om - -// org : http://en.wikipedia.org/wiki/.org -org - -// pa : http://www.nic.pa/ -// Some additional second level "domains" resolve directly as hostnames, such as -// pannet.pa, so we add a rule for "pa". -pa -ac.pa -gob.pa -com.pa -org.pa -sld.pa -edu.pa -net.pa -ing.pa -abo.pa -med.pa -nom.pa - -// pe : https://www.nic.pe/InformeFinalComision.pdf -pe -edu.pe -gob.pe -nom.pe -mil.pe -org.pe -com.pe -net.pe - -// pf : http://www.gobin.info/domainname/formulaire-pf.pdf -pf -com.pf -org.pf -edu.pf - -// pg : http://en.wikipedia.org/wiki/.pg -*.pg - -// ph : http://www.domains.ph/FAQ2.asp -// Submitted by registry <jed@email.com.ph> 2008-06-13 -ph -com.ph -net.ph -org.ph -gov.ph -edu.ph -ngo.ph -mil.ph -i.ph - -// pk : http://pk5.pknic.net.pk/pk5/msgNamepk.PK -pk -com.pk -net.pk -edu.pk -org.pk -fam.pk -biz.pk -web.pk -gov.pk -gob.pk -gok.pk -gon.pk -gop.pk -gos.pk -info.pk - -// pl : http://www.dns.pl/english/ -pl -// NASK functional domains (nask.pl / dns.pl) : http://www.dns.pl/english/dns-funk.html -aid.pl -agro.pl -atm.pl -auto.pl -biz.pl -com.pl -edu.pl -gmina.pl -gsm.pl -info.pl -mail.pl -miasta.pl -media.pl -mil.pl -net.pl -nieruchomosci.pl -nom.pl -org.pl -pc.pl -powiat.pl -priv.pl -realestate.pl -rel.pl -sex.pl -shop.pl -sklep.pl -sos.pl -szkola.pl -targi.pl -tm.pl -tourism.pl -travel.pl -turystyka.pl -// ICM functional domains (icm.edu.pl) -6bone.pl -art.pl -mbone.pl -// Government domains (administred by ippt.gov.pl) -gov.pl -uw.gov.pl -um.gov.pl -ug.gov.pl -upow.gov.pl -starostwo.gov.pl -so.gov.pl -sr.gov.pl -po.gov.pl -pa.gov.pl -// other functional domains -ngo.pl -irc.pl -usenet.pl -// NASK geographical domains : http://www.dns.pl/english/dns-regiony.html -augustow.pl -babia-gora.pl -bedzin.pl -beskidy.pl -bialowieza.pl -bialystok.pl -bielawa.pl -bieszczady.pl -boleslawiec.pl -bydgoszcz.pl -bytom.pl -cieszyn.pl -czeladz.pl -czest.pl -dlugoleka.pl -elblag.pl -elk.pl -glogow.pl -gniezno.pl -gorlice.pl -grajewo.pl -ilawa.pl -jaworzno.pl -jelenia-gora.pl -jgora.pl -kalisz.pl -kazimierz-dolny.pl -karpacz.pl -kartuzy.pl -kaszuby.pl -katowice.pl -kepno.pl -ketrzyn.pl -klodzko.pl -kobierzyce.pl -kolobrzeg.pl -konin.pl -konskowola.pl -kutno.pl -lapy.pl -lebork.pl -legnica.pl -lezajsk.pl -limanowa.pl -lomza.pl -lowicz.pl -lubin.pl -lukow.pl -malbork.pl -malopolska.pl -mazowsze.pl -mazury.pl -mielec.pl -mielno.pl -mragowo.pl -naklo.pl -nowaruda.pl -nysa.pl -olawa.pl -olecko.pl -olkusz.pl -olsztyn.pl -opoczno.pl -opole.pl -ostroda.pl -ostroleka.pl -ostrowiec.pl -ostrowwlkp.pl -pila.pl -pisz.pl -podhale.pl -podlasie.pl -polkowice.pl -pomorze.pl -pomorskie.pl -prochowice.pl -pruszkow.pl -przeworsk.pl -pulawy.pl -radom.pl -rawa-maz.pl -rybnik.pl -rzeszow.pl -sanok.pl -sejny.pl -siedlce.pl -slask.pl -slupsk.pl -sosnowiec.pl -stalowa-wola.pl -skoczow.pl -starachowice.pl -stargard.pl -suwalki.pl -swidnica.pl -swiebodzin.pl -swinoujscie.pl -szczecin.pl -szczytno.pl -tarnobrzeg.pl -tgory.pl -turek.pl -tychy.pl -ustka.pl -walbrzych.pl -warmia.pl -warszawa.pl -waw.pl -wegrow.pl -wielun.pl -wlocl.pl -wloclawek.pl -wodzislaw.pl -wolomin.pl -wroclaw.pl -zachpomor.pl -zagan.pl -zarow.pl -zgora.pl -zgorzelec.pl -// TASK geographical domains (www.task.gda.pl/uslugi/dns) -gda.pl -gdansk.pl -gdynia.pl -med.pl -sopot.pl -// other geographical domains -gliwice.pl -krakow.pl -poznan.pl -wroc.pl -zakopane.pl - -// pm : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf -pm - -// pn : http://www.government.pn/PnRegistry/policies.htm -pn -gov.pn -co.pn -org.pn -edu.pn -net.pn - -// pr : http://www.nic.pr/index.asp?f=1 -pr -com.pr -net.pr -org.pr -gov.pr -edu.pr -isla.pr -pro.pr -biz.pr -info.pr -name.pr -// these aren't mentioned on nic.pr, but on http://en.wikipedia.org/wiki/.pr -est.pr -prof.pr -ac.pr - -// pro : http://www.nic.pro/support_faq.htm -pro -aca.pro -bar.pro -cpa.pro -jur.pro -law.pro -med.pro -eng.pro - -// ps : http://en.wikipedia.org/wiki/.ps -// http://www.nic.ps/registration/policy.html#reg -ps -edu.ps -gov.ps -sec.ps -plo.ps -com.ps -org.ps -net.ps - -// pt : http://online.dns.pt/dns/start_dns -pt -net.pt -gov.pt -org.pt -edu.pt -int.pt -publ.pt -com.pt -nome.pt - -// pw : http://en.wikipedia.org/wiki/.pw -pw -co.pw -ne.pw -or.pw -ed.pw -go.pw -belau.pw - -// py : http://www.nic.py/faq_a.html#faq_b -*.py - -// qa : http://domains.qa/en/ -qa -com.qa -edu.qa -gov.qa -mil.qa -name.qa -net.qa -org.qa -sch.qa - -// re : http://www.afnic.re/obtenir/chartes/nommage-re/annexe-descriptifs -re -com.re -asso.re -nom.re - -// ro : http://www.rotld.ro/ -ro -com.ro -org.ro -tm.ro -nt.ro -nom.ro -info.ro -rec.ro -arts.ro -firm.ro -store.ro -www.ro - -// rs : http://en.wikipedia.org/wiki/.rs -rs -co.rs -org.rs -edu.rs -ac.rs -gov.rs -in.rs - -// ru : http://www.cctld.ru/ru/docs/aktiv_8.php -// Industry domains -ru -ac.ru -com.ru -edu.ru -int.ru -net.ru -org.ru -pp.ru -// Geographical domains -adygeya.ru -altai.ru -amur.ru -arkhangelsk.ru -astrakhan.ru -bashkiria.ru -belgorod.ru -bir.ru -bryansk.ru -buryatia.ru -cbg.ru -chel.ru -chelyabinsk.ru -chita.ru -chukotka.ru -chuvashia.ru -dagestan.ru -dudinka.ru -e-burg.ru -grozny.ru -irkutsk.ru -ivanovo.ru -izhevsk.ru -jar.ru -joshkar-ola.ru -kalmykia.ru -kaluga.ru -kamchatka.ru -karelia.ru -kazan.ru -kchr.ru -kemerovo.ru -khabarovsk.ru -khakassia.ru -khv.ru -kirov.ru -koenig.ru -komi.ru -kostroma.ru -krasnoyarsk.ru -kuban.ru -kurgan.ru -kursk.ru -lipetsk.ru -magadan.ru -mari.ru -mari-el.ru -marine.ru -mordovia.ru -mosreg.ru -msk.ru -murmansk.ru -nalchik.ru -nnov.ru -nov.ru -novosibirsk.ru -nsk.ru -omsk.ru -orenburg.ru -oryol.ru -palana.ru -penza.ru -perm.ru -pskov.ru -ptz.ru -rnd.ru -ryazan.ru -sakhalin.ru -samara.ru -saratov.ru -simbirsk.ru -smolensk.ru -spb.ru -stavropol.ru -stv.ru -surgut.ru -tambov.ru -tatarstan.ru -tom.ru -tomsk.ru -tsaritsyn.ru -tsk.ru -tula.ru -tuva.ru -tver.ru -tyumen.ru -udm.ru -udmurtia.ru -ulan-ude.ru -vladikavkaz.ru -vladimir.ru -vladivostok.ru -volgograd.ru -vologda.ru -voronezh.ru -vrn.ru -vyatka.ru -yakutia.ru -yamal.ru -yaroslavl.ru -yekaterinburg.ru -yuzhno-sakhalinsk.ru -// More geographical domains -amursk.ru -baikal.ru -cmw.ru -fareast.ru -jamal.ru -kms.ru -k-uralsk.ru -kustanai.ru -kuzbass.ru -magnitka.ru -mytis.ru -nakhodka.ru -nkz.ru -norilsk.ru -oskol.ru -pyatigorsk.ru -rubtsovsk.ru -snz.ru -syzran.ru -vdonsk.ru -zgrad.ru -// State domains -gov.ru -mil.ru -// Technical domains -test.ru - -// rw : http://www.nic.rw/cgi-bin/policy.pl -rw -gov.rw -net.rw -edu.rw -ac.rw -com.rw -co.rw -int.rw -mil.rw -gouv.rw - -// sa : http://www.nic.net.sa/ -sa -com.sa -net.sa -org.sa -gov.sa -med.sa -pub.sa -edu.sa -sch.sa - -// sb : http://www.sbnic.net.sb/ -// Submitted by registry <lee.humphries@telekom.com.sb> 2008-06-08 -sb -com.sb -edu.sb -gov.sb -net.sb -org.sb - -// sc : http://www.nic.sc/ -sc -com.sc -gov.sc -net.sc -org.sc -edu.sc - -// sd : http://www.isoc.sd/sudanic.isoc.sd/billing_pricing.htm -// Submitted by registry <admin@isoc.sd> 2008-06-17 -sd -com.sd -net.sd -org.sd -edu.sd -med.sd -gov.sd -info.sd - -// se : http://en.wikipedia.org/wiki/.se -// Submitted by registry <Patrik.Wallstrom@iis.se> 2008-06-24 -se -a.se -ac.se -b.se -bd.se -brand.se -c.se -d.se -e.se -f.se -fh.se -fhsk.se -fhv.se -g.se -h.se -i.se -k.se -komforb.se -kommunalforbund.se -komvux.se -l.se -lanbib.se -m.se -n.se -naturbruksgymn.se -o.se -org.se -p.se -parti.se -pp.se -press.se -r.se -s.se -sshn.se -t.se -tm.se -u.se -w.se -x.se -y.se -z.se - -// sg : http://www.nic.net.sg/sub_policies_agreement/2ld.html -sg -com.sg -net.sg -org.sg -gov.sg -edu.sg -per.sg - -// sh : http://www.nic.sh/rules.html -// list of 2nd level domains ? -sh - -// si : http://en.wikipedia.org/wiki/.si -si - -// sj : No registrations at this time. -// Submitted by registry <jarle@uninett.no> 2008-06-16 - -// sk : http://en.wikipedia.org/wiki/.sk -// list of 2nd level domains ? -sk - -// sl : http://www.nic.sl -// Submitted by registry <adam@neoip.com> 2008-06-12 -sl -com.sl -net.sl -edu.sl -gov.sl -org.sl - -// sm : http://en.wikipedia.org/wiki/.sm -sm - -// sn : http://en.wikipedia.org/wiki/.sn -sn -art.sn -com.sn -edu.sn -gouv.sn -org.sn -perso.sn -univ.sn - -// so : http://www.soregistry.com/ -so -com.so -net.so -org.so - -// sr : http://en.wikipedia.org/wiki/.sr -sr - -// st : http://www.nic.st/html/policyrules/ -st -co.st -com.st -consulado.st -edu.st -embaixada.st -gov.st -mil.st -net.st -org.st -principe.st -saotome.st -store.st - -// su : http://en.wikipedia.org/wiki/.su -su - -// sv : http://www.svnet.org.sv/svpolicy.html -*.sv - -// sy : http://en.wikipedia.org/wiki/.sy -// see also: http://www.gobin.info/domainname/sy.doc -sy -edu.sy -gov.sy -net.sy -mil.sy -com.sy -org.sy - -// sz : http://en.wikipedia.org/wiki/.sz -// http://www.sispa.org.sz/ -sz -co.sz -ac.sz -org.sz - -// tc : http://en.wikipedia.org/wiki/.tc -tc - -// td : http://en.wikipedia.org/wiki/.td -td - -// tel: http://en.wikipedia.org/wiki/.tel -// http://www.telnic.org/ -tel - -// tf : http://en.wikipedia.org/wiki/.tf -tf - -// tg : http://en.wikipedia.org/wiki/.tg -// http://www.nic.tg/nictg/index.php implies no reserved 2nd-level domains, -// although this contradicts wikipedia. -tg - -// th : http://en.wikipedia.org/wiki/.th -// Submitted by registry <krit@thains.co.th> 2008-06-17 -th -ac.th -co.th -go.th -in.th -mi.th -net.th -or.th - -// tj : http://www.nic.tj/policy.htm -tj -ac.tj -biz.tj -co.tj -com.tj -edu.tj -go.tj -gov.tj -int.tj -mil.tj -name.tj -net.tj -nic.tj -org.tj -test.tj -web.tj - -// tk : http://en.wikipedia.org/wiki/.tk -tk - -// tl : http://en.wikipedia.org/wiki/.tl -tl -gov.tl - -// tm : http://www.nic.tm/rules.html -// list of 2nd level tlds ? -tm - -// tn : http://en.wikipedia.org/wiki/.tn -// http://whois.ati.tn/ -tn -com.tn -ens.tn -fin.tn -gov.tn -ind.tn -intl.tn -nat.tn -net.tn -org.tn -info.tn -perso.tn -tourism.tn -edunet.tn -rnrt.tn -rns.tn -rnu.tn -mincom.tn -agrinet.tn -defense.tn -turen.tn - -// to : http://en.wikipedia.org/wiki/.to -// Submitted by registry <egullich@colo.to> 2008-06-17 -to -com.to -gov.to -net.to -org.to -edu.to -mil.to - -// tr : http://en.wikipedia.org/wiki/.tr -*.tr -!nic.tr -// Used by government in the TRNC -// http://en.wikipedia.org/wiki/.nc.tr -gov.nc.tr - -// travel : http://en.wikipedia.org/wiki/.travel -travel - -// tt : http://www.nic.tt/ -tt -co.tt -com.tt -org.tt -net.tt -biz.tt -info.tt -pro.tt -int.tt -coop.tt -jobs.tt -mobi.tt -travel.tt -museum.tt -aero.tt -name.tt -gov.tt -edu.tt - -// tv : http://en.wikipedia.org/wiki/.tv -// Not listing any 2LDs as reserved since none seem to exist in practice, -// Wikipedia notwithstanding. -tv - -// tw : http://en.wikipedia.org/wiki/.tw -tw -edu.tw -gov.tw -mil.tw -com.tw -net.tw -org.tw -idv.tw -game.tw -ebiz.tw -club.tw -網路.tw -組織.tw -商業.tw - -// tz : http://en.wikipedia.org/wiki/.tz -// Submitted by registry <randy@psg.com> 2008-06-17 -// Updated from http://www.tznic.or.tz/index.php/domains.html 2010-10-25 -ac.tz -co.tz -go.tz -mil.tz -ne.tz -or.tz -sc.tz - -// ua : http://www.nic.net.ua/ -ua -com.ua -edu.ua -gov.ua -in.ua -net.ua -org.ua -// ua geo-names -cherkassy.ua -chernigov.ua -chernovtsy.ua -ck.ua -cn.ua -crimea.ua -cv.ua -dn.ua -dnepropetrovsk.ua -donetsk.ua -dp.ua -if.ua -ivano-frankivsk.ua -kh.ua -kharkov.ua -kherson.ua -khmelnitskiy.ua -kiev.ua -kirovograd.ua -km.ua -kr.ua -ks.ua -kv.ua -lg.ua -lugansk.ua -lutsk.ua -lviv.ua -mk.ua -nikolaev.ua -od.ua -odessa.ua -pl.ua -poltava.ua -rovno.ua -rv.ua -sebastopol.ua -sumy.ua -te.ua -ternopil.ua -uzhgorod.ua -vinnica.ua -vn.ua -zaporizhzhe.ua -zp.ua -zhitomir.ua -zt.ua - -// Private registries in .ua -co.ua -pp.ua - -// ug : http://www.registry.co.ug/ -ug -co.ug -ac.ug -sc.ug -go.ug -ne.ug -or.ug - -// uk : http://en.wikipedia.org/wiki/.uk -*.uk -*.sch.uk -!bl.uk -!british-library.uk -!icnet.uk -!jet.uk -!mod.uk -!nel.uk -!nhs.uk -!nic.uk -!nls.uk -!national-library-scotland.uk -!parliament.uk -!police.uk - -// us : http://en.wikipedia.org/wiki/.us -us -dni.us -fed.us -isa.us -kids.us -nsn.us -// us geographic names -ak.us -al.us -ar.us -as.us -az.us -ca.us -co.us -ct.us -dc.us -de.us -fl.us -ga.us -gu.us -hi.us -ia.us -id.us -il.us -in.us -ks.us -ky.us -la.us -ma.us -md.us -me.us -mi.us -mn.us -mo.us -ms.us -mt.us -nc.us -nd.us -ne.us -nh.us -nj.us -nm.us -nv.us -ny.us -oh.us -ok.us -or.us -pa.us -pr.us -ri.us -sc.us -sd.us -tn.us -tx.us -ut.us -vi.us -vt.us -va.us -wa.us -wi.us -wv.us -wy.us -// The registrar notes several more specific domains available in each state, -// such as state.*.us, dst.*.us, etc., but resolution of these is somewhat -// haphazard; in some states these domains resolve as addresses, while in others -// only subdomains are available, or even nothing at all. We include the -// most common ones where it's clear that different sites are different -// entities. -k12.ak.us -k12.al.us -k12.ar.us -k12.as.us -k12.az.us -k12.ca.us -k12.co.us -k12.ct.us -k12.dc.us -k12.de.us -k12.fl.us -k12.ga.us -k12.gu.us -// k12.hi.us Hawaii has a state-wide DOE login: bug 614565 -k12.ia.us -k12.id.us -k12.il.us -k12.in.us -k12.ks.us -k12.ky.us -k12.la.us -k12.ma.us -k12.md.us -k12.me.us -k12.mi.us -k12.mn.us -k12.mo.us -k12.ms.us -k12.mt.us -k12.nc.us -k12.nd.us -k12.ne.us -k12.nh.us -k12.nj.us -k12.nm.us -k12.nv.us -k12.ny.us -k12.oh.us -k12.ok.us -k12.or.us -k12.pa.us -k12.pr.us -k12.ri.us -k12.sc.us -k12.sd.us -k12.tn.us -k12.tx.us -k12.ut.us -k12.vi.us -k12.vt.us -k12.va.us -k12.wa.us -k12.wi.us -k12.wv.us -k12.wy.us - -cc.ak.us -cc.al.us -cc.ar.us -cc.as.us -cc.az.us -cc.ca.us -cc.co.us -cc.ct.us -cc.dc.us -cc.de.us -cc.fl.us -cc.ga.us -cc.gu.us -cc.hi.us -cc.ia.us -cc.id.us -cc.il.us -cc.in.us -cc.ks.us -cc.ky.us -cc.la.us -cc.ma.us -cc.md.us -cc.me.us -cc.mi.us -cc.mn.us -cc.mo.us -cc.ms.us -cc.mt.us -cc.nc.us -cc.nd.us -cc.ne.us -cc.nh.us -cc.nj.us -cc.nm.us -cc.nv.us -cc.ny.us -cc.oh.us -cc.ok.us -cc.or.us -cc.pa.us -cc.pr.us -cc.ri.us -cc.sc.us -cc.sd.us -cc.tn.us -cc.tx.us -cc.ut.us -cc.vi.us -cc.vt.us -cc.va.us -cc.wa.us -cc.wi.us -cc.wv.us -cc.wy.us - -lib.ak.us -lib.al.us -lib.ar.us -lib.as.us -lib.az.us -lib.ca.us -lib.co.us -lib.ct.us -lib.dc.us -lib.de.us -lib.fl.us -lib.ga.us -lib.gu.us -lib.hi.us -lib.ia.us -lib.id.us -lib.il.us -lib.in.us -lib.ks.us -lib.ky.us -lib.la.us -lib.ma.us -lib.md.us -lib.me.us -lib.mi.us -lib.mn.us -lib.mo.us -lib.ms.us -lib.mt.us -lib.nc.us -lib.nd.us -lib.ne.us -lib.nh.us -lib.nj.us -lib.nm.us -lib.nv.us -lib.ny.us -lib.oh.us -lib.ok.us -lib.or.us -lib.pa.us -lib.pr.us -lib.ri.us -lib.sc.us -lib.sd.us -lib.tn.us -lib.tx.us -lib.ut.us -lib.vi.us -lib.vt.us -lib.va.us -lib.wa.us -lib.wi.us -lib.wv.us -lib.wy.us - -// k12.ma.us contains school districts in Massachusetts. The 4LDs are -// managed indepedently except for private (PVT), charter (CHTR) and -// parochial (PAROCH) schools. Those are delegated dorectly to the -// 5LD operators. <k12-ma-hostmaster _ at _ rsuc.gweep.net> -pvt.k12.ma.us -chtr.k12.ma.us -paroch.k12.ma.us - -// uy : http://www.antel.com.uy/ -*.uy - -// uz : http://www.reg.uz/registerr.html -// are there other 2nd level tlds ? -uz -com.uz -co.uz - -// va : http://en.wikipedia.org/wiki/.va -va - -// vc : http://en.wikipedia.org/wiki/.vc -// Submitted by registry <kshah@ca.afilias.info> 2008-06-13 -vc -com.vc -net.vc -org.vc -gov.vc -mil.vc -edu.vc - -// ve : http://registro.nic.ve/nicve/registro/index.html -*.ve - -// vg : http://en.wikipedia.org/wiki/.vg -vg - -// vi : http://www.nic.vi/newdomainform.htm -// http://www.nic.vi/Domain_Rules/body_domain_rules.html indicates some other -// TLDs are "reserved", such as edu.vi and gov.vi, but doesn't actually say they -// are available for registration (which they do not seem to be). -vi -co.vi -com.vi -k12.vi -net.vi -org.vi - -// vn : https://www.dot.vn/vnnic/vnnic/domainregistration.jsp -vn -com.vn -net.vn -org.vn -edu.vn -gov.vn -int.vn -ac.vn -biz.vn -info.vn -name.vn -pro.vn -health.vn - -// vu : http://en.wikipedia.org/wiki/.vu -// list of 2nd level tlds ? -vu - -// wf : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf -wf - -// ws : http://en.wikipedia.org/wiki/.ws -// http://samoanic.ws/index.dhtml -ws -com.ws -net.ws -org.ws -gov.ws -edu.ws - -// yt : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf -yt - -// IDN ccTLDs -// Please sort by ISO 3166 ccTLD, then punicode string -// when submitting patches and follow this format: -// <Punicode> ("<english word>" <language>) : <ISO 3166 ccTLD> -// [optional sponsoring org] -// <URL> - -// xn--mgbaam7a8h ("Emerat" Arabic) : AE -//http://nic.ae/english/arabicdomain/rules.jsp -امارات - -// xn--54b7fta0cc ("Bangla" Bangla) : BD -বাংলা - -// xn--fiqs8s ("China" Chinese-Han-Simplified <.Zhonggou>) : CN -// CNNIC -// http://cnnic.cn/html/Dir/2005/10/11/3218.htm -中国 - -// xn--fiqz9s ("China" Chinese-Han-Traditional <.Zhonggou>) : CN -// CNNIC -// http://cnnic.cn/html/Dir/2005/10/11/3218.htm -中國 - -// xn--lgbbat1ad8j ("Algeria / Al Jazair" Arabic) : DZ -الجزائر - -// xn--wgbh1c ("Egypt" Arabic .masr) : EG -// http://www.dotmasr.eg/ -مصر - -// xn--node ("ge" Georgian (Mkhedruli)) : GE -გე - -// xn--j6w193g ("Hong Kong" Chinese-Han) : HK -// https://www2.hkirc.hk/register/rules.jsp -香港 - -// xn--h2brj9c ("Bharat" Devanagari) : IN -// India -भारत - -// xn--mgbbh1a71e ("Bharat" Arabic) : IN -// India -بھارت - -// xn--fpcrj9c3d ("Bharat" Telugu) : IN -// India -భారత్ - -// xn--gecrj9c ("Bharat" Gujarati) : IN -// India -ભારત - -// xn--s9brj9c ("Bharat" Gurmukhi) : IN -// India -ਭਾਰਤ - -// xn--45brj9c ("Bharat" Bengali) : IN -// India -ভারত - -// xn--xkc2dl3a5ee0h ("India" Tamil) : IN -// India -இந்தியா - -// xn--mgba3a4f16a ("Iran" Persian) : IR -ایران - -// xn--mgba3a4fra ("Iran" Arabic) : IR -ايران - -//xn--mgbayh7gpa ("al-Ordon" Arabic) JO -//National Information Technology Center (NITC) -//Royal Scientific Society, Al-Jubeiha -الاردن - -// xn--3e0b707e ("Republic of Korea" Hangul) : KR -한국 - -// xn--fzc2c9e2c ("Lanka" Sinhalese-Sinhala) : LK -// http://nic.lk -ලංකා - -// xn--xkc2al3hye2a ("Ilangai" Tamil) : LK -// http://nic.lk -இலங்கை - -// xn--mgbc0a9azcg ("Morocco / al-Maghrib" Arabic) : MA -المغرب - -// xn--mgb9awbf ("Oman" Arabic) : OM -عمان - -// xn--ygbi2ammx ("Falasteen" Arabic) : PS -// The Palestinian National Internet Naming Authority (PNINA) -// http://www.pnina.ps -فلسطين - -// xn--90a3ac ("srb" Cyrillic) : RS -срб - -// xn--p1ai ("rf" Russian-Cyrillic) : RU -// http://www.cctld.ru/en/docs/rulesrf.php -рф - -// xn--wgbl6a ("Qatar" Arabic) : QA -// http://www.ict.gov.qa/ -قطر - -// xn--mgberp4a5d4ar ("AlSaudiah" Arabic) : SA -// http://www.nic.net.sa/ -السعودية - -// xn--mgberp4a5d4a87g ("AlSaudiah" Arabic) variant : SA -السعودیة - -// xn--mgbqly7c0a67fbc ("AlSaudiah" Arabic) variant : SA -السعودیۃ - -// xn--mgbqly7cvafr ("AlSaudiah" Arabic) variant : SA -السعوديه - -// xn--ogbpf8fl ("Syria" Arabic) : SY -سورية - -// xn--mgbtf8fl ("Syria" Arabic) variant : SY -سوريا - -// xn--yfro4i67o Singapore ("Singapore" Chinese-Han) : SG -新加坡 - -// xn--clchc0ea0b2g2a9gcd ("Singapore" Tamil) : SG -சிங்கப்பூர் - -// xn--o3cw4h ("Thai" Thai) : TH -// http://www.thnic.co.th -ไทย - -// xn--pgbs0dh ("Tunis") : TN -// http://nic.tn -تونس - -// xn--kpry57d ("Taiwan" Chinese-Han-Traditional) : TW -// http://www.twnic.net/english/dn/dn_07a.htm -台灣 - -// xn--kprw13d ("Taiwan" Chinese-Han-Simplified) : TW -// http://www.twnic.net/english/dn/dn_07a.htm -台湾 - -// xn--nnx388a ("Taiwan") variant : TW -臺灣 - -// xn--j1amh ("ukr" Cyrillic) : UA -укр - -// xn--mgb2ddes ("AlYemen" Arabic) : YE -اليمن - -// xxx : http://icmregistry.com -xxx - -// ye : http://www.y.net.ye/services/domain_name.htm -*.ye - -// za : http://www.zadna.org.za/slds.html -*.za - -// zm : http://en.wikipedia.org/wiki/.zm -*.zm - -// zw : http://en.wikipedia.org/wiki/.zw -*.zw - -// ===END ICANN DOMAINS=== -// ===BEGIN PRIVATE DOMAINS=== - -// info.at : http://www.info.at/ -biz.at -info.at - -// priv.at : http://www.nic.priv.at/ -// Submitted by registry <lendl@nic.at> 2008-06-09 -priv.at - -// co.ca : http://registry.co.ca -co.ca - -// CentralNic : http://www.centralnic.com/names/domains -// Confirmed by registry <gavin.brown@centralnic.com> 2008-06-09 -ar.com -br.com -cn.com -de.com -eu.com -gb.com -gr.com -hu.com -jpn.com -kr.com -no.com -qc.com -ru.com -sa.com -se.com -uk.com -us.com -uy.com -za.com -gb.net -jp.net -se.net -uk.net -ae.org -us.org -com.de - -// Opera Software, A.S.A. -// Requested by Yngve Pettersen <yngve@opera.com> 2009-11-26 -operaunite.com - -// Google, Inc. -// Requested by Eduardo Vela <evn@google.com> 2010-09-06 -appspot.com - -// iki.fi : Submitted by Hannu Aronsson <haa@iki.fi> 2009-11-05 -iki.fi - -// c.la : http://www.c.la/ -c.la - -// ZaNiC : http://www.za.net/ -// Confirmed by registry <hostmaster@nic.za.net> 2009-10-03 -za.net -za.org - -// CoDNS B.V. -// Added 2010-05-23. -co.nl -co.no - -// Mainseek Sp. z o.o. : http://www.co.pl/ -co.pl - -// DynDNS.com : http://www.dyndns.com/services/dns/dyndns/ -dyndns-at-home.com -dyndns-at-work.com -dyndns-blog.com -dyndns-free.com -dyndns-home.com -dyndns-ip.com -dyndns-mail.com -dyndns-office.com -dyndns-pics.com -dyndns-remote.com -dyndns-server.com -dyndns-web.com -dyndns-wiki.com -dyndns-work.com -dyndns.biz -dyndns.info -dyndns.org -dyndns.tv -at-band-camp.net -ath.cx -barrel-of-knowledge.info -barrell-of-knowledge.info -better-than.tv -blogdns.com -blogdns.net -blogdns.org -blogsite.org -boldlygoingnowhere.org -broke-it.net -buyshouses.net -cechire.com -dnsalias.com -dnsalias.net -dnsalias.org -dnsdojo.com -dnsdojo.net -dnsdojo.org -does-it.net -doesntexist.com -doesntexist.org -dontexist.com -dontexist.net -dontexist.org -doomdns.com -doomdns.org -dvrdns.org -dyn-o-saur.com -dynalias.com -dynalias.net -dynalias.org -dynathome.net -dyndns.ws -endofinternet.net -endofinternet.org -endoftheinternet.org -est-a-la-maison.com -est-a-la-masion.com -est-le-patron.com -est-mon-blogueur.com -for-better.biz -for-more.biz -for-our.info -for-some.biz -for-the.biz -forgot.her.name -forgot.his.name -from-ak.com -from-al.com -from-ar.com -from-az.net -from-ca.com -from-co.net -from-ct.com -from-dc.com -from-de.com -from-fl.com -from-ga.com -from-hi.com -from-ia.com -from-id.com -from-il.com -from-in.com -from-ks.com -from-ky.com -from-la.net -from-ma.com -from-md.com -from-me.org -from-mi.com -from-mn.com -from-mo.com -from-ms.com -from-mt.com -from-nc.com -from-nd.com -from-ne.com -from-nh.com -from-nj.com -from-nm.com -from-nv.com -from-ny.net -from-oh.com -from-ok.com -from-or.com -from-pa.com -from-pr.com -from-ri.com -from-sc.com -from-sd.com -from-tn.com -from-tx.com -from-ut.com -from-va.com -from-vt.com -from-wa.com -from-wi.com -from-wv.com -from-wy.com -ftpaccess.cc -fuettertdasnetz.de -game-host.org -game-server.cc -getmyip.com -gets-it.net -go.dyndns.org -gotdns.com -gotdns.org -groks-the.info -groks-this.info -ham-radio-op.net -here-for-more.info -hobby-site.com -hobby-site.org -home.dyndns.org -homedns.org -homeftp.net -homeftp.org -homeip.net -homelinux.com -homelinux.net -homelinux.org -homeunix.com -homeunix.net -homeunix.org -iamallama.com -in-the-band.net -is-a-anarchist.com -is-a-blogger.com -is-a-bookkeeper.com -is-a-bruinsfan.org -is-a-bulls-fan.com -is-a-candidate.org -is-a-caterer.com -is-a-celticsfan.org -is-a-chef.com -is-a-chef.net -is-a-chef.org -is-a-conservative.com -is-a-cpa.com -is-a-cubicle-slave.com -is-a-democrat.com -is-a-designer.com -is-a-doctor.com -is-a-financialadvisor.com -is-a-geek.com -is-a-geek.net -is-a-geek.org -is-a-green.com -is-a-guru.com -is-a-hard-worker.com -is-a-hunter.com -is-a-knight.org -is-a-landscaper.com -is-a-lawyer.com -is-a-liberal.com -is-a-libertarian.com -is-a-linux-user.org -is-a-llama.com -is-a-musician.com -is-a-nascarfan.com -is-a-nurse.com -is-a-painter.com -is-a-patsfan.org -is-a-personaltrainer.com -is-a-photographer.com -is-a-player.com -is-a-republican.com -is-a-rockstar.com -is-a-socialist.com -is-a-soxfan.org -is-a-student.com -is-a-teacher.com -is-a-techie.com -is-a-therapist.com -is-an-accountant.com -is-an-actor.com -is-an-actress.com -is-an-anarchist.com -is-an-artist.com -is-an-engineer.com -is-an-entertainer.com -is-by.us -is-certified.com -is-found.org -is-gone.com -is-into-anime.com -is-into-cars.com -is-into-cartoons.com -is-into-games.com -is-leet.com -is-lost.org -is-not-certified.com -is-saved.org -is-slick.com -is-uberleet.com -is-very-bad.org -is-very-evil.org -is-very-good.org -is-very-nice.org -is-very-sweet.org -is-with-theband.com -isa-geek.com -isa-geek.net -isa-geek.org -isa-hockeynut.com -issmarterthanyou.com -isteingeek.de -istmein.de -kicks-ass.net -kicks-ass.org -knowsitall.info -land-4-sale.us -lebtimnetz.de -leitungsen.de -likes-pie.com -likescandy.com -merseine.nu -mine.nu -misconfused.org -mypets.ws -myphotos.cc -neat-url.com -office-on-the.net -on-the-web.tv -podzone.net -podzone.org -readmyblog.org -saves-the-whales.com -scrapper-site.net -scrapping.cc -selfip.biz -selfip.com -selfip.info -selfip.net -selfip.org -sells-for-less.com -sells-for-u.com -sells-it.net -sellsyourhome.org -servebbs.com -servebbs.net -servebbs.org -serveftp.net -serveftp.org -servegame.org -shacknet.nu -simple-url.com -space-to-rent.com -stuff-4-sale.org -stuff-4-sale.us -teaches-yoga.com -thruhere.net -traeumtgerade.de -webhop.biz -webhop.info -webhop.net -webhop.org -worse-than.tv -writesthisblog.com - -// ===END PRIVATE DOMAINS=== diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/test.js deleted file mode 100644 index 3cce815e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tough-cookie/test.js +++ /dev/null @@ -1,1340 +0,0 @@ -/* - * Copyright GoInstant, Inc. and other contributors. All rights reserved. - * 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. - */ - -var vows = require('vows'); -var assert = require('assert'); -var async = require('async'); - -// NOTE use require("tough-cookie") in your own code: -var tough = require('./lib/cookie'); -var Cookie = tough.Cookie; -var CookieJar = tough.CookieJar; - - -function dateVows(table) { - var theVows = { }; - var keys = Object.keys(table).forEach(function(date) { - var expect = table[date]; - theVows[date] = function() { - var got = tough.parseDate(date) ? 'valid' : 'invalid'; - assert.equal(got, expect ? 'valid' : 'invalid'); - }; - }); - return { "date parsing": theVows }; -} - -function matchVows(func,table) { - var theVows = {}; - table.forEach(function(item) { - var str = item[0]; - var dom = item[1]; - var expect = item[2]; - var label = str+(expect?" matches ":" doesn't match ")+dom; - theVows[label] = function() { - assert.equal(func(str,dom),expect); - }; - }); - return theVows; -} - -function defaultPathVows(table) { - var theVows = {}; - table.forEach(function(item) { - var str = item[0]; - var expect = item[1]; - var label = str+" gives "+expect; - theVows[label] = function() { - assert.equal(tough.defaultPath(str),expect); - }; - }); - return theVows; -} - -var atNow = Date.now(); -function at(offset) { return {now: new Date(atNow+offset)} } - -vows.describe('Cookie Jar') -.addBatch({ - "all defined": function() { - assert.ok(Cookie); - assert.ok(CookieJar); - }, -}) -.addBatch( - dateVows({ - "Wed, 09 Jun 2021 10:18:14 GMT": true, - "Wed, 09 Jun 2021 22:18:14 GMT": true, - "Tue, 18 Oct 2011 07:42:42.123 GMT": true, - "18 Oct 2011 07:42:42 GMT": true, - "8 Oct 2011 7:42:42 GMT": true, - "8 Oct 2011 7:2:42 GMT": false, - "Oct 18 2011 07:42:42 GMT": true, - "Tue Oct 18 2011 07:05:03 GMT+0000 (GMT)": true, - "09 Jun 2021 10:18:14 GMT": true, - "99 Jix 3038 48:86:72 ZMT": false, - '01 Jan 1970 00:00:00 GMT': true, - '01 Jan 1600 00:00:00 GMT': false, // before 1601 - '01 Jan 1601 00:00:00 GMT': true, - '10 Feb 81 13:00:00 GMT': true, // implicit year - 'Thu, 01 Jan 1970 00:00:010 GMT': true, // strange time, non-strict OK - 'Thu, 17-Apr-2014 02:12:29 GMT': true, // dashes - 'Thu, 17-Apr-2014 02:12:29 UTC': true, // dashes and UTC - }) -) -.addBatch({ - "strict date parse of Thu, 01 Jan 1970 00:00:010 GMT": { - topic: function() { - return tough.parseDate('Thu, 01 Jan 1970 00:00:010 GMT', true) ? true : false; - }, - "invalid": function(date) { - assert.equal(date,false); - }, - } -}) -.addBatch({ - "formatting": { - "a simple cookie": { - topic: function() { - var c = new Cookie(); - c.key = 'a'; - c.value = 'b'; - return c; - }, - "validates": function(c) { - assert.ok(c.validate()); - }, - "to string": function(c) { - assert.equal(c.toString(), 'a=b'); - }, - }, - "a cookie with spaces in the value": { - topic: function() { - var c = new Cookie(); - c.key = 'a'; - c.value = 'beta gamma'; - return c; - }, - "doesn't validate": function(c) { - assert.ok(!c.validate()); - }, - "to string": function(c) { - assert.equal(c.toString(), 'a="beta gamma"'); - }, - }, - "with an empty value and HttpOnly": { - topic: function() { - var c = new Cookie(); - c.key = 'a'; - c.httpOnly = true; - return c; - }, - "to string": function(c) { - assert.equal(c.toString(), 'a=; HttpOnly'); - } - }, - "with an expiry": { - topic: function() { - var c = new Cookie(); - c.key = 'a'; - c.value = 'b'; - c.setExpires("Oct 18 2011 07:05:03 GMT"); - return c; - }, - "validates": function(c) { - assert.ok(c.validate()); - }, - "to string": function(c) { - assert.equal(c.toString(), 'a=b; Expires=Tue, 18 Oct 2011 07:05:03 GMT'); - }, - "to short string": function(c) { - assert.equal(c.cookieString(), 'a=b'); - }, - }, - "with a max-age": { - topic: function() { - var c = new Cookie(); - c.key = 'a'; - c.value = 'b'; - c.setExpires("Oct 18 2011 07:05:03 GMT"); - c.maxAge = 12345; - return c; - }, - "validates": function(c) { - assert.ok(c.validate()); // mabe this one *shouldn't*? - }, - "to string": function(c) { - assert.equal(c.toString(), 'a=b; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Max-Age=12345'); - }, - }, - "with a bunch of things": function() { - var c = new Cookie(); - c.key = 'a'; - c.value = 'b'; - c.setExpires("Oct 18 2011 07:05:03 GMT"); - c.maxAge = 12345; - c.domain = 'example.com'; - c.path = '/foo'; - c.secure = true; - c.httpOnly = true; - c.extensions = ['MyExtension']; - assert.equal(c.toString(), 'a=b; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Max-Age=12345; Domain=example.com; Path=/foo; Secure; HttpOnly; MyExtension'); - }, - "a host-only cookie": { - topic: function() { - var c = new Cookie(); - c.key = 'a'; - c.value = 'b'; - c.hostOnly = true; - c.domain = 'shouldnt-stringify.example.com'; - c.path = '/should-stringify'; - return c; - }, - "validates": function(c) { - assert.ok(c.validate()); - }, - "to string": function(c) { - assert.equal(c.toString(), 'a=b; Path=/should-stringify'); - }, - }, - "minutes are '10'": { - topic: function() { - var c = new Cookie(); - c.key = 'a'; - c.value = 'b'; - c.expires = new Date(1284113410000); - return c; - }, - "validates": function(c) { - assert.ok(c.validate()); - }, - "to string": function(c) { - var str = c.toString(); - assert.notEqual(str, 'a=b; Expires=Fri, 010 Sep 2010 010:010:010 GMT'); - assert.equal(str, 'a=b; Expires=Fri, 10 Sep 2010 10:10:10 GMT'); - }, - } - } -}) -.addBatch({ - "TTL with max-age": function() { - var c = new Cookie(); - c.maxAge = 123; - assert.equal(c.TTL(), 123000); - assert.equal(c.expiryTime(new Date(9000000)), 9123000); - }, - "TTL with zero max-age": function() { - var c = new Cookie(); - c.key = 'a'; c.value = 'b'; - c.maxAge = 0; // should be treated as "earliest representable" - assert.equal(c.TTL(), 0); - assert.equal(c.expiryTime(new Date(9000000)), -Infinity); - assert.ok(!c.validate()); // not valid, really: non-zero-digit *DIGIT - }, - "TTL with negative max-age": function() { - var c = new Cookie(); - c.key = 'a'; c.value = 'b'; - c.maxAge = -1; // should be treated as "earliest representable" - assert.equal(c.TTL(), 0); - assert.equal(c.expiryTime(new Date(9000000)), -Infinity); - assert.ok(!c.validate()); // not valid, really: non-zero-digit *DIGIT - }, - "TTL with max-age and expires": function() { - var c = new Cookie(); - c.maxAge = 123; - c.expires = new Date(Date.now()+9000); - assert.equal(c.TTL(), 123000); - assert.ok(c.isPersistent()); - }, - "TTL with expires": function() { - var c = new Cookie(); - var now = Date.now(); - c.expires = new Date(now+9000); - assert.equal(c.TTL(now), 9000); - assert.equal(c.expiryTime(), c.expires.getTime()); - }, - "TTL with old expires": function() { - var c = new Cookie(); - c.setExpires('17 Oct 2010 00:00:00 GMT'); - assert.ok(c.TTL() < 0); - assert.ok(c.isPersistent()); - }, - "default TTL": { - topic: function() { return new Cookie() }, - "is Infinite-future": function(c) { assert.equal(c.TTL(), Infinity) }, - "is a 'session' cookie": function(c) { assert.ok(!c.isPersistent()) }, - }, -}).addBatch({ - "Parsing": { - "simple": { - topic: function() { - return Cookie.parse('a=bcd',true) || null; - }, - "parsed": function(c) { assert.ok(c) }, - "key": function(c) { assert.equal(c.key, 'a') }, - "value": function(c) { assert.equal(c.value, 'bcd') }, - "no path": function(c) { assert.equal(c.path, null) }, - "no domain": function(c) { assert.equal(c.domain, null) }, - "no extensions": function(c) { assert.ok(!c.extensions) }, - }, - "with expiry": { - topic: function() { - return Cookie.parse('a=bcd; Expires=Tue, 18 Oct 2011 07:05:03 GMT',true) || null; - }, - "parsed": function(c) { assert.ok(c) }, - "key": function(c) { assert.equal(c.key, 'a') }, - "value": function(c) { assert.equal(c.value, 'bcd') }, - "has expires": function(c) { - assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be'); - assert.equal(c.expires.getTime(), 1318921503000); - }, - }, - "with expiry and path": { - topic: function() { - return Cookie.parse('abc="xyzzy!"; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Path=/aBc',true) || null; - }, - "parsed": function(c) { assert.ok(c) }, - "key": function(c) { assert.equal(c.key, 'abc') }, - "value": function(c) { assert.equal(c.value, 'xyzzy!') }, - "has expires": function(c) { - assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be'); - assert.equal(c.expires.getTime(), 1318921503000); - }, - "has path": function(c) { assert.equal(c.path, '/aBc'); }, - "no httponly or secure": function(c) { - assert.ok(!c.httpOnly); - assert.ok(!c.secure); - }, - }, - "with everything": { - topic: function() { - return Cookie.parse('abc="xyzzy!"; Expires=Tue, 18 Oct 2011 07:05:03 GMT; Path=/aBc; Domain=example.com; Secure; HTTPOnly; Max-Age=1234; Foo=Bar; Baz', true) || null; - }, - "parsed": function(c) { assert.ok(c) }, - "key": function(c) { assert.equal(c.key, 'abc') }, - "value": function(c) { assert.equal(c.value, 'xyzzy!') }, - "has expires": function(c) { - assert.ok(c.expires !== Infinity, 'expiry is infinite when it shouldn\'t be'); - assert.equal(c.expires.getTime(), 1318921503000); - }, - "has path": function(c) { assert.equal(c.path, '/aBc'); }, - "has domain": function(c) { assert.equal(c.domain, 'example.com'); }, - "has httponly": function(c) { assert.equal(c.httpOnly, true); }, - "has secure": function(c) { assert.equal(c.secure, true); }, - "has max-age": function(c) { assert.equal(c.maxAge, 1234); }, - "has extensions": function(c) { - assert.ok(c.extensions); - assert.equal(c.extensions[0], 'Foo=Bar'); - assert.equal(c.extensions[1], 'Baz'); - }, - }, - "invalid expires": { - "strict": function() { assert.ok(!Cookie.parse("a=b; Expires=xyzzy", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; Expires=xyzzy"); - assert.ok(c); - assert.equal(c.expires, Infinity); - }, - }, - "zero max-age": { - "strict": function() { assert.ok(!Cookie.parse("a=b; Max-Age=0", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; Max-Age=0"); - assert.ok(c); - assert.equal(c.maxAge, 0); - }, - }, - "negative max-age": { - "strict": function() { assert.ok(!Cookie.parse("a=b; Max-Age=-1", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; Max-Age=-1"); - assert.ok(c); - assert.equal(c.maxAge, -1); - }, - }, - "empty domain": { - "strict": function() { assert.ok(!Cookie.parse("a=b; domain=", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; domain="); - assert.ok(c); - assert.equal(c.domain, null); - }, - }, - "dot domain": { - "strict": function() { assert.ok(!Cookie.parse("a=b; domain=.", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; domain=."); - assert.ok(c); - assert.equal(c.domain, null); - }, - }, - "uppercase domain": { - "strict lowercases": function() { - var c = Cookie.parse("a=b; domain=EXAMPLE.COM"); - assert.ok(c); - assert.equal(c.domain, 'example.com'); - }, - "non-strict lowercases": function() { - var c = Cookie.parse("a=b; domain=EXAMPLE.COM"); - assert.ok(c); - assert.equal(c.domain, 'example.com'); - }, - }, - "trailing dot in domain": { - topic: function() { - return Cookie.parse("a=b; Domain=example.com.", true) || null; - }, - "has the domain": function(c) { assert.equal(c.domain,"example.com.") }, - "but doesn't validate": function(c) { assert.equal(c.validate(),false) }, - }, - "empty path": { - "strict": function() { assert.ok(!Cookie.parse("a=b; path=", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; path="); - assert.ok(c); - assert.equal(c.path, null); - }, - }, - "no-slash path": { - "strict": function() { assert.ok(!Cookie.parse("a=b; path=xyzzy", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; path=xyzzy"); - assert.ok(c); - assert.equal(c.path, null); - }, - }, - "trailing semi-colons after path": { - topic: function () { - return [ - "a=b; path=/;", - "c=d;;;;" - ]; - }, - "strict": function (t) { - assert.ok(!Cookie.parse(t[0], true)); - assert.ok(!Cookie.parse(t[1], true)); - }, - "non-strict": function (t) { - var c1 = Cookie.parse(t[0]); - var c2 = Cookie.parse(t[1]); - assert.ok(c1); - assert.ok(c2); - assert.equal(c1.path, '/'); - } - }, - "secure-with-value": { - "strict": function() { assert.ok(!Cookie.parse("a=b; Secure=xyzzy", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; Secure=xyzzy"); - assert.ok(c); - assert.equal(c.secure, true); - }, - }, - "httponly-with-value": { - "strict": function() { assert.ok(!Cookie.parse("a=b; HttpOnly=xyzzy", true)) }, - "non-strict": function() { - var c = Cookie.parse("a=b; HttpOnly=xyzzy"); - assert.ok(c); - assert.equal(c.httpOnly, true); - }, - }, - "garbage": { - topic: function() { - return Cookie.parse("\x08", true) || null; - }, - "doesn't parse": function(c) { assert.equal(c,null) }, - }, - "public suffix domain": { - topic: function() { - return Cookie.parse("a=b; domain=kyoto.jp", true) || null; - }, - "parses fine": function(c) { - assert.ok(c); - assert.equal(c.domain, 'kyoto.jp'); - }, - "but fails validation": function(c) { - assert.ok(c); - assert.ok(!c.validate()); - }, - }, - "Ironically, Google 'GAPS' cookie has very little whitespace": { - topic: function() { - return Cookie.parse("GAPS=1:A1aaaaAaAAa1aaAaAaaAAAaaa1a11a:aaaAaAaAa-aaaA1-;Path=/;Expires=Thu, 17-Apr-2014 02:12:29 GMT;Secure;HttpOnly"); - }, - "parsed": function(c) { assert.ok(c) }, - "key": function(c) { assert.equal(c.key, 'GAPS') }, - "value": function(c) { assert.equal(c.value, '1:A1aaaaAaAAa1aaAaAaaAAAaaa1a11a:aaaAaAaAa-aaaA1-') }, - "path": function(c) { - assert.notEqual(c.path, '/;Expires'); // BUG - assert.equal(c.path, '/'); - }, - "expires": function(c) { - assert.notEqual(c.expires, Infinity); - assert.equal(c.expires.getTime(), 1397700749000); - }, - "secure": function(c) { assert.ok(c.secure) }, - "httponly": function(c) { assert.ok(c.httpOnly) }, - }, - "lots of equal signs": { - topic: function() { - return Cookie.parse("queryPref=b=c&d=e; Path=/f=g; Expires=Thu, 17 Apr 2014 02:12:29 GMT; HttpOnly"); - }, - "parsed": function(c) { assert.ok(c) }, - "key": function(c) { assert.equal(c.key, 'queryPref') }, - "value": function(c) { assert.equal(c.value, 'b=c&d=e') }, - "path": function(c) { - assert.equal(c.path, '/f=g'); - }, - "expires": function(c) { - assert.notEqual(c.expires, Infinity); - assert.equal(c.expires.getTime(), 1397700749000); - }, - "httponly": function(c) { assert.ok(c.httpOnly) }, - } - } -}) -.addBatch({ - "domain normalization": { - "simple": function() { - var c = new Cookie(); - c.domain = "EXAMPLE.com"; - assert.equal(c.canonicalizedDomain(), "example.com"); - }, - "extra dots": function() { - var c = new Cookie(); - c.domain = ".EXAMPLE.com"; - assert.equal(c.cdomain(), "example.com"); - }, - "weird trailing dot": function() { - var c = new Cookie(); - c.domain = "EXAMPLE.ca."; - assert.equal(c.canonicalizedDomain(), "example.ca."); - }, - "weird internal dots": function() { - var c = new Cookie(); - c.domain = "EXAMPLE...ca."; - assert.equal(c.canonicalizedDomain(), "example...ca."); - }, - "IDN": function() { - var c = new Cookie(); - c.domain = "δοκιμή.δοκιμή"; // "test.test" in greek - assert.equal(c.canonicalizedDomain(), "xn--jxalpdlp.xn--jxalpdlp"); - } - } -}) -.addBatch({ - "Domain Match":matchVows(tough.domainMatch, [ - // str, dom, expect - ["example.com", "example.com", true], - ["eXaMpLe.cOm", "ExAmPlE.CoM", true], - ["no.ca", "yes.ca", false], - ["wwwexample.com", "example.com", false], - ["www.example.com", "example.com", true], - ["example.com", "www.example.com", false], - ["www.subdom.example.com", "example.com", true], - ["www.subdom.example.com", "subdom.example.com", true], - ["example.com", "example.com.", false], // RFC6265 S4.1.2.3 - ["192.168.0.1", "168.0.1", false], // S5.1.3 "The string is a host name" - [null, "example.com", null], - ["example.com", null, null], - [null, null, null], - [undefined, undefined, null], - ]) -}) -.addBatch({ - "default-path": defaultPathVows([ - [null,"/"], - ["/","/"], - ["/file","/"], - ["/dir/file","/dir"], - ["noslash","/"], - ]) -}) -.addBatch({ - "Path-Match": matchVows(tough.pathMatch, [ - // request, cookie, match - ["/","/",true], - ["/dir","/",true], - ["/","/dir",false], - ["/dir/","/dir/", true], - ["/dir/file","/dir/",true], - ["/dir/file","/dir",true], - ["/directory","/dir",false], - ]) -}) -.addBatch({ - "Cookie Sorting": { - topic: function() { - var cookies = []; - var now = Date.now(); - cookies.push(Cookie.parse("a=0; Domain=example.com")); - cookies.push(Cookie.parse("b=1; Domain=www.example.com")); - cookies.push(Cookie.parse("c=2; Domain=example.com; Path=/pathA")); - cookies.push(Cookie.parse("d=3; Domain=www.example.com; Path=/pathA")); - cookies.push(Cookie.parse("e=4; Domain=example.com; Path=/pathA/pathB")); - cookies.push(Cookie.parse("f=5; Domain=www.example.com; Path=/pathA/pathB")); - - // force a stable creation time consistent with the order above since - // some may have been created at now + 1ms. - var i = cookies.length; - cookies.forEach(function(cookie) { - cookie.creation = new Date(now - 100*(i--)); - }); - - // weak shuffle: - cookies = cookies.sort(function(){return Math.random()-0.5}); - - cookies = cookies.sort(tough.cookieCompare); - return cookies; - }, - "got": function(cookies) { - assert.lengthOf(cookies, 6); - var names = cookies.map(function(c) {return c.key}); - assert.deepEqual(names, ['e','f','c','d','a','b']); - }, - } -}) -.addBatch({ - "CookieJar": { - "Setting a basic cookie": { - topic: function() { - var cj = new CookieJar(); - var c = Cookie.parse("a=b; Domain=example.com; Path=/"); - assert.strictEqual(c.hostOnly, null); - assert.instanceOf(c.creation, Date); - assert.strictEqual(c.lastAccessed, null); - c.creation = new Date(Date.now()-10000); - cj.setCookie(c, 'http://example.com/index.html', this.callback); - }, - "works": function(c) { assert.instanceOf(c,Cookie) }, // C is for Cookie, good enough for me - "gets timestamped": function(c) { - assert.ok(c.creation); - assert.ok(Date.now() - c.creation.getTime() < 5000); // recently stamped - assert.ok(c.lastAccessed); - assert.equal(c.creation, c.lastAccessed); - assert.equal(c.TTL(), Infinity); - assert.ok(!c.isPersistent()); - }, - }, - "Setting a no-path cookie": { - topic: function() { - var cj = new CookieJar(); - var c = Cookie.parse("a=b; Domain=example.com"); - assert.strictEqual(c.hostOnly, null); - assert.instanceOf(c.creation, Date); - assert.strictEqual(c.lastAccessed, null); - c.creation = new Date(Date.now()-10000); - cj.setCookie(c, 'http://example.com/index.html', this.callback); - }, - "domain": function(c) { assert.equal(c.domain, 'example.com') }, - "path is /": function(c) { assert.equal(c.path, '/') }, - "path was derived": function(c) { assert.strictEqual(c.pathIsDefault, true) }, - }, - "Setting a cookie already marked as host-only": { - topic: function() { - var cj = new CookieJar(); - var c = Cookie.parse("a=b; Domain=example.com"); - assert.strictEqual(c.hostOnly, null); - assert.instanceOf(c.creation, Date); - assert.strictEqual(c.lastAccessed, null); - c.creation = new Date(Date.now()-10000); - c.hostOnly = true; - cj.setCookie(c, 'http://example.com/index.html', this.callback); - }, - "domain": function(c) { assert.equal(c.domain, 'example.com') }, - "still hostOnly": function(c) { assert.strictEqual(c.hostOnly, true) }, - }, - "Setting a session cookie": { - topic: function() { - var cj = new CookieJar(); - var c = Cookie.parse("a=b"); - assert.strictEqual(c.path, null); - cj.setCookie(c, 'http://www.example.com/dir/index.html', this.callback); - }, - "works": function(c) { assert.instanceOf(c,Cookie) }, - "gets the domain": function(c) { assert.equal(c.domain, 'www.example.com') }, - "gets the default path": function(c) { assert.equal(c.path, '/dir') }, - "is 'hostOnly'": function(c) { assert.ok(c.hostOnly) }, - }, - "Setting wrong domain cookie": { - topic: function() { - var cj = new CookieJar(); - var c = Cookie.parse("a=b; Domain=fooxample.com; Path=/"); - cj.setCookie(c, 'http://example.com/index.html', this.callback); - }, - "fails": function(err,c) { - assert.ok(err.message.match(/domain/i)); - assert.ok(!c); - }, - }, - "Setting sub-domain cookie": { - topic: function() { - var cj = new CookieJar(); - var c = Cookie.parse("a=b; Domain=www.example.com; Path=/"); - cj.setCookie(c, 'http://example.com/index.html', this.callback); - }, - "fails": function(err,c) { - assert.ok(err.message.match(/domain/i)); - assert.ok(!c); - }, - }, - "Setting super-domain cookie": { - topic: function() { - var cj = new CookieJar(); - var c = Cookie.parse("a=b; Domain=example.com; Path=/"); - cj.setCookie(c, 'http://www.app.example.com/index.html', this.callback); - }, - "success": function(err,c) { - assert.ok(!err); - assert.equal(c.domain, 'example.com'); - }, - }, - "Setting HttpOnly cookie over non-HTTP API": { - topic: function() { - var cj = new CookieJar(); - var c = Cookie.parse("a=b; Domain=example.com; Path=/; HttpOnly"); - cj.setCookie(c, 'http://example.com/index.html', {http:false}, this.callback); - }, - "fails": function(err,c) { - assert.match(err.message, /HttpOnly/i); - assert.ok(!c); - }, - }, - }, - "Cookie Jar store eight cookies": { - topic: function() { - var cj = new CookieJar(); - var ex = 'http://example.com/index.html'; - var tasks = []; - tasks.push(function(next) { - cj.setCookie('a=1; Domain=example.com; Path=/',ex,at(0),next); - }); - tasks.push(function(next) { - cj.setCookie('b=2; Domain=example.com; Path=/; HttpOnly',ex,at(1000),next); - }); - tasks.push(function(next) { - cj.setCookie('c=3; Domain=example.com; Path=/; Secure',ex,at(2000),next); - }); - tasks.push(function(next) { // path - cj.setCookie('d=4; Domain=example.com; Path=/foo',ex,at(3000),next); - }); - tasks.push(function(next) { // host only - cj.setCookie('e=5',ex,at(4000),next); - }); - tasks.push(function(next) { // other domain - cj.setCookie('f=6; Domain=nodejs.org; Path=/','http://nodejs.org',at(5000),next); - }); - tasks.push(function(next) { // expired - cj.setCookie('g=7; Domain=example.com; Path=/; Expires=Tue, 18 Oct 2011 00:00:00 GMT',ex,at(6000),next); - }); - tasks.push(function(next) { // expired via Max-Age - cj.setCookie('h=8; Domain=example.com; Path=/; Max-Age=1',ex,next); - }); - var cb = this.callback; - async.parallel(tasks, function(err,results){ - setTimeout(function() { - cb(err,cj,results); - }, 2000); // so that 'h=8' expires - }); - }, - "setup ok": function(err,cj,results) { - assert.ok(1); - }, - "then retrieving for http://nodejs.org": { - topic: function(cj,results) { - cj.getCookies('http://nodejs.org',this.callback); - }, - "get a nodejs cookie": function(cookies) { - assert.lengthOf(cookies, 1); - var cookie = cookies[0]; - assert.equal(cookie.domain, 'nodejs.org'); - }, - }, - "then retrieving for https://example.com": { - topic: function(cj,results) { - cj.getCookies('https://example.com',{secure:true},this.callback); - }, - "get a secure example cookie with others": function(cookies) { - var names = cookies.map(function(c) {return c.key}); - assert.deepEqual(names, ['a','b','c','e']); - }, - }, - "then retrieving for https://example.com (missing options)": { - topic: function(cj,results) { - cj.getCookies('https://example.com',this.callback); - }, - "get a secure example cookie with others": function(cookies) { - var names = cookies.map(function(c) {return c.key}); - assert.deepEqual(names, ['a','b','c','e']); - }, - }, - "then retrieving for http://example.com": { - topic: function(cj,results) { - cj.getCookies('http://example.com',this.callback); - }, - "get a bunch of cookies": function(cookies) { - var names = cookies.map(function(c) {return c.key}); - assert.deepEqual(names, ['a','b','e']); - }, - }, - "then retrieving for http://EXAMPlE.com": { - topic: function(cj,results) { - cj.getCookies('http://EXAMPlE.com',this.callback); - }, - "get a bunch of cookies": function(cookies) { - var names = cookies.map(function(c) {return c.key}); - assert.deepEqual(names, ['a','b','e']); - }, - }, - "then retrieving for http://example.com, non-HTTP": { - topic: function(cj,results) { - cj.getCookies('http://example.com',{http:false},this.callback); - }, - "get a bunch of cookies": function(cookies) { - var names = cookies.map(function(c) {return c.key}); - assert.deepEqual(names, ['a','e']); - }, - }, - "then retrieving for http://example.com/foo/bar": { - topic: function(cj,results) { - cj.getCookies('http://example.com/foo/bar',this.callback); - }, - "get a bunch of cookies": function(cookies) { - var names = cookies.map(function(c) {return c.key}); - assert.deepEqual(names, ['d','a','b','e']); - }, - }, - "then retrieving for http://example.com as a string": { - topic: function(cj,results) { - cj.getCookieString('http://example.com',this.callback); - }, - "get a single string": function(cookieHeader) { - assert.equal(cookieHeader, "a=1; b=2; e=5"); - }, - }, - "then retrieving for http://example.com as a set-cookie header": { - topic: function(cj,results) { - cj.getSetCookieStrings('http://example.com',this.callback); - }, - "get a single string": function(cookieHeaders) { - assert.lengthOf(cookieHeaders, 3); - assert.equal(cookieHeaders[0], "a=1; Domain=example.com; Path=/"); - assert.equal(cookieHeaders[1], "b=2; Domain=example.com; Path=/; HttpOnly"); - assert.equal(cookieHeaders[2], "e=5; Path=/"); - }, - }, - "then retrieving for http://www.example.com/": { - topic: function(cj,results) { - cj.getCookies('http://www.example.com/foo/bar',this.callback); - }, - "get a bunch of cookies": function(cookies) { - var names = cookies.map(function(c) {return c.key}); - assert.deepEqual(names, ['d','a','b']); // note lack of 'e' - }, - }, - }, - "Repeated names": { - topic: function() { - var cb = this.callback; - var cj = new CookieJar(); - var ex = 'http://www.example.com/'; - var sc = cj.setCookie; - var tasks = []; - var now = Date.now(); - tasks.push(sc.bind(cj,'aaaa=xxxx',ex,at(0))); - tasks.push(sc.bind(cj,'aaaa=1111; Domain=www.example.com',ex,at(1000))); - tasks.push(sc.bind(cj,'aaaa=2222; Domain=example.com',ex,at(2000))); - tasks.push(sc.bind(cj,'aaaa=3333; Domain=www.example.com; Path=/pathA',ex,at(3000))); - async.series(tasks,function(err,results) { - results = results.filter(function(e) {return e !== undefined}); - cb(err,{cj:cj, cookies:results, now:now}); - }); - }, - "all got set": function(err,t) { - assert.lengthOf(t.cookies,4); - }, - "then getting 'em back": { - topic: function(t) { - var cj = t.cj; - cj.getCookies('http://www.example.com/pathA',this.callback); - }, - "there's just three": function (err,cookies) { - var vals = cookies.map(function(c) {return c.value}); - // may break with sorting; sorting should put 3333 first due to longest path: - assert.deepEqual(vals, ['3333','1111','2222']); - } - }, - }, - "CookieJar setCookie errors": { - "public-suffix domain": { - topic: function() { - var cj = new CookieJar(); - cj.setCookie('i=9; Domain=kyoto.jp; Path=/','kyoto.jp',this.callback); - }, - "errors": function(err,cookie) { - assert.ok(err); - assert.ok(!cookie); - assert.match(err.message, /public suffix/i); - }, - }, - "wrong domain": { - topic: function() { - var cj = new CookieJar(); - cj.setCookie('j=10; Domain=google.com; Path=/','google.ca',this.callback); - }, - "errors": function(err,cookie) { - assert.ok(err); - assert.ok(!cookie); - assert.match(err.message, /not in this host's domain/i); - }, - }, - "old cookie is HttpOnly": { - topic: function() { - var cb = this.callback; - var next = function (err,c) { - return cb(err,cj); - }; - var cj = new CookieJar(); - cj.setCookie('k=11; Domain=example.ca; Path=/; HttpOnly','http://example.ca',{http:true},next); - }, - "initial cookie is set": function(err,cj) { - assert.ok(!err); - }, - "but when trying to overwrite": { - topic: function(cj) { - var cb = this.callback; - cj.setCookie('k=12; Domain=example.ca; Path=/','http://example.ca',{http:false},function(err,c) {cb(null,err)}); - }, - "it's an error": function(err) { - assert.ok(err); - }, - "then, checking the original": { - topic: function(ignored,cj) { - assert.ok(cj instanceof CookieJar); - cj.getCookies('http://example.ca',{http:true},this.callback); - }, - "cookie has original value": function(err,cookies) { - assert.equal(err,null); - assert.lengthOf(cookies, 1); - assert.equal(cookies[0].value,11); - }, - }, - }, - }, - }, -}) -.addBatch({ - "JSON": { - "serialization": { - topic: function() { - var c = Cookie.parse('alpha=beta; Domain=example.com; Path=/foo; Expires=Tue, 19 Jan 2038 03:14:07 GMT; HttpOnly'); - return JSON.stringify(c); - }, - "gives a string": function(str) { - assert.equal(typeof str, "string"); - }, - "date is in ISO format": function(str) { - assert.match(str, /"expires":"2038-01-19T03:14:07\.000Z"/, 'expires is in ISO format'); - }, - }, - "deserialization": { - topic: function() { - var json = '{"key":"alpha","value":"beta","domain":"example.com","path":"/foo","expires":"2038-01-19T03:14:07.000Z","httpOnly":true,"lastAccessed":2000000000123}'; - return Cookie.fromJSON(json); - }, - "works": function(c) { - assert.ok(c); - }, - "key": function(c) { assert.equal(c.key, "alpha") }, - "value": function(c) { assert.equal(c.value, "beta") }, - "domain": function(c) { assert.equal(c.domain, "example.com") }, - "path": function(c) { assert.equal(c.path, "/foo") }, - "httpOnly": function(c) { assert.strictEqual(c.httpOnly, true) }, - "secure": function(c) { assert.strictEqual(c.secure, false) }, - "hostOnly": function(c) { assert.strictEqual(c.hostOnly, null) }, - "expires is a date object": function(c) { - assert.equal(c.expires.getTime(), 2147483647000); - }, - "lastAccessed is a date object": function(c) { - assert.equal(c.lastAccessed.getTime(), 2000000000123); - }, - "creation defaulted": function(c) { - assert.ok(c.creation.getTime()); - } - }, - "null deserialization": { - topic: function() { - return Cookie.fromJSON(null); - }, - "is null": function(cookie) { - assert.equal(cookie,null); - }, - }, - }, - "expiry deserialization": { - "Infinity": { - topic: Cookie.fromJSON.bind(null, '{"expires":"Infinity"}'), - "is infinite": function(c) { - assert.strictEqual(c.expires, "Infinity"); - assert.equal(c.expires, Infinity); - }, - }, - }, - "maxAge serialization": { - topic: function() { - return function(toSet) { - var c = new Cookie(); - c.key = 'foo'; c.value = 'bar'; - c.setMaxAge(toSet); - return JSON.stringify(c); - }; - }, - "zero": { - topic: function(f) { return f(0) }, - "looks good": function(str) { - assert.match(str, /"maxAge":0/); - }, - }, - "Infinity": { - topic: function(f) { return f(Infinity) }, - "looks good": function(str) { - assert.match(str, /"maxAge":"Infinity"/); - }, - }, - "-Infinity": { - topic: function(f) { return f(-Infinity) }, - "looks good": function(str) { - assert.match(str, /"maxAge":"-Infinity"/); - }, - }, - "null": { - topic: function(f) { return f(null) }, - "looks good": function(str) { - assert.match(str, /"maxAge":null/); - }, - }, - }, - "maxAge deserialization": { - "number": { - topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":123}'), - "is the number": function(c) { - assert.strictEqual(c.maxAge, 123); - }, - }, - "null": { - topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":null}'), - "is null": function(c) { - assert.strictEqual(c.maxAge, null); - }, - }, - "less than zero": { - topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":-123}'), - "is -123": function(c) { - assert.strictEqual(c.maxAge, -123); - }, - }, - "Infinity": { - topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":"Infinity"}'), - "is inf-as-string": function(c) { - assert.strictEqual(c.maxAge, "Infinity"); - }, - }, - "-Infinity": { - topic: Cookie.fromJSON.bind(null,'{"key":"foo","value":"bar","maxAge":"-Infinity"}'), - "is inf-as-string": function(c) { - assert.strictEqual(c.maxAge, "-Infinity"); - }, - }, - } -}) -.addBatch({ - "permuteDomain": { - "base case": { - topic: tough.permuteDomain.bind(null,'example.com'), - "got the domain": function(list) { - assert.deepEqual(list, ['example.com']); - }, - }, - "two levels": { - topic: tough.permuteDomain.bind(null,'foo.bar.example.com'), - "got three things": function(list) { - assert.deepEqual(list, ['example.com','bar.example.com','foo.bar.example.com']); - }, - }, - "invalid domain": { - topic: tough.permuteDomain.bind(null,'foo.bar.example.localduhmain'), - "got three things": function(list) { - assert.equal(list, null); - }, - }, - }, - "permutePath": { - "base case": { - topic: tough.permutePath.bind(null,'/'), - "just slash": function(list) { - assert.deepEqual(list,['/']); - }, - }, - "single case": { - topic: tough.permutePath.bind(null,'/foo'), - "two things": function(list) { - assert.deepEqual(list,['/foo','/']); - }, - "path matching": function(list) { - list.forEach(function(e) { - assert.ok(tough.pathMatch('/foo',e)); - }); - }, - }, - "double case": { - topic: tough.permutePath.bind(null,'/foo/bar'), - "four things": function(list) { - assert.deepEqual(list,['/foo/bar','/foo','/']); - }, - "path matching": function(list) { - list.forEach(function(e) { - assert.ok(tough.pathMatch('/foo/bar',e)); - }); - }, - }, - "trailing slash": { - topic: tough.permutePath.bind(null,'/foo/bar/'), - "three things": function(list) { - assert.deepEqual(list,['/foo/bar','/foo','/']); - }, - "path matching": function(list) { - list.forEach(function(e) { - assert.ok(tough.pathMatch('/foo/bar/',e)); - }); - }, - }, - } -}) -.addBatch({ - "Issue 1": { - topic: function() { - var cj = new CookieJar(); - cj.setCookie('hello=world; path=/some/path/', 'http://domain/some/path/file', function(err,cookie) { - this.callback(err,{cj:cj, cookie:cookie}); - }.bind(this)); - }, - "stored a cookie": function(t) { - assert.ok(t.cookie); - }, - "cookie's path was modified to remove unnecessary slash": function(t) { - assert.equal(t.cookie.path, '/some/path'); - }, - "getting it back": { - topic: function(t) { - t.cj.getCookies('http://domain/some/path/file', function(err,cookies) { - this.callback(err, {cj:t.cj, cookies:cookies||[]}); - }.bind(this)); - }, - "got one cookie": function(t) { - assert.lengthOf(t.cookies, 1); - }, - "it's the right one": function(t) { - var c = t.cookies[0]; - assert.equal(c.key, 'hello'); - assert.equal(c.value, 'world'); - }, - } - } -}) -.addBatch({ - "expiry option": { - topic: function() { - var cb = this.callback; - var cj = new CookieJar(); - cj.setCookie('near=expiry; Domain=example.com; Path=/; Max-Age=1','http://www.example.com',at(-1), function(err,cookie) { - - cb(err, {cj:cj, cookie:cookie}); - }); - }, - "set the cookie": function(t) { - assert.ok(t.cookie, "didn't set?!"); - assert.equal(t.cookie.key, 'near'); - }, - "then, retrieving": { - topic: function(t) { - var cb = this.callback; - setTimeout(function() { - t.cj.getCookies('http://www.example.com', {http:true, expire:false}, function(err,cookies) { - t.cookies = cookies; - cb(err,t); - }); - },2000); - }, - "got the cookie": function(t) { - assert.lengthOf(t.cookies, 1); - assert.equal(t.cookies[0].key, 'near'); - }, - } - } -}) -.addBatch({ - "trailing semi-colon set into cj": { - topic: function () { - var cb = this.callback; - var cj = new CookieJar(); - var ex = 'http://www.example.com'; - var tasks = []; - tasks.push(function(next) { - cj.setCookie('broken_path=testme; path=/;',ex,at(-1),next); - }); - tasks.push(function(next) { - cj.setCookie('b=2; Path=/;;;;',ex,at(-1),next); - }); - async.parallel(tasks, function (err, cookies) { - cb(null, { - cj: cj, - cookies: cookies - }); - }); - }, - "check number of cookies": function (t) { - assert.lengthOf(t.cookies, 2, "didn't set"); - }, - "check *broken_path* was set properly": function (t) { - assert.equal(t.cookies[0].key, "broken_path"); - assert.equal(t.cookies[0].value, "testme"); - assert.equal(t.cookies[0].path, "/"); - }, - "check *b* was set properly": function (t) { - assert.equal(t.cookies[1].key, "b"); - assert.equal(t.cookies[1].value, "2"); - assert.equal(t.cookies[1].path, "/"); - }, - "retrieve the cookie": { - topic: function (t) { - var cb = this.callback; - t.cj.getCookies('http://www.example.com', {}, function (err, cookies) { - t.cookies = cookies; - cb(err, t); - }); - }, - "get the cookie": function(t) { - assert.lengthOf(t.cookies, 2); - assert.equal(t.cookies[0].key, 'broken_path'); - assert.equal(t.cookies[0].value, 'testme'); - assert.equal(t.cookies[1].key, "b"); - assert.equal(t.cookies[1].value, "2"); - assert.equal(t.cookies[1].path, "/"); - }, - }, - } -}) -.addBatch({ - "Constructor":{ - topic: function () { - return new Cookie({ - key: 'test', - value: 'b', - maxAge: 60 - }); - }, - 'check for key property': function (c) { - assert.ok(c); - assert.equal(c.key, 'test'); - }, - 'check for value property': function (c) { - assert.equal(c.value, 'b'); - }, - 'check for maxAge': function (c) { - assert.equal(c.maxAge, 60); - }, - 'check for default values for unspecified properties': function (c) { - assert.equal(c.expires, "Infinity"); - assert.equal(c.secure, false); - assert.equal(c.httpOnly, false); - } - } -}) -.addBatch({ - "allPaths option": { - topic: function() { - var cj = new CookieJar(); - var tasks = []; - tasks.push(cj.setCookie.bind(cj, 'nopath_dom=qq; Path=/; Domain=example.com', 'http://example.com', {})); - tasks.push(cj.setCookie.bind(cj, 'path_dom=qq; Path=/foo; Domain=example.com', 'http://example.com', {})); - tasks.push(cj.setCookie.bind(cj, 'nopath_host=qq; Path=/', 'http://www.example.com', {})); - tasks.push(cj.setCookie.bind(cj, 'path_host=qq; Path=/foo', 'http://www.example.com', {})); - tasks.push(cj.setCookie.bind(cj, 'other=qq; Path=/', 'http://other.example.com/', {})); - tasks.push(cj.setCookie.bind(cj, 'other2=qq; Path=/foo', 'http://other.example.com/foo', {})); - var cb = this.callback; - async.parallel(tasks, function(err,results) { - cb(err, {cj:cj, cookies: results}); - }); - }, - "all set": function(t) { - assert.equal(t.cookies.length, 6); - assert.ok(t.cookies.every(function(c) { return !!c })); - }, - "getting without allPaths": { - topic: function(t) { - var cb = this.callback; - var cj = t.cj; - cj.getCookies('http://www.example.com/', {}, function(err,cookies) { - cb(err, {cj:cj, cookies:cookies}); - }); - }, - "found just two cookies": function(t) { - assert.equal(t.cookies.length, 2); - }, - "all are path=/": function(t) { - assert.ok(t.cookies.every(function(c) { return c.path === '/' })); - }, - "no 'other' cookies": function(t) { - assert.ok(!t.cookies.some(function(c) { return (/^other/).test(c.name) })); - }, - }, - "getting without allPaths for /foo": { - topic: function(t) { - var cb = this.callback; - var cj = t.cj; - cj.getCookies('http://www.example.com/foo', {}, function(err,cookies) { - cb(err, {cj:cj, cookies:cookies}); - }); - }, - "found four cookies": function(t) { - assert.equal(t.cookies.length, 4); - }, - "no 'other' cookies": function(t) { - assert.ok(!t.cookies.some(function(c) { return (/^other/).test(c.name) })); - }, - }, - "getting with allPaths:true": { - topic: function(t) { - var cb = this.callback; - var cj = t.cj; - cj.getCookies('http://www.example.com/', {allPaths:true}, function(err,cookies) { - cb(err, {cj:cj, cookies:cookies}); - }); - }, - "found four cookies": function(t) { - assert.equal(t.cookies.length, 4); - }, - "no 'other' cookies": function(t) { - assert.ok(!t.cookies.some(function(c) { return (/^other/).test(c.name) })); - }, - }, - } -}) -.export(module); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/LICENSE deleted file mode 100644 index a4a9aee0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/README.md deleted file mode 100644 index bb533d56..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/README.md +++ /dev/null @@ -1,4 +0,0 @@ -tunnel-agent -============ - -HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/index.js deleted file mode 100644 index 3f7bbb90..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/index.js +++ /dev/null @@ -1,227 +0,0 @@ -'use strict' - -var net = require('net') - , tls = require('tls') - , http = require('http') - , https = require('https') - , events = require('events') - , assert = require('assert') - , util = require('util') - ; - -exports.httpOverHttp = httpOverHttp -exports.httpsOverHttp = httpsOverHttp -exports.httpOverHttps = httpOverHttps -exports.httpsOverHttps = httpsOverHttps - - -function httpOverHttp(options) { - var agent = new TunnelingAgent(options) - agent.request = http.request - return agent -} - -function httpsOverHttp(options) { - var agent = new TunnelingAgent(options) - agent.request = http.request - agent.createSocket = createSecureSocket - return agent -} - -function httpOverHttps(options) { - var agent = new TunnelingAgent(options) - agent.request = https.request - return agent -} - -function httpsOverHttps(options) { - var agent = new TunnelingAgent(options) - agent.request = https.request - agent.createSocket = createSecureSocket - return agent -} - - -function TunnelingAgent(options) { - var self = this - self.options = options || {} - self.proxyOptions = self.options.proxy || {} - self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets - self.requests = [] - self.sockets = [] - - self.on('free', function onFree(socket, host, port) { - for (var i = 0, len = self.requests.length; i < len; ++i) { - var pending = self.requests[i] - if (pending.host === host && pending.port === port) { - // Detect the request to connect same origin server, - // reuse the connection. - self.requests.splice(i, 1) - pending.request.onSocket(socket) - return - } - } - socket.destroy() - self.removeSocket(socket) - }) -} -util.inherits(TunnelingAgent, events.EventEmitter) - -TunnelingAgent.prototype.addRequest = function addRequest(req, host, port) { - var self = this - - if (self.sockets.length >= this.maxSockets) { - // We are over limit so we'll add it to the queue. - self.requests.push({host: host, port: port, request: req}) - return - } - - // If we are under maxSockets create a new one. - self.createSocket({host: host, port: port, request: req}, function(socket) { - socket.on('free', onFree) - socket.on('close', onCloseOrRemove) - socket.on('agentRemove', onCloseOrRemove) - req.onSocket(socket) - - function onFree() { - self.emit('free', socket, host, port) - } - - function onCloseOrRemove(err) { - self.removeSocket() - socket.removeListener('free', onFree) - socket.removeListener('close', onCloseOrRemove) - socket.removeListener('agentRemove', onCloseOrRemove) - } - }) -} - -TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this - var placeholder = {} - self.sockets.push(placeholder) - - var connectOptions = mergeOptions({}, self.proxyOptions, - { method: 'CONNECT' - , path: options.host + ':' + options.port - , agent: false - } - ) - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {} - connectOptions.headers['Proxy-Authorization'] = 'Basic ' + - new Buffer(connectOptions.proxyAuth).toString('base64') - } - - debug('making CONNECT request') - var connectReq = self.request(connectOptions) - connectReq.useChunkedEncodingByDefault = false // for v0.6 - connectReq.once('response', onResponse) // for v0.6 - connectReq.once('upgrade', onUpgrade) // for v0.6 - connectReq.once('connect', onConnect) // for v0.7 or later - connectReq.once('error', onError) - connectReq.end() - - function onResponse(res) { - // Very hacky. This is necessary to avoid http-parser leaks. - res.upgrade = true - } - - function onUpgrade(res, socket, head) { - // Hacky. - process.nextTick(function() { - onConnect(res, socket, head) - }) - } - - function onConnect(res, socket, head) { - connectReq.removeAllListeners() - socket.removeAllListeners() - - if (res.statusCode === 200) { - assert.equal(head.length, 0) - debug('tunneling connection has established') - self.sockets[self.sockets.indexOf(placeholder)] = socket - cb(socket) - } else { - debug('tunneling socket could not be established, statusCode=%d', res.statusCode) - var error = new Error('tunneling socket could not be established, ' + 'statusCode=' + res.statusCode) - error.code = 'ECONNRESET' - options.request.emit('error', error) - self.removeSocket(placeholder) - } - } - - function onError(cause) { - connectReq.removeAllListeners() - - debug('tunneling socket could not be established, cause=%s\n', cause.message, cause.stack) - var error = new Error('tunneling socket could not be established, ' + 'cause=' + cause.message) - error.code = 'ECONNRESET' - options.request.emit('error', error) - self.removeSocket(placeholder) - } -} - -TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket) - if (pos === -1) return - - this.sockets.splice(pos, 1) - - var pending = this.requests.shift() - if (pending) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createSocket(pending, function(socket) { - pending.request.onSocket(socket) - }) - } -} - -function createSecureSocket(options, cb) { - var self = this - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - // 0 is dummy port for v0.6 - var secureSocket = tls.connect(0, mergeOptions({}, self.options, - { servername: options.host - , socket: socket - } - )) - cb(secureSocket) - }) -} - - -function mergeOptions(target) { - for (var i = 1, len = arguments.length; i < len; ++i) { - var overrides = arguments[i] - if (typeof overrides === 'object') { - var keys = Object.keys(overrides) - for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { - var k = keys[j] - if (overrides[k] !== undefined) { - target[k] = overrides[k] - } - } - } - } - return target -} - - -var debug -if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { - var args = Array.prototype.slice.call(arguments) - if (typeof args[0] === 'string') { - args[0] = 'TUNNEL: ' + args[0] - } else { - args.unshift('TUNNEL:') - } - console.error.apply(console, args) - } -} else { - debug = function() {} -} -exports.debug = debug // for test diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/package.json deleted file mode 100644 index acfa6e1c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/node_modules/tunnel-agent/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "author": { - "name": "Mikeal Rogers", - "email": "mikeal.rogers@gmail.com", - "url": "http://www.futurealoof.com" - }, - "name": "tunnel-agent", - "description": "HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.", - "version": "0.3.0", - "repository": { - "url": "https://github.com/mikeal/tunnel-agent" - }, - "main": "index.js", - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "readme": "tunnel-agent\n============\n\nHTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/mikeal/tunnel-agent/issues" - }, - "homepage": "https://github.com/mikeal/tunnel-agent", - "_id": "tunnel-agent@0.3.0", - "dist": { - "shasum": "ad681b68f5321ad2827c4cfb1b7d5df2cfe942ee" - }, - "_from": "tunnel-agent@~0.3.0", - "_resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.3.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/package.json deleted file mode 100755 index 57c99c02..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "request", - "description": "Simplified HTTP request client.", - "tags": [ - "http", - "simple", - "util", - "utility" - ], - "version": "2.31.0", - "author": { - "name": "Mikeal Rogers", - "email": "mikeal.rogers@gmail.com" - }, - "repository": { - "type": "git", - "url": "http://github.com/mikeal/request.git" - }, - "bugs": { - "url": "http://github.com/mikeal/request/issues" - }, - "engines": [ - "node >= 0.8.0" - ], - "main": "index.js", - "dependencies": { - "qs": "~0.6.0", - "json-stringify-safe": "~5.0.0", - "forever-agent": "~0.5.0", - "node-uuid": "~1.4.0", - "mime": "~1.2.9", - "tough-cookie": "~0.9.15", - "form-data": "~0.1.0", - "tunnel-agent": "~0.3.0", - "http-signature": "~0.10.0", - "oauth-sign": "~0.3.0", - "hawk": "~1.0.0", - "aws-sign2": "~0.5.0" - }, - "optionalDependencies": { - "tough-cookie": "~0.9.15", - "form-data": "~0.1.0", - "tunnel-agent": "~0.3.0", - "http-signature": "~0.10.0", - "oauth-sign": "~0.3.0", - "hawk": "~1.0.0", - "aws-sign2": "~0.5.0" - }, - "scripts": { - "test": "node tests/run.js" - }, - "readme": "# Request -- Simplified HTTP client\n\n[![NPM](https://nodei.co/npm/request.png)](https://nodei.co/npm/request/)\n\n## Super simple to use\n\nRequest is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.\n\n```javascript\nvar request = require('request');\nrequest('http://www.google.com', function (error, response, body) {\n if (!error && response.statusCode == 200) {\n console.log(body) // Print the google web page.\n }\n})\n```\n\n## Streaming\n\nYou can stream any response to a file stream.\n\n```javascript\nrequest('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))\n```\n\nYou can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers don’t already provide one).\n\n```javascript\nfs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))\n```\n\nRequest can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers.\n\n```javascript\nrequest.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))\n```\n\nNow let’s get fancy.\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n if (req.method === 'PUT') {\n req.pipe(request.put('http://mysite.com/doodle.png'))\n } else if (req.method === 'GET' || req.method === 'HEAD') {\n request.get('http://mysite.com/doodle.png').pipe(resp)\n }\n }\n})\n```\n\nYou can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do:\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n var x = request('http://mysite.com/doodle.png')\n req.pipe(x)\n x.pipe(resp)\n }\n})\n```\n\nAnd since `pipe()` returns the destination stream in ≥ Node 0.5.x you can do one line proxying. :)\n\n```javascript\nreq.pipe(request('http://mysite.com/doodle.png')).pipe(resp)\n```\n\nAlso, none of this new functionality conflicts with requests previous features, it just expands them.\n\n```javascript\nvar r = request.defaults({'proxy':'http://localproxy.com'})\n\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n r.get('http://google.com/doodle.png').pipe(resp)\n }\n})\n```\n\nYou can still use intermediate proxies, the requests will still follow HTTP forwards, etc.\n\n## Forms\n\n`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API.\n\nURL-encoded forms are simple.\n\n```javascript\nrequest.post('http://service.com/upload', {form:{key:'value'}})\n// or\nrequest.post('http://service.com/upload').form({key:'value'})\n```\n\nFor `multipart/form-data` we use the [form-data](https://github.com/felixge/node-form-data) library by [@felixge](https://github.com/felixge). You don’t need to worry about piping the form object or setting the headers, `request` will handle that for you.\n\n```javascript\nvar r = request.post('http://service.com/upload')\nvar form = r.form()\nform.append('my_field', 'my_value')\nform.append('my_buffer', new Buffer([1, 2, 3]))\nform.append('my_file', fs.createReadStream(path.join(__dirname, 'doodle.png'))\nform.append('remote_file', request('http://google.com/doodle.png'))\n```\n\n## HTTP Authentication\n\n```javascript\nrequest.get('http://some.server.com/').auth('username', 'password', false);\n// or\nrequest.get('http://some.server.com/', {\n 'auth': {\n 'user': 'username',\n 'pass': 'password',\n 'sendImmediately': false\n }\n});\n```\n\nIf passed as an option, `auth` should be a hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). The method form takes parameters `auth(username, password, sendImmediately)`.\n\n`sendImmediately` defaults to `true`, which causes a basic authentication header to be sent. If `sendImmediately` is `false`, then `request` will retry with a proper authentication header after receiving a `401` response from the server (which must contain a `WWW-Authenticate` header indicating the required authentication method).\n\nDigest authentication is supported, but it only works with `sendImmediately` set to `false`; otherwise `request` will send basic authentication on the initial request, which will probably cause the request to fail.\n\n## OAuth Signing\n\n```javascript\n// Twitter OAuth\nvar qs = require('querystring')\n , oauth =\n { callback: 'http://mysite.com/callback/'\n , consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n }\n , url = 'https://api.twitter.com/oauth/request_token'\n ;\nrequest.post({url:url, oauth:oauth}, function (e, r, body) {\n // Ideally, you would take the body in the response\n // and construct a URL that a user clicks on (like a sign in button).\n // The verifier is only available in the response after a user has\n // verified with twitter that they are authorizing your app.\n var access_token = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: access_token.oauth_token\n , verifier: access_token.oauth_verifier\n }\n , url = 'https://api.twitter.com/oauth/access_token'\n ;\n request.post({url:url, oauth:oauth}, function (e, r, body) {\n var perm_token = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: perm_token.oauth_token\n , token_secret: perm_token.oauth_token_secret\n }\n , url = 'https://api.twitter.com/1.1/users/show.json?'\n , params =\n { screen_name: perm_token.screen_name\n , user_id: perm_token.user_id\n }\n ;\n url += qs.stringify(params)\n request.get({url:url, oauth:oauth, json:true}, function (e, r, user) {\n console.log(user)\n })\n })\n})\n```\n\n### Custom HTTP Headers\n\nHTTP Headers, such as `User-Agent`, can be set in the `options` object.\nIn the example below, we call the github API to find out the number\nof stars and forks for the request repository. This requires a\ncustom `User-Agent` header as well as https.\n\n```javascript\nvar request = require('request');\n\nvar options = {\n\turl: 'https://api.github.com/repos/mikeal/request',\n\theaders: {\n\t\t'User-Agent': 'request'\n\t}\n};\n\nfunction callback(error, response, body) {\n\tif (!error && response.statusCode == 200) {\n\t\tvar info = JSON.parse(body);\n\t\tconsole.log(info.stargazers_count + \" Stars\");\n\t\tconsole.log(info.forks_count + \" Forks\");\n\t}\n}\n\nrequest(options, callback);\n```\n\n### request(options, callback)\n\nThe first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional.\n\n* `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()`\n* `qs` - object containing querystring values to be appended to the `uri`\n* `method` - http method (default: `\"GET\"`)\n* `headers` - http headers (default: `{}`)\n* `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`.\n* `form` - when passed an object, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header. When passed no options, a `FormData` instance is returned (and is piped to request).\n* `auth` - A hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). See documentation above.\n* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON.\n* `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below.\n* `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`)\n* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`)\n* `maxRedirects` - the maximum number of redirects to follow (default: `10`)\n* `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`.\n* `pool` - A hash object containing the agents for these requests. If omitted, the request will use the global pool (which is set to node's default `maxSockets`)\n* `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool.\n* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request\n* `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`)\n* `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above.\n* `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).\n* `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option.\n* `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section)\n* `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services)\n* `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.\n* `localAddress` - Local interface to bind for network connections.\n\n\nThe callback argument gets 3 arguments: \n\n1. An `error` when applicable (usually from [`http.ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) object)\n2. An [`http.IncomingMessage`](http://nodejs.org/api/http.html#http_http_incomingmessage) object\n3. The third is the `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied)\n\n## Convenience methods\n\nThere are also shorthand methods for different HTTP METHODs and some other conveniences.\n\n### request.defaults(options)\n\nThis method returns a wrapper around the normal request API that defaults to whatever options you pass in to it.\n\n### request.put\n\nSame as `request()`, but defaults to `method: \"PUT\"`.\n\n```javascript\nrequest.put(url)\n```\n\n### request.patch\n\nSame as `request()`, but defaults to `method: \"PATCH\"`.\n\n```javascript\nrequest.patch(url)\n```\n\n### request.post\n\nSame as `request()`, but defaults to `method: \"POST\"`.\n\n```javascript\nrequest.post(url)\n```\n\n### request.head\n\nSame as request() but defaults to `method: \"HEAD\"`.\n\n```javascript\nrequest.head(url)\n```\n\n### request.del\n\nSame as `request()`, but defaults to `method: \"DELETE\"`.\n\n```javascript\nrequest.del(url)\n```\n\n### request.get\n\nSame as `request()` (for uniformity).\n\n```javascript\nrequest.get(url)\n```\n### request.cookie\n\nFunction that creates a new cookie.\n\n```javascript\nrequest.cookie('cookie_string_here')\n```\n### request.jar\n\nFunction that creates a new cookie jar.\n\n```javascript\nrequest.jar()\n```\n\n\n## Examples:\n\n```javascript\n var request = require('request')\n , rand = Math.floor(Math.random()*100000000).toString()\n ;\n request(\n { method: 'PUT'\n , uri: 'http://mikeal.iriscouch.com/testjs/' + rand\n , multipart:\n [ { 'content-type': 'application/json'\n , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})\n }\n , { body: 'I am an attachment' }\n ]\n }\n , function (error, response, body) {\n if(response.statusCode == 201){\n console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand)\n } else {\n console.log('error: '+ response.statusCode)\n console.log(body)\n }\n }\n )\n```\n\nCookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`).\n\n```javascript\nvar request = request.defaults({jar: true})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\n\nTo use a custom cookie jar (instead `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`)\n\n```javascript\nvar j = request.jar()\nvar request = request.defaults({jar:j})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\nOR\n\nNote that `setCookie` requires at least three parameters, and the last is required to be a callback.\n\n```javascript\nvar j = request.jar()\nvar cookie = request.cookie('your_cookie_here')\nj.setCookie(cookie, uri, function (err, cookie){})\nrequest({url: 'http://www.google.com', jar: j}, function () {\n request('http://images.google.com')\n})\n```\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/mikeal/request", - "_id": "request@2.31.0", - "dist": { - "shasum": "4c8ac967c9a4b9410cb4ba1a61fdb644267eeeff" - }, - "_from": "request@~2.31.0", - "_resolved": "https://registry.npmjs.org/request/-/request-2.31.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/request.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/request.js deleted file mode 100644 index 3c03c47d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/request.js +++ /dev/null @@ -1,1260 +0,0 @@ -var optional = require('./lib/optional') - , http = require('http') - , https = optional('https') - , tls = optional('tls') - , url = require('url') - , util = require('util') - , stream = require('stream') - , qs = require('qs') - , querystring = require('querystring') - , crypto = require('crypto') - - , oauth = optional('oauth-sign') - , hawk = optional('hawk') - , aws = optional('aws-sign') - , httpSignature = optional('http-signature') - , uuid = require('node-uuid') - , mime = require('mime') - , tunnel = optional('tunnel-agent') - , _safeStringify = require('json-stringify-safe') - - , ForeverAgent = require('forever-agent') - , FormData = optional('form-data') - - , Cookie = optional('tough-cookie') - , CookieJar = Cookie && Cookie.CookieJar - , cookieJar = CookieJar && new CookieJar - - , copy = require('./lib/copy') - , debug = require('./lib/debug') - , getSafe = require('./lib/getSafe') - ; - -function safeStringify (obj) { - var ret - try { ret = JSON.stringify(obj) } - catch (e) { ret = _safeStringify(obj) } - return ret -} - -var globalPool = {} -var isUrl = /^https?:/i - - -// Hacky fix for pre-0.4.4 https -if (https && !https.Agent) { - https.Agent = function (options) { - http.Agent.call(this, options) - } - util.inherits(https.Agent, http.Agent) - https.Agent.prototype._getConnection = function (host, port, cb) { - var s = tls.connect(port, host, this.options, function () { - // do other checks here? - if (cb) cb() - }) - return s - } -} - -function isReadStream (rs) { - if (rs.readable && rs.path && rs.mode) { - return true - } -} - -function toBase64 (str) { - return (new Buffer(str || "", "ascii")).toString("base64") -} - -function md5 (str) { - return crypto.createHash('md5').update(str).digest('hex') -} - -function Request (options) { - stream.Stream.call(this) - this.readable = true - this.writable = true - - if (typeof options === 'string') { - options = {uri:options} - } - - var reserved = Object.keys(Request.prototype) - for (var i in options) { - if (reserved.indexOf(i) === -1) { - this[i] = options[i] - } else { - if (typeof options[i] === 'function') { - delete options[i] - } - } - } - - if (options.method) { - this.explicitMethod = true - } - - this.canTunnel = options.tunnel !== false && tunnel; - - this.init(options) -} -util.inherits(Request, stream.Stream) -Request.prototype.init = function (options) { - // init() contains all the code to setup the request object. - // the actual outgoing request is not started until start() is called - // this function is called from both the constructor and on redirect. - var self = this - if (!options) options = {} - - if (!self.method) self.method = options.method || 'GET' - self.localAddress = options.localAddress - - debug(options) - if (!self.pool && self.pool !== false) self.pool = globalPool - self.dests = self.dests || [] - self.__isRequestRequest = true - - // Protect against double callback - if (!self._callback && self.callback) { - self._callback = self.callback - self.callback = function () { - if (self._callbackCalled) return // Print a warning maybe? - self._callbackCalled = true - self._callback.apply(self, arguments) - } - self.on('error', self.callback.bind()) - self.on('complete', self.callback.bind(self, null)) - } - - if (self.url && !self.uri) { - // People use this property instead all the time so why not just support it. - self.uri = self.url - delete self.url - } - - if (!self.uri) { - // this will throw if unhandled but is handleable when in a redirect - return self.emit('error', new Error("options.uri is a required argument")) - } else { - if (typeof self.uri == "string") self.uri = url.parse(self.uri) - } - - if (self.strictSSL === false) { - self.rejectUnauthorized = false - } - - if (self.proxy) { - if (typeof self.proxy == 'string') self.proxy = url.parse(self.proxy) - - // do the HTTP CONNECT dance using koichik/node-tunnel - if (http.globalAgent && self.uri.protocol === "https:" && self.canTunnel) { - var tunnelFn = self.proxy.protocol === "http:" - ? tunnel.httpsOverHttp : tunnel.httpsOverHttps - - var tunnelOptions = { proxy: { host: self.proxy.hostname - , port: +self.proxy.port - , proxyAuth: self.proxy.auth - , headers: { Host: self.uri.hostname + ':' + - (self.uri.port || self.uri.protocol === 'https:' ? 443 : 80) }} - , rejectUnauthorized: self.rejectUnauthorized - , ca: this.ca } - - self.agent = tunnelFn(tunnelOptions) - self.tunnel = true - } - } - - if (!self.uri.pathname) {self.uri.pathname = '/'} - - if (!self.uri.host) { - // Invalid URI: it may generate lot of bad errors, like "TypeError: Cannot call method 'indexOf' of undefined" in CookieJar - // Detect and reject it as soon as possible - var faultyUri = url.format(self.uri) - var message = 'Invalid URI "' + faultyUri + '"' - if (Object.keys(options).length === 0) { - // No option ? This can be the sign of a redirect - // As this is a case where the user cannot do anything (they didn't call request directly with this URL) - // they should be warned that it can be caused by a redirection (can save some hair) - message += '. This can be caused by a crappy redirection.' - } - self.emit('error', new Error(message)) - return // This error was fatal - } - - self._redirectsFollowed = self._redirectsFollowed || 0 - self.maxRedirects = (self.maxRedirects !== undefined) ? self.maxRedirects : 10 - self.followRedirect = (self.followRedirect !== undefined) ? self.followRedirect : true - self.followAllRedirects = (self.followAllRedirects !== undefined) ? self.followAllRedirects : false - if (self.followRedirect || self.followAllRedirects) - self.redirects = self.redirects || [] - - self.headers = self.headers ? copy(self.headers) : {} - - self.setHost = false - if (!self.hasHeader('host')) { - self.setHeader('host', self.uri.hostname) - if (self.uri.port) { - if ( !(self.uri.port === 80 && self.uri.protocol === 'http:') && - !(self.uri.port === 443 && self.uri.protocol === 'https:') ) - self.setHeader('host', self.getHeader('host') + (':'+self.uri.port) ) - } - self.setHost = true - } - - self.jar(self._jar || options.jar) - - if (!self.uri.port) { - if (self.uri.protocol == 'http:') {self.uri.port = 80} - else if (self.uri.protocol == 'https:') {self.uri.port = 443} - } - - if (self.proxy && !self.tunnel) { - self.port = self.proxy.port - self.host = self.proxy.hostname - } else { - self.port = self.uri.port - self.host = self.uri.hostname - } - - self.clientErrorHandler = function (error) { - if (self._aborted) return - if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET' - && self.agent.addRequestNoreuse) { - self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) } - self.start() - self.req.end() - return - } - if (self.timeout && self.timeoutTimer) { - clearTimeout(self.timeoutTimer) - self.timeoutTimer = null - } - self.emit('error', error) - } - - self._parserErrorHandler = function (error) { - if (this.res) { - if (this.res.request) { - this.res.request.emit('error', error) - } else { - this.res.emit('error', error) - } - } else { - this._httpMessage.emit('error', error) - } - } - - if (options.form) { - self.form(options.form) - } - - if (options.qs) self.qs(options.qs) - - if (self.uri.path) { - self.path = self.uri.path - } else { - self.path = self.uri.pathname + (self.uri.search || "") - } - - if (self.path.length === 0) self.path = '/' - - - // Auth must happen last in case signing is dependent on other headers - if (options.oauth) { - self.oauth(options.oauth) - } - - if (options.aws) { - self.aws(options.aws) - } - - if (options.hawk) { - self.hawk(options.hawk) - } - - if (options.httpSignature) { - self.httpSignature(options.httpSignature) - } - - if (options.auth) { - if (Object.prototype.hasOwnProperty.call(options.auth, 'username')) options.auth.user = options.auth.username - if (Object.prototype.hasOwnProperty.call(options.auth, 'password')) options.auth.pass = options.auth.password - - self.auth( - options.auth.user, - options.auth.pass, - options.auth.sendImmediately - ) - } - - if (self.uri.auth && !self.hasHeader('authorization')) { - var authPieces = self.uri.auth.split(':').map(function(item){ return querystring.unescape(item) }) - self.auth(authPieces[0], authPieces.slice(1).join(':'), true) - } - if (self.proxy && self.proxy.auth && !self.hasHeader('proxy-authorization') && !self.tunnel) { - self.setHeader('proxy-authorization', "Basic " + toBase64(self.proxy.auth.split(':').map(function(item){ return querystring.unescape(item)}).join(':'))) - } - - - if (self.proxy && !self.tunnel) self.path = (self.uri.protocol + '//' + self.uri.host + self.path) - - if (options.json) { - self.json(options.json) - } else if (options.multipart) { - self.boundary = uuid() - self.multipart(options.multipart) - } - - if (self.body) { - var length = 0 - if (!Buffer.isBuffer(self.body)) { - if (Array.isArray(self.body)) { - for (var i = 0; i < self.body.length; i++) { - length += self.body[i].length - } - } else { - self.body = new Buffer(self.body) - length = self.body.length - } - } else { - length = self.body.length - } - if (length) { - if (!self.hasHeader('content-length')) self.setHeader('content-length', length) - } else { - throw new Error('Argument error, options.body.') - } - } - - var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol - , defaultModules = {'http:':http, 'https:':https} - , httpModules = self.httpModules || {} - ; - self.httpModule = httpModules[protocol] || defaultModules[protocol] - - if (!self.httpModule) return this.emit('error', new Error("Invalid protocol")) - - if (options.ca) self.ca = options.ca - - if (!self.agent) { - if (options.agentOptions) self.agentOptions = options.agentOptions - - if (options.agentClass) { - self.agentClass = options.agentClass - } else if (options.forever) { - self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL - } else { - self.agentClass = self.httpModule.Agent - } - } - - if (self.pool === false) { - self.agent = false - } else { - self.agent = self.agent || self.getAgent() - if (self.maxSockets) { - // Don't use our pooling if node has the refactored client - self.agent.maxSockets = self.maxSockets - } - if (self.pool.maxSockets) { - // Don't use our pooling if node has the refactored client - self.agent.maxSockets = self.pool.maxSockets - } - } - - self.on('pipe', function (src) { - if (self.ntick && self._started) throw new Error("You cannot pipe to this stream after the outbound request has started.") - self.src = src - if (isReadStream(src)) { - if (!self.hasHeader('content-type')) self.setHeader('content-type', mime.lookup(src.path)) - } else { - if (src.headers) { - for (var i in src.headers) { - if (!self.hasHeader(i)) { - self.setHeader(i, src.headers[i]) - } - } - } - if (self._json && !self.hasHeader('content-type')) - self.setHeader('content-type', 'application/json') - if (src.method && !self.explicitMethod) { - self.method = src.method - } - } - - // self.on('pipe', function () { - // console.error("You have already piped to this stream. Pipeing twice is likely to break the request.") - // }) - }) - - process.nextTick(function () { - if (self._aborted) return - - if (self._form) { - self.setHeaders(self._form.getHeaders()) - self._form.pipe(self) - } - if (self.body) { - if (Array.isArray(self.body)) { - self.body.forEach(function (part) { - self.write(part) - }) - } else { - self.write(self.body) - } - self.end() - } else if (self.requestBodyStream) { - console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe.") - self.requestBodyStream.pipe(self) - } else if (!self.src) { - if (self.method !== 'GET' && typeof self.method !== 'undefined') { - self.setHeader('content-length', 0) - } - self.end() - } - self.ntick = true - }) -} - -// Must call this when following a redirect from https to http or vice versa -// Attempts to keep everything as identical as possible, but update the -// httpModule, Tunneling agent, and/or Forever Agent in use. -Request.prototype._updateProtocol = function () { - var self = this - var protocol = self.uri.protocol - - if (protocol === 'https:') { - // previously was doing http, now doing https - // if it's https, then we might need to tunnel now. - if (self.proxy && self.canTunnel) { - self.tunnel = true - var tunnelFn = self.proxy.protocol === 'http:' - ? tunnel.httpsOverHttp : tunnel.httpsOverHttps - var tunnelOptions = { proxy: { host: self.proxy.hostname - , port: +self.proxy.port - , proxyAuth: self.proxy.auth } - , rejectUnauthorized: self.rejectUnauthorized - , ca: self.ca } - self.agent = tunnelFn(tunnelOptions) - return - } - - self.httpModule = https - switch (self.agentClass) { - case ForeverAgent: - self.agentClass = ForeverAgent.SSL - break - case http.Agent: - self.agentClass = https.Agent - break - default: - // nothing we can do. Just hope for the best. - return - } - - // if there's an agent, we need to get a new one. - if (self.agent) self.agent = self.getAgent() - - } else { - // previously was doing https, now doing http - // stop any tunneling. - if (self.tunnel) self.tunnel = false - self.httpModule = http - switch (self.agentClass) { - case ForeverAgent.SSL: - self.agentClass = ForeverAgent - break - case https.Agent: - self.agentClass = http.Agent - break - default: - // nothing we can do. just hope for the best - return - } - - // if there's an agent, then get a new one. - if (self.agent) { - self.agent = null - self.agent = self.getAgent() - } - } -} - -Request.prototype.getAgent = function () { - var Agent = this.agentClass - var options = {} - if (this.agentOptions) { - for (var i in this.agentOptions) { - options[i] = this.agentOptions[i] - } - } - if (this.ca) options.ca = this.ca - if (this.ciphers) options.ciphers = this.ciphers - if (this.secureProtocol) options.secureProtocol = this.secureProtocol - if (typeof this.rejectUnauthorized !== 'undefined') options.rejectUnauthorized = this.rejectUnauthorized - - if (this.cert && this.key) { - options.key = this.key - options.cert = this.cert - } - - var poolKey = '' - - // different types of agents are in different pools - if (Agent !== this.httpModule.Agent) { - poolKey += Agent.name - } - - if (!this.httpModule.globalAgent) { - // node 0.4.x - options.host = this.host - options.port = this.port - if (poolKey) poolKey += ':' - poolKey += this.host + ':' + this.port - } - - // ca option is only relevant if proxy or destination are https - var proxy = this.proxy - if (typeof proxy === 'string') proxy = url.parse(proxy) - var isHttps = (proxy && proxy.protocol === 'https:') || this.uri.protocol === 'https:' - if (isHttps) { - if (options.ca) { - if (poolKey) poolKey += ':' - poolKey += options.ca - } - - if (typeof options.rejectUnauthorized !== 'undefined') { - if (poolKey) poolKey += ':' - poolKey += options.rejectUnauthorized - } - - if (options.cert) - poolKey += options.cert.toString('ascii') + options.key.toString('ascii') - - if (options.ciphers) { - if (poolKey) poolKey += ':' - poolKey += options.ciphers - } - - if (options.secureProtocol) { - if (poolKey) poolKey += ':' - poolKey += options.secureProtocol - } - } - - if (this.pool === globalPool && !poolKey && Object.keys(options).length === 0 && this.httpModule.globalAgent) { - // not doing anything special. Use the globalAgent - return this.httpModule.globalAgent - } - - // we're using a stored agent. Make sure it's protocol-specific - poolKey = this.uri.protocol + poolKey - - // already generated an agent for this setting - if (this.pool[poolKey]) return this.pool[poolKey] - - return this.pool[poolKey] = new Agent(options) -} - -Request.prototype.start = function () { - // start() is called once we are ready to send the outgoing HTTP request. - // this is usually called on the first write(), end() or on nextTick() - var self = this - - if (self._aborted) return - - self._started = true - self.method = self.method || 'GET' - self.href = self.uri.href - - if (self.src && self.src.stat && self.src.stat.size && !self.hasHeader('content-length')) { - self.setHeader('content-length', self.src.stat.size) - } - if (self._aws) { - self.aws(self._aws, true) - } - - // We have a method named auth, which is completely different from the http.request - // auth option. If we don't remove it, we're gonna have a bad time. - var reqOptions = copy(self) - delete reqOptions.auth - - debug('make request', self.uri.href) - self.req = self.httpModule.request(reqOptions, self.onResponse.bind(self)) - - if (self.timeout && !self.timeoutTimer) { - self.timeoutTimer = setTimeout(function () { - self.req.abort() - var e = new Error("ETIMEDOUT") - e.code = "ETIMEDOUT" - self.emit("error", e) - }, self.timeout) - - // Set additional timeout on socket - in case if remote - // server freeze after sending headers - if (self.req.setTimeout) { // only works on node 0.6+ - self.req.setTimeout(self.timeout, function () { - if (self.req) { - self.req.abort() - var e = new Error("ESOCKETTIMEDOUT") - e.code = "ESOCKETTIMEDOUT" - self.emit("error", e) - } - }) - } - } - - self.req.on('error', self.clientErrorHandler) - self.req.on('drain', function() { - self.emit('drain') - }) - self.on('end', function() { - if ( self.req.connection ) self.req.connection.removeListener('error', self._parserErrorHandler) - }) - self.emit('request', self.req) -} -Request.prototype.onResponse = function (response) { - var self = this - debug('onResponse', self.uri.href, response.statusCode, response.headers) - response.on('end', function() { - debug('response end', self.uri.href, response.statusCode, response.headers) - }); - - if (response.connection.listeners('error').indexOf(self._parserErrorHandler) === -1) { - response.connection.once('error', self._parserErrorHandler) - } - if (self._aborted) { - debug('aborted', self.uri.href) - response.resume() - return - } - if (self._paused) response.pause() - else response.resume() - - self.response = response - response.request = self - response.toJSON = toJSON - - // XXX This is different on 0.10, because SSL is strict by default - if (self.httpModule === https && - self.strictSSL && - !response.client.authorized) { - debug('strict ssl error', self.uri.href) - var sslErr = response.client.authorizationError - self.emit('error', new Error('SSL Error: '+ sslErr)) - return - } - - if (self.setHost && self.hasHeader('host')) delete self.headers[self.hasHeader('host')] - if (self.timeout && self.timeoutTimer) { - clearTimeout(self.timeoutTimer) - self.timeoutTimer = null - } - - var addCookie = function (cookie) { - if (self._jar){ - var targetCookieJar = self._jar.setCookie?self._jar:cookieJar; - - //set the cookie if it's domain in the href's domain. - targetCookieJar.setCookie(cookie, self.uri.href, function(err){ - if (err){ - console.warn('set cookie failed,'+ err) - } - }) - } - - } - - if (hasHeader('set-cookie', response.headers) && (!self._disableCookies)) { - var headerName = hasHeader('set-cookie', response.headers) - if (Array.isArray(response.headers[headerName])) response.headers[headerName].forEach(addCookie) - else addCookie(response.headers[headerName]) - } - - var redirectTo = null - if (response.statusCode >= 300 && response.statusCode < 400 && hasHeader('location', response.headers)) { - var location = response.headers[hasHeader('location', response.headers)] - debug('redirect', location) - - if (self.followAllRedirects) { - redirectTo = location - } else if (self.followRedirect) { - switch (self.method) { - case 'PATCH': - case 'PUT': - case 'POST': - case 'DELETE': - // Do not follow redirects - break - default: - redirectTo = location - break - } - } - } else if (response.statusCode == 401 && self._hasAuth && !self._sentAuth) { - var authHeader = response.headers[hasHeader('www-authenticate', response.headers)] - var authVerb = authHeader && authHeader.split(' ')[0] - debug('reauth', authVerb) - - switch (authVerb) { - case 'Basic': - self.auth(self._user, self._pass, true) - redirectTo = self.uri - break - - case 'Digest': - // TODO: More complete implementation of RFC 2617. - // - check challenge.algorithm - // - support algorithm="MD5-sess" - // - handle challenge.domain - // - support qop="auth-int" only - // - handle Authentication-Info (not necessarily?) - // - check challenge.stale (not necessarily?) - // - increase nc (not necessarily?) - // For reference: - // http://tools.ietf.org/html/rfc2617#section-3 - // https://github.com/bagder/curl/blob/master/lib/http_digest.c - - var challenge = {} - var re = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi - for (;;) { - var match = re.exec(authHeader) - if (!match) break - challenge[match[1]] = match[2] || match[3]; - } - - var ha1 = md5(self._user + ':' + challenge.realm + ':' + self._pass) - var ha2 = md5(self.method + ':' + self.uri.path) - var qop = /(^|,)\s*auth\s*($|,)/.test(challenge.qop) && 'auth' - var nc = qop && '00000001' - var cnonce = qop && uuid().replace(/-/g, '') - var digestResponse = qop ? md5(ha1 + ':' + challenge.nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + ha2) : md5(ha1 + ':' + challenge.nonce + ':' + ha2) - var authValues = { - username: self._user, - realm: challenge.realm, - nonce: challenge.nonce, - uri: self.uri.path, - qop: qop, - response: digestResponse, - nc: nc, - cnonce: cnonce, - algorithm: challenge.algorithm, - opaque: challenge.opaque - } - - authHeader = [] - for (var k in authValues) { - if (!authValues[k]) { - //ignore - } else if (k === 'qop' || k === 'nc' || k === 'algorithm') { - authHeader.push(k + '=' + authValues[k]) - } else { - authHeader.push(k + '="' + authValues[k] + '"') - } - } - authHeader = 'Digest ' + authHeader.join(', ') - self.setHeader('authorization', authHeader) - self._sentAuth = true - - redirectTo = self.uri - break - } - } - - if (redirectTo) { - debug('redirect to', redirectTo) - - // ignore any potential response body. it cannot possibly be useful - // to us at this point. - if (self._paused) response.resume() - - if (self._redirectsFollowed >= self.maxRedirects) { - self.emit('error', new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+self.uri.href)) - return - } - self._redirectsFollowed += 1 - - if (!isUrl.test(redirectTo)) { - redirectTo = url.resolve(self.uri.href, redirectTo) - } - - var uriPrev = self.uri - self.uri = url.parse(redirectTo) - - // handle the case where we change protocol from https to http or vice versa - if (self.uri.protocol !== uriPrev.protocol) { - self._updateProtocol() - } - - self.redirects.push( - { statusCode : response.statusCode - , redirectUri: redirectTo - } - ) - if (self.followAllRedirects && response.statusCode != 401) self.method = 'GET' - // self.method = 'GET' // Force all redirects to use GET || commented out fixes #215 - delete self.src - delete self.req - delete self.agent - delete self._started - if (response.statusCode != 401) { - // Remove parameters from the previous response, unless this is the second request - // for a server that requires digest authentication. - delete self.body - delete self._form - if (self.headers) { - if (self.hasHeader('host')) delete self.headers[self.hasHeader('host')] - if (self.hasHeader('content-type')) delete self.headers[self.hasHeader('content-type')] - if (self.hasHeader('content-length')) delete self.headers[self.hasHeader('content-length')] - } - } - - self.emit('redirect'); - - self.init() - return // Ignore the rest of the response - } else { - self._redirectsFollowed = self._redirectsFollowed || 0 - // Be a good stream and emit end when the response is finished. - // Hack to emit end on close because of a core bug that never fires end - response.on('close', function () { - if (!self._ended) self.response.emit('end') - }) - - if (self.encoding) { - if (self.dests.length !== 0) { - console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.") - } else { - response.setEncoding(self.encoding) - } - } - - self.emit('response', response) - - self.dests.forEach(function (dest) { - self.pipeDest(dest) - }) - - response.on("data", function (chunk) { - self._destdata = true - self.emit("data", chunk) - }) - response.on("end", function (chunk) { - self._ended = true - self.emit("end", chunk) - }) - response.on("close", function () {self.emit("close")}) - - if (self.callback) { - var buffer = [] - var bodyLen = 0 - self.on("data", function (chunk) { - buffer.push(chunk) - bodyLen += chunk.length - }) - self.on("end", function () { - debug('end event', self.uri.href) - if (self._aborted) { - debug('aborted', self.uri.href) - return - } - - if (buffer.length && Buffer.isBuffer(buffer[0])) { - debug('has body', self.uri.href, bodyLen) - var body = new Buffer(bodyLen) - var i = 0 - buffer.forEach(function (chunk) { - chunk.copy(body, i, 0, chunk.length) - i += chunk.length - }) - if (self.encoding === null) { - response.body = body - } else { - response.body = body.toString(self.encoding) - } - } else if (buffer.length) { - // The UTF8 BOM [0xEF,0xBB,0xBF] is converted to [0xFE,0xFF] in the JS UTC16/UCS2 representation. - // Strip this value out when the encoding is set to 'utf8', as upstream consumers won't expect it and it breaks JSON.parse(). - if (self.encoding === 'utf8' && buffer[0].length > 0 && buffer[0][0] === "\uFEFF") { - buffer[0] = buffer[0].substring(1) - } - response.body = buffer.join('') - } - - if (self._json) { - try { - response.body = JSON.parse(response.body) - } catch (e) {} - } - debug('emitting complete', self.uri.href) - if(response.body == undefined && !self._json) { - response.body = ""; - } - self.emit('complete', response, response.body) - }) - } - //if no callback - else{ - self.on("end", function () { - if (self._aborted) { - debug('aborted', self.uri.href) - return - } - self.emit('complete', response); - }); - } - } - debug('finish init function', self.uri.href) -} - -Request.prototype.abort = function () { - this._aborted = true - - if (this.req) { - this.req.abort() - } - else if (this.response) { - this.response.abort() - } - - this.emit("abort") -} - -Request.prototype.pipeDest = function (dest) { - var response = this.response - // Called after the response is received - if (dest.headers && !dest.headersSent) { - if (hasHeader('content-type', response.headers)) { - var ctname = hasHeader('content-type', response.headers) - if (dest.setHeader) dest.setHeader(ctname, response.headers[ctname]) - else dest.headers[ctname] = response.headers[ctname] - } - - if (hasHeader('content-length', response.headers)) { - var clname = hasHeader('content-length', response.headers) - if (dest.setHeader) dest.setHeader(clname, response.headers[clname]) - else dest.headers[clname] = response.headers[clname] - } - } - if (dest.setHeader && !dest.headersSent) { - for (var i in response.headers) { - dest.setHeader(i, response.headers[i]) - } - dest.statusCode = response.statusCode - } - if (this.pipefilter) this.pipefilter(response, dest) -} - -// Composable API -Request.prototype.setHeader = function (name, value, clobber) { - if (clobber === undefined) clobber = true - if (clobber || !this.hasHeader(name)) this.headers[name] = value - else this.headers[this.hasHeader(name)] += ',' + value - return this -} -Request.prototype.setHeaders = function (headers) { - for (var i in headers) {this.setHeader(i, headers[i])} - return this -} -Request.prototype.hasHeader = function (header, headers) { - var headers = Object.keys(headers || this.headers) - , lheaders = headers.map(function (h) {return h.toLowerCase()}) - ; - header = header.toLowerCase() - for (var i=0;i<lheaders.length;i++) { - if (lheaders[i] === header) return headers[i] - } - return false -} - -var hasHeader = Request.prototype.hasHeader - -Request.prototype.qs = function (q, clobber) { - var base - if (!clobber && this.uri.query) base = qs.parse(this.uri.query) - else base = {} - - for (var i in q) { - base[i] = q[i] - } - - if (qs.stringify(base) === ''){ - return this - } - - this.uri = url.parse(this.uri.href.split('?')[0] + '?' + qs.stringify(base)) - this.url = this.uri - this.path = this.uri.path - - return this -} -Request.prototype.form = function (form) { - if (form) { - this.setHeader('content-type', 'application/x-www-form-urlencoded; charset=utf-8') - this.body = qs.stringify(form).toString('utf8') - return this - } - // create form-data object - this._form = new FormData() - return this._form -} -Request.prototype.multipart = function (multipart) { - var self = this - self.body = [] - - if (!self.hasHeader('content-type')) { - self.setHeader('content-type', 'multipart/related; boundary=' + self.boundary) - } else { - var headerName = self.hasHeader('content-type'); - self.setHeader(headerName, self.headers[headerName].split(';')[0] + '; boundary=' + self.boundary) - } - - if (!multipart.forEach) throw new Error('Argument error, options.multipart.') - - if (self.preambleCRLF) { - self.body.push(new Buffer('\r\n')) - } - - multipart.forEach(function (part) { - var body = part.body - if(body == null) throw Error('Body attribute missing in multipart.') - delete part.body - var preamble = '--' + self.boundary + '\r\n' - Object.keys(part).forEach(function (key) { - preamble += key + ': ' + part[key] + '\r\n' - }) - preamble += '\r\n' - self.body.push(new Buffer(preamble)) - self.body.push(new Buffer(body)) - self.body.push(new Buffer('\r\n')) - }) - self.body.push(new Buffer('--' + self.boundary + '--')) - return self -} -Request.prototype.json = function (val) { - var self = this - - if (!self.hasHeader('accept')) self.setHeader('accept', 'application/json') - - this._json = true - if (typeof val === 'boolean') { - if (typeof this.body === 'object') { - this.body = safeStringify(this.body) - self.setHeader('content-type', 'application/json') - } - } else { - this.body = safeStringify(val) - self.setHeader('content-type', 'application/json') - } - return this -} -Request.prototype.getHeader = function (name, headers) { - var result, re, match - if (!headers) headers = this.headers - Object.keys(headers).forEach(function (key) { - re = new RegExp(name, 'i') - match = key.match(re) - if (match) result = headers[key] - }) - return result -} -var getHeader = Request.prototype.getHeader - -Request.prototype.auth = function (user, pass, sendImmediately) { - if (typeof user !== 'string' || (pass !== undefined && typeof pass !== 'string')) { - throw new Error('auth() received invalid user or password') - } - this._user = user - this._pass = pass - this._hasAuth = true - var header = typeof pass !== 'undefined' ? user + ':' + pass : user - if (sendImmediately || typeof sendImmediately == 'undefined') { - this.setHeader('authorization', 'Basic ' + toBase64(header)) - this._sentAuth = true - } - return this -} -Request.prototype.aws = function (opts, now) { - if (!now) { - this._aws = opts - return this - } - var date = new Date() - this.setHeader('date', date.toUTCString()) - var auth = - { key: opts.key - , secret: opts.secret - , verb: this.method.toUpperCase() - , date: date - , contentType: this.getHeader('content-type') || '' - , md5: this.getHeader('content-md5') || '' - , amazonHeaders: aws.canonicalizeHeaders(this.headers) - } - if (opts.bucket && this.path) { - auth.resource = '/' + opts.bucket + this.path - } else if (opts.bucket && !this.path) { - auth.resource = '/' + opts.bucket - } else if (!opts.bucket && this.path) { - auth.resource = this.path - } else if (!opts.bucket && !this.path) { - auth.resource = '/' - } - auth.resource = aws.canonicalizeResource(auth.resource) - this.setHeader('authorization', aws.authorization(auth)) - - return this -} -Request.prototype.httpSignature = function (opts) { - var req = this - httpSignature.signRequest({ - getHeader: function(header) { - return getHeader(header, req.headers) - }, - setHeader: function(header, value) { - req.setHeader(header, value) - }, - method: this.method, - path: this.path - }, opts) - debug('httpSignature authorization', this.getHeader('authorization')) - - return this -} - -Request.prototype.hawk = function (opts) { - this.setHeader('Authorization', hawk.client.header(this.uri, this.method, opts).field) -} - -Request.prototype.oauth = function (_oauth) { - var form - if (this.hasHeader('content-type') && - this.getHeader('content-type').slice(0, 'application/x-www-form-urlencoded'.length) === - 'application/x-www-form-urlencoded' - ) { - form = qs.parse(this.body) - } - if (this.uri.query) { - form = qs.parse(this.uri.query) - } - if (!form) form = {} - var oa = {} - for (var i in form) oa[i] = form[i] - for (var i in _oauth) oa['oauth_'+i] = _oauth[i] - if (!oa.oauth_version) oa.oauth_version = '1.0' - if (!oa.oauth_timestamp) oa.oauth_timestamp = Math.floor( Date.now() / 1000 ).toString() - if (!oa.oauth_nonce) oa.oauth_nonce = uuid().replace(/-/g, '') - - oa.oauth_signature_method = 'HMAC-SHA1' - - var consumer_secret = oa.oauth_consumer_secret - delete oa.oauth_consumer_secret - var token_secret = oa.oauth_token_secret - delete oa.oauth_token_secret - var timestamp = oa.oauth_timestamp - - var baseurl = this.uri.protocol + '//' + this.uri.host + this.uri.pathname - var signature = oauth.hmacsign(this.method, baseurl, oa, consumer_secret, token_secret) - - // oa.oauth_signature = signature - for (var i in form) { - if ( i.slice(0, 'oauth_') in _oauth) { - // skip - } else { - delete oa['oauth_'+i] - if (i !== 'x_auth_mode') delete oa[i] - } - } - oa.oauth_timestamp = timestamp - var authHeader = 'OAuth '+Object.keys(oa).sort().map(function (i) {return i+'="'+oauth.rfc3986(oa[i])+'"'}).join(',') - authHeader += ',oauth_signature="' + oauth.rfc3986(signature) + '"' - this.setHeader('Authorization', authHeader) - return this -} -Request.prototype.jar = function (jar) { - var cookies - - if (this._redirectsFollowed === 0) { - this.originalCookieHeader = this.getHeader('cookie') - } - - if (!jar) { - // disable cookies - cookies = false - this._disableCookies = true - } else { - var targetCookieJar = (jar && jar.getCookieString)?jar:cookieJar; - var urihref = this.uri.href - - //fetch cookie in the Specified host - targetCookieJar.getCookieString(urihref, function(err, hrefCookie){ - if (err){ - console.warn('get cookieString failed,' +err) - } else { - cookies = hrefCookie - } - }) - - } - - //if need cookie and cookie is not empty - if (cookies && cookies.length) { - if (this.originalCookieHeader) { - // Don't overwrite existing Cookie header - this.setHeader('cookie', this.originalCookieHeader + '; ' + cookies) - } else { - this.setHeader('cookie', cookies) - } - } - this._jar = jar - return this -} - - -// Stream API -Request.prototype.pipe = function (dest, opts) { - if (this.response) { - if (this._destdata) { - throw new Error("You cannot pipe after data has been emitted from the response.") - } else if (this._ended) { - throw new Error("You cannot pipe after the response has been ended.") - } else { - stream.Stream.prototype.pipe.call(this, dest, opts) - this.pipeDest(dest) - return dest - } - } else { - this.dests.push(dest) - stream.Stream.prototype.pipe.call(this, dest, opts) - return dest - } -} -Request.prototype.write = function () { - if (!this._started) this.start() - return this.req.write.apply(this.req, arguments) -} -Request.prototype.end = function (chunk) { - if (chunk) this.write(chunk) - if (!this._started) this.start() - this.req.end() -} -Request.prototype.pause = function () { - if (!this.response) this._paused = true - else this.response.pause.apply(this.response, arguments) -} -Request.prototype.resume = function () { - if (!this.response) this._paused = false - else this.response.resume.apply(this.response, arguments) -} -Request.prototype.destroy = function () { - if (!this._ended) this.end() - else if (this.response) this.response.destroy() -} - -function toJSON () { - return getSafe(this, '__' + (((1+Math.random())*0x10000)|0).toString(16)) -} - -Request.prototype.toJSON = toJSON - - -module.exports = Request diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.jshintrc b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.jshintrc deleted file mode 100644 index c8ef3ca4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.jshintrc +++ /dev/null @@ -1,59 +0,0 @@ -{ - "predef": [ ] - , "bitwise": false - , "camelcase": false - , "curly": false - , "eqeqeq": false - , "forin": false - , "immed": false - , "latedef": false - , "noarg": true - , "noempty": true - , "nonew": true - , "plusplus": false - , "quotmark": true - , "regexp": false - , "undef": true - , "unused": true - , "strict": false - , "trailing": true - , "maxlen": 120 - , "asi": true - , "boss": true - , "debug": true - , "eqnull": true - , "esnext": true - , "evil": true - , "expr": true - , "funcscope": false - , "globalstrict": false - , "iterator": false - , "lastsemic": true - , "laxbreak": true - , "laxcomma": true - , "loopfunc": true - , "multistr": false - , "onecase": false - , "proto": false - , "regexdash": false - , "scripturl": true - , "smarttabs": false - , "shadow": false - , "sub": true - , "supernew": false - , "validthis": true - , "browser": true - , "couch": false - , "devel": false - , "dojo": false - , "mootools": false - , "node": true - , "nonstandard": true - , "prototypejs": false - , "rhino": false - , "worker": true - , "wsh": false - , "nomen": false - , "onevar": false - , "passfail": false -} \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.travis.yml deleted file mode 100644 index 12b1a310..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: node_js -node_js: -- '0.8' -- '0.10' -- '0.11' -branches: - only: - - master -notifications: - email: - - rod@vagg.org -script: npm test -env: - global: - - SAUCE_USER=through2-sauce - - secure: A8KyygIlklZOcTwTGhZHpkOu7Cn4tI1QQasg75CTSjudczGzkuh1pG2RDIkWqGcrWv9o5CjI6fFYYx0JvQu8o5PO+ZAtV1Z0AlnM965vE8kAx0XEC7giAV323bibfnHwyQu74vIhbOfdes7E4/cYerV2kAjK0T375D4DYEpDuvw= - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/LICENSE deleted file mode 100644 index f6a0029d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/LICENSE +++ /dev/null @@ -1,39 +0,0 @@ -Copyright 2013, Rod Vagg (the "Original Author") -All rights reserved. - -MIT +no-false-attribs License - -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. - -Distributions of all or part of the Software intended to be used -by the recipients as they would use the unmodified Software, -containing modifications that substantially alter, remove, or -disable functionality of the Software, outside of the documented -configuration mechanisms provided by the Software, shall be -modified such that the Original Author's bug reporting email -addresses and urls are either replaced with the contact information -of the parties responsible for the changes, or removed entirely. - -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. - - -Except where noted, this license applies to any and all software -programs and associated documentation files created by the -Original Author, when distributed with the Software. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/README.md deleted file mode 100644 index c9388b38..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/README.md +++ /dev/null @@ -1,131 +0,0 @@ -# through2 - -<!-- - -soon ... - -[![Build Status](https://secure.travis-ci.org/rvagg/through2.png)](http://travis-ci.org/rvagg/through2) - -[![Build Status](https://saucelabs.com/browser-matrix/through2-sauce.svg)](https://travis-ci.org/rvagg/through2) - ---> - -[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/) - -<!-- -not happy with these, we need to peg to readable-stream@1.0.x so it'll always report out-of-date - -[![david-dm](https://david-dm.org/rvagg/through2.png)](https://david-dm.org/rvagg/through2/) -[![david-dm](https://david-dm.org/rvagg/through2/dev-status.png)](https://david-dm.org/rvagg/through2#info=devDependencies/) ---> - -**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise** - -Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`. - -```js -fs.createReadStream('ex.txt') - .pipe(through2(function (chunk, enc, callback) { - - for (var i = 0; i < chunk.length; i++) - if (chunk[i] == 97) - chunk[i] = 122 // swap 'a' for 'z' - - this.push(chunk) - - callback() - - })) - .pipe(fs.createWriteStream('out.txt')) -``` - -Or object streams: - -```js -var all = [] - -fs.createReadStream('data.csv') - .pipe(csv2()) - .pipe(through2.obj(function (chunk, enc, callback) { - - var data = { - name : chunk[0] - , address : chunk[3] - , phone : chunk[10] - } - - this.push(data) - - callback() - - })) - .on('data', function (data) { - all.push(data) - }) - .on('end', function () { - doSomethingSpecial(all) - }) -``` - -Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`. - -## API - -<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b> - -Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`). - -### options - -The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`). - -The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call: - -```js -fs.createReadStream('/tmp/important.dat') - .pipe(through2({ objectMode: true, allowHalfOpen: false }, function (chunk, enc, cb) { - - this.push(new Buffer('wut?')) - cb() - - }) - .pipe(fs.createWriteStream('/tmp/wut.txt')) -``` - -### transformFunction - -The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk. - -To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on. - -If you **do not provide a `transformFunction`** then you will get a simple simple pass-through stream. - -### flushFunction - -The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress. - -<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b> - -Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances. - -```js -var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) { - if (record.temp != null && record.unit = "F") { - record.temp = ( ( record.temp - 32 ) * 5 ) / 9 - record.unit = "C" - } - this.push(record) - callback() -}) - -// Create instances of FToC like so: -var converter = new FToC() -// Or: -var converter = FToC() -// Or specify/override options when you instantiate, if you prefer: -var converter = FToC({objectMode: true}) -``` - -## License - -**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/.npmignore deleted file mode 100644 index 38344f87..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/README.md deleted file mode 100644 index be976683..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/README.md +++ /dev/null @@ -1,768 +0,0 @@ -# readable-stream - -A new class of streams for Node.js - -This module provides the new Stream base classes introduced in Node -v0.10, for use in Node v0.8. You can use it to have programs that -have to work with node v0.8, while being forward-compatible for v0.10 -and beyond. When you drop support for v0.8, you can remove this -module, and only use the native streams. - -This is almost exactly the same codebase as appears in Node v0.10. -However: - -1. The exported object is actually the Readable class. Decorating the - native `stream` module would be global pollution. -2. In v0.10, you can safely use `base64` as an argument to - `setEncoding` in Readable streams. However, in v0.8, the - StringDecoder class has no `end()` method, which is problematic for - Base64. So, don't use that, because it'll break and be weird. - -Other than that, the API is the same as `require('stream')` in v0.10, -so the API docs are reproduced below. - ----------- - - Stability: 2 - Unstable - -A stream is an abstract interface implemented by various objects in -Node. For example a request to an HTTP server is a stream, as is -stdout. Streams are readable, writable, or both. All streams are -instances of [EventEmitter][] - -You can load the Stream base classes by doing `require('stream')`. -There are base classes provided for Readable streams, Writable -streams, Duplex streams, and Transform streams. - -## Compatibility - -In earlier versions of Node, the Readable stream interface was -simpler, but also less powerful and less useful. - -* Rather than waiting for you to call the `read()` method, `'data'` - events would start emitting immediately. If you needed to do some - I/O to decide how to handle data, then you had to store the chunks - in some kind of buffer so that they would not be lost. -* The `pause()` method was advisory, rather than guaranteed. This - meant that you still had to be prepared to receive `'data'` events - even when the stream was in a paused state. - -In Node v0.10, the Readable class described below was added. For -backwards compatibility with older Node programs, Readable streams -switch into "old mode" when a `'data'` event handler is added, or when -the `pause()` or `resume()` methods are called. The effect is that, -even if you are not using the new `read()` method and `'readable'` -event, you no longer have to worry about losing `'data'` chunks. - -Most programs will continue to function normally. However, this -introduces an edge case in the following conditions: - -* No `'data'` event handler is added. -* The `pause()` and `resume()` methods are never called. - -For example, consider the following code: - -```javascript -// WARNING! BROKEN! -net.createServer(function(socket) { - - // we add an 'end' method, but never consume the data - socket.on('end', function() { - // It will never get here. - socket.end('I got your message (but didnt read it)\n'); - }); - -}).listen(1337); -``` - -In versions of node prior to v0.10, the incoming message data would be -simply discarded. However, in Node v0.10 and beyond, the socket will -remain paused forever. - -The workaround in this situation is to call the `resume()` method to -trigger "old mode" behavior: - -```javascript -// Workaround -net.createServer(function(socket) { - - socket.on('end', function() { - socket.end('I got your message (but didnt read it)\n'); - }); - - // start the flow of data, discarding it. - socket.resume(); - -}).listen(1337); -``` - -In addition to new Readable streams switching into old-mode, pre-v0.10 -style streams can be wrapped in a Readable class using the `wrap()` -method. - -## Class: stream.Readable - -<!--type=class--> - -A `Readable Stream` has the following methods, members, and events. - -Note that `stream.Readable` is an abstract class designed to be -extended with an underlying implementation of the `_read(size)` -method. (See below.) - -### new stream.Readable([options]) - -* `options` {Object} - * `highWaterMark` {Number} The maximum number of bytes to store in - the internal buffer before ceasing to read from the underlying - resource. Default=16kb - * `encoding` {String} If specified, then buffers will be decoded to - strings using the specified encoding. Default=null - * `objectMode` {Boolean} Whether this stream should behave - as a stream of objects. Meaning that stream.read(n) returns - a single value instead of a Buffer of size n - -In classes that extend the Readable class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### readable.\_read(size) - -* `size` {Number} Number of bytes to read asynchronously - -Note: **This function should NOT be called directly.** It should be -implemented by child classes, and called by the internal Readable -class methods only. - -All Readable stream implementations must provide a `_read` method -to fetch data from the underlying resource. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -When data is available, put it into the read queue by calling -`readable.push(chunk)`. If `push` returns false, then you should stop -reading. When `_read` is called again, you should start pushing more -data. - -The `size` argument is advisory. Implementations where a "read" is a -single call that returns data can use this to know how much data to -fetch. Implementations where that is not relevant, such as TCP or -TLS, may ignore this argument, and simply provide data whenever it -becomes available. There is no need, for example to "wait" until -`size` bytes are available before calling `stream.push(chunk)`. - -### readable.push(chunk) - -* `chunk` {Buffer | null | String} Chunk of data to push into the read queue -* return {Boolean} Whether or not more pushes should be performed - -Note: **This function should be called by Readable implementors, NOT -by consumers of Readable subclasses.** The `_read()` function will not -be called again until at least one `push(chunk)` call is made. If no -data is available, then you MAY call `push('')` (an empty string) to -allow a future `_read` call, without adding any data to the queue. - -The `Readable` class works by putting data into a read queue to be -pulled out later by calling the `read()` method when the `'readable'` -event fires. - -The `push()` method will explicitly insert some data into the read -queue. If it is called with `null` then it will signal the end of the -data. - -In some cases, you may be wrapping a lower-level source which has some -sort of pause/resume mechanism, and a data callback. In those cases, -you could wrap the low-level source object by doing something like -this: - -```javascript -// source is an object with readStop() and readStart() methods, -// and an `ondata` member that gets called when it has data, and -// an `onend` member that gets called when the data is over. - -var stream = new Readable(); - -source.ondata = function(chunk) { - // if push() returns false, then we need to stop reading from source - if (!stream.push(chunk)) - source.readStop(); -}; - -source.onend = function() { - stream.push(null); -}; - -// _read will be called when the stream wants to pull more data in -// the advisory size argument is ignored in this case. -stream._read = function(n) { - source.readStart(); -}; -``` - -### readable.unshift(chunk) - -* `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue -* return {Boolean} Whether or not more pushes should be performed - -This is the corollary of `readable.push(chunk)`. Rather than putting -the data at the *end* of the read queue, it puts it at the *front* of -the read queue. - -This is useful in certain use-cases where a stream is being consumed -by a parser, which needs to "un-consume" some data that it has -optimistically pulled out of the source. - -```javascript -// A parser for a simple data protocol. -// The "header" is a JSON object, followed by 2 \n characters, and -// then a message body. -// -// Note: This can be done more simply as a Transform stream. See below. - -function SimpleProtocol(source, options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(options); - - Readable.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - - // source is a readable stream, such as a socket or file - this._source = source; - - var self = this; - source.on('end', function() { - self.push(null); - }); - - // give it a kick whenever the source is readable - // read(0) will not consume any bytes - source.on('readable', function() { - self.read(0); - }); - - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype = Object.create( - Readable.prototype, { constructor: { value: SimpleProtocol }}); - -SimpleProtocol.prototype._read = function(n) { - if (!this._inBody) { - var chunk = this._source.read(); - - // if the source doesn't have data, we don't have data yet. - if (chunk === null) - return this.push(''); - - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - this.push(''); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // now, because we got some extra data, unshift the rest - // back into the read queue so that our consumer will see it. - var b = chunk.slice(split); - this.unshift(b); - - // and let them know that we are done parsing the header. - this.emit('header', this.header); - } - } else { - // from there on, just provide the data to our consumer. - // careful not to push(null), since that would indicate EOF. - var chunk = this._source.read(); - if (chunk) this.push(chunk); - } -}; - -// Usage: -var parser = new SimpleProtocol(source); -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - -### readable.wrap(stream) - -* `stream` {Stream} An "old style" readable stream - -If you are using an older Node library that emits `'data'` events and -has a `pause()` method that is advisory only, then you can use the -`wrap()` method to create a Readable stream that uses the old stream -as its data source. - -For example: - -```javascript -var OldReader = require('./old-api-module.js').OldReader; -var oreader = new OldReader; -var Readable = require('stream').Readable; -var myReader = new Readable().wrap(oreader); - -myReader.on('readable', function() { - myReader.read(); // etc. -}); -``` - -### Event: 'readable' - -When there is data ready to be consumed, this event will fire. - -When this event emits, call the `read()` method to consume the data. - -### Event: 'end' - -Emitted when the stream has received an EOF (FIN in TCP terminology). -Indicates that no more `'data'` events will happen. If the stream is -also writable, it may be possible to continue writing. - -### Event: 'data' - -The `'data'` event emits either a `Buffer` (by default) or a string if -`setEncoding()` was used. - -Note that adding a `'data'` event listener will switch the Readable -stream into "old mode", where data is emitted as soon as it is -available, rather than waiting for you to call `read()` to consume it. - -### Event: 'error' - -Emitted if there was an error receiving data. - -### Event: 'close' - -Emitted when the underlying resource (for example, the backing file -descriptor) has been closed. Not all streams will emit this. - -### readable.setEncoding(encoding) - -Makes the `'data'` event emit a string instead of a `Buffer`. `encoding` -can be `'utf8'`, `'utf16le'` (`'ucs2'`), `'ascii'`, or `'hex'`. - -The encoding can also be set by specifying an `encoding` field to the -constructor. - -### readable.read([size]) - -* `size` {Number | null} Optional number of bytes to read. -* Return: {Buffer | String | null} - -Note: **This function SHOULD be called by Readable stream users.** - -Call this method to consume data once the `'readable'` event is -emitted. - -The `size` argument will set a minimum number of bytes that you are -interested in. If not set, then the entire content of the internal -buffer is returned. - -If there is no data to consume, or if there are fewer bytes in the -internal buffer than the `size` argument, then `null` is returned, and -a future `'readable'` event will be emitted when more is available. - -Calling `stream.read(0)` will always return `null`, and will trigger a -refresh of the internal buffer, but otherwise be a no-op. - -### readable.pipe(destination, [options]) - -* `destination` {Writable Stream} -* `options` {Object} Optional - * `end` {Boolean} Default=true - -Connects this readable stream to `destination` WriteStream. Incoming -data on this stream gets written to `destination`. Properly manages -back-pressure so that a slow destination will not be overwhelmed by a -fast readable stream. - -This function returns the `destination` stream. - -For example, emulating the Unix `cat` command: - - process.stdin.pipe(process.stdout); - -By default `end()` is called on the destination when the source stream -emits `end`, so that `destination` is no longer writable. Pass `{ end: -false }` as `options` to keep the destination stream open. - -This keeps `writer` open so that "Goodbye" can be written at the -end. - - reader.pipe(writer, { end: false }); - reader.on("end", function() { - writer.end("Goodbye\n"); - }); - -Note that `process.stderr` and `process.stdout` are never closed until -the process exits, regardless of the specified options. - -### readable.unpipe([destination]) - -* `destination` {Writable Stream} Optional - -Undo a previously established `pipe()`. If no destination is -provided, then all previously established pipes are removed. - -### readable.pause() - -Switches the readable stream into "old mode", where data is emitted -using a `'data'` event rather than being buffered for consumption via -the `read()` method. - -Ceases the flow of data. No `'data'` events are emitted while the -stream is in a paused state. - -### readable.resume() - -Switches the readable stream into "old mode", where data is emitted -using a `'data'` event rather than being buffered for consumption via -the `read()` method. - -Resumes the incoming `'data'` events after a `pause()`. - - -## Class: stream.Writable - -<!--type=class--> - -A `Writable` Stream has the following methods, members, and events. - -Note that `stream.Writable` is an abstract class designed to be -extended with an underlying implementation of the -`_write(chunk, encoding, cb)` method. (See below.) - -### new stream.Writable([options]) - -* `options` {Object} - * `highWaterMark` {Number} Buffer level when `write()` starts - returning false. Default=16kb - * `decodeStrings` {Boolean} Whether or not to decode strings into - Buffers before passing them to `_write()`. Default=true - -In classes that extend the Writable class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### writable.\_write(chunk, encoding, callback) - -* `chunk` {Buffer | String} The chunk to be written. Will always - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. Ignore chunk is a buffer. Note that chunk will - **always** be a buffer unless the `decodeStrings` option is - explicitly set to `false`. -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunk. - -All Writable stream implementations must provide a `_write` method to -send data to the underlying resource. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Writable -class methods only. - -Call the callback using the standard `callback(error)` pattern to -signal that the write completed successfully or with an error. - -If the `decodeStrings` flag is set in the constructor options, then -`chunk` may be a string rather than a Buffer, and `encoding` will -indicate the sort of string that it is. This is to support -implementations that have an optimized handling for certain string -data encodings. If you do not explicitly set the `decodeStrings` -option to `false`, then you can safely ignore the `encoding` argument, -and assume that `chunk` will always be a Buffer. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - - -### writable.write(chunk, [encoding], [callback]) - -* `chunk` {Buffer | String} Data to be written -* `encoding` {String} Optional. If `chunk` is a string, then encoding - defaults to `'utf8'` -* `callback` {Function} Optional. Called when this chunk is - successfully written. -* Returns {Boolean} - -Writes `chunk` to the stream. Returns `true` if the data has been -flushed to the underlying resource. Returns `false` to indicate that -the buffer is full, and the data will be sent out in the future. The -`'drain'` event will indicate when the buffer is empty again. - -The specifics of when `write()` will return false, is determined by -the `highWaterMark` option provided to the constructor. - -### writable.end([chunk], [encoding], [callback]) - -* `chunk` {Buffer | String} Optional final data to be written -* `encoding` {String} Optional. If `chunk` is a string, then encoding - defaults to `'utf8'` -* `callback` {Function} Optional. Called when the final chunk is - successfully written. - -Call this method to signal the end of the data being written to the -stream. - -### Event: 'drain' - -Emitted when the stream's write queue empties and it's safe to write -without buffering again. Listen for it when `stream.write()` returns -`false`. - -### Event: 'close' - -Emitted when the underlying resource (for example, the backing file -descriptor) has been closed. Not all streams will emit this. - -### Event: 'finish' - -When `end()` is called and there are no more chunks to write, this -event is emitted. - -### Event: 'pipe' - -* `source` {Readable Stream} - -Emitted when the stream is passed to a readable stream's pipe method. - -### Event 'unpipe' - -* `source` {Readable Stream} - -Emitted when a previously established `pipe()` is removed using the -source Readable stream's `unpipe()` method. - -## Class: stream.Duplex - -<!--type=class--> - -A "duplex" stream is one that is both Readable and Writable, such as a -TCP socket connection. - -Note that `stream.Duplex` is an abstract class designed to be -extended with an underlying implementation of the `_read(size)` -and `_write(chunk, encoding, callback)` methods as you would with a Readable or -Writable stream class. - -Since JavaScript doesn't have multiple prototypal inheritance, this -class prototypally inherits from Readable, and then parasitically from -Writable. It is thus up to the user to implement both the lowlevel -`_read(n)` method as well as the lowlevel `_write(chunk, encoding, cb)` method -on extension duplex classes. - -### new stream.Duplex(options) - -* `options` {Object} Passed to both Writable and Readable - constructors. Also has the following fields: - * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then - the stream will automatically end the readable side when the - writable side ends and vice versa. - -In classes that extend the Duplex class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -## Class: stream.Transform - -A "transform" stream is a duplex stream where the output is causally -connected in some way to the input, such as a zlib stream or a crypto -stream. - -There is no requirement that the output be the same size as the input, -the same number of chunks, or arrive at the same time. For example, a -Hash stream will only ever have a single chunk of output which is -provided when the input is ended. A zlib stream will either produce -much smaller or much larger than its input. - -Rather than implement the `_read()` and `_write()` methods, Transform -classes must implement the `_transform()` method, and may optionally -also implement the `_flush()` method. (See below.) - -### new stream.Transform([options]) - -* `options` {Object} Passed to both Writable and Readable - constructors. - -In classes that extend the Transform class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### transform.\_transform(chunk, encoding, callback) - -* `chunk` {Buffer | String} The chunk to be transformed. Will always - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. (Ignore if `decodeStrings` chunk is a buffer.) -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunk. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Transform -class methods only. - -All Transform stream implementations must provide a `_transform` -method to accept input and produce output. - -`_transform` should do whatever has to be done in this specific -Transform class, to handle the bytes being written, and pass them off -to the readable portion of the interface. Do asynchronous I/O, -process things, and so on. - -Call `transform.push(outputChunk)` 0 or more times to generate output -from this input chunk, depending on how much data you want to output -as a result of this chunk. - -Call the callback function only when the current chunk is completely -consumed. Note that there may or may not be output as a result of any -particular input chunk. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -### transform.\_flush(callback) - -* `callback` {Function} Call this function (optionally with an error - argument) when you are done flushing any remaining data. - -Note: **This function MUST NOT be called directly.** It MAY be implemented -by child classes, and if so, will be called by the internal Transform -class methods only. - -In some cases, your transform operation may need to emit a bit more -data at the end of the stream. For example, a `Zlib` compression -stream will store up some internal state so that it can optimally -compress the output. At the end, however, it needs to do the best it -can with what is left, so that the data will be complete. - -In those cases, you can implement a `_flush` method, which will be -called at the very end, after all the written data is consumed, but -before emitting `end` to signal the end of the readable side. Just -like with `_transform`, call `transform.push(chunk)` zero or more -times, as appropriate, and call `callback` when the flush operation is -complete. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -### Example: `SimpleProtocol` parser - -The example above of a simple protocol parser can be implemented much -more simply by using the higher level `Transform` stream class. - -In this example, rather than providing the input as an argument, it -would be piped into the parser, which is a more idiomatic Node stream -approach. - -```javascript -function SimpleProtocol(options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(options); - - Transform.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype = Object.create( - Transform.prototype, { constructor: { value: SimpleProtocol }}); - -SimpleProtocol.prototype._transform = function(chunk, encoding, done) { - if (!this._inBody) { - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // and let them know that we are done parsing the header. - this.emit('header', this.header); - - // now, because we got some extra data, emit this first. - this.push(b); - } - } else { - // from there on, just provide the data to our consumer as-is. - this.push(b); - } - done(); -}; - -var parser = new SimpleProtocol(); -source.pipe(parser) - -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - - -## Class: stream.PassThrough - -This is a trivial implementation of a `Transform` stream that simply -passes the input bytes across to the output. Its purpose is mainly -for examples and testing, but there are occasionally use cases where -it can come in handy. - - -[EventEmitter]: events.html#events_class_events_eventemitter diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/duplex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/float.patch b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/float.patch deleted file mode 100644 index 0ad71a1f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/float.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js -index c5a741c..a2e0d8e 100644 ---- a/lib/_stream_duplex.js -+++ b/lib/_stream_duplex.js -@@ -26,8 +26,8 @@ - - module.exports = Duplex; - var util = require('util'); --var Readable = require('_stream_readable'); --var Writable = require('_stream_writable'); -+var Readable = require('./_stream_readable'); -+var Writable = require('./_stream_writable'); - - util.inherits(Duplex, Readable); - -diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js -index a5e9864..330c247 100644 ---- a/lib/_stream_passthrough.js -+++ b/lib/_stream_passthrough.js -@@ -25,7 +25,7 @@ - - module.exports = PassThrough; - --var Transform = require('_stream_transform'); -+var Transform = require('./_stream_transform'); - var util = require('util'); - util.inherits(PassThrough, Transform); - -diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js -index 2259d2e..e6681ee 100644 ---- a/lib/_stream_readable.js -+++ b/lib/_stream_readable.js -@@ -23,6 +23,9 @@ module.exports = Readable; - Readable.ReadableState = ReadableState; - - var EE = require('events').EventEmitter; -+if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { -+ return emitter.listeners(type).length; -+}; - var Stream = require('stream'); - var util = require('util'); - var StringDecoder; -diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js -index e925b4b..f08b05e 100644 ---- a/lib/_stream_transform.js -+++ b/lib/_stream_transform.js -@@ -64,7 +64,7 @@ - - module.exports = Transform; - --var Duplex = require('_stream_duplex'); -+var Duplex = require('./_stream_duplex'); - var util = require('util'); - util.inherits(Transform, Duplex); - -diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js -index a26f711..56ca47d 100644 ---- a/lib/_stream_writable.js -+++ b/lib/_stream_writable.js -@@ -109,7 +109,7 @@ function WritableState(options, stream) { - function Writable(options) { - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. -- if (!(this instanceof Writable) && !(this instanceof Stream.Duplex)) -+ if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) - return new Writable(options); - - this._writableState = new WritableState(options, this); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index a2e0d8e0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -module.exports = Duplex; -var util = require('util'); -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -Object.keys(Writable.prototype).forEach(function(method) { - if (!Duplex.prototype[method]) - Duplex.prototype[method] = Writable.prototype[method]; -}); - -function Duplex(options) { - if (!(this instanceof Duplex)) - return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) - this.readable = false; - - if (options && options.writable === false) - this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) - this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) - return; - - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(this.end.bind(this)); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 330c247d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); -var util = require('util'); -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) - return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function(chunk, encoding, cb) { - cb(null, chunk); -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 323f3305..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,927 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -module.exports = Readable; -Readable.ReadableState = ReadableState; - -var EE = require('events').EventEmitter; -if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { - return emitter.listeners(type).length; -}; -var Stream = require('stream'); -var util = require('util'); -var StringDecoder; - -util.inherits(Readable, Stream); - -function ReadableState(options, stream) { - options = options || {}; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = false; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // In streams that never have any data, and do push(null) right away, - // the consumer can miss the 'end' event if they do some I/O before - // consuming the stream. So, we don't emit('end') until some reading - // happens. - this.calledRead = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - if (!(this instanceof Readable)) - return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function(chunk, encoding) { - var state = this._readableState; - - if (typeof chunk === 'string' && !state.objectMode) { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = new Buffer(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function(chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (chunk === null || chunk === undefined) { - state.reading = false; - if (!state.ended) - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var e = new Error('stream.unshift() after end event'); - stream.emit('error', e); - } else { - if (state.decoder && !addToFront && !encoding) - chunk = state.decoder.write(chunk); - - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) { - state.buffer.unshift(chunk); - } else { - state.reading = false; - state.buffer.push(chunk); - } - - if (state.needReadable) - emitReadable(stream); - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - - - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && - (state.needReadable || - state.length < state.highWaterMark || - state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function(enc) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; -}; - -// Don't raise the hwm > 128MB -var MAX_HWM = 0x800000; -function roundUpToNextPowerOf2(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - for (var p = 1; p < 32; p <<= 1) n |= n >> p; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) - return 0; - - if (state.objectMode) - return n === 0 ? 0 : 1; - - if (isNaN(n) || n === null) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) - return state.buffer[0].length; - else - return state.length; - } - - if (n <= 0) - return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) - state.highWaterMark = roundUpToNextPowerOf2(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else - return state.length; - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function(n) { - var state = this._readableState; - state.calledRead = true; - var nOrig = n; - - if (typeof n !== 'number' || n > 0) - state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && - state.needReadable && - (state.length >= state.highWaterMark || state.ended)) { - emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) - endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - - // if we currently have less than the highWaterMark, then also read some - if (state.length - n <= state.highWaterMark) - doRead = true; - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) - doRead = false; - - if (doRead) { - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) - state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read called its callback synchronously, then `reading` - // will be false, and we need to re-evaluate how much data we - // can return to the user. - if (doRead && !state.reading) - n = howMuchToRead(nOrig, state); - - var ret; - if (n > 0) - ret = fromList(n, state); - else - ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) - state.needReadable = true; - - // If we happened to read() exactly the remaining amount in the - // buffer, and the EOF has been seen at this point, then make sure - // that we emit 'end' on the very next tick. - if (state.ended && !state.endEmitted && state.length === 0) - endReadable(this); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode && - !er) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - - -function onEofChunk(stream, state) { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // if we've ended and we have some data left, then emit - // 'readable' now to make sure it gets picked up. - if (state.length > 0) - emitReadable(stream); - else - endReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (state.emittedReadable) - return; - - state.emittedReadable = true; - if (state.sync) - process.nextTick(function() { - emitReadable_(stream); - }); - else - emitReadable_(stream); -} - -function emitReadable_(stream) { - stream.emit('readable'); -} - - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(function() { - maybeReadMore_(stream, state); - }); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && - state.length < state.highWaterMark) { - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break; - else - len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function(n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function(dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && - dest !== process.stdout && - dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) - process.nextTick(endFn); - else - src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - if (readable !== src) return; - cleanup(); - } - - function onend() { - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - function cleanup() { - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (!dest._writableState || dest._writableState.needDrain) - ondrain(); - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - unpipe(); - dest.removeListener('error', onerror); - if (EE.listenerCount(dest, 'error') === 0) - dest.emit('error', er); - } - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. - if (!dest._events || !dest._events.error) - dest.on('error', onerror); - else if (Array.isArray(dest._events.error)) - dest._events.error.unshift(onerror); - else - dest._events.error = [onerror, dest._events.error]; - - - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - // the handler that waits for readable events after all - // the data gets sucked out in flow. - // This would be easier to follow with a .once() handler - // in flow(), but that is too slow. - this.on('readable', pipeOnReadable); - - state.flowing = true; - process.nextTick(function() { - flow(src); - }); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function() { - var dest = this; - var state = src._readableState; - state.awaitDrain--; - if (state.awaitDrain === 0) - flow(src); - }; -} - -function flow(src) { - var state = src._readableState; - var chunk; - state.awaitDrain = 0; - - function write(dest, i, list) { - var written = dest.write(chunk); - if (false === written) { - state.awaitDrain++; - } - } - - while (state.pipesCount && null !== (chunk = src.read())) { - - if (state.pipesCount === 1) - write(state.pipes, 0, null); - else - state.pipes.forEach(write); - - src.emit('data', chunk); - - // if anyone needs a drain, then we have to wait for that. - if (state.awaitDrain > 0) - return; - } - - // if every destination was unpiped, either before entering this - // function, or in the while loop, then stop flowing. - // - // NB: This is a pretty rare edge case. - if (state.pipesCount === 0) { - state.flowing = false; - - // if there were data event listeners added, then switch to old mode. - if (EE.listenerCount(src, 'data') > 0) - emitDataEvents(src); - return; - } - - // at this point, no one needed a drain, so we just ran out of data - // on the next readable event, start it over again. - state.ranOut = true; -} - -function pipeOnReadable() { - if (this._readableState.ranOut) { - this._readableState.ranOut = false; - flow(this); - } -} - - -Readable.prototype.unpipe = function(dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) - return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) - return this; - - if (!dest) - dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - if (dest) - dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - - for (var i = 0; i < len; i++) - dests[i].emit('unpipe', this); - return this; - } - - // try to find the right one. - var i = state.pipes.indexOf(dest); - if (i === -1) - return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) - state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function(ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data' && !this._readableState.flowing) - emitDataEvents(this); - - if (ev === 'readable' && this.readable) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - this.read(0); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function() { - emitDataEvents(this); - this.read(0); - this.emit('resume'); -}; - -Readable.prototype.pause = function() { - emitDataEvents(this, true); - this.emit('pause'); -}; - -function emitDataEvents(stream, startPaused) { - var state = stream._readableState; - - if (state.flowing) { - // https://github.com/isaacs/readable-stream/issues/16 - throw new Error('Cannot switch to old mode now.'); - } - - var paused = startPaused || false; - var readable = false; - - // convert to an old-style stream. - stream.readable = true; - stream.pipe = Stream.prototype.pipe; - stream.on = stream.addListener = Stream.prototype.on; - - stream.on('readable', function() { - readable = true; - - var c; - while (!paused && (null !== (c = stream.read()))) - stream.emit('data', c); - - if (c === null) { - readable = false; - stream._readableState.needReadable = true; - } - }); - - stream.pause = function() { - paused = true; - this.emit('pause'); - }; - - stream.resume = function() { - paused = false; - if (readable) - process.nextTick(function() { - stream.emit('readable'); - }); - else - this.read(0); - this.emit('resume'); - }; - - // now make it start, just in case it hadn't already. - stream.emit('readable'); -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function(stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function() { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) - self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function(chunk) { - if (state.decoder) - chunk = state.decoder.write(chunk); - if (!chunk || !state.objectMode && !chunk.length) - return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (typeof stream[i] === 'function' && - typeof this[i] === 'undefined') { - this[i] = function(method) { return function() { - return stream[method].apply(stream, arguments); - }}(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - events.forEach(function(ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function(n) { - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - - - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) - return null; - - if (length === 0) - ret = null; - else if (objectMode) - ret = list.shift(); - else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) - ret = list.join(''); - else - ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) - ret = ''; - else - ret = new Buffer(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var buf = list[0]; - var cpy = Math.min(n - c, buf.length); - - if (stringMode) - ret += buf.slice(0, cpy); - else - buf.copy(ret, c, 0, cpy); - - if (cpy < buf.length) - list[0] = buf.slice(cpy); - else - list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) - throw new Error('endReadable called on non-empty stream'); - - if (!state.endEmitted && state.calledRead) { - state.ended = true; - process.nextTick(function() { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } - }); - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index 707e4b3b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); -var util = require('util'); -util.inherits(Transform, Duplex); - - -function TransformState(options, stream) { - this.afterTransform = function(er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) - return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (data !== null && data !== undefined) - stream.push(data); - - if (cb) - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - - -function Transform(options) { - if (!(this instanceof Transform)) - return new Transform(options); - - Duplex.call(this, options); - - var ts = this._transformState = new TransformState(options, this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - this.once('finish', function() { - if ('function' === typeof this._flush) - this._flush(function(er) { - done(stream, er); - }); - else - done(stream); - }); -} - -Transform.prototype.push = function(chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function(chunk, encoding, cb) { - throw new Error('not implemented'); -}; - -Transform.prototype._write = function(chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || - rs.needReadable || - rs.length < rs.highWaterMark) - this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function(n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - - -function done(stream, er) { - if (er) - return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var rs = stream._readableState; - var ts = stream._transformState; - - if (ws.length) - throw new Error('calling transform done when ws.length != 0'); - - if (ts.transforming) - throw new Error('calling transform done when still transforming'); - - return stream.push(null); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index 9eaf4ec2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,371 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, cb), and it'll handle all -// the drain event emission and buffering. - -module.exports = Writable; -Writable.WritableState = WritableState; - -var util = require('util'); -var assert = require('assert'); -var Stream = require('stream'); - -util.inherits(Writable, Stream); - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; -} - -function WritableState(options, stream) { - options = options || {}; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function(er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.buffer = []; -} - -function Writable(options) { - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) - return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function() { - this.emit('error', new Error('Cannot pipe. Not readable.')); -}; - - -function writeAfterEnd(stream, state, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); - valid = false; - } - return valid; -} - -Writable.prototype.write = function(chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - else if (!encoding) - encoding = state.defaultEncoding; - - if (typeof cb !== 'function') - cb = function() {}; - - if (state.ended) - writeAfterEnd(this, state, cb); - else if (validChunk(this, state, chunk, cb)) - ret = writeOrBuffer(this, state, chunk, encoding, cb); - - return ret; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && - state.decodeStrings !== false && - typeof chunk === 'string') { - chunk = new Buffer(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) - state.needDrain = true; - - if (state.writing) - state.buffer.push(new WriteReq(chunk, encoding, cb)); - else - doWrite(stream, state, len, chunk, encoding, cb); - - return ret; -} - -function doWrite(stream, state, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - if (sync) - process.nextTick(function() { - cb(er); - }); - else - cb(er); - - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) - onwriteError(stream, state, sync, er, cb); - else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(stream, state); - - if (!finished && !state.bufferProcessing && state.buffer.length) - clearBuffer(stream, state); - - if (sync) { - process.nextTick(function() { - afterWrite(stream, state, finished, cb); - }); - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) - onwriteDrain(stream, state); - cb(); - if (finished) - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - - for (var c = 0; c < state.buffer.length; c++) { - var entry = state.buffer[c]; - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, len, chunk, encoding, cb); - - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - c++; - break; - } - } - - state.bufferProcessing = false; - if (c < state.buffer.length) - state.buffer = state.buffer.slice(c); - else - state.buffer.length = 0; -} - -Writable.prototype._write = function(chunk, encoding, cb) { - cb(new Error('not implemented')); -}; - -Writable.prototype.end = function(chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (typeof chunk !== 'undefined' && chunk !== null) - this.write(chunk, encoding); - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) - endWritable(this, state, cb); -}; - - -function needFinish(stream, state) { - return (state.ending && - state.length === 0 && - !state.finished && - !state.writing); -} - -function finishMaybe(stream, state) { - var need = needFinish(stream, state); - if (need) { - state.finished = true; - stream.emit('finish'); - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) - process.nextTick(cb); - else - stream.once('finish', cb); - } - state.ended = true; -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE deleted file mode 100644 index 6de584a4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md deleted file mode 100644 index 4d2aa001..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md +++ /dev/null @@ -1,7 +0,0 @@ -**string_decoder.js** (`require('string_decoder')`) from Node.js core - -Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. - -Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** - -The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js deleted file mode 100755 index 46470cfd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js +++ /dev/null @@ -1,94 +0,0 @@ -#!/usr/bin/env node - -const hyperquest = require('hyperzip')(require('hyperdirect')) - , bl = require('bl') - , fs = require('fs') - , path = require('path') - , cheerio = require('cheerio') - - , files = require('./files') - , testReplace = require('./test-replacements') - - , srcurlpfx = 'https://raw.github.com/joyent/node/v' + process.argv[2] + '-release/' - , libsrcurl = srcurlpfx + 'lib/' - , testsrcurl = srcurlpfx + 'test/simple/' - , testlisturl = 'https://github.com/joyent/node/tree/v' + process.argv[2] + '-release/test/simple' - , libourroot = path.join(__dirname, '../') - , testourroot = path.join(__dirname, '../test/simple/') - - -function processFile (url, out, replacements) { - hyperquest(url).pipe(bl(function (err, data) { - if (err) - throw err - - data = data.toString() - replacements.forEach(function (replacement) { - data = data.replace.apply(data, replacement) - }) - - fs.writeFile(out, data, 'utf8', function (err) { - if (err) - throw err - - console.log('Wrote', out) - }) - })) -} - -function processLibFile (file) { - var replacements = files[file] - , url = libsrcurl + file - , out = path.join(libourroot, replacements.out || file) - - processFile(url, out, replacements) -} - - -function processTestFile (file) { - var replacements = testReplace.all - , url = testsrcurl + file - , out = path.join(testourroot, file) - - if (testReplace[file]) - replacements = replacements.concat(testReplace[file]) - - processFile(url, out, replacements) -} - - -if (!/0\.1\d\.\d+/.test(process.argv[2])) { - console.log('Usage: build.js <node version>') - return process.exit(-1) -} - - -//-------------------------------------------------------------------- -// Grab & process files in ../lib/ - -Object.keys(files).forEach(processLibFile) - -//-------------------------------------------------------------------- -// Discover, grab and process all test-string-decoder* files on joyent/node - -hyperquest(testlisturl).pipe(bl(function (err, data) { - if (err) - throw err - - var $ = cheerio.load(data.toString()) - - $('table.files .js-directory-link').each(function () { - var file = $(this).text() - if (/^test-string-decoder/.test(file) || file == 'common.js') - processTestFile(file) - }) -})) - -//-------------------------------------------------------------------- -// Grab the joyent/node test/common.js - -processFile( - testsrcurl + '../common.js' - , path.join(testourroot, '../common.js') - , testReplace['common.js'] -) \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js deleted file mode 100644 index 7396a4f4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js +++ /dev/null @@ -1,36 +0,0 @@ -/* This file lists the files to be fetched from the node repo - * in the /lib/ directory which will be placed in the ../lib/ - * directory after having each of the "replacements" in the - * array for that file applied to it. The replacements are - * simply the arguments to String#replace, so they can be - * strings, regexes, functions. - */ - -module.exports['string_decoder.js'] = [ - - // pull in Bufer as a require - // add Buffer.isEncoding where missing - [ - /^(\/\/ USE OR OTHER DEALINGS IN THE SOFTWARE\.)/m - , '$1\n\nvar Buffer = require(\'buffer\').Buffer;' - + '\n' - + '\nvar isBufferEncoding = Buffer.isEncoding' - + '\n || function(encoding) {' - + '\n switch (encoding && encoding.toLowerCase()) {' - + '\n case \'hex\': case \'utf8\': case \'utf-8\': case \'ascii\': case \'binary\': case \'base64\': case \'ucs2\': case \'ucs-2\': case \'utf16le\': case \'utf-16le\': case \'raw\': return true;' - + '\n default: return false;' - + '\n }' - + '\n }' - + '\n' - - ] - - // use custom Buffer.isEncoding reference - , [ - /Buffer\.isEncoding\(/g - , 'isBufferEncoding\(' - ] - -] - -module.exports['string_decoder.js'].out = 'index.js' \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json deleted file mode 100644 index f7ee6a46..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "string_decoder-build", - "version": "0.0.0", - "description": "", - "main": "build.js", - "dependencies": { - "bl": "~0.6.0", - "hyperzip": "0.0.0", - "hyperdirect": "0.0.0", - "cheerio": "~0.13.1" - } -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js deleted file mode 100644 index 5bbf6028..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js +++ /dev/null @@ -1,24 +0,0 @@ -module.exports.all = [ - [ - /require\(['"]string_decoder['"]\)/g - , 'require(\'../../\')' - ] - -] - -module.exports['common.js'] = [ - [ - /^ setImmediate,$/m - , ' typeof setImmediate == \'undefined\' ? null : setImmediate,' - ] - - , [ - /^ clearImmediate,$/m - , ' typeof clearImmediate == \'undefined\' ? null : clearImmediate,' - ] - - , [ - /^ global];$/m - , ' global].filter(Boolean);' - ] -] diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js deleted file mode 100644 index 2e44a03e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var Buffer = require('buffer').Buffer; - -var isBufferEncoding = Buffer.isEncoding - || function(encoding) { - switch (encoding && encoding.toLowerCase()) { - case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; - default: return false; - } - } - - -function assertEncoding(encoding) { - if (encoding && !isBufferEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} - -var StringDecoder = exports.StringDecoder = function(encoding) { - this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); - assertEncoding(encoding); - switch (this.encoding) { - case 'utf8': - // CESU-8 represents each of Surrogate Pair by 3-bytes - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - // UTF-16 represents each of Surrogate Pair by 2-bytes - this.surrogateSize = 2; - this.detectIncompleteChar = utf16DetectIncompleteChar; - break; - case 'base64': - // Base-64 stores 3 bytes in 4 chars, and pads the remainder. - this.surrogateSize = 3; - this.detectIncompleteChar = base64DetectIncompleteChar; - break; - default: - this.write = passThroughWrite; - return; - } - - this.charBuffer = new Buffer(6); - this.charReceived = 0; - this.charLength = 0; -}; - - -StringDecoder.prototype.write = function(buffer) { - var charStr = ''; - var offset = 0; - - // if our last write ended with an incomplete multibyte character - while (this.charLength) { - // determine how many remaining bytes this buffer has to offer for this char - var i = (buffer.length >= this.charLength - this.charReceived) ? - this.charLength - this.charReceived : - buffer.length; - - // add the new bytes to the char buffer - buffer.copy(this.charBuffer, this.charReceived, offset, i); - this.charReceived += (i - offset); - offset = i; - - if (this.charReceived < this.charLength) { - // still not enough chars in this buffer? wait for more ... - return ''; - } - - // get the character that was split - charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); - - // lead surrogate (D800-DBFF) is also the incomplete character - var charCode = charStr.charCodeAt(charStr.length - 1); - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - this.charLength += this.surrogateSize; - charStr = ''; - continue; - } - this.charReceived = this.charLength = 0; - - // if there are no more bytes in this buffer, just emit our char - if (i == buffer.length) return charStr; - - // otherwise cut off the characters end from the beginning of this buffer - buffer = buffer.slice(i, buffer.length); - break; - } - - var lenIncomplete = this.detectIncompleteChar(buffer); - - var end = buffer.length; - if (this.charLength) { - // buffer the incomplete character bytes we got - buffer.copy(this.charBuffer, 0, buffer.length - lenIncomplete, end); - this.charReceived = lenIncomplete; - end -= lenIncomplete; - } - - charStr += buffer.toString(this.encoding, 0, end); - - var end = charStr.length - 1; - var charCode = charStr.charCodeAt(end); - // lead surrogate (D800-DBFF) is also the incomplete character - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - var size = this.surrogateSize; - this.charLength += size; - this.charReceived += size; - this.charBuffer.copy(this.charBuffer, size, 0, size); - this.charBuffer.write(charStr.charAt(charStr.length - 1), this.encoding); - return charStr.substring(0, end); - } - - // or just emit the charStr - return charStr; -}; - -StringDecoder.prototype.detectIncompleteChar = function(buffer) { - // determine how many bytes we have to check at the end of this buffer - var i = (buffer.length >= 3) ? 3 : buffer.length; - - // Figure out if one of the last i bytes of our buffer announces an - // incomplete char. - for (; i > 0; i--) { - var c = buffer[buffer.length - i]; - - // See http://en.wikipedia.org/wiki/UTF-8#Description - - // 110XXXXX - if (i == 1 && c >> 5 == 0x06) { - this.charLength = 2; - break; - } - - // 1110XXXX - if (i <= 2 && c >> 4 == 0x0E) { - this.charLength = 3; - break; - } - - // 11110XXX - if (i <= 3 && c >> 3 == 0x1E) { - this.charLength = 4; - break; - } - } - - return i; -}; - -StringDecoder.prototype.end = function(buffer) { - var res = ''; - if (buffer && buffer.length) - res = this.write(buffer); - - if (this.charReceived) { - var cr = this.charReceived; - var buf = this.charBuffer; - var enc = this.encoding; - res += buf.slice(0, cr).toString(enc); - } - - return res; -}; - -function passThroughWrite(buffer) { - return buffer.toString(this.encoding); -} - -function utf16DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 2; - this.charLength = incomplete ? 2 : 0; - return incomplete; -} - -function base64DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 3; - this.charLength = incomplete ? 3 : 0; - return incomplete; -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json deleted file mode 100644 index c7cac1a5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "string_decoder", - "version": "0.10.25", - "description": "The string_decoder module from Node core", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "tap": "~0.4.8" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/rvagg/string_decoder.git" - }, - "homepage": "https://github.com/rvagg/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "readme": "**string_decoder.js** (`require('string_decoder')`) from Node.js core\n\nCopyright Joyent, Inc. and other Node contributors. See LICENCE file for details.\n\nVersion numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.**\n\nThe *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version.", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/rvagg/string_decoder/issues" - }, - "_id": "string_decoder@0.10.25", - "dist": { - "shasum": "aa026a29a0177ff13c8df4472dcda2f26d646900" - }, - "_from": "string_decoder@~0.10.x", - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.25.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js deleted file mode 100644 index ed5ff08d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var path = require('path'); -var assert = require('assert'); - -exports.testDir = path.dirname(__filename); -exports.fixturesDir = path.join(exports.testDir, 'fixtures'); -exports.libDir = path.join(exports.testDir, '../lib'); -exports.tmpDir = path.join(exports.testDir, 'tmp'); -exports.PORT = +process.env.NODE_COMMON_PORT || 12346; - -if (process.platform === 'win32') { - exports.PIPE = '\\\\.\\pipe\\libuv-test'; -} else { - exports.PIPE = exports.tmpDir + '/test.sock'; -} - -var util = require('util'); -for (var i in util) exports[i] = util[i]; -//for (var i in exports) global[i] = exports[i]; - -function protoCtrChain(o) { - var result = []; - for (; o; o = o.__proto__) { result.push(o.constructor); } - return result.join(); -} - -exports.indirectInstanceOf = function(obj, cls) { - if (obj instanceof cls) { return true; } - var clsChain = protoCtrChain(cls.prototype); - var objChain = protoCtrChain(obj); - return objChain.slice(-clsChain.length) === clsChain; -}; - - -exports.ddCommand = function(filename, kilobytes) { - if (process.platform === 'win32') { - var p = path.resolve(exports.fixturesDir, 'create-file.js'); - return '"' + process.argv[0] + '" "' + p + '" "' + - filename + '" ' + (kilobytes * 1024); - } else { - return 'dd if=/dev/zero of="' + filename + '" bs=1024 count=' + kilobytes; - } -}; - - -exports.spawnCat = function(options) { - var spawn = require('child_process').spawn; - - if (process.platform === 'win32') { - return spawn('more', [], options); - } else { - return spawn('cat', [], options); - } -}; - - -exports.spawnPwd = function(options) { - var spawn = require('child_process').spawn; - - if (process.platform === 'win32') { - return spawn('cmd.exe', ['/c', 'cd'], options); - } else { - return spawn('pwd', [], options); - } -}; - - -// Turn this off if the test should not check for global leaks. -exports.globalCheck = true; - -process.on('exit', function() { - if (!exports.globalCheck) return; - var knownGlobals = [setTimeout, - setInterval, - typeof setImmediate == 'undefined' ? null : setImmediate, - clearTimeout, - clearInterval, - typeof clearImmediate == 'undefined' ? null : clearImmediate, - console, - Buffer, - process, - global].filter(Boolean); - - if (global.gc) { - knownGlobals.push(gc); - } - - if (global.DTRACE_HTTP_SERVER_RESPONSE) { - knownGlobals.push(DTRACE_HTTP_SERVER_RESPONSE); - knownGlobals.push(DTRACE_HTTP_SERVER_REQUEST); - knownGlobals.push(DTRACE_HTTP_CLIENT_RESPONSE); - knownGlobals.push(DTRACE_HTTP_CLIENT_REQUEST); - knownGlobals.push(DTRACE_NET_STREAM_END); - knownGlobals.push(DTRACE_NET_SERVER_CONNECTION); - knownGlobals.push(DTRACE_NET_SOCKET_READ); - knownGlobals.push(DTRACE_NET_SOCKET_WRITE); - } - if (global.COUNTER_NET_SERVER_CONNECTION) { - knownGlobals.push(COUNTER_NET_SERVER_CONNECTION); - knownGlobals.push(COUNTER_NET_SERVER_CONNECTION_CLOSE); - knownGlobals.push(COUNTER_HTTP_SERVER_REQUEST); - knownGlobals.push(COUNTER_HTTP_SERVER_RESPONSE); - knownGlobals.push(COUNTER_HTTP_CLIENT_REQUEST); - knownGlobals.push(COUNTER_HTTP_CLIENT_RESPONSE); - } - - if (global.ArrayBuffer) { - knownGlobals.push(ArrayBuffer); - knownGlobals.push(Int8Array); - knownGlobals.push(Uint8Array); - knownGlobals.push(Uint8ClampedArray); - knownGlobals.push(Int16Array); - knownGlobals.push(Uint16Array); - knownGlobals.push(Int32Array); - knownGlobals.push(Uint32Array); - knownGlobals.push(Float32Array); - knownGlobals.push(Float64Array); - knownGlobals.push(DataView); - } - - for (var x in global) { - var found = false; - - for (var y in knownGlobals) { - if (global[x] === knownGlobals[y]) { - found = true; - break; - } - } - - if (!found) { - console.error('Unknown global: %s', x); - assert.ok(false, 'Unknown global found'); - } - } -}); - - -var mustCallChecks = []; - - -function runCallChecks(exitCode) { - if (exitCode !== 0) return; - - var failed = mustCallChecks.filter(function(context) { - return context.actual !== context.expected; - }); - - failed.forEach(function(context) { - console.log('Mismatched %s function calls. Expected %d, actual %d.', - context.name, - context.expected, - context.actual); - console.log(context.stack.split('\n').slice(2).join('\n')); - }); - - if (failed.length) process.exit(1); -} - - -exports.mustCall = function(fn, expected) { - if (typeof expected !== 'number') expected = 1; - - var context = { - expected: expected, - actual: 0, - stack: (new Error).stack, - name: fn.name || '<anonymous>' - }; - - // add the exit listener only once to avoid listener leak warnings - if (mustCallChecks.length === 0) process.on('exit', runCallChecks); - - mustCallChecks.push(context); - - return function() { - context.actual++; - return fn.apply(this, arguments); - }; -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js deleted file mode 100644 index 869a4116..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// verify that the string decoder works getting 1 byte at a time, -// the whole buffer at once, and that both match the .toString(enc) -// result of the entire buffer. - -var assert = require('assert'); -var SD = require('../../').StringDecoder; -var encodings = ['base64', 'hex', 'utf8', 'utf16le', 'ucs2']; - -var bufs = [ '☃💩', 'asdf' ].map(function(b) { - return new Buffer(b); -}); - -// also test just arbitrary bytes from 0-15. -for (var i = 1; i <= 16; i++) { - var bytes = new Array(i).join('.').split('.').map(function(_, j) { - return j + 0x78; - }); - bufs.push(new Buffer(bytes)); -} - -encodings.forEach(testEncoding); - -console.log('ok'); - -function testEncoding(encoding) { - bufs.forEach(function(buf) { - testBuf(encoding, buf); - }); -} - -function testBuf(encoding, buf) { - console.error('# %s', encoding, buf); - - // write one byte at a time. - var s = new SD(encoding); - var res1 = ''; - for (var i = 0; i < buf.length; i++) { - res1 += s.write(buf.slice(i, i + 1)); - } - res1 += s.end(); - - // write the whole buffer at once. - var res2 = ''; - var s = new SD(encoding); - res2 += s.write(buf); - res2 += s.end(); - - // .toString() on the buffer - var res3 = buf.toString(encoding); - - console.log('expect=%j', res3); - assert.equal(res1, res3, 'one byte at a time should match toString'); - assert.equal(res2, res3, 'all bytes at once should match toString'); -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js deleted file mode 100644 index 7f69f7ea..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var common = require('../common'); -var assert = require('assert'); -var StringDecoder = require('../../').StringDecoder; -var decoder = new StringDecoder('utf8'); - - - -var buffer = new Buffer('$'); -assert.deepEqual('$', decoder.write(buffer)); - -buffer = new Buffer('¢'); -assert.deepEqual('', decoder.write(buffer.slice(0, 1))); -assert.deepEqual('¢', decoder.write(buffer.slice(1, 2))); - -buffer = new Buffer('€'); -assert.deepEqual('', decoder.write(buffer.slice(0, 1))); -assert.deepEqual('', decoder.write(buffer.slice(1, 2))); -assert.deepEqual('€', decoder.write(buffer.slice(2, 3))); - -buffer = new Buffer([0xF0, 0xA4, 0xAD, 0xA2]); -var s = ''; -s += decoder.write(buffer.slice(0, 1)); -s += decoder.write(buffer.slice(1, 2)); -s += decoder.write(buffer.slice(2, 3)); -s += decoder.write(buffer.slice(3, 4)); -assert.ok(s.length > 0); - -// CESU-8 -buffer = new Buffer('EDA0BDEDB18D', 'hex'); // THUMBS UP SIGN (in CESU-8) -var s = ''; -s += decoder.write(buffer.slice(0, 1)); -s += decoder.write(buffer.slice(1, 2)); -s += decoder.write(buffer.slice(2, 3)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(3, 4)); -s += decoder.write(buffer.slice(4, 5)); -s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 2)); -s += decoder.write(buffer.slice(2, 4)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(4, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 3)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(3, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 4)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(4, 5)); -s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 5)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 6)); -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - - -// UCS-2 -decoder = new StringDecoder('ucs2'); -buffer = new Buffer('ab', 'ucs2'); -assert.equal(decoder.write(buffer), 'ab'); // 2 complete chars -buffer = new Buffer('abc', 'ucs2'); -assert.equal(decoder.write(buffer.slice(0, 3)), 'a'); // 'a' and first of 'b' -assert.equal(decoder.write(buffer.slice(3, 6)), 'bc'); // second of 'b' and 'c' - - -// UTF-16LE -buffer = new Buffer('3DD84DDC', 'hex'); // THUMBS UP SIGN (in CESU-8) -var s = ''; -s += decoder.write(buffer.slice(0, 1)); -s += decoder.write(buffer.slice(1, 2)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(2, 3)); -s += decoder.write(buffer.slice(3, 4)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 2)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(2, 4)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 3)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(3, 4)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 4)); -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - - -// A mixed ascii and non-ascii string -// Test stolen from deps/v8/test/cctest/test-strings.cc -// U+02E4 -> CB A4 -// U+0064 -> 64 -// U+12E4 -> E1 8B A4 -// U+0030 -> 30 -// U+3045 -> E3 81 85 -var expected = '\u02e4\u0064\u12e4\u0030\u3045'; -var buffer = new Buffer([0xCB, 0xA4, 0x64, 0xE1, 0x8B, 0xA4, - 0x30, 0xE3, 0x81, 0x85]); -var charLengths = [0, 0, 1, 2, 2, 2, 3, 4, 4, 4, 5, 5]; - -// Split the buffer into 3 segments -// |----|------|-------| -// 0 i j buffer.length -// Scan through every possible 3 segment combination -// and make sure that the string is always parsed. -common.print('scanning '); -for (var j = 2; j < buffer.length; j++) { - for (var i = 1; i < j; i++) { - var decoder = new StringDecoder('utf8'); - - var sum = decoder.write(buffer.slice(0, i)); - - // just check that we've received the right amount - // after the first write - assert.equal(charLengths[i], sum.length); - - sum += decoder.write(buffer.slice(i, j)); - sum += decoder.write(buffer.slice(j, buffer.length)); - assert.equal(expected, sum); - common.print('.'); - } -} -console.log(' crayon!'); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/package.json deleted file mode 100644 index c9e268d0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "readable-stream", - "version": "1.0.25", - "description": "An exploration of a new kind of readable streams for Node.js", - "main": "readable.js", - "dependencies": { - "string_decoder": "~0.10.x" - }, - "devDependencies": { - "tap": "~0.2.6" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/readable-stream" - }, - "keywords": [ - "readable", - "stream", - "pipe" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "BSD", - "readme": "# readable-stream\n\nA new class of streams for Node.js\n\nThis module provides the new Stream base classes introduced in Node\nv0.10, for use in Node v0.8. You can use it to have programs that\nhave to work with node v0.8, while being forward-compatible for v0.10\nand beyond. When you drop support for v0.8, you can remove this\nmodule, and only use the native streams.\n\nThis is almost exactly the same codebase as appears in Node v0.10.\nHowever:\n\n1. The exported object is actually the Readable class. Decorating the\n native `stream` module would be global pollution.\n2. In v0.10, you can safely use `base64` as an argument to\n `setEncoding` in Readable streams. However, in v0.8, the\n StringDecoder class has no `end()` method, which is problematic for\n Base64. So, don't use that, because it'll break and be weird.\n\nOther than that, the API is the same as `require('stream')` in v0.10,\nso the API docs are reproduced below.\n\n----------\n\n Stability: 2 - Unstable\n\nA stream is an abstract interface implemented by various objects in\nNode. For example a request to an HTTP server is a stream, as is\nstdout. Streams are readable, writable, or both. All streams are\ninstances of [EventEmitter][]\n\nYou can load the Stream base classes by doing `require('stream')`.\nThere are base classes provided for Readable streams, Writable\nstreams, Duplex streams, and Transform streams.\n\n## Compatibility\n\nIn earlier versions of Node, the Readable stream interface was\nsimpler, but also less powerful and less useful.\n\n* Rather than waiting for you to call the `read()` method, `'data'`\n events would start emitting immediately. If you needed to do some\n I/O to decide how to handle data, then you had to store the chunks\n in some kind of buffer so that they would not be lost.\n* The `pause()` method was advisory, rather than guaranteed. This\n meant that you still had to be prepared to receive `'data'` events\n even when the stream was in a paused state.\n\nIn Node v0.10, the Readable class described below was added. For\nbackwards compatibility with older Node programs, Readable streams\nswitch into \"old mode\" when a `'data'` event handler is added, or when\nthe `pause()` or `resume()` methods are called. The effect is that,\neven if you are not using the new `read()` method and `'readable'`\nevent, you no longer have to worry about losing `'data'` chunks.\n\nMost programs will continue to function normally. However, this\nintroduces an edge case in the following conditions:\n\n* No `'data'` event handler is added.\n* The `pause()` and `resume()` methods are never called.\n\nFor example, consider the following code:\n\n```javascript\n// WARNING! BROKEN!\nnet.createServer(function(socket) {\n\n // we add an 'end' method, but never consume the data\n socket.on('end', function() {\n // It will never get here.\n socket.end('I got your message (but didnt read it)\\n');\n });\n\n}).listen(1337);\n```\n\nIn versions of node prior to v0.10, the incoming message data would be\nsimply discarded. However, in Node v0.10 and beyond, the socket will\nremain paused forever.\n\nThe workaround in this situation is to call the `resume()` method to\ntrigger \"old mode\" behavior:\n\n```javascript\n// Workaround\nnet.createServer(function(socket) {\n\n socket.on('end', function() {\n socket.end('I got your message (but didnt read it)\\n');\n });\n\n // start the flow of data, discarding it.\n socket.resume();\n\n}).listen(1337);\n```\n\nIn addition to new Readable streams switching into old-mode, pre-v0.10\nstyle streams can be wrapped in a Readable class using the `wrap()`\nmethod.\n\n## Class: stream.Readable\n\n<!--type=class-->\n\nA `Readable Stream` has the following methods, members, and events.\n\nNote that `stream.Readable` is an abstract class designed to be\nextended with an underlying implementation of the `_read(size)`\nmethod. (See below.)\n\n### new stream.Readable([options])\n\n* `options` {Object}\n * `highWaterMark` {Number} The maximum number of bytes to store in\n the internal buffer before ceasing to read from the underlying\n resource. Default=16kb\n * `encoding` {String} If specified, then buffers will be decoded to\n strings using the specified encoding. Default=null\n * `objectMode` {Boolean} Whether this stream should behave\n as a stream of objects. Meaning that stream.read(n) returns\n a single value instead of a Buffer of size n\n\nIn classes that extend the Readable class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### readable.\\_read(size)\n\n* `size` {Number} Number of bytes to read asynchronously\n\nNote: **This function should NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Readable\nclass methods only.\n\nAll Readable stream implementations must provide a `_read` method\nto fetch data from the underlying resource.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\nWhen data is available, put it into the read queue by calling\n`readable.push(chunk)`. If `push` returns false, then you should stop\nreading. When `_read` is called again, you should start pushing more\ndata.\n\nThe `size` argument is advisory. Implementations where a \"read\" is a\nsingle call that returns data can use this to know how much data to\nfetch. Implementations where that is not relevant, such as TCP or\nTLS, may ignore this argument, and simply provide data whenever it\nbecomes available. There is no need, for example to \"wait\" until\n`size` bytes are available before calling `stream.push(chunk)`.\n\n### readable.push(chunk)\n\n* `chunk` {Buffer | null | String} Chunk of data to push into the read queue\n* return {Boolean} Whether or not more pushes should be performed\n\nNote: **This function should be called by Readable implementors, NOT\nby consumers of Readable subclasses.** The `_read()` function will not\nbe called again until at least one `push(chunk)` call is made. If no\ndata is available, then you MAY call `push('')` (an empty string) to\nallow a future `_read` call, without adding any data to the queue.\n\nThe `Readable` class works by putting data into a read queue to be\npulled out later by calling the `read()` method when the `'readable'`\nevent fires.\n\nThe `push()` method will explicitly insert some data into the read\nqueue. If it is called with `null` then it will signal the end of the\ndata.\n\nIn some cases, you may be wrapping a lower-level source which has some\nsort of pause/resume mechanism, and a data callback. In those cases,\nyou could wrap the low-level source object by doing something like\nthis:\n\n```javascript\n// source is an object with readStop() and readStart() methods,\n// and an `ondata` member that gets called when it has data, and\n// an `onend` member that gets called when the data is over.\n\nvar stream = new Readable();\n\nsource.ondata = function(chunk) {\n // if push() returns false, then we need to stop reading from source\n if (!stream.push(chunk))\n source.readStop();\n};\n\nsource.onend = function() {\n stream.push(null);\n};\n\n// _read will be called when the stream wants to pull more data in\n// the advisory size argument is ignored in this case.\nstream._read = function(n) {\n source.readStart();\n};\n```\n\n### readable.unshift(chunk)\n\n* `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue\n* return {Boolean} Whether or not more pushes should be performed\n\nThis is the corollary of `readable.push(chunk)`. Rather than putting\nthe data at the *end* of the read queue, it puts it at the *front* of\nthe read queue.\n\nThis is useful in certain use-cases where a stream is being consumed\nby a parser, which needs to \"un-consume\" some data that it has\noptimistically pulled out of the source.\n\n```javascript\n// A parser for a simple data protocol.\n// The \"header\" is a JSON object, followed by 2 \\n characters, and\n// then a message body.\n//\n// Note: This can be done more simply as a Transform stream. See below.\n\nfunction SimpleProtocol(source, options) {\n if (!(this instanceof SimpleProtocol))\n return new SimpleProtocol(options);\n\n Readable.call(this, options);\n this._inBody = false;\n this._sawFirstCr = false;\n\n // source is a readable stream, such as a socket or file\n this._source = source;\n\n var self = this;\n source.on('end', function() {\n self.push(null);\n });\n\n // give it a kick whenever the source is readable\n // read(0) will not consume any bytes\n source.on('readable', function() {\n self.read(0);\n });\n\n this._rawHeader = [];\n this.header = null;\n}\n\nSimpleProtocol.prototype = Object.create(\n Readable.prototype, { constructor: { value: SimpleProtocol }});\n\nSimpleProtocol.prototype._read = function(n) {\n if (!this._inBody) {\n var chunk = this._source.read();\n\n // if the source doesn't have data, we don't have data yet.\n if (chunk === null)\n return this.push('');\n\n // check if the chunk has a \\n\\n\n var split = -1;\n for (var i = 0; i < chunk.length; i++) {\n if (chunk[i] === 10) { // '\\n'\n if (this._sawFirstCr) {\n split = i;\n break;\n } else {\n this._sawFirstCr = true;\n }\n } else {\n this._sawFirstCr = false;\n }\n }\n\n if (split === -1) {\n // still waiting for the \\n\\n\n // stash the chunk, and try again.\n this._rawHeader.push(chunk);\n this.push('');\n } else {\n this._inBody = true;\n var h = chunk.slice(0, split);\n this._rawHeader.push(h);\n var header = Buffer.concat(this._rawHeader).toString();\n try {\n this.header = JSON.parse(header);\n } catch (er) {\n this.emit('error', new Error('invalid simple protocol data'));\n return;\n }\n // now, because we got some extra data, unshift the rest\n // back into the read queue so that our consumer will see it.\n var b = chunk.slice(split);\n this.unshift(b);\n\n // and let them know that we are done parsing the header.\n this.emit('header', this.header);\n }\n } else {\n // from there on, just provide the data to our consumer.\n // careful not to push(null), since that would indicate EOF.\n var chunk = this._source.read();\n if (chunk) this.push(chunk);\n }\n};\n\n// Usage:\nvar parser = new SimpleProtocol(source);\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.\n```\n\n### readable.wrap(stream)\n\n* `stream` {Stream} An \"old style\" readable stream\n\nIf you are using an older Node library that emits `'data'` events and\nhas a `pause()` method that is advisory only, then you can use the\n`wrap()` method to create a Readable stream that uses the old stream\nas its data source.\n\nFor example:\n\n```javascript\nvar OldReader = require('./old-api-module.js').OldReader;\nvar oreader = new OldReader;\nvar Readable = require('stream').Readable;\nvar myReader = new Readable().wrap(oreader);\n\nmyReader.on('readable', function() {\n myReader.read(); // etc.\n});\n```\n\n### Event: 'readable'\n\nWhen there is data ready to be consumed, this event will fire.\n\nWhen this event emits, call the `read()` method to consume the data.\n\n### Event: 'end'\n\nEmitted when the stream has received an EOF (FIN in TCP terminology).\nIndicates that no more `'data'` events will happen. If the stream is\nalso writable, it may be possible to continue writing.\n\n### Event: 'data'\n\nThe `'data'` event emits either a `Buffer` (by default) or a string if\n`setEncoding()` was used.\n\nNote that adding a `'data'` event listener will switch the Readable\nstream into \"old mode\", where data is emitted as soon as it is\navailable, rather than waiting for you to call `read()` to consume it.\n\n### Event: 'error'\n\nEmitted if there was an error receiving data.\n\n### Event: 'close'\n\nEmitted when the underlying resource (for example, the backing file\ndescriptor) has been closed. Not all streams will emit this.\n\n### readable.setEncoding(encoding)\n\nMakes the `'data'` event emit a string instead of a `Buffer`. `encoding`\ncan be `'utf8'`, `'utf16le'` (`'ucs2'`), `'ascii'`, or `'hex'`.\n\nThe encoding can also be set by specifying an `encoding` field to the\nconstructor.\n\n### readable.read([size])\n\n* `size` {Number | null} Optional number of bytes to read.\n* Return: {Buffer | String | null}\n\nNote: **This function SHOULD be called by Readable stream users.**\n\nCall this method to consume data once the `'readable'` event is\nemitted.\n\nThe `size` argument will set a minimum number of bytes that you are\ninterested in. If not set, then the entire content of the internal\nbuffer is returned.\n\nIf there is no data to consume, or if there are fewer bytes in the\ninternal buffer than the `size` argument, then `null` is returned, and\na future `'readable'` event will be emitted when more is available.\n\nCalling `stream.read(0)` will always return `null`, and will trigger a\nrefresh of the internal buffer, but otherwise be a no-op.\n\n### readable.pipe(destination, [options])\n\n* `destination` {Writable Stream}\n* `options` {Object} Optional\n * `end` {Boolean} Default=true\n\nConnects this readable stream to `destination` WriteStream. Incoming\ndata on this stream gets written to `destination`. Properly manages\nback-pressure so that a slow destination will not be overwhelmed by a\nfast readable stream.\n\nThis function returns the `destination` stream.\n\nFor example, emulating the Unix `cat` command:\n\n process.stdin.pipe(process.stdout);\n\nBy default `end()` is called on the destination when the source stream\nemits `end`, so that `destination` is no longer writable. Pass `{ end:\nfalse }` as `options` to keep the destination stream open.\n\nThis keeps `writer` open so that \"Goodbye\" can be written at the\nend.\n\n reader.pipe(writer, { end: false });\n reader.on(\"end\", function() {\n writer.end(\"Goodbye\\n\");\n });\n\nNote that `process.stderr` and `process.stdout` are never closed until\nthe process exits, regardless of the specified options.\n\n### readable.unpipe([destination])\n\n* `destination` {Writable Stream} Optional\n\nUndo a previously established `pipe()`. If no destination is\nprovided, then all previously established pipes are removed.\n\n### readable.pause()\n\nSwitches the readable stream into \"old mode\", where data is emitted\nusing a `'data'` event rather than being buffered for consumption via\nthe `read()` method.\n\nCeases the flow of data. No `'data'` events are emitted while the\nstream is in a paused state.\n\n### readable.resume()\n\nSwitches the readable stream into \"old mode\", where data is emitted\nusing a `'data'` event rather than being buffered for consumption via\nthe `read()` method.\n\nResumes the incoming `'data'` events after a `pause()`.\n\n\n## Class: stream.Writable\n\n<!--type=class-->\n\nA `Writable` Stream has the following methods, members, and events.\n\nNote that `stream.Writable` is an abstract class designed to be\nextended with an underlying implementation of the\n`_write(chunk, encoding, cb)` method. (See below.)\n\n### new stream.Writable([options])\n\n* `options` {Object}\n * `highWaterMark` {Number} Buffer level when `write()` starts\n returning false. Default=16kb\n * `decodeStrings` {Boolean} Whether or not to decode strings into\n Buffers before passing them to `_write()`. Default=true\n\nIn classes that extend the Writable class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### writable.\\_write(chunk, encoding, callback)\n\n* `chunk` {Buffer | String} The chunk to be written. Will always\n be a buffer unless the `decodeStrings` option was set to `false`.\n* `encoding` {String} If the chunk is a string, then this is the\n encoding type. Ignore chunk is a buffer. Note that chunk will\n **always** be a buffer unless the `decodeStrings` option is\n explicitly set to `false`.\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done processing the supplied chunk.\n\nAll Writable stream implementations must provide a `_write` method to\nsend data to the underlying resource.\n\nNote: **This function MUST NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Writable\nclass methods only.\n\nCall the callback using the standard `callback(error)` pattern to\nsignal that the write completed successfully or with an error.\n\nIf the `decodeStrings` flag is set in the constructor options, then\n`chunk` may be a string rather than a Buffer, and `encoding` will\nindicate the sort of string that it is. This is to support\nimplementations that have an optimized handling for certain string\ndata encodings. If you do not explicitly set the `decodeStrings`\noption to `false`, then you can safely ignore the `encoding` argument,\nand assume that `chunk` will always be a Buffer.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n\n### writable.write(chunk, [encoding], [callback])\n\n* `chunk` {Buffer | String} Data to be written\n* `encoding` {String} Optional. If `chunk` is a string, then encoding\n defaults to `'utf8'`\n* `callback` {Function} Optional. Called when this chunk is\n successfully written.\n* Returns {Boolean}\n\nWrites `chunk` to the stream. Returns `true` if the data has been\nflushed to the underlying resource. Returns `false` to indicate that\nthe buffer is full, and the data will be sent out in the future. The\n`'drain'` event will indicate when the buffer is empty again.\n\nThe specifics of when `write()` will return false, is determined by\nthe `highWaterMark` option provided to the constructor.\n\n### writable.end([chunk], [encoding], [callback])\n\n* `chunk` {Buffer | String} Optional final data to be written\n* `encoding` {String} Optional. If `chunk` is a string, then encoding\n defaults to `'utf8'`\n* `callback` {Function} Optional. Called when the final chunk is\n successfully written.\n\nCall this method to signal the end of the data being written to the\nstream.\n\n### Event: 'drain'\n\nEmitted when the stream's write queue empties and it's safe to write\nwithout buffering again. Listen for it when `stream.write()` returns\n`false`.\n\n### Event: 'close'\n\nEmitted when the underlying resource (for example, the backing file\ndescriptor) has been closed. Not all streams will emit this.\n\n### Event: 'finish'\n\nWhen `end()` is called and there are no more chunks to write, this\nevent is emitted.\n\n### Event: 'pipe'\n\n* `source` {Readable Stream}\n\nEmitted when the stream is passed to a readable stream's pipe method.\n\n### Event 'unpipe'\n\n* `source` {Readable Stream}\n\nEmitted when a previously established `pipe()` is removed using the\nsource Readable stream's `unpipe()` method.\n\n## Class: stream.Duplex\n\n<!--type=class-->\n\nA \"duplex\" stream is one that is both Readable and Writable, such as a\nTCP socket connection.\n\nNote that `stream.Duplex` is an abstract class designed to be\nextended with an underlying implementation of the `_read(size)`\nand `_write(chunk, encoding, callback)` methods as you would with a Readable or\nWritable stream class.\n\nSince JavaScript doesn't have multiple prototypal inheritance, this\nclass prototypally inherits from Readable, and then parasitically from\nWritable. It is thus up to the user to implement both the lowlevel\n`_read(n)` method as well as the lowlevel `_write(chunk, encoding, cb)` method\non extension duplex classes.\n\n### new stream.Duplex(options)\n\n* `options` {Object} Passed to both Writable and Readable\n constructors. Also has the following fields:\n * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then\n the stream will automatically end the readable side when the\n writable side ends and vice versa.\n\nIn classes that extend the Duplex class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n## Class: stream.Transform\n\nA \"transform\" stream is a duplex stream where the output is causally\nconnected in some way to the input, such as a zlib stream or a crypto\nstream.\n\nThere is no requirement that the output be the same size as the input,\nthe same number of chunks, or arrive at the same time. For example, a\nHash stream will only ever have a single chunk of output which is\nprovided when the input is ended. A zlib stream will either produce\nmuch smaller or much larger than its input.\n\nRather than implement the `_read()` and `_write()` methods, Transform\nclasses must implement the `_transform()` method, and may optionally\nalso implement the `_flush()` method. (See below.)\n\n### new stream.Transform([options])\n\n* `options` {Object} Passed to both Writable and Readable\n constructors.\n\nIn classes that extend the Transform class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### transform.\\_transform(chunk, encoding, callback)\n\n* `chunk` {Buffer | String} The chunk to be transformed. Will always\n be a buffer unless the `decodeStrings` option was set to `false`.\n* `encoding` {String} If the chunk is a string, then this is the\n encoding type. (Ignore if `decodeStrings` chunk is a buffer.)\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done processing the supplied chunk.\n\nNote: **This function MUST NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Transform\nclass methods only.\n\nAll Transform stream implementations must provide a `_transform`\nmethod to accept input and produce output.\n\n`_transform` should do whatever has to be done in this specific\nTransform class, to handle the bytes being written, and pass them off\nto the readable portion of the interface. Do asynchronous I/O,\nprocess things, and so on.\n\nCall `transform.push(outputChunk)` 0 or more times to generate output\nfrom this input chunk, depending on how much data you want to output\nas a result of this chunk.\n\nCall the callback function only when the current chunk is completely\nconsumed. Note that there may or may not be output as a result of any\nparticular input chunk.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n### transform.\\_flush(callback)\n\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done flushing any remaining data.\n\nNote: **This function MUST NOT be called directly.** It MAY be implemented\nby child classes, and if so, will be called by the internal Transform\nclass methods only.\n\nIn some cases, your transform operation may need to emit a bit more\ndata at the end of the stream. For example, a `Zlib` compression\nstream will store up some internal state so that it can optimally\ncompress the output. At the end, however, it needs to do the best it\ncan with what is left, so that the data will be complete.\n\nIn those cases, you can implement a `_flush` method, which will be\ncalled at the very end, after all the written data is consumed, but\nbefore emitting `end` to signal the end of the readable side. Just\nlike with `_transform`, call `transform.push(chunk)` zero or more\ntimes, as appropriate, and call `callback` when the flush operation is\ncomplete.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n### Example: `SimpleProtocol` parser\n\nThe example above of a simple protocol parser can be implemented much\nmore simply by using the higher level `Transform` stream class.\n\nIn this example, rather than providing the input as an argument, it\nwould be piped into the parser, which is a more idiomatic Node stream\napproach.\n\n```javascript\nfunction SimpleProtocol(options) {\n if (!(this instanceof SimpleProtocol))\n return new SimpleProtocol(options);\n\n Transform.call(this, options);\n this._inBody = false;\n this._sawFirstCr = false;\n this._rawHeader = [];\n this.header = null;\n}\n\nSimpleProtocol.prototype = Object.create(\n Transform.prototype, { constructor: { value: SimpleProtocol }});\n\nSimpleProtocol.prototype._transform = function(chunk, encoding, done) {\n if (!this._inBody) {\n // check if the chunk has a \\n\\n\n var split = -1;\n for (var i = 0; i < chunk.length; i++) {\n if (chunk[i] === 10) { // '\\n'\n if (this._sawFirstCr) {\n split = i;\n break;\n } else {\n this._sawFirstCr = true;\n }\n } else {\n this._sawFirstCr = false;\n }\n }\n\n if (split === -1) {\n // still waiting for the \\n\\n\n // stash the chunk, and try again.\n this._rawHeader.push(chunk);\n } else {\n this._inBody = true;\n var h = chunk.slice(0, split);\n this._rawHeader.push(h);\n var header = Buffer.concat(this._rawHeader).toString();\n try {\n this.header = JSON.parse(header);\n } catch (er) {\n this.emit('error', new Error('invalid simple protocol data'));\n return;\n }\n // and let them know that we are done parsing the header.\n this.emit('header', this.header);\n\n // now, because we got some extra data, emit this first.\n this.push(b);\n }\n } else {\n // from there on, just provide the data to our consumer as-is.\n this.push(b);\n }\n done();\n};\n\nvar parser = new SimpleProtocol();\nsource.pipe(parser)\n\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.\n```\n\n\n## Class: stream.PassThrough\n\nThis is a trivial implementation of a `Transform` stream that simply\npasses the input bytes across to the output. Its purpose is mainly\nfor examples and testing, but there are occasionally use cases where\nit can come in handy.\n\n\n[EventEmitter]: events.html#events_class_events_eventemitter\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/readable-stream/issues" - }, - "homepage": "https://github.com/isaacs/readable-stream", - "_id": "readable-stream@1.0.25", - "dist": { - "shasum": "3d234b55fd2a25db8327618f088e50a32044df50" - }, - "_from": "readable-stream@~1.0.17", - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.25.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/passthrough.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/readable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/readable.js deleted file mode 100644 index 4d1ddfc7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,6 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/transform.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f07..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/writable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efdf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/LICENCE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/LICENCE deleted file mode 100644 index a23e08a8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 Raynos. - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/Makefile deleted file mode 100644 index d583fcf4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -browser: - node ./support/compile - -.PHONY: browser \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/README.md deleted file mode 100644 index 389adae3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# xtend - -[![browser support][3]][4] - -Extend like a boss - -xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence. - -## Examples - -```js -var extend = require("xtend") - -var combination = extend({ - a: "a" -}, { - b: "b" -}) -// { a: "a", b: "b" } -``` - - -## MIT Licenced - - - [3]: http://ci.testling.com/Raynos/xtend.png - [4]: http://ci.testling.com/Raynos/xtend diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/has-keys.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/has-keys.js deleted file mode 100644 index 62391e78..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/has-keys.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = hasKeys - -function hasKeys(source) { - return source !== null && - (typeof source === "object" || - typeof source === "function") -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/index.js deleted file mode 100644 index 20937d19..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/index.js +++ /dev/null @@ -1,25 +0,0 @@ -var Keys = require("object-keys") -var hasKeys = require("./has-keys") - -module.exports = extend - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - if (!hasKeys(source)) { - continue - } - - var keys = Keys(source) - - for (var j = 0; j < keys.length; j++) { - var name = keys[j] - target[name] = source[name] - } - } - - return target -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/mutable.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/mutable.js deleted file mode 100644 index 17454ae4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/mutable.js +++ /dev/null @@ -1,25 +0,0 @@ -var Keys = require("object-keys") -var hasKeys = require("./has-keys") - -module.exports = extend - -function extend(target) { - var sources = [].slice.call(arguments, 1) - - for (var i = 0; i < sources.length; i++) { - var source = sources[i] - - if (!hasKeys(source)) { - continue - } - - var keys = Keys(source) - - for (var j = 0; j < keys.length; j++) { - var name = keys[j] - target[name] = source[name] - } - } - - return target -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml deleted file mode 100644 index 60d00ce1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.8" - - "0.6" diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md deleted file mode 100644 index ab32d0ad..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md +++ /dev/null @@ -1,39 +0,0 @@ -#object-keys <sup>[![Version Badge][2]][1]</sup> - -[![Build Status][3]][4] [![dependency status][5]][6] - -[![browser support][7]][8] - -An Object.keys shim. Uses Object.keys if available. - -## Example - -```js -var keys = require('object-keys'); -var assert = require('assert'); -var obj = { - a: true, - b: true, - c: true -}; - -assert.equal(keys(obj), ['a', 'b', 'c']); -``` - -## Source -Implementation taken directly from [es5-shim]([9]), with modifications, including from [lodash]([10]). - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[1]: https://npmjs.org/package/object-keys -[2]: http://vb.teelaun.ch/ljharb/object-keys.svg -[3]: https://travis-ci.org/ljharb/object-keys.png -[4]: https://travis-ci.org/ljharb/object-keys -[5]: https://david-dm.org/ljharb/object-keys.png -[6]: https://david-dm.org/ljharb/object-keys -[7]: https://ci.testling.com/ljharb/object-keys.png -[8]: https://ci.testling.com/ljharb/object-keys -[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589 -[10]: https://github.com/bestiejs/lodash - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js deleted file mode 100644 index db32d458..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js +++ /dev/null @@ -1,40 +0,0 @@ -var hasOwn = Object.prototype.hasOwnProperty; -var toString = Object.prototype.toString; - -var isFunction = function (fn) { - var isFunc = (typeof fn === 'function' && !(fn instanceof RegExp)) || toString.call(fn) === '[object Function]'; - if (!isFunc && typeof window !== 'undefined') { - isFunc = fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt; - } - return isFunc; -}; - -module.exports = function forEach(obj, fn) { - if (!isFunction(fn)) { - throw new TypeError('iterator must be a function'); - } - var i, k, - isString = typeof obj === 'string', - l = obj.length, - context = arguments.length > 2 ? arguments[2] : null; - if (l === +l) { - for (i = 0; i < l; i++) { - if (context === null) { - fn(isString ? obj.charAt(i) : obj[i], i, obj); - } else { - fn.call(context, isString ? obj.charAt(i) : obj[i], i, obj); - } - } - } else { - for (k in obj) { - if (hasOwn.call(obj, k)) { - if (context === null) { - fn(obj[k], k, obj); - } else { - fn.call(context, obj[k], k, obj); - } - } - } - } -}; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js deleted file mode 100644 index f5b24b6d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js +++ /dev/null @@ -1,2 +0,0 @@ -module.exports = Object.keys || require('./shim'); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js deleted file mode 100644 index 74a09897..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js +++ /dev/null @@ -1,16 +0,0 @@ -var toString = Object.prototype.toString; - -module.exports = function isArguments(value) { - var str = toString.call(value); - var isArguments = str === '[object Arguments]'; - if (!isArguments) { - isArguments = str !== '[object Array]' - && value !== null - && typeof value === 'object' - && typeof value.length === 'number' - && value.length >= 0 - && toString.call(value.callee) === '[object Function]'; - } - return isArguments; -}; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json deleted file mode 100644 index 9dfda8dc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "object-keys", - "version": "0.4.0", - "author": { - "name": "Jordan Harband" - }, - "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/kriskowal/es5-shim", - "license": "MIT", - "main": "index.js", - "scripts": { - "test": "node test/index.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/ljharb/object-keys.git" - }, - "keywords": [ - "Object.keys", - "keys", - "ES5", - "shim" - ], - "dependencies": {}, - "devDependencies": { - "foreach": "~2.0.3", - "is": "~0.2.6", - "tape": "~1.0.4", - "indexof": "~0.0.1" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "readme": "#object-keys <sup>[![Version Badge][2]][1]</sup>\n\n[![Build Status][3]][4] [![dependency status][5]][6]\n\n[![browser support][7]][8]\n\nAn Object.keys shim. Uses Object.keys if available.\n\n## Example\n\n```js\nvar keys = require('object-keys');\nvar assert = require('assert');\nvar obj = {\n\ta: true,\n\tb: true,\n\tc: true\n};\n\nassert.equal(keys(obj), ['a', 'b', 'c']);\n```\n\n## Source\nImplementation taken directly from [es5-shim]([9]), with modifications, including from [lodash]([10]).\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[1]: https://npmjs.org/package/object-keys\n[2]: http://vb.teelaun.ch/ljharb/object-keys.svg\n[3]: https://travis-ci.org/ljharb/object-keys.png\n[4]: https://travis-ci.org/ljharb/object-keys\n[5]: https://david-dm.org/ljharb/object-keys.png\n[6]: https://david-dm.org/ljharb/object-keys\n[7]: https://ci.testling.com/ljharb/object-keys.png\n[8]: https://ci.testling.com/ljharb/object-keys\n[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589\n[10]: https://github.com/bestiejs/lodash\n\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/ljharb/object-keys/issues" - }, - "homepage": "https://github.com/ljharb/object-keys", - "_id": "object-keys@0.4.0", - "dist": { - "shasum": "28a6aae7428dd2c3a92f3d95f21335dd204e0336" - }, - "_from": "object-keys@~0.4.0", - "_resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js deleted file mode 100644 index b88421be..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js +++ /dev/null @@ -1,62 +0,0 @@ -(function () { - "use strict"; - - // modified from https://github.com/kriskowal/es5-shim - var has = Object.prototype.hasOwnProperty, - toString = Object.prototype.toString, - forEach = require('./foreach'), - isArgs = require('./isArguments'), - hasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'), - hasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype'), - dontEnums = [ - "toString", - "toLocaleString", - "valueOf", - "hasOwnProperty", - "isPrototypeOf", - "propertyIsEnumerable", - "constructor" - ], - keysShim; - - keysShim = function keys(object) { - var isObject = object !== null && typeof object === 'object', - isFunction = toString.call(object) === '[object Function]', - isArguments = isArgs(object), - theKeys = []; - - if (!isObject && !isFunction && !isArguments) { - throw new TypeError("Object.keys called on a non-object"); - } - - if (isArguments) { - forEach(object, function (value) { - theKeys.push(value); - }); - } else { - var name, - skipProto = hasProtoEnumBug && isFunction; - - for (name in object) { - if (!(skipProto && name === 'prototype') && has.call(object, name)) { - theKeys.push(name); - } - } - } - - if (hasDontEnumBug) { - var ctor = object.constructor, - skipConstructor = ctor && ctor.prototype === object; - - forEach(dontEnums, function (dontEnum) { - if (!(skipConstructor && dontEnum === 'constructor') && has.call(object, dontEnum)) { - theKeys.push(dontEnum); - } - }); - } - return theKeys; - }; - - module.exports = keysShim; -}()); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js deleted file mode 100644 index f29f065a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js +++ /dev/null @@ -1,156 +0,0 @@ -var test = require('tape'); -var forEach = require('../foreach.js'); - -test('second argument: iterator', function (t) { - var arr = []; - t.throws(function () { forEach(arr); }, TypeError, 'undefined is not a function'); - t.throws(function () { forEach(arr, null); }, TypeError, 'null is not a function'); - t.throws(function () { forEach(arr, ''); }, TypeError, 'string is not a function'); - t.throws(function () { forEach(arr, /a/); }, TypeError, 'regex is not a function'); - t.throws(function () { forEach(arr, true); }, TypeError, 'true is not a function'); - t.throws(function () { forEach(arr, false); }, TypeError, 'false is not a function'); - t.throws(function () { forEach(arr, NaN); }, TypeError, 'NaN is not a function'); - t.throws(function () { forEach(arr, 42); }, TypeError, '42 is not a function'); - t.doesNotThrow(function () { forEach(arr, function () {}); }, 'function is a function'); - t.doesNotThrow(function () { forEach(arr, setTimeout); }, 'setTimeout is a function'); - if (typeof window !== 'undefined') { - t.doesNotThrow(function () { forEach(arr, window.alert); }, 'alert is a function'); - } - t.end(); -}); - -test('array', function (t) { - var arr = [1, 2, 3]; - - t.test('iterates over every item', function (st) { - var index = 0; - forEach(arr, function () { index += 1; }); - st.equal(index, arr.length, 'iterates ' + arr.length + ' times'); - st.end(); - }); - - t.test('first iterator argument', function (st) { - var index = 0; - st.plan(arr.length); - forEach(arr, function (item) { - st.equal(arr[index], item, 'item ' + index + ' is passed as first argument'); - index += 1; - }); - st.end(); - }); - - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(arr.length); - forEach(arr, function (item, index) { - st.equal(counter, index, 'index ' + index + ' is passed as second argument'); - counter += 1; - }); - st.end(); - }); - - t.test('third iterator argument', function (st) { - st.plan(arr.length); - forEach(arr, function (item, index, array) { - st.deepEqual(arr, array, 'array is passed as third argument'); - }); - st.end(); - }); - - t.test('context argument', function (st) { - var context = {}; - st.plan(arr.length); - forEach(arr, function () { - st.equal(this, context, '"this" is the passed context'); - }, context); - st.end(); - }); - - t.end(); -}); - -test('object', function (t) { - var obj = { - a: 1, - b: 2, - c: 3 - }; - var keys = ['a', 'b', 'c']; - - var F = function () { - this.a = 1; - this.b = 2; - }; - F.prototype.c = 3; - var fKeys = ['a', 'b']; - - t.test('iterates over every object literal key', function (st) { - var counter = 0; - forEach(obj, function () { counter += 1; }); - st.equal(counter, keys.length, 'iterated ' + counter + ' times'); - st.end(); - }); - - t.test('iterates only over own keys', function (st) { - var counter = 0; - forEach(new F(), function () { counter += 1; }); - st.equal(counter, fKeys.length, 'iterated ' + fKeys.length + ' times'); - st.end(); - }); - - t.test('first iterator argument', function (st) { - var index = 0; - st.plan(keys.length); - forEach(obj, function (item) { - st.equal(obj[keys[index]], item, 'item at key ' + keys[index] + ' is passed as first argument'); - index += 1; - }); - st.end(); - }); - - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(keys.length); - forEach(obj, function (item, key) { - st.equal(keys[counter], key, 'key ' + key + ' is passed as second argument'); - counter += 1; - }); - st.end(); - }); - - t.test('third iterator argument', function (st) { - st.plan(keys.length); - forEach(obj, function (item, key, object) { - st.deepEqual(obj, object, 'object is passed as third argument'); - }); - st.end(); - }); - - t.test('context argument', function (st) { - var context = {}; - st.plan(1); - forEach({foo: 'bar'}, function () { - st.equal(this, context, '"this" is the passed context'); - }, context); - st.end(); - }); - - t.end(); -}); - - -test('string', function (t) { - var str = 'str'; - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(str.length * 2 + 1); - forEach(str, function (item, index) { - st.equal(counter, index, 'index ' + index + ' is passed as second argument'); - st.equal(str.charAt(index), item); - counter += 1; - }); - st.equal(counter, str.length, 'iterates ' + str.length + ' times'); - }); - t.end(); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js deleted file mode 100644 index 8b77b1fc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js +++ /dev/null @@ -1,6 +0,0 @@ - -require('./foreach'); -require('./isArguments'); - -require('./shim'); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js deleted file mode 100644 index 62a07c2d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js +++ /dev/null @@ -1,10 +0,0 @@ -var test = require('tape'); -var isArguments = require('../isArguments'); - -test('is.arguments', function (t) { - t.notOk(isArguments([]), 'array is not arguments'); - (function () { t.ok(isArguments(arguments), 'arguments is arguments'); }()); - (function () { t.notOk(isArguments(Array.prototype.slice.call(arguments)), 'sliced arguments is not arguments'); }()); - t.end(); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js deleted file mode 100644 index 9d932712..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js +++ /dev/null @@ -1,134 +0,0 @@ -var test = require('tape'); -var shimmedKeys = require('../index.js'); -var is = require('is'); -var keys = require('../shim.js'); -var forEach = require('foreach'); -var indexOf = require('indexof'); - -var obj = { - "str": "boz", - "obj": {}, - "arr": [], - "bool": true, - "num": 42, - "aNull": null, - "undef": undefined -}; -var objKeys = ['str', 'obj', 'arr', 'bool', 'num', 'aNull', 'undef']; - -test('exports a function', function (t) { - if (Object.keys) { - t.equal(Object.keys, shimmedKeys, 'Object.keys is supported and exported'); - } else { - t.equal(keys, shimmedKeys, 'Object.keys is not supported; shim is exported'); - } - t.end(); -}); - -test('working with actual shim', function (t) { - t.notEqual(Object.keys, keys, 'keys shim is not native Object.keys'); - t.end(); -}); - -test('works with an object literal', function (t) { - var theKeys = keys(obj); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, objKeys, 'Object has expected keys'); - t.end(); -}); - -test('works with an array', function (t) { - var arr = [1, 2, 3]; - var theKeys = keys(arr); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, ['0', '1', '2'], 'Array has expected keys'); - t.end(); -}); - -test('works with a function', function (t) { - var foo = function () {}; - foo.a = true; - - t.doesNotThrow(function () { return keys(foo); }, 'does not throw an error'); - t.deepEqual(keys(foo), ['a'], 'returns expected keys'); - t.end(); -}); - -test('returns names which are own properties', function (t) { - forEach(keys(obj), function (name) { - t.equal(obj.hasOwnProperty(name), true, name + ' should be returned'); - }); - t.end(); -}); - -test('returns names which are enumerable', function (t) { - var k, loopedValues = []; - for (k in obj) { - loopedValues.push(k); - } - forEach(keys(obj), function (name) { - t.notEqual(indexOf(loopedValues, name), -1, name + ' is not enumerable'); - }); - t.end(); -}); - -test('throws an error for a non-object', function (t) { - t.throws( - function () { return keys(42); }, - new TypeError('Object.keys called on a non-object'), - 'throws on a non-object' - ); - t.end(); -}); - -test('works with an object instance', function (t) { - var Prototype = function () {}; - Prototype.prototype.foo = true; - var obj = new Prototype(); - obj.bar = true; - var theKeys = keys(obj); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, ['bar'], 'Instance has expected keys'); - t.end(); -}); - -test('works in iOS 5 mobile Safari', function (t) { - var Foo = function () {}; - Foo.a = function () {}; - - // the bug is keys(Foo) => ['a', 'prototype'] instead of ['a'] - t.deepEqual(keys(Foo), ['a'], 'has expected keys'); - t.end(); -}); - -test('works in environments with the dontEnum bug (IE < 9)', function (t) { - var Foo = function () {}; - Foo.prototype.a = function () {}; - - // the bug is keys(Foo.prototype) => ['a', 'constructor'] instead of ['a'] - t.deepEqual(keys(Foo.prototype), ['a'], 'has expected keys'); - t.end(); -}); - -test('shadowed properties', function (t) { - var shadowedProps = [ - 'dummyControlProp', /* just to be sure */ - 'constructor', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'toLocaleString', - 'toString', - 'valueOf' - ]; - shadowedProps.sort(); - var shadowedObject = {}; - forEach(shadowedProps, function (value, index) { - shadowedObject[value] = index; - }); - var shadowedObjectKeys = keys(shadowedObject); - shadowedObjectKeys.sort(); - t.deepEqual(shadowedObjectKeys, shadowedProps, 'troublesome shadowed properties are keys of object literals'); - t.end(); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/package.json deleted file mode 100644 index a761197d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "xtend", - "version": "2.1.2", - "description": "extend like a boss", - "keywords": [ - "extend", - "merge", - "options", - "opts", - "object", - "array" - ], - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Raynos/xtend.git" - }, - "main": "index", - "scripts": { - "test": "node test" - }, - "dependencies": { - "object-keys": "~0.4.0" - }, - "devDependencies": { - "tape": "~1.1.0" - }, - "homepage": "https://github.com/Raynos/xtend", - "contributors": [ - { - "name": "Jake Verbaten" - }, - { - "name": "Matt Esch" - } - ], - "bugs": { - "url": "https://github.com/Raynos/xtend/issues", - "email": "raynos2@gmail.com" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/raynos/xtend/raw/master/LICENSE" - } - ], - "testling": { - "files": "test.js", - "browsers": [ - "ie/7..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "engines": { - "node": ">=0.4" - }, - "readme": "# xtend\n\n[![browser support][3]][4]\n\nExtend like a boss\n\nxtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence.\n\n## Examples\n\n```js\nvar extend = require(\"xtend\")\n\nvar combination = extend({\n a: \"a\"\n}, {\n b: \"b\"\n})\n// { a: \"a\", b: \"b\" }\n```\n\n\n## MIT Licenced\n\n\n [3]: http://ci.testling.com/Raynos/xtend.png\n [4]: http://ci.testling.com/Raynos/xtend\n", - "readmeFilename": "README.md", - "_id": "xtend@2.1.2", - "dist": { - "shasum": "5e8f75d1b0d9ca976fee0f1aa88f80c7619210d5" - }, - "_from": "xtend@~2.1.1", - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/test.js deleted file mode 100644 index 3369d796..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/node_modules/xtend/test.js +++ /dev/null @@ -1,63 +0,0 @@ -var test = require("tape") -var extend = require("./") -var mutableExtend = require("./mutable") - -test("merge", function(assert) { - var a = { a: "foo" } - var b = { b: "bar" } - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("replace", function(assert) { - var a = { a: "foo" } - var b = { a: "bar" } - - assert.deepEqual(extend(a, b), { a: "bar" }) - assert.end() -}) - -test("undefined", function(assert) { - var a = { a: undefined } - var b = { b: "foo" } - - assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) - assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) - assert.end() -}) - -test("handle 0", function(assert) { - var a = { a: "default" } - var b = { a: 0 } - - assert.deepEqual(extend(a, b), { a: 0 }) - assert.deepEqual(extend(b, a), { a: "default" }) - assert.end() -}) - -test("is immutable", function (assert) { - var record = {} - - extend(record, { foo: "bar" }) - assert.equal(record.foo, undefined) - assert.end() -}) - -test("null as argument", function (assert) { - var a = { foo: "bar" } - var b = null - var c = void 0 - - assert.deepEqual(extend(b, a, c), { foo: "bar" }) - assert.end() -}) - -test("mutable", function (assert) { - var a = { foo: "bar" } - - mutableExtend(a, { bar: "baz" }) - - assert.equal(a.bar, "baz") - assert.end() -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/package.json deleted file mode 100644 index 9612fee2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "through2", - "version": "0.4.1", - "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", - "main": "through2.js", - "scripts": { - "test": "node test/test.js", - "test-local": "brtapsauce-local test/basic-test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/rvagg/through2.git" - }, - "keywords": [ - "stream", - "streams2", - "through", - "transform" - ], - "author": { - "name": "Rod Vagg", - "email": "r@va.gg", - "url": "https://github.com/rvagg" - }, - "license": "MIT", - "dependencies": { - "readable-stream": "~1.0.17", - "xtend": "~2.1.1" - }, - "devDependencies": { - "tape": "~2.3.0", - "bl": "~0.6.0", - "stream-spigot": "~3.0.1", - "brtapsauce": "~0.2.2" - }, - "readme": "# through2\n\n<!--\n\nsoon ...\n\n[![Build Status](https://secure.travis-ci.org/rvagg/through2.png)](http://travis-ci.org/rvagg/through2)\n\n[![Build Status](https://saucelabs.com/browser-matrix/through2-sauce.svg)](https://travis-ci.org/rvagg/through2)\n\n-->\n\n[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/) \n\n<!--\nnot happy with these, we need to peg to readable-stream@1.0.x so it'll always report out-of-date\n\n[![david-dm](https://david-dm.org/rvagg/through2.png)](https://david-dm.org/rvagg/through2/)\n[![david-dm](https://david-dm.org/rvagg/through2/dev-status.png)](https://david-dm.org/rvagg/through2#info=devDependencies/)\n-->\n\n**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise**\n\nInspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.\n\n```js\nfs.createReadStream('ex.txt')\n .pipe(through2(function (chunk, enc, callback) {\n\n for (var i = 0; i < chunk.length; i++)\n if (chunk[i] == 97)\n chunk[i] = 122 // swap 'a' for 'z'\n\n this.push(chunk)\n \n callback()\n\n }))\n .pipe(fs.createWriteStream('out.txt'))\n```\n\nOr object streams:\n\n```js\nvar all = []\n\nfs.createReadStream('data.csv')\n .pipe(csv2())\n .pipe(through2.obj(function (chunk, enc, callback) {\n\n var data = {\n name : chunk[0]\n , address : chunk[3]\n , phone : chunk[10]\n }\n \n this.push(data)\n \n callback()\n\n }))\n .on('data', function (data) {\n all.push(data)\n })\n .on('end', function () {\n doSomethingSpecial(all)\n })\n```\n\nNote that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`.\n\n## API\n\n<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b>\n\nConsult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).\n\n### options\n\nThe options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`).\n\nThe `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call:\n\n```js\nfs.createReadStream('/tmp/important.dat')\n .pipe(through2({ objectMode: true, allowHalfOpen: false }, function (chunk, enc, cb) {\n\n this.push(new Buffer('wut?'))\n cb()\n\n })\n .pipe(fs.createWriteStream('/tmp/wut.txt'))\n```\n\n### transformFunction\n\nThe `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk.\n\nTo queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on.\n\nIf you **do not provide a `transformFunction`** then you will get a simple simple pass-through stream.\n\n### flushFunction\n\nThe optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress.\n\n<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b>\n\nInstead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.\n\n```js\nvar FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) {\n if (record.temp != null && record.unit = \"F\") {\n record.temp = ( ( record.temp - 32 ) * 5 ) / 9\n record.unit = \"C\"\n }\n this.push(record)\n callback()\n})\n\n// Create instances of FToC like so:\nvar converter = new FToC()\n// Or:\nvar converter = FToC()\n// Or specify/override options when you instantiate, if you prefer:\nvar converter = FToC({objectMode: true})\n```\n\n## License\n\n**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/rvagg/through2/issues" - }, - "homepage": "https://github.com/rvagg/through2", - "_id": "through2@0.4.1", - "dist": { - "shasum": "48772c8b50c4955c25e7cdbe69f4220f4138178b" - }, - "_from": "through2@~0.4.0", - "_resolved": "https://registry.npmjs.org/through2/-/through2-0.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/basic-test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/basic-test.js deleted file mode 100644 index 9d137c7f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/basic-test.js +++ /dev/null @@ -1,334 +0,0 @@ -const test = require('tape') - , through2 = require('../') - , crypto = require('crypto') - , bl = require('bl') - , spigot = require('stream-spigot') - -test('plain through', function (t) { - var th2 = through2(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') - t.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('pipeable through', function (t) { - var th2 = through2(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - // bl() acts like a proper streams2 stream and passes as much as it's - // asked for, so we really only get one write with such a small amount - // of data - t.equal(s, 'aaaaaaaaaaaaaaaaaaaaaaaaa', 'got transformed string') - t.end() - })) - - var bufs = bl() - bufs.append(crypto.randomBytes(10)) - bufs.append(crypto.randomBytes(5)) - bufs.append(crypto.randomBytes(10)) - bufs.pipe(th2) -}) - -test('object through', function (t) { - t.plan(3) - - var th2 = through2({ objectMode: true}, function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object through with through2.obj', function (t) { - t.plan(3) - - var th2 = through2.obj(function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('flushing through', function (t) { - var th2 = through2(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }, function (callback) { - this.push(new Buffer([ 101, 110, 100 ])) - callback() - }) - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal(s, 'aaaaaaaaaabbbbbccccccccccend', 'got transformed string') - t.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('plain through ctor', function (t) { - var Th2 = through2.ctor(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - var th2 = new Th2() - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') - t.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('reuse through ctor', function (t) { - t.plan(4) - - var Th2 = through2.ctor(function (chunk, enc, callback) { - if (!this._i) { - t.ok(1, 'did not contain previous instance data (this._i)') - this._i = 97 // 'a' - } else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - var th2 = Th2() - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') - - var newInstance = Th2() - newInstance.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaabbbbccccccc', s, 'got transformed string') - })) - - newInstance.write(crypto.randomBytes(7)) - newInstance.write(crypto.randomBytes(4)) - newInstance.write(crypto.randomBytes(7)) - newInstance.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('object through ctor', function (t) { - t.plan(3) - - var Th2 = through2.ctor({ objectMode: true}, function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = new Th2() - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('pipeable object through ctor', function (t) { - t.plan(4) - - var Th2 = through2.ctor({ objectMode: true}, function (record, enc, callback) { - if (record.temp != null && record.unit == 'F') { - record.temp = ( ( record.temp - 32 ) * 5 ) / 9 - record.unit = 'C' - } - this.push(record) - callback() - }) - - var th2 = Th2() - - var expect = [-19, -40, 100, 22] - th2.on('data', function (o) { - t.deepEqual(o, { temp: expect.shift(), unit: 'C' }, 'got transformed object') - }) - - spigot({objectMode: true}, [ - {temp: -2.2, unit: 'F'}, - {temp: -40, unit: 'F'}, - {temp: 212, unit: 'F'}, - {temp: 22, unit: 'C'} - ]).pipe(th2) -}) - -test('object through ctor override', function (t) { - t.plan(3) - - var Th2 = through2.ctor(function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2({objectMode: true}) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object settings available in transform', function (t) { - t.plan(6) - - var Th2 = through2.ctor({objectMode: true, peek: true}, function (chunk, enc, callback) { - t.ok(this.options.peek, "reading options from inside _transform") - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2() - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object settings available in transform override', function (t) { - t.plan(6) - - var Th2 = through2.ctor(function (chunk, enc, callback) { - t.ok(this.options.peek, "reading options from inside _transform") - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2({objectMode: true, peek: true}) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object override extends options', function (t) { - t.plan(6) - - var Th2 = through2.ctor({objectMode: true}, function (chunk, enc, callback) { - t.ok(this.options.peek, "reading options from inside _transform") - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2({peek: true}) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/bench.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/bench.js deleted file mode 100644 index cc10868b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/bench.js +++ /dev/null @@ -1,42 +0,0 @@ -/* -on rvagg@fletcher: - @0.2.3: Ran 36719 iterations in 10000 ms -*/ - -const through2 = require('../') - , bl = require('bl') - , crypto = require('crypto') - , assert = require('assert') - -function run (callback) { - var bufs = Array.apply(null, Array(10)).map(function () { return crypto.randomBytes(32) }) - , stream = through2(function (chunk, env, callback) { - callback(null, chunk.toString('hex')) - }) - - stream.pipe(bl(function (err, data) { - assert(!err) - assert.equal(data.toString(), Buffer.concat(bufs).toString('hex')) - callback() - })) - - bufs.forEach(function (b) { - stream.write(b) - }) - stream.end() -} - -var count = 0 - , start = Date.now() - -;(function exec () { - count++ - run(function () { - if (Date.now() - start < 1000 * 10) { - return setImmediate(exec) - } - console.log('Ran', count, 'iterations in', Date.now() - start, 'ms') - }) -}()) - -console.log('Running for ~10s') \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/sauce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/sauce.js deleted file mode 100644 index a6d28625..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/sauce.js +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env node - -const user = process.env.SAUCE_USER - , key = process.env.SAUCE_KEY - , path = require('path') - , brtapsauce = require('brtapsauce') - , testFile = path.join(__dirname, 'basic-test.js') - - , capabilities = [ - { browserName: 'chrome' , platform: 'Windows XP', version: '' } - , { browserName: 'firefox' , platform: 'Windows 8' , version: '' } - , { browserName: 'firefox' , platform: 'Windows XP', version: '4' } - , { browserName: 'internet explorer' , platform: 'Windows 8' , version: '10' } - , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '9' } - , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '8' } - , { browserName: 'internet explorer' , platform: 'Windows XP', version: '7' } - , { browserName: 'internet explorer' , platform: 'Windows XP', version: '6' } - , { browserName: 'safari' , platform: 'Windows 7' , version: '5' } - , { browserName: 'safari' , platform: 'OS X 10.8' , version: '6' } - , { browserName: 'opera' , platform: 'Windows 7' , version: '' } - , { browserName: 'opera' , platform: 'Windows 7' , version: '11' } - , { browserName: 'ipad' , platform: 'OS X 10.8' , version: '6' } - , { browserName: 'android' , platform: 'Linux' , version: '4.0', 'device-type': 'tablet' } - ] - -if (!user) - throw new Error('Must set a SAUCE_USER env var') -if (!key) - throw new Error('Must set a SAUCE_KEY env var') - -brtapsauce({ - name : 'Traversty' - , user : user - , key : key - , brsrc : testFile - , capabilities : capabilities - , options : { timeout: 60 * 6 } -}) \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/test.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/test.js deleted file mode 100644 index aa9b4877..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/test/test.js +++ /dev/null @@ -1,9 +0,0 @@ -require('./basic-test') - -if (!process.env.SAUCE_KEY || !process.env.SAUCE_USER) - return console.log('SAUCE_KEY and/or SAUCE_USER not set, not running sauce tests') - -if (!/v0\.10/.test(process.version)) - return console.log('Not Node v0.10.x, not running sauce tests') - -require('./sauce.js') \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/through2.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/through2.js deleted file mode 100644 index c1104848..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/through2/through2.js +++ /dev/null @@ -1,78 +0,0 @@ -var Transform = require('readable-stream/transform') - , inherits = require('util').inherits - , xtend = require('xtend') - - -// a noop _transform function -function noop (chunk, enc, callback) { - callback(null, chunk) -} - - -// create a new export function, used by both the main export and -// the .ctor export, contains common logic for dealing with arguments -function through2 (construct) { - return function (options, transform, flush) { - if (typeof options == 'function') { - flush = transform - transform = options - options = {} - } - - if (typeof transform != 'function') - transform = noop - - if (typeof flush != 'function') - flush = null - - return construct(options, transform, flush) - } -} - - -// main export, just make me a transform stream! -module.exports = through2(function (options, transform, flush) { - var t2 = new Transform(options) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) - - -// make me a reusable prototype that I can `new`, or implicitly `new` -// with a constructor call -module.exports.ctor = through2(function (options, transform, flush) { - function Through2 (override) { - if (!(this instanceof Through2)) - return new Through2(override) - - this.options = xtend(options, override) - - Transform.call(this, this.options) - } - - inherits(Through2, Transform) - - Through2.prototype._transform = transform - - if (flush) - Through2.prototype._flush = flush - - return Through2 -}) - - -module.exports.obj = through2(function (options, transform, flush) { - var t2 = new Transform(xtend({ objectMode: true }, options)) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/package.json deleted file mode 100644 index d289871c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "download", - "version": "0.1.10", - "description": "Download and extract files effortlessly", - "keywords": [ - "url", - "http", - "download", - "extract" - ], - "homepage": "https://github.com/kevva/download", - "bugs": { - "url": "https://github.com/kevva/download/issues" - }, - "author": { - "name": "Kevin Martensson", - "email": "kevinmartensson@gmail.com", - "url": "http://kevinmartensson.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/kevva/download.git" - }, - "scripts": { - "test": "mocha --reporter list" - }, - "main": "download.js", - "files": [ - "download.js" - ], - "dependencies": { - "decompress": "~0.1.5", - "each-async": "~0.1.1", - "mkdirp": "~0.3.5", - "request": "~2.31.0", - "through2": "~0.4.0" - }, - "devDependencies": { - "mocha": "~1.17.0", - "nock": "~0.27.1", - "rimraf": "~2.2.5" - }, - "engines": { - "node": ">=0.10.0" - }, - "readme": "# download [![Build Status](https://secure.travis-ci.org/kevva/download.png?branch=master)](http://travis-ci.org/kevva/download)\n\nDownload and extract files effortlessly in Node.js.\n\n## Getting started\n\nInstall with [npm](https://npmjs.org/package/download): `npm install download`\n\n## Examples\n\nIf you're fetching an archive you can set `extract: true` in options and\nit'll extract it for you.\n\n```js\nvar download = require('download');\n\n// download and extract `foo.tar.gz` into `bar/`\ndownload('foo.tar.gz', 'bar', { extract: true });\n\n// download and save `foo.exe` into `bar/foo.exe` with mode `0755`\ndownload('foo.exe', 'bar', { mode: '0755' });\n\n// download and save `foo.zip` into `bar/foobar.zip`\ndownload({ url: 'foo.zip', name: 'foobar.zip' }, 'bar');\n\n// download and save an array of files in `bar/`\nvar files = ['foo.jpg', 'bar.jpg', 'cat.jpg'];\ndownload(files, 'bar');\n\n// download, save and rename an array of files in `bar/`\nvar files = [{\n url: 'foo.jpg',\n name: 'foobar.jpg'\n}, {\n url: 'cat.jpg',\n name: 'dog.jpg'\n}];\ndownload(files, 'bar');\n```\n\n## API\n\n### download(url, dest, opts)\n\nDownload a file or an array of files to a given destination. Returns an EventEmitter \nthat emits the following possible events:\n\n* `response` — Relayed when the underlying `http.ClientRequest` emits the same \nevent. Listeners called with a `http.IncomingMessage` instance.\n* `data` — Relayed when the underlying `http.IncomingMessage` emits the same \nevent. Listeners called with a `Buffer` instance.\n* `error` — Relayed when the underlying `http.ClientRequest` emits the same event \nor when the response status code is not in the 200s. Listeners called with an \n`Error` instance (in the first case) or the response status code.\n* `close` — Relayed when the underlying `stream.Duplex` emits the same event.\n\n## Options\n\nYou can define options accepted by the [request](https://github.com/mikeal/request/) module besides from the options below.\n\n### extract\n\nType: `Boolean` \nDefault: `false`\n\nIf set to `true`, try extracting the file using [decompress](https://github.com/kevva/decompress/).\n\n### mode\n\nType: `String` \nDefault: `undefined`\n\nSet mode on the downloaded files.\n\n### strip\n\nType: `Number` \nDefault: `0`\n\nEquivalent to `--strip-components` for tar.\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com)\n", - "readmeFilename": "README.md", - "_id": "download@0.1.10", - "dist": { - "shasum": "dc5d3ab4a7fc78e374e2de0381273b7b999bc29d" - }, - "_from": "download@~0.1.2", - "_resolved": "https://registry.npmjs.org/download/-/download-0.1.10.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/.npmignore deleted file mode 100644 index 2ccbe465..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/.npmignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules/ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/.travis.yml deleted file mode 100644 index c1ffcb31..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - 0.8 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/History.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/History.md deleted file mode 100644 index d1fa5334..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/History.md +++ /dev/null @@ -1,20 +0,0 @@ - -0.0.2 / 2013-05-29 -================== - - * Updated github url - * Fix bug calling isbin with list of paths - * Add tests for sync version - * Added travis CI passing image to readme - * Added node engines and keywords - * Added travis CI config - * Added basic readme - * Added basic test suite and Makefile - * Add async version - * Some refactorings using 'some' function - * Fixed issue with wrong paths if called multiple times - -0.0.1 / 2012-12-06 -================== - - * Initial release diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/Makefile deleted file mode 100644 index 1a2444a1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -REPORTER ?= dot - -test: - @NODE_ENV=test ./node_modules/mocha/bin/mocha -R $(REPORTER) - -.PHONY: test diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/README.md deleted file mode 100644 index 5224d614..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/README.md +++ /dev/null @@ -1,59 +0,0 @@ -[![Build Status](https://secure.travis-ci.org/mbehrendt/isbin.png?branch=master)](https://travis-ci.org/mbehrendt/isbin) - -# Isbin - -Tiny little helper library to determine if a certain binary is available within $PATH or any additional folder. - -# Installation - -```bash -$ npm install isbin -``` - -# Usage - -```js -var isbin = require('isbin'); - -// Test against $PATH -isbin('mysql', function(exists) { - console.log(exists); // ==> Boolean -}); - -// With additional path to test -isbin('mysql', '/usr/local/bin', function(exists) { - console.log(exists); // ==> Boolean -}); - -// Or multiple ones -isbin('mysql', ['/usr/local/bin', '/home/me/bins'], function(exists) { - console.log(exists); // ==> Boolean -}); -``` - -There are also synchronous versions available - -```js -var exists = isbin('mysql'); -var exists = isbin('mysql', '/usr/local/bin'); -var exists = isbin('mysql', ['/usr/local/bin', '/home/me/bins']); -``` - -# Running the tests - -```bash -$ npm install -$ make test -``` - -# License - -(The MIT License) - -Copyright (c) 2012 Mario Behrendt info@mario-behrendt.de, Stephan Hoyer <ste.hoyer@gmail.com> - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/index.js deleted file mode 100644 index bb0a047c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/lib/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/lib/index.js deleted file mode 100644 index 1b8a5cac..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/lib/index.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Require dependencies - */ - -var fs = require('fs') - , async = require('async'); - -/** - * Check if given binary exists - * - * @param {String} bin Binary to test - * @param {String|Array} additional Additional paths to check - * @param {Function(result)} isbinChecked Callback when check is done async, optional - * @return {Boolean} True if binary was found - */ - -function isbin(bin, additional, isbinChecked) { - // isbin(bin, cb) - if (!isbinChecked) isbinChecked = additional; - - // Read $PATH to get set up bin folders - var paths = process.env.PATH.split(':') || []; - - // isbin(bin, 'path', cb) - if ('string' === typeof additional) { - paths.push(additional); - } - - // isbin(bin, ['path1', 'path2'], cb) - if ('object' === typeof additional && additional.length !== null) { - paths.concat(additional); - } - - // async check - if ('function' === typeof isbinChecked) { - return async.some(paths, function(path, pathChecked) { - fs.exists(path + '/' + bin, pathChecked); - }, isbinChecked); - } - - // sync check - return paths.reverse().some(function(path) { - return fs.existsSync(path + '/' + bin); - }); -}; - -/** - * Expose module - */ - -module.exports = isbin; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.gitmodules b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.gitmodules deleted file mode 100644 index a9aae984..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.gitmodules +++ /dev/null @@ -1,9 +0,0 @@ -[submodule "deps/nodeunit"] - path = deps/nodeunit - url = git://github.com/caolan/nodeunit.git -[submodule "deps/UglifyJS"] - path = deps/UglifyJS - url = https://github.com/mishoo/UglifyJS.git -[submodule "deps/nodelint"] - path = deps/nodelint - url = https://github.com/tav/nodelint.git diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.npmignore deleted file mode 100644 index 9bdfc97c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -deps -dist -test -nodelint.cfg \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/LICENSE deleted file mode 100644 index b7f9d500..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Caolan McMahon - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/Makefile deleted file mode 100644 index bad647c6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -PACKAGE = asyncjs -NODEJS = $(if $(shell test -f /usr/bin/nodejs && echo "true"),nodejs,node) -CWD := $(shell pwd) -NODEUNIT = $(CWD)/node_modules/nodeunit/bin/nodeunit -UGLIFY = $(CWD)/node_modules/uglify-js/bin/uglifyjs -NODELINT = $(CWD)/node_modules/nodelint/nodelint - -BUILDDIR = dist - -all: clean test build - -build: $(wildcard lib/*.js) - mkdir -p $(BUILDDIR) - $(UGLIFY) lib/async.js > $(BUILDDIR)/async.min.js - -test: - $(NODEUNIT) test - -clean: - rm -rf $(BUILDDIR) - -lint: - $(NODELINT) --config nodelint.cfg lib/async.js - -.PHONY: test build all diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/README.md deleted file mode 100644 index 1bbbc477..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/README.md +++ /dev/null @@ -1,1021 +0,0 @@ -# Async.js - -Async is a utility module which provides straight-forward, powerful functions -for working with asynchronous JavaScript. Although originally designed for -use with [node.js](http://nodejs.org), it can also be used directly in the -browser. - -Async provides around 20 functions that include the usual 'functional' -suspects (map, reduce, filter, forEach…) as well as some common patterns -for asynchronous control flow (parallel, series, waterfall…). All these -functions assume you follow the node.js convention of providing a single -callback as the last argument of your async function. - - -## Quick Examples - - async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file - }); - - async.filter(['file1','file2','file3'], path.exists, function(results){ - // results now equals an array of the existing files - }); - - async.parallel([ - function(){ ... }, - function(){ ... } - ], callback); - - async.series([ - function(){ ... }, - function(){ ... } - ]); - -There are many more functions available so take a look at the docs below for a -full list. This module aims to be comprehensive, so if you feel anything is -missing please create a GitHub issue for it. - - -## Download - -Releases are available for download from -[GitHub](http://github.com/caolan/async/downloads). -Alternatively, you can install using Node Package Manager (npm): - - npm install async - - -__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 17.5kb Uncompressed - -__Production:__ [async.min.js](https://github.com/caolan/async/raw/master/dist/async.min.js) - 1.7kb Packed and Gzipped - - -## In the Browser - -So far its been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage: - - <script type="text/javascript" src="async.js"></script> - <script type="text/javascript"> - - async.map(data, asyncProcess, function(err, results){ - alert(results); - }); - - </script> - - -## Documentation - -### Collections - -* [forEach](#forEach) -* [map](#map) -* [filter](#filter) -* [reject](#reject) -* [reduce](#reduce) -* [detect](#detect) -* [sortBy](#sortBy) -* [some](#some) -* [every](#every) -* [concat](#concat) - -### Control Flow - -* [series](#series) -* [parallel](#parallel) -* [whilst](#whilst) -* [until](#until) -* [waterfall](#waterfall) -* [queue](#queue) -* [auto](#auto) -* [iterator](#iterator) -* [apply](#apply) -* [nextTick](#nextTick) - -### Utils - -* [memoize](#memoize) -* [unmemoize](#unmemoize) -* [log](#log) -* [dir](#dir) -* [noConflict](#noConflict) - - -## Collections - -<a name="forEach" /> -### forEach(arr, iterator, callback) - -Applies an iterator function to each item in an array, in parallel. -The iterator is called with an item from the list and a callback for when it -has finished. If the iterator passes an error to this callback, the main -callback for the forEach function is immediately called with the error. - -Note, that since this function applies the iterator to each item in parallel -there is no guarantee that the iterator functions will complete in order. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(err) - A callback which is called after all the iterator functions - have finished, or an error has occurred. - -__Example__ - - // assuming openFiles is an array of file names and saveFile is a function - // to save the modified contents of that file: - - async.forEach(openFiles, saveFile, function(err){ - // if any of the saves produced an error, err would equal that error - }); - ---------------------------------------- - -<a name="forEachSeries" /> -### forEachSeries(arr, iterator, callback) - -The same as forEach only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. This means the iterator functions will complete in order. - - ---------------------------------------- - -<a name="forEachLimit" /> -### forEachLimit(arr, limit, iterator, callback) - -The same as forEach only the iterator is applied to batches of items in the -array, in series. The next batch of iterators is only called once the current -one has completed processing. - -__Arguments__ - -* arr - An array to iterate over. -* limit - How many items should be in each batch. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(err) - A callback which is called after all the iterator functions - have finished, or an error has occurred. - -__Example__ - - // Assume documents is an array of JSON objects and requestApi is a - // function that interacts with a rate-limited REST api. - - async.forEachLimit(documents, 20, requestApi, function(err){ - // if any of the saves produced an error, err would equal that error - }); ---------------------------------------- - -<a name="map" /> -### map(arr, iterator, callback) - -Produces a new array of values by mapping each value in the given array through -the iterator function. The iterator is called with an item from the array and a -callback for when it has finished processing. The callback takes 2 arguments, -an error and the transformed item from the array. If the iterator passes an -error to this callback, the main callback for the map function is immediately -called with the error. - -Note, that since this function applies the iterator to each item in parallel -there is no guarantee that the iterator functions will complete in order, however -the results array will be in the same order as the original array. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed - with an error (which can be null) and a transformed item. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is an array of the - transformed items from the original array. - -__Example__ - - async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file - }); - ---------------------------------------- - -<a name="mapSeries" /> -### mapSeries(arr, iterator, callback) - -The same as map only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. The results array will be in the same order as the original. - - ---------------------------------------- - -<a name="filter" /> -### filter(arr, iterator, callback) - -__Alias:__ select - -Returns a new array of all the values which pass an async truth test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like path.exists. This operation is -performed in parallel, but the results array will be in the same order as the -original. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(results) - A callback which is called after all the iterator - functions have finished. - -__Example__ - - async.filter(['file1','file2','file3'], path.exists, function(results){ - // results now equals an array of the existing files - }); - ---------------------------------------- - -<a name="filterSeries" /> -### filterSeries(arr, iterator, callback) - -__alias:__ selectSeries - -The same as filter only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. The results array will be in the same order as the original. - ---------------------------------------- - -<a name="reject" /> -### reject(arr, iterator, callback) - -The opposite of filter. Removes values that pass an async truth test. - ---------------------------------------- - -<a name="rejectSeries" /> -### rejectSeries(arr, iterator, callback) - -The same as filter, only the iterator is applied to each item in the array -in series. - - ---------------------------------------- - -<a name="reduce" /> -### reduce(arr, memo, iterator, callback) - -__aliases:__ inject, foldl - -Reduces a list of values into a single value using an async iterator to return -each successive step. Memo is the initial state of the reduction. This -function only operates in series. For performance reasons, it may make sense to -split a call to this function into a parallel map, then use the normal -Array.prototype.reduce on the results. This function is for situations where -each step in the reduction needs to be async, if you can get the data before -reducing it then its probably a good idea to do so. - -__Arguments__ - -* arr - An array to iterate over. -* memo - The initial state of the reduction. -* iterator(memo, item, callback) - A function applied to each item in the - array to produce the next step in the reduction. The iterator is passed a - callback which accepts an optional error as its first argument, and the state - of the reduction as the second. If an error is passed to the callback, the - reduction is stopped and the main callback is immediately called with the - error. -* callback(err, result) - A callback which is called after all the iterator - functions have finished. Result is the reduced value. - -__Example__ - - async.reduce([1,2,3], 0, function(memo, item, callback){ - // pointless async: - process.nextTick(function(){ - callback(null, memo + item) - }); - }, function(err, result){ - // result is now equal to the last value of memo, which is 6 - }); - ---------------------------------------- - -<a name="reduceRight" /> -### reduceRight(arr, memo, iterator, callback) - -__Alias:__ foldr - -Same as reduce, only operates on the items in the array in reverse order. - - ---------------------------------------- - -<a name="detect" /> -### detect(arr, iterator, callback) - -Returns the first value in a list that passes an async truth test. The -iterator is applied in parallel, meaning the first iterator to return true will -fire the detect callback with that result. That means the result might not be -the first item in the original array (in terms of order) that passes the test. - -If order within the original array is important then look at detectSeries. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(result) - A callback which is called as soon as any iterator returns - true, or after all the iterator functions have finished. Result will be - the first item in the array that passes the truth test (iterator) or the - value undefined if none passed. - -__Example__ - - async.detect(['file1','file2','file3'], path.exists, function(result){ - // result now equals the first file in the list that exists - }); - ---------------------------------------- - -<a name="detectSeries" /> -### detectSeries(arr, iterator, callback) - -The same as detect, only the iterator is applied to each item in the array -in series. This means the result is always the first in the original array (in -terms of array order) that passes the truth test. - - ---------------------------------------- - -<a name="sortBy" /> -### sortBy(arr, iterator, callback) - -Sorts a list by the results of running each value through an async iterator. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed - with an error (which can be null) and a value to use as the sort criteria. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is the items from - the original array sorted by the values returned by the iterator calls. - -__Example__ - - async.sortBy(['file1','file2','file3'], function(file, callback){ - fs.stat(file, function(err, stats){ - callback(err, stats.mtime); - }); - }, function(err, results){ - // results is now the original array of files sorted by - // modified date - }); - - ---------------------------------------- - -<a name="some" /> -### some(arr, iterator, callback) - -__Alias:__ any - -Returns true if at least one element in the array satisfies an async test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like path.exists. Once any iterator -call returns true, the main callback is immediately called. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(result) - A callback which is called as soon as any iterator returns - true, or after all the iterator functions have finished. Result will be - either true or false depending on the values of the async tests. - -__Example__ - - async.some(['file1','file2','file3'], path.exists, function(result){ - // if result is true then at least one of the files exists - }); - ---------------------------------------- - -<a name="every" /> -### every(arr, iterator, callback) - -__Alias:__ all - -Returns true if every element in the array satisfies an async test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like path.exists. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(result) - A callback which is called after all the iterator - functions have finished. Result will be either true or false depending on - the values of the async tests. - -__Example__ - - async.every(['file1','file2','file3'], path.exists, function(result){ - // if result is true then every file exists - }); - ---------------------------------------- - -<a name="concat" /> -### concat(arr, iterator, callback) - -Applies an iterator to each item in a list, concatenating the results. Returns the -concatenated list. The iterators are called in parallel, and the results are -concatenated as they return. There is no guarantee that the results array will -be returned in the original order of the arguments passed to the iterator function. - -__Arguments__ - -* arr - An array to iterate over -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed - with an error (which can be null) and an array of results. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is an array containing - the concatenated results of the iterator function. - -__Example__ - - async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ - // files is now a list of filenames that exist in the 3 directories - }); - ---------------------------------------- - -<a name="concatSeries" /> -### concatSeries(arr, iterator, callback) - -Same as async.concat, but executes in series instead of parallel. - - -## Control Flow - -<a name="series" /> -### series(tasks, [callback]) - -Run an array of functions in series, each one running once the previous -function has completed. If any functions in the series pass an error to its -callback, no more functions are run and the callback for the series is -immediately called with the value of the error. Once the tasks have completed, -the results are passed to the final callback as an array. - -It is also possible to use an object instead of an array. Each property will be -run as a function and the results will be passed to the final callback as an object -instead of an array. This can be a more readable way of handling results from -async.series. - - -__Arguments__ - -* tasks - An array or object containing functions to run, each function is passed - a callback it must call on completion. -* callback(err, results) - An optional callback to run once all the functions - have completed. This function gets an array of all the arguments passed to - the callbacks used in the array. - -__Example__ - - async.series([ - function(callback){ - // do some stuff ... - callback(null, 'one'); - }, - function(callback){ - // do some more stuff ... - callback(null, 'two'); - }, - ], - // optional callback - function(err, results){ - // results is now equal to ['one', 'two'] - }); - - - // an example using an object instead of an array - async.series({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - }, - }, - function(err, results) { - // results is now equal to: {one: 1, two: 2} - }); - - ---------------------------------------- - -<a name="parallel" /> -### parallel(tasks, [callback]) - -Run an array of functions in parallel, without waiting until the previous -function has completed. If any of the functions pass an error to its -callback, the main callback is immediately called with the value of the error. -Once the tasks have completed, the results are passed to the final callback as an -array. - -It is also possible to use an object instead of an array. Each property will be -run as a function and the results will be passed to the final callback as an object -instead of an array. This can be a more readable way of handling results from -async.parallel. - - -__Arguments__ - -* tasks - An array or object containing functions to run, each function is passed a - callback it must call on completion. -* callback(err, results) - An optional callback to run once all the functions - have completed. This function gets an array of all the arguments passed to - the callbacks used in the array. - -__Example__ - - async.parallel([ - function(callback){ - setTimeout(function(){ - callback(null, 'one'); - }, 200); - }, - function(callback){ - setTimeout(function(){ - callback(null, 'two'); - }, 100); - }, - ], - // optional callback - function(err, results){ - // the results array will equal ['one','two'] even though - // the second function had a shorter timeout. - }); - - - // an example using an object instead of an array - async.parallel({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - }, - }, - function(err, results) { - // results is now equals to: {one: 1, two: 2} - }); - - ---------------------------------------- - -<a name="whilst" /> -### whilst(test, fn, callback) - -Repeatedly call fn, while test returns true. Calls the callback when stopped, -or an error occurs. - -__Arguments__ - -* test() - synchronous truth test to perform before each execution of fn. -* fn(callback) - A function to call each time the test passes. The function is - passed a callback which must be called once it has completed with an optional - error as the first argument. -* callback(err) - A callback which is called after the test fails and repeated - execution of fn has stopped. - -__Example__ - - var count = 0; - - async.whilst( - function () { return count < 5; }, - function (callback) { - count++; - setTimeout(callback, 1000); - }, - function (err) { - // 5 seconds have passed - } - ); - - ---------------------------------------- - -<a name="until" /> -### until(test, fn, callback) - -Repeatedly call fn, until test returns true. Calls the callback when stopped, -or an error occurs. - -The inverse of async.whilst. - - ---------------------------------------- - -<a name="waterfall" /> -### waterfall(tasks, [callback]) - -Runs an array of functions in series, each passing their results to the next in -the array. However, if any of the functions pass an error to the callback, the -next function is not executed and the main callback is immediately called with -the error. - -__Arguments__ - -* tasks - An array of functions to run, each function is passed a callback it - must call on completion. -* callback(err, [results]) - An optional callback to run once all the functions - have completed. This will be passed the results of the last task's callback. - - - -__Example__ - - async.waterfall([ - function(callback){ - callback(null, 'one', 'two'); - }, - function(arg1, arg2, callback){ - callback(null, 'three'); - }, - function(arg1, callback){ - // arg1 now equals 'three' - callback(null, 'done'); - } - ], function (err, result) { - // result now equals 'done' - }); - - ---------------------------------------- - -<a name="queue" /> -### queue(worker, concurrency) - -Creates a queue object with the specified concurrency. Tasks added to the -queue will be processed in parallel (up to the concurrency limit). If all -workers are in progress, the task is queued until one is available. Once -a worker has completed a task, the task's callback is called. - -__Arguments__ - -* worker(task, callback) - An asynchronous function for processing a queued - task. -* concurrency - An integer for determining how many worker functions should be - run in parallel. - -__Queue objects__ - -The queue object returned by this function has the following properties and -methods: - -* length() - a function returning the number of items waiting to be processed. -* concurrency - an integer for determining how many worker functions should be - run in parallel. This property can be changed after a queue is created to - alter the concurrency on-the-fly. -* push(task, [callback]) - add a new task to the queue, the callback is called - once the worker has finished processing the task. - instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list. -* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued -* empty - a callback that is called when the last item from the queue is given to a worker -* drain - a callback that is called when the last item from the queue has returned from the worker - -__Example__ - - // create a queue object with concurrency 2 - - var q = async.queue(function (task, callback) { - console.log('hello ' + task.name); - callback(); - }, 2); - - - // assign a callback - q.drain = function() { - console.log('all items have been processed'); - } - - // add some items to the queue - - q.push({name: 'foo'}, function (err) { - console.log('finished processing foo'); - }); - q.push({name: 'bar'}, function (err) { - console.log('finished processing bar'); - }); - - // add some items to the queue (batch-wise) - - q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) { - console.log('finished processing bar'); - }); - - ---------------------------------------- - -<a name="auto" /> -### auto(tasks, [callback]) - -Determines the best order for running functions based on their requirements. -Each function can optionally depend on other functions being completed first, -and each function is run as soon as its requirements are satisfied. If any of -the functions pass an error to their callback, that function will not complete -(so any other functions depending on it will not run) and the main callback -will be called immediately with the error. Functions also receive an object -containing the results of functions which have completed so far. - -__Arguments__ - -* tasks - An object literal containing named functions or an array of - requirements, with the function itself the last item in the array. The key - used for each function or array is used when specifying requirements. The - syntax is easier to understand by looking at the example. -* callback(err, results) - An optional callback which is called when all the - tasks have been completed. The callback will receive an error as an argument - if any tasks pass an error to their callback. If all tasks complete - successfully, it will receive an object containing their results. - -__Example__ - - async.auto({ - get_data: function(callback){ - // async code to get some data - }, - make_folder: function(callback){ - // async code to create a directory to store a file in - // this is run at the same time as getting the data - }, - write_file: ['get_data', 'make_folder', function(callback){ - // once there is some data and the directory exists, - // write the data to a file in the directory - callback(null, filename); - }], - email_link: ['write_file', function(callback, results){ - // once the file is written let's email a link to it... - // results.write_file contains the filename returned by write_file. - }] - }); - -This is a fairly trivial example, but to do this using the basic parallel and -series functions would look like this: - - async.parallel([ - function(callback){ - // async code to get some data - }, - function(callback){ - // async code to create a directory to store a file in - // this is run at the same time as getting the data - } - ], - function(results){ - async.series([ - function(callback){ - // once there is some data and the directory exists, - // write the data to a file in the directory - }, - email_link: function(callback){ - // once the file is written let's email a link to it... - } - ]); - }); - -For a complicated series of async tasks using the auto function makes adding -new tasks much easier and makes the code more readable. - - ---------------------------------------- - -<a name="iterator" /> -### iterator(tasks) - -Creates an iterator function which calls the next function in the array, -returning a continuation to call the next one after that. Its also possible to -'peek' the next iterator by doing iterator.next(). - -This function is used internally by the async module but can be useful when -you want to manually control the flow of functions in series. - -__Arguments__ - -* tasks - An array of functions to run, each function is passed a callback it - must call on completion. - -__Example__ - - var iterator = async.iterator([ - function(){ sys.p('one'); }, - function(){ sys.p('two'); }, - function(){ sys.p('three'); } - ]); - - node> var iterator2 = iterator(); - 'one' - node> var iterator3 = iterator2(); - 'two' - node> iterator3(); - 'three' - node> var nextfn = iterator2.next(); - node> nextfn(); - 'three' - - ---------------------------------------- - -<a name="apply" /> -### apply(function, arguments..) - -Creates a continuation function with some arguments already applied, a useful -shorthand when combined with other control flow functions. Any arguments -passed to the returned function are added to the arguments originally passed -to apply. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to automatically apply when the - continuation is called. - -__Example__ - - // using apply - - async.parallel([ - async.apply(fs.writeFile, 'testfile1', 'test1'), - async.apply(fs.writeFile, 'testfile2', 'test2'), - ]); - - - // the same process without using apply - - async.parallel([ - function(callback){ - fs.writeFile('testfile1', 'test1', callback); - }, - function(callback){ - fs.writeFile('testfile2', 'test2', callback); - }, - ]); - -It's possible to pass any number of additional arguments when calling the -continuation: - - node> var fn = async.apply(sys.puts, 'one'); - node> fn('two', 'three'); - one - two - three - ---------------------------------------- - -<a name="nextTick" /> -### nextTick(callback) - -Calls the callback on a later loop around the event loop. In node.js this just -calls process.nextTick, in the browser it falls back to setTimeout(callback, 0), -which means other higher priority events may precede the execution of the callback. - -This is used internally for browser-compatibility purposes. - -__Arguments__ - -* callback - The function to call on a later loop around the event loop. - -__Example__ - - var call_order = []; - async.nextTick(function(){ - call_order.push('two'); - // call_order now equals ['one','two] - }); - call_order.push('one') - - -## Utils - -<a name="memoize" /> -### memoize(fn, [hasher]) - -Caches the results of an async function. When creating a hash to store function -results against, the callback is omitted from the hash and an optional hash -function can be used. - -__Arguments__ - -* fn - the function you to proxy and cache results from. -* hasher - an optional function for generating a custom hash for storing - results, it has all the arguments applied to it apart from the callback, and - must be synchronous. - -__Example__ - - var slow_fn = function (name, callback) { - // do something - callback(null, result); - }; - var fn = async.memoize(slow_fn); - - // fn can now be used as if it were slow_fn - fn('some name', function () { - // callback - }); - -<a name="unmemoize" /> -### unmemoize(fn) - -Undoes a memoized function, reverting it to the original, unmemoized -form. Comes handy in tests. - -__Arguments__ - -* fn - the memoized function - -<a name="log" /> -### log(function, arguments) - -Logs the result of an async function to the console. Only works in node.js or -in browsers that support console.log and console.error (such as FF and Chrome). -If multiple arguments are returned from the async function, console.log is -called on each argument in order. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to apply to the function. - -__Example__ - - var hello = function(name, callback){ - setTimeout(function(){ - callback(null, 'hello ' + name); - }, 1000); - }; - - node> async.log(hello, 'world'); - 'hello world' - - ---------------------------------------- - -<a name="dir" /> -### dir(function, arguments) - -Logs the result of an async function to the console using console.dir to -display the properties of the resulting object. Only works in node.js or -in browsers that support console.dir and console.error (such as FF and Chrome). -If multiple arguments are returned from the async function, console.dir is -called on each argument in order. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to apply to the function. - -__Example__ - - var hello = function(name, callback){ - setTimeout(function(){ - callback(null, {hello: name}); - }, 1000); - }; - - node> async.dir(hello, 'world'); - {hello: 'world'} - - ---------------------------------------- - -<a name="noConflict" /> -### noConflict() - -Changes the value of async back to its original value, returning a reference to the -async object. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/index.js deleted file mode 100644 index 8e238453..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/index.js +++ /dev/null @@ -1,3 +0,0 @@ -// This file is just added for convenience so this repository can be -// directly checked out into a project's deps folder -module.exports = require('./lib/async'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/lib/async.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/lib/async.js deleted file mode 100644 index 7cc4f5ea..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/lib/async.js +++ /dev/null @@ -1,692 +0,0 @@ -/*global setTimeout: false, console: false */ -(function () { - - var async = {}; - - // global on the server, window in the browser - var root = this, - previous_async = root.async; - - if (typeof module !== 'undefined' && module.exports) { - module.exports = async; - } - else { - root.async = async; - } - - async.noConflict = function () { - root.async = previous_async; - return async; - }; - - //// cross-browser compatiblity functions //// - - var _forEach = function (arr, iterator) { - if (arr.forEach) { - return arr.forEach(iterator); - } - for (var i = 0; i < arr.length; i += 1) { - iterator(arr[i], i, arr); - } - }; - - var _map = function (arr, iterator) { - if (arr.map) { - return arr.map(iterator); - } - var results = []; - _forEach(arr, function (x, i, a) { - results.push(iterator(x, i, a)); - }); - return results; - }; - - var _reduce = function (arr, iterator, memo) { - if (arr.reduce) { - return arr.reduce(iterator, memo); - } - _forEach(arr, function (x, i, a) { - memo = iterator(memo, x, i, a); - }); - return memo; - }; - - var _keys = function (obj) { - if (Object.keys) { - return Object.keys(obj); - } - var keys = []; - for (var k in obj) { - if (obj.hasOwnProperty(k)) { - keys.push(k); - } - } - return keys; - }; - - //// exported async module functions //// - - //// nextTick implementation with browser-compatible fallback //// - if (typeof process === 'undefined' || !(process.nextTick)) { - async.nextTick = function (fn) { - setTimeout(fn, 0); - }; - } - else { - async.nextTick = process.nextTick; - } - - async.forEach = function (arr, iterator, callback) { - callback = callback || function () {}; - if (!arr.length) { - return callback(); - } - var completed = 0; - _forEach(arr, function (x) { - iterator(x, function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - if (completed === arr.length) { - callback(null); - } - } - }); - }); - }; - - async.forEachSeries = function (arr, iterator, callback) { - callback = callback || function () {}; - if (!arr.length) { - return callback(); - } - var completed = 0; - var iterate = function () { - iterator(arr[completed], function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - if (completed === arr.length) { - callback(null); - } - else { - iterate(); - } - } - }); - }; - iterate(); - }; - - async.forEachLimit = function (arr, limit, iterator, callback) { - callback = callback || function () {}; - if (!arr.length || limit <= 0) { - return callback(); - } - var completed = 0; - var started = 0; - var running = 0; - - (function replenish () { - if (completed === arr.length) { - return callback(); - } - - while (running < limit && started < arr.length) { - started += 1; - running += 1; - iterator(arr[started - 1], function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - running -= 1; - if (completed === arr.length) { - callback(); - } - else { - replenish(); - } - } - }); - } - })(); - }; - - - var doParallel = function (fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [async.forEach].concat(args)); - }; - }; - var doSeries = function (fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [async.forEachSeries].concat(args)); - }; - }; - - - var _asyncMap = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (err, v) { - results[x.index] = v; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - }; - async.map = doParallel(_asyncMap); - async.mapSeries = doSeries(_asyncMap); - - - // reduce only has a series version, as doing reduce in parallel won't - // work in many situations. - async.reduce = function (arr, memo, iterator, callback) { - async.forEachSeries(arr, function (x, callback) { - iterator(memo, x, function (err, v) { - memo = v; - callback(err); - }); - }, function (err) { - callback(err, memo); - }); - }; - // inject alias - async.inject = async.reduce; - // foldl alias - async.foldl = async.reduce; - - async.reduceRight = function (arr, memo, iterator, callback) { - var reversed = _map(arr, function (x) { - return x; - }).reverse(); - async.reduce(reversed, memo, iterator, callback); - }; - // foldr alias - async.foldr = async.reduceRight; - - var _filter = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (v) { - if (v) { - results.push(x); - } - callback(); - }); - }, function (err) { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - }; - async.filter = doParallel(_filter); - async.filterSeries = doSeries(_filter); - // select alias - async.select = async.filter; - async.selectSeries = async.filterSeries; - - var _reject = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (v) { - if (!v) { - results.push(x); - } - callback(); - }); - }, function (err) { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - }; - async.reject = doParallel(_reject); - async.rejectSeries = doSeries(_reject); - - var _detect = function (eachfn, arr, iterator, main_callback) { - eachfn(arr, function (x, callback) { - iterator(x, function (result) { - if (result) { - main_callback(x); - main_callback = function () {}; - } - else { - callback(); - } - }); - }, function (err) { - main_callback(); - }); - }; - async.detect = doParallel(_detect); - async.detectSeries = doSeries(_detect); - - async.some = function (arr, iterator, main_callback) { - async.forEach(arr, function (x, callback) { - iterator(x, function (v) { - if (v) { - main_callback(true); - main_callback = function () {}; - } - callback(); - }); - }, function (err) { - main_callback(false); - }); - }; - // any alias - async.any = async.some; - - async.every = function (arr, iterator, main_callback) { - async.forEach(arr, function (x, callback) { - iterator(x, function (v) { - if (!v) { - main_callback(false); - main_callback = function () {}; - } - callback(); - }); - }, function (err) { - main_callback(true); - }); - }; - // all alias - async.all = async.every; - - async.sortBy = function (arr, iterator, callback) { - async.map(arr, function (x, callback) { - iterator(x, function (err, criteria) { - if (err) { - callback(err); - } - else { - callback(null, {value: x, criteria: criteria}); - } - }); - }, function (err, results) { - if (err) { - return callback(err); - } - else { - var fn = function (left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }; - callback(null, _map(results.sort(fn), function (x) { - return x.value; - })); - } - }); - }; - - async.auto = function (tasks, callback) { - callback = callback || function () {}; - var keys = _keys(tasks); - if (!keys.length) { - return callback(null); - } - - var results = {}; - - var listeners = []; - var addListener = function (fn) { - listeners.unshift(fn); - }; - var removeListener = function (fn) { - for (var i = 0; i < listeners.length; i += 1) { - if (listeners[i] === fn) { - listeners.splice(i, 1); - return; - } - } - }; - var taskComplete = function () { - _forEach(listeners.slice(0), function (fn) { - fn(); - }); - }; - - addListener(function () { - if (_keys(results).length === keys.length) { - callback(null, results); - callback = function () {}; - } - }); - - _forEach(keys, function (k) { - var task = (tasks[k] instanceof Function) ? [tasks[k]]: tasks[k]; - var taskCallback = function (err) { - if (err) { - callback(err); - // stop subsequent errors hitting callback multiple times - callback = function () {}; - } - else { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - taskComplete(); - } - }; - var requires = task.slice(0, Math.abs(task.length - 1)) || []; - var ready = function () { - return _reduce(requires, function (a, x) { - return (a && results.hasOwnProperty(x)); - }, true) && !results.hasOwnProperty(k); - }; - if (ready()) { - task[task.length - 1](taskCallback, results); - } - else { - var listener = function () { - if (ready()) { - removeListener(listener); - task[task.length - 1](taskCallback, results); - } - }; - addListener(listener); - } - }); - }; - - async.waterfall = function (tasks, callback) { - callback = callback || function () {}; - if (!tasks.length) { - return callback(); - } - var wrapIterator = function (iterator) { - return function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - var args = Array.prototype.slice.call(arguments, 1); - var next = iterator.next(); - if (next) { - args.push(wrapIterator(next)); - } - else { - args.push(callback); - } - async.nextTick(function () { - iterator.apply(null, args); - }); - } - }; - }; - wrapIterator(async.iterator(tasks))(); - }; - - async.parallel = function (tasks, callback) { - callback = callback || function () {}; - if (tasks.constructor === Array) { - async.map(tasks, function (fn, callback) { - if (fn) { - fn(function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - callback.call(null, err, args); - }); - } - }, callback); - } - else { - var results = {}; - async.forEach(_keys(tasks), function (k, callback) { - tasks[k](function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - - async.series = function (tasks, callback) { - callback = callback || function () {}; - if (tasks.constructor === Array) { - async.mapSeries(tasks, function (fn, callback) { - if (fn) { - fn(function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - callback.call(null, err, args); - }); - } - }, callback); - } - else { - var results = {}; - async.forEachSeries(_keys(tasks), function (k, callback) { - tasks[k](function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - - async.iterator = function (tasks) { - var makeCallback = function (index) { - var fn = function () { - if (tasks.length) { - tasks[index].apply(null, arguments); - } - return fn.next(); - }; - fn.next = function () { - return (index < tasks.length - 1) ? makeCallback(index + 1): null; - }; - return fn; - }; - return makeCallback(0); - }; - - async.apply = function (fn) { - var args = Array.prototype.slice.call(arguments, 1); - return function () { - return fn.apply( - null, args.concat(Array.prototype.slice.call(arguments)) - ); - }; - }; - - var _concat = function (eachfn, arr, fn, callback) { - var r = []; - eachfn(arr, function (x, cb) { - fn(x, function (err, y) { - r = r.concat(y || []); - cb(err); - }); - }, function (err) { - callback(err, r); - }); - }; - async.concat = doParallel(_concat); - async.concatSeries = doSeries(_concat); - - async.whilst = function (test, iterator, callback) { - if (test()) { - iterator(function (err) { - if (err) { - return callback(err); - } - async.whilst(test, iterator, callback); - }); - } - else { - callback(); - } - }; - - async.until = function (test, iterator, callback) { - if (!test()) { - iterator(function (err) { - if (err) { - return callback(err); - } - async.until(test, iterator, callback); - }); - } - else { - callback(); - } - }; - - async.queue = function (worker, concurrency) { - var workers = 0; - var q = { - tasks: [], - concurrency: concurrency, - saturated: null, - empty: null, - drain: null, - push: function (data, callback) { - if(data.constructor !== Array) { - data = [data]; - } - _forEach(data, function(task) { - q.tasks.push({ - data: task, - callback: typeof callback === 'function' ? callback : null - }); - if (q.saturated && q.tasks.length == concurrency) { - q.saturated(); - } - async.nextTick(q.process); - }); - }, - process: function () { - if (workers < q.concurrency && q.tasks.length) { - var task = q.tasks.shift(); - if(q.empty && q.tasks.length == 0) q.empty(); - workers += 1; - worker(task.data, function () { - workers -= 1; - if (task.callback) { - task.callback.apply(task, arguments); - } - if(q.drain && q.tasks.length + workers == 0) q.drain(); - q.process(); - }); - } - }, - length: function () { - return q.tasks.length; - }, - running: function () { - return workers; - } - }; - return q; - }; - - var _console_fn = function (name) { - return function (fn) { - var args = Array.prototype.slice.call(arguments, 1); - fn.apply(null, args.concat([function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (typeof console !== 'undefined') { - if (err) { - if (console.error) { - console.error(err); - } - } - else if (console[name]) { - _forEach(args, function (x) { - console[name](x); - }); - } - } - }])); - }; - }; - async.log = _console_fn('log'); - async.dir = _console_fn('dir'); - /*async.info = _console_fn('info'); - async.warn = _console_fn('warn'); - async.error = _console_fn('error');*/ - - async.memoize = function (fn, hasher) { - var memo = {}; - var queues = {}; - hasher = hasher || function (x) { - return x; - }; - var memoized = function () { - var args = Array.prototype.slice.call(arguments); - var callback = args.pop(); - var key = hasher.apply(null, args); - if (key in memo) { - callback.apply(null, memo[key]); - } - else if (key in queues) { - queues[key].push(callback); - } - else { - queues[key] = [callback]; - fn.apply(null, args.concat([function () { - memo[key] = arguments; - var q = queues[key]; - delete queues[key]; - for (var i = 0, l = q.length; i < l; i++) { - q[i].apply(null, arguments); - } - }])); - } - }; - memoized.unmemoized = fn; - return memoized; - }; - - async.unmemoize = function (fn) { - return function () { - return (fn.unmemoized || fn).apply(null, arguments); - }; - }; - -}()); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/package.json deleted file mode 100644 index 31e18559..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/node_modules/async/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "async", - "description": "Higher-order functions and common patterns for asynchronous code", - "main": "./index", - "author": { - "name": "Caolan McMahon" - }, - "version": "0.1.22", - "repository": { - "type": "git", - "url": "http://github.com/caolan/async.git" - }, - "bugs": { - "url": "http://github.com/caolan/async/issues" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/caolan/async/raw/master/LICENSE" - } - ], - "devDependencies": { - "nodeunit": ">0.0.0", - "uglify-js": "1.2.x", - "nodelint": ">0.0.0" - }, - "readme": "# Async.js\n\nAsync is a utility module which provides straight-forward, powerful functions\nfor working with asynchronous JavaScript. Although originally designed for\nuse with [node.js](http://nodejs.org), it can also be used directly in the\nbrowser.\n\nAsync provides around 20 functions that include the usual 'functional'\nsuspects (map, reduce, filter, forEach…) as well as some common patterns\nfor asynchronous control flow (parallel, series, waterfall…). All these\nfunctions assume you follow the node.js convention of providing a single\ncallback as the last argument of your async function.\n\n\n## Quick Examples\n\n async.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n });\n\n async.filter(['file1','file2','file3'], path.exists, function(results){\n // results now equals an array of the existing files\n });\n\n async.parallel([\n function(){ ... },\n function(){ ... }\n ], callback);\n\n async.series([\n function(){ ... },\n function(){ ... }\n ]);\n\nThere are many more functions available so take a look at the docs below for a\nfull list. This module aims to be comprehensive, so if you feel anything is\nmissing please create a GitHub issue for it.\n\n\n## Download\n\nReleases are available for download from\n[GitHub](http://github.com/caolan/async/downloads).\nAlternatively, you can install using Node Package Manager (npm):\n\n npm install async\n\n\n__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 17.5kb Uncompressed\n\n__Production:__ [async.min.js](https://github.com/caolan/async/raw/master/dist/async.min.js) - 1.7kb Packed and Gzipped\n\n\n## In the Browser\n\nSo far its been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage:\n\n <script type=\"text/javascript\" src=\"async.js\"></script>\n <script type=\"text/javascript\">\n\n async.map(data, asyncProcess, function(err, results){\n alert(results);\n });\n\n </script>\n\n\n## Documentation\n\n### Collections\n\n* [forEach](#forEach)\n* [map](#map)\n* [filter](#filter)\n* [reject](#reject)\n* [reduce](#reduce)\n* [detect](#detect)\n* [sortBy](#sortBy)\n* [some](#some)\n* [every](#every)\n* [concat](#concat)\n\n### Control Flow\n\n* [series](#series)\n* [parallel](#parallel)\n* [whilst](#whilst)\n* [until](#until)\n* [waterfall](#waterfall)\n* [queue](#queue)\n* [auto](#auto)\n* [iterator](#iterator)\n* [apply](#apply)\n* [nextTick](#nextTick)\n\n### Utils\n\n* [memoize](#memoize)\n* [unmemoize](#unmemoize)\n* [log](#log)\n* [dir](#dir)\n* [noConflict](#noConflict)\n\n\n## Collections\n\n<a name=\"forEach\" />\n### forEach(arr, iterator, callback)\n\nApplies an iterator function to each item in an array, in parallel.\nThe iterator is called with an item from the list and a callback for when it\nhas finished. If the iterator passes an error to this callback, the main\ncallback for the forEach function is immediately called with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n // assuming openFiles is an array of file names and saveFile is a function\n // to save the modified contents of that file:\n\n async.forEach(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n });\n\n---------------------------------------\n\n<a name=\"forEachSeries\" />\n### forEachSeries(arr, iterator, callback)\n\nThe same as forEach only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. This means the iterator functions will complete in order.\n\n\n---------------------------------------\n\n<a name=\"forEachLimit\" />\n### forEachLimit(arr, limit, iterator, callback)\n\nThe same as forEach only the iterator is applied to batches of items in the\narray, in series. The next batch of iterators is only called once the current\none has completed processing.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - How many items should be in each batch.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n // Assume documents is an array of JSON objects and requestApi is a\n // function that interacts with a rate-limited REST api.\n\n async.forEachLimit(documents, 20, requestApi, function(err){\n // if any of the saves produced an error, err would equal that error\n });\n---------------------------------------\n\n<a name=\"map\" />\n### map(arr, iterator, callback)\n\nProduces a new array of values by mapping each value in the given array through\nthe iterator function. The iterator is called with an item from the array and a\ncallback for when it has finished processing. The callback takes 2 arguments, \nan error and the transformed item from the array. If the iterator passes an\nerror to this callback, the main callback for the map function is immediately\ncalled with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order, however\nthe results array will be in the same order as the original array.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n async.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n });\n\n---------------------------------------\n\n<a name=\"mapSeries\" />\n### mapSeries(arr, iterator, callback)\n\nThe same as map only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n---------------------------------------\n\n<a name=\"filter\" />\n### filter(arr, iterator, callback)\n\n__Alias:__ select\n\nReturns a new array of all the values which pass an async truth test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(results) - A callback which is called after all the iterator\n functions have finished.\n\n__Example__\n\n async.filter(['file1','file2','file3'], path.exists, function(results){\n // results now equals an array of the existing files\n });\n\n---------------------------------------\n\n<a name=\"filterSeries\" />\n### filterSeries(arr, iterator, callback)\n\n__alias:__ selectSeries\n\nThe same as filter only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n---------------------------------------\n\n<a name=\"reject\" />\n### reject(arr, iterator, callback)\n\nThe opposite of filter. Removes values that pass an async truth test.\n\n---------------------------------------\n\n<a name=\"rejectSeries\" />\n### rejectSeries(arr, iterator, callback)\n\nThe same as filter, only the iterator is applied to each item in the array\nin series.\n\n\n---------------------------------------\n\n<a name=\"reduce\" />\n### reduce(arr, memo, iterator, callback)\n\n__aliases:__ inject, foldl\n\nReduces a list of values into a single value using an async iterator to return\neach successive step. Memo is the initial state of the reduction. This\nfunction only operates in series. For performance reasons, it may make sense to\nsplit a call to this function into a parallel map, then use the normal\nArray.prototype.reduce on the results. This function is for situations where\neach step in the reduction needs to be async, if you can get the data before\nreducing it then its probably a good idea to do so.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* memo - The initial state of the reduction.\n* iterator(memo, item, callback) - A function applied to each item in the\n array to produce the next step in the reduction. The iterator is passed a\n callback which accepts an optional error as its first argument, and the state\n of the reduction as the second. If an error is passed to the callback, the\n reduction is stopped and the main callback is immediately called with the\n error.\n* callback(err, result) - A callback which is called after all the iterator\n functions have finished. Result is the reduced value.\n\n__Example__\n\n async.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n }, function(err, result){\n // result is now equal to the last value of memo, which is 6\n });\n\n---------------------------------------\n\n<a name=\"reduceRight\" />\n### reduceRight(arr, memo, iterator, callback)\n\n__Alias:__ foldr\n\nSame as reduce, only operates on the items in the array in reverse order.\n\n\n---------------------------------------\n\n<a name=\"detect\" />\n### detect(arr, iterator, callback)\n\nReturns the first value in a list that passes an async truth test. The\niterator is applied in parallel, meaning the first iterator to return true will\nfire the detect callback with that result. That means the result might not be\nthe first item in the original array (in terms of order) that passes the test.\n\nIf order within the original array is important then look at detectSeries.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value undefined if none passed.\n\n__Example__\n\n async.detect(['file1','file2','file3'], path.exists, function(result){\n // result now equals the first file in the list that exists\n });\n\n---------------------------------------\n\n<a name=\"detectSeries\" />\n### detectSeries(arr, iterator, callback)\n\nThe same as detect, only the iterator is applied to each item in the array\nin series. This means the result is always the first in the original array (in\nterms of array order) that passes the truth test.\n\n\n---------------------------------------\n\n<a name=\"sortBy\" />\n### sortBy(arr, iterator, callback)\n\nSorts a list by the results of running each value through an async iterator.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and a value to use as the sort criteria.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is the items from\n the original array sorted by the values returned by the iterator calls.\n\n__Example__\n\n async.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n }, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n });\n\n\n---------------------------------------\n\n<a name=\"some\" />\n### some(arr, iterator, callback)\n\n__Alias:__ any\n\nReturns true if at least one element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists. Once any iterator\ncall returns true, the main callback is immediately called.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n either true or false depending on the values of the async tests.\n\n__Example__\n\n async.some(['file1','file2','file3'], path.exists, function(result){\n // if result is true then at least one of the files exists\n });\n\n---------------------------------------\n\n<a name=\"every\" />\n### every(arr, iterator, callback)\n\n__Alias:__ all\n\nReturns true if every element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called after all the iterator\n functions have finished. Result will be either true or false depending on\n the values of the async tests.\n\n__Example__\n\n async.every(['file1','file2','file3'], path.exists, function(result){\n // if result is true then every file exists\n });\n\n---------------------------------------\n\n<a name=\"concat\" />\n### concat(arr, iterator, callback)\n\nApplies an iterator to each item in a list, concatenating the results. Returns the\nconcatenated list. The iterators are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of the arguments passed to the iterator function.\n\n__Arguments__\n\n* arr - An array to iterate over\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and an array of results.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array containing\n the concatenated results of the iterator function.\n\n__Example__\n\n async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n });\n\n---------------------------------------\n\n<a name=\"concatSeries\" />\n### concatSeries(arr, iterator, callback)\n\nSame as async.concat, but executes in series instead of parallel.\n\n\n## Control Flow\n\n<a name=\"series\" />\n### series(tasks, [callback])\n\nRun an array of functions in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run and the callback for the series is\nimmediately called with the value of the error. Once the tasks have completed,\nthe results are passed to the final callback as an array.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.series.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed\n a callback it must call on completion.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets an array of all the arguments passed to\n the callbacks used in the array.\n\n__Example__\n\n async.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n },\n ],\n // optional callback\n function(err, results){\n // results is now equal to ['one', 'two']\n });\n\n\n // an example using an object instead of an array\n async.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n },\n },\n function(err, results) {\n // results is now equal to: {one: 1, two: 2}\n });\n\n\n---------------------------------------\n\n<a name=\"parallel\" />\n### parallel(tasks, [callback])\n\nRun an array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main callback is immediately called with the value of the error.\nOnce the tasks have completed, the results are passed to the final callback as an\narray.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.parallel.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed a\n callback it must call on completion.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets an array of all the arguments passed to\n the callbacks used in the array.\n\n__Example__\n\n async.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n },\n ],\n // optional callback\n function(err, results){\n // the results array will equal ['one','two'] even though\n // the second function had a shorter timeout.\n });\n\n\n // an example using an object instead of an array\n async.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n },\n },\n function(err, results) {\n // results is now equals to: {one: 1, two: 2}\n });\n\n\n---------------------------------------\n\n<a name=\"whilst\" />\n### whilst(test, fn, callback)\n\nRepeatedly call fn, while test returns true. Calls the callback when stopped,\nor an error occurs.\n\n__Arguments__\n\n* test() - synchronous truth test to perform before each execution of fn.\n* fn(callback) - A function to call each time the test passes. The function is\n passed a callback which must be called once it has completed with an optional\n error as the first argument.\n* callback(err) - A callback which is called after the test fails and repeated\n execution of fn has stopped.\n\n__Example__\n\n var count = 0;\n\n async.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n );\n\n\n---------------------------------------\n\n<a name=\"until\" />\n### until(test, fn, callback)\n\nRepeatedly call fn, until test returns true. Calls the callback when stopped,\nor an error occurs.\n\nThe inverse of async.whilst.\n\n\n---------------------------------------\n\n<a name=\"waterfall\" />\n### waterfall(tasks, [callback])\n\nRuns an array of functions in series, each passing their results to the next in\nthe array. However, if any of the functions pass an error to the callback, the\nnext function is not executed and the main callback is immediately called with\nthe error.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a callback it\n must call on completion.\n* callback(err, [results]) - An optional callback to run once all the functions\n have completed. This will be passed the results of the last task's callback.\n\n\n\n__Example__\n\n async.waterfall([\n function(callback){\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback){\n callback(null, 'three');\n },\n function(arg1, callback){\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n ], function (err, result) {\n // result now equals 'done' \n });\n\n\n---------------------------------------\n\n<a name=\"queue\" />\n### queue(worker, concurrency)\n\nCreates a queue object with the specified concurrency. Tasks added to the\nqueue will be processed in parallel (up to the concurrency limit). If all\nworkers are in progress, the task is queued until one is available. Once\na worker has completed a task, the task's callback is called.\n\n__Arguments__\n\n* worker(task, callback) - An asynchronous function for processing a queued\n task.\n* concurrency - An integer for determining how many worker functions should be\n run in parallel.\n\n__Queue objects__\n\nThe queue object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* concurrency - an integer for determining how many worker functions should be\n run in parallel. This property can be changed after a queue is created to\n alter the concurrency on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n // create a queue object with concurrency 2\n\n var q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n }, 2);\n\n\n // assign a callback\n q.drain = function() {\n console.log('all items have been processed');\n }\n\n // add some items to the queue\n\n q.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n });\n q.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n });\n\n // add some items to the queue (batch-wise)\n\n q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing bar');\n });\n\n\n---------------------------------------\n\n<a name=\"auto\" />\n### auto(tasks, [callback])\n\nDetermines the best order for running functions based on their requirements.\nEach function can optionally depend on other functions being completed first,\nand each function is run as soon as its requirements are satisfied. If any of\nthe functions pass an error to their callback, that function will not complete\n(so any other functions depending on it will not run) and the main callback\nwill be called immediately with the error. Functions also receive an object\ncontaining the results of functions which have completed so far.\n\n__Arguments__\n\n* tasks - An object literal containing named functions or an array of\n requirements, with the function itself the last item in the array. The key\n used for each function or array is used when specifying requirements. The\n syntax is easier to understand by looking at the example.\n* callback(err, results) - An optional callback which is called when all the\n tasks have been completed. The callback will receive an error as an argument\n if any tasks pass an error to their callback. If all tasks complete\n successfully, it will receive an object containing their results.\n\n__Example__\n\n async.auto({\n get_data: function(callback){\n // async code to get some data\n },\n make_folder: function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n },\n write_file: ['get_data', 'make_folder', function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, filename);\n }],\n email_link: ['write_file', function(callback, results){\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n }]\n });\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n async.parallel([\n function(callback){\n // async code to get some data\n },\n function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n }\n ],\n function(results){\n async.series([\n function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n },\n email_link: function(callback){\n // once the file is written let's email a link to it...\n }\n ]);\n });\n\nFor a complicated series of async tasks using the auto function makes adding\nnew tasks much easier and makes the code more readable.\n\n\n---------------------------------------\n\n<a name=\"iterator\" />\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the array,\nreturning a continuation to call the next one after that. Its also possible to\n'peek' the next iterator by doing iterator.next().\n\nThis function is used internally by the async module but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a callback it\n must call on completion.\n\n__Example__\n\n var iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n ]);\n\n node> var iterator2 = iterator();\n 'one'\n node> var iterator3 = iterator2();\n 'two'\n node> iterator3();\n 'three'\n node> var nextfn = iterator2.next();\n node> nextfn();\n 'three'\n\n\n---------------------------------------\n\n<a name=\"apply\" />\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied, a useful\nshorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n // using apply\n\n async.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n ]);\n\n\n // the same process without using apply\n\n async.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n },\n ]);\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n node> var fn = async.apply(sys.puts, 'one');\n node> fn('two', 'three');\n one\n two\n three\n\n---------------------------------------\n\n<a name=\"nextTick\" />\n### nextTick(callback)\n\nCalls the callback on a later loop around the event loop. In node.js this just\ncalls process.nextTick, in the browser it falls back to setTimeout(callback, 0),\nwhich means other higher priority events may precede the execution of the callback.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* callback - The function to call on a later loop around the event loop.\n\n__Example__\n\n var call_order = [];\n async.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two]\n });\n call_order.push('one')\n\n\n## Utils\n\n<a name=\"memoize\" />\n### memoize(fn, [hasher])\n\nCaches the results of an async function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\n__Arguments__\n\n* fn - the function you to proxy and cache results from.\n* hasher - an optional function for generating a custom hash for storing\n results, it has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n var slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n };\n var fn = async.memoize(slow_fn);\n\n // fn can now be used as if it were slow_fn\n fn('some name', function () {\n // callback\n });\n\n<a name=\"unmemoize\" />\n### unmemoize(fn)\n\nUndoes a memoized function, reverting it to the original, unmemoized\nform. Comes handy in tests.\n\n__Arguments__\n\n* fn - the memoized function\n\n<a name=\"log\" />\n### log(function, arguments)\n\nLogs the result of an async function to the console. Only works in node.js or\nin browsers that support console.log and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.log is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n var hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n };\n\n node> async.log(hello, 'world');\n 'hello world'\n\n\n---------------------------------------\n\n<a name=\"dir\" />\n### dir(function, arguments)\n\nLogs the result of an async function to the console using console.dir to\ndisplay the properties of the resulting object. Only works in node.js or\nin browsers that support console.dir and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.dir is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n var hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n };\n\n node> async.dir(hello, 'world');\n {hello: 'world'}\n\n\n---------------------------------------\n\n<a name=\"noConflict\" />\n### noConflict()\n\nChanges the value of async back to its original value, returning a reference to the\nasync object.\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/caolan/async", - "_id": "async@0.1.22", - "dist": { - "shasum": "3b270eedc0419d6f92a664444ce98e0f59a8fef7" - }, - "_from": "async@0.1.22", - "_resolved": "https://registry.npmjs.org/async/-/async-0.1.22.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/package.json deleted file mode 100644 index 1d8c8459..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "isbin", - "version": "0.0.2", - "description": "Checks for available binaries on unix machines", - "main": "index.js", - "engines": { - "node": ">= 0.8.0" - }, - "keywords": [ - "fs", - "bin", - "binary", - "exists", - "check", - "path" - ], - "scripts": { - "test": "make test" - }, - "repository": { - "type": "git", - "url": "git://github.com/behrendtio/isbin.git" - }, - "author": "", - "license": "MIT", - "dependencies": { - "async": "0.1.22" - }, - "devDependencies": { - "mocha": "1.7.3", - "should": "1.2.1" - }, - "readme": "[![Build Status](https://secure.travis-ci.org/mbehrendt/isbin.png?branch=master)](https://travis-ci.org/mbehrendt/isbin)\n\n# Isbin\n\nTiny little helper library to determine if a certain binary is available within $PATH or any additional folder.\n\n# Installation\n\n```bash\n$ npm install isbin\n```\n\n# Usage\n\n```js\nvar isbin = require('isbin');\n\n// Test against $PATH\nisbin('mysql', function(exists) {\n console.log(exists); // ==> Boolean\n});\n\n// With additional path to test\nisbin('mysql', '/usr/local/bin', function(exists) {\n console.log(exists); // ==> Boolean\n});\n\n// Or multiple ones\nisbin('mysql', ['/usr/local/bin', '/home/me/bins'], function(exists) {\n console.log(exists); // ==> Boolean\n});\n```\n\nThere are also synchronous versions available\n\n```js\nvar exists = isbin('mysql');\nvar exists = isbin('mysql', '/usr/local/bin');\nvar exists = isbin('mysql', ['/usr/local/bin', '/home/me/bins']);\n```\n\n# Running the tests\n\n```bash\n$ npm install\n$ make test\n```\n\n# License\n\n(The MIT License)\n\nCopyright (c) 2012 Mario Behrendt info@mario-behrendt.de, Stephan Hoyer <ste.hoyer@gmail.com>\n\nPermission 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:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE 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.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/behrendtio/isbin/issues" - }, - "homepage": "https://github.com/behrendtio/isbin", - "_id": "isbin@0.0.2", - "dist": { - "shasum": "2a35fb234ad5ee30f78da61b57e8f42ac43ec5a4" - }, - "_from": "isbin@0.0.2", - "_resolved": "https://registry.npmjs.org/isbin/-/isbin-0.0.2.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/test/isbin.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/test/isbin.js deleted file mode 100644 index 068a38a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/test/isbin.js +++ /dev/null @@ -1,39 +0,0 @@ -var isbin = require('../'); - -describe('isbin', function() { - it('accepts binary, additional path and callback', function(done) { - isbin('ls', '/etc', function(exists) { - exists.should.be.a('boolean'); - done(); - }) - }); - - it('accepts array of paths', function(done) { - isbin('ls', ['/etc', '/home'], function(exists) { - exists.should.be.a('boolean'); - done(); - }); - }); - - it('accepts just binary and callback', function(done) { - isbin('ls', function(exists) { - exists.should.be.a('boolean'); - done(); - }); - }); - - it('accepts binary, additional path and callback', function() { - var exists = isbin('ls', '/etc'); - exists.should.be.a('boolean'); - }); - - it('accepts array of paths', function() { - var exists = isbin('ls', ['/etc', '/home']); - exists.should.be.a('boolean'); - }); - - it('accepts just binary', function() { - var exists = isbin('ls'); - exists.should.be.a('boolean'); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/test/mocha.opts b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/test/mocha.opts deleted file mode 100644 index e5eb9f87..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/isbin/test/mocha.opts +++ /dev/null @@ -1,4 +0,0 @@ ---require should ---bail ---ui bdd ---slow 100 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/.editorconfig b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/.editorconfig deleted file mode 100644 index e036e247..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -; EditorConfig is awesome: http://EditorConfig.org - -; top-most EditorConfig file -root = true - -; base rules -[*] -end_of_line = lf -insert_final_newline = false -indent_style = space -indent_size = 4 -charset = utf-8 -trim_trailing_whitespace = true - -; The default indent on package.json is 2 spaces, better to keep it so we can -; use `npm install --save` and other features that rewrites the package.json -; file automatically -[package.json] -indent_style = space -indent_size = 2 diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/.jshintrc b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/.jshintrc deleted file mode 100644 index bbdb29cf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/.jshintrc +++ /dev/null @@ -1,69 +0,0 @@ -{ - // Settings - "passfail" : false, // Stop on first error. - "maxerr" : 50, // Maximum error before stopping. - - - // Predefined globals whom JSHint will ignore. - "browser" : true, // Standard browser globals e.g. `window`, `document`. - "couch" : false, - "dojo" : false, - "jquery" : true, - "mootools" : false, - "node" : false, - "prototypejs" : false, - "rhino" : false, - "wsh" : false, - - // Custom globals. - "predef" : [ - "define", - "require" - ], - - - // Development. - "debug" : false, // Allow debugger statements e.g. browser breakpoints. - "devel" : false, // Allow developments statements e.g. `console.log();`. - - - // EcmaScript 5. - "es5" : false, // Allow EcmaScript 5 syntax. - "globalstrict" : false, // Allow global "use strict" (also enables 'strict'). - "strict" : false, // Require `use strict` pragma in every file. - - - // The Good Parts. - "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons). - "bitwise" : false, // Prohibit bitwise operators (&, |, ^, etc.). - "boss" : true, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments. - "curly" : false, // Require {} for every new block or scope. - "eqeqeq" : true, // Require triple equals i.e. `===`. - "eqnull" : true, // Tolerate use of `== null`. - "evil" : false, // Tolerate use of `eval`. - "expr" : false, // Tolerate `ExpressionStatement` as Programs. - "forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`. - "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` - "latedef" : false, // Prohibit variable use before definition. - "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons. - "loopfunc" : false, // Allow functions to be defined within loops. - "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`. - "regexdash" : true, // Tolerate unescaped last dash i.e. `[-...]`. - "regexp" : false, // Prohibit `.` and `[^...]` in regular expressions. - "scripturl" : false, // Tolerate script-targeted URLs. - "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`. - "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`. - "undef" : false, // Require all non-global variables be declared before they are used. - - - // Personal styling prefrences. - "newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`. - "noempty" : true, // Prohipit use of empty blocks. - "nomen" : false, // Prohibit use of initial or trailing underbars in names. - "nonew" : true, // Prohibit use of constructors for side-effects. - "onevar" : false, // Allow only one `var` statement per function. - "plusplus" : false, // Prohibit use of `++` & `--`. - "sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`. - "trailing" : true, // Prohibit trailing whitespaces. - "white" : false // Check against strict whitespace and indentation rules. -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/.npmignore deleted file mode 100644 index 1341acd9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/.npmignore +++ /dev/null @@ -1,30 +0,0 @@ -# dumb files -# ========== - -.tmp* -.project -.settings/ -.livereload -.DS_Store? -ehthumbs.db -Icon? -Thumbs.db - - -# stuff not needed by node -# ======================== - -node_modules/ -tests/ -_build/ -doc_html/ -coverage/ - -# we keep the doc/ folder in case npm decides to display it in the future -# also good in case user is using an old version or working offline - -# we also keep the src/ folder in case the user still needs the AMD modules -# after build (see issue #102) - -bower.json -build.js diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/.travis.yml b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/.travis.yml deleted file mode 100644 index 36de1532..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ - language: node_js - node_js: - - "0.8" - script: "npm test --coverage" - notifications: - irc: - channels: - - "irc.freenode.org#moutjs" - on_success: always - on_failure: always - use_notice: true - skip_join: true - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/CHANGELOG.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/CHANGELOG.md deleted file mode 100644 index 0f5eac12..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/CHANGELOG.md +++ /dev/null @@ -1,93 +0,0 @@ -mout changelog -============== - -v0.6.0 (2013/05/22) -------------------- - - - add optional delimeter to `string/unCamelCase` - - allow custom char on `number/pad` - - allow underscore characters in `string/removeNonWord` - - accept `level` on `array/flatten` instead of a flag - - convert underscores to camelCase in `string/camelCase` - - remove `create()` from number/currencyFormat - - add `date/dayOfTheYear` - - add `date/diff` - - add `date/isSame` - - add `date/startOf` - - add `date/strftime` - - add `date/timezoneAbbr` - - add `date/timezoneOffset` - - add `date/totalDaysInYear` - - add `date/weekOfTheYear` - - add `function/timeout` - - add `object/bindAll` - - add `object/functions` - - add `time/convert` - - -v0.5.0 (2013/04/04) -------------------- - - - add `array/collect` - - add `callback` parameter to `object/equals` and `object/deepEquals` to allow - custom compare operations. - - normalize behavior in `array/*` methods to treat `null` values as empty - arrays when reading from array - - add `date/parseIso` - - add `date/isLeapYear` - - add `date/totalDaysInMonth` - - add `object/deepMatches` - - change `function/makeIterator_` to use `deepMatches` (affects nearly all - iteration methods) - - add `thisObj` parameter to `array/min` and `array/max` - - -v0.4.0 (2013/02/26) -------------------- - - - add `object/equals` - - add `object/deepEquals` - - add `object/matches`. - - add `lang/is` and `lang/isnt`. - - add `lang/isInteger`. - - add `array/findIndex`. - - add shorthand syntax to `array/*`, `object/*` and `collection/*` methods. - - improve `number/sign` behavior when value is NaN or +0 or -0. - - improve `lang/isNaN` to actually check if value *is not a number* without - coercing value; so `[]`, `""`, `null` and `"12"` are considered NaN (#39). - - improve `string/contains` to match ES6 behavior (add fromIndex argument). - - -v0.3.0 (2013/02/01) -------------------- - - - add `lang/clone`. - - add `lang/toString`. - - add `string/replace`. - - add `string/WHITE_SPACES` - - rename `function/curry` to `function/partial`. - - allow custom chars in `string/trim`, `ltrim`, and `rtrim`. - - convert values to strings in the `string/*` functions. - - -v0.2.0 (2013/01/13) -------------------- - - - fix bug in `math/ceil` for negative radixes. - - change `object/deepFillIn` and `object/deepMixIn` to recurse only if both - existing and new values are plain objects. Will not recurse into arrays - or objects not created by the Object constructor. - - add `lang/isPlainObject` to check if a file is a valid object and is created - by the Object constructor - - change `lang/clone` behavior when dealing with custom types (avoid cloning - it by default) and add second argument to allow custom behavior if needed. - - rename `lang/clone` to `lang/deepClone`. - - add VERSION property to index.js - - simplify `math/floor`, `math/round`, `math/ceil` and `math/countSteps`. - - -v0.1.0 (2013/01/09) -------------------- - -- Rename project from "amd-utils" to "mout" - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/CONTRIBUTING.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/CONTRIBUTING.md deleted file mode 100644 index 65d9add1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/CONTRIBUTING.md +++ /dev/null @@ -1,61 +0,0 @@ -# Contributing - -Fork the repo at https://github.com/mout/mout - - > "Write clearly, don't be too clever" - The Elements of Programming Style - -Avoid unnamed functions and follow the other modules structure. By only using named functions it will be easier to extract the code from the AMD module if needed and it will also give better error messages, JavaScript minifiers like [Google Closure Compiler](http://code.google.com/closure/compiler/) and [UglifyJS](https://github.com/mishoo/UglifyJS) will make sure code is as small/optimized as possible. - - > "Make it clear before you make it faster." - The Elements of Programming Style - -Be sure to always create tests for each proposed module. Features will only be merged if they contain proper tests and documentation. - - > "Good code is its own best documentation." - Steve McConnell - -We should do a code review before merging to make sure names makes sense and implementation is as good as possible. - -Try to split your pull requests into logical groups, the smaller the easier to be reviewed/merged. - - - -## Tests & Code Coverage ## - -Tests can be found inside the `tests` folder, to execute them in the browser open the `tests/runner.html`. The same tests also work on node.js by running `npm test`. - -We should have tests for all methods and ensure we have a high code coverage through our continuous integration server ([travis](https://travis-ci.org/mout/mout)). When you ask for a pull request Travis will automatically run the tests on node.js and check the code coverage as well. - -We run `node build pkg` automatically before any `npm test`, so specs and packages should always be in sync. (will avoid human mistakes) - -To check code coverage run `npm test --coverage`, it will generate the reports inside the `coverage` folder and also log the results. Please note that node.js doesn't execute all code branches since we have some conditionals that are only met on old JavaScript engines (eg. IE 7-8), so we will never have 100% code coverage (but should be close to it). - - - -## Build Script ## - -The [build script](https://github.com/mout/mout/wiki/Build-Script) can be extremely helpful and can avoid human mistakes, use it. - - - -## Admins / Pull Requests ## - -Even if you are an admin (have commit rights) please do pull requests when adding new features or changing current behavior, that way we can review the work and discuss. Feel free to push changes that doesn't affect behavior without asking for a pull request (readme, changelog, build script, typos, refactoring, ...). - - - -## Large changes ## - -If you are proposing some major change, please create an issue to discuss it first. (maybe it's outside the scope of the project) - - - -## Questions / IRC / Wiki / Issue Tracker ## - -When in doubt ask someone on IRC to help you ([#moutjs on irc.freenode.net](http://webchat.freenode.net/?channels=moutjs)) or create a [new issue](http://github.com/mout/mout/issues). - -The [project wiki](https://github.com/mout/mout/wiki) can also be a good resource of information. - - ---- - -Check the [contributors list at github](https://github.com/mout/mout/contributors). - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/LICENSE.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/LICENSE.md deleted file mode 100644 index e9ccc2be..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -# The MIT License (MIT) -## Copyright (c) 2012, 2013 moutjs team and contributors (http://moutjs.com) - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/README.md deleted file mode 100644 index 872943bd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/README.md +++ /dev/null @@ -1,63 +0,0 @@ -![mout](http://moutjs.com/logo.png "Modular JavaScript Utilties") - -http://moutjs.com/ - -[![Build Status](https://travis-ci.org/mout/mout.png?branch=master)](https://travis-ci.org/mout/mout) - -All code is library agnostic and consist mostly of helper methods that aren't -directly related with the DOM, the purpose of this library isn't to replace -Dojo, jQuery, YUI, Mootools, etc, but to provide modular solutions for common -problems that aren't solved by most of them. Consider it as a crossbrowser -JavaScript standard library. - - - -## Main goals ## - - - increase code reuse; - - be clear (code should be clean/readable); - - be easy to debug; - - be easy to maintain; - - follow best practices; - - follow standards when possible; - - **don't convert JavaScript into another language!** - - be compatible with other frameworks; - - be modular; - - have unit tests for all modules; - - work on multiple environments (IE7+, modern browsers, node.js); - - - -## What shouldn't be here ## - - - UI components; - - CSS selector engine; - - Event system - pub/sub; - - Template engine; - - Anything that isn't generic enough to be on a standard library; - - Anything that could be a separate library and/or isn't a modular utility... - - - -## API Documentation ## - -Online documentation can be found at http://moutjs.com/ or inside the -`doc` folder. - - - -## FAQ / Wiki / IRC ## - -For more info about project structure, design decisions, tips, how to -contribute, build system, etc, please check the [project -wiki](https://github.com/mout/mout/wiki). - -We also have an IRC channel [#moutjs on -irc.freenode.net](http://webchat.freenode.net/?channels=moutjs) - - - -## License ## - -Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php). - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array.js deleted file mode 100644 index 89d388ba..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array.js +++ /dev/null @@ -1,46 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'append' : require('./array/append'), - 'collect' : require('./array/collect'), - 'combine' : require('./array/combine'), - 'compact' : require('./array/compact'), - 'contains' : require('./array/contains'), - 'difference' : require('./array/difference'), - 'every' : require('./array/every'), - 'filter' : require('./array/filter'), - 'find' : require('./array/find'), - 'findIndex' : require('./array/findIndex'), - 'flatten' : require('./array/flatten'), - 'forEach' : require('./array/forEach'), - 'indexOf' : require('./array/indexOf'), - 'insert' : require('./array/insert'), - 'intersection' : require('./array/intersection'), - 'invoke' : require('./array/invoke'), - 'join' : require('./array/join'), - 'lastIndexOf' : require('./array/lastIndexOf'), - 'map' : require('./array/map'), - 'max' : require('./array/max'), - 'min' : require('./array/min'), - 'pick' : require('./array/pick'), - 'pluck' : require('./array/pluck'), - 'range' : require('./array/range'), - 'reduce' : require('./array/reduce'), - 'reduceRight' : require('./array/reduceRight'), - 'reject' : require('./array/reject'), - 'remove' : require('./array/remove'), - 'removeAll' : require('./array/removeAll'), - 'shuffle' : require('./array/shuffle'), - 'some' : require('./array/some'), - 'sort' : require('./array/sort'), - 'split' : require('./array/split'), - 'toLookup' : require('./array/toLookup'), - 'union' : require('./array/union'), - 'unique' : require('./array/unique'), - 'xor' : require('./array/xor'), - 'zip' : require('./array/zip') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/append.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/append.js deleted file mode 100644 index bf74037e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/append.js +++ /dev/null @@ -1,21 +0,0 @@ - - - /** - * Appends an array to the end of another. - * The first array will be modified. - */ - function append(arr1, arr2) { - if (arr2 == null) { - return arr1; - } - - var pad = arr1.length, - i = -1, - len = arr2.length; - while (++i < len) { - arr1[pad + i] = arr2[i]; - } - return arr1; - } - module.exports = append; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/collect.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/collect.js deleted file mode 100644 index 58637493..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/collect.js +++ /dev/null @@ -1,27 +0,0 @@ -var append = require('./append'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Maps the items in the array and concatenates the result arrays. - */ - function collect(arr, callback, thisObj){ - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length; - while (++i < len) { - var value = callback(arr[i], i, arr); - if (value != null) { - append(results, value); - } - } - - return results; - } - - module.exports = collect; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/combine.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/combine.js deleted file mode 100644 index d66e6212..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/combine.js +++ /dev/null @@ -1,22 +0,0 @@ -var indexOf = require('./indexOf'); - - /** - * Combines an array with all the items of another. - * Does not allow duplicates and is case and type sensitive. - */ - function combine(arr1, arr2) { - if (arr2 == null) { - return arr1; - } - - var i = -1, len = arr2.length; - while (++i < len) { - if (indexOf(arr1, arr2[i]) === -1) { - arr1.push(arr2[i]); - } - } - - return arr1; - } - module.exports = combine; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/compact.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/compact.js deleted file mode 100644 index 74c176ed..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/compact.js +++ /dev/null @@ -1,13 +0,0 @@ -var filter = require('./filter'); - - /** - * Remove all null/undefined items from array. - */ - function compact(arr) { - return filter(arr, function(val){ - return (val != null); - }); - } - - module.exports = compact; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/contains.js deleted file mode 100644 index 92bb6ad9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/contains.js +++ /dev/null @@ -1,10 +0,0 @@ -var indexOf = require('./indexOf'); - - /** - * If array contains values. - */ - function contains(arr, val) { - return indexOf(arr, val) !== -1; - } - module.exports = contains; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/difference.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/difference.js deleted file mode 100644 index d0570510..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/difference.js +++ /dev/null @@ -1,22 +0,0 @@ -var unique = require('./unique'); -var filter = require('./filter'); -var some = require('./some'); -var contains = require('./contains'); - - - /** - * Return a new Array with elements that aren't present in the other Arrays. - */ - function difference(arr) { - var arrs = Array.prototype.slice.call(arguments, 1), - result = filter(unique(arr), function(needle){ - return !some(arrs, function(haystack){ - return contains(haystack, needle); - }); - }); - return result; - } - - module.exports = difference; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/every.js deleted file mode 100644 index ac598832..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/every.js +++ /dev/null @@ -1,27 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Array every - */ - function every(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = true; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (!callback(arr[i], i, arr) ) { - result = false; - break; - } - } - - return result; - } - - module.exports = every; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/filter.js deleted file mode 100644 index ebeb58dc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/filter.js +++ /dev/null @@ -1,27 +0,0 @@ -var forEach = require('./forEach'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Array filter - */ - function filter(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - if (callback(value, i, arr)) { - results.push(value); - } - } - - return results; - } - - module.exports = filter; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/find.js deleted file mode 100644 index b4a73131..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/find.js +++ /dev/null @@ -1,13 +0,0 @@ -var findIndex = require('./findIndex'); - - /** - * Returns first item that matches criteria - */ - function find(arr, iterator, thisObj){ - var idx = findIndex(arr, iterator, thisObj); - return idx >= 0? arr[idx] : void(0); - } - - module.exports = find; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/findIndex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/findIndex.js deleted file mode 100644 index 53f22a5f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/findIndex.js +++ /dev/null @@ -1,23 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Returns the index of the first item that matches criteria - */ - function findIndex(arr, iterator, thisObj){ - iterator = makeIterator(iterator, thisObj); - if (arr == null) { - return -1; - } - - var i = -1, len = arr.length; - while (++i < len) { - if (iterator(arr[i], i, arr)) { - return i; - } - } - - return -1; - } - - module.exports = findIndex; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/flatten.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/flatten.js deleted file mode 100644 index aa9757ab..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/flatten.js +++ /dev/null @@ -1,43 +0,0 @@ -var isArray = require('../lang/isArray'); -var append = require('./append'); - - /* - * Helper function to flatten to a destination array. - * Used to remove the need to create intermediate arrays while flattening. - */ - function flattenTo(arr, result, level) { - if (arr == null) { - return result; - } else if (level === 0) { - append(result, arr); - return result; - } - - var value, - i = -1, - len = arr.length; - while (++i < len) { - value = arr[i]; - if (isArray(value)) { - flattenTo(value, result, level - 1); - } else { - result.push(value); - } - } - return result; - } - - /** - * Recursively flattens an array. - * A new array containing all the elements is returned. - * If `shallow` is true, it will only flatten one level. - */ - function flatten(arr, level) { - level = level == null? -1 : level; - return flattenTo(arr, [], level); - } - - module.exports = flatten; - - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/forEach.js deleted file mode 100644 index 268e506f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/forEach.js +++ /dev/null @@ -1,23 +0,0 @@ - - - /** - * Array forEach - */ - function forEach(arr, callback, thisObj) { - if (arr == null) { - return; - } - var i = -1, - len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if ( callback.call(thisObj, arr[i], i, arr) === false ) { - break; - } - } - } - - module.exports = forEach; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/indexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/indexOf.js deleted file mode 100644 index 6a9ac832..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/indexOf.js +++ /dev/null @@ -1,28 +0,0 @@ - - - /** - * Array.indexOf - */ - function indexOf(arr, item, fromIndex) { - fromIndex = fromIndex || 0; - if (arr == null) { - return -1; - } - - var len = arr.length, - i = fromIndex < 0 ? len + fromIndex : fromIndex; - while (i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (arr[i] === item) { - return i; - } - - i++; - } - - return -1; - } - - module.exports = indexOf; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/insert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/insert.js deleted file mode 100644 index f1f95b75..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/insert.js +++ /dev/null @@ -1,15 +0,0 @@ -var difference = require('./difference'); -var toArray = require('../lang/toArray'); - - /** - * Insert item into array if not already present. - */ - function insert(arr, rest_items) { - var diff = difference(toArray(arguments).slice(1), arr); - if (diff.length) { - Array.prototype.push.apply(arr, diff); - } - return arr.length; - } - module.exports = insert; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/intersection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/intersection.js deleted file mode 100644 index e6170062..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/intersection.js +++ /dev/null @@ -1,23 +0,0 @@ -var unique = require('./unique'); -var filter = require('./filter'); -var every = require('./every'); -var contains = require('./contains'); - - - /** - * Return a new Array with elements common to all Arrays. - * - based on underscore.js implementation - */ - function intersection(arr) { - var arrs = Array.prototype.slice.call(arguments, 1), - result = filter(unique(arr), function(needle){ - return every(arrs, function(haystack){ - return contains(haystack, needle); - }); - }); - return result; - } - - module.exports = intersection; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/invoke.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/invoke.js deleted file mode 100644 index c01aab1b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/invoke.js +++ /dev/null @@ -1,23 +0,0 @@ -var forEach = require('./forEach'); - - /** - * Call `methodName` on each item of the array passing custom arguments if - * needed. - */ - function invoke(arr, methodName, var_args){ - if (arr == null) { - return arr; - } - - var args = Array.prototype.slice.call(arguments, 2); - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - value[methodName].apply(value, args); - } - - return arr; - } - - module.exports = invoke; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/join.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/join.js deleted file mode 100644 index 71d8bd20..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/join.js +++ /dev/null @@ -1,17 +0,0 @@ -var filter = require('./filter'); - - function isValidString(val) { - return (val != null && val !== ''); - } - - /** - * Joins strings with the specified separator inserted between each value. - * Null values and empty strings will be excluded. - */ - function join(items, separator) { - separator = separator || ''; - return filter(items, isValidString).join(separator); - } - - module.exports = join; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/lastIndexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/lastIndexOf.js deleted file mode 100644 index ee44a25b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/lastIndexOf.js +++ /dev/null @@ -1,28 +0,0 @@ - - - /** - * Array lastIndexOf - */ - function lastIndexOf(arr, item, fromIndex) { - if (arr == null) { - return -1; - } - - var len = arr.length; - fromIndex = (fromIndex == null || fromIndex >= len)? len - 1 : fromIndex; - fromIndex = (fromIndex < 0)? len + fromIndex : fromIndex; - - while (fromIndex >= 0) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (arr[fromIndex] === item) { - return fromIndex; - } - fromIndex--; - } - - return -1; - } - - module.exports = lastIndexOf; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/map.js deleted file mode 100644 index 54064f6b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/map.js +++ /dev/null @@ -1,23 +0,0 @@ -var forEach = require('./forEach'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Array map - */ - function map(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null){ - return results; - } - - var i = -1, len = arr.length; - while (++i < len) { - results[i] = callback(arr[i], i, arr); - } - - return results; - } - - module.exports = map; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/max.js deleted file mode 100644 index 183b10ea..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/max.js +++ /dev/null @@ -1,35 +0,0 @@ -var forEach = require('./forEach'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Return maximum value inside array - */ - function max(arr, iterator, thisObj){ - if (arr == null || !arr.length) { - return Infinity; - } else if (arr.length && !iterator) { - return Math.max.apply(Math, arr); - } else { - iterator = makeIterator(iterator, thisObj); - var result, - compare = -Infinity, - value, - temp; - - var i = -1, len = arr.length; - while (++i < len) { - value = arr[i]; - temp = iterator(value, i, arr); - if (temp > compare) { - compare = temp; - result = value; - } - } - - return result; - } - } - - module.exports = max; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/min.js deleted file mode 100644 index dd00b6cf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/min.js +++ /dev/null @@ -1,35 +0,0 @@ -var forEach = require('./forEach'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Return minimum value inside array - */ - function min(arr, iterator, thisObj){ - if (arr == null || !arr.length) { - return -Infinity; - } else if (arr.length && !iterator) { - return Math.min.apply(Math, arr); - } else { - iterator = makeIterator(iterator, thisObj); - var result, - compare = Infinity, - value, - temp; - - var i = -1, len = arr.length; - while (++i < len) { - value = arr[i]; - temp = iterator(value, i, arr); - if (temp < compare) { - compare = temp; - result = value; - } - } - - return result; - } - } - - module.exports = min; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/pick.js deleted file mode 100644 index 6a54846c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/pick.js +++ /dev/null @@ -1,14 +0,0 @@ -var randInt = require('../random/randInt'); - - /** - * Remove a random item from the Array and return it - */ - function pick(arr){ - if (arr == null || !arr.length) return; - var idx = randInt(0, arr.length - 1); - return arr.splice(idx, 1)[0]; - } - - module.exports = pick; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/pluck.js deleted file mode 100644 index fef4043b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/pluck.js +++ /dev/null @@ -1,12 +0,0 @@ -var map = require('./map'); - - /** - * Extract a list of property values. - */ - function pluck(arr, propName){ - return map(arr, propName); - } - - module.exports = pluck; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/range.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/range.js deleted file mode 100644 index 31d3c770..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/range.js +++ /dev/null @@ -1,27 +0,0 @@ -var countSteps = require('../math/countSteps'); - - /** - * Returns an Array of numbers inside range. - */ - function range(start, stop, step) { - if (stop == null) { - stop = start; - start = 0; - } - step = step || 1; - - var result = [], - nSteps = countSteps(stop - start, step), - i = start; - - while (i <= stop) { - result.push(i); - i += step; - } - - return result; - } - - module.exports = range; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/reduce.js deleted file mode 100644 index 1a350c6e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/reduce.js +++ /dev/null @@ -1,33 +0,0 @@ -var forEach = require('./forEach'); - - /** - * Array reduce - */ - function reduce(arr, fn, initVal) { - // check for args.length since initVal might be "undefined" see #gh-57 - var hasInit = arguments.length > 2, - result = initVal; - - if (arr == null || !arr.length) { - if (!hasInit) { - throw new Error('reduce of empty array with no initial value'); - } else { - return initVal; - } - } - - var i = -1, len = arr.length; - while (++i < len) { - if (!hasInit) { - result = arr[i]; - hasInit = true; - } else { - result = fn(result, arr[i], i, arr); - } - } - - return result; - } - - module.exports = reduce; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/reduceRight.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/reduceRight.js deleted file mode 100644 index e36fd4aa..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/reduceRight.js +++ /dev/null @@ -1,34 +0,0 @@ - - - /** - * Array reduceRight - */ - function reduceRight(arr, fn, initVal) { - // check for args.length since initVal might be "undefined" see #gh-57 - var hasInit = arguments.length > 2; - - if (arr == null || !arr.length) { - if (hasInit) { - return initVal; - } else { - throw new Error('reduce of empty array with no initial value'); - } - } - - var i = arr.length, result = initVal, value; - while (--i >= 0) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - value = arr[i]; - if (!hasInit) { - result = value; - hasInit = true; - } else { - result = fn(result, value, i, arr); - } - } - return result; - } - - module.exports = reduceRight; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/reject.js deleted file mode 100644 index 685f2918..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/reject.js +++ /dev/null @@ -1,26 +0,0 @@ -var forEach = require('./forEach'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Array reject - */ - function reject(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - if (!callback(value, i, arr)) { - results.push(value); - } - } - - return results; - } - - module.exports = reject; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/remove.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/remove.js deleted file mode 100644 index aa6517db..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/remove.js +++ /dev/null @@ -1,13 +0,0 @@ -var indexOf = require('./indexOf'); - - /** - * Remove a single item from the array. - * (it won't remove duplicates, just a single item) - */ - function remove(arr, item){ - var idx = indexOf(arr, item); - if (idx !== -1) arr.splice(idx, 1); - } - - module.exports = remove; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/removeAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/removeAll.js deleted file mode 100644 index d5f7f3b6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/removeAll.js +++ /dev/null @@ -1,15 +0,0 @@ -var indexOf = require('./indexOf'); - - /** - * Remove all instances of an item from array. - */ - function removeAll(arr, item){ - var idx = indexOf(arr, item); - while (idx !== -1) { - arr.splice(idx, 1); - idx = indexOf(arr, item, idx); - } - } - - module.exports = removeAll; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/shuffle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/shuffle.js deleted file mode 100644 index 97805ec8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/shuffle.js +++ /dev/null @@ -1,29 +0,0 @@ -var randInt = require('../random/randInt'); -var forEach = require('./forEach'); - - /** - * Shuffle array items. - */ - function shuffle(arr) { - var results = [], - rnd; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - if (!i) { - results[0] = arr[0]; - } else { - rnd = randInt(0, i); - results[i] = results[rnd]; - results[rnd] = arr[i]; - } - } - - return results; - } - - module.exports = shuffle; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/some.js deleted file mode 100644 index 8d17772b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/some.js +++ /dev/null @@ -1,27 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Array some - */ - function some(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = false; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if ( callback(arr[i], i, arr) ) { - result = true; - break; - } - } - - return result; - } - - module.exports = some; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/sort.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/sort.js deleted file mode 100644 index 7807339b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/sort.js +++ /dev/null @@ -1,55 +0,0 @@ - - - /** - * Merge sort (http://en.wikipedia.org/wiki/Merge_sort) - */ - function mergeSort(arr, compareFn) { - if (arr == null) { - return []; - } else if (arr.length < 2) { - return arr; - } - - if (compareFn == null) { - compareFn = defaultCompare; - } - - var mid, left, right; - - mid = ~~(arr.length / 2); - left = mergeSort( arr.slice(0, mid), compareFn ); - right = mergeSort( arr.slice(mid, arr.length), compareFn ); - - return merge(left, right, compareFn); - } - - function defaultCompare(a, b) { - return a < b ? -1 : (a > b? 1 : 0); - } - - function merge(left, right, compareFn) { - var result = []; - - while (left.length && right.length) { - if (compareFn(left[0], right[0]) <= 0) { - // if 0 it should preserve same order (stable) - result.push(left.shift()); - } else { - result.push(right.shift()); - } - } - - if (left.length) { - result.push.apply(result, left); - } - - if (right.length) { - result.push.apply(result, right); - } - - return result; - } - - module.exports = mergeSort; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/split.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/split.js deleted file mode 100644 index 4f3ba50c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/split.js +++ /dev/null @@ -1,35 +0,0 @@ - - - /** - * Split array into a fixed number of segments. - */ - function split(array, segments) { - segments = segments || 2; - var results = []; - if (array == null) { - return results; - } - - var minLength = Math.floor(array.length / segments), - remainder = array.length % segments, - i = 0, - len = array.length, - segmentIndex = 0, - segmentLength; - - while (i < len) { - segmentLength = minLength; - if (segmentIndex < remainder) { - segmentLength++; - } - - results.push(array.slice(i, i + segmentLength)); - - segmentIndex++; - i += segmentLength; - } - - return results; - } - module.exports = split; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/toLookup.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/toLookup.js deleted file mode 100644 index ce4c55dd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/toLookup.js +++ /dev/null @@ -1,28 +0,0 @@ -var isFunction = require('../lang/isFunction'); - - /** - * Creates an object that holds a lookup for the objects in the array. - */ - function toLookup(arr, key) { - var result = {}; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length, value; - if (isFunction(key)) { - while (++i < len) { - value = arr[i]; - result[key(value)] = value; - } - } else { - while (++i < len) { - value = arr[i]; - result[value[key]] = value; - } - } - - return result; - } - module.exports = toLookup; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/union.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/union.js deleted file mode 100644 index f1334a91..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/union.js +++ /dev/null @@ -1,19 +0,0 @@ -var unique = require('./unique'); -var append = require('./append'); - - /** - * Concat multiple arrays and remove duplicates - */ - function union(arrs) { - var results = []; - var i = -1, len = arguments.length; - while (++i < len) { - append(results, arguments[i]); - } - - return unique(results); - } - - module.exports = union; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/unique.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/unique.js deleted file mode 100644 index 0192b2df..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/unique.js +++ /dev/null @@ -1,17 +0,0 @@ -var indexOf = require('./indexOf'); -var filter = require('./filter'); - - /** - * @return {array} Array of unique items - */ - function unique(arr){ - return filter(arr, isUnique); - } - - function isUnique(item, i, arr){ - return indexOf(arr, item, i+1) === -1; - } - - module.exports = unique; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/xor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/xor.js deleted file mode 100644 index c125a996..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/xor.js +++ /dev/null @@ -1,26 +0,0 @@ -var unique = require('./unique'); -var filter = require('./filter'); -var contains = require('./contains'); - - - /** - * Exclusive OR. Returns items that are present in a single array. - * - like ptyhon's `symmetric_difference` - */ - function xor(arr1, arr2) { - arr1 = unique(arr1); - arr2 = unique(arr2); - - var a1 = filter(arr1, function(item){ - return !contains(arr2, item); - }), - a2 = filter(arr2, function(item){ - return !contains(arr1, item); - }); - - return a1.concat(a2); - } - - module.exports = xor; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/zip.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/zip.js deleted file mode 100644 index 931eb818..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/array/zip.js +++ /dev/null @@ -1,29 +0,0 @@ -var max = require('./max'); -var pluck = require('./pluck'); -var map = require('./map'); - - function getLength(arr) { - return arr == null ? 0 : arr.length; - } - - /** - * Merges together the values of each of the arrays with the values at the - * corresponding position. - */ - function zip(arr){ - var len = arr ? max(map(arguments, getLength)) : 0, - results = [], - i = -1, - item; - while (++i < len) { - results.push(map(arguments, function(item) { - return item == null ? undefined : item[i]; - })); - } - - return results; - } - - module.exports = zip; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection.js deleted file mode 100644 index d5cf6cad..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection.js +++ /dev/null @@ -1,22 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'contains' : require('./collection/contains'), - 'every' : require('./collection/every'), - 'filter' : require('./collection/filter'), - 'find' : require('./collection/find'), - 'forEach' : require('./collection/forEach'), - 'make_' : require('./collection/make_'), - 'map' : require('./collection/map'), - 'max' : require('./collection/max'), - 'min' : require('./collection/min'), - 'pluck' : require('./collection/pluck'), - 'reduce' : require('./collection/reduce'), - 'reject' : require('./collection/reject'), - 'size' : require('./collection/size'), - 'some' : require('./collection/some') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/contains.js deleted file mode 100644 index a73f994b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/contains.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrContains = require('../array/contains'); -var objContains = require('../object/contains'); - - /** - */ - module.exports = make(arrContains, objContains); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/every.js deleted file mode 100644 index 300e03c5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/every.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrEvery = require('../array/every'); -var objEvery = require('../object/every'); - - /** - */ - module.exports = make(arrEvery, objEvery); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/filter.js deleted file mode 100644 index 38757005..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/filter.js +++ /dev/null @@ -1,23 +0,0 @@ -var forEach = require('./forEach'); -var makeIterator = require('../function/makeIterator_'); - - /** - * filter collection values, returns array. - */ - function filter(list, iterator, thisObj) { - iterator = makeIterator(iterator, thisObj); - var results = []; - if (!list) { - return results; - } - forEach(list, function(value, index, list) { - if (iterator(value, index, list)) { - results[results.length] = value; - } - }); - return results; - } - - module.exports = filter; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/find.js deleted file mode 100644 index 14317e64..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/find.js +++ /dev/null @@ -1,10 +0,0 @@ -var make = require('./make_'); -var arrFind = require('../array/find'); -var objFind = require('../object/find'); - - /** - * Find value that returns true on iterator check. - */ - module.exports = make(arrFind, objFind); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/forEach.js deleted file mode 100644 index 6e28dcb1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/forEach.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrForEach = require('../array/forEach'); -var objForEach = require('../object/forOwn'); - - /** - */ - module.exports = make(arrForEach, objForEach); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/make_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/make_.js deleted file mode 100644 index 029d27bf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/make_.js +++ /dev/null @@ -1,19 +0,0 @@ - - - /** - * internal method used to create other collection modules. - */ - function makeCollectionMethod(arrMethod, objMethod, defaultReturn) { - return function(){ - var args = Array.prototype.slice.call(arguments); - if (args[0] == null) { - return defaultReturn; - } - // array-like is treated as array - return (typeof args[0].length === 'number')? arrMethod.apply(null, args) : objMethod.apply(null, args); - }; - } - - module.exports = makeCollectionMethod; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/map.js deleted file mode 100644 index fc157f53..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/map.js +++ /dev/null @@ -1,23 +0,0 @@ -var isObject = require('../lang/isObject'); -var values = require('../object/values'); -var arrMap = require('../array/map'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Map collection values, returns Array. - */ - function map(list, callback, thisObj) { - callback = makeIterator(callback, thisObj); - // list.length to check array-like object, if not array-like - // we simply map all the object values - if( isObject(list) && list.length == null ){ - list = values(list); - } - return arrMap(list, function (val, key, list) { - return callback(val, key, list); - }); - } - - module.exports = map; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/max.js deleted file mode 100644 index a8490e7e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/max.js +++ /dev/null @@ -1,10 +0,0 @@ -var make = require('./make_'); -var arrMax = require('../array/max'); -var objMax = require('../object/max'); - - /** - * Get maximum value inside collection - */ - module.exports = make(arrMax, objMax); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/min.js deleted file mode 100644 index 51d9f148..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/min.js +++ /dev/null @@ -1,10 +0,0 @@ -var make = require('./make_'); -var arrMin = require('../array/min'); -var objMin = require('../object/min'); - - /** - * Get minimum value inside collection. - */ - module.exports = make(arrMin, objMin); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/pluck.js deleted file mode 100644 index 9b283776..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/pluck.js +++ /dev/null @@ -1,14 +0,0 @@ -var map = require('./map'); - - /** - * Extract a list of property values. - */ - function pluck(list, key) { - return map(list, function(value) { - return value[key]; - }); - } - - module.exports = pluck; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/reduce.js deleted file mode 100644 index 4c075735..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/reduce.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrReduce = require('../array/reduce'); -var objReduce = require('../object/reduce'); - - /** - */ - module.exports = make(arrReduce, objReduce); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/reject.js deleted file mode 100644 index 2a92e3b3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/reject.js +++ /dev/null @@ -1,16 +0,0 @@ -var filter = require('./filter'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Inverse or collection/filter - */ - function reject(list, iterator, thisObj) { - iterator = makeIterator(iterator, thisObj); - return filter(list, function(value, index, list) { - return !iterator(value, index, list); - }, thisObj); - } - - module.exports = reject; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/size.js deleted file mode 100644 index 244e33e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/size.js +++ /dev/null @@ -1,19 +0,0 @@ -var isArray = require('../lang/isArray'); -var objSize = require('../object/size'); - - /** - * Get collection size - */ - function size(list) { - if (!list) { - return 0; - } - if (isArray(list)) { - return list.length; - } - return objSize(list); - } - - module.exports = size; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/some.js deleted file mode 100644 index 48fd252e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/collection/some.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrSome = require('../array/some'); -var objSome = require('../object/some'); - - /** - */ - module.exports = make(arrSome, objSome); - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date.js deleted file mode 100644 index 1cde1a95..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date.js +++ /dev/null @@ -1,21 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'dayOfTheYear' : require('./date/dayOfTheYear'), - 'diff' : require('./date/diff'), - 'i18n_' : require('./date/i18n_'), - 'isLeapYear' : require('./date/isLeapYear'), - 'isSame' : require('./date/isSame'), - 'parseIso' : require('./date/parseIso'), - 'startOf' : require('./date/startOf'), - 'strftime' : require('./date/strftime'), - 'timezoneAbbr' : require('./date/timezoneAbbr'), - 'timezoneOffset' : require('./date/timezoneOffset'), - 'totalDaysInMonth' : require('./date/totalDaysInMonth'), - 'totalDaysInYear' : require('./date/totalDaysInYear'), - 'weekOfTheYear' : require('./date/weekOfTheYear') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/dayOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/dayOfTheYear.js deleted file mode 100644 index 85905c5a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/dayOfTheYear.js +++ /dev/null @@ -1,13 +0,0 @@ -var isDate = require('../lang/isDate'); - - /** - * return the day of the year (1..366) - */ - function dayOfTheYear(date){ - return (Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) - - Date.UTC(date.getFullYear(), 0, 1)) / 86400000 + 1; - } - - module.exports = dayOfTheYear; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/diff.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/diff.js deleted file mode 100644 index 1131cdcb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/diff.js +++ /dev/null @@ -1,130 +0,0 @@ -var totalDaysInMonth = require('./totalDaysInMonth'); -var totalDaysInYear = require('./totalDaysInYear'); -var convert = require('../time/convert'); - - /** - * calculate the difference between dates (range) - */ - function diff(start, end, unitName){ - // sort the dates to make it easier to process (specially year/month) - if (start > end) { - var swap = start; - start = end; - end = swap; - } - - var output; - - if (unitName === 'month') { - output = getMonthsDiff(start, end); - } else if (unitName === 'year'){ - output = getYearsDiff(start, end); - } else if (unitName != null) { - if (unitName === 'day') { - // ignore timezone difference because of daylight savings time - start = toUtc(start); - end = toUtc(end); - } - output = convert(end - start, 'ms', unitName); - } else { - output = end - start; - } - - return output; - } - - - function toUtc(d){ - // we ignore timezone differences on purpose because of daylight - // savings time, otherwise it would return fractional days/weeks even - // if a full day elapsed. eg: - // Wed Feb 12 2014 00:00:00 GMT-0200 (BRST) - // Sun Feb 16 2014 00:00:00 GMT-0300 (BRT) - // diff should be 4 days and not 4.041666666666667 - return Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), - d.getHours(), d.getMinutes(), d.getSeconds(), - d.getMilliseconds()); - } - - - function getMonthsDiff(start, end){ - return getElapsedMonths(start, end) + - getElapsedYears(start, end) * 12 + - getFractionalMonth(start, end); - } - - - function getYearsDiff(start, end){ - var elapsedYears = getElapsedYears(start, end); - return elapsedYears + getFractionalYear(start, end, elapsedYears); - } - - - function getElapsedMonths(start, end){ - var monthDiff = end.getMonth() - start.getMonth(); - if (monthDiff < 0) { - monthDiff += 12; - } - // less than a full month - if (start.getDate() > end.getDate()) { - monthDiff -= 1; - } - return monthDiff; - } - - - function getElapsedYears(start, end){ - var yearDiff = end.getFullYear() - start.getFullYear(); - // less than a full year - if (start.getMonth() > end.getMonth()) { - yearDiff -= 1; - } - return yearDiff; - } - - - function getFractionalMonth(start, end){ - var fractionalDiff = 0; - var startDay = start.getDate(); - var endDay = end.getDate(); - - if (startDay !== endDay) { - var startTotalDays = totalDaysInMonth(start); - var endTotalDays = totalDaysInMonth(end); - var totalDays; - var daysElapsed; - - if (startDay > endDay) { - // eg: Jan 29 - Feb 27 (29 days elapsed but not a full month) - var baseDay = startTotalDays - startDay; - daysElapsed = endDay + baseDay; - // total days should be relative to 1st day of next month if - // startDay > endTotalDays - totalDays = (startDay > endTotalDays)? - endTotalDays + baseDay + 1 : startDay + baseDay; - } else { - // fractional is only based on endMonth eg: Jan 12 - Feb 18 - // (6 fractional days, 28 days until next full month) - daysElapsed = endDay - startDay; - totalDays = endTotalDays; - } - - fractionalDiff = daysElapsed / totalDays; - } - - return fractionalDiff; - } - - - function getFractionalYear(start, end, elapsedYears){ - var base = elapsedYears? - new Date(end.getFullYear(), start.getMonth(), start.getDate()) : - start; - var elapsedDays = diff(base, end, 'day'); - return elapsedDays / totalDaysInYear(end); - } - - - module.exports = diff; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n/en-US.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n/en-US.js deleted file mode 100644 index f9526ce4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n/en-US.js +++ /dev/null @@ -1,61 +0,0 @@ - - // en-US (English, United States) - module.exports = { - "am" : "AM", - "pm" : "PM", - - "x": "%m/%d/%y", - "X": "%H:%M:%S", - "c": "%a %d %b %Y %I:%M:%S %p %Z", - - "months" : [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" - ], - - "months_abbr" : [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" - ], - - "days" : [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" - ], - - "days_abbr" : [ - "Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat" - ] - }; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n/pt-BR.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n/pt-BR.js deleted file mode 100644 index 71ebadb5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n/pt-BR.js +++ /dev/null @@ -1,61 +0,0 @@ - - // pt-BR (Brazillian Portuguese) - module.exports = { - "am" : "", - "pm" : "", - - "x": "%d/%m/%y", - "X": "%H:%M:%S", - "c": "%a %d %b %Y %H:%M:%S %Z", - - "months" : [ - "Janeiro", - "Fevereiro", - "Março", - "Abril", - "Maio", - "Junho", - "Julho", - "Agosto", - "Setembro", - "Outubro", - "Novembro", - "Dezembro" - ], - - "months_abbr" : [ - "Jan", - "Fev", - "Mar", - "Abr", - "Mai", - "Jun", - "Jul", - "Ago", - "Set", - "Out", - "Nov", - "Dez" - ], - - "days" : [ - "Domingo", - "Segunda", - "Terça", - "Quarta", - "Quinta", - "Sexta", - "Sábado" - ], - - "days_abbr" : [ - "Dom", - "Seg", - "Ter", - "Qua", - "Qui", - "Sex", - "Sáb" - ] - }; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n_.js deleted file mode 100644 index 723fc103..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/i18n_.js +++ /dev/null @@ -1,14 +0,0 @@ -var mixIn = require('../object/mixIn'); -var enUS = require('./i18n/en-US'); - - // we also use mixIn to make sure we don't affect the original locale - var activeLocale = mixIn({}, enUS, { - // we expose a "set" method to allow overriding the global locale - set : function(localeData){ - mixIn(activeLocale, localeData); - } - }); - - module.exports = activeLocale; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/isLeapYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/isLeapYear.js deleted file mode 100644 index 4212870b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/isLeapYear.js +++ /dev/null @@ -1,15 +0,0 @@ -var isDate = require('../lang/isDate'); - - /** - * checks if it's a leap year - */ - function isLeapYear(fullYear){ - if (isDate(fullYear)) { - fullYear = fullYear.getFullYear(); - } - return fullYear % 400 === 0 || (fullYear % 100 !== 0 && fullYear % 4 === 0); - } - - module.exports = isLeapYear; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/isSame.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/isSame.js deleted file mode 100644 index 4097d29b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/isSame.js +++ /dev/null @@ -1,16 +0,0 @@ -var startOf = require('./startOf'); - - /** - * Check if date is "same" with optional period - */ - function isSame(date1, date2, period){ - if (period) { - date1 = startOf(date1, period); - date2 = startOf(date2, period); - } - return Number(date1) === Number(date2); - } - - module.exports = isSame; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/parseIso.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/parseIso.js deleted file mode 100644 index 8ea2b171..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/parseIso.js +++ /dev/null @@ -1,146 +0,0 @@ -var some = require('../array/some'); - - var datePatterns = [ - /^([0-9]{4})$/, // YYYY - /^([0-9]{4})-([0-9]{2})$/, // YYYY-MM (YYYYMM not allowed) - /^([0-9]{4})-?([0-9]{2})-?([0-9]{2})$/ // YYYY-MM-DD or YYYYMMDD - ]; - var ORD_DATE = /^([0-9]{4})-?([0-9]{3})$/; // YYYY-DDD - - var timePatterns = [ - /^([0-9]{2}(?:\.[0-9]*)?)$/, // HH.hh - /^([0-9]{2}):?([0-9]{2}(?:\.[0-9]*)?)$/, // HH:MM.mm - /^([0-9]{2}):?([0-9]{2}):?([0-9]{2}(\.[0-9]*)?)$/ // HH:MM:SS.ss - ]; - - var DATE_TIME = /^(.+)T(.+)$/; - var TIME_ZONE = /^(.+)([+\-])([0-9]{2}):?([0-9]{2})$/; - - function matchAll(str, patterns) { - var match; - var found = some(patterns, function(pattern) { - return !!(match = pattern.exec(str)); - }); - - return found ? match : null; - } - - function getDate(year, month, day) { - var date = new Date(Date.UTC(year, month, day)); - - // Explicitly set year to avoid Date.UTC making dates < 100 relative to - // 1900 - date.setUTCFullYear(year); - - var valid = - date.getUTCFullYear() === year && - date.getUTCMonth() === month && - date.getUTCDate() === day; - return valid ? +date : NaN; - } - - function parseOrdinalDate(str) { - var match = ORD_DATE.exec(str); - if (match ) { - var year = +match[1], - day = +match[2], - date = new Date(Date.UTC(year, 0, day)); - - if (date.getUTCFullYear() === year) { - return +date; - } - } - - return NaN; - } - - function parseDate(str) { - var match, year, month, day; - - var match = matchAll(str, datePatterns); - if (match === null) { - // Ordinal dates are verified differently. - return parseOrdinalDate(str); - } - - year = (match[1] === void 0) ? 0 : +match[1]; - month = (match[2] === void 0) ? 0 : +match[2] - 1; - day = (match[3] === void 0) ? 1 : +match[3]; - - return getDate(year, month, day); - } - - function getTime(hr, min, sec) { - var valid = - (hr < 24 && hr >= 0 && - min < 60 && min >= 0 && - sec < 60 && min >= 0) || - (hr === 24 && min === 0 && sec === 0); - if (!valid) { - return NaN; - } - - return ((hr * 60 + min) * 60 + sec) * 1000; - } - - function parseOffset(str) { - var match; - if (str.charAt(str.length - 1) === 'Z') { - str = str.substring(0, str.length - 1); - } else if ((match = TIME_ZONE.exec(str))) { - var match = TIME_ZONE.exec(str); - if (match) { - var hours = +match[3], - minutes = (match[4] === void 0) ? 0 : +match[4], - offset = getTime(hours, minutes, 0); - - if (match[2] === '-') { - offset *= -1; - } - - return { offset: offset, time: match[1] }; - } - } - - // No time zone specified, assume UTC - return { offset: 0, time: str }; - } - - function parseTime(str) { - var match; - var offset = parseOffset(str); - - str = offset.time; - offset = offset.offset; - if (isNaN(offset)) { - return NaN; - } - - match = matchAll(str, timePatterns); - if (match === null) { - return NaN; - } - - var hours = (match[1] === void 0) ? 0 : +match[1], - minutes = (match[2] === void 0) ? 0 : +match[2], - seconds = (match[3] === void 0) ? 0 : +match[3]; - - return getTime(hours, minutes, seconds) - offset; - } - - /** - * Parse an ISO8601 formatted date string, and return a Date object. - */ - function parseISO8601(str){ - var match = DATE_TIME.exec(str); - if (!match) { - // No time specified - return parseDate(str); - } - - return parseDate(match[1]) + parseTime(match[2]); - } - - module.exports = parseISO8601; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/startOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/startOf.js deleted file mode 100644 index 072bc0ef..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/startOf.js +++ /dev/null @@ -1,54 +0,0 @@ -var clone = require('../lang/clone'); - - /** - * get a new Date object representing start of period - */ - function startOf(date, period){ - date = clone(date); - - // intentionally removed "break" from switch since start of - // month/year/etc should also reset the following periods - switch (period) { - case 'year': - date.setMonth(0); - /* falls through */ - case 'month': - date.setDate(1); - /* falls through */ - case 'week': - case 'day': - date.setHours(0); - /* falls through */ - case 'hour': - date.setMinutes(0); - /* falls through */ - case 'minute': - date.setSeconds(0); - /* falls through */ - case 'second': - date.setMilliseconds(0); - break; - default: - throw new Error('"'+ period +'" is not a valid period'); - } - - // week is the only case that should reset the weekDay and maybe even - // overflow to previous month - if (period === 'week') { - var weekDay = date.getDay(); - var baseDate = date.getDate(); - if (weekDay) { - if (weekDay >= baseDate) { - //start of the week is on previous month - date.setDate(0); - } - date.setDate(date.getDate() - date.getDay()); - } - } - - return date; - } - - module.exports = startOf; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/strftime.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/strftime.js deleted file mode 100644 index f033d10f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/strftime.js +++ /dev/null @@ -1,118 +0,0 @@ -var pad = require('../number/pad'); -var i18n = require('./i18n_'); -var dayOfTheYear = require('./dayOfTheYear'); -var timezoneOffset = require('./timezoneOffset'); -var timezoneAbbr = require('./timezoneAbbr'); -var weekOfTheYear = require('./weekOfTheYear'); - - var _combinations = { - 'D': '%m/%d/%y', - 'F': '%Y-%m-%d', - 'r': '%I:%M:%S %p', - 'R': '%H:%M', - 'T': '%H:%M:%S', - 'x': 'locale', - 'X': 'locale', - 'c': 'locale' - }; - - - /** - * format date based on strftime format - */ - function strftime(date, format, localeData){ - localeData = localeData || i18n; - var reToken = /%([a-z%])/gi; - - function makeIterator(fn) { - return function(match, token){ - return fn(date, token, localeData); - }; - } - - return format - .replace(reToken, makeIterator(expandCombinations)) - .replace(reToken, makeIterator(convertToken)); - } - - - function expandCombinations(date, token, l10n){ - if (token in _combinations) { - var expanded = _combinations[token]; - return expanded === 'locale'? l10n[token] : expanded; - } else { - return '%'+ token; - } - } - - - function convertToken(date, token, l10n){ - switch (token){ - case 'a': - return l10n.days_abbr[date.getDay()]; - case 'A': - return l10n.days[date.getDay()]; - case 'h': - case 'b': - return l10n.months_abbr[date.getMonth()]; - case 'B': - return l10n.months[date.getMonth()]; - case 'C': - return pad(Math.floor(date.getFullYear() / 100), 2); - case 'd': - return pad(date.getDate(), 2); - case 'e': - return pad(date.getDate(), 2, ' '); - case 'H': - return pad(date.getHours(), 2); - case 'I': - return pad(date.getHours() % 12, 2); - case 'j': - return pad(dayOfTheYear(date), 3); - case 'L': - return pad(date.getMilliseconds(), 3); - case 'm': - return pad(date.getMonth() + 1, 2); - case 'M': - return pad(date.getMinutes(), 2); - case 'n': - return '\n'; - case 'p': - return date.getHours() >= 12? l10n.pm : l10n.am; - case 'P': - return convertToken(date, 'p', l10n).toLowerCase(); - case 's': - return date.getTime() / 1000; - case 'S': - return pad(date.getSeconds(), 2); - case 't': - return '\t'; - case 'u': - var day = date.getDay(); - return day === 0? 7 : day; - case 'U': - return pad(weekOfTheYear(date), 2); - case 'w': - return date.getDay(); - case 'W': - return pad(weekOfTheYear(date, 1), 2); - case 'y': - return pad(date.getFullYear() % 100, 2); - case 'Y': - return pad(date.getFullYear(), 4); - case 'z': - return timezoneOffset(date); - case 'Z': - return timezoneAbbr(date); - case '%': - return '%'; - default: - // keep unrecognized tokens - return '%'+ token; - } - } - - - module.exports = strftime; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/timezoneAbbr.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/timezoneAbbr.js deleted file mode 100644 index b1006875..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/timezoneAbbr.js +++ /dev/null @@ -1,17 +0,0 @@ -var timezoneOffset = require('./timezoneOffset'); - - /** - * Abbreviated time zone name or similar information. - */ - function timezoneAbbr(date){ - // Date.toString gives different results depending on the - // browser/system so we fallback to timezone offset - // chrome: 'Mon Apr 08 2013 09:02:04 GMT-0300 (BRT)' - // IE: 'Mon Apr 8 09:02:04 UTC-0300 2013' - var tz = /\(([A-Z]{3,4})\)/.exec(date.toString()); - return tz? tz[1] : timezoneOffset(date); - } - - module.exports = timezoneAbbr; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/timezoneOffset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/timezoneOffset.js deleted file mode 100644 index 9492dceb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/timezoneOffset.js +++ /dev/null @@ -1,16 +0,0 @@ -var pad = require('../number/pad'); - - /** - * time zone as hour and minute offset from UTC (e.g. +0900) - */ - function timezoneOffset(date){ - var offset = date.getTimezoneOffset(); - var abs = Math.abs(offset); - var h = pad(Math.floor(abs / 60), 2); - var m = pad(abs % 60, 2); - return (offset > 0? '-' : '+') + h + m; - } - - module.exports = timezoneOffset; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInMonth.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInMonth.js deleted file mode 100644 index 8aafeb84..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInMonth.js +++ /dev/null @@ -1,25 +0,0 @@ -var isDate = require('../lang/isDate'); -var isLeapYear = require('./isLeapYear'); - - var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; - - /** - * returns the total amount of days in the month (considering leap years) - */ - function totalDaysInMonth(fullYear, monthIndex){ - if (isDate(fullYear)) { - var date = fullYear; - year = date.getFullYear(); - monthIndex = date.getMonth(); - } - - if (monthIndex === 1 && isLeapYear(fullYear)) { - return 29; - } else { - return DAYS_IN_MONTH[monthIndex]; - } - } - - module.exports = totalDaysInMonth; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInYear.js deleted file mode 100644 index b4b7e9b7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/totalDaysInYear.js +++ /dev/null @@ -1,13 +0,0 @@ -var isLeapYear = require('./isLeapYear'); - - /** - * return the amount of days in the year following the gregorian calendar - * and leap years - */ - function totalDaysInYear(fullYear){ - return isLeapYear(fullYear)? 366 : 365; - } - - module.exports = totalDaysInYear; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/weekOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/weekOfTheYear.js deleted file mode 100644 index dd51b7f1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/date/weekOfTheYear.js +++ /dev/null @@ -1,16 +0,0 @@ -var dayOfTheYear = require('./dayOfTheYear'); - - /** - * Return the week of the year based on given firstDayOfWeek - */ - function weekOfTheYear(date, firstDayOfWeek){ - firstDayOfWeek = firstDayOfWeek == null? 0 : firstDayOfWeek; - var doy = dayOfTheYear(date); - var dow = (7 + date.getDay() - firstDayOfWeek) % 7; - var relativeWeekDay = 6 - firstDayOfWeek - dow; - return Math.floor((doy + relativeWeekDay) / 7); - } - - module.exports = weekOfTheYear; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/array.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/array.md deleted file mode 100644 index 1f390fbc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/array.md +++ /dev/null @@ -1,773 +0,0 @@ -# array # - -Array utilities. - - - - -## append(arr1, arr2):Array - -Appends an array to the end of the other. -The first array will be modified and will contain the appended items. - -See: [`union()`](#union), [`combine()`](#combine) - -```js -var foo = ['a', 'b'], - bar = ['b', 'd']; - -append(foo, bar); // ['a', 'b', 'b', 'd'] -``` - - - -## collect(arr, callback, [thisObj]):Array - -Maps the items in `arr` and concatenates the resulting arrays. - -See: [`map()`](#map) - -```js -collect([1, 2, 3], function(val) { - return [val, val % 2]; -}); // [1, 1, 2, 0, 3, 1]; - -collect(['a', 'bb', ''], function(val) { - return val.split(''); -}); // ['a', 'b', 'b'] -``` - -It also supports a shorthand syntax: - -```js -var items = [{ a: [1] }, { b: 'foo' }, { a: [2, 3] }]; -collect(items, 'a'); // [1, 2, 3]; -``` - - - -## combine(arr1, arr2):Array - -Combines an array with all the items of another. -The first array will be modified and will contain the combined items. -Does not allow duplicates and is case and type sensitive. - -See: [`union()`](#union), [`append()`](#append) - -```js -var foo = ['a', 'b'], - bar = ['b', 'd']; - -combine(foo, bar); // ['a', 'b', 'd'] -``` - - - -## compact(arr):Array - -Returns a new Array without any `null` or `undefined` values. Note that it will -keep empty strings and other falsy values (simillar to Ruby Array#compact). - -```js -var arr = [0, 1, null, false, '', 'foo', undefined, 'bar']; -compact(arr); // [0, 1, false, '', 'foo', 'bar']; -``` - - - -## contains(arr, value):Boolean - -Checks if Array contains value. Alias to `indexOf(arr, val) !== -1`. - -```js -var arr = [1, 2, 3]; -contains(arr, 2); // true -contains(arr, 'foo'); // false -``` - - - -## difference(...arrs):Array - -Return a new Array with elements that aren't present in the other Arrays -besides the first one. - -Works like [Python set#difference](http://docs.python.org/library/stdtypes.html#set.difference). - -It will remove duplicates. - -See: [`xor()`](#xor), [`intersection()`](#intersection) - -```js -var a = ['a', 'b', 1]; -var b = ['c', 1]; -difference(a, b); // ['a', 'b'] -``` - - - -## every(arr, callback, [thisObj]):Array - -Crossbrowser `Array.every()`. - -Tests whether all elements in the array pass the test implemented by the provided function. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -```js -var items = [1, 'foo', 'bar']; -every(items, isString); // false -every(items, isFunction); // false -every(items, function(val, key, arr){ - return val != null; -}); // true -``` - -more info at [MDN Array#every](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every) - -It also supports a shorthand syntax: - -```js -var items = [{id:1, active:true}, {id:3, active:true}, {id:8, active:true}]; -// all items with `id === 8` -every(items, {id:8}); // false -// `active` is truthy on all items -every(items, 'active'); // true -``` - - - -## filter(arr, callback, [thisObj]):Array - -Crossbrowser `Array.filter()`. - -Creates a new array with all elements that pass the callback test. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -```js -var nums = [1, 2, 3, 4, 5, 6]; -var oddNumbers = filter(nums, function(val, key, arr){ - return (val % 2) !== 0; -}); -// > [1, 3, 5] -``` - -more info at [MDN Array#filter](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/filter) - -Filter also supports shorthand notation: - -```js -var users = [ - {name:'john', surname:'connor', beard:false}, - {name:'john', surname:'doe', beard:true}, - {name:'jane', surname:'doe', beard:false} -]; -// filter item that matches all properties/values pairs -filter(arr, {name:'john', beard:false}); -// > [{name:'john', surnname:'connor', beard:false}] -// items where 'beard' is a truthy value -filter(arr, 'beard'); -// > [{name:'john', surnname:'doe', beard:true}] -``` - -See [`reject()`](#reject) - - - -## find(arr, callback, [thisObj]):void - -Loops through all the items in the Array and returns the first one that passes -a truth test (callback). - -```js -var arr = [123, {a:'b'}, 'foo', 'bar']; -find(arr, isString); // "foo" -find(arr, isNumber); // 123 -find(arr, isObject); // {a:'b'} -``` - -Find also supports shorthand notation: - -```js -var users = [ - {name:'john', surname:'connor', beard:false}, - {name:'john', surname:'doe', beard:true} -]; -// first item that matches all properties/values pairs -find(arr, {name:'john'}); // {name:'john', surnname:'connor', beard:false} -// first item where 'beard' is a truthy value -find(arr, 'beard'); // {name:'john', surnname:'doe', beard:true} -``` - -See: [findIndex()](#findIndex) - - - -## findIndex(arr, iterator, [thisObj]):Number - -Loops through the items in the Array and returns the index of the first one -that passes a truth test (callback). - -Returns `-1` if no item was found that passes the truth test. - -```js -var arr = [1, { a: 1 }, 'foo', 'bar']; -findIndex(arr, isString); // 2 -findIndex(arr, isNumber); // 0 -findIndex(arr, isObject); // 1 -findIndex(arr, isRegExp); // -1 -``` - -`findIndex` also supports shorthand notation: - -```js -var pets = [ - { pet: 'dog', name: 'Sam' }, - { pet: 'dog', name: 'Maggie' } -]; - -findIndex(pets, { pet: 'dog' }); // 0 -findIndex(pets, { name: 'Maggie' }); // 1 -``` - -See: [find()](#find) - - - -## flatten(arr, [level]):Array - -Recursively flattens an array. A new array containing all the elements is -returned. If `level` is specified, it will only flatten up to that level. - -### Example - -```js -flatten([1, [2], [3, [4, 5]]]); -// > [1, 2, 3, 4, 5] -flatten([1, [2], [3, [4, 5]]], 1); -// > [1, 2, 3, [4, 5]] -``` - - - -## forEach(arr, callback, [thisObj]):void - -Crossbrowser `Array.forEach()`. - -It allows exiting the iteration early by returning `false` on the callback. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -```js -var items = ['foo', 'bar', 'lorem', 'ipsum']; -forEach(items, function(val, key, arr){ - console.log(key +' : '+ val); - if (val === 'lorem') { - // stop iteration (break) - return false; - } -}); -``` - -more info at [MDN Array#forEach](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/forEach) - - - -## indexOf(arr, item, [fromIndex]):Number - -Crossbrowser `Array.indexOf()`. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -more info at [MDN Array#indexOf](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf) - - - - -## insert(arr, ...items):Number - -Push items into array only if they aren't contained by it. Returns the new -`length` of the array. - -See: [`remove()`](#remove), [`removeAll()`](#removeAll), -[`contains()`](#contains) - -```js -var arr = ['a', 'b']; -insert(arr, 'a'); // 2 : ['a', 'b'] -insert(arr, 'c'); // 3 : ['a', 'b', 'c'] -insert(arr, 1, 2, 'b'); // 5 : ['a', 'b', 'c', 1, 2] -``` - - - -## intersection(...arrs):Array - -Return a new Array with elements common to all Arrays. - -Similar to Python set#intersection and underscore.js intersection. - -It will remove duplicates. - -See: [`difference()`](#difference), [`xor()`](#xor) - -```js -var a = ['a', 'b', 1], - b = ['c', 1], - c = [1, 2, 3]; -intersection(a, b, c); // [1] -``` - - - -## invoke(arr, methodName[, ...args]):Array - -Call `methodName` on each item of the array passing custom arguments if needed. - -```js -invoke([[3,2,1], [9,5,2]], 'sort'); // [[1,2,3], [2,5,9]] -``` - - - -## join(arr, [separator]):String - -Joins the strings in `arr`, inserting `separator` between each value. - -This ignores null values and empty strings that are in the array. `separator` -defaults to an empty string. This will convert all non-string objects in the -array to a string. - -### Example - -```js -join(['a', 'b', 'c']); // 'abc' -join(['foo', 'bar'], ', '); // 'foo, bar' -join([null, 'foo', '', 'bar', undefined], ':'); // 'foo:bar' -``` - - - -## lastIndexOf(arr, item, [fromIndex]):Number - -Crossbrowser `Array.lastIndexOf()`. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -more info at [MDN Array#lastIndexOf](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf) - - - -## map(arr, callback, [thisObj]]):Array - -Crossbrowser `Array.map()`. - -Creates a new array with the results of calling a provided function on every -element in this array. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -See: [`collect()`](#collect) - -```js -var nums = [1,2,3,4]; -var double = map(nums, function(val, key, arr){ - return val * 2; -}); -// > [2, 4, 6, 8] -``` - -more info at [MDN Array#map](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/map) - -It also supports a shorthand notation which can be used to achieve same result -as [`array/pluck`](#pluck): - -```js -var src = ['lorem', 'ipsum', 'foo', 'amet']; -// grab the "length" property of all items -var lengths = map(src, 'length'); // [5, 5, 3, 4] -``` - - - -## max(arr, [iterator], [thisObj]):* - -Returns maximum value inside array or use a custom iterator to define how items -should be compared. - -See: [`min()`](#min) - -```js -max([10, 2, 7]); // 10 -max(['foo', 'lorem', 'amet'], function(val){ - return val.length; -}); // 'lorem' -``` - -It also supports a shorthand notation: - -```js -max(['foo', 'lorem', 'amet'], 'length'); // "lorem" -``` - - - -## min(arr, [iterator], [thisObj]):* - -Returns minimum value inside array or use a custom iterator to define how items -should be compared. - -See: [`max()`](#max) - -```js -min([10, 2, 7]); // 2 -min(['foo', 'lorem', 'amet'], function(val){ - return val.length; -}); // 'foo' -``` - -It also supports a shorthand notation: - -```js -min(['foo', 'lorem', 'amet'], 'length'); // "foo" -``` - - - -## pick(arr):* - -Gets a random item and remove it from the array. - -### Example: - - var arr = [1, 2, 3, 4, 5, 6]; - var item_1 = pick(arr); // 4 - var item_2 = pick(arr); // 1 - console.log(arr); // [2, 3, 5, 6] - - - -## pluck(arr, propName):Array - -Extract a list of property values. - -See: [`function/prop()`](function.html#prop) - -```js -var users = [{name : 'John', age: 21}, {name: 'Jane', age : 27}]; -var names = pluck(users, 'name'); // ["John", "Jane"] -var ages = pluck(users, 'age'); // [21, 27] -``` - - - -## range([start], stop[, step]):Array - -Creates a new Array with all the values inside the range. Works similarly to -Python#range or PHP#range. - -### Arguments - - 1. `[start]` (Number) : Range start. Default is `0`. - 2. `stop` (Number) : Range limit. - 3. `[step]` (Number) : Step size. Default is `1`. - -### Example - -```js -range(5); // [0, 1, 2, 3, 4, 5] -range(0, 5); // [0, 1, 2, 3, 4, 5] -range(0, 5, 2); // [0, 2, 4] -range(20, 40, 5); // [20, 25, 30, 35, 40] -``` - - - -## reduce(arr, fn):* - -Crossbrowser `Array.reduce()`. - -Apply a function against an accumulator and each value of the array (from -left-to-right) as to reduce it to a single value. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -more info at [MDN Array#reduce](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduce) - - - -## reduceRight(arr, fn):* - -Crossbrowser `Array.reduceRight()`. - -Apply a function simultaneously against two values of the array (from -right-to-left) as to reduce it to a single value. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -more info at [MDN Array#reduceRight](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduceRight) - - - -## reject(arr, fn, thisObj):Array - -Creates a new array with all the elements that do **not** pass the truth test. -Opposite of [`filter()`](#filter). - -See [`filter()`](#filter) - -### Example - -```js -var numbers = [1, 2, 3, 4, 5, 6]; -reject(numbers, function(x) { return (x % 2) !== 0; }); // [2, 4, 6] -``` - -It also supports a shorthand syntax: - -```js -var users = [ - {name:'john', surname:'connor', beard:false}, - {name:'john', surname:'doe', beard:true}, - {name:'jane', surname:'doe', beard:false} -]; -// reject items that matches all properties/values pairs -reject(arr, {name:'john'}); -// > [{name:'jane', surnname:'doe', beard:false}] -// reject items where 'beard' is a truthy value -filter(arr, 'beard'); -// > [{name:'john', surnname:'connor', beard:false}, -// {name:'jane', surname:'doe', beard:false}] -``` - - - -## remove(arr, item):void - -Remove a single item from the array. - -IMPORTANT: it won't remove duplicates, just a single item. - -### Example - -```js -var foo = [1, 2, 3, 4]; -remove(foo, 2); -console.log(foo); // [1, 3, 4] -``` - - - -## removeAll(arr, item):void - -Remove all instances of an item from the array. - -### Example - -```js -var foo = [1, 2, 3, 4, 2, 2]; -removeAll(foo, 2); -console.log(foo); // [1, 3, 4]; -``` - - - -## shuffle(arr):Array - -Returns a new Array with items randomly sorted (shuffled). Similar to Ruby Array#shuffle. - -### Example - -```js -var arr = ['a', 'b', 'c', 'd', 'e']; -shuffle(arr); // ['b', 'd', 'e', 'c', 'a'] -``` - - - -## some(arr, callback, [thisObj]):Array - -Crossbrowser `Array.some()`. - -Tests whether some element in the array passes the test implemented by the provided function. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -```js -var items = [1, 'foo', 'bar']; -some(items, isString); // true -some(items, isFunction); // false -``` - -more info at [MDN Array#some](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some) - -It also supports a shorthand syntax: - -```js -var items = [{id:1, active:true}, {id:3, active:false}, {id:8, active:false}]; -// at least one item with `id === 8` -some(items, {id:8}); // true -// `active` is truthy on at least one item -some(items, 'active'); // true -``` - -see also: [`object/matches`](object.html#matches) - - - -## sort(arr, [compareFn]):Array - -Returns a sorted Array using the [Merge Sort](http://en.wikipedia.org/wiki/Merge_sort) algorithm (stable sort). - -The `Array.prototype.sort` browser implementations differ since the sorting algorithm isn't described in the ES spec - [in V8 it isn't stable](http://code.google.com/p/v8/issues/detail?id=90) and [on Firefox it is stable](https://bugzilla.mozilla.org/show_bug.cgi?id=224128) - so this function doesn't use the browser native implementation and is recommended in cases where a stable sort is required (items should preserve same order if already sorted). - -**Important:** It does logical comparisson by default (greater/less than) and -not a string comparisson like the native `Array#sort`. - -### compareFn - -If `compareFn` is supplied elements are sorted based on the value returned by -the `compareFn`. - - - If `compareFn(a, b)` is less than `0`, sort `a` to a lower index than `b`. - - If `compareFn(a, b)` returns `0`, leave `a` and `b` unchanged with respect - to each other, but sorted with respect to all different elements. - - If `compareFn(a, b)` is greater than `0`, sort `b` to a lower index than - `a`. - -### Example - -```js -sort([187, 23, 47, 987, 12, 59, 0]); // [0, 12, 23, 47, 59, 187, 987] -sort(['a', 'z', 'c', 'beta', 'b']); // ['a', 'b', 'beta', 'c', 'z'] - -// ['sit', 'amet', 'lorem', 'ipsum'] -sort(['lorem', 'ipsum', 'sit', 'amet'], function(a, b){ - // sort by length, items with same length - // will keep the relative order (stable) - return a.length - b.length; -}); - -// [4, 3, 2, 1] -sort([2, 3, 1, 4], function(a, b){ - // reverse sort - return b - a; -}); -``` - - - -## split(arr, [segments]):Array - -Splits an array into a fixed number of segments. - -The number of segments is specified by `segments` and defaults to 2. If the -array cannot be evenly split, the first segments will contain the extra items. -If `arr` is empty, an empty array is returned. If `arr.length` is less than -`segments`, then the resulting array will have `arr.length` number of -single-element arrays. - -### Example -```js -split([1, 2, 3, 4, 5], 3) // [ [1, 2], [3, 4], [5] ] -split([1, 2, 3, 4, 5]) // [ [1, 2, 3], [4, 5] ] -split([]) // [] -split([1, 2], 3) // [ [1], [2] ] -``` - - - -## toLookup(arr, key):Object - -Create an object that indexes the items in the array by a key. If `key` is a function, the key for each value in the resulting object will be the result of calling the function with the value as an argument. Otherwise `key` specifies the property on each value to use as the key. - -### Example - -```js -var foo = [{ name: 'a', thing: 1 }, { name: 'b', thing: 2 }]; -// { a: { name: 'a', thing: 1 }, b: { name: 'b', thing: 2 } } -toLookup(foo, 'name'); -// same as above -toLookup(foo, function (value) { return value.name; }); -``` - - - -## union(...arrs):Array - -Concat multiple arrays removing duplicates. - -```js -var a = ['a', 'b'], - b = ['c', 'a'], - c = [1, 'b', 2, 3, 'a']; - -//note that unique remove from begin to end -union(a, b, c); // ['c', 1, 'b', 2, 3, 'a'] -``` - - - -## unique(arr):Array - -Return a new Array of unique items. - -### Example - -```js -var foo = [1, 2, 3, 4, 2, 2, 3, 4]; -var bar = unique(foo); -console.log(foo); // [1, 2, 3, 4]; -``` - - - -## xor(arr1, arr2):Array - -Exclusive OR. Returns items that are present in a single array. - -Works like [Python set#symmetric_difference](http://docs.python.org/library/stdtypes.html#set.symmetric_difference) renamed for brevity. - -It will remove duplicates. - -See: [`difference()`](#difference), [`intersection()`](#intersection) - -```js -var a = ['a', 'b', 1]; -var b = ['c', 1]; -xor(a, b); // ['a', 'b', 'c'] -``` - - - -## zip(...arrs):Array - -Groups the elements of each array at their corresponding indexes. - -Useful for separate data sources that are coordinated through matching array -indexes. For a matrix of nested arrays, `zip.apply(...)` can transpose the -matrix in a similar fashion. - -```js -// [['moe', 30, true], ['larry', 40, false], ['curly', 50, false]] -zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]); -``` - - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/collection.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/collection.md deleted file mode 100644 index 2ffcab10..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/collection.md +++ /dev/null @@ -1,233 +0,0 @@ -# collection # - -Methods for dealing with collections (Array or Objects). - - - -## contains(list, value):Boolean - -Checks if collection contains value. - -```js -contains({a: 1, b: 2, c: 'bar'}, 2); // true -contains([1, 2, 3], 'foo'); // false -``` - -See: [array/contains](array.html#contains), [object/contains](object.html#contains) - - - -## every(list, callback, [thisObj]):Boolean - -Tests whether all values in the collection pass the test implemented by the -provided callback. - -```js -var obj = { - a: 1, - b: 2, - c: 3, - d: 'string' -}; - -every(obj, isNumber); // false -``` - -See: [array/every](array.html#every), [object/every](object.html#every) - - - -## filter(list, callback, [thisObj]):Array - -Filter collection properties. - -See: [array/filter](array.html#filter), [object/filter](object.html#filter) - - - -## find(list, callback, [thisObj]):* - -Loops through all the values in the collection and returns the first one that -passes a truth test (callback). - -**Important:** loop order over objects properties isn't guaranteed to be the -same on all environments. - -```js -find({a: 'foo', b: 12}, isString); // 'foo' -find(['foo', 12], isNumber); // 12 -``` - -See: [array/find](array.html#find), [object/find](object.html#find) - - - -## forEach(list, callback, [thisObj]) - -Loop through all values of the collection. - -See: [array/forEach](array.html#forEach), [object/forOwn](object.html#forOwn) - - - -## map(list, callback, [thisObj]):Array - -Returns a new collection where the properties values are the result of calling -the callback for each property in the original collection. - -See: [array/map](array.html#map), [object/map](object.html#map) - - - -## max(list, [iterator]):* - -Returns maximum value inside collection or use a custom iterator to define how -items should be compared. - -See: [`min()`](#min), [array/max](array.html#max), [object/max](object.html#max) - -```js -max({a: 100, b: 2, c: 1, d: 3, e: 200}); // 200 -max(['foo', 'lorem', 'amet'], function(val){ - return val.length; -}); // 'lorem' -``` - - - -## min(list, [iterator]):* - -Returns minimum value inside collection or use a custom iterator to define how -items should be compared. - -See: [`max()`](#max), [array/min](array.html#min), [object/min](object.html#min) - -```js -min([10, 2, 7]); // 2 -min({a: 'foo', b: 'lorem', c: 'amet'}, function(val){ - return val.length; -}); // 'foo' -``` - - - -## pluck(list, propName):Array - -Extract a list of property values. - -```js -var users = [ - { - name : 'John', - age : 21 - }, - { - name : 'Jane', - age : 27 - } -]; - -pluck(users, 'name'); // ["John", "Jane"] -pluck(users, 'age'); // [21, 27] - -users = { - first: { - name : 'John', - age : 21 - }, - second: { - name : 'Mary', - age : 25 - } -}; - -pluck(users, 'name'); // ['John', 'Mary'] -``` - -See: [array/pluck](array.html#pluck), [object/pluck](object.html#pluck) - - - -## reduce(list, callback, initial, [thisObj]):* - -Apply a function against an accumulator and each value in the collection as to -reduce it to a single value. - -```js -var obj = {a: 1, b: 2, c: 3, d: 4}; - -function sum(prev, cur, key, list) { - return prev + cur; -} - -reduce(obj, sum); // 10 -``` - -See: [array/reduce](array.html#reduce), [object/reduce](object.html#reduce) - - - -## reject(list, fn, [thisObj]):Array - -Creates a new array with all the elements that do **not** pass the truth test. -Opposite of [`filter()`](#filter). - -### Example - -```js -var numbers = [1, 2, 3, 4, 5]; -reject(numbers, function(x) { return (x % 2) !== 0; }); // [2, 4] - -var obj = {a: 1, b: 2, c: 3, d: 4, e: 5}; -reject(obj, function(x) { return (x % 2) !== 0; }); // [2, 4] -``` - -See: [array/reject](array.html#reject), [object/reject](object.html#reject) - - - -## size(list):Number - -Returns the number of values in the collection. - -```js -var obj = { - foo : 1, - bar : 2, - lorem : 3 -}; -size(obj); // 3 -size([1,2,3]); // 3 -size(null); // 0 -``` - -See: [object/size](object.html#size) - - - -## some(list, callback, [thisObj]):Boolean - -Tests whether any values in the collection pass the test implemented by the -provided callback. - -```js -var obj = { - a: 1, - b: 2, - c: 3, - d: 'string' -}; - -some(obj, isNumber); // true -some(obj, isString); // true -some([1, 2, 3], isNumber) // true -some([1, 2, 3], isString) // false -``` - -See: [array/some](array.html#some), [object/some](object.html#some) - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/date.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/date.md deleted file mode 100644 index b3f7f40e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/date.md +++ /dev/null @@ -1,295 +0,0 @@ -# date # - -Date utilities. - - -## dayOfTheYear(date):Number - -How many days elapsed since begining of the year (following gregorian -calendar). - -```js -// Jan 1st -dayOfTheYear(new Date(2013, 0, 1)); // 1 -// Dec 31th -dayOfTheYear(new Date(2013, 11, 31)); // 364 -``` - - - -## diff(date1, date2, [unitName]):Number - -Calculate the difference between dates (range). - -The returned value is always positive. The default `unitName` is `"ms"`. - -Available units: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`, -`millisecond`. - -See: [`time/convert()`](time.html#convert) - -```js -var d1 = new Date(2012, 4, 5); -var d2 = new Date(2013, 4, 8); -diff(d1, d2); // 31795200000 -diff(d1, d2, 'hour'); // 8832 -diff(d1, d2, 'week'); // 52.57142857142857 -diff(d1, d2, 'month'); // 12.096774193548388 -diff(d1, d2, 'year'); // 1.0082191780821919 -``` - - - -## isLeapYear(fullYear|date):Boolean - -Checks if it's a [leap year](http://en.wikipedia.org/wiki/Leap_year) according -to the Gregorian calendar. - -see: [`totalDaysInMonth()`](#totalDaysInMonth) - -```js -isLeapYear(2012); // true -isLeapYear(2013); // false -isLeapYear(new Date(2012, 2, 28)); // true -``` - - -## isSame(date1, date2[, period]):Boolean - -Check if both dates are the "same". - -You can pass an optional *period* used to set the comparisson precision. - -Available periods: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`. - -```js -var date1 = new Date(2013, 1, 3); -var date2 = new Date(2013, 2, 9); -isSame(date1, date2); // false -isSame(date1, date2, 'day'); // false -isSame(date1, date2, 'month'); // false -isSame(date1, date2, 'year'); // true -``` - - - -## parseIso(str):Number - -Parses an [ISO8601](http://en.wikipedia.org/wiki/Iso8601) date and returns the -number of milliseconds since January 1, 1970, 00:00:00 UTC, or `NaN` if it is -not a valid ISO8601 date. - -This parses *all* ISO8601 dates, including dates without times, [ordinal -dates](https://en.wikipedia.org/wiki/ISO_8601#Ordinal_dates), and the compact -representation (omitting delimeters). The only exception is [ISO week -dates](https://en.wikipedia.org/wiki/ISO_week_date), which are not parsed. - -If no time zone offset is specified, it assumes UTC time. - -```js -// Jan 01, 1970 00:00 GMT -parseIso('1970-01-01T00:00:00') // 0 -parseIso('1970-001') // 0 -parseIso('1970-01-01') // 0 -parseIso('19700101T000000.00') // 0 -parseIso('1970-01-01T02:00+02:00') // 0 - -// Jan 02, 2000 20:10 GMT+04:00 -parseIso('2000-01-02T20:10+04:00') // 946829400000 -``` - - - -## startOf(date, period):Date - -Get a new Date at the start of the period. - -Available periods: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`. - -```js -// Apr 05 2013 11:27:43 -var date = new Date(2013, 3, 5, 11, 27, 43, 123); -startOf(date, 'year'); // Jan 01 2013 00:00:00 -startOf(date, 'month'); // Apr 01 2013 00:00:00 -startOf(date, 'day'); // Apr 05 2013 00:00:00 -startOf(date, 'hour'); // Apr 05 2013 11:00:00 -``` - - - -## strftime(date, format, [l10n]):String - -Format date based on strftime format. - -Replaced tokens: - -<dl> -<dt>%a</dt><dd> locale's abbreviated weekday name.</dd> -<dt>%A</dt><dd> locale's full weekday name.</dd> -<dt>%b</dt><dd> locale's abbreviated month name.</dd> -<dt>%B</dt><dd> locale's full month name.</dd> -<dt>%c</dt><dd> locale's appropriate date and time representation.</dd> -<dt>%C</dt><dd> century number (the year divided by 100 and truncated -to an integer) as a decimal number [00..99].</dd> -<dt>%d</dt><dd> day of the month as a decimal number [01..31].</dd> -<dt>%D</dt><dd>same as %m/%d/%y.</dd> -<dt>%e</dt><dd> day of the month as a decimal number [1..31]; -a single digit is preceded by a space.</dd> -<dt>%F</dt><dd>The ISO 8601 date format (%Y-%m-%d)</dd> -<dt>%h</dt><dd>same as %b.</dd> -<dt>%H</dt><dd> hour (24-hour clock) as a decimal number [00..23].</dd> -<dt>%I</dt><dd> hour (12-hour clock) as a decimal number [01..12].</dd> -<dt>%j</dt><dd> day of the year as a decimal number [001..366].</dd> -<dt>%L</dt><dd> zero-padded milliseconds [000..999]</dd> -<dt>%m</dt><dd> month as a decimal number [01..12].</dd> -<dt>%M</dt><dd> minute as a decimal number [00..59].</dd> -<dt>%n</dt><dd> newline character.</dd> -<dt>%p</dt><dd> locale's equivalent of either "am" or "pm"</dd> -<dt>%P</dt><dd> locale's equivalent of either "AM" or "PM"</dd> -<dt>%r</dt><dd> time in a.m. and -p.m. notation; in the POSIX locale this is equivalent to %I:%M:%S %p.</dd> -<dt>%R</dt><dd> time in 24 hour notation (%H:%M).</dd> -<dt>%s</dt><dd> seconds since Epoch (1970-01-01 00:00:00 UTC)</dd> -<dt>%S</dt><dd> second as a decimal number [00..60].</dd> -<dt>%t</dt><dd> tab character.</dd> -<dt>%T</dt><dd> time (%H:%M:%S).</dd> -<dt>%u</dt><dd> weekday as a decimal number [1..7], with 1 representing -Monday.</dd> -<dt>%U</dt><dd> week number of the year (Sunday as the first day of -the week) as a decimal number [00..53].</dd> -<del><dt>%V</dt><dd> week number of the year (Monday as the first day of the -week) as a decimal number [01..53]. If the week containing 1 January has -four or more days in the new year, then it is considered week 1. Otherwise, -it is the last week of the previous year, and the next week is week 1.</dd></del> -<dt>%w</dt><dd> weekday as a decimal number [0..6], with 0 representing -Sunday.</dd> -<dt>%W</dt><dd> week number of the year (Monday as the first day of -the week) as a decimal number [00..53]. All days in a new year preceding -the first Monday are considered to be in week 0.</dd> -<dt>%x</dt><dd> locale's appropriate date representation.</dd> -<dt>%X</dt><dd> locale's appropriate time representation.</dd> -<dt>%y</dt><dd> year without century as a decimal number [00..99].</dd> -<dt>%Y</dt><dd> year with century as a decimal number.</dd> -<dt>%Z</dt><dd> timezone name or abbreviation, or by no bytes -if no timezone information exists.</dd> -<dt>%%</dt><dd>is replaced by %.</dd> -</dl> - -```js -var date = new Date(2013, 3, 8, 9, 2, 4); -strftime(date, '%Y-%m-%d'); // "2013-04-08" -strftime(date, '%R'); // "09:02" -strftime(date, '%Y-%m-%dT%H:%M:%S%z'); // "2013-04-08T09:02:04+0000" -``` - -You can also set a custom locale: - -```js -var ptBr = require('mout/date/i18n/pt-BR'); -strftime(date, '%a, %d %b', ptBr); // 'Seg, 08 Abr' -strftime(date, '%A, %d %B', ptBr); // 'Segunda, 08 Abril' -``` - -To set it globally: - -```js -require('mout/date/i18n_').set( customLocaleData ); -``` - -See [date/i18n](https://github.com/mout/mout/tree/master/src/date/i18n) -for localization examples. - - - -## timezoneAbbr(date):String - -Return timezone abbreviation or similar data. - -The result will vary based on the OS/browser since some environments doesn't -provide enough info about the current locale. - -```js -// IE 7-8 -timezoneAbbr(new Date()); // "-0500" -// Chrome, FF, V8 -timezoneAbbr(new Date()); // "EST" -``` - - - -## timezoneOffset(date):String - -Return time zone as hour and minute offset from UTC (e.g. +0900). - -It's important to note that JavaScript Date object will use the system locale -info to determinate the [timezone -offset](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset) -and that daylight saving time affects the result. - -```js -// if system locale is EST -timezoneOffset(new Date()); // -0500 -``` - - - -## totalDaysInMonth(fullYear, monthIndex):Number - -Returns the amount of days in the month taking into consideration leap years -(following Gregorian calendar). - -see: [`isLeapYear()`](#isLeapYear) - -```js -totalDaysInMonth(2008, 1); // 29 (leap year) -totalDaysInMonth(2009, 1); // 28 - -// you can also pass a Date object as single argument -totalDaysInMonth( new Date(2013, 0, 1) ); // 31 -``` - - -## totalDaysInYear(fullYear):Number - -Returns the amount of days in the year taking into consideration leap years -(following Gregorian calendar). - -see: [`isLeapYear()`](#isLeapYear), [`totalDaysInMonth()`](#totalDaysInMonth) - -```js -totalDaysInYear(2008); // 366 (leap year) -totalDaysInYear(2009); // 365 - -// you can also pass a Date object as single argument -totalDaysInYear( new Date(2013, 0, 1) ); // 365 -``` - - - -## weekOfTheYear(date, [firstDayOfWeek]):Number - -Returns how many weeks elapsed since start of the year (`0..53`). - -`firstDayOfWeek` can be `0` (Sunday) or `1` (Monday). By default weeks start at -Sunday. - -It will return `0` if `date` is before the first `firstDayOfWeek` of the year. - -```js -// Tue Jan 01 2013 -weekOfTheYear( new Date(2013,0,1) ); // 0 -// Wed Jan 09 2013 -weekOfTheYear( new Date(2013,0,9) ); // 1 -// Sun Jan 01 2012 -weekOfTheYear( new Date(2012,0,1) ); // 1 -// Mon Jan 09 2012 -weekOfTheYear( new Date(2012,0,9) ); // 2 -``` - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/function.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/function.md deleted file mode 100644 index 2695a025..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/function.md +++ /dev/null @@ -1,174 +0,0 @@ -# function # - -Function*(al)* utilities. - - - -## bind(fn, context, [...args]):Function - -Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. - -### Arguments - - 1. `fn` (Function) : Target Function - 2. `context` (Object) : Execution context (object used as `this`) - 3. `[...args]` (*) : Arguments (0...n arguments) - -See: [`partial()`](#partial), [object/bindAll](./object.html#bindAll) - - - -## compose(...fn):Function - -Returns the composition of a list of functions, where each function consumes -the return value of the function that follows. In math terms, composing the -functions `f()`, `g()`, and `h()` produces `f(g(h()))`. - -```js -function add2(x) { return x + 2 } -function multi2(x) { return x * 2 } -map([1, 2, 3], compose(add2, multi2)); // [4, 6, 8] - -//same as -map([1, 2, 3], function(x){ - return add2( multi2(x) ); -}); -``` - - - -## debounce(fn, delay[, isAsap]):Function - -Creates a function that will delay the execution of `fn` until after `delay` -milliseconds have elapsed since the last time it was invoked. - -Subsequent calls to the debounced function will return the result of the last -`fn` call. - -```js -// sometimes less is more -var lazyRedraw = debounce(redraw, 300); -foo.on.resize.add(lazyRedraw); -``` - -In this visualization, `|` is a debounced-function call and `X` is the actual -callback execution: - - Default - ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| - X X - - Debounced with `isAsap == true`: - ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| - X X - -See: [`throttle()`](#throttle) - - -## func(name):Function - -Returns a function that calls a method with given `name` on supplied object. -Useful for iteration methods like `array/map` and `array/forEach`. - -See: [`prop()`](#prop) - -```js -// will call the method `getName()` for each `user` -var names = map(users, func('getName')); -``` - - - -## partial(fn, [...args]):Function - -Return a partially applied function supplying default arguments. - -This method is similar to [`bind`](#bind), except it does not alter the this -binding. - -### Arguments - - 1. `fn` (Function) : Target Function - 3. `[...args]` (*) : Arguments (0...n arguments) - -See: [`bind()`](#bind) - -```js -function add(a, b){ return a + b } -var add10 = partial(add, 10); -console.log( add10(2) ); // 12 -``` - - - -## prop(name):Function - -Returns a function that gets a property with given `name` from supplied object. -Useful for using in conjunction with `array/map` and/or for creating getters. - -See: [`array/pluck()`](array.html#pluck) - -```js -var users = [{name:"John", age:21}, {name:"Jane", age:25}]; -// ["John", "Jane"] -var names = map(users, prop('name')); -``` - - - -## series(...fn):Function - -Returns a function that will execute all the supplied functions in order and -passing the same parameters to all of them. Useful for combining multiple -`array/forEach` into a single one and/or for debugging. - - -```js -// call `console.log()` and `doStuff()` for each item item in the array -forEach(arr, series(console.log, doStuff)); -``` - - - -## throttle(fn, interval):Function - -Creates a function that, when executed, will only call the `fn` function at -most once per every `interval` milliseconds. - -If the throttled function is invoked more than once during the wait timeout, -`fn` will also be called on the trailing edge of the timeout. - -Subsequent calls to the throttled function will return the result of the last -`fn` call. - -```js -// sometimes less is more -var lazyRedraw = throttle(redraw, 300); -foo.on.resize.add(lazyRedraw); -``` - -In this visualization, `|` is a throttled-function call and `X` is the actual -`fn` execution: - - ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| - X X X X X X X X X X X X - -See: [`debounce()`](#debounce) - - -## timeout(fn, millis, context, [...args]):Number - -Functions as a wrapper for `setTimeout`. Calls a the function `fn` after a given delay `millis` in milliseconds. -The function is called within the specified context. The return value can be used to clear the timeout using `clearTimeout`. - -```js -var id = timeout(doStuff, 300, this); - -clearTimeout(id); -``` - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/lang.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/lang.md deleted file mode 100644 index 56d7879b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/lang.md +++ /dev/null @@ -1,385 +0,0 @@ -# lang # - -Language Utilities. Easier inheritance, scope handling, type checks. - - - -## clone(val):* - -Clone native types like Object, Array, RegExp, Date and primitives. - -This method will not clone values that are referenced within `val`. It will -only copy the value reference to the new value. If the value is not a plain -object but is an object, it will return the value unchanged. - -### Example - -```js -var a = { foo: 'bar' }; -var b = clone(a); -console.log(a === b); // false -console.log(a.foo === b.foo); // true - -var c = [1, 2, 3]; -var d = clone(b); -console.log(c === d); // false -console.log(c); // [1, 2, 3] -``` - -See: [`deepClone()`](#deepClone) - - - -## createObject(parent, [props]):Object - -Create Object using prototypal inheritance and setting custom properties. - -Mix between [Douglas Crockford Prototypal Inheritance](http://javascript.crockford.com/prototypal.html) and the EcmaScript 5 `Object.create()` method. - -### Arguments - - 1. `parent` (Object) : Parent Object - 2. `[props]` (Object) : Object properties - -### Example - -```js -var base = { - trace : function(){ - console.log(this.name); - } -}; - -var myObj = createObject(base, { - name : 'Lorem Ipsum' -}); - -myObject.trace(); // "Lorem Ipsum" -``` - - - -## ctorApply(constructor, args):Object - -Do `Function.prototype.apply()` on a constructor while maintaining prototype -chain. - -```js -function Person(name, surname) { - this.name = name; - this.surname = surname; -} - -Person.prototype.walk = function(){ - console.log(this.name +' is walking'); -}; - -var args = ['John', 'Doe']; - -// "similar" effect as calling `new Person("John", "Doe")` -var john = ctorApply(Person, args); -john.walk(); // "John is walking" -``` - - - -## deepClone(val, [instanceClone]):* - -Deep clone native types like Object, Array, RegExp, Date and primitives. - -The `instanceClone` function will be invoked to clone objects that are not -"plain" objects (as defined by [`isPlainObject`](#isPlainObject)) if it is -provided. If `instanceClone` is not specified, it will not attempt to clone -non-plain objects, and will copy the object reference. - -### Example - -```js -var a = {foo:'bar', obj: {a:1, b:2}}; -var b = deepClone(a); // {foo:'bar', obj: {a:1, b:2}} -console.log( a === b ); // false -console.log( a.obj === b.obj ); // false - -var c = [1, 2, [3, 4]]; -var d = deepClone(c); // [1, 2, [3, 4]] -var e = c.concat(); // [1, 2, [3, 4]] - -console.log( c[2] === d[2] ); // false -// concat doesn't do a deep clone, arrays are passed by reference -console.log( e[2] === d[2] ); // true - -function Custom() { } -function cloneCustom(x) { return new Custom(); } -var f = { test: new Custom() }; -var g = deepClone(f, cloneCustom); -g.test === f.test // false, since new Custom instance will be created -``` - -See: [`clone()`](#clone) - - - -## defaults(val, ...defaults):void - -Return first value that isn't `null` or `undefined`. - - function doSomethingAwesome(foo, bar) { - // default arguments - foo = defaults(foo, 'lorem'); - bar = defaults(bar, 123); - // ... - } - - - -## inheritPrototype(child, parent):void - -Inherit prototype from another Object. - -```js -function Foo(name){ - this.name = name; -} -Foo.prototype = { - getName : function(){ - return this.name; - } -}; - -function Bar(name){ - this.name = name; -} -//should be called before calling constructor -inheritPrototype(Bar, Foo); - -var myObj = new Bar('lorem ipsum'); -myObj.getName(); // "lorem ipsum" -``` - - -## is(x, y):Boolean - -Check if both values are identical/egal. - -```js -// wtfjs -NaN === NaN; // false --0 === +0; // true - -is(NaN, NaN); // true -is(-0, +0); // false -is('a', 'b'); // false -``` - -See: [`isnt()`](#isnt) - - - -## isnt(x, y):Boolean - -Check if both values are not identical/egal. - -```js -// wtfjs -NaN === NaN; // false --0 === +0; // true - -isnt(NaN, NaN); // false -isnt(-0, +0); // true -isnt('a', 'b'); // true -``` - -See: [`is()`](#is) - - - - -## isArguments(val):Boolean - -If value is an "Arguments" object. - - - -## isArray(val):Boolean - -If value is an Array. Uses native ES5 `Array.isArray()` if available. - - - -## isBoolean(val):Boolean - -If value is a Boolean. - - - -## isDate(val):Boolean - -If value is a Date. - - - -## isEmpty(val):Boolean - -Checks if Array/Object/String is empty. - - -```js -isEmpty(''); // true -isEmpty('bar'); // false -isEmpty([]); // true -isEmpty([1, 2]); // false -isEmpty({}); // true -isEmpty({a:1, b:2}); // false -``` - - -## isFinite(val):Boolean - -Checks if value is Finite. - -Note: This is not the same as native `isFinite`, which will return `true` for -booleans and empty strings. See http://es5.github.com/#x15.1.2.5. - - - -## isFunction(val):Boolean - -If value is a Function. - - - -## isKind(val, kind):Boolean - -If value is of "kind". (used internally by some of the *isSomething* checks). - -Favor the other methods since strings are commonly mistyped and also because -some "kinds" can only be accurately checked by using other methods (e.g. -`Arguments`), some of the other checks are also faster. - -```js -isKind([1,2], 'Array'); // true -isKind(3, 'Array'); // false -isKind(3, 'Number'); // true -``` - -See: [`kindOf()`](#kindOf) - - - -## isInteger(val):Boolean - -Check if value is an integer. - -```js -isInteger(123); // true -isInteger(123.45); // false -isInteger({}); // false -isInteger('foo'); // false -isInteger('123'); // false -``` - - - -## isNaN(val):Boolean - -Check if value is `NaN`. - -Note: This is not the same as native `isNaN`, which will return `true` for -`undefined` and other values. See [ES5 isNaN](http://es5.github.com/#x15.1.2.4) - - - -## isNull(val):Boolean - -If value is `null`. - - - -## isNumber(val):Boolean - -If value is a Number. - - - -## isObject(val):Boolean - -If value is an Object. - - - -## isPlainObject(val):Boolean - -If the value is an Object created by the Object constructor. - - - -## isRegExp(val):Boolean - -If value is a RegExp. - - - -## isString(val):Boolean - -If value is a String. - - - -## isUndefined(val):Boolean - -If value is `undefined`. - - - -## kindOf(val):String - -Gets kind of value (e.g. "String", "Number", "RegExp", "Null", "Date"). -Used internally by `isKind()` and most of the other *isSomething* checks. - -```js -kindOf([1,2]); // "Array" -kindOf('foo'); // "String" -kindOf(3); // "Number" -``` - -See: [`isKind()`](#isKind) - - -## toArray(val):Array - -Convert array-like object into Array or wrap value into Array. - -```js -toArray({ - "0" : "foo", - "1" : "bar", - "length" : 2 -}); // ["foo", "bar"] - -function foo(){ - return toArray(arguments); -} -foo("lorem", 123); // ["lorem", 123] - -toArray("lorem ipsum"); // ["lorem ipsum"] -toArray(window); // [window] -toArray({foo:"bar", lorem:123}); // [{foo:"bar", lorem:123}] -``` - -See: object/values() - - - -## toString(val):String - -Convert any value to its string representation. - -Will return an empty string for `undefined` or `null`, otherwise will convert -the value to its string representation. - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/math.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/math.md deleted file mode 100644 index f45be3ed..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/math.md +++ /dev/null @@ -1,298 +0,0 @@ -# math # - -Math utilities. - - -## ceil(val[, step]):Number - -Round value up to full steps. Similar to `Math.ceil()` but can round value -to an arbitrary *radix*. - - ceil(7.2); // 8 - ceil(7.8); // 8 - ceil(7, 5); // 10 - ceil(11, 5); // 15 - ceil(15, 5); // 15 - -### Common use cases - -Round values by increments of 5/10/1000/etc. - -See: [`round()`](#round), [`floor()`](#floor), [`countSteps()`](#countSteps) - - - -## clamp(val, min, max):Number - -Clamps value inside range. - -`clamp()` is extremely useful in cases where you need to limit a value inside -a certain range. So instead of doing a complex `if/else` to filter/process the -value you can restrict it to always be inside the desired range: - - clamp(-5, 0, 10); // 0 - clamp(7, 1, 10); // 7 - clamp(8, 1, 10); // 8 - clamp(10, 1, 10); // 10 - clamp(11, 1, 10); // 10 - -If the value is smaller than `min` it returns the `min`, if `val` is higher -than `max` it returns `max`. - -### Common use cases - -Any situation where you need to limit a number inside a range like: slider -position, image galleries <small>(so user can't skip to an image that doesn't -exist)</small>, drag and drop, scroll boundaries, etc. - -See: [`loop()`](#loop) - - - - -## countSteps(val, step[, overflow]):Number - -Count number of full steps. - -### Arguments: - - 1. `val` (Number) : Value. - 2. `step` (Number) : Step size. - 3. `[overflow]` (Number) : Maximum number of steps, nSteps will loop if -`>=` than overflow. - - -Count steps is very useful for cases where you need to know how many "full -steps" the number *completed*. Think of it as a division that only returns -integers and ignore remainders. - - countSteps(3, 5); // 0 - countSteps(6, 5); // 1 - countSteps(12, 5); // 2 - countSteps(18, 5); // 3 - countSteps(21, 5); // 4 - -You can also set an `overflow` which will reset the *counter* before reaching -this number. - - countSteps(3, 5, 3); // 0 - countSteps(6, 5, 3); // 1 - countSteps(12, 5, 3); // 2 - countSteps(18, 5, 3); // 0 - countSteps(21, 5, 3); // 1 - -### Common use cases - -#### How many items fit inside an area: - - var containerWidth = 100; - var itemWidth = 8; - var howManyFit = countSteps(containerWidth, itemWidth); // 12 - -#### Split value into different scales or convert value from one scale to another - -From [mout/time/parseMs](time.html#parseMs): - - function parseMs(ms){ - return { - milliseconds : countSteps(ms, 1, 1000), - seconds : countSteps(ms, 1000, 60), - minutes : countSteps(ms, 60000, 60), - hours : countSteps(ms, 3600000, 24), - days : countSteps(ms, 86400000) - }; - } - - // {days:27, hours:4, minutes:26, seconds:5, milliseconds:454} - parseMs(2348765454); - - - -## floor(val[, step]):Number - -Round value down to full steps. Similar to `Math.floor()` but can round value -to an arbitrary *radix*. (formerly `snap`) - - floor(7.2); // 7 - floor(7.8); // 7 - floor(7, 5); // 5 - floor(11, 5); // 10 - floor(15, 5); // 15 - -### Common use cases - -Round values by increments of 5/10/1000/etc. - -See: [`round()`](#round), [`ceil()`](#ceil), [`countSteps()`](#countSteps) - - - -## inRange(val, min, max[, threshold]):Boolean - -Checks if value is inside the range. - - inRange(-6, 1, 10); // false - inRange( 5, 1, 10); // true - inRange(12, 1, 10); // false - -The threshold can be useful when you want granular control of what should match -and/or the precision could change at runtime or by some configuration option, -avoids the clutter of adding/subtracting the `threshold` from `mix` and `max`. - - inRange(12, 1, 10, 2); // true - inRange(13, 1, 10, 2); // false - -### Common use cases - -Anything that needs to check if value is inside a range, be it collision -detection, limiting interaction by mouse position, ignoring parts of the logic -that shouldn't happen if value isn't valid, simplify `if/else` conditions, -making code more readable, etc... - - - - -## isNear(val, target, threshold):Boolean - -Check if value is close to target. - -Similar to `inRange()` but used to check if value is close to a certain value -or match the desired value. Basically to simplify `if/else` conditions and to -make code clearer. - - isNear( 10.2, 10, 0.5); // true - isNear( 10.5, 10, 0.5); // true - isNear(10.51, 10, 0.5); // false - -### Common use cases - -Games where a certain action should happen if an *actor* is close to a target, -gravity fields, any numeric check that has some tolerance. - - - - -## lerp(ratio, start, end):Number - -Linear interpolation. - - lerp(0.5, 0, 10); // 5 - lerp(0.75, 0, 10); // 7.5 - -### Common use cases - -Linear interpolation is commonly used to create animations of elements moving -from one point to another, where you simply update the current ratio (which in -this case represents time) and get back the position of the element at that -"frame". - -The core idea of `lerp` is that you are using a number that goes from `0` to -`1` to specify a ratio inside that scale. This concept can be applied to -convert numbers from different scales easily. - -See: [`map()`](#map), [`norm()`](#norm) - - - - -## loop(val, min, max):Number - -Loops value inside range. Will return `min` if `val > max` and `max` if `val -< min`, otherwise it returns `val`. - - loop(-1, 0, 10); // 10 - loop( 1, 0, 10); // 1 - loop( 5, 0, 10); // 5 - loop( 9, 0, 10); // 9 - loop(10, 0, 10); // 10 - loop(11, 0, 10); // 0 - -Similar to [`clamp()`](#clamp) but *loops* the value inside the range when an -overflow occurs. - -### Common use cases - -Image galleries, infinite scroll, any kind of logic that requires that the -first item should be displayed after the last one or the last one should be -displayed after first if going on the opposite direction. - -See: [`clamp()`](#clamp) - - - - -## map(val, min1, max1, min2, max2):Number - -Maps a number from one scale to another. - - map(3, 0, 4, -1, 1) // 0.5 - map(3, 0, 10, 0, 100) // 30 - -### Common use cases - -Very useful to convert values from/to multiple scales. - -Let's suppose we have a slider that needs to go from `2000` to `5000` and that slider -has `300px` of width, here is how we would translate the knob position into the -current value: - - var knobX = 123; - var sliderWid = 300; - var minVal = 2000; - var maxVal = 5000; - - var curVal = map(knobX, 0, sliderWid, minVal, maxVal); // 3230 - -See: [`lerp()`](#lerp), [`norm()`](#norm) - - - - -## norm(val, min, max):Number - -Gets normalized ratio of value inside range. - - norm(50, 0, 100); // 0.5 - norm(75, 0, 100); // 0.75 - -### Common use cases - -Convert values between scales, used by [`map()`](#map) internally. Direct -opposite of [`lerp()`](#lerp). - -See: [`lerp()`](#lerp), [`map()`](#map) - - - -## round(val[, step]):Number - -Round value to full steps. Similar to `Math.round()` but allow setting an -arbitrary *radix*. - - // default - round(0.22); // 0 - round(0.49); // 0 - round(0.51); // 1 - - // custom radix - round(0.22, 0.5); // 0 - round(0.49, 0.5); // 0.5 - round(0.51, 0.5); // 0.5 - round(0.74, 0.5); // 0.5 - round(0.75, 0.5); // 1 - round(1.24, 0.5); // 1 - round(1.25, 0.5); // 1.5 - round(1.74, 0.5); // 1.5 - -### Common use cases - -Round values by increments of 0.5/5/10/1000/etc. - -See: [`floor()`](#floor), [`ceil()`](#ceil), [`countSteps()`](#countSteps) - - - -------------------------------------------------------------------------------- - -For more usage more info check the specs and source code. - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/number.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/number.md deleted file mode 100644 index 8d93865b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/number.md +++ /dev/null @@ -1,225 +0,0 @@ -# number # - -Number utilities. - - -## abbreviate(val[, nDecimalDigits, dictionary]):String - -Abbreviate number to thousands (K), millions (M) or billions (B). - -The default value for `nDecimalDigits` is `1`. - -### Example - - abbreviate(123456); // "123.5K" - abbreviate(12345678); // "12.3M" - abbreviate(1234567890); // "1.2B" - -You can set the amount of decimal digits (default is `1`): - - abbreviate(543); // "0.5K" - abbreviate(543, 1); // "0.5K" - abbreviate(543, 2); // "0.54K" - abbreviate(543, 3); // "0.543K" - -You can customize the abbreviation by passing a custom "dictionary": - - var _ptbrDict = { - thousands : ' mil', - millions : ' Mi', - billions : ' Bi' - }; - function customAbbr(val) { - return abbreviate(val, 1, _ptbrDict); - } - - customAbbr(123456); // "123.5 mil" - customAbbr(12345678); // "12.3 Mi" - customAbbr(1234567890); // "1.2 Bi" - - - -## currencyFormat(val[, nDecimalDigits, decimalSeparator, thousandsSeparator]):String - -Format a number as currency. - -### Example: - - currencyFormat(1000); // "1,000.00" - currencyFormat(1000, 1); // "1,000.0" - currencyFormat(1000, 2, ',', '.'); // "1.000,00" - - - -## enforcePrecision(val, nDecimalDigits):Number - -Enforce a specific amount of decimal digits and also fix floating point -rounding issues. - -### Example: - -```js -enforcePrecision(0.615, 2); // 0.62 -enforcePrecision(0.625, 2); // 0.63 -//floating point rounding "error" (rounds to odd number) -+(0.615).toFixed(2); // 0.61 -+(0.625).toFixed(2); // 0.63 -``` - - - -## MAX_INT:Number - -Maximum 32-bit signed integer value. `Math.pow(2, 31) - 1` - -### Example: - -```js -console.log( MAX_INT ); // 2147483647 -``` - - -## MAX_UINT:Number - -Maximum 32-bit unsigned integer value. `Math.pow(2, 32) - 1` - -### Example: - -```js -console.log( MAX_UINT ); // 4294967295 -``` - - -## MIN_INT:Number - -Minimum 32-bit signed integer value. `Math.pow(2, 31) * -1`. - -### Example: - -```js -console.log( MIN_INT ); // -2147483648 -``` - - -## pad(n, minLength[, char]):String - -Add padding zeros if `n.length` < `minLength`. - -### Example: - -```js -pad(1, 5); // "00001" -pad(12, 5); // "00012" -pad(123, 5); // "00123" -pad(1234, 5); // "01234" -pad(12345, 5); // "12345" -pad(123456, 5); // "123456" - -// you can also specify the "char" used for padding -pad(12, 5, '_'); // "___12" -``` - -see: [string/lpad](./string.html#lpad) - - - -## rol(val, shift):Number - -Bitwise circular shift left. - -More info at [Wikipedia#Circular_shift](http://en.wikipedia.org/wiki/Circular_shift) - - - -## ror(val, shift):Number - -Bitwise circular shift right. - -More info at [Wikipedia#Circular_shift](http://en.wikipedia.org/wiki/Circular_shift) - - - -## sign(val):Number - -Returns `-1` if value is negative, `0` if the value is `0` and `1` if value is positive. Useful for -multiplications. - -```js -sign(-123); // -1 -sign(123); // 1 -sign(0); // 0 -``` - - - -## toInt(val):Number - -"Convert" value into an 32-bit integer. Works like `Math.floor` if `val > 0` and -`Math.ceil` if `val < 0`. - -**IMPORTANT:** val will wrap at [number/MIN_INT](#MIN_INT) and -[number/MAX_INT](#MAX_INT). - -Created because most people don't know bitwise operations and also because this -feature is commonly needed. - -[Perf tests](http://jsperf.com/vs-vs-parseint-bitwise-operators/7) - -### Example: - -```js -toInt(1.25); // 1 -toInt(0.75); // 0 -toInt(-0.55); // 0 -toInt(-5.0001) // -5 -``` - - - -## toUInt(val):Number - -"Convert" value into an 32-bit unsigned integer. - -Works like AS3#uint(). - -**IMPORTANT:** val will wrap at 2^32. - -### Example: - -```js -toUInt(1.25); // 1 -toUInt(0.75); // 0 -toUInt(-0.55); // 0 -toUInt(-5.0001); // 4294967291 -toUInt(Math.pow(2,32) - 0.5); // 4294967295 -toUInt(Math.pow(2,32) + 0.5); // 0 -``` - - -## toUInt31(val):Number - -"Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). - -Useful since all bitwise operators besides `>>>` treat numbers as signed -integers. - -**IMPORTANT:** val will wrap at 2^31 and negative numbers will be treated as -`zero`. - -### Example: - -```js -toUInt31(1.25); // 1 -toUInt31(0.75); // 0 -toUInt31(-0.55); // 0 -toUInt31(-5.0001); // 0 -toUInt31(Math.pow(2,31) - 0.5); // 21474836470 -toUInt31(Math.pow(2,31) + 0.5); // 0 -``` - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/object.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/object.md deleted file mode 100644 index b4d5e483..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/object.md +++ /dev/null @@ -1,780 +0,0 @@ -# object # - -Object utilities. - - - -## bindAll(obj, [...methodNames]):void - -Bind methods of the target object to always execute on its own context -(ovewritting the original function). - -See: [function/bind](./function.html#bind) - -```js -var view = { - name: 'Lorem Ipsum', - logNameOnClick: function() { - console.log(this.name); - } -}; - -// binds all methods by default -bindAll(view); -jQuery('#docs').on('click', view.logNameOnClick); -``` - -You can also specify the list of methods that you want to bind (in case you -just want to bind a few of them). - -```js -// only the listed methods will be bound to `obj` context -bindAll(obj, 'logNameOnClick', 'doAwesomeStuffOnDrag'); -``` - - - -## contains(obj, value):Boolean - -Similar to [Array/contains](array.html#contains). Checks if Object contains -value. - -```js -var obj = { - a: 1, - b: 2, - c: 'bar' -}; -contains(obj, 2); // true -contains(obj, 'foo'); // false -``` - - - -## deepEquals(a, b, [callback]):Boolean - -Recursively tests whether two objects contain the same keys and equal values. - -`callback` specifies the equality comparison function used to compare -non-object values. It defaults to using the strict equals (`===`) operator. - -If the values are both an object, it will recurse into the objects, checking if -their keys/values are equal. It will only check the keys and values contained -by the objects; it will not check the objects' prototypes. If the either of -the values are not objects, they will be checked using the `callback` function. - -Example: - -```js -deepEquals({ a: 1 }, { a: 1 }); // true -deepEquals({ value: { a: 1 } }, { value: { a: 1 } }); // true -deepEquals({ value: { a: 1 } }, { value: { a: 2 } }); // false -deepEquals({ value: { a: 1 } }, { value: { a: 1, b: 2 } }); // false -deepEquals({}, null); // false -deepEquals(null, null); // true -deepEquals( - { a: { b: 1 } }, - { a: { b: '1' } }, - function(a, b) { return a == b; }); // true -``` - -See: [`equals()`](#equals) - - - -## deepFillIn(target, ...objects):Object - -Fill missing properties recursively. - -It's different from `deepMixIn` since it won't override any existing property. -It's also different from `merge` since it won't clone child objects during the -process. - -It returns the target object and mutates it in place. - -See: [`fillIn()`](#fillIn), [`deepMixIn()`](#deepMixIn), [`merge()`](#merge) - -```js -var base = { - foo : { - bar : 123 - }, - lorem : 'ipsum' -}; -var options = deepFillIn({foo : { baz : 45 }, lorem : 'amet'}, base); -// > {foo: {bar:123, baz : 45}, lorem : 'amet'} -``` - - - -## deepMatches(target, pattern):Boolean - -Recursively checks if object contains all properties/value pairs. When both -the target and pattern values are arrays, it checks that the target value -contain matches for all the items in the pattern array (independent of order). - -```js -var john = { - name: 'John', - age: 22, - pets: [ - { type: 'cat', name: 'Grumpy Cat' }, - { type: 'dog', name: 'Hawk' } - ] -}; - -deepMatches(john, { name: 'John' }); // true -deepMatches(john, { age: 21 }); // false -deepMatches(john, { pets: [ { type: 'cat' } ] }); // true -deepMatches(john, { pets: [ { name: 'Hawk' } ] }); // true -deepMatches(john, { pets: [ { name: 'Hairball' } ] }); // false -``` - -See [`matches()`](#matches) - - - -## deepMixIn(target, ...objects):Object - -Mixes objects into the target object, recursively mixing existing child objects -as well. - -It will only recursively mix objects if both (existing and new) values are -plain objects. - -Returns the target object. Like [`merge()`](#merge), but mutates the target -object, and does not clone child objects. - -```js -var target = { - foo: { - name: "foo", - id: 1 - } -}; - -deepMixIn(target, { foo: { id: 2 } }); -console.log(target); // { foo: { name: "foo", id: 2 } } -``` - -See: [`mixIn()`](#mixIn), [`merge()`](#merge), [`deepFillIn()`](#deepFillIn) - - - -## equals(a, b, [callback]):Boolean - -Tests whether two objects contain the same keys and values. - -`callback` specifies the equality comparison function used to compare the -values. It defaults to using the strict equals (`===`) operator. - -It will only check the keys and values contained by the objects; it will not -check the objects' prototypes. If either of the values are not objects, they -will be compared using the `callback` function. - -```js -equals({}, {}); // true -equals({ a: 1 }, { a: 1 }); // true -equals({ a: 1 }, { a: 2 }); // false -equals({ a: 1, b: 2 }, { a: 1 }); // false -equals({ a: 1 }, { a: 1, b: 2 }); // false -equals(null, null); // true -equals(null, {}); // false -equals({ a: 1 }, { a: '1' }, function(a, b) { return a == b; }); // true -``` - - - -## every(obj, callback, [thisObj]):Boolean - -Similar to [Array/every](array.html#every). Tests whether all properties in the -object pass the test implemented by the provided callback. - -```js -var obj = { - a: 1, - b: 2, - c: 3, - d: 'string' -}; - -every(obj, isNumber); // false -``` - - - -## fillIn(obj, ...default):Object - -Fill in missing properties in object with values from the *defaults* objects. - - var base = { - foo : 'bar', - num : 123 - }; - - fillIn({foo:'ipsum'}, base); // {foo:'ipsum', num:123} - -PS: it allows merging multiple objects at once, the first ones will take -precedence. - -See: [`mixIn()`](#mixIn), [`merge()`](#merge), [`deepFillIn()`](#deepFillIn) - - - -## filter(obj, callback, [thisObj]) - -Returns a new object containing all properties where `callback` returns true, -similar to Array/filter. It does not use properties from the object's -prototype. - -Callback receives the same arguments as `forOwn()`. - -See: [`forOwn()`](#forOwn), [`forIn()`](#forIn), [`pick()`](#pick) - -```js -var obj = { - foo: 'value', - bar: 'bar value' -}; - -// returns { bar: 'bar value' } -filter(obj, function(v) { return value.length > 5; }); - -// returns { foo: 'value' } -filter(obj, function(v, k) { return k === 'foo'; }); -``` - - - -## find(obj, callback, [thisObj]) - -Loops through all the properties in the Object and returns the first one that -passes a truth test (callback), similar to [Array/find](array.html#find). -Unlike Array/find, order of iteration is not guaranteed. - -```js -var obj = { - a: 'foo', - b: 12 -}; - -find(obj, isString); // 'foo' -find(obj, isNumber); // 12 -``` - - - -## forIn(obj, callback[, thisObj]) - -Iterate over all properties of an Object, similar to -[Array/forEach](array.html#forEach). - -It [avoids don't enum bug on IE](https://developer.mozilla.org/en/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug). -It **will** iterate over inherited (enumerable) properties from the prototype. - -It allows exiting the iteration early by returning `false` on the callback. - -See: [`forOwn()`](#forOwn), [`keys()`](#keys), [`values()`](#values) - -### Callback arguments - -Callback will receive the following arguments: - - 1. Property Value (*) - 2. Key name (String) - 3. Target object (Object) - -### Example - -```js -function Foo(){ - this.foo = 1; - this.bar = 2; -} - -Foo.prototype.lorem = 4; - -var obj = new Foo(); - -var result = 0; -var keys = []; - -forIn(obj, function(val, key, o){ - result += val; - keys.push(key); -}); - -console.log(result); // 7 -console.log(keys); // ['foo', 'bar', 'lorem'] -``` - - - -## forOwn(obj, callback[, thisObj]) - -Iterate over all own properties from an Object, similar to -[Array/forEach](array.html#forEach). - -It [avoids don't enum bug on IE](https://developer.mozilla.org/en/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug). -Notice that it **won't** iterate over properties from the prototype. - -It allows exiting the iteration early by returning `false` on the callback. - -See: [`forIn()`](#forIn), [`keys()`](#keys), [`values()`](#values) - -### Callback arguments - -Callback will receive the following arguments: - - 1. Property Value (*) - 2. Key name (String) - 3. Target object (Object) - -### Example - -```js -function Foo(){ - this.foo = 1; - this.bar = 2; -} - -// will be ignored -Foo.prototype.lorem = 4; - -var obj = new Foo(); - -var result = 0; -var keys = []; - -forOwn(obj, function(val, key, o){ - result += val; - keys.push(key); -}); - -console.log(result); // 3 -console.log(keys); // ['foo', 'bar'] -``` - - - -## functions(obj):Array - -Returns a sorted list of all enumerable properties that have function values -(including inherited properties). - -```js -var obj = { - foo : function(){}, - bar : 'baz' -}; -functions(obj); // ['foo'] -``` - - - -## get(obj, propName):* - -Returns nested property value. Will return `undefined` if property doesn't -exist. - -See: [`set()`](#set), [`namespace()`](#namespace), [`has()`](#has) - -```js -var lorem = { - ipsum : { - dolor : { - sit : 'amet' - } - } - }; - -get(lorem, 'ipsum.dolor.sit'); // "amet" -get(lorem, 'foo.bar'); // undefined -``` - - - -## has(obj, propName):Boolean - -Checks if object contains a child property. Useful for cases where you need to -check if an object contain a *nested* property. It will get properties -inherited by the prototype. - -see: [`hasOwn()`](#hasOwn), [`get()`](#get) - -```js -var a = { - b : { - c : 123 - } - }; - -has(a, 'b.c'); // true -has(a, 'foo.c'); // false -``` - -### Common use case - -```js -if( has(a, 'foo.c') ){ // false - // ... -} - -if( a.foo.c ){ // ReferenceError: `foo` is not defined - // ... -} -``` - - - -## hasOwn(obj, propName):Boolean - -Safer `Object.hasOwnProperty`. Returns a boolean indicating whether the object -has the specified property. - -see: [`has()`](#has) - -```js -var obj = { - foo: 1, - hasOwnProperty : 'bar' -}; - -obj.hasOwnProperty('foo'); // ERROR! hasOwnProperty is not a function - -hasOwn(obj, 'foo'); // true -hasOwn(obj, 'hasOwnProperty'); // true -hasOwn(obj, 'toString'); // false -``` - - - -## keys(obj):Array - -Returns an array of all own enumerable properties found upon a given object. -It will use the native `Object.keys` if present. - -PS: it won't return properties from the prototype. - -See: [`forOwn()`](#forOwn), [`values()`](#values) - -```js -var obj = { - foo : 1, - bar : 2, - lorem : 3 -}; -keys(obj); // ['foo', 'bar', 'lorem'] -``` - - - -## map(obj, callback, [thisObj]):Object - -Returns a new object where the property values are the result of calling the -callback for each property in the original object, similar to Array/map. - -The callback function receives the same arguments as in `forOwn()`. - -See: [`forOwn()`](#forOwn) - -```js -var obj = { foo: 1, bar: 2 }, - data = { foo: 0, bar: 1 }; - -map(obj, function(v) { return v + 1; }); // { foo: 2, bar: 3 } -map(obj, function(v, k) { return k; }); // { foo: "foo", bar: "bar" } -map(obj, function(v, k) { return this[k]; }, data); // { foo: 0, bar: 1 } -``` - - - -## matches(obj, props):Boolean - -Checks if object contains all properties/values pairs. Useful for validation -and filtering. - -```js -var john = {age:25, hair:'long', beard:true}; -var mark = {age:27, hair:'short', beard:false}; -var hippie = {hair:'long', beard:true}; -matches(john, hippie); // true -matches(mark, hippie); // false -``` - -See [`deepMatches()`](#deepMatches) - - - -## merge(...objects):Object - -Deep merges objects. Note that objects and properties will be cloned during the -process to avoid undesired side effects. It return a new object and won't -affect source objects. - -```js -var obj1 = {a: {b: 1, c: 1, d: {e: 1, f: 1}}}; -var obj2 = {a: {b: 2, d : {f : 'yeah'} }}; - -merge(obj1, obj2); // {a: {b : 2, c : 1, d : {e : 1, f : 'yeah'}}} -``` - -See: [`deepMixIn()`](#deppMixIn), [`deepFillIn()`](#deepFillIn) - - - -## max(obj[, iterator]):* - -Returns maximum value inside object or use a custom iterator to define how -items should be compared. Similar to [Array/max](array.html#max). - -See: [`min()`](#min) - -```js -max({a: 100, b: 2, c: 1, d: 3, e: 200}); // 200 -max({a: 'foo', b: 'lorem', c: 'amet'}, function(val){ - return val.length; -}); // 'lorem' -``` - - - -## min(obj[, iterator]):* - -Returns minimum value inside object or use a custom iterator to define how -items should be compared. Similar to [Array/min](array.html#min). - -See: [`max()`](#max) - -```js -min({a: 100, b: 2, c: 1, d: 3, e: 200}); // 1 -min({a: 'foo', b: 'lorem', c: 'amet'}, function(val){ - return val.length; -}); // 'foo' -``` - - - -## mixIn(target, ...objects):Object - -Combine properties from all the objects into first one. - -This method affects target object in place, if you want to create a new Object -pass an empty object as first parameter. - -### Arguments - - 1. `target` (Object) : Target Object. - 2. `...objects` (...Object) : Objects to be combined (0...n objects). - -### Example - -```js -var a = {foo: "bar"}; -var b = {lorem: 123}; - -mixIn({}, a, b); // {foo: "bar", lorem: 123} -console.log(a); // {foo: "bar"} - -mixIn(a, b); // {foo: "bar", lorem: 123} -console.log(a); // {foo: "bar", lorem: 123} -``` - -See: [`fillIn()`](#fillIn), [`merge()`](#merge) - - - - -## namespace(obj, propName):Object - -Creates an empty object inside namespace if not existent. Will return created -object or existing object. - -See: [`get()`](#get), [`set()`](#set) - -```js -var obj = {}; -namespace(obj, 'foo.bar'); // {} -console.log(obj); // {foo:{bar:{}}} -``` - - - -## pick(obj, ...keys):Object - -Return a copy of the object that contains only the whitelisted keys. - -See: [`filter()`](#filter) - -```js -var user = { - firstName : 'John', - lastName : 'Doe', - dob : '1985/07/23', - gender : 'male' -}; - -// can pass an array of keys as second argument -var keys = ['firstName', 'dob'] -pick(user, keys); // {firstName:"John", dob: "1985/07/23"} - -// or multiple arguments -pick(user, 'firstName', 'lastName'); // {firstName:"John", lastName: "Doe"} -``` - - - -## pluck(obj, propName):Object - -Extract an object containing property values with keys as they appear in the -passed object. - -```js -var users = { - first: { - name : 'John', - age : 21 - }, - second: { - name : 'Mary', - age : 25 - } -}; - -pluck(users, 'name'); // {first: 'John', second: 'Mary'} ); -pluck(users, 'age'); // {first: 21, second: 25} ); -``` - - - -## reduce(obj, callback, initial, [thisObj]):* - -Similar to [Array/reduce](array.html#reduce). - -Apply a function against an accumulator and each property of the object (order -is undefined) as to reduce it to a single value. - -```js -var obj = {a: 1, b: 2, c: 3, d: 4}; - -function sum(prev, cur, key, list) { - compare1.push(prev); - return prev + cur; -} - -reduce(obj, sum); // 10 -``` - - - -## reject(obj, callback, thisObj):Object - -Returns a new object containing all properties where `callback` returns true, -similar to [Array/reject](array.html#reject). It does not use properties from -the object's prototype. Opposite of [`filter()`](#filter). - -See [`filter()`](#filter) - -### Example - -```js -var obj = {a: 1, b: 2, c: 3, d: 4, e: 5}; -reject(obj, function(x) { return (x % 2) !== 0; }); // {b: 2, d: 4} -``` - - - -## values(obj):Array - -Returns an array of all own enumerable properties values found upon a given object. - -PS: it won't return properties from the prototype. - -See: [`forOwn()`](#forOwn), [`keys()`](#keys) - -```js -var obj = { - foo : 1, - bar : 2, - lorem : 3 -}; -values(obj); // [1, 2, 3] -``` - - - -## set(obj, propName, value) - -Sets a nested property value. - -See: [`get()`](#get), [`namespace()`](#namespace) - -```js -var obj = {}; -set(obj, 'foo.bar', 123); -console.log(obj.foo.bar); // 123 -console.log(obj); // {foo:{bar:123}} -``` - - - -## size(obj):Number - -Returns the count of own enumerable properties found upon a given object. - -PS: it won't return properties from the prototype. - -See: [`forOwn()`](#forOwn), [`keys()`](#keys) - -```js -var obj = { - foo : 1, - bar : 2, - lorem : 3 -}; -size(obj); // 3 -``` - - - -## some(obj, callback, [thisObj]):Boolean - -Similar to [Array/some](array.html#some). Tests whether any properties in the -object pass the test implemented by the provided callback. - -```js -var obj = { - a: 1, - b: 2, - c: 3, - d: 'string' -}; - -some(obj, isNumber); // true -``` - - - -## unset(obj, propName):Boolean - -Delete object property if existent and returns a boolean indicating succes. It -will also return `true` if property doesn't exist. - -Some properties can't be deleted, to understand why [check this -article](http://perfectionkills.com/understanding-delete/). - -See: [`set()`](#set) - -```js -var lorem = { - ipsum : { - dolor : { - sit : 'amet' - } - } - }; - -unset(lorem, 'ipsum.dolor.sit'); // true -console.log(lorem.ipsum.dolor); // {} -unset(lorem, 'foo.bar'); // true -``` diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/queryString.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/queryString.md deleted file mode 100644 index 1be3c102..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/queryString.md +++ /dev/null @@ -1,115 +0,0 @@ -# queryString # - -Utilities for query string manipulation. - - - -## contains(url, paramName):Boolen - -Checks if query string contains parameter. - -### Arguments: - - 1. `url` (String) : URL or query string. - 2. `paramName` (String) : Parameter name. - -### Example: - -```js -var url = 'example.com/?lorem=ipsum'; -contains(url, 'lorem'); // true -contains(url, 'foo'); //false -``` - - - -## decode(queryStr[, shouldTypecast]):Object - -Parses query string and creates an object of keys => vals. - -Will typecast value with [`string/typecast`](string.html#typecast) by default -and decode string parameters using `decodeURIComponent()`. - -```js -var query = '?foo=bar&lorem=123'; -decode(query); // {foo: "bar", lorem: 123} -decode(query, false); // {foo: "bar", lorem: "123"} -``` - - -## encode(obj):String - -Encode object into a query string. - -Will encode parameters with `encodeURIComponent()`. - -```js -encode({foo: "bar", lorem: 123}); // "?foo=bar&lorem=123" -``` - - -## getParam(url, param[, shouldTypecast]):* - -Get query parameter value. - -Will typecast value with [`string/typecast`](string.html#typecast) by default. - -See: [`setParam()`](#setParam) - -### Arguments: - - 1. `url` (String) : Url. - 2. `param` (String) : Parameter name. - 3. `[shouldTypecast]` (Boolean) : If it should typecast value. - -### Example: - -```js -var url = 'example.com/?foo=bar&lorem=123&ipsum=false'; -getParam(url, 'dolor'); // "amet" -getParam(url, 'lorem'); // 123 -getParam(url, 'lorem', false); // "123" -``` - - -## parse(url[, shouldTypecast]):Object - -Parses URL, extracts query string and decodes it. - -It will typecast all properties of the query object unless second argument is -`false`. - -Alias to: `decode(getQuery(url))`. - -```js -var url = 'example.com/?lorem=ipsum&a=123'; -parse(url); // {lorem: "ipsum", a: 123} -parse(url, false); // {lorem: "ipsum", a: "123"} -``` - - -## getQuery(url):String - -Gets full query as string with all special chars decoded. - -```js -getQuery('example.com/?lorem=ipsum'); // "?lorem=ipsum" -``` - - -## setParam(url, paramName, value):String - -Add new query string parameter to URL or update existing value. - -See: [`getParam()`](#getParam) - -```js -setParam('?foo=bar&lorem=0', 'lorem', 'ipsum'); // '?foo=bar&lorem=ipsum' -setParam('?lorem=1', 'foo', 123); // '?lorem=1&foo=123' -``` - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/random.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/random.md deleted file mode 100644 index b058b4e0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/random.md +++ /dev/null @@ -1,218 +0,0 @@ -# random # - -Pseudo-random generators. - -mout uses `Math.random` by default on all the pseudo-random generators, if -you need a seeded random or a better algorithm see the [`random()`](#random) -documentation for instructions. - - - -## choice(...items):* - -Returns a random element from the supplied arguments or from an array if single -argument is an array. - -### Example: - -```js -choice(1, 2, 3, 4, 5); // 3 - -var arr = ['lorem', 'ipsum', 'dolor']; -choice(arr); // 'dolor' -``` - - - -## guid():String - -Generates a pseudo-random [Globally Unique Identifier](http://en.wikipedia.org/wiki/Globally_unique_identifier) (v4). - -Since the total number of GUIDs is 2<sup>122</sup> the chance of generating the -same value twice is negligible. - -**Important:** this method uses `Math.random` by default so the UUID isn't -*safe* (sequence of outputs can be predicted in some cases), check the -[`random()`](#random) documentation for more info on how to replace the default -PRNG if you need extra safety or need *seeded* results. - -See: [`randHex()`](#randHex), [`random()`](#random) - -### Example: - -```js -guid(); // 830e9f50-ac7f-4369-a14f-ed0e62b2fa0b -guid(); // 5de3d09b-e79c-4727-932b-48c49228d508 -``` - - - -## rand([min], [max]):Number - -Gets a random number inside range or snap to min/max values. - -### Arguments: - - 1. `[min]` (Number) : Minimum value. Defaults to `number/MIN_INT`. - 2. `[max]` (Number) : Maximum value. Defaults to `number/MAX_INT`. - - -### Example: - -```js -rand(); // 448740433.55274725 -rand(); // -31797596.097682 -rand(0, 10); // 7.369723 -rand(0, 10); // 5.987042 -``` - -See: [`random()`](#random) - - - -## randBit():Number - -Returns a random "bit" (0 or 1). Useful for addition/subtraction. - -It's slightly faster than `choice(0, 1)` since implementation is simpler (not -that it will make a huge difference in most cases). - -See: [`choice()`](#choice) - -### Example: - -```js -randBit(); // 1 -randBit(); // 0 - -//same effect as -choice(0, 1); -``` - - - -## randHex([size]):String - -Returns a random hexadecimal string. - -The default `size` is `6`. - -### Example: - -```js -randHex(); // "dd8575" -randHex(); // "e6baeb" -randHex(2); // "a2" -randHex(30); // "effd7e2ad9a4a3067e30525fab983a" -``` - - - -## randInt([min], [max]):Number - -Gets a random integer inside range or snap to min/max values. - -### Arguments: - - 1. `[min]` (Number) : Minimum value. Defaults to `number/MIN_INT`. - 2. `[max]` (Number) : Maximum value. Defaults to `number/MAX_INT`. - - -### Example: - -```js -randInt(); // 448740433 -randInt(); // -31797596 -randInt(0, 10); // 7 -randInt(0, 10); // 5 -``` - - - -## randSign():Number - -Returns a random "sign" (-1 or 1). Useful for multiplications. - -It's slightly faster than `choice(-1, 1)` since implementation is simpler (not -that it will make a huge difference in most cases). - -See: [`choice()`](#choice) - -### Example: - -```js -randSign(); // -1 -randSign(); // 1 - -//same effect as -choice(-1, 1); -``` - - - -## random():Number - -Returns a random number between `0` and `1`. Same as `Math.random()`. - -```js -random(); // 0.35435103671625257 -random(); // 0.8768321881070733 -``` - -**Important:** No methods inside mout should call `Math.random()` -directly, they all use `random/random` as a proxy, that way we can -inject/replace the pseudo-random number generator if needed (ie. in case we -need a seeded random or a better algorithm than the native one). - -### Replacing the PRNG - -In some cases we might need better/different algorithms than the one provided -by `Math.random` (ie. safer, seeded). - -Because of licensing issues, file size limitations and different needs we -decided to **not** implement a custom PRNG and instead provide a easy way to -override the default behavior. - [issue #99](https://github.com/millermedeiros/amd-utils/issues/99) - -If you are using mout with a loader that supports the [AMD map -config](https://github.com/amdjs/amdjs-api/wiki/Common-Config), such as -[RequireJS](http://requirejs.org/), you can use it to replace the PRNG -(recommended approach): - -```js -requirejs.config({ - map : { - // all modules will load "my_custom_prng" instead of - // "mout/random/random" - '*' : { - 'mout/random/random' : 'my_custom_prng' - } - } -}); -``` - -You also have the option to override `random.get` in case you are using -mout on node.js or with a loader which doesn't support the map config: - -```js -// replace the PRNG -var n = 0; -random.get = function(){ - return ++n % 2? 0 : 1; // not so random :P -}; -random(); // 0 -random(); // 1 -random(); // 0 -random(); // 1 -``` - -See this [detailed explanation about PRNG in -JavaScript](http://baagoe.org/en/w/index.php/Better_random_numbers_for_javascript) -to understand the issues with the native `Math.random` and also for a list of -algorithms that could be used instead. - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/string.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/string.md deleted file mode 100644 index 2b282315..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/string.md +++ /dev/null @@ -1,594 +0,0 @@ -# string # - -String utilities. - - -## camelCase(str):String - -Convert string to "camelCase" text. - -See: [`pascalCase()`](#pascalCase), [`unCamelCase()`](#unCamelCase) - -### Example - -```js -camelCase('lorem-ipsum-dolor'); // "loremIpsumDolor" -camelCase('lorem ipsum dolor'); // "loremIpsumDolor" -``` - - - -## contains(str, substring, [fromIndex]):Boolean - -Checks if string contains the given substring. - -See: [`startsWith()`](#startsWith), [`endsWith()`](#endsWith) - -### Example - -```js -contains('lorem', 'or'); // true -contains('lorem', 'bar'); // false -``` - - - -## crop(str, maxChars, [append]):String - -Truncate string at full words. Alias to `truncate(str, maxChars, append, true);`. - -See: [`truncate()`](#truncate) - -### Example - -```js -crop('lorem ipsum dolor', 10); // "lorem..." -crop('lorem ipsum dolor', 10, '+'); // "lorem+" -``` - - - -## endsWith(str, suffix):Boolean - -Checks if string ends with specified suffix. - -See: [`startsWith()`](#startsWith), [`contains()`](#contains) - -### Example - -```js -endsWith('lorem ipsum', 'lorem'); // false -endsWith('lorem ipsum', 'ipsum'); // true -``` - - - -## escapeHtml(str):String - -Escapes HTML special chars (`>`, `<`, `&`, `"`, `'`). - -See: [`unescapeHtml()`](#unescapeHtml) - -### Example - -```js -escapeHtml('lorem & "ipsum"'); // "lorem &amp; &quot;ipsum&quot;" -``` - - - -## escapeRegExp(str):String - -Escape special chars to be used as literals in RegExp constructors. - -### Example - -```js -str = escapeRegExp('[lorem.ipsum]'); // "\\[lorem\\.ipsum\\]" -reg = new RegExp(str); // /\[lorem\.ipsum\]/ -``` - - - -## escapeUnicode(str[, shouldEscapePrintable]):String - -Unicode escape chars. - -It will only escape non-printable ASCII chars unless `shouldEscapePrintable` is -set to `true`. - -See: [`unescapeUnicode()`](#unescapeUnicode) - -```js -escapeUnicode('føo bår'); -// > "f\u00f8o b\u00e5r" -escapeUnicode('føo bår', true); -// > "\u0066\u00f8\u006f\u0020\u0062\u00e5\u0072" -``` - - - -## hyphenate(str):String - -Replaces spaces with hyphens, split camelCase text, remove non-word chars, -remove accents and convert to lower case. - -See: [`slugify()`](#slugify), [`underscore()`](#underscore), -[`unhyphenate`](#unhyphenate) - -```js -hyphenate(' %# lorem ipsum ? $ dolor'); // "lorem-ipsum-dolor" -hyphenate('spéçïãl çhârs'); // "special-chars" -hyphenate('loremIpsum'); // "lorem-ipsum" -``` - - - -## interpolate(str, replacements[, syntax]):String - -String interpolation. Format/replace tokens with object properties. - -```js -var tmpl = 'Hello {{name}}!'; -interpolate(tmpl, {name: 'World'}); // "Hello World!" -interpolate(tmpl, {name: 'Lorem Ipsum'}); // "Hello Lorem Ipsum!" -``` - -It uses a mustache-like syntax by default but you can set your own format if -needed. You can also use Arrays for the replacements (since Arrays are -objects as well): - -```js -// matches everything inside "${}" -var syntax = /\$\{([^}]+)\}/g; -var tmpl = "Hello ${0}!"; -interpolate(tmpl, ['Foo Bar'], syntax); // "Hello Foo Bar!" -``` - - - -## lowerCase(str):String - -"Safer" `String.toLowerCase()`. (Used internally) - -### Example - -```js -(null).toLowerCase(); // Error! -(undefined).toLowerCase(); // Error! -lowerCase(null); // "" -lowerCase(undefined); // "" -``` - - - -## lpad(str, minLength[, char]):String - -Pad string from left with `char` if its' length is smaller than `minLen`. - -See: [`rpad()`](#rpad) - -### Example - -```js -lpad('a', 5); // " a" -lpad('a', 5, '-'); // "----a" -lpad('abc', 3, '-'); // "abc" -lpad('abc', 4, '-'); // "-abc" -``` - - - -## ltrim(str, [chars]):String - -Remove chars or white-spaces from beginning of string. - -`chars` is an array of chars to remove from the beginning of the string. If -`chars` is not specified, Unicode whitespace chars will be used instead. - -See: [`rtrim()`](#rtrim), [`trim()`](#trim) - -### Example - -```js -ltrim(' lorem ipsum '); // "lorem ipsum " -ltrim('--lorem ipsum--', ['-']); // "lorem ipsum--" -``` - - - -## makePath(...args):String - -Group arguments as path segments, if any of the args is `null` or `undefined` -it will be ignored from resulting path. It will also remove duplicate "/". - -See: [`array/join()`](array.html#join) - -### Example - -```js -makePath('lorem', 'ipsum', null, 'dolor'); // "lorem/ipsum/dolor" -makePath('foo///bar/'); // "foo/bar/" -``` - - - -## normalizeLineBreaks(str, [lineBreak]):String - -Normalize line breaks to a single format. Defaults to Unix `\n`. - -It handles DOS (`\r\n`), Mac (`\r`) and Unix (`\n`) formats. - -### Example - -```js -// "foo\nbar\nlorem\nipsum" -normalizeLineBreaks('foo\nbar\r\nlorem\ripsum'); - -// "foo\rbar\rlorem\ripsum" -normalizeLineBreaks('foo\nbar\r\nlorem\ripsum', '\r'); - -// "foo bar lorem ipsum" -normalizeLineBreaks('foo\nbar\r\nlorem\ripsum', ' '); -``` - - - -## pascalCase(str):String - -Convert string to "PascalCase" text. - -See: [`camelCase()`](#camelCase) - -### Example - -```js -pascalCase('lorem-ipsum-dolor'); // "LoremIpsumDolor" -pascalCase('lorem ipsum dolor'); // "LoremIpsumDolor" -``` - - - -## properCase(str):String - -UPPERCASE first char of each word, lowercase other chars. - -### Example - -```js -properCase('loRem iPSum'); // "Lorem Ipsum" -``` - - - -## removeNonASCII(str):String - -Remove [non-printable ASCII -chars](http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters). - -### Example - -```js -removeNonASCII('äÄçÇéÉêlorem-ipsumöÖÐþúÚ'); // "lorem-ipsum" -``` - - - -## removeNonWord(str):String - -Remove non-word chars. - -### Example - -```js -var str = 'lorem ~!@#$%^&*()_+`-={}[]|\\:";\'/?><., ipsum'; -removeNonWord(str); // "lorem - ipsum" -``` - - - -## repeat(str, n):String - -Repeat string n-times. - -### Example - -```js -repeat('a', 3); // "aaa" -repeat('bc', 2); // "bcbc" -repeat('a', 0); // "" -``` - - - -## replace(str, search, replacements):String - -Replace string(s) with the replacement(s) in the source. - -`search` and `replacements` can be an array, or a single item. For every item -in `search`, it will call `str.replace` with the search item and the matching -replacement in `replacements`. If `replacements` only contains one replacement, -it will be used for all the searches, otherwise it will use the replacement at -the same index as the search. - -### Example - -```js -replace('foo bar', 'foo', 'test'); // "test bar" -replace('test 1 2', ['1', '2'], 'n'); // "test n n" -replace('test 1 2', ['1', '2'], ['one', 'two']); // "test one two" -replace('123abc', [/\d/g, /[a-z]/g], ['0', '.']); // "000..." -``` - - - -## replaceAccents(str):String - -Replaces all accented chars with regular ones. - -**Important:** Only covers **Basic Latin** and **Latin-1** unicode chars. - -### Example - -```js -replaceAccents('spéçïãl çhârs'); // "special chars" -``` - - - -## rpad(str, minLength[, char]):String - -Pad string from right with `char` if its' length is smaller than `minLen`. - -See: [`lpad()`](#lpad) - -### Example - -```js -rpad('a', 5); // "a " -rpad('a', 5, '-'); // "a----" -rpad('abc', 3, '-'); // "abc" -rpad('abc', 4, '-'); // "abc-" -``` - - - -## rtrim(str, [chars]):String - -Remove chars or white-spaces from end of string. - -`chars` is an array of chars to remove from the end of the string. If -`chars` is not specified, Unicode whitespace chars will be used instead. - -See: [`trim()`](#trim), [`ltrim()`](#ltrim) - -### Example - -```js -rtrim(' lorem ipsum '); // " lorem ipsum" -rtrim('--lorem ipsum--', ['-']); // "--lorem ipsum" -``` - - - -## sentenceCase(str):String - -UPPERCASE first char of each sentence and lowercase other chars. - -### Example - -```js -var str = 'Lorem IpSum DoLOr. maeCeNnas Ullamcor.'; -sentenceCase(str); // "Lorem ipsum dolor. Maecennas ullamcor." -``` - - - -## stripHtmlTags(str):String - -Remove HTML/XML tags from string. - -### Example - -```js -var str = '<p><em>lorem</em> <strong>ipsum</strong></p>'; -stripHtmlTags(str); // "lorem ipsum" -``` - - - -## startsWith(str, prefix):Boolean - -Checks if string starts with specified prefix. - -See: [`endsWith()`](#endsWith), [`contains()`](#contains) - -### Example - -```js -startsWith('lorem ipsum', 'lorem'); // true -startsWith('lorem ipsum', 'ipsum'); // false -``` - - - -## slugify(str[, delimeter]):String - -Convert to lower case, remove accents, remove non-word chars and replace spaces -with the delimeter. The default delimeter is a hyphen. - -Note that this does not split camelCase text. - -See: [`hyphenate()`](#hyphenate) and [`underscore()`](#underscore) - -### Example - -```js -var str = 'loremIpsum dolor spéçïãl chârs'; -slugify(str); // "loremipsum-dolor-special-chars" -slugify(str, '_'); // "loremipsum_dolor_special_chars" -``` - - - -## trim(str, [chars]):String - -Remove chars or white-spaces from beginning and end of string. - -`chars` is an array of chars to remove from the beginning and end of the -string. If `chars` is not specified, Unicode whitespace chars will be used -instead. - -See: [`rtrim()`](#rtrim), [`ltrim()`](#ltrim) - -### Example - -```js -trim(' lorem ipsum '); // "lorem ipsum" -trim('-+-lorem ipsum-+-', ['-', '+']); // "lorem ipsum" -``` - - - -## truncate(str, maxChars, [append], [onlyFullWords]):String - -Limit number of chars. Returned string `length` will be `<= maxChars`. - -See: [`crop()`](#crop) - -### Arguments - - 1. `str` (String) : String - 2. `maxChars` (Number) : Maximum number of characters including `append.length`. - 3. `[append]` (String) : Value that should be added to the end of string. - Defaults to "...". - 4. `[onlyFullWords]` (Boolean) : If it shouldn't break words. Default is - `false`. (favor [`crop()`](#crop) since code will be clearer). - -### Example - -```js -truncate('lorem ipsum dolor', 11); // "lorem ip..." -truncate('lorem ipsum dolor', 11, '+'); // "lorem ipsu+" -truncate('lorem ipsum dolor', 11, null, true); // "lorem..." -``` - - - -## typecast(str):* - -Parses string and convert it into a native value. - -### Example - -```js -typecast('lorem ipsum'); // "lorem ipsum" -typecast('123'); // 123 -typecast('123.45'); // 123.45 -typecast('false'); // false -typecast('true'); // true -typecast('null'); // null -typecast('undefined'); // undefined -``` - - - -## unCamelCase(str, [delimiter]):String - -Add the delimiter between camelCase text and convert first char of each word to -lower case. - -The delimiter defaults to a space character. - -See: [`camelCase()`][#camelCase] - -### Example - -```js -unCamelCase('loremIpsumDolor'); // "lorem ipsum dolor" -unCamelCase('loremIpsumDolor', '-'); // "lorem-ipsum-color" -``` - - -## underscore(str):String - -Replaces spaces with underscores, split camelCase text, remove non-word chars, -remove accents and convert to lower case. - -See: [`slugify()`](#slugify), [`hyphenate()`](#hyphenate) - -```js -underscore(' %# lorem ipsum ? $ dolor'); // "lorem_ipsum_dolor" -underscore('spéçïãl çhârs'); // "special_chars" -underscore('loremIpsum'); // "lorem_ipsum" -``` - - - -## unescapeHtml(str):String - -Unescapes HTML special chars (`>`, `<`, `&`, `"`, `'`). - -See: [`escapeHtml()`](#escapeHtml) - -### Example - -```js -unescapeHtml('lorem &amp; &quot;ipsum&quot;'); // 'lorem & "ipsum"' -``` - - - -## unescapeUnicode(str):String - -Unescapes unicode char sequences. - -See: [`escapeUnicode()`](#escapeUnicode) - -```js -unescapeUnicode('\\u0066\\u00f8\\u006f\\u0020\\u0062\\u00e5\\u0072'); -// > 'føo bår' -``` - - - -## unhyphenate(str):String - -Replaces hyphens with spaces. (only hyphens between word chars) - -See : [`hyphenate()`](#hyphenate) - -### Example - -```js -unhyphenate('lorem-ipsum-dolor'); // "lorem ipsum dolor" -``` - - -## upperCase(str):String - -"Safer" `String.toUpperCase()`. (Used internally) - -### Example - -```js -(null).toUpperCase(); // Error! -(undefined).toUpperCase(); // Error! -upperCase(null); // "" -upperCase(undefined); // "" -``` - - - -## WHITE_SPACES:Array - -Constant array of all [Unicode white-space -characters](http://en.wikipedia.org/wiki/Whitespace_character). - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/time.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/time.md deleted file mode 100644 index 628c2a9b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/doc/time.md +++ /dev/null @@ -1,64 +0,0 @@ -# time # - -Utilities for time manipulation. - - -## convert(value, sourceUnit, [destinationUnit]):Number - -Converts time between units. - -Available units: `millisecond`, `second`, `minute`, `hour`, `day`, `week`. -Abbreviations: `ms`, `s`, `m`, `h`, `d`, `w`. - -We do **not** support year and month as a time unit since their values are not -fixed. - -The default `destinationUnit` is `ms`. - -```js -convert(1, 'minute'); // 60000 -convert(2.5, 's', 'ms'); // 2500 -convert(2, 'm', 's'); // 120 -convert(500, 'ms', 's'); // 0.5 -``` - - - -## now():Number - -Returns the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC. -Uses `Date.now()` if available. - -### Example - -```js -now(); // 1335449614650 -``` - - - -## parseMs(ms):Object - -Parse timestamp (milliseconds) into an object `{milliseconds:number, -seconds:number, minutes:number, hours:number, days:number}`. - -### Example - -```js -// {days:27, hours:4, minutes:26, seconds:5, milliseconds:454} -parseMs(2348765454); -``` - - - -## toTimeString(ms):String - -Convert timestamp (milliseconds) into a time string in the format "[H:]MM:SS". - -### Example - -```js -toTimeString(12513); // "00:12" -toTimeString(951233); // "15:51" -toTimeString(8765235); // "2:26:05" -``` diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function.js deleted file mode 100644 index 43a16ef4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function.js +++ /dev/null @@ -1,18 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'bind' : require('./function/bind'), - 'compose' : require('./function/compose'), - 'debounce' : require('./function/debounce'), - 'func' : require('./function/func'), - 'makeIterator_' : require('./function/makeIterator_'), - 'partial' : require('./function/partial'), - 'prop' : require('./function/prop'), - 'series' : require('./function/series'), - 'throttle' : require('./function/throttle'), - 'timeout' : require('./function/timeout') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/bind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/bind.js deleted file mode 100644 index 71bc1257..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/bind.js +++ /dev/null @@ -1,23 +0,0 @@ - - - function slice(arr, offset){ - return Array.prototype.slice.call(arr, offset || 0); - } - - /** - * Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. - * @param {Function} fn Function. - * @param {object} context Execution context. - * @param {rest} args Arguments (0...n arguments). - * @return {Function} Wrapped Function. - */ - function bind(fn, context, args){ - var argsArr = slice(arguments, 2); //curried args - return function(){ - return fn.apply(context, argsArr.concat(slice(arguments))); - }; - } - - module.exports = bind; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/compose.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/compose.js deleted file mode 100644 index 8cd5c5f3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/compose.js +++ /dev/null @@ -1,23 +0,0 @@ - - - /** - * Returns a function that composes multiple functions, passing results to - * each other. - */ - function compose() { - var fns = arguments; - return function(arg){ - // only cares about the first argument since the chain can only - // deal with a single return value anyway. It should start from - // the last fn. - var n = fns.length; - while (n--) { - arg = fns[n].call(this, arg); - } - return arg; - }; - } - - module.exports = compose; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/debounce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/debounce.js deleted file mode 100644 index a0ed07f5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/debounce.js +++ /dev/null @@ -1,29 +0,0 @@ - - - /** - * Debounce callback execution - */ - function debounce(fn, threshold, isAsap){ - var timeout, result; - function debounced(){ - var args = arguments, context = this; - function delayed(){ - if (! isAsap) { - result = fn.apply(context, args); - } - timeout = null; - } - if (timeout) { - clearTimeout(timeout); - } else if (isAsap) { - result = fn.apply(context, args); - } - timeout = setTimeout(delayed, threshold); - return result; - } - return debounced; - } - - module.exports = debounce; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/func.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/func.js deleted file mode 100644 index b81bf0a8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/func.js +++ /dev/null @@ -1,14 +0,0 @@ - - - /** - * Returns a function that call a method on the passed object - */ - function func(name){ - return function(obj){ - return obj[name](); - }; - } - - module.exports = func; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/makeIterator_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/makeIterator_.js deleted file mode 100644 index 767610a5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/makeIterator_.js +++ /dev/null @@ -1,34 +0,0 @@ -var prop = require('./prop'); -var deepMatches = require('../object/deepMatches'); - - /** - * Converts argument into a valid iterator. - * Used internally on most array/object/collection methods that receives a - * callback/iterator providing a shortcut syntax. - */ - function makeIterator(src, thisObj){ - switch(typeof src) { - case 'object': - // typeof null == "object" - return (src != null)? function(val, key, target){ - return deepMatches(val, src); - } : src; - case 'string': - case 'number': - return prop(src); - case 'function': - if (typeof thisObj === 'undefined') { - return src; - } else { - return function(val, i, arr){ - return src.call(thisObj, val, i, arr); - }; - } - default: - return src; - } - } - - module.exports = makeIterator; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/partial.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/partial.js deleted file mode 100644 index d63ff1be..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/partial.js +++ /dev/null @@ -1,19 +0,0 @@ - - - function slice(arr, offset){ - return Array.prototype.slice.call(arr, offset || 0); - } - - /** - * Creates a partially applied function. - */ - function partial(fn, var_args){ - var argsArr = slice(arguments, 1); //curried args - return function(){ - return fn.apply(this, argsArr.concat(slice(arguments))); - }; - } - - module.exports = partial; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/prop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/prop.js deleted file mode 100644 index 734acb7a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/prop.js +++ /dev/null @@ -1,14 +0,0 @@ - - - /** - * Returns a function that gets a property of the passed object - */ - function prop(name){ - return function(obj){ - return obj[name]; - }; - } - - module.exports = prop; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/series.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/series.js deleted file mode 100644 index 25159c2c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/series.js +++ /dev/null @@ -1,22 +0,0 @@ - - - /** - * Returns a function that will execute a list of functions in sequence - * passing the same arguments to each one. (useful for batch processing - * items during a forEach loop) - */ - function series(){ - var fns = arguments; - return function(){ - var i = 0, - n = fns.length; - while (i < n) { - fns[i].apply(this, arguments); - i += 1; - } - }; - } - - module.exports = series; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/throttle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/throttle.js deleted file mode 100644 index 619dc540..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/throttle.js +++ /dev/null @@ -1,32 +0,0 @@ -var now = require('../time/now'); - - /** - */ - function throttle(fn, delay){ - var context, timeout, result, args, - cur, diff, prev = 0; - function delayed(){ - prev = now(); - timeout = null; - result = fn.apply(context, args); - } - function throttled(){ - context = this; - args = arguments; - cur = now(); - diff = delay - (cur - prev); - if (diff <= 0) { - clearTimeout(timeout); - prev = cur; - result = fn.apply(context, args); - } else if (! timeout) { - timeout = setTimeout(delayed, diff); - } - return result; - } - return throttled; - } - - module.exports = throttle; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/timeout.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/timeout.js deleted file mode 100644 index e0d21a66..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/function/timeout.js +++ /dev/null @@ -1,21 +0,0 @@ - - - function slice(arr, offset){ - return Array.prototype.slice.call(arr, offset || 0); - } - - /** - * Delays the call of a function within a given context. - */ - function timeout(fn, millis, context){ - - var args = slice(arguments, 3); - - return setTimeout(function() { - fn.apply(context, args); - }, millis); - } - - module.exports = timeout; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/index.js deleted file mode 100644 index 32a1c639..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/**@license - * mout v0.6.0 | http://moutjs.com | MIT license - */ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'VERSION' : '0.6.0', - 'array' : require('./array'), - 'collection' : require('./collection'), - 'date' : require('./date'), - 'function' : require('./function'), - 'lang' : require('./lang'), - 'math' : require('./math'), - 'number' : require('./number'), - 'object' : require('./object'), - 'queryString' : require('./queryString'), - 'random' : require('./random'), - 'string' : require('./string'), - 'time' : require('./time') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang.js deleted file mode 100644 index b9816218..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang.js +++ /dev/null @@ -1,36 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'clone' : require('./lang/clone'), - 'createObject' : require('./lang/createObject'), - 'ctorApply' : require('./lang/ctorApply'), - 'deepClone' : require('./lang/deepClone'), - 'defaults' : require('./lang/defaults'), - 'inheritPrototype' : require('./lang/inheritPrototype'), - 'is' : require('./lang/is'), - 'isArguments' : require('./lang/isArguments'), - 'isArray' : require('./lang/isArray'), - 'isBoolean' : require('./lang/isBoolean'), - 'isDate' : require('./lang/isDate'), - 'isEmpty' : require('./lang/isEmpty'), - 'isFinite' : require('./lang/isFinite'), - 'isFunction' : require('./lang/isFunction'), - 'isInteger' : require('./lang/isInteger'), - 'isKind' : require('./lang/isKind'), - 'isNaN' : require('./lang/isNaN'), - 'isNull' : require('./lang/isNull'), - 'isNumber' : require('./lang/isNumber'), - 'isObject' : require('./lang/isObject'), - 'isPlainObject' : require('./lang/isPlainObject'), - 'isRegExp' : require('./lang/isRegExp'), - 'isString' : require('./lang/isString'), - 'isUndefined' : require('./lang/isUndefined'), - 'isnt' : require('./lang/isnt'), - 'kindOf' : require('./lang/kindOf'), - 'toArray' : require('./lang/toArray'), - 'toString' : require('./lang/toString') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/clone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/clone.js deleted file mode 100644 index 33c4e949..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/clone.js +++ /dev/null @@ -1,49 +0,0 @@ -var kindOf = require('./kindOf'); -var isPlainObject = require('./isPlainObject'); -var mixIn = require('../object/mixIn'); - - /** - * Clone native types. - */ - function clone(val){ - switch (kindOf(val)) { - case 'Object': - return cloneObject(val); - case 'Array': - return cloneArray(val); - case 'RegExp': - return cloneRegExp(val); - case 'Date': - return cloneDate(val); - default: - return val; - } - } - - function cloneObject(source) { - if (isPlainObject(source)) { - return mixIn({}, source); - } else { - return source; - } - } - - function cloneRegExp(r) { - var flags = ''; - flags += r.multiline ? 'm' : ''; - flags += r.global ? 'g' : ''; - flags += r.ignorecase ? 'i' : ''; - return new RegExp(r.source, flags); - } - - function cloneDate(date) { - return new Date(+date); - } - - function cloneArray(arr) { - return arr.slice(); - } - - module.exports = clone; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/createObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/createObject.js deleted file mode 100644 index bbc14c1d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/createObject.js +++ /dev/null @@ -1,18 +0,0 @@ -var mixIn = require('../object/mixIn'); - - /** - * Create Object using prototypal inheritance and setting custom properties. - * - Mix between Douglas Crockford Prototypal Inheritance <http://javascript.crockford.com/prototypal.html> and the EcmaScript 5 `Object.create()` method. - * @param {object} parent Parent Object. - * @param {object} [props] Object properties. - * @return {object} Created object. - */ - function createObject(parent, props){ - function F(){} - F.prototype = parent; - return mixIn(new F(), props); - - } - module.exports = createObject; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/ctorApply.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/ctorApply.js deleted file mode 100644 index d68dc506..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/ctorApply.js +++ /dev/null @@ -1,17 +0,0 @@ - - - function F(){} - - /** - * Do fn.apply on a constructor. - */ - function ctorApply(ctor, args) { - F.prototype = ctor.prototype; - var instance = new F(); - ctor.apply(instance, args); - return instance; - } - - module.exports = ctorApply; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/deepClone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/deepClone.js deleted file mode 100644 index 25fd95f1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/deepClone.js +++ /dev/null @@ -1,48 +0,0 @@ -var clone = require('./clone'); -var forOwn = require('../object/forOwn'); -var kindOf = require('./kindOf'); -var isPlainObject = require('./isPlainObject'); - - /** - * Recursively clone native types. - */ - function deepClone(val, instanceClone) { - switch ( kindOf(val) ) { - case 'Object': - return cloneObject(val, instanceClone); - case 'Array': - return cloneArray(val, instanceClone); - default: - return clone(val); - } - } - - function cloneObject(source, instanceClone) { - if (isPlainObject(source)) { - var out = {}; - forOwn(source, function(val, key) { - this[key] = deepClone(val, instanceClone); - }, out); - return out; - } else if (instanceClone) { - return instanceClone(source); - } else { - return source; - } - } - - function cloneArray(arr, instanceClone) { - var out = [], - i = -1, - n = arr.length, - val; - while (++i < n) { - out[i] = deepClone(arr[i], instanceClone); - } - return out; - } - - module.exports = deepClone; - - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/defaults.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/defaults.js deleted file mode 100644 index 1111b2ef..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/defaults.js +++ /dev/null @@ -1,17 +0,0 @@ -var toArray = require('./toArray'); -var find = require('../array/find'); - - /** - * Return first non void argument - */ - function defaults(var_args){ - return find(toArray(arguments), nonVoid); - } - - function nonVoid(val){ - return val != null; - } - - module.exports = defaults; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/inheritPrototype.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/inheritPrototype.js deleted file mode 100644 index cd8a379e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/inheritPrototype.js +++ /dev/null @@ -1,16 +0,0 @@ -var createObject = require('./createObject'); - - /** - * Inherit prototype from another Object. - * - inspired by Nicholas Zackas <http://nczonline.net> Solution - * @param {object} child Child object - * @param {object} parent Parent Object - */ - function inheritPrototype(child, parent){ - var p = createObject(parent.prototype); - p.constructor = child; - child.prototype = p; - } - - module.exports = inheritPrototype; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/is.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/is.js deleted file mode 100644 index 4a835739..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/is.js +++ /dev/null @@ -1,23 +0,0 @@ - - - /** - * Check if both arguments are egal. - */ - function is(x, y){ - // implementation borrowed from harmony:egal spec - if (x === y) { - // 0 === -0, but they are not identical - return x !== 0 || 1 / x === 1 / y; - } - - // NaN !== NaN, but they are identical. - // NaNs are the only non-reflexive value, i.e., if x !== x, - // then x is a NaN. - // isNaN is broken: it converts its argument to number, so - // isNaN("foo") => true - return x !== x && y !== y; - } - - module.exports = is; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isArguments.js deleted file mode 100644 index f7b08ba4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isArguments.js +++ /dev/null @@ -1,15 +0,0 @@ -var isKind = require('./isKind'); - - /** - */ - var isArgs = isKind(arguments, 'Arguments')? - function(val){ - return isKind(val, 'Arguments'); - } : - function(val){ - // Arguments is an Object on IE7 - return !!(val && Object.prototype.hasOwnProperty.call(val, 'callee')); - }; - - module.exports = isArgs; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isArray.js deleted file mode 100644 index 262ee400..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isArray.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - var isArray = Array.isArray || function (val) { - return isKind(val, 'Array'); - }; - module.exports = isArray; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isBoolean.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isBoolean.js deleted file mode 100644 index 86557cb9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isBoolean.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isBoolean(val) { - return isKind(val, 'Boolean'); - } - module.exports = isBoolean; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isDate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isDate.js deleted file mode 100644 index 4a5130f2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isDate.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isDate(val) { - return isKind(val, 'Date'); - } - module.exports = isDate; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isEmpty.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isEmpty.js deleted file mode 100644 index 0e9f77da..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isEmpty.js +++ /dev/null @@ -1,24 +0,0 @@ -var forOwn = require('../object/forOwn'); -var isArray = require('./isArray'); - - function isEmpty(val){ - if (val == null) { - // typeof null == 'object' so we check it first - return false; - } else if ( typeof val === 'string' || isArray(val) ) { - return !val.length; - } else if ( typeof val === 'object' || typeof val === 'function' ) { - var result = true; - forOwn(val, function(){ - result = false; - return false; // break loop - }); - return result; - } else { - return false; - } - } - - module.exports = isEmpty; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isFinite.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isFinite.js deleted file mode 100644 index 6d4006f9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isFinite.js +++ /dev/null @@ -1,21 +0,0 @@ -var isNumber = require('./isNumber'); - - var global = this; - - /** - * Check if value is finite - */ - function isFinite(val){ - var is = false; - if (typeof val === 'string' && val !== '') { - is = global.isFinite( parseFloat(val) ); - } else if (isNumber(val)){ - // need to use isNumber because of Number constructor - is = global.isFinite( val ); - } - return is; - } - - module.exports = isFinite; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isFunction.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isFunction.js deleted file mode 100644 index 216879f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isFunction.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isFunction(val) { - return isKind(val, 'Function'); - } - module.exports = isFunction; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isInteger.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isInteger.js deleted file mode 100644 index 29f95d96..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isInteger.js +++ /dev/null @@ -1,12 +0,0 @@ -var isNumber = require('./isNumber'); - - /** - * Check if value is an integer - */ - function isInteger(val){ - return isNumber(val) && (val % 1 === 0); - } - - module.exports = isInteger; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isKind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isKind.js deleted file mode 100644 index 02301e04..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isKind.js +++ /dev/null @@ -1,9 +0,0 @@ -var kindOf = require('./kindOf'); - /** - * Check if value is from a specific "kind". - */ - function isKind(val, kind){ - return kindOf(val) === kind; - } - module.exports = isKind; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNaN.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNaN.js deleted file mode 100644 index f6efeb1f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNaN.js +++ /dev/null @@ -1,15 +0,0 @@ -var isNumber = require('./isNumber'); - - /** - * Check if value is NaN for realz - */ - function isNaN(val){ - // based on the fact that NaN !== NaN - // need to check if it's a number to avoid conflicts with host objects - // also need to coerce ToNumber to avoid edge case `new Number(NaN)` - return !isNumber(val) || val != +val; - } - - module.exports = isNaN; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNull.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNull.js deleted file mode 100644 index 6252f9ef..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNull.js +++ /dev/null @@ -1,9 +0,0 @@ - - /** - */ - function isNull(val){ - return val === null; - } - module.exports = isNull; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNumber.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNumber.js deleted file mode 100644 index 126c1cce..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isNumber.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isNumber(val) { - return isKind(val, 'Number'); - } - module.exports = isNumber; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isObject.js deleted file mode 100644 index 7350c891..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isObject.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isObject(val) { - return isKind(val, 'Object'); - } - module.exports = isObject; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isPlainObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isPlainObject.js deleted file mode 100644 index 0d2d7b65..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isPlainObject.js +++ /dev/null @@ -1,14 +0,0 @@ - - - /** - * Checks if the value is created by the `Object` constructor. - */ - function isPlainObject(value) { - return (!!value - && typeof value === 'object' - && value.constructor === Object); - } - - module.exports = isPlainObject; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isRegExp.js deleted file mode 100644 index fc5459a9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isRegExp.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isRegExp(val) { - return isKind(val, 'RegExp'); - } - module.exports = isRegExp; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isString.js deleted file mode 100644 index f8906584..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isString.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isString(val) { - return isKind(val, 'String'); - } - module.exports = isString; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isUndefined.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isUndefined.js deleted file mode 100644 index fb2261df..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isUndefined.js +++ /dev/null @@ -1,10 +0,0 @@ - - var UNDEF; - - /** - */ - function isUndef(val){ - return val === UNDEF; - } - module.exports = isUndef; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isnt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isnt.js deleted file mode 100644 index 9dad58ce..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/isnt.js +++ /dev/null @@ -1,12 +0,0 @@ -var is = require('./is'); - - /** - * Check if both values are not identical/egal - */ - function isnt(x, y){ - return !is(x, y); - } - - module.exports = isnt; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/kindOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/kindOf.js deleted file mode 100644 index 663464d0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/kindOf.js +++ /dev/null @@ -1,20 +0,0 @@ - - - var _rKind = /^\[object (.*)\]$/, - _toString = Object.prototype.toString, - UNDEF; - - /** - * Gets the "kind" of value. (e.g. "String", "Number", etc) - */ - function kindOf(val) { - if (val === null) { - return 'Null'; - } else if (val === UNDEF) { - return 'Undefined'; - } else { - return _rKind.exec( _toString.call(val) )[1]; - } - } - module.exports = kindOf; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/toArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/toArray.js deleted file mode 100644 index e39b8734..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/toArray.js +++ /dev/null @@ -1,31 +0,0 @@ -var kindOf = require('./kindOf'); - - var _win = this; - - /** - * Convert array-like object into array - */ - function toArray(val){ - var ret = [], - kind = kindOf(val), - n; - - if (val != null) { - if ( val.length == null || kind === 'String' || kind === 'Function' || kind === 'RegExp' || val === _win ) { - //string, regexp, function have .length but user probably just want - //to wrap value into an array.. - ret[ret.length] = val; - } else { - //window returns true on isObject in IE7 and may have length - //property. `typeof NodeList` returns `function` on Safari so - //we can't use it (#58) - n = val.length; - while (n--) { - ret[n] = val[n]; - } - } - } - return ret; - } - module.exports = toArray; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/toString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/toString.js deleted file mode 100644 index ae5c2b0f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/lang/toString.js +++ /dev/null @@ -1,13 +0,0 @@ - - - /** - * Typecast a value to a String, using an empty string value for null or - * undefined. - */ - function toString(val){ - return val == null ? '' : val.toString(); - } - - module.exports = toString; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math.js deleted file mode 100644 index c6ee889b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math.js +++ /dev/null @@ -1,19 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'ceil' : require('./math/ceil'), - 'clamp' : require('./math/clamp'), - 'countSteps' : require('./math/countSteps'), - 'floor' : require('./math/floor'), - 'inRange' : require('./math/inRange'), - 'isNear' : require('./math/isNear'), - 'lerp' : require('./math/lerp'), - 'loop' : require('./math/loop'), - 'map' : require('./math/map'), - 'norm' : require('./math/norm'), - 'round' : require('./math/round') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/ceil.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/ceil.js deleted file mode 100644 index a279e158..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/ceil.js +++ /dev/null @@ -1,11 +0,0 @@ - - /** - * Round value up with a custom radix. - */ - function ceil(val, step){ - step = Math.abs(step || 1); - return Math.ceil(val / step) * step; - } - - module.exports = ceil; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/clamp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/clamp.js deleted file mode 100644 index e929a9a6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/clamp.js +++ /dev/null @@ -1,9 +0,0 @@ - - /** - * Clamps value inside range. - */ - function clamp(val, min, max){ - return val < min? min : (val > max? max : val); - } - module.exports = clamp; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/countSteps.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/countSteps.js deleted file mode 100644 index 60ac90c3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/countSteps.js +++ /dev/null @@ -1,16 +0,0 @@ - - /** - * Count number of full steps. - */ - function countSteps(val, step, overflow){ - val = Math.floor(val / step); - - if (overflow) { - return val % overflow; - } - - return val; - } - - module.exports = countSteps; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/floor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/floor.js deleted file mode 100644 index 9de50531..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/floor.js +++ /dev/null @@ -1,10 +0,0 @@ - - /** - * Floor value to full steps. - */ - function floor(val, step){ - step = Math.abs(step || 1); - return Math.floor(val / step) * step; - } - module.exports = floor; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/inRange.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/inRange.js deleted file mode 100644 index 763218f8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/inRange.js +++ /dev/null @@ -1,11 +0,0 @@ - - /** - * Checks if value is inside the range. - */ - function inRange(val, min, max, threshold){ - threshold = threshold || 0; - return (val + threshold >= min && val - threshold <= max); - } - - module.exports = inRange; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/isNear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/isNear.js deleted file mode 100644 index 45486b6d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/isNear.js +++ /dev/null @@ -1,9 +0,0 @@ - - /** - * Check if value is close to target. - */ - function isNear(val, target, threshold){ - return (Math.abs(val - target) <= threshold); - } - module.exports = isNear; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/lerp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/lerp.js deleted file mode 100644 index 111e2717..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/lerp.js +++ /dev/null @@ -1,11 +0,0 @@ - - /** - * Linear interpolation. - * IMPORTANT:will return `Infinity` if numbers overflow Number.MAX_VALUE - */ - function lerp(ratio, start, end){ - return start + (end - start) * ratio; - } - - module.exports = lerp; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/loop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/loop.js deleted file mode 100644 index 35207c1a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/loop.js +++ /dev/null @@ -1,10 +0,0 @@ - - /** - * Loops value inside range. - */ - function loop(val, min, max){ - return val < min? max : (val > max? min : val); - } - - module.exports = loop; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/map.js deleted file mode 100644 index 96c4b787..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/map.js +++ /dev/null @@ -1,11 +0,0 @@ -var lerp = require('./lerp'); -var norm = require('./norm'); - /** - * Maps a number from one scale to another. - * @example map(3, 0, 4, -1, 1) -> 0.5 - */ - function map(val, min1, max1, min2, max2){ - return lerp( norm(val, min1, max1), min2, max2 ); - } - module.exports = map; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/norm.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/norm.js deleted file mode 100644 index 54caf78a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/norm.js +++ /dev/null @@ -1,9 +0,0 @@ - - /** - * Gets normalized ratio of value inside range. - */ - function norm(val, min, max){ - return (val - min) / (max - min); - } - module.exports = norm; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/round.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/round.js deleted file mode 100644 index d108e6cd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/math/round.js +++ /dev/null @@ -1,12 +0,0 @@ - - /** - * Round number to a specific radix - */ - function round(value, radix){ - radix = radix || 1; // default round 1 - return Math.round(value / radix) * radix; - } - - module.exports = round; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number.js deleted file mode 100644 index 0b6186cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number.js +++ /dev/null @@ -1,21 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'MAX_INT' : require('./number/MAX_INT'), - 'MAX_UINT' : require('./number/MAX_UINT'), - 'MIN_INT' : require('./number/MIN_INT'), - 'abbreviate' : require('./number/abbreviate'), - 'currencyFormat' : require('./number/currencyFormat'), - 'enforcePrecision' : require('./number/enforcePrecision'), - 'pad' : require('./number/pad'), - 'rol' : require('./number/rol'), - 'ror' : require('./number/ror'), - 'sign' : require('./number/sign'), - 'toInt' : require('./number/toInt'), - 'toUInt' : require('./number/toUInt'), - 'toUInt31' : require('./number/toUInt31') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/MAX_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/MAX_INT.js deleted file mode 100644 index 1d6f0e48..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/MAX_INT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Maximum 32-bit signed integer value. (2^31 - 1) - */ - - module.exports = 2147483647; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/MAX_UINT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/MAX_UINT.js deleted file mode 100644 index 700da0f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/MAX_UINT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Maximum 32-bit unsigned integet value (2^32 - 1) - */ - - module.exports = 4294967295; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/MIN_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/MIN_INT.js deleted file mode 100644 index b34ab2ce..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/MIN_INT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Minimum 32-bit signed integer value (-2^31). - */ - - module.exports = -2147483648; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/abbreviate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/abbreviate.js deleted file mode 100644 index dd6716b9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/abbreviate.js +++ /dev/null @@ -1,35 +0,0 @@ -var enforcePrecision = require('./enforcePrecision'); - - var _defaultDict = { - thousand : 'K', - million : 'M', - billion : 'B' - }; - - /** - * Abbreviate number if bigger than 1000. (eg: 2.5K, 17.5M, 3.4B, ...) - */ - function abbreviateNumber(val, nDecimals, dict){ - nDecimals = nDecimals != null? nDecimals : 1; - dict = dict || _defaultDict; - val = enforcePrecision(val, nDecimals); - - var str, mod; - - if (val < 1000000) { - mod = enforcePrecision(val / 1000, nDecimals); - // might overflow to next scale during rounding - str = mod < 1000? mod + dict.thousand : 1 + dict.million; - } else if (val < 1000000000) { - mod = enforcePrecision(val / 1000000, nDecimals); - str = mod < 1000? mod + dict.million : 1 + dict.billion; - } else { - str = enforcePrecision(val / 1000000000, nDecimals) + dict.billion; - } - - return str; - } - - module.exports = abbreviateNumber; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/currencyFormat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/currencyFormat.js deleted file mode 100644 index 1cf02497..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/currencyFormat.js +++ /dev/null @@ -1,26 +0,0 @@ - - - /** - * Converts number into currency format - */ - function currencyFormat(val, nDecimalDigits, decimalSeparator, thousandsSeparator) { - nDecimalDigits = nDecimalDigits == null? 2 : nDecimalDigits; - decimalSeparator = decimalSeparator == null? '.' : decimalSeparator; - thousandsSeparator = thousandsSeparator == null? ',' : thousandsSeparator; - - //can't use enforce precision since it returns a number and we are - //doing a RegExp over the string - var fixed = val.toFixed(nDecimalDigits), - //separate begin [$1], middle [$2] and decimal digits [$4] - parts = new RegExp('^(-?\\d{1,3})((?:\\d{3})+)(\\.(\\d{'+ nDecimalDigits +'}))?$').exec( fixed ); - - if(parts){ //val >= 1000 || val <= -1000 - return parts[1] + parts[2].replace(/\d{3}/g, thousandsSeparator + '$&') + (parts[4] ? decimalSeparator + parts[4] : ''); - }else{ - return fixed.replace('.', decimalSeparator); - } - } - - module.exports = currencyFormat; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/enforcePrecision.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/enforcePrecision.js deleted file mode 100644 index f73a92d7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/enforcePrecision.js +++ /dev/null @@ -1,13 +0,0 @@ - - /** - * Enforce a specific amount of decimal digits and also fix floating - * point rounding issues. - * @example `enforcePrecision(0.615, 2) -> 0.62`, `(0.615).toFixed(2) -> - * 0.61` - */ - function enforcePrecision(val, nDecimalDigits){ - var pow = Math.pow(10, nDecimalDigits); - return +(Math.round(val * pow) / pow).toFixed(nDecimalDigits); - } - module.exports = enforcePrecision; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/pad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/pad.js deleted file mode 100644 index da752706..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/pad.js +++ /dev/null @@ -1,12 +0,0 @@ -var lpad = require('../string/lpad'); - - /** - * Add padding zeros if n.length < minLength. - */ - function pad(n, minLength, char){ - return lpad(''+ n, minLength, char || '0'); - } - - module.exports = pad; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/rol.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/rol.js deleted file mode 100644 index ecd58da4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/rol.js +++ /dev/null @@ -1,10 +0,0 @@ - - /** - * Bitwise circular shift left - * http://en.wikipedia.org/wiki/Circular_shift - */ - function rol(val, shift){ - return (val << shift) | (val >> (32 - shift)); - } - module.exports = rol; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/ror.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/ror.js deleted file mode 100644 index 2eda81da..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/ror.js +++ /dev/null @@ -1,10 +0,0 @@ - - /** - * Bitwise circular shift right - * http://en.wikipedia.org/wiki/Circular_shift - */ - function ror(val, shift){ - return (val >> shift) | (val << (32 - shift)); - } - module.exports = ror; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/sign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/sign.js deleted file mode 100644 index b854a4ed..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/sign.js +++ /dev/null @@ -1,15 +0,0 @@ - - - /** - * Get sign of the value. - */ - function sign(val) { - var num = Number(val); - if (num === 0) return num; // +0 and +0 === 0 - if (isNaN(num)) return num; // NaN - return num < 0? -1 : 1; - } - - module.exports = sign; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/toInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/toInt.js deleted file mode 100644 index bcefae0e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/toInt.js +++ /dev/null @@ -1,15 +0,0 @@ - - - /** - * "Convert" value into an 32-bit integer. - * Works like `Math.floor` if val > 0 and `Math.ceil` if val < 0. - * IMPORTANT: val will wrap at 2^31 and -2^31. - * Perf tests: http://jsperf.com/vs-vs-parseint-bitwise-operators/7 - */ - function toInt(val){ - return ~~val; - } - - module.exports = toInt; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/toUInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/toUInt.js deleted file mode 100644 index 5290b627..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/toUInt.js +++ /dev/null @@ -1,13 +0,0 @@ - - - /** - * "Convert" value into a 32-bit unsigned integer. - * IMPORTANT: Value will wrap at 2^32. - */ - function toUInt(val){ - return val >>> 0; - } - - module.exports = toUInt; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/toUInt31.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/toUInt31.js deleted file mode 100644 index fcc5a97c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/number/toUInt31.js +++ /dev/null @@ -1,13 +0,0 @@ -var MAX_INT = require('./MAX_INT'); - - /** - * "Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). - * IMPORTANT: value wil wrap at 2^31, if negative will return 0. - */ - function toUInt31(val){ - return (val <= 0)? 0 : (val > MAX_INT? ~~(val % (MAX_INT + 1)) : ~~val); - } - - module.exports = toUInt31; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object.js deleted file mode 100644 index 76c06424..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object.js +++ /dev/null @@ -1,42 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'bindAll' : require('./object/bindAll'), - 'contains' : require('./object/contains'), - 'deepEquals' : require('./object/deepEquals'), - 'deepFillIn' : require('./object/deepFillIn'), - 'deepMatches' : require('./object/deepMatches'), - 'deepMixIn' : require('./object/deepMixIn'), - 'equals' : require('./object/equals'), - 'every' : require('./object/every'), - 'fillIn' : require('./object/fillIn'), - 'filter' : require('./object/filter'), - 'find' : require('./object/find'), - 'forIn' : require('./object/forIn'), - 'forOwn' : require('./object/forOwn'), - 'functions' : require('./object/functions'), - 'get' : require('./object/get'), - 'has' : require('./object/has'), - 'hasOwn' : require('./object/hasOwn'), - 'keys' : require('./object/keys'), - 'map' : require('./object/map'), - 'matches' : require('./object/matches'), - 'max' : require('./object/max'), - 'merge' : require('./object/merge'), - 'min' : require('./object/min'), - 'mixIn' : require('./object/mixIn'), - 'namespace' : require('./object/namespace'), - 'pick' : require('./object/pick'), - 'pluck' : require('./object/pluck'), - 'reduce' : require('./object/reduce'), - 'reject' : require('./object/reject'), - 'set' : require('./object/set'), - 'size' : require('./object/size'), - 'some' : require('./object/some'), - 'unset' : require('./object/unset'), - 'values' : require('./object/values') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/bindAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/bindAll.js deleted file mode 100644 index b2f27d08..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/bindAll.js +++ /dev/null @@ -1,18 +0,0 @@ -var functions = require('./functions'); -var bind = require('../function/bind'); -var forEach = require('../array/forEach'); - - /** - * Binds methods of the object to be run in it's own context. - */ - function bindAll(obj, rest_methodNames){ - var keys = arguments.length > 1? - Array.prototype.slice.call(arguments, 1) : functions(obj); - forEach(keys, function(key){ - obj[key] = bind(obj[key], obj); - }); - } - - module.exports = bindAll; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/contains.js deleted file mode 100644 index 8076e2c5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/contains.js +++ /dev/null @@ -1,13 +0,0 @@ -var some = require('./some'); - - /** - * Check if object contains value - */ - function contains(obj, needle) { - return some(obj, function(val) { - return (val === needle); - }); - } - module.exports = contains; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/deepEquals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/deepEquals.js deleted file mode 100644 index fcde9449..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/deepEquals.js +++ /dev/null @@ -1,27 +0,0 @@ -var isObject = require('../lang/isObject'); -var equals = require('./equals'); - - function defaultCompare(a, b) { - return a === b; - } - - /** - * Recursively checks for same properties and values. - */ - function deepEquals(a, b, callback){ - callback = callback || defaultCompare; - - if (!isObject(a) || !isObject(b)) { - return callback(a, b); - } - - function compare(a, b){ - return deepEquals(a, b, callback); - } - - return equals(a, b, compare); - } - - module.exports = deepEquals; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/deepFillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/deepFillIn.js deleted file mode 100644 index d27db44d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/deepFillIn.js +++ /dev/null @@ -1,32 +0,0 @@ -var forOwn = require('./forOwn'); -var isPlainObject = require('../lang/isPlainObject'); - - /** - * Deeply copy missing properties in the target from the defaults. - */ - function deepFillIn(target, defaults){ - var i = 0, - n = arguments.length, - obj; - - while(++i < n) { - obj = arguments[i]; - if (obj) { - forOwn(obj, function(newValue, key) { - var curValue = target[key]; - if (curValue == null) { - target[key] = newValue; - } else if (isPlainObject(curValue) - && isPlainObject(newValue)) { - deepFillIn(curValue, newValue); - } - }); - } - } - - return target; - } - - module.exports = deepFillIn; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/deepMatches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/deepMatches.js deleted file mode 100644 index 3366c52d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/deepMatches.js +++ /dev/null @@ -1,55 +0,0 @@ -var forOwn = require('./forOwn'); -var isArray = require('../lang/isArray'); - - function containsMatch(array, pattern) { - var i = -1, length = array.length; - while (++i < length) { - if (deepMatches(array[i], pattern)) { - return true; - } - } - - return false; - } - - function matchArray(target, pattern) { - var i = -1, patternLength = pattern.length; - while (++i < patternLength) { - if (!containsMatch(target, pattern[i])) { - return false; - } - } - - return true; - } - - function matchObject(target, pattern) { - var result = true; - forOwn(pattern, function(val, key) { - if (!deepMatches(target[key], val)) { - // Return false to break out of forOwn early - return (result = false); - } - }); - - return result; - } - - /** - * Recursively check if the objects match. - */ - function deepMatches(target, pattern){ - if (target && typeof target === 'object') { - if (isArray(target) && isArray(pattern)) { - return matchArray(target, pattern); - } else { - return matchObject(target, pattern); - } - } else { - return target === pattern; - } - } - - module.exports = deepMatches; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/deepMixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/deepMixIn.js deleted file mode 100644 index a97e98d0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/deepMixIn.js +++ /dev/null @@ -1,34 +0,0 @@ -var forOwn = require('./forOwn'); -var isPlainObject = require('../lang/isPlainObject'); - - /** - * Mixes objects into the target object, recursively mixing existing child - * objects. - */ - function deepMixIn(target, objects) { - var i = 0, - n = arguments.length, - obj; - - while(++i < n){ - obj = arguments[i]; - if (obj) { - forOwn(obj, copyProp, target); - } - } - - return target; - } - - function copyProp(val, key) { - var existing = this[key]; - if (isPlainObject(val) && isPlainObject(existing)) { - deepMixIn(existing, val); - } else { - this[key] = val; - } - } - - module.exports = deepMixIn; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/equals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/equals.js deleted file mode 100644 index f50cbe4e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/equals.js +++ /dev/null @@ -1,36 +0,0 @@ -var hasOwn = require('./hasOwn'); -var every = require('./every'); -var isObject = require('../lang/isObject'); - - function defaultCompare(a, b) { - return a === b; - } - - // Makes a function to compare the object values from the specified compare - // operation callback. - function makeCompare(callback) { - return function(value, key) { - return hasOwn(this, key) && callback(value, this[key]); - }; - } - - function checkProperties(value, key) { - return hasOwn(this, key); - } - - /** - * Checks if two objects have the same keys and values. - */ - function equals(a, b, callback) { - callback = callback || defaultCompare; - - if (!isObject(a) || !isObject(b)) { - return callback(a, b); - } - - return (every(a, makeCompare(callback), b) && - every(b, checkProperties, a)); - } - - module.exports = equals; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/every.js deleted file mode 100644 index 01106e5f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/every.js +++ /dev/null @@ -1,23 +0,0 @@ -var forOwn = require('./forOwn'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Object every - */ - function every(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = true; - forOwn(obj, function(val, key) { - // we consider any falsy values as "false" on purpose so shorthand - // syntax can be used to check property existence - if (!callback(val, key, obj)) { - result = false; - return false; // break - } - }); - return result; - } - - module.exports = every; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/fillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/fillIn.js deleted file mode 100644 index 80dcdf07..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/fillIn.js +++ /dev/null @@ -1,20 +0,0 @@ -var forEach = require('../array/forEach'); -var forOwn = require('./forOwn'); - - /** - * Copy missing properties in the obj from the defaults. - */ - function fillIn(obj, var_defaults){ - forEach(Array.prototype.slice.call(arguments, 1), function(base){ - forOwn(base, function(val, key){ - if (obj[key] == null) { - obj[key] = val; - } - }); - }); - return obj; - } - - module.exports = fillIn; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/filter.js deleted file mode 100644 index 3a83a92f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/filter.js +++ /dev/null @@ -1,20 +0,0 @@ -var forOwn = require('./forOwn'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Creates a new object with all the properties where the callback returns - * true. - */ - function filterValues(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var output = {}; - forOwn(obj, function(value, key, obj) { - if (callback(value, key, obj)) { - output[key] = value; - } - }); - - return output; - } - module.exports = filterValues; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/find.js deleted file mode 100644 index d39c0706..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/find.js +++ /dev/null @@ -1,21 +0,0 @@ -var some = require('./some'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Returns first item that matches criteria - */ - function find(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result; - some(obj, function(value, key, obj) { - if (callback(value, key, obj)) { - result = value; - return true; //break - } - }); - return result; - } - - module.exports = find; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/forIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/forIn.js deleted file mode 100644 index 367f08ca..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/forIn.js +++ /dev/null @@ -1,62 +0,0 @@ - - - var _hasDontEnumBug, - _dontEnums; - - function checkDontEnum(){ - _dontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' - ]; - - _hasDontEnumBug = true; - - for (var key in {'toString': null}) { - _hasDontEnumBug = false; - } - } - - /** - * Similar to Array/forEach but works over object properties and fixes Don't - * Enum bug on IE. - * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation - */ - function forIn(obj, fn, thisObj){ - var key, i = 0; - // no need to check if argument is a real object that way we can use - // it for arrays, functions, date, etc. - - //post-pone check till needed - if (_hasDontEnumBug == null) checkDontEnum(); - - for (key in obj) { - if (exec(fn, obj, key, thisObj) === false) { - break; - } - } - - if (_hasDontEnumBug) { - while (key = _dontEnums[i++]) { - // since we aren't using hasOwn check we need to make sure the - // property was overwritten - if (obj[key] !== Object.prototype[key]) { - if (exec(fn, obj, key, thisObj) === false) { - break; - } - } - } - } - } - - function exec(fn, obj, key, thisObj){ - return fn.call(thisObj, obj[key], key, obj); - } - - module.exports = forIn; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/forOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/forOwn.js deleted file mode 100644 index 5f2dfbfc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/forOwn.js +++ /dev/null @@ -1,19 +0,0 @@ -var hasOwn = require('./hasOwn'); -var forIn = require('./forIn'); - - /** - * Similar to Array/forEach but works over object properties and fixes Don't - * Enum bug on IE. - * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation - */ - function forOwn(obj, fn, thisObj){ - forIn(obj, function(val, key){ - if (hasOwn(obj, key)) { - return fn.call(thisObj, obj[key], key, obj); - } - }); - } - - module.exports = forOwn; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/functions.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/functions.js deleted file mode 100644 index f5717979..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/functions.js +++ /dev/null @@ -1,18 +0,0 @@ -var forIn = require('./forIn'); - - /** - * return a list of all enumerable properties that have function values - */ - function functions(obj){ - var keys = []; - forIn(obj, function(val, key){ - if (typeof val === 'function'){ - keys.push(key); - } - }); - return keys.sort(); - } - - module.exports = functions; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/get.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/get.js deleted file mode 100644 index 6673561e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/get.js +++ /dev/null @@ -1,20 +0,0 @@ - - - /** - * get "nested" object property - */ - function get(obj, prop){ - var parts = prop.split('.'), - last = parts.pop(); - - while (prop = parts.shift()) { - obj = obj[prop]; - if (typeof obj !== 'object') return; - } - - return obj[last]; - } - - module.exports = get; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/has.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/has.js deleted file mode 100644 index ca9f2289..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/has.js +++ /dev/null @@ -1,15 +0,0 @@ -var get = require('./get'); - - var UNDEF; - - /** - * Check if object has nested property. - */ - function has(obj, prop){ - return get(obj, prop) !== UNDEF; - } - - module.exports = has; - - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/hasOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/hasOwn.js deleted file mode 100644 index 7e3c82ae..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/hasOwn.js +++ /dev/null @@ -1,12 +0,0 @@ - - - /** - * Safer Object.hasOwnProperty - */ - function hasOwn(obj, prop){ - return Object.prototype.hasOwnProperty.call(obj, prop); - } - - module.exports = hasOwn; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/keys.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/keys.js deleted file mode 100644 index dd2f4f55..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/keys.js +++ /dev/null @@ -1,16 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * Get object keys - */ - var keys = Object.keys || function (obj) { - var keys = []; - forOwn(obj, function(val, key){ - keys.push(key); - }); - return keys; - }; - - module.exports = keys; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/map.js deleted file mode 100644 index dd449a78..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/map.js +++ /dev/null @@ -1,18 +0,0 @@ -var forOwn = require('./forOwn'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Creates a new object where all the values are the result of calling - * `callback`. - */ - function mapValues(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var output = {}; - forOwn(obj, function(val, key, obj) { - output[key] = callback(val, key, obj); - }); - - return output; - } - module.exports = mapValues; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/matches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/matches.js deleted file mode 100644 index 6074faa2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/matches.js +++ /dev/null @@ -1,20 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * checks if a object contains all given properties/values - */ - function matches(target, props){ - // can't use "object/every" because of circular dependency - var result = true; - forOwn(props, function(val, key){ - if (target[key] !== val) { - // break loop at first difference - return (result = false); - } - }); - return result; - } - - module.exports = matches; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/max.js deleted file mode 100644 index 3e8e92c7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/max.js +++ /dev/null @@ -1,12 +0,0 @@ -var arrMax = require('../array/max'); -var values = require('./values'); - - /** - * Returns maximum value inside object. - */ - function max(obj, compareFn) { - return arrMax(values(obj), compareFn); - } - - module.exports = max; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/merge.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/merge.js deleted file mode 100644 index 6961f608..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/merge.js +++ /dev/null @@ -1,40 +0,0 @@ -var hasOwn = require('./hasOwn'); -var deepClone = require('../lang/deepClone'); -var isObject = require('../lang/isObject'); - - /** - * Deep merge objects. - */ - function merge() { - var i = 1, - key, val, obj, target; - - // make sure we don't modify source element and it's properties - // objects are passed by reference - target = deepClone( arguments[0] ); - - while (obj = arguments[i++]) { - for (key in obj) { - if ( ! hasOwn(obj, key) ) { - continue; - } - - val = obj[key]; - - if ( isObject(val) && isObject(target[key]) ){ - // inception, deep merge objects - target[key] = merge(target[key], val); - } else { - // make sure arrays, regexp, date, objects are cloned - target[key] = deepClone(val); - } - - } - } - - return target; - } - - module.exports = merge; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/min.js deleted file mode 100644 index e1e66976..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/min.js +++ /dev/null @@ -1,12 +0,0 @@ -var arrMin = require('../array/min'); -var values = require('./values'); - - /** - * Returns minimum value inside object. - */ - function min(obj, iterator) { - return arrMin(values(obj), iterator); - } - - module.exports = min; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/mixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/mixIn.js deleted file mode 100644 index 55ec8fd5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/mixIn.js +++ /dev/null @@ -1,28 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * Combine properties from all the objects into first one. - * - This method affects target object in place, if you want to create a new Object pass an empty object as first param. - * @param {object} target Target Object - * @param {...object} objects Objects to be combined (0...n objects). - * @return {object} Target Object. - */ - function mixIn(target, objects){ - var i = 0, - n = arguments.length, - obj; - while(++i < n){ - obj = arguments[i]; - if (obj != null) { - forOwn(obj, copyProp, target); - } - } - return target; - } - - function copyProp(val, key){ - this[key] = val; - } - - module.exports = mixIn; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/namespace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/namespace.js deleted file mode 100644 index c6e79f63..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/namespace.js +++ /dev/null @@ -1,19 +0,0 @@ -var forEach = require('../array/forEach'); - - /** - * Create nested object if non-existent - */ - function namespace(obj, path){ - if (!path) return obj; - forEach(path.split('.'), function(key){ - if (!obj[key]) { - obj[key] = {}; - } - obj = obj[key]; - }); - return obj; - } - - module.exports = namespace; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/pick.js deleted file mode 100644 index 74e56f98..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/pick.js +++ /dev/null @@ -1,18 +0,0 @@ - - - /** - * Return a copy of the object, filtered to only have values for the whitelisted keys. - */ - function pick(obj, var_keys){ - var keys = typeof arguments[1] !== 'string'? arguments[1] : Array.prototype.slice.call(arguments, 1), - out = {}, - i = 0, key; - while (key = keys[i++]) { - out[key] = obj[key]; - } - return out; - } - - module.exports = pick; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/pluck.js deleted file mode 100644 index e844df47..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/pluck.js +++ /dev/null @@ -1,13 +0,0 @@ -var map = require('./map'); -var prop = require('../function/prop'); - - /** - * Extract a list of property values. - */ - function pluck(obj, propName){ - return map(obj, prop(propName)); - } - - module.exports = pluck; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/reduce.js deleted file mode 100644 index 6f19a3a2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/reduce.js +++ /dev/null @@ -1,29 +0,0 @@ -var forOwn = require('./forOwn'); -var size = require('./size'); - - /** - * Object reduce - */ - function reduce(obj, callback, memo, thisObj) { - var initial = arguments.length > 2; - - if (!size(obj) && !initial) { - throw new Error('reduce of empty object with no initial value'); - } - - forOwn(obj, function(value, key, list) { - if (!initial) { - memo = value; - initial = true; - } - else { - memo = callback.call(thisObj, memo, value, key, list); - } - }); - - return memo; - } - - module.exports = reduce; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/reject.js deleted file mode 100644 index 74643795..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/reject.js +++ /dev/null @@ -1,16 +0,0 @@ -var filter = require('./filter'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Object reject - */ - function reject(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - return filter(obj, function(value, index, obj) { - return !callback(value, index, obj); - }, thisObj); - } - - module.exports = reject; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/set.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/set.js deleted file mode 100644 index 9b3cdc48..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/set.js +++ /dev/null @@ -1,17 +0,0 @@ -var namespace = require('./namespace'); - - /** - * set "nested" object property - */ - function set(obj, prop, val){ - var parts = (/^(.+)\.(.+)$/).exec(prop); - if (parts){ - namespace(obj, parts[1])[parts[2]] = val; - } else { - obj[prop] = val; - } - } - - module.exports = set; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/size.js deleted file mode 100644 index 97885953..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/size.js +++ /dev/null @@ -1,16 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * Get object size - */ - function size(obj) { - var count = 0; - forOwn(obj, function(){ - count++; - }); - return count; - } - - module.exports = size; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/some.js deleted file mode 100644 index 384c6f3c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/some.js +++ /dev/null @@ -1,21 +0,0 @@ -var forOwn = require('./forOwn'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Object some - */ - function some(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = false; - forOwn(obj, function(val, key) { - if (callback(val, key, obj)) { - result = true; - return false; // break - } - }); - return result; - } - - module.exports = some; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/unset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/unset.js deleted file mode 100644 index 343bca0a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/unset.js +++ /dev/null @@ -1,23 +0,0 @@ -var has = require('./has'); - - /** - * Unset object property. - */ - function unset(obj, prop){ - if (has(obj, prop)) { - var parts = prop.split('.'), - last = parts.pop(); - while (prop = parts.shift()) { - obj = obj[prop]; - } - return (delete obj[last]); - - } else { - // if property doesn't exist treat as deleted - return true; - } - } - - module.exports = unset; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/values.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/values.js deleted file mode 100644 index 265a6938..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/object/values.js +++ /dev/null @@ -1,16 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * Get object values - */ - function values(obj) { - var vals = []; - forOwn(obj, function(val, key){ - vals.push(val); - }); - return vals; - } - - module.exports = values; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/package.json deleted file mode 100644 index 76eadf21..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/package.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "name": "mout", - "description": "Modular Utilities", - "version": "0.6.0", - "homepage": "http://moutjs.com/", - "contributors": [ - { - "name": "Adam Nowotny" - }, - { - "name": "André Cruz", - "email": "amdfcruz@gmail.com" - }, - { - "name": "Conrad Zimmerman", - "url": "http://www.conradz.com" - }, - { - "name": "Friedemann Altrock", - "email": "frodenius@gmail.com" - }, - { - "name": "Jarrod Overson", - "url": "http://jarrodoverson.com" - }, - { - "name": "Miller Medeiros", - "email": "contact@millermedeiros.com", - "url": "http://blog.millermedeiros.com" - }, - { - "name": "Zach Shipley" - } - ], - "keywords": [ - "utilities", - "functional", - "amd-utils", - "stdlib" - ], - "repository": { - "type": "git", - "url": "git://github.com/mout/mout.git" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://www.opensource.org/licenses/mit-license.php" - } - ], - "bugs": { - "url": "https://github.com/mout/mout/issues/" - }, - "main": "./index.js", - "scripts": { - "prepublish": "node build cjs .", - "pretest": "node build pkg", - "test": "node node_modules/istanbul/lib/cli test tests/runner.js --hook-run-in-context" - }, - "directories": { - "doc": "./doc" - }, - "devDependencies": { - "istanbul": "~0.1.27", - "jasmine-node": "~1.2.2", - "requirejs": "2.x", - "nodefy": "*", - "mdoc": "~0.3.2", - "handlebars": "~1.0.6", - "commander": "~1.0.5", - "rocambole": "~0.2.3" - }, - "testling": { - "preprocess": "node build testling", - "browsers": { - "ie": [ - 7, - 8, - 9, - 10 - ], - "firefox": [ - 17, - "nightly" - ], - "chrome": [ - 23, - "canary" - ], - "opera": [ - 12, - "next" - ], - "safari": [ - 5.1, - 6 - ], - "iphone": [ - 6 - ], - "ipad": [ - 6 - ] - }, - "scripts": [ - "tests/lib/jasmine/jasmine.js", - "tests/lib/jasmine/jasmine.async.js", - "tests/lib/jasmine/jasmine-tap.js", - "tests/lib/requirejs/require.js", - "tests/testling/src.js", - "tests/testling/specs.js", - "tests/runner.js" - ] - }, - "readme": "![mout](http://moutjs.com/logo.png \"Modular JavaScript Utilties\")\n\nhttp://moutjs.com/\n\n[![Build Status](https://travis-ci.org/mout/mout.png?branch=master)](https://travis-ci.org/mout/mout)\n\nAll code is library agnostic and consist mostly of helper methods that aren't\ndirectly related with the DOM, the purpose of this library isn't to replace\nDojo, jQuery, YUI, Mootools, etc, but to provide modular solutions for common\nproblems that aren't solved by most of them. Consider it as a crossbrowser\nJavaScript standard library.\n\n\n\n## Main goals ##\n\n - increase code reuse;\n - be clear (code should be clean/readable);\n - be easy to debug;\n - be easy to maintain;\n - follow best practices;\n - follow standards when possible;\n - **don't convert JavaScript into another language!**\n - be compatible with other frameworks;\n - be modular;\n - have unit tests for all modules;\n - work on multiple environments (IE7+, modern browsers, node.js);\n\n\n\n## What shouldn't be here ##\n\n - UI components;\n - CSS selector engine;\n - Event system - pub/sub;\n - Template engine;\n - Anything that isn't generic enough to be on a standard library;\n - Anything that could be a separate library and/or isn't a modular utility...\n\n\n\n## API Documentation ##\n\nOnline documentation can be found at http://moutjs.com/ or inside the\n`doc` folder.\n\n\n\n## FAQ / Wiki / IRC ##\n\nFor more info about project structure, design decisions, tips, how to\ncontribute, build system, etc, please check the [project\nwiki](https://github.com/mout/mout/wiki).\n\nWe also have an IRC channel [#moutjs on\nirc.freenode.net](http://webchat.freenode.net/?channels=moutjs)\n\n\n\n## License ##\n\nReleased under the [MIT License](http://www.opensource.org/licenses/mit-license.php).\n\n", - "readmeFilename": "README.md", - "_id": "mout@0.6.0", - "dist": { - "shasum": "d2f7a6e5a796040bf7b6259a41b46705f49d271d" - }, - "_from": "mout@~0.6.0", - "_resolved": "https://registry.npmjs.org/mout/-/mout-0.6.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString.js deleted file mode 100644 index 22685a7f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString.js +++ /dev/null @@ -1,15 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'contains' : require('./queryString/contains'), - 'decode' : require('./queryString/decode'), - 'encode' : require('./queryString/encode'), - 'getParam' : require('./queryString/getParam'), - 'getQuery' : require('./queryString/getQuery'), - 'parse' : require('./queryString/parse'), - 'setParam' : require('./queryString/setParam') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/contains.js deleted file mode 100644 index da678cf4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/contains.js +++ /dev/null @@ -1,12 +0,0 @@ -var getQuery = require('./getQuery'); - - /** - * Checks if query string contains parameter. - */ - function contains(url, paramName) { - var regex = new RegExp('(\\?|&)'+ paramName +'=', 'g'); //matches `?param=` or `¶m=` - return regex.test(getQuery(url)); - } - - module.exports = contains; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/decode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/decode.js deleted file mode 100644 index 7e689990..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/decode.js +++ /dev/null @@ -1,21 +0,0 @@ -var typecast = require('../string/typecast'); -var isString = require('../lang/isString'); - - /** - * Decode query string into an object of keys => vals. - */ - function decode(queryStr, shouldTypecast) { - var queryArr = (queryStr || '').replace('?', '').split('&'), - n = queryArr.length, - obj = {}, - item, val; - while (n--) { - item = queryArr[n].split('='); - val = shouldTypecast === false? item[1] : typecast(item[1]); - obj[item[0]] = isString(val)? decodeURIComponent(val) : val; - } - return obj; - } - - module.exports = decode; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/encode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/encode.js deleted file mode 100644 index 6d2b12f8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/encode.js +++ /dev/null @@ -1,15 +0,0 @@ -var forOwn = require('../object/forOwn'); - - /** - * Encode object into a query string. - */ - function encode(obj){ - var query = []; - forOwn(obj, function(val, key){ - query.push( key +'='+ encodeURIComponent(val) ); - }); - return (query.length)? '?'+ query.join('&') : ''; - } - - module.exports = encode; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/getParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/getParam.js deleted file mode 100644 index f149c3ea..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/getParam.js +++ /dev/null @@ -1,15 +0,0 @@ -var typecast = require('../string/typecast'); -var getQuery = require('./getQuery'); - - /** - * Get query parameter value. - */ - function getParam(url, param, shouldTypecast){ - var regexp = new RegExp('(\\?|&)'+ param + '=([^&]*)'), //matches `?param=value` or `¶m=value`, value = $2 - result = regexp.exec( getQuery(url) ), - val = (result && result[2])? result[2] : null; - return shouldTypecast === false? val : typecast(val); - } - - module.exports = getParam; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/getQuery.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/getQuery.js deleted file mode 100644 index 5194af2d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/getQuery.js +++ /dev/null @@ -1,13 +0,0 @@ - - - /** - * Gets full query as string with all special chars decoded. - */ - function getQuery(url) { - url = url.replace(/#.*/, ''); //removes hash (to avoid getting hash query) - var queryString = /\?[a-zA-Z0-9\=\&\%\$\-\_\.\+\!\*\'\(\)\,]+/.exec(url); //valid chars according to: http://www.ietf.org/rfc/rfc1738.txt - return (queryString)? decodeURIComponent(queryString[0]) : ''; - } - - module.exports = getQuery; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/parse.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/parse.js deleted file mode 100644 index 532906c0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/parse.js +++ /dev/null @@ -1,13 +0,0 @@ -var decode = require('./decode'); -var getQuery = require('./getQuery'); - - /** - * Get query string, parses and decodes it. - */ - function parse(url, shouldTypecast) { - return decode(getQuery(url), shouldTypecast); - } - - module.exports = parse; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/setParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/setParam.js deleted file mode 100644 index 052a9ba6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/queryString/setParam.js +++ /dev/null @@ -1,28 +0,0 @@ - - - /** - * Set query string parameter value - */ - function setParam(url, paramName, value){ - url = url || ''; - - var re = new RegExp('(\\?|&)'+ paramName +'=[^&]*' ); - var param = paramName +'='+ encodeURIComponent( value ); - - if ( re.test(url) ) { - return url.replace(re, '$1'+ param); - } else { - if (url.indexOf('?') === -1) { - url += '?'; - } - if (url.indexOf('=') !== -1) { - url += '&'; - } - return url + param; - } - - } - - module.exports = setParam; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random.js deleted file mode 100644 index d9267f01..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random.js +++ /dev/null @@ -1,16 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'choice' : require('./random/choice'), - 'guid' : require('./random/guid'), - 'rand' : require('./random/rand'), - 'randBit' : require('./random/randBit'), - 'randHex' : require('./random/randHex'), - 'randInt' : require('./random/randInt'), - 'randSign' : require('./random/randSign'), - 'random' : require('./random/random') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/choice.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/choice.js deleted file mode 100644 index 51aa82a2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/choice.js +++ /dev/null @@ -1,15 +0,0 @@ -var randInt = require('./randInt'); -var isArray = require('../lang/isArray'); - - /** - * Returns a random element from the supplied arguments - * or from the array (if single argument is an array). - */ - function choice(items) { - var target = (arguments.length === 1 && isArray(items))? items : arguments; - return target[ randInt(0, target.length - 1) ]; - } - - module.exports = choice; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/guid.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/guid.js deleted file mode 100644 index 41f6eddc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/guid.js +++ /dev/null @@ -1,24 +0,0 @@ -var randHex = require('./randHex'); -var choice = require('./choice'); - - /** - * Returns pseudo-random guid (UUID v4) - * IMPORTANT: it's not totally "safe" since randHex/choice uses Math.random - * by default and sequences can be predicted in some cases. See the - * "random/random" documentation for more info about it and how to replace - * the default PRNG. - */ - function guid() { - return ( - randHex(8)+'-'+ - randHex(4)+'-'+ - // v4 UUID always contain "4" at this position to specify it was - // randomly generated - '4' + randHex(3) +'-'+ - // v4 UUID always contain chars [a,b,8,9] at this position - choice(8, 9, 'a', 'b') + randHex(3)+'-'+ - randHex(12) - ); - } - module.exports = guid; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/rand.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/rand.js deleted file mode 100644 index 782dec88..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/rand.js +++ /dev/null @@ -1,15 +0,0 @@ -var random = require('./random'); -var MIN_INT = require('../number/MIN_INT'); -var MAX_INT = require('../number/MAX_INT'); - - /** - * Returns random number inside range - */ - function rand(min, max){ - min = min == null? MIN_INT : min; - max = max == null? MAX_INT : max; - return min + (max - min) * random(); - } - - module.exports = rand; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/randBit.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/randBit.js deleted file mode 100644 index bd20b4a0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/randBit.js +++ /dev/null @@ -1,11 +0,0 @@ -var random = require('./random'); - - /** - * Returns random bit (0 or 1) - */ - function randomBit() { - return random() > 0.5? 1 : 0; - } - - module.exports = randomBit; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/randHex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/randHex.js deleted file mode 100644 index d8d711c3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/randHex.js +++ /dev/null @@ -1,19 +0,0 @@ -var choice = require('./choice'); - - var _chars = '0123456789abcdef'.split(''); - - /** - * Returns a random hexadecimal string - */ - function randHex(size){ - size = size && size > 0? size : 6; - var str = ''; - while (size--) { - str += choice(_chars); - } - return str; - } - - module.exports = randHex; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/randInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/randInt.js deleted file mode 100644 index e237d964..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/randInt.js +++ /dev/null @@ -1,18 +0,0 @@ -var MIN_INT = require('../number/MIN_INT'); -var MAX_INT = require('../number/MAX_INT'); -var rand = require('./rand'); - - /** - * Gets random integer inside range or snap to min/max values. - */ - function randInt(min, max){ - min = min == null? MIN_INT : ~~min; - max = max == null? MAX_INT : ~~max; - // can't be max + 0.5 otherwise it will round up if `rand` - // returns `max` causing it to overflow range. - // -0.5 and + 0.49 are required to avoid bias caused by rounding - return Math.round( rand(min - 0.5, max + 0.499999999999) ); - } - - module.exports = randInt; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/randSign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/randSign.js deleted file mode 100644 index 5a9fed76..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/randSign.js +++ /dev/null @@ -1,11 +0,0 @@ -var random = require('./random'); - - /** - * Returns random sign (-1 or 1) - */ - function randomSign() { - return random() > 0.5? 1 : -1; - } - - module.exports = randomSign; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/random.js deleted file mode 100644 index 670a3cc4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/random/random.js +++ /dev/null @@ -1,18 +0,0 @@ - - - /** - * Just a wrapper to Math.random. No methods inside mout/random should call - * Math.random() directly so we can inject the pseudo-random number - * generator if needed (ie. in case we need a seeded random or a better - * algorithm than the native one) - */ - function random(){ - return random.get(); - } - - // we expose the method so it can be swapped if needed - random.get = Math.random; - - module.exports = random; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array.js deleted file mode 100644 index 7bcc961b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array.js +++ /dev/null @@ -1,46 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'append' : require('./array/append'), - 'collect' : require('./array/collect'), - 'combine' : require('./array/combine'), - 'compact' : require('./array/compact'), - 'contains' : require('./array/contains'), - 'difference' : require('./array/difference'), - 'every' : require('./array/every'), - 'filter' : require('./array/filter'), - 'find' : require('./array/find'), - 'findIndex' : require('./array/findIndex'), - 'flatten' : require('./array/flatten'), - 'forEach' : require('./array/forEach'), - 'indexOf' : require('./array/indexOf'), - 'insert' : require('./array/insert'), - 'intersection' : require('./array/intersection'), - 'invoke' : require('./array/invoke'), - 'join' : require('./array/join'), - 'lastIndexOf' : require('./array/lastIndexOf'), - 'map' : require('./array/map'), - 'max' : require('./array/max'), - 'min' : require('./array/min'), - 'pick' : require('./array/pick'), - 'pluck' : require('./array/pluck'), - 'range' : require('./array/range'), - 'reduce' : require('./array/reduce'), - 'reduceRight' : require('./array/reduceRight'), - 'reject' : require('./array/reject'), - 'remove' : require('./array/remove'), - 'removeAll' : require('./array/removeAll'), - 'shuffle' : require('./array/shuffle'), - 'some' : require('./array/some'), - 'sort' : require('./array/sort'), - 'split' : require('./array/split'), - 'toLookup' : require('./array/toLookup'), - 'union' : require('./array/union'), - 'unique' : require('./array/unique'), - 'xor' : require('./array/xor'), - 'zip' : require('./array/zip') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/append.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/append.js deleted file mode 100644 index 549d8754..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/append.js +++ /dev/null @@ -1,21 +0,0 @@ -define(function () { - - /** - * Appends an array to the end of another. - * The first array will be modified. - */ - function append(arr1, arr2) { - if (arr2 == null) { - return arr1; - } - - var pad = arr1.length, - i = -1, - len = arr2.length; - while (++i < len) { - arr1[pad + i] = arr2[i]; - } - return arr1; - } - return append; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/collect.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/collect.js deleted file mode 100644 index 8f60cda2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/collect.js +++ /dev/null @@ -1,26 +0,0 @@ -define(['./append', '../function/makeIterator_'], function (append, makeIterator) { - - /** - * Maps the items in the array and concatenates the result arrays. - */ - function collect(arr, callback, thisObj){ - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length; - while (++i < len) { - var value = callback(arr[i], i, arr); - if (value != null) { - append(results, value); - } - } - - return results; - } - - return collect; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/combine.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/combine.js deleted file mode 100644 index 22efb860..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/combine.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['./indexOf'], function (indexOf) { - - /** - * Combines an array with all the items of another. - * Does not allow duplicates and is case and type sensitive. - */ - function combine(arr1, arr2) { - if (arr2 == null) { - return arr1; - } - - var i = -1, len = arr2.length; - while (++i < len) { - if (indexOf(arr1, arr2[i]) === -1) { - arr1.push(arr2[i]); - } - } - - return arr1; - } - return combine; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/compact.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/compact.js deleted file mode 100644 index 02a81098..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/compact.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./filter'], function (filter) { - - /** - * Remove all null/undefined items from array. - */ - function compact(arr) { - return filter(arr, function(val){ - return (val != null); - }); - } - - return compact; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/contains.js deleted file mode 100644 index fca4f7cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/contains.js +++ /dev/null @@ -1,10 +0,0 @@ -define(['./indexOf'], function (indexOf) { - - /** - * If array contains values. - */ - function contains(arr, val) { - return indexOf(arr, val) !== -1; - } - return contains; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/difference.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/difference.js deleted file mode 100644 index 819bda3e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/difference.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['./unique', './filter', './some', './contains'], function (unique, filter, some, contains) { - - - /** - * Return a new Array with elements that aren't present in the other Arrays. - */ - function difference(arr) { - var arrs = Array.prototype.slice.call(arguments, 1), - result = filter(unique(arr), function(needle){ - return !some(arrs, function(haystack){ - return contains(haystack, needle); - }); - }); - return result; - } - - return difference; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/every.js deleted file mode 100644 index 78ba46d3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/every.js +++ /dev/null @@ -1,27 +0,0 @@ -define(['../function/makeIterator_'], function (makeIterator) { - - /** - * Array every - */ - function every(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = true; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (!callback(arr[i], i, arr) ) { - result = false; - break; - } - } - - return result; - } - - return every; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/filter.js deleted file mode 100644 index 52cf685a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/filter.js +++ /dev/null @@ -1,26 +0,0 @@ -define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { - - /** - * Array filter - */ - function filter(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - if (callback(value, i, arr)) { - results.push(value); - } - } - - return results; - } - - return filter; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/find.js deleted file mode 100644 index 3957dcd5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/find.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./findIndex'], function (findIndex) { - - /** - * Returns first item that matches criteria - */ - function find(arr, iterator, thisObj){ - var idx = findIndex(arr, iterator, thisObj); - return idx >= 0? arr[idx] : void(0); - } - - return find; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/findIndex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/findIndex.js deleted file mode 100644 index 59dfeeb9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/findIndex.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['../function/makeIterator_'], function (makeIterator) { - - /** - * Returns the index of the first item that matches criteria - */ - function findIndex(arr, iterator, thisObj){ - iterator = makeIterator(iterator, thisObj); - if (arr == null) { - return -1; - } - - var i = -1, len = arr.length; - while (++i < len) { - if (iterator(arr[i], i, arr)) { - return i; - } - } - - return -1; - } - - return findIndex; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/flatten.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/flatten.js deleted file mode 100644 index 42e87f43..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/flatten.js +++ /dev/null @@ -1,42 +0,0 @@ -define(['../lang/isArray', './append'], function (isArray, append) { - - /* - * Helper function to flatten to a destination array. - * Used to remove the need to create intermediate arrays while flattening. - */ - function flattenTo(arr, result, level) { - if (arr == null) { - return result; - } else if (level === 0) { - append(result, arr); - return result; - } - - var value, - i = -1, - len = arr.length; - while (++i < len) { - value = arr[i]; - if (isArray(value)) { - flattenTo(value, result, level - 1); - } else { - result.push(value); - } - } - return result; - } - - /** - * Recursively flattens an array. - * A new array containing all the elements is returned. - * If `shallow` is true, it will only flatten one level. - */ - function flatten(arr, level) { - level = level == null? -1 : level; - return flattenTo(arr, [], level); - } - - return flatten; - -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/forEach.js deleted file mode 100644 index 0e045868..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/forEach.js +++ /dev/null @@ -1,23 +0,0 @@ -define(function () { - - /** - * Array forEach - */ - function forEach(arr, callback, thisObj) { - if (arr == null) { - return; - } - var i = -1, - len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if ( callback.call(thisObj, arr[i], i, arr) === false ) { - break; - } - } - } - - return forEach; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/indexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/indexOf.js deleted file mode 100644 index 0e75f99b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/indexOf.js +++ /dev/null @@ -1,28 +0,0 @@ -define(function () { - - /** - * Array.indexOf - */ - function indexOf(arr, item, fromIndex) { - fromIndex = fromIndex || 0; - if (arr == null) { - return -1; - } - - var len = arr.length, - i = fromIndex < 0 ? len + fromIndex : fromIndex; - while (i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (arr[i] === item) { - return i; - } - - i++; - } - - return -1; - } - - return indexOf; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/insert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/insert.js deleted file mode 100644 index d8d831f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/insert.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['./difference', '../lang/toArray'], function (difference, toArray) { - - /** - * Insert item into array if not already present. - */ - function insert(arr, rest_items) { - var diff = difference(toArray(arguments).slice(1), arr); - if (diff.length) { - Array.prototype.push.apply(arr, diff); - } - return arr.length; - } - return insert; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/intersection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/intersection.js deleted file mode 100644 index 64e6ee97..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/intersection.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['./unique', './filter', './every', './contains'], function (unique, filter, every, contains) { - - - /** - * Return a new Array with elements common to all Arrays. - * - based on underscore.js implementation - */ - function intersection(arr) { - var arrs = Array.prototype.slice.call(arguments, 1), - result = filter(unique(arr), function(needle){ - return every(arrs, function(haystack){ - return contains(haystack, needle); - }); - }); - return result; - } - - return intersection; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/invoke.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/invoke.js deleted file mode 100644 index a2e78b39..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/invoke.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['./forEach'], function (forEach) { - - /** - * Call `methodName` on each item of the array passing custom arguments if - * needed. - */ - function invoke(arr, methodName, var_args){ - if (arr == null) { - return arr; - } - - var args = Array.prototype.slice.call(arguments, 2); - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - value[methodName].apply(value, args); - } - - return arr; - } - - return invoke; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/join.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/join.js deleted file mode 100644 index 2c618d29..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/join.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['./filter'], function(filter) { - - function isValidString(val) { - return (val != null && val !== ''); - } - - /** - * Joins strings with the specified separator inserted between each value. - * Null values and empty strings will be excluded. - */ - function join(items, separator) { - separator = separator || ''; - return filter(items, isValidString).join(separator); - } - - return join; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/lastIndexOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/lastIndexOf.js deleted file mode 100644 index 931235f4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/lastIndexOf.js +++ /dev/null @@ -1,28 +0,0 @@ -define(function () { - - /** - * Array lastIndexOf - */ - function lastIndexOf(arr, item, fromIndex) { - if (arr == null) { - return -1; - } - - var len = arr.length; - fromIndex = (fromIndex == null || fromIndex >= len)? len - 1 : fromIndex; - fromIndex = (fromIndex < 0)? len + fromIndex : fromIndex; - - while (fromIndex >= 0) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (arr[fromIndex] === item) { - return fromIndex; - } - fromIndex--; - } - - return -1; - } - - return lastIndexOf; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/map.js deleted file mode 100644 index 1580b481..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/map.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { - - /** - * Array map - */ - function map(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null){ - return results; - } - - var i = -1, len = arr.length; - while (++i < len) { - results[i] = callback(arr[i], i, arr); - } - - return results; - } - - return map; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/max.js deleted file mode 100644 index a7326c89..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/max.js +++ /dev/null @@ -1,34 +0,0 @@ -define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { - - /** - * Return maximum value inside array - */ - function max(arr, iterator, thisObj){ - if (arr == null || !arr.length) { - return Infinity; - } else if (arr.length && !iterator) { - return Math.max.apply(Math, arr); - } else { - iterator = makeIterator(iterator, thisObj); - var result, - compare = -Infinity, - value, - temp; - - var i = -1, len = arr.length; - while (++i < len) { - value = arr[i]; - temp = iterator(value, i, arr); - if (temp > compare) { - compare = temp; - result = value; - } - } - - return result; - } - } - - return max; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/min.js deleted file mode 100644 index 41644480..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/min.js +++ /dev/null @@ -1,34 +0,0 @@ -define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { - - /** - * Return minimum value inside array - */ - function min(arr, iterator, thisObj){ - if (arr == null || !arr.length) { - return -Infinity; - } else if (arr.length && !iterator) { - return Math.min.apply(Math, arr); - } else { - iterator = makeIterator(iterator, thisObj); - var result, - compare = Infinity, - value, - temp; - - var i = -1, len = arr.length; - while (++i < len) { - value = arr[i]; - temp = iterator(value, i, arr); - if (temp < compare) { - compare = temp; - result = value; - } - } - - return result; - } - } - - return min; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/pick.js deleted file mode 100644 index 97d7f595..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/pick.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../random/randInt'], function (randInt) { - - /** - * Remove a random item from the Array and return it - */ - function pick(arr){ - if (arr == null || !arr.length) return; - var idx = randInt(0, arr.length - 1); - return arr.splice(idx, 1)[0]; - } - - return pick; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/pluck.js deleted file mode 100644 index c908856e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/pluck.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./map'], function (map) { - - /** - * Extract a list of property values. - */ - function pluck(arr, propName){ - return map(arr, propName); - } - - return pluck; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/range.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/range.js deleted file mode 100644 index 148ebf96..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/range.js +++ /dev/null @@ -1,27 +0,0 @@ -define(['../math/countSteps'], function (countSteps) { - - /** - * Returns an Array of numbers inside range. - */ - function range(start, stop, step) { - if (stop == null) { - stop = start; - start = 0; - } - step = step || 1; - - var result = [], - nSteps = countSteps(stop - start, step), - i = start; - - while (i <= stop) { - result.push(i); - i += step; - } - - return result; - } - - return range; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reduce.js deleted file mode 100644 index 88aacfd5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reduce.js +++ /dev/null @@ -1,33 +0,0 @@ -define(['./forEach'], function (forEach) { - - /** - * Array reduce - */ - function reduce(arr, fn, initVal) { - // check for args.length since initVal might be "undefined" see #gh-57 - var hasInit = arguments.length > 2, - result = initVal; - - if (arr == null || !arr.length) { - if (!hasInit) { - throw new Error('reduce of empty array with no initial value'); - } else { - return initVal; - } - } - - var i = -1, len = arr.length; - while (++i < len) { - if (!hasInit) { - result = arr[i]; - hasInit = true; - } else { - result = fn(result, arr[i], i, arr); - } - } - - return result; - } - - return reduce; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reduceRight.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reduceRight.js deleted file mode 100644 index ddae0e7f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reduceRight.js +++ /dev/null @@ -1,34 +0,0 @@ -define(function () { - - /** - * Array reduceRight - */ - function reduceRight(arr, fn, initVal) { - // check for args.length since initVal might be "undefined" see #gh-57 - var hasInit = arguments.length > 2; - - if (arr == null || !arr.length) { - if (hasInit) { - return initVal; - } else { - throw new Error('reduce of empty array with no initial value'); - } - } - - var i = arr.length, result = initVal, value; - while (--i >= 0) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - value = arr[i]; - if (!hasInit) { - result = value; - hasInit = true; - } else { - result = fn(result, value, i, arr); - } - } - return result; - } - - return reduceRight; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reject.js deleted file mode 100644 index db105dde..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/reject.js +++ /dev/null @@ -1,25 +0,0 @@ -define(['./forEach', '../function/makeIterator_'], function(forEach, makeIterator) { - - /** - * Array reject - */ - function reject(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - if (!callback(value, i, arr)) { - results.push(value); - } - } - - return results; - } - - return reject; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/remove.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/remove.js deleted file mode 100644 index dec9134d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/remove.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./indexOf'], function(indexOf){ - - /** - * Remove a single item from the array. - * (it won't remove duplicates, just a single item) - */ - function remove(arr, item){ - var idx = indexOf(arr, item); - if (idx !== -1) arr.splice(idx, 1); - } - - return remove; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/removeAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/removeAll.js deleted file mode 100644 index e81022b8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/removeAll.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./indexOf'], function(indexOf){ - - /** - * Remove all instances of an item from array. - */ - function removeAll(arr, item){ - var idx = indexOf(arr, item); - while (idx !== -1) { - arr.splice(idx, 1); - idx = indexOf(arr, item, idx); - } - } - - return removeAll; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/shuffle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/shuffle.js deleted file mode 100644 index f5a60972..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/shuffle.js +++ /dev/null @@ -1,28 +0,0 @@ -define(['../random/randInt', './forEach'], function (randInt, forEach) { - - /** - * Shuffle array items. - */ - function shuffle(arr) { - var results = [], - rnd; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - if (!i) { - results[0] = arr[0]; - } else { - rnd = randInt(0, i); - results[i] = results[rnd]; - results[rnd] = arr[i]; - } - } - - return results; - } - - return shuffle; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/some.js deleted file mode 100644 index e46a9781..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/some.js +++ /dev/null @@ -1,27 +0,0 @@ -define(['../function/makeIterator_'], function (makeIterator) { - - /** - * Array some - */ - function some(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = false; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if ( callback(arr[i], i, arr) ) { - result = true; - break; - } - } - - return result; - } - - return some; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/sort.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/sort.js deleted file mode 100644 index 4c194042..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/sort.js +++ /dev/null @@ -1,55 +0,0 @@ -define(function () { - - /** - * Merge sort (http://en.wikipedia.org/wiki/Merge_sort) - */ - function mergeSort(arr, compareFn) { - if (arr == null) { - return []; - } else if (arr.length < 2) { - return arr; - } - - if (compareFn == null) { - compareFn = defaultCompare; - } - - var mid, left, right; - - mid = ~~(arr.length / 2); - left = mergeSort( arr.slice(0, mid), compareFn ); - right = mergeSort( arr.slice(mid, arr.length), compareFn ); - - return merge(left, right, compareFn); - } - - function defaultCompare(a, b) { - return a < b ? -1 : (a > b? 1 : 0); - } - - function merge(left, right, compareFn) { - var result = []; - - while (left.length && right.length) { - if (compareFn(left[0], right[0]) <= 0) { - // if 0 it should preserve same order (stable) - result.push(left.shift()); - } else { - result.push(right.shift()); - } - } - - if (left.length) { - result.push.apply(result, left); - } - - if (right.length) { - result.push.apply(result, right); - } - - return result; - } - - return mergeSort; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/split.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/split.js deleted file mode 100644 index a17275eb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/split.js +++ /dev/null @@ -1,35 +0,0 @@ -define(function() { - - /** - * Split array into a fixed number of segments. - */ - function split(array, segments) { - segments = segments || 2; - var results = []; - if (array == null) { - return results; - } - - var minLength = Math.floor(array.length / segments), - remainder = array.length % segments, - i = 0, - len = array.length, - segmentIndex = 0, - segmentLength; - - while (i < len) { - segmentLength = minLength; - if (segmentIndex < remainder) { - segmentLength++; - } - - results.push(array.slice(i, i + segmentLength)); - - segmentIndex++; - i += segmentLength; - } - - return results; - } - return split; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/toLookup.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/toLookup.js deleted file mode 100644 index aac8fd1d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/toLookup.js +++ /dev/null @@ -1,28 +0,0 @@ -define(['../lang/isFunction'], function (isFunction) { - - /** - * Creates an object that holds a lookup for the objects in the array. - */ - function toLookup(arr, key) { - var result = {}; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length, value; - if (isFunction(key)) { - while (++i < len) { - value = arr[i]; - result[key(value)] = value; - } - } else { - while (++i < len) { - value = arr[i]; - result[value[key]] = value; - } - } - - return result; - } - return toLookup; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/union.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/union.js deleted file mode 100644 index 5f9922e5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/union.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['./unique', './append'], function (unique, append) { - - /** - * Concat multiple arrays and remove duplicates - */ - function union(arrs) { - var results = []; - var i = -1, len = arguments.length; - while (++i < len) { - append(results, arguments[i]); - } - - return unique(results); - } - - return union; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/unique.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/unique.js deleted file mode 100644 index c4bd23b4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/unique.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./indexOf', './filter'], function(indexOf, filter){ - - /** - * @return {array} Array of unique items - */ - function unique(arr){ - return filter(arr, isUnique); - } - - function isUnique(item, i, arr){ - return indexOf(arr, item, i+1) === -1; - } - - return unique; -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/xor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/xor.js deleted file mode 100644 index 7df89d9c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/xor.js +++ /dev/null @@ -1,24 +0,0 @@ -define(['./unique', './filter', './contains'], function (unique, filter, contains) { - - - /** - * Exclusive OR. Returns items that are present in a single array. - * - like ptyhon's `symmetric_difference` - */ - function xor(arr1, arr2) { - arr1 = unique(arr1); - arr2 = unique(arr2); - - var a1 = filter(arr1, function(item){ - return !contains(arr2, item); - }), - a2 = filter(arr2, function(item){ - return !contains(arr1, item); - }); - - return a1.concat(a2); - } - - return xor; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/zip.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/zip.js deleted file mode 100644 index 374cd282..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/array/zip.js +++ /dev/null @@ -1,27 +0,0 @@ -define(['./max', './pluck', './map'], function (max, pluck, map) { - - function getLength(arr) { - return arr == null ? 0 : arr.length; - } - - /** - * Merges together the values of each of the arrays with the values at the - * corresponding position. - */ - function zip(arr){ - var len = arr ? max(map(arguments, getLength)) : 0, - results = [], - i = -1, - item; - while (++i < len) { - results.push(map(arguments, function(item) { - return item == null ? undefined : item[i]; - })); - } - - return results; - } - - return zip; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection.js deleted file mode 100644 index 386e6da9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection.js +++ /dev/null @@ -1,22 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'contains' : require('./collection/contains'), - 'every' : require('./collection/every'), - 'filter' : require('./collection/filter'), - 'find' : require('./collection/find'), - 'forEach' : require('./collection/forEach'), - 'make_' : require('./collection/make_'), - 'map' : require('./collection/map'), - 'max' : require('./collection/max'), - 'min' : require('./collection/min'), - 'pluck' : require('./collection/pluck'), - 'reduce' : require('./collection/reduce'), - 'reject' : require('./collection/reject'), - 'size' : require('./collection/size'), - 'some' : require('./collection/some') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/contains.js deleted file mode 100644 index 192167e8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/contains.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/contains', '../object/contains'], function (make, arrContains, objContains) { - - /** - */ - return make(arrContains, objContains); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/every.js deleted file mode 100644 index 6317f503..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/every.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/every', '../object/every'], function (make, arrEvery, objEvery) { - - /** - */ - return make(arrEvery, objEvery); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/filter.js deleted file mode 100644 index 4e7fadc8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/filter.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { - - /** - * filter collection values, returns array. - */ - function filter(list, iterator, thisObj) { - iterator = makeIterator(iterator, thisObj); - var results = []; - if (!list) { - return results; - } - forEach(list, function(value, index, list) { - if (iterator(value, index, list)) { - results[results.length] = value; - } - }); - return results; - } - - return filter; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/find.js deleted file mode 100644 index 681f9414..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/find.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./make_', '../array/find', '../object/find'], function(make, arrFind, objFind) { - - /** - * Find value that returns true on iterator check. - */ - return make(arrFind, objFind); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/forEach.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/forEach.js deleted file mode 100644 index 3b39d3ed..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/forEach.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/forEach', '../object/forOwn'], function (make, arrForEach, objForEach) { - - /** - */ - return make(arrForEach, objForEach); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/make_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/make_.js deleted file mode 100644 index 312e0564..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/make_.js +++ /dev/null @@ -1,19 +0,0 @@ -define(function(){ - - /** - * internal method used to create other collection modules. - */ - function makeCollectionMethod(arrMethod, objMethod, defaultReturn) { - return function(){ - var args = Array.prototype.slice.call(arguments); - if (args[0] == null) { - return defaultReturn; - } - // array-like is treated as array - return (typeof args[0].length === 'number')? arrMethod.apply(null, args) : objMethod.apply(null, args); - }; - } - - return makeCollectionMethod; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/map.js deleted file mode 100644 index 96e24987..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/map.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['../lang/isObject', '../object/values', '../array/map', '../function/makeIterator_'], function (isObject, values, arrMap, makeIterator) { - - /** - * Map collection values, returns Array. - */ - function map(list, callback, thisObj) { - callback = makeIterator(callback, thisObj); - // list.length to check array-like object, if not array-like - // we simply map all the object values - if( isObject(list) && list.length == null ){ - list = values(list); - } - return arrMap(list, function (val, key, list) { - return callback(val, key, list); - }); - } - - return map; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/max.js deleted file mode 100644 index de9a6da5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/max.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./make_', '../array/max', '../object/max'], function (make, arrMax, objMax) { - - /** - * Get maximum value inside collection - */ - return make(arrMax, objMax); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/min.js deleted file mode 100644 index f0c239a6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/min.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./make_', '../array/min', '../object/min'], function (make, arrMin, objMin) { - - /** - * Get minimum value inside collection. - */ - return make(arrMin, objMin); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/pluck.js deleted file mode 100644 index ef784a7a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/pluck.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['./map'], function (map) { - - /** - * Extract a list of property values. - */ - function pluck(list, key) { - return map(list, function(value) { - return value[key]; - }); - } - - return pluck; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/reduce.js deleted file mode 100644 index bd05d43d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/reduce.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/reduce', '../object/reduce'], function (make, arrReduce, objReduce) { - - /** - */ - return make(arrReduce, objReduce); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/reject.js deleted file mode 100644 index 581adfdc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/reject.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./filter', '../function/makeIterator_'], function (filter, makeIterator) { - - /** - * Inverse or collection/filter - */ - function reject(list, iterator, thisObj) { - iterator = makeIterator(iterator, thisObj); - return filter(list, function(value, index, list) { - return !iterator(value, index, list); - }, thisObj); - } - - return reject; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/size.js deleted file mode 100644 index 4e5ab419..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/size.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../lang/isArray', '../object/size'], function (isArray, objSize) { - - /** - * Get collection size - */ - function size(list) { - if (!list) { - return 0; - } - if (isArray(list)) { - return list.length; - } - return objSize(list); - } - - return size; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/some.js deleted file mode 100644 index c0aebee2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/collection/some.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/some', '../object/some'], function (make, arrSome, objSome) { - - /** - */ - return make(arrSome, objSome); - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date.js deleted file mode 100644 index 4d449150..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date.js +++ /dev/null @@ -1,21 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'dayOfTheYear' : require('./date/dayOfTheYear'), - 'diff' : require('./date/diff'), - 'i18n_' : require('./date/i18n_'), - 'isLeapYear' : require('./date/isLeapYear'), - 'isSame' : require('./date/isSame'), - 'parseIso' : require('./date/parseIso'), - 'startOf' : require('./date/startOf'), - 'strftime' : require('./date/strftime'), - 'timezoneAbbr' : require('./date/timezoneAbbr'), - 'timezoneOffset' : require('./date/timezoneOffset'), - 'totalDaysInMonth' : require('./date/totalDaysInMonth'), - 'totalDaysInYear' : require('./date/totalDaysInYear'), - 'weekOfTheYear' : require('./date/weekOfTheYear') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/dayOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/dayOfTheYear.js deleted file mode 100644 index dc77ae1b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/dayOfTheYear.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../lang/isDate'], function (isDate) { - - /** - * return the day of the year (1..366) - */ - function dayOfTheYear(date){ - return (Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) - - Date.UTC(date.getFullYear(), 0, 1)) / 86400000 + 1; - } - - return dayOfTheYear; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/diff.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/diff.js deleted file mode 100644 index 667165fe..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/diff.js +++ /dev/null @@ -1,128 +0,0 @@ -define(['./totalDaysInMonth', './totalDaysInYear', '../time/convert'], function(totalDaysInMonth, totalDaysInYear, convert){ - - /** - * calculate the difference between dates (range) - */ - function diff(start, end, unitName){ - // sort the dates to make it easier to process (specially year/month) - if (start > end) { - var swap = start; - start = end; - end = swap; - } - - var output; - - if (unitName === 'month') { - output = getMonthsDiff(start, end); - } else if (unitName === 'year'){ - output = getYearsDiff(start, end); - } else if (unitName != null) { - if (unitName === 'day') { - // ignore timezone difference because of daylight savings time - start = toUtc(start); - end = toUtc(end); - } - output = convert(end - start, 'ms', unitName); - } else { - output = end - start; - } - - return output; - } - - - function toUtc(d){ - // we ignore timezone differences on purpose because of daylight - // savings time, otherwise it would return fractional days/weeks even - // if a full day elapsed. eg: - // Wed Feb 12 2014 00:00:00 GMT-0200 (BRST) - // Sun Feb 16 2014 00:00:00 GMT-0300 (BRT) - // diff should be 4 days and not 4.041666666666667 - return Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), - d.getHours(), d.getMinutes(), d.getSeconds(), - d.getMilliseconds()); - } - - - function getMonthsDiff(start, end){ - return getElapsedMonths(start, end) + - getElapsedYears(start, end) * 12 + - getFractionalMonth(start, end); - } - - - function getYearsDiff(start, end){ - var elapsedYears = getElapsedYears(start, end); - return elapsedYears + getFractionalYear(start, end, elapsedYears); - } - - - function getElapsedMonths(start, end){ - var monthDiff = end.getMonth() - start.getMonth(); - if (monthDiff < 0) { - monthDiff += 12; - } - // less than a full month - if (start.getDate() > end.getDate()) { - monthDiff -= 1; - } - return monthDiff; - } - - - function getElapsedYears(start, end){ - var yearDiff = end.getFullYear() - start.getFullYear(); - // less than a full year - if (start.getMonth() > end.getMonth()) { - yearDiff -= 1; - } - return yearDiff; - } - - - function getFractionalMonth(start, end){ - var fractionalDiff = 0; - var startDay = start.getDate(); - var endDay = end.getDate(); - - if (startDay !== endDay) { - var startTotalDays = totalDaysInMonth(start); - var endTotalDays = totalDaysInMonth(end); - var totalDays; - var daysElapsed; - - if (startDay > endDay) { - // eg: Jan 29 - Feb 27 (29 days elapsed but not a full month) - var baseDay = startTotalDays - startDay; - daysElapsed = endDay + baseDay; - // total days should be relative to 1st day of next month if - // startDay > endTotalDays - totalDays = (startDay > endTotalDays)? - endTotalDays + baseDay + 1 : startDay + baseDay; - } else { - // fractional is only based on endMonth eg: Jan 12 - Feb 18 - // (6 fractional days, 28 days until next full month) - daysElapsed = endDay - startDay; - totalDays = endTotalDays; - } - - fractionalDiff = daysElapsed / totalDays; - } - - return fractionalDiff; - } - - - function getFractionalYear(start, end, elapsedYears){ - var base = elapsedYears? - new Date(end.getFullYear(), start.getMonth(), start.getDate()) : - start; - var elapsedDays = diff(base, end, 'day'); - return elapsedDays / totalDaysInYear(end); - } - - - return diff; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/en-US.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/en-US.js deleted file mode 100644 index 5e640c22..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/en-US.js +++ /dev/null @@ -1,61 +0,0 @@ -define(function(){ - // en-US (English, United States) - return { - "am" : "AM", - "pm" : "PM", - - "x": "%m/%d/%y", - "X": "%H:%M:%S", - "c": "%a %d %b %Y %I:%M:%S %p %Z", - - "months" : [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" - ], - - "months_abbr" : [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" - ], - - "days" : [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" - ], - - "days_abbr" : [ - "Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat" - ] - }; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/pt-BR.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/pt-BR.js deleted file mode 100644 index 47256dd2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n/pt-BR.js +++ /dev/null @@ -1,61 +0,0 @@ -define(function(){ - // pt-BR (Brazillian Portuguese) - return { - "am" : "", - "pm" : "", - - "x": "%d/%m/%y", - "X": "%H:%M:%S", - "c": "%a %d %b %Y %H:%M:%S %Z", - - "months" : [ - "Janeiro", - "Fevereiro", - "Março", - "Abril", - "Maio", - "Junho", - "Julho", - "Agosto", - "Setembro", - "Outubro", - "Novembro", - "Dezembro" - ], - - "months_abbr" : [ - "Jan", - "Fev", - "Mar", - "Abr", - "Mai", - "Jun", - "Jul", - "Ago", - "Set", - "Out", - "Nov", - "Dez" - ], - - "days" : [ - "Domingo", - "Segunda", - "Terça", - "Quarta", - "Quinta", - "Sexta", - "Sábado" - ], - - "days_abbr" : [ - "Dom", - "Seg", - "Ter", - "Qua", - "Qui", - "Sex", - "Sáb" - ] - }; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n_.js deleted file mode 100644 index c04ce885..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/i18n_.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../object/mixIn', './i18n/en-US'], function(mixIn, enUS){ - - // we also use mixIn to make sure we don't affect the original locale - var activeLocale = mixIn({}, enUS, { - // we expose a "set" method to allow overriding the global locale - set : function(localeData){ - mixIn(activeLocale, localeData); - } - }); - - return activeLocale; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/isLeapYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/isLeapYear.js deleted file mode 100644 index e400b43d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/isLeapYear.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['../lang/isDate'], function (isDate) { - - /** - * checks if it's a leap year - */ - function isLeapYear(fullYear){ - if (isDate(fullYear)) { - fullYear = fullYear.getFullYear(); - } - return fullYear % 400 === 0 || (fullYear % 100 !== 0 && fullYear % 4 === 0); - } - - return isLeapYear; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/isSame.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/isSame.js deleted file mode 100644 index f30531fc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/isSame.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./startOf'], function (startOf) { - - /** - * Check if date is "same" with optional period - */ - function isSame(date1, date2, period){ - if (period) { - date1 = startOf(date1, period); - date2 = startOf(date2, period); - } - return Number(date1) === Number(date2); - } - - return isSame; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/parseIso.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/parseIso.js deleted file mode 100644 index 9a2aacb0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/parseIso.js +++ /dev/null @@ -1,146 +0,0 @@ -define(['../array/some'], function (some) { - - var datePatterns = [ - /^([0-9]{4})$/, // YYYY - /^([0-9]{4})-([0-9]{2})$/, // YYYY-MM (YYYYMM not allowed) - /^([0-9]{4})-?([0-9]{2})-?([0-9]{2})$/ // YYYY-MM-DD or YYYYMMDD - ]; - var ORD_DATE = /^([0-9]{4})-?([0-9]{3})$/; // YYYY-DDD - - var timePatterns = [ - /^([0-9]{2}(?:\.[0-9]*)?)$/, // HH.hh - /^([0-9]{2}):?([0-9]{2}(?:\.[0-9]*)?)$/, // HH:MM.mm - /^([0-9]{2}):?([0-9]{2}):?([0-9]{2}(\.[0-9]*)?)$/ // HH:MM:SS.ss - ]; - - var DATE_TIME = /^(.+)T(.+)$/; - var TIME_ZONE = /^(.+)([+\-])([0-9]{2}):?([0-9]{2})$/; - - function matchAll(str, patterns) { - var match; - var found = some(patterns, function(pattern) { - return !!(match = pattern.exec(str)); - }); - - return found ? match : null; - } - - function getDate(year, month, day) { - var date = new Date(Date.UTC(year, month, day)); - - // Explicitly set year to avoid Date.UTC making dates < 100 relative to - // 1900 - date.setUTCFullYear(year); - - var valid = - date.getUTCFullYear() === year && - date.getUTCMonth() === month && - date.getUTCDate() === day; - return valid ? +date : NaN; - } - - function parseOrdinalDate(str) { - var match = ORD_DATE.exec(str); - if (match ) { - var year = +match[1], - day = +match[2], - date = new Date(Date.UTC(year, 0, day)); - - if (date.getUTCFullYear() === year) { - return +date; - } - } - - return NaN; - } - - function parseDate(str) { - var match, year, month, day; - - var match = matchAll(str, datePatterns); - if (match === null) { - // Ordinal dates are verified differently. - return parseOrdinalDate(str); - } - - year = (match[1] === void 0) ? 0 : +match[1]; - month = (match[2] === void 0) ? 0 : +match[2] - 1; - day = (match[3] === void 0) ? 1 : +match[3]; - - return getDate(year, month, day); - } - - function getTime(hr, min, sec) { - var valid = - (hr < 24 && hr >= 0 && - min < 60 && min >= 0 && - sec < 60 && min >= 0) || - (hr === 24 && min === 0 && sec === 0); - if (!valid) { - return NaN; - } - - return ((hr * 60 + min) * 60 + sec) * 1000; - } - - function parseOffset(str) { - var match; - if (str.charAt(str.length - 1) === 'Z') { - str = str.substring(0, str.length - 1); - } else if ((match = TIME_ZONE.exec(str))) { - var match = TIME_ZONE.exec(str); - if (match) { - var hours = +match[3], - minutes = (match[4] === void 0) ? 0 : +match[4], - offset = getTime(hours, minutes, 0); - - if (match[2] === '-') { - offset *= -1; - } - - return { offset: offset, time: match[1] }; - } - } - - // No time zone specified, assume UTC - return { offset: 0, time: str }; - } - - function parseTime(str) { - var match; - var offset = parseOffset(str); - - str = offset.time; - offset = offset.offset; - if (isNaN(offset)) { - return NaN; - } - - match = matchAll(str, timePatterns); - if (match === null) { - return NaN; - } - - var hours = (match[1] === void 0) ? 0 : +match[1], - minutes = (match[2] === void 0) ? 0 : +match[2], - seconds = (match[3] === void 0) ? 0 : +match[3]; - - return getTime(hours, minutes, seconds) - offset; - } - - /** - * Parse an ISO8601 formatted date string, and return a Date object. - */ - function parseISO8601(str){ - var match = DATE_TIME.exec(str); - if (!match) { - // No time specified - return parseDate(str); - } - - return parseDate(match[1]) + parseTime(match[2]); - } - - return parseISO8601; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/startOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/startOf.js deleted file mode 100644 index 747f114d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/startOf.js +++ /dev/null @@ -1,54 +0,0 @@ -define(['../lang/clone'], function (clone) { - - /** - * get a new Date object representing start of period - */ - function startOf(date, period){ - date = clone(date); - - // intentionally removed "break" from switch since start of - // month/year/etc should also reset the following periods - switch (period) { - case 'year': - date.setMonth(0); - /* falls through */ - case 'month': - date.setDate(1); - /* falls through */ - case 'week': - case 'day': - date.setHours(0); - /* falls through */ - case 'hour': - date.setMinutes(0); - /* falls through */ - case 'minute': - date.setSeconds(0); - /* falls through */ - case 'second': - date.setMilliseconds(0); - break; - default: - throw new Error('"'+ period +'" is not a valid period'); - } - - // week is the only case that should reset the weekDay and maybe even - // overflow to previous month - if (period === 'week') { - var weekDay = date.getDay(); - var baseDate = date.getDate(); - if (weekDay) { - if (weekDay >= baseDate) { - //start of the week is on previous month - date.setDate(0); - } - date.setDate(date.getDate() - date.getDay()); - } - } - - return date; - } - - return startOf; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/strftime.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/strftime.js deleted file mode 100644 index dd782505..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/strftime.js +++ /dev/null @@ -1,113 +0,0 @@ -define(['../number/pad', './i18n_', './dayOfTheYear', './timezoneOffset', './timezoneAbbr', './weekOfTheYear'], function (pad, i18n, dayOfTheYear, timezoneOffset, timezoneAbbr, weekOfTheYear) { - - var _combinations = { - 'D': '%m/%d/%y', - 'F': '%Y-%m-%d', - 'r': '%I:%M:%S %p', - 'R': '%H:%M', - 'T': '%H:%M:%S', - 'x': 'locale', - 'X': 'locale', - 'c': 'locale' - }; - - - /** - * format date based on strftime format - */ - function strftime(date, format, localeData){ - localeData = localeData || i18n; - var reToken = /%([a-z%])/gi; - - function makeIterator(fn) { - return function(match, token){ - return fn(date, token, localeData); - }; - } - - return format - .replace(reToken, makeIterator(expandCombinations)) - .replace(reToken, makeIterator(convertToken)); - } - - - function expandCombinations(date, token, l10n){ - if (token in _combinations) { - var expanded = _combinations[token]; - return expanded === 'locale'? l10n[token] : expanded; - } else { - return '%'+ token; - } - } - - - function convertToken(date, token, l10n){ - switch (token){ - case 'a': - return l10n.days_abbr[date.getDay()]; - case 'A': - return l10n.days[date.getDay()]; - case 'h': - case 'b': - return l10n.months_abbr[date.getMonth()]; - case 'B': - return l10n.months[date.getMonth()]; - case 'C': - return pad(Math.floor(date.getFullYear() / 100), 2); - case 'd': - return pad(date.getDate(), 2); - case 'e': - return pad(date.getDate(), 2, ' '); - case 'H': - return pad(date.getHours(), 2); - case 'I': - return pad(date.getHours() % 12, 2); - case 'j': - return pad(dayOfTheYear(date), 3); - case 'L': - return pad(date.getMilliseconds(), 3); - case 'm': - return pad(date.getMonth() + 1, 2); - case 'M': - return pad(date.getMinutes(), 2); - case 'n': - return '\n'; - case 'p': - return date.getHours() >= 12? l10n.pm : l10n.am; - case 'P': - return convertToken(date, 'p', l10n).toLowerCase(); - case 's': - return date.getTime() / 1000; - case 'S': - return pad(date.getSeconds(), 2); - case 't': - return '\t'; - case 'u': - var day = date.getDay(); - return day === 0? 7 : day; - case 'U': - return pad(weekOfTheYear(date), 2); - case 'w': - return date.getDay(); - case 'W': - return pad(weekOfTheYear(date, 1), 2); - case 'y': - return pad(date.getFullYear() % 100, 2); - case 'Y': - return pad(date.getFullYear(), 4); - case 'z': - return timezoneOffset(date); - case 'Z': - return timezoneAbbr(date); - case '%': - return '%'; - default: - // keep unrecognized tokens - return '%'+ token; - } - } - - - return strftime; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneAbbr.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneAbbr.js deleted file mode 100644 index 225a6856..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneAbbr.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['./timezoneOffset'], function(timezoneOffset) { - - /** - * Abbreviated time zone name or similar information. - */ - function timezoneAbbr(date){ - // Date.toString gives different results depending on the - // browser/system so we fallback to timezone offset - // chrome: 'Mon Apr 08 2013 09:02:04 GMT-0300 (BRT)' - // IE: 'Mon Apr 8 09:02:04 UTC-0300 2013' - var tz = /\(([A-Z]{3,4})\)/.exec(date.toString()); - return tz? tz[1] : timezoneOffset(date); - } - - return timezoneAbbr; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneOffset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneOffset.js deleted file mode 100644 index ca06705d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/timezoneOffset.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['../number/pad'], function (pad) { - - /** - * time zone as hour and minute offset from UTC (e.g. +0900) - */ - function timezoneOffset(date){ - var offset = date.getTimezoneOffset(); - var abs = Math.abs(offset); - var h = pad(Math.floor(abs / 60), 2); - var m = pad(abs % 60, 2); - return (offset > 0? '-' : '+') + h + m; - } - - return timezoneOffset; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInMonth.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInMonth.js deleted file mode 100644 index 98f7e9d1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInMonth.js +++ /dev/null @@ -1,24 +0,0 @@ -define(['../lang/isDate', './isLeapYear'], function (isDate, isLeapYear) { - - var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; - - /** - * returns the total amount of days in the month (considering leap years) - */ - function totalDaysInMonth(fullYear, monthIndex){ - if (isDate(fullYear)) { - var date = fullYear; - year = date.getFullYear(); - monthIndex = date.getMonth(); - } - - if (monthIndex === 1 && isLeapYear(fullYear)) { - return 29; - } else { - return DAYS_IN_MONTH[monthIndex]; - } - } - - return totalDaysInMonth; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInYear.js deleted file mode 100644 index e9036b42..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/totalDaysInYear.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./isLeapYear'], function (isLeapYear) { - - /** - * return the amount of days in the year following the gregorian calendar - * and leap years - */ - function totalDaysInYear(fullYear){ - return isLeapYear(fullYear)? 366 : 365; - } - - return totalDaysInYear; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/weekOfTheYear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/weekOfTheYear.js deleted file mode 100644 index 8dabc458..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/date/weekOfTheYear.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./dayOfTheYear'], function (dayOfTheYear) { - - /** - * Return the week of the year based on given firstDayOfWeek - */ - function weekOfTheYear(date, firstDayOfWeek){ - firstDayOfWeek = firstDayOfWeek == null? 0 : firstDayOfWeek; - var doy = dayOfTheYear(date); - var dow = (7 + date.getDay() - firstDayOfWeek) % 7; - var relativeWeekDay = 6 - firstDayOfWeek - dow; - return Math.floor((doy + relativeWeekDay) / 7); - } - - return weekOfTheYear; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function.js deleted file mode 100644 index 23f4fd74..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function.js +++ /dev/null @@ -1,18 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'bind' : require('./function/bind'), - 'compose' : require('./function/compose'), - 'debounce' : require('./function/debounce'), - 'func' : require('./function/func'), - 'makeIterator_' : require('./function/makeIterator_'), - 'partial' : require('./function/partial'), - 'prop' : require('./function/prop'), - 'series' : require('./function/series'), - 'throttle' : require('./function/throttle'), - 'timeout' : require('./function/timeout') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/bind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/bind.js deleted file mode 100644 index 09e5e20a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/bind.js +++ /dev/null @@ -1,23 +0,0 @@ -define(function(){ - - function slice(arr, offset){ - return Array.prototype.slice.call(arr, offset || 0); - } - - /** - * Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. - * @param {Function} fn Function. - * @param {object} context Execution context. - * @param {rest} args Arguments (0...n arguments). - * @return {Function} Wrapped Function. - */ - function bind(fn, context, args){ - var argsArr = slice(arguments, 2); //curried args - return function(){ - return fn.apply(context, argsArr.concat(slice(arguments))); - }; - } - - return bind; -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/compose.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/compose.js deleted file mode 100644 index d8b228fa..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/compose.js +++ /dev/null @@ -1,23 +0,0 @@ -define(function () { - - /** - * Returns a function that composes multiple functions, passing results to - * each other. - */ - function compose() { - var fns = arguments; - return function(arg){ - // only cares about the first argument since the chain can only - // deal with a single return value anyway. It should start from - // the last fn. - var n = fns.length; - while (n--) { - arg = fns[n].call(this, arg); - } - return arg; - }; - } - - return compose; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/debounce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/debounce.js deleted file mode 100644 index 21644ecc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/debounce.js +++ /dev/null @@ -1,29 +0,0 @@ -define(function () { - - /** - * Debounce callback execution - */ - function debounce(fn, threshold, isAsap){ - var timeout, result; - function debounced(){ - var args = arguments, context = this; - function delayed(){ - if (! isAsap) { - result = fn.apply(context, args); - } - timeout = null; - } - if (timeout) { - clearTimeout(timeout); - } else if (isAsap) { - result = fn.apply(context, args); - } - timeout = setTimeout(delayed, threshold); - return result; - } - return debounced; - } - - return debounce; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/func.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/func.js deleted file mode 100644 index b920e00e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/func.js +++ /dev/null @@ -1,14 +0,0 @@ -define(function () { - - /** - * Returns a function that call a method on the passed object - */ - function func(name){ - return function(obj){ - return obj[name](); - }; - } - - return func; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/makeIterator_.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/makeIterator_.js deleted file mode 100644 index deb6e137..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/makeIterator_.js +++ /dev/null @@ -1,33 +0,0 @@ -define(['./prop', '../object/deepMatches'], function(prop, deepMatches) { - - /** - * Converts argument into a valid iterator. - * Used internally on most array/object/collection methods that receives a - * callback/iterator providing a shortcut syntax. - */ - function makeIterator(src, thisObj){ - switch(typeof src) { - case 'object': - // typeof null == "object" - return (src != null)? function(val, key, target){ - return deepMatches(val, src); - } : src; - case 'string': - case 'number': - return prop(src); - case 'function': - if (typeof thisObj === 'undefined') { - return src; - } else { - return function(val, i, arr){ - return src.call(thisObj, val, i, arr); - }; - } - default: - return src; - } - } - - return makeIterator; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/partial.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/partial.js deleted file mode 100644 index ad730746..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/partial.js +++ /dev/null @@ -1,19 +0,0 @@ -define(function () { - - function slice(arr, offset){ - return Array.prototype.slice.call(arr, offset || 0); - } - - /** - * Creates a partially applied function. - */ - function partial(fn, var_args){ - var argsArr = slice(arguments, 1); //curried args - return function(){ - return fn.apply(this, argsArr.concat(slice(arguments))); - }; - } - - return partial; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/prop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/prop.js deleted file mode 100644 index c9df78ca..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/prop.js +++ /dev/null @@ -1,14 +0,0 @@ -define(function () { - - /** - * Returns a function that gets a property of the passed object - */ - function prop(name){ - return function(obj){ - return obj[name]; - }; - } - - return prop; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/series.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/series.js deleted file mode 100644 index c8856a27..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/series.js +++ /dev/null @@ -1,22 +0,0 @@ -define(function () { - - /** - * Returns a function that will execute a list of functions in sequence - * passing the same arguments to each one. (useful for batch processing - * items during a forEach loop) - */ - function series(){ - var fns = arguments; - return function(){ - var i = 0, - n = fns.length; - while (i < n) { - fns[i].apply(this, arguments); - i += 1; - } - }; - } - - return series; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/throttle.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/throttle.js deleted file mode 100644 index 8ce3929a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/throttle.js +++ /dev/null @@ -1,32 +0,0 @@ -define(['../time/now'], function (now) { - - /** - */ - function throttle(fn, delay){ - var context, timeout, result, args, - cur, diff, prev = 0; - function delayed(){ - prev = now(); - timeout = null; - result = fn.apply(context, args); - } - function throttled(){ - context = this; - args = arguments; - cur = now(); - diff = delay - (cur - prev); - if (diff <= 0) { - clearTimeout(timeout); - prev = cur; - result = fn.apply(context, args); - } else if (! timeout) { - timeout = setTimeout(delayed, diff); - } - return result; - } - return throttled; - } - - return throttle; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/timeout.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/timeout.js deleted file mode 100644 index 15388bdd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/function/timeout.js +++ /dev/null @@ -1,21 +0,0 @@ -define(function () { - - function slice(arr, offset){ - return Array.prototype.slice.call(arr, offset || 0); - } - - /** - * Delays the call of a function within a given context. - */ - function timeout(fn, millis, context){ - - var args = slice(arguments, 3); - - return setTimeout(function() { - fn.apply(context, args); - }, millis); - } - - return timeout; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/index.js deleted file mode 100644 index 744bb119..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/index.js +++ /dev/null @@ -1,24 +0,0 @@ -/**@license - * mout v0.6.0 | http://moutjs.com | MIT license - */ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'VERSION' : '0.6.0', - 'array' : require('./array'), - 'collection' : require('./collection'), - 'date' : require('./date'), - 'function' : require('./function'), - 'lang' : require('./lang'), - 'math' : require('./math'), - 'number' : require('./number'), - 'object' : require('./object'), - 'queryString' : require('./queryString'), - 'random' : require('./random'), - 'string' : require('./string'), - 'time' : require('./time') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang.js deleted file mode 100644 index de16b597..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang.js +++ /dev/null @@ -1,36 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'clone' : require('./lang/clone'), - 'createObject' : require('./lang/createObject'), - 'ctorApply' : require('./lang/ctorApply'), - 'deepClone' : require('./lang/deepClone'), - 'defaults' : require('./lang/defaults'), - 'inheritPrototype' : require('./lang/inheritPrototype'), - 'is' : require('./lang/is'), - 'isArguments' : require('./lang/isArguments'), - 'isArray' : require('./lang/isArray'), - 'isBoolean' : require('./lang/isBoolean'), - 'isDate' : require('./lang/isDate'), - 'isEmpty' : require('./lang/isEmpty'), - 'isFinite' : require('./lang/isFinite'), - 'isFunction' : require('./lang/isFunction'), - 'isInteger' : require('./lang/isInteger'), - 'isKind' : require('./lang/isKind'), - 'isNaN' : require('./lang/isNaN'), - 'isNull' : require('./lang/isNull'), - 'isNumber' : require('./lang/isNumber'), - 'isObject' : require('./lang/isObject'), - 'isPlainObject' : require('./lang/isPlainObject'), - 'isRegExp' : require('./lang/isRegExp'), - 'isString' : require('./lang/isString'), - 'isUndefined' : require('./lang/isUndefined'), - 'isnt' : require('./lang/isnt'), - 'kindOf' : require('./lang/kindOf'), - 'toArray' : require('./lang/toArray'), - 'toString' : require('./lang/toString') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/clone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/clone.js deleted file mode 100644 index 468489a1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/clone.js +++ /dev/null @@ -1,47 +0,0 @@ -define(['./kindOf', './isPlainObject', '../object/mixIn'], function (kindOf, isPlainObject, mixIn) { - - /** - * Clone native types. - */ - function clone(val){ - switch (kindOf(val)) { - case 'Object': - return cloneObject(val); - case 'Array': - return cloneArray(val); - case 'RegExp': - return cloneRegExp(val); - case 'Date': - return cloneDate(val); - default: - return val; - } - } - - function cloneObject(source) { - if (isPlainObject(source)) { - return mixIn({}, source); - } else { - return source; - } - } - - function cloneRegExp(r) { - var flags = ''; - flags += r.multiline ? 'm' : ''; - flags += r.global ? 'g' : ''; - flags += r.ignorecase ? 'i' : ''; - return new RegExp(r.source, flags); - } - - function cloneDate(date) { - return new Date(+date); - } - - function cloneArray(arr) { - return arr.slice(); - } - - return clone; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/createObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/createObject.js deleted file mode 100644 index f7661500..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/createObject.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../object/mixIn'], function(mixIn){ - - /** - * Create Object using prototypal inheritance and setting custom properties. - * - Mix between Douglas Crockford Prototypal Inheritance <http://javascript.crockford.com/prototypal.html> and the EcmaScript 5 `Object.create()` method. - * @param {object} parent Parent Object. - * @param {object} [props] Object properties. - * @return {object} Created object. - */ - function createObject(parent, props){ - function F(){} - F.prototype = parent; - return mixIn(new F(), props); - - } - return createObject; -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/ctorApply.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/ctorApply.js deleted file mode 100644 index a9ac1c54..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/ctorApply.js +++ /dev/null @@ -1,17 +0,0 @@ -define(function () { - - function F(){} - - /** - * Do fn.apply on a constructor. - */ - function ctorApply(ctor, args) { - F.prototype = ctor.prototype; - var instance = new F(); - ctor.apply(instance, args); - return instance; - } - - return ctorApply; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/deepClone.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/deepClone.js deleted file mode 100644 index d45c10aa..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/deepClone.js +++ /dev/null @@ -1,45 +0,0 @@ -define(['./clone', '../object/forOwn', './kindOf', './isPlainObject'], function (clone, forOwn, kindOf, isPlainObject) { - - /** - * Recursively clone native types. - */ - function deepClone(val, instanceClone) { - switch ( kindOf(val) ) { - case 'Object': - return cloneObject(val, instanceClone); - case 'Array': - return cloneArray(val, instanceClone); - default: - return clone(val); - } - } - - function cloneObject(source, instanceClone) { - if (isPlainObject(source)) { - var out = {}; - forOwn(source, function(val, key) { - this[key] = deepClone(val, instanceClone); - }, out); - return out; - } else if (instanceClone) { - return instanceClone(source); - } else { - return source; - } - } - - function cloneArray(arr, instanceClone) { - var out = [], - i = -1, - n = arr.length, - val; - while (++i < n) { - out[i] = deepClone(arr[i], instanceClone); - } - return out; - } - - return deepClone; - -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/defaults.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/defaults.js deleted file mode 100644 index 5156b1bb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/defaults.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./toArray', '../array/find'], function (toArray, find) { - - /** - * Return first non void argument - */ - function defaults(var_args){ - return find(toArray(arguments), nonVoid); - } - - function nonVoid(val){ - return val != null; - } - - return defaults; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/inheritPrototype.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/inheritPrototype.js deleted file mode 100644 index c1fda3a7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/inheritPrototype.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./createObject'], function(createObject){ - - /** - * Inherit prototype from another Object. - * - inspired by Nicholas Zackas <http://nczonline.net> Solution - * @param {object} child Child object - * @param {object} parent Parent Object - */ - function inheritPrototype(child, parent){ - var p = createObject(parent.prototype); - p.constructor = child; - child.prototype = p; - } - - return inheritPrototype; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/is.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/is.js deleted file mode 100644 index 261a2077..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/is.js +++ /dev/null @@ -1,23 +0,0 @@ -define(function () { - - /** - * Check if both arguments are egal. - */ - function is(x, y){ - // implementation borrowed from harmony:egal spec - if (x === y) { - // 0 === -0, but they are not identical - return x !== 0 || 1 / x === 1 / y; - } - - // NaN !== NaN, but they are identical. - // NaNs are the only non-reflexive value, i.e., if x !== x, - // then x is a NaN. - // isNaN is broken: it converts its argument to number, so - // isNaN("foo") => true - return x !== x && y !== y; - } - - return is; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isArguments.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isArguments.js deleted file mode 100644 index f889ee8e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isArguments.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./isKind'], function (isKind) { - - /** - */ - var isArgs = isKind(arguments, 'Arguments')? - function(val){ - return isKind(val, 'Arguments'); - } : - function(val){ - // Arguments is an Object on IE7 - return !!(val && Object.prototype.hasOwnProperty.call(val, 'callee')); - }; - - return isArgs; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isArray.js deleted file mode 100644 index 886e2aa5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isArray.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - var isArray = Array.isArray || function (val) { - return isKind(val, 'Array'); - }; - return isArray; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isBoolean.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isBoolean.js deleted file mode 100644 index 1ca27a69..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isBoolean.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isBoolean(val) { - return isKind(val, 'Boolean'); - } - return isBoolean; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isDate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isDate.js deleted file mode 100644 index 2708d676..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isDate.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isDate(val) { - return isKind(val, 'Date'); - } - return isDate; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isEmpty.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isEmpty.js deleted file mode 100644 index 4cc3d2db..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isEmpty.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['../object/forOwn', './isArray'], function (forOwn, isArray) { - - function isEmpty(val){ - if (val == null) { - // typeof null == 'object' so we check it first - return false; - } else if ( typeof val === 'string' || isArray(val) ) { - return !val.length; - } else if ( typeof val === 'object' || typeof val === 'function' ) { - var result = true; - forOwn(val, function(){ - result = false; - return false; // break loop - }); - return result; - } else { - return false; - } - } - - return isEmpty; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isFinite.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isFinite.js deleted file mode 100644 index 5a982f4b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isFinite.js +++ /dev/null @@ -1,21 +0,0 @@ -define(['./isNumber'], function (isNumber) { - - var global = this; - - /** - * Check if value is finite - */ - function isFinite(val){ - var is = false; - if (typeof val === 'string' && val !== '') { - is = global.isFinite( parseFloat(val) ); - } else if (isNumber(val)){ - // need to use isNumber because of Number constructor - is = global.isFinite( val ); - } - return is; - } - - return isFinite; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isFunction.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isFunction.js deleted file mode 100644 index ff5df7f0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isFunction.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isFunction(val) { - return isKind(val, 'Function'); - } - return isFunction; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isInteger.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isInteger.js deleted file mode 100644 index 1931f516..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isInteger.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./isNumber'], function (isNumber) { - - /** - * Check if value is an integer - */ - function isInteger(val){ - return isNumber(val) && (val % 1 === 0); - } - - return isInteger; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isKind.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isKind.js deleted file mode 100644 index 6937a12f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isKind.js +++ /dev/null @@ -1,9 +0,0 @@ -define(['./kindOf'], function (kindOf) { - /** - * Check if value is from a specific "kind". - */ - function isKind(val, kind){ - return kindOf(val) === kind; - } - return isKind; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNaN.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNaN.js deleted file mode 100644 index 9467a3c8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNaN.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./isNumber'], function (isNumber) { - - /** - * Check if value is NaN for realz - */ - function isNaN(val){ - // based on the fact that NaN !== NaN - // need to check if it's a number to avoid conflicts with host objects - // also need to coerce ToNumber to avoid edge case `new Number(NaN)` - return !isNumber(val) || val != +val; - } - - return isNaN; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNull.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNull.js deleted file mode 100644 index 506e05ea..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNull.js +++ /dev/null @@ -1,9 +0,0 @@ -define(function () { - /** - */ - function isNull(val){ - return val === null; - } - return isNull; -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNumber.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNumber.js deleted file mode 100644 index 9a832c5f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isNumber.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isNumber(val) { - return isKind(val, 'Number'); - } - return isNumber; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isObject.js deleted file mode 100644 index 0befb063..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isObject.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isObject(val) { - return isKind(val, 'Object'); - } - return isObject; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isPlainObject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isPlainObject.js deleted file mode 100644 index 6c5854fd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isPlainObject.js +++ /dev/null @@ -1,14 +0,0 @@ -define(function () { - - /** - * Checks if the value is created by the `Object` constructor. - */ - function isPlainObject(value) { - return (!!value - && typeof value === 'object' - && value.constructor === Object); - } - - return isPlainObject; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isRegExp.js deleted file mode 100644 index d78a03da..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isRegExp.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isRegExp(val) { - return isKind(val, 'RegExp'); - } - return isRegExp; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isString.js deleted file mode 100644 index 8a42fe01..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isString.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isString(val) { - return isKind(val, 'String'); - } - return isString; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isUndefined.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isUndefined.js deleted file mode 100644 index c57b28eb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isUndefined.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function () { - var UNDEF; - - /** - */ - function isUndef(val){ - return val === UNDEF; - } - return isUndef; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isnt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isnt.js deleted file mode 100644 index d4336222..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/isnt.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./is'], function (is) { - - /** - * Check if both values are not identical/egal - */ - function isnt(x, y){ - return !is(x, y); - } - - return isnt; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/kindOf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/kindOf.js deleted file mode 100644 index 97d21d15..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/kindOf.js +++ /dev/null @@ -1,20 +0,0 @@ -define(function () { - - var _rKind = /^\[object (.*)\]$/, - _toString = Object.prototype.toString, - UNDEF; - - /** - * Gets the "kind" of value. (e.g. "String", "Number", etc) - */ - function kindOf(val) { - if (val === null) { - return 'Null'; - } else if (val === UNDEF) { - return 'Undefined'; - } else { - return _rKind.exec( _toString.call(val) )[1]; - } - } - return kindOf; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/toArray.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/toArray.js deleted file mode 100644 index 552916f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/toArray.js +++ /dev/null @@ -1,31 +0,0 @@ -define(['./kindOf'], function (kindOf) { - - var _win = this; - - /** - * Convert array-like object into array - */ - function toArray(val){ - var ret = [], - kind = kindOf(val), - n; - - if (val != null) { - if ( val.length == null || kind === 'String' || kind === 'Function' || kind === 'RegExp' || val === _win ) { - //string, regexp, function have .length but user probably just want - //to wrap value into an array.. - ret[ret.length] = val; - } else { - //window returns true on isObject in IE7 and may have length - //property. `typeof NodeList` returns `function` on Safari so - //we can't use it (#58) - n = val.length; - while (n--) { - ret[n] = val[n]; - } - } - } - return ret; - } - return toArray; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/toString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/toString.js deleted file mode 100644 index c28b89af..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/lang/toString.js +++ /dev/null @@ -1,13 +0,0 @@ -define(function () { - - /** - * Typecast a value to a String, using an empty string value for null or - * undefined. - */ - function toString(val){ - return val == null ? '' : val.toString(); - } - - return toString; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math.js deleted file mode 100644 index e2ba8705..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math.js +++ /dev/null @@ -1,19 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'ceil' : require('./math/ceil'), - 'clamp' : require('./math/clamp'), - 'countSteps' : require('./math/countSteps'), - 'floor' : require('./math/floor'), - 'inRange' : require('./math/inRange'), - 'isNear' : require('./math/isNear'), - 'lerp' : require('./math/lerp'), - 'loop' : require('./math/loop'), - 'map' : require('./math/map'), - 'norm' : require('./math/norm'), - 'round' : require('./math/round') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/ceil.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/ceil.js deleted file mode 100644 index d73b0581..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/ceil.js +++ /dev/null @@ -1,11 +0,0 @@ -define(function(){ - /** - * Round value up with a custom radix. - */ - function ceil(val, step){ - step = Math.abs(step || 1); - return Math.ceil(val / step) * step; - } - - return ceil; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/clamp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/clamp.js deleted file mode 100644 index fb5a1484..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/clamp.js +++ /dev/null @@ -1,9 +0,0 @@ -define(function(){ - /** - * Clamps value inside range. - */ - function clamp(val, min, max){ - return val < min? min : (val > max? max : val); - } - return clamp; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/countSteps.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/countSteps.js deleted file mode 100644 index 0ecb32f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/countSteps.js +++ /dev/null @@ -1,16 +0,0 @@ -define(function(){ - /** - * Count number of full steps. - */ - function countSteps(val, step, overflow){ - val = Math.floor(val / step); - - if (overflow) { - return val % overflow; - } - - return val; - } - - return countSteps; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/floor.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/floor.js deleted file mode 100644 index 8a4456b6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/floor.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function(){ - /** - * Floor value to full steps. - */ - function floor(val, step){ - step = Math.abs(step || 1); - return Math.floor(val / step) * step; - } - return floor; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/inRange.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/inRange.js deleted file mode 100644 index 0c890536..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/inRange.js +++ /dev/null @@ -1,11 +0,0 @@ -define(function(){ - /** - * Checks if value is inside the range. - */ - function inRange(val, min, max, threshold){ - threshold = threshold || 0; - return (val + threshold >= min && val - threshold <= max); - } - - return inRange; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/isNear.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/isNear.js deleted file mode 100644 index b308a0b0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/isNear.js +++ /dev/null @@ -1,9 +0,0 @@ -define(function(){ - /** - * Check if value is close to target. - */ - function isNear(val, target, threshold){ - return (Math.abs(val - target) <= threshold); - } - return isNear; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/lerp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/lerp.js deleted file mode 100644 index 26b99d04..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/lerp.js +++ /dev/null @@ -1,11 +0,0 @@ -define(function(){ - /** - * Linear interpolation. - * IMPORTANT:will return `Infinity` if numbers overflow Number.MAX_VALUE - */ - function lerp(ratio, start, end){ - return start + (end - start) * ratio; - } - - return lerp; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/loop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/loop.js deleted file mode 100644 index c735ecf6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/loop.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function(){ - /** - * Loops value inside range. - */ - function loop(val, min, max){ - return val < min? max : (val > max? min : val); - } - - return loop; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/map.js deleted file mode 100644 index bf7dc5d5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/map.js +++ /dev/null @@ -1,10 +0,0 @@ -define(['./lerp', './norm'], function(lerp, norm){ - /** - * Maps a number from one scale to another. - * @example map(3, 0, 4, -1, 1) -> 0.5 - */ - function map(val, min1, max1, min2, max2){ - return lerp( norm(val, min1, max1), min2, max2 ); - } - return map; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/norm.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/norm.js deleted file mode 100644 index fccae20e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/norm.js +++ /dev/null @@ -1,9 +0,0 @@ -define(function(){ - /** - * Gets normalized ratio of value inside range. - */ - function norm(val, min, max){ - return (val - min) / (max - min); - } - return norm; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/round.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/round.js deleted file mode 100644 index b43e4ac2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/math/round.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function () { - /** - * Round number to a specific radix - */ - function round(value, radix){ - radix = radix || 1; // default round 1 - return Math.round(value / radix) * radix; - } - - return round; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number.js deleted file mode 100644 index cb52fc75..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number.js +++ /dev/null @@ -1,21 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'MAX_INT' : require('./number/MAX_INT'), - 'MAX_UINT' : require('./number/MAX_UINT'), - 'MIN_INT' : require('./number/MIN_INT'), - 'abbreviate' : require('./number/abbreviate'), - 'currencyFormat' : require('./number/currencyFormat'), - 'enforcePrecision' : require('./number/enforcePrecision'), - 'pad' : require('./number/pad'), - 'rol' : require('./number/rol'), - 'ror' : require('./number/ror'), - 'sign' : require('./number/sign'), - 'toInt' : require('./number/toInt'), - 'toUInt' : require('./number/toUInt'), - 'toUInt31' : require('./number/toUInt31') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_INT.js deleted file mode 100644 index 23a6e1a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_INT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Maximum 32-bit signed integer value. (2^31 - 1) - */ -define(function(){ - return 2147483647; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_UINT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_UINT.js deleted file mode 100644 index a035096c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MAX_UINT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Maximum 32-bit unsigned integet value (2^32 - 1) - */ -define(function(){ - return 4294967295; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MIN_INT.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MIN_INT.js deleted file mode 100644 index 9b3e9781..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/MIN_INT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Minimum 32-bit signed integer value (-2^31). - */ -define(function(){ - return -2147483648; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/abbreviate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/abbreviate.js deleted file mode 100644 index 7e7405ad..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/abbreviate.js +++ /dev/null @@ -1,35 +0,0 @@ -define(['./enforcePrecision'], function (enforcePrecision) { - - var _defaultDict = { - thousand : 'K', - million : 'M', - billion : 'B' - }; - - /** - * Abbreviate number if bigger than 1000. (eg: 2.5K, 17.5M, 3.4B, ...) - */ - function abbreviateNumber(val, nDecimals, dict){ - nDecimals = nDecimals != null? nDecimals : 1; - dict = dict || _defaultDict; - val = enforcePrecision(val, nDecimals); - - var str, mod; - - if (val < 1000000) { - mod = enforcePrecision(val / 1000, nDecimals); - // might overflow to next scale during rounding - str = mod < 1000? mod + dict.thousand : 1 + dict.million; - } else if (val < 1000000000) { - mod = enforcePrecision(val / 1000000, nDecimals); - str = mod < 1000? mod + dict.million : 1 + dict.billion; - } else { - str = enforcePrecision(val / 1000000000, nDecimals) + dict.billion; - } - - return str; - } - - return abbreviateNumber; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/currencyFormat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/currencyFormat.js deleted file mode 100644 index dcde8fc7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/currencyFormat.js +++ /dev/null @@ -1,26 +0,0 @@ -define(function () { - - /** - * Converts number into currency format - */ - function currencyFormat(val, nDecimalDigits, decimalSeparator, thousandsSeparator) { - nDecimalDigits = nDecimalDigits == null? 2 : nDecimalDigits; - decimalSeparator = decimalSeparator == null? '.' : decimalSeparator; - thousandsSeparator = thousandsSeparator == null? ',' : thousandsSeparator; - - //can't use enforce precision since it returns a number and we are - //doing a RegExp over the string - var fixed = val.toFixed(nDecimalDigits), - //separate begin [$1], middle [$2] and decimal digits [$4] - parts = new RegExp('^(-?\\d{1,3})((?:\\d{3})+)(\\.(\\d{'+ nDecimalDigits +'}))?$').exec( fixed ); - - if(parts){ //val >= 1000 || val <= -1000 - return parts[1] + parts[2].replace(/\d{3}/g, thousandsSeparator + '$&') + (parts[4] ? decimalSeparator + parts[4] : ''); - }else{ - return fixed.replace('.', decimalSeparator); - } - } - - return currencyFormat; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/enforcePrecision.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/enforcePrecision.js deleted file mode 100644 index 84554d0e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/enforcePrecision.js +++ /dev/null @@ -1,13 +0,0 @@ -define(function(){ - /** - * Enforce a specific amount of decimal digits and also fix floating - * point rounding issues. - * @example `enforcePrecision(0.615, 2) -> 0.62`, `(0.615).toFixed(2) -> - * 0.61` - */ - function enforcePrecision(val, nDecimalDigits){ - var pow = Math.pow(10, nDecimalDigits); - return +(Math.round(val * pow) / pow).toFixed(nDecimalDigits); - } - return enforcePrecision; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/pad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/pad.js deleted file mode 100644 index 3b2c062a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/pad.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['../string/lpad'], function(lpad){ - - /** - * Add padding zeros if n.length < minLength. - */ - function pad(n, minLength, char){ - return lpad(''+ n, minLength, char || '0'); - } - - return pad; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/rol.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/rol.js deleted file mode 100644 index a148f444..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/rol.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function(){ - /** - * Bitwise circular shift left - * http://en.wikipedia.org/wiki/Circular_shift - */ - function rol(val, shift){ - return (val << shift) | (val >> (32 - shift)); - } - return rol; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/ror.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/ror.js deleted file mode 100644 index b5c66f92..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/ror.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function(){ - /** - * Bitwise circular shift right - * http://en.wikipedia.org/wiki/Circular_shift - */ - function ror(val, shift){ - return (val >> shift) | (val << (32 - shift)); - } - return ror; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/sign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/sign.js deleted file mode 100644 index dfc131d5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/sign.js +++ /dev/null @@ -1,15 +0,0 @@ -define(function () { - - /** - * Get sign of the value. - */ - function sign(val) { - var num = Number(val); - if (num === 0) return num; // +0 and +0 === 0 - if (isNaN(num)) return num; // NaN - return num < 0? -1 : 1; - } - - return sign; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toInt.js deleted file mode 100644 index 1e9b4c0b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toInt.js +++ /dev/null @@ -1,15 +0,0 @@ -define(function(){ - - /** - * "Convert" value into an 32-bit integer. - * Works like `Math.floor` if val > 0 and `Math.ceil` if val < 0. - * IMPORTANT: val will wrap at 2^31 and -2^31. - * Perf tests: http://jsperf.com/vs-vs-parseint-bitwise-operators/7 - */ - function toInt(val){ - return ~~val; - } - - return toInt; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt.js deleted file mode 100644 index d5b25b2c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt.js +++ /dev/null @@ -1,13 +0,0 @@ -define(function () { - - /** - * "Convert" value into a 32-bit unsigned integer. - * IMPORTANT: Value will wrap at 2^32. - */ - function toUInt(val){ - return val >>> 0; - } - - return toUInt; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt31.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt31.js deleted file mode 100644 index 9785a054..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/number/toUInt31.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./MAX_INT'], function(MAX_INT){ - - /** - * "Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). - * IMPORTANT: value wil wrap at 2^31, if negative will return 0. - */ - function toUInt31(val){ - return (val <= 0)? 0 : (val > MAX_INT? ~~(val % (MAX_INT + 1)) : ~~val); - } - - return toUInt31; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object.js deleted file mode 100644 index 343e7826..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object.js +++ /dev/null @@ -1,42 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'bindAll' : require('./object/bindAll'), - 'contains' : require('./object/contains'), - 'deepEquals' : require('./object/deepEquals'), - 'deepFillIn' : require('./object/deepFillIn'), - 'deepMatches' : require('./object/deepMatches'), - 'deepMixIn' : require('./object/deepMixIn'), - 'equals' : require('./object/equals'), - 'every' : require('./object/every'), - 'fillIn' : require('./object/fillIn'), - 'filter' : require('./object/filter'), - 'find' : require('./object/find'), - 'forIn' : require('./object/forIn'), - 'forOwn' : require('./object/forOwn'), - 'functions' : require('./object/functions'), - 'get' : require('./object/get'), - 'has' : require('./object/has'), - 'hasOwn' : require('./object/hasOwn'), - 'keys' : require('./object/keys'), - 'map' : require('./object/map'), - 'matches' : require('./object/matches'), - 'max' : require('./object/max'), - 'merge' : require('./object/merge'), - 'min' : require('./object/min'), - 'mixIn' : require('./object/mixIn'), - 'namespace' : require('./object/namespace'), - 'pick' : require('./object/pick'), - 'pluck' : require('./object/pluck'), - 'reduce' : require('./object/reduce'), - 'reject' : require('./object/reject'), - 'set' : require('./object/set'), - 'size' : require('./object/size'), - 'some' : require('./object/some'), - 'unset' : require('./object/unset'), - 'values' : require('./object/values') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/bindAll.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/bindAll.js deleted file mode 100644 index b131ed15..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/bindAll.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./functions', '../function/bind', '../array/forEach'], function (functions, bind, forEach) { - - /** - * Binds methods of the object to be run in it's own context. - */ - function bindAll(obj, rest_methodNames){ - var keys = arguments.length > 1? - Array.prototype.slice.call(arguments, 1) : functions(obj); - forEach(keys, function(key){ - obj[key] = bind(obj[key], obj); - }); - } - - return bindAll; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/contains.js deleted file mode 100644 index 297e8986..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/contains.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./some'], function (some) { - - /** - * Check if object contains value - */ - function contains(obj, needle) { - return some(obj, function(val) { - return (val === needle); - }); - } - return contains; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepEquals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepEquals.js deleted file mode 100644 index 8b7d5d15..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepEquals.js +++ /dev/null @@ -1,26 +0,0 @@ -define(['../lang/isObject', './equals'], function (isObject, equals) { - - function defaultCompare(a, b) { - return a === b; - } - - /** - * Recursively checks for same properties and values. - */ - function deepEquals(a, b, callback){ - callback = callback || defaultCompare; - - if (!isObject(a) || !isObject(b)) { - return callback(a, b); - } - - function compare(a, b){ - return deepEquals(a, b, callback); - } - - return equals(a, b, compare); - } - - return deepEquals; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepFillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepFillIn.js deleted file mode 100644 index 84ba154a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepFillIn.js +++ /dev/null @@ -1,31 +0,0 @@ -define(['./forOwn', '../lang/isPlainObject'], function (forOwn, isPlainObject) { - - /** - * Deeply copy missing properties in the target from the defaults. - */ - function deepFillIn(target, defaults){ - var i = 0, - n = arguments.length, - obj; - - while(++i < n) { - obj = arguments[i]; - if (obj) { - forOwn(obj, function(newValue, key) { - var curValue = target[key]; - if (curValue == null) { - target[key] = newValue; - } else if (isPlainObject(curValue) - && isPlainObject(newValue)) { - deepFillIn(curValue, newValue); - } - }); - } - } - - return target; - } - - return deepFillIn; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepMatches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepMatches.js deleted file mode 100644 index 2eae6297..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepMatches.js +++ /dev/null @@ -1,54 +0,0 @@ -define(['./forOwn', '../lang/isArray'], function(forOwn, isArray) { - - function containsMatch(array, pattern) { - var i = -1, length = array.length; - while (++i < length) { - if (deepMatches(array[i], pattern)) { - return true; - } - } - - return false; - } - - function matchArray(target, pattern) { - var i = -1, patternLength = pattern.length; - while (++i < patternLength) { - if (!containsMatch(target, pattern[i])) { - return false; - } - } - - return true; - } - - function matchObject(target, pattern) { - var result = true; - forOwn(pattern, function(val, key) { - if (!deepMatches(target[key], val)) { - // Return false to break out of forOwn early - return (result = false); - } - }); - - return result; - } - - /** - * Recursively check if the objects match. - */ - function deepMatches(target, pattern){ - if (target && typeof target === 'object') { - if (isArray(target) && isArray(pattern)) { - return matchArray(target, pattern); - } else { - return matchObject(target, pattern); - } - } else { - return target === pattern; - } - } - - return deepMatches; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepMixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepMixIn.js deleted file mode 100644 index 1b4178ef..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/deepMixIn.js +++ /dev/null @@ -1,33 +0,0 @@ -define(['./forOwn', '../lang/isPlainObject'], function (forOwn, isPlainObject) { - - /** - * Mixes objects into the target object, recursively mixing existing child - * objects. - */ - function deepMixIn(target, objects) { - var i = 0, - n = arguments.length, - obj; - - while(++i < n){ - obj = arguments[i]; - if (obj) { - forOwn(obj, copyProp, target); - } - } - - return target; - } - - function copyProp(val, key) { - var existing = this[key]; - if (isPlainObject(val) && isPlainObject(existing)) { - deepMixIn(existing, val); - } else { - this[key] = val; - } - } - - return deepMixIn; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/equals.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/equals.js deleted file mode 100644 index 596cb952..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/equals.js +++ /dev/null @@ -1,34 +0,0 @@ -define(['./hasOwn', './every', '../lang/isObject'], function(hasOwn, every, isObject) { - - function defaultCompare(a, b) { - return a === b; - } - - // Makes a function to compare the object values from the specified compare - // operation callback. - function makeCompare(callback) { - return function(value, key) { - return hasOwn(this, key) && callback(value, this[key]); - }; - } - - function checkProperties(value, key) { - return hasOwn(this, key); - } - - /** - * Checks if two objects have the same keys and values. - */ - function equals(a, b, callback) { - callback = callback || defaultCompare; - - if (!isObject(a) || !isObject(b)) { - return callback(a, b); - } - - return (every(a, makeCompare(callback), b) && - every(b, checkProperties, a)); - } - - return equals; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/every.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/every.js deleted file mode 100644 index 52983a5e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/every.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { - - /** - * Object every - */ - function every(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = true; - forOwn(obj, function(val, key) { - // we consider any falsy values as "false" on purpose so shorthand - // syntax can be used to check property existence - if (!callback(val, key, obj)) { - result = false; - return false; // break - } - }); - return result; - } - - return every; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/fillIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/fillIn.js deleted file mode 100644 index 0845d3c2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/fillIn.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['../array/forEach', './forOwn'], function (forEach, forOwn) { - - /** - * Copy missing properties in the obj from the defaults. - */ - function fillIn(obj, var_defaults){ - forEach(Array.prototype.slice.call(arguments, 1), function(base){ - forOwn(base, function(val, key){ - if (obj[key] == null) { - obj[key] = val; - } - }); - }); - return obj; - } - - return fillIn; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/filter.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/filter.js deleted file mode 100644 index f213b915..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/filter.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { - - /** - * Creates a new object with all the properties where the callback returns - * true. - */ - function filterValues(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var output = {}; - forOwn(obj, function(value, key, obj) { - if (callback(value, key, obj)) { - output[key] = value; - } - }); - - return output; - } - return filterValues; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/find.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/find.js deleted file mode 100644 index 47e6b09d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/find.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['./some', '../function/makeIterator_'], function(some, makeIterator) { - - /** - * Returns first item that matches criteria - */ - function find(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result; - some(obj, function(value, key, obj) { - if (callback(value, key, obj)) { - result = value; - return true; //break - } - }); - return result; - } - - return find; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/forIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/forIn.js deleted file mode 100644 index 2058e9cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/forIn.js +++ /dev/null @@ -1,62 +0,0 @@ -define(function () { - - var _hasDontEnumBug, - _dontEnums; - - function checkDontEnum(){ - _dontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' - ]; - - _hasDontEnumBug = true; - - for (var key in {'toString': null}) { - _hasDontEnumBug = false; - } - } - - /** - * Similar to Array/forEach but works over object properties and fixes Don't - * Enum bug on IE. - * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation - */ - function forIn(obj, fn, thisObj){ - var key, i = 0; - // no need to check if argument is a real object that way we can use - // it for arrays, functions, date, etc. - - //post-pone check till needed - if (_hasDontEnumBug == null) checkDontEnum(); - - for (key in obj) { - if (exec(fn, obj, key, thisObj) === false) { - break; - } - } - - if (_hasDontEnumBug) { - while (key = _dontEnums[i++]) { - // since we aren't using hasOwn check we need to make sure the - // property was overwritten - if (obj[key] !== Object.prototype[key]) { - if (exec(fn, obj, key, thisObj) === false) { - break; - } - } - } - } - } - - function exec(fn, obj, key, thisObj){ - return fn.call(thisObj, obj[key], key, obj); - } - - return forIn; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/forOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/forOwn.js deleted file mode 100644 index b40cbaf1..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/forOwn.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['./hasOwn', './forIn'], function (hasOwn, forIn) { - - /** - * Similar to Array/forEach but works over object properties and fixes Don't - * Enum bug on IE. - * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation - */ - function forOwn(obj, fn, thisObj){ - forIn(obj, function(val, key){ - if (hasOwn(obj, key)) { - return fn.call(thisObj, obj[key], key, obj); - } - }); - } - - return forOwn; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/functions.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/functions.js deleted file mode 100644 index 60fee3dd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/functions.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['./forIn'], function (forIn) { - - /** - * return a list of all enumerable properties that have function values - */ - function functions(obj){ - var keys = []; - forIn(obj, function(val, key){ - if (typeof val === 'function'){ - keys.push(key); - } - }); - return keys.sort(); - } - - return functions; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/get.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/get.js deleted file mode 100644 index ca80b059..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/get.js +++ /dev/null @@ -1,20 +0,0 @@ -define(function () { - - /** - * get "nested" object property - */ - function get(obj, prop){ - var parts = prop.split('.'), - last = parts.pop(); - - while (prop = parts.shift()) { - obj = obj[prop]; - if (typeof obj !== 'object') return; - } - - return obj[last]; - } - - return get; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/has.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/has.js deleted file mode 100644 index cc29817f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/has.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./get'], function (get) { - - var UNDEF; - - /** - * Check if object has nested property. - */ - function has(obj, prop){ - return get(obj, prop) !== UNDEF; - } - - return has; - -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/hasOwn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/hasOwn.js deleted file mode 100644 index 5c53bcf2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/hasOwn.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function () { - - /** - * Safer Object.hasOwnProperty - */ - function hasOwn(obj, prop){ - return Object.prototype.hasOwnProperty.call(obj, prop); - } - - return hasOwn; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/keys.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/keys.js deleted file mode 100644 index ed7c4f91..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/keys.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./forOwn'], function (forOwn) { - - /** - * Get object keys - */ - var keys = Object.keys || function (obj) { - var keys = []; - forOwn(obj, function(val, key){ - keys.push(key); - }); - return keys; - }; - - return keys; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/map.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/map.js deleted file mode 100644 index 2958f6b0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/map.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { - - /** - * Creates a new object where all the values are the result of calling - * `callback`. - */ - function mapValues(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var output = {}; - forOwn(obj, function(val, key, obj) { - output[key] = callback(val, key, obj); - }); - - return output; - } - return mapValues; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/matches.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/matches.js deleted file mode 100644 index 73ff427c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/matches.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['./forOwn'], function (forOwn) { - - /** - * checks if a object contains all given properties/values - */ - function matches(target, props){ - // can't use "object/every" because of circular dependency - var result = true; - forOwn(props, function(val, key){ - if (target[key] !== val) { - // break loop at first difference - return (result = false); - } - }); - return result; - } - - return matches; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/max.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/max.js deleted file mode 100644 index ef311dcb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/max.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../array/max', './values'], function(arrMax, values) { - - /** - * Returns maximum value inside object. - */ - function max(obj, compareFn) { - return arrMax(values(obj), compareFn); - } - - return max; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/merge.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/merge.js deleted file mode 100644 index d7cfedec..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/merge.js +++ /dev/null @@ -1,38 +0,0 @@ -define(['./hasOwn', '../lang/deepClone', '../lang/isObject'], function (hasOwn, deepClone, isObject) { - - /** - * Deep merge objects. - */ - function merge() { - var i = 1, - key, val, obj, target; - - // make sure we don't modify source element and it's properties - // objects are passed by reference - target = deepClone( arguments[0] ); - - while (obj = arguments[i++]) { - for (key in obj) { - if ( ! hasOwn(obj, key) ) { - continue; - } - - val = obj[key]; - - if ( isObject(val) && isObject(target[key]) ){ - // inception, deep merge objects - target[key] = merge(target[key], val); - } else { - // make sure arrays, regexp, date, objects are cloned - target[key] = deepClone(val); - } - - } - } - - return target; - } - - return merge; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/min.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/min.js deleted file mode 100644 index 9fb4c1a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/min.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../array/min', './values'], function(arrMin, values) { - - /** - * Returns minimum value inside object. - */ - function min(obj, iterator) { - return arrMin(values(obj), iterator); - } - - return min; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/mixIn.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/mixIn.js deleted file mode 100644 index 6210b7e7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/mixIn.js +++ /dev/null @@ -1,28 +0,0 @@ -define(['./forOwn'], function(forOwn){ - - /** - * Combine properties from all the objects into first one. - * - This method affects target object in place, if you want to create a new Object pass an empty object as first param. - * @param {object} target Target Object - * @param {...object} objects Objects to be combined (0...n objects). - * @return {object} Target Object. - */ - function mixIn(target, objects){ - var i = 0, - n = arguments.length, - obj; - while(++i < n){ - obj = arguments[i]; - if (obj != null) { - forOwn(obj, copyProp, target); - } - } - return target; - } - - function copyProp(val, key){ - this[key] = val; - } - - return mixIn; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/namespace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/namespace.js deleted file mode 100644 index 7ed65db8..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/namespace.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['../array/forEach'], function (forEach) { - - /** - * Create nested object if non-existent - */ - function namespace(obj, path){ - if (!path) return obj; - forEach(path.split('.'), function(key){ - if (!obj[key]) { - obj[key] = {}; - } - obj = obj[key]; - }); - return obj; - } - - return namespace; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/pick.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/pick.js deleted file mode 100644 index 76e22bfc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/pick.js +++ /dev/null @@ -1,18 +0,0 @@ -define(function(){ - - /** - * Return a copy of the object, filtered to only have values for the whitelisted keys. - */ - function pick(obj, var_keys){ - var keys = typeof arguments[1] !== 'string'? arguments[1] : Array.prototype.slice.call(arguments, 1), - out = {}, - i = 0, key; - while (key = keys[i++]) { - out[key] = obj[key]; - } - return out; - } - - return pick; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/pluck.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/pluck.js deleted file mode 100644 index d47744bd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/pluck.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./map', '../function/prop'], function (map, prop) { - - /** - * Extract a list of property values. - */ - function pluck(obj, propName){ - return map(obj, prop(propName)); - } - - return pluck; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/reduce.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/reduce.js deleted file mode 100644 index d3a57788..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/reduce.js +++ /dev/null @@ -1,28 +0,0 @@ -define(['./forOwn', './size'], function(forOwn, size) { - - /** - * Object reduce - */ - function reduce(obj, callback, memo, thisObj) { - var initial = arguments.length > 2; - - if (!size(obj) && !initial) { - throw new Error('reduce of empty object with no initial value'); - } - - forOwn(obj, function(value, key, list) { - if (!initial) { - memo = value; - initial = true; - } - else { - memo = callback.call(thisObj, memo, value, key, list); - } - }); - - return memo; - } - - return reduce; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/reject.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/reject.js deleted file mode 100644 index 84296428..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/reject.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./filter', '../function/makeIterator_'], function (filter, makeIterator) { - - /** - * Object reject - */ - function reject(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - return filter(obj, function(value, index, obj) { - return !callback(value, index, obj); - }, thisObj); - } - - return reject; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/set.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/set.js deleted file mode 100644 index b8fa25a3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/set.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['./namespace'], function (namespace) { - - /** - * set "nested" object property - */ - function set(obj, prop, val){ - var parts = (/^(.+)\.(.+)$/).exec(prop); - if (parts){ - namespace(obj, parts[1])[parts[2]] = val; - } else { - obj[prop] = val; - } - } - - return set; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/size.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/size.js deleted file mode 100644 index c6e377cf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/size.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./forOwn'], function (forOwn) { - - /** - * Get object size - */ - function size(obj) { - var count = 0; - forOwn(obj, function(){ - count++; - }); - return count; - } - - return size; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/some.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/some.js deleted file mode 100644 index 1bd6fdae..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/some.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { - - /** - * Object some - */ - function some(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = false; - forOwn(obj, function(val, key) { - if (callback(val, key, obj)) { - result = true; - return false; // break - } - }); - return result; - } - - return some; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/unset.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/unset.js deleted file mode 100644 index 787fc19a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/unset.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['./has'], function (has) { - - /** - * Unset object property. - */ - function unset(obj, prop){ - if (has(obj, prop)) { - var parts = prop.split('.'), - last = parts.pop(); - while (prop = parts.shift()) { - obj = obj[prop]; - } - return (delete obj[last]); - - } else { - // if property doesn't exist treat as deleted - return true; - } - } - - return unset; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/values.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/values.js deleted file mode 100644 index b311fd09..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/object/values.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./forOwn'], function (forOwn) { - - /** - * Get object values - */ - function values(obj) { - var vals = []; - forOwn(obj, function(val, key){ - vals.push(val); - }); - return vals; - } - - return values; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString.js deleted file mode 100644 index 44346127..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString.js +++ /dev/null @@ -1,15 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'contains' : require('./queryString/contains'), - 'decode' : require('./queryString/decode'), - 'encode' : require('./queryString/encode'), - 'getParam' : require('./queryString/getParam'), - 'getQuery' : require('./queryString/getQuery'), - 'parse' : require('./queryString/parse'), - 'setParam' : require('./queryString/setParam') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/contains.js deleted file mode 100644 index a6d11cce..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/contains.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./getQuery'], function (getQuery) { - - /** - * Checks if query string contains parameter. - */ - function contains(url, paramName) { - var regex = new RegExp('(\\?|&)'+ paramName +'=', 'g'); //matches `?param=` or `¶m=` - return regex.test(getQuery(url)); - } - - return contains; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/decode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/decode.js deleted file mode 100644 index 02bc1609..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/decode.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['../string/typecast', '../lang/isString'], function (typecast, isString) { - - /** - * Decode query string into an object of keys => vals. - */ - function decode(queryStr, shouldTypecast) { - var queryArr = (queryStr || '').replace('?', '').split('&'), - n = queryArr.length, - obj = {}, - item, val; - while (n--) { - item = queryArr[n].split('='); - val = shouldTypecast === false? item[1] : typecast(item[1]); - obj[item[0]] = isString(val)? decodeURIComponent(val) : val; - } - return obj; - } - - return decode; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/encode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/encode.js deleted file mode 100644 index bd72a5b6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/encode.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['../object/forOwn'], function (forOwn) { - - /** - * Encode object into a query string. - */ - function encode(obj){ - var query = []; - forOwn(obj, function(val, key){ - query.push( key +'='+ encodeURIComponent(val) ); - }); - return (query.length)? '?'+ query.join('&') : ''; - } - - return encode; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/getParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/getParam.js deleted file mode 100644 index d9813724..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/getParam.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../string/typecast', './getQuery'], function (typecast, getQuery) { - - /** - * Get query parameter value. - */ - function getParam(url, param, shouldTypecast){ - var regexp = new RegExp('(\\?|&)'+ param + '=([^&]*)'), //matches `?param=value` or `¶m=value`, value = $2 - result = regexp.exec( getQuery(url) ), - val = (result && result[2])? result[2] : null; - return shouldTypecast === false? val : typecast(val); - } - - return getParam; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/getQuery.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/getQuery.js deleted file mode 100644 index aa3d99f3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/getQuery.js +++ /dev/null @@ -1,13 +0,0 @@ -define(function () { - - /** - * Gets full query as string with all special chars decoded. - */ - function getQuery(url) { - url = url.replace(/#.*/, ''); //removes hash (to avoid getting hash query) - var queryString = /\?[a-zA-Z0-9\=\&\%\$\-\_\.\+\!\*\'\(\)\,]+/.exec(url); //valid chars according to: http://www.ietf.org/rfc/rfc1738.txt - return (queryString)? decodeURIComponent(queryString[0]) : ''; - } - - return getQuery; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/parse.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/parse.js deleted file mode 100644 index ac153e3f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/parse.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./decode', './getQuery'], function (decode, getQuery) { - - /** - * Get query string, parses and decodes it. - */ - function parse(url, shouldTypecast) { - return decode(getQuery(url), shouldTypecast); - } - - return parse; -}); - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/setParam.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/setParam.js deleted file mode 100644 index 97081aa7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/queryString/setParam.js +++ /dev/null @@ -1,28 +0,0 @@ -define(function () { - - /** - * Set query string parameter value - */ - function setParam(url, paramName, value){ - url = url || ''; - - var re = new RegExp('(\\?|&)'+ paramName +'=[^&]*' ); - var param = paramName +'='+ encodeURIComponent( value ); - - if ( re.test(url) ) { - return url.replace(re, '$1'+ param); - } else { - if (url.indexOf('?') === -1) { - url += '?'; - } - if (url.indexOf('=') !== -1) { - url += '&'; - } - return url + param; - } - - } - - return setParam; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random.js deleted file mode 100644 index b2641ee3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random.js +++ /dev/null @@ -1,16 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'choice' : require('./random/choice'), - 'guid' : require('./random/guid'), - 'rand' : require('./random/rand'), - 'randBit' : require('./random/randBit'), - 'randHex' : require('./random/randHex'), - 'randInt' : require('./random/randInt'), - 'randSign' : require('./random/randSign'), - 'random' : require('./random/random') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/choice.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/choice.js deleted file mode 100644 index 0d0c38df..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/choice.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['./randInt', '../lang/isArray'], function (randInt, isArray) { - - /** - * Returns a random element from the supplied arguments - * or from the array (if single argument is an array). - */ - function choice(items) { - var target = (arguments.length === 1 && isArray(items))? items : arguments; - return target[ randInt(0, target.length - 1) ]; - } - - return choice; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/guid.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/guid.js deleted file mode 100644 index 82f3a2db..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/guid.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['./randHex', './choice'], function (randHex, choice) { - - /** - * Returns pseudo-random guid (UUID v4) - * IMPORTANT: it's not totally "safe" since randHex/choice uses Math.random - * by default and sequences can be predicted in some cases. See the - * "random/random" documentation for more info about it and how to replace - * the default PRNG. - */ - function guid() { - return ( - randHex(8)+'-'+ - randHex(4)+'-'+ - // v4 UUID always contain "4" at this position to specify it was - // randomly generated - '4' + randHex(3) +'-'+ - // v4 UUID always contain chars [a,b,8,9] at this position - choice(8, 9, 'a', 'b') + randHex(3)+'-'+ - randHex(12) - ); - } - return guid; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/rand.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/rand.js deleted file mode 100644 index b8c231dd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/rand.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./random', '../number/MIN_INT', '../number/MAX_INT'], function(random, MIN_INT, MAX_INT){ - - /** - * Returns random number inside range - */ - function rand(min, max){ - min = min == null? MIN_INT : min; - max = max == null? MAX_INT : max; - return min + (max - min) * random(); - } - - return rand; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randBit.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randBit.js deleted file mode 100644 index b3422d2d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randBit.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['./random'], function (random) { - - /** - * Returns random bit (0 or 1) - */ - function randomBit() { - return random() > 0.5? 1 : 0; - } - - return randomBit; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randHex.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randHex.js deleted file mode 100644 index 6e9bf1c5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randHex.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['./choice'], function (choice) { - - var _chars = '0123456789abcdef'.split(''); - - /** - * Returns a random hexadecimal string - */ - function randHex(size){ - size = size && size > 0? size : 6; - var str = ''; - while (size--) { - str += choice(_chars); - } - return str; - } - - return randHex; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randInt.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randInt.js deleted file mode 100644 index 1750e9de..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randInt.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['../number/MIN_INT', '../number/MAX_INT', './rand'], function(MIN_INT, MAX_INT, rand){ - - /** - * Gets random integer inside range or snap to min/max values. - */ - function randInt(min, max){ - min = min == null? MIN_INT : ~~min; - max = max == null? MAX_INT : ~~max; - // can't be max + 0.5 otherwise it will round up if `rand` - // returns `max` causing it to overflow range. - // -0.5 and + 0.49 are required to avoid bias caused by rounding - return Math.round( rand(min - 0.5, max + 0.499999999999) ); - } - - return randInt; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randSign.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randSign.js deleted file mode 100644 index 4141cdf6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/randSign.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['./random'], function (random) { - - /** - * Returns random sign (-1 or 1) - */ - function randomSign() { - return random() > 0.5? 1 : -1; - } - - return randomSign; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/random.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/random.js deleted file mode 100644 index 4270822e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/random/random.js +++ /dev/null @@ -1,18 +0,0 @@ -define(function () { - - /** - * Just a wrapper to Math.random. No methods inside mout/random should call - * Math.random() directly so we can inject the pseudo-random number - * generator if needed (ie. in case we need a seeded random or a better - * algorithm than the native one) - */ - function random(){ - return random.get(); - } - - // we expose the method so it can be swapped if needed - random.get = Math.random; - - return random; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string.js deleted file mode 100644 index 3f5fd804..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string.js +++ /dev/null @@ -1,45 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'WHITE_SPACES' : require('./string/WHITE_SPACES'), - 'camelCase' : require('./string/camelCase'), - 'contains' : require('./string/contains'), - 'crop' : require('./string/crop'), - 'endsWith' : require('./string/endsWith'), - 'escapeHtml' : require('./string/escapeHtml'), - 'escapeRegExp' : require('./string/escapeRegExp'), - 'escapeUnicode' : require('./string/escapeUnicode'), - 'hyphenate' : require('./string/hyphenate'), - 'interpolate' : require('./string/interpolate'), - 'lowerCase' : require('./string/lowerCase'), - 'lpad' : require('./string/lpad'), - 'ltrim' : require('./string/ltrim'), - 'makePath' : require('./string/makePath'), - 'normalizeLineBreaks' : require('./string/normalizeLineBreaks'), - 'pascalCase' : require('./string/pascalCase'), - 'properCase' : require('./string/properCase'), - 'removeNonASCII' : require('./string/removeNonASCII'), - 'removeNonWord' : require('./string/removeNonWord'), - 'repeat' : require('./string/repeat'), - 'replace' : require('./string/replace'), - 'replaceAccents' : require('./string/replaceAccents'), - 'rpad' : require('./string/rpad'), - 'rtrim' : require('./string/rtrim'), - 'sentenceCase' : require('./string/sentenceCase'), - 'slugify' : require('./string/slugify'), - 'startsWith' : require('./string/startsWith'), - 'stripHtmlTags' : require('./string/stripHtmlTags'), - 'trim' : require('./string/trim'), - 'truncate' : require('./string/truncate'), - 'typecast' : require('./string/typecast'), - 'unCamelCase' : require('./string/unCamelCase'), - 'underscore' : require('./string/underscore'), - 'unescapeHtml' : require('./string/unescapeHtml'), - 'unescapeUnicode' : require('./string/unescapeUnicode'), - 'unhyphenate' : require('./string/unhyphenate'), - 'upperCase' : require('./string/upperCase') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/WHITE_SPACES.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/WHITE_SPACES.js deleted file mode 100644 index e830d86d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/WHITE_SPACES.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function() { - /** - * Contains all Unicode white-spaces. Taken from - * http://en.wikipedia.org/wiki/Whitespace_character. - */ - return [ - ' ', '\n', '\r', '\t', '\f', '\v', '\u00A0', '\u1680', '\u180E', - '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', - '\u2007', '\u2008', '\u2009', '\u200A', '\u2028', '\u2029', '\u202F', - '\u205F', '\u3000' - ]; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/camelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/camelCase.js deleted file mode 100644 index 02e6c04d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/camelCase.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['../lang/toString', './replaceAccents', './removeNonWord', './upperCase', './lowerCase'], function(toString, replaceAccents, removeNonWord, upperCase, lowerCase){ - /** - * Convert string to camelCase text. - */ - function camelCase(str){ - str = toString(str); - str = replaceAccents(str); - str = removeNonWord(str) - .replace(/[\-_]/g, ' ') //convert all hyphens and underscores to spaces - .replace(/\s[a-z]/g, upperCase) //convert first char of each word to UPPERCASE - .replace(/\s+/g, '') //remove spaces - .replace(/^[A-Z]/g, lowerCase); //convert first char to lowercase - return str; - } - return camelCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/contains.js deleted file mode 100644 index 825b5a5f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/contains.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../lang/toString'], function(toString) { - - /** - * Searches for a given substring - */ - function contains(str, substring, fromIndex){ - str = toString(str); - substring = toString(substring); - return str.indexOf(substring, fromIndex) !== -1; - } - - return contains; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/crop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/crop.js deleted file mode 100644 index 3c073f05..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/crop.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString', './truncate'], function (toString, truncate) { - /** - * Truncate string at full words. - */ - function crop(str, maxChars, append) { - str = toString(str); - return truncate(str, maxChars, append, true); - } - - return crop; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/endsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/endsWith.js deleted file mode 100644 index 31a73f20..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/endsWith.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../lang/toString'], function(toString) { - /** - * Checks if string ends with specified suffix. - */ - function endsWith(str, suffix) { - str = toString(str); - suffix = toString(suffix); - - return str.indexOf(suffix, str.length - suffix.length) !== -1; - } - - return endsWith; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeHtml.js deleted file mode 100644 index de34b61b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeHtml.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../lang/toString'], function(toString) { - - /** - * Escapes a string for insertion into HTML. - */ - function escapeHtml(str){ - str = toString(str) - .replace(/&/g, '&') - .replace(/</g, '<') - .replace(/>/g, '>') - .replace(/'/g, ''') - .replace(/"/g, '"'); - return str; - } - - return escapeHtml; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeRegExp.js deleted file mode 100644 index 32facac0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeRegExp.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['../lang/toString'], function(toString) { - - var ESCAPE_CHARS = /[\\.+*?\^$\[\](){}\/'#]/g; - - /** - * Escape RegExp string chars. - */ - function escapeRegExp(str) { - str = toString(str); - return str.replace(ESCAPE_CHARS,'\\$&'); - } - - return escapeRegExp; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeUnicode.js deleted file mode 100644 index bd5e8c4c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/escapeUnicode.js +++ /dev/null @@ -1,21 +0,0 @@ -define(['../lang/toString'], function(toString) { - - /** - * Escape string into unicode sequences - */ - function escapeUnicode(str, shouldEscapePrintable){ - str = toString(str); - return str.replace(/[\s\S]/g, function(ch){ - // skip printable ASCII chars if we should not escape them - if (!shouldEscapePrintable && (/[\x20-\x7E]/).test(ch)) { - return ch; - } - // we use "000" and slice(-4) for brevity, need to pad zeros, - // unicode escape always have 4 chars after "\u" - return '\\u'+ ('000'+ ch.charCodeAt(0).toString(16)).slice(-4); - }); - } - - return escapeUnicode; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/hyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/hyphenate.js deleted file mode 100644 index 679c405c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/hyphenate.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['../lang/toString', './slugify', './unCamelCase'], function(toString, slugify, unCamelCase){ - /** - * Replaces spaces with hyphens, split camelCase text, remove non-word chars, remove accents and convert to lower case. - */ - function hyphenate(str){ - str = toString(str); - str = unCamelCase(str); - return slugify(str, "-"); - } - - return hyphenate; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/interpolate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/interpolate.js deleted file mode 100644 index ecb8ba80..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/interpolate.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../lang/toString'], function(toString) { - - var stache = /\{\{(\w+)\}\}/g; //mustache-like - - /** - * String interpolation - */ - function interpolate(template, replacements, syntax){ - template = toString(template); - var replaceFn = function(match, prop){ - return (prop in replacements)? toString(replacements[prop]) : ''; - }; - return template.replace(syntax || stache, replaceFn); - } - - return interpolate; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/lowerCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/lowerCase.js deleted file mode 100644 index b045d69c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/lowerCase.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * "Safer" String.toLowerCase() - */ - function lowerCase(str){ - str = toString(str); - return str.toLowerCase(); - } - - return lowerCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/lpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/lpad.js deleted file mode 100644 index ea4f5fbf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/lpad.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['../lang/toString', './repeat'], function(toString, repeat) { - - /** - * Pad string with `char` if its' length is smaller than `minLen` - */ - function lpad(str, minLen, ch) { - str = toString(str); - ch = ch || ' '; - - return ((str.length < minLen) - ? repeat(ch, minLen - str.length) + str : str); - } - - return lpad; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/ltrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/ltrim.js deleted file mode 100644 index 477df953..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/ltrim.js +++ /dev/null @@ -1,33 +0,0 @@ -define(['../lang/toString', './WHITE_SPACES'], function(toString, WHITE_SPACES){ - /** - * Remove chars from beginning of string. - */ - function ltrim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - - var start = 0, - len = str.length, - charLen = chars.length, - found = true, - i, c; - - while (found && start < len) { - found = false; - i = -1; - c = str.charAt(start); - - while (++i < charLen) { - if (c === chars[i]) { - found = true; - start++; - break; - } - } - } - - return (start >= len) ? '' : str.substr(start, len); - } - - return ltrim; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/makePath.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/makePath.js deleted file mode 100644 index 7aa7baba..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/makePath.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../array/join'], function(join){ - - /** - * Group arguments as path segments, if any of the args is `null` or an - * empty string it will be ignored from resulting path. - */ - function makePath(var_args){ - var result = join(Array.prototype.slice.call(arguments), '/'); - return result.replace(/\/{2,}/g, '/'); - } - - return makePath; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/normalizeLineBreaks.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/normalizeLineBreaks.js deleted file mode 100644 index 44e4194f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/normalizeLineBreaks.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../lang/toString'], function (toString) { - - /** - * Convert line-breaks from DOS/MAC to a single standard (UNIX by default) - */ - function normalizeLineBreaks(str, lineEnd) { - str = toString(str); - lineEnd = lineEnd || '\n'; - - return str - .replace(/\r\n/g, lineEnd) // DOS - .replace(/\r/g, lineEnd) // Mac - .replace(/\n/g, lineEnd); // Unix - } - - return normalizeLineBreaks; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/pascalCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/pascalCase.js deleted file mode 100644 index ead9ead4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/pascalCase.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString', './camelCase', './upperCase'], function(toString, camelCase, upperCase){ - /** - * camelCase + UPPERCASE first char - */ - function pascalCase(str){ - str = toString(str); - return camelCase(str).replace(/^[a-z]/, upperCase); - } - - return pascalCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/properCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/properCase.js deleted file mode 100644 index 2987b507..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/properCase.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString', './lowerCase', './upperCase'], function(toString, lowerCase, upperCase){ - /** - * UPPERCASE first char of each word. - */ - function properCase(str){ - str = toString(str); - return lowerCase(str).replace(/^\w|\s\w/g, upperCase); - } - - return properCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonASCII.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonASCII.js deleted file mode 100644 index 4905869d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonASCII.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * Remove non-printable ASCII chars - */ - function removeNonASCII(str){ - str = toString(str); - - // Matches non-printable ASCII chars - - // http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters - return str.replace(/[^\x20-\x7E]/g, ''); - } - - return removeNonASCII; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonWord.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonWord.js deleted file mode 100644 index 2b1a2040..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/removeNonWord.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * Remove non-word chars. - */ - function removeNonWord(str){ - str = toString(str); - return str.replace(/[^0-9a-zA-Z\xC0-\xFF \-_]/g, ''); - } - - return removeNonWord; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/repeat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/repeat.js deleted file mode 100644 index 02f5659f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/repeat.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../lang/toString'], function(toString){ - - /** - * Repeat string n times - */ - function repeat(str, n){ - str = toString(str); - return (new Array(n + 1)).join(str); - } - - return repeat; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/replace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/replace.js deleted file mode 100644 index 8b762fdc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/replace.js +++ /dev/null @@ -1,32 +0,0 @@ -define(['../lang/toString', '../lang/toArray'], function (toString, toArray) { - - /** - * Replace string(s) with the replacement(s) in the source. - */ - function replace(str, search, replacements) { - str = toString(str); - search = toArray(search); - replacements = toArray(replacements); - - var searchLength = search.length, - replacementsLength = replacements.length; - - if (replacementsLength !== 1 && searchLength !== replacementsLength) { - throw new Error('Unequal number of searches and replacements'); - } - - var i = -1; - while (++i < searchLength) { - // Use the first replacement for all searches if only one - // replacement is provided - str = str.replace( - search[i], - replacements[(replacementsLength === 1) ? 0 : i]); - } - - return str; - } - - return replace; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/replaceAccents.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/replaceAccents.js deleted file mode 100644 index 3a63f55a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/replaceAccents.js +++ /dev/null @@ -1,36 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * Replaces all accented chars with regular ones - */ - function replaceAccents(str){ - str = toString(str); - - // verifies if the String has accents and replace them - if (str.search(/[\xC0-\xFF]/g) > -1) { - str = str - .replace(/[\xC0-\xC5]/g, "A") - .replace(/[\xC6]/g, "AE") - .replace(/[\xC7]/g, "C") - .replace(/[\xC8-\xCB]/g, "E") - .replace(/[\xCC-\xCF]/g, "I") - .replace(/[\xD0]/g, "D") - .replace(/[\xD1]/g, "N") - .replace(/[\xD2-\xD6\xD8]/g, "O") - .replace(/[\xD9-\xDC]/g, "U") - .replace(/[\xDD]/g, "Y") - .replace(/[\xDE]/g, "P") - .replace(/[\xE0-\xE5]/g, "a") - .replace(/[\xE6]/g, "ae") - .replace(/[\xE7]/g, "c") - .replace(/[\xE8-\xEB]/g, "e") - .replace(/[\xEC-\xEF]/g, "i") - .replace(/[\xF1]/g, "n") - .replace(/[\xF2-\xF6\xF8]/g, "o") - .replace(/[\xF9-\xFC]/g, "u") - .replace(/[\xFE]/g, "p") - .replace(/[\xFD\xFF]/g, "y"); - } - return str; - } - return replaceAccents; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/rpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/rpad.js deleted file mode 100644 index 2efd9c88..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/rpad.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../lang/toString', './repeat'], function (toString, repeat) { - - /** - * Pad string with `char` if its' length is smaller than `minLen` - */ - function rpad(str, minLen, ch) { - str = toString(str); - ch = ch || ' '; - return (str.length < minLen)? str + repeat(ch, minLen - str.length) : str; - } - - return rpad; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/rtrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/rtrim.js deleted file mode 100644 index a4cc282d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/rtrim.js +++ /dev/null @@ -1,32 +0,0 @@ -define(['../lang/toString', './WHITE_SPACES'], function(toString, WHITE_SPACES){ - /** - * Remove chars from end of string. - */ - function rtrim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - - var end = str.length - 1, - charLen = chars.length, - found = true, - i, c; - - while (found && end >= 0) { - found = false; - i = -1; - c = str.charAt(end); - - while (++i < charLen) { - if (c === chars[i]) { - found = true; - end--; - break; - } - } - } - - return (end >= 0) ? str.substring(0, end + 1) : ''; - } - - return rtrim; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/sentenceCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/sentenceCase.js deleted file mode 100644 index cfe45af5..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/sentenceCase.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../lang/toString', './lowerCase', './upperCase'], function(toString, lowerCase, upperCase){ - /** - * UPPERCASE first char of each sentence and lowercase other chars. - */ - function sentenceCase(str){ - str = toString(str); - - // Replace first char of each sentence (new line or after '.\s+') to - // UPPERCASE - return lowerCase(str).replace(/(^\w)|\.\s+(\w)/gm, upperCase); - } - return sentenceCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/slugify.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/slugify.js deleted file mode 100644 index c6d68c7e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/slugify.js +++ /dev/null @@ -1,21 +0,0 @@ -define(['../lang/toString', './replaceAccents', './removeNonWord', './trim'], function(toString, replaceAccents, removeNonWord, trim){ - /** - * Convert to lower case, remove accents, remove non-word chars and - * replace spaces with the specified delimeter. - * Does not split camelCase text. - */ - function slugify(str, delimeter){ - str = toString(str); - - if (delimeter == null) { - delimeter = "-"; - } - str = replaceAccents(str); - str = removeNonWord(str); - str = trim(str) //should come after removeNonWord - .replace(/ +/g, delimeter) //replace spaces with delimeter - .toLowerCase(); - return str; - } - return slugify; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/startsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/startsWith.js deleted file mode 100644 index 88ae5453..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/startsWith.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../lang/toString'], function (toString) { - /** - * Checks if string starts with specified prefix. - */ - function startsWith(str, prefix) { - str = toString(str); - prefix = toString(prefix); - - return str.indexOf(prefix) === 0; - } - - return startsWith; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/stripHtmlTags.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/stripHtmlTags.js deleted file mode 100644 index e8da956d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/stripHtmlTags.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * Remove HTML tags from string. - */ - function stripHtmlTags(str){ - str = toString(str); - - return str.replace(/<[^>]*>/g, ''); - } - return stripHtmlTags; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/trim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/trim.js deleted file mode 100644 index 55526041..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/trim.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['../lang/toString', './WHITE_SPACES', './ltrim', './rtrim'], function(toString, WHITE_SPACES, ltrim, rtrim){ - /** - * Remove white-spaces from beginning and end of string. - */ - function trim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - return ltrim(rtrim(str, chars), chars); - } - - return trim; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/truncate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/truncate.js deleted file mode 100644 index 34000d9f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/truncate.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['../lang/toString', './trim'], function(toString, trim){ - /** - * Limit number of chars. - */ - function truncate(str, maxChars, append, onlyFullWords){ - str = toString(str); - append = append || '...'; - maxChars = onlyFullWords? maxChars + 1 : maxChars; - - str = trim(str); - if(str.length <= maxChars){ - return str; - } - str = str.substr(0, maxChars - append.length); - //crop at last space or remove trailing whitespace - str = onlyFullWords? str.substr(0, str.lastIndexOf(' ')) : trim(str); - return str + append; - } - return truncate; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/typecast.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/typecast.js deleted file mode 100644 index a7c83153..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/typecast.js +++ /dev/null @@ -1,29 +0,0 @@ -define(function () { - - var UNDEF; - - /** - * Parses string and convert it into a native value. - */ - function typecast(val) { - var r; - if ( val === null || val === 'null' ) { - r = null; - } else if ( val === 'true' ) { - r = true; - } else if ( val === 'false' ) { - r = false; - } else if ( val === UNDEF || val === 'undefined' ) { - r = UNDEF; - } else if ( val === '' || isNaN(val) ) { - //isNaN('') returns false - r = val; - } else { - //parseFloat(null || '') returns NaN - r = parseFloat(val); - } - return r; - } - - return typecast; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unCamelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unCamelCase.js deleted file mode 100644 index eeef39b6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unCamelCase.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['../lang/toString'], function(toString){ - - var CAMEL_CASE_BORDER = /([a-z\xE0-\xFF])([A-Z\xC0\xDF])/g; - - /** - * Add space between camelCase text. - */ - function unCamelCase(str, delimiter){ - if (delimiter == null) { - delimiter = ' '; - } - - function join(str, c1, c2) { - return c1 + delimiter + c2; - } - - str = toString(str); - str = str.replace(CAMEL_CASE_BORDER, join); - str = str.toLowerCase(); //add space between camelCase text - return str; - } - return unCamelCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/underscore.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/underscore.js deleted file mode 100644 index 75dd4649..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/underscore.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString', './slugify', './unCamelCase'], function(toString, slugify, unCamelCase){ - /** - * Replaces spaces with underscores, split camelCase text, remove non-word chars, remove accents and convert to lower case. - */ - function underscore(str){ - str = toString(str); - str = unCamelCase(str); - return slugify(str, "_"); - } - return underscore; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeHtml.js deleted file mode 100644 index 173c69c2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeHtml.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../lang/toString'], function (toString) { - - /** - * Unescapes HTML special chars - */ - function unescapeHtml(str){ - str = toString(str) - .replace(/&/g , '&') - .replace(/</g , '<') - .replace(/>/g , '>') - .replace(/'/g , "'") - .replace(/"/g, '"'); - return str; - } - - return unescapeHtml; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeUnicode.js deleted file mode 100644 index d4a7ba1d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unescapeUnicode.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['../lang/toString'], function(toString) { - - /** - * Unescape unicode char sequences - */ - function unescapeUnicode(str){ - str = toString(str); - return str.replace(/\\u[0-9a-f]{4}/g, function(ch){ - var code = parseInt(ch.slice(2), 16); - return String.fromCharCode(code); - }); - } - - return unescapeUnicode; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unhyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unhyphenate.js deleted file mode 100644 index 6ac2fa4c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/unhyphenate.js +++ /dev/null @@ -1,10 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * Replaces hyphens with spaces. (only hyphens between word chars) - */ - function unhyphenate(str){ - str = toString(str); - return str.replace(/(\w)(-)(\w)/g, '$1 $3'); - } - return unhyphenate; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/upperCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/upperCase.js deleted file mode 100644 index 8b2073e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/string/upperCase.js +++ /dev/null @@ -1,10 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * "Safer" String.toUpperCase() - */ - function upperCase(str){ - str = toString(str); - return str.toUpperCase(); - } - return upperCase; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time.js deleted file mode 100644 index 67c90685..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'convert' : require('./time/convert'), - 'now' : require('./time/now'), - 'parseMs' : require('./time/parseMs'), - 'toTimeString' : require('./time/toTimeString') -}; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time/convert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time/convert.js deleted file mode 100644 index 2de0cf2e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time/convert.js +++ /dev/null @@ -1,41 +0,0 @@ -define(function () { - - /** - * convert time into another unit - */ - function convert(val, sourceUnitName, destinationUnitName){ - destinationUnitName = destinationUnitName || 'ms'; - return (val * getUnit(sourceUnitName)) / getUnit(destinationUnitName); - } - - - //TODO: maybe extract to a separate module - function getUnit(unitName){ - switch(unitName){ - case 'ms': - case 'millisecond': - return 1; - case 's': - case 'second': - return 1000; - case 'm': - case 'minute': - return 60000; - case 'h': - case 'hour': - return 3600000; - case 'd': - case 'day': - return 86400000; - case 'w': - case 'week': - return 604800000; - default: - throw new Error('"'+ unitName + '" is not a valid unit'); - } - } - - - return convert; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time/now.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time/now.js deleted file mode 100644 index a3a38bcb..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time/now.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function () { - - /** - * Get current time in miliseconds - */ - var now = (typeof Date.now === 'function')? Date.now : function(){ - return +(new Date()); - }; - - return now; - -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time/parseMs.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time/parseMs.js deleted file mode 100644 index 964929ae..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time/parseMs.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['../math/countSteps'], function(countSteps){ - - /** - * Parse timestamp into an object. - */ - function parseMs(ms){ - return { - milliseconds : countSteps(ms, 1, 1000), - seconds : countSteps(ms, 1000, 60), - minutes : countSteps(ms, 60000, 60), - hours : countSteps(ms, 3600000, 24), - days : countSteps(ms, 86400000) - }; - } - - return parseMs; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time/toTimeString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time/toTimeString.js deleted file mode 100644 index edf18218..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/src/time/toTimeString.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['../math/countSteps', '../number/pad'], function(countSteps, pad){ - - var HOUR = 3600000, - MINUTE = 60000, - SECOND = 1000; - - /** - * Format timestamp into a time string. - */ - function toTimeString(ms){ - var h = ms < HOUR ? 0 : countSteps(ms, HOUR), - m = ms < MINUTE ? 0 : countSteps(ms, MINUTE, 60), - s = ms < SECOND ? 0 : countSteps(ms, SECOND, 60), - str = ''; - - str += h? h + ':' : ''; - str += pad(m, 2) + ':'; - str += pad(s, 2); - - return str; - } - return toTimeString; -}); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string.js deleted file mode 100644 index 7f0ca3bd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string.js +++ /dev/null @@ -1,45 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'WHITE_SPACES' : require('./string/WHITE_SPACES'), - 'camelCase' : require('./string/camelCase'), - 'contains' : require('./string/contains'), - 'crop' : require('./string/crop'), - 'endsWith' : require('./string/endsWith'), - 'escapeHtml' : require('./string/escapeHtml'), - 'escapeRegExp' : require('./string/escapeRegExp'), - 'escapeUnicode' : require('./string/escapeUnicode'), - 'hyphenate' : require('./string/hyphenate'), - 'interpolate' : require('./string/interpolate'), - 'lowerCase' : require('./string/lowerCase'), - 'lpad' : require('./string/lpad'), - 'ltrim' : require('./string/ltrim'), - 'makePath' : require('./string/makePath'), - 'normalizeLineBreaks' : require('./string/normalizeLineBreaks'), - 'pascalCase' : require('./string/pascalCase'), - 'properCase' : require('./string/properCase'), - 'removeNonASCII' : require('./string/removeNonASCII'), - 'removeNonWord' : require('./string/removeNonWord'), - 'repeat' : require('./string/repeat'), - 'replace' : require('./string/replace'), - 'replaceAccents' : require('./string/replaceAccents'), - 'rpad' : require('./string/rpad'), - 'rtrim' : require('./string/rtrim'), - 'sentenceCase' : require('./string/sentenceCase'), - 'slugify' : require('./string/slugify'), - 'startsWith' : require('./string/startsWith'), - 'stripHtmlTags' : require('./string/stripHtmlTags'), - 'trim' : require('./string/trim'), - 'truncate' : require('./string/truncate'), - 'typecast' : require('./string/typecast'), - 'unCamelCase' : require('./string/unCamelCase'), - 'underscore' : require('./string/underscore'), - 'unescapeHtml' : require('./string/unescapeHtml'), - 'unescapeUnicode' : require('./string/unescapeUnicode'), - 'unhyphenate' : require('./string/unhyphenate'), - 'upperCase' : require('./string/upperCase') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/WHITE_SPACES.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/WHITE_SPACES.js deleted file mode 100644 index 03e01254..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/WHITE_SPACES.js +++ /dev/null @@ -1,12 +0,0 @@ - - /** - * Contains all Unicode white-spaces. Taken from - * http://en.wikipedia.org/wiki/Whitespace_character. - */ - module.exports = [ - ' ', '\n', '\r', '\t', '\f', '\v', '\u00A0', '\u1680', '\u180E', - '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', - '\u2007', '\u2008', '\u2009', '\u200A', '\u2028', '\u2029', '\u202F', - '\u205F', '\u3000' - ]; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/camelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/camelCase.js deleted file mode 100644 index aadb69a2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/camelCase.js +++ /dev/null @@ -1,20 +0,0 @@ -var toString = require('../lang/toString'); -var replaceAccents = require('./replaceAccents'); -var removeNonWord = require('./removeNonWord'); -var upperCase = require('./upperCase'); -var lowerCase = require('./lowerCase'); - /** - * Convert string to camelCase text. - */ - function camelCase(str){ - str = toString(str); - str = replaceAccents(str); - str = removeNonWord(str) - .replace(/[\-_]/g, ' ') //convert all hyphens and underscores to spaces - .replace(/\s[a-z]/g, upperCase) //convert first char of each word to UPPERCASE - .replace(/\s+/g, '') //remove spaces - .replace(/^[A-Z]/g, lowerCase); //convert first char to lowercase - return str; - } - module.exports = camelCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/contains.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/contains.js deleted file mode 100644 index cb22cae4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/contains.js +++ /dev/null @@ -1,14 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Searches for a given substring - */ - function contains(str, substring, fromIndex){ - str = toString(str); - substring = toString(substring); - return str.indexOf(substring, fromIndex) !== -1; - } - - module.exports = contains; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/crop.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/crop.js deleted file mode 100644 index 53b93b49..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/crop.js +++ /dev/null @@ -1,12 +0,0 @@ -var toString = require('../lang/toString'); -var truncate = require('./truncate'); - /** - * Truncate string at full words. - */ - function crop(str, maxChars, append) { - str = toString(str); - return truncate(str, maxChars, append, true); - } - - module.exports = crop; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/endsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/endsWith.js deleted file mode 100644 index d504e9dd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/endsWith.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Checks if string ends with specified suffix. - */ - function endsWith(str, suffix) { - str = toString(str); - suffix = toString(suffix); - - return str.indexOf(suffix, str.length - suffix.length) !== -1; - } - - module.exports = endsWith; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeHtml.js deleted file mode 100644 index e67c4b21..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeHtml.js +++ /dev/null @@ -1,18 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Escapes a string for insertion into HTML. - */ - function escapeHtml(str){ - str = toString(str) - .replace(/&/g, '&') - .replace(/</g, '<') - .replace(/>/g, '>') - .replace(/'/g, ''') - .replace(/"/g, '"'); - return str; - } - - module.exports = escapeHtml; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeRegExp.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeRegExp.js deleted file mode 100644 index 70cb84ff..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeRegExp.js +++ /dev/null @@ -1,15 +0,0 @@ -var toString = require('../lang/toString'); - - var ESCAPE_CHARS = /[\\.+*?\^$\[\](){}\/'#]/g; - - /** - * Escape RegExp string chars. - */ - function escapeRegExp(str) { - str = toString(str); - return str.replace(ESCAPE_CHARS,'\\$&'); - } - - module.exports = escapeRegExp; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeUnicode.js deleted file mode 100644 index ec649adf..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/escapeUnicode.js +++ /dev/null @@ -1,21 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Escape string into unicode sequences - */ - function escapeUnicode(str, shouldEscapePrintable){ - str = toString(str); - return str.replace(/[\s\S]/g, function(ch){ - // skip printable ASCII chars if we should not escape them - if (!shouldEscapePrintable && (/[\x20-\x7E]/).test(ch)) { - return ch; - } - // we use "000" and slice(-4) for brevity, need to pad zeros, - // unicode escape always have 4 chars after "\u" - return '\\u'+ ('000'+ ch.charCodeAt(0).toString(16)).slice(-4); - }); - } - - module.exports = escapeUnicode; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/hyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/hyphenate.js deleted file mode 100644 index 95e32436..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/hyphenate.js +++ /dev/null @@ -1,14 +0,0 @@ -var toString = require('../lang/toString'); -var slugify = require('./slugify'); -var unCamelCase = require('./unCamelCase'); - /** - * Replaces spaces with hyphens, split camelCase text, remove non-word chars, remove accents and convert to lower case. - */ - function hyphenate(str){ - str = toString(str); - str = unCamelCase(str); - return slugify(str, "-"); - } - - module.exports = hyphenate; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/interpolate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/interpolate.js deleted file mode 100644 index ac88fac2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/interpolate.js +++ /dev/null @@ -1,18 +0,0 @@ -var toString = require('../lang/toString'); - - var stache = /\{\{(\w+)\}\}/g; //mustache-like - - /** - * String interpolation - */ - function interpolate(template, replacements, syntax){ - template = toString(template); - var replaceFn = function(match, prop){ - return (prop in replacements)? toString(replacements[prop]) : ''; - }; - return template.replace(syntax || stache, replaceFn); - } - - module.exports = interpolate; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/lowerCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/lowerCase.js deleted file mode 100644 index 30bb7ad9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/lowerCase.js +++ /dev/null @@ -1,11 +0,0 @@ -var toString = require('../lang/toString'); - /** - * "Safer" String.toLowerCase() - */ - function lowerCase(str){ - str = toString(str); - return str.toLowerCase(); - } - - module.exports = lowerCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/lpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/lpad.js deleted file mode 100644 index 694d711e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/lpad.js +++ /dev/null @@ -1,17 +0,0 @@ -var toString = require('../lang/toString'); -var repeat = require('./repeat'); - - /** - * Pad string with `char` if its' length is smaller than `minLen` - */ - function lpad(str, minLen, ch) { - str = toString(str); - ch = ch || ' '; - - return ((str.length < minLen) - ? repeat(ch, minLen - str.length) + str : str); - } - - module.exports = lpad; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/ltrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/ltrim.js deleted file mode 100644 index 23d7b33f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/ltrim.js +++ /dev/null @@ -1,34 +0,0 @@ -var toString = require('../lang/toString'); -var WHITE_SPACES = require('./WHITE_SPACES'); - /** - * Remove chars from beginning of string. - */ - function ltrim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - - var start = 0, - len = str.length, - charLen = chars.length, - found = true, - i, c; - - while (found && start < len) { - found = false; - i = -1; - c = str.charAt(start); - - while (++i < charLen) { - if (c === chars[i]) { - found = true; - start++; - break; - } - } - } - - return (start >= len) ? '' : str.substr(start, len); - } - - module.exports = ltrim; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/makePath.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/makePath.js deleted file mode 100644 index 69aef310..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/makePath.js +++ /dev/null @@ -1,13 +0,0 @@ -var join = require('../array/join'); - - /** - * Group arguments as path segments, if any of the args is `null` or an - * empty string it will be ignored from resulting path. - */ - function makePath(var_args){ - var result = join(Array.prototype.slice.call(arguments), '/'); - return result.replace(/\/{2,}/g, '/'); - } - - module.exports = makePath; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/normalizeLineBreaks.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/normalizeLineBreaks.js deleted file mode 100644 index 8a8dccfd..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/normalizeLineBreaks.js +++ /dev/null @@ -1,18 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Convert line-breaks from DOS/MAC to a single standard (UNIX by default) - */ - function normalizeLineBreaks(str, lineEnd) { - str = toString(str); - lineEnd = lineEnd || '\n'; - - return str - .replace(/\r\n/g, lineEnd) // DOS - .replace(/\r/g, lineEnd) // Mac - .replace(/\n/g, lineEnd); // Unix - } - - module.exports = normalizeLineBreaks; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/pascalCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/pascalCase.js deleted file mode 100644 index fd190353..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/pascalCase.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); -var camelCase = require('./camelCase'); -var upperCase = require('./upperCase'); - /** - * camelCase + UPPERCASE first char - */ - function pascalCase(str){ - str = toString(str); - return camelCase(str).replace(/^[a-z]/, upperCase); - } - - module.exports = pascalCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/properCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/properCase.js deleted file mode 100644 index 61636be4..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/properCase.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); -var lowerCase = require('./lowerCase'); -var upperCase = require('./upperCase'); - /** - * UPPERCASE first char of each word. - */ - function properCase(str){ - str = toString(str); - return lowerCase(str).replace(/^\w|\s\w/g, upperCase); - } - - module.exports = properCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/removeNonASCII.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/removeNonASCII.js deleted file mode 100644 index fb463816..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/removeNonASCII.js +++ /dev/null @@ -1,14 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Remove non-printable ASCII chars - */ - function removeNonASCII(str){ - str = toString(str); - - // Matches non-printable ASCII chars - - // http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters - return str.replace(/[^\x20-\x7E]/g, ''); - } - - module.exports = removeNonASCII; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/removeNonWord.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/removeNonWord.js deleted file mode 100644 index bdd153b9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/removeNonWord.js +++ /dev/null @@ -1,11 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Remove non-word chars. - */ - function removeNonWord(str){ - str = toString(str); - return str.replace(/[^0-9a-zA-Z\xC0-\xFF \-_]/g, ''); - } - - module.exports = removeNonWord; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/repeat.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/repeat.js deleted file mode 100644 index 0f9b4754..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/repeat.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Repeat string n times - */ - function repeat(str, n){ - str = toString(str); - return (new Array(n + 1)).join(str); - } - - module.exports = repeat; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/replace.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/replace.js deleted file mode 100644 index 14433fc7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/replace.js +++ /dev/null @@ -1,33 +0,0 @@ -var toString = require('../lang/toString'); -var toArray = require('../lang/toArray'); - - /** - * Replace string(s) with the replacement(s) in the source. - */ - function replace(str, search, replacements) { - str = toString(str); - search = toArray(search); - replacements = toArray(replacements); - - var searchLength = search.length, - replacementsLength = replacements.length; - - if (replacementsLength !== 1 && searchLength !== replacementsLength) { - throw new Error('Unequal number of searches and replacements'); - } - - var i = -1; - while (++i < searchLength) { - // Use the first replacement for all searches if only one - // replacement is provided - str = str.replace( - search[i], - replacements[(replacementsLength === 1) ? 0 : i]); - } - - return str; - } - - module.exports = replace; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/replaceAccents.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/replaceAccents.js deleted file mode 100644 index bb221265..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/replaceAccents.js +++ /dev/null @@ -1,36 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Replaces all accented chars with regular ones - */ - function replaceAccents(str){ - str = toString(str); - - // verifies if the String has accents and replace them - if (str.search(/[\xC0-\xFF]/g) > -1) { - str = str - .replace(/[\xC0-\xC5]/g, "A") - .replace(/[\xC6]/g, "AE") - .replace(/[\xC7]/g, "C") - .replace(/[\xC8-\xCB]/g, "E") - .replace(/[\xCC-\xCF]/g, "I") - .replace(/[\xD0]/g, "D") - .replace(/[\xD1]/g, "N") - .replace(/[\xD2-\xD6\xD8]/g, "O") - .replace(/[\xD9-\xDC]/g, "U") - .replace(/[\xDD]/g, "Y") - .replace(/[\xDE]/g, "P") - .replace(/[\xE0-\xE5]/g, "a") - .replace(/[\xE6]/g, "ae") - .replace(/[\xE7]/g, "c") - .replace(/[\xE8-\xEB]/g, "e") - .replace(/[\xEC-\xEF]/g, "i") - .replace(/[\xF1]/g, "n") - .replace(/[\xF2-\xF6\xF8]/g, "o") - .replace(/[\xF9-\xFC]/g, "u") - .replace(/[\xFE]/g, "p") - .replace(/[\xFD\xFF]/g, "y"); - } - return str; - } - module.exports = replaceAccents; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/rpad.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/rpad.js deleted file mode 100644 index 99f6378d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/rpad.js +++ /dev/null @@ -1,15 +0,0 @@ -var toString = require('../lang/toString'); -var repeat = require('./repeat'); - - /** - * Pad string with `char` if its' length is smaller than `minLen` - */ - function rpad(str, minLen, ch) { - str = toString(str); - ch = ch || ' '; - return (str.length < minLen)? str + repeat(ch, minLen - str.length) : str; - } - - module.exports = rpad; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/rtrim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/rtrim.js deleted file mode 100644 index 66ba80e9..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/rtrim.js +++ /dev/null @@ -1,33 +0,0 @@ -var toString = require('../lang/toString'); -var WHITE_SPACES = require('./WHITE_SPACES'); - /** - * Remove chars from end of string. - */ - function rtrim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - - var end = str.length - 1, - charLen = chars.length, - found = true, - i, c; - - while (found && end >= 0) { - found = false; - i = -1; - c = str.charAt(end); - - while (++i < charLen) { - if (c === chars[i]) { - found = true; - end--; - break; - } - } - } - - return (end >= 0) ? str.substring(0, end + 1) : ''; - } - - module.exports = rtrim; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/sentenceCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/sentenceCase.js deleted file mode 100644 index 354104c6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/sentenceCase.js +++ /dev/null @@ -1,15 +0,0 @@ -var toString = require('../lang/toString'); -var lowerCase = require('./lowerCase'); -var upperCase = require('./upperCase'); - /** - * UPPERCASE first char of each sentence and lowercase other chars. - */ - function sentenceCase(str){ - str = toString(str); - - // Replace first char of each sentence (new line or after '.\s+') to - // UPPERCASE - return lowerCase(str).replace(/(^\w)|\.\s+(\w)/gm, upperCase); - } - module.exports = sentenceCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/slugify.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/slugify.js deleted file mode 100644 index 142f0d9b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/slugify.js +++ /dev/null @@ -1,24 +0,0 @@ -var toString = require('../lang/toString'); -var replaceAccents = require('./replaceAccents'); -var removeNonWord = require('./removeNonWord'); -var trim = require('./trim'); - /** - * Convert to lower case, remove accents, remove non-word chars and - * replace spaces with the specified delimeter. - * Does not split camelCase text. - */ - function slugify(str, delimeter){ - str = toString(str); - - if (delimeter == null) { - delimeter = "-"; - } - str = replaceAccents(str); - str = removeNonWord(str); - str = trim(str) //should come after removeNonWord - .replace(/ +/g, delimeter) //replace spaces with delimeter - .toLowerCase(); - return str; - } - module.exports = slugify; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/startsWith.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/startsWith.js deleted file mode 100644 index bce2bd20..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/startsWith.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Checks if string starts with specified prefix. - */ - function startsWith(str, prefix) { - str = toString(str); - prefix = toString(prefix); - - return str.indexOf(prefix) === 0; - } - - module.exports = startsWith; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/stripHtmlTags.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/stripHtmlTags.js deleted file mode 100644 index 01d17b0e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/stripHtmlTags.js +++ /dev/null @@ -1,11 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Remove HTML tags from string. - */ - function stripHtmlTags(str){ - str = toString(str); - - return str.replace(/<[^>]*>/g, ''); - } - module.exports = stripHtmlTags; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/trim.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/trim.js deleted file mode 100644 index 9652b0c7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/trim.js +++ /dev/null @@ -1,15 +0,0 @@ -var toString = require('../lang/toString'); -var WHITE_SPACES = require('./WHITE_SPACES'); -var ltrim = require('./ltrim'); -var rtrim = require('./rtrim'); - /** - * Remove white-spaces from beginning and end of string. - */ - function trim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - return ltrim(rtrim(str, chars), chars); - } - - module.exports = trim; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/truncate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/truncate.js deleted file mode 100644 index a98d6c7d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/truncate.js +++ /dev/null @@ -1,21 +0,0 @@ -var toString = require('../lang/toString'); -var trim = require('./trim'); - /** - * Limit number of chars. - */ - function truncate(str, maxChars, append, onlyFullWords){ - str = toString(str); - append = append || '...'; - maxChars = onlyFullWords? maxChars + 1 : maxChars; - - str = trim(str); - if(str.length <= maxChars){ - return str; - } - str = str.substr(0, maxChars - append.length); - //crop at last space or remove trailing whitespace - str = onlyFullWords? str.substr(0, str.lastIndexOf(' ')) : trim(str); - return str + append; - } - module.exports = truncate; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/typecast.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/typecast.js deleted file mode 100644 index c1386a49..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/typecast.js +++ /dev/null @@ -1,29 +0,0 @@ - - - var UNDEF; - - /** - * Parses string and convert it into a native value. - */ - function typecast(val) { - var r; - if ( val === null || val === 'null' ) { - r = null; - } else if ( val === 'true' ) { - r = true; - } else if ( val === 'false' ) { - r = false; - } else if ( val === UNDEF || val === 'undefined' ) { - r = UNDEF; - } else if ( val === '' || isNaN(val) ) { - //isNaN('') returns false - r = val; - } else { - //parseFloat(null || '') returns NaN - r = parseFloat(val); - } - return r; - } - - module.exports = typecast; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/unCamelCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/unCamelCase.js deleted file mode 100644 index 4968f378..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/unCamelCase.js +++ /dev/null @@ -1,23 +0,0 @@ -var toString = require('../lang/toString'); - - var CAMEL_CASE_BORDER = /([a-z\xE0-\xFF])([A-Z\xC0\xDF])/g; - - /** - * Add space between camelCase text. - */ - function unCamelCase(str, delimiter){ - if (delimiter == null) { - delimiter = ' '; - } - - function join(str, c1, c2) { - return c1 + delimiter + c2; - } - - str = toString(str); - str = str.replace(CAMEL_CASE_BORDER, join); - str = str.toLowerCase(); //add space between camelCase text - return str; - } - module.exports = unCamelCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/underscore.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/underscore.js deleted file mode 100644 index ebd6e2b7..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/underscore.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); -var slugify = require('./slugify'); -var unCamelCase = require('./unCamelCase'); - /** - * Replaces spaces with underscores, split camelCase text, remove non-word chars, remove accents and convert to lower case. - */ - function underscore(str){ - str = toString(str); - str = unCamelCase(str); - return slugify(str, "_"); - } - module.exports = underscore; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/unescapeHtml.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/unescapeHtml.js deleted file mode 100644 index 52cf3f45..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/unescapeHtml.js +++ /dev/null @@ -1,18 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Unescapes HTML special chars - */ - function unescapeHtml(str){ - str = toString(str) - .replace(/&/g , '&') - .replace(/</g , '<') - .replace(/>/g , '>') - .replace(/'/g , "'") - .replace(/"/g, '"'); - return str; - } - - module.exports = unescapeHtml; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/unescapeUnicode.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/unescapeUnicode.js deleted file mode 100644 index 0b7fb73b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/unescapeUnicode.js +++ /dev/null @@ -1,16 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Unescape unicode char sequences - */ - function unescapeUnicode(str){ - str = toString(str); - return str.replace(/\\u[0-9a-f]{4}/g, function(ch){ - var code = parseInt(ch.slice(2), 16); - return String.fromCharCode(code); - }); - } - - module.exports = unescapeUnicode; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/unhyphenate.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/unhyphenate.js deleted file mode 100644 index 311dfa17..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/unhyphenate.js +++ /dev/null @@ -1,10 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Replaces hyphens with spaces. (only hyphens between word chars) - */ - function unhyphenate(str){ - str = toString(str); - return str.replace(/(\w)(-)(\w)/g, '$1 $3'); - } - module.exports = unhyphenate; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/upperCase.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/upperCase.js deleted file mode 100644 index 6c92552c..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/string/upperCase.js +++ /dev/null @@ -1,10 +0,0 @@ -var toString = require('../lang/toString'); - /** - * "Safer" String.toUpperCase() - */ - function upperCase(str){ - str = toString(str); - return str.toUpperCase(); - } - module.exports = upperCase; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time.js deleted file mode 100644 index 9f533296..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time.js +++ /dev/null @@ -1,12 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'convert' : require('./time/convert'), - 'now' : require('./time/now'), - 'parseMs' : require('./time/parseMs'), - 'toTimeString' : require('./time/toTimeString') -}; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time/convert.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time/convert.js deleted file mode 100644 index 852a0f03..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time/convert.js +++ /dev/null @@ -1,41 +0,0 @@ - - - /** - * convert time into another unit - */ - function convert(val, sourceUnitName, destinationUnitName){ - destinationUnitName = destinationUnitName || 'ms'; - return (val * getUnit(sourceUnitName)) / getUnit(destinationUnitName); - } - - - //TODO: maybe extract to a separate module - function getUnit(unitName){ - switch(unitName){ - case 'ms': - case 'millisecond': - return 1; - case 's': - case 'second': - return 1000; - case 'm': - case 'minute': - return 60000; - case 'h': - case 'hour': - return 3600000; - case 'd': - case 'day': - return 86400000; - case 'w': - case 'week': - return 604800000; - default: - throw new Error('"'+ unitName + '" is not a valid unit'); - } - } - - - module.exports = convert; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time/now.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time/now.js deleted file mode 100644 index effcfbe3..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time/now.js +++ /dev/null @@ -1,12 +0,0 @@ - - - /** - * Get current time in miliseconds - */ - var now = (typeof Date.now === 'function')? Date.now : function(){ - return +(new Date()); - }; - - module.exports = now; - - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time/parseMs.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time/parseMs.js deleted file mode 100644 index 6d997976..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time/parseMs.js +++ /dev/null @@ -1,17 +0,0 @@ -var countSteps = require('../math/countSteps'); - - /** - * Parse timestamp into an object. - */ - function parseMs(ms){ - return { - milliseconds : countSteps(ms, 1, 1000), - seconds : countSteps(ms, 1000, 60), - minutes : countSteps(ms, 60000, 60), - hours : countSteps(ms, 3600000, 24), - days : countSteps(ms, 86400000) - }; - } - - module.exports = parseMs; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time/toTimeString.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time/toTimeString.js deleted file mode 100644 index 101d69fc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/mout/time/toTimeString.js +++ /dev/null @@ -1,24 +0,0 @@ -var countSteps = require('../math/countSteps'); -var pad = require('../number/pad'); - - var HOUR = 3600000, - MINUTE = 60000, - SECOND = 1000; - - /** - * Format timestamp into a time string. - */ - function toTimeString(ms){ - var h = ms < HOUR ? 0 : countSteps(ms, HOUR), - m = ms < MINUTE ? 0 : countSteps(ms, MINUTE, 60), - s = ms < SECOND ? 0 : countSteps(ms, SECOND, 60), - str = ''; - - str += h? h + ':' : ''; - str += pad(m, 2) + ':'; - str += pad(s, 2); - - return str; - } - module.exports = toTimeString; - diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/.npmignore b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/.npmignore deleted file mode 100644 index f1250e58..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/History.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/History.md deleted file mode 100644 index 88119480..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/History.md +++ /dev/null @@ -1,42 +0,0 @@ - -1.0.0 / 2013-06-18 -================== - - * remove .version - * >=. Closes #19 - * Merge pull request #15 from davglass/readline-osx - * On OSX revert back to terminal hack to avoid a readline bug - -0.1.0 / 2012-09-19 -================== - - * Fixed logic bug that caused bar to jump one extra space at the end [davglass] - * Working with readline impl, even on Windows [davglass] - * Using readline instead of the \r hack [davglass] - -0.0.5 / 2012-08-07 -================== - - * add ability to tick by zero chunks - tick(0) - * fix ETA. Closes #4 [lwille] - -0.0.4 / 2011-11-14 -================== - - * Allow more recent versions of node - -0.0.3 / 2011-04-20 -================== - - * Changed; erase the line when complete - -0.0.2 / 2011-04-20 -================== - - * Added custom tokens support - * Fixed; clear line before writing - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/Makefile b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/Makefile deleted file mode 100644 index 36a3ed7d..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/Makefile +++ /dev/null @@ -1,5 +0,0 @@ - -test: - @echo "populate me" - -.PHONY: test \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/Readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/Readme.md deleted file mode 100644 index 4e08a49b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/Readme.md +++ /dev/null @@ -1,117 +0,0 @@ -# node-progress - - Flexible ascii progress bar - -## Installation - - npm install progress - -## Usage - - First we create a `ProgressBar`, giving it a format string - as well as the `total`, telling the progress bar when it will - be considered complete. After that all we need to do is `tick()` appropriately. - -```javascript -var ProgressBar = require('progress'); - -var bar = new ProgressBar(':bar', { total: 10 }); -var timer = setInterval(function(){ - bar.tick(); - if (bar.complete) { - console.log('\ncomplete\n'); - clearInterval(timer); - } -}, 100); -``` - -## Options: - - - `total` total number of ticks to complete - - `width` the displayed width of the progress bar defaulting to total - - `stream` the output stream defaulting to stdout - - `complete` completion character defaulting to "=" - - `incomplete` incomplete character defaulting to "-" - - `clear` option to clear the bar on completion defaulting to false - - `callback` optional function to call when the progress bar completes - -## Tokens: - - - `:bar` the progress bar itself - - `:current` current tick number - - `:total` total ticks - - `:elapsed` time elapsed in seconds - - `:percent` completion percentage - - `:eta` estimated completion time in seconds - -## Examples - -### Download - - In our download example each tick has a variable influence, so we pass the chunk length which adjusts the progress bar appropriately relative to the total length. - -```javascript -var ProgressBar = require('../') - , https = require('https'); - -var req = https.request({ - host: 'download.github.com' - , port: 443 - , path: '/visionmedia-node-jscoverage-0d4608a.zip' -}); - -req.on('response', function(res){ - var len = parseInt(res.headers['content-length'], 10); - - console.log(); - var bar = new ProgressBar(' downloading [:bar] :percent :etas', { - complete: '=' - , incomplete: ' ' - , width: 20 - , total: len - }); - - res.on('data', function(chunk){ - bar.tick(chunk.length); - }); - - res.on('end', function(){ - console.log('\n'); - }); -}); - -req.end(); -``` - - The code above will generate a progress bar that looks like this: - -``` -downloading [===== ] 29% 3.7s -``` - -You can see more examples in the `examples` folder. - -## License - -(The MIT License) - -Copyright (c) 2011 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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/index.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/index.js deleted file mode 100644 index 4449dd30..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/node-progress'); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/lib/node-progress.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/lib/node-progress.js deleted file mode 100644 index ca0ce4f0..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/lib/node-progress.js +++ /dev/null @@ -1,183 +0,0 @@ -/*! - * node-progress - * Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca> - * MIT Licensed - */ - -/** - * Expose `ProgressBar`. - */ - -exports = module.exports = ProgressBar; - -/** - * Initialize a `ProgressBar` with the given - * `fmt` string and `options` or `total`. - * - * Options: - * - * - `total` total number of ticks to complete - * - `width` the displayed width of the progress bar defaulting to total - * - `stream` the output stream defaulting to stdout - * - `complete` completion character defaulting to "=" - * - `incomplete` incomplete character defaulting to "-" - * - `callback` optional function to call when the progress bar completes - * - * Tokens: - * - * - `:bar` the progress bar itself - * - `:current` current tick number - * - `:total` total ticks - * - `:elapsed` time elapsed in seconds - * - `:percent` completion percentage - * - `:eta` eta in seconds - * - * @param {String} fmt - * @param {Object|Number} options or total - * @api public - */ - -function ProgressBar(fmt, options) { - this.rl = require('readline').createInterface({ - input: process.stdin, - output: options.stream || process.stdout - }); - this.rl.setPrompt('', 0); - this.rl.clearLine = function() { - this.write(null, {ctrl: true, name: 'u'}); - }; - - if (typeof(options) == 'number') { - var total = options; - options = {}; - options.total = total; - } else { - options = options || {}; - if ('string' != typeof fmt) throw new Error('format required'); - if ('number' != typeof options.total) throw new Error('total required'); - } - - this.fmt = fmt; - this.curr = 0; - this.total = options.total; - this.width = options.width || this.total; - this.clear = options.clear - this.chars = { - complete: options.complete || '=' - , incomplete: options.incomplete || '-' - }; - this.callback = options.callback || function () {}; -} - -/** - * "tick" the progress bar with optional `len` and - * optional `tokens`. - * - * @param {Number|Object} len or tokens - * @param {Object} tokens - * @api public - */ - -ProgressBar.prototype.tick = function(len, tokens){ - if (len !== 0) - len = len || 1; - - // swap tokens - if ('object' == typeof len) tokens = len, len = 1; - - // start time for eta - if (0 == this.curr) this.start = new Date; - - this.curr += len - this.render(tokens); - - // progress complete - if (this.curr >= this.total) { - this.complete = true; - this.terminate(); - this.callback(this); - return; - } -}; - -/** - * Method to render the progress bar with optional `tokens` to - * place in the progress bar's `fmt` field. - * - * @param {Object} tokens - * @api public - */ - -ProgressBar.prototype.render = function(tokens){ - if(!process.stdout.isTTY) { - return; - } - - var ratio = this.curr / this.total; - ratio = Math.min(Math.max(ratio, 0), 1); - - var percent = ratio * 100 - , complete = Math.round(this.width * ratio) - , incomplete - , elapsed = new Date - this.start - , eta = (percent == 100) ? 0 : elapsed * (this.total / this.curr - 1); - - complete = Array(complete).join(this.chars.complete); - incomplete = Array(this.width - complete.length).join(this.chars.incomplete); - - var str = this.fmt - .replace(':bar', complete + incomplete) - .replace(':current', this.curr) - .replace(':total', this.total) - .replace(':elapsed', isNaN(elapsed) ? "0.0" : (elapsed / 1000).toFixed(1)) - .replace(':eta', (isNaN(eta) || !isFinite(eta)) ? "0.0" : (eta / 1000).toFixed(1)) - .replace(':percent', percent.toFixed(0) + '%'); - - if (tokens) { - for (var key in tokens) { - str = str.replace(':' + key, tokens[key]); - } - } - - this.rl.clearLine(); - this.rl.write(str); -}; - -/** - * "update" the progress bar to represent an exact percentage. - * The ratio (between 0 and 1) specified will be multiplied by `total` and - * floored, representing the closest available "tick." For example, if a - * progress bar has a length of 3 and `update(0.5)` is called, the progress - * will be set to 1. - * - * A ratio of 0.5 will attempt to set the progress to halfway. - * - * @param {Number} ratio The ratio (between 0 and 1 inclusive) to set the - * overall completion to. - * @api public - */ - -ProgressBar.prototype.update = function(ratio, tokens) { - var goal = Math.floor(ratio * this.total); - var delta = goal - this.curr; - - this.tick(delta, tokens); -}; - -/** - * Terminates a progress bar. - * - * @api public - */ - -ProgressBar.prototype.terminate = function() { - this.rl.resume(); - - if (this.clear) { - this.rl.clearLine(); - this.rl.close(); - } else { - this.rl.close(); - console.log(); - } -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/package.json deleted file mode 100644 index c4744b51..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/progress/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "progress", - "version": "1.1.3", - "description": "Flexible ascii progress bar", - "keywords": [ - "cli", - "progress" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "dependencies": {}, - "main": "index", - "engines": { - "node": ">=0.4.0" - }, - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/node-progress" - }, - "readme": "# node-progress\n\n Flexible ascii progress bar\n\n## Installation\n\n npm install progress\n\n## Usage\n\n First we create a `ProgressBar`, giving it a format string\n as well as the `total`, telling the progress bar when it will\n be considered complete. After that all we need to do is `tick()` appropriately.\n\n```javascript\nvar ProgressBar = require('progress');\n\nvar bar = new ProgressBar(':bar', { total: 10 });\nvar timer = setInterval(function(){\n bar.tick();\n if (bar.complete) {\n console.log('\\ncomplete\\n');\n clearInterval(timer);\n }\n}, 100);\n```\n\n## Options:\n\n - `total` total number of ticks to complete\n - `width` the displayed width of the progress bar defaulting to total\n - `stream` the output stream defaulting to stdout\n - `complete` completion character defaulting to \"=\"\n - `incomplete` incomplete character defaulting to \"-\"\n - `clear` option to clear the bar on completion defaulting to false\n - `callback` optional function to call when the progress bar completes\n\n## Tokens:\n\n - `:bar` the progress bar itself\n - `:current` current tick number\n - `:total` total ticks\n - `:elapsed` time elapsed in seconds\n - `:percent` completion percentage\n - `:eta` estimated completion time in seconds\n\n## Examples\n\n### Download\n\n In our download example each tick has a variable influence, so we pass the chunk length which adjusts the progress bar appropriately relative to the total length.\n\n```javascript\nvar ProgressBar = require('../')\n , https = require('https');\n\nvar req = https.request({\n host: 'download.github.com'\n , port: 443\n , path: '/visionmedia-node-jscoverage-0d4608a.zip'\n});\n\nreq.on('response', function(res){\n var len = parseInt(res.headers['content-length'], 10);\n\n console.log();\n var bar = new ProgressBar(' downloading [:bar] :percent :etas', {\n complete: '='\n , incomplete: ' '\n , width: 20\n , total: len\n });\n\n res.on('data', function(chunk){\n bar.tick(chunk.length);\n });\n\n res.on('end', function(){\n console.log('\\n');\n });\n});\n\nreq.end();\n```\n\n The code above will generate a progress bar that looks like this:\n\n```\ndownloading [===== ] 29% 3.7s\n```\n\nYou can see more examples in the `examples` folder.\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk `<tj@vision-media.ca>`\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/node-progress/issues" - }, - "homepage": "https://github.com/visionmedia/node-progress", - "_id": "progress@1.1.3", - "dist": { - "shasum": "42f89c5fc3b6f0408a0bdd68993b174f96aababf" - }, - "_from": "progress@~1.1.0", - "_resolved": "https://registry.npmjs.org/progress/-/progress-1.1.3.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/AUTHORS b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/AUTHORS deleted file mode 100644 index 247b7543..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/AUTHORS +++ /dev/null @@ -1,6 +0,0 @@ -# Authors sorted by whether or not they're me. -Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me) -Wayne Larsen <wayne@larsen.st> (http://github.com/wvl) -ritch <skawful@gmail.com> -Marcel Laverdet -Yosef Dinerstein <yosefd@microsoft.com> diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/LICENSE deleted file mode 100644 index 05a40109..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/README.md deleted file mode 100644 index cd123b65..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/README.md +++ /dev/null @@ -1,30 +0,0 @@ -`rm -rf` for node. - -Install with `npm install rimraf`, or just drop rimraf.js somewhere. - -## API - -`rimraf(f, callback)` - -The callback will be called with an error if there is one. Certain -errors are handled for you: - -* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of - `opts.maxBusyTries` times before giving up. -* `ENOENT` - If the file doesn't exist, rimraf will return - successfully, since your desired outcome is already the case. - -## rimraf.sync - -It can remove stuff synchronously, too. But that's not so good. Use -the async API. It's better. - -## CLI - -If installed with `npm install rimraf -g` it can be used as a global -command `rimraf <path>` which is useful for cross platform support. - -## mkdirp - -If you need to create a directory recursively, check out -[mkdirp](https://github.com/substack/node-mkdirp). diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/bin.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/bin.js deleted file mode 100755 index 29bfa8a6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/bin.js +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env node - -var rimraf = require('./') - -var help = false -var dashdash = false -var args = process.argv.slice(2).filter(function(arg) { - if (dashdash) - return !!arg - else if (arg === '--') - dashdash = true - else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) - help = true - else - return !!arg -}); - -if (help || args.length === 0) { - // If they didn't ask for help, then this is not a "success" - var log = help ? console.log : console.error - log('Usage: rimraf <path>') - log('') - log(' Deletes all files and folders at "path" recursively.') - log('') - log('Options:') - log('') - log(' -h, --help Display this usage info') - process.exit(help ? 0 : 1) -} else { - args.forEach(function(arg) { - rimraf.sync(arg) - }) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/package.json deleted file mode 100644 index 211cc9dc..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "rimraf", - "version": "2.2.6", - "main": "rimraf.js", - "description": "A deep deletion module for node (like `rm -rf`)", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": { - "type": "MIT", - "url": "https://github.com/isaacs/rimraf/raw/master/LICENSE" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/rimraf.git" - }, - "scripts": { - "test": "cd test && bash run.sh" - }, - "bin": { - "rimraf": "./bin.js" - }, - "contributors": [ - { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - { - "name": "Wayne Larsen", - "email": "wayne@larsen.st", - "url": "http://github.com/wvl" - }, - { - "name": "ritch", - "email": "skawful@gmail.com" - }, - { - "name": "Marcel Laverdet" - }, - { - "name": "Yosef Dinerstein", - "email": "yosefd@microsoft.com" - } - ], - "readme": "`rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one. Certain\nerrors are handled for you:\n\n* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of\n `opts.maxBusyTries` times before giving up.\n* `ENOENT` - If the file doesn't exist, rimraf will return\n successfully, since your desired outcome is already the case.\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too. But that's not so good. Use\nthe async API. It's better.\n\n## CLI\n\nIf installed with `npm install rimraf -g` it can be used as a global\ncommand `rimraf <path>` which is useful for cross platform support.\n\n## mkdirp\n\nIf you need to create a directory recursively, check out\n[mkdirp](https://github.com/substack/node-mkdirp).\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/rimraf/issues" - }, - "homepage": "https://github.com/isaacs/rimraf", - "_id": "rimraf@2.2.6", - "dist": { - "shasum": "7ada6a6d39b2301af3c8fe7b936c2e46e7c4463d" - }, - "_from": "rimraf@~2.2.6", - "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.6.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/rimraf.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/rimraf.js deleted file mode 100644 index ce62051f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/rimraf.js +++ /dev/null @@ -1,178 +0,0 @@ -module.exports = rimraf -rimraf.sync = rimrafSync - -var path = require("path") -var fs = require("fs") - -// for EMFILE handling -var timeout = 0 -exports.EMFILE_MAX = 1000 -exports.BUSYTRIES_MAX = 3 - -var isWindows = (process.platform === "win32") - -function rimraf (p, cb) { - if (!cb) throw new Error("No callback passed to rimraf()") - - var busyTries = 0 - rimraf_(p, function CB (er) { - if (er) { - if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY") && - busyTries < exports.BUSYTRIES_MAX) { - busyTries ++ - var time = busyTries * 100 - // try again, with the same exact callback as this one. - return setTimeout(function () { - rimraf_(p, CB) - }, time) - } - - // this one won't happen if graceful-fs is used. - if (er.code === "EMFILE" && timeout < exports.EMFILE_MAX) { - return setTimeout(function () { - rimraf_(p, CB) - }, timeout ++) - } - - // already gone - if (er.code === "ENOENT") er = null - } - - timeout = 0 - cb(er) - }) -} - -// Two possible strategies. -// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR -// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR -// -// Both result in an extra syscall when you guess wrong. However, there -// are likely far more normal files in the world than directories. This -// is based on the assumption that a the average number of files per -// directory is >= 1. -// -// If anyone ever complains about this, then I guess the strategy could -// be made configurable somehow. But until then, YAGNI. -function rimraf_ (p, cb) { - fs.unlink(p, function (er) { - if (er) { - if (er.code === "ENOENT") - return cb(null) - if (er.code === "EPERM") - return (isWindows) ? fixWinEPERM(p, er, cb) : rmdir(p, er, cb) - if (er.code === "EISDIR") - return rmdir(p, er, cb) - } - return cb(er) - }) -} - -function fixWinEPERM (p, er, cb) { - fs.chmod(p, 666, function (er2) { - if (er2) - cb(er2.code === "ENOENT" ? null : er) - else - fs.stat(p, function(er3, stats) { - if (er3) - cb(er3.code === "ENOENT" ? null : er) - else if (stats.isDirectory()) - rmdir(p, er, cb) - else - fs.unlink(p, cb) - }) - }) -} - -function fixWinEPERMSync (p, er, cb) { - try { - fs.chmodSync(p, 666) - } catch (er2) { - if (er2.code !== "ENOENT") - throw er - } - - try { - var stats = fs.statSync(p) - } catch (er3) { - if (er3 !== "ENOENT") - throw er - } - - if (stats.isDirectory()) - rmdirSync(p, er) - else - fs.unlinkSync(p) -} - -function rmdir (p, originalEr, cb) { - // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) - // if we guessed wrong, and it's not a directory, then - // raise the original error. - fs.rmdir(p, function (er) { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) - rmkids(p, cb) - else if (er && er.code === "ENOTDIR") - cb(originalEr) - else - cb(er) - }) -} - -function rmkids(p, cb) { - fs.readdir(p, function (er, files) { - if (er) - return cb(er) - var n = files.length - if (n === 0) - return fs.rmdir(p, cb) - var errState - files.forEach(function (f) { - rimraf(path.join(p, f), function (er) { - if (errState) - return - if (er) - return cb(errState = er) - if (--n === 0) - fs.rmdir(p, cb) - }) - }) - }) -} - -// this looks simpler, and is strictly *faster*, but will -// tie up the JavaScript thread and fail on excessively -// deep directory trees. -function rimrafSync (p) { - try { - fs.unlinkSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - if (er.code === "EPERM") - return isWindows ? fixWinEPERMSync(p, er) : rmdirSync(p, er) - if (er.code !== "EISDIR") - throw er - rmdirSync(p, er) - } -} - -function rmdirSync (p, originalEr) { - try { - fs.rmdirSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - if (er.code === "ENOTDIR") - throw originalEr - if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") - rmkidsSync(p) - } -} - -function rmkidsSync (p) { - fs.readdirSync(p).forEach(function (f) { - rimrafSync(path.join(p, f)) - }) - fs.rmdirSync(p) -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/test/run.sh b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/test/run.sh deleted file mode 100644 index 598f0163..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/test/run.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -set -e -for i in test-*.js; do - echo -n $i ... - bash setup.sh - node $i - ! [ -d target ] - echo "pass" -done -rm -rf target diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/test/setup.sh b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/test/setup.sh deleted file mode 100644 index 2602e631..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/test/setup.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -set -e - -files=10 -folders=2 -depth=4 -target="$PWD/target" - -rm -rf target - -fill () { - local depth=$1 - local files=$2 - local folders=$3 - local target=$4 - - if ! [ -d $target ]; then - mkdir -p $target - fi - - local f - - f=$files - while [ $f -gt 0 ]; do - touch "$target/f-$depth-$f" - let f-- - done - - let depth-- - - if [ $depth -le 0 ]; then - return 0 - fi - - f=$folders - while [ $f -gt 0 ]; do - mkdir "$target/folder-$depth-$f" - fill $depth $files $folders "$target/d-$depth-$f" - let f-- - done -} - -fill $depth $files $folders $target - -# sanity assert -[ -d $target ] diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/test/test-async.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/test/test-async.js deleted file mode 100644 index 9c2e0b7b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/test/test-async.js +++ /dev/null @@ -1,5 +0,0 @@ -var rimraf = require("../rimraf") - , path = require("path") -rimraf(path.join(__dirname, "target"), function (er) { - if (er) throw er -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/test/test-sync.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/test/test-sync.js deleted file mode 100644 index eb71f104..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/rimraf/test/test-sync.js +++ /dev/null @@ -1,3 +0,0 @@ -var rimraf = require("../rimraf") - , path = require("path") -rimraf.sync(path.join(__dirname, "target")) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/LICENSE b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/LICENSE deleted file mode 100644 index 05a40109..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -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/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/README.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/README.md deleted file mode 100644 index ff1eb531..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The "which" util from npm's guts. - -Finds the first instance of a specified executable in the PATH -environment variable. Does not cache the results, so `hash -r` is not -needed when the PATH changes. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/bin/which b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/bin/which deleted file mode 100755 index 8432ce2f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/bin/which +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env node -var which = require("../") -if (process.argv.length < 3) { - console.error("Usage: which <thing>") - process.exit(1) -} - -which(process.argv[2], function (er, thing) { - if (er) { - console.error(er.message) - process.exit(er.errno || 127) - } - console.log(thing) -}) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/package.json deleted file mode 100644 index f1938b07..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "name": "which", - "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", - "version": "1.0.5", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-which.git" - }, - "main": "which.js", - "bin": { - "which": "./bin/which" - }, - "engines": { - "node": "*" - }, - "dependencies": {}, - "devDependencies": {}, - "readme": "The \"which\" util from npm's guts.\n\nFinds the first instance of a specified executable in the PATH\nenvironment variable. Does not cache the results, so `hash -r` is not\nneeded when the PATH changes.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/node-which/issues" - }, - "homepage": "https://github.com/isaacs/node-which", - "_id": "which@1.0.5", - "dist": { - "shasum": "195619a6ad7e8fefd0aa76445a6d4c8d370a322c" - }, - "_from": "which@~1.0.5", - "_resolved": "https://registry.npmjs.org/which/-/which-1.0.5.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/which.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/which.js deleted file mode 100644 index db7e8f74..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/which/which.js +++ /dev/null @@ -1,104 +0,0 @@ -module.exports = which -which.sync = whichSync - -var path = require("path") - , fs - , COLON = process.platform === "win32" ? ";" : ":" - , isExe - -try { - fs = require("graceful-fs") -} catch (ex) { - fs = require("fs") -} - -if (process.platform == "win32") { - // On windows, there is no good way to check that a file is executable - isExe = function isExe () { return true } -} else { - isExe = function isExe (mod, uid, gid) { - //console.error(mod, uid, gid); - //console.error("isExe?", (mod & 0111).toString(8)) - var ret = (mod & 0001) - || (mod & 0010) && process.getgid && gid === process.getgid() - || (mod & 0100) && process.getuid && uid === process.getuid() - //console.error("isExe?", ret) - return ret - } -} - - - -function which (cmd, cb) { - if (isAbsolute(cmd)) return cb(null, cmd) - var pathEnv = (process.env.PATH || "").split(COLON) - , pathExt = [""] - if (process.platform === "win32") { - pathEnv.push(process.cwd()) - pathExt = (process.env.PATHEXT || ".EXE").split(COLON) - if (cmd.indexOf(".") !== -1) pathExt.unshift("") - } - //console.error("pathEnv", pathEnv) - ;(function F (i, l) { - if (i === l) return cb(new Error("not found: "+cmd)) - var p = path.resolve(pathEnv[i], cmd) - ;(function E (ii, ll) { - if (ii === ll) return F(i + 1, l) - var ext = pathExt[ii] - //console.error(p + ext) - fs.stat(p + ext, function (er, stat) { - if (!er && - stat && - stat.isFile() && - isExe(stat.mode, stat.uid, stat.gid)) { - //console.error("yes, exe!", p + ext) - return cb(null, p + ext) - } - return E(ii + 1, ll) - }) - })(0, pathExt.length) - })(0, pathEnv.length) -} - -function whichSync (cmd) { - if (isAbsolute(cmd)) return cmd - var pathEnv = (process.env.PATH || "").split(COLON) - , pathExt = [""] - if (process.platform === "win32") { - pathEnv.push(process.cwd()) - pathExt = (process.env.PATHEXT || ".EXE").split(COLON) - if (cmd.indexOf(".") !== -1) pathExt.unshift("") - } - for (var i = 0, l = pathEnv.length; i < l; i ++) { - var p = path.join(pathEnv[i], cmd) - for (var j = 0, ll = pathExt.length; j < ll; j ++) { - var cur = p + pathExt[j] - var stat - try { stat = fs.statSync(cur) } catch (ex) {} - if (stat && - stat.isFile() && - isExe(stat.mode, stat.uid, stat.gid)) return cur - } - } - throw new Error("not found: "+cmd) -} - -var isAbsolute = process.platform === "win32" ? absWin : absUnix - -function absWin (p) { - if (absUnix(p)) return true - // pull off the device/UNC bit from a windows path. - // from node's lib/path.js - var splitDeviceRe = - /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?([\\\/])?/ - , result = splitDeviceRe.exec(p) - , device = result[1] || '' - , isUnc = device && device.charAt(1) !== ':' - , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute - - return isAbsolute -} - -function absUnix (p) { - return p.charAt(0) === "/" || p === "" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/package.json deleted file mode 100644 index 66d4488e..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "bin-wrapper", - "version": "0.1.9", - "description": "Binary wrapper for Node.js that makes your programs seamlessly available as local dependencies", - "keywords": [ - "bin", - "build", - "make", - "wrapper" - ], - "homepage": "https://github.com/kevva/bin-wrapper", - "bugs": { - "url": "https://github.com/kevva/bin-wrapper/issues" - }, - "author": { - "name": "Kevin Martensson", - "email": "kevinmartensson@gmail.com", - "url": "http://kevinmartensson.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/kevva/bin-wrapper.git" - }, - "scripts": { - "test": "mocha --reporter list --timeout 0" - }, - "main": "bin-wrapper.js", - "files": [ - "bin-wrapper.js" - ], - "dependencies": { - "download": "~0.1.2", - "isbin": "0.0.2", - "mout": "~0.6.0", - "progress": "~1.1.0", - "rimraf": "~2.2.6", - "which": "~1.0.5" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "readme": "# bin-wrapper [![Build Status](https://secure.travis-ci.org/kevva/bin-wrapper.png?branch=master)](http://travis-ci.org/kevva/bin-wrapper)\n\nBinary wrapper for Node.js that makes your programs seamlessly available as local dependencies\n\n## Getting started\n\nInstall with [npm](https://npmjs.org/package/bin-wrapper): `npm install bin-wrapper`\n\n## Examples\n\nAll `platform` and `arch` specific options takes precedence over the base \noptions. See [test.js](test.js) for a full fleshed example.\n\n```js\nvar Bin = require('bin-wrapper');\n\nvar opts = {\n name: 'Gifsicle',\n bin: 'gifsicle',\n path: 'vendor',\n url: 'http://url/to/gifsicle',\n src: 'http://www.lcdf.org/gifsicle/gifsicle-1.71.tar.gz',\n buildScript: './configure --bindir=\"vendor\" && make install',\n platform: {\n win32: {\n bin: 'gifsicle.exe',\n url: [\n 'http://url/to/gifsicle.exe'\n 'http://url/to/gifsicle.dll'\n ]\n }\n }\n}\nvar bin = new Bin(opts);\n\nbin.check('--version', function (works) {\n if (!works) {\n console.log('Pre-build test failed, compiling from source');\n return bin.build();\n }\n\n console.log('Binary passed the test');\n});\n```\n\nGet the path to your binary with `bin.path`.\n\n```js\nconsole.log(bin.path);\n// => path/to/vendor/gifsicle\n```\n\n## API\n\n### .check(cmd, cb)\n\nCheck if a binary is present and working. If it isn't, download and test it by \nrunning the binary with `cmd` and see if it exits correctly.\n\n### .build(cb)\n\nDownload the source archive defined in the `src` property and build it using the \nbuild script defined in the `buildScript` property.\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com)\n", - "readmeFilename": "README.md", - "_id": "bin-wrapper@0.1.9", - "dist": { - "shasum": "237ee496fb6049caedaba51ad9e62fc199a86060" - }, - "_from": "bin-wrapper@~0.1.3", - "_resolved": "https://registry.npmjs.org/bin-wrapper/-/bin-wrapper-0.1.9.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/chalk.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/chalk.js deleted file mode 100644 index 17c6dbab..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/chalk.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict'; -var ansi = require('ansi-styles'); -var defineProps = Object.defineProperties; - -ansi.grey = ansi.gray; - -var styles = (function () { - var ret = {}; - - Object.keys(ansi).forEach(function (key) { - ret[key] = { - get: function () { - this._styles.push(key); - return this; - } - }; - }); - - return ret; -})(); - -var chalk = module.exports = defineProps({}, init()); - -function init() { - var ret = {}; - - Object.keys(styles).forEach(function (name) { - ret[name] = { - get: function () { - var obj = defineProps(function self(str) { - if (!chalk.enabled) { - return str; - } - - return self._styles.reduce(function (str, name) { - var code = ansi[name]; - return code[0] + (str || '') + code[1]; - }, str); - }, styles); - - obj._styles = []; - - return obj[name]; - } - } - }); - - return ret; -} - -chalk.styles = ansi; - -chalk.stripColor = function (str) { - return str.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, ''); -}; - -chalk.supportsColor = require('has-color'); - -// detect mode if not set manually -if (chalk.enabled === undefined) { - chalk.enabled = chalk.supportsColor; -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js deleted file mode 100644 index 56a5d19b..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; -module.exports = { - reset: ['\x1b[0m', '\x1b[0m'], - - bold: ['\x1b[1m', '\x1b[22m'], - italic: ['\x1b[3m', '\x1b[23m'], - underline: ['\x1b[4m', '\x1b[24m'], - inverse: ['\x1b[7m', '\x1b[27m'], - strikethrough: ['\x1b[9m', '\x1b[29m'], - - black: ['\x1b[30m', '\x1b[39m'], - red: ['\x1b[31m', '\x1b[39m'], - green: ['\x1b[32m', '\x1b[39m'], - yellow: ['\x1b[33m', '\x1b[39m'], - blue: ['\x1b[34m', '\x1b[39m'], - magenta: ['\x1b[35m', '\x1b[39m'], - cyan: ['\x1b[36m', '\x1b[39m'], - white: ['\x1b[37m', '\x1b[39m'], - gray: ['\x1B[90m', '\x1b[39m'], - - bgBlack: ['\x1b[40m', '\x1b[49m'], - bgRed: ['\x1b[41m', '\x1b[49m'], - bgGreen: ['\x1b[42m', '\x1b[49m'], - bgYellow: ['\x1b[43m', '\x1b[49m'], - bgBlue: ['\x1b[44m', '\x1b[49m'], - bgMagenta: ['\x1b[45m', '\x1b[49m'], - bgCyan: ['\x1b[46m', '\x1b[49m'], - bgWhite: ['\x1b[47m', '\x1b[49m'] -}; diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/ansi-styles/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/ansi-styles/package.json deleted file mode 100644 index 8acdb5e6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "ansi-styles", - "version": "0.2.0", - "description": "ANSI escape codes for colorizing strings in the terminal", - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "homepage": "https://github.com/sindresorhus/ansi-styles", - "bugs": { - "url": "https://github.com/sindresorhus/ansi-styles/issues" - }, - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "ansi-styles.js" - ], - "main": "ansi-styles", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/ansi-styles.git" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "readme": "# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles)\n\n> ANSI escape codes for colorizing strings in the terminal.\n\nYou probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings.\n\n![screenshot](screenshot.png)\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles`\n\n\n## Example\n\n```js\nvar ansi = require('ansi-styles');\n\nconsole.log(ansi.green[0] + 'Hello world!' + ansi.green[1]);\n```\n\n## API\n\nEach style is an array of a start and end escape code.\n\n\n## Styles\n\n### General\n\n- reset\n- bold\n- italic\n- underline\n- inverse\n- strikethrough\n\n### Text colors\n\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n\n### Background colors\n\n- bgBlack\n- bgRed\n- bgGreen\n- bgYellow\n- bgBlue\n- bgMagenta\n- bgCyan\n- bgWhite\n\n\n## License\n\nMIT License • © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "_id": "ansi-styles@0.2.0", - "dist": { - "shasum": "359ab4b15dcd64ba6d74734b72c36360a9af2c19" - }, - "_from": "ansi-styles@~0.2.0", - "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-0.2.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/ansi-styles/readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/ansi-styles/readme.md deleted file mode 100644 index 646837c6..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,65 +0,0 @@ -# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles) - -> ANSI escape codes for colorizing strings in the terminal. - -You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings. - -![screenshot](screenshot.png) - - -## Install - -Install with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles` - - -## Example - -```js -var ansi = require('ansi-styles'); - -console.log(ansi.green[0] + 'Hello world!' + ansi.green[1]); -``` - -## API - -Each style is an array of a start and end escape code. - - -## Styles - -### General - -- reset -- bold -- italic -- underline -- inverse -- strikethrough - -### Text colors - -- black -- red -- green -- yellow -- blue -- magenta -- cyan -- white -- gray - -### Background colors - -- bgBlack -- bgRed -- bgGreen -- bgYellow -- bgBlue -- bgMagenta -- bgCyan -- bgWhite - - -## License - -MIT License • © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/has-color/has-color.js b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/has-color/has-color.js deleted file mode 100644 index 27316b1f..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/has-color/has-color.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; -module.exports = (function () { - if (process.argv.indexOf('--no-color') !== -1) { - return false; - } - - if (process.argv.indexOf('--color') !== -1) { - return true; - } - - if (!process.stdout.isTTY) { - return false; - } - - if (process.platform === 'win32') { - return true; - } - - if ('COLORTERM' in process.env) { - return true; - } - - return /^screen|^xterm|color|ansi|cygwin|linux/i.test(process.env.TERM); -})(); diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/has-color/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/has-color/package.json deleted file mode 100644 index d60b2d0a..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/has-color/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "has-color", - "version": "0.1.4", - "description": "Detect whether a terminal supports color", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "capability", - "detect" - ], - "homepage": "https://github.com/sindresorhus/has-color", - "bugs": { - "url": "https://github.com/sindresorhus/has-color/issues" - }, - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "has-color.js" - ], - "main": "has-color", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/has-color.git" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "readme": "# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color)\n\n> Detect whether a terminal supports color.\n\nUsed in the terminal color module [chalk](https://github.com/sindresorhus/chalk).\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/has-color): `npm install --save has-color`\n\n\n## Example\n\n```js\nvar hasColor = require('has-color');\n\nif (hasColor) {\n\tconsole.log('Terminal supports color.');\n}\n```\n\nIt obeys the CLI flags `--color` and `--no-color`.\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "_id": "has-color@0.1.4", - "dist": { - "shasum": "d1dadeea5b9e8b446bf08603532333710c95a290" - }, - "_from": "has-color@~0.1.0", - "_resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.4.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/has-color/readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/has-color/readme.md deleted file mode 100644 index 0918c851..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/node_modules/has-color/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color) - -> Detect whether a terminal supports color. - -Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). - - -## Install - -Install with [npm](https://npmjs.org/package/has-color): `npm install --save has-color` - - -## Example - -```js -var hasColor = require('has-color'); - -if (hasColor) { - console.log('Terminal supports color.'); -} -``` - -It obeys the CLI flags `--color` and `--no-color`. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/package.json deleted file mode 100644 index 46a63f05..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "chalk", - "version": "0.2.1", - "description": "Terminal string styling done right", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "ansi", - "styles", - "tty", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "homepage": "https://github.com/sindresorhus/chalk", - "bugs": { - "url": "https://github.com/sindresorhus/chalk/issues" - }, - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "chalk.js" - ], - "main": "chalk", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/chalk.git" - }, - "scripts": { - "test": "mocha" - }, - "dependencies": { - "has-color": "~0.1.0", - "ansi-styles": "~0.2.0" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "readme": "# chalk [![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk)\n\n> Terminal string styling done right.\n\n[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of problems. Although there are other ones, they either do too much or not enough.\n\n**Chalk is a clean and focused alternative.**\n\n![screenshot](screenshot.png)\n\n\n## Why\n\n- **Doesn't extend String.prototype**\n- Expressive API\n- Clean and focused\n- Auto-detects color support\n- Actively maintained\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/chalk): `npm install --save chalk`\n\n\n## Example\n\nChalk comes with an easy to use composable API where you just chain the styles you want.\n\n```js\nvar chalk = require('chalk');\n\n// style a string\nconsole.log(chalk.blue('Hello world!'));\n\n// combine styled and normal strings\nconsole.log(chalk.blue('Hello') + 'World' + chalk.red('!'));\n\n// compose multiple styles using the chainable API\nconsole.log(chalk.blue.bgRed.bold('Hello world!'));\n\n// nest styles\nchalk.red('Hello' + chalk.underline.bgBlue('world') + '!');\n```\n\nYou can easily define your own themes.\n\n```js\nvar chalk = require('chalk');\nvar error = chalk.bold.red;\nconsole.log(error('Error!'));\n```\n\n\n## API\n\n### chalk.\\<style>\\[.\\<style>...](string)\n\nChain [styles](#styles) and call the last one as a method with a string argument.\n\n\n### chalk.enabled\n\nColor support is automatically detected, but you can override it.\n\n### chalk.supportsColor\n\nDetect whether the terminal [supports color](https://github.com/sindresorhus/has-color).\n\nCan be overridden by the user with the flags `--color` and `--no-color`.\n\nUsed internally and handled for you, but exposed for convenience.\n\n### chalk.styles\n\nExposes the styles as [ANSI escape codes](https://github.com/sindresorhus/ansi-styles).\n\n```js\nvar chalk = require('chalk');\n\nconsole.log(chalk.styles.red);\n//=> ['\\x1b[31m', '\\x1b[39m']\n\nconsole.log(chalk.styles.red[0] + 'Hello' + chalk.styles.red[1]);\n// first item is the style escape code and second is the reset escape code\n```\n\n### chalk.stripColor(string)\n\nStrip color from a string.\n\n\n## Styles\n\n### General\n\n- reset\n- bold\n- italic\n- underline\n- inverse\n- strikethrough\n\n### Text colors\n\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n\n### Background colors\n\n- bgBlack\n- bgRed\n- bgGreen\n- bgYellow\n- bgBlue\n- bgMagenta\n- bgCyan\n- bgWhite\n\n\n## License\n\nMIT License • © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "_id": "chalk@0.2.1", - "dist": { - "shasum": "7613e1575145b21386483f7f485aa5ffa8cbd10c" - }, - "_from": "chalk@~0.2.0", - "_resolved": "https://registry.npmjs.org/chalk/-/chalk-0.2.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/readme.md deleted file mode 100644 index d369d2ef..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/chalk/readme.md +++ /dev/null @@ -1,130 +0,0 @@ -# chalk [![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk) - -> Terminal string styling done right. - -[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of problems. Although there are other ones, they either do too much or not enough. - -**Chalk is a clean and focused alternative.** - -![screenshot](screenshot.png) - - -## Why - -- **Doesn't extend String.prototype** -- Expressive API -- Clean and focused -- Auto-detects color support -- Actively maintained - - -## Install - -Install with [npm](https://npmjs.org/package/chalk): `npm install --save chalk` - - -## Example - -Chalk comes with an easy to use composable API where you just chain the styles you want. - -```js -var chalk = require('chalk'); - -// style a string -console.log(chalk.blue('Hello world!')); - -// combine styled and normal strings -console.log(chalk.blue('Hello') + 'World' + chalk.red('!')); - -// compose multiple styles using the chainable API -console.log(chalk.blue.bgRed.bold('Hello world!')); - -// nest styles -chalk.red('Hello' + chalk.underline.bgBlue('world') + '!'); -``` - -You can easily define your own themes. - -```js -var chalk = require('chalk'); -var error = chalk.bold.red; -console.log(error('Error!')); -``` - - -## API - -### chalk.\<style>\[.\<style>...](string) - -Chain [styles](#styles) and call the last one as a method with a string argument. - - -### chalk.enabled - -Color support is automatically detected, but you can override it. - -### chalk.supportsColor - -Detect whether the terminal [supports color](https://github.com/sindresorhus/has-color). - -Can be overridden by the user with the flags `--color` and `--no-color`. - -Used internally and handled for you, but exposed for convenience. - -### chalk.styles - -Exposes the styles as [ANSI escape codes](https://github.com/sindresorhus/ansi-styles). - -```js -var chalk = require('chalk'); - -console.log(chalk.styles.red); -//=> ['\x1b[31m', '\x1b[39m'] - -console.log(chalk.styles.red[0] + 'Hello' + chalk.styles.red[1]); -// first item is the style escape code and second is the reset escape code -``` - -### chalk.stripColor(string) - -Strip color from a string. - - -## Styles - -### General - -- reset -- bold -- italic -- underline -- inverse -- strikethrough - -### Text colors - -- black -- red -- green -- yellow -- blue -- magenta -- cyan -- white -- gray - -### Background colors - -- bgBlack -- bgRed -- bgGreen -- bgYellow -- bgBlue -- bgMagenta -- bgCyan -- bgWhite - - -## License - -MIT License • © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/package.json b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/package.json deleted file mode 100644 index f830eef2..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "optipng-bin", - "version": "0.3.1", - "description": "OptiPNG wrapper that makes it seamlessly available as a local dependency on OS X, Linux, FreeBSD and Windows", - "keywords": [ - "png", - "compress", - "minify", - "optimize", - "img", - "image" - ], - "homepage": "https://github.com/yeoman/node-optipng-bin", - "bugs": { - "url": "https://github.com/yeoman/node-optipng-bin/issues" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "maintainers": [ - { - "name": "Duncan Wong" - }, - { - "name": "Kevin Martensson", - "email": "kevinmartensson@gmail.com", - "url": "http://kevinmartensson.com" - } - ], - "main": "lib/optipng", - "bin": { - "optipng": "bin/optipng.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/yeoman/node-optipng-bin.git" - }, - "scripts": { - "test": "mocha", - "postinstall": "node lib/check.js" - }, - "engines": { - "node": ">=0.8.0" - }, - "licenses": [ - { - "type": "BSD" - } - ], - "dependencies": { - "bin-wrapper": "~0.1.3", - "chalk": "~0.2.0" - }, - "devDependencies": { - "mocha": "~1.13.0" - }, - "files": [ - "bin", - "lib" - ], - "readme": "# node-optipng-bin [![Build Status](https://secure.travis-ci.org/yeoman/node-optipng-bin.png?branch=master)](http://travis-ci.org/yeoman/node-optipng-bin)\n\n[OptiPNG](http://optipng.sourceforge.net) 0.7.4 Node.js wrapper that makes it seamlessly available as a local dependency on OS X, Linux, FreeBSD, Solaris and Windows.\n\n> OptiPNG is a PNG optimizer that recompresses image files to a smaller size, without losing any information.\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/optipng-bin): `npm install --save optipng-bin`\n\n\n## Example usage\n\n```js\nvar execFile = require('child_process').execFile;\nvar optipngPath = require('optipng-bin').path;\n\nexecFile(optipngPath, ['-v'], function(err, stdout, stderr) {\n console.log('OptiPNG version:', stdout.match(/\\d\\.\\d\\.\\d/)[0]);\n});\n```\n\nCan also be run directly from `./node_modules/.bin/optipng`.\n\n\n## License\n\nEverything excluding the binaries licensed under the [BSD license](http://opensource.org/licenses/bsd-license.php) and copyright Google.\n\nOptiPNG licensed under the [zlib license](http://optipng.sourceforge.net/license.txt) and copyright Cosmin Truta and the Contributing Authors.\n", - "readmeFilename": "readme.md", - "_id": "optipng-bin@0.3.1", - "dist": { - "shasum": "d3eee5ee9dfcc8d7ae2086fd8f9dcec084c6e79b" - }, - "_from": "optipng-bin@~0.3.0", - "_resolved": "https://registry.npmjs.org/optipng-bin/-/optipng-bin-0.3.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/readme.md b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/readme.md deleted file mode 100644 index db453221..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/readme.md +++ /dev/null @@ -1,30 +0,0 @@ -# node-optipng-bin [![Build Status](https://secure.travis-ci.org/yeoman/node-optipng-bin.png?branch=master)](http://travis-ci.org/yeoman/node-optipng-bin) - -[OptiPNG](http://optipng.sourceforge.net) 0.7.4 Node.js wrapper that makes it seamlessly available as a local dependency on OS X, Linux, FreeBSD, Solaris and Windows. - -> OptiPNG is a PNG optimizer that recompresses image files to a smaller size, without losing any information. - -## Install - -Install with [npm](https://npmjs.org/package/optipng-bin): `npm install --save optipng-bin` - - -## Example usage - -```js -var execFile = require('child_process').execFile; -var optipngPath = require('optipng-bin').path; - -execFile(optipngPath, ['-v'], function(err, stdout, stderr) { - console.log('OptiPNG version:', stdout.match(/\d\.\d\.\d/)[0]); -}); -``` - -Can also be run directly from `./node_modules/.bin/optipng`. - - -## License - -Everything excluding the binaries licensed under the [BSD license](http://opensource.org/licenses/bsd-license.php) and copyright Google. - -OptiPNG licensed under the [zlib license](http://optipng.sourceforge.net/license.txt) and copyright Cosmin Truta and the Contributing Authors. diff --git a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/vendor/optipng b/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/vendor/optipng deleted file mode 100755 index 069639b6..00000000 Binary files a/node_modules/gulp-imagemin/node_modules/image-min/node_modules/optipng-bin/vendor/optipng and /dev/null differ diff --git a/node_modules/gulp-imagemin/node_modules/image-min/package.json b/node_modules/gulp-imagemin/node_modules/image-min/package.json deleted file mode 100644 index 30188290..00000000 --- a/node_modules/gulp-imagemin/node_modules/image-min/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "image-min", - "version": "0.1.3", - "description": "Minify GIF, JPEG and PNG images", - "keywords": [ - "compress", - "image", - "img", - "jpeg", - "jpg", - "minify", - "png" - ], - "homepage": "https://github.com/kevva/image-min", - "bugs": { - "url": "https://github.com/kevva/image-min/issues" - }, - "author": { - "name": "Kevin Martensson", - "email": "kevinmartensson@gmail.com", - "url": "http://kevinmartensson.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/kevva/image-min.git" - }, - "scripts": { - "test": "mocha --reporter list" - }, - "main": "imagemin.js", - "files": [ - "imagemin.js" - ], - "dependencies": { - "cache-file": "~0.1.1", - "filesize": "~2.0.0", - "mkdirp": "~0.3.5", - "mout": "~0.7.1", - "gifsicle": "~0.1.0", - "jpegtran-bin": "~0.2.0", - "optipng-bin": "~0.3.0" - }, - "devDependencies": { - "each-async": "~0.1.1", - "mocha": "~1.12.0", - "rimraf": "~2.2.6" - }, - "optionalDependencies": { - "gifsicle": "~0.1.0", - "jpegtran-bin": "~0.2.0", - "optipng-bin": "~0.3.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "readme": "# image-min [![Build Status](https://secure.travis-ci.org/kevva/image-min.png?branch=master)](http://travis-ci.org/kevva/image-min)\n\nMinify GIF, JPEG and PNG images seamlessly with Node.js.\n\n## Getting started\n\nInstall with [npm](https://npmjs.org/package/image-min): `npm install image-min`\n\n## Examples\n\n`data` returns information about how much optimization was done.\n\n```js\nvar imagemin = require('image-min');\n\nimagemin(img.gif, img-minified.gif, function (err, data) {\n console.log('Saved ' + data.diffSize);\n});\n\nimagemin(img.jpg, img-minified.jpg, { progressive: true }, function (err, data) {\n console.log('Saved ' + data.diffSize);\n});\n\nimagemin(img.png, img-minified.png, { optimizationLevel: 4 }, function (err, data) {\n console.log('Saved ' + data.diffSize);\n});\n```\n\n## API\n\n### imagemin(src, dest, opts, cb)\n\nOptimize a `GIF`, `JPEG`, or `PNG` image by providing a `src` and `dest`. Use the\noptions below (optionally) to configure how your images are optimized.\n\n## Options\n\n### cache\n\nType: `Boolean` \nDefault: `false`\n\nWhether to cache optimized images.\n\n### interlaced (GIF only)\n\nType: `Boolean` \nDefault: `false`\n\nInterlace gif for progressive rendering.\n\n### optimizationLevel (PNG only)\n\nType: `Number` \nDefault: `2`\n\nSelect a optimization level between 0 and 7.\n\n### progressive (JPEG only)\n\nType: `Boolean` \nDefault: `false`\n\nLossless conversion to progressive.\n\n## Used by\n\n* [gulp-imagemin](https://github.com/sindresorhus/gulp-imagemin)\n* [grunt-contrib-imagemin](https://github.com/gruntjs/grunt-contrib-imagemin)\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com)\n", - "readmeFilename": "README.md", - "_id": "image-min@0.1.3", - "dist": { - "shasum": "78f02abbbb4a945f53b4f08ab2ec8107f2aaddb8" - }, - "_from": "image-min@~0.1.0", - "_resolved": "https://registry.npmjs.org/image-min/-/image-min-0.1.3.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/map-stream/.npmignore b/node_modules/gulp-imagemin/node_modules/map-stream/.npmignore deleted file mode 100644 index 13abef4f..00000000 --- a/node_modules/gulp-imagemin/node_modules/map-stream/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -node_modules/* -npm_debug.log diff --git a/node_modules/gulp-imagemin/node_modules/map-stream/.travis.yml b/node_modules/gulp-imagemin/node_modules/map-stream/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/gulp-imagemin/node_modules/map-stream/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/gulp-imagemin/node_modules/map-stream/LICENCE b/node_modules/gulp-imagemin/node_modules/map-stream/LICENCE deleted file mode 100644 index 171dd970..00000000 --- a/node_modules/gulp-imagemin/node_modules/map-stream/LICENCE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2011 Dominic Tarr - -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. \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/map-stream/examples/pretty.js b/node_modules/gulp-imagemin/node_modules/map-stream/examples/pretty.js deleted file mode 100644 index ab073987..00000000 --- a/node_modules/gulp-imagemin/node_modules/map-stream/examples/pretty.js +++ /dev/null @@ -1,26 +0,0 @@ - -var inspect = require('util').inspect - -if(!module.parent) { - var map = require('..') //load map-stream - var es = require('event-stream') //load event-stream - es.pipe( //pipe joins streams together - process.openStdin(), //open stdin - es.split(), //split stream to break on newlines - map(function (data, callback) { //turn this async function into a stream - var j - try { - j = JSON.parse(data) //try to parse input into json - } catch (err) { - return callback(null, data) //if it fails just pass it anyway - } - callback(null, inspect(j)) //render it nicely - }), - process.stdout // pipe it to stdout ! - ) - } - -// run this -// -// curl -sS registry.npmjs.org/event-stream | node pretty.js -// diff --git a/node_modules/gulp-imagemin/node_modules/map-stream/index.js b/node_modules/gulp-imagemin/node_modules/map-stream/index.js deleted file mode 100644 index 09ae829d..00000000 --- a/node_modules/gulp-imagemin/node_modules/map-stream/index.js +++ /dev/null @@ -1,145 +0,0 @@ -//filter will reemit the data if cb(err,pass) pass is truthy - -// reduce is more tricky -// maybe we want to group the reductions or emit progress updates occasionally -// the most basic reduce just emits one 'data' event after it has recieved 'end' - - -var Stream = require('stream').Stream - - -//create an event stream and apply function to each .write -//emitting each response as data -//unless it's an empty callback - -module.exports = function (mapper, opts) { - - var stream = new Stream() - , self = this - , inputs = 0 - , outputs = 0 - , ended = false - , paused = false - , destroyed = false - , lastWritten = 0 - , inNext = false - - this.opts = opts || {}; - var errorEventName = this.opts.failures ? 'failure' : 'error'; - - // Items that are not ready to be written yet (because they would come out of - // order) get stuck in a queue for later. - var writeQueue = {} - - stream.writable = true - stream.readable = true - - function queueData (data, number) { - var nextToWrite = lastWritten + 1 - - if (number === nextToWrite) { - // If it's next, and its not undefined write it - if (data !== undefined) { - stream.emit.apply(stream, ['data', data]) - } - lastWritten ++ - nextToWrite ++ - } else { - // Otherwise queue it for later. - writeQueue[number] = data - } - - // If the next value is in the queue, write it - if (writeQueue.hasOwnProperty(nextToWrite)) { - var dataToWrite = writeQueue[nextToWrite] - delete writeQueue[nextToWrite] - return queueData(dataToWrite, nextToWrite) - } - - outputs ++ - if(inputs === outputs) { - if(paused) paused = false, stream.emit('drain') //written all the incoming events - if(ended) end() - } - } - - function next (err, data, number) { - if(destroyed) return - inNext = true - - if (!err || self.opts.failures) { - queueData(data, number) - } - - if (err) { - stream.emit.apply(stream, [ errorEventName, err ]); - } - - inNext = false; - } - - // Wrap the mapper function by calling its callback with the order number of - // the item in the stream. - function wrappedMapper (input, number, callback) { - return mapper.call(null, input, function(err, data){ - callback(err, data, number) - }) - } - - stream.write = function (data) { - if(ended) throw new Error('map stream is not writable') - inNext = false - inputs ++ - - try { - //catch sync errors and handle them like async errors - var written = wrappedMapper(data, inputs, next) - paused = (written === false) - return !paused - } catch (err) { - //if the callback has been called syncronously, and the error - //has occured in an listener, throw it again. - if(inNext) - throw err - next(err) - return !paused - } - } - - function end (data) { - //if end was called with args, write it, - ended = true //write will emit 'end' if ended is true - stream.writable = false - if(data !== undefined) { - return queueData(data, inputs) - } else if (inputs == outputs) { //wait for processing - stream.readable = false, stream.emit('end'), stream.destroy() - } - } - - stream.end = function (data) { - if(ended) return - end() - } - - stream.destroy = function () { - ended = destroyed = true - stream.writable = stream.readable = paused = false - process.nextTick(function () { - stream.emit('close') - }) - } - stream.pause = function () { - paused = true - } - - stream.resume = function () { - paused = false - } - - return stream -} - - - - diff --git a/node_modules/gulp-imagemin/node_modules/map-stream/package.json b/node_modules/gulp-imagemin/node_modules/map-stream/package.json deleted file mode 100644 index 567053c6..00000000 --- a/node_modules/gulp-imagemin/node_modules/map-stream/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "map-stream", - "version": "0.1.0", - "description": "construct pipes of streams of events", - "homepage": "http://github.com/dominictarr/map-stream", - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/map-stream.git" - }, - "dependencies": {}, - "devDependencies": { - "asynct": "*", - "it-is": "1", - "ubelt": "~2.9", - "stream-spec": "~0.2", - "event-stream": "~2.1", - "from": "0.0.2" - }, - "scripts": { - "test": "asynct test/" - }, - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "http://dominictarr.com" - }, - "readme": "# MapStream\n\nRefactored out of [event-stream](https://github.com/dominictarr/event-stream)\n\n##map (asyncFunction[, options])\n\nCreate a through stream from an asyncronous function. \n\n``` js\nvar map = require('map-stream')\n\nmap(function (data, callback) {\n //transform data\n // ...\n callback(null, data)\n})\n\n```\n\nEach map MUST call the callback. It may callback with data, with an error or with no arguments, \n\n * `callback()` drop this data. \n this makes the map work like `filter`, \n note:`callback(null,null)` is not the same, and will emit `null`\n\n * `callback(null, newData)` turn data into newData\n \n * `callback(error)` emit an error for this item.\n\n>Note: if a callback is not called, `map` will think that it is still being processed, \n>every call must be answered or the stream will not know when to end. \n>\n>Also, if the callback is called more than once, every call but the first will be ignored.\n\n##Options \n\n * `failures` - `boolean` continue mapping even if error occured. On error `map-stream` will emit `failure` event. (default: `false`)\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/dominictarr/map-stream/issues" - }, - "_id": "map-stream@0.1.0", - "dist": { - "shasum": "ecb1e26682b21961c0e6d024df0da7b6c331d921" - }, - "_from": "map-stream@~0.1.0", - "_resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/map-stream/readme.markdown b/node_modules/gulp-imagemin/node_modules/map-stream/readme.markdown deleted file mode 100644 index 18971588..00000000 --- a/node_modules/gulp-imagemin/node_modules/map-stream/readme.markdown +++ /dev/null @@ -1,37 +0,0 @@ -# MapStream - -Refactored out of [event-stream](https://github.com/dominictarr/event-stream) - -##map (asyncFunction[, options]) - -Create a through stream from an asyncronous function. - -``` js -var map = require('map-stream') - -map(function (data, callback) { - //transform data - // ... - callback(null, data) -}) - -``` - -Each map MUST call the callback. It may callback with data, with an error or with no arguments, - - * `callback()` drop this data. - this makes the map work like `filter`, - note:`callback(null,null)` is not the same, and will emit `null` - - * `callback(null, newData)` turn data into newData - - * `callback(error)` emit an error for this item. - ->Note: if a callback is not called, `map` will think that it is still being processed, ->every call must be answered or the stream will not know when to end. -> ->Also, if the callback is called more than once, every call but the first will be ignored. - -##Options - - * `failures` - `boolean` continue mapping even if error occured. On error `map-stream` will emit `failure` event. (default: `false`) diff --git a/node_modules/gulp-imagemin/node_modules/map-stream/test/simple-map.asynct.js b/node_modules/gulp-imagemin/node_modules/map-stream/test/simple-map.asynct.js deleted file mode 100644 index 2b9a2922..00000000 --- a/node_modules/gulp-imagemin/node_modules/map-stream/test/simple-map.asynct.js +++ /dev/null @@ -1,318 +0,0 @@ -'use strict'; - -var map = require('../') - , it = require('it-is') - , u = require('ubelt') - , spec = require('stream-spec') - , from = require('from') - , Stream = require('stream') - , es = require('event-stream') - -//REFACTOR THIS TEST TO USE es.readArray and es.writeArray - -function writeArray(array, stream) { - - array.forEach( function (j) { - stream.write(j) - }) - stream.end() - -} - -function readStream(stream, done) { - - var array = [] - stream.on('data', function (data) { - array.push(data) - }) - stream.on('error', done) - stream.on('end', function (data) { - done(null, array) - }) - -} - -//call sink on each write, -//and complete when finished. - -function pauseStream (prob, delay) { - var pauseIf = ( - 'number' == typeof prob - ? function () { - return Math.random() < prob - } - : 'function' == typeof prob - ? prob - : 0.1 - ) - var delayer = ( - !delay - ? process.nextTick - : 'number' == typeof delay - ? function (next) { setTimeout(next, delay) } - : delay - ) - - return es.through(function (data) { - if(!this.paused && pauseIf()) { - console.log('PAUSE STREAM PAUSING') - this.pause() - var self = this - delayer(function () { - console.log('PAUSE STREAM RESUMING') - self.resume() - }) - } - console.log("emit ('data', " + data + ')') - this.emit('data', data) - }) -} - -exports ['simple map applied to a stream'] = function (test) { - - var input = [1,2,3,7,5,3,1,9,0,2,4,6] - //create event stream from - - var doubler = map(function (data, cb) { - cb(null, data * 2) - }) - - spec(doubler).through().validateOnExit() - - //a map is only a middle man, so it is both readable and writable - - it(doubler).has({ - readable: true, - writable: true, - }) - - readStream(doubler, function (err, output) { - it(output).deepEqual(input.map(function (j) { - return j * 2 - })) -// process.nextTick(x.validate) - test.done() - }) - - writeArray(input, doubler) - -} - -exports ['stream comes back in the correct order'] = function (test) { - var input = [3, 2, 1] - - var delayer = map(function(data, cb){ - setTimeout(function () { - cb(null, data) - }, 100 * data) - }) - - readStream(delayer, function (err, output) { - it(output).deepEqual(input) - test.done() - }) - - writeArray(input, delayer) -} - -exports ['continues on error event with failures `true`'] = function (test) { - var input = [1, 2, 3] - - var delayer = map(function(data, cb){ - cb(new Error('Something gone wrong'), data) - }, { failures: true }) - - readStream(delayer, function (err, output) { - it(output).deepEqual(input) - test.done() - }) - - writeArray(input, delayer) -} - -exports['pipe two maps together'] = function (test) { - - var input = [1,2,3,7,5,3,1,9,0,2,4,6] - //create event stream from - function dd (data, cb) { - cb(null, data * 2) - } - var doubler1 = map(dd), doubler2 = map(dd) - - doubler1.pipe(doubler2) - - spec(doubler1).through().validateOnExit() - spec(doubler2).through().validateOnExit() - - readStream(doubler2, function (err, output) { - it(output).deepEqual(input.map(function (j) { - return j * 4 - })) - test.done() - }) - - writeArray(input, doubler1) - -} - -//next: -// -// test pause, resume and drian. -// - -// then make a pipe joiner: -// -// plumber (evStr1, evStr2, evStr3, evStr4, evStr5) -// -// will return a single stream that write goes to the first - -exports ['map will not call end until the callback'] = function (test) { - - var ticker = map(function (data, cb) { - process.nextTick(function () { - cb(null, data * 2) - }) - }) - - spec(ticker).through().validateOnExit() - - ticker.write('x') - ticker.end() - - ticker.on('end', function () { - test.done() - }) -} - -exports ['emit failures with opts.failures === `ture`'] = function (test) { - - var err = new Error('INTENSIONAL ERROR') - , mapper = - map(function () { - throw err - }, { failures: true }) - - mapper.on('failure', function (_err) { - it(_err).equal(err) - test.done() - }) - - mapper.write('hello') - -} - -exports ['emit error thrown'] = function (test) { - - var err = new Error('INTENSIONAL ERROR') - , mapper = - map(function () { - throw err - }) - - mapper.on('error', function (_err) { - it(_err).equal(err) - test.done() - }) - - mapper.write('hello') - -} - -exports ['emit error calledback'] = function (test) { - - var err = new Error('INTENSIONAL ERROR') - , mapper = - map(function (data, callback) { - callback(err) - }) - - mapper.on('error', function (_err) { - it(_err).equal(err) - test.done() - }) - - mapper.write('hello') - -} - -exports ['do not emit drain if not paused'] = function (test) { - - var maps = map(function (data, callback) { - u.delay(callback)(null, 1) - return true - }) - - spec(maps).through().pausable().validateOnExit() - - maps.on('drain', function () { - it(false).ok('should not emit drain unless the stream is paused') - }) - - it(maps.write('hello')).equal(true) - it(maps.write('hello')).equal(true) - it(maps.write('hello')).equal(true) - setTimeout(function () {maps.end()},10) - maps.on('end', test.done) -} - -exports ['emits drain if paused, when all '] = function (test) { - var active = 0 - var drained = false - var maps = map(function (data, callback) { - active ++ - u.delay(function () { - active -- - callback(null, 1) - })() - console.log('WRITE', false) - return false - }) - - spec(maps).through().validateOnExit() - - maps.on('drain', function () { - drained = true - it(active).equal(0, 'should emit drain when all maps are done') - }) - - it(maps.write('hello')).equal(false) - it(maps.write('hello')).equal(false) - it(maps.write('hello')).equal(false) - - process.nextTick(function () {maps.end()},10) - - maps.on('end', function () { - console.log('end') - it(drained).ok('shoud have emitted drain before end') - test.done() - }) - -} - -exports ['map applied to a stream with filtering'] = function (test) { - - var input = [1,2,3,7,5,3,1,9,0,2,4,6] - - var doubler = map(function (data, callback) { - if (data % 2) - callback(null, data * 2) - else - callback() - }) - - readStream(doubler, function (err, output) { - it(output).deepEqual(input.filter(function (j) { - return j % 2 - }).map(function (j) { - return j * 2 - })) - test.done() - }) - - spec(doubler).through().validateOnExit() - - writeArray(input, doubler) - -} - - diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/index.js b/node_modules/gulp-imagemin/node_modules/temp-write/index.js deleted file mode 100644 index ad4625c7..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/index.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; -var path = require('path'); -var tmpdir = require('os').tmpdir(); -var fs = require('graceful-fs'); -var uuid = require('uuid'); - -function tempfile(filename) { - return path.join(tmpdir, uuid.v4(), (filename || '')); -} - -module.exports = function (str, filename, cb) { - if (typeof filename === 'function') { - cb = filename; - filename = null; - } - - - var filepath = tempfile(filename); - - fs.mkdir(path.dirname(filepath), function (err) { - if (err && err.code !== 'EEXIST') { - return cb(err); - } - - fs.writeFile(filepath, str, function (err) { - cb(err, filepath); - }); - }); -}; - -module.exports.sync = function (str, filename) { - var filepath = tempfile(filename); - - try { - fs.mkdirSync(path.dirname(filepath)); - } catch (err) { - if (err.code !== 'EEXIST') { - throw err; - } - } - - fs.writeFileSync(filepath, str); - return filepath; -}; diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/.npmignore b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/.npmignore deleted file mode 100644 index 9303c347..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log \ No newline at end of file diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/.travis.yml b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/.travis.yml deleted file mode 100644 index 84fd7ca2..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - 0.9 diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/LICENSE b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/LICENSE deleted file mode 100644 index 432d1aeb..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 2010 James Halliday (mail@substack.net) - -This project is free software released under the MIT/X11 license: - -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/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/examples/pow.js b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/examples/pow.js deleted file mode 100644 index e6924212..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/examples/pow.js +++ /dev/null @@ -1,6 +0,0 @@ -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/index.js b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/index.js deleted file mode 100644 index fda6de8a..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/index.js +++ /dev/null @@ -1,82 +0,0 @@ -var path = require('path'); -var fs = require('fs'); - -module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; - -function mkdirP (p, mode, f, made) { - if (typeof mode === 'function' || mode === undefined) { - f = mode; - mode = 0777 & (~process.umask()); - } - if (!made) made = null; - - var cb = f || function () {}; - if (typeof mode === 'string') mode = parseInt(mode, 8); - p = path.resolve(p); - - fs.mkdir(p, mode, function (er) { - if (!er) { - made = made || p; - return cb(null, made); - } - switch (er.code) { - case 'ENOENT': - mkdirP(path.dirname(p), mode, function (er, made) { - if (er) cb(er, made); - else mkdirP(p, mode, cb, made); - }); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - fs.stat(p, function (er2, stat) { - // if the stat fails, then that's super weird. - // let the original error be the failure reason. - if (er2 || !stat.isDirectory()) cb(er, made) - else cb(null, made); - }); - break; - } - }); -} - -mkdirP.sync = function sync (p, mode, made) { - if (mode === undefined) { - mode = 0777 & (~process.umask()); - } - if (!made) made = null; - - if (typeof mode === 'string') mode = parseInt(mode, 8); - p = path.resolve(p); - - try { - fs.mkdirSync(p, mode); - made = made || p; - } - catch (err0) { - switch (err0.code) { - case 'ENOENT' : - made = sync(path.dirname(p), mode, made); - sync(p, mode, made); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - var stat; - try { - stat = fs.statSync(p); - } - catch (err1) { - throw err0; - } - if (!stat.isDirectory()) throw err0; - break; - } - } - - return made; -}; diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/package.json b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/package.json deleted file mode 100644 index 221a22e3..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "mkdirp", - "description": "Recursively mkdir, like `mkdir -p`", - "version": "0.3.5", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "main": "./index", - "keywords": [ - "mkdir", - "directory" - ], - "repository": { - "type": "git", - "url": "http://github.com/substack/node-mkdirp.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "devDependencies": { - "tap": "~0.4.0" - }, - "license": "MIT", - "readme": "# mkdirp\n\nLike `mkdir -p`, but in node.js!\n\n[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)\n\n# example\n\n## pow.js\n\n```js\nvar mkdirp = require('mkdirp');\n \nmkdirp('/tmp/foo/bar/baz', function (err) {\n if (err) console.error(err)\n else console.log('pow!')\n});\n```\n\nOutput\n\n```\npow!\n```\n\nAnd now /tmp/foo/bar/baz exists, huzzah!\n\n# methods\n\n```js\nvar mkdirp = require('mkdirp');\n```\n\n## mkdirp(dir, mode, cb)\n\nCreate a new directory and any necessary subdirectories at `dir` with octal\npermission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\n`cb(err, made)` fires with the error or the first directory `made`\nthat had to be created, if any.\n\n## mkdirp.sync(dir, mode)\n\nSynchronously create a new directory and any necessary subdirectories at `dir`\nwith octal permission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\nReturns the first directory that had to be created, if any.\n\n# install\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install mkdirp\n```\n\n# license\n\nMIT\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/substack/node-mkdirp/issues" - }, - "homepage": "https://github.com/substack/node-mkdirp", - "_id": "mkdirp@0.3.5", - "_from": "mkdirp@~0.3.5" -} diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/readme.markdown b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/readme.markdown deleted file mode 100644 index 83b0216a..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/readme.markdown +++ /dev/null @@ -1,63 +0,0 @@ -# mkdirp - -Like `mkdir -p`, but in node.js! - -[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp) - -# example - -## pow.js - -```js -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); -``` - -Output - -``` -pow! -``` - -And now /tmp/foo/bar/baz exists, huzzah! - -# methods - -```js -var mkdirp = require('mkdirp'); -``` - -## mkdirp(dir, mode, cb) - -Create a new directory and any necessary subdirectories at `dir` with octal -permission string `mode`. - -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -`cb(err, made)` fires with the error or the first directory `made` -that had to be created, if any. - -## mkdirp.sync(dir, mode) - -Synchronously create a new directory and any necessary subdirectories at `dir` -with octal permission string `mode`. - -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -Returns the first directory that had to be created, if any. - -# install - -With [npm](http://npmjs.org) do: - -``` -npm install mkdirp -``` - -# license - -MIT diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/chmod.js b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/chmod.js deleted file mode 100644 index 520dcb8e..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/chmod.js +++ /dev/null @@ -1,38 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -test('chmod-pre', function (t) { - var mode = 0744 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.equal(stat && stat.mode & 0777, mode, 'should be 0744'); - t.end(); - }); - }); -}); - -test('chmod', function (t) { - var mode = 0755 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.end(); - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/clobber.js b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/clobber.js deleted file mode 100644 index 0eb70998..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/clobber.js +++ /dev/null @@ -1,37 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -// a file in the way -var itw = ps.slice(0, 3).join('/'); - - -test('clobber-pre', function (t) { - console.error("about to write to "+itw) - fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); - - fs.stat(itw, function (er, stat) { - t.ifError(er) - t.ok(stat && stat.isFile(), 'should be file') - t.end() - }) -}) - -test('clobber', function (t) { - t.plan(2); - mkdirp(file, 0755, function (err) { - t.ok(err); - t.equal(err.code, 'ENOTDIR'); - t.end(); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/mkdirp.js b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/mkdirp.js deleted file mode 100644 index b07cd70c..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/mkdirp.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('woo', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/perm.js b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/perm.js deleted file mode 100644 index 23a7abbd..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/perm.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('async perm', function (t) { - t.plan(2); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); - -test('async root perm', function (t) { - mkdirp('/tmp', 0755, function (err) { - if (err) t.fail(err); - t.end(); - }); - t.end(); -}); diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/perm_sync.js b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/perm_sync.js deleted file mode 100644 index f685f609..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/perm_sync.js +++ /dev/null @@ -1,39 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('sync perm', function (t) { - t.plan(2); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json'; - - mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }); -}); - -test('sync root perm', function (t) { - t.plan(1); - - var file = '/tmp'; - mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/race.js b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/race.js deleted file mode 100644 index 96a04476..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/race.js +++ /dev/null @@ -1,41 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('race', function (t) { - t.plan(4); - var ps = [ '', 'tmp' ]; - - for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); - } - var file = ps.join('/'); - - var res = 2; - mk(file, function () { - if (--res === 0) t.end(); - }); - - mk(file, function () { - if (--res === 0) t.end(); - }); - - function mk (file, cb) { - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - if (cb) cb(); - } - }) - }) - }); - } -}); diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/rel.js b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/rel.js deleted file mode 100644 index 79858243..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/rel.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('rel', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var cwd = process.cwd(); - process.chdir('/tmp'); - - var file = [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - process.chdir(cwd); - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/return.js b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/return.js deleted file mode 100644 index bce68e56..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/return.js +++ /dev/null @@ -1,25 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('return value', function (t) { - t.plan(4); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - // should return the first dir created. - // By this point, it would be profoundly surprising if /tmp didn't - // already exist, since every other test makes things in there. - mkdirp(file, function (err, made) { - t.ifError(err); - t.equal(made, '/tmp/' + x); - mkdirp(file, function (err, made) { - t.ifError(err); - t.equal(made, null); - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/return_sync.js b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/return_sync.js deleted file mode 100644 index 7c222d35..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/return_sync.js +++ /dev/null @@ -1,24 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('return value', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - // should return the first dir created. - // By this point, it would be profoundly surprising if /tmp didn't - // already exist, since every other test makes things in there. - // Note that this will throw on failure, which will fail the test. - var made = mkdirp.sync(file); - t.equal(made, '/tmp/' + x); - - // making the same file again should have no effect. - made = mkdirp.sync(file); - t.equal(made, null); -}); diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/root.js b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/root.js deleted file mode 100644 index 97ad7a2f..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/root.js +++ /dev/null @@ -1,18 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('root', function (t) { - // '/' on unix, 'c:/' on windows. - var file = path.resolve('/'); - - mkdirp(file, 0755, function (err) { - if (err) throw err - fs.stat(file, function (er, stat) { - if (er) throw er - t.ok(stat.isDirectory(), 'target is a directory'); - t.end(); - }) - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/sync.js b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/sync.js deleted file mode 100644 index 7530cada..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/sync.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('sync', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - try { - mkdirp.sync(file, 0755); - } catch (err) { - t.fail(err); - return t.end(); - } - - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/umask.js b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/umask.js deleted file mode 100644 index 64ccafe2..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/umask.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('implicit mode from umask', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0777 & (~process.umask())); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/umask_sync.js b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/umask_sync.js deleted file mode 100644 index 35bd5cbb..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/mkdirp/test/umask_sync.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('umask sync modes', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - try { - mkdirp.sync(file); - } catch (err) { - t.fail(err); - return t.end(); - } - - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, (0777 & (~process.umask()))); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }); - }); -}); diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/.npmignore b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/.npmignore deleted file mode 100644 index fd4f2b06..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -.DS_Store diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/.travis.yml b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/.travis.yml deleted file mode 100644 index b6d42c3e..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - 0.9 diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/LICENSE.md b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/LICENSE.md deleted file mode 100644 index f039427f..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/LICENSE.md +++ /dev/null @@ -1,2 +0,0 @@ -Copyright (c) 2010-2012 Robert Kieffer -MIT License - http://opensource.org/licenses/mit-license.php diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/README.md b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/README.md deleted file mode 100644 index d2adba18..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/README.md +++ /dev/null @@ -1,204 +0,0 @@ -# uuid [![Build Status](https://secure.travis-ci.org/shtylman/node-uuid.png?branch=master)](http://travis-ci.org/shtylman/node-uuid) # - -[![browser support](http://ci.testling.com/shtylman/node-uuid.png)](http://ci.testling.com/shtylman/node-uuid) - -Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. - -Features: - -* Generate RFC4122 version 1 or version 4 UUIDs -* Runs in node.js and all browsers. -* Cryptographically strong random # generation on supporting platforms -* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! ) -* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html) - -## Getting Started - -Install it in your browser: - -```html -<script src="uuid.js"></script> -``` - -Or in node.js: - -``` -npm install uuid -``` - -```javascript -var uuid = require('uuid'); - -// Generate a v1 (time-based) id -uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' - -// Generate a v4 (random) id -uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1' -``` - -## API - -### uuid.v1([`options` [, `buffer` [, `offset`]]]) - -Generate and return a RFC4122 v1 (timestamp-based) UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. - * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. - * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used. - * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Notes: - -1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) - -Example: Generate string UUID with fully-specified options - -```javascript -uuid.v1({ - node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], - clockseq: 0x1234, - msecs: new Date('2011-11-01').getTime(), - nsecs: 5678 -}); // -> "710b962e-041c-11e1-9234-0123456789ab" -``` - -Example: In-place generation of two binary IDs - -```javascript -// Generate two ids in an array -var arr = new Array(32); // -> [] -uuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15] -uuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15] - -// Optionally use uuid.unparse() to get stringify the ids -uuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115' -uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115' -``` - -### uuid.v4([`options` [, `buffer` [, `offset`]]]) - -Generate and return a RFC4122 v4 UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values - * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Example: Generate string UUID with fully-specified options - -```javascript -uuid.v4({ - random: [ - 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, - 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 - ] -}); -// -> "109156be-c4fb-41ea-b1b4-efe1671c5836" -``` - -Example: Generate two IDs in a single buffer - -```javascript -var buffer = new Array(32); // (or 'new Buffer' in node.js) -uuid.v4(null, buffer, 0); -uuid.v4(null, buffer, 16); -``` - -### uuid.parse(id[, buffer[, offset]]) -### uuid.unparse(buffer[, offset]) - -Parse and unparse UUIDs - - * `id` - (String) UUID(-like) string - * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used - * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0 - -Example parsing and unparsing a UUID string - -```javascript -var bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> <Buffer 79 7f f0 43 11 eb 11 e1 80 d6 51 09 98 75 5d 10> -var string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10' -``` - -### uuid.noConflict() - -(Browsers only) Set `uuid` property back to it's previous value. - -Returns the uuid object. - -Example: - -```javascript -var myUuid = uuid.noConflict(); -myUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' -``` - -## Deprecated APIs - -Support for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version. - -### uuid([format [, buffer [, offset]]]) - -uuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary). - -### uuid.BufferClass - -The class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API. - -## Testing - -In node.js - -``` -> cd test -> node test.js -``` - -In Browser - -``` -open test/test.html -``` - -### Benchmarking - -Requires node.js - -``` -npm install uuid uuid-js -node benchmark/benchmark.js -``` - -For a more complete discussion of uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/uuid/wiki/Benchmark) - -For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance). - -## Release notes - -### 1.4.0 - -* Improved module context detection -* Removed public RNG functions - -### 1.3.2 - -* Improve tests and handling of v1() options (Issue #24) -* Expose RNG option to allow for perf testing with different generators - -### 1.3.0 - -* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! -* Support for node.js crypto API -* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/benchmark/README.md b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/benchmark/README.md deleted file mode 100644 index aaeb2ea0..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/benchmark/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# node-uuid Benchmarks - -### Results - -To see the results of our benchmarks visit https://github.com/broofa/node-uuid/wiki/Benchmark - -### Run them yourself - -node-uuid comes with some benchmarks to measure performance of generating UUIDs. These can be run using node.js. node-uuid is being benchmarked against some other uuid modules, that are available through npm namely `uuid` and `uuid-js`. - -To prepare and run the benchmark issue; - -``` -npm install uuid uuid-js -node benchmark/benchmark.js -``` - -You'll see an output like this one: - -``` -# v4 -nodeuuid.v4(): 854700 uuids/second -nodeuuid.v4('binary'): 788643 uuids/second -nodeuuid.v4('binary', buffer): 1336898 uuids/second -uuid(): 479386 uuids/second -uuid('binary'): 582072 uuids/second -uuidjs.create(4): 312304 uuids/second - -# v1 -nodeuuid.v1(): 938086 uuids/second -nodeuuid.v1('binary'): 683060 uuids/second -nodeuuid.v1('binary', buffer): 1644736 uuids/second -uuidjs.create(1): 190621 uuids/second -``` - -* The `uuid()` entries are for Nikhil Marathe's [uuid module](https://bitbucket.org/nikhilm/uuidjs) which is a wrapper around the native libuuid library. -* The `uuidjs()` entries are for Patrick Negri's [uuid-js module](https://github.com/pnegri/uuid-js) which is a pure javascript implementation based on [UUID.js](https://github.com/LiosK/UUID.js) by LiosK. - -If you want to get more reliable results you can run the benchmark multiple times and write the output into a log file: - -``` -for i in {0..9}; do node benchmark/benchmark.js >> benchmark/bench_0.4.12.log; done; -``` - -If you're interested in how performance varies between different node versions, you can issue the above command multiple times. - -You can then use the shell script `bench.sh` provided in this directory to calculate the averages over all benchmark runs and draw a nice plot: - -``` -(cd benchmark/ && ./bench.sh) -``` - -This assumes you have [gnuplot](http://www.gnuplot.info/) and [ImageMagick](http://www.imagemagick.org/) installed. You'll find a nice `bench.png` graph in the `benchmark/` directory then. diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/benchmark/bench.gnu b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/benchmark/bench.gnu deleted file mode 100644 index a342fbbe..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/benchmark/bench.gnu +++ /dev/null @@ -1,174 +0,0 @@ -#!/opt/local/bin/gnuplot -persist -# -# -# G N U P L O T -# Version 4.4 patchlevel 3 -# last modified March 2011 -# System: Darwin 10.8.0 -# -# Copyright (C) 1986-1993, 1998, 2004, 2007-2010 -# Thomas Williams, Colin Kelley and many others -# -# gnuplot home: http://www.gnuplot.info -# faq, bugs, etc: type "help seeking-assistance" -# immediate help: type "help" -# plot window: hit 'h' -set terminal postscript eps noenhanced defaultplex \ - leveldefault color colortext \ - solid linewidth 1.2 butt noclip \ - palfuncparam 2000,0.003 \ - "Helvetica" 14 -set output 'bench.eps' -unset clip points -set clip one -unset clip two -set bar 1.000000 front -set border 31 front linetype -1 linewidth 1.000 -set xdata -set ydata -set zdata -set x2data -set y2data -set timefmt x "%d/%m/%y,%H:%M" -set timefmt y "%d/%m/%y,%H:%M" -set timefmt z "%d/%m/%y,%H:%M" -set timefmt x2 "%d/%m/%y,%H:%M" -set timefmt y2 "%d/%m/%y,%H:%M" -set timefmt cb "%d/%m/%y,%H:%M" -set boxwidth -set style fill empty border -set style rectangle back fc lt -3 fillstyle solid 1.00 border lt -1 -set style circle radius graph 0.02, first 0, 0 -set dummy x,y -set format x "% g" -set format y "% g" -set format x2 "% g" -set format y2 "% g" -set format z "% g" -set format cb "% g" -set angles radians -unset grid -set key title "" -set key outside left top horizontal Right noreverse enhanced autotitles columnhead nobox -set key noinvert samplen 4 spacing 1 width 0 height 0 -set key maxcolumns 2 maxrows 0 -unset label -unset arrow -set style increment default -unset style line -set style line 1 linetype 1 linewidth 2.000 pointtype 1 pointsize default pointinterval 0 -unset style arrow -set style histogram clustered gap 2 title offset character 0, 0, 0 -unset logscale -set offsets graph 0.05, 0.15, 0, 0 -set pointsize 1.5 -set pointintervalbox 1 -set encoding default -unset polar -unset parametric -unset decimalsign -set view 60, 30, 1, 1 -set samples 100, 100 -set isosamples 10, 10 -set surface -unset contour -set clabel '%8.3g' -set mapping cartesian -set datafile separator whitespace -unset hidden3d -set cntrparam order 4 -set cntrparam linear -set cntrparam levels auto 5 -set cntrparam points 5 -set size ratio 0 1,1 -set origin 0,0 -set style data points -set style function lines -set xzeroaxis linetype -2 linewidth 1.000 -set yzeroaxis linetype -2 linewidth 1.000 -set zzeroaxis linetype -2 linewidth 1.000 -set x2zeroaxis linetype -2 linewidth 1.000 -set y2zeroaxis linetype -2 linewidth 1.000 -set ticslevel 0.5 -set mxtics default -set mytics default -set mztics default -set mx2tics default -set my2tics default -set mcbtics default -set xtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set xtics norangelimit -set xtics () -set ytics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set ytics autofreq norangelimit -set ztics border in scale 1,0.5 nomirror norotate offset character 0, 0, 0 -set ztics autofreq norangelimit -set nox2tics -set noy2tics -set cbtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 -set cbtics autofreq norangelimit -set title "" -set title offset character 0, 0, 0 font "" norotate -set timestamp bottom -set timestamp "" -set timestamp offset character 0, 0, 0 font "" norotate -set rrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) -set autoscale rfixmin -set autoscale rfixmax -set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] ) -set autoscale tfixmin -set autoscale tfixmax -set urange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale ufixmin -set autoscale ufixmax -set vrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale vfixmin -set autoscale vfixmax -set xlabel "" -set xlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate -set x2label "" -set x2label offset character 0, 0, 0 font "" textcolor lt -1 norotate -set xrange [ * : * ] noreverse nowriteback # (currently [-0.150000:3.15000] ) -set autoscale xfixmin -set autoscale xfixmax -set x2range [ * : * ] noreverse nowriteback # (currently [0.00000:3.00000] ) -set autoscale x2fixmin -set autoscale x2fixmax -set ylabel "" -set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set y2label "" -set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set yrange [ 0.00000 : 1.90000e+06 ] noreverse nowriteback # (currently [:] ) -set autoscale yfixmin -set autoscale yfixmax -set y2range [ * : * ] noreverse nowriteback # (currently [0.00000:1.90000e+06] ) -set autoscale y2fixmin -set autoscale y2fixmax -set zlabel "" -set zlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate -set zrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) -set autoscale zfixmin -set autoscale zfixmax -set cblabel "" -set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 -set cbrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) -set autoscale cbfixmin -set autoscale cbfixmax -set zero 1e-08 -set lmargin -1 -set bmargin -1 -set rmargin -1 -set tmargin -1 -set pm3d explicit at s -set pm3d scansautomatic -set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean -set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB -set palette rgbformulae 7, 5, 15 -set colorbox default -set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault -set loadpath -set fontpath -set fit noerrorvariables -GNUTERM = "aqua" -plot 'bench_results.txt' using 2:xticlabel(1) w lp lw 2, '' using 3:xticlabel(1) w lp lw 2, '' using 4:xticlabel(1) w lp lw 2, '' using 5:xticlabel(1) w lp lw 2, '' using 6:xticlabel(1) w lp lw 2, '' using 7:xticlabel(1) w lp lw 2, '' using 8:xticlabel(1) w lp lw 2, '' using 9:xticlabel(1) w lp lw 2 -# EOF diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/benchmark/bench.sh b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/benchmark/bench.sh deleted file mode 100755 index d870a0cb..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/benchmark/bench.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# for a given node version run: -# for i in {0..9}; do node benchmark.js >> bench_0.6.2.log; done; - -PATTERNS=('nodeuuid.v1()' "nodeuuid.v1('binary'," 'nodeuuid.v4()' "nodeuuid.v4('binary'," "uuid()" "uuid('binary')" 'uuidjs.create(1)' 'uuidjs.create(4)' '140byte') -FILES=(node_uuid_v1_string node_uuid_v1_buf node_uuid_v4_string node_uuid_v4_buf libuuid_v4_string libuuid_v4_binary uuidjs_v1_string uuidjs_v4_string 140byte_es) -INDICES=(2 3 2 3 2 2 2 2 2) -VERSIONS=$( ls bench_*.log | sed -e 's/^bench_\([0-9\.]*\)\.log/\1/' | tr "\\n" " " ) -TMPJOIN="tmp_join" -OUTPUT="bench_results.txt" - -for I in ${!FILES[*]}; do - F=${FILES[$I]} - P=${PATTERNS[$I]} - INDEX=${INDICES[$I]} - echo "version $F" > $F - for V in $VERSIONS; do - (VAL=$( grep "$P" bench_$V.log | LC_ALL=en_US awk '{ sum += $'$INDEX' } END { print sum/NR }' ); echo $V $VAL) >> $F - done - if [ $I == 0 ]; then - cat $F > $TMPJOIN - else - join $TMPJOIN $F > $OUTPUT - cp $OUTPUT $TMPJOIN - fi - rm $F -done - -rm $TMPJOIN - -gnuplot bench.gnu -convert -density 200 -resize 800x560 -flatten bench.eps bench.png -rm bench.eps diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/benchmark/benchmark-native.c b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/benchmark/benchmark-native.c deleted file mode 100644 index dbfc75f6..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/benchmark/benchmark-native.c +++ /dev/null @@ -1,34 +0,0 @@ -/* -Test performance of native C UUID generation - -To Compile: cc -luuid benchmark-native.c -o benchmark-native -*/ - -#include <stdio.h> -#include <unistd.h> -#include <sys/time.h> -#include <uuid/uuid.h> - -int main() { - uuid_t myid; - char buf[36+1]; - int i; - struct timeval t; - double start, finish; - - gettimeofday(&t, NULL); - start = t.tv_sec + t.tv_usec/1e6; - - int n = 2e5; - for (i = 0; i < n; i++) { - uuid_generate(myid); - uuid_unparse(myid, buf); - } - - gettimeofday(&t, NULL); - finish = t.tv_sec + t.tv_usec/1e6; - double dur = finish - start; - - printf("%d uuids/sec", (int)(n/dur)); - return 0; -} diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/benchmark/benchmark.js b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/benchmark/benchmark.js deleted file mode 100644 index 40e6efbe..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/benchmark/benchmark.js +++ /dev/null @@ -1,84 +0,0 @@ -try { - var nodeuuid = require('../uuid'); -} catch (e) { - console.error('node-uuid require failed - skipping tests'); -} - -try { - var uuid = require('uuid'); -} catch (e) { - console.error('uuid require failed - skipping tests'); -} - -try { - var uuidjs = require('uuid-js'); -} catch (e) { - console.error('uuid-js require failed - skipping tests'); -} - -var N = 5e5; - -function rate(msg, t) { - console.log(msg + ': ' + - (N / (Date.now() - t) * 1e3 | 0) + - ' uuids/second'); -} - -console.log('# v4'); - -// node-uuid - string form -if (nodeuuid) { - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4(); - rate('nodeuuid.v4() - using node.js crypto RNG', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4({rng: nodeuuid.mathRNG}); - rate('nodeuuid.v4() - using Math.random() RNG', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary'); - rate('nodeuuid.v4(\'binary\')', t); - - var buffer = new nodeuuid.BufferClass(16); - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary', buffer); - rate('nodeuuid.v4(\'binary\', buffer)', t); -} - -// libuuid - string form -if (uuid) { - for (var i = 0, t = Date.now(); i < N; i++) uuid(); - rate('uuid()', t); - - for (var i = 0, t = Date.now(); i < N; i++) uuid('binary'); - rate('uuid(\'binary\')', t); -} - -// uuid-js - string form -if (uuidjs) { - for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(4); - rate('uuidjs.create(4)', t); -} - -// 140byte.es -for (var i = 0, t = Date.now(); i < N; i++) 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(s,r){r=Math.random()*16|0;return (s=='x'?r:r&0x3|0x8).toString(16)}); -rate('140byte.es_v4', t); - -console.log(''); -console.log('# v1'); - -// node-uuid - v1 string form -if (nodeuuid) { - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1(); - rate('nodeuuid.v1()', t); - - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary'); - rate('nodeuuid.v1(\'binary\')', t); - - var buffer = new nodeuuid.BufferClass(16); - for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary', buffer); - rate('nodeuuid.v1(\'binary\', buffer)', t); -} - -// uuid-js - v1 string form -if (uuidjs) { - for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(1); - rate('uuidjs.create(1)', t); -} diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/misc/compare.js b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/misc/compare.js deleted file mode 100644 index 3de34151..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/misc/compare.js +++ /dev/null @@ -1,62 +0,0 @@ -var assert = require('assert'), - nodeuuid = require('../'), - uuidjs = require('uuid-js'), - util = require('util'), - exec = require('child_process').exec, - os = require('os'); - -// On Mac Os X / macports there's only the ossp-uuid package that provides uuid -// On Linux there's uuid-runtime which provides uuidgen -var uuidCmd = os.type() === 'Darwin' ? 'uuid -1' : 'uuidgen -t'; - -function compare(ids) { - console.log(ids); - for (var i = 0; i < ids.length; i++) { - var id = ids[i].split('-'); - id = [id[2], id[1], id[0]].join(''); - ids[i] = id; - } - var sorted = ([].concat(ids)).sort(); - - if (sorted.toString() !== ids.toString()) { - console.log('Warning: sorted !== ids'); - } else { - console.log('everything in order!'); - } -} - -// Test time order of v1 uuids -var ids = []; -while (ids.length < 10e3) ids.push(nodeuuid.v1()); - -var max = 10; -console.log('node-uuid:'); -ids = []; -for (var i = 0; i < max; i++) ids.push(nodeuuid.v1()); -compare(ids); - -console.log(''); -console.log('uuidjs:'); -ids = []; -for (var i = 0; i < max; i++) ids.push(uuidjs.create(1).toString()); -compare(ids); - -console.log(''); -console.log('libuuid:'); -ids = []; -var count = 0; -var last = function() { - compare(ids); -} -var cb = function(err, stdout, stderr) { - ids.push(stdout.substring(0, stdout.length-1)); - count++; - if (count < max) { - return next(); - } - last(); -}; -var next = function() { - exec(uuidCmd, cb); -}; -next(); diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/misc/perf.js b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/misc/perf.js deleted file mode 100644 index bdc9eb46..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/misc/perf.js +++ /dev/null @@ -1,102 +0,0 @@ -var assert = require('assert'); - -var uuid = require('../'); - -var log = console.log; - -var generators = { - v1: uuid.v1, - v4: uuid.v4 -}; - -var UUID_FORMAT = { - v1: /[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i, - v4: /[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i -}; - -var N = 1e4; - -// Get %'age an actual value differs from the ideal value -function divergence(actual, ideal) { - return Math.round(100*100*(actual - ideal)/ideal)/100; -} - -function rate(msg, t) { - log(msg + ': ' + (N / (Date.now() - t) * 1e3 | 0) + ' uuids\/second'); -} - -for (var version in generators) { - var counts = {}, max = 0; - var generator = generators[version]; - var format = UUID_FORMAT[version]; - - log('\nSanity check ' + N + ' ' + version + ' uuids'); - for (var i = 0, ok = 0; i < N; i++) { - id = generator(); - if (!format.test(id)) { - throw Error(id + ' is not a valid UUID string'); - } - - if (id != uuid.unparse(uuid.parse(id))) { - assert(fail, id + ' is not a valid id'); - } - - // Count digits for our randomness check - if (version == 'v4') { - var digits = id.replace(/-/g, '').split(''); - for (var j = digits.length-1; j >= 0; j--) { - var c = digits[j]; - max = Math.max(max, counts[c] = (counts[c] || 0) + 1); - } - } - } - - // Check randomness for v4 UUIDs - if (version == 'v4') { - // Limit that we get worried about randomness. (Purely empirical choice, this!) - var limit = 2*100*Math.sqrt(1/N); - - log('\nChecking v4 randomness. Distribution of Hex Digits (% deviation from ideal)'); - - for (var i = 0; i < 16; i++) { - var c = i.toString(16); - var bar = '', n = counts[c], p = Math.round(n/max*100|0); - - // 1-3,5-8, and D-F: 1:16 odds over 30 digits - var ideal = N*30/16; - if (i == 4) { - // 4: 1:1 odds on 1 digit, plus 1:16 odds on 30 digits - ideal = N*(1 + 30/16); - } else if (i >= 8 && i <= 11) { - // 8-B: 1:4 odds on 1 digit, plus 1:16 odds on 30 digits - ideal = N*(1/4 + 30/16); - } else { - // Otherwise: 1:16 odds on 30 digits - ideal = N*30/16; - } - var d = divergence(n, ideal); - - // Draw bar using UTF squares (just for grins) - var s = n/max*50 | 0; - while (s--) bar += '='; - - assert(Math.abs(d) < limit, c + ' |' + bar + '| ' + counts[c] + ' (' + d + '% < ' + limit + '%)'); - } - } -} - -// Perf tests -for (var version in generators) { - log('\nPerformance testing ' + version + ' UUIDs'); - var generator = generators[version]; - var buf = new uuid.BufferClass(16); - - for (var i = 0, t = Date.now(); i < N; i++) generator(); - rate('uuid.' + version + '()', t); - - for (var i = 0, t = Date.now(); i < N; i++) generator('binary'); - rate('uuid.' + version + '(\'binary\')', t); - - for (var i = 0, t = Date.now(); i < N; i++) generator('binary', buf); - rate('uuid.' + version + '(\'binary\', buffer)', t); -} diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/package.json b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/package.json deleted file mode 100644 index 36eb7f97..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "uuid", - "version": "1.4.1", - "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", - "keywords": [ - "uuid", - "guid", - "rfc4122" - ], - "author": { - "name": "Robert Kieffer", - "email": "robert@broofa.com" - }, - "contributors": [ - { - "name": "Christoph Tavan", - "email": "dev@tavan.de" - } - ], - "main": "./uuid.js", - "devDependencies": { - "mocha": "1.8.0" - }, - "scripts": { - "test": "mocha test/test.js" - }, - "browser": { - "./rng.js": "./rng-browser.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/shtylman/node-uuid.git" - }, - "testling": { - "browsers": [ - "ie6..latest", - "firefox/3.6..latest", - "chrome/22..latest", - "safari/5.1..latest" - ], - "harness": "mocha-tdd", - "files": "test/*.js" - }, - "readme": "# uuid [![Build Status](https://secure.travis-ci.org/shtylman/node-uuid.png?branch=master)](http://travis-ci.org/shtylman/node-uuid) #\n\n[![browser support](http://ci.testling.com/shtylman/node-uuid.png)](http://ci.testling.com/shtylman/node-uuid)\n\nSimple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.\n\nFeatures:\n\n* Generate RFC4122 version 1 or version 4 UUIDs\n* Runs in node.js and all browsers.\n* Cryptographically strong random # generation on supporting platforms\n* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! )\n* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html)\n\n## Getting Started\n\nInstall it in your browser:\n\n```html\n<script src=\"uuid.js\"></script>\n```\n\nOr in node.js:\n\n```\nnpm install uuid\n```\n\n```javascript\nvar uuid = require('uuid');\n\n// Generate a v1 (time-based) id\nuuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n\n// Generate a v4 (random) id\nuuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'\n```\n\n## API\n\n### uuid.v1([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v1 (timestamp-based) UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1.\n * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.\n * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used.\n * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nNotes:\n\n1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v1({\n node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],\n clockseq: 0x1234,\n msecs: new Date('2011-11-01').getTime(),\n nsecs: 5678\n}); // -> \"710b962e-041c-11e1-9234-0123456789ab\"\n```\n\nExample: In-place generation of two binary IDs\n\n```javascript\n// Generate two ids in an array\nvar arr = new Array(32); // -> []\nuuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\nuuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\n\n// Optionally use uuid.unparse() to get stringify the ids\nuuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115'\nuuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115'\n```\n\n### uuid.v4([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v4 UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values\n * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v4({\n random: [\n 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,\n 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36\n ]\n});\n// -> \"109156be-c4fb-41ea-b1b4-efe1671c5836\"\n```\n\nExample: Generate two IDs in a single buffer\n\n```javascript\nvar buffer = new Array(32); // (or 'new Buffer' in node.js)\nuuid.v4(null, buffer, 0);\nuuid.v4(null, buffer, 16);\n```\n\n### uuid.parse(id[, buffer[, offset]])\n### uuid.unparse(buffer[, offset])\n\nParse and unparse UUIDs\n\n * `id` - (String) UUID(-like) string\n * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used\n * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0\n\nExample parsing and unparsing a UUID string\n\n```javascript\nvar bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> <Buffer 79 7f f0 43 11 eb 11 e1 80 d6 51 09 98 75 5d 10>\nvar string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10'\n```\n\n### uuid.noConflict()\n\n(Browsers only) Set `uuid` property back to it's previous value.\n\nReturns the uuid object.\n\nExample:\n\n```javascript\nvar myUuid = uuid.noConflict();\nmyUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n```\n\n## Deprecated APIs\n\nSupport for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version.\n\n### uuid([format [, buffer [, offset]]])\n\nuuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary).\n\n### uuid.BufferClass\n\nThe class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API.\n\n## Testing\n\nIn node.js\n\n```\n> cd test\n> node test.js\n```\n\nIn Browser\n\n```\nopen test/test.html\n```\n\n### Benchmarking\n\nRequires node.js\n\n```\nnpm install uuid uuid-js\nnode benchmark/benchmark.js\n```\n\nFor a more complete discussion of uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/uuid/wiki/Benchmark)\n\nFor browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance).\n\n## Release notes\n\n### 1.4.0\n\n* Improved module context detection\n* Removed public RNG functions\n\n### 1.3.2\n\n* Improve tests and handling of v1() options (Issue #24)\n* Expose RNG option to allow for perf testing with different generators\n\n### 1.3.0\n\n* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!\n* Support for node.js crypto API\n* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/shtylman/node-uuid/issues" - }, - "homepage": "https://github.com/shtylman/node-uuid", - "_id": "uuid@1.4.1", - "dist": { - "shasum": "4e6bbab179cc65c2f120508576c631bd7751af7c" - }, - "_from": "uuid@~1.4.1", - "_resolved": "https://registry.npmjs.org/uuid/-/uuid-1.4.1.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/rng-browser.js b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/rng-browser.js deleted file mode 100644 index 57b58d4b..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/rng-browser.js +++ /dev/null @@ -1,31 +0,0 @@ - -var rng; - -if (global.crypto && crypto.getRandomValues) { - // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto - // Moderately fast, high quality - var _rnds8 = new Uint8Array(16); - rng = function whatwgRNG() { - crypto.getRandomValues(_rnds8); - return _rnds8; - }; -} - -if (!rng) { - // Math.random()-based (RNG) - // - // If all else fails, use Math.random(). It's fast, but is of unspecified - // quality. - var _rnds = new Array(16); - rng = function() { - for (var i = 0, r; i < 16; i++) { - if ((i & 0x03) === 0) r = Math.random() * 0x100000000; - _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; - } - - return _rnds; - }; -} - -module.exports = rng; - diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/rng.js b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/rng.js deleted file mode 100644 index 3977f798..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/rng.js +++ /dev/null @@ -1,4 +0,0 @@ -var rb = require('crypto').randomBytes; -module.exports = function() { - return rb(16); -}; diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/test/mocha.opts b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/test/mocha.opts deleted file mode 100644 index e2bfcc5a..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/test/mocha.opts +++ /dev/null @@ -1 +0,0 @@ ---ui qunit diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/test/test.js b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/test/test.js deleted file mode 100644 index 4c9872ff..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/test/test.js +++ /dev/null @@ -1,105 +0,0 @@ -var assert = require('assert'); - -var uuid = require('../'); - -// Verify ordering of v1 ids created with explicit times -var TIME = 1321644961388; // 2011-11-18 11:36:01.388-08:00 - -function compare(name, ids) { - test(name, function() { - // avoid .map for older browsers - for (var i=0 ; i<ids.length ; ++i) { - ids[i] = ids[i].split('-').reverse().join('-'); - } - ids = ids.sort(); - var sorted = ([].concat(ids)).sort(); - - assert(sorted.toString() == ids.toString(), name + ' have expected order'); - }); -} - -// Verify ordering of v1 ids created using default behavior -compare('uuids with current time', [ - uuid.v1(), - uuid.v1(), - uuid.v1(), - uuid.v1(), - uuid.v1() -]); - -// Verify ordering of v1 ids created with explicit times -compare('uuids with time option', [ - uuid.v1({msecs: TIME - 10*3600*1000}), - uuid.v1({msecs: TIME - 1}), - uuid.v1({msecs: TIME}), - uuid.v1({msecs: TIME + 1}), - uuid.v1({msecs: TIME + 28*24*3600*1000}) -]); - -test('msec', function() { - assert( - uuid.v1({msecs: TIME}) != uuid.v1({msecs: TIME}), - 'IDs created at same msec are different' - ); -}); - -test('exception thrown when > 10k ids created in 1ms', function() { - // Verify throw if too many ids created - var thrown = false; - try { - uuid.v1({msecs: TIME, nsecs: 10000}); - } catch (e) { - thrown = true; - } - assert(thrown, 'Exception thrown when > 10K ids created in 1 ms'); -}); - -test('clock regression by msec', function() { - // Verify clock regression bumps clockseq - var uidt = uuid.v1({msecs: TIME}); - var uidtb = uuid.v1({msecs: TIME - 1}); - assert( - parseInt(uidtb.split('-')[3], 16) - parseInt(uidt.split('-')[3], 16) === 1, - 'Clock regression by msec increments the clockseq' - ); -}); - -test('clock regression by nsec', function() { - // Verify clock regression bumps clockseq - var uidtn = uuid.v1({msecs: TIME, nsecs: 10}); - var uidtnb = uuid.v1({msecs: TIME, nsecs: 9}); - assert( - parseInt(uidtnb.split('-')[3], 16) - parseInt(uidtn.split('-')[3], 16) === 1, - 'Clock regression by nsec increments the clockseq' - ); -}); - -test('explicit options product expected id', function() { - // Verify explicit options produce expected id - var id = uuid.v1({ - msecs: 1321651533573, - nsecs: 5432, - clockseq: 0x385c, - node: [ 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10 ] - }); - assert(id == 'd9428888-122b-11e1-b85c-61cd3cbb3210', 'Explicit options produce expected id'); -}); - -test('ids spanning 1ms boundary are 100ns apart', function() { - // Verify adjacent ids across a msec boundary are 1 time unit apart - var u0 = uuid.v1({msecs: TIME, nsecs: 9999}); - var u1 = uuid.v1({msecs: TIME + 1, nsecs: 0}); - - var before = u0.split('-')[0], after = u1.split('-')[0]; - var dt = parseInt(after, 16) - parseInt(before, 16); - assert(dt === 1, 'Ids spanning 1ms boundary are 100ns apart'); -}); - -test('parse/unparse', function() { - var id = '00112233445566778899aabbccddeeff'; - assert(uuid.unparse(uuid.parse(id.substr(0,10))) == - '00112233-4400-0000-0000-000000000000', 'Short parse'); - assert(uuid.unparse(uuid.parse('(this is the uuid -> ' + id + id)) == - '00112233-4455-6677-8899-aabbccddeeff', 'Dirty parse'); -}); - diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/uuid.js b/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/uuid.js deleted file mode 100644 index d0062fb4..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/node_modules/uuid/uuid.js +++ /dev/null @@ -1,187 +0,0 @@ -// uuid.js -// -// Copyright (c) 2010-2012 Robert Kieffer -// MIT License - http://opensource.org/licenses/mit-license.php - -// Unique ID creation requires a high quality random # generator. We feature -// detect to determine the best RNG source, normalizing to a function that -// returns 128-bits of randomness, since that's what's usually required -var _rng = require('./rng'); - -// Buffer class to use -var BufferClass = typeof(Buffer) == 'function' ? Buffer : Array; - -// Maps for number <-> hex string conversion -var _byteToHex = []; -var _hexToByte = {}; -for (var i = 0; i < 256; i++) { - _byteToHex[i] = (i + 0x100).toString(16).substr(1); - _hexToByte[_byteToHex[i]] = i; -} - -// **`parse()` - Parse a UUID into it's component bytes** -function parse(s, buf, offset) { - var i = (buf && offset) || 0, ii = 0; - - buf = buf || []; - s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) { - if (ii < 16) { // Don't overflow! - buf[i + ii++] = _hexToByte[oct]; - } - }); - - // Zero out remaining bytes if string was short - while (ii < 16) { - buf[i + ii++] = 0; - } - - return buf; -} - -// **`unparse()` - Convert UUID byte array (ala parse()) into a string** -function unparse(buf, offset) { - var i = offset || 0, bth = _byteToHex; - return bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]]; -} - -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html - -// random #'s we need to init node and clockseq -var _seedBytes = _rng(); - -// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) -var _nodeId = [ - _seedBytes[0] | 0x01, - _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] -]; - -// Per 4.2.2, randomize (14 bit) clockseq -var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff; - -// Previous uuid creation time -var _lastMSecs = 0, _lastNSecs = 0; - -// See https://github.com/broofa/node-uuid for API details -function v1(options, buf, offset) { - var i = buf && offset || 0; - var b = buf || []; - - options = options || {}; - - var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; - - // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); - - // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; - - // Time since last uuid creation (in msecs) - var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; - - // Per 4.2.1.2, Bump clockseq on clock regression - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } - - // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } - - // Per 4.2.1.2 Throw error if too many uuids are requested - if (nsecs >= 10000) { - throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; - - // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - msecs += 12219292800000; - - // `time_low` - var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; - - // `time_mid` - var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; - - // `time_high_and_version` - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - b[i++] = tmh >>> 16 & 0xff; - - // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - b[i++] = clockseq >>> 8 | 0x80; - - // `clock_seq_low` - b[i++] = clockseq & 0xff; - - // `node` - var node = options.node || _nodeId; - for (var n = 0; n < 6; n++) { - b[i + n] = node[n]; - } - - return buf ? buf : unparse(b); -} - -// **`v4()` - Generate random UUID** - -// See https://github.com/broofa/node-uuid for API details -function v4(options, buf, offset) { - // Deprecated - 'format' argument, as supported in v1.2 - var i = buf && offset || 0; - - if (typeof(options) == 'string') { - buf = options == 'binary' ? new BufferClass(16) : null; - options = null; - } - options = options || {}; - - var rnds = options.random || (options.rng || _rng)(); - - // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - - // Copy bytes to buffer, if provided - if (buf) { - for (var ii = 0; ii < 16; ii++) { - buf[i + ii] = rnds[ii]; - } - } - - return buf || unparse(rnds); -} - -// Export public API -var uuid = v4; -uuid.v1 = v1; -uuid.v4 = v4; -uuid.parse = parse; -uuid.unparse = unparse; -uuid.BufferClass = BufferClass; - -module.exports = uuid; diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/package.json b/node_modules/gulp-imagemin/node_modules/temp-write/package.json deleted file mode 100644 index 1b6a6a28..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "temp-write", - "version": "0.2.0", - "description": "Write String/Buffer to a random temp file", - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/temp-write" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js" - ], - "keywords": [ - "tmp", - "temp", - "temporary", - "tempfile", - "file", - "filename", - "path", - "random", - "rand", - "write", - "fs", - "string", - "buffer" - ], - "dependencies": { - "graceful-fs": "~2.0.0", - "uuid": "~1.4.1", - "mkdirp": "~0.3.5" - }, - "devDependencies": { - "mocha": "*" - }, - "readme": "# temp-write [![Build Status](https://travis-ci.org/sindresorhus/temp-write.png?branch=master)](http://travis-ci.org/sindresorhus/temp-write)\n\n> Write String/Buffer to a random temp file\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/temp-write)\n\n```\nnpm install --save temp-write\n```\n\n\n## Example\n\n```js\nvar fs = require('fs');\nvar tempWrite = require('temp-write');\n\nvar filepath = tempWrite.sync('unicorn');\n//=> /var/folders/_1/tk89k8215ts0rg0kmb096nj80000gn/T/4049f192-43e7-43b2-98d9-094e6760861b\n\nfs.readFileSync(filepath, 'utf8');\n//=> unicorn\n```\n\n\n## API\n\n### tempWrite(input, [filename], callback)\n\n#### input\n\n*Required* \nType: `String`|`Buffer`\n\n#### filename\n\nType: `String` \nExample: `'img.png'`\n\nOptionally supply a custom filename.\n\n#### callback(err, filepath)\n\n*Required* \nType: `Function`\n\n### tempWrite.sync(input)\n\nType: `String`|`Buffer` \nReturns: the filepath\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "bugs": { - "url": "https://github.com/sindresorhus/temp-write/issues" - }, - "homepage": "https://github.com/sindresorhus/temp-write", - "_id": "temp-write@0.2.0", - "dist": { - "shasum": "c7b7030ea691424fa8a6504c939e92a1861bd93d" - }, - "_from": "temp-write@~0.2.0", - "_resolved": "https://registry.npmjs.org/temp-write/-/temp-write-0.2.0.tgz" -} diff --git a/node_modules/gulp-imagemin/node_modules/temp-write/readme.md b/node_modules/gulp-imagemin/node_modules/temp-write/readme.md deleted file mode 100644 index 373ce111..00000000 --- a/node_modules/gulp-imagemin/node_modules/temp-write/readme.md +++ /dev/null @@ -1,58 +0,0 @@ -# temp-write [![Build Status](https://travis-ci.org/sindresorhus/temp-write.png?branch=master)](http://travis-ci.org/sindresorhus/temp-write) - -> Write String/Buffer to a random temp file - - -## Install - -Install with [npm](https://npmjs.org/package/temp-write) - -``` -npm install --save temp-write -``` - - -## Example - -```js -var fs = require('fs'); -var tempWrite = require('temp-write'); - -var filepath = tempWrite.sync('unicorn'); -//=> /var/folders/_1/tk89k8215ts0rg0kmb096nj80000gn/T/4049f192-43e7-43b2-98d9-094e6760861b - -fs.readFileSync(filepath, 'utf8'); -//=> unicorn -``` - - -## API - -### tempWrite(input, [filename], callback) - -#### input - -*Required* -Type: `String`|`Buffer` - -#### filename - -Type: `String` -Example: `'img.png'` - -Optionally supply a custom filename. - -#### callback(err, filepath) - -*Required* -Type: `Function` - -### tempWrite.sync(input) - -Type: `String`|`Buffer` -Returns: the filepath - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-imagemin/package.json b/node_modules/gulp-imagemin/package.json deleted file mode 100644 index d0f06487..00000000 --- a/node_modules/gulp-imagemin/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "gulp-imagemin", - "version": "0.1.5", - "description": "Minify PNG, JPEG and GIF images", - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/gulp-imagemin" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js" - ], - "keywords": [ - "gulpplugin", - "image-min", - "image", - "img", - "picture", - "photo", - "minify", - "minifier", - "compress", - "png", - "jpg", - "jpeg", - "gif" - ], - "dependencies": { - "gulp-util": "~2.2.0", - "image-min": "~0.1.0", - "graceful-fs": "~2.0.0", - "filesize": "~2.0.0", - "temp-write": "~0.2.0", - "map-stream": "~0.1.0" - }, - "devDependencies": { - "mocha": "*" - }, - "readme": "# [gulp](https://github.com/wearefractal/gulp)-imagemin [![Build Status](https://secure.travis-ci.org/sindresorhus/gulp-imagemin.png?branch=master)](http://travis-ci.org/sindresorhus/gulp-imagemin)\n\n> Minify PNG, JPEG and GIF images with [image-min](https://github.com/kevva/image-min)\n\n*Issues with the output should be reported on the image-min [issue tracker](https://github.com/kevva/image-min/issues).*\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/gulp-imagemin)\n\n```\nnpm install --save-dev gulp-imagemin\n```\n\n\n## Example\n\n```js\nvar gulp = require('gulp');\nvar imagemin = require('gulp-imagemin');\n\ngulp.task('default', function () {\n\tgulp.src('src/image.png')\n\t\t.pipe(imagemin())\n\t\t.pipe(gulp.dest('dist'));\n});\n```\n\n\n## API\n\n### imagemin(options)\n\nSee the image-min [options](https://github.com/kevva/image-min#options).\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "bugs": { - "url": "https://github.com/sindresorhus/gulp-imagemin/issues" - }, - "homepage": "https://github.com/sindresorhus/gulp-imagemin", - "_id": "gulp-imagemin@0.1.5", - "_from": "gulp-imagemin@" -} diff --git a/node_modules/gulp-imagemin/readme.md b/node_modules/gulp-imagemin/readme.md deleted file mode 100644 index dfa18b07..00000000 --- a/node_modules/gulp-imagemin/readme.md +++ /dev/null @@ -1,40 +0,0 @@ -# [gulp](https://github.com/wearefractal/gulp)-imagemin [![Build Status](https://secure.travis-ci.org/sindresorhus/gulp-imagemin.png?branch=master)](http://travis-ci.org/sindresorhus/gulp-imagemin) - -> Minify PNG, JPEG and GIF images with [image-min](https://github.com/kevva/image-min) - -*Issues with the output should be reported on the image-min [issue tracker](https://github.com/kevva/image-min/issues).* - - -## Install - -Install with [npm](https://npmjs.org/package/gulp-imagemin) - -``` -npm install --save-dev gulp-imagemin -``` - - -## Example - -```js -var gulp = require('gulp'); -var imagemin = require('gulp-imagemin'); - -gulp.task('default', function () { - gulp.src('src/image.png') - .pipe(imagemin()) - .pipe(gulp.dest('dist')); -}); -``` - - -## API - -### imagemin(options) - -See the image-min [options](https://github.com/kevva/image-min#options). - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-minify-css/.npmignore b/node_modules/gulp-minify-css/.npmignore deleted file mode 100644 index b5ef13a3..00000000 --- a/node_modules/gulp-minify-css/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -.DS_Store -*.log -node_modules -build -*.node -components \ No newline at end of file diff --git a/node_modules/gulp-minify-css/.travis.yml b/node_modules/gulp-minify-css/.travis.yml deleted file mode 100644 index 18ae2d89..00000000 --- a/node_modules/gulp-minify-css/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.11" - - "0.10" diff --git a/node_modules/gulp-minify-css/LICENSE b/node_modules/gulp-minify-css/LICENSE deleted file mode 100755 index 55eb4777..00000000 --- a/node_modules/gulp-minify-css/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013 Jonathan Pollack <jonathaenpollack@gmail.com>, Cloudlabs Inc. - -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/node_modules/gulp-minify-css/README.md b/node_modules/gulp-minify-css/README.md deleted file mode 100644 index 95ff084a..00000000 --- a/node_modules/gulp-minify-css/README.md +++ /dev/null @@ -1,68 +0,0 @@ -[![Build Status](https://travis-ci.org/jonathanepollack/gulp-minify-css.png?branch=master)](https://travis-ci.org/jonathanepollack/gulp-minify-css) -## Information - -<table> -<tr> -<td>Package</td><td>gulp-minify-css</td> -</tr> -<tr> -<td>Description</td> -<td>Minify css with <a href="https://github.com/GoalSmashers/clean-css">clean-css.</a></td> -</tr> -<tr> -<td>Node Version</td> -<td>>= 0.10</td> -</tr> -</table> - -## Installion - -``` -npm install --save-dev gulp-minify-css -``` - -## Usage - -```js -var minifyCSS = require('gulp-minify-css'); - -gulp.task('minify-css', function() { - - gulp.src('./static/css/*.css') - .pipe(minifyCSS(opts)) - .pipe(gulp.dest('./dist/')) -}); -``` -### Options -* `keepSpecialComments` - `*` for keeping all (default), `1` for keeping first one, `0` for removing all -* `keepBreaks` - whether to keep line breaks (default is false) -* `removeEmpty` - whether to remove empty elements (default is false) -* `debug` - turns on debug mode measuring time spent on cleaning up - (run `npm run bench` to see example) -* `root` - path with which to resolve absolute `@import` rules -* `relativeTo` - path with which to resolve relative `@import` rules - -## LICENSE - -(MIT License) - -Copyright (c) 2013 Jonathan Pollack (<jonathanepollack@gmail.com>), Cloublabs Inc. - -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/node_modules/gulp-minify-css/index.js b/node_modules/gulp-minify-css/index.js deleted file mode 100644 index 2616ea1c..00000000 --- a/node_modules/gulp-minify-css/index.js +++ /dev/null @@ -1,52 +0,0 @@ -var es = require('event-stream'), - CleanCSS = require('clean-css'), - clone = require('clone'), - BufferStreams = require('bufferstreams'), - gutil = require('gulp-util'); - -// File level transform function -function minifyCSSTransform(opt) { - - // Return a callback function handling the buffered content - return function(err, buf, cb) { - - // Handle any error - if(err) cb(gutil.PluginError('minify-css', err)); - - // Use the buffered content - buf = Buffer(new CleanCSS(opt).minify(String(buf))); - - // Bring it back to streams - cb(null, buf); - }; -} - -// Plugin function -function minifyCSSGulp(opt){ - if (!opt) opt = {}; - - function modifyContents(file, cb){ - if(file.isNull()) return cb(null, file); - - if(file.isStream()) { - - file.contents = file.contents.pipe(new BufferStreams(minifyCSSTransform(opt))); - - return cb(null, file); - } - - var newFile = clone(file); - - var newContents = new CleanCSS(opt).minify(String(newFile.contents)); - newFile.contents = new Buffer(newContents); - cb(null, newFile); - } - - return es.map(modifyContents); -} - -// Export the file level transform function for other plugins usage -minifyCSSGulp.fileTransform = minifyCSSTransform; - -// Export the plugin main function -module.exports = minifyCSSGulp; diff --git a/node_modules/gulp-minify-css/node_modules/.bin/cleancss b/node_modules/gulp-minify-css/node_modules/.bin/cleancss deleted file mode 120000 index 2a3439eb..00000000 --- a/node_modules/gulp-minify-css/node_modules/.bin/cleancss +++ /dev/null @@ -1 +0,0 @@ -../clean-css/bin/cleancss \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/bufferstreams/.npmignore b/node_modules/gulp-minify-css/node_modules/bufferstreams/.npmignore deleted file mode 100755 index 31f2e87a..00000000 --- a/node_modules/gulp-minify-css/node_modules/bufferstreams/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -*~ -*.swp -node_modules/ -.git -tests/results diff --git a/node_modules/gulp-minify-css/node_modules/bufferstreams/.travis.yml b/node_modules/gulp-minify-css/node_modules/bufferstreams/.travis.yml deleted file mode 100755 index b2178387..00000000 --- a/node_modules/gulp-minify-css/node_modules/bufferstreams/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -node_js: - - 0.10 - -before_script: - - npm install --dev - -script: - - npm test diff --git a/node_modules/gulp-minify-css/node_modules/bufferstreams/LICENCE b/node_modules/gulp-minify-css/node_modules/bufferstreams/LICENCE deleted file mode 100755 index 454ab9d0..00000000 --- a/node_modules/gulp-minify-css/node_modules/bufferstreams/LICENCE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2013 Nicolas Froidure, <http://insertafter.com/> - -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/node_modules/gulp-minify-css/node_modules/bufferstreams/README.md b/node_modules/gulp-minify-css/node_modules/bufferstreams/README.md deleted file mode 100755 index 85fc9bd1..00000000 --- a/node_modules/gulp-minify-css/node_modules/bufferstreams/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# BufferStreams [![NPM version](https://badge.fury.io/js/bufferstreams.png)](https://npmjs.org/package/bufferstreams) [![Build Status](https://travis-ci.org/nfroidure/BufferStreams.png?branch=master)](https://travis-ci.org/nfroidure/BufferStreams) - -BufferStreams abstracts streams to allow you to deal with the whole contents in - a single buffer when it becomes necessary (by example: a legacy library that - do not support streams). - -It is not a good practice, just some glue. Using BufferStreams means: -* there is no library dealing with streams for your needs -* you filled an issue to the wrapped library to support streams - -## Usage -Install the [npm module](https://npmjs.org/package/bufferstreams): -```sh -npm install bufferstreams --save -``` -Then, in your scripts: -```js -var BufferStreams = require('bufferstreams'); - -Fs.createReadStream('input.txt') - .pipe(new BufferStreams(function(err, buf, cb) { - - // err will be filled with an error if the piped in stream emits one. - if(err) { - throw err; - } - - // buf will contain the whole piped in stream contents - buf = Buffer(buf.toString(utf-8).repalce('foo', 'bar')); - - // cb is a callback to pass the result back to the piped out stream - // first argument is an error that wil be emitted if one - // the second argument is the modified buffer - cb(null, buf); - - })) - .pipe(Fs.createWriteStream('output.txt')); -``` - -## Contributing -Feel free to pull your code if you agree with publishing it under the MIT license. - diff --git a/node_modules/gulp-minify-css/node_modules/bufferstreams/package.json b/node_modules/gulp-minify-css/node_modules/bufferstreams/package.json deleted file mode 100755 index fd607d19..00000000 --- a/node_modules/gulp-minify-css/node_modules/bufferstreams/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "bufferstreams", - "version": "0.0.1", - "description": "Abstract streams to deal with the whole buffered contents.", - "homepage": "https://github.com/nfroidure/BufferStreams", - "main": "src/index.js", - "scripts": { - "test": "mocha tests/*.mocha.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/nfroidure/BufferStreams" - }, - "keywords": [ - "buffer", - "streaming", - "stream", - "async", - "abstract" - ], - "devDependencies": { - "mocha": "1.x.x", - "event-stream": "1.x.x" - }, - "author": { - "name": "Nicolas Froidure", - "url": "http://www.insertafter.com/blog.html" - }, - "engines": { - "node": ">= 0.10.0" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/nfroidure/BufferStreams/blob/master/LICENSE" - } - ], - "bugs": { - "url": "https://github.com/nfroidure/BufferStreams/issues" - }, - "readme": "# BufferStreams [![NPM version](https://badge.fury.io/js/bufferstreams.png)](https://npmjs.org/package/bufferstreams) [![Build Status](https://travis-ci.org/nfroidure/BufferStreams.png?branch=master)](https://travis-ci.org/nfroidure/BufferStreams)\n\nBufferStreams abstracts streams to allow you to deal with the whole contents in\n a single buffer when it becomes necessary (by example: a legacy library that\n do not support streams).\n\nIt is not a good practice, just some glue. Using BufferStreams means:\n* there is no library dealing with streams for your needs\n* you filled an issue to the wrapped library to support streams\n\n## Usage\nInstall the [npm module](https://npmjs.org/package/bufferstreams):\n```sh\nnpm install bufferstreams --save\n```\nThen, in your scripts:\n```js\nvar BufferStreams = require('bufferstreams');\n\nFs.createReadStream('input.txt')\n .pipe(new BufferStreams(function(err, buf, cb) {\n\n // err will be filled with an error if the piped in stream emits one.\n if(err) {\n throw err;\n }\n\n // buf will contain the whole piped in stream contents\n buf = Buffer(buf.toString(utf-8).repalce('foo', 'bar'));\n\n // cb is a callback to pass the result back to the piped out stream\n // first argument is an error that wil be emitted if one\n // the second argument is the modified buffer\n cb(null, buf);\n\n }))\n .pipe(Fs.createWriteStream('output.txt'));\n```\n\n## Contributing\nFeel free to pull your code if you agree with publishing it under the MIT license.\n\n", - "readmeFilename": "README.md", - "_id": "bufferstreams@0.0.1", - "_from": "bufferstreams@0.0.1" -} diff --git a/node_modules/gulp-minify-css/node_modules/bufferstreams/src/index.js b/node_modules/gulp-minify-css/node_modules/bufferstreams/src/index.js deleted file mode 100644 index a19a0f96..00000000 --- a/node_modules/gulp-minify-css/node_modules/bufferstreams/src/index.js +++ /dev/null @@ -1,45 +0,0 @@ -var PassThrough = require('stream').PassThrough; -var util = require('util'); - -// Inherit of PassThrough stream -util.inherits(BufferStream, PassThrough); - -// Constructor -function BufferStream(cb) { - - // Ensure new were used - if (!(this instanceof BufferStream)) { - throw Error('Please use the "new" operator to instanciate a BufferStream.'); - } - - // Parent constructor - PassThrough.call(this); - - // Keep a reference to the callback - this._cb = cb; - - // Internal buffer - this._buf = Buffer(''); -} - -BufferStream.prototype._transform = function(chunk, encoding, done) { - - this._buf = Buffer.concat([this._buf, chunk], this._buf.length + chunk.length); - - done(); - -}; - -BufferStream.prototype._flush = function(done) { - var _that = this; - - this._cb(null, this._buf, function(err, buf) { - if (buf && buf.length) { - _that.push(buf); - } - done(); - }); - -}; - -module.exports = BufferStream; diff --git a/node_modules/gulp-minify-css/node_modules/bufferstreams/tests/index.mocha.js b/node_modules/gulp-minify-css/node_modules/bufferstreams/tests/index.mocha.js deleted file mode 100755 index 7b0ccc32..00000000 --- a/node_modules/gulp-minify-css/node_modules/bufferstreams/tests/index.mocha.js +++ /dev/null @@ -1,111 +0,0 @@ -var assert = require('assert') - , es = require('event-stream') - , BufferStream = require('../src') -; - -// Helpers -function syncBufferPrefixer(headerText) { - return new BufferStream(function(err, buf, cb) { - assert.equal(err, null); - if(null === buf) { - cb(null, Buffer(headerText)); - } else { - cb(null, Buffer.concat([Buffer(headerText), buf])); - } - }); -} -function asyncBufferPrefixer(headerText) { - return new BufferStream(function(err, buf, cb) { - assert.equal(err, null); - if(null === buf) { - setTimeout(function() { - cb(null, Buffer(headerText)); - }, 0); - } else { - setTimeout(function() { - cb(null, Buffer.concat([Buffer(headerText), buf])); - }, 0); - } - }); -} - -// Tests -describe('Abstract buffers', function() { - describe('synchonously', function() { - - it('should work with one pipe', function(done) { - es.readArray(['te', 'st']) - .pipe(syncBufferPrefixer('plop')) - .pipe(es.wait(function(err, data) { - assert.equal(err, null); - assert.equal(data, 'ploptest'); - done(); - })); - }); - - it('should work when returning a null buffer', function(done) { - - es.readArray(['te', 'st']) - .pipe(new BufferStream(function(err, buf, cb){ - cb(null, null); - })) - .pipe(es.wait(function(err, data) { - assert.equal(err, null); - assert.equal(data, ''); - done(); - })); - }); - - it('should work with multiple pipes', function(done) { - es.readArray(['te', 'st']) - .pipe(syncBufferPrefixer('plop')) - .pipe(syncBufferPrefixer('plip')) - .pipe(syncBufferPrefixer('plap')) - .pipe(es.wait(function(err, data) { - assert.equal(err, null); - assert.equal(data, 'plapplipploptest'); - done(); - })); - }); - - }); - - describe('asynchonously', function() { - - it('should work with one pipe', function(done) { - es.readArray(['te', 'st']) - .pipe(asyncBufferPrefixer('plop')) - .pipe(es.wait(function(err, data) { - assert.equal(err, null); - assert.equal(data, 'ploptest'); - done(); - })); - }); - - it('should work when returning a null buffer', function(done) { - - es.readArray(['te', 'st']) - .pipe(new BufferStream(function(err, buf, cb){ - cb(null, null); - })) - .pipe(es.wait(function(err, data) { - assert.equal(err, null); - assert.equal(data, ''); - done(); - })); - }); - - it('should work with multiple pipes', function(done) { - es.readArray(['te', 'st']) - .pipe(asyncBufferPrefixer('plop')) - .pipe(asyncBufferPrefixer('plip')) - .pipe(asyncBufferPrefixer('plap')) - .pipe(es.wait(function(err, data) { - assert.equal(err, null); - assert.equal(data, 'plapplipploptest'); - done(); - })); - }); - - }); -}); diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/History.md b/node_modules/gulp-minify-css/node_modules/clean-css/History.md deleted file mode 100644 index 6d649bc5..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/History.md +++ /dev/null @@ -1,379 +0,0 @@ -[2.0.8 / 2014-02-07](https://github.com/GoalSmashers/clean-css/compare/v2.0.7...v2.0.8) -================== - -* Fixed issue [#232](https://github.com/GoalSmashers/clean-css/issues/232) - edge case in non-adjacent selectors merging. - -[2.0.7 / 2014-01-16](https://github.com/GoalSmashers/clean-css/compare/v2.0.6...v2.0.7) -================== - -* Fixed issue [#208](https://github.com/GoalSmashers/clean-css/issues/208) - don't swallow @page and @viewport. - -[2.0.6 / 2014-01-04](https://github.com/GoalSmashers/clean-css/compare/v2.0.5...v2.0.6) -================== - -* Fixed issue [#198](https://github.com/GoalSmashers/clean-css/issues/198) - process comments and `@import`s correctly. -* Fixed issue [#205](https://github.com/GoalSmashers/clean-css/issues/205) - freeze on broken @import declaration. - -[2.0.5 / 2014-01-03](https://github.com/GoalSmashers/clean-css/compare/v2.0.4...v2.0.5) -================== - -* Fixed issue [#199](https://github.com/GoalSmashers/clean-css/issues/199) - keep line breaks with no advanced optimizations. -* Fixed issue [#203](https://github.com/GoalSmashers/clean-css/issues/203) - Buffer as a first argument to minify method. - -[2.0.4 / 2013-12-19](https://github.com/GoalSmashers/clean-css/compare/v2.0.3...v2.0.4) -================== - -* Fixed issue [#193](https://github.com/GoalSmashers/clean-css/issues/193) - HSL color space normalization. - -[2.0.3 / 2013-12-18](https://github.com/GoalSmashers/clean-css/compare/v2.0.2...v2.0.3) -================== - -* Fixed issue [#191](https://github.com/GoalSmashers/clean-css/issues/191) - leading numbers in font/animation names. -* Fixed issue [#192](https://github.com/GoalSmashers/clean-css/issues/192) - many `@import`s inside a comment. - -[2.0.2 / 2013-11-18](https://github.com/GoalSmashers/clean-css/compare/v2.0.1...v2.0.2) -================== - -* Fixed issue [#177](https://github.com/GoalSmashers/clean-css/issues/177) - process broken content correctly. - -[2.0.1 / 2013-11-14](https://github.com/GoalSmashers/clean-css/compare/v2.0.0...v2.0.1) -================== - -* Fixed issue [#176](https://github.com/GoalSmashers/clean-css/issues/176) - hangs on `undefined` keyword. - -[2.0.0 / 2013-11-04](https://github.com/GoalSmashers/clean-css/compare/v1.1.7...v2.0.0) -================== - -* Adds simplified and more advanced text escaping / restoring via `EscapeStore` class. -* Adds simplified and much faster empty elements removal. -* Adds missing `@import` processing to our benchmark (run via `npm run bench`). -* Adds CSS tokenizer which will make it possible to optimize content by reordering and/or merging selectors. -* Adds basic optimizer removing duplicate selectors from a list. -* Adds merging duplicate properties within a single selector's body. -* Adds merging adjacent selectors within a scope (single and multiple ones). -* Changes behavior of `--keep-line-breaks`/`keepBreaks` option to keep breaks after trailing braces only. -* Makes all multiple selectors ordered alphabetically (aids merging). -* Adds property overriding so more coarse properties override more granular ones. -* Adds reducing non-adjacent selectors. -* Adds `--skip-advanced`/`noAdvanced` switch to disable advanced optimizations. -* Adds reducing non-adjacent selectors when overridden by more complex selectors. -* Fixed issue [#138](https://github.com/GoalSmashers/clean-css/issues/138) - makes CleanCSS interface OO. -* Fixed issue [#139](https://github.com/GoalSmashers/clean-css/issues/138) - consistent error & warning handling. -* Fixed issue [#145](https://github.com/GoalSmashers/clean-css/issues/145) - debug mode in library too. -* Fixed issue [#157](https://github.com/GoalSmashers/clean-css/issues/157) - gets rid of `removeEmpty` option. -* Fixed issue [#159](https://github.com/GoalSmashers/clean-css/issues/159) - escaped quotes inside content. -* Fixed issue [#162](https://github.com/GoalSmashers/clean-css/issues/162) - strip quotes from Base64 encoded URLs. -* Fixed issue [#166](https://github.com/GoalSmashers/clean-css/issues/166) - `debug` formatting in CLI -* Fixed issue [#167](https://github.com/GoalSmashers/clean-css/issues/167) - `background:transparent` minification. - -[1.1.7 / 2013-10-28](https://github.com/GoalSmashers/clean-css/compare/v1.1.6...v1.1.7) -================== - -* Fixed issue [#156](https://github.com/GoalSmashers/clean-css/issues/156) - `@import`s inside comments. - -[1.1.6 / 2013-10-26](https://github.com/GoalSmashers/clean-css/compare/v1.1.5...v1.1.6) -================== - -* Fixed issue [#155](https://github.com/GoalSmashers/clean-css/issues/155) - broken irregular CSS content. - -[1.1.5 / 2013-10-24](https://github.com/GoalSmashers/clean-css/compare/v1.1.4...v1.1.5) -================== - -* Fixed issue [#153](https://github.com/GoalSmashers/clean-css/issues/153) - keepSpecialComments 0/1 as a string. - -[1.1.4 / 2013-10-23](https://github.com/GoalSmashers/clean-css/compare/v1.1.3...v1.1.4) -================== - -* Fixed issue [#152](https://github.com/GoalSmashers/clean-css/issues/152) - adds an option to disable rebasing. - -[1.1.3 / 2013-10-04](https://github.com/GoalSmashers/clean-css/compare/v1.1.2...v1.1.3) -================== - -* Fixed issue [#150](https://github.com/GoalSmashers/clean-css/issues/150) - minifying `background:none`. - -[1.1.2 / 2013-09-29](https://github.com/GoalSmashers/clean-css/compare/v1.1.1...v1.1.2) -================== - -* Fixed issue [#149](https://github.com/GoalSmashers/clean-css/issues/149) - shorthand font property. - -[1.1.1 / 2013-09-07](https://github.com/GoalSmashers/clean-css/compare/v1.1.0...v1.1.1) -================== - -* Fixed issue [#144](https://github.com/GoalSmashers/clean-css/issues/144) - skip URLs rebasing by default. - -[1.1.0 / 2013-09-06](https://github.com/GoalSmashers/clean-css/compare/v1.0.12...v1.1.0) -================== - -* Renamed lib's `debug` option to `benchmark` when doing per-minification benchmarking. -* Added simplified comments processing & imports. -* Fixed issue [#43](https://github.com/GoalSmashers/clean-css/issues/43) - `--debug` switch for minification stats. -* Fixed issue [#65](https://github.com/GoalSmashers/clean-css/issues/65) - full color name / hex shortening. -* Fixed issue [#84](https://github.com/GoalSmashers/clean-css/issues/84) - support for `@import` with media queries. -* Fixed issue [#124](https://github.com/GoalSmashers/clean-css/issues/124) - raise error on broken imports. -* Fixed issue [#126](https://github.com/GoalSmashers/clean-css/issues/126) - proper CSS expressions handling. -* Fixed issue [#129](https://github.com/GoalSmashers/clean-css/issues/129) - rebasing imported URLs. -* Fixed issue [#130](https://github.com/GoalSmashers/clean-css/issues/130) - better code modularity. -* Fixed issue [#135](https://github.com/GoalSmashers/clean-css/issues/135) - require node.js 0.8+. - -[1.0.12 / 2013-07-19](https://github.com/GoalSmashers/clean-css/compare/v1.0.11...v1.0.12) -=================== - -* Fixed issue [#121](https://github.com/GoalSmashers/clean-css/issues/121) - ability to skip `@import` processing. - -[1.0.11 / 2013-07-08](https://github.com/GoalSmashers/clean-css/compare/v1.0.10...v1.0.11) -=================== - -* Fixed issue [#117](https://github.com/GoalSmashers/clean-css/issues/117) - line break escaping in comments. - -[1.0.10 / 2013-06-13](https://github.com/GoalSmashers/clean-css/compare/v1.0.9...v1.0.10) -=================== - -* Fixed issue [#114](https://github.com/GoalSmashers/clean-css/issues/114) - comments in imported stylesheets. - -[1.0.9 / 2013-06-11](https://github.com/GoalSmashers/clean-css/compare/v1.0.8...v1.0.9) -================== - -* Fixed issue [#113](https://github.com/GoalSmashers/clean-css/issues/113) - `@import` in comments. - -[1.0.8 / 2013-06-10](https://github.com/GoalSmashers/clean-css/compare/v1.0.7...v1.0.8) -================== - -* Fixed issue [#112](https://github.com/GoalSmashers/clean-css/issues/112) - reducing `box-shadow` zeros. - -[1.0.7 / 2013-06-05](https://github.com/GoalSmashers/clean-css/compare/v1.0.6...v1.0.7) -================== - -* Support for `@import` URLs starting with `//`. - By [@petetak](https://github.com/petetak). - -[1.0.6 / 2013-06-04](https://github.com/GoalSmashers/clean-css/compare/v1.0.5...v1.0.6) -================== - -* Fixed issue [#110](https://github.com/GoalSmashers/clean-css/issues/110) - data URIs in URLs. - -[1.0.5 / 2013-05-26](https://github.com/GoalSmashers/clean-css/compare/v1.0.4...v1.0.5) -================== - -* Fixed issue [#107](https://github.com/GoalSmashers/clean-css/issues/107) - data URIs in imported stylesheets. - -1.0.4 / 2013-05-23 -================== - -* Rewrite relative URLs in imported stylesheets. - By [@bluej100](https://github.com/bluej100). - -1.0.3 / 2013-05-20 -================== - -* Support alternative `@import` syntax with file name not wrapped inside `url()` statement. - By [@bluej100](https://github.com/bluej100). - -1.0.2 / 2013-04-29 -================== - -* Fixed issue [#97](https://github.com/GoalSmashers/clean-css/issues/97) - `--remove-empty` & FontAwesome. - -1.0.1 / 2013-04-08 -================== - -* Do not pick up `bench` and `test` while building `npm` package. - By [@sindresorhus](https://https://github.com/sindresorhus). - -1.0.0 / 2013-03-30 -================== - -* Fixed issue [#2](https://github.com/GoalSmashers/clean-css/issues/2) - resolving `@import` rules. -* Fixed issue [#44](https://github.com/GoalSmashers/clean-css/issues/44) - examples in `--help`. -* Fixed issue [#46](https://github.com/GoalSmashers/clean-css/issues/46) - preserving special characters in URLs and attributes. -* Fixed issue [#80](https://github.com/GoalSmashers/clean-css/issues/80) - quotation in multi line strings. -* Fixed issue [#83](https://github.com/GoalSmashers/clean-css/issues/83) - HSL to hex color conversions. -* Fixed issue [#86](https://github.com/GoalSmashers/clean-css/issues/86) - broken `@charset` replacing. -* Fixed issue [#88](https://github.com/GoalSmashers/clean-css/issues/88) - removes space in `! important`. -* Fixed issue [#92](https://github.com/GoalSmashers/clean-css/issues/92) - uppercase hex to short versions. - -0.10.2 / 2013-03-19 -=================== - -* Fixed issue [#79](https://github.com/GoalSmashers/clean-css/issues/79) - node.js 0.10.x compatibility. - -0.10.1 / 2013-02-14 -=================== - -* Fixed issue [#66](https://github.com/GoalSmashers/clean-css/issues/66) - line breaks without extra spaces should - be handled correctly. - -0.10.0 / 2013-02-09 -=================== - -* Switched from [optimist](https://github.com/substack/node-optimist) to - [commander](https://github.com/visionmedia/commander.js) for CLI processing. -* Changed long options from `--removeempty` to `--remove-empty` and from `--keeplinebreaks` to `--keep-line-breaks`. -* Fixed performance issue with replacing multiple `@charset` declarations and issue - with line break after `@charset` when using `keepLineBreaks` option. By [@rrjaime](https://github.com/rrjamie). -* Removed Makefile in favor to `npm run` commands (e.g. `make check` -> `npm run check`). -* Fixed issue [#47](https://github.com/GoalSmashers/clean-css/issues/47) - commandline issues on Windows. -* Fixed issue [#49](https://github.com/GoalSmashers/clean-css/issues/49) - remove empty selectors from media query. -* Fixed issue [#52](https://github.com/GoalSmashers/clean-css/issues/52) - strip fraction zeros if not needed. -* Fixed issue [#58](https://github.com/GoalSmashers/clean-css/issues/58) - remove colon where possible. -* Fixed issue [#59](https://github.com/GoalSmashers/clean-css/issues/59) - content property handling. - -0.9.1 / 2012-12-19 -================== - -* Fixed issue [#37](https://github.com/GoalSmashers/clean-css/issues/37) - converting - `white` and other colors in class names (reported by [@malgorithms](https://github.com/malgorithms)). - -0.9.0 / 2012-12-15 -================== - -* Added stripping quotation from font names (if possible). -* Added stripping quotation from `@keyframes` declaration, `animation` and - `animation-name` property. -* Added stripping quotations from attributes' value (e.g. `[data-target='x']`). -* Added better hex->name and name->hex color shortening. -* Added `font: normal` and `font: bold` shortening the same way as `font-weight` is. -* Refactored shorthand selectors and added `border-radius`, `border-style` - and `border-color` shortening. -* Added `margin`, `padding` and `border-width` shortening. -* Added removing line break after commas. -* Fixed removing whitespace inside media query definition. -* Added removing line breaks after a comma, so all declarations are one-liners now. -* Speed optimizations (~10% despite many new features). -* Added [JSHint](https://github.com/jshint/jshint/) validation rules via `make check`. - -0.8.3 / 2012-11-29 -================== - -* Fixed HSL/HSLA colors processing. - -0.8.2 / 2012-10-31 -================== - -* Fixed shortening hex colors and their relation to hashes in URLs. -* Cleanup by [@XhmikosR](https://github.com/XhmikosR). - -0.8.1 / 2012-10-28 -================== - -* Added better zeros processing for `rect(...)` syntax (clip property). - -0.8.0 / 2012-10-21 -================== - -* Added removing URLs quotation if possible. -* Rewrote breaks processing. -* Added `keepBreaks`/`-b` option to keep line breaks in the minimized file. -* Reformatted [lib/clean.js](/lib/clean.js) so it's easier to follow the rules. -* Minimized test data is now minimized with line breaks so it's easier to - compare the changes line by line. - -0.7.0 / 2012-10-14 -================== - -* Added stripping special comments to CLI (`--s0` and `--s1` options). -* Added stripping special comments to programmatic interface - (`keepSpecialComments` option). - -0.6.0 / 2012-08-05 -================== - -* Full Windows support with tests (./test.bat). - -0.5.0 / 2012-08-02 -================== - -* Made path to vows local. -* Explicit node.js 0.6 requirement. - -0.4.2 / 2012-06-28 -================== - -* Updated binary `-v` option (version). -* Updated binary to output help when no options given (but not in piped mode). -* Added binary tests. - -0.4.1 / 2012-06-10 -================== - -* Fixed stateless mode where calling `CleanCSS#process` directly was giving - errors (reported by [@facelessuser](https://github.com/facelessuser)). - -0.4.0 / 2012-06-04 -================== - -* Speed improvements up to 4x thanks to the rewrite of comments and CSS' content - processing. -* Stripping empty CSS tags is now optional (see [bin/cleancss](/bin/cleancss) for details). -* Improved debugging mode (see [test/bench.js](/test/bench.js)) -* Added `make bench` for a one-pass benchmark. - -0.3.3 / 2012-05-27 -================== - -* Fixed tests, [package.json](/package.json) for development, and regex - for removing empty declarations (thanks to [@vvo](https://github.com/vvo)). - -0.3.2 / 2012-01-17 -================== - -* Fixed output method under node.js 0.6 which incorrectly tried to close - `process.stdout`. - -0.3.1 / 2011-12-16 -================== - -* Fixed cleaning up `0 0 0 0` expressions. - -0.3.0 / 2011-11-29 -================== - -* Clean-css requires node.js 0.4.0+ to run. -* Removed node.js's 0.2.x 'sys' package dependency - (thanks to [@jmalonzo](https://github.com/jmalonzo) for a patch). - -0.2.6 / 2011-11-27 -================== - -* Fixed expanding `+` signs in `calc()` when mixed up with adjacent `+` selector. - -0.2.5 / 2011-11-27 -================== - -* Fixed issue with cleaning up spaces inside `calc`/`-moz-calc` declarations - (thanks to [@cvan](https://github.com/cvan) for reporting it). -* Fixed converting `#f00` to `red` in borders and gradients. - -0.2.4 / 2011-05-25 -================== - -* Fixed problem with expanding `none` to `0` in partial/full background - declarations. -* Fixed including clean-css library from binary (global to local). - -0.2.3 / 2011-04-18 -================== - -* Fixed problem with optimizing IE filters. - -0.2.2 / 2011-04-17 -================== - -* Fixed problem with space before color in `border` property. - -0.2.1 / 2011-03-19 -================== - -* Added stripping space before `!important` keyword. -* Updated repository location and author information in [package.json](/package.json). - -0.2.0 / 2011-03-02 -================== - -* Added options parsing via optimist. -* Changed code inclusion (thus the version bump). - -0.1.0 / 2011-02-27 -================== - -* First version of clean-css library. -* Implemented all basic CSS transformations. diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/LICENSE b/node_modules/gulp-minify-css/node_modules/clean-css/LICENSE deleted file mode 100644 index 1509aa3d..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2011-2013 GoalSmashers.com - -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/node_modules/gulp-minify-css/node_modules/clean-css/README.md b/node_modules/gulp-minify-css/node_modules/clean-css/README.md deleted file mode 100644 index 8b28e5c3..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/README.md +++ /dev/null @@ -1,187 +0,0 @@ -[![NPM version](https://badge.fury.io/js/clean-css.png)](https://badge.fury.io/js/clean-css) -[![Build Status](https://secure.travis-ci.org/GoalSmashers/clean-css.png)](https://travis-ci.org/GoalSmashers/clean-css) -[![Dependency Status](https://david-dm.org/GoalSmashers/clean-css.png)](https://david-dm.org/GoalSmashers/clean-css) -[![devDependency Status](https://david-dm.org/GoalSmashers/clean-css/dev-status.png)](https://david-dm.org/GoalSmashers/clean-css#info=devDependencies) - -## What is clean-css? - -Clean-css is a fast and efficient [node.js](http://nodejs.org/) library for minifying CSS files. - -According to [tests](https://github.com/GoalSmashers/css-minification-benchmark) it is one of the best available. - - -## Usage - -### What are the requirements? - -``` -node.js 0.8.0+ (tested on CentOS, Ubuntu, OS X 10.6+, and Windows 7+) -``` - -### How to install clean-css? - -``` -npm install clean-css -``` - -### How to upgrade clean-css from 1.x to 2.x? - -#### Command-line interface (CLI) - -``` -npm update clean-css -``` - -or point `package.json` to version 2.x. That's it! - -#### Node.js module - -Update `clean-css` as for CLI above. -Then change your JavaScript code from: - -```js -var minimized = CleanCSS.process(source, options); -``` - -into - -```js -var minimized = new CleanCSS(options).minify(source); -``` - -And you are done. - -### How to use clean-css CLI? - -Clean-css accepts the following command line arguments (please make sure -you use `<source-file>` as the very last argument to avoid potential issues): - -``` -cleancss [options] <source-file> - --h, --help Output usage information --v, --version Output the version number --b, --keep-line-breaks Keep line breaks ---s0 Remove all special comments, i.e. /*! comment */ ---s1 Remove all special comments but the first one --r, --root [root-path] A root path to which resolve absolute @import rules - and rebase relative URLs --o, --output [output-file] Use [output-file] as output instead of STDOUT --s, --skip-import Disable @import processing ---skip-rebase Disable URLs rebasing ---skip-advanced Disable advanced optimizations - selector & property merging, - reduction, etc. ---selectors-merge-mode [ie8|*] Use `ie8` for compatibility mode, `*` for merge all (default) --d, --debug Shows debug information (minification time & compression efficiency) -``` - -#### Examples: - -To minify a **public.css** file into **public-min.css** do: - -``` -cleancss -o public-min.css public.css -``` - -To minify the same **public.css** into the standard output skip the `-o` parameter: - -``` -cleancss public.css -``` - -More likely you would like to concatenate a couple of files. -If you are on a Unix-like system: - -```bash -cat one.css two.css three.css | cleancss -o merged-and-minified.css -``` - -On Windows: - -```bat -type one.css two.css three.css | cleancss -o merged-and-minified.css -``` - -Or even gzip the result at once: - -```bash -cat one.css two.css three.css | cleancss | gzip -9 -c > merged-minified-and-gzipped.css.gz -``` - -### How to use clean-css programmatically? - -```js -var CleanCSS = require('clean-css'); -var source = 'a{font-weight:bold;}'; -var minimized = new CleanCSS().minify(source); -``` - -CleanCSS constructor accepts a hash as a parameter, i.e., -`new CleanCSS(options).minify(source)` with the following options available: - -* `keepSpecialComments` - `*` for keeping all (default), `1` for keeping first one only, `0` for removing all -* `keepBreaks` - whether to keep line breaks (default is false) -* `benchmark` - turns on benchmarking mode measuring time spent on cleaning up - (run `npm run bench` to see example) -* `root` - path to resolve absolute `@import` rules and rebase relative URLs -* `relativeTo` - path with which to resolve relative `@import` rules and URLs -* `processImport` - whether to process `@import` rules -* `noRebase` - whether to skip URLs rebasing -* `noAdvanced` - set to true to disable advanced optimizations - selector & property merging, reduction, etc. -* `selectorsMergeMode` - `ie8` for IE8 compatibility mode, `*` for merging all (default) -* `debug` - set to true to get minification statistics under `stats` property (see `test/custom-test.js` for examples) - -### What are the clean-css' dev commands? - -First clone the source, then run: - -* `npm run bench` for clean-css benchmarks (see [test/bench.js](https://github.com/GoalSmashers/clean-css/blob/master/test/bench.js) for details) -* `npm run check` to check JS sources with [JSHint](https://github.com/jshint/jshint/) -* `npm test` for the test suite - -## Tips & Tricks - -### How to preserve a comment block? - -Use the `/*!` notation instead of the standard one `/*`: - -```css -/*! - Important comments included in minified output. -*/ -``` - -### How to rebase relative image URLs - -Clean-css will handle it automatically for you (since version 1.1) in the following cases: - -* When using the CLI: - 1. Use an output path via `-o`/`--output` to rebase URLs as relative to the output file. - 2. Use a root path via `-r`/`--root` to rebase URLs as absolute from the given root path. - 3. If you specify both then `-r`/`--root` takes precendence. -* When using clean-css as a library: - 1. Use a combination of `relativeTo` and `target` options for relative rebase (same as 1 in CLI). - 2. Use a combination of `relativeTo` and `root` options for absolute rebase (same as 2 in CLI). - 3. `root` takes precendence over `target` as in CLI. - -## Acknowledgments - -* Vincent Voyer ([@vvo](https://github.com/vvo)) for a patch with better - empty element regex and for inspiring us to do many performance improvements - in 0.4 release. -* Isaac ([@facelessuser](https://github.com/facelessuser)) for pointing out - a flaw in clean-css' stateless mode. -* Jan Michael Alonzo ([@jmalonzo](https://github.com/jmalonzo)) for a patch - removing node.js' old `sys` package. -* [@XhmikosR](https://github.com/XhmikosR) for suggesting new features - (option to remove special comments and strip out URLs quotation) and - pointing out numerous improvements (JSHint, media queries). -* Anthony Barre ([@abarre](https://github.com/abarre)) for improvements to - `@import` processing, namely introducing the `--skip-import` / - `processImport` options. -* Simon Altschuler ([@altschuler](https://github.com/altschuler)) for fixing - `@import` processing inside comments. - -## License - -Clean-css is released under the [MIT License](https://github.com/GoalSmashers/clean-css/blob/master/LICENSE). diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/bin/cleancss b/node_modules/gulp-minify-css/node_modules/clean-css/bin/cleancss deleted file mode 100755 index e73ebd56..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/bin/cleancss +++ /dev/null @@ -1,138 +0,0 @@ -#!/usr/bin/env node - -var util = require('util'); -var fs = require('fs'); -var path = require('path'); -var CleanCSS = require('../index'); - -var commands = require('commander'); - -var packageConfig = fs.readFileSync(path.join(path.dirname(fs.realpathSync(process.argv[1])), '../package.json')); -var buildVersion = JSON.parse(packageConfig).version; - -var isWindows = process.platform == 'win32'; - -// Specify commander options to parse command line params correctly -commands - .version(buildVersion, '-v, --version') - .usage('[options] <source-file>') - .option('-b, --keep-line-breaks', 'Keep line breaks') - .option('--s0', 'Remove all special comments, i.e. /*! comment */') - .option('--s1', 'Remove all special comments but the first one') - .option('-r, --root [root-path]', 'Set a root path to which resolve absolute @import rules') - .option('-o, --output [output-file]', 'Use [output-file] as output instead of STDOUT') - .option('-s, --skip-import', 'Disable @import processing') - .option('--skip-rebase', 'Disable URLs rebasing') - .option('--skip-advanced', 'Disable advanced optimizations - selector & property merging, reduction, etc.') - .option('--selectors-merge-mode [ie8|*]', 'Use `ie8` for compatibility mode, `*` for merge all (default).') - .option('-d, --debug', 'Shows debug information (minification time & compression efficiency)'); - -commands.on('--help', function() { - util.puts(' Examples:\n'); - util.puts(' %> cleancss one.css'); - util.puts(' %> cleancss -o one-min.css one.css'); - if (isWindows) { - util.puts(' %> type one.css two.css three.css | cleancss -o merged-and-minified.css'); - } else { - util.puts(' %> cat one.css two.css three.css | cleancss -o merged-and-minified.css'); - util.puts(' %> cat one.css two.css three.css | cleancss | gzip -9 -c > merged-minified-and-gzipped.css.gz'); - } - util.puts(''); - process.exit(); -}); - -commands.parse(process.argv); - -var options = { - source: null, - target: null -}; -var cleanOptions = {}; -var fromStdin = !process.env['__DIRECT__'] && !process.stdin.isTTY; - -// If no sensible data passed in just print help and exit -if (!fromStdin && commands.args.length == 0) { - commands.outputHelp(); - return 0; -} - -// Now coerce commands into CleanCSS configuration... -if (commands.output) - cleanOptions.target = options.target = commands.output; -if (commands.keepLineBreaks) - cleanOptions.keepBreaks = true; -if (commands.s1) - cleanOptions.keepSpecialComments = 1; -if (commands.s0) - cleanOptions.keepSpecialComments = 0; -if (commands.root) - cleanOptions.root = commands.root; -if (commands.skipImport) - cleanOptions.processImport = false; -if (commands.skipRebase) - cleanOptions.noRebase = true; -if (commands.skipAdvanced) - cleanOptions.noAdvanced = true; -if (commands.selectorsMergeMode) - cleanOptions.selectorsMergeMode = commands.selectorsMergeMode; -if (commands.debug) - cleanOptions.debug = true; -if (commands.args.length > 0) { - var source = commands.args[0]; - options.source = source; - cleanOptions.relativeTo = path.dirname(path.resolve(source)); -} - -// ... and do the magic! -if (options.source) { - fs.readFile(options.source, 'utf8', function(error, data) { - if (error) - throw error; - output(minify(data)); - }); -} else { - var stdin = process.openStdin(); - stdin.setEncoding('utf-8'); - var data = ''; - stdin.on('data', function(chunk) { - data += chunk; - }); - stdin.on('end', function() { - output(minify(data)); - }); -} - -function minify(data) { - var minifier = new CleanCSS(cleanOptions); - var minified = minifier.minify(data); - - if (cleanOptions.debug) { - console.error('Original: %d bytes', minifier.stats.originalSize); - console.error('Minified: %d bytes', minifier.stats.minifiedSize); - console.error('Efficiency: %d%', ~~(minifier.stats.efficiency * 10000) / 100.0); - console.error('Time spent: %dms', minifier.stats.timeSpent); - } - - outputFeedback(minifier.errors, true); - outputFeedback(minifier.warnings); - - if (minifier.errors.length > 0) - process.exit(1); - - return minified; -} - -function output(minified) { - if (options.target) - fs.writeFileSync(options.target, minified, 'utf8'); - else - process.stdout.write(minified); -}; - -function outputFeedback(messages, isError) { - var prefix = isError ? '\x1B[31mERROR\x1B[39m:' : 'WARNING:'; - - messages.forEach(function(message) { - console.error('%s %s', prefix, message); - }); -}; diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/index.js b/node_modules/gulp-minify-css/node_modules/clean-css/index.js deleted file mode 100644 index d7b05030..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/clean'); diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/lib/clean.js b/node_modules/gulp-minify-css/node_modules/clean-css/lib/clean.js deleted file mode 100644 index 3d999301..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/lib/clean.js +++ /dev/null @@ -1,329 +0,0 @@ -/** - * Clean-css - https://github.com/GoalSmashers/clean-css - * Released under the terms of MIT license - * - * Copyright (C) 2011-2013 GoalSmashers.com - */ - -var ColorShortener = require('./colors/shortener'); -var ColorHSLToHex = require('./colors/hsl-to-hex'); -var ColorRGBToHex = require('./colors/rgb-to-hex'); -var ColorLongToShortHex = require('./colors/long-to-short-hex'); - -var ShorthandNotations = require('./properties/shorthand-notations'); -var ImportInliner = require('./imports/inliner'); -var UrlRebase = require('./images/url-rebase'); -var EmptyRemoval = require('./selectors/empty-removal'); - -var CommentsProcessor = require('./text/comments'); -var ExpressionsProcessor = require('./text/expressions'); -var FreeTextProcessor = require('./text/free'); -var UrlsProcessor = require('./text/urls'); - -var SelectorsOptimizer = require('./selectors/optimizer'); - -module.exports = function(options) { - var lineBreak = process.platform == 'win32' ? '\r\n' : '\n'; - var stats = {}; - var context = { - errors: [], - warnings: [] - }; - - options = options || {}; - options.keepBreaks = options.keepBreaks || false; - - //active by default - if (options.processImport === undefined) - options.processImport = true; - - var minify = function(data) { - if (Buffer.isBuffer(data)) - data = data.toString(); - - var startedAt; - if (options.debug) { - startedAt = process.hrtime(); - stats.originalSize = data.length; - } - - var replace = function() { - if (typeof arguments[0] == 'function') - arguments[0](); - else - data = data.replace.apply(data, arguments); - }; - - // replace function - if (options.benchmark) { - var originalReplace = replace; - replace = function(pattern, replacement) { - var name = typeof pattern == 'function' ? - /function (\w+)\(/.exec(pattern.toString())[1] : - pattern; - - var start = process.hrtime(); - originalReplace(pattern, replacement); - - var itTook = process.hrtime(start); - console.log('%d ms: ' + name, 1000 * itTook[0] + itTook[1] / 1000000.0); - }; - } - - var commentsProcessor = new CommentsProcessor( - 'keepSpecialComments' in options ? options.keepSpecialComments : '*', - options.keepBreaks, - lineBreak - ); - var expressionsProcessor = new ExpressionsProcessor(); - var freeTextProcessor = new FreeTextProcessor(); - var urlsProcessor = new UrlsProcessor(); - var importInliner = new ImportInliner(context); - - if (options.processImport) { - // inline all imports - replace(function inlineImports() { - data = importInliner.process(data, { - root: options.root || process.cwd(), - relativeTo: options.relativeTo - }); - }); - } - - replace(function escapeComments() { - data = commentsProcessor.escape(data); - }); - - // replace all escaped line breaks - replace(/\\(\r\n|\n)/mg, ''); - - // strip parentheses in urls if possible (no spaces inside) - replace(/url\((['"])([^\)]+)['"]\)/g, function(match, quote, url) { - var unsafeDataURI = url.indexOf('data:') === 0 && url.match(/data:\w+\/[^;]+;base64,/) === null; - if (url.match(/[ \t]/g) !== null || unsafeDataURI) - return 'url(' + quote + url + quote + ')'; - else - return 'url(' + url + ')'; - }); - - // strip parentheses in animation & font names - replace(/(animation|animation\-name|font|font\-family):([^;}]+)/g, function(match, propertyName, def) { - return propertyName + ':' + def.replace(/['"]([a-zA-Z][a-zA-Z\d\-_]+)['"]/g, '$1'); - }); - - // strip parentheses in @keyframes - replace(/@(\-moz\-|\-o\-|\-webkit\-)?keyframes ([^{]+)/g, function(match, prefix, name) { - prefix = prefix || ''; - return '@' + prefix + 'keyframes ' + (name.indexOf(' ') > -1 ? name : name.replace(/['"]/g, '')); - }); - - // IE shorter filters, but only if single (IE 7 issue) - replace(/progid:DXImageTransform\.Microsoft\.(Alpha|Chroma)(\([^\)]+\))([;}'"])/g, function(match, filter, args, suffix) { - return filter.toLowerCase() + args + suffix; - }); - - replace(function escapeExpressions() { - data = expressionsProcessor.escape(data); - }); - - // strip parentheses in attribute values - replace(/\[([^\]]+)\]/g, function(match, content) { - var eqIndex = content.indexOf('='); - var singleQuoteIndex = content.indexOf('\''); - var doubleQuoteIndex = content.indexOf('"'); - if (eqIndex < 0 && singleQuoteIndex < 0 && doubleQuoteIndex < 0) - return match; - if (singleQuoteIndex === 0 || doubleQuoteIndex === 0) - return match; - - var key = content.substring(0, eqIndex); - var value = content.substring(eqIndex + 1, content.length); - - if (/^['"](?:[a-zA-Z][a-zA-Z\d\-_]+)['"]$/.test(value)) - return '[' + key + '=' + value.substring(1, value.length - 1) + ']'; - else - return match; - }); - - replace(function escapeFreeText() { - data = freeTextProcessor.escape(data); - }); - - replace(function escapeUrls() { - data = urlsProcessor.escape(data); - }); - - // line breaks - replace(/[\r]?\n/g, ' '); - - // multiple whitespace - replace(/[\t ]+/g, ' '); - - // multiple semicolons (with optional whitespace) - replace(/;[ ]?;+/g, ';'); - - // multiple line breaks to one - replace(/ (?:\r\n|\n)/g, lineBreak); - replace(/(?:\r\n|\n)+/g, lineBreak); - - // remove spaces around selectors - replace(/ ([+~>]) /g, '$1'); - - // remove extra spaces inside content - replace(/([!\(\{\}:;=,\n]) /g, '$1'); - replace(/ ([!\)\{\};=,\n])/g, '$1'); - replace(/(?:\r\n|\n)\}/g, '}'); - replace(/([\{;,])(?:\r\n|\n)/g, '$1'); - replace(/ :([^\{\};]+)([;}])/g, ':$1$2'); - - // restore spaces inside IE filters (IE 7 issue) - replace(/progid:[^(]+\(([^\)]+)/g, function(match) { - return match.replace(/,/g, ', '); - }); - - // trailing semicolons - replace(/;\}/g, '}'); - - replace(function hsl2Hex() { - data = new ColorHSLToHex(data).process(); - }); - - replace(function rgb2Hex() { - data = new ColorRGBToHex(data).process(); - }); - - replace(function longToShortHex() { - data = new ColorLongToShortHex(data).process(); - }); - - replace(function shortenColors() { - data = new ColorShortener(data).process(); - }); - - // replace font weight with numerical value - replace(/(font\-weight|font):(normal|bold)([ ;\}!])(\w*)/g, function(match, property, weight, suffix, next) { - if (suffix == ' ' && next.length > 0 && !/[.\d]/.test(next)) - return match; - - if (weight == 'normal') - return property + ':400' + suffix + next; - else if (weight == 'bold') - return property + ':700' + suffix + next; - else - return match; - }); - - // zero + unit to zero - replace(/(\s|:|,)0(?:px|em|ex|cm|mm|in|pt|pc|%)/g, '$1' + '0'); - replace(/rect\(0(?:px|em|ex|cm|mm|in|pt|pc|%)/g, 'rect(0'); - - // fraction zeros removal - replace(/\.([1-9]*)0+(\D)/g, function(match, nonZeroPart, suffix) { - return (nonZeroPart ? '.' : '') + nonZeroPart + suffix; - }); - - // restore 0% in hsl/hsla - replace(/(hsl|hsla)\(([^\)]+)\)/g, function(match, colorFunction, colorDef) { - var tokens = colorDef.split(','); - if (tokens[1] == '0') - tokens[1] = '0%'; - if (tokens[2] == '0') - tokens[2] = '0%'; - return colorFunction + '(' + tokens.join(',') + ')'; - }); - - // none to 0 - replace(/(border|border-top|border-right|border-bottom|border-left|outline):none/g, '$1:0'); - - // background:none to background:0 0 - replace(/background:(?:none|transparent)([;}])/g, 'background:0 0$1'); - - // multiple zeros into one - replace(/box-shadow:0 0 0 0([^\.])/g, 'box-shadow:0 0$1'); - replace(/:0 0 0 0([^\.])/g, ':0$1'); - replace(/([: ,=\-])0\.(\d)/g, '$1.$2'); - - replace(function shorthandNotations() { - data = new ShorthandNotations(data).process(); - }); - - // restore rect(...) zeros syntax for 4 zeros - replace(/rect\(\s?0(\s|,)0[ ,]0[ ,]0\s?\)/g, 'rect(0$10$10$10)'); - - // remove universal selector when not needed (*#id, *.class etc) - replace(/\*([\.#:\[])/g, '$1'); - - // Restore spaces inside calc back - replace(/calc\([^\}]+\}/g, function(match) { - return match.replace(/\+/g, ' + '); - }); - - if (options.noAdvanced) { - if (options.keepBreaks) - replace(/\}/g, '}' + lineBreak); - } else { - replace(function optimizeSelectors() { - data = new SelectorsOptimizer(data, context, { - keepBreaks: options.keepBreaks, - lineBreak: lineBreak, - selectorsMergeMode: options.selectorsMergeMode - }).process(); - }); - } - - replace(function restoreUrls() { - data = urlsProcessor.restore(data); - }); - replace(function rebaseUrls() { - data = options.noRebase ? data : new UrlRebase(options, context).process(data); - }); - replace(function restoreFreeText() { - data = freeTextProcessor.restore(data); - }); - replace(function restoreComments() { - data = commentsProcessor.restore(data); - }); - replace(function restoreExpressions() { - data = expressionsProcessor.restore(data); - }); - - // move first charset to the beginning - replace(function moveCharset() { - // get first charset in stylesheet - var match = data.match(/@charset [^;]+;/); - var firstCharset = match ? match[0] : null; - if (!firstCharset) - return; - - // reattach first charset and remove all subsequent - data = firstCharset + - (options.keepBreaks ? lineBreak : '') + - data.replace(new RegExp('@charset [^;]+;(' + lineBreak + ')?', 'g'), '').trim(); - }); - - replace(function removeEmptySelectors() { - data = new EmptyRemoval(data).process(); - }); - - // trim spaces at beginning and end - data = data.trim(); - - if (options.debug) { - var elapsed = process.hrtime(startedAt); - stats.timeSpent = ~~(elapsed[0] * 1e3 + elapsed[1] / 1e6); - stats.efficiency = 1 - data.length / stats.originalSize; - stats.minifiedSize = data.length; - } - - return data; - }; - - return { - errors: context.errors, - lineBreak: lineBreak, - options: options, - minify: minify, - stats: stats, - warnings: context.warnings - }; -}; diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/lib/colors/hsl-to-hex.js b/node_modules/gulp-minify-css/node_modules/clean-css/lib/colors/hsl-to-hex.js deleted file mode 100644 index 6bb50312..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/lib/colors/hsl-to-hex.js +++ /dev/null @@ -1,64 +0,0 @@ -module.exports = function HSLToHex(data) { - // HSL to RGB converter. Both methods adapted from: - // http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript - var hslToRgb = function(h, s, l) { - var r, g, b; - - // normalize hue orientation b/w 0 and 360 degrees - h = h % 360; - if (h < 0) - h += 360; - h = ~~h / 360; - - if (s < 0) - s = 0; - else if (s > 100) - s = 100; - s = ~~s / 100; - - if (l < 0) - l = 0; - else if (l > 100) - l = 100; - l = ~~l / 100; - - if (s === 0) { - r = g = b = l; // achromatic - } else { - var q = l < 0.5 ? - l * (1 + s) : - l + s - l * s; - var p = 2 * l - q; - r = hueToRgb(p, q, h + 1/3); - g = hueToRgb(p, q, h); - b = hueToRgb(p, q, h - 1/3); - } - - return [~~(r * 255), ~~(g * 255), ~~(b * 255)]; - }; - - var hueToRgb = function(p, q, t) { - if (t < 0) t += 1; - if (t > 1) t -= 1; - if (t < 1/6) return p + (q - p) * 6 * t; - if (t < 1/2) return q; - if (t < 2/3) return p + (q - p) * (2/3 - t) * 6; - return p; - }; - - return { - process: function() { - return data.replace(/hsl\((-?\d+),(-?\d+)%?,(-?\d+)%?\)/g, function(match, hue, saturation, lightness) { - var asRgb = hslToRgb(hue, saturation, lightness); - var redAsHex = asRgb[0].toString(16); - var greenAsHex = asRgb[1].toString(16); - var blueAsHex = asRgb[2].toString(16); - - return '#' + - ((redAsHex.length == 1 ? '0' : '') + redAsHex) + - ((greenAsHex.length == 1 ? '0' : '') + greenAsHex) + - ((blueAsHex.length == 1 ? '0' : '') + blueAsHex); - }); - } - }; -}; diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/lib/colors/long-to-short-hex.js b/node_modules/gulp-minify-css/node_modules/clean-css/lib/colors/long-to-short-hex.js deleted file mode 100644 index 87fa31b2..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/lib/colors/long-to-short-hex.js +++ /dev/null @@ -1,12 +0,0 @@ -module.exports = function LongToShortHex(data) { - return { - process: function() { - return data.replace(/([,: \(])#([0-9a-f]{6})/gi, function(match, prefix, color) { - if (color[0] == color[1] && color[2] == color[3] && color[4] == color[5]) - return prefix + '#' + color[0] + color[2] + color[4]; - else - return prefix + '#' + color; - }); - } - }; -}; diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/lib/colors/rgb-to-hex.js b/node_modules/gulp-minify-css/node_modules/clean-css/lib/colors/rgb-to-hex.js deleted file mode 100644 index d235289b..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/lib/colors/rgb-to-hex.js +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = function RGBToHex(data) { - return { - process: function() { - return data.replace(/rgb\((\d+),(\d+),(\d+)\)/g, function(match, red, green, blue) { - var redAsHex = parseInt(red, 10).toString(16); - var greenAsHex = parseInt(green, 10).toString(16); - var blueAsHex = parseInt(blue, 10).toString(16); - - return '#' + - ((redAsHex.length == 1 ? '0' : '') + redAsHex) + - ((greenAsHex.length == 1 ? '0' : '') + greenAsHex) + - ((blueAsHex.length == 1 ? '0' : '') + blueAsHex); - }); - } - }; -}; diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/lib/colors/shortener.js b/node_modules/gulp-minify-css/node_modules/clean-css/lib/colors/shortener.js deleted file mode 100644 index 7476f09b..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/lib/colors/shortener.js +++ /dev/null @@ -1,174 +0,0 @@ -module.exports = function Shortener(data) { - var COLORS = { - aliceblue: '#f0f8ff', - antiquewhite: '#faebd7', - aqua: '#0ff', - aquamarine: '#7fffd4', - azure: '#f0ffff', - beige: '#f5f5dc', - bisque: '#ffe4c4', - black: '#000', - blanchedalmond: '#ffebcd', - blue: '#00f', - blueviolet: '#8a2be2', - brown: '#a52a2a', - burlywood: '#deb887', - cadetblue: '#5f9ea0', - chartreuse: '#7fff00', - chocolate: '#d2691e', - coral: '#ff7f50', - cornflowerblue: '#6495ed', - cornsilk: '#fff8dc', - crimson: '#dc143c', - cyan: '#0ff', - darkblue: '#00008b', - darkcyan: '#008b8b', - darkgoldenrod: '#b8860b', - darkgray: '#a9a9a9', - darkgreen: '#006400', - darkkhaki: '#bdb76b', - darkmagenta: '#8b008b', - darkolivegreen: '#556b2f', - darkorange: '#ff8c00', - darkorchid: '#9932cc', - darkred: '#8b0000', - darksalmon: '#e9967a', - darkseagreen: '#8fbc8f', - darkslateblue: '#483d8b', - darkslategray: '#2f4f4f', - darkturquoise: '#00ced1', - darkviolet: '#9400d3', - deeppink: '#ff1493', - deepskyblue: '#00bfff', - dimgray: '#696969', - dodgerblue: '#1e90ff', - firebrick: '#b22222', - floralwhite: '#fffaf0', - forestgreen: '#228b22', - fuchsia: '#f0f', - gainsboro: '#dcdcdc', - ghostwhite: '#f8f8ff', - gold: '#ffd700', - goldenrod: '#daa520', - gray: '#808080', - green: '#008000', - greenyellow: '#adff2f', - honeydew: '#f0fff0', - hotpink: '#ff69b4', - indianred: '#cd5c5c', - indigo: '#4b0082', - ivory: '#fffff0', - khaki: '#f0e68c', - lavender: '#e6e6fa', - lavenderblush: '#fff0f5', - lawngreen: '#7cfc00', - lemonchiffon: '#fffacd', - lightblue: '#add8e6', - lightcoral: '#f08080', - lightcyan: '#e0ffff', - lightgoldenrodyellow: '#fafad2', - lightgray: '#d3d3d3', - lightgreen: '#90ee90', - lightpink: '#ffb6c1', - lightsalmon: '#ffa07a', - lightseagreen: '#20b2aa', - lightskyblue: '#87cefa', - lightslategray: '#778899', - lightsteelblue: '#b0c4de', - lightyellow: '#ffffe0', - lime: '#0f0', - limegreen: '#32cd32', - linen: '#faf0e6', - magenta: '#ff00ff', - maroon: '#800000', - mediumaquamarine: '#66cdaa', - mediumblue: '#0000cd', - mediumorchid: '#ba55d3', - mediumpurple: '#9370db', - mediumseagreen: '#3cb371', - mediumslateblue: '#7b68ee', - mediumspringgreen: '#00fa9a', - mediumturquoise: '#48d1cc', - mediumvioletred: '#c71585', - midnightblue: '#191970', - mintcream: '#f5fffa', - mistyrose: '#ffe4e1', - moccasin: '#ffe4b5', - navajowhite: '#ffdead', - navy: '#000080', - oldlace: '#fdf5e6', - olive: '#808000', - olivedrab: '#6b8e23', - orange: '#ffa500', - orangered: '#ff4500', - orchid: '#da70d6', - palegoldenrod: '#eee8aa', - palegreen: '#98fb98', - paleturquoise: '#afeeee', - palevioletred: '#db7093', - papayawhip: '#ffefd5', - peachpuff: '#ffdab9', - peru: '#cd853f', - pink: '#ffc0cb', - plum: '#dda0dd', - powderblue: '#b0e0e6', - purple: '#800080', - red: '#f00', - rosybrown: '#bc8f8f', - royalblue: '#4169e1', - saddlebrown: '#8b4513', - salmon: '#fa8072', - sandybrown: '#f4a460', - seagreen: '#2e8b57', - seashell: '#fff5ee', - sienna: '#a0522d', - silver: '#c0c0c0', - skyblue: '#87ceeb', - slateblue: '#6a5acd', - slategray: '#708090', - snow: '#fffafa', - springgreen: '#00ff7f', - steelblue: '#4682b4', - tan: '#d2b48c', - teal: '#008080', - thistle: '#d8bfd8', - tomato: '#ff6347', - turquoise: '#40e0d0', - violet: '#ee82ee', - wheat: '#f5deb3', - white: '#fff', - whitesmoke: '#f5f5f5', - yellow: '#ff0', - yellowgreen: '#9acd32' - }; - - var toHex = {}; - var toName = {}; - - for (var name in COLORS) { - var color = COLORS[name]; - if (name.length < color.length) - toName[color] = name; - else - toHex[name] = color; - } - - return { - toHex: toHex, - toName: toName, - - // replace color name with hex values if shorter (or the other way around) - process: function() { - [toHex, toName].forEach(function(conversion) { - var pattern = '(' + Object.keys(conversion).join('|') + ')'; - var colorSwitcher = function(match, prefix, colorValue, suffix) { - return prefix + conversion[colorValue.toLowerCase()] + suffix; - }; - data = data.replace(new RegExp('([ :,\\(])' + pattern + '([;\\}!\\) ])', 'ig'), colorSwitcher); - data = data.replace(new RegExp('(,)' + pattern + '(,)', 'ig'), colorSwitcher); - }); - - return data; - } - }; -}; diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/lib/images/url-rebase.js b/node_modules/gulp-minify-css/node_modules/clean-css/lib/images/url-rebase.js deleted file mode 100644 index 5b249544..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/lib/images/url-rebase.js +++ /dev/null @@ -1,34 +0,0 @@ -var path = require('path'); - -var UrlRewriter = require('./url-rewriter'); - -module.exports = function UrlRebase(options, context) { - var process = function(data) { - var rebaseOpts = { - absolute: !!options.root, - relative: !options.root && !!options.target, - fromBase: options.relativeTo - }; - - if (!rebaseOpts.absolute && !rebaseOpts.relative) - return data; - - if (rebaseOpts.absolute && !!options.target) - context.warnings.push('Both \'root\' and output file given so rebasing URLs as absolute paths'); - - if (rebaseOpts.absolute) - rebaseOpts.toBase = path.resolve(options.root); - - if (rebaseOpts.relative) - rebaseOpts.toBase = path.resolve(path.dirname(options.target)); - - if (!rebaseOpts.fromBase || !rebaseOpts.toBase) - return data; - - return UrlRewriter.process(data, rebaseOpts); - }; - - return { - process: process - }; -}; diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/lib/images/url-rewriter.js b/node_modules/gulp-minify-css/node_modules/clean-css/lib/images/url-rewriter.js deleted file mode 100644 index b41056fd..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/lib/images/url-rewriter.js +++ /dev/null @@ -1,53 +0,0 @@ -var path = require('path'); - -module.exports = { - process: function(data, options) { - var tempData = []; - var nextStart = 0; - var nextEnd = 0; - var cursor = 0; - - for (; nextEnd < data.length; ) { - nextStart = data.indexOf('url(', nextEnd); - if (nextStart == -1) - break; - - nextEnd = data.indexOf(')', nextStart + 4); - if (nextEnd == -1) - break; - - tempData.push(data.substring(cursor, nextStart)); - var url = data.substring(nextStart + 4, nextEnd).replace(/['"]/g, ''); - tempData.push('url(' + this._rebased(url, options) + ')'); - cursor = nextEnd + 1; - } - - return tempData.length > 0 ? - tempData.join('') + data.substring(cursor, data.length) : - data; - }, - - _rebased: function(url, options) { - var specialUrl = url[0] == '/' || - url.substring(url.length - 4) == '.css' || - url.indexOf('data:') === 0 || - /^https?:\/\//.exec(url) !== null || - /__\w+__/.exec(url) !== null; - var rebased; - - if (specialUrl) - return url; - - if (options.absolute) { - rebased = path - .resolve(path.join(options.fromBase, url)) - .replace(options.toBase, ''); - } else { - rebased = path.relative(options.toBase, path.join(options.fromBase, url)); - } - - return process.platform == 'win32' ? - rebased.replace(/\\/g, '/') : - rebased; - } -}; diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js b/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js deleted file mode 100644 index 9180e3c7..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/lib/imports/inliner.js +++ /dev/null @@ -1,152 +0,0 @@ -var fs = require('fs'); -var path = require('path'); - -var UrlRewriter = require('../images/url-rewriter'); - -module.exports = function Inliner(context) { - var process = function(data, options) { - var tempData = []; - var nextStart = 0; - var nextEnd = 0; - var cursor = 0; - var isComment = commentScanner(data); - - options.relativeTo = options.relativeTo || options.root; - options._baseRelativeTo = options._baseRelativeTo || options.relativeTo; - options.visited = options.visited || []; - - for (; nextEnd < data.length; ) { - nextStart = data.indexOf('@import', cursor); - if (nextStart == -1) - break; - - if (isComment(nextStart)) { - cursor = nextStart + 1; - continue; - } - - nextEnd = data.indexOf(';', nextStart); - if (nextEnd == -1) { - tempData.push(''); - cursor = data.length; - break; - } - - tempData.push(data.substring(cursor, nextStart)); - tempData.push(inlinedFile(data, nextStart, nextEnd, options)); - cursor = nextEnd + 1; - } - - return tempData.length > 0 ? - tempData.join('') + data.substring(cursor, data.length) : - data; - }; - - var commentScanner = function(data) { - var commentRegex = /(\/\*(?!\*\/)[\s\S]*?\*\/)/; - var lastStartIndex = 0; - var lastEndIndex = 0; - var noComments = false; - - // test whether an index is located within a comment - var scanner = function(idx) { - var comment; - var localStartIndex = 0; - var localEndIndex = 0; - var globalStartIndex = 0; - var globalEndIndex = 0; - - // return if we know there are no more comments - if (noComments) - return false; - - // idx can be still within last matched comment (many @import statements inside one comment) - if (idx > lastStartIndex && idx < lastEndIndex) - return true; - - comment = data.match(commentRegex); - - if (!comment) { - noComments = true; - return false; - } - - // get the indexes relative to the current data chunk - lastStartIndex = localStartIndex = comment.index; - localEndIndex = localStartIndex + comment[0].length; - - // calculate the indexes relative to the full original data - globalEndIndex = localEndIndex + lastEndIndex; - globalStartIndex = globalEndIndex - comment[0].length; - - // chop off data up to and including current comment block - data = data.substring(localEndIndex); - lastEndIndex = globalEndIndex; - - // re-run scan if comment ended before the idx - if (globalEndIndex < idx) - return scanner(idx); - - return globalEndIndex > idx && idx > globalStartIndex; - }; - - return scanner; - }; - - var inlinedFile = function(data, nextStart, nextEnd, options) { - var strippedImport = data - .substring(data.indexOf(' ', nextStart) + 1, nextEnd) - .replace(/^url\(/, '') - .replace(/['"]/g, ''); - - var separatorIndex = strippedImport.indexOf(' '); - var importedFile = strippedImport - .substring(0, separatorIndex > 0 ? separatorIndex : strippedImport.length) - .replace(')', ''); - var mediaQuery = strippedImport - .substring(importedFile.length + 1) - .trim(); - - if (/^(http|https):\/\//.test(importedFile) || /^\/\//.test(importedFile)) - return '@import url(' + importedFile + ')' + (mediaQuery.length > 0 ? ' ' + mediaQuery : '') + ';'; - - var relativeTo = importedFile[0] == '/' ? - options.root : - options.relativeTo; - - var fullPath = path.resolve(path.join(relativeTo, importedFile)); - - if (!fs.existsSync(fullPath) || !fs.statSync(fullPath).isFile()) { - context.errors.push('Broken @import declaration of "' + importedFile + '"'); - return ''; - } - - if (options.visited.indexOf(fullPath) != -1) - return ''; - - options.visited.push(fullPath); - - var importedData = fs.readFileSync(fullPath, 'utf8'); - var importRelativeTo = path.dirname(fullPath); - importedData = UrlRewriter.process(importedData, { - relative: true, - fromBase: importRelativeTo, - toBase: options._baseRelativeTo - }); - - var inlinedData = process(importedData, { - root: options.root, - relativeTo: importRelativeTo, - _baseRelativeTo: options.baseRelativeTo, - visited: options.visited - }); - return mediaQuery.length > 0 ? - '@media ' + mediaQuery + '{' + inlinedData + '}' : - inlinedData; - }; - - return { - // Inlines all imports taking care of repetitions, unknown files, and circular dependencies - process: process - }; -}; diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/lib/properties/optimizer.js b/node_modules/gulp-minify-css/node_modules/clean-css/lib/properties/optimizer.js deleted file mode 100644 index 6106f379..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/lib/properties/optimizer.js +++ /dev/null @@ -1,228 +0,0 @@ -module.exports = function Optimizer() { - var overridable = { - 'animation-delay': ['animation'], - 'animation-direction': ['animation'], - 'animation-duration': ['animation'], - 'animation-fill-mode': ['animation'], - 'animation-iteration-count': ['animation'], - 'animation-name': ['animation'], - 'animation-play-state': ['animation'], - 'animation-timing-function': ['animation'], - '-moz-animation-delay': ['-moz-animation'], - '-moz-animation-direction': ['-moz-animation'], - '-moz-animation-duration': ['-moz-animation'], - '-moz-animation-fill-mode': ['-moz-animation'], - '-moz-animation-iteration-count': ['-moz-animation'], - '-moz-animation-name': ['-moz-animation'], - '-moz-animation-play-state': ['-moz-animation'], - '-moz-animation-timing-function': ['-moz-animation'], - '-o-animation-delay': ['-o-animation'], - '-o-animation-direction': ['-o-animation'], - '-o-animation-duration': ['-o-animation'], - '-o-animation-fill-mode': ['-o-animation'], - '-o-animation-iteration-count': ['-o-animation'], - '-o-animation-name': ['-o-animation'], - '-o-animation-play-state': ['-o-animation'], - '-o-animation-timing-function': ['-o-animation'], - '-webkit-animation-delay': ['-webkit-animation'], - '-webkit-animation-direction': ['-webkit-animation'], - '-webkit-animation-duration': ['-webkit-animation'], - '-webkit-animation-fill-mode': ['-webkit-animation'], - '-webkit-animation-iteration-count': ['-webkit-animation'], - '-webkit-animation-name': ['-webkit-animation'], - '-webkit-animation-play-state': ['-webkit-animation'], - '-webkit-animation-timing-function': ['-webkit-animation'], - 'background-attachment': ['background'], - 'background-clip': ['background'], - 'background-color': ['background'], - 'background-image': ['background'], - 'background-origin': ['background'], - 'background-position': ['background'], - 'background-repeat': ['background'], - 'background-size': ['background'], - 'border-color': ['border'], - 'border-style': ['border'], - 'border-width': ['border'], - 'border-bottom': ['border'], - 'border-bottom-color': ['border-bottom', 'border-color', 'border'], - 'border-bottom-style': ['border-bottom', 'border-style', 'border'], - 'border-bottom-width': ['border-bottom', 'border-width', 'border'], - 'border-left': ['border'], - 'border-left-color': ['border-left', 'border-color', 'border'], - 'border-left-style': ['border-left', 'border-style', 'border'], - 'border-left-width': ['border-left', 'border-width', 'border'], - 'border-right': ['border'], - 'border-right-color': ['border-right', 'border-color', 'border'], - 'border-right-style': ['border-right', 'border-style', 'border'], - 'border-right-width': ['border-right', 'border-width', 'border'], - 'border-top': ['border'], - 'border-top-color': ['border-top', 'border-color', 'border'], - 'border-top-style': ['border-top', 'border-style', 'border'], - 'border-top-width': ['border-top', 'border-width', 'border'], - 'font-family': ['font'], - 'font-size': ['font'], - 'font-style': ['font'], - 'font-variant': ['font'], - 'font-weight': ['font'], - 'list-style-image': ['list'], - 'list-style-position': ['list'], - 'list-style-type': ['list'], - 'margin-bottom': ['margin'], - 'margin-left': ['margin'], - 'margin-right': ['margin'], - 'margin-top': ['margin'], - 'outline-color': ['outline'], - 'outline-style': ['outline'], - 'outline-width': ['outline'], - 'padding-bottom': ['padding'], - 'padding-left': ['padding'], - 'padding-right': ['padding'], - 'padding-top': ['padding'], - 'transition-delay': ['transition'], - 'transition-duration': ['transition'], - 'transition-property': ['transition'], - 'transition-timing-function': ['transition'], - '-moz-transition-delay': ['-moz-transition'], - '-moz-transition-duration': ['-moz-transition'], - '-moz-transition-property': ['-moz-transition'], - '-moz-transition-timing-function': ['-moz-transition'], - '-o-transition-delay': ['-o-transition'], - '-o-transition-duration': ['-o-transition'], - '-o-transition-property': ['-o-transition'], - '-o-transition-timing-function': ['-o-transition'], - '-webkit-transition-delay': ['-webkit-transition'], - '-webkit-transition-duration': ['-webkit-transition'], - '-webkit-transition-property': ['-webkit-transition'], - '-webkit-transition-timing-function': ['-webkit-transition'] - }; - - var overrides = {}; - for (var granular in overridable) { - for (var i = 0; i < overridable[granular].length; i++) { - var coarse = overridable[granular][i]; - var list = overrides[coarse]; - - if (list) - list.push(granular); - else - overrides[coarse] = [granular]; - } - } - - var tokenize = function(body) { - var tokens = body.split(';'); - var keyValues = []; - - for (var i = 0, l = tokens.length; i < l; i++) { - var token = tokens[i]; - if (token === '') - continue; - - var firstColon = token.indexOf(':'); - keyValues.push([ - token.substring(0, firstColon), - token.substring(firstColon + 1), - token.indexOf('!important') > -1 - ]); - } - - return keyValues; - }; - - var optimize = function(tokens, allowAdjacent) { - var merged = []; - var properties = []; - var lastProperty = null; - var rescanTrigger = {}; - - var removeOverridenBy = function(property, isImportant) { - var overrided = overrides[property]; - for (var i = 0, l = overrided.length; i < l; i++) { - for (var j = 0; j < properties.length; j++) { - if (properties[j] != overrided[i] || (merged[j][2] && !isImportant)) - continue; - - merged.splice(j, 1); - properties.splice(j, 1); - j -= 1; - } - } - }; - - var mergeablePosition = function(position) { - if (allowAdjacent === false || allowAdjacent === true) - return allowAdjacent; - - return allowAdjacent.indexOf(position) > -1; - }; - - tokensLoop: - for (var i = 0, l = tokens.length; i < l; i++) { - var token = tokens[i]; - var property = token[0]; - var isImportant = token[2]; - var _property = (property == '-ms-filter' || property == 'filter') ? - (lastProperty == 'background' || lastProperty == 'background-image' ? lastProperty : property) : - property; - var toOverridePosition = 0; - - // comment is necessary - we assume that if two properties are one after another - // then it is intentional way of redefining property which may not be widely supported - // e.g. a{display:inline-block;display:-moz-inline-box} - // however if `mergeablePosition` yields true then the rule does not apply - // (e.g merging two adjacent selectors: `a{display:block}a{display:block}`) - if (_property != lastProperty || mergeablePosition(i)) { - while (true) { - toOverridePosition = properties.indexOf(_property, toOverridePosition); - if (toOverridePosition == -1) - break; - - if (merged[toOverridePosition][2] && !isImportant) - continue tokensLoop; - - merged.splice(toOverridePosition, 1); - properties.splice(toOverridePosition, 1); - } - } - - merged.push(token); - properties.push(_property); - - // certain properties (see values of `overridable`) should trigger removal of - // more granular properties (see keys of `overridable`) - if (rescanTrigger[_property]) - removeOverridenBy(_property, isImportant); - - // add rescan triggers - if certain property appears later in the list a rescan needs - // to be triggered, e.g 'border-top' triggers a rescan after 'border-top-width' and - // 'border-top-color' as they can be removed - for (var j = 0, list = overridable[_property] || [], m = list.length; j < m; j++) - rescanTrigger[list[j]] = true; - - lastProperty = _property; - } - - return merged; - }; - - var rebuild = function(tokens) { - var flat = []; - - for (var i = 0, l = tokens.length; i < l; i++) { - flat.push(tokens[i][0] + ':' + tokens[i][1]); - } - - return flat.join(';'); - }; - - return { - process: function(body, allowAdjacent) { - var tokens = tokenize(body); - if (tokens.length < 2) - return body; - - var optimized = optimize(tokens, allowAdjacent); - return rebuild(optimized); - } - }; -}; diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/lib/properties/shorthand-notations.js b/node_modules/gulp-minify-css/node_modules/clean-css/lib/properties/shorthand-notations.js deleted file mode 100644 index f29b2d36..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/lib/properties/shorthand-notations.js +++ /dev/null @@ -1,50 +0,0 @@ -module.exports = function ShorthandNotations(data) { - // shorthand notations - var shorthandRegex = function(repeats, hasSuffix) { - var pattern = '(padding|margin|border\\-width|border\\-color|border\\-style|border\\-radius):'; - for (var i = 0; i < repeats; i++) - pattern += '([\\d\\w\\.%#\\(\\),]+)' + (i < repeats - 1 ? ' ' : ''); - return new RegExp(pattern + (hasSuffix ? '([;}])' : ''), 'g'); - }; - - var from4Values = function() { - return data.replace(shorthandRegex(4), function(match, property, size1, size2, size3, size4) { - if (size1 === size2 && size1 === size3 && size1 === size4) - return property + ':' + size1; - else if (size1 === size3 && size2 === size4) - return property + ':' + size1 + ' ' + size2; - else if (size2 === size4) - return property + ':' + size1 + ' ' + size2 + ' ' + size3; - else - return match; - }); - }; - - var from3Values = function() { - return data.replace(shorthandRegex(3, true), function(match, property, size1, size2, size3, suffix) { - if (size1 === size2 && size1 === size3) - return property + ':' + size1 + suffix; - else if (size1 === size3) - return property + ':' + size1 + ' ' + size2 + suffix; - else - return match; - }); - }; - - var from2Values = function() { - return data.replace(shorthandRegex(2, true), function(match, property, size1, size2, suffix) { - if (size1 === size2) - return property + ':' + size1 + suffix; - else - return match; - }); - }; - - return { - process: function() { - data = from4Values(); - data = from3Values(); - return from2Values(); - } - }; -}; diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/lib/selectors/empty-removal.js b/node_modules/gulp-minify-css/node_modules/clean-css/lib/selectors/empty-removal.js deleted file mode 100644 index ee193c16..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/lib/selectors/empty-removal.js +++ /dev/null @@ -1,30 +0,0 @@ -module.exports = function EmptyRemoval(data) { - var stripEmpty = function(cssData) { - var tempData = []; - var nextEmpty = 0; - var cursor = 0; - - for (; nextEmpty < cssData.length; ) { - nextEmpty = cssData.indexOf('{}', cursor); - if (nextEmpty == -1) - break; - - var startsAt = nextEmpty - 1; - while (cssData[startsAt] && cssData[startsAt] != '}' && cssData[startsAt] != '{') - startsAt--; - - tempData.push(cssData.substring(cursor, startsAt + 1)); - cursor = nextEmpty + 2; - } - - return tempData.length > 0 ? - stripEmpty(tempData.join('') + cssData.substring(cursor, cssData.length)) : - cssData; - }; - - return { - process: function() { - return stripEmpty(data); - } - }; -}; diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/lib/selectors/optimizer.js b/node_modules/gulp-minify-css/node_modules/clean-css/lib/selectors/optimizer.js deleted file mode 100644 index 7dbfc578..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/lib/selectors/optimizer.js +++ /dev/null @@ -1,221 +0,0 @@ -var Tokenizer = require('./tokenizer'); -var PropertyOptimizer = require('../properties/optimizer'); - -module.exports = function Optimizer(data, context, options) { - var specialSelectors = { - '*': /\-(moz|ms|o|webkit)\-/, - 'ie8': /(\-moz\-|\-ms\-|\-o\-|\-webkit\-|:not|:target|:visited|:empty|:first\-of|:last|:nth|:only|:root)/ - }; - - var propertyOptimizer = new PropertyOptimizer(); - - var cleanUpSelector = function(selectors) { - var plain = []; - selectors = selectors.split(','); - - for (var i = 0, l = selectors.length; i < l; i++) { - var sel = selectors[i]; - - if (plain.indexOf(sel) == -1) - plain.push(sel); - } - - return plain.sort().join(','); - }; - - var isSpecial = function(selector) { - return specialSelectors[options.selectorsMergeMode || '*'].test(selector); - }; - - var removeDuplicates = function(tokens) { - var matched = {}; - var forRemoval = []; - - for (var i = 0, l = tokens.length; i < l; i++) { - if (typeof(tokens[i]) == 'string' || tokens[i].block) - continue; - - var selector = tokens[i].selector; - var body = tokens[i].body; - var id = body + '@' + selector; - var alreadyMatched = matched[id]; - - if (alreadyMatched) { - forRemoval.push(alreadyMatched[alreadyMatched.length - 1]); - alreadyMatched.push(i); - } else { - matched[id] = [i]; - } - } - - forRemoval = forRemoval.sort(function(a, b) { return a > b ? 1 : -1; }); - for (var j = 0, n = forRemoval.length; j < n; j++) { - tokens.splice(forRemoval[j] - j, 1); - } - }; - - var mergeAdjacent = function(tokens) { - var forRemoval = []; - var lastToken = { selector: null, body: null }; - - for (var i = 0, l = tokens.length; i < l; i++) { - var token = tokens[i]; - - if (typeof(token) == 'string' || token.block) - continue; - - if (token.selector == lastToken.selector) { - var joinAt = [lastToken.body.split(';').length]; - lastToken.body = propertyOptimizer.process(lastToken.body + ';' + token.body, joinAt); - forRemoval.push(i); - } else if (token.body == lastToken.body && !isSpecial(token.selector) && !isSpecial(lastToken.selector)) { - lastToken.selector = cleanUpSelector(lastToken.selector + ',' + token.selector); - forRemoval.push(i); - } else { - lastToken = token; - } - } - - for (var j = 0, m = forRemoval.length; j < m; j++) { - tokens.splice(forRemoval[j] - j, 1); - } - }; - - var reduceNonAdjacent = function(tokens) { - var matched = {}; - var matchedMoreThanOnce = []; - var partiallyReduced = []; - var token, selector, selectors; - var removeEmpty = function(value) { - return value.length > 0 ? value : ''; - }; - - for (var i = 0, l = tokens.length; i < l; i++) { - token = tokens[i]; - selector = token.selector; - - if (typeof(token) == 'string' || token.block) - continue; - - selectors = selector.split(','); - if (selectors.length > 1) - selectors.push(selector); - - for (var j = 0, m = selectors.length; j < m; j++) { - var sel = selectors[j]; - var alreadyMatched = matched[sel]; - if (alreadyMatched) { - if (alreadyMatched.length == 1) - matchedMoreThanOnce.push(sel); - alreadyMatched.push(i); - } else { - matched[sel] = [i]; - } - } - } - - matchedMoreThanOnce.forEach(function(selector) { - var matchPositions = matched[selector]; - var bodies = []; - var joinsAt = []; - for (var j = 0, m = matchPositions.length; j < m; j++) { - var body = tokens[matchPositions[j]].body; - bodies.push(body); - joinsAt.push((joinsAt[j - 1] || 0) + body.split(';').length); - } - - var optimizedBody = propertyOptimizer.process(bodies.join(';'), joinsAt); - var optimizedTokens = optimizedBody.split(';'); - - var k = optimizedTokens.length - 1; - var currentMatch = matchPositions.length - 1; - - while (currentMatch >= 0) { - if (bodies[currentMatch].indexOf(optimizedTokens[k]) > -1 && k > -1) { - k -= 1; - continue; - } - - var tokenIndex = matchPositions[currentMatch]; - var token = tokens[tokenIndex]; - var reducedBody = optimizedTokens - .splice(k + 1) - .filter(removeEmpty) - .join(';'); - - if (token.selector == selector) { - token.body = reducedBody; - } else { - token._partials = token._partials || []; - token._partials.push(reducedBody); - - if (partiallyReduced.indexOf(tokenIndex) == -1) - partiallyReduced.push(tokenIndex); - } - - currentMatch -= 1; - } - }); - - // process those tokens which were partially reduced - // i.e. at least one of token's selectors saw reduction - // if all selectors were reduced to same value we can override it - for (i = 0, l = partiallyReduced.length; i < l; i++) { - token = tokens[partiallyReduced[i]]; - selectors = token.selector.split(','); - - if (token._partials.length == selectors.length && token.body != token._partials[0]) { - var newBody = token._partials[0]; - for (var k = 1, n = token._partials.length; k < n; k++) { - if (token._partials[k] != newBody) - break; - } - - if (k == n) - token.body = newBody; - } - - delete token._partials; - } - }; - - var optimize = function(tokens) { - tokens = (Array.isArray(tokens) ? tokens : [tokens]); - for (var i = 0, l = tokens.length; i < l; i++) { - var token = tokens[i]; - - if (token.selector) { - token.selector = cleanUpSelector(token.selector); - token.body = propertyOptimizer.process(token.body, false); - } else if (token.block) { - optimize(token.body); - } - } - - removeDuplicates(tokens); - mergeAdjacent(tokens); - reduceNonAdjacent(tokens); - }; - - var rebuild = function(tokens) { - return (Array.isArray(tokens) ? tokens : [tokens]) - .map(function(token) { - if (typeof token == 'string') - return token; - - if (token.block) - return token.block + '{' + rebuild(token.body) + '}'; - else - return token.selector + '{' + token.body + '}'; - }) - .join(options.keepBreaks ? options.lineBreak : ''); - }; - - return { - process: function() { - var tokenized = new Tokenizer(data, context).process(); - optimize(tokenized); - return rebuild(tokenized); - } - }; -}; diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/lib/selectors/tokenizer.js b/node_modules/gulp-minify-css/node_modules/clean-css/lib/selectors/tokenizer.js deleted file mode 100644 index e826efb0..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/lib/selectors/tokenizer.js +++ /dev/null @@ -1,129 +0,0 @@ -module.exports = function Tokenizer(data, minifyContext) { - var flatBlock = /^@(font\-face|page|\-ms\-viewport|\-o\-viewport|viewport)/; - - var whatsNext = function(context) { - var cursor = context.cursor; - var mode = context.mode; - var closest; - - if (mode == 'body') { - closest = data.indexOf('}', cursor); - return closest > -1 ? - [closest, 'bodyEnd'] : - null; - } - - var nextSpecial = data.indexOf('@', cursor); - var nextEscape = mode == 'top' ? data.indexOf('__ESCAPED_COMMENT_CLEAN_CSS', cursor) : -1; - var nextBodyStart = data.indexOf('{', cursor); - var nextBodyEnd = data.indexOf('}', cursor); - - closest = nextSpecial; - if (closest == -1 || (nextEscape > -1 && nextEscape < closest)) - closest = nextEscape; - if (closest == -1 || (nextBodyStart > -1 && nextBodyStart < closest)) - closest = nextBodyStart; - if (closest == -1 || (nextBodyEnd > -1 && nextBodyEnd < closest)) - closest = nextBodyEnd; - - if (closest == -1) - return; - if (nextEscape === closest) - return [closest, 'escape']; - if (nextBodyStart === closest) - return [closest, 'bodyStart']; - if (nextBodyEnd === closest) - return [closest, 'bodyEnd']; - if (nextSpecial === closest) - return [closest, 'special']; - }; - - var tokenize = function(context) { - var tokenized = []; - - context = context || { cursor: 0, mode: 'top' }; - - while (true) { - var next = whatsNext(context); - if (!next) { - var whatsLeft = data.substring(context.cursor); - if (whatsLeft.length > 0) { - tokenized.push(whatsLeft); - context.cursor += whatsLeft.length; - } - break; - } - - var nextSpecial = next[0]; - var what = next[1]; - var nextEnd; - var oldMode; - - if (what == 'special') { - var fragment = data.substring(nextSpecial, context.cursor + '@font-face'.length + 1); - var isSingle = fragment.indexOf('@import') === 0 || fragment.indexOf('@charset') === 0; - if (isSingle) { - nextEnd = data.indexOf(';', nextSpecial + 1); - tokenized.push(data.substring(context.cursor, nextEnd + 1)); - - context.cursor = nextEnd + 1; - } else { - nextEnd = data.indexOf('{', nextSpecial + 1); - var block = data.substring(context.cursor, nextEnd).trim(); - - var isFlat = flatBlock.test(block); - oldMode = context.mode; - context.cursor = nextEnd + 1; - context.mode = isFlat ? 'body' : 'block'; - var specialBody = tokenize(context); - context.mode = oldMode; - - tokenized.push({ block: block, body: specialBody }); - } - } else if (what == 'escape') { - nextEnd = data.indexOf('__', nextSpecial + 1); - var escaped = data.substring(context.cursor, nextEnd + 2); - tokenized.push(escaped); - - context.cursor = nextEnd + 2; - } else if (what == 'bodyStart') { - var selector = data.substring(context.cursor, nextSpecial).trim(); - - oldMode = context.mode; - context.cursor = nextSpecial + 1; - context.mode = 'body'; - var body = tokenize(context); - context.mode = oldMode; - - tokenized.push({ selector: selector, body: body }); - } else if (what == 'bodyEnd') { - // extra closing brace at the top level can be safely ignored - if (context.mode == 'top') { - var at = context.cursor; - var warning = data[context.cursor] == '}' ? - 'Unexpected \'}\' in \'' + data.substring(at - 20, at + 20) + '\'. Ignoring.' : - 'Unexpected content: \'' + data.substring(at, nextSpecial + 1) + '\'. Ignoring.'; - - minifyContext.warnings.push(warning); - context.cursor = nextSpecial + 1; - continue; - } - - if (context.mode != 'block') - tokenized = data.substring(context.cursor, nextSpecial); - - context.cursor = nextSpecial + 1; - - break; - } - } - - return tokenized; - }; - - return { - process: function() { - return tokenize(); - } - }; -}; diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/lib/text/comments.js b/node_modules/gulp-minify-css/node_modules/clean-css/lib/text/comments.js deleted file mode 100644 index 5667e7ec..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/lib/text/comments.js +++ /dev/null @@ -1,59 +0,0 @@ -var EscapeStore = require('./escape-store'); - -module.exports = function Comments(keepSpecialComments, keepBreaks, lineBreak) { - var comments = new EscapeStore('COMMENT'); - - return { - // Strip special comments (/*! ... */) by replacing them by a special marker - // for further restoring. Plain comments are removed. It's done by scanning data using - // String#indexOf scanning instead of regexps to speed up the process. - escape: function(data) { - var tempData = []; - var nextStart = 0; - var nextEnd = 0; - var cursor = 0; - - for (; nextEnd < data.length; ) { - nextStart = data.indexOf('/*', nextEnd); - nextEnd = data.indexOf('*/', nextStart + 2); - if (nextStart == -1 || nextEnd == -1) - break; - - tempData.push(data.substring(cursor, nextStart)); - if (data[nextStart + 2] == '!') { - // in case of special comments, replace them with a placeholder - var comment = data.substring(nextStart, nextEnd + 2); - var placeholder = comments.store(comment); - tempData.push(placeholder); - } - cursor = nextEnd + 2; - } - - return tempData.length > 0 ? - tempData.join('') + data.substring(cursor, data.length) : - data; - }, - - restore: function(data) { - var restored = 0; - var breakSuffix = keepBreaks ? lineBreak : ''; - - return data.replace(new RegExp(comments.placeholderPattern + '(' + lineBreak + '| )?', 'g'), function(match, placeholder) { - restored++; - - switch (keepSpecialComments) { - case '*': - return comments.restore(placeholder) + breakSuffix; - case 1: - case '1': - return restored == 1 ? - comments.restore(placeholder) + breakSuffix : - ''; - case 0: - case '0': - return ''; - } - }); - } - }; -}; diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/lib/text/escape-store.js b/node_modules/gulp-minify-css/node_modules/clean-css/lib/text/escape-store.js deleted file mode 100644 index 8c2f07f9..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/lib/text/escape-store.js +++ /dev/null @@ -1,32 +0,0 @@ -module.exports = function EscapeStore(placeholderRoot) { - placeholderRoot = 'ESCAPED_' + placeholderRoot + '_CLEAN_CSS'; - - var placeholderToData = {}; - var dataToPlaceholder = {}; - var count = 0; - var nextPlaceholder = function() { - return '__' + placeholderRoot + (count++) + '__'; - }; - var pattern = '(__' + placeholderRoot + '\\d{1,}__)'; - - return { - placeholderPattern: pattern, - - placeholderRegExp: new RegExp(pattern, 'g'), - - store: function(data) { - var placeholder = dataToPlaceholder[data]; - if (!placeholder) { - placeholder = nextPlaceholder(); - placeholderToData[placeholder] = data; - dataToPlaceholder[data] = placeholder; - } - - return placeholder; - }, - - restore: function(placeholder) { - return placeholderToData[placeholder]; - } - }; -}; diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/lib/text/expressions.js b/node_modules/gulp-minify-css/node_modules/clean-css/lib/text/expressions.js deleted file mode 100644 index 2ca193bc..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/lib/text/expressions.js +++ /dev/null @@ -1,69 +0,0 @@ -var EscapeStore = require('./escape-store'); - -module.exports = function Expressions() { - var expressions = new EscapeStore('EXPRESSION'); - - var findEnd = function(data, start) { - var end = start + 'expression'.length; - var level = 0; - var quoted = false; - - while(true) { - var next = data[end++]; - - if (quoted) { - quoted = next != '\'' && next != '"'; - } else { - quoted = next == '\'' || next == '"'; - - if (next == '(') - level++; - if (next == ')') - level--; - if (next == '}' && level == 1) { - end--; - level--; - } - } - - if (level === 0 || !next) - break; - } - - return end; - }; - - return { - // Escapes expressions by replacing them by a special - // marker for further restoring. It's done via string scanning - // instead of regexps to speed up the process. - escape: function(data) { - var nextStart = 0; - var nextEnd = 0; - var cursor = 0; - var tempData = []; - - for (; nextEnd < data.length; ) { - nextStart = data.indexOf('expression(', nextEnd); - if (nextStart == -1) - break; - - nextEnd = findEnd(data, nextStart); - - var expression = data.substring(nextStart, nextEnd); - var placeholder = expressions.store(expression); - tempData.push(data.substring(cursor, nextStart)); - tempData.push(placeholder); - cursor = nextEnd; - } - - return tempData.length > 0 ? - tempData.join('') + data.substring(cursor, data.length) : - data; - }, - - restore: function(data) { - return data.replace(expressions.placeholderRegExp, expressions.restore); - } - }; -}; diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/lib/text/free.js b/node_modules/gulp-minify-css/node_modules/clean-css/lib/text/free.js deleted file mode 100644 index 7ffee633..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/lib/text/free.js +++ /dev/null @@ -1,76 +0,0 @@ -var EscapeStore = require('./escape-store'); - -module.exports = function Free() { - var texts = new EscapeStore('FREE_TEXT'); - - var findNonEscapedEnd = function(data, matched, start) { - var end = start; - while (true) { - end = data.indexOf(matched, end); - - if (end > -1 && data[end - 1] == '\\') { - end += 1; - continue; - } else { - break; - } - } - - return end; - }; - - return { - // Strip content tags by replacing them by the a special - // marker for further restoring. It's done via string scanning - // instead of regexps to speed up the process. - escape: function(data) { - var tempData = []; - var nextStart = 0; - var nextEnd = 0; - var cursor = 0; - var matchedParenthesis = null; - var singleParenthesis = '\''; - var doubleParenthesis = '"'; - var dataLength = data.length; - - for (; nextEnd < data.length; ) { - var nextStartSingle = data.indexOf(singleParenthesis, nextEnd + 1); - var nextStartDouble = data.indexOf(doubleParenthesis, nextEnd + 1); - - if (nextStartSingle == -1) - nextStartSingle = dataLength; - if (nextStartDouble == -1) - nextStartDouble = dataLength; - - if (nextStartSingle < nextStartDouble) { - nextStart = nextStartSingle; - matchedParenthesis = singleParenthesis; - } else { - nextStart = nextStartDouble; - matchedParenthesis = doubleParenthesis; - } - - if (nextStart == -1) - break; - - nextEnd = findNonEscapedEnd(data, matchedParenthesis, nextStart + 1); - if (nextEnd == -1) - break; - - var text = data.substring(nextStart, nextEnd + 1); - var placeholder = texts.store(text); - tempData.push(data.substring(cursor, nextStart)); - tempData.push(placeholder); - cursor = nextEnd + 1; - } - - return tempData.length > 0 ? - tempData.join('') + data.substring(cursor, data.length) : - data; - }, - - restore: function(data) { - return data.replace(texts.placeholderRegExp, texts.restore); - } - }; -}; diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/lib/text/urls.js b/node_modules/gulp-minify-css/node_modules/clean-css/lib/text/urls.js deleted file mode 100644 index 007e41d2..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/lib/text/urls.js +++ /dev/null @@ -1,39 +0,0 @@ -var EscapeStore = require('./escape-store'); - -module.exports = function Urls() { - var urls = new EscapeStore('URL'); - - return { - // Strip urls by replacing them by a special - // marker for further restoring. It's done via string scanning - // instead of regexps to speed up the process. - escape: function(data) { - var nextStart = 0; - var nextEnd = 0; - var cursor = 0; - var tempData = []; - - for (; nextEnd < data.length; ) { - nextStart = data.indexOf('url(', nextEnd); - if (nextStart == -1) - break; - - nextEnd = data.indexOf(')', nextStart); - - var url = data.substring(nextStart, nextEnd + 1); - var placeholder = urls.store(url); - tempData.push(data.substring(cursor, nextStart)); - tempData.push(placeholder); - cursor = nextEnd + 1; - } - - return tempData.length > 0 ? - tempData.join('') + data.substring(cursor, data.length) : - data; - }, - - restore: function(data) { - return data.replace(urls.placeholderRegExp, urls.restore); - } - }; -}; diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/node_modules/commander/History.md b/node_modules/gulp-minify-css/node_modules/clean-css/node_modules/commander/History.md deleted file mode 100644 index 2e665828..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/node_modules/commander/History.md +++ /dev/null @@ -1,179 +0,0 @@ - -2.0.0 / 2013-07-18 -================== - - * remove input methods (.prompt, .confirm, etc) - -1.3.2 / 2013-07-18 -================== - - * add support for sub-commands to co-exist with the original command - -1.3.1 / 2013-07-18 -================== - - * add quick .runningCommand hack so you can opt-out of other logic when running a sub command - -1.3.0 / 2013-07-09 -================== - - * add EACCES error handling - * fix sub-command --help - -1.2.0 / 2013-06-13 -================== - - * allow "-" hyphen as an option argument - * support for RegExp coercion - -1.1.1 / 2012-11-20 -================== - - * add more sub-command padding - * fix .usage() when args are present. Closes #106 - -1.1.0 / 2012-11-16 -================== - - * add git-style executable subcommand support. Closes #94 - -1.0.5 / 2012-10-09 -================== - - * fix `--name` clobbering. Closes #92 - * fix examples/help. Closes #89 - -1.0.4 / 2012-09-03 -================== - - * add `outputHelp()` method. - -1.0.3 / 2012-08-30 -================== - - * remove invalid .version() defaulting - -1.0.2 / 2012-08-24 -================== - - * add `--foo=bar` support [arv] - * fix password on node 0.8.8. Make backward compatible with 0.6 [focusaurus] - -1.0.1 / 2012-08-03 -================== - - * fix issue #56 - * fix tty.setRawMode(mode) was moved to tty.ReadStream#setRawMode() (i.e. process.stdin.setRawMode()) - -1.0.0 / 2012-07-05 -================== - - * add support for optional option descriptions - * add defaulting of `.version()` to package.json's version - -0.6.1 / 2012-06-01 -================== - - * Added: append (yes or no) on confirmation - * Added: allow node.js v0.7.x - -0.6.0 / 2012-04-10 -================== - - * Added `.prompt(obj, callback)` support. Closes #49 - * Added default support to .choose(). Closes #41 - * Fixed the choice example - -0.5.1 / 2011-12-20 -================== - - * Fixed `password()` for recent nodes. Closes #36 - -0.5.0 / 2011-12-04 -================== - - * Added sub-command option support [itay] - -0.4.3 / 2011-12-04 -================== - - * Fixed custom help ordering. Closes #32 - -0.4.2 / 2011-11-24 -================== - - * Added travis support - * Fixed: line-buffered input automatically trimmed. Closes #31 - -0.4.1 / 2011-11-18 -================== - - * Removed listening for "close" on --help - -0.4.0 / 2011-11-15 -================== - - * Added support for `--`. Closes #24 - -0.3.3 / 2011-11-14 -================== - - * Fixed: wait for close event when writing help info [Jerry Hamlet] - -0.3.2 / 2011-11-01 -================== - - * Fixed long flag definitions with values [felixge] - -0.3.1 / 2011-10-31 -================== - - * Changed `--version` short flag to `-V` from `-v` - * Changed `.version()` so it's configurable [felixge] - -0.3.0 / 2011-10-31 -================== - - * Added support for long flags only. Closes #18 - -0.2.1 / 2011-10-24 -================== - - * "node": ">= 0.4.x < 0.7.0". Closes #20 - -0.2.0 / 2011-09-26 -================== - - * Allow for defaults that are not just boolean. Default peassignment only occurs for --no-*, optional, and required arguments. [Jim Isaacs] - -0.1.0 / 2011-08-24 -================== - - * Added support for custom `--help` output - -0.0.5 / 2011-08-18 -================== - - * Changed: when the user enters nothing prompt for password again - * Fixed issue with passwords beginning with numbers [NuckChorris] - -0.0.4 / 2011-08-15 -================== - - * Fixed `Commander#args` - -0.0.3 / 2011-08-15 -================== - - * Added default option value support - -0.0.2 / 2011-08-15 -================== - - * Added mask support to `Command#password(str[, mask], fn)` - * Added `Command#password(str, fn)` - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/node_modules/commander/Readme.md b/node_modules/gulp-minify-css/node_modules/clean-css/node_modules/commander/Readme.md deleted file mode 100644 index d1644012..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/node_modules/commander/Readme.md +++ /dev/null @@ -1,195 +0,0 @@ -# Commander.js - - The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander). - - [![Build Status](https://secure.travis-ci.org/visionmedia/commander.js.png)](http://travis-ci.org/visionmedia/commander.js) - -## Installation - - $ npm install commander - -## Option parsing - - Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('commander'); - -program - .version('0.0.1') - .option('-p, --peppers', 'Add peppers') - .option('-P, --pineapple', 'Add pineapple') - .option('-b, --bbq', 'Add bbq sauce') - .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble') - .parse(process.argv); - -console.log('you ordered a pizza with:'); -if (program.peppers) console.log(' - peppers'); -if (program.pineapple) console.log(' - pineapple'); -if (program.bbq) console.log(' - bbq'); -console.log(' - %s cheese', program.cheese); -``` - - Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc. - -## Automated --help - - The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free: - -``` - $ ./examples/pizza --help - - Usage: pizza [options] - - Options: - - -V, --version output the version number - -p, --peppers Add peppers - -P, --pineapple Add pineapple - -b, --bbq Add bbq sauce - -c, --cheese <type> Add the specified type of cheese [marble] - -h, --help output usage information - -``` - -## Coercion - -```js -function range(val) { - return val.split('..').map(Number); -} - -function list(val) { - return val.split(','); -} - -program - .version('0.0.1') - .usage('[options] <file ...>') - .option('-i, --integer <n>', 'An integer argument', parseInt) - .option('-f, --float <n>', 'A float argument', parseFloat) - .option('-r, --range <a>..<b>', 'A range', range) - .option('-l, --list <items>', 'A list', list) - .option('-o, --optional [value]', 'An optional value') - .parse(process.argv); - -console.log(' int: %j', program.integer); -console.log(' float: %j', program.float); -console.log(' optional: %j', program.optional); -program.range = program.range || []; -console.log(' range: %j..%j', program.range[0], program.range[1]); -console.log(' list: %j', program.list); -console.log(' args: %j', program.args); -``` - -## Custom help - - You can display arbitrary `-h, --help` information - by listening for "--help". Commander will automatically - exit once you are done so that the remainder of your program - does not execute causing undesired behaviours, for example - in the following executable "stuff" will not output when - `--help` is used. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('../'); - -function list(val) { - return val.split(',').map(Number); -} - -program - .version('0.0.1') - .option('-f, --foo', 'enable some foo') - .option('-b, --bar', 'enable some bar') - .option('-B, --baz', 'enable some baz'); - -// must be before .parse() since -// node's emit() is immediate - -program.on('--help', function(){ - console.log(' Examples:'); - console.log(''); - console.log(' $ custom-help --help'); - console.log(' $ custom-help -h'); - console.log(''); -}); - -program.parse(process.argv); - -console.log('stuff'); -``` - -yielding the following help output: - -``` - -Usage: custom-help [options] - -Options: - - -h, --help output usage information - -V, --version output the version number - -f, --foo enable some foo - -b, --bar enable some bar - -B, --baz enable some baz - -Examples: - - $ custom-help --help - $ custom-help -h - -``` - -## .outputHelp() - - Output help information without exiting. - -## .help() - - Output help information and exit immediately. - -## Links - - - [API documentation](http://visionmedia.github.com/commander.js/) - - [ascii tables](https://github.com/LearnBoost/cli-table) - - [progress bars](https://github.com/visionmedia/node-progress) - - [more progress bars](https://github.com/substack/node-multimeter) - - [examples](https://github.com/visionmedia/commander.js/tree/master/examples) - -## License - -(The MIT License) - -Copyright (c) 2011 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/node_modules/gulp-minify-css/node_modules/clean-css/node_modules/commander/index.js b/node_modules/gulp-minify-css/node_modules/clean-css/node_modules/commander/index.js deleted file mode 100644 index d5778a75..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/node_modules/commander/index.js +++ /dev/null @@ -1,847 +0,0 @@ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter; -var spawn = require('child_process').spawn; -var fs = require('fs'); -var exists = fs.existsSync; -var path = require('path'); -var dirname = path.dirname; -var basename = path.basename; - -/** - * Expose the root command. - */ - -exports = module.exports = new Command; - -/** - * Expose `Command`. - */ - -exports.Command = Command; - -/** - * Expose `Option`. - */ - -exports.Option = Option; - -/** - * Initialize a new `Option` with the given `flags` and `description`. - * - * @param {String} flags - * @param {String} description - * @api public - */ - -function Option(flags, description) { - this.flags = flags; - this.required = ~flags.indexOf('<'); - this.optional = ~flags.indexOf('['); - this.bool = !~flags.indexOf('-no-'); - flags = flags.split(/[ ,|]+/); - if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift(); - this.long = flags.shift(); - this.description = description || ''; -} - -/** - * Return option name. - * - * @return {String} - * @api private - */ - -Option.prototype.name = function(){ - return this.long - .replace('--', '') - .replace('no-', ''); -}; - -/** - * Check if `arg` matches the short or long flag. - * - * @param {String} arg - * @return {Boolean} - * @api private - */ - -Option.prototype.is = function(arg){ - return arg == this.short - || arg == this.long; -}; - -/** - * Initialize a new `Command`. - * - * @param {String} name - * @api public - */ - -function Command(name) { - this.commands = []; - this.options = []; - this._execs = []; - this._args = []; - this._name = name; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Command.prototype.__proto__ = EventEmitter.prototype; - -/** - * Add command `name`. - * - * The `.action()` callback is invoked when the - * command `name` is specified via __ARGV__, - * and the remaining arguments are applied to the - * function for access. - * - * When the `name` is "*" an un-matched command - * will be passed as the first arg, followed by - * the rest of __ARGV__ remaining. - * - * Examples: - * - * program - * .version('0.0.1') - * .option('-C, --chdir <path>', 'change the working directory') - * .option('-c, --config <path>', 'set config path. defaults to ./deploy.conf') - * .option('-T, --no-tests', 'ignore test hook') - * - * program - * .command('setup') - * .description('run remote setup commands') - * .action(function(){ - * console.log('setup'); - * }); - * - * program - * .command('exec <cmd>') - * .description('run the given remote command') - * .action(function(cmd){ - * console.log('exec "%s"', cmd); - * }); - * - * program - * .command('*') - * .description('deploy the given env') - * .action(function(env){ - * console.log('deploying "%s"', env); - * }); - * - * program.parse(process.argv); - * - * @param {String} name - * @param {String} [desc] - * @return {Command} the new command - * @api public - */ - -Command.prototype.command = function(name, desc){ - var args = name.split(/ +/); - var cmd = new Command(args.shift()); - if (desc) cmd.description(desc); - if (desc) this.executables = true; - if (desc) this._execs[cmd._name] = true; - this.commands.push(cmd); - cmd.parseExpectedArgs(args); - cmd.parent = this; - if (desc) return this; - return cmd; -}; - -/** - * Add an implicit `help [cmd]` subcommand - * which invokes `--help` for the given command. - * - * @api private - */ - -Command.prototype.addImplicitHelpCommand = function() { - this.command('help [cmd]', 'display help for [cmd]'); -}; - -/** - * Parse expected `args`. - * - * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. - * - * @param {Array} args - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parseExpectedArgs = function(args){ - if (!args.length) return; - var self = this; - args.forEach(function(arg){ - switch (arg[0]) { - case '<': - self._args.push({ required: true, name: arg.slice(1, -1) }); - break; - case '[': - self._args.push({ required: false, name: arg.slice(1, -1) }); - break; - } - }); - return this; -}; - -/** - * Register callback `fn` for the command. - * - * Examples: - * - * program - * .command('help') - * .description('display verbose help') - * .action(function(){ - * // output help here - * }); - * - * @param {Function} fn - * @return {Command} for chaining - * @api public - */ - -Command.prototype.action = function(fn){ - var self = this; - this.parent.on(this._name, function(args, unknown){ - // Parse any so-far unknown options - unknown = unknown || []; - var parsed = self.parseOptions(unknown); - - // Output help if necessary - outputHelpIfNecessary(self, parsed.unknown); - - // If there are still any unknown options, then we simply - // die, unless someone asked for help, in which case we give it - // to them, and then we die. - if (parsed.unknown.length > 0) { - self.unknownOption(parsed.unknown[0]); - } - - // Leftover arguments need to be pushed back. Fixes issue #56 - if (parsed.args.length) args = parsed.args.concat(args); - - self._args.forEach(function(arg, i){ - if (arg.required && null == args[i]) { - self.missingArgument(arg.name); - } - }); - - // Always append ourselves to the end of the arguments, - // to make sure we match the number of arguments the user - // expects - if (self._args.length) { - args[self._args.length] = self; - } else { - args.push(self); - } - - fn.apply(this, args); - }); - return this; -}; - -/** - * Define option with `flags`, `description` and optional - * coercion `fn`. - * - * The `flags` string should contain both the short and long flags, - * separated by comma, a pipe or space. The following are all valid - * all will output this way when `--help` is used. - * - * "-p, --pepper" - * "-p|--pepper" - * "-p --pepper" - * - * Examples: - * - * // simple boolean defaulting to false - * program.option('-p, --pepper', 'add pepper'); - * - * --pepper - * program.pepper - * // => Boolean - * - * // simple boolean defaulting to false - * program.option('-C, --no-cheese', 'remove cheese'); - * - * program.cheese - * // => true - * - * --no-cheese - * program.cheese - * // => true - * - * // required argument - * program.option('-C, --chdir <path>', 'change the working directory'); - * - * --chdir /tmp - * program.chdir - * // => "/tmp" - * - * // optional argument - * program.option('-c, --cheese [type]', 'add cheese [marble]'); - * - * @param {String} flags - * @param {String} description - * @param {Function|Mixed} fn or default - * @param {Mixed} defaultValue - * @return {Command} for chaining - * @api public - */ - -Command.prototype.option = function(flags, description, fn, defaultValue){ - var self = this - , option = new Option(flags, description) - , oname = option.name() - , name = camelcase(oname); - - // default as 3rd arg - if ('function' != typeof fn) defaultValue = fn, fn = null; - - // preassign default value only for --no-*, [optional], or <required> - if (false == option.bool || option.optional || option.required) { - // when --no-* we make sure default is true - if (false == option.bool) defaultValue = true; - // preassign only if we have a default - if (undefined !== defaultValue) self[name] = defaultValue; - } - - // register the option - this.options.push(option); - - // when it's passed assign the value - // and conditionally invoke the callback - this.on(oname, function(val){ - // coercion - if (null != val && fn) val = fn(val); - - // unassigned or bool - if ('boolean' == typeof self[name] || 'undefined' == typeof self[name]) { - // if no value, bool true, and we have a default, then use it! - if (null == val) { - self[name] = option.bool - ? defaultValue || true - : false; - } else { - self[name] = val; - } - } else if (null !== val) { - // reassign - self[name] = val; - } - }); - - return this; -}; - -/** - * Parse `argv`, settings options and invoking commands when defined. - * - * @param {Array} argv - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parse = function(argv){ - // implicit help - if (this.executables) this.addImplicitHelpCommand(); - - // store raw args - this.rawArgs = argv; - - // guess name - this._name = this._name || basename(argv[1]); - - // process argv - var parsed = this.parseOptions(this.normalize(argv.slice(2))); - var args = this.args = parsed.args; - - var result = this.parseArgs(this.args, parsed.unknown); - - // executable sub-commands - var name = result.args[0]; - if (this._execs[name]) return this.executeSubCommand(argv, args, parsed.unknown); - - return result; -}; - -/** - * Execute a sub-command executable. - * - * @param {Array} argv - * @param {Array} args - * @param {Array} unknown - * @api private - */ - -Command.prototype.executeSubCommand = function(argv, args, unknown) { - args = args.concat(unknown); - - if (!args.length) this.help(); - if ('help' == args[0] && 1 == args.length) this.help(); - - // <cmd> --help - if ('help' == args[0]) { - args[0] = args[1]; - args[1] = '--help'; - } - - // executable - var dir = dirname(argv[1]); - var bin = basename(argv[1]) + '-' + args[0]; - - // check for ./<bin> first - var local = path.join(dir, bin); - - // run it - args = args.slice(1); - var proc = spawn(local, args, { stdio: 'inherit', customFds: [0, 1, 2] }); - proc.on('error', function(err){ - if (err.code == "ENOENT") { - console.error('\n %s(1) does not exist, try --help\n', bin); - } else if (err.code == "EACCES") { - console.error('\n %s(1) not executable. try chmod or run with root\n', bin); - } - }); - - this.runningCommand = proc; -}; - -/** - * Normalize `args`, splitting joined short flags. For example - * the arg "-abc" is equivalent to "-a -b -c". - * This also normalizes equal sign and splits "--abc=def" into "--abc def". - * - * @param {Array} args - * @return {Array} - * @api private - */ - -Command.prototype.normalize = function(args){ - var ret = [] - , arg - , index; - - for (var i = 0, len = args.length; i < len; ++i) { - arg = args[i]; - if (arg.length > 1 && '-' == arg[0] && '-' != arg[1]) { - arg.slice(1).split('').forEach(function(c){ - ret.push('-' + c); - }); - } else if (/^--/.test(arg) && ~(index = arg.indexOf('='))) { - ret.push(arg.slice(0, index), arg.slice(index + 1)); - } else { - ret.push(arg); - } - } - - return ret; -}; - -/** - * Parse command `args`. - * - * When listener(s) are available those - * callbacks are invoked, otherwise the "*" - * event is emitted and those actions are invoked. - * - * @param {Array} args - * @return {Command} for chaining - * @api private - */ - -Command.prototype.parseArgs = function(args, unknown){ - var cmds = this.commands - , len = cmds.length - , name; - - if (args.length) { - name = args[0]; - if (this.listeners(name).length) { - this.emit(args.shift(), args, unknown); - } else { - this.emit('*', args); - } - } else { - outputHelpIfNecessary(this, unknown); - - // If there were no args and we have unknown options, - // then they are extraneous and we need to error. - if (unknown.length > 0) { - this.unknownOption(unknown[0]); - } - } - - return this; -}; - -/** - * Return an option matching `arg` if any. - * - * @param {String} arg - * @return {Option} - * @api private - */ - -Command.prototype.optionFor = function(arg){ - for (var i = 0, len = this.options.length; i < len; ++i) { - if (this.options[i].is(arg)) { - return this.options[i]; - } - } -}; - -/** - * Parse options from `argv` returning `argv` - * void of these options. - * - * @param {Array} argv - * @return {Array} - * @api public - */ - -Command.prototype.parseOptions = function(argv){ - var args = [] - , len = argv.length - , literal - , option - , arg; - - var unknownOptions = []; - - // parse options - for (var i = 0; i < len; ++i) { - arg = argv[i]; - - // literal args after -- - if ('--' == arg) { - literal = true; - continue; - } - - if (literal) { - args.push(arg); - continue; - } - - // find matching Option - option = this.optionFor(arg); - - // option is defined - if (option) { - // requires arg - if (option.required) { - arg = argv[++i]; - if (null == arg) return this.optionMissingArgument(option); - if ('-' == arg[0] && '-' != arg) return this.optionMissingArgument(option, arg); - this.emit(option.name(), arg); - // optional arg - } else if (option.optional) { - arg = argv[i+1]; - if (null == arg || ('-' == arg[0] && '-' != arg)) { - arg = null; - } else { - ++i; - } - this.emit(option.name(), arg); - // bool - } else { - this.emit(option.name()); - } - continue; - } - - // looks like an option - if (arg.length > 1 && '-' == arg[0]) { - unknownOptions.push(arg); - - // If the next argument looks like it might be - // an argument for this option, we pass it on. - // If it isn't, then it'll simply be ignored - if (argv[i+1] && '-' != argv[i+1][0]) { - unknownOptions.push(argv[++i]); - } - continue; - } - - // arg - args.push(arg); - } - - return { args: args, unknown: unknownOptions }; -}; - -/** - * Argument `name` is missing. - * - * @param {String} name - * @api private - */ - -Command.prototype.missingArgument = function(name){ - console.error(); - console.error(" error: missing required argument `%s'", name); - console.error(); - process.exit(1); -}; - -/** - * `Option` is missing an argument, but received `flag` or nothing. - * - * @param {String} option - * @param {String} flag - * @api private - */ - -Command.prototype.optionMissingArgument = function(option, flag){ - console.error(); - if (flag) { - console.error(" error: option `%s' argument missing, got `%s'", option.flags, flag); - } else { - console.error(" error: option `%s' argument missing", option.flags); - } - console.error(); - process.exit(1); -}; - -/** - * Unknown option `flag`. - * - * @param {String} flag - * @api private - */ - -Command.prototype.unknownOption = function(flag){ - console.error(); - console.error(" error: unknown option `%s'", flag); - console.error(); - process.exit(1); -}; - - -/** - * Set the program version to `str`. - * - * This method auto-registers the "-V, --version" flag - * which will print the version number when passed. - * - * @param {String} str - * @param {String} flags - * @return {Command} for chaining - * @api public - */ - -Command.prototype.version = function(str, flags){ - if (0 == arguments.length) return this._version; - this._version = str; - flags = flags || '-V, --version'; - this.option(flags, 'output the version number'); - this.on('version', function(){ - console.log(str); - process.exit(0); - }); - return this; -}; - -/** - * Set the description `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.description = function(str){ - if (0 == arguments.length) return this._description; - this._description = str; - return this; -}; - -/** - * Set / get the command usage `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.usage = function(str){ - var args = this._args.map(function(arg){ - return arg.required - ? '<' + arg.name + '>' - : '[' + arg.name + ']'; - }); - - var usage = '[options' - + (this.commands.length ? '] [command' : '') - + ']' - + (this._args.length ? ' ' + args : ''); - - if (0 == arguments.length) return this._usage || usage; - this._usage = str; - - return this; -}; - -/** - * Return the largest option length. - * - * @return {Number} - * @api private - */ - -Command.prototype.largestOptionLength = function(){ - return this.options.reduce(function(max, option){ - return Math.max(max, option.flags.length); - }, 0); -}; - -/** - * Return help for options. - * - * @return {String} - * @api private - */ - -Command.prototype.optionHelp = function(){ - var width = this.largestOptionLength(); - - // Prepend the help information - return [pad('-h, --help', width) + ' ' + 'output usage information'] - .concat(this.options.map(function(option){ - return pad(option.flags, width) - + ' ' + option.description; - })) - .join('\n'); -}; - -/** - * Return command help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.commandHelp = function(){ - if (!this.commands.length) return ''; - return [ - '' - , ' Commands:' - , '' - , this.commands.map(function(cmd){ - var args = cmd._args.map(function(arg){ - return arg.required - ? '<' + arg.name + '>' - : '[' + arg.name + ']'; - }).join(' '); - - return pad(cmd._name - + (cmd.options.length - ? ' [options]' - : '') + ' ' + args, 22) - + (cmd.description() - ? ' ' + cmd.description() - : ''); - }).join('\n').replace(/^/gm, ' ') - , '' - ].join('\n'); -}; - -/** - * Return program help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.helpInformation = function(){ - return [ - '' - , ' Usage: ' + this._name + ' ' + this.usage() - , '' + this.commandHelp() - , ' Options:' - , '' - , '' + this.optionHelp().replace(/^/gm, ' ') - , '' - , '' - ].join('\n'); -}; - -/** - * Output help information for this command - * - * @api public - */ - -Command.prototype.outputHelp = function(){ - process.stdout.write(this.helpInformation()); - this.emit('--help'); -}; - -/** - * Output help information and exit. - * - * @api public - */ - -Command.prototype.help = function(){ - this.outputHelp(); - process.exit(); -}; - -/** - * Camel-case the given `flag` - * - * @param {String} flag - * @return {String} - * @api private - */ - -function camelcase(flag) { - return flag.split('-').reduce(function(str, word){ - return str + word[0].toUpperCase() + word.slice(1); - }); -} - -/** - * Pad `str` to `width`. - * - * @param {String} str - * @param {Number} width - * @return {String} - * @api private - */ - -function pad(str, width) { - var len = Math.max(0, width - str.length); - return str + Array(len + 1).join(' '); -} - -/** - * Output help information if necessary - * - * @param {Command} command to output help for - * @param {Array} array of options to search for -h or --help - * @api private - */ - -function outputHelpIfNecessary(cmd, options) { - options = options || []; - for (var i = 0; i < options.length; i++) { - if (options[i] == '--help' || options[i] == '-h') { - cmd.outputHelp(); - process.exit(0); - } - } -} diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/node_modules/commander/package.json b/node_modules/gulp-minify-css/node_modules/clean-css/node_modules/commander/package.json deleted file mode 100644 index 0fe5fa89..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/node_modules/commander/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "commander", - "version": "2.0.0", - "description": "the complete solution for node.js command-line programs", - "keywords": [ - "command", - "option", - "parser", - "prompt", - "stdin" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "repository": { - "type": "git", - "url": "https://github.com/visionmedia/commander.js.git" - }, - "devDependencies": { - "should": ">= 0.0.1" - }, - "scripts": { - "test": "make test" - }, - "main": "index", - "engines": { - "node": ">= 0.6.x" - }, - "readme": "# Commander.js\n\n The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander).\n\n [![Build Status](https://secure.travis-ci.org/visionmedia/commander.js.png)](http://travis-ci.org/visionmedia/commander.js)\n\n## Installation\n\n $ npm install commander\n\n## Option parsing\n\n Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('commander');\n\nprogram\n .version('0.0.1')\n .option('-p, --peppers', 'Add peppers')\n .option('-P, --pineapple', 'Add pineapple')\n .option('-b, --bbq', 'Add bbq sauce')\n .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble')\n .parse(process.argv);\n\nconsole.log('you ordered a pizza with:');\nif (program.peppers) console.log(' - peppers');\nif (program.pineapple) console.log(' - pineapple');\nif (program.bbq) console.log(' - bbq');\nconsole.log(' - %s cheese', program.cheese);\n```\n\n Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as \"--template-engine\" are camel-cased, becoming `program.templateEngine` etc.\n\n## Automated --help\n\n The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free:\n\n``` \n $ ./examples/pizza --help\n\n Usage: pizza [options]\n\n Options:\n\n -V, --version output the version number\n -p, --peppers Add peppers\n -P, --pineapple Add pineapple\n -b, --bbq Add bbq sauce\n -c, --cheese <type> Add the specified type of cheese [marble]\n -h, --help output usage information\n\n```\n\n## Coercion\n\n```js\nfunction range(val) {\n return val.split('..').map(Number);\n}\n\nfunction list(val) {\n return val.split(',');\n}\n\nprogram\n .version('0.0.1')\n .usage('[options] <file ...>')\n .option('-i, --integer <n>', 'An integer argument', parseInt)\n .option('-f, --float <n>', 'A float argument', parseFloat)\n .option('-r, --range <a>..<b>', 'A range', range)\n .option('-l, --list <items>', 'A list', list)\n .option('-o, --optional [value]', 'An optional value')\n .parse(process.argv);\n\nconsole.log(' int: %j', program.integer);\nconsole.log(' float: %j', program.float);\nconsole.log(' optional: %j', program.optional);\nprogram.range = program.range || [];\nconsole.log(' range: %j..%j', program.range[0], program.range[1]);\nconsole.log(' list: %j', program.list);\nconsole.log(' args: %j', program.args);\n```\n\n## Custom help\n\n You can display arbitrary `-h, --help` information\n by listening for \"--help\". Commander will automatically\n exit once you are done so that the remainder of your program\n does not execute causing undesired behaviours, for example\n in the following executable \"stuff\" will not output when\n `--help` is used.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('../');\n\nfunction list(val) {\n return val.split(',').map(Number);\n}\n\nprogram\n .version('0.0.1')\n .option('-f, --foo', 'enable some foo')\n .option('-b, --bar', 'enable some bar')\n .option('-B, --baz', 'enable some baz');\n\n// must be before .parse() since\n// node's emit() is immediate\n\nprogram.on('--help', function(){\n console.log(' Examples:');\n console.log('');\n console.log(' $ custom-help --help');\n console.log(' $ custom-help -h');\n console.log('');\n});\n\nprogram.parse(process.argv);\n\nconsole.log('stuff');\n```\n\nyielding the following help output:\n\n```\n\nUsage: custom-help [options]\n\nOptions:\n\n -h, --help output usage information\n -V, --version output the version number\n -f, --foo enable some foo\n -b, --bar enable some bar\n -B, --baz enable some baz\n\nExamples:\n\n $ custom-help --help\n $ custom-help -h\n\n```\n\n## .outputHelp()\n\n Output help information without exiting.\n\n## .help()\n\n Output help information and exit immediately.\n\n## Links\n\n - [API documentation](http://visionmedia.github.com/commander.js/)\n - [ascii tables](https://github.com/LearnBoost/cli-table)\n - [progress bars](https://github.com/visionmedia/node-progress)\n - [more progress bars](https://github.com/substack/node-multimeter)\n - [examples](https://github.com/visionmedia/commander.js/tree/master/examples)\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/commander.js/issues" - }, - "homepage": "https://github.com/visionmedia/commander.js", - "_id": "commander@2.0.0", - "_from": "commander@2.0.x" -} diff --git a/node_modules/gulp-minify-css/node_modules/clean-css/package.json b/node_modules/gulp-minify-css/node_modules/clean-css/package.json deleted file mode 100644 index 82a0cd91..00000000 --- a/node_modules/gulp-minify-css/node_modules/clean-css/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "clean-css", - "version": "2.0.8", - "author": { - "name": "Jakub Pawlowicz", - "email": "jakub@goalsmashers.com", - "url": "http://twitter.com/GoalSmashers" - }, - "description": "A well-tested CSS minifier", - "license": "MIT", - "keywords": [ - "css", - "minifier" - ], - "homepage": "https://github.com/GoalSmashers/clean-css", - "repository": { - "type": "git", - "url": "https://github.com/GoalSmashers/clean-css.git" - }, - "bugs": { - "url": "https://github.com/GoalSmashers/clean-css/issues" - }, - "bin": { - "cleancss": "./bin/cleancss" - }, - "main": "index.js", - "files": [ - "bin", - "lib", - "History.md", - "index.js", - "LICENSE" - ], - "scripts": { - "bench": "node ./test/bench.js", - "check": "jshint .", - "prepublish": "jshint .", - "test": "vows" - }, - "dependencies": { - "commander": "2.0.x" - }, - "devDependencies": { - "jshint": "2.3.x", - "vows": "0.7.x" - }, - "jshintConfig": { - "browser": false, - "camelcase": true, - "curly": false, - "eqeqeq": false, - "eqnull": true, - "immed": true, - "latedef": true, - "multistr": true, - "noarg": true, - "node": true, - "plusplus": false, - "quotmark": "single", - "strict": false, - "trailing": true, - "undef": true, - "unused": true - }, - "engines": { - "node": ">=0.8.0" - }, - "readme": "[![NPM version](https://badge.fury.io/js/clean-css.png)](https://badge.fury.io/js/clean-css)\n[![Build Status](https://secure.travis-ci.org/GoalSmashers/clean-css.png)](https://travis-ci.org/GoalSmashers/clean-css)\n[![Dependency Status](https://david-dm.org/GoalSmashers/clean-css.png)](https://david-dm.org/GoalSmashers/clean-css)\n[![devDependency Status](https://david-dm.org/GoalSmashers/clean-css/dev-status.png)](https://david-dm.org/GoalSmashers/clean-css#info=devDependencies)\n\n## What is clean-css?\n\nClean-css is a fast and efficient [node.js](http://nodejs.org/) library for minifying CSS files.\n\nAccording to [tests](https://github.com/GoalSmashers/css-minification-benchmark) it is one of the best available.\n\n\n## Usage\n\n### What are the requirements?\n\n```\nnode.js 0.8.0+ (tested on CentOS, Ubuntu, OS X 10.6+, and Windows 7+)\n```\n\n### How to install clean-css?\n\n```\nnpm install clean-css\n```\n\n### How to upgrade clean-css from 1.x to 2.x?\n\n#### Command-line interface (CLI)\n\n```\nnpm update clean-css\n```\n\nor point `package.json` to version 2.x. That's it!\n\n#### Node.js module\n\nUpdate `clean-css` as for CLI above.\nThen change your JavaScript code from:\n\n```js\nvar minimized = CleanCSS.process(source, options);\n```\n\ninto\n\n```js\nvar minimized = new CleanCSS(options).minify(source);\n```\n\nAnd you are done.\n\n### How to use clean-css CLI?\n\nClean-css accepts the following command line arguments (please make sure\nyou use `<source-file>` as the very last argument to avoid potential issues):\n\n```\ncleancss [options] <source-file>\n\n-h, --help Output usage information\n-v, --version Output the version number\n-b, --keep-line-breaks Keep line breaks\n--s0 Remove all special comments, i.e. /*! comment */\n--s1 Remove all special comments but the first one\n-r, --root [root-path] A root path to which resolve absolute @import rules\n and rebase relative URLs\n-o, --output [output-file] Use [output-file] as output instead of STDOUT\n-s, --skip-import Disable @import processing\n--skip-rebase Disable URLs rebasing\n--skip-advanced Disable advanced optimizations - selector & property merging,\n reduction, etc.\n--selectors-merge-mode [ie8|*] Use `ie8` for compatibility mode, `*` for merge all (default)\n-d, --debug Shows debug information (minification time & compression efficiency)\n```\n\n#### Examples:\n\nTo minify a **public.css** file into **public-min.css** do:\n\n```\ncleancss -o public-min.css public.css\n```\n\nTo minify the same **public.css** into the standard output skip the `-o` parameter:\n\n```\ncleancss public.css\n```\n\nMore likely you would like to concatenate a couple of files.\nIf you are on a Unix-like system:\n\n```bash\ncat one.css two.css three.css | cleancss -o merged-and-minified.css\n```\n\nOn Windows:\n\n```bat\ntype one.css two.css three.css | cleancss -o merged-and-minified.css\n```\n\nOr even gzip the result at once:\n\n```bash\ncat one.css two.css three.css | cleancss | gzip -9 -c > merged-minified-and-gzipped.css.gz\n```\n\n### How to use clean-css programmatically?\n\n```js\nvar CleanCSS = require('clean-css');\nvar source = 'a{font-weight:bold;}';\nvar minimized = new CleanCSS().minify(source);\n```\n\nCleanCSS constructor accepts a hash as a parameter, i.e.,\n`new CleanCSS(options).minify(source)` with the following options available:\n\n* `keepSpecialComments` - `*` for keeping all (default), `1` for keeping first one only, `0` for removing all\n* `keepBreaks` - whether to keep line breaks (default is false)\n* `benchmark` - turns on benchmarking mode measuring time spent on cleaning up\n (run `npm run bench` to see example)\n* `root` - path to resolve absolute `@import` rules and rebase relative URLs\n* `relativeTo` - path with which to resolve relative `@import` rules and URLs\n* `processImport` - whether to process `@import` rules\n* `noRebase` - whether to skip URLs rebasing\n* `noAdvanced` - set to true to disable advanced optimizations - selector & property merging, reduction, etc.\n* `selectorsMergeMode` - `ie8` for IE8 compatibility mode, `*` for merging all (default)\n* `debug` - set to true to get minification statistics under `stats` property (see `test/custom-test.js` for examples)\n\n### What are the clean-css' dev commands?\n\nFirst clone the source, then run:\n\n* `npm run bench` for clean-css benchmarks (see [test/bench.js](https://github.com/GoalSmashers/clean-css/blob/master/test/bench.js) for details)\n* `npm run check` to check JS sources with [JSHint](https://github.com/jshint/jshint/)\n* `npm test` for the test suite\n\n## Tips & Tricks\n\n### How to preserve a comment block?\n\nUse the `/*!` notation instead of the standard one `/*`:\n\n```css\n/*!\n Important comments included in minified output.\n*/\n```\n\n### How to rebase relative image URLs\n\nClean-css will handle it automatically for you (since version 1.1) in the following cases:\n\n* When using the CLI:\n 1. Use an output path via `-o`/`--output` to rebase URLs as relative to the output file.\n 2. Use a root path via `-r`/`--root` to rebase URLs as absolute from the given root path.\n 3. If you specify both then `-r`/`--root` takes precendence.\n* When using clean-css as a library:\n 1. Use a combination of `relativeTo` and `target` options for relative rebase (same as 1 in CLI).\n 2. Use a combination of `relativeTo` and `root` options for absolute rebase (same as 2 in CLI).\n 3. `root` takes precendence over `target` as in CLI.\n\n## Acknowledgments\n\n* Vincent Voyer ([@vvo](https://github.com/vvo)) for a patch with better\n empty element regex and for inspiring us to do many performance improvements\n in 0.4 release.\n* Isaac ([@facelessuser](https://github.com/facelessuser)) for pointing out\n a flaw in clean-css' stateless mode.\n* Jan Michael Alonzo ([@jmalonzo](https://github.com/jmalonzo)) for a patch\n removing node.js' old `sys` package.\n* [@XhmikosR](https://github.com/XhmikosR) for suggesting new features\n (option to remove special comments and strip out URLs quotation) and\n pointing out numerous improvements (JSHint, media queries).\n* Anthony Barre ([@abarre](https://github.com/abarre)) for improvements to\n `@import` processing, namely introducing the `--skip-import` /\n `processImport` options.\n* Simon Altschuler ([@altschuler](https://github.com/altschuler)) for fixing\n `@import` processing inside comments.\n\n## License\n\nClean-css is released under the [MIT License](https://github.com/GoalSmashers/clean-css/blob/master/LICENSE).\n", - "readmeFilename": "README.md", - "_id": "clean-css@2.0.8", - "_from": "clean-css@~2.0.7" -} diff --git a/node_modules/gulp-minify-css/node_modules/clone/.npmignore b/node_modules/gulp-minify-css/node_modules/clone/.npmignore deleted file mode 100644 index c2658d7d..00000000 --- a/node_modules/gulp-minify-css/node_modules/clone/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ diff --git a/node_modules/gulp-minify-css/node_modules/clone/.travis.yml b/node_modules/gulp-minify-css/node_modules/clone/.travis.yml deleted file mode 100644 index 58f23716..00000000 --- a/node_modules/gulp-minify-css/node_modules/clone/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - 0.10 diff --git a/node_modules/gulp-minify-css/node_modules/clone/LICENSE b/node_modules/gulp-minify-css/node_modules/clone/LICENSE deleted file mode 100644 index f6514e9a..00000000 --- a/node_modules/gulp-minify-css/node_modules/clone/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright © 2011-2013 Paul Vorbach <paul@vorb.de> - -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, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-minify-css/node_modules/clone/README.md b/node_modules/gulp-minify-css/node_modules/clone/README.md deleted file mode 100644 index 6fe17b0b..00000000 --- a/node_modules/gulp-minify-css/node_modules/clone/README.md +++ /dev/null @@ -1,124 +0,0 @@ -# clone - -[![build status](https://secure.travis-ci.org/pvorb/node-clone.png)](http://travis-ci.org/pvorb/node-clone) - -offers foolproof _deep cloning_ of variables in JavaScript. - - -## Installation - - npm install clone - -or - - ender build clone - - -## Example - -~~~ javascript -var clone = require('clone'); - -var a, b; - -a = { foo: { bar: 'baz' } }; // inital value of a - -b = clone(a); // clone a -> b -a.foo.bar = 'foo'; // change a - -console.log(a); // show a -console.log(b); // show b -~~~ - -This will print: - -~~~ javascript -{ foo: { bar: 'foo' } } -{ foo: { bar: 'baz' } } -~~~ - -**clone** masters cloning simple objects (even with custom prototype), arrays, -Date objects, and RegExp objects. Everything is cloned recursively, so that you -can clone dates in arrays in objects, for example. - - -## API - -`clone(val, circular)` - - * `val` -- the value that you want to clone, any type allowed - * `circular` -- boolean - - Call `clone` with `circular` set to `false` if you are certain that `obj` - contains no circular references. This will give better performance if needed. - There is no error if `undefined` or `null` is passed as `obj`. - -`clone.clonePrototype(obj)` - - * `obj` -- the object that you want to clone - -Does a prototype clone as -[described by Oran Looney](http://oranlooney.com/functional-javascript/). - - -## Circular References - -~~~ javascript -var a, b; - -a = { hello: 'world' }; - -a.myself = a; -b = clone(a); - -console.log(b); -~~~ - -This will print: - -~~~ javascript -{ hello: "world", myself: [Circular] } -~~~ - -So, `b.myself` points to `b`, not `a`. Neat! - - -## Test - - npm test - - -## Caveat - -Some special objects like a socket or `process.stdout`/`stderr` are known to not -be cloneable. If you find other objects that cannot be cloned, please [open an -issue](https://github.com/pvorb/node-clone/issues/new). - - -## Bugs and Issues - -If you encounter any bugs or issues, feel free to -[open an issue at github](https://github.com/pvorb/node-clone/issues) or send me -an email to <paul@vorb.de>. I also always like to hear from you, if you’re using -my code. - -## License - -Copyright © 2011-2013 Paul Vorbach - -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, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-minify-css/node_modules/clone/clone.js b/node_modules/gulp-minify-css/node_modules/clone/clone.js deleted file mode 100644 index 814056e4..00000000 --- a/node_modules/gulp-minify-css/node_modules/clone/clone.js +++ /dev/null @@ -1,159 +0,0 @@ -"use strict"; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - -var util = { - isArray: function (ar) { - return Array.isArray(ar) || (typeof ar === 'object' && objectToString(ar) === '[object Array]'); - }, - isDate: function (d) { - return typeof d === 'object' && objectToString(d) === '[object Date]'; - }, - isRegExp: function (re) { - return typeof re === 'object' && objectToString(re) === '[object RegExp]'; - }, - getRegExpFlags: function (re) { - var flags = ''; - re.global && (flags += 'g'); - re.ignoreCase && (flags += 'i'); - re.multiline && (flags += 'm'); - return flags; - } -}; - -if (typeof module === 'object') - module.exports = clone; - -/** - * Clones (copies) an Object using deep copying. - * - * This function supports circular references by default, but if you are certain - * there are no circular references in your object, you can save some CPU time - * by calling clone(obj, false). - * - * Caution: if `circular` is false and `parent` contains circular references, - * your program may enter an infinite loop and crash. - * - * @param `parent` - the object to be cloned - * @param `circular` - set to true if the object to be cloned may contain - * circular references. (optional - true by default) -*/ -function clone(parent, circular) { - if (typeof circular == 'undefined') - circular = true; - - var useBuffer = typeof Buffer != 'undefined'; - - var circularParent = {}; - var circularResolved = {}; - var circularReplace = []; - - function _clone(parent, context, child, cIndex) { - var i; // Use local context within this function - // Deep clone all properties of parent into child - if (typeof parent == 'object') { - if (parent == null) - return parent; - // Check for circular references - for(i in circularParent) - if (circularParent[i] === parent) { - // We found a circular reference - circularReplace.push({'resolveTo': i, 'child': child, 'i': cIndex}); - return null; //Just return null for now... - // we will resolve circular references later - } - - // Add to list of all parent objects - circularParent[context] = parent; - // Now continue cloning... - if (util.isArray(parent)) { - child = []; - for(i in parent) - child[i] = _clone(parent[i], context + '[' + i + ']', child, i); - } - else if (util.isDate(parent)) - child = new Date(parent.getTime()); - else if (util.isRegExp(parent)) { - child = new RegExp(parent.source, util.getRegExpFlags(parent)); - if (parent.lastIndex) child.lastIndex = parent.lastIndex; - } else if (useBuffer && Buffer.isBuffer(parent)) - { - child = new Buffer(parent.length); - parent.copy(child); - } - else { - child = {}; - - // Also copy prototype over to new cloned object - child.__proto__ = parent.__proto__; - for(i in parent) - child[i] = _clone(parent[i], context + '[' + i + ']', child, i); - } - - // Add to list of all cloned objects - circularResolved[context] = child; - } - else - child = parent; //Just a simple shallow copy will do - return child; - } - - var i; - if (circular) { - var cloned = _clone(parent, '*'); - - // Now this object has been cloned. Let's check to see if there are any - // circular references for it - for(i in circularReplace) { - var c = circularReplace[i]; - if (c && c.child && c.i in c.child) { - c.child[c.i] = circularResolved[c.resolveTo]; - } - } - return cloned; - } else { - // Deep clone all properties of parent into child - var child; - if (typeof parent == 'object') { - if (parent == null) - return parent; - if (parent.constructor.name === 'Array') { - child = []; - for(i in parent) - child[i] = clone(parent[i], circular); - } - else if (util.isDate(parent)) - child = new Date(parent.getTime() ); - else if (util.isRegExp(parent)) { - child = new RegExp(parent.source, util.getRegExpFlags(parent)); - if (parent.lastIndex) child.lastIndex = parent.lastIndex; - } else { - child = {}; - child.__proto__ = parent.__proto__; - for(i in parent) - child[i] = clone(parent[i], circular); - } - } - else - child = parent; // Just a simple shallow clone will do - return child; - } -} - -/** - * Simple flat clone using prototype, accepts only objects, usefull for property - * override on FLAT configuration object (no nested props). - * - * USE WITH CAUTION! This may not behave as you wish if you do not know how this - * works. - */ -clone.clonePrototype = function(parent) { - if (parent === null) - return null; - - var c = function () {}; - c.prototype = parent; - return new c(); -}; diff --git a/node_modules/gulp-minify-css/node_modules/clone/package.json b/node_modules/gulp-minify-css/node_modules/clone/package.json deleted file mode 100644 index c30ff568..00000000 --- a/node_modules/gulp-minify-css/node_modules/clone/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "name": "clone", - "description": "deep cloning of objects and arrays", - "tags": [ - "clone", - "object", - "array", - "function", - "date" - ], - "version": "0.1.11", - "repository": { - "type": "git", - "url": "git://github.com/pvorb/node-clone.git" - }, - "bugs": { - "url": "https://github.com/pvorb/node-clone/issues" - }, - "main": "clone.js", - "author": { - "name": "Paul Vorbach", - "email": "paul@vorb.de", - "url": "http://vorb.de" - }, - "contributors": [ - { - "name": "Blake Miner", - "email": "miner.blake@gmail.com", - "url": "http://www.blakeminer.com/" - }, - { - "name": "Tian You", - "email": "axqd001@gmail.com", - "url": "http://blog.axqd.net/" - }, - { - "name": "George Stagas", - "email": "gstagas@gmail.com", - "url": "http://stagas.com/" - }, - { - "name": "Tobiasz Cudnik", - "email": "tobiasz.cudnik@gmail.com", - "url": "https://github.com/TobiaszCudnik" - }, - { - "name": "Pavel Lang", - "email": "langpavel@phpskelet.org", - "url": "https://github.com/langpavel" - }, - { - "name": "Dan MacTough", - "url": "http://yabfog.com/" - }, - { - "name": "w1nk", - "url": "https://github.com/w1nk" - }, - { - "name": "Hugh Kennedy", - "url": "http://twitter.com/hughskennedy" - }, - { - "name": "Dustin Diaz", - "url": "http://dustindiaz.com" - }, - { - "name": "Ilya Shaisultanov", - "url": "https://github.com/diversario" - } - ], - "engines": { - "node": "*" - }, - "dependencies": {}, - "devDependencies": { - "underscore": "*", - "nodeunit": "*" - }, - "optionalDependencies": {}, - "scripts": { - "test": "nodeunit test.js" - }, - "readme": "# clone\n\n[![build status](https://secure.travis-ci.org/pvorb/node-clone.png)](http://travis-ci.org/pvorb/node-clone)\n\noffers foolproof _deep cloning_ of variables in JavaScript.\n\n\n## Installation\n\n npm install clone\n\nor\n\n ender build clone\n\n\n## Example\n\n~~~ javascript\nvar clone = require('clone');\n\nvar a, b;\n\na = { foo: { bar: 'baz' } }; // inital value of a\n\nb = clone(a); // clone a -> b\na.foo.bar = 'foo'; // change a\n\nconsole.log(a); // show a\nconsole.log(b); // show b\n~~~\n\nThis will print:\n\n~~~ javascript\n{ foo: { bar: 'foo' } }\n{ foo: { bar: 'baz' } }\n~~~\n\n**clone** masters cloning simple objects (even with custom prototype), arrays,\nDate objects, and RegExp objects. Everything is cloned recursively, so that you\ncan clone dates in arrays in objects, for example.\n\n\n## API\n\n`clone(val, circular)`\n\n * `val` -- the value that you want to clone, any type allowed\n * `circular` -- boolean\n\n Call `clone` with `circular` set to `false` if you are certain that `obj`\n contains no circular references. This will give better performance if needed.\n There is no error if `undefined` or `null` is passed as `obj`.\n\n`clone.clonePrototype(obj)`\n\n * `obj` -- the object that you want to clone\n\nDoes a prototype clone as\n[described by Oran Looney](http://oranlooney.com/functional-javascript/).\n\n\n## Circular References\n\n~~~ javascript\nvar a, b;\n\na = { hello: 'world' };\n\na.myself = a;\nb = clone(a);\n\nconsole.log(b);\n~~~\n\nThis will print:\n\n~~~ javascript\n{ hello: \"world\", myself: [Circular] }\n~~~\n\nSo, `b.myself` points to `b`, not `a`. Neat!\n\n\n## Test\n\n npm test\n\n\n## Caveat\n\nSome special objects like a socket or `process.stdout`/`stderr` are known to not\nbe cloneable. If you find other objects that cannot be cloned, please [open an\nissue](https://github.com/pvorb/node-clone/issues/new).\n\n\n## Bugs and Issues\n\nIf you encounter any bugs or issues, feel free to\n[open an issue at github](https://github.com/pvorb/node-clone/issues) or send me\nan email to <paul@vorb.de>. I also always like to hear from you, if you’re using\nmy code.\n\n## License\n\nCopyright © 2011-2013 Paul Vorbach\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the “Software”), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/pvorb/node-clone", - "_id": "clone@0.1.11", - "_from": "clone@~0.1.11" -} diff --git a/node_modules/gulp-minify-css/node_modules/clone/test.js b/node_modules/gulp-minify-css/node_modules/clone/test.js deleted file mode 100644 index 09804f82..00000000 --- a/node_modules/gulp-minify-css/node_modules/clone/test.js +++ /dev/null @@ -1,217 +0,0 @@ -if(module.parent === null) { - console.log('Run this test file with nodeunit:'); - console.log('$ nodeunit test.js'); -} - - -var clone = require('./'); -var util = require('util'); -var _ = require('underscore'); - - - -exports["clone string"] = function(test) { - test.expect(2); // how many tests? - - var a = "foo"; - test.strictEqual(clone(a), a); - a = ""; - test.strictEqual(clone(a), a); - - test.done(); -}; - - - -exports["clone number"] = function(test) { - test.expect(5); // how many tests? - - var a = 0; - test.strictEqual(clone(a), a); - a = 1; - test.strictEqual(clone(a), a); - a = -1000; - test.strictEqual(clone(a), a); - a = 3.1415927; - test.strictEqual(clone(a), a); - a = -3.1415927; - test.strictEqual(clone(a), a); - - test.done(); -}; - - - -exports["clone date"] = function(test) { - test.expect(3); // how many tests? - - var a = new Date; - var c = clone(a); - test.ok(a instanceof Date); - test.ok(c instanceof Date); - test.equal(c.getTime(), a.getTime()); - - test.done(); -}; - - - -exports["clone object"] = function(test) { - test.expect(2); // how many tests? - - var a = { foo: { bar: "baz" } }; - var b = clone(a); - - test.ok(_(a).isEqual(b), "underscore equal"); - test.deepEqual(b, a); - - test.done(); -}; - - - -exports["clone array"] = function(test) { - test.expect(2); // how many tests? - - var a = [ - { foo: "bar" }, - "baz" - ]; - var b = clone(a); - - test.ok(_(a).isEqual(b), "underscore equal"); - test.deepEqual(b, a); - - test.done(); -}; - -exports["clone buffer"] = function(test) { - test.expect(1); - - var a = new Buffer("this is a test buffer"); - var b = clone(a); - - // no underscore equal since it has no concept of Buffers - test.deepEqual(b, a); - test.done(); -}; - - - -exports["clone regexp"] = function(test) { - test.expect(5); - - var a = /abc123/gi; - var b = clone(a); - - test.deepEqual(b, a); - - var c = /a/g; - test.ok(c.lastIndex === 0); - - c.exec('123a456a'); - test.ok(c.lastIndex === 4); - - var d = clone(c); - test.ok(d.global); - test.ok(d.lastIndex === 4); - - test.done(); -}; - - -exports["clone object containing array"] = function(test) { - test.expect(2); // how many tests? - - var a = { - arr1: [ { a: '1234', b: '2345' } ], - arr2: [ { c: '345', d: '456' } ] - }; - var b = clone(a); - - test.ok(_(a).isEqual(b), "underscore equal"); - test.deepEqual(b, a); - - test.done(); -}; - - - -exports["clone object with circular reference"] = function(test) { - test.expect(8); // how many tests? - - var _ = test.ok; - var c = [1, "foo", {'hello': 'bar'}, function() {}, false, [2]]; - var b = [c, 2, 3, 4]; - var a = {'b': b, 'c': c}; - a.loop = a; - a.loop2 = a; - c.loop = c; - c.aloop = a; - var aCopy = clone(a); - _(a != aCopy); - _(a.c != aCopy.c); - _(aCopy.c == aCopy.b[0]); - _(aCopy.c.loop.loop.aloop == aCopy); - _(aCopy.c[0] == a.c[0]); - - //console.log(util.inspect(aCopy, true, null) ); - //console.log("------------------------------------------------------------"); - //console.log(util.inspect(a, true, null) ); - _(eq(a, aCopy)); - aCopy.c[0] = 2; - _(!eq(a, aCopy)); - aCopy.c = "2"; - _(!eq(a, aCopy)); - //console.log("------------------------------------------------------------"); - //console.log(util.inspect(aCopy, true, null) ); - - function eq(x, y) { - return util.inspect(x, true, null) === util.inspect(y, true, null); - } - - test.done(); -}; - - - -exports['clonePrototype'] = function(test) { - test.expect(3); // how many tests? - - var a = { - a: "aaa", - x: 123, - y: 45.65 - }; - var b = clone.clonePrototype(a); - - test.strictEqual(b.a, a.a); - test.strictEqual(b.x, a.x); - test.strictEqual(b.y, a.y); - - test.done(); -} - -exports['cloneWithinNewVMContext'] = function(test) { - test.expect(3); - var vm = require('vm'); - var ctx = vm.createContext({ clone: clone }); - var script = "clone( {array: [1, 2, 3], date: new Date(), regex: /^foo$/ig} );"; - var results = vm.runInContext(script, ctx); - test.ok(results.array instanceof Array); - test.ok(results.date instanceof Date); - test.ok(results.regex instanceof RegExp); - test.done(); -} - -exports['cloneObjectWithNoConstructor'] = function(test) { - test.expect(3); - var n = null; - var a = { foo: 'bar' }; - a.__proto__ = n; - test.ok(typeof a === 'object'); - test.ok(typeof a !== null); - var b = clone(a); - test.ok(a.foo, b.foo); - test.done(); -} diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/.npmignore b/node_modules/gulp-minify-css/node_modules/event-stream/.npmignore deleted file mode 100644 index 13abef4f..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -node_modules/* -npm_debug.log diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/.travis.yml b/node_modules/gulp-minify-css/node_modules/event-stream/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/LICENCE b/node_modules/gulp-minify-css/node_modules/event-stream/LICENCE deleted file mode 100644 index 171dd970..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/LICENCE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2011 Dominic Tarr - -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. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/examples/pretty.js b/node_modules/gulp-minify-css/node_modules/event-stream/examples/pretty.js deleted file mode 100644 index af043401..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/examples/pretty.js +++ /dev/null @@ -1,25 +0,0 @@ - -var inspect = require('util').inspect - -if(!module.parent) { - var es = require('..') //load event-stream - es.pipe( //pipe joins streams together - process.openStdin(), //open stdin - es.split(), //split stream to break on newlines - es.map(function (data, callback) {//turn this async function into a stream - var j - try { - j = JSON.parse(data) //try to parse input into json - } catch (err) { - return callback(null, data) //if it fails just pass it anyway - } - callback(null, inspect(j)) //render it nicely - }), - process.stdout // pipe it to stdout ! - ) - } - -// run this -// -// curl -sS registry.npmjs.org/event-stream | node pretty.js -// diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/index.js b/node_modules/gulp-minify-css/node_modules/event-stream/index.js deleted file mode 100644 index a7c05bbb..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/index.js +++ /dev/null @@ -1,302 +0,0 @@ -//filter will reemit the data if cb(err,pass) pass is truthy - -// reduce is more tricky -// maybe we want to group the reductions or emit progress updates occasionally -// the most basic reduce just emits one 'data' event after it has recieved 'end' - -var Stream = require('stream').Stream - , es = exports - , through = require('through') - , from = require('from') - , duplex = require('duplexer') - , map = require('map-stream') - , pause = require('pause-stream') - , split = require('split') - , pipeline = require('stream-combiner') - -es.Stream = Stream //re-export Stream from core -es.through = through -es.from = from -es.duplex = duplex -es.map = map -es.pause = pause -es.split = split -es.pipeline = es.connect = es.pipe = pipeline -// merge / concat -// -// combine multiple streams into a single stream. -// will emit end only once - -es.concat = //actually this should be called concat -es.merge = function (/*streams...*/) { - var toMerge = [].slice.call(arguments) - var stream = new Stream() - var endCount = 0 - stream.writable = stream.readable = true - - toMerge.forEach(function (e) { - e.pipe(stream, {end: false}) - var ended = false - e.on('end', function () { - if(ended) return - ended = true - endCount ++ - if(endCount == toMerge.length) - stream.emit('end') - }) - }) - stream.write = function (data) { - this.emit('data', data) - } - stream.destroy = function () { - merge.forEach(function (e) { - if(e.destroy) e.destroy() - }) - } - return stream -} - - -// writable stream, collects all events into an array -// and calls back when 'end' occurs -// mainly I'm using this to test the other functions - -es.writeArray = function (done) { - if ('function' !== typeof done) - throw new Error('function writeArray (done): done must be function') - - var a = new Stream () - , array = [], isDone = false - a.write = function (l) { - array.push(l) - } - a.end = function () { - isDone = true - done(null, array) - } - a.writable = true - a.readable = false - a.destroy = function () { - a.writable = a.readable = false - if(isDone) return - done(new Error('destroyed before end'), array) - } - return a -} - -//return a Stream that reads the properties of an object -//respecting pause() and resume() - -es.readArray = function (array) { - var stream = new Stream() - , i = 0 - , paused = false - , ended = false - - stream.readable = true - stream.writable = false - - if(!Array.isArray(array)) - throw new Error('event-stream.read expects an array') - - stream.resume = function () { - if(ended) return - paused = false - var l = array.length - while(i < l && !paused && !ended) { - stream.emit('data', array[i++]) - } - if(i == l && !ended) - ended = true, stream.readable = false, stream.emit('end') - } - process.nextTick(stream.resume) - stream.pause = function () { - paused = true - } - stream.destroy = function () { - ended = true - stream.emit('close') - } - return stream -} - -// -// readable (asyncFunction) -// return a stream that calls an async function while the stream is not paused. -// -// the function must take: (count, callback) {... -// - -es.readable = -function (func, continueOnError) { - var stream = new Stream() - , i = 0 - , paused = false - , ended = false - , reading = false - - stream.readable = true - stream.writable = false - - if('function' !== typeof func) - throw new Error('event-stream.readable expects async function') - - stream.on('end', function () { ended = true }) - - function get (err, data) { - - if(err) { - stream.emit('error', err) - if(!continueOnError) stream.emit('end') - } else if (arguments.length > 1) - stream.emit('data', data) - - process.nextTick(function () { - if(ended || paused || reading) return - try { - reading = true - func.call(stream, i++, function () { - reading = false - get.apply(null, arguments) - }) - } catch (err) { - stream.emit('error', err) - } - }) - } - stream.resume = function () { - paused = false - get() - } - process.nextTick(get) - stream.pause = function () { - paused = true - } - stream.destroy = function () { - stream.emit('end') - stream.emit('close') - ended = true - } - return stream -} - - -// -// map sync -// - -es.mapSync = function (sync) { - return es.through(function write(data) { - var mappedData = sync(data) - if (typeof mappedData !== 'undefined') - this.emit('data', mappedData) - }) -} - -// -// log just print out what is coming through the stream, for debugging -// - -es.log = function (name) { - return es.through(function (data) { - var args = [].slice.call(arguments) - if(name) console.error(name, data) - else console.error(data) - this.emit('data', data) - }) -} - - -// -// child -- pipe through a child process -// - -es.child = function (child) { - - return es.duplex(child.stdin, child.stdout) - -} - -// -// parse -// -// must be used after es.split() to ensure that each chunk represents a line -// source.pipe(es.split()).pipe(es.parse()) - -es.parse = function () { - return es.through(function (data) { - var obj - try { - if(data) //ignore empty lines - obj = JSON.parse(data.toString()) - } catch (err) { - return console.error(err, 'attemping to parse:', data) - } - //ignore lines that where only whitespace. - if(obj !== undefined) - this.emit('data', obj) - }) -} -// -// stringify -// - -es.stringify = function () { - var Buffer = require('buffer').Buffer - return es.mapSync(function (e){ - return JSON.stringify(Buffer.isBuffer(e) ? e.toString() : e) + '\n' - }) -} - -// -// replace a string within a stream. -// -// warn: just concatenates the string and then does str.split().join(). -// probably not optimal. -// for smallish responses, who cares? -// I need this for shadow-npm so it's only relatively small json files. - -es.replace = function (from, to) { - return es.pipeline(es.split(from), es.join(to)) -} - -// -// join chunks with a joiner. just like Array#join -// also accepts a callback that is passed the chunks appended together -// this is still supported for legacy reasons. -// - -es.join = function (str) { - - //legacy api - if('function' === typeof str) - return es.wait(str) - - var first = true - return es.through(function (data) { - if(!first) - this.emit('data', str) - first = false - this.emit('data', data) - return true - }) -} - - -// -// wait. callback when 'end' is emitted, with all chunks appended as string. -// - -es.wait = function (callback) { - var body = '' - return es.through(function (data) { body += data }, - function () { - this.emit('data', body) - this.emit('end') - if(callback) callback(null, body) - }) -} - -es.pipeable = function () { - throw new Error('[EVENT-STREAM] es.pipeable is deprecated') -} diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/duplexer/.npmignore b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/duplexer/.npmignore deleted file mode 100644 index 062c11e8..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/duplexer/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -*.log -*.err \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/duplexer/.travis.yml b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/duplexer/.travis.yml deleted file mode 100644 index ed05f88d..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/duplexer/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.11" - - "0.10" - - "0.8" - - "0.6" diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/duplexer/LICENCE b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/duplexer/LICENCE deleted file mode 100644 index a23e08a8..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/duplexer/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 Raynos. - -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. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/duplexer/README.md b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/duplexer/README.md deleted file mode 100644 index 61ff71aa..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/duplexer/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# duplexer - -[![build status][1]][2] [![dependency status][3]][4] - -[![browser support][5]][6] - -Creates a duplex stream - -Taken from [event-stream][7] - -## duplex (writeStream, readStream) - -Takes a writable stream and a readable stream and makes them appear as a readable writable stream. - -It is assumed that the two streams are connected to each other in some way. - -## Example - -```js -var grep = cp.exec('grep Stream') - -duplex(grep.stdin, grep.stdout) -``` - -## Installation - -`npm install duplexer` - -## Tests - -`npm test` - -## Contributors - - - Dominictarr - - Raynos - - samccone - -## MIT Licenced - - [1]: https://secure.travis-ci.org/Raynos/duplexer.png - [2]: https://travis-ci.org/Raynos/duplexer - [3]: https://david-dm.org/Raynos/duplexer.png - [4]: https://david-dm.org/Raynos/duplexer - [5]: https://ci.testling.com/Raynos/duplexer.png - [6]: https://ci.testling.com/Raynos/duplexer - [7]: https://github.com/dominictarr/event-stream#duplex-writestream-readstream diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/duplexer/index.js b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/duplexer/index.js deleted file mode 100644 index a188a210..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/duplexer/index.js +++ /dev/null @@ -1,87 +0,0 @@ -var Stream = require("stream") -var writeMethods = ["write", "end", "destroy"] -var readMethods = ["resume", "pause"] -var readEvents = ["data", "close"] -var slice = Array.prototype.slice - -module.exports = duplex - -function forEach (arr, fn) { - if (arr.forEach) { - return arr.forEach(fn) - } - - for (var i = 0; i < arr.length; i++) { - fn(arr[i], i) - } -} - -function duplex(writer, reader) { - var stream = new Stream() - var ended = false - - forEach(writeMethods, proxyWriter) - - forEach(readMethods, proxyReader) - - forEach(readEvents, proxyStream) - - reader.on("end", handleEnd) - - writer.on("drain", function() { - stream.emit("drain") - }) - - writer.on("error", reemit) - reader.on("error", reemit) - - stream.writable = writer.writable - stream.readable = reader.readable - - return stream - - function proxyWriter(methodName) { - stream[methodName] = method - - function method() { - return writer[methodName].apply(writer, arguments) - } - } - - function proxyReader(methodName) { - stream[methodName] = method - - function method() { - stream.emit(methodName) - var func = reader[methodName] - if (func) { - return func.apply(reader, arguments) - } - reader.emit(methodName) - } - } - - function proxyStream(methodName) { - reader.on(methodName, reemit) - - function reemit() { - var args = slice.call(arguments) - args.unshift(methodName) - stream.emit.apply(stream, args) - } - } - - function handleEnd() { - if (ended) { - return - } - ended = true - var args = slice.call(arguments) - args.unshift("end") - stream.emit.apply(stream, args) - } - - function reemit(err) { - stream.emit("error", err) - } -} diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/duplexer/package.json b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/duplexer/package.json deleted file mode 100644 index 86ab2145..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/duplexer/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "duplexer", - "version": "0.1.1", - "description": "Creates a duplex stream", - "keywords": [], - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Raynos/duplexer.git" - }, - "main": "index", - "homepage": "https://github.com/Raynos/duplexer", - "contributors": [ - { - "name": "Jake Verbaten" - } - ], - "bugs": { - "url": "https://github.com/Raynos/duplexer/issues", - "email": "raynos2@gmail.com" - }, - "devDependencies": { - "tape": "0.3.3", - "through": "~0.1.4" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/Raynos/duplexer/raw/master/LICENSE" - } - ], - "scripts": { - "test": "node test" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "ie/8..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "readme": "# duplexer\n\n[![build status][1]][2] [![dependency status][3]][4]\n\n[![browser support][5]][6]\n\nCreates a duplex stream\n\nTaken from [event-stream][7]\n\n## duplex (writeStream, readStream)\n\nTakes a writable stream and a readable stream and makes them appear as a readable writable stream.\n\nIt is assumed that the two streams are connected to each other in some way.\n\n## Example\n\n```js\nvar grep = cp.exec('grep Stream')\n\nduplex(grep.stdin, grep.stdout)\n```\n\n## Installation\n\n`npm install duplexer`\n\n## Tests\n\n`npm test`\n\n## Contributors\n\n - Dominictarr\n - Raynos\n - samccone\n\n## MIT Licenced\n\n [1]: https://secure.travis-ci.org/Raynos/duplexer.png\n [2]: https://travis-ci.org/Raynos/duplexer\n [3]: https://david-dm.org/Raynos/duplexer.png\n [4]: https://david-dm.org/Raynos/duplexer\n [5]: https://ci.testling.com/Raynos/duplexer.png\n [6]: https://ci.testling.com/Raynos/duplexer\n [7]: https://github.com/dominictarr/event-stream#duplex-writestream-readstream\n", - "readmeFilename": "README.md", - "_id": "duplexer@0.1.1", - "_from": "duplexer@~0.1.1" -} diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/duplexer/test/index.js b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/duplexer/test/index.js deleted file mode 100644 index 4988e0d9..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/duplexer/test/index.js +++ /dev/null @@ -1,31 +0,0 @@ -var through = require("through") -var test = require("tape") - -var duplex = require("../index") - -var readable = through() -var writable = through(write) -var written = 0 -var data = 0 - -var stream = duplex(writable, readable) - -function write() { - written++ -} - -stream.on("data", ondata) - -function ondata() { - data++ -} - -test("emit and write", function(t) { - t.plan(2) - - stream.write() - readable.emit("data") - - t.equal(written, 1, "should have written once") - t.equal(data, 1, "should have recived once") -}) diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/from/.npmignore b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/from/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/from/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/from/LICENSE.APACHE2 b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/from/LICENSE.APACHE2 deleted file mode 100644 index 6366c047..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/from/LICENSE.APACHE2 +++ /dev/null @@ -1,15 +0,0 @@ -Apache License, Version 2.0 - -Copyright (c) 2011 Dominic Tarr - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/from/LICENSE.MIT b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/from/LICENSE.MIT deleted file mode 100644 index 6eafbd73..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/from/LICENSE.MIT +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License - -Copyright (c) 2011 Dominic Tarr - -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/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/from/index.js b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/from/index.js deleted file mode 100644 index bba40da8..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/from/index.js +++ /dev/null @@ -1,68 +0,0 @@ - -'use strict'; - -var Stream = require('stream') - -// from -// -// a stream that reads from an source. -// source may be an array, or a function. -// from handles pause behaviour for you. - -module.exports = -function from (source) { - if(Array.isArray(source)) { - source = source.slice() - return from (function (i) { - if(source.length) - this.emit('data', source.shift()) - else - this.emit('end') - return true - }) - } - var s = new Stream(), i = 0 - s.ended = false - s.started = false - s.readable = true - s.writable = false - s.paused = false - s.ended = false - s.pause = function () { - s.started = true - s.paused = true - } - function next () { - s.started = true - if(s.ended) return - while(!s.ended && !s.paused && source.call(s, i++, function () { - if(!s.ended && !s.paused) - next() - })) - ; - } - s.resume = function () { - s.started = true - s.paused = false - next() - } - s.on('end', function () { - s.ended = true - s.readable = false - process.nextTick(s.destroy) - }) - s.destroy = function () { - s.ended = true - s.emit('close') - } - /* - by default, the stream will start emitting at nextTick - if you want, you can pause it, after pipeing. - you can also resume before next tick, and that will also - work. - */ - process.nextTick(function () { - if(!s.started) s.resume() - }) - return s -} diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/from/package.json b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/from/package.json deleted file mode 100644 index 225113d8..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/from/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "from", - "version": "0.1.3", - "description": "Easy way to make a Readable Stream", - "main": "index.js", - "scripts": { - "test": "asynct test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/from.git" - }, - "keywords": [ - "stream", - "streams", - "readable", - "easy" - ], - "devDependencies": { - "asynct": "1", - "stream-spec": "0", - "assertions": "~2.3.0" - }, - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "dominictarr.com" - }, - "license": "MIT", - "readme": "# from\n\nAn easy way to create a `readable Stream`.\n\n## from(function getChunk(count, next))\n\nfrom takes a `getChunk` function and returns a stream. \n\n`getChunk` is called again and again, after each time the user calls `next()`, \nuntil the user emits `'end'`\n\nif `pause()` is called, the `getChunk` won't be called again untill `resume()` is called.\n\n\n```js\nvar from = require('from')\n\nvar stream = \n from(function getChunk(count, next) {\n //do some sort of data\n this.emit('data', whatever)\n \n if(itsOver)\n this.emit('end')\n\n //ready to handle the next chunk\n next()\n //or, if it's sync:\n return true \n })\n```\n\n## from(array)\n\nfrom also takes an `Array` whose elements it emits one after another.\n\n## License\nMIT / Apache2\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/dominictarr/from/issues" - }, - "homepage": "https://github.com/dominictarr/from", - "_id": "from@0.1.3", - "_from": "from@~0" -} diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/from/readme.markdown b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/from/readme.markdown deleted file mode 100644 index a619163c..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/from/readme.markdown +++ /dev/null @@ -1,38 +0,0 @@ -# from - -An easy way to create a `readable Stream`. - -## from(function getChunk(count, next)) - -from takes a `getChunk` function and returns a stream. - -`getChunk` is called again and again, after each time the user calls `next()`, -until the user emits `'end'` - -if `pause()` is called, the `getChunk` won't be called again untill `resume()` is called. - - -```js -var from = require('from') - -var stream = - from(function getChunk(count, next) { - //do some sort of data - this.emit('data', whatever) - - if(itsOver) - this.emit('end') - - //ready to handle the next chunk - next() - //or, if it's sync: - return true - }) -``` - -## from(array) - -from also takes an `Array` whose elements it emits one after another. - -## License -MIT / Apache2 diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/from/test/index.js b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/from/test/index.js deleted file mode 100644 index fafea576..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/from/test/index.js +++ /dev/null @@ -1,141 +0,0 @@ -var from = require('..') -var spec = require('stream-spec') -var a = require('assertions') - -function read(stream, callback) { - var actual = [] - stream.on('data', function (data) { - actual.push(data) - }) - stream.once('end', function () { - callback(null, actual) - }) - stream.once('error', function (err) { - callback(err) - }) -} - -function pause(stream) { - stream.on('data', function () { - if(Math.random() > 0.1) return - stream.pause() - process.nextTick(function () { - stream.resume() - }) - }) -} - -exports['inc'] = function (test) { - - var fs = from(function (i) { - this.emit('data', i) - if(i >= 99) - return this.emit('end') - return true - }) - - spec(fs).readable().validateOnExit() - - read(fs, function (err, arr) { - test.equal(arr.length, 100) - test.done() - }) -} - -exports['simple'] = function (test) { - - var l = 1000 - , expected = [] - - while(l--) expected.push(l * Math.random()) - - var t = from(expected.slice()) - - spec(t) - .readable() - .pausable({strict: true}) - .validateOnExit() - - read(t, function (err, actual) { - if(err) test.error(err) //fail - a.deepEqual(actual, expected) - test.done() - }) - -} - -exports['simple pausable'] = function (test) { - - var l = 1000 - , expected = [] - - while(l--) expected.push(l * Math.random()) - - var t = from(expected.slice()) - - spec(t) - .readable() - .pausable({strict: true}) - .validateOnExit() - - pause(t) - - read(t, function (err, actual) { - if(err) test.error(err) //fail - a.deepEqual(actual, expected) - test.done() - }) - -} - -exports['simple (not strictly pausable) setTimeout'] = function (test) { - - var l = 10 - , expected = [] - while(l--) expected.push(l * Math.random()) - - - var _expected = expected.slice() - var t = from(function (i, n) { - var self = this - setTimeout(function () { - if(_expected.length) - self.emit('data', _expected.shift()) - else - self.emit('end') - n() - }, 3) - }) - - /* - using from in this way will not be strictly pausable. - it could be extended to buffer outputs, but I think a better - way would be to use a PauseStream that implements strict pause. - */ - - spec(t) - .readable() - .pausable({strict: false }) - .validateOnExit() - - //pause(t) - var paused = false - var i = setInterval(function () { - if(!paused) t.pause() - else t.resume() - paused = !paused - }, 2) - - t.on('end', function () { - clearInterval(i) - }) - - read(t, function (err, actual) { - if(err) test.error(err) //fail - a.deepEqual(actual, expected) - test.done() - }) - -} - - diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/map-stream/.npmignore b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/map-stream/.npmignore deleted file mode 100644 index 13abef4f..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/map-stream/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -node_modules/* -npm_debug.log diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/map-stream/.travis.yml b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/map-stream/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/map-stream/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/map-stream/LICENCE b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/map-stream/LICENCE deleted file mode 100644 index 171dd970..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/map-stream/LICENCE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2011 Dominic Tarr - -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. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/map-stream/examples/pretty.js b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/map-stream/examples/pretty.js deleted file mode 100644 index ab073987..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/map-stream/examples/pretty.js +++ /dev/null @@ -1,26 +0,0 @@ - -var inspect = require('util').inspect - -if(!module.parent) { - var map = require('..') //load map-stream - var es = require('event-stream') //load event-stream - es.pipe( //pipe joins streams together - process.openStdin(), //open stdin - es.split(), //split stream to break on newlines - map(function (data, callback) { //turn this async function into a stream - var j - try { - j = JSON.parse(data) //try to parse input into json - } catch (err) { - return callback(null, data) //if it fails just pass it anyway - } - callback(null, inspect(j)) //render it nicely - }), - process.stdout // pipe it to stdout ! - ) - } - -// run this -// -// curl -sS registry.npmjs.org/event-stream | node pretty.js -// diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/map-stream/index.js b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/map-stream/index.js deleted file mode 100644 index 09ae829d..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/map-stream/index.js +++ /dev/null @@ -1,145 +0,0 @@ -//filter will reemit the data if cb(err,pass) pass is truthy - -// reduce is more tricky -// maybe we want to group the reductions or emit progress updates occasionally -// the most basic reduce just emits one 'data' event after it has recieved 'end' - - -var Stream = require('stream').Stream - - -//create an event stream and apply function to each .write -//emitting each response as data -//unless it's an empty callback - -module.exports = function (mapper, opts) { - - var stream = new Stream() - , self = this - , inputs = 0 - , outputs = 0 - , ended = false - , paused = false - , destroyed = false - , lastWritten = 0 - , inNext = false - - this.opts = opts || {}; - var errorEventName = this.opts.failures ? 'failure' : 'error'; - - // Items that are not ready to be written yet (because they would come out of - // order) get stuck in a queue for later. - var writeQueue = {} - - stream.writable = true - stream.readable = true - - function queueData (data, number) { - var nextToWrite = lastWritten + 1 - - if (number === nextToWrite) { - // If it's next, and its not undefined write it - if (data !== undefined) { - stream.emit.apply(stream, ['data', data]) - } - lastWritten ++ - nextToWrite ++ - } else { - // Otherwise queue it for later. - writeQueue[number] = data - } - - // If the next value is in the queue, write it - if (writeQueue.hasOwnProperty(nextToWrite)) { - var dataToWrite = writeQueue[nextToWrite] - delete writeQueue[nextToWrite] - return queueData(dataToWrite, nextToWrite) - } - - outputs ++ - if(inputs === outputs) { - if(paused) paused = false, stream.emit('drain') //written all the incoming events - if(ended) end() - } - } - - function next (err, data, number) { - if(destroyed) return - inNext = true - - if (!err || self.opts.failures) { - queueData(data, number) - } - - if (err) { - stream.emit.apply(stream, [ errorEventName, err ]); - } - - inNext = false; - } - - // Wrap the mapper function by calling its callback with the order number of - // the item in the stream. - function wrappedMapper (input, number, callback) { - return mapper.call(null, input, function(err, data){ - callback(err, data, number) - }) - } - - stream.write = function (data) { - if(ended) throw new Error('map stream is not writable') - inNext = false - inputs ++ - - try { - //catch sync errors and handle them like async errors - var written = wrappedMapper(data, inputs, next) - paused = (written === false) - return !paused - } catch (err) { - //if the callback has been called syncronously, and the error - //has occured in an listener, throw it again. - if(inNext) - throw err - next(err) - return !paused - } - } - - function end (data) { - //if end was called with args, write it, - ended = true //write will emit 'end' if ended is true - stream.writable = false - if(data !== undefined) { - return queueData(data, inputs) - } else if (inputs == outputs) { //wait for processing - stream.readable = false, stream.emit('end'), stream.destroy() - } - } - - stream.end = function (data) { - if(ended) return - end() - } - - stream.destroy = function () { - ended = destroyed = true - stream.writable = stream.readable = paused = false - process.nextTick(function () { - stream.emit('close') - }) - } - stream.pause = function () { - paused = true - } - - stream.resume = function () { - paused = false - } - - return stream -} - - - - diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/map-stream/package.json b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/map-stream/package.json deleted file mode 100644 index e9c4ee04..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/map-stream/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "map-stream", - "version": "0.1.0", - "description": "construct pipes of streams of events", - "homepage": "http://github.com/dominictarr/map-stream", - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/map-stream.git" - }, - "dependencies": {}, - "devDependencies": { - "asynct": "*", - "it-is": "1", - "ubelt": "~2.9", - "stream-spec": "~0.2", - "event-stream": "~2.1", - "from": "0.0.2" - }, - "scripts": { - "test": "asynct test/" - }, - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "http://dominictarr.com" - }, - "readme": "# MapStream\n\nRefactored out of [event-stream](https://github.com/dominictarr/event-stream)\n\n##map (asyncFunction[, options])\n\nCreate a through stream from an asyncronous function. \n\n``` js\nvar map = require('map-stream')\n\nmap(function (data, callback) {\n //transform data\n // ...\n callback(null, data)\n})\n\n```\n\nEach map MUST call the callback. It may callback with data, with an error or with no arguments, \n\n * `callback()` drop this data. \n this makes the map work like `filter`, \n note:`callback(null,null)` is not the same, and will emit `null`\n\n * `callback(null, newData)` turn data into newData\n \n * `callback(error)` emit an error for this item.\n\n>Note: if a callback is not called, `map` will think that it is still being processed, \n>every call must be answered or the stream will not know when to end. \n>\n>Also, if the callback is called more than once, every call but the first will be ignored.\n\n##Options \n\n * `failures` - `boolean` continue mapping even if error occured. On error `map-stream` will emit `failure` event. (default: `false`)\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/dominictarr/map-stream/issues" - }, - "_id": "map-stream@0.1.0", - "_from": "map-stream@~0.1.0" -} diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/map-stream/readme.markdown b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/map-stream/readme.markdown deleted file mode 100644 index 18971588..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/map-stream/readme.markdown +++ /dev/null @@ -1,37 +0,0 @@ -# MapStream - -Refactored out of [event-stream](https://github.com/dominictarr/event-stream) - -##map (asyncFunction[, options]) - -Create a through stream from an asyncronous function. - -``` js -var map = require('map-stream') - -map(function (data, callback) { - //transform data - // ... - callback(null, data) -}) - -``` - -Each map MUST call the callback. It may callback with data, with an error or with no arguments, - - * `callback()` drop this data. - this makes the map work like `filter`, - note:`callback(null,null)` is not the same, and will emit `null` - - * `callback(null, newData)` turn data into newData - - * `callback(error)` emit an error for this item. - ->Note: if a callback is not called, `map` will think that it is still being processed, ->every call must be answered or the stream will not know when to end. -> ->Also, if the callback is called more than once, every call but the first will be ignored. - -##Options - - * `failures` - `boolean` continue mapping even if error occured. On error `map-stream` will emit `failure` event. (default: `false`) diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/map-stream/test/simple-map.asynct.js b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/map-stream/test/simple-map.asynct.js deleted file mode 100644 index 2b9a2922..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/map-stream/test/simple-map.asynct.js +++ /dev/null @@ -1,318 +0,0 @@ -'use strict'; - -var map = require('../') - , it = require('it-is') - , u = require('ubelt') - , spec = require('stream-spec') - , from = require('from') - , Stream = require('stream') - , es = require('event-stream') - -//REFACTOR THIS TEST TO USE es.readArray and es.writeArray - -function writeArray(array, stream) { - - array.forEach( function (j) { - stream.write(j) - }) - stream.end() - -} - -function readStream(stream, done) { - - var array = [] - stream.on('data', function (data) { - array.push(data) - }) - stream.on('error', done) - stream.on('end', function (data) { - done(null, array) - }) - -} - -//call sink on each write, -//and complete when finished. - -function pauseStream (prob, delay) { - var pauseIf = ( - 'number' == typeof prob - ? function () { - return Math.random() < prob - } - : 'function' == typeof prob - ? prob - : 0.1 - ) - var delayer = ( - !delay - ? process.nextTick - : 'number' == typeof delay - ? function (next) { setTimeout(next, delay) } - : delay - ) - - return es.through(function (data) { - if(!this.paused && pauseIf()) { - console.log('PAUSE STREAM PAUSING') - this.pause() - var self = this - delayer(function () { - console.log('PAUSE STREAM RESUMING') - self.resume() - }) - } - console.log("emit ('data', " + data + ')') - this.emit('data', data) - }) -} - -exports ['simple map applied to a stream'] = function (test) { - - var input = [1,2,3,7,5,3,1,9,0,2,4,6] - //create event stream from - - var doubler = map(function (data, cb) { - cb(null, data * 2) - }) - - spec(doubler).through().validateOnExit() - - //a map is only a middle man, so it is both readable and writable - - it(doubler).has({ - readable: true, - writable: true, - }) - - readStream(doubler, function (err, output) { - it(output).deepEqual(input.map(function (j) { - return j * 2 - })) -// process.nextTick(x.validate) - test.done() - }) - - writeArray(input, doubler) - -} - -exports ['stream comes back in the correct order'] = function (test) { - var input = [3, 2, 1] - - var delayer = map(function(data, cb){ - setTimeout(function () { - cb(null, data) - }, 100 * data) - }) - - readStream(delayer, function (err, output) { - it(output).deepEqual(input) - test.done() - }) - - writeArray(input, delayer) -} - -exports ['continues on error event with failures `true`'] = function (test) { - var input = [1, 2, 3] - - var delayer = map(function(data, cb){ - cb(new Error('Something gone wrong'), data) - }, { failures: true }) - - readStream(delayer, function (err, output) { - it(output).deepEqual(input) - test.done() - }) - - writeArray(input, delayer) -} - -exports['pipe two maps together'] = function (test) { - - var input = [1,2,3,7,5,3,1,9,0,2,4,6] - //create event stream from - function dd (data, cb) { - cb(null, data * 2) - } - var doubler1 = map(dd), doubler2 = map(dd) - - doubler1.pipe(doubler2) - - spec(doubler1).through().validateOnExit() - spec(doubler2).through().validateOnExit() - - readStream(doubler2, function (err, output) { - it(output).deepEqual(input.map(function (j) { - return j * 4 - })) - test.done() - }) - - writeArray(input, doubler1) - -} - -//next: -// -// test pause, resume and drian. -// - -// then make a pipe joiner: -// -// plumber (evStr1, evStr2, evStr3, evStr4, evStr5) -// -// will return a single stream that write goes to the first - -exports ['map will not call end until the callback'] = function (test) { - - var ticker = map(function (data, cb) { - process.nextTick(function () { - cb(null, data * 2) - }) - }) - - spec(ticker).through().validateOnExit() - - ticker.write('x') - ticker.end() - - ticker.on('end', function () { - test.done() - }) -} - -exports ['emit failures with opts.failures === `ture`'] = function (test) { - - var err = new Error('INTENSIONAL ERROR') - , mapper = - map(function () { - throw err - }, { failures: true }) - - mapper.on('failure', function (_err) { - it(_err).equal(err) - test.done() - }) - - mapper.write('hello') - -} - -exports ['emit error thrown'] = function (test) { - - var err = new Error('INTENSIONAL ERROR') - , mapper = - map(function () { - throw err - }) - - mapper.on('error', function (_err) { - it(_err).equal(err) - test.done() - }) - - mapper.write('hello') - -} - -exports ['emit error calledback'] = function (test) { - - var err = new Error('INTENSIONAL ERROR') - , mapper = - map(function (data, callback) { - callback(err) - }) - - mapper.on('error', function (_err) { - it(_err).equal(err) - test.done() - }) - - mapper.write('hello') - -} - -exports ['do not emit drain if not paused'] = function (test) { - - var maps = map(function (data, callback) { - u.delay(callback)(null, 1) - return true - }) - - spec(maps).through().pausable().validateOnExit() - - maps.on('drain', function () { - it(false).ok('should not emit drain unless the stream is paused') - }) - - it(maps.write('hello')).equal(true) - it(maps.write('hello')).equal(true) - it(maps.write('hello')).equal(true) - setTimeout(function () {maps.end()},10) - maps.on('end', test.done) -} - -exports ['emits drain if paused, when all '] = function (test) { - var active = 0 - var drained = false - var maps = map(function (data, callback) { - active ++ - u.delay(function () { - active -- - callback(null, 1) - })() - console.log('WRITE', false) - return false - }) - - spec(maps).through().validateOnExit() - - maps.on('drain', function () { - drained = true - it(active).equal(0, 'should emit drain when all maps are done') - }) - - it(maps.write('hello')).equal(false) - it(maps.write('hello')).equal(false) - it(maps.write('hello')).equal(false) - - process.nextTick(function () {maps.end()},10) - - maps.on('end', function () { - console.log('end') - it(drained).ok('shoud have emitted drain before end') - test.done() - }) - -} - -exports ['map applied to a stream with filtering'] = function (test) { - - var input = [1,2,3,7,5,3,1,9,0,2,4,6] - - var doubler = map(function (data, callback) { - if (data % 2) - callback(null, data * 2) - else - callback() - }) - - readStream(doubler, function (err, output) { - it(output).deepEqual(input.filter(function (j) { - return j % 2 - }).map(function (j) { - return j * 2 - })) - test.done() - }) - - spec(doubler).through().validateOnExit() - - writeArray(input, doubler) - -} - - diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/pause-stream/.npmignore b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/pause-stream/.npmignore deleted file mode 100644 index 13abef4f..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/pause-stream/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -node_modules/* -npm_debug.log diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/pause-stream/LICENSE b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/pause-stream/LICENSE deleted file mode 100644 index 6a477d4c..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/pause-stream/LICENSE +++ /dev/null @@ -1,231 +0,0 @@ -Dual Licensed MIT and Apache 2 - -The MIT License - -Copyright (c) 2013 Dominic Tarr - -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. - - - ----------------------------------------------------------------------- - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright (c) 2013 Dominic Tarr - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/pause-stream/index.js b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/pause-stream/index.js deleted file mode 100644 index 0e0bf96b..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/pause-stream/index.js +++ /dev/null @@ -1,3 +0,0 @@ -//through@2 handles this by default! -module.exports = require('through') - diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/pause-stream/package.json b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/pause-stream/package.json deleted file mode 100644 index 12224533..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/pause-stream/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "pause-stream", - "version": "0.0.11", - "description": "a ThroughStream that strictly buffers all readable events when paused.", - "main": "index.js", - "directories": { - "test": "test" - }, - "devDependencies": { - "stream-tester": "0.0.2", - "stream-spec": "~0.2.0" - }, - "scripts": { - "test": "node test/index.js && node test/pause-end.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/pause-stream.git" - }, - "keywords": [ - "stream", - "pipe", - "pause", - "drain", - "buffer" - ], - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "dominictarr.com" - }, - "license": [ - "MIT", - "Apache2" - ], - "dependencies": { - "through": "~2.3" - }, - "readme": "# PauseStream\n\nThis is a `Stream` that will strictly buffer when paused.\nConnect it to anything you need buffered.\n\n``` js\n var ps = require('pause-stream')();\n\n badlyBehavedStream.pipe(ps.pause())\n\n aLittleLater(function (err, data) {\n ps.pipe(createAnotherStream(data))\n ps.resume()\n })\n```\n\n`PauseStream` will buffer whenever paused.\nit will buffer when yau have called `pause` manually.\nbut also when it's downstream `dest.write()===false`.\nit will attempt to drain the buffer when you call resume\nor the downstream emits `'drain'`\n\n`PauseStream` is tested using [stream-spec](https://github.com/dominictarr/stream-spec)\nand [stream-tester](https://github.com/dominictarr/stream-tester)\n\nThis is now the default case of \n[through](https://github.com/dominictarr/through)\n\nhttps://github.com/dominictarr/pause-stream/commit/4a6fe3dc2c11091b1efbfde912e0473719ed9cc0\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/dominictarr/pause-stream/issues" - }, - "homepage": "https://github.com/dominictarr/pause-stream", - "_id": "pause-stream@0.0.11", - "_from": "pause-stream@0.0.11" -} diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/pause-stream/readme.markdown b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/pause-stream/readme.markdown deleted file mode 100644 index 23669391..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/pause-stream/readme.markdown +++ /dev/null @@ -1,29 +0,0 @@ -# PauseStream - -This is a `Stream` that will strictly buffer when paused. -Connect it to anything you need buffered. - -``` js - var ps = require('pause-stream')(); - - badlyBehavedStream.pipe(ps.pause()) - - aLittleLater(function (err, data) { - ps.pipe(createAnotherStream(data)) - ps.resume() - }) -``` - -`PauseStream` will buffer whenever paused. -it will buffer when yau have called `pause` manually. -but also when it's downstream `dest.write()===false`. -it will attempt to drain the buffer when you call resume -or the downstream emits `'drain'` - -`PauseStream` is tested using [stream-spec](https://github.com/dominictarr/stream-spec) -and [stream-tester](https://github.com/dominictarr/stream-tester) - -This is now the default case of -[through](https://github.com/dominictarr/through) - -https://github.com/dominictarr/pause-stream/commit/4a6fe3dc2c11091b1efbfde912e0473719ed9cc0 diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/pause-stream/test/index.js b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/pause-stream/test/index.js deleted file mode 100644 index db8778da..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/pause-stream/test/index.js +++ /dev/null @@ -1,17 +0,0 @@ -var spec = require('stream-spec') -var tester = require('stream-tester') -var ps = require('..')() - -spec(ps) - .through({strict: false}) - .validateOnExit() - -var master = tester.createConsistent - -tester.createRandomStream(1000) //1k random numbers - .pipe(master = tester.createConsistentStream()) - .pipe(tester.createUnpauseStream()) - .pipe(ps) - .pipe(tester.createPauseStream()) - .pipe(master.createSlave()) - diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/pause-stream/test/pause-end.js b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/pause-stream/test/pause-end.js deleted file mode 100644 index a6c27ef1..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/pause-stream/test/pause-end.js +++ /dev/null @@ -1,33 +0,0 @@ - -var pause = require('..') -var assert = require('assert') - -var ps = pause() -var read = [], ended = false - -ps.on('data', function (i) { - read.push(i) -}) - -ps.on('end', function () { - ended = true -}) - -assert.deepEqual(read, []) - -ps.write(0) -ps.write(1) -ps.write(2) - -assert.deepEqual(read, [0, 1, 2]) - -ps.pause() - -assert.deepEqual(read, [0, 1, 2]) - -ps.end() -assert.equal(ended, false) -ps.resume() -assert.equal(ended, true) - - diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/.npmignore b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/.npmignore deleted file mode 100644 index 13abef4f..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -node_modules/* -npm_debug.log diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/.travis.yml b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/.travis.yml deleted file mode 100644 index dad2273c..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.8 - - "0.10" diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/LICENCE b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/LICENCE deleted file mode 100644 index 171dd970..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/LICENCE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2011 Dominic Tarr - -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. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/examples/pretty.js b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/examples/pretty.js deleted file mode 100644 index 2e891316..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/examples/pretty.js +++ /dev/null @@ -1,26 +0,0 @@ - -var inspect = require('util').inspect -var es = require('event-stream') //load event-stream -var split = require('../') - -if(!module.parent) { - es.pipe( //pipe joins streams together - process.openStdin(), //open stdin - split(), //split stream to break on newlines - es.map(function (data, callback) {//turn this async function into a stream - var j - try { - j = JSON.parse(data) //try to parse input into json - } catch (err) { - return callback(null, data) //if it fails just pass it anyway - } - callback(null, inspect(j)) //render it nicely - }), - process.stdout // pipe it to stdout ! - ) - } - -// run this -// -// curl -sS registry.npmjs.org/event-stream | node pretty.js -// diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/index.js b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/index.js deleted file mode 100644 index ca57e0f7..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/index.js +++ /dev/null @@ -1,59 +0,0 @@ -//filter will reemit the data if cb(err,pass) pass is truthy - -// reduce is more tricky -// maybe we want to group the reductions or emit progress updates occasionally -// the most basic reduce just emits one 'data' event after it has recieved 'end' - - -var through = require('through') -var Decoder = require('string_decoder').StringDecoder - -module.exports = split - -//TODO pass in a function to map across the lines. - -function split (matcher, mapper) { - var decoder = new Decoder() - var soFar = '' - if('function' === typeof matcher) - mapper = matcher, matcher = null - if (!matcher) - matcher = /\r?\n/ - - function emit(stream, piece) { - if(mapper) { - try { - piece = mapper(piece) - } - catch (err) { - return stream.emit('error', err) - } - if('undefined' !== typeof piece) - stream.queue(piece) - } - else - stream.queue(piece) - } - - function next (stream, buffer) { - var pieces = (soFar + buffer).split(matcher) - soFar = pieces.pop() - - for (var i = 0; i < pieces.length; i++) { - var piece = pieces[i] - emit(stream, piece) - } - } - - return through(function (b) { - next(this, decoder.write(b)) - }, - function () { - if(decoder.end) - next(this, decoder.end()) - if(soFar != null) - emit(this, soFar) - this.queue(null) - }) -} - diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/package.json b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/package.json deleted file mode 100644 index b95a7d9b..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "split", - "version": "0.2.10", - "description": "split a Text Stream into a Line Stream", - "homepage": "http://github.com/dominictarr/split", - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/split.git" - }, - "dependencies": { - "through": "2" - }, - "devDependencies": { - "asynct": "*", - "it-is": "1", - "ubelt": "~2.9", - "stream-spec": "~0.2", - "event-stream": "~3.0.2" - }, - "scripts": { - "test": "asynct test/" - }, - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "http://bit.ly/dominictarr" - }, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "readme": "# Split (matcher)\n\n[![build status](https://secure.travis-ci.org/dominictarr/split.png)](http://travis-ci.org/dominictarr/split)\n\nBreak up a stream and reassemble it so that each line is a chunk. matcher may be a `String`, or a `RegExp` \n\nExample, read every line in a file ...\n\n``` js\n fs.createReadStream(file)\n .pipe(split())\n .on('data', function (line) {\n //each chunk now is a seperate line!\n })\n\n```\n\n`split` takes the same arguments as `string.split` except it defaults to '/\\r?\\n/' instead of ',', and the optional `limit` paremeter is ignored.\n[String#split](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/split)\n\n# NDJ - Newline Delimited Json\n\n`split` accepts a function which transforms each line.\n\n``` js\nfs.createReadStream(file)\n .pipe(split(JSON.parse))\n .on('data', function (obj) {\n //each chunk now is a a js object\n })\n .on('error', function (err) {\n //syntax errors will land here\n //note, this ends the stream.\n })\n```\n\n# License\n\nMIT\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/dominictarr/split/issues" - }, - "_id": "split@0.2.10", - "_from": "split@0.2" -} diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/readme.markdown b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/readme.markdown deleted file mode 100644 index 55b8ba86..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/readme.markdown +++ /dev/null @@ -1,39 +0,0 @@ -# Split (matcher) - -[![build status](https://secure.travis-ci.org/dominictarr/split.png)](http://travis-ci.org/dominictarr/split) - -Break up a stream and reassemble it so that each line is a chunk. matcher may be a `String`, or a `RegExp` - -Example, read every line in a file ... - -``` js - fs.createReadStream(file) - .pipe(split()) - .on('data', function (line) { - //each chunk now is a seperate line! - }) - -``` - -`split` takes the same arguments as `string.split` except it defaults to '/\r?\n/' instead of ',', and the optional `limit` paremeter is ignored. -[String#split](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/split) - -# NDJ - Newline Delimited Json - -`split` accepts a function which transforms each line. - -``` js -fs.createReadStream(file) - .pipe(split(JSON.parse)) - .on('data', function (obj) { - //each chunk now is a a js object - }) - .on('error', function (err) { - //syntax errors will land here - //note, this ends the stream. - }) -``` - -# License - -MIT diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/test/partitioned_unicode.js b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/test/partitioned_unicode.js deleted file mode 100644 index aff3d5da..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/test/partitioned_unicode.js +++ /dev/null @@ -1,34 +0,0 @@ -var it = require('it-is').style('colour') - , split = require('..') - -exports ['split data with partitioned unicode character'] = function (test) { - var s = split(/,/g) - , caughtError = false - , rows = [] - - s.on('error', function (err) { - caughtError = true - }) - - s.on('data', function (row) { rows.push(row) }) - - var x = 'テスト試験今日とても,よい天気で' - unicodeData = new Buffer(x); - - // partition of 日 - piece1 = unicodeData.slice(0, 20); - piece2 = unicodeData.slice(20, unicodeData.length); - - s.write(piece1); - s.write(piece2); - - s.end() - - it(caughtError).equal(false) - - it(rows).deepEqual(['テスト試験今日とても', 'よい天気で']); - - it(rows).deepEqual(x.split(',')) - - test.done() -} diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/test/split.asynct.js b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/test/split.asynct.js deleted file mode 100644 index fb15b288..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/test/split.asynct.js +++ /dev/null @@ -1,85 +0,0 @@ -var es = require('event-stream') - , it = require('it-is').style('colour') - , d = require('ubelt') - , split = require('..') - , join = require('path').join - , fs = require('fs') - , Stream = require('stream').Stream - , spec = require('stream-spec') - -exports ['split() works like String#split'] = function (test) { - var readme = join(__filename) - , expected = fs.readFileSync(readme, 'utf-8').split('\n') - , cs = split() - , actual = [] - , ended = false - , x = spec(cs).through() - - var a = new Stream () - - a.write = function (l) { - actual.push(l.trim()) - } - a.end = function () { - - ended = true - expected.forEach(function (v,k) { - //String.split will append an empty string '' - //if the string ends in a split pattern. - //es.split doesn't which was breaking this test. - //clearly, appending the empty string is correct. - //tests are passing though. which is the current job. - if(v) - it(actual[k]).like(v) - }) - //give the stream time to close - process.nextTick(function () { - test.done() - x.validate() - }) - } - a.writable = true - - fs.createReadStream(readme, {flags: 'r'}).pipe(cs) - cs.pipe(a) - -} - -exports ['split() takes mapper function'] = function (test) { - var readme = join(__filename) - , expected = fs.readFileSync(readme, 'utf-8').split('\n') - , cs = split(function (line) { return line.toUpperCase() }) - , actual = [] - , ended = false - , x = spec(cs).through() - - var a = new Stream () - - a.write = function (l) { - actual.push(l.trim()) - } - a.end = function () { - - ended = true - expected.forEach(function (v,k) { - //String.split will append an empty string '' - //if the string ends in a split pattern. - //es.split doesn't which was breaking this test. - //clearly, appending the empty string is correct. - //tests are passing though. which is the current job. - if(v) - it(actual[k]).equal(v.trim().toUpperCase()) - }) - //give the stream time to close - process.nextTick(function () { - test.done() - x.validate() - }) - } - a.writable = true - - fs.createReadStream(readme, {flags: 'r'}).pipe(cs) - cs.pipe(a) - -} - diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/test/try_catch.asynct.js b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/test/try_catch.asynct.js deleted file mode 100644 index 39e49f73..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/split/test/try_catch.asynct.js +++ /dev/null @@ -1,51 +0,0 @@ -var it = require('it-is').style('colour') - , split = require('..') - -exports ['emit mapper exceptions as error events'] = function (test) { - var s = split(JSON.parse) - , caughtError = false - , rows = [] - - s.on('error', function (err) { - caughtError = true - }) - - s.on('data', function (row) { rows.push(row) }) - - s.write('{"a":1}\n{"') - it(caughtError).equal(false) - it(rows).deepEqual([ { a: 1 } ]) - - s.write('b":2}\n{"c":}\n') - it(caughtError).equal(true) - it(rows).deepEqual([ { a: 1 }, { b: 2 } ]) - - s.end() - test.done() -} - -exports ['mapper error events on trailing chunks'] = function (test) { - var s = split(JSON.parse) - , caughtError = false - , rows = [] - - s.on('error', function (err) { - caughtError = true - }) - - s.on('data', function (row) { rows.push(row) }) - - s.write('{"a":1}\n{"') - it(caughtError).equal(false) - it(rows).deepEqual([ { a: 1 } ]) - - s.write('b":2}\n{"c":}') - it(caughtError).equal(false) - it(rows).deepEqual([ { a: 1 }, { b: 2 } ]) - - s.end() - it(caughtError).equal(true) - it(rows).deepEqual([ { a: 1 }, { b: 2 } ]) - - test.done() -} diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/stream-combiner/.npmignore b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/stream-combiner/.npmignore deleted file mode 100644 index 13abef4f..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/stream-combiner/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -node_modules/* -npm_debug.log diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/stream-combiner/.travis.yml b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/stream-combiner/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/stream-combiner/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/stream-combiner/LICENSE b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/stream-combiner/LICENSE deleted file mode 100644 index 6d03581f..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/stream-combiner/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2012 'Dominic Tarr' - -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/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/stream-combiner/README.md b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/stream-combiner/README.md deleted file mode 100644 index 565e0e26..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/stream-combiner/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# stream-combiner - -<img src=https://secure.travis-ci.org/dominictarr/stream-combiner.png?branch=master> - -## Combine (stream1,...,streamN) - -Turn a pipeline into a single stream. `pipeline` returns a stream that writes to the first stream -and reads from the last stream. - -Listening for 'error' will recieve errors from all streams inside the pipe. - -``` js - var Combine = require('stream-combiner') - var es = require('event-stream') - - Combine( //connect streams together with `pipe` - process.openStdin(), //open stdin - es.split(), //split stream to break on newlines - es.map(function (data, callback) {//turn this async function into a stream - callback(null - , inspect(JSON.parse(data))) //render it nicely - }), - process.stdout // pipe it to stdout ! - ) -``` - -## License - -MIT diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/stream-combiner/index.js b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/stream-combiner/index.js deleted file mode 100644 index 99cf5b61..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/stream-combiner/index.js +++ /dev/null @@ -1,39 +0,0 @@ -var duplexer = require('duplexer') - -module.exports = function () { - - var streams = [].slice.call(arguments) - , first = streams[0] - , last = streams[streams.length - 1] - , thepipe = duplexer(first, last) - - if(streams.length == 1) - return streams[0] - else if (!streams.length) - throw new Error('connect called with empty args') - - //pipe all the streams together - - function recurse (streams) { - if(streams.length < 2) - return - streams[0].pipe(streams[1]) - recurse(streams.slice(1)) - } - - recurse(streams) - - function onerror () { - var args = [].slice.call(arguments) - args.unshift('error') - thepipe.emit.apply(thepipe, args) - } - - //es.duplex already reemits the error from the first and last stream. - //add a listener for the inner streams in the pipeline. - for(var i = 1; i < streams.length - 1; i ++) - streams[i].on('error', onerror) - - return thepipe -} - diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/stream-combiner/package.json b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/stream-combiner/package.json deleted file mode 100644 index d0e2977a..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/stream-combiner/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "stream-combiner", - "version": "0.0.4", - "homepage": "https://github.com/dominictarr/stream-combiner", - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/stream-combiner.git" - }, - "dependencies": { - "duplexer": "~0.1.1" - }, - "devDependencies": { - "tape": "~2.3.0", - "event-stream": "~3.0.7" - }, - "scripts": { - "test": "set -e; for t in test/*.js; do node $t; done" - }, - "author": { - "name": "'Dominic Tarr'", - "email": "dominic.tarr@gmail.com", - "url": "http://dominictarr.com" - }, - "license": "MIT", - "readme": "# stream-combiner\n\n<img src=https://secure.travis-ci.org/dominictarr/stream-combiner.png?branch=master>\n\n## Combine (stream1,...,streamN)\n\nTurn a pipeline into a single stream. `pipeline` returns a stream that writes to the first stream\nand reads from the last stream. \n\nListening for 'error' will recieve errors from all streams inside the pipe.\n\n``` js\n var Combine = require('stream-combiner')\n var es = require('event-stream')\n\n Combine( //connect streams together with `pipe`\n process.openStdin(), //open stdin\n es.split(), //split stream to break on newlines\n es.map(function (data, callback) {//turn this async function into a stream\n callback(null\n , inspect(JSON.parse(data))) //render it nicely\n }),\n process.stdout // pipe it to stdout !\n )\n```\n\n## License\n\nMIT\n", - "readmeFilename": "README.md", - "description": "<img src=https://secure.travis-ci.org/dominictarr/stream-combiner.png?branch=master>", - "bugs": { - "url": "https://github.com/dominictarr/stream-combiner/issues" - }, - "_id": "stream-combiner@0.0.4", - "_from": "stream-combiner@~0.0.4" -} diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/stream-combiner/test/index.js b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/stream-combiner/test/index.js deleted file mode 100644 index d17ddada..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/stream-combiner/test/index.js +++ /dev/null @@ -1,52 +0,0 @@ -var es = require('event-stream') -var combine = require('..') -var test = require('tape') - -test('do not duplicate errors', function (test) { - - var errors = 0; - var pipe = combine( - es.through(function(data) { - return this.emit('data', data); - }), - es.through(function(data) { - return this.emit('error', new Error(data)); - }) - ) - - pipe.on('error', function(err) { - errors++ - test.ok(errors, 'expected error count') - process.nextTick(function () { - return test.end(); - }) - }) - - return pipe.write('meh'); -}) - -test('3 pipe do not duplicate errors', function (test) { - - var errors = 0; - var pipe = combine( - es.through(function(data) { - return this.emit('data', data); - }), - es.through(function(data) { - return this.emit('error', new Error(data)); - }), - es.through() - ) - - pipe.on('error', function(err) { - errors++ - test.ok(errors, 'expected error count') - process.nextTick(function () { - return test.end(); - }) - }) - - return pipe.write('meh'); - -}) - diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/.travis.yml b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/.travis.yml deleted file mode 100644 index c693a939..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - "0.10" diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/LICENSE.APACHE2 b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/LICENSE.APACHE2 deleted file mode 100644 index 6366c047..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/LICENSE.APACHE2 +++ /dev/null @@ -1,15 +0,0 @@ -Apache License, Version 2.0 - -Copyright (c) 2011 Dominic Tarr - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/LICENSE.MIT b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/LICENSE.MIT deleted file mode 100644 index 6eafbd73..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/LICENSE.MIT +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License - -Copyright (c) 2011 Dominic Tarr - -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/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/index.js b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/index.js deleted file mode 100644 index 7b935bf9..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/index.js +++ /dev/null @@ -1,108 +0,0 @@ -var Stream = require('stream') - -// through -// -// a stream that does nothing but re-emit the input. -// useful for aggregating a series of changing but not ending streams into one stream) - -exports = module.exports = through -through.through = through - -//create a readable writable stream. - -function through (write, end, opts) { - write = write || function (data) { this.queue(data) } - end = end || function () { this.queue(null) } - - var ended = false, destroyed = false, buffer = [], _ended = false - var stream = new Stream() - stream.readable = stream.writable = true - stream.paused = false - -// stream.autoPause = !(opts && opts.autoPause === false) - stream.autoDestroy = !(opts && opts.autoDestroy === false) - - stream.write = function (data) { - write.call(this, data) - return !stream.paused - } - - function drain() { - while(buffer.length && !stream.paused) { - var data = buffer.shift() - if(null === data) - return stream.emit('end') - else - stream.emit('data', data) - } - } - - stream.queue = stream.push = function (data) { -// console.error(ended) - if(_ended) return stream - if(data == null) _ended = true - buffer.push(data) - drain() - return stream - } - - //this will be registered as the first 'end' listener - //must call destroy next tick, to make sure we're after any - //stream piped from here. - //this is only a problem if end is not emitted synchronously. - //a nicer way to do this is to make sure this is the last listener for 'end' - - stream.on('end', function () { - stream.readable = false - if(!stream.writable && stream.autoDestroy) - process.nextTick(function () { - stream.destroy() - }) - }) - - function _end () { - stream.writable = false - end.call(stream) - if(!stream.readable && stream.autoDestroy) - stream.destroy() - } - - stream.end = function (data) { - if(ended) return - ended = true - if(arguments.length) stream.write(data) - _end() // will emit or queue - return stream - } - - stream.destroy = function () { - if(destroyed) return - destroyed = true - ended = true - buffer.length = 0 - stream.writable = stream.readable = false - stream.emit('close') - return stream - } - - stream.pause = function () { - if(stream.paused) return - stream.paused = true - return stream - } - - stream.resume = function () { - if(stream.paused) { - stream.paused = false - stream.emit('resume') - } - drain() - //may have become paused again, - //as drain emits 'data'. - if(!stream.paused) - stream.emit('drain') - return stream - } - return stream -} - diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/package.json b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/package.json deleted file mode 100644 index 52155427..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "through", - "version": "2.3.4", - "description": "simplified stream contsruction", - "main": "index.js", - "scripts": { - "test": "set -e; for t in test/*.js; do node $t; done" - }, - "devDependencies": { - "stream-spec": "~0.3.5", - "tape": "~0.2.2" - }, - "keywords": [ - "stream", - "streams", - "user-streams", - "pipe" - ], - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "dominictarr.com" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/dominictarr/through.git" - }, - "homepage": "http://github.com/dominictarr/through", - "testling": { - "browsers": [ - "ie/8..latest", - "ff/15..latest", - "chrome/20..latest", - "safari/5.1..latest" - ], - "files": "test/*.js" - }, - "readme": "#through\n\n[![build status](https://secure.travis-ci.org/dominictarr/through.png)](http://travis-ci.org/dominictarr/through)\n\nEasy way to create a `Stream` that is both `readable` and `writable`. \n\n* Pass in optional `write` and `end` methods.\n* `through` takes care of pause/resume logic if you use `this.queue(data)` instead of `this.emit('data', data)`.\n* Use `this.pause()` and `this.resume()` to manage flow.\n* Check `this.paused` to see current flow state. (`write` always returns `!this.paused`).\n\nThis function is the basis for most of the synchronous streams in \n[event-stream](http://github.com/dominictarr/event-stream).\n\n``` js\nvar through = require('through')\n\nthrough(function write(data) {\n this.queue(data) //data *must* not be null\n },\n function end () { //optional\n this.queue(null)\n })\n```\n\nOr, can also be used _without_ buffering on pause, use `this.emit('data', data)`,\nand this.emit('end')\n\n``` js\nvar through = require('through')\n\nthrough(function write(data) {\n this.emit('data', data)\n //this.pause() \n },\n function end () { //optional\n this.emit('end')\n })\n```\n\n## Extended Options\n\nYou will probably not need these 99% of the time.\n\n### autoDestroy=false\n\nBy default, `through` emits close when the writable\nand readable side of the stream has ended.\nIf that is not desired, set `autoDestroy=false`.\n\n``` js\nvar through = require('through')\n\n//like this\nvar ts = through(write, end, {autoDestroy: false})\n//or like this\nvar ts = through(write, end)\nts.autoDestroy = false\n```\n\n## License\n\nMIT / Apache2\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/dominictarr/through/issues" - }, - "_id": "through@2.3.4", - "_from": "through@~2.3.1" -} diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/readme.markdown b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/readme.markdown deleted file mode 100644 index b20bc9a8..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/readme.markdown +++ /dev/null @@ -1,63 +0,0 @@ -#through - -[![build status](https://secure.travis-ci.org/dominictarr/through.png)](http://travis-ci.org/dominictarr/through) - -Easy way to create a `Stream` that is both `readable` and `writable`. - -* Pass in optional `write` and `end` methods. -* `through` takes care of pause/resume logic if you use `this.queue(data)` instead of `this.emit('data', data)`. -* Use `this.pause()` and `this.resume()` to manage flow. -* Check `this.paused` to see current flow state. (`write` always returns `!this.paused`). - -This function is the basis for most of the synchronous streams in -[event-stream](http://github.com/dominictarr/event-stream). - -``` js -var through = require('through') - -through(function write(data) { - this.queue(data) //data *must* not be null - }, - function end () { //optional - this.queue(null) - }) -``` - -Or, can also be used _without_ buffering on pause, use `this.emit('data', data)`, -and this.emit('end') - -``` js -var through = require('through') - -through(function write(data) { - this.emit('data', data) - //this.pause() - }, - function end () { //optional - this.emit('end') - }) -``` - -## Extended Options - -You will probably not need these 99% of the time. - -### autoDestroy=false - -By default, `through` emits close when the writable -and readable side of the stream has ended. -If that is not desired, set `autoDestroy=false`. - -``` js -var through = require('through') - -//like this -var ts = through(write, end, {autoDestroy: false}) -//or like this -var ts = through(write, end) -ts.autoDestroy = false -``` - -## License - -MIT / Apache2 diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/test/auto-destroy.js b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/test/auto-destroy.js deleted file mode 100644 index 9a8fd000..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/test/auto-destroy.js +++ /dev/null @@ -1,30 +0,0 @@ -var test = require('tape') -var through = require('../') - -// must emit end before close. - -test('end before close', function (assert) { - var ts = through() - ts.autoDestroy = false - var ended = false, closed = false - - ts.on('end', function () { - assert.ok(!closed) - ended = true - }) - ts.on('close', function () { - assert.ok(ended) - closed = true - }) - - ts.write(1) - ts.write(2) - ts.write(3) - ts.end() - assert.ok(ended) - assert.notOk(closed) - ts.destroy() - assert.ok(closed) - assert.end() -}) - diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/test/buffering.js b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/test/buffering.js deleted file mode 100644 index b0084bfc..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/test/buffering.js +++ /dev/null @@ -1,71 +0,0 @@ -var test = require('tape') -var through = require('../') - -// must emit end before close. - -test('buffering', function(assert) { - var ts = through(function (data) { - this.queue(data) - }, function () { - this.queue(null) - }) - - var ended = false, actual = [] - - ts.on('data', actual.push.bind(actual)) - ts.on('end', function () { - ended = true - }) - - ts.write(1) - ts.write(2) - ts.write(3) - assert.deepEqual(actual, [1, 2, 3]) - ts.pause() - ts.write(4) - ts.write(5) - ts.write(6) - assert.deepEqual(actual, [1, 2, 3]) - ts.resume() - assert.deepEqual(actual, [1, 2, 3, 4, 5, 6]) - ts.pause() - ts.end() - assert.ok(!ended) - ts.resume() - assert.ok(ended) - assert.end() -}) - -test('buffering has data in queue, when ends', function (assert) { - - /* - * If stream ends while paused with data in the queue, - * stream should still emit end after all data is written - * on resume. - */ - - var ts = through(function (data) { - this.queue(data) - }, function () { - this.queue(null) - }) - - var ended = false, actual = [] - - ts.on('data', actual.push.bind(actual)) - ts.on('end', function () { - ended = true - }) - - ts.pause() - ts.write(1) - ts.write(2) - ts.write(3) - ts.end() - assert.deepEqual(actual, [], 'no data written yet, still paused') - assert.ok(!ended, 'end not emitted yet, still paused') - ts.resume() - assert.deepEqual(actual, [1, 2, 3], 'resumed, all data should be delivered') - assert.ok(ended, 'end should be emitted once all data was delivered') - assert.end(); -}) diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/test/end.js b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/test/end.js deleted file mode 100644 index fa113f58..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/test/end.js +++ /dev/null @@ -1,45 +0,0 @@ -var test = require('tape') -var through = require('../') - -// must emit end before close. - -test('end before close', function (assert) { - var ts = through() - var ended = false, closed = false - - ts.on('end', function () { - assert.ok(!closed) - ended = true - }) - ts.on('close', function () { - assert.ok(ended) - closed = true - }) - - ts.write(1) - ts.write(2) - ts.write(3) - ts.end() - assert.ok(ended) - assert.ok(closed) - assert.end() -}) - -test('end only once', function (t) { - - var ts = through() - var ended = false, closed = false - - ts.on('end', function () { - t.equal(ended, false) - ended = true - }) - - ts.queue(null) - ts.queue(null) - ts.queue(null) - - ts.resume() - - t.end() -}) diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/test/index.js b/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/test/index.js deleted file mode 100644 index 33e33f96..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/node_modules/through/test/index.js +++ /dev/null @@ -1,114 +0,0 @@ - -var test = require('tape') -var spec = require('stream-spec') -var through = require('../') - -/* - I'm using these two functions, and not streams and pipe - so there is less to break. if this test fails it must be - the implementation of _through_ -*/ - -function write(array, stream) { - array = array.slice() - function next() { - while(array.length) - if(stream.write(array.shift()) === false) - return stream.once('drain', next) - - stream.end() - } - - next() -} - -function read(stream, callback) { - var actual = [] - stream.on('data', function (data) { - actual.push(data) - }) - stream.once('end', function () { - callback(null, actual) - }) - stream.once('error', function (err) { - callback(err) - }) -} - -test('simple defaults', function(assert) { - - var l = 1000 - , expected = [] - - while(l--) expected.push(l * Math.random()) - - var t = through() - spec(t) - .through() - .pausable() - .validateOnExit() - - read(t, function (err, actual) { - assert.ifError(err) - assert.deepEqual(actual, expected) - assert.end() - }) - - write(expected, t) -}); - -test('simple functions', function(assert) { - - var l = 1000 - , expected = [] - - while(l--) expected.push(l * Math.random()) - - var t = through(function (data) { - this.emit('data', data*2) - }) - spec(t) - .through() - .pausable() - .validateOnExit() - - read(t, function (err, actual) { - assert.ifError(err) - assert.deepEqual(actual, expected.map(function (data) { - return data*2 - })) - assert.end() - }) - - write(expected, t) -}) - -test('pauses', function(assert) { - - var l = 1000 - , expected = [] - - while(l--) expected.push(l) //Math.random()) - - var t = through() - spec(t) - .through() - .pausable() - .validateOnExit() - - t.on('data', function () { - if(Math.random() > 0.1) return - t.pause() - process.nextTick(function () { - t.resume() - }) - }) - - read(t, function (err, actual) { - assert.ifError(err) - assert.deepEqual(actual, expected) - assert.end() - }) - - write(expected, t) -}) diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/package.json b/node_modules/gulp-minify-css/node_modules/event-stream/package.json deleted file mode 100644 index 735afd1b..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "event-stream", - "version": "3.1.0", - "description": "construct pipes of streams of events", - "homepage": "http://github.com/dominictarr/event-stream", - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/event-stream.git" - }, - "dependencies": { - "through": "~2.3.1", - "duplexer": "~0.1.1", - "from": "~0", - "map-stream": "~0.1.0", - "pause-stream": "0.0.11", - "split": "0.2", - "stream-combiner": "~0.0.4" - }, - "devDependencies": { - "asynct": "*", - "it-is": "1", - "ubelt": "~3.2.2", - "stream-spec": "~0.3.5", - "tape": "~2.3.0" - }, - "scripts": { - "test": "asynct test/", - "test_tap": "set -e; for t in test/*.js; do node $t; done" - }, - "testling": { - "files": "test/*.js", - "browsers": { - "ie": [ - 8, - 9 - ], - "firefox": [ - 13 - ], - "chrome": [ - 20 - ], - "safari": [ - 5.1 - ], - "opera": [ - 12 - ] - } - }, - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "http://bit.ly/dominictarr" - }, - "readme": "# EventStream\n\n<img src=https://secure.travis-ci.org/dominictarr/event-stream.png?branch=master>\n\n[![browser status](http://ci.testling.com/dominictarr/event-stream.png)]\n(http://ci.testling.com/dominictarr/event-stream)\n\n[Streams](http://nodejs.org/api/stream.html \"Stream\") are node's best and most misunderstood idea, and \n_<em>EventStream</em>_ is a toolkit to make creating and working with streams <em>easy</em>. \n\nNormally, streams are only used of IO, \nbut in event stream we send all kinds of objects down the pipe. \nIf your application's <em>input</em> and <em>output</em> are streams, \nshouldn't the <em>throughput</em> be a stream too? \n\nThe *EventStream* functions resemble the array functions, \nbecause Streams are like Arrays, but laid out in time, rather than in memory. \n\n<em>All the `event-stream` functions return instances of `Stream`</em>.\n\n`event-stream` creates \n[0.8 streams](https://github.com/joyent/node/blob/v0.8/doc/api/stream.markdown)\n, which are compatible with [0.10 streams](http://nodejs.org/api/stream.html \"Stream\")\n\n>NOTE: I shall use the term <em>\"through stream\"</em> to refer to a stream that is writable <em>and</em> readable. \n\n###[simple example](https://github.com/dominictarr/event-stream/blob/master/examples/pretty.js):\n\n``` js\n\n//pretty.js\n\nif(!module.parent) {\n var es = require('event-stream')\n es.pipeline( //connect streams together with `pipe`\n process.openStdin(), //open stdin\n es.split(), //split stream to break on newlines\n es.map(function (data, callback) {//turn this async function into a stream\n callback(null\n , inspect(JSON.parse(data))) //render it nicely\n }),\n process.stdout // pipe it to stdout !\n )\n }\n```\nrun it ...\n\n``` bash \ncurl -sS registry.npmjs.org/event-stream | node pretty.js\n```\n \n[node Stream documentation](http://nodejs.org/api/stream.html)\n\n## through (write?, end?)\n\nReemits data synchronously. Easy way to create syncronous through streams.\nPass in an optional `write` and `end` methods. They will be called in the \ncontext of the stream. Use `this.pause()` and `this.resume()` to manage flow.\nCheck `this.paused` to see current flow state. (write always returns `!this.paused`)\n\nthis function is the basis for most of the syncronous streams in `event-stream`.\n\n``` js\n\nes.through(function write(data) {\n this.emit('data', data)\n //this.pause() \n },\n function end () { //optional\n this.emit('end')\n })\n\n```\n\n##map (asyncFunction)\n\nCreate a through stream from an asyncronous function. \n\n``` js\nvar es = require('event-stream')\n\nes.map(function (data, callback) {\n //transform data\n // ...\n callback(null, data)\n})\n\n```\n\nEach map MUST call the callback. It may callback with data, with an error or with no arguments, \n\n * `callback()` drop this data. \n this makes the map work like `filter`, \n note:`callback(null,null)` is not the same, and will emit `null`\n\n * `callback(null, newData)` turn data into newData\n \n * `callback(error)` emit an error for this item.\n\n>Note: if a callback is not called, `map` will think that it is still being processed, \n>every call must be answered or the stream will not know when to end. \n>\n>Also, if the callback is called more than once, every call but the first will be ignored.\n\n## mapSync (syncFunction)\n\nSame as `map`, but the callback is called synchronously. Based on `es.through`\n\n## split (matcher)\n\nBreak up a stream and reassemble it so that each line is a chunk. matcher may be a `String`, or a `RegExp` \n\nExample, read every line in a file ...\n\n``` js\n es.pipeline(\n fs.createReadStream(file, {flags: 'r'}),\n es.split(),\n es.map(function (line, cb) {\n //do something with the line \n cb(null, line)\n })\n )\n\n```\n\n`split` takes the same arguments as `string.split` except it defaults to '\\n' instead of ',', and the optional `limit` paremeter is ignored.\n[String#split](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/split)\n\n## join (separator)\n\nCreate a through stream that emits `separator` between each chunk, just like Array#join.\n\n(for legacy reasons, if you pass a callback instead of a string, join is a synonym for `es.wait`)\n\n## merge (stream1,...,streamN)\n> concat → merge\n\nMerges streams into one and returns it.\nIncoming data will be emitted as soon it comes into - no ordering will be applied (for example: `data1 data1 data2 data1 data2` - where `data1` and `data2` is data from two streams).\nCounts how many streams was passed to it and emits end only when all streams emitted end.\n\n```js\nes.merge(\n process.stdout,\n process.stderr\n).pipe(fs.createWriteStream('output.log'));\n```\n\n## replace (from, to)\n\nReplace all occurences of `from` with `to`. `from` may be a `String` or a `RegExp`. \nWorks just like `string.split(from).join(to)`, but streaming.\n\n\n## parse\n\nConvienience function for parsing JSON chunks. For newline separated JSON,\nuse with `es.split`\n\n``` js\nfs.createReadStream(filename)\n .pipe(es.split()) //defaults to lines.\n .pipe(es.parse())\n```\n\n## stringify\n\nconvert javascript objects into lines of text. The text will have whitespace escaped and have a `\\n` appended, so it will be compatible with `es.parse`\n\n``` js\nobjectStream\n .pipe(es.stringify())\n .pipe(fs.createWriteStream(filename))\n```\n\n##readable (asyncFunction) \n\ncreate a readable stream (that respects pause) from an async function. \nwhile the stream is not paused, \nthe function will be polled with `(count, callback)`, \nand `this` will be the readable stream.\n\n``` js\n\nes.readable(function (count, callback) {\n if(streamHasEnded)\n return this.emit('end')\n \n //...\n \n this.emit('data', data) //use this way to emit multiple chunks per call.\n \n callback() // you MUST always call the callback eventually.\n // the function will not be called again until you do this.\n})\n```\nyou can also pass the data and the error to the callback. \nyou may only call the callback once. \ncalling the same callback more than once will have no effect. \n\n##readArray (array)\n\nCreate a readable stream from an Array.\n\nJust emit each item as a data event, respecting `pause` and `resume`.\n\n``` js\n var es = require('event-stream')\n , reader = es.readArray([1,2,3])\n\n reader.pipe(...)\n```\n\n## writeArray (callback)\n\ncreate a writeable stream from a callback, \nall `data` events are stored in an array, which is passed to the callback when the stream ends.\n\n``` js\n var es = require('event-stream')\n , reader = es.readArray([1, 2, 3])\n , writer = es.writeArray(function (err, array){\n //array deepEqual [1, 2, 3]\n })\n\n reader.pipe(writer)\n```\n\n## pipeline (stream1,...,streamN)\n\nTurn a pipeline into a single stream. `pipeline` returns a stream that writes to the first stream\nand reads from the last stream. \n\nListening for 'error' will recieve errors from all streams inside the pipe.\n\n> `connect` is an alias for `pipeline`.\n\n``` js\n\n es.pipeline( //connect streams together with `pipe`\n process.openStdin(), //open stdin\n es.split(), //split stream to break on newlines\n es.map(function (data, callback) {//turn this async function into a stream\n callback(null\n , inspect(JSON.parse(data))) //render it nicely\n }),\n process.stdout // pipe it to stdout !\n )\n```\n\n## pause () \n\nA stream that buffers all chunks when paused.\n\n\n``` js\n var ps = es.pause()\n ps.pause() //buffer the stream, also do not allow 'end' \n ps.resume() //allow chunks through\n```\n\n## duplex (writeStream, readStream)\n\nTakes a writable stream and a readable stream and makes them appear as a readable writable stream.\n\nIt is assumed that the two streams are connected to each other in some way. \n\n(This is used by `pipeline` and `child`.)\n\n``` js\n var grep = cp.exec('grep Stream')\n\n es.duplex(grep.stdin, grep.stdout)\n```\n\n## child (child_process)\n\nCreate a through stream from a child process ...\n\n``` js\n var cp = require('child_process')\n\n es.child(cp.exec('grep Stream')) // a through stream\n\n```\n\n## wait (callback)\n\nwaits for stream to emit 'end'.\njoins chunks of a stream into a single string. \ntakes an optional callback, which will be passed the \ncomplete string when it receives the 'end' event.\n\nalso, emits a single 'data' event.\n\n``` js\n\nreadStream.pipe(es.wait(function (err, text) {\n // have complete text here.\n}))\n\n```\n\n# Other Stream Modules\n\nThese modules are not included as a part of *EventStream* but may be\nuseful when working with streams.\n\n## [reduce (syncFunction, initial)](https://github.com/parshap/node-stream-reduce)\n\nLike `Array.prototype.reduce` but for streams. Given a sync reduce\nfunction and an initial value it will return a through stream that emits\na single data event with the reduced value once the input stream ends.\n\n``` js\nvar reduce = require(\"stream-reduce\");\nprocess.stdin.pipe(reduce(function(acc, data) {\n return acc + data.length;\n}, 0)).on(\"data\", function(length) {\n console.log(\"stdin size:\", length);\n});\n```\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/dominictarr/event-stream/issues" - }, - "_id": "event-stream@3.1.0", - "_from": "event-stream@~3.1.0" -} diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/readme.markdown b/node_modules/gulp-minify-css/node_modules/event-stream/readme.markdown deleted file mode 100644 index 5fc24497..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/readme.markdown +++ /dev/null @@ -1,323 +0,0 @@ -# EventStream - -<img src=https://secure.travis-ci.org/dominictarr/event-stream.png?branch=master> - -[![browser status](http://ci.testling.com/dominictarr/event-stream.png)] -(http://ci.testling.com/dominictarr/event-stream) - -[Streams](http://nodejs.org/api/stream.html "Stream") are node's best and most misunderstood idea, and -_<em>EventStream</em>_ is a toolkit to make creating and working with streams <em>easy</em>. - -Normally, streams are only used of IO, -but in event stream we send all kinds of objects down the pipe. -If your application's <em>input</em> and <em>output</em> are streams, -shouldn't the <em>throughput</em> be a stream too? - -The *EventStream* functions resemble the array functions, -because Streams are like Arrays, but laid out in time, rather than in memory. - -<em>All the `event-stream` functions return instances of `Stream`</em>. - -`event-stream` creates -[0.8 streams](https://github.com/joyent/node/blob/v0.8/doc/api/stream.markdown) -, which are compatible with [0.10 streams](http://nodejs.org/api/stream.html "Stream") - ->NOTE: I shall use the term <em>"through stream"</em> to refer to a stream that is writable <em>and</em> readable. - -###[simple example](https://github.com/dominictarr/event-stream/blob/master/examples/pretty.js): - -``` js - -//pretty.js - -if(!module.parent) { - var es = require('event-stream') - es.pipeline( //connect streams together with `pipe` - process.openStdin(), //open stdin - es.split(), //split stream to break on newlines - es.map(function (data, callback) {//turn this async function into a stream - callback(null - , inspect(JSON.parse(data))) //render it nicely - }), - process.stdout // pipe it to stdout ! - ) - } -``` -run it ... - -``` bash -curl -sS registry.npmjs.org/event-stream | node pretty.js -``` - -[node Stream documentation](http://nodejs.org/api/stream.html) - -## through (write?, end?) - -Reemits data synchronously. Easy way to create syncronous through streams. -Pass in an optional `write` and `end` methods. They will be called in the -context of the stream. Use `this.pause()` and `this.resume()` to manage flow. -Check `this.paused` to see current flow state. (write always returns `!this.paused`) - -this function is the basis for most of the syncronous streams in `event-stream`. - -``` js - -es.through(function write(data) { - this.emit('data', data) - //this.pause() - }, - function end () { //optional - this.emit('end') - }) - -``` - -##map (asyncFunction) - -Create a through stream from an asyncronous function. - -``` js -var es = require('event-stream') - -es.map(function (data, callback) { - //transform data - // ... - callback(null, data) -}) - -``` - -Each map MUST call the callback. It may callback with data, with an error or with no arguments, - - * `callback()` drop this data. - this makes the map work like `filter`, - note:`callback(null,null)` is not the same, and will emit `null` - - * `callback(null, newData)` turn data into newData - - * `callback(error)` emit an error for this item. - ->Note: if a callback is not called, `map` will think that it is still being processed, ->every call must be answered or the stream will not know when to end. -> ->Also, if the callback is called more than once, every call but the first will be ignored. - -## mapSync (syncFunction) - -Same as `map`, but the callback is called synchronously. Based on `es.through` - -## split (matcher) - -Break up a stream and reassemble it so that each line is a chunk. matcher may be a `String`, or a `RegExp` - -Example, read every line in a file ... - -``` js - es.pipeline( - fs.createReadStream(file, {flags: 'r'}), - es.split(), - es.map(function (line, cb) { - //do something with the line - cb(null, line) - }) - ) - -``` - -`split` takes the same arguments as `string.split` except it defaults to '\n' instead of ',', and the optional `limit` paremeter is ignored. -[String#split](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/split) - -## join (separator) - -Create a through stream that emits `separator` between each chunk, just like Array#join. - -(for legacy reasons, if you pass a callback instead of a string, join is a synonym for `es.wait`) - -## merge (stream1,...,streamN) -> concat → merge - -Merges streams into one and returns it. -Incoming data will be emitted as soon it comes into - no ordering will be applied (for example: `data1 data1 data2 data1 data2` - where `data1` and `data2` is data from two streams). -Counts how many streams was passed to it and emits end only when all streams emitted end. - -```js -es.merge( - process.stdout, - process.stderr -).pipe(fs.createWriteStream('output.log')); -``` - -## replace (from, to) - -Replace all occurences of `from` with `to`. `from` may be a `String` or a `RegExp`. -Works just like `string.split(from).join(to)`, but streaming. - - -## parse - -Convienience function for parsing JSON chunks. For newline separated JSON, -use with `es.split` - -``` js -fs.createReadStream(filename) - .pipe(es.split()) //defaults to lines. - .pipe(es.parse()) -``` - -## stringify - -convert javascript objects into lines of text. The text will have whitespace escaped and have a `\n` appended, so it will be compatible with `es.parse` - -``` js -objectStream - .pipe(es.stringify()) - .pipe(fs.createWriteStream(filename)) -``` - -##readable (asyncFunction) - -create a readable stream (that respects pause) from an async function. -while the stream is not paused, -the function will be polled with `(count, callback)`, -and `this` will be the readable stream. - -``` js - -es.readable(function (count, callback) { - if(streamHasEnded) - return this.emit('end') - - //... - - this.emit('data', data) //use this way to emit multiple chunks per call. - - callback() // you MUST always call the callback eventually. - // the function will not be called again until you do this. -}) -``` -you can also pass the data and the error to the callback. -you may only call the callback once. -calling the same callback more than once will have no effect. - -##readArray (array) - -Create a readable stream from an Array. - -Just emit each item as a data event, respecting `pause` and `resume`. - -``` js - var es = require('event-stream') - , reader = es.readArray([1,2,3]) - - reader.pipe(...) -``` - -## writeArray (callback) - -create a writeable stream from a callback, -all `data` events are stored in an array, which is passed to the callback when the stream ends. - -``` js - var es = require('event-stream') - , reader = es.readArray([1, 2, 3]) - , writer = es.writeArray(function (err, array){ - //array deepEqual [1, 2, 3] - }) - - reader.pipe(writer) -``` - -## pipeline (stream1,...,streamN) - -Turn a pipeline into a single stream. `pipeline` returns a stream that writes to the first stream -and reads from the last stream. - -Listening for 'error' will recieve errors from all streams inside the pipe. - -> `connect` is an alias for `pipeline`. - -``` js - - es.pipeline( //connect streams together with `pipe` - process.openStdin(), //open stdin - es.split(), //split stream to break on newlines - es.map(function (data, callback) {//turn this async function into a stream - callback(null - , inspect(JSON.parse(data))) //render it nicely - }), - process.stdout // pipe it to stdout ! - ) -``` - -## pause () - -A stream that buffers all chunks when paused. - - -``` js - var ps = es.pause() - ps.pause() //buffer the stream, also do not allow 'end' - ps.resume() //allow chunks through -``` - -## duplex (writeStream, readStream) - -Takes a writable stream and a readable stream and makes them appear as a readable writable stream. - -It is assumed that the two streams are connected to each other in some way. - -(This is used by `pipeline` and `child`.) - -``` js - var grep = cp.exec('grep Stream') - - es.duplex(grep.stdin, grep.stdout) -``` - -## child (child_process) - -Create a through stream from a child process ... - -``` js - var cp = require('child_process') - - es.child(cp.exec('grep Stream')) // a through stream - -``` - -## wait (callback) - -waits for stream to emit 'end'. -joins chunks of a stream into a single string. -takes an optional callback, which will be passed the -complete string when it receives the 'end' event. - -also, emits a single 'data' event. - -``` js - -readStream.pipe(es.wait(function (err, text) { - // have complete text here. -})) - -``` - -# Other Stream Modules - -These modules are not included as a part of *EventStream* but may be -useful when working with streams. - -## [reduce (syncFunction, initial)](https://github.com/parshap/node-stream-reduce) - -Like `Array.prototype.reduce` but for streams. Given a sync reduce -function and an initial value it will return a through stream that emits -a single data event with the reduced value once the input stream ends. - -``` js -var reduce = require("stream-reduce"); -process.stdin.pipe(reduce(function(acc, data) { - return acc + data.length; -}, 0)).on("data", function(length) { - console.log("stdin size:", length); -}); -``` diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/test/connect.asynct.js b/node_modules/gulp-minify-css/node_modules/event-stream/test/connect.asynct.js deleted file mode 100644 index e6a442bb..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/test/connect.asynct.js +++ /dev/null @@ -1,86 +0,0 @@ -var es = require('../') - , it = require('it-is').style('colour') - , d = require('ubelt') - -function makeExamplePipe() { - - return es.connect( - es.map(function (data, callback) { - callback(null, data * 2) - }), - es.map(function (data, callback) { - d.delay(callback)(null, data) - }), - es.map(function (data, callback) { - callback(null, data + 2) - })) -} - -exports['simple pipe'] = function (test) { - - var pipe = makeExamplePipe() - - pipe.on('data', function (data) { - it(data).equal(18) - test.done() - }) - - pipe.write(8) - -} - -exports['read array then map'] = function (test) { - - var readThis = d.map(3, 6, 100, d.id) //array of multiples of 3 < 100 - , first = es.readArray(readThis) - , read = [] - , pipe = - es.connect( - first, - es.map(function (data, callback) { - callback(null, {data: data}) - }), - es.map(function (data, callback) { - callback(null, {data: data}) - }), - es.writeArray(function (err, array) { - it(array).deepEqual(d.map(readThis, function (data) { - return {data: {data: data}} - })) - test.done() - }) - ) -} - -exports ['connect returns a stream'] = function (test) { - - var rw = - es.connect( - es.map(function (data, callback) { - callback(null, data * 2) - }), - es.map(function (data, callback) { - callback(null, data * 5) - }) - ) - - it(rw).has({readable: true, writable: true}) - - var array = [190, 24, 6, 7, 40, 57, 4, 6] - , _array = [] - , c = - es.connect( - es.readArray(array), - rw, - es.log('after rw:'), - es.writeArray(function (err, _array) { - it(_array).deepEqual(array.map(function (e) { return e * 10 })) - test.done() - }) - ) - -} - - -require('./helper')(module) - diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/test/helper/index.js b/node_modules/gulp-minify-css/node_modules/event-stream/test/helper/index.js deleted file mode 100644 index 96abaebe..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/test/helper/index.js +++ /dev/null @@ -1,12 +0,0 @@ -var tape = require('tape') - -module.exports = function (m) { - if(m.parent) return - for(var name in m.exports) { - tape(name, function (t) { - console.log('start', name) - t.done = t.end - m.exports[name](t) - }) - } -} diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/test/merge.asynct.js b/node_modules/gulp-minify-css/node_modules/event-stream/test/merge.asynct.js deleted file mode 100644 index 6ac65f32..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/test/merge.asynct.js +++ /dev/null @@ -1,21 +0,0 @@ -var es = require('../') - , it = require('it-is').style('colour') - , d = require('ubelt') - -exports.merge = function (t) { - var odd = d.map(1, 3, 100, d.id) //array of multiples of 3 < 100 - var even = d.map(2, 4, 100, d.id) //array of multiples of 3 < 100 - - var r1 = es.readArray(even) - var r2 = es.readArray(odd) - - var writer = es.writeArray(function (err, array){ - if(err) throw err //unpossible - it(array.sort()).deepEqual(even.concat(odd).sort()) - t.done() - }) - - es.merge(r1, r2).pipe(writer) - -} -require('./helper')(module) diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/test/pause.asynct.js b/node_modules/gulp-minify-css/node_modules/event-stream/test/pause.asynct.js deleted file mode 100644 index b0736040..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/test/pause.asynct.js +++ /dev/null @@ -1,39 +0,0 @@ - -var es = require('../') - , it = require('it-is') - , d = require('ubelt') - -exports ['gate buffers when shut'] = function (test) { - - var hundy = d.map(1,100, d.id) - , gate = es.pause() - , ten = 10 - es.connect( - es.readArray(hundy), - es.log('after readArray'), - gate, - //es.log('after gate'), - es.map(function (num, next) { - //stick a map in here to check that gate never emits when open - it(gate.paused).equal(false) - console.log('data', num) - if(!--ten) { - console.log('PAUSE') - gate.pause()//.resume() - d.delay(gate.resume.bind(gate), 10)() - ten = 10 - } - - next(null, num) - }), - es.writeArray(function (err, array) { //just realized that I should remove the error param. errors will be emitted - console.log('eonuhoenuoecbulc') - it(array).deepEqual(hundy) - test.done() - }) - ) - - gate.resume() - -} -require('./helper')(module) diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/test/pipeline.asynct.js b/node_modules/gulp-minify-css/node_modules/event-stream/test/pipeline.asynct.js deleted file mode 100644 index f07c6fa5..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/test/pipeline.asynct.js +++ /dev/null @@ -1,52 +0,0 @@ -var es = require('..') - -exports['do not duplicate errors'] = function (test) { - - var errors = 0; - var pipe = es.pipeline( - es.through(function(data) { - return this.emit('data', data); - }), - es.through(function(data) { - return this.emit('error', new Error(data)); - }) - ) - - pipe.on('error', function(err) { - errors++ - console.log('error count', errors) - process.nextTick(function () { - return test.done(); - }) - }) - - return pipe.write('meh'); - -} - -exports['3 pipe do not duplicate errors'] = function (test) { - - var errors = 0; - var pipe = es.pipeline( - es.through(function(data) { - return this.emit('data', data); - }), - es.through(function(data) { - return this.emit('error', new Error(data)); - }), - es.through() - ) - - pipe.on('error', function(err) { - errors++ - console.log('error count', errors) - process.nextTick(function () { - return test.done(); - }) - }) - - return pipe.write('meh'); - -} - -require('./helper')(module) diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/test/readArray.asynct.js b/node_modules/gulp-minify-css/node_modules/event-stream/test/readArray.asynct.js deleted file mode 100644 index 3eeb90a3..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/test/readArray.asynct.js +++ /dev/null @@ -1,89 +0,0 @@ - -var es = require('../') - , it = require('it-is').style('colour') - , d = require('ubelt') - -function readStream(stream, pauseAt, done) { - if(!done) done = pauseAt, pauseAt = -1 - var array = [] - stream.on('data', function (data) { - array.push(data) - if(!--pauseAt ) - stream.pause(), done(null, array) - }) - stream.on('error', done) - stream.on('end', function (data) { - done(null, array) - }) - -} - -exports ['read an array'] = function (test) { - - var readThis = d.map(3, 6, 100, d.id) //array of multiples of 3 < 100 - - var reader = es.readArray(readThis) - - var writer = es.writeArray(function (err, array){ - if(err) throw err //unpossible - it(array).deepEqual(readThis) - test.done() - }) - - reader.pipe(writer) -} - -exports ['read an array and pause it.'] = function (test) { - - var readThis = d.map(3, 6, 100, d.id) //array of multiples of 3 < 100 - - var reader = es.readArray(readThis) - - readStream(reader, 10, function (err, data) { - if(err) throw err - it(data).deepEqual([3, 6, 9, 12, 15, 18, 21, 24, 27, 30]) - readStream(reader, 10, function (err, data) { - it(data).deepEqual([33, 36, 39, 42, 45, 48, 51, 54, 57, 60]) - test.done() - }) - reader.resume() - }) - -} - -exports ['reader is readable, but not writeable'] = function (test) { - var reader = es.readArray([1]) - it(reader).has({ - readable: true, - writable: false - }) - - test.done() -} - - -exports ['read one item per tick'] = function (test) { - var readThis = d.map(3, 6, 100, d.id) //array of multiples of 3 < 100 - var drains = 0 - var reader = es.readArray(readThis) - var tickMapper = es.map(function (data,callback) { - process.nextTick(function () { - callback(null, data) - }) - //since tickMapper is returning false - //pipe should pause the writer until a drain occurs - return false - }) - reader.pipe(tickMapper) - readStream(tickMapper, function (err, array) { - it(array).deepEqual(readThis) - it(array.length).deepEqual(readThis.length) - it(drains).equal(readThis.length) - test.done() - }) - tickMapper.on('drain', function () { - drains ++ - }) - -} -require('./helper')(module) diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/test/readable.asynct.js b/node_modules/gulp-minify-css/node_modules/event-stream/test/readable.asynct.js deleted file mode 100644 index a33988cd..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/test/readable.asynct.js +++ /dev/null @@ -1,175 +0,0 @@ - -var es = require('../') - , it = require('it-is').style('colour') - , u = require('ubelt') - -exports ['read an array'] = function (test) { - - - console.log('readable') - return test.end() - var readThis = u.map(3, 6, 100, u.id) //array of multiples of 3 < 100 - - console.log('readable') - - var reader = - es.readable(function (i, callback) { - if(i >= readThis.length) - return this.emit('end') - console.log('readable') - callback(null, readThis[i]) - }) - - var writer = es.writeArray(function (err, array){ - if(err) throw err - it(array).deepEqual(readThis) - test.done() - }) - - reader.pipe(writer) -} - -exports ['read an array - async'] = function (test) { - - var readThis = u.map(3, 6, 100, u.id) //array of multiples of 3 < 100 - - var reader = - es.readable(function (i, callback) { - if(i >= readThis.length) - return this.emit('end') - u.delay(callback)(null, readThis[i]) - }) - - var writer = es.writeArray(function (err, array){ - if(err) throw err - it(array).deepEqual(readThis) - test.done() - }) - - reader.pipe(writer) -} - - -exports ['emit data then call next() also works'] = function (test) { - - var readThis = u.map(3, 6, 100, u.id) //array of multiples of 3 < 100 - - var reader = - es.readable(function (i, next) { - if(i >= readThis.length) - return this.emit('end') - this.emit('data', readThis[i]) - next() - }) - - var writer = es.writeArray(function (err, array){ - if(err) throw err - it(array).deepEqual(readThis) - test.done() - }) - - reader.pipe(writer) -} - - -exports ['callback emits error, then stops'] = function (test) { - - var err = new Error('INTENSIONAL ERROR') - , called = 0 - - var reader = - es.readable(function (i, callback) { - if(called++) - return - callback(err) - }) - - reader.on('error', function (_err){ - it(_err).deepEqual(err) - u.delay(function() { - it(called).equal(1) - test.done() - }, 50)() - }) -} - -exports['readable does not call read concurrently'] = function (test) { - - var current = 0 - var source = es.readable(function(count, cb){ - current ++ - if(count > 100) - return this.emit('end') - u.delay(function(){ - current -- - it(current).equal(0) - cb(null, {ok: true, n: count}); - })(); - }); - - var destination = es.map(function(data, cb){ - //console.info(data); - cb(); - }); - - var all = es.connect(source, destination); - - destination.on('end', test.done) -} - - -// -// emitting multiple errors is not supported by stream. -// -// I do not think that this is a good idea, at least, there should be an option to pipe to -// continue on error. it makes alot ef sense, if you are using Stream like I am, to be able to emit multiple errors. -// an error might not necessarily mean the end of the stream. it depends on the error, at least. -// -// I will start a thread on the mailing list. I'd rather that than use a custom `pipe` implementation. -// -// basically, I want to be able use pipe to transform objects, and if one object is invalid, -// the next might still be good, so I should get to choose if it's gonna stop. -// re-enstate this test when this issue progresses. -// -// hmm. I could add this to es.connect by deregistering the error listener, -// but I would rather it be an option in core. - -/* -exports ['emit multiple errors, with 2nd parameter (continueOnError)'] = function (test) { - - var readThis = d.map(1, 100, d.id) - , errors = 0 - var reader = - es.readable(function (i, callback) { - console.log(i, readThis.length) - if(i >= readThis.length) - return this.emit('end') - if(!(readThis[i] % 7)) - return callback(readThis[i]) - callback(null, readThis[i]) - }, true) - - var writer = es.writeArray(function (err, array) { - if(err) throw err - it(array).every(function (u){ - it(u % 7).notEqual(0) - }).property('length', 80) - it(errors).equal(14) - test.done() - }) - - reader.on('error', function (u) { - errors ++ - console.log(u) - if('number' !== typeof u) - throw u - - it(u % 7).equal(0) - - }) - - reader.pipe(writer) -} -*/ - -require('./helper')(module) diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/test/replace.asynct.js b/node_modules/gulp-minify-css/node_modules/event-stream/test/replace.asynct.js deleted file mode 100644 index 524a915b..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/test/replace.asynct.js +++ /dev/null @@ -1,51 +0,0 @@ -var es = require('../') - , it = require('it-is').style('colour') - , d = require('ubelt') - , spec = require('stream-spec') - -var next = process.nextTick - -var fizzbuzz = '12F4BF78FB11F1314FB1617F19BF2223FB26F2829FB3132F34BF3738FB41F4344FB4647F49BF5253FB56F5859FB6162F64BF6768FB71F7374FB7677F79BF8283FB86F8889FB9192F94BF9798FB' - , fizz7buzz = '12F4BFseven8FB11F1314FB161sevenF19BF2223FB26F2829FB3132F34BF3seven38FB41F4344FB464sevenF49BF5253FB56F5859FB6162F64BF6seven68FBseven1Fseven3seven4FBseven6sevensevenFseven9BF8283FB86F8889FB9192F94BF9seven98FB' - -exports ['fizz buzz'] = function (test) { - - var readThis = d.map(1, 100, function (i) { - return ( - ! (i % 3 || i % 5) ? "FB" : - !(i % 3) ? "F" : - !(i % 5) ? "B" : - ''+i - ) - }) //array of multiples of 3 < 100 - - var reader = es.readArray(readThis) - var join = es.wait(function (err, string){ - it(string).equal(fizzbuzz) - test.done() - }) - reader.pipe(join) - -} - - -exports ['fizz buzz replace'] = function (test) { - var split = es.split(/(1)/) - var replace = es.replace('7', 'seven') -// var x = spec(replace).through() - split - .pipe(replace) - .pipe(es.join(function (err, string) { - it(string).equal(fizz7buzz) - })) - - replace.on('close', function () { -// x.validate() - test.done() - }) - - split.write(fizzbuzz) - split.end() - -} -require('./helper')(module) diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/test/simple-map.asynct.js b/node_modules/gulp-minify-css/node_modules/event-stream/test/simple-map.asynct.js deleted file mode 100644 index 25121f93..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/test/simple-map.asynct.js +++ /dev/null @@ -1,343 +0,0 @@ -'use strict'; - -var es = require('../') - , it = require('it-is') - , u = require('ubelt') - , spec = require('stream-spec') - , Stream = require('stream') - , from = require('from') - , through = require('through') - -//REFACTOR THIS TEST TO USE es.readArray and es.writeArray - -function writeArray(array, stream) { - - array.forEach( function (j) { - stream.write(j) - }) - stream.end() - -} - -function readStream(stream, done) { - - var array = [] - stream.on('data', function (data) { - array.push(data) - }) - stream.on('error', done) - stream.on('end', function (data) { - done(null, array) - }) - -} - -//call sink on each write, -//and complete when finished. - -function pauseStream (prob, delay) { - var pauseIf = ( - 'number' == typeof prob - ? function () { - return Math.random() < prob - } - : 'function' == typeof prob - ? prob - : 0.1 - ) - var delayer = ( - !delay - ? process.nextTick - : 'number' == typeof delay - ? function (next) { setTimeout(next, delay) } - : delay - ) - - return es.through(function (data) { - if(!this.paused && pauseIf()) { - console.log('PAUSE STREAM PAUSING') - this.pause() - var self = this - delayer(function () { - console.log('PAUSE STREAM RESUMING') - self.resume() - }) - } - console.log("emit ('data', " + data + ')') - this.emit('data', data) - }) -} - -exports ['simple map'] = function (test) { - - var input = u.map(1, 1000, function () { - return Math.random() - }) - var expected = input.map(function (v) { - return v * 2 - }) - - var pause = pauseStream(0.1) - var fs = from(input) - var ts = es.writeArray(function (err, ar) { - it(ar).deepEqual(expected) - test.done() - }) - var map = es.through(function (data) { - this.emit('data', data * 2) - }) - - spec(map).through().validateOnExit() - spec(pause).through().validateOnExit() - - fs.pipe(map).pipe(pause).pipe(ts) -} - -exports ['simple map applied to a stream'] = function (test) { - - var input = [1,2,3,7,5,3,1,9,0,2,4,6] - //create event stream from - - var doubler = es.map(function (data, cb) { - cb(null, data * 2) - }) - - spec(doubler).through().validateOnExit() - - //a map is only a middle man, so it is both readable and writable - - it(doubler).has({ - readable: true, - writable: true, - }) - - readStream(doubler, function (err, output) { - it(output).deepEqual(input.map(function (j) { - return j * 2 - })) -// process.nextTick(x.validate) - test.done() - }) - - writeArray(input, doubler) - -} - -exports['pipe two maps together'] = function (test) { - - var input = [1,2,3,7,5,3,1,9,0,2,4,6] - //create event stream from - function dd (data, cb) { - cb(null, data * 2) - } - var doubler1 = es.map(dd), doubler2 = es.map(dd) - - doubler1.pipe(doubler2) - - spec(doubler1).through().validateOnExit() - spec(doubler2).through().validateOnExit() - - readStream(doubler2, function (err, output) { - it(output).deepEqual(input.map(function (j) { - return j * 4 - })) - test.done() - }) - - writeArray(input, doubler1) - -} - -//next: -// -// test pause, resume and drian. -// - -// then make a pipe joiner: -// -// plumber (evStr1, evStr2, evStr3, evStr4, evStr5) -// -// will return a single stream that write goes to the first - -exports ['map will not call end until the callback'] = function (test) { - - var ticker = es.map(function (data, cb) { - process.nextTick(function () { - cb(null, data * 2) - }) - }) - - spec(ticker).through().validateOnExit() - - ticker.write('x') - ticker.end() - - ticker.on('end', function () { - test.done() - }) -} - - -exports ['emit error thrown'] = function (test) { - - var err = new Error('INTENSIONAL ERROR') - , mapper = - es.map(function () { - throw err - }) - - mapper.on('error', function (_err) { - it(_err).equal(err) - test.done() - }) - -// onExit(spec(mapper).basic().validate) -//need spec that says stream may error. - - mapper.write('hello') - -} - -exports ['emit error calledback'] = function (test) { - - var err = new Error('INTENSIONAL ERROR') - , mapper = - es.map(function (data, callback) { - callback(err) - }) - - mapper.on('error', function (_err) { - it(_err).equal(err) - test.done() - }) - - mapper.write('hello') - -} - -exports ['do not emit drain if not paused'] = function (test) { - - var map = es.map(function (data, callback) { - u.delay(callback)(null, 1) - return true - }) - - spec(map).through().pausable().validateOnExit() - - map.on('drain', function () { - it(false).ok('should not emit drain unless the stream is paused') - }) - - it(map.write('hello')).equal(true) - it(map.write('hello')).equal(true) - it(map.write('hello')).equal(true) - setTimeout(function () {map.end()},10) - map.on('end', test.done) -} - -exports ['emits drain if paused, when all '] = function (test) { - var active = 0 - var drained = false - var map = es.map(function (data, callback) { - active ++ - u.delay(function () { - active -- - callback(null, 1) - })() - console.log('WRITE', false) - return false - }) - - spec(map).through().validateOnExit() - - map.on('drain', function () { - drained = true - it(active).equal(0, 'should emit drain when all maps are done') - }) - - it(map.write('hello')).equal(false) - it(map.write('hello')).equal(false) - it(map.write('hello')).equal(false) - - process.nextTick(function () {map.end()},10) - - map.on('end', function () { - console.log('end') - it(drained).ok('shoud have emitted drain before end') - test.done() - }) - -} - -exports ['map applied to a stream with filtering'] = function (test) { - - var input = [1,2,3,7,5,3,1,9,0,2,4,6] - - var doubler = es.map(function (data, callback) { - if (data % 2) - callback(null, data * 2) - else - callback() - }) - - readStream(doubler, function (err, output) { - it(output).deepEqual(input.filter(function (j) { - return j % 2 - }).map(function (j) { - return j * 2 - })) - test.done() - }) - - spec(doubler).through().validateOnExit() - - writeArray(input, doubler) - -} - -exports ['simple mapSync applied to a stream'] = function (test) { - - var input = [1,2,3,7,5,3,1,9,0,2,4,6] - - var doubler = es.mapSync(function (data) { - return data * 2 - }) - - readStream(doubler, function (err, output) { - it(output).deepEqual(input.map(function (j) { - return j * 2 - })) - test.done() - }) - - spec(doubler).through().validateOnExit() - - writeArray(input, doubler) - -} - -exports ['mapSync applied to a stream with filtering'] = function (test) { - - var input = [1,2,3,7,5,3,1,9,0,2,4,6] - - var doubler = es.mapSync(function (data) { - if (data % 2) - return data * 2 - }) - - readStream(doubler, function (err, output) { - it(output).deepEqual(input.filter(function (j) { - return j % 2 - }).map(function (j) { - return j * 2 - })) - test.done() - }) - - spec(doubler).through().validateOnExit() - - writeArray(input, doubler) - -} - -require('./helper')(module) diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/test/spec.asynct.js b/node_modules/gulp-minify-css/node_modules/event-stream/test/spec.asynct.js deleted file mode 100644 index 6d5fb6b8..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/test/spec.asynct.js +++ /dev/null @@ -1,86 +0,0 @@ -/* - assert that data is called many times - assert that end is called eventually - - assert that when stream enters pause state, - on drain is emitted eventually. -*/ - -var es = require('..') -var it = require('it-is').style('colour') -var spec = require('stream-spec') - -exports['simple stream'] = function (test) { - - var stream = es.through() - var x = spec(stream).basic().pausable() - - stream.write(1) - stream.write(1) - stream.pause() - stream.write(1) - stream.resume() - stream.write(1) - stream.end(2) //this will call write() - - process.nextTick(function (){ - x.validate() - test.done() - }) -} - -exports['throw on write when !writable'] = function (test) { - - var stream = es.through() - var x = spec(stream).basic().pausable() - - stream.write(1) - stream.write(1) - stream.end(2) //this will call write() - stream.write(1) //this will be throwing..., but the spec will catch it. - - process.nextTick(function () { - x.validate() - test.done() - }) - -} - -exports['end fast'] = function (test) { - - var stream = es.through() - var x = spec(stream).basic().pausable() - - stream.end() //this will call write() - - process.nextTick(function () { - x.validate() - test.done() - }) - -} - - -/* - okay, that was easy enough, whats next? - - say, after you call paused(), write should return false - until resume is called. - - simple way to implement this: - write must return !paused - after pause() paused = true - after resume() paused = false - - on resume, if !paused drain is emitted again. - after drain, !paused - - there are lots of subtle ordering bugs in streams. - - example, set !paused before emitting drain. - - the stream api is stateful. -*/ - - -require('./helper')(module) diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/test/split.asynct.js b/node_modules/gulp-minify-css/node_modules/event-stream/test/split.asynct.js deleted file mode 100644 index 7d44bac0..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/test/split.asynct.js +++ /dev/null @@ -1,47 +0,0 @@ -var es = require('../') - , it = require('it-is').style('colour') - , d = require('ubelt') - , join = require('path').join - , fs = require('fs') - , Stream = require('stream').Stream - , spec = require('stream-spec') - -exports ['es.split() works like String#split'] = function (test) { - var readme = join(__filename) - , expected = fs.readFileSync(readme, 'utf-8').split('\n') - , cs = es.split() - , actual = [] - , ended = false - , x = spec(cs).through() - - var a = new Stream () - - a.write = function (l) { - actual.push(l.trim()) - } - a.end = function () { - - ended = true - expected.forEach(function (v,k) { - //String.split will append an empty string '' - //if the string ends in a split pattern. - //es.split doesn't which was breaking this test. - //clearly, appending the empty string is correct. - //tests are passing though. which is the current job. - if(v) - it(actual[k]).like(v) - }) - //give the stream time to close - process.nextTick(function () { - test.done() - x.validate() - }) - } - a.writable = true - - fs.createReadStream(readme, {flags: 'r'}).pipe(cs) - cs.pipe(a) - -} - -require('./helper')(module) diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/test/stringify.js b/node_modules/gulp-minify-css/node_modules/event-stream/test/stringify.js deleted file mode 100644 index d158185a..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/test/stringify.js +++ /dev/null @@ -1,15 +0,0 @@ - - - -var es = require('../') - -exports['handle buffer'] = function (t) { - - - es.stringify().on('data', function (d) { - t.equal(d.trim(), JSON.stringify('HELLO')) - t.end() - }).write(new Buffer('HELLO')) - -} -require('./helper')(module) diff --git a/node_modules/gulp-minify-css/node_modules/event-stream/test/writeArray.asynct.js b/node_modules/gulp-minify-css/node_modules/event-stream/test/writeArray.asynct.js deleted file mode 100644 index 5d705de8..00000000 --- a/node_modules/gulp-minify-css/node_modules/event-stream/test/writeArray.asynct.js +++ /dev/null @@ -1,31 +0,0 @@ - -var es = require('../') - , it = require('it-is').style('colour') - , d = require('ubelt') - -exports ['write an array'] = function (test) { - - var readThis = d.map(3, 6, 100, d.id) //array of multiples of 3 < 100 - - var writer = es.writeArray(function (err, array){ - if(err) throw err //unpossible - it(array).deepEqual(readThis) - test.done() - }) - - d.each(readThis, writer.write.bind(writer)) - writer.end() - -} - - -exports ['writer is writable, but not readable'] = function (test) { - var reader = es.writeArray(function () {}) - it(reader).has({ - readable: false, - writable: true - }) - - test.done() -} -require('./helper')(module) diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/.npmignore b/node_modules/gulp-minify-css/node_modules/gulp-util/.npmignore deleted file mode 100644 index b5ef13a3..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -.DS_Store -*.log -node_modules -build -*.node -components \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/.travis.yml b/node_modules/gulp-minify-css/node_modules/gulp-util/.travis.yml deleted file mode 100644 index 33ad9f8c..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.9" - - "0.10" -after_script: - - npm run coveralls \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/LICENSE b/node_modules/gulp-minify-css/node_modules/gulp-util/LICENSE deleted file mode 100755 index 7cbe012c..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2014 Fractal <contact@wearefractal.com> - -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/node_modules/gulp-minify-css/node_modules/gulp-util/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/README.md deleted file mode 100644 index fd0e506e..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/README.md +++ /dev/null @@ -1,166 +0,0 @@ -# gulp-util [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/gulpjs/gulp-util.png?theme=shields.io)](https://david-dm.org/gulpjs/gulp-util) - -## Information - -<table> -<tr> -<td>Package</td><td>gulp-util</td> -</tr> -<tr> -<td>Description</td> -<td>Utility functions for gulp plugins</td> -</tr> -<tr> -<td>Node Version</td> -<td>>= 0.9</td> -</tr> -</table> - -## Usage - -```javascript -var gutil = require('gulp-util'); - -gutil.log('stuff happened', 'Really it did', gutil.colors.cyan('123')); -gutil.beep(); - -gutil.replaceExtension('file.coffee', '.js'); // file.js - -var opt = { - name: 'todd', - file: someGulpFile -}; -gutil.template('test <%= name %> <%= file.path %>', opt) // test todd /js/hi.js -``` - -### log(msg...) - -Logs stuff. Already prefixed with [gulp] and all that. Use the right colors for values. If you pass in multiple arguments it will join them by a space. - -``` -values (files, module names, etc.) = magenta -numbers (times, counts, etc) = cyan -``` - -### colors - -This is an instance of [chalk](https://github.com/sindresorhus/chalk) - -### date - -This is an instance of [node-dateformat](https://github.com/felixge/node-dateformat). - -### linefeed - -Just `\n`. Use this. - -### replaceExtension(path, newExtension) - -Replaces a file extension in a path. Returns the new path. - -### isStream(obj) - -Returns true or false if an object is a stream. - -### isBuffer(obj) - -Returns true or false if an object is a Buffer. - -### template(string[, data]) - -This is a lodash.template function wrapper. You must pass in a valid gulp file object so it is available to the user or it will error. You can not configure any of the delimiters. Look at the [lodash docs](http://lodash.com/docs#template) for more info. - -## new File(obj) - -This is just [vinyl](https://github.com/wearefractal/vinyl) - -```javascript -var file = new gutil.File({ - base: join(__dirname, './fixtures/'), - cwd: __dirname, - path: join(__dirname, './fixtures/test.coffee') -}); -``` - -## noop() - -Returns a stream that does nothing but pass data straight through. - -```javascript -gulp.task('scripts', function() { - gulp.src('src/**/*.js') - .pipe(concat('script.js')) - .pipe(gulp.env.production ? uglify() : gutil.noop()) - .pipe(gulp.dest('dist/'); -}); -``` - -## combine(streams...) - -Argument may also be an array of streams. Returns a function that returns the combined stream. Useful for keeping things DRY. This is a simple wrapper around event-stream's `.pipeline` - -```javascript -var scripts = gutil.combine( - coffee({bare: true}), - uglify(), - concat('script.js'), - gulp.dest('dist/') -); - -gulp.task('default', function() { - gulp.src('*.coffee').pipe(scripts()); -}); -``` - -## buffer(cb) - -This is similar to es.wait but instead of buffering text into one string it buffers anything into an array (so very useful for file objects). - -Returns a stream that can be piped to. - -The stream will emit one data event after the stream piped to it has ended. The data will be the same array passed to the callback. - -Callback is optional and receives two arguments: error and data - -```javascript -gulp.src('stuff/*.js') - .pipe(gutil.buffer(function(err, files){ - - }); -``` - -## new PluginError(pluginName, message[, options]) - -- pluginName should be the module name of your plugin -- message can be a string or an existing error -- By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error. -- If you pass an error in as the message the stack will be pulled from that, otherwise one will be created. - -These are all acceptable forms of instantiation: - -```javascript -var err = new gutil.PluginError('test', { - message: 'something broke' -}); - -var err = new gutil.PluginError({ - plugin: 'test', - message: 'something broke' -}); - -var err = new gutil.PluginError('test', 'something broke'); - -var err = new gutil.PluginError('test', 'something broke', {showStack: true}); - -var existingError = new Error('OMG'); -var err = new gutil.PluginError('test', existingError, {showStack: true}); -``` - -[npm-url]: https://npmjs.org/package/gulp-util -[npm-image]: https://badge.fury.io/js/gulp-util.png -[travis-url]: https://travis-ci.org/gulpjs/gulp-util -[travis-image]: https://travis-ci.org/gulpjs/gulp-util.png?branch=master -[coveralls-url]: https://coveralls.io/r/gulpjs/gulp-util -[coveralls-image]: https://coveralls.io/repos/gulpjs/gulp-util/badge.png -[depstat-url]: https://david-dm.org/gulpjs/gulp-util -[depstat-image]: https://david-dm.org/gulpjs/gulp-util.png diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/index.js deleted file mode 100644 index 6746ee4b..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/index.js +++ /dev/null @@ -1,18 +0,0 @@ -module.exports = { - File: require('./lib/File'), - replaceExtension: require('./lib/replaceExtension'), - colors: require('./lib/colors'), - date: require('./lib/date'), - log: require('./lib/log'), - template: require('./lib/template'), - env: require('./lib/env'), - beep: require('./lib/beep'), - noop: require('./lib/noop'), - isStream: require('./lib/isStream'), - isBuffer: require('./lib/isBuffer'), - isNull: require('./lib/isNull'), - linefeed: require('./lib/linefeed'), - combine: require('./lib/combine'), - buffer: require('./lib/buffer'), - PluginError: require('./lib/PluginError') -}; \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/File.js b/node_modules/gulp-minify-css/node_modules/gulp-util/lib/File.js deleted file mode 100644 index 690a508a..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/File.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('vinyl'); \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/PluginError.js b/node_modules/gulp-minify-css/node_modules/gulp-util/lib/PluginError.js deleted file mode 100644 index 96555672..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/PluginError.js +++ /dev/null @@ -1,65 +0,0 @@ -var util = require('util'); -var colors = require('./colors'); - -// wow what a clusterfuck -var parseOptions = function(plugin, message, opt) { - if (!opt) opt = {}; - if (typeof plugin === 'object') { - opt = plugin; - } else if (message instanceof Error) { - opt.message = message; - opt.plugin = plugin; - } else if (typeof message === 'object') { - opt = message; - opt.plugin = plugin; - } else if (typeof opt === 'object') { - opt.plugin = plugin; - opt.message = message; - } - return opt; -}; - -function PluginError(plugin, message, opt) { - if (!(this instanceof PluginError)) throw new Error('Call PluginError using new'); - - Error.call(this); - - var options = parseOptions(plugin, message, opt); - - this.plugin = options.plugin; - this.showStack = options.showStack; - - // if message is an Error grab crap off it - if (options.message instanceof Error) { - this.name = options.message.name; - this.message = options.message.message; - this.fileName = options.message.fileName; - this.lineNumber = options.message.lineNumber; - this.stack = options.message.stack; - } else { // else check options obj - this.name = options.name; - this.message = options.message; - this.fileName = options.fileName; - this.lineNumber = options.lineNumber; - this.stack = options.stack; - } - - // defaults - if (!this.name) this.name = 'Error'; - - // TODO: figure out why this explodes mocha - if (!this.stack) Error.captureStackTrace(this, arguments.callee || this.constructor); - - if (!this.plugin) throw new Error('Missing plugin name'); - if (!this.message) throw new Error('Missing error message'); -} - -util.inherits(PluginError, Error); - -PluginError.prototype.toString = function () { - var sig = '['+colors.green('gulp')+'] '+this.name+' in plugin \''+colors.cyan(this.plugin)+'\''; - var msg = this.showStack ? (this._stack || this.stack) : this.message; - return sig+': '+msg; -}; - -module.exports = PluginError; \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/beep.js b/node_modules/gulp-minify-css/node_modules/gulp-util/lib/beep.js deleted file mode 100644 index 5473d754..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/beep.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function() { - process.stdout.write('\x07'); -}; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/buffer.js b/node_modules/gulp-minify-css/node_modules/gulp-util/lib/buffer.js deleted file mode 100644 index 4cb064ac..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/buffer.js +++ /dev/null @@ -1,15 +0,0 @@ -var through = require('through2'); - -module.exports = function(fn) { - var buf = []; - var end = function(cb) { - this.push(buf); - cb(); - if(fn) fn(null, buf); - }; - var push = function(data, enc, cb) { - buf.push(data); - cb(); - }; - return through.obj(push, end); -}; \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/colors.js b/node_modules/gulp-minify-css/node_modules/gulp-util/lib/colors.js deleted file mode 100644 index bc804940..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/colors.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('chalk'); \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/combine.js b/node_modules/gulp-minify-css/node_modules/gulp-util/lib/combine.js deleted file mode 100644 index f20712d2..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/combine.js +++ /dev/null @@ -1,11 +0,0 @@ -var pipeline = require('multipipe'); - -module.exports = function(){ - var args = arguments; - if (args.length === 1 && Array.isArray(args[0])) { - args = args[0]; - } - return function(){ - return pipeline.apply(pipeline, args); - }; -}; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/date.js b/node_modules/gulp-minify-css/node_modules/gulp-util/lib/date.js deleted file mode 100644 index 935793cc..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/date.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('dateformat'); \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/env.js b/node_modules/gulp-minify-css/node_modules/gulp-util/lib/env.js deleted file mode 100644 index ea1e03e4..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/env.js +++ /dev/null @@ -1,4 +0,0 @@ -var parseArgs = require('minimist'); -var argv = parseArgs(process.argv.slice(2)); - -module.exports = argv; \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/isBuffer.js b/node_modules/gulp-minify-css/node_modules/gulp-util/lib/isBuffer.js deleted file mode 100644 index 0e23782c..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/isBuffer.js +++ /dev/null @@ -1,7 +0,0 @@ -var buf = require('buffer'); -var Buffer = buf.Buffer; - -// could use Buffer.isBuffer but this is the same exact thing... -module.exports = function(o) { - return typeof o === 'object' && o instanceof Buffer; -}; \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/isNull.js b/node_modules/gulp-minify-css/node_modules/gulp-util/lib/isNull.js deleted file mode 100644 index 403bb30e..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/isNull.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function(v) { - return v === null; -}; \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/isStream.js b/node_modules/gulp-minify-css/node_modules/gulp-util/lib/isStream.js deleted file mode 100644 index 9ce0929b..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/isStream.js +++ /dev/null @@ -1,5 +0,0 @@ -var Stream = require('stream').Stream; - -module.exports = function(o) { - return !!o && o instanceof Stream; -}; \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/linefeed.js b/node_modules/gulp-minify-css/node_modules/gulp-util/lib/linefeed.js deleted file mode 100644 index 5b0dfa4b..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/linefeed.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = '\n'; \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/log.js b/node_modules/gulp-minify-css/node_modules/gulp-util/lib/log.js deleted file mode 100644 index cdbb22fc..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/log.js +++ /dev/null @@ -1,9 +0,0 @@ -var colors = require('./colors'); - -module.exports = function(){ - var sig = '['+colors.green('gulp')+']'; - var args = Array.prototype.slice.call(arguments); - args.unshift(sig); - console.log.apply(console, args); - return this; -}; \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/noop.js b/node_modules/gulp-minify-css/node_modules/gulp-util/lib/noop.js deleted file mode 100644 index 7862cb16..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/noop.js +++ /dev/null @@ -1,5 +0,0 @@ -var through = require('through2'); - -module.exports = function () { - return through.obj(); -}; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/replaceExtension.js b/node_modules/gulp-minify-css/node_modules/gulp-util/lib/replaceExtension.js deleted file mode 100644 index 3f76938e..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/replaceExtension.js +++ /dev/null @@ -1,9 +0,0 @@ -var path = require('path'); - -module.exports = function(npath, ext) { - if (typeof npath !== 'string') return npath; - if (npath.length === 0) return npath; - - var nFileName = path.basename(npath, path.extname(npath))+ext; - return path.join(path.dirname(npath), nFileName); -}; \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/template.js b/node_modules/gulp-minify-css/node_modules/gulp-util/lib/template.js deleted file mode 100644 index c467820f..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/lib/template.js +++ /dev/null @@ -1,19 +0,0 @@ -var template = require('lodash.template'); -var reInterpolate = require('lodash._reinterpolate'); - -var forcedSettings = { - escape: /<%-([\s\S]+?)%>/g, - evaluate: /<%([\s\S]+?)%>/g, - interpolate: reInterpolate -}; - -module.exports = function(tmpl, data){ - var fn = template(tmpl, null, forcedSettings); - - var wrapped = function(o) { - if (typeof o === 'undefined' || typeof o.file === 'undefined') throw new Error('Failed to provide the current file as "file" to the template'); - return fn(o); - }; - - return (data ? wrapped(data) : wrapped); -}; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/index.js deleted file mode 100644 index a21f7022..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/index.js +++ /dev/null @@ -1,63 +0,0 @@ -'use strict'; -var ansi = require('ansi-styles'); -var stripAnsi = require('strip-ansi'); -var hasColor = require('has-color'); -var defineProps = Object.defineProperties; -var chalk = module.exports; - -var styles = (function () { - var ret = {}; - - ansi.grey = ansi.gray; - - Object.keys(ansi).forEach(function (key) { - ret[key] = { - get: function () { - this._styles.push(key); - return this; - } - }; - }); - - return ret; -})(); - -function init() { - var ret = {}; - - Object.keys(styles).forEach(function (name) { - ret[name] = { - get: function () { - var obj = defineProps(function self() { - var str = [].slice.call(arguments).join(' '); - - if (!chalk.enabled) { - return str; - } - - return self._styles.reduce(function (str, name) { - var code = ansi[name]; - return str ? code.open + str + code.close : ''; - }, str); - }, styles); - - obj._styles = []; - - return obj[name]; - } - } - }); - - return ret; -} - -defineProps(chalk, init()); - -chalk.styles = ansi; -chalk.stripColor = stripAnsi; -chalk.supportsColor = hasColor; - -// detect mode if not set manually -if (chalk.enabled === undefined) { - chalk.enabled = chalk.supportsColor; -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/strip-ansi b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/strip-ansi deleted file mode 120000 index b65c9f81..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/strip-ansi +++ /dev/null @@ -1 +0,0 @@ -../strip-ansi/cli.js \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js deleted file mode 100644 index 3da548c4..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; -var styles = module.exports; - -var codes = { - reset: [0, 0], - - bold: [1, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - strikethrough: [9, 29], - - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39], - - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49] -}; - -Object.keys(codes).forEach(function (key) { - var val = codes[key]; - var style = styles[key] = {}; - style.open = '\x1b[' + val[0] + 'm'; - style.close = '\x1b[' + val[1] + 'm'; -}); diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/package.json deleted file mode 100644 index 2d61dabe..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "ansi-styles", - "version": "1.0.0", - "description": "ANSI escape codes for colorizing strings in the terminal", - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "homepage": "https://github.com/sindresorhus/ansi-styles", - "bugs": { - "url": "https://github.com/sindresorhus/ansi-styles/issues" - }, - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "ansi-styles.js" - ], - "main": "ansi-styles", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/ansi-styles.git" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "readme": "# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles)\n\n> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for colorizing strings in the terminal.\n\nYou probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings.\n\n![screenshot](screenshot.png)\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles`\n\n\n## Example\n\n```js\nvar ansi = require('ansi-styles');\n\nconsole.log(ansi.green.open + 'Hello world!' + ansi.green.close);\n```\n\n## API\n\nEach style has an `open` and `close` property.\n\n\n## Styles\n\n### General\n\n- reset\n- bold\n- italic\n- underline\n- inverse\n- strikethrough\n\n### Text colors\n\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n\n### Background colors\n\n- bgBlack\n- bgRed\n- bgGreen\n- bgYellow\n- bgBlue\n- bgMagenta\n- bgCyan\n- bgWhite\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "_id": "ansi-styles@1.0.0", - "_from": "ansi-styles@~1.0.0" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/readme.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/readme.md deleted file mode 100644 index 4ac8cbd0..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,65 +0,0 @@ -# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles) - -> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for colorizing strings in the terminal. - -You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings. - -![screenshot](screenshot.png) - - -## Install - -Install with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles` - - -## Example - -```js -var ansi = require('ansi-styles'); - -console.log(ansi.green.open + 'Hello world!' + ansi.green.close); -``` - -## API - -Each style has an `open` and `close` property. - - -## Styles - -### General - -- reset -- bold -- italic -- underline -- inverse -- strikethrough - -### Text colors - -- black -- red -- green -- yellow -- blue -- magenta -- cyan -- white -- gray - -### Background colors - -- bgBlack -- bgRed -- bgGreen -- bgYellow -- bgBlue -- bgMagenta -- bgCyan -- bgWhite - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/has-color.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/has-color.js deleted file mode 100644 index 27316b1f..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/has-color.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; -module.exports = (function () { - if (process.argv.indexOf('--no-color') !== -1) { - return false; - } - - if (process.argv.indexOf('--color') !== -1) { - return true; - } - - if (!process.stdout.isTTY) { - return false; - } - - if (process.platform === 'win32') { - return true; - } - - if ('COLORTERM' in process.env) { - return true; - } - - return /^screen|^xterm|color|ansi|cygwin|linux/i.test(process.env.TERM); -})(); diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/package.json deleted file mode 100644 index e55a6244..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "has-color", - "version": "0.1.4", - "description": "Detect whether a terminal supports color", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "capability", - "detect" - ], - "homepage": "https://github.com/sindresorhus/has-color", - "bugs": { - "url": "https://github.com/sindresorhus/has-color/issues" - }, - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "has-color.js" - ], - "main": "has-color", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/has-color.git" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "readme": "# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color)\n\n> Detect whether a terminal supports color.\n\nUsed in the terminal color module [chalk](https://github.com/sindresorhus/chalk).\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/has-color): `npm install --save has-color`\n\n\n## Example\n\n```js\nvar hasColor = require('has-color');\n\nif (hasColor) {\n\tconsole.log('Terminal supports color.');\n}\n```\n\nIt obeys the CLI flags `--color` and `--no-color`.\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "_id": "has-color@0.1.4", - "_from": "has-color@~0.1.0" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/readme.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/readme.md deleted file mode 100644 index 0918c851..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color) - -> Detect whether a terminal supports color. - -Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). - - -## Install - -Install with [npm](https://npmjs.org/package/has-color): `npm install --save has-color` - - -## Example - -```js -var hasColor = require('has-color'); - -if (hasColor) { - console.log('Terminal supports color.'); -} -``` - -It obeys the CLI flags `--color` and `--no-color`. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/cli.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/cli.js deleted file mode 100755 index f8019cda..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/cli.js +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env node -'use strict'; -var fs = require('fs'); -var strip = require('./index'); -var input = process.argv[2]; - -if (process.argv.indexOf('-h') !== -1 || process.argv.indexOf('--help') !== -1) { - console.log('strip-ansi <input file> > <output file>'); - console.log('or'); - console.log('cat <input file> | strip-ansi > <output file>'); - return; -} - -if (process.argv.indexOf('-v') !== -1 || process.argv.indexOf('--version') !== -1) { - console.log(require('./package').version); - return; -} - -if (input) { - process.stdout.write(strip(fs.readFileSync(input, 'utf8'))); - return; -} - -process.stdin.setEncoding('utf8'); -process.stdin.on('data', function (data) { - process.stdout.write(strip(data)); -}); diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/index.js deleted file mode 100644 index 62320c59..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -module.exports = function (str) { - return typeof str === 'string' ? str.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, '') : str; -}; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/package.json deleted file mode 100644 index 7ca2b5d1..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "strip-ansi", - "version": "0.1.1", - "description": "Strip ANSI escape codes (used for colorizing strings in the terminal)", - "license": "MIT", - "bin": { - "strip-ansi": "cli.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/strip-ansi" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.8.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js", - "cli.js" - ], - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "devDependencies": { - "mocha": "~1.x" - }, - "readme": "# strip-ansi [![Build Status](https://secure.travis-ci.org/sindresorhus/strip-ansi.png?branch=master)](http://travis-ci.org/sindresorhus/strip-ansi)\n\n> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) (used for colorizing strings in the terminal)\n\nUsed in the terminal color module [chalk](https://github.com/sindresorhus/chalk).\n\n\n## Install\n\nInstall locally with [npm](https://npmjs.org/package/strip-ansi):\n\n```\nnpm install --save strip-ansi\n```\n\nOr globally if you want to use it as a CLI app:\n\n```\nnpm install --global strip-ansi\n```\n\nYou can then use it in your Terminal like:\n\n```\nstrip-ansi file-with-color-codes\n```\n\nOr pipe something to it:\n\n```\nls | strip-ansi\n```\n\n\n## Example\n\n```js\nvar stripAnsi = require('strip-ansi');\nstripAnsi('\\x1b[4mcake\\x1b[0m');\n//=> cake\n```\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "bugs": { - "url": "https://github.com/sindresorhus/strip-ansi/issues" - }, - "homepage": "https://github.com/sindresorhus/strip-ansi", - "_id": "strip-ansi@0.1.1", - "_from": "strip-ansi@~0.1.0" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/readme.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/readme.md deleted file mode 100644 index eb661b3d..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/readme.md +++ /dev/null @@ -1,46 +0,0 @@ -# strip-ansi [![Build Status](https://secure.travis-ci.org/sindresorhus/strip-ansi.png?branch=master)](http://travis-ci.org/sindresorhus/strip-ansi) - -> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) (used for colorizing strings in the terminal) - -Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). - - -## Install - -Install locally with [npm](https://npmjs.org/package/strip-ansi): - -``` -npm install --save strip-ansi -``` - -Or globally if you want to use it as a CLI app: - -``` -npm install --global strip-ansi -``` - -You can then use it in your Terminal like: - -``` -strip-ansi file-with-color-codes -``` - -Or pipe something to it: - -``` -ls | strip-ansi -``` - - -## Example - -```js -var stripAnsi = require('strip-ansi'); -stripAnsi('\x1b[4mcake\x1b[0m'); -//=> cake -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/package.json deleted file mode 100644 index 853b0144..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "chalk", - "version": "0.4.0", - "description": "Terminal string styling done right. Created because the `colors` module does some really horrible things.", - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/chalk" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.8.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js" - ], - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "ansi", - "styles", - "tty", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "has-color": "~0.1.0", - "ansi-styles": "~1.0.0", - "strip-ansi": "~0.1.0" - }, - "devDependencies": { - "mocha": "~1.x" - }, - "readme": "# <img width=\"250\" src=\"logo.png\" alt=\"chalk\">\n\n> Terminal string styling done right\n\n[![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk)\n\n[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough.\n\n**Chalk is a clean and focused alternative.**\n\n![screenshot](screenshot.png)\n\n\n## Why\n\n- **Doesn't extend String.prototype**\n- Expressive API\n- Clean and focused\n- Auto-detects color support\n- Actively maintained\n- [Used by 150+ modules](https://npmjs.org/browse/depended/chalk)\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/chalk): `npm install --save chalk`\n\n\n## Example\n\nChalk comes with an easy to use composable API where you just chain and nest the styles you want.\n\n```js\nvar chalk = require('chalk');\n\n// style a string\nconsole.log( chalk.blue('Hello world!') );\n\n// combine styled and normal strings\nconsole.log( chalk.blue('Hello'), 'World' + chalk.red('!') );\n\n// compose multiple styles using the chainable API\nconsole.log( chalk.blue.bgRed.bold('Hello world!') );\n\n// nest styles\nconsole.log( chalk.red('Hello', chalk.underline.bgBlue('world') + '!') );\n\n// pass in multiple arguments\nconsole.log( chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz') );\n```\n\nYou can easily define your own themes.\n\n```js\nvar chalk = require('chalk');\nvar error = chalk.bold.red;\nconsole.log(error('Error!'));\n```\n\n\n## API\n\n### chalk.`<style>[.<style>...](string, [string...])`\n\nExample: `chalk.red.bold.underline('Hello', 'world');`\n\nChain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter.\n\nMultiple arguments will be separated by space.\n\n### chalk.enabled\n\nColor support is automatically detected, but you can override it.\n\n### chalk.supportsColor\n\nDetect whether the terminal [supports color](https://github.com/sindresorhus/has-color).\n\nCan be overridden by the user with the flags `--color` and `--no-color`.\n\nUsed internally and handled for you, but exposed for convenience.\n\n### chalk.styles\n\nExposes the styles as [ANSI escape codes](https://github.com/sindresorhus/ansi-styles).\n\nGenerally not useful, but you might need just the `.open` or `.close` escape code if you're mixing externally styled strings with yours.\n\n```js\nvar chalk = require('chalk');\n\nconsole.log(chalk.styles.red);\n//=> {open: '\\x1b[31m', close: '\\x1b[39m'}\n\nconsole.log(chalk.styles.red.open + 'Hello' + chalk.styles.red.close);\n```\n\n### chalk.stripColor(string)\n\n[Strip color](https://github.com/sindresorhus/strip-ansi) from a string.\n\nCan be useful in combination with `.supportsColor` to strip color on externally styled text when it's not supported.\n\nExample:\n\n```js\nvar chalk = require('chalk');\nvar styledString = fromExternal();\n\nif (!chalk.supportsColor) {\n\tchalk.stripColor(styledString);\n}\n```\n\n\n## Styles\n\n### General\n\n- reset\n- bold\n- italic\n- underline\n- inverse\n- strikethrough\n\n### Text colors\n\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n\n### Background colors\n\n- bgBlack\n- bgRed\n- bgGreen\n- bgYellow\n- bgBlue\n- bgMagenta\n- bgCyan\n- bgWhite\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n\n\n-\n\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/sindresorhus/chalk/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n", - "readmeFilename": "readme.md", - "bugs": { - "url": "https://github.com/sindresorhus/chalk/issues" - }, - "homepage": "https://github.com/sindresorhus/chalk", - "_id": "chalk@0.4.0", - "_from": "chalk@~0.4.0" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/readme.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/readme.md deleted file mode 100644 index 46813acf..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/chalk/readme.md +++ /dev/null @@ -1,158 +0,0 @@ -# <img width="250" src="logo.png" alt="chalk"> - -> Terminal string styling done right - -[![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk) - -[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough. - -**Chalk is a clean and focused alternative.** - -![screenshot](screenshot.png) - - -## Why - -- **Doesn't extend String.prototype** -- Expressive API -- Clean and focused -- Auto-detects color support -- Actively maintained -- [Used by 150+ modules](https://npmjs.org/browse/depended/chalk) - - -## Install - -Install with [npm](https://npmjs.org/package/chalk): `npm install --save chalk` - - -## Example - -Chalk comes with an easy to use composable API where you just chain and nest the styles you want. - -```js -var chalk = require('chalk'); - -// style a string -console.log( chalk.blue('Hello world!') ); - -// combine styled and normal strings -console.log( chalk.blue('Hello'), 'World' + chalk.red('!') ); - -// compose multiple styles using the chainable API -console.log( chalk.blue.bgRed.bold('Hello world!') ); - -// nest styles -console.log( chalk.red('Hello', chalk.underline.bgBlue('world') + '!') ); - -// pass in multiple arguments -console.log( chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz') ); -``` - -You can easily define your own themes. - -```js -var chalk = require('chalk'); -var error = chalk.bold.red; -console.log(error('Error!')); -``` - - -## API - -### chalk.`<style>[.<style>...](string, [string...])` - -Example: `chalk.red.bold.underline('Hello', 'world');` - -Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter. - -Multiple arguments will be separated by space. - -### chalk.enabled - -Color support is automatically detected, but you can override it. - -### chalk.supportsColor - -Detect whether the terminal [supports color](https://github.com/sindresorhus/has-color). - -Can be overridden by the user with the flags `--color` and `--no-color`. - -Used internally and handled for you, but exposed for convenience. - -### chalk.styles - -Exposes the styles as [ANSI escape codes](https://github.com/sindresorhus/ansi-styles). - -Generally not useful, but you might need just the `.open` or `.close` escape code if you're mixing externally styled strings with yours. - -```js -var chalk = require('chalk'); - -console.log(chalk.styles.red); -//=> {open: '\x1b[31m', close: '\x1b[39m'} - -console.log(chalk.styles.red.open + 'Hello' + chalk.styles.red.close); -``` - -### chalk.stripColor(string) - -[Strip color](https://github.com/sindresorhus/strip-ansi) from a string. - -Can be useful in combination with `.supportsColor` to strip color on externally styled text when it's not supported. - -Example: - -```js -var chalk = require('chalk'); -var styledString = fromExternal(); - -if (!chalk.supportsColor) { - chalk.stripColor(styledString); -} -``` - - -## Styles - -### General - -- reset -- bold -- italic -- underline -- inverse -- strikethrough - -### Text colors - -- black -- red -- green -- yellow -- blue -- magenta -- cyan -- white -- gray - -### Background colors - -- bgBlack -- bgRed -- bgGreen -- bgYellow -- bgBlue -- bgMagenta -- bgCyan -- bgWhite - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) - - -- - -[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/sindresorhus/chalk/trend.png)](https://bitdeli.com/free "Bitdeli Badge") diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/dateformat/LICENSE b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/dateformat/LICENSE deleted file mode 100644 index 57d44e2a..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/dateformat/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -(c) 2007-2009 Steven Levithan <stevenlevithan.com> - -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/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/dateformat/Readme.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/dateformat/Readme.md deleted file mode 100644 index 12f9872d..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/dateformat/Readme.md +++ /dev/null @@ -1,79 +0,0 @@ -# dateformat - -A node.js package for Steven Levithan's excellent [dateFormat()][dateformat] function. - -## Modifications - -* Removed the `Date.prototype.format` method. Sorry folks, but extending native prototypes is for suckers. -* Added a `module.exports = dateFormat;` statement at the bottom -* Added the placeholder `N` to get the ISO 8601 numeric representation of the day of the week - -## Installation - -```bash -$ npm install dateformat -``` - -## Usage - -As taken from Steven's post, modified to match the Modifications listed above: -```js - var dateFormat = require('dateformat'); - var now = new Date(); - - // Basic usage - dateFormat(now, "dddd, mmmm dS, yyyy, h:MM:ss TT"); - // Saturday, June 9th, 2007, 5:46:21 PM - - // You can use one of several named masks - dateFormat(now, "isoDateTime"); - // 2007-06-09T17:46:21 - - // ...Or add your own - dateFormat.masks.hammerTime = 'HH:MM! "Can\'t touch this!"'; - dateFormat(now, "hammerTime"); - // 17:46! Can't touch this! - - // When using the standalone dateFormat function, - // you can also provide the date as a string - dateFormat("Jun 9 2007", "fullDate"); - // Saturday, June 9, 2007 - - // Note that if you don't include the mask argument, - // dateFormat.masks.default is used - dateFormat(now); - // Sat Jun 09 2007 17:46:21 - - // And if you don't include the date argument, - // the current date and time is used - dateFormat(); - // Sat Jun 09 2007 17:46:22 - - // You can also skip the date argument (as long as your mask doesn't - // contain any numbers), in which case the current date/time is used - dateFormat("longTime"); - // 5:46:22 PM EST - - // And finally, you can convert local time to UTC time. Simply pass in - // true as an additional argument (no argument skipping allowed in this case): - dateFormat(now, "longTime", true); - // 10:46:21 PM UTC - - // ...Or add the prefix "UTC:" or "GMT:" to your mask. - dateFormat(now, "UTC:h:MM:ss TT Z"); - // 10:46:21 PM UTC - - // You can also get the ISO 8601 week of the year: - dateFormat(now, "W"); - // 42 - - // and also get the ISO 8601 numeric representation of the day of the week: - dateFormat(now,"N"); - // 6 -``` -## License - -(c) 2007-2009 Steven Levithan [stevenlevithan.com][stevenlevithan], MIT license. - -[dateformat]: http://blog.stevenlevithan.com/archives/date-time-format -[stevenlevithan]: http://stevenlevithan.com/ diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/dateformat/lib/dateformat.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/dateformat/lib/dateformat.js deleted file mode 100644 index e1c38245..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/dateformat/lib/dateformat.js +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Date Format 1.2.3 - * (c) 2007-2009 Steven Levithan <stevenlevithan.com> - * MIT license - * - * Includes enhancements by Scott Trenda <scott.trenda.net> - * and Kris Kowal <cixar.com/~kris.kowal/> - * - * Accepts a date, a mask, or a date and a mask. - * Returns a formatted version of the given date. - * The date defaults to the current date/time. - * The mask defaults to dateFormat.masks.default. - */ - -var dateFormat = function () { - var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|"[^"]*"|'[^']*'/g, - timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g, - timezoneClip = /[^-+\dA-Z]/g, - pad = function (val, len) { - val = String(val); - len = len || 2; - while (val.length < len) val = "0" + val; - return val; - }, - /** - * Get the ISO 8601 week number - * Based on comments from - * http://techblog.procurios.nl/k/n618/news/view/33796/14863/Calculate-ISO-8601-week-and-year-in-javascript.html - */ - getWeek = function (date) { - // Remove time components of date - var targetThursday = new Date(date.getFullYear(), date.getMonth(), date.getDate()); - - // Change date to Thursday same week - targetThursday.setDate(targetThursday.getDate() - ((targetThursday.getDay() + 6) % 7) + 3); - - // Take January 4th as it is always in week 1 (see ISO 8601) - var firstThursday = new Date(targetThursday.getFullYear(), 0, 4); - - // Change date to Thursday same week - firstThursday.setDate(firstThursday.getDate() - ((firstThursday.getDay() + 6) % 7) + 3); - - // Check if daylight-saving-time-switch occured and correct for it - var ds = targetThursday.getTimezoneOffset() - firstThursday.getTimezoneOffset(); - targetThursday.setHours(targetThursday.getHours() - ds); - - // Number of weeks between target Thursday and first Thursday - var weekDiff = (targetThursday - firstThursday) / (86400000*7); - return 1 + weekDiff; - }, - - /** - * Get ISO-8601 numeric representation of the day of the week - * 1 (for Monday) through 7 (for Sunday) - */ - - getDayOfWeek = function(date){ - var dow = date.getDay(); - if(dow === 0) dow = 7; - return dow; - }; - - // Regexes and supporting functions are cached through closure - return function (date, mask, utc, gmt) { - var dF = dateFormat; - - // You can't provide utc if you skip other args (use the "UTC:" mask prefix) - if (arguments.length == 1 && Object.prototype.toString.call(date) == "[object String]" && !/\d/.test(date)) { - mask = date; - date = undefined; - } - - date = date || new Date; - - if(!(date instanceof Date)) { - date = new Date(date); - } - - if (isNaN(date)) { - throw TypeError("Invalid date"); - } - - mask = String(dF.masks[mask] || mask || dF.masks["default"]); - - // Allow setting the utc/gmt argument via the mask - var maskSlice = mask.slice(0, 4); - if (maskSlice == "UTC:" || maskSlice == "GMT:") { - mask = mask.slice(4); - utc = true; - if (maskSlice == "GMT:") { - gmt = true; - } - } - - var _ = utc ? "getUTC" : "get", - d = date[_ + "Date"](), - D = date[_ + "Day"](), - m = date[_ + "Month"](), - y = date[_ + "FullYear"](), - H = date[_ + "Hours"](), - M = date[_ + "Minutes"](), - s = date[_ + "Seconds"](), - L = date[_ + "Milliseconds"](), - o = utc ? 0 : date.getTimezoneOffset(), - W = getWeek(date), - N = getDayOfWeek(date), - flags = { - d: d, - dd: pad(d), - ddd: dF.i18n.dayNames[D], - dddd: dF.i18n.dayNames[D + 7], - m: m + 1, - mm: pad(m + 1), - mmm: dF.i18n.monthNames[m], - mmmm: dF.i18n.monthNames[m + 12], - yy: String(y).slice(2), - yyyy: y, - h: H % 12 || 12, - hh: pad(H % 12 || 12), - H: H, - HH: pad(H), - M: M, - MM: pad(M), - s: s, - ss: pad(s), - l: pad(L, 3), - L: pad(L > 99 ? Math.round(L / 10) : L), - t: H < 12 ? "a" : "p", - tt: H < 12 ? "am" : "pm", - T: H < 12 ? "A" : "P", - TT: H < 12 ? "AM" : "PM", - Z: gmt ? "GMT" : utc ? "UTC" : (String(date).match(timezone) || [""]).pop().replace(timezoneClip, ""), - o: (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4), - S: ["th", "st", "nd", "rd"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10], - W: W, - N: N - }; - - return mask.replace(token, function ($0) { - return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1); - }); - }; -}(); - -// Some common format strings -dateFormat.masks = { - "default": "ddd mmm dd yyyy HH:MM:ss", - shortDate: "m/d/yy", - mediumDate: "mmm d, yyyy", - longDate: "mmmm d, yyyy", - fullDate: "dddd, mmmm d, yyyy", - shortTime: "h:MM TT", - mediumTime: "h:MM:ss TT", - longTime: "h:MM:ss TT Z", - isoDate: "yyyy-mm-dd", - isoTime: "HH:MM:ss", - isoDateTime: "yyyy-mm-dd'T'HH:MM:ss", - isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'", - expiresHeaderFormat: "ddd, dd mmm yyyy HH:MM:ss Z" -}; - -// Internationalization strings -dateFormat.i18n = { - dayNames: [ - "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", - "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" - ], - monthNames: [ - "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", - "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" - ] -}; - -/* -// For convenience... -Date.prototype.format = function (mask, utc) { - return dateFormat(this, mask, utc); -}; -*/ - -if (typeof exports !== "undefined") { - module.exports = dateFormat; -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/dateformat/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/dateformat/package.json deleted file mode 100644 index deee5fee..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/dateformat/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "dateformat", - "description": "A node.js package for Steven Levithan's excellent dateFormat() function.", - "maintainers": "Felix Geisendörfer <felix@debuggable.com>", - "homepage": "https://github.com/felixge/node-dateformat", - "author": { - "name": "Steven Levithan" - }, - "contributors": [ - { - "name": "Steven Levithan" - }, - { - "name": "Felix Geisendörfer", - "email": "felix@debuggable.com" - }, - { - "name": "Christoph Tavan", - "email": "dev@tavan.de" - } - ], - "version": "1.0.7-1.2.3", - "main": "./lib/dateformat", - "dependencies": {}, - "devDependencies": {}, - "engines": { - "node": "*" - }, - "repository": { - "type": "git", - "url": "https://github.com/felixge/node-dateformat.git" - }, - "readme": "# dateformat\n\nA node.js package for Steven Levithan's excellent [dateFormat()][dateformat] function.\n\n## Modifications\n\n* Removed the `Date.prototype.format` method. Sorry folks, but extending native prototypes is for suckers.\n* Added a `module.exports = dateFormat;` statement at the bottom\n* Added the placeholder `N` to get the ISO 8601 numeric representation of the day of the week\n\n## Installation\n\n```bash\n$ npm install dateformat\n```\n\n## Usage\n\nAs taken from Steven's post, modified to match the Modifications listed above:\n```js\n var dateFormat = require('dateformat');\n var now = new Date();\n\n // Basic usage\n dateFormat(now, \"dddd, mmmm dS, yyyy, h:MM:ss TT\");\n // Saturday, June 9th, 2007, 5:46:21 PM\n\n // You can use one of several named masks\n dateFormat(now, \"isoDateTime\");\n // 2007-06-09T17:46:21\n\n // ...Or add your own\n dateFormat.masks.hammerTime = 'HH:MM! \"Can\\'t touch this!\"';\n dateFormat(now, \"hammerTime\");\n // 17:46! Can't touch this!\n\n // When using the standalone dateFormat function,\n // you can also provide the date as a string\n dateFormat(\"Jun 9 2007\", \"fullDate\");\n // Saturday, June 9, 2007\n\n // Note that if you don't include the mask argument,\n // dateFormat.masks.default is used\n dateFormat(now);\n // Sat Jun 09 2007 17:46:21\n\n // And if you don't include the date argument,\n // the current date and time is used\n dateFormat();\n // Sat Jun 09 2007 17:46:22\n\n // You can also skip the date argument (as long as your mask doesn't\n // contain any numbers), in which case the current date/time is used\n dateFormat(\"longTime\");\n // 5:46:22 PM EST\n\n // And finally, you can convert local time to UTC time. Simply pass in\n // true as an additional argument (no argument skipping allowed in this case):\n dateFormat(now, \"longTime\", true);\n // 10:46:21 PM UTC\n\n // ...Or add the prefix \"UTC:\" or \"GMT:\" to your mask.\n dateFormat(now, \"UTC:h:MM:ss TT Z\");\n // 10:46:21 PM UTC\n\n // You can also get the ISO 8601 week of the year:\n dateFormat(now, \"W\");\n // 42\n\n // and also get the ISO 8601 numeric representation of the day of the week:\n dateFormat(now,\"N\");\n // 6\n```\n## License\n\n(c) 2007-2009 Steven Levithan [stevenlevithan.com][stevenlevithan], MIT license.\n\n[dateformat]: http://blog.stevenlevithan.com/archives/date-time-format\n[stevenlevithan]: http://stevenlevithan.com/\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/felixge/node-dateformat/issues" - }, - "_id": "dateformat@1.0.7-1.2.3", - "_from": "dateformat@~1.0.7-1.2.3" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/dateformat/test/basic.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/dateformat/test/basic.js deleted file mode 100644 index 9602a72a..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/dateformat/test/basic.js +++ /dev/null @@ -1,45 +0,0 @@ -var dateFormat = require('./lib/dateformat.js'); -var now = new Date(); - -// Basic usage -console.log(dateFormat(now, "dddd, mmmm dS, yyyy, h:MM:ss TT")); -// Saturday, June 9th, 2007, 5:46:21 PM - -// You can use one of several named masks -console.log(dateFormat(now, "isoDateTime")); -// 2007-06-09T17:46:21 - -// ...Or add your own -dateFormat.masks.hammerTime = 'HH:MM! "Can\'t touch this!"'; -console.log(dateFormat(now, "hammerTime")); -// 17:46! Can't touch this! - -// When using the standalone dateFormat function, -// you can also provide the date as a string -console.log(dateFormat("Jun 9 2007", "fullDate")); -// Saturday, June 9, 2007 - -// Note that if you don't include the mask argument, -// dateFormat.masks.default is used -console.log(dateFormat(now)); -// Sat Jun 09 2007 17:46:21 - -// And if you don't include the date argument, -// the current date and time is used -console.log(dateFormat()); -// Sat Jun 09 2007 17:46:22 - -// You can also skip the date argument (as long as your mask doesn't -// contain any numbers), in which case the current date/time is used -console.log(dateFormat("longTime")); -// 5:46:22 PM EST - -// And finally, you can convert local time to UTC time. Simply pass in -// true as an additional argument (no argument skipping allowed in this case): -console.log(dateFormat(now, "longTime", true)); -// 10:46:21 PM UTC - -// ...Or add the prefix "UTC:" to your mask. -console.log(dateFormat(now, "UTC:h:MM:ss TT Z")); -// 10:46:21 PM UTC - diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/dateformat/test/test_dayofweek.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/dateformat/test/test_dayofweek.js deleted file mode 100644 index 07780fa8..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/dateformat/test/test_dayofweek.js +++ /dev/null @@ -1,10 +0,0 @@ -var dateFormat = require('./../lib/dateformat'), - assert = require('assert'); - -var start = 10; // the 10 of March 2013 is a Sunday -for(var dow = 1; dow <= 7; dow++){ - var date = new Date('2013-03-' + (start + dow)); - var N = dateFormat(date,'N'); - assert.equal(N,dow); - console.log('The ISO-8601 numeric representation of the day "' + date.toString() + '" is ' + N); -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/dateformat/test/test_weekofyear.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/dateformat/test/test_weekofyear.js deleted file mode 100644 index d1ddbe81..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/dateformat/test/test_weekofyear.js +++ /dev/null @@ -1,4 +0,0 @@ -var dateFormat = require('../lib/dateformat.js'); - -var val = process.argv[2] || new Date(); -console.log(dateFormat(val, 'W')); diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/dateformat/test/test_weekofyear.sh b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/dateformat/test/test_weekofyear.sh deleted file mode 100644 index 3c3e69b3..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/dateformat/test/test_weekofyear.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -# this just takes php's date() function as a reference to check if week of year -# is calculated correctly in the range from 1970 .. 2038 by brute force... - -SEQ="seq" -SYSTEM=`uname` -if [ "$SYSTEM" = "Darwin" ]; then - SEQ="jot" -fi - -for YEAR in {1970..2038}; do - for MONTH in {1..12}; do - DAYS=$(cal $MONTH $YEAR | egrep "28|29|30|31" |tail -1 |awk '{print $NF}') - for DAY in $( $SEQ $DAYS ); do - DATE=$YEAR-$MONTH-$DAY - echo -n $DATE ... - NODEVAL=$(node test_weekofyear.js $DATE) - PHPVAL=$(php -r "echo intval(date('W', strtotime('$DATE')));") - if [ "$NODEVAL" -ne "$PHPVAL" ]; then - echo "MISMATCH: node: $NODEVAL vs php: $PHPVAL for date $DATE" - else - echo " OK" - fi - done - done -done diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash._reinterpolate/LICENSE.txt b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash._reinterpolate/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash._reinterpolate/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash._reinterpolate/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash._reinterpolate/README.md deleted file mode 100644 index d362e36d..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash._reinterpolate/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._reinterpolate v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `reInterpolate` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash._reinterpolate/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash._reinterpolate/index.js deleted file mode 100644 index 0bf92a5c..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash._reinterpolate/index.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** Used to match "interpolate" template delimiters */ -var reInterpolate = /<%=([\s\S]+?)%>/g; - -module.exports = reInterpolate; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash._reinterpolate/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash._reinterpolate/package.json deleted file mode 100644 index 85f64e7b..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash._reinterpolate/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "lodash._reinterpolate", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `reInterpolate` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._reinterpolate v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `reInterpolate` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._reinterpolate@2.4.1", - "_from": "lodash._reinterpolate@~2.4.1" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/LICENSE.txt b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/README.md deleted file mode 100644 index e89bd0db..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.template v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.template`](http://lodash.com/docs#template) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/index.js deleted file mode 100644 index 230f8ee8..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/index.js +++ /dev/null @@ -1,216 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var defaults = require('lodash.defaults'), - escape = require('lodash.escape'), - escapeStringChar = require('lodash._escapestringchar'), - keys = require('lodash.keys'), - reInterpolate = require('lodash._reinterpolate'), - templateSettings = require('lodash.templatesettings'), - values = require('lodash.values'); - -/** Used to match empty string literals in compiled template source */ -var reEmptyStringLeading = /\b__p \+= '';/g, - reEmptyStringMiddle = /\b(__p \+=) '' \+/g, - reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; - -/** - * Used to match ES6 template delimiters - * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-literals-string-literals - */ -var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; - -/** Used to ensure capturing order of template delimiters */ -var reNoMatch = /($^)/; - -/** Used to match unescaped characters in compiled string literals */ -var reUnescapedString = /['\n\r\t\u2028\u2029\\]/g; - -/** - * A micro-templating method that handles arbitrary delimiters, preserves - * whitespace, and correctly escapes quotes within interpolated code. - * - * Note: In the development build, `_.template` utilizes sourceURLs for easier - * debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl - * - * For more information on precompiling templates see: - * http://lodash.com/custom-builds - * - * For more information on Chrome extension sandboxes see: - * http://developer.chrome.com/stable/extensions/sandboxingEval.html - * - * @static - * @memberOf _ - * @category Utilities - * @param {string} text The template text. - * @param {Object} data The data object used to populate the text. - * @param {Object} [options] The options object. - * @param {RegExp} [options.escape] The "escape" delimiter. - * @param {RegExp} [options.evaluate] The "evaluate" delimiter. - * @param {Object} [options.imports] An object to import into the template as local variables. - * @param {RegExp} [options.interpolate] The "interpolate" delimiter. - * @param {string} [sourceURL] The sourceURL of the template's compiled source. - * @param {string} [variable] The data object variable name. - * @returns {Function|string} Returns a compiled function when no `data` object - * is given, else it returns the interpolated text. - * @example - * - * // using the "interpolate" delimiter to create a compiled template - * var compiled = _.template('hello <%= name %>'); - * compiled({ 'name': 'fred' }); - * // => 'hello fred' - * - * // using the "escape" delimiter to escape HTML in data property values - * _.template('<b><%- value %></b>', { 'value': '<script>' }); - * // => '<b><script></b>' - * - * // using the "evaluate" delimiter to generate HTML - * var list = '<% _.forEach(people, function(name) { %><li><%- name %></li><% }); %>'; - * _.template(list, { 'people': ['fred', 'barney'] }); - * // => '<li>fred</li><li>barney</li>' - * - * // using the ES6 delimiter as an alternative to the default "interpolate" delimiter - * _.template('hello ${ name }', { 'name': 'pebbles' }); - * // => 'hello pebbles' - * - * // using the internal `print` function in "evaluate" delimiters - * _.template('<% print("hello " + name); %>!', { 'name': 'barney' }); - * // => 'hello barney!' - * - * // using a custom template delimiters - * _.templateSettings = { - * 'interpolate': /{{([\s\S]+?)}}/g - * }; - * - * _.template('hello {{ name }}!', { 'name': 'mustache' }); - * // => 'hello mustache!' - * - * // using the `imports` option to import jQuery - * var list = '<% jq.each(people, function(name) { %><li><%- name %></li><% }); %>'; - * _.template(list, { 'people': ['fred', 'barney'] }, { 'imports': { 'jq': jQuery } }); - * // => '<li>fred</li><li>barney</li>' - * - * // using the `sourceURL` option to specify a custom sourceURL for the template - * var compiled = _.template('hello <%= name %>', null, { 'sourceURL': '/basic/greeting.jst' }); - * compiled(data); - * // => find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector - * - * // using the `variable` option to ensure a with-statement isn't used in the compiled template - * var compiled = _.template('hi <%= data.name %>!', null, { 'variable': 'data' }); - * compiled.source; - * // => function(data) { - * var __t, __p = '', __e = _.escape; - * __p += 'hi ' + ((__t = ( data.name )) == null ? '' : __t) + '!'; - * return __p; - * } - * - * // using the `source` property to inline compiled templates for meaningful - * // line numbers in error messages and a stack trace - * fs.writeFileSync(path.join(cwd, 'jst.js'), '\ - * var JST = {\ - * "main": ' + _.template(mainText).source + '\ - * };\ - * '); - */ -function template(text, data, options) { - // based on John Resig's `tmpl` implementation - // http://ejohn.org/blog/javascript-micro-templating/ - // and Laura Doktorova's doT.js - // https://github.com/olado/doT - var settings = templateSettings.imports._.templateSettings || templateSettings; - text = String(text || ''); - - // avoid missing dependencies when `iteratorTemplate` is not defined - options = defaults({}, options, settings); - - var imports = defaults({}, options.imports, settings.imports), - importsKeys = keys(imports), - importsValues = values(imports); - - var isEvaluating, - index = 0, - interpolate = options.interpolate || reNoMatch, - source = "__p += '"; - - // compile the regexp to match each delimiter - var reDelimiters = RegExp( - (options.escape || reNoMatch).source + '|' + - interpolate.source + '|' + - (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' + - (options.evaluate || reNoMatch).source + '|$' - , 'g'); - - text.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) { - interpolateValue || (interpolateValue = esTemplateValue); - - // escape characters that cannot be included in string literals - source += text.slice(index, offset).replace(reUnescapedString, escapeStringChar); - - // replace delimiters with snippets - if (escapeValue) { - source += "' +\n__e(" + escapeValue + ") +\n'"; - } - if (evaluateValue) { - isEvaluating = true; - source += "';\n" + evaluateValue + ";\n__p += '"; - } - if (interpolateValue) { - source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'"; - } - index = offset + match.length; - - // the JS engine embedded in Adobe products requires returning the `match` - // string in order to produce the correct `offset` value - return match; - }); - - source += "';\n"; - - // if `variable` is not specified, wrap a with-statement around the generated - // code to add the data object to the top of the scope chain - var variable = options.variable, - hasVariable = variable; - - if (!hasVariable) { - variable = 'obj'; - source = 'with (' + variable + ') {\n' + source + '\n}\n'; - } - // cleanup code by stripping empty strings - source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source) - .replace(reEmptyStringMiddle, '$1') - .replace(reEmptyStringTrailing, '$1;'); - - // frame code as the function body - source = 'function(' + variable + ') {\n' + - (hasVariable ? '' : variable + ' || (' + variable + ' = {});\n') + - "var __t, __p = '', __e = _.escape" + - (isEvaluating - ? ', __j = Array.prototype.join;\n' + - "function print() { __p += __j.call(arguments, '') }\n" - : ';\n' - ) + - source + - 'return __p\n}'; - - try { - var result = Function(importsKeys, 'return ' + source ).apply(undefined, importsValues); - } catch(e) { - e.source = source; - throw e; - } - if (data) { - return result(data); - } - // provide the compiled function's source by its `toString` method, in - // supported environments, or the `source` property as a convenience for - // inlining compiled templates during the build process - result.source = source; - return result; -} - -module.exports = template; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/LICENSE.txt b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/README.md deleted file mode 100644 index 6191a196..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._escapestringchar v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `escapeStringChar` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/index.js deleted file mode 100644 index f3b8c438..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/index.js +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** Used to escape characters for inclusion in compiled string literals */ -var stringEscapes = { - '\\': '\\', - "'": "'", - '\n': 'n', - '\r': 'r', - '\t': 't', - '\u2028': 'u2028', - '\u2029': 'u2029' -}; - -/** - * Used by `template` to escape characters for inclusion in compiled - * string literals. - * - * @private - * @param {string} match The matched character to escape. - * @returns {string} Returns the escaped character. - */ -function escapeStringChar(match) { - return '\\' + stringEscapes[match]; -} - -module.exports = escapeStringChar; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/package.json deleted file mode 100644 index 600f622a..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "lodash._escapestringchar", - "version": "2.4.1", - "description": "The internal Lo-Dash function `escapeStringChar` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._escapestringchar v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `escapeStringChar` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._escapestringchar@2.4.1", - "_from": "lodash._escapestringchar@~2.4.1" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/LICENSE.txt b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/README.md deleted file mode 100644 index da283fc4..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.defaults v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.defaults`](http://lodash.com/docs#defaults) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/index.js deleted file mode 100644 index 52eec906..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/index.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var keys = require('lodash.keys'), - objectTypes = require('lodash._objecttypes'); - -/** - * Assigns own enumerable properties of source object(s) to the destination - * object for all destination properties that resolve to `undefined`. Once a - * property is set, additional defaults of the same property will be ignored. - * - * @static - * @memberOf _ - * @type Function - * @category Objects - * @param {Object} object The destination object. - * @param {...Object} [source] The source objects. - * @param- {Object} [guard] Allows working with `_.reduce` without using its - * `key` and `object` arguments as sources. - * @returns {Object} Returns the destination object. - * @example - * - * var object = { 'name': 'barney' }; - * _.defaults(object, { 'name': 'fred', 'employer': 'slate' }); - * // => { 'name': 'barney', 'employer': 'slate' } - */ -var defaults = function(object, source, guard) { - var index, iterable = object, result = iterable; - if (!iterable) return result; - var args = arguments, - argsIndex = 0, - argsLength = typeof guard == 'number' ? 2 : args.length; - while (++argsIndex < argsLength) { - iterable = args[argsIndex]; - if (iterable && objectTypes[typeof iterable]) { - var ownIndex = -1, - ownProps = objectTypes[typeof iterable] && keys(iterable), - length = ownProps ? ownProps.length : 0; - - while (++ownIndex < length) { - index = ownProps[ownIndex]; - if (typeof result[index] == 'undefined') result[index] = iterable[index]; - } - } - } - return result -}; - -module.exports = defaults; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/LICENSE.txt b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/README.md deleted file mode 100644 index 16de7300..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._objecttypes v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/index.js deleted file mode 100644 index da17c6cd..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** Used to determine if values are of the language type Object */ -var objectTypes = { - 'boolean': false, - 'function': true, - 'object': true, - 'number': false, - 'string': false, - 'undefined': false -}; - -module.exports = objectTypes; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/package.json deleted file mode 100644 index ab0f1e6d..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "lodash._objecttypes", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `objectTypes` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._objecttypes v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._objecttypes@2.4.1", - "_from": "lodash._objecttypes@~2.4.1" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/package.json deleted file mode 100644 index 53559bd9..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "lodash.defaults", - "version": "2.4.1", - "description": "The Lo-Dash function `_.defaults` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash.keys": "~2.4.1", - "lodash._objecttypes": "~2.4.1" - }, - "readme": "# lodash.defaults v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.defaults`](http://lodash.com/docs#defaults) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.defaults@2.4.1", - "_from": "lodash.defaults@~2.4.1" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/LICENSE.txt b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/README.md deleted file mode 100644 index 7cbc6538..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.escape v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.escape`](http://lodash.com/docs#escape) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/index.js deleted file mode 100644 index 343a4156..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/index.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var escapeHtmlChar = require('lodash._escapehtmlchar'), - keys = require('lodash.keys'), - reUnescapedHtml = require('lodash._reunescapedhtml'); - -/** - * Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their - * corresponding HTML entities. - * - * @static - * @memberOf _ - * @category Utilities - * @param {string} string The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escape('Fred, Wilma, & Pebbles'); - * // => 'Fred, Wilma, & Pebbles' - */ -function escape(string) { - return string == null ? '' : String(string).replace(reUnescapedHtml, escapeHtmlChar); -} - -module.exports = escape; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/LICENSE.txt b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/README.md deleted file mode 100644 index eef7f9c6..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._escapehtmlchar v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `escapeHtmlChar` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/index.js deleted file mode 100644 index ce4e6d8e..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/index.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var htmlEscapes = require('lodash._htmlescapes'); - -/** - * Used by `escape` to convert characters to HTML entities. - * - * @private - * @param {string} match The matched character to escape. - * @returns {string} Returns the escaped character. - */ -function escapeHtmlChar(match) { - return htmlEscapes[match]; -} - -module.exports = escapeHtmlChar; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/LICENSE.txt b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/README.md deleted file mode 100644 index 9957cefa..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._htmlescapes v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `htmlEscapes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/index.js deleted file mode 100644 index f69503d4..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/index.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** - * Used to convert characters to HTML entities: - * - * Though the `>` character is escaped for symmetry, characters like `>` and `/` - * don't require escaping in HTML and have no special meaning unless they're part - * of a tag or an unquoted attribute value. - * http://mathiasbynens.be/notes/ambiguous-ampersands (under "semi-related fun fact") - */ -var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' -}; - -module.exports = htmlEscapes; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/package.json deleted file mode 100644 index 29c83d94..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "lodash._htmlescapes", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `htmlEscapes` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._htmlescapes v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `htmlEscapes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._htmlescapes@2.4.1", - "_from": "lodash._htmlescapes@~2.4.1" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/package.json deleted file mode 100644 index 00c07f7b..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "lodash._escapehtmlchar", - "version": "2.4.1", - "description": "The internal Lo-Dash function `escapeHtmlChar` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash._htmlescapes": "~2.4.1" - }, - "readme": "# lodash._escapehtmlchar v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `escapeHtmlChar` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._escapehtmlchar@2.4.1", - "_from": "lodash._escapehtmlchar@~2.4.1" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/LICENSE.txt b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/README.md deleted file mode 100644 index c6ca90c4..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._reunescapedhtml v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `reUnescapedHtml` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/index.js deleted file mode 100644 index fa870474..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/index.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var htmlEscapes = require('lodash._htmlescapes'), - keys = require('lodash.keys'); - -/** Used to match HTML entities and HTML characters */ -var reUnescapedHtml = RegExp('[' + keys(htmlEscapes).join('') + ']', 'g'); - -module.exports = reUnescapedHtml; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/LICENSE.txt b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/README.md deleted file mode 100644 index 9957cefa..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._htmlescapes v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `htmlEscapes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/index.js deleted file mode 100644 index f69503d4..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/index.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** - * Used to convert characters to HTML entities: - * - * Though the `>` character is escaped for symmetry, characters like `>` and `/` - * don't require escaping in HTML and have no special meaning unless they're part - * of a tag or an unquoted attribute value. - * http://mathiasbynens.be/notes/ambiguous-ampersands (under "semi-related fun fact") - */ -var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' -}; - -module.exports = htmlEscapes; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/package.json deleted file mode 100644 index 29c83d94..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "lodash._htmlescapes", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `htmlEscapes` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._htmlescapes v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `htmlEscapes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._htmlescapes@2.4.1", - "_from": "lodash._htmlescapes@~2.4.1" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/package.json deleted file mode 100644 index 74a4f272..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "lodash._reunescapedhtml", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `reUnescapedHtml` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash._htmlescapes": "~2.4.1", - "lodash.keys": "~2.4.1" - }, - "readme": "# lodash._reunescapedhtml v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `reUnescapedHtml` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._reunescapedhtml@2.4.1", - "_from": "lodash._reunescapedhtml@~2.4.1" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/package.json deleted file mode 100644 index 254ecb1e..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "lodash.escape", - "version": "2.4.1", - "description": "The Lo-Dash function `_.escape` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash._escapehtmlchar": "~2.4.1", - "lodash.keys": "~2.4.1", - "lodash._reunescapedhtml": "~2.4.1" - }, - "readme": "# lodash.escape v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.escape`](http://lodash.com/docs#escape) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.escape@2.4.1", - "_from": "lodash.escape@~2.4.1" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/LICENSE.txt b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/README.md deleted file mode 100644 index bee29a8d..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.keys v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.keys`](http://lodash.com/docs#keys) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/index.js deleted file mode 100644 index 139568a2..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/index.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var isNative = require('lodash._isnative'), - isObject = require('lodash.isobject'), - shimKeys = require('lodash._shimkeys'); - -/* Native method shortcuts for methods with the same name as other `lodash` methods */ -var nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys; - -/** - * Creates an array composed of the own enumerable property names of an object. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property names. - * @example - * - * _.keys({ 'one': 1, 'two': 2, 'three': 3 }); - * // => ['one', 'two', 'three'] (property order is not guaranteed across environments) - */ -var keys = !nativeKeys ? shimKeys : function(object) { - if (!isObject(object)) { - return []; - } - return nativeKeys(object); -}; - -module.exports = keys; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/README.md deleted file mode 100644 index fbcaad2f..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._isnative v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `isNative` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/index.js deleted file mode 100644 index b34a3500..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/index.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** Used for native method references */ -var objectProto = Object.prototype; - -/** Used to resolve the internal [[Class]] of values */ -var toString = objectProto.toString; - -/** Used to detect if a method is native */ -var reNative = RegExp('^' + - String(toString) - .replace(/[.*+?^${}()|[\]\\]/g, '\\$&') - .replace(/toString| for [^\]]+/g, '.*?') + '$' -); - -/** - * Checks if `value` is a native function. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if the `value` is a native function, else `false`. - */ -function isNative(value) { - return typeof value == 'function' && reNative.test(value); -} - -module.exports = isNative; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/package.json deleted file mode 100644 index 5e652af4..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "lodash._isnative", - "version": "2.4.1", - "description": "The internal Lo-Dash function `isNative` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._isnative v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `isNative` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._isnative@2.4.1", - "_from": "lodash._isnative@~2.4.1" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/README.md deleted file mode 100644 index 23f3000b..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._shimkeys v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `shimKeys` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js deleted file mode 100644 index 12be0bf1..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var objectTypes = require('lodash._objecttypes'); - -/** Used for native method references */ -var objectProto = Object.prototype; - -/** Native method shortcuts */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A fallback implementation of `Object.keys` which produces an array of the - * given object's own enumerable property names. - * - * @private - * @type Function - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property names. - */ -var shimKeys = function(object) { - var index, iterable = object, result = []; - if (!iterable) return result; - if (!(objectTypes[typeof object])) return result; - for (index in iterable) { - if (hasOwnProperty.call(iterable, index)) { - result.push(index); - } - } - return result -}; - -module.exports = shimKeys; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/LICENSE.txt b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/README.md deleted file mode 100644 index 16de7300..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._objecttypes v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/index.js deleted file mode 100644 index da17c6cd..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** Used to determine if values are of the language type Object */ -var objectTypes = { - 'boolean': false, - 'function': true, - 'object': true, - 'number': false, - 'string': false, - 'undefined': false -}; - -module.exports = objectTypes; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/package.json deleted file mode 100644 index 21b0fd84..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "lodash._objecttypes", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `objectTypes` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._objecttypes v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._objecttypes@2.4.1", - "_from": "lodash._objecttypes@~2.4.1", - "scripts": {} -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json deleted file mode 100644 index a51388c1..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "lodash._shimkeys", - "version": "2.4.1", - "description": "The internal Lo-Dash function `shimKeys` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash._objecttypes": "~2.4.1" - }, - "readme": "# lodash._shimkeys v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `shimKeys` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._shimkeys@2.4.1", - "_from": "lodash._shimkeys@~2.4.1" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/LICENSE.txt b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/README.md deleted file mode 100644 index eeb0a78b..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.isobject v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.isObject`](http://lodash.com/docs#isObject) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/index.js deleted file mode 100644 index 3596ac34..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/index.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var objectTypes = require('lodash._objecttypes'); - -/** - * Checks if `value` is the language type of Object. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Objects - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if the `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // check if the value is the ECMAScript language type of Object - // http://es5.github.io/#x8 - // and avoid a V8 bug - // http://code.google.com/p/v8/issues/detail?id=2291 - return !!(value && objectTypes[typeof value]); -} - -module.exports = isObject; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/LICENSE.txt b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/README.md deleted file mode 100644 index 16de7300..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._objecttypes v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/index.js deleted file mode 100644 index da17c6cd..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** Used to determine if values are of the language type Object */ -var objectTypes = { - 'boolean': false, - 'function': true, - 'object': true, - 'number': false, - 'string': false, - 'undefined': false -}; - -module.exports = objectTypes; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/package.json deleted file mode 100644 index 21b0fd84..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "lodash._objecttypes", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `objectTypes` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._objecttypes v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._objecttypes@2.4.1", - "_from": "lodash._objecttypes@~2.4.1", - "scripts": {} -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/package.json deleted file mode 100644 index 698a9eaf..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "lodash.isobject", - "version": "2.4.1", - "description": "The Lo-Dash function `_.isObject` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash._objecttypes": "~2.4.1" - }, - "readme": "# lodash.isobject v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.isObject`](http://lodash.com/docs#isObject) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.isobject@2.4.1", - "_from": "lodash.isobject@~2.4.1" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/package.json deleted file mode 100644 index cd3c29bd..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "lodash.keys", - "version": "2.4.1", - "description": "The Lo-Dash function `_.keys` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash._isnative": "~2.4.1", - "lodash.isobject": "~2.4.1", - "lodash._shimkeys": "~2.4.1" - }, - "readme": "# lodash.keys v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.keys`](http://lodash.com/docs#keys) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.keys@2.4.1", - "_from": "lodash.keys@~2.4.1" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/LICENSE.txt b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/README.md deleted file mode 100644 index d9ce72bc..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.templatesettings v2.4.1 - -The [Lo-Dash](http://lodash.com/) object [`_.templateSettings`](http://lodash.com/docs#templateSettings) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/index.js deleted file mode 100644 index bba7e231..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/index.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var escape = require('lodash.escape'), - reInterpolate = require('lodash._reinterpolate'); - -/** - * By default, the template delimiters used by Lo-Dash are similar to those in - * embedded Ruby (ERB). Change the following template settings to use alternative - * delimiters. - * - * @static - * @memberOf _ - * @type Object - */ -var templateSettings = { - - /** - * Used to detect `data` property values to be HTML-escaped. - * - * @memberOf _.templateSettings - * @type RegExp - */ - 'escape': /<%-([\s\S]+?)%>/g, - - /** - * Used to detect code to be evaluated. - * - * @memberOf _.templateSettings - * @type RegExp - */ - 'evaluate': /<%([\s\S]+?)%>/g, - - /** - * Used to detect `data` property values to inject. - * - * @memberOf _.templateSettings - * @type RegExp - */ - 'interpolate': reInterpolate, - - /** - * Used to reference the data object in the template text. - * - * @memberOf _.templateSettings - * @type string - */ - 'variable': '', - - /** - * Used to import variables into the compiled template. - * - * @memberOf _.templateSettings - * @type Object - */ - 'imports': { - - /** - * A reference to the `lodash` function. - * - * @memberOf _.templateSettings.imports - * @type Function - */ - '_': { 'escape': escape } - } -}; - -module.exports = templateSettings; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json deleted file mode 100644 index f08cd47d..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "lodash.templatesettings", - "version": "2.4.1", - "description": "The Lo-Dash object `_.templateSettings` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash.escape": "~2.4.1", - "lodash._reinterpolate": "~2.4.1" - }, - "readme": "# lodash.templatesettings v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) object [`_.templateSettings`](http://lodash.com/docs#templateSettings) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.templatesettings@2.4.1", - "_from": "lodash.templatesettings@~2.4.1" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/LICENSE.txt b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/README.md deleted file mode 100644 index 33f028da..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.values v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.values`](http://lodash.com/docs#values) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/index.js deleted file mode 100644 index ccf622fa..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/index.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var keys = require('lodash.keys'); - -/** - * Creates an array composed of the own enumerable property values of `object`. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property values. - * @example - * - * _.values({ 'one': 1, 'two': 2, 'three': 3 }); - * // => [1, 2, 3] (property order is not guaranteed across environments) - */ -function values(object) { - var index = -1, - props = keys(object), - length = props.length, - result = Array(length); - - while (++index < length) { - result[index] = object[props[index]]; - } - return result; -} - -module.exports = values; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/package.json deleted file mode 100644 index 8e864ab7..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "lodash.values", - "version": "2.4.1", - "description": "The Lo-Dash function `_.values` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash.keys": "~2.4.1" - }, - "readme": "# lodash.values v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.values`](http://lodash.com/docs#values) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.values@2.4.1", - "_from": "lodash.values@~2.4.1" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/package.json deleted file mode 100644 index a42d1163..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/lodash.template/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "lodash.template", - "version": "2.4.1", - "description": "The Lo-Dash function `_.template` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash.defaults": "~2.4.1", - "lodash.escape": "~2.4.1", - "lodash._escapestringchar": "~2.4.1", - "lodash.keys": "~2.4.1", - "lodash._reinterpolate": "~2.4.1", - "lodash.templatesettings": "~2.4.1", - "lodash.values": "~2.4.1" - }, - "readme": "# lodash.template v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.template`](http://lodash.com/docs#template) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.template@2.4.1", - "_from": "lodash.template@~2.4.1" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/.travis.yml b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/.travis.yml deleted file mode 100644 index cc4dba29..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/LICENSE b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/example/parse.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/example/parse.js deleted file mode 100644 index abff3e8e..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/example/parse.js +++ /dev/null @@ -1,2 +0,0 @@ -var argv = require('../')(process.argv.slice(2)); -console.dir(argv); diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/index.js deleted file mode 100644 index 2aa95140..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/index.js +++ /dev/null @@ -1,187 +0,0 @@ -module.exports = function (args, opts) { - if (!opts) opts = {}; - - var flags = { bools : {}, strings : {} }; - - [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - - [].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - }); - - var aliases = {}; - Object.keys(opts.alias || {}).forEach(function (key) { - aliases[key] = [].concat(opts.alias[key]); - aliases[key].forEach(function (x) { - aliases[x] = [key].concat(aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - - var defaults = opts['default'] || {}; - - var argv = { _ : [] }; - Object.keys(flags.bools).forEach(function (key) { - setArg(key, defaults[key] === undefined ? false : defaults[key]); - }); - - var notFlags = []; - - if (args.indexOf('--') !== -1) { - notFlags = args.slice(args.indexOf('--')+1); - args = args.slice(0, args.indexOf('--')); - } - - function setArg (key, val) { - var value = !flags.strings[key] && isNumber(val) - ? Number(val) : val - ; - setKey(argv, key.split('.'), value); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), value); - }); - } - - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - - if (/^--.+=/.test(arg)) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - setArg(m[1], m[2]); - } - else if (/^--no-.+/.test(arg)) { - var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false); - } - else if (/^--.+/.test(arg)) { - var key = arg.match(/^--(.+)/)[1]; - var next = args[i + 1]; - if (next !== undefined && !/^-/.test(next) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true'); - i++; - } - else { - setArg(key, true); - } - } - else if (/^-[^-]+/.test(arg)) { - var letters = arg.slice(1,-1).split(''); - - var broken = false; - for (var j = 0; j < letters.length; j++) { - var next = arg.slice(j+2); - - if (next === '-') { - setArg(letters[j], next) - continue; - } - - if (/[A-Za-z]/.test(letters[j]) - && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next); - broken = true; - break; - } - - if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2)); - broken = true; - break; - } - else { - setArg(letters[j], true); - } - } - - var key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, args[i+1]); - i++; - } - else if (args[i+1] && /true|false/.test(args[i+1])) { - setArg(key, args[i+1] === 'true'); - i++; - } - else { - setArg(key, true); - } - } - } - else { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ); - } - } - - Object.keys(defaults).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) { - setKey(argv, key.split('.'), defaults[key]); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), defaults[key]); - }); - } - }); - - notFlags.forEach(function(key) { - argv._.push(key); - }); - - return argv; -}; - -function hasKey (obj, keys) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - o = (o[key] || {}); - }); - - var key = keys[keys.length - 1]; - return key in o; -} - -function setKey (obj, keys, value) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - if (o[key] === undefined) o[key] = {}; - o = o[key]; - }); - - var key = keys[keys.length - 1]; - if (o[key] === undefined || typeof o[key] === 'boolean') { - o[key] = value; - } - else if (Array.isArray(o[key])) { - o[key].push(value); - } - else { - o[key] = [ o[key], value ]; - } -} - -function isNumber (x) { - if (typeof x === 'number') return true; - if (/^0x[0-9a-f]+$/i.test(x)) return true; - return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); -} - -function longest (xs) { - return Math.max.apply(null, xs.map(function (x) { return x.length })); -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/package.json deleted file mode 100644 index 3f97f9c3..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "minimist", - "version": "0.0.7", - "description": "parse argument options", - "main": "index.js", - "devDependencies": { - "tape": "~1.0.4", - "tap": "~0.4.0" - }, - "scripts": { - "test": "tap test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "ff/5", - "firefox/latest", - "chrome/10", - "chrome/latest", - "safari/5.1", - "safari/latest", - "opera/12" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/minimist.git" - }, - "homepage": "https://github.com/substack/minimist", - "keywords": [ - "argv", - "getopt", - "parser", - "optimist" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "readme": "# minimist\n\nparse argument options\n\nThis module is the guts of optimist's argument parser without all the\nfanciful decoration.\n\n[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist)\n\n[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist)\n\n# example\n\n``` js\nvar argv = require('minimist')(process.argv.slice(2));\nconsole.dir(argv);\n```\n\n```\n$ node example/parse.js -a beep -b boop\n{ _: [], a: 'beep', b: 'boop' }\n```\n\n```\n$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz\n{ _: [ 'foo', 'bar', 'baz' ],\n x: 3,\n y: 4,\n n: 5,\n a: true,\n b: true,\n c: true,\n beep: 'boop' }\n```\n\n# methods\n\n``` js\nvar parseArgs = require('minimist')\n```\n\n## var argv = parseArgs(args, opts={})\n\nReturn an argument object `argv` populated with the array arguments from `args`.\n\n`argv._` contains all the arguments that didn't have an option associated with\nthem.\n\nNumeric-looking arguments will be returned as numbers unless `opts.string` or\n`opts.boolean` is set for that argument name.\n\nAny arguments after `'--'` will not be parsed and will end up in `argv._`.\n\noptions can be:\n\n* `opts.string` - a string or array of strings argument names to always treat as\nstrings\n* `opts.boolean` - a string or array of strings to always treat as booleans\n* `opts.alias` - an object mapping string names to strings or arrays of string\nargument names to use as aliases\n* `opts.default` - an object mapping string argument names to default values\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install minimist\n```\n\n# license\n\nMIT\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/substack/minimist/issues" - }, - "_id": "minimist@0.0.7", - "_from": "minimist@~0.0.5" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/readme.markdown b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/readme.markdown deleted file mode 100644 index c2563532..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/readme.markdown +++ /dev/null @@ -1,73 +0,0 @@ -# minimist - -parse argument options - -This module is the guts of optimist's argument parser without all the -fanciful decoration. - -[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist) - -[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist) - -# example - -``` js -var argv = require('minimist')(process.argv.slice(2)); -console.dir(argv); -``` - -``` -$ node example/parse.js -a beep -b boop -{ _: [], a: 'beep', b: 'boop' } -``` - -``` -$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz -{ _: [ 'foo', 'bar', 'baz' ], - x: 3, - y: 4, - n: 5, - a: true, - b: true, - c: true, - beep: 'boop' } -``` - -# methods - -``` js -var parseArgs = require('minimist') -``` - -## var argv = parseArgs(args, opts={}) - -Return an argument object `argv` populated with the array arguments from `args`. - -`argv._` contains all the arguments that didn't have an option associated with -them. - -Numeric-looking arguments will be returned as numbers unless `opts.string` or -`opts.boolean` is set for that argument name. - -Any arguments after `'--'` will not be parsed and will end up in `argv._`. - -options can be: - -* `opts.string` - a string or array of strings argument names to always treat as -strings -* `opts.boolean` - a string or array of strings to always treat as booleans -* `opts.alias` - an object mapping string names to strings or arrays of string -argument names to use as aliases -* `opts.default` - an object mapping string argument names to default values - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install minimist -``` - -# license - -MIT diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/test/dash.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/test/dash.js deleted file mode 100644 index 8b034b99..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/test/dash.js +++ /dev/null @@ -1,24 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('-', function (t) { - t.plan(5); - t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); - t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); - t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); - t.deepEqual( - parse([ '-b', '-' ], { boolean: 'b' }), - { b: true, _: [ '-' ] } - ); - t.deepEqual( - parse([ '-s', '-' ], { string: 's' }), - { s: '-', _: [] } - ); -}); - -test('-a -- b', function (t) { - t.plan(3); - t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); -}); diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/test/default_bool.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/test/default_bool.js deleted file mode 100644 index f0041ee4..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/test/default_bool.js +++ /dev/null @@ -1,20 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('boolean default true', function (t) { - var argv = parse([], { - boolean: 'sometrue', - default: { sometrue: true } - }); - t.equal(argv.sometrue, true); - t.end(); -}); - -test('boolean default false', function (t) { - var argv = parse([], { - boolean: 'somefalse', - default: { somefalse: false } - }); - t.equal(argv.somefalse, false); - t.end(); -}); diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/test/dotted.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/test/dotted.js deleted file mode 100644 index ef0ae349..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/test/dotted.js +++ /dev/null @@ -1,16 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('dotted alias', function (t) { - var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 22); - t.equal(argv.aa.bb, 22); - t.end(); -}); - -test('dotted default', function (t) { - var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 11); - t.equal(argv.aa.bb, 11); - t.end(); -}); diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/test/long.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/test/long.js deleted file mode 100644 index 5d3a1e09..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/test/long.js +++ /dev/null @@ -1,31 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('long opts', function (t) { - t.deepEqual( - parse([ '--bool' ]), - { bool : true, _ : [] }, - 'long boolean' - ); - t.deepEqual( - parse([ '--pow', 'xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture sp' - ); - t.deepEqual( - parse([ '--pow=xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture eq' - ); - t.deepEqual( - parse([ '--host', 'localhost', '--port', '555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures sp' - ); - t.deepEqual( - parse([ '--host=localhost', '--port=555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures eq' - ); - t.end(); -}); diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/test/parse.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/test/parse.js deleted file mode 100644 index 7c4348a4..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/test/parse.js +++ /dev/null @@ -1,297 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse args', function (t) { - t.deepEqual( - parse([ '--no-moo' ]), - { moo : false, _ : [] }, - 'no' - ); - t.deepEqual( - parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), - { v : ['a','b','c'], _ : [] }, - 'multi' - ); - t.end(); -}); - -test('comprehensive', function (t) { - t.deepEqual( - parse([ - '--name=meowmers', 'bare', '-cats', 'woo', - '-h', 'awesome', '--multi=quux', - '--key', 'value', - '-b', '--bool', '--no-meep', '--multi=baz', - '--', '--not-a-flag', 'eek' - ]), - { - c : true, - a : true, - t : true, - s : 'woo', - h : 'awesome', - b : true, - bool : true, - key : 'value', - multi : [ 'quux', 'baz' ], - meep : false, - name : 'meowmers', - _ : [ 'bare', '--not-a-flag', 'eek' ] - } - ); - t.end(); -}); - -test('nums', function (t) { - var argv = parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789' - ]); - t.deepEqual(argv, { - x : 1234, - y : 5.67, - z : 1e7, - w : '10f', - hex : 0xdeadbeef, - _ : [ 789 ] - }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv.y, 'number'); - t.deepEqual(typeof argv.z, 'number'); - t.deepEqual(typeof argv.w, 'string'); - t.deepEqual(typeof argv.hex, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); - -test('flag boolean', function (t) { - var argv = parse([ '-t', 'moo' ], { boolean: 't' }); - t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean value', function (t) { - var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { - boolean: [ 't', 'verbose' ], - default: { verbose: true } - }); - - t.deepEqual(argv, { - verbose: false, - t: true, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean default false', function (t) { - var argv = parse(['moo'], { - boolean: ['t', 'verbose'], - default: { verbose: false, t: false } - }); - - t.deepEqual(argv, { - verbose: false, - t: false, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); - -}); - -test('boolean groups', function (t) { - var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { - boolean: ['x','y','z'] - }); - - t.deepEqual(argv, { - x : true, - y : false, - z : true, - _ : [ 'one', 'two', 'three' ] - }); - - t.deepEqual(typeof argv.x, 'boolean'); - t.deepEqual(typeof argv.y, 'boolean'); - t.deepEqual(typeof argv.z, 'boolean'); - t.end(); -}); - -test('newlines in params' , function (t) { - var args = parse([ '-s', "X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - - // reproduce in bash: - // VALUE="new - // line" - // node program.js --s="$VALUE" - args = parse([ "--s=X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - t.end(); -}); - -test('strings' , function (t) { - var s = parse([ '-s', '0001234' ], { string: 's' }).s; - t.equal(s, '0001234'); - t.equal(typeof s, 'string'); - - var x = parse([ '-x', '56' ], { string: 'x' }).x; - t.equal(x, '56'); - t.equal(typeof x, 'string'); - t.end(); -}); - -test('stringArgs', function (t) { - var s = parse([ ' ', ' ' ], { string: '_' })._; - t.same(s.length, 2); - t.same(typeof s[0], 'string'); - t.same(s[0], ' '); - t.same(typeof s[1], 'string'); - t.same(s[1], ' '); - t.end(); -}); - -test('slashBreak', function (t) { - t.same( - parse([ '-I/foo/bar/baz' ]), - { I : '/foo/bar/baz', _ : [] } - ); - t.same( - parse([ '-xyz/foo/bar/baz' ]), - { x : true, y : true, z : '/foo/bar/baz', _ : [] } - ); - t.end(); -}); - -test('alias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: 'zoom' } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.f, 11); - t.end(); -}); - -test('multiAlias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: [ 'zm', 'zoom' ] } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.z, argv.zm); - t.equal(argv.f, 11); - t.end(); -}); - -test('nested dotted objects', function (t) { - var argv = parse([ - '--foo.bar', '3', '--foo.baz', '4', - '--foo.quux.quibble', '5', '--foo.quux.o_O', - '--beep.boop' - ]); - - t.same(argv.foo, { - bar : 3, - baz : 4, - quux : { - quibble : 5, - o_O : true - } - }); - t.same(argv.beep, { boop : true }); - t.end(); -}); - -test('boolean and alias with chainable api', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = parse(aliased, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var propertyArgv = parse(regular, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - alias: { 'h': 'herp' }, - boolean: 'herp' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias using explicit true', function (t) { - var aliased = [ '-h', 'true' ]; - var regular = [ '--herp', 'true' ]; - var opts = { - alias: { h: 'herp' }, - boolean: 'h' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -// regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function(t) { - var parsed = parse(['--boool', '--other=true'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); - - parsed = parse(['--boool', '--other=false'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); -}); diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/test/parse_modified.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/test/parse_modified.js deleted file mode 100644 index 21851b03..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/test/parse_modified.js +++ /dev/null @@ -1,9 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse with modifier functions' , function (t) { - t.plan(1); - - var argv = parse([ '-b', '123' ], { boolean: 'b' }); - t.deepEqual(argv, { b: true, _: ['123'] }); -}); diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/test/short.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/test/short.js deleted file mode 100644 index d513a1c2..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/test/short.js +++ /dev/null @@ -1,67 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('numeric short args', function (t) { - t.plan(2); - t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); - t.deepEqual( - parse([ '-123', '456' ]), - { 1: true, 2: true, 3: 456, _: [] } - ); -}); - -test('short', function (t) { - t.deepEqual( - parse([ '-b' ]), - { b : true, _ : [] }, - 'short boolean' - ); - t.deepEqual( - parse([ 'foo', 'bar', 'baz' ]), - { _ : [ 'foo', 'bar', 'baz' ] }, - 'bare' - ); - t.deepEqual( - parse([ '-cats' ]), - { c : true, a : true, t : true, s : true, _ : [] }, - 'group' - ); - t.deepEqual( - parse([ '-cats', 'meow' ]), - { c : true, a : true, t : true, s : 'meow', _ : [] }, - 'short group next' - ); - t.deepEqual( - parse([ '-h', 'localhost' ]), - { h : 'localhost', _ : [] }, - 'short capture' - ); - t.deepEqual( - parse([ '-h', 'localhost', '-p', '555' ]), - { h : 'localhost', p : 555, _ : [] }, - 'short captures' - ); - t.end(); -}); - -test('mixed short bool and capture', function (t) { - t.same( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); - -test('short and long', function (t) { - t.deepEqual( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/test/whitespace.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/test/whitespace.js deleted file mode 100644 index 8a52a58c..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/minimist/test/whitespace.js +++ /dev/null @@ -1,8 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('whitespace should be whitespace' , function (t) { - t.plan(1); - var x = parse([ '-x', '\t' ]).x; - t.equal(x, '\t'); -}); diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/.npmignore b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/.travis.yml b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/.travis.yml deleted file mode 100644 index 6e5919de..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "0.10" diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/History.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/History.md deleted file mode 100644 index 4174056f..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/History.md +++ /dev/null @@ -1,10 +0,0 @@ - -0.0.1 / 2013-01-15 -================== - -* fix error bubbling - -0.0.0 / 2013-01-13 -================== - -* initial release diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/Makefile b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/Makefile deleted file mode 100644 index d1df0ab3..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/Makefile +++ /dev/null @@ -1,10 +0,0 @@ - -node_modules: package.json - @npm install - -test: - @./node_modules/.bin/mocha \ - --reporter spec \ - --timeout 100 - -.PHONY: test \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/Readme.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/Readme.md deleted file mode 100644 index e8f432ec..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/Readme.md +++ /dev/null @@ -1,74 +0,0 @@ -# multipipe - -A better `Stream#pipe` that creates duplex streams and lets you handle errors in one place. - -[![build status](https://secure.travis-ci.org/segmentio/multipipe.png)](http://travis-ci.org/segmentio/multipipe) - -## Example - -```js -var pipe = require('multipipe'); - -// pipe streams -var stream = pipe(streamA, streamB, streamC); - -// centralized error handling -stream.on('error', fn); - -// creates a new stream -source.pipe(stream).pipe(dest); -``` - -## Duplex streams - - Write to the pipe and you'll really write to the first stream, read from the pipe and you'll read from the last stream. - -```js -var stream = pipe(a, b, c); - -source - .pipe(stream) - .pipe(destination); -``` - - In this example the flow of data is: - - * source -> - * a -> - * b -> - * c -> - * destination - -## Error handling - - Each `pipe` forwards the errors the streams it wraps emit, so you have one central place to handle errors: - -```js -var stream = pipe(a, b, c); - -stream.on('error', function(err){ - // called three times -}); - -a.emit('error', new Error); -b.emit('error', new Error); -c.emit('error', new Error); -``` - -## API - -### pipe(stream, ...) - -Pass a variable number of streams and each will be piped to the next one. - -A stream will be returned that wraps passed in streams in a way that errors will be forwarded and you can write to and/or read from it. - -## Installation - -```bash -$ npm install multipipe -``` - -## License - - MIT diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/index.js deleted file mode 100644 index 5292417c..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/index.js +++ /dev/null @@ -1,57 +0,0 @@ - -/** - * Module dependencies. - */ - -var duplexer = require('duplexer2'); -var Stream = require('stream'); - -/** - * Slice reference. - */ - -var slice = [].slice; - -/** - * Duplexer options. - */ - -var opts = { - bubbleErrors: false -}; - -/** - * Expose `pipe`. - */ - -module.exports = pipe; - -/** - * Pipe. - * - * @param {Stream,...} - * @return {Stream} - * @api public - */ - -function pipe(){ - if (arguments.length == 1) return arguments[0]; - var streams = slice.call(arguments); - var first = streams[0]; - var last = streams[streams.length - 1]; - var ret; - - if (first.writable && last.readable) ret = duplexer(opts, first, last); - else if (first.writable) ret = first; - else if (last.readable) ret = last; - else ret = new Stream; - - streams.forEach(function(stream, i){ - var next = streams[i+1]; - if (next) stream.pipe(next); - stream.on('error', ret.emit.bind(ret, 'error')); - }); - - return ret; -} - diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/.npmignore b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/.npmignore deleted file mode 100644 index 07e6e472..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/.npmignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/.travis.yml b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/.travis.yml deleted file mode 100644 index 6e5919de..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "0.10" diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/LICENSE.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/LICENSE.md deleted file mode 100644 index 547189a6..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/LICENSE.md +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2013, Deoxxa Development -====================================== -All rights reserved. --------------------- - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of Deoxxa Development nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY DEOXXA DEVELOPMENT ''AS IS'' AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL DEOXXA DEVELOPMENT BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/README.md deleted file mode 100644 index e39e1e9e..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/README.md +++ /dev/null @@ -1,129 +0,0 @@ -duplexer2 [![build status](https://travis-ci.org/deoxxa/duplexer2.png)](https://travis-ci.org/deoxxa/fork) -========= - -Like duplexer (http://npm.im/duplexer) but using streams2. - -Overview --------- - -duplexer2 is a reimplementation of [duplexer](http://npm.im/duplexer) using the -readable-stream API which is standard in node as of v0.10. Everything largely -works the same. - -Installation ------------- - -Available via [npm](http://npmjs.org/): - -> $ npm install duplexer2 - -Or via git: - -> $ git clone git://github.com/deoxxa/duplexer2.git node_modules/duplexer2 - -API ---- - -**duplexer2** - -Creates a new `DuplexWrapper` object, which is the actual class that implements -most of the fun stuff. All that fun stuff is hidden. DON'T LOOK. - -```javascript -duplexer2([options], writable, readable) -``` - -```javascript -var duplex = duplexer2(new stream.Writable(), new stream.Readable()); -``` - -Arguments - -* __options__ - an object specifying the regular `stream.Duplex` options, as - well as the properties described below. -* __writable__ - a writable stream -* __readable__ - a readable stream - -Options - -* __bubbleErrors__ - a boolean value that specifies whether to bubble errors - from the underlying readable/writable streams. Default is `true`. - -Example -------- - -Also see [example.js](https://github.com/deoxxa/duplexer2/blob/master/example.js). - -Code: - -```javascript -var stream = require("stream"); - -var duplexer2 = require("duplexer2"); - -var writable = new stream.Writable({objectMode: true}), - readable = new stream.Readable({objectMode: true}); - -writable._write = function _write(input, encoding, done) { - if (readable.push(input)) { - return done(); - } else { - readable.once("drain", done); - } -}; - -readable._read = function _read(n) { - // no-op -}; - -// simulate the readable thing closing after a bit -writable.once("finish", function() { - setTimeout(function() { - readable.push(null); - }, 500); -}); - -var duplex = duplexer2(writable, readable); - -duplex.on("data", function(e) { - console.log("got data", JSON.stringify(e)); -}); - -duplex.on("finish", function() { - console.log("got finish event"); -}); - -duplex.on("end", function() { - console.log("got end event"); -}); - -duplex.write("oh, hi there", function() { - console.log("finished writing"); -}); - -duplex.end(function() { - console.log("finished ending"); -}); -``` - -Output: - -``` -got data "oh, hi there" -finished writing -got finish event -finished ending -got end event -``` - -License -------- - -3-clause BSD. A copy is included with the source. - -Contact -------- - -* GitHub ([deoxxa](http://github.com/deoxxa)) -* Twitter ([@deoxxa](http://twitter.com/deoxxa)) -* Email ([deoxxa@fknsrs.biz](mailto:deoxxa@fknsrs.biz)) diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/example.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/example.js deleted file mode 100755 index ad537a04..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/example.js +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env node - -var stream = require("stream"); - -var duplexer2 = require("./"); - -var writable = new stream.Writable({objectMode: true}), - readable = new stream.Readable({objectMode: true}); - -writable._write = function _write(input, encoding, done) { - if (readable.push(input)) { - return done(); - } else { - readable.once("drain", done); - } -}; - -readable._read = function _read(n) { - // no-op -}; - -// simulate the readable thing closing after a bit -writable.once("finish", function() { - setTimeout(function() { - readable.push(null); - }, 500); -}); - -var duplex = duplexer2(writable, readable); - -duplex.on("data", function(e) { - console.log("got data", JSON.stringify(e)); -}); - -duplex.on("finish", function() { - console.log("got finish event"); -}); - -duplex.on("end", function() { - console.log("got end event"); -}); - -duplex.write("oh, hi there", function() { - console.log("finished writing"); -}); - -duplex.end(function() { - console.log("finished ending"); -}); diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/index.js deleted file mode 100644 index 90b261b4..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/index.js +++ /dev/null @@ -1,62 +0,0 @@ -var stream = require("stream"); - -var duplex2 = module.exports = function duplex2(options, writable, readable) { - return new DuplexWrapper(options, writable, readable); -}; - -var DuplexWrapper = exports.DuplexWrapper = function DuplexWrapper(options, writable, readable) { - if (typeof readable === "undefined") { - readable = writable; - writable = options; - options = null; - } - - options = options || {}; - options.objectMode = true; - - stream.Duplex.call(this, options); - - this._bubbleErrors = (typeof options.bubbleErrors === "undefined") || !!options.bubbleErrors; - - this._writable = writable; - this._readable = readable; - - var self = this; - - writable.once("finish", function() { - self.end(); - }); - - this.once("finish", function() { - writable.end(); - }); - - readable.on("data", function(e) { - if (!self.push(e)) { - readable.pause(); - } - }); - - readable.once("end", function() { - return self.push(null); - }); - - if (this._bubbleErrors) { - writable.on("error", function(err) { - return self.emit("error", err); - }); - - readable.on("error", function(err) { - return self.emit("error", err); - }); - } -}; -DuplexWrapper.prototype = Object.create(stream.Duplex.prototype, {constructor: {value: DuplexWrapper}}); - -DuplexWrapper.prototype._write = function _write(input, encoding, done) { - this._writable.write(input, encoding, done); -}; - -DuplexWrapper.prototype._read = function _read(n) { - this._readable.resume(); -}; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/package.json deleted file mode 100644 index 1949be68..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "duplexer2", - "version": "0.0.1", - "description": "Like duplexer (http://npm.im/duplexer) but using streams2", - "main": "index.js", - "scripts": { - "test": "mocha -R tap" - }, - "repository": { - "type": "git", - "url": "git://github.com/deoxxa/duplexer2.git" - }, - "keywords": [ - "duplex", - "stream", - "join", - "combine" - ], - "author": { - "name": "Conrad Pankoff", - "email": "deoxxa@fknsrs.biz", - "url": "http://www.fknsrs.biz/" - }, - "license": "BSD", - "bugs": { - "url": "https://github.com/deoxxa/duplexer2/issues" - }, - "devDependencies": { - "chai": "~1.7.2", - "mocha": "~1.12.1" - }, - "readme": "duplexer2 [![build status](https://travis-ci.org/deoxxa/duplexer2.png)](https://travis-ci.org/deoxxa/fork)\n=========\n\nLike duplexer (http://npm.im/duplexer) but using streams2.\n\nOverview\n--------\n\nduplexer2 is a reimplementation of [duplexer](http://npm.im/duplexer) using the\nreadable-stream API which is standard in node as of v0.10. Everything largely\nworks the same.\n\nInstallation\n------------\n\nAvailable via [npm](http://npmjs.org/):\n\n> $ npm install duplexer2\n\nOr via git:\n\n> $ git clone git://github.com/deoxxa/duplexer2.git node_modules/duplexer2\n\nAPI\n---\n\n**duplexer2**\n\nCreates a new `DuplexWrapper` object, which is the actual class that implements\nmost of the fun stuff. All that fun stuff is hidden. DON'T LOOK.\n\n```javascript\nduplexer2([options], writable, readable)\n```\n\n```javascript\nvar duplex = duplexer2(new stream.Writable(), new stream.Readable());\n```\n\nArguments\n\n* __options__ - an object specifying the regular `stream.Duplex` options, as\n well as the properties described below.\n* __writable__ - a writable stream\n* __readable__ - a readable stream\n\nOptions\n\n* __bubbleErrors__ - a boolean value that specifies whether to bubble errors\n from the underlying readable/writable streams. Default is `true`.\n\nExample\n-------\n\nAlso see [example.js](https://github.com/deoxxa/duplexer2/blob/master/example.js).\n\nCode:\n\n```javascript\nvar stream = require(\"stream\");\n\nvar duplexer2 = require(\"duplexer2\");\n\nvar writable = new stream.Writable({objectMode: true}),\n readable = new stream.Readable({objectMode: true});\n\nwritable._write = function _write(input, encoding, done) {\n if (readable.push(input)) {\n return done();\n } else {\n readable.once(\"drain\", done);\n }\n};\n\nreadable._read = function _read(n) {\n // no-op\n};\n\n// simulate the readable thing closing after a bit\nwritable.once(\"finish\", function() {\n setTimeout(function() {\n readable.push(null);\n }, 500);\n});\n\nvar duplex = duplexer2(writable, readable);\n\nduplex.on(\"data\", function(e) {\n console.log(\"got data\", JSON.stringify(e));\n});\n\nduplex.on(\"finish\", function() {\n console.log(\"got finish event\");\n});\n\nduplex.on(\"end\", function() {\n console.log(\"got end event\");\n});\n\nduplex.write(\"oh, hi there\", function() {\n console.log(\"finished writing\");\n});\n\nduplex.end(function() {\n console.log(\"finished ending\");\n});\n```\n\nOutput:\n\n```\ngot data \"oh, hi there\"\nfinished writing\ngot finish event\nfinished ending\ngot end event\n```\n\nLicense\n-------\n\n3-clause BSD. A copy is included with the source.\n\nContact\n-------\n\n* GitHub ([deoxxa](http://github.com/deoxxa))\n* Twitter ([@deoxxa](http://twitter.com/deoxxa))\n* Email ([deoxxa@fknsrs.biz](mailto:deoxxa@fknsrs.biz))\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/deoxxa/duplexer2", - "_id": "duplexer2@0.0.1", - "_from": "duplexer2@0.0.1" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/test/tests.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/test/tests.js deleted file mode 100644 index fe3b2560..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/test/tests.js +++ /dev/null @@ -1,161 +0,0 @@ -var assert = require("chai").assert; - -var stream = require("stream"); - -var duplexer2 = require("../"); - -describe("duplexer2", function() { - var writable, readable; - - beforeEach(function() { - writable = new stream.Writable({objectMode: true}); - readable = new stream.Readable({objectMode: true}); - - writable._write = function _write(input, encoding, done) { - return done(); - }; - - readable._read = function _read(n) { - }; - }); - - it("should interact with the writable stream properly for writing", function(done) { - var duplex = duplexer2(writable, readable); - - writable._write = function _write(input, encoding, _done) { - assert.strictEqual(input, "well hello there"); - - return done(); - }; - - duplex.write("well hello there"); - }); - - it("should interact with the readable stream properly for reading", function(done) { - var duplex = duplexer2(writable, readable); - - duplex.on("data", function(e) { - assert.strictEqual(e, "well hello there"); - - return done(); - }); - - readable.push("well hello there"); - }); - - it("should end the writable stream, causing it to finish", function(done) { - var duplex = duplexer2(writable, readable); - - writable.once("finish", done); - - duplex.end(); - }); - - it("should finish when the writable stream finishes", function(done) { - var duplex = duplexer2(writable, readable); - - duplex.once("finish", done); - - writable.end(); - }); - - it("should end when the readable stream ends", function(done) { - var duplex = duplexer2(writable, readable); - - // required to let "end" fire without reading - duplex.resume(); - duplex.once("end", done); - - readable.push(null); - }); - - it("should bubble errors from the writable stream when no behaviour is specified", function(done) { - var duplex = duplexer2(writable, readable); - - var originalErr = Error("testing"); - - duplex.on("error", function(err) { - assert.strictEqual(err, originalErr); - - return done(); - }); - - writable.emit("error", originalErr); - }); - - it("should bubble errors from the readable stream when no behaviour is specified", function(done) { - var duplex = duplexer2(writable, readable); - - var originalErr = Error("testing"); - - duplex.on("error", function(err) { - assert.strictEqual(err, originalErr); - - return done(); - }); - - readable.emit("error", originalErr); - }); - - it("should bubble errors from the writable stream when bubbleErrors is true", function(done) { - var duplex = duplexer2({bubbleErrors: true}, writable, readable); - - var originalErr = Error("testing"); - - duplex.on("error", function(err) { - assert.strictEqual(err, originalErr); - - return done(); - }); - - writable.emit("error", originalErr); - }); - - it("should bubble errors from the readable stream when bubbleErrors is true", function(done) { - var duplex = duplexer2({bubbleErrors: true}, writable, readable); - - var originalErr = Error("testing"); - - duplex.on("error", function(err) { - assert.strictEqual(err, originalErr); - - return done(); - }); - - readable.emit("error", originalErr); - }); - - it("should not bubble errors from the writable stream when bubbleErrors is false", function(done) { - var duplex = duplexer2({bubbleErrors: false}, writable, readable); - - var timeout = setTimeout(done, 25); - - duplex.on("error", function(err) { - clearTimeout(timeout); - - return done(Error("shouldn't bubble error")); - }); - - // prevent uncaught error exception - writable.on("error", function() {}); - - writable.emit("error", Error("testing")); - }); - - it("should not bubble errors from the readable stream when bubbleErrors is false", function(done) { - var duplex = duplexer2({bubbleErrors: false}, writable, readable); - - var timeout = setTimeout(done, 25); - - duplex.on("error", function(err) { - clearTimeout(timeout); - - return done(Error("shouldn't bubble error")); - }); - - // prevent uncaught error exception - readable.on("error", function() {}); - - readable.emit("error", Error("testing")); - }); -}); diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/package.json deleted file mode 100644 index 264ee69f..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "multipipe", - "version": "0.0.1", - "description": "pipe streams with centralized error handling", - "repository": { - "type": "git", - "url": "git://github.com/segmentio/multipipe" - }, - "dependencies": { - "duplexer2": "0.0.1" - }, - "devDependencies": { - "mocha": "~1.17.0" - }, - "scripts": { - "test": "make test" - }, - "readme": "# multipipe\n\nA better `Stream#pipe` that creates duplex streams and lets you handle errors in one place.\n\n[![build status](https://secure.travis-ci.org/segmentio/multipipe.png)](http://travis-ci.org/segmentio/multipipe)\n\n## Example\n\n```js\nvar pipe = require('multipipe');\n\n// pipe streams\nvar stream = pipe(streamA, streamB, streamC);\n\n// centralized error handling\nstream.on('error', fn);\n\n// creates a new stream\nsource.pipe(stream).pipe(dest);\n```\n\n## Duplex streams\n\n Write to the pipe and you'll really write to the first stream, read from the pipe and you'll read from the last stream.\n\n```js\nvar stream = pipe(a, b, c);\n\nsource\n .pipe(stream)\n .pipe(destination);\n```\n\n In this example the flow of data is:\n\n * source ->\n * a ->\n * b ->\n * c ->\n * destination\n\n## Error handling\n\n Each `pipe` forwards the errors the streams it wraps emit, so you have one central place to handle errors:\n\n```js\nvar stream = pipe(a, b, c);\n\nstream.on('error', function(err){\n // called three times\n});\n\na.emit('error', new Error);\nb.emit('error', new Error);\nc.emit('error', new Error);\n```\n\n## API\n\n### pipe(stream, ...)\n\nPass a variable number of streams and each will be piped to the next one.\n\nA stream will be returned that wraps passed in streams in a way that errors will be forwarded and you can write to and/or read from it.\n\n## Installation\n\n```bash\n$ npm install multipipe\n```\n\n## License\n\n MIT\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/segmentio/multipipe/issues" - }, - "homepage": "https://github.com/segmentio/multipipe", - "_id": "multipipe@0.0.1", - "_from": "multipipe@~0.0.1" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/test/multipipe.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/test/multipipe.js deleted file mode 100644 index 57fd1886..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/multipipe/test/multipipe.js +++ /dev/null @@ -1,85 +0,0 @@ -var assert = require('assert'); -var pipe = require('..'); -var Stream = require('stream'); - -describe('pipe(a)', function(){ - it('should return a', function(){ - var readable = Readable(); - var stream = pipe(readable); - assert.equal(stream, readable); - }); -}); - -describe('pipe(a, b, c)', function(){ - it('should pipe internally', function(done){ - pipe(Readable(), Transform(), Writable(done)); - }); - - it('should be writable', function(done){ - var stream = pipe(Transform(), Writable(done)); - assert(stream.writable); - Readable().pipe(stream); - }); - - it('should be readable', function(done){ - var stream = pipe(Readable(), Transform()); - assert(stream.readable); - stream.pipe(Writable(done)); - }); - - it('should be readable and writable', function(done){ - var stream = pipe(Transform(), Transform()); - assert(stream.readable); - assert(stream.writable); - Readable() - .pipe(stream) - .pipe(Writable(done)); - }); - - it('should aggregate errors', function(done){ - var a = Transform(); - var b = Transform(); - var c = Transform(); - var stream = pipe(a, b, c); - var err = new Error; - var i = 0; - - stream.on('error', function(_err){ - i++; - assert.equal(_err, err); - assert(i <= 3); - if (i == 3) done(); - }); - - a.emit('error', err); - b.emit('error', err); - c.emit('error', err); - }); -}); - -function Readable(){ - var readable = new Stream.Readable({ objectMode: true }); - readable._read = function(){ - this.push('a'); - this.push(null); - }; - return readable; -} - -function Transform(){ - var transform = new Stream.Transform({ objectMode: true }); - transform._transform = function(chunk, _, done){ - done(null, chunk.toUpperCase()); - }; - return transform; -} - -function Writable(cb){ - var writable = new Stream.Writable({ objectMode: true }); - writable._write = function(chunk, _, done){ - assert.equal(chunk, 'A'); - done(); - cb(); - }; - return writable; -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/.jshintrc b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/.jshintrc deleted file mode 100644 index c8ef3ca4..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/.jshintrc +++ /dev/null @@ -1,59 +0,0 @@ -{ - "predef": [ ] - , "bitwise": false - , "camelcase": false - , "curly": false - , "eqeqeq": false - , "forin": false - , "immed": false - , "latedef": false - , "noarg": true - , "noempty": true - , "nonew": true - , "plusplus": false - , "quotmark": true - , "regexp": false - , "undef": true - , "unused": true - , "strict": false - , "trailing": true - , "maxlen": 120 - , "asi": true - , "boss": true - , "debug": true - , "eqnull": true - , "esnext": true - , "evil": true - , "expr": true - , "funcscope": false - , "globalstrict": false - , "iterator": false - , "lastsemic": true - , "laxbreak": true - , "laxcomma": true - , "loopfunc": true - , "multistr": false - , "onecase": false - , "proto": false - , "regexdash": false - , "scripturl": true - , "smarttabs": false - , "shadow": false - , "sub": true - , "supernew": false - , "validthis": true - , "browser": true - , "couch": false - , "devel": false - , "dojo": false - , "mootools": false - , "node": true - , "nonstandard": true - , "prototypejs": false - , "rhino": false - , "worker": true - , "wsh": false - , "nomen": false - , "onevar": false - , "passfail": false -} \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/.npmignore b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/.travis.yml b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/.travis.yml deleted file mode 100644 index 12b1a310..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: node_js -node_js: -- '0.8' -- '0.10' -- '0.11' -branches: - only: - - master -notifications: - email: - - rod@vagg.org -script: npm test -env: - global: - - SAUCE_USER=through2-sauce - - secure: A8KyygIlklZOcTwTGhZHpkOu7Cn4tI1QQasg75CTSjudczGzkuh1pG2RDIkWqGcrWv9o5CjI6fFYYx0JvQu8o5PO+ZAtV1Z0AlnM965vE8kAx0XEC7giAV323bibfnHwyQu74vIhbOfdes7E4/cYerV2kAjK0T375D4DYEpDuvw= - diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/LICENSE b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/LICENSE deleted file mode 100644 index f6a0029d..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/LICENSE +++ /dev/null @@ -1,39 +0,0 @@ -Copyright 2013, Rod Vagg (the "Original Author") -All rights reserved. - -MIT +no-false-attribs License - -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. - -Distributions of all or part of the Software intended to be used -by the recipients as they would use the unmodified Software, -containing modifications that substantially alter, remove, or -disable functionality of the Software, outside of the documented -configuration mechanisms provided by the Software, shall be -modified such that the Original Author's bug reporting email -addresses and urls are either replaced with the contact information -of the parties responsible for the changes, or removed entirely. - -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. - - -Except where noted, this license applies to any and all software -programs and associated documentation files created by the -Original Author, when distributed with the Software. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/README.md deleted file mode 100644 index c9388b38..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/README.md +++ /dev/null @@ -1,131 +0,0 @@ -# through2 - -<!-- - -soon ... - -[![Build Status](https://secure.travis-ci.org/rvagg/through2.png)](http://travis-ci.org/rvagg/through2) - -[![Build Status](https://saucelabs.com/browser-matrix/through2-sauce.svg)](https://travis-ci.org/rvagg/through2) - ---> - -[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/) - -<!-- -not happy with these, we need to peg to readable-stream@1.0.x so it'll always report out-of-date - -[![david-dm](https://david-dm.org/rvagg/through2.png)](https://david-dm.org/rvagg/through2/) -[![david-dm](https://david-dm.org/rvagg/through2/dev-status.png)](https://david-dm.org/rvagg/through2#info=devDependencies/) ---> - -**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise** - -Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`. - -```js -fs.createReadStream('ex.txt') - .pipe(through2(function (chunk, enc, callback) { - - for (var i = 0; i < chunk.length; i++) - if (chunk[i] == 97) - chunk[i] = 122 // swap 'a' for 'z' - - this.push(chunk) - - callback() - - })) - .pipe(fs.createWriteStream('out.txt')) -``` - -Or object streams: - -```js -var all = [] - -fs.createReadStream('data.csv') - .pipe(csv2()) - .pipe(through2.obj(function (chunk, enc, callback) { - - var data = { - name : chunk[0] - , address : chunk[3] - , phone : chunk[10] - } - - this.push(data) - - callback() - - })) - .on('data', function (data) { - all.push(data) - }) - .on('end', function () { - doSomethingSpecial(all) - }) -``` - -Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`. - -## API - -<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b> - -Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`). - -### options - -The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`). - -The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call: - -```js -fs.createReadStream('/tmp/important.dat') - .pipe(through2({ objectMode: true, allowHalfOpen: false }, function (chunk, enc, cb) { - - this.push(new Buffer('wut?')) - cb() - - }) - .pipe(fs.createWriteStream('/tmp/wut.txt')) -``` - -### transformFunction - -The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk. - -To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on. - -If you **do not provide a `transformFunction`** then you will get a simple simple pass-through stream. - -### flushFunction - -The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress. - -<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b> - -Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances. - -```js -var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) { - if (record.temp != null && record.unit = "F") { - record.temp = ( ( record.temp - 32 ) * 5 ) / 9 - record.unit = "C" - } - this.push(record) - callback() -}) - -// Create instances of FToC like so: -var converter = new FToC() -// Or: -var converter = FToC() -// Or specify/override options when you instantiate, if you prefer: -var converter = FToC({objectMode: true}) -``` - -## License - -**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/.npmignore b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/.npmignore deleted file mode 100644 index 38344f87..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/LICENSE b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/README.md deleted file mode 100644 index be976683..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/README.md +++ /dev/null @@ -1,768 +0,0 @@ -# readable-stream - -A new class of streams for Node.js - -This module provides the new Stream base classes introduced in Node -v0.10, for use in Node v0.8. You can use it to have programs that -have to work with node v0.8, while being forward-compatible for v0.10 -and beyond. When you drop support for v0.8, you can remove this -module, and only use the native streams. - -This is almost exactly the same codebase as appears in Node v0.10. -However: - -1. The exported object is actually the Readable class. Decorating the - native `stream` module would be global pollution. -2. In v0.10, you can safely use `base64` as an argument to - `setEncoding` in Readable streams. However, in v0.8, the - StringDecoder class has no `end()` method, which is problematic for - Base64. So, don't use that, because it'll break and be weird. - -Other than that, the API is the same as `require('stream')` in v0.10, -so the API docs are reproduced below. - ----------- - - Stability: 2 - Unstable - -A stream is an abstract interface implemented by various objects in -Node. For example a request to an HTTP server is a stream, as is -stdout. Streams are readable, writable, or both. All streams are -instances of [EventEmitter][] - -You can load the Stream base classes by doing `require('stream')`. -There are base classes provided for Readable streams, Writable -streams, Duplex streams, and Transform streams. - -## Compatibility - -In earlier versions of Node, the Readable stream interface was -simpler, but also less powerful and less useful. - -* Rather than waiting for you to call the `read()` method, `'data'` - events would start emitting immediately. If you needed to do some - I/O to decide how to handle data, then you had to store the chunks - in some kind of buffer so that they would not be lost. -* The `pause()` method was advisory, rather than guaranteed. This - meant that you still had to be prepared to receive `'data'` events - even when the stream was in a paused state. - -In Node v0.10, the Readable class described below was added. For -backwards compatibility with older Node programs, Readable streams -switch into "old mode" when a `'data'` event handler is added, or when -the `pause()` or `resume()` methods are called. The effect is that, -even if you are not using the new `read()` method and `'readable'` -event, you no longer have to worry about losing `'data'` chunks. - -Most programs will continue to function normally. However, this -introduces an edge case in the following conditions: - -* No `'data'` event handler is added. -* The `pause()` and `resume()` methods are never called. - -For example, consider the following code: - -```javascript -// WARNING! BROKEN! -net.createServer(function(socket) { - - // we add an 'end' method, but never consume the data - socket.on('end', function() { - // It will never get here. - socket.end('I got your message (but didnt read it)\n'); - }); - -}).listen(1337); -``` - -In versions of node prior to v0.10, the incoming message data would be -simply discarded. However, in Node v0.10 and beyond, the socket will -remain paused forever. - -The workaround in this situation is to call the `resume()` method to -trigger "old mode" behavior: - -```javascript -// Workaround -net.createServer(function(socket) { - - socket.on('end', function() { - socket.end('I got your message (but didnt read it)\n'); - }); - - // start the flow of data, discarding it. - socket.resume(); - -}).listen(1337); -``` - -In addition to new Readable streams switching into old-mode, pre-v0.10 -style streams can be wrapped in a Readable class using the `wrap()` -method. - -## Class: stream.Readable - -<!--type=class--> - -A `Readable Stream` has the following methods, members, and events. - -Note that `stream.Readable` is an abstract class designed to be -extended with an underlying implementation of the `_read(size)` -method. (See below.) - -### new stream.Readable([options]) - -* `options` {Object} - * `highWaterMark` {Number} The maximum number of bytes to store in - the internal buffer before ceasing to read from the underlying - resource. Default=16kb - * `encoding` {String} If specified, then buffers will be decoded to - strings using the specified encoding. Default=null - * `objectMode` {Boolean} Whether this stream should behave - as a stream of objects. Meaning that stream.read(n) returns - a single value instead of a Buffer of size n - -In classes that extend the Readable class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### readable.\_read(size) - -* `size` {Number} Number of bytes to read asynchronously - -Note: **This function should NOT be called directly.** It should be -implemented by child classes, and called by the internal Readable -class methods only. - -All Readable stream implementations must provide a `_read` method -to fetch data from the underlying resource. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -When data is available, put it into the read queue by calling -`readable.push(chunk)`. If `push` returns false, then you should stop -reading. When `_read` is called again, you should start pushing more -data. - -The `size` argument is advisory. Implementations where a "read" is a -single call that returns data can use this to know how much data to -fetch. Implementations where that is not relevant, such as TCP or -TLS, may ignore this argument, and simply provide data whenever it -becomes available. There is no need, for example to "wait" until -`size` bytes are available before calling `stream.push(chunk)`. - -### readable.push(chunk) - -* `chunk` {Buffer | null | String} Chunk of data to push into the read queue -* return {Boolean} Whether or not more pushes should be performed - -Note: **This function should be called by Readable implementors, NOT -by consumers of Readable subclasses.** The `_read()` function will not -be called again until at least one `push(chunk)` call is made. If no -data is available, then you MAY call `push('')` (an empty string) to -allow a future `_read` call, without adding any data to the queue. - -The `Readable` class works by putting data into a read queue to be -pulled out later by calling the `read()` method when the `'readable'` -event fires. - -The `push()` method will explicitly insert some data into the read -queue. If it is called with `null` then it will signal the end of the -data. - -In some cases, you may be wrapping a lower-level source which has some -sort of pause/resume mechanism, and a data callback. In those cases, -you could wrap the low-level source object by doing something like -this: - -```javascript -// source is an object with readStop() and readStart() methods, -// and an `ondata` member that gets called when it has data, and -// an `onend` member that gets called when the data is over. - -var stream = new Readable(); - -source.ondata = function(chunk) { - // if push() returns false, then we need to stop reading from source - if (!stream.push(chunk)) - source.readStop(); -}; - -source.onend = function() { - stream.push(null); -}; - -// _read will be called when the stream wants to pull more data in -// the advisory size argument is ignored in this case. -stream._read = function(n) { - source.readStart(); -}; -``` - -### readable.unshift(chunk) - -* `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue -* return {Boolean} Whether or not more pushes should be performed - -This is the corollary of `readable.push(chunk)`. Rather than putting -the data at the *end* of the read queue, it puts it at the *front* of -the read queue. - -This is useful in certain use-cases where a stream is being consumed -by a parser, which needs to "un-consume" some data that it has -optimistically pulled out of the source. - -```javascript -// A parser for a simple data protocol. -// The "header" is a JSON object, followed by 2 \n characters, and -// then a message body. -// -// Note: This can be done more simply as a Transform stream. See below. - -function SimpleProtocol(source, options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(options); - - Readable.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - - // source is a readable stream, such as a socket or file - this._source = source; - - var self = this; - source.on('end', function() { - self.push(null); - }); - - // give it a kick whenever the source is readable - // read(0) will not consume any bytes - source.on('readable', function() { - self.read(0); - }); - - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype = Object.create( - Readable.prototype, { constructor: { value: SimpleProtocol }}); - -SimpleProtocol.prototype._read = function(n) { - if (!this._inBody) { - var chunk = this._source.read(); - - // if the source doesn't have data, we don't have data yet. - if (chunk === null) - return this.push(''); - - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - this.push(''); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // now, because we got some extra data, unshift the rest - // back into the read queue so that our consumer will see it. - var b = chunk.slice(split); - this.unshift(b); - - // and let them know that we are done parsing the header. - this.emit('header', this.header); - } - } else { - // from there on, just provide the data to our consumer. - // careful not to push(null), since that would indicate EOF. - var chunk = this._source.read(); - if (chunk) this.push(chunk); - } -}; - -// Usage: -var parser = new SimpleProtocol(source); -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - -### readable.wrap(stream) - -* `stream` {Stream} An "old style" readable stream - -If you are using an older Node library that emits `'data'` events and -has a `pause()` method that is advisory only, then you can use the -`wrap()` method to create a Readable stream that uses the old stream -as its data source. - -For example: - -```javascript -var OldReader = require('./old-api-module.js').OldReader; -var oreader = new OldReader; -var Readable = require('stream').Readable; -var myReader = new Readable().wrap(oreader); - -myReader.on('readable', function() { - myReader.read(); // etc. -}); -``` - -### Event: 'readable' - -When there is data ready to be consumed, this event will fire. - -When this event emits, call the `read()` method to consume the data. - -### Event: 'end' - -Emitted when the stream has received an EOF (FIN in TCP terminology). -Indicates that no more `'data'` events will happen. If the stream is -also writable, it may be possible to continue writing. - -### Event: 'data' - -The `'data'` event emits either a `Buffer` (by default) or a string if -`setEncoding()` was used. - -Note that adding a `'data'` event listener will switch the Readable -stream into "old mode", where data is emitted as soon as it is -available, rather than waiting for you to call `read()` to consume it. - -### Event: 'error' - -Emitted if there was an error receiving data. - -### Event: 'close' - -Emitted when the underlying resource (for example, the backing file -descriptor) has been closed. Not all streams will emit this. - -### readable.setEncoding(encoding) - -Makes the `'data'` event emit a string instead of a `Buffer`. `encoding` -can be `'utf8'`, `'utf16le'` (`'ucs2'`), `'ascii'`, or `'hex'`. - -The encoding can also be set by specifying an `encoding` field to the -constructor. - -### readable.read([size]) - -* `size` {Number | null} Optional number of bytes to read. -* Return: {Buffer | String | null} - -Note: **This function SHOULD be called by Readable stream users.** - -Call this method to consume data once the `'readable'` event is -emitted. - -The `size` argument will set a minimum number of bytes that you are -interested in. If not set, then the entire content of the internal -buffer is returned. - -If there is no data to consume, or if there are fewer bytes in the -internal buffer than the `size` argument, then `null` is returned, and -a future `'readable'` event will be emitted when more is available. - -Calling `stream.read(0)` will always return `null`, and will trigger a -refresh of the internal buffer, but otherwise be a no-op. - -### readable.pipe(destination, [options]) - -* `destination` {Writable Stream} -* `options` {Object} Optional - * `end` {Boolean} Default=true - -Connects this readable stream to `destination` WriteStream. Incoming -data on this stream gets written to `destination`. Properly manages -back-pressure so that a slow destination will not be overwhelmed by a -fast readable stream. - -This function returns the `destination` stream. - -For example, emulating the Unix `cat` command: - - process.stdin.pipe(process.stdout); - -By default `end()` is called on the destination when the source stream -emits `end`, so that `destination` is no longer writable. Pass `{ end: -false }` as `options` to keep the destination stream open. - -This keeps `writer` open so that "Goodbye" can be written at the -end. - - reader.pipe(writer, { end: false }); - reader.on("end", function() { - writer.end("Goodbye\n"); - }); - -Note that `process.stderr` and `process.stdout` are never closed until -the process exits, regardless of the specified options. - -### readable.unpipe([destination]) - -* `destination` {Writable Stream} Optional - -Undo a previously established `pipe()`. If no destination is -provided, then all previously established pipes are removed. - -### readable.pause() - -Switches the readable stream into "old mode", where data is emitted -using a `'data'` event rather than being buffered for consumption via -the `read()` method. - -Ceases the flow of data. No `'data'` events are emitted while the -stream is in a paused state. - -### readable.resume() - -Switches the readable stream into "old mode", where data is emitted -using a `'data'` event rather than being buffered for consumption via -the `read()` method. - -Resumes the incoming `'data'` events after a `pause()`. - - -## Class: stream.Writable - -<!--type=class--> - -A `Writable` Stream has the following methods, members, and events. - -Note that `stream.Writable` is an abstract class designed to be -extended with an underlying implementation of the -`_write(chunk, encoding, cb)` method. (See below.) - -### new stream.Writable([options]) - -* `options` {Object} - * `highWaterMark` {Number} Buffer level when `write()` starts - returning false. Default=16kb - * `decodeStrings` {Boolean} Whether or not to decode strings into - Buffers before passing them to `_write()`. Default=true - -In classes that extend the Writable class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### writable.\_write(chunk, encoding, callback) - -* `chunk` {Buffer | String} The chunk to be written. Will always - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. Ignore chunk is a buffer. Note that chunk will - **always** be a buffer unless the `decodeStrings` option is - explicitly set to `false`. -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunk. - -All Writable stream implementations must provide a `_write` method to -send data to the underlying resource. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Writable -class methods only. - -Call the callback using the standard `callback(error)` pattern to -signal that the write completed successfully or with an error. - -If the `decodeStrings` flag is set in the constructor options, then -`chunk` may be a string rather than a Buffer, and `encoding` will -indicate the sort of string that it is. This is to support -implementations that have an optimized handling for certain string -data encodings. If you do not explicitly set the `decodeStrings` -option to `false`, then you can safely ignore the `encoding` argument, -and assume that `chunk` will always be a Buffer. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - - -### writable.write(chunk, [encoding], [callback]) - -* `chunk` {Buffer | String} Data to be written -* `encoding` {String} Optional. If `chunk` is a string, then encoding - defaults to `'utf8'` -* `callback` {Function} Optional. Called when this chunk is - successfully written. -* Returns {Boolean} - -Writes `chunk` to the stream. Returns `true` if the data has been -flushed to the underlying resource. Returns `false` to indicate that -the buffer is full, and the data will be sent out in the future. The -`'drain'` event will indicate when the buffer is empty again. - -The specifics of when `write()` will return false, is determined by -the `highWaterMark` option provided to the constructor. - -### writable.end([chunk], [encoding], [callback]) - -* `chunk` {Buffer | String} Optional final data to be written -* `encoding` {String} Optional. If `chunk` is a string, then encoding - defaults to `'utf8'` -* `callback` {Function} Optional. Called when the final chunk is - successfully written. - -Call this method to signal the end of the data being written to the -stream. - -### Event: 'drain' - -Emitted when the stream's write queue empties and it's safe to write -without buffering again. Listen for it when `stream.write()` returns -`false`. - -### Event: 'close' - -Emitted when the underlying resource (for example, the backing file -descriptor) has been closed. Not all streams will emit this. - -### Event: 'finish' - -When `end()` is called and there are no more chunks to write, this -event is emitted. - -### Event: 'pipe' - -* `source` {Readable Stream} - -Emitted when the stream is passed to a readable stream's pipe method. - -### Event 'unpipe' - -* `source` {Readable Stream} - -Emitted when a previously established `pipe()` is removed using the -source Readable stream's `unpipe()` method. - -## Class: stream.Duplex - -<!--type=class--> - -A "duplex" stream is one that is both Readable and Writable, such as a -TCP socket connection. - -Note that `stream.Duplex` is an abstract class designed to be -extended with an underlying implementation of the `_read(size)` -and `_write(chunk, encoding, callback)` methods as you would with a Readable or -Writable stream class. - -Since JavaScript doesn't have multiple prototypal inheritance, this -class prototypally inherits from Readable, and then parasitically from -Writable. It is thus up to the user to implement both the lowlevel -`_read(n)` method as well as the lowlevel `_write(chunk, encoding, cb)` method -on extension duplex classes. - -### new stream.Duplex(options) - -* `options` {Object} Passed to both Writable and Readable - constructors. Also has the following fields: - * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then - the stream will automatically end the readable side when the - writable side ends and vice versa. - -In classes that extend the Duplex class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -## Class: stream.Transform - -A "transform" stream is a duplex stream where the output is causally -connected in some way to the input, such as a zlib stream or a crypto -stream. - -There is no requirement that the output be the same size as the input, -the same number of chunks, or arrive at the same time. For example, a -Hash stream will only ever have a single chunk of output which is -provided when the input is ended. A zlib stream will either produce -much smaller or much larger than its input. - -Rather than implement the `_read()` and `_write()` methods, Transform -classes must implement the `_transform()` method, and may optionally -also implement the `_flush()` method. (See below.) - -### new stream.Transform([options]) - -* `options` {Object} Passed to both Writable and Readable - constructors. - -In classes that extend the Transform class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### transform.\_transform(chunk, encoding, callback) - -* `chunk` {Buffer | String} The chunk to be transformed. Will always - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. (Ignore if `decodeStrings` chunk is a buffer.) -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunk. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Transform -class methods only. - -All Transform stream implementations must provide a `_transform` -method to accept input and produce output. - -`_transform` should do whatever has to be done in this specific -Transform class, to handle the bytes being written, and pass them off -to the readable portion of the interface. Do asynchronous I/O, -process things, and so on. - -Call `transform.push(outputChunk)` 0 or more times to generate output -from this input chunk, depending on how much data you want to output -as a result of this chunk. - -Call the callback function only when the current chunk is completely -consumed. Note that there may or may not be output as a result of any -particular input chunk. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -### transform.\_flush(callback) - -* `callback` {Function} Call this function (optionally with an error - argument) when you are done flushing any remaining data. - -Note: **This function MUST NOT be called directly.** It MAY be implemented -by child classes, and if so, will be called by the internal Transform -class methods only. - -In some cases, your transform operation may need to emit a bit more -data at the end of the stream. For example, a `Zlib` compression -stream will store up some internal state so that it can optimally -compress the output. At the end, however, it needs to do the best it -can with what is left, so that the data will be complete. - -In those cases, you can implement a `_flush` method, which will be -called at the very end, after all the written data is consumed, but -before emitting `end` to signal the end of the readable side. Just -like with `_transform`, call `transform.push(chunk)` zero or more -times, as appropriate, and call `callback` when the flush operation is -complete. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -### Example: `SimpleProtocol` parser - -The example above of a simple protocol parser can be implemented much -more simply by using the higher level `Transform` stream class. - -In this example, rather than providing the input as an argument, it -would be piped into the parser, which is a more idiomatic Node stream -approach. - -```javascript -function SimpleProtocol(options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(options); - - Transform.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype = Object.create( - Transform.prototype, { constructor: { value: SimpleProtocol }}); - -SimpleProtocol.prototype._transform = function(chunk, encoding, done) { - if (!this._inBody) { - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // and let them know that we are done parsing the header. - this.emit('header', this.header); - - // now, because we got some extra data, emit this first. - this.push(b); - } - } else { - // from there on, just provide the data to our consumer as-is. - this.push(b); - } - done(); -}; - -var parser = new SimpleProtocol(); -source.pipe(parser) - -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - - -## Class: stream.PassThrough - -This is a trivial implementation of a `Transform` stream that simply -passes the input bytes across to the output. Its purpose is mainly -for examples and testing, but there are occasionally use cases where -it can come in handy. - - -[EventEmitter]: events.html#events_class_events_eventemitter diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/duplex.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af8..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/float.patch b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/float.patch deleted file mode 100644 index 0ad71a1f..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/float.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js -index c5a741c..a2e0d8e 100644 ---- a/lib/_stream_duplex.js -+++ b/lib/_stream_duplex.js -@@ -26,8 +26,8 @@ - - module.exports = Duplex; - var util = require('util'); --var Readable = require('_stream_readable'); --var Writable = require('_stream_writable'); -+var Readable = require('./_stream_readable'); -+var Writable = require('./_stream_writable'); - - util.inherits(Duplex, Readable); - -diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js -index a5e9864..330c247 100644 ---- a/lib/_stream_passthrough.js -+++ b/lib/_stream_passthrough.js -@@ -25,7 +25,7 @@ - - module.exports = PassThrough; - --var Transform = require('_stream_transform'); -+var Transform = require('./_stream_transform'); - var util = require('util'); - util.inherits(PassThrough, Transform); - -diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js -index 2259d2e..e6681ee 100644 ---- a/lib/_stream_readable.js -+++ b/lib/_stream_readable.js -@@ -23,6 +23,9 @@ module.exports = Readable; - Readable.ReadableState = ReadableState; - - var EE = require('events').EventEmitter; -+if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { -+ return emitter.listeners(type).length; -+}; - var Stream = require('stream'); - var util = require('util'); - var StringDecoder; -diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js -index e925b4b..f08b05e 100644 ---- a/lib/_stream_transform.js -+++ b/lib/_stream_transform.js -@@ -64,7 +64,7 @@ - - module.exports = Transform; - --var Duplex = require('_stream_duplex'); -+var Duplex = require('./_stream_duplex'); - var util = require('util'); - util.inherits(Transform, Duplex); - -diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js -index a26f711..56ca47d 100644 ---- a/lib/_stream_writable.js -+++ b/lib/_stream_writable.js -@@ -109,7 +109,7 @@ function WritableState(options, stream) { - function Writable(options) { - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. -- if (!(this instanceof Writable) && !(this instanceof Stream.Duplex)) -+ if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) - return new Writable(options); - - this._writableState = new WritableState(options, this); diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index a2e0d8e0..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -module.exports = Duplex; -var util = require('util'); -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -Object.keys(Writable.prototype).forEach(function(method) { - if (!Duplex.prototype[method]) - Duplex.prototype[method] = Writable.prototype[method]; -}); - -function Duplex(options) { - if (!(this instanceof Duplex)) - return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) - this.readable = false; - - if (options && options.writable === false) - this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) - this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) - return; - - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(this.end.bind(this)); -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 330c247d..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); -var util = require('util'); -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) - return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function(chunk, encoding, cb) { - cb(null, chunk); -}; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 323f3305..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,927 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -module.exports = Readable; -Readable.ReadableState = ReadableState; - -var EE = require('events').EventEmitter; -if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { - return emitter.listeners(type).length; -}; -var Stream = require('stream'); -var util = require('util'); -var StringDecoder; - -util.inherits(Readable, Stream); - -function ReadableState(options, stream) { - options = options || {}; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = false; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // In streams that never have any data, and do push(null) right away, - // the consumer can miss the 'end' event if they do some I/O before - // consuming the stream. So, we don't emit('end') until some reading - // happens. - this.calledRead = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - if (!(this instanceof Readable)) - return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function(chunk, encoding) { - var state = this._readableState; - - if (typeof chunk === 'string' && !state.objectMode) { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = new Buffer(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function(chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (chunk === null || chunk === undefined) { - state.reading = false; - if (!state.ended) - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var e = new Error('stream.unshift() after end event'); - stream.emit('error', e); - } else { - if (state.decoder && !addToFront && !encoding) - chunk = state.decoder.write(chunk); - - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) { - state.buffer.unshift(chunk); - } else { - state.reading = false; - state.buffer.push(chunk); - } - - if (state.needReadable) - emitReadable(stream); - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - - - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && - (state.needReadable || - state.length < state.highWaterMark || - state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function(enc) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; -}; - -// Don't raise the hwm > 128MB -var MAX_HWM = 0x800000; -function roundUpToNextPowerOf2(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - for (var p = 1; p < 32; p <<= 1) n |= n >> p; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) - return 0; - - if (state.objectMode) - return n === 0 ? 0 : 1; - - if (isNaN(n) || n === null) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) - return state.buffer[0].length; - else - return state.length; - } - - if (n <= 0) - return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) - state.highWaterMark = roundUpToNextPowerOf2(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else - return state.length; - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function(n) { - var state = this._readableState; - state.calledRead = true; - var nOrig = n; - - if (typeof n !== 'number' || n > 0) - state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && - state.needReadable && - (state.length >= state.highWaterMark || state.ended)) { - emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) - endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - - // if we currently have less than the highWaterMark, then also read some - if (state.length - n <= state.highWaterMark) - doRead = true; - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) - doRead = false; - - if (doRead) { - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) - state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read called its callback synchronously, then `reading` - // will be false, and we need to re-evaluate how much data we - // can return to the user. - if (doRead && !state.reading) - n = howMuchToRead(nOrig, state); - - var ret; - if (n > 0) - ret = fromList(n, state); - else - ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) - state.needReadable = true; - - // If we happened to read() exactly the remaining amount in the - // buffer, and the EOF has been seen at this point, then make sure - // that we emit 'end' on the very next tick. - if (state.ended && !state.endEmitted && state.length === 0) - endReadable(this); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode && - !er) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - - -function onEofChunk(stream, state) { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // if we've ended and we have some data left, then emit - // 'readable' now to make sure it gets picked up. - if (state.length > 0) - emitReadable(stream); - else - endReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (state.emittedReadable) - return; - - state.emittedReadable = true; - if (state.sync) - process.nextTick(function() { - emitReadable_(stream); - }); - else - emitReadable_(stream); -} - -function emitReadable_(stream) { - stream.emit('readable'); -} - - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(function() { - maybeReadMore_(stream, state); - }); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && - state.length < state.highWaterMark) { - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break; - else - len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function(n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function(dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && - dest !== process.stdout && - dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) - process.nextTick(endFn); - else - src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - if (readable !== src) return; - cleanup(); - } - - function onend() { - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - function cleanup() { - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (!dest._writableState || dest._writableState.needDrain) - ondrain(); - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - unpipe(); - dest.removeListener('error', onerror); - if (EE.listenerCount(dest, 'error') === 0) - dest.emit('error', er); - } - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. - if (!dest._events || !dest._events.error) - dest.on('error', onerror); - else if (Array.isArray(dest._events.error)) - dest._events.error.unshift(onerror); - else - dest._events.error = [onerror, dest._events.error]; - - - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - // the handler that waits for readable events after all - // the data gets sucked out in flow. - // This would be easier to follow with a .once() handler - // in flow(), but that is too slow. - this.on('readable', pipeOnReadable); - - state.flowing = true; - process.nextTick(function() { - flow(src); - }); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function() { - var dest = this; - var state = src._readableState; - state.awaitDrain--; - if (state.awaitDrain === 0) - flow(src); - }; -} - -function flow(src) { - var state = src._readableState; - var chunk; - state.awaitDrain = 0; - - function write(dest, i, list) { - var written = dest.write(chunk); - if (false === written) { - state.awaitDrain++; - } - } - - while (state.pipesCount && null !== (chunk = src.read())) { - - if (state.pipesCount === 1) - write(state.pipes, 0, null); - else - state.pipes.forEach(write); - - src.emit('data', chunk); - - // if anyone needs a drain, then we have to wait for that. - if (state.awaitDrain > 0) - return; - } - - // if every destination was unpiped, either before entering this - // function, or in the while loop, then stop flowing. - // - // NB: This is a pretty rare edge case. - if (state.pipesCount === 0) { - state.flowing = false; - - // if there were data event listeners added, then switch to old mode. - if (EE.listenerCount(src, 'data') > 0) - emitDataEvents(src); - return; - } - - // at this point, no one needed a drain, so we just ran out of data - // on the next readable event, start it over again. - state.ranOut = true; -} - -function pipeOnReadable() { - if (this._readableState.ranOut) { - this._readableState.ranOut = false; - flow(this); - } -} - - -Readable.prototype.unpipe = function(dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) - return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) - return this; - - if (!dest) - dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - if (dest) - dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - - for (var i = 0; i < len; i++) - dests[i].emit('unpipe', this); - return this; - } - - // try to find the right one. - var i = state.pipes.indexOf(dest); - if (i === -1) - return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) - state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function(ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data' && !this._readableState.flowing) - emitDataEvents(this); - - if (ev === 'readable' && this.readable) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - this.read(0); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function() { - emitDataEvents(this); - this.read(0); - this.emit('resume'); -}; - -Readable.prototype.pause = function() { - emitDataEvents(this, true); - this.emit('pause'); -}; - -function emitDataEvents(stream, startPaused) { - var state = stream._readableState; - - if (state.flowing) { - // https://github.com/isaacs/readable-stream/issues/16 - throw new Error('Cannot switch to old mode now.'); - } - - var paused = startPaused || false; - var readable = false; - - // convert to an old-style stream. - stream.readable = true; - stream.pipe = Stream.prototype.pipe; - stream.on = stream.addListener = Stream.prototype.on; - - stream.on('readable', function() { - readable = true; - - var c; - while (!paused && (null !== (c = stream.read()))) - stream.emit('data', c); - - if (c === null) { - readable = false; - stream._readableState.needReadable = true; - } - }); - - stream.pause = function() { - paused = true; - this.emit('pause'); - }; - - stream.resume = function() { - paused = false; - if (readable) - process.nextTick(function() { - stream.emit('readable'); - }); - else - this.read(0); - this.emit('resume'); - }; - - // now make it start, just in case it hadn't already. - stream.emit('readable'); -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function(stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function() { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) - self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function(chunk) { - if (state.decoder) - chunk = state.decoder.write(chunk); - if (!chunk || !state.objectMode && !chunk.length) - return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (typeof stream[i] === 'function' && - typeof this[i] === 'undefined') { - this[i] = function(method) { return function() { - return stream[method].apply(stream, arguments); - }}(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - events.forEach(function(ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function(n) { - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - - - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) - return null; - - if (length === 0) - ret = null; - else if (objectMode) - ret = list.shift(); - else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) - ret = list.join(''); - else - ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) - ret = ''; - else - ret = new Buffer(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var buf = list[0]; - var cpy = Math.min(n - c, buf.length); - - if (stringMode) - ret += buf.slice(0, cpy); - else - buf.copy(ret, c, 0, cpy); - - if (cpy < buf.length) - list[0] = buf.slice(cpy); - else - list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) - throw new Error('endReadable called on non-empty stream'); - - if (!state.endEmitted && state.calledRead) { - state.ended = true; - process.nextTick(function() { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } - }); - } -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index 707e4b3b..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); -var util = require('util'); -util.inherits(Transform, Duplex); - - -function TransformState(options, stream) { - this.afterTransform = function(er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) - return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (data !== null && data !== undefined) - stream.push(data); - - if (cb) - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - - -function Transform(options) { - if (!(this instanceof Transform)) - return new Transform(options); - - Duplex.call(this, options); - - var ts = this._transformState = new TransformState(options, this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - this.once('finish', function() { - if ('function' === typeof this._flush) - this._flush(function(er) { - done(stream, er); - }); - else - done(stream); - }); -} - -Transform.prototype.push = function(chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function(chunk, encoding, cb) { - throw new Error('not implemented'); -}; - -Transform.prototype._write = function(chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || - rs.needReadable || - rs.length < rs.highWaterMark) - this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function(n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - - -function done(stream, er) { - if (er) - return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var rs = stream._readableState; - var ts = stream._transformState; - - if (ws.length) - throw new Error('calling transform done when ws.length != 0'); - - if (ts.transforming) - throw new Error('calling transform done when still transforming'); - - return stream.push(null); -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index 9eaf4ec2..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,371 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, cb), and it'll handle all -// the drain event emission and buffering. - -module.exports = Writable; -Writable.WritableState = WritableState; - -var util = require('util'); -var assert = require('assert'); -var Stream = require('stream'); - -util.inherits(Writable, Stream); - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; -} - -function WritableState(options, stream) { - options = options || {}; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function(er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.buffer = []; -} - -function Writable(options) { - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) - return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function() { - this.emit('error', new Error('Cannot pipe. Not readable.')); -}; - - -function writeAfterEnd(stream, state, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); - valid = false; - } - return valid; -} - -Writable.prototype.write = function(chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - else if (!encoding) - encoding = state.defaultEncoding; - - if (typeof cb !== 'function') - cb = function() {}; - - if (state.ended) - writeAfterEnd(this, state, cb); - else if (validChunk(this, state, chunk, cb)) - ret = writeOrBuffer(this, state, chunk, encoding, cb); - - return ret; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && - state.decodeStrings !== false && - typeof chunk === 'string') { - chunk = new Buffer(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) - state.needDrain = true; - - if (state.writing) - state.buffer.push(new WriteReq(chunk, encoding, cb)); - else - doWrite(stream, state, len, chunk, encoding, cb); - - return ret; -} - -function doWrite(stream, state, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - if (sync) - process.nextTick(function() { - cb(er); - }); - else - cb(er); - - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) - onwriteError(stream, state, sync, er, cb); - else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(stream, state); - - if (!finished && !state.bufferProcessing && state.buffer.length) - clearBuffer(stream, state); - - if (sync) { - process.nextTick(function() { - afterWrite(stream, state, finished, cb); - }); - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) - onwriteDrain(stream, state); - cb(); - if (finished) - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - - for (var c = 0; c < state.buffer.length; c++) { - var entry = state.buffer[c]; - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, len, chunk, encoding, cb); - - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - c++; - break; - } - } - - state.bufferProcessing = false; - if (c < state.buffer.length) - state.buffer = state.buffer.slice(c); - else - state.buffer.length = 0; -} - -Writable.prototype._write = function(chunk, encoding, cb) { - cb(new Error('not implemented')); -}; - -Writable.prototype.end = function(chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (typeof chunk !== 'undefined' && chunk !== null) - this.write(chunk, encoding); - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) - endWritable(this, state, cb); -}; - - -function needFinish(stream, state) { - return (state.ending && - state.length === 0 && - !state.finished && - !state.writing); -} - -function finishMaybe(stream, state) { - var need = needFinish(stream, state); - if (need) { - state.finished = true; - stream.emit('finish'); - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) - process.nextTick(cb); - else - stream.once('finish', cb); - } - state.ended = true; -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE deleted file mode 100644 index 6de584a4..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. - -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/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md deleted file mode 100644 index 4d2aa001..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md +++ /dev/null @@ -1,7 +0,0 @@ -**string_decoder.js** (`require('string_decoder')`) from Node.js core - -Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. - -Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** - -The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js deleted file mode 100755 index 46470cfd..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js +++ /dev/null @@ -1,94 +0,0 @@ -#!/usr/bin/env node - -const hyperquest = require('hyperzip')(require('hyperdirect')) - , bl = require('bl') - , fs = require('fs') - , path = require('path') - , cheerio = require('cheerio') - - , files = require('./files') - , testReplace = require('./test-replacements') - - , srcurlpfx = 'https://raw.github.com/joyent/node/v' + process.argv[2] + '-release/' - , libsrcurl = srcurlpfx + 'lib/' - , testsrcurl = srcurlpfx + 'test/simple/' - , testlisturl = 'https://github.com/joyent/node/tree/v' + process.argv[2] + '-release/test/simple' - , libourroot = path.join(__dirname, '../') - , testourroot = path.join(__dirname, '../test/simple/') - - -function processFile (url, out, replacements) { - hyperquest(url).pipe(bl(function (err, data) { - if (err) - throw err - - data = data.toString() - replacements.forEach(function (replacement) { - data = data.replace.apply(data, replacement) - }) - - fs.writeFile(out, data, 'utf8', function (err) { - if (err) - throw err - - console.log('Wrote', out) - }) - })) -} - -function processLibFile (file) { - var replacements = files[file] - , url = libsrcurl + file - , out = path.join(libourroot, replacements.out || file) - - processFile(url, out, replacements) -} - - -function processTestFile (file) { - var replacements = testReplace.all - , url = testsrcurl + file - , out = path.join(testourroot, file) - - if (testReplace[file]) - replacements = replacements.concat(testReplace[file]) - - processFile(url, out, replacements) -} - - -if (!/0\.1\d\.\d+/.test(process.argv[2])) { - console.log('Usage: build.js <node version>') - return process.exit(-1) -} - - -//-------------------------------------------------------------------- -// Grab & process files in ../lib/ - -Object.keys(files).forEach(processLibFile) - -//-------------------------------------------------------------------- -// Discover, grab and process all test-string-decoder* files on joyent/node - -hyperquest(testlisturl).pipe(bl(function (err, data) { - if (err) - throw err - - var $ = cheerio.load(data.toString()) - - $('table.files .js-directory-link').each(function () { - var file = $(this).text() - if (/^test-string-decoder/.test(file) || file == 'common.js') - processTestFile(file) - }) -})) - -//-------------------------------------------------------------------- -// Grab the joyent/node test/common.js - -processFile( - testsrcurl + '../common.js' - , path.join(testourroot, '../common.js') - , testReplace['common.js'] -) \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js deleted file mode 100644 index 7396a4f4..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js +++ /dev/null @@ -1,36 +0,0 @@ -/* This file lists the files to be fetched from the node repo - * in the /lib/ directory which will be placed in the ../lib/ - * directory after having each of the "replacements" in the - * array for that file applied to it. The replacements are - * simply the arguments to String#replace, so they can be - * strings, regexes, functions. - */ - -module.exports['string_decoder.js'] = [ - - // pull in Bufer as a require - // add Buffer.isEncoding where missing - [ - /^(\/\/ USE OR OTHER DEALINGS IN THE SOFTWARE\.)/m - , '$1\n\nvar Buffer = require(\'buffer\').Buffer;' - + '\n' - + '\nvar isBufferEncoding = Buffer.isEncoding' - + '\n || function(encoding) {' - + '\n switch (encoding && encoding.toLowerCase()) {' - + '\n case \'hex\': case \'utf8\': case \'utf-8\': case \'ascii\': case \'binary\': case \'base64\': case \'ucs2\': case \'ucs-2\': case \'utf16le\': case \'utf-16le\': case \'raw\': return true;' - + '\n default: return false;' - + '\n }' - + '\n }' - + '\n' - - ] - - // use custom Buffer.isEncoding reference - , [ - /Buffer\.isEncoding\(/g - , 'isBufferEncoding\(' - ] - -] - -module.exports['string_decoder.js'].out = 'index.js' \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json deleted file mode 100644 index f7ee6a46..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "string_decoder-build", - "version": "0.0.0", - "description": "", - "main": "build.js", - "dependencies": { - "bl": "~0.6.0", - "hyperzip": "0.0.0", - "hyperdirect": "0.0.0", - "cheerio": "~0.13.1" - } -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js deleted file mode 100644 index 5bbf6028..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js +++ /dev/null @@ -1,24 +0,0 @@ -module.exports.all = [ - [ - /require\(['"]string_decoder['"]\)/g - , 'require(\'../../\')' - ] - -] - -module.exports['common.js'] = [ - [ - /^ setImmediate,$/m - , ' typeof setImmediate == \'undefined\' ? null : setImmediate,' - ] - - , [ - /^ clearImmediate,$/m - , ' typeof clearImmediate == \'undefined\' ? null : clearImmediate,' - ] - - , [ - /^ global];$/m - , ' global].filter(Boolean);' - ] -] diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js deleted file mode 100644 index 2e44a03e..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var Buffer = require('buffer').Buffer; - -var isBufferEncoding = Buffer.isEncoding - || function(encoding) { - switch (encoding && encoding.toLowerCase()) { - case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; - default: return false; - } - } - - -function assertEncoding(encoding) { - if (encoding && !isBufferEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} - -var StringDecoder = exports.StringDecoder = function(encoding) { - this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); - assertEncoding(encoding); - switch (this.encoding) { - case 'utf8': - // CESU-8 represents each of Surrogate Pair by 3-bytes - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - // UTF-16 represents each of Surrogate Pair by 2-bytes - this.surrogateSize = 2; - this.detectIncompleteChar = utf16DetectIncompleteChar; - break; - case 'base64': - // Base-64 stores 3 bytes in 4 chars, and pads the remainder. - this.surrogateSize = 3; - this.detectIncompleteChar = base64DetectIncompleteChar; - break; - default: - this.write = passThroughWrite; - return; - } - - this.charBuffer = new Buffer(6); - this.charReceived = 0; - this.charLength = 0; -}; - - -StringDecoder.prototype.write = function(buffer) { - var charStr = ''; - var offset = 0; - - // if our last write ended with an incomplete multibyte character - while (this.charLength) { - // determine how many remaining bytes this buffer has to offer for this char - var i = (buffer.length >= this.charLength - this.charReceived) ? - this.charLength - this.charReceived : - buffer.length; - - // add the new bytes to the char buffer - buffer.copy(this.charBuffer, this.charReceived, offset, i); - this.charReceived += (i - offset); - offset = i; - - if (this.charReceived < this.charLength) { - // still not enough chars in this buffer? wait for more ... - return ''; - } - - // get the character that was split - charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); - - // lead surrogate (D800-DBFF) is also the incomplete character - var charCode = charStr.charCodeAt(charStr.length - 1); - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - this.charLength += this.surrogateSize; - charStr = ''; - continue; - } - this.charReceived = this.charLength = 0; - - // if there are no more bytes in this buffer, just emit our char - if (i == buffer.length) return charStr; - - // otherwise cut off the characters end from the beginning of this buffer - buffer = buffer.slice(i, buffer.length); - break; - } - - var lenIncomplete = this.detectIncompleteChar(buffer); - - var end = buffer.length; - if (this.charLength) { - // buffer the incomplete character bytes we got - buffer.copy(this.charBuffer, 0, buffer.length - lenIncomplete, end); - this.charReceived = lenIncomplete; - end -= lenIncomplete; - } - - charStr += buffer.toString(this.encoding, 0, end); - - var end = charStr.length - 1; - var charCode = charStr.charCodeAt(end); - // lead surrogate (D800-DBFF) is also the incomplete character - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - var size = this.surrogateSize; - this.charLength += size; - this.charReceived += size; - this.charBuffer.copy(this.charBuffer, size, 0, size); - this.charBuffer.write(charStr.charAt(charStr.length - 1), this.encoding); - return charStr.substring(0, end); - } - - // or just emit the charStr - return charStr; -}; - -StringDecoder.prototype.detectIncompleteChar = function(buffer) { - // determine how many bytes we have to check at the end of this buffer - var i = (buffer.length >= 3) ? 3 : buffer.length; - - // Figure out if one of the last i bytes of our buffer announces an - // incomplete char. - for (; i > 0; i--) { - var c = buffer[buffer.length - i]; - - // See http://en.wikipedia.org/wiki/UTF-8#Description - - // 110XXXXX - if (i == 1 && c >> 5 == 0x06) { - this.charLength = 2; - break; - } - - // 1110XXXX - if (i <= 2 && c >> 4 == 0x0E) { - this.charLength = 3; - break; - } - - // 11110XXX - if (i <= 3 && c >> 3 == 0x1E) { - this.charLength = 4; - break; - } - } - - return i; -}; - -StringDecoder.prototype.end = function(buffer) { - var res = ''; - if (buffer && buffer.length) - res = this.write(buffer); - - if (this.charReceived) { - var cr = this.charReceived; - var buf = this.charBuffer; - var enc = this.encoding; - res += buf.slice(0, cr).toString(enc); - } - - return res; -}; - -function passThroughWrite(buffer) { - return buffer.toString(this.encoding); -} - -function utf16DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 2; - this.charLength = incomplete ? 2 : 0; - return incomplete; -} - -function base64DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 3; - this.charLength = incomplete ? 3 : 0; - return incomplete; -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json deleted file mode 100644 index 73785c10..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "string_decoder", - "version": "0.10.25", - "description": "The string_decoder module from Node core", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "tap": "~0.4.8" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/rvagg/string_decoder.git" - }, - "homepage": "https://github.com/rvagg/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "readme": "**string_decoder.js** (`require('string_decoder')`) from Node.js core\n\nCopyright Joyent, Inc. and other Node contributors. See LICENCE file for details.\n\nVersion numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.**\n\nThe *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version.", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/rvagg/string_decoder/issues" - }, - "_id": "string_decoder@0.10.25", - "_from": "string_decoder@~0.10.x" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js deleted file mode 100644 index ed5ff08d..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var path = require('path'); -var assert = require('assert'); - -exports.testDir = path.dirname(__filename); -exports.fixturesDir = path.join(exports.testDir, 'fixtures'); -exports.libDir = path.join(exports.testDir, '../lib'); -exports.tmpDir = path.join(exports.testDir, 'tmp'); -exports.PORT = +process.env.NODE_COMMON_PORT || 12346; - -if (process.platform === 'win32') { - exports.PIPE = '\\\\.\\pipe\\libuv-test'; -} else { - exports.PIPE = exports.tmpDir + '/test.sock'; -} - -var util = require('util'); -for (var i in util) exports[i] = util[i]; -//for (var i in exports) global[i] = exports[i]; - -function protoCtrChain(o) { - var result = []; - for (; o; o = o.__proto__) { result.push(o.constructor); } - return result.join(); -} - -exports.indirectInstanceOf = function(obj, cls) { - if (obj instanceof cls) { return true; } - var clsChain = protoCtrChain(cls.prototype); - var objChain = protoCtrChain(obj); - return objChain.slice(-clsChain.length) === clsChain; -}; - - -exports.ddCommand = function(filename, kilobytes) { - if (process.platform === 'win32') { - var p = path.resolve(exports.fixturesDir, 'create-file.js'); - return '"' + process.argv[0] + '" "' + p + '" "' + - filename + '" ' + (kilobytes * 1024); - } else { - return 'dd if=/dev/zero of="' + filename + '" bs=1024 count=' + kilobytes; - } -}; - - -exports.spawnCat = function(options) { - var spawn = require('child_process').spawn; - - if (process.platform === 'win32') { - return spawn('more', [], options); - } else { - return spawn('cat', [], options); - } -}; - - -exports.spawnPwd = function(options) { - var spawn = require('child_process').spawn; - - if (process.platform === 'win32') { - return spawn('cmd.exe', ['/c', 'cd'], options); - } else { - return spawn('pwd', [], options); - } -}; - - -// Turn this off if the test should not check for global leaks. -exports.globalCheck = true; - -process.on('exit', function() { - if (!exports.globalCheck) return; - var knownGlobals = [setTimeout, - setInterval, - typeof setImmediate == 'undefined' ? null : setImmediate, - clearTimeout, - clearInterval, - typeof clearImmediate == 'undefined' ? null : clearImmediate, - console, - Buffer, - process, - global].filter(Boolean); - - if (global.gc) { - knownGlobals.push(gc); - } - - if (global.DTRACE_HTTP_SERVER_RESPONSE) { - knownGlobals.push(DTRACE_HTTP_SERVER_RESPONSE); - knownGlobals.push(DTRACE_HTTP_SERVER_REQUEST); - knownGlobals.push(DTRACE_HTTP_CLIENT_RESPONSE); - knownGlobals.push(DTRACE_HTTP_CLIENT_REQUEST); - knownGlobals.push(DTRACE_NET_STREAM_END); - knownGlobals.push(DTRACE_NET_SERVER_CONNECTION); - knownGlobals.push(DTRACE_NET_SOCKET_READ); - knownGlobals.push(DTRACE_NET_SOCKET_WRITE); - } - if (global.COUNTER_NET_SERVER_CONNECTION) { - knownGlobals.push(COUNTER_NET_SERVER_CONNECTION); - knownGlobals.push(COUNTER_NET_SERVER_CONNECTION_CLOSE); - knownGlobals.push(COUNTER_HTTP_SERVER_REQUEST); - knownGlobals.push(COUNTER_HTTP_SERVER_RESPONSE); - knownGlobals.push(COUNTER_HTTP_CLIENT_REQUEST); - knownGlobals.push(COUNTER_HTTP_CLIENT_RESPONSE); - } - - if (global.ArrayBuffer) { - knownGlobals.push(ArrayBuffer); - knownGlobals.push(Int8Array); - knownGlobals.push(Uint8Array); - knownGlobals.push(Uint8ClampedArray); - knownGlobals.push(Int16Array); - knownGlobals.push(Uint16Array); - knownGlobals.push(Int32Array); - knownGlobals.push(Uint32Array); - knownGlobals.push(Float32Array); - knownGlobals.push(Float64Array); - knownGlobals.push(DataView); - } - - for (var x in global) { - var found = false; - - for (var y in knownGlobals) { - if (global[x] === knownGlobals[y]) { - found = true; - break; - } - } - - if (!found) { - console.error('Unknown global: %s', x); - assert.ok(false, 'Unknown global found'); - } - } -}); - - -var mustCallChecks = []; - - -function runCallChecks(exitCode) { - if (exitCode !== 0) return; - - var failed = mustCallChecks.filter(function(context) { - return context.actual !== context.expected; - }); - - failed.forEach(function(context) { - console.log('Mismatched %s function calls. Expected %d, actual %d.', - context.name, - context.expected, - context.actual); - console.log(context.stack.split('\n').slice(2).join('\n')); - }); - - if (failed.length) process.exit(1); -} - - -exports.mustCall = function(fn, expected) { - if (typeof expected !== 'number') expected = 1; - - var context = { - expected: expected, - actual: 0, - stack: (new Error).stack, - name: fn.name || '<anonymous>' - }; - - // add the exit listener only once to avoid listener leak warnings - if (mustCallChecks.length === 0) process.on('exit', runCallChecks); - - mustCallChecks.push(context); - - return function() { - context.actual++; - return fn.apply(this, arguments); - }; -}; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js deleted file mode 100644 index 869a4116..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// verify that the string decoder works getting 1 byte at a time, -// the whole buffer at once, and that both match the .toString(enc) -// result of the entire buffer. - -var assert = require('assert'); -var SD = require('../../').StringDecoder; -var encodings = ['base64', 'hex', 'utf8', 'utf16le', 'ucs2']; - -var bufs = [ '☃💩', 'asdf' ].map(function(b) { - return new Buffer(b); -}); - -// also test just arbitrary bytes from 0-15. -for (var i = 1; i <= 16; i++) { - var bytes = new Array(i).join('.').split('.').map(function(_, j) { - return j + 0x78; - }); - bufs.push(new Buffer(bytes)); -} - -encodings.forEach(testEncoding); - -console.log('ok'); - -function testEncoding(encoding) { - bufs.forEach(function(buf) { - testBuf(encoding, buf); - }); -} - -function testBuf(encoding, buf) { - console.error('# %s', encoding, buf); - - // write one byte at a time. - var s = new SD(encoding); - var res1 = ''; - for (var i = 0; i < buf.length; i++) { - res1 += s.write(buf.slice(i, i + 1)); - } - res1 += s.end(); - - // write the whole buffer at once. - var res2 = ''; - var s = new SD(encoding); - res2 += s.write(buf); - res2 += s.end(); - - // .toString() on the buffer - var res3 = buf.toString(encoding); - - console.log('expect=%j', res3); - assert.equal(res1, res3, 'one byte at a time should match toString'); - assert.equal(res2, res3, 'all bytes at once should match toString'); -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js deleted file mode 100644 index 7f69f7ea..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var common = require('../common'); -var assert = require('assert'); -var StringDecoder = require('../../').StringDecoder; -var decoder = new StringDecoder('utf8'); - - - -var buffer = new Buffer('$'); -assert.deepEqual('$', decoder.write(buffer)); - -buffer = new Buffer('¢'); -assert.deepEqual('', decoder.write(buffer.slice(0, 1))); -assert.deepEqual('¢', decoder.write(buffer.slice(1, 2))); - -buffer = new Buffer('€'); -assert.deepEqual('', decoder.write(buffer.slice(0, 1))); -assert.deepEqual('', decoder.write(buffer.slice(1, 2))); -assert.deepEqual('€', decoder.write(buffer.slice(2, 3))); - -buffer = new Buffer([0xF0, 0xA4, 0xAD, 0xA2]); -var s = ''; -s += decoder.write(buffer.slice(0, 1)); -s += decoder.write(buffer.slice(1, 2)); -s += decoder.write(buffer.slice(2, 3)); -s += decoder.write(buffer.slice(3, 4)); -assert.ok(s.length > 0); - -// CESU-8 -buffer = new Buffer('EDA0BDEDB18D', 'hex'); // THUMBS UP SIGN (in CESU-8) -var s = ''; -s += decoder.write(buffer.slice(0, 1)); -s += decoder.write(buffer.slice(1, 2)); -s += decoder.write(buffer.slice(2, 3)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(3, 4)); -s += decoder.write(buffer.slice(4, 5)); -s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 2)); -s += decoder.write(buffer.slice(2, 4)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(4, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 3)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(3, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 4)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(4, 5)); -s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 5)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 6)); -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - - -// UCS-2 -decoder = new StringDecoder('ucs2'); -buffer = new Buffer('ab', 'ucs2'); -assert.equal(decoder.write(buffer), 'ab'); // 2 complete chars -buffer = new Buffer('abc', 'ucs2'); -assert.equal(decoder.write(buffer.slice(0, 3)), 'a'); // 'a' and first of 'b' -assert.equal(decoder.write(buffer.slice(3, 6)), 'bc'); // second of 'b' and 'c' - - -// UTF-16LE -buffer = new Buffer('3DD84DDC', 'hex'); // THUMBS UP SIGN (in CESU-8) -var s = ''; -s += decoder.write(buffer.slice(0, 1)); -s += decoder.write(buffer.slice(1, 2)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(2, 3)); -s += decoder.write(buffer.slice(3, 4)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 2)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(2, 4)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 3)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(3, 4)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 4)); -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - - -// A mixed ascii and non-ascii string -// Test stolen from deps/v8/test/cctest/test-strings.cc -// U+02E4 -> CB A4 -// U+0064 -> 64 -// U+12E4 -> E1 8B A4 -// U+0030 -> 30 -// U+3045 -> E3 81 85 -var expected = '\u02e4\u0064\u12e4\u0030\u3045'; -var buffer = new Buffer([0xCB, 0xA4, 0x64, 0xE1, 0x8B, 0xA4, - 0x30, 0xE3, 0x81, 0x85]); -var charLengths = [0, 0, 1, 2, 2, 2, 3, 4, 4, 4, 5, 5]; - -// Split the buffer into 3 segments -// |----|------|-------| -// 0 i j buffer.length -// Scan through every possible 3 segment combination -// and make sure that the string is always parsed. -common.print('scanning '); -for (var j = 2; j < buffer.length; j++) { - for (var i = 1; i < j; i++) { - var decoder = new StringDecoder('utf8'); - - var sum = decoder.write(buffer.slice(0, i)); - - // just check that we've received the right amount - // after the first write - assert.equal(charLengths[i], sum.length); - - sum += decoder.write(buffer.slice(i, j)); - sum += decoder.write(buffer.slice(j, buffer.length)); - assert.equal(expected, sum); - common.print('.'); - } -} -console.log(' crayon!'); - diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/package.json deleted file mode 100644 index ae2e5983..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "readable-stream", - "version": "1.0.25", - "description": "An exploration of a new kind of readable streams for Node.js", - "main": "readable.js", - "dependencies": { - "string_decoder": "~0.10.x" - }, - "devDependencies": { - "tap": "~0.2.6" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/readable-stream" - }, - "keywords": [ - "readable", - "stream", - "pipe" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "BSD", - "readme": "# readable-stream\n\nA new class of streams for Node.js\n\nThis module provides the new Stream base classes introduced in Node\nv0.10, for use in Node v0.8. You can use it to have programs that\nhave to work with node v0.8, while being forward-compatible for v0.10\nand beyond. When you drop support for v0.8, you can remove this\nmodule, and only use the native streams.\n\nThis is almost exactly the same codebase as appears in Node v0.10.\nHowever:\n\n1. The exported object is actually the Readable class. Decorating the\n native `stream` module would be global pollution.\n2. In v0.10, you can safely use `base64` as an argument to\n `setEncoding` in Readable streams. However, in v0.8, the\n StringDecoder class has no `end()` method, which is problematic for\n Base64. So, don't use that, because it'll break and be weird.\n\nOther than that, the API is the same as `require('stream')` in v0.10,\nso the API docs are reproduced below.\n\n----------\n\n Stability: 2 - Unstable\n\nA stream is an abstract interface implemented by various objects in\nNode. For example a request to an HTTP server is a stream, as is\nstdout. Streams are readable, writable, or both. All streams are\ninstances of [EventEmitter][]\n\nYou can load the Stream base classes by doing `require('stream')`.\nThere are base classes provided for Readable streams, Writable\nstreams, Duplex streams, and Transform streams.\n\n## Compatibility\n\nIn earlier versions of Node, the Readable stream interface was\nsimpler, but also less powerful and less useful.\n\n* Rather than waiting for you to call the `read()` method, `'data'`\n events would start emitting immediately. If you needed to do some\n I/O to decide how to handle data, then you had to store the chunks\n in some kind of buffer so that they would not be lost.\n* The `pause()` method was advisory, rather than guaranteed. This\n meant that you still had to be prepared to receive `'data'` events\n even when the stream was in a paused state.\n\nIn Node v0.10, the Readable class described below was added. For\nbackwards compatibility with older Node programs, Readable streams\nswitch into \"old mode\" when a `'data'` event handler is added, or when\nthe `pause()` or `resume()` methods are called. The effect is that,\neven if you are not using the new `read()` method and `'readable'`\nevent, you no longer have to worry about losing `'data'` chunks.\n\nMost programs will continue to function normally. However, this\nintroduces an edge case in the following conditions:\n\n* No `'data'` event handler is added.\n* The `pause()` and `resume()` methods are never called.\n\nFor example, consider the following code:\n\n```javascript\n// WARNING! BROKEN!\nnet.createServer(function(socket) {\n\n // we add an 'end' method, but never consume the data\n socket.on('end', function() {\n // It will never get here.\n socket.end('I got your message (but didnt read it)\\n');\n });\n\n}).listen(1337);\n```\n\nIn versions of node prior to v0.10, the incoming message data would be\nsimply discarded. However, in Node v0.10 and beyond, the socket will\nremain paused forever.\n\nThe workaround in this situation is to call the `resume()` method to\ntrigger \"old mode\" behavior:\n\n```javascript\n// Workaround\nnet.createServer(function(socket) {\n\n socket.on('end', function() {\n socket.end('I got your message (but didnt read it)\\n');\n });\n\n // start the flow of data, discarding it.\n socket.resume();\n\n}).listen(1337);\n```\n\nIn addition to new Readable streams switching into old-mode, pre-v0.10\nstyle streams can be wrapped in a Readable class using the `wrap()`\nmethod.\n\n## Class: stream.Readable\n\n<!--type=class-->\n\nA `Readable Stream` has the following methods, members, and events.\n\nNote that `stream.Readable` is an abstract class designed to be\nextended with an underlying implementation of the `_read(size)`\nmethod. (See below.)\n\n### new stream.Readable([options])\n\n* `options` {Object}\n * `highWaterMark` {Number} The maximum number of bytes to store in\n the internal buffer before ceasing to read from the underlying\n resource. Default=16kb\n * `encoding` {String} If specified, then buffers will be decoded to\n strings using the specified encoding. Default=null\n * `objectMode` {Boolean} Whether this stream should behave\n as a stream of objects. Meaning that stream.read(n) returns\n a single value instead of a Buffer of size n\n\nIn classes that extend the Readable class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### readable.\\_read(size)\n\n* `size` {Number} Number of bytes to read asynchronously\n\nNote: **This function should NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Readable\nclass methods only.\n\nAll Readable stream implementations must provide a `_read` method\nto fetch data from the underlying resource.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\nWhen data is available, put it into the read queue by calling\n`readable.push(chunk)`. If `push` returns false, then you should stop\nreading. When `_read` is called again, you should start pushing more\ndata.\n\nThe `size` argument is advisory. Implementations where a \"read\" is a\nsingle call that returns data can use this to know how much data to\nfetch. Implementations where that is not relevant, such as TCP or\nTLS, may ignore this argument, and simply provide data whenever it\nbecomes available. There is no need, for example to \"wait\" until\n`size` bytes are available before calling `stream.push(chunk)`.\n\n### readable.push(chunk)\n\n* `chunk` {Buffer | null | String} Chunk of data to push into the read queue\n* return {Boolean} Whether or not more pushes should be performed\n\nNote: **This function should be called by Readable implementors, NOT\nby consumers of Readable subclasses.** The `_read()` function will not\nbe called again until at least one `push(chunk)` call is made. If no\ndata is available, then you MAY call `push('')` (an empty string) to\nallow a future `_read` call, without adding any data to the queue.\n\nThe `Readable` class works by putting data into a read queue to be\npulled out later by calling the `read()` method when the `'readable'`\nevent fires.\n\nThe `push()` method will explicitly insert some data into the read\nqueue. If it is called with `null` then it will signal the end of the\ndata.\n\nIn some cases, you may be wrapping a lower-level source which has some\nsort of pause/resume mechanism, and a data callback. In those cases,\nyou could wrap the low-level source object by doing something like\nthis:\n\n```javascript\n// source is an object with readStop() and readStart() methods,\n// and an `ondata` member that gets called when it has data, and\n// an `onend` member that gets called when the data is over.\n\nvar stream = new Readable();\n\nsource.ondata = function(chunk) {\n // if push() returns false, then we need to stop reading from source\n if (!stream.push(chunk))\n source.readStop();\n};\n\nsource.onend = function() {\n stream.push(null);\n};\n\n// _read will be called when the stream wants to pull more data in\n// the advisory size argument is ignored in this case.\nstream._read = function(n) {\n source.readStart();\n};\n```\n\n### readable.unshift(chunk)\n\n* `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue\n* return {Boolean} Whether or not more pushes should be performed\n\nThis is the corollary of `readable.push(chunk)`. Rather than putting\nthe data at the *end* of the read queue, it puts it at the *front* of\nthe read queue.\n\nThis is useful in certain use-cases where a stream is being consumed\nby a parser, which needs to \"un-consume\" some data that it has\noptimistically pulled out of the source.\n\n```javascript\n// A parser for a simple data protocol.\n// The \"header\" is a JSON object, followed by 2 \\n characters, and\n// then a message body.\n//\n// Note: This can be done more simply as a Transform stream. See below.\n\nfunction SimpleProtocol(source, options) {\n if (!(this instanceof SimpleProtocol))\n return new SimpleProtocol(options);\n\n Readable.call(this, options);\n this._inBody = false;\n this._sawFirstCr = false;\n\n // source is a readable stream, such as a socket or file\n this._source = source;\n\n var self = this;\n source.on('end', function() {\n self.push(null);\n });\n\n // give it a kick whenever the source is readable\n // read(0) will not consume any bytes\n source.on('readable', function() {\n self.read(0);\n });\n\n this._rawHeader = [];\n this.header = null;\n}\n\nSimpleProtocol.prototype = Object.create(\n Readable.prototype, { constructor: { value: SimpleProtocol }});\n\nSimpleProtocol.prototype._read = function(n) {\n if (!this._inBody) {\n var chunk = this._source.read();\n\n // if the source doesn't have data, we don't have data yet.\n if (chunk === null)\n return this.push('');\n\n // check if the chunk has a \\n\\n\n var split = -1;\n for (var i = 0; i < chunk.length; i++) {\n if (chunk[i] === 10) { // '\\n'\n if (this._sawFirstCr) {\n split = i;\n break;\n } else {\n this._sawFirstCr = true;\n }\n } else {\n this._sawFirstCr = false;\n }\n }\n\n if (split === -1) {\n // still waiting for the \\n\\n\n // stash the chunk, and try again.\n this._rawHeader.push(chunk);\n this.push('');\n } else {\n this._inBody = true;\n var h = chunk.slice(0, split);\n this._rawHeader.push(h);\n var header = Buffer.concat(this._rawHeader).toString();\n try {\n this.header = JSON.parse(header);\n } catch (er) {\n this.emit('error', new Error('invalid simple protocol data'));\n return;\n }\n // now, because we got some extra data, unshift the rest\n // back into the read queue so that our consumer will see it.\n var b = chunk.slice(split);\n this.unshift(b);\n\n // and let them know that we are done parsing the header.\n this.emit('header', this.header);\n }\n } else {\n // from there on, just provide the data to our consumer.\n // careful not to push(null), since that would indicate EOF.\n var chunk = this._source.read();\n if (chunk) this.push(chunk);\n }\n};\n\n// Usage:\nvar parser = new SimpleProtocol(source);\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.\n```\n\n### readable.wrap(stream)\n\n* `stream` {Stream} An \"old style\" readable stream\n\nIf you are using an older Node library that emits `'data'` events and\nhas a `pause()` method that is advisory only, then you can use the\n`wrap()` method to create a Readable stream that uses the old stream\nas its data source.\n\nFor example:\n\n```javascript\nvar OldReader = require('./old-api-module.js').OldReader;\nvar oreader = new OldReader;\nvar Readable = require('stream').Readable;\nvar myReader = new Readable().wrap(oreader);\n\nmyReader.on('readable', function() {\n myReader.read(); // etc.\n});\n```\n\n### Event: 'readable'\n\nWhen there is data ready to be consumed, this event will fire.\n\nWhen this event emits, call the `read()` method to consume the data.\n\n### Event: 'end'\n\nEmitted when the stream has received an EOF (FIN in TCP terminology).\nIndicates that no more `'data'` events will happen. If the stream is\nalso writable, it may be possible to continue writing.\n\n### Event: 'data'\n\nThe `'data'` event emits either a `Buffer` (by default) or a string if\n`setEncoding()` was used.\n\nNote that adding a `'data'` event listener will switch the Readable\nstream into \"old mode\", where data is emitted as soon as it is\navailable, rather than waiting for you to call `read()` to consume it.\n\n### Event: 'error'\n\nEmitted if there was an error receiving data.\n\n### Event: 'close'\n\nEmitted when the underlying resource (for example, the backing file\ndescriptor) has been closed. Not all streams will emit this.\n\n### readable.setEncoding(encoding)\n\nMakes the `'data'` event emit a string instead of a `Buffer`. `encoding`\ncan be `'utf8'`, `'utf16le'` (`'ucs2'`), `'ascii'`, or `'hex'`.\n\nThe encoding can also be set by specifying an `encoding` field to the\nconstructor.\n\n### readable.read([size])\n\n* `size` {Number | null} Optional number of bytes to read.\n* Return: {Buffer | String | null}\n\nNote: **This function SHOULD be called by Readable stream users.**\n\nCall this method to consume data once the `'readable'` event is\nemitted.\n\nThe `size` argument will set a minimum number of bytes that you are\ninterested in. If not set, then the entire content of the internal\nbuffer is returned.\n\nIf there is no data to consume, or if there are fewer bytes in the\ninternal buffer than the `size` argument, then `null` is returned, and\na future `'readable'` event will be emitted when more is available.\n\nCalling `stream.read(0)` will always return `null`, and will trigger a\nrefresh of the internal buffer, but otherwise be a no-op.\n\n### readable.pipe(destination, [options])\n\n* `destination` {Writable Stream}\n* `options` {Object} Optional\n * `end` {Boolean} Default=true\n\nConnects this readable stream to `destination` WriteStream. Incoming\ndata on this stream gets written to `destination`. Properly manages\nback-pressure so that a slow destination will not be overwhelmed by a\nfast readable stream.\n\nThis function returns the `destination` stream.\n\nFor example, emulating the Unix `cat` command:\n\n process.stdin.pipe(process.stdout);\n\nBy default `end()` is called on the destination when the source stream\nemits `end`, so that `destination` is no longer writable. Pass `{ end:\nfalse }` as `options` to keep the destination stream open.\n\nThis keeps `writer` open so that \"Goodbye\" can be written at the\nend.\n\n reader.pipe(writer, { end: false });\n reader.on(\"end\", function() {\n writer.end(\"Goodbye\\n\");\n });\n\nNote that `process.stderr` and `process.stdout` are never closed until\nthe process exits, regardless of the specified options.\n\n### readable.unpipe([destination])\n\n* `destination` {Writable Stream} Optional\n\nUndo a previously established `pipe()`. If no destination is\nprovided, then all previously established pipes are removed.\n\n### readable.pause()\n\nSwitches the readable stream into \"old mode\", where data is emitted\nusing a `'data'` event rather than being buffered for consumption via\nthe `read()` method.\n\nCeases the flow of data. No `'data'` events are emitted while the\nstream is in a paused state.\n\n### readable.resume()\n\nSwitches the readable stream into \"old mode\", where data is emitted\nusing a `'data'` event rather than being buffered for consumption via\nthe `read()` method.\n\nResumes the incoming `'data'` events after a `pause()`.\n\n\n## Class: stream.Writable\n\n<!--type=class-->\n\nA `Writable` Stream has the following methods, members, and events.\n\nNote that `stream.Writable` is an abstract class designed to be\nextended with an underlying implementation of the\n`_write(chunk, encoding, cb)` method. (See below.)\n\n### new stream.Writable([options])\n\n* `options` {Object}\n * `highWaterMark` {Number} Buffer level when `write()` starts\n returning false. Default=16kb\n * `decodeStrings` {Boolean} Whether or not to decode strings into\n Buffers before passing them to `_write()`. Default=true\n\nIn classes that extend the Writable class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### writable.\\_write(chunk, encoding, callback)\n\n* `chunk` {Buffer | String} The chunk to be written. Will always\n be a buffer unless the `decodeStrings` option was set to `false`.\n* `encoding` {String} If the chunk is a string, then this is the\n encoding type. Ignore chunk is a buffer. Note that chunk will\n **always** be a buffer unless the `decodeStrings` option is\n explicitly set to `false`.\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done processing the supplied chunk.\n\nAll Writable stream implementations must provide a `_write` method to\nsend data to the underlying resource.\n\nNote: **This function MUST NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Writable\nclass methods only.\n\nCall the callback using the standard `callback(error)` pattern to\nsignal that the write completed successfully or with an error.\n\nIf the `decodeStrings` flag is set in the constructor options, then\n`chunk` may be a string rather than a Buffer, and `encoding` will\nindicate the sort of string that it is. This is to support\nimplementations that have an optimized handling for certain string\ndata encodings. If you do not explicitly set the `decodeStrings`\noption to `false`, then you can safely ignore the `encoding` argument,\nand assume that `chunk` will always be a Buffer.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n\n### writable.write(chunk, [encoding], [callback])\n\n* `chunk` {Buffer | String} Data to be written\n* `encoding` {String} Optional. If `chunk` is a string, then encoding\n defaults to `'utf8'`\n* `callback` {Function} Optional. Called when this chunk is\n successfully written.\n* Returns {Boolean}\n\nWrites `chunk` to the stream. Returns `true` if the data has been\nflushed to the underlying resource. Returns `false` to indicate that\nthe buffer is full, and the data will be sent out in the future. The\n`'drain'` event will indicate when the buffer is empty again.\n\nThe specifics of when `write()` will return false, is determined by\nthe `highWaterMark` option provided to the constructor.\n\n### writable.end([chunk], [encoding], [callback])\n\n* `chunk` {Buffer | String} Optional final data to be written\n* `encoding` {String} Optional. If `chunk` is a string, then encoding\n defaults to `'utf8'`\n* `callback` {Function} Optional. Called when the final chunk is\n successfully written.\n\nCall this method to signal the end of the data being written to the\nstream.\n\n### Event: 'drain'\n\nEmitted when the stream's write queue empties and it's safe to write\nwithout buffering again. Listen for it when `stream.write()` returns\n`false`.\n\n### Event: 'close'\n\nEmitted when the underlying resource (for example, the backing file\ndescriptor) has been closed. Not all streams will emit this.\n\n### Event: 'finish'\n\nWhen `end()` is called and there are no more chunks to write, this\nevent is emitted.\n\n### Event: 'pipe'\n\n* `source` {Readable Stream}\n\nEmitted when the stream is passed to a readable stream's pipe method.\n\n### Event 'unpipe'\n\n* `source` {Readable Stream}\n\nEmitted when a previously established `pipe()` is removed using the\nsource Readable stream's `unpipe()` method.\n\n## Class: stream.Duplex\n\n<!--type=class-->\n\nA \"duplex\" stream is one that is both Readable and Writable, such as a\nTCP socket connection.\n\nNote that `stream.Duplex` is an abstract class designed to be\nextended with an underlying implementation of the `_read(size)`\nand `_write(chunk, encoding, callback)` methods as you would with a Readable or\nWritable stream class.\n\nSince JavaScript doesn't have multiple prototypal inheritance, this\nclass prototypally inherits from Readable, and then parasitically from\nWritable. It is thus up to the user to implement both the lowlevel\n`_read(n)` method as well as the lowlevel `_write(chunk, encoding, cb)` method\non extension duplex classes.\n\n### new stream.Duplex(options)\n\n* `options` {Object} Passed to both Writable and Readable\n constructors. Also has the following fields:\n * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then\n the stream will automatically end the readable side when the\n writable side ends and vice versa.\n\nIn classes that extend the Duplex class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n## Class: stream.Transform\n\nA \"transform\" stream is a duplex stream where the output is causally\nconnected in some way to the input, such as a zlib stream or a crypto\nstream.\n\nThere is no requirement that the output be the same size as the input,\nthe same number of chunks, or arrive at the same time. For example, a\nHash stream will only ever have a single chunk of output which is\nprovided when the input is ended. A zlib stream will either produce\nmuch smaller or much larger than its input.\n\nRather than implement the `_read()` and `_write()` methods, Transform\nclasses must implement the `_transform()` method, and may optionally\nalso implement the `_flush()` method. (See below.)\n\n### new stream.Transform([options])\n\n* `options` {Object} Passed to both Writable and Readable\n constructors.\n\nIn classes that extend the Transform class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### transform.\\_transform(chunk, encoding, callback)\n\n* `chunk` {Buffer | String} The chunk to be transformed. Will always\n be a buffer unless the `decodeStrings` option was set to `false`.\n* `encoding` {String} If the chunk is a string, then this is the\n encoding type. (Ignore if `decodeStrings` chunk is a buffer.)\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done processing the supplied chunk.\n\nNote: **This function MUST NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Transform\nclass methods only.\n\nAll Transform stream implementations must provide a `_transform`\nmethod to accept input and produce output.\n\n`_transform` should do whatever has to be done in this specific\nTransform class, to handle the bytes being written, and pass them off\nto the readable portion of the interface. Do asynchronous I/O,\nprocess things, and so on.\n\nCall `transform.push(outputChunk)` 0 or more times to generate output\nfrom this input chunk, depending on how much data you want to output\nas a result of this chunk.\n\nCall the callback function only when the current chunk is completely\nconsumed. Note that there may or may not be output as a result of any\nparticular input chunk.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n### transform.\\_flush(callback)\n\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done flushing any remaining data.\n\nNote: **This function MUST NOT be called directly.** It MAY be implemented\nby child classes, and if so, will be called by the internal Transform\nclass methods only.\n\nIn some cases, your transform operation may need to emit a bit more\ndata at the end of the stream. For example, a `Zlib` compression\nstream will store up some internal state so that it can optimally\ncompress the output. At the end, however, it needs to do the best it\ncan with what is left, so that the data will be complete.\n\nIn those cases, you can implement a `_flush` method, which will be\ncalled at the very end, after all the written data is consumed, but\nbefore emitting `end` to signal the end of the readable side. Just\nlike with `_transform`, call `transform.push(chunk)` zero or more\ntimes, as appropriate, and call `callback` when the flush operation is\ncomplete.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n### Example: `SimpleProtocol` parser\n\nThe example above of a simple protocol parser can be implemented much\nmore simply by using the higher level `Transform` stream class.\n\nIn this example, rather than providing the input as an argument, it\nwould be piped into the parser, which is a more idiomatic Node stream\napproach.\n\n```javascript\nfunction SimpleProtocol(options) {\n if (!(this instanceof SimpleProtocol))\n return new SimpleProtocol(options);\n\n Transform.call(this, options);\n this._inBody = false;\n this._sawFirstCr = false;\n this._rawHeader = [];\n this.header = null;\n}\n\nSimpleProtocol.prototype = Object.create(\n Transform.prototype, { constructor: { value: SimpleProtocol }});\n\nSimpleProtocol.prototype._transform = function(chunk, encoding, done) {\n if (!this._inBody) {\n // check if the chunk has a \\n\\n\n var split = -1;\n for (var i = 0; i < chunk.length; i++) {\n if (chunk[i] === 10) { // '\\n'\n if (this._sawFirstCr) {\n split = i;\n break;\n } else {\n this._sawFirstCr = true;\n }\n } else {\n this._sawFirstCr = false;\n }\n }\n\n if (split === -1) {\n // still waiting for the \\n\\n\n // stash the chunk, and try again.\n this._rawHeader.push(chunk);\n } else {\n this._inBody = true;\n var h = chunk.slice(0, split);\n this._rawHeader.push(h);\n var header = Buffer.concat(this._rawHeader).toString();\n try {\n this.header = JSON.parse(header);\n } catch (er) {\n this.emit('error', new Error('invalid simple protocol data'));\n return;\n }\n // and let them know that we are done parsing the header.\n this.emit('header', this.header);\n\n // now, because we got some extra data, emit this first.\n this.push(b);\n }\n } else {\n // from there on, just provide the data to our consumer as-is.\n this.push(b);\n }\n done();\n};\n\nvar parser = new SimpleProtocol();\nsource.pipe(parser)\n\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.\n```\n\n\n## Class: stream.PassThrough\n\nThis is a trivial implementation of a `Transform` stream that simply\npasses the input bytes across to the output. Its purpose is mainly\nfor examples and testing, but there are occasionally use cases where\nit can come in handy.\n\n\n[EventEmitter]: events.html#events_class_events_eventemitter\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/readable-stream/issues" - }, - "homepage": "https://github.com/isaacs/readable-stream", - "_id": "readable-stream@1.0.25", - "_from": "readable-stream@~1.0.17" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/passthrough.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a5..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/readable.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/readable.js deleted file mode 100644 index 4d1ddfc7..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,6 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/transform.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f07..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/writable.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efdf..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/.npmignore b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/LICENCE b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/LICENCE deleted file mode 100644 index a23e08a8..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 Raynos. - -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. \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/Makefile b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/Makefile deleted file mode 100644 index d583fcf4..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -browser: - node ./support/compile - -.PHONY: browser \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/README.md deleted file mode 100644 index 389adae3..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# xtend - -[![browser support][3]][4] - -Extend like a boss - -xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence. - -## Examples - -```js -var extend = require("xtend") - -var combination = extend({ - a: "a" -}, { - b: "b" -}) -// { a: "a", b: "b" } -``` - - -## MIT Licenced - - - [3]: http://ci.testling.com/Raynos/xtend.png - [4]: http://ci.testling.com/Raynos/xtend diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/has-keys.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/has-keys.js deleted file mode 100644 index 62391e78..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/has-keys.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = hasKeys - -function hasKeys(source) { - return source !== null && - (typeof source === "object" || - typeof source === "function") -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/index.js deleted file mode 100644 index 20937d19..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/index.js +++ /dev/null @@ -1,25 +0,0 @@ -var Keys = require("object-keys") -var hasKeys = require("./has-keys") - -module.exports = extend - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - if (!hasKeys(source)) { - continue - } - - var keys = Keys(source) - - for (var j = 0; j < keys.length; j++) { - var name = keys[j] - target[name] = source[name] - } - } - - return target -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/mutable.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/mutable.js deleted file mode 100644 index 17454ae4..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/mutable.js +++ /dev/null @@ -1,25 +0,0 @@ -var Keys = require("object-keys") -var hasKeys = require("./has-keys") - -module.exports = extend - -function extend(target) { - var sources = [].slice.call(arguments, 1) - - for (var i = 0; i < sources.length; i++) { - var source = sources[i] - - if (!hasKeys(source)) { - continue - } - - var keys = Keys(source) - - for (var j = 0; j < keys.length; j++) { - var name = keys[j] - target[name] = source[name] - } - } - - return target -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml deleted file mode 100644 index 60d00ce1..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.8" - - "0.6" diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md deleted file mode 100644 index ab32d0ad..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md +++ /dev/null @@ -1,39 +0,0 @@ -#object-keys <sup>[![Version Badge][2]][1]</sup> - -[![Build Status][3]][4] [![dependency status][5]][6] - -[![browser support][7]][8] - -An Object.keys shim. Uses Object.keys if available. - -## Example - -```js -var keys = require('object-keys'); -var assert = require('assert'); -var obj = { - a: true, - b: true, - c: true -}; - -assert.equal(keys(obj), ['a', 'b', 'c']); -``` - -## Source -Implementation taken directly from [es5-shim]([9]), with modifications, including from [lodash]([10]). - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[1]: https://npmjs.org/package/object-keys -[2]: http://vb.teelaun.ch/ljharb/object-keys.svg -[3]: https://travis-ci.org/ljharb/object-keys.png -[4]: https://travis-ci.org/ljharb/object-keys -[5]: https://david-dm.org/ljharb/object-keys.png -[6]: https://david-dm.org/ljharb/object-keys -[7]: https://ci.testling.com/ljharb/object-keys.png -[8]: https://ci.testling.com/ljharb/object-keys -[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589 -[10]: https://github.com/bestiejs/lodash - diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js deleted file mode 100644 index db32d458..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js +++ /dev/null @@ -1,40 +0,0 @@ -var hasOwn = Object.prototype.hasOwnProperty; -var toString = Object.prototype.toString; - -var isFunction = function (fn) { - var isFunc = (typeof fn === 'function' && !(fn instanceof RegExp)) || toString.call(fn) === '[object Function]'; - if (!isFunc && typeof window !== 'undefined') { - isFunc = fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt; - } - return isFunc; -}; - -module.exports = function forEach(obj, fn) { - if (!isFunction(fn)) { - throw new TypeError('iterator must be a function'); - } - var i, k, - isString = typeof obj === 'string', - l = obj.length, - context = arguments.length > 2 ? arguments[2] : null; - if (l === +l) { - for (i = 0; i < l; i++) { - if (context === null) { - fn(isString ? obj.charAt(i) : obj[i], i, obj); - } else { - fn.call(context, isString ? obj.charAt(i) : obj[i], i, obj); - } - } - } else { - for (k in obj) { - if (hasOwn.call(obj, k)) { - if (context === null) { - fn(obj[k], k, obj); - } else { - fn.call(context, obj[k], k, obj); - } - } - } - } -}; - diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js deleted file mode 100644 index f5b24b6d..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js +++ /dev/null @@ -1,2 +0,0 @@ -module.exports = Object.keys || require('./shim'); - diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js deleted file mode 100644 index 74a09897..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js +++ /dev/null @@ -1,16 +0,0 @@ -var toString = Object.prototype.toString; - -module.exports = function isArguments(value) { - var str = toString.call(value); - var isArguments = str === '[object Arguments]'; - if (!isArguments) { - isArguments = str !== '[object Array]' - && value !== null - && typeof value === 'object' - && typeof value.length === 'number' - && value.length >= 0 - && toString.call(value.callee) === '[object Function]'; - } - return isArguments; -}; - diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json deleted file mode 100644 index 1de9cbb3..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "object-keys", - "version": "0.4.0", - "author": { - "name": "Jordan Harband" - }, - "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/kriskowal/es5-shim", - "license": "MIT", - "main": "index.js", - "scripts": { - "test": "node test/index.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/ljharb/object-keys.git" - }, - "keywords": [ - "Object.keys", - "keys", - "ES5", - "shim" - ], - "dependencies": {}, - "devDependencies": { - "foreach": "~2.0.3", - "is": "~0.2.6", - "tape": "~1.0.4", - "indexof": "~0.0.1" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "readme": "#object-keys <sup>[![Version Badge][2]][1]</sup>\n\n[![Build Status][3]][4] [![dependency status][5]][6]\n\n[![browser support][7]][8]\n\nAn Object.keys shim. Uses Object.keys if available.\n\n## Example\n\n```js\nvar keys = require('object-keys');\nvar assert = require('assert');\nvar obj = {\n\ta: true,\n\tb: true,\n\tc: true\n};\n\nassert.equal(keys(obj), ['a', 'b', 'c']);\n```\n\n## Source\nImplementation taken directly from [es5-shim]([9]), with modifications, including from [lodash]([10]).\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[1]: https://npmjs.org/package/object-keys\n[2]: http://vb.teelaun.ch/ljharb/object-keys.svg\n[3]: https://travis-ci.org/ljharb/object-keys.png\n[4]: https://travis-ci.org/ljharb/object-keys\n[5]: https://david-dm.org/ljharb/object-keys.png\n[6]: https://david-dm.org/ljharb/object-keys\n[7]: https://ci.testling.com/ljharb/object-keys.png\n[8]: https://ci.testling.com/ljharb/object-keys\n[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589\n[10]: https://github.com/bestiejs/lodash\n\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/ljharb/object-keys/issues" - }, - "homepage": "https://github.com/ljharb/object-keys", - "_id": "object-keys@0.4.0", - "_from": "object-keys@~0.4.0" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js deleted file mode 100644 index b88421be..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js +++ /dev/null @@ -1,62 +0,0 @@ -(function () { - "use strict"; - - // modified from https://github.com/kriskowal/es5-shim - var has = Object.prototype.hasOwnProperty, - toString = Object.prototype.toString, - forEach = require('./foreach'), - isArgs = require('./isArguments'), - hasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'), - hasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype'), - dontEnums = [ - "toString", - "toLocaleString", - "valueOf", - "hasOwnProperty", - "isPrototypeOf", - "propertyIsEnumerable", - "constructor" - ], - keysShim; - - keysShim = function keys(object) { - var isObject = object !== null && typeof object === 'object', - isFunction = toString.call(object) === '[object Function]', - isArguments = isArgs(object), - theKeys = []; - - if (!isObject && !isFunction && !isArguments) { - throw new TypeError("Object.keys called on a non-object"); - } - - if (isArguments) { - forEach(object, function (value) { - theKeys.push(value); - }); - } else { - var name, - skipProto = hasProtoEnumBug && isFunction; - - for (name in object) { - if (!(skipProto && name === 'prototype') && has.call(object, name)) { - theKeys.push(name); - } - } - } - - if (hasDontEnumBug) { - var ctor = object.constructor, - skipConstructor = ctor && ctor.prototype === object; - - forEach(dontEnums, function (dontEnum) { - if (!(skipConstructor && dontEnum === 'constructor') && has.call(object, dontEnum)) { - theKeys.push(dontEnum); - } - }); - } - return theKeys; - }; - - module.exports = keysShim; -}()); - diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js deleted file mode 100644 index f29f065a..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js +++ /dev/null @@ -1,156 +0,0 @@ -var test = require('tape'); -var forEach = require('../foreach.js'); - -test('second argument: iterator', function (t) { - var arr = []; - t.throws(function () { forEach(arr); }, TypeError, 'undefined is not a function'); - t.throws(function () { forEach(arr, null); }, TypeError, 'null is not a function'); - t.throws(function () { forEach(arr, ''); }, TypeError, 'string is not a function'); - t.throws(function () { forEach(arr, /a/); }, TypeError, 'regex is not a function'); - t.throws(function () { forEach(arr, true); }, TypeError, 'true is not a function'); - t.throws(function () { forEach(arr, false); }, TypeError, 'false is not a function'); - t.throws(function () { forEach(arr, NaN); }, TypeError, 'NaN is not a function'); - t.throws(function () { forEach(arr, 42); }, TypeError, '42 is not a function'); - t.doesNotThrow(function () { forEach(arr, function () {}); }, 'function is a function'); - t.doesNotThrow(function () { forEach(arr, setTimeout); }, 'setTimeout is a function'); - if (typeof window !== 'undefined') { - t.doesNotThrow(function () { forEach(arr, window.alert); }, 'alert is a function'); - } - t.end(); -}); - -test('array', function (t) { - var arr = [1, 2, 3]; - - t.test('iterates over every item', function (st) { - var index = 0; - forEach(arr, function () { index += 1; }); - st.equal(index, arr.length, 'iterates ' + arr.length + ' times'); - st.end(); - }); - - t.test('first iterator argument', function (st) { - var index = 0; - st.plan(arr.length); - forEach(arr, function (item) { - st.equal(arr[index], item, 'item ' + index + ' is passed as first argument'); - index += 1; - }); - st.end(); - }); - - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(arr.length); - forEach(arr, function (item, index) { - st.equal(counter, index, 'index ' + index + ' is passed as second argument'); - counter += 1; - }); - st.end(); - }); - - t.test('third iterator argument', function (st) { - st.plan(arr.length); - forEach(arr, function (item, index, array) { - st.deepEqual(arr, array, 'array is passed as third argument'); - }); - st.end(); - }); - - t.test('context argument', function (st) { - var context = {}; - st.plan(arr.length); - forEach(arr, function () { - st.equal(this, context, '"this" is the passed context'); - }, context); - st.end(); - }); - - t.end(); -}); - -test('object', function (t) { - var obj = { - a: 1, - b: 2, - c: 3 - }; - var keys = ['a', 'b', 'c']; - - var F = function () { - this.a = 1; - this.b = 2; - }; - F.prototype.c = 3; - var fKeys = ['a', 'b']; - - t.test('iterates over every object literal key', function (st) { - var counter = 0; - forEach(obj, function () { counter += 1; }); - st.equal(counter, keys.length, 'iterated ' + counter + ' times'); - st.end(); - }); - - t.test('iterates only over own keys', function (st) { - var counter = 0; - forEach(new F(), function () { counter += 1; }); - st.equal(counter, fKeys.length, 'iterated ' + fKeys.length + ' times'); - st.end(); - }); - - t.test('first iterator argument', function (st) { - var index = 0; - st.plan(keys.length); - forEach(obj, function (item) { - st.equal(obj[keys[index]], item, 'item at key ' + keys[index] + ' is passed as first argument'); - index += 1; - }); - st.end(); - }); - - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(keys.length); - forEach(obj, function (item, key) { - st.equal(keys[counter], key, 'key ' + key + ' is passed as second argument'); - counter += 1; - }); - st.end(); - }); - - t.test('third iterator argument', function (st) { - st.plan(keys.length); - forEach(obj, function (item, key, object) { - st.deepEqual(obj, object, 'object is passed as third argument'); - }); - st.end(); - }); - - t.test('context argument', function (st) { - var context = {}; - st.plan(1); - forEach({foo: 'bar'}, function () { - st.equal(this, context, '"this" is the passed context'); - }, context); - st.end(); - }); - - t.end(); -}); - - -test('string', function (t) { - var str = 'str'; - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(str.length * 2 + 1); - forEach(str, function (item, index) { - st.equal(counter, index, 'index ' + index + ' is passed as second argument'); - st.equal(str.charAt(index), item); - counter += 1; - }); - st.equal(counter, str.length, 'iterates ' + str.length + ' times'); - }); - t.end(); -}); - diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js deleted file mode 100644 index 8b77b1fc..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js +++ /dev/null @@ -1,6 +0,0 @@ - -require('./foreach'); -require('./isArguments'); - -require('./shim'); - diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js deleted file mode 100644 index 62a07c2d..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js +++ /dev/null @@ -1,10 +0,0 @@ -var test = require('tape'); -var isArguments = require('../isArguments'); - -test('is.arguments', function (t) { - t.notOk(isArguments([]), 'array is not arguments'); - (function () { t.ok(isArguments(arguments), 'arguments is arguments'); }()); - (function () { t.notOk(isArguments(Array.prototype.slice.call(arguments)), 'sliced arguments is not arguments'); }()); - t.end(); -}); - diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js deleted file mode 100644 index 9d932712..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js +++ /dev/null @@ -1,134 +0,0 @@ -var test = require('tape'); -var shimmedKeys = require('../index.js'); -var is = require('is'); -var keys = require('../shim.js'); -var forEach = require('foreach'); -var indexOf = require('indexof'); - -var obj = { - "str": "boz", - "obj": {}, - "arr": [], - "bool": true, - "num": 42, - "aNull": null, - "undef": undefined -}; -var objKeys = ['str', 'obj', 'arr', 'bool', 'num', 'aNull', 'undef']; - -test('exports a function', function (t) { - if (Object.keys) { - t.equal(Object.keys, shimmedKeys, 'Object.keys is supported and exported'); - } else { - t.equal(keys, shimmedKeys, 'Object.keys is not supported; shim is exported'); - } - t.end(); -}); - -test('working with actual shim', function (t) { - t.notEqual(Object.keys, keys, 'keys shim is not native Object.keys'); - t.end(); -}); - -test('works with an object literal', function (t) { - var theKeys = keys(obj); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, objKeys, 'Object has expected keys'); - t.end(); -}); - -test('works with an array', function (t) { - var arr = [1, 2, 3]; - var theKeys = keys(arr); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, ['0', '1', '2'], 'Array has expected keys'); - t.end(); -}); - -test('works with a function', function (t) { - var foo = function () {}; - foo.a = true; - - t.doesNotThrow(function () { return keys(foo); }, 'does not throw an error'); - t.deepEqual(keys(foo), ['a'], 'returns expected keys'); - t.end(); -}); - -test('returns names which are own properties', function (t) { - forEach(keys(obj), function (name) { - t.equal(obj.hasOwnProperty(name), true, name + ' should be returned'); - }); - t.end(); -}); - -test('returns names which are enumerable', function (t) { - var k, loopedValues = []; - for (k in obj) { - loopedValues.push(k); - } - forEach(keys(obj), function (name) { - t.notEqual(indexOf(loopedValues, name), -1, name + ' is not enumerable'); - }); - t.end(); -}); - -test('throws an error for a non-object', function (t) { - t.throws( - function () { return keys(42); }, - new TypeError('Object.keys called on a non-object'), - 'throws on a non-object' - ); - t.end(); -}); - -test('works with an object instance', function (t) { - var Prototype = function () {}; - Prototype.prototype.foo = true; - var obj = new Prototype(); - obj.bar = true; - var theKeys = keys(obj); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, ['bar'], 'Instance has expected keys'); - t.end(); -}); - -test('works in iOS 5 mobile Safari', function (t) { - var Foo = function () {}; - Foo.a = function () {}; - - // the bug is keys(Foo) => ['a', 'prototype'] instead of ['a'] - t.deepEqual(keys(Foo), ['a'], 'has expected keys'); - t.end(); -}); - -test('works in environments with the dontEnum bug (IE < 9)', function (t) { - var Foo = function () {}; - Foo.prototype.a = function () {}; - - // the bug is keys(Foo.prototype) => ['a', 'constructor'] instead of ['a'] - t.deepEqual(keys(Foo.prototype), ['a'], 'has expected keys'); - t.end(); -}); - -test('shadowed properties', function (t) { - var shadowedProps = [ - 'dummyControlProp', /* just to be sure */ - 'constructor', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'toLocaleString', - 'toString', - 'valueOf' - ]; - shadowedProps.sort(); - var shadowedObject = {}; - forEach(shadowedProps, function (value, index) { - shadowedObject[value] = index; - }); - var shadowedObjectKeys = keys(shadowedObject); - shadowedObjectKeys.sort(); - t.deepEqual(shadowedObjectKeys, shadowedProps, 'troublesome shadowed properties are keys of object literals'); - t.end(); -}); - diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/package.json deleted file mode 100644 index c52e4efc..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "xtend", - "version": "2.1.2", - "description": "extend like a boss", - "keywords": [ - "extend", - "merge", - "options", - "opts", - "object", - "array" - ], - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Raynos/xtend.git" - }, - "main": "index", - "scripts": { - "test": "node test" - }, - "dependencies": { - "object-keys": "~0.4.0" - }, - "devDependencies": { - "tape": "~1.1.0" - }, - "homepage": "https://github.com/Raynos/xtend", - "contributors": [ - { - "name": "Jake Verbaten" - }, - { - "name": "Matt Esch" - } - ], - "bugs": { - "url": "https://github.com/Raynos/xtend/issues", - "email": "raynos2@gmail.com" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/raynos/xtend/raw/master/LICENSE" - } - ], - "testling": { - "files": "test.js", - "browsers": [ - "ie/7..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "engines": { - "node": ">=0.4" - }, - "readme": "# xtend\n\n[![browser support][3]][4]\n\nExtend like a boss\n\nxtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence.\n\n## Examples\n\n```js\nvar extend = require(\"xtend\")\n\nvar combination = extend({\n a: \"a\"\n}, {\n b: \"b\"\n})\n// { a: \"a\", b: \"b\" }\n```\n\n\n## MIT Licenced\n\n\n [3]: http://ci.testling.com/Raynos/xtend.png\n [4]: http://ci.testling.com/Raynos/xtend\n", - "readmeFilename": "README.md", - "_id": "xtend@2.1.2", - "_from": "xtend@~2.1.1" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/test.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/test.js deleted file mode 100644 index 3369d796..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/node_modules/xtend/test.js +++ /dev/null @@ -1,63 +0,0 @@ -var test = require("tape") -var extend = require("./") -var mutableExtend = require("./mutable") - -test("merge", function(assert) { - var a = { a: "foo" } - var b = { b: "bar" } - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("replace", function(assert) { - var a = { a: "foo" } - var b = { a: "bar" } - - assert.deepEqual(extend(a, b), { a: "bar" }) - assert.end() -}) - -test("undefined", function(assert) { - var a = { a: undefined } - var b = { b: "foo" } - - assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) - assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) - assert.end() -}) - -test("handle 0", function(assert) { - var a = { a: "default" } - var b = { a: 0 } - - assert.deepEqual(extend(a, b), { a: 0 }) - assert.deepEqual(extend(b, a), { a: "default" }) - assert.end() -}) - -test("is immutable", function (assert) { - var record = {} - - extend(record, { foo: "bar" }) - assert.equal(record.foo, undefined) - assert.end() -}) - -test("null as argument", function (assert) { - var a = { foo: "bar" } - var b = null - var c = void 0 - - assert.deepEqual(extend(b, a, c), { foo: "bar" }) - assert.end() -}) - -test("mutable", function (assert) { - var a = { foo: "bar" } - - mutableExtend(a, { bar: "baz" }) - - assert.equal(a.bar, "baz") - assert.end() -}) diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/package.json deleted file mode 100644 index 3d0e0c8b..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "through2", - "version": "0.4.1", - "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", - "main": "through2.js", - "scripts": { - "test": "node test/test.js", - "test-local": "brtapsauce-local test/basic-test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/rvagg/through2.git" - }, - "keywords": [ - "stream", - "streams2", - "through", - "transform" - ], - "author": { - "name": "Rod Vagg", - "email": "r@va.gg", - "url": "https://github.com/rvagg" - }, - "license": "MIT", - "dependencies": { - "readable-stream": "~1.0.17", - "xtend": "~2.1.1" - }, - "devDependencies": { - "tape": "~2.3.0", - "bl": "~0.6.0", - "stream-spigot": "~3.0.1", - "brtapsauce": "~0.2.2" - }, - "readme": "# through2\n\n<!--\n\nsoon ...\n\n[![Build Status](https://secure.travis-ci.org/rvagg/through2.png)](http://travis-ci.org/rvagg/through2)\n\n[![Build Status](https://saucelabs.com/browser-matrix/through2-sauce.svg)](https://travis-ci.org/rvagg/through2)\n\n-->\n\n[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/) \n\n<!--\nnot happy with these, we need to peg to readable-stream@1.0.x so it'll always report out-of-date\n\n[![david-dm](https://david-dm.org/rvagg/through2.png)](https://david-dm.org/rvagg/through2/)\n[![david-dm](https://david-dm.org/rvagg/through2/dev-status.png)](https://david-dm.org/rvagg/through2#info=devDependencies/)\n-->\n\n**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise**\n\nInspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.\n\n```js\nfs.createReadStream('ex.txt')\n .pipe(through2(function (chunk, enc, callback) {\n\n for (var i = 0; i < chunk.length; i++)\n if (chunk[i] == 97)\n chunk[i] = 122 // swap 'a' for 'z'\n\n this.push(chunk)\n \n callback()\n\n }))\n .pipe(fs.createWriteStream('out.txt'))\n```\n\nOr object streams:\n\n```js\nvar all = []\n\nfs.createReadStream('data.csv')\n .pipe(csv2())\n .pipe(through2.obj(function (chunk, enc, callback) {\n\n var data = {\n name : chunk[0]\n , address : chunk[3]\n , phone : chunk[10]\n }\n \n this.push(data)\n \n callback()\n\n }))\n .on('data', function (data) {\n all.push(data)\n })\n .on('end', function () {\n doSomethingSpecial(all)\n })\n```\n\nNote that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`.\n\n## API\n\n<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b>\n\nConsult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).\n\n### options\n\nThe options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`).\n\nThe `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call:\n\n```js\nfs.createReadStream('/tmp/important.dat')\n .pipe(through2({ objectMode: true, allowHalfOpen: false }, function (chunk, enc, cb) {\n\n this.push(new Buffer('wut?'))\n cb()\n\n })\n .pipe(fs.createWriteStream('/tmp/wut.txt'))\n```\n\n### transformFunction\n\nThe `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk.\n\nTo queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on.\n\nIf you **do not provide a `transformFunction`** then you will get a simple simple pass-through stream.\n\n### flushFunction\n\nThe optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress.\n\n<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b>\n\nInstead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.\n\n```js\nvar FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) {\n if (record.temp != null && record.unit = \"F\") {\n record.temp = ( ( record.temp - 32 ) * 5 ) / 9\n record.unit = \"C\"\n }\n this.push(record)\n callback()\n})\n\n// Create instances of FToC like so:\nvar converter = new FToC()\n// Or:\nvar converter = FToC()\n// Or specify/override options when you instantiate, if you prefer:\nvar converter = FToC({objectMode: true})\n```\n\n## License\n\n**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/rvagg/through2/issues" - }, - "homepage": "https://github.com/rvagg/through2", - "_id": "through2@0.4.1", - "_from": "through2@~0.4.0" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/test/basic-test.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/test/basic-test.js deleted file mode 100644 index 9d137c7f..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/test/basic-test.js +++ /dev/null @@ -1,334 +0,0 @@ -const test = require('tape') - , through2 = require('../') - , crypto = require('crypto') - , bl = require('bl') - , spigot = require('stream-spigot') - -test('plain through', function (t) { - var th2 = through2(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') - t.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('pipeable through', function (t) { - var th2 = through2(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - // bl() acts like a proper streams2 stream and passes as much as it's - // asked for, so we really only get one write with such a small amount - // of data - t.equal(s, 'aaaaaaaaaaaaaaaaaaaaaaaaa', 'got transformed string') - t.end() - })) - - var bufs = bl() - bufs.append(crypto.randomBytes(10)) - bufs.append(crypto.randomBytes(5)) - bufs.append(crypto.randomBytes(10)) - bufs.pipe(th2) -}) - -test('object through', function (t) { - t.plan(3) - - var th2 = through2({ objectMode: true}, function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object through with through2.obj', function (t) { - t.plan(3) - - var th2 = through2.obj(function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('flushing through', function (t) { - var th2 = through2(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }, function (callback) { - this.push(new Buffer([ 101, 110, 100 ])) - callback() - }) - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal(s, 'aaaaaaaaaabbbbbccccccccccend', 'got transformed string') - t.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('plain through ctor', function (t) { - var Th2 = through2.ctor(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - var th2 = new Th2() - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') - t.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('reuse through ctor', function (t) { - t.plan(4) - - var Th2 = through2.ctor(function (chunk, enc, callback) { - if (!this._i) { - t.ok(1, 'did not contain previous instance data (this._i)') - this._i = 97 // 'a' - } else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - var th2 = Th2() - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') - - var newInstance = Th2() - newInstance.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaabbbbccccccc', s, 'got transformed string') - })) - - newInstance.write(crypto.randomBytes(7)) - newInstance.write(crypto.randomBytes(4)) - newInstance.write(crypto.randomBytes(7)) - newInstance.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('object through ctor', function (t) { - t.plan(3) - - var Th2 = through2.ctor({ objectMode: true}, function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = new Th2() - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('pipeable object through ctor', function (t) { - t.plan(4) - - var Th2 = through2.ctor({ objectMode: true}, function (record, enc, callback) { - if (record.temp != null && record.unit == 'F') { - record.temp = ( ( record.temp - 32 ) * 5 ) / 9 - record.unit = 'C' - } - this.push(record) - callback() - }) - - var th2 = Th2() - - var expect = [-19, -40, 100, 22] - th2.on('data', function (o) { - t.deepEqual(o, { temp: expect.shift(), unit: 'C' }, 'got transformed object') - }) - - spigot({objectMode: true}, [ - {temp: -2.2, unit: 'F'}, - {temp: -40, unit: 'F'}, - {temp: 212, unit: 'F'}, - {temp: 22, unit: 'C'} - ]).pipe(th2) -}) - -test('object through ctor override', function (t) { - t.plan(3) - - var Th2 = through2.ctor(function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2({objectMode: true}) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object settings available in transform', function (t) { - t.plan(6) - - var Th2 = through2.ctor({objectMode: true, peek: true}, function (chunk, enc, callback) { - t.ok(this.options.peek, "reading options from inside _transform") - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2() - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object settings available in transform override', function (t) { - t.plan(6) - - var Th2 = through2.ctor(function (chunk, enc, callback) { - t.ok(this.options.peek, "reading options from inside _transform") - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2({objectMode: true, peek: true}) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object override extends options', function (t) { - t.plan(6) - - var Th2 = through2.ctor({objectMode: true}, function (chunk, enc, callback) { - t.ok(this.options.peek, "reading options from inside _transform") - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2({peek: true}) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/test/bench.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/test/bench.js deleted file mode 100644 index cc10868b..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/test/bench.js +++ /dev/null @@ -1,42 +0,0 @@ -/* -on rvagg@fletcher: - @0.2.3: Ran 36719 iterations in 10000 ms -*/ - -const through2 = require('../') - , bl = require('bl') - , crypto = require('crypto') - , assert = require('assert') - -function run (callback) { - var bufs = Array.apply(null, Array(10)).map(function () { return crypto.randomBytes(32) }) - , stream = through2(function (chunk, env, callback) { - callback(null, chunk.toString('hex')) - }) - - stream.pipe(bl(function (err, data) { - assert(!err) - assert.equal(data.toString(), Buffer.concat(bufs).toString('hex')) - callback() - })) - - bufs.forEach(function (b) { - stream.write(b) - }) - stream.end() -} - -var count = 0 - , start = Date.now() - -;(function exec () { - count++ - run(function () { - if (Date.now() - start < 1000 * 10) { - return setImmediate(exec) - } - console.log('Ran', count, 'iterations in', Date.now() - start, 'ms') - }) -}()) - -console.log('Running for ~10s') \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/test/sauce.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/test/sauce.js deleted file mode 100644 index a6d28625..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/test/sauce.js +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env node - -const user = process.env.SAUCE_USER - , key = process.env.SAUCE_KEY - , path = require('path') - , brtapsauce = require('brtapsauce') - , testFile = path.join(__dirname, 'basic-test.js') - - , capabilities = [ - { browserName: 'chrome' , platform: 'Windows XP', version: '' } - , { browserName: 'firefox' , platform: 'Windows 8' , version: '' } - , { browserName: 'firefox' , platform: 'Windows XP', version: '4' } - , { browserName: 'internet explorer' , platform: 'Windows 8' , version: '10' } - , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '9' } - , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '8' } - , { browserName: 'internet explorer' , platform: 'Windows XP', version: '7' } - , { browserName: 'internet explorer' , platform: 'Windows XP', version: '6' } - , { browserName: 'safari' , platform: 'Windows 7' , version: '5' } - , { browserName: 'safari' , platform: 'OS X 10.8' , version: '6' } - , { browserName: 'opera' , platform: 'Windows 7' , version: '' } - , { browserName: 'opera' , platform: 'Windows 7' , version: '11' } - , { browserName: 'ipad' , platform: 'OS X 10.8' , version: '6' } - , { browserName: 'android' , platform: 'Linux' , version: '4.0', 'device-type': 'tablet' } - ] - -if (!user) - throw new Error('Must set a SAUCE_USER env var') -if (!key) - throw new Error('Must set a SAUCE_KEY env var') - -brtapsauce({ - name : 'Traversty' - , user : user - , key : key - , brsrc : testFile - , capabilities : capabilities - , options : { timeout: 60 * 6 } -}) \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/test/test.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/test/test.js deleted file mode 100644 index aa9b4877..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/test/test.js +++ /dev/null @@ -1,9 +0,0 @@ -require('./basic-test') - -if (!process.env.SAUCE_KEY || !process.env.SAUCE_USER) - return console.log('SAUCE_KEY and/or SAUCE_USER not set, not running sauce tests') - -if (!/v0\.10/.test(process.version)) - return console.log('Not Node v0.10.x, not running sauce tests') - -require('./sauce.js') \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/through2.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/through2.js deleted file mode 100644 index c1104848..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/through2/through2.js +++ /dev/null @@ -1,78 +0,0 @@ -var Transform = require('readable-stream/transform') - , inherits = require('util').inherits - , xtend = require('xtend') - - -// a noop _transform function -function noop (chunk, enc, callback) { - callback(null, chunk) -} - - -// create a new export function, used by both the main export and -// the .ctor export, contains common logic for dealing with arguments -function through2 (construct) { - return function (options, transform, flush) { - if (typeof options == 'function') { - flush = transform - transform = options - options = {} - } - - if (typeof transform != 'function') - transform = noop - - if (typeof flush != 'function') - flush = null - - return construct(options, transform, flush) - } -} - - -// main export, just make me a transform stream! -module.exports = through2(function (options, transform, flush) { - var t2 = new Transform(options) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) - - -// make me a reusable prototype that I can `new`, or implicitly `new` -// with a constructor call -module.exports.ctor = through2(function (options, transform, flush) { - function Through2 (override) { - if (!(this instanceof Through2)) - return new Through2(override) - - this.options = xtend(options, override) - - Transform.call(this, this.options) - } - - inherits(Through2, Transform) - - Through2.prototype._transform = transform - - if (flush) - Through2.prototype._flush = flush - - return Through2 -}) - - -module.exports.obj = through2(function (options, transform, flush) { - var t2 = new Transform(xtend({ objectMode: true }, options)) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/.npmignore b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/.npmignore deleted file mode 100644 index b5ef13a3..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -.DS_Store -*.log -node_modules -build -*.node -components \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/.travis.yml b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/.travis.yml deleted file mode 100644 index 33ad9f8c..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.9" - - "0.10" -after_script: - - npm run coveralls \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/LICENSE b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/LICENSE deleted file mode 100755 index 4f482f9b..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013 Fractal <contact@wearefractal.com> - -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/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/README.md deleted file mode 100644 index 3f97efc5..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/README.md +++ /dev/null @@ -1,123 +0,0 @@ -# vinyl [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl) - - -## Information - -<table> -<tr> -<td>Package</td><td>vinyl</td> -</tr> -<tr> -<td>Description</td> -<td>A virtual file format</td> -</tr> -<tr> -<td>Node Version</td> -<td>>= 0.9</td> -</tr> -</table> - -## File - -```javascript -var File = require('vinyl'); - -var coffeeFile = new File({ - cwd: "/", - base: "/test/", - path: "/test/file.coffee" - contents: new Buffer("test = 123") -}); -``` - -### constructor(options) - -#### options.cwd - -Type: `String` -Default: `process.cwd()` - -#### options.base - -Used for relative pathing. Typically where a glob starts. - -Type: `String` -Default: `options.cwd` - -#### options.path - -Full path to the file. - -Type: `String` -Default: `null` - -#### options.stat - -The result of an fs.stat call. See [fs.Stats](http://nodejs.org/api/fs.html#fs_class_fs_stats) for more information. - -Type: `fs.Stats` -Default: `null` - -#### options.contents - -File contents. - -Type: `Buffer, Stream, or null` -Default: `null` - -### isBuffer() - -Returns true if file.contents is a Buffer. - -### isStream() - -Returns true if file.contents is a Stream. - -### isNull() - -Returns true if file.contents is null. - -### clone() - -Returns a new File object with all attributes cloned. - -### pipe(stream[, opt]) - -If file.contents is a Buffer, it will write it to the stream. - -If file.contents is a Stream, it will pipe it to the stream. - -If file.contents is null, it will do nothing. - -If opt.end is true, the destination stream will not be ended (same as node core). - -Returns the stream. - -### inspect() - -Returns a pretty String interpretation of the File. Useful for console.log. - -### relative - -Returns path.relative for the file base and file path. - -Example: - -```javascript -var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/file.coffee" -}); - -console.log(file.relative); // file.coffee -``` - -[npm-url]: https://npmjs.org/package/vinyl -[npm-image]: https://badge.fury.io/js/vinyl.png -[travis-url]: https://travis-ci.org/wearefractal/vinyl -[travis-image]: https://travis-ci.org/wearefractal/vinyl.png?branch=master -[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl -[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl/badge.png -[depstat-url]: https://david-dm.org/wearefractal/vinyl -[depstat-image]: https://david-dm.org/wearefractal/vinyl.png \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/index.js deleted file mode 100644 index 97f5c752..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/index.js +++ /dev/null @@ -1,128 +0,0 @@ -var path = require('path'); - -var cloneStats = require('clone-stats'); - -var isBuffer = require('./lib/isBuffer'); -var isStream = require('./lib/isStream'); -var isNull = require('./lib/isNull'); -var inspectStream = require('./lib/inspectStream'); -var cloneBuffer = require('./lib/cloneBuffer'); - -function File(file) { - if (!file) file = {}; - - // TODO: should this be moved to vinyl-fs? - this.cwd = file.cwd || process.cwd(); - this.base = file.base || this.cwd; - - this.path = file.path || null; - - // stat = fs stats object - // TODO: should this be moved to vinyl-fs? - this.stat = file.stat || null; - - // contents = stream, buffer, or null if not read - this.contents = file.contents || null; -} - -File.prototype.isBuffer = function() { - return isBuffer(this.contents); -}; - -File.prototype.isStream = function() { - return isStream(this.contents); -}; - -File.prototype.isNull = function() { - return isNull(this.contents); -}; - -// TODO: should this be moved to vinyl-fs? -File.prototype.isDirectory = function() { - return this.isNull() && this.stat && this.stat.isDirectory(); -}; - -File.prototype.clone = function() { - var clonedContents = this.isBuffer() ? cloneBuffer(this.contents) : this.contents; - var clonedStat = this.stat ? cloneStats(this.stat) : null; - - return new File({ - cwd: this.cwd, - base: this.base, - path: this.path, - stat: clonedStat, - contents: clonedContents - }); -}; - -File.prototype.pipe = function(stream, opt) { - if (!opt) opt = {}; - if (typeof opt.end === 'undefined') opt.end = true; - - if (this.isStream()) { - return this.contents.pipe(stream, opt); - } - if (this.isBuffer()) { - if (opt.end) { - stream.end(this.contents); - } else { - stream.write(this.contents); - } - return stream; - } - if (this.isNull()) { - if (opt.end) stream.end(); - return stream; - } - - return stream; -}; - -File.prototype.inspect = function() { - var inspect = []; - - // use relative path if possible - var filePath = (this.base && this.path) ? this.relative : this.path; - - if (filePath) { - inspect.push('"'+filePath+'"'); - } - - if (this.isBuffer()) { - inspect.push(this.contents.inspect()); - } - - if (this.isStream()) { - inspect.push(inspectStream(this.contents)); - } - - return '<File '+inspect.join(' ')+'>'; -}; - -// virtual attributes -// or stuff with extra logic -Object.defineProperty(File.prototype, 'contents', { - get: function() { - return this._contents; - }, - set: function(val) { - if (!isBuffer(val) && !isStream(val) && !isNull(val)) { - throw new Error("File.contents can only be a Buffer, a Stream, or null."); - } - this._contents = val; - } -}); - -// TODO: should this be moved to vinyl-fs? -Object.defineProperty(File.prototype, 'relative', { - get: function() { - if (!this.base) throw new Error('No base specified! Can not get relative.'); - if (!this.path) throw new Error('No path specified! Can not get relative.'); - return path.relative(this.base, this.path); - }, - set: function() { - throw new Error('File.relative is generated from the base and path attributes. Do not modify it.'); - } -}); - -module.exports = File; diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js deleted file mode 100644 index 3a861f22..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js +++ /dev/null @@ -1,7 +0,0 @@ -var Buffer = require('buffer').Buffer; - -module.exports = function(buf) { - var out = new Buffer(buf.length); - buf.copy(out); - return out; -}; \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js deleted file mode 100644 index 2c906789..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js +++ /dev/null @@ -1,12 +0,0 @@ -var Stream = require('stream').Stream; -var isStream = require('./isStream'); - -module.exports = function(stream) { - if (!isStream(stream)) return; - - var streamType = stream.constructor.name; - // avoid StreamStream - if (streamType === 'Stream') streamType = ''; - - return '<'+streamType+'Stream>'; -}; \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js deleted file mode 100644 index 0e23782c..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js +++ /dev/null @@ -1,7 +0,0 @@ -var buf = require('buffer'); -var Buffer = buf.Buffer; - -// could use Buffer.isBuffer but this is the same exact thing... -module.exports = function(o) { - return typeof o === 'object' && o instanceof Buffer; -}; \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js deleted file mode 100644 index 403bb30e..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function(v) { - return v === null; -}; \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/lib/isStream.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/lib/isStream.js deleted file mode 100644 index 9ce0929b..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/lib/isStream.js +++ /dev/null @@ -1,5 +0,0 @@ -var Stream = require('stream').Stream; - -module.exports = function(o) { - return !!o && o instanceof Stream; -}; \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/LICENSE.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/LICENSE.md deleted file mode 100644 index 146cb32a..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -## The MIT License (MIT) ## - -Copyright (c) 2014 Hugh Kennedy - -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/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/README.md b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/README.md deleted file mode 100644 index 8b12b6fa..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# clone-stats [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/clone-stats&title=clone-stats&description=hughsk/clone-stats%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) # - -Safely clone node's -[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) instances without -losing their class methods, i.e. `stat.isDirectory()` and co. - -## Usage ## - -[![clone-stats](https://nodei.co/npm/clone-stats.png?mini=true)](https://nodei.co/npm/clone-stats) - -### `copy = require('clone-stats')(stat)` ### - -Returns a clone of the original `fs.Stats` instance (`stat`). - -## License ## - -MIT. See [LICENSE.md](http://github.com/hughsk/clone-stats/blob/master/LICENSE.md) for details. diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/index.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/index.js deleted file mode 100644 index e797cfe6..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/index.js +++ /dev/null @@ -1,13 +0,0 @@ -var Stat = require('fs').Stats - -module.exports = cloneStats - -function cloneStats(stats) { - var replacement = new Stat - - Object.keys(stats).forEach(function(key) { - replacement[key] = stats[key] - }) - - return replacement -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json deleted file mode 100644 index f7dc15d9..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "clone-stats", - "description": "Safely clone node's fs.Stats instances without losing their class methods", - "version": "0.0.1", - "main": "index.js", - "browser": "index.js", - "dependencies": {}, - "devDependencies": { - "tape": "~2.3.2" - }, - "scripts": { - "test": "node test" - }, - "author": { - "name": "Hugh Kennedy", - "email": "hughskennedy@gmail.com", - "url": "http://hughsk.io/" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/hughsk/clone-stats" - }, - "bugs": { - "url": "https://github.com/hughsk/clone-stats/issues" - }, - "homepage": "https://github.com/hughsk/clone-stats", - "keywords": [ - "stats", - "fs", - "clone", - "copy", - "prototype" - ], - "readme": "# clone-stats [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/clone-stats&title=clone-stats&description=hughsk/clone-stats%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #\n\nSafely clone node's\n[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) instances without\nlosing their class methods, i.e. `stat.isDirectory()` and co.\n\n## Usage ##\n\n[![clone-stats](https://nodei.co/npm/clone-stats.png?mini=true)](https://nodei.co/npm/clone-stats)\n\n### `copy = require('clone-stats')(stat)` ###\n\nReturns a clone of the original `fs.Stats` instance (`stat`).\n\n## License ##\n\nMIT. See [LICENSE.md](http://github.com/hughsk/clone-stats/blob/master/LICENSE.md) for details.\n", - "readmeFilename": "README.md", - "_id": "clone-stats@0.0.1", - "_from": "clone-stats@~0.0.1" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/test.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/test.js deleted file mode 100644 index e4bb2814..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/test.js +++ /dev/null @@ -1,36 +0,0 @@ -var test = require('tape') -var clone = require('./') -var fs = require('fs') - -test('file', function(t) { - compare(t, fs.statSync(__filename)) - t.end() -}) - -test('directory', function(t) { - compare(t, fs.statSync(__dirname)) - t.end() -}) - -function compare(t, stat) { - var copy = clone(stat) - - t.deepEqual(stat, copy, 'clone has equal properties') - t.ok(stat instanceof fs.Stats, 'original is an fs.Stat') - t.ok(copy instanceof fs.Stats, 'copy is an fs.Stat') - - ;['isDirectory' - , 'isFile' - , 'isBlockDevice' - , 'isCharacterDevice' - , 'isSymbolicLink' - , 'isFIFO' - , 'isSocket' - ].forEach(function(method) { - t.equal( - stat[method].call(stat) - , copy[method].call(copy) - , 'equal value for stat.' + method + '()' - ) - }) -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/package.json deleted file mode 100644 index 4ef0f631..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "vinyl", - "description": "A virtual file format", - "version": "0.2.3", - "homepage": "http://github.com/wearefractal/vinyl", - "repository": { - "type": "git", - "url": "git://github.com/wearefractal/vinyl.git" - }, - "author": { - "name": "Fractal", - "email": "contact@wearefractal.com", - "url": "http://wearefractal.com/" - }, - "main": "./index.js", - "dependencies": { - "clone-stats": "~0.0.1" - }, - "devDependencies": { - "mocha": "~1.17.0", - "should": "~2.1.1", - "mocha-lcov-reporter": "0.0.1", - "coveralls": "~2.6.1", - "istanbul": "~0.2.3", - "rimraf": "~2.2.5", - "jshint": "~2.4.1", - "buffer-equal": "0.0.0", - "lodash.templatesettings": "~2.4.1", - "event-stream": "~3.1.0" - }, - "scripts": { - "test": "mocha --reporter spec && jshint", - "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage" - }, - "engines": { - "node": ">= 0.9" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/wearefractal/vinyl/raw/master/LICENSE" - } - ], - "readme": "# vinyl [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl)\n\n\n## Information\n\n<table>\n<tr> \n<td>Package</td><td>vinyl</td>\n</tr>\n<tr>\n<td>Description</td>\n<td>A virtual file format</td>\n</tr>\n<tr>\n<td>Node Version</td>\n<td>>= 0.9</td>\n</tr>\n</table>\n\n## File\n\n```javascript\nvar File = require('vinyl');\n\nvar coffeeFile = new File({\n cwd: \"/\",\n base: \"/test/\",\n path: \"/test/file.coffee\"\n contents: new Buffer(\"test = 123\")\n});\n```\n\n### constructor(options)\n\n#### options.cwd\n\nType: `String` \nDefault: `process.cwd()`\n\n#### options.base\n\nUsed for relative pathing. Typically where a glob starts.\n\nType: `String` \nDefault: `options.cwd`\n\n#### options.path\n\nFull path to the file.\n\nType: `String` \nDefault: `null`\n\n#### options.stat\n\nThe result of an fs.stat call. See [fs.Stats](http://nodejs.org/api/fs.html#fs_class_fs_stats) for more information.\n\nType: `fs.Stats` \nDefault: `null`\n\n#### options.contents\n\nFile contents.\n\nType: `Buffer, Stream, or null` \nDefault: `null`\n\n### isBuffer()\n\nReturns true if file.contents is a Buffer.\n\n### isStream()\n\nReturns true if file.contents is a Stream.\n\n### isNull()\n\nReturns true if file.contents is null.\n\n### clone()\n\nReturns a new File object with all attributes cloned.\n\n### pipe(stream[, opt])\n\nIf file.contents is a Buffer, it will write it to the stream.\n\nIf file.contents is a Stream, it will pipe it to the stream.\n\nIf file.contents is null, it will do nothing.\n\nIf opt.end is true, the destination stream will not be ended (same as node core).\n\nReturns the stream.\n\n### inspect()\n\nReturns a pretty String interpretation of the File. Useful for console.log.\n\n### relative\n\nReturns path.relative for the file base and file path.\n\nExample:\n\n```javascript\nvar file = new File({\n cwd: \"/\",\n base: \"/test/\",\n path: \"/test/file.coffee\"\n});\n\nconsole.log(file.relative); // file.coffee\n```\n\n[npm-url]: https://npmjs.org/package/vinyl\n[npm-image]: https://badge.fury.io/js/vinyl.png\n[travis-url]: https://travis-ci.org/wearefractal/vinyl\n[travis-image]: https://travis-ci.org/wearefractal/vinyl.png?branch=master\n[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl\n[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl/badge.png\n[depstat-url]: https://david-dm.org/wearefractal/vinyl\n[depstat-image]: https://david-dm.org/wearefractal/vinyl.png", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/wearefractal/vinyl/issues" - }, - "_id": "vinyl@0.2.3", - "_from": "vinyl@~0.2.1" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/test/File.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/test/File.js deleted file mode 100644 index 1f2a83a0..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/test/File.js +++ /dev/null @@ -1,540 +0,0 @@ -var File = require('../'); -var Stream = require('stream'); -var fs = require('fs'); - -var should = require('should'); -require('mocha'); - -describe('File', function() { - - describe('constructor()', function() { - it('should default cwd to process.cwd', function(done) { - var file = new File(); - file.cwd.should.equal(process.cwd()); - done(); - }); - - it('should default base to cwd', function(done) { - var cwd = "/"; - var file = new File({cwd: cwd}); - file.base.should.equal(cwd); - done(); - }); - - it('should default base to cwd even when none is given', function(done) { - var file = new File(); - file.base.should.equal(process.cwd()); - done(); - }); - - it('should default path to null', function(done) { - var file = new File(); - should.not.exist(file.path); - done(); - }); - - it('should default stat to null', function(done) { - var file = new File(); - should.not.exist(file.stat); - done(); - }); - - it('should default contents to null', function(done) { - var file = new File(); - should.not.exist(file.contents); - done(); - }); - - it('should set base to given value', function(done) { - var val = "/"; - var file = new File({base: val}); - file.base.should.equal(val); - done(); - }); - - it('should set cwd to given value', function(done) { - var val = "/"; - var file = new File({cwd: val}); - file.cwd.should.equal(val); - done(); - }); - - it('should set path to given value', function(done) { - var val = "/test.coffee"; - var file = new File({path: val}); - file.path.should.equal(val); - done(); - }); - - it('should set stat to given value', function(done) { - var val = {}; - var file = new File({stat: val}); - file.stat.should.equal(val); - done(); - }); - - it('should set contents to given value', function(done) { - var val = new Buffer("test"); - var file = new File({contents: val}); - file.contents.should.equal(val); - done(); - }); - }); - - describe('isBuffer()', function() { - it('should return true when the contents are a Buffer', function(done) { - var val = new Buffer("test"); - var file = new File({contents: val}); - file.isBuffer().should.equal(true); - done(); - }); - - it('should return false when the contents are a Stream', function(done) { - var val = new Stream(); - var file = new File({contents: val}); - file.isBuffer().should.equal(false); - done(); - }); - - it('should return false when the contents are a null', function(done) { - var file = new File({contents: null}); - file.isBuffer().should.equal(false); - done(); - }); - }); - - describe('isStream()', function() { - it('should return false when the contents are a Buffer', function(done) { - var val = new Buffer("test"); - var file = new File({contents: val}); - file.isStream().should.equal(false); - done(); - }); - - it('should return true when the contents are a Stream', function(done) { - var val = new Stream(); - var file = new File({contents: val}); - file.isStream().should.equal(true); - done(); - }); - - it('should return false when the contents are a null', function(done) { - var file = new File({contents: null}); - file.isStream().should.equal(false); - done(); - }); - }); - - describe('isNull()', function() { - it('should return false when the contents are a Buffer', function(done) { - var val = new Buffer("test"); - var file = new File({contents: val}); - file.isNull().should.equal(false); - done(); - }); - - it('should return false when the contents are a Stream', function(done) { - var val = new Stream(); - var file = new File({contents: val}); - file.isNull().should.equal(false); - done(); - }); - - it('should return true when the contents are a null', function(done) { - var file = new File({contents: null}); - file.isNull().should.equal(true); - done(); - }); - }); - - describe('isDirectory()', function() { - var fakeStat = { - isDirectory: function() { - return true; - } - }; - - it('should return false when the contents are a Buffer', function(done) { - var val = new Buffer("test"); - var file = new File({contents: val, stat: fakeStat}); - file.isDirectory().should.equal(false); - done(); - }); - - it('should return false when the contents are a Stream', function(done) { - var val = new Stream(); - var file = new File({contents: val, stat: fakeStat}); - file.isDirectory().should.equal(false); - done(); - }); - - it('should return true when the contents are a null', function(done) { - var file = new File({contents: null, stat: fakeStat}); - file.isDirectory().should.equal(true); - done(); - }); - }); - - describe('clone()', function() { - it('should copy all attributes over with Buffer', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Buffer("test") - }; - var file = new File(options); - var file2 = file.clone(); - - file2.should.not.equal(file, 'refs should be different'); - file2.cwd.should.equal(file.cwd); - file2.base.should.equal(file.base); - file2.path.should.equal(file.path); - file2.contents.should.not.equal(file.contents, 'buffer ref should be different'); - file2.contents.toString('utf8').should.equal(file.contents.toString('utf8')); - done(); - }); - - it('should copy all attributes over with Stream', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Stream() - }; - var file = new File(options); - var file2 = file.clone(); - - file2.should.not.equal(file, 'refs should be different'); - file2.cwd.should.equal(file.cwd); - file2.base.should.equal(file.base); - file2.path.should.equal(file.path); - file2.contents.should.equal(file.contents, 'stream ref should be the same'); - done(); - }); - - it('should copy all attributes over with null', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: null - }; - var file = new File(options); - var file2 = file.clone(); - - file2.should.not.equal(file, 'refs should be different'); - file2.cwd.should.equal(file.cwd); - file2.base.should.equal(file.base); - file2.path.should.equal(file.path); - should.not.exist(file2.contents); - done(); - }); - - it('should properly clone the `stat` property', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.js", - contents: new Buffer("test"), - stat: fs.statSync(__filename) - }; - - var file = new File(options); - var copy = file.clone(); - - copy.stat.isFile().should.be.true; - copy.stat.isDirectory().should.be.false; - should(file.stat instanceof fs.Stats).be.true; - should(copy.stat instanceof fs.Stats).be.true; - - done(); - }); - }); - - describe('pipe()', function() { - it('should write to stream with Buffer', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Buffer("test") - }; - var file = new File(options); - var stream = new Stream.PassThrough(); - stream.on('data', function(chunk) { - should.exist(chunk); - (chunk instanceof Buffer).should.equal(true, 'should write as a buffer'); - chunk.toString('utf8').should.equal(options.contents.toString('utf8')); - }); - stream.on('end', function(chunk) { - done(); - }); - var ret = file.pipe(stream); - ret.should.equal(stream, 'should return the stream'); - }); - - it('should pipe to stream with Stream', function(done) { - var testChunk = new Buffer("test"); - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Stream.PassThrough() - }; - var file = new File(options); - var stream = new Stream.PassThrough(); - stream.on('data', function(chunk) { - should.exist(chunk); - (chunk instanceof Buffer).should.equal(true, 'should write as a buffer'); - chunk.toString('utf8').should.equal(testChunk.toString('utf8')); - done(); - }); - var ret = file.pipe(stream); - ret.should.equal(stream, 'should return the stream'); - - file.contents.write(testChunk); - }); - - it('should do nothing with null', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: null - }; - var file = new File(options); - var stream = new Stream.PassThrough(); - stream.on('data', function(chunk) { - throw new Error("should not write"); - }); - stream.on('end', function() { - done(); - }); - var ret = file.pipe(stream); - ret.should.equal(stream, 'should return the stream'); - }); - - it('should write to stream with Buffer', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Buffer("test") - }; - var file = new File(options); - var stream = new Stream.PassThrough(); - stream.on('data', function(chunk) { - should.exist(chunk); - (chunk instanceof Buffer).should.equal(true, 'should write as a buffer'); - chunk.toString('utf8').should.equal(options.contents.toString('utf8')); - done(); - }); - stream.on('end', function(chunk) { - throw new Error("should not end"); - }); - var ret = file.pipe(stream, {end: false}); - ret.should.equal(stream, 'should return the stream'); - }); - - it('should pipe to stream with Stream', function(done) { - var testChunk = new Buffer("test"); - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Stream.PassThrough() - }; - var file = new File(options); - var stream = new Stream.PassThrough(); - stream.on('data', function(chunk) { - should.exist(chunk); - (chunk instanceof Buffer).should.equal(true, 'should write as a buffer'); - chunk.toString('utf8').should.equal(testChunk.toString('utf8')); - done(); - }); - stream.on('end', function(chunk) { - throw new Error("should not end"); - }); - var ret = file.pipe(stream, {end: false}); - ret.should.equal(stream, 'should return the stream'); - - file.contents.write(testChunk); - }); - - it('should do nothing with null', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: null - }; - var file = new File(options); - var stream = new Stream.PassThrough(); - stream.on('data', function(chunk) { - throw new Error("should not write"); - }); - stream.on('end', function(chunk) { - throw new Error("should not end"); - }); - var ret = file.pipe(stream, {end: false}); - ret.should.equal(stream, 'should return the stream'); - process.nextTick(done); - }); - }); - - describe('inspect()', function() { - it('should return correct format when no contents and no path', function(done) { - var file = new File(); - file.inspect().should.equal('<File >'); - done(); - }); - - it('should return correct format when Buffer and no path', function(done) { - var val = new Buffer("test"); - var file = new File({ - contents: val - }); - file.inspect().should.equal('<File <Buffer 74 65 73 74>>'); - done(); - }); - - it('should return correct format when Buffer and relative path', function(done) { - var val = new Buffer("test"); - var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: val - }); - file.inspect().should.equal('<File "test.coffee" <Buffer 74 65 73 74>>'); - done(); - }); - - it('should return correct format when Buffer and only path and no base', function(done) { - var val = new Buffer("test"); - var file = new File({ - cwd: "/", - path: "/test/test.coffee", - contents: val - }); - delete file.base; - file.inspect().should.equal('<File "/test/test.coffee" <Buffer 74 65 73 74>>'); - done(); - }); - - it('should return correct format when Stream and relative path', function(done) { - var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Stream.PassThrough() - }); - file.inspect().should.equal('<File "test.coffee" <PassThroughStream>>'); - done(); - }); - - it('should return correct format when null and relative path', function(done) { - var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: null - }); - file.inspect().should.equal('<File "test.coffee">'); - done(); - }); - }); - - describe('contents get/set', function() { - it('should work with Buffer', function(done) { - var val = new Buffer("test"); - var file = new File(); - file.contents = val; - file.contents.should.equal(val); - done(); - }); - - it('should work with Stream', function(done) { - var val = new Stream.PassThrough(); - var file = new File(); - file.contents = val; - file.contents.should.equal(val); - done(); - }); - - it('should work with null', function(done) { - var val = null; - var file = new File(); - file.contents = val; - (file.contents === null).should.equal(true); - done(); - }); - - it('should not work with string', function(done) { - var val = "test"; - var file = new File(); - try { - file.contents = val; - } catch (err) { - should.exist(err); - done(); - } - }); - }); - - describe('relative get/set', function() { - it('should error on set', function(done) { - var file = new File(); - try { - file.relative = "test"; - } catch (err) { - should.exist(err); - done(); - } - }); - - it('should error on get when no base', function(done) { - var a; - var file = new File(); - delete file.base; - try { - a = file.relative; - } catch (err) { - should.exist(err); - done(); - } - }); - - it('should error on get when no path', function(done) { - var a; - var file = new File(); - try { - a = file.relative; - } catch (err) { - should.exist(err); - done(); - } - }); - - it('should return a relative path from base', function(done) { - var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee" - }); - file.relative.should.equal("test.coffee"); - done(); - }); - - it('should return a relative path from cwd', function(done) { - var file = new File({ - cwd: "/", - path: "/test/test.coffee" - }); - file.relative.should.equal("test/test.coffee"); - done(); - }); - }); - -}); diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js deleted file mode 100644 index 7d286814..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js +++ /dev/null @@ -1,28 +0,0 @@ -var cloneBuffer = require('../lib/cloneBuffer'); -var Stream = require('stream'); -var should = require('should'); -require('mocha'); - -describe('cloneBuffer()', function() { - it('should return a new Buffer reference', function(done) { - var testBuffer = new Buffer('test'); - var testBuffer2 = cloneBuffer(testBuffer); - - should.exist(testBuffer2, 'should return something'); - (testBuffer2 instanceof Buffer).should.equal(true, 'should return a Buffer'); - testBuffer2.should.not.equal(testBuffer, 'pointer should change'); - done(); - }); - - it('should not replicate modifications to the original buffer', function(done) { - var testBuffer = new Buffer('test'); - var testBuffer2 = cloneBuffer(testBuffer); - - // test that changes dont modify both pointers - testBuffer2.write('w'); - - testBuffer.toString('utf8').should.equal('test', 'original should stay the same'); - testBuffer2.toString('utf8').should.equal('west', 'new buffer should be modified'); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/test/inspectStream.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/test/inspectStream.js deleted file mode 100644 index fe1802c5..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/test/inspectStream.js +++ /dev/null @@ -1,53 +0,0 @@ -var inspectStream = require('../lib/inspectStream'); -var Stream = require('stream'); -var should = require('should'); -require('mocha'); - -describe('inspectStream()', function() { - it('should work on a core Stream', function(done) { - var testStream = new Stream(); - inspectStream(testStream).should.equal('<Stream>'); - done(); - }); - - it('should work on a core Readable Stream', function(done) { - var testStream = new Stream.Readable(); - inspectStream(testStream).should.equal('<ReadableStream>'); - done(); - }); - - it('should work on a core Writable Stream', function(done) { - var testStream = new Stream.Writable(); - inspectStream(testStream).should.equal('<WritableStream>'); - done(); - }); - - it('should work on a core Duplex Stream', function(done) { - var testStream = new Stream.Duplex(); - inspectStream(testStream).should.equal('<DuplexStream>'); - done(); - }); - - it('should work on a core Transform Stream', function(done) { - var testStream = new Stream.Transform(); - inspectStream(testStream).should.equal('<TransformStream>'); - done(); - }); - - it('should work on a core PassThrough Stream', function(done) { - var testStream = new Stream.PassThrough(); - inspectStream(testStream).should.equal('<PassThroughStream>'); - done(); - }); - - it('should not work on a Buffer', function(done) { - var testBuffer = new Buffer('test'); - should.not.exist(inspectStream(testBuffer)); - done(); - }); - - it('should not work on a null', function(done) { - should.not.exist(inspectStream(null)); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js deleted file mode 100644 index 5bb1cb91..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js +++ /dev/null @@ -1,29 +0,0 @@ -var isBuffer = require('../lib/isBuffer'); -var Stream = require('stream'); -var should = require('should'); -require('mocha'); - -describe('isBuffer()', function() { - it('should return true on a Buffer', function(done) { - var testBuffer = new Buffer('test'); - isBuffer(testBuffer).should.equal(true); - done(); - }); - - it('should return false on a Stream', function(done) { - var testStream = new Stream(); - isBuffer(testStream).should.equal(false); - done(); - }); - - it('should return false on a null', function(done) { - isBuffer(null).should.equal(false); - done(); - }); - - it('should return false on a array of numbers', function(done) { - var testArray = [1, 2, 3]; - isBuffer(testArray).should.equal(false); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/test/isNull.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/test/isNull.js deleted file mode 100644 index db70c013..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/test/isNull.js +++ /dev/null @@ -1,23 +0,0 @@ -var isNull = require('../lib/isNull'); -var Stream = require('stream'); -var should = require('should'); -require('mocha'); - -describe('isNull()', function() { - it('should return true on null', function(done) { - isNull(null).should.equal(true); - done(); - }); - - it('should return false on undefined', function(done) { - isNull().should.equal(false); - isNull(undefined).should.equal(false); - done(); - }); - - it('should return false on defined values', function(done) { - isNull(1).should.equal(false); - isNull("test").should.equal(false); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/test/isStream.js b/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/test/isStream.js deleted file mode 100644 index f22584c5..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/node_modules/vinyl/test/isStream.js +++ /dev/null @@ -1,29 +0,0 @@ -var isStream = require('../lib/isStream'); -var Stream = require('stream'); -var should = require('should'); -require('mocha'); - -describe('isStream()', function() { - it('should return true on a Stream', function(done) { - var testStream = new Stream(); - isStream(testStream).should.equal(true); - done(); - }); - - it('should return false on a Buffer', function(done) { - var testBuffer = new Buffer('test'); - isStream(testBuffer).should.equal(false); - done(); - }); - - it('should return false on a null', function(done) { - isStream(null).should.equal(false); - done(); - }); - - it('should return false on a array of numbers', function(done) { - var testArray = [1, 2, 3]; - isStream(testArray).should.equal(false); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/package.json b/node_modules/gulp-minify-css/node_modules/gulp-util/package.json deleted file mode 100644 index a6b6b67e..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "gulp-util", - "description": "Utility functions for gulp plugins", - "version": "2.2.14", - "homepage": "http://github.com/wearefractal/gulp-util", - "repository": { - "type": "git", - "url": "git://github.com/wearefractal/gulp-util.git" - }, - "author": { - "name": "Fractal", - "email": "contact@wearefractal.com", - "url": "http://wearefractal.com/" - }, - "main": "./index.js", - "dependencies": { - "chalk": "~0.4.0", - "lodash.template": "~2.4.1", - "lodash._reinterpolate": "~2.4.1", - "vinyl": "~0.2.1", - "through2": "~0.4.0", - "dateformat": "~1.0.7-1.2.3", - "multipipe": "~0.0.1", - "minimist": "~0.0.5" - }, - "devDependencies": { - "mocha": "~1.17.0", - "should": "~3.1.2", - "mocha-lcov-reporter": "~0.0.1", - "coveralls": "~2.7.0", - "istanbul": "~0.2.3", - "rimraf": "~2.2.5", - "jshint": "~2.4.1", - "buffer-equal": "0.0.0", - "lodash.templatesettings": "~2.4.1", - "event-stream": "~3.1.0" - }, - "scripts": { - "test": "mocha --reporter spec && jshint", - "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage" - }, - "engines": { - "node": ">= 0.9" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/wearefractal/gulp-util/raw/master/LICENSE" - } - ], - "readme": "# gulp-util [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/gulpjs/gulp-util.png?theme=shields.io)](https://david-dm.org/gulpjs/gulp-util)\n\n## Information\n\n<table>\n<tr> \n<td>Package</td><td>gulp-util</td>\n</tr>\n<tr>\n<td>Description</td>\n<td>Utility functions for gulp plugins</td>\n</tr>\n<tr>\n<td>Node Version</td>\n<td>>= 0.9</td>\n</tr>\n</table>\n\n## Usage\n\n```javascript\nvar gutil = require('gulp-util');\n\ngutil.log('stuff happened', 'Really it did', gutil.colors.cyan('123'));\ngutil.beep();\n\ngutil.replaceExtension('file.coffee', '.js'); // file.js\n\nvar opt = {\n name: 'todd',\n file: someGulpFile\n};\ngutil.template('test <%= name %> <%= file.path %>', opt) // test todd /js/hi.js\n```\n\n### log(msg...)\n\nLogs stuff. Already prefixed with [gulp] and all that. Use the right colors for values. If you pass in multiple arguments it will join them by a space.\n\n```\nvalues (files, module names, etc.) = magenta\nnumbers (times, counts, etc) = cyan\n```\n\n### colors\n\nThis is an instance of [chalk](https://github.com/sindresorhus/chalk)\n\n### date\n\nThis is an instance of [node-dateformat](https://github.com/felixge/node-dateformat).\n\n### linefeed\n\nJust `\\n`. Use this.\n\n### replaceExtension(path, newExtension)\n\nReplaces a file extension in a path. Returns the new path.\n\n### isStream(obj)\n\nReturns true or false if an object is a stream.\n\n### isBuffer(obj)\n\nReturns true or false if an object is a Buffer.\n\n### template(string[, data])\n\nThis is a lodash.template function wrapper. You must pass in a valid gulp file object so it is available to the user or it will error. You can not configure any of the delimiters. Look at the [lodash docs](http://lodash.com/docs#template) for more info.\n\n## new File(obj)\n\nThis is just [vinyl](https://github.com/wearefractal/vinyl)\n\n```javascript\nvar file = new gutil.File({\n base: join(__dirname, './fixtures/'),\n cwd: __dirname,\n path: join(__dirname, './fixtures/test.coffee')\n});\n```\n\n## noop()\n\nReturns a stream that does nothing but pass data straight through.\n\n```javascript\ngulp.task('scripts', function() {\n gulp.src('src/**/*.js')\n .pipe(concat('script.js'))\n .pipe(gulp.env.production ? uglify() : gutil.noop())\n .pipe(gulp.dest('dist/');\n});\n```\n\n## combine(streams...)\n\nArgument may also be an array of streams. Returns a function that returns the combined stream. Useful for keeping things DRY. This is a simple wrapper around event-stream's `.pipeline`\n\n```javascript\nvar scripts = gutil.combine(\n coffee({bare: true}),\n uglify(),\n concat('script.js'),\n gulp.dest('dist/')\n);\n\ngulp.task('default', function() {\n gulp.src('*.coffee').pipe(scripts());\n});\n```\n\n## buffer(cb)\n\nThis is similar to es.wait but instead of buffering text into one string it buffers anything into an array (so very useful for file objects).\n\nReturns a stream that can be piped to.\n\nThe stream will emit one data event after the stream piped to it has ended. The data will be the same array passed to the callback.\n\nCallback is optional and receives two arguments: error and data\n\n```javascript\ngulp.src('stuff/*.js')\n .pipe(gutil.buffer(function(err, files){\n \n });\n```\n\n## new PluginError(pluginName, message[, options])\n\n- pluginName should be the module name of your plugin\n- message can be a string or an existing error\n- By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error.\n- If you pass an error in as the message the stack will be pulled from that, otherwise one will be created.\n\nThese are all acceptable forms of instantiation:\n\n```javascript\nvar err = new gutil.PluginError('test', {\n message: 'something broke'\n});\n\nvar err = new gutil.PluginError({\n plugin: 'test',\n message: 'something broke'\n});\n\nvar err = new gutil.PluginError('test', 'something broke');\n\nvar err = new gutil.PluginError('test', 'something broke', {showStack: true});\n\nvar existingError = new Error('OMG');\nvar err = new gutil.PluginError('test', existingError, {showStack: true});\n```\n\n[npm-url]: https://npmjs.org/package/gulp-util\n[npm-image]: https://badge.fury.io/js/gulp-util.png\n[travis-url]: https://travis-ci.org/gulpjs/gulp-util\n[travis-image]: https://travis-ci.org/gulpjs/gulp-util.png?branch=master\n[coveralls-url]: https://coveralls.io/r/gulpjs/gulp-util\n[coveralls-image]: https://coveralls.io/repos/gulpjs/gulp-util/badge.png\n[depstat-url]: https://david-dm.org/gulpjs/gulp-util\n[depstat-image]: https://david-dm.org/gulpjs/gulp-util.png\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/wearefractal/gulp-util/issues" - }, - "_id": "gulp-util@2.2.14", - "_from": "gulp-util@~2.2.13" -} diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/test/File.js b/node_modules/gulp-minify-css/node_modules/gulp-util/test/File.js deleted file mode 100644 index 53544075..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/test/File.js +++ /dev/null @@ -1,46 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('File()', function() { - it('should return a valid file', function(done) { - var fname = path.join(__dirname, './fixtures/test.coffee'); - var base = path.join(__dirname, './fixtures/'); - var file = new util.File({ - base: base, - cwd: __dirname, - path: fname - }); - should.exist(file, 'root'); - should.exist(file.relative, 'relative'); - should.exist(file.path, 'path'); - should.exist(file.cwd, 'cwd'); - should.exist(file.base, 'base'); - file.path.should.equal(fname); - file.cwd.should.equal(__dirname); - file.base.should.equal(base); - file.relative.should.equal('test.coffee'); - done(); - }); - - it('should return a valid file 2', function(done) { - var fname = path.join(__dirname, './fixtures/test.coffee'); - var base = __dirname; - var file = new util.File({ - base: base, - cwd: __dirname, - path: fname - }); - should.exist(file, 'root'); - should.exist(file.relative, 'relative'); - should.exist(file.path, 'path'); - should.exist(file.cwd, 'cwd'); - should.exist(file.base, 'base'); - file.path.should.equal(fname); - file.cwd.should.equal(__dirname); - file.base.should.equal(base); - file.relative.should.equal('fixtures/test.coffee'); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/test/PluginError.js b/node_modules/gulp-minify-css/node_modules/gulp-util/test/PluginError.js deleted file mode 100644 index 6dc23c0c..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/test/PluginError.js +++ /dev/null @@ -1,70 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('PluginError()', function(){ - it('should print the plugin name in toString', function(done){ - var err = new util.PluginError('test', 'something broke'); - err.toString().indexOf('test').should.not.equal(-1); - done(); - }); - - it('should not include the stack by default in toString', function(done){ - var err = new util.PluginError('test', 'something broke'); - // just check that there are no 'at' lines - err.toString().indexOf('at').should.equal(-1); - done(); - }); - - it('should include the stack when specified in toString', function(done){ - var err = new util.PluginError('test', 'something broke', {stack: "at huh", showStack: true}); - // just check that there are 'at' lines - err.toString().indexOf('at').should.not.equal(-1); - done(); - }); - - it('should take arguments as one object', function(done){ - var err = new util.PluginError({ - plugin: 'test', - message: 'something broke' - }); - err.plugin.should.equal('test'); - err.message.should.equal('something broke'); - done(); - }); - - it('should take arguments as plugin name and one object', function(done){ - var err = new util.PluginError('test', { - message: 'something broke' - }); - err.plugin.should.equal('test'); - err.message.should.equal('something broke'); - done(); - }); - - it('should take arguments as plugin name and message', function(done){ - var err = new util.PluginError('test', 'something broke'); - err.plugin.should.equal('test'); - err.message.should.equal('something broke'); - done(); - }); - - it('should take arguments as plugin name, message, and one object', function(done){ - var err = new util.PluginError('test', 'something broke', {showStack: true}); - err.plugin.should.equal('test'); - err.message.should.equal('something broke'); - err.showStack.should.equal(true); - done(); - }); - - it('should take arguments as plugin name, error, and one object', function(done){ - var realErr = new Error('something broke'); - var err = new util.PluginError('test', realErr, {showStack: true}); - err.plugin.should.equal('test'); - err.message.should.equal('something broke'); - err.showStack.should.equal(true); - done(); - }); - -}); \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/test/beep.js b/node_modules/gulp-minify-css/node_modules/gulp-util/test/beep.js deleted file mode 100644 index e3e71073..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/test/beep.js +++ /dev/null @@ -1,23 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('beep()', function(){ - it('should send the right code to stdout', function(done){ - var writtenValue; - - // Stub process.stdout.write - var stdout_write = process.stdout.write; - process.stdout.write = function(value) { - writtenValue = value; - }; - - util.beep(); - writtenValue.should.equal('\x07'); - - // Restore process.stdout.write - process.stdout.write = stdout_write; - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/test/buffer.js b/node_modules/gulp-minify-css/node_modules/gulp-util/test/buffer.js deleted file mode 100644 index 6b4de67f..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/test/buffer.js +++ /dev/null @@ -1,36 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -var es = require('event-stream'); -require('mocha'); - -describe('buffer()', function(){ - it('should buffer stuff and return an array into the callback', function(done){ - var src = [1,2,3]; - var inp = es.readArray(src); - inp.pipe(util.buffer(function(err, data){ - should.not.exist(err); - should.exist(data); - data.should.eql(src); - done(); - })); - }); - it('should buffer stuff and emit it as a data event', function(done){ - var src = [1,2,3]; - var inp = es.readArray(src); - inp.pipe(util.buffer()).on('data', function(data){ - should.exist(data); - data.should.eql(src); - done(); - }); - }); - it('should buffer stuff and return a stream with the buffered data', function(done){ - var src = [1,2,3]; - var inp = es.readArray(src); - inp.pipe(util.buffer()).pipe(es.through(function(data) { - should.exist(data); - data.should.eql(src); - done(); - })); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/test/colors.js b/node_modules/gulp-minify-css/node_modules/gulp-util/test/colors.js deleted file mode 100644 index 970367e2..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/test/colors.js +++ /dev/null @@ -1,11 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('colors', function(){ - it('should be a chalk instance', function(done){ - util.colors.should.equal(require('chalk')); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/test/combine.js b/node_modules/gulp-minify-css/node_modules/gulp-util/test/combine.js deleted file mode 100644 index a54f0012..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/test/combine.js +++ /dev/null @@ -1,38 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -var es = require('event-stream'); -var Stream = require('stream'); -require('mocha'); - -describe('combine()', function(){ - it('should return a function', function(done){ - var src = [1,2,3]; - var inp = es.readArray(src); - var factory = util.combine(inp); - factory.should.be.type('function'); - done(); - }); - it('should return a function that returns a stream combination', function(done){ - var src = [1,2,3]; - var inp = es.readArray(src); - var inp2 = es.writeArray(function(err, data){ - should.not.exist(err); - data.should.eql(src); - done(); - }); - var factory = util.combine(inp, inp2); - factory().should.be.instanceof(Stream); - }); - it('should return a function that returns a stream combination when given an array', function(done){ - var src = [1,2,3]; - var inp = es.readArray(src); - var inp2 = es.writeArray(function(err, data){ - should.not.exist(err); - data.should.eql(src); - done(); - }); - var factory = util.combine([inp, inp2]); - factory().should.be.instanceof(Stream); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/test/date.js b/node_modules/gulp-minify-css/node_modules/gulp-util/test/date.js deleted file mode 100644 index 21f52ee9..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/test/date.js +++ /dev/null @@ -1,17 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('date', function() { - it('should be a date format instance', function(done) { - util.date.should.equal(require('dateformat')); - done(); - }); - it('should return today\'s date', function(done) { - var time = new Date(); - var dateutil = util.date('HH:MM:ss'); - dateutil.should.equal(('0' + time.getHours()).slice(-2) + ':' + ('0' + time.getMinutes()).slice(-2) + ':' + ('0' + time.getSeconds()).slice(-2)); - done(); - }) -}); \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/test/env.js b/node_modules/gulp-minify-css/node_modules/gulp-util/test/env.js deleted file mode 100644 index d3942940..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/test/env.js +++ /dev/null @@ -1,12 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('env', function(){ - it('should exist', function(done){ - should.exist(util.env); - should.exist(util.env._); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/test/isBuffer.js b/node_modules/gulp-minify-css/node_modules/gulp-util/test/isBuffer.js deleted file mode 100644 index ad09bbf5..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/test/isBuffer.js +++ /dev/null @@ -1,16 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -var through = require('through2'); -require('mocha'); - -describe('isBuffer()', function(){ - it('should work on a buffer', function(done){ - util.isBuffer(new Buffer('huh')).should.equal(true); - done(); - }); - it('should not work on a stream', function(done){ - util.isBuffer(through()).should.equal(false); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/test/isNull.js b/node_modules/gulp-minify-css/node_modules/gulp-util/test/isNull.js deleted file mode 100644 index 841fc46b..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/test/isNull.js +++ /dev/null @@ -1,20 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -var through = require('through2'); -require('mocha'); - -describe('isNull()', function(){ - it('should work on a null', function(done){ - util.isNull(null).should.equal(true); - done(); - }); - it('should not work on a stream', function(done){ - util.isNull(through()).should.equal(false); - done(); - }); - it('should not work on undefined', function(done){ - util.isNull(undefined).should.equal(false); - done(); - }); -}); diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/test/isStream.js b/node_modules/gulp-minify-css/node_modules/gulp-util/test/isStream.js deleted file mode 100644 index 3935324b..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/test/isStream.js +++ /dev/null @@ -1,16 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -var through = require('through2'); -require('mocha'); - -describe('isStream()', function(){ - it('should work on a stream', function(done){ - util.isStream(through()).should.equal(true); - done(); - }); - it('should not work on a buffer', function(done){ - util.isStream(new Buffer('huh')).should.equal(false); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/test/linefeed.js b/node_modules/gulp-minify-css/node_modules/gulp-util/test/linefeed.js deleted file mode 100644 index 72f61ca0..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/test/linefeed.js +++ /dev/null @@ -1,5 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/test/log.js b/node_modules/gulp-minify-css/node_modules/gulp-util/test/log.js deleted file mode 100644 index 71c6417a..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/test/log.js +++ /dev/null @@ -1,23 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('log()', function(){ - it('should work i guess', function(done){ - var writtenValue; - - // Stub process.stdout.write - var stdout_write = process.stdout.write; - process.stdout.write = function(value) { - writtenValue = value; - }; - - util.log(1, 2, 3, 4, 'five'); - writtenValue.should.eql('['+util.colors.green('gulp')+'] 1 2 3 4 five\n'); - - // Restore process.stdout.write - process.stdout.write = stdout_write; - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/test/noop.js b/node_modules/gulp-minify-css/node_modules/gulp-util/test/noop.js deleted file mode 100644 index 0d75b35c..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/test/noop.js +++ /dev/null @@ -1,24 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -var es = require('event-stream'); -require('mocha'); - -describe('noop()', function(){ - it('should return a stream', function(done){ - util.isStream(util.noop()).should.equal(true); - done(); - }); - it('should return a stream that passes through all data', function(done){ - var inp = [1,2,3,4,5,6,7,8,9]; - var stream = util.noop(); - es.readArray(inp) - .pipe(stream) - .pipe(es.writeArray(function(err, arr){ - should.not.exist(err); - should.exist(arr); - arr.should.eql(inp); - done(); - })); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/test/replaceExtension.js b/node_modules/gulp-minify-css/node_modules/gulp-util/test/replaceExtension.js deleted file mode 100644 index b9c65662..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/test/replaceExtension.js +++ /dev/null @@ -1,34 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('replaceExtension()', function() { - it('should return a valid replaced extension on nested', function(done) { - var fname = path.join(__dirname, './fixtures/test.coffee'); - var expected = path.join(__dirname, './fixtures/test.js'); - var nu = util.replaceExtension(fname, '.js'); - should.exist(nu); - nu.should.equal(expected); - done(); - }); - - it('should return a valid replaced extension on flat', function(done) { - var fname = 'test.coffee'; - var expected = 'test.js'; - var nu = util.replaceExtension(fname, '.js'); - should.exist(nu); - nu.should.equal(expected); - done(); - }); - - it('should not return a valid replaced extension on empty string', function(done) { - var fname = ''; - var expected = ''; - var nu = util.replaceExtension(fname, '.js'); - should.exist(nu); - nu.should.equal(expected); - done(); - }); - -}); \ No newline at end of file diff --git a/node_modules/gulp-minify-css/node_modules/gulp-util/test/template.js b/node_modules/gulp-minify-css/node_modules/gulp-util/test/template.js deleted file mode 100644 index 7664620a..00000000 --- a/node_modules/gulp-minify-css/node_modules/gulp-util/test/template.js +++ /dev/null @@ -1,99 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('template()', function(){ - it('should work with just a template', function(done){ - var opt = { - name:'todd', - file: { - path: 'hi.js' - } - }; - var expected = 'test todd hi.js'; - - var tmpl = util.template('test <%= name %> <%= file.path %>'); - should.exist(tmpl); - 'function'.should.equal(typeof(tmpl)); - - // eval it now - var etmpl = tmpl(opt); - 'string'.should.equal(typeof(etmpl)); - etmpl.should.equal(expected); - done(); - }); - - it('should work with a template and data', function(done){ - var opt = { - name:'todd', - file: { - path: 'hi.js' - } - }; - var expected = 'test todd hi.js'; - var tmpl = util.template('test <%= name %> <%= file.path %>', opt); - should.exist(tmpl); - 'string'.should.equal(typeof(tmpl)); - tmpl.should.equal(expected); - done(); - }); - - it('should throw an error when no file object is passed', function(done){ - var opt = { - name:'todd' - }; - try { - var tmpl = util.template('test <%= name %> <%= file.path %>', opt); - } catch (err) { - should.exist(err); - done(); - } - }); - - it('should ignore modified templateSettings', function(done){ - var templateSettings = require('lodash.templatesettings'); - templateSettings.interpolate = /\{\{([\s\S]+?)\}\}/g; - - var opt = { - name:'todd', - file: { - path: 'hi.js' - } - }; - var expected = 'test {{name}} hi.js'; - - var tmpl = util.template('test {{name}} <%= file.path %>'); - should.exist(tmpl); - 'function'.should.equal(typeof(tmpl)); - - // eval it now - var etmpl = tmpl(opt); - 'string'.should.equal(typeof(etmpl)); - etmpl.should.equal(expected); - - done(); - }); - - it('should allow ES6 delimiters', function(done){ - var opt = { - name:'todd', - file: { - path: 'hi.js' - } - }; - var expected = 'test todd hi.js'; - - var tmpl = util.template('test ${name} ${file.path}'); - should.exist(tmpl); - 'function'.should.equal(typeof(tmpl)); - - // eval it now - var etmpl = tmpl(opt); - 'string'.should.equal(typeof(etmpl)); - etmpl.should.equal(expected); - - done(); - }); - -}); \ No newline at end of file diff --git a/node_modules/gulp-minify-css/package.json b/node_modules/gulp-minify-css/package.json deleted file mode 100644 index d580b3db..00000000 --- a/node_modules/gulp-minify-css/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "gulp-minify-css", - "description": "Minify css with clean-css.", - "version": "0.3.0", - "repository": { - "type": "git", - "url": "https://github.com/jonathanepollack/gulp-minify-css.git" - }, - "homepage": "https://github.com/jonathanepollack/gulp-minify-css", - "keywords": [ - "gulpplugin", - "minify", - "css" - ], - "main": "./index.js", - "dependencies": { - "event-stream": "~3.1.0", - "clean-css": "~2.0.7", - "clone": "~0.1.11", - "bufferstreams": "0.0.1", - "gulp-util": "~2.2.13" - }, - "engines": { - "node": ">= 0.10" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "~1.17.1", - "chai": "~1.9.0", - "gulp": "~3.5.0" - }, - "licenses": [ - { - "type": "MIT" - } - ], - "readme": "[![Build Status](https://travis-ci.org/jonathanepollack/gulp-minify-css.png?branch=master)](https://travis-ci.org/jonathanepollack/gulp-minify-css)\n## Information\n\n<table>\n<tr> \n<td>Package</td><td>gulp-minify-css</td>\n</tr>\n<tr>\n<td>Description</td>\n<td>Minify css with <a href=\"https://github.com/GoalSmashers/clean-css\">clean-css.</a></td>\n</tr>\n<tr>\n<td>Node Version</td>\n<td>>= 0.10</td>\n</tr>\n</table>\n\n## Installion\n\n```\nnpm install --save-dev gulp-minify-css\n```\n\n## Usage\n\n```js\nvar minifyCSS = require('gulp-minify-css');\n\ngulp.task('minify-css', function() {\n\n gulp.src('./static/css/*.css')\n .pipe(minifyCSS(opts))\n .pipe(gulp.dest('./dist/'))\n});\n```\n### Options\n* `keepSpecialComments` - `*` for keeping all (default), `1` for keeping first one, `0` for removing all\n* `keepBreaks` - whether to keep line breaks (default is false)\n* `removeEmpty` - whether to remove empty elements (default is false)\n* `debug` - turns on debug mode measuring time spent on cleaning up\n (run `npm run bench` to see example)\n* `root` - path with which to resolve absolute `@import` rules\n* `relativeTo` - path with which to resolve relative `@import` rules\n\n## LICENSE\n\n(MIT License)\n\nCopyright (c) 2013 Jonathan Pollack (<jonathanepollack@gmail.com>), Cloublabs Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/jonathanepollack/gulp-minify-css/issues" - }, - "_id": "gulp-minify-css@0.3.0", - "_from": "gulp-minify-css@" -} diff --git a/node_modules/gulp-minify-css/test/fixture/index.css b/node_modules/gulp-minify-css/test/fixture/index.css deleted file mode 100644 index 7727cd22..00000000 --- a/node_modules/gulp-minify-css/test/fixture/index.css +++ /dev/null @@ -1,81 +0,0 @@ -/*! Special Comment */ - -/* Large Desktops */ -@media (min-width: 980px) { - body { - padding-top: 60px; - } - .linediv-l { - border-right: 1px white solid; - } - .linediv-r{ - border-left: 1px white solid; - } -} -/* Landscape phones and smaller */ -@media (max-width: 770px) { - .copy { - padding: 2.5% 10%; - } - .linediv-l { - border-bottom: 1px white solid; - } - .linediv-r{ - border-top: 1px white solid; - } -} -/* All form-factors */ -body { - font-family: 'Open Sans', Helvetica, Arial, sans-serif; -} -.heading, .subheading { - font-family: 'Ubuntu', Helvetica, Arial, sans-serif; - text-align: center; -} -p.lead { - padding-top: 1.5% - font-size: 24px; - line-height: 30px; -} -p { - font-size: 18px; - line-height: 24px; -} -/* Video pitch and Action */ -.pitch { - padding: 2.5% 0%; -} -.order { - padding: 2% 0%; -} -.actions { - background-color: #343434; - padding: 3% 0%; -} -.video, .thermometer, .order, .social, .statistics { - text-align: center; -} -.statistics h3, .statistics p{ - color: white; -} -/* Marketing Copy and Footer */ -.copy { - padding-top: 2.5%; - padding-bottom: 2.5%; - text-align: justify; -} -.asset { - padding: 2.5% 0%; -} -.footer { - color: #cccccc; - text-align: center; -} -.footer p{ - font-size: 11px; -} -.footer a{ - color: #ccccff; -} - -/*! Special Comment */ \ No newline at end of file diff --git a/node_modules/gulp-minify-css/test/minify.js b/node_modules/gulp-minify-css/test/minify.js deleted file mode 100644 index 944ddda5..00000000 --- a/node_modules/gulp-minify-css/test/minify.js +++ /dev/null @@ -1,64 +0,0 @@ -var gulp = require('gulp'), - expect = require('chai').expect, - minifyCSS = require('../'), - CleanCSS = require('clean-css'), - es = require('event-stream'), - Stream = require('stream'), - path = require('path'), - fs = require('fs'); - -require('mocha'); - -describe('gulp-minify-css minification', function() { - var opts = { - keepSpecialComments: 1, - keepBreaks: true - }; - - describe('with buffers', function() { - var filename = path.join(__dirname, './fixture/index.css'); - it('should minify my files', function(done) { - gulp.src(filename) - .pipe(minifyCSS(opts)) - .pipe(es.map(function(file){ - var source = fs.readFileSync(filename), - expected = new CleanCSS(opts).minify(source.toString()); - expect(expected).to.be.equal(file.contents.toString()); - done(); - })); - }); - - it('should return file.contents as a buffer', function(done) { - gulp.src(filename) - .pipe(minifyCSS()) - .pipe(es.map(function(file) { - expect(file.contents).to.be.an.instanceof(Buffer); - done(); - })); - }); - }); - describe('with streams', function() { - var filename = path.join(__dirname, './fixture/index.css'); - it('should minify my files', function(done) { - gulp.src(filename, {buffer: false}) - .pipe(minifyCSS(opts)) - .pipe(es.map(function(file){ - var source = fs.readFileSync(filename), - expected = new CleanCSS(opts).minify(source.toString()); - file.contents.pipe(es.wait(function(err, data) { - expect(expected).to.be.equal(data); - done(); - })); - })); - }); - - it('should return file.contents as a buffer', function(done) { - gulp.src(filename, {buffer: false}) - .pipe(minifyCSS(opts)) - .pipe(es.map(function(file) { - expect(file.contents).to.be.an.instanceof(Stream); - done(); - })); - }); - }); -}); diff --git a/node_modules/gulp-sass/.npmignore b/node_modules/gulp-sass/.npmignore deleted file mode 100644 index a72b52eb..00000000 --- a/node_modules/gulp-sass/.npmignore +++ /dev/null @@ -1,15 +0,0 @@ -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -npm-debug.log -node_modules diff --git a/node_modules/gulp-sass/.travis.yml b/node_modules/gulp-sass/.travis.yml deleted file mode 100644 index 87f8cd91..00000000 --- a/node_modules/gulp-sass/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "0.10" \ No newline at end of file diff --git a/node_modules/gulp-sass/LICENSE b/node_modules/gulp-sass/LICENSE deleted file mode 100644 index 33ef8c12..00000000 --- a/node_modules/gulp-sass/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 David Manning - -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/node_modules/gulp-sass/README.md b/node_modules/gulp-sass/README.md deleted file mode 100644 index 3f13d262..00000000 --- a/node_modules/gulp-sass/README.md +++ /dev/null @@ -1,73 +0,0 @@ -[![Build Status](https://travis-ci.org/dlmanning/gulp-sass.png?branch=master)](https://travis-ci.org/dlmanning/gulp-sass) - -gulp-sass -========= - -SASS plugin for [gulp](https://github.com/wearefractal/gulp). - -#Install - -``` -npm install gulp-sass -``` - -#Basic Usage - -Something like this: - -```javascript -var gulp = require('gulp'); -var sass = require('gulp-sass') - -gulp.task('sass', function () { - gulp.src('./scss/*.scss') - .pipe(sass()) - .pipe(gulp.dest('./css')); -}); -``` - -Options passed as a hash into `sass()` will be passed along to [`node-sass`](https://github.com/andrew/node-sass) - -## gulp-sass specific options - -#### `errLogToConsole: true` - -If you pass `errLogToConsole: true` into the options hash, sass errors will be logged to the console instead of generating a `gutil.PluginError` object. Use this option with `gulp.watch` to keep gulp from stopping every time you mess up your sass. - -#### `onSuccess: callback` - -Pass in your own callback to be called upon successful compilaton by node-sass. The callback has the form `callback(css)`, and is passed the compiled css as a string. Note: This *does not* prevent gulp-sass's default behavior of writing the output css file. - -#### `onError: callback` - -Pass in your own callback to be called upon a sass error from node-sass. The callback has the form `callback(err)`, where err is the error string generated by libsass. Note: this *does* prevent an actual `gulpPluginError` object from being created. - -#Imports and Partials - -gulp-sass now automatically passes along the directory of every scss file it parses as an include path for node-sass. This means that as long as you specify your includes relative to path of your scss file, everything will just work. - -scss/includes/_settings.scss: - -```scss -$blue: #3bbfce; -$margin: 16px; -``` - -scss/style.scss: - -```scss -@import "includes/settings"; - -.content-navigation { - border-color: $blue; - color: - darken($blue, 9%); -} - -.border { - padding: $margin / 2; - margin: $margin / 2; - border-color: $blue; -} -``` - diff --git a/node_modules/gulp-sass/index.js b/node_modules/gulp-sass/index.js deleted file mode 100644 index 4704fbd4..00000000 --- a/node_modules/gulp-sass/index.js +++ /dev/null @@ -1,62 +0,0 @@ -var map = require('map-stream') - , sass = require('node-sass') - , path = require('path') - , gutil = require('gulp-util') - , ext = gutil.replaceExtension - ; - -module.exports = function (options) { - var opts = options ? options : {}; - - function nodeSass (file, cb) { - var fileDir = path.dirname(file.path); - var addedLocalDirPath = false; - - if (file.isNull()) { - return cb(null, file); - } - if (path.basename(file.path).indexOf('_') === 0) { - return cb(); - } - - opts.data = file.contents.toString(); - - if (opts.includePaths && Array.isArray(opts.includePaths)) { - if (opts.includePaths.indexOf(fileDir) === -1) { - opts.includePaths.push(fileDir); - addedLocalDirPath = true; - } - } else { - opts.includePaths = [fileDir]; - } - - opts.success = function (css) { - if (typeof opts.onSuccess === 'function') opts.onSuccess(css); - - file.path = ext(file.path, '.css'); - file.contents = new Buffer(css); - cb(null, file); - }; - - opts.error = function (err) { - if (opts.errLogToConsole) { - gutil.log('[gulp-sass] ' + err); - return cb(); - } - - if (typeof opts.onError === 'function') { - opts.onError(err); - return cb(); - } - - return cb(new gutil.PluginError('gulp-sass', err)); - }; - - sass.render(opts); - - if (addedLocalDirPath) opts.includePaths.pop(); - - } - - return map(nodeSass); -}; diff --git a/node_modules/gulp-sass/node_modules/.bin/node-sass b/node_modules/gulp-sass/node_modules/.bin/node-sass deleted file mode 120000 index a4b01345..00000000 --- a/node_modules/gulp-sass/node_modules/.bin/node-sass +++ /dev/null @@ -1 +0,0 @@ -../node-sass/bin/node-sass \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/.npmignore b/node_modules/gulp-sass/node_modules/gulp-util/.npmignore deleted file mode 100644 index b5ef13a3..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -.DS_Store -*.log -node_modules -build -*.node -components \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/.travis.yml b/node_modules/gulp-sass/node_modules/gulp-util/.travis.yml deleted file mode 100644 index 33ad9f8c..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.9" - - "0.10" -after_script: - - npm run coveralls \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/LICENSE b/node_modules/gulp-sass/node_modules/gulp-util/LICENSE deleted file mode 100755 index 7cbe012c..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2014 Fractal <contact@wearefractal.com> - -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/node_modules/gulp-sass/node_modules/gulp-util/README.md b/node_modules/gulp-sass/node_modules/gulp-util/README.md deleted file mode 100644 index fd0e506e..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/README.md +++ /dev/null @@ -1,166 +0,0 @@ -# gulp-util [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/gulpjs/gulp-util.png?theme=shields.io)](https://david-dm.org/gulpjs/gulp-util) - -## Information - -<table> -<tr> -<td>Package</td><td>gulp-util</td> -</tr> -<tr> -<td>Description</td> -<td>Utility functions for gulp plugins</td> -</tr> -<tr> -<td>Node Version</td> -<td>>= 0.9</td> -</tr> -</table> - -## Usage - -```javascript -var gutil = require('gulp-util'); - -gutil.log('stuff happened', 'Really it did', gutil.colors.cyan('123')); -gutil.beep(); - -gutil.replaceExtension('file.coffee', '.js'); // file.js - -var opt = { - name: 'todd', - file: someGulpFile -}; -gutil.template('test <%= name %> <%= file.path %>', opt) // test todd /js/hi.js -``` - -### log(msg...) - -Logs stuff. Already prefixed with [gulp] and all that. Use the right colors for values. If you pass in multiple arguments it will join them by a space. - -``` -values (files, module names, etc.) = magenta -numbers (times, counts, etc) = cyan -``` - -### colors - -This is an instance of [chalk](https://github.com/sindresorhus/chalk) - -### date - -This is an instance of [node-dateformat](https://github.com/felixge/node-dateformat). - -### linefeed - -Just `\n`. Use this. - -### replaceExtension(path, newExtension) - -Replaces a file extension in a path. Returns the new path. - -### isStream(obj) - -Returns true or false if an object is a stream. - -### isBuffer(obj) - -Returns true or false if an object is a Buffer. - -### template(string[, data]) - -This is a lodash.template function wrapper. You must pass in a valid gulp file object so it is available to the user or it will error. You can not configure any of the delimiters. Look at the [lodash docs](http://lodash.com/docs#template) for more info. - -## new File(obj) - -This is just [vinyl](https://github.com/wearefractal/vinyl) - -```javascript -var file = new gutil.File({ - base: join(__dirname, './fixtures/'), - cwd: __dirname, - path: join(__dirname, './fixtures/test.coffee') -}); -``` - -## noop() - -Returns a stream that does nothing but pass data straight through. - -```javascript -gulp.task('scripts', function() { - gulp.src('src/**/*.js') - .pipe(concat('script.js')) - .pipe(gulp.env.production ? uglify() : gutil.noop()) - .pipe(gulp.dest('dist/'); -}); -``` - -## combine(streams...) - -Argument may also be an array of streams. Returns a function that returns the combined stream. Useful for keeping things DRY. This is a simple wrapper around event-stream's `.pipeline` - -```javascript -var scripts = gutil.combine( - coffee({bare: true}), - uglify(), - concat('script.js'), - gulp.dest('dist/') -); - -gulp.task('default', function() { - gulp.src('*.coffee').pipe(scripts()); -}); -``` - -## buffer(cb) - -This is similar to es.wait but instead of buffering text into one string it buffers anything into an array (so very useful for file objects). - -Returns a stream that can be piped to. - -The stream will emit one data event after the stream piped to it has ended. The data will be the same array passed to the callback. - -Callback is optional and receives two arguments: error and data - -```javascript -gulp.src('stuff/*.js') - .pipe(gutil.buffer(function(err, files){ - - }); -``` - -## new PluginError(pluginName, message[, options]) - -- pluginName should be the module name of your plugin -- message can be a string or an existing error -- By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error. -- If you pass an error in as the message the stack will be pulled from that, otherwise one will be created. - -These are all acceptable forms of instantiation: - -```javascript -var err = new gutil.PluginError('test', { - message: 'something broke' -}); - -var err = new gutil.PluginError({ - plugin: 'test', - message: 'something broke' -}); - -var err = new gutil.PluginError('test', 'something broke'); - -var err = new gutil.PluginError('test', 'something broke', {showStack: true}); - -var existingError = new Error('OMG'); -var err = new gutil.PluginError('test', existingError, {showStack: true}); -``` - -[npm-url]: https://npmjs.org/package/gulp-util -[npm-image]: https://badge.fury.io/js/gulp-util.png -[travis-url]: https://travis-ci.org/gulpjs/gulp-util -[travis-image]: https://travis-ci.org/gulpjs/gulp-util.png?branch=master -[coveralls-url]: https://coveralls.io/r/gulpjs/gulp-util -[coveralls-image]: https://coveralls.io/repos/gulpjs/gulp-util/badge.png -[depstat-url]: https://david-dm.org/gulpjs/gulp-util -[depstat-image]: https://david-dm.org/gulpjs/gulp-util.png diff --git a/node_modules/gulp-sass/node_modules/gulp-util/index.js b/node_modules/gulp-sass/node_modules/gulp-util/index.js deleted file mode 100644 index 6746ee4b..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/index.js +++ /dev/null @@ -1,18 +0,0 @@ -module.exports = { - File: require('./lib/File'), - replaceExtension: require('./lib/replaceExtension'), - colors: require('./lib/colors'), - date: require('./lib/date'), - log: require('./lib/log'), - template: require('./lib/template'), - env: require('./lib/env'), - beep: require('./lib/beep'), - noop: require('./lib/noop'), - isStream: require('./lib/isStream'), - isBuffer: require('./lib/isBuffer'), - isNull: require('./lib/isNull'), - linefeed: require('./lib/linefeed'), - combine: require('./lib/combine'), - buffer: require('./lib/buffer'), - PluginError: require('./lib/PluginError') -}; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/lib/File.js b/node_modules/gulp-sass/node_modules/gulp-util/lib/File.js deleted file mode 100644 index 690a508a..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/lib/File.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('vinyl'); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/lib/PluginError.js b/node_modules/gulp-sass/node_modules/gulp-util/lib/PluginError.js deleted file mode 100644 index 96555672..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/lib/PluginError.js +++ /dev/null @@ -1,65 +0,0 @@ -var util = require('util'); -var colors = require('./colors'); - -// wow what a clusterfuck -var parseOptions = function(plugin, message, opt) { - if (!opt) opt = {}; - if (typeof plugin === 'object') { - opt = plugin; - } else if (message instanceof Error) { - opt.message = message; - opt.plugin = plugin; - } else if (typeof message === 'object') { - opt = message; - opt.plugin = plugin; - } else if (typeof opt === 'object') { - opt.plugin = plugin; - opt.message = message; - } - return opt; -}; - -function PluginError(plugin, message, opt) { - if (!(this instanceof PluginError)) throw new Error('Call PluginError using new'); - - Error.call(this); - - var options = parseOptions(plugin, message, opt); - - this.plugin = options.plugin; - this.showStack = options.showStack; - - // if message is an Error grab crap off it - if (options.message instanceof Error) { - this.name = options.message.name; - this.message = options.message.message; - this.fileName = options.message.fileName; - this.lineNumber = options.message.lineNumber; - this.stack = options.message.stack; - } else { // else check options obj - this.name = options.name; - this.message = options.message; - this.fileName = options.fileName; - this.lineNumber = options.lineNumber; - this.stack = options.stack; - } - - // defaults - if (!this.name) this.name = 'Error'; - - // TODO: figure out why this explodes mocha - if (!this.stack) Error.captureStackTrace(this, arguments.callee || this.constructor); - - if (!this.plugin) throw new Error('Missing plugin name'); - if (!this.message) throw new Error('Missing error message'); -} - -util.inherits(PluginError, Error); - -PluginError.prototype.toString = function () { - var sig = '['+colors.green('gulp')+'] '+this.name+' in plugin \''+colors.cyan(this.plugin)+'\''; - var msg = this.showStack ? (this._stack || this.stack) : this.message; - return sig+': '+msg; -}; - -module.exports = PluginError; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/lib/beep.js b/node_modules/gulp-sass/node_modules/gulp-util/lib/beep.js deleted file mode 100644 index 5473d754..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/lib/beep.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function() { - process.stdout.write('\x07'); -}; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/lib/buffer.js b/node_modules/gulp-sass/node_modules/gulp-util/lib/buffer.js deleted file mode 100644 index 4cb064ac..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/lib/buffer.js +++ /dev/null @@ -1,15 +0,0 @@ -var through = require('through2'); - -module.exports = function(fn) { - var buf = []; - var end = function(cb) { - this.push(buf); - cb(); - if(fn) fn(null, buf); - }; - var push = function(data, enc, cb) { - buf.push(data); - cb(); - }; - return through.obj(push, end); -}; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/lib/colors.js b/node_modules/gulp-sass/node_modules/gulp-util/lib/colors.js deleted file mode 100644 index bc804940..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/lib/colors.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('chalk'); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/lib/combine.js b/node_modules/gulp-sass/node_modules/gulp-util/lib/combine.js deleted file mode 100644 index f20712d2..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/lib/combine.js +++ /dev/null @@ -1,11 +0,0 @@ -var pipeline = require('multipipe'); - -module.exports = function(){ - var args = arguments; - if (args.length === 1 && Array.isArray(args[0])) { - args = args[0]; - } - return function(){ - return pipeline.apply(pipeline, args); - }; -}; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/lib/date.js b/node_modules/gulp-sass/node_modules/gulp-util/lib/date.js deleted file mode 100644 index 935793cc..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/lib/date.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('dateformat'); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/lib/env.js b/node_modules/gulp-sass/node_modules/gulp-util/lib/env.js deleted file mode 100644 index ea1e03e4..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/lib/env.js +++ /dev/null @@ -1,4 +0,0 @@ -var parseArgs = require('minimist'); -var argv = parseArgs(process.argv.slice(2)); - -module.exports = argv; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/lib/isBuffer.js b/node_modules/gulp-sass/node_modules/gulp-util/lib/isBuffer.js deleted file mode 100644 index 0e23782c..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/lib/isBuffer.js +++ /dev/null @@ -1,7 +0,0 @@ -var buf = require('buffer'); -var Buffer = buf.Buffer; - -// could use Buffer.isBuffer but this is the same exact thing... -module.exports = function(o) { - return typeof o === 'object' && o instanceof Buffer; -}; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/lib/isNull.js b/node_modules/gulp-sass/node_modules/gulp-util/lib/isNull.js deleted file mode 100644 index 403bb30e..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/lib/isNull.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function(v) { - return v === null; -}; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/lib/isStream.js b/node_modules/gulp-sass/node_modules/gulp-util/lib/isStream.js deleted file mode 100644 index 9ce0929b..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/lib/isStream.js +++ /dev/null @@ -1,5 +0,0 @@ -var Stream = require('stream').Stream; - -module.exports = function(o) { - return !!o && o instanceof Stream; -}; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/lib/linefeed.js b/node_modules/gulp-sass/node_modules/gulp-util/lib/linefeed.js deleted file mode 100644 index 5b0dfa4b..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/lib/linefeed.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = '\n'; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/lib/log.js b/node_modules/gulp-sass/node_modules/gulp-util/lib/log.js deleted file mode 100644 index cdbb22fc..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/lib/log.js +++ /dev/null @@ -1,9 +0,0 @@ -var colors = require('./colors'); - -module.exports = function(){ - var sig = '['+colors.green('gulp')+']'; - var args = Array.prototype.slice.call(arguments); - args.unshift(sig); - console.log.apply(console, args); - return this; -}; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/lib/noop.js b/node_modules/gulp-sass/node_modules/gulp-util/lib/noop.js deleted file mode 100644 index 7862cb16..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/lib/noop.js +++ /dev/null @@ -1,5 +0,0 @@ -var through = require('through2'); - -module.exports = function () { - return through.obj(); -}; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/lib/replaceExtension.js b/node_modules/gulp-sass/node_modules/gulp-util/lib/replaceExtension.js deleted file mode 100644 index 3f76938e..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/lib/replaceExtension.js +++ /dev/null @@ -1,9 +0,0 @@ -var path = require('path'); - -module.exports = function(npath, ext) { - if (typeof npath !== 'string') return npath; - if (npath.length === 0) return npath; - - var nFileName = path.basename(npath, path.extname(npath))+ext; - return path.join(path.dirname(npath), nFileName); -}; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/lib/template.js b/node_modules/gulp-sass/node_modules/gulp-util/lib/template.js deleted file mode 100644 index c467820f..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/lib/template.js +++ /dev/null @@ -1,19 +0,0 @@ -var template = require('lodash.template'); -var reInterpolate = require('lodash._reinterpolate'); - -var forcedSettings = { - escape: /<%-([\s\S]+?)%>/g, - evaluate: /<%([\s\S]+?)%>/g, - interpolate: reInterpolate -}; - -module.exports = function(tmpl, data){ - var fn = template(tmpl, null, forcedSettings); - - var wrapped = function(o) { - if (typeof o === 'undefined' || typeof o.file === 'undefined') throw new Error('Failed to provide the current file as "file" to the template'); - return fn(o); - }; - - return (data ? wrapped(data) : wrapped); -}; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/index.js deleted file mode 100644 index a21f7022..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/index.js +++ /dev/null @@ -1,63 +0,0 @@ -'use strict'; -var ansi = require('ansi-styles'); -var stripAnsi = require('strip-ansi'); -var hasColor = require('has-color'); -var defineProps = Object.defineProperties; -var chalk = module.exports; - -var styles = (function () { - var ret = {}; - - ansi.grey = ansi.gray; - - Object.keys(ansi).forEach(function (key) { - ret[key] = { - get: function () { - this._styles.push(key); - return this; - } - }; - }); - - return ret; -})(); - -function init() { - var ret = {}; - - Object.keys(styles).forEach(function (name) { - ret[name] = { - get: function () { - var obj = defineProps(function self() { - var str = [].slice.call(arguments).join(' '); - - if (!chalk.enabled) { - return str; - } - - return self._styles.reduce(function (str, name) { - var code = ansi[name]; - return str ? code.open + str + code.close : ''; - }, str); - }, styles); - - obj._styles = []; - - return obj[name]; - } - } - }); - - return ret; -} - -defineProps(chalk, init()); - -chalk.styles = ansi; -chalk.stripColor = stripAnsi; -chalk.supportsColor = hasColor; - -// detect mode if not set manually -if (chalk.enabled === undefined) { - chalk.enabled = chalk.supportsColor; -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/strip-ansi b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/strip-ansi deleted file mode 120000 index b65c9f81..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/strip-ansi +++ /dev/null @@ -1 +0,0 @@ -../strip-ansi/cli.js \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js deleted file mode 100644 index 3da548c4..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; -var styles = module.exports; - -var codes = { - reset: [0, 0], - - bold: [1, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - strikethrough: [9, 29], - - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39], - - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49] -}; - -Object.keys(codes).forEach(function (key) { - var val = codes[key]; - var style = styles[key] = {}; - style.open = '\x1b[' + val[0] + 'm'; - style.close = '\x1b[' + val[1] + 'm'; -}); diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/package.json deleted file mode 100644 index 2d61dabe..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "ansi-styles", - "version": "1.0.0", - "description": "ANSI escape codes for colorizing strings in the terminal", - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "homepage": "https://github.com/sindresorhus/ansi-styles", - "bugs": { - "url": "https://github.com/sindresorhus/ansi-styles/issues" - }, - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "ansi-styles.js" - ], - "main": "ansi-styles", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/ansi-styles.git" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "readme": "# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles)\n\n> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for colorizing strings in the terminal.\n\nYou probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings.\n\n![screenshot](screenshot.png)\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles`\n\n\n## Example\n\n```js\nvar ansi = require('ansi-styles');\n\nconsole.log(ansi.green.open + 'Hello world!' + ansi.green.close);\n```\n\n## API\n\nEach style has an `open` and `close` property.\n\n\n## Styles\n\n### General\n\n- reset\n- bold\n- italic\n- underline\n- inverse\n- strikethrough\n\n### Text colors\n\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n\n### Background colors\n\n- bgBlack\n- bgRed\n- bgGreen\n- bgYellow\n- bgBlue\n- bgMagenta\n- bgCyan\n- bgWhite\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "_id": "ansi-styles@1.0.0", - "_from": "ansi-styles@~1.0.0" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/readme.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/readme.md deleted file mode 100644 index 4ac8cbd0..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,65 +0,0 @@ -# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles) - -> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for colorizing strings in the terminal. - -You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings. - -![screenshot](screenshot.png) - - -## Install - -Install with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles` - - -## Example - -```js -var ansi = require('ansi-styles'); - -console.log(ansi.green.open + 'Hello world!' + ansi.green.close); -``` - -## API - -Each style has an `open` and `close` property. - - -## Styles - -### General - -- reset -- bold -- italic -- underline -- inverse -- strikethrough - -### Text colors - -- black -- red -- green -- yellow -- blue -- magenta -- cyan -- white -- gray - -### Background colors - -- bgBlack -- bgRed -- bgGreen -- bgYellow -- bgBlue -- bgMagenta -- bgCyan -- bgWhite - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/has-color.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/has-color.js deleted file mode 100644 index 27316b1f..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/has-color.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; -module.exports = (function () { - if (process.argv.indexOf('--no-color') !== -1) { - return false; - } - - if (process.argv.indexOf('--color') !== -1) { - return true; - } - - if (!process.stdout.isTTY) { - return false; - } - - if (process.platform === 'win32') { - return true; - } - - if ('COLORTERM' in process.env) { - return true; - } - - return /^screen|^xterm|color|ansi|cygwin|linux/i.test(process.env.TERM); -})(); diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/package.json deleted file mode 100644 index e55a6244..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "has-color", - "version": "0.1.4", - "description": "Detect whether a terminal supports color", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "capability", - "detect" - ], - "homepage": "https://github.com/sindresorhus/has-color", - "bugs": { - "url": "https://github.com/sindresorhus/has-color/issues" - }, - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "has-color.js" - ], - "main": "has-color", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/has-color.git" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "readme": "# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color)\n\n> Detect whether a terminal supports color.\n\nUsed in the terminal color module [chalk](https://github.com/sindresorhus/chalk).\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/has-color): `npm install --save has-color`\n\n\n## Example\n\n```js\nvar hasColor = require('has-color');\n\nif (hasColor) {\n\tconsole.log('Terminal supports color.');\n}\n```\n\nIt obeys the CLI flags `--color` and `--no-color`.\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "_id": "has-color@0.1.4", - "_from": "has-color@~0.1.0" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/readme.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/readme.md deleted file mode 100644 index 0918c851..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color) - -> Detect whether a terminal supports color. - -Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). - - -## Install - -Install with [npm](https://npmjs.org/package/has-color): `npm install --save has-color` - - -## Example - -```js -var hasColor = require('has-color'); - -if (hasColor) { - console.log('Terminal supports color.'); -} -``` - -It obeys the CLI flags `--color` and `--no-color`. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/cli.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/cli.js deleted file mode 100755 index f8019cda..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/cli.js +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env node -'use strict'; -var fs = require('fs'); -var strip = require('./index'); -var input = process.argv[2]; - -if (process.argv.indexOf('-h') !== -1 || process.argv.indexOf('--help') !== -1) { - console.log('strip-ansi <input file> > <output file>'); - console.log('or'); - console.log('cat <input file> | strip-ansi > <output file>'); - return; -} - -if (process.argv.indexOf('-v') !== -1 || process.argv.indexOf('--version') !== -1) { - console.log(require('./package').version); - return; -} - -if (input) { - process.stdout.write(strip(fs.readFileSync(input, 'utf8'))); - return; -} - -process.stdin.setEncoding('utf8'); -process.stdin.on('data', function (data) { - process.stdout.write(strip(data)); -}); diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/index.js deleted file mode 100644 index 62320c59..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -module.exports = function (str) { - return typeof str === 'string' ? str.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, '') : str; -}; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/package.json deleted file mode 100644 index 7ca2b5d1..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "strip-ansi", - "version": "0.1.1", - "description": "Strip ANSI escape codes (used for colorizing strings in the terminal)", - "license": "MIT", - "bin": { - "strip-ansi": "cli.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/strip-ansi" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.8.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js", - "cli.js" - ], - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "devDependencies": { - "mocha": "~1.x" - }, - "readme": "# strip-ansi [![Build Status](https://secure.travis-ci.org/sindresorhus/strip-ansi.png?branch=master)](http://travis-ci.org/sindresorhus/strip-ansi)\n\n> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) (used for colorizing strings in the terminal)\n\nUsed in the terminal color module [chalk](https://github.com/sindresorhus/chalk).\n\n\n## Install\n\nInstall locally with [npm](https://npmjs.org/package/strip-ansi):\n\n```\nnpm install --save strip-ansi\n```\n\nOr globally if you want to use it as a CLI app:\n\n```\nnpm install --global strip-ansi\n```\n\nYou can then use it in your Terminal like:\n\n```\nstrip-ansi file-with-color-codes\n```\n\nOr pipe something to it:\n\n```\nls | strip-ansi\n```\n\n\n## Example\n\n```js\nvar stripAnsi = require('strip-ansi');\nstripAnsi('\\x1b[4mcake\\x1b[0m');\n//=> cake\n```\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "bugs": { - "url": "https://github.com/sindresorhus/strip-ansi/issues" - }, - "homepage": "https://github.com/sindresorhus/strip-ansi", - "_id": "strip-ansi@0.1.1", - "_from": "strip-ansi@~0.1.0" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/readme.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/readme.md deleted file mode 100644 index eb661b3d..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/readme.md +++ /dev/null @@ -1,46 +0,0 @@ -# strip-ansi [![Build Status](https://secure.travis-ci.org/sindresorhus/strip-ansi.png?branch=master)](http://travis-ci.org/sindresorhus/strip-ansi) - -> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) (used for colorizing strings in the terminal) - -Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). - - -## Install - -Install locally with [npm](https://npmjs.org/package/strip-ansi): - -``` -npm install --save strip-ansi -``` - -Or globally if you want to use it as a CLI app: - -``` -npm install --global strip-ansi -``` - -You can then use it in your Terminal like: - -``` -strip-ansi file-with-color-codes -``` - -Or pipe something to it: - -``` -ls | strip-ansi -``` - - -## Example - -```js -var stripAnsi = require('strip-ansi'); -stripAnsi('\x1b[4mcake\x1b[0m'); -//=> cake -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/package.json deleted file mode 100644 index 853b0144..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "chalk", - "version": "0.4.0", - "description": "Terminal string styling done right. Created because the `colors` module does some really horrible things.", - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/chalk" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.8.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js" - ], - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "ansi", - "styles", - "tty", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "has-color": "~0.1.0", - "ansi-styles": "~1.0.0", - "strip-ansi": "~0.1.0" - }, - "devDependencies": { - "mocha": "~1.x" - }, - "readme": "# <img width=\"250\" src=\"logo.png\" alt=\"chalk\">\n\n> Terminal string styling done right\n\n[![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk)\n\n[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough.\n\n**Chalk is a clean and focused alternative.**\n\n![screenshot](screenshot.png)\n\n\n## Why\n\n- **Doesn't extend String.prototype**\n- Expressive API\n- Clean and focused\n- Auto-detects color support\n- Actively maintained\n- [Used by 150+ modules](https://npmjs.org/browse/depended/chalk)\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/chalk): `npm install --save chalk`\n\n\n## Example\n\nChalk comes with an easy to use composable API where you just chain and nest the styles you want.\n\n```js\nvar chalk = require('chalk');\n\n// style a string\nconsole.log( chalk.blue('Hello world!') );\n\n// combine styled and normal strings\nconsole.log( chalk.blue('Hello'), 'World' + chalk.red('!') );\n\n// compose multiple styles using the chainable API\nconsole.log( chalk.blue.bgRed.bold('Hello world!') );\n\n// nest styles\nconsole.log( chalk.red('Hello', chalk.underline.bgBlue('world') + '!') );\n\n// pass in multiple arguments\nconsole.log( chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz') );\n```\n\nYou can easily define your own themes.\n\n```js\nvar chalk = require('chalk');\nvar error = chalk.bold.red;\nconsole.log(error('Error!'));\n```\n\n\n## API\n\n### chalk.`<style>[.<style>...](string, [string...])`\n\nExample: `chalk.red.bold.underline('Hello', 'world');`\n\nChain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter.\n\nMultiple arguments will be separated by space.\n\n### chalk.enabled\n\nColor support is automatically detected, but you can override it.\n\n### chalk.supportsColor\n\nDetect whether the terminal [supports color](https://github.com/sindresorhus/has-color).\n\nCan be overridden by the user with the flags `--color` and `--no-color`.\n\nUsed internally and handled for you, but exposed for convenience.\n\n### chalk.styles\n\nExposes the styles as [ANSI escape codes](https://github.com/sindresorhus/ansi-styles).\n\nGenerally not useful, but you might need just the `.open` or `.close` escape code if you're mixing externally styled strings with yours.\n\n```js\nvar chalk = require('chalk');\n\nconsole.log(chalk.styles.red);\n//=> {open: '\\x1b[31m', close: '\\x1b[39m'}\n\nconsole.log(chalk.styles.red.open + 'Hello' + chalk.styles.red.close);\n```\n\n### chalk.stripColor(string)\n\n[Strip color](https://github.com/sindresorhus/strip-ansi) from a string.\n\nCan be useful in combination with `.supportsColor` to strip color on externally styled text when it's not supported.\n\nExample:\n\n```js\nvar chalk = require('chalk');\nvar styledString = fromExternal();\n\nif (!chalk.supportsColor) {\n\tchalk.stripColor(styledString);\n}\n```\n\n\n## Styles\n\n### General\n\n- reset\n- bold\n- italic\n- underline\n- inverse\n- strikethrough\n\n### Text colors\n\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n\n### Background colors\n\n- bgBlack\n- bgRed\n- bgGreen\n- bgYellow\n- bgBlue\n- bgMagenta\n- bgCyan\n- bgWhite\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n\n\n-\n\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/sindresorhus/chalk/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n", - "readmeFilename": "readme.md", - "bugs": { - "url": "https://github.com/sindresorhus/chalk/issues" - }, - "homepage": "https://github.com/sindresorhus/chalk", - "_id": "chalk@0.4.0", - "_from": "chalk@~0.4.0" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/readme.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/readme.md deleted file mode 100644 index 46813acf..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/chalk/readme.md +++ /dev/null @@ -1,158 +0,0 @@ -# <img width="250" src="logo.png" alt="chalk"> - -> Terminal string styling done right - -[![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk) - -[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough. - -**Chalk is a clean and focused alternative.** - -![screenshot](screenshot.png) - - -## Why - -- **Doesn't extend String.prototype** -- Expressive API -- Clean and focused -- Auto-detects color support -- Actively maintained -- [Used by 150+ modules](https://npmjs.org/browse/depended/chalk) - - -## Install - -Install with [npm](https://npmjs.org/package/chalk): `npm install --save chalk` - - -## Example - -Chalk comes with an easy to use composable API where you just chain and nest the styles you want. - -```js -var chalk = require('chalk'); - -// style a string -console.log( chalk.blue('Hello world!') ); - -// combine styled and normal strings -console.log( chalk.blue('Hello'), 'World' + chalk.red('!') ); - -// compose multiple styles using the chainable API -console.log( chalk.blue.bgRed.bold('Hello world!') ); - -// nest styles -console.log( chalk.red('Hello', chalk.underline.bgBlue('world') + '!') ); - -// pass in multiple arguments -console.log( chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz') ); -``` - -You can easily define your own themes. - -```js -var chalk = require('chalk'); -var error = chalk.bold.red; -console.log(error('Error!')); -``` - - -## API - -### chalk.`<style>[.<style>...](string, [string...])` - -Example: `chalk.red.bold.underline('Hello', 'world');` - -Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter. - -Multiple arguments will be separated by space. - -### chalk.enabled - -Color support is automatically detected, but you can override it. - -### chalk.supportsColor - -Detect whether the terminal [supports color](https://github.com/sindresorhus/has-color). - -Can be overridden by the user with the flags `--color` and `--no-color`. - -Used internally and handled for you, but exposed for convenience. - -### chalk.styles - -Exposes the styles as [ANSI escape codes](https://github.com/sindresorhus/ansi-styles). - -Generally not useful, but you might need just the `.open` or `.close` escape code if you're mixing externally styled strings with yours. - -```js -var chalk = require('chalk'); - -console.log(chalk.styles.red); -//=> {open: '\x1b[31m', close: '\x1b[39m'} - -console.log(chalk.styles.red.open + 'Hello' + chalk.styles.red.close); -``` - -### chalk.stripColor(string) - -[Strip color](https://github.com/sindresorhus/strip-ansi) from a string. - -Can be useful in combination with `.supportsColor` to strip color on externally styled text when it's not supported. - -Example: - -```js -var chalk = require('chalk'); -var styledString = fromExternal(); - -if (!chalk.supportsColor) { - chalk.stripColor(styledString); -} -``` - - -## Styles - -### General - -- reset -- bold -- italic -- underline -- inverse -- strikethrough - -### Text colors - -- black -- red -- green -- yellow -- blue -- magenta -- cyan -- white -- gray - -### Background colors - -- bgBlack -- bgRed -- bgGreen -- bgYellow -- bgBlue -- bgMagenta -- bgCyan -- bgWhite - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) - - -- - -[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/sindresorhus/chalk/trend.png)](https://bitdeli.com/free "Bitdeli Badge") diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/dateformat/LICENSE b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/dateformat/LICENSE deleted file mode 100644 index 57d44e2a..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/dateformat/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -(c) 2007-2009 Steven Levithan <stevenlevithan.com> - -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/node_modules/gulp-sass/node_modules/gulp-util/node_modules/dateformat/Readme.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/dateformat/Readme.md deleted file mode 100644 index 12f9872d..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/dateformat/Readme.md +++ /dev/null @@ -1,79 +0,0 @@ -# dateformat - -A node.js package for Steven Levithan's excellent [dateFormat()][dateformat] function. - -## Modifications - -* Removed the `Date.prototype.format` method. Sorry folks, but extending native prototypes is for suckers. -* Added a `module.exports = dateFormat;` statement at the bottom -* Added the placeholder `N` to get the ISO 8601 numeric representation of the day of the week - -## Installation - -```bash -$ npm install dateformat -``` - -## Usage - -As taken from Steven's post, modified to match the Modifications listed above: -```js - var dateFormat = require('dateformat'); - var now = new Date(); - - // Basic usage - dateFormat(now, "dddd, mmmm dS, yyyy, h:MM:ss TT"); - // Saturday, June 9th, 2007, 5:46:21 PM - - // You can use one of several named masks - dateFormat(now, "isoDateTime"); - // 2007-06-09T17:46:21 - - // ...Or add your own - dateFormat.masks.hammerTime = 'HH:MM! "Can\'t touch this!"'; - dateFormat(now, "hammerTime"); - // 17:46! Can't touch this! - - // When using the standalone dateFormat function, - // you can also provide the date as a string - dateFormat("Jun 9 2007", "fullDate"); - // Saturday, June 9, 2007 - - // Note that if you don't include the mask argument, - // dateFormat.masks.default is used - dateFormat(now); - // Sat Jun 09 2007 17:46:21 - - // And if you don't include the date argument, - // the current date and time is used - dateFormat(); - // Sat Jun 09 2007 17:46:22 - - // You can also skip the date argument (as long as your mask doesn't - // contain any numbers), in which case the current date/time is used - dateFormat("longTime"); - // 5:46:22 PM EST - - // And finally, you can convert local time to UTC time. Simply pass in - // true as an additional argument (no argument skipping allowed in this case): - dateFormat(now, "longTime", true); - // 10:46:21 PM UTC - - // ...Or add the prefix "UTC:" or "GMT:" to your mask. - dateFormat(now, "UTC:h:MM:ss TT Z"); - // 10:46:21 PM UTC - - // You can also get the ISO 8601 week of the year: - dateFormat(now, "W"); - // 42 - - // and also get the ISO 8601 numeric representation of the day of the week: - dateFormat(now,"N"); - // 6 -``` -## License - -(c) 2007-2009 Steven Levithan [stevenlevithan.com][stevenlevithan], MIT license. - -[dateformat]: http://blog.stevenlevithan.com/archives/date-time-format -[stevenlevithan]: http://stevenlevithan.com/ diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/dateformat/lib/dateformat.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/dateformat/lib/dateformat.js deleted file mode 100644 index e1c38245..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/dateformat/lib/dateformat.js +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Date Format 1.2.3 - * (c) 2007-2009 Steven Levithan <stevenlevithan.com> - * MIT license - * - * Includes enhancements by Scott Trenda <scott.trenda.net> - * and Kris Kowal <cixar.com/~kris.kowal/> - * - * Accepts a date, a mask, or a date and a mask. - * Returns a formatted version of the given date. - * The date defaults to the current date/time. - * The mask defaults to dateFormat.masks.default. - */ - -var dateFormat = function () { - var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|"[^"]*"|'[^']*'/g, - timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g, - timezoneClip = /[^-+\dA-Z]/g, - pad = function (val, len) { - val = String(val); - len = len || 2; - while (val.length < len) val = "0" + val; - return val; - }, - /** - * Get the ISO 8601 week number - * Based on comments from - * http://techblog.procurios.nl/k/n618/news/view/33796/14863/Calculate-ISO-8601-week-and-year-in-javascript.html - */ - getWeek = function (date) { - // Remove time components of date - var targetThursday = new Date(date.getFullYear(), date.getMonth(), date.getDate()); - - // Change date to Thursday same week - targetThursday.setDate(targetThursday.getDate() - ((targetThursday.getDay() + 6) % 7) + 3); - - // Take January 4th as it is always in week 1 (see ISO 8601) - var firstThursday = new Date(targetThursday.getFullYear(), 0, 4); - - // Change date to Thursday same week - firstThursday.setDate(firstThursday.getDate() - ((firstThursday.getDay() + 6) % 7) + 3); - - // Check if daylight-saving-time-switch occured and correct for it - var ds = targetThursday.getTimezoneOffset() - firstThursday.getTimezoneOffset(); - targetThursday.setHours(targetThursday.getHours() - ds); - - // Number of weeks between target Thursday and first Thursday - var weekDiff = (targetThursday - firstThursday) / (86400000*7); - return 1 + weekDiff; - }, - - /** - * Get ISO-8601 numeric representation of the day of the week - * 1 (for Monday) through 7 (for Sunday) - */ - - getDayOfWeek = function(date){ - var dow = date.getDay(); - if(dow === 0) dow = 7; - return dow; - }; - - // Regexes and supporting functions are cached through closure - return function (date, mask, utc, gmt) { - var dF = dateFormat; - - // You can't provide utc if you skip other args (use the "UTC:" mask prefix) - if (arguments.length == 1 && Object.prototype.toString.call(date) == "[object String]" && !/\d/.test(date)) { - mask = date; - date = undefined; - } - - date = date || new Date; - - if(!(date instanceof Date)) { - date = new Date(date); - } - - if (isNaN(date)) { - throw TypeError("Invalid date"); - } - - mask = String(dF.masks[mask] || mask || dF.masks["default"]); - - // Allow setting the utc/gmt argument via the mask - var maskSlice = mask.slice(0, 4); - if (maskSlice == "UTC:" || maskSlice == "GMT:") { - mask = mask.slice(4); - utc = true; - if (maskSlice == "GMT:") { - gmt = true; - } - } - - var _ = utc ? "getUTC" : "get", - d = date[_ + "Date"](), - D = date[_ + "Day"](), - m = date[_ + "Month"](), - y = date[_ + "FullYear"](), - H = date[_ + "Hours"](), - M = date[_ + "Minutes"](), - s = date[_ + "Seconds"](), - L = date[_ + "Milliseconds"](), - o = utc ? 0 : date.getTimezoneOffset(), - W = getWeek(date), - N = getDayOfWeek(date), - flags = { - d: d, - dd: pad(d), - ddd: dF.i18n.dayNames[D], - dddd: dF.i18n.dayNames[D + 7], - m: m + 1, - mm: pad(m + 1), - mmm: dF.i18n.monthNames[m], - mmmm: dF.i18n.monthNames[m + 12], - yy: String(y).slice(2), - yyyy: y, - h: H % 12 || 12, - hh: pad(H % 12 || 12), - H: H, - HH: pad(H), - M: M, - MM: pad(M), - s: s, - ss: pad(s), - l: pad(L, 3), - L: pad(L > 99 ? Math.round(L / 10) : L), - t: H < 12 ? "a" : "p", - tt: H < 12 ? "am" : "pm", - T: H < 12 ? "A" : "P", - TT: H < 12 ? "AM" : "PM", - Z: gmt ? "GMT" : utc ? "UTC" : (String(date).match(timezone) || [""]).pop().replace(timezoneClip, ""), - o: (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4), - S: ["th", "st", "nd", "rd"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10], - W: W, - N: N - }; - - return mask.replace(token, function ($0) { - return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1); - }); - }; -}(); - -// Some common format strings -dateFormat.masks = { - "default": "ddd mmm dd yyyy HH:MM:ss", - shortDate: "m/d/yy", - mediumDate: "mmm d, yyyy", - longDate: "mmmm d, yyyy", - fullDate: "dddd, mmmm d, yyyy", - shortTime: "h:MM TT", - mediumTime: "h:MM:ss TT", - longTime: "h:MM:ss TT Z", - isoDate: "yyyy-mm-dd", - isoTime: "HH:MM:ss", - isoDateTime: "yyyy-mm-dd'T'HH:MM:ss", - isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'", - expiresHeaderFormat: "ddd, dd mmm yyyy HH:MM:ss Z" -}; - -// Internationalization strings -dateFormat.i18n = { - dayNames: [ - "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", - "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" - ], - monthNames: [ - "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", - "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" - ] -}; - -/* -// For convenience... -Date.prototype.format = function (mask, utc) { - return dateFormat(this, mask, utc); -}; -*/ - -if (typeof exports !== "undefined") { - module.exports = dateFormat; -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/dateformat/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/dateformat/package.json deleted file mode 100644 index deee5fee..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/dateformat/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "dateformat", - "description": "A node.js package for Steven Levithan's excellent dateFormat() function.", - "maintainers": "Felix Geisendörfer <felix@debuggable.com>", - "homepage": "https://github.com/felixge/node-dateformat", - "author": { - "name": "Steven Levithan" - }, - "contributors": [ - { - "name": "Steven Levithan" - }, - { - "name": "Felix Geisendörfer", - "email": "felix@debuggable.com" - }, - { - "name": "Christoph Tavan", - "email": "dev@tavan.de" - } - ], - "version": "1.0.7-1.2.3", - "main": "./lib/dateformat", - "dependencies": {}, - "devDependencies": {}, - "engines": { - "node": "*" - }, - "repository": { - "type": "git", - "url": "https://github.com/felixge/node-dateformat.git" - }, - "readme": "# dateformat\n\nA node.js package for Steven Levithan's excellent [dateFormat()][dateformat] function.\n\n## Modifications\n\n* Removed the `Date.prototype.format` method. Sorry folks, but extending native prototypes is for suckers.\n* Added a `module.exports = dateFormat;` statement at the bottom\n* Added the placeholder `N` to get the ISO 8601 numeric representation of the day of the week\n\n## Installation\n\n```bash\n$ npm install dateformat\n```\n\n## Usage\n\nAs taken from Steven's post, modified to match the Modifications listed above:\n```js\n var dateFormat = require('dateformat');\n var now = new Date();\n\n // Basic usage\n dateFormat(now, \"dddd, mmmm dS, yyyy, h:MM:ss TT\");\n // Saturday, June 9th, 2007, 5:46:21 PM\n\n // You can use one of several named masks\n dateFormat(now, \"isoDateTime\");\n // 2007-06-09T17:46:21\n\n // ...Or add your own\n dateFormat.masks.hammerTime = 'HH:MM! \"Can\\'t touch this!\"';\n dateFormat(now, \"hammerTime\");\n // 17:46! Can't touch this!\n\n // When using the standalone dateFormat function,\n // you can also provide the date as a string\n dateFormat(\"Jun 9 2007\", \"fullDate\");\n // Saturday, June 9, 2007\n\n // Note that if you don't include the mask argument,\n // dateFormat.masks.default is used\n dateFormat(now);\n // Sat Jun 09 2007 17:46:21\n\n // And if you don't include the date argument,\n // the current date and time is used\n dateFormat();\n // Sat Jun 09 2007 17:46:22\n\n // You can also skip the date argument (as long as your mask doesn't\n // contain any numbers), in which case the current date/time is used\n dateFormat(\"longTime\");\n // 5:46:22 PM EST\n\n // And finally, you can convert local time to UTC time. Simply pass in\n // true as an additional argument (no argument skipping allowed in this case):\n dateFormat(now, \"longTime\", true);\n // 10:46:21 PM UTC\n\n // ...Or add the prefix \"UTC:\" or \"GMT:\" to your mask.\n dateFormat(now, \"UTC:h:MM:ss TT Z\");\n // 10:46:21 PM UTC\n\n // You can also get the ISO 8601 week of the year:\n dateFormat(now, \"W\");\n // 42\n\n // and also get the ISO 8601 numeric representation of the day of the week:\n dateFormat(now,\"N\");\n // 6\n```\n## License\n\n(c) 2007-2009 Steven Levithan [stevenlevithan.com][stevenlevithan], MIT license.\n\n[dateformat]: http://blog.stevenlevithan.com/archives/date-time-format\n[stevenlevithan]: http://stevenlevithan.com/\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/felixge/node-dateformat/issues" - }, - "_id": "dateformat@1.0.7-1.2.3", - "_from": "dateformat@~1.0.7-1.2.3" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/dateformat/test/basic.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/dateformat/test/basic.js deleted file mode 100644 index 9602a72a..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/dateformat/test/basic.js +++ /dev/null @@ -1,45 +0,0 @@ -var dateFormat = require('./lib/dateformat.js'); -var now = new Date(); - -// Basic usage -console.log(dateFormat(now, "dddd, mmmm dS, yyyy, h:MM:ss TT")); -// Saturday, June 9th, 2007, 5:46:21 PM - -// You can use one of several named masks -console.log(dateFormat(now, "isoDateTime")); -// 2007-06-09T17:46:21 - -// ...Or add your own -dateFormat.masks.hammerTime = 'HH:MM! "Can\'t touch this!"'; -console.log(dateFormat(now, "hammerTime")); -// 17:46! Can't touch this! - -// When using the standalone dateFormat function, -// you can also provide the date as a string -console.log(dateFormat("Jun 9 2007", "fullDate")); -// Saturday, June 9, 2007 - -// Note that if you don't include the mask argument, -// dateFormat.masks.default is used -console.log(dateFormat(now)); -// Sat Jun 09 2007 17:46:21 - -// And if you don't include the date argument, -// the current date and time is used -console.log(dateFormat()); -// Sat Jun 09 2007 17:46:22 - -// You can also skip the date argument (as long as your mask doesn't -// contain any numbers), in which case the current date/time is used -console.log(dateFormat("longTime")); -// 5:46:22 PM EST - -// And finally, you can convert local time to UTC time. Simply pass in -// true as an additional argument (no argument skipping allowed in this case): -console.log(dateFormat(now, "longTime", true)); -// 10:46:21 PM UTC - -// ...Or add the prefix "UTC:" to your mask. -console.log(dateFormat(now, "UTC:h:MM:ss TT Z")); -// 10:46:21 PM UTC - diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/dateformat/test/test_dayofweek.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/dateformat/test/test_dayofweek.js deleted file mode 100644 index 07780fa8..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/dateformat/test/test_dayofweek.js +++ /dev/null @@ -1,10 +0,0 @@ -var dateFormat = require('./../lib/dateformat'), - assert = require('assert'); - -var start = 10; // the 10 of March 2013 is a Sunday -for(var dow = 1; dow <= 7; dow++){ - var date = new Date('2013-03-' + (start + dow)); - var N = dateFormat(date,'N'); - assert.equal(N,dow); - console.log('The ISO-8601 numeric representation of the day "' + date.toString() + '" is ' + N); -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/dateformat/test/test_weekofyear.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/dateformat/test/test_weekofyear.js deleted file mode 100644 index d1ddbe81..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/dateformat/test/test_weekofyear.js +++ /dev/null @@ -1,4 +0,0 @@ -var dateFormat = require('../lib/dateformat.js'); - -var val = process.argv[2] || new Date(); -console.log(dateFormat(val, 'W')); diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/dateformat/test/test_weekofyear.sh b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/dateformat/test/test_weekofyear.sh deleted file mode 100644 index 3c3e69b3..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/dateformat/test/test_weekofyear.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -# this just takes php's date() function as a reference to check if week of year -# is calculated correctly in the range from 1970 .. 2038 by brute force... - -SEQ="seq" -SYSTEM=`uname` -if [ "$SYSTEM" = "Darwin" ]; then - SEQ="jot" -fi - -for YEAR in {1970..2038}; do - for MONTH in {1..12}; do - DAYS=$(cal $MONTH $YEAR | egrep "28|29|30|31" |tail -1 |awk '{print $NF}') - for DAY in $( $SEQ $DAYS ); do - DATE=$YEAR-$MONTH-$DAY - echo -n $DATE ... - NODEVAL=$(node test_weekofyear.js $DATE) - PHPVAL=$(php -r "echo intval(date('W', strtotime('$DATE')));") - if [ "$NODEVAL" -ne "$PHPVAL" ]; then - echo "MISMATCH: node: $NODEVAL vs php: $PHPVAL for date $DATE" - else - echo " OK" - fi - done - done -done diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash._reinterpolate/LICENSE.txt b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash._reinterpolate/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash._reinterpolate/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash._reinterpolate/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash._reinterpolate/README.md deleted file mode 100644 index d362e36d..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash._reinterpolate/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._reinterpolate v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `reInterpolate` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash._reinterpolate/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash._reinterpolate/index.js deleted file mode 100644 index 0bf92a5c..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash._reinterpolate/index.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** Used to match "interpolate" template delimiters */ -var reInterpolate = /<%=([\s\S]+?)%>/g; - -module.exports = reInterpolate; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash._reinterpolate/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash._reinterpolate/package.json deleted file mode 100644 index 85f64e7b..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash._reinterpolate/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "lodash._reinterpolate", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `reInterpolate` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._reinterpolate v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `reInterpolate` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._reinterpolate@2.4.1", - "_from": "lodash._reinterpolate@~2.4.1" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/LICENSE.txt b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/README.md deleted file mode 100644 index e89bd0db..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.template v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.template`](http://lodash.com/docs#template) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/index.js deleted file mode 100644 index 230f8ee8..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/index.js +++ /dev/null @@ -1,216 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var defaults = require('lodash.defaults'), - escape = require('lodash.escape'), - escapeStringChar = require('lodash._escapestringchar'), - keys = require('lodash.keys'), - reInterpolate = require('lodash._reinterpolate'), - templateSettings = require('lodash.templatesettings'), - values = require('lodash.values'); - -/** Used to match empty string literals in compiled template source */ -var reEmptyStringLeading = /\b__p \+= '';/g, - reEmptyStringMiddle = /\b(__p \+=) '' \+/g, - reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; - -/** - * Used to match ES6 template delimiters - * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-literals-string-literals - */ -var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; - -/** Used to ensure capturing order of template delimiters */ -var reNoMatch = /($^)/; - -/** Used to match unescaped characters in compiled string literals */ -var reUnescapedString = /['\n\r\t\u2028\u2029\\]/g; - -/** - * A micro-templating method that handles arbitrary delimiters, preserves - * whitespace, and correctly escapes quotes within interpolated code. - * - * Note: In the development build, `_.template` utilizes sourceURLs for easier - * debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl - * - * For more information on precompiling templates see: - * http://lodash.com/custom-builds - * - * For more information on Chrome extension sandboxes see: - * http://developer.chrome.com/stable/extensions/sandboxingEval.html - * - * @static - * @memberOf _ - * @category Utilities - * @param {string} text The template text. - * @param {Object} data The data object used to populate the text. - * @param {Object} [options] The options object. - * @param {RegExp} [options.escape] The "escape" delimiter. - * @param {RegExp} [options.evaluate] The "evaluate" delimiter. - * @param {Object} [options.imports] An object to import into the template as local variables. - * @param {RegExp} [options.interpolate] The "interpolate" delimiter. - * @param {string} [sourceURL] The sourceURL of the template's compiled source. - * @param {string} [variable] The data object variable name. - * @returns {Function|string} Returns a compiled function when no `data` object - * is given, else it returns the interpolated text. - * @example - * - * // using the "interpolate" delimiter to create a compiled template - * var compiled = _.template('hello <%= name %>'); - * compiled({ 'name': 'fred' }); - * // => 'hello fred' - * - * // using the "escape" delimiter to escape HTML in data property values - * _.template('<b><%- value %></b>', { 'value': '<script>' }); - * // => '<b><script></b>' - * - * // using the "evaluate" delimiter to generate HTML - * var list = '<% _.forEach(people, function(name) { %><li><%- name %></li><% }); %>'; - * _.template(list, { 'people': ['fred', 'barney'] }); - * // => '<li>fred</li><li>barney</li>' - * - * // using the ES6 delimiter as an alternative to the default "interpolate" delimiter - * _.template('hello ${ name }', { 'name': 'pebbles' }); - * // => 'hello pebbles' - * - * // using the internal `print` function in "evaluate" delimiters - * _.template('<% print("hello " + name); %>!', { 'name': 'barney' }); - * // => 'hello barney!' - * - * // using a custom template delimiters - * _.templateSettings = { - * 'interpolate': /{{([\s\S]+?)}}/g - * }; - * - * _.template('hello {{ name }}!', { 'name': 'mustache' }); - * // => 'hello mustache!' - * - * // using the `imports` option to import jQuery - * var list = '<% jq.each(people, function(name) { %><li><%- name %></li><% }); %>'; - * _.template(list, { 'people': ['fred', 'barney'] }, { 'imports': { 'jq': jQuery } }); - * // => '<li>fred</li><li>barney</li>' - * - * // using the `sourceURL` option to specify a custom sourceURL for the template - * var compiled = _.template('hello <%= name %>', null, { 'sourceURL': '/basic/greeting.jst' }); - * compiled(data); - * // => find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector - * - * // using the `variable` option to ensure a with-statement isn't used in the compiled template - * var compiled = _.template('hi <%= data.name %>!', null, { 'variable': 'data' }); - * compiled.source; - * // => function(data) { - * var __t, __p = '', __e = _.escape; - * __p += 'hi ' + ((__t = ( data.name )) == null ? '' : __t) + '!'; - * return __p; - * } - * - * // using the `source` property to inline compiled templates for meaningful - * // line numbers in error messages and a stack trace - * fs.writeFileSync(path.join(cwd, 'jst.js'), '\ - * var JST = {\ - * "main": ' + _.template(mainText).source + '\ - * };\ - * '); - */ -function template(text, data, options) { - // based on John Resig's `tmpl` implementation - // http://ejohn.org/blog/javascript-micro-templating/ - // and Laura Doktorova's doT.js - // https://github.com/olado/doT - var settings = templateSettings.imports._.templateSettings || templateSettings; - text = String(text || ''); - - // avoid missing dependencies when `iteratorTemplate` is not defined - options = defaults({}, options, settings); - - var imports = defaults({}, options.imports, settings.imports), - importsKeys = keys(imports), - importsValues = values(imports); - - var isEvaluating, - index = 0, - interpolate = options.interpolate || reNoMatch, - source = "__p += '"; - - // compile the regexp to match each delimiter - var reDelimiters = RegExp( - (options.escape || reNoMatch).source + '|' + - interpolate.source + '|' + - (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' + - (options.evaluate || reNoMatch).source + '|$' - , 'g'); - - text.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) { - interpolateValue || (interpolateValue = esTemplateValue); - - // escape characters that cannot be included in string literals - source += text.slice(index, offset).replace(reUnescapedString, escapeStringChar); - - // replace delimiters with snippets - if (escapeValue) { - source += "' +\n__e(" + escapeValue + ") +\n'"; - } - if (evaluateValue) { - isEvaluating = true; - source += "';\n" + evaluateValue + ";\n__p += '"; - } - if (interpolateValue) { - source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'"; - } - index = offset + match.length; - - // the JS engine embedded in Adobe products requires returning the `match` - // string in order to produce the correct `offset` value - return match; - }); - - source += "';\n"; - - // if `variable` is not specified, wrap a with-statement around the generated - // code to add the data object to the top of the scope chain - var variable = options.variable, - hasVariable = variable; - - if (!hasVariable) { - variable = 'obj'; - source = 'with (' + variable + ') {\n' + source + '\n}\n'; - } - // cleanup code by stripping empty strings - source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source) - .replace(reEmptyStringMiddle, '$1') - .replace(reEmptyStringTrailing, '$1;'); - - // frame code as the function body - source = 'function(' + variable + ') {\n' + - (hasVariable ? '' : variable + ' || (' + variable + ' = {});\n') + - "var __t, __p = '', __e = _.escape" + - (isEvaluating - ? ', __j = Array.prototype.join;\n' + - "function print() { __p += __j.call(arguments, '') }\n" - : ';\n' - ) + - source + - 'return __p\n}'; - - try { - var result = Function(importsKeys, 'return ' + source ).apply(undefined, importsValues); - } catch(e) { - e.source = source; - throw e; - } - if (data) { - return result(data); - } - // provide the compiled function's source by its `toString` method, in - // supported environments, or the `source` property as a convenience for - // inlining compiled templates during the build process - result.source = source; - return result; -} - -module.exports = template; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/LICENSE.txt b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/README.md deleted file mode 100644 index 6191a196..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._escapestringchar v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `escapeStringChar` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/index.js deleted file mode 100644 index f3b8c438..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/index.js +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** Used to escape characters for inclusion in compiled string literals */ -var stringEscapes = { - '\\': '\\', - "'": "'", - '\n': 'n', - '\r': 'r', - '\t': 't', - '\u2028': 'u2028', - '\u2029': 'u2029' -}; - -/** - * Used by `template` to escape characters for inclusion in compiled - * string literals. - * - * @private - * @param {string} match The matched character to escape. - * @returns {string} Returns the escaped character. - */ -function escapeStringChar(match) { - return '\\' + stringEscapes[match]; -} - -module.exports = escapeStringChar; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/package.json deleted file mode 100644 index 600f622a..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash._escapestringchar/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "lodash._escapestringchar", - "version": "2.4.1", - "description": "The internal Lo-Dash function `escapeStringChar` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._escapestringchar v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `escapeStringChar` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._escapestringchar@2.4.1", - "_from": "lodash._escapestringchar@~2.4.1" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/LICENSE.txt b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/README.md deleted file mode 100644 index da283fc4..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.defaults v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.defaults`](http://lodash.com/docs#defaults) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/index.js deleted file mode 100644 index 52eec906..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/index.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var keys = require('lodash.keys'), - objectTypes = require('lodash._objecttypes'); - -/** - * Assigns own enumerable properties of source object(s) to the destination - * object for all destination properties that resolve to `undefined`. Once a - * property is set, additional defaults of the same property will be ignored. - * - * @static - * @memberOf _ - * @type Function - * @category Objects - * @param {Object} object The destination object. - * @param {...Object} [source] The source objects. - * @param- {Object} [guard] Allows working with `_.reduce` without using its - * `key` and `object` arguments as sources. - * @returns {Object} Returns the destination object. - * @example - * - * var object = { 'name': 'barney' }; - * _.defaults(object, { 'name': 'fred', 'employer': 'slate' }); - * // => { 'name': 'barney', 'employer': 'slate' } - */ -var defaults = function(object, source, guard) { - var index, iterable = object, result = iterable; - if (!iterable) return result; - var args = arguments, - argsIndex = 0, - argsLength = typeof guard == 'number' ? 2 : args.length; - while (++argsIndex < argsLength) { - iterable = args[argsIndex]; - if (iterable && objectTypes[typeof iterable]) { - var ownIndex = -1, - ownProps = objectTypes[typeof iterable] && keys(iterable), - length = ownProps ? ownProps.length : 0; - - while (++ownIndex < length) { - index = ownProps[ownIndex]; - if (typeof result[index] == 'undefined') result[index] = iterable[index]; - } - } - } - return result -}; - -module.exports = defaults; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/LICENSE.txt b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/README.md deleted file mode 100644 index 16de7300..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._objecttypes v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/index.js deleted file mode 100644 index da17c6cd..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** Used to determine if values are of the language type Object */ -var objectTypes = { - 'boolean': false, - 'function': true, - 'object': true, - 'number': false, - 'string': false, - 'undefined': false -}; - -module.exports = objectTypes; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/package.json deleted file mode 100644 index ab0f1e6d..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/node_modules/lodash._objecttypes/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "lodash._objecttypes", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `objectTypes` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._objecttypes v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._objecttypes@2.4.1", - "_from": "lodash._objecttypes@~2.4.1" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/package.json deleted file mode 100644 index 53559bd9..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.defaults/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "lodash.defaults", - "version": "2.4.1", - "description": "The Lo-Dash function `_.defaults` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash.keys": "~2.4.1", - "lodash._objecttypes": "~2.4.1" - }, - "readme": "# lodash.defaults v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.defaults`](http://lodash.com/docs#defaults) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.defaults@2.4.1", - "_from": "lodash.defaults@~2.4.1" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/LICENSE.txt b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/README.md deleted file mode 100644 index 7cbc6538..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.escape v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.escape`](http://lodash.com/docs#escape) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/index.js deleted file mode 100644 index 343a4156..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/index.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var escapeHtmlChar = require('lodash._escapehtmlchar'), - keys = require('lodash.keys'), - reUnescapedHtml = require('lodash._reunescapedhtml'); - -/** - * Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their - * corresponding HTML entities. - * - * @static - * @memberOf _ - * @category Utilities - * @param {string} string The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escape('Fred, Wilma, & Pebbles'); - * // => 'Fred, Wilma, & Pebbles' - */ -function escape(string) { - return string == null ? '' : String(string).replace(reUnescapedHtml, escapeHtmlChar); -} - -module.exports = escape; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/LICENSE.txt b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/README.md deleted file mode 100644 index eef7f9c6..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._escapehtmlchar v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `escapeHtmlChar` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/index.js deleted file mode 100644 index ce4e6d8e..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/index.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var htmlEscapes = require('lodash._htmlescapes'); - -/** - * Used by `escape` to convert characters to HTML entities. - * - * @private - * @param {string} match The matched character to escape. - * @returns {string} Returns the escaped character. - */ -function escapeHtmlChar(match) { - return htmlEscapes[match]; -} - -module.exports = escapeHtmlChar; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/LICENSE.txt b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/README.md deleted file mode 100644 index 9957cefa..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._htmlescapes v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `htmlEscapes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/index.js deleted file mode 100644 index f69503d4..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/index.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** - * Used to convert characters to HTML entities: - * - * Though the `>` character is escaped for symmetry, characters like `>` and `/` - * don't require escaping in HTML and have no special meaning unless they're part - * of a tag or an unquoted attribute value. - * http://mathiasbynens.be/notes/ambiguous-ampersands (under "semi-related fun fact") - */ -var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' -}; - -module.exports = htmlEscapes; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/package.json deleted file mode 100644 index 29c83d94..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/node_modules/lodash._htmlescapes/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "lodash._htmlescapes", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `htmlEscapes` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._htmlescapes v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `htmlEscapes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._htmlescapes@2.4.1", - "_from": "lodash._htmlescapes@~2.4.1" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/package.json deleted file mode 100644 index 00c07f7b..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._escapehtmlchar/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "lodash._escapehtmlchar", - "version": "2.4.1", - "description": "The internal Lo-Dash function `escapeHtmlChar` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash._htmlescapes": "~2.4.1" - }, - "readme": "# lodash._escapehtmlchar v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `escapeHtmlChar` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._escapehtmlchar@2.4.1", - "_from": "lodash._escapehtmlchar@~2.4.1" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/LICENSE.txt b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/README.md deleted file mode 100644 index c6ca90c4..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._reunescapedhtml v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `reUnescapedHtml` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/index.js deleted file mode 100644 index fa870474..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/index.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var htmlEscapes = require('lodash._htmlescapes'), - keys = require('lodash.keys'); - -/** Used to match HTML entities and HTML characters */ -var reUnescapedHtml = RegExp('[' + keys(htmlEscapes).join('') + ']', 'g'); - -module.exports = reUnescapedHtml; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/LICENSE.txt b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/README.md deleted file mode 100644 index 9957cefa..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._htmlescapes v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `htmlEscapes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/index.js deleted file mode 100644 index f69503d4..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/index.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** - * Used to convert characters to HTML entities: - * - * Though the `>` character is escaped for symmetry, characters like `>` and `/` - * don't require escaping in HTML and have no special meaning unless they're part - * of a tag or an unquoted attribute value. - * http://mathiasbynens.be/notes/ambiguous-ampersands (under "semi-related fun fact") - */ -var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' -}; - -module.exports = htmlEscapes; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/package.json deleted file mode 100644 index 29c83d94..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/node_modules/lodash._htmlescapes/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "lodash._htmlescapes", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `htmlEscapes` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._htmlescapes v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `htmlEscapes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._htmlescapes@2.4.1", - "_from": "lodash._htmlescapes@~2.4.1" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/package.json deleted file mode 100644 index 74a4f272..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/node_modules/lodash._reunescapedhtml/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "lodash._reunescapedhtml", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `reUnescapedHtml` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash._htmlescapes": "~2.4.1", - "lodash.keys": "~2.4.1" - }, - "readme": "# lodash._reunescapedhtml v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `reUnescapedHtml` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._reunescapedhtml@2.4.1", - "_from": "lodash._reunescapedhtml@~2.4.1" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/package.json deleted file mode 100644 index 254ecb1e..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.escape/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "lodash.escape", - "version": "2.4.1", - "description": "The Lo-Dash function `_.escape` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash._escapehtmlchar": "~2.4.1", - "lodash.keys": "~2.4.1", - "lodash._reunescapedhtml": "~2.4.1" - }, - "readme": "# lodash.escape v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.escape`](http://lodash.com/docs#escape) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.escape@2.4.1", - "_from": "lodash.escape@~2.4.1" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/LICENSE.txt b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/README.md deleted file mode 100644 index bee29a8d..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.keys v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.keys`](http://lodash.com/docs#keys) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/index.js deleted file mode 100644 index 139568a2..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/index.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var isNative = require('lodash._isnative'), - isObject = require('lodash.isobject'), - shimKeys = require('lodash._shimkeys'); - -/* Native method shortcuts for methods with the same name as other `lodash` methods */ -var nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys; - -/** - * Creates an array composed of the own enumerable property names of an object. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property names. - * @example - * - * _.keys({ 'one': 1, 'two': 2, 'three': 3 }); - * // => ['one', 'two', 'three'] (property order is not guaranteed across environments) - */ -var keys = !nativeKeys ? shimKeys : function(object) { - if (!isObject(object)) { - return []; - } - return nativeKeys(object); -}; - -module.exports = keys; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/README.md deleted file mode 100644 index fbcaad2f..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._isnative v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `isNative` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/index.js deleted file mode 100644 index b34a3500..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/index.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** Used for native method references */ -var objectProto = Object.prototype; - -/** Used to resolve the internal [[Class]] of values */ -var toString = objectProto.toString; - -/** Used to detect if a method is native */ -var reNative = RegExp('^' + - String(toString) - .replace(/[.*+?^${}()|[\]\\]/g, '\\$&') - .replace(/toString| for [^\]]+/g, '.*?') + '$' -); - -/** - * Checks if `value` is a native function. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if the `value` is a native function, else `false`. - */ -function isNative(value) { - return typeof value == 'function' && reNative.test(value); -} - -module.exports = isNative; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/package.json deleted file mode 100644 index 5e652af4..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._isnative/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "lodash._isnative", - "version": "2.4.1", - "description": "The internal Lo-Dash function `isNative` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._isnative v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `isNative` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._isnative@2.4.1", - "_from": "lodash._isnative@~2.4.1" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/README.md deleted file mode 100644 index 23f3000b..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._shimkeys v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) function `shimKeys` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js deleted file mode 100644 index 12be0bf1..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/index.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var objectTypes = require('lodash._objecttypes'); - -/** Used for native method references */ -var objectProto = Object.prototype; - -/** Native method shortcuts */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A fallback implementation of `Object.keys` which produces an array of the - * given object's own enumerable property names. - * - * @private - * @type Function - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property names. - */ -var shimKeys = function(object) { - var index, iterable = object, result = []; - if (!iterable) return result; - if (!(objectTypes[typeof object])) return result; - for (index in iterable) { - if (hasOwnProperty.call(iterable, index)) { - result.push(index); - } - } - return result -}; - -module.exports = shimKeys; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/LICENSE.txt b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/README.md deleted file mode 100644 index 16de7300..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._objecttypes v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/index.js deleted file mode 100644 index da17c6cd..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** Used to determine if values are of the language type Object */ -var objectTypes = { - 'boolean': false, - 'function': true, - 'object': true, - 'number': false, - 'string': false, - 'undefined': false -}; - -module.exports = objectTypes; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/package.json deleted file mode 100644 index 21b0fd84..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/node_modules/lodash._objecttypes/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "lodash._objecttypes", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `objectTypes` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._objecttypes v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._objecttypes@2.4.1", - "_from": "lodash._objecttypes@~2.4.1", - "scripts": {} -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json deleted file mode 100644 index a51388c1..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash._shimkeys/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "lodash._shimkeys", - "version": "2.4.1", - "description": "The internal Lo-Dash function `shimKeys` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash._objecttypes": "~2.4.1" - }, - "readme": "# lodash._shimkeys v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) function `shimKeys` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._shimkeys@2.4.1", - "_from": "lodash._shimkeys@~2.4.1" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/LICENSE.txt b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/README.md deleted file mode 100644 index eeb0a78b..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.isobject v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.isObject`](http://lodash.com/docs#isObject) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/index.js deleted file mode 100644 index 3596ac34..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/index.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var objectTypes = require('lodash._objecttypes'); - -/** - * Checks if `value` is the language type of Object. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Objects - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if the `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // check if the value is the ECMAScript language type of Object - // http://es5.github.io/#x8 - // and avoid a V8 bug - // http://code.google.com/p/v8/issues/detail?id=2291 - return !!(value && objectTypes[typeof value]); -} - -module.exports = isObject; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/LICENSE.txt b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/README.md deleted file mode 100644 index 16de7300..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash._objecttypes v2.4.1 - -The internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/index.js deleted file mode 100644 index da17c6cd..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ - -/** Used to determine if values are of the language type Object */ -var objectTypes = { - 'boolean': false, - 'function': true, - 'object': true, - 'number': false, - 'string': false, - 'undefined': false -}; - -module.exports = objectTypes; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/package.json deleted file mode 100644 index 21b0fd84..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/node_modules/lodash._objecttypes/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "lodash._objecttypes", - "version": "2.4.1", - "description": "The internal Lo-Dash variable `objectTypes` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "readme": "# lodash._objecttypes v2.4.1\n\nThe internal [Lo-Dash](http://lodash.com/) variable `objectTypes` as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash._objecttypes@2.4.1", - "_from": "lodash._objecttypes@~2.4.1", - "scripts": {} -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/package.json deleted file mode 100644 index 698a9eaf..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/node_modules/lodash.isobject/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "lodash.isobject", - "version": "2.4.1", - "description": "The Lo-Dash function `_.isObject` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash._objecttypes": "~2.4.1" - }, - "readme": "# lodash.isobject v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.isObject`](http://lodash.com/docs#isObject) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.isobject@2.4.1", - "_from": "lodash.isobject@~2.4.1" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/package.json deleted file mode 100644 index cd3c29bd..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.keys/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "lodash.keys", - "version": "2.4.1", - "description": "The Lo-Dash function `_.keys` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash._isnative": "~2.4.1", - "lodash.isobject": "~2.4.1", - "lodash._shimkeys": "~2.4.1" - }, - "readme": "# lodash.keys v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.keys`](http://lodash.com/docs#keys) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.keys@2.4.1", - "_from": "lodash.keys@~2.4.1" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/LICENSE.txt b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/README.md deleted file mode 100644 index d9ce72bc..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.templatesettings v2.4.1 - -The [Lo-Dash](http://lodash.com/) object [`_.templateSettings`](http://lodash.com/docs#templateSettings) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/index.js deleted file mode 100644 index bba7e231..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/index.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var escape = require('lodash.escape'), - reInterpolate = require('lodash._reinterpolate'); - -/** - * By default, the template delimiters used by Lo-Dash are similar to those in - * embedded Ruby (ERB). Change the following template settings to use alternative - * delimiters. - * - * @static - * @memberOf _ - * @type Object - */ -var templateSettings = { - - /** - * Used to detect `data` property values to be HTML-escaped. - * - * @memberOf _.templateSettings - * @type RegExp - */ - 'escape': /<%-([\s\S]+?)%>/g, - - /** - * Used to detect code to be evaluated. - * - * @memberOf _.templateSettings - * @type RegExp - */ - 'evaluate': /<%([\s\S]+?)%>/g, - - /** - * Used to detect `data` property values to inject. - * - * @memberOf _.templateSettings - * @type RegExp - */ - 'interpolate': reInterpolate, - - /** - * Used to reference the data object in the template text. - * - * @memberOf _.templateSettings - * @type string - */ - 'variable': '', - - /** - * Used to import variables into the compiled template. - * - * @memberOf _.templateSettings - * @type Object - */ - 'imports': { - - /** - * A reference to the `lodash` function. - * - * @memberOf _.templateSettings.imports - * @type Function - */ - '_': { 'escape': escape } - } -}; - -module.exports = templateSettings; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json deleted file mode 100644 index f08cd47d..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.templatesettings/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "lodash.templatesettings", - "version": "2.4.1", - "description": "The Lo-Dash object `_.templateSettings` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash.escape": "~2.4.1", - "lodash._reinterpolate": "~2.4.1" - }, - "readme": "# lodash.templatesettings v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) object [`_.templateSettings`](http://lodash.com/docs#templateSettings) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.templatesettings@2.4.1", - "_from": "lodash.templatesettings@~2.4.1" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/LICENSE.txt b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/LICENSE.txt deleted file mode 100644 index 49869bba..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> -Based on Underscore.js 1.5.2, copyright 2009-2013 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> - -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. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/README.md deleted file mode 100644 index 33f028da..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# lodash.values v2.4.1 - -The [Lo-Dash](http://lodash.com/) function [`_.values`](http://lodash.com/docs#values) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli). - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/index.js deleted file mode 100644 index ccf622fa..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/index.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> - * Build: `lodash modularize modern exports="npm" -o ./npm/` - * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> - * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license <http://lodash.com/license> - */ -var keys = require('lodash.keys'); - -/** - * Creates an array composed of the own enumerable property values of `object`. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns an array of property values. - * @example - * - * _.values({ 'one': 1, 'two': 2, 'three': 3 }); - * // => [1, 2, 3] (property order is not guaranteed across environments) - */ -function values(object) { - var index = -1, - props = keys(object), - length = props.length, - result = Array(length); - - while (++index < length) { - result[index] = object[props[index]]; - } - return result; -} - -module.exports = values; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/package.json deleted file mode 100644 index 8e864ab7..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/node_modules/lodash.values/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "lodash.values", - "version": "2.4.1", - "description": "The Lo-Dash function `_.values` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash.keys": "~2.4.1" - }, - "readme": "# lodash.values v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.values`](http://lodash.com/docs#values) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.values@2.4.1", - "_from": "lodash.values@~2.4.1" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/package.json deleted file mode 100644 index a42d1163..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/lodash.template/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "lodash.template", - "version": "2.4.1", - "description": "The Lo-Dash function `_.template` as a Node.js module generated by lodash-cli.", - "homepage": "http://lodash.com/custom-builds", - "license": "MIT", - "keywords": [ - "functional", - "lodash", - "lodash-modularized", - "server", - "util" - ], - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine@iceddev.com", - "url": "http://www.iceddev.com/" - }, - { - "name": "Kit Cambridge", - "email": "github@kitcambridge.be", - "url": "http://kitcambridge.be/" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "http://mathiasbynens.be/" - } - ], - "bugs": { - "url": "https://github.com/lodash/lodash-cli/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/lodash/lodash-cli.git" - }, - "dependencies": { - "lodash.defaults": "~2.4.1", - "lodash.escape": "~2.4.1", - "lodash._escapestringchar": "~2.4.1", - "lodash.keys": "~2.4.1", - "lodash._reinterpolate": "~2.4.1", - "lodash.templatesettings": "~2.4.1", - "lodash.values": "~2.4.1" - }, - "readme": "# lodash.template v2.4.1\n\nThe [Lo-Dash](http://lodash.com/) function [`_.template`](http://lodash.com/docs#template) as a [Node.js](http://nodejs.org/) module generated by [lodash-cli](https://npmjs.org/package/lodash-cli).\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](https://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash.template@2.4.1", - "_from": "lodash.template@~2.4.1" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/.travis.yml b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/.travis.yml deleted file mode 100644 index cc4dba29..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/LICENSE b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/example/parse.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/example/parse.js deleted file mode 100644 index abff3e8e..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/example/parse.js +++ /dev/null @@ -1,2 +0,0 @@ -var argv = require('../')(process.argv.slice(2)); -console.dir(argv); diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/index.js deleted file mode 100644 index 2aa95140..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/index.js +++ /dev/null @@ -1,187 +0,0 @@ -module.exports = function (args, opts) { - if (!opts) opts = {}; - - var flags = { bools : {}, strings : {} }; - - [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - - [].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - }); - - var aliases = {}; - Object.keys(opts.alias || {}).forEach(function (key) { - aliases[key] = [].concat(opts.alias[key]); - aliases[key].forEach(function (x) { - aliases[x] = [key].concat(aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - - var defaults = opts['default'] || {}; - - var argv = { _ : [] }; - Object.keys(flags.bools).forEach(function (key) { - setArg(key, defaults[key] === undefined ? false : defaults[key]); - }); - - var notFlags = []; - - if (args.indexOf('--') !== -1) { - notFlags = args.slice(args.indexOf('--')+1); - args = args.slice(0, args.indexOf('--')); - } - - function setArg (key, val) { - var value = !flags.strings[key] && isNumber(val) - ? Number(val) : val - ; - setKey(argv, key.split('.'), value); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), value); - }); - } - - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - - if (/^--.+=/.test(arg)) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - setArg(m[1], m[2]); - } - else if (/^--no-.+/.test(arg)) { - var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false); - } - else if (/^--.+/.test(arg)) { - var key = arg.match(/^--(.+)/)[1]; - var next = args[i + 1]; - if (next !== undefined && !/^-/.test(next) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true'); - i++; - } - else { - setArg(key, true); - } - } - else if (/^-[^-]+/.test(arg)) { - var letters = arg.slice(1,-1).split(''); - - var broken = false; - for (var j = 0; j < letters.length; j++) { - var next = arg.slice(j+2); - - if (next === '-') { - setArg(letters[j], next) - continue; - } - - if (/[A-Za-z]/.test(letters[j]) - && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next); - broken = true; - break; - } - - if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2)); - broken = true; - break; - } - else { - setArg(letters[j], true); - } - } - - var key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, args[i+1]); - i++; - } - else if (args[i+1] && /true|false/.test(args[i+1])) { - setArg(key, args[i+1] === 'true'); - i++; - } - else { - setArg(key, true); - } - } - } - else { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ); - } - } - - Object.keys(defaults).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) { - setKey(argv, key.split('.'), defaults[key]); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), defaults[key]); - }); - } - }); - - notFlags.forEach(function(key) { - argv._.push(key); - }); - - return argv; -}; - -function hasKey (obj, keys) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - o = (o[key] || {}); - }); - - var key = keys[keys.length - 1]; - return key in o; -} - -function setKey (obj, keys, value) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - if (o[key] === undefined) o[key] = {}; - o = o[key]; - }); - - var key = keys[keys.length - 1]; - if (o[key] === undefined || typeof o[key] === 'boolean') { - o[key] = value; - } - else if (Array.isArray(o[key])) { - o[key].push(value); - } - else { - o[key] = [ o[key], value ]; - } -} - -function isNumber (x) { - if (typeof x === 'number') return true; - if (/^0x[0-9a-f]+$/i.test(x)) return true; - return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); -} - -function longest (xs) { - return Math.max.apply(null, xs.map(function (x) { return x.length })); -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/package.json deleted file mode 100644 index 3f97f9c3..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "minimist", - "version": "0.0.7", - "description": "parse argument options", - "main": "index.js", - "devDependencies": { - "tape": "~1.0.4", - "tap": "~0.4.0" - }, - "scripts": { - "test": "tap test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "ff/5", - "firefox/latest", - "chrome/10", - "chrome/latest", - "safari/5.1", - "safari/latest", - "opera/12" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/minimist.git" - }, - "homepage": "https://github.com/substack/minimist", - "keywords": [ - "argv", - "getopt", - "parser", - "optimist" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "readme": "# minimist\n\nparse argument options\n\nThis module is the guts of optimist's argument parser without all the\nfanciful decoration.\n\n[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist)\n\n[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist)\n\n# example\n\n``` js\nvar argv = require('minimist')(process.argv.slice(2));\nconsole.dir(argv);\n```\n\n```\n$ node example/parse.js -a beep -b boop\n{ _: [], a: 'beep', b: 'boop' }\n```\n\n```\n$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz\n{ _: [ 'foo', 'bar', 'baz' ],\n x: 3,\n y: 4,\n n: 5,\n a: true,\n b: true,\n c: true,\n beep: 'boop' }\n```\n\n# methods\n\n``` js\nvar parseArgs = require('minimist')\n```\n\n## var argv = parseArgs(args, opts={})\n\nReturn an argument object `argv` populated with the array arguments from `args`.\n\n`argv._` contains all the arguments that didn't have an option associated with\nthem.\n\nNumeric-looking arguments will be returned as numbers unless `opts.string` or\n`opts.boolean` is set for that argument name.\n\nAny arguments after `'--'` will not be parsed and will end up in `argv._`.\n\noptions can be:\n\n* `opts.string` - a string or array of strings argument names to always treat as\nstrings\n* `opts.boolean` - a string or array of strings to always treat as booleans\n* `opts.alias` - an object mapping string names to strings or arrays of string\nargument names to use as aliases\n* `opts.default` - an object mapping string argument names to default values\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install minimist\n```\n\n# license\n\nMIT\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/substack/minimist/issues" - }, - "_id": "minimist@0.0.7", - "_from": "minimist@~0.0.5" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/readme.markdown b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/readme.markdown deleted file mode 100644 index c2563532..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/readme.markdown +++ /dev/null @@ -1,73 +0,0 @@ -# minimist - -parse argument options - -This module is the guts of optimist's argument parser without all the -fanciful decoration. - -[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist) - -[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist) - -# example - -``` js -var argv = require('minimist')(process.argv.slice(2)); -console.dir(argv); -``` - -``` -$ node example/parse.js -a beep -b boop -{ _: [], a: 'beep', b: 'boop' } -``` - -``` -$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz -{ _: [ 'foo', 'bar', 'baz' ], - x: 3, - y: 4, - n: 5, - a: true, - b: true, - c: true, - beep: 'boop' } -``` - -# methods - -``` js -var parseArgs = require('minimist') -``` - -## var argv = parseArgs(args, opts={}) - -Return an argument object `argv` populated with the array arguments from `args`. - -`argv._` contains all the arguments that didn't have an option associated with -them. - -Numeric-looking arguments will be returned as numbers unless `opts.string` or -`opts.boolean` is set for that argument name. - -Any arguments after `'--'` will not be parsed and will end up in `argv._`. - -options can be: - -* `opts.string` - a string or array of strings argument names to always treat as -strings -* `opts.boolean` - a string or array of strings to always treat as booleans -* `opts.alias` - an object mapping string names to strings or arrays of string -argument names to use as aliases -* `opts.default` - an object mapping string argument names to default values - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install minimist -``` - -# license - -MIT diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/test/dash.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/test/dash.js deleted file mode 100644 index 8b034b99..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/test/dash.js +++ /dev/null @@ -1,24 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('-', function (t) { - t.plan(5); - t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); - t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); - t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); - t.deepEqual( - parse([ '-b', '-' ], { boolean: 'b' }), - { b: true, _: [ '-' ] } - ); - t.deepEqual( - parse([ '-s', '-' ], { string: 's' }), - { s: '-', _: [] } - ); -}); - -test('-a -- b', function (t) { - t.plan(3); - t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); -}); diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/test/default_bool.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/test/default_bool.js deleted file mode 100644 index f0041ee4..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/test/default_bool.js +++ /dev/null @@ -1,20 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('boolean default true', function (t) { - var argv = parse([], { - boolean: 'sometrue', - default: { sometrue: true } - }); - t.equal(argv.sometrue, true); - t.end(); -}); - -test('boolean default false', function (t) { - var argv = parse([], { - boolean: 'somefalse', - default: { somefalse: false } - }); - t.equal(argv.somefalse, false); - t.end(); -}); diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/test/dotted.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/test/dotted.js deleted file mode 100644 index ef0ae349..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/test/dotted.js +++ /dev/null @@ -1,16 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('dotted alias', function (t) { - var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 22); - t.equal(argv.aa.bb, 22); - t.end(); -}); - -test('dotted default', function (t) { - var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 11); - t.equal(argv.aa.bb, 11); - t.end(); -}); diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/test/long.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/test/long.js deleted file mode 100644 index 5d3a1e09..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/test/long.js +++ /dev/null @@ -1,31 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('long opts', function (t) { - t.deepEqual( - parse([ '--bool' ]), - { bool : true, _ : [] }, - 'long boolean' - ); - t.deepEqual( - parse([ '--pow', 'xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture sp' - ); - t.deepEqual( - parse([ '--pow=xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture eq' - ); - t.deepEqual( - parse([ '--host', 'localhost', '--port', '555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures sp' - ); - t.deepEqual( - parse([ '--host=localhost', '--port=555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures eq' - ); - t.end(); -}); diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/test/parse.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/test/parse.js deleted file mode 100644 index 7c4348a4..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/test/parse.js +++ /dev/null @@ -1,297 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse args', function (t) { - t.deepEqual( - parse([ '--no-moo' ]), - { moo : false, _ : [] }, - 'no' - ); - t.deepEqual( - parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), - { v : ['a','b','c'], _ : [] }, - 'multi' - ); - t.end(); -}); - -test('comprehensive', function (t) { - t.deepEqual( - parse([ - '--name=meowmers', 'bare', '-cats', 'woo', - '-h', 'awesome', '--multi=quux', - '--key', 'value', - '-b', '--bool', '--no-meep', '--multi=baz', - '--', '--not-a-flag', 'eek' - ]), - { - c : true, - a : true, - t : true, - s : 'woo', - h : 'awesome', - b : true, - bool : true, - key : 'value', - multi : [ 'quux', 'baz' ], - meep : false, - name : 'meowmers', - _ : [ 'bare', '--not-a-flag', 'eek' ] - } - ); - t.end(); -}); - -test('nums', function (t) { - var argv = parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789' - ]); - t.deepEqual(argv, { - x : 1234, - y : 5.67, - z : 1e7, - w : '10f', - hex : 0xdeadbeef, - _ : [ 789 ] - }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv.y, 'number'); - t.deepEqual(typeof argv.z, 'number'); - t.deepEqual(typeof argv.w, 'string'); - t.deepEqual(typeof argv.hex, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); - -test('flag boolean', function (t) { - var argv = parse([ '-t', 'moo' ], { boolean: 't' }); - t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean value', function (t) { - var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { - boolean: [ 't', 'verbose' ], - default: { verbose: true } - }); - - t.deepEqual(argv, { - verbose: false, - t: true, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean default false', function (t) { - var argv = parse(['moo'], { - boolean: ['t', 'verbose'], - default: { verbose: false, t: false } - }); - - t.deepEqual(argv, { - verbose: false, - t: false, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); - -}); - -test('boolean groups', function (t) { - var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { - boolean: ['x','y','z'] - }); - - t.deepEqual(argv, { - x : true, - y : false, - z : true, - _ : [ 'one', 'two', 'three' ] - }); - - t.deepEqual(typeof argv.x, 'boolean'); - t.deepEqual(typeof argv.y, 'boolean'); - t.deepEqual(typeof argv.z, 'boolean'); - t.end(); -}); - -test('newlines in params' , function (t) { - var args = parse([ '-s', "X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - - // reproduce in bash: - // VALUE="new - // line" - // node program.js --s="$VALUE" - args = parse([ "--s=X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - t.end(); -}); - -test('strings' , function (t) { - var s = parse([ '-s', '0001234' ], { string: 's' }).s; - t.equal(s, '0001234'); - t.equal(typeof s, 'string'); - - var x = parse([ '-x', '56' ], { string: 'x' }).x; - t.equal(x, '56'); - t.equal(typeof x, 'string'); - t.end(); -}); - -test('stringArgs', function (t) { - var s = parse([ ' ', ' ' ], { string: '_' })._; - t.same(s.length, 2); - t.same(typeof s[0], 'string'); - t.same(s[0], ' '); - t.same(typeof s[1], 'string'); - t.same(s[1], ' '); - t.end(); -}); - -test('slashBreak', function (t) { - t.same( - parse([ '-I/foo/bar/baz' ]), - { I : '/foo/bar/baz', _ : [] } - ); - t.same( - parse([ '-xyz/foo/bar/baz' ]), - { x : true, y : true, z : '/foo/bar/baz', _ : [] } - ); - t.end(); -}); - -test('alias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: 'zoom' } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.f, 11); - t.end(); -}); - -test('multiAlias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: [ 'zm', 'zoom' ] } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.z, argv.zm); - t.equal(argv.f, 11); - t.end(); -}); - -test('nested dotted objects', function (t) { - var argv = parse([ - '--foo.bar', '3', '--foo.baz', '4', - '--foo.quux.quibble', '5', '--foo.quux.o_O', - '--beep.boop' - ]); - - t.same(argv.foo, { - bar : 3, - baz : 4, - quux : { - quibble : 5, - o_O : true - } - }); - t.same(argv.beep, { boop : true }); - t.end(); -}); - -test('boolean and alias with chainable api', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = parse(aliased, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var propertyArgv = parse(regular, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - alias: { 'h': 'herp' }, - boolean: 'herp' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias using explicit true', function (t) { - var aliased = [ '-h', 'true' ]; - var regular = [ '--herp', 'true' ]; - var opts = { - alias: { h: 'herp' }, - boolean: 'h' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -// regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function(t) { - var parsed = parse(['--boool', '--other=true'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); - - parsed = parse(['--boool', '--other=false'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); -}); diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/test/parse_modified.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/test/parse_modified.js deleted file mode 100644 index 21851b03..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/test/parse_modified.js +++ /dev/null @@ -1,9 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse with modifier functions' , function (t) { - t.plan(1); - - var argv = parse([ '-b', '123' ], { boolean: 'b' }); - t.deepEqual(argv, { b: true, _: ['123'] }); -}); diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/test/short.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/test/short.js deleted file mode 100644 index d513a1c2..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/test/short.js +++ /dev/null @@ -1,67 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('numeric short args', function (t) { - t.plan(2); - t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); - t.deepEqual( - parse([ '-123', '456' ]), - { 1: true, 2: true, 3: 456, _: [] } - ); -}); - -test('short', function (t) { - t.deepEqual( - parse([ '-b' ]), - { b : true, _ : [] }, - 'short boolean' - ); - t.deepEqual( - parse([ 'foo', 'bar', 'baz' ]), - { _ : [ 'foo', 'bar', 'baz' ] }, - 'bare' - ); - t.deepEqual( - parse([ '-cats' ]), - { c : true, a : true, t : true, s : true, _ : [] }, - 'group' - ); - t.deepEqual( - parse([ '-cats', 'meow' ]), - { c : true, a : true, t : true, s : 'meow', _ : [] }, - 'short group next' - ); - t.deepEqual( - parse([ '-h', 'localhost' ]), - { h : 'localhost', _ : [] }, - 'short capture' - ); - t.deepEqual( - parse([ '-h', 'localhost', '-p', '555' ]), - { h : 'localhost', p : 555, _ : [] }, - 'short captures' - ); - t.end(); -}); - -test('mixed short bool and capture', function (t) { - t.same( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); - -test('short and long', function (t) { - t.deepEqual( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/test/whitespace.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/test/whitespace.js deleted file mode 100644 index 8a52a58c..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/minimist/test/whitespace.js +++ /dev/null @@ -1,8 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('whitespace should be whitespace' , function (t) { - t.plan(1); - var x = parse([ '-x', '\t' ]).x; - t.equal(x, '\t'); -}); diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/.npmignore b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/.travis.yml b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/.travis.yml deleted file mode 100644 index 6e5919de..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "0.10" diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/History.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/History.md deleted file mode 100644 index 4174056f..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/History.md +++ /dev/null @@ -1,10 +0,0 @@ - -0.0.1 / 2013-01-15 -================== - -* fix error bubbling - -0.0.0 / 2013-01-13 -================== - -* initial release diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/Makefile b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/Makefile deleted file mode 100644 index d1df0ab3..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/Makefile +++ /dev/null @@ -1,10 +0,0 @@ - -node_modules: package.json - @npm install - -test: - @./node_modules/.bin/mocha \ - --reporter spec \ - --timeout 100 - -.PHONY: test \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/Readme.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/Readme.md deleted file mode 100644 index e8f432ec..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/Readme.md +++ /dev/null @@ -1,74 +0,0 @@ -# multipipe - -A better `Stream#pipe` that creates duplex streams and lets you handle errors in one place. - -[![build status](https://secure.travis-ci.org/segmentio/multipipe.png)](http://travis-ci.org/segmentio/multipipe) - -## Example - -```js -var pipe = require('multipipe'); - -// pipe streams -var stream = pipe(streamA, streamB, streamC); - -// centralized error handling -stream.on('error', fn); - -// creates a new stream -source.pipe(stream).pipe(dest); -``` - -## Duplex streams - - Write to the pipe and you'll really write to the first stream, read from the pipe and you'll read from the last stream. - -```js -var stream = pipe(a, b, c); - -source - .pipe(stream) - .pipe(destination); -``` - - In this example the flow of data is: - - * source -> - * a -> - * b -> - * c -> - * destination - -## Error handling - - Each `pipe` forwards the errors the streams it wraps emit, so you have one central place to handle errors: - -```js -var stream = pipe(a, b, c); - -stream.on('error', function(err){ - // called three times -}); - -a.emit('error', new Error); -b.emit('error', new Error); -c.emit('error', new Error); -``` - -## API - -### pipe(stream, ...) - -Pass a variable number of streams and each will be piped to the next one. - -A stream will be returned that wraps passed in streams in a way that errors will be forwarded and you can write to and/or read from it. - -## Installation - -```bash -$ npm install multipipe -``` - -## License - - MIT diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/index.js deleted file mode 100644 index 5292417c..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/index.js +++ /dev/null @@ -1,57 +0,0 @@ - -/** - * Module dependencies. - */ - -var duplexer = require('duplexer2'); -var Stream = require('stream'); - -/** - * Slice reference. - */ - -var slice = [].slice; - -/** - * Duplexer options. - */ - -var opts = { - bubbleErrors: false -}; - -/** - * Expose `pipe`. - */ - -module.exports = pipe; - -/** - * Pipe. - * - * @param {Stream,...} - * @return {Stream} - * @api public - */ - -function pipe(){ - if (arguments.length == 1) return arguments[0]; - var streams = slice.call(arguments); - var first = streams[0]; - var last = streams[streams.length - 1]; - var ret; - - if (first.writable && last.readable) ret = duplexer(opts, first, last); - else if (first.writable) ret = first; - else if (last.readable) ret = last; - else ret = new Stream; - - streams.forEach(function(stream, i){ - var next = streams[i+1]; - if (next) stream.pipe(next); - stream.on('error', ret.emit.bind(ret, 'error')); - }); - - return ret; -} - diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/.npmignore b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/.npmignore deleted file mode 100644 index 07e6e472..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/.npmignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/.travis.yml b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/.travis.yml deleted file mode 100644 index 6e5919de..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "0.10" diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/LICENSE.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/LICENSE.md deleted file mode 100644 index 547189a6..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/LICENSE.md +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2013, Deoxxa Development -====================================== -All rights reserved. --------------------- - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of Deoxxa Development nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY DEOXXA DEVELOPMENT ''AS IS'' AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL DEOXXA DEVELOPMENT BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/README.md deleted file mode 100644 index e39e1e9e..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/README.md +++ /dev/null @@ -1,129 +0,0 @@ -duplexer2 [![build status](https://travis-ci.org/deoxxa/duplexer2.png)](https://travis-ci.org/deoxxa/fork) -========= - -Like duplexer (http://npm.im/duplexer) but using streams2. - -Overview --------- - -duplexer2 is a reimplementation of [duplexer](http://npm.im/duplexer) using the -readable-stream API which is standard in node as of v0.10. Everything largely -works the same. - -Installation ------------- - -Available via [npm](http://npmjs.org/): - -> $ npm install duplexer2 - -Or via git: - -> $ git clone git://github.com/deoxxa/duplexer2.git node_modules/duplexer2 - -API ---- - -**duplexer2** - -Creates a new `DuplexWrapper` object, which is the actual class that implements -most of the fun stuff. All that fun stuff is hidden. DON'T LOOK. - -```javascript -duplexer2([options], writable, readable) -``` - -```javascript -var duplex = duplexer2(new stream.Writable(), new stream.Readable()); -``` - -Arguments - -* __options__ - an object specifying the regular `stream.Duplex` options, as - well as the properties described below. -* __writable__ - a writable stream -* __readable__ - a readable stream - -Options - -* __bubbleErrors__ - a boolean value that specifies whether to bubble errors - from the underlying readable/writable streams. Default is `true`. - -Example -------- - -Also see [example.js](https://github.com/deoxxa/duplexer2/blob/master/example.js). - -Code: - -```javascript -var stream = require("stream"); - -var duplexer2 = require("duplexer2"); - -var writable = new stream.Writable({objectMode: true}), - readable = new stream.Readable({objectMode: true}); - -writable._write = function _write(input, encoding, done) { - if (readable.push(input)) { - return done(); - } else { - readable.once("drain", done); - } -}; - -readable._read = function _read(n) { - // no-op -}; - -// simulate the readable thing closing after a bit -writable.once("finish", function() { - setTimeout(function() { - readable.push(null); - }, 500); -}); - -var duplex = duplexer2(writable, readable); - -duplex.on("data", function(e) { - console.log("got data", JSON.stringify(e)); -}); - -duplex.on("finish", function() { - console.log("got finish event"); -}); - -duplex.on("end", function() { - console.log("got end event"); -}); - -duplex.write("oh, hi there", function() { - console.log("finished writing"); -}); - -duplex.end(function() { - console.log("finished ending"); -}); -``` - -Output: - -``` -got data "oh, hi there" -finished writing -got finish event -finished ending -got end event -``` - -License -------- - -3-clause BSD. A copy is included with the source. - -Contact -------- - -* GitHub ([deoxxa](http://github.com/deoxxa)) -* Twitter ([@deoxxa](http://twitter.com/deoxxa)) -* Email ([deoxxa@fknsrs.biz](mailto:deoxxa@fknsrs.biz)) diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/example.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/example.js deleted file mode 100755 index ad537a04..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/example.js +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env node - -var stream = require("stream"); - -var duplexer2 = require("./"); - -var writable = new stream.Writable({objectMode: true}), - readable = new stream.Readable({objectMode: true}); - -writable._write = function _write(input, encoding, done) { - if (readable.push(input)) { - return done(); - } else { - readable.once("drain", done); - } -}; - -readable._read = function _read(n) { - // no-op -}; - -// simulate the readable thing closing after a bit -writable.once("finish", function() { - setTimeout(function() { - readable.push(null); - }, 500); -}); - -var duplex = duplexer2(writable, readable); - -duplex.on("data", function(e) { - console.log("got data", JSON.stringify(e)); -}); - -duplex.on("finish", function() { - console.log("got finish event"); -}); - -duplex.on("end", function() { - console.log("got end event"); -}); - -duplex.write("oh, hi there", function() { - console.log("finished writing"); -}); - -duplex.end(function() { - console.log("finished ending"); -}); diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/index.js deleted file mode 100644 index 90b261b4..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/index.js +++ /dev/null @@ -1,62 +0,0 @@ -var stream = require("stream"); - -var duplex2 = module.exports = function duplex2(options, writable, readable) { - return new DuplexWrapper(options, writable, readable); -}; - -var DuplexWrapper = exports.DuplexWrapper = function DuplexWrapper(options, writable, readable) { - if (typeof readable === "undefined") { - readable = writable; - writable = options; - options = null; - } - - options = options || {}; - options.objectMode = true; - - stream.Duplex.call(this, options); - - this._bubbleErrors = (typeof options.bubbleErrors === "undefined") || !!options.bubbleErrors; - - this._writable = writable; - this._readable = readable; - - var self = this; - - writable.once("finish", function() { - self.end(); - }); - - this.once("finish", function() { - writable.end(); - }); - - readable.on("data", function(e) { - if (!self.push(e)) { - readable.pause(); - } - }); - - readable.once("end", function() { - return self.push(null); - }); - - if (this._bubbleErrors) { - writable.on("error", function(err) { - return self.emit("error", err); - }); - - readable.on("error", function(err) { - return self.emit("error", err); - }); - } -}; -DuplexWrapper.prototype = Object.create(stream.Duplex.prototype, {constructor: {value: DuplexWrapper}}); - -DuplexWrapper.prototype._write = function _write(input, encoding, done) { - this._writable.write(input, encoding, done); -}; - -DuplexWrapper.prototype._read = function _read(n) { - this._readable.resume(); -}; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/package.json deleted file mode 100644 index 1949be68..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "duplexer2", - "version": "0.0.1", - "description": "Like duplexer (http://npm.im/duplexer) but using streams2", - "main": "index.js", - "scripts": { - "test": "mocha -R tap" - }, - "repository": { - "type": "git", - "url": "git://github.com/deoxxa/duplexer2.git" - }, - "keywords": [ - "duplex", - "stream", - "join", - "combine" - ], - "author": { - "name": "Conrad Pankoff", - "email": "deoxxa@fknsrs.biz", - "url": "http://www.fknsrs.biz/" - }, - "license": "BSD", - "bugs": { - "url": "https://github.com/deoxxa/duplexer2/issues" - }, - "devDependencies": { - "chai": "~1.7.2", - "mocha": "~1.12.1" - }, - "readme": "duplexer2 [![build status](https://travis-ci.org/deoxxa/duplexer2.png)](https://travis-ci.org/deoxxa/fork)\n=========\n\nLike duplexer (http://npm.im/duplexer) but using streams2.\n\nOverview\n--------\n\nduplexer2 is a reimplementation of [duplexer](http://npm.im/duplexer) using the\nreadable-stream API which is standard in node as of v0.10. Everything largely\nworks the same.\n\nInstallation\n------------\n\nAvailable via [npm](http://npmjs.org/):\n\n> $ npm install duplexer2\n\nOr via git:\n\n> $ git clone git://github.com/deoxxa/duplexer2.git node_modules/duplexer2\n\nAPI\n---\n\n**duplexer2**\n\nCreates a new `DuplexWrapper` object, which is the actual class that implements\nmost of the fun stuff. All that fun stuff is hidden. DON'T LOOK.\n\n```javascript\nduplexer2([options], writable, readable)\n```\n\n```javascript\nvar duplex = duplexer2(new stream.Writable(), new stream.Readable());\n```\n\nArguments\n\n* __options__ - an object specifying the regular `stream.Duplex` options, as\n well as the properties described below.\n* __writable__ - a writable stream\n* __readable__ - a readable stream\n\nOptions\n\n* __bubbleErrors__ - a boolean value that specifies whether to bubble errors\n from the underlying readable/writable streams. Default is `true`.\n\nExample\n-------\n\nAlso see [example.js](https://github.com/deoxxa/duplexer2/blob/master/example.js).\n\nCode:\n\n```javascript\nvar stream = require(\"stream\");\n\nvar duplexer2 = require(\"duplexer2\");\n\nvar writable = new stream.Writable({objectMode: true}),\n readable = new stream.Readable({objectMode: true});\n\nwritable._write = function _write(input, encoding, done) {\n if (readable.push(input)) {\n return done();\n } else {\n readable.once(\"drain\", done);\n }\n};\n\nreadable._read = function _read(n) {\n // no-op\n};\n\n// simulate the readable thing closing after a bit\nwritable.once(\"finish\", function() {\n setTimeout(function() {\n readable.push(null);\n }, 500);\n});\n\nvar duplex = duplexer2(writable, readable);\n\nduplex.on(\"data\", function(e) {\n console.log(\"got data\", JSON.stringify(e));\n});\n\nduplex.on(\"finish\", function() {\n console.log(\"got finish event\");\n});\n\nduplex.on(\"end\", function() {\n console.log(\"got end event\");\n});\n\nduplex.write(\"oh, hi there\", function() {\n console.log(\"finished writing\");\n});\n\nduplex.end(function() {\n console.log(\"finished ending\");\n});\n```\n\nOutput:\n\n```\ngot data \"oh, hi there\"\nfinished writing\ngot finish event\nfinished ending\ngot end event\n```\n\nLicense\n-------\n\n3-clause BSD. A copy is included with the source.\n\nContact\n-------\n\n* GitHub ([deoxxa](http://github.com/deoxxa))\n* Twitter ([@deoxxa](http://twitter.com/deoxxa))\n* Email ([deoxxa@fknsrs.biz](mailto:deoxxa@fknsrs.biz))\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/deoxxa/duplexer2", - "_id": "duplexer2@0.0.1", - "_from": "duplexer2@0.0.1" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/test/tests.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/test/tests.js deleted file mode 100644 index fe3b2560..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/test/tests.js +++ /dev/null @@ -1,161 +0,0 @@ -var assert = require("chai").assert; - -var stream = require("stream"); - -var duplexer2 = require("../"); - -describe("duplexer2", function() { - var writable, readable; - - beforeEach(function() { - writable = new stream.Writable({objectMode: true}); - readable = new stream.Readable({objectMode: true}); - - writable._write = function _write(input, encoding, done) { - return done(); - }; - - readable._read = function _read(n) { - }; - }); - - it("should interact with the writable stream properly for writing", function(done) { - var duplex = duplexer2(writable, readable); - - writable._write = function _write(input, encoding, _done) { - assert.strictEqual(input, "well hello there"); - - return done(); - }; - - duplex.write("well hello there"); - }); - - it("should interact with the readable stream properly for reading", function(done) { - var duplex = duplexer2(writable, readable); - - duplex.on("data", function(e) { - assert.strictEqual(e, "well hello there"); - - return done(); - }); - - readable.push("well hello there"); - }); - - it("should end the writable stream, causing it to finish", function(done) { - var duplex = duplexer2(writable, readable); - - writable.once("finish", done); - - duplex.end(); - }); - - it("should finish when the writable stream finishes", function(done) { - var duplex = duplexer2(writable, readable); - - duplex.once("finish", done); - - writable.end(); - }); - - it("should end when the readable stream ends", function(done) { - var duplex = duplexer2(writable, readable); - - // required to let "end" fire without reading - duplex.resume(); - duplex.once("end", done); - - readable.push(null); - }); - - it("should bubble errors from the writable stream when no behaviour is specified", function(done) { - var duplex = duplexer2(writable, readable); - - var originalErr = Error("testing"); - - duplex.on("error", function(err) { - assert.strictEqual(err, originalErr); - - return done(); - }); - - writable.emit("error", originalErr); - }); - - it("should bubble errors from the readable stream when no behaviour is specified", function(done) { - var duplex = duplexer2(writable, readable); - - var originalErr = Error("testing"); - - duplex.on("error", function(err) { - assert.strictEqual(err, originalErr); - - return done(); - }); - - readable.emit("error", originalErr); - }); - - it("should bubble errors from the writable stream when bubbleErrors is true", function(done) { - var duplex = duplexer2({bubbleErrors: true}, writable, readable); - - var originalErr = Error("testing"); - - duplex.on("error", function(err) { - assert.strictEqual(err, originalErr); - - return done(); - }); - - writable.emit("error", originalErr); - }); - - it("should bubble errors from the readable stream when bubbleErrors is true", function(done) { - var duplex = duplexer2({bubbleErrors: true}, writable, readable); - - var originalErr = Error("testing"); - - duplex.on("error", function(err) { - assert.strictEqual(err, originalErr); - - return done(); - }); - - readable.emit("error", originalErr); - }); - - it("should not bubble errors from the writable stream when bubbleErrors is false", function(done) { - var duplex = duplexer2({bubbleErrors: false}, writable, readable); - - var timeout = setTimeout(done, 25); - - duplex.on("error", function(err) { - clearTimeout(timeout); - - return done(Error("shouldn't bubble error")); - }); - - // prevent uncaught error exception - writable.on("error", function() {}); - - writable.emit("error", Error("testing")); - }); - - it("should not bubble errors from the readable stream when bubbleErrors is false", function(done) { - var duplex = duplexer2({bubbleErrors: false}, writable, readable); - - var timeout = setTimeout(done, 25); - - duplex.on("error", function(err) { - clearTimeout(timeout); - - return done(Error("shouldn't bubble error")); - }); - - // prevent uncaught error exception - readable.on("error", function() {}); - - readable.emit("error", Error("testing")); - }); -}); diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/package.json deleted file mode 100644 index 264ee69f..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "multipipe", - "version": "0.0.1", - "description": "pipe streams with centralized error handling", - "repository": { - "type": "git", - "url": "git://github.com/segmentio/multipipe" - }, - "dependencies": { - "duplexer2": "0.0.1" - }, - "devDependencies": { - "mocha": "~1.17.0" - }, - "scripts": { - "test": "make test" - }, - "readme": "# multipipe\n\nA better `Stream#pipe` that creates duplex streams and lets you handle errors in one place.\n\n[![build status](https://secure.travis-ci.org/segmentio/multipipe.png)](http://travis-ci.org/segmentio/multipipe)\n\n## Example\n\n```js\nvar pipe = require('multipipe');\n\n// pipe streams\nvar stream = pipe(streamA, streamB, streamC);\n\n// centralized error handling\nstream.on('error', fn);\n\n// creates a new stream\nsource.pipe(stream).pipe(dest);\n```\n\n## Duplex streams\n\n Write to the pipe and you'll really write to the first stream, read from the pipe and you'll read from the last stream.\n\n```js\nvar stream = pipe(a, b, c);\n\nsource\n .pipe(stream)\n .pipe(destination);\n```\n\n In this example the flow of data is:\n\n * source ->\n * a ->\n * b ->\n * c ->\n * destination\n\n## Error handling\n\n Each `pipe` forwards the errors the streams it wraps emit, so you have one central place to handle errors:\n\n```js\nvar stream = pipe(a, b, c);\n\nstream.on('error', function(err){\n // called three times\n});\n\na.emit('error', new Error);\nb.emit('error', new Error);\nc.emit('error', new Error);\n```\n\n## API\n\n### pipe(stream, ...)\n\nPass a variable number of streams and each will be piped to the next one.\n\nA stream will be returned that wraps passed in streams in a way that errors will be forwarded and you can write to and/or read from it.\n\n## Installation\n\n```bash\n$ npm install multipipe\n```\n\n## License\n\n MIT\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/segmentio/multipipe/issues" - }, - "homepage": "https://github.com/segmentio/multipipe", - "_id": "multipipe@0.0.1", - "_from": "multipipe@~0.0.1" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/test/multipipe.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/test/multipipe.js deleted file mode 100644 index 57fd1886..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/multipipe/test/multipipe.js +++ /dev/null @@ -1,85 +0,0 @@ -var assert = require('assert'); -var pipe = require('..'); -var Stream = require('stream'); - -describe('pipe(a)', function(){ - it('should return a', function(){ - var readable = Readable(); - var stream = pipe(readable); - assert.equal(stream, readable); - }); -}); - -describe('pipe(a, b, c)', function(){ - it('should pipe internally', function(done){ - pipe(Readable(), Transform(), Writable(done)); - }); - - it('should be writable', function(done){ - var stream = pipe(Transform(), Writable(done)); - assert(stream.writable); - Readable().pipe(stream); - }); - - it('should be readable', function(done){ - var stream = pipe(Readable(), Transform()); - assert(stream.readable); - stream.pipe(Writable(done)); - }); - - it('should be readable and writable', function(done){ - var stream = pipe(Transform(), Transform()); - assert(stream.readable); - assert(stream.writable); - Readable() - .pipe(stream) - .pipe(Writable(done)); - }); - - it('should aggregate errors', function(done){ - var a = Transform(); - var b = Transform(); - var c = Transform(); - var stream = pipe(a, b, c); - var err = new Error; - var i = 0; - - stream.on('error', function(_err){ - i++; - assert.equal(_err, err); - assert(i <= 3); - if (i == 3) done(); - }); - - a.emit('error', err); - b.emit('error', err); - c.emit('error', err); - }); -}); - -function Readable(){ - var readable = new Stream.Readable({ objectMode: true }); - readable._read = function(){ - this.push('a'); - this.push(null); - }; - return readable; -} - -function Transform(){ - var transform = new Stream.Transform({ objectMode: true }); - transform._transform = function(chunk, _, done){ - done(null, chunk.toUpperCase()); - }; - return transform; -} - -function Writable(cb){ - var writable = new Stream.Writable({ objectMode: true }); - writable._write = function(chunk, _, done){ - assert.equal(chunk, 'A'); - done(); - cb(); - }; - return writable; -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/.jshintrc b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/.jshintrc deleted file mode 100644 index c8ef3ca4..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/.jshintrc +++ /dev/null @@ -1,59 +0,0 @@ -{ - "predef": [ ] - , "bitwise": false - , "camelcase": false - , "curly": false - , "eqeqeq": false - , "forin": false - , "immed": false - , "latedef": false - , "noarg": true - , "noempty": true - , "nonew": true - , "plusplus": false - , "quotmark": true - , "regexp": false - , "undef": true - , "unused": true - , "strict": false - , "trailing": true - , "maxlen": 120 - , "asi": true - , "boss": true - , "debug": true - , "eqnull": true - , "esnext": true - , "evil": true - , "expr": true - , "funcscope": false - , "globalstrict": false - , "iterator": false - , "lastsemic": true - , "laxbreak": true - , "laxcomma": true - , "loopfunc": true - , "multistr": false - , "onecase": false - , "proto": false - , "regexdash": false - , "scripturl": true - , "smarttabs": false - , "shadow": false - , "sub": true - , "supernew": false - , "validthis": true - , "browser": true - , "couch": false - , "devel": false - , "dojo": false - , "mootools": false - , "node": true - , "nonstandard": true - , "prototypejs": false - , "rhino": false - , "worker": true - , "wsh": false - , "nomen": false - , "onevar": false - , "passfail": false -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/.npmignore b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/.travis.yml b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/.travis.yml deleted file mode 100644 index 12b1a310..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: node_js -node_js: -- '0.8' -- '0.10' -- '0.11' -branches: - only: - - master -notifications: - email: - - rod@vagg.org -script: npm test -env: - global: - - SAUCE_USER=through2-sauce - - secure: A8KyygIlklZOcTwTGhZHpkOu7Cn4tI1QQasg75CTSjudczGzkuh1pG2RDIkWqGcrWv9o5CjI6fFYYx0JvQu8o5PO+ZAtV1Z0AlnM965vE8kAx0XEC7giAV323bibfnHwyQu74vIhbOfdes7E4/cYerV2kAjK0T375D4DYEpDuvw= - diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/LICENSE b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/LICENSE deleted file mode 100644 index f6a0029d..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/LICENSE +++ /dev/null @@ -1,39 +0,0 @@ -Copyright 2013, Rod Vagg (the "Original Author") -All rights reserved. - -MIT +no-false-attribs License - -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. - -Distributions of all or part of the Software intended to be used -by the recipients as they would use the unmodified Software, -containing modifications that substantially alter, remove, or -disable functionality of the Software, outside of the documented -configuration mechanisms provided by the Software, shall be -modified such that the Original Author's bug reporting email -addresses and urls are either replaced with the contact information -of the parties responsible for the changes, or removed entirely. - -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. - - -Except where noted, this license applies to any and all software -programs and associated documentation files created by the -Original Author, when distributed with the Software. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/README.md deleted file mode 100644 index c9388b38..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/README.md +++ /dev/null @@ -1,131 +0,0 @@ -# through2 - -<!-- - -soon ... - -[![Build Status](https://secure.travis-ci.org/rvagg/through2.png)](http://travis-ci.org/rvagg/through2) - -[![Build Status](https://saucelabs.com/browser-matrix/through2-sauce.svg)](https://travis-ci.org/rvagg/through2) - ---> - -[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/) - -<!-- -not happy with these, we need to peg to readable-stream@1.0.x so it'll always report out-of-date - -[![david-dm](https://david-dm.org/rvagg/through2.png)](https://david-dm.org/rvagg/through2/) -[![david-dm](https://david-dm.org/rvagg/through2/dev-status.png)](https://david-dm.org/rvagg/through2#info=devDependencies/) ---> - -**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise** - -Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`. - -```js -fs.createReadStream('ex.txt') - .pipe(through2(function (chunk, enc, callback) { - - for (var i = 0; i < chunk.length; i++) - if (chunk[i] == 97) - chunk[i] = 122 // swap 'a' for 'z' - - this.push(chunk) - - callback() - - })) - .pipe(fs.createWriteStream('out.txt')) -``` - -Or object streams: - -```js -var all = [] - -fs.createReadStream('data.csv') - .pipe(csv2()) - .pipe(through2.obj(function (chunk, enc, callback) { - - var data = { - name : chunk[0] - , address : chunk[3] - , phone : chunk[10] - } - - this.push(data) - - callback() - - })) - .on('data', function (data) { - all.push(data) - }) - .on('end', function () { - doSomethingSpecial(all) - }) -``` - -Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`. - -## API - -<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b> - -Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`). - -### options - -The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`). - -The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call: - -```js -fs.createReadStream('/tmp/important.dat') - .pipe(through2({ objectMode: true, allowHalfOpen: false }, function (chunk, enc, cb) { - - this.push(new Buffer('wut?')) - cb() - - }) - .pipe(fs.createWriteStream('/tmp/wut.txt')) -``` - -### transformFunction - -The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk. - -To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on. - -If you **do not provide a `transformFunction`** then you will get a simple simple pass-through stream. - -### flushFunction - -The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress. - -<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b> - -Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances. - -```js -var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) { - if (record.temp != null && record.unit = "F") { - record.temp = ( ( record.temp - 32 ) * 5 ) / 9 - record.unit = "C" - } - this.push(record) - callback() -}) - -// Create instances of FToC like so: -var converter = new FToC() -// Or: -var converter = FToC() -// Or specify/override options when you instantiate, if you prefer: -var converter = FToC({objectMode: true}) -``` - -## License - -**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/.npmignore b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/.npmignore deleted file mode 100644 index 38344f87..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -build/ -test/ -examples/ -fs.js -zlib.js \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/LICENSE b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/README.md deleted file mode 100644 index be976683..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/README.md +++ /dev/null @@ -1,768 +0,0 @@ -# readable-stream - -A new class of streams for Node.js - -This module provides the new Stream base classes introduced in Node -v0.10, for use in Node v0.8. You can use it to have programs that -have to work with node v0.8, while being forward-compatible for v0.10 -and beyond. When you drop support for v0.8, you can remove this -module, and only use the native streams. - -This is almost exactly the same codebase as appears in Node v0.10. -However: - -1. The exported object is actually the Readable class. Decorating the - native `stream` module would be global pollution. -2. In v0.10, you can safely use `base64` as an argument to - `setEncoding` in Readable streams. However, in v0.8, the - StringDecoder class has no `end()` method, which is problematic for - Base64. So, don't use that, because it'll break and be weird. - -Other than that, the API is the same as `require('stream')` in v0.10, -so the API docs are reproduced below. - ----------- - - Stability: 2 - Unstable - -A stream is an abstract interface implemented by various objects in -Node. For example a request to an HTTP server is a stream, as is -stdout. Streams are readable, writable, or both. All streams are -instances of [EventEmitter][] - -You can load the Stream base classes by doing `require('stream')`. -There are base classes provided for Readable streams, Writable -streams, Duplex streams, and Transform streams. - -## Compatibility - -In earlier versions of Node, the Readable stream interface was -simpler, but also less powerful and less useful. - -* Rather than waiting for you to call the `read()` method, `'data'` - events would start emitting immediately. If you needed to do some - I/O to decide how to handle data, then you had to store the chunks - in some kind of buffer so that they would not be lost. -* The `pause()` method was advisory, rather than guaranteed. This - meant that you still had to be prepared to receive `'data'` events - even when the stream was in a paused state. - -In Node v0.10, the Readable class described below was added. For -backwards compatibility with older Node programs, Readable streams -switch into "old mode" when a `'data'` event handler is added, or when -the `pause()` or `resume()` methods are called. The effect is that, -even if you are not using the new `read()` method and `'readable'` -event, you no longer have to worry about losing `'data'` chunks. - -Most programs will continue to function normally. However, this -introduces an edge case in the following conditions: - -* No `'data'` event handler is added. -* The `pause()` and `resume()` methods are never called. - -For example, consider the following code: - -```javascript -// WARNING! BROKEN! -net.createServer(function(socket) { - - // we add an 'end' method, but never consume the data - socket.on('end', function() { - // It will never get here. - socket.end('I got your message (but didnt read it)\n'); - }); - -}).listen(1337); -``` - -In versions of node prior to v0.10, the incoming message data would be -simply discarded. However, in Node v0.10 and beyond, the socket will -remain paused forever. - -The workaround in this situation is to call the `resume()` method to -trigger "old mode" behavior: - -```javascript -// Workaround -net.createServer(function(socket) { - - socket.on('end', function() { - socket.end('I got your message (but didnt read it)\n'); - }); - - // start the flow of data, discarding it. - socket.resume(); - -}).listen(1337); -``` - -In addition to new Readable streams switching into old-mode, pre-v0.10 -style streams can be wrapped in a Readable class using the `wrap()` -method. - -## Class: stream.Readable - -<!--type=class--> - -A `Readable Stream` has the following methods, members, and events. - -Note that `stream.Readable` is an abstract class designed to be -extended with an underlying implementation of the `_read(size)` -method. (See below.) - -### new stream.Readable([options]) - -* `options` {Object} - * `highWaterMark` {Number} The maximum number of bytes to store in - the internal buffer before ceasing to read from the underlying - resource. Default=16kb - * `encoding` {String} If specified, then buffers will be decoded to - strings using the specified encoding. Default=null - * `objectMode` {Boolean} Whether this stream should behave - as a stream of objects. Meaning that stream.read(n) returns - a single value instead of a Buffer of size n - -In classes that extend the Readable class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### readable.\_read(size) - -* `size` {Number} Number of bytes to read asynchronously - -Note: **This function should NOT be called directly.** It should be -implemented by child classes, and called by the internal Readable -class methods only. - -All Readable stream implementations must provide a `_read` method -to fetch data from the underlying resource. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -When data is available, put it into the read queue by calling -`readable.push(chunk)`. If `push` returns false, then you should stop -reading. When `_read` is called again, you should start pushing more -data. - -The `size` argument is advisory. Implementations where a "read" is a -single call that returns data can use this to know how much data to -fetch. Implementations where that is not relevant, such as TCP or -TLS, may ignore this argument, and simply provide data whenever it -becomes available. There is no need, for example to "wait" until -`size` bytes are available before calling `stream.push(chunk)`. - -### readable.push(chunk) - -* `chunk` {Buffer | null | String} Chunk of data to push into the read queue -* return {Boolean} Whether or not more pushes should be performed - -Note: **This function should be called by Readable implementors, NOT -by consumers of Readable subclasses.** The `_read()` function will not -be called again until at least one `push(chunk)` call is made. If no -data is available, then you MAY call `push('')` (an empty string) to -allow a future `_read` call, without adding any data to the queue. - -The `Readable` class works by putting data into a read queue to be -pulled out later by calling the `read()` method when the `'readable'` -event fires. - -The `push()` method will explicitly insert some data into the read -queue. If it is called with `null` then it will signal the end of the -data. - -In some cases, you may be wrapping a lower-level source which has some -sort of pause/resume mechanism, and a data callback. In those cases, -you could wrap the low-level source object by doing something like -this: - -```javascript -// source is an object with readStop() and readStart() methods, -// and an `ondata` member that gets called when it has data, and -// an `onend` member that gets called when the data is over. - -var stream = new Readable(); - -source.ondata = function(chunk) { - // if push() returns false, then we need to stop reading from source - if (!stream.push(chunk)) - source.readStop(); -}; - -source.onend = function() { - stream.push(null); -}; - -// _read will be called when the stream wants to pull more data in -// the advisory size argument is ignored in this case. -stream._read = function(n) { - source.readStart(); -}; -``` - -### readable.unshift(chunk) - -* `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue -* return {Boolean} Whether or not more pushes should be performed - -This is the corollary of `readable.push(chunk)`. Rather than putting -the data at the *end* of the read queue, it puts it at the *front* of -the read queue. - -This is useful in certain use-cases where a stream is being consumed -by a parser, which needs to "un-consume" some data that it has -optimistically pulled out of the source. - -```javascript -// A parser for a simple data protocol. -// The "header" is a JSON object, followed by 2 \n characters, and -// then a message body. -// -// Note: This can be done more simply as a Transform stream. See below. - -function SimpleProtocol(source, options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(options); - - Readable.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - - // source is a readable stream, such as a socket or file - this._source = source; - - var self = this; - source.on('end', function() { - self.push(null); - }); - - // give it a kick whenever the source is readable - // read(0) will not consume any bytes - source.on('readable', function() { - self.read(0); - }); - - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype = Object.create( - Readable.prototype, { constructor: { value: SimpleProtocol }}); - -SimpleProtocol.prototype._read = function(n) { - if (!this._inBody) { - var chunk = this._source.read(); - - // if the source doesn't have data, we don't have data yet. - if (chunk === null) - return this.push(''); - - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - this.push(''); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // now, because we got some extra data, unshift the rest - // back into the read queue so that our consumer will see it. - var b = chunk.slice(split); - this.unshift(b); - - // and let them know that we are done parsing the header. - this.emit('header', this.header); - } - } else { - // from there on, just provide the data to our consumer. - // careful not to push(null), since that would indicate EOF. - var chunk = this._source.read(); - if (chunk) this.push(chunk); - } -}; - -// Usage: -var parser = new SimpleProtocol(source); -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - -### readable.wrap(stream) - -* `stream` {Stream} An "old style" readable stream - -If you are using an older Node library that emits `'data'` events and -has a `pause()` method that is advisory only, then you can use the -`wrap()` method to create a Readable stream that uses the old stream -as its data source. - -For example: - -```javascript -var OldReader = require('./old-api-module.js').OldReader; -var oreader = new OldReader; -var Readable = require('stream').Readable; -var myReader = new Readable().wrap(oreader); - -myReader.on('readable', function() { - myReader.read(); // etc. -}); -``` - -### Event: 'readable' - -When there is data ready to be consumed, this event will fire. - -When this event emits, call the `read()` method to consume the data. - -### Event: 'end' - -Emitted when the stream has received an EOF (FIN in TCP terminology). -Indicates that no more `'data'` events will happen. If the stream is -also writable, it may be possible to continue writing. - -### Event: 'data' - -The `'data'` event emits either a `Buffer` (by default) or a string if -`setEncoding()` was used. - -Note that adding a `'data'` event listener will switch the Readable -stream into "old mode", where data is emitted as soon as it is -available, rather than waiting for you to call `read()` to consume it. - -### Event: 'error' - -Emitted if there was an error receiving data. - -### Event: 'close' - -Emitted when the underlying resource (for example, the backing file -descriptor) has been closed. Not all streams will emit this. - -### readable.setEncoding(encoding) - -Makes the `'data'` event emit a string instead of a `Buffer`. `encoding` -can be `'utf8'`, `'utf16le'` (`'ucs2'`), `'ascii'`, or `'hex'`. - -The encoding can also be set by specifying an `encoding` field to the -constructor. - -### readable.read([size]) - -* `size` {Number | null} Optional number of bytes to read. -* Return: {Buffer | String | null} - -Note: **This function SHOULD be called by Readable stream users.** - -Call this method to consume data once the `'readable'` event is -emitted. - -The `size` argument will set a minimum number of bytes that you are -interested in. If not set, then the entire content of the internal -buffer is returned. - -If there is no data to consume, or if there are fewer bytes in the -internal buffer than the `size` argument, then `null` is returned, and -a future `'readable'` event will be emitted when more is available. - -Calling `stream.read(0)` will always return `null`, and will trigger a -refresh of the internal buffer, but otherwise be a no-op. - -### readable.pipe(destination, [options]) - -* `destination` {Writable Stream} -* `options` {Object} Optional - * `end` {Boolean} Default=true - -Connects this readable stream to `destination` WriteStream. Incoming -data on this stream gets written to `destination`. Properly manages -back-pressure so that a slow destination will not be overwhelmed by a -fast readable stream. - -This function returns the `destination` stream. - -For example, emulating the Unix `cat` command: - - process.stdin.pipe(process.stdout); - -By default `end()` is called on the destination when the source stream -emits `end`, so that `destination` is no longer writable. Pass `{ end: -false }` as `options` to keep the destination stream open. - -This keeps `writer` open so that "Goodbye" can be written at the -end. - - reader.pipe(writer, { end: false }); - reader.on("end", function() { - writer.end("Goodbye\n"); - }); - -Note that `process.stderr` and `process.stdout` are never closed until -the process exits, regardless of the specified options. - -### readable.unpipe([destination]) - -* `destination` {Writable Stream} Optional - -Undo a previously established `pipe()`. If no destination is -provided, then all previously established pipes are removed. - -### readable.pause() - -Switches the readable stream into "old mode", where data is emitted -using a `'data'` event rather than being buffered for consumption via -the `read()` method. - -Ceases the flow of data. No `'data'` events are emitted while the -stream is in a paused state. - -### readable.resume() - -Switches the readable stream into "old mode", where data is emitted -using a `'data'` event rather than being buffered for consumption via -the `read()` method. - -Resumes the incoming `'data'` events after a `pause()`. - - -## Class: stream.Writable - -<!--type=class--> - -A `Writable` Stream has the following methods, members, and events. - -Note that `stream.Writable` is an abstract class designed to be -extended with an underlying implementation of the -`_write(chunk, encoding, cb)` method. (See below.) - -### new stream.Writable([options]) - -* `options` {Object} - * `highWaterMark` {Number} Buffer level when `write()` starts - returning false. Default=16kb - * `decodeStrings` {Boolean} Whether or not to decode strings into - Buffers before passing them to `_write()`. Default=true - -In classes that extend the Writable class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### writable.\_write(chunk, encoding, callback) - -* `chunk` {Buffer | String} The chunk to be written. Will always - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. Ignore chunk is a buffer. Note that chunk will - **always** be a buffer unless the `decodeStrings` option is - explicitly set to `false`. -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunk. - -All Writable stream implementations must provide a `_write` method to -send data to the underlying resource. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Writable -class methods only. - -Call the callback using the standard `callback(error)` pattern to -signal that the write completed successfully or with an error. - -If the `decodeStrings` flag is set in the constructor options, then -`chunk` may be a string rather than a Buffer, and `encoding` will -indicate the sort of string that it is. This is to support -implementations that have an optimized handling for certain string -data encodings. If you do not explicitly set the `decodeStrings` -option to `false`, then you can safely ignore the `encoding` argument, -and assume that `chunk` will always be a Buffer. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - - -### writable.write(chunk, [encoding], [callback]) - -* `chunk` {Buffer | String} Data to be written -* `encoding` {String} Optional. If `chunk` is a string, then encoding - defaults to `'utf8'` -* `callback` {Function} Optional. Called when this chunk is - successfully written. -* Returns {Boolean} - -Writes `chunk` to the stream. Returns `true` if the data has been -flushed to the underlying resource. Returns `false` to indicate that -the buffer is full, and the data will be sent out in the future. The -`'drain'` event will indicate when the buffer is empty again. - -The specifics of when `write()` will return false, is determined by -the `highWaterMark` option provided to the constructor. - -### writable.end([chunk], [encoding], [callback]) - -* `chunk` {Buffer | String} Optional final data to be written -* `encoding` {String} Optional. If `chunk` is a string, then encoding - defaults to `'utf8'` -* `callback` {Function} Optional. Called when the final chunk is - successfully written. - -Call this method to signal the end of the data being written to the -stream. - -### Event: 'drain' - -Emitted when the stream's write queue empties and it's safe to write -without buffering again. Listen for it when `stream.write()` returns -`false`. - -### Event: 'close' - -Emitted when the underlying resource (for example, the backing file -descriptor) has been closed. Not all streams will emit this. - -### Event: 'finish' - -When `end()` is called and there are no more chunks to write, this -event is emitted. - -### Event: 'pipe' - -* `source` {Readable Stream} - -Emitted when the stream is passed to a readable stream's pipe method. - -### Event 'unpipe' - -* `source` {Readable Stream} - -Emitted when a previously established `pipe()` is removed using the -source Readable stream's `unpipe()` method. - -## Class: stream.Duplex - -<!--type=class--> - -A "duplex" stream is one that is both Readable and Writable, such as a -TCP socket connection. - -Note that `stream.Duplex` is an abstract class designed to be -extended with an underlying implementation of the `_read(size)` -and `_write(chunk, encoding, callback)` methods as you would with a Readable or -Writable stream class. - -Since JavaScript doesn't have multiple prototypal inheritance, this -class prototypally inherits from Readable, and then parasitically from -Writable. It is thus up to the user to implement both the lowlevel -`_read(n)` method as well as the lowlevel `_write(chunk, encoding, cb)` method -on extension duplex classes. - -### new stream.Duplex(options) - -* `options` {Object} Passed to both Writable and Readable - constructors. Also has the following fields: - * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then - the stream will automatically end the readable side when the - writable side ends and vice versa. - -In classes that extend the Duplex class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -## Class: stream.Transform - -A "transform" stream is a duplex stream where the output is causally -connected in some way to the input, such as a zlib stream or a crypto -stream. - -There is no requirement that the output be the same size as the input, -the same number of chunks, or arrive at the same time. For example, a -Hash stream will only ever have a single chunk of output which is -provided when the input is ended. A zlib stream will either produce -much smaller or much larger than its input. - -Rather than implement the `_read()` and `_write()` methods, Transform -classes must implement the `_transform()` method, and may optionally -also implement the `_flush()` method. (See below.) - -### new stream.Transform([options]) - -* `options` {Object} Passed to both Writable and Readable - constructors. - -In classes that extend the Transform class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### transform.\_transform(chunk, encoding, callback) - -* `chunk` {Buffer | String} The chunk to be transformed. Will always - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. (Ignore if `decodeStrings` chunk is a buffer.) -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunk. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Transform -class methods only. - -All Transform stream implementations must provide a `_transform` -method to accept input and produce output. - -`_transform` should do whatever has to be done in this specific -Transform class, to handle the bytes being written, and pass them off -to the readable portion of the interface. Do asynchronous I/O, -process things, and so on. - -Call `transform.push(outputChunk)` 0 or more times to generate output -from this input chunk, depending on how much data you want to output -as a result of this chunk. - -Call the callback function only when the current chunk is completely -consumed. Note that there may or may not be output as a result of any -particular input chunk. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -### transform.\_flush(callback) - -* `callback` {Function} Call this function (optionally with an error - argument) when you are done flushing any remaining data. - -Note: **This function MUST NOT be called directly.** It MAY be implemented -by child classes, and if so, will be called by the internal Transform -class methods only. - -In some cases, your transform operation may need to emit a bit more -data at the end of the stream. For example, a `Zlib` compression -stream will store up some internal state so that it can optimally -compress the output. At the end, however, it needs to do the best it -can with what is left, so that the data will be complete. - -In those cases, you can implement a `_flush` method, which will be -called at the very end, after all the written data is consumed, but -before emitting `end` to signal the end of the readable side. Just -like with `_transform`, call `transform.push(chunk)` zero or more -times, as appropriate, and call `callback` when the flush operation is -complete. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -### Example: `SimpleProtocol` parser - -The example above of a simple protocol parser can be implemented much -more simply by using the higher level `Transform` stream class. - -In this example, rather than providing the input as an argument, it -would be piped into the parser, which is a more idiomatic Node stream -approach. - -```javascript -function SimpleProtocol(options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(options); - - Transform.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype = Object.create( - Transform.prototype, { constructor: { value: SimpleProtocol }}); - -SimpleProtocol.prototype._transform = function(chunk, encoding, done) { - if (!this._inBody) { - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // and let them know that we are done parsing the header. - this.emit('header', this.header); - - // now, because we got some extra data, emit this first. - this.push(b); - } - } else { - // from there on, just provide the data to our consumer as-is. - this.push(b); - } - done(); -}; - -var parser = new SimpleProtocol(); -source.pipe(parser) - -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - - -## Class: stream.PassThrough - -This is a trivial implementation of a `Transform` stream that simply -passes the input bytes across to the output. Its purpose is mainly -for examples and testing, but there are occasionally use cases where -it can come in handy. - - -[EventEmitter]: events.html#events_class_events_eventemitter diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/duplex.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af8..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/float.patch b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/float.patch deleted file mode 100644 index 0ad71a1f..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/float.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js -index c5a741c..a2e0d8e 100644 ---- a/lib/_stream_duplex.js -+++ b/lib/_stream_duplex.js -@@ -26,8 +26,8 @@ - - module.exports = Duplex; - var util = require('util'); --var Readable = require('_stream_readable'); --var Writable = require('_stream_writable'); -+var Readable = require('./_stream_readable'); -+var Writable = require('./_stream_writable'); - - util.inherits(Duplex, Readable); - -diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js -index a5e9864..330c247 100644 ---- a/lib/_stream_passthrough.js -+++ b/lib/_stream_passthrough.js -@@ -25,7 +25,7 @@ - - module.exports = PassThrough; - --var Transform = require('_stream_transform'); -+var Transform = require('./_stream_transform'); - var util = require('util'); - util.inherits(PassThrough, Transform); - -diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js -index 2259d2e..e6681ee 100644 ---- a/lib/_stream_readable.js -+++ b/lib/_stream_readable.js -@@ -23,6 +23,9 @@ module.exports = Readable; - Readable.ReadableState = ReadableState; - - var EE = require('events').EventEmitter; -+if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { -+ return emitter.listeners(type).length; -+}; - var Stream = require('stream'); - var util = require('util'); - var StringDecoder; -diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js -index e925b4b..f08b05e 100644 ---- a/lib/_stream_transform.js -+++ b/lib/_stream_transform.js -@@ -64,7 +64,7 @@ - - module.exports = Transform; - --var Duplex = require('_stream_duplex'); -+var Duplex = require('./_stream_duplex'); - var util = require('util'); - util.inherits(Transform, Duplex); - -diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js -index a26f711..56ca47d 100644 ---- a/lib/_stream_writable.js -+++ b/lib/_stream_writable.js -@@ -109,7 +109,7 @@ function WritableState(options, stream) { - function Writable(options) { - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. -- if (!(this instanceof Writable) && !(this instanceof Stream.Duplex)) -+ if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) - return new Writable(options); - - this._writableState = new WritableState(options, this); diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index a2e0d8e0..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -module.exports = Duplex; -var util = require('util'); -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -Object.keys(Writable.prototype).forEach(function(method) { - if (!Duplex.prototype[method]) - Duplex.prototype[method] = Writable.prototype[method]; -}); - -function Duplex(options) { - if (!(this instanceof Duplex)) - return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) - this.readable = false; - - if (options && options.writable === false) - this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) - this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) - return; - - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(this.end.bind(this)); -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 330c247d..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); -var util = require('util'); -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) - return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function(chunk, encoding, cb) { - cb(null, chunk); -}; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 323f3305..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,927 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -module.exports = Readable; -Readable.ReadableState = ReadableState; - -var EE = require('events').EventEmitter; -if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { - return emitter.listeners(type).length; -}; -var Stream = require('stream'); -var util = require('util'); -var StringDecoder; - -util.inherits(Readable, Stream); - -function ReadableState(options, stream) { - options = options || {}; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = false; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // In streams that never have any data, and do push(null) right away, - // the consumer can miss the 'end' event if they do some I/O before - // consuming the stream. So, we don't emit('end') until some reading - // happens. - this.calledRead = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - if (!(this instanceof Readable)) - return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function(chunk, encoding) { - var state = this._readableState; - - if (typeof chunk === 'string' && !state.objectMode) { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = new Buffer(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function(chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (chunk === null || chunk === undefined) { - state.reading = false; - if (!state.ended) - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var e = new Error('stream.unshift() after end event'); - stream.emit('error', e); - } else { - if (state.decoder && !addToFront && !encoding) - chunk = state.decoder.write(chunk); - - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) { - state.buffer.unshift(chunk); - } else { - state.reading = false; - state.buffer.push(chunk); - } - - if (state.needReadable) - emitReadable(stream); - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - - - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && - (state.needReadable || - state.length < state.highWaterMark || - state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function(enc) { - if (!StringDecoder) - StringDecoder = require('string_decoder/').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; -}; - -// Don't raise the hwm > 128MB -var MAX_HWM = 0x800000; -function roundUpToNextPowerOf2(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - for (var p = 1; p < 32; p <<= 1) n |= n >> p; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) - return 0; - - if (state.objectMode) - return n === 0 ? 0 : 1; - - if (isNaN(n) || n === null) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) - return state.buffer[0].length; - else - return state.length; - } - - if (n <= 0) - return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) - state.highWaterMark = roundUpToNextPowerOf2(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else - return state.length; - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function(n) { - var state = this._readableState; - state.calledRead = true; - var nOrig = n; - - if (typeof n !== 'number' || n > 0) - state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && - state.needReadable && - (state.length >= state.highWaterMark || state.ended)) { - emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) - endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - - // if we currently have less than the highWaterMark, then also read some - if (state.length - n <= state.highWaterMark) - doRead = true; - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) - doRead = false; - - if (doRead) { - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) - state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read called its callback synchronously, then `reading` - // will be false, and we need to re-evaluate how much data we - // can return to the user. - if (doRead && !state.reading) - n = howMuchToRead(nOrig, state); - - var ret; - if (n > 0) - ret = fromList(n, state); - else - ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) - state.needReadable = true; - - // If we happened to read() exactly the remaining amount in the - // buffer, and the EOF has been seen at this point, then make sure - // that we emit 'end' on the very next tick. - if (state.ended && !state.endEmitted && state.length === 0) - endReadable(this); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode && - !er) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - - -function onEofChunk(stream, state) { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // if we've ended and we have some data left, then emit - // 'readable' now to make sure it gets picked up. - if (state.length > 0) - emitReadable(stream); - else - endReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (state.emittedReadable) - return; - - state.emittedReadable = true; - if (state.sync) - process.nextTick(function() { - emitReadable_(stream); - }); - else - emitReadable_(stream); -} - -function emitReadable_(stream) { - stream.emit('readable'); -} - - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(function() { - maybeReadMore_(stream, state); - }); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && - state.length < state.highWaterMark) { - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break; - else - len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function(n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function(dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && - dest !== process.stdout && - dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) - process.nextTick(endFn); - else - src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - if (readable !== src) return; - cleanup(); - } - - function onend() { - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - function cleanup() { - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (!dest._writableState || dest._writableState.needDrain) - ondrain(); - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - unpipe(); - dest.removeListener('error', onerror); - if (EE.listenerCount(dest, 'error') === 0) - dest.emit('error', er); - } - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. - if (!dest._events || !dest._events.error) - dest.on('error', onerror); - else if (Array.isArray(dest._events.error)) - dest._events.error.unshift(onerror); - else - dest._events.error = [onerror, dest._events.error]; - - - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - // the handler that waits for readable events after all - // the data gets sucked out in flow. - // This would be easier to follow with a .once() handler - // in flow(), but that is too slow. - this.on('readable', pipeOnReadable); - - state.flowing = true; - process.nextTick(function() { - flow(src); - }); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function() { - var dest = this; - var state = src._readableState; - state.awaitDrain--; - if (state.awaitDrain === 0) - flow(src); - }; -} - -function flow(src) { - var state = src._readableState; - var chunk; - state.awaitDrain = 0; - - function write(dest, i, list) { - var written = dest.write(chunk); - if (false === written) { - state.awaitDrain++; - } - } - - while (state.pipesCount && null !== (chunk = src.read())) { - - if (state.pipesCount === 1) - write(state.pipes, 0, null); - else - state.pipes.forEach(write); - - src.emit('data', chunk); - - // if anyone needs a drain, then we have to wait for that. - if (state.awaitDrain > 0) - return; - } - - // if every destination was unpiped, either before entering this - // function, or in the while loop, then stop flowing. - // - // NB: This is a pretty rare edge case. - if (state.pipesCount === 0) { - state.flowing = false; - - // if there were data event listeners added, then switch to old mode. - if (EE.listenerCount(src, 'data') > 0) - emitDataEvents(src); - return; - } - - // at this point, no one needed a drain, so we just ran out of data - // on the next readable event, start it over again. - state.ranOut = true; -} - -function pipeOnReadable() { - if (this._readableState.ranOut) { - this._readableState.ranOut = false; - flow(this); - } -} - - -Readable.prototype.unpipe = function(dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) - return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) - return this; - - if (!dest) - dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - if (dest) - dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - - for (var i = 0; i < len; i++) - dests[i].emit('unpipe', this); - return this; - } - - // try to find the right one. - var i = state.pipes.indexOf(dest); - if (i === -1) - return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) - state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function(ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data' && !this._readableState.flowing) - emitDataEvents(this); - - if (ev === 'readable' && this.readable) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - this.read(0); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function() { - emitDataEvents(this); - this.read(0); - this.emit('resume'); -}; - -Readable.prototype.pause = function() { - emitDataEvents(this, true); - this.emit('pause'); -}; - -function emitDataEvents(stream, startPaused) { - var state = stream._readableState; - - if (state.flowing) { - // https://github.com/isaacs/readable-stream/issues/16 - throw new Error('Cannot switch to old mode now.'); - } - - var paused = startPaused || false; - var readable = false; - - // convert to an old-style stream. - stream.readable = true; - stream.pipe = Stream.prototype.pipe; - stream.on = stream.addListener = Stream.prototype.on; - - stream.on('readable', function() { - readable = true; - - var c; - while (!paused && (null !== (c = stream.read()))) - stream.emit('data', c); - - if (c === null) { - readable = false; - stream._readableState.needReadable = true; - } - }); - - stream.pause = function() { - paused = true; - this.emit('pause'); - }; - - stream.resume = function() { - paused = false; - if (readable) - process.nextTick(function() { - stream.emit('readable'); - }); - else - this.read(0); - this.emit('resume'); - }; - - // now make it start, just in case it hadn't already. - stream.emit('readable'); -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function(stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function() { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) - self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function(chunk) { - if (state.decoder) - chunk = state.decoder.write(chunk); - if (!chunk || !state.objectMode && !chunk.length) - return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (typeof stream[i] === 'function' && - typeof this[i] === 'undefined') { - this[i] = function(method) { return function() { - return stream[method].apply(stream, arguments); - }}(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - events.forEach(function(ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function(n) { - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - - - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) - return null; - - if (length === 0) - ret = null; - else if (objectMode) - ret = list.shift(); - else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) - ret = list.join(''); - else - ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) - ret = ''; - else - ret = new Buffer(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var buf = list[0]; - var cpy = Math.min(n - c, buf.length); - - if (stringMode) - ret += buf.slice(0, cpy); - else - buf.copy(ret, c, 0, cpy); - - if (cpy < buf.length) - list[0] = buf.slice(cpy); - else - list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) - throw new Error('endReadable called on non-empty stream'); - - if (!state.endEmitted && state.calledRead) { - state.ended = true; - process.nextTick(function() { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } - }); - } -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index 707e4b3b..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); -var util = require('util'); -util.inherits(Transform, Duplex); - - -function TransformState(options, stream) { - this.afterTransform = function(er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) - return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (data !== null && data !== undefined) - stream.push(data); - - if (cb) - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - - -function Transform(options) { - if (!(this instanceof Transform)) - return new Transform(options); - - Duplex.call(this, options); - - var ts = this._transformState = new TransformState(options, this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - this.once('finish', function() { - if ('function' === typeof this._flush) - this._flush(function(er) { - done(stream, er); - }); - else - done(stream); - }); -} - -Transform.prototype.push = function(chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function(chunk, encoding, cb) { - throw new Error('not implemented'); -}; - -Transform.prototype._write = function(chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || - rs.needReadable || - rs.length < rs.highWaterMark) - this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function(n) { - var ts = this._transformState; - - if (ts.writechunk !== null && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - - -function done(stream, er) { - if (er) - return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var rs = stream._readableState; - var ts = stream._transformState; - - if (ws.length) - throw new Error('calling transform done when ws.length != 0'); - - if (ts.transforming) - throw new Error('calling transform done when still transforming'); - - return stream.push(null); -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index 9eaf4ec2..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,371 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, cb), and it'll handle all -// the drain event emission and buffering. - -module.exports = Writable; -Writable.WritableState = WritableState; - -var util = require('util'); -var assert = require('assert'); -var Stream = require('stream'); - -util.inherits(Writable, Stream); - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; -} - -function WritableState(options, stream) { - options = options || {}; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function(er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.buffer = []; -} - -function Writable(options) { - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) - return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function() { - this.emit('error', new Error('Cannot pipe. Not readable.')); -}; - - -function writeAfterEnd(stream, state, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); - valid = false; - } - return valid; -} - -Writable.prototype.write = function(chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - else if (!encoding) - encoding = state.defaultEncoding; - - if (typeof cb !== 'function') - cb = function() {}; - - if (state.ended) - writeAfterEnd(this, state, cb); - else if (validChunk(this, state, chunk, cb)) - ret = writeOrBuffer(this, state, chunk, encoding, cb); - - return ret; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && - state.decodeStrings !== false && - typeof chunk === 'string') { - chunk = new Buffer(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) - state.needDrain = true; - - if (state.writing) - state.buffer.push(new WriteReq(chunk, encoding, cb)); - else - doWrite(stream, state, len, chunk, encoding, cb); - - return ret; -} - -function doWrite(stream, state, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - if (sync) - process.nextTick(function() { - cb(er); - }); - else - cb(er); - - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) - onwriteError(stream, state, sync, er, cb); - else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(stream, state); - - if (!finished && !state.bufferProcessing && state.buffer.length) - clearBuffer(stream, state); - - if (sync) { - process.nextTick(function() { - afterWrite(stream, state, finished, cb); - }); - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) - onwriteDrain(stream, state); - cb(); - if (finished) - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - - for (var c = 0; c < state.buffer.length; c++) { - var entry = state.buffer[c]; - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, len, chunk, encoding, cb); - - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - c++; - break; - } - } - - state.bufferProcessing = false; - if (c < state.buffer.length) - state.buffer = state.buffer.slice(c); - else - state.buffer.length = 0; -} - -Writable.prototype._write = function(chunk, encoding, cb) { - cb(new Error('not implemented')); -}; - -Writable.prototype.end = function(chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (typeof chunk !== 'undefined' && chunk !== null) - this.write(chunk, encoding); - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) - endWritable(this, state, cb); -}; - - -function needFinish(stream, state) { - return (state.ending && - state.length === 0 && - !state.finished && - !state.writing); -} - -function finishMaybe(stream, state) { - var need = needFinish(stream, state); - if (need) { - state.finished = true; - stream.emit('finish'); - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) - process.nextTick(cb); - else - stream.once('finish', cb); - } - state.ended = true; -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE deleted file mode 100644 index 6de584a4..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Joyent, Inc. and other Node contributors. - -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/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md deleted file mode 100644 index 4d2aa001..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/README.md +++ /dev/null @@ -1,7 +0,0 @@ -**string_decoder.js** (`require('string_decoder')`) from Node.js core - -Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. - -Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** - -The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js deleted file mode 100755 index 46470cfd..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/build.js +++ /dev/null @@ -1,94 +0,0 @@ -#!/usr/bin/env node - -const hyperquest = require('hyperzip')(require('hyperdirect')) - , bl = require('bl') - , fs = require('fs') - , path = require('path') - , cheerio = require('cheerio') - - , files = require('./files') - , testReplace = require('./test-replacements') - - , srcurlpfx = 'https://raw.github.com/joyent/node/v' + process.argv[2] + '-release/' - , libsrcurl = srcurlpfx + 'lib/' - , testsrcurl = srcurlpfx + 'test/simple/' - , testlisturl = 'https://github.com/joyent/node/tree/v' + process.argv[2] + '-release/test/simple' - , libourroot = path.join(__dirname, '../') - , testourroot = path.join(__dirname, '../test/simple/') - - -function processFile (url, out, replacements) { - hyperquest(url).pipe(bl(function (err, data) { - if (err) - throw err - - data = data.toString() - replacements.forEach(function (replacement) { - data = data.replace.apply(data, replacement) - }) - - fs.writeFile(out, data, 'utf8', function (err) { - if (err) - throw err - - console.log('Wrote', out) - }) - })) -} - -function processLibFile (file) { - var replacements = files[file] - , url = libsrcurl + file - , out = path.join(libourroot, replacements.out || file) - - processFile(url, out, replacements) -} - - -function processTestFile (file) { - var replacements = testReplace.all - , url = testsrcurl + file - , out = path.join(testourroot, file) - - if (testReplace[file]) - replacements = replacements.concat(testReplace[file]) - - processFile(url, out, replacements) -} - - -if (!/0\.1\d\.\d+/.test(process.argv[2])) { - console.log('Usage: build.js <node version>') - return process.exit(-1) -} - - -//-------------------------------------------------------------------- -// Grab & process files in ../lib/ - -Object.keys(files).forEach(processLibFile) - -//-------------------------------------------------------------------- -// Discover, grab and process all test-string-decoder* files on joyent/node - -hyperquest(testlisturl).pipe(bl(function (err, data) { - if (err) - throw err - - var $ = cheerio.load(data.toString()) - - $('table.files .js-directory-link').each(function () { - var file = $(this).text() - if (/^test-string-decoder/.test(file) || file == 'common.js') - processTestFile(file) - }) -})) - -//-------------------------------------------------------------------- -// Grab the joyent/node test/common.js - -processFile( - testsrcurl + '../common.js' - , path.join(testourroot, '../common.js') - , testReplace['common.js'] -) \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js deleted file mode 100644 index 7396a4f4..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/files.js +++ /dev/null @@ -1,36 +0,0 @@ -/* This file lists the files to be fetched from the node repo - * in the /lib/ directory which will be placed in the ../lib/ - * directory after having each of the "replacements" in the - * array for that file applied to it. The replacements are - * simply the arguments to String#replace, so they can be - * strings, regexes, functions. - */ - -module.exports['string_decoder.js'] = [ - - // pull in Bufer as a require - // add Buffer.isEncoding where missing - [ - /^(\/\/ USE OR OTHER DEALINGS IN THE SOFTWARE\.)/m - , '$1\n\nvar Buffer = require(\'buffer\').Buffer;' - + '\n' - + '\nvar isBufferEncoding = Buffer.isEncoding' - + '\n || function(encoding) {' - + '\n switch (encoding && encoding.toLowerCase()) {' - + '\n case \'hex\': case \'utf8\': case \'utf-8\': case \'ascii\': case \'binary\': case \'base64\': case \'ucs2\': case \'ucs-2\': case \'utf16le\': case \'utf-16le\': case \'raw\': return true;' - + '\n default: return false;' - + '\n }' - + '\n }' - + '\n' - - ] - - // use custom Buffer.isEncoding reference - , [ - /Buffer\.isEncoding\(/g - , 'isBufferEncoding\(' - ] - -] - -module.exports['string_decoder.js'].out = 'index.js' \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json deleted file mode 100644 index f7ee6a46..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "string_decoder-build", - "version": "0.0.0", - "description": "", - "main": "build.js", - "dependencies": { - "bl": "~0.6.0", - "hyperzip": "0.0.0", - "hyperdirect": "0.0.0", - "cheerio": "~0.13.1" - } -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js deleted file mode 100644 index 5bbf6028..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/build/test-replacements.js +++ /dev/null @@ -1,24 +0,0 @@ -module.exports.all = [ - [ - /require\(['"]string_decoder['"]\)/g - , 'require(\'../../\')' - ] - -] - -module.exports['common.js'] = [ - [ - /^ setImmediate,$/m - , ' typeof setImmediate == \'undefined\' ? null : setImmediate,' - ] - - , [ - /^ clearImmediate,$/m - , ' typeof clearImmediate == \'undefined\' ? null : clearImmediate,' - ] - - , [ - /^ global];$/m - , ' global].filter(Boolean);' - ] -] diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js deleted file mode 100644 index 2e44a03e..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/index.js +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var Buffer = require('buffer').Buffer; - -var isBufferEncoding = Buffer.isEncoding - || function(encoding) { - switch (encoding && encoding.toLowerCase()) { - case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; - default: return false; - } - } - - -function assertEncoding(encoding) { - if (encoding && !isBufferEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} - -var StringDecoder = exports.StringDecoder = function(encoding) { - this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); - assertEncoding(encoding); - switch (this.encoding) { - case 'utf8': - // CESU-8 represents each of Surrogate Pair by 3-bytes - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - // UTF-16 represents each of Surrogate Pair by 2-bytes - this.surrogateSize = 2; - this.detectIncompleteChar = utf16DetectIncompleteChar; - break; - case 'base64': - // Base-64 stores 3 bytes in 4 chars, and pads the remainder. - this.surrogateSize = 3; - this.detectIncompleteChar = base64DetectIncompleteChar; - break; - default: - this.write = passThroughWrite; - return; - } - - this.charBuffer = new Buffer(6); - this.charReceived = 0; - this.charLength = 0; -}; - - -StringDecoder.prototype.write = function(buffer) { - var charStr = ''; - var offset = 0; - - // if our last write ended with an incomplete multibyte character - while (this.charLength) { - // determine how many remaining bytes this buffer has to offer for this char - var i = (buffer.length >= this.charLength - this.charReceived) ? - this.charLength - this.charReceived : - buffer.length; - - // add the new bytes to the char buffer - buffer.copy(this.charBuffer, this.charReceived, offset, i); - this.charReceived += (i - offset); - offset = i; - - if (this.charReceived < this.charLength) { - // still not enough chars in this buffer? wait for more ... - return ''; - } - - // get the character that was split - charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); - - // lead surrogate (D800-DBFF) is also the incomplete character - var charCode = charStr.charCodeAt(charStr.length - 1); - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - this.charLength += this.surrogateSize; - charStr = ''; - continue; - } - this.charReceived = this.charLength = 0; - - // if there are no more bytes in this buffer, just emit our char - if (i == buffer.length) return charStr; - - // otherwise cut off the characters end from the beginning of this buffer - buffer = buffer.slice(i, buffer.length); - break; - } - - var lenIncomplete = this.detectIncompleteChar(buffer); - - var end = buffer.length; - if (this.charLength) { - // buffer the incomplete character bytes we got - buffer.copy(this.charBuffer, 0, buffer.length - lenIncomplete, end); - this.charReceived = lenIncomplete; - end -= lenIncomplete; - } - - charStr += buffer.toString(this.encoding, 0, end); - - var end = charStr.length - 1; - var charCode = charStr.charCodeAt(end); - // lead surrogate (D800-DBFF) is also the incomplete character - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - var size = this.surrogateSize; - this.charLength += size; - this.charReceived += size; - this.charBuffer.copy(this.charBuffer, size, 0, size); - this.charBuffer.write(charStr.charAt(charStr.length - 1), this.encoding); - return charStr.substring(0, end); - } - - // or just emit the charStr - return charStr; -}; - -StringDecoder.prototype.detectIncompleteChar = function(buffer) { - // determine how many bytes we have to check at the end of this buffer - var i = (buffer.length >= 3) ? 3 : buffer.length; - - // Figure out if one of the last i bytes of our buffer announces an - // incomplete char. - for (; i > 0; i--) { - var c = buffer[buffer.length - i]; - - // See http://en.wikipedia.org/wiki/UTF-8#Description - - // 110XXXXX - if (i == 1 && c >> 5 == 0x06) { - this.charLength = 2; - break; - } - - // 1110XXXX - if (i <= 2 && c >> 4 == 0x0E) { - this.charLength = 3; - break; - } - - // 11110XXX - if (i <= 3 && c >> 3 == 0x1E) { - this.charLength = 4; - break; - } - } - - return i; -}; - -StringDecoder.prototype.end = function(buffer) { - var res = ''; - if (buffer && buffer.length) - res = this.write(buffer); - - if (this.charReceived) { - var cr = this.charReceived; - var buf = this.charBuffer; - var enc = this.encoding; - res += buf.slice(0, cr).toString(enc); - } - - return res; -}; - -function passThroughWrite(buffer) { - return buffer.toString(this.encoding); -} - -function utf16DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 2; - this.charLength = incomplete ? 2 : 0; - return incomplete; -} - -function base64DetectIncompleteChar(buffer) { - var incomplete = this.charReceived = buffer.length % 3; - this.charLength = incomplete ? 3 : 0; - return incomplete; -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json deleted file mode 100644 index 73785c10..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "string_decoder", - "version": "0.10.25", - "description": "The string_decoder module from Node core", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "tap": "~0.4.8" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/rvagg/string_decoder.git" - }, - "homepage": "https://github.com/rvagg/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT", - "readme": "**string_decoder.js** (`require('string_decoder')`) from Node.js core\n\nCopyright Joyent, Inc. and other Node contributors. See LICENCE file for details.\n\nVersion numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.**\n\nThe *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version.", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/rvagg/string_decoder/issues" - }, - "_id": "string_decoder@0.10.25", - "_from": "string_decoder@~0.10.x" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js deleted file mode 100644 index ed5ff08d..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/common.js +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var path = require('path'); -var assert = require('assert'); - -exports.testDir = path.dirname(__filename); -exports.fixturesDir = path.join(exports.testDir, 'fixtures'); -exports.libDir = path.join(exports.testDir, '../lib'); -exports.tmpDir = path.join(exports.testDir, 'tmp'); -exports.PORT = +process.env.NODE_COMMON_PORT || 12346; - -if (process.platform === 'win32') { - exports.PIPE = '\\\\.\\pipe\\libuv-test'; -} else { - exports.PIPE = exports.tmpDir + '/test.sock'; -} - -var util = require('util'); -for (var i in util) exports[i] = util[i]; -//for (var i in exports) global[i] = exports[i]; - -function protoCtrChain(o) { - var result = []; - for (; o; o = o.__proto__) { result.push(o.constructor); } - return result.join(); -} - -exports.indirectInstanceOf = function(obj, cls) { - if (obj instanceof cls) { return true; } - var clsChain = protoCtrChain(cls.prototype); - var objChain = protoCtrChain(obj); - return objChain.slice(-clsChain.length) === clsChain; -}; - - -exports.ddCommand = function(filename, kilobytes) { - if (process.platform === 'win32') { - var p = path.resolve(exports.fixturesDir, 'create-file.js'); - return '"' + process.argv[0] + '" "' + p + '" "' + - filename + '" ' + (kilobytes * 1024); - } else { - return 'dd if=/dev/zero of="' + filename + '" bs=1024 count=' + kilobytes; - } -}; - - -exports.spawnCat = function(options) { - var spawn = require('child_process').spawn; - - if (process.platform === 'win32') { - return spawn('more', [], options); - } else { - return spawn('cat', [], options); - } -}; - - -exports.spawnPwd = function(options) { - var spawn = require('child_process').spawn; - - if (process.platform === 'win32') { - return spawn('cmd.exe', ['/c', 'cd'], options); - } else { - return spawn('pwd', [], options); - } -}; - - -// Turn this off if the test should not check for global leaks. -exports.globalCheck = true; - -process.on('exit', function() { - if (!exports.globalCheck) return; - var knownGlobals = [setTimeout, - setInterval, - typeof setImmediate == 'undefined' ? null : setImmediate, - clearTimeout, - clearInterval, - typeof clearImmediate == 'undefined' ? null : clearImmediate, - console, - Buffer, - process, - global].filter(Boolean); - - if (global.gc) { - knownGlobals.push(gc); - } - - if (global.DTRACE_HTTP_SERVER_RESPONSE) { - knownGlobals.push(DTRACE_HTTP_SERVER_RESPONSE); - knownGlobals.push(DTRACE_HTTP_SERVER_REQUEST); - knownGlobals.push(DTRACE_HTTP_CLIENT_RESPONSE); - knownGlobals.push(DTRACE_HTTP_CLIENT_REQUEST); - knownGlobals.push(DTRACE_NET_STREAM_END); - knownGlobals.push(DTRACE_NET_SERVER_CONNECTION); - knownGlobals.push(DTRACE_NET_SOCKET_READ); - knownGlobals.push(DTRACE_NET_SOCKET_WRITE); - } - if (global.COUNTER_NET_SERVER_CONNECTION) { - knownGlobals.push(COUNTER_NET_SERVER_CONNECTION); - knownGlobals.push(COUNTER_NET_SERVER_CONNECTION_CLOSE); - knownGlobals.push(COUNTER_HTTP_SERVER_REQUEST); - knownGlobals.push(COUNTER_HTTP_SERVER_RESPONSE); - knownGlobals.push(COUNTER_HTTP_CLIENT_REQUEST); - knownGlobals.push(COUNTER_HTTP_CLIENT_RESPONSE); - } - - if (global.ArrayBuffer) { - knownGlobals.push(ArrayBuffer); - knownGlobals.push(Int8Array); - knownGlobals.push(Uint8Array); - knownGlobals.push(Uint8ClampedArray); - knownGlobals.push(Int16Array); - knownGlobals.push(Uint16Array); - knownGlobals.push(Int32Array); - knownGlobals.push(Uint32Array); - knownGlobals.push(Float32Array); - knownGlobals.push(Float64Array); - knownGlobals.push(DataView); - } - - for (var x in global) { - var found = false; - - for (var y in knownGlobals) { - if (global[x] === knownGlobals[y]) { - found = true; - break; - } - } - - if (!found) { - console.error('Unknown global: %s', x); - assert.ok(false, 'Unknown global found'); - } - } -}); - - -var mustCallChecks = []; - - -function runCallChecks(exitCode) { - if (exitCode !== 0) return; - - var failed = mustCallChecks.filter(function(context) { - return context.actual !== context.expected; - }); - - failed.forEach(function(context) { - console.log('Mismatched %s function calls. Expected %d, actual %d.', - context.name, - context.expected, - context.actual); - console.log(context.stack.split('\n').slice(2).join('\n')); - }); - - if (failed.length) process.exit(1); -} - - -exports.mustCall = function(fn, expected) { - if (typeof expected !== 'number') expected = 1; - - var context = { - expected: expected, - actual: 0, - stack: (new Error).stack, - name: fn.name || '<anonymous>' - }; - - // add the exit listener only once to avoid listener leak warnings - if (mustCallChecks.length === 0) process.on('exit', runCallChecks); - - mustCallChecks.push(context); - - return function() { - context.actual++; - return fn.apply(this, arguments); - }; -}; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js deleted file mode 100644 index 869a4116..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder-end.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -// verify that the string decoder works getting 1 byte at a time, -// the whole buffer at once, and that both match the .toString(enc) -// result of the entire buffer. - -var assert = require('assert'); -var SD = require('../../').StringDecoder; -var encodings = ['base64', 'hex', 'utf8', 'utf16le', 'ucs2']; - -var bufs = [ '☃💩', 'asdf' ].map(function(b) { - return new Buffer(b); -}); - -// also test just arbitrary bytes from 0-15. -for (var i = 1; i <= 16; i++) { - var bytes = new Array(i).join('.').split('.').map(function(_, j) { - return j + 0x78; - }); - bufs.push(new Buffer(bytes)); -} - -encodings.forEach(testEncoding); - -console.log('ok'); - -function testEncoding(encoding) { - bufs.forEach(function(buf) { - testBuf(encoding, buf); - }); -} - -function testBuf(encoding, buf) { - console.error('# %s', encoding, buf); - - // write one byte at a time. - var s = new SD(encoding); - var res1 = ''; - for (var i = 0; i < buf.length; i++) { - res1 += s.write(buf.slice(i, i + 1)); - } - res1 += s.end(); - - // write the whole buffer at once. - var res2 = ''; - var s = new SD(encoding); - res2 += s.write(buf); - res2 += s.end(); - - // .toString() on the buffer - var res3 = buf.toString(encoding); - - console.log('expect=%j', res3); - assert.equal(res1, res3, 'one byte at a time should match toString'); - assert.equal(res2, res3, 'all bytes at once should match toString'); -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js deleted file mode 100644 index 7f69f7ea..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/string_decoder/test/simple/test-string-decoder.js +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var common = require('../common'); -var assert = require('assert'); -var StringDecoder = require('../../').StringDecoder; -var decoder = new StringDecoder('utf8'); - - - -var buffer = new Buffer('$'); -assert.deepEqual('$', decoder.write(buffer)); - -buffer = new Buffer('¢'); -assert.deepEqual('', decoder.write(buffer.slice(0, 1))); -assert.deepEqual('¢', decoder.write(buffer.slice(1, 2))); - -buffer = new Buffer('€'); -assert.deepEqual('', decoder.write(buffer.slice(0, 1))); -assert.deepEqual('', decoder.write(buffer.slice(1, 2))); -assert.deepEqual('€', decoder.write(buffer.slice(2, 3))); - -buffer = new Buffer([0xF0, 0xA4, 0xAD, 0xA2]); -var s = ''; -s += decoder.write(buffer.slice(0, 1)); -s += decoder.write(buffer.slice(1, 2)); -s += decoder.write(buffer.slice(2, 3)); -s += decoder.write(buffer.slice(3, 4)); -assert.ok(s.length > 0); - -// CESU-8 -buffer = new Buffer('EDA0BDEDB18D', 'hex'); // THUMBS UP SIGN (in CESU-8) -var s = ''; -s += decoder.write(buffer.slice(0, 1)); -s += decoder.write(buffer.slice(1, 2)); -s += decoder.write(buffer.slice(2, 3)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(3, 4)); -s += decoder.write(buffer.slice(4, 5)); -s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 2)); -s += decoder.write(buffer.slice(2, 4)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(4, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 3)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(3, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 4)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(4, 5)); -s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 5)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(5, 6)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 6)); -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - - -// UCS-2 -decoder = new StringDecoder('ucs2'); -buffer = new Buffer('ab', 'ucs2'); -assert.equal(decoder.write(buffer), 'ab'); // 2 complete chars -buffer = new Buffer('abc', 'ucs2'); -assert.equal(decoder.write(buffer.slice(0, 3)), 'a'); // 'a' and first of 'b' -assert.equal(decoder.write(buffer.slice(3, 6)), 'bc'); // second of 'b' and 'c' - - -// UTF-16LE -buffer = new Buffer('3DD84DDC', 'hex'); // THUMBS UP SIGN (in CESU-8) -var s = ''; -s += decoder.write(buffer.slice(0, 1)); -s += decoder.write(buffer.slice(1, 2)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(2, 3)); -s += decoder.write(buffer.slice(3, 4)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 2)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(2, 4)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 3)); // complete lead surrogate -assert.equal(s, ''); -s += decoder.write(buffer.slice(3, 4)); // complete trail surrogate -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - -var s = ''; -s += decoder.write(buffer.slice(0, 4)); -assert.equal(s, '\uD83D\uDC4D'); // THUMBS UP SIGN (in UTF-16) - - -// A mixed ascii and non-ascii string -// Test stolen from deps/v8/test/cctest/test-strings.cc -// U+02E4 -> CB A4 -// U+0064 -> 64 -// U+12E4 -> E1 8B A4 -// U+0030 -> 30 -// U+3045 -> E3 81 85 -var expected = '\u02e4\u0064\u12e4\u0030\u3045'; -var buffer = new Buffer([0xCB, 0xA4, 0x64, 0xE1, 0x8B, 0xA4, - 0x30, 0xE3, 0x81, 0x85]); -var charLengths = [0, 0, 1, 2, 2, 2, 3, 4, 4, 4, 5, 5]; - -// Split the buffer into 3 segments -// |----|------|-------| -// 0 i j buffer.length -// Scan through every possible 3 segment combination -// and make sure that the string is always parsed. -common.print('scanning '); -for (var j = 2; j < buffer.length; j++) { - for (var i = 1; i < j; i++) { - var decoder = new StringDecoder('utf8'); - - var sum = decoder.write(buffer.slice(0, i)); - - // just check that we've received the right amount - // after the first write - assert.equal(charLengths[i], sum.length); - - sum += decoder.write(buffer.slice(i, j)); - sum += decoder.write(buffer.slice(j, buffer.length)); - assert.equal(expected, sum); - common.print('.'); - } -} -console.log(' crayon!'); - diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/package.json deleted file mode 100644 index ae2e5983..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "readable-stream", - "version": "1.0.25", - "description": "An exploration of a new kind of readable streams for Node.js", - "main": "readable.js", - "dependencies": { - "string_decoder": "~0.10.x" - }, - "devDependencies": { - "tap": "~0.2.6" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/readable-stream" - }, - "keywords": [ - "readable", - "stream", - "pipe" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "BSD", - "readme": "# readable-stream\n\nA new class of streams for Node.js\n\nThis module provides the new Stream base classes introduced in Node\nv0.10, for use in Node v0.8. You can use it to have programs that\nhave to work with node v0.8, while being forward-compatible for v0.10\nand beyond. When you drop support for v0.8, you can remove this\nmodule, and only use the native streams.\n\nThis is almost exactly the same codebase as appears in Node v0.10.\nHowever:\n\n1. The exported object is actually the Readable class. Decorating the\n native `stream` module would be global pollution.\n2. In v0.10, you can safely use `base64` as an argument to\n `setEncoding` in Readable streams. However, in v0.8, the\n StringDecoder class has no `end()` method, which is problematic for\n Base64. So, don't use that, because it'll break and be weird.\n\nOther than that, the API is the same as `require('stream')` in v0.10,\nso the API docs are reproduced below.\n\n----------\n\n Stability: 2 - Unstable\n\nA stream is an abstract interface implemented by various objects in\nNode. For example a request to an HTTP server is a stream, as is\nstdout. Streams are readable, writable, or both. All streams are\ninstances of [EventEmitter][]\n\nYou can load the Stream base classes by doing `require('stream')`.\nThere are base classes provided for Readable streams, Writable\nstreams, Duplex streams, and Transform streams.\n\n## Compatibility\n\nIn earlier versions of Node, the Readable stream interface was\nsimpler, but also less powerful and less useful.\n\n* Rather than waiting for you to call the `read()` method, `'data'`\n events would start emitting immediately. If you needed to do some\n I/O to decide how to handle data, then you had to store the chunks\n in some kind of buffer so that they would not be lost.\n* The `pause()` method was advisory, rather than guaranteed. This\n meant that you still had to be prepared to receive `'data'` events\n even when the stream was in a paused state.\n\nIn Node v0.10, the Readable class described below was added. For\nbackwards compatibility with older Node programs, Readable streams\nswitch into \"old mode\" when a `'data'` event handler is added, or when\nthe `pause()` or `resume()` methods are called. The effect is that,\neven if you are not using the new `read()` method and `'readable'`\nevent, you no longer have to worry about losing `'data'` chunks.\n\nMost programs will continue to function normally. However, this\nintroduces an edge case in the following conditions:\n\n* No `'data'` event handler is added.\n* The `pause()` and `resume()` methods are never called.\n\nFor example, consider the following code:\n\n```javascript\n// WARNING! BROKEN!\nnet.createServer(function(socket) {\n\n // we add an 'end' method, but never consume the data\n socket.on('end', function() {\n // It will never get here.\n socket.end('I got your message (but didnt read it)\\n');\n });\n\n}).listen(1337);\n```\n\nIn versions of node prior to v0.10, the incoming message data would be\nsimply discarded. However, in Node v0.10 and beyond, the socket will\nremain paused forever.\n\nThe workaround in this situation is to call the `resume()` method to\ntrigger \"old mode\" behavior:\n\n```javascript\n// Workaround\nnet.createServer(function(socket) {\n\n socket.on('end', function() {\n socket.end('I got your message (but didnt read it)\\n');\n });\n\n // start the flow of data, discarding it.\n socket.resume();\n\n}).listen(1337);\n```\n\nIn addition to new Readable streams switching into old-mode, pre-v0.10\nstyle streams can be wrapped in a Readable class using the `wrap()`\nmethod.\n\n## Class: stream.Readable\n\n<!--type=class-->\n\nA `Readable Stream` has the following methods, members, and events.\n\nNote that `stream.Readable` is an abstract class designed to be\nextended with an underlying implementation of the `_read(size)`\nmethod. (See below.)\n\n### new stream.Readable([options])\n\n* `options` {Object}\n * `highWaterMark` {Number} The maximum number of bytes to store in\n the internal buffer before ceasing to read from the underlying\n resource. Default=16kb\n * `encoding` {String} If specified, then buffers will be decoded to\n strings using the specified encoding. Default=null\n * `objectMode` {Boolean} Whether this stream should behave\n as a stream of objects. Meaning that stream.read(n) returns\n a single value instead of a Buffer of size n\n\nIn classes that extend the Readable class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### readable.\\_read(size)\n\n* `size` {Number} Number of bytes to read asynchronously\n\nNote: **This function should NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Readable\nclass methods only.\n\nAll Readable stream implementations must provide a `_read` method\nto fetch data from the underlying resource.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\nWhen data is available, put it into the read queue by calling\n`readable.push(chunk)`. If `push` returns false, then you should stop\nreading. When `_read` is called again, you should start pushing more\ndata.\n\nThe `size` argument is advisory. Implementations where a \"read\" is a\nsingle call that returns data can use this to know how much data to\nfetch. Implementations where that is not relevant, such as TCP or\nTLS, may ignore this argument, and simply provide data whenever it\nbecomes available. There is no need, for example to \"wait\" until\n`size` bytes are available before calling `stream.push(chunk)`.\n\n### readable.push(chunk)\n\n* `chunk` {Buffer | null | String} Chunk of data to push into the read queue\n* return {Boolean} Whether or not more pushes should be performed\n\nNote: **This function should be called by Readable implementors, NOT\nby consumers of Readable subclasses.** The `_read()` function will not\nbe called again until at least one `push(chunk)` call is made. If no\ndata is available, then you MAY call `push('')` (an empty string) to\nallow a future `_read` call, without adding any data to the queue.\n\nThe `Readable` class works by putting data into a read queue to be\npulled out later by calling the `read()` method when the `'readable'`\nevent fires.\n\nThe `push()` method will explicitly insert some data into the read\nqueue. If it is called with `null` then it will signal the end of the\ndata.\n\nIn some cases, you may be wrapping a lower-level source which has some\nsort of pause/resume mechanism, and a data callback. In those cases,\nyou could wrap the low-level source object by doing something like\nthis:\n\n```javascript\n// source is an object with readStop() and readStart() methods,\n// and an `ondata` member that gets called when it has data, and\n// an `onend` member that gets called when the data is over.\n\nvar stream = new Readable();\n\nsource.ondata = function(chunk) {\n // if push() returns false, then we need to stop reading from source\n if (!stream.push(chunk))\n source.readStop();\n};\n\nsource.onend = function() {\n stream.push(null);\n};\n\n// _read will be called when the stream wants to pull more data in\n// the advisory size argument is ignored in this case.\nstream._read = function(n) {\n source.readStart();\n};\n```\n\n### readable.unshift(chunk)\n\n* `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue\n* return {Boolean} Whether or not more pushes should be performed\n\nThis is the corollary of `readable.push(chunk)`. Rather than putting\nthe data at the *end* of the read queue, it puts it at the *front* of\nthe read queue.\n\nThis is useful in certain use-cases where a stream is being consumed\nby a parser, which needs to \"un-consume\" some data that it has\noptimistically pulled out of the source.\n\n```javascript\n// A parser for a simple data protocol.\n// The \"header\" is a JSON object, followed by 2 \\n characters, and\n// then a message body.\n//\n// Note: This can be done more simply as a Transform stream. See below.\n\nfunction SimpleProtocol(source, options) {\n if (!(this instanceof SimpleProtocol))\n return new SimpleProtocol(options);\n\n Readable.call(this, options);\n this._inBody = false;\n this._sawFirstCr = false;\n\n // source is a readable stream, such as a socket or file\n this._source = source;\n\n var self = this;\n source.on('end', function() {\n self.push(null);\n });\n\n // give it a kick whenever the source is readable\n // read(0) will not consume any bytes\n source.on('readable', function() {\n self.read(0);\n });\n\n this._rawHeader = [];\n this.header = null;\n}\n\nSimpleProtocol.prototype = Object.create(\n Readable.prototype, { constructor: { value: SimpleProtocol }});\n\nSimpleProtocol.prototype._read = function(n) {\n if (!this._inBody) {\n var chunk = this._source.read();\n\n // if the source doesn't have data, we don't have data yet.\n if (chunk === null)\n return this.push('');\n\n // check if the chunk has a \\n\\n\n var split = -1;\n for (var i = 0; i < chunk.length; i++) {\n if (chunk[i] === 10) { // '\\n'\n if (this._sawFirstCr) {\n split = i;\n break;\n } else {\n this._sawFirstCr = true;\n }\n } else {\n this._sawFirstCr = false;\n }\n }\n\n if (split === -1) {\n // still waiting for the \\n\\n\n // stash the chunk, and try again.\n this._rawHeader.push(chunk);\n this.push('');\n } else {\n this._inBody = true;\n var h = chunk.slice(0, split);\n this._rawHeader.push(h);\n var header = Buffer.concat(this._rawHeader).toString();\n try {\n this.header = JSON.parse(header);\n } catch (er) {\n this.emit('error', new Error('invalid simple protocol data'));\n return;\n }\n // now, because we got some extra data, unshift the rest\n // back into the read queue so that our consumer will see it.\n var b = chunk.slice(split);\n this.unshift(b);\n\n // and let them know that we are done parsing the header.\n this.emit('header', this.header);\n }\n } else {\n // from there on, just provide the data to our consumer.\n // careful not to push(null), since that would indicate EOF.\n var chunk = this._source.read();\n if (chunk) this.push(chunk);\n }\n};\n\n// Usage:\nvar parser = new SimpleProtocol(source);\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.\n```\n\n### readable.wrap(stream)\n\n* `stream` {Stream} An \"old style\" readable stream\n\nIf you are using an older Node library that emits `'data'` events and\nhas a `pause()` method that is advisory only, then you can use the\n`wrap()` method to create a Readable stream that uses the old stream\nas its data source.\n\nFor example:\n\n```javascript\nvar OldReader = require('./old-api-module.js').OldReader;\nvar oreader = new OldReader;\nvar Readable = require('stream').Readable;\nvar myReader = new Readable().wrap(oreader);\n\nmyReader.on('readable', function() {\n myReader.read(); // etc.\n});\n```\n\n### Event: 'readable'\n\nWhen there is data ready to be consumed, this event will fire.\n\nWhen this event emits, call the `read()` method to consume the data.\n\n### Event: 'end'\n\nEmitted when the stream has received an EOF (FIN in TCP terminology).\nIndicates that no more `'data'` events will happen. If the stream is\nalso writable, it may be possible to continue writing.\n\n### Event: 'data'\n\nThe `'data'` event emits either a `Buffer` (by default) or a string if\n`setEncoding()` was used.\n\nNote that adding a `'data'` event listener will switch the Readable\nstream into \"old mode\", where data is emitted as soon as it is\navailable, rather than waiting for you to call `read()` to consume it.\n\n### Event: 'error'\n\nEmitted if there was an error receiving data.\n\n### Event: 'close'\n\nEmitted when the underlying resource (for example, the backing file\ndescriptor) has been closed. Not all streams will emit this.\n\n### readable.setEncoding(encoding)\n\nMakes the `'data'` event emit a string instead of a `Buffer`. `encoding`\ncan be `'utf8'`, `'utf16le'` (`'ucs2'`), `'ascii'`, or `'hex'`.\n\nThe encoding can also be set by specifying an `encoding` field to the\nconstructor.\n\n### readable.read([size])\n\n* `size` {Number | null} Optional number of bytes to read.\n* Return: {Buffer | String | null}\n\nNote: **This function SHOULD be called by Readable stream users.**\n\nCall this method to consume data once the `'readable'` event is\nemitted.\n\nThe `size` argument will set a minimum number of bytes that you are\ninterested in. If not set, then the entire content of the internal\nbuffer is returned.\n\nIf there is no data to consume, or if there are fewer bytes in the\ninternal buffer than the `size` argument, then `null` is returned, and\na future `'readable'` event will be emitted when more is available.\n\nCalling `stream.read(0)` will always return `null`, and will trigger a\nrefresh of the internal buffer, but otherwise be a no-op.\n\n### readable.pipe(destination, [options])\n\n* `destination` {Writable Stream}\n* `options` {Object} Optional\n * `end` {Boolean} Default=true\n\nConnects this readable stream to `destination` WriteStream. Incoming\ndata on this stream gets written to `destination`. Properly manages\nback-pressure so that a slow destination will not be overwhelmed by a\nfast readable stream.\n\nThis function returns the `destination` stream.\n\nFor example, emulating the Unix `cat` command:\n\n process.stdin.pipe(process.stdout);\n\nBy default `end()` is called on the destination when the source stream\nemits `end`, so that `destination` is no longer writable. Pass `{ end:\nfalse }` as `options` to keep the destination stream open.\n\nThis keeps `writer` open so that \"Goodbye\" can be written at the\nend.\n\n reader.pipe(writer, { end: false });\n reader.on(\"end\", function() {\n writer.end(\"Goodbye\\n\");\n });\n\nNote that `process.stderr` and `process.stdout` are never closed until\nthe process exits, regardless of the specified options.\n\n### readable.unpipe([destination])\n\n* `destination` {Writable Stream} Optional\n\nUndo a previously established `pipe()`. If no destination is\nprovided, then all previously established pipes are removed.\n\n### readable.pause()\n\nSwitches the readable stream into \"old mode\", where data is emitted\nusing a `'data'` event rather than being buffered for consumption via\nthe `read()` method.\n\nCeases the flow of data. No `'data'` events are emitted while the\nstream is in a paused state.\n\n### readable.resume()\n\nSwitches the readable stream into \"old mode\", where data is emitted\nusing a `'data'` event rather than being buffered for consumption via\nthe `read()` method.\n\nResumes the incoming `'data'` events after a `pause()`.\n\n\n## Class: stream.Writable\n\n<!--type=class-->\n\nA `Writable` Stream has the following methods, members, and events.\n\nNote that `stream.Writable` is an abstract class designed to be\nextended with an underlying implementation of the\n`_write(chunk, encoding, cb)` method. (See below.)\n\n### new stream.Writable([options])\n\n* `options` {Object}\n * `highWaterMark` {Number} Buffer level when `write()` starts\n returning false. Default=16kb\n * `decodeStrings` {Boolean} Whether or not to decode strings into\n Buffers before passing them to `_write()`. Default=true\n\nIn classes that extend the Writable class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### writable.\\_write(chunk, encoding, callback)\n\n* `chunk` {Buffer | String} The chunk to be written. Will always\n be a buffer unless the `decodeStrings` option was set to `false`.\n* `encoding` {String} If the chunk is a string, then this is the\n encoding type. Ignore chunk is a buffer. Note that chunk will\n **always** be a buffer unless the `decodeStrings` option is\n explicitly set to `false`.\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done processing the supplied chunk.\n\nAll Writable stream implementations must provide a `_write` method to\nsend data to the underlying resource.\n\nNote: **This function MUST NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Writable\nclass methods only.\n\nCall the callback using the standard `callback(error)` pattern to\nsignal that the write completed successfully or with an error.\n\nIf the `decodeStrings` flag is set in the constructor options, then\n`chunk` may be a string rather than a Buffer, and `encoding` will\nindicate the sort of string that it is. This is to support\nimplementations that have an optimized handling for certain string\ndata encodings. If you do not explicitly set the `decodeStrings`\noption to `false`, then you can safely ignore the `encoding` argument,\nand assume that `chunk` will always be a Buffer.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n\n### writable.write(chunk, [encoding], [callback])\n\n* `chunk` {Buffer | String} Data to be written\n* `encoding` {String} Optional. If `chunk` is a string, then encoding\n defaults to `'utf8'`\n* `callback` {Function} Optional. Called when this chunk is\n successfully written.\n* Returns {Boolean}\n\nWrites `chunk` to the stream. Returns `true` if the data has been\nflushed to the underlying resource. Returns `false` to indicate that\nthe buffer is full, and the data will be sent out in the future. The\n`'drain'` event will indicate when the buffer is empty again.\n\nThe specifics of when `write()` will return false, is determined by\nthe `highWaterMark` option provided to the constructor.\n\n### writable.end([chunk], [encoding], [callback])\n\n* `chunk` {Buffer | String} Optional final data to be written\n* `encoding` {String} Optional. If `chunk` is a string, then encoding\n defaults to `'utf8'`\n* `callback` {Function} Optional. Called when the final chunk is\n successfully written.\n\nCall this method to signal the end of the data being written to the\nstream.\n\n### Event: 'drain'\n\nEmitted when the stream's write queue empties and it's safe to write\nwithout buffering again. Listen for it when `stream.write()` returns\n`false`.\n\n### Event: 'close'\n\nEmitted when the underlying resource (for example, the backing file\ndescriptor) has been closed. Not all streams will emit this.\n\n### Event: 'finish'\n\nWhen `end()` is called and there are no more chunks to write, this\nevent is emitted.\n\n### Event: 'pipe'\n\n* `source` {Readable Stream}\n\nEmitted when the stream is passed to a readable stream's pipe method.\n\n### Event 'unpipe'\n\n* `source` {Readable Stream}\n\nEmitted when a previously established `pipe()` is removed using the\nsource Readable stream's `unpipe()` method.\n\n## Class: stream.Duplex\n\n<!--type=class-->\n\nA \"duplex\" stream is one that is both Readable and Writable, such as a\nTCP socket connection.\n\nNote that `stream.Duplex` is an abstract class designed to be\nextended with an underlying implementation of the `_read(size)`\nand `_write(chunk, encoding, callback)` methods as you would with a Readable or\nWritable stream class.\n\nSince JavaScript doesn't have multiple prototypal inheritance, this\nclass prototypally inherits from Readable, and then parasitically from\nWritable. It is thus up to the user to implement both the lowlevel\n`_read(n)` method as well as the lowlevel `_write(chunk, encoding, cb)` method\non extension duplex classes.\n\n### new stream.Duplex(options)\n\n* `options` {Object} Passed to both Writable and Readable\n constructors. Also has the following fields:\n * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then\n the stream will automatically end the readable side when the\n writable side ends and vice versa.\n\nIn classes that extend the Duplex class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n## Class: stream.Transform\n\nA \"transform\" stream is a duplex stream where the output is causally\nconnected in some way to the input, such as a zlib stream or a crypto\nstream.\n\nThere is no requirement that the output be the same size as the input,\nthe same number of chunks, or arrive at the same time. For example, a\nHash stream will only ever have a single chunk of output which is\nprovided when the input is ended. A zlib stream will either produce\nmuch smaller or much larger than its input.\n\nRather than implement the `_read()` and `_write()` methods, Transform\nclasses must implement the `_transform()` method, and may optionally\nalso implement the `_flush()` method. (See below.)\n\n### new stream.Transform([options])\n\n* `options` {Object} Passed to both Writable and Readable\n constructors.\n\nIn classes that extend the Transform class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### transform.\\_transform(chunk, encoding, callback)\n\n* `chunk` {Buffer | String} The chunk to be transformed. Will always\n be a buffer unless the `decodeStrings` option was set to `false`.\n* `encoding` {String} If the chunk is a string, then this is the\n encoding type. (Ignore if `decodeStrings` chunk is a buffer.)\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done processing the supplied chunk.\n\nNote: **This function MUST NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Transform\nclass methods only.\n\nAll Transform stream implementations must provide a `_transform`\nmethod to accept input and produce output.\n\n`_transform` should do whatever has to be done in this specific\nTransform class, to handle the bytes being written, and pass them off\nto the readable portion of the interface. Do asynchronous I/O,\nprocess things, and so on.\n\nCall `transform.push(outputChunk)` 0 or more times to generate output\nfrom this input chunk, depending on how much data you want to output\nas a result of this chunk.\n\nCall the callback function only when the current chunk is completely\nconsumed. Note that there may or may not be output as a result of any\nparticular input chunk.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n### transform.\\_flush(callback)\n\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done flushing any remaining data.\n\nNote: **This function MUST NOT be called directly.** It MAY be implemented\nby child classes, and if so, will be called by the internal Transform\nclass methods only.\n\nIn some cases, your transform operation may need to emit a bit more\ndata at the end of the stream. For example, a `Zlib` compression\nstream will store up some internal state so that it can optimally\ncompress the output. At the end, however, it needs to do the best it\ncan with what is left, so that the data will be complete.\n\nIn those cases, you can implement a `_flush` method, which will be\ncalled at the very end, after all the written data is consumed, but\nbefore emitting `end` to signal the end of the readable side. Just\nlike with `_transform`, call `transform.push(chunk)` zero or more\ntimes, as appropriate, and call `callback` when the flush operation is\ncomplete.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n### Example: `SimpleProtocol` parser\n\nThe example above of a simple protocol parser can be implemented much\nmore simply by using the higher level `Transform` stream class.\n\nIn this example, rather than providing the input as an argument, it\nwould be piped into the parser, which is a more idiomatic Node stream\napproach.\n\n```javascript\nfunction SimpleProtocol(options) {\n if (!(this instanceof SimpleProtocol))\n return new SimpleProtocol(options);\n\n Transform.call(this, options);\n this._inBody = false;\n this._sawFirstCr = false;\n this._rawHeader = [];\n this.header = null;\n}\n\nSimpleProtocol.prototype = Object.create(\n Transform.prototype, { constructor: { value: SimpleProtocol }});\n\nSimpleProtocol.prototype._transform = function(chunk, encoding, done) {\n if (!this._inBody) {\n // check if the chunk has a \\n\\n\n var split = -1;\n for (var i = 0; i < chunk.length; i++) {\n if (chunk[i] === 10) { // '\\n'\n if (this._sawFirstCr) {\n split = i;\n break;\n } else {\n this._sawFirstCr = true;\n }\n } else {\n this._sawFirstCr = false;\n }\n }\n\n if (split === -1) {\n // still waiting for the \\n\\n\n // stash the chunk, and try again.\n this._rawHeader.push(chunk);\n } else {\n this._inBody = true;\n var h = chunk.slice(0, split);\n this._rawHeader.push(h);\n var header = Buffer.concat(this._rawHeader).toString();\n try {\n this.header = JSON.parse(header);\n } catch (er) {\n this.emit('error', new Error('invalid simple protocol data'));\n return;\n }\n // and let them know that we are done parsing the header.\n this.emit('header', this.header);\n\n // now, because we got some extra data, emit this first.\n this.push(b);\n }\n } else {\n // from there on, just provide the data to our consumer as-is.\n this.push(b);\n }\n done();\n};\n\nvar parser = new SimpleProtocol();\nsource.pipe(parser)\n\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.\n```\n\n\n## Class: stream.PassThrough\n\nThis is a trivial implementation of a `Transform` stream that simply\npasses the input bytes across to the output. Its purpose is mainly\nfor examples and testing, but there are occasionally use cases where\nit can come in handy.\n\n\n[EventEmitter]: events.html#events_class_events_eventemitter\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/readable-stream/issues" - }, - "homepage": "https://github.com/isaacs/readable-stream", - "_id": "readable-stream@1.0.25", - "_from": "readable-stream@~1.0.17" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/passthrough.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a5..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/readable.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/readable.js deleted file mode 100644 index 4d1ddfc7..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,6 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/transform.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f07..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/writable.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efdf..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/.npmignore b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/LICENCE b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/LICENCE deleted file mode 100644 index a23e08a8..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 Raynos. - -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. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/Makefile b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/Makefile deleted file mode 100644 index d583fcf4..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -browser: - node ./support/compile - -.PHONY: browser \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/README.md deleted file mode 100644 index 389adae3..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# xtend - -[![browser support][3]][4] - -Extend like a boss - -xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence. - -## Examples - -```js -var extend = require("xtend") - -var combination = extend({ - a: "a" -}, { - b: "b" -}) -// { a: "a", b: "b" } -``` - - -## MIT Licenced - - - [3]: http://ci.testling.com/Raynos/xtend.png - [4]: http://ci.testling.com/Raynos/xtend diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/has-keys.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/has-keys.js deleted file mode 100644 index 62391e78..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/has-keys.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = hasKeys - -function hasKeys(source) { - return source !== null && - (typeof source === "object" || - typeof source === "function") -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/index.js deleted file mode 100644 index 20937d19..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/index.js +++ /dev/null @@ -1,25 +0,0 @@ -var Keys = require("object-keys") -var hasKeys = require("./has-keys") - -module.exports = extend - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - if (!hasKeys(source)) { - continue - } - - var keys = Keys(source) - - for (var j = 0; j < keys.length; j++) { - var name = keys[j] - target[name] = source[name] - } - } - - return target -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/mutable.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/mutable.js deleted file mode 100644 index 17454ae4..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/mutable.js +++ /dev/null @@ -1,25 +0,0 @@ -var Keys = require("object-keys") -var hasKeys = require("./has-keys") - -module.exports = extend - -function extend(target) { - var sources = [].slice.call(arguments, 1) - - for (var i = 0; i < sources.length; i++) { - var source = sources[i] - - if (!hasKeys(source)) { - continue - } - - var keys = Keys(source) - - for (var j = 0; j < keys.length; j++) { - var name = keys[j] - target[name] = source[name] - } - } - - return target -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml deleted file mode 100644 index 60d00ce1..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.8" - - "0.6" diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md deleted file mode 100644 index ab32d0ad..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/README.md +++ /dev/null @@ -1,39 +0,0 @@ -#object-keys <sup>[![Version Badge][2]][1]</sup> - -[![Build Status][3]][4] [![dependency status][5]][6] - -[![browser support][7]][8] - -An Object.keys shim. Uses Object.keys if available. - -## Example - -```js -var keys = require('object-keys'); -var assert = require('assert'); -var obj = { - a: true, - b: true, - c: true -}; - -assert.equal(keys(obj), ['a', 'b', 'c']); -``` - -## Source -Implementation taken directly from [es5-shim]([9]), with modifications, including from [lodash]([10]). - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[1]: https://npmjs.org/package/object-keys -[2]: http://vb.teelaun.ch/ljharb/object-keys.svg -[3]: https://travis-ci.org/ljharb/object-keys.png -[4]: https://travis-ci.org/ljharb/object-keys -[5]: https://david-dm.org/ljharb/object-keys.png -[6]: https://david-dm.org/ljharb/object-keys -[7]: https://ci.testling.com/ljharb/object-keys.png -[8]: https://ci.testling.com/ljharb/object-keys -[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589 -[10]: https://github.com/bestiejs/lodash - diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js deleted file mode 100644 index db32d458..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/foreach.js +++ /dev/null @@ -1,40 +0,0 @@ -var hasOwn = Object.prototype.hasOwnProperty; -var toString = Object.prototype.toString; - -var isFunction = function (fn) { - var isFunc = (typeof fn === 'function' && !(fn instanceof RegExp)) || toString.call(fn) === '[object Function]'; - if (!isFunc && typeof window !== 'undefined') { - isFunc = fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt; - } - return isFunc; -}; - -module.exports = function forEach(obj, fn) { - if (!isFunction(fn)) { - throw new TypeError('iterator must be a function'); - } - var i, k, - isString = typeof obj === 'string', - l = obj.length, - context = arguments.length > 2 ? arguments[2] : null; - if (l === +l) { - for (i = 0; i < l; i++) { - if (context === null) { - fn(isString ? obj.charAt(i) : obj[i], i, obj); - } else { - fn.call(context, isString ? obj.charAt(i) : obj[i], i, obj); - } - } - } else { - for (k in obj) { - if (hasOwn.call(obj, k)) { - if (context === null) { - fn(obj[k], k, obj); - } else { - fn.call(context, obj[k], k, obj); - } - } - } - } -}; - diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js deleted file mode 100644 index f5b24b6d..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/index.js +++ /dev/null @@ -1,2 +0,0 @@ -module.exports = Object.keys || require('./shim'); - diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js deleted file mode 100644 index 74a09897..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/isArguments.js +++ /dev/null @@ -1,16 +0,0 @@ -var toString = Object.prototype.toString; - -module.exports = function isArguments(value) { - var str = toString.call(value); - var isArguments = str === '[object Arguments]'; - if (!isArguments) { - isArguments = str !== '[object Array]' - && value !== null - && typeof value === 'object' - && typeof value.length === 'number' - && value.length >= 0 - && toString.call(value.callee) === '[object Function]'; - } - return isArguments; -}; - diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json deleted file mode 100644 index 1de9cbb3..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "object-keys", - "version": "0.4.0", - "author": { - "name": "Jordan Harband" - }, - "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/kriskowal/es5-shim", - "license": "MIT", - "main": "index.js", - "scripts": { - "test": "node test/index.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/ljharb/object-keys.git" - }, - "keywords": [ - "Object.keys", - "keys", - "ES5", - "shim" - ], - "dependencies": {}, - "devDependencies": { - "foreach": "~2.0.3", - "is": "~0.2.6", - "tape": "~1.0.4", - "indexof": "~0.0.1" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "readme": "#object-keys <sup>[![Version Badge][2]][1]</sup>\n\n[![Build Status][3]][4] [![dependency status][5]][6]\n\n[![browser support][7]][8]\n\nAn Object.keys shim. Uses Object.keys if available.\n\n## Example\n\n```js\nvar keys = require('object-keys');\nvar assert = require('assert');\nvar obj = {\n\ta: true,\n\tb: true,\n\tc: true\n};\n\nassert.equal(keys(obj), ['a', 'b', 'c']);\n```\n\n## Source\nImplementation taken directly from [es5-shim]([9]), with modifications, including from [lodash]([10]).\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[1]: https://npmjs.org/package/object-keys\n[2]: http://vb.teelaun.ch/ljharb/object-keys.svg\n[3]: https://travis-ci.org/ljharb/object-keys.png\n[4]: https://travis-ci.org/ljharb/object-keys\n[5]: https://david-dm.org/ljharb/object-keys.png\n[6]: https://david-dm.org/ljharb/object-keys\n[7]: https://ci.testling.com/ljharb/object-keys.png\n[8]: https://ci.testling.com/ljharb/object-keys\n[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589\n[10]: https://github.com/bestiejs/lodash\n\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/ljharb/object-keys/issues" - }, - "homepage": "https://github.com/ljharb/object-keys", - "_id": "object-keys@0.4.0", - "_from": "object-keys@~0.4.0" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js deleted file mode 100644 index b88421be..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/shim.js +++ /dev/null @@ -1,62 +0,0 @@ -(function () { - "use strict"; - - // modified from https://github.com/kriskowal/es5-shim - var has = Object.prototype.hasOwnProperty, - toString = Object.prototype.toString, - forEach = require('./foreach'), - isArgs = require('./isArguments'), - hasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'), - hasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype'), - dontEnums = [ - "toString", - "toLocaleString", - "valueOf", - "hasOwnProperty", - "isPrototypeOf", - "propertyIsEnumerable", - "constructor" - ], - keysShim; - - keysShim = function keys(object) { - var isObject = object !== null && typeof object === 'object', - isFunction = toString.call(object) === '[object Function]', - isArguments = isArgs(object), - theKeys = []; - - if (!isObject && !isFunction && !isArguments) { - throw new TypeError("Object.keys called on a non-object"); - } - - if (isArguments) { - forEach(object, function (value) { - theKeys.push(value); - }); - } else { - var name, - skipProto = hasProtoEnumBug && isFunction; - - for (name in object) { - if (!(skipProto && name === 'prototype') && has.call(object, name)) { - theKeys.push(name); - } - } - } - - if (hasDontEnumBug) { - var ctor = object.constructor, - skipConstructor = ctor && ctor.prototype === object; - - forEach(dontEnums, function (dontEnum) { - if (!(skipConstructor && dontEnum === 'constructor') && has.call(object, dontEnum)) { - theKeys.push(dontEnum); - } - }); - } - return theKeys; - }; - - module.exports = keysShim; -}()); - diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js deleted file mode 100644 index f29f065a..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/foreach.js +++ /dev/null @@ -1,156 +0,0 @@ -var test = require('tape'); -var forEach = require('../foreach.js'); - -test('second argument: iterator', function (t) { - var arr = []; - t.throws(function () { forEach(arr); }, TypeError, 'undefined is not a function'); - t.throws(function () { forEach(arr, null); }, TypeError, 'null is not a function'); - t.throws(function () { forEach(arr, ''); }, TypeError, 'string is not a function'); - t.throws(function () { forEach(arr, /a/); }, TypeError, 'regex is not a function'); - t.throws(function () { forEach(arr, true); }, TypeError, 'true is not a function'); - t.throws(function () { forEach(arr, false); }, TypeError, 'false is not a function'); - t.throws(function () { forEach(arr, NaN); }, TypeError, 'NaN is not a function'); - t.throws(function () { forEach(arr, 42); }, TypeError, '42 is not a function'); - t.doesNotThrow(function () { forEach(arr, function () {}); }, 'function is a function'); - t.doesNotThrow(function () { forEach(arr, setTimeout); }, 'setTimeout is a function'); - if (typeof window !== 'undefined') { - t.doesNotThrow(function () { forEach(arr, window.alert); }, 'alert is a function'); - } - t.end(); -}); - -test('array', function (t) { - var arr = [1, 2, 3]; - - t.test('iterates over every item', function (st) { - var index = 0; - forEach(arr, function () { index += 1; }); - st.equal(index, arr.length, 'iterates ' + arr.length + ' times'); - st.end(); - }); - - t.test('first iterator argument', function (st) { - var index = 0; - st.plan(arr.length); - forEach(arr, function (item) { - st.equal(arr[index], item, 'item ' + index + ' is passed as first argument'); - index += 1; - }); - st.end(); - }); - - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(arr.length); - forEach(arr, function (item, index) { - st.equal(counter, index, 'index ' + index + ' is passed as second argument'); - counter += 1; - }); - st.end(); - }); - - t.test('third iterator argument', function (st) { - st.plan(arr.length); - forEach(arr, function (item, index, array) { - st.deepEqual(arr, array, 'array is passed as third argument'); - }); - st.end(); - }); - - t.test('context argument', function (st) { - var context = {}; - st.plan(arr.length); - forEach(arr, function () { - st.equal(this, context, '"this" is the passed context'); - }, context); - st.end(); - }); - - t.end(); -}); - -test('object', function (t) { - var obj = { - a: 1, - b: 2, - c: 3 - }; - var keys = ['a', 'b', 'c']; - - var F = function () { - this.a = 1; - this.b = 2; - }; - F.prototype.c = 3; - var fKeys = ['a', 'b']; - - t.test('iterates over every object literal key', function (st) { - var counter = 0; - forEach(obj, function () { counter += 1; }); - st.equal(counter, keys.length, 'iterated ' + counter + ' times'); - st.end(); - }); - - t.test('iterates only over own keys', function (st) { - var counter = 0; - forEach(new F(), function () { counter += 1; }); - st.equal(counter, fKeys.length, 'iterated ' + fKeys.length + ' times'); - st.end(); - }); - - t.test('first iterator argument', function (st) { - var index = 0; - st.plan(keys.length); - forEach(obj, function (item) { - st.equal(obj[keys[index]], item, 'item at key ' + keys[index] + ' is passed as first argument'); - index += 1; - }); - st.end(); - }); - - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(keys.length); - forEach(obj, function (item, key) { - st.equal(keys[counter], key, 'key ' + key + ' is passed as second argument'); - counter += 1; - }); - st.end(); - }); - - t.test('third iterator argument', function (st) { - st.plan(keys.length); - forEach(obj, function (item, key, object) { - st.deepEqual(obj, object, 'object is passed as third argument'); - }); - st.end(); - }); - - t.test('context argument', function (st) { - var context = {}; - st.plan(1); - forEach({foo: 'bar'}, function () { - st.equal(this, context, '"this" is the passed context'); - }, context); - st.end(); - }); - - t.end(); -}); - - -test('string', function (t) { - var str = 'str'; - t.test('second iterator argument', function (st) { - var counter = 0; - st.plan(str.length * 2 + 1); - forEach(str, function (item, index) { - st.equal(counter, index, 'index ' + index + ' is passed as second argument'); - st.equal(str.charAt(index), item); - counter += 1; - }); - st.equal(counter, str.length, 'iterates ' + str.length + ' times'); - }); - t.end(); -}); - diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js deleted file mode 100644 index 8b77b1fc..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/index.js +++ /dev/null @@ -1,6 +0,0 @@ - -require('./foreach'); -require('./isArguments'); - -require('./shim'); - diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js deleted file mode 100644 index 62a07c2d..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/isArguments.js +++ /dev/null @@ -1,10 +0,0 @@ -var test = require('tape'); -var isArguments = require('../isArguments'); - -test('is.arguments', function (t) { - t.notOk(isArguments([]), 'array is not arguments'); - (function () { t.ok(isArguments(arguments), 'arguments is arguments'); }()); - (function () { t.notOk(isArguments(Array.prototype.slice.call(arguments)), 'sliced arguments is not arguments'); }()); - t.end(); -}); - diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js deleted file mode 100644 index 9d932712..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/node_modules/object-keys/test/shim.js +++ /dev/null @@ -1,134 +0,0 @@ -var test = require('tape'); -var shimmedKeys = require('../index.js'); -var is = require('is'); -var keys = require('../shim.js'); -var forEach = require('foreach'); -var indexOf = require('indexof'); - -var obj = { - "str": "boz", - "obj": {}, - "arr": [], - "bool": true, - "num": 42, - "aNull": null, - "undef": undefined -}; -var objKeys = ['str', 'obj', 'arr', 'bool', 'num', 'aNull', 'undef']; - -test('exports a function', function (t) { - if (Object.keys) { - t.equal(Object.keys, shimmedKeys, 'Object.keys is supported and exported'); - } else { - t.equal(keys, shimmedKeys, 'Object.keys is not supported; shim is exported'); - } - t.end(); -}); - -test('working with actual shim', function (t) { - t.notEqual(Object.keys, keys, 'keys shim is not native Object.keys'); - t.end(); -}); - -test('works with an object literal', function (t) { - var theKeys = keys(obj); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, objKeys, 'Object has expected keys'); - t.end(); -}); - -test('works with an array', function (t) { - var arr = [1, 2, 3]; - var theKeys = keys(arr); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, ['0', '1', '2'], 'Array has expected keys'); - t.end(); -}); - -test('works with a function', function (t) { - var foo = function () {}; - foo.a = true; - - t.doesNotThrow(function () { return keys(foo); }, 'does not throw an error'); - t.deepEqual(keys(foo), ['a'], 'returns expected keys'); - t.end(); -}); - -test('returns names which are own properties', function (t) { - forEach(keys(obj), function (name) { - t.equal(obj.hasOwnProperty(name), true, name + ' should be returned'); - }); - t.end(); -}); - -test('returns names which are enumerable', function (t) { - var k, loopedValues = []; - for (k in obj) { - loopedValues.push(k); - } - forEach(keys(obj), function (name) { - t.notEqual(indexOf(loopedValues, name), -1, name + ' is not enumerable'); - }); - t.end(); -}); - -test('throws an error for a non-object', function (t) { - t.throws( - function () { return keys(42); }, - new TypeError('Object.keys called on a non-object'), - 'throws on a non-object' - ); - t.end(); -}); - -test('works with an object instance', function (t) { - var Prototype = function () {}; - Prototype.prototype.foo = true; - var obj = new Prototype(); - obj.bar = true; - var theKeys = keys(obj); - t.equal(is.array(theKeys), true, 'returns an array'); - t.deepEqual(theKeys, ['bar'], 'Instance has expected keys'); - t.end(); -}); - -test('works in iOS 5 mobile Safari', function (t) { - var Foo = function () {}; - Foo.a = function () {}; - - // the bug is keys(Foo) => ['a', 'prototype'] instead of ['a'] - t.deepEqual(keys(Foo), ['a'], 'has expected keys'); - t.end(); -}); - -test('works in environments with the dontEnum bug (IE < 9)', function (t) { - var Foo = function () {}; - Foo.prototype.a = function () {}; - - // the bug is keys(Foo.prototype) => ['a', 'constructor'] instead of ['a'] - t.deepEqual(keys(Foo.prototype), ['a'], 'has expected keys'); - t.end(); -}); - -test('shadowed properties', function (t) { - var shadowedProps = [ - 'dummyControlProp', /* just to be sure */ - 'constructor', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'toLocaleString', - 'toString', - 'valueOf' - ]; - shadowedProps.sort(); - var shadowedObject = {}; - forEach(shadowedProps, function (value, index) { - shadowedObject[value] = index; - }); - var shadowedObjectKeys = keys(shadowedObject); - shadowedObjectKeys.sort(); - t.deepEqual(shadowedObjectKeys, shadowedProps, 'troublesome shadowed properties are keys of object literals'); - t.end(); -}); - diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/package.json deleted file mode 100644 index c52e4efc..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "xtend", - "version": "2.1.2", - "description": "extend like a boss", - "keywords": [ - "extend", - "merge", - "options", - "opts", - "object", - "array" - ], - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "repository": { - "type": "git", - "url": "git://github.com/Raynos/xtend.git" - }, - "main": "index", - "scripts": { - "test": "node test" - }, - "dependencies": { - "object-keys": "~0.4.0" - }, - "devDependencies": { - "tape": "~1.1.0" - }, - "homepage": "https://github.com/Raynos/xtend", - "contributors": [ - { - "name": "Jake Verbaten" - }, - { - "name": "Matt Esch" - } - ], - "bugs": { - "url": "https://github.com/Raynos/xtend/issues", - "email": "raynos2@gmail.com" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/raynos/xtend/raw/master/LICENSE" - } - ], - "testling": { - "files": "test.js", - "browsers": [ - "ie/7..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "engines": { - "node": ">=0.4" - }, - "readme": "# xtend\n\n[![browser support][3]][4]\n\nExtend like a boss\n\nxtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence.\n\n## Examples\n\n```js\nvar extend = require(\"xtend\")\n\nvar combination = extend({\n a: \"a\"\n}, {\n b: \"b\"\n})\n// { a: \"a\", b: \"b\" }\n```\n\n\n## MIT Licenced\n\n\n [3]: http://ci.testling.com/Raynos/xtend.png\n [4]: http://ci.testling.com/Raynos/xtend\n", - "readmeFilename": "README.md", - "_id": "xtend@2.1.2", - "_from": "xtend@~2.1.1" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/test.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/test.js deleted file mode 100644 index 3369d796..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/node_modules/xtend/test.js +++ /dev/null @@ -1,63 +0,0 @@ -var test = require("tape") -var extend = require("./") -var mutableExtend = require("./mutable") - -test("merge", function(assert) { - var a = { a: "foo" } - var b = { b: "bar" } - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("replace", function(assert) { - var a = { a: "foo" } - var b = { a: "bar" } - - assert.deepEqual(extend(a, b), { a: "bar" }) - assert.end() -}) - -test("undefined", function(assert) { - var a = { a: undefined } - var b = { b: "foo" } - - assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) - assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) - assert.end() -}) - -test("handle 0", function(assert) { - var a = { a: "default" } - var b = { a: 0 } - - assert.deepEqual(extend(a, b), { a: 0 }) - assert.deepEqual(extend(b, a), { a: "default" }) - assert.end() -}) - -test("is immutable", function (assert) { - var record = {} - - extend(record, { foo: "bar" }) - assert.equal(record.foo, undefined) - assert.end() -}) - -test("null as argument", function (assert) { - var a = { foo: "bar" } - var b = null - var c = void 0 - - assert.deepEqual(extend(b, a, c), { foo: "bar" }) - assert.end() -}) - -test("mutable", function (assert) { - var a = { foo: "bar" } - - mutableExtend(a, { bar: "baz" }) - - assert.equal(a.bar, "baz") - assert.end() -}) diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/package.json deleted file mode 100644 index 3d0e0c8b..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "through2", - "version": "0.4.1", - "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", - "main": "through2.js", - "scripts": { - "test": "node test/test.js", - "test-local": "brtapsauce-local test/basic-test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/rvagg/through2.git" - }, - "keywords": [ - "stream", - "streams2", - "through", - "transform" - ], - "author": { - "name": "Rod Vagg", - "email": "r@va.gg", - "url": "https://github.com/rvagg" - }, - "license": "MIT", - "dependencies": { - "readable-stream": "~1.0.17", - "xtend": "~2.1.1" - }, - "devDependencies": { - "tape": "~2.3.0", - "bl": "~0.6.0", - "stream-spigot": "~3.0.1", - "brtapsauce": "~0.2.2" - }, - "readme": "# through2\n\n<!--\n\nsoon ...\n\n[![Build Status](https://secure.travis-ci.org/rvagg/through2.png)](http://travis-ci.org/rvagg/through2)\n\n[![Build Status](https://saucelabs.com/browser-matrix/through2-sauce.svg)](https://travis-ci.org/rvagg/through2)\n\n-->\n\n[![NPM](https://nodei.co/npm/through2.png?compact=true)](https://nodei.co/npm/through2/) \n\n<!--\nnot happy with these, we need to peg to readable-stream@1.0.x so it'll always report out-of-date\n\n[![david-dm](https://david-dm.org/rvagg/through2.png)](https://david-dm.org/rvagg/through2/)\n[![david-dm](https://david-dm.org/rvagg/through2/dev-status.png)](https://david-dm.org/rvagg/through2#info=devDependencies/)\n-->\n\n**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise**\n\nInspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.\n\n```js\nfs.createReadStream('ex.txt')\n .pipe(through2(function (chunk, enc, callback) {\n\n for (var i = 0; i < chunk.length; i++)\n if (chunk[i] == 97)\n chunk[i] = 122 // swap 'a' for 'z'\n\n this.push(chunk)\n \n callback()\n\n }))\n .pipe(fs.createWriteStream('out.txt'))\n```\n\nOr object streams:\n\n```js\nvar all = []\n\nfs.createReadStream('data.csv')\n .pipe(csv2())\n .pipe(through2.obj(function (chunk, enc, callback) {\n\n var data = {\n name : chunk[0]\n , address : chunk[3]\n , phone : chunk[10]\n }\n \n this.push(data)\n \n callback()\n\n }))\n .on('data', function (data) {\n all.push(data)\n })\n .on('end', function () {\n doSomethingSpecial(all)\n })\n```\n\nNote that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`.\n\n## API\n\n<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b>\n\nConsult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).\n\n### options\n\nThe options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`).\n\nThe `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call:\n\n```js\nfs.createReadStream('/tmp/important.dat')\n .pipe(through2({ objectMode: true, allowHalfOpen: false }, function (chunk, enc, cb) {\n\n this.push(new Buffer('wut?'))\n cb()\n\n })\n .pipe(fs.createWriteStream('/tmp/wut.txt'))\n```\n\n### transformFunction\n\nThe `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk.\n\nTo queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on.\n\nIf you **do not provide a `transformFunction`** then you will get a simple simple pass-through stream.\n\n### flushFunction\n\nThe optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress.\n\n<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b>\n\nInstead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.\n\n```js\nvar FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) {\n if (record.temp != null && record.unit = \"F\") {\n record.temp = ( ( record.temp - 32 ) * 5 ) / 9\n record.unit = \"C\"\n }\n this.push(record)\n callback()\n})\n\n// Create instances of FToC like so:\nvar converter = new FToC()\n// Or:\nvar converter = FToC()\n// Or specify/override options when you instantiate, if you prefer:\nvar converter = FToC({objectMode: true})\n```\n\n## License\n\n**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/rvagg/through2/issues" - }, - "homepage": "https://github.com/rvagg/through2", - "_id": "through2@0.4.1", - "_from": "through2@~0.4.0" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/test/basic-test.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/test/basic-test.js deleted file mode 100644 index 9d137c7f..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/test/basic-test.js +++ /dev/null @@ -1,334 +0,0 @@ -const test = require('tape') - , through2 = require('../') - , crypto = require('crypto') - , bl = require('bl') - , spigot = require('stream-spigot') - -test('plain through', function (t) { - var th2 = through2(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') - t.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('pipeable through', function (t) { - var th2 = through2(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - // bl() acts like a proper streams2 stream and passes as much as it's - // asked for, so we really only get one write with such a small amount - // of data - t.equal(s, 'aaaaaaaaaaaaaaaaaaaaaaaaa', 'got transformed string') - t.end() - })) - - var bufs = bl() - bufs.append(crypto.randomBytes(10)) - bufs.append(crypto.randomBytes(5)) - bufs.append(crypto.randomBytes(10)) - bufs.pipe(th2) -}) - -test('object through', function (t) { - t.plan(3) - - var th2 = through2({ objectMode: true}, function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object through with through2.obj', function (t) { - t.plan(3) - - var th2 = through2.obj(function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('flushing through', function (t) { - var th2 = through2(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }, function (callback) { - this.push(new Buffer([ 101, 110, 100 ])) - callback() - }) - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal(s, 'aaaaaaaaaabbbbbccccccccccend', 'got transformed string') - t.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('plain through ctor', function (t) { - var Th2 = through2.ctor(function (chunk, enc, callback) { - if (!this._i) - this._i = 97 // 'a' - else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - var th2 = new Th2() - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') - t.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('reuse through ctor', function (t) { - t.plan(4) - - var Th2 = through2.ctor(function (chunk, enc, callback) { - if (!this._i) { - t.ok(1, 'did not contain previous instance data (this._i)') - this._i = 97 // 'a' - } else - this._i++ - var b = new Buffer(chunk.length) - for (var i = 0; i < chunk.length; i++) - b[i] = this._i - this.push(b) - callback() - }) - - var th2 = Th2() - - th2.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaaaaabbbbbcccccccccc', s, 'got transformed string') - - var newInstance = Th2() - newInstance.pipe(bl(function (err, b) { - var s = b.toString('ascii') - t.equal('aaaaaaabbbbccccccc', s, 'got transformed string') - })) - - newInstance.write(crypto.randomBytes(7)) - newInstance.write(crypto.randomBytes(4)) - newInstance.write(crypto.randomBytes(7)) - newInstance.end() - })) - - th2.write(crypto.randomBytes(10)) - th2.write(crypto.randomBytes(5)) - th2.write(crypto.randomBytes(10)) - th2.end() -}) - -test('object through ctor', function (t) { - t.plan(3) - - var Th2 = through2.ctor({ objectMode: true}, function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = new Th2() - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('pipeable object through ctor', function (t) { - t.plan(4) - - var Th2 = through2.ctor({ objectMode: true}, function (record, enc, callback) { - if (record.temp != null && record.unit == 'F') { - record.temp = ( ( record.temp - 32 ) * 5 ) / 9 - record.unit = 'C' - } - this.push(record) - callback() - }) - - var th2 = Th2() - - var expect = [-19, -40, 100, 22] - th2.on('data', function (o) { - t.deepEqual(o, { temp: expect.shift(), unit: 'C' }, 'got transformed object') - }) - - spigot({objectMode: true}, [ - {temp: -2.2, unit: 'F'}, - {temp: -40, unit: 'F'}, - {temp: 212, unit: 'F'}, - {temp: 22, unit: 'C'} - ]).pipe(th2) -}) - -test('object through ctor override', function (t) { - t.plan(3) - - var Th2 = through2.ctor(function (chunk, enc, callback) { - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2({objectMode: true}) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object settings available in transform', function (t) { - t.plan(6) - - var Th2 = through2.ctor({objectMode: true, peek: true}, function (chunk, enc, callback) { - t.ok(this.options.peek, "reading options from inside _transform") - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2() - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object settings available in transform override', function (t) { - t.plan(6) - - var Th2 = through2.ctor(function (chunk, enc, callback) { - t.ok(this.options.peek, "reading options from inside _transform") - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2({objectMode: true, peek: true}) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) - -test('object override extends options', function (t) { - t.plan(6) - - var Th2 = through2.ctor({objectMode: true}, function (chunk, enc, callback) { - t.ok(this.options.peek, "reading options from inside _transform") - this.push({ out: chunk.in + 1 }) - callback() - }) - - var th2 = Th2({peek: true}) - - var e = 0 - th2.on('data', function (o) { - t.deepEqual(o, { out: e === 0 ? 102 : e == 1 ? 203 : -99 }, 'got transformed object') - e++ - }) - - th2.write({ in: 101 }) - th2.write({ in: 202 }) - th2.write({ in: -100 }) - th2.end() -}) \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/test/bench.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/test/bench.js deleted file mode 100644 index cc10868b..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/test/bench.js +++ /dev/null @@ -1,42 +0,0 @@ -/* -on rvagg@fletcher: - @0.2.3: Ran 36719 iterations in 10000 ms -*/ - -const through2 = require('../') - , bl = require('bl') - , crypto = require('crypto') - , assert = require('assert') - -function run (callback) { - var bufs = Array.apply(null, Array(10)).map(function () { return crypto.randomBytes(32) }) - , stream = through2(function (chunk, env, callback) { - callback(null, chunk.toString('hex')) - }) - - stream.pipe(bl(function (err, data) { - assert(!err) - assert.equal(data.toString(), Buffer.concat(bufs).toString('hex')) - callback() - })) - - bufs.forEach(function (b) { - stream.write(b) - }) - stream.end() -} - -var count = 0 - , start = Date.now() - -;(function exec () { - count++ - run(function () { - if (Date.now() - start < 1000 * 10) { - return setImmediate(exec) - } - console.log('Ran', count, 'iterations in', Date.now() - start, 'ms') - }) -}()) - -console.log('Running for ~10s') \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/test/sauce.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/test/sauce.js deleted file mode 100644 index a6d28625..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/test/sauce.js +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env node - -const user = process.env.SAUCE_USER - , key = process.env.SAUCE_KEY - , path = require('path') - , brtapsauce = require('brtapsauce') - , testFile = path.join(__dirname, 'basic-test.js') - - , capabilities = [ - { browserName: 'chrome' , platform: 'Windows XP', version: '' } - , { browserName: 'firefox' , platform: 'Windows 8' , version: '' } - , { browserName: 'firefox' , platform: 'Windows XP', version: '4' } - , { browserName: 'internet explorer' , platform: 'Windows 8' , version: '10' } - , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '9' } - , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '8' } - , { browserName: 'internet explorer' , platform: 'Windows XP', version: '7' } - , { browserName: 'internet explorer' , platform: 'Windows XP', version: '6' } - , { browserName: 'safari' , platform: 'Windows 7' , version: '5' } - , { browserName: 'safari' , platform: 'OS X 10.8' , version: '6' } - , { browserName: 'opera' , platform: 'Windows 7' , version: '' } - , { browserName: 'opera' , platform: 'Windows 7' , version: '11' } - , { browserName: 'ipad' , platform: 'OS X 10.8' , version: '6' } - , { browserName: 'android' , platform: 'Linux' , version: '4.0', 'device-type': 'tablet' } - ] - -if (!user) - throw new Error('Must set a SAUCE_USER env var') -if (!key) - throw new Error('Must set a SAUCE_KEY env var') - -brtapsauce({ - name : 'Traversty' - , user : user - , key : key - , brsrc : testFile - , capabilities : capabilities - , options : { timeout: 60 * 6 } -}) \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/test/test.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/test/test.js deleted file mode 100644 index aa9b4877..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/test/test.js +++ /dev/null @@ -1,9 +0,0 @@ -require('./basic-test') - -if (!process.env.SAUCE_KEY || !process.env.SAUCE_USER) - return console.log('SAUCE_KEY and/or SAUCE_USER not set, not running sauce tests') - -if (!/v0\.10/.test(process.version)) - return console.log('Not Node v0.10.x, not running sauce tests') - -require('./sauce.js') \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/through2.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/through2.js deleted file mode 100644 index c1104848..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/through2/through2.js +++ /dev/null @@ -1,78 +0,0 @@ -var Transform = require('readable-stream/transform') - , inherits = require('util').inherits - , xtend = require('xtend') - - -// a noop _transform function -function noop (chunk, enc, callback) { - callback(null, chunk) -} - - -// create a new export function, used by both the main export and -// the .ctor export, contains common logic for dealing with arguments -function through2 (construct) { - return function (options, transform, flush) { - if (typeof options == 'function') { - flush = transform - transform = options - options = {} - } - - if (typeof transform != 'function') - transform = noop - - if (typeof flush != 'function') - flush = null - - return construct(options, transform, flush) - } -} - - -// main export, just make me a transform stream! -module.exports = through2(function (options, transform, flush) { - var t2 = new Transform(options) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) - - -// make me a reusable prototype that I can `new`, or implicitly `new` -// with a constructor call -module.exports.ctor = through2(function (options, transform, flush) { - function Through2 (override) { - if (!(this instanceof Through2)) - return new Through2(override) - - this.options = xtend(options, override) - - Transform.call(this, this.options) - } - - inherits(Through2, Transform) - - Through2.prototype._transform = transform - - if (flush) - Through2.prototype._flush = flush - - return Through2 -}) - - -module.exports.obj = through2(function (options, transform, flush) { - var t2 = new Transform(xtend({ objectMode: true }, options)) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/.npmignore b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/.npmignore deleted file mode 100644 index b5ef13a3..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -.DS_Store -*.log -node_modules -build -*.node -components \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/.travis.yml b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/.travis.yml deleted file mode 100644 index 33ad9f8c..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.9" - - "0.10" -after_script: - - npm run coveralls \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/LICENSE b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/LICENSE deleted file mode 100755 index 4f482f9b..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013 Fractal <contact@wearefractal.com> - -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/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/README.md deleted file mode 100644 index 3f97efc5..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/README.md +++ /dev/null @@ -1,123 +0,0 @@ -# vinyl [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl) - - -## Information - -<table> -<tr> -<td>Package</td><td>vinyl</td> -</tr> -<tr> -<td>Description</td> -<td>A virtual file format</td> -</tr> -<tr> -<td>Node Version</td> -<td>>= 0.9</td> -</tr> -</table> - -## File - -```javascript -var File = require('vinyl'); - -var coffeeFile = new File({ - cwd: "/", - base: "/test/", - path: "/test/file.coffee" - contents: new Buffer("test = 123") -}); -``` - -### constructor(options) - -#### options.cwd - -Type: `String` -Default: `process.cwd()` - -#### options.base - -Used for relative pathing. Typically where a glob starts. - -Type: `String` -Default: `options.cwd` - -#### options.path - -Full path to the file. - -Type: `String` -Default: `null` - -#### options.stat - -The result of an fs.stat call. See [fs.Stats](http://nodejs.org/api/fs.html#fs_class_fs_stats) for more information. - -Type: `fs.Stats` -Default: `null` - -#### options.contents - -File contents. - -Type: `Buffer, Stream, or null` -Default: `null` - -### isBuffer() - -Returns true if file.contents is a Buffer. - -### isStream() - -Returns true if file.contents is a Stream. - -### isNull() - -Returns true if file.contents is null. - -### clone() - -Returns a new File object with all attributes cloned. - -### pipe(stream[, opt]) - -If file.contents is a Buffer, it will write it to the stream. - -If file.contents is a Stream, it will pipe it to the stream. - -If file.contents is null, it will do nothing. - -If opt.end is true, the destination stream will not be ended (same as node core). - -Returns the stream. - -### inspect() - -Returns a pretty String interpretation of the File. Useful for console.log. - -### relative - -Returns path.relative for the file base and file path. - -Example: - -```javascript -var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/file.coffee" -}); - -console.log(file.relative); // file.coffee -``` - -[npm-url]: https://npmjs.org/package/vinyl -[npm-image]: https://badge.fury.io/js/vinyl.png -[travis-url]: https://travis-ci.org/wearefractal/vinyl -[travis-image]: https://travis-ci.org/wearefractal/vinyl.png?branch=master -[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl -[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl/badge.png -[depstat-url]: https://david-dm.org/wearefractal/vinyl -[depstat-image]: https://david-dm.org/wearefractal/vinyl.png \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/index.js deleted file mode 100644 index 97f5c752..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/index.js +++ /dev/null @@ -1,128 +0,0 @@ -var path = require('path'); - -var cloneStats = require('clone-stats'); - -var isBuffer = require('./lib/isBuffer'); -var isStream = require('./lib/isStream'); -var isNull = require('./lib/isNull'); -var inspectStream = require('./lib/inspectStream'); -var cloneBuffer = require('./lib/cloneBuffer'); - -function File(file) { - if (!file) file = {}; - - // TODO: should this be moved to vinyl-fs? - this.cwd = file.cwd || process.cwd(); - this.base = file.base || this.cwd; - - this.path = file.path || null; - - // stat = fs stats object - // TODO: should this be moved to vinyl-fs? - this.stat = file.stat || null; - - // contents = stream, buffer, or null if not read - this.contents = file.contents || null; -} - -File.prototype.isBuffer = function() { - return isBuffer(this.contents); -}; - -File.prototype.isStream = function() { - return isStream(this.contents); -}; - -File.prototype.isNull = function() { - return isNull(this.contents); -}; - -// TODO: should this be moved to vinyl-fs? -File.prototype.isDirectory = function() { - return this.isNull() && this.stat && this.stat.isDirectory(); -}; - -File.prototype.clone = function() { - var clonedContents = this.isBuffer() ? cloneBuffer(this.contents) : this.contents; - var clonedStat = this.stat ? cloneStats(this.stat) : null; - - return new File({ - cwd: this.cwd, - base: this.base, - path: this.path, - stat: clonedStat, - contents: clonedContents - }); -}; - -File.prototype.pipe = function(stream, opt) { - if (!opt) opt = {}; - if (typeof opt.end === 'undefined') opt.end = true; - - if (this.isStream()) { - return this.contents.pipe(stream, opt); - } - if (this.isBuffer()) { - if (opt.end) { - stream.end(this.contents); - } else { - stream.write(this.contents); - } - return stream; - } - if (this.isNull()) { - if (opt.end) stream.end(); - return stream; - } - - return stream; -}; - -File.prototype.inspect = function() { - var inspect = []; - - // use relative path if possible - var filePath = (this.base && this.path) ? this.relative : this.path; - - if (filePath) { - inspect.push('"'+filePath+'"'); - } - - if (this.isBuffer()) { - inspect.push(this.contents.inspect()); - } - - if (this.isStream()) { - inspect.push(inspectStream(this.contents)); - } - - return '<File '+inspect.join(' ')+'>'; -}; - -// virtual attributes -// or stuff with extra logic -Object.defineProperty(File.prototype, 'contents', { - get: function() { - return this._contents; - }, - set: function(val) { - if (!isBuffer(val) && !isStream(val) && !isNull(val)) { - throw new Error("File.contents can only be a Buffer, a Stream, or null."); - } - this._contents = val; - } -}); - -// TODO: should this be moved to vinyl-fs? -Object.defineProperty(File.prototype, 'relative', { - get: function() { - if (!this.base) throw new Error('No base specified! Can not get relative.'); - if (!this.path) throw new Error('No path specified! Can not get relative.'); - return path.relative(this.base, this.path); - }, - set: function() { - throw new Error('File.relative is generated from the base and path attributes. Do not modify it.'); - } -}); - -module.exports = File; diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js deleted file mode 100644 index 3a861f22..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/lib/cloneBuffer.js +++ /dev/null @@ -1,7 +0,0 @@ -var Buffer = require('buffer').Buffer; - -module.exports = function(buf) { - var out = new Buffer(buf.length); - buf.copy(out); - return out; -}; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js deleted file mode 100644 index 2c906789..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/lib/inspectStream.js +++ /dev/null @@ -1,12 +0,0 @@ -var Stream = require('stream').Stream; -var isStream = require('./isStream'); - -module.exports = function(stream) { - if (!isStream(stream)) return; - - var streamType = stream.constructor.name; - // avoid StreamStream - if (streamType === 'Stream') streamType = ''; - - return '<'+streamType+'Stream>'; -}; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js deleted file mode 100644 index 0e23782c..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/lib/isBuffer.js +++ /dev/null @@ -1,7 +0,0 @@ -var buf = require('buffer'); -var Buffer = buf.Buffer; - -// could use Buffer.isBuffer but this is the same exact thing... -module.exports = function(o) { - return typeof o === 'object' && o instanceof Buffer; -}; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js deleted file mode 100644 index 403bb30e..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/lib/isNull.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function(v) { - return v === null; -}; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/lib/isStream.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/lib/isStream.js deleted file mode 100644 index 9ce0929b..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/lib/isStream.js +++ /dev/null @@ -1,5 +0,0 @@ -var Stream = require('stream').Stream; - -module.exports = function(o) { - return !!o && o instanceof Stream; -}; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/LICENSE.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/LICENSE.md deleted file mode 100644 index 146cb32a..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -## The MIT License (MIT) ## - -Copyright (c) 2014 Hugh Kennedy - -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/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/README.md b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/README.md deleted file mode 100644 index 8b12b6fa..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# clone-stats [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/clone-stats&title=clone-stats&description=hughsk/clone-stats%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) # - -Safely clone node's -[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) instances without -losing their class methods, i.e. `stat.isDirectory()` and co. - -## Usage ## - -[![clone-stats](https://nodei.co/npm/clone-stats.png?mini=true)](https://nodei.co/npm/clone-stats) - -### `copy = require('clone-stats')(stat)` ### - -Returns a clone of the original `fs.Stats` instance (`stat`). - -## License ## - -MIT. See [LICENSE.md](http://github.com/hughsk/clone-stats/blob/master/LICENSE.md) for details. diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/index.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/index.js deleted file mode 100644 index e797cfe6..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/index.js +++ /dev/null @@ -1,13 +0,0 @@ -var Stat = require('fs').Stats - -module.exports = cloneStats - -function cloneStats(stats) { - var replacement = new Stat - - Object.keys(stats).forEach(function(key) { - replacement[key] = stats[key] - }) - - return replacement -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json deleted file mode 100644 index f7dc15d9..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "clone-stats", - "description": "Safely clone node's fs.Stats instances without losing their class methods", - "version": "0.0.1", - "main": "index.js", - "browser": "index.js", - "dependencies": {}, - "devDependencies": { - "tape": "~2.3.2" - }, - "scripts": { - "test": "node test" - }, - "author": { - "name": "Hugh Kennedy", - "email": "hughskennedy@gmail.com", - "url": "http://hughsk.io/" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/hughsk/clone-stats" - }, - "bugs": { - "url": "https://github.com/hughsk/clone-stats/issues" - }, - "homepage": "https://github.com/hughsk/clone-stats", - "keywords": [ - "stats", - "fs", - "clone", - "copy", - "prototype" - ], - "readme": "# clone-stats [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/clone-stats&title=clone-stats&description=hughsk/clone-stats%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #\n\nSafely clone node's\n[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) instances without\nlosing their class methods, i.e. `stat.isDirectory()` and co.\n\n## Usage ##\n\n[![clone-stats](https://nodei.co/npm/clone-stats.png?mini=true)](https://nodei.co/npm/clone-stats)\n\n### `copy = require('clone-stats')(stat)` ###\n\nReturns a clone of the original `fs.Stats` instance (`stat`).\n\n## License ##\n\nMIT. See [LICENSE.md](http://github.com/hughsk/clone-stats/blob/master/LICENSE.md) for details.\n", - "readmeFilename": "README.md", - "_id": "clone-stats@0.0.1", - "_from": "clone-stats@~0.0.1" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/test.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/test.js deleted file mode 100644 index e4bb2814..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/node_modules/clone-stats/test.js +++ /dev/null @@ -1,36 +0,0 @@ -var test = require('tape') -var clone = require('./') -var fs = require('fs') - -test('file', function(t) { - compare(t, fs.statSync(__filename)) - t.end() -}) - -test('directory', function(t) { - compare(t, fs.statSync(__dirname)) - t.end() -}) - -function compare(t, stat) { - var copy = clone(stat) - - t.deepEqual(stat, copy, 'clone has equal properties') - t.ok(stat instanceof fs.Stats, 'original is an fs.Stat') - t.ok(copy instanceof fs.Stats, 'copy is an fs.Stat') - - ;['isDirectory' - , 'isFile' - , 'isBlockDevice' - , 'isCharacterDevice' - , 'isSymbolicLink' - , 'isFIFO' - , 'isSocket' - ].forEach(function(method) { - t.equal( - stat[method].call(stat) - , copy[method].call(copy) - , 'equal value for stat.' + method + '()' - ) - }) -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/package.json b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/package.json deleted file mode 100644 index 4ef0f631..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "vinyl", - "description": "A virtual file format", - "version": "0.2.3", - "homepage": "http://github.com/wearefractal/vinyl", - "repository": { - "type": "git", - "url": "git://github.com/wearefractal/vinyl.git" - }, - "author": { - "name": "Fractal", - "email": "contact@wearefractal.com", - "url": "http://wearefractal.com/" - }, - "main": "./index.js", - "dependencies": { - "clone-stats": "~0.0.1" - }, - "devDependencies": { - "mocha": "~1.17.0", - "should": "~2.1.1", - "mocha-lcov-reporter": "0.0.1", - "coveralls": "~2.6.1", - "istanbul": "~0.2.3", - "rimraf": "~2.2.5", - "jshint": "~2.4.1", - "buffer-equal": "0.0.0", - "lodash.templatesettings": "~2.4.1", - "event-stream": "~3.1.0" - }, - "scripts": { - "test": "mocha --reporter spec && jshint", - "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage" - }, - "engines": { - "node": ">= 0.9" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/wearefractal/vinyl/raw/master/LICENSE" - } - ], - "readme": "# vinyl [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl)\n\n\n## Information\n\n<table>\n<tr> \n<td>Package</td><td>vinyl</td>\n</tr>\n<tr>\n<td>Description</td>\n<td>A virtual file format</td>\n</tr>\n<tr>\n<td>Node Version</td>\n<td>>= 0.9</td>\n</tr>\n</table>\n\n## File\n\n```javascript\nvar File = require('vinyl');\n\nvar coffeeFile = new File({\n cwd: \"/\",\n base: \"/test/\",\n path: \"/test/file.coffee\"\n contents: new Buffer(\"test = 123\")\n});\n```\n\n### constructor(options)\n\n#### options.cwd\n\nType: `String` \nDefault: `process.cwd()`\n\n#### options.base\n\nUsed for relative pathing. Typically where a glob starts.\n\nType: `String` \nDefault: `options.cwd`\n\n#### options.path\n\nFull path to the file.\n\nType: `String` \nDefault: `null`\n\n#### options.stat\n\nThe result of an fs.stat call. See [fs.Stats](http://nodejs.org/api/fs.html#fs_class_fs_stats) for more information.\n\nType: `fs.Stats` \nDefault: `null`\n\n#### options.contents\n\nFile contents.\n\nType: `Buffer, Stream, or null` \nDefault: `null`\n\n### isBuffer()\n\nReturns true if file.contents is a Buffer.\n\n### isStream()\n\nReturns true if file.contents is a Stream.\n\n### isNull()\n\nReturns true if file.contents is null.\n\n### clone()\n\nReturns a new File object with all attributes cloned.\n\n### pipe(stream[, opt])\n\nIf file.contents is a Buffer, it will write it to the stream.\n\nIf file.contents is a Stream, it will pipe it to the stream.\n\nIf file.contents is null, it will do nothing.\n\nIf opt.end is true, the destination stream will not be ended (same as node core).\n\nReturns the stream.\n\n### inspect()\n\nReturns a pretty String interpretation of the File. Useful for console.log.\n\n### relative\n\nReturns path.relative for the file base and file path.\n\nExample:\n\n```javascript\nvar file = new File({\n cwd: \"/\",\n base: \"/test/\",\n path: \"/test/file.coffee\"\n});\n\nconsole.log(file.relative); // file.coffee\n```\n\n[npm-url]: https://npmjs.org/package/vinyl\n[npm-image]: https://badge.fury.io/js/vinyl.png\n[travis-url]: https://travis-ci.org/wearefractal/vinyl\n[travis-image]: https://travis-ci.org/wearefractal/vinyl.png?branch=master\n[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl\n[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl/badge.png\n[depstat-url]: https://david-dm.org/wearefractal/vinyl\n[depstat-image]: https://david-dm.org/wearefractal/vinyl.png", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/wearefractal/vinyl/issues" - }, - "_id": "vinyl@0.2.3", - "_from": "vinyl@~0.2.1" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/test/File.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/test/File.js deleted file mode 100644 index 1f2a83a0..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/test/File.js +++ /dev/null @@ -1,540 +0,0 @@ -var File = require('../'); -var Stream = require('stream'); -var fs = require('fs'); - -var should = require('should'); -require('mocha'); - -describe('File', function() { - - describe('constructor()', function() { - it('should default cwd to process.cwd', function(done) { - var file = new File(); - file.cwd.should.equal(process.cwd()); - done(); - }); - - it('should default base to cwd', function(done) { - var cwd = "/"; - var file = new File({cwd: cwd}); - file.base.should.equal(cwd); - done(); - }); - - it('should default base to cwd even when none is given', function(done) { - var file = new File(); - file.base.should.equal(process.cwd()); - done(); - }); - - it('should default path to null', function(done) { - var file = new File(); - should.not.exist(file.path); - done(); - }); - - it('should default stat to null', function(done) { - var file = new File(); - should.not.exist(file.stat); - done(); - }); - - it('should default contents to null', function(done) { - var file = new File(); - should.not.exist(file.contents); - done(); - }); - - it('should set base to given value', function(done) { - var val = "/"; - var file = new File({base: val}); - file.base.should.equal(val); - done(); - }); - - it('should set cwd to given value', function(done) { - var val = "/"; - var file = new File({cwd: val}); - file.cwd.should.equal(val); - done(); - }); - - it('should set path to given value', function(done) { - var val = "/test.coffee"; - var file = new File({path: val}); - file.path.should.equal(val); - done(); - }); - - it('should set stat to given value', function(done) { - var val = {}; - var file = new File({stat: val}); - file.stat.should.equal(val); - done(); - }); - - it('should set contents to given value', function(done) { - var val = new Buffer("test"); - var file = new File({contents: val}); - file.contents.should.equal(val); - done(); - }); - }); - - describe('isBuffer()', function() { - it('should return true when the contents are a Buffer', function(done) { - var val = new Buffer("test"); - var file = new File({contents: val}); - file.isBuffer().should.equal(true); - done(); - }); - - it('should return false when the contents are a Stream', function(done) { - var val = new Stream(); - var file = new File({contents: val}); - file.isBuffer().should.equal(false); - done(); - }); - - it('should return false when the contents are a null', function(done) { - var file = new File({contents: null}); - file.isBuffer().should.equal(false); - done(); - }); - }); - - describe('isStream()', function() { - it('should return false when the contents are a Buffer', function(done) { - var val = new Buffer("test"); - var file = new File({contents: val}); - file.isStream().should.equal(false); - done(); - }); - - it('should return true when the contents are a Stream', function(done) { - var val = new Stream(); - var file = new File({contents: val}); - file.isStream().should.equal(true); - done(); - }); - - it('should return false when the contents are a null', function(done) { - var file = new File({contents: null}); - file.isStream().should.equal(false); - done(); - }); - }); - - describe('isNull()', function() { - it('should return false when the contents are a Buffer', function(done) { - var val = new Buffer("test"); - var file = new File({contents: val}); - file.isNull().should.equal(false); - done(); - }); - - it('should return false when the contents are a Stream', function(done) { - var val = new Stream(); - var file = new File({contents: val}); - file.isNull().should.equal(false); - done(); - }); - - it('should return true when the contents are a null', function(done) { - var file = new File({contents: null}); - file.isNull().should.equal(true); - done(); - }); - }); - - describe('isDirectory()', function() { - var fakeStat = { - isDirectory: function() { - return true; - } - }; - - it('should return false when the contents are a Buffer', function(done) { - var val = new Buffer("test"); - var file = new File({contents: val, stat: fakeStat}); - file.isDirectory().should.equal(false); - done(); - }); - - it('should return false when the contents are a Stream', function(done) { - var val = new Stream(); - var file = new File({contents: val, stat: fakeStat}); - file.isDirectory().should.equal(false); - done(); - }); - - it('should return true when the contents are a null', function(done) { - var file = new File({contents: null, stat: fakeStat}); - file.isDirectory().should.equal(true); - done(); - }); - }); - - describe('clone()', function() { - it('should copy all attributes over with Buffer', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Buffer("test") - }; - var file = new File(options); - var file2 = file.clone(); - - file2.should.not.equal(file, 'refs should be different'); - file2.cwd.should.equal(file.cwd); - file2.base.should.equal(file.base); - file2.path.should.equal(file.path); - file2.contents.should.not.equal(file.contents, 'buffer ref should be different'); - file2.contents.toString('utf8').should.equal(file.contents.toString('utf8')); - done(); - }); - - it('should copy all attributes over with Stream', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Stream() - }; - var file = new File(options); - var file2 = file.clone(); - - file2.should.not.equal(file, 'refs should be different'); - file2.cwd.should.equal(file.cwd); - file2.base.should.equal(file.base); - file2.path.should.equal(file.path); - file2.contents.should.equal(file.contents, 'stream ref should be the same'); - done(); - }); - - it('should copy all attributes over with null', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: null - }; - var file = new File(options); - var file2 = file.clone(); - - file2.should.not.equal(file, 'refs should be different'); - file2.cwd.should.equal(file.cwd); - file2.base.should.equal(file.base); - file2.path.should.equal(file.path); - should.not.exist(file2.contents); - done(); - }); - - it('should properly clone the `stat` property', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.js", - contents: new Buffer("test"), - stat: fs.statSync(__filename) - }; - - var file = new File(options); - var copy = file.clone(); - - copy.stat.isFile().should.be.true; - copy.stat.isDirectory().should.be.false; - should(file.stat instanceof fs.Stats).be.true; - should(copy.stat instanceof fs.Stats).be.true; - - done(); - }); - }); - - describe('pipe()', function() { - it('should write to stream with Buffer', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Buffer("test") - }; - var file = new File(options); - var stream = new Stream.PassThrough(); - stream.on('data', function(chunk) { - should.exist(chunk); - (chunk instanceof Buffer).should.equal(true, 'should write as a buffer'); - chunk.toString('utf8').should.equal(options.contents.toString('utf8')); - }); - stream.on('end', function(chunk) { - done(); - }); - var ret = file.pipe(stream); - ret.should.equal(stream, 'should return the stream'); - }); - - it('should pipe to stream with Stream', function(done) { - var testChunk = new Buffer("test"); - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Stream.PassThrough() - }; - var file = new File(options); - var stream = new Stream.PassThrough(); - stream.on('data', function(chunk) { - should.exist(chunk); - (chunk instanceof Buffer).should.equal(true, 'should write as a buffer'); - chunk.toString('utf8').should.equal(testChunk.toString('utf8')); - done(); - }); - var ret = file.pipe(stream); - ret.should.equal(stream, 'should return the stream'); - - file.contents.write(testChunk); - }); - - it('should do nothing with null', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: null - }; - var file = new File(options); - var stream = new Stream.PassThrough(); - stream.on('data', function(chunk) { - throw new Error("should not write"); - }); - stream.on('end', function() { - done(); - }); - var ret = file.pipe(stream); - ret.should.equal(stream, 'should return the stream'); - }); - - it('should write to stream with Buffer', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Buffer("test") - }; - var file = new File(options); - var stream = new Stream.PassThrough(); - stream.on('data', function(chunk) { - should.exist(chunk); - (chunk instanceof Buffer).should.equal(true, 'should write as a buffer'); - chunk.toString('utf8').should.equal(options.contents.toString('utf8')); - done(); - }); - stream.on('end', function(chunk) { - throw new Error("should not end"); - }); - var ret = file.pipe(stream, {end: false}); - ret.should.equal(stream, 'should return the stream'); - }); - - it('should pipe to stream with Stream', function(done) { - var testChunk = new Buffer("test"); - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Stream.PassThrough() - }; - var file = new File(options); - var stream = new Stream.PassThrough(); - stream.on('data', function(chunk) { - should.exist(chunk); - (chunk instanceof Buffer).should.equal(true, 'should write as a buffer'); - chunk.toString('utf8').should.equal(testChunk.toString('utf8')); - done(); - }); - stream.on('end', function(chunk) { - throw new Error("should not end"); - }); - var ret = file.pipe(stream, {end: false}); - ret.should.equal(stream, 'should return the stream'); - - file.contents.write(testChunk); - }); - - it('should do nothing with null', function(done) { - var options = { - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: null - }; - var file = new File(options); - var stream = new Stream.PassThrough(); - stream.on('data', function(chunk) { - throw new Error("should not write"); - }); - stream.on('end', function(chunk) { - throw new Error("should not end"); - }); - var ret = file.pipe(stream, {end: false}); - ret.should.equal(stream, 'should return the stream'); - process.nextTick(done); - }); - }); - - describe('inspect()', function() { - it('should return correct format when no contents and no path', function(done) { - var file = new File(); - file.inspect().should.equal('<File >'); - done(); - }); - - it('should return correct format when Buffer and no path', function(done) { - var val = new Buffer("test"); - var file = new File({ - contents: val - }); - file.inspect().should.equal('<File <Buffer 74 65 73 74>>'); - done(); - }); - - it('should return correct format when Buffer and relative path', function(done) { - var val = new Buffer("test"); - var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: val - }); - file.inspect().should.equal('<File "test.coffee" <Buffer 74 65 73 74>>'); - done(); - }); - - it('should return correct format when Buffer and only path and no base', function(done) { - var val = new Buffer("test"); - var file = new File({ - cwd: "/", - path: "/test/test.coffee", - contents: val - }); - delete file.base; - file.inspect().should.equal('<File "/test/test.coffee" <Buffer 74 65 73 74>>'); - done(); - }); - - it('should return correct format when Stream and relative path', function(done) { - var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: new Stream.PassThrough() - }); - file.inspect().should.equal('<File "test.coffee" <PassThroughStream>>'); - done(); - }); - - it('should return correct format when null and relative path', function(done) { - var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee", - contents: null - }); - file.inspect().should.equal('<File "test.coffee">'); - done(); - }); - }); - - describe('contents get/set', function() { - it('should work with Buffer', function(done) { - var val = new Buffer("test"); - var file = new File(); - file.contents = val; - file.contents.should.equal(val); - done(); - }); - - it('should work with Stream', function(done) { - var val = new Stream.PassThrough(); - var file = new File(); - file.contents = val; - file.contents.should.equal(val); - done(); - }); - - it('should work with null', function(done) { - var val = null; - var file = new File(); - file.contents = val; - (file.contents === null).should.equal(true); - done(); - }); - - it('should not work with string', function(done) { - var val = "test"; - var file = new File(); - try { - file.contents = val; - } catch (err) { - should.exist(err); - done(); - } - }); - }); - - describe('relative get/set', function() { - it('should error on set', function(done) { - var file = new File(); - try { - file.relative = "test"; - } catch (err) { - should.exist(err); - done(); - } - }); - - it('should error on get when no base', function(done) { - var a; - var file = new File(); - delete file.base; - try { - a = file.relative; - } catch (err) { - should.exist(err); - done(); - } - }); - - it('should error on get when no path', function(done) { - var a; - var file = new File(); - try { - a = file.relative; - } catch (err) { - should.exist(err); - done(); - } - }); - - it('should return a relative path from base', function(done) { - var file = new File({ - cwd: "/", - base: "/test/", - path: "/test/test.coffee" - }); - file.relative.should.equal("test.coffee"); - done(); - }); - - it('should return a relative path from cwd', function(done) { - var file = new File({ - cwd: "/", - path: "/test/test.coffee" - }); - file.relative.should.equal("test/test.coffee"); - done(); - }); - }); - -}); diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js deleted file mode 100644 index 7d286814..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/test/cloneBuffer.js +++ /dev/null @@ -1,28 +0,0 @@ -var cloneBuffer = require('../lib/cloneBuffer'); -var Stream = require('stream'); -var should = require('should'); -require('mocha'); - -describe('cloneBuffer()', function() { - it('should return a new Buffer reference', function(done) { - var testBuffer = new Buffer('test'); - var testBuffer2 = cloneBuffer(testBuffer); - - should.exist(testBuffer2, 'should return something'); - (testBuffer2 instanceof Buffer).should.equal(true, 'should return a Buffer'); - testBuffer2.should.not.equal(testBuffer, 'pointer should change'); - done(); - }); - - it('should not replicate modifications to the original buffer', function(done) { - var testBuffer = new Buffer('test'); - var testBuffer2 = cloneBuffer(testBuffer); - - // test that changes dont modify both pointers - testBuffer2.write('w'); - - testBuffer.toString('utf8').should.equal('test', 'original should stay the same'); - testBuffer2.toString('utf8').should.equal('west', 'new buffer should be modified'); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/test/inspectStream.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/test/inspectStream.js deleted file mode 100644 index fe1802c5..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/test/inspectStream.js +++ /dev/null @@ -1,53 +0,0 @@ -var inspectStream = require('../lib/inspectStream'); -var Stream = require('stream'); -var should = require('should'); -require('mocha'); - -describe('inspectStream()', function() { - it('should work on a core Stream', function(done) { - var testStream = new Stream(); - inspectStream(testStream).should.equal('<Stream>'); - done(); - }); - - it('should work on a core Readable Stream', function(done) { - var testStream = new Stream.Readable(); - inspectStream(testStream).should.equal('<ReadableStream>'); - done(); - }); - - it('should work on a core Writable Stream', function(done) { - var testStream = new Stream.Writable(); - inspectStream(testStream).should.equal('<WritableStream>'); - done(); - }); - - it('should work on a core Duplex Stream', function(done) { - var testStream = new Stream.Duplex(); - inspectStream(testStream).should.equal('<DuplexStream>'); - done(); - }); - - it('should work on a core Transform Stream', function(done) { - var testStream = new Stream.Transform(); - inspectStream(testStream).should.equal('<TransformStream>'); - done(); - }); - - it('should work on a core PassThrough Stream', function(done) { - var testStream = new Stream.PassThrough(); - inspectStream(testStream).should.equal('<PassThroughStream>'); - done(); - }); - - it('should not work on a Buffer', function(done) { - var testBuffer = new Buffer('test'); - should.not.exist(inspectStream(testBuffer)); - done(); - }); - - it('should not work on a null', function(done) { - should.not.exist(inspectStream(null)); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js deleted file mode 100644 index 5bb1cb91..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/test/isBuffer.js +++ /dev/null @@ -1,29 +0,0 @@ -var isBuffer = require('../lib/isBuffer'); -var Stream = require('stream'); -var should = require('should'); -require('mocha'); - -describe('isBuffer()', function() { - it('should return true on a Buffer', function(done) { - var testBuffer = new Buffer('test'); - isBuffer(testBuffer).should.equal(true); - done(); - }); - - it('should return false on a Stream', function(done) { - var testStream = new Stream(); - isBuffer(testStream).should.equal(false); - done(); - }); - - it('should return false on a null', function(done) { - isBuffer(null).should.equal(false); - done(); - }); - - it('should return false on a array of numbers', function(done) { - var testArray = [1, 2, 3]; - isBuffer(testArray).should.equal(false); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/test/isNull.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/test/isNull.js deleted file mode 100644 index db70c013..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/test/isNull.js +++ /dev/null @@ -1,23 +0,0 @@ -var isNull = require('../lib/isNull'); -var Stream = require('stream'); -var should = require('should'); -require('mocha'); - -describe('isNull()', function() { - it('should return true on null', function(done) { - isNull(null).should.equal(true); - done(); - }); - - it('should return false on undefined', function(done) { - isNull().should.equal(false); - isNull(undefined).should.equal(false); - done(); - }); - - it('should return false on defined values', function(done) { - isNull(1).should.equal(false); - isNull("test").should.equal(false); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/test/isStream.js b/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/test/isStream.js deleted file mode 100644 index f22584c5..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/node_modules/vinyl/test/isStream.js +++ /dev/null @@ -1,29 +0,0 @@ -var isStream = require('../lib/isStream'); -var Stream = require('stream'); -var should = require('should'); -require('mocha'); - -describe('isStream()', function() { - it('should return true on a Stream', function(done) { - var testStream = new Stream(); - isStream(testStream).should.equal(true); - done(); - }); - - it('should return false on a Buffer', function(done) { - var testBuffer = new Buffer('test'); - isStream(testBuffer).should.equal(false); - done(); - }); - - it('should return false on a null', function(done) { - isStream(null).should.equal(false); - done(); - }); - - it('should return false on a array of numbers', function(done) { - var testArray = [1, 2, 3]; - isStream(testArray).should.equal(false); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/package.json b/node_modules/gulp-sass/node_modules/gulp-util/package.json deleted file mode 100644 index 9003873b..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "gulp-util", - "description": "Utility functions for gulp plugins", - "version": "2.2.14", - "homepage": "http://github.com/wearefractal/gulp-util", - "repository": { - "type": "git", - "url": "git://github.com/wearefractal/gulp-util.git" - }, - "author": { - "name": "Fractal", - "email": "contact@wearefractal.com", - "url": "http://wearefractal.com/" - }, - "main": "./index.js", - "dependencies": { - "chalk": "~0.4.0", - "lodash.template": "~2.4.1", - "lodash._reinterpolate": "~2.4.1", - "vinyl": "~0.2.1", - "through2": "~0.4.0", - "dateformat": "~1.0.7-1.2.3", - "multipipe": "~0.0.1", - "minimist": "~0.0.5" - }, - "devDependencies": { - "mocha": "~1.17.0", - "should": "~3.1.2", - "mocha-lcov-reporter": "~0.0.1", - "coveralls": "~2.7.0", - "istanbul": "~0.2.3", - "rimraf": "~2.2.5", - "jshint": "~2.4.1", - "buffer-equal": "0.0.0", - "lodash.templatesettings": "~2.4.1", - "event-stream": "~3.1.0" - }, - "scripts": { - "test": "mocha --reporter spec && jshint", - "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage" - }, - "engines": { - "node": ">= 0.9" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/wearefractal/gulp-util/raw/master/LICENSE" - } - ], - "readme": "# gulp-util [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/gulpjs/gulp-util.png?theme=shields.io)](https://david-dm.org/gulpjs/gulp-util)\n\n## Information\n\n<table>\n<tr> \n<td>Package</td><td>gulp-util</td>\n</tr>\n<tr>\n<td>Description</td>\n<td>Utility functions for gulp plugins</td>\n</tr>\n<tr>\n<td>Node Version</td>\n<td>>= 0.9</td>\n</tr>\n</table>\n\n## Usage\n\n```javascript\nvar gutil = require('gulp-util');\n\ngutil.log('stuff happened', 'Really it did', gutil.colors.cyan('123'));\ngutil.beep();\n\ngutil.replaceExtension('file.coffee', '.js'); // file.js\n\nvar opt = {\n name: 'todd',\n file: someGulpFile\n};\ngutil.template('test <%= name %> <%= file.path %>', opt) // test todd /js/hi.js\n```\n\n### log(msg...)\n\nLogs stuff. Already prefixed with [gulp] and all that. Use the right colors for values. If you pass in multiple arguments it will join them by a space.\n\n```\nvalues (files, module names, etc.) = magenta\nnumbers (times, counts, etc) = cyan\n```\n\n### colors\n\nThis is an instance of [chalk](https://github.com/sindresorhus/chalk)\n\n### date\n\nThis is an instance of [node-dateformat](https://github.com/felixge/node-dateformat).\n\n### linefeed\n\nJust `\\n`. Use this.\n\n### replaceExtension(path, newExtension)\n\nReplaces a file extension in a path. Returns the new path.\n\n### isStream(obj)\n\nReturns true or false if an object is a stream.\n\n### isBuffer(obj)\n\nReturns true or false if an object is a Buffer.\n\n### template(string[, data])\n\nThis is a lodash.template function wrapper. You must pass in a valid gulp file object so it is available to the user or it will error. You can not configure any of the delimiters. Look at the [lodash docs](http://lodash.com/docs#template) for more info.\n\n## new File(obj)\n\nThis is just [vinyl](https://github.com/wearefractal/vinyl)\n\n```javascript\nvar file = new gutil.File({\n base: join(__dirname, './fixtures/'),\n cwd: __dirname,\n path: join(__dirname, './fixtures/test.coffee')\n});\n```\n\n## noop()\n\nReturns a stream that does nothing but pass data straight through.\n\n```javascript\ngulp.task('scripts', function() {\n gulp.src('src/**/*.js')\n .pipe(concat('script.js'))\n .pipe(gulp.env.production ? uglify() : gutil.noop())\n .pipe(gulp.dest('dist/');\n});\n```\n\n## combine(streams...)\n\nArgument may also be an array of streams. Returns a function that returns the combined stream. Useful for keeping things DRY. This is a simple wrapper around event-stream's `.pipeline`\n\n```javascript\nvar scripts = gutil.combine(\n coffee({bare: true}),\n uglify(),\n concat('script.js'),\n gulp.dest('dist/')\n);\n\ngulp.task('default', function() {\n gulp.src('*.coffee').pipe(scripts());\n});\n```\n\n## buffer(cb)\n\nThis is similar to es.wait but instead of buffering text into one string it buffers anything into an array (so very useful for file objects).\n\nReturns a stream that can be piped to.\n\nThe stream will emit one data event after the stream piped to it has ended. The data will be the same array passed to the callback.\n\nCallback is optional and receives two arguments: error and data\n\n```javascript\ngulp.src('stuff/*.js')\n .pipe(gutil.buffer(function(err, files){\n \n });\n```\n\n## new PluginError(pluginName, message[, options])\n\n- pluginName should be the module name of your plugin\n- message can be a string or an existing error\n- By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error.\n- If you pass an error in as the message the stack will be pulled from that, otherwise one will be created.\n\nThese are all acceptable forms of instantiation:\n\n```javascript\nvar err = new gutil.PluginError('test', {\n message: 'something broke'\n});\n\nvar err = new gutil.PluginError({\n plugin: 'test',\n message: 'something broke'\n});\n\nvar err = new gutil.PluginError('test', 'something broke');\n\nvar err = new gutil.PluginError('test', 'something broke', {showStack: true});\n\nvar existingError = new Error('OMG');\nvar err = new gutil.PluginError('test', existingError, {showStack: true});\n```\n\n[npm-url]: https://npmjs.org/package/gulp-util\n[npm-image]: https://badge.fury.io/js/gulp-util.png\n[travis-url]: https://travis-ci.org/gulpjs/gulp-util\n[travis-image]: https://travis-ci.org/gulpjs/gulp-util.png?branch=master\n[coveralls-url]: https://coveralls.io/r/gulpjs/gulp-util\n[coveralls-image]: https://coveralls.io/repos/gulpjs/gulp-util/badge.png\n[depstat-url]: https://david-dm.org/gulpjs/gulp-util\n[depstat-image]: https://david-dm.org/gulpjs/gulp-util.png\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/wearefractal/gulp-util/issues" - }, - "_id": "gulp-util@2.2.14", - "_from": "gulp-util@~2.2.5" -} diff --git a/node_modules/gulp-sass/node_modules/gulp-util/test/File.js b/node_modules/gulp-sass/node_modules/gulp-util/test/File.js deleted file mode 100644 index 53544075..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/test/File.js +++ /dev/null @@ -1,46 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('File()', function() { - it('should return a valid file', function(done) { - var fname = path.join(__dirname, './fixtures/test.coffee'); - var base = path.join(__dirname, './fixtures/'); - var file = new util.File({ - base: base, - cwd: __dirname, - path: fname - }); - should.exist(file, 'root'); - should.exist(file.relative, 'relative'); - should.exist(file.path, 'path'); - should.exist(file.cwd, 'cwd'); - should.exist(file.base, 'base'); - file.path.should.equal(fname); - file.cwd.should.equal(__dirname); - file.base.should.equal(base); - file.relative.should.equal('test.coffee'); - done(); - }); - - it('should return a valid file 2', function(done) { - var fname = path.join(__dirname, './fixtures/test.coffee'); - var base = __dirname; - var file = new util.File({ - base: base, - cwd: __dirname, - path: fname - }); - should.exist(file, 'root'); - should.exist(file.relative, 'relative'); - should.exist(file.path, 'path'); - should.exist(file.cwd, 'cwd'); - should.exist(file.base, 'base'); - file.path.should.equal(fname); - file.cwd.should.equal(__dirname); - file.base.should.equal(base); - file.relative.should.equal('fixtures/test.coffee'); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/test/PluginError.js b/node_modules/gulp-sass/node_modules/gulp-util/test/PluginError.js deleted file mode 100644 index 6dc23c0c..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/test/PluginError.js +++ /dev/null @@ -1,70 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('PluginError()', function(){ - it('should print the plugin name in toString', function(done){ - var err = new util.PluginError('test', 'something broke'); - err.toString().indexOf('test').should.not.equal(-1); - done(); - }); - - it('should not include the stack by default in toString', function(done){ - var err = new util.PluginError('test', 'something broke'); - // just check that there are no 'at' lines - err.toString().indexOf('at').should.equal(-1); - done(); - }); - - it('should include the stack when specified in toString', function(done){ - var err = new util.PluginError('test', 'something broke', {stack: "at huh", showStack: true}); - // just check that there are 'at' lines - err.toString().indexOf('at').should.not.equal(-1); - done(); - }); - - it('should take arguments as one object', function(done){ - var err = new util.PluginError({ - plugin: 'test', - message: 'something broke' - }); - err.plugin.should.equal('test'); - err.message.should.equal('something broke'); - done(); - }); - - it('should take arguments as plugin name and one object', function(done){ - var err = new util.PluginError('test', { - message: 'something broke' - }); - err.plugin.should.equal('test'); - err.message.should.equal('something broke'); - done(); - }); - - it('should take arguments as plugin name and message', function(done){ - var err = new util.PluginError('test', 'something broke'); - err.plugin.should.equal('test'); - err.message.should.equal('something broke'); - done(); - }); - - it('should take arguments as plugin name, message, and one object', function(done){ - var err = new util.PluginError('test', 'something broke', {showStack: true}); - err.plugin.should.equal('test'); - err.message.should.equal('something broke'); - err.showStack.should.equal(true); - done(); - }); - - it('should take arguments as plugin name, error, and one object', function(done){ - var realErr = new Error('something broke'); - var err = new util.PluginError('test', realErr, {showStack: true}); - err.plugin.should.equal('test'); - err.message.should.equal('something broke'); - err.showStack.should.equal(true); - done(); - }); - -}); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/test/beep.js b/node_modules/gulp-sass/node_modules/gulp-util/test/beep.js deleted file mode 100644 index e3e71073..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/test/beep.js +++ /dev/null @@ -1,23 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('beep()', function(){ - it('should send the right code to stdout', function(done){ - var writtenValue; - - // Stub process.stdout.write - var stdout_write = process.stdout.write; - process.stdout.write = function(value) { - writtenValue = value; - }; - - util.beep(); - writtenValue.should.equal('\x07'); - - // Restore process.stdout.write - process.stdout.write = stdout_write; - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/test/buffer.js b/node_modules/gulp-sass/node_modules/gulp-util/test/buffer.js deleted file mode 100644 index 6b4de67f..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/test/buffer.js +++ /dev/null @@ -1,36 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -var es = require('event-stream'); -require('mocha'); - -describe('buffer()', function(){ - it('should buffer stuff and return an array into the callback', function(done){ - var src = [1,2,3]; - var inp = es.readArray(src); - inp.pipe(util.buffer(function(err, data){ - should.not.exist(err); - should.exist(data); - data.should.eql(src); - done(); - })); - }); - it('should buffer stuff and emit it as a data event', function(done){ - var src = [1,2,3]; - var inp = es.readArray(src); - inp.pipe(util.buffer()).on('data', function(data){ - should.exist(data); - data.should.eql(src); - done(); - }); - }); - it('should buffer stuff and return a stream with the buffered data', function(done){ - var src = [1,2,3]; - var inp = es.readArray(src); - inp.pipe(util.buffer()).pipe(es.through(function(data) { - should.exist(data); - data.should.eql(src); - done(); - })); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/test/colors.js b/node_modules/gulp-sass/node_modules/gulp-util/test/colors.js deleted file mode 100644 index 970367e2..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/test/colors.js +++ /dev/null @@ -1,11 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('colors', function(){ - it('should be a chalk instance', function(done){ - util.colors.should.equal(require('chalk')); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/test/combine.js b/node_modules/gulp-sass/node_modules/gulp-util/test/combine.js deleted file mode 100644 index a54f0012..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/test/combine.js +++ /dev/null @@ -1,38 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -var es = require('event-stream'); -var Stream = require('stream'); -require('mocha'); - -describe('combine()', function(){ - it('should return a function', function(done){ - var src = [1,2,3]; - var inp = es.readArray(src); - var factory = util.combine(inp); - factory.should.be.type('function'); - done(); - }); - it('should return a function that returns a stream combination', function(done){ - var src = [1,2,3]; - var inp = es.readArray(src); - var inp2 = es.writeArray(function(err, data){ - should.not.exist(err); - data.should.eql(src); - done(); - }); - var factory = util.combine(inp, inp2); - factory().should.be.instanceof(Stream); - }); - it('should return a function that returns a stream combination when given an array', function(done){ - var src = [1,2,3]; - var inp = es.readArray(src); - var inp2 = es.writeArray(function(err, data){ - should.not.exist(err); - data.should.eql(src); - done(); - }); - var factory = util.combine([inp, inp2]); - factory().should.be.instanceof(Stream); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/test/date.js b/node_modules/gulp-sass/node_modules/gulp-util/test/date.js deleted file mode 100644 index 21f52ee9..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/test/date.js +++ /dev/null @@ -1,17 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('date', function() { - it('should be a date format instance', function(done) { - util.date.should.equal(require('dateformat')); - done(); - }); - it('should return today\'s date', function(done) { - var time = new Date(); - var dateutil = util.date('HH:MM:ss'); - dateutil.should.equal(('0' + time.getHours()).slice(-2) + ':' + ('0' + time.getMinutes()).slice(-2) + ':' + ('0' + time.getSeconds()).slice(-2)); - done(); - }) -}); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/test/env.js b/node_modules/gulp-sass/node_modules/gulp-util/test/env.js deleted file mode 100644 index d3942940..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/test/env.js +++ /dev/null @@ -1,12 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('env', function(){ - it('should exist', function(done){ - should.exist(util.env); - should.exist(util.env._); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/test/isBuffer.js b/node_modules/gulp-sass/node_modules/gulp-util/test/isBuffer.js deleted file mode 100644 index ad09bbf5..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/test/isBuffer.js +++ /dev/null @@ -1,16 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -var through = require('through2'); -require('mocha'); - -describe('isBuffer()', function(){ - it('should work on a buffer', function(done){ - util.isBuffer(new Buffer('huh')).should.equal(true); - done(); - }); - it('should not work on a stream', function(done){ - util.isBuffer(through()).should.equal(false); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/test/isNull.js b/node_modules/gulp-sass/node_modules/gulp-util/test/isNull.js deleted file mode 100644 index 841fc46b..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/test/isNull.js +++ /dev/null @@ -1,20 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -var through = require('through2'); -require('mocha'); - -describe('isNull()', function(){ - it('should work on a null', function(done){ - util.isNull(null).should.equal(true); - done(); - }); - it('should not work on a stream', function(done){ - util.isNull(through()).should.equal(false); - done(); - }); - it('should not work on undefined', function(done){ - util.isNull(undefined).should.equal(false); - done(); - }); -}); diff --git a/node_modules/gulp-sass/node_modules/gulp-util/test/isStream.js b/node_modules/gulp-sass/node_modules/gulp-util/test/isStream.js deleted file mode 100644 index 3935324b..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/test/isStream.js +++ /dev/null @@ -1,16 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -var through = require('through2'); -require('mocha'); - -describe('isStream()', function(){ - it('should work on a stream', function(done){ - util.isStream(through()).should.equal(true); - done(); - }); - it('should not work on a buffer', function(done){ - util.isStream(new Buffer('huh')).should.equal(false); - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/test/linefeed.js b/node_modules/gulp-sass/node_modules/gulp-util/test/linefeed.js deleted file mode 100644 index 72f61ca0..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/test/linefeed.js +++ /dev/null @@ -1,5 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - diff --git a/node_modules/gulp-sass/node_modules/gulp-util/test/log.js b/node_modules/gulp-sass/node_modules/gulp-util/test/log.js deleted file mode 100644 index 71c6417a..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/test/log.js +++ /dev/null @@ -1,23 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('log()', function(){ - it('should work i guess', function(done){ - var writtenValue; - - // Stub process.stdout.write - var stdout_write = process.stdout.write; - process.stdout.write = function(value) { - writtenValue = value; - }; - - util.log(1, 2, 3, 4, 'five'); - writtenValue.should.eql('['+util.colors.green('gulp')+'] 1 2 3 4 five\n'); - - // Restore process.stdout.write - process.stdout.write = stdout_write; - done(); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/test/noop.js b/node_modules/gulp-sass/node_modules/gulp-util/test/noop.js deleted file mode 100644 index 0d75b35c..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/test/noop.js +++ /dev/null @@ -1,24 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -var es = require('event-stream'); -require('mocha'); - -describe('noop()', function(){ - it('should return a stream', function(done){ - util.isStream(util.noop()).should.equal(true); - done(); - }); - it('should return a stream that passes through all data', function(done){ - var inp = [1,2,3,4,5,6,7,8,9]; - var stream = util.noop(); - es.readArray(inp) - .pipe(stream) - .pipe(es.writeArray(function(err, arr){ - should.not.exist(err); - should.exist(arr); - arr.should.eql(inp); - done(); - })); - }); -}); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/test/replaceExtension.js b/node_modules/gulp-sass/node_modules/gulp-util/test/replaceExtension.js deleted file mode 100644 index b9c65662..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/test/replaceExtension.js +++ /dev/null @@ -1,34 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('replaceExtension()', function() { - it('should return a valid replaced extension on nested', function(done) { - var fname = path.join(__dirname, './fixtures/test.coffee'); - var expected = path.join(__dirname, './fixtures/test.js'); - var nu = util.replaceExtension(fname, '.js'); - should.exist(nu); - nu.should.equal(expected); - done(); - }); - - it('should return a valid replaced extension on flat', function(done) { - var fname = 'test.coffee'; - var expected = 'test.js'; - var nu = util.replaceExtension(fname, '.js'); - should.exist(nu); - nu.should.equal(expected); - done(); - }); - - it('should not return a valid replaced extension on empty string', function(done) { - var fname = ''; - var expected = ''; - var nu = util.replaceExtension(fname, '.js'); - should.exist(nu); - nu.should.equal(expected); - done(); - }); - -}); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/gulp-util/test/template.js b/node_modules/gulp-sass/node_modules/gulp-util/test/template.js deleted file mode 100644 index 7664620a..00000000 --- a/node_modules/gulp-sass/node_modules/gulp-util/test/template.js +++ /dev/null @@ -1,99 +0,0 @@ -var util = require('../'); -var should = require('should'); -var path = require('path'); -require('mocha'); - -describe('template()', function(){ - it('should work with just a template', function(done){ - var opt = { - name:'todd', - file: { - path: 'hi.js' - } - }; - var expected = 'test todd hi.js'; - - var tmpl = util.template('test <%= name %> <%= file.path %>'); - should.exist(tmpl); - 'function'.should.equal(typeof(tmpl)); - - // eval it now - var etmpl = tmpl(opt); - 'string'.should.equal(typeof(etmpl)); - etmpl.should.equal(expected); - done(); - }); - - it('should work with a template and data', function(done){ - var opt = { - name:'todd', - file: { - path: 'hi.js' - } - }; - var expected = 'test todd hi.js'; - var tmpl = util.template('test <%= name %> <%= file.path %>', opt); - should.exist(tmpl); - 'string'.should.equal(typeof(tmpl)); - tmpl.should.equal(expected); - done(); - }); - - it('should throw an error when no file object is passed', function(done){ - var opt = { - name:'todd' - }; - try { - var tmpl = util.template('test <%= name %> <%= file.path %>', opt); - } catch (err) { - should.exist(err); - done(); - } - }); - - it('should ignore modified templateSettings', function(done){ - var templateSettings = require('lodash.templatesettings'); - templateSettings.interpolate = /\{\{([\s\S]+?)\}\}/g; - - var opt = { - name:'todd', - file: { - path: 'hi.js' - } - }; - var expected = 'test {{name}} hi.js'; - - var tmpl = util.template('test {{name}} <%= file.path %>'); - should.exist(tmpl); - 'function'.should.equal(typeof(tmpl)); - - // eval it now - var etmpl = tmpl(opt); - 'string'.should.equal(typeof(etmpl)); - etmpl.should.equal(expected); - - done(); - }); - - it('should allow ES6 delimiters', function(done){ - var opt = { - name:'todd', - file: { - path: 'hi.js' - } - }; - var expected = 'test todd hi.js'; - - var tmpl = util.template('test ${name} ${file.path}'); - should.exist(tmpl); - 'function'.should.equal(typeof(tmpl)); - - // eval it now - var etmpl = tmpl(opt); - 'string'.should.equal(typeof(etmpl)); - etmpl.should.equal(expected); - - done(); - }); - -}); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/map-stream/.npmignore b/node_modules/gulp-sass/node_modules/map-stream/.npmignore deleted file mode 100644 index 13abef4f..00000000 --- a/node_modules/gulp-sass/node_modules/map-stream/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -node_modules/* -npm_debug.log diff --git a/node_modules/gulp-sass/node_modules/map-stream/.travis.yml b/node_modules/gulp-sass/node_modules/map-stream/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/gulp-sass/node_modules/map-stream/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/gulp-sass/node_modules/map-stream/LICENCE b/node_modules/gulp-sass/node_modules/map-stream/LICENCE deleted file mode 100644 index 171dd970..00000000 --- a/node_modules/gulp-sass/node_modules/map-stream/LICENCE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2011 Dominic Tarr - -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. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/map-stream/examples/pretty.js b/node_modules/gulp-sass/node_modules/map-stream/examples/pretty.js deleted file mode 100644 index ab073987..00000000 --- a/node_modules/gulp-sass/node_modules/map-stream/examples/pretty.js +++ /dev/null @@ -1,26 +0,0 @@ - -var inspect = require('util').inspect - -if(!module.parent) { - var map = require('..') //load map-stream - var es = require('event-stream') //load event-stream - es.pipe( //pipe joins streams together - process.openStdin(), //open stdin - es.split(), //split stream to break on newlines - map(function (data, callback) { //turn this async function into a stream - var j - try { - j = JSON.parse(data) //try to parse input into json - } catch (err) { - return callback(null, data) //if it fails just pass it anyway - } - callback(null, inspect(j)) //render it nicely - }), - process.stdout // pipe it to stdout ! - ) - } - -// run this -// -// curl -sS registry.npmjs.org/event-stream | node pretty.js -// diff --git a/node_modules/gulp-sass/node_modules/map-stream/index.js b/node_modules/gulp-sass/node_modules/map-stream/index.js deleted file mode 100644 index 09ae829d..00000000 --- a/node_modules/gulp-sass/node_modules/map-stream/index.js +++ /dev/null @@ -1,145 +0,0 @@ -//filter will reemit the data if cb(err,pass) pass is truthy - -// reduce is more tricky -// maybe we want to group the reductions or emit progress updates occasionally -// the most basic reduce just emits one 'data' event after it has recieved 'end' - - -var Stream = require('stream').Stream - - -//create an event stream and apply function to each .write -//emitting each response as data -//unless it's an empty callback - -module.exports = function (mapper, opts) { - - var stream = new Stream() - , self = this - , inputs = 0 - , outputs = 0 - , ended = false - , paused = false - , destroyed = false - , lastWritten = 0 - , inNext = false - - this.opts = opts || {}; - var errorEventName = this.opts.failures ? 'failure' : 'error'; - - // Items that are not ready to be written yet (because they would come out of - // order) get stuck in a queue for later. - var writeQueue = {} - - stream.writable = true - stream.readable = true - - function queueData (data, number) { - var nextToWrite = lastWritten + 1 - - if (number === nextToWrite) { - // If it's next, and its not undefined write it - if (data !== undefined) { - stream.emit.apply(stream, ['data', data]) - } - lastWritten ++ - nextToWrite ++ - } else { - // Otherwise queue it for later. - writeQueue[number] = data - } - - // If the next value is in the queue, write it - if (writeQueue.hasOwnProperty(nextToWrite)) { - var dataToWrite = writeQueue[nextToWrite] - delete writeQueue[nextToWrite] - return queueData(dataToWrite, nextToWrite) - } - - outputs ++ - if(inputs === outputs) { - if(paused) paused = false, stream.emit('drain') //written all the incoming events - if(ended) end() - } - } - - function next (err, data, number) { - if(destroyed) return - inNext = true - - if (!err || self.opts.failures) { - queueData(data, number) - } - - if (err) { - stream.emit.apply(stream, [ errorEventName, err ]); - } - - inNext = false; - } - - // Wrap the mapper function by calling its callback with the order number of - // the item in the stream. - function wrappedMapper (input, number, callback) { - return mapper.call(null, input, function(err, data){ - callback(err, data, number) - }) - } - - stream.write = function (data) { - if(ended) throw new Error('map stream is not writable') - inNext = false - inputs ++ - - try { - //catch sync errors and handle them like async errors - var written = wrappedMapper(data, inputs, next) - paused = (written === false) - return !paused - } catch (err) { - //if the callback has been called syncronously, and the error - //has occured in an listener, throw it again. - if(inNext) - throw err - next(err) - return !paused - } - } - - function end (data) { - //if end was called with args, write it, - ended = true //write will emit 'end' if ended is true - stream.writable = false - if(data !== undefined) { - return queueData(data, inputs) - } else if (inputs == outputs) { //wait for processing - stream.readable = false, stream.emit('end'), stream.destroy() - } - } - - stream.end = function (data) { - if(ended) return - end() - } - - stream.destroy = function () { - ended = destroyed = true - stream.writable = stream.readable = paused = false - process.nextTick(function () { - stream.emit('close') - }) - } - stream.pause = function () { - paused = true - } - - stream.resume = function () { - paused = false - } - - return stream -} - - - - diff --git a/node_modules/gulp-sass/node_modules/map-stream/package.json b/node_modules/gulp-sass/node_modules/map-stream/package.json deleted file mode 100644 index e9c4ee04..00000000 --- a/node_modules/gulp-sass/node_modules/map-stream/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "map-stream", - "version": "0.1.0", - "description": "construct pipes of streams of events", - "homepage": "http://github.com/dominictarr/map-stream", - "repository": { - "type": "git", - "url": "git://github.com/dominictarr/map-stream.git" - }, - "dependencies": {}, - "devDependencies": { - "asynct": "*", - "it-is": "1", - "ubelt": "~2.9", - "stream-spec": "~0.2", - "event-stream": "~2.1", - "from": "0.0.2" - }, - "scripts": { - "test": "asynct test/" - }, - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "http://dominictarr.com" - }, - "readme": "# MapStream\n\nRefactored out of [event-stream](https://github.com/dominictarr/event-stream)\n\n##map (asyncFunction[, options])\n\nCreate a through stream from an asyncronous function. \n\n``` js\nvar map = require('map-stream')\n\nmap(function (data, callback) {\n //transform data\n // ...\n callback(null, data)\n})\n\n```\n\nEach map MUST call the callback. It may callback with data, with an error or with no arguments, \n\n * `callback()` drop this data. \n this makes the map work like `filter`, \n note:`callback(null,null)` is not the same, and will emit `null`\n\n * `callback(null, newData)` turn data into newData\n \n * `callback(error)` emit an error for this item.\n\n>Note: if a callback is not called, `map` will think that it is still being processed, \n>every call must be answered or the stream will not know when to end. \n>\n>Also, if the callback is called more than once, every call but the first will be ignored.\n\n##Options \n\n * `failures` - `boolean` continue mapping even if error occured. On error `map-stream` will emit `failure` event. (default: `false`)\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/dominictarr/map-stream/issues" - }, - "_id": "map-stream@0.1.0", - "_from": "map-stream@~0.1.0" -} diff --git a/node_modules/gulp-sass/node_modules/map-stream/readme.markdown b/node_modules/gulp-sass/node_modules/map-stream/readme.markdown deleted file mode 100644 index 18971588..00000000 --- a/node_modules/gulp-sass/node_modules/map-stream/readme.markdown +++ /dev/null @@ -1,37 +0,0 @@ -# MapStream - -Refactored out of [event-stream](https://github.com/dominictarr/event-stream) - -##map (asyncFunction[, options]) - -Create a through stream from an asyncronous function. - -``` js -var map = require('map-stream') - -map(function (data, callback) { - //transform data - // ... - callback(null, data) -}) - -``` - -Each map MUST call the callback. It may callback with data, with an error or with no arguments, - - * `callback()` drop this data. - this makes the map work like `filter`, - note:`callback(null,null)` is not the same, and will emit `null` - - * `callback(null, newData)` turn data into newData - - * `callback(error)` emit an error for this item. - ->Note: if a callback is not called, `map` will think that it is still being processed, ->every call must be answered or the stream will not know when to end. -> ->Also, if the callback is called more than once, every call but the first will be ignored. - -##Options - - * `failures` - `boolean` continue mapping even if error occured. On error `map-stream` will emit `failure` event. (default: `false`) diff --git a/node_modules/gulp-sass/node_modules/map-stream/test/simple-map.asynct.js b/node_modules/gulp-sass/node_modules/map-stream/test/simple-map.asynct.js deleted file mode 100644 index 2b9a2922..00000000 --- a/node_modules/gulp-sass/node_modules/map-stream/test/simple-map.asynct.js +++ /dev/null @@ -1,318 +0,0 @@ -'use strict'; - -var map = require('../') - , it = require('it-is') - , u = require('ubelt') - , spec = require('stream-spec') - , from = require('from') - , Stream = require('stream') - , es = require('event-stream') - -//REFACTOR THIS TEST TO USE es.readArray and es.writeArray - -function writeArray(array, stream) { - - array.forEach( function (j) { - stream.write(j) - }) - stream.end() - -} - -function readStream(stream, done) { - - var array = [] - stream.on('data', function (data) { - array.push(data) - }) - stream.on('error', done) - stream.on('end', function (data) { - done(null, array) - }) - -} - -//call sink on each write, -//and complete when finished. - -function pauseStream (prob, delay) { - var pauseIf = ( - 'number' == typeof prob - ? function () { - return Math.random() < prob - } - : 'function' == typeof prob - ? prob - : 0.1 - ) - var delayer = ( - !delay - ? process.nextTick - : 'number' == typeof delay - ? function (next) { setTimeout(next, delay) } - : delay - ) - - return es.through(function (data) { - if(!this.paused && pauseIf()) { - console.log('PAUSE STREAM PAUSING') - this.pause() - var self = this - delayer(function () { - console.log('PAUSE STREAM RESUMING') - self.resume() - }) - } - console.log("emit ('data', " + data + ')') - this.emit('data', data) - }) -} - -exports ['simple map applied to a stream'] = function (test) { - - var input = [1,2,3,7,5,3,1,9,0,2,4,6] - //create event stream from - - var doubler = map(function (data, cb) { - cb(null, data * 2) - }) - - spec(doubler).through().validateOnExit() - - //a map is only a middle man, so it is both readable and writable - - it(doubler).has({ - readable: true, - writable: true, - }) - - readStream(doubler, function (err, output) { - it(output).deepEqual(input.map(function (j) { - return j * 2 - })) -// process.nextTick(x.validate) - test.done() - }) - - writeArray(input, doubler) - -} - -exports ['stream comes back in the correct order'] = function (test) { - var input = [3, 2, 1] - - var delayer = map(function(data, cb){ - setTimeout(function () { - cb(null, data) - }, 100 * data) - }) - - readStream(delayer, function (err, output) { - it(output).deepEqual(input) - test.done() - }) - - writeArray(input, delayer) -} - -exports ['continues on error event with failures `true`'] = function (test) { - var input = [1, 2, 3] - - var delayer = map(function(data, cb){ - cb(new Error('Something gone wrong'), data) - }, { failures: true }) - - readStream(delayer, function (err, output) { - it(output).deepEqual(input) - test.done() - }) - - writeArray(input, delayer) -} - -exports['pipe two maps together'] = function (test) { - - var input = [1,2,3,7,5,3,1,9,0,2,4,6] - //create event stream from - function dd (data, cb) { - cb(null, data * 2) - } - var doubler1 = map(dd), doubler2 = map(dd) - - doubler1.pipe(doubler2) - - spec(doubler1).through().validateOnExit() - spec(doubler2).through().validateOnExit() - - readStream(doubler2, function (err, output) { - it(output).deepEqual(input.map(function (j) { - return j * 4 - })) - test.done() - }) - - writeArray(input, doubler1) - -} - -//next: -// -// test pause, resume and drian. -// - -// then make a pipe joiner: -// -// plumber (evStr1, evStr2, evStr3, evStr4, evStr5) -// -// will return a single stream that write goes to the first - -exports ['map will not call end until the callback'] = function (test) { - - var ticker = map(function (data, cb) { - process.nextTick(function () { - cb(null, data * 2) - }) - }) - - spec(ticker).through().validateOnExit() - - ticker.write('x') - ticker.end() - - ticker.on('end', function () { - test.done() - }) -} - -exports ['emit failures with opts.failures === `ture`'] = function (test) { - - var err = new Error('INTENSIONAL ERROR') - , mapper = - map(function () { - throw err - }, { failures: true }) - - mapper.on('failure', function (_err) { - it(_err).equal(err) - test.done() - }) - - mapper.write('hello') - -} - -exports ['emit error thrown'] = function (test) { - - var err = new Error('INTENSIONAL ERROR') - , mapper = - map(function () { - throw err - }) - - mapper.on('error', function (_err) { - it(_err).equal(err) - test.done() - }) - - mapper.write('hello') - -} - -exports ['emit error calledback'] = function (test) { - - var err = new Error('INTENSIONAL ERROR') - , mapper = - map(function (data, callback) { - callback(err) - }) - - mapper.on('error', function (_err) { - it(_err).equal(err) - test.done() - }) - - mapper.write('hello') - -} - -exports ['do not emit drain if not paused'] = function (test) { - - var maps = map(function (data, callback) { - u.delay(callback)(null, 1) - return true - }) - - spec(maps).through().pausable().validateOnExit() - - maps.on('drain', function () { - it(false).ok('should not emit drain unless the stream is paused') - }) - - it(maps.write('hello')).equal(true) - it(maps.write('hello')).equal(true) - it(maps.write('hello')).equal(true) - setTimeout(function () {maps.end()},10) - maps.on('end', test.done) -} - -exports ['emits drain if paused, when all '] = function (test) { - var active = 0 - var drained = false - var maps = map(function (data, callback) { - active ++ - u.delay(function () { - active -- - callback(null, 1) - })() - console.log('WRITE', false) - return false - }) - - spec(maps).through().validateOnExit() - - maps.on('drain', function () { - drained = true - it(active).equal(0, 'should emit drain when all maps are done') - }) - - it(maps.write('hello')).equal(false) - it(maps.write('hello')).equal(false) - it(maps.write('hello')).equal(false) - - process.nextTick(function () {maps.end()},10) - - maps.on('end', function () { - console.log('end') - it(drained).ok('shoud have emitted drain before end') - test.done() - }) - -} - -exports ['map applied to a stream with filtering'] = function (test) { - - var input = [1,2,3,7,5,3,1,9,0,2,4,6] - - var doubler = map(function (data, callback) { - if (data % 2) - callback(null, data * 2) - else - callback() - }) - - readStream(doubler, function (err, output) { - it(output).deepEqual(input.filter(function (j) { - return j % 2 - }).map(function (j) { - return j * 2 - })) - test.done() - }) - - spec(doubler).through().validateOnExit() - - writeArray(input, doubler) - -} - - diff --git a/node_modules/gulp-sass/node_modules/node-sass/.editorconfig b/node_modules/gulp-sass/node_modules/node-sass/.editorconfig deleted file mode 100644 index 833f2619..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/.editorconfig +++ /dev/null @@ -1,11 +0,0 @@ -# This file is for unifying the coding style for different editors and IDEs -# editorconfig.org - -root = true - -[*] -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = spaces -indent_size = 2 diff --git a/node_modules/gulp-sass/node_modules/node-sass/.gitmodules b/node_modules/gulp-sass/node_modules/node-sass/.gitmodules deleted file mode 100644 index 220dfd9a..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "libsass"] - path = libsass - url = git://github.com/hcatlin/libsass.git diff --git a/node_modules/gulp-sass/node_modules/node-sass/.jshintignore b/node_modules/gulp-sass/node_modules/node-sass/.jshintignore deleted file mode 100644 index 40b878db..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/.jshintignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/.jshintrc b/node_modules/gulp-sass/node_modules/node-sass/.jshintrc deleted file mode 100644 index 86a65de0..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/.jshintrc +++ /dev/null @@ -1,15 +0,0 @@ -{ - "node": true, - "laxbreak": true, - "indent": 2, - "curly": true, - "trailing": true, - "undef": true, - "unused": true, - "expr":true, - "multistr": true, - "globals": { - "it": true, - "describe": true - } -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/.npmignore b/node_modules/gulp-sass/node_modules/node-sass/.npmignore deleted file mode 100644 index 378eac25..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/.npmignore +++ /dev/null @@ -1 +0,0 @@ -build diff --git a/node_modules/gulp-sass/node_modules/node-sass/.travis.yml b/node_modules/gulp-sass/node_modules/node-sass/.travis.yml deleted file mode 100644 index 4cee5402..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - 0.10 \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/CONTRIBUTING.md b/node_modules/gulp-sass/node_modules/node-sass/CONTRIBUTING.md deleted file mode 100644 index fbaac347..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/CONTRIBUTING.md +++ /dev/null @@ -1,6 +0,0 @@ -## Contributing - * Fork the project. - * Make your feature addition or bug fix. - * Add documentation if necessary. - * Add tests for it. This is important so I don't break it in a future version unintentionally. - * Send a pull request. Bonus points for topic branches. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/LICENSE b/node_modules/gulp-sass/node_modules/node-sass/LICENSE deleted file mode 100644 index 7fd5270c..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013 Andrew Nesbitt - -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. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/README.md b/node_modules/gulp-sass/node_modules/node-sass/README.md deleted file mode 100644 index ef40919e..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/README.md +++ /dev/null @@ -1,189 +0,0 @@ -##node-sass - -[![Build Status](https://secure.travis-ci.org/andrew/node-sass.png?branch=master)](https://travis-ci.org/andrew/node-sass) - -Node-sass is a library that provides binding for Node.js to [libsass](https://github.com/hcatlin/libsass), the C version of the popular stylesheet preprocessor, Sass. - -It allows you to natively compile .scss files to css at incredible speed and automatically via a connect middleware. - -Find it on npm: <https://npmjs.org/package/node-sass> - -## Install - - npm install node-sass - -## Usage - -```javascript -var sass = require('node-sass'); -sass.render({ - file: scss_filename, - success: callback - [, options..] - }); -// OR -var css = sass.renderSync({ - data: scss_content - [, options..] -}); -``` - -### Options - -The API for using node-sass has changed, so that now there is only one variable - an options hash. Some of these options are optional, and in some circumstances some are mandatory. - -#### file -`file` is a `String` of the path to an `scss` file for libsass to render. One of this or `data` options are required, for both render and renderSync. - -#### data -`data` is a `String` containing the scss to be rendered by libsass. One of this or `file` options are required, for both render and renderSync. It is recommended that you use the `includePaths` option in conjunction with this, as otherwise libsass may have trouble finding files imported via the `@import` directive. - -#### success -`success` is a `Function` to be called upon successful rendering of the scss to css. This option is required but only for the render function. If provided to renderSync it will be ignored. - -#### error -`error` is a `Function` to be called upon occurance of an error when rendering the scss to css. This option is optional, and only applies to the render function. If provided to renderSync it will be ignored. - -#### includePaths -`includePaths` is an `Array` of path `String`s to look for any `@import`ed files. It is recommended that you use this option if you are using the `data` option and have **any** `@import` directives, as otherwise libsass may not find your depended-on files. - -#### outputStyle -`outputStyle` is a `String` to determine how the final CSS should be rendered. Its value should be one of `'nested', 'expanded', 'compact', 'compressed'`. -[Important: currently the argument `outputStyle` has some problem which may cause the output css becomes nothing because of the libsass, so you should not use it now!] - -#### sourceComments -`sourceComments` is a `String` to determine what debug information is included in the output file. Its value should be one of `'none', 'normal', 'map'`. The default is `'none'`. -The `map` option will create the source map file in your CSS destination. -[Important: `souceComments` is only supported when using the `file` option, and does nothing when using `data` flag.] - -#### sourceMap -If your `sourceComments` option is set to `map`, `sourceMap` allows setting a new path context for the referenced Sass files. -The source map describes a path from your CSS file location, into the the folder where the Sass files are located. In most occasions this will work out-of-the-box but, in some cases, you may need to set a different output. - -### Examples - -```javascript -var sass = require('node-sass'); -sass.render({ - data: 'body{background:blue; a{color:black;}}', - success: function(css){ - console.log(css) - }, - error: function(error) { - console.log(error); - }, - includePaths: [ 'lib/', 'mod/' ], - outputStyle: 'compressed' -}); -// OR -console.log(sass.renderSync({ - data: 'body{background:blue; a{color:black;}}'), - outputStyle: 'compressed' -}); -``` - -### Edge-case behaviours - -* In the case that both `file` and `data` options are set, node-sass will only attempt to honour the `file` directive. - -## Connect/Express middleware - -Recompile `.scss` files automatically for connect and express based http servers - -```javascript -var server = connect.createServer( - sass.middleware({ - src: __dirname - , dest: __dirname + '/public' - , debug: true - , outputStyle: 'compressed' - , prefix: '/prefix' - }), - connect.static('/prefix', __dirname + '/public') -); -``` - -Heavily inspired by <https://github.com/LearnBoost/stylus> - -## DocPad Plugin - -[@jking90](https://github.com/jking90) wrote a [DocPad](http://docpad.org/) plugin that compiles `.scss` files using node-sass: <https://github.com/jking90/docpad-plugin-nodesass> - -## Grunt extension - -[@sindresorhus](https://github.com/sindresorhus/) has created a set of grunt tasks based on node-sass: <https://github.com/sindresorhus/grunt-sass> - -## Gulp extension - -[@dlmanning](https://github.com/dlmanning/) has created a gulp sass plugin based on node-sass: <https://github.com/dlmanning/gulp-sass> - -## Harp - -[@sintaxi](https://github.com/sintaxi)’s Harp web server implicitly compiles `.scss` files using node-sass: <https://github.com/sintaxi/harp> - -## Example App - -There is also an example connect app here: <https://github.com/andrew/node-sass-example> - -## Rebuilding binaries - -Node-sass includes pre-compiled binaries for popular platforms, to add a binary for your platform follow these steps: - -Check out the project: - - git clone https://github.com/andrew/node-sass.git - cd node-sass - git submodule init - git submodule update - npm install - npm install -g node-gyp - node-gyp rebuild - -Replace the prebuild binary with your newly generated one - - cp build/Release/binding.node precompiled/*your-platform*/binding.node - -## Command Line Interface - -The interface for command-line usage is fairly simplistic at this stage, as seen in the following usage section. - -Output will be saved with the same name as input SASS file into the current working directory if it's omitted. - -### Usage - `node-sass [options] <input.scss> [<output.css>]` - - **Options:** - - --output-style CSS output style (nested|expanded|compact|compressed) [default: "nested"] - --source-comments Include debug info in output (none|normal|map) [default: "none"] - --include-path Path to look for @import-ed files [default: cwd] - --help, -h Print usage info - -## Post-install Build - -Install runs a series of Mocha tests to see if your machine can use the pre-built `libsass` which will save some time during install. If any tests fail it will build from source. - -If you know the pre-built version will work and do not want to wait for the tests to run you can skip the tests by setting the environment variable `SKIP_NODE_SASS_TESTS` to true. - - SKIP_NODE_SASS_TESTS=true npm install - -## Contributors -Special thanks to the following people for submitting patches: - -Dean Mao -Brett Wilkins -litek -gonghao -Dylan Greene - -### Note on Patches/Pull Requests - - * Fork the project. - * Make your feature addition or bug fix. - * Add documentation if necessary. - * Add tests for it. This is important so I don't break it in a future version unintentionally. - * Send a pull request. Bonus points for topic branches. - -## Copyright - -Copyright (c) 2013 Andrew Nesbitt. See [LICENSE](https://github.com/andrew/node-sass/blob/master/LICENSE) for details. diff --git a/node_modules/gulp-sass/node_modules/node-sass/bin/darwin-x64-v8-3.14/binding.node b/node_modules/gulp-sass/node_modules/node-sass/bin/darwin-x64-v8-3.14/binding.node deleted file mode 100755 index 45ebd5ec..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/bin/darwin-x64-v8-3.14/binding.node and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/bin/darwin-x64-v8-3.22/binding.node b/node_modules/gulp-sass/node_modules/node-sass/bin/darwin-x64-v8-3.22/binding.node deleted file mode 100755 index 719684a8..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/bin/darwin-x64-v8-3.22/binding.node and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/bin/linux-ia32-v8-3.14/binding.node b/node_modules/gulp-sass/node_modules/node-sass/bin/linux-ia32-v8-3.14/binding.node deleted file mode 100644 index e0469e7e..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/bin/linux-ia32-v8-3.14/binding.node and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/bin/linux-x64-v8-3.14/binding.node b/node_modules/gulp-sass/node_modules/node-sass/bin/linux-x64-v8-3.14/binding.node deleted file mode 100644 index 3512cd6d..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/bin/linux-x64-v8-3.14/binding.node and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/bin/node-sass b/node_modules/gulp-sass/node_modules/node-sass/bin/node-sass deleted file mode 100755 index a96eb4a6..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/bin/node-sass +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env node - -var cli = require('../lib/cli')(process.argv.slice(2)); - -cli.on('log', function(msg){ - console.log(msg); -}); - -cli.on('error', function(msg){ - console.error(msg); -}); - -cli.on('warn', function(msg){ - console.warn(msg); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/bin/win32-ia32-v8-3.14/binding.node b/node_modules/gulp-sass/node_modules/node-sass/bin/win32-ia32-v8-3.14/binding.node deleted file mode 100644 index 51b25e12..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/bin/win32-ia32-v8-3.14/binding.node and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/bin/win32-x64-v8-3.14/binding.node b/node_modules/gulp-sass/node_modules/node-sass/bin/win32-x64-v8-3.14/binding.node deleted file mode 100644 index 215bb0e9..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/bin/win32-x64-v8-3.14/binding.node and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/binding.cpp b/node_modules/gulp-sass/node_modules/node-sass/binding.cpp deleted file mode 100644 index 20348399..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/binding.cpp +++ /dev/null @@ -1,208 +0,0 @@ -#include <nan.h> -#include <string> -#include <cstring> -#include <iostream> -#include <cstdlib> -#include "sass_context_wrapper.h" - -using namespace v8; -using namespace std; - - -void WorkOnContext(uv_work_t* req) { - sass_context_wrapper* ctx_w = static_cast<sass_context_wrapper*>(req->data); - if (ctx_w->ctx) { - sass_context* ctx = static_cast<sass_context*>(ctx_w->ctx); - sass_compile(ctx); - } else if (ctx_w->fctx) { - sass_file_context* ctx = static_cast<sass_file_context*>(ctx_w->fctx); - sass_compile_file(ctx); - } -} - -void extractOptions(_NAN_METHOD_ARGS, void* cptr, sass_context_wrapper* ctx_w, bool isFile) { - char *source; - char* pathOrData; - int output_style; - int source_comments; - String::AsciiValue astr(args[0]); - - if (ctx_w) { - // async (callback) style - Local<Function> callback = Local<Function>::Cast(args[1]); - Local<Function> errorCallback = Local<Function>::Cast(args[2]); - if (isFile) { - ctx_w->fctx = (sass_file_context*) cptr; - } else { - ctx_w->ctx = (sass_context*) cptr; - } - ctx_w->request.data = ctx_w; - ctx_w->callback = new NanCallback(callback); - ctx_w->errorCallback = new NanCallback(errorCallback); - output_style = args[4]->Int32Value(); - source_comments = args[5]->Int32Value(); - String::AsciiValue bstr(args[3]); - pathOrData = new char[strlen(*bstr)+1]; - strcpy(pathOrData, *bstr); - } else { - // synchronous style - output_style = args[2]->Int32Value(); - source_comments = args[3]->Int32Value(); - String::AsciiValue bstr(args[1]); - pathOrData = new char[strlen(*bstr)+1]; - strcpy(pathOrData, *bstr); - } - - if (isFile) { - sass_file_context *ctx = (sass_file_context*)cptr; - char *filename = new char[strlen(*astr)+1]; - strcpy(filename, *astr); - ctx->input_path = filename; - ctx->options.image_path = new char[0]; - ctx->options.output_style = output_style; - ctx->options.source_comments = source_comments; - ctx->options.include_paths = pathOrData; - if (source_comments == SASS_SOURCE_COMMENTS_MAP) { - String::AsciiValue cstr(args[6]); - ctx->source_map_file = new char[strlen(*cstr)+1]; - strcpy(ctx->source_map_file, *cstr); - } - } else { - sass_context *ctx = (sass_context*)cptr; - source = new char[strlen(*astr)+1]; - strcpy(source, *astr); - ctx->source_string = source; - ctx->options.image_path = new char[0]; - ctx->options.output_style = output_style; - ctx->options.source_comments = source_comments; - ctx->options.include_paths = pathOrData; - } -} - -void MakeCallback(uv_work_t* req) { - NanScope(); - TryCatch try_catch; - sass_context_wrapper* ctx_w = static_cast<sass_context_wrapper*>(req->data); - Handle<Value> val, err; - const unsigned argc = 2; - int error_status = ctx_w->ctx ? ctx_w->ctx->error_status : ctx_w->fctx->error_status; - - if (error_status == 0) { - // if no error, do callback(null, result) - Handle<Value> source_map; - if (ctx_w->fctx && ctx_w->fctx->options.source_comments == SASS_SOURCE_COMMENTS_MAP) { - source_map = String::New(ctx_w->fctx->source_map_string); - } else { - source_map = Null(); - } - - val = ctx_w->ctx ? NanNewLocal(String::New(ctx_w->ctx->output_string)) : NanNewLocal(String::New(ctx_w->fctx->output_string)); - Local<Value> argv[argc] = { - NanNewLocal(val), - NanNewLocal(source_map), - }; - ctx_w->callback->Call(argc, argv); - } else { - // if error, do callback(error) - err = ctx_w->ctx ? NanNewLocal(String::New(ctx_w->ctx->error_message)) : NanNewLocal(String::New(ctx_w->fctx->error_message)); - Local<Value> argv[argc] = { - NanNewLocal(err), - NanNewLocal(Integer::New(error_status)) - }; - ctx_w->errorCallback->Call(argc, argv); - } - if (try_catch.HasCaught()) { - node::FatalException(try_catch); - } - if (ctx_w->ctx) { - delete ctx_w->ctx->source_string; - } else { - delete ctx_w->fctx->input_path; - } - sass_free_context_wrapper(ctx_w); -} - -NAN_METHOD(Render) { - NanScope(); - sass_context* ctx = sass_new_context(); - sass_context_wrapper* ctx_w = sass_new_context_wrapper(); - ctx_w->ctx = ctx; - extractOptions(args, ctx, ctx_w, false); - - int status = uv_queue_work(uv_default_loop(), &ctx_w->request, WorkOnContext, (uv_after_work_cb)MakeCallback); - assert(status == 0); - - NanReturnUndefined(); -} - -NAN_METHOD(RenderSync) { - NanScope(); - sass_context* ctx = sass_new_context(); - extractOptions(args, ctx, NULL, false); - - sass_compile(ctx); - - delete ctx->source_string; - ctx->source_string = NULL; - delete ctx->options.include_paths; - ctx->options.include_paths = NULL; - - if (ctx->error_status == 0) { - Local<Value> output = NanNewLocal(String::New(ctx->output_string)); - sass_free_context(ctx); - NanReturnValue(output); - } - - Local<String> error = String::New(ctx->error_message); - - sass_free_context(ctx); - NanThrowError(error); - NanReturnUndefined(); -} - -NAN_METHOD(RenderFile) { - NanScope(); - sass_file_context* fctx = sass_new_file_context(); - sass_context_wrapper* ctx_w = sass_new_context_wrapper(); - ctx_w->fctx = fctx; - extractOptions(args, fctx, ctx_w, true); - - int status = uv_queue_work(uv_default_loop(), &ctx_w->request, WorkOnContext, (uv_after_work_cb)MakeCallback); - assert(status == 0); - - NanReturnUndefined(); -} - -NAN_METHOD(RenderFileSync) { - NanScope(); - sass_file_context* ctx = sass_new_file_context(); - extractOptions(args, ctx, NULL, true); - - sass_compile_file(ctx); - - delete ctx->input_path; - ctx->input_path = NULL; - delete ctx->options.include_paths; - ctx->options.include_paths = NULL; - - if (ctx->error_status == 0) { - Local<Value> output = NanNewLocal(String::New(ctx->output_string)); - sass_free_file_context(ctx); - - NanReturnValue(output); - } - Local<String> error = String::New(ctx->error_message); - sass_free_file_context(ctx); - - NanThrowError(error); - NanReturnUndefined(); -} - -void RegisterModule(v8::Handle<v8::Object> target) { - NODE_SET_METHOD(target, "render", Render); - NODE_SET_METHOD(target, "renderSync", RenderSync); - NODE_SET_METHOD(target, "renderFile", RenderFile); - NODE_SET_METHOD(target, "renderFileSync", RenderFileSync); -} - -NODE_MODULE(binding, RegisterModule); diff --git a/node_modules/gulp-sass/node_modules/node-sass/binding.gyp b/node_modules/gulp-sass/node_modules/node-sass/binding.gyp deleted file mode 100644 index abb1852d..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/binding.gyp +++ /dev/null @@ -1,59 +0,0 @@ -{ - 'targets': [ - { - 'target_name': 'binding', - 'sources': [ - 'binding.cpp', - 'sass_context_wrapper.cpp', - 'libsass/ast.cpp', - 'libsass/base64vlq.cpp', - 'libsass/bind.cpp', - 'libsass/constants.cpp', - 'libsass/context.cpp', - 'libsass/contextualize.cpp', - 'libsass/copy_c_str.cpp', - 'libsass/error_handling.cpp', - 'libsass/eval.cpp', - 'libsass/expand.cpp', - 'libsass/extend.cpp', - 'libsass/file.cpp', - 'libsass/functions.cpp', - 'libsass/inspect.cpp', - 'libsass/output_compressed.cpp', - 'libsass/output_nested.cpp', - 'libsass/parser.cpp', - 'libsass/prelexer.cpp', - 'libsass/sass.cpp', - 'libsass/sass_interface.cpp', - 'libsass/source_map.cpp', - 'libsass/to_c.cpp', - 'libsass/to_string.cpp', - 'libsass/units.cpp' - ], - 'include_dirs': [ - '<!(node -e "require(\'nan\')")' - ], - 'cflags!' : [ '-fno-exceptions' ], - 'cflags_cc!': [ '-fno-exceptions' ], - 'cflags_cc' : [ '-fexceptions', '-frtti' ], - 'conditions': [ - ['OS=="mac"', { - 'xcode_settings': { - 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', - 'GCC_ENABLE_CPP_RTTI': 'YES', - 'MACOSX_DEPLOYMENT_TARGET': '10.7' - } - }], - ['OS=="win"', { - 'msvs_settings': { - 'VCCLCompilerTool': { - 'AdditionalOptions': [ - '/GR' - ] - } - } - }] - ] - } - ] -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/build.js b/node_modules/gulp-sass/node_modules/node-sass/build.js deleted file mode 100644 index b274c285..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build.js +++ /dev/null @@ -1,101 +0,0 @@ -#!/usr/bin/env node -var cp = require('child_process'), - fs = require('fs'), - path = require('path'), - Mocha = require('mocha'); - -// Parse args -var force = false, debug = false; - -var arch = process.arch, - platform = process.platform, - v8 = /[0-9]+\.[0-9]+/.exec(process.versions.v8)[0]; - -var args = process.argv.slice(2).filter(function(arg) { - if (arg === '-f') { - force = true; - return false; - } else if (arg.substring(0, 13) === '--target_arch') { - arch = arg.substring(14); - } else if (arg === '--debug') { - debug = true; - } - return true; -}); -if (!{ia32: true, x64: true, arm: true}.hasOwnProperty(arch)) { - console.error('Unsupported (?) architecture: `'+ arch+ '`'); - process.exit(1); -} - -// Test for pre-built library -var modPath = platform + '-' + arch + '-v8-' + v8; -if (!force && !process.env.SKIP_NODE_SASS_TESTS) { - try { - fs.statSync(path.join(__dirname, 'bin', modPath, 'binding.node')); - console.log('`'+ modPath+ '` exists; testing'); - - var mocha = new Mocha({ - reporter: 'dot', - ui: 'bdd', - timeout: 999999 - }); - - mocha.addFile(path.resolve(__dirname, "test", "test.js")); - - mocha.run(function (done) { - if (done !== 0) { - console.log('Problem with the binary; manual build incoming'); - console.log('Please consider contributing the release binary to https://github.com/andrew/node-sass-binaries for npm distribution.'); - build(); - } else { - console.log('Binary is fine; exiting'); - } - }); - } catch (ex) { - // Stat failed - build(); - } -} else { - build(); -} - -// Build it -function build() { - cp.spawn( - process.platform === 'win32' ? 'node-gyp.cmd' : 'node-gyp', - ['rebuild'].concat(args), - {customFds: [0, 1, 2]}) - .on('exit', function(err) { - if (err) { - if (err === 127) { - console.error( - 'node-gyp not found! Please upgrade your install of npm! You need at least 1.1.5 (I think) '+ - 'and preferably 1.1.30.' - ); - } else { - console.error('Build failed'); - } - return process.exit(err); - } - afterBuild(); - }); -} - -// Move it to expected location -function afterBuild() { - var targetPath = path.join(__dirname, 'build', debug ? 'Debug' : 'Release', 'binding.node'); - var installPath = path.join(__dirname, 'bin', modPath, 'binding.node'); - - try { - fs.mkdirSync(path.join(__dirname, 'bin', modPath)); - } catch (ex) {} - - try { - fs.statSync(targetPath); - } catch (ex) { - console.error('Build succeeded but target not found'); - process.exit(1); - } - fs.renameSync(targetPath, installPath); - console.log('Installed in `'+ installPath+ '`'); -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Makefile b/node_modules/gulp-sass/node_modules/node-sass/build/Makefile deleted file mode 100644 index f40d60f3..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Makefile +++ /dev/null @@ -1,350 +0,0 @@ -# We borrow heavily from the kernel build setup, though we are simpler since -# we don't have Kconfig tweaking settings on us. - -# The implicit make rules have it looking for RCS files, among other things. -# We instead explicitly write all the rules we care about. -# It's even quicker (saves ~200ms) to pass -r on the command line. -MAKEFLAGS=-r - -# The source directory tree. -srcdir := .. -abs_srcdir := $(abspath $(srcdir)) - -# The name of the builddir. -builddir_name ?= . - -# The V=1 flag on command line makes us verbosely print command lines. -ifdef V - quiet= -else - quiet=quiet_ -endif - -# Specify BUILDTYPE=Release on the command line for a release build. -BUILDTYPE ?= Release - -# Directory all our build output goes into. -# Note that this must be two directories beneath src/ for unit tests to pass, -# as they reach into the src/ directory for data with relative paths. -builddir ?= $(builddir_name)/$(BUILDTYPE) -abs_builddir := $(abspath $(builddir)) -depsdir := $(builddir)/.deps - -# Object output directory. -obj := $(builddir)/obj -abs_obj := $(abspath $(obj)) - -# We build up a list of every single one of the targets so we can slurp in the -# generated dependency rule Makefiles in one pass. -all_deps := - - - -CC.target ?= $(CC) -CFLAGS.target ?= $(CFLAGS) -CXX.target ?= $(CXX) -CXXFLAGS.target ?= $(CXXFLAGS) -LINK.target ?= $(LINK) -LDFLAGS.target ?= $(LDFLAGS) -AR.target ?= $(AR) - -# C++ apps need to be linked with g++. -# -# Note: flock is used to seralize linking. Linking is a memory-intensive -# process so running parallel links can often lead to thrashing. To disable -# the serialization, override LINK via an envrionment variable as follows: -# -# export LINK=g++ -# -# This will allow make to invoke N linker processes as specified in -jN. -LINK ?= ./gyp-mac-tool flock $(builddir)/linker.lock $(CXX.target) - -# TODO(evan): move all cross-compilation logic to gyp-time so we don't need -# to replicate this environment fallback in make as well. -CC.host ?= gcc -CFLAGS.host ?= -CXX.host ?= g++ -CXXFLAGS.host ?= -LINK.host ?= $(CXX.host) -LDFLAGS.host ?= -AR.host ?= ar - -# Define a dir function that can handle spaces. -# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions -# "leading spaces cannot appear in the text of the first argument as written. -# These characters can be put into the argument value by variable substitution." -empty := -space := $(empty) $(empty) - -# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces -replace_spaces = $(subst $(space),?,$1) -unreplace_spaces = $(subst ?,$(space),$1) -dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1))) - -# Flags to make gcc output dependency info. Note that you need to be -# careful here to use the flags that ccache and distcc can understand. -# We write to a dep file on the side first and then rename at the end -# so we can't end up with a broken dep file. -depfile = $(depsdir)/$(call replace_spaces,$@).d -DEPFLAGS = -MMD -MF $(depfile).raw - -# We have to fixup the deps output in a few ways. -# (1) the file output should mention the proper .o file. -# ccache or distcc lose the path to the target, so we convert a rule of -# the form: -# foobar.o: DEP1 DEP2 -# into -# path/to/foobar.o: DEP1 DEP2 -# (2) we want missing files not to cause us to fail to build. -# We want to rewrite -# foobar.o: DEP1 DEP2 \ -# DEP3 -# to -# DEP1: -# DEP2: -# DEP3: -# so if the files are missing, they're just considered phony rules. -# We have to do some pretty insane escaping to get those backslashes -# and dollar signs past make, the shell, and sed at the same time. -# Doesn't work with spaces, but that's fine: .d files have spaces in -# their names replaced with other characters. -define fixup_dep -# The depfile may not exist if the input file didn't have any #includes. -touch $(depfile).raw -# Fixup path as in (1). -sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile) -# Add extra rules as in (2). -# We remove slashes and replace spaces with new lines; -# remove blank lines; -# delete the first line and append a colon to the remaining lines. -sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\ - grep -v '^$$' |\ - sed -e 1d -e 's|$$|:|' \ - >> $(depfile) -rm $(depfile).raw -endef - -# Command definitions: -# - cmd_foo is the actual command to run; -# - quiet_cmd_foo is the brief-output summary of the command. - -quiet_cmd_cc = CC($(TOOLSET)) $@ -cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $< - -quiet_cmd_cxx = CXX($(TOOLSET)) $@ -cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $< - -quiet_cmd_objc = CXX($(TOOLSET)) $@ -cmd_objc = $(CC.$(TOOLSET)) $(GYP_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $< - -quiet_cmd_objcxx = CXX($(TOOLSET)) $@ -cmd_objcxx = $(CXX.$(TOOLSET)) $(GYP_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $< - -# Commands for precompiled header files. -quiet_cmd_pch_c = CXX($(TOOLSET)) $@ -cmd_pch_c = $(CC.$(TOOLSET)) $(GYP_PCH_CFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $< -quiet_cmd_pch_cc = CXX($(TOOLSET)) $@ -cmd_pch_cc = $(CC.$(TOOLSET)) $(GYP_PCH_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $< -quiet_cmd_pch_m = CXX($(TOOLSET)) $@ -cmd_pch_m = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $< -quiet_cmd_pch_mm = CXX($(TOOLSET)) $@ -cmd_pch_mm = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $< - -# gyp-mac-tool is written next to the root Makefile by gyp. -# Use $(4) for the command, since $(2) and $(3) are used as flag by do_cmd -# already. -quiet_cmd_mac_tool = MACTOOL $(4) $< -cmd_mac_tool = ./gyp-mac-tool $(4) $< "$@" - -quiet_cmd_mac_package_framework = PACKAGE FRAMEWORK $@ -cmd_mac_package_framework = ./gyp-mac-tool package-framework "$@" $(4) - -quiet_cmd_infoplist = INFOPLIST $@ -cmd_infoplist = $(CC.$(TOOLSET)) -E -P -Wno-trigraphs -x c $(INFOPLIST_DEFINES) "$<" -o "$@" - -quiet_cmd_touch = TOUCH $@ -cmd_touch = touch $@ - -quiet_cmd_copy = COPY $@ -# send stderr to /dev/null to ignore messages when linking directories. -cmd_copy = rm -rf "$@" && cp -af "$<" "$@" - -quiet_cmd_alink = LIBTOOL-STATIC $@ -cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^) - -quiet_cmd_link = LINK($(TOOLSET)) $@ -cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS) - -quiet_cmd_solink = SOLINK($(TOOLSET)) $@ -cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS) - -quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@ -cmd_solink_module = $(LINK.$(TOOLSET)) -bundle $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS) - - -# Define an escape_quotes function to escape single quotes. -# This allows us to handle quotes properly as long as we always use -# use single quotes and escape_quotes. -escape_quotes = $(subst ','\'',$(1)) -# This comment is here just to include a ' to unconfuse syntax highlighting. -# Define an escape_vars function to escape '$' variable syntax. -# This allows us to read/write command lines with shell variables (e.g. -# $LD_LIBRARY_PATH), without triggering make substitution. -escape_vars = $(subst $$,$$$$,$(1)) -# Helper that expands to a shell command to echo a string exactly as it is in -# make. This uses printf instead of echo because printf's behaviour with respect -# to escape sequences is more portable than echo's across different shells -# (e.g., dash, bash). -exact_echo = printf '%s\n' '$(call escape_quotes,$(1))' - -# Helper to compare the command we're about to run against the command -# we logged the last time we ran the command. Produces an empty -# string (false) when the commands match. -# Tricky point: Make has no string-equality test function. -# The kernel uses the following, but it seems like it would have false -# positives, where one string reordered its arguments. -# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \ -# $(filter-out $(cmd_$@), $(cmd_$(1)))) -# We instead substitute each for the empty string into the other, and -# say they're equal if both substitutions produce the empty string. -# .d files contain ? instead of spaces, take that into account. -command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\ - $(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1)))) - -# Helper that is non-empty when a prerequisite changes. -# Normally make does this implicitly, but we force rules to always run -# so we can check their command lines. -# $? -- new prerequisites -# $| -- order-only dependencies -prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?)) - -# Helper that executes all postbuilds until one fails. -define do_postbuilds - @E=0;\ - for p in $(POSTBUILDS); do\ - eval $$p;\ - E=$$?;\ - if [ $$E -ne 0 ]; then\ - break;\ - fi;\ - done;\ - if [ $$E -ne 0 ]; then\ - rm -rf "$@";\ - exit $$E;\ - fi -endef - -# do_cmd: run a command via the above cmd_foo names, if necessary. -# Should always run for a given target to handle command-line changes. -# Second argument, if non-zero, makes it do asm/C/C++ dependency munging. -# Third argument, if non-zero, makes it do POSTBUILDS processing. -# Note: We intentionally do NOT call dirx for depfile, since it contains ? for -# spaces already and dirx strips the ? characters. -define do_cmd -$(if $(or $(command_changed),$(prereq_changed)), - @$(call exact_echo, $($(quiet)cmd_$(1))) - @mkdir -p "$(call dirx,$@)" "$(dir $(depfile))" - $(if $(findstring flock,$(word 2,$(cmd_$1))), - @$(cmd_$(1)) - @echo " $(quiet_cmd_$(1)): Finished", - @$(cmd_$(1)) - ) - @$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile) - @$(if $(2),$(fixup_dep)) - $(if $(and $(3), $(POSTBUILDS)), - $(call do_postbuilds) - ) -) -endef - -# Declare the "all" target first so it is the default, -# even though we don't have the deps yet. -.PHONY: all -all: - -# make looks for ways to re-generate included makefiles, but in our case, we -# don't have a direct way. Explicitly telling make that it has nothing to do -# for them makes it go faster. -%.d: ; - -# Use FORCE_DO_CMD to force a target to run. Should be coupled with -# do_cmd. -.PHONY: FORCE_DO_CMD -FORCE_DO_CMD: - -TOOLSET := target -# Suffix rules, putting all outputs into $(obj). -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.m FORCE_DO_CMD - @$(call do_cmd,objc,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.mm FORCE_DO_CMD - @$(call do_cmd,objcxx,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD - @$(call do_cmd,cc,1) - -# Try building from generated source, too. -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.m FORCE_DO_CMD - @$(call do_cmd,objc,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.mm FORCE_DO_CMD - @$(call do_cmd,objcxx,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD - @$(call do_cmd,cc,1) - -$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.m FORCE_DO_CMD - @$(call do_cmd,objc,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.mm FORCE_DO_CMD - @$(call do_cmd,objcxx,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD - @$(call do_cmd,cc,1) - - -ifeq ($(strip $(foreach prefix,$(NO_LOAD),\ - $(findstring $(join ^,$(prefix)),\ - $(join ^,binding.target.mk)))),) - include binding.target.mk -endif - -quiet_cmd_regen_makefile = ACTION Regenerating $@ -cmd_regen_makefile = cd $(srcdir); /usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/Users/tmshv/Work/www.hudozka.su/node_modules/gulp-sass/node_modules/node-sass/build/config.gypi -I/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/Users/tmshv/.node-gyp/0.11.11/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/Users/tmshv/.node-gyp/0.11.11" "-Dmodule_root_dir=/Users/tmshv/Work/www.hudozka.su/node_modules/gulp-sass/node_modules/node-sass" binding.gyp -Makefile: $(srcdir)/../../../../../../.node-gyp/0.11.11/common.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(srcdir)/../../../../../../../../usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi - $(call do_cmd,regen_makefile) - -# "all" is a concatenation of the "all" targets from all the included -# sub-makefiles. This is just here to clarify. -all: - -# Add in dependency-tracking rules. $(all_deps) is the list of every single -# target in our tree. Only consider the ones with .d (dependency) info: -d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d)) -ifneq ($(d_files),) - include $(d_files) -endif diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/binding.node.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/binding.node.d deleted file mode 100644 index 6bc3ebf1..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/binding.node.d +++ /dev/null @@ -1 +0,0 @@ -cmd_Release/binding.node := ./gyp-mac-tool flock ./Release/linker.lock c++ -bundle -Wl,-search_paths_first -mmacosx-version-min=10.7 -arch x86_64 -L./Release -o Release/binding.node Release/obj.target/binding/binding.o Release/obj.target/binding/sass_context_wrapper.o Release/obj.target/binding/libsass/ast.o Release/obj.target/binding/libsass/base64vlq.o Release/obj.target/binding/libsass/bind.o Release/obj.target/binding/libsass/constants.o Release/obj.target/binding/libsass/context.o Release/obj.target/binding/libsass/contextualize.o Release/obj.target/binding/libsass/copy_c_str.o Release/obj.target/binding/libsass/error_handling.o Release/obj.target/binding/libsass/eval.o Release/obj.target/binding/libsass/expand.o Release/obj.target/binding/libsass/extend.o Release/obj.target/binding/libsass/file.o Release/obj.target/binding/libsass/functions.o Release/obj.target/binding/libsass/inspect.o Release/obj.target/binding/libsass/output_compressed.o Release/obj.target/binding/libsass/output_nested.o Release/obj.target/binding/libsass/parser.o Release/obj.target/binding/libsass/prelexer.o Release/obj.target/binding/libsass/sass.o Release/obj.target/binding/libsass/sass_interface.o Release/obj.target/binding/libsass/source_map.o Release/obj.target/binding/libsass/to_c.o Release/obj.target/binding/libsass/to_string.o Release/obj.target/binding/libsass/units.o -undefined dynamic_lookup diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/binding.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/binding.o.d deleted file mode 100644 index da98b91e..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/binding.o.d +++ /dev/null @@ -1,34 +0,0 @@ -cmd_Release/obj.target/binding/binding.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/binding.o.d.raw -c -o Release/obj.target/binding/binding.o ../binding.cpp -Release/obj.target/binding/binding.o: ../binding.cpp \ - ../node_modules/nan/nan.h \ - /Users/tmshv/.node-gyp/0.11.11/deps/uv/include/uv.h \ - /Users/tmshv/.node-gyp/0.11.11/deps/uv/include/uv-errno.h \ - /Users/tmshv/.node-gyp/0.11.11/deps/uv/include/uv-unix.h \ - /Users/tmshv/.node-gyp/0.11.11/deps/uv/include/uv-darwin.h \ - /Users/tmshv/.node-gyp/0.11.11/src/node.h \ - /Users/tmshv/.node-gyp/0.11.11/deps/v8/include/v8.h \ - /Users/tmshv/.node-gyp/0.11.11/deps/v8/include/v8stdint.h \ - /Users/tmshv/.node-gyp/0.11.11/deps/v8/include/v8config.h \ - /Users/tmshv/.node-gyp/0.11.11/src/node_version.h \ - /Users/tmshv/.node-gyp/0.11.11/src/node_buffer.h \ - /Users/tmshv/.node-gyp/0.11.11/src/smalloc.h \ - /Users/tmshv/.node-gyp/0.11.11/src/node_object_wrap.h \ - ../sass_context_wrapper.h ../libsass/sass_interface.h \ - ../libsass/sass.h -../binding.cpp: -../node_modules/nan/nan.h: -/Users/tmshv/.node-gyp/0.11.11/deps/uv/include/uv.h: -/Users/tmshv/.node-gyp/0.11.11/deps/uv/include/uv-errno.h: -/Users/tmshv/.node-gyp/0.11.11/deps/uv/include/uv-unix.h: -/Users/tmshv/.node-gyp/0.11.11/deps/uv/include/uv-darwin.h: -/Users/tmshv/.node-gyp/0.11.11/src/node.h: -/Users/tmshv/.node-gyp/0.11.11/deps/v8/include/v8.h: -/Users/tmshv/.node-gyp/0.11.11/deps/v8/include/v8stdint.h: -/Users/tmshv/.node-gyp/0.11.11/deps/v8/include/v8config.h: -/Users/tmshv/.node-gyp/0.11.11/src/node_version.h: -/Users/tmshv/.node-gyp/0.11.11/src/node_buffer.h: -/Users/tmshv/.node-gyp/0.11.11/src/smalloc.h: -/Users/tmshv/.node-gyp/0.11.11/src/node_object_wrap.h: -../sass_context_wrapper.h: -../libsass/sass_interface.h: -../libsass/sass.h: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/ast.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/ast.o.d deleted file mode 100644 index 329dc265..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/ast.o.d +++ /dev/null @@ -1,28 +0,0 @@ -cmd_Release/obj.target/binding/libsass/ast.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/libsass/ast.o.d.raw -c -o Release/obj.target/binding/libsass/ast.o ../libsass/ast.cpp -Release/obj.target/binding/libsass/ast.o: ../libsass/ast.cpp \ - ../libsass/ast.hpp ../libsass/operation.hpp \ - ../libsass/ast_fwd_decl.hpp ../libsass/token.hpp \ - ../libsass/environment.hpp ../libsass/ast_def_macros.hpp \ - ../libsass/sass.h ../libsass/units.hpp ../libsass/error_handling.hpp \ - ../libsass/position.hpp ../libsass/context.hpp \ - ../libsass/kwd_arg_macros.hpp ../libsass/memory_manager.hpp \ - ../libsass/source_map.hpp ../libsass/mapping.hpp \ - ../libsass/base64vlq.hpp ../libsass/to_string.hpp -../libsass/ast.cpp: -../libsass/ast.hpp: -../libsass/operation.hpp: -../libsass/ast_fwd_decl.hpp: -../libsass/token.hpp: -../libsass/environment.hpp: -../libsass/ast_def_macros.hpp: -../libsass/sass.h: -../libsass/units.hpp: -../libsass/error_handling.hpp: -../libsass/position.hpp: -../libsass/context.hpp: -../libsass/kwd_arg_macros.hpp: -../libsass/memory_manager.hpp: -../libsass/source_map.hpp: -../libsass/mapping.hpp: -../libsass/base64vlq.hpp: -../libsass/to_string.hpp: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/base64vlq.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/base64vlq.o.d deleted file mode 100644 index 55a1d72b..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/base64vlq.o.d +++ /dev/null @@ -1,5 +0,0 @@ -cmd_Release/obj.target/binding/libsass/base64vlq.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/libsass/base64vlq.o.d.raw -c -o Release/obj.target/binding/libsass/base64vlq.o ../libsass/base64vlq.cpp -Release/obj.target/binding/libsass/base64vlq.o: ../libsass/base64vlq.cpp \ - ../libsass/base64vlq.hpp -../libsass/base64vlq.cpp: -../libsass/base64vlq.hpp: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/bind.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/bind.o.d deleted file mode 100644 index dca32858..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/bind.o.d +++ /dev/null @@ -1,31 +0,0 @@ -cmd_Release/obj.target/binding/libsass/bind.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/libsass/bind.o.d.raw -c -o Release/obj.target/binding/libsass/bind.o ../libsass/bind.cpp -Release/obj.target/binding/libsass/bind.o: ../libsass/bind.cpp \ - ../libsass/bind.hpp ../libsass/environment.hpp \ - ../libsass/ast_def_macros.hpp ../libsass/ast.hpp \ - ../libsass/operation.hpp ../libsass/ast_fwd_decl.hpp \ - ../libsass/token.hpp ../libsass/sass.h ../libsass/units.hpp \ - ../libsass/error_handling.hpp ../libsass/position.hpp \ - ../libsass/context.hpp ../libsass/kwd_arg_macros.hpp \ - ../libsass/memory_manager.hpp ../libsass/source_map.hpp \ - ../libsass/mapping.hpp ../libsass/base64vlq.hpp ../libsass/eval.hpp \ - ../libsass/to_string.hpp -../libsass/bind.cpp: -../libsass/bind.hpp: -../libsass/environment.hpp: -../libsass/ast_def_macros.hpp: -../libsass/ast.hpp: -../libsass/operation.hpp: -../libsass/ast_fwd_decl.hpp: -../libsass/token.hpp: -../libsass/sass.h: -../libsass/units.hpp: -../libsass/error_handling.hpp: -../libsass/position.hpp: -../libsass/context.hpp: -../libsass/kwd_arg_macros.hpp: -../libsass/memory_manager.hpp: -../libsass/source_map.hpp: -../libsass/mapping.hpp: -../libsass/base64vlq.hpp: -../libsass/eval.hpp: -../libsass/to_string.hpp: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/constants.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/constants.o.d deleted file mode 100644 index 5db7b15d..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/constants.o.d +++ /dev/null @@ -1,5 +0,0 @@ -cmd_Release/obj.target/binding/libsass/constants.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/libsass/constants.o.d.raw -c -o Release/obj.target/binding/libsass/constants.o ../libsass/constants.cpp -Release/obj.target/binding/libsass/constants.o: ../libsass/constants.cpp \ - ../libsass/constants.hpp -../libsass/constants.cpp: -../libsass/constants.hpp: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/context.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/context.o.d deleted file mode 100644 index b988541f..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/context.o.d +++ /dev/null @@ -1,48 +0,0 @@ -cmd_Release/obj.target/binding/libsass/context.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/libsass/context.o.d.raw -c -o Release/obj.target/binding/libsass/context.o ../libsass/context.cpp -Release/obj.target/binding/libsass/context.o: ../libsass/context.cpp \ - ../libsass/context.hpp ../libsass/kwd_arg_macros.hpp \ - ../libsass/memory_manager.hpp ../libsass/environment.hpp \ - ../libsass/ast_def_macros.hpp ../libsass/source_map.hpp \ - ../libsass/mapping.hpp ../libsass/position.hpp ../libsass/ast.hpp \ - ../libsass/operation.hpp ../libsass/ast_fwd_decl.hpp \ - ../libsass/token.hpp ../libsass/sass.h ../libsass/units.hpp \ - ../libsass/error_handling.hpp ../libsass/base64vlq.hpp \ - ../libsass/constants.hpp ../libsass/parser.hpp ../libsass/prelexer.hpp \ - ../libsass/file.hpp ../libsass/inspect.hpp \ - ../libsass/output_nested.hpp ../libsass/output_compressed.hpp \ - ../libsass/expand.hpp ../libsass/eval.hpp ../libsass/contextualize.hpp \ - ../libsass/extend.hpp ../libsass/copy_c_str.hpp \ - ../libsass/color_names.hpp ../libsass/functions.hpp \ - ../libsass/backtrace.hpp -../libsass/context.cpp: -../libsass/context.hpp: -../libsass/kwd_arg_macros.hpp: -../libsass/memory_manager.hpp: -../libsass/environment.hpp: -../libsass/ast_def_macros.hpp: -../libsass/source_map.hpp: -../libsass/mapping.hpp: -../libsass/position.hpp: -../libsass/ast.hpp: -../libsass/operation.hpp: -../libsass/ast_fwd_decl.hpp: -../libsass/token.hpp: -../libsass/sass.h: -../libsass/units.hpp: -../libsass/error_handling.hpp: -../libsass/base64vlq.hpp: -../libsass/constants.hpp: -../libsass/parser.hpp: -../libsass/prelexer.hpp: -../libsass/file.hpp: -../libsass/inspect.hpp: -../libsass/output_nested.hpp: -../libsass/output_compressed.hpp: -../libsass/expand.hpp: -../libsass/eval.hpp: -../libsass/contextualize.hpp: -../libsass/extend.hpp: -../libsass/copy_c_str.hpp: -../libsass/color_names.hpp: -../libsass/functions.hpp: -../libsass/backtrace.hpp: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/contextualize.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/contextualize.o.d deleted file mode 100644 index 8eb0ddfe..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/contextualize.o.d +++ /dev/null @@ -1,35 +0,0 @@ -cmd_Release/obj.target/binding/libsass/contextualize.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/libsass/contextualize.o.d.raw -c -o Release/obj.target/binding/libsass/contextualize.o ../libsass/contextualize.cpp -Release/obj.target/binding/libsass/contextualize.o: \ - ../libsass/contextualize.cpp ../libsass/contextualize.hpp \ - ../libsass/environment.hpp ../libsass/ast_def_macros.hpp \ - ../libsass/operation.hpp ../libsass/ast_fwd_decl.hpp \ - ../libsass/ast.hpp ../libsass/token.hpp ../libsass/sass.h \ - ../libsass/units.hpp ../libsass/error_handling.hpp \ - ../libsass/position.hpp ../libsass/eval.hpp ../libsass/backtrace.hpp \ - ../libsass/to_string.hpp ../libsass/parser.hpp ../libsass/prelexer.hpp \ - ../libsass/context.hpp ../libsass/kwd_arg_macros.hpp \ - ../libsass/memory_manager.hpp ../libsass/source_map.hpp \ - ../libsass/mapping.hpp ../libsass/base64vlq.hpp -../libsass/contextualize.cpp: -../libsass/contextualize.hpp: -../libsass/environment.hpp: -../libsass/ast_def_macros.hpp: -../libsass/operation.hpp: -../libsass/ast_fwd_decl.hpp: -../libsass/ast.hpp: -../libsass/token.hpp: -../libsass/sass.h: -../libsass/units.hpp: -../libsass/error_handling.hpp: -../libsass/position.hpp: -../libsass/eval.hpp: -../libsass/backtrace.hpp: -../libsass/to_string.hpp: -../libsass/parser.hpp: -../libsass/prelexer.hpp: -../libsass/context.hpp: -../libsass/kwd_arg_macros.hpp: -../libsass/memory_manager.hpp: -../libsass/source_map.hpp: -../libsass/mapping.hpp: -../libsass/base64vlq.hpp: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/copy_c_str.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/copy_c_str.o.d deleted file mode 100644 index 07475139..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/copy_c_str.o.d +++ /dev/null @@ -1,4 +0,0 @@ -cmd_Release/obj.target/binding/libsass/copy_c_str.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/libsass/copy_c_str.o.d.raw -c -o Release/obj.target/binding/libsass/copy_c_str.o ../libsass/copy_c_str.cpp -Release/obj.target/binding/libsass/copy_c_str.o: \ - ../libsass/copy_c_str.cpp -../libsass/copy_c_str.cpp: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/error_handling.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/error_handling.o.d deleted file mode 100644 index 28781cf4..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/error_handling.o.d +++ /dev/null @@ -1,10 +0,0 @@ -cmd_Release/obj.target/binding/libsass/error_handling.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/libsass/error_handling.o.d.raw -c -o Release/obj.target/binding/libsass/error_handling.o ../libsass/error_handling.cpp -Release/obj.target/binding/libsass/error_handling.o: \ - ../libsass/error_handling.cpp ../libsass/error_handling.hpp \ - ../libsass/position.hpp ../libsass/backtrace.hpp \ - ../libsass/prelexer.hpp -../libsass/error_handling.cpp: -../libsass/error_handling.hpp: -../libsass/position.hpp: -../libsass/backtrace.hpp: -../libsass/prelexer.hpp: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/eval.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/eval.o.d deleted file mode 100644 index 2d1d4749..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/eval.o.d +++ /dev/null @@ -1,36 +0,0 @@ -cmd_Release/obj.target/binding/libsass/eval.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/libsass/eval.o.d.raw -c -o Release/obj.target/binding/libsass/eval.o ../libsass/eval.cpp -Release/obj.target/binding/libsass/eval.o: ../libsass/eval.cpp \ - ../libsass/eval.hpp ../libsass/operation.hpp \ - ../libsass/ast_fwd_decl.hpp ../libsass/environment.hpp \ - ../libsass/ast_def_macros.hpp ../libsass/sass.h \ - ../libsass/position.hpp ../libsass/ast.hpp ../libsass/token.hpp \ - ../libsass/units.hpp ../libsass/error_handling.hpp ../libsass/bind.hpp \ - ../libsass/to_string.hpp ../libsass/inspect.hpp ../libsass/to_c.hpp \ - ../libsass/context.hpp ../libsass/kwd_arg_macros.hpp \ - ../libsass/memory_manager.hpp ../libsass/source_map.hpp \ - ../libsass/mapping.hpp ../libsass/base64vlq.hpp \ - ../libsass/backtrace.hpp ../libsass/prelexer.hpp -../libsass/eval.cpp: -../libsass/eval.hpp: -../libsass/operation.hpp: -../libsass/ast_fwd_decl.hpp: -../libsass/environment.hpp: -../libsass/ast_def_macros.hpp: -../libsass/sass.h: -../libsass/position.hpp: -../libsass/ast.hpp: -../libsass/token.hpp: -../libsass/units.hpp: -../libsass/error_handling.hpp: -../libsass/bind.hpp: -../libsass/to_string.hpp: -../libsass/inspect.hpp: -../libsass/to_c.hpp: -../libsass/context.hpp: -../libsass/kwd_arg_macros.hpp: -../libsass/memory_manager.hpp: -../libsass/source_map.hpp: -../libsass/mapping.hpp: -../libsass/base64vlq.hpp: -../libsass/backtrace.hpp: -../libsass/prelexer.hpp: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/expand.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/expand.o.d deleted file mode 100644 index ac44986f..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/expand.o.d +++ /dev/null @@ -1,35 +0,0 @@ -cmd_Release/obj.target/binding/libsass/expand.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/libsass/expand.o.d.raw -c -o Release/obj.target/binding/libsass/expand.o ../libsass/expand.cpp -Release/obj.target/binding/libsass/expand.o: ../libsass/expand.cpp \ - ../libsass/expand.hpp ../libsass/ast.hpp ../libsass/operation.hpp \ - ../libsass/ast_fwd_decl.hpp ../libsass/token.hpp \ - ../libsass/environment.hpp ../libsass/ast_def_macros.hpp \ - ../libsass/sass.h ../libsass/units.hpp ../libsass/error_handling.hpp \ - ../libsass/position.hpp ../libsass/bind.hpp ../libsass/eval.hpp \ - ../libsass/contextualize.hpp ../libsass/to_string.hpp \ - ../libsass/backtrace.hpp ../libsass/context.hpp \ - ../libsass/kwd_arg_macros.hpp ../libsass/memory_manager.hpp \ - ../libsass/source_map.hpp ../libsass/mapping.hpp \ - ../libsass/base64vlq.hpp -../libsass/expand.cpp: -../libsass/expand.hpp: -../libsass/ast.hpp: -../libsass/operation.hpp: -../libsass/ast_fwd_decl.hpp: -../libsass/token.hpp: -../libsass/environment.hpp: -../libsass/ast_def_macros.hpp: -../libsass/sass.h: -../libsass/units.hpp: -../libsass/error_handling.hpp: -../libsass/position.hpp: -../libsass/bind.hpp: -../libsass/eval.hpp: -../libsass/contextualize.hpp: -../libsass/to_string.hpp: -../libsass/backtrace.hpp: -../libsass/context.hpp: -../libsass/kwd_arg_macros.hpp: -../libsass/memory_manager.hpp: -../libsass/source_map.hpp: -../libsass/mapping.hpp: -../libsass/base64vlq.hpp: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/extend.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/extend.o.d deleted file mode 100644 index 6fc743ef..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/extend.o.d +++ /dev/null @@ -1,32 +0,0 @@ -cmd_Release/obj.target/binding/libsass/extend.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/libsass/extend.o.d.raw -c -o Release/obj.target/binding/libsass/extend.o ../libsass/extend.cpp -Release/obj.target/binding/libsass/extend.o: ../libsass/extend.cpp \ - ../libsass/extend.hpp ../libsass/ast.hpp ../libsass/operation.hpp \ - ../libsass/ast_fwd_decl.hpp ../libsass/token.hpp \ - ../libsass/environment.hpp ../libsass/ast_def_macros.hpp \ - ../libsass/sass.h ../libsass/units.hpp ../libsass/error_handling.hpp \ - ../libsass/position.hpp ../libsass/context.hpp \ - ../libsass/kwd_arg_macros.hpp ../libsass/memory_manager.hpp \ - ../libsass/source_map.hpp ../libsass/mapping.hpp \ - ../libsass/base64vlq.hpp ../libsass/contextualize.hpp \ - ../libsass/to_string.hpp ../libsass/backtrace.hpp -../libsass/extend.cpp: -../libsass/extend.hpp: -../libsass/ast.hpp: -../libsass/operation.hpp: -../libsass/ast_fwd_decl.hpp: -../libsass/token.hpp: -../libsass/environment.hpp: -../libsass/ast_def_macros.hpp: -../libsass/sass.h: -../libsass/units.hpp: -../libsass/error_handling.hpp: -../libsass/position.hpp: -../libsass/context.hpp: -../libsass/kwd_arg_macros.hpp: -../libsass/memory_manager.hpp: -../libsass/source_map.hpp: -../libsass/mapping.hpp: -../libsass/base64vlq.hpp: -../libsass/contextualize.hpp: -../libsass/to_string.hpp: -../libsass/backtrace.hpp: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/file.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/file.o.d deleted file mode 100644 index 5a966fa0..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/file.o.d +++ /dev/null @@ -1,28 +0,0 @@ -cmd_Release/obj.target/binding/libsass/file.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/libsass/file.o.d.raw -c -o Release/obj.target/binding/libsass/file.o ../libsass/file.cpp -Release/obj.target/binding/libsass/file.o: ../libsass/file.cpp \ - ../libsass/file.hpp ../libsass/context.hpp \ - ../libsass/kwd_arg_macros.hpp ../libsass/memory_manager.hpp \ - ../libsass/environment.hpp ../libsass/ast_def_macros.hpp \ - ../libsass/source_map.hpp ../libsass/mapping.hpp \ - ../libsass/position.hpp ../libsass/ast.hpp ../libsass/operation.hpp \ - ../libsass/ast_fwd_decl.hpp ../libsass/token.hpp ../libsass/sass.h \ - ../libsass/units.hpp ../libsass/error_handling.hpp \ - ../libsass/base64vlq.hpp -../libsass/file.cpp: -../libsass/file.hpp: -../libsass/context.hpp: -../libsass/kwd_arg_macros.hpp: -../libsass/memory_manager.hpp: -../libsass/environment.hpp: -../libsass/ast_def_macros.hpp: -../libsass/source_map.hpp: -../libsass/mapping.hpp: -../libsass/position.hpp: -../libsass/ast.hpp: -../libsass/operation.hpp: -../libsass/ast_fwd_decl.hpp: -../libsass/token.hpp: -../libsass/sass.h: -../libsass/units.hpp: -../libsass/error_handling.hpp: -../libsass/base64vlq.hpp: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/functions.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/functions.o.d deleted file mode 100644 index 54d3d250..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/functions.o.d +++ /dev/null @@ -1,37 +0,0 @@ -cmd_Release/obj.target/binding/libsass/functions.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/libsass/functions.o.d.raw -c -o Release/obj.target/binding/libsass/functions.o ../libsass/functions.cpp -Release/obj.target/binding/libsass/functions.o: ../libsass/functions.cpp \ - ../libsass/functions.hpp ../libsass/environment.hpp \ - ../libsass/ast_def_macros.hpp ../libsass/sass.h \ - ../libsass/position.hpp ../libsass/ast.hpp ../libsass/operation.hpp \ - ../libsass/ast_fwd_decl.hpp ../libsass/token.hpp ../libsass/units.hpp \ - ../libsass/error_handling.hpp ../libsass/context.hpp \ - ../libsass/kwd_arg_macros.hpp ../libsass/memory_manager.hpp \ - ../libsass/source_map.hpp ../libsass/mapping.hpp \ - ../libsass/base64vlq.hpp ../libsass/backtrace.hpp \ - ../libsass/parser.hpp ../libsass/prelexer.hpp ../libsass/constants.hpp \ - ../libsass/to_string.hpp ../libsass/inspect.hpp ../libsass/eval.hpp -../libsass/functions.cpp: -../libsass/functions.hpp: -../libsass/environment.hpp: -../libsass/ast_def_macros.hpp: -../libsass/sass.h: -../libsass/position.hpp: -../libsass/ast.hpp: -../libsass/operation.hpp: -../libsass/ast_fwd_decl.hpp: -../libsass/token.hpp: -../libsass/units.hpp: -../libsass/error_handling.hpp: -../libsass/context.hpp: -../libsass/kwd_arg_macros.hpp: -../libsass/memory_manager.hpp: -../libsass/source_map.hpp: -../libsass/mapping.hpp: -../libsass/base64vlq.hpp: -../libsass/backtrace.hpp: -../libsass/parser.hpp: -../libsass/prelexer.hpp: -../libsass/constants.hpp: -../libsass/to_string.hpp: -../libsass/inspect.hpp: -../libsass/eval.hpp: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/inspect.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/inspect.o.d deleted file mode 100644 index bbc8530b..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/inspect.o.d +++ /dev/null @@ -1,28 +0,0 @@ -cmd_Release/obj.target/binding/libsass/inspect.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/libsass/inspect.o.d.raw -c -o Release/obj.target/binding/libsass/inspect.o ../libsass/inspect.cpp -Release/obj.target/binding/libsass/inspect.o: ../libsass/inspect.cpp \ - ../libsass/inspect.hpp ../libsass/operation.hpp \ - ../libsass/ast_fwd_decl.hpp ../libsass/ast.hpp ../libsass/token.hpp \ - ../libsass/environment.hpp ../libsass/ast_def_macros.hpp \ - ../libsass/sass.h ../libsass/units.hpp ../libsass/error_handling.hpp \ - ../libsass/position.hpp ../libsass/context.hpp \ - ../libsass/kwd_arg_macros.hpp ../libsass/memory_manager.hpp \ - ../libsass/source_map.hpp ../libsass/mapping.hpp \ - ../libsass/base64vlq.hpp -../libsass/inspect.cpp: -../libsass/inspect.hpp: -../libsass/operation.hpp: -../libsass/ast_fwd_decl.hpp: -../libsass/ast.hpp: -../libsass/token.hpp: -../libsass/environment.hpp: -../libsass/ast_def_macros.hpp: -../libsass/sass.h: -../libsass/units.hpp: -../libsass/error_handling.hpp: -../libsass/position.hpp: -../libsass/context.hpp: -../libsass/kwd_arg_macros.hpp: -../libsass/memory_manager.hpp: -../libsass/source_map.hpp: -../libsass/mapping.hpp: -../libsass/base64vlq.hpp: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/output_compressed.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/output_compressed.o.d deleted file mode 100644 index 9de73d8e..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/output_compressed.o.d +++ /dev/null @@ -1,30 +0,0 @@ -cmd_Release/obj.target/binding/libsass/output_compressed.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/libsass/output_compressed.o.d.raw -c -o Release/obj.target/binding/libsass/output_compressed.o ../libsass/output_compressed.cpp -Release/obj.target/binding/libsass/output_compressed.o: \ - ../libsass/output_compressed.cpp ../libsass/output_compressed.hpp \ - ../libsass/operation.hpp ../libsass/ast_fwd_decl.hpp \ - ../libsass/inspect.hpp ../libsass/ast.hpp ../libsass/token.hpp \ - ../libsass/environment.hpp ../libsass/ast_def_macros.hpp \ - ../libsass/sass.h ../libsass/units.hpp ../libsass/error_handling.hpp \ - ../libsass/position.hpp ../libsass/context.hpp \ - ../libsass/kwd_arg_macros.hpp ../libsass/memory_manager.hpp \ - ../libsass/source_map.hpp ../libsass/mapping.hpp \ - ../libsass/base64vlq.hpp -../libsass/output_compressed.cpp: -../libsass/output_compressed.hpp: -../libsass/operation.hpp: -../libsass/ast_fwd_decl.hpp: -../libsass/inspect.hpp: -../libsass/ast.hpp: -../libsass/token.hpp: -../libsass/environment.hpp: -../libsass/ast_def_macros.hpp: -../libsass/sass.h: -../libsass/units.hpp: -../libsass/error_handling.hpp: -../libsass/position.hpp: -../libsass/context.hpp: -../libsass/kwd_arg_macros.hpp: -../libsass/memory_manager.hpp: -../libsass/source_map.hpp: -../libsass/mapping.hpp: -../libsass/base64vlq.hpp: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/output_nested.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/output_nested.o.d deleted file mode 100644 index b4a8f19e..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/output_nested.o.d +++ /dev/null @@ -1,30 +0,0 @@ -cmd_Release/obj.target/binding/libsass/output_nested.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/libsass/output_nested.o.d.raw -c -o Release/obj.target/binding/libsass/output_nested.o ../libsass/output_nested.cpp -Release/obj.target/binding/libsass/output_nested.o: \ - ../libsass/output_nested.cpp ../libsass/output_nested.hpp \ - ../libsass/operation.hpp ../libsass/ast_fwd_decl.hpp \ - ../libsass/inspect.hpp ../libsass/ast.hpp ../libsass/token.hpp \ - ../libsass/environment.hpp ../libsass/ast_def_macros.hpp \ - ../libsass/sass.h ../libsass/units.hpp ../libsass/error_handling.hpp \ - ../libsass/position.hpp ../libsass/context.hpp \ - ../libsass/kwd_arg_macros.hpp ../libsass/memory_manager.hpp \ - ../libsass/source_map.hpp ../libsass/mapping.hpp \ - ../libsass/base64vlq.hpp -../libsass/output_nested.cpp: -../libsass/output_nested.hpp: -../libsass/operation.hpp: -../libsass/ast_fwd_decl.hpp: -../libsass/inspect.hpp: -../libsass/ast.hpp: -../libsass/token.hpp: -../libsass/environment.hpp: -../libsass/ast_def_macros.hpp: -../libsass/sass.h: -../libsass/units.hpp: -../libsass/error_handling.hpp: -../libsass/position.hpp: -../libsass/context.hpp: -../libsass/kwd_arg_macros.hpp: -../libsass/memory_manager.hpp: -../libsass/source_map.hpp: -../libsass/mapping.hpp: -../libsass/base64vlq.hpp: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/parser.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/parser.o.d deleted file mode 100644 index 673ace9f..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/parser.o.d +++ /dev/null @@ -1,34 +0,0 @@ -cmd_Release/obj.target/binding/libsass/parser.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/libsass/parser.o.d.raw -c -o Release/obj.target/binding/libsass/parser.o ../libsass/parser.cpp -Release/obj.target/binding/libsass/parser.o: ../libsass/parser.cpp \ - ../libsass/parser.hpp ../libsass/prelexer.hpp ../libsass/token.hpp \ - ../libsass/context.hpp ../libsass/kwd_arg_macros.hpp \ - ../libsass/memory_manager.hpp ../libsass/environment.hpp \ - ../libsass/ast_def_macros.hpp ../libsass/source_map.hpp \ - ../libsass/mapping.hpp ../libsass/position.hpp ../libsass/ast.hpp \ - ../libsass/operation.hpp ../libsass/ast_fwd_decl.hpp ../libsass/sass.h \ - ../libsass/units.hpp ../libsass/error_handling.hpp \ - ../libsass/base64vlq.hpp ../libsass/file.hpp ../libsass/inspect.hpp \ - ../libsass/to_string.hpp ../libsass/constants.hpp -../libsass/parser.cpp: -../libsass/parser.hpp: -../libsass/prelexer.hpp: -../libsass/token.hpp: -../libsass/context.hpp: -../libsass/kwd_arg_macros.hpp: -../libsass/memory_manager.hpp: -../libsass/environment.hpp: -../libsass/ast_def_macros.hpp: -../libsass/source_map.hpp: -../libsass/mapping.hpp: -../libsass/position.hpp: -../libsass/ast.hpp: -../libsass/operation.hpp: -../libsass/ast_fwd_decl.hpp: -../libsass/sass.h: -../libsass/units.hpp: -../libsass/error_handling.hpp: -../libsass/base64vlq.hpp: -../libsass/file.hpp: -../libsass/inspect.hpp: -../libsass/to_string.hpp: -../libsass/constants.hpp: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/prelexer.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/prelexer.o.d deleted file mode 100644 index 99d08076..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/prelexer.o.d +++ /dev/null @@ -1,6 +0,0 @@ -cmd_Release/obj.target/binding/libsass/prelexer.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/libsass/prelexer.o.d.raw -c -o Release/obj.target/binding/libsass/prelexer.o ../libsass/prelexer.cpp -Release/obj.target/binding/libsass/prelexer.o: ../libsass/prelexer.cpp \ - ../libsass/constants.hpp ../libsass/prelexer.hpp -../libsass/prelexer.cpp: -../libsass/constants.hpp: -../libsass/prelexer.hpp: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/sass.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/sass.o.d deleted file mode 100644 index 4aad6119..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/sass.o.d +++ /dev/null @@ -1,26 +0,0 @@ -cmd_Release/obj.target/binding/libsass/sass.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/libsass/sass.o.d.raw -c -o Release/obj.target/binding/libsass/sass.o ../libsass/sass.cpp -Release/obj.target/binding/libsass/sass.o: ../libsass/sass.cpp \ - ../libsass/sass.h ../libsass/context.hpp ../libsass/kwd_arg_macros.hpp \ - ../libsass/memory_manager.hpp ../libsass/environment.hpp \ - ../libsass/ast_def_macros.hpp ../libsass/source_map.hpp \ - ../libsass/mapping.hpp ../libsass/position.hpp ../libsass/ast.hpp \ - ../libsass/operation.hpp ../libsass/ast_fwd_decl.hpp \ - ../libsass/token.hpp ../libsass/units.hpp \ - ../libsass/error_handling.hpp ../libsass/base64vlq.hpp -../libsass/sass.cpp: -../libsass/sass.h: -../libsass/context.hpp: -../libsass/kwd_arg_macros.hpp: -../libsass/memory_manager.hpp: -../libsass/environment.hpp: -../libsass/ast_def_macros.hpp: -../libsass/source_map.hpp: -../libsass/mapping.hpp: -../libsass/position.hpp: -../libsass/ast.hpp: -../libsass/operation.hpp: -../libsass/ast_fwd_decl.hpp: -../libsass/token.hpp: -../libsass/units.hpp: -../libsass/error_handling.hpp: -../libsass/base64vlq.hpp: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/sass_interface.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/sass_interface.o.d deleted file mode 100644 index 9eabda02..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/sass_interface.o.d +++ /dev/null @@ -1,28 +0,0 @@ -cmd_Release/obj.target/binding/libsass/sass_interface.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/libsass/sass_interface.o.d.raw -c -o Release/obj.target/binding/libsass/sass_interface.o ../libsass/sass_interface.cpp -Release/obj.target/binding/libsass/sass_interface.o: \ - ../libsass/sass_interface.cpp ../libsass/sass_interface.h \ - ../libsass/sass.h ../libsass/context.hpp ../libsass/kwd_arg_macros.hpp \ - ../libsass/memory_manager.hpp ../libsass/environment.hpp \ - ../libsass/ast_def_macros.hpp ../libsass/source_map.hpp \ - ../libsass/mapping.hpp ../libsass/position.hpp ../libsass/ast.hpp \ - ../libsass/operation.hpp ../libsass/ast_fwd_decl.hpp \ - ../libsass/token.hpp ../libsass/units.hpp \ - ../libsass/error_handling.hpp ../libsass/base64vlq.hpp -../libsass/sass_interface.cpp: -../libsass/sass_interface.h: -../libsass/sass.h: -../libsass/context.hpp: -../libsass/kwd_arg_macros.hpp: -../libsass/memory_manager.hpp: -../libsass/environment.hpp: -../libsass/ast_def_macros.hpp: -../libsass/source_map.hpp: -../libsass/mapping.hpp: -../libsass/position.hpp: -../libsass/ast.hpp: -../libsass/operation.hpp: -../libsass/ast_fwd_decl.hpp: -../libsass/token.hpp: -../libsass/units.hpp: -../libsass/error_handling.hpp: -../libsass/base64vlq.hpp: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/source_map.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/source_map.o.d deleted file mode 100644 index bbbbb7ee..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/source_map.o.d +++ /dev/null @@ -1,27 +0,0 @@ -cmd_Release/obj.target/binding/libsass/source_map.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/libsass/source_map.o.d.raw -c -o Release/obj.target/binding/libsass/source_map.o ../libsass/source_map.cpp -Release/obj.target/binding/libsass/source_map.o: \ - ../libsass/source_map.cpp ../libsass/source_map.hpp \ - ../libsass/mapping.hpp ../libsass/position.hpp ../libsass/ast.hpp \ - ../libsass/operation.hpp ../libsass/ast_fwd_decl.hpp \ - ../libsass/token.hpp ../libsass/environment.hpp \ - ../libsass/ast_def_macros.hpp ../libsass/sass.h ../libsass/units.hpp \ - ../libsass/error_handling.hpp ../libsass/base64vlq.hpp \ - ../libsass/context.hpp ../libsass/kwd_arg_macros.hpp \ - ../libsass/memory_manager.hpp -../libsass/source_map.cpp: -../libsass/source_map.hpp: -../libsass/mapping.hpp: -../libsass/position.hpp: -../libsass/ast.hpp: -../libsass/operation.hpp: -../libsass/ast_fwd_decl.hpp: -../libsass/token.hpp: -../libsass/environment.hpp: -../libsass/ast_def_macros.hpp: -../libsass/sass.h: -../libsass/units.hpp: -../libsass/error_handling.hpp: -../libsass/base64vlq.hpp: -../libsass/context.hpp: -../libsass/kwd_arg_macros.hpp: -../libsass/memory_manager.hpp: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/to_c.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/to_c.o.d deleted file mode 100644 index e38b4a19..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/to_c.o.d +++ /dev/null @@ -1,19 +0,0 @@ -cmd_Release/obj.target/binding/libsass/to_c.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/libsass/to_c.o.d.raw -c -o Release/obj.target/binding/libsass/to_c.o ../libsass/to_c.cpp -Release/obj.target/binding/libsass/to_c.o: ../libsass/to_c.cpp \ - ../libsass/to_c.hpp ../libsass/operation.hpp \ - ../libsass/ast_fwd_decl.hpp ../libsass/sass.h ../libsass/ast.hpp \ - ../libsass/token.hpp ../libsass/environment.hpp \ - ../libsass/ast_def_macros.hpp ../libsass/units.hpp \ - ../libsass/error_handling.hpp ../libsass/position.hpp -../libsass/to_c.cpp: -../libsass/to_c.hpp: -../libsass/operation.hpp: -../libsass/ast_fwd_decl.hpp: -../libsass/sass.h: -../libsass/ast.hpp: -../libsass/token.hpp: -../libsass/environment.hpp: -../libsass/ast_def_macros.hpp: -../libsass/units.hpp: -../libsass/error_handling.hpp: -../libsass/position.hpp: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/to_string.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/to_string.o.d deleted file mode 100644 index 7f8d3fee..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/to_string.o.d +++ /dev/null @@ -1,29 +0,0 @@ -cmd_Release/obj.target/binding/libsass/to_string.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/libsass/to_string.o.d.raw -c -o Release/obj.target/binding/libsass/to_string.o ../libsass/to_string.cpp -Release/obj.target/binding/libsass/to_string.o: ../libsass/to_string.cpp \ - ../libsass/to_string.hpp ../libsass/operation.hpp \ - ../libsass/ast_fwd_decl.hpp ../libsass/inspect.hpp ../libsass/ast.hpp \ - ../libsass/token.hpp ../libsass/environment.hpp \ - ../libsass/ast_def_macros.hpp ../libsass/sass.h ../libsass/units.hpp \ - ../libsass/error_handling.hpp ../libsass/position.hpp \ - ../libsass/context.hpp ../libsass/kwd_arg_macros.hpp \ - ../libsass/memory_manager.hpp ../libsass/source_map.hpp \ - ../libsass/mapping.hpp ../libsass/base64vlq.hpp -../libsass/to_string.cpp: -../libsass/to_string.hpp: -../libsass/operation.hpp: -../libsass/ast_fwd_decl.hpp: -../libsass/inspect.hpp: -../libsass/ast.hpp: -../libsass/token.hpp: -../libsass/environment.hpp: -../libsass/ast_def_macros.hpp: -../libsass/sass.h: -../libsass/units.hpp: -../libsass/error_handling.hpp: -../libsass/position.hpp: -../libsass/context.hpp: -../libsass/kwd_arg_macros.hpp: -../libsass/memory_manager.hpp: -../libsass/source_map.hpp: -../libsass/mapping.hpp: -../libsass/base64vlq.hpp: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/units.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/units.o.d deleted file mode 100644 index e695b198..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/libsass/units.o.d +++ /dev/null @@ -1,5 +0,0 @@ -cmd_Release/obj.target/binding/libsass/units.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/libsass/units.o.d.raw -c -o Release/obj.target/binding/libsass/units.o ../libsass/units.cpp -Release/obj.target/binding/libsass/units.o: ../libsass/units.cpp \ - ../libsass/units.hpp -../libsass/units.cpp: -../libsass/units.hpp: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/sass_context_wrapper.o.d b/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/sass_context_wrapper.o.d deleted file mode 100644 index c7491df6..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/Release/.deps/Release/obj.target/binding/sass_context_wrapper.o.d +++ /dev/null @@ -1,34 +0,0 @@ -cmd_Release/obj.target/binding/sass_context_wrapper.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/tmshv/.node-gyp/0.11.11/src -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/binding/sass_context_wrapper.o.d.raw -c -o Release/obj.target/binding/sass_context_wrapper.o ../sass_context_wrapper.cpp -Release/obj.target/binding/sass_context_wrapper.o: \ - ../sass_context_wrapper.cpp ../sass_context_wrapper.h \ - ../libsass/sass_interface.h ../libsass/sass.h \ - ../node_modules/nan/nan.h \ - /Users/tmshv/.node-gyp/0.11.11/deps/uv/include/uv.h \ - /Users/tmshv/.node-gyp/0.11.11/deps/uv/include/uv-errno.h \ - /Users/tmshv/.node-gyp/0.11.11/deps/uv/include/uv-unix.h \ - /Users/tmshv/.node-gyp/0.11.11/deps/uv/include/uv-darwin.h \ - /Users/tmshv/.node-gyp/0.11.11/src/node.h \ - /Users/tmshv/.node-gyp/0.11.11/deps/v8/include/v8.h \ - /Users/tmshv/.node-gyp/0.11.11/deps/v8/include/v8stdint.h \ - /Users/tmshv/.node-gyp/0.11.11/deps/v8/include/v8config.h \ - /Users/tmshv/.node-gyp/0.11.11/src/node_version.h \ - /Users/tmshv/.node-gyp/0.11.11/src/node_buffer.h \ - /Users/tmshv/.node-gyp/0.11.11/src/smalloc.h \ - /Users/tmshv/.node-gyp/0.11.11/src/node_object_wrap.h -../sass_context_wrapper.cpp: -../sass_context_wrapper.h: -../libsass/sass_interface.h: -../libsass/sass.h: -../node_modules/nan/nan.h: -/Users/tmshv/.node-gyp/0.11.11/deps/uv/include/uv.h: -/Users/tmshv/.node-gyp/0.11.11/deps/uv/include/uv-errno.h: -/Users/tmshv/.node-gyp/0.11.11/deps/uv/include/uv-unix.h: -/Users/tmshv/.node-gyp/0.11.11/deps/uv/include/uv-darwin.h: -/Users/tmshv/.node-gyp/0.11.11/src/node.h: -/Users/tmshv/.node-gyp/0.11.11/deps/v8/include/v8.h: -/Users/tmshv/.node-gyp/0.11.11/deps/v8/include/v8stdint.h: -/Users/tmshv/.node-gyp/0.11.11/deps/v8/include/v8config.h: -/Users/tmshv/.node-gyp/0.11.11/src/node_version.h: -/Users/tmshv/.node-gyp/0.11.11/src/node_buffer.h: -/Users/tmshv/.node-gyp/0.11.11/src/smalloc.h: -/Users/tmshv/.node-gyp/0.11.11/src/node_object_wrap.h: diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/linker.lock b/node_modules/gulp-sass/node_modules/node-sass/build/Release/linker.lock deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/binding.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/binding.o deleted file mode 100644 index 35cfb5b5..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/binding.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/ast.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/ast.o deleted file mode 100644 index 40d92d1f..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/ast.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/base64vlq.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/base64vlq.o deleted file mode 100644 index d39efac6..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/base64vlq.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/bind.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/bind.o deleted file mode 100644 index 03c055bc..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/bind.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/constants.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/constants.o deleted file mode 100644 index 1a9257af..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/constants.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/context.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/context.o deleted file mode 100644 index 61ec099d..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/context.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/contextualize.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/contextualize.o deleted file mode 100644 index a7a43eee..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/contextualize.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/copy_c_str.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/copy_c_str.o deleted file mode 100644 index 65de5581..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/copy_c_str.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/error_handling.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/error_handling.o deleted file mode 100644 index ca5edada..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/error_handling.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/eval.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/eval.o deleted file mode 100644 index 69cdfa49..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/eval.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/expand.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/expand.o deleted file mode 100644 index 85eadd1b..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/expand.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/extend.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/extend.o deleted file mode 100644 index 873e2400..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/extend.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/file.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/file.o deleted file mode 100644 index bf6d2412..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/file.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/functions.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/functions.o deleted file mode 100644 index 06830211..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/functions.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/inspect.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/inspect.o deleted file mode 100644 index ac789bd0..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/inspect.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/output_compressed.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/output_compressed.o deleted file mode 100644 index 67ff690d..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/output_compressed.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/output_nested.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/output_nested.o deleted file mode 100644 index fdc27673..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/output_nested.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/parser.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/parser.o deleted file mode 100644 index 650829ab..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/parser.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/prelexer.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/prelexer.o deleted file mode 100644 index 6c9032f4..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/prelexer.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/sass.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/sass.o deleted file mode 100644 index f74335bd..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/sass.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/sass_interface.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/sass_interface.o deleted file mode 100644 index 4897637a..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/sass_interface.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/source_map.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/source_map.o deleted file mode 100644 index b155e7d1..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/source_map.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/to_c.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/to_c.o deleted file mode 100644 index 291e7fce..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/to_c.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/to_string.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/to_string.o deleted file mode 100644 index e2b9459c..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/to_string.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/units.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/units.o deleted file mode 100644 index 80f657c6..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/libsass/units.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/sass_context_wrapper.o b/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/sass_context_wrapper.o deleted file mode 100644 index a7c96d85..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/build/Release/obj.target/binding/sass_context_wrapper.o and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/binding.Makefile b/node_modules/gulp-sass/node_modules/node-sass/build/binding.Makefile deleted file mode 100644 index 4634db78..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/binding.Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# This file is generated by gyp; do not edit. - -export builddir_name ?= build/./. -.PHONY: all -all: - $(MAKE) binding diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/binding.target.mk b/node_modules/gulp-sass/node_modules/node-sass/build/binding.target.mk deleted file mode 100644 index bccb9f53..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/binding.target.mk +++ /dev/null @@ -1,177 +0,0 @@ -# This file is generated by gyp; do not edit. - -TOOLSET := target -TARGET := binding -DEFS_Debug := \ - '-D_DARWIN_USE_64_BIT_INODE=1' \ - '-D_LARGEFILE_SOURCE' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DBUILDING_NODE_EXTENSION' \ - '-DDEBUG' \ - '-D_DEBUG' - -# Flags passed to all source files. -CFLAGS_Debug := \ - -O0 \ - -gdwarf-2 \ - -mmacosx-version-min=10.7 \ - -arch x86_64 \ - -Wall \ - -Wendif-labels \ - -W \ - -Wno-unused-parameter - -# Flags passed to only C files. -CFLAGS_C_Debug := \ - -fno-strict-aliasing - -# Flags passed to only C++ files. -CFLAGS_CC_Debug := \ - -fno-threadsafe-statics \ - -fno-strict-aliasing - -# Flags passed to only ObjC files. -CFLAGS_OBJC_Debug := - -# Flags passed to only ObjC++ files. -CFLAGS_OBJCC_Debug := - -INCS_Debug := \ - -I/Users/tmshv/.node-gyp/0.11.11/src \ - -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include \ - -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include \ - -I$(srcdir)/node_modules/nan - -DEFS_Release := \ - '-D_DARWIN_USE_64_BIT_INODE=1' \ - '-D_LARGEFILE_SOURCE' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DBUILDING_NODE_EXTENSION' - -# Flags passed to all source files. -CFLAGS_Release := \ - -Os \ - -gdwarf-2 \ - -mmacosx-version-min=10.7 \ - -arch x86_64 \ - -Wall \ - -Wendif-labels \ - -W \ - -Wno-unused-parameter - -# Flags passed to only C files. -CFLAGS_C_Release := \ - -fno-strict-aliasing - -# Flags passed to only C++ files. -CFLAGS_CC_Release := \ - -fno-threadsafe-statics \ - -fno-strict-aliasing - -# Flags passed to only ObjC files. -CFLAGS_OBJC_Release := - -# Flags passed to only ObjC++ files. -CFLAGS_OBJCC_Release := - -INCS_Release := \ - -I/Users/tmshv/.node-gyp/0.11.11/src \ - -I/Users/tmshv/.node-gyp/0.11.11/deps/uv/include \ - -I/Users/tmshv/.node-gyp/0.11.11/deps/v8/include \ - -I$(srcdir)/node_modules/nan - -OBJS := \ - $(obj).target/$(TARGET)/binding.o \ - $(obj).target/$(TARGET)/sass_context_wrapper.o \ - $(obj).target/$(TARGET)/libsass/ast.o \ - $(obj).target/$(TARGET)/libsass/base64vlq.o \ - $(obj).target/$(TARGET)/libsass/bind.o \ - $(obj).target/$(TARGET)/libsass/constants.o \ - $(obj).target/$(TARGET)/libsass/context.o \ - $(obj).target/$(TARGET)/libsass/contextualize.o \ - $(obj).target/$(TARGET)/libsass/copy_c_str.o \ - $(obj).target/$(TARGET)/libsass/error_handling.o \ - $(obj).target/$(TARGET)/libsass/eval.o \ - $(obj).target/$(TARGET)/libsass/expand.o \ - $(obj).target/$(TARGET)/libsass/extend.o \ - $(obj).target/$(TARGET)/libsass/file.o \ - $(obj).target/$(TARGET)/libsass/functions.o \ - $(obj).target/$(TARGET)/libsass/inspect.o \ - $(obj).target/$(TARGET)/libsass/output_compressed.o \ - $(obj).target/$(TARGET)/libsass/output_nested.o \ - $(obj).target/$(TARGET)/libsass/parser.o \ - $(obj).target/$(TARGET)/libsass/prelexer.o \ - $(obj).target/$(TARGET)/libsass/sass.o \ - $(obj).target/$(TARGET)/libsass/sass_interface.o \ - $(obj).target/$(TARGET)/libsass/source_map.o \ - $(obj).target/$(TARGET)/libsass/to_c.o \ - $(obj).target/$(TARGET)/libsass/to_string.o \ - $(obj).target/$(TARGET)/libsass/units.o - -# Add to the list of files we specially track dependencies for. -all_deps += $(OBJS) - -# CFLAGS et al overrides must be target-local. -# See "Target-specific Variable Values" in the GNU Make manual. -$(OBJS): TOOLSET := $(TOOLSET) -$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) -$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) -$(OBJS): GYP_OBJCFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE)) -$(OBJS): GYP_OBJCXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE)) - -# Suffix rules, putting all outputs into $(obj). - -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD - @$(call do_cmd,cxx,1) - -# Try building from generated source, too. - -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD - @$(call do_cmd,cxx,1) - -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.cpp FORCE_DO_CMD - @$(call do_cmd,cxx,1) - -# End of this set of suffix rules -### Rules for final target. -LDFLAGS_Debug := \ - -Wl,-search_paths_first \ - -mmacosx-version-min=10.7 \ - -arch x86_64 \ - -L$(builddir) - -LIBTOOLFLAGS_Debug := \ - -Wl,-search_paths_first - -LDFLAGS_Release := \ - -Wl,-search_paths_first \ - -mmacosx-version-min=10.7 \ - -arch x86_64 \ - -L$(builddir) - -LIBTOOLFLAGS_Release := \ - -Wl,-search_paths_first - -LIBS := \ - -undefined dynamic_lookup - -$(builddir)/binding.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE)) -$(builddir)/binding.node: LIBS := $(LIBS) -$(builddir)/binding.node: GYP_LIBTOOLFLAGS := $(LIBTOOLFLAGS_$(BUILDTYPE)) -$(builddir)/binding.node: TOOLSET := $(TOOLSET) -$(builddir)/binding.node: $(OBJS) FORCE_DO_CMD - $(call do_cmd,solink_module) - -all_deps += $(builddir)/binding.node -# Add target alias -.PHONY: binding -binding: $(builddir)/binding.node - -# Short alias for building this executable. -.PHONY: binding.node -binding.node: $(builddir)/binding.node - -# Add executable to "all" target. -.PHONY: all -all: $(builddir)/binding.node - diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/config.gypi b/node_modules/gulp-sass/node_modules/node-sass/build/config.gypi deleted file mode 100644 index 48e65d23..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/config.gypi +++ /dev/null @@ -1,119 +0,0 @@ -# Do not edit. File was generated by node-gyp's "configure" step -{ - "target_defaults": { - "cflags": [], - "default_configuration": "Release", - "defines": [], - "include_dirs": [], - "libraries": [] - }, - "variables": { - "clang": 1, - "host_arch": "x64", - "node_install_npm": "true", - "node_prefix": "", - "node_shared_cares": "false", - "node_shared_http_parser": "false", - "node_shared_libuv": "false", - "node_shared_openssl": "false", - "node_shared_v8": "false", - "node_shared_zlib": "false", - "node_tag": "", - "node_use_dtrace": "true", - "node_use_etw": "false", - "node_use_mdb": "false", - "node_use_openssl": "true", - "node_use_perfctr": "false", - "python": "/usr/bin/python", - "target_arch": "x64", - "uv_parent_path": "/deps/uv/", - "uv_use_dtrace": "true", - "v8_enable_gdbjit": 0, - "v8_enable_i18n_support": 0, - "v8_no_strict_aliasing": 1, - "v8_optimized_debug": 0, - "v8_random_seed": 0, - "v8_use_snapshot": "false", - "nodedir": "/Users/tmshv/.node-gyp/0.11.11", - "copy_dev_lib": "true", - "standalone_static_library": 1, - "save_dev": "true", - "browser": "", - "viewer": "man", - "rollback": "true", - "usage": "", - "globalignorefile": "/usr/etc/npmignore", - "init_author_url": "", - "shell": "/bin/bash", - "parseable": "", - "shrinkwrap": "true", - "email": "", - "init_license": "ISC", - "cache_max": "null", - "init_author_email": "", - "sign_git_tag": "", - "cert": "", - "git_tag_version": "true", - "local_address": "", - "long": "", - "registry": "https://registry.npmjs.org/", - "fetch_retries": "2", - "npat": "", - "key": "", - "message": "%s", - "versions": "", - "globalconfig": "/usr/etc/npmrc", - "always_auth": "", - "cache_lock_retries": "10", - "heading": "npm", - "fetch_retry_mintimeout": "10000", - "proprietary_attribs": "true", - "json": "", - "description": "true", - "engine_strict": "", - "https_proxy": "", - "init_module": "/Users/tmshv/.npm-init.js", - "userconfig": "/Users/tmshv/.npmrc", - "node_version": "v0.11.11", - "user": "", - "editor": "vi", - "save": "", - "tag": "latest", - "global": "", - "optional": "true", - "username": "", - "bin_links": "true", - "force": "", - "searchopts": "", - "depth": "null", - "rebuild_bundle": "true", - "searchsort": "name", - "unicode": "true", - "fetch_retry_maxtimeout": "60000", - "ca": "", - "strict_ssl": "true", - "dev": "", - "fetch_retry_factor": "10", - "group": "20", - "cache_lock_stale": "60000", - "version": "", - "cache_min": "10", - "cache": "/Users/tmshv/.npm", - "searchexclude": "", - "color": "true", - "save_optional": "", - "ignore_scripts": "", - "user_agent": "node/v0.11.11 darwin x64", - "cache_lock_wait": "10000", - "production": "", - "save_bundle": "", - "umask": "18", - "git": "git", - "init_author_name": "", - "onload_script": "", - "tmp": "/var/folders/xb/z59jfbz97cgg04hsk3kg61cc0000gn/T/", - "unsafe_perm": "true", - "link": "", - "prefix": "/usr" - } -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/build/gyp-mac-tool b/node_modules/gulp-sass/node_modules/node-sass/build/gyp-mac-tool deleted file mode 100755 index 12edee94..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/build/gyp-mac-tool +++ /dev/null @@ -1,265 +0,0 @@ -#!/usr/bin/env python -# Generated by gyp. Do not edit. -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Utility functions to perform Xcode-style build steps. - -These functions are executed via gyp-mac-tool when using the Makefile generator. -""" - -import fcntl -import json -import os -import plistlib -import re -import shutil -import string -import subprocess -import sys - - -def main(args): - executor = MacTool() - exit_code = executor.Dispatch(args) - if exit_code is not None: - sys.exit(exit_code) - - -class MacTool(object): - """This class performs all the Mac tooling steps. The methods can either be - executed directly, or dispatched from an argument list.""" - - def Dispatch(self, args): - """Dispatches a string command to a method.""" - if len(args) < 1: - raise Exception("Not enough arguments") - - method = "Exec%s" % self._CommandifyName(args[0]) - return getattr(self, method)(*args[1:]) - - def _CommandifyName(self, name_string): - """Transforms a tool name like copy-info-plist to CopyInfoPlist""" - return name_string.title().replace('-', '') - - def ExecCopyBundleResource(self, source, dest): - """Copies a resource file to the bundle/Resources directory, performing any - necessary compilation on each resource.""" - extension = os.path.splitext(source)[1].lower() - if os.path.isdir(source): - # Copy tree. - # TODO(thakis): This copies file attributes like mtime, while the - # single-file branch below doesn't. This should probably be changed to - # be consistent with the single-file branch. - if os.path.exists(dest): - shutil.rmtree(dest) - shutil.copytree(source, dest) - elif extension == '.xib': - return self._CopyXIBFile(source, dest) - elif extension == '.storyboard': - return self._CopyXIBFile(source, dest) - elif extension == '.strings': - self._CopyStringsFile(source, dest) - else: - shutil.copy(source, dest) - - def _CopyXIBFile(self, source, dest): - """Compiles a XIB file with ibtool into a binary plist in the bundle.""" - - # ibtool sometimes crashes with relative paths. See crbug.com/314728. - base = os.path.dirname(os.path.realpath(__file__)) - if os.path.relpath(source): - source = os.path.join(base, source) - if os.path.relpath(dest): - dest = os.path.join(base, dest) - - args = ['xcrun', 'ibtool', '--errors', '--warnings', '--notices', - '--output-format', 'human-readable-text', '--compile', dest, source] - ibtool_section_re = re.compile(r'/\*.*\*/') - ibtool_re = re.compile(r'.*note:.*is clipping its content') - ibtoolout = subprocess.Popen(args, stdout=subprocess.PIPE) - current_section_header = None - for line in ibtoolout.stdout: - if ibtool_section_re.match(line): - current_section_header = line - elif not ibtool_re.match(line): - if current_section_header: - sys.stdout.write(current_section_header) - current_section_header = None - sys.stdout.write(line) - return ibtoolout.returncode - - def _CopyStringsFile(self, source, dest): - """Copies a .strings file using iconv to reconvert the input into UTF-16.""" - input_code = self._DetectInputEncoding(source) or "UTF-8" - - # Xcode's CpyCopyStringsFile / builtin-copyStrings seems to call - # CFPropertyListCreateFromXMLData() behind the scenes; at least it prints - # CFPropertyListCreateFromXMLData(): Old-style plist parser: missing - # semicolon in dictionary. - # on invalid files. Do the same kind of validation. - import CoreFoundation - s = open(source, 'rb').read() - d = CoreFoundation.CFDataCreate(None, s, len(s)) - _, error = CoreFoundation.CFPropertyListCreateFromXMLData(None, d, 0, None) - if error: - return - - fp = open(dest, 'wb') - fp.write(s.decode(input_code).encode('UTF-16')) - fp.close() - - def _DetectInputEncoding(self, file_name): - """Reads the first few bytes from file_name and tries to guess the text - encoding. Returns None as a guess if it can't detect it.""" - fp = open(file_name, 'rb') - try: - header = fp.read(3) - except e: - fp.close() - return None - fp.close() - if header.startswith("\xFE\xFF"): - return "UTF-16" - elif header.startswith("\xFF\xFE"): - return "UTF-16" - elif header.startswith("\xEF\xBB\xBF"): - return "UTF-8" - else: - return None - - def ExecCopyInfoPlist(self, source, dest, *keys): - """Copies the |source| Info.plist to the destination directory |dest|.""" - # Read the source Info.plist into memory. - fd = open(source, 'r') - lines = fd.read() - fd.close() - - # Insert synthesized key/value pairs (e.g. BuildMachineOSBuild). - plist = plistlib.readPlistFromString(lines) - if keys: - plist = dict(plist.items() + json.loads(keys[0]).items()) - lines = plistlib.writePlistToString(plist) - - # Go through all the environment variables and replace them as variables in - # the file. - IDENT_RE = re.compile('[/\s]') - for key in os.environ: - if key.startswith('_'): - continue - evar = '${%s}' % key - evalue = os.environ[key] - lines = string.replace(lines, evar, evalue) - - # Xcode supports various suffices on environment variables, which are - # all undocumented. :rfc1034identifier is used in the standard project - # template these days, and :identifier was used earlier. They are used to - # convert non-url characters into things that look like valid urls -- - # except that the replacement character for :identifier, '_' isn't valid - # in a URL either -- oops, hence :rfc1034identifier was born. - evar = '${%s:identifier}' % key - evalue = IDENT_RE.sub('_', os.environ[key]) - lines = string.replace(lines, evar, evalue) - - evar = '${%s:rfc1034identifier}' % key - evalue = IDENT_RE.sub('-', os.environ[key]) - lines = string.replace(lines, evar, evalue) - - # Remove any keys with values that haven't been replaced. - lines = lines.split('\n') - for i in range(len(lines)): - if lines[i].strip().startswith("<string>${"): - lines[i] = None - lines[i - 1] = None - lines = '\n'.join(filter(lambda x: x is not None, lines)) - - # Write out the file with variables replaced. - fd = open(dest, 'w') - fd.write(lines) - fd.close() - - # Now write out PkgInfo file now that the Info.plist file has been - # "compiled". - self._WritePkgInfo(dest) - - def _WritePkgInfo(self, info_plist): - """This writes the PkgInfo file from the data stored in Info.plist.""" - plist = plistlib.readPlist(info_plist) - if not plist: - return - - # Only create PkgInfo for executable types. - package_type = plist['CFBundlePackageType'] - if package_type != 'APPL': - return - - # The format of PkgInfo is eight characters, representing the bundle type - # and bundle signature, each four characters. If that is missing, four - # '?' characters are used instead. - signature_code = plist.get('CFBundleSignature', '????') - if len(signature_code) != 4: # Wrong length resets everything, too. - signature_code = '?' * 4 - - dest = os.path.join(os.path.dirname(info_plist), 'PkgInfo') - fp = open(dest, 'w') - fp.write('%s%s' % (package_type, signature_code)) - fp.close() - - def ExecFlock(self, lockfile, *cmd_list): - """Emulates the most basic behavior of Linux's flock(1).""" - # Rely on exception handling to report errors. - fd = os.open(lockfile, os.O_RDONLY|os.O_NOCTTY|os.O_CREAT, 0o666) - fcntl.flock(fd, fcntl.LOCK_EX) - return subprocess.call(cmd_list) - - def ExecFilterLibtool(self, *cmd_list): - """Calls libtool and filters out '/path/to/libtool: file: foo.o has no - symbols'.""" - libtool_re = re.compile(r'^.*libtool: file: .* has no symbols$') - libtoolout = subprocess.Popen(cmd_list, stderr=subprocess.PIPE) - _, err = libtoolout.communicate() - for line in err.splitlines(): - if not libtool_re.match(line): - print >>sys.stderr, line - return libtoolout.returncode - - def ExecPackageFramework(self, framework, version): - """Takes a path to Something.framework and the Current version of that and - sets up all the symlinks.""" - # Find the name of the binary based on the part before the ".framework". - binary = os.path.basename(framework).split('.')[0] - - CURRENT = 'Current' - RESOURCES = 'Resources' - VERSIONS = 'Versions' - - if not os.path.exists(os.path.join(framework, VERSIONS, version, binary)): - # Binary-less frameworks don't seem to contain symlinks (see e.g. - # chromium's out/Debug/org.chromium.Chromium.manifest/ bundle). - return - - # Move into the framework directory to set the symlinks correctly. - pwd = os.getcwd() - os.chdir(framework) - - # Set up the Current version. - self._Relink(version, os.path.join(VERSIONS, CURRENT)) - - # Set up the root symlinks. - self._Relink(os.path.join(VERSIONS, CURRENT, binary), binary) - self._Relink(os.path.join(VERSIONS, CURRENT, RESOURCES), RESOURCES) - - # Back to where we were before! - os.chdir(pwd) - - def _Relink(self, dest, link): - """Creates a symlink to |dest| named |link|. If |link| already exists, - it is overwritten.""" - if os.path.lexists(link): - os.remove(link) - os.symlink(dest, link) - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/node_modules/gulp-sass/node_modules/node-sass/examples/middleware.js b/node_modules/gulp-sass/node_modules/node-sass/examples/middleware.js deleted file mode 100644 index 4c2d6a2c..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/examples/middleware.js +++ /dev/null @@ -1,23 +0,0 @@ - -/** - * Module dependencies. - */ - -var connect = require('connect'), - sass = require('../sass'); - -// Setup server -// $ curl http://localhost:3000/test.css - -var server = connect.createServer( - sass.middleware({ - src: __dirname, - dest: __dirname + '/public', - debug: true, - outputStyle: 'compressed' - }), - connect.static(__dirname + '/public') -); - -server.listen(3000); -console.log('server listening on port 3000'); diff --git a/node_modules/gulp-sass/node_modules/node-sass/examples/public/.npmignore b/node_modules/gulp-sass/node_modules/node-sass/examples/public/.npmignore deleted file mode 100644 index 23188627..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/examples/public/.npmignore +++ /dev/null @@ -1 +0,0 @@ -*.css \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/examples/test.scss b/node_modules/gulp-sass/node_modules/node-sass/examples/test.scss deleted file mode 100644 index 0d646d51..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/examples/test.scss +++ /dev/null @@ -1,13 +0,0 @@ -#navbar { - width: 70%; - height: 23px; } - -#navbar ul { - list-style-type: none; } - -#navbar li { - float: left; - a { - font-weight: bold; - } -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/lib/cli.js b/node_modules/gulp-sass/node_modules/node-sass/lib/cli.js deleted file mode 100644 index debe2b0f..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/lib/cli.js +++ /dev/null @@ -1,156 +0,0 @@ -var watch = require('node-watch'), - render = require('./render'), - path = require('path'), - Emitter = require('events').EventEmitter, - cwd = process.cwd(); - -var optimist = require('optimist') - .usage('Compile .scss files with node-sass.\nUsage: $0 [options] <input.scss> [<output.css>]') - .options('output-style', { - describe: 'CSS output style (nested|expanded|compact|compressed)', - 'default': 'nested' - }) - .options('source-comments', { - describe: 'Include debug info in output (none|normal|map)', - 'default': 'none' - }) - .options('source-map', { - describe: 'Emit source map' - }) - .options('include-path', { - describe: 'Path to look for @import-ed files', - 'default': cwd - }) - .options('watch', { - describe: 'Watch a directory or file', - alias: 'w' - }) - .options('output', { - describe: 'Output css file', - alias: 'o' - }) - .options('stdout', { - describe: 'Print the resulting CSS to stdout' - }) - .options('help', { - describe: 'Print usage info', - type: 'string', - alias: 'help' - }) - .check(function(argv){ - if (argv.help) { return true; } - if (argv._.length < 1) { return false; } - }); - -// throttle function, used so when multiple files change at the same time -// (e.g. git pull) the files are only compiled once. -function throttle(fn) { - var timer; - var args = Array.prototype.slice.call(arguments, 1); - return function() { - var self = this; - clearTimeout(timer); - timer = setTimeout(function() { - fn.apply(self, args); - }, 20); - }; -} - -function isSassFile(file) { - return file.match(/\.(sass|scss)/); -} - -exports = module.exports = function(args) { - var argv = optimist.parse(args); - - if (argv.help) { - optimist.showHelp(); - process.exit(0); - return; - } - - var emitter = new Emitter(); - - emitter.on('error', function(err){ - console.error(err); - process.exit(1); - }); - - var options = { - stdout: argv.stdout - }; - - var inFile = options.inFile = argv._[0]; - var outFile = options.outFile = argv.o || argv._[1]; - - if (!outFile) { - var suffix = '.css'; - if (/\.css$/.test(inFile)) { - suffix = ''; - } - outFile = options.outFile = path.join(cwd, path.basename(inFile, '.scss') + suffix); - } - - // make sure it's an array. - options.includePaths = argv['include-path']; - if (!Array.isArray(options.includePaths)) { - options.includePaths = [options.includePaths]; - } - - // if it's an array, make it a string - options.outputStyle = argv['output-style']; - if (Array.isArray(options.outputStyle)) { - options.outputStyle = options.outputStyle[0]; - } - - // if it's an array, make it a string - options.sourceComments = argv['source-comments']; - if (Array.isArray(options.sourceComments)) { - options.sourceComments = options.sourceComments[0]; - } - - // Set the sourceMap path if the sourceComment was 'map', but set source-map was missing - if (options.sourceComments === 'map' && !argv['source-map']) { - argv['source-map'] = true; - } - - // set source map file and set sourceComments to 'map' - if (argv['source-map']) { - options.sourceComments = 'map'; - if (argv['source-map'] === true) { - options.sourceMap = outFile + '.map'; - } else { - options.sourceMap = path.resolve(cwd, argv['source-map']); - } - } - - if (argv.w) { - - var watchDir = argv.w; - - if (watchDir === true) { - watchDir = []; - } else if (!Array.isArray(watchDir)) { - watchDir = [watchDir]; - } - watchDir.push(inFile); - - var throttledRender = throttle(render, options, emitter); - - watch(watchDir, function(file){ - emitter.emit('warn', '=> changed: '.grey + file.blue); - if (isSassFile(file)) { - throttledRender(); - } - }); - - throttledRender(); - - } else { - render(options, emitter); - } - - return emitter; -}; - -exports.optimist = optimist; diff --git a/node_modules/gulp-sass/node_modules/node-sass/lib/middleware.js b/node_modules/gulp-sass/node_modules/node-sass/lib/middleware.js deleted file mode 100644 index 920b1603..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/lib/middleware.js +++ /dev/null @@ -1,207 +0,0 @@ -var sass = require('../sass'), - fs = require('fs'), - url = require('url'), - dirname = require('path').dirname, - mkdirp = require('mkdirp'), - join = require('path').join; - -var imports = {}; - -/** - * Return Connect middleware with the given `options`. - * - * Options: - * - * `force` Always re-compile - * `debug` Output debugging information - * `src` Source directory used to find .scss files - * `dest` Destination directory used to output .css files - * when undefined defaults to `src`. - * `outputStyle` Sass output style (nested,expanded, compact or compressed) - * - * Examples: - * - * Pass the middleware to Connect, grabbing .scss files from this directory - * and saving .css files to _./public_. - * - * Following that we have a `staticProvider` layer setup to serve the .css - * files generated by Sass. - * - * var server = connect.createServer( - * sass.middleware({ - * src: __dirname - * , dest: __dirname + '/public' - * }) - * , connect.static(__dirname + '/public') - * ); - * - * @param {Object} options - * @return {Function} - * @api public - */ - -module.exports = function(options){ - options = options || {}; - - // Accept src/dest dir - if ('string' == typeof options) { - options = { src: options }; - } - - // Force compilation - var force = options.force; - - // Debug option - var debug = options.debug; - - // Source dir required - var src = options.src; - if (!src) { throw new Error('sass.middleware() requires "src" directory'); } - - // Default dest dir to source - var dest = options.dest - ? options.dest - : src; - - var root = options.root || null; - - // Default compile callback - options.compile = options.compile || function(){ - return sass; - }; - - // Middleware - return function sass(req, res, next){ - if ('GET' != req.method && 'HEAD' != req.method) { return next(); } - var path = url.parse(req.url).pathname; - if (options.prefix && 0 === path.indexOf(options.prefix)) { - path = path.substring(options.prefix.length); - } - if (/\.css$/.test(path)) { - var cssPath = join(dest, path), - sassPath = join(src, path.replace('.css', '.scss')), - sassDir = dirname(sassPath); - - if (root) { - cssPath = join(root, dest, path.replace(dest, '')); - sassPath = join(root, src, path - .replace(dest, '') - .replace('.css', '.scss')); - sassDir = dirname(sassPath); - } - - if (debug) { - log('source', sassPath); - log('dest', cssPath); - } - - // Ignore ENOENT to fall through as 404 - var error = function(err) { - next('ENOENT' == err.code - ? null - : err); - }; - - // Compile to cssPath - var compile = function() { - if (debug) { log('read', cssPath); } - fs.readFile(sassPath, 'utf8', function(err, str){ - if (err) { return error(err); } - var style = options.compile(); - var paths = []; - delete imports[sassPath]; - style.render(str, function(err, css){ - if (err) { return next(err); } - if (debug) { log('render', sassPath); } - imports[sassPath] = paths; - mkdirp(dirname(cssPath), 0700, function(err){ - if (err) { return error(err); } - fs.writeFile(cssPath, css, 'utf8', next); - }); - }, { - include_paths: [ sassDir ].concat(options.include_paths || options.includePaths || []), - output_style: options.output_style || options.outputStyle - }); - }); - }; - - // Force - if (force) { return compile(); } - - // Re-compile on server restart, disregarding - // mtimes since we need to map imports - if (!imports[sassPath]) { return compile(); } - - // Compare mtimes - fs.stat(sassPath, function(err, sassStats){ - if (err) { return error(err); } - fs.stat(cssPath, function(err, cssStats){ - // CSS has not been compiled, compile it! - if (err) { - if ('ENOENT' == err.code) { - if (debug) { log('not found', cssPath); } - compile(); - } else { - next(err); - } - } else { - // Source has changed, compile it - if (sassStats.mtime > cssStats.mtime) { - if (debug) { log('modified', cssPath); } - compile(); - // Already compiled, check imports - } else { - checkImports(sassPath, function(changed){ - if (debug && changed && changed.length) { - changed.forEach(function(path) { - log('modified import %s', path); - }); - } - changed && changed.length ? compile() : next(); - }); - } - } - }); - }); - } else { - next(); - } - }; -}; - -/** - * Check `path`'s imports to see if they have been altered. - * - * @param {String} path - * @param {Function} fn - * @api private - */ - -function checkImports(path, fn) { - var nodes = imports[path]; - if (!nodes) { return fn(); } - if (!nodes.length) { return fn(); } - - var pending = nodes.length, - changed = []; - - nodes.forEach(function(imported){ - fs.stat(imported.path, function(err, stat){ - // error or newer mtime - if (err || !imported.mtime || stat.mtime > imported.mtime) { - changed.push(imported.path); - } - --pending || fn(changed); - }); - }); -} - -/** - * Log a message. - * - * @api private - */ - -function log(key, val) { - console.error(' \033[90m%s :\033[0m \033[36m%s\033[0m', key, val); -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/lib/render.js b/node_modules/gulp-sass/node_modules/node-sass/lib/render.js deleted file mode 100644 index a481d537..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/lib/render.js +++ /dev/null @@ -1,53 +0,0 @@ -var sass = require('../sass'), - chalk = require('chalk'), - fs = require('fs'); - -function render(options, emitter) { - - sass.render({ - file: options.inFile, - includePaths: options.includePaths, - outputStyle: options.outputStyle, - sourceComments: options.sourceComments, - sourceMap: options.sourceMap, - success: function(css, sourceMap) { - - var todo = 1; - var done = function() { - if (--todo <= 0) { - emitter.emit('done'); - } - }; - - emitter.emit('warn', chalk.green('Rendering Complete, saving .css file...')); - - fs.writeFile(options.outFile, css, function(err) { - if (err) { return emitter.emit('error', chalk.red('Error: ' + err)); } - emitter.emit('warn', chalk.green('Wrote CSS to ' + options.outFile)); - emitter.emit('write', err, options.outFile, css); - done(); - }); - - if (options.sourceMap) { - todo++; - fs.writeFile(options.sourceMap, sourceMap, function(err) { - if (err) {return emitter.emit('error', chalk.red('Error' + err)); } - emitter.emit('warn', chalk.green('Wrote Source Map to ' + options.sourceMap)); - emitter.emit('write-source-map', err, options.sourceMap, sourceMap); - done(); - }); - } - - if (options.stdout) { - emitter.emit('log', css); - } - - emitter.emit('render', css); - }, - error: function(error) { - emitter.emit('error', chalk.red(error)); - } - }); -} - -module.exports = render; diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/.npmignore b/node_modules/gulp-sass/node_modules/node-sass/libsass/.npmignore deleted file mode 100644 index 53389aff..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/.npmignore +++ /dev/null @@ -1,50 +0,0 @@ -# Miscellaneous stuff - -.DS_Store -.sass-cache -*.gem -.svn/* -.gitattributes - -# Configuration stuff - -Makefile.in -/aclocal.m4 -/autom4te.cache/ -/config.guess -/config.h -/config.h.in -/config.log -/config.status -/config.sub -/configure -/depcomp -/install-sh -/libtool -/ltmain.sh -/m4/libtool.m4 -/m4/ltoptions.m4 -/m4/ltsugar.m4 -/m4/ltversion.m4 -/m4/lt~obsolete.m4 -/missing -/stamp-h1 -src/Makefile -libsass/* - -# Build stuff - -*.o -*.lo -*.a -a.out - -bin/* -.deps/ -.libs/ - -# Final results - -sassc++ -libsass.la -support/libsass.pc diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/.travis.yml b/node_modules/gulp-sass/node_modules/node-sass/libsass/.travis.yml deleted file mode 100644 index 09c40b32..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: cpp - -compiler: - - gcc - - clang - -env: - - AUTOTOOLS=yes - - AUTOTOOLS=no - -before_install: - - git clone https://github.com/hcatlin/sass-spec.git - - git clone https://github.com/hcatlin/sassc.git - - export SASS_SPEC_PATH=$TRAVIS_BUILD_DIR/sass-spec - - export SASS_SASSC_PATH=$TRAVIS_BUILD_DIR/sassc - - export SASS_LIBSASS_PATH=$TRAVIS_BUILD_DIR - -script: ./travis.sh diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/COPYING b/node_modules/gulp-sass/node_modules/node-sass/libsass/COPYING deleted file mode 100644 index 8639c111..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/COPYING +++ /dev/null @@ -1,25 +0,0 @@ - -Copyright (C) 2012 by Hampton Catlin - -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. - - -The following files in the spec were taken from the original Ruby Sass project which -is copyright Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein and under -the same license. diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/INSTALL b/node_modules/gulp-sass/node_modules/node-sass/libsass/INSTALL deleted file mode 100644 index a1e89e18..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/INSTALL +++ /dev/null @@ -1,370 +0,0 @@ -Installation Instructions -************************* - -Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, -Inc. - - Copying and distribution of this file, with or without modification, -are permitted in any medium without royalty provided the copyright -notice and this notice are preserved. This file is offered as-is, -without warranty of any kind. - -Basic Installation -================== - - Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following -more-detailed instructions are generic; see the `README' file for -instructions specific to this package. Some packages provide this -`INSTALL' file but do not implement all of the features documented -below. The lack of an optional feature in a given package is not -necessarily a bug. More recommendations for GNU packages can be found -in *note Makefile Conventions: (standards)Makefile Conventions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. Caching is -disabled by default to prevent problems with accidental use of stale -cache files. - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You need `configure.ac' if -you want to change it or regenerate `configure' using a newer version -of `autoconf'. - - The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. - - Running `configure' might take a while. While running, it prints - some messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package, generally using the just-built uninstalled binaries. - - 4. Type `make install' to install the programs and any data files and - documentation. When installing into a prefix owned by root, it is - recommended that the package be configured and built as a regular - user, and only the `make install' phase executed with root - privileges. - - 5. Optionally, type `make installcheck' to repeat any self-tests, but - this time using the binaries in their final installed location. - This target does not install anything. Running this target as a - regular user, particularly if the prior `make install' required - root privileges, verifies that the installation completed - correctly. - - 6. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - - 7. Often, you can also type `make uninstall' to remove the installed - files again. In practice, not all packages have tested that - uninstallation works correctly, even though it is required by the - GNU Coding Standards. - - 8. Some packages, particularly those that use Automake, provide `make - distcheck', which can by used by developers to test that all other - targets like `make install' and `make uninstall' work correctly. - This target is generally not run by end users. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. Run `./configure --help' -for details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c99 CFLAGS=-g LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you can use GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. This -is known as a "VPATH" build. - - With a non-GNU `make', it is safer to compile the package for one -architecture at a time in the source code directory. After you have -installed the package for one architecture, use `make distclean' before -reconfiguring for another architecture. - - On MacOS X 10.5 and later systems, you can create libraries and -executables that work on multiple system types--known as "fat" or -"universal" binaries--by specifying multiple `-arch' options to the -compiler but only a single `-arch' option to the preprocessor. Like -this: - - ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CPP="gcc -E" CXXCPP="g++ -E" - - This is not guaranteed to produce working output in all cases, you -may have to build one architecture at a time and combine the results -using the `lipo' tool if you have problems. - -Installation Names -================== - - By default, `make install' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX', where PREFIX must be an -absolute file name. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses -PREFIX as the prefix for installing programs and libraries. -Documentation and other data files still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. In general, the -default for these options is expressed in terms of `${prefix}', so that -specifying just `--prefix' will affect all of the other directory -specifications that were not explicitly provided. - - The most portable way to affect installation locations is to pass the -correct locations to `configure'; however, many packages provide one or -both of the following shortcuts of passing variable assignments to the -`make install' command line to change installation locations without -having to reconfigure or recompile. - - The first method involves providing an override variable for each -affected directory. For example, `make install -prefix=/alternate/directory' will choose an alternate location for all -directory configuration variables that were expressed in terms of -`${prefix}'. Any directories that were specified during `configure', -but not in terms of `${prefix}', must each be overridden at install -time for the entire installation to be relocated. The approach of -makefile variable overrides for each directory variable is required by -the GNU Coding Standards, and ideally causes no recompilation. -However, some platforms have known limitations with the semantics of -shared libraries that end up requiring recompilation when using this -method, particularly noticeable in packages that use GNU Libtool. - - The second method involves providing the `DESTDIR' variable. For -example, `make install DESTDIR=/alternate/directory' will prepend -`/alternate/directory' before all installation names. The approach of -`DESTDIR' overrides is not required by the GNU Coding Standards, and -does not work on platforms that have drive letters. On the other hand, -it does better at avoiding recompilation issues, and works well even -when some directory options were not specified in terms of `${prefix}' -at `configure' time. - -Optional Features -================= - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - - Some packages offer the ability to configure how verbose the -execution of `make' will be. For these packages, running `./configure ---enable-silent-rules' sets the default to minimal output, which can be -overridden with `make V=1'; while running `./configure ---disable-silent-rules' sets the default to verbose, which can be -overridden with `make V=0'. - -Particular systems -================== - - On HP-UX, the default C compiler is not ANSI C compatible. If GNU -CC is not installed, it is recommended to use the following options in -order to use an ANSI C compiler: - - ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" - -and if that doesn't work, install pre-built binaries of GCC for HP-UX. - - HP-UX `make' updates targets which have the same time stamps as -their prerequisites, which makes it generally unusable when shipped -generated files such as `configure' are involved. Use GNU `make' -instead. - - On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot -parse its `<wchar.h>' header file. The option `-nodtk' can be used as -a workaround. If GNU CC is not installed, it is therefore recommended -to try - - ./configure CC="cc" - -and if that doesn't work, try - - ./configure CC="cc -nodtk" - - On Solaris, don't put `/usr/ucb' early in your `PATH'. This -directory contains several dysfunctional programs; working variants of -these programs are available in `/usr/bin'. So, if you need `/usr/ucb' -in your `PATH', put it _after_ `/usr/bin'. - - On Haiku, software installed for all users goes in `/boot/common', -not `/usr/local'. It is recommended to use the following options: - - ./configure --prefix=/boot/common - -Specifying the System Type -========================== - - There may be some features `configure' cannot figure out -automatically, but needs to determine by the type of machine the package -will run on. Usually, assuming the package is built to be run on the -_same_ architectures, `configure' can figure that out, but if it prints -a message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS - KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the option `--target=TYPE' to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - - Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). - -Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: - - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash - -`configure' Invocation -====================== - - `configure' recognizes the following options to control how it -operates. - -`--help' -`-h' - Print a summary of all of the options to `configure', and exit. - -`--help=short' -`--help=recursive' - Print a summary of the options unique to this package's - `configure', and exit. The `short' variant lists options used - only in the top level, while the `recursive' variant lists options - also present in any nested packages. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`--prefix=DIR' - Use DIR as the installation prefix. *note Installation Names:: - for more details, including other options available for fine-tuning - the installation locations. - -`--no-create' -`-n' - Run the configure checks, but stop before creating any output - files. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/LICENSE b/node_modules/gulp-sass/node_modules/node-sass/libsass/LICENSE deleted file mode 100644 index 8639c111..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ - -Copyright (C) 2012 by Hampton Catlin - -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. - - -The following files in the spec were taken from the original Ruby Sass project which -is copyright Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein and under -the same license. diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/Makefile b/node_modules/gulp-sass/node_modules/node-sass/libsass/Makefile deleted file mode 100644 index e4904f77..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -CXX = g++ -CXXFLAGS = -Wall -O2 -fPIC -LDFLAGS = -fPIC - -PREFIX = /usr/local -LIBDIR = $(PREFIX)/lib - -SASS_SASSC_PATH ?= sassc -SASS_SPEC_PATH ?= sass-spec -SASSC_BIN = $(SASS_SASSC_PATH)/bin/sassc - -SOURCES = ast.cpp base64vlq.cpp bind.cpp constants.cpp context.cpp contextualize.cpp \ - copy_c_str.cpp error_handling.cpp eval.cpp expand.cpp extend.cpp file.cpp \ - functions.cpp inspect.cpp output_compressed.cpp output_nested.cpp \ - parser.cpp prelexer.cpp sass.cpp sass_interface.cpp source_map.cpp to_c.cpp to_string.cpp \ - units.cpp - -OBJECTS = $(SOURCES:.cpp=.o) - -all: static - -static: libsass.a -shared: libsass.so - -libsass.a: $(OBJECTS) - ar rvs $@ $(OBJECTS) - -libsass.so: $(OBJECTS) - $(CXX) -shared $(LDFLAGS) -o $@ $(OBJECTS) - -%.o: %.cpp - $(CXX) $(CXXFLAGS) -c -o $@ $< - -%: %.o libsass.a - $(CXX) $(CXXFLAGS) -o $@ $+ $(LDFLAGS) - -install: libsass.a - install -Dpm0755 $< $(DESTDIR)$(LIBDIR)/$< - -install-shared: libsass.so - install -Dpm0755 $< $(DESTDIR)$(LIBDIR)/$< - -$(SASSC_BIN): libsass.a - cd $(SASS_SASSC_PATH) && make - -test: $(SASSC_BIN) libsass.a - ruby $(SASS_SPEC_PATH)/sass-spec.rb -c $(SASSC_BIN) -s $(LOG_FLAGS) $(SASS_SPEC_PATH) - -test_build: $(SASSC_BIN) libsass.a - ruby $(SASS_SPEC_PATH)/sass-spec.rb -c $(SASSC_BIN) -s --ignore-todo $(LOG_FLAGS) $(SASS_SPEC_PATH) - -test_issues: $(SASSC_BIN) libsass.a - ruby $(SASS_SPEC_PATH)/sass-spec.rb -c $(SASSC_BIN) $(LOG_FLAGS) $(SASS_SPEC_PATH)/spec/issues - -clean: - rm -f $(OBJECTS) *.a *.so - - -.PHONY: all static shared bin install install-shared clean - diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/Makefile.am b/node_modules/gulp-sass/node_modules/node-sass/libsass/Makefile.am deleted file mode 100644 index dc24600e..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/Makefile.am +++ /dev/null @@ -1,57 +0,0 @@ -ACLOCAL_AMFLAGS = -I m4 - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = support/libsass.pc - -lib_LTLIBRARIES = libsass.la -libsass_la_SOURCES = ast.cpp base64vlq.cpp bind.cpp constants.cpp context.cpp contextualize.cpp \ - copy_c_str.cpp error_handling.cpp eval.cpp expand.cpp extend.cpp file.cpp \ - functions.cpp inspect.cpp output_compressed.cpp output_nested.cpp \ - parser.cpp prelexer.cpp sass.cpp sass_interface.cpp source_map.cpp to_c.cpp to_string.cpp \ - units.cpp -libsass_la_LDFLAGS = -no-undefined -version-info 0:0:0 - -include_HEADERS = sass_interface.h sass.h - -check_PROGRAMS = sassc++ - -sassc___SOURCES = sassc++.cpp -sassc___LDADD = libsass.la - -if ENABLE_TESTS - -noinst_PROGRAMS = sass-tester - -sass_tester_SOURCES = $(SASS_SASSC_PATH)/sassc.c -sass_tester_LDADD = libsass.la -sass_tester_LDFLAGS = -no-install - -TESTS = \ - $(SASS_SPEC_PATH)/spec/basic \ - $(SASS_SPEC_PATH)/spec/benchmarks \ - $(SASS_SPEC_PATH)/spec/bourbon \ - $(SASS_SPEC_PATH)/spec/libsass \ - $(SASS_SPEC_PATH)/spec/scss \ - $(SASS_SPEC_PATH)/spec/todo - -LOG_COMPILER = $(RUBY) $(SASS_SPEC_PATH)/sass-spec.rb -AM_LOG_FLAGS = -c ./sass-tester - -SASS_SASSC_PATH ?= sassc -SASS_SPEC_PATH ?= sass-spec -SASSC_BIN = $(SASS_SASSC_PATH)/bin/sassc - -$(SASSC_BIN): libsass.la - cd $(SASS_SASSC_PATH) && make - -test: $(SASSC_BIN) libsass.la - ruby $(SASS_SPEC_PATH)/sass-spec.rb -c $(SASSC_BIN) -s $(LOG_FLAGS) $(SASS_SPEC_PATH) - -test_build: $(SASSC_BIN) libsass.la - ruby $(SASS_SPEC_PATH)/sass-spec.rb -c $(SASSC_BIN) -s --ignore-todo $(LOG_FLAGS) $(SASS_SPEC_PATH) - -test_issues: $(SASSC_BIN) libsass.la - ruby $(SASS_SPEC_PATH)/sass-spec.rb -c $(SASSC_BIN) $(LOG_FLAGS) $(SASS_SPEC_PATH)/spec/issues - -endif - diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/Readme.md b/node_modules/gulp-sass/node_modules/node-sass/libsass/Readme.md deleted file mode 100644 index 56d71114..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/Readme.md +++ /dev/null @@ -1,113 +0,0 @@ -Libsass -======= - -by Aaron Leung and Hampton Catlin (@hcatlin) - -[![Build Status](https://travis-ci.org/hcatlin/libsass.png?branch=master)](https://travis-ci.org/hcatlin/libsass) - -http://github.com/hcatlin/libsass - -Libsass is just a library, but if you want to RUN libsass, -then go to http://github.com/hcatlin/sassc or -http://github.com/hcatlin/sassruby or find your local -implementer. - -About ------ - -Libsass is a C/C++ port of the Sass CSS precompiler. The original version was written in Ruby, but this version is meant for efficiency and portability. - -This library strives to be light, simple, and easy to build and integrate with a variety of platforms and languages. - -Developing ----------- - -As you may have noticed, the libsass repo itself has -no executables and no tests. Oh noes! How can you develop??? - -Well, luckily, SassC is the official binary wrapper for -libsass and is *always* kept in sync. SassC uses a git submodule -to include libsass. When developing libsass, its best to actually -check out SassC and develop in that directory with the SassC spec -and tests there. - -We even run Travis tests for SassC! - -Tests -------- - -Since libsass is a pure library, tests are run through the [SassSpec](http://github.com/hcatlin/sass-spec) project using the [SassC](http://github.com/hcatlin/sassc) driver. - -To run tests against libsass while developing, please ensure you have the latest version of the above projects cloned, and then define the following environment variables: - - export SASS_SPEC_PATH=~/path/sass-spec - export SASS_SASSC_PATH=~/path/sassc - export SASS_LIBSASS_PATH=~/path/libsass - -Obviously, update them to your local environment. Then, its just a matter of running... - - make test - -Usage ------ - -While libsass is primarily implemented in C++, it provides a simple -C interface that is defined in [sass_interface.h]. Its usage is pretty -straight forward. - -First, you create a sass context struct. We use these objects to define -different execution parameters for the library. There are three -different context types. - - sass_context // string-in-string-out compilation - sass_file_context // file-based compilation - sass_folder_context // full-folder multi-file - -Each of the contexts have slightly different behavior and are -implemented seperately. This does add extra work to implementing -a wrapper library, but we felt that a mixed-use context object -provides for too much implicit logic. What if you set "input_string" -AND "input_file"... what do we do? This would introduce bugs into -wrapper libraries that would be difficult to debug. - -We anticipate that most adapters in most languages will define -their own logic for how to separate these use cases based on the -language. For instance, the original Ruby interface has a combined -interface, but is backed by three different processes. - -To generate a context, use one of the following methods. - - sass_new_context() - sass_new_file_context() - sass_new_folder_context() - -Again, please see the sass_interface.h for more information. - -And, to get even more information, then please see the implementations -in SassC and SassC-Ruby. - -About Sass ----------- - -Sass is a CSS pre-processor language to add on exciting, new, -awesome features to CSS. Sass was the first language of its kind -and by far the most mature and up to date codebase. - -Sass was originally created by the co-creator of this library, -Hampton Catlin (@hcatlin). The extension and continuing evolution -of the language has all been the result of years of work by Nathan -Weizenbaum (@nex3) and Chris Eppstein (@chriseppstein). - -For more information about Sass itself, please visit http://sass-lang.com - -Contribution Agreement ----------------------- - -Any contribution to the project are seen as copyright assigned to Hampton Catlin, a -human on the planet earth. Your contribution warrants that you have the right to -assign copyright on your work. The intention here is to ensure that the project -remains totally free (liberal, like). - -Our MIT license is designed to be as simple, and liberal as possible. - - diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/ast.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/ast.cpp deleted file mode 100644 index 9b1c3111..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/ast.cpp +++ /dev/null @@ -1,76 +0,0 @@ -#include "ast.hpp" -#include "context.hpp" -#include "to_string.hpp" -#include <iostream> - -namespace Sass { - using namespace std; - - bool Compound_Selector::operator<(const Compound_Selector& rhs) const - { - To_String to_string; - // ugly - return const_cast<Compound_Selector*>(this)->perform(&to_string) < - const_cast<Compound_Selector&>(rhs).perform(&to_string); - } - - Compound_Selector* Complex_Selector::base() - { - if (!tail()) return head(); - else return tail()->base(); - } - - Complex_Selector* Complex_Selector::context(Context& ctx) - { - if (!tail()) return 0; - if (!head()) return tail()->context(ctx); - return new (ctx.mem) Complex_Selector(path(), position(), combinator(), head(), tail()->context(ctx)); - } - - Complex_Selector* Complex_Selector::innermost() - { - if (!tail()) return this; - else return tail()->innermost(); - } - - Selector_Placeholder* Selector::find_placeholder() - { - return 0; - } - - Selector_Placeholder* Selector_List::find_placeholder() - { - if (has_placeholder()) { - for (size_t i = 0, L = length(); i < L; ++i) { - if ((*this)[i]->has_placeholder()) return (*this)[i]->find_placeholder(); - } - } - return 0; - } - - Selector_Placeholder* Complex_Selector::find_placeholder() - { - if (has_placeholder()) { - if (head() && head()->has_placeholder()) return head()->find_placeholder(); - else if (tail() && tail()->has_placeholder()) return tail()->find_placeholder(); - } - return 0; - } - - Selector_Placeholder* Compound_Selector::find_placeholder() - { - if (has_placeholder()) { - for (size_t i = 0, L = length(); i < L; ++i) { - if ((*this)[i]->has_placeholder()) return (*this)[i]->find_placeholder(); - } - // return this; - } - return 0; - } - - Selector_Placeholder* Selector_Placeholder::find_placeholder() - { - return this; - } - -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/ast.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/ast.hpp deleted file mode 100644 index c333df79..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/ast.hpp +++ /dev/null @@ -1,1234 +0,0 @@ -#define SASS_AST - -#include <string> -#include <sstream> -#include <vector> -#include <algorithm> - -#ifdef __clang__ - -/* - * There are some overloads used here that trigger the clang overload - * hiding warning. Specifically: - * - * Type type() which hides string type() from Expression - * - * and - * - * Block* block() which hides virtual Block* block() from Statement - * - */ - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Woverloaded-virtual" - -#endif - - -#ifndef SASS_OPERATION -#include "operation.hpp" -#endif - -#ifndef SASS_TOKEN -#include "token.hpp" -#endif - -#ifndef SASS_ENVIRONMENT -#include "environment.hpp" -#endif - -#ifndef SASS -#include "sass.h" -#endif - -#include "units.hpp" - -#ifndef SASS_ERROR_HANDLING -#include "error_handling.hpp" -#endif - -#include "ast_def_macros.hpp" - -#include <sstream> -#include <iostream> -#include <typeinfo> - -#ifndef SASS_POSITION -#include "position.hpp" -#endif - -namespace Sass { - using namespace std; - - ///////////////////////////////////////////////////////////////////////////// - // Mixin class for AST nodes that should behave like vectors. Uses the - // "Template Method" design pattern to allow subclasses to adjust their flags - // when certain objects are pushed. - ///////////////////////////////////////////////////////////////////////////// - template <typename T> - class Vectorized { - vector<T> elements_; - protected: - virtual void adjust_after_pushing(T element) { } - public: - Vectorized(size_t s = 0) : elements_(vector<T>()) - { elements_.reserve(s); } - virtual ~Vectorized() = 0; - size_t length() const { return elements_.size(); } - bool empty() const { return elements_.empty(); } - T& operator[](size_t i) { return elements_[i]; } - Vectorized& operator<<(T element) - { - elements_.push_back(element); - adjust_after_pushing(element); - return *this; - } - Vectorized& operator+=(Vectorized* v) - { - for (size_t i = 0, L = v->length(); i < L; ++i) *this << (*v)[i]; - return *this; - } - vector<T>& elements() { return elements_; } - }; - template <typename T> - inline Vectorized<T>::~Vectorized() { } - - ////////////////////////////////////////////////////////// - // Abstract base class for all abstract syntax tree nodes. - ////////////////////////////////////////////////////////// - class Block; - class Statement; - class Expression; - class Selector; - class AST_Node { - ADD_PROPERTY(string, path); - ADD_PROPERTY(Position, position); - public: - AST_Node(string path, Position position) : path_(path), position_(position) { } - virtual ~AST_Node() = 0; - // virtual Block* block() { return 0; } - ATTACH_OPERATIONS(); - }; - inline AST_Node::~AST_Node() { } - - ///////////////////////////////////////////////////////////////////////// - // Abstract base class for statements. This side of the AST hierarchy - // represents elements in expansion contexts, which exist primarily to be - // rewritten and macro-expanded. - ///////////////////////////////////////////////////////////////////////// - class Statement : public AST_Node { - public: - Statement(string path, Position position) : AST_Node(path, position) { } - virtual ~Statement() = 0; - // needed for rearranging nested rulesets during CSS emission - virtual bool is_hoistable() { return false; } - virtual Block* block() { return 0; } - }; - inline Statement::~Statement() { } - - //////////////////////// - // Blocks of statements. - //////////////////////// - class Block : public Statement, public Vectorized<Statement*> { - ADD_PROPERTY(bool, is_root); - // needed for properly formatted CSS emission - ADD_PROPERTY(bool, has_hoistable); - ADD_PROPERTY(bool, has_non_hoistable); - protected: - void adjust_after_pushing(Statement* s) - { - if (s->is_hoistable()) has_hoistable_ = true; - else has_non_hoistable_ = true; - }; - public: - Block(string path, Position position, size_t s = 0, bool r = false) - : Statement(path, position), - Vectorized<Statement*>(s), - is_root_(r), has_hoistable_(false), has_non_hoistable_(false) - { } - Block* block() { return this; } - ATTACH_OPERATIONS(); - }; - - //////////////////////////////////////////////////////////////////////// - // Abstract base class for statements that contain blocks of statements. - //////////////////////////////////////////////////////////////////////// - class Has_Block : public Statement { - ADD_PROPERTY(Block*, block); - public: - Has_Block(string path, Position position, Block* b) - : Statement(path, position), block_(b) - { } - virtual ~Has_Block() = 0; - }; - inline Has_Block::~Has_Block() { } - - ///////////////////////////////////////////////////////////////////////////// - // Rulesets (i.e., sets of styles headed by a selector and containing a block - // of style declarations. - ///////////////////////////////////////////////////////////////////////////// - class Selector; - class Ruleset : public Has_Block { - ADD_PROPERTY(Selector*, selector); - public: - Ruleset(string path, Position position, Selector* s, Block* b) - : Has_Block(path, position, b), selector_(s) - { } - // nested rulesets need to be hoisted out of their enclosing blocks - bool is_hoistable() { return true; } - ATTACH_OPERATIONS(); - }; - - ///////////////////////////////////////////////////////// - // Nested declaration sets (i.e., namespaced properties). - ///////////////////////////////////////////////////////// - class String; - class Propset : public Has_Block { - ADD_PROPERTY(String*, property_fragment); - public: - Propset(string path, Position position, String* pf, Block* b = 0) - : Has_Block(path, position, b), property_fragment_(pf) - { } - ATTACH_OPERATIONS(); - }; - - ///////////////// - // Media queries. - ///////////////// - class List; - class Media_Block : public Has_Block { - ADD_PROPERTY(List*, media_queries); - ADD_PROPERTY(Selector*, enclosing_selector); - public: - Media_Block(string path, Position position, List* mqs, Block* b) - : Has_Block(path, position, b), media_queries_(mqs), enclosing_selector_(0) - { } - bool is_hoistable() { return true; } - ATTACH_OPERATIONS(); - }; - - /////////////////////////////////////////////////////////////////////// - // At-rules -- arbitrary directives beginning with "@" that may have an - // optional statement block. - /////////////////////////////////////////////////////////////////////// - class At_Rule : public Has_Block { - ADD_PROPERTY(string, keyword); - ADD_PROPERTY(Selector*, selector); - public: - At_Rule(string path, Position position, string kwd, Selector* sel = 0, Block* b = 0) - : Has_Block(path, position, b), keyword_(kwd), selector_(sel) - { } - ATTACH_OPERATIONS(); - }; - - //////////////////////////////////////////////////////////////////////// - // Declarations -- style rules consisting of a property name and values. - //////////////////////////////////////////////////////////////////////// - class Declaration : public Statement { - ADD_PROPERTY(String*, property); - ADD_PROPERTY(Expression*, value); - ADD_PROPERTY(bool, is_important); - public: - Declaration(string path, Position position, - String* prop, Expression* val, bool i = false) - : Statement(path, position), property_(prop), value_(val), is_important_(i) - { } - ATTACH_OPERATIONS(); - }; - - ///////////////////////////////////// - // Assignments -- variable and value. - ///////////////////////////////////// - class Variable; - class Expression; - class Assignment : public Statement { - ADD_PROPERTY(string, variable); - ADD_PROPERTY(Expression*, value); - ADD_PROPERTY(bool, is_guarded); - public: - Assignment(string path, Position position, - string var, Expression* val, bool guarded = false) - : Statement(path, position), variable_(var), value_(val), is_guarded_(guarded) - { } - ATTACH_OPERATIONS(); - }; - - //////////////////////////////////////////////////////////////////////////// - // Import directives. CSS and Sass import lists can be intermingled, so it's - // necessary to store a list of each in an Import node. - //////////////////////////////////////////////////////////////////////////// - class Import : public Statement { - vector<string> files_; - vector<Expression*> urls_; - public: - Import(string path, Position position) - : Statement(path, position), - files_(vector<string>()), urls_(vector<Expression*>()) - { } - vector<string>& files() { return files_; } - vector<Expression*>& urls() { return urls_; } - ATTACH_OPERATIONS(); - }; - - class Import_Stub : public Statement { - ADD_PROPERTY(string, file_name); - public: - Import_Stub(string path, Position position, string f) - : Statement(path, position), file_name_(f) - { } - ATTACH_OPERATIONS(); - }; - - ////////////////////////////// - // The Sass `@warn` directive. - ////////////////////////////// - class Warning : public Statement { - ADD_PROPERTY(Expression*, message); - public: - Warning(string path, Position position, Expression* msg) - : Statement(path, position), message_(msg) - { } - ATTACH_OPERATIONS(); - }; - - /////////////////////////////////////////// - // CSS comments. These may be interpolated. - /////////////////////////////////////////// - class Comment : public Statement { - ADD_PROPERTY(String*, text); - public: - Comment(string path, Position position, String* txt) - : Statement(path, position), text_(txt) - { } - ATTACH_OPERATIONS(); - }; - - //////////////////////////////////// - // The Sass `@if` control directive. - //////////////////////////////////// - class If : public Statement { - ADD_PROPERTY(Expression*, predicate); - ADD_PROPERTY(Block*, consequent); - ADD_PROPERTY(Block*, alternative); - public: - If(string path, Position position, Expression* pred, Block* con, Block* alt = 0) - : Statement(path, position), predicate_(pred), consequent_(con), alternative_(alt) - { } - ATTACH_OPERATIONS(); - }; - - ///////////////////////////////////// - // The Sass `@for` control directive. - ///////////////////////////////////// - class For : public Has_Block { - ADD_PROPERTY(string, variable); - ADD_PROPERTY(Expression*, lower_bound); - ADD_PROPERTY(Expression*, upper_bound); - ADD_PROPERTY(bool, is_inclusive); - public: - For(string path, Position position, - string var, Expression* lo, Expression* hi, Block* b, bool inc) - : Has_Block(path, position, b), - variable_(var), lower_bound_(lo), upper_bound_(hi), is_inclusive_(inc) - { } - ATTACH_OPERATIONS(); - }; - - ////////////////////////////////////// - // The Sass `@each` control directive. - ////////////////////////////////////// - class Each : public Has_Block { - ADD_PROPERTY(string, variable); - ADD_PROPERTY(Expression*, list); - public: - Each(string path, Position position, string var, Expression* lst, Block* b) - : Has_Block(path, position, b), variable_(var), list_(lst) - { } - ATTACH_OPERATIONS(); - }; - - /////////////////////////////////////// - // The Sass `@while` control directive. - /////////////////////////////////////// - class While : public Has_Block { - ADD_PROPERTY(Expression*, predicate); - public: - While(string path, Position position, Expression* pred, Block* b) - : Has_Block(path, position, b), predicate_(pred) - { } - ATTACH_OPERATIONS(); - }; - - ///////////////////////////////////////////////////////////// - // The @return directive for use inside SassScript functions. - ///////////////////////////////////////////////////////////// - class Return : public Statement { - ADD_PROPERTY(Expression*, value); - public: - Return(string path, Position position, Expression* val) - : Statement(path, position), value_(val) - { } - ATTACH_OPERATIONS(); - }; - - //////////////////////////////// - // The Sass `@extend` directive. - //////////////////////////////// - class Extension : public Statement { - ADD_PROPERTY(Selector*, selector); - public: - Extension(string path, Position position, Selector* s) - : Statement(path, position), selector_(s) - { } - ATTACH_OPERATIONS(); - }; - - ///////////////////////////////////////////////////////////////////////////// - // Definitions for both mixins and functions. The two cases are distinguished - // by a type tag. - ///////////////////////////////////////////////////////////////////////////// - struct Context; - struct Backtrace; - class Parameters; - typedef Environment<AST_Node*> Env; - typedef const char* Signature; - typedef Expression* (*Native_Function)(Env&, Context&, Signature, const string&, Position, Backtrace*); - typedef const char* Signature; - class Definition : public Has_Block { - public: - enum Type { MIXIN, FUNCTION }; - ADD_PROPERTY(string, name); - ADD_PROPERTY(Parameters*, parameters); - ADD_PROPERTY(Env*, environment); - ADD_PROPERTY(Type, type); - ADD_PROPERTY(Native_Function, native_function); - ADD_PROPERTY(Sass_C_Function, c_function); - ADD_PROPERTY(bool, is_overload_stub); - ADD_PROPERTY(Signature, signature); - public: - Definition(string path, - Position position, - string n, - Parameters* params, - Block* b, - Type t) - : Has_Block(path, position, b), - name_(n), - parameters_(params), - environment_(0), - type_(t), - native_function_(0), - c_function_(0), - is_overload_stub_(false), - signature_(0) - { } - Definition(string path, - Position position, - Signature sig, - string n, - Parameters* params, - Native_Function func_ptr, - bool overload_stub = false) - : Has_Block(path, position, 0), - name_(n), - parameters_(params), - environment_(0), - type_(FUNCTION), - native_function_(func_ptr), - c_function_(0), - is_overload_stub_(overload_stub), - signature_(sig) - { } - Definition(string path, - Position position, - Signature sig, - string n, - Parameters* params, - Sass_C_Function func_ptr, - bool whatever, - bool whatever2) - : Has_Block(path, position, 0), - name_(n), - parameters_(params), - environment_(0), - type_(FUNCTION), - native_function_(0), - c_function_(func_ptr), - is_overload_stub_(false), - signature_(sig) - { } - ATTACH_OPERATIONS(); - }; - - ////////////////////////////////////// - // Mixin calls (i.e., `@include ...`). - ////////////////////////////////////// - class Arguments; - class Mixin_Call : public Has_Block { - ADD_PROPERTY(string, name); - ADD_PROPERTY(Arguments*, arguments); - public: - Mixin_Call(string path, Position position, string n, Arguments* args, Block* b = 0) - : Has_Block(path, position, b), name_(n), arguments_(args) - { } - ATTACH_OPERATIONS(); - }; - - /////////////////////////////////////////////////// - // The @content directive for mixin content blocks. - /////////////////////////////////////////////////// - class Content : public Statement { - public: - Content(string path, Position position) : Statement(path, position) { } - ATTACH_OPERATIONS(); - }; - - ////////////////////////////////////////////////////////////////////// - // Abstract base class for expressions. This side of the AST hierarchy - // represents elements in value contexts, which exist primarily to be - // evaluated and returned. - ////////////////////////////////////////////////////////////////////// - class Expression : public AST_Node { - public: - enum Concrete_Type { - NONE, - BOOLEAN, - NUMBER, - COLOR, - STRING, - LIST, - NULL_VAL, - NUM_TYPES - }; - private: - // expressions in some contexts shouldn't be evaluated - ADD_PROPERTY(bool, is_delayed); - ADD_PROPERTY(bool, is_interpolant); - ADD_PROPERTY(Concrete_Type, concrete_type); - public: - Expression(string path, Position position, - bool d = false, bool i = false, Concrete_Type ct = NONE) - : AST_Node(path, position), - is_delayed_(d), is_interpolant_(i), concrete_type_(ct) - { } - virtual operator bool() { return true; } - virtual ~Expression() = 0; - virtual string type() { return ""; /* TODO: raise an error? */ } - virtual bool is_invisible() { return false; } - static string type_name() { return ""; } - virtual bool is_false() { return false; } - }; - inline Expression::~Expression() { } - - /////////////////////////////////////////////////////////////////////// - // Lists of values, both comma- and space-separated (distinguished by a - // type-tag.) Also used to represent variable-length argument lists. - /////////////////////////////////////////////////////////////////////// - class List : public Expression, public Vectorized<Expression*> { - public: - enum Separator { SPACE, COMMA }; - private: - ADD_PROPERTY(Separator, separator); - ADD_PROPERTY(bool, is_arglist); - public: - List(string path, Position position, - size_t size = 0, Separator sep = SPACE, bool argl = false) - : Expression(path, position), - Vectorized<Expression*>(size), - separator_(sep), is_arglist_(argl) - { concrete_type(LIST); } - string type() { return is_arglist_ ? "arglist" : "list"; } - static string type_name() { return "list"; } - bool is_invisible() { return !length(); } - ATTACH_OPERATIONS(); - }; - - ////////////////////////////////////////////////////////////////////////// - // Binary expressions. Represents logical, relational, and arithmetic - // operations. Templatized to avoid large switch statements and repetitive - // subclassing. - ////////////////////////////////////////////////////////////////////////// - class Binary_Expression : public Expression { - public: - enum Type { - AND, OR, // logical connectives - EQ, NEQ, GT, GTE, LT, LTE, // arithmetic relations - ADD, SUB, MUL, DIV, MOD, // arithmetic functions - NUM_OPS // so we know how big to make the op table - }; - private: - ADD_PROPERTY(Type, type); - ADD_PROPERTY(Expression*, left); - ADD_PROPERTY(Expression*, right); - public: - Binary_Expression(string path, Position position, - Type t, Expression* lhs, Expression* rhs) - : Expression(path, position), type_(t), left_(lhs), right_(rhs) - { } - ATTACH_OPERATIONS(); - }; - - //////////////////////////////////////////////////////////////////////////// - // Arithmetic negation (logical negation is just an ordinary function call). - //////////////////////////////////////////////////////////////////////////// - class Unary_Expression : public Expression { - public: - enum Type { PLUS, MINUS }; - private: - ADD_PROPERTY(Type, type); - ADD_PROPERTY(Expression*, operand); - public: - Unary_Expression(string path, Position position, Type t, Expression* o) - : Expression(path, position), type_(t), operand_(o) - { } - ATTACH_OPERATIONS(); - }; - - ////////////////// - // Function calls. - ////////////////// - class Function_Call : public Expression { - ADD_PROPERTY(string, name); - ADD_PROPERTY(Arguments*, arguments); - public: - Function_Call(string path, Position position, string n, Arguments* args) - : Expression(path, position), name_(n), arguments_(args) - { concrete_type(STRING); } - ATTACH_OPERATIONS(); - }; - - ///////////////////////// - // Function call schemas. - ///////////////////////// - class Function_Call_Schema : public Expression { - ADD_PROPERTY(String*, name); - ADD_PROPERTY(Arguments*, arguments); - public: - Function_Call_Schema(string path, Position position, String* n, Arguments* args) - : Expression(path, position), name_(n), arguments_(args) - { concrete_type(STRING); } - ATTACH_OPERATIONS(); - }; - - /////////////////////// - // Variable references. - /////////////////////// - class Variable : public Expression { - ADD_PROPERTY(string, name); - public: - Variable(string path, Position position, string n) - : Expression(path, position), name_(n) - { } - ATTACH_OPERATIONS(); - }; - - //////////////////////////////////////////////////////////////////////////// - // Textual (i.e., unevaluated) numeric data. Variants are distinguished with - // a type tag. - //////////////////////////////////////////////////////////////////////////// - class Textual : public Expression { - public: - enum Type { NUMBER, PERCENTAGE, DIMENSION, HEX }; - private: - ADD_PROPERTY(Type, type); - ADD_PROPERTY(string, value); - public: - Textual(string path, Position position, Type t, string val) - : Expression(path, position, true), type_(t), value_(val) - { } - ATTACH_OPERATIONS(); - }; - - //////////////////////////////////////////////// - // Numbers, percentages, dimensions, and colors. - //////////////////////////////////////////////// - class Number : public Expression { - ADD_PROPERTY(double, value); - vector<string> numerator_units_; - vector<string> denominator_units_; - public: - Number(string path, Position position, double val, string u = "") - : Expression(path, position), - value_(val), - numerator_units_(vector<string>()), - denominator_units_(vector<string>()) - { - if (!u.empty()) numerator_units_.push_back(u); - concrete_type(NUMBER); - } - vector<string>& numerator_units() { return numerator_units_; } - vector<string>& denominator_units() { return denominator_units_; } - string type() { return "number"; } - static string type_name() { return "number"; } - string unit() - { - stringstream u; - for (size_t i = 0, S = numerator_units_.size(); i < S; ++i) { - if (i) u << '*'; - u << numerator_units_[i]; - } - if (!denominator_units_.empty()) u << '/'; - for (size_t i = 0, S = denominator_units_.size(); i < S; ++i) { - if (i) u << '*'; - u << denominator_units_[i]; - } - return u.str(); - } - bool is_unitless() - { return numerator_units_.empty() && denominator_units_.empty(); } - void normalize(string to = "") - { - // (multiple passes because I'm too tired to think up something clever) - // Find a unit to convert everything to, if one isn't provided. - if (to.empty()) { - for (size_t i = 0, S = numerator_units_.size(); i < S; ++i) { - string u(numerator_units_[i]); - if (string_to_unit(u) == INCOMMENSURABLE) { - continue; - } - else { - to = u; - break; - } - } - } - if (to.empty()) { - for (size_t i = 0, S = denominator_units_.size(); i < S; ++i) { - string u(denominator_units_[i]); - if (string_to_unit(u) == INCOMMENSURABLE) { - continue; - } - else { - to = u; - break; - } - } - } - // Now loop through again and do all the conversions. - for (size_t i = 0, S = numerator_units_.size(); i < S; ++i) { - string from(numerator_units_[i]); - if (string_to_unit(from) == INCOMMENSURABLE) continue; - value_ *= conversion_factor(from, to); - numerator_units_[i] = to; - } - for (size_t i = 0, S = denominator_units_.size(); i < S; ++i) { - string from(denominator_units_[i]); - if (string_to_unit(from) == INCOMMENSURABLE) continue; - value_ /= conversion_factor(from, to); - denominator_units_[i] = to; - } - // Now divide out identical units in the numerator and denominator. - vector<string> ncopy; - ncopy.reserve(numerator_units_.size()); - for (vector<string>::iterator n = numerator_units_.begin(); - n != numerator_units_.end(); - ++n) { - vector<string>::iterator d = find(denominator_units_.begin(), - denominator_units_.end(), - *n); - if (d != denominator_units_.end()) { - denominator_units_.erase(d); - } - else { - ncopy.push_back(*n); - } - } - numerator_units_ = ncopy; - // Sort the units to make them pretty and, well, normal. - sort(numerator_units_.begin(), numerator_units_.end()); - sort(denominator_units_.begin(), denominator_units_.end()); - } - // useful for making one number compatible with another - string find_convertible_unit() - { - for (size_t i = 0, S = numerator_units_.size(); i < S; ++i) { - string u(numerator_units_[i]); - if (string_to_unit(u) != INCOMMENSURABLE) return u; - } - for (size_t i = 0, S = denominator_units_.size(); i < S; ++i) { - string u(denominator_units_[i]); - if (string_to_unit(u) != INCOMMENSURABLE) return u; - } - return string(); - } - ATTACH_OPERATIONS(); - }; - - ////////// - // Colors. - ////////// - class Color : public Expression { - ADD_PROPERTY(double, r); - ADD_PROPERTY(double, g); - ADD_PROPERTY(double, b); - ADD_PROPERTY(double, a); - ADD_PROPERTY(string, disp); - public: - Color(string path, Position position, double r, double g, double b, double a = 1, const string disp = "") - : Expression(path, position), r_(r), g_(g), b_(b), a_(a), disp_(disp) - { concrete_type(COLOR); } - string type() { return "color"; } - static string type_name() { return "color"; } - ATTACH_OPERATIONS(); - }; - - //////////// - // Booleans. - //////////// - class Boolean : public Expression { - ADD_PROPERTY(bool, value); - public: - Boolean(string path, Position position, bool val) : Expression(path, position), value_(val) - { concrete_type(BOOLEAN); } - virtual operator bool() { return value_; } - string type() { return "bool"; } - static string type_name() { return "bool"; } - virtual bool is_false() { return !value_; } - ATTACH_OPERATIONS(); - }; - - //////////////////////////////////////////////////////////////////////// - // Abstract base class for Sass string values. Includes interpolated and - // "flat" strings. - //////////////////////////////////////////////////////////////////////// - class String : public Expression { - ADD_PROPERTY(bool, needs_unquoting); - public: - String(string path, Position position, bool unq = false, bool delayed = false) - : Expression(path, position, delayed), needs_unquoting_(unq) - { concrete_type(STRING); } - static string type_name() { return "string"; } - virtual ~String() = 0; - ATTACH_OPERATIONS(); - }; - inline String::~String() { }; - - /////////////////////////////////////////////////////////////////////// - // Interpolated strings. Meant to be reduced to flat strings during the - // evaluation phase. - /////////////////////////////////////////////////////////////////////// - class String_Schema : public String, public Vectorized<Expression*> { - ADD_PROPERTY(char, quote_mark); - public: - String_Schema(string path, Position position, size_t size = 0, bool unq = false, char qm = '\0') - : String(path, position, unq), Vectorized<Expression*>(size), quote_mark_(qm) - { } - string type() { return "string"; } - static string type_name() { return "string"; } - ATTACH_OPERATIONS(); - }; - - //////////////////////////////////////////////////////// - // Flat strings -- the lowest level of raw textual data. - //////////////////////////////////////////////////////// - class String_Constant : public String { - ADD_PROPERTY(string, value); - public: - String_Constant(string path, Position position, string val, bool unq = false) - : String(path, position, unq, true), value_(val) - { } - String_Constant(string path, Position position, const char* beg, bool unq = false) - : String(path, position, unq, true), value_(string(beg)) - { } - String_Constant(string path, Position position, const char* beg, const char* end, bool unq = false) - : String(path, position, unq, true), value_(string(beg, end-beg)) - { } - String_Constant(string path, Position position, const Token& tok, bool unq = false) - : String(path, position, unq, true), value_(string(tok.begin, tok.end)) - { } - string type() { return "string"; } - static string type_name() { return "string"; } - bool is_quoted() { return value_.length() && (value_[0] == '"' || value_[0] == '\''); } - char quote_mark() { return is_quoted() ? value_[0] : '\0'; } - ATTACH_OPERATIONS(); - }; - - ///////////////// - // Media queries. - ///////////////// - class Media_Query : public Expression, - public Vectorized<Media_Query_Expression*> { - ADD_PROPERTY(String*, media_type); - ADD_PROPERTY(bool, is_negated); - ADD_PROPERTY(bool, is_restricted); - public: - Media_Query(string path, Position position, - String* t = 0, size_t s = 0, bool n = false, bool r = false) - : Expression(path, position), Vectorized<Media_Query_Expression*>(s), - media_type_(t), is_negated_(n), is_restricted_(r) - { } - ATTACH_OPERATIONS(); - }; - - //////////////////////////////////////////////////// - // Media expressions (for use inside media queries). - //////////////////////////////////////////////////// - class Media_Query_Expression : public Expression { - ADD_PROPERTY(Expression*, feature); - ADD_PROPERTY(Expression*, value); - ADD_PROPERTY(bool, is_interpolated); - public: - Media_Query_Expression(string path, Position position, - Expression* f, Expression* v, bool i = false) - : Expression(path, position), feature_(f), value_(v), is_interpolated_(i) - { } - ATTACH_OPERATIONS(); - }; - - ////////////////// - // The null value. - ////////////////// - class Null : public Expression { - public: - Null(string path, Position position) : Expression(path, position) { concrete_type(NULL_VAL); } - string type() { return "null"; } - static string type_name() { return "null"; } - bool is_invisible() { return true; } - operator bool() { return false; } - bool is_false() { return true; } - ATTACH_OPERATIONS(); - }; - - ///////////////////////////////// - // Thunks for delayed evaluation. - ///////////////////////////////// - class Thunk : public Expression { - ADD_PROPERTY(Expression*, expression); - ADD_PROPERTY(Env*, environment); - public: - Thunk(string path, Position position, Expression* exp, Env* env = 0) - : Expression(path, position), expression_(exp), environment_(env) - { } - }; - - ///////////////////////////////////////////////////////// - // Individual parameter objects for mixins and functions. - ///////////////////////////////////////////////////////// - class Parameter : public AST_Node { - ADD_PROPERTY(string, name); - ADD_PROPERTY(Expression*, default_value); - ADD_PROPERTY(bool, is_rest_parameter); - public: - Parameter(string p, Position pos, - string n, Expression* def = 0, bool rest = false) - : AST_Node(p, pos), name_(n), default_value_(def), is_rest_parameter_(rest) - { - if (default_value_ && is_rest_parameter_) { - error("variable-length parameter may not have a default value", path(), position()); - } - } - ATTACH_OPERATIONS(); - }; - - ///////////////////////////////////////////////////////////////////////// - // Parameter lists -- in their own class to facilitate context-sensitive - // error checking (e.g., ensuring that all optional parameters follow all - // required parameters). - ///////////////////////////////////////////////////////////////////////// - class Parameters : public AST_Node, public Vectorized<Parameter*> { - ADD_PROPERTY(bool, has_optional_parameters); - ADD_PROPERTY(bool, has_rest_parameter); - protected: - void adjust_after_pushing(Parameter* p) - { - if (p->default_value()) { - if (has_rest_parameter_) { - error("optional parameters may not be combined with variable-length parameters", p->path(), p->position()); - } - has_optional_parameters_ = true; - } - else if (p->is_rest_parameter()) { - if (has_rest_parameter_) { - error("functions and mixins cannot have more than one variable-length parameter", p->path(), p->position()); - } - if (has_optional_parameters_) { - error("optional parameters may not be combined with variable-length parameters", p->path(), p->position()); - } - has_rest_parameter_ = true; - } - else { - if (has_rest_parameter_) { - error("required parameters must precede variable-length parameters", p->path(), p->position()); - } - if (has_optional_parameters_) { - error("required parameters must precede optional parameters", p->path(), p->position()); - } - } - } - public: - Parameters(string path, Position position) - : AST_Node(path, position), - Vectorized<Parameter*>(), - has_optional_parameters_(false), - has_rest_parameter_(false) - { } - ATTACH_OPERATIONS(); - }; - - //////////////////////////////////////////////////////////// - // Individual argument objects for mixin and function calls. - //////////////////////////////////////////////////////////// - class Argument : public Expression { - ADD_PROPERTY(Expression*, value); - ADD_PROPERTY(string, name); - ADD_PROPERTY(bool, is_rest_argument); - public: - Argument(string p, Position pos, Expression* val, string n = "", bool rest = false) - : Expression(p, pos), value_(val), name_(n), is_rest_argument_(rest) - { - if (!name_.empty() && is_rest_argument_) { - error("variable-length argument may not be passed by name", path(), position()); - } - } - ATTACH_OPERATIONS(); - }; - - //////////////////////////////////////////////////////////////////////// - // Argument lists -- in their own class to facilitate context-sensitive - // error checking (e.g., ensuring that all ordinal arguments precede all - // named arguments). - //////////////////////////////////////////////////////////////////////// - class Arguments : public Expression, public Vectorized<Argument*> { - ADD_PROPERTY(bool, has_named_arguments); - ADD_PROPERTY(bool, has_rest_argument); - protected: - void adjust_after_pushing(Argument* a) - { - if (!a->name().empty()) { - if (has_rest_argument_) { - error("named arguments must precede variable-length argument", a->path(), a->position()); - } - has_named_arguments_ = true; - } - else if (a->is_rest_argument()) { - if (has_rest_argument_) { - error("functions and mixins may only be called with one variable-length argument", a->path(), a->position()); - } - if (has_named_arguments_) { - error("functions and mixins may not be called with both named arguments and variable-length arguments", a->path(), a->position()); - } - has_rest_argument_ = true; - } - else { - if (has_rest_argument_) { - error("ordinal arguments must precede variable-length arguments", a->path(), a->position()); - } - if (has_named_arguments_) { - error("ordinal arguments must precede named arguments", a->path(), a->position()); - } - } - } - public: - Arguments(string path, Position position) - : Expression(path, position), - Vectorized<Argument*>(), - has_named_arguments_(false), - has_rest_argument_(false) - { } - ATTACH_OPERATIONS(); - }; - - ///////////////////////////////////////// - // Abstract base class for CSS selectors. - ///////////////////////////////////////// - class Selector : public AST_Node { - ADD_PROPERTY(bool, has_reference); - ADD_PROPERTY(bool, has_placeholder); - public: - Selector(string path, Position position, bool r = false, bool h = false) - : AST_Node(path, position), has_reference_(r), has_placeholder_(h) - { } - virtual ~Selector() = 0; - virtual Selector_Placeholder* find_placeholder(); - }; - inline Selector::~Selector() { } - - ///////////////////////////////////////////////////////////////////////// - // Interpolated selectors -- the interpolated String will be expanded and - // re-parsed into a normal selector classure. - ///////////////////////////////////////////////////////////////////////// - class Selector_Schema : public Selector { - ADD_PROPERTY(String*, contents); - public: - Selector_Schema(string path, Position position, String* c) - : Selector(path, position), contents_(c) - { } - ATTACH_OPERATIONS(); - }; - - //////////////////////////////////////////// - // Abstract base class for simple selectors. - //////////////////////////////////////////// - class Simple_Selector : public Selector { - public: - Simple_Selector(string path, Position position) - : Selector(path, position) - { } - virtual ~Simple_Selector() = 0; - }; - inline Simple_Selector::~Simple_Selector() { } - - ///////////////////////////////////// - // Parent references (i.e., the "&"). - ///////////////////////////////////// - class Selector_Reference : public Simple_Selector { - ADD_PROPERTY(Selector*, selector); - public: - Selector_Reference(string path, Position position, Selector* r = 0) - : Simple_Selector(path, position), selector_(r) - { has_reference(true); } - ATTACH_OPERATIONS(); - }; - - ///////////////////////////////////////////////////////////////////////// - // Placeholder selectors (e.g., "%foo") for use in extend-only selectors. - ///////////////////////////////////////////////////////////////////////// - class Selector_Placeholder : public Simple_Selector { - ADD_PROPERTY(string, name); - public: - Selector_Placeholder(string path, Position position, string n) - : Simple_Selector(path, position), name_(n) - { has_placeholder(true); } - virtual Selector_Placeholder* find_placeholder(); - ATTACH_OPERATIONS(); - }; - - ///////////////////////////////////////////////////////////////////// - // Type selectors (and the universal selector) -- e.g., div, span, *. - ///////////////////////////////////////////////////////////////////// - class Type_Selector : public Simple_Selector { - ADD_PROPERTY(string, name); - public: - Type_Selector(string path, Position position, string n) - : Simple_Selector(path, position), name_(n) - { } - ATTACH_OPERATIONS(); - }; - - //////////////////////////////////////////////// - // Selector qualifiers -- i.e., classes and ids. - //////////////////////////////////////////////// - class Selector_Qualifier : public Simple_Selector { - ADD_PROPERTY(string, name); - public: - Selector_Qualifier(string path, Position position, string n) - : Simple_Selector(path, position), name_(n) - { } - ATTACH_OPERATIONS(); - }; - - /////////////////////////////////////////////////// - // Attribute selectors -- e.g., [src*=".jpg"], etc. - /////////////////////////////////////////////////// - class Attribute_Selector : public Simple_Selector { - ADD_PROPERTY(string, name); - ADD_PROPERTY(string, matcher); - ADD_PROPERTY(string, value); - public: - Attribute_Selector(string path, Position position, string n, string m, string v) - : Simple_Selector(path, position), name_(n), matcher_(m), value_(v) - { } - ATTACH_OPERATIONS(); - }; - - ////////////////////////////////////////////////////////////////// - // Pseudo selectors -- e.g., :first-child, :nth-of-type(...), etc. - ////////////////////////////////////////////////////////////////// - class Pseudo_Selector : public Simple_Selector { - ADD_PROPERTY(string, name); - ADD_PROPERTY(String*, expression); - public: - Pseudo_Selector(string path, Position position, string n, String* expr = 0) - : Simple_Selector(path, position), name_(n), expression_(expr) - { } - ATTACH_OPERATIONS(); - }; - - ///////////////////////////////////////////////// - // Negated selector -- e.g., :not(:first-of-type) - ///////////////////////////////////////////////// - class Negated_Selector : public Simple_Selector { - ADD_PROPERTY(Selector*, selector); - public: - Negated_Selector(string path, Position position, Selector* sel) - : Simple_Selector(path, position), selector_(sel) - { } - ATTACH_OPERATIONS(); - }; - - //////////////////////////////////////////////////////////////////////////// - // Simple selector sequences. Maintains flags indicating whether it contains - // any parent references or placeholders, to simplify expansion. - //////////////////////////////////////////////////////////////////////////// - class Compound_Selector : public Selector, public Vectorized<Simple_Selector*> { - protected: - void adjust_after_pushing(Simple_Selector* s) - { - if (s->has_reference()) has_reference(true); - if (s->has_placeholder()) has_placeholder(true); - } - public: - Compound_Selector(string path, Position position, size_t s = 0) - : Selector(path, position), - Vectorized<Simple_Selector*>(s) - { } - bool operator<(const Compound_Selector& rhs) const; - virtual Selector_Placeholder* find_placeholder(); - ATTACH_OPERATIONS(); - }; - - //////////////////////////////////////////////////////////////////////////// - // General selectors -- i.e., simple sequences combined with one of the four - // CSS selector combinators (">", "+", "~", and whitespace). Essentially a - // linked list. - //////////////////////////////////////////////////////////////////////////// - struct Context; - class Complex_Selector : public Selector { - public: - enum Combinator { ANCESTOR_OF, PARENT_OF, PRECEDES, ADJACENT_TO }; - private: - ADD_PROPERTY(Combinator, combinator); - ADD_PROPERTY(Compound_Selector*, head); - ADD_PROPERTY(Complex_Selector*, tail); - public: - Complex_Selector(string path, Position position, - Combinator c, - Compound_Selector* h, - Complex_Selector* t) - : Selector(path, position), combinator_(c), head_(h), tail_(t) - { - if ((h && h->has_reference()) || (t && t->has_reference())) has_reference(true); - if ((h && h->has_placeholder()) || (t && t->has_placeholder())) has_placeholder(true); - } - Compound_Selector* base(); - Complex_Selector* context(Context&); - Complex_Selector* innermost(); - virtual Selector_Placeholder* find_placeholder(); - ATTACH_OPERATIONS(); - }; - - /////////////////////////////////// - // Comma-separated selector groups. - /////////////////////////////////// - class Selector_List - : public Selector, public Vectorized<Complex_Selector*> { - protected: - void adjust_after_pushing(Complex_Selector* c) - { - if (c->has_reference()) has_reference(true); - if (c->has_placeholder()) has_placeholder(true); - } - public: - Selector_List(string path, Position position, size_t s = 0) - : Selector(path, position), Vectorized<Complex_Selector*>(s) - { } - virtual Selector_Placeholder* find_placeholder(); - ATTACH_OPERATIONS(); - }; -} - -#ifdef __clang__ - -#pragma clang diagnostic pop - -#endif diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/ast_def_macros.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/ast_def_macros.hpp deleted file mode 100644 index 663e4c40..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/ast_def_macros.hpp +++ /dev/null @@ -1,16 +0,0 @@ -#define ATTACH_OPERATIONS()\ -virtual void perform(Operation<void>* op) { (*op)(this); }\ -virtual AST_Node* perform(Operation<AST_Node*>* op) { return (*op)(this); }\ -virtual Statement* perform(Operation<Statement*>* op) { return (*op)(this); }\ -virtual Expression* perform(Operation<Expression*>* op) { return (*op)(this); }\ -virtual Selector* perform(Operation<Selector*>* op) { return (*op)(this); }\ -virtual string perform(Operation<string>* op) { return (*op)(this); }\ -virtual Sass_Value perform(Operation<Sass_Value>* op) { return (*op)(this); } - -#define ADD_PROPERTY(type, name)\ -protected:\ - type name##_;\ -public:\ - type name() const { return name##_; }\ - type name(type name##__) { return name##_ = name##__; }\ -private: diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/ast_factory.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/ast_factory.hpp deleted file mode 100644 index 50681338..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/ast_factory.hpp +++ /dev/null @@ -1,82 +0,0 @@ -#define SASS_AST_FACTORY - -#include <vector> - -#ifndef SASS_AST -#include "ast.hpp" -#endif - -namespace Sass { - using namespace std; - - class AST_Factory { - vector<AST_Node*> nodes; - public: - // statements - Block* new_Block(string p, size_t l, size_t s = 0, bool r = false); - Ruleset* new_Ruleset(string p, size_t l, Selector* s, Block* b); - Propset* new_Propset(string p, size_t l, String* pf, Block* b); - Media_Query* new_Media_Query(string p, size_t l, List* q, Block* b); - At_Rule* new_At_Rule(string p, size_t l, string kwd, Selector* sel, Block* b); - Declaration* new_Declaration(string p, size_t l, String* prop, List* vals); - Assignment* new_Assignment(string p, size_t l, string var, Expression* val, bool guarded = false); - Import<Function_Call*>* new_CSS_Import(string p, size_t l, Function_Call* loc); - Import<String*>* new_SASS_Import(string p, size_t l, String* loc); - Warning* new_Warning(string p, size_t l, Expression* msg); - Comment* new_Comment(string p, size_t l, String* txt); - If* new_If(string p, size_t l, Expression* pred, Block* con, Block* alt = 0); - For* new_For(string p, size_t l, string var, Expression* lo, Expression* hi, Block* b, bool inc); - Each* new_Each(string p, size_t l, string var, Expression* lst, Block* b); - While* new_While(string p, size_t l, Expression* pred, Block* b); - Extension* new_Extension(string p, size_t l, Selector* s); - Definition<MIXIN>* new_Mixin_Definition(string p, size_t l, string n, Parameters* params, Block* b); - Definition<FUNCTION>* new_Function_Definition(string p, size_t l, string n, Parameters* params, Block* b); - Mixin_Call* new_Mixin_Call(string p, size_t l, string n, Arguments* args, Block* b = 0); - // expressions - List* new_List(string p, size_t l, size_t size = 0, List::Separator sep = List::space, bool argl = false); - Binary_Expression<AND>* new_And(string p, size_t l, Expression* lhs, Expression* rhs); - Binary_Expression<OR>* new_Or(string p, size_t l, Expression* lhs, Expression* rhs); - Binary_Expression<EQ>* new_Eq(string p, size_t l, Expression* lhs, Expression* rhs); - Binary_Expression<NEQ>* new_Neq(string p, size_t l, Expression* lhs, Expression* rhs); - Binary_Expression<GT>* new_Gt(string p, size_t l, Expression* lhs, Expression* rhs); - Binary_Expression<GTE>* new_Gte(string p, size_t l, Expression* lhs, Expression* rhs); - Binary_Expression<LT>* new_Lt(string p, size_t l, Expression* lhs, Expression* rhs); - Binary_Expression<LTE>* new_Lte(string p, size_t l, Expression* lhs, Expression* rhs); - Binary_Expression<ADD>* new_Add(string p, size_t l, Expression* lhs, Expression* rhs); - Binary_Expression<SUB>* new_Sub(string p, size_t l, Expression* lhs, Expression* rhs); - Binary_Expression<MUL>* new_Mul(string p, size_t l, Expression* lhs, Expression* rhs); - Binary_Expression<DIV>* new_Div(string p, size_t l, Expression* lhs, Expression* rhs); - Negation* new_Negation(string p, size_t l, Expression* o); - Function_Call* new_Function_Call(string p, size_t l, String* n, Arguments* args); - Variable* new_Variable(string p, size_t l, string n); - Textual<NUMBER>* new_Textual_Number(string p, size_t l, string val); - Textual<PERCENTAGE>* new_Textual_Percentage(string p, size_t l, string val); - Textual<DIMENSION>* new_Textual_Dimension(string p, size_t l, string val); - Textual<HEX>* new_Textual_Hex(string p, size_t l, string val); - Number* new_Number(string p, size_t l, double val); - Percentage* new_Percentage(string p, size_t l, double val); - Dimension* new_Dimension(string p, size_t l, double val, string unit); - Color* new_Color(string p, size_t l, double r, double g, double b, double a = 1, string disp = ""); - Boolean* new_Boolean(string p, size_t l, bool val); - String_Schema* new_String_Schema(string p, size_t l, size_t size = 0); - String_Constant* new_String_Constant(string p, size_t l, string val); - String_Constant* new_String_Constant(string p, size_t l, const char* beg); - String_Constant* new_String_Constant(string p, size_t l, const char* beg, const char* end); - Media_Expression* new_Media_Expression(string p, size_t l, String* f, Expression* v); - // parameters and arguments - Parameter* new_Parameter(string p, size_t l, string n, Expression* def = 0, bool rest = false); - Parameters* new_Parameters(string p, size_t l); - Argument* new_Argument(string p, size_t l, Expression* val, string n = "", bool rest = false); - Arguments* new_Arguments(string p, size_t l); - // selectors - Selector_Schema* new_Selector_Schema(string p, size_t l, String* c); - Simple_Selector* new_Simple_Selector(string p, size_t l, string c); - Reference_Selector* new_Reference_Selector(string p, size_t l); - Placeholder_Selector* new_Placeholder_Selector(string p, size_t l, string n); - Pseudo_Selector* new_Pseudo_Selector(string p, size_t l, string n, Expression* expr = 0); - Negated_Selector* new_Negated_Selector(string p, size_t l, Simple_Base* sel); - Compound_Selector* new_Compound_Selector(string p, size_t l, size_t s = 0); - Complex_Selector* new_Complex_Selector(string p, size_t l, Complex_Selector::Combinator c, Complex_Selector* ctx, Compound_Selector* sel); - Selector_List* new_Selector_List(string p, size_t l, size_t s = 0); - }; -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/ast_fwd_decl.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/ast_fwd_decl.hpp deleted file mode 100644 index d6d8ba3c..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/ast_fwd_decl.hpp +++ /dev/null @@ -1,66 +0,0 @@ -///////////////////////////////////////////// -// Forward declarations for the AST visitors. -///////////////////////////////////////////// -namespace Sass { - - class AST_Node; - // statements - class Statement; - class Block; - class Ruleset; - class Propset; - class Media_Block; - class At_Rule; - class Declaration; - class Assignment; - class Import; - class Import_Stub; - class Warning; - class Comment; - class If; - class For; - class Each; - class While; - class Return; - class Content; - class Extension; - class Definition; - class Mixin_Call; - // expressions - class Expression; - class List; - class Binary_Expression; - class Unary_Expression; - class Function_Call; - class Function_Call_Schema; - class Variable; - class Textual; - class Number; - class Color; - class Boolean; - class String_Schema; - class String; - class String_Constant; - class Media_Query; - class Media_Query_Expression; - class Null; - // parameters and arguments - class Parameter; - class Parameters; - class Argument; - class Arguments; - // selectors - class Selector; - class Selector_Schema; - class Selector_Reference; - class Selector_Placeholder; - class Type_Selector; - class Selector_Qualifier; - class Attribute_Selector; - class Pseudo_Selector; - class Negated_Selector; - class Compound_Selector; - class Complex_Selector; - class Selector_List; - -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/backtrace.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/backtrace.hpp deleted file mode 100644 index 48294de7..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/backtrace.hpp +++ /dev/null @@ -1,61 +0,0 @@ -#define SASS_BACKTRACE - -#include <sstream> - -#ifndef SASS_POSITION -#include "position.hpp" -#endif - -namespace Sass { - - using namespace std; - - struct Backtrace { - - Backtrace* parent; - string path; - Position position; - string caller; - - Backtrace(Backtrace* prn, string pth, Position position, string c) - : parent(prn), - path(pth), - position(position), - caller(c) - { } - - string to_string(bool warning = false) - { - stringstream ss; - Backtrace* this_point = this; - - if (!warning) ss << endl << "Backtrace:"; - // the first tracepoint (which is parent-less) is an empty placeholder - while (this_point->parent) { - ss << endl - << "\t" - << (warning ? " " : "") - << this_point->path - << ":" - << this_point->position.line - << this_point->parent->caller; - this_point = this_point->parent; - } - - return ss.str(); - } - - size_t depth() - { - size_t d = 0; - Backtrace* p = parent; - while (p) { - ++d; - p = p->parent; - } - return d-1; - } - - }; - -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/base64vlq.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/base64vlq.cpp deleted file mode 100644 index 1e569ca4..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/base64vlq.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include "base64vlq.hpp" - -namespace Sass { - - string Base64VLQ::encode(const int number) const - { - string encoded = ""; - - int vlq = to_vlq_signed(number); - - do { - int digit = vlq & VLQ_BASE_MASK; - vlq >>= VLQ_BASE_SHIFT; - if (vlq > 0) { - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64_encode(digit); - } while (vlq > 0); - - return encoded; - } - - char Base64VLQ::base64_encode(const int number) const - { - int index = number; - if (index < 0) index = 0; - if (index > 63) index = 63; - return CHARACTERS[index]; - } - - int Base64VLQ::to_vlq_signed(const int number) const - { - return (number < 0) ? ((-number) << 1) + 1 : (number << 1) + 0; - } - - const char* Base64VLQ::CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - - const int Base64VLQ::VLQ_BASE_SHIFT = 5; - const int Base64VLQ::VLQ_BASE = 1 << VLQ_BASE_SHIFT; - const int Base64VLQ::VLQ_BASE_MASK = VLQ_BASE - 1; - const int Base64VLQ::VLQ_CONTINUATION_BIT = VLQ_BASE; - -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/base64vlq.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/base64vlq.hpp deleted file mode 100644 index a1e089d6..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/base64vlq.hpp +++ /dev/null @@ -1,28 +0,0 @@ -#define SASS_BASE64VLQ - -#include <string> - -namespace Sass { - using std::string; - - class Base64VLQ { - - public: - - string encode(const int number) const; - - private: - - char base64_encode(const int number) const; - - int to_vlq_signed(const int number) const; - - static const char* CHARACTERS; - - static const int VLQ_BASE_SHIFT; - static const int VLQ_BASE; - static const int VLQ_BASE_MASK; - static const int VLQ_CONTINUATION_BIT; - }; - -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/bind.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/bind.cpp deleted file mode 100644 index 0afb86a8..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/bind.cpp +++ /dev/null @@ -1,160 +0,0 @@ -#include "bind.hpp" -#include "ast.hpp" -#include "context.hpp" -#include "eval.hpp" -#include <map> -#include <iostream> -#include <sstream> -#include "to_string.hpp" - -namespace Sass { - using namespace std; - - void bind(string callee, Parameters* ps, Arguments* as, Context& ctx, Env* env, Eval* eval) - { - map<string, Parameter*> param_map; - - // Set up a map to ensure named arguments refer to actual parameters. Also - // eval each default value left-to-right, wrt env, populating env as we go. - for (size_t i = 0, L = ps->length(); i < L; ++i) { - Parameter* p = (*ps)[i]; - param_map[p->name()] = p; - // if (p->default_value()) { - // env->current_frame()[p->name()] = p->default_value()->perform(eval->with(env)); - // } - } - - // plug in all args; if we have leftover params, deal with it later - size_t ip = 0, LP = ps->length(); - size_t ia = 0, LA = as->length(); - while (ia < LA) { - if (ip >= LP) { - stringstream msg; - msg << callee << " only takes " << LP << " arguments; " - << "given " << LA; - error(msg.str(), as->path(), as->position()); - } - Parameter* p = (*ps)[ip]; - Argument* a = (*as)[ia]; - - if (a->is_rest_argument() && p->is_rest_parameter()) { - // rest param and rest arg -- just add one to the other - if (env->current_frame_has(p->name())) { - *static_cast<List*>(env->current_frame()[p->name()]) - += static_cast<List*>(a->value()); - } - else { - env->current_frame()[p->name()] = a->value(); - } - ++ia; - ++ip; - } - else if (p->is_rest_parameter()) { - List* arglist = 0; - if (!env->current_frame_has(p->name())) { - arglist = new (ctx.mem) List(p->path(), - p->position(), - 0, - List::COMMA, - true); - env->current_frame()[p->name()] = arglist; - } - else { - arglist = static_cast<List*>(env->current_frame()[p->name()]); - } - *arglist << a->value(); // TODO: named args going into rest-param? - ++ia; - } - else if (a->is_rest_argument()) { - // normal param and rest arg - if (env->current_frame_has(p->name())) { - stringstream msg; - msg << "parameter " << p->name() - << " provided more than once in call to " << callee; - error(msg.str(), a->path(), a->position()); - } - List* arglist = static_cast<List*>(a->value()); - // if it's the last param, move the whole arglist into it - if (ip == LP-1) { - env->current_frame()[p->name()] = arglist; - ++ia; - } - // otherwise move one of the rest args into the param and loop - else { - env->current_frame()[p->name()] = (*arglist)[0]; - arglist->elements().erase(arglist->elements().begin()); - } - ++ip; - } - else if (a->name().empty()) { - // ordinal arg -- bind it to the next param - env->current_frame()[p->name()] = a->value(); - ++ip; - ++ia; - } - else { - // named arg -- bind it to the appropriately named param - if (!param_map.count(a->name())) { - stringstream msg; - msg << callee << " has no parameter named " << a->name(); - error(msg.str(), a->path(), a->position()); - } - if (param_map[a->name()]->is_rest_parameter()) { - stringstream msg; - msg << "argument " << a->name() << " of " << callee - << "cannot be used as named argument"; - error(msg.str(), a->path(), a->position()); - } - if (env->current_frame_has(a->name())) { - stringstream msg; - msg << "parameter " << p->name() - << "provided more than once in call to " << callee; - error(msg.str(), a->path(), a->position()); - } - env->current_frame()[a->name()] = a->value(); - ++ia; - } - } - - // If we make it here, we're out of args but may have leftover params. - // That's only okay if they have default values, or were already bound by - // named arguments, or if it's a single rest-param. - for (size_t i = ip; i < LP; ++i) { - To_String to_string; - Parameter* leftover = (*ps)[i]; - // cerr << "env for default params:" << endl; - // env->print(); - // cerr << "********" << endl; - if (!env->current_frame_has(leftover->name())) { - if (leftover->is_rest_parameter()) { - env->current_frame()[leftover->name()] = new (ctx.mem) List(leftover->path(), - leftover->position(), - 0, - List::COMMA, - true); - } - else if (leftover->default_value()) { - // make sure to eval the default value in the env that we've been populating - Env* old_env = eval->env; - Backtrace* old_bt = eval->backtrace; - Expression* dv = leftover->default_value()->perform(eval->with(env, eval->backtrace)); - eval->env = old_env; - eval->backtrace = old_bt; - // dv->perform(&to_string); - env->current_frame()[leftover->name()] = dv; - } - else { - // param is unbound and has no default value -- error - stringstream msg; - msg << "required parameter " << leftover->name() - << " is missing in call to " << callee; - error(msg.str(), as->path(), as->position()); - } - } - } - - return; - } - - -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/bind.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/bind.hpp deleted file mode 100644 index 8999ff86..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/bind.hpp +++ /dev/null @@ -1,18 +0,0 @@ -#define SASS_BIND - -#ifndef SASS_ENVIRONMENT -#include "environment.hpp" -#endif - -#include <string> - -namespace Sass { - class AST_Node; - class Parameters; - class Arguments; - struct Context; - class Eval; - typedef Environment<AST_Node*> Env; - - void bind(string caller, Parameters*, Arguments*, Context&, Env*, Eval*); -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/color_names.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/color_names.hpp deleted file mode 100644 index 8046f6a1..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/color_names.hpp +++ /dev/null @@ -1,311 +0,0 @@ -#define SASS_COLOR_NAMES - -namespace Sass { - - const char* color_names[] = - { - "aliceblue", - "antiquewhite", - "aqua", - "aquamarine", - "azure", - "beige", - "bisque", - "black", - "blanchedalmond", - "blue", - "blueviolet", - "brown", - "burlywood", - "cadetblue", - "chartreuse", - "chocolate", - "coral", - "cornflowerblue", - "cornsilk", - "crimson", - "cyan", - "darkblue", - "darkcyan", - "darkgoldenrod", - "darkgray", - "darkgrey", - "darkgreen", - "darkkhaki", - "darkmagenta", - "darkolivegreen", - "darkorange", - "darkorchid", - "darkred", - "darksalmon", - "darkseagreen", - "darkslateblue", - "darkslategray", - "darkslategrey", - "darkturquoise", - "darkviolet", - "deeppink", - "deepskyblue", - "dimgray", - "dimgrey", - "dodgerblue", - "firebrick", - "floralwhite", - "forestgreen", - "fuchsia", - "gainsboro", - "ghostwhite", - "gold", - "goldenrod", - "gray", - "grey", - "green", - "greenyellow", - "honeydew", - "hotpink", - "indianred", - "indigo", - "ivory", - "khaki", - "lavender", - "lavenderblush", - "lawngreen", - "lemonchiffon", - "lightblue", - "lightcoral", - "lightcyan", - "lightgoldenrodyellow", - "lightgray", - "lightgrey", - "lightgreen", - "lightpink", - "lightsalmon", - "lightseagreen", - "lightskyblue", - "lightslategray", - "lightslategrey", - "lightsteelblue", - "lightyellow", - "lime", - "limegreen", - "linen", - "magenta", - "maroon", - "mediumaquamarine", - "mediumblue", - "mediumorchid", - "mediumpurple", - "mediumseagreen", - "mediumslateblue", - "mediumspringgreen", - "mediumturquoise", - "mediumvioletred", - "midnightblue", - "mintcream", - "mistyrose", - "moccasin", - "navajowhite", - "navy", - "oldlace", - "olive", - "olivedrab", - "orange", - "orangered", - "orchid", - "palegoldenrod", - "palegreen", - "paleturquoise", - "palevioletred", - "papayawhip", - "peachpuff", - "peru", - "pink", - "plum", - "powderblue", - "purple", - "red", - "rosybrown", - "royalblue", - "saddlebrown", - "salmon", - "sandybrown", - "seagreen", - "seashell", - "sienna", - "silver", - "skyblue", - "slateblue", - "slategray", - "slategrey", - "snow", - "springgreen", - "steelblue", - "tan", - "teal", - "thistle", - "tomato", - "turquoise", - "violet", - "wheat", - "white", - "whitesmoke", - "yellow", - "yellowgreen", - // sentinel value - 0 - }; - - const double color_values[] = - { - 0xf0, 0xf8, 0xff, - 0xfa, 0xeb, 0xd7, - 0x00, 0xff, 0xff, - 0x7f, 0xff, 0xd4, - 0xf0, 0xff, 0xff, - 0xf5, 0xf5, 0xdc, - 0xff, 0xe4, 0xc4, - 0x00, 0x00, 0x00, - 0xff, 0xeb, 0xcd, - 0x00, 0x00, 0xff, - 0x8a, 0x2b, 0xe2, - 0xa5, 0x2a, 0x2a, - 0xde, 0xb8, 0x87, - 0x5f, 0x9e, 0xa0, - 0x7f, 0xff, 0x00, - 0xd2, 0x69, 0x1e, - 0xff, 0x7f, 0x50, - 0x64, 0x95, 0xed, - 0xff, 0xf8, 0xdc, - 0xdc, 0x14, 0x3c, - 0x00, 0xff, 0xff, - 0x00, 0x00, 0x8b, - 0x00, 0x8b, 0x8b, - 0xb8, 0x86, 0x0b, - 0xa9, 0xa9, 0xa9, - 0xa9, 0xa9, 0xa9, - 0x00, 0x64, 0x00, - 0xbd, 0xb7, 0x6b, - 0x8b, 0x00, 0x8b, - 0x55, 0x6b, 0x2f, - 0xff, 0x8c, 0x00, - 0x99, 0x32, 0xcc, - 0x8b, 0x00, 0x00, - 0xe9, 0x96, 0x7a, - 0x8f, 0xbc, 0x8f, - 0x48, 0x3d, 0x8b, - 0x2f, 0x4f, 0x4f, - 0x2f, 0x4f, 0x4f, - 0x00, 0xce, 0xd1, - 0x94, 0x00, 0xd3, - 0xff, 0x14, 0x93, - 0x00, 0xbf, 0xff, - 0x69, 0x69, 0x69, - 0x69, 0x69, 0x69, - 0x1e, 0x90, 0xff, - 0xb2, 0x22, 0x22, - 0xff, 0xfa, 0xf0, - 0x22, 0x8b, 0x22, - 0xff, 0x00, 0xff, - 0xdc, 0xdc, 0xdc, - 0xf8, 0xf8, 0xff, - 0xff, 0xd7, 0x00, - 0xda, 0xa5, 0x20, - 0x80, 0x80, 0x80, - 0x80, 0x80, 0x80, - 0x00, 0x80, 0x00, - 0xad, 0xff, 0x2f, - 0xf0, 0xff, 0xf0, - 0xff, 0x69, 0xb4, - 0xcd, 0x5c, 0x5c, - 0x4b, 0x00, 0x82, - 0xff, 0xff, 0xf0, - 0xf0, 0xe6, 0x8c, - 0xe6, 0xe6, 0xfa, - 0xff, 0xf0, 0xf5, - 0x7c, 0xfc, 0x00, - 0xff, 0xfa, 0xcd, - 0xad, 0xd8, 0xe6, - 0xf0, 0x80, 0x80, - 0xe0, 0xff, 0xff, - 0xfa, 0xfa, 0xd2, - 0xd3, 0xd3, 0xd3, - 0xd3, 0xd3, 0xd3, - 0x90, 0xee, 0x90, - 0xff, 0xb6, 0xc1, - 0xff, 0xa0, 0x7a, - 0x20, 0xb2, 0xaa, - 0x87, 0xce, 0xfa, - 0x77, 0x88, 0x99, - 0x77, 0x88, 0x99, - 0xb0, 0xc4, 0xde, - 0xff, 0xff, 0xe0, - 0x00, 0xff, 0x00, - 0x32, 0xcd, 0x32, - 0xfa, 0xf0, 0xe6, - 0xff, 0x00, 0xff, - 0x80, 0x00, 0x00, - 0x66, 0xcd, 0xaa, - 0x00, 0x00, 0xcd, - 0xba, 0x55, 0xd3, - 0x93, 0x70, 0xd8, - 0x3c, 0xb3, 0x71, - 0x7b, 0x68, 0xee, - 0x00, 0xfa, 0x9a, - 0x48, 0xd1, 0xcc, - 0xc7, 0x15, 0x85, - 0x19, 0x19, 0x70, - 0xf5, 0xff, 0xfa, - 0xff, 0xe4, 0xe1, - 0xff, 0xe4, 0xb5, - 0xff, 0xde, 0xad, - 0x00, 0x00, 0x80, - 0xfd, 0xf5, 0xe6, - 0x80, 0x80, 0x00, - 0x6b, 0x8e, 0x23, - 0xff, 0xa5, 0x00, - 0xff, 0x45, 0x00, - 0xda, 0x70, 0xd6, - 0xee, 0xe8, 0xaa, - 0x98, 0xfb, 0x98, - 0xaf, 0xee, 0xee, - 0xd8, 0x70, 0x93, - 0xff, 0xef, 0xd5, - 0xff, 0xda, 0xb9, - 0xcd, 0x85, 0x3f, - 0xff, 0xc0, 0xcb, - 0xdd, 0xa0, 0xdd, - 0xb0, 0xe0, 0xe6, - 0x80, 0x00, 0x80, - 0xff, 0x00, 0x00, - 0xbc, 0x8f, 0x8f, - 0x41, 0x69, 0xe1, - 0x8b, 0x45, 0x13, - 0xfa, 0x80, 0x72, - 0xf4, 0xa4, 0x60, - 0x2e, 0x8b, 0x57, - 0xff, 0xf5, 0xee, - 0xa0, 0x52, 0x2d, - 0xc0, 0xc0, 0xc0, - 0x87, 0xce, 0xeb, - 0x6a, 0x5a, 0xcd, - 0x70, 0x80, 0x90, - 0x70, 0x80, 0x90, - 0xff, 0xfa, 0xfa, - 0x00, 0xff, 0x7f, - 0x46, 0x82, 0xb4, - 0xd2, 0xb4, 0x8c, - 0x00, 0x80, 0x80, - 0xd8, 0xbf, 0xd8, - 0xff, 0x63, 0x47, - 0x40, 0xe0, 0xd0, - 0xee, 0x82, 0xee, - 0xf5, 0xde, 0xb3, - 0xff, 0xff, 0xff, - 0xf5, 0xf5, 0xf5, - 0xff, 0xff, 0x00, - 0x9a, 0xcd, 0x32, - // sentinel value - 0xfff - }; - -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/configure.ac b/node_modules/gulp-sass/node_modules/node-sass/libsass/configure.ac deleted file mode 100644 index 0cd5f899..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/configure.ac +++ /dev/null @@ -1,73 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. - -AC_PREREQ([2.61]) -AC_INIT([libsass], [1.0], [support@moovweb.com]) -AC_CONFIG_SRCDIR([ast.hpp]) -AC_CONFIG_MACRO_DIR([m4]) -AC_CONFIG_HEADERS([config.h]) -AM_INIT_AUTOMAKE([1.10 foreign]) -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -LT_INIT - -# Checks for programs. -AC_PROG_CXX - -AC_LANG([C++]) - -# Checks for header files. -AC_CHECK_HEADERS([unistd.h]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_TYPE_SIZE_T - -# Checks for library functions. -AC_FUNC_MALLOC -AC_CHECK_FUNCS([floor getcwd strtol]) - -# Checks for testing. -AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests], [enable testing the build]), - [enable_tests="$enableval"], [enable_tests=no]) - -if test "x$enable_tests" = "xyes"; then - AC_PROG_CC - AC_PROG_AWK - AC_PATH_PROG(RUBY, [ruby]) - - AC_ARG_WITH(sassc-dir, - AS_HELP_STRING([--with-sassc-dir=<dir>], [specify directory of sassc sources for testing (default: sassc)]), - [sassc_dir="$withval"], [sassc_dir="sassc"]) - AC_CHECK_FILE([$sassc_dir/sassc.c], [], [ - AC_MSG_ERROR([Unable to find sassc directory. -You must clone the sassc repository in this directory or specify -the --with-sassc-dir=<dir> argument. -]) - ]) - SASS_SASSC_PATH=$sassc_dir - AC_SUBST(SASS_SASSC_PATH) - - AC_ARG_WITH(sass-spec-dir, - AS_HELP_STRING([--with-sass-spec-dir=<dir>], [specify directory of sass-spec for testing (default: sass-spec)]), - [sass_spec_dir="$withval"], [sass_spec_dir="sass-spec"]) - AC_CHECK_FILE([$sass_spec_dir/sass-spec.rb], [], [ - AC_MSG_ERROR([Unable to find sass-spec directory. -You must clone the sass-spec repository in this directory or specify -the --with-sass-spec-dir=<dir> argument. -]) - ]) - # Automake doesn't like its tests in an absolute path, so we make it relative. - case $sass_spec_dir in - /*) - SASS_SPEC_PATH=`$RUBY -e "require 'pathname';puts Pathname.new('$sass_spec_dir').relative_path_from(Pathname.new('$PWD')).to_s"` - ;; - *) - SASS_SPEC_PATH="$sass_spec_dir" - ;; - esac - AC_SUBST(SASS_SPEC_PATH) -fi - -AM_CONDITIONAL(ENABLE_TESTS, test "x$enable_tests" = "xyes") - -AC_CONFIG_FILES([Makefile support/libsass.pc]) -AC_OUTPUT diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/constants.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/constants.cpp deleted file mode 100644 index e9a87e24..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/constants.cpp +++ /dev/null @@ -1,132 +0,0 @@ -#include "constants.hpp" - -namespace Sass { - namespace Constants { - - // hidden variable name for the image path (for the image-url built-in) - extern const char image_path_var[] = "$[image path]"; - - // sass keywords - extern const char import_kwd[] = "@import"; - extern const char mixin_kwd[] = "@mixin"; - extern const char function_kwd[] = "@function"; - extern const char return_kwd[] = "@return"; - extern const char include_kwd[] = "@include"; - extern const char content_kwd[] = "@content"; - extern const char extend_kwd[] = "@extend"; - extern const char if_kwd[] = "@if"; - extern const char else_kwd[] = "@else"; - extern const char if_after_else_kwd[] = "if"; - extern const char for_kwd[] = "@for"; - extern const char from_kwd[] = "from"; - extern const char to_kwd[] = "to"; - extern const char through_kwd[] = "through"; - extern const char each_kwd[] = "@each"; - extern const char in_kwd[] = "in"; - extern const char while_kwd[] = "@while"; - extern const char warn_kwd[] = "@warn"; - extern const char default_kwd[] = "default"; - extern const char null_kwd[] = "null"; - extern const char optional_kwd[] = "optional"; - - // css standard units - extern const char em_kwd[] = "em"; - extern const char ex_kwd[] = "ex"; - extern const char px_kwd[] = "px"; - extern const char cm_kwd[] = "cm"; - extern const char mm_kwd[] = "mm"; - extern const char pt_kwd[] = "pt"; - extern const char pc_kwd[] = "pc"; - extern const char deg_kwd[] = "deg"; - extern const char rad_kwd[] = "rad"; - extern const char grad_kwd[] = "grad"; - extern const char ms_kwd[] = "ms"; - extern const char s_kwd[] = "s"; - extern const char Hz_kwd[] = "Hz"; - extern const char kHz_kwd[] = "kHz"; - - // vendor prefixes - extern const char vendor_opera_kwd[] = "-o-"; - extern const char vendor_webkit_kwd[] = "-webkit-"; - extern const char vendor_mozilla_kwd[] = "-moz-"; - extern const char vendor_ms_kwd[] = "-ms-"; - extern const char vendor_khtml_kwd[] = "-khtml-"; - - // css functions and keywords - extern const char charset_kwd[] = "@charset"; - extern const char media_kwd[] = "@media"; - extern const char keyframes_kwd[] = "keyframes"; - extern const char only_kwd[] = "only"; - extern const char rgb_kwd[] = "rgb("; - extern const char url_kwd[] = "url("; - extern const char image_url_kwd[] = "image-url("; - extern const char important_kwd[] = "important"; - extern const char pseudo_not_kwd[] = ":not("; - extern const char even_kwd[] = "even"; - extern const char odd_kwd[] = "odd"; - extern const char progid_kwd[] = "progid"; - - // css attribute-matching operators - extern const char tilde_equal[] = "~="; - extern const char pipe_equal[] = "|="; - extern const char caret_equal[] = "^="; - extern const char dollar_equal[] = "$="; - extern const char star_equal[] = "*="; - - // relational & logical operators and constants - extern const char and_kwd[] = "and"; - extern const char or_kwd[] = "or"; - extern const char not_kwd[] = "not"; - extern const char gt[] = ">"; - extern const char gte[] = ">="; - extern const char lt[] = "<"; - extern const char lte[] = "<="; - extern const char eq[] = "=="; - extern const char neq[] = "!="; - extern const char true_kwd[] = "true"; - extern const char false_kwd[] = "false"; - - // miscellaneous punctuation and delimiters - extern const char percent_str[] = "%"; - extern const char empty_str[] = ""; - extern const char slash_slash[] = "//"; - extern const char slash_star[] = "/*"; - extern const char star_slash[] = "*/"; - extern const char hash_lbrace[] = "#{"; - extern const char rbrace[] = "}"; - extern const char rparen[] = ")"; - extern const char sign_chars[] = "-+"; - extern const char hyphen[] = "-"; - extern const char ellipsis[] = "..."; - - // type names - extern const char numeric_name[] = "numeric value"; - extern const char number_name[] = "number"; - extern const char percentage_name[] = "percentage"; - extern const char dimension_name[] = "numeric dimension"; - extern const char string_name[] = "string"; - extern const char bool_name[] = "bool"; - extern const char color_name[] = "color"; - extern const char list_name[] = "list"; - extern const char arglist_name[] = "arglist"; - - // byte order marks - // (taken from http://en.wikipedia.org/wiki/Byte_order_mark) - extern const unsigned char utf_8_bom[] = { 0xEF, 0xBB, 0xBF }; - extern const unsigned char utf_16_bom_be[] = { 0xFE, 0xFF }; - extern const unsigned char utf_16_bom_le[] = { 0xFF, 0xFE }; - extern const unsigned char utf_32_bom_be[] = { 0x00, 0x00, 0xFE, 0xFF }; - extern const unsigned char utf_32_bom_le[] = { 0xFF, 0xFE, 0x00, 0x00 }; - extern const unsigned char utf_7_bom_1[] = { 0x2B, 0x2F, 0x76, 0x38 }; - extern const unsigned char utf_7_bom_2[] = { 0x2B, 0x2F, 0x76, 0x39 }; - extern const unsigned char utf_7_bom_3[] = { 0x2B, 0x2F, 0x76, 0x2B }; - extern const unsigned char utf_7_bom_4[] = { 0x2B, 0x2F, 0x76, 0x2F }; - extern const unsigned char utf_7_bom_5[] = { 0x2B, 0x2F, 0x76, 0x38, 0x2D }; - extern const unsigned char utf_1_bom[] = { 0xF7, 0x64, 0x4C }; - extern const unsigned char utf_ebcdic_bom[] = { 0xDD, 0x73, 0x66, 0x73 }; - extern const unsigned char scsu_bom[] = { 0x0E, 0xFE, 0xFF }; - extern const unsigned char bocu_1_bom[] = { 0xFB, 0xEE, 0x28 }; - extern const unsigned char gb_18030_bom[] = { 0x84, 0x31, 0x95, 0x33 }; - - } -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/constants.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/constants.hpp deleted file mode 100644 index 7cc60300..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/constants.hpp +++ /dev/null @@ -1,132 +0,0 @@ -#define SASS_CONSTANTS - -namespace Sass { - namespace Constants { - - // hidden variable name for the image path (for the image-url built-in) - extern const char image_path_var[]; - - // sass keywords - extern const char import_kwd[]; - extern const char mixin_kwd[]; - extern const char function_kwd[]; - extern const char return_kwd[]; - extern const char include_kwd[]; - extern const char content_kwd[]; - extern const char extend_kwd[]; - extern const char if_kwd[]; - extern const char else_kwd[]; - extern const char if_after_else_kwd[]; - extern const char for_kwd[]; - extern const char from_kwd[]; - extern const char to_kwd[]; - extern const char through_kwd[]; - extern const char each_kwd[]; - extern const char in_kwd[]; - extern const char while_kwd[]; - extern const char warn_kwd[]; - extern const char default_kwd[]; - extern const char null_kwd[]; - extern const char optional_kwd[]; - - // css standard units - extern const char em_kwd[]; - extern const char ex_kwd[]; - extern const char px_kwd[]; - extern const char cm_kwd[]; - extern const char mm_kwd[]; - extern const char pt_kwd[]; - extern const char pc_kwd[]; - extern const char deg_kwd[]; - extern const char rad_kwd[]; - extern const char grad_kwd[]; - extern const char ms_kwd[]; - extern const char s_kwd[]; - extern const char Hz_kwd[]; - extern const char kHz_kwd[]; - - // vendor prefixes - extern const char vendor_opera_kwd[]; - extern const char vendor_webkit_kwd[]; - extern const char vendor_mozilla_kwd[]; - extern const char vendor_ms_kwd[]; - extern const char vendor_khtml_kwd[]; - - // css functions and keywords - extern const char charset_kwd[]; - extern const char media_kwd[]; - extern const char keyframes_kwd[]; - extern const char only_kwd[]; - extern const char rgb_kwd[]; - extern const char url_kwd[]; - extern const char image_url_kwd[]; - extern const char important_kwd[]; - extern const char pseudo_not_kwd[]; - extern const char even_kwd[]; - extern const char odd_kwd[]; - extern const char progid_kwd[]; - - // css attribute-matching operators - extern const char tilde_equal[]; - extern const char pipe_equal[]; - extern const char caret_equal[]; - extern const char dollar_equal[]; - extern const char star_equal[]; - - // relational & logical operators and constants - extern const char and_kwd[]; - extern const char or_kwd[]; - extern const char not_kwd[]; - extern const char gt[]; - extern const char gte[]; - extern const char lt[]; - extern const char lte[]; - extern const char eq[]; - extern const char neq[]; - extern const char true_kwd[]; - extern const char false_kwd[]; - - // miscellaneous punctuation and delimiters - extern const char percent_str[]; - extern const char empty_str[]; - extern const char slash_slash[]; - extern const char slash_star[]; - extern const char star_slash[]; - extern const char hash_lbrace[]; - extern const char rbrace[]; - extern const char rparen[]; - extern const char sign_chars[]; - extern const char hyphen[]; - extern const char ellipsis[]; - - // type names - extern const char numeric_name[]; - extern const char number_name[]; - extern const char percentage_name[]; - extern const char dimension_name[]; - extern const char string_name[]; - extern const char bool_name[]; - extern const char color_name[]; - extern const char list_name[]; - extern const char arglist_name[]; - - // byte order marks - // (taken from http://en.wikipedia.org/wiki/Byte_order_mark) - extern const unsigned char utf_8_bom[]; - extern const unsigned char utf_16_bom_be[]; - extern const unsigned char utf_16_bom_le[]; - extern const unsigned char utf_32_bom_be[]; - extern const unsigned char utf_32_bom_le[]; - extern const unsigned char utf_7_bom_1[]; - extern const unsigned char utf_7_bom_2[]; - extern const unsigned char utf_7_bom_3[]; - extern const unsigned char utf_7_bom_4[]; - extern const unsigned char utf_7_bom_5[]; - extern const unsigned char utf_1_bom[]; - extern const unsigned char utf_ebcdic_bom[]; - extern const unsigned char scsu_bom[]; - extern const unsigned char bocu_1_bom[]; - extern const unsigned char gb_18030_bom[]; - - } -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/context.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/context.cpp deleted file mode 100644 index 1f589e3a..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/context.cpp +++ /dev/null @@ -1,394 +0,0 @@ -#ifdef _WIN32 -#include <direct.h> -#define getcwd _getcwd -#define PATH_SEP ';' -#else -#include <unistd.h> -#define PATH_SEP ':' -#endif - -#include <cstring> -#include <iostream> -#include <sstream> -#include "context.hpp" -#include "constants.hpp" -#include "parser.hpp" -#include "file.hpp" -#include "inspect.hpp" -#include "output_nested.hpp" -#include "output_compressed.hpp" -#include "expand.hpp" -#include "eval.hpp" -#include "contextualize.hpp" -#include "extend.hpp" -#include "copy_c_str.hpp" -#include "color_names.hpp" -#include "functions.hpp" -#include "backtrace.hpp" - -#ifndef SASS_PRELEXER -#include "prelexer.hpp" -#endif - -#include <iomanip> -#include <iostream> - -namespace Sass { - using namespace Constants; - using std::cerr; - using std::endl; - - Context::Context(Context::Data initializers) - : mem(Memory_Manager<AST_Node>()), - source_c_str (initializers.source_c_str()), - sources (vector<const char*>()), - include_paths (initializers.include_paths()), - queue (vector<pair<string, const char*> >()), - style_sheets (map<string, Block*>()), - source_map(File::base_name(initializers.entry_point())), - image_path (initializers.image_path()), - source_comments (initializers.source_comments()), - source_maps (initializers.source_maps()), - output_style (initializers.output_style()), - source_map_file (initializers.source_map_file()), - names_to_colors (map<string, Color*>()), - colors_to_names (map<int, string>()) - { - cwd = get_cwd(); - - collect_include_paths(initializers.include_paths_c_str()); - collect_include_paths(initializers.include_paths_array()); - - setup_color_map(); - - string entry_point = initializers.entry_point(); - if (!entry_point.empty()) { - string result(add_file(entry_point)); - if (result.empty()) { - throw entry_point; - } - } - } - - Context::~Context() - { for (size_t i = 0; i < sources.size(); ++i) delete[] sources[i]; } - - void Context::setup_color_map() - { - size_t i = 0; - while (color_names[i]) { - string name(color_names[i]); - Color* value = new (mem) Color("[COLOR TABLE]", Position(), - color_values[i*3], - color_values[i*3+1], - color_values[i*3+2]); - names_to_colors[name] = value; - int numval = color_values[i*3]*0x10000; - numval += color_values[i*3+1]*0x100; - numval += color_values[i*3+2]; - colors_to_names[numval] = name; - ++i; - } - } - - void Context::collect_include_paths(const char* paths_str) - { - include_paths.push_back(cwd); - - if (paths_str) { - const char* beg = paths_str; - const char* end = Prelexer::find_first<PATH_SEP>(beg); - - while (end) { - string path(beg, end - beg); - if (!path.empty()) { - if (*path.rbegin() != '/') path += '/'; - include_paths.push_back(path); - } - beg = end + 1; - end = Prelexer::find_first<PATH_SEP>(beg); - } - - string path(beg); - if (!path.empty()) { - if (*path.rbegin() != '/') path += '/'; - include_paths.push_back(path); - } - } - } - - void Context::collect_include_paths(const char* paths_array[]) - { - include_paths.push_back(get_cwd()); - if (*include_paths.back().rbegin() != '/') include_paths.back() += '/'; - - // if (paths_array) { - // for (size_t i = 0; paths_array[i]; ++i) { - // string path(paths_array[i]); - // if (!path.empty()) { - // if (*path.rbegin() != '/') path += '/'; - // include_paths.push_back(path); - // } - // } - // } - } - - string Context::add_file(string path) - { - using namespace File; - char* contents = 0; - string real_path; - for (size_t i = 0, S = include_paths.size(); i < S; ++i) { - string full_path(join_paths(include_paths[i], path)); - included_files.push_back(full_path); - if (style_sheets.count(full_path)) return full_path; - contents = resolve_and_load(full_path, real_path); - if (contents) { - sources.push_back(contents); - included_files.push_back(real_path); - queue.push_back(make_pair(full_path, contents)); - source_map.files.push_back(resolve_relative_path(real_path, source_map_file, cwd)); - style_sheets[full_path] = 0; - return full_path; - } - } - return string(); - } - - string Context::add_file(string dir, string rel_filepath) - { - using namespace File; - char* contents = 0; - string real_path; - string full_path(join_paths(dir, rel_filepath)); - if (style_sheets.count(full_path)) return full_path; - contents = resolve_and_load(full_path, real_path); - if (contents) { - sources.push_back(contents); - included_files.push_back(real_path); - queue.push_back(make_pair(full_path, contents)); - source_map.files.push_back(resolve_relative_path(real_path, source_map_file, cwd)); - style_sheets[full_path] = 0; - return full_path; - } - for (size_t i = 0, S = include_paths.size(); i < S; ++i) { - string full_path(join_paths(include_paths[i], rel_filepath)); - if (style_sheets.count(full_path)) return full_path; - contents = resolve_and_load(full_path, real_path); - if (contents) { - sources.push_back(contents); - included_files.push_back(real_path); - queue.push_back(make_pair(full_path, contents)); - source_map.files.push_back(resolve_relative_path(real_path, source_map_file, cwd)); - style_sheets[full_path] = 0; - return full_path; - } - } - return string(); - } - - void register_function(Context&, Signature sig, Native_Function f, Env* env); - void register_function(Context&, Signature sig, Native_Function f, size_t arity, Env* env); - void register_overload_stub(Context&, string name, Env* env); - void register_built_in_functions(Context&, Env* env); - void register_c_functions(Context&, Env* env, Sass_C_Function_Descriptor*); - void register_c_function(Context&, Env* env, Sass_C_Function_Descriptor); - - char* Context::compile_file() - { - Block* root = 0; - for (size_t i = 0; i < queue.size(); ++i) { - Parser p(Parser::from_c_str(queue[i].second, *this, queue[i].first, Position(1 + i, 1, 1))); - Block* ast = p.parse(); - if (i == 0) root = ast; - style_sheets[queue[i].first] = ast; - } - Env tge; - Backtrace backtrace(0, "", Position(), ""); - register_built_in_functions(*this, &tge); - Eval eval(*this, &tge, &backtrace); - Contextualize contextualize(*this, &eval, &tge, &backtrace); - Expand expand(*this, &eval, &contextualize, &tge, &backtrace); - // Inspect inspect(this); - Output_Nested output_nested; - - root = root->perform(&expand)->block(); - if (expand.extensions.size()) { - Extend extend(*this, expand.extensions, &backtrace); - root->perform(&extend); - } - char* result = 0; - switch (output_style) { - case COMPRESSED: { - Output_Compressed output_compressed(this); - root->perform(&output_compressed); - string output = output_compressed.get_buffer(); - if (source_maps) output += format_source_mapping_url(source_map_file); - result = copy_c_str(output.c_str()); - } break; - - default: { - Output_Nested output_nested(source_comments, this); - root->perform(&output_nested); - string output = output_nested.get_buffer(); - if (source_maps) output += "\n" + format_source_mapping_url(source_map_file); - result = copy_c_str(output.c_str()); - - } break; - } - - return result; - } - - string Context::format_source_mapping_url(const string& file) const - { - return "/*# sourceMappingURL=" + File::base_name(file) + " */"; - } - - char* Context::generate_source_map() - { - if (!source_maps) return 0; - char* result = 0; - string map = source_map.generate_source_map(this); - result = copy_c_str(map.c_str()); - return result; - } - - char* Context::compile_string() - { - if (!source_c_str) return 0; - queue.clear(); - queue.push_back(make_pair("source string", source_c_str)); - return compile_file(); - } - - std::vector<std::string> Context::get_included_files() - { - std::sort(included_files.begin(), included_files.end()); - included_files.erase( std::unique( included_files.begin(), included_files.end() ), included_files.end()); - return included_files; - } - - string Context::get_cwd() - { - const size_t wd_len = 1024; - char wd[wd_len]; - string cwd = getcwd(wd, wd_len); - if (cwd[cwd.length() - 1] != '/') cwd += '/'; - return cwd; - } - - void register_function(Context& ctx, Signature sig, Native_Function f, Env* env) - { - Definition* def = make_native_function(sig, f, ctx); - def->environment(env); - (*env)[def->name() + "[f]"] = def; - } - - void register_function(Context& ctx, Signature sig, Native_Function f, size_t arity, Env* env) - { - Definition* def = make_native_function(sig, f, ctx); - stringstream ss; - ss << def->name() << "[f]" << arity; - def->environment(env); - (*env)[ss.str()] = def; - } - - void register_overload_stub(Context& ctx, string name, Env* env) - { - Definition* stub = new (ctx.mem) Definition("[built-in function]", - Position(), - 0, - name, - 0, - 0, - true); - (*env)[name + "[f]"] = stub; - } - - - void register_built_in_functions(Context& ctx, Env* env) - { - using namespace Functions; - // RGB Functions - register_function(ctx, rgb_sig, rgb, env); - register_overload_stub(ctx, "rgba", env); - register_function(ctx, rgba_4_sig, rgba_4, 4, env); - register_function(ctx, rgba_2_sig, rgba_2, 2, env); - register_function(ctx, red_sig, red, env); - register_function(ctx, green_sig, green, env); - register_function(ctx, blue_sig, blue, env); - register_function(ctx, mix_sig, mix, env); - // HSL Functions - register_function(ctx, hsl_sig, hsl, env); - register_function(ctx, hsla_sig, hsla, env); - register_function(ctx, hue_sig, hue, env); - register_function(ctx, saturation_sig, saturation, env); - register_function(ctx, lightness_sig, lightness, env); - register_function(ctx, adjust_hue_sig, adjust_hue, env); - register_function(ctx, lighten_sig, lighten, env); - register_function(ctx, darken_sig, darken, env); - register_function(ctx, saturate_sig, saturate, env); - register_function(ctx, desaturate_sig, desaturate, env); - register_function(ctx, grayscale_sig, grayscale, env); - register_function(ctx, complement_sig, complement, env); - register_function(ctx, invert_sig, invert, env); - // Opacity Functions - register_function(ctx, alpha_sig, alpha, env); - register_function(ctx, opacity_sig, alpha, env); - register_function(ctx, opacify_sig, opacify, env); - register_function(ctx, fade_in_sig, opacify, env); - register_function(ctx, transparentize_sig, transparentize, env); - register_function(ctx, fade_out_sig, transparentize, env); - // Other Color Functions - register_function(ctx, adjust_color_sig, adjust_color, env); - register_function(ctx, scale_color_sig, scale_color, env); - register_function(ctx, change_color_sig, change_color, env); - register_function(ctx, ie_hex_str_sig, ie_hex_str, env); - // String Functions - register_function(ctx, unquote_sig, sass_unquote, env); - register_function(ctx, quote_sig, sass_quote, env); - // Number Functions - register_function(ctx, percentage_sig, percentage, env); - register_function(ctx, round_sig, round, env); - register_function(ctx, ceil_sig, ceil, env); - register_function(ctx, floor_sig, floor, env); - register_function(ctx, abs_sig, abs, env); - register_function(ctx, min_sig, min, env); - register_function(ctx, max_sig, max, env); - // List Functions - register_function(ctx, length_sig, length, env); - register_function(ctx, nth_sig, nth, env); - register_function(ctx, index_sig, index, env); - register_function(ctx, join_sig, join, env); - register_function(ctx, append_sig, append, env); - register_function(ctx, compact_sig, compact, env); - register_function(ctx, zip_sig, zip, env); - // Introspection Functions - register_function(ctx, type_of_sig, type_of, env); - register_function(ctx, unit_sig, unit, env); - register_function(ctx, unitless_sig, unitless, env); - register_function(ctx, comparable_sig, comparable, env); - // Boolean Functions - register_function(ctx, not_sig, sass_not, env); - register_function(ctx, if_sig, sass_if, env); - // Path Functions - register_function(ctx, image_url_sig, image_url, env); - } - - void register_c_functions(Context& ctx, Env* env, Sass_C_Function_Descriptor* descrs) - { - while (descrs->signature && descrs->function) { - register_c_function(ctx, env, *descrs); - ++descrs; - } - } - void register_c_function(Context& ctx, Env* env, Sass_C_Function_Descriptor descr) - { - Definition* def = make_c_function(descr.signature, descr.function, ctx); - def->environment(env); - (*env)[def->name() + "[f]"] = def; - } - - -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/context.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/context.hpp deleted file mode 100644 index 73877bae..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/context.hpp +++ /dev/null @@ -1,93 +0,0 @@ -#define SASS_CONTEXT - -#include <string> -#include <vector> -#include <map> -#include "kwd_arg_macros.hpp" - -#ifndef SASS_MEMORY_MANAGER -#include "memory_manager.hpp" -#endif - -#ifndef SASS_ENVIRONMENT -#include "environment.hpp" -#endif - -#ifndef SASS_SOURCE_MAP -#include "source_map.hpp" -#endif - -namespace Sass { - using namespace std; - class AST_Node; - class Block; - class Expression; - class Color; - struct Backtrace; - // typedef const char* Signature; - // struct Context; - // typedef Environment<AST_Node*> Env; - // typedef Expression* (*Native_Function)(Env&, Context&, Signature, string, size_t); - - enum Output_Style { NESTED, EXPANDED, COMPACT, COMPRESSED, FORMATTED }; - - struct Context { - Memory_Manager<AST_Node> mem; - - const char* source_c_str; - vector<const char*> sources; // c-strs containing Sass file contents - vector<string> include_paths; - vector<pair<string, const char*> > queue; // queue of files to be parsed - map<string, Block*> style_sheets; // map of paths to ASTs - SourceMap source_map; - - string image_path; // for the image-url Sass function - bool source_comments; - bool source_maps; - Output_Style output_style; - string source_map_file; - - map<string, Color*> names_to_colors; - map<int, string> colors_to_names; - - KWD_ARG_SET(Data) { - KWD_ARG(Data, const char*, source_c_str); - KWD_ARG(Data, string, entry_point); - KWD_ARG(Data, string, image_path); - KWD_ARG(Data, const char*, include_paths_c_str); - KWD_ARG(Data, const char**, include_paths_array); - KWD_ARG(Data, vector<string>, include_paths); - KWD_ARG(Data, bool, source_comments); - KWD_ARG(Data, bool, source_maps); - KWD_ARG(Data, Output_Style, output_style); - KWD_ARG(Data, string, source_map_file) - }; - - Context(Data); - ~Context(); - void collect_include_paths(const char* paths_str); - void collect_include_paths(const char* paths_array[]); - void setup_color_map(); - string add_file(string); - string add_file(string, string); - char* compile_string(); - char* compile_file(); - char* generate_source_map(); - - std::vector<string> get_included_files(); - - private: - string format_source_mapping_url(const string& file) const; - string get_cwd(); - - vector<string> included_files; - string cwd; - - // void register_built_in_functions(Env* env); - // void register_function(Signature sig, Native_Function f, Env* env); - // void register_function(Signature sig, Native_Function f, size_t arity, Env* env); - // void register_overload_stub(string name, Env* env); - - }; - -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/contextualize.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/contextualize.cpp deleted file mode 100644 index 89548b79..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/contextualize.cpp +++ /dev/null @@ -1,137 +0,0 @@ -#include "contextualize.hpp" -#include "ast.hpp" -#include "eval.hpp" -#include "backtrace.hpp" -#include "to_string.hpp" -#include "parser.hpp" - -namespace Sass { - - Contextualize::Contextualize(Context& ctx, Eval* eval, Env* env, Backtrace* bt, Selector* placeholder, Selector* extender) - : ctx(ctx), eval(eval), env(env), parent(0), backtrace(bt), placeholder(placeholder), extender(extender) - { } - - Contextualize::~Contextualize() { } - - Selector* Contextualize::fallback_impl(AST_Node* n) - { return parent; } - - Contextualize* Contextualize::with(Selector* s, Env* e, Backtrace* bt, Selector* p, Selector* ex) - { - parent = s; - env = e; - backtrace = bt; - placeholder = p; - extender = ex; - return this; - } - - Selector* Contextualize::operator()(Selector_Schema* s) - { - To_String to_string; - string result_str(s->contents()->perform(eval->with(env, backtrace))->perform(&to_string)); - result_str += '{'; // the parser looks for a brace to end the selector - Selector* result_sel = Parser::from_c_str(result_str.c_str(), ctx, s->path(), s->position()).parse_selector_group(); - return result_sel->perform(this); - } - - Selector* Contextualize::operator()(Selector_List* s) - { - Selector_List* p = static_cast<Selector_List*>(parent); - Selector_List* ss = 0; - if (p) { - ss = new (ctx.mem) Selector_List(s->path(), s->position(), p->length() * s->length()); - for (size_t i = 0, L = p->length(); i < L; ++i) { - for (size_t j = 0, L = s->length(); j < L; ++j) { - parent = (*p)[i]; - Complex_Selector* comb = static_cast<Complex_Selector*>((*s)[j]->perform(this)); - if (comb) *ss << comb; - } - } - } - else { - ss = new (ctx.mem) Selector_List(s->path(), s->position(), s->length()); - for (size_t j = 0, L = s->length(); j < L; ++j) { - Complex_Selector* comb = static_cast<Complex_Selector*>((*s)[j]->perform(this)); - if (comb) *ss << comb; - } - } - return ss->length() ? ss : 0; - } - - Selector* Contextualize::operator()(Complex_Selector* s) - { - To_String to_string; - Complex_Selector* ss = new (ctx.mem) Complex_Selector(*s); - if (ss->head()) { - ss->head(static_cast<Compound_Selector*>(s->head()->perform(this))); - } - if (ss->tail()) { - ss->tail(static_cast<Complex_Selector*>(s->tail()->perform(this))); - } - if (!ss->head() && ss->combinator() == Complex_Selector::ANCESTOR_OF) { - return ss->tail(); - } - else { - return ss; - } - } - - Selector* Contextualize::operator()(Compound_Selector* s) - { - To_String to_string; - if (placeholder && extender && s->perform(&to_string) == placeholder->perform(&to_string)) { - return extender; - } - Compound_Selector* ss = new (ctx.mem) Compound_Selector(s->path(), s->position(), s->length()); - for (size_t i = 0, L = s->length(); i < L; ++i) { - Simple_Selector* simp = static_cast<Simple_Selector*>((*s)[i]->perform(this)); - if (simp) *ss << simp; - } - return ss->length() ? ss : 0; - } - - Selector* Contextualize::operator()(Negated_Selector* s) - { - Selector* old_parent = parent; - parent = 0; - Negated_Selector* neg = new (ctx.mem) Negated_Selector(s->path(), - s->position(), - s->selector()->perform(this)); - parent = old_parent; - return neg; - } - - Selector* Contextualize::operator()(Pseudo_Selector* s) - { return s; } - - Selector* Contextualize::operator()(Attribute_Selector* s) - { return s; } - - Selector* Contextualize::operator()(Selector_Qualifier* s) - { return s; } - - Selector* Contextualize::operator()(Type_Selector* s) - { return s; } - - Selector* Contextualize::operator()(Selector_Placeholder* s) - { - To_String to_string; - if (placeholder && extender && s->perform(&to_string) == placeholder->perform(&to_string)) { - return extender; - } - else { - return s; - } - } - - Selector* Contextualize::operator()(Selector_Reference* s) - { - if (!parent) return 0; - Selector_Reference* ss = new (ctx.mem) Selector_Reference(*s); - ss->selector(parent); - return ss; - } - - -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/contextualize.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/contextualize.hpp deleted file mode 100644 index de99ddf1..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/contextualize.hpp +++ /dev/null @@ -1,65 +0,0 @@ -#define SASS_CONTEXTUALIZE - -#ifndef SASS_ENVIRONMENT -#include "environment.hpp" -#endif - -#ifndef SASS_OPERATION -#include "operation.hpp" -#endif - -namespace Sass { - class AST_Node; - class Selector; - class Selector_Schema; - class Selector_List; - class Complex_Selector; - class Compound_Selector; - class Negated_Selector; - class Pseudo_Selector; - class Attribute_Selector; - class Selector_Qualifier; - class Type_Selector; - class Selector_Placeholder; - class Selector_Reference; - class Simple_Selector; - struct Context; - class Eval; - struct Backtrace; - - typedef Environment<AST_Node*> Env; - - class Contextualize : public Operation_CRTP<Selector*, Contextualize> { - - Context& ctx; - Eval* eval; - Env* env; - Selector* parent; - Backtrace* backtrace; - - Selector* fallback_impl(AST_Node* n); - - public: - Selector* placeholder; - Selector* extender; - Contextualize(Context&, Eval*, Env*, Backtrace*, Selector* placeholder = 0, Selector* extender = 0); - virtual ~Contextualize(); - Contextualize* with(Selector*, Env*, Backtrace*, Selector* placeholder = 0, Selector* extender = 0); - using Operation<Selector*>::operator(); - - Selector* operator()(Selector_Schema*); - Selector* operator()(Selector_List*); - Selector* operator()(Complex_Selector*); - Selector* operator()(Compound_Selector*); - Selector* operator()(Negated_Selector*); - Selector* operator()(Pseudo_Selector*); - Selector* operator()(Attribute_Selector*); - Selector* operator()(Selector_Qualifier*); - Selector* operator()(Type_Selector*); - Selector* operator()(Selector_Placeholder*); - Selector* operator()(Selector_Reference*); - - template <typename U> - Selector* fallback(U x) { return fallback_impl(x); } - }; -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/copy_c_str.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/copy_c_str.cpp deleted file mode 100644 index ce2dc389..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/copy_c_str.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include <cstdlib> -#include <cstring> - -namespace Sass { - using namespace std; - - char* copy_c_str(const char* orig) - { - char* copy = (char*) malloc(sizeof(char) * strlen(orig) + 1); - strcpy(copy, orig); - return copy; - } -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/copy_c_str.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/copy_c_str.hpp deleted file mode 100644 index 84ef998b..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/copy_c_str.hpp +++ /dev/null @@ -1,5 +0,0 @@ -namespace Sass { - - char* copy_c_str(const char*); - -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/environment.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/environment.hpp deleted file mode 100644 index 8b94ea39..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/environment.hpp +++ /dev/null @@ -1,56 +0,0 @@ -#define SASS_ENVIRONMENT - -#include <string> -#include <map> -#include "ast_def_macros.hpp" -#include <iostream> - -namespace Sass { - using std::string; - using std::map; - using std::cerr; - using std::endl; - - template <typename T> - class Environment { - // TODO: test with unordered_map - map<string, T> current_frame_; - ADD_PROPERTY(Environment*, parent); - - public: - Environment() : current_frame_(map<string, T>()), parent_(0) { } - - map<string, T>& current_frame() { return current_frame_; } - - void link(Environment& env) { parent_ = &env; } - void link(Environment* env) { parent_ = env; } - - bool has(const string key) const - { - if (current_frame_.count(key)) return true; - else if (parent_) return parent_->has(key); - else return false; - } - - bool current_frame_has(const string key) const - { return current_frame_.count(key); } - - T& operator[](const string key) - { - if (current_frame_.count(key)) return current_frame_[key]; - else if (parent_) return (*parent_)[key]; - else return current_frame_[key]; - } - - void print() - { - for (typename map<string, T>::iterator i = current_frame_.begin(); i != current_frame_.end(); ++i) { - cerr << i->first << endl; - } - if (parent_) { - cerr << "---" << endl; - parent_->print(); - } - } - }; -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/error_handling.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/error_handling.cpp deleted file mode 100644 index 3f385a4a..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/error_handling.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef SASS_ERROR_HANDLING -#include "error_handling.hpp" -#endif - -#include "backtrace.hpp" -#include "prelexer.hpp" - -namespace Sass { - - Error::Error(Type type, string path, Position position, string message) - : type(type), path(path), position(position), message(message) - { } - - void error(string msg, string path, Position position) - { throw Error(Error::syntax, path, position, msg); } - - void error(string msg, string path, Position position, Backtrace* bt) - { - if (!path.empty() && Prelexer::string_constant(path.c_str())) - path = path.substr(1, path.size() - 1); - - Backtrace top(bt, path, position, ""); - msg += top.to_string(); - - throw Error(Error::syntax, path, position, msg); - } - -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/error_handling.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/error_handling.hpp deleted file mode 100644 index c944b2da..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/error_handling.hpp +++ /dev/null @@ -1,28 +0,0 @@ -#define SASS_ERROR_HANDLING -#include <string> - -#ifndef SASS_POSITION -#include "position.hpp" -#endif - -namespace Sass { - using namespace std; - - struct Backtrace; - - struct Error { - enum Type { read, write, syntax, evaluation }; - - Type type; - string path; - Position position; - string message; - - Error(Type type, string path, Position position, string message); - - }; - - void error(string msg, string path, Position position); - void error(string msg, string path, Position position, Backtrace* bt); - -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/eval.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/eval.cpp deleted file mode 100644 index 458bf10f..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/eval.cpp +++ /dev/null @@ -1,853 +0,0 @@ -#include "eval.hpp" -#include "ast.hpp" -#include "bind.hpp" -#include "to_string.hpp" -#include "inspect.hpp" -#include "to_c.hpp" -#include "context.hpp" -#include "backtrace.hpp" -#include "prelexer.hpp" -#include <cstdlib> -#include <cmath> - -#include <iostream> -#include <iomanip> - -namespace Sass { - using namespace std; - - inline double add(double x, double y) { return x + y; } - inline double sub(double x, double y) { return x - y; } - inline double mul(double x, double y) { return x * y; } - inline double div(double x, double y) { return x / y; } // x/0 checked by caller - typedef double (*bop)(double, double); - bop ops[Binary_Expression::NUM_OPS] = { - 0, 0, // and, or - 0, 0, 0, 0, 0, 0, // eq, neq, gt, gte, lt, lte - add, sub, mul, div, fmod - }; - - Eval::Eval(Context& ctx, Env* env, Backtrace* bt) - : ctx(ctx), env(env), backtrace(bt) { } - Eval::~Eval() { } - - Eval* Eval::with(Env* e, Backtrace* bt) // for setting the env before eval'ing an expression - { - env = e; - backtrace = bt; - return this; - } - - Expression* Eval::operator()(Block* b) - { - Expression* val = 0; - for (size_t i = 0, L = b->length(); i < L; ++i) { - val = (*b)[i]->perform(this); - if (val) return val; - } - return val; - } - - Expression* Eval::operator()(Assignment* a) - { - string var(a->variable()); - if (env->has(var)) { - if(!a->is_guarded()) (*env)[var] = a->value()->perform(this); - } - else { - env->current_frame()[var] = a->value()->perform(this); - } - return 0; - } - - Expression* Eval::operator()(If* i) - { - if (*i->predicate()->perform(this)) { - return i->consequent()->perform(this); - } - else { - Block* alt = i->alternative(); - if (alt) return alt->perform(this); - } - return 0; - } - - Expression* Eval::operator()(For* f) - { - string variable(f->variable()); - Expression* low = f->lower_bound()->perform(this); - if (low->concrete_type() != Expression::NUMBER) { - error("lower bound of `@for` directive must be numeric", low->path(), low->position()); - } - Expression* high = f->upper_bound()->perform(this); - if (high->concrete_type() != Expression::NUMBER) { - error("upper bound of `@for` directive must be numeric", high->path(), high->position()); - } - double lo = static_cast<Number*>(low)->value(); - double hi = static_cast<Number*>(high)->value(); - if (f->is_inclusive()) ++hi; - Env new_env; - new_env[variable] = new (ctx.mem) Number(low->path(), low->position(), lo); - new_env.link(env); - env = &new_env; - Block* body = f->block(); - Expression* val = 0; - for (double i = lo; - i < hi; - (*env)[variable] = new (ctx.mem) Number(low->path(), low->position(), ++i)) { - val = body->perform(this); - if (val) break; - } - env = new_env.parent(); - return val; - } - - Expression* Eval::operator()(Each* e) - { - string variable(e->variable()); - Expression* expr = e->list()->perform(this); - List* list = 0; - if (expr->concrete_type() != Expression::LIST) { - list = new (ctx.mem) List(expr->path(), expr->position(), 1, List::COMMA); - *list << expr; - } - else { - list = static_cast<List*>(expr); - } - Env new_env; - new_env[variable] = 0; - new_env.link(env); - env = &new_env; - Block* body = e->block(); - Expression* val = 0; - for (size_t i = 0, L = list->length(); i < L; ++i) { - (*env)[variable] = (*list)[i]; - val = body->perform(this); - if (val) break; - } - env = new_env.parent(); - return val; - } - - Expression* Eval::operator()(While* w) - { - Expression* pred = w->predicate(); - Block* body = w->block(); - while (*pred->perform(this)) { - Expression* val = body->perform(this); - if (val) return val; - } - return 0; - } - - Expression* Eval::operator()(Return* r) - { - return r->value()->perform(this); - } - - Expression* Eval::operator()(Warning* w) - { - Expression* message = w->message()->perform(this); - To_String to_string; - string prefix("WARNING: "); - string indent(" "); - string result(unquote(message->perform(&to_string))); - cerr << prefix << result; - Backtrace top(backtrace, w->path(), w->position(), ""); - cerr << top.to_string(true); - cerr << endl << endl; - return 0; - } - - Expression* Eval::operator()(List* l) - { - List* ll = new (ctx.mem) List(l->path(), - l->position(), - l->length(), - l->separator(), - l->is_arglist()); - for (size_t i = 0, L = l->length(); i < L; ++i) { - *ll << (*l)[i]->perform(this); - } - return ll; - } - - // -- only need to define two comparisons, and the rest can be implemented in terms of them - bool eq(Expression*, Expression*, Context&, Eval*); - bool lt(Expression*, Expression*, Context&); - // -- arithmetic on the combinations that matter - Expression* op_numbers(Context&, Binary_Expression*, Expression*, Expression*); - Expression* op_number_color(Context&, Binary_Expression::Type, Expression*, Expression*); - Expression* op_color_number(Context&, Binary_Expression::Type, Expression*, Expression*); - Expression* op_colors(Context&, Binary_Expression::Type, Expression*, Expression*); - Expression* op_strings(Context&, Binary_Expression::Type, Expression*, Expression*); - - Expression* Eval::operator()(Binary_Expression* b) - { - Binary_Expression::Type op_type = b->type(); - // don't eval delayed expressions (the '/' when used as a separator) - if (op_type == Binary_Expression::DIV && b->is_delayed()) return b; - // the logical connectives need to short-circuit - Expression* lhs = b->left()->perform(this); - switch (op_type) { - case Binary_Expression::AND: - return *lhs ? b->right()->perform(this) : lhs; - break; - - case Binary_Expression::OR: - return *lhs ? lhs : b->right()->perform(this); - break; - - default: - break; - } - // not a logical connective, so go ahead and eval the rhs - Expression* rhs = b->right()->perform(this); - - // see if it's a relational expression - switch(op_type) { - case Binary_Expression::EQ: return new (ctx.mem) Boolean(b->path(), b->position(), eq(lhs, rhs, ctx)); - case Binary_Expression::NEQ: return new (ctx.mem) Boolean(b->path(), b->position(), !eq(lhs, rhs, ctx)); - case Binary_Expression::GT: return new (ctx.mem) Boolean(b->path(), b->position(), !lt(lhs, rhs, ctx) && !eq(lhs, rhs, ctx)); - case Binary_Expression::GTE: return new (ctx.mem) Boolean(b->path(), b->position(), !lt(lhs, rhs, ctx)); - case Binary_Expression::LT: return new (ctx.mem) Boolean(b->path(), b->position(), lt(lhs, rhs, ctx)); - case Binary_Expression::LTE: return new (ctx.mem) Boolean(b->path(), b->position(), lt(lhs, rhs, ctx) || eq(lhs, rhs, ctx)); - - default: break; - } - - Expression::Concrete_Type l_type = lhs->concrete_type(); - Expression::Concrete_Type r_type = rhs->concrete_type(); - - if (l_type == Expression::NUMBER && r_type == Expression::NUMBER) { - return op_numbers(ctx, b, lhs, rhs); - } - if (l_type == Expression::NUMBER && r_type == Expression::COLOR) { - return op_number_color(ctx, op_type, lhs, rhs); - } - if (l_type == Expression::COLOR && r_type == Expression::NUMBER) { - return op_color_number(ctx, op_type, lhs, rhs); - } - if (l_type == Expression::COLOR && r_type == Expression::COLOR) { - return op_colors(ctx, op_type, lhs, rhs); - } - return op_strings(ctx, op_type, lhs, rhs); - } - - Expression* Eval::operator()(Unary_Expression* u) - { - Expression* operand = u->operand()->perform(this); - if (operand->concrete_type() == Expression::NUMBER) { - Number* result = new (ctx.mem) Number(*static_cast<Number*>(operand)); - result->value(u->type() == Unary_Expression::MINUS - ? -result->value() - : result->value()); - return result; - } - else { - To_String to_string; - // Special cases: +/- variables which evaluate to null ouput just +/-, - // but +/- null itself outputs the string - if (operand->concrete_type() == Expression::NULL_VAL && typeid(*(u->operand())) == typeid(Variable)) { - u->operand(new (ctx.mem) String_Constant(u->path(), u->position(), "")); - } - String_Constant* result = new (ctx.mem) String_Constant(u->path(), - u->position(), - u->perform(&to_string)); - return result; - } - // unreachable - return u; - } - - Expression* Eval::operator()(Function_Call* c) - { - if (c->name() == "calc") return c; - Arguments* args = static_cast<Arguments*>(c->arguments()->perform(this)); - string full_name(c->name() + "[f]"); - - // if it doesn't exist, just pass it through as a literal - if (!env->has(full_name)) { - Function_Call* lit = new (ctx.mem) Function_Call(c->path(), - c->position(), - c->name(), - args); - To_String to_string; - return new (ctx.mem) String_Constant(c->path(), - c->position(), - lit->perform(&to_string)); - } - - Expression* result = c; - Definition* def = static_cast<Definition*>((*env)[full_name]); - Block* body = def->block(); - Native_Function func = def->native_function(); - Sass_C_Function c_func = def->c_function(); - - for (size_t i = 0, L = args->length(); i < L; ++i) { - (*args)[i]->value((*args)[i]->value()->perform(this)); - } - - Parameters* params = def->parameters(); - Env new_env; - new_env.link(def->environment()); - // bind("function " + c->name(), params, args, ctx, &new_env, this); - // Env* old_env = env; - // env = &new_env; - - // Backtrace here(backtrace, c->path(), c->line(), ", in function `" + c->name() + "`"); - // backtrace = &here; - - // if it's user-defined, eval the body - if (body) { - - bind("function " + c->name(), params, args, ctx, &new_env, this); - Env* old_env = env; - env = &new_env; - - Backtrace here(backtrace, c->path(), c->position(), ", in function `" + c->name() + "`"); - backtrace = &here; - - result = body->perform(this); - if (!result) { - error(string("function ") + c->name() + " did not return a value", c->path(), c->position()); - } - backtrace = here.parent; - env = old_env; - } - // if it's native, invoke the underlying CPP function - else if (func) { - - bind("function " + c->name(), params, args, ctx, &new_env, this); - Env* old_env = env; - env = &new_env; - - Backtrace here(backtrace, c->path(), c->position(), ", in function `" + c->name() + "`"); - backtrace = &here; - - result = func(*env, ctx, def->signature(), c->path(), c->position(), backtrace); - - backtrace = here.parent; - env = old_env; - } - // else if it's a user-defined c function - else if (c_func) { - - bind("function " + c->name(), params, args, ctx, &new_env, this); - Env* old_env = env; - env = &new_env; - - Backtrace here(backtrace, c->path(), c->position(), ", in function `" + c->name() + "`"); - backtrace = &here; - - To_C to_c; - Sass_Value c_val = c_func(args->perform(&to_c)); - if (c_val.unknown.tag == SASS_ERROR) { - error("error in C function " + c->name() + ": " + c_val.error.message, c->path(), c->position(), backtrace); - } - result = cval_to_astnode(c_val, ctx, backtrace, c->path(), c->position()); - - backtrace = here.parent; - env = old_env; - } - // else it's an overloaded native function; resolve it - else if (def->is_overload_stub()) { - size_t arity = args->length(); - stringstream ss; - ss << full_name << arity; - string resolved_name(ss.str()); - if (!env->has(resolved_name)) error("overloaded function `" + string(c->name()) + "` given wrong number of arguments", c->path(), c->position()); - Definition* resolved_def = static_cast<Definition*>((*env)[resolved_name]); - params = resolved_def->parameters(); - Env newer_env; - newer_env.link(resolved_def->environment()); - bind("function " + c->name(), params, args, ctx, &newer_env, this); - Env* old_env = env; - env = &newer_env; - - Backtrace here(backtrace, c->path(), c->position(), ", in function `" + c->name() + "`"); - backtrace = &here; - - result = resolved_def->native_function()(*env, ctx, resolved_def->signature(), c->path(), c->position(), backtrace); - - backtrace = here.parent; - env = old_env; - } - - // backtrace = here.parent; - // env = old_env; - result->position(c->position()); - return result; - } - - Expression* Eval::operator()(Function_Call_Schema* s) - { - Expression* evaluated_name = s->name()->perform(this); - Expression* evaluated_args = s->arguments()->perform(this); - String_Schema* ss = new (ctx.mem) String_Schema(s->path(), s->position(), 2); - (*ss) << evaluated_name << evaluated_args; - return ss->perform(this); - } - - Expression* Eval::operator()(Variable* v) - { - // To_String to_string; - // cerr << "looking up " << v->name() << endl; - string name(v->name()); - Expression* value = 0; - if (env->has(name)) value = static_cast<Expression*>((*env)[name]); - else error("unbound variable " + v->name(), v->path(), v->position()); - // cerr << "fetched a value of type " << typeid(*value).name() << endl; - // if (value) cerr << "fetched a value: " << value->perform(&to_string) << endl; - return value; - } - - Expression* Eval::operator()(Textual* t) - { - using Prelexer::number; - Expression* result = 0; - switch (t->type()) - { - case Textual::NUMBER: - result = new (ctx.mem) Number(t->path(), - t->position(), - atof(t->value().c_str())); - break; - case Textual::PERCENTAGE: - result = new (ctx.mem) Number(t->path(), - t->position(), - atof(t->value().c_str()), - "%"); - break; - case Textual::DIMENSION: - result = new (ctx.mem) Number(t->path(), - t->position(), - atof(t->value().c_str()), - Token(number(t->value().c_str()))); - break; - case Textual::HEX: { - string hext(t->value().substr(1)); // chop off the '#' - if (hext.length() == 6) { - string r(hext.substr(0,2)); - string g(hext.substr(2,2)); - string b(hext.substr(4,2)); - result = new (ctx.mem) Color(t->path(), - t->position(), - static_cast<double>(strtol(r.c_str(), NULL, 16)), - static_cast<double>(strtol(g.c_str(), NULL, 16)), - static_cast<double>(strtol(b.c_str(), NULL, 16)), - 1, - t->value()); - } - else { - result = new (ctx.mem) Color(t->path(), - t->position(), - static_cast<double>(strtol(string(2,hext[0]).c_str(), NULL, 16)), - static_cast<double>(strtol(string(2,hext[1]).c_str(), NULL, 16)), - static_cast<double>(strtol(string(2,hext[2]).c_str(), NULL, 16)), - 1, - t->value()); - } - } break; - } - return result; - } - - Expression* Eval::operator()(Number* n) - { - return n; - } - - Expression* Eval::operator()(Boolean* b) - { - return b; - } - - char is_quoted(string str) - { - size_t len = str.length(); - if (len < 2) return 0; - if ((str[0] == '"' && str[len-1] == '"') || (str[0] == '\'' && str[len-1] == '\'')) { - return str[0]; - } - else { - return 0; - } - } - - Expression* Eval::operator()(String_Schema* s) - { - string acc; - To_String to_string; - for (size_t i = 0, L = s->length(); i < L; ++i) { - string chunk((*s)[i]->perform(this)->perform(&to_string)); - if (((s->quote_mark() && is_quoted(chunk)) || !s->quote_mark()) && (*s)[i]->is_interpolant()) { // some redundancy in that test - acc += unquote(chunk); - } - else { - acc += chunk; - } - } - return new (ctx.mem) String_Constant(s->path(), - s->position(), - acc); - } - - Expression* Eval::operator()(String_Constant* s) - { - if (!s->is_delayed() && ctx.names_to_colors.count(s->value())) { - Color* c = new (ctx.mem) Color(*ctx.names_to_colors[s->value()]); - c->path(s->path()); - c->position(s->position()); - return c; - } - return s; - } - - Expression* Eval::operator()(Media_Query* q) - { - String* t = q->media_type(); - t = static_cast<String*>(t ? t->perform(this) : 0); - Media_Query* qq = new (ctx.mem) Media_Query(q->path(), - q->position(), - t, - q->length(), - q->is_negated(), - q->is_restricted()); - for (size_t i = 0, L = q->length(); i < L; ++i) { - *qq << static_cast<Media_Query_Expression*>((*q)[i]->perform(this)); - } - return qq; - } - - Expression* Eval::operator()(Media_Query_Expression* e) - { - Expression* feature = e->feature(); - feature = (feature ? feature->perform(this) : 0); - Expression* value = e->value(); - value = (value ? value->perform(this) : 0); - return new (ctx.mem) Media_Query_Expression(e->path(), - e->position(), - feature, - value, - e->is_interpolated()); - } - - Expression* Eval::operator()(Null* n) - { - return n; - } - - Expression* Eval::operator()(Argument* a) - { - Expression* val = a->value(); - val->is_delayed(false); - val = val->perform(this); - val->is_delayed(false); - if (a->is_rest_argument() && (val->concrete_type() != Expression::LIST)) { - List* wrapper = new (ctx.mem) List(val->path(), - val->position(), - 0, - List::COMMA, - true); - *wrapper << val; - val = wrapper; - } - return new (ctx.mem) Argument(a->path(), - a->position(), - val, - a->name(), - a->is_rest_argument()); - } - - Expression* Eval::operator()(Arguments* a) - { - Arguments* aa = new (ctx.mem) Arguments(a->path(), a->position()); - for (size_t i = 0, L = a->length(); i < L; ++i) { - *aa << static_cast<Argument*>((*a)[i]->perform(this)); - } - return aa; - } - - inline Expression* Eval::fallback_impl(AST_Node* n) - { - return static_cast<Expression*>(n); - } - - // All the binary helpers. - - bool eq(Expression* lhs, Expression* rhs, Context& ctx) - { - Expression::Concrete_Type ltype = lhs->concrete_type(); - Expression::Concrete_Type rtype = rhs->concrete_type(); - if (ltype != rtype) return false; - switch (ltype) { - - case Expression::BOOLEAN: { - return static_cast<Boolean*>(lhs)->value() == - static_cast<Boolean*>(rhs)->value(); - } break; - - case Expression::NUMBER: { - Number* l = static_cast<Number*>(lhs); - Number* r = static_cast<Number*>(rhs); - Number tmp_r(*r); - tmp_r.normalize(l->find_convertible_unit()); - return l->unit() == tmp_r.unit() && l->value() == tmp_r.value() - ? true - : false; - } break; - - case Expression::COLOR: { - Color* l = static_cast<Color*>(lhs); - Color* r = static_cast<Color*>(rhs); - return l->r() == r->r() && - l->g() == r->g() && - l->b() == r->b() && - l->a() == r->a(); - } break; - - case Expression::STRING: { - return unquote(static_cast<String_Constant*>(lhs)->value()) == - unquote(static_cast<String_Constant*>(rhs)->value()); - } break; - - case Expression::LIST: { - List* l = static_cast<List*>(lhs); - List* r = static_cast<List*>(rhs); - if (l->length() != r->length()) return false; - if (l->separator() != r->separator()) return false; - for (size_t i = 0, L = l->length(); i < L; ++i) { - if (!eq((*l)[i], (*r)[i], ctx)) return false; - } - return true; - } break; - - case Expression::NULL_VAL: { - return true; - } break; - - default: break; - } - return false; - } - - bool lt(Expression* lhs, Expression* rhs, Context& ctx) - { - if (lhs->concrete_type() != Expression::NUMBER || - rhs->concrete_type() != Expression::NUMBER) - error("may only compare numbers", lhs->path(), lhs->position()); - Number* l = static_cast<Number*>(lhs); - Number* r = static_cast<Number*>(rhs); - Number tmp_r(*r); - tmp_r.normalize(l->find_convertible_unit()); - string l_unit(l->unit()); - string r_unit(tmp_r.unit()); - if (!l_unit.empty() && !r_unit.empty() && l->unit() != tmp_r.unit()) { - error("cannot compare numbers with incompatible units", l->path(), l->position()); - } - return l->value() < tmp_r.value(); - } - - Expression* op_numbers(Context& ctx, Binary_Expression* b, Expression* lhs, Expression* rhs) - { - Number* l = static_cast<Number*>(lhs); - Number* r = static_cast<Number*>(rhs); - double lv = l->value(); - double rv = r->value(); - Binary_Expression::Type op = b->type(); - if (op == Binary_Expression::DIV && !rv) { - return new (ctx.mem) String_Constant(l->path(), b->position(), "Infinity"); - } - if (op == Binary_Expression::MOD && !rv) { - error("division by zero", r->path(), r->position()); - } - - Number tmp(*r); - tmp.normalize(l->find_convertible_unit()); - string l_unit(l->unit()); - string r_unit(tmp.unit()); - if (l_unit != r_unit && !l_unit.empty() && !r_unit.empty() && - (op == Binary_Expression::ADD || op == Binary_Expression::SUB)) { - error("cannot add or subtract numbers with incompatible units", l->path(), l->position()); - } - Number* v = new (ctx.mem) Number(*l); - v->position(b->position()); - if (l_unit.empty() && (op == Binary_Expression::ADD || op == Binary_Expression::SUB)) { - v->numerator_units() = r->numerator_units(); - v->denominator_units() = r->denominator_units(); - } - - v->value(ops[op](lv, rv)); - if (op == Binary_Expression::MUL) { - for (size_t i = 0, S = r->numerator_units().size(); i < S; ++i) { - v->numerator_units().push_back(r->numerator_units()[i]); - } - for (size_t i = 0, S = r->denominator_units().size(); i < S; ++i) { - v->denominator_units().push_back(r->denominator_units()[i]); - } - } - else if (op == Binary_Expression::DIV) { - for (size_t i = 0, S = r->numerator_units().size(); i < S; ++i) { - v->denominator_units().push_back(r->numerator_units()[i]); - } - for (size_t i = 0, S = r->denominator_units().size(); i < S; ++i) { - v->numerator_units().push_back(r->denominator_units()[i]); - } - } - v->normalize(); - return v; - } - - Expression* op_number_color(Context& ctx, Binary_Expression::Type op, Expression* lhs, Expression* rhs) - { - Number* l = static_cast<Number*>(lhs); - Color* r = static_cast<Color*>(rhs); - // TODO: currently SASS converts colors to standard form when adding to strings; - // when https://github.com/nex3/sass/issues/363 is added this can be removed to - // preserve the original value - r->disp(""); - double lv = l->value(); - switch (op) { - case Binary_Expression::ADD: - case Binary_Expression::MUL: { - return new (ctx.mem) Color(l->path(), - l->position(), - ops[op](lv, r->r()), - ops[op](lv, r->g()), - ops[op](lv, r->b()), - r->a()); - } break; - case Binary_Expression::SUB: - case Binary_Expression::DIV: { - string sep(op == Binary_Expression::SUB ? "-" : "/"); - To_String to_string; - return new (ctx.mem) String_Constant(l->path(), - l->position(), - l->perform(&to_string) - + sep - + r->perform(&to_string)); - } break; - case Binary_Expression::MOD: { - error("cannot divide a number by a color", r->path(), r->position()); - } break; - default: break; // caller should ensure that we don't get here - } - // unreachable - return l; - } - - Expression* op_color_number(Context& ctx, Binary_Expression::Type op, Expression* lhs, Expression* rhs) - { - Color* l = static_cast<Color*>(lhs); - Number* r = static_cast<Number*>(rhs); - double rv = r->value(); - if (op == Binary_Expression::DIV && !rv) error("division by zero", r->path(), r->position()); - return new (ctx.mem) Color(l->path(), - l->position(), - ops[op](l->r(), rv), - ops[op](l->g(), rv), - ops[op](l->b(), rv), - l->a()); - } - - Expression* op_colors(Context& ctx, Binary_Expression::Type op, Expression* lhs, Expression* rhs) - { - Color* l = static_cast<Color*>(lhs); - Color* r = static_cast<Color*>(rhs); - if (l->a() != r->a()) { - error("alpha channels must be equal when combining colors", r->path(), r->position()); - } - if ((op == Binary_Expression::DIV || op == Binary_Expression::MOD) && - (!r->r() || !r->g() ||!r->b())) { - error("division by zero", r->path(), r->position()); - } - return new (ctx.mem) Color(l->path(), - l->position(), - ops[op](l->r(), r->r()), - ops[op](l->g(), r->g()), - ops[op](l->b(), r->b()), - l->a()); - } - - Expression* op_strings(Context& ctx, Binary_Expression::Type op, Expression* lhs, Expression*rhs) - { - To_String to_string; - Expression::Concrete_Type ltype = lhs->concrete_type(); - Expression::Concrete_Type rtype = rhs->concrete_type(); - - // TODO: currently SASS converts colors to standard form when adding to strings; - // when https://github.com/nex3/sass/issues/363 is added this can be removed to - // preserve the original value - if (ltype == Expression::COLOR) ((Sass::Color*)lhs)->disp(""); - if (rtype == Expression::COLOR) ((Sass::Color*)rhs)->disp(""); - - string lstr(lhs->perform(&to_string)); - string rstr(rhs->perform(&to_string)); - bool unquoted = false; - if (ltype == Expression::STRING && lstr[0] != '"' && lstr[0] != '\'') unquoted = true; - if (ltype == Expression::STRING && !lhs->is_delayed() && ctx.names_to_colors.count(lstr) && - rtype == Expression::STRING && !rhs->is_delayed() && ctx.names_to_colors.count(rstr)) { - return op_colors(ctx, op, ctx.names_to_colors[lstr], ctx.names_to_colors[rstr]); - } - else if (ltype == Expression::STRING && !lhs->is_delayed() && ctx.names_to_colors.count(lstr) && - rtype == Expression::NUMBER) { - return op_color_number(ctx, op, ctx.names_to_colors[lstr], rhs); - } - else if (ltype == Expression::NUMBER && - rtype == Expression::STRING && !rhs->is_delayed() && ctx.names_to_colors.count(rstr)) { - return op_number_color(ctx, op, rhs, ctx.names_to_colors[rstr]); - } - if (op == Binary_Expression::MUL) error("invalid operands for multiplication", lhs->path(), lhs->position()); - if (op == Binary_Expression::MOD) error("invalid operands for modulo", lhs->path(), lhs->position()); - string sep; - switch (op) { - case Binary_Expression::SUB: sep = "-"; break; - case Binary_Expression::DIV: sep = "/"; break; - default: break; - } - char q = '\0'; - if (lstr[0] == '"' || lstr[0] == '\'') q = lstr[0]; - else if (rstr[0] == '"' || rstr[0] == '\'') q = rstr[0]; - string result(unquote(lstr) + sep + unquote(rstr)); - return new (ctx.mem) String_Constant(lhs->path(), - lhs->position(), - unquoted ? result : quote(result, q)); - } - - Expression* cval_to_astnode(Sass_Value v, Context& ctx, Backtrace* backtrace, string path, Position position) - { - using std::strlen; - using std::strcpy; - Expression* e = 0; - switch (v.unknown.tag) { - case SASS_BOOLEAN: { - e = new (ctx.mem) Boolean(path, position, v.boolean.value); - } break; - case SASS_NUMBER: { - e = new (ctx.mem) Number(path, position, v.number.value, v.number.unit); - } break; - case SASS_COLOR: { - e = new (ctx.mem) Color(path, position, v.color.r, v.color.g, v.color.b, v.color.a); - } break; - case SASS_STRING: { - e = new (ctx.mem) String_Constant(path, position, v.string.value); - } break; - case SASS_LIST: { - List* l = new (ctx.mem) List(path, position, v.list.length, v.list.separator == SASS_COMMA ? List::COMMA : List::SPACE); - for (size_t i = 0, L = v.list.length; i < L; ++i) { - *l << cval_to_astnode(v.list.values[i], ctx, backtrace, path, position); - } - e = l; - } break; - case SASS_NULL: { - e = new (ctx.mem) Null(path, position); - } break; - case SASS_ERROR: { - error("error in C function: " + string(v.error.message), path, position, backtrace); - } break; - } - return e; - } - -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/eval.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/eval.hpp deleted file mode 100644 index c17e25d6..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/eval.hpp +++ /dev/null @@ -1,77 +0,0 @@ -#define SASS_EVAL - -#include <iostream> - -#ifndef SASS_OPERATION -#include "operation.hpp" -#endif - -#ifndef SASS_ENVIRONMENT -#include "environment.hpp" -#endif - -#ifndef SASS -#include "sass.h" -#endif - -#ifndef SASS_POSITION -#include "position.hpp" -#endif - -namespace Sass { - using namespace std; - - struct Context; - typedef Environment<AST_Node*> Env; - struct Backtrace; - - class Eval : public Operation_CRTP<Expression*, Eval> { - - Context& ctx; - - Expression* fallback_impl(AST_Node* n); - - public: - Env* env; - Backtrace* backtrace; - Eval(Context&, Env*, Backtrace*); - virtual ~Eval(); - Eval* with(Env* e, Backtrace* bt); // for setting the env before eval'ing an expression - using Operation<Expression*>::operator(); - - // for evaluating function bodies - Expression* operator()(Block*); - Expression* operator()(Assignment*); - Expression* operator()(If*); - Expression* operator()(For*); - Expression* operator()(Each*); - Expression* operator()(While*); - Expression* operator()(Return*); - Expression* operator()(Warning*); - - Expression* operator()(List*); - Expression* operator()(Binary_Expression*); - Expression* operator()(Unary_Expression*); - Expression* operator()(Function_Call*); - Expression* operator()(Function_Call_Schema*); - Expression* operator()(Variable*); - Expression* operator()(Textual*); - Expression* operator()(Number*); - Expression* operator()(Boolean*); - Expression* operator()(String_Schema*); - Expression* operator()(String_Constant*); - Expression* operator()(Media_Query*); - Expression* operator()(Media_Query_Expression*); - Expression* operator()(Null*); - Expression* operator()(Argument*); - Expression* operator()(Arguments*); - - template <typename U> - Expression* fallback(U x) { return fallback_impl(x); } - }; - - Expression* cval_to_astnode(Sass_Value v, Context& ctx, Backtrace* backtrace, string path = "", Position position = Position()); - - bool eq(Expression*, Expression*, Context&); - bool lt(Expression*, Expression*, Context&); -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/expand.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/expand.cpp deleted file mode 100644 index c1c72069..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/expand.cpp +++ /dev/null @@ -1,334 +0,0 @@ -#include "expand.hpp" -#include "bind.hpp" -#include "eval.hpp" -#include "contextualize.hpp" -#include "to_string.hpp" -#include "backtrace.hpp" - -#include <iostream> -#include <typeinfo> - -#ifndef SASS_CONTEXT -#include "context.hpp" -#endif - -namespace Sass { - - Expand::Expand(Context& ctx, Eval* eval, Contextualize* contextualize, Env* env, Backtrace* bt) - : ctx(ctx), - eval(eval), - contextualize(contextualize), - env(env), - block_stack(vector<Block*>()), - property_stack(vector<String*>()), - selector_stack(vector<Selector*>()), - backtrace(bt), - extensions(multimap<Compound_Selector, Complex_Selector*>()) - { selector_stack.push_back(0); } - - Statement* Expand::operator()(Block* b) - { - Env new_env; - new_env.link(*env); - env = &new_env; - Block* bb = new (ctx.mem) Block(b->path(), b->position(), b->length(), b->is_root()); - block_stack.push_back(bb); - append_block(b); - block_stack.pop_back(); - env = env->parent(); - return bb; - } - - Statement* Expand::operator()(Ruleset* r) - { - To_String to_string; - // if (selector_stack.back()) cerr << "expanding " << selector_stack.back()->perform(&to_string) << " and " << r->selector()->perform(&to_string) << endl; - Selector* sel_ctx = r->selector()->perform(contextualize->with(selector_stack.back(), env, backtrace)); - selector_stack.push_back(sel_ctx); - Ruleset* rr = new (ctx.mem) Ruleset(r->path(), - r->position(), - sel_ctx, - r->block()->perform(this)->block()); - selector_stack.pop_back(); - return rr; - } - - Statement* Expand::operator()(Propset* p) - { - property_stack.push_back(p->property_fragment()); - Block* expanded_block = p->block()->perform(this)->block(); - - Block* current_block = block_stack.back(); - for (size_t i = 0, L = expanded_block->length(); i < L; ++i) { - Statement* stm = (*expanded_block)[i]; - if (typeid(*stm) == typeid(Declaration)) { - Declaration* dec = static_cast<Declaration*>(stm); - String_Schema* combined_prop = new (ctx.mem) String_Schema(p->path(), p->position()); - if (!property_stack.empty()) { - *combined_prop << property_stack.back() - << new (ctx.mem) String_Constant(p->path(), p->position(), "-") - << dec->property(); // TODO: eval the prop into a string constant - } - else { - *combined_prop << dec->property(); - } - dec->property(combined_prop); - *current_block << dec; - } - else { - error("contents of namespaced properties must result in style declarations only", stm->path(), stm->position(), backtrace); - } - } - - property_stack.pop_back(); - - return 0; - } - - Statement* Expand::operator()(Media_Block* m) - { - Expression* media_queries = m->media_queries()->perform(eval->with(env, backtrace)); - Media_Block* mm = new (ctx.mem) Media_Block(m->path(), - m->position(), - static_cast<List*>(media_queries), - m->block()->perform(this)->block()); - mm->enclosing_selector(selector_stack.back()); - return mm; - } - - Statement* Expand::operator()(At_Rule* a) - { - Block* ab = a->block(); - selector_stack.push_back(0); - Selector* as = a->selector(); - if (as) as = as->perform(contextualize->with(0, env, backtrace)); - Block* bb = ab ? ab->perform(this)->block() : 0; - At_Rule* aa = new (ctx.mem) At_Rule(a->path(), - a->position(), - a->keyword(), - as, - bb); - selector_stack.pop_back(); - return aa; - } - - Statement* Expand::operator()(Declaration* d) - { - String* old_p = d->property(); - String* new_p = static_cast<String*>(old_p->perform(eval->with(env, backtrace))); - return new (ctx.mem) Declaration(d->path(), - d->position(), - new_p, - d->value()->perform(eval->with(env, backtrace)), - d->is_important()); - } - - Statement* Expand::operator()(Assignment* a) - { - string var(a->variable()); - if (env->has(var)) { - if(!a->is_guarded()) (*env)[var] = a->value()->perform(eval->with(env, backtrace)); - } - else { - env->current_frame()[var] = a->value()->perform(eval->with(env, backtrace)); - } - return 0; - } - - Statement* Expand::operator()(Import* i) - { - return i; // TODO: eval i->urls() - } - - Statement* Expand::operator()(Import_Stub* i) - { - append_block(ctx.style_sheets[i->file_name()]); - return 0; - } - - Statement* Expand::operator()(Warning* w) - { - // eval handles this too, because warnings may occur in functions - w->perform(eval->with(env, backtrace)); - return 0; - } - - Statement* Expand::operator()(Comment* c) - { - // TODO: eval the text, once we're parsing/storing it as a String_Schema - return c; - } - - Statement* Expand::operator()(If* i) - { - if (*i->predicate()->perform(eval->with(env, backtrace))) { - append_block(i->consequent()); - } - else { - Block* alt = i->alternative(); - if (alt) append_block(alt); - } - return 0; - } - - Statement* Expand::operator()(For* f) - { - string variable(f->variable()); - Expression* low = f->lower_bound()->perform(eval->with(env, backtrace)); - if (low->concrete_type() != Expression::NUMBER) { - error("lower bound of `@for` directive must be numeric", low->path(), low->position(), backtrace); - } - Expression* high = f->upper_bound()->perform(eval->with(env, backtrace)); - if (high->concrete_type() != Expression::NUMBER) { - error("upper bound of `@for` directive must be numeric", high->path(), high->position(), backtrace); - } - double lo = static_cast<Number*>(low)->value(); - double hi = static_cast<Number*>(high)->value(); - if (f->is_inclusive()) ++hi; - Env new_env; - new_env[variable] = new (ctx.mem) Number(low->path(), low->position(), lo); - new_env.link(env); - env = &new_env; - Block* body = f->block(); - for (double i = lo; - i < hi; - (*env)[variable] = new (ctx.mem) Number(low->path(), low->position(), ++i)) { - append_block(body); - } - env = new_env.parent(); - return 0; - } - - Statement* Expand::operator()(Each* e) - { - string variable(e->variable()); - Expression* expr = e->list()->perform(eval->with(env, backtrace)); - List* list = 0; - if (expr->concrete_type() != Expression::LIST) { - list = new (ctx.mem) List(expr->path(), expr->position(), 1, List::COMMA); - *list << expr; - } - else { - list = static_cast<List*>(expr); - } - Env new_env; - new_env[variable] = 0; - new_env.link(env); - env = &new_env; - Block* body = e->block(); - for (size_t i = 0, L = list->length(); i < L; ++i) { - (*env)[variable] = (*list)[i]->perform(eval->with(env, backtrace)); - append_block(body); - } - env = new_env.parent(); - return 0; - } - - Statement* Expand::operator()(While* w) - { - Expression* pred = w->predicate(); - Block* body = w->block(); - while (*pred->perform(eval->with(env, backtrace))) { - append_block(body); - } - return 0; - } - - Statement* Expand::operator()(Return* r) - { - error("@return may only be used within a function", r->path(), r->position(), backtrace); - return 0; - } - - Statement* Expand::operator()(Extension* e) - { - Selector_List* extender = static_cast<Selector_List*>(selector_stack.back()); - if (!extender) return 0; - Selector_List* extendee = static_cast<Selector_List*>(e->selector()->perform(contextualize->with(0, env, backtrace))); - if (extendee->length() != 1) { - error("selector groups may not be extended", extendee->path(), extendee->position(), backtrace); - } - Complex_Selector* c = (*extendee)[0]; - if (!c->head() || c->tail()) { - error("nested selectors may not be extended", c->path(), c->position(), backtrace); - } - Compound_Selector* s = c->head(); - for (size_t i = 0, L = extender->length(); i < L; ++i) { - extensions.insert(make_pair(*s, (*extender)[i])); - To_String to_string; - } - return 0; - } - - Statement* Expand::operator()(Definition* d) - { - Definition* dd = new (ctx.mem) Definition(*d); - env->current_frame()[d->name() + - (d->type() == Definition::MIXIN ? "[m]" : "[f]")] = dd; - // set the static link so we can have lexical scoping - dd->environment(env); - return 0; - } - - Statement* Expand::operator()(Mixin_Call* c) - { - string full_name(c->name() + "[m]"); - if (!env->has(full_name)) { - error("no mixin named " + c->name(), c->path(), c->position(), backtrace); - } - Definition* def = static_cast<Definition*>((*env)[full_name]); - Block* body = def->block(); - Parameters* params = def->parameters(); - Arguments* args = static_cast<Arguments*>(c->arguments() - ->perform(eval->with(env, backtrace))); - Backtrace here(backtrace, c->path(), c->position(), ", in mixin `" + c->name() + "`"); - backtrace = &here; - Env new_env; - new_env.link(def->environment()); - if (c->block()) { - // represent mixin content blocks as thunks/closures - Definition* thunk = new (ctx.mem) Definition(c->path(), - c->position(), - "@content", - new (ctx.mem) Parameters(c->path(), c->position()), - c->block(), - Definition::MIXIN); - thunk->environment(env); - new_env.current_frame()["@content[m]"] = thunk; - } - bind("mixin " + c->name(), params, args, ctx, &new_env, eval); - Env* old_env = env; - env = &new_env; - append_block(body); - env = old_env; - backtrace = here.parent; - return 0; - } - - Statement* Expand::operator()(Content* c) - { - // convert @content directives into mixin calls to the underlying thunk - if (!env->has("@content[m]")) return 0; - Mixin_Call* call = new (ctx.mem) Mixin_Call(c->path(), - c->position(), - "@content", - new (ctx.mem) Arguments(c->path(), c->position())); - return call->perform(this); - } - - inline Statement* Expand::fallback_impl(AST_Node* n) - { - error("unknown internal error; please contact the LibSass maintainers", n->path(), n->position(), backtrace); - String_Constant* msg = new (ctx.mem) String_Constant("", Position(), string("`Expand` doesn't handle ") + typeid(*n).name()); - return new (ctx.mem) Warning("", Position(), msg); - } - - inline void Expand::append_block(Block* b) - { - Block* current_block = block_stack.back(); - for (size_t i = 0, L = b->length(); i < L; ++i) { - Statement* ith = (*b)[i]->perform(this); - if (ith) *current_block << ith; - } - } -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/expand.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/expand.hpp deleted file mode 100644 index 2c65b745..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/expand.hpp +++ /dev/null @@ -1,76 +0,0 @@ -#define SASS_EXPAND - -#include <vector> -#include <map> -#include <iostream> - -#ifndef SASS_AST -#include "ast.hpp" -#endif - -#ifndef SASS_OPERATION -#include "operation.hpp" -#endif - -#ifndef SASS_ENVIRONMENT -#include "environment.hpp" -#endif - -namespace Sass { - using namespace std; - - struct Context; - class Eval; - class Contextualize; - typedef Environment<AST_Node*> Env; - struct Backtrace; - - class Expand : public Operation_CRTP<Statement*, Expand> { - - Context& ctx; - Eval* eval; - Contextualize* contextualize; - Env* env; - vector<Block*> block_stack; - vector<String*> property_stack; - vector<Selector*> selector_stack; - Backtrace* backtrace; - - Statement* fallback_impl(AST_Node* n); - - public: - Expand(Context&, Eval*, Contextualize*, Env*, Backtrace*); - virtual ~Expand() { } - - using Operation<Statement*>::operator(); - - Statement* operator()(Block*); - Statement* operator()(Ruleset*); - Statement* operator()(Propset*); - Statement* operator()(Media_Block*); - Statement* operator()(At_Rule*); - Statement* operator()(Declaration*); - Statement* operator()(Assignment*); - Statement* operator()(Import*); - Statement* operator()(Import_Stub*); - Statement* operator()(Warning*); - Statement* operator()(Comment*); - Statement* operator()(If*); - Statement* operator()(For*); - Statement* operator()(Each*); - Statement* operator()(While*); - Statement* operator()(Return*); - Statement* operator()(Extension*); - Statement* operator()(Definition*); - Statement* operator()(Mixin_Call*); - Statement* operator()(Content*); - - template <typename U> - Statement* fallback(U x) { return fallback_impl(x); } - - void append_block(Block*); - - multimap<Compound_Selector, Complex_Selector*> extensions; - }; - -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/extconf.rb b/node_modules/gulp-sass/node_modules/node-sass/libsass/extconf.rb deleted file mode 100644 index 3e6d00bc..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/extconf.rb +++ /dev/null @@ -1,6 +0,0 @@ -require 'mkmf' -# .. more stuff -#$LIBPATH.push(Config::CONFIG['libdir']) -$CFLAGS << " #{ENV["CFLAGS"]}" -$LIBS << " #{ENV["LIBS"]}" -create_makefile("libsass") diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/extend.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/extend.cpp deleted file mode 100644 index b2fd84bb..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/extend.cpp +++ /dev/null @@ -1,116 +0,0 @@ -#include "extend.hpp" -#include "context.hpp" -#include "contextualize.hpp" -#include "to_string.hpp" -#include "backtrace.hpp" -#include <iostream> - -namespace Sass { - - Extend::Extend(Context& ctx, multimap<Compound_Selector, Complex_Selector*>& extensions, Backtrace* bt) - : ctx(ctx), extensions(extensions), backtrace(bt) - { } - - void Extend::operator()(Block* b) - { - for (size_t i = 0, L = b->length(); i < L; ++i) { - (*b)[i]->perform(this); - } - } - - void Extend::operator()(Ruleset* r) - { - Selector_List* sg = static_cast<Selector_List*>(r->selector()); - Selector_List* ng = 0; - bool extended = false; - if (sg->has_placeholder()) { - // To_String to_string; - Compound_Selector* placeholder = new (ctx.mem) Compound_Selector(sg->path(), sg->position(), 1); - *placeholder << sg->find_placeholder(); - // cerr << "placeholder: " << placeholder->perform(&to_string) << endl; - // if the placeholder needs to be subbed - if (extensions.count(*placeholder)) { - // cerr << "need to sub " << placeholder->perform(&to_string) << " " << extensions.count(*placeholder) << " times" << endl; - // perform each substitution and append it to the selector group of the ruleset - ng = new (ctx.mem) Selector_List(sg->path(), sg->position(), extensions.count(*placeholder)); - for (multimap<Compound_Selector, Complex_Selector*>::iterator extender = extensions.lower_bound(*placeholder), E = extensions.upper_bound(*placeholder); - extender != E; - ++extender) { - // cerr << "performing a substitution: " << placeholder->perform(&to_string) << " -> " << extender->second->perform(&to_string) << endl; - Contextualize sub_plc(ctx, 0, 0, backtrace, placeholder, extender->second); - Selector_List* subbed = static_cast<Selector_List*>(sg->perform(&sub_plc)); - // if (subbed) cerr << "subbed: " << subbed->perform(&to_string) << endl; - *ng += subbed; - extended = true; - } - ng->has_placeholder(false); - } - // otherwise prevent it from rendering - else { - // r->selector(0); - } - } - else { - ng = new (ctx.mem) Selector_List(sg->path(), sg->position(), sg->length()); - // for each selector in the group - for (size_t i = 0, L = sg->length(); i < L; ++i) { - Complex_Selector* sel = (*sg)[i]; - *ng << sel; - // if it's supposed to be extended - Compound_Selector* sel_base = sel->base(); - To_String to_string; - if (sel_base && extensions.count(*sel_base)) { - // extend it wrt each of its extenders - for (multimap<Compound_Selector, Complex_Selector*>::iterator extender = extensions.lower_bound(*sel_base), E = extensions.upper_bound(*sel_base); - extender != E; - ++extender) { - *ng += generate_extension(sel, extender->second); - extended = true; - } - } - } - } - if (extended) r->selector(ng); - r->block()->perform(this); - } - - void Extend::operator()(Media_Block* m) - { - m->block()->perform(this); - } - - void Extend::operator()(At_Rule* a) - { - if (a->block()) a->block()->perform(this); - } - - Selector_List* Extend::generate_extension(Complex_Selector* extendee, Complex_Selector* extender) - { - To_String to_string; - Selector_List* new_group = new (ctx.mem) Selector_List(extendee->path(), extendee->position()); - Complex_Selector* extendee_context = extendee->context(ctx); - Complex_Selector* extender_context = extender->context(ctx); - if (extendee_context && extender_context) { - Complex_Selector* base = new (ctx.mem) Complex_Selector(new_group->path(), new_group->position(), Complex_Selector::ANCESTOR_OF, extender->base(), 0); - extendee_context->innermost()->tail(extender); - *new_group << extendee_context; - // make another one so we don't erroneously share tails - extendee_context = extendee->context(ctx); - extendee_context->innermost()->tail(base); - extender_context->innermost()->tail(extendee_context); - *new_group << extender_context; - } - else if (extendee_context) { - extendee_context->innermost()->tail(extender); - *new_group << extendee_context; - } - else if (extender_context) { - *new_group << extender; - } - else { - *new_group << extender; - } - return new_group; - } - -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/extend.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/extend.hpp deleted file mode 100644 index 7d94f223..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/extend.hpp +++ /dev/null @@ -1,47 +0,0 @@ -#define SASS_EXTEND - -#include <vector> -#include <map> -#include <iostream> - -#ifndef SASS_AST -#include "ast.hpp" -#endif - -#ifndef SASS_OPERATION -#include "operation.hpp" -#endif - -namespace Sass { - using namespace std; - - struct Context; - struct Backtrace; - - class Extend : public Operation_CRTP<void, Extend> { - - Context& ctx; - multimap<Compound_Selector, Complex_Selector*>& extensions; - Backtrace* backtrace; - - void fallback_impl(AST_Node* n) { }; - - public: - Extend(Context&, multimap<Compound_Selector, Complex_Selector*>&, Backtrace*); - virtual ~Extend() { } - - using Operation<void>::operator(); - - void operator()(Block*); - void operator()(Ruleset*); - void operator()(Media_Block*); - void operator()(At_Rule*); - - Selector_List* generate_extension(Complex_Selector*, Complex_Selector*); - - template <typename U> - void fallback(U x) { return fallback_impl(x); } - }; - - -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/file.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/file.cpp deleted file mode 100644 index d17334f1..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/file.cpp +++ /dev/null @@ -1,144 +0,0 @@ -#ifdef _WIN32 -#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) -#endif - -#include <iostream> -#include <fstream> -#include <cctype> -#include <sys/stat.h> -#include "file.hpp" -#include "context.hpp" - -namespace Sass { - namespace File { - using namespace std; - - string base_name(string path) - { - size_t pos = path.find_last_of('/'); - if (pos == string::npos) return path; - else return path.substr(pos+1); - } - - string dir_name(string path) - { - size_t pos = path.find_last_of('/'); - if (pos == string::npos) return ""; - else return path.substr(0, pos+1); - } - - string join_paths(string l, string r) - { - if (l.empty()) return r; - if (r.empty()) return l; - if (is_absolute_path(r)) return r; - - if (l[l.length()-1] != '/') l += '/'; - - while ((r.length() > 3) && (r.substr(0, 3) == "../")) { - r = r.substr(3); - size_t index = l.find_last_of('/', l.length() - 2); - l = l.substr(0, index + 1); - } - - return l + r; - } - - bool is_absolute_path(const string& path) - { - if (path[0] == '/') return true; - // TODO: UN-HACKIFY THIS - #ifdef _WIN32 - if (path.length() >= 2 && isalpha(path[0]) && path[1] == ':') return true; - #endif - return false; - } - - string make_absolute_path(const string& path, const string& cwd) - { - return (is_absolute_path(path) ? path : join_paths(cwd, path)); - } - - string resolve_relative_path(const string& uri, const string& base, const string& cwd) - { - string absolute_uri = make_absolute_path(uri, cwd); - string absolute_base = make_absolute_path(base, cwd); - - string stripped_uri = ""; - string stripped_base = ""; - - size_t index = 0; - size_t minSize = min(absolute_uri.size(), absolute_base.size()); - for (size_t i = 0; i < minSize; ++i) { - if (absolute_uri[i] != absolute_base[i]) break; - if (absolute_uri[i] == '/') index = i + 1; - } - for (size_t i = index; i < absolute_uri.size(); ++i) { - stripped_uri += absolute_uri[i]; - } - for (size_t i = index; i < absolute_base.size(); ++i) { - stripped_base += absolute_base[i]; - } - size_t directories = 0; - for (size_t i = 0; i < stripped_base.size(); ++i) { - if (stripped_base[i] == '/') ++directories; - } - string result = ""; - for (size_t i = 0; i < directories; ++i) { - result += "../"; - } - result += stripped_uri; - - return result; - } - - char* resolve_and_load(string path, string& real_path) - { - // Resolution order for ambiguous imports: - // (1) filename as given - // (2) underscore + given - // (3) underscore + given + extension - // (4) given + extension - char* contents = 0; - // if the file isn't found with the given filename ... - real_path = path; - if (!(contents = read_file(real_path))) { - string dir(dir_name(path)); - string base(base_name(path)); - string _base("_" + base); - real_path = dir + _base; - // if the file isn't found with '_' + filename ... - if (!(contents = read_file(real_path))) { - string _base_scss(_base + ".scss"); - real_path = dir + _base_scss; - // if the file isn't found with '_' + filename + ".scss" ... - if (!(contents = read_file(real_path))) { - string base_scss(base + ".scss"); - // try filename + ".scss" as the last resort - real_path = dir + base_scss; - contents = read_file(real_path); - } - } - } - return contents; - } - - char* read_file(string path) - { - struct stat st; - if (stat(path.c_str(), &st) == -1 || S_ISDIR(st.st_mode)) return 0; - ifstream file(path.c_str(), ios::in | ios::binary | ios::ate); - char* contents = 0; - if (file.is_open()) { - size_t size = file.tellg(); - contents = new char[size + 1]; // extra byte for the null char - file.seekg(0, ios::beg); - file.read(contents, size); - contents[size] = '\0'; - file.close(); - } - return contents; - } - - } -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/file.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/file.hpp deleted file mode 100644 index e095040c..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/file.hpp +++ /dev/null @@ -1,16 +0,0 @@ -#include <string> - -namespace Sass { - using namespace std; - struct Context; - namespace File { - string base_name(string); - string dir_name(string); - string join_paths(string, string); - bool is_absolute_path(const string& path); - string make_absolute_path(const string& path, const string& cwd); - string resolve_relative_path(const string& uri, const string& base, const string& cwd); - char* resolve_and_load(string path, string& real_path); - char* read_file(string path); - } -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/functions.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/functions.cpp deleted file mode 100644 index 3ef0647d..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/functions.cpp +++ /dev/null @@ -1,978 +0,0 @@ -#include "functions.hpp" -#include "ast.hpp" -#include "context.hpp" -#include "backtrace.hpp" -#include "parser.hpp" -#include "constants.hpp" -#include "to_string.hpp" -#include "inspect.hpp" -#include "eval.hpp" - -#include <cmath> -#include <cctype> -#include <sstream> -#include <iomanip> -#include <iostream> - -#define ARG(argname, argtype) get_arg<argtype>(argname, env, sig, path, position, backtrace) -#define ARGR(argname, argtype, lo, hi) get_arg_r(argname, env, sig, path, position, lo, hi, backtrace) - -namespace Sass { - using std::stringstream; - using std::endl; - - Definition* make_native_function(Signature sig, Native_Function f, Context& ctx) - { - Parser sig_parser = Parser::from_c_str(sig, ctx, "[built-in function]"); - sig_parser.lex<Prelexer::identifier>(); - string name(sig_parser.lexed); - Parameters* params = sig_parser.parse_parameters(); - return new (ctx.mem) Definition("[built-in function]", - Position(), - sig, - name, - params, - f, - false); - } - - Definition* make_c_function(Signature sig, Sass_C_Function f, Context& ctx) - { - Parser sig_parser = Parser::from_c_str(sig, ctx, "[c function]"); - sig_parser.lex<Prelexer::identifier>(); - string name(sig_parser.lexed); - Parameters* params = sig_parser.parse_parameters(); - return new (ctx.mem) Definition("[c function]", - Position(), - sig, - name, - params, - f, - false, true); - } - - namespace Functions { - - template <typename T> - T* get_arg(const string& argname, Env& env, Signature sig, const string& path, Position position, Backtrace* backtrace) - { - // Minimal error handling -- the expectation is that built-ins will be written correctly! - T* val = dynamic_cast<T*>(env[argname]); - if (!val) { - string msg("argument `"); - msg += argname; - msg += "` of `"; - msg += sig; - msg += "` must be a "; - msg += T::type_name(); - error(msg, path, position, backtrace); - } - return val; - } - - Number* get_arg_r(const string& argname, Env& env, Signature sig, const string& path, Position position, double lo, double hi, Backtrace* backtrace) - { - // Minimal error handling -- the expectation is that built-ins will be written correctly! - Number* val = get_arg<Number>(argname, env, sig, path, position, backtrace); - double v = val->value(); - if (!(lo <= v && v <= hi)) { - stringstream msg; - msg << "argument `" << argname << "` of `" << sig << "` must be between "; - msg << lo << " and " << hi; - error(msg.str(), path, position, backtrace); - } - return val; - } - - //////////////// - // RGB FUNCTIONS - //////////////// - - Signature rgb_sig = "rgb($red, $green, $blue)"; - BUILT_IN(rgb) - { - return new (ctx.mem) Color(path, - position, - ARGR("$red", Number, 0, 255)->value(), - ARGR("$green", Number, 0, 255)->value(), - ARGR("$blue", Number, 0, 255)->value()); - } - - Signature rgba_4_sig = "rgba($red, $green, $blue, $alpha)"; - BUILT_IN(rgba_4) - { - return new (ctx.mem) Color(path, - position, - ARGR("$red", Number, 0, 255)->value(), - ARGR("$green", Number, 0, 255)->value(), - ARGR("$blue", Number, 0, 255)->value(), - ARGR("$alpha", Number, 0, 1)->value()); - } - - Signature rgba_2_sig = "rgba($color, $alpha)"; - BUILT_IN(rgba_2) - { - Color* c_arg = ARG("$color", Color); - Color* new_c = new (ctx.mem) Color(*c_arg); - new_c->a(ARGR("$alpha", Number, 0, 1)->value()); - new_c->disp(""); - return new_c; - } - - Signature red_sig = "red($color)"; - BUILT_IN(red) - { return new (ctx.mem) Number(path, position, ARG("$color", Color)->r()); } - - Signature green_sig = "green($color)"; - BUILT_IN(green) - { return new (ctx.mem) Number(path, position, ARG("$color", Color)->g()); } - - Signature blue_sig = "blue($color)"; - BUILT_IN(blue) - { return new (ctx.mem) Number(path, position, ARG("$color", Color)->b()); } - - Signature mix_sig = "mix($color-1, $color-2, $weight: 50%)"; - BUILT_IN(mix) - { - Color* color1 = ARG("$color-1", Color); - Color* color2 = ARG("$color-2", Color); - Number* weight = ARGR("$weight", Number, 0, 100); - - double p = weight->value()/100; - double w = 2*p - 1; - double a = color1->a() - color2->a(); - - double w1 = (((w * a == -1) ? w : (w + a)/(1 + w*a)) + 1)/2.0; - double w2 = 1 - w1; - - return new (ctx.mem) Color(path, - position, - std::floor(w1*color1->r() + w2*color2->r()), - std::floor(w1*color1->g() + w2*color2->g()), - std::floor(w1*color1->b() + w2*color2->b()), - color1->a()*p + color2->a()*(1-p)); - } - - //////////////// - // HSL FUNCTIONS - //////////////// - - // RGB to HSL helper function - struct HSL { double h; double s; double l; }; - HSL rgb_to_hsl(double r, double g, double b) - { - r /= 255.0; g /= 255.0; b /= 255.0; - - double max = std::max(r, std::max(g, b)); - double min = std::min(r, std::min(g, b)); - double del = max - min; - - double h = 0, s = 0, l = (max + min)/2; - - if (max == min) { - h = s = 0; // achromatic - } - else { - if (l < 0.5) s = del / (max + min); - else s = del / (2.0 - max - min); - - double dr = (((max - r)/6.0) + (del/2.0))/del; - double dg = (((max - g)/6.0) + (del/2.0))/del; - double db = (((max - b)/6.0) + (del/2.0))/del; - - if (r == max) h = db - dg; - else if (g == max) h = (1.0/3.0) + dr - db; - else if (b == max) h = (2.0/3.0) + dg - dr; - - if (h < 0) h += 1; - else if (h > 1) h -= 1; - } - HSL hsl_struct; - hsl_struct.h = static_cast<int>(h*360)%360; - hsl_struct.s = s*100; - hsl_struct.l = l*100; - return hsl_struct; - } - - // hue to RGB helper function - double h_to_rgb(double m1, double m2, double h) { - if (h < 0) h += 1; - if (h > 1) h -= 1; - if (h*6.0 < 1) return m1 + (m2 - m1)*h*6; - if (h*2.0 < 1) return m2; - if (h*3.0 < 2) return m1 + (m2 - m1) * (2.0/3.0 - h)*6; - return m1; - } - - Color* hsla_impl(double h, double s, double l, double a, Context& ctx, const string& path, Position position) - { - h = static_cast<double>(((static_cast<int>(h) % 360) + 360) % 360) / 360.0; - s /= 100.0; - l /= 100.0; - - double m2; - if (l <= 0.5) m2 = l*(s+1.0); - else m2 = l+s-l*s; - double m1 = l*2-m2; - // round the results -- consider moving this into the Color constructor - double r = (h_to_rgb(m1, m2, h+1.0/3.0) * 255.0); - double g = (h_to_rgb(m1, m2, h) * 255.0); - double b = (h_to_rgb(m1, m2, h-1.0/3.0) * 255.0); - - return new (ctx.mem) Color(path, position, r, g, b, a); - } - - Signature hsl_sig = "hsl($hue, $saturation, $lightness)"; - BUILT_IN(hsl) - { - return hsla_impl(ARG("$hue", Number)->value(), - ARGR("$saturation", Number, 0, 100)->value(), - ARGR("$lightness", Number, 0, 100)->value(), - 1.0, - ctx, - path, - position); - } - - Signature hsla_sig = "hsla($hue, $saturation, $lightness, $alpha)"; - BUILT_IN(hsla) - { - return hsla_impl(ARG("$hue", Number)->value(), - ARGR("$saturation", Number, 0, 100)->value(), - ARGR("$lightness", Number, 0, 100)->value(), - ARGR("$alpha", Number, 0, 1)->value(), - ctx, - path, - position); - } - - Signature hue_sig = "hue($color)"; - BUILT_IN(hue) - { - Color* rgb_color = ARG("$color", Color); - HSL hsl_color = rgb_to_hsl(rgb_color->r(), - rgb_color->g(), - rgb_color->b()); - return new (ctx.mem) Number(path, position, hsl_color.h, "deg"); - } - - Signature saturation_sig = "saturation($color)"; - BUILT_IN(saturation) - { - Color* rgb_color = ARG("$color", Color); - HSL hsl_color = rgb_to_hsl(rgb_color->r(), - rgb_color->g(), - rgb_color->b()); - return new (ctx.mem) Number(path, position, hsl_color.s, "%"); - } - - Signature lightness_sig = "lightness($color)"; - BUILT_IN(lightness) - { - Color* rgb_color = ARG("$color", Color); - HSL hsl_color = rgb_to_hsl(rgb_color->r(), - rgb_color->g(), - rgb_color->b()); - return new (ctx.mem) Number(path, position, hsl_color.l, "%"); - } - - Signature adjust_hue_sig = "adjust-hue($color, $degrees)"; - BUILT_IN(adjust_hue) - { - Color* rgb_color = ARG("$color", Color); - Number* degrees = ARG("$degrees", Number); - HSL hsl_color = rgb_to_hsl(rgb_color->r(), - rgb_color->g(), - rgb_color->b()); - return hsla_impl(hsl_color.h + degrees->value(), - hsl_color.s, - hsl_color.l, - rgb_color->a(), - ctx, - path, - position); - } - - Signature lighten_sig = "lighten($color, $amount)"; - BUILT_IN(lighten) - { - Color* rgb_color = ARG("$color", Color); - Number* amount = ARGR("$amount", Number, 0, 100); - HSL hsl_color = rgb_to_hsl(rgb_color->r(), - rgb_color->g(), - rgb_color->b()); - //Check lightness is not negative before lighten it - double hslcolorL = hsl_color.l; - if (hslcolorL < 0) { - hslcolorL = 0; - } - - return hsla_impl(hsl_color.h, - hsl_color.s, - hslcolorL + amount->value(), - rgb_color->a(), - ctx, - path, - position); - } - - Signature darken_sig = "darken($color, $amount)"; - BUILT_IN(darken) - { - Color* rgb_color = ARG("$color", Color); - Number* amount = ARGR("$amount", Number, 0, 100); - HSL hsl_color = rgb_to_hsl(rgb_color->r(), - rgb_color->g(), - rgb_color->b()); - - //Check lightness if not over 100, before darken it - double hslcolorL = hsl_color.l; - if (hslcolorL > 100) { - hslcolorL = 100; - } - - return hsla_impl(hsl_color.h, - hsl_color.s, - hslcolorL - amount->value(), - rgb_color->a(), - ctx, - path, - position); - } - - Signature saturate_sig = "saturate($color, $amount)"; - BUILT_IN(saturate) - { - Color* rgb_color = ARG("$color", Color); - Number* amount = ARGR("$amount", Number, 0, 100); - HSL hsl_color = rgb_to_hsl(rgb_color->r(), - rgb_color->g(), - rgb_color->b()); - //Check saturation is not negative before saturate it - double hslcolorS = hsl_color.s; - if (hslcolorS < 0) { - hslcolorS = 0; - } - - - return hsla_impl(hsl_color.h, - hslcolorS + amount->value(), - hsl_color.l, - rgb_color->a(), - ctx, - path, - position); - } - - Signature desaturate_sig = "desaturate($color, $amount)"; - BUILT_IN(desaturate) - { - Color* rgb_color = ARG("$color", Color); - Number* amount = ARGR("$amount", Number, 0, 100); - HSL hsl_color = rgb_to_hsl(rgb_color->r(), - rgb_color->g(), - rgb_color->b()); - //Check saturation is not over 100 before desaturate it - double hslcolorS = hsl_color.s; - if (hslcolorS > 100) { - hslcolorS = 100; - } - - return hsla_impl(hsl_color.h, - hslcolorS - amount->value(), - hsl_color.l, - rgb_color->a(), - ctx, - path, - position); - } - - Signature grayscale_sig = "grayscale($color)"; - BUILT_IN(grayscale) - { - Color* rgb_color = ARG("$color", Color); - HSL hsl_color = rgb_to_hsl(rgb_color->r(), - rgb_color->g(), - rgb_color->b()); - return hsla_impl(hsl_color.h, - 0.0, - hsl_color.l, - rgb_color->a(), - ctx, - path, - position); - } - - Signature complement_sig = "complement($color)"; - BUILT_IN(complement) - { - Color* rgb_color = ARG("$color", Color); - HSL hsl_color = rgb_to_hsl(rgb_color->r(), - rgb_color->g(), - rgb_color->b()); - return hsla_impl(hsl_color.h - 180.0, - hsl_color.s, - hsl_color.l, - rgb_color->a(), - ctx, - path, - position); - } - - Signature invert_sig = "invert($color)"; - BUILT_IN(invert) - { - Color* rgb_color = ARG("$color", Color); - return new (ctx.mem) Color(path, - position, - 255 - rgb_color->r(), - 255 - rgb_color->g(), - 255 - rgb_color->b(), - rgb_color->a()); - } - - //////////////////// - // OPACITY FUNCTIONS - //////////////////// - Signature alpha_sig = "alpha($color)"; - Signature opacity_sig = "opacity($color)"; - BUILT_IN(alpha) - { - String_Constant* ie_kwd = dynamic_cast<String_Constant*>(env["$color"]); - if (ie_kwd) { - return new (ctx.mem) String_Constant(path, position, "alpha(" + ie_kwd->value() + ")"); - } - else { - return new (ctx.mem) Number(path, position, ARG("$color", Color)->a()); - } - } - - Signature opacify_sig = "opacify($color, $amount)"; - Signature fade_in_sig = "fade-in($color, $amount)"; - BUILT_IN(opacify) - { - Color* color = ARG("$color", Color); - double alpha = color->a() + ARGR("$amount", Number, 0, 1)->value(); - return new (ctx.mem) Color(path, - position, - color->r(), - color->g(), - color->b(), - alpha > 1.0 ? 1.0 : alpha); - } - - Signature transparentize_sig = "transparentize($color, $amount)"; - Signature fade_out_sig = "fade-out($color, $amount)"; - BUILT_IN(transparentize) - { - Color* color = ARG("$color", Color); - double alpha = color->a() - ARGR("$amount", Number, 0, 1)->value(); - return new (ctx.mem) Color(path, - position, - color->r(), - color->g(), - color->b(), - alpha < 0.0 ? 0.0 : alpha); - } - - //////////////////////// - // OTHER COLOR FUNCTIONS - //////////////////////// - - Signature adjust_color_sig = "adjust-color($color, $red: false, $green: false, $blue: false, $hue: false, $saturation: false, $lightness: false, $alpha: false)"; - BUILT_IN(adjust_color) - { - Color* color = ARG("$color", Color); - Number* r = dynamic_cast<Number*>(env["$red"]); - Number* g = dynamic_cast<Number*>(env["$green"]); - Number* b = dynamic_cast<Number*>(env["$blue"]); - Number* h = dynamic_cast<Number*>(env["$hue"]); - Number* s = dynamic_cast<Number*>(env["$saturation"]); - Number* l = dynamic_cast<Number*>(env["$lightness"]); - Number* a = dynamic_cast<Number*>(env["$alpha"]); - - bool rgb = r || g || b; - bool hsl = h || s || l; - - if (rgb && hsl) { - error("cannot specify both RGB and HSL values for `adjust-color`", path, position); - } - if (rgb) { - return new (ctx.mem) Color(path, - position, - color->r() + (r ? r->value() : 0), - color->g() + (g ? g->value() : 0), - color->b() + (b ? b->value() : 0), - color->a() + (a ? a->value() : 0)); - } - if (hsl) { - HSL hsl_struct = rgb_to_hsl(color->r(), color->g(), color->b()); - return hsla_impl(hsl_struct.h + (h ? h->value() : 0), - hsl_struct.s + (s ? s->value() : 0), - hsl_struct.l + (l ? l->value() : 0), - color->a() + (a ? a->value() : 0), - ctx, - path, - position); - } - if (a) { - return new (ctx.mem) Color(path, - position, - color->r(), - color->g(), - color->b(), - color->a() + (a ? a->value() : 0)); - } - error("not enough arguments for `adjust-color`", path, position); - // unreachable - return color; - } - - Signature scale_color_sig = "scale-color($color, $red: false, $green: false, $blue: false, $hue: false, $saturation: false, $lightness: false, $alpha: false)"; - BUILT_IN(scale_color) - { - Color* color = ARG("$color", Color); - Number* r = dynamic_cast<Number*>(env["$red"]); - Number* g = dynamic_cast<Number*>(env["$green"]); - Number* b = dynamic_cast<Number*>(env["$blue"]); - Number* h = dynamic_cast<Number*>(env["$hue"]); - Number* s = dynamic_cast<Number*>(env["$saturation"]); - Number* l = dynamic_cast<Number*>(env["$lightness"]); - Number* a = dynamic_cast<Number*>(env["$alpha"]); - - bool rgb = r || g || b; - bool hsl = h || s || l; - - if (rgb && hsl) { - error("cannot specify both RGB and HSL values for `scale-color`", path, position); - } - if (rgb) { - double rscale = (r ? ARGR("$red", Number, -100.0, 100.0)->value() : 0.0) / 100.0; - double gscale = (g ? ARGR("$green", Number, -100.0, 100.0)->value() : 0.0) / 100.0; - double bscale = (b ? ARGR("$blue", Number, -100.0, 100.0)->value() : 0.0) / 100.0; - double ascale = (a ? ARGR("$alpha", Number, -100.0, 100.0)->value() : 0.0) / 100.0; - return new (ctx.mem) Color(path, - position, - color->r() + rscale * (rscale > 0.0 ? 255 - color->r() : color->r()), - color->g() + gscale * (gscale > 0.0 ? 255 - color->g() : color->g()), - color->b() + bscale * (bscale > 0.0 ? 255 - color->b() : color->b()), - color->a() + ascale * (ascale > 0.0 ? 1.0 - color->a() : color->a())); - } - if (hsl) { - double hscale = (h ? ARGR("$hue", Number, -100.0, 100.0)->value() : 0.0) / 100.0; - double sscale = (s ? ARGR("$saturation", Number, -100.0, 100.0)->value() : 0.0) / 100.0; - double lscale = (l ? ARGR("$lightness", Number, -100.0, 100.0)->value() : 0.0) / 100.0; - double ascale = (a ? ARGR("$alpha", Number, -100.0, 100.0)->value() : 0.0) / 100.0; - HSL hsl_struct = rgb_to_hsl(color->r(), color->g(), color->b()); - hsl_struct.h += hscale * (hscale > 0.0 ? 360.0 - hsl_struct.h : hsl_struct.h); - hsl_struct.s += sscale * (sscale > 0.0 ? 100.0 - hsl_struct.s : hsl_struct.s); - hsl_struct.l += lscale * (lscale > 0.0 ? 100.0 - hsl_struct.l : hsl_struct.l); - double alpha = color->a() + ascale * (ascale > 0.0 ? 1.0 - color->a() : color->r()); - return hsla_impl(hsl_struct.h, hsl_struct.s, hsl_struct.l, alpha, ctx, path, position); - } - if (a) { - double ascale = (a ? ARGR("$alpha", Number, -100.0, 100.0)->value() : 0.0) / 100.0; - return new (ctx.mem) Color(path, - position, - color->r(), - color->g(), - color->b(), - color->a() + ascale * (ascale > 0.0 ? 1.0 - color->a() : color->a())); - } - error("not enough arguments for `scale-color`", path, position); - // unreachable - return color; - } - - Signature change_color_sig = "change-color($color, $red: false, $green: false, $blue: false, $hue: false, $saturation: false, $lightness: false, $alpha: false)"; - BUILT_IN(change_color) - { - Color* color = ARG("$color", Color); - Number* r = dynamic_cast<Number*>(env["$red"]); - Number* g = dynamic_cast<Number*>(env["$green"]); - Number* b = dynamic_cast<Number*>(env["$blue"]); - Number* h = dynamic_cast<Number*>(env["$hue"]); - Number* s = dynamic_cast<Number*>(env["$saturation"]); - Number* l = dynamic_cast<Number*>(env["$lightness"]); - Number* a = dynamic_cast<Number*>(env["$alpha"]); - - bool rgb = r || g || b; - bool hsl = h || s || l; - - if (rgb && hsl) { - error("cannot specify both RGB and HSL values for `change-color`", path, position); - } - if (rgb) { - return new (ctx.mem) Color(path, - position, - r ? ARGR("$red", Number, 0, 255)->value() : color->r(), - g ? ARGR("$green", Number, 0, 255)->value() : color->g(), - b ? ARGR("$blue", Number, 0, 255)->value() : color->b(), - a ? ARGR("$alpha", Number, 0, 255)->value() : color->a()); - } - if (hsl) { - HSL hsl_struct = rgb_to_hsl(color->r(), color->g(), color->b()); - if (h) hsl_struct.h = static_cast<double>(((static_cast<int>(h->value()) % 360) + 360) % 360) / 360.0; - if (s) hsl_struct.s = ARGR("$saturation", Number, 0, 100)->value(); - if (l) hsl_struct.l = ARGR("$lightness", Number, 0, 100)->value(); - double alpha = a ? ARGR("$alpha", Number, 0, 1.0)->value() : color->a(); - return hsla_impl(hsl_struct.h, hsl_struct.s, hsl_struct.l, alpha, ctx, path, position); - } - if (a) { - double alpha = a ? ARGR("$alpha", Number, 0, 1.0)->value() : color->a(); - return new (ctx.mem) Color(path, - position, - color->r(), - color->g(), - color->b(), - alpha); - } - error("not enough arguments for `change-color`", path, position); - // unreachable - return color; - } - - template <size_t range> - static double cap_channel(double c) { - if (c > range) return range; - else if (c < 0) return 0; - else return c; - } - - Signature ie_hex_str_sig = "ie-hex-str($color)"; - BUILT_IN(ie_hex_str) - { - Color* c = ARG("$color", Color); - double r = cap_channel<0xff>(c->r()); - double g = cap_channel<0xff>(c->g()); - double b = cap_channel<0xff>(c->b()); - double a = cap_channel<1> (c->a()) * 255; - - stringstream ss; - ss << '#' << std::setw(2) << std::setfill('0'); - ss << std::hex << std::setw(2) << static_cast<unsigned long>(std::floor(a+0.5)); - ss << std::hex << std::setw(2) << static_cast<unsigned long>(std::floor(r+0.5)); - ss << std::hex << std::setw(2) << static_cast<unsigned long>(std::floor(g+0.5)); - ss << std::hex << std::setw(2) << static_cast<unsigned long>(std::floor(b+0.5)); - - string result(ss.str()); - for (size_t i = 0, L = result.length(); i < L; ++i) { - result[i] = std::toupper(result[i]); - } - return new (ctx.mem) String_Constant(path, position, result); - } - - /////////////////// - // STRING FUNCTIONS - /////////////////// - - Signature unquote_sig = "unquote($string)"; - BUILT_IN(sass_unquote) - { - To_String to_string; - AST_Node* arg = env["$string"]; - string str(unquote(arg->perform(&to_string))); - String_Constant* result = new (ctx.mem) String_Constant(path, position, str); - result->is_delayed(true); - return result; - } - - Signature quote_sig = "quote($string)"; - BUILT_IN(sass_quote) - { - To_String to_string; - AST_Node* arg = env["$string"]; - string str(quote(arg->perform(&to_string), '"')); - String_Constant* result = new (ctx.mem) String_Constant(path, position, str); - result->is_delayed(true); - return result; - } - - /////////////////// - // NUMBER FUNCTIONS - /////////////////// - - Signature percentage_sig = "percentage($value)"; - BUILT_IN(percentage) - { - Number* n = ARG("$value", Number); - if (!n->is_unitless()) error("argument $value of `" + string(sig) + "` must be unitless", path, position); - return new (ctx.mem) Number(path, position, n->value() * 100, "%"); - } - - Signature round_sig = "round($value)"; - BUILT_IN(round) - { - Number* n = ARG("$value", Number); - Number* r = new (ctx.mem) Number(*n); - r->path(path); - r->position(position); - r->value(std::floor(r->value() + 0.5)); - return r; - } - - Signature ceil_sig = "ceil($value)"; - BUILT_IN(ceil) - { - Number* n = ARG("$value", Number); - Number* r = new (ctx.mem) Number(*n); - r->path(path); - r->position(position); - r->value(std::ceil(r->value())); - return r; - } - - Signature floor_sig = "floor($value)"; - BUILT_IN(floor) - { - Number* n = ARG("$value", Number); - Number* r = new (ctx.mem) Number(*n); - r->path(path); - r->position(position); - r->value(std::floor(r->value())); - return r; - } - - Signature abs_sig = "abs($value)"; - BUILT_IN(abs) - { - Number* n = ARG("$value", Number); - Number* r = new (ctx.mem) Number(*n); - r->path(path); - r->position(position); - r->value(std::abs(r->value())); - return r; - } - - Signature min_sig = "min($x1, $x2...)"; - BUILT_IN(min) - { - Number* x1 = ARG("$x1", Number); - List* arglist = ARG("$x2", List); - Number* least = x1; - for (size_t i = 0, L = arglist->length(); i < L; ++i) { - Number* xi = dynamic_cast<Number*>((*arglist)[i]); - if (!xi) error("`" + string(sig) + "` only takes numeric arguments", path, position); - if (lt(xi, least, ctx)) least = xi; - } - return least; - } - - Signature max_sig = "max($x2, $x2...)"; - BUILT_IN(max) - { - Number* x1 = ARG("$x1", Number); - List* arglist = ARG("$x2", List); - Number* greatest = x1; - for (size_t i = 0, L = arglist->length(); i < L; ++i) { - Number* xi = dynamic_cast<Number*>((*arglist)[i]); - if (!xi) error("`" + string(sig) + "` only takes numeric arguments", path, position); - if (lt(greatest, xi, ctx)) greatest = xi; - } - return greatest; - } - - ///////////////// - // LIST FUNCTIONS - ///////////////// - - Signature length_sig = "length($list)"; - BUILT_IN(length) - { - List* list = dynamic_cast<List*>(env["$list"]); - return new (ctx.mem) Number(path, - position, - list ? list->length() : 1); - } - - Signature nth_sig = "nth($list, $n)"; - BUILT_IN(nth) - { - List* l = dynamic_cast<List*>(env["$list"]); - Number* n = ARG("$n", Number); - if (!l) { - l = new (ctx.mem) List(path, position, 1); - *l << ARG("$list", Expression); - } - if (l->empty()) error("argument `$list` of `" + string(sig) + "` must not be empty", path, position); - if (n->value() < 1) error("argument `$n` of `" + string(sig) + "` must be greater than or equal to 1", path, position); - return (*l)[std::floor(n->value() - 1)]; - } - - Signature index_sig = "index($list, $value)"; - BUILT_IN(index) - { - List* l = dynamic_cast<List*>(env["$list"]); - Expression* v = ARG("$value", Expression); - if (!l) { - l = new (ctx.mem) List(path, position, 1); - *l << ARG("$list", Expression); - } - for (size_t i = 0, L = l->length(); i < L; ++i) { - if (eq((*l)[i], v, ctx)) return new (ctx.mem) Number(path, position, i+1); - } - return new (ctx.mem) Boolean(path, position, false); - } - - Signature join_sig = "join($list1, $list2, $separator: auto)"; - BUILT_IN(join) - { - List* l1 = dynamic_cast<List*>(env["$list1"]); - List* l2 = dynamic_cast<List*>(env["$list2"]); - String_Constant* sep = ARG("$separator", String_Constant); - List::Separator sep_val = (l1 ? l1->separator() : List::SPACE); - if (!l1) { - l1 = new (ctx.mem) List(path, position, 1); - *l1 << ARG("$list1", Expression); - sep_val = (l2 ? l2->separator() : List::SPACE); - } - if (!l2) { - l2 = new (ctx.mem) List(path, position, 1); - *l2 << ARG("$list2", Expression); - } - size_t len = l1->length() + l2->length(); - string sep_str = unquote(sep->value()); - if (sep_str == "space") sep_val = List::SPACE; - else if (sep_str == "comma") sep_val = List::COMMA; - else if (sep_str != "auto") error("argument `$separator` of `" + string(sig) + "` must be `space`, `comma`, or `auto`", path, position); - List* result = new (ctx.mem) List(path, position, len, sep_val); - *result += l1; - *result += l2; - return result; - } - - Signature append_sig = "append($list, $val, $separator: auto)"; - BUILT_IN(append) - { - List* l = dynamic_cast<List*>(env["$list"]); - Expression* v = ARG("$val", Expression); - String_Constant* sep = ARG("$separator", String_Constant); - if (!l) { - l = new (ctx.mem) List(path, position, 1); - *l << ARG("$list", Expression); - } - List* result = new (ctx.mem) List(path, position, l->length() + 1); - string sep_str(unquote(sep->value())); - if (sep_str == "space") result->separator(List::SPACE); - else if (sep_str == "comma") result->separator(List::COMMA); - else if (sep_str != "auto") error("argument `$separator` of `" + string(sig) + "` must be `space`, `comma`, or `auto`", path, position); - *result += l; - *result << v; - return result; - } - - Signature zip_sig = "zip($lists...)"; - BUILT_IN(zip) - { - List* arglist = new (ctx.mem) List(*ARG("$lists", List)); - size_t shortest = 0; - for (size_t i = 0, L = arglist->length(); i < L; ++i) { - List* ith = dynamic_cast<List*>((*arglist)[i]); - if (!ith) { - ith = new (ctx.mem) List(path, position, 1); - *ith << (*arglist)[i]; - (*arglist)[i] = ith; - } - shortest = (i ? std::min(shortest, ith->length()) : ith->length()); - } - List* zippers = new (ctx.mem) List(path, position, shortest, List::COMMA); - size_t L = arglist->length(); - for (size_t i = 0; i < shortest; ++i) { - List* zipper = new (ctx.mem) List(path, position, L); - for (size_t j = 0; j < L; ++j) { - *zipper << (*static_cast<List*>((*arglist)[j]))[i]; - } - *zippers << zipper; - } - return zippers; - } - - Signature compact_sig = "compact($values...)"; - BUILT_IN(compact) - { - List* arglist = ARG("$values", List); - if (arglist->length() == 1) { - Expression* the_arg = (*arglist)[0]; - arglist = dynamic_cast<List*>(the_arg); - if (!arglist) { - List* result = new (ctx.mem) List(path, position, 1, List::COMMA); - *result << the_arg; - return result; - } - } - List* result = new (ctx.mem) List(path, position, 0, List::COMMA); - for (size_t i = 0, L = arglist->length(); i < L; ++i) { - Boolean* ith = dynamic_cast<Boolean*>((*arglist)[i]); - if (ith && ith->value() == false) continue; - *result << (*arglist)[i]; - } - return result; - } - - ////////////////////////// - // INTROSPECTION FUNCTIONS - ////////////////////////// - - Signature type_of_sig = "type-of($value)"; - BUILT_IN(type_of) - { - Expression* v = ARG("$value", Expression); - if (v->concrete_type() == Expression::STRING) { - To_String to_string; - string str(v->perform(&to_string)); - if (ctx.names_to_colors.count(str)) { - return new (ctx.mem) String_Constant(path, position, "color"); - } - } - return new (ctx.mem) String_Constant(path, position, ARG("$value", Expression)->type()); - } - - Signature unit_sig = "unit($number)"; - BUILT_IN(unit) - { return new (ctx.mem) String_Constant(path, position, quote(ARG("$number", Number)->unit(), '"')); } - - Signature unitless_sig = "unitless($number)"; - BUILT_IN(unitless) - { return new (ctx.mem) Boolean(path, position, ARG("$number", Number)->is_unitless()); } - - Signature comparable_sig = "comparable($number-1, $number-2)"; - BUILT_IN(comparable) - { - Number* n1 = ARG("$number-1", Number); - Number* n2 = ARG("$number-2", Number); - if (n1->is_unitless() || n2->is_unitless()) { - return new (ctx.mem) Boolean(path, position, true); - } - Number tmp_n2(*n2); - tmp_n2.normalize(n1->find_convertible_unit()); - return new (ctx.mem) Boolean(path, position, n1->unit() == tmp_n2.unit()); - } - - //////////////////// - // BOOLEAN FUNCTIONS - //////////////////// - - Signature not_sig = "not($value)"; - BUILT_IN(sass_not) - { return new (ctx.mem) Boolean(path, position, ARG("$value", Expression)->is_false()); } - - Signature if_sig = "if($condition, $if-true, $if-false)"; - BUILT_IN(sass_if) - { return ARG("$condition", Expression)->is_false() ? ARG("$if-false", Expression) : ARG("$if-true", Expression); } - - //////////////// - // URL FUNCTIONS - //////////////// - - Signature image_url_sig = "image-url($path, $only-path: false, $cache-buster: false)"; - BUILT_IN(image_url) - { - String_Constant* ipath = ARG("$path", String_Constant); - bool only_path = !ARG("$only-path", Expression)->is_false(); - string full_path(quote(ctx.image_path + "/" + unquote(ipath->value()), '"')); - if (!only_path) full_path = "url(" + full_path + ")"; - return new (ctx.mem) String_Constant(path, position, full_path); - } - - } -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/functions.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/functions.hpp deleted file mode 100644 index ecda3d98..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/functions.hpp +++ /dev/null @@ -1,141 +0,0 @@ -#define SASS_FUNCTIONS - -#ifndef SASS_ENVIRONMENT -#include "environment.hpp" -#endif - -#ifndef SASS -#include "sass.h" -#endif - -#include <string> - -#ifndef SASS_POSITION -#include "position.hpp" -#endif - -#define BUILT_IN(name) Expression*\ -name(Env& env, Context& ctx, Signature sig, const string& path, Position position, Backtrace* backtrace) - -namespace Sass { - struct Context; - struct Backtrace; - class AST_Node; - class Expression; - class Definition; - typedef Environment<AST_Node*> Env; - typedef const char* Signature; - typedef Expression* (*Native_Function)(Env&, Context&, Signature, const string&, Position, Backtrace*); - - Definition* make_native_function(Signature, Native_Function, Context&); - Definition* make_c_function(Signature sig, Sass_C_Function f, Context& ctx); - - namespace Functions { - - extern Signature rgb_sig; - extern Signature rgba_4_sig; - extern Signature rgba_2_sig; - extern Signature red_sig; - extern Signature green_sig; - extern Signature blue_sig; - extern Signature mix_sig; - extern Signature hsl_sig; - extern Signature hsla_sig; - extern Signature hue_sig; - extern Signature saturation_sig; - extern Signature lightness_sig; - extern Signature adjust_hue_sig; - extern Signature lighten_sig; - extern Signature darken_sig; - extern Signature saturate_sig; - extern Signature desaturate_sig; - extern Signature grayscale_sig; - extern Signature complement_sig; - extern Signature invert_sig; - extern Signature alpha_sig; - extern Signature opacity_sig; - extern Signature opacify_sig; - extern Signature fade_in_sig; - extern Signature transparentize_sig; - extern Signature fade_out_sig; - extern Signature adjust_color_sig; - extern Signature scale_color_sig; - extern Signature change_color_sig; - extern Signature ie_hex_str_sig; - extern Signature unquote_sig; - extern Signature quote_sig; - extern Signature percentage_sig; - extern Signature round_sig; - extern Signature ceil_sig; - extern Signature floor_sig; - extern Signature abs_sig; - extern Signature min_sig; - extern Signature max_sig; - extern Signature length_sig; - extern Signature nth_sig; - extern Signature index_sig; - extern Signature join_sig; - extern Signature append_sig; - extern Signature zip_sig; - extern Signature compact_sig; - extern Signature type_of_sig; - extern Signature unit_sig; - extern Signature unitless_sig; - extern Signature comparable_sig; - extern Signature not_sig; - extern Signature if_sig; - extern Signature image_url_sig; - - BUILT_IN(rgb); - BUILT_IN(rgba_4); - BUILT_IN(rgba_2); - BUILT_IN(red); - BUILT_IN(green); - BUILT_IN(blue); - BUILT_IN(mix); - BUILT_IN(hsl); - BUILT_IN(hsla); - BUILT_IN(hue); - BUILT_IN(saturation); - BUILT_IN(lightness); - BUILT_IN(adjust_hue); - BUILT_IN(lighten); - BUILT_IN(darken); - BUILT_IN(saturate); - BUILT_IN(desaturate); - BUILT_IN(grayscale); - BUILT_IN(complement); - BUILT_IN(invert); - BUILT_IN(alpha); - BUILT_IN(opacify); - BUILT_IN(transparentize); - BUILT_IN(adjust_color); - BUILT_IN(scale_color); - BUILT_IN(change_color); - BUILT_IN(ie_hex_str); - BUILT_IN(sass_unquote); - BUILT_IN(sass_quote); - BUILT_IN(percentage); - BUILT_IN(round); - BUILT_IN(ceil); - BUILT_IN(floor); - BUILT_IN(abs); - BUILT_IN(min); - BUILT_IN(max); - BUILT_IN(length); - BUILT_IN(nth); - BUILT_IN(index); - BUILT_IN(join); - BUILT_IN(append); - BUILT_IN(zip); - BUILT_IN(compact); - BUILT_IN(type_of); - BUILT_IN(unit); - BUILT_IN(unitless); - BUILT_IN(comparable); - BUILT_IN(sass_not); - BUILT_IN(sass_if); - BUILT_IN(image_url); - - } -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/inspect.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/inspect.cpp deleted file mode 100644 index 1e3834e9..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/inspect.cpp +++ /dev/null @@ -1,640 +0,0 @@ -#include "inspect.hpp" -#include "ast.hpp" -#include "context.hpp" -#include <cmath> -#include <iostream> -#include <iomanip> - -namespace Sass { - using namespace std; - - Inspect::Inspect(Context* ctx) : buffer(""), indentation(0), ctx(ctx) { } - Inspect::~Inspect() { } - - // statements - void Inspect::operator()(Block* block) - { - if (!block->is_root()) { - append_multiline_part_to_buffer(" {\n"); - ++indentation; - } - for (size_t i = 0, L = block->length(); i < L; ++i) { - indent(); - (*block)[i]->perform(this); - // extra newline at the end of top-level statements - if (block->is_root()) append_multiline_part_to_buffer("\n"); - append_multiline_part_to_buffer("\n"); - } - if (!block->is_root()) { - --indentation; - indent(); - append_singleline_part_to_buffer("}"); - } - // remove extra newline that gets added after the last top-level block - if (block->is_root()) { - size_t l = buffer.length(); - if (l > 2 && buffer[l-1] == '\n' && buffer[l-2] == '\n') { - buffer.erase(l-1); - if (ctx) ctx->source_map.remove_line(); - } - } - } - - void Inspect::operator()(Ruleset* ruleset) - { - ruleset->selector()->perform(this); - ruleset->block()->perform(this); - } - - void Inspect::operator()(Propset* propset) - { - propset->property_fragment()->perform(this); - append_singleline_part_to_buffer(": "); - propset->block()->perform(this); - } - - void Inspect::operator()(Media_Block* media_block) - { - if (ctx) ctx->source_map.add_mapping(media_block); - append_singleline_part_to_buffer("@media "); - media_block->media_queries()->perform(this); - media_block->block()->perform(this); - } - - void Inspect::operator()(At_Rule* at_rule) - { - append_singleline_part_to_buffer(at_rule->keyword()); - if (at_rule->selector()) { - append_singleline_part_to_buffer(" "); - at_rule->selector()->perform(this); - } - if (at_rule->block()) { - at_rule->block()->perform(this); - } - else { - append_singleline_part_to_buffer(";"); - } - } - - void Inspect::operator()(Declaration* dec) - { - if (ctx) ctx->source_map.add_mapping(dec->property()); - dec->property()->perform(this); - append_singleline_part_to_buffer(": "); - if (ctx) ctx->source_map.add_mapping(dec->value()); - dec->value()->perform(this); - if (dec->is_important()) append_singleline_part_to_buffer(" !important"); - append_singleline_part_to_buffer(";"); - } - - void Inspect::operator()(Assignment* assn) - { - append_singleline_part_to_buffer(assn->variable()); - append_singleline_part_to_buffer(": "); - assn->value()->perform(this); - if (assn->is_guarded()) append_singleline_part_to_buffer(" !default"); - append_singleline_part_to_buffer(";"); - } - - void Inspect::operator()(Import* import) - { - if (!import->urls().empty()) { - if (ctx) ctx->source_map.add_mapping(import); - append_singleline_part_to_buffer("@import "); - import->urls().front()->perform(this); - append_singleline_part_to_buffer(";"); - for (size_t i = 1, S = import->urls().size(); i < S; ++i) { - append_multiline_part_to_buffer("\n"); - if (ctx) ctx->source_map.add_mapping(import); - append_singleline_part_to_buffer("@import "); - import->urls()[i]->perform(this); - append_singleline_part_to_buffer(";"); - } - } - } - - void Inspect::operator()(Import_Stub* import) - { - if (ctx) ctx->source_map.add_mapping(import); - append_singleline_part_to_buffer("@import "); - append_singleline_part_to_buffer(import->file_name()); - append_singleline_part_to_buffer(";"); - } - - void Inspect::operator()(Warning* warning) - { - if (ctx) ctx->source_map.add_mapping(warning); - append_singleline_part_to_buffer("@warn "); - warning->message()->perform(this); - append_singleline_part_to_buffer(";"); - } - - void Inspect::operator()(Comment* comment) - { - comment->text()->perform(this); - } - - void Inspect::operator()(If* cond) - { - append_singleline_part_to_buffer("@if "); - cond->predicate()->perform(this); - cond->consequent()->perform(this); - if (cond->alternative()) { - append_multiline_part_to_buffer("\n"); - indent(); - append_singleline_part_to_buffer("else"); - cond->alternative()->perform(this); - } - } - - void Inspect::operator()(For* loop) - { - append_singleline_part_to_buffer("@for "); - append_singleline_part_to_buffer(loop->variable()); - append_singleline_part_to_buffer(" from "); - loop->lower_bound()->perform(this); - append_singleline_part_to_buffer((loop->is_inclusive() ? " through " : " to ")); - loop->upper_bound()->perform(this); - loop->block()->perform(this); - } - - void Inspect::operator()(Each* loop) - { - append_singleline_part_to_buffer("@each "); - append_singleline_part_to_buffer(loop->variable()); - append_singleline_part_to_buffer(" in "); - loop->list()->perform(this); - loop->block()->perform(this); - } - - void Inspect::operator()(While* loop) - { - append_singleline_part_to_buffer("@while "); - loop->predicate()->perform(this); - loop->block()->perform(this); - } - - void Inspect::operator()(Return* ret) - { - append_singleline_part_to_buffer("@return "); - ret->value()->perform(this); - append_singleline_part_to_buffer(";"); - } - - void Inspect::operator()(Extension* extend) - { - append_singleline_part_to_buffer("@extend "); - extend->selector()->perform(this); - append_singleline_part_to_buffer(";"); - } - - void Inspect::operator()(Definition* def) - { - if (def->type() == Definition::MIXIN) { - append_singleline_part_to_buffer("@mixin "); - } else { - append_singleline_part_to_buffer("@function "); - } - append_singleline_part_to_buffer(def->name()); - def->parameters()->perform(this); - def->block()->perform(this); - } - - void Inspect::operator()(Mixin_Call* call) - { - append_singleline_part_to_buffer(string("@include ") += call->name()); - if (call->arguments()) { - call->arguments()->perform(this); - } - if (call->block()) { - append_singleline_part_to_buffer(" "); - call->block()->perform(this); - } - if (!call->block()) append_singleline_part_to_buffer(";"); - } - - void Inspect::operator()(Content* content) - { - if (ctx) ctx->source_map.add_mapping(content); - append_singleline_part_to_buffer("@content;"); - } - - void Inspect::operator()(List* list) - { - string sep(list->separator() == List::SPACE ? " " : ", "); - if (list->empty()) return; - bool items_output = false; - for (size_t i = 0, L = list->length(); i < L; ++i) { - Expression* list_item = (*list)[i]; - if (list_item->is_invisible()) { - continue; - } - if (items_output) append_singleline_part_to_buffer(sep); - list_item->perform(this); - items_output = true; - } - } - - void Inspect::operator()(Binary_Expression* expr) - { - expr->left()->perform(this); - switch (expr->type()) { - case Binary_Expression::AND: append_singleline_part_to_buffer(" and "); break; - case Binary_Expression::OR: append_singleline_part_to_buffer(" or "); break; - case Binary_Expression::EQ: append_singleline_part_to_buffer(" == "); break; - case Binary_Expression::NEQ: append_singleline_part_to_buffer(" != "); break; - case Binary_Expression::GT: append_singleline_part_to_buffer(" > "); break; - case Binary_Expression::GTE: append_singleline_part_to_buffer(" >= "); break; - case Binary_Expression::LT: append_singleline_part_to_buffer(" < "); break; - case Binary_Expression::LTE: append_singleline_part_to_buffer(" <= "); break; - case Binary_Expression::ADD: append_singleline_part_to_buffer(" + "); break; - case Binary_Expression::SUB: append_singleline_part_to_buffer(" - "); break; - case Binary_Expression::MUL: append_singleline_part_to_buffer(" * "); break; - case Binary_Expression::DIV: append_singleline_part_to_buffer("/"); break; - case Binary_Expression::MOD: append_singleline_part_to_buffer(" % "); break; - default: break; // shouldn't get here - } - expr->right()->perform(this); - } - - void Inspect::operator()(Unary_Expression* expr) - { - if (expr->type() == Unary_Expression::PLUS) append_singleline_part_to_buffer("+"); - else append_singleline_part_to_buffer("-"); - expr->operand()->perform(this); - } - - void Inspect::operator()(Function_Call* call) - { - append_singleline_part_to_buffer(call->name()); - call->arguments()->perform(this); - } - - void Inspect::operator()(Function_Call_Schema* call) - { - call->name()->perform(this); - call->arguments()->perform(this); - } - - void Inspect::operator()(Variable* var) - { - append_singleline_part_to_buffer(var->name()); - } - - void Inspect::operator()(Textual* txt) - { - append_singleline_part_to_buffer(txt->value()); - } - - // helper functions for serializing numbers - string frac_to_string(double f, size_t p) { - stringstream ss; - ss.setf(ios::fixed, ios::floatfield); - ss.precision(p); - ss << f; - string result(ss.str().substr(f < 0 ? 2 : 1)); - size_t i = result.size() - 1; - while (result[i] == '0') --i; - result = result.substr(0, i+1); - return result; - } - string double_to_string(double d, size_t p) { - stringstream ss; - double ipart; - double fpart = std::modf(d, &ipart); - ss << ipart; - if (fpart != 0) ss << frac_to_string(fpart, 5); - return ss.str(); - } - - void Inspect::operator()(Number* n) - { - stringstream ss; - ss.precision(5); - ss << fixed << n->value(); - string d(ss.str()); - for (size_t i = d.length()-1; d[i] == '0'; --i) { - d.resize(d.length()-1); - } - if (d[d.length()-1] == '.') d.resize(d.length()-1); - if (n->numerator_units().size() > 1 || n->denominator_units().size() > 0) { - error(d + n->unit() + " is not a valid CSS value", n->path(), n->position()); - } - append_singleline_part_to_buffer(d); - append_singleline_part_to_buffer(n->unit()); - } - - // helper function for serializing colors - template <size_t range> - static double cap_channel(double c) { - if (c > range) return range; - else if (c < 0) return 0; - else return c; - } - - void Inspect::operator()(Color* c) - { - stringstream ss; - double r = cap_channel<0xff>(c->r()); - double g = cap_channel<0xff>(c->g()); - double b = cap_channel<0xff>(c->b()); - double a = cap_channel<1> (c->a()); - - // if (a >= 1 && ctx.colors_to_names.count(numval)) { - // ss << ctx.colors_to_names[numval]; - // } - // else - - // retain the originally specified color definition if unchanged - if (!c->disp().empty()) { - ss << c->disp(); - } - else if (a >= 1) { - // see if it's a named color - int numval = r * 0x10000; - numval += g * 0x100; - numval += b; - if (ctx && ctx->colors_to_names.count(numval)) { - ss << ctx->colors_to_names[numval]; - } - else { - // otherwise output the hex triplet - ss << '#' << setw(2) << setfill('0'); - ss << hex << setw(2) << static_cast<unsigned long>(floor(r+0.5)); - ss << hex << setw(2) << static_cast<unsigned long>(floor(g+0.5)); - ss << hex << setw(2) << static_cast<unsigned long>(floor(b+0.5)); - } - } - else { - ss << "rgba("; - ss << static_cast<unsigned long>(r) << ", "; - ss << static_cast<unsigned long>(g) << ", "; - ss << static_cast<unsigned long>(b) << ", "; - ss << a << ')'; - } - append_singleline_part_to_buffer(ss.str()); - } - - void Inspect::operator()(Boolean* b) - { - append_singleline_part_to_buffer(b->value() ? "true" : "false"); - } - - void Inspect::operator()(String_Schema* ss) - { - // Evaluation should turn these into String_Constants, so this method is - // only for inspection purposes. - for (size_t i = 0, L = ss->length(); i < L; ++i) { - if ((*ss)[i]->is_interpolant()) append_singleline_part_to_buffer("#{"); - (*ss)[i]->perform(this); - if ((*ss)[i]->is_interpolant()) append_singleline_part_to_buffer("}"); - } - } - - void Inspect::operator()(String_Constant* s) - { - append_singleline_part_to_buffer(s->needs_unquoting() ? unquote(s->value()) : s->value()); - } - - void Inspect::operator()(Media_Query* mq) - { - size_t i = 0; - if (mq->media_type()) { - if (mq->is_negated()) append_singleline_part_to_buffer("not "); - else if (mq->is_restricted()) append_singleline_part_to_buffer("only "); - mq->media_type()->perform(this); - } - else { - (*mq)[i++]->perform(this); - } - for (size_t L = mq->length(); i < L; ++i) { - append_singleline_part_to_buffer(" and "); - (*mq)[i]->perform(this); - } - } - - void Inspect::operator()(Media_Query_Expression* mqe) - { - if (mqe->is_interpolated()) { - mqe->feature()->perform(this); - } - else { - append_singleline_part_to_buffer("("); - mqe->feature()->perform(this); - if (mqe->value()) { - append_singleline_part_to_buffer(": "); - mqe->value()->perform(this); - } - append_singleline_part_to_buffer(")"); - } - } - - void Inspect::operator()(Null* n) - { - append_singleline_part_to_buffer("null"); - } - - // parameters and arguments - void Inspect::operator()(Parameter* p) - { - append_singleline_part_to_buffer(p->name()); - if (p->default_value()) { - append_singleline_part_to_buffer(": "); - p->default_value()->perform(this); - } - else if (p->is_rest_parameter()) { - append_singleline_part_to_buffer("..."); - } - } - - void Inspect::operator()(Parameters* p) - { - append_singleline_part_to_buffer("("); - if (!p->empty()) { - (*p)[0]->perform(this); - for (size_t i = 1, L = p->length(); i < L; ++i) { - append_singleline_part_to_buffer(", "); - (*p)[i]->perform(this); - } - } - append_singleline_part_to_buffer(")"); - } - - void Inspect::operator()(Argument* a) - { - if (!a->name().empty()) { - append_singleline_part_to_buffer(a->name()); - append_singleline_part_to_buffer(": "); - } - // Special case: argument nulls can be ignored - if (a->value()->concrete_type() == Expression::NULL_VAL) { - return; - } - a->value()->perform(this); - if (a->is_rest_argument()) { - append_singleline_part_to_buffer("..."); - } - } - - void Inspect::operator()(Arguments* a) - { - append_singleline_part_to_buffer("("); - if (!a->empty()) { - (*a)[0]->perform(this); - for (size_t i = 1, L = a->length(); i < L; ++i) { - append_singleline_part_to_buffer(", "); - (*a)[i]->perform(this); - } - } - append_singleline_part_to_buffer(")"); - } - - // selectors - void Inspect::operator()(Selector_Schema* s) - { - s->contents()->perform(this); - } - - void Inspect::operator()(Selector_Reference* ref) - { - if (ref->selector()) ref->selector()->perform(this); - else append_singleline_part_to_buffer("&"); - } - - void Inspect::operator()(Selector_Placeholder* s) - { - append_singleline_part_to_buffer(s->name()); - } - - void Inspect::operator()(Type_Selector* s) - { - if (ctx) ctx->source_map.add_mapping(s); - append_singleline_part_to_buffer(s->name()); - } - - void Inspect::operator()(Selector_Qualifier* s) - { - if (ctx) ctx->source_map.add_mapping(s); - append_singleline_part_to_buffer(s->name()); - } - - void Inspect::operator()(Attribute_Selector* s) - { - if (ctx) ctx->source_map.add_mapping(s); - append_singleline_part_to_buffer("["); - append_singleline_part_to_buffer(s->name()); - if (!s->matcher().empty()) { - append_singleline_part_to_buffer(s->matcher()); - append_singleline_part_to_buffer(s->value()); - } - append_singleline_part_to_buffer("]"); - } - - void Inspect::operator()(Pseudo_Selector* s) - { - if (ctx) ctx->source_map.add_mapping(s); - append_singleline_part_to_buffer(s->name()); - if (s->expression()) { - s->expression()->perform(this); - append_singleline_part_to_buffer(")"); - } - } - - void Inspect::operator()(Negated_Selector* s) - { - if (ctx) ctx->source_map.add_mapping(s); - append_singleline_part_to_buffer(":not("); - s->selector()->perform(this); - append_singleline_part_to_buffer(")"); - } - - void Inspect::operator()(Compound_Selector* s) - { - for (size_t i = 0, L = s->length(); i < L; ++i) { - (*s)[i]->perform(this); - } - } - - void Inspect::operator()(Complex_Selector* c) - { - Compound_Selector* head = c->head(); - Complex_Selector* tail = c->tail(); - Complex_Selector::Combinator comb = c->combinator(); - if (head) head->perform(this); - if (head && tail) append_singleline_part_to_buffer(" "); - switch (comb) { - case Complex_Selector::ANCESTOR_OF: break; - case Complex_Selector::PARENT_OF: append_singleline_part_to_buffer(">"); break; - case Complex_Selector::PRECEDES: append_singleline_part_to_buffer("~"); break; - case Complex_Selector::ADJACENT_TO: append_singleline_part_to_buffer("+"); break; - } - if (tail && comb != Complex_Selector::ANCESTOR_OF) { - append_singleline_part_to_buffer(" "); - } - if (tail) tail->perform(this); - } - - void Inspect::operator()(Selector_List* g) - { - if (g->empty()) return; - (*g)[0]->perform(this); - for (size_t i = 1, L = g->length(); i < L; ++i) { - append_singleline_part_to_buffer(", "); - (*g)[i]->perform(this); - } - } - - inline void Inspect::fallback_impl(AST_Node* n) - { } - - void Inspect::indent() - { append_singleline_part_to_buffer(string(2*indentation, ' ')); } - - string unquote(const string& s) - { - if (s.empty()) return ""; - if (s.length() == 1) { - if (s[0] == '"' || s[0] == '\'') return ""; - } - char q; - if (*s.begin() == '"' && *s.rbegin() == '"') q = '"'; - else if (*s.begin() == '\'' && *s.rbegin() == '\'') q = '\''; - else return s; - string t; - t.reserve(s.length()-2); - for (size_t i = 1, L = s.length()-1; i < L; ++i) { - // if we see a quote, we need to remove the preceding backslash from t - if (s[i] == q) t.erase(t.length()-1); - t.push_back(s[i]); - } - return t; - } - - string quote(const string& s, char q) - { - if (s.empty()) return string(2, q); - if (!q || s[0] == '"' || s[0] == '\'') return s; - string t; - t.reserve(s.length()+2); - t.push_back(q); - for (size_t i = 0, L = s.length(); i < L; ++i) { - if (s[i] == q) t.push_back('\\'); - t.push_back(s[i]); - } - t.push_back(q); - return t; - } - - void Inspect::append_singleline_part_to_buffer(const string& text) - { - buffer += text; - if (ctx) ctx->source_map.update_column(text); - } - - void Inspect::append_multiline_part_to_buffer(const string& text) - { - buffer += text; - if (ctx) ctx->source_map.new_line(); - } - -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/inspect.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/inspect.hpp deleted file mode 100644 index e2250788..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/inspect.hpp +++ /dev/null @@ -1,99 +0,0 @@ -#include <string> - -#ifndef SASS_OPERATION -#include "operation.hpp" -#endif - -// #ifndef SASS_TO_STRING -// #include "to_string.hpp" -// #endif - -namespace Sass { - using namespace std; - struct Context; - - class Inspect : public Operation_CRTP<void, Inspect> { - // import all the class-specific methods and override as desired - using Operation_CRTP<void, Inspect>::operator(); - - // To_String* to_string; - string buffer; - size_t indentation; - Context* ctx; - void indent(); - - void fallback_impl(AST_Node* n); - - void append_singleline_part_to_buffer(const string& text); - void append_multiline_part_to_buffer(const string& text); - - public: - - Inspect(Context* ctx = 0); - virtual ~Inspect(); - - string get_buffer() { return buffer; } - - // statements - virtual void operator()(Block*); - virtual void operator()(Ruleset*); - virtual void operator()(Propset*); - virtual void operator()(Media_Block*); - virtual void operator()(At_Rule*); - virtual void operator()(Declaration*); - virtual void operator()(Assignment*); - virtual void operator()(Import*); - virtual void operator()(Import_Stub*); - virtual void operator()(Warning*); - virtual void operator()(Comment*); - virtual void operator()(If*); - virtual void operator()(For*); - virtual void operator()(Each*); - virtual void operator()(While*); - virtual void operator()(Return*); - virtual void operator()(Extension*); - virtual void operator()(Definition*); - virtual void operator()(Mixin_Call*); - virtual void operator()(Content*); - // expressions - virtual void operator()(List*); - virtual void operator()(Binary_Expression*); - virtual void operator()(Unary_Expression*); - virtual void operator()(Function_Call*); - virtual void operator()(Function_Call_Schema*); - virtual void operator()(Variable*); - virtual void operator()(Textual*); - virtual void operator()(Number*); - virtual void operator()(Color*); - virtual void operator()(Boolean*); - virtual void operator()(String_Schema*); - virtual void operator()(String_Constant*); - virtual void operator()(Media_Query*); - virtual void operator()(Media_Query_Expression*); - virtual void operator()(Null*); - // parameters and arguments - virtual void operator()(Parameter*); - virtual void operator()(Parameters*); - virtual void operator()(Argument*); - virtual void operator()(Arguments*); - // selectors - virtual void operator()(Selector_Schema*); - virtual void operator()(Selector_Reference*); - virtual void operator()(Selector_Placeholder*); - virtual void operator()(Type_Selector*); - virtual void operator()(Selector_Qualifier*); - virtual void operator()(Attribute_Selector*); - virtual void operator()(Pseudo_Selector*); - virtual void operator()(Negated_Selector*); - virtual void operator()(Compound_Selector*); - virtual void operator()(Complex_Selector*); - virtual void operator()(Selector_List*); - - template <typename U> - void fallback(U x) { fallback_impl(x); } - }; - - string unquote(const string&); - string quote(const string&, char); - -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/kwd_arg_macros.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/kwd_arg_macros.hpp deleted file mode 100644 index 2b9a13ae..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/kwd_arg_macros.hpp +++ /dev/null @@ -1,23 +0,0 @@ -// Intended usage: -// KWD_ARG_SET(Args) { -// KWD_ARG(Args, string, foo); -// KWD_ARG(Args, int, bar); -// ... -// }; -// -// ... and later ... -// -// something(Args().foo("hey").bar(3)); - -#define KWD_ARG_SET(set_name) class set_name - -#define KWD_ARG(set_name, type, name) \ -private: \ - type name##_; \ -public: \ - set_name& name(type name##__) { \ - name##_ = name##__; \ - return *this; \ - } \ - type name() { return name##_; } \ -private: diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/m4/.gitkeep b/node_modules/gulp-sass/node_modules/node-sass/libsass/m4/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/mapping.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/mapping.hpp deleted file mode 100644 index fc20436f..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/mapping.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#define SASS_MAPPING - -#ifndef SASS_POSITION -#include "position.hpp" -#endif - -namespace Sass { - - struct Mapping { - Position original_position; - Position generated_position; - - Mapping(const Position& original_position, const Position& generated_position) - : original_position(original_position), generated_position(generated_position) { } - }; - -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/memory_manager.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/memory_manager.hpp deleted file mode 100644 index d2e5f7d3..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/memory_manager.hpp +++ /dev/null @@ -1,54 +0,0 @@ -#define SASS_MEMORY_MANAGER - -#include <vector> -#include <iostream> -using namespace std; - -namespace Sass { - ///////////////////////////////////////////////////////////////////////////// - // A class for tracking allocations of AST_Node objects. The intended usage - // is something like: Some_Node* n = new (mem_mgr) Some_Node(...); - // Then, at the end of the program, the memory manager will delete all of the - // allocated nodes that have been passed to it. - // In the future, this class may implement a custom allocator. - ///////////////////////////////////////////////////////////////////////////// - template <typename T> - class Memory_Manager { - vector<T*> nodes; - - public: - Memory_Manager(size_t size = 0) : nodes(vector<T*>()) - { nodes.reserve(size); } - - ~Memory_Manager() - { - for (size_t i = 0, S = nodes.size(); i < S; ++i) { - // cout << "deleting " << typeid(*nodes[i]).name() << endl; - delete nodes[i]; - } - } - - T* operator()(T* np) - { - nodes.push_back(np); - // cout << "registering " << typeid(*np).name() << endl; - return np; - } - - void remove(T* np) - { - nodes.erase(find(nodes.begin(), nodes.end(), np)); - } - }; -} - -template <typename T> -inline void* operator new(size_t size, Sass::Memory_Manager<T>& mem_mgr) -{ return mem_mgr(static_cast<T*>(operator new(size))); } - -template <typename T> -inline void operator delete(void *np, Sass::Memory_Manager<T>& mem_mgr) -{ - mem_mgr.remove(reinterpret_cast<T*>(np)); - operator delete(np); -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/operation.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/operation.hpp deleted file mode 100644 index b5ebfc91..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/operation.hpp +++ /dev/null @@ -1,141 +0,0 @@ -#define SASS_OPERATION - -#include "ast_fwd_decl.hpp" - -#include <iostream> -using namespace std; -#include <typeinfo> - -namespace Sass { - - template<typename T> - class Operation { - public: - virtual T operator()(AST_Node* x) = 0; - virtual ~Operation() { } - // statements - virtual T operator()(Block* x) = 0; - virtual T operator()(Ruleset* x) = 0; - virtual T operator()(Propset* x) = 0; - virtual T operator()(Media_Block* x) = 0; - virtual T operator()(At_Rule* x) = 0; - virtual T operator()(Declaration* x) = 0; - virtual T operator()(Assignment* x) = 0; - virtual T operator()(Import* x) = 0; - virtual T operator()(Import_Stub* x) = 0; - virtual T operator()(Warning* x) = 0; - virtual T operator()(Comment* x) = 0; - virtual T operator()(If* x) = 0; - virtual T operator()(For* x) = 0; - virtual T operator()(Each* x) = 0; - virtual T operator()(While* x) = 0; - virtual T operator()(Return* x) = 0; - virtual T operator()(Content* x) = 0; - virtual T operator()(Extension* x) = 0; - virtual T operator()(Definition* x) = 0; - virtual T operator()(Mixin_Call* x) = 0; - // expressions - virtual T operator()(List* x) = 0; - virtual T operator()(Binary_Expression* x) = 0; - virtual T operator()(Unary_Expression* x) = 0; - virtual T operator()(Function_Call* x) = 0; - virtual T operator()(Function_Call_Schema* x) = 0; - virtual T operator()(Variable* x) = 0; - virtual T operator()(Textual* x) = 0; - virtual T operator()(Number* x) = 0; - virtual T operator()(Color* x) = 0; - virtual T operator()(Boolean* x) = 0; - virtual T operator()(String_Schema* x) = 0; - virtual T operator()(String_Constant* x) = 0; - virtual T operator()(Media_Query* x) = 0; - virtual T operator()(Media_Query_Expression* x) = 0; - virtual T operator()(Null* x) = 0; - // parameters and arguments - virtual T operator()(Parameter* x) = 0; - virtual T operator()(Parameters* x) = 0; - virtual T operator()(Argument* x) = 0; - virtual T operator()(Arguments* x) = 0; - // selectors - virtual T operator()(Selector_Schema* x) = 0; - virtual T operator()(Selector_Reference* x) = 0; - virtual T operator()(Selector_Placeholder* x) = 0; - virtual T operator()(Type_Selector* x) = 0; - virtual T operator()(Selector_Qualifier* x) = 0; - virtual T operator()(Attribute_Selector* x) = 0; - virtual T operator()(Pseudo_Selector* x) = 0; - virtual T operator()(Negated_Selector* x) = 0; - virtual T operator()(Compound_Selector* x) = 0; - virtual T operator()(Complex_Selector* x) = 0; - virtual T operator()(Selector_List* x) = 0; - - template <typename U> - T fallback(U x) { return T(); } - }; - - template <typename T, typename D> - class Operation_CRTP : public Operation<T> { - public: - virtual T operator()(AST_Node* x) { return static_cast<D*>(this)->fallback(x); } - virtual ~Operation_CRTP() = 0; - // statements - virtual T operator()(Block* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Ruleset* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Propset* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Media_Block* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(At_Rule* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Declaration* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Assignment* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Import* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Import_Stub* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Warning* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Comment* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(If* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(For* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Each* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(While* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Return* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Content* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Extension* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Definition* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Mixin_Call* x) { return static_cast<D*>(this)->fallback(x); } - // expressions - virtual T operator()(List* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Binary_Expression* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Unary_Expression* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Function_Call* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Function_Call_Schema* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Variable* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Textual* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Number* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Color* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Boolean* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(String_Schema* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(String_Constant* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Media_Query* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Media_Query_Expression* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Null* x) { return static_cast<D*>(this)->fallback(x); } - // parameters and arguments - virtual T operator()(Parameter* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Parameters* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Argument* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Arguments* x) { return static_cast<D*>(this)->fallback(x); } - // selectors - virtual T operator()(Selector_Schema* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Selector_Reference* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Selector_Placeholder* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Type_Selector* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Selector_Qualifier* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Attribute_Selector* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Pseudo_Selector* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Negated_Selector* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Compound_Selector* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Complex_Selector* x) { return static_cast<D*>(this)->fallback(x); } - virtual T operator()(Selector_List* x) { return static_cast<D*>(this)->fallback(x); } - - template <typename U> - T fallback(U x) { return T(); } - }; - template<typename T, typename D> - inline Operation_CRTP<T, D>::~Operation_CRTP() { } - -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/output_compressed.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/output_compressed.cpp deleted file mode 100644 index e8042cb0..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/output_compressed.cpp +++ /dev/null @@ -1,249 +0,0 @@ -#include "output_compressed.hpp" -#include "inspect.hpp" -#include "ast.hpp" -#include "context.hpp" - -namespace Sass { - using namespace std; - - Output_Compressed::Output_Compressed(Context* ctx) : buffer(""), ctx(ctx) { } - Output_Compressed::~Output_Compressed() { } - - inline void Output_Compressed::fallback_impl(AST_Node* n) - { - Inspect i(ctx); - n->perform(&i); - buffer += i.get_buffer(); - } - - void Output_Compressed::operator()(Block* b) - { - if (!b->is_root()) return; - for (size_t i = 0, L = b->length(); i < L; ++i) { - (*b)[i]->perform(this); - } - } - - void Output_Compressed::operator()(Ruleset* r) - { - Selector* s = r->selector(); - Block* b = r->block(); - - if (s->has_placeholder()) return; - - if (b->has_non_hoistable()) { - s->perform(this); - append_singleline_part_to_buffer("{"); - for (size_t i = 0, L = b->length(); i < L; ++i) { - Statement* stm = (*b)[i]; - if (!stm->is_hoistable()) { - stm->perform(this); - } - } - append_singleline_part_to_buffer("}"); - } - - if (b->has_hoistable()) { - for (size_t i = 0, L = b->length(); i < L; ++i) { - Statement* stm = (*b)[i]; - if (stm->is_hoistable()) { - stm->perform(this); - } - } - } - } - - void Output_Compressed::operator()(Media_Block* m) - { - List* q = m->media_queries(); - Block* b = m->block(); - - ctx->source_map.add_mapping(m); - append_singleline_part_to_buffer("@media "); - q->perform(this); - append_singleline_part_to_buffer("{"); - - Selector* e = m->enclosing_selector(); - bool hoisted = false; - if (e && b->has_non_hoistable()) { - hoisted = true; - e->perform(this); - append_singleline_part_to_buffer("{"); - } - - for (size_t i = 0, L = b->length(); i < L; ++i) { - Statement* stm = (*b)[i]; - if (!stm->is_hoistable()) { - stm->perform(this); - } - } - - if (hoisted) { - append_singleline_part_to_buffer("}"); - } - - for (size_t i = 0, L = b->length(); i < L; ++i) { - Statement* stm = (*b)[i]; - if (stm->is_hoistable()) { - stm->perform(this); - } - } - - append_singleline_part_to_buffer("}"); - } - - void Output_Compressed::operator()(At_Rule* a) - { - string kwd = a->keyword(); - Selector* s = a->selector(); - Block* b = a->block(); - - append_singleline_part_to_buffer(kwd); - if (s) { - append_singleline_part_to_buffer(" "); - s->perform(this); - } - - if (!b) { - append_singleline_part_to_buffer(";"); - return; - } - - append_singleline_part_to_buffer("{"); - for (size_t i = 0, L = b->length(); i < L; ++i) { - Statement* stm = (*b)[i]; - if (!stm->is_hoistable()) { - stm->perform(this); - } - } - - for (size_t i = 0, L = b->length(); i < L; ++i) { - Statement* stm = (*b)[i]; - if (stm->is_hoistable()) { - stm->perform(this); - } - } - - append_singleline_part_to_buffer("}"); - } - - void Output_Compressed::operator()(Declaration* d) - { - bool bPrintExpression = true; - // Check print conditions - if (d->value()->concrete_type() == Expression::NULL_VAL) { - bPrintExpression = false; - } - if (d->value()->concrete_type() == Expression::STRING) { - String_Constant* valConst = static_cast<String_Constant*>(d->value()); - string val(valConst->value()); - if (val.empty()) { - bPrintExpression = false; - } - } - // Print if OK - if(bPrintExpression) { - if (ctx) ctx->source_map.add_mapping(d->property()); - d->property()->perform(this); - append_singleline_part_to_buffer(":"); - if (ctx) ctx->source_map.add_mapping(d->value()); - d->value()->perform(this); - if (d->is_important()) append_singleline_part_to_buffer("!important"); - append_singleline_part_to_buffer(";"); - } - } - - void Output_Compressed::operator()(Comment* c) - { - return; - } - - void Output_Compressed::operator()(List* list) - { - string sep(list->separator() == List::SPACE ? " " : ","); - if (list->empty()) return; - Expression* first = (*list)[0]; - bool first_invisible = first->is_invisible(); - if (!first_invisible) first->perform(this); - for (size_t i = 1, L = list->length(); i < L; ++i) { - Expression* next = (*list)[i]; - bool next_invisible = next->is_invisible(); - if (i == 1 && !first_invisible && !next_invisible) append_singleline_part_to_buffer(sep); - else if (!next_invisible) append_singleline_part_to_buffer(sep); - next->perform(this); - } - } - - void Output_Compressed::operator()(Media_Query_Expression* mqe) - { - if (mqe->is_interpolated()) { - mqe->feature()->perform(this); - } - else { - append_singleline_part_to_buffer("("); - mqe->feature()->perform(this); - if (mqe->value()) { - append_singleline_part_to_buffer(":"); - mqe->value()->perform(this); - } - append_singleline_part_to_buffer(")"); - } - } - - void Output_Compressed::operator()(Argument* a) - { - if (!a->name().empty()) { - append_singleline_part_to_buffer(a->name()); - append_singleline_part_to_buffer(":"); - } - a->value()->perform(this); - if (a->is_rest_argument()) { - append_singleline_part_to_buffer("..."); - } - } - - void Output_Compressed::operator()(Arguments* a) - { - append_singleline_part_to_buffer("("); - if (!a->empty()) { - (*a)[0]->perform(this); - for (size_t i = 1, L = a->length(); i < L; ++i) { - append_singleline_part_to_buffer(","); - (*a)[i]->perform(this); - } - } - append_singleline_part_to_buffer(")"); - } - - void Output_Compressed::operator()(Complex_Selector* c) - { - Compound_Selector* head = c->head(); - Complex_Selector* tail = c->tail(); - Complex_Selector::Combinator comb = c->combinator(); - if (head) head->perform(this); - switch (comb) { - case Complex_Selector::ANCESTOR_OF: append_singleline_part_to_buffer(" "); break; - case Complex_Selector::PARENT_OF: append_singleline_part_to_buffer(">"); break; - case Complex_Selector::PRECEDES: append_singleline_part_to_buffer("~"); break; - case Complex_Selector::ADJACENT_TO: append_singleline_part_to_buffer("+"); break; - } - if (tail) tail->perform(this); - } - - void Output_Compressed::operator()(Selector_List* g) - { - if (g->empty()) return; - (*g)[0]->perform(this); - for (size_t i = 1, L = g->length(); i < L; ++i) { - append_singleline_part_to_buffer(","); - (*g)[i]->perform(this); - } - } - - void Output_Compressed::append_singleline_part_to_buffer(const string& text) - { - buffer += text; - if (ctx) ctx->source_map.update_column(text); - } - -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/output_compressed.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/output_compressed.hpp deleted file mode 100644 index e7d7d31c..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/output_compressed.hpp +++ /dev/null @@ -1,87 +0,0 @@ -#include <string> - -#ifndef SASS_OPERATION -#include "operation.hpp" -#endif - -namespace Sass { - using namespace std; - - struct Context; - - class Output_Compressed : public Operation_CRTP<void, Output_Compressed> { - // import all the class-specific methods and override as desired - using Operation_CRTP<void, Output_Compressed>::operator(); - - string buffer; - Context* ctx; - - void fallback_impl(AST_Node* n); - - void append_singleline_part_to_buffer(const string& text); - - public: - Output_Compressed(Context* ctx = 0); - virtual ~Output_Compressed(); - - string get_buffer() { return buffer; } - - // statements - virtual void operator()(Block*); - virtual void operator()(Ruleset*); - // virtual void operator()(Propset*); - virtual void operator()(Media_Block*); - virtual void operator()(At_Rule*); - virtual void operator()(Declaration*); - // virtual void operator()(Assignment*); - // virtual void operator()(Import*); - // virtual void operator()(Import_Stub*); - // virtual void operator()(Warning*); - virtual void operator()(Comment*); - // virtual void operator()(If*); - // virtual void operator()(For*); - // virtual void operator()(Each*); - // virtual void operator()(While*); - // virtual void operator()(Return*); - // virtual void operator()(Extension*); - // virtual void operator()(Definition*); - // virtual void operator()(Mixin_Call*); - // virtual void operator()(Content*); - // // expressions - virtual void operator()(List*); - // virtual void operator()(Binary_Expression*); - // virtual void operator()(Unary_Expression*); - // virtual void operator()(Function_Call*); - // virtual void operator()(Function_Call_Schema*); - // virtual void operator()(Variable*); - // virtual void operator()(Textual*); - // virtual void operator()(Number*); - // virtual void operator()(Color*); - // virtual void operator()(Boolean*); - // virtual void operator()(String_Schema*); - // virtual void operator()(String_Constant* x); - // virtual void operator()(Media_Query*); - virtual void operator()(Media_Query_Expression*); - // // parameters and arguments - // virtual void operator()(Parameter*); - // virtual void operator()(Parameters*); - virtual void operator()(Argument*); - virtual void operator()(Arguments*); - // // selectors - // virtual void operator()(Selector_Schema*); - // virtual void operator()(Selector_Reference*); - // virtual void operator()(Selector_Placeholder*); - // virtual void operator()(Type_Selector*); - // virtual void operator()(Selector_Qualifier*); - // virtual void operator()(Attribute_Selector*); - // virtual void operator()(Pseudo_Selector*); - // virtual void operator()(Negated_Selector*); - // virtual void operator()(Compound_Selector*); - virtual void operator()(Complex_Selector*); - virtual void operator()(Selector_List*); - - template <typename U> - void fallback(U x) { fallback_impl(x); } - }; - -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/output_nested.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/output_nested.cpp deleted file mode 100644 index 9f0eb5b9..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/output_nested.cpp +++ /dev/null @@ -1,225 +0,0 @@ -#include "output_nested.hpp" -#include "inspect.hpp" -#include "ast.hpp" -#include "context.hpp" -#include <iostream> -#include <sstream> -#include <typeinfo> - -namespace Sass { - using namespace std; - - Output_Nested::Output_Nested(bool source_comments, Context* ctx) - : buffer(""), indentation(0), source_comments(source_comments), ctx(ctx) - { } - Output_Nested::~Output_Nested() { } - - inline void Output_Nested::fallback_impl(AST_Node* n) - { - Inspect i(ctx); - n->perform(&i); - buffer += i.get_buffer(); - } - - void Output_Nested::operator()(Block* b) - { - if (!b->is_root()) return; - for (size_t i = 0, L = b->length(); i < L; ++i) { - (*b)[i]->perform(this); - if (i < L-1) append_multiline_part_to_buffer("\n"); - } - } - - void Output_Nested::operator()(Ruleset* r) - { - Selector* s = r->selector(); - Block* b = r->block(); - bool decls = false; - - if (s->has_placeholder()) return; - - if (b->has_non_hoistable()) { - decls = true; - indent(); - if (source_comments) { - stringstream ss; - ss << "/* line " << r->position().line << ", " << r->path() << " */" << endl; - append_singleline_part_to_buffer(ss.str()); - indent(); - } - s->perform(this); - append_multiline_part_to_buffer(" {\n"); - ++indentation; - for (size_t i = 0, L = b->length(); i < L; ++i) { - Statement* stm = (*b)[i]; - bool bPrintExpression = true; - // Check print conditions - if (typeid(*stm) == typeid(Declaration)) { - Declaration* dec = static_cast<Declaration*>(stm); - if (dec->value()->concrete_type() == Expression::STRING) { - String_Constant* valConst = static_cast<String_Constant*>(dec->value()); - string val(valConst->value()); - if (val.empty()) { - bPrintExpression = false; - } - } - else if (dec->value()->concrete_type() == Expression::LIST) { - List* list = static_cast<List*>(dec->value()); - bool all_invisible = true; - for (size_t list_i = 0, list_L = list->length(); list_i < list_L; ++list_i) { - Expression* item = (*list)[list_i]; - if (!item->is_invisible()) all_invisible = false; - } - if (all_invisible) bPrintExpression = false; - } - } - // Print if OK - if (!stm->is_hoistable() && bPrintExpression) { - if (!stm->block()) indent(); - stm->perform(this); - append_multiline_part_to_buffer("\n"); - } - } - --indentation; - buffer.erase(buffer.length()-1); - if (ctx) ctx->source_map.remove_line(); - append_multiline_part_to_buffer(" }\n"); - } - - if (b->has_hoistable()) { - if (decls) ++indentation; - // indent(); - for (size_t i = 0, L = b->length(); i < L; ++i) { - Statement* stm = (*b)[i]; - if (stm->is_hoistable()) { - stm->perform(this); - } - } - if (decls) --indentation; - } - } - - void Output_Nested::operator()(Media_Block* m) - { - List* q = m->media_queries(); - Block* b = m->block(); - bool decls = false; - - indent(); - ctx->source_map.add_mapping(m); - append_singleline_part_to_buffer("@media "); - q->perform(this); - append_multiline_part_to_buffer(" {\n"); - - Selector* e = m->enclosing_selector(); - bool hoisted = false; - if (e && b->has_non_hoistable()) { - hoisted = true; - ++indentation; - indent(); - e->perform(this); - append_multiline_part_to_buffer(" {\n"); - } - - ++indentation; - decls = true; - for (size_t i = 0, L = b->length(); i < L; ++i) { - Statement* stm = (*b)[i]; - if (!stm->is_hoistable()) { - if (!stm->block()) indent(); - stm->perform(this); - append_multiline_part_to_buffer("\n"); - } - } - --indentation; - - if (hoisted) { - buffer.erase(buffer.length()-1); - if (ctx) ctx->source_map.remove_line(); - append_multiline_part_to_buffer(" }\n"); - --indentation; - } - - if (decls) ++indentation; - if (hoisted) ++indentation; - for (size_t i = 0, L = b->length(); i < L; ++i) { - Statement* stm = (*b)[i]; - if (stm->is_hoistable()) { - stm->perform(this); - } - } - if (hoisted) --indentation; - if (decls) --indentation; - - buffer.erase(buffer.length()-1); - if (ctx) ctx->source_map.remove_line(); - append_multiline_part_to_buffer(" }\n"); - } - - void Output_Nested::operator()(At_Rule* a) - { - string kwd = a->keyword(); - Selector* s = a->selector(); - Block* b = a->block(); - bool decls = false; - - // indent(); - append_singleline_part_to_buffer(kwd); - if (s) { - append_singleline_part_to_buffer(" "); - s->perform(this); - } - - if (!b) { - append_singleline_part_to_buffer(";"); - return; - } - - append_multiline_part_to_buffer(" {\n"); - ++indentation; - decls = true; - for (size_t i = 0, L = b->length(); i < L; ++i) { - Statement* stm = (*b)[i]; - if (!stm->is_hoistable()) { - if (!stm->block()) indent(); - stm->perform(this); - append_multiline_part_to_buffer("\n"); - } - } - --indentation; - - if (decls) ++indentation; - for (size_t i = 0, L = b->length(); i < L; ++i) { - Statement* stm = (*b)[i]; - if (stm->is_hoistable()) { - stm->perform(this); - append_multiline_part_to_buffer("\n"); - } - } - if (decls) --indentation; - - buffer.erase(buffer.length()-1); - if (ctx) ctx->source_map.remove_line(); - if (b->has_hoistable()) { - buffer.erase(buffer.length()-1); - if (ctx) ctx->source_map.remove_line(); - } - append_multiline_part_to_buffer(" }\n"); - } - - void Output_Nested::indent() - { append_singleline_part_to_buffer(string(2*indentation, ' ')); } - - void Output_Nested::append_singleline_part_to_buffer(const string& text) - { - buffer += text; - if (ctx) ctx->source_map.update_column(text); - } - - void Output_Nested::append_multiline_part_to_buffer(const string& text) - { - buffer += text; - if (ctx) ctx->source_map.new_line(); - } - -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/output_nested.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/output_nested.hpp deleted file mode 100644 index f8762b49..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/output_nested.hpp +++ /dev/null @@ -1,98 +0,0 @@ -#include <string> - -#ifndef SASS_OPERATION -#include "operation.hpp" -#endif - -// #ifndef SASS_TO_STRING -// #include "to_string.hpp" -// #endif - -namespace Sass { - using namespace std; - struct Context; - - class Output_Nested : public Operation_CRTP<void, Output_Nested> { - // import all the class-specific methods and override as desired - using Operation_CRTP<void, Output_Nested>::operator(); - - string buffer; - size_t indentation; - bool source_comments; - Context* ctx; - void indent(); - - void fallback_impl(AST_Node* n); - - void append_singleline_part_to_buffer(const string& text); - void append_multiline_part_to_buffer(const string& text); - - public: - - Output_Nested(bool source_comments = false, Context* ctx = 0); - virtual ~Output_Nested(); - - string get_buffer() { return buffer; } - - // statements - virtual void operator()(Block*); - virtual void operator()(Ruleset*); - // virtual void operator()(Propset*); - virtual void operator()(Media_Block*); - virtual void operator()(At_Rule*); - // virtual void operator()(Declaration*); - // virtual void operator()(Assignment*); - // virtual void operator()(Import*); - // virtual void operator()(Import_Stub*); - // virtual void operator()(Warning*); - // virtual void operator()(Comment*); - // virtual void operator()(If*); - // virtual void operator()(For*); - // virtual void operator()(Each*); - // virtual void operator()(While*); - // virtual void operator()(Return*); - // virtual void operator()(Extension*); - // virtual void operator()(Definition*); - // virtual void operator()(Mixin_Call*); - // virtual void operator()(Content*); - // // expressions - // virtual void operator()(List*); - // virtual void operator()(Binary_Expression*); - // virtual void operator()(Unary_Expression*); - // virtual void operator()(Function_Call*); - // virtual void operator()(Function_Call_Schema*); - // virtual void operator()(Variable*); - // virtual void operator()(Textual*); - // virtual void operator()(Number*); - // virtual void operator()(Color*); - // virtual void operator()(Boolean*); - // virtual void operator()(String_Schema*); - // virtual void operator()(String_Constant* x); - // virtual void operator()(Media_Query*); - // virtual void operator()(Media_Query_Expression*); - // // parameters and arguments - // virtual void operator()(Parameter*); - // virtual void operator()(Parameters*); - // virtual void operator()(Argument*); - // virtual void operator()(Arguments*); - // // selectors - // virtual void operator()(Selector_Schema*); - // virtual void operator()(Selector_Reference*); - // virtual void operator()(Selector_Placeholder*); - // virtual void operator()(Type_Selector*); - // virtual void operator()(Selector_Qualifier*); - // virtual void operator()(Attribute_Selector*); - // virtual void operator()(Pseudo_Selector*); - // virtual void operator()(Negated_Selector*); - // virtual void operator()(Compound_Selector*); - // virtual void operator()(Complex_Selector*); - // virtual void operator()(Selector_List*); - - template <typename U> - void fallback(U x) { fallback_impl(x); } - }; - - string unquote(const string&); - string quote(const string&, char); - -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/parser.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/parser.cpp deleted file mode 100644 index 137ed269..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/parser.cpp +++ /dev/null @@ -1,1610 +0,0 @@ -#include <cstdlib> -#include <iostream> -#include "parser.hpp" -#include "file.hpp" -#include "inspect.hpp" -#include "to_string.hpp" -#include "constants.hpp" - -#ifndef SASS_PRELEXER -#include "prelexer.hpp" -#endif - -#include <typeinfo> - -namespace Sass { - using namespace std; - using namespace Constants; - - Parser Parser::from_c_str(const char* str, Context& ctx, string path, Position source_position) - { - Parser p(ctx, path, source_position); - p.source = str; - p.position = p.source; - p.end = str + strlen(str); - return p; - } - - Parser Parser::from_token(Token t, Context& ctx, string path, Position source_position) - { - Parser p(ctx, path, source_position); - p.source = t.begin; - p.position = p.source; - p.end = t.end; - return p; - } - - Block* Parser::parse() - { - Block* root = new (ctx.mem) Block(path, source_position); - root->is_root(true); - read_bom(); - lex< optional_spaces >(); - Selector_Lookahead lookahead_result; - while (position < end) { - if (lex< block_comment >()) { - String_Constant* contents = new (ctx.mem) String_Constant(path, source_position, lexed); - Comment* comment = new (ctx.mem) Comment(path, source_position, contents); - (*root) << comment; - } - else if (peek< import >()) { - Import* imp = parse_import(); - if (!imp->urls().empty()) (*root) << imp; - if (!imp->files().empty()) { - for (size_t i = 0, S = imp->files().size(); i < S; ++i) { - (*root) << new (ctx.mem) Import_Stub(path, source_position, imp->files()[i]); - } - } - if (!lex< exactly<';'> >()) error("top-level @import directive must be terminated by ';'"); - } - else if (peek< mixin >() || peek< function >()) { - (*root) << parse_definition(); - } - else if (peek< variable >()) { - (*root) << parse_assignment(); - if (!lex< exactly<';'> >()) error("top-level variable binding must be terminated by ';'"); - } - else if (peek< sequence< optional< exactly<'*'> >, alternatives< identifier_schema, identifier >, optional_spaces, exactly<':'>, optional_spaces, exactly<'{'> > >(position)) { - (*root) << parse_propset(); - } - else if (peek< include >() /* || peek< exactly<'+'> >() */) { - Mixin_Call* mixin_call = parse_mixin_call(); - (*root) << mixin_call; - if (!mixin_call->block() && !lex< exactly<';'> >()) error("top-level @include directive must be terminated by ';'"); - } - else if (peek< if_directive >()) { - (*root) << parse_if_directive(); - } - else if (peek< for_directive >()) { - (*root) << parse_for_directive(); - } - else if (peek< each_directive >()) { - (*root) << parse_each_directive(); - } - else if (peek< while_directive >()) { - (*root) << parse_while_directive(); - } - else if (peek< media >()) { - (*root) << parse_media_block(); - } - else if (peek< warn >()) { - (*root) << parse_warning(); - if (!lex< exactly<';'> >()) error("top-level @warn directive must be terminated by ';'"); - } - // ignore the @charset directive for now - else if (lex< exactly< charset_kwd > >()) { - lex< string_constant >(); - lex< exactly<';'> >(); - } - else if (peek< at_keyword >()) { - At_Rule* at_rule = parse_at_rule(); - (*root) << at_rule; - if (!at_rule->block() && !lex< exactly<';'> >()) error("top-level directive must be terminated by ';'"); - } - else if ((lookahead_result = lookahead_for_selector(position)).found) { - (*root) << parse_ruleset(lookahead_result); - } - else { - lex< spaces_and_comments >(); - if (position >= end) break; - error("invalid top-level expression"); - } - lex< optional_spaces >(); - } - return root; - } - - Import* Parser::parse_import() - { - lex< import >(); - Import* imp = new (ctx.mem) Import(path, source_position); - bool first = true; - do { - if (lex< string_constant >()) { - string import_path(lexed); - size_t dot = import_path.find_last_of('.'); - if (dot != string::npos && import_path.substr(dot, 4) == ".css") { - String_Constant* loc = new (ctx.mem) String_Constant(path, source_position, import_path); - Argument* loc_arg = new (ctx.mem) Argument(path, source_position, loc); - Arguments* loc_args = new (ctx.mem) Arguments(path, source_position); - (*loc_args) << loc_arg; - Function_Call* new_url = new (ctx.mem) Function_Call(path, source_position, "url", loc_args); - imp->urls().push_back(new_url); - } - else { - string current_dir = File::dir_name(path); - // string resolved(ctx.add_file(File::join_paths(current_dir, unquote(import_path)))); - string resolved(ctx.add_file(current_dir, unquote(import_path))); - if (resolved.empty()) error("file to import not found or unreadable: " + import_path); - imp->files().push_back(resolved); - } - } - else if (peek< uri_prefix >()) { - imp->urls().push_back(parse_value()); - } - else { - if (first) error("@import directive requires a url or quoted path"); - else error("expecting another url or quoted path in @import list"); - } - first = false; - } while (lex< exactly<','> >()); - return imp; - } - - Definition* Parser::parse_definition() - { - Definition::Type which_type = Definition::MIXIN; - if (lex< mixin >()) which_type = Definition::MIXIN; - else if (lex< function >()) which_type = Definition::FUNCTION; - string which_str(lexed); - if (!lex< identifier >()) error("invalid name in " + which_str + " definition"); - string name(lexed); - Position source_position_of_def = source_position; - Parameters* params = parse_parameters(); - if (!peek< exactly<'{'> >()) error("body for " + which_str + " " + name + " must begin with a '{'"); - if (which_type == Definition::MIXIN) stack.push_back(mixin_def); - else stack.push_back(function_def); - Block* body = parse_block(); - stack.pop_back(); - Definition* def = new (ctx.mem) Definition(path, source_position_of_def, name, params, body, which_type); - return def; - } - - Parameters* Parser::parse_parameters() - { - string name(lexed); // for the error message - Parameters* params = new (ctx.mem) Parameters(path, source_position); - if (lex< exactly<'('> >()) { - // if there's anything there at all - if (!peek< exactly<')'> >()) { - do (*params) << parse_parameter(); - while (lex< exactly<','> >()); - } - if (!lex< exactly<')'> >()) error("expected a variable name (e.g. $x) or ')' for the parameter list for " + name); - } - return params; - } - - Parameter* Parser::parse_parameter() - { - lex< variable >(); - string name(lexed); - Position pos = source_position; - Expression* val = 0; - bool is_rest = false; - if (lex< exactly<':'> >()) { // there's a default value - val = parse_space_list(); - val->is_delayed(false); - } - else if (lex< exactly< ellipsis > >()) { - is_rest = true; - } - Parameter* p = new (ctx.mem) Parameter(path, pos, name, val, is_rest); - return p; - } - - Mixin_Call* Parser::parse_mixin_call() - { - lex< include >() /* || lex< exactly<'+'> >() */; - if (!lex< identifier >()) error("invalid name in @include directive"); - Position source_position_of_call = source_position; - string name(lexed); - Arguments* args = parse_arguments(); - Block* content = 0; - if (peek< exactly<'{'> >()) { - content = parse_block(); - } - Mixin_Call* the_call = new (ctx.mem) Mixin_Call(path, source_position_of_call, name, args, content); - return the_call; - } - - Arguments* Parser::parse_arguments() - { - string name(lexed); - Arguments* args = new (ctx.mem) Arguments(path, source_position); - - if (lex< exactly<'('> >()) { - // if there's anything there at all - if (!peek< exactly<')'> >()) { - do (*args) << parse_argument(); - while (lex< exactly<','> >()); - } - if (!lex< exactly<')'> >()) error("expected a variable name (e.g. $x) or ')' for the parameter list for " + name); - } - - return args; - } - - Argument* Parser::parse_argument() - { - Argument* arg; - if (peek< sequence < variable, spaces_and_comments, exactly<':'> > >()) { - lex< variable >(); - string name(lexed); - Position p = source_position; - lex< exactly<':'> >(); - Expression* val = parse_space_list(); - val->is_delayed(false); - arg = new (ctx.mem) Argument(path, p, val, name); - } - else { - bool is_arglist = false; - Expression* val = parse_space_list(); - val->is_delayed(false); - if (lex< exactly< ellipsis > >()) { - is_arglist = true; - } - arg = new (ctx.mem) Argument(path, source_position, val, "", is_arglist); - } - return arg; - } - - Assignment* Parser::parse_assignment() - { - lex< variable >(); - string name(lexed); - Position var_source_position = source_position; - if (!lex< exactly<':'> >()) error("expected ':' after " + name + " in assignment statement"); - Expression* val = parse_list(); - val->is_delayed(false); - bool is_guarded = lex< default_flag >(); - Assignment* var = new (ctx.mem) Assignment(path, var_source_position, name, val, is_guarded); - return var; - } - - Propset* Parser::parse_propset() - { - String* property_segment; - if (peek< sequence< optional< exactly<'*'> >, identifier_schema > >()) { - property_segment = parse_identifier_schema(); - } - else { - lex< sequence< optional< exactly<'*'> >, identifier > >(); - property_segment = new (ctx.mem) String_Constant(path, source_position, lexed); - } - Propset* propset = new (ctx.mem) Propset(path, source_position, property_segment); - lex< exactly<':'> >(); - - if (!peek< exactly<'{'> >()) error("expected a '{' after namespaced property"); - - propset->block(parse_block()); - - return propset; - } - - Ruleset* Parser::parse_ruleset(Selector_Lookahead lookahead) - { - Selector* sel; - if (lookahead.has_interpolants) { - sel = parse_selector_schema(lookahead.found); - } - else { - sel = parse_selector_group(); - } - Position r_source_position = source_position; - if (!peek< exactly<'{'> >()) error("expected a '{' after the selector"); - Block* block = parse_block(); - Ruleset* ruleset = new (ctx.mem) Ruleset(path, r_source_position, sel, block); - return ruleset; - } - - Selector_Schema* Parser::parse_selector_schema(const char* end_of_selector) - { - lex< optional_spaces >(); - const char* i = position; - const char* p; - String_Schema* schema = new (ctx.mem) String_Schema(path, source_position); - - while (i < end_of_selector) { - p = find_first_in_interval< exactly<hash_lbrace> >(i, end_of_selector); - if (p) { - // accumulate the preceding segment if there is one - if (i < p) (*schema) << new (ctx.mem) String_Constant(path, source_position, Token(i, p)); - // find the end of the interpolant and parse it - const char* j = find_first_in_interval< exactly<rbrace> >(p, end_of_selector); - Expression* interp_node = Parser::from_token(Token(p+2, j), ctx, path, source_position).parse_list(); - interp_node->is_interpolant(true); - (*schema) << interp_node; - i = j + 1; - } - else { // no interpolants left; add the last segment if there is one - if (i < end_of_selector) (*schema) << new (ctx.mem) String_Constant(path, source_position, Token(i, end_of_selector)); - break; - } - } - position = end_of_selector; - return new (ctx.mem) Selector_Schema(path, source_position, schema); - } - - Selector_List* Parser::parse_selector_group() - { - To_String to_string; - Selector_List* group = new (ctx.mem) Selector_List(path, source_position); - do { - Complex_Selector* comb = parse_selector_combination(); - if (!comb->has_reference()) { - Position sel_source_position = source_position; - Selector_Reference* ref = new (ctx.mem) Selector_Reference(path, sel_source_position); - Compound_Selector* ref_wrap = new (ctx.mem) Compound_Selector(path, sel_source_position); - (*ref_wrap) << ref; - if (!comb->head()) { - comb->head(ref_wrap); - comb->has_reference(true); - } - else { - comb = new (ctx.mem) Complex_Selector(path, sel_source_position, Complex_Selector::ANCESTOR_OF, ref_wrap, comb); - comb->has_reference(true); - } - } - (*group) << comb; - } - while (lex< exactly<','> >()); - return group; - } - - Complex_Selector* Parser::parse_selector_combination() - { - Position sel_source_position = Position(); - Compound_Selector* lhs; - if (peek< exactly<'+'> >() || - peek< exactly<'~'> >() || - peek< exactly<'>'> >()) { - // no selector before the combinator - lhs = 0; - } - else { - lhs = parse_simple_selector_sequence(); - sel_source_position = source_position; - } - - Complex_Selector::Combinator cmb; - if (lex< exactly<'+'> >()) cmb = Complex_Selector::ADJACENT_TO; - else if (lex< exactly<'~'> >()) cmb = Complex_Selector::PRECEDES; - else if (lex< exactly<'>'> >()) cmb = Complex_Selector::PARENT_OF; - else cmb = Complex_Selector::ANCESTOR_OF; - - Complex_Selector* rhs; - if (peek< exactly<','> >() || - peek< exactly<')'> >() || - peek< exactly<'{'> >() || - peek< exactly<'}'> >() || - peek< exactly<';'> >()) { - // no selector after the combinator - rhs = 0; - } - else { - rhs = parse_selector_combination(); - sel_source_position = source_position; - } - if (!sel_source_position.line) sel_source_position = source_position; - return new (ctx.mem) Complex_Selector(path, sel_source_position, cmb, lhs, rhs); - } - - Compound_Selector* Parser::parse_simple_selector_sequence() - { - Compound_Selector* seq = new (ctx.mem) Compound_Selector(path, source_position); - // check for backref or type selector, which are only allowed at the front - if (lex< exactly<'&'> >()) { - (*seq) << new (ctx.mem) Selector_Reference(path, source_position); - } - else if (lex< sequence< negate< functional >, alternatives< type_selector, universal, string_constant, dimension, percentage, number > > >()) { - (*seq) << new (ctx.mem) Type_Selector(path, source_position, lexed); - } - else { - (*seq) << parse_simple_selector(); - } - - while (!peek< spaces >(position) && - !(peek < exactly<'+'> >(position) || - peek < exactly<'~'> >(position) || - peek < exactly<'>'> >(position) || - peek < exactly<','> >(position) || - peek < exactly<')'> >(position) || - peek < exactly<'{'> >(position) || - peek < exactly<'}'> >(position) || - peek < exactly<';'> >(position))) { - (*seq) << parse_simple_selector(); - } - return seq; - } - - Simple_Selector* Parser::parse_simple_selector() - { - if (lex< id_name >() || lex< class_name >()) { - return new (ctx.mem) Selector_Qualifier(path, source_position, lexed); - } - else if (lex< string_constant >() || lex< number >()) { - return new (ctx.mem) Type_Selector(path, source_position, lexed); - } - else if (peek< pseudo_not >()) { - return parse_negated_selector(); - } - else if (peek< exactly<':'> >(position) || peek< functional >()) { - return parse_pseudo_selector(); - } - else if (peek< exactly<'['> >(position)) { - return parse_attribute_selector(); - } - else if (lex< placeholder >()) { - return new (ctx.mem) Selector_Placeholder(path, source_position, lexed); - } - else { - error("invalid selector after " + lexed.to_string()); - } - // unreachable statement - return 0; - } - - Negated_Selector* Parser::parse_negated_selector() - { - lex< pseudo_not >(); - Position nsource_position = source_position; - Selector* negated = parse_selector_group(); - if (!lex< exactly<')'> >()) { - error("negated selector is missing ')'"); - } - return new (ctx.mem) Negated_Selector(path, nsource_position, negated); - } - - Pseudo_Selector* Parser::parse_pseudo_selector() { - if (lex< sequence< pseudo_prefix, functional > >() || lex< functional >()) { - string name(lexed); - String* expr = 0; - Position p = source_position; - if (lex< alternatives< even, odd > >()) { - expr = new (ctx.mem) String_Constant(path, p, lexed); - } - else if (peek< binomial >(position)) { - lex< sequence< optional< coefficient >, exactly<'n'> > >(); - String_Constant* var_coef = new (ctx.mem) String_Constant(path, p, lexed); - lex< sign >(); - String_Constant* op = new (ctx.mem) String_Constant(path, p, lexed); - // Binary_Expression::Type op = (lexed == "+" ? Binary_Expression::ADD : Binary_Expression::SUB); - lex< digits >(); - String_Constant* constant = new (ctx.mem) String_Constant(path, p, lexed); - // expr = new (ctx.mem) Binary_Expression(path, p, op, var_coef, constant); - String_Schema* schema = new (ctx.mem) String_Schema(path, p, 3); - *schema << var_coef << op << constant; - expr = schema; - } - else if (lex< sequence< optional<sign>, - optional<digits>, - exactly<'n'> > >()) { - expr = new (ctx.mem) String_Constant(path, p, lexed); - } - else if (lex< sequence< optional<sign>, digits > >()) { - expr = new (ctx.mem) String_Constant(path, p, lexed); - } - else if (lex< identifier >()) { - expr = new (ctx.mem) String_Constant(path, p, lexed); - } - else if (lex< string_constant >()) { - expr = new (ctx.mem) String_Constant(path, p, lexed); - } - else if (peek< exactly<')'> >()) { - expr = new (ctx.mem) String_Constant(path, p, ""); - } - else { - error("invalid argument to " + name + "...)"); - } - if (!lex< exactly<')'> >()) error("unterminated argument to " + name + "...)"); - return new (ctx.mem) Pseudo_Selector(path, p, name, expr); - } - else if (lex < sequence< pseudo_prefix, identifier > >()) { - return new (ctx.mem) Pseudo_Selector(path, source_position, lexed); - } - else { - error("unrecognized pseudo-class or pseudo-element"); - } - // unreachable statement - return 0; - } - - Attribute_Selector* Parser::parse_attribute_selector() - { - lex< exactly<'['> >(); - Position p = source_position; - if (!lex< type_selector >()) error("invalid attribute name in attribute selector"); - string name(lexed); - if (lex< exactly<']'> >()) return new (ctx.mem) Attribute_Selector(path, p, name, "", ""); - if (!lex< alternatives< exact_match, class_match, dash_match, - prefix_match, suffix_match, substring_match > >()) { - error("invalid operator in attribute selector for " + name); - } - string matcher(lexed); - if (!lex< string_constant >() && !lex< identifier >()) error("expected a string constant or identifier in attribute selector for " + name); - string value(lexed); - if (!lex< exactly<']'> >()) error("unterminated attribute selector for " + name); - return new (ctx.mem) Attribute_Selector(path, p, name, matcher, value); - } - - Block* Parser::parse_block() - { - lex< exactly<'{'> >(); - bool semicolon = false; - Selector_Lookahead lookahead_result; - Block* block = new (ctx.mem) Block(path, source_position); - while (!lex< exactly<'}'> >()) { - if (semicolon) { - if (!lex< exactly<';'> >()) { - error("non-terminal statement or declaration must end with ';'"); - } - semicolon = false; - while (lex< block_comment >()) { - String_Constant* contents = new (ctx.mem) String_Constant(path, source_position, lexed); - Comment* comment = new (ctx.mem) Comment(path, source_position, contents); - (*block) << comment; - } - if (lex< exactly<'}'> >()) break; - } - if (lex< block_comment >()) { - String_Constant* contents = new (ctx.mem) String_Constant(path, source_position, lexed); - Comment* comment = new (ctx.mem) Comment(path, source_position, contents); - (*block) << comment; - } - else if (peek< import >(position)) { - if (stack.back() == mixin_def || stack.back() == function_def) { - lex< import >(); // to adjust the source_position number - error("@import directives are not allowed inside mixins and functions"); - } - Import* imp = parse_import(); - if (!imp->urls().empty()) (*block) << imp; - if (!imp->files().empty()) { - for (size_t i = 0, S = imp->files().size(); i < S; ++i) { - (*block) << new (ctx.mem) Import_Stub(path, source_position, imp->files()[i]); - } - } - semicolon = true; - } - else if (lex< variable >()) { - (*block) << parse_assignment(); - semicolon = true; - } - else if (peek< if_directive >()) { - (*block) << parse_if_directive(); - } - else if (peek< for_directive >()) { - (*block) << parse_for_directive(); - } - else if (peek< each_directive >()) { - (*block) << parse_each_directive(); - } - else if (peek < while_directive >()) { - (*block) << parse_while_directive(); - } - else if (lex < return_directive >()) { - (*block) << new (ctx.mem) Return(path, source_position, parse_list()); - semicolon = true; - } - else if (peek< warn >()) { - (*block) << parse_warning(); - semicolon = true; - } - else if (stack.back() == function_def) { - error("only variable declarations and control directives are allowed inside functions"); - } - else if (peek< mixin >() || peek< function >()) { - (*block) << parse_definition(); - } - else if (peek< include >(position)) { - Mixin_Call* the_call = parse_mixin_call(); - (*block) << the_call; - // don't need a semicolon after a content block - semicolon = (the_call->block()) ? false : true; - } - else if (lex< content >()) { - if (stack.back() != mixin_def) { - error("@content may only be used within a mixin"); - } - (*block) << new (ctx.mem) Content(path, source_position); - semicolon = true; - } - /* - else if (peek< exactly<'+'> >()) { - (*block) << parse_mixin_call(); - semicolon = true; - } - */ - else if (lex< extend >()) { - Selector_Lookahead lookahead = lookahead_for_extension_target(position); - if (!lookahead.found) error("invalid selector for @extend"); - Selector* target; - if (lookahead.has_interpolants) target = parse_selector_schema(lookahead.found); - else target = parse_selector_group(); - (*block) << new (ctx.mem) Extension(path, source_position, target); - semicolon = true; - } - else if (peek< media >()) { - (*block) << parse_media_block(); - } - // ignore the @charset directive for now - else if (lex< exactly< charset_kwd > >()) { - lex< string_constant >(); - lex< exactly<';'> >(); - } - else if (peek< at_keyword >()) { - At_Rule* at_rule = parse_at_rule(); - (*block) << at_rule; - if (!at_rule->block()) semicolon = true; - } - else if ((lookahead_result = lookahead_for_selector(position)).found) { - (*block) << parse_ruleset(lookahead_result); - } - else if (peek< sequence< optional< exactly<'*'> >, alternatives< identifier_schema, identifier >, optional_spaces, exactly<':'>, optional_spaces, exactly<'{'> > >(position)) { - (*block) << parse_propset(); - } - else if (!peek< exactly<';'> >()) { - if (peek< sequence< optional< exactly<'*'> >, identifier_schema, exactly<':'>, exactly<'{'> > >()) { - (*block) << parse_propset(); - } - else if (peek< sequence< optional< exactly<'*'> >, identifier, exactly<':'>, exactly<'{'> > >()) { - (*block) << parse_propset(); - } - else { - Declaration* decl = parse_declaration(); - (*block) << decl; - if (peek< exactly<'{'> >()) { - // parse a propset that rides on the declaration's property - Propset* ps = new (ctx.mem) Propset(path, source_position, decl->property(), parse_block()); - (*block) << ps; - } - else { - // finish and let the semicolon get munched - semicolon = true; - } - } - } - else lex< exactly<';'> >(); - while (lex< block_comment >()) { - String_Constant* contents = new (ctx.mem) String_Constant(path, source_position, lexed); - Comment* comment = new (ctx.mem) Comment(path, source_position, contents); - (*block) << comment; - } - } - return block; - } - - Declaration* Parser::parse_declaration() { - String* prop = 0; - if (peek< sequence< optional< exactly<'*'> >, identifier_schema > >()) { - prop = parse_identifier_schema(); - } - else if (lex< sequence< optional< exactly<'*'> >, identifier > >()) { - prop = new (ctx.mem) String_Constant(path, source_position, lexed); - } - else { - error("invalid property name"); - } - if (!lex< exactly<':'> >()) error("property \"" + string(lexed) + "\" must be followed by a ':'"); - if (peek< exactly<';'> >()) error("style declaration must contain a value"); - Expression* list = parse_list(); - return new (ctx.mem) Declaration(path, prop->position(), prop, list/*, lex<important>()*/); - } - - Expression* Parser::parse_list() - { - return parse_comma_list(); - } - - Expression* Parser::parse_comma_list() - { - if (//peek< exactly<'!'> >(position) || - peek< exactly<';'> >(position) || - peek< exactly<'}'> >(position) || - peek< exactly<'{'> >(position) || - peek< exactly<')'> >(position) || - //peek< exactly<':'> >(position) || - peek< exactly<ellipsis> >(position)) - { return new (ctx.mem) List(path, source_position, 0); } - Expression* list1 = parse_space_list(); - // if it's a singleton, return it directly; don't wrap it - if (!peek< exactly<','> >(position)) return list1; - - List* comma_list = new (ctx.mem) List(path, source_position, 2, List::COMMA); - (*comma_list) << list1; - - while (lex< exactly<','> >()) - { - Expression* list = parse_space_list(); - (*comma_list) << list; - } - - return comma_list; - } - - Expression* Parser::parse_space_list() - { - Expression* disj1 = parse_disjunction(); - // if it's a singleton, return it directly; don't wrap it - if (//peek< exactly<'!'> >(position) || - peek< exactly<';'> >(position) || - peek< exactly<'}'> >(position) || - peek< exactly<'{'> >(position) || - peek< exactly<')'> >(position) || - peek< exactly<','> >(position) || - // peek< exactly<':'> >(position) || - peek< exactly<ellipsis> >(position) || - peek< default_flag >(position)) - { return disj1; } - - List* space_list = new (ctx.mem) List(path, source_position, 2, List::SPACE); - (*space_list) << disj1; - - while (!(//peek< exactly<'!'> >(position) || - peek< exactly<';'> >(position) || - peek< exactly<'}'> >(position) || - peek< exactly<'{'> >(position) || - peek< exactly<')'> >(position) || - peek< exactly<','> >(position) || - // peek< exactly<':'> >(position) || - peek< exactly<ellipsis> >(position) || - peek< default_flag >(position))) - { - (*space_list) << parse_disjunction(); - } - - return space_list; - } - - Expression* Parser::parse_disjunction() - { - Expression* conj1 = parse_conjunction(); - // if it's a singleton, return it directly; don't wrap it - if (!peek< sequence< or_op, negate< identifier > > >()) return conj1; - - vector<Expression*> operands; - while (lex< sequence< or_op, negate< identifier > > >()) - operands.push_back(parse_conjunction()); - - return fold_operands(conj1, operands, Binary_Expression::OR); - } - - Expression* Parser::parse_conjunction() - { - Expression* rel1 = parse_relation(); - // if it's a singleton, return it directly; don't wrap it - if (!peek< sequence< and_op, negate< identifier > > >()) return rel1; - - vector<Expression*> operands; - while (lex< sequence< and_op, negate< identifier > > >()) - operands.push_back(parse_relation()); - - return fold_operands(rel1, operands, Binary_Expression::AND); - } - - Expression* Parser::parse_relation() - { - Expression* expr1 = parse_expression(); - // if it's a singleton, return it directly; don't wrap it - if (!(peek< eq_op >(position) || - peek< neq_op >(position) || - peek< gte_op >(position) || - peek< gt_op >(position) || - peek< lte_op >(position) || - peek< lt_op >(position))) - { return expr1; } - - Binary_Expression::Type op - = lex<eq_op>() ? Binary_Expression::EQ - : lex<neq_op>() ? Binary_Expression::NEQ - : lex<gte_op>() ? Binary_Expression::GTE - : lex<lte_op>() ? Binary_Expression::LTE - : lex<gt_op>() ? Binary_Expression::GT - : lex<lt_op>() ? Binary_Expression::LT - : Binary_Expression::LT; // whatever - - Expression* expr2 = parse_expression(); - - return new (ctx.mem) Binary_Expression(path, expr1->position(), op, expr1, expr2); - } - - Expression* Parser::parse_expression() - { - Expression* term1 = parse_term(); - // if it's a singleton, return it directly; don't wrap it - if (!(peek< exactly<'+'> >(position) || - peek< sequence< negate< number >, exactly<'-'> > >(position))) - { return term1; } - - vector<Expression*> operands; - vector<Binary_Expression::Type> operators; - while (lex< exactly<'+'> >() || lex< sequence< negate< number >, exactly<'-'> > >()) { - operators.push_back(lexed == "+" ? Binary_Expression::ADD : Binary_Expression::SUB); - operands.push_back(parse_term()); - } - - return fold_operands(term1, operands, operators); - } - - Expression* Parser::parse_term() - { - Expression* fact1 = parse_factor(); - // if it's a singleton, return it directly; don't wrap it - if (!(peek< exactly<'*'> >(position) || - peek< exactly<'/'> >(position) || - peek< exactly<'%'> >(position))) - { return fact1; } - - vector<Expression*> operands; - vector<Binary_Expression::Type> operators; - while (lex< exactly<'*'> >() || lex< exactly<'/'> >() || lex< exactly<'%'> >()) { - if (lexed == "*") operators.push_back(Binary_Expression::MUL); - else if (lexed == "/") operators.push_back(Binary_Expression::DIV); - else operators.push_back(Binary_Expression::MOD); - operands.push_back(parse_factor()); - } - - return fold_operands(fact1, operands, operators); - } - - Expression* Parser::parse_factor() - { - if (lex< exactly<'('> >()) { - Expression* value = parse_comma_list(); - if (!lex< exactly<')'> >()) error("unclosed parenthesis"); - value->is_delayed(false); - // make sure wrapped lists and division expressions are non-delayed within parentheses - if (value->concrete_type() == Expression::LIST) { - List* l = static_cast<List*>(value); - if (!l->empty()) (*l)[0]->is_delayed(false); - } else if (typeid(*value) == typeid(Binary_Expression)) { - Binary_Expression* b = static_cast<Binary_Expression*>(value); - Binary_Expression* lhs = static_cast<Binary_Expression*>(b->left()); - if (lhs && lhs->type() == Binary_Expression::DIV) lhs->is_delayed(false); - } - return value; - } - else if (peek< ie_stuff >()) { - return parse_ie_stuff(); - } - else if (peek< ie_keyword_arg >()) { - String_Schema* kwd_arg = new (ctx.mem) String_Schema(path, source_position, 3); - if (lex< variable >()) *kwd_arg << new (ctx.mem) Variable(path, source_position, lexed); - else { - lex< alternatives< identifier_schema, identifier > >(); - *kwd_arg << new (ctx.mem) String_Constant(path, source_position, lexed); - } - lex< exactly<'='> >(); - *kwd_arg << new (ctx.mem) String_Constant(path, source_position, lexed); - if (lex< variable >()) *kwd_arg << new (ctx.mem) Variable(path, source_position, lexed); - else { - lex< alternatives< identifier_schema, identifier, number > >(); - *kwd_arg << new (ctx.mem) String_Constant(path, source_position, lexed); - } - return kwd_arg; - } - else if (peek< functional_schema >()) { - return parse_function_call_schema(); - } - else if (peek< identifier_schema >()) { - return parse_identifier_schema(); - } - else if (peek< functional >() && !peek< uri_prefix >()) { - return parse_function_call(); - } - else if (lex< sequence< exactly<'+'>, spaces_and_comments, negate< number > > >()) { - return new (ctx.mem) Unary_Expression(path, source_position, Unary_Expression::PLUS, parse_factor()); - } - else if (lex< sequence< exactly<'-'>, spaces_and_comments, negate< number> > >()) { - return new (ctx.mem) Unary_Expression(path, source_position, Unary_Expression::MINUS, parse_factor()); - } - else { - return parse_value(); - } - } - - Expression* Parser::parse_value() - { - if (lex< uri_prefix >()) { - // TODO: really need to clean up this chunk - Arguments* args = new (ctx.mem) Arguments(path, source_position); - Function_Call* result = new (ctx.mem) Function_Call(path, source_position, "url", args); - // gah, gonna have to use exception handling to do backtracking ... - const char* here = position; - try { - try { - if (peek< string_constant >()) { - // cerr << "parsing a url string" << endl; - String* str = parse_string(); - (*args) << new (ctx.mem) Argument(path, source_position, str); - // cerr << "done" << endl; - } - else if (peek< sequence< url_schema, spaces_and_comments, exactly<')'> > >()) { - // cerr << "url schema" << endl; - lex< url_schema >(); - String_Schema* the_url = Parser::from_token(lexed, ctx, path, source_position).parse_url_schema(); - (*args) << new (ctx.mem) Argument(path, source_position, the_url); - // cerr << "done" << endl; - } - else if (peek< sequence< url_value, spaces_and_comments, exactly<')'> > >()) { - // cerr << "url value" << endl; - lex< url_value >(); - String_Constant* the_url = new (ctx.mem) String_Constant(path, source_position, lexed); - (*args) << new (ctx.mem) Argument(path, source_position, the_url); - // cerr << "done" << endl; - } - else { - // cerr << "stuff" << endl; - const char* value = position; - const char* rparen = find_first< exactly<')'> >(position); - if (!rparen) error("URI is missing ')'"); - Token content_tok(Token(value, rparen)); - String_Constant* content_node = new (ctx.mem) String_Constant(path, source_position, content_tok); - (*args) << new (ctx.mem) Argument(path, source_position, content_node); - position = rparen; - // cerr << "done" << endl; - } - } - catch (Error& e) { - // cerr << "expression" << endl; - position = here; - Expression* expr = parse_list(); - (*args) << new (ctx.mem) Argument(path, source_position, expr); - // cerr << "done" << endl; - } - } - catch (Error& e) { - error("unable to parse URL"); - } - if (!lex< exactly<')'> >()) error("URI is missing ')'"); - return result; - } - - if (lex< important >()) - { return new (ctx.mem) String_Constant(path, source_position, "!important"); } - - if (lex< value_schema >()) - { return Parser::from_token(lexed, ctx, path, source_position).parse_value_schema(); } - - if (lex< sequence< true_val, negate< identifier > > >()) - { return new (ctx.mem) Boolean(path, source_position, true); } - - if (lex< sequence< false_val, negate< identifier > > >()) - { return new (ctx.mem) Boolean(path, source_position, false); } - - if (lex< sequence< null, negate< identifier > > >()) - { return new (ctx.mem) Null(path, source_position); } - - if (lex< identifier >()) { - String_Constant* str = new (ctx.mem) String_Constant(path, source_position, lexed); - str->is_delayed(true); - return str; - } - - if (lex< percentage >()) - { return new (ctx.mem) Textual(path, source_position, Textual::PERCENTAGE, lexed); } - - if (lex< dimension >()) - { return new (ctx.mem) Textual(path, source_position, Textual::DIMENSION, lexed); } - - if (lex< number >()) - { return new (ctx.mem) Textual(path, source_position, Textual::NUMBER, lexed); } - - if (lex< hex >()) - { return new (ctx.mem) Textual(path, source_position, Textual::HEX, lexed); } - - if (peek< string_constant >()) - { return parse_string(); } - - if (lex< variable >()) - { return new (ctx.mem) Variable(path, source_position, lexed); } - - error("error reading values after " + lexed.to_string()); - - // unreachable statement - return 0; - } - - String* Parser::parse_string() - { - lex< string_constant >(); - Token str(lexed); - const char* i = str.begin; - // see if there any interpolants - const char* p = find_first_in_interval< sequence< negate< exactly<'\\'> >, exactly<hash_lbrace> > >(str.begin, str.end); - if (!p) { - String_Constant* str_node = new (ctx.mem) String_Constant(path, source_position, str); - str_node->is_delayed(true); - return str_node; - } - - String_Schema* schema = new (ctx.mem) String_Schema(path, source_position); - schema->quote_mark(*str.begin); - while (i < str.end) { - p = find_first_in_interval< sequence< negate< exactly<'\\'> >, exactly<hash_lbrace> > >(i, str.end); - if (p) { - if (i < p) { - (*schema) << new (ctx.mem) String_Constant(path, source_position, Token(i, p)); // accumulate the preceding segment if it's nonempty - } - const char* j = find_first_in_interval< exactly<rbrace> >(p, str.end); // find the closing brace - if (j) { - // parse the interpolant and accumulate it - Expression* interp_node = Parser::from_token(Token(p+2, j), ctx, path, source_position).parse_list(); - interp_node->is_interpolant(true); - (*schema) << interp_node; - i = j+1; - } - else { - // throw an error if the interpolant is unterminated - error("unterminated interpolant inside string constant " + str.to_string()); - } - } - else { // no interpolants left; add the last segment if nonempty - if (i < str.end) (*schema) << new (ctx.mem) String_Constant(path, source_position, Token(i, str.end)); - break; - } - } - return schema; - } - - String* Parser::parse_ie_stuff() - { - lex< ie_stuff >(); - Token str(lexed); - --str.end; - --position; - const char* i = str.begin; - // see if there any interpolants - const char* p = find_first_in_interval< sequence< negate< exactly<'\\'> >, exactly<hash_lbrace> > >(str.begin, str.end); - if (!p) { - String_Constant* str_node = new (ctx.mem) String_Constant(path, source_position, str); - str_node->is_delayed(true); - return str_node; - } - - String_Schema* schema = new (ctx.mem) String_Schema(path, source_position); - while (i < str.end) { - p = find_first_in_interval< sequence< negate< exactly<'\\'> >, exactly<hash_lbrace> > >(i, str.end); - if (p) { - if (i < p) { - (*schema) << new (ctx.mem) String_Constant(path, source_position, Token(i, p)); // accumulate the preceding segment if it's nonempty - } - const char* j = find_first_in_interval< exactly<rbrace> >(p, str.end); // find the closing brace - if (j) { - // parse the interpolant and accumulate it - Expression* interp_node = Parser::from_token(Token(p+2, j), ctx, path, source_position).parse_list(); - interp_node->is_interpolant(true); - (*schema) << interp_node; - i = j+1; - } - else { - // throw an error if the interpolant is unterminated - error("unterminated interpolant inside IE function " + str.to_string()); - } - } - else { // no interpolants left; add the last segment if nonempty - if (i < str.end) (*schema) << new (ctx.mem) String_Constant(path, source_position, Token(i, str.end)); - break; - } - } - return schema; - } - - String_Schema* Parser::parse_value_schema() - { - String_Schema* schema = new (ctx.mem) String_Schema(path, source_position); - size_t num_items = 0; - while (position < end) { - if (lex< interpolant >()) { - Token insides(Token(lexed.begin + 2, lexed.end - 1)); - Expression* interp_node = Parser::from_token(insides, ctx, path, source_position).parse_list(); - interp_node->is_interpolant(true); - (*schema) << interp_node; - } - else if (lex< identifier >()) { - (*schema) << new (ctx.mem) String_Constant(path, source_position, lexed); - } - else if (lex< percentage >()) { - (*schema) << new (ctx.mem) Textual(path, source_position, Textual::PERCENTAGE, lexed); - } - else if (lex< dimension >()) { - (*schema) << new (ctx.mem) Textual(path, source_position, Textual::DIMENSION, lexed); - } - else if (lex< number >()) { - (*schema) << new (ctx.mem) Textual(path, source_position, Textual::NUMBER, lexed); - } - else if (lex< hex >()) { - (*schema) << new (ctx.mem) Textual(path, source_position, Textual::HEX, lexed); - } - else if (lex< string_constant >()) { - (*schema) << new (ctx.mem) String_Constant(path, source_position, lexed); - if (!num_items) schema->quote_mark(*lexed.begin); - } - else if (lex< variable >()) { - (*schema) << new (ctx.mem) Variable(path, source_position, lexed); - } - else { - error("error parsing interpolated value"); - } - ++num_items; - } - return schema; - } - - String_Schema* Parser::parse_url_schema() - { - String_Schema* schema = new (ctx.mem) String_Schema(path, source_position); - - while (position < end) { - if (position[0] == '/') { - lexed = Token(position, position+1); - (*schema) << new (ctx.mem) String_Constant(path, source_position, lexed); - ++position; - } - else if (lex< interpolant >()) { - Token insides(Token(lexed.begin + 2, lexed.end - 1)); - Expression* interp_node = Parser::from_token(insides, ctx, path, source_position).parse_list(); - interp_node->is_interpolant(true); - (*schema) << interp_node; - } - else if (lex< sequence< identifier, exactly<':'> > >()) { - (*schema) << new (ctx.mem) String_Constant(path, source_position, lexed); - } - else if (lex< filename >()) { - (*schema) << new (ctx.mem) String_Constant(path, source_position, lexed); - } - else { - error("error parsing interpolated url"); - } - } - return schema; - } - - String* Parser::parse_identifier_schema() - { - lex< sequence< optional< exactly<'*'> >, identifier_schema > >(); - Token id(lexed); - const char* i = id.begin; - // see if there any interpolants - const char* p = find_first_in_interval< sequence< negate< exactly<'\\'> >, exactly<hash_lbrace> > >(id.begin, id.end); - if (!p) { - return new (ctx.mem) String_Constant(path, source_position, id); - } - - String_Schema* schema = new (ctx.mem) String_Schema(path, source_position); - while (i < id.end) { - p = find_first_in_interval< sequence< negate< exactly<'\\'> >, exactly<hash_lbrace> > >(i, id.end); - if (p) { - if (i < p) { - (*schema) << new (ctx.mem) String_Constant(path, source_position, Token(i, p)); // accumulate the preceding segment if it's nonempty - } - const char* j = find_first_in_interval< exactly<rbrace> >(p, id.end); // find the closing brace - if (j) { - // parse the interpolant and accumulate it - Expression* interp_node = Parser::from_token(Token(p+2, j), ctx, path, source_position).parse_list(); - interp_node->is_interpolant(true); - (*schema) << interp_node; - i = j+1; - } - else { - // throw an error if the interpolant is unterminated - error("unterminated interpolant inside interpolated identifier " + id.to_string()); - } - } - else { // no interpolants left; add the last segment if nonempty - if (i < id.end) (*schema) << new (ctx.mem) String_Constant(path, source_position, Token(i, id.end)); - break; - } - } - return schema; - } - - Function_Call* Parser::parse_function_call() - { - lex< identifier >(); - string name(lexed); - Position source_position_of_call = source_position; - - Function_Call* the_call = new (ctx.mem) Function_Call(path, source_position_of_call, name, parse_arguments()); - return the_call; - } - - Function_Call_Schema* Parser::parse_function_call_schema() - { - String* name = parse_identifier_schema(); - Position source_position_of_call = source_position; - - Function_Call_Schema* the_call = new (ctx.mem) Function_Call_Schema(path, source_position_of_call, name, parse_arguments()); - return the_call; - } - - If* Parser::parse_if_directive(bool else_if) - { - lex< if_directive >() || (else_if && lex< exactly<if_after_else_kwd> >()); - Position if_source_position = source_position; - Expression* predicate = parse_list(); - predicate->is_delayed(false); - if (!peek< exactly<'{'> >()) error("expected '{' after the predicate for @if"); - Block* consequent = parse_block(); - Block* alternative = 0; - if (lex< else_directive >()) { - if (peek< exactly<if_after_else_kwd> >()) { - alternative = new (ctx.mem) Block(path, source_position); - (*alternative) << parse_if_directive(true); - } - else if (!peek< exactly<'{'> >()) { - error("expected '{' after @else"); - } - else { - alternative = parse_block(); - } - } - return new (ctx.mem) If(path, if_source_position, predicate, consequent, alternative); - } - - For* Parser::parse_for_directive() - { - lex< for_directive >(); - Position for_source_position = source_position; - if (!lex< variable >()) error("@for directive requires an iteration variable"); - string var(lexed); - if (!lex< from >()) error("expected 'from' keyword in @for directive"); - Expression* lower_bound = parse_expression(); - lower_bound->is_delayed(false); - bool inclusive = false; - if (lex< through >()) inclusive = true; - else if (lex< to >()) inclusive = false; - else error("expected 'through' or 'to' keywod in @for directive"); - Expression* upper_bound = parse_expression(); - upper_bound->is_delayed(false); - if (!peek< exactly<'{'> >()) error("expected '{' after the upper bound in @for directive"); - Block* body = parse_block(); - return new (ctx.mem) For(path, for_source_position, var, lower_bound, upper_bound, body, inclusive); - } - - Each* Parser::parse_each_directive() - { - lex < each_directive >(); - Position each_source_position = source_position; - if (!lex< variable >()) error("@each directive requires an iteration variable"); - string var(lexed); - if (!lex< in >()) error("expected 'in' keyword in @each directive"); - Expression* list = parse_list(); - list->is_delayed(false); - if (list->concrete_type() == Expression::LIST) { - List* l = static_cast<List*>(list); - for (size_t i = 0, L = l->length(); i < L; ++i) { - (*l)[i]->is_delayed(false); - } - } - if (!peek< exactly<'{'> >()) error("expected '{' after the upper bound in @each directive"); - Block* body = parse_block(); - return new (ctx.mem) Each(path, each_source_position, var, list, body); - } - - While* Parser::parse_while_directive() - { - lex< while_directive >(); - Position while_source_position = source_position; - Expression* predicate = parse_list(); - predicate->is_delayed(false); - Block* body = parse_block(); - return new (ctx.mem) While(path, while_source_position, predicate, body); - } - - Media_Block* Parser::parse_media_block() - { - lex< media >(); - Position media_source_position = source_position; - - List* media_queries = parse_media_queries(); - - if (!peek< exactly<'{'> >()) { - error("expected '{' in media query"); - } - Block* block = parse_block(); - - return new (ctx.mem) Media_Block(path, media_source_position, media_queries, block); - } - - List* Parser::parse_media_queries() - { - List* media_queries = new (ctx.mem) List(path, source_position, 0, List::COMMA); - if (!peek< exactly<'{'> >()) (*media_queries) << parse_media_query(); - while (lex< exactly<','> >()) (*media_queries) << parse_media_query(); - return media_queries; - } - - // Expression* Parser::parse_media_query() - Media_Query* Parser::parse_media_query() - { - Media_Query* media_query = new (ctx.mem) Media_Query(path, source_position); - - if (lex< exactly< not_kwd > >()) media_query->is_negated(true); - else if (lex< exactly< only_kwd > >()) media_query->is_restricted(true); - - if (peek< identifier_schema >()) media_query->media_type(parse_identifier_schema()); - else if (lex< identifier >()) media_query->media_type(new (ctx.mem) String_Constant(path, source_position, lexed)); - else (*media_query) << parse_media_expression(); - - while (lex< exactly< and_kwd > >()) (*media_query) << parse_media_expression(); - - return media_query; - } - - Media_Query_Expression* Parser::parse_media_expression() - { - if (peek< identifier_schema >()) { - String* ss = parse_identifier_schema(); - return new (ctx.mem) Media_Query_Expression(path, source_position, ss, 0, true); - } - if (!lex< exactly<'('> >()) { - error("media query expression must begin with '('"); - } - Expression* feature = 0; - if (peek< exactly<')'> >()) { - error("media feature required in media query expression"); - } - feature = parse_expression(); - Expression* expression = 0; - if (lex< exactly<':'> >()) { - expression = parse_list(); - } - if (!lex< exactly<')'> >()) { - error("unclosed parenthesis in media query expression"); - } - return new (ctx.mem) Media_Query_Expression(path, feature->position(), feature, expression); - } - - At_Rule* Parser::parse_at_rule() - { - lex<at_keyword>(); - string kwd(lexed); - Position at_source_position = source_position; - Selector* sel = 0; - Selector_Lookahead lookahead = lookahead_for_extension_target(position); - if (lookahead.found) { - if (lookahead.has_interpolants) { - sel = parse_selector_schema(lookahead.found); - } - else { - sel = parse_selector_group(); - } - } - Block* body = 0; - if (peek< exactly<'{'> >()) body = parse_block(); - return new (ctx.mem) At_Rule(path, at_source_position, kwd, sel, body); - } - - Warning* Parser::parse_warning() - { - lex< warn >(); - return new (ctx.mem) Warning(path, source_position, parse_list()); - } - - Selector_Lookahead Parser::lookahead_for_selector(const char* start) - { - const char* p = start ? start : position; - const char* q; - bool saw_interpolant = false; - - while ((q = peek< identifier >(p)) || - (q = peek< type_selector >(p)) || - (q = peek< id_name >(p)) || - (q = peek< class_name >(p)) || - (q = peek< sequence< pseudo_prefix, identifier > >(p)) || - (q = peek< percentage >(p)) || - (q = peek< dimension >(p)) || - (q = peek< string_constant >(p)) || - (q = peek< exactly<'*'> >(p)) || - (q = peek< exactly<'('> >(p)) || - (q = peek< exactly<')'> >(p)) || - (q = peek< exactly<'['> >(p)) || - (q = peek< exactly<']'> >(p)) || - (q = peek< exactly<'+'> >(p)) || - (q = peek< exactly<'~'> >(p)) || - (q = peek< exactly<'>'> >(p)) || - (q = peek< exactly<','> >(p)) || - (q = peek< binomial >(p)) || - (q = peek< sequence< optional<sign>, - optional<digits>, - exactly<'n'> > >(p)) || - (q = peek< sequence< optional<sign>, - digits > >(p)) || - (q = peek< number >(p)) || - (q = peek< exactly<'&'> >(p)) || - (q = peek< exactly<'%'> >(p)) || - (q = peek< alternatives<exact_match, - class_match, - dash_match, - prefix_match, - suffix_match, - substring_match> >(p)) || - (q = peek< sequence< exactly<'.'>, interpolant > >(p)) || - (q = peek< sequence< exactly<'#'>, interpolant > >(p)) || - (q = peek< sequence< exactly<'-'>, interpolant > >(p)) || - (q = peek< sequence< pseudo_prefix, interpolant > >(p)) || - (q = peek< interpolant >(p))) { - p = q; - if (*(p - 1) == '}') saw_interpolant = true; - } - - Selector_Lookahead result; - result.found = peek< exactly<'{'> >(p) ? p : 0; - result.has_interpolants = saw_interpolant; - - return result; - } - - Selector_Lookahead Parser::lookahead_for_extension_target(const char* start) - { - const char* p = start ? start : position; - const char* q; - bool saw_interpolant = false; - bool saw_stuff = false; - - while ((q = peek< identifier >(p)) || - (q = peek< type_selector >(p)) || - (q = peek< id_name >(p)) || - (q = peek< class_name >(p)) || - (q = peek< sequence< pseudo_prefix, identifier > >(p)) || - (q = peek< percentage >(p)) || - (q = peek< dimension >(p)) || - (q = peek< string_constant >(p)) || - (q = peek< exactly<'*'> >(p)) || - (q = peek< exactly<'('> >(p)) || - (q = peek< exactly<')'> >(p)) || - (q = peek< exactly<'['> >(p)) || - (q = peek< exactly<']'> >(p)) || - (q = peek< exactly<'+'> >(p)) || - (q = peek< exactly<'~'> >(p)) || - (q = peek< exactly<'>'> >(p)) || - (q = peek< exactly<','> >(p)) || - (q = peek< binomial >(p)) || - (q = peek< sequence< optional<sign>, - optional<digits>, - exactly<'n'> > >(p)) || - (q = peek< sequence< optional<sign>, - digits > >(p)) || - (q = peek< number >(p)) || - (q = peek< exactly<'&'> >(p)) || - (q = peek< exactly<'%'> >(p)) || - (q = peek< alternatives<exact_match, - class_match, - dash_match, - prefix_match, - suffix_match, - substring_match> >(p)) || - (q = peek< sequence< exactly<'.'>, interpolant > >(p)) || - (q = peek< sequence< exactly<'#'>, interpolant > >(p)) || - (q = peek< sequence< exactly<'-'>, interpolant > >(p)) || - (q = peek< sequence< pseudo_prefix, interpolant > >(p)) || - (q = peek< interpolant >(p))) { - p = q; - if (*(p - 1) == '}') saw_interpolant = true; - saw_stuff = true; - } - - Selector_Lookahead result; - result.found = peek< alternatives< exactly<';'>, exactly<'}'>, exactly<'{'> > >(p) && saw_stuff ? p : 0; - result.has_interpolants = saw_interpolant; - - return result; - } - - void Parser::read_bom() - { - size_t skip = 0; - string encoding; - bool utf_8 = false; - switch ((unsigned char) source[0]) { - case 0xEF: - skip = check_bom_chars(source, end, utf_8_bom, 3); - encoding = "UTF-8"; - utf_8 = true; - break; - case 0xFE: - skip = check_bom_chars(source, end, utf_16_bom_be, 2); - encoding = "UTF-16 (big endian)"; - break; - case 0xFF: - skip = check_bom_chars(source, end, utf_16_bom_le, 2); - skip += (skip ? check_bom_chars(source, end, utf_32_bom_le, 4) : 0); - encoding = (skip == 2 ? "UTF-16 (little endian)" : "UTF-32 (little endian)"); - break; - case 0x00: - skip = check_bom_chars(source, end, utf_32_bom_be, 4); - encoding = "UTF-32 (big endian)"; - break; - case 0x2B: - skip = check_bom_chars(source, end, utf_7_bom_1, 4) - | check_bom_chars(source, end, utf_7_bom_2, 4) - | check_bom_chars(source, end, utf_7_bom_3, 4) - | check_bom_chars(source, end, utf_7_bom_4, 4) - | check_bom_chars(source, end, utf_7_bom_5, 5); - encoding = "UTF-7"; - break; - case 0xF7: - skip = check_bom_chars(source, end, utf_1_bom, 3); - encoding = "UTF-1"; - break; - case 0xDD: - skip = check_bom_chars(source, end, utf_ebcdic_bom, 4); - encoding = "UTF-EBCDIC"; - break; - case 0x0E: - skip = check_bom_chars(source, end, scsu_bom, 3); - encoding = "SCSU"; - break; - case 0xFB: - skip = check_bom_chars(source, end, bocu_1_bom, 3); - encoding = "BOCU-1"; - break; - case 0x84: - skip = check_bom_chars(source, end, gb_18030_bom, 4); - encoding = "GB-18030"; - break; - } - if (skip > 0 && !utf_8) error("only UTF-8 documents are currently supported; your document appears to be " + encoding); - position += skip; - } - - size_t check_bom_chars(const char* src, const char *end, const unsigned char* bom, size_t len) - { - size_t skip = 0; - if (src + len > end) return 0; - for (size_t i = 0; i < len; ++i, ++skip) { - if ((unsigned char) src[i] != bom[i]) return 0; - } - return skip; - } - - - Expression* Parser::fold_operands(Expression* base, vector<Expression*>& operands, Binary_Expression::Type op) - { - for (size_t i = 0, S = operands.size(); i < S; ++i) { - base = new (ctx.mem) Binary_Expression(path, source_position, op, base, operands[i]); - Binary_Expression* b = static_cast<Binary_Expression*>(base); - if (op == Binary_Expression::DIV && b->left()->is_delayed() && b->right()->is_delayed()) { - base->is_delayed(true); - } - else { - b->left()->is_delayed(false); - b->right()->is_delayed(false); - } - } - return base; - } - - Expression* Parser::fold_operands(Expression* base, vector<Expression*>& operands, vector<Binary_Expression::Type>& ops) - { - for (size_t i = 0, S = operands.size(); i < S; ++i) { - base = new (ctx.mem) Binary_Expression(path, base->position(), ops[i], base, operands[i]); - Binary_Expression* b = static_cast<Binary_Expression*>(base); - if (ops[i] == Binary_Expression::DIV && b->left()->is_delayed() && b->right()->is_delayed()) { - base->is_delayed(true); - } - else { - b->left()->is_delayed(false); - b->right()->is_delayed(false); - } - } - return base; - } - - void Parser::error(string msg, Position pos) - { - throw Error(Error::syntax, path, pos.line ? pos : source_position, msg); - } - -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/parser.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/parser.hpp deleted file mode 100644 index e7201542..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/parser.hpp +++ /dev/null @@ -1,239 +0,0 @@ -#define SASS_PARSER - -#include <vector> -#include <map> - -#ifndef SASS_PRELEXER -#include "prelexer.hpp" -#endif - -#ifndef SASS_TOKEN -#include "token.hpp" -#endif - -#ifndef SASS_CONTEXT -#include "context.hpp" -#endif - -#ifndef SASS_AST -#include "ast.hpp" -#endif - -#ifndef SASS_POSITION -#include "position.hpp" -#endif - -#include <iostream> - -struct Selector_Lookahead { - const char* found; - bool has_interpolants; -}; - -namespace Sass { - using std::string; - using std::vector; - using std::map; - using namespace Prelexer; - - class Parser { - public: - class AST_Node; - - enum Syntactic_Context { nothing, mixin_def, function_def }; - - Context& ctx; - vector<Syntactic_Context> stack; - const char* source; - const char* position; - const char* end; - string path; - size_t column; - Position source_position; - - - Token lexed; - - Parser(Context& ctx, string path, Position source_position) - : ctx(ctx), stack(vector<Syntactic_Context>()), - source(0), position(0), end(0), path(path), column(1), source_position(source_position) - { stack.push_back(nothing); } - - static Parser from_string(string src, Context& ctx, string path = "", Position source_position = Position()); - static Parser from_c_str(const char* src, Context& ctx, string path = "", Position source_position = Position()); - static Parser from_token(Token t, Context& ctx, string path = "", Position source_position = Position()); - -#ifdef __clang__ - - // lex and peak uses the template parameter to branch on the action, which - // triggers clangs tautological comparison on the single-comparison - // branches. This is not a bug, just a merging of behaviour into - // one function - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wtautological-compare" - -#endif - - template <prelexer mx> - const char* peek(const char* start = 0) - { - if (!start) start = position; - const char* after_whitespace; - if (mx == block_comment) { - after_whitespace = // start; - zero_plus< alternatives<spaces, line_comment> >(start); - } - else if (/*mx == ancestor_of ||*/ mx == no_spaces) { - after_whitespace = position; - } - else if (mx == spaces || mx == ancestor_of) { - after_whitespace = mx(start); - if (after_whitespace) { - return after_whitespace; - } - else { - return 0; - } - } - else if (mx == optional_spaces) { - after_whitespace = optional_spaces(start); - } - else { - after_whitespace = spaces_and_comments(start); - } - const char* after_token = mx(after_whitespace); - if (after_token) { - return after_token; - } - else { - return 0; - } - } - - template <prelexer mx> - const char* lex() - { - const char* after_whitespace; - if (mx == block_comment) { - after_whitespace = // position; - zero_plus< alternatives<spaces, line_comment> >(position); - } - else if (mx == ancestor_of || mx == no_spaces) { - after_whitespace = position; - } - else if (mx == spaces) { - after_whitespace = spaces(position); - if (after_whitespace) { - source_position.line += count_interval<'\n'>(position, after_whitespace); - lexed = Token(position, after_whitespace); - return position = after_whitespace; - } - else { - return 0; - } - } - else if (mx == optional_spaces) { - after_whitespace = optional_spaces(position); - } - else { - after_whitespace = spaces_and_comments(position); - } - const char* after_token = mx(after_whitespace); - if (after_token) { - size_t previous_line = source_position.line; - source_position.line += count_interval<'\n'>(position, after_token); - - size_t whitespace = 0; - const char* ptr = after_whitespace - 1; - while (ptr >= position) { - if (*ptr == '\n') - break; - whitespace++; - ptr--; - } - if (previous_line != source_position.line) { - column = 1; - } - - source_position.column = column + whitespace; - column += after_token - after_whitespace + whitespace; - lexed = Token(after_whitespace, after_token); - - return position = after_token; - } - else { - return 0; - } - } - -#ifdef __clang__ - -#pragma clang diagnostic pop - -#endif - - void error(string msg, Position pos = Position()); - void read_bom(); - - Block* parse(); - Import* parse_import(); - Definition* parse_definition(); - Parameters* parse_parameters(); - Parameter* parse_parameter(); - Mixin_Call* parse_mixin_call(); - Arguments* parse_arguments(); - Argument* parse_argument(); - Assignment* parse_assignment(); - Propset* parse_propset(); - Ruleset* parse_ruleset(Selector_Lookahead lookahead); - Selector_Schema* parse_selector_schema(const char* end_of_selector); - Selector_List* parse_selector_group(); - Complex_Selector* parse_selector_combination(); - Compound_Selector* parse_simple_selector_sequence(); - Simple_Selector* parse_simple_selector(); - Negated_Selector* parse_negated_selector(); - Pseudo_Selector* parse_pseudo_selector(); - Attribute_Selector* parse_attribute_selector(); - Block* parse_block(); - Declaration* parse_declaration(); - Expression* parse_list(); - Expression* parse_comma_list(); - Expression* parse_space_list(); - Expression* parse_disjunction(); - Expression* parse_conjunction(); - Expression* parse_relation(); - Expression* parse_expression(); - Expression* parse_term(); - Expression* parse_factor(); - Expression* parse_value(); - Function_Call* parse_function_call(); - Function_Call_Schema* parse_function_call_schema(); - String* parse_string(); - String* parse_ie_stuff(); - String_Schema* parse_value_schema(); - String* parse_identifier_schema(); - String_Schema* parse_url_schema(); - If* parse_if_directive(bool else_if = false); - For* parse_for_directive(); - Each* parse_each_directive(); - While* parse_while_directive(); - Media_Block* parse_media_block(); - List* parse_media_queries(); - Media_Query* parse_media_query(); - Media_Query_Expression* parse_media_expression(); - At_Rule* parse_at_rule(); - Warning* parse_warning(); - - Selector_Lookahead lookahead_for_selector(const char* start = 0); - Selector_Lookahead lookahead_for_extension_target(const char* start = 0); - - Expression* fold_operands(Expression* base, vector<Expression*>& operands, Binary_Expression::Type op); - Expression* fold_operands(Expression* base, vector<Expression*>& operands, vector<Binary_Expression::Type>& ops); - - void throw_syntax_error(string message, size_t ln = 0); - void throw_read_error(string message, size_t ln = 0); - }; - - size_t check_bom_chars(const char* src, const char *end, const unsigned char* bom, size_t len); -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/position.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/position.hpp deleted file mode 100644 index a9086b33..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/position.hpp +++ /dev/null @@ -1,22 +0,0 @@ -#define SASS_POSITION - -#include <cstdlib> - -namespace Sass { - - struct Position { - size_t file; - size_t line; - size_t column; - - Position() - : file(0), line(0), column(0) { } - - Position(const size_t file, const size_t line, const size_t column) - : file(file), line(line), column(column) { } - - Position(const size_t line, const size_t column) - : file(0), line(line), column(column) { } - }; - -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/prelexer.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/prelexer.cpp deleted file mode 100644 index 075bb374..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/prelexer.cpp +++ /dev/null @@ -1,479 +0,0 @@ -#include <cctype> -#include <iostream> -#include "constants.hpp" -#include "prelexer.hpp" - - -namespace Sass { - using namespace Constants; - - namespace Prelexer { - using std::cerr; using std::endl; - // Matches zero characters (always succeeds without consuming input). - const char* epsilon(char *src) { - return src; - } - // Matches the empty string. - const char* empty(char *src) { - return *src ? 0 : src; - } - - // Match any single character. - const char* any_char(const char* src) { return *src ? src+1 : src; } - - // Match a single character satisfying the ctype predicates. - const char* space(const char* src) { return std::isspace(*src) ? src+1 : 0; } - const char* alpha(const char* src) { return std::isalpha(*src) ? src+1 : 0; } - const char* digit(const char* src) { return std::isdigit(*src) ? src+1 : 0; } - const char* xdigit(const char* src) { return std::isxdigit(*src) ? src+1 : 0; } - const char* alnum(const char* src) { return std::isalnum(*src) ? src+1 : 0; } - const char* punct(const char* src) { return std::ispunct(*src) ? src+1 : 0; } - // Match multiple ctype characters. - const char* spaces(const char* src) { return one_plus<space>(src); } - const char* alphas(const char* src) { return one_plus<alpha>(src); } - const char* digits(const char* src) { return one_plus<digit>(src); } - const char* xdigits(const char* src) { return one_plus<xdigit>(src); } - const char* alnums(const char* src) { return one_plus<alnum>(src); } - const char* puncts(const char* src) { return one_plus<punct>(src); } - - // Match a line comment. - - const char* line_comment(const char* src) { return to_endl<slash_slash>(src); } - // Match a block comment. - - - const char* block_comment(const char* src) { - return sequence< optional_spaces, delimited_by<slash_star, star_slash, false> >(src); - } - // Match either comment. - const char* comment(const char* src) { - return alternatives<block_comment, line_comment>(src); - } - // Match double- and single-quoted strings. - const char* double_quoted_string(const char* src) { - return delimited_by<'"', '"', true>(src); - } - const char* single_quoted_string(const char* src) { - return delimited_by<'\'', '\'', true>(src); - } - const char* string_constant(const char* src) { - return alternatives<double_quoted_string, single_quoted_string>(src); - } - // Match interpolants. - - - const char* interpolant(const char* src) { - return delimited_by<hash_lbrace, rbrace, false>(src); - } - - // Whitespace handling. - const char* optional_spaces(const char* src) { return optional<spaces>(src); } - const char* optional_comment(const char* src) { return optional<comment>(src); } - const char* spaces_and_comments(const char* src) { - return zero_plus< alternatives<spaces, comment> >(src); - } - const char* no_spaces(const char* src) { - return negate< spaces >(src); - } - - const char* backslash_something(const char* src) { - return sequence< exactly<'\\'>, any_char >(src); - } - - // Match CSS identifiers. - const char* identifier(const char* src) { - return sequence< optional< exactly<'-'> >, - alternatives< alpha, exactly<'_'>, backslash_something >, - zero_plus< alternatives< alnum, - exactly<'-'>, - exactly<'_'>, - backslash_something > > >(src); - } - - // Match CSS selectors. - const char* sel_ident(const char* src) { - return sequence< optional< alternatives< exactly<'-'>, exactly<'|'> > >, - alternatives< alpha, exactly<'_'>, backslash_something, exactly<'|'> >, - zero_plus< alternatives< alnum, - exactly<'-'>, - exactly<'_'>, - exactly<'|'>, - backslash_something > > >(src); - } - - // Match interpolant schemas - const char* identifier_schema(const char* src) { - // follows this pattern: (x*ix*)+ ... well, not quite - return one_plus< sequence< zero_plus< alternatives< identifier, exactly<'-'> > >, - interpolant, - zero_plus< alternatives< identifier, number, exactly<'-'> > > > >(src); - } - const char* value_schema(const char* src) { - // follows this pattern: ([xyz]*i[xyz]*)+ - return one_plus< sequence< zero_plus< alternatives< identifier, percentage, dimension, hex, number, string_constant > >, - interpolant, - zero_plus< alternatives< identifier, percentage, dimension, hex, number, string_constant > > > >(src); - } - const char* filename_schema(const char* src) { - return one_plus< sequence< zero_plus< alternatives< identifier, number, exactly<'.'>, exactly<'/'> > >, - interpolant, - zero_plus< alternatives< identifier, number, exactly<'.'>, exactly<'/'> > > > >(src); - } - - const char* filename(const char* src) { - return one_plus< alternatives< identifier, number, exactly<'.'> > >(src); - } - - // Match CSS '@' keywords. - const char* at_keyword(const char* src) { - return sequence<exactly<'@'>, identifier>(src); - } - - const char* import(const char* src) { - return exactly<import_kwd>(src); - } - - const char* media(const char* src) { - return exactly<media_kwd>(src); - } - - const char* keyframes(const char* src) { - return sequence< exactly<'@'>, optional< vendor_prefix >, exactly< keyframes_kwd > >(src); - } - - const char* vendor_prefix(const char* src) { - return alternatives< exactly< vendor_opera_kwd >, exactly< vendor_webkit_kwd >, exactly< vendor_mozilla_kwd >, exactly< vendor_ms_kwd >, exactly< vendor_khtml_kwd > >(src); - } - - const char* keyf(const char* src) { - return one_plus< alternatives< to, from, percentage > >(src); - } - - const char* mixin(const char* src) { - return exactly<mixin_kwd>(src); - } - - const char* function(const char* src) { - return exactly<function_kwd>(src); - } - - const char* return_directive(const char* src) { - return exactly<return_kwd>(src); - } - - const char* include(const char* src) { - return exactly<include_kwd>(src); - } - - const char* content(const char* src) { - return exactly<content_kwd>(src); - } - - const char* extend(const char* src) { - return exactly<extend_kwd>(src); - } - - - const char* if_directive(const char* src) { - return exactly<if_kwd>(src); - } - - const char* else_directive(const char* src) { - return exactly<else_kwd>(src); - } - const char* elseif_directive(const char* src) { - return sequence< else_directive, - spaces_and_comments, - exactly< if_after_else_kwd > >(src); - } - - const char* for_directive(const char* src) { - return exactly<for_kwd>(src); - } - - const char* from(const char* src) { - return exactly<from_kwd>(src); - } - - const char* to(const char* src) { - return exactly<to_kwd>(src); - } - - const char* through(const char* src) { - return exactly<through_kwd>(src); - } - - const char* each_directive(const char* src) { - return exactly<each_kwd>(src); - } - - const char* in(const char* src) { - return exactly<in_kwd>(src); - } - - const char* while_directive(const char* src) { - return exactly<while_kwd>(src); - } - - const char* name(const char* src) { - return one_plus< alternatives< alnum, - exactly<'-'>, - exactly<'_'> > >(src); - } - - const char* warn(const char* src) { - return exactly<warn_kwd>(src); - } - - const char* directive(const char* src) { - return sequence< exactly<'@'>, identifier >(src); - } - - const char* null(const char* src) { - return exactly<null_kwd>(src); - } - - // Match CSS type selectors - const char* namespace_prefix(const char* src) { - return sequence< optional< alternatives< identifier, exactly<'*'> > >, - exactly<'|'> >(src); - } - const char* type_selector(const char* src) { - return sequence< optional<namespace_prefix>, identifier>(src); - } - const char* universal(const char* src) { - return sequence< optional<namespace_prefix>, exactly<'*'> >(src); - } - // Match CSS id names. - const char* id_name(const char* src) { - return sequence<exactly<'#'>, name>(src); - } - // Match CSS class names. - const char* class_name(const char* src) { - return sequence<exactly<'.'>, identifier>(src); - } - // match placeholder selectors - const char* placeholder(const char* src) { - return sequence<exactly<'%'>, identifier>(src); - } - // Match CSS numeric constants. - - const char* sign(const char* src) { - return class_char<sign_chars>(src); - } - const char* unsigned_number(const char* src) { - return alternatives<sequence< zero_plus<digits>, - exactly<'.'>, - one_plus<digits> >, - digits>(src); - } - const char* number(const char* src) { - return sequence< optional<sign>, unsigned_number>(src); - } - const char* coefficient(const char* src) { - return alternatives< sequence< optional<sign>, digits >, - sign >(src); - } - const char* binomial(const char* src) { - return sequence< optional<sign>, - optional<digits>, - exactly<'n'>, optional_spaces, - sign, optional_spaces, - digits >(src); - } - const char* percentage(const char* src) { - return sequence< number, exactly<'%'> >(src); - } - - const char* em(const char* src) { - return sequence< number, exactly<em_kwd> >(src); - } - const char* dimension(const char* src) { - return sequence<number, identifier>(src); - } - const char* hex(const char* src) { - const char* p = sequence< exactly<'#'>, one_plus<xdigit> >(src); - int len = p - src; - return (len != 4 && len != 7) ? 0 : p; - } - - const char* rgb_prefix(const char* src) { - return exactly<rgb_kwd>(src); - } - // Match CSS uri specifiers. - - const char* uri_prefix(const char* src) { - return exactly<url_kwd>(src); - } - // TODO: rename the following two functions - const char* uri(const char* src) { - return sequence< exactly<url_kwd>, - optional<spaces>, - string_constant, - optional<spaces>, - exactly<')'> >(src); - } - const char* url_value(const char* src) { - return sequence< optional< sequence< identifier, exactly<':'> > >, // optional protocol - one_plus< sequence< zero_plus< exactly<'/'> >, filename > >, // one or more folders and/or trailing filename - optional< exactly<'/'> > >(src); - } - const char* url_schema(const char* src) { - return sequence< optional< sequence< identifier, exactly<':'> > >, // optional protocol - filename_schema >(src); // optional trailing slash - } - // Match CSS "!important" keyword. - const char* important(const char* src) { - return sequence< exactly<'!'>, - spaces_and_comments, - exactly<important_kwd> >(src); - } - // Match Sass "!default" keyword. - const char* default_flag(const char* src) { - return sequence< exactly<'!'>, - spaces_and_comments, - exactly<default_kwd> >(src); - } - // Match CSS pseudo-class/element prefixes. - const char* pseudo_prefix(const char* src) { - return sequence< exactly<':'>, optional< exactly<':'> > >(src); - } - // Match CSS function call openers. - const char* functional_schema(const char* src) { - return sequence< identifier_schema, exactly<'('> >(src); - } - const char* functional(const char* src) { - return sequence< identifier, exactly<'('> >(src); - } - // Match the CSS negation pseudo-class. - const char* pseudo_not(const char* src) { - return exactly< pseudo_not_kwd >(src); - } - // Match CSS 'odd' and 'even' keywords for functional pseudo-classes. - const char* even(const char* src) { - return exactly<even_kwd>(src); - } - const char* odd(const char* src) { - return exactly<odd_kwd>(src); - } - // Match CSS attribute-matching operators. - const char* exact_match(const char* src) { return exactly<'='>(src); } - const char* class_match(const char* src) { return exactly<tilde_equal>(src); } - const char* dash_match(const char* src) { return exactly<pipe_equal>(src); } - const char* prefix_match(const char* src) { return exactly<caret_equal>(src); } - const char* suffix_match(const char* src) { return exactly<dollar_equal>(src); } - const char* substring_match(const char* src) { return exactly<star_equal>(src); } - // Match CSS combinators. - const char* adjacent_to(const char* src) { - return sequence< optional_spaces, exactly<'+'> >(src); - } - const char* precedes(const char* src) { - return sequence< optional_spaces, exactly<'~'> >(src); - } - const char* parent_of(const char* src) { - return sequence< optional_spaces, exactly<'>'> >(src); - } - const char* ancestor_of(const char* src) { - return sequence< spaces, negate< exactly<'{'> > >(src); - } - - // Match SCSS variable names. - const char* variable(const char* src) { - return sequence<exactly<'$'>, name>(src); - } - - // Match Sass boolean keywords. - const char* true_val(const char* src) { - return exactly<true_kwd>(src); - } - const char* false_val(const char* src) { - return exactly<false_kwd>(src); - } - const char* and_op(const char* src) { - return exactly<and_kwd>(src); - } - const char* or_op(const char* src) { - return exactly<or_kwd>(src); - } - const char* not_op(const char* src) { - return exactly<not_kwd>(src); - } - const char* eq_op(const char* src) { - return exactly<eq>(src); - } - const char* neq_op(const char* src) { - return exactly<neq>(src); - } - const char* gt_op(const char* src) { - return exactly<gt>(src); - } - const char* gte_op(const char* src) { - return exactly<gte>(src); - } - const char* lt_op(const char* src) { - return exactly<lt>(src); - } - const char* lte_op(const char* src) { - return exactly<lte>(src); - } - - // match the IE syntax - const char* progid(const char* src) { - return exactly<progid_kwd>(src); - } - - const char* ie_stuff(const char* src) { - return sequence< progid, exactly<':'>, alternatives< identifier_schema, identifier >, one_plus< sequence< exactly<'.'>, alternatives< identifier_schema, identifier > > >, delimited_by<'(', ';', true> >(src); - } - - // const char* ie_args(const char* src) { - // return sequence< alternatives< ie_keyword_arg, value_schema, string_constant, interpolant, number, identifier, delimited_by< '(', ')', true> >, - // zero_plus< sequence< spaces_and_comments, exactly<','>, spaces_and_comments, alternatives< ie_keyword_arg, value_schema, string_constant, interpolant, number, identifier, delimited_by<'(', ')', true> > > > >(src); - // } - - const char* ie_keyword_arg(const char* src) { - return sequence< alternatives< variable, identifier_schema, identifier >, spaces_and_comments, exactly<'='>, spaces_and_comments, alternatives< variable, identifier_schema, identifier, number > >(src); - } - - // Path matching functions. - const char* folder(const char* src) { - return sequence< zero_plus< any_char_except<'/'> >, - exactly<'/'> >(src); - } - const char* folders(const char* src) { - return zero_plus< folder >(src); - } - - const char* chunk(const char* src) { - char inside_str = 0; - const char* p = src; - size_t depth = 0; - while (true) { - if (!*p) { - return 0; - } - else if (!inside_str && (*p == '"' || *p == '\'')) { - inside_str = *p; - } - else if (*p == inside_str && *(p-1) != '\\') { - inside_str = 0; - } - else if (*p == '(' && !inside_str) { - ++depth; - } - else if (*p == ')' && !inside_str) { - if (depth == 0) return p; - else --depth; - } - ++p; - } - // unreachable - return 0; - } - - // const char* balanced_parens(const char* src) { - // size_t depth = 0; - // while (*src - // } - } -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/prelexer.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/prelexer.hpp deleted file mode 100644 index b8b6d471..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/prelexer.hpp +++ /dev/null @@ -1,472 +0,0 @@ -#define SASS_PRELEXER - -namespace Sass { - namespace Prelexer { - - typedef int (*ctype_predicate)(int); - typedef const char* (*prelexer)(const char*); - - // Match a single character literal. - template <char pre> - const char* exactly(const char* src) { - return *src == pre ? src + 1 : 0; - } - - // Match a string constant. - template <const char* prefix> - const char* exactly(const char* src) { - const char* pre = prefix; - while (*pre && *src == *pre) ++src, ++pre; - return *pre ? 0 : src; - } - - // Match a single character that satifies the supplied ctype predicate. - template <ctype_predicate pred> - const char* class_char(const char* src) { - return pred(*src) ? src + 1 : 0; - } - - // Match a single character that is a member of the supplied class. - template <const char* char_class> - const char* class_char(const char* src) { - const char* cc = char_class; - while (*cc && *src != *cc) ++cc; - return *cc ? src + 1 : 0; - } - - // Match a sequence of characters that all satisfy the supplied ctype predicate. - template <ctype_predicate pred> - const char* class_chars(const char* src) { - const char* p = src; - while (pred(*p)) ++p; - return p == src ? 0 : p; - } - - // Match a sequence of characters that are all members of the supplied class. - template <const char* char_class> - const char* class_chars(const char* src) { - const char* p = src; - while (class_char<char_class>(p)) ++p; - return p == src ? 0 : p; - } - - // Match a sequence of characters up to the next newline. - template <const char* prefix> - const char* to_endl(const char* src) { - if (!(src = exactly<prefix>(src))) return 0; - while (*src && *src != '\n') ++src; - return src; - } - - // Match a sequence of characters delimited by the supplied chars. - template <char beg, char end, bool esc> - const char* delimited_by(const char* src) { - src = exactly<beg>(src); - if (!src) return 0; - const char* stop; - while (1) { - if (!*src) return 0; - stop = exactly<end>(src); - if (stop && (!esc || *(src - 1) != '\\')) return stop; - src = stop ? stop : src + 1; - } - } - - // Match a sequence of characters delimited by the supplied strings. - template <const char* beg, const char* end, bool esc> - const char* delimited_by(const char* src) { - src = exactly<beg>(src); - if (!src) return 0; - const char* stop; - while (1) { - if (!*src) return 0; - stop = exactly<end>(src); - if (stop && (!esc || *(src - 1) != '\\')) return stop; - src = stop ? stop : src + 1; - } - } - - // Match any single character. - const char* any_char(const char* src); - // Match any single character except the supplied one. - template <char c> - const char* any_char_except(const char* src) { - return (*src && *src != c) ? src+1 : 0; - } - - // Matches zero characters (always succeeds without consuming input). - const char* epsilon(const char*); - - // Matches the empty string. - const char* empty(const char*); - - // Succeeds of the supplied matcher fails, and vice versa. - template <prelexer mx> - const char* negate(const char* src) { - return mx(src) ? 0 : src; - } - - // Tries the matchers in sequence and returns the first match (or none) - template <prelexer mx1, prelexer mx2> - const char* alternatives(const char* src) { - const char* rslt; - (rslt = mx1(src)) || (rslt = mx2(src)); - return rslt; - } - - // Same as above, but with 3 arguments. - template <prelexer mx1, prelexer mx2, prelexer mx3> - const char* alternatives(const char* src) { - const char* rslt; - (rslt = mx1(src)) || (rslt = mx2(src)) || (rslt = mx3(src)); - return rslt; - } - - // Same as above, but with 4 arguments. - template <prelexer mx1, prelexer mx2, prelexer mx3, prelexer mx4> - const char* alternatives(const char* src) { - const char* rslt; - (rslt = mx1(src)) || (rslt = mx2(src)) || - (rslt = mx3(src)) || (rslt = mx4(src)); - return rslt; - } - - // Same as above, but with 5 arguments. - template <prelexer mx1, prelexer mx2, prelexer mx3, - prelexer mx4, prelexer mx5> - const char* alternatives(const char* src) { - const char* rslt; - (rslt = mx1(src)) || (rslt = mx2(src)) || (rslt = mx3(src)) || - (rslt = mx4(src)) || (rslt = mx5(src)); - return rslt; - } - - // Same as above, but with 6 arguments. - template <prelexer mx1, prelexer mx2, prelexer mx3, - prelexer mx4, prelexer mx5, prelexer mx6> - const char* alternatives(const char* src) { - const char* rslt; - (rslt = mx1(src)) || (rslt = mx2(src)) || (rslt = mx3(src)) || - (rslt = mx4(src)) || (rslt = mx5(src)) || (rslt = mx6(src)); - return rslt; - } - - // Same as above, but with 7 arguments. - template <prelexer mx1, prelexer mx2, - prelexer mx3, prelexer mx4, - prelexer mx5, prelexer mx6, - prelexer mx7> - const char* alternatives(const char* src) { - const char* rslt = src; - (rslt = mx1(rslt)) || (rslt = mx2(rslt)) || - (rslt = mx3(rslt)) || (rslt = mx4(rslt)) || - (rslt = mx5(rslt)) || (rslt = mx6(rslt)) || - (rslt = mx7(rslt)); - return rslt; - } - - // Same as above, but with 8 arguments. - template <prelexer mx1, prelexer mx2, - prelexer mx3, prelexer mx4, - prelexer mx5, prelexer mx6, - prelexer mx7, prelexer mx8> - const char* alternatives(const char* src) { - const char* rslt = src; - (rslt = mx1(rslt)) || (rslt = mx2(rslt)) || - (rslt = mx3(rslt)) || (rslt = mx4(rslt)) || - (rslt = mx5(rslt)) || (rslt = mx6(rslt)) || - (rslt = mx7(rslt)) || (rslt = mx8(rslt)); - return rslt; - } - - // Tries the matchers in sequence and succeeds if they all succeed. - template <prelexer mx1, prelexer mx2> - const char* sequence(const char* src) { - const char* rslt = src; - (rslt = mx1(rslt)) && (rslt = mx2(rslt)); - return rslt; - } - - // Same as above, but with 3 arguments. - template <prelexer mx1, prelexer mx2, prelexer mx3> - const char* sequence(const char* src) { - const char* rslt = src; - (rslt = mx1(rslt)) && (rslt = mx2(rslt)) && (rslt = mx3(rslt)); - return rslt; - } - - // Same as above, but with 4 arguments. - template <prelexer mx1, prelexer mx2, prelexer mx3, prelexer mx4> - const char* sequence(const char* src) { - const char* rslt = src; - (rslt = mx1(rslt)) && (rslt = mx2(rslt)) && - (rslt = mx3(rslt)) && (rslt = mx4(rslt)); - return rslt; - } - - // Same as above, but with 5 arguments. - template <prelexer mx1, prelexer mx2, - prelexer mx3, prelexer mx4, - prelexer mx5> - const char* sequence(const char* src) { - const char* rslt = src; - (rslt = mx1(rslt)) && (rslt = mx2(rslt)) && - (rslt = mx3(rslt)) && (rslt = mx4(rslt)) && - (rslt = mx5(rslt)); - return rslt; - } - - // Same as above, but with 6 arguments. - template <prelexer mx1, prelexer mx2, - prelexer mx3, prelexer mx4, - prelexer mx5, prelexer mx6> - const char* sequence(const char* src) { - const char* rslt = src; - (rslt = mx1(rslt)) && (rslt = mx2(rslt)) && - (rslt = mx3(rslt)) && (rslt = mx4(rslt)) && - (rslt = mx5(rslt)) && (rslt = mx6(rslt)); - return rslt; - } - - // Same as above, but with 7 arguments. - template <prelexer mx1, prelexer mx2, - prelexer mx3, prelexer mx4, - prelexer mx5, prelexer mx6, - prelexer mx7> - const char* sequence(const char* src) { - const char* rslt = src; - (rslt = mx1(rslt)) && (rslt = mx2(rslt)) && - (rslt = mx3(rslt)) && (rslt = mx4(rslt)) && - (rslt = mx5(rslt)) && (rslt = mx6(rslt)) && - (rslt = mx7(rslt)); - return rslt; - } - - // Match a pattern or not. Always succeeds. - template <prelexer mx> - const char* optional(const char* src) { - const char* p = mx(src); - return p ? p : src; - } - - // Match zero or more of the supplied pattern - template <prelexer mx> - const char* zero_plus(const char* src) { - const char* p = mx(src); - while (p) src = p, p = mx(src); - return src; - } - - // Match one or more of the supplied pattern - template <prelexer mx> - const char* one_plus(const char* src) { - const char* p = mx(src); - if (!p) return 0; - while (p) src = p, p = mx(src); - return src; - } - - // Match a single character satisfying the ctype predicates. - const char* space(const char* src); - const char* alpha(const char* src); - const char* digit(const char* src); - const char* xdigit(const char* src); - const char* alnum(const char* src); - const char* punct(const char* src); - // Match multiple ctype characters. - const char* spaces(const char* src); - const char* alphas(const char* src); - const char* digits(const char* src); - const char* xdigits(const char* src); - const char* alnums(const char* src); - const char* puncts(const char* src); - - // Match a line comment. - const char* line_comment(const char* src); - // Match a block comment. - const char* block_comment(const char* src); - // Match either. - const char* comment(const char* src); - // Match double- and single-quoted strings. - const char* double_quoted_string(const char* src); - const char* single_quoted_string(const char* src); - const char* string_constant(const char* src); - // Match interpolants. - const char* interpolant(const char* src); - - // Whitespace handling. - const char* optional_spaces(const char* src); - const char* optional_comment(const char* src); - const char* spaces_and_comments(const char* src); - const char* no_spaces(const char* src); - - const char* backslash_something(const char* src); - - // Match a CSS identifier. - const char* identifier(const char* src); - // Match selector names. - const char* sel_ident(const char* src); - // Match interpolant schemas - const char* identifier_schema(const char* src); - const char* value_schema(const char* src); - const char* filename(const char* src); - const char* filename_schema(const char* src); - const char* url_schema(const char* src); - const char* url_value(const char* src); - const char* vendor_prefix(const char* src); - // Match CSS '@' keywords. - const char* at_keyword(const char* src); - const char* import(const char* src); - const char* media(const char* src); - const char* keyframes(const char* src); - const char* keyf(const char* src); - const char* mixin(const char* src); - const char* function(const char* src); - const char* return_directive(const char* src); - const char* include(const char* src); - const char* content(const char* src); - const char* extend(const char* src); - - const char* if_directive(const char* src); - const char* else_directive(const char* src); - const char* elseif_directive(const char* src); - - const char* for_directive(const char* src); - const char* from(const char* src); - const char* to(const char* src); - const char* through(const char* src); - - const char* each_directive(const char* src); - const char* in(const char* src); - - const char* while_directive(const char* src); - - const char* warn(const char* src); - - const char* directive(const char* src); - const char* at_keyword(const char* src); - - const char* null(const char* src); - - // Match CSS type selectors - const char* namespace_prefix(const char* src); - const char* type_selector(const char* src); - const char* universal(const char* src); - // Match CSS id names. - const char* id_name(const char* src); - // Match CSS class names. - const char* class_name(const char* src); - // Match placeholder selectors. - const char* placeholder(const char* src); - // Match CSS numeric constants. - const char* sign(const char* src); - const char* unsigned_number(const char* src); - const char* number(const char* src); - const char* coefficient(const char* src); - const char* binomial(const char* src); - const char* percentage(const char* src); - const char* dimension(const char* src); - const char* hex(const char* src); - const char* rgb_prefix(const char* src); - // Match CSS uri specifiers. - const char* uri_prefix(const char* src); - const char* uri(const char* src); - const char* url(const char* src); - // Match CSS "!important" keyword. - const char* important(const char* src); - // Match Sass "!default" keyword. - const char* default_flag(const char* src); - // Match CSS pseudo-class/element prefixes - const char* pseudo_prefix(const char* src); - // Match CSS function call openers. - const char* functional(const char* src); - const char* functional_schema(const char* src); - const char* pseudo_not(const char* src); - // Match CSS 'odd' and 'even' keywords for functional pseudo-classes. - const char* even(const char* src); - const char* odd(const char* src); - // Match CSS attribute-matching operators. - const char* exact_match(const char* src); - const char* class_match(const char* src); - const char* dash_match(const char* src); - const char* prefix_match(const char* src); - const char* suffix_match(const char* src); - const char* substring_match(const char* src); - // Match CSS combinators. - const char* adjacent_to(const char* src); - const char* precedes(const char* src); - const char* parent_of(const char* src); - const char* ancestor_of(const char* src); - - // Match SCSS variable names. - const char* variable(const char* src); - - // Match Sass boolean keywords. - const char* true_val(const char* src); - const char* false_val(const char* src); - const char* and_op(const char* src); - const char* or_op(const char* src); - const char* not_op(const char* src); - const char* eq_op(const char* src); - const char* neq_op(const char* src); - const char* gt_op(const char* src); - const char* gte_op(const char* src); - const char* lt_op(const char* src); - const char* lte_op(const char* src); - - // IE stuff - const char* ie_stuff(const char* src); - const char* ie_args(const char* src); - const char* ie_keyword_arg(const char* src); - - // Path matching functions. - const char* folder(const char* src); - const char* folders(const char* src); - - // Utility functions for finding and counting characters in a string. - template<char c> - const char* find_first(const char* src) { - while (*src && *src != c) ++src; - return *src ? src : 0; - } - template<prelexer mx> - const char* find_first(const char* src) { - while (*src && !mx(src)) ++src; - return *src ? src : 0; - } - template<prelexer mx> - const char* find_first_in_interval(const char* beg, const char* end) { - while ((beg < end) && *beg) { - if (mx(beg)) return beg; - ++beg; - } - return 0; - } - template <char c> - unsigned int count_interval(const char* beg, const char* end) { - unsigned int counter = 0; - while (beg < end && *beg) { - if (*beg == c) ++counter; - ++beg; - } - return counter; - } - template <prelexer mx> - unsigned int count_interval(const char* beg, const char* end) { - unsigned int counter = 0; - while (beg < end && *beg) { - const char* p; - if ((p = mx(beg))) { - ++counter; - beg = p; - } - else { - ++beg; - } - } - return counter; - } - - const char* chunk(const char* src); - } -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/sass.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/sass.cpp deleted file mode 100644 index 2ff1377c..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/sass.cpp +++ /dev/null @@ -1,154 +0,0 @@ -#include <cstdlib> -#include <cstring> -#include <vector> -#include <sstream> - -#ifndef SASS -#include "sass.h" -#endif - -#include "context.hpp" - -#ifndef SASS_ERROR_HANDLING -#include "error_handling.hpp" -#endif - -extern "C" { - using namespace std; - - struct Sass_Context* make_sass_context() - { return (Sass_Context*) calloc(1, sizeof(Sass_Context)); } - - void free_sass_context(struct Sass_Context* ctx) - { - if (ctx->output_string) free(ctx->output_string); - if (ctx->error_message) free(ctx->error_message); - free(ctx); - } - - namespace Sass { - enum Sass_Source { FILE_SOURCE, STRING_SOURCE }; - - static void compile_sass(struct Sass_Context* c_ctx, - Sass::Sass_Source src_option) - { - using namespace Sass; - try { - Context cpp_ctx( - Context::Data().source_c_str (c_ctx->input_string) - - .entry_point (c_ctx->input_path ? - c_ctx->input_path : - "") - - .output_style ((Output_Style) - c_ctx->output_style) - - .source_comments (c_ctx->source_comments) - .source_maps (c_ctx->source_maps) - - .image_path (c_ctx->image_path ? - c_ctx->image_path : - "") - - .include_paths_c_str (c_ctx->include_paths_string) - .include_paths_array (/*c_ctx->include_paths_array*/0) - .include_paths (vector<string>()) - ); - if (src_option == FILE_SOURCE) cpp_ctx.compile_file(); - else cpp_ctx.compile_string(); - c_ctx->error_message = 0; - c_ctx->error_status = 0; - } - catch (Error& e) { - stringstream msg_stream; - msg_stream << e.path << ":" << e.position.line << ": error: " << e.message << endl; - string msg(msg_stream.str()); - char* msg_str = (char*) malloc(msg.size() + 1); - strcpy(msg_str, msg.c_str()); - c_ctx->error_status = 1; - c_ctx->output_string = 0; - c_ctx->error_message = msg_str; - } - catch (bad_alloc& ba) { - stringstream msg_stream; - msg_stream << "Unable to allocate memory: " << ba.what() << endl; - string msg(msg_stream.str()); - char* msg_str = (char*) malloc(msg.size() + 1); - strcpy(msg_str, msg.c_str()); - c_ctx->error_status = 1; - c_ctx->output_string = 0; - c_ctx->error_message = msg_str; - } - } - } - - void compile_sass_file(struct Sass_Context* c_ctx) - { Sass::compile_sass(c_ctx, Sass::FILE_SOURCE); } - - void compile_sass_string(struct Sass_Context* c_ctx) - { Sass::compile_sass(c_ctx, Sass::STRING_SOURCE); } - - - union Sass_Value make_sass_boolean(int val) - { - union Sass_Value v; - v.boolean.tag = SASS_BOOLEAN; - v.boolean.value = val; - return v; - } - - union Sass_Value make_sass_number(double val, const char* unit) - { - union Sass_Value v; - v.number.tag = SASS_NUMBER; - v.number.value = val; - v.number.unit = strdup(unit); - return v; - } - - union Sass_Value make_sass_color(double r, double g, double b, double a) - { - union Sass_Value v; - v.color.tag = SASS_COLOR; - v.color.r = r; - v.color.g = g; - v.color.b = b; - v.color.a = a; - return v; - } - - union Sass_Value make_sass_string(const char* val) - { - union Sass_Value v; - v.string.tag = SASS_STRING; - v.string.value = strdup(val); - return v; - } - - union Sass_Value make_sass_list(size_t len, enum Sass_Separator sep) - { - union Sass_Value v; - v.list.tag = SASS_LIST; - v.list.length = len; - v.list.separator = sep; - v.list.values = (union Sass_Value*) malloc(sizeof(union Sass_Value)*len); - return v; - } - - union Sass_Value make_sass_null() - { - union Sass_Value v; - v.null.tag = SASS_NULL; - return v; - } - - union Sass_Value make_sass_error(const char* msg) - { - union Sass_Value v; - v.error.tag = SASS_ERROR; - v.error.message = strdup(msg); - return v; - } - -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/sass.h b/node_modules/gulp-sass/node_modules/node-sass/libsass/sass.h deleted file mode 100644 index 74675f0c..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/sass.h +++ /dev/null @@ -1,130 +0,0 @@ -#define SASS - -#include <stddef.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#define SASS_OUTPUT_NESTED 0 -#define SASS_OUTPUT_EXPANDED 1 -#define SASS_OUTPUT_COMPACT 2 -#define SASS_OUTPUT_COMPRESSED 3 -#define SASS_OUTPUT_FORMATTED 4 - -struct Sass_Context { - const char* input_path; - const char* input_string; - char* output_string; - - int error_status; - char* error_message; - - int output_style; - int source_comments; - int source_maps; - const char* image_path; - const char* include_paths_string; - const char** include_paths_array; -}; - -struct Sass_Context* make_sass_context (); -void free_sass_context (struct Sass_Context*); -void compile_sass_file (struct Sass_Context*); -void compile_sass_string (struct Sass_Context*); - -// type tags for Sass values -enum Sass_Tag { - SASS_BOOLEAN, - SASS_NUMBER, - SASS_COLOR, - SASS_STRING, - SASS_LIST, - SASS_NULL, - SASS_ERROR -}; - -// tags for denoting Sass list separators -enum Sass_Separator { - SASS_COMMA, - SASS_SPACE -}; - -// Component structs for the Sass value union type. -// Not meant to be used directly. -struct Sass_Unknown { - enum Sass_Tag tag; -}; - -struct Sass_Boolean { - enum Sass_Tag tag; - int value; -}; - -struct Sass_Number { - enum Sass_Tag tag; - double value; - char* unit; -}; - -struct Sass_Color { - enum Sass_Tag tag; - double r; - double g; - double b; - double a; -}; - -struct Sass_String { - enum Sass_Tag tag; - char* value; -}; - -union Sass_Value; - -struct Sass_List { - enum Sass_Tag tag; - enum Sass_Separator separator; - size_t length; - union Sass_Value* values; -}; - -struct Sass_Null { - enum Sass_Tag tag; -}; - -struct Sass_Error { - enum Sass_Tag tag; - char* message; -}; - -// represention of Sass values in C -union Sass_Value { - struct Sass_Unknown unknown; - struct Sass_Boolean boolean; - struct Sass_Number number; - struct Sass_Color color; - struct Sass_String string; - struct Sass_List list; - struct Sass_Null null; - struct Sass_Error error; -}; - -union Sass_Value make_sass_boolean (int val); -union Sass_Value make_sass_number (double val, const char* unit); -union Sass_Value make_sass_color (double r, double g, double b, double a); -union Sass_Value make_sass_string (const char* val); -union Sass_Value make_sass_list (size_t len, enum Sass_Separator sep); -union Sass_Value make_sass_null (); -union Sass_Value make_sass_error (const char* msg); - -typedef union Sass_Value(*Sass_C_Function)(union Sass_Value); - -struct Sass_C_Function_Descriptor { - const char* signature; - Sass_C_Function function; -}; - -#ifdef __cplusplus -} -#endif diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/sass_interface.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/sass_interface.cpp deleted file mode 100644 index 154eed65..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/sass_interface.cpp +++ /dev/null @@ -1,187 +0,0 @@ -#ifdef _WIN32 -#include <io.h> -#else -#include <unistd.h> -#endif - -#include "sass_interface.h" -#include "context.hpp" - -#ifndef SASS_ERROR_HANDLING -#include "error_handling.hpp" -#endif - -#include <iostream> -#include <sstream> -#include <string> -#include <cstdlib> -#include <cstring> -#include <iostream> - -extern "C" { - using namespace std; - - sass_context* sass_new_context() - { return (sass_context*) calloc(1, sizeof(sass_context)); } - - void free_string_array(char ** arr, int num) { - if(!arr) - return; - - for(int i = 0; i < num; i++) { - free(arr[i]); - } - - free(arr); - } - - void sass_free_context(sass_context* ctx) - { - if (ctx->output_string) free(ctx->output_string); - if (ctx->error_message) free(ctx->error_message); - - free_string_array(ctx->included_files, ctx->num_included_files); - - free(ctx); - } - - sass_file_context* sass_new_file_context() - { return (sass_file_context*) calloc(1, sizeof(sass_file_context)); } - - void sass_free_file_context(sass_file_context* ctx) - { - if (ctx->output_string) free(ctx->output_string); - if (ctx->source_map_string) free(ctx->source_map_string); - if (ctx->source_map_file) free(ctx->source_map_file); - if (ctx->error_message) free(ctx->error_message); - - free_string_array(ctx->included_files, ctx->num_included_files); - - free(ctx); - } - - sass_folder_context* sass_new_folder_context() - { return (sass_folder_context*) calloc(1, sizeof(sass_folder_context)); } - - void sass_free_folder_context(sass_folder_context* ctx) - { - free_string_array(ctx->included_files, ctx->num_included_files); - free(ctx); - } - - void copy_strings(const std::vector<std::string>& strings, char*** array, int* n) { - int num = strings.size(); - char** arr = (char**) malloc(sizeof(char*)* num); - - for(int i = 0; i < num; i++) { - arr[i] = (char*) malloc(sizeof(char) * strings[i].size() + 1); - std::copy(strings[i].begin(), strings[i].end(), arr[i]); - arr[i][strings[i].size()] = '\0'; - } - - *array = arr; - *n = num; - } - - int sass_compile(sass_context* c_ctx) - { - using namespace Sass; - try { - Context cpp_ctx( - Context::Data().source_c_str(c_ctx->source_string) - .entry_point("") - .output_style((Output_Style) c_ctx->options.output_style) - .source_comments(c_ctx->options.source_comments == SASS_SOURCE_COMMENTS_DEFAULT) - .source_maps(false) // Only supported for files. - .image_path(c_ctx->options.image_path) - .include_paths_c_str(c_ctx->options.include_paths) - .include_paths_array(0) - .include_paths(vector<string>()) - ); - c_ctx->output_string = cpp_ctx.compile_string(); - c_ctx->error_message = 0; - c_ctx->error_status = 0; - - copy_strings(cpp_ctx.get_included_files(), &c_ctx->included_files, &c_ctx->num_included_files); - } - catch (Error& e) { - stringstream msg_stream; - msg_stream << e.path << ":" << e.position.line << ": error: " << e.message << endl; - c_ctx->error_message = strdup(msg_stream.str().c_str()); - c_ctx->error_status = 1; - c_ctx->output_string = 0; - } - catch(bad_alloc& ba) { - stringstream msg_stream; - msg_stream << "Unable to allocate memory: " << ba.what() << endl; - c_ctx->error_message = strdup(msg_stream.str().c_str()); - c_ctx->error_status = 1; - c_ctx->output_string = 0; - } - // TO DO: CATCH EVERYTHING ELSE - return 0; - } - - int sass_compile_file(sass_file_context* c_ctx) - { - using namespace Sass; - try { - bool source_maps = false; - string source_map_file = ""; - if (c_ctx->source_map_file && (c_ctx->options.source_comments == SASS_SOURCE_COMMENTS_MAP)) { - source_maps = true; - source_map_file = c_ctx->source_map_file; - } - Context cpp_ctx( - Context::Data().entry_point(c_ctx->input_path) - .output_style((Output_Style) c_ctx->options.output_style) - .source_comments(c_ctx->options.source_comments == SASS_SOURCE_COMMENTS_DEFAULT) - .source_maps(source_maps) - .source_map_file(source_map_file) - .image_path(c_ctx->options.image_path) - .include_paths_c_str(c_ctx->options.include_paths) - .include_paths_array(0) - .include_paths(vector<string>()) - ); - c_ctx->output_string = cpp_ctx.compile_file(); - c_ctx->source_map_string = cpp_ctx.generate_source_map(); - c_ctx->error_message = 0; - c_ctx->error_status = 0; - - copy_strings(cpp_ctx.get_included_files(), &c_ctx->included_files, &c_ctx->num_included_files); - } - catch (Error& e) { - stringstream msg_stream; - msg_stream << e.path << ":" << e.position.line << ": error: " << e.message << endl; - c_ctx->error_message = strdup(msg_stream.str().c_str()); - c_ctx->error_status = 1; - c_ctx->output_string = 0; - c_ctx->source_map_string = 0; - } - catch(bad_alloc& ba) { - stringstream msg_stream; - msg_stream << "Unable to allocate memory: " << ba.what() << endl; - c_ctx->error_message = strdup(msg_stream.str().c_str()); - c_ctx->error_status = 1; - c_ctx->output_string = 0; - c_ctx->source_map_string = 0; - } - catch(string& bad_path) { - // couldn't find the specified file in the include paths; report an error - stringstream msg_stream; - msg_stream << "error reading file \"" << bad_path << "\"" << endl; - c_ctx->error_message = strdup(msg_stream.str().c_str()); - c_ctx->error_status = 1; - c_ctx->output_string = 0; - c_ctx->source_map_string = 0; - } - // TO DO: CATCH EVERYTHING ELSE - return 0; - } - - int sass_compile_folder(sass_folder_context* c_ctx) - { - return 1; - } - -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/sass_interface.h b/node_modules/gulp-sass/node_modules/node-sass/libsass/sass_interface.h deleted file mode 100644 index e5a4cb1e..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/sass_interface.h +++ /dev/null @@ -1,74 +0,0 @@ -#define SASS_INTERFACE - -#include "sass.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define SASS_STYLE_NESTED 0 -#define SASS_STYLE_EXPANDED 1 -#define SASS_STYLE_COMPACT 2 -#define SASS_STYLE_COMPRESSED 3 - -#define SASS_SOURCE_COMMENTS_NONE 0 -#define SASS_SOURCE_COMMENTS_DEFAULT 1 -#define SASS_SOURCE_COMMENTS_MAP 2 - -struct sass_options { - int output_style; - int source_comments; // really want a bool, but C doesn't have them - const char* include_paths; - const char* image_path; -}; - -struct sass_context { - const char* source_string; - char* output_string; - struct sass_options options; - int error_status; - char* error_message; - struct Sass_C_Function_Data* c_functions; - char** included_files; - int num_included_files; -}; - -struct sass_file_context { - const char* input_path; - char* output_string; - char* source_map_string; - char* source_map_file; - struct sass_options options; - int error_status; - char* error_message; - struct Sass_C_Function_Data* c_functions; - char** included_files; - int num_included_files; -}; - -struct sass_folder_context { - const char* search_path; - const char* output_path; - struct sass_options options; - int error_status; - char* error_message; - struct Sass_C_Function_Data* c_functions; - char** included_files; - int num_included_files; -}; - -struct sass_context* sass_new_context (void); -struct sass_file_context* sass_new_file_context (void); -struct sass_folder_context* sass_new_folder_context (void); - -void sass_free_context (struct sass_context* ctx); -void sass_free_file_context (struct sass_file_context* ctx); -void sass_free_folder_context (struct sass_folder_context* ctx); - -int sass_compile (struct sass_context* ctx); -int sass_compile_file (struct sass_file_context* ctx); -int sass_compile_folder (struct sass_folder_context* ctx); - -#ifdef __cplusplus -} -#endif diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/sassc++.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/sassc++.cpp deleted file mode 100644 index e4aa1491..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/sassc++.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include <cstdlib> -#include <string> -#include <iostream> -#include "context.hpp" - -#ifndef SASS_ERROR_HANDLING -#include "error_handling.hpp" -#endif - -using namespace std; - -int main(int argc, char** argv) -{ - if (argc < 2) { - cout << "Please specify a file on the command line." << endl; - return 1; - } - - string file_name(argv[1]); - - try { - Sass::Context ctx( - Sass::Context::Data().entry_point(file_name) - .output_style(Sass::FORMATTED) - ); - char* result = ctx.compile_file(); - if (result) { - cout << result; - free(result); - } - } - catch (Sass::Error& e) { - cout << e.path << ":" << e.position.line << ": " << e.message << endl; - } - catch (string& msg) { - cout << msg << endl; - } - - return 0; -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/source_map.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/source_map.cpp deleted file mode 100644 index edc81822..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/source_map.cpp +++ /dev/null @@ -1,99 +0,0 @@ -#include "source_map.hpp" - -#ifndef SASS_CONTEXT -#include "context.hpp" -#endif - -namespace Sass { - - SourceMap::SourceMap(const string& file) : current_position(Position(1, 1)), file(file) { } - - string SourceMap::generate_source_map(Context* ctx) { - string result = "{\n"; - result += " \"version\": 3,\n"; - result += " \"file\": \"" + file + "\",\n"; - result += " \"sources\": ["; - for (size_t i = 0; i < files.size(); ++i) { - result+="\"" + files[i] + "\","; - } - if (!files.empty()) result.erase(result.length() - 1); - result += "],\n"; - result += " \"names\": [],\n"; - result += " \"mappings\": \"" + serialize_mappings() + "\"\n"; - result += "}"; - - return result; - } - - - string SourceMap::serialize_mappings() { - string result = ""; - - size_t previous_generated_line = 0; - size_t previous_generated_column = 0; - size_t previous_original_line = 0; - size_t previous_original_column = 0; - size_t previous_original_file = 0; - for (size_t i = 0; i < mappings.size(); ++i) { - const size_t generated_line = mappings[i].generated_position.line - 1; - const size_t generated_column = mappings[i].generated_position.column - 1; - const size_t original_line = mappings[i].original_position.line - 1; - const size_t original_column = mappings[i].original_position.column - 1; - const size_t original_file = mappings[i].original_position.file - 1; - - if (generated_line != previous_generated_line) { - previous_generated_column = 0; - while (generated_line != previous_generated_line) { - result += ";"; - previous_generated_line += 1; - } - } - else { - if (i > 0) result += ","; - } - - // generated column - result += base64vlq.encode(generated_column - previous_generated_column); - previous_generated_column = generated_column; - // file - result += base64vlq.encode(original_file - previous_original_file); - previous_original_file = original_file; - // source line - result += base64vlq.encode(original_line - previous_original_line); - previous_original_line = original_line; - // source column - result += base64vlq.encode(original_column - previous_original_column); - previous_original_column = original_column; - } - - return result; - } - - void SourceMap::new_line() - { - current_position.line += 1; - current_position.column = 1; - } - - void SourceMap::remove_line() - { - current_position.line -= 1; - current_position.column = 1; - } - - void SourceMap::update_column(const string& str) - { - current_position.column += str.length(); - } - - void SourceMap::update_column() - { - current_position.column += 1; - } - - void SourceMap::add_mapping(AST_Node* node) - { - mappings.push_back(Mapping(node->position(), current_position)); - } - -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/source_map.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/source_map.hpp deleted file mode 100644 index 065d1606..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/source_map.hpp +++ /dev/null @@ -1,49 +0,0 @@ -#define SASS_SOURCE_MAP - -#include <vector> - -#ifndef SASS_MAPPING -#include "mapping.hpp" -#endif - -#ifndef SASS_AST -#include "ast.hpp" -#endif - -#ifndef SASSS_BASE64VLQ -#include "base64vlq.hpp" -#endif - - - -namespace Sass { - using std::vector; - - struct Context; - - class SourceMap { - - public: - vector<string> files; - - SourceMap(const string& file); - - void new_line(); - void remove_line(); - void update_column(const string& str); - void update_column(); - void add_mapping(AST_Node* node); - - string generate_source_map(Context* ctx); - - private: - - string serialize_mappings(); - - vector<Mapping> mappings; - Position current_position; - string file; - Base64VLQ base64vlq; - }; - -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/support/libsass.pc.in b/node_modules/gulp-sass/node_modules/node-sass/libsass/support/libsass.pc.in deleted file mode 100644 index 84bf779e..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/support/libsass.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: libsass -URL: https://github.com/hcatlin/libsass -Description: A C implementation of a Sass compiler -Version: @VERSION@ -Libs: -L${libdir} -lsass -Cflags: -I${includedir} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/test-driver b/node_modules/gulp-sass/node_modules/node-sass/libsass/test-driver deleted file mode 100755 index 32bf39e8..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/test-driver +++ /dev/null @@ -1,127 +0,0 @@ -#! /bin/sh -# test-driver - basic testsuite driver script. - -scriptversion=2012-06-27.10; # UTC - -# Copyright (C) 2011-2013 Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to <bug-automake@gnu.org> or send patches to -# <automake-patches@gnu.org>. - -# Make unconditional expansion of undefined variables an error. This -# helps a lot in preventing typo-related bugs. -set -u - -usage_error () -{ - echo "$0: $*" >&2 - print_usage >&2 - exit 2 -} - -print_usage () -{ - cat <<END -Usage: - test-driver --test-name=NAME --log-file=PATH --trs-file=PATH - [--expect-failure={yes|no}] [--color-tests={yes|no}] - [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT -The '--test-name', '--log-file' and '--trs-file' options are mandatory. -END -} - -# TODO: better error handling in option parsing (in particular, ensure -# TODO: $log_file, $trs_file and $test_name are defined). -test_name= # Used for reporting. -log_file= # Where to save the output of the test script. -trs_file= # Where to save the metadata of the test run. -expect_failure=no -color_tests=no -enable_hard_errors=yes -while test $# -gt 0; do - case $1 in - --help) print_usage; exit $?;; - --version) echo "test-driver $scriptversion"; exit $?;; - --test-name) test_name=$2; shift;; - --log-file) log_file=$2; shift;; - --trs-file) trs_file=$2; shift;; - --color-tests) color_tests=$2; shift;; - --expect-failure) expect_failure=$2; shift;; - --enable-hard-errors) enable_hard_errors=$2; shift;; - --) shift; break;; - -*) usage_error "invalid option: '$1'";; - esac - shift -done - -if test $color_tests = yes; then - # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'. - red='' # Red. - grn='' # Green. - lgn='' # Light green. - blu='' # Blue. - mgn='' # Magenta. - std='' # No color. -else - red= grn= lgn= blu= mgn= std= -fi - -do_exit='rm -f $log_file $trs_file; (exit $st); exit $st' -trap "st=129; $do_exit" 1 -trap "st=130; $do_exit" 2 -trap "st=141; $do_exit" 13 -trap "st=143; $do_exit" 15 - -# Test script is run here. -"$@" >$log_file 2>&1 -estatus=$? -if test $enable_hard_errors = no && test $estatus -eq 99; then - estatus=1 -fi - -case $estatus:$expect_failure in - 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; - 0:*) col=$grn res=PASS recheck=no gcopy=no;; - 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; - 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; - *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; - *:*) col=$red res=FAIL recheck=yes gcopy=yes;; -esac - -# Report outcome to console. -echo "${col}${res}${std}: $test_name" - -# Register the test result, and other relevant metadata. -echo ":test-result: $res" > $trs_file -echo ":global-test-result: $res" >> $trs_file -echo ":recheck: $recheck" >> $trs_file -echo ":copy-in-global-log: $gcopy" >> $trs_file - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/to_c.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/to_c.cpp deleted file mode 100644 index 4cd2b15f..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/to_c.cpp +++ /dev/null @@ -1,47 +0,0 @@ -#include "to_c.hpp" -#include "ast.hpp" - -namespace Sass { - using namespace std; - - Sass_Value To_C::fallback_impl(AST_Node* n) - { return make_sass_null(); } - - Sass_Value To_C::operator()(Boolean* b) - { return make_sass_boolean(b->value()); } - - Sass_Value To_C::operator()(Number* n) - { return make_sass_number(n->value(), n->unit().c_str()); } - - Sass_Value To_C::operator()(Color* c) - { return make_sass_color(c->r(), c->g(), c->b(), c->a()); } - - Sass_Value To_C::operator()(String_Constant* s) - { return make_sass_string(s->value().c_str()); } - - Sass_Value To_C::operator()(List* l) - { - Sass_Value v = make_sass_list(l->length(), l->separator() == List::COMMA ? SASS_COMMA : SASS_SPACE); - for (size_t i = 0, L = l->length(); i < L; ++i) { - v.list.values[i] = (*l)[i]->perform(this); - } - return v; - } - - Sass_Value To_C::operator()(Arguments* a) - { - Sass_Value v = make_sass_list(a->length(), SASS_COMMA); - for (size_t i = 0, L = a->length(); i < L; ++i) { - v.list.values[i] = (*a)[i]->perform(this); - } - return v; - } - - Sass_Value To_C::operator()(Argument* a) - { return a->value()->perform(this); } - - // not strictly necessary because of the fallback - Sass_Value To_C::operator()(Null* n) - { return make_sass_null(); } - -}; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/to_c.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/to_c.hpp deleted file mode 100644 index 63aae3cc..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/to_c.hpp +++ /dev/null @@ -1,44 +0,0 @@ -#define SASS_TO_C - -#ifndef SASS_OPERATION -#include "operation.hpp" -#endif - -#ifndef SASS -#include "sass.h" -#endif - -namespace Sass { - using namespace std; - - class AST_Node; - class Boolean; - class Number; - class String_Constant; - class List; - class Null; - - class To_C : public Operation_CRTP<Sass_Value, To_C> { - - Sass_Value fallback_impl(AST_Node* n); - - public: - - To_C() { } - virtual ~To_C() { } - using Operation<Sass_Value>::operator(); - - Sass_Value operator()(Boolean*); - Sass_Value operator()(Number*); - Sass_Value operator()(Color*); - Sass_Value operator()(String_Constant*); - Sass_Value operator()(List*); - Sass_Value operator()(Null*); - Sass_Value operator()(Arguments*); - Sass_Value operator()(Argument*); - - template <typename U> - Sass_Value fallback(U x) { return fallback_impl(x); } - }; - -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/to_string.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/to_string.cpp deleted file mode 100644 index 6330927f..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/to_string.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include <cmath> -#include <sstream> -#include <iomanip> - -#ifndef SASS_TO_STRING -#include "to_string.hpp" -#endif - -#include "inspect.hpp" -#include "ast.hpp" -#include "context.hpp" -#include <iostream> - -namespace Sass { - using namespace std; - - To_String::To_String(Context* ctx) : ctx(ctx) { } - To_String::~To_String() { } - - inline string To_String::fallback_impl(AST_Node* n) - { - Inspect i(ctx); - n->perform(&i); - return i.get_buffer(); - } - - inline string To_String::operator()(Null* n) - { return ""; } -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/to_string.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/to_string.hpp deleted file mode 100644 index 94aca727..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/to_string.hpp +++ /dev/null @@ -1,32 +0,0 @@ -#define SASS_TO_STRING - -#include <string> - -#ifndef SASS_OPERATION -#include "operation.hpp" -#endif - -namespace Sass { - using namespace std; - - struct Context; - class Null; - - class To_String : public Operation_CRTP<string, To_String> { - // import all the class-specific methods and override as desired - using Operation<string>::operator(); - // override this to define a catch-all - string fallback_impl(AST_Node* n); - - Context* ctx; - - public: - To_String(Context* ctx = 0); - virtual ~To_String(); - - string operator()(Null* n); - - template <typename U> - string fallback(U n) { return fallback_impl(n); } - }; -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/token.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/token.hpp deleted file mode 100644 index 66595041..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/token.hpp +++ /dev/null @@ -1,32 +0,0 @@ -#define SASS_TOKEN - -#include <cstring> -#include <string> -#include <sstream> - -namespace Sass { - using namespace std; - - // Token type for representing lexed chunks of text - struct Token { - - const char* begin; - const char* end; - - Token() : begin(0), end(0) { } - Token(const char* s) : begin(s), end(s + strlen(s)) { } - Token(const char* b, const char* e) : begin(b), end(e) { } - - size_t length() const { return end - begin; } - string to_string() const { return string(begin, end - begin); } - - string unquote() const; - void unquote_to_stream(stringstream& buf) const; - - operator bool() { return begin && end && begin >= end; } - operator string() { return to_string(); } - - bool operator==(Token t) { return to_string() == t.to_string(); } - }; - -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/travis.sh b/node_modules/gulp-sass/node_modules/node-sass/libsass/travis.sh deleted file mode 100755 index 0973f144..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/travis.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -set -e - -if [ "x$AUTOTOOLS" == "xyes" ]; then - autoreconf -i - ./configure --enable-tests \ - --with-sassc-dir=$SASS_SASSC_PATH \ - --with-sass-spec-dir=$SASS_SPEC_PATH \ - --prefix=$TRAVIS_BUILD_DIR - make install - cp $TRAVIS_BUILD_DIR/lib/libsass.a $TRAVIS_BUILD_DIR -fi - -make LOG_FLAGS=--skip VERBOSE=1 test_build diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/units.cpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/units.cpp deleted file mode 100644 index 671cb737..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/units.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#include "units.hpp" - -namespace Sass { - - double conversion_factors[6][6] = { - /* in cm pc mm pt px */ - /* in */ { 1, 2.54, 6, 25.4, 72, 96 }, - /* cm */ { 1.0/2.54, 1, 6.0/2.54, 10, 72.0/2.54, 96.0/2.54 }, - /* pc */ { 1.0/6.0, 2.54/6.0, 1, 25.4/6.0, 72.0/6.0, 96.0/6.0 }, - /* mm */ { 1.0/25.4, 1.0/10.0, 6.0/25.4, 1, 72.0/25.4, 96.0/25.4 }, - /* pt */ { 1.0/72.0, 2.54/72.0, 6.0/72.0, 25.4/72.0, 1, 96.0/72.0 }, - /* px */ { 1.0/96.0, 2.54/96.0, 6.0/96.0, 25.4/96.0, 72.0/96.0, 1 } - }; - - Unit string_to_unit(const string& s) - { - if (s == "in") return IN; - else if (s == "cm") return CM; - else if (s == "pc") return PC; - else if (s == "mm") return MM; - else if (s == "pt") return PT; - else if (s == "px") return PX; - else return INCOMMENSURABLE; - } - - double conversion_factor(const string& s1, const string& s2) - { - Unit u1 = string_to_unit(s1); - Unit u2 = string_to_unit(s2); - double factor; - if (u1 == INCOMMENSURABLE || u2 == INCOMMENSURABLE) - factor = 0; - else - factor = conversion_factors[u1][u2]; - return factor; - } - - double convert(double n, const string& from, const string& to) - { - double factor = conversion_factor(from, to); - return factor ? factor * n : n; - } - -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/libsass/units.hpp b/node_modules/gulp-sass/node_modules/node-sass/libsass/units.hpp deleted file mode 100644 index d43853f2..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/libsass/units.hpp +++ /dev/null @@ -1,11 +0,0 @@ -#include <string> - -namespace Sass { - using namespace std; - - enum Unit { IN, CM, PC, MM, PT, PX, INCOMMENSURABLE }; - extern double conversion_factors[6][6]; - Unit string_to_unit(const string&); - double conversion_factor(const string&, const string&); - double convert(double, const string&, const string&); -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/.bin/_mocha b/node_modules/gulp-sass/node_modules/node-sass/node_modules/.bin/_mocha deleted file mode 120000 index f2a54ffd..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/.bin/_mocha +++ /dev/null @@ -1 +0,0 @@ -../mocha/bin/_mocha \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/.bin/mocha b/node_modules/gulp-sass/node_modules/node-sass/node_modules/.bin/mocha deleted file mode 120000 index 43c668d9..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/.bin/mocha +++ /dev/null @@ -1 +0,0 @@ -../mocha/bin/mocha \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/chalk.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/chalk.js deleted file mode 100644 index 4aad200c..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/chalk.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict'; -var ansi = require('ansi-styles'); -var defineProps = Object.defineProperties; - -ansi.grey = ansi.gray; - -var styles = (function () { - var ret = {}; - - Object.keys(ansi).forEach(function (key) { - ret[key] = { - get: function () { - this._styles.push(key); - return this; - } - }; - }); - - return ret; -})(); - -var chalk = module.exports = defineProps({}, init()); - -function init() { - var ret = {}; - - Object.keys(styles).forEach(function (name) { - ret[name] = { - get: function () { - var obj = defineProps(function self() { - var str = [].slice.call(arguments).join(' '); - - if (!chalk.enabled) { - return str; - } - - return self._styles.reduce(function (str, name) { - var code = ansi[name]; - return code[0] + (str || '') + code[1]; - }, str); - }, styles); - - obj._styles = []; - - return obj[name]; - } - } - }); - - return ret; -} - -chalk.styles = ansi; - -chalk.stripColor = function (str) { - return typeof str === 'string' ? str.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, '') : str; -}; - -chalk.supportsColor = require('has-color'); - -// detect mode if not set manually -if (chalk.enabled === undefined) { - chalk.enabled = chalk.supportsColor; -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js deleted file mode 100644 index 56a5d19b..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; -module.exports = { - reset: ['\x1b[0m', '\x1b[0m'], - - bold: ['\x1b[1m', '\x1b[22m'], - italic: ['\x1b[3m', '\x1b[23m'], - underline: ['\x1b[4m', '\x1b[24m'], - inverse: ['\x1b[7m', '\x1b[27m'], - strikethrough: ['\x1b[9m', '\x1b[29m'], - - black: ['\x1b[30m', '\x1b[39m'], - red: ['\x1b[31m', '\x1b[39m'], - green: ['\x1b[32m', '\x1b[39m'], - yellow: ['\x1b[33m', '\x1b[39m'], - blue: ['\x1b[34m', '\x1b[39m'], - magenta: ['\x1b[35m', '\x1b[39m'], - cyan: ['\x1b[36m', '\x1b[39m'], - white: ['\x1b[37m', '\x1b[39m'], - gray: ['\x1B[90m', '\x1b[39m'], - - bgBlack: ['\x1b[40m', '\x1b[49m'], - bgRed: ['\x1b[41m', '\x1b[49m'], - bgGreen: ['\x1b[42m', '\x1b[49m'], - bgYellow: ['\x1b[43m', '\x1b[49m'], - bgBlue: ['\x1b[44m', '\x1b[49m'], - bgMagenta: ['\x1b[45m', '\x1b[49m'], - bgCyan: ['\x1b[46m', '\x1b[49m'], - bgWhite: ['\x1b[47m', '\x1b[49m'] -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/node_modules/ansi-styles/package.json b/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/node_modules/ansi-styles/package.json deleted file mode 100644 index c2f556a5..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "ansi-styles", - "version": "0.2.0", - "description": "ANSI escape codes for colorizing strings in the terminal", - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "homepage": "https://github.com/sindresorhus/ansi-styles", - "bugs": { - "url": "https://github.com/sindresorhus/ansi-styles/issues" - }, - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "ansi-styles.js" - ], - "main": "ansi-styles", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/ansi-styles.git" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "readme": "# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles)\n\n> ANSI escape codes for colorizing strings in the terminal.\n\nYou probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings.\n\n![screenshot](screenshot.png)\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles`\n\n\n## Example\n\n```js\nvar ansi = require('ansi-styles');\n\nconsole.log(ansi.green[0] + 'Hello world!' + ansi.green[1]);\n```\n\n## API\n\nEach style is an array of a start and end escape code.\n\n\n## Styles\n\n### General\n\n- reset\n- bold\n- italic\n- underline\n- inverse\n- strikethrough\n\n### Text colors\n\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n\n### Background colors\n\n- bgBlack\n- bgRed\n- bgGreen\n- bgYellow\n- bgBlue\n- bgMagenta\n- bgCyan\n- bgWhite\n\n\n## License\n\nMIT License • © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "_id": "ansi-styles@0.2.0", - "_from": "ansi-styles@~0.2.0" -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/node_modules/ansi-styles/readme.md b/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/node_modules/ansi-styles/readme.md deleted file mode 100644 index 646837c6..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,65 +0,0 @@ -# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles) - -> ANSI escape codes for colorizing strings in the terminal. - -You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings. - -![screenshot](screenshot.png) - - -## Install - -Install with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles` - - -## Example - -```js -var ansi = require('ansi-styles'); - -console.log(ansi.green[0] + 'Hello world!' + ansi.green[1]); -``` - -## API - -Each style is an array of a start and end escape code. - - -## Styles - -### General - -- reset -- bold -- italic -- underline -- inverse -- strikethrough - -### Text colors - -- black -- red -- green -- yellow -- blue -- magenta -- cyan -- white -- gray - -### Background colors - -- bgBlack -- bgRed -- bgGreen -- bgYellow -- bgBlue -- bgMagenta -- bgCyan -- bgWhite - - -## License - -MIT License • © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/node_modules/has-color/has-color.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/node_modules/has-color/has-color.js deleted file mode 100644 index 27316b1f..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/node_modules/has-color/has-color.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; -module.exports = (function () { - if (process.argv.indexOf('--no-color') !== -1) { - return false; - } - - if (process.argv.indexOf('--color') !== -1) { - return true; - } - - if (!process.stdout.isTTY) { - return false; - } - - if (process.platform === 'win32') { - return true; - } - - if ('COLORTERM' in process.env) { - return true; - } - - return /^screen|^xterm|color|ansi|cygwin|linux/i.test(process.env.TERM); -})(); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/node_modules/has-color/package.json b/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/node_modules/has-color/package.json deleted file mode 100644 index e55a6244..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/node_modules/has-color/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "has-color", - "version": "0.1.4", - "description": "Detect whether a terminal supports color", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "capability", - "detect" - ], - "homepage": "https://github.com/sindresorhus/has-color", - "bugs": { - "url": "https://github.com/sindresorhus/has-color/issues" - }, - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "has-color.js" - ], - "main": "has-color", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/has-color.git" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "readme": "# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color)\n\n> Detect whether a terminal supports color.\n\nUsed in the terminal color module [chalk](https://github.com/sindresorhus/chalk).\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/has-color): `npm install --save has-color`\n\n\n## Example\n\n```js\nvar hasColor = require('has-color');\n\nif (hasColor) {\n\tconsole.log('Terminal supports color.');\n}\n```\n\nIt obeys the CLI flags `--color` and `--no-color`.\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "_id": "has-color@0.1.4", - "_from": "has-color@~0.1.0" -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/node_modules/has-color/readme.md b/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/node_modules/has-color/readme.md deleted file mode 100644 index 0918c851..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/node_modules/has-color/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color) - -> Detect whether a terminal supports color. - -Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). - - -## Install - -Install with [npm](https://npmjs.org/package/has-color): `npm install --save has-color` - - -## Example - -```js -var hasColor = require('has-color'); - -if (hasColor) { - console.log('Terminal supports color.'); -} -``` - -It obeys the CLI flags `--color` and `--no-color`. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/package.json b/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/package.json deleted file mode 100644 index 754653a0..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "chalk", - "version": "0.3.0", - "description": "Terminal string styling done right", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "ansi", - "styles", - "tty", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "homepage": "https://github.com/sindresorhus/chalk", - "bugs": { - "url": "https://github.com/sindresorhus/chalk/issues" - }, - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "chalk.js" - ], - "main": "chalk", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/chalk.git" - }, - "scripts": { - "test": "mocha" - }, - "dependencies": { - "has-color": "~0.1.0", - "ansi-styles": "~0.2.0" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "readme": "# chalk [![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk)\n\n> Terminal string styling done right.\n\n[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of problems. Although there are other ones, they either do too much or not enough.\n\n**Chalk is a clean and focused alternative.**\n\n![screenshot](screenshot.png)\n\n\n## Why\n\n- **Doesn't extend String.prototype**\n- Expressive API\n- Clean and focused\n- Auto-detects color support\n- Actively maintained\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/chalk): `npm install --save chalk`\n\n\n## Example\n\nChalk comes with an easy to use composable API where you just chain the styles you want.\n\n```js\nvar chalk = require('chalk');\n\n// style a string\nconsole.log(chalk.blue('Hello world!'));\n\n// combine styled and normal strings\nconsole.log(chalk.blue('Hello'), 'World' + chalk.red('!'));\n\n// compose multiple styles using the chainable API\nconsole.log(chalk.blue.bgRed.bold('Hello world!'));\n\n// nest styles\nchalk.red('Hello', chalk.underline.bgBlue('world') + '!');\n\n// pass in multiple arguments\nconsole.log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz')) \n```\n\nYou can easily define your own themes.\n\n```js\nvar chalk = require('chalk');\nvar error = chalk.bold.red;\nconsole.log(error('Error!'));\n```\n\n\n## API\n\n### chalk.\\<style>\\[.\\<style>...](string)\n\nChain [styles](#styles) and call the last one as a method with a string argument.\n\nMultiple arguments are also supported. Chalk will add a space between each one.\n\n### chalk.enabled\n\nColor support is automatically detected, but you can override it.\n\n### chalk.supportsColor\n\nDetect whether the terminal [supports color](https://github.com/sindresorhus/has-color).\n\nCan be overridden by the user with the flags `--color` and `--no-color`.\n\nUsed internally and handled for you, but exposed for convenience.\n\n### chalk.styles\n\nExposes the styles as [ANSI escape codes](https://github.com/sindresorhus/ansi-styles).\n\n```js\nvar chalk = require('chalk');\n\nconsole.log(chalk.styles.red);\n//=> ['\\x1b[31m', '\\x1b[39m']\n\nconsole.log(chalk.styles.red[0] + 'Hello' + chalk.styles.red[1]);\n// first item is the style escape code and second is the reset escape code\n```\n\n### chalk.stripColor(string)\n\nStrip color from a string.\n\n\n## Styles\n\n### General\n\n- reset\n- bold\n- italic\n- underline\n- inverse\n- strikethrough\n\n### Text colors\n\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n\n### Background colors\n\n- bgBlack\n- bgRed\n- bgGreen\n- bgYellow\n- bgBlue\n- bgMagenta\n- bgCyan\n- bgWhite\n\n\n## License\n\nMIT License • © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "_id": "chalk@0.3.0", - "_from": "chalk@~0.3.0" -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/readme.md b/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/readme.md deleted file mode 100644 index 32aa4a90..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/chalk/readme.md +++ /dev/null @@ -1,134 +0,0 @@ -# chalk [![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk) - -> Terminal string styling done right. - -[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of problems. Although there are other ones, they either do too much or not enough. - -**Chalk is a clean and focused alternative.** - -![screenshot](screenshot.png) - - -## Why - -- **Doesn't extend String.prototype** -- Expressive API -- Clean and focused -- Auto-detects color support -- Actively maintained - - -## Install - -Install with [npm](https://npmjs.org/package/chalk): `npm install --save chalk` - - -## Example - -Chalk comes with an easy to use composable API where you just chain the styles you want. - -```js -var chalk = require('chalk'); - -// style a string -console.log(chalk.blue('Hello world!')); - -// combine styled and normal strings -console.log(chalk.blue('Hello'), 'World' + chalk.red('!')); - -// compose multiple styles using the chainable API -console.log(chalk.blue.bgRed.bold('Hello world!')); - -// nest styles -chalk.red('Hello', chalk.underline.bgBlue('world') + '!'); - -// pass in multiple arguments -console.log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz')) -``` - -You can easily define your own themes. - -```js -var chalk = require('chalk'); -var error = chalk.bold.red; -console.log(error('Error!')); -``` - - -## API - -### chalk.\<style>\[.\<style>...](string) - -Chain [styles](#styles) and call the last one as a method with a string argument. - -Multiple arguments are also supported. Chalk will add a space between each one. - -### chalk.enabled - -Color support is automatically detected, but you can override it. - -### chalk.supportsColor - -Detect whether the terminal [supports color](https://github.com/sindresorhus/has-color). - -Can be overridden by the user with the flags `--color` and `--no-color`. - -Used internally and handled for you, but exposed for convenience. - -### chalk.styles - -Exposes the styles as [ANSI escape codes](https://github.com/sindresorhus/ansi-styles). - -```js -var chalk = require('chalk'); - -console.log(chalk.styles.red); -//=> ['\x1b[31m', '\x1b[39m'] - -console.log(chalk.styles.red[0] + 'Hello' + chalk.styles.red[1]); -// first item is the style escape code and second is the reset escape code -``` - -### chalk.stripColor(string) - -Strip color from a string. - - -## Styles - -### General - -- reset -- bold -- italic -- underline -- inverse -- strikethrough - -### Text colors - -- black -- red -- green -- yellow -- blue -- magenta -- cyan -- white -- gray - -### Background colors - -- bgBlack -- bgRed -- bgGreen -- bgYellow -- bgBlue -- bgMagenta -- bgCyan -- bgWhite - - -## License - -MIT License • © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/.npmignore b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/.npmignore deleted file mode 100644 index 9303c347..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/.travis.yml b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/.travis.yml deleted file mode 100644 index 84fd7ca2..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - 0.9 diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/LICENSE b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/LICENSE deleted file mode 100644 index 432d1aeb..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 2010 James Halliday (mail@substack.net) - -This project is free software released under the MIT/X11 license: - -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/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/examples/pow.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/examples/pow.js deleted file mode 100644 index e6924212..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/examples/pow.js +++ /dev/null @@ -1,6 +0,0 @@ -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/index.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/index.js deleted file mode 100644 index fda6de8a..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/index.js +++ /dev/null @@ -1,82 +0,0 @@ -var path = require('path'); -var fs = require('fs'); - -module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; - -function mkdirP (p, mode, f, made) { - if (typeof mode === 'function' || mode === undefined) { - f = mode; - mode = 0777 & (~process.umask()); - } - if (!made) made = null; - - var cb = f || function () {}; - if (typeof mode === 'string') mode = parseInt(mode, 8); - p = path.resolve(p); - - fs.mkdir(p, mode, function (er) { - if (!er) { - made = made || p; - return cb(null, made); - } - switch (er.code) { - case 'ENOENT': - mkdirP(path.dirname(p), mode, function (er, made) { - if (er) cb(er, made); - else mkdirP(p, mode, cb, made); - }); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - fs.stat(p, function (er2, stat) { - // if the stat fails, then that's super weird. - // let the original error be the failure reason. - if (er2 || !stat.isDirectory()) cb(er, made) - else cb(null, made); - }); - break; - } - }); -} - -mkdirP.sync = function sync (p, mode, made) { - if (mode === undefined) { - mode = 0777 & (~process.umask()); - } - if (!made) made = null; - - if (typeof mode === 'string') mode = parseInt(mode, 8); - p = path.resolve(p); - - try { - fs.mkdirSync(p, mode); - made = made || p; - } - catch (err0) { - switch (err0.code) { - case 'ENOENT' : - made = sync(path.dirname(p), mode, made); - sync(p, mode, made); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - var stat; - try { - stat = fs.statSync(p); - } - catch (err1) { - throw err0; - } - if (!stat.isDirectory()) throw err0; - break; - } - } - - return made; -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/package.json b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/package.json deleted file mode 100644 index dc434821..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "mkdirp", - "description": "Recursively mkdir, like `mkdir -p`", - "version": "0.3.5", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "main": "./index", - "keywords": [ - "mkdir", - "directory" - ], - "repository": { - "type": "git", - "url": "http://github.com/substack/node-mkdirp.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "devDependencies": { - "tap": "~0.4.0" - }, - "license": "MIT", - "readme": "# mkdirp\n\nLike `mkdir -p`, but in node.js!\n\n[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)\n\n# example\n\n## pow.js\n\n```js\nvar mkdirp = require('mkdirp');\n \nmkdirp('/tmp/foo/bar/baz', function (err) {\n if (err) console.error(err)\n else console.log('pow!')\n});\n```\n\nOutput\n\n```\npow!\n```\n\nAnd now /tmp/foo/bar/baz exists, huzzah!\n\n# methods\n\n```js\nvar mkdirp = require('mkdirp');\n```\n\n## mkdirp(dir, mode, cb)\n\nCreate a new directory and any necessary subdirectories at `dir` with octal\npermission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\n`cb(err, made)` fires with the error or the first directory `made`\nthat had to be created, if any.\n\n## mkdirp.sync(dir, mode)\n\nSynchronously create a new directory and any necessary subdirectories at `dir`\nwith octal permission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\nReturns the first directory that had to be created, if any.\n\n# install\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install mkdirp\n```\n\n# license\n\nMIT\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/substack/node-mkdirp/issues" - }, - "homepage": "https://github.com/substack/node-mkdirp", - "_id": "mkdirp@0.3.5", - "_from": "mkdirp@0.3.x" -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/readme.markdown b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/readme.markdown deleted file mode 100644 index 83b0216a..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/readme.markdown +++ /dev/null @@ -1,63 +0,0 @@ -# mkdirp - -Like `mkdir -p`, but in node.js! - -[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp) - -# example - -## pow.js - -```js -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); -``` - -Output - -``` -pow! -``` - -And now /tmp/foo/bar/baz exists, huzzah! - -# methods - -```js -var mkdirp = require('mkdirp'); -``` - -## mkdirp(dir, mode, cb) - -Create a new directory and any necessary subdirectories at `dir` with octal -permission string `mode`. - -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -`cb(err, made)` fires with the error or the first directory `made` -that had to be created, if any. - -## mkdirp.sync(dir, mode) - -Synchronously create a new directory and any necessary subdirectories at `dir` -with octal permission string `mode`. - -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -Returns the first directory that had to be created, if any. - -# install - -With [npm](http://npmjs.org) do: - -``` -npm install mkdirp -``` - -# license - -MIT diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/chmod.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/chmod.js deleted file mode 100644 index 520dcb8e..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/chmod.js +++ /dev/null @@ -1,38 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -test('chmod-pre', function (t) { - var mode = 0744 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.equal(stat && stat.mode & 0777, mode, 'should be 0744'); - t.end(); - }); - }); -}); - -test('chmod', function (t) { - var mode = 0755 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.end(); - }); - }); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/clobber.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/clobber.js deleted file mode 100644 index 0eb70998..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/clobber.js +++ /dev/null @@ -1,37 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -// a file in the way -var itw = ps.slice(0, 3).join('/'); - - -test('clobber-pre', function (t) { - console.error("about to write to "+itw) - fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); - - fs.stat(itw, function (er, stat) { - t.ifError(er) - t.ok(stat && stat.isFile(), 'should be file') - t.end() - }) -}) - -test('clobber', function (t) { - t.plan(2); - mkdirp(file, 0755, function (err) { - t.ok(err); - t.equal(err.code, 'ENOTDIR'); - t.end(); - }); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/mkdirp.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/mkdirp.js deleted file mode 100644 index b07cd70c..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/mkdirp.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('woo', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/perm.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/perm.js deleted file mode 100644 index 23a7abbd..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/perm.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('async perm', function (t) { - t.plan(2); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); - -test('async root perm', function (t) { - mkdirp('/tmp', 0755, function (err) { - if (err) t.fail(err); - t.end(); - }); - t.end(); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/perm_sync.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/perm_sync.js deleted file mode 100644 index f685f609..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/perm_sync.js +++ /dev/null @@ -1,39 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('sync perm', function (t) { - t.plan(2); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json'; - - mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }); -}); - -test('sync root perm', function (t) { - t.plan(1); - - var file = '/tmp'; - mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/race.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/race.js deleted file mode 100644 index 96a04476..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/race.js +++ /dev/null @@ -1,41 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('race', function (t) { - t.plan(4); - var ps = [ '', 'tmp' ]; - - for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); - } - var file = ps.join('/'); - - var res = 2; - mk(file, function () { - if (--res === 0) t.end(); - }); - - mk(file, function () { - if (--res === 0) t.end(); - }); - - function mk (file, cb) { - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - if (cb) cb(); - } - }) - }) - }); - } -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/rel.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/rel.js deleted file mode 100644 index 79858243..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/rel.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('rel', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var cwd = process.cwd(); - process.chdir('/tmp'); - - var file = [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - process.chdir(cwd); - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/return.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/return.js deleted file mode 100644 index bce68e56..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/return.js +++ /dev/null @@ -1,25 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('return value', function (t) { - t.plan(4); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - // should return the first dir created. - // By this point, it would be profoundly surprising if /tmp didn't - // already exist, since every other test makes things in there. - mkdirp(file, function (err, made) { - t.ifError(err); - t.equal(made, '/tmp/' + x); - mkdirp(file, function (err, made) { - t.ifError(err); - t.equal(made, null); - }); - }); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/return_sync.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/return_sync.js deleted file mode 100644 index 7c222d35..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/return_sync.js +++ /dev/null @@ -1,24 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('return value', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - // should return the first dir created. - // By this point, it would be profoundly surprising if /tmp didn't - // already exist, since every other test makes things in there. - // Note that this will throw on failure, which will fail the test. - var made = mkdirp.sync(file); - t.equal(made, '/tmp/' + x); - - // making the same file again should have no effect. - made = mkdirp.sync(file); - t.equal(made, null); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/root.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/root.js deleted file mode 100644 index 97ad7a2f..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/root.js +++ /dev/null @@ -1,18 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('root', function (t) { - // '/' on unix, 'c:/' on windows. - var file = path.resolve('/'); - - mkdirp(file, 0755, function (err) { - if (err) throw err - fs.stat(file, function (er, stat) { - if (er) throw er - t.ok(stat.isDirectory(), 'target is a directory'); - t.end(); - }) - }); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/sync.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/sync.js deleted file mode 100644 index 7530cada..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/sync.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('sync', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - try { - mkdirp.sync(file, 0755); - } catch (err) { - t.fail(err); - return t.end(); - } - - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }); - }); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/umask.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/umask.js deleted file mode 100644 index 64ccafe2..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/umask.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('implicit mode from umask', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0777 & (~process.umask())); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/umask_sync.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/umask_sync.js deleted file mode 100644 index 35bd5cbb..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mkdirp/test/umask_sync.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('umask sync modes', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - try { - mkdirp.sync(file); - } catch (err) { - t.fail(err); - return t.end(); - } - - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, (0777 & (~process.umask()))); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }); - }); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/Readme.md b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/Readme.md deleted file mode 100644 index ae0e8cce..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/Readme.md +++ /dev/null @@ -1,124 +0,0 @@ - [![Build Status](https://secure.travis-ci.org/visionmedia/mocha.png)](http://travis-ci.org/visionmedia/mocha) - - [![Mocha test framework](http://f.cl.ly/items/3l1k0n2A1U3M1I1L210p/Screen%20Shot%202012-02-24%20at%202.21.43%20PM.png)](http://visionmedia.github.io/mocha) - - Mocha is a simple, flexible, fun JavaScript test framework for node.js and the browser. For more information view the [documentation](http://visionmedia.github.io/mocha). - -## Contributors - -``` - - project : mocha - repo age : 1 year, 7 months - active : 272 days - commits : 1116 - files : 123 - authors : - 504 TJ Holowaychuk 45.2% - 389 Tj Holowaychuk 34.9% - 31 Guillermo Rauch 2.8% - 13 Attila Domokos 1.2% - 9 John Firebaugh 0.8% - 8 Jo Liss 0.7% - 7 Nathan Rajlich 0.6% - 6 James Carr 0.5% - 6 Brendan Nee 0.5% - 5 Aaron Heckmann 0.4% - 4 hokaccha 0.4% - 4 Xavier Antoviaque 0.4% - 4 Joshua Krall 0.4% - 3 Wil Moore III 0.3% - 3 Jesse Dailey 0.3% - 3 Nathan Bowser 0.3% - 3 Tyson Tate 0.3% - 3 Cory Thomas 0.3% - 3 Ryunosuke SATO 0.3% - 3 Paul Miller 0.3% - 3 Ben Lindsey 0.3% - 2 Forbes Lindesay 0.2% - 2 Konstantin Käfer 0.2% - 2 Brian Beck 0.2% - 2 Merrick Christensen 0.2% - 2 Michael Riley 0.2% - 2 David Henderson 0.2% - 2 Nathan Alderson 0.2% - 2 Paul Armstrong 0.2% - 2 Pete Hawkins 0.2% - 2 Quang Van 0.2% - 2 Raynos 0.2% - 2 Jonas Westerlund 0.2% - 2 Domenic Denicola 0.2% - 2 Shawn Krisman 0.2% - 2 Simon Gaeremynck 0.2% - 2 FARKAS Máté 0.2% - 2 Timo Tijhof 0.2% - 2 Justin DuJardin 0.2% - 2 Juzer Ali 0.2% - 2 Ian Storm Taylor 0.2% - 2 Arian Stolwijk 0.2% - 2 domenic 0.2% - 1 Richard Dingwall 0.1% - 1 Russ Bradberry 0.1% - 1 Sasha Koss 0.1% - 1 Seiya Konno 0.1% - 1 Standa Opichal 0.1% - 1 Steve Mason 0.1% - 1 Will Langstroth 0.1% - 1 Yanis Wang 0.1% - 1 Yuest Wang 0.1% - 1 abrkn 0.1% - 1 airportyh 0.1% - 1 fengmk2 0.1% - 1 tgautier@yahoo.com 0.1% - 1 traleig1 0.1% - 1 vlad 0.1% - 1 yuitest 0.1% - 1 Adam Crabtree 0.1% - 1 Andreas Brekken 0.1% - 1 Atsuya Takagi 0.1% - 1 Austin Birch 0.1% - 1 Bjørge Næss 0.1% - 1 Brian Moore 0.1% - 1 Bryan Donovan 0.1% - 1 Casey Foster 0.1% - 1 Corey Butler 0.1% - 1 Dave McKenna 0.1% - 1 Fedor Indutny 0.1% - 1 Florian Margaine 0.1% - 1 Frederico Silva 0.1% - 1 Fredrik Lindin 0.1% - 1 Gareth Murphy 0.1% - 1 Gavin Mogan 0.1% - 1 Greg Perkins 0.1% - 1 Harry Brundage 0.1% - 1 Herman Junge 0.1% - 1 Ian Young 0.1% - 1 Ivan 0.1% - 1 Jaakko Salonen 0.1% - 1 Jakub Nešetřil 0.1% - 1 James Bowes 0.1% - 1 James Lal 0.1% - 1 Jason Barry 0.1% - 1 Javier Aranda 0.1% - 1 Jeff Kunkle 0.1% - 1 Jonathan Creamer 0.1% - 1 Jussi Virtanen 0.1% - 1 Katie Gengler 0.1% - 1 Kazuhito Hokamura 0.1% - 1 Koen Punt 0.1% - 1 Laszlo Bacsi 0.1% - 1 László Bácsi 0.1% - 1 Maciej Małecki 0.1% - 1 Matt Robenolt 0.1% - 1 Matt Smith 0.1% - 1 Matthew Shanley 0.1% - 1 Michael Schoonmaker 0.1% - 1 Phil Sung 0.1% - 1 R56 0.1% -``` - -## Links - - - [Google Group](http://groups.google.com/group/mochajs) - - [Wiki](https://github.com/visionmedia/mocha/wiki) - - Mocha [Extensions and reporters](https://github.com/visionmedia/mocha/wiki) diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/bin/_mocha b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/bin/_mocha deleted file mode 100755 index f6bf8957..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/bin/_mocha +++ /dev/null @@ -1,448 +0,0 @@ -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('commander') - , sprintf = require('util').format - , path = require('path') - , fs = require('fs') - , glob = require('glob') - , resolve = path.resolve - , exists = fs.existsSync || path.existsSync - , Mocha = require('../') - , utils = Mocha.utils - , reporters = Mocha.reporters - , interfaces = Mocha.interfaces - , Base = reporters.Base - , join = path.join - , basename = path.basename - , cwd = process.cwd() - , mocha = new Mocha; - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Files. - */ - -var files = []; - -/** - * Globals. - */ - -var globals = []; - -/** - * Requires. - */ - -var requires = []; - -/** - * Images. - */ - -var images = { - fail: __dirname + '/../images/error.png' - , pass: __dirname + '/../images/ok.png' -}; - -// options - -program - .version(JSON.parse(fs.readFileSync(__dirname + '/../package.json', 'utf8')).version) - .usage('[debug] [options] [files]') - .option('-r, --require <name>', 'require the given module') - .option('-R, --reporter <name>', 'specify the reporter to use', 'dot') - .option('-u, --ui <name>', 'specify user-interface (bdd|tdd|exports)', 'bdd') - .option('-g, --grep <pattern>', 'only run tests matching <pattern>') - .option('-i, --invert', 'inverts --grep matches') - .option('-t, --timeout <ms>', 'set test-case timeout in milliseconds [2000]') - .option('-s, --slow <ms>', '"slow" test threshold in milliseconds [75]') - .option('-w, --watch', 'watch files for changes') - .option('-c, --colors', 'force enabling of colors') - .option('-C, --no-colors', 'force disabling of colors') - .option('-G, --growl', 'enable growl notification support') - .option('-d, --debug', "enable node's debugger, synonym for node --debug") - .option('-b, --bail', "bail after first test failure") - .option('-A, --async-only', "force all tests to take a callback (async)") - .option('-S, --sort', "sort test files") - .option('--recursive', 'include sub directories') - .option('--debug-brk', "enable node's debugger breaking on the first line") - .option('--globals <names>', 'allow the given comma-delimited global [names]', list, []) - .option('--check-leaks', 'check for global variable leaks') - .option('--interfaces', 'display available interfaces') - .option('--reporters', 'display available reporters') - .option('--compilers <ext>:<module>,...', 'use the given module(s) to compile files', list, []) - -program.name = 'mocha'; - -// init command - -program - .command('init <path>') - .description('initialize a client-side mocha setup at <path>') - .action(function(path){ - var mkdir = require('mkdirp'); - mkdir.sync(path); - var css = fs.readFileSync(join(__dirname, '..', 'mocha.css')); - var js = fs.readFileSync(join(__dirname, '..', 'mocha.js')); - var tmpl = fs.readFileSync(join(__dirname, '..', 'lib/template.html')); - fs.writeFileSync(join(path, 'mocha.css'), css); - fs.writeFileSync(join(path, 'mocha.js'), js); - fs.writeFileSync(join(path, 'tests.js'), ''); - fs.writeFileSync(join(path, 'index.html'), tmpl); - process.exit(0); - }); - -// --globals - -program.on('globals', function(val){ - globals = globals.concat(list(val)); -}); - -// --reporters - -program.on('reporters', function(){ - console.log(); - console.log(' dot - dot matrix'); - console.log(' doc - html documentation'); - console.log(' spec - hierarchical spec list'); - console.log(' json - single json object'); - console.log(' progress - progress bar'); - console.log(' list - spec-style listing'); - console.log(' tap - test-anything-protocol'); - console.log(' landing - unicode landing strip'); - console.log(' xunit - xunit reporter'); - console.log(' teamcity - teamcity ci support'); - console.log(' html-cov - HTML test coverage'); - console.log(' json-cov - JSON test coverage'); - console.log(' min - minimal reporter (great with --watch)'); - console.log(' json-stream - newline delimited json events'); - console.log(' markdown - markdown documentation (github flavour)'); - console.log(' nyan - nyan cat!'); - console.log(); - process.exit(); -}); - -// --interfaces - -program.on('interfaces', function(){ - console.log(''); - console.log(' bdd'); - console.log(' tdd'); - console.log(' qunit'); - console.log(' exports'); - console.log(''); - process.exit(); -}); - -// -r, --require - -module.paths.push(cwd, join(cwd, 'node_modules')); - -program.on('require', function(mod){ - var abs = exists(mod) || exists(mod + '.js'); - if (abs) mod = resolve(mod); - requires.push(mod); -}); - -// mocha.opts support - -try { - var opts = fs.readFileSync('test/mocha.opts', 'utf8') - .trim() - .split(/\s+/); - - process.argv = process.argv - .slice(0, 2) - .concat(opts.concat(process.argv.slice(2))); -} catch (err) { - // ignore -} - -// parse args - -program.parse(process.argv); - -// infinite stack traces - -Error.stackTraceLimit = Infinity; // TODO: config - -// reporter - -mocha.reporter(program.reporter); - -// interface - -mocha.ui(program.ui); - -// load reporter - -try { - Reporter = require('../lib/reporters/' + program.reporter); -} catch (err) { - try { - Reporter = require(program.reporter); - } catch (err) { - throw new Error('reporter "' + program.reporter + '" does not exist'); - } -} - -// --no-colors - -if (!program.colors) Base.useColors = false; - -// --colors - -if (~process.argv.indexOf('--colors') || - ~process.argv.indexOf('-c')) { - Base.useColors = true; -} - -// --slow <ms> - -if (program.slow) mocha.suite.slow(program.slow); - -// --timeout - -if (program.timeout) mocha.suite.timeout(program.timeout); - -// --bail - -mocha.suite.bail(program.bail); - -// --grep - -if (program.grep) mocha.grep(new RegExp(program.grep)); - -// --invert - -if (program.invert) mocha.invert(); - -// --check-leaks - -if (program.checkLeaks) mocha.checkLeaks(); - -// --growl - -if (program.growl) mocha.growl(); - -// --async-only - -if (program.asyncOnly) mocha.asyncOnly(); - -// --globals - -mocha.globals(globals); - -// custom compiler support - -var extensions = ['js']; -program.compilers.forEach(function(c) { - var compiler = c.split(':') - , ext = compiler[0] - , mod = compiler[1]; - - if (mod[0] == '.') mod = join(process.cwd(), mod); - require(mod); - extensions.push(ext); -}); - -var re = new RegExp('\\.(' + extensions.join('|') + ')$'); - -// requires - -requires.forEach(function(mod) { - require(mod); -}); - -// files - -var files = [] - , args = program.args; - -// default files to test/*.{js,coffee} - -if (!args.length) args.push('test'); - -args.forEach(function(arg){ - files = files.concat(lookupFiles(arg, program.recursive)); -}); - -// resolve - -files = files.map(function(path){ - return resolve(path); -}); - -if (program.sort) { - files.sort(); -} - -// --watch - -if (program.watch) { - console.log(); - hideCursor(); - process.on('SIGINT', function(){ - showCursor(); - console.log('\n'); - process.exit(); - }); - - var spinner = 'win32' == process.platform - ? ['|','/','-','\\'] - : ['◜','◠','◝','◞','◡','◟']; - - var frames = spinner.map(function(c) { - return sprintf(' \u001b[96m%s \u001b[90mwatching\u001b[0m', c); - }); - - var watchFiles = utils.files(cwd); - - function loadAndRun() { - try { - mocha.files = files; - mocha.run(function(){ - play(frames); - }); - } catch(e) { - console.log(e.stack); - } - } - - function purge() { - watchFiles.forEach(function(file){ - delete require.cache[file]; - }); - } - - loadAndRun(); - - utils.watch(watchFiles, function(){ - purge(); - stop() - mocha.suite = mocha.suite.clone(); - mocha.ui(program.ui); - loadAndRun(); - }); - - return; -} - -// load - -mocha.files = files; -mocha.run(process.exit); - -// enable growl notifications - -function growl(runner, reporter) { - var notify = require('growl'); - - runner.on('end', function(){ - var stats = reporter.stats; - if (stats.failures) { - var msg = stats.failures + ' of ' + runner.total + ' tests failed'; - notify(msg, { name: 'mocha', title: 'Failed', image: images.fail }); - } else { - notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', { - name: 'mocha' - , title: 'Passed' - , image: images.pass - }); - } - }); -} - -/** - * Parse list. - */ - -function list(str) { - return str.split(/ *, */); -} - -/** - * Hide the cursor. - */ - -function hideCursor(){ - process.stdout.write('\u001b[?25l'); -}; - -/** - * Show the cursor. - */ - -function showCursor(){ - process.stdout.write('\u001b[?25h'); -}; - -/** - * Stop play()ing. - */ - -function stop() { - process.stdout.write('\u001b[2K'); - clearInterval(play.timer); -} - -/** - * Lookup file names at the given `path`. - */ - -function lookupFiles(path, recursive) { - var files = []; - - if (!exists(path)) { - if (exists(path + '.js')) { - path += '.js' - } else { - return glob.sync(path); - } - } - - var stat = fs.statSync(path); - if (stat.isFile()) return path; - - fs.readdirSync(path).forEach(function(file){ - file = join(path, file); - var stat = fs.statSync(file); - if (stat.isDirectory()) { - if (recursive) files = files.concat(lookupFiles(file, recursive)); - return - } - if (!stat.isFile() || !re.test(file) || basename(file)[0] == '.') return; - files.push(file); - }); - - return files; -} - -/** - * Play the given array of strings. - */ - -function play(arr, interval) { - var len = arr.length - , interval = interval || 100 - , i = 0; - - play.timer = setInterval(function(){ - var str = arr[i++ % len]; - process.stdout.write('\u001b[0G' + str); - }, interval); -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/bin/mocha b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/bin/mocha deleted file mode 100755 index 742d6077..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/bin/mocha +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env node - -/** - * This tiny wrapper file checks for known node flags and appends them - * when found, before invoking the "real" _mocha(1) executable. - */ - -var spawn = require('child_process').spawn - , args = [ __dirname + '/_mocha' ]; - -process.argv.slice(2).forEach(function(arg){ - var flag = arg.split('=')[0]; - - switch (flag) { - case '-d': - args.unshift('--debug'); - break; - case 'debug': - case '--debug': - case '--debug-brk': - args.unshift(arg); - break; - case '-gc': - case '--expose-gc': - args.unshift('--expose-gc'); - break; - case '--gc-global': - case '--harmony': - case '--harmony-proxies': - case '--harmony-collections': - case '--harmony-generators': - case '--prof': - args.unshift(arg); - break; - default: - if (0 == arg.indexOf('--trace')) args.unshift(arg); - else args.push(arg); - break; - } -}); - -var proc = spawn(process.argv[0], args, { customFds: [0,1,2] }); -proc.on('exit', function (code, signal) { - process.on('exit', function(){ - if (signal) { - process.kill(process.pid, signal); - } else { - process.exit(code); - } - }); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/images/error.png b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/images/error.png deleted file mode 100644 index a07a1ba5..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/images/error.png and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/images/ok.png b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/images/ok.png deleted file mode 100644 index b3623a59..00000000 Binary files a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/images/ok.png and /dev/null differ diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/index.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/index.js deleted file mode 100644 index 507566fa..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/index.js +++ /dev/null @@ -1,4 +0,0 @@ - -module.exports = process.env.COV - ? require('./lib-cov/mocha') - : require('./lib/mocha'); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/browser/debug.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/browser/debug.js deleted file mode 100644 index 03cf5923..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/browser/debug.js +++ /dev/null @@ -1,5 +0,0 @@ - -module.exports = function(type){ - return function(){ - } -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/browser/events.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/browser/events.js deleted file mode 100644 index cfbd0720..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/browser/events.js +++ /dev/null @@ -1,178 +0,0 @@ - -/** - * Module exports. - */ - -exports.EventEmitter = EventEmitter; - -/** - * Check if `obj` is an array. - */ - -function isArray(obj) { - return '[object Array]' == {}.toString.call(obj); -} - -/** - * Event emitter constructor. - * - * @api public - */ - -function EventEmitter(){}; - -/** - * Adds a listener. - * - * @api public - */ - -EventEmitter.prototype.on = function (name, fn) { - if (!this.$events) { - this.$events = {}; - } - - if (!this.$events[name]) { - this.$events[name] = fn; - } else if (isArray(this.$events[name])) { - this.$events[name].push(fn); - } else { - this.$events[name] = [this.$events[name], fn]; - } - - return this; -}; - -EventEmitter.prototype.addListener = EventEmitter.prototype.on; - -/** - * Adds a volatile listener. - * - * @api public - */ - -EventEmitter.prototype.once = function (name, fn) { - var self = this; - - function on () { - self.removeListener(name, on); - fn.apply(this, arguments); - }; - - on.listener = fn; - this.on(name, on); - - return this; -}; - -/** - * Removes a listener. - * - * @api public - */ - -EventEmitter.prototype.removeListener = function (name, fn) { - if (this.$events && this.$events[name]) { - var list = this.$events[name]; - - if (isArray(list)) { - var pos = -1; - - for (var i = 0, l = list.length; i < l; i++) { - if (list[i] === fn || (list[i].listener && list[i].listener === fn)) { - pos = i; - break; - } - } - - if (pos < 0) { - return this; - } - - list.splice(pos, 1); - - if (!list.length) { - delete this.$events[name]; - } - } else if (list === fn || (list.listener && list.listener === fn)) { - delete this.$events[name]; - } - } - - return this; -}; - -/** - * Removes all listeners for an event. - * - * @api public - */ - -EventEmitter.prototype.removeAllListeners = function (name) { - if (name === undefined) { - this.$events = {}; - return this; - } - - if (this.$events && this.$events[name]) { - this.$events[name] = null; - } - - return this; -}; - -/** - * Gets all listeners for a certain event. - * - * @api public - */ - -EventEmitter.prototype.listeners = function (name) { - if (!this.$events) { - this.$events = {}; - } - - if (!this.$events[name]) { - this.$events[name] = []; - } - - if (!isArray(this.$events[name])) { - this.$events[name] = [this.$events[name]]; - } - - return this.$events[name]; -}; - -/** - * Emits an event. - * - * @api public - */ - -EventEmitter.prototype.emit = function (name) { - if (!this.$events) { - return false; - } - - var handler = this.$events[name]; - - if (!handler) { - return false; - } - - var args = [].slice.call(arguments, 1); - - if ('function' == typeof handler) { - handler.apply(this, args); - } else if (isArray(handler)) { - var listeners = handler.slice(); - - for (var i = 0, l = listeners.length; i < l; i++) { - listeners[i].apply(this, args); - } - } else { - return false; - } - - return true; -}; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/browser/fs.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/browser/fs.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/browser/path.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/browser/path.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/browser/progress.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/browser/progress.js deleted file mode 100644 index 1d60cde6..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/browser/progress.js +++ /dev/null @@ -1,125 +0,0 @@ - -/** - * Expose `Progress`. - */ - -module.exports = Progress; - -/** - * Initialize a new `Progress` indicator. - */ - -function Progress() { - this.percent = 0; - this.size(0); - this.fontSize(11); - this.font('helvetica, arial, sans-serif'); -} - -/** - * Set progress size to `n`. - * - * @param {Number} n - * @return {Progress} for chaining - * @api public - */ - -Progress.prototype.size = function(n){ - this._size = n; - return this; -}; - -/** - * Set text to `str`. - * - * @param {String} str - * @return {Progress} for chaining - * @api public - */ - -Progress.prototype.text = function(str){ - this._text = str; - return this; -}; - -/** - * Set font size to `n`. - * - * @param {Number} n - * @return {Progress} for chaining - * @api public - */ - -Progress.prototype.fontSize = function(n){ - this._fontSize = n; - return this; -}; - -/** - * Set font `family`. - * - * @param {String} family - * @return {Progress} for chaining - */ - -Progress.prototype.font = function(family){ - this._font = family; - return this; -}; - -/** - * Update percentage to `n`. - * - * @param {Number} n - * @return {Progress} for chaining - */ - -Progress.prototype.update = function(n){ - this.percent = n; - return this; -}; - -/** - * Draw on `ctx`. - * - * @param {CanvasRenderingContext2d} ctx - * @return {Progress} for chaining - */ - -Progress.prototype.draw = function(ctx){ - var percent = Math.min(this.percent, 100) - , size = this._size - , half = size / 2 - , x = half - , y = half - , rad = half - 1 - , fontSize = this._fontSize; - - ctx.font = fontSize + 'px ' + this._font; - - var angle = Math.PI * 2 * (percent / 100); - ctx.clearRect(0, 0, size, size); - - // outer circle - ctx.strokeStyle = '#9f9f9f'; - ctx.beginPath(); - ctx.arc(x, y, rad, 0, angle, false); - ctx.stroke(); - - // inner circle - ctx.strokeStyle = '#eee'; - ctx.beginPath(); - ctx.arc(x, y, rad - 1, 0, angle, true); - ctx.stroke(); - - // text - var text = this._text || (percent | 0) + '%' - , w = ctx.measureText(text).width; - - ctx.fillText( - text - , x - w / 2 + 1 - , y + fontSize / 2 - 1); - - return this; -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/browser/tty.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/browser/tty.js deleted file mode 100644 index 6f5f079a..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/browser/tty.js +++ /dev/null @@ -1,13 +0,0 @@ - -exports.isatty = function(){ - return true; -}; - -exports.getWindowSize = function(){ - if ('innerHeight' in global) { - return [global.innerHeight, global.innerWidth]; - } else { - // In a Web Worker, the DOM Window is not available. - return [640, 480]; - } -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/context.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/context.js deleted file mode 100644 index 6d6422a1..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/context.js +++ /dev/null @@ -1,69 +0,0 @@ - -/** - * Expose `Context`. - */ - -module.exports = Context; - -/** - * Initialize a new `Context`. - * - * @api private - */ - -function Context(){} - -/** - * Set or get the context `Runnable` to `runnable`. - * - * @param {Runnable} runnable - * @return {Context} - * @api private - */ - -Context.prototype.runnable = function(runnable){ - if (0 == arguments.length) return this._runnable; - this.test = this._runnable = runnable; - return this; -}; - -/** - * Set test timeout `ms`. - * - * @param {Number} ms - * @return {Context} self - * @api private - */ - -Context.prototype.timeout = function(ms){ - this.runnable().timeout(ms); - return this; -}; - -/** - * Set test slowness threshold `ms`. - * - * @param {Number} ms - * @return {Context} self - * @api private - */ - -Context.prototype.slow = function(ms){ - this.runnable().slow(ms); - return this; -}; - -/** - * Inspect the context void of `._runnable`. - * - * @return {String} - * @api private - */ - -Context.prototype.inspect = function(){ - return JSON.stringify(this, function(key, val){ - if ('_runnable' == key) return; - if ('test' == key) return; - return val; - }, 2); -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/hook.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/hook.js deleted file mode 100644 index 814e7b62..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/hook.js +++ /dev/null @@ -1,49 +0,0 @@ - -/** - * Module dependencies. - */ - -var Runnable = require('./runnable'); - -/** - * Expose `Hook`. - */ - -module.exports = Hook; - -/** - * Initialize a new `Hook` with the given `title` and callback `fn`. - * - * @param {String} title - * @param {Function} fn - * @api private - */ - -function Hook(title, fn) { - Runnable.call(this, title, fn); - this.type = 'hook'; -} - -/** - * Inherit from `Runnable.prototype`. - */ - -Hook.prototype.__proto__ = Runnable.prototype; - -/** - * Get or set the test `err`. - * - * @param {Error} err - * @return {Error} - * @api public - */ - -Hook.prototype.error = function(err){ - if (0 == arguments.length) { - var err = this._error; - this._error = null; - return err; - } - - this._error = err; -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/interfaces/bdd.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/interfaces/bdd.js deleted file mode 100644 index e838109d..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/interfaces/bdd.js +++ /dev/null @@ -1,135 +0,0 @@ - -/** - * Module dependencies. - */ - -var Suite = require('../suite') - , Test = require('../test') - , utils = require('../utils'); - -/** - * BDD-style interface: - * - * describe('Array', function(){ - * describe('#indexOf()', function(){ - * it('should return -1 when not present', function(){ - * - * }); - * - * it('should return the index when present', function(){ - * - * }); - * }); - * }); - * - */ - -module.exports = function(suite){ - var suites = [suite]; - - suite.on('pre-require', function(context, file, mocha){ - - /** - * Execute before running tests. - */ - - context.before = function(fn){ - suites[0].beforeAll(fn); - }; - - /** - * Execute after running tests. - */ - - context.after = function(fn){ - suites[0].afterAll(fn); - }; - - /** - * Execute before each test case. - */ - - context.beforeEach = function(fn){ - suites[0].beforeEach(fn); - }; - - /** - * Execute after each test case. - */ - - context.afterEach = function(fn){ - suites[0].afterEach(fn); - }; - - /** - * Describe a "suite" with the given `title` - * and callback `fn` containing nested suites - * and/or tests. - */ - - context.describe = context.context = function(title, fn){ - var suite = Suite.create(suites[0], title); - suites.unshift(suite); - fn.call(suite); - suites.shift(); - return suite; - }; - - /** - * Pending describe. - */ - - context.xdescribe = - context.xcontext = - context.describe.skip = function(title, fn){ - var suite = Suite.create(suites[0], title); - suite.pending = true; - suites.unshift(suite); - fn.call(suite); - suites.shift(); - }; - - /** - * Exclusive suite. - */ - - context.describe.only = function(title, fn){ - var suite = context.describe(title, fn); - mocha.grep(suite.fullTitle()); - }; - - /** - * Describe a specification or test-case - * with the given `title` and callback `fn` - * acting as a thunk. - */ - - context.it = context.specify = function(title, fn){ - var suite = suites[0]; - if (suite.pending) var fn = null; - var test = new Test(title, fn); - suite.addTest(test); - return test; - }; - - /** - * Exclusive test-case. - */ - - context.it.only = function(title, fn){ - var test = context.it(title, fn); - var reString = '^' + utils.escapeRegexp(test.fullTitle()) + '$'; - mocha.grep(new RegExp(reString)); - }; - - /** - * Pending test case. - */ - - context.xit = - context.xspecify = - context.it.skip = function(title){ - context.it(title); - }; - }); -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/interfaces/exports.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/interfaces/exports.js deleted file mode 100644 index 6b229c0f..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/interfaces/exports.js +++ /dev/null @@ -1,60 +0,0 @@ - -/** - * Module dependencies. - */ - -var Suite = require('../suite') - , Test = require('../test'); - -/** - * TDD-style interface: - * - * exports.Array = { - * '#indexOf()': { - * 'should return -1 when the value is not present': function(){ - * - * }, - * - * 'should return the correct index when the value is present': function(){ - * - * } - * } - * }; - * - */ - -module.exports = function(suite){ - var suites = [suite]; - - suite.on('require', visit); - - function visit(obj) { - var suite; - for (var key in obj) { - if ('function' == typeof obj[key]) { - var fn = obj[key]; - switch (key) { - case 'before': - suites[0].beforeAll(fn); - break; - case 'after': - suites[0].afterAll(fn); - break; - case 'beforeEach': - suites[0].beforeEach(fn); - break; - case 'afterEach': - suites[0].afterEach(fn); - break; - default: - suites[0].addTest(new Test(key, fn)); - } - } else { - var suite = Suite.create(suites[0], key); - suites.unshift(suite); - visit(obj[key]); - suites.shift(); - } - } - } -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/interfaces/index.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/interfaces/index.js deleted file mode 100644 index f7b2655e..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/interfaces/index.js +++ /dev/null @@ -1,5 +0,0 @@ - -exports.bdd = require('./bdd'); -exports.tdd = require('./tdd'); -exports.qunit = require('./qunit'); -exports.exports = require('./exports'); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/interfaces/qunit.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/interfaces/qunit.js deleted file mode 100644 index 30f6748f..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/interfaces/qunit.js +++ /dev/null @@ -1,122 +0,0 @@ - -/** - * Module dependencies. - */ - -var Suite = require('../suite') - , Test = require('../test') - , utils = require('../utils'); - -/** - * QUnit-style interface: - * - * suite('Array'); - * - * test('#length', function(){ - * var arr = [1,2,3]; - * ok(arr.length == 3); - * }); - * - * test('#indexOf()', function(){ - * var arr = [1,2,3]; - * ok(arr.indexOf(1) == 0); - * ok(arr.indexOf(2) == 1); - * ok(arr.indexOf(3) == 2); - * }); - * - * suite('String'); - * - * test('#length', function(){ - * ok('foo'.length == 3); - * }); - * - */ - -module.exports = function(suite){ - var suites = [suite]; - - suite.on('pre-require', function(context, file, mocha){ - - /** - * Execute before running tests. - */ - - context.before = function(fn){ - suites[0].beforeAll(fn); - }; - - /** - * Execute after running tests. - */ - - context.after = function(fn){ - suites[0].afterAll(fn); - }; - - /** - * Execute before each test case. - */ - - context.beforeEach = function(fn){ - suites[0].beforeEach(fn); - }; - - /** - * Execute after each test case. - */ - - context.afterEach = function(fn){ - suites[0].afterEach(fn); - }; - - /** - * Describe a "suite" with the given `title`. - */ - - context.suite = function(title){ - if (suites.length > 1) suites.shift(); - var suite = Suite.create(suites[0], title); - suites.unshift(suite); - return suite; - }; - - /** - * Exclusive test-case. - */ - - context.suite.only = function(title, fn){ - var suite = context.suite(title, fn); - mocha.grep(suite.fullTitle()); - }; - - /** - * Describe a specification or test-case - * with the given `title` and callback `fn` - * acting as a thunk. - */ - - context.test = function(title, fn){ - var test = new Test(title, fn); - suites[0].addTest(test); - return test; - }; - - /** - * Exclusive test-case. - */ - - context.test.only = function(title, fn){ - var test = context.test(title, fn); - var reString = '^' + utils.escapeRegexp(test.fullTitle()) + '$'; - mocha.grep(new RegExp(reString)); - }; - - /** - * Pending test case. - */ - - context.test.skip = function(title){ - context.test(title); - }; - }); -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/interfaces/tdd.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/interfaces/tdd.js deleted file mode 100644 index da5ca2c5..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/interfaces/tdd.js +++ /dev/null @@ -1,138 +0,0 @@ - -/** - * Module dependencies. - */ - -var Suite = require('../suite') - , Test = require('../test') - , utils = require('../utils');; - -/** - * TDD-style interface: - * - * suite('Array', function(){ - * suite('#indexOf()', function(){ - * suiteSetup(function(){ - * - * }); - * - * test('should return -1 when not present', function(){ - * - * }); - * - * test('should return the index when present', function(){ - * - * }); - * - * suiteTeardown(function(){ - * - * }); - * }); - * }); - * - */ - -module.exports = function(suite){ - var suites = [suite]; - - suite.on('pre-require', function(context, file, mocha){ - - /** - * Execute before each test case. - */ - - context.setup = function(fn){ - suites[0].beforeEach(fn); - }; - - /** - * Execute after each test case. - */ - - context.teardown = function(fn){ - suites[0].afterEach(fn); - }; - - /** - * Execute before the suite. - */ - - context.suiteSetup = function(fn){ - suites[0].beforeAll(fn); - }; - - /** - * Execute after the suite. - */ - - context.suiteTeardown = function(fn){ - suites[0].afterAll(fn); - }; - - /** - * Describe a "suite" with the given `title` - * and callback `fn` containing nested suites - * and/or tests. - */ - - context.suite = function(title, fn){ - var suite = Suite.create(suites[0], title); - suites.unshift(suite); - fn.call(suite); - suites.shift(); - return suite; - }; - - /** - * Pending suite. - */ - context.suite.skip = function(title, fn) { - var suite = Suite.create(suites[0], title); - suite.pending = true; - suites.unshift(suite); - fn.call(suite); - suites.shift(); - }; - - /** - * Exclusive test-case. - */ - - context.suite.only = function(title, fn){ - var suite = context.suite(title, fn); - mocha.grep(suite.fullTitle()); - }; - - /** - * Describe a specification or test-case - * with the given `title` and callback `fn` - * acting as a thunk. - */ - - context.test = function(title, fn){ - var suite = suites[0]; - if (suite.pending) var fn = null; - var test = new Test(title, fn); - suite.addTest(test); - return test; - }; - - /** - * Exclusive test-case. - */ - - context.test.only = function(title, fn){ - var test = context.test(title, fn); - var reString = '^' + utils.escapeRegexp(test.fullTitle()) + '$'; - mocha.grep(new RegExp(reString)); - }; - - /** - * Pending test case. - */ - - context.test.skip = function(title){ - context.test(title); - }; - }); -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/mocha.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/mocha.js deleted file mode 100644 index 950cfadb..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/mocha.js +++ /dev/null @@ -1,317 +0,0 @@ -/*! - * mocha - * Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca> - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var path = require('path') - , utils = require('./utils'); - -/** - * Expose `Mocha`. - */ - -exports = module.exports = Mocha; - -/** - * Expose internals. - */ - -exports.utils = utils; -exports.interfaces = require('./interfaces'); -exports.reporters = require('./reporters'); -exports.Runnable = require('./runnable'); -exports.Context = require('./context'); -exports.Runner = require('./runner'); -exports.Suite = require('./suite'); -exports.Hook = require('./hook'); -exports.Test = require('./test'); - -/** - * Return image `name` path. - * - * @param {String} name - * @return {String} - * @api private - */ - -function image(name) { - return __dirname + '/../images/' + name + '.png'; -} - -/** - * Setup mocha with `options`. - * - * Options: - * - * - `ui` name "bdd", "tdd", "exports" etc - * - `reporter` reporter instance, defaults to `mocha.reporters.Dot` - * - `globals` array of accepted globals - * - `timeout` timeout in milliseconds - * - `bail` bail on the first test failure - * - `slow` milliseconds to wait before considering a test slow - * - `ignoreLeaks` ignore global leaks - * - `grep` string or regexp to filter tests with - * - * @param {Object} options - * @api public - */ - -function Mocha(options) { - options = options || {}; - this.files = []; - this.options = options; - this.grep(options.grep); - this.suite = new exports.Suite('', new exports.Context); - this.ui(options.ui); - this.bail(options.bail); - this.reporter(options.reporter); - if (null != options.timeout) this.timeout(options.timeout); - if (options.slow) this.slow(options.slow); -} - -/** - * Enable or disable bailing on the first failure. - * - * @param {Boolean} [bail] - * @api public - */ - -Mocha.prototype.bail = function(bail){ - if (0 == arguments.length) bail = true; - this.suite.bail(bail); - return this; -}; - -/** - * Add test `file`. - * - * @param {String} file - * @api public - */ - -Mocha.prototype.addFile = function(file){ - this.files.push(file); - return this; -}; - -/** - * Set reporter to `reporter`, defaults to "dot". - * - * @param {String|Function} reporter name or constructor - * @api public - */ - -Mocha.prototype.reporter = function(reporter){ - if ('function' == typeof reporter) { - this._reporter = reporter; - } else { - reporter = reporter || 'dot'; - try { - this._reporter = require('./reporters/' + reporter); - } catch (err) { - this._reporter = require(reporter); - } - if (!this._reporter) throw new Error('invalid reporter "' + reporter + '"'); - } - return this; -}; - -/** - * Set test UI `name`, defaults to "bdd". - * - * @param {String} bdd - * @api public - */ - -Mocha.prototype.ui = function(name){ - name = name || 'bdd'; - this._ui = exports.interfaces[name]; - if (!this._ui) throw new Error('invalid interface "' + name + '"'); - this._ui = this._ui(this.suite); - return this; -}; - -/** - * Load registered files. - * - * @api private - */ - -Mocha.prototype.loadFiles = function(fn){ - var self = this; - var suite = this.suite; - var pending = this.files.length; - this.files.forEach(function(file){ - file = path.resolve(file); - suite.emit('pre-require', global, file, self); - suite.emit('require', require(file), file, self); - suite.emit('post-require', global, file, self); - --pending || (fn && fn()); - }); -}; - -/** - * Enable growl support. - * - * @api private - */ - -Mocha.prototype._growl = function(runner, reporter) { - var notify = require('growl'); - - runner.on('end', function(){ - var stats = reporter.stats; - if (stats.failures) { - var msg = stats.failures + ' of ' + runner.total + ' tests failed'; - notify(msg, { name: 'mocha', title: 'Failed', image: image('error') }); - } else { - notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', { - name: 'mocha' - , title: 'Passed' - , image: image('ok') - }); - } - }); -}; - -/** - * Add regexp to grep, if `re` is a string it is escaped. - * - * @param {RegExp|String} re - * @return {Mocha} - * @api public - */ - -Mocha.prototype.grep = function(re){ - this.options.grep = 'string' == typeof re - ? new RegExp(utils.escapeRegexp(re)) - : re; - return this; -}; - -/** - * Invert `.grep()` matches. - * - * @return {Mocha} - * @api public - */ - -Mocha.prototype.invert = function(){ - this.options.invert = true; - return this; -}; - -/** - * Ignore global leaks. - * - * @param {Boolean} ignore - * @return {Mocha} - * @api public - */ - -Mocha.prototype.ignoreLeaks = function(ignore){ - this.options.ignoreLeaks = !!ignore; - return this; -}; - -/** - * Enable global leak checking. - * - * @return {Mocha} - * @api public - */ - -Mocha.prototype.checkLeaks = function(){ - this.options.ignoreLeaks = false; - return this; -}; - -/** - * Enable growl support. - * - * @return {Mocha} - * @api public - */ - -Mocha.prototype.growl = function(){ - this.options.growl = true; - return this; -}; - -/** - * Ignore `globals` array or string. - * - * @param {Array|String} globals - * @return {Mocha} - * @api public - */ - -Mocha.prototype.globals = function(globals){ - this.options.globals = (this.options.globals || []).concat(globals); - return this; -}; - -/** - * Set the timeout in milliseconds. - * - * @param {Number} timeout - * @return {Mocha} - * @api public - */ - -Mocha.prototype.timeout = function(timeout){ - this.suite.timeout(timeout); - return this; -}; - -/** - * Set slowness threshold in milliseconds. - * - * @param {Number} slow - * @return {Mocha} - * @api public - */ - -Mocha.prototype.slow = function(slow){ - this.suite.slow(slow); - return this; -}; - -/** - * Makes all tests async (accepting a callback) - * - * @return {Mocha} - * @api public - */ - -Mocha.prototype.asyncOnly = function(){ - this.options.asyncOnly = true; - return this; -}; - -/** - * Run tests and invoke `fn()` when complete. - * - * @param {Function} fn - * @return {Runner} - * @api public - */ - -Mocha.prototype.run = function(fn){ - if (this.files.length) this.loadFiles(); - var suite = this.suite; - var options = this.options; - var runner = new exports.Runner(suite); - var reporter = new this._reporter(runner); - runner.ignoreLeaks = false !== options.ignoreLeaks; - runner.asyncOnly = options.asyncOnly; - if (options.grep) runner.grep(options.grep, options.invert); - if (options.globals) runner.globals(options.globals); - if (options.growl) this._growl(runner, reporter); - return runner.run(fn); -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/ms.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/ms.js deleted file mode 100644 index c5847f8d..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/ms.js +++ /dev/null @@ -1,111 +0,0 @@ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} options - * @return {String|Number} - * @api public - */ - -module.exports = function(val, options){ - options = options || {}; - if ('string' == typeof val) return parse(val); - return options.long - ? long(val) - : short(val); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - var match = /^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(str); - if (!match) return; - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'y': - return n * y; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 's': - return n * s; - case 'ms': - return n; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function short(ms) { - if (ms >= d) return Math.round(ms / d) + 'd'; - if (ms >= h) return Math.round(ms / h) + 'h'; - if (ms >= m) return Math.round(ms / m) + 'm'; - if (ms >= s) return Math.round(ms / s) + 's'; - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function long(ms) { - return plural(ms, d, 'day') - || plural(ms, h, 'hour') - || plural(ms, m, 'minute') - || plural(ms, s, 'second') - || ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, n, name) { - if (ms < n) return; - if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name; - return Math.ceil(ms / n) + ' ' + name + 's'; -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/base.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/base.js deleted file mode 100644 index b8d9f822..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/base.js +++ /dev/null @@ -1,401 +0,0 @@ - -/** - * Module dependencies. - */ - -var tty = require('tty') - , diff = require('diff') - , ms = require('../ms'); - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Check if both stdio streams are associated with a tty. - */ - -var isatty = tty.isatty(1) && tty.isatty(2); - -/** - * Expose `Base`. - */ - -exports = module.exports = Base; - -/** - * Enable coloring by default. - */ - -exports.useColors = isatty; - -/** - * Default color map. - */ - -exports.colors = { - 'pass': 90 - , 'fail': 31 - , 'bright pass': 92 - , 'bright fail': 91 - , 'bright yellow': 93 - , 'pending': 36 - , 'suite': 0 - , 'error title': 0 - , 'error message': 31 - , 'error stack': 90 - , 'checkmark': 32 - , 'fast': 90 - , 'medium': 33 - , 'slow': 31 - , 'green': 32 - , 'light': 90 - , 'diff gutter': 90 - , 'diff added': 42 - , 'diff removed': 41 -}; - -/** - * Default symbol map. - */ - -exports.symbols = { - ok: '✓', - err: '✖', - dot: '․' -}; - -// With node.js on Windows: use symbols available in terminal default fonts -if ('win32' == process.platform) { - exports.symbols.ok = '\u221A'; - exports.symbols.err = '\u00D7'; - exports.symbols.dot = '.'; -} - -/** - * Color `str` with the given `type`, - * allowing colors to be disabled, - * as well as user-defined color - * schemes. - * - * @param {String} type - * @param {String} str - * @return {String} - * @api private - */ - -var color = exports.color = function(type, str) { - if (!exports.useColors) return str; - return '\u001b[' + exports.colors[type] + 'm' + str + '\u001b[0m'; -}; - -/** - * Expose term window size, with some - * defaults for when stderr is not a tty. - */ - -exports.window = { - width: isatty - ? process.stdout.getWindowSize - ? process.stdout.getWindowSize(1)[0] - : tty.getWindowSize()[1] - : 75 -}; - -/** - * Expose some basic cursor interactions - * that are common among reporters. - */ - -exports.cursor = { - hide: function(){ - process.stdout.write('\u001b[?25l'); - }, - - show: function(){ - process.stdout.write('\u001b[?25h'); - }, - - deleteLine: function(){ - process.stdout.write('\u001b[2K'); - }, - - beginningOfLine: function(){ - process.stdout.write('\u001b[0G'); - }, - - CR: function(){ - exports.cursor.deleteLine(); - exports.cursor.beginningOfLine(); - } -}; - -/** - * Outut the given `failures` as a list. - * - * @param {Array} failures - * @api public - */ - -exports.list = function(failures){ - console.error(); - failures.forEach(function(test, i){ - // format - var fmt = color('error title', ' %s) %s:\n') - + color('error message', ' %s') - + color('error stack', '\n%s\n'); - - // msg - var err = test.err - , message = err.message || '' - , stack = err.stack || message - , index = stack.indexOf(message) + message.length - , msg = stack.slice(0, index) - , actual = err.actual - , expected = err.expected - , escape = true; - - // uncaught - if (err.uncaught) { - msg = 'Uncaught ' + msg; - } - - // explicitly show diff - if (err.showDiff && sameType(actual, expected)) { - escape = false; - err.actual = actual = stringify(actual); - err.expected = expected = stringify(expected); - } - - // actual / expected diff - if ('string' == typeof actual && 'string' == typeof expected) { - msg = errorDiff(err, 'WordsWithSpace', escape); - - // linenos - var lines = msg.split('\n'); - if (lines.length > 4) { - var width = String(lines.length).length; - msg = lines.map(function(str, i){ - return pad(++i, width) + ' |' + ' ' + str; - }).join('\n'); - } - - // legend - msg = '\n' - + color('diff removed', 'actual') - + ' ' - + color('diff added', 'expected') - + '\n\n' - + msg - + '\n'; - - // indent - msg = msg.replace(/^/gm, ' '); - - fmt = color('error title', ' %s) %s:\n%s') - + color('error stack', '\n%s\n'); - } - - // indent stack trace without msg - stack = stack.slice(index ? index + 1 : index) - .replace(/^/gm, ' '); - - console.error(fmt, (i + 1), test.fullTitle(), msg, stack); - }); -}; - -/** - * Initialize a new `Base` reporter. - * - * All other reporters generally - * inherit from this reporter, providing - * stats such as test duration, number - * of tests passed / failed etc. - * - * @param {Runner} runner - * @api public - */ - -function Base(runner) { - var self = this - , stats = this.stats = { suites: 0, tests: 0, passes: 0, pending: 0, failures: 0 } - , failures = this.failures = []; - - if (!runner) return; - this.runner = runner; - - runner.stats = stats; - - runner.on('start', function(){ - stats.start = new Date; - }); - - runner.on('suite', function(suite){ - stats.suites = stats.suites || 0; - suite.root || stats.suites++; - }); - - runner.on('test end', function(test){ - stats.tests = stats.tests || 0; - stats.tests++; - }); - - runner.on('pass', function(test){ - stats.passes = stats.passes || 0; - - var medium = test.slow() / 2; - test.speed = test.duration > test.slow() - ? 'slow' - : test.duration > medium - ? 'medium' - : 'fast'; - - stats.passes++; - }); - - runner.on('fail', function(test, err){ - stats.failures = stats.failures || 0; - stats.failures++; - test.err = err; - failures.push(test); - }); - - runner.on('end', function(){ - stats.end = new Date; - stats.duration = new Date - stats.start; - }); - - runner.on('pending', function(){ - stats.pending++; - }); -} - -/** - * Output common epilogue used by many of - * the bundled reporters. - * - * @api public - */ - -Base.prototype.epilogue = function(){ - var stats = this.stats; - var tests; - var fmt; - - console.log(); - - // passes - fmt = color('bright pass', ' ') - + color('green', ' %d passing') - + color('light', ' (%s)'); - - console.log(fmt, - stats.passes || 0, - ms(stats.duration)); - - // pending - if (stats.pending) { - fmt = color('pending', ' ') - + color('pending', ' %d pending'); - - console.log(fmt, stats.pending); - } - - // failures - if (stats.failures) { - fmt = color('fail', ' %d failing'); - - console.error(fmt, - stats.failures); - - Base.list(this.failures); - console.error(); - } - - console.log(); -}; - -/** - * Pad the given `str` to `len`. - * - * @param {String} str - * @param {String} len - * @return {String} - * @api private - */ - -function pad(str, len) { - str = String(str); - return Array(len - str.length + 1).join(' ') + str; -} - -/** - * Return a character diff for `err`. - * - * @param {Error} err - * @return {String} - * @api private - */ - -function errorDiff(err, type, escape) { - return diff['diff' + type](err.actual, err.expected).map(function(str){ - if (escape) { - str.value = str.value - .replace(/\t/g, '<tab>') - .replace(/\r/g, '<CR>') - .replace(/\n/g, '<LF>\n'); - } - if (str.added) return colorLines('diff added', str.value); - if (str.removed) return colorLines('diff removed', str.value); - return str.value; - }).join(''); -} - -/** - * Color lines for `str`, using the color `name`. - * - * @param {String} name - * @param {String} str - * @return {String} - * @api private - */ - -function colorLines(name, str) { - return str.split('\n').map(function(str){ - return color(name, str); - }).join('\n'); -} - -/** - * Stringify `obj`. - * - * @param {Mixed} obj - * @return {String} - * @api private - */ - -function stringify(obj) { - if (obj instanceof RegExp) return obj.toString(); - return JSON.stringify(obj, null, 2); -} - -/** - * Check that a / b have the same type. - * - * @param {Object} a - * @param {Object} b - * @return {Boolean} - * @api private - */ - -function sameType(a, b) { - a = Object.prototype.toString.call(a); - b = Object.prototype.toString.call(b); - return a == b; -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/doc.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/doc.js deleted file mode 100644 index 2e5bf57f..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/doc.js +++ /dev/null @@ -1,56 +0,0 @@ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils'); - -/** - * Expose `Doc`. - */ - -exports = module.exports = Doc; - -/** - * Initialize a new `Doc` reporter. - * - * @param {Runner} runner - * @api public - */ - -function Doc(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , total = runner.total - , indents = 2; - - function indent() { - return Array(indents).join(' '); - } - - runner.on('suite', function(suite){ - if (suite.root) return; - ++indents; - console.log('%s<section class="suite">', indent()); - ++indents; - console.log('%s<h1>%s</h1>', indent(), utils.escape(suite.title)); - console.log('%s<dl>', indent()); - }); - - runner.on('suite end', function(suite){ - if (suite.root) return; - console.log('%s</dl>', indent()); - --indents; - console.log('%s</section>', indent()); - --indents; - }); - - runner.on('pass', function(test){ - console.log('%s <dt>%s</dt>', indent(), utils.escape(test.title)); - var code = utils.escape(utils.clean(test.fn.toString())); - console.log('%s <dd><pre><code>%s</code></pre></dd>', indent(), code); - }); -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/dot.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/dot.js deleted file mode 100644 index 0c298ba7..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/dot.js +++ /dev/null @@ -1,62 +0,0 @@ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , color = Base.color; - -/** - * Expose `Dot`. - */ - -exports = module.exports = Dot; - -/** - * Initialize a new `Dot` matrix test reporter. - * - * @param {Runner} runner - * @api public - */ - -function Dot(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , width = Base.window.width * .75 | 0 - , n = 0; - - runner.on('start', function(){ - process.stdout.write('\n '); - }); - - runner.on('pending', function(test){ - process.stdout.write(color('pending', Base.symbols.dot)); - }); - - runner.on('pass', function(test){ - if (++n % width == 0) process.stdout.write('\n '); - if ('slow' == test.speed) { - process.stdout.write(color('bright yellow', Base.symbols.dot)); - } else { - process.stdout.write(color(test.speed, Base.symbols.dot)); - } - }); - - runner.on('fail', function(test, err){ - if (++n % width == 0) process.stdout.write('\n '); - process.stdout.write(color('fail', Base.symbols.dot)); - }); - - runner.on('end', function(){ - console.log(); - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ - -Dot.prototype.__proto__ = Base.prototype; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/html-cov.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/html-cov.js deleted file mode 100644 index bfb27ffd..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/html-cov.js +++ /dev/null @@ -1,51 +0,0 @@ - -/** - * Module dependencies. - */ - -var JSONCov = require('./json-cov') - , fs = require('fs'); - -/** - * Expose `HTMLCov`. - */ - -exports = module.exports = HTMLCov; - -/** - * Initialize a new `JsCoverage` reporter. - * - * @param {Runner} runner - * @api public - */ - -function HTMLCov(runner) { - var jade = require('jade') - , file = __dirname + '/templates/coverage.jade' - , str = fs.readFileSync(file, 'utf8') - , fn = jade.compile(str, { filename: file }) - , self = this; - - JSONCov.call(this, runner, false); - - runner.on('end', function(){ - process.stdout.write(fn({ - cov: self.cov - , coverageClass: coverageClass - })); - }); -} - -/** - * Return coverage class for `n`. - * - * @return {String} - * @api private - */ - -function coverageClass(n) { - if (n >= 75) return 'high'; - if (n >= 50) return 'medium'; - if (n >= 25) return 'low'; - return 'terrible'; -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/html.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/html.js deleted file mode 100644 index f09279be..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/html.js +++ /dev/null @@ -1,253 +0,0 @@ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils') - , Progress = require('../browser/progress') - , escape = utils.escape; - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Expose `Doc`. - */ - -exports = module.exports = HTML; - -/** - * Stats template. - */ - -var statsTemplate = '<ul id="mocha-stats">' - + '<li class="progress"><canvas width="40" height="40"></canvas></li>' - + '<li class="passes"><a href="#">passes:</a> <em>0</em></li>' - + '<li class="failures"><a href="#">failures:</a> <em>0</em></li>' - + '<li class="duration">duration: <em>0</em>s</li>' - + '</ul>'; - -/** - * Initialize a new `Doc` reporter. - * - * @param {Runner} runner - * @api public - */ - -function HTML(runner, root) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , total = runner.total - , stat = fragment(statsTemplate) - , items = stat.getElementsByTagName('li') - , passes = items[1].getElementsByTagName('em')[0] - , passesLink = items[1].getElementsByTagName('a')[0] - , failures = items[2].getElementsByTagName('em')[0] - , failuresLink = items[2].getElementsByTagName('a')[0] - , duration = items[3].getElementsByTagName('em')[0] - , canvas = stat.getElementsByTagName('canvas')[0] - , report = fragment('<ul id="mocha-report"></ul>') - , stack = [report] - , progress - , ctx - - root = root || document.getElementById('mocha'); - - if (canvas.getContext) { - var ratio = window.devicePixelRatio || 1; - canvas.style.width = canvas.width; - canvas.style.height = canvas.height; - canvas.width *= ratio; - canvas.height *= ratio; - ctx = canvas.getContext('2d'); - ctx.scale(ratio, ratio); - progress = new Progress; - } - - if (!root) return error('#mocha div missing, add it to your document'); - - // pass toggle - on(passesLink, 'click', function(){ - unhide(); - var name = /pass/.test(report.className) ? '' : ' pass'; - report.className = report.className.replace(/fail|pass/g, '') + name; - if (report.className.trim()) hideSuitesWithout('test pass'); - }); - - // failure toggle - on(failuresLink, 'click', function(){ - unhide(); - var name = /fail/.test(report.className) ? '' : ' fail'; - report.className = report.className.replace(/fail|pass/g, '') + name; - if (report.className.trim()) hideSuitesWithout('test fail'); - }); - - root.appendChild(stat); - root.appendChild(report); - - if (progress) progress.size(40); - - runner.on('suite', function(suite){ - if (suite.root) return; - - // suite - var url = '?grep=' + encodeURIComponent(suite.fullTitle()); - var el = fragment('<li class="suite"><h1><a href="%s">%s</a></h1></li>', url, escape(suite.title)); - - // container - stack[0].appendChild(el); - stack.unshift(document.createElement('ul')); - el.appendChild(stack[0]); - }); - - runner.on('suite end', function(suite){ - if (suite.root) return; - stack.shift(); - }); - - runner.on('fail', function(test, err){ - if ('hook' == test.type) runner.emit('test end', test); - }); - - runner.on('test end', function(test){ - // TODO: add to stats - var percent = stats.tests / this.total * 100 | 0; - if (progress) progress.update(percent).draw(ctx); - - // update stats - var ms = new Date - stats.start; - text(passes, stats.passes); - text(failures, stats.failures); - text(duration, (ms / 1000).toFixed(2)); - - // test - if ('passed' == test.state) { - var el = fragment('<li class="test pass %e"><h2>%e<span class="duration">%ems</span> <a href="?grep=%e" class="replay">‣</a></h2></li>', test.speed, test.title, test.duration, encodeURIComponent(test.fullTitle())); - } else if (test.pending) { - var el = fragment('<li class="test pass pending"><h2>%e</h2></li>', test.title); - } else { - var el = fragment('<li class="test fail"><h2>%e <a href="?grep=%e" class="replay">‣</a></h2></li>', test.title, encodeURIComponent(test.fullTitle())); - var str = test.err.stack || test.err.toString(); - - // FF / Opera do not add the message - if (!~str.indexOf(test.err.message)) { - str = test.err.message + '\n' + str; - } - - // <=IE7 stringifies to [Object Error]. Since it can be overloaded, we - // check for the result of the stringifying. - if ('[object Error]' == str) str = test.err.message; - - // Safari doesn't give you a stack. Let's at least provide a source line. - if (!test.err.stack && test.err.sourceURL && test.err.line !== undefined) { - str += "\n(" + test.err.sourceURL + ":" + test.err.line + ")"; - } - - el.appendChild(fragment('<pre class="error">%e</pre>', str)); - } - - // toggle code - // TODO: defer - if (!test.pending) { - var h2 = el.getElementsByTagName('h2')[0]; - - on(h2, 'click', function(){ - pre.style.display = 'none' == pre.style.display - ? 'block' - : 'none'; - }); - - var pre = fragment('<pre><code>%e</code></pre>', utils.clean(test.fn.toString())); - el.appendChild(pre); - pre.style.display = 'none'; - } - - // Don't call .appendChild if #mocha-report was already .shift()'ed off the stack. - if (stack[0]) stack[0].appendChild(el); - }); -} - -/** - * Display error `msg`. - */ - -function error(msg) { - document.body.appendChild(fragment('<div id="mocha-error">%s</div>', msg)); -} - -/** - * Return a DOM fragment from `html`. - */ - -function fragment(html) { - var args = arguments - , div = document.createElement('div') - , i = 1; - - div.innerHTML = html.replace(/%([se])/g, function(_, type){ - switch (type) { - case 's': return String(args[i++]); - case 'e': return escape(args[i++]); - } - }); - - return div.firstChild; -} - -/** - * Check for suites that do not have elements - * with `classname`, and hide them. - */ - -function hideSuitesWithout(classname) { - var suites = document.getElementsByClassName('suite'); - for (var i = 0; i < suites.length; i++) { - var els = suites[i].getElementsByClassName(classname); - if (0 == els.length) suites[i].className += ' hidden'; - } -} - -/** - * Unhide .hidden suites. - */ - -function unhide() { - var els = document.getElementsByClassName('suite hidden'); - for (var i = 0; i < els.length; ++i) { - els[i].className = els[i].className.replace('suite hidden', 'suite'); - } -} - -/** - * Set `el` text to `str`. - */ - -function text(el, str) { - if (el.textContent) { - el.textContent = str; - } else { - el.innerText = str; - } -} - -/** - * Listen on `event` with callback `fn`. - */ - -function on(el, event, fn) { - if (el.addEventListener) { - el.addEventListener(event, fn, false); - } else { - el.attachEvent('on' + event, fn); - } -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/index.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/index.js deleted file mode 100644 index 4750f26d..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/index.js +++ /dev/null @@ -1,19 +0,0 @@ - -exports.Base = require('./base'); -exports.Dot = require('./dot'); -exports.Doc = require('./doc'); -exports.TAP = require('./tap'); -exports.JSON = require('./json'); -exports.HTML = require('./html'); -exports.List = require('./list'); -exports.Min = require('./min'); -exports.Spec = require('./spec'); -exports.Nyan = require('./nyan'); -exports.XUnit = require('./xunit'); -exports.Markdown = require('./markdown'); -exports.Progress = require('./progress'); -exports.Landing = require('./landing'); -exports.JSONCov = require('./json-cov'); -exports.HTMLCov = require('./html-cov'); -exports.JSONStream = require('./json-stream'); -exports.Teamcity = require('./teamcity'); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/json-cov.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/json-cov.js deleted file mode 100644 index 73d00093..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/json-cov.js +++ /dev/null @@ -1,153 +0,0 @@ - -/** - * Module dependencies. - */ - -var Base = require('./base'); - -/** - * Expose `JSONCov`. - */ - -exports = module.exports = JSONCov; - -/** - * Initialize a new `JsCoverage` reporter. - * - * @param {Runner} runner - * @param {Boolean} output - * @api public - */ - -function JSONCov(runner, output) { - var self = this - , output = 1 == arguments.length ? true : output; - - Base.call(this, runner); - - var tests = [] - , failures = [] - , passes = []; - - runner.on('test end', function(test){ - tests.push(test); - }); - - runner.on('pass', function(test){ - passes.push(test); - }); - - runner.on('fail', function(test){ - failures.push(test); - }); - - runner.on('end', function(){ - var cov = global._$jscoverage || {}; - var result = self.cov = map(cov); - result.stats = self.stats; - result.tests = tests.map(clean); - result.failures = failures.map(clean); - result.passes = passes.map(clean); - if (!output) return; - process.stdout.write(JSON.stringify(result, null, 2 )); - }); -} - -/** - * Map jscoverage data to a JSON structure - * suitable for reporting. - * - * @param {Object} cov - * @return {Object} - * @api private - */ - -function map(cov) { - var ret = { - instrumentation: 'node-jscoverage' - , sloc: 0 - , hits: 0 - , misses: 0 - , coverage: 0 - , files: [] - }; - - for (var filename in cov) { - var data = coverage(filename, cov[filename]); - ret.files.push(data); - ret.hits += data.hits; - ret.misses += data.misses; - ret.sloc += data.sloc; - } - - ret.files.sort(function(a, b) { - return a.filename.localeCompare(b.filename); - }); - - if (ret.sloc > 0) { - ret.coverage = (ret.hits / ret.sloc) * 100; - } - - return ret; -}; - -/** - * Map jscoverage data for a single source file - * to a JSON structure suitable for reporting. - * - * @param {String} filename name of the source file - * @param {Object} data jscoverage coverage data - * @return {Object} - * @api private - */ - -function coverage(filename, data) { - var ret = { - filename: filename, - coverage: 0, - hits: 0, - misses: 0, - sloc: 0, - source: {} - }; - - data.source.forEach(function(line, num){ - num++; - - if (data[num] === 0) { - ret.misses++; - ret.sloc++; - } else if (data[num] !== undefined) { - ret.hits++; - ret.sloc++; - } - - ret.source[num] = { - source: line - , coverage: data[num] === undefined - ? '' - : data[num] - }; - }); - - ret.coverage = ret.hits / ret.sloc * 100; - - return ret; -} - -/** - * Return a plain-object representation of `test` - * free of cyclic properties etc. - * - * @param {Object} test - * @return {Object} - * @api private - */ - -function clean(test) { - return { - title: test.title - , fullTitle: test.fullTitle() - , duration: test.duration - } -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/json-stream.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/json-stream.js deleted file mode 100644 index 7cb8fbed..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/json-stream.js +++ /dev/null @@ -1,61 +0,0 @@ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , color = Base.color; - -/** - * Expose `List`. - */ - -exports = module.exports = List; - -/** - * Initialize a new `List` test reporter. - * - * @param {Runner} runner - * @api public - */ - -function List(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , total = runner.total; - - runner.on('start', function(){ - console.log(JSON.stringify(['start', { total: total }])); - }); - - runner.on('pass', function(test){ - console.log(JSON.stringify(['pass', clean(test)])); - }); - - runner.on('fail', function(test, err){ - console.log(JSON.stringify(['fail', clean(test)])); - }); - - runner.on('end', function(){ - process.stdout.write(JSON.stringify(['end', self.stats])); - }); -} - -/** - * Return a plain-object representation of `test` - * free of cyclic properties etc. - * - * @param {Object} test - * @return {Object} - * @api private - */ - -function clean(test) { - return { - title: test.title - , fullTitle: test.fullTitle() - , duration: test.duration - } -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/json.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/json.js deleted file mode 100644 index a699f501..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/json.js +++ /dev/null @@ -1,70 +0,0 @@ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `JSON`. - */ - -exports = module.exports = JSONReporter; - -/** - * Initialize a new `JSON` reporter. - * - * @param {Runner} runner - * @api public - */ - -function JSONReporter(runner) { - var self = this; - Base.call(this, runner); - - var tests = [] - , failures = [] - , passes = []; - - runner.on('test end', function(test){ - tests.push(test); - }); - - runner.on('pass', function(test){ - passes.push(test); - }); - - runner.on('fail', function(test){ - failures.push(test); - }); - - runner.on('end', function(){ - var obj = { - stats: self.stats - , tests: tests.map(clean) - , failures: failures.map(clean) - , passes: passes.map(clean) - }; - - process.stdout.write(JSON.stringify(obj, null, 2)); - }); -} - -/** - * Return a plain-object representation of `test` - * free of cyclic properties etc. - * - * @param {Object} test - * @return {Object} - * @api private - */ - -function clean(test) { - return { - title: test.title - , fullTitle: test.fullTitle() - , duration: test.duration - } -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/landing.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/landing.js deleted file mode 100644 index bf064f64..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/landing.js +++ /dev/null @@ -1,97 +0,0 @@ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `Landing`. - */ - -exports = module.exports = Landing; - -/** - * Airplane color. - */ - -Base.colors.plane = 0; - -/** - * Airplane crash color. - */ - -Base.colors['plane crash'] = 31; - -/** - * Runway color. - */ - -Base.colors.runway = 90; - -/** - * Initialize a new `Landing` reporter. - * - * @param {Runner} runner - * @api public - */ - -function Landing(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , width = Base.window.width * .75 | 0 - , total = runner.total - , stream = process.stdout - , plane = color('plane', '✈') - , crashed = -1 - , n = 0; - - function runway() { - var buf = Array(width).join('-'); - return ' ' + color('runway', buf); - } - - runner.on('start', function(){ - stream.write('\n '); - cursor.hide(); - }); - - runner.on('test end', function(test){ - // check if the plane crashed - var col = -1 == crashed - ? width * ++n / total | 0 - : crashed; - - // show the crash - if ('failed' == test.state) { - plane = color('plane crash', '✈'); - crashed = col; - } - - // render landing strip - stream.write('\u001b[4F\n\n'); - stream.write(runway()); - stream.write('\n '); - stream.write(color('runway', Array(col).join('⋅'))); - stream.write(plane) - stream.write(color('runway', Array(width - col).join('⋅') + '\n')); - stream.write(runway()); - stream.write('\u001b[0m'); - }); - - runner.on('end', function(){ - cursor.show(); - console.log(); - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ - -Landing.prototype.__proto__ = Base.prototype; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/list.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/list.js deleted file mode 100644 index 3328e157..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/list.js +++ /dev/null @@ -1,64 +0,0 @@ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `List`. - */ - -exports = module.exports = List; - -/** - * Initialize a new `List` test reporter. - * - * @param {Runner} runner - * @api public - */ - -function List(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , n = 0; - - runner.on('start', function(){ - console.log(); - }); - - runner.on('test', function(test){ - process.stdout.write(color('pass', ' ' + test.fullTitle() + ': ')); - }); - - runner.on('pending', function(test){ - var fmt = color('checkmark', ' -') - + color('pending', ' %s'); - console.log(fmt, test.fullTitle()); - }); - - runner.on('pass', function(test){ - var fmt = color('checkmark', ' '+Base.symbols.dot) - + color('pass', ' %s: ') - + color(test.speed, '%dms'); - cursor.CR(); - console.log(fmt, test.fullTitle(), test.duration); - }); - - runner.on('fail', function(test, err){ - cursor.CR(); - console.log(color('fail', ' %d) %s'), ++n, test.fullTitle()); - }); - - runner.on('end', self.epilogue.bind(self)); -} - -/** - * Inherit from `Base.prototype`. - */ - -List.prototype.__proto__ = Base.prototype; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/markdown.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/markdown.js deleted file mode 100644 index 6383a642..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/markdown.js +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils'); - -/** - * Expose `Markdown`. - */ - -exports = module.exports = Markdown; - -/** - * Initialize a new `Markdown` reporter. - * - * @param {Runner} runner - * @api public - */ - -function Markdown(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , level = 0 - , buf = ''; - - function title(str) { - return Array(level).join('#') + ' ' + str; - } - - function indent() { - return Array(level).join(' '); - } - - function mapTOC(suite, obj) { - var ret = obj; - obj = obj[suite.title] = obj[suite.title] || { suite: suite }; - suite.suites.forEach(function(suite){ - mapTOC(suite, obj); - }); - return ret; - } - - function stringifyTOC(obj, level) { - ++level; - var buf = ''; - var link; - for (var key in obj) { - if ('suite' == key) continue; - if (key) link = ' - [' + key + '](#' + utils.slug(obj[key].suite.fullTitle()) + ')\n'; - if (key) buf += Array(level).join(' ') + link; - buf += stringifyTOC(obj[key], level); - } - --level; - return buf; - } - - function generateTOC(suite) { - var obj = mapTOC(suite, {}); - return stringifyTOC(obj, 0); - } - - generateTOC(runner.suite); - - runner.on('suite', function(suite){ - ++level; - var slug = utils.slug(suite.fullTitle()); - buf += '<a name="' + slug + '"></a>' + '\n'; - buf += title(suite.title) + '\n'; - }); - - runner.on('suite end', function(suite){ - --level; - }); - - runner.on('pass', function(test){ - var code = utils.clean(test.fn.toString()); - buf += test.title + '.\n'; - buf += '\n```js\n'; - buf += code + '\n'; - buf += '```\n\n'; - }); - - runner.on('end', function(){ - process.stdout.write('# TOC\n'); - process.stdout.write(generateTOC(runner.suite)); - process.stdout.write(buf); - }); -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/min.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/min.js deleted file mode 100644 index 1b6117d0..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/min.js +++ /dev/null @@ -1,38 +0,0 @@ - -/** - * Module dependencies. - */ - -var Base = require('./base'); - -/** - * Expose `Min`. - */ - -exports = module.exports = Min; - -/** - * Initialize a new `Min` minimal test reporter (best used with --watch). - * - * @param {Runner} runner - * @api public - */ - -function Min(runner) { - Base.call(this, runner); - - runner.on('start', function(){ - // clear screen - process.stdout.write('\u001b[2J'); - // set cursor position - process.stdout.write('\u001b[1;3H'); - }); - - runner.on('end', this.epilogue.bind(this)); -} - -/** - * Inherit from `Base.prototype`. - */ - -Min.prototype.__proto__ = Base.prototype; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/nyan.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/nyan.js deleted file mode 100644 index 4501f6b2..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/nyan.js +++ /dev/null @@ -1,260 +0,0 @@ -/** - * Module dependencies. - */ - -var Base = require('./base') - , color = Base.color; - -/** - * Expose `Dot`. - */ - -exports = module.exports = NyanCat; - -/** - * Initialize a new `Dot` matrix test reporter. - * - * @param {Runner} runner - * @api public - */ - -function NyanCat(runner) { - Base.call(this, runner); - var self = this - , stats = this.stats - , width = Base.window.width * .75 | 0 - , rainbowColors = this.rainbowColors = self.generateColors() - , colorIndex = this.colorIndex = 0 - , numerOfLines = this.numberOfLines = 4 - , trajectories = this.trajectories = [[], [], [], []] - , nyanCatWidth = this.nyanCatWidth = 11 - , trajectoryWidthMax = this.trajectoryWidthMax = (width - nyanCatWidth) - , scoreboardWidth = this.scoreboardWidth = 5 - , tick = this.tick = 0 - , n = 0; - - runner.on('start', function(){ - Base.cursor.hide(); - self.draw(); - }); - - runner.on('pending', function(test){ - self.draw(); - }); - - runner.on('pass', function(test){ - self.draw(); - }); - - runner.on('fail', function(test, err){ - self.draw(); - }); - - runner.on('end', function(){ - Base.cursor.show(); - for (var i = 0; i < self.numberOfLines; i++) write('\n'); - self.epilogue(); - }); -} - -/** - * Draw the nyan cat - * - * @api private - */ - -NyanCat.prototype.draw = function(){ - this.appendRainbow(); - this.drawScoreboard(); - this.drawRainbow(); - this.drawNyanCat(); - this.tick = !this.tick; -}; - -/** - * Draw the "scoreboard" showing the number - * of passes, failures and pending tests. - * - * @api private - */ - -NyanCat.prototype.drawScoreboard = function(){ - var stats = this.stats; - var colors = Base.colors; - - function draw(color, n) { - write(' '); - write('\u001b[' + color + 'm' + n + '\u001b[0m'); - write('\n'); - } - - draw(colors.green, stats.passes); - draw(colors.fail, stats.failures); - draw(colors.pending, stats.pending); - write('\n'); - - this.cursorUp(this.numberOfLines); -}; - -/** - * Append the rainbow. - * - * @api private - */ - -NyanCat.prototype.appendRainbow = function(){ - var segment = this.tick ? '_' : '-'; - var rainbowified = this.rainbowify(segment); - - for (var index = 0; index < this.numberOfLines; index++) { - var trajectory = this.trajectories[index]; - if (trajectory.length >= this.trajectoryWidthMax) trajectory.shift(); - trajectory.push(rainbowified); - } -}; - -/** - * Draw the rainbow. - * - * @api private - */ - -NyanCat.prototype.drawRainbow = function(){ - var self = this; - - this.trajectories.forEach(function(line, index) { - write('\u001b[' + self.scoreboardWidth + 'C'); - write(line.join('')); - write('\n'); - }); - - this.cursorUp(this.numberOfLines); -}; - -/** - * Draw the nyan cat - * - * @api private - */ - -NyanCat.prototype.drawNyanCat = function() { - var self = this; - var startWidth = this.scoreboardWidth + this.trajectories[0].length; - var color = '\u001b[' + startWidth + 'C'; - var padding = ''; - - write(color); - write('_,------,'); - write('\n'); - - write(color); - padding = self.tick ? ' ' : ' '; - write('_|' + padding + '/\\_/\\ '); - write('\n'); - - write(color); - padding = self.tick ? '_' : '__'; - var tail = self.tick ? '~' : '^'; - var face; - write(tail + '|' + padding + this.face() + ' '); - write('\n'); - - write(color); - padding = self.tick ? ' ' : ' '; - write(padding + '"" "" '); - write('\n'); - - this.cursorUp(this.numberOfLines); -}; - -/** - * Draw nyan cat face. - * - * @return {String} - * @api private - */ - -NyanCat.prototype.face = function() { - var stats = this.stats; - if (stats.failures) { - return '( x .x)'; - } else if (stats.pending) { - return '( o .o)'; - } else if(stats.passes) { - return '( ^ .^)'; - } else { - return '( - .-)'; - } -} - -/** - * Move cursor up `n`. - * - * @param {Number} n - * @api private - */ - -NyanCat.prototype.cursorUp = function(n) { - write('\u001b[' + n + 'A'); -}; - -/** - * Move cursor down `n`. - * - * @param {Number} n - * @api private - */ - -NyanCat.prototype.cursorDown = function(n) { - write('\u001b[' + n + 'B'); -}; - -/** - * Generate rainbow colors. - * - * @return {Array} - * @api private - */ - -NyanCat.prototype.generateColors = function(){ - var colors = []; - - for (var i = 0; i < (6 * 7); i++) { - var pi3 = Math.floor(Math.PI / 3); - var n = (i * (1.0 / 6)); - var r = Math.floor(3 * Math.sin(n) + 3); - var g = Math.floor(3 * Math.sin(n + 2 * pi3) + 3); - var b = Math.floor(3 * Math.sin(n + 4 * pi3) + 3); - colors.push(36 * r + 6 * g + b + 16); - } - - return colors; -}; - -/** - * Apply rainbow to the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -NyanCat.prototype.rainbowify = function(str){ - var color = this.rainbowColors[this.colorIndex % this.rainbowColors.length]; - this.colorIndex += 1; - return '\u001b[38;5;' + color + 'm' + str + '\u001b[0m'; -}; - -/** - * Stdout helper. - */ - -function write(string) { - process.stdout.write(string); -} - -/** - * Inherit from `Base.prototype`. - */ - -NyanCat.prototype.__proto__ = Base.prototype; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/progress.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/progress.js deleted file mode 100644 index 59536386..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/progress.js +++ /dev/null @@ -1,86 +0,0 @@ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `Progress`. - */ - -exports = module.exports = Progress; - -/** - * General progress bar color. - */ - -Base.colors.progress = 90; - -/** - * Initialize a new `Progress` bar test reporter. - * - * @param {Runner} runner - * @param {Object} options - * @api public - */ - -function Progress(runner, options) { - Base.call(this, runner); - - var self = this - , options = options || {} - , stats = this.stats - , width = Base.window.width * .50 | 0 - , total = runner.total - , complete = 0 - , max = Math.max; - - // default chars - options.open = options.open || '['; - options.complete = options.complete || '▬'; - options.incomplete = options.incomplete || Base.symbols.dot; - options.close = options.close || ']'; - options.verbose = false; - - // tests started - runner.on('start', function(){ - console.log(); - cursor.hide(); - }); - - // tests complete - runner.on('test end', function(){ - complete++; - var incomplete = total - complete - , percent = complete / total - , n = width * percent | 0 - , i = width - n; - - cursor.CR(); - process.stdout.write('\u001b[J'); - process.stdout.write(color('progress', ' ' + options.open)); - process.stdout.write(Array(n).join(options.complete)); - process.stdout.write(Array(i).join(options.incomplete)); - process.stdout.write(color('progress', options.close)); - if (options.verbose) { - process.stdout.write(color('progress', ' ' + complete + ' of ' + total)); - } - }); - - // tests are complete, output some stats - // and the failures if any - runner.on('end', function(){ - cursor.show(); - console.log(); - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ - -Progress.prototype.__proto__ = Base.prototype; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/spec.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/spec.js deleted file mode 100644 index cd97261c..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/spec.js +++ /dev/null @@ -1,87 +0,0 @@ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `Spec`. - */ - -exports = module.exports = Spec; - -/** - * Initialize a new `Spec` test reporter. - * - * @param {Runner} runner - * @api public - */ - -function Spec(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , indents = 0 - , n = 0; - - function indent() { - return Array(indents).join(' ') - } - - runner.on('start', function(){ - console.log(); - }); - - runner.on('suite', function(suite){ - ++indents; - console.log(color('suite', '%s%s'), indent(), suite.title); - }); - - runner.on('suite end', function(suite){ - --indents; - if (1 == indents) console.log(); - }); - - runner.on('test', function(test){ - process.stdout.write(indent() + color('pass', ' ◦ ' + test.title + ': ')); - }); - - runner.on('pending', function(test){ - var fmt = indent() + color('pending', ' - %s'); - console.log(fmt, test.title); - }); - - runner.on('pass', function(test){ - if ('fast' == test.speed) { - var fmt = indent() - + color('checkmark', ' ' + Base.symbols.ok) - + color('pass', ' %s '); - cursor.CR(); - console.log(fmt, test.title); - } else { - var fmt = indent() - + color('checkmark', ' ' + Base.symbols.ok) - + color('pass', ' %s ') - + color(test.speed, '(%dms)'); - cursor.CR(); - console.log(fmt, test.title, test.duration); - } - }); - - runner.on('fail', function(test, err){ - cursor.CR(); - console.log(indent() + color('fail', ' %d) %s'), ++n, test.title); - }); - - runner.on('end', self.epilogue.bind(self)); -} - -/** - * Inherit from `Base.prototype`. - */ - -Spec.prototype.__proto__ = Base.prototype; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/tap.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/tap.js deleted file mode 100644 index 2bcd995b..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/tap.js +++ /dev/null @@ -1,73 +0,0 @@ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `TAP`. - */ - -exports = module.exports = TAP; - -/** - * Initialize a new `TAP` reporter. - * - * @param {Runner} runner - * @api public - */ - -function TAP(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , n = 1 - , passes = 0 - , failures = 0; - - runner.on('start', function(){ - var total = runner.grepTotal(runner.suite); - console.log('%d..%d', 1, total); - }); - - runner.on('test end', function(){ - ++n; - }); - - runner.on('pending', function(test){ - console.log('ok %d %s # SKIP -', n, title(test)); - }); - - runner.on('pass', function(test){ - passes++; - console.log('ok %d %s', n, title(test)); - }); - - runner.on('fail', function(test, err){ - failures++; - console.log('not ok %d %s', n, title(test)); - if (err.stack) console.log(err.stack.replace(/^/gm, ' ')); - }); - - runner.on('end', function(){ - console.log('# tests ' + (passes + failures)); - console.log('# pass ' + passes); - console.log('# fail ' + failures); - }); -} - -/** - * Return a TAP-safe title of `test` - * - * @param {Object} test - * @return {String} - * @api private - */ - -function title(test) { - return test.fullTitle().replace(/#/g, ''); -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/teamcity.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/teamcity.js deleted file mode 100644 index 032eea7d..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/teamcity.js +++ /dev/null @@ -1,65 +0,0 @@ - -/** - * Module dependencies. - */ - -var Base = require('./base'); - -/** - * Expose `Teamcity`. - */ - -exports = module.exports = Teamcity; - -/** - * Initialize a new `Teamcity` reporter. - * - * @param {Runner} runner - * @api public - */ - -function Teamcity(runner) { - Base.call(this, runner); - var stats = this.stats; - - runner.on('start', function() { - console.log("##teamcity[testSuiteStarted name='mocha.suite']"); - }); - - runner.on('test', function(test) { - console.log("##teamcity[testStarted name='" + escape(test.fullTitle()) + "']"); - }); - - runner.on('fail', function(test, err) { - console.log("##teamcity[testFailed name='" + escape(test.fullTitle()) + "' message='" + escape(err.message) + "']"); - }); - - runner.on('pending', function(test) { - console.log("##teamcity[testIgnored name='" + escape(test.fullTitle()) + "' message='pending']"); - }); - - runner.on('test end', function(test) { - console.log("##teamcity[testFinished name='" + escape(test.fullTitle()) + "' duration='" + test.duration + "']"); - }); - - runner.on('end', function() { - console.log("##teamcity[testSuiteFinished name='mocha.suite' duration='" + stats.duration + "']"); - }); -} - -/** - * Escape the given `str`. - */ - -function escape(str) { - return str - .replace(/\|/g, "||") - .replace(/\n/g, "|n") - .replace(/\r/g, "|r") - .replace(/\[/g, "|[") - .replace(/\]/g, "|]") - .replace(/\u0085/g, "|x") - .replace(/\u2028/g, "|l") - .replace(/\u2029/g, "|p") - .replace(/'/g, "|'"); -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/templates/coverage.jade b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/templates/coverage.jade deleted file mode 100644 index b78119fb..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/templates/coverage.jade +++ /dev/null @@ -1,50 +0,0 @@ -!!! 5 -html - head - title Coverage - include script.html - include style.html - body - #coverage - h1#overview Coverage - include menu - - #stats(class=coverageClass(cov.coverage)) - .percentage #{cov.coverage | 0}% - .sloc= cov.sloc - .hits= cov.hits - .misses= cov.misses - - #files - for file in cov.files - .file - h2(id=file.filename)= file.filename - #stats(class=coverageClass(file.coverage)) - .percentage #{file.coverage | 0}% - .sloc= file.sloc - .hits= file.hits - .misses= file.misses - - table#source - thead - tr - th Line - th Hits - th Source - tbody - for line, number in file.source - if line.coverage > 0 - tr.hit - td.line= number - td.hits= line.coverage - td.source= line.source - else if 0 === line.coverage - tr.miss - td.line= number - td.hits 0 - td.source= line.source - else - tr - td.line= number - td.hits - td.source= line.source || ' ' diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/templates/menu.jade b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/templates/menu.jade deleted file mode 100644 index e9ba4648..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/templates/menu.jade +++ /dev/null @@ -1,13 +0,0 @@ -#menu - li - a(href='#overview') overview - for file in cov.files - li - span.cov(class=coverageClass(file.coverage)) #{file.coverage | 0} - a(href='##{file.filename}') - segments = file.filename.split('/') - basename = segments.pop() - if segments.length - span.dirname= segments.join('/') + '/' - span.basename= basename - a#logo(href='http://visionmedia.github.io/mocha/') m diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/templates/script.html b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/templates/script.html deleted file mode 100644 index 073cf793..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/templates/script.html +++ /dev/null @@ -1,34 +0,0 @@ -<script> - -headings = []; - -onload = function(){ - headings = document.querySelectorAll('h2'); -}; - -onscroll = function(e){ - var heading = find(window.scrollY); - if (!heading) return; - var links = document.querySelectorAll('#menu a') - , link; - - for (var i = 0, len = links.length; i < len; ++i) { - link = links[i]; - link.className = link.getAttribute('href') == '#' + heading.id - ? 'active' - : ''; - } -}; - -function find(y) { - var i = headings.length - , heading; - - while (i--) { - heading = headings[i]; - if (y >= heading.offsetTop) { - return heading; - } - } -} -</script> diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/templates/style.html b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/templates/style.html deleted file mode 100644 index 643c0ab7..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/templates/style.html +++ /dev/null @@ -1,320 +0,0 @@ -<style> - -body { - font: 14px/1.6 "Helvetica Neue", Helvetica, Arial, sans-serif; - margin: 0; - color: #2C2C2C; - border-top: 2px solid #ddd; -} - -#coverage { - padding: 60px; -} - -h1 a { - color: inherit; - font-weight: inherit; -} - -h1 a:hover { - text-decoration: none; -} - -.onload h1 { - opacity: 1; -} - -h2 { - width: 80%; - margin-top: 80px; - margin-bottom: 0; - font-weight: 100; - letter-spacing: 1px; - border-bottom: 1px solid #eee; -} - -a { - color: #8A6343; - font-weight: bold; - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - -ul { - margin-top: 20px; - padding: 0 15px; - width: 100%; -} - -ul li { - float: left; - width: 40%; - margin-top: 5px; - margin-right: 60px; - list-style: none; - border-bottom: 1px solid #eee; - padding: 5px 0; - font-size: 12px; -} - -ul::after { - content: '.'; - height: 0; - display: block; - visibility: hidden; - clear: both; -} - -code { - font: 12px monaco, monospace; -} - -pre { - margin: 30px; - padding: 30px; - border: 1px solid #eee; - border-bottom-color: #ddd; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - -webkit-box-shadow: inset 0 0 10px #eee; - -moz-box-shadow: inset 0 0 10px #eee; - box-shadow: inset 0 0 10px #eee; - overflow-x: auto; -} - -img { - margin: 30px; - padding: 1px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - -webkit-box-shadow: 0 3px 10px #dedede, 0 1px 5px #888; - -moz-box-shadow: 0 3px 10px #dedede, 0 1px 5px #888; - box-shadow: 0 3px 10px #dedede, 0 1px 5px #888; - max-width: 100%; -} - -footer { - background: #eee; - width: 100%; - padding: 50px 0; - text-align: right; - border-top: 1px solid #ddd; -} - -footer span { - display: block; - margin-right: 30px; - color: #888; - font-size: 12px; -} - -#menu { - position: fixed; - font-size: 12px; - overflow-y: auto; - top: 0; - right: 0; - margin: 0; - height: 100%; - padding: 15px 0; - text-align: right; - border-left: 1px solid #eee; - -moz-box-shadow: 0 0 2px #888 - , inset 5px 0 20px rgba(0,0,0,.5) - , inset 5px 0 3px rgba(0,0,0,.3); - -webkit-box-shadow: 0 0 2px #888 - , inset 5px 0 20px rgba(0,0,0,.5) - , inset 5px 0 3px rgba(0,0,0,.3); - box-shadow: 0 0 2px #888 - , inset 5px 0 20px rgba(0,0,0,.5) - , inset 5px 0 3px rgba(0,0,0,.3); - -webkit-font-smoothing: antialiased; - background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGYAAABmCAMAAAAOARRQAAABelBMVEUjJSU6OzshIyM5OjoqKy02NjgsLS01NTYjJCUzNTUgISMlJSc0NTUvMDA6PDwlJyg1NjYoKis2NjYrLS02ODkpKyw0NDYrLC04ODovLzA4Ojo0NDUtLy86OjwjIyU4OTosLS82ODgtLS8hIyQvMTEnKCooKSsrKy0qLCwkJSUnKCkrLCwpKiwwMjIxMzMqLC0tLS0pKissLC00NTYwMDIwMTQpKysoKSovMDEtLzA2OTkxMzUrKywvLy8qKyszNTY5OzsqKiw6OjswMDExNDUoKiozNDUvMDIyNDY1Njg2Njk5OTozMzU0NjY4ODkiIyUiIyQ4OTkuMDEmKCowMjQwMTErLS4qKywwMTMhIiMpKiopKy0tLjAkJScxNDQvLzExNDYyNDQmKCk5OTslJig5OjskJSYxMzQrLS8gISIwMTIoKCk1NTUlJSUnJygwMDA4ODgiIiMhISI8PDw6Ojo5OTkpKSojIyQ7OzsyMjIpKSssLCw6Ozw1NjlrfLakAAAg2UlEQVR42jR6i3ea6rYvPgANIAhVXh8WvkQlioUiFlFcBtAmoiRNdzxqu9p0J7vrdK29zuPeex77nnvO/35n1r1ndHRktI0jTOacv/l7lCBK5UqVpOha/YxmWK7BC4TQFKVXrbYsnimqxuuMVlOQ0XltWjUdCwRJ1M+tC1KudOs9q6+da2adUewG0SC0SwELfHtgDds93VEuydEbl3QMWeNoYkR7b/0x1ZRobGI3mLwzAhePqTAwhg6aogjNsGy7/jwQ4rkdqe7CWLxF8k9LfMVFyRS7VJqtkrW8Vt/bkR8FZJao16ipknbC3Yw2lM7laO6HBEOadEZ2tpf65c4v8e3u7FyU6qbiNNyCuzXZ6pawgnwgmrpTT/Q7w2EZmiIJ0dzWDI7mhQ80IfRnMu2kzA5r5r1pIFoia+/d93HRYp1GV8TbrkWoU/+jdI0Ff6yGwTjT1Hn8J+8m1rKpGiYPuNiHnMtNMIv+zpsk84MYTNW1/+DpwXLvckdOCMYowVNPREe0QlM8xRHXXFhcNDzupwsSmb5pH+0t0RP2Qk+QtI7F1Qm6JRC6ZPBtPq/dq/kH+jxtCljn9TIpW6rQIgmSVyj6lPICIw4N/taka41PFUInth0je9+jO6Kt1G4/a7V2LEgG02B0pHVuCZrgltSKMuIl5SyufUv9mYuQi+mFgzbBEtFo2g+Dh4sSTrLNu8JPh00sQydpb00tqXBvqRN7Q7kqzcnIxCGnvZt/WmJacoOEO6Dcn8Qre03pOCSQxbMOXUuDNx9SxuLz4W1I18gvjViQ67zV0rxdWL8Te/TQkuo8STS41DR48W7L6YP2uWIqiUV8rd6Gbf/rnegKZeG8TpAM6afhGze9JAOxbLjsnUXEbrZ9vLYd7MT32cPF5mKKxmjy7huaoD9n62GOxni3iIJwv0IzZAZjdZkUtolCNLVfYZNaquFjGszVVf+J0vrz4CawoKdHnOzb0NMH7CDBOybfYNJ4rfeMyFNjkFYVTzMFs87rnPGXLUOeNKRVc0LnU7/UIgelzsy3CMuth0YfvnY0wsD3vODUL3eJcKqHQpm8yM3XZQWJxO6Un9iYloyyLpOwN2obHy6W6gbpcb44XmyC+mg+itAcaprGcrwZCqMj/GmtKn0zPvpTz/Cv1dw21XwP3cRupg3H3MF/S71eTKj1YrdwKdc2Mw0fRmb2sFf8lW3aU6JbIZSEPqvXvjM7G/aApyXlXeqKfMq0g/Su3rUGJPSPrtGElgknrZM3xUXqsAP6zMCNVn5u8aJnSNpJv2uru7t2jfRziW2+GuhqfldUNbPk71olwo+46ePUo1U3WKk/e5YK07F/wGRgcpODmQnIlVeHCWBE4puBi2jq28UKpqiN1/4UOrGz59TNYrrQHtd+11sG40BGD+pXdelNqGOg4NXe8W4eacJV/NS9/2Umtym6WQqveqR9xdCMElpxnbkalM4Vf9uaEcWZaKdyibEIjWKxJZPN95niCL3GiaXyssIrHxoLkqkzLCXULN46/f2h3tQJgyip+Tk9EAjJ9aJshq7t8X45aowSKspMSvPf7r9R8yxNptIaHS5ozuEm6luPDApugyNP8OaqiQ4BjaequXA54SLC83eHIY2r+CZp4409Xqw8Aa2oI7XkCrQi+in0w5AqF/kLNrcUz+qkl/lAobY1jSnx5OJNhyXIz3qfNFlXc0TKaglNwdWkWYt9QQ1Kr6W8zue21iNrdJk+N5oCr2O9nEtWKC7IS5J/zdDEYrmnAYfg6agCy+qcgz7ZofeDc4PbUWSvkshWuAc7OjiUyLkj+RAtdlwXJcjxdpkTTHDhK8lBCi8+JtvDVL1W6elmOM++YS0LuSlaP1oUvAeiW3cFnvTr8EbTz1tsSMYdGeZe40sRWu5uAfj7q+ZoKv2FNQ0p5XY1lmlcigHZqTPpabufEVrNuNPi165w3uCVQJHyJqmSJ7ZHnguqwtCmwViIJijj04ba2JNYtB+yORf5gg1/9t9iw4vUpeqiunSAbf+IBdj/b+iG2qrHvuNP0Vd/+ThVZT/lrvHYjjgDbbyxaqgHNM2uhxa1GW3UedZYhMMwM4mQhltouK+IV4NdbIQNM+8Yv311RZk9kT4tiYR4LkyFcuPpdcjuhUuFqBAWRZa11lcZ3gEBlXywsNhrt+plISZP5DlsV9l4EgY6J3yZPTUcMrgaWAT3oI79eSbGEbcJpr6BD8kyDiVt+G0/hXosQN4NFXKlfWIfsIs0BHODVok1/IGnKFHJYIquh8Xo+2+bkQNTGgWmN/fZ0Y33LSj6lr1GyV7mWIKg7ZTRZPGuhF/zjRNcQ1UPtSYgnWQxSs0yrVhwNDcdGMNSNe2JT3WuzbAM3HykyAajS3Uphf6STKEqxLas9EnmnhA/lyj9Uj+JoY7SVgVmGLl46Rm2u98sbkap2lzAdKBG4r6LgulQOSSjQv1GWdQ0jtDUK/mAaqM1Uqjpu4k3Rvfvxv7YTxLSK+wN3E5jVIzmF23uZ7hiH/sVP49D7tvoKp4S8b1LuvRlivVB/algbhcFITYVXvDpLzpDfplR2uD5V4XJFxpjmIpLc9Y5sB2TpBRix7Bme6GZIq+06v3XzNeTcA4obQIKxrnT4C2JpOqD92dbmSX8MGazly5EsZVMvSU1f4RZwyu8iQXbVdeLlZrjuTT1jrY1uk5c7iZ7RsvhhluqAkq4JpVQAg7RJFtSu+xgJ8Pv6O1j5DkLxT8mkbfyRW5DrQmG7hiDIjCgBsADbjuof6YHLGeV6a5Q1Smx9joUXPpdaaDx97A/Wq00oJkdR7ZYuQRfS533JtxO1erduqWOYIt3wh0wpbLuCNIYkwxbswbikCUu2CDCS+Q+7rgVtfRcm+SOcdKPRlZ/rE7wNVUEE39KTS5uvUKN1PUnkloPkyzhyGQ8qkouEjJ3H/VXdqG6asSRiw3ecMlBvDDt8dDhBHXMwZ2Cajzjr7/76T+IavqPYvz6r7//E/3X3+N//h/0QozbjPgPiir69P/8X3/9F/yv8b/827/++98WItPu5/Hvwd8YPf5bp/2/lX/T/+Of/0MJ/lYTa+L/Ef+d9vN/3/2T6P/+jyTzu/evf6U7vxN7B6pJkRtAF6jUr8I+P8RsP/ptGhfqFk+pQ/DgAy6NJtRYJdXmp4gK7WLqLKJ+MaKhGjOojvL+SnIWrkpy0SLHDe4QuyNzaEA15mLMCcmE8Em+4HdOihW4/ZWuppJEmzeAwcDtv7MuLc9y2V5atvxXNe3S4DUMt5/Qy2LM9kSYKiVWBuKlfp4nxTntpuW03JbIlkiRvBXmT23g1I2OYe6IizUHPIq6zm6mbfsbteKmi/sg9J+ocQBMctGFO7iljo8TPN+z3jxw4do+ZwfqoR9dkNTKHyM305GpTkfhcHexVkPVGEbUOjuo9f0UMPHBFlGEx0SLvJvVRKTwW7PSew5oPme+E42+frJa9cGt2njS3dK5kIif2eYbhuSEQXEqMVfUjhGIuin0G0/W5ezJyJQy3SpMLai4M0JUWb5u1k9tny5bd1pPwYBpQuDCXZl62xg4CdVEAtflXHs6JKmP/pH6mOl796Lgopj0o8d5kKh00hxG3OSdEE/QBo9Hgr8JJqAeLDwJohG5j/DGh61Rc/+tf22/8kEnxHNCEjo0ElvvGfESZkqmz2BDcKV1H1buSkhkdg7p1IMGs2s17nYjpblrWuE2K9WEO/hcRp5e9oOF/QBmOaDtgil+oaU6szPrdwW65fOB0KUTsVUn7LFU7J8e6cxJIl9+FHw5MQMzuQJ+4oxMH3iW/5GK+hWuG0T+gTLs+fAjdtUd58TmIUq04EeyRCYCjkldow234aIgR5bqwrtZosZ+6YEqAmDqatJ9lWasz4IquKALPtd92hGI3Z2BdzzZue+REl1Om4DIWD+RrtUTOJLI+S0jHowXXdAxsGLSd40zYNuEUlOGhrwL6c7tcOtUOvpJCP7QBQS19H+GvZn05ewjlVLz+IGKoC9TyfQjLMBNmXCuqqtTdOSukZW48B0HqgSTCBrBnlFvF4CG2Su7yFzqmJFURK3UmTT3ru050r0ptUpMilYnBJWfl2Bv6kPlUuE1kxxpdzui9AubsR2N2boVSu81OulAwBqoSr1LZ0LLYOomyZHmjqnXlP72s8LnDouEJjtodBvdHaG1jMySYO7crWd90MpCRyCG14vb5IE7Arupw/y/RcCm/Tm3zK6zYj8PYNaGldiUfkB/LHWcmf2lVM+mwyU27a0qq2tscrQ/vzBjN26DnntIrOyGizzXK35yKQdYnUABkyN4saz3WD/viF+eCcsXnIajdWYJWaYHRstIis9CS+tqnFGmz2j5uzfr3Z4prqgK4XOT/PyftvjZqIm8lhkfxJ7Ol3CJF1piYBGAG8wtAk56Drw1YwmOpcz+NdfkSpSLplRXLXHL0Rquj6YW/gabqgK7Dgr6NwtH0B/AN7XrN+MVJ6AmXmUuqmQulrNNYPmH0RoDogydOKLo/QbfYNARSQQKISRCzRXU+q9WWJFL3LZW6u34CkeG97xC0NNGaJ0bvK6SnZS3zPskr5EtuCgjMWR5o2x5BqhKmDWJPRe7JMEOyRb5uUKlHaGVtq5ivSOaSliSXp9SQm2qk8MRJh10MAp9QQ2H5t59J8rjiwSZtoIfMGjlLPVNdYl/LBR0AO6WLGDmkLkIPRE45Y9MftdAK/yNu1Hn6tzOQTesgQ+8fSzB19wO91vCnO23vOWQdwJ63SJrYjdfKFW6W281PKs2k8iT9ai1cgJ4sa3xqdvmtxR8/+D1B8AKc2u+6JftryRhMWSQtoSBgIyyQGyxcnELuAasXN12oSriU4RMz1DD6RL0TSV+om7i1Yt+jEE/jnawM8cX/UhN4nkiv/w9eALrzNhXuQfOzFL0Fi6SjF7/4Qn8rLYBoa85cvgAnkCEBP+HPbEnquVXCZsMS/yzYw2Vru60P/+nJPYKkzZFjmbykzUoEqV836T5q3fP/L383dF82tx18/AZgZczMAgyeWYKmSZIqtHL+e+O4ZRcq9VI3g/qPeCoiK4pcgEqdbS0S/Be54sbVQOuJVPNBblIghzeasNu7h/g+Sz1IdhI5lCwq1nUb3Ji4OCIcqQZqtqJ5w7rXrg/DA9IgVmEGhDgGecEwnCTHffXcXs0V3OCEVzYDKS1vp/oX+ng+6XVU86UjA6FMO2RXOOOrqY1GgPvrAk9HV/BXtCu5RuwF8qgdGDLsBcui4E33ymdBip1X8uKyhIWT8qNRDsXz+gvO9UiEC0d8RG4Tf2x8H4slljgHtCBcxHLTWOYJm5H/fCPCzOgf9qgOUxTRZ0Pc6ha5yLuLVT9ntvIa6gacE99mCovdUumTQdRP4RPsS9129eEe2uSvvGh0bV4Y3QPPhPZMqhZWSMa5R0Hc1SGO4IVOQc0FrirlibTVfKRrYkD8kz3b+X65/QkUNaZdrdl3mCap0Hf3YcCw/LiouJYNbqz88UqeDYv93yO7vvXtgl4XCyAO4ODkY6W+83+LZU//p3/zXNGGrUKClCiOnL27iJZbNWDF02XXAOeFlB7IaADoMH1Yqr+UP9biyZDEa/iJt4MDeIz6GKTdLVBfWGVtRN4fdT2rgReX8UXwF2zOrradm4J0nyTgdPnai3RvzpZvCKDUqjOwD/QA6EDaMCLewX6QWYVnHY1sx1bd8ovYnPm1ZvPH+rE20lWjOCnZ66/xDt0QAl15FjfBcZp+i9OU0RNPQ0t3x2pSNWo8eiYudwsnuP1Hq6iH1LJCJynkYsfgJ0p3pF6SoQk2l+jqE8CPk+ziGJRSKjs+W5AO185umPdkYzlK4wl7TC9NxyyDP7ZoyYVoXiuS6SjnInlLWrwz1i8bGTKXX0AVQWkSfIlglW3zRJRJ8bg5VgE6ZEnqNu9B++0GNQvDQJvFize4ESNKBJP+8vA3LM4AX5SIBq08Mob+7QMTCZx4nwP/64+4BnlZC+8WtlP/CXw6t1PwMwkJ3jhP1FiXLhDF/3I6FGUzO2DSi9ABxKyyL9paZxSEz40ZCPQToDAJu1959k7QdbVxgB4icsu2s4zsTPJhcEDo+N1GX4zSk/wriRh8AqwL62972i9HJHd1ydaLXVzvKvOfGGw5RVcUVMiKXFH4APdkQU/dc5BX0YfKTNZYXCW9mb8bc8mufoQP6BbdQmT99ZjoYfr/go4TgQX9IDgztim7wyFeGMfbNaeqj8Dzs38pgcqwSv2hbqB3oSGKWKy+sesY7p57wAHldqE6NDudk/W7s/zjrK4rZFlFvaGxnSZdHbc1y47qDN6xkoK8O3bfr2j41dlJZ71rB4dlDqapPFa8N6xBrprUdtenUCHwxKNhw1uuTBh+9uU45k4REpQABN2bAO9DSLqoIL26gNroWgup5pUMxHUNSq4Gyz47vBPvilpo5f9OYI2ddAqTqmnxXERxQJ3UK8fHbVE9HagHi3+tqNRoNsArdmAxHA5LwtQo9ZAaNKUTljnokljo2x8scqVpEEIPc01fPCdHOCg0DeWBz8D5TVAAfx8aRH5X2ZYNI3ebKDZdeJ+oBDAxmRqJ30Eh2/DaeAy5diVNMpEDmXiPDsGTzBLXy8eVDdJoIafgx/gxMyQi454QrW56nCyeELgSuNNEmYkflF+t3CZQOVRWjKhIuCclmQSlAXT3+4JGG75B4t/5hQ+ldMP4LsAW6z3XmU6IJJwpnGVnsgUZhoY1fZlwTR8wSU7xRejf2uCx9Z5trVTRRJP9KnEb134dEieil6eCOGWgboI7xsqsqM99jfJLTePjygKlH2CVxxsse9QRzTBFjD/Kjqitr/CCTBt/SJ6nLxz7cKP9pFqBpp0lN5y+adKNsZjrPuroemZauH9aTTFD3EKHW8S55XBLFQAt1jgxTQCTwxmx/JyfsZDN1RroN3VaxpSenpIX7K+ZbL8VdlQDcI4Cbzg3QJLa9yVqNxUelu+EtxLVqeekaAvSJkO6sSVqbUajxqhKshNpvZqoeApF0k/0P0ikkwUcbdwc4A1ejN7Oo0O15kG7hTMoK3hZRBCX7YYeLW0wvcXx/18n/u37yLgzBYVBUvORGli+sfRcX/74uD6P4hq+7xu54TlWJLFzT63uwUDwuEDdOjJQqx7JV+ZjaEAPi7t0MMrR4Q8Rkf18uxD6RK0RKh0hL8YU+DeL97i4pa5ZSyAfXKwZRS/8gXcxdZXm62RBDj8U3sN8x95b5PpPs/mCBKYvpaA50pN5Ct/499AFTtwQ5vgeSh+NHrKIi4NVpwM/XzRaNfJD856lPE6M21zWPguFsH7jbLVyEDfRmt4VwrhCJ5VTYmcSPfGgO5clfN+vbaDZ7sakU5+2vZ2WCDY031NxJarVytfDDVtiafcTGO2rJ/taoL3zChN2qmjxofczTOYQPPVQPh0JVtYgdUQINcSiNEEy58UdYXX1MpWUCEBx7LbcGtAm8XWRQTVOaoV3ySri4RShhs/B/0m4jX6OAwXOvcA09bNSG4czEGv/Wey6V/jbTCNTW6awXdNTcA1GsPe1E9fZdGl7R0vyoVpIdJtfC6d32NNErrvq/R+d65VG+YOwRXppXxOCYyGNSf1K3x6VxAW/vtz4EC1SgCOSPdN62sLsoIzuDfg8GwZAbquVO8HIuFP/ToVoeUB7nnwMF35a1wK1tI6fkrqFKhQdeJpwyls0pIy8AZde3/6LUUbFaYJthyUJSU/kqDXTLQElnn0Jr4B2RVghNrmNmoEn7pXIeshPguXVsvwoTdmClq49JJU3LWhHyWTrJL9bRP6VKv3tZoA/th77p5Jw++OEENvyvWy/pNeExiDUVQaXIRGh8xySZTI36yueFaSXo1uJY0RnXYgEOoWWOJHeaVuX/bGNhHsh2yinznl/++NJcE9j6fBPRcBdq9hb8awNw8U7Bl6GM7x69EDOIIbX/npZ++amlHR9L/35mE/2Ss4gb0xCcY4VyTFLRE796vHysLAamqcyO+aFQyJIDBNslbH2/MrAvZiSEIedc/cqjmv4fbda2pXbv+F5a2szSsdkm9noiNURXt8edUhGUF6fSZWd1IJaXKFwD+49R6eCXD4Bkef7j9tRtNMVgW8BhRz/Qpy1TmeYk0doyjZoJSbePOReVHgkFsCFuQJ+Lgc4BxeAsK/cOiNDRmdNw0ctYhn/nQ498dYI5znzGLoJi1rav7Cn88rL3wLePVtDK5gl77Tki3gHEsIAQ2+IKgarj7Y8W1IQzV5V9N+0TjLqbg68WfKcOmBCOj3JkwJhVIkwDhc+JorXuZEPMEh0vvH3x7iqf+VAwXgd4diZiaJD1zHL9Snx6Wfg4IugreyhabQkcir+y5XgDtdx3Avs7lkeeCBwDvZoTUCXx5QrZkcEqWfYEiEYRs/EphmRALSNGR1Iclgdr5VFoELpzF4++f35w3/j0t5ucW3n2ch4PQCLuUXupsPRR7UA5FjSKrMtPcKAZJfagO4lGE7FH3YKMjorpK0ZxAv+i2JkJhtAMWWWFej4RhPR/cJ3DxwocCvXDi4SGZU4cu+K32XndiFWgopAl+0GApcwf1XvymJcFs39jExIBO4yUjU9MExBLQYc9H+W7+IgdESPRpciT+rKZPebVtaVq+1GYO/5xTAL3HASjNTGIgMvdjWbgc7JvdE1zIFpuC0U9ESiZyzBixzxWxj4Kwh8My34q+FK3KNLtmsA1qyrmKSNQOXCPUZd+ONelBTvFoUI/CYsqa/RhtKiyMf2CgSFqEPk59Y3uqnlZ8gFpswfSYyko23yVZYxzKGxGm49Zqxg1l8oz5Ra9XaRwHkuxepmgyhm0SoNy2KlbcEqK+9QqS9PNx9Ihm9U7gsR55SSJ1FBDNnkuWKxIZ0SDpXuOGwZdoUbOMDPHP4vBAgz2VlSEJAHZGJVbYIg7l/FO5KfIVvxC8pPPxMGcNMoevFDeStt2iqztE10n2TA4dgJH76YS9HDhKHD3iCx6ieFX84BAI3QQnngh76f5ruPQVbr5qZmck/5UjDc26lfrOvUBWy0Ogl8bCoOkMOns81TnC3cuUS9KW8+9A+fe3XYZOFUPG1u5epSSmDLw0s5s2F0W30ANeo+zJkJQz9SPZgzwYpEoktofhGVfmLOAB20boCbW1QWq/NpET/hnMecw/uSyAH4NJc3ECOU4nnkK1fj3S/i5dwb3R7k00AqQQUwt7Ie1qV0aY/VQX0J8hLPy7eBNXMHYZYDNxHZ2Qh6AuXJxq+AeRec/Q+JLhZV6hpXwQEzw7bf5v9uUf2vpq3qlhmy0IIGTkwYdCfSAFmqbdo+3XvDTDjFJde0mbeQLcn2n31xaAqJ0ixO/CLsT4I4G4DoncVTgRGNBtsCcjISWT+oeXZ4Iedw/8OsJI1aPnNKLX/60VvcZb94uasRxCkqlPQ11u1Sa2hHvB80WQENxVyzjns0/PiEByyil21Te6oisk3mNCEMrhouCFO3yEZTHHOCMy9eb/4Tmi8cVf3Lf7P53SY2hX3PSN033As3ETIMLHWumWEO9JXHA2y2SIBlIPpLGG2qvNsCIlIr+B1SWAqRKm2w6Blf7U+zCSBwJrfHG5i8J5Gax/cVonMlon7aHJX/gSvucIncRP93XCqkv7D8IFKFsLiBgHqUpXhE3pYjEcV1dk/JD9zFVCfEaQIVX8Jmfz7IIofcBKQ4OaG+C3xC2veX9CD+iAFXDNaGg9eTVxvkbJRJlW4Nk9Wk13kn696jWppRDe/8pDrYMO9ZyxZ98ReKSz9kWKLLyk2zCZgAniCkLJVX3n1M9DYbomyahWiv/KixRIV9hj/oFz87I+HLznbPTjpa+D+bZQnMuRsljTpv90vQUt/pK7jCFnA30B/jtroSF2/m/gpWn1aQs5WeA6ghzF8SdqWI20fghdSeDOCSCmLgTkfaGgGDmw7nHFkRzGtag57IHS2na06I+gzEphXo1w/Zx2BM/jKL2nZoFjHggtFQjYi8nSVRSXIE58RPbBObXk7uuIL9+rs/5Zo7suJInEUxgsiZZAWS25iBtpEiZeBgDtghEoAE0sjcayNq85M4tbu/LF5h51335PsGzQ09O875+vUS89lkWMyNOFoip2PuyWyMP/iU2XIZdfCCJNDjebDoBLQdpy7QQZC7s9c0wjHJervQNDu2jWzBW5MSAJMr7bP+Iv92BkS/GGgzjEn7MF1IRKFwwzbjbS4/slGOmhx9cZrFu7HSEefojNv3r0UaKfKOWzXsq1zEugbzlMDFsacRJJI/iJlK3vtkZ+PLZIVMFlKA32wbq2Kd5T0uCLZ1CPkAfCdzkz2EYscjDcZq2AWfziN2covN4kXE1lQXPPLTNM1xx3tbiepcO/t3SWm4w87qfh99SL0ZnY+LKFPLPeXVM2mIIoVWt+9Nk0I7nY4O79iGYqxZ8RVz289an6NVdJWnSKZvJQCAuHNiVaDxPAFoH392t9wot5t0/qmU95eEWNbU2udUW5sN9JVqcYlvAIfLeYC33oUzzxZgSktsv21mA7Uly1FA5VnoJFh6N244Wmv3YJGFv/TCPryaw+ZORlpZjQdq/2DYXr3EZskfed0G61P09ipTKmlTQ1067Rg5+PAk5FlQ9e0SWbGf2B/08kqymOTMVOznsALHHNFH4LFRKl2F/NOiYFl9khNHnSu9Ak5sq26Ynl/i2fdTle29Y1ugqmR5Yj4YT9pvslFyYCbw0mNFr5rVQm1LvkG27QMq9ph3t8fmn6r6SQ4oSbr5tz+J1kIawGzDxb6VYOvvWhobDTXfBeNv3b4aNm5XUinsCGqG2q/45m3+LoCOsddFceYhRx1Tsss9PLdPfJdErFMjYd3gddjiP0+XQjcRadZP6bwNLySvunFf20Czy6JqdEW2a96KxdYdOryBv1BjbuUq2yCHeh+6sk7fGmmPi50pe/1l5TyPe5oHW9oPnhPswLyf2TFDdCyYlhwBCstv5C1HwlW7xWoGT9XZt4qVj5WryLPLLD6h/5cMLEjWzgCeAIKNsLak92aBqBsHl4AJwl2N4jfvbSkBExGimv0nFvv09uDScQbjx+w4kPQjgjlW+g9ws9VEJvI2k8N6XxVu0uIwovgTFdunG24gBtaDi+y1YLQwZ8mwbip5fVlO3k0n0AEr/ETbtu8Vjkm+nNSiEb7X/3fMjBL5A8PdgG+/FnbexbFFExmEfetXAnisEKy5z44WVPpQZjSy/jzeGn4yDRsFGqhh87QPaDBWhlo37IFbe/C0xynS91d2tP/AJoJS0sVF6iwAAAAAElFTkSuQmCC"); -} - -#menu::after { - display: block; - content: ''; - padding-top: 80px; -} - -#logo { - position: fixed; - bottom: 10px; - right: 10px; - background: rgba(255,255,255,.1); - font-size: 11px; - display: block; - width: 20px; - height: 20px; - line-height: 20px; - text-align: center; - -webkit-border-radius: 20px; - -moz-border-radius: 20px; - border-radius: 20px; - -webkit-box-shadow: 0 0 3px rgba(0,0,0,.2); - -moz-box-shadow: 0 0 3px rgba(0,0,0,.2); - box-shadow: 0 0 3px rgba(0,0,0,.2); - color: inherit; -} - -#menu li a { - display: block; - color: white; - padding: 0 35px 0 25px; - -webkit-transition: background 300ms; - -moz-transition: background 300ms; -} - -#menu li { - position: relative; - list-style: none; -} - -#menu a:hover, -#menu a.active { - text-decoration: none; - background: rgba(255,255,255,.1); -} - -#menu li:hover .cov { - opacity: 1; -} - -#menu li .dirname { - opacity: .60; - padding-right: 2px; -} - -#menu li .basename { - opacity: 1; -} - -#menu .cov { - background: rgba(0,0,0,.4); - position: absolute; - top: 0; - right: 8px; - font-size: 9px; - opacity: .6; - text-align: left; - width: 17px; - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - border-radius: 10px; - padding: 2px 3px; - text-align: center; -} - -#stats:nth-child(2n) { - display: inline-block; - margin-top: 15px; - border: 1px solid #eee; - padding: 10px; - -webkit-box-shadow: inset 0 0 2px #eee; - -moz-box-shadow: inset 0 0 2px #eee; - box-shadow: inset 0 0 2px #eee; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} - -#stats div { - float: left; - padding: 0 5px; -} - -#stats::after { - display: block; - content: ''; - clear: both; -} - -#stats .sloc::after { - content: ' SLOC'; - color: #b6b6b6; -} - -#stats .percentage::after { - content: ' coverage'; - color: #b6b6b6; -} - -#stats .hits, -#stats .misses { - display: none; -} - -.high { - color: #00d4b4; -} -.medium { - color: #e87d0d; -} -.low { - color: #d4081a; -} -.terrible { - color: #d4081a; - font-weight: bold; -} - -table { - width: 80%; - margin-top: 10px; - border-collapse: collapse; - border: 1px solid #cbcbcb; - color: #363636; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - -table thead { - display: none; -} - -table td.line, -table td.hits { - width: 20px; - background: #eaeaea; - text-align: center; - font-size: 11px; - padding: 0 10px; - color: #949494; -} - -table td.hits { - width: 10px; - padding: 2px 5px; - color: rgba(0,0,0,.2); - background: #f0f0f0; -} - -tr.miss td.line, -tr.miss td.hits { - background: #e6c3c7; -} - -tr.miss td { - background: #f8d5d8; -} - -td.source { - padding-left: 15px; - line-height: 15px; - white-space: pre; - font: 12px monaco, monospace; -} - -code .comment { color: #ddd } -code .init { color: #2F6FAD } -code .string { color: #5890AD } -code .keyword { color: #8A6343 } -code .number { color: #2F6FAD } -</style> \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/xunit.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/xunit.js deleted file mode 100644 index 1ed5ee93..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/reporters/xunit.js +++ /dev/null @@ -1,115 +0,0 @@ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils') - , escape = utils.escape; - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Expose `XUnit`. - */ - -exports = module.exports = XUnit; - -/** - * Initialize a new `XUnit` reporter. - * - * @param {Runner} runner - * @api public - */ - -function XUnit(runner) { - Base.call(this, runner); - var stats = this.stats - , tests = [] - , self = this; - - runner.on('pass', function(test){ - tests.push(test); - }); - - runner.on('fail', function(test){ - tests.push(test); - }); - - runner.on('end', function(){ - console.log(tag('testsuite', { - name: 'Mocha Tests' - , tests: stats.tests - , failures: stats.failures - , errors: stats.failures - , skipped: stats.tests - stats.failures - stats.passes - , timestamp: (new Date).toUTCString() - , time: (stats.duration / 1000) || 0 - }, false)); - - tests.forEach(test); - console.log('</testsuite>'); - }); -} - -/** - * Inherit from `Base.prototype`. - */ - -XUnit.prototype.__proto__ = Base.prototype; - -/** - * Output tag for the given `test.` - */ - -function test(test) { - var attrs = { - classname: test.parent.fullTitle() - , name: test.title - , time: test.duration / 1000 - }; - - if ('failed' == test.state) { - var err = test.err; - attrs.message = escape(err.message); - console.log(tag('testcase', attrs, false, tag('failure', attrs, false, cdata(err.stack)))); - } else if (test.pending) { - console.log(tag('testcase', attrs, false, tag('skipped', {}, true))); - } else { - console.log(tag('testcase', attrs, true) ); - } -} - -/** - * HTML tag helper. - */ - -function tag(name, attrs, close, content) { - var end = close ? '/>' : '>' - , pairs = [] - , tag; - - for (var key in attrs) { - pairs.push(key + '="' + escape(attrs[key]) + '"'); - } - - tag = '<' + name + (pairs.length ? ' ' + pairs.join(' ') : '') + end; - if (content) tag += content + '</' + name + end; - return tag; -} - -/** - * Return cdata escaped CDATA `str`. - */ - -function cdata(str) { - return '<![CDATA[' + escape(str) + ']]>'; -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/runnable.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/runnable.js deleted file mode 100644 index b34bf1e1..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/runnable.js +++ /dev/null @@ -1,217 +0,0 @@ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , debug = require('debug')('mocha:runnable') - , milliseconds = require('./ms'); - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Object#toString(). - */ - -var toString = Object.prototype.toString; - -/** - * Expose `Runnable`. - */ - -module.exports = Runnable; - -/** - * Initialize a new `Runnable` with the given `title` and callback `fn`. - * - * @param {String} title - * @param {Function} fn - * @api private - */ - -function Runnable(title, fn) { - this.title = title; - this.fn = fn; - this.async = fn && fn.length; - this.sync = ! this.async; - this._timeout = 2000; - this._slow = 75; - this.timedOut = false; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Runnable.prototype.__proto__ = EventEmitter.prototype; - -/** - * Set & get timeout `ms`. - * - * @param {Number|String} ms - * @return {Runnable|Number} ms or self - * @api private - */ - -Runnable.prototype.timeout = function(ms){ - if (0 == arguments.length) return this._timeout; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('timeout %d', ms); - this._timeout = ms; - if (this.timer) this.resetTimeout(); - return this; -}; - -/** - * Set & get slow `ms`. - * - * @param {Number|String} ms - * @return {Runnable|Number} ms or self - * @api private - */ - -Runnable.prototype.slow = function(ms){ - if (0 === arguments.length) return this._slow; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('timeout %d', ms); - this._slow = ms; - return this; -}; - -/** - * Return the full title generated by recursively - * concatenating the parent's full title. - * - * @return {String} - * @api public - */ - -Runnable.prototype.fullTitle = function(){ - return this.parent.fullTitle() + ' ' + this.title; -}; - -/** - * Clear the timeout. - * - * @api private - */ - -Runnable.prototype.clearTimeout = function(){ - clearTimeout(this.timer); -}; - -/** - * Inspect the runnable void of private properties. - * - * @return {String} - * @api private - */ - -Runnable.prototype.inspect = function(){ - return JSON.stringify(this, function(key, val){ - if ('_' == key[0]) return; - if ('parent' == key) return '#<Suite>'; - if ('ctx' == key) return '#<Context>'; - return val; - }, 2); -}; - -/** - * Reset the timeout. - * - * @api private - */ - -Runnable.prototype.resetTimeout = function(){ - var self = this; - var ms = this.timeout() || 1e9; - - this.clearTimeout(); - this.timer = setTimeout(function(){ - self.callback(new Error('timeout of ' + ms + 'ms exceeded')); - self.timedOut = true; - }, ms); -}; - -/** - * Run the test and invoke `fn(err)`. - * - * @param {Function} fn - * @api private - */ - -Runnable.prototype.run = function(fn){ - var self = this - , ms = this.timeout() - , start = new Date - , ctx = this.ctx - , finished - , emitted; - - if (ctx) ctx.runnable(this); - - // timeout - if (this.async) { - if (ms) { - this.timer = setTimeout(function(){ - done(new Error('timeout of ' + ms + 'ms exceeded')); - self.timedOut = true; - }, ms); - } - } - - // called multiple times - function multiple(err) { - if (emitted) return; - emitted = true; - self.emit('error', err || new Error('done() called multiple times')); - } - - // finished - function done(err) { - if (self.timedOut) return; - if (finished) return multiple(err); - self.clearTimeout(); - self.duration = new Date - start; - finished = true; - fn(err); - } - - // for .resetTimeout() - this.callback = done; - - // async - if (this.async) { - try { - this.fn.call(ctx, function(err){ - if (err instanceof Error || toString.call(err) === "[object Error]") return done(err); - if (null != err) return done(new Error('done() invoked with non-Error: ' + err)); - done(); - }); - } catch (err) { - done(err); - } - return; - } - - if (this.asyncOnly) { - return done(new Error('--async-only option in use without declaring `done()`')); - } - - // sync - try { - if (!this.pending) this.fn.call(ctx); - this.duration = new Date - start; - fn(); - } catch (err) { - fn(err); - } -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/runner.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/runner.js deleted file mode 100644 index dffc3c05..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/runner.js +++ /dev/null @@ -1,561 +0,0 @@ -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , debug = require('debug')('mocha:runner') - , Test = require('./test') - , utils = require('./utils') - , filter = utils.filter - , keys = utils.keys; - -/** - * Non-enumerable globals. - */ - -var globals = [ - 'setTimeout', - 'clearTimeout', - 'setInterval', - 'clearInterval', - 'XMLHttpRequest', - 'Date' -]; - -/** - * Expose `Runner`. - */ - -module.exports = Runner; - -/** - * Initialize a `Runner` for the given `suite`. - * - * Events: - * - * - `start` execution started - * - `end` execution complete - * - `suite` (suite) test suite execution started - * - `suite end` (suite) all tests (and sub-suites) have finished - * - `test` (test) test execution started - * - `test end` (test) test completed - * - `hook` (hook) hook execution started - * - `hook end` (hook) hook complete - * - `pass` (test) test passed - * - `fail` (test, err) test failed - * - `pending` (test) test pending - * - * @api public - */ - -function Runner(suite) { - var self = this; - this._globals = []; - this.suite = suite; - this.total = suite.total(); - this.failures = 0; - this.on('test end', function(test){ self.checkGlobals(test); }); - this.on('hook end', function(hook){ self.checkGlobals(hook); }); - this.grep(/.*/); - this.globals(this.globalProps().concat(['errno'])); -} - -/** - * Wrapper for setImmediate, process.nextTick, or browser polyfill. - * - * @param {Function} fn - * @api private - */ - -Runner.immediately = global.setImmediate || process.nextTick; - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Runner.prototype.__proto__ = EventEmitter.prototype; - -/** - * Run tests with full titles matching `re`. Updates runner.total - * with number of tests matched. - * - * @param {RegExp} re - * @param {Boolean} invert - * @return {Runner} for chaining - * @api public - */ - -Runner.prototype.grep = function(re, invert){ - debug('grep %s', re); - this._grep = re; - this._invert = invert; - this.total = this.grepTotal(this.suite); - return this; -}; - -/** - * Returns the number of tests matching the grep search for the - * given suite. - * - * @param {Suite} suite - * @return {Number} - * @api public - */ - -Runner.prototype.grepTotal = function(suite) { - var self = this; - var total = 0; - - suite.eachTest(function(test){ - var match = self._grep.test(test.fullTitle()); - if (self._invert) match = !match; - if (match) total++; - }); - - return total; -}; - -/** - * Return a list of global properties. - * - * @return {Array} - * @api private - */ - -Runner.prototype.globalProps = function() { - var props = utils.keys(global); - - // non-enumerables - for (var i = 0; i < globals.length; ++i) { - if (~utils.indexOf(props, globals[i])) continue; - props.push(globals[i]); - } - - return props; -}; - -/** - * Allow the given `arr` of globals. - * - * @param {Array} arr - * @return {Runner} for chaining - * @api public - */ - -Runner.prototype.globals = function(arr){ - if (0 == arguments.length) return this._globals; - debug('globals %j', arr); - utils.forEach(arr, function(arr){ - this._globals.push(arr); - }, this); - return this; -}; - -/** - * Check for global variable leaks. - * - * @api private - */ - -Runner.prototype.checkGlobals = function(test){ - if (this.ignoreLeaks) return; - var ok = this._globals; - var globals = this.globalProps(); - var isNode = process.kill; - var leaks; - - // check length - 2 ('errno' and 'location' globals) - if (isNode && 1 == ok.length - globals.length) return; - else if (2 == ok.length - globals.length) return; - - if(this.prevGlobalsLength == globals.length) return; - this.prevGlobalsLength = globals.length; - - leaks = filterLeaks(ok, globals); - this._globals = this._globals.concat(leaks); - - if (leaks.length > 1) { - this.fail(test, new Error('global leaks detected: ' + leaks.join(', ') + '')); - } else if (leaks.length) { - this.fail(test, new Error('global leak detected: ' + leaks[0])); - } -}; - -/** - * Fail the given `test`. - * - * @param {Test} test - * @param {Error} err - * @api private - */ - -Runner.prototype.fail = function(test, err){ - ++this.failures; - test.state = 'failed'; - - if ('string' == typeof err) { - err = new Error('the string "' + err + '" was thrown, throw an Error :)'); - } - - this.emit('fail', test, err); -}; - -/** - * Fail the given `hook` with `err`. - * - * Hook failures (currently) hard-end due - * to that fact that a failing hook will - * surely cause subsequent tests to fail, - * causing jumbled reporting. - * - * @param {Hook} hook - * @param {Error} err - * @api private - */ - -Runner.prototype.failHook = function(hook, err){ - this.fail(hook, err); - this.emit('end'); -}; - -/** - * Run hook `name` callbacks and then invoke `fn()`. - * - * @param {String} name - * @param {Function} function - * @api private - */ - -Runner.prototype.hook = function(name, fn){ - var suite = this.suite - , hooks = suite['_' + name] - , self = this - , timer; - - function next(i) { - var hook = hooks[i]; - if (!hook) return fn(); - if (self.failures && suite.bail()) return fn(); - self.currentRunnable = hook; - - hook.ctx.currentTest = self.test; - - self.emit('hook', hook); - - hook.on('error', function(err){ - self.failHook(hook, err); - }); - - hook.run(function(err){ - hook.removeAllListeners('error'); - var testError = hook.error(); - if (testError) self.fail(self.test, testError); - if (err) return self.failHook(hook, err); - self.emit('hook end', hook); - delete hook.ctx.currentTest; - next(++i); - }); - } - - Runner.immediately(function(){ - next(0); - }); -}; - -/** - * Run hook `name` for the given array of `suites` - * in order, and callback `fn(err)`. - * - * @param {String} name - * @param {Array} suites - * @param {Function} fn - * @api private - */ - -Runner.prototype.hooks = function(name, suites, fn){ - var self = this - , orig = this.suite; - - function next(suite) { - self.suite = suite; - - if (!suite) { - self.suite = orig; - return fn(); - } - - self.hook(name, function(err){ - if (err) { - self.suite = orig; - return fn(err); - } - - next(suites.pop()); - }); - } - - next(suites.pop()); -}; - -/** - * Run hooks from the top level down. - * - * @param {String} name - * @param {Function} fn - * @api private - */ - -Runner.prototype.hookUp = function(name, fn){ - var suites = [this.suite].concat(this.parents()).reverse(); - this.hooks(name, suites, fn); -}; - -/** - * Run hooks from the bottom up. - * - * @param {String} name - * @param {Function} fn - * @api private - */ - -Runner.prototype.hookDown = function(name, fn){ - var suites = [this.suite].concat(this.parents()); - this.hooks(name, suites, fn); -}; - -/** - * Return an array of parent Suites from - * closest to furthest. - * - * @return {Array} - * @api private - */ - -Runner.prototype.parents = function(){ - var suite = this.suite - , suites = []; - while (suite = suite.parent) suites.push(suite); - return suites; -}; - -/** - * Run the current test and callback `fn(err)`. - * - * @param {Function} fn - * @api private - */ - -Runner.prototype.runTest = function(fn){ - var test = this.test - , self = this; - - if (this.asyncOnly) test.asyncOnly = true; - - try { - test.on('error', function(err){ - self.fail(test, err); - }); - test.run(fn); - } catch (err) { - fn(err); - } -}; - -/** - * Run tests in the given `suite` and invoke - * the callback `fn()` when complete. - * - * @param {Suite} suite - * @param {Function} fn - * @api private - */ - -Runner.prototype.runTests = function(suite, fn){ - var self = this - , tests = suite.tests.slice() - , test; - - function next(err) { - // if we bail after first err - if (self.failures && suite._bail) return fn(); - - // next test - test = tests.shift(); - - // all done - if (!test) return fn(); - - // grep - var match = self._grep.test(test.fullTitle()); - if (self._invert) match = !match; - if (!match) return next(); - - // pending - if (test.pending) { - self.emit('pending', test); - self.emit('test end', test); - return next(); - } - - // execute test and hook(s) - self.emit('test', self.test = test); - self.hookDown('beforeEach', function(){ - self.currentRunnable = self.test; - self.runTest(function(err){ - test = self.test; - - if (err) { - self.fail(test, err); - self.emit('test end', test); - return self.hookUp('afterEach', next); - } - - test.state = 'passed'; - self.emit('pass', test); - self.emit('test end', test); - self.hookUp('afterEach', next); - }); - }); - } - - this.next = next; - next(); -}; - -/** - * Run the given `suite` and invoke the - * callback `fn()` when complete. - * - * @param {Suite} suite - * @param {Function} fn - * @api private - */ - -Runner.prototype.runSuite = function(suite, fn){ - var total = this.grepTotal(suite) - , self = this - , i = 0; - - debug('run suite %s', suite.fullTitle()); - - if (!total) return fn(); - - this.emit('suite', this.suite = suite); - - function next() { - var curr = suite.suites[i++]; - if (!curr) return done(); - self.runSuite(curr, next); - } - - function done() { - self.suite = suite; - self.hook('afterAll', function(){ - self.emit('suite end', suite); - fn(); - }); - } - - this.hook('beforeAll', function(){ - self.runTests(suite, next); - }); -}; - -/** - * Handle uncaught exceptions. - * - * @param {Error} err - * @api private - */ - -Runner.prototype.uncaught = function(err){ - debug('uncaught exception %s', err.message); - var runnable = this.currentRunnable; - if (!runnable || 'failed' == runnable.state) return; - runnable.clearTimeout(); - err.uncaught = true; - this.fail(runnable, err); - - // recover from test - if ('test' == runnable.type) { - this.emit('test end', runnable); - this.hookUp('afterEach', this.next); - return; - } - - // bail on hooks - this.emit('end'); -}; - -/** - * Run the root suite and invoke `fn(failures)` - * on completion. - * - * @param {Function} fn - * @return {Runner} for chaining - * @api public - */ - -Runner.prototype.run = function(fn){ - var self = this - , fn = fn || function(){}; - - function uncaught(err){ - self.uncaught(err); - } - - debug('start'); - - // callback - this.on('end', function(){ - debug('end'); - process.removeListener('uncaughtException', uncaught); - fn(self.failures); - }); - - // run suites - this.emit('start'); - this.runSuite(this.suite, function(){ - debug('finished running'); - self.emit('end'); - }); - - // uncaught exception - process.on('uncaughtException', uncaught); - - return this; -}; - -/** - * Filter leaks with the given globals flagged as `ok`. - * - * @param {Array} ok - * @param {Array} globals - * @return {Array} - * @api private - */ - -function filterLeaks(ok, globals) { - return filter(globals, function(key){ - // Firefox and Chrome exposes iframes as index inside the window object - if (/^d+/.test(key)) return false; - - // in firefox - // if runner runs in an iframe, this iframe's window.getInterface method not init at first - // it is assigned in some seconds - if (global.navigator && /^getInterface/.test(key)) return false; - - // an iframe could be approached by window[iframeIndex] - // in ie6,7,8 and opera, iframeIndex is enumerable, this could cause leak - if (global.navigator && /^\d+/.test(key)) return false; - - // Opera and IE expose global variables for HTML element IDs (issue #243) - if (/^mocha-/.test(key)) return false; - - var matched = filter(ok, function(ok){ - if (~ok.indexOf('*')) return 0 == key.indexOf(ok.split('*')[0]); - return key == ok; - }); - return matched.length == 0 && (!global.navigator || 'onerror' !== key); - }); -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/suite.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/suite.js deleted file mode 100644 index 869bb88d..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/suite.js +++ /dev/null @@ -1,296 +0,0 @@ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , debug = require('debug')('mocha:suite') - , milliseconds = require('./ms') - , utils = require('./utils') - , Hook = require('./hook'); - -/** - * Expose `Suite`. - */ - -exports = module.exports = Suite; - -/** - * Create a new `Suite` with the given `title` - * and parent `Suite`. When a suite with the - * same title is already present, that suite - * is returned to provide nicer reporter - * and more flexible meta-testing. - * - * @param {Suite} parent - * @param {String} title - * @return {Suite} - * @api public - */ - -exports.create = function(parent, title){ - var suite = new Suite(title, parent.ctx); - suite.parent = parent; - if (parent.pending) suite.pending = true; - title = suite.fullTitle(); - parent.addSuite(suite); - return suite; -}; - -/** - * Initialize a new `Suite` with the given - * `title` and `ctx`. - * - * @param {String} title - * @param {Context} ctx - * @api private - */ - -function Suite(title, ctx) { - this.title = title; - this.ctx = ctx; - this.suites = []; - this.tests = []; - this.pending = false; - this._beforeEach = []; - this._beforeAll = []; - this._afterEach = []; - this._afterAll = []; - this.root = !title; - this._timeout = 2000; - this._slow = 75; - this._bail = false; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Suite.prototype.__proto__ = EventEmitter.prototype; - -/** - * Return a clone of this `Suite`. - * - * @return {Suite} - * @api private - */ - -Suite.prototype.clone = function(){ - var suite = new Suite(this.title); - debug('clone'); - suite.ctx = this.ctx; - suite.timeout(this.timeout()); - suite.slow(this.slow()); - suite.bail(this.bail()); - return suite; -}; - -/** - * Set timeout `ms` or short-hand such as "2s". - * - * @param {Number|String} ms - * @return {Suite|Number} for chaining - * @api private - */ - -Suite.prototype.timeout = function(ms){ - if (0 == arguments.length) return this._timeout; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('timeout %d', ms); - this._timeout = parseInt(ms, 10); - return this; -}; - -/** - * Set slow `ms` or short-hand such as "2s". - * - * @param {Number|String} ms - * @return {Suite|Number} for chaining - * @api private - */ - -Suite.prototype.slow = function(ms){ - if (0 === arguments.length) return this._slow; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('slow %d', ms); - this._slow = ms; - return this; -}; - -/** - * Sets whether to bail after first error. - * - * @parma {Boolean} bail - * @return {Suite|Number} for chaining - * @api private - */ - -Suite.prototype.bail = function(bail){ - if (0 == arguments.length) return this._bail; - debug('bail %s', bail); - this._bail = bail; - return this; -}; - -/** - * Run `fn(test[, done])` before running tests. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.beforeAll = function(fn){ - if (this.pending) return this; - var hook = new Hook('"before all" hook', fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._beforeAll.push(hook); - this.emit('beforeAll', hook); - return this; -}; - -/** - * Run `fn(test[, done])` after running tests. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.afterAll = function(fn){ - if (this.pending) return this; - var hook = new Hook('"after all" hook', fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._afterAll.push(hook); - this.emit('afterAll', hook); - return this; -}; - -/** - * Run `fn(test[, done])` before each test case. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.beforeEach = function(fn){ - if (this.pending) return this; - var hook = new Hook('"before each" hook', fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._beforeEach.push(hook); - this.emit('beforeEach', hook); - return this; -}; - -/** - * Run `fn(test[, done])` after each test case. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.afterEach = function(fn){ - if (this.pending) return this; - var hook = new Hook('"after each" hook', fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._afterEach.push(hook); - this.emit('afterEach', hook); - return this; -}; - -/** - * Add a test `suite`. - * - * @param {Suite} suite - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.addSuite = function(suite){ - suite.parent = this; - suite.timeout(this.timeout()); - suite.slow(this.slow()); - suite.bail(this.bail()); - this.suites.push(suite); - this.emit('suite', suite); - return this; -}; - -/** - * Add a `test` to this suite. - * - * @param {Test} test - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.addTest = function(test){ - test.parent = this; - test.timeout(this.timeout()); - test.slow(this.slow()); - test.ctx = this.ctx; - this.tests.push(test); - this.emit('test', test); - return this; -}; - -/** - * Return the full title generated by recursively - * concatenating the parent's full title. - * - * @return {String} - * @api public - */ - -Suite.prototype.fullTitle = function(){ - if (this.parent) { - var full = this.parent.fullTitle(); - if (full) return full + ' ' + this.title; - } - return this.title; -}; - -/** - * Return the total number of tests. - * - * @return {Number} - * @api public - */ - -Suite.prototype.total = function(){ - return utils.reduce(this.suites, function(sum, suite){ - return sum + suite.total(); - }, 0) + this.tests.length; -}; - -/** - * Iterates through each suite recursively to find - * all tests. Applies a function in the format - * `fn(test)`. - * - * @param {Function} fn - * @return {Suite} - * @api private - */ - -Suite.prototype.eachTest = function(fn){ - utils.forEach(this.tests, fn); - utils.forEach(this.suites, function(suite){ - suite.eachTest(fn); - }); - return this; -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/template.html b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/template.html deleted file mode 100644 index 0590d4aa..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/template.html +++ /dev/null @@ -1,18 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title>Mocha - - - - - -
    - - - - - - diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/test.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/test.js deleted file mode 100644 index 11773e0c..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/test.js +++ /dev/null @@ -1,32 +0,0 @@ - -/** - * Module dependencies. - */ - -var Runnable = require('./runnable'); - -/** - * Expose `Test`. - */ - -module.exports = Test; - -/** - * Initialize a new `Test` with the given `title` and callback `fn`. - * - * @param {String} title - * @param {Function} fn - * @api private - */ - -function Test(title, fn) { - Runnable.call(this, title, fn); - this.pending = !fn; - this.type = 'test'; -} - -/** - * Inherit from `Runnable.prototype`. - */ - -Test.prototype.__proto__ = Runnable.prototype; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/utils.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/utils.js deleted file mode 100644 index 939a8aa6..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/lib/utils.js +++ /dev/null @@ -1,281 +0,0 @@ -/** - * Module dependencies. - */ - -var fs = require('fs') - , path = require('path') - , join = path.join - , debug = require('debug')('mocha:watch'); - -/** - * Ignored directories. - */ - -var ignore = ['node_modules', '.git']; - -/** - * Escape special characters in the given string of html. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function(html){ - return String(html) - .replace(/&/g, '&') - .replace(/"/g, '"') - .replace(//g, '>'); -}; - -/** - * Array#forEach (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @param {Object} scope - * @api private - */ - -exports.forEach = function(arr, fn, scope){ - for (var i = 0, l = arr.length; i < l; i++) - fn.call(scope, arr[i], i); -}; - -/** - * Array#indexOf (<=IE8) - * - * @parma {Array} arr - * @param {Object} obj to find index of - * @param {Number} start - * @api private - */ - -exports.indexOf = function(arr, obj, start){ - for (var i = start || 0, l = arr.length; i < l; i++) { - if (arr[i] === obj) - return i; - } - return -1; -}; - -/** - * Array#reduce (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @param {Object} initial value - * @api private - */ - -exports.reduce = function(arr, fn, val){ - var rval = val; - - for (var i = 0, l = arr.length; i < l; i++) { - rval = fn(rval, arr[i], i, arr); - } - - return rval; -}; - -/** - * Array#filter (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @api private - */ - -exports.filter = function(arr, fn){ - var ret = []; - - for (var i = 0, l = arr.length; i < l; i++) { - var val = arr[i]; - if (fn(val, i, arr)) ret.push(val); - } - - return ret; -}; - -/** - * Object.keys (<=IE8) - * - * @param {Object} obj - * @return {Array} keys - * @api private - */ - -exports.keys = Object.keys || function(obj) { - var keys = [] - , has = Object.prototype.hasOwnProperty // for `window` on <=IE8 - - for (var key in obj) { - if (has.call(obj, key)) { - keys.push(key); - } - } - - return keys; -}; - -/** - * Watch the given `files` for changes - * and invoke `fn(file)` on modification. - * - * @param {Array} files - * @param {Function} fn - * @api private - */ - -exports.watch = function(files, fn){ - var options = { interval: 100 }; - files.forEach(function(file){ - debug('file %s', file); - fs.watchFile(file, options, function(curr, prev){ - if (prev.mtime < curr.mtime) fn(file); - }); - }); -}; - -/** - * Ignored files. - */ - -function ignored(path){ - return !~ignore.indexOf(path); -} - -/** - * Lookup files in the given `dir`. - * - * @return {Array} - * @api private - */ - -exports.files = function(dir, ret){ - ret = ret || []; - - fs.readdirSync(dir) - .filter(ignored) - .forEach(function(path){ - path = join(dir, path); - if (fs.statSync(path).isDirectory()) { - exports.files(path, ret); - } else if (path.match(/\.(js|coffee|litcoffee|coffee.md)$/)) { - ret.push(path); - } - }); - - return ret; -}; - -/** - * Compute a slug from the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.slug = function(str){ - return str - .toLowerCase() - .replace(/ +/g, '-') - .replace(/[^-\w]/g, ''); -}; - -/** - * Strip the function definition from `str`, - * and re-indent for pre whitespace. - */ - -exports.clean = function(str) { - str = str - .replace(/^function *\(.*\) *{/, '') - .replace(/\s+\}$/, ''); - - var whitespace = str.match(/^\n?(\s*)/)[1] - , re = new RegExp('^' + whitespace, 'gm'); - - str = str.replace(re, ''); - - return exports.trim(str); -}; - -/** - * Escape regular expression characters in `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.escapeRegexp = function(str){ - return str.replace(/[-\\^$*+?.()|[\]{}]/g, "\\$&"); -}; - -/** - * Trim the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.trim = function(str){ - return str.replace(/^\s+|\s+$/g, ''); -}; - -/** - * Parse the given `qs`. - * - * @param {String} qs - * @return {Object} - * @api private - */ - -exports.parseQuery = function(qs){ - return exports.reduce(qs.replace('?', '').split('&'), function(obj, pair){ - var i = pair.indexOf('=') - , key = pair.slice(0, i) - , val = pair.slice(++i); - - obj[key] = decodeURIComponent(val); - return obj; - }, {}); -}; - -/** - * Highlight the given string of `js`. - * - * @param {String} js - * @return {String} - * @api private - */ - -function highlight(js) { - return js - .replace(//g, '>') - .replace(/\/\/(.*)/gm, '//$1') - .replace(/('.*?')/gm, '$1') - .replace(/(\d+\.\d+)/gm, '$1') - .replace(/(\d+)/gm, '$1') - .replace(/\bnew *(\w+)/gm, 'new $1') - .replace(/\b(function|new|throw|return|var|if|else)\b/gm, '$1') -} - -/** - * Highlight the contents of tag `name`. - * - * @param {String} name - * @api private - */ - -exports.highlightTags = function(name) { - var code = document.getElementsByTagName(name); - for (var i = 0, len = code.length; i < len; ++i) { - code[i].innerHTML = highlight(code[i].innerHTML); - } -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/mocha.css b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/mocha.css deleted file mode 100644 index 274b9776..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/mocha.css +++ /dev/null @@ -1,260 +0,0 @@ -@charset "utf-8"; - -body { - margin:0; -} - -#mocha { - font: 20px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif; - margin: 60px 50px; -} - -#mocha ul, #mocha li { - margin: 0; - padding: 0; -} - -#mocha ul { - list-style: none; -} - -#mocha h1, #mocha h2 { - margin: 0; -} - -#mocha h1 { - margin-top: 15px; - font-size: 1em; - font-weight: 200; -} - -#mocha h1 a { - text-decoration: none; - color: inherit; -} - -#mocha h1 a:hover { - text-decoration: underline; -} - -#mocha .suite .suite h1 { - margin-top: 0; - font-size: .8em; -} - -#mocha .hidden { - display: none; -} - -#mocha h2 { - font-size: 12px; - font-weight: normal; - cursor: pointer; -} - -#mocha .suite { - margin-left: 15px; -} - -#mocha .test { - margin-left: 15px; - overflow: hidden; -} - -#mocha .test.pending:hover h2::after { - content: '(pending)'; - font-family: arial, sans-serif; -} - -#mocha .test.pass.medium .duration { - background: #C09853; -} - -#mocha .test.pass.slow .duration { - background: #B94A48; -} - -#mocha .test.pass::before { - content: '✓'; - font-size: 12px; - display: block; - float: left; - margin-right: 5px; - color: #00d6b2; -} - -#mocha .test.pass .duration { - font-size: 9px; - margin-left: 5px; - padding: 2px 5px; - color: white; - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.2); - -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.2); - box-shadow: inset 0 1px 1px rgba(0,0,0,.2); - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - -ms-border-radius: 5px; - -o-border-radius: 5px; - border-radius: 5px; -} - -#mocha .test.pass.fast .duration { - display: none; -} - -#mocha .test.pending { - color: #0b97c4; -} - -#mocha .test.pending::before { - content: '◦'; - color: #0b97c4; -} - -#mocha .test.fail { - color: #c00; -} - -#mocha .test.fail pre { - color: black; -} - -#mocha .test.fail::before { - content: '✖'; - font-size: 12px; - display: block; - float: left; - margin-right: 5px; - color: #c00; -} - -#mocha .test pre.error { - color: #c00; - max-height: 300px; - overflow: auto; -} - -#mocha .test pre { - display: block; - float: left; - clear: left; - font: 12px/1.5 monaco, monospace; - margin: 5px; - padding: 15px; - border: 1px solid #eee; - border-bottom-color: #ddd; - -webkit-border-radius: 3px; - -webkit-box-shadow: 0 1px 3px #eee; - -moz-border-radius: 3px; - -moz-box-shadow: 0 1px 3px #eee; - border-radius: 3px; -} - -#mocha .test h2 { - position: relative; -} - -#mocha .test a.replay { - position: absolute; - top: 3px; - right: 0; - text-decoration: none; - vertical-align: middle; - display: block; - width: 15px; - height: 15px; - line-height: 15px; - text-align: center; - background: #eee; - font-size: 15px; - -moz-border-radius: 15px; - border-radius: 15px; - -webkit-transition: opacity 200ms; - -moz-transition: opacity 200ms; - transition: opacity 200ms; - opacity: 0.3; - color: #888; -} - -#mocha .test:hover a.replay { - opacity: 1; -} - -#mocha-report.pass .test.fail { - display: none; -} - -#mocha-report.fail .test.pass { - display: none; -} - -#mocha-report.pending .test.pass, -#mocha-report.pending .test.fail { - display: none; -} -#mocha-report.pending .test.pass.pending { - display: block; -} - -#mocha-error { - color: #c00; - font-size: 1.5em; - font-weight: 100; - letter-spacing: 1px; -} - -#mocha-stats { - position: fixed; - top: 15px; - right: 10px; - font-size: 12px; - margin: 0; - color: #888; - z-index: 1; -} - -#mocha-stats .progress { - float: right; - padding-top: 0; -} - -#mocha-stats em { - color: black; -} - -#mocha-stats a { - text-decoration: none; - color: inherit; -} - -#mocha-stats a:hover { - border-bottom: 1px solid #eee; -} - -#mocha-stats li { - display: inline-block; - margin: 0 5px; - list-style: none; - padding-top: 11px; -} - -#mocha-stats canvas { - width: 40px; - height: 40px; -} - -#mocha code .comment { color: #ddd } -#mocha code .init { color: #2F6FAD } -#mocha code .string { color: #5890AD } -#mocha code .keyword { color: #8A6343 } -#mocha code .number { color: #2F6FAD } - -@media screen and (max-device-width: 480px) { - #mocha { - margin: 60px 0px; - } - - #mocha #stats { - position: absolute; - } -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/mocha.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/mocha.js deleted file mode 100644 index 0a04e204..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/mocha.js +++ /dev/null @@ -1,5554 +0,0 @@ -;(function(){ - -// CommonJS require() - -function require(p){ - var path = require.resolve(p) - , mod = require.modules[path]; - if (!mod) throw new Error('failed to require "' + p + '"'); - if (!mod.exports) { - mod.exports = {}; - mod.call(mod.exports, mod, mod.exports, require.relative(path)); - } - return mod.exports; - } - -require.modules = {}; - -require.resolve = function (path){ - var orig = path - , reg = path + '.js' - , index = path + '/index.js'; - return require.modules[reg] && reg - || require.modules[index] && index - || orig; - }; - -require.register = function (path, fn){ - require.modules[path] = fn; - }; - -require.relative = function (parent) { - return function(p){ - if ('.' != p.charAt(0)) return require(p); - - var path = parent.split('/') - , segs = p.split('/'); - path.pop(); - - for (var i = 0; i < segs.length; i++) { - var seg = segs[i]; - if ('..' == seg) path.pop(); - else if ('.' != seg) path.push(seg); - } - - return require(path.join('/')); - }; - }; - - -require.register("browser/debug.js", function(module, exports, require){ - -module.exports = function(type){ - return function(){ - } -}; - -}); // module: browser/debug.js - -require.register("browser/diff.js", function(module, exports, require){ -/* See LICENSE file for terms of use */ - -/* - * Text diff implementation. - * - * This library supports the following APIS: - * JsDiff.diffChars: Character by character diff - * JsDiff.diffWords: Word (as defined by \b regex) diff which ignores whitespace - * JsDiff.diffLines: Line based diff - * - * JsDiff.diffCss: Diff targeted at CSS content - * - * These methods are based on the implementation proposed in - * "An O(ND) Difference Algorithm and its Variations" (Myers, 1986). - * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927 - */ -var JsDiff = (function() { - /*jshint maxparams: 5*/ - function clonePath(path) { - return { newPos: path.newPos, components: path.components.slice(0) }; - } - function removeEmpty(array) { - var ret = []; - for (var i = 0; i < array.length; i++) { - if (array[i]) { - ret.push(array[i]); - } - } - return ret; - } - function escapeHTML(s) { - var n = s; - n = n.replace(/&/g, '&'); - n = n.replace(//g, '>'); - n = n.replace(/"/g, '"'); - - return n; - } - - var Diff = function(ignoreWhitespace) { - this.ignoreWhitespace = ignoreWhitespace; - }; - Diff.prototype = { - diff: function(oldString, newString) { - // Handle the identity case (this is due to unrolling editLength == 0 - if (newString === oldString) { - return [{ value: newString }]; - } - if (!newString) { - return [{ value: oldString, removed: true }]; - } - if (!oldString) { - return [{ value: newString, added: true }]; - } - - newString = this.tokenize(newString); - oldString = this.tokenize(oldString); - - var newLen = newString.length, oldLen = oldString.length; - var maxEditLength = newLen + oldLen; - var bestPath = [{ newPos: -1, components: [] }]; - - // Seed editLength = 0 - var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); - if (bestPath[0].newPos+1 >= newLen && oldPos+1 >= oldLen) { - return bestPath[0].components; - } - - for (var editLength = 1; editLength <= maxEditLength; editLength++) { - for (var diagonalPath = -1*editLength; diagonalPath <= editLength; diagonalPath+=2) { - var basePath; - var addPath = bestPath[diagonalPath-1], - removePath = bestPath[diagonalPath+1]; - oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; - if (addPath) { - // No one else is going to attempt to use this value, clear it - bestPath[diagonalPath-1] = undefined; - } - - var canAdd = addPath && addPath.newPos+1 < newLen; - var canRemove = removePath && 0 <= oldPos && oldPos < oldLen; - if (!canAdd && !canRemove) { - bestPath[diagonalPath] = undefined; - continue; - } - - // Select the diagonal that we want to branch from. We select the prior - // path whose position in the new string is the farthest from the origin - // and does not pass the bounds of the diff graph - if (!canAdd || (canRemove && addPath.newPos < removePath.newPos)) { - basePath = clonePath(removePath); - this.pushComponent(basePath.components, oldString[oldPos], undefined, true); - } else { - basePath = clonePath(addPath); - basePath.newPos++; - this.pushComponent(basePath.components, newString[basePath.newPos], true, undefined); - } - - var oldPos = this.extractCommon(basePath, newString, oldString, diagonalPath); - - if (basePath.newPos+1 >= newLen && oldPos+1 >= oldLen) { - return basePath.components; - } else { - bestPath[diagonalPath] = basePath; - } - } - } - }, - - pushComponent: function(components, value, added, removed) { - var last = components[components.length-1]; - if (last && last.added === added && last.removed === removed) { - // We need to clone here as the component clone operation is just - // as shallow array clone - components[components.length-1] = - {value: this.join(last.value, value), added: added, removed: removed }; - } else { - components.push({value: value, added: added, removed: removed }); - } - }, - extractCommon: function(basePath, newString, oldString, diagonalPath) { - var newLen = newString.length, - oldLen = oldString.length, - newPos = basePath.newPos, - oldPos = newPos - diagonalPath; - while (newPos+1 < newLen && oldPos+1 < oldLen && this.equals(newString[newPos+1], oldString[oldPos+1])) { - newPos++; - oldPos++; - - this.pushComponent(basePath.components, newString[newPos], undefined, undefined); - } - basePath.newPos = newPos; - return oldPos; - }, - - equals: function(left, right) { - var reWhitespace = /\S/; - if (this.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right)) { - return true; - } else { - return left === right; - } - }, - join: function(left, right) { - return left + right; - }, - tokenize: function(value) { - return value; - } - }; - - var CharDiff = new Diff(); - - var WordDiff = new Diff(true); - var WordWithSpaceDiff = new Diff(); - WordDiff.tokenize = WordWithSpaceDiff.tokenize = function(value) { - return removeEmpty(value.split(/(\s+|\b)/)); - }; - - var CssDiff = new Diff(true); - CssDiff.tokenize = function(value) { - return removeEmpty(value.split(/([{}:;,]|\s+)/)); - }; - - var LineDiff = new Diff(); - LineDiff.tokenize = function(value) { - return value.split(/^/m); - }; - - return { - Diff: Diff, - - diffChars: function(oldStr, newStr) { return CharDiff.diff(oldStr, newStr); }, - diffWords: function(oldStr, newStr) { return WordDiff.diff(oldStr, newStr); }, - diffWordsWithSpace: function(oldStr, newStr) { return WordWithSpaceDiff.diff(oldStr, newStr); }, - diffLines: function(oldStr, newStr) { return LineDiff.diff(oldStr, newStr); }, - - diffCss: function(oldStr, newStr) { return CssDiff.diff(oldStr, newStr); }, - - createPatch: function(fileName, oldStr, newStr, oldHeader, newHeader) { - var ret = []; - - ret.push('Index: ' + fileName); - ret.push('==================================================================='); - ret.push('--- ' + fileName + (typeof oldHeader === 'undefined' ? '' : '\t' + oldHeader)); - ret.push('+++ ' + fileName + (typeof newHeader === 'undefined' ? '' : '\t' + newHeader)); - - var diff = LineDiff.diff(oldStr, newStr); - if (!diff[diff.length-1].value) { - diff.pop(); // Remove trailing newline add - } - diff.push({value: '', lines: []}); // Append an empty value to make cleanup easier - - function contextLines(lines) { - return lines.map(function(entry) { return ' ' + entry; }); - } - function eofNL(curRange, i, current) { - var last = diff[diff.length-2], - isLast = i === diff.length-2, - isLastOfType = i === diff.length-3 && (current.added !== last.added || current.removed !== last.removed); - - // Figure out if this is the last line for the given file and missing NL - if (!/\n$/.test(current.value) && (isLast || isLastOfType)) { - curRange.push('\\ No newline at end of file'); - } - } - - var oldRangeStart = 0, newRangeStart = 0, curRange = [], - oldLine = 1, newLine = 1; - for (var i = 0; i < diff.length; i++) { - var current = diff[i], - lines = current.lines || current.value.replace(/\n$/, '').split('\n'); - current.lines = lines; - - if (current.added || current.removed) { - if (!oldRangeStart) { - var prev = diff[i-1]; - oldRangeStart = oldLine; - newRangeStart = newLine; - - if (prev) { - curRange = contextLines(prev.lines.slice(-4)); - oldRangeStart -= curRange.length; - newRangeStart -= curRange.length; - } - } - curRange.push.apply(curRange, lines.map(function(entry) { return (current.added?'+':'-') + entry; })); - eofNL(curRange, i, current); - - if (current.added) { - newLine += lines.length; - } else { - oldLine += lines.length; - } - } else { - if (oldRangeStart) { - // Close out any changes that have been output (or join overlapping) - if (lines.length <= 8 && i < diff.length-2) { - // Overlapping - curRange.push.apply(curRange, contextLines(lines)); - } else { - // end the range and output - var contextSize = Math.min(lines.length, 4); - ret.push( - '@@ -' + oldRangeStart + ',' + (oldLine-oldRangeStart+contextSize) - + ' +' + newRangeStart + ',' + (newLine-newRangeStart+contextSize) - + ' @@'); - ret.push.apply(ret, curRange); - ret.push.apply(ret, contextLines(lines.slice(0, contextSize))); - if (lines.length <= 4) { - eofNL(ret, i, current); - } - - oldRangeStart = 0; newRangeStart = 0; curRange = []; - } - } - oldLine += lines.length; - newLine += lines.length; - } - } - - return ret.join('\n') + '\n'; - }, - - applyPatch: function(oldStr, uniDiff) { - var diffstr = uniDiff.split('\n'); - var diff = []; - var remEOFNL = false, - addEOFNL = false; - - for (var i = (diffstr[0][0]==='I'?4:0); i < diffstr.length; i++) { - if(diffstr[i][0] === '@') { - var meh = diffstr[i].split(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/); - diff.unshift({ - start:meh[3], - oldlength:meh[2], - oldlines:[], - newlength:meh[4], - newlines:[] - }); - } else if(diffstr[i][0] === '+') { - diff[0].newlines.push(diffstr[i].substr(1)); - } else if(diffstr[i][0] === '-') { - diff[0].oldlines.push(diffstr[i].substr(1)); - } else if(diffstr[i][0] === ' ') { - diff[0].newlines.push(diffstr[i].substr(1)); - diff[0].oldlines.push(diffstr[i].substr(1)); - } else if(diffstr[i][0] === '\\') { - if (diffstr[i-1][0] === '+') { - remEOFNL = true; - } else if(diffstr[i-1][0] === '-') { - addEOFNL = true; - } - } - } - - var str = oldStr.split('\n'); - for (var i = diff.length - 1; i >= 0; i--) { - var d = diff[i]; - for (var j = 0; j < d.oldlength; j++) { - if(str[d.start-1+j] !== d.oldlines[j]) { - return false; - } - } - Array.prototype.splice.apply(str,[d.start-1,+d.oldlength].concat(d.newlines)); - } - - if (remEOFNL) { - while (!str[str.length-1]) { - str.pop(); - } - } else if (addEOFNL) { - str.push(''); - } - return str.join('\n'); - }, - - convertChangesToXML: function(changes){ - var ret = []; - for ( var i = 0; i < changes.length; i++) { - var change = changes[i]; - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - - ret.push(escapeHTML(change.value)); - - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - } - return ret.join(''); - }, - - // See: http://code.google.com/p/google-diff-match-patch/wiki/API - convertChangesToDMP: function(changes){ - var ret = [], change; - for ( var i = 0; i < changes.length; i++) { - change = changes[i]; - ret.push([(change.added ? 1 : change.removed ? -1 : 0), change.value]); - } - return ret; - } - }; -})(); - -if (typeof module !== 'undefined') { - module.exports = JsDiff; -} - -}); // module: browser/diff.js - -require.register("browser/events.js", function(module, exports, require){ - -/** - * Module exports. - */ - -exports.EventEmitter = EventEmitter; - -/** - * Check if `obj` is an array. - */ - -function isArray(obj) { - return '[object Array]' == {}.toString.call(obj); -} - -/** - * Event emitter constructor. - * - * @api public - */ - -function EventEmitter(){}; - -/** - * Adds a listener. - * - * @api public - */ - -EventEmitter.prototype.on = function (name, fn) { - if (!this.$events) { - this.$events = {}; - } - - if (!this.$events[name]) { - this.$events[name] = fn; - } else if (isArray(this.$events[name])) { - this.$events[name].push(fn); - } else { - this.$events[name] = [this.$events[name], fn]; - } - - return this; -}; - -EventEmitter.prototype.addListener = EventEmitter.prototype.on; - -/** - * Adds a volatile listener. - * - * @api public - */ - -EventEmitter.prototype.once = function (name, fn) { - var self = this; - - function on () { - self.removeListener(name, on); - fn.apply(this, arguments); - }; - - on.listener = fn; - this.on(name, on); - - return this; -}; - -/** - * Removes a listener. - * - * @api public - */ - -EventEmitter.prototype.removeListener = function (name, fn) { - if (this.$events && this.$events[name]) { - var list = this.$events[name]; - - if (isArray(list)) { - var pos = -1; - - for (var i = 0, l = list.length; i < l; i++) { - if (list[i] === fn || (list[i].listener && list[i].listener === fn)) { - pos = i; - break; - } - } - - if (pos < 0) { - return this; - } - - list.splice(pos, 1); - - if (!list.length) { - delete this.$events[name]; - } - } else if (list === fn || (list.listener && list.listener === fn)) { - delete this.$events[name]; - } - } - - return this; -}; - -/** - * Removes all listeners for an event. - * - * @api public - */ - -EventEmitter.prototype.removeAllListeners = function (name) { - if (name === undefined) { - this.$events = {}; - return this; - } - - if (this.$events && this.$events[name]) { - this.$events[name] = null; - } - - return this; -}; - -/** - * Gets all listeners for a certain event. - * - * @api public - */ - -EventEmitter.prototype.listeners = function (name) { - if (!this.$events) { - this.$events = {}; - } - - if (!this.$events[name]) { - this.$events[name] = []; - } - - if (!isArray(this.$events[name])) { - this.$events[name] = [this.$events[name]]; - } - - return this.$events[name]; -}; - -/** - * Emits an event. - * - * @api public - */ - -EventEmitter.prototype.emit = function (name) { - if (!this.$events) { - return false; - } - - var handler = this.$events[name]; - - if (!handler) { - return false; - } - - var args = [].slice.call(arguments, 1); - - if ('function' == typeof handler) { - handler.apply(this, args); - } else if (isArray(handler)) { - var listeners = handler.slice(); - - for (var i = 0, l = listeners.length; i < l; i++) { - listeners[i].apply(this, args); - } - } else { - return false; - } - - return true; -}; -}); // module: browser/events.js - -require.register("browser/fs.js", function(module, exports, require){ - -}); // module: browser/fs.js - -require.register("browser/path.js", function(module, exports, require){ - -}); // module: browser/path.js - -require.register("browser/progress.js", function(module, exports, require){ - -/** - * Expose `Progress`. - */ - -module.exports = Progress; - -/** - * Initialize a new `Progress` indicator. - */ - -function Progress() { - this.percent = 0; - this.size(0); - this.fontSize(11); - this.font('helvetica, arial, sans-serif'); -} - -/** - * Set progress size to `n`. - * - * @param {Number} n - * @return {Progress} for chaining - * @api public - */ - -Progress.prototype.size = function(n){ - this._size = n; - return this; -}; - -/** - * Set text to `str`. - * - * @param {String} str - * @return {Progress} for chaining - * @api public - */ - -Progress.prototype.text = function(str){ - this._text = str; - return this; -}; - -/** - * Set font size to `n`. - * - * @param {Number} n - * @return {Progress} for chaining - * @api public - */ - -Progress.prototype.fontSize = function(n){ - this._fontSize = n; - return this; -}; - -/** - * Set font `family`. - * - * @param {String} family - * @return {Progress} for chaining - */ - -Progress.prototype.font = function(family){ - this._font = family; - return this; -}; - -/** - * Update percentage to `n`. - * - * @param {Number} n - * @return {Progress} for chaining - */ - -Progress.prototype.update = function(n){ - this.percent = n; - return this; -}; - -/** - * Draw on `ctx`. - * - * @param {CanvasRenderingContext2d} ctx - * @return {Progress} for chaining - */ - -Progress.prototype.draw = function(ctx){ - var percent = Math.min(this.percent, 100) - , size = this._size - , half = size / 2 - , x = half - , y = half - , rad = half - 1 - , fontSize = this._fontSize; - - ctx.font = fontSize + 'px ' + this._font; - - var angle = Math.PI * 2 * (percent / 100); - ctx.clearRect(0, 0, size, size); - - // outer circle - ctx.strokeStyle = '#9f9f9f'; - ctx.beginPath(); - ctx.arc(x, y, rad, 0, angle, false); - ctx.stroke(); - - // inner circle - ctx.strokeStyle = '#eee'; - ctx.beginPath(); - ctx.arc(x, y, rad - 1, 0, angle, true); - ctx.stroke(); - - // text - var text = this._text || (percent | 0) + '%' - , w = ctx.measureText(text).width; - - ctx.fillText( - text - , x - w / 2 + 1 - , y + fontSize / 2 - 1); - - return this; -}; - -}); // module: browser/progress.js - -require.register("browser/tty.js", function(module, exports, require){ - -exports.isatty = function(){ - return true; -}; - -exports.getWindowSize = function(){ - if ('innerHeight' in global) { - return [global.innerHeight, global.innerWidth]; - } else { - // In a Web Worker, the DOM Window is not available. - return [640, 480]; - } -}; - -}); // module: browser/tty.js - -require.register("context.js", function(module, exports, require){ - -/** - * Expose `Context`. - */ - -module.exports = Context; - -/** - * Initialize a new `Context`. - * - * @api private - */ - -function Context(){} - -/** - * Set or get the context `Runnable` to `runnable`. - * - * @param {Runnable} runnable - * @return {Context} - * @api private - */ - -Context.prototype.runnable = function(runnable){ - if (0 == arguments.length) return this._runnable; - this.test = this._runnable = runnable; - return this; -}; - -/** - * Set test timeout `ms`. - * - * @param {Number} ms - * @return {Context} self - * @api private - */ - -Context.prototype.timeout = function(ms){ - this.runnable().timeout(ms); - return this; -}; - -/** - * Set test slowness threshold `ms`. - * - * @param {Number} ms - * @return {Context} self - * @api private - */ - -Context.prototype.slow = function(ms){ - this.runnable().slow(ms); - return this; -}; - -/** - * Inspect the context void of `._runnable`. - * - * @return {String} - * @api private - */ - -Context.prototype.inspect = function(){ - return JSON.stringify(this, function(key, val){ - if ('_runnable' == key) return; - if ('test' == key) return; - return val; - }, 2); -}; - -}); // module: context.js - -require.register("hook.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Runnable = require('./runnable'); - -/** - * Expose `Hook`. - */ - -module.exports = Hook; - -/** - * Initialize a new `Hook` with the given `title` and callback `fn`. - * - * @param {String} title - * @param {Function} fn - * @api private - */ - -function Hook(title, fn) { - Runnable.call(this, title, fn); - this.type = 'hook'; -} - -/** - * Inherit from `Runnable.prototype`. - */ - -function F(){}; -F.prototype = Runnable.prototype; -Hook.prototype = new F; -Hook.prototype.constructor = Hook; - - -/** - * Get or set the test `err`. - * - * @param {Error} err - * @return {Error} - * @api public - */ - -Hook.prototype.error = function(err){ - if (0 == arguments.length) { - var err = this._error; - this._error = null; - return err; - } - - this._error = err; -}; - -}); // module: hook.js - -require.register("interfaces/bdd.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Suite = require('../suite') - , Test = require('../test') - , utils = require('../utils'); - -/** - * BDD-style interface: - * - * describe('Array', function(){ - * describe('#indexOf()', function(){ - * it('should return -1 when not present', function(){ - * - * }); - * - * it('should return the index when present', function(){ - * - * }); - * }); - * }); - * - */ - -module.exports = function(suite){ - var suites = [suite]; - - suite.on('pre-require', function(context, file, mocha){ - - /** - * Execute before running tests. - */ - - context.before = function(fn){ - suites[0].beforeAll(fn); - }; - - /** - * Execute after running tests. - */ - - context.after = function(fn){ - suites[0].afterAll(fn); - }; - - /** - * Execute before each test case. - */ - - context.beforeEach = function(fn){ - suites[0].beforeEach(fn); - }; - - /** - * Execute after each test case. - */ - - context.afterEach = function(fn){ - suites[0].afterEach(fn); - }; - - /** - * Describe a "suite" with the given `title` - * and callback `fn` containing nested suites - * and/or tests. - */ - - context.describe = context.context = function(title, fn){ - var suite = Suite.create(suites[0], title); - suites.unshift(suite); - fn.call(suite); - suites.shift(); - return suite; - }; - - /** - * Pending describe. - */ - - context.xdescribe = - context.xcontext = - context.describe.skip = function(title, fn){ - var suite = Suite.create(suites[0], title); - suite.pending = true; - suites.unshift(suite); - fn.call(suite); - suites.shift(); - }; - - /** - * Exclusive suite. - */ - - context.describe.only = function(title, fn){ - var suite = context.describe(title, fn); - mocha.grep(suite.fullTitle()); - }; - - /** - * Describe a specification or test-case - * with the given `title` and callback `fn` - * acting as a thunk. - */ - - context.it = context.specify = function(title, fn){ - var suite = suites[0]; - if (suite.pending) var fn = null; - var test = new Test(title, fn); - suite.addTest(test); - return test; - }; - - /** - * Exclusive test-case. - */ - - context.it.only = function(title, fn){ - var test = context.it(title, fn); - var reString = '^' + utils.escapeRegexp(test.fullTitle()) + '$'; - mocha.grep(new RegExp(reString)); - }; - - /** - * Pending test case. - */ - - context.xit = - context.xspecify = - context.it.skip = function(title){ - context.it(title); - }; - }); -}; - -}); // module: interfaces/bdd.js - -require.register("interfaces/exports.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Suite = require('../suite') - , Test = require('../test'); - -/** - * TDD-style interface: - * - * exports.Array = { - * '#indexOf()': { - * 'should return -1 when the value is not present': function(){ - * - * }, - * - * 'should return the correct index when the value is present': function(){ - * - * } - * } - * }; - * - */ - -module.exports = function(suite){ - var suites = [suite]; - - suite.on('require', visit); - - function visit(obj) { - var suite; - for (var key in obj) { - if ('function' == typeof obj[key]) { - var fn = obj[key]; - switch (key) { - case 'before': - suites[0].beforeAll(fn); - break; - case 'after': - suites[0].afterAll(fn); - break; - case 'beforeEach': - suites[0].beforeEach(fn); - break; - case 'afterEach': - suites[0].afterEach(fn); - break; - default: - suites[0].addTest(new Test(key, fn)); - } - } else { - var suite = Suite.create(suites[0], key); - suites.unshift(suite); - visit(obj[key]); - suites.shift(); - } - } - } -}; - -}); // module: interfaces/exports.js - -require.register("interfaces/index.js", function(module, exports, require){ - -exports.bdd = require('./bdd'); -exports.tdd = require('./tdd'); -exports.qunit = require('./qunit'); -exports.exports = require('./exports'); - -}); // module: interfaces/index.js - -require.register("interfaces/qunit.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Suite = require('../suite') - , Test = require('../test') - , utils = require('../utils'); - -/** - * QUnit-style interface: - * - * suite('Array'); - * - * test('#length', function(){ - * var arr = [1,2,3]; - * ok(arr.length == 3); - * }); - * - * test('#indexOf()', function(){ - * var arr = [1,2,3]; - * ok(arr.indexOf(1) == 0); - * ok(arr.indexOf(2) == 1); - * ok(arr.indexOf(3) == 2); - * }); - * - * suite('String'); - * - * test('#length', function(){ - * ok('foo'.length == 3); - * }); - * - */ - -module.exports = function(suite){ - var suites = [suite]; - - suite.on('pre-require', function(context, file, mocha){ - - /** - * Execute before running tests. - */ - - context.before = function(fn){ - suites[0].beforeAll(fn); - }; - - /** - * Execute after running tests. - */ - - context.after = function(fn){ - suites[0].afterAll(fn); - }; - - /** - * Execute before each test case. - */ - - context.beforeEach = function(fn){ - suites[0].beforeEach(fn); - }; - - /** - * Execute after each test case. - */ - - context.afterEach = function(fn){ - suites[0].afterEach(fn); - }; - - /** - * Describe a "suite" with the given `title`. - */ - - context.suite = function(title){ - if (suites.length > 1) suites.shift(); - var suite = Suite.create(suites[0], title); - suites.unshift(suite); - return suite; - }; - - /** - * Exclusive test-case. - */ - - context.suite.only = function(title, fn){ - var suite = context.suite(title, fn); - mocha.grep(suite.fullTitle()); - }; - - /** - * Describe a specification or test-case - * with the given `title` and callback `fn` - * acting as a thunk. - */ - - context.test = function(title, fn){ - var test = new Test(title, fn); - suites[0].addTest(test); - return test; - }; - - /** - * Exclusive test-case. - */ - - context.test.only = function(title, fn){ - var test = context.test(title, fn); - var reString = '^' + utils.escapeRegexp(test.fullTitle()) + '$'; - mocha.grep(new RegExp(reString)); - }; - - /** - * Pending test case. - */ - - context.test.skip = function(title){ - context.test(title); - }; - }); -}; - -}); // module: interfaces/qunit.js - -require.register("interfaces/tdd.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Suite = require('../suite') - , Test = require('../test') - , utils = require('../utils');; - -/** - * TDD-style interface: - * - * suite('Array', function(){ - * suite('#indexOf()', function(){ - * suiteSetup(function(){ - * - * }); - * - * test('should return -1 when not present', function(){ - * - * }); - * - * test('should return the index when present', function(){ - * - * }); - * - * suiteTeardown(function(){ - * - * }); - * }); - * }); - * - */ - -module.exports = function(suite){ - var suites = [suite]; - - suite.on('pre-require', function(context, file, mocha){ - - /** - * Execute before each test case. - */ - - context.setup = function(fn){ - suites[0].beforeEach(fn); - }; - - /** - * Execute after each test case. - */ - - context.teardown = function(fn){ - suites[0].afterEach(fn); - }; - - /** - * Execute before the suite. - */ - - context.suiteSetup = function(fn){ - suites[0].beforeAll(fn); - }; - - /** - * Execute after the suite. - */ - - context.suiteTeardown = function(fn){ - suites[0].afterAll(fn); - }; - - /** - * Describe a "suite" with the given `title` - * and callback `fn` containing nested suites - * and/or tests. - */ - - context.suite = function(title, fn){ - var suite = Suite.create(suites[0], title); - suites.unshift(suite); - fn.call(suite); - suites.shift(); - return suite; - }; - - /** - * Pending suite. - */ - context.suite.skip = function(title, fn) { - var suite = Suite.create(suites[0], title); - suite.pending = true; - suites.unshift(suite); - fn.call(suite); - suites.shift(); - }; - - /** - * Exclusive test-case. - */ - - context.suite.only = function(title, fn){ - var suite = context.suite(title, fn); - mocha.grep(suite.fullTitle()); - }; - - /** - * Describe a specification or test-case - * with the given `title` and callback `fn` - * acting as a thunk. - */ - - context.test = function(title, fn){ - var suite = suites[0]; - if (suite.pending) var fn = null; - var test = new Test(title, fn); - suite.addTest(test); - return test; - }; - - /** - * Exclusive test-case. - */ - - context.test.only = function(title, fn){ - var test = context.test(title, fn); - var reString = '^' + utils.escapeRegexp(test.fullTitle()) + '$'; - mocha.grep(new RegExp(reString)); - }; - - /** - * Pending test case. - */ - - context.test.skip = function(title){ - context.test(title); - }; - }); -}; - -}); // module: interfaces/tdd.js - -require.register("mocha.js", function(module, exports, require){ -/*! - * mocha - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var path = require('browser/path') - , utils = require('./utils'); - -/** - * Expose `Mocha`. - */ - -exports = module.exports = Mocha; - -/** - * Expose internals. - */ - -exports.utils = utils; -exports.interfaces = require('./interfaces'); -exports.reporters = require('./reporters'); -exports.Runnable = require('./runnable'); -exports.Context = require('./context'); -exports.Runner = require('./runner'); -exports.Suite = require('./suite'); -exports.Hook = require('./hook'); -exports.Test = require('./test'); - -/** - * Return image `name` path. - * - * @param {String} name - * @return {String} - * @api private - */ - -function image(name) { - return __dirname + '/../images/' + name + '.png'; -} - -/** - * Setup mocha with `options`. - * - * Options: - * - * - `ui` name "bdd", "tdd", "exports" etc - * - `reporter` reporter instance, defaults to `mocha.reporters.Dot` - * - `globals` array of accepted globals - * - `timeout` timeout in milliseconds - * - `bail` bail on the first test failure - * - `slow` milliseconds to wait before considering a test slow - * - `ignoreLeaks` ignore global leaks - * - `grep` string or regexp to filter tests with - * - * @param {Object} options - * @api public - */ - -function Mocha(options) { - options = options || {}; - this.files = []; - this.options = options; - this.grep(options.grep); - this.suite = new exports.Suite('', new exports.Context); - this.ui(options.ui); - this.bail(options.bail); - this.reporter(options.reporter); - if (null != options.timeout) this.timeout(options.timeout); - if (options.slow) this.slow(options.slow); -} - -/** - * Enable or disable bailing on the first failure. - * - * @param {Boolean} [bail] - * @api public - */ - -Mocha.prototype.bail = function(bail){ - if (0 == arguments.length) bail = true; - this.suite.bail(bail); - return this; -}; - -/** - * Add test `file`. - * - * @param {String} file - * @api public - */ - -Mocha.prototype.addFile = function(file){ - this.files.push(file); - return this; -}; - -/** - * Set reporter to `reporter`, defaults to "dot". - * - * @param {String|Function} reporter name or constructor - * @api public - */ - -Mocha.prototype.reporter = function(reporter){ - if ('function' == typeof reporter) { - this._reporter = reporter; - } else { - reporter = reporter || 'dot'; - try { - this._reporter = require('./reporters/' + reporter); - } catch (err) { - this._reporter = require(reporter); - } - if (!this._reporter) throw new Error('invalid reporter "' + reporter + '"'); - } - return this; -}; - -/** - * Set test UI `name`, defaults to "bdd". - * - * @param {String} bdd - * @api public - */ - -Mocha.prototype.ui = function(name){ - name = name || 'bdd'; - this._ui = exports.interfaces[name]; - if (!this._ui) throw new Error('invalid interface "' + name + '"'); - this._ui = this._ui(this.suite); - return this; -}; - -/** - * Load registered files. - * - * @api private - */ - -Mocha.prototype.loadFiles = function(fn){ - var self = this; - var suite = this.suite; - var pending = this.files.length; - this.files.forEach(function(file){ - file = path.resolve(file); - suite.emit('pre-require', global, file, self); - suite.emit('require', require(file), file, self); - suite.emit('post-require', global, file, self); - --pending || (fn && fn()); - }); -}; - -/** - * Enable growl support. - * - * @api private - */ - -Mocha.prototype._growl = function(runner, reporter) { - var notify = require('growl'); - - runner.on('end', function(){ - var stats = reporter.stats; - if (stats.failures) { - var msg = stats.failures + ' of ' + runner.total + ' tests failed'; - notify(msg, { name: 'mocha', title: 'Failed', image: image('error') }); - } else { - notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', { - name: 'mocha' - , title: 'Passed' - , image: image('ok') - }); - } - }); -}; - -/** - * Add regexp to grep, if `re` is a string it is escaped. - * - * @param {RegExp|String} re - * @return {Mocha} - * @api public - */ - -Mocha.prototype.grep = function(re){ - this.options.grep = 'string' == typeof re - ? new RegExp(utils.escapeRegexp(re)) - : re; - return this; -}; - -/** - * Invert `.grep()` matches. - * - * @return {Mocha} - * @api public - */ - -Mocha.prototype.invert = function(){ - this.options.invert = true; - return this; -}; - -/** - * Ignore global leaks. - * - * @param {Boolean} ignore - * @return {Mocha} - * @api public - */ - -Mocha.prototype.ignoreLeaks = function(ignore){ - this.options.ignoreLeaks = !!ignore; - return this; -}; - -/** - * Enable global leak checking. - * - * @return {Mocha} - * @api public - */ - -Mocha.prototype.checkLeaks = function(){ - this.options.ignoreLeaks = false; - return this; -}; - -/** - * Enable growl support. - * - * @return {Mocha} - * @api public - */ - -Mocha.prototype.growl = function(){ - this.options.growl = true; - return this; -}; - -/** - * Ignore `globals` array or string. - * - * @param {Array|String} globals - * @return {Mocha} - * @api public - */ - -Mocha.prototype.globals = function(globals){ - this.options.globals = (this.options.globals || []).concat(globals); - return this; -}; - -/** - * Set the timeout in milliseconds. - * - * @param {Number} timeout - * @return {Mocha} - * @api public - */ - -Mocha.prototype.timeout = function(timeout){ - this.suite.timeout(timeout); - return this; -}; - -/** - * Set slowness threshold in milliseconds. - * - * @param {Number} slow - * @return {Mocha} - * @api public - */ - -Mocha.prototype.slow = function(slow){ - this.suite.slow(slow); - return this; -}; - -/** - * Makes all tests async (accepting a callback) - * - * @return {Mocha} - * @api public - */ - -Mocha.prototype.asyncOnly = function(){ - this.options.asyncOnly = true; - return this; -}; - -/** - * Run tests and invoke `fn()` when complete. - * - * @param {Function} fn - * @return {Runner} - * @api public - */ - -Mocha.prototype.run = function(fn){ - if (this.files.length) this.loadFiles(); - var suite = this.suite; - var options = this.options; - var runner = new exports.Runner(suite); - var reporter = new this._reporter(runner); - runner.ignoreLeaks = false !== options.ignoreLeaks; - runner.asyncOnly = options.asyncOnly; - if (options.grep) runner.grep(options.grep, options.invert); - if (options.globals) runner.globals(options.globals); - if (options.growl) this._growl(runner, reporter); - return runner.run(fn); -}; - -}); // module: mocha.js - -require.register("ms.js", function(module, exports, require){ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} options - * @return {String|Number} - * @api public - */ - -module.exports = function(val, options){ - options = options || {}; - if ('string' == typeof val) return parse(val); - return options.long - ? long(val) - : short(val); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - var match = /^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(str); - if (!match) return; - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'y': - return n * y; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 's': - return n * s; - case 'ms': - return n; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function short(ms) { - if (ms >= d) return Math.round(ms / d) + 'd'; - if (ms >= h) return Math.round(ms / h) + 'h'; - if (ms >= m) return Math.round(ms / m) + 'm'; - if (ms >= s) return Math.round(ms / s) + 's'; - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function long(ms) { - return plural(ms, d, 'day') - || plural(ms, h, 'hour') - || plural(ms, m, 'minute') - || plural(ms, s, 'second') - || ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, n, name) { - if (ms < n) return; - if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name; - return Math.ceil(ms / n) + ' ' + name + 's'; -} - -}); // module: ms.js - -require.register("reporters/base.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var tty = require('browser/tty') - , diff = require('browser/diff') - , ms = require('../ms'); - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Check if both stdio streams are associated with a tty. - */ - -var isatty = tty.isatty(1) && tty.isatty(2); - -/** - * Expose `Base`. - */ - -exports = module.exports = Base; - -/** - * Enable coloring by default. - */ - -exports.useColors = isatty; - -/** - * Default color map. - */ - -exports.colors = { - 'pass': 90 - , 'fail': 31 - , 'bright pass': 92 - , 'bright fail': 91 - , 'bright yellow': 93 - , 'pending': 36 - , 'suite': 0 - , 'error title': 0 - , 'error message': 31 - , 'error stack': 90 - , 'checkmark': 32 - , 'fast': 90 - , 'medium': 33 - , 'slow': 31 - , 'green': 32 - , 'light': 90 - , 'diff gutter': 90 - , 'diff added': 42 - , 'diff removed': 41 -}; - -/** - * Default symbol map. - */ - -exports.symbols = { - ok: '✓', - err: '✖', - dot: '․' -}; - -// With node.js on Windows: use symbols available in terminal default fonts -if ('win32' == process.platform) { - exports.symbols.ok = '\u221A'; - exports.symbols.err = '\u00D7'; - exports.symbols.dot = '.'; -} - -/** - * Color `str` with the given `type`, - * allowing colors to be disabled, - * as well as user-defined color - * schemes. - * - * @param {String} type - * @param {String} str - * @return {String} - * @api private - */ - -var color = exports.color = function(type, str) { - if (!exports.useColors) return str; - return '\u001b[' + exports.colors[type] + 'm' + str + '\u001b[0m'; -}; - -/** - * Expose term window size, with some - * defaults for when stderr is not a tty. - */ - -exports.window = { - width: isatty - ? process.stdout.getWindowSize - ? process.stdout.getWindowSize(1)[0] - : tty.getWindowSize()[1] - : 75 -}; - -/** - * Expose some basic cursor interactions - * that are common among reporters. - */ - -exports.cursor = { - hide: function(){ - process.stdout.write('\u001b[?25l'); - }, - - show: function(){ - process.stdout.write('\u001b[?25h'); - }, - - deleteLine: function(){ - process.stdout.write('\u001b[2K'); - }, - - beginningOfLine: function(){ - process.stdout.write('\u001b[0G'); - }, - - CR: function(){ - exports.cursor.deleteLine(); - exports.cursor.beginningOfLine(); - } -}; - -/** - * Outut the given `failures` as a list. - * - * @param {Array} failures - * @api public - */ - -exports.list = function(failures){ - console.error(); - failures.forEach(function(test, i){ - // format - var fmt = color('error title', ' %s) %s:\n') - + color('error message', ' %s') - + color('error stack', '\n%s\n'); - - // msg - var err = test.err - , message = err.message || '' - , stack = err.stack || message - , index = stack.indexOf(message) + message.length - , msg = stack.slice(0, index) - , actual = err.actual - , expected = err.expected - , escape = true; - - // uncaught - if (err.uncaught) { - msg = 'Uncaught ' + msg; - } - - // explicitly show diff - if (err.showDiff && sameType(actual, expected)) { - escape = false; - err.actual = actual = stringify(actual); - err.expected = expected = stringify(expected); - } - - // actual / expected diff - if ('string' == typeof actual && 'string' == typeof expected) { - msg = errorDiff(err, 'WordsWithSpace', escape); - - // linenos - var lines = msg.split('\n'); - if (lines.length > 4) { - var width = String(lines.length).length; - msg = lines.map(function(str, i){ - return pad(++i, width) + ' |' + ' ' + str; - }).join('\n'); - } - - // legend - msg = '\n' - + color('diff removed', 'actual') - + ' ' - + color('diff added', 'expected') - + '\n\n' - + msg - + '\n'; - - // indent - msg = msg.replace(/^/gm, ' '); - - fmt = color('error title', ' %s) %s:\n%s') - + color('error stack', '\n%s\n'); - } - - // indent stack trace without msg - stack = stack.slice(index ? index + 1 : index) - .replace(/^/gm, ' '); - - console.error(fmt, (i + 1), test.fullTitle(), msg, stack); - }); -}; - -/** - * Initialize a new `Base` reporter. - * - * All other reporters generally - * inherit from this reporter, providing - * stats such as test duration, number - * of tests passed / failed etc. - * - * @param {Runner} runner - * @api public - */ - -function Base(runner) { - var self = this - , stats = this.stats = { suites: 0, tests: 0, passes: 0, pending: 0, failures: 0 } - , failures = this.failures = []; - - if (!runner) return; - this.runner = runner; - - runner.stats = stats; - - runner.on('start', function(){ - stats.start = new Date; - }); - - runner.on('suite', function(suite){ - stats.suites = stats.suites || 0; - suite.root || stats.suites++; - }); - - runner.on('test end', function(test){ - stats.tests = stats.tests || 0; - stats.tests++; - }); - - runner.on('pass', function(test){ - stats.passes = stats.passes || 0; - - var medium = test.slow() / 2; - test.speed = test.duration > test.slow() - ? 'slow' - : test.duration > medium - ? 'medium' - : 'fast'; - - stats.passes++; - }); - - runner.on('fail', function(test, err){ - stats.failures = stats.failures || 0; - stats.failures++; - test.err = err; - failures.push(test); - }); - - runner.on('end', function(){ - stats.end = new Date; - stats.duration = new Date - stats.start; - }); - - runner.on('pending', function(){ - stats.pending++; - }); -} - -/** - * Output common epilogue used by many of - * the bundled reporters. - * - * @api public - */ - -Base.prototype.epilogue = function(){ - var stats = this.stats; - var tests; - var fmt; - - console.log(); - - // passes - fmt = color('bright pass', ' ') - + color('green', ' %d passing') - + color('light', ' (%s)'); - - console.log(fmt, - stats.passes || 0, - ms(stats.duration)); - - // pending - if (stats.pending) { - fmt = color('pending', ' ') - + color('pending', ' %d pending'); - - console.log(fmt, stats.pending); - } - - // failures - if (stats.failures) { - fmt = color('fail', ' %d failing'); - - console.error(fmt, - stats.failures); - - Base.list(this.failures); - console.error(); - } - - console.log(); -}; - -/** - * Pad the given `str` to `len`. - * - * @param {String} str - * @param {String} len - * @return {String} - * @api private - */ - -function pad(str, len) { - str = String(str); - return Array(len - str.length + 1).join(' ') + str; -} - -/** - * Return a character diff for `err`. - * - * @param {Error} err - * @return {String} - * @api private - */ - -function errorDiff(err, type, escape) { - return diff['diff' + type](err.actual, err.expected).map(function(str){ - if (escape) { - str.value = str.value - .replace(/\t/g, '') - .replace(/\r/g, '') - .replace(/\n/g, '\n'); - } - if (str.added) return colorLines('diff added', str.value); - if (str.removed) return colorLines('diff removed', str.value); - return str.value; - }).join(''); -} - -/** - * Color lines for `str`, using the color `name`. - * - * @param {String} name - * @param {String} str - * @return {String} - * @api private - */ - -function colorLines(name, str) { - return str.split('\n').map(function(str){ - return color(name, str); - }).join('\n'); -} - -/** - * Stringify `obj`. - * - * @param {Mixed} obj - * @return {String} - * @api private - */ - -function stringify(obj) { - if (obj instanceof RegExp) return obj.toString(); - return JSON.stringify(obj, null, 2); -} - -/** - * Check that a / b have the same type. - * - * @param {Object} a - * @param {Object} b - * @return {Boolean} - * @api private - */ - -function sameType(a, b) { - a = Object.prototype.toString.call(a); - b = Object.prototype.toString.call(b); - return a == b; -} - -}); // module: reporters/base.js - -require.register("reporters/doc.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils'); - -/** - * Expose `Doc`. - */ - -exports = module.exports = Doc; - -/** - * Initialize a new `Doc` reporter. - * - * @param {Runner} runner - * @api public - */ - -function Doc(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , total = runner.total - , indents = 2; - - function indent() { - return Array(indents).join(' '); - } - - runner.on('suite', function(suite){ - if (suite.root) return; - ++indents; - console.log('%s
    ', indent()); - ++indents; - console.log('%s

    %s

    ', indent(), utils.escape(suite.title)); - console.log('%s
    ', indent()); - }); - - runner.on('suite end', function(suite){ - if (suite.root) return; - console.log('%s
    ', indent()); - --indents; - console.log('%s
    ', indent()); - --indents; - }); - - runner.on('pass', function(test){ - console.log('%s
    %s
    ', indent(), utils.escape(test.title)); - var code = utils.escape(utils.clean(test.fn.toString())); - console.log('%s
    %s
    ', indent(), code); - }); -} - -}); // module: reporters/doc.js - -require.register("reporters/dot.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , color = Base.color; - -/** - * Expose `Dot`. - */ - -exports = module.exports = Dot; - -/** - * Initialize a new `Dot` matrix test reporter. - * - * @param {Runner} runner - * @api public - */ - -function Dot(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , width = Base.window.width * .75 | 0 - , n = 0; - - runner.on('start', function(){ - process.stdout.write('\n '); - }); - - runner.on('pending', function(test){ - process.stdout.write(color('pending', Base.symbols.dot)); - }); - - runner.on('pass', function(test){ - if (++n % width == 0) process.stdout.write('\n '); - if ('slow' == test.speed) { - process.stdout.write(color('bright yellow', Base.symbols.dot)); - } else { - process.stdout.write(color(test.speed, Base.symbols.dot)); - } - }); - - runner.on('fail', function(test, err){ - if (++n % width == 0) process.stdout.write('\n '); - process.stdout.write(color('fail', Base.symbols.dot)); - }); - - runner.on('end', function(){ - console.log(); - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -Dot.prototype = new F; -Dot.prototype.constructor = Dot; - -}); // module: reporters/dot.js - -require.register("reporters/html-cov.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var JSONCov = require('./json-cov') - , fs = require('browser/fs'); - -/** - * Expose `HTMLCov`. - */ - -exports = module.exports = HTMLCov; - -/** - * Initialize a new `JsCoverage` reporter. - * - * @param {Runner} runner - * @api public - */ - -function HTMLCov(runner) { - var jade = require('jade') - , file = __dirname + '/templates/coverage.jade' - , str = fs.readFileSync(file, 'utf8') - , fn = jade.compile(str, { filename: file }) - , self = this; - - JSONCov.call(this, runner, false); - - runner.on('end', function(){ - process.stdout.write(fn({ - cov: self.cov - , coverageClass: coverageClass - })); - }); -} - -/** - * Return coverage class for `n`. - * - * @return {String} - * @api private - */ - -function coverageClass(n) { - if (n >= 75) return 'high'; - if (n >= 50) return 'medium'; - if (n >= 25) return 'low'; - return 'terrible'; -} -}); // module: reporters/html-cov.js - -require.register("reporters/html.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils') - , Progress = require('../browser/progress') - , escape = utils.escape; - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Expose `Doc`. - */ - -exports = module.exports = HTML; - -/** - * Stats template. - */ - -var statsTemplate = ''; - -/** - * Initialize a new `Doc` reporter. - * - * @param {Runner} runner - * @api public - */ - -function HTML(runner, root) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , total = runner.total - , stat = fragment(statsTemplate) - , items = stat.getElementsByTagName('li') - , passes = items[1].getElementsByTagName('em')[0] - , passesLink = items[1].getElementsByTagName('a')[0] - , failures = items[2].getElementsByTagName('em')[0] - , failuresLink = items[2].getElementsByTagName('a')[0] - , duration = items[3].getElementsByTagName('em')[0] - , canvas = stat.getElementsByTagName('canvas')[0] - , report = fragment('
      ') - , stack = [report] - , progress - , ctx - - root = root || document.getElementById('mocha'); - - if (canvas.getContext) { - var ratio = window.devicePixelRatio || 1; - canvas.style.width = canvas.width; - canvas.style.height = canvas.height; - canvas.width *= ratio; - canvas.height *= ratio; - ctx = canvas.getContext('2d'); - ctx.scale(ratio, ratio); - progress = new Progress; - } - - if (!root) return error('#mocha div missing, add it to your document'); - - // pass toggle - on(passesLink, 'click', function(){ - unhide(); - var name = /pass/.test(report.className) ? '' : ' pass'; - report.className = report.className.replace(/fail|pass/g, '') + name; - if (report.className.trim()) hideSuitesWithout('test pass'); - }); - - // failure toggle - on(failuresLink, 'click', function(){ - unhide(); - var name = /fail/.test(report.className) ? '' : ' fail'; - report.className = report.className.replace(/fail|pass/g, '') + name; - if (report.className.trim()) hideSuitesWithout('test fail'); - }); - - root.appendChild(stat); - root.appendChild(report); - - if (progress) progress.size(40); - - runner.on('suite', function(suite){ - if (suite.root) return; - - // suite - var url = '?grep=' + encodeURIComponent(suite.fullTitle()); - var el = fragment('
    • %s

    • ', url, escape(suite.title)); - - // container - stack[0].appendChild(el); - stack.unshift(document.createElement('ul')); - el.appendChild(stack[0]); - }); - - runner.on('suite end', function(suite){ - if (suite.root) return; - stack.shift(); - }); - - runner.on('fail', function(test, err){ - if ('hook' == test.type) runner.emit('test end', test); - }); - - runner.on('test end', function(test){ - // TODO: add to stats - var percent = stats.tests / this.total * 100 | 0; - if (progress) progress.update(percent).draw(ctx); - - // update stats - var ms = new Date - stats.start; - text(passes, stats.passes); - text(failures, stats.failures); - text(duration, (ms / 1000).toFixed(2)); - - // test - if ('passed' == test.state) { - var el = fragment('
    • %e%ems ‣

    • ', test.speed, test.title, test.duration, encodeURIComponent(test.fullTitle())); - } else if (test.pending) { - var el = fragment('
    • %e

    • ', test.title); - } else { - var el = fragment('
    • %e ‣

    • ', test.title, encodeURIComponent(test.fullTitle())); - var str = test.err.stack || test.err.toString(); - - // FF / Opera do not add the message - if (!~str.indexOf(test.err.message)) { - str = test.err.message + '\n' + str; - } - - // <=IE7 stringifies to [Object Error]. Since it can be overloaded, we - // check for the result of the stringifying. - if ('[object Error]' == str) str = test.err.message; - - // Safari doesn't give you a stack. Let's at least provide a source line. - if (!test.err.stack && test.err.sourceURL && test.err.line !== undefined) { - str += "\n(" + test.err.sourceURL + ":" + test.err.line + ")"; - } - - el.appendChild(fragment('
      %e
      ', str)); - } - - // toggle code - // TODO: defer - if (!test.pending) { - var h2 = el.getElementsByTagName('h2')[0]; - - on(h2, 'click', function(){ - pre.style.display = 'none' == pre.style.display - ? 'block' - : 'none'; - }); - - var pre = fragment('
      %e
      ', utils.clean(test.fn.toString())); - el.appendChild(pre); - pre.style.display = 'none'; - } - - // Don't call .appendChild if #mocha-report was already .shift()'ed off the stack. - if (stack[0]) stack[0].appendChild(el); - }); -} - -/** - * Display error `msg`. - */ - -function error(msg) { - document.body.appendChild(fragment('
      %s
      ', msg)); -} - -/** - * Return a DOM fragment from `html`. - */ - -function fragment(html) { - var args = arguments - , div = document.createElement('div') - , i = 1; - - div.innerHTML = html.replace(/%([se])/g, function(_, type){ - switch (type) { - case 's': return String(args[i++]); - case 'e': return escape(args[i++]); - } - }); - - return div.firstChild; -} - -/** - * Check for suites that do not have elements - * with `classname`, and hide them. - */ - -function hideSuitesWithout(classname) { - var suites = document.getElementsByClassName('suite'); - for (var i = 0; i < suites.length; i++) { - var els = suites[i].getElementsByClassName(classname); - if (0 == els.length) suites[i].className += ' hidden'; - } -} - -/** - * Unhide .hidden suites. - */ - -function unhide() { - var els = document.getElementsByClassName('suite hidden'); - for (var i = 0; i < els.length; ++i) { - els[i].className = els[i].className.replace('suite hidden', 'suite'); - } -} - -/** - * Set `el` text to `str`. - */ - -function text(el, str) { - if (el.textContent) { - el.textContent = str; - } else { - el.innerText = str; - } -} - -/** - * Listen on `event` with callback `fn`. - */ - -function on(el, event, fn) { - if (el.addEventListener) { - el.addEventListener(event, fn, false); - } else { - el.attachEvent('on' + event, fn); - } -} - -}); // module: reporters/html.js - -require.register("reporters/index.js", function(module, exports, require){ - -exports.Base = require('./base'); -exports.Dot = require('./dot'); -exports.Doc = require('./doc'); -exports.TAP = require('./tap'); -exports.JSON = require('./json'); -exports.HTML = require('./html'); -exports.List = require('./list'); -exports.Min = require('./min'); -exports.Spec = require('./spec'); -exports.Nyan = require('./nyan'); -exports.XUnit = require('./xunit'); -exports.Markdown = require('./markdown'); -exports.Progress = require('./progress'); -exports.Landing = require('./landing'); -exports.JSONCov = require('./json-cov'); -exports.HTMLCov = require('./html-cov'); -exports.JSONStream = require('./json-stream'); -exports.Teamcity = require('./teamcity'); - -}); // module: reporters/index.js - -require.register("reporters/json-cov.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base'); - -/** - * Expose `JSONCov`. - */ - -exports = module.exports = JSONCov; - -/** - * Initialize a new `JsCoverage` reporter. - * - * @param {Runner} runner - * @param {Boolean} output - * @api public - */ - -function JSONCov(runner, output) { - var self = this - , output = 1 == arguments.length ? true : output; - - Base.call(this, runner); - - var tests = [] - , failures = [] - , passes = []; - - runner.on('test end', function(test){ - tests.push(test); - }); - - runner.on('pass', function(test){ - passes.push(test); - }); - - runner.on('fail', function(test){ - failures.push(test); - }); - - runner.on('end', function(){ - var cov = global._$jscoverage || {}; - var result = self.cov = map(cov); - result.stats = self.stats; - result.tests = tests.map(clean); - result.failures = failures.map(clean); - result.passes = passes.map(clean); - if (!output) return; - process.stdout.write(JSON.stringify(result, null, 2 )); - }); -} - -/** - * Map jscoverage data to a JSON structure - * suitable for reporting. - * - * @param {Object} cov - * @return {Object} - * @api private - */ - -function map(cov) { - var ret = { - instrumentation: 'node-jscoverage' - , sloc: 0 - , hits: 0 - , misses: 0 - , coverage: 0 - , files: [] - }; - - for (var filename in cov) { - var data = coverage(filename, cov[filename]); - ret.files.push(data); - ret.hits += data.hits; - ret.misses += data.misses; - ret.sloc += data.sloc; - } - - ret.files.sort(function(a, b) { - return a.filename.localeCompare(b.filename); - }); - - if (ret.sloc > 0) { - ret.coverage = (ret.hits / ret.sloc) * 100; - } - - return ret; -}; - -/** - * Map jscoverage data for a single source file - * to a JSON structure suitable for reporting. - * - * @param {String} filename name of the source file - * @param {Object} data jscoverage coverage data - * @return {Object} - * @api private - */ - -function coverage(filename, data) { - var ret = { - filename: filename, - coverage: 0, - hits: 0, - misses: 0, - sloc: 0, - source: {} - }; - - data.source.forEach(function(line, num){ - num++; - - if (data[num] === 0) { - ret.misses++; - ret.sloc++; - } else if (data[num] !== undefined) { - ret.hits++; - ret.sloc++; - } - - ret.source[num] = { - source: line - , coverage: data[num] === undefined - ? '' - : data[num] - }; - }); - - ret.coverage = ret.hits / ret.sloc * 100; - - return ret; -} - -/** - * Return a plain-object representation of `test` - * free of cyclic properties etc. - * - * @param {Object} test - * @return {Object} - * @api private - */ - -function clean(test) { - return { - title: test.title - , fullTitle: test.fullTitle() - , duration: test.duration - } -} - -}); // module: reporters/json-cov.js - -require.register("reporters/json-stream.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , color = Base.color; - -/** - * Expose `List`. - */ - -exports = module.exports = List; - -/** - * Initialize a new `List` test reporter. - * - * @param {Runner} runner - * @api public - */ - -function List(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , total = runner.total; - - runner.on('start', function(){ - console.log(JSON.stringify(['start', { total: total }])); - }); - - runner.on('pass', function(test){ - console.log(JSON.stringify(['pass', clean(test)])); - }); - - runner.on('fail', function(test, err){ - console.log(JSON.stringify(['fail', clean(test)])); - }); - - runner.on('end', function(){ - process.stdout.write(JSON.stringify(['end', self.stats])); - }); -} - -/** - * Return a plain-object representation of `test` - * free of cyclic properties etc. - * - * @param {Object} test - * @return {Object} - * @api private - */ - -function clean(test) { - return { - title: test.title - , fullTitle: test.fullTitle() - , duration: test.duration - } -} -}); // module: reporters/json-stream.js - -require.register("reporters/json.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `JSON`. - */ - -exports = module.exports = JSONReporter; - -/** - * Initialize a new `JSON` reporter. - * - * @param {Runner} runner - * @api public - */ - -function JSONReporter(runner) { - var self = this; - Base.call(this, runner); - - var tests = [] - , failures = [] - , passes = []; - - runner.on('test end', function(test){ - tests.push(test); - }); - - runner.on('pass', function(test){ - passes.push(test); - }); - - runner.on('fail', function(test){ - failures.push(test); - }); - - runner.on('end', function(){ - var obj = { - stats: self.stats - , tests: tests.map(clean) - , failures: failures.map(clean) - , passes: passes.map(clean) - }; - - process.stdout.write(JSON.stringify(obj, null, 2)); - }); -} - -/** - * Return a plain-object representation of `test` - * free of cyclic properties etc. - * - * @param {Object} test - * @return {Object} - * @api private - */ - -function clean(test) { - return { - title: test.title - , fullTitle: test.fullTitle() - , duration: test.duration - } -} -}); // module: reporters/json.js - -require.register("reporters/landing.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `Landing`. - */ - -exports = module.exports = Landing; - -/** - * Airplane color. - */ - -Base.colors.plane = 0; - -/** - * Airplane crash color. - */ - -Base.colors['plane crash'] = 31; - -/** - * Runway color. - */ - -Base.colors.runway = 90; - -/** - * Initialize a new `Landing` reporter. - * - * @param {Runner} runner - * @api public - */ - -function Landing(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , width = Base.window.width * .75 | 0 - , total = runner.total - , stream = process.stdout - , plane = color('plane', '✈') - , crashed = -1 - , n = 0; - - function runway() { - var buf = Array(width).join('-'); - return ' ' + color('runway', buf); - } - - runner.on('start', function(){ - stream.write('\n '); - cursor.hide(); - }); - - runner.on('test end', function(test){ - // check if the plane crashed - var col = -1 == crashed - ? width * ++n / total | 0 - : crashed; - - // show the crash - if ('failed' == test.state) { - plane = color('plane crash', '✈'); - crashed = col; - } - - // render landing strip - stream.write('\u001b[4F\n\n'); - stream.write(runway()); - stream.write('\n '); - stream.write(color('runway', Array(col).join('⋅'))); - stream.write(plane) - stream.write(color('runway', Array(width - col).join('⋅') + '\n')); - stream.write(runway()); - stream.write('\u001b[0m'); - }); - - runner.on('end', function(){ - cursor.show(); - console.log(); - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -Landing.prototype = new F; -Landing.prototype.constructor = Landing; - -}); // module: reporters/landing.js - -require.register("reporters/list.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `List`. - */ - -exports = module.exports = List; - -/** - * Initialize a new `List` test reporter. - * - * @param {Runner} runner - * @api public - */ - -function List(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , n = 0; - - runner.on('start', function(){ - console.log(); - }); - - runner.on('test', function(test){ - process.stdout.write(color('pass', ' ' + test.fullTitle() + ': ')); - }); - - runner.on('pending', function(test){ - var fmt = color('checkmark', ' -') - + color('pending', ' %s'); - console.log(fmt, test.fullTitle()); - }); - - runner.on('pass', function(test){ - var fmt = color('checkmark', ' '+Base.symbols.dot) - + color('pass', ' %s: ') - + color(test.speed, '%dms'); - cursor.CR(); - console.log(fmt, test.fullTitle(), test.duration); - }); - - runner.on('fail', function(test, err){ - cursor.CR(); - console.log(color('fail', ' %d) %s'), ++n, test.fullTitle()); - }); - - runner.on('end', self.epilogue.bind(self)); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -List.prototype = new F; -List.prototype.constructor = List; - - -}); // module: reporters/list.js - -require.register("reporters/markdown.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils'); - -/** - * Expose `Markdown`. - */ - -exports = module.exports = Markdown; - -/** - * Initialize a new `Markdown` reporter. - * - * @param {Runner} runner - * @api public - */ - -function Markdown(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , level = 0 - , buf = ''; - - function title(str) { - return Array(level).join('#') + ' ' + str; - } - - function indent() { - return Array(level).join(' '); - } - - function mapTOC(suite, obj) { - var ret = obj; - obj = obj[suite.title] = obj[suite.title] || { suite: suite }; - suite.suites.forEach(function(suite){ - mapTOC(suite, obj); - }); - return ret; - } - - function stringifyTOC(obj, level) { - ++level; - var buf = ''; - var link; - for (var key in obj) { - if ('suite' == key) continue; - if (key) link = ' - [' + key + '](#' + utils.slug(obj[key].suite.fullTitle()) + ')\n'; - if (key) buf += Array(level).join(' ') + link; - buf += stringifyTOC(obj[key], level); - } - --level; - return buf; - } - - function generateTOC(suite) { - var obj = mapTOC(suite, {}); - return stringifyTOC(obj, 0); - } - - generateTOC(runner.suite); - - runner.on('suite', function(suite){ - ++level; - var slug = utils.slug(suite.fullTitle()); - buf += '' + '\n'; - buf += title(suite.title) + '\n'; - }); - - runner.on('suite end', function(suite){ - --level; - }); - - runner.on('pass', function(test){ - var code = utils.clean(test.fn.toString()); - buf += test.title + '.\n'; - buf += '\n```js\n'; - buf += code + '\n'; - buf += '```\n\n'; - }); - - runner.on('end', function(){ - process.stdout.write('# TOC\n'); - process.stdout.write(generateTOC(runner.suite)); - process.stdout.write(buf); - }); -} -}); // module: reporters/markdown.js - -require.register("reporters/min.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base'); - -/** - * Expose `Min`. - */ - -exports = module.exports = Min; - -/** - * Initialize a new `Min` minimal test reporter (best used with --watch). - * - * @param {Runner} runner - * @api public - */ - -function Min(runner) { - Base.call(this, runner); - - runner.on('start', function(){ - // clear screen - process.stdout.write('\u001b[2J'); - // set cursor position - process.stdout.write('\u001b[1;3H'); - }); - - runner.on('end', this.epilogue.bind(this)); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -Min.prototype = new F; -Min.prototype.constructor = Min; - - -}); // module: reporters/min.js - -require.register("reporters/nyan.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , color = Base.color; - -/** - * Expose `Dot`. - */ - -exports = module.exports = NyanCat; - -/** - * Initialize a new `Dot` matrix test reporter. - * - * @param {Runner} runner - * @api public - */ - -function NyanCat(runner) { - Base.call(this, runner); - var self = this - , stats = this.stats - , width = Base.window.width * .75 | 0 - , rainbowColors = this.rainbowColors = self.generateColors() - , colorIndex = this.colorIndex = 0 - , numerOfLines = this.numberOfLines = 4 - , trajectories = this.trajectories = [[], [], [], []] - , nyanCatWidth = this.nyanCatWidth = 11 - , trajectoryWidthMax = this.trajectoryWidthMax = (width - nyanCatWidth) - , scoreboardWidth = this.scoreboardWidth = 5 - , tick = this.tick = 0 - , n = 0; - - runner.on('start', function(){ - Base.cursor.hide(); - self.draw(); - }); - - runner.on('pending', function(test){ - self.draw(); - }); - - runner.on('pass', function(test){ - self.draw(); - }); - - runner.on('fail', function(test, err){ - self.draw(); - }); - - runner.on('end', function(){ - Base.cursor.show(); - for (var i = 0; i < self.numberOfLines; i++) write('\n'); - self.epilogue(); - }); -} - -/** - * Draw the nyan cat - * - * @api private - */ - -NyanCat.prototype.draw = function(){ - this.appendRainbow(); - this.drawScoreboard(); - this.drawRainbow(); - this.drawNyanCat(); - this.tick = !this.tick; -}; - -/** - * Draw the "scoreboard" showing the number - * of passes, failures and pending tests. - * - * @api private - */ - -NyanCat.prototype.drawScoreboard = function(){ - var stats = this.stats; - var colors = Base.colors; - - function draw(color, n) { - write(' '); - write('\u001b[' + color + 'm' + n + '\u001b[0m'); - write('\n'); - } - - draw(colors.green, stats.passes); - draw(colors.fail, stats.failures); - draw(colors.pending, stats.pending); - write('\n'); - - this.cursorUp(this.numberOfLines); -}; - -/** - * Append the rainbow. - * - * @api private - */ - -NyanCat.prototype.appendRainbow = function(){ - var segment = this.tick ? '_' : '-'; - var rainbowified = this.rainbowify(segment); - - for (var index = 0; index < this.numberOfLines; index++) { - var trajectory = this.trajectories[index]; - if (trajectory.length >= this.trajectoryWidthMax) trajectory.shift(); - trajectory.push(rainbowified); - } -}; - -/** - * Draw the rainbow. - * - * @api private - */ - -NyanCat.prototype.drawRainbow = function(){ - var self = this; - - this.trajectories.forEach(function(line, index) { - write('\u001b[' + self.scoreboardWidth + 'C'); - write(line.join('')); - write('\n'); - }); - - this.cursorUp(this.numberOfLines); -}; - -/** - * Draw the nyan cat - * - * @api private - */ - -NyanCat.prototype.drawNyanCat = function() { - var self = this; - var startWidth = this.scoreboardWidth + this.trajectories[0].length; - var color = '\u001b[' + startWidth + 'C'; - var padding = ''; - - write(color); - write('_,------,'); - write('\n'); - - write(color); - padding = self.tick ? ' ' : ' '; - write('_|' + padding + '/\\_/\\ '); - write('\n'); - - write(color); - padding = self.tick ? '_' : '__'; - var tail = self.tick ? '~' : '^'; - var face; - write(tail + '|' + padding + this.face() + ' '); - write('\n'); - - write(color); - padding = self.tick ? ' ' : ' '; - write(padding + '"" "" '); - write('\n'); - - this.cursorUp(this.numberOfLines); -}; - -/** - * Draw nyan cat face. - * - * @return {String} - * @api private - */ - -NyanCat.prototype.face = function() { - var stats = this.stats; - if (stats.failures) { - return '( x .x)'; - } else if (stats.pending) { - return '( o .o)'; - } else if(stats.passes) { - return '( ^ .^)'; - } else { - return '( - .-)'; - } -} - -/** - * Move cursor up `n`. - * - * @param {Number} n - * @api private - */ - -NyanCat.prototype.cursorUp = function(n) { - write('\u001b[' + n + 'A'); -}; - -/** - * Move cursor down `n`. - * - * @param {Number} n - * @api private - */ - -NyanCat.prototype.cursorDown = function(n) { - write('\u001b[' + n + 'B'); -}; - -/** - * Generate rainbow colors. - * - * @return {Array} - * @api private - */ - -NyanCat.prototype.generateColors = function(){ - var colors = []; - - for (var i = 0; i < (6 * 7); i++) { - var pi3 = Math.floor(Math.PI / 3); - var n = (i * (1.0 / 6)); - var r = Math.floor(3 * Math.sin(n) + 3); - var g = Math.floor(3 * Math.sin(n + 2 * pi3) + 3); - var b = Math.floor(3 * Math.sin(n + 4 * pi3) + 3); - colors.push(36 * r + 6 * g + b + 16); - } - - return colors; -}; - -/** - * Apply rainbow to the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -NyanCat.prototype.rainbowify = function(str){ - var color = this.rainbowColors[this.colorIndex % this.rainbowColors.length]; - this.colorIndex += 1; - return '\u001b[38;5;' + color + 'm' + str + '\u001b[0m'; -}; - -/** - * Stdout helper. - */ - -function write(string) { - process.stdout.write(string); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -NyanCat.prototype = new F; -NyanCat.prototype.constructor = NyanCat; - - -}); // module: reporters/nyan.js - -require.register("reporters/progress.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `Progress`. - */ - -exports = module.exports = Progress; - -/** - * General progress bar color. - */ - -Base.colors.progress = 90; - -/** - * Initialize a new `Progress` bar test reporter. - * - * @param {Runner} runner - * @param {Object} options - * @api public - */ - -function Progress(runner, options) { - Base.call(this, runner); - - var self = this - , options = options || {} - , stats = this.stats - , width = Base.window.width * .50 | 0 - , total = runner.total - , complete = 0 - , max = Math.max; - - // default chars - options.open = options.open || '['; - options.complete = options.complete || '▬'; - options.incomplete = options.incomplete || Base.symbols.dot; - options.close = options.close || ']'; - options.verbose = false; - - // tests started - runner.on('start', function(){ - console.log(); - cursor.hide(); - }); - - // tests complete - runner.on('test end', function(){ - complete++; - var incomplete = total - complete - , percent = complete / total - , n = width * percent | 0 - , i = width - n; - - cursor.CR(); - process.stdout.write('\u001b[J'); - process.stdout.write(color('progress', ' ' + options.open)); - process.stdout.write(Array(n).join(options.complete)); - process.stdout.write(Array(i).join(options.incomplete)); - process.stdout.write(color('progress', options.close)); - if (options.verbose) { - process.stdout.write(color('progress', ' ' + complete + ' of ' + total)); - } - }); - - // tests are complete, output some stats - // and the failures if any - runner.on('end', function(){ - cursor.show(); - console.log(); - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -Progress.prototype = new F; -Progress.prototype.constructor = Progress; - - -}); // module: reporters/progress.js - -require.register("reporters/spec.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `Spec`. - */ - -exports = module.exports = Spec; - -/** - * Initialize a new `Spec` test reporter. - * - * @param {Runner} runner - * @api public - */ - -function Spec(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , indents = 0 - , n = 0; - - function indent() { - return Array(indents).join(' ') - } - - runner.on('start', function(){ - console.log(); - }); - - runner.on('suite', function(suite){ - ++indents; - console.log(color('suite', '%s%s'), indent(), suite.title); - }); - - runner.on('suite end', function(suite){ - --indents; - if (1 == indents) console.log(); - }); - - runner.on('test', function(test){ - process.stdout.write(indent() + color('pass', ' ◦ ' + test.title + ': ')); - }); - - runner.on('pending', function(test){ - var fmt = indent() + color('pending', ' - %s'); - console.log(fmt, test.title); - }); - - runner.on('pass', function(test){ - if ('fast' == test.speed) { - var fmt = indent() - + color('checkmark', ' ' + Base.symbols.ok) - + color('pass', ' %s '); - cursor.CR(); - console.log(fmt, test.title); - } else { - var fmt = indent() - + color('checkmark', ' ' + Base.symbols.ok) - + color('pass', ' %s ') - + color(test.speed, '(%dms)'); - cursor.CR(); - console.log(fmt, test.title, test.duration); - } - }); - - runner.on('fail', function(test, err){ - cursor.CR(); - console.log(indent() + color('fail', ' %d) %s'), ++n, test.title); - }); - - runner.on('end', self.epilogue.bind(self)); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -Spec.prototype = new F; -Spec.prototype.constructor = Spec; - - -}); // module: reporters/spec.js - -require.register("reporters/tap.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `TAP`. - */ - -exports = module.exports = TAP; - -/** - * Initialize a new `TAP` reporter. - * - * @param {Runner} runner - * @api public - */ - -function TAP(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , n = 1 - , passes = 0 - , failures = 0; - - runner.on('start', function(){ - var total = runner.grepTotal(runner.suite); - console.log('%d..%d', 1, total); - }); - - runner.on('test end', function(){ - ++n; - }); - - runner.on('pending', function(test){ - console.log('ok %d %s # SKIP -', n, title(test)); - }); - - runner.on('pass', function(test){ - passes++; - console.log('ok %d %s', n, title(test)); - }); - - runner.on('fail', function(test, err){ - failures++; - console.log('not ok %d %s', n, title(test)); - if (err.stack) console.log(err.stack.replace(/^/gm, ' ')); - }); - - runner.on('end', function(){ - console.log('# tests ' + (passes + failures)); - console.log('# pass ' + passes); - console.log('# fail ' + failures); - }); -} - -/** - * Return a TAP-safe title of `test` - * - * @param {Object} test - * @return {String} - * @api private - */ - -function title(test) { - return test.fullTitle().replace(/#/g, ''); -} - -}); // module: reporters/tap.js - -require.register("reporters/teamcity.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base'); - -/** - * Expose `Teamcity`. - */ - -exports = module.exports = Teamcity; - -/** - * Initialize a new `Teamcity` reporter. - * - * @param {Runner} runner - * @api public - */ - -function Teamcity(runner) { - Base.call(this, runner); - var stats = this.stats; - - runner.on('start', function() { - console.log("##teamcity[testSuiteStarted name='mocha.suite']"); - }); - - runner.on('test', function(test) { - console.log("##teamcity[testStarted name='" + escape(test.fullTitle()) + "']"); - }); - - runner.on('fail', function(test, err) { - console.log("##teamcity[testFailed name='" + escape(test.fullTitle()) + "' message='" + escape(err.message) + "']"); - }); - - runner.on('pending', function(test) { - console.log("##teamcity[testIgnored name='" + escape(test.fullTitle()) + "' message='pending']"); - }); - - runner.on('test end', function(test) { - console.log("##teamcity[testFinished name='" + escape(test.fullTitle()) + "' duration='" + test.duration + "']"); - }); - - runner.on('end', function() { - console.log("##teamcity[testSuiteFinished name='mocha.suite' duration='" + stats.duration + "']"); - }); -} - -/** - * Escape the given `str`. - */ - -function escape(str) { - return str - .replace(/\|/g, "||") - .replace(/\n/g, "|n") - .replace(/\r/g, "|r") - .replace(/\[/g, "|[") - .replace(/\]/g, "|]") - .replace(/\u0085/g, "|x") - .replace(/\u2028/g, "|l") - .replace(/\u2029/g, "|p") - .replace(/'/g, "|'"); -} - -}); // module: reporters/teamcity.js - -require.register("reporters/xunit.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils') - , escape = utils.escape; - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Expose `XUnit`. - */ - -exports = module.exports = XUnit; - -/** - * Initialize a new `XUnit` reporter. - * - * @param {Runner} runner - * @api public - */ - -function XUnit(runner) { - Base.call(this, runner); - var stats = this.stats - , tests = [] - , self = this; - - runner.on('pass', function(test){ - tests.push(test); - }); - - runner.on('fail', function(test){ - tests.push(test); - }); - - runner.on('end', function(){ - console.log(tag('testsuite', { - name: 'Mocha Tests' - , tests: stats.tests - , failures: stats.failures - , errors: stats.failures - , skipped: stats.tests - stats.failures - stats.passes - , timestamp: (new Date).toUTCString() - , time: (stats.duration / 1000) || 0 - }, false)); - - tests.forEach(test); - console.log(''); - }); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -XUnit.prototype = new F; -XUnit.prototype.constructor = XUnit; - - -/** - * Output tag for the given `test.` - */ - -function test(test) { - var attrs = { - classname: test.parent.fullTitle() - , name: test.title - , time: test.duration / 1000 - }; - - if ('failed' == test.state) { - var err = test.err; - attrs.message = escape(err.message); - console.log(tag('testcase', attrs, false, tag('failure', attrs, false, cdata(err.stack)))); - } else if (test.pending) { - console.log(tag('testcase', attrs, false, tag('skipped', {}, true))); - } else { - console.log(tag('testcase', attrs, true) ); - } -} - -/** - * HTML tag helper. - */ - -function tag(name, attrs, close, content) { - var end = close ? '/>' : '>' - , pairs = [] - , tag; - - for (var key in attrs) { - pairs.push(key + '="' + escape(attrs[key]) + '"'); - } - - tag = '<' + name + (pairs.length ? ' ' + pairs.join(' ') : '') + end; - if (content) tag += content + ''; -} - -}); // module: reporters/xunit.js - -require.register("runnable.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var EventEmitter = require('browser/events').EventEmitter - , debug = require('browser/debug')('mocha:runnable') - , milliseconds = require('./ms'); - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Object#toString(). - */ - -var toString = Object.prototype.toString; - -/** - * Expose `Runnable`. - */ - -module.exports = Runnable; - -/** - * Initialize a new `Runnable` with the given `title` and callback `fn`. - * - * @param {String} title - * @param {Function} fn - * @api private - */ - -function Runnable(title, fn) { - this.title = title; - this.fn = fn; - this.async = fn && fn.length; - this.sync = ! this.async; - this._timeout = 2000; - this._slow = 75; - this.timedOut = false; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -function F(){}; -F.prototype = EventEmitter.prototype; -Runnable.prototype = new F; -Runnable.prototype.constructor = Runnable; - - -/** - * Set & get timeout `ms`. - * - * @param {Number|String} ms - * @return {Runnable|Number} ms or self - * @api private - */ - -Runnable.prototype.timeout = function(ms){ - if (0 == arguments.length) return this._timeout; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('timeout %d', ms); - this._timeout = ms; - if (this.timer) this.resetTimeout(); - return this; -}; - -/** - * Set & get slow `ms`. - * - * @param {Number|String} ms - * @return {Runnable|Number} ms or self - * @api private - */ - -Runnable.prototype.slow = function(ms){ - if (0 === arguments.length) return this._slow; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('timeout %d', ms); - this._slow = ms; - return this; -}; - -/** - * Return the full title generated by recursively - * concatenating the parent's full title. - * - * @return {String} - * @api public - */ - -Runnable.prototype.fullTitle = function(){ - return this.parent.fullTitle() + ' ' + this.title; -}; - -/** - * Clear the timeout. - * - * @api private - */ - -Runnable.prototype.clearTimeout = function(){ - clearTimeout(this.timer); -}; - -/** - * Inspect the runnable void of private properties. - * - * @return {String} - * @api private - */ - -Runnable.prototype.inspect = function(){ - return JSON.stringify(this, function(key, val){ - if ('_' == key[0]) return; - if ('parent' == key) return '#'; - if ('ctx' == key) return '#'; - return val; - }, 2); -}; - -/** - * Reset the timeout. - * - * @api private - */ - -Runnable.prototype.resetTimeout = function(){ - var self = this; - var ms = this.timeout() || 1e9; - - this.clearTimeout(); - this.timer = setTimeout(function(){ - self.callback(new Error('timeout of ' + ms + 'ms exceeded')); - self.timedOut = true; - }, ms); -}; - -/** - * Run the test and invoke `fn(err)`. - * - * @param {Function} fn - * @api private - */ - -Runnable.prototype.run = function(fn){ - var self = this - , ms = this.timeout() - , start = new Date - , ctx = this.ctx - , finished - , emitted; - - if (ctx) ctx.runnable(this); - - // timeout - if (this.async) { - if (ms) { - this.timer = setTimeout(function(){ - done(new Error('timeout of ' + ms + 'ms exceeded')); - self.timedOut = true; - }, ms); - } - } - - // called multiple times - function multiple(err) { - if (emitted) return; - emitted = true; - self.emit('error', err || new Error('done() called multiple times')); - } - - // finished - function done(err) { - if (self.timedOut) return; - if (finished) return multiple(err); - self.clearTimeout(); - self.duration = new Date - start; - finished = true; - fn(err); - } - - // for .resetTimeout() - this.callback = done; - - // async - if (this.async) { - try { - this.fn.call(ctx, function(err){ - if (err instanceof Error || toString.call(err) === "[object Error]") return done(err); - if (null != err) return done(new Error('done() invoked with non-Error: ' + err)); - done(); - }); - } catch (err) { - done(err); - } - return; - } - - if (this.asyncOnly) { - return done(new Error('--async-only option in use without declaring `done()`')); - } - - // sync - try { - if (!this.pending) this.fn.call(ctx); - this.duration = new Date - start; - fn(); - } catch (err) { - fn(err); - } -}; - -}); // module: runnable.js - -require.register("runner.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var EventEmitter = require('browser/events').EventEmitter - , debug = require('browser/debug')('mocha:runner') - , Test = require('./test') - , utils = require('./utils') - , filter = utils.filter - , keys = utils.keys; - -/** - * Non-enumerable globals. - */ - -var globals = [ - 'setTimeout', - 'clearTimeout', - 'setInterval', - 'clearInterval', - 'XMLHttpRequest', - 'Date' -]; - -/** - * Expose `Runner`. - */ - -module.exports = Runner; - -/** - * Initialize a `Runner` for the given `suite`. - * - * Events: - * - * - `start` execution started - * - `end` execution complete - * - `suite` (suite) test suite execution started - * - `suite end` (suite) all tests (and sub-suites) have finished - * - `test` (test) test execution started - * - `test end` (test) test completed - * - `hook` (hook) hook execution started - * - `hook end` (hook) hook complete - * - `pass` (test) test passed - * - `fail` (test, err) test failed - * - `pending` (test) test pending - * - * @api public - */ - -function Runner(suite) { - var self = this; - this._globals = []; - this.suite = suite; - this.total = suite.total(); - this.failures = 0; - this.on('test end', function(test){ self.checkGlobals(test); }); - this.on('hook end', function(hook){ self.checkGlobals(hook); }); - this.grep(/.*/); - this.globals(this.globalProps().concat(['errno'])); -} - -/** - * Wrapper for setImmediate, process.nextTick, or browser polyfill. - * - * @param {Function} fn - * @api private - */ - -Runner.immediately = global.setImmediate || process.nextTick; - -/** - * Inherit from `EventEmitter.prototype`. - */ - -function F(){}; -F.prototype = EventEmitter.prototype; -Runner.prototype = new F; -Runner.prototype.constructor = Runner; - - -/** - * Run tests with full titles matching `re`. Updates runner.total - * with number of tests matched. - * - * @param {RegExp} re - * @param {Boolean} invert - * @return {Runner} for chaining - * @api public - */ - -Runner.prototype.grep = function(re, invert){ - debug('grep %s', re); - this._grep = re; - this._invert = invert; - this.total = this.grepTotal(this.suite); - return this; -}; - -/** - * Returns the number of tests matching the grep search for the - * given suite. - * - * @param {Suite} suite - * @return {Number} - * @api public - */ - -Runner.prototype.grepTotal = function(suite) { - var self = this; - var total = 0; - - suite.eachTest(function(test){ - var match = self._grep.test(test.fullTitle()); - if (self._invert) match = !match; - if (match) total++; - }); - - return total; -}; - -/** - * Return a list of global properties. - * - * @return {Array} - * @api private - */ - -Runner.prototype.globalProps = function() { - var props = utils.keys(global); - - // non-enumerables - for (var i = 0; i < globals.length; ++i) { - if (~utils.indexOf(props, globals[i])) continue; - props.push(globals[i]); - } - - return props; -}; - -/** - * Allow the given `arr` of globals. - * - * @param {Array} arr - * @return {Runner} for chaining - * @api public - */ - -Runner.prototype.globals = function(arr){ - if (0 == arguments.length) return this._globals; - debug('globals %j', arr); - utils.forEach(arr, function(arr){ - this._globals.push(arr); - }, this); - return this; -}; - -/** - * Check for global variable leaks. - * - * @api private - */ - -Runner.prototype.checkGlobals = function(test){ - if (this.ignoreLeaks) return; - var ok = this._globals; - var globals = this.globalProps(); - var isNode = process.kill; - var leaks; - - // check length - 2 ('errno' and 'location' globals) - if (isNode && 1 == ok.length - globals.length) return; - else if (2 == ok.length - globals.length) return; - - if(this.prevGlobalsLength == globals.length) return; - this.prevGlobalsLength = globals.length; - - //console.time('filterLeaksTime'); - leaks = filterLeaks(ok, globals); - //console.timeEnd('filterLeaksTime'); - this._globals = this._globals.concat(leaks); - - if (leaks.length > 1) { - this.fail(test, new Error('global leaks detected: ' + leaks.join(', ') + '')); - } else if (leaks.length) { - this.fail(test, new Error('global leak detected: ' + leaks[0])); - } -}; - -/** - * Fail the given `test`. - * - * @param {Test} test - * @param {Error} err - * @api private - */ - -Runner.prototype.fail = function(test, err){ - ++this.failures; - test.state = 'failed'; - - if ('string' == typeof err) { - err = new Error('the string "' + err + '" was thrown, throw an Error :)'); - } - - this.emit('fail', test, err); -}; - -/** - * Fail the given `hook` with `err`. - * - * Hook failures (currently) hard-end due - * to that fact that a failing hook will - * surely cause subsequent tests to fail, - * causing jumbled reporting. - * - * @param {Hook} hook - * @param {Error} err - * @api private - */ - -Runner.prototype.failHook = function(hook, err){ - this.fail(hook, err); - this.emit('end'); -}; - -/** - * Run hook `name` callbacks and then invoke `fn()`. - * - * @param {String} name - * @param {Function} function - * @api private - */ - -Runner.prototype.hook = function(name, fn){ - var suite = this.suite - , hooks = suite['_' + name] - , self = this - , timer; - - function next(i) { - var hook = hooks[i]; - if (!hook) return fn(); - if (self.failures && suite.bail()) return fn(); - self.currentRunnable = hook; - - hook.ctx.currentTest = self.test; - - self.emit('hook', hook); - - hook.on('error', function(err){ - self.failHook(hook, err); - }); - - hook.run(function(err){ - hook.removeAllListeners('error'); - var testError = hook.error(); - if (testError) self.fail(self.test, testError); - if (err) return self.failHook(hook, err); - self.emit('hook end', hook); - delete hook.ctx.currentTest; - next(++i); - }); - } - - Runner.immediately(function(){ - next(0); - }); -}; - -/** - * Run hook `name` for the given array of `suites` - * in order, and callback `fn(err)`. - * - * @param {String} name - * @param {Array} suites - * @param {Function} fn - * @api private - */ - -Runner.prototype.hooks = function(name, suites, fn){ - var self = this - , orig = this.suite; - - function next(suite) { - self.suite = suite; - - if (!suite) { - self.suite = orig; - return fn(); - } - - self.hook(name, function(err){ - if (err) { - self.suite = orig; - return fn(err); - } - - next(suites.pop()); - }); - } - - next(suites.pop()); -}; - -/** - * Run hooks from the top level down. - * - * @param {String} name - * @param {Function} fn - * @api private - */ - -Runner.prototype.hookUp = function(name, fn){ - var suites = [this.suite].concat(this.parents()).reverse(); - this.hooks(name, suites, fn); -}; - -/** - * Run hooks from the bottom up. - * - * @param {String} name - * @param {Function} fn - * @api private - */ - -Runner.prototype.hookDown = function(name, fn){ - var suites = [this.suite].concat(this.parents()); - this.hooks(name, suites, fn); -}; - -/** - * Return an array of parent Suites from - * closest to furthest. - * - * @return {Array} - * @api private - */ - -Runner.prototype.parents = function(){ - var suite = this.suite - , suites = []; - while (suite = suite.parent) suites.push(suite); - return suites; -}; - -/** - * Run the current test and callback `fn(err)`. - * - * @param {Function} fn - * @api private - */ - -Runner.prototype.runTest = function(fn){ - var test = this.test - , self = this; - - if (this.asyncOnly) test.asyncOnly = true; - - try { - test.on('error', function(err){ - self.fail(test, err); - }); - test.run(fn); - } catch (err) { - fn(err); - } -}; - -/** - * Run tests in the given `suite` and invoke - * the callback `fn()` when complete. - * - * @param {Suite} suite - * @param {Function} fn - * @api private - */ - -Runner.prototype.runTests = function(suite, fn){ - var self = this - , tests = suite.tests.slice() - , test; - - function next(err) { - // if we bail after first err - if (self.failures && suite._bail) return fn(); - - // next test - test = tests.shift(); - - // all done - if (!test) return fn(); - - // grep - var match = self._grep.test(test.fullTitle()); - if (self._invert) match = !match; - if (!match) return next(); - - // pending - if (test.pending) { - self.emit('pending', test); - self.emit('test end', test); - return next(); - } - - // execute test and hook(s) - self.emit('test', self.test = test); - self.hookDown('beforeEach', function(){ - self.currentRunnable = self.test; - self.runTest(function(err){ - test = self.test; - - if (err) { - self.fail(test, err); - self.emit('test end', test); - return self.hookUp('afterEach', next); - } - - test.state = 'passed'; - self.emit('pass', test); - self.emit('test end', test); - self.hookUp('afterEach', next); - }); - }); - } - - this.next = next; - next(); -}; - -/** - * Run the given `suite` and invoke the - * callback `fn()` when complete. - * - * @param {Suite} suite - * @param {Function} fn - * @api private - */ - -Runner.prototype.runSuite = function(suite, fn){ - var total = this.grepTotal(suite) - , self = this - , i = 0; - - debug('run suite %s', suite.fullTitle()); - - if (!total) return fn(); - - this.emit('suite', this.suite = suite); - - function next() { - var curr = suite.suites[i++]; - if (!curr) return done(); - self.runSuite(curr, next); - } - - function done() { - self.suite = suite; - self.hook('afterAll', function(){ - self.emit('suite end', suite); - fn(); - }); - } - - this.hook('beforeAll', function(){ - self.runTests(suite, next); - }); -}; - -/** - * Handle uncaught exceptions. - * - * @param {Error} err - * @api private - */ - -Runner.prototype.uncaught = function(err){ - debug('uncaught exception %s', err.message); - var runnable = this.currentRunnable; - if (!runnable || 'failed' == runnable.state) return; - runnable.clearTimeout(); - err.uncaught = true; - this.fail(runnable, err); - - // recover from test - if ('test' == runnable.type) { - this.emit('test end', runnable); - this.hookUp('afterEach', this.next); - return; - } - - // bail on hooks - this.emit('end'); -}; - -/** - * Run the root suite and invoke `fn(failures)` - * on completion. - * - * @param {Function} fn - * @return {Runner} for chaining - * @api public - */ - -Runner.prototype.run = function(fn){ - var self = this - , fn = fn || function(){}; - - function uncaught(err){ - self.uncaught(err); - } - - debug('start'); - - // callback - this.on('end', function(){ - debug('end'); - process.removeListener('uncaughtException', uncaught); - fn(self.failures); - }); - - // run suites - this.emit('start'); - this.runSuite(this.suite, function(){ - debug('finished running'); - self.emit('end'); - }); - - // uncaught exception - process.on('uncaughtException', uncaught); - - return this; -}; - -/** - * Filter leaks with the given globals flagged as `ok`. - * - * @param {Array} ok - * @param {Array} globals - * @return {Array} - * @api private - */ - -function filterLeaks(ok, globals) { - return filter(globals, function(key){ - // Firefox and Chrome exposes iframes as index inside the window object - if (/^d+/.test(key)) return false; - - // in firefox - // if runner runs in an iframe, this iframe's window.getInterface method not init at first - // it is assigned in some seconds - if (global.navigator && /^getInterface/.test(key)) return false; - - // an iframe could be approached by window[iframeIndex] - // in ie6,7,8 and opera, iframeIndex is enumerable, this could cause leak - if (global.navigator && /^\d+/.test(key)) return false; - - // Opera and IE expose global variables for HTML element IDs (issue #243) - if (/^mocha-/.test(key)) return false; - - var matched = filter(ok, function(ok){ - if (~ok.indexOf('*')) return 0 == key.indexOf(ok.split('*')[0]); - return key == ok; - }); - return matched.length == 0 && (!global.navigator || 'onerror' !== key); - }); -} - -}); // module: runner.js - -require.register("suite.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var EventEmitter = require('browser/events').EventEmitter - , debug = require('browser/debug')('mocha:suite') - , milliseconds = require('./ms') - , utils = require('./utils') - , Hook = require('./hook'); - -/** - * Expose `Suite`. - */ - -exports = module.exports = Suite; - -/** - * Create a new `Suite` with the given `title` - * and parent `Suite`. When a suite with the - * same title is already present, that suite - * is returned to provide nicer reporter - * and more flexible meta-testing. - * - * @param {Suite} parent - * @param {String} title - * @return {Suite} - * @api public - */ - -exports.create = function(parent, title){ - var suite = new Suite(title, parent.ctx); - suite.parent = parent; - if (parent.pending) suite.pending = true; - title = suite.fullTitle(); - parent.addSuite(suite); - return suite; -}; - -/** - * Initialize a new `Suite` with the given - * `title` and `ctx`. - * - * @param {String} title - * @param {Context} ctx - * @api private - */ - -function Suite(title, ctx) { - this.title = title; - this.ctx = ctx; - this.suites = []; - this.tests = []; - this.pending = false; - this._beforeEach = []; - this._beforeAll = []; - this._afterEach = []; - this._afterAll = []; - this.root = !title; - this._timeout = 2000; - this._slow = 75; - this._bail = false; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -function F(){}; -F.prototype = EventEmitter.prototype; -Suite.prototype = new F; -Suite.prototype.constructor = Suite; - - -/** - * Return a clone of this `Suite`. - * - * @return {Suite} - * @api private - */ - -Suite.prototype.clone = function(){ - var suite = new Suite(this.title); - debug('clone'); - suite.ctx = this.ctx; - suite.timeout(this.timeout()); - suite.slow(this.slow()); - suite.bail(this.bail()); - return suite; -}; - -/** - * Set timeout `ms` or short-hand such as "2s". - * - * @param {Number|String} ms - * @return {Suite|Number} for chaining - * @api private - */ - -Suite.prototype.timeout = function(ms){ - if (0 == arguments.length) return this._timeout; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('timeout %d', ms); - this._timeout = parseInt(ms, 10); - return this; -}; - -/** - * Set slow `ms` or short-hand such as "2s". - * - * @param {Number|String} ms - * @return {Suite|Number} for chaining - * @api private - */ - -Suite.prototype.slow = function(ms){ - if (0 === arguments.length) return this._slow; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('slow %d', ms); - this._slow = ms; - return this; -}; - -/** - * Sets whether to bail after first error. - * - * @parma {Boolean} bail - * @return {Suite|Number} for chaining - * @api private - */ - -Suite.prototype.bail = function(bail){ - if (0 == arguments.length) return this._bail; - debug('bail %s', bail); - this._bail = bail; - return this; -}; - -/** - * Run `fn(test[, done])` before running tests. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.beforeAll = function(fn){ - if (this.pending) return this; - var hook = new Hook('"before all" hook', fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._beforeAll.push(hook); - this.emit('beforeAll', hook); - return this; -}; - -/** - * Run `fn(test[, done])` after running tests. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.afterAll = function(fn){ - if (this.pending) return this; - var hook = new Hook('"after all" hook', fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._afterAll.push(hook); - this.emit('afterAll', hook); - return this; -}; - -/** - * Run `fn(test[, done])` before each test case. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.beforeEach = function(fn){ - if (this.pending) return this; - var hook = new Hook('"before each" hook', fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._beforeEach.push(hook); - this.emit('beforeEach', hook); - return this; -}; - -/** - * Run `fn(test[, done])` after each test case. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.afterEach = function(fn){ - if (this.pending) return this; - var hook = new Hook('"after each" hook', fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._afterEach.push(hook); - this.emit('afterEach', hook); - return this; -}; - -/** - * Add a test `suite`. - * - * @param {Suite} suite - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.addSuite = function(suite){ - suite.parent = this; - suite.timeout(this.timeout()); - suite.slow(this.slow()); - suite.bail(this.bail()); - this.suites.push(suite); - this.emit('suite', suite); - return this; -}; - -/** - * Add a `test` to this suite. - * - * @param {Test} test - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.addTest = function(test){ - test.parent = this; - test.timeout(this.timeout()); - test.slow(this.slow()); - test.ctx = this.ctx; - this.tests.push(test); - this.emit('test', test); - return this; -}; - -/** - * Return the full title generated by recursively - * concatenating the parent's full title. - * - * @return {String} - * @api public - */ - -Suite.prototype.fullTitle = function(){ - if (this.parent) { - var full = this.parent.fullTitle(); - if (full) return full + ' ' + this.title; - } - return this.title; -}; - -/** - * Return the total number of tests. - * - * @return {Number} - * @api public - */ - -Suite.prototype.total = function(){ - return utils.reduce(this.suites, function(sum, suite){ - return sum + suite.total(); - }, 0) + this.tests.length; -}; - -/** - * Iterates through each suite recursively to find - * all tests. Applies a function in the format - * `fn(test)`. - * - * @param {Function} fn - * @return {Suite} - * @api private - */ - -Suite.prototype.eachTest = function(fn){ - utils.forEach(this.tests, fn); - utils.forEach(this.suites, function(suite){ - suite.eachTest(fn); - }); - return this; -}; - -}); // module: suite.js - -require.register("test.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Runnable = require('./runnable'); - -/** - * Expose `Test`. - */ - -module.exports = Test; - -/** - * Initialize a new `Test` with the given `title` and callback `fn`. - * - * @param {String} title - * @param {Function} fn - * @api private - */ - -function Test(title, fn) { - Runnable.call(this, title, fn); - this.pending = !fn; - this.type = 'test'; -} - -/** - * Inherit from `Runnable.prototype`. - */ - -function F(){}; -F.prototype = Runnable.prototype; -Test.prototype = new F; -Test.prototype.constructor = Test; - - -}); // module: test.js - -require.register("utils.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var fs = require('browser/fs') - , path = require('browser/path') - , join = path.join - , debug = require('browser/debug')('mocha:watch'); - -/** - * Ignored directories. - */ - -var ignore = ['node_modules', '.git']; - -/** - * Escape special characters in the given string of html. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function(html){ - return String(html) - .replace(/&/g, '&') - .replace(/"/g, '"') - .replace(//g, '>'); -}; - -/** - * Array#forEach (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @param {Object} scope - * @api private - */ - -exports.forEach = function(arr, fn, scope){ - for (var i = 0, l = arr.length; i < l; i++) - fn.call(scope, arr[i], i); -}; - -/** - * Array#indexOf (<=IE8) - * - * @parma {Array} arr - * @param {Object} obj to find index of - * @param {Number} start - * @api private - */ - -exports.indexOf = function(arr, obj, start){ - for (var i = start || 0, l = arr.length; i < l; i++) { - if (arr[i] === obj) - return i; - } - return -1; -}; - -/** - * Array#reduce (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @param {Object} initial value - * @api private - */ - -exports.reduce = function(arr, fn, val){ - var rval = val; - - for (var i = 0, l = arr.length; i < l; i++) { - rval = fn(rval, arr[i], i, arr); - } - - return rval; -}; - -/** - * Array#filter (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @api private - */ - -exports.filter = function(arr, fn){ - var ret = []; - - for (var i = 0, l = arr.length; i < l; i++) { - var val = arr[i]; - if (fn(val, i, arr)) ret.push(val); - } - - return ret; -}; - -/** - * Object.keys (<=IE8) - * - * @param {Object} obj - * @return {Array} keys - * @api private - */ - -exports.keys = Object.keys || function(obj) { - var keys = [] - , has = Object.prototype.hasOwnProperty // for `window` on <=IE8 - - for (var key in obj) { - if (has.call(obj, key)) { - keys.push(key); - } - } - - return keys; -}; - -/** - * Watch the given `files` for changes - * and invoke `fn(file)` on modification. - * - * @param {Array} files - * @param {Function} fn - * @api private - */ - -exports.watch = function(files, fn){ - var options = { interval: 100 }; - files.forEach(function(file){ - debug('file %s', file); - fs.watchFile(file, options, function(curr, prev){ - if (prev.mtime < curr.mtime) fn(file); - }); - }); -}; - -/** - * Ignored files. - */ - -function ignored(path){ - return !~ignore.indexOf(path); -} - -/** - * Lookup files in the given `dir`. - * - * @return {Array} - * @api private - */ - -exports.files = function(dir, ret){ - ret = ret || []; - - fs.readdirSync(dir) - .filter(ignored) - .forEach(function(path){ - path = join(dir, path); - if (fs.statSync(path).isDirectory()) { - exports.files(path, ret); - } else if (path.match(/\.(js|coffee|litcoffee|coffee.md)$/)) { - ret.push(path); - } - }); - - return ret; -}; - -/** - * Compute a slug from the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.slug = function(str){ - return str - .toLowerCase() - .replace(/ +/g, '-') - .replace(/[^-\w]/g, ''); -}; - -/** - * Strip the function definition from `str`, - * and re-indent for pre whitespace. - */ - -exports.clean = function(str) { - str = str - .replace(/^function *\(.*\) *{/, '') - .replace(/\s+\}$/, ''); - - var whitespace = str.match(/^\n?(\s*)/)[1] - , re = new RegExp('^' + whitespace, 'gm'); - - str = str.replace(re, ''); - - return exports.trim(str); -}; - -/** - * Escape regular expression characters in `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.escapeRegexp = function(str){ - return str.replace(/[-\\^$*+?.()|[\]{}]/g, "\\$&"); -}; - -/** - * Trim the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.trim = function(str){ - return str.replace(/^\s+|\s+$/g, ''); -}; - -/** - * Parse the given `qs`. - * - * @param {String} qs - * @return {Object} - * @api private - */ - -exports.parseQuery = function(qs){ - return exports.reduce(qs.replace('?', '').split('&'), function(obj, pair){ - var i = pair.indexOf('=') - , key = pair.slice(0, i) - , val = pair.slice(++i); - - obj[key] = decodeURIComponent(val); - return obj; - }, {}); -}; - -/** - * Highlight the given string of `js`. - * - * @param {String} js - * @return {String} - * @api private - */ - -function highlight(js) { - return js - .replace(//g, '>') - .replace(/\/\/(.*)/gm, '//$1') - .replace(/('.*?')/gm, '$1') - .replace(/(\d+\.\d+)/gm, '$1') - .replace(/(\d+)/gm, '$1') - .replace(/\bnew *(\w+)/gm, 'new $1') - .replace(/\b(function|new|throw|return|var|if|else)\b/gm, '$1') -} - -/** - * Highlight the contents of tag `name`. - * - * @param {String} name - * @api private - */ - -exports.highlightTags = function(name) { - var code = document.getElementsByTagName(name); - for (var i = 0, len = code.length; i < len; ++i) { - code[i].innerHTML = highlight(code[i].innerHTML); - } -}; - -}); // module: utils.js -// The global object is "self" in Web Workers. -global = (function() { return this; })(); - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date; -var setTimeout = global.setTimeout; -var setInterval = global.setInterval; -var clearTimeout = global.clearTimeout; -var clearInterval = global.clearInterval; - -/** - * Node shims. - * - * These are meant only to allow - * mocha.js to run untouched, not - * to allow running node code in - * the browser. - */ - -var process = {}; -process.exit = function(status){}; -process.stdout = {}; - -/** - * Remove uncaughtException listener. - */ - -process.removeListener = function(e){ - if ('uncaughtException' == e) { - global.onerror = function() {}; - } -}; - -/** - * Implements uncaughtException listener. - */ - -process.on = function(e, fn){ - if ('uncaughtException' == e) { - global.onerror = function(err, url, line){ - fn(new Error(err + ' (' + url + ':' + line + ')')); - }; - } -}; - -/** - * Expose mocha. - */ - -var Mocha = global.Mocha = require('mocha'), - mocha = global.mocha = new Mocha({ reporter: 'html' }); - -var immediateQueue = [] - , immediateTimeout; - -function timeslice() { - var immediateStart = new Date().getTime(); - while (immediateQueue.length && (new Date().getTime() - immediateStart) < 100) { - immediateQueue.shift()(); - } - if (immediateQueue.length) { - immediateTimeout = setTimeout(timeslice, 0); - } else { - immediateTimeout = null; - } -} - -/** - * High-performance override of Runner.immediately. - */ - -Mocha.Runner.immediately = function(callback) { - immediateQueue.push(callback); - if (!immediateTimeout) { - immediateTimeout = setTimeout(timeslice, 0); - } -}; - -/** - * Override ui to ensure that the ui functions are initialized. - * Normally this would happen in Mocha.prototype.loadFiles. - */ - -mocha.ui = function(ui){ - Mocha.prototype.ui.call(this, ui); - this.suite.emit('pre-require', global, null, this); - return this; -}; - -/** - * Setup mocha with the given setting options. - */ - -mocha.setup = function(opts){ - if ('string' == typeof opts) opts = { ui: opts }; - for (var opt in opts) this[opt](opts[opt]); - return this; -}; - -/** - * Run mocha, returning the Runner. - */ - -mocha.run = function(fn){ - var options = mocha.options; - mocha.globals('location'); - - var query = Mocha.utils.parseQuery(global.location.search || ''); - if (query.grep) mocha.grep(query.grep); - if (query.invert) mocha.invert(); - - return Mocha.prototype.run.call(mocha, function(){ - // The DOM Document is not available in Web Workers. - if (global.document) { - Mocha.utils.highlightTags('code'); - } - if (fn) fn(); - }); -}; - -/** - * Expose the process shim. - */ - -Mocha.process = process; -})(); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/.bin/jade b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/.bin/jade deleted file mode 120000 index 571fae73..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/.bin/jade +++ /dev/null @@ -1 +0,0 @@ -../jade/bin/jade \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/commander/.npmignore b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/commander/.npmignore deleted file mode 100644 index f1250e58..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/commander/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/commander/.travis.yml b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/commander/.travis.yml deleted file mode 100644 index f1d0f13c..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/commander/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.4 - - 0.6 diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/commander/History.md b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/commander/History.md deleted file mode 100644 index 4961d2e2..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/commander/History.md +++ /dev/null @@ -1,107 +0,0 @@ - -0.6.1 / 2012-06-01 -================== - - * Added: append (yes or no) on confirmation - * Added: allow node.js v0.7.x - -0.6.0 / 2012-04-10 -================== - - * Added `.prompt(obj, callback)` support. Closes #49 - * Added default support to .choose(). Closes #41 - * Fixed the choice example - -0.5.1 / 2011-12-20 -================== - - * Fixed `password()` for recent nodes. Closes #36 - -0.5.0 / 2011-12-04 -================== - - * Added sub-command option support [itay] - -0.4.3 / 2011-12-04 -================== - - * Fixed custom help ordering. Closes #32 - -0.4.2 / 2011-11-24 -================== - - * Added travis support - * Fixed: line-buffered input automatically trimmed. Closes #31 - -0.4.1 / 2011-11-18 -================== - - * Removed listening for "close" on --help - -0.4.0 / 2011-11-15 -================== - - * Added support for `--`. Closes #24 - -0.3.3 / 2011-11-14 -================== - - * Fixed: wait for close event when writing help info [Jerry Hamlet] - -0.3.2 / 2011-11-01 -================== - - * Fixed long flag definitions with values [felixge] - -0.3.1 / 2011-10-31 -================== - - * Changed `--version` short flag to `-V` from `-v` - * Changed `.version()` so it's configurable [felixge] - -0.3.0 / 2011-10-31 -================== - - * Added support for long flags only. Closes #18 - -0.2.1 / 2011-10-24 -================== - - * "node": ">= 0.4.x < 0.7.0". Closes #20 - -0.2.0 / 2011-09-26 -================== - - * Allow for defaults that are not just boolean. Default peassignment only occurs for --no-*, optional, and required arguments. [Jim Isaacs] - -0.1.0 / 2011-08-24 -================== - - * Added support for custom `--help` output - -0.0.5 / 2011-08-18 -================== - - * Changed: when the user enters nothing prompt for password again - * Fixed issue with passwords beginning with numbers [NuckChorris] - -0.0.4 / 2011-08-15 -================== - - * Fixed `Commander#args` - -0.0.3 / 2011-08-15 -================== - - * Added default option value support - -0.0.2 / 2011-08-15 -================== - - * Added mask support to `Command#password(str[, mask], fn)` - * Added `Command#password(str, fn)` - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/commander/Makefile b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/commander/Makefile deleted file mode 100644 index 00746255..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/commander/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -TESTS = $(shell find test/test.*.js) - -test: - @./test/run $(TESTS) - -.PHONY: test \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/commander/Readme.md b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/commander/Readme.md deleted file mode 100644 index b8328c37..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/commander/Readme.md +++ /dev/null @@ -1,262 +0,0 @@ -# Commander.js - - The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander). - - [![Build Status](https://secure.travis-ci.org/visionmedia/commander.js.png)](http://travis-ci.org/visionmedia/commander.js) - -## Installation - - $ npm install commander - -## Option parsing - - Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('commander'); - -program - .version('0.0.1') - .option('-p, --peppers', 'Add peppers') - .option('-P, --pineapple', 'Add pineapple') - .option('-b, --bbq', 'Add bbq sauce') - .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble') - .parse(process.argv); - -console.log('you ordered a pizza with:'); -if (program.peppers) console.log(' - peppers'); -if (program.pineapple) console.log(' - pineappe'); -if (program.bbq) console.log(' - bbq'); -console.log(' - %s cheese', program.cheese); -``` - - Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc. - -## Automated --help - - The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free: - -``` - $ ./examples/pizza --help - - Usage: pizza [options] - - Options: - - -V, --version output the version number - -p, --peppers Add peppers - -P, --pineapple Add pineappe - -b, --bbq Add bbq sauce - -c, --cheese Add the specified type of cheese [marble] - -h, --help output usage information - -``` - -## Coercion - -```js -function range(val) { - return val.split('..').map(Number); -} - -function list(val) { - return val.split(','); -} - -program - .version('0.0.1') - .usage('[options] ') - .option('-i, --integer ', 'An integer argument', parseInt) - .option('-f, --float ', 'A float argument', parseFloat) - .option('-r, --range ..', 'A range', range) - .option('-l, --list ', 'A list', list) - .option('-o, --optional [value]', 'An optional value') - .parse(process.argv); - -console.log(' int: %j', program.integer); -console.log(' float: %j', program.float); -console.log(' optional: %j', program.optional); -program.range = program.range || []; -console.log(' range: %j..%j', program.range[0], program.range[1]); -console.log(' list: %j', program.list); -console.log(' args: %j', program.args); -``` - -## Custom help - - You can display arbitrary `-h, --help` information - by listening for "--help". Commander will automatically - exit once you are done so that the remainder of your program - does not execute causing undesired behaviours, for example - in the following executable "stuff" will not output when - `--help` is used. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('../'); - -function list(val) { - return val.split(',').map(Number); -} - -program - .version('0.0.1') - .option('-f, --foo', 'enable some foo') - .option('-b, --bar', 'enable some bar') - .option('-B, --baz', 'enable some baz'); - -// must be before .parse() since -// node's emit() is immediate - -program.on('--help', function(){ - console.log(' Examples:'); - console.log(''); - console.log(' $ custom-help --help'); - console.log(' $ custom-help -h'); - console.log(''); -}); - -program.parse(process.argv); - -console.log('stuff'); -``` - -yielding the following help output: - -``` - -Usage: custom-help [options] - -Options: - - -h, --help output usage information - -V, --version output the version number - -f, --foo enable some foo - -b, --bar enable some bar - -B, --baz enable some baz - -Examples: - - $ custom-help --help - $ custom-help -h - -``` - -## .prompt(msg, fn) - - Single-line prompt: - -```js -program.prompt('name: ', function(name){ - console.log('hi %s', name); -}); -``` - - Multi-line prompt: - -```js -program.prompt('description:', function(name){ - console.log('hi %s', name); -}); -``` - - Coercion: - -```js -program.prompt('Age: ', Number, function(age){ - console.log('age: %j', age); -}); -``` - -```js -program.prompt('Birthdate: ', Date, function(date){ - console.log('date: %s', date); -}); -``` - -## .password(msg[, mask], fn) - -Prompt for password without echoing: - -```js -program.password('Password: ', function(pass){ - console.log('got "%s"', pass); - process.stdin.destroy(); -}); -``` - -Prompt for password with mask char "*": - -```js -program.password('Password: ', '*', function(pass){ - console.log('got "%s"', pass); - process.stdin.destroy(); -}); -``` - -## .confirm(msg, fn) - - Confirm with the given `msg`: - -```js -program.confirm('continue? ', function(ok){ - console.log(' got %j', ok); -}); -``` - -## .choose(list, fn) - - Let the user choose from a `list`: - -```js -var list = ['tobi', 'loki', 'jane', 'manny', 'luna']; - -console.log('Choose the coolest pet:'); -program.choose(list, function(i){ - console.log('you chose %d "%s"', i, list[i]); -}); -``` - -## Links - - - [API documentation](http://visionmedia.github.com/commander.js/) - - [ascii tables](https://github.com/LearnBoost/cli-table) - - [progress bars](https://github.com/visionmedia/node-progress) - - [more progress bars](https://github.com/substack/node-multimeter) - - [examples](https://github.com/visionmedia/commander.js/tree/master/examples) - -## License - -(The MIT License) - -Copyright (c) 2011 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. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/commander/index.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/commander/index.js deleted file mode 100644 index 06ec1e4b..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/commander/index.js +++ /dev/null @@ -1,2 +0,0 @@ - -module.exports = require('./lib/commander'); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/commander/lib/commander.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/commander/lib/commander.js deleted file mode 100644 index 5ba87ebb..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/commander/lib/commander.js +++ /dev/null @@ -1,1026 +0,0 @@ - -/*! - * commander - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , path = require('path') - , tty = require('tty') - , basename = path.basename; - -/** - * Expose the root command. - */ - -exports = module.exports = new Command; - -/** - * Expose `Command`. - */ - -exports.Command = Command; - -/** - * Expose `Option`. - */ - -exports.Option = Option; - -/** - * Initialize a new `Option` with the given `flags` and `description`. - * - * @param {String} flags - * @param {String} description - * @api public - */ - -function Option(flags, description) { - this.flags = flags; - this.required = ~flags.indexOf('<'); - this.optional = ~flags.indexOf('['); - this.bool = !~flags.indexOf('-no-'); - flags = flags.split(/[ ,|]+/); - if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift(); - this.long = flags.shift(); - this.description = description; -} - -/** - * Return option name. - * - * @return {String} - * @api private - */ - -Option.prototype.name = function(){ - return this.long - .replace('--', '') - .replace('no-', ''); -}; - -/** - * Check if `arg` matches the short or long flag. - * - * @param {String} arg - * @return {Boolean} - * @api private - */ - -Option.prototype.is = function(arg){ - return arg == this.short - || arg == this.long; -}; - -/** - * Initialize a new `Command`. - * - * @param {String} name - * @api public - */ - -function Command(name) { - this.commands = []; - this.options = []; - this.args = []; - this.name = name; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Command.prototype.__proto__ = EventEmitter.prototype; - -/** - * Add command `name`. - * - * The `.action()` callback is invoked when the - * command `name` is specified via __ARGV__, - * and the remaining arguments are applied to the - * function for access. - * - * When the `name` is "*" an un-matched command - * will be passed as the first arg, followed by - * the rest of __ARGV__ remaining. - * - * Examples: - * - * program - * .version('0.0.1') - * .option('-C, --chdir ', 'change the working directory') - * .option('-c, --config ', 'set config path. defaults to ./deploy.conf') - * .option('-T, --no-tests', 'ignore test hook') - * - * program - * .command('setup') - * .description('run remote setup commands') - * .action(function(){ - * console.log('setup'); - * }); - * - * program - * .command('exec ') - * .description('run the given remote command') - * .action(function(cmd){ - * console.log('exec "%s"', cmd); - * }); - * - * program - * .command('*') - * .description('deploy the given env') - * .action(function(env){ - * console.log('deploying "%s"', env); - * }); - * - * program.parse(process.argv); - * - * @param {String} name - * @return {Command} the new command - * @api public - */ - -Command.prototype.command = function(name){ - var args = name.split(/ +/); - var cmd = new Command(args.shift()); - this.commands.push(cmd); - cmd.parseExpectedArgs(args); - cmd.parent = this; - return cmd; -}; - -/** - * Parse expected `args`. - * - * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. - * - * @param {Array} args - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parseExpectedArgs = function(args){ - if (!args.length) return; - var self = this; - args.forEach(function(arg){ - switch (arg[0]) { - case '<': - self.args.push({ required: true, name: arg.slice(1, -1) }); - break; - case '[': - self.args.push({ required: false, name: arg.slice(1, -1) }); - break; - } - }); - return this; -}; - -/** - * Register callback `fn` for the command. - * - * Examples: - * - * program - * .command('help') - * .description('display verbose help') - * .action(function(){ - * // output help here - * }); - * - * @param {Function} fn - * @return {Command} for chaining - * @api public - */ - -Command.prototype.action = function(fn){ - var self = this; - this.parent.on(this.name, function(args, unknown){ - // Parse any so-far unknown options - unknown = unknown || []; - var parsed = self.parseOptions(unknown); - - // Output help if necessary - outputHelpIfNecessary(self, parsed.unknown); - - // If there are still any unknown options, then we simply - // die, unless someone asked for help, in which case we give it - // to them, and then we die. - if (parsed.unknown.length > 0) { - self.unknownOption(parsed.unknown[0]); - } - - self.args.forEach(function(arg, i){ - if (arg.required && null == args[i]) { - self.missingArgument(arg.name); - } - }); - - // Always append ourselves to the end of the arguments, - // to make sure we match the number of arguments the user - // expects - if (self.args.length) { - args[self.args.length] = self; - } else { - args.push(self); - } - - fn.apply(this, args); - }); - return this; -}; - -/** - * Define option with `flags`, `description` and optional - * coercion `fn`. - * - * The `flags` string should contain both the short and long flags, - * separated by comma, a pipe or space. The following are all valid - * all will output this way when `--help` is used. - * - * "-p, --pepper" - * "-p|--pepper" - * "-p --pepper" - * - * Examples: - * - * // simple boolean defaulting to false - * program.option('-p, --pepper', 'add pepper'); - * - * --pepper - * program.pepper - * // => Boolean - * - * // simple boolean defaulting to false - * program.option('-C, --no-cheese', 'remove cheese'); - * - * program.cheese - * // => true - * - * --no-cheese - * program.cheese - * // => true - * - * // required argument - * program.option('-C, --chdir ', 'change the working directory'); - * - * --chdir /tmp - * program.chdir - * // => "/tmp" - * - * // optional argument - * program.option('-c, --cheese [type]', 'add cheese [marble]'); - * - * @param {String} flags - * @param {String} description - * @param {Function|Mixed} fn or default - * @param {Mixed} defaultValue - * @return {Command} for chaining - * @api public - */ - -Command.prototype.option = function(flags, description, fn, defaultValue){ - var self = this - , option = new Option(flags, description) - , oname = option.name() - , name = camelcase(oname); - - // default as 3rd arg - if ('function' != typeof fn) defaultValue = fn, fn = null; - - // preassign default value only for --no-*, [optional], or - if (false == option.bool || option.optional || option.required) { - // when --no-* we make sure default is true - if (false == option.bool) defaultValue = true; - // preassign only if we have a default - if (undefined !== defaultValue) self[name] = defaultValue; - } - - // register the option - this.options.push(option); - - // when it's passed assign the value - // and conditionally invoke the callback - this.on(oname, function(val){ - // coercion - if (null != val && fn) val = fn(val); - - // unassigned or bool - if ('boolean' == typeof self[name] || 'undefined' == typeof self[name]) { - // if no value, bool true, and we have a default, then use it! - if (null == val) { - self[name] = option.bool - ? defaultValue || true - : false; - } else { - self[name] = val; - } - } else if (null !== val) { - // reassign - self[name] = val; - } - }); - - return this; -}; - -/** - * Parse `argv`, settings options and invoking commands when defined. - * - * @param {Array} argv - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parse = function(argv){ - // store raw args - this.rawArgs = argv; - - // guess name - if (!this.name) this.name = basename(argv[1]); - - // process argv - var parsed = this.parseOptions(this.normalize(argv.slice(2))); - this.args = parsed.args; - return this.parseArgs(this.args, parsed.unknown); -}; - -/** - * Normalize `args`, splitting joined short flags. For example - * the arg "-abc" is equivalent to "-a -b -c". - * - * @param {Array} args - * @return {Array} - * @api private - */ - -Command.prototype.normalize = function(args){ - var ret = [] - , arg; - - for (var i = 0, len = args.length; i < len; ++i) { - arg = args[i]; - if (arg.length > 1 && '-' == arg[0] && '-' != arg[1]) { - arg.slice(1).split('').forEach(function(c){ - ret.push('-' + c); - }); - } else { - ret.push(arg); - } - } - - return ret; -}; - -/** - * Parse command `args`. - * - * When listener(s) are available those - * callbacks are invoked, otherwise the "*" - * event is emitted and those actions are invoked. - * - * @param {Array} args - * @return {Command} for chaining - * @api private - */ - -Command.prototype.parseArgs = function(args, unknown){ - var cmds = this.commands - , len = cmds.length - , name; - - if (args.length) { - name = args[0]; - if (this.listeners(name).length) { - this.emit(args.shift(), args, unknown); - } else { - this.emit('*', args); - } - } else { - outputHelpIfNecessary(this, unknown); - - // If there were no args and we have unknown options, - // then they are extraneous and we need to error. - if (unknown.length > 0) { - this.unknownOption(unknown[0]); - } - } - - return this; -}; - -/** - * Return an option matching `arg` if any. - * - * @param {String} arg - * @return {Option} - * @api private - */ - -Command.prototype.optionFor = function(arg){ - for (var i = 0, len = this.options.length; i < len; ++i) { - if (this.options[i].is(arg)) { - return this.options[i]; - } - } -}; - -/** - * Parse options from `argv` returning `argv` - * void of these options. - * - * @param {Array} argv - * @return {Array} - * @api public - */ - -Command.prototype.parseOptions = function(argv){ - var args = [] - , len = argv.length - , literal - , option - , arg; - - var unknownOptions = []; - - // parse options - for (var i = 0; i < len; ++i) { - arg = argv[i]; - - // literal args after -- - if ('--' == arg) { - literal = true; - continue; - } - - if (literal) { - args.push(arg); - continue; - } - - // find matching Option - option = this.optionFor(arg); - - // option is defined - if (option) { - // requires arg - if (option.required) { - arg = argv[++i]; - if (null == arg) return this.optionMissingArgument(option); - if ('-' == arg[0]) return this.optionMissingArgument(option, arg); - this.emit(option.name(), arg); - // optional arg - } else if (option.optional) { - arg = argv[i+1]; - if (null == arg || '-' == arg[0]) { - arg = null; - } else { - ++i; - } - this.emit(option.name(), arg); - // bool - } else { - this.emit(option.name()); - } - continue; - } - - // looks like an option - if (arg.length > 1 && '-' == arg[0]) { - unknownOptions.push(arg); - - // If the next argument looks like it might be - // an argument for this option, we pass it on. - // If it isn't, then it'll simply be ignored - if (argv[i+1] && '-' != argv[i+1][0]) { - unknownOptions.push(argv[++i]); - } - continue; - } - - // arg - args.push(arg); - } - - return { args: args, unknown: unknownOptions }; -}; - -/** - * Argument `name` is missing. - * - * @param {String} name - * @api private - */ - -Command.prototype.missingArgument = function(name){ - console.error(); - console.error(" error: missing required argument `%s'", name); - console.error(); - process.exit(1); -}; - -/** - * `Option` is missing an argument, but received `flag` or nothing. - * - * @param {String} option - * @param {String} flag - * @api private - */ - -Command.prototype.optionMissingArgument = function(option, flag){ - console.error(); - if (flag) { - console.error(" error: option `%s' argument missing, got `%s'", option.flags, flag); - } else { - console.error(" error: option `%s' argument missing", option.flags); - } - console.error(); - process.exit(1); -}; - -/** - * Unknown option `flag`. - * - * @param {String} flag - * @api private - */ - -Command.prototype.unknownOption = function(flag){ - console.error(); - console.error(" error: unknown option `%s'", flag); - console.error(); - process.exit(1); -}; - -/** - * Set the program version to `str`. - * - * This method auto-registers the "-V, --version" flag - * which will print the version number when passed. - * - * @param {String} str - * @param {String} flags - * @return {Command} for chaining - * @api public - */ - -Command.prototype.version = function(str, flags){ - if (0 == arguments.length) return this._version; - this._version = str; - flags = flags || '-V, --version'; - this.option(flags, 'output the version number'); - this.on('version', function(){ - console.log(str); - process.exit(0); - }); - return this; -}; - -/** - * Set the description `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.description = function(str){ - if (0 == arguments.length) return this._description; - this._description = str; - return this; -}; - -/** - * Set / get the command usage `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.usage = function(str){ - var args = this.args.map(function(arg){ - return arg.required - ? '<' + arg.name + '>' - : '[' + arg.name + ']'; - }); - - var usage = '[options' - + (this.commands.length ? '] [command' : '') - + ']' - + (this.args.length ? ' ' + args : ''); - if (0 == arguments.length) return this._usage || usage; - this._usage = str; - - return this; -}; - -/** - * Return the largest option length. - * - * @return {Number} - * @api private - */ - -Command.prototype.largestOptionLength = function(){ - return this.options.reduce(function(max, option){ - return Math.max(max, option.flags.length); - }, 0); -}; - -/** - * Return help for options. - * - * @return {String} - * @api private - */ - -Command.prototype.optionHelp = function(){ - var width = this.largestOptionLength(); - - // Prepend the help information - return [pad('-h, --help', width) + ' ' + 'output usage information'] - .concat(this.options.map(function(option){ - return pad(option.flags, width) - + ' ' + option.description; - })) - .join('\n'); -}; - -/** - * Return command help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.commandHelp = function(){ - if (!this.commands.length) return ''; - return [ - '' - , ' Commands:' - , '' - , this.commands.map(function(cmd){ - var args = cmd.args.map(function(arg){ - return arg.required - ? '<' + arg.name + '>' - : '[' + arg.name + ']'; - }).join(' '); - - return cmd.name - + (cmd.options.length - ? ' [options]' - : '') + ' ' + args - + (cmd.description() - ? '\n' + cmd.description() - : ''); - }).join('\n\n').replace(/^/gm, ' ') - , '' - ].join('\n'); -}; - -/** - * Return program help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.helpInformation = function(){ - return [ - '' - , ' Usage: ' + this.name + ' ' + this.usage() - , '' + this.commandHelp() - , ' Options:' - , '' - , '' + this.optionHelp().replace(/^/gm, ' ') - , '' - , '' - ].join('\n'); -}; - -/** - * Prompt for a `Number`. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptForNumber = function(str, fn){ - var self = this; - this.promptSingleLine(str, function parseNumber(val){ - val = Number(val); - if (isNaN(val)) return self.promptSingleLine(str + '(must be a number) ', parseNumber); - fn(val); - }); -}; - -/** - * Prompt for a `Date`. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptForDate = function(str, fn){ - var self = this; - this.promptSingleLine(str, function parseDate(val){ - val = new Date(val); - if (isNaN(val.getTime())) return self.promptSingleLine(str + '(must be a date) ', parseDate); - fn(val); - }); -}; - -/** - * Single-line prompt. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptSingleLine = function(str, fn){ - if ('function' == typeof arguments[2]) { - return this['promptFor' + (fn.name || fn)](str, arguments[2]); - } - - process.stdout.write(str); - process.stdin.setEncoding('utf8'); - process.stdin.once('data', function(val){ - fn(val.trim()); - }).resume(); -}; - -/** - * Multi-line prompt. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptMultiLine = function(str, fn){ - var buf = []; - console.log(str); - process.stdin.setEncoding('utf8'); - process.stdin.on('data', function(val){ - if ('\n' == val || '\r\n' == val) { - process.stdin.removeAllListeners('data'); - fn(buf.join('\n')); - } else { - buf.push(val.trimRight()); - } - }).resume(); -}; - -/** - * Prompt `str` and callback `fn(val)` - * - * Commander supports single-line and multi-line prompts. - * To issue a single-line prompt simply add white-space - * to the end of `str`, something like "name: ", whereas - * for a multi-line prompt omit this "description:". - * - * - * Examples: - * - * program.prompt('Username: ', function(name){ - * console.log('hi %s', name); - * }); - * - * program.prompt('Description:', function(desc){ - * console.log('description was "%s"', desc.trim()); - * }); - * - * @param {String|Object} str - * @param {Function} fn - * @api public - */ - -Command.prototype.prompt = function(str, fn){ - var self = this; - - if ('string' == typeof str) { - if (/ $/.test(str)) return this.promptSingleLine.apply(this, arguments); - this.promptMultiLine(str, fn); - } else { - var keys = Object.keys(str) - , obj = {}; - - function next() { - var key = keys.shift() - , label = str[key]; - - if (!key) return fn(obj); - self.prompt(label, function(val){ - obj[key] = val; - next(); - }); - } - - next(); - } -}; - -/** - * Prompt for password with `str`, `mask` char and callback `fn(val)`. - * - * The mask string defaults to '', aka no output is - * written while typing, you may want to use "*" etc. - * - * Examples: - * - * program.password('Password: ', function(pass){ - * console.log('got "%s"', pass); - * process.stdin.destroy(); - * }); - * - * program.password('Password: ', '*', function(pass){ - * console.log('got "%s"', pass); - * process.stdin.destroy(); - * }); - * - * @param {String} str - * @param {String} mask - * @param {Function} fn - * @api public - */ - -Command.prototype.password = function(str, mask, fn){ - var self = this - , buf = ''; - - // default mask - if ('function' == typeof mask) { - fn = mask; - mask = ''; - } - - process.stdin.resume(); - tty.setRawMode(true); - process.stdout.write(str); - - // keypress - process.stdin.on('keypress', function(c, key){ - if (key && 'enter' == key.name) { - console.log(); - process.stdin.removeAllListeners('keypress'); - tty.setRawMode(false); - if (!buf.trim().length) return self.password(str, mask, fn); - fn(buf); - return; - } - - if (key && key.ctrl && 'c' == key.name) { - console.log('%s', buf); - process.exit(); - } - - process.stdout.write(mask); - buf += c; - }).resume(); -}; - -/** - * Confirmation prompt with `str` and callback `fn(bool)` - * - * Examples: - * - * program.confirm('continue? ', function(ok){ - * console.log(' got %j', ok); - * process.stdin.destroy(); - * }); - * - * @param {String} str - * @param {Function} fn - * @api public - */ - - -Command.prototype.confirm = function(str, fn, verbose){ - var self = this; - this.prompt(str, function(ok){ - if (!ok.trim()) { - if (!verbose) str += '(yes or no) '; - return self.confirm(str, fn, true); - } - fn(parseBool(ok)); - }); -}; - -/** - * Choice prompt with `list` of items and callback `fn(index, item)` - * - * Examples: - * - * var list = ['tobi', 'loki', 'jane', 'manny', 'luna']; - * - * console.log('Choose the coolest pet:'); - * program.choose(list, function(i){ - * console.log('you chose %d "%s"', i, list[i]); - * process.stdin.destroy(); - * }); - * - * @param {Array} list - * @param {Number|Function} index or fn - * @param {Function} fn - * @api public - */ - -Command.prototype.choose = function(list, index, fn){ - var self = this - , hasDefault = 'number' == typeof index; - - if (!hasDefault) { - fn = index; - index = null; - } - - list.forEach(function(item, i){ - if (hasDefault && i == index) { - console.log('* %d) %s', i + 1, item); - } else { - console.log(' %d) %s', i + 1, item); - } - }); - - function again() { - self.prompt(' : ', function(val){ - val = parseInt(val, 10) - 1; - if (hasDefault && isNaN(val)) val = index; - - if (null == list[val]) { - again(); - } else { - fn(val, list[val]); - } - }); - } - - again(); -}; - -/** - * Camel-case the given `flag` - * - * @param {String} flag - * @return {String} - * @api private - */ - -function camelcase(flag) { - return flag.split('-').reduce(function(str, word){ - return str + word[0].toUpperCase() + word.slice(1); - }); -} - -/** - * Parse a boolean `str`. - * - * @param {String} str - * @return {Boolean} - * @api private - */ - -function parseBool(str) { - return /^y|yes|ok|true$/i.test(str); -} - -/** - * Pad `str` to `width`. - * - * @param {String} str - * @param {Number} width - * @return {String} - * @api private - */ - -function pad(str, width) { - var len = Math.max(0, width - str.length); - return str + Array(len + 1).join(' '); -} - -/** - * Output help information if necessary - * - * @param {Command} command to output help for - * @param {Array} array of options to search for -h or --help - * @api private - */ - -function outputHelpIfNecessary(cmd, options) { - options = options || []; - for (var i = 0; i < options.length; i++) { - if (options[i] == '--help' || options[i] == '-h') { - process.stdout.write(cmd.helpInformation()); - cmd.emit('--help'); - process.exit(0); - } - } -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/commander/package.json b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/commander/package.json deleted file mode 100644 index 92f2ed79..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/commander/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "commander", - "version": "0.6.1", - "description": "the complete solution for node.js command-line programs", - "keywords": [ - "command", - "option", - "parser", - "prompt", - "stdin" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "repository": { - "type": "git", - "url": "https://github.com/visionmedia/commander.js.git" - }, - "dependencies": {}, - "devDependencies": { - "should": ">= 0.0.1" - }, - "scripts": { - "test": "make test" - }, - "main": "index", - "engines": { - "node": ">= 0.4.x" - }, - "readme": "# Commander.js\n\n The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander).\n\n [![Build Status](https://secure.travis-ci.org/visionmedia/commander.js.png)](http://travis-ci.org/visionmedia/commander.js)\n\n## Installation\n\n $ npm install commander\n\n## Option parsing\n\n Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('commander');\n\nprogram\n .version('0.0.1')\n .option('-p, --peppers', 'Add peppers')\n .option('-P, --pineapple', 'Add pineapple')\n .option('-b, --bbq', 'Add bbq sauce')\n .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble')\n .parse(process.argv);\n\nconsole.log('you ordered a pizza with:');\nif (program.peppers) console.log(' - peppers');\nif (program.pineapple) console.log(' - pineappe');\nif (program.bbq) console.log(' - bbq');\nconsole.log(' - %s cheese', program.cheese);\n```\n\n Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as \"--template-engine\" are camel-cased, becoming `program.templateEngine` etc.\n\n## Automated --help\n\n The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free:\n\n``` \n $ ./examples/pizza --help\n\n Usage: pizza [options]\n\n Options:\n\n -V, --version output the version number\n -p, --peppers Add peppers\n -P, --pineapple Add pineappe\n -b, --bbq Add bbq sauce\n -c, --cheese Add the specified type of cheese [marble]\n -h, --help output usage information\n\n```\n\n## Coercion\n\n```js\nfunction range(val) {\n return val.split('..').map(Number);\n}\n\nfunction list(val) {\n return val.split(',');\n}\n\nprogram\n .version('0.0.1')\n .usage('[options] ')\n .option('-i, --integer ', 'An integer argument', parseInt)\n .option('-f, --float ', 'A float argument', parseFloat)\n .option('-r, --range ..', 'A range', range)\n .option('-l, --list ', 'A list', list)\n .option('-o, --optional [value]', 'An optional value')\n .parse(process.argv);\n\nconsole.log(' int: %j', program.integer);\nconsole.log(' float: %j', program.float);\nconsole.log(' optional: %j', program.optional);\nprogram.range = program.range || [];\nconsole.log(' range: %j..%j', program.range[0], program.range[1]);\nconsole.log(' list: %j', program.list);\nconsole.log(' args: %j', program.args);\n```\n\n## Custom help\n\n You can display arbitrary `-h, --help` information\n by listening for \"--help\". Commander will automatically\n exit once you are done so that the remainder of your program\n does not execute causing undesired behaviours, for example\n in the following executable \"stuff\" will not output when\n `--help` is used.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('../');\n\nfunction list(val) {\n return val.split(',').map(Number);\n}\n\nprogram\n .version('0.0.1')\n .option('-f, --foo', 'enable some foo')\n .option('-b, --bar', 'enable some bar')\n .option('-B, --baz', 'enable some baz');\n\n// must be before .parse() since\n// node's emit() is immediate\n\nprogram.on('--help', function(){\n console.log(' Examples:');\n console.log('');\n console.log(' $ custom-help --help');\n console.log(' $ custom-help -h');\n console.log('');\n});\n\nprogram.parse(process.argv);\n\nconsole.log('stuff');\n```\n\nyielding the following help output:\n\n```\n\nUsage: custom-help [options]\n\nOptions:\n\n -h, --help output usage information\n -V, --version output the version number\n -f, --foo enable some foo\n -b, --bar enable some bar\n -B, --baz enable some baz\n\nExamples:\n\n $ custom-help --help\n $ custom-help -h\n\n```\n\n## .prompt(msg, fn)\n\n Single-line prompt:\n\n```js\nprogram.prompt('name: ', function(name){\n console.log('hi %s', name);\n});\n```\n\n Multi-line prompt:\n\n```js\nprogram.prompt('description:', function(name){\n console.log('hi %s', name);\n});\n```\n\n Coercion:\n\n```js\nprogram.prompt('Age: ', Number, function(age){\n console.log('age: %j', age);\n});\n```\n\n```js\nprogram.prompt('Birthdate: ', Date, function(date){\n console.log('date: %s', date);\n});\n```\n\n## .password(msg[, mask], fn)\n\nPrompt for password without echoing:\n\n```js\nprogram.password('Password: ', function(pass){\n console.log('got \"%s\"', pass);\n process.stdin.destroy();\n});\n```\n\nPrompt for password with mask char \"*\":\n\n```js\nprogram.password('Password: ', '*', function(pass){\n console.log('got \"%s\"', pass);\n process.stdin.destroy();\n});\n```\n\n## .confirm(msg, fn)\n\n Confirm with the given `msg`:\n\n```js\nprogram.confirm('continue? ', function(ok){\n console.log(' got %j', ok);\n});\n```\n\n## .choose(list, fn)\n\n Let the user choose from a `list`:\n\n```js\nvar list = ['tobi', 'loki', 'jane', 'manny', 'luna'];\n\nconsole.log('Choose the coolest pet:');\nprogram.choose(list, function(i){\n console.log('you chose %d \"%s\"', i, list[i]);\n});\n```\n\n## Links\n\n - [API documentation](http://visionmedia.github.com/commander.js/)\n - [ascii tables](https://github.com/LearnBoost/cli-table)\n - [progress bars](https://github.com/visionmedia/node-progress)\n - [more progress bars](https://github.com/substack/node-multimeter)\n - [examples](https://github.com/visionmedia/commander.js/tree/master/examples)\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/commander.js/issues" - }, - "homepage": "https://github.com/visionmedia/commander.js", - "_id": "commander@0.6.1", - "_from": "commander@0.6.1" -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/debug/Readme.md b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/debug/Readme.md deleted file mode 100644 index c5a34e8b..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/debug/Readme.md +++ /dev/null @@ -1,115 +0,0 @@ -# debug - - tiny node.js debugging utility modelled after node core's debugging technique. - -## Installation - -``` -$ npm install debug -``` - -## Usage - - With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` format string goodies you're used to work fine. A unique color is selected per-function for visibility. - -Example _app.js_: - -```js -var debug = require('debug')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %s', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); -``` - -Example _worker.js_: - -```js -var debug = require('debug')('worker'); - -setInterval(function(){ - debug('doing some work'); -}, 1000); -``` - - The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples: - - ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png) - - ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png) - -## Millisecond diff - - When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png) - - When stderr is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below: - _(NOTE: Debug now uses stderr instead of stdout, so the correct shell command for this example is actually `DEBUG=* node example/worker 2> out &`)_ - - ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png) - -## Conventions - - If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". - -## Wildcards - - The "*" character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect.compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - - You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=* -connect:*` would include all debuggers except those starting with "connect:". - -## Browser support - - Debug works in the browser as well, currently persisted by `localStorage`. For example if you have `worker:a` and `worker:b` as shown below, and wish to debug both type `debug.enable('worker:*')` in the console and refresh the page, this will remain until you disable with `debug.disable()`. - -```js -a = debug('worker:a'); -b = debug('worker:b'); - -setInterval(function(){ - a('doing some work'); -}, 1000); - -setInterval(function(){ - a('doing some work'); -}, 1200); -``` - -## License - -(The MIT License) - -Copyright (c) 2011 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/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/debug/debug.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/debug/debug.js deleted file mode 100644 index 509dc0de..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/debug/debug.js +++ /dev/null @@ -1,137 +0,0 @@ - -/** - * Expose `debug()` as the module. - */ - -module.exports = debug; - -/** - * Create a debugger with the given `name`. - * - * @param {String} name - * @return {Type} - * @api public - */ - -function debug(name) { - if (!debug.enabled(name)) return function(){}; - - return function(fmt){ - fmt = coerce(fmt); - - var curr = new Date; - var ms = curr - (debug[name] || curr); - debug[name] = curr; - - fmt = name - + ' ' - + fmt - + ' +' + debug.humanize(ms); - - // This hackery is required for IE8 - // where `console.log` doesn't have 'apply' - window.console - && console.log - && Function.prototype.apply.call(console.log, console, arguments); - } -} - -/** - * The currently active debug mode names. - */ - -debug.names = []; -debug.skips = []; - -/** - * Enables a debug mode by name. This can include modes - * separated by a colon and wildcards. - * - * @param {String} name - * @api public - */ - -debug.enable = function(name) { - try { - localStorage.debug = name; - } catch(e){} - - var split = (name || '').split(/[\s,]+/) - , len = split.length; - - for (var i = 0; i < len; i++) { - name = split[i].replace('*', '.*?'); - if (name[0] === '-') { - debug.skips.push(new RegExp('^' + name.substr(1) + '$')); - } - else { - debug.names.push(new RegExp('^' + name + '$')); - } - } -}; - -/** - * Disable debug output. - * - * @api public - */ - -debug.disable = function(){ - debug.enable(''); -}; - -/** - * Humanize the given `ms`. - * - * @param {Number} m - * @return {String} - * @api private - */ - -debug.humanize = function(ms) { - var sec = 1000 - , min = 60 * 1000 - , hour = 60 * min; - - if (ms >= hour) return (ms / hour).toFixed(1) + 'h'; - if (ms >= min) return (ms / min).toFixed(1) + 'm'; - if (ms >= sec) return (ms / sec | 0) + 's'; - return ms + 'ms'; -}; - -/** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - -debug.enabled = function(name) { - for (var i = 0, len = debug.skips.length; i < len; i++) { - if (debug.skips[i].test(name)) { - return false; - } - } - for (var i = 0, len = debug.names.length; i < len; i++) { - if (debug.names[i].test(name)) { - return true; - } - } - return false; -}; - -/** - * Coerce `val`. - */ - -function coerce(val) { - if (val instanceof Error) return val.stack || val.message; - return val; -} - -// persist - -try { - if (window.localStorage) debug.enable(localStorage.debug); -} catch(e){} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/debug/index.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/debug/index.js deleted file mode 100644 index e02c13b7..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/debug/index.js +++ /dev/null @@ -1,5 +0,0 @@ -if ('undefined' == typeof window) { - module.exports = require('./lib/debug'); -} else { - module.exports = require('./debug'); -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/debug/lib/debug.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/debug/lib/debug.js deleted file mode 100644 index 3b0a9183..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/debug/lib/debug.js +++ /dev/null @@ -1,147 +0,0 @@ -/** - * Module dependencies. - */ - -var tty = require('tty'); - -/** - * Expose `debug()` as the module. - */ - -module.exports = debug; - -/** - * Enabled debuggers. - */ - -var names = [] - , skips = []; - -(process.env.DEBUG || '') - .split(/[\s,]+/) - .forEach(function(name){ - name = name.replace('*', '.*?'); - if (name[0] === '-') { - skips.push(new RegExp('^' + name.substr(1) + '$')); - } else { - names.push(new RegExp('^' + name + '$')); - } - }); - -/** - * Colors. - */ - -var colors = [6, 2, 3, 4, 5, 1]; - -/** - * Previous debug() call. - */ - -var prev = {}; - -/** - * Previously assigned color. - */ - -var prevColor = 0; - -/** - * Is stdout a TTY? Colored output is disabled when `true`. - */ - -var isatty = tty.isatty(2); - -/** - * Select a color. - * - * @return {Number} - * @api private - */ - -function color() { - return colors[prevColor++ % colors.length]; -} - -/** - * Humanize the given `ms`. - * - * @param {Number} m - * @return {String} - * @api private - */ - -function humanize(ms) { - var sec = 1000 - , min = 60 * 1000 - , hour = 60 * min; - - if (ms >= hour) return (ms / hour).toFixed(1) + 'h'; - if (ms >= min) return (ms / min).toFixed(1) + 'm'; - if (ms >= sec) return (ms / sec | 0) + 's'; - return ms + 'ms'; -} - -/** - * Create a debugger with the given `name`. - * - * @param {String} name - * @return {Type} - * @api public - */ - -function debug(name) { - function disabled(){} - disabled.enabled = false; - - var match = skips.some(function(re){ - return re.test(name); - }); - - if (match) return disabled; - - match = names.some(function(re){ - return re.test(name); - }); - - if (!match) return disabled; - var c = color(); - - function colored(fmt) { - fmt = coerce(fmt); - - var curr = new Date; - var ms = curr - (prev[name] || curr); - prev[name] = curr; - - fmt = ' \u001b[9' + c + 'm' + name + ' ' - + '\u001b[3' + c + 'm\u001b[90m' - + fmt + '\u001b[3' + c + 'm' - + ' +' + humanize(ms) + '\u001b[0m'; - - console.error.apply(this, arguments); - } - - function plain(fmt) { - fmt = coerce(fmt); - - fmt = new Date().toUTCString() - + ' ' + name + ' ' + fmt; - console.error.apply(this, arguments); - } - - colored.enabled = plain.enabled = true; - - return isatty || process.env.DEBUG_COLORS - ? colored - : plain; -} - -/** - * Coerce `val`. - */ - -function coerce(val) { - if (val instanceof Error) return val.stack || val.message; - return val; -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/debug/package.json b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/debug/package.json deleted file mode 100644 index f44874e1..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/debug/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "debug", - "version": "0.7.4", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/debug.git" - }, - "description": "small debugging utility", - "keywords": [ - "debug", - "log", - "debugger" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "*" - }, - "main": "lib/debug.js", - "browser": "./debug.js", - "engines": { - "node": "*" - }, - "files": [ - "lib/debug.js", - "debug.js", - "index.js" - ], - "component": { - "scripts": { - "debug/index.js": "index.js", - "debug/debug.js": "debug.js" - } - }, - "readme": "# debug\n\n tiny node.js debugging utility modelled after node core's debugging technique.\n\n## Installation\n\n```\n$ npm install debug\n```\n\n## Usage\n\n With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` format string goodies you're used to work fine. A unique color is selected per-function for visibility.\n \nExample _app.js_:\n\n```js\nvar debug = require('debug')('http')\n , http = require('http')\n , name = 'My App';\n\n// fake app\n\ndebug('booting %s', name);\n\nhttp.createServer(function(req, res){\n debug(req.method + ' ' + req.url);\n res.end('hello\\n');\n}).listen(3000, function(){\n debug('listening');\n});\n\n// fake worker of some kind\n\nrequire('./worker');\n```\n\nExample _worker.js_:\n\n```js\nvar debug = require('debug')('worker');\n\nsetInterval(function(){\n debug('doing some work');\n}, 1000);\n```\n\n The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:\n\n ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png)\n\n ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png)\n\n## Millisecond diff\n\n When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the \"+NNNms\" will show you how much time was spent between calls.\n\n ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png)\n\n When stderr is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:\n _(NOTE: Debug now uses stderr instead of stdout, so the correct shell command for this example is actually `DEBUG=* node example/worker 2> out &`)_\n \n ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png)\n \n## Conventions\n\n If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use \":\" to separate features. For example \"bodyParser\" from Connect would then be \"connect:bodyParser\". \n\n## Wildcards\n\n The \"*\" character may be used as a wildcard. Suppose for example your library has debuggers named \"connect:bodyParser\", \"connect:compress\", \"connect:session\", instead of listing all three with `DEBUG=connect:bodyParser,connect.compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.\n\n You can also exclude specific debuggers by prefixing them with a \"-\" character. For example, `DEBUG=* -connect:*` would include all debuggers except those starting with \"connect:\".\n\n## Browser support\n\n Debug works in the browser as well, currently persisted by `localStorage`. For example if you have `worker:a` and `worker:b` as shown below, and wish to debug both type `debug.enable('worker:*')` in the console and refresh the page, this will remain until you disable with `debug.disable()`. \n\n```js\na = debug('worker:a');\nb = debug('worker:b');\n\nsetInterval(function(){\n a('doing some work');\n}, 1000);\n\nsetInterval(function(){\n a('doing some work');\n}, 1200);\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/debug/issues" - }, - "homepage": "https://github.com/visionmedia/debug", - "_id": "debug@0.7.4", - "_from": "debug@*" -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/diff/README.md b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/diff/README.md deleted file mode 100644 index 95bd8da2..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/diff/README.md +++ /dev/null @@ -1,101 +0,0 @@ -# jsdiff - -[![Build Status](https://secure.travis-ci.org/kpdecker/jsdiff.png)](http://travis-ci.org/kpdecker/jsdiff) - -A javascript text differencing implementation. - -Based on the algorithm proposed in -["An O(ND) Difference Algorithm and its Variations" (Myers, 1986)](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927). - -## Installation - - npm install diff - -or - - git clone git://github.com/kpdecker/jsdiff.git - -## API - -* JsDiff.diffChars(oldStr, newStr) - Diffs two blocks of text, comparing character by character. - - Returns a list of change objects (See below). - -* JsDiff.diffWords(oldStr, newStr) - Diffs two blocks of text, comparing word by word. - - Returns a list of change objects (See below). - -* JsDiff.diffLines(oldStr, newStr) - Diffs two blocks of text, comparing line by line. - - Returns a list of change objects (See below). - -* JsDiff.diffCss(oldStr, newStr) - Diffs two blocks of text, comparing CSS tokens. - - Returns a list of change objects (See below). - -* JsDiff.createPatch(fileName, oldStr, newStr, oldHeader, newHeader) - Creates a unified diff patch. - - Parameters: - * fileName : String to be output in the filename sections of the patch - * oldStr : Original string value - * newStr : New string value - * oldHeader : Additional information to include in the old file header - * newHeader : Additional information to include in thew new file header - -* JsDiff.applyPatch(oldStr, diffStr) - Applies a unified diff patch. - - Return a string containing new version of provided data. - -* convertChangesToXML(changes) - Converts a list of changes to a serialized XML format - -### Change Objects -Many of the methods above return change objects. These objects are consist of the following fields: - -* value: Text content -* added: True if the value was inserted into the new string -* removed: True of the value was removed from the old string - -Note that some cases may omit a particular flag field. Comparison on the flag fields should always be done in a truthy or falsy manner. - -## [Example](http://kpdecker.github.com/jsdiff) - -## License - -Software License Agreement (BSD License) - -Copyright (c) 2009-2011, Kevin Decker kpdecker@gmail.com - -All rights reserved. - -Redistribution and use of this software in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above - copyright notice, this list of conditions and the - following disclaimer. - -* Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the - following disclaimer in the documentation and/or other - materials provided with the distribution. - -* Neither the name of Kevin Decker nor the names of its - contributors may be used to endorse or promote products - derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/diff/diff.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/diff/diff.js deleted file mode 100644 index a34c22a0..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/diff/diff.js +++ /dev/null @@ -1,354 +0,0 @@ -/* See LICENSE file for terms of use */ - -/* - * Text diff implementation. - * - * This library supports the following APIS: - * JsDiff.diffChars: Character by character diff - * JsDiff.diffWords: Word (as defined by \b regex) diff which ignores whitespace - * JsDiff.diffLines: Line based diff - * - * JsDiff.diffCss: Diff targeted at CSS content - * - * These methods are based on the implementation proposed in - * "An O(ND) Difference Algorithm and its Variations" (Myers, 1986). - * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927 - */ -var JsDiff = (function() { - /*jshint maxparams: 5*/ - function clonePath(path) { - return { newPos: path.newPos, components: path.components.slice(0) }; - } - function removeEmpty(array) { - var ret = []; - for (var i = 0; i < array.length; i++) { - if (array[i]) { - ret.push(array[i]); - } - } - return ret; - } - function escapeHTML(s) { - var n = s; - n = n.replace(/&/g, '&'); - n = n.replace(//g, '>'); - n = n.replace(/"/g, '"'); - - return n; - } - - var Diff = function(ignoreWhitespace) { - this.ignoreWhitespace = ignoreWhitespace; - }; - Diff.prototype = { - diff: function(oldString, newString) { - // Handle the identity case (this is due to unrolling editLength == 0 - if (newString === oldString) { - return [{ value: newString }]; - } - if (!newString) { - return [{ value: oldString, removed: true }]; - } - if (!oldString) { - return [{ value: newString, added: true }]; - } - - newString = this.tokenize(newString); - oldString = this.tokenize(oldString); - - var newLen = newString.length, oldLen = oldString.length; - var maxEditLength = newLen + oldLen; - var bestPath = [{ newPos: -1, components: [] }]; - - // Seed editLength = 0 - var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); - if (bestPath[0].newPos+1 >= newLen && oldPos+1 >= oldLen) { - return bestPath[0].components; - } - - for (var editLength = 1; editLength <= maxEditLength; editLength++) { - for (var diagonalPath = -1*editLength; diagonalPath <= editLength; diagonalPath+=2) { - var basePath; - var addPath = bestPath[diagonalPath-1], - removePath = bestPath[diagonalPath+1]; - oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; - if (addPath) { - // No one else is going to attempt to use this value, clear it - bestPath[diagonalPath-1] = undefined; - } - - var canAdd = addPath && addPath.newPos+1 < newLen; - var canRemove = removePath && 0 <= oldPos && oldPos < oldLen; - if (!canAdd && !canRemove) { - bestPath[diagonalPath] = undefined; - continue; - } - - // Select the diagonal that we want to branch from. We select the prior - // path whose position in the new string is the farthest from the origin - // and does not pass the bounds of the diff graph - if (!canAdd || (canRemove && addPath.newPos < removePath.newPos)) { - basePath = clonePath(removePath); - this.pushComponent(basePath.components, oldString[oldPos], undefined, true); - } else { - basePath = clonePath(addPath); - basePath.newPos++; - this.pushComponent(basePath.components, newString[basePath.newPos], true, undefined); - } - - var oldPos = this.extractCommon(basePath, newString, oldString, diagonalPath); - - if (basePath.newPos+1 >= newLen && oldPos+1 >= oldLen) { - return basePath.components; - } else { - bestPath[diagonalPath] = basePath; - } - } - } - }, - - pushComponent: function(components, value, added, removed) { - var last = components[components.length-1]; - if (last && last.added === added && last.removed === removed) { - // We need to clone here as the component clone operation is just - // as shallow array clone - components[components.length-1] = - {value: this.join(last.value, value), added: added, removed: removed }; - } else { - components.push({value: value, added: added, removed: removed }); - } - }, - extractCommon: function(basePath, newString, oldString, diagonalPath) { - var newLen = newString.length, - oldLen = oldString.length, - newPos = basePath.newPos, - oldPos = newPos - diagonalPath; - while (newPos+1 < newLen && oldPos+1 < oldLen && this.equals(newString[newPos+1], oldString[oldPos+1])) { - newPos++; - oldPos++; - - this.pushComponent(basePath.components, newString[newPos], undefined, undefined); - } - basePath.newPos = newPos; - return oldPos; - }, - - equals: function(left, right) { - var reWhitespace = /\S/; - if (this.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right)) { - return true; - } else { - return left === right; - } - }, - join: function(left, right) { - return left + right; - }, - tokenize: function(value) { - return value; - } - }; - - var CharDiff = new Diff(); - - var WordDiff = new Diff(true); - var WordWithSpaceDiff = new Diff(); - WordDiff.tokenize = WordWithSpaceDiff.tokenize = function(value) { - return removeEmpty(value.split(/(\s+|\b)/)); - }; - - var CssDiff = new Diff(true); - CssDiff.tokenize = function(value) { - return removeEmpty(value.split(/([{}:;,]|\s+)/)); - }; - - var LineDiff = new Diff(); - LineDiff.tokenize = function(value) { - return value.split(/^/m); - }; - - return { - Diff: Diff, - - diffChars: function(oldStr, newStr) { return CharDiff.diff(oldStr, newStr); }, - diffWords: function(oldStr, newStr) { return WordDiff.diff(oldStr, newStr); }, - diffWordsWithSpace: function(oldStr, newStr) { return WordWithSpaceDiff.diff(oldStr, newStr); }, - diffLines: function(oldStr, newStr) { return LineDiff.diff(oldStr, newStr); }, - - diffCss: function(oldStr, newStr) { return CssDiff.diff(oldStr, newStr); }, - - createPatch: function(fileName, oldStr, newStr, oldHeader, newHeader) { - var ret = []; - - ret.push('Index: ' + fileName); - ret.push('==================================================================='); - ret.push('--- ' + fileName + (typeof oldHeader === 'undefined' ? '' : '\t' + oldHeader)); - ret.push('+++ ' + fileName + (typeof newHeader === 'undefined' ? '' : '\t' + newHeader)); - - var diff = LineDiff.diff(oldStr, newStr); - if (!diff[diff.length-1].value) { - diff.pop(); // Remove trailing newline add - } - diff.push({value: '', lines: []}); // Append an empty value to make cleanup easier - - function contextLines(lines) { - return lines.map(function(entry) { return ' ' + entry; }); - } - function eofNL(curRange, i, current) { - var last = diff[diff.length-2], - isLast = i === diff.length-2, - isLastOfType = i === diff.length-3 && (current.added !== last.added || current.removed !== last.removed); - - // Figure out if this is the last line for the given file and missing NL - if (!/\n$/.test(current.value) && (isLast || isLastOfType)) { - curRange.push('\\ No newline at end of file'); - } - } - - var oldRangeStart = 0, newRangeStart = 0, curRange = [], - oldLine = 1, newLine = 1; - for (var i = 0; i < diff.length; i++) { - var current = diff[i], - lines = current.lines || current.value.replace(/\n$/, '').split('\n'); - current.lines = lines; - - if (current.added || current.removed) { - if (!oldRangeStart) { - var prev = diff[i-1]; - oldRangeStart = oldLine; - newRangeStart = newLine; - - if (prev) { - curRange = contextLines(prev.lines.slice(-4)); - oldRangeStart -= curRange.length; - newRangeStart -= curRange.length; - } - } - curRange.push.apply(curRange, lines.map(function(entry) { return (current.added?'+':'-') + entry; })); - eofNL(curRange, i, current); - - if (current.added) { - newLine += lines.length; - } else { - oldLine += lines.length; - } - } else { - if (oldRangeStart) { - // Close out any changes that have been output (or join overlapping) - if (lines.length <= 8 && i < diff.length-2) { - // Overlapping - curRange.push.apply(curRange, contextLines(lines)); - } else { - // end the range and output - var contextSize = Math.min(lines.length, 4); - ret.push( - '@@ -' + oldRangeStart + ',' + (oldLine-oldRangeStart+contextSize) - + ' +' + newRangeStart + ',' + (newLine-newRangeStart+contextSize) - + ' @@'); - ret.push.apply(ret, curRange); - ret.push.apply(ret, contextLines(lines.slice(0, contextSize))); - if (lines.length <= 4) { - eofNL(ret, i, current); - } - - oldRangeStart = 0; newRangeStart = 0; curRange = []; - } - } - oldLine += lines.length; - newLine += lines.length; - } - } - - return ret.join('\n') + '\n'; - }, - - applyPatch: function(oldStr, uniDiff) { - var diffstr = uniDiff.split('\n'); - var diff = []; - var remEOFNL = false, - addEOFNL = false; - - for (var i = (diffstr[0][0]==='I'?4:0); i < diffstr.length; i++) { - if(diffstr[i][0] === '@') { - var meh = diffstr[i].split(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/); - diff.unshift({ - start:meh[3], - oldlength:meh[2], - oldlines:[], - newlength:meh[4], - newlines:[] - }); - } else if(diffstr[i][0] === '+') { - diff[0].newlines.push(diffstr[i].substr(1)); - } else if(diffstr[i][0] === '-') { - diff[0].oldlines.push(diffstr[i].substr(1)); - } else if(diffstr[i][0] === ' ') { - diff[0].newlines.push(diffstr[i].substr(1)); - diff[0].oldlines.push(diffstr[i].substr(1)); - } else if(diffstr[i][0] === '\\') { - if (diffstr[i-1][0] === '+') { - remEOFNL = true; - } else if(diffstr[i-1][0] === '-') { - addEOFNL = true; - } - } - } - - var str = oldStr.split('\n'); - for (var i = diff.length - 1; i >= 0; i--) { - var d = diff[i]; - for (var j = 0; j < d.oldlength; j++) { - if(str[d.start-1+j] !== d.oldlines[j]) { - return false; - } - } - Array.prototype.splice.apply(str,[d.start-1,+d.oldlength].concat(d.newlines)); - } - - if (remEOFNL) { - while (!str[str.length-1]) { - str.pop(); - } - } else if (addEOFNL) { - str.push(''); - } - return str.join('\n'); - }, - - convertChangesToXML: function(changes){ - var ret = []; - for ( var i = 0; i < changes.length; i++) { - var change = changes[i]; - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - - ret.push(escapeHTML(change.value)); - - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - } - return ret.join(''); - }, - - // See: http://code.google.com/p/google-diff-match-patch/wiki/API - convertChangesToDMP: function(changes){ - var ret = [], change; - for ( var i = 0; i < changes.length; i++) { - change = changes[i]; - ret.push([(change.added ? 1 : change.removed ? -1 : 0), change.value]); - } - return ret; - } - }; -})(); - -if (typeof module !== 'undefined') { - module.exports = JsDiff; -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/diff/package.json b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/diff/package.json deleted file mode 100644 index 867fd0ce..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/diff/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "diff", - "version": "1.0.7", - "description": "A javascript text diff implementation.", - "keywords": [ - "diff", - "javascript" - ], - "maintainers": [ - { - "name": "Kevin Decker", - "email": "kpdecker@gmail.com", - "url": "http://incaseofstairs.com" - } - ], - "bugs": { - "url": "http://github.com/kpdecker/jsdiff/issues", - "email": "kpdecker@gmail.com" - }, - "licenses": [ - { - "type": "BSD", - "url": "http://github.com/kpdecker/jsdiff/blob/master/LICENSE" - } - ], - "repository": { - "type": "git", - "url": "git://github.com/kpdecker/jsdiff.git" - }, - "engines": { - "node": ">=0.3.1" - }, - "main": "./diff", - "scripts": { - "test": "mocha test/*.js" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "~1.6", - "should": "~1.2" - }, - "optionalDependencies": {}, - "files": [ - "diff.js" - ], - "readme": "# jsdiff\n\n[![Build Status](https://secure.travis-ci.org/kpdecker/jsdiff.png)](http://travis-ci.org/kpdecker/jsdiff)\n\nA javascript text differencing implementation.\n\nBased on the algorithm proposed in\n[\"An O(ND) Difference Algorithm and its Variations\" (Myers, 1986)](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927).\n\n## Installation\n\n npm install diff\n\nor\n\n git clone git://github.com/kpdecker/jsdiff.git\n\n## API\n\n* JsDiff.diffChars(oldStr, newStr)\n Diffs two blocks of text, comparing character by character.\n\n Returns a list of change objects (See below).\n\n* JsDiff.diffWords(oldStr, newStr)\n Diffs two blocks of text, comparing word by word.\n\n Returns a list of change objects (See below).\n\n* JsDiff.diffLines(oldStr, newStr)\n Diffs two blocks of text, comparing line by line.\n\n Returns a list of change objects (See below).\n\n* JsDiff.diffCss(oldStr, newStr)\n Diffs two blocks of text, comparing CSS tokens.\n\n Returns a list of change objects (See below).\n\n* JsDiff.createPatch(fileName, oldStr, newStr, oldHeader, newHeader)\n Creates a unified diff patch.\n\n Parameters:\n * fileName : String to be output in the filename sections of the patch\n * oldStr : Original string value\n * newStr : New string value\n * oldHeader : Additional information to include in the old file header\n * newHeader : Additional information to include in thew new file header\n\n* JsDiff.applyPatch(oldStr, diffStr)\n Applies a unified diff patch.\n\n Return a string containing new version of provided data.\n\n* convertChangesToXML(changes)\n Converts a list of changes to a serialized XML format\n\n### Change Objects\nMany of the methods above return change objects. These objects are consist of the following fields:\n\n* value: Text content\n* added: True if the value was inserted into the new string\n* removed: True of the value was removed from the old string\n\nNote that some cases may omit a particular flag field. Comparison on the flag fields should always be done in a truthy or falsy manner.\n\n## [Example](http://kpdecker.github.com/jsdiff)\n\n## License\n\nSoftware License Agreement (BSD License)\n\nCopyright (c) 2009-2011, Kevin Decker kpdecker@gmail.com\n\nAll rights reserved.\n\nRedistribution and use of this software in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above\n copyright notice, this list of conditions and the\n following disclaimer.\n\n* Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the\n following disclaimer in the documentation and/or other\n materials provided with the distribution.\n\n* Neither the name of Kevin Decker nor the names of its\n contributors may be used to endorse or promote products\n derived from this software without specific prior\n written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\nIMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\nFITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\nCONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\nIN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\nOF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/kpdecker/jsdiff", - "_id": "diff@1.0.7", - "_from": "diff@1.0.7" -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/.npmignore b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/.npmignore deleted file mode 100644 index 2af4b71c..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -.*.swp -test/a/ diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/.travis.yml b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/.travis.yml deleted file mode 100644 index baa0031d..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - 0.8 diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/LICENSE b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/README.md b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/README.md deleted file mode 100644 index cc691645..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/README.md +++ /dev/null @@ -1,250 +0,0 @@ -# Glob - -Match files using the patterns the shell uses, like stars and stuff. - -This is a glob implementation in JavaScript. It uses the `minimatch` -library to do its matching. - -## Attention: node-glob users! - -The API has changed dramatically between 2.x and 3.x. This library is -now 100% JavaScript, and the integer flags have been replaced with an -options object. - -Also, there's an event emitter class, proper tests, and all the other -things you've come to expect from node modules. - -And best of all, no compilation! - -## Usage - -```javascript -var glob = require("glob") - -// options is optional -glob("**/*.js", options, function (er, files) { - // files is an array of filenames. - // If the `nonull` option is set, and nothing - // was found, then files is ["**/*.js"] - // er is an error object or null. -}) -``` - -## Features - -Please see the [minimatch -documentation](https://github.com/isaacs/minimatch) for more details. - -Supports these glob features: - -* Brace Expansion -* Extended glob matching -* "Globstar" `**` matching - -See: - -* `man sh` -* `man bash` -* `man 3 fnmatch` -* `man 5 gitignore` -* [minimatch documentation](https://github.com/isaacs/minimatch) - -## glob(pattern, [options], cb) - -* `pattern` {String} Pattern to be matched -* `options` {Object} -* `cb` {Function} - * `err` {Error | null} - * `matches` {Array} filenames found matching the pattern - -Perform an asynchronous glob search. - -## glob.sync(pattern, [options]) - -* `pattern` {String} Pattern to be matched -* `options` {Object} -* return: {Array} filenames found matching the pattern - -Perform a synchronous glob search. - -## Class: glob.Glob - -Create a Glob object by instanting the `glob.Glob` class. - -```javascript -var Glob = require("glob").Glob -var mg = new Glob(pattern, options, cb) -``` - -It's an EventEmitter, and starts walking the filesystem to find matches -immediately. - -### new glob.Glob(pattern, [options], [cb]) - -* `pattern` {String} pattern to search for -* `options` {Object} -* `cb` {Function} Called when an error occurs, or matches are found - * `err` {Error | null} - * `matches` {Array} filenames found matching the pattern - -Note that if the `sync` flag is set in the options, then matches will -be immediately available on the `g.found` member. - -### Properties - -* `minimatch` The minimatch object that the glob uses. -* `options` The options object passed in. -* `error` The error encountered. When an error is encountered, the - glob object is in an undefined state, and should be discarded. -* `aborted` Boolean which is set to true when calling `abort()`. There - is no way at this time to continue a glob search after aborting, but - you can re-use the statCache to avoid having to duplicate syscalls. -* `statCache` Collection of all the stat results the glob search - performed. -* `cache` Convenience object. Each field has the following possible - values: - * `false` - Path does not exist - * `true` - Path exists - * `1` - Path exists, and is not a directory - * `2` - Path exists, and is a directory - * `[file, entries, ...]` - Path exists, is a directory, and the - array value is the results of `fs.readdir` - -### Events - -* `end` When the matching is finished, this is emitted with all the - matches found. If the `nonull` option is set, and no match was found, - then the `matches` list contains the original pattern. The matches - are sorted, unless the `nosort` flag is set. -* `match` Every time a match is found, this is emitted with the matched. -* `error` Emitted when an unexpected error is encountered, or whenever - any fs error occurs if `options.strict` is set. -* `abort` When `abort()` is called, this event is raised. - -### Methods - -* `abort` Stop the search. - -### Options - -All the options that can be passed to Minimatch can also be passed to -Glob to change pattern matching behavior. Also, some have been added, -or have glob-specific ramifications. - -All options are false by default, unless otherwise noted. - -All options are added to the glob object, as well. - -* `cwd` The current working directory in which to search. Defaults - to `process.cwd()`. -* `root` The place where patterns starting with `/` will be mounted - onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix - systems, and `C:\` or some such on Windows.) -* `dot` Include `.dot` files in normal matches and `globstar` matches. - Note that an explicit dot in a portion of the pattern will always - match dot files. -* `nomount` By default, a pattern starting with a forward-slash will be - "mounted" onto the root setting, so that a valid filesystem path is - returned. Set this flag to disable that behavior. -* `mark` Add a `/` character to directory matches. Note that this - requires additional stat calls. -* `nosort` Don't sort the results. -* `stat` Set to true to stat *all* results. This reduces performance - somewhat, and is completely unnecessary, unless `readdir` is presumed - to be an untrustworthy indicator of file existence. It will cause - ELOOP to be triggered one level sooner in the case of cyclical - symbolic links. -* `silent` When an unusual error is encountered - when attempting to read a directory, a warning will be printed to - stderr. Set the `silent` option to true to suppress these warnings. -* `strict` When an unusual error is encountered - when attempting to read a directory, the process will just continue on - in search of other matches. Set the `strict` option to raise an error - in these cases. -* `cache` See `cache` property above. Pass in a previously generated - cache object to save some fs calls. -* `statCache` A cache of results of filesystem information, to prevent - unnecessary stat calls. While it should not normally be necessary to - set this, you may pass the statCache from one glob() call to the - options object of another, if you know that the filesystem will not - change between calls. (See "Race Conditions" below.) -* `sync` Perform a synchronous glob search. -* `nounique` In some cases, brace-expanded patterns can result in the - same file showing up multiple times in the result set. By default, - this implementation prevents duplicates in the result set. - Set this flag to disable that behavior. -* `nonull` Set to never return an empty set, instead returning a set - containing the pattern itself. This is the default in glob(3). -* `nocase` Perform a case-insensitive match. Note that case-insensitive - filesystems will sometimes result in glob returning results that are - case-insensitively matched anyway, since readdir and stat will not - raise an error. -* `debug` Set to enable debug logging in minimatch and glob. -* `globDebug` Set to enable debug logging in glob, but not minimatch. - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between node-glob and other -implementations, and are intentional. - -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.1, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then glob returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. - -## Windows - -**Please only use forward-slashes in glob expressions.** - -Though windows uses either `/` or `\` as its path separator, only `/` -characters are used by this glob implementation. You must use -forward-slashes **only** in glob expressions. Back-slashes will always -be interpreted as escape characters, not path separators. - -Results from absolute patterns such as `/foo/*` are mounted onto the -root setting using `path.join`. On windows, this will by default result -in `/foo/*` matching `C:\foo\bar.txt`. - -## Race Conditions - -Glob searching, by its very nature, is susceptible to race conditions, -since it relies on directory walking and such. - -As a result, it is possible that a file that exists when glob looks for -it may have been deleted or modified by the time it returns the result. - -As part of its internal implementation, this program caches all stat -and readdir calls that it makes, in order to cut down on system -overhead. However, this also makes it even more susceptible to races, -especially if the cache or statCache objects are reused between glob -calls. - -Users are thus advised not to use a glob result as a guarantee of -filesystem state in the face of rapid changes. For the vast majority -of operations, this is never a problem. diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/examples/g.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/examples/g.js deleted file mode 100644 index be122df0..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/examples/g.js +++ /dev/null @@ -1,9 +0,0 @@ -var Glob = require("../").Glob - -var pattern = "test/a/**/[cg]/../[cg]" -console.log(pattern) - -var mg = new Glob(pattern, {mark: true, sync:true}, function (er, matches) { - console.log("matches", matches) -}) -console.log("after") diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/examples/usr-local.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/examples/usr-local.js deleted file mode 100644 index 327a425e..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/examples/usr-local.js +++ /dev/null @@ -1,9 +0,0 @@ -var Glob = require("../").Glob - -var pattern = "{./*/*,/*,/usr/local/*}" -console.log(pattern) - -var mg = new Glob(pattern, {mark: true}, function (er, matches) { - console.log("matches", matches) -}) -console.log("after") diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/glob.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/glob.js deleted file mode 100644 index f0118a4f..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/glob.js +++ /dev/null @@ -1,675 +0,0 @@ -// Approach: -// -// 1. Get the minimatch set -// 2. For each pattern in the set, PROCESS(pattern) -// 3. Store matches per-set, then uniq them -// -// PROCESS(pattern) -// Get the first [n] items from pattern that are all strings -// Join these together. This is PREFIX. -// If there is no more remaining, then stat(PREFIX) and -// add to matches if it succeeds. END. -// readdir(PREFIX) as ENTRIES -// If fails, END -// If pattern[n] is GLOBSTAR -// // handle the case where the globstar match is empty -// // by pruning it out, and testing the resulting pattern -// PROCESS(pattern[0..n] + pattern[n+1 .. $]) -// // handle other cases. -// for ENTRY in ENTRIES (not dotfiles) -// // attach globstar + tail onto the entry -// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $]) -// -// else // not globstar -// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) -// Test ENTRY against pattern[n] -// If fails, continue -// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) -// -// Caveat: -// Cache all stats and readdirs results to minimize syscall. Since all -// we ever care about is existence and directory-ness, we can just keep -// `true` for files, and [children,...] for directories, or `false` for -// things that don't exist. - - - -module.exports = glob - -var fs = require("graceful-fs") -, minimatch = require("minimatch") -, Minimatch = minimatch.Minimatch -, inherits = require("inherits") -, EE = require("events").EventEmitter -, path = require("path") -, isDir = {} -, assert = require("assert").ok - -function glob (pattern, options, cb) { - if (typeof options === "function") cb = options, options = {} - if (!options) options = {} - - if (typeof options === "number") { - deprecated() - return - } - - var g = new Glob(pattern, options, cb) - return g.sync ? g.found : g -} - -glob.fnmatch = deprecated - -function deprecated () { - throw new Error("glob's interface has changed. Please see the docs.") -} - -glob.sync = globSync -function globSync (pattern, options) { - if (typeof options === "number") { - deprecated() - return - } - - options = options || {} - options.sync = true - return glob(pattern, options) -} - - -glob.Glob = Glob -inherits(Glob, EE) -function Glob (pattern, options, cb) { - if (!(this instanceof Glob)) { - return new Glob(pattern, options, cb) - } - - if (typeof cb === "function") { - this.on("error", cb) - this.on("end", function (matches) { - cb(null, matches) - }) - } - - options = options || {} - - this.EOF = {} - this._emitQueue = [] - - this.maxDepth = options.maxDepth || 1000 - this.maxLength = options.maxLength || Infinity - this.cache = options.cache || {} - this.statCache = options.statCache || {} - - this.changedCwd = false - var cwd = process.cwd() - if (!options.hasOwnProperty("cwd")) this.cwd = cwd - else { - this.cwd = options.cwd - this.changedCwd = path.resolve(options.cwd) !== cwd - } - - this.root = options.root || path.resolve(this.cwd, "/") - this.root = path.resolve(this.root) - if (process.platform === "win32") - this.root = this.root.replace(/\\/g, "/") - - this.nomount = !!options.nomount - - if (!pattern) { - throw new Error("must provide pattern") - } - - // base-matching: just use globstar for that. - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar") - } - pattern = "**/" + pattern - } - - this.strict = options.strict !== false - this.dot = !!options.dot - this.mark = !!options.mark - this.sync = !!options.sync - this.nounique = !!options.nounique - this.nonull = !!options.nonull - this.nosort = !!options.nosort - this.nocase = !!options.nocase - this.stat = !!options.stat - - this.debug = !!options.debug || !!options.globDebug - if (this.debug) - this.log = console.error - - this.silent = !!options.silent - - var mm = this.minimatch = new Minimatch(pattern, options) - this.options = mm.options - pattern = this.pattern = mm.pattern - - this.error = null - this.aborted = false - - // list of all the patterns that ** has resolved do, so - // we can avoid visiting multiple times. - this._globstars = {} - - EE.call(this) - - // process each pattern in the minimatch set - var n = this.minimatch.set.length - - // The matches are stored as {: true,...} so that - // duplicates are automagically pruned. - // Later, we do an Object.keys() on these. - // Keep them as a list so we can fill in when nonull is set. - this.matches = new Array(n) - - this.minimatch.set.forEach(iterator.bind(this)) - function iterator (pattern, i, set) { - this._process(pattern, 0, i, function (er) { - if (er) this.emit("error", er) - if (-- n <= 0) this._finish() - }) - } -} - -Glob.prototype.log = function () {} - -Glob.prototype._finish = function () { - assert(this instanceof Glob) - - var nou = this.nounique - , all = nou ? [] : {} - - for (var i = 0, l = this.matches.length; i < l; i ++) { - var matches = this.matches[i] - this.log("matches[%d] =", i, matches) - // do like the shell, and spit out the literal glob - if (!matches) { - if (this.nonull) { - var literal = this.minimatch.globSet[i] - if (nou) all.push(literal) - else all[literal] = true - } - } else { - // had matches - var m = Object.keys(matches) - if (nou) all.push.apply(all, m) - else m.forEach(function (m) { - all[m] = true - }) - } - } - - if (!nou) all = Object.keys(all) - - if (!this.nosort) { - all = all.sort(this.nocase ? alphasorti : alphasort) - } - - if (this.mark) { - // at *some* point we statted all of these - all = all.map(function (m) { - var sc = this.cache[m] - if (!sc) - return m - var isDir = (Array.isArray(sc) || sc === 2) - if (isDir && m.slice(-1) !== "/") { - return m + "/" - } - if (!isDir && m.slice(-1) === "/") { - return m.replace(/\/+$/, "") - } - return m - }, this) - } - - this.log("emitting end", all) - - this.EOF = this.found = all - this.emitMatch(this.EOF) -} - -function alphasorti (a, b) { - a = a.toLowerCase() - b = b.toLowerCase() - return alphasort(a, b) -} - -function alphasort (a, b) { - return a > b ? 1 : a < b ? -1 : 0 -} - -Glob.prototype.abort = function () { - this.aborted = true - this.emit("abort") -} - -Glob.prototype.pause = function () { - if (this.paused) return - if (this.sync) - this.emit("error", new Error("Can't pause/resume sync glob")) - this.paused = true - this.emit("pause") -} - -Glob.prototype.resume = function () { - if (!this.paused) return - if (this.sync) - this.emit("error", new Error("Can't pause/resume sync glob")) - this.paused = false - this.emit("resume") - this._processEmitQueue() - //process.nextTick(this.emit.bind(this, "resume")) -} - -Glob.prototype.emitMatch = function (m) { - if (!this.stat || this.statCache[m] || m === this.EOF) { - this._emitQueue.push(m) - this._processEmitQueue() - } else { - this._stat(m, function(exists, isDir) { - if (exists) { - this._emitQueue.push(m) - this._processEmitQueue() - } - }) - } -} - -Glob.prototype._processEmitQueue = function (m) { - while (!this._processingEmitQueue && - !this.paused) { - this._processingEmitQueue = true - var m = this._emitQueue.shift() - if (!m) { - this._processingEmitQueue = false - break - } - - this.log('emit!', m === this.EOF ? "end" : "match") - - this.emit(m === this.EOF ? "end" : "match", m) - this._processingEmitQueue = false - } -} - -Glob.prototype._process = function (pattern, depth, index, cb_) { - assert(this instanceof Glob) - - var cb = function cb (er, res) { - assert(this instanceof Glob) - if (this.paused) { - if (!this._processQueue) { - this._processQueue = [] - this.once("resume", function () { - var q = this._processQueue - this._processQueue = null - q.forEach(function (cb) { cb() }) - }) - } - this._processQueue.push(cb_.bind(this, er, res)) - } else { - cb_.call(this, er, res) - } - }.bind(this) - - if (this.aborted) return cb() - - if (depth > this.maxDepth) return cb() - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === "string") { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // see if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - prefix = pattern.join("/") - this._stat(prefix, function (exists, isDir) { - // either it's there, or it isn't. - // nothing more to do, either way. - if (exists) { - if (prefix && isAbsolute(prefix) && !this.nomount) { - if (prefix.charAt(0) === "/") { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - } - } - - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/") - - this.matches[index] = this.matches[index] || {} - this.matches[index][prefix] = true - this.emitMatch(prefix) - } - return cb() - }) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's "absolute" like /foo/bar, - // or "relative" like "../baz" - prefix = pattern.slice(0, n) - prefix = prefix.join("/") - break - } - - // get the list of entries. - var read - if (prefix === null) read = "." - else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) { - if (!prefix || !isAbsolute(prefix)) { - prefix = path.join("/", prefix) - } - read = prefix = path.resolve(prefix) - - // if (process.platform === "win32") - // read = prefix = prefix.replace(/^[a-zA-Z]:|\\/g, "/") - - this.log('absolute: ', prefix, this.root, pattern, read) - } else { - read = prefix - } - - this.log('readdir(%j)', read, this.cwd, this.root) - - return this._readdir(read, function (er, entries) { - if (er) { - // not a directory! - // this means that, whatever else comes after this, it can never match - return cb() - } - - // globstar is special - if (pattern[n] === minimatch.GLOBSTAR) { - // test without the globstar, and with every child both below - // and replacing the globstar. - var s = [ pattern.slice(0, n).concat(pattern.slice(n + 1)) ] - entries.forEach(function (e) { - if (e.charAt(0) === "." && !this.dot) return - // instead of the globstar - s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1))) - // below the globstar - s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n))) - }, this) - - s = s.filter(function (pattern) { - var key = gsKey(pattern) - var seen = !this._globstars[key] - this._globstars[key] = true - return seen - }, this) - - if (!s.length) - return cb() - - // now asyncForEach over this - var l = s.length - , errState = null - s.forEach(function (gsPattern) { - this._process(gsPattern, depth + 1, index, function (er) { - if (errState) return - if (er) return cb(errState = er) - if (--l <= 0) return cb() - }) - }, this) - - return - } - - // not a globstar - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = pattern[n] - var rawGlob = pattern[n]._glob - , dotOk = this.dot || rawGlob.charAt(0) === "." - - entries = entries.filter(function (e) { - return (e.charAt(0) !== "." || dotOk) && - e.match(pattern[n]) - }) - - // If n === pattern.length - 1, then there's no need for the extra stat - // *unless* the user has specified "mark" or "stat" explicitly. - // We know that they exist, since the readdir returned them. - if (n === pattern.length - 1 && - !this.mark && - !this.stat) { - entries.forEach(function (e) { - if (prefix) { - if (prefix !== "/") e = prefix + "/" + e - else e = prefix + e - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path.join(this.root, e) - } - - if (process.platform === "win32") - e = e.replace(/\\/g, "/") - - this.matches[index] = this.matches[index] || {} - this.matches[index][e] = true - this.emitMatch(e) - }, this) - return cb.call(this) - } - - - // now test all the remaining entries as stand-ins for that part - // of the pattern. - var l = entries.length - , errState = null - if (l === 0) return cb() // no matches possible - entries.forEach(function (e) { - var p = pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1)) - this._process(p, depth + 1, index, function (er) { - if (errState) return - if (er) return cb(errState = er) - if (--l === 0) return cb.call(this) - }) - }, this) - }) - -} - -function gsKey (pattern) { - return '**' + pattern.map(function (p) { - return (p === minimatch.GLOBSTAR) ? '**' : (''+p) - }).join('/') -} - -Glob.prototype._stat = function (f, cb) { - assert(this instanceof Glob) - var abs = f - if (f.charAt(0) === "/") { - abs = path.join(this.root, f) - } else if (this.changedCwd) { - abs = path.resolve(this.cwd, f) - } - - if (f.length > this.maxLength) { - var er = new Error("Path name too long") - er.code = "ENAMETOOLONG" - er.path = f - return this._afterStat(f, abs, cb, er) - } - - this.log('stat', [this.cwd, f, '=', abs]) - - if (!this.stat && this.cache.hasOwnProperty(f)) { - var exists = this.cache[f] - , isDir = exists && (Array.isArray(exists) || exists === 2) - if (this.sync) return cb.call(this, !!exists, isDir) - return process.nextTick(cb.bind(this, !!exists, isDir)) - } - - var stat = this.statCache[abs] - if (this.sync || stat) { - var er - try { - stat = fs.statSync(abs) - } catch (e) { - er = e - } - this._afterStat(f, abs, cb, er, stat) - } else { - fs.stat(abs, this._afterStat.bind(this, f, abs, cb)) - } -} - -Glob.prototype._afterStat = function (f, abs, cb, er, stat) { - var exists - assert(this instanceof Glob) - - if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) { - this.log("should be ENOTDIR, fake it") - - er = new Error("ENOTDIR, not a directory '" + abs + "'") - er.path = abs - er.code = "ENOTDIR" - stat = null - } - - var emit = !this.statCache[abs] - this.statCache[abs] = stat - - if (er || !stat) { - exists = false - } else { - exists = stat.isDirectory() ? 2 : 1 - if (emit) - this.emit('stat', f, stat) - } - this.cache[f] = this.cache[f] || exists - cb.call(this, !!exists, exists === 2) -} - -Glob.prototype._readdir = function (f, cb) { - assert(this instanceof Glob) - var abs = f - if (f.charAt(0) === "/") { - abs = path.join(this.root, f) - } else if (isAbsolute(f)) { - abs = f - } else if (this.changedCwd) { - abs = path.resolve(this.cwd, f) - } - - if (f.length > this.maxLength) { - var er = new Error("Path name too long") - er.code = "ENAMETOOLONG" - er.path = f - return this._afterReaddir(f, abs, cb, er) - } - - this.log('readdir', [this.cwd, f, abs]) - if (this.cache.hasOwnProperty(f)) { - var c = this.cache[f] - if (Array.isArray(c)) { - if (this.sync) return cb.call(this, null, c) - return process.nextTick(cb.bind(this, null, c)) - } - - if (!c || c === 1) { - // either ENOENT or ENOTDIR - var code = c ? "ENOTDIR" : "ENOENT" - , er = new Error((c ? "Not a directory" : "Not found") + ": " + f) - er.path = f - er.code = code - this.log(f, er) - if (this.sync) return cb.call(this, er) - return process.nextTick(cb.bind(this, er)) - } - - // at this point, c === 2, meaning it's a dir, but we haven't - // had to read it yet, or c === true, meaning it's *something* - // but we don't have any idea what. Need to read it, either way. - } - - if (this.sync) { - var er, entries - try { - entries = fs.readdirSync(abs) - } catch (e) { - er = e - } - return this._afterReaddir(f, abs, cb, er, entries) - } - - fs.readdir(abs, this._afterReaddir.bind(this, f, abs, cb)) -} - -Glob.prototype._afterReaddir = function (f, abs, cb, er, entries) { - assert(this instanceof Glob) - if (entries && !er) { - this.cache[f] = entries - // if we haven't asked to stat everything for suresies, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. This also gets us one step - // further into ELOOP territory. - if (!this.mark && !this.stat) { - entries.forEach(function (e) { - if (f === "/") e = f + e - else e = f + "/" + e - this.cache[e] = true - }, this) - } - - return cb.call(this, er, entries) - } - - // now handle errors, and cache the information - if (er) switch (er.code) { - case "ENOTDIR": // totally normal. means it *does* exist. - this.cache[f] = 1 - return cb.call(this, er) - case "ENOENT": // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[f] = false - return cb.call(this, er) - default: // some unusual error. Treat as failure. - this.cache[f] = false - if (this.strict) this.emit("error", er) - if (!this.silent) console.error("glob error", er) - return cb.call(this, er) - } -} - -var isAbsolute = process.platform === "win32" ? absWin : absUnix - -function absWin (p) { - if (absUnix(p)) return true - // pull off the device/UNC bit from a windows path. - // from node's lib/path.js - var splitDeviceRe = - /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/ - , result = splitDeviceRe.exec(p) - , device = result[1] || '' - , isUnc = device && device.charAt(1) !== ':' - , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute - - return isAbsolute -} - -function absUnix (p) { - return p.charAt(0) === "/" || p === "" -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/.npmignore b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/.npmignore deleted file mode 100644 index c2658d7d..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/LICENSE b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/README.md b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/README.md deleted file mode 100644 index eb1a1093..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# graceful-fs - -graceful-fs functions as a drop-in replacement for the fs module, -making various improvements. - -The improvements are meant to normalize behavior across different -platforms and environments, and to make filesystem access more -resilient to errors. - -## Improvements over fs module - -graceful-fs: - -* Queues up `open` and `readdir` calls, and retries them once - something closes if there is an EMFILE error from too many file - descriptors. -* fixes `lchmod` for Node versions prior to 0.6.2. -* implements `fs.lutimes` if possible. Otherwise it becomes a noop. -* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or - `lchown` if the user isn't root. -* makes `lchmod` and `lchown` become noops, if not available. -* retries reading a file if `read` results in EAGAIN error. - -On Windows, it retries renaming a file for up to one second if `EACCESS` -or `EPERM` error occurs, likely because antivirus software has locked -the directory. diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/graceful-fs.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/graceful-fs.js deleted file mode 100644 index 1865f92c..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/graceful-fs.js +++ /dev/null @@ -1,159 +0,0 @@ -// Monkey-patching the fs module. -// It's ugly, but there is simply no other way to do this. -var fs = module.exports = require('fs') - -var assert = require('assert') - -// fix up some busted stuff, mostly on windows and old nodes -require('./polyfills.js') - -// The EMFILE enqueuing stuff - -var util = require('util') - -function noop () {} - -var debug = noop -var util = require('util') -if (util.debuglog) - debug = util.debuglog('gfs') -else if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) - debug = function() { - var m = util.format.apply(util, arguments) - m = 'GFS: ' + m.split(/\n/).join('\nGFS: ') - console.error(m) - } - -if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) { - process.on('exit', function() { - debug('fds', fds) - debug(queue) - assert.equal(queue.length, 0) - }) -} - - -var originalOpen = fs.open -fs.open = open - -function open(path, flags, mode, cb) { - if (typeof mode === "function") cb = mode, mode = null - if (typeof cb !== "function") cb = noop - new OpenReq(path, flags, mode, cb) -} - -function OpenReq(path, flags, mode, cb) { - this.path = path - this.flags = flags - this.mode = mode - this.cb = cb - Req.call(this) -} - -util.inherits(OpenReq, Req) - -OpenReq.prototype.process = function() { - originalOpen.call(fs, this.path, this.flags, this.mode, this.done) -} - -var fds = {} -OpenReq.prototype.done = function(er, fd) { - debug('open done', er, fd) - if (fd) - fds['fd' + fd] = this.path - Req.prototype.done.call(this, er, fd) -} - - -var originalReaddir = fs.readdir -fs.readdir = readdir - -function readdir(path, cb) { - if (typeof cb !== "function") cb = noop - new ReaddirReq(path, cb) -} - -function ReaddirReq(path, cb) { - this.path = path - this.cb = cb - Req.call(this) -} - -util.inherits(ReaddirReq, Req) - -ReaddirReq.prototype.process = function() { - originalReaddir.call(fs, this.path, this.done) -} - -ReaddirReq.prototype.done = function(er, files) { - Req.prototype.done.call(this, er, files) - onclose() -} - - -var originalClose = fs.close -fs.close = close - -function close (fd, cb) { - debug('close', fd) - if (typeof cb !== "function") cb = noop - delete fds['fd' + fd] - originalClose.call(fs, fd, function(er) { - onclose() - cb(er) - }) -} - - -var originalCloseSync = fs.closeSync -fs.closeSync = closeSync - -function closeSync (fd) { - try { - return originalCloseSync(fd) - } finally { - onclose() - } -} - - -// Req class -function Req () { - // start processing - this.done = this.done.bind(this) - this.failures = 0 - this.process() -} - -Req.prototype.done = function (er, result) { - var tryAgain = false - if (er) { - var code = er.code - var tryAgain = code === "EMFILE" - if (process.platform === "win32") - tryAgain = tryAgain || code === "OK" - } - - if (tryAgain) { - this.failures ++ - enqueue(this) - } else { - var cb = this.cb - cb(er, result) - } -} - -var queue = [] - -function enqueue(req) { - queue.push(req) - debug('enqueue %d %s', queue.length, req.constructor.name, req) -} - -function onclose() { - var req = queue.shift() - if (req) { - debug('process', req.constructor.name, req) - req.process() - } -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/package.json b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/package.json deleted file mode 100644 index ea5a208a..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "name": "graceful-fs", - "description": "A drop-in replacement for fs, making various improvements.", - "version": "2.0.1", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-graceful-fs.git" - }, - "main": "graceful-fs.js", - "engines": { - "node": ">=0.4.0" - }, - "directories": { - "test": "test" - }, - "scripts": { - "test": "tap test/*.js" - }, - "keywords": [ - "fs", - "module", - "reading", - "retry", - "retries", - "queue", - "error", - "errors", - "handling", - "EMFILE", - "EAGAIN", - "EINVAL", - "EPERM", - "EACCESS" - ], - "license": "BSD", - "readme": "# graceful-fs\n\ngraceful-fs functions as a drop-in replacement for the fs module,\nmaking various improvements.\n\nThe improvements are meant to normalize behavior across different\nplatforms and environments, and to make filesystem access more\nresilient to errors.\n\n## Improvements over fs module\n\ngraceful-fs:\n\n* Queues up `open` and `readdir` calls, and retries them once\n something closes if there is an EMFILE error from too many file\n descriptors.\n* fixes `lchmod` for Node versions prior to 0.6.2.\n* implements `fs.lutimes` if possible. Otherwise it becomes a noop.\n* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or\n `lchown` if the user isn't root.\n* makes `lchmod` and `lchown` become noops, if not available.\n* retries reading a file if `read` results in EAGAIN error.\n\nOn Windows, it retries renaming a file for up to one second if `EACCESS`\nor `EPERM` error occurs, likely because antivirus software has locked\nthe directory.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/node-graceful-fs/issues" - }, - "homepage": "https://github.com/isaacs/node-graceful-fs", - "_id": "graceful-fs@2.0.1", - "_from": "graceful-fs@~2.0.0" -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/polyfills.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/polyfills.js deleted file mode 100644 index afc83b3f..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/polyfills.js +++ /dev/null @@ -1,228 +0,0 @@ -var fs = require('fs') -var constants = require('constants') - -var origCwd = process.cwd -var cwd = null -process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process) - return cwd -} -var chdir = process.chdir -process.chdir = function(d) { - cwd = null - chdir.call(process, d) -} - -// (re-)implement some things that are known busted or missing. - -// lchmod, broken prior to 0.6.2 -// back-port the fix here. -if (constants.hasOwnProperty('O_SYMLINK') && - process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - fs.lchmod = function (path, mode, callback) { - callback = callback || noop - fs.open( path - , constants.O_WRONLY | constants.O_SYMLINK - , mode - , function (err, fd) { - if (err) { - callback(err) - return - } - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - fs.fchmod(fd, mode, function (err) { - fs.close(fd, function(err2) { - callback(err || err2) - }) - }) - }) - } - - fs.lchmodSync = function (path, mode) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) - - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - var err, err2 - try { - var ret = fs.fchmodSync(fd, mode) - } catch (er) { - err = er - } - try { - fs.closeSync(fd) - } catch (er) { - err2 = er - } - if (err || err2) throw (err || err2) - return ret - } -} - - -// lutimes implementation, or no-op -if (!fs.lutimes) { - if (constants.hasOwnProperty("O_SYMLINK")) { - fs.lutimes = function (path, at, mt, cb) { - fs.open(path, constants.O_SYMLINK, function (er, fd) { - cb = cb || noop - if (er) return cb(er) - fs.futimes(fd, at, mt, function (er) { - fs.close(fd, function (er2) { - return cb(er || er2) - }) - }) - }) - } - - fs.lutimesSync = function (path, at, mt) { - var fd = fs.openSync(path, constants.O_SYMLINK) - , err - , err2 - , ret - - try { - var ret = fs.futimesSync(fd, at, mt) - } catch (er) { - err = er - } - try { - fs.closeSync(fd) - } catch (er) { - err2 = er - } - if (err || err2) throw (err || err2) - return ret - } - - } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) { - // maybe utimensat will be bound soonish? - fs.lutimes = function (path, at, mt, cb) { - fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb) - } - - fs.lutimesSync = function (path, at, mt) { - return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW) - } - - } else { - fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) } - fs.lutimesSync = function () {} - } -} - - -// https://github.com/isaacs/node-graceful-fs/issues/4 -// Chown should not fail on einval or eperm if non-root. - -fs.chown = chownFix(fs.chown) -fs.fchown = chownFix(fs.fchown) -fs.lchown = chownFix(fs.lchown) - -fs.chownSync = chownFixSync(fs.chownSync) -fs.fchownSync = chownFixSync(fs.fchownSync) -fs.lchownSync = chownFixSync(fs.lchownSync) - -function chownFix (orig) { - if (!orig) return orig - return function (target, uid, gid, cb) { - return orig.call(fs, target, uid, gid, function (er, res) { - if (chownErOk(er)) er = null - cb(er, res) - }) - } -} - -function chownFixSync (orig) { - if (!orig) return orig - return function (target, uid, gid) { - try { - return orig.call(fs, target, uid, gid) - } catch (er) { - if (!chownErOk(er)) throw er - } - } -} - -function chownErOk (er) { - // if there's no getuid, or if getuid() is something other than 0, - // and the error is EINVAL or EPERM, then just ignore it. - // This specific case is a silent failure in cp, install, tar, - // and most other unix tools that manage permissions. - // When running as root, or if other types of errors are encountered, - // then it's strict. - if (!er || (!process.getuid || process.getuid() !== 0) - && (er.code === "EINVAL" || er.code === "EPERM")) return true -} - - -// if lchmod/lchown do not exist, then make them no-ops -if (!fs.lchmod) { - fs.lchmod = function (path, mode, cb) { - process.nextTick(cb) - } - fs.lchmodSync = function () {} -} -if (!fs.lchown) { - fs.lchown = function (path, uid, gid, cb) { - process.nextTick(cb) - } - fs.lchownSync = function () {} -} - - - -// on Windows, A/V software can lock the directory, causing this -// to fail with an EACCES or EPERM if the directory contains newly -// created files. Try again on failure, for up to 1 second. -if (process.platform === "win32") { - var rename_ = fs.rename - fs.rename = function rename (from, to, cb) { - var start = Date.now() - rename_(from, to, function CB (er) { - if (er - && (er.code === "EACCES" || er.code === "EPERM") - && Date.now() - start < 1000) { - return rename_(from, to, CB) - } - cb(er) - }) - } -} - - -// if read() returns EAGAIN, then just try it again. -var read = fs.read -fs.read = function (fd, buffer, offset, length, position, callback_) { - var callback - if (callback_ && typeof callback_ === 'function') { - var eagCounter = 0 - callback = function (er, _, __) { - if (er && er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - return read.call(fs, fd, buffer, offset, length, position, callback) - } - callback_.apply(this, arguments) - } - } - return read.call(fs, fd, buffer, offset, length, position, callback) -} - -var readSync = fs.readSync -fs.readSync = function (fd, buffer, offset, length, position) { - var eagCounter = 0 - while (true) { - try { - return readSync.call(fs, fd, buffer, offset, length, position) - } catch (er) { - if (er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - continue - } - throw er - } - } -} - diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/test/open.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/test/open.js deleted file mode 100644 index 104f36b0..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/test/open.js +++ /dev/null @@ -1,39 +0,0 @@ -var test = require('tap').test -var fs = require('../graceful-fs.js') - -test('graceful fs is monkeypatched fs', function (t) { - t.equal(fs, require('fs')) - t.end() -}) - -test('open an existing file works', function (t) { - var fd = fs.openSync(__filename, 'r') - fs.closeSync(fd) - fs.open(__filename, 'r', function (er, fd) { - if (er) throw er - fs.close(fd, function (er) { - if (er) throw er - t.pass('works') - t.end() - }) - }) -}) - -test('open a non-existing file throws', function (t) { - var er - try { - var fd = fs.openSync('this file does not exist', 'r') - } catch (x) { - er = x - } - t.ok(er, 'should throw') - t.notOk(fd, 'should not get an fd') - t.equal(er.code, 'ENOENT') - - fs.open('neither does this file', 'r', function (er, fd) { - t.ok(er, 'should throw') - t.notOk(fd, 'should not get an fd') - t.equal(er.code, 'ENOENT') - t.end() - }) -}) diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/inherits/LICENSE b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/inherits/LICENSE deleted file mode 100644 index dea3013d..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/inherits/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/inherits/README.md b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/inherits/README.md deleted file mode 100644 index b1c56658..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/inherits/README.md +++ /dev/null @@ -1,42 +0,0 @@ -Browser-friendly inheritance fully compatible with standard node.js -[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). - -This package exports standard `inherits` from node.js `util` module in -node environment, but also provides alternative browser-friendly -implementation through [browser -field](https://gist.github.com/shtylman/4339901). Alternative -implementation is a literal copy of standard one located in standalone -module to avoid requiring of `util`. It also has a shim for old -browsers with no `Object.create` support. - -While keeping you sure you are using standard `inherits` -implementation in node.js environment, it allows bundlers such as -[browserify](https://github.com/substack/node-browserify) to not -include full `util` package to your client code if all you need is -just `inherits` function. It worth, because browser shim for `util` -package is large and `inherits` is often the single function you need -from it. - -It's recommended to use this package instead of -`require('util').inherits` for any code that has chances to be used -not only in node.js but in browser too. - -## usage - -```js -var inherits = require('inherits'); -// then use exactly as the standard one -``` - -## note on version ~1.0 - -Version ~1.0 had completely different motivation and is not compatible -neither with 2.0 nor with standard node.js `inherits`. - -If you are using version ~1.0 and planning to switch to ~2.0, be -careful: - -* new version uses `super_` instead of `super` for referencing - superclass -* new version overwrites current prototype while old one preserves any - existing fields on it diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/inherits/inherits.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/inherits/inherits.js deleted file mode 100644 index 29f5e24f..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/inherits/inherits.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('util').inherits diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/inherits/inherits_browser.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/inherits/inherits_browser.js deleted file mode 100644 index c1e78a75..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/inherits/inherits_browser.js +++ /dev/null @@ -1,23 +0,0 @@ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/inherits/package.json b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/inherits/package.json deleted file mode 100644 index 5bf0db56..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/inherits/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "inherits", - "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "version": "2.0.1", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented", - "inherits", - "browser", - "browserify" - ], - "main": "./inherits.js", - "browser": "./inherits_browser.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/inherits" - }, - "license": "ISC", - "scripts": { - "test": "node test" - }, - "readme": "Browser-friendly inheritance fully compatible with standard node.js\n[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).\n\nThis package exports standard `inherits` from node.js `util` module in\nnode environment, but also provides alternative browser-friendly\nimplementation through [browser\nfield](https://gist.github.com/shtylman/4339901). Alternative\nimplementation is a literal copy of standard one located in standalone\nmodule to avoid requiring of `util`. It also has a shim for old\nbrowsers with no `Object.create` support.\n\nWhile keeping you sure you are using standard `inherits`\nimplementation in node.js environment, it allows bundlers such as\n[browserify](https://github.com/substack/node-browserify) to not\ninclude full `util` package to your client code if all you need is\njust `inherits` function. It worth, because browser shim for `util`\npackage is large and `inherits` is often the single function you need\nfrom it.\n\nIt's recommended to use this package instead of\n`require('util').inherits` for any code that has chances to be used\nnot only in node.js but in browser too.\n\n## usage\n\n```js\nvar inherits = require('inherits');\n// then use exactly as the standard one\n```\n\n## note on version ~1.0\n\nVersion ~1.0 had completely different motivation and is not compatible\nneither with 2.0 nor with standard node.js `inherits`.\n\nIf you are using version ~1.0 and planning to switch to ~2.0, be\ncareful:\n\n* new version uses `super_` instead of `super` for referencing\n superclass\n* new version overwrites current prototype while old one preserves any\n existing fields on it\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/inherits/issues" - }, - "homepage": "https://github.com/isaacs/inherits", - "_id": "inherits@2.0.1", - "_from": "inherits@2" -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/inherits/test.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/inherits/test.js deleted file mode 100644 index fc53012d..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/inherits/test.js +++ /dev/null @@ -1,25 +0,0 @@ -var inherits = require('./inherits.js') -var assert = require('assert') - -function test(c) { - assert(c.constructor === Child) - assert(c.constructor.super_ === Parent) - assert(Object.getPrototypeOf(c) === Child.prototype) - assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) - assert(c instanceof Child) - assert(c instanceof Parent) -} - -function Child() { - Parent.call(this) - test(this) -} - -function Parent() {} - -inherits(Child, Parent) - -var c = new Child -test(c) - -console.log('ok') diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/.npmignore b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/LICENSE b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/LICENSE deleted file mode 100644 index 05a40109..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -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/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/README.md b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/README.md deleted file mode 100644 index 978268e2..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/README.md +++ /dev/null @@ -1,218 +0,0 @@ -# minimatch - -A minimal matching utility. - -[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch) - - -This is the matching library used internally by npm. - -Eventually, it will replace the C binding in node-glob. - -It works by converting glob expressions into JavaScript `RegExp` -objects. - -## Usage - -```javascript -var minimatch = require("minimatch") - -minimatch("bar.foo", "*.foo") // true! -minimatch("bar.foo", "*.bar") // false! -minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! -``` - -## Features - -Supports these glob features: - -* Brace Expansion -* Extended glob matching -* "Globstar" `**` matching - -See: - -* `man sh` -* `man bash` -* `man 3 fnmatch` -* `man 5 gitignore` - -## Minimatch Class - -Create a minimatch object by instanting the `minimatch.Minimatch` class. - -```javascript -var Minimatch = require("minimatch").Minimatch -var mm = new Minimatch(pattern, options) -``` - -### Properties - -* `pattern` The original pattern the minimatch object represents. -* `options` The options supplied to the constructor. -* `set` A 2-dimensional array of regexp or string expressions. - Each row in the - array corresponds to a brace-expanded pattern. Each item in the row - corresponds to a single path-part. For example, the pattern - `{a,b/c}/d` would expand to a set of patterns like: - - [ [ a, d ] - , [ b, c, d ] ] - - If a portion of the pattern doesn't have any "magic" in it - (that is, it's something like `"foo"` rather than `fo*o?`), then it - will be left as a string rather than converted to a regular - expression. - -* `regexp` Created by the `makeRe` method. A single regular expression - expressing the entire pattern. This is useful in cases where you wish - to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. -* `negate` True if the pattern is negated. -* `comment` True if the pattern is a comment. -* `empty` True if the pattern is `""`. - -### Methods - -* `makeRe` Generate the `regexp` member if necessary, and return it. - Will return `false` if the pattern is invalid. -* `match(fname)` Return true if the filename matches the pattern, or - false otherwise. -* `matchOne(fileArray, patternArray, partial)` Take a `/`-split - filename, and match it against a single row in the `regExpSet`. This - method is mainly for internal use, but is exposed so that it can be - used by a glob-walker that needs to avoid excessive filesystem calls. - -All other methods are internal, and will be called as necessary. - -## Functions - -The top-level exported function has a `cache` property, which is an LRU -cache set to store 100 items. So, calling these methods repeatedly -with the same pattern and options will use the same Minimatch object, -saving the cost of parsing it multiple times. - -### minimatch(path, pattern, options) - -Main export. Tests a path against the pattern using the options. - -```javascript -var isJS = minimatch(file, "*.js", { matchBase: true }) -``` - -### minimatch.filter(pattern, options) - -Returns a function that tests its -supplied argument, suitable for use with `Array.filter`. Example: - -```javascript -var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) -``` - -### minimatch.match(list, pattern, options) - -Match against the list of -files, in the style of fnmatch or glob. If nothing is matched, and -options.nonull is set, then return a list containing the pattern itself. - -```javascript -var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) -``` - -### minimatch.makeRe(pattern, options) - -Make a regular expression object from the pattern. - -## Options - -All options are `false` by default. - -### debug - -Dump a ton of stuff to stderr. - -### nobrace - -Do not expand `{a,b}` and `{1..3}` brace sets. - -### noglobstar - -Disable `**` matching against multiple folder names. - -### dot - -Allow patterns to match filenames starting with a period, even if -the pattern does not explicitly have a period in that spot. - -Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` -is set. - -### noext - -Disable "extglob" style patterns like `+(a|b)`. - -### nocase - -Perform a case-insensitive match. - -### nonull - -When a match is not found by `minimatch.match`, return a list containing -the pattern itself. When set, an empty list is returned if there are -no matches. - -### matchBase - -If set, then patterns without slashes will be matched -against the basename of the path if it contains slashes. For example, -`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. - -### nocomment - -Suppress the behavior of treating `#` at the start of a pattern as a -comment. - -### nonegate - -Suppress the behavior of treating a leading `!` character as negation. - -### flipNegate - -Returns from negate expressions the same as if they were not negated. -(Ie, true on a hit, false on a miss.) - - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between minimatch and other -implementations, and are intentional. - -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.1, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then minimatch.match returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/minimatch.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/minimatch.js deleted file mode 100644 index c633f89f..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/minimatch.js +++ /dev/null @@ -1,1055 +0,0 @@ -;(function (require, exports, module, platform) { - -if (module) module.exports = minimatch -else exports.minimatch = minimatch - -if (!require) { - require = function (id) { - switch (id) { - case "sigmund": return function sigmund (obj) { - return JSON.stringify(obj) - } - case "path": return { basename: function (f) { - f = f.split(/[\/\\]/) - var e = f.pop() - if (!e) e = f.pop() - return e - }} - case "lru-cache": return function LRUCache () { - // not quite an LRU, but still space-limited. - var cache = {} - var cnt = 0 - this.set = function (k, v) { - cnt ++ - if (cnt >= 100) cache = {} - cache[k] = v - } - this.get = function (k) { return cache[k] } - } - } - } -} - -minimatch.Minimatch = Minimatch - -var LRU = require("lru-cache") - , cache = minimatch.cache = new LRU({max: 100}) - , GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} - , sigmund = require("sigmund") - -var path = require("path") - // any single thing other than / - // don't need to escape / when using new RegExp() - , qmark = "[^/]" - - // * => any number of characters - , star = qmark + "*?" - - // ** when dots are allowed. Anything goes, except .. and . - // not (^ or / followed by one or two dots followed by $ or /), - // followed by anything, any number of times. - , twoStarDot = "(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?" - - // not a ^ or / followed by a dot, - // followed by anything, any number of times. - , twoStarNoDot = "(?:(?!(?:\\\/|^)\\.).)*?" - - // characters that need to be escaped in RegExp. - , reSpecials = charSet("().*{}+?[]^$\\!") - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split("").reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - a = a || {} - b = b || {} - var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch - return minimatch.defaults(def).Minimatch -} - - -function minimatch (p, pattern, options) { - if (typeof pattern !== "string") { - throw new TypeError("glob pattern string required") - } - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === "#") { - return false - } - - // "" only matches "" - if (pattern.trim() === "") return p === "" - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options, cache) - } - - if (typeof pattern !== "string") { - throw new TypeError("glob pattern string required") - } - - if (!options) options = {} - pattern = pattern.trim() - - // windows: need to use /, not \ - // On other platforms, \ is a valid (albeit bad) filename char. - if (platform === "win32") { - pattern = pattern.split("\\").join("/") - } - - // lru storage. - // these things aren't particularly big, but walking down the string - // and turning it into a regexp can get pretty costly. - var cacheKey = pattern + "\n" + sigmund(options) - var cached = minimatch.cache.get(cacheKey) - if (cached) return cached - minimatch.cache.set(cacheKey, this) - - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.debug = function() {} - -Minimatch.prototype.make = make -function make () { - // don't do it more than once. - if (this._made) return - - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === "#") { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) this.debug = console.error - - this.debug(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - this.debug(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return -1 === s.indexOf(false) - }) - - this.debug(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - , negate = false - , options = this.options - , negateOffset = 0 - - if (options.nonegate) return - - for ( var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === "!" - ; i ++) { - negate = !negate - negateOffset ++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return new Minimatch(pattern, options).braceExpand() -} - -Minimatch.prototype.braceExpand = braceExpand -function braceExpand (pattern, options) { - options = options || this.options - pattern = typeof pattern === "undefined" - ? this.pattern : pattern - - if (typeof pattern === "undefined") { - throw new Error("undefined pattern") - } - - if (options.nobrace || - !pattern.match(/\{.*\}/)) { - // shortcut. no need to expand. - return [pattern] - } - - var escaping = false - - // examples and comments refer to this crazy pattern: - // a{b,c{d,e},{f,g}h}x{y,z} - // expected: - // abxy - // abxz - // acdxy - // acdxz - // acexy - // acexz - // afhxy - // afhxz - // aghxy - // aghxz - - // everything before the first \{ is just a prefix. - // So, we pluck that off, and work with the rest, - // and then prepend it to everything we find. - if (pattern.charAt(0) !== "{") { - this.debug(pattern) - var prefix = null - for (var i = 0, l = pattern.length; i < l; i ++) { - var c = pattern.charAt(i) - this.debug(i, c) - if (c === "\\") { - escaping = !escaping - } else if (c === "{" && !escaping) { - prefix = pattern.substr(0, i) - break - } - } - - // actually no sets, all { were escaped. - if (prefix === null) { - this.debug("no sets") - return [pattern] - } - - var tail = braceExpand.call(this, pattern.substr(i), options) - return tail.map(function (t) { - return prefix + t - }) - } - - // now we have something like: - // {b,c{d,e},{f,g}h}x{y,z} - // walk through the set, expanding each part, until - // the set ends. then, we'll expand the suffix. - // If the set only has a single member, then'll put the {} back - - // first, handle numeric sets, since they're easier - var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/) - if (numset) { - this.debug("numset", numset[1], numset[2]) - var suf = braceExpand.call(this, pattern.substr(numset[0].length), options) - , start = +numset[1] - , end = +numset[2] - , inc = start > end ? -1 : 1 - , set = [] - for (var i = start; i != (end + inc); i += inc) { - // append all the suffixes - for (var ii = 0, ll = suf.length; ii < ll; ii ++) { - set.push(i + suf[ii]) - } - } - return set - } - - // ok, walk through the set - // We hope, somewhat optimistically, that there - // will be a } at the end. - // If the closing brace isn't found, then the pattern is - // interpreted as braceExpand("\\" + pattern) so that - // the leading \{ will be interpreted literally. - var i = 1 // skip the \{ - , depth = 1 - , set = [] - , member = "" - , sawEnd = false - , escaping = false - - function addMember () { - set.push(member) - member = "" - } - - this.debug("Entering for") - FOR: for (i = 1, l = pattern.length; i < l; i ++) { - var c = pattern.charAt(i) - this.debug("", i, c) - - if (escaping) { - escaping = false - member += "\\" + c - } else { - switch (c) { - case "\\": - escaping = true - continue - - case "{": - depth ++ - member += "{" - continue - - case "}": - depth -- - // if this closes the actual set, then we're done - if (depth === 0) { - addMember() - // pluck off the close-brace - i ++ - break FOR - } else { - member += c - continue - } - - case ",": - if (depth === 1) { - addMember() - } else { - member += c - } - continue - - default: - member += c - continue - } // switch - } // else - } // for - - // now we've either finished the set, and the suffix is - // pattern.substr(i), or we have *not* closed the set, - // and need to escape the leading brace - if (depth !== 0) { - this.debug("didn't close", pattern) - return braceExpand.call(this, "\\" + pattern, options) - } - - // x{y,z} -> ["xy", "xz"] - this.debug("set", set) - this.debug("suffix", pattern.substr(i)) - var suf = braceExpand.call(this, pattern.substr(i), options) - // ["b", "c{d,e}","{f,g}h"] -> - // [["b"], ["cd", "ce"], ["fh", "gh"]] - var addBraces = set.length === 1 - this.debug("set pre-expanded", set) - set = set.map(function (p) { - return braceExpand.call(this, p, options) - }, this) - this.debug("set expanded", set) - - - // [["b"], ["cd", "ce"], ["fh", "gh"]] -> - // ["b", "cd", "ce", "fh", "gh"] - set = set.reduce(function (l, r) { - return l.concat(r) - }) - - if (addBraces) { - set = set.map(function (s) { - return "{" + s + "}" - }) - } - - // now attach the suffixes. - var ret = [] - for (var i = 0, l = set.length; i < l; i ++) { - for (var ii = 0, ll = suf.length; ii < ll; ii ++) { - ret.push(set[i] + suf[ii]) - } - } - return ret -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - var options = this.options - - // shortcuts - if (!options.noglobstar && pattern === "**") return GLOBSTAR - if (pattern === "") return "" - - var re = "" - , hasMagic = !!options.nocase - , escaping = false - // ? => one single character - , patternListStack = [] - , plType - , stateChar - , inClass = false - , reClassStart = -1 - , classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - , patternStart = pattern.charAt(0) === "." ? "" // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))" - : "(?!\\.)" - , self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case "*": - re += star - hasMagic = true - break - case "?": - re += qmark - hasMagic = true - break - default: - re += "\\"+stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for ( var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i ++ ) { - - this.debug("%s\t%s %s %j", pattern, i, re, c) - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += "\\" + c - escaping = false - continue - } - - SWITCH: switch (c) { - case "/": - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - - case "\\": - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case "?": - case "*": - case "+": - case "@": - case "!": - this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === "!" && i === classStart + 1) c = "^" - re += c - continue - } - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case "(": - if (inClass) { - re += "(" - continue - } - - if (!stateChar) { - re += "\\(" - continue - } - - plType = stateChar - patternListStack.push({ type: plType - , start: i - 1 - , reStart: re.length }) - // negation is (?:(?!js)[^/]*) - re += stateChar === "!" ? "(?:(?!" : "(?:" - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ")": - if (inClass || !patternListStack.length) { - re += "\\)" - continue - } - - clearStateChar() - hasMagic = true - re += ")" - plType = patternListStack.pop().type - // negation is (?:(?!js)[^/]*) - // The others are (?:) - switch (plType) { - case "!": - re += "[^/]*?)" - break - case "?": - case "+": - case "*": re += plType - case "@": break // the default anyway - } - continue - - case "|": - if (inClass || !patternListStack.length || escaping) { - re += "\\|" - escaping = false - continue - } - - clearStateChar() - re += "|" - continue - - // these are mostly the same in regexp and glob - case "[": - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += "\\" + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case "]": - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += "\\" + c - escaping = false - continue - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === "^" && inClass)) { - re += "\\" - } - - re += c - - } // switch - } // for - - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - var cs = pattern.substr(classStart + 1) - , sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + "\\[" + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - var pl - while (pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + 3) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = "\\" - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + "|" - }) - - this.debug("tail=%j\n %s", tail, tail) - var t = pl.type === "*" ? star - : pl.type === "?" ? qmark - : "\\" + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) - + t + "\\(" - + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += "\\\\" - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case ".": - case "[": - case "(": addPatternStart = true - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== "" && hasMagic) re = "(?=.)" + re - - if (addPatternStart) re = patternStart + re - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [ re, hasMagic ] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? "i" : "" - , regExp = new RegExp("^" + re + "$", flags) - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) return this.regexp = false - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - , flags = options.nocase ? "i" : "" - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === "string") ? regExpEscape(p) - : p._src - }).join("\\\/") - }).join("|") - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = "^(?:" + re + ")$" - - // can match anything, as long as it's not this. - if (this.negate) re = "^(?!" + re + ").*$" - - try { - return this.regexp = new RegExp(re, flags) - } catch (ex) { - return this.regexp = false - } -} - -minimatch.match = function (list, pattern, options) { - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = match -function match (f, partial) { - this.debug("match", f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === "" - - if (f === "/" && partial) return true - - var options = this.options - - // windows: need to use /, not \ - // On other platforms, \ is a valid (albeit bad) filename char. - if (platform === "win32") { - f = f.split("\\").join("/") - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, "split", f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - this.debug(this.pattern, "set", set) - - var splitFile = path.basename(f.join("/")).split("/") - - for (var i = 0, l = set.length; i < l; i ++) { - var pattern = set[i], file = f - if (options.matchBase && pattern.length === 1) { - file = splitFile - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - this.debug("matchOne", - { "this": this - , file: file - , pattern: pattern }) - - this.debug("matchOne", file.length, pattern.length) - - for ( var fi = 0 - , pi = 0 - , fl = file.length - , pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi ++, pi ++ ) { - - this.debug("matchOne loop") - var p = pattern[pi] - , f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - if (p === false) return false - - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - , pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for ( ; fi < fl; fi ++) { - if (file[fi] === "." || file[fi] === ".." || - (!options.dot && file[fi].charAt(0) === ".")) return false - } - return true - } - - // ok, let's see if we can swallow whatever we can. - WHILE: while (fr < fl) { - var swallowee = file[fr] - - this.debug('\nglobstar while', - file, fr, pattern, pr, swallowee) - - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === "." || swallowee === ".." || - (!options.dot && swallowee.charAt(0) === ".")) { - this.debug("dot detected!", file, fr, pattern, pr) - break WHILE - } - - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr ++ - } - } - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - if (partial) { - // ran out of file - this.debug("\n>>> no match, partial?", file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === "string") { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } - this.debug("string match", p, f, hit) - } else { - hit = f.match(p) - this.debug("pattern match", p, f, hit) - } - - if (!hit) return false - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === "") - return emptyFileEnd - } - - // should be unreachable. - throw new Error("wtf?") -} - - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, "$1") -} - - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") -} - -})( typeof require === "function" ? require : null, - this, - typeof module === "object" ? module : null, - typeof process === "object" ? process.platform : "win32" - ) diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore deleted file mode 100644 index 07e6e472..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS deleted file mode 100644 index 4a0bc503..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS +++ /dev/null @@ -1,14 +0,0 @@ -# Authors, sorted by whether or not they are me -Isaac Z. Schlueter -Brian Cottingham -Carlos Brito Lage -Jesse Dailey -Kevin O'Hara -Marco Rogers -Mark Cavage -Marko Mikulicic -Nathan Rajlich -Satheesh Natesan -Trent Mick -ashleybrener -n4kz diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE deleted file mode 100644 index 05a40109..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -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/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md deleted file mode 100644 index 03ee0f98..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md +++ /dev/null @@ -1,97 +0,0 @@ -# lru cache - -A cache object that deletes the least-recently-used items. - -## Usage: - -```javascript -var LRU = require("lru-cache") - , options = { max: 500 - , length: function (n) { return n * 2 } - , dispose: function (key, n) { n.close() } - , maxAge: 1000 * 60 * 60 } - , cache = LRU(options) - , otherCache = LRU(50) // sets just the max size - -cache.set("key", "value") -cache.get("key") // "value" - -cache.reset() // empty the cache -``` - -If you put more stuff in it, then items will fall out. - -If you try to put an oversized thing in it, then it'll fall out right -away. - -## Options - -* `max` The maximum size of the cache, checked by applying the length - function to all values in the cache. Not setting this is kind of - silly, since that's the whole purpose of this lib, but it defaults - to `Infinity`. -* `maxAge` Maximum age in ms. Items are not pro-actively pruned out - as they age, but if you try to get an item that is too old, it'll - drop it and return undefined instead of giving it to you. -* `length` Function that is used to calculate the length of stored - items. If you're storing strings or buffers, then you probably want - to do something like `function(n){return n.length}`. The default is - `function(n){return 1}`, which is fine if you want to store `n` - like-sized things. -* `dispose` Function that is called on items when they are dropped - from the cache. This can be handy if you want to close file - descriptors or do other cleanup tasks when items are no longer - accessible. Called with `key, value`. It's called *before* - actually removing the item from the internal cache, so if you want - to immediately put it back in, you'll have to do that in a - `nextTick` or `setTimeout` callback or it won't do anything. -* `stale` By default, if you set a `maxAge`, it'll only actually pull - stale items out of the cache when you `get(key)`. (That is, it's - not pre-emptively doing a `setTimeout` or anything.) If you set - `stale:true`, it'll return the stale value before deleting it. If - you don't set this, then it'll return `undefined` when you try to - get a stale entry, as if it had already been deleted. - -## API - -* `set(key, value)` -* `get(key) => value` - - Both of these will update the "recently used"-ness of the key. - They do what you think. - -* `peek(key)` - - Returns the key value (or `undefined` if not found) without - updating the "recently used"-ness of the key. - - (If you find yourself using this a lot, you *might* be using the - wrong sort of data structure, but there are some use cases where - it's handy.) - -* `del(key)` - - Deletes a key out of the cache. - -* `reset()` - - Clear the cache entirely, throwing away all values. - -* `has(key)` - - Check if a key is in the cache, without updating the recent-ness - or deleting it for being stale. - -* `forEach(function(value,key,cache), [thisp])` - - Just like `Array.prototype.forEach`. Iterates over all the keys - in the cache, in order of recent-ness. (Ie, more recently used - items are iterated over first.) - -* `keys()` - - Return an array of the keys in the cache. - -* `values()` - - Return an array of the values in the cache. diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js deleted file mode 100644 index d1d13817..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +++ /dev/null @@ -1,252 +0,0 @@ -;(function () { // closure for web browsers - -if (typeof module === 'object' && module.exports) { - module.exports = LRUCache -} else { - // just set the global for non-node platforms. - this.LRUCache = LRUCache -} - -function hOP (obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key) -} - -function naiveLength () { return 1 } - -function LRUCache (options) { - if (!(this instanceof LRUCache)) - return new LRUCache(options) - - if (typeof options === 'number') - options = { max: options } - - if (!options) - options = {} - - this._max = options.max - // Kind of weird to have a default max of Infinity, but oh well. - if (!this._max || !(typeof this._max === "number") || this._max <= 0 ) - this._max = Infinity - - this._lengthCalculator = options.length || naiveLength - if (typeof this._lengthCalculator !== "function") - this._lengthCalculator = naiveLength - - this._allowStale = options.stale || false - this._maxAge = options.maxAge || null - this._dispose = options.dispose - this.reset() -} - -// resize the cache when the max changes. -Object.defineProperty(LRUCache.prototype, "max", - { set : function (mL) { - if (!mL || !(typeof mL === "number") || mL <= 0 ) mL = Infinity - this._max = mL - if (this._length > this._max) trim(this) - } - , get : function () { return this._max } - , enumerable : true - }) - -// resize the cache when the lengthCalculator changes. -Object.defineProperty(LRUCache.prototype, "lengthCalculator", - { set : function (lC) { - if (typeof lC !== "function") { - this._lengthCalculator = naiveLength - this._length = this._itemCount - for (var key in this._cache) { - this._cache[key].length = 1 - } - } else { - this._lengthCalculator = lC - this._length = 0 - for (var key in this._cache) { - this._cache[key].length = this._lengthCalculator(this._cache[key].value) - this._length += this._cache[key].length - } - } - - if (this._length > this._max) trim(this) - } - , get : function () { return this._lengthCalculator } - , enumerable : true - }) - -Object.defineProperty(LRUCache.prototype, "length", - { get : function () { return this._length } - , enumerable : true - }) - - -Object.defineProperty(LRUCache.prototype, "itemCount", - { get : function () { return this._itemCount } - , enumerable : true - }) - -LRUCache.prototype.forEach = function (fn, thisp) { - thisp = thisp || this - var i = 0; - for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { - i++ - var hit = this._lruList[k] - if (this._maxAge && (Date.now() - hit.now > this._maxAge)) { - del(this, hit) - if (!this._allowStale) hit = undefined - } - if (hit) { - fn.call(thisp, hit.value, hit.key, this) - } - } -} - -LRUCache.prototype.keys = function () { - var keys = new Array(this._itemCount) - var i = 0 - for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { - var hit = this._lruList[k] - keys[i++] = hit.key - } - return keys -} - -LRUCache.prototype.values = function () { - var values = new Array(this._itemCount) - var i = 0 - for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { - var hit = this._lruList[k] - values[i++] = hit.value - } - return values -} - -LRUCache.prototype.reset = function () { - if (this._dispose && this._cache) { - for (var k in this._cache) { - this._dispose(k, this._cache[k].value) - } - } - - this._cache = Object.create(null) // hash of items by key - this._lruList = Object.create(null) // list of items in order of use recency - this._mru = 0 // most recently used - this._lru = 0 // least recently used - this._length = 0 // number of items in the list - this._itemCount = 0 -} - -// Provided for debugging/dev purposes only. No promises whatsoever that -// this API stays stable. -LRUCache.prototype.dump = function () { - return this._cache -} - -LRUCache.prototype.dumpLru = function () { - return this._lruList -} - -LRUCache.prototype.set = function (key, value) { - if (hOP(this._cache, key)) { - // dispose of the old one before overwriting - if (this._dispose) this._dispose(key, this._cache[key].value) - if (this._maxAge) this._cache[key].now = Date.now() - this._cache[key].value = value - this.get(key) - return true - } - - var len = this._lengthCalculator(value) - var age = this._maxAge ? Date.now() : 0 - var hit = new Entry(key, value, this._mru++, len, age) - - // oversized objects fall out of cache automatically. - if (hit.length > this._max) { - if (this._dispose) this._dispose(key, value) - return false - } - - this._length += hit.length - this._lruList[hit.lu] = this._cache[key] = hit - this._itemCount ++ - - if (this._length > this._max) trim(this) - return true -} - -LRUCache.prototype.has = function (key) { - if (!hOP(this._cache, key)) return false - var hit = this._cache[key] - if (this._maxAge && (Date.now() - hit.now > this._maxAge)) { - return false - } - return true -} - -LRUCache.prototype.get = function (key) { - return get(this, key, true) -} - -LRUCache.prototype.peek = function (key) { - return get(this, key, false) -} - -LRUCache.prototype.pop = function () { - var hit = this._lruList[this._lru] - del(this, hit) - return hit || null -} - -LRUCache.prototype.del = function (key) { - del(this, this._cache[key]) -} - -function get (self, key, doUse) { - var hit = self._cache[key] - if (hit) { - if (self._maxAge && (Date.now() - hit.now > self._maxAge)) { - del(self, hit) - if (!self._allowStale) hit = undefined - } else { - if (doUse) use(self, hit) - } - if (hit) hit = hit.value - } - return hit -} - -function use (self, hit) { - shiftLU(self, hit) - hit.lu = self._mru ++ - self._lruList[hit.lu] = hit -} - -function trim (self) { - while (self._lru < self._mru && self._length > self._max) - del(self, self._lruList[self._lru]) -} - -function shiftLU (self, hit) { - delete self._lruList[ hit.lu ] - while (self._lru < self._mru && !self._lruList[self._lru]) self._lru ++ -} - -function del (self, hit) { - if (hit) { - if (self._dispose) self._dispose(hit.key, hit.value) - self._length -= hit.length - self._itemCount -- - delete self._cache[ hit.key ] - shiftLU(self, hit) - } -} - -// classy, since V8 prefers predictable objects. -function Entry (key, value, lu, length, now) { - this.key = key - this.value = value - this.lu = lu - this.length = length - this.now = now -} - -})() diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json deleted file mode 100644 index 4472725d..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "lru-cache", - "description": "A cache object that deletes the least-recently-used items.", - "version": "2.5.0", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me" - }, - "scripts": { - "test": "tap test --gc" - }, - "main": "lib/lru-cache.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-lru-cache.git" - }, - "devDependencies": { - "tap": "", - "weak": "" - }, - "license": { - "type": "MIT", - "url": "http://github.com/isaacs/node-lru-cache/raw/master/LICENSE" - }, - "readme": "# lru cache\n\nA cache object that deletes the least-recently-used items.\n\n## Usage:\n\n```javascript\nvar LRU = require(\"lru-cache\")\n , options = { max: 500\n , length: function (n) { return n * 2 }\n , dispose: function (key, n) { n.close() }\n , maxAge: 1000 * 60 * 60 }\n , cache = LRU(options)\n , otherCache = LRU(50) // sets just the max size\n\ncache.set(\"key\", \"value\")\ncache.get(\"key\") // \"value\"\n\ncache.reset() // empty the cache\n```\n\nIf you put more stuff in it, then items will fall out.\n\nIf you try to put an oversized thing in it, then it'll fall out right\naway.\n\n## Options\n\n* `max` The maximum size of the cache, checked by applying the length\n function to all values in the cache. Not setting this is kind of\n silly, since that's the whole purpose of this lib, but it defaults\n to `Infinity`.\n* `maxAge` Maximum age in ms. Items are not pro-actively pruned out\n as they age, but if you try to get an item that is too old, it'll\n drop it and return undefined instead of giving it to you.\n* `length` Function that is used to calculate the length of stored\n items. If you're storing strings or buffers, then you probably want\n to do something like `function(n){return n.length}`. The default is\n `function(n){return 1}`, which is fine if you want to store `n`\n like-sized things.\n* `dispose` Function that is called on items when they are dropped\n from the cache. This can be handy if you want to close file\n descriptors or do other cleanup tasks when items are no longer\n accessible. Called with `key, value`. It's called *before*\n actually removing the item from the internal cache, so if you want\n to immediately put it back in, you'll have to do that in a\n `nextTick` or `setTimeout` callback or it won't do anything.\n* `stale` By default, if you set a `maxAge`, it'll only actually pull\n stale items out of the cache when you `get(key)`. (That is, it's\n not pre-emptively doing a `setTimeout` or anything.) If you set\n `stale:true`, it'll return the stale value before deleting it. If\n you don't set this, then it'll return `undefined` when you try to\n get a stale entry, as if it had already been deleted.\n\n## API\n\n* `set(key, value)`\n* `get(key) => value`\n\n Both of these will update the \"recently used\"-ness of the key.\n They do what you think.\n\n* `peek(key)`\n\n Returns the key value (or `undefined` if not found) without\n updating the \"recently used\"-ness of the key.\n\n (If you find yourself using this a lot, you *might* be using the\n wrong sort of data structure, but there are some use cases where\n it's handy.)\n\n* `del(key)`\n\n Deletes a key out of the cache.\n\n* `reset()`\n\n Clear the cache entirely, throwing away all values.\n\n* `has(key)`\n\n Check if a key is in the cache, without updating the recent-ness\n or deleting it for being stale.\n\n* `forEach(function(value,key,cache), [thisp])`\n\n Just like `Array.prototype.forEach`. Iterates over all the keys\n in the cache, in order of recent-ness. (Ie, more recently used\n items are iterated over first.)\n\n* `keys()`\n\n Return an array of the keys in the cache.\n\n* `values()`\n\n Return an array of the values in the cache.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/node-lru-cache/issues" - }, - "homepage": "https://github.com/isaacs/node-lru-cache", - "_id": "lru-cache@2.5.0", - "_from": "lru-cache@2" -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js deleted file mode 100644 index f72697c4..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js +++ /dev/null @@ -1,369 +0,0 @@ -var test = require("tap").test - , LRU = require("../") - -test("basic", function (t) { - var cache = new LRU({max: 10}) - cache.set("key", "value") - t.equal(cache.get("key"), "value") - t.equal(cache.get("nada"), undefined) - t.equal(cache.length, 1) - t.equal(cache.max, 10) - t.end() -}) - -test("least recently set", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.set("b", "B") - cache.set("c", "C") - t.equal(cache.get("c"), "C") - t.equal(cache.get("b"), "B") - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("lru recently gotten", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.set("b", "B") - cache.get("a") - cache.set("c", "C") - t.equal(cache.get("c"), "C") - t.equal(cache.get("b"), undefined) - t.equal(cache.get("a"), "A") - t.end() -}) - -test("del", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.del("a") - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("max", function (t) { - var cache = new LRU(3) - - // test changing the max, verify that the LRU items get dropped. - cache.max = 100 - for (var i = 0; i < 100; i ++) cache.set(i, i) - t.equal(cache.length, 100) - for (var i = 0; i < 100; i ++) { - t.equal(cache.get(i), i) - } - cache.max = 3 - t.equal(cache.length, 3) - for (var i = 0; i < 97; i ++) { - t.equal(cache.get(i), undefined) - } - for (var i = 98; i < 100; i ++) { - t.equal(cache.get(i), i) - } - - // now remove the max restriction, and try again. - cache.max = "hello" - for (var i = 0; i < 100; i ++) cache.set(i, i) - t.equal(cache.length, 100) - for (var i = 0; i < 100; i ++) { - t.equal(cache.get(i), i) - } - // should trigger an immediate resize - cache.max = 3 - t.equal(cache.length, 3) - for (var i = 0; i < 97; i ++) { - t.equal(cache.get(i), undefined) - } - for (var i = 98; i < 100; i ++) { - t.equal(cache.get(i), i) - } - t.end() -}) - -test("reset", function (t) { - var cache = new LRU(10) - cache.set("a", "A") - cache.set("b", "B") - cache.reset() - t.equal(cache.length, 0) - t.equal(cache.max, 10) - t.equal(cache.get("a"), undefined) - t.equal(cache.get("b"), undefined) - t.end() -}) - - -// Note: `.dump()` is a debugging tool only. No guarantees are made -// about the format/layout of the response. -test("dump", function (t) { - var cache = new LRU(10) - var d = cache.dump(); - t.equal(Object.keys(d).length, 0, "nothing in dump for empty cache") - cache.set("a", "A") - var d = cache.dump() // { a: { key: "a", value: "A", lu: 0 } } - t.ok(d.a) - t.equal(d.a.key, "a") - t.equal(d.a.value, "A") - t.equal(d.a.lu, 0) - - cache.set("b", "B") - cache.get("b") - d = cache.dump() - t.ok(d.b) - t.equal(d.b.key, "b") - t.equal(d.b.value, "B") - t.equal(d.b.lu, 2) - - t.end() -}) - - -test("basic with weighed length", function (t) { - var cache = new LRU({ - max: 100, - length: function (item) { return item.size } - }) - cache.set("key", {val: "value", size: 50}) - t.equal(cache.get("key").val, "value") - t.equal(cache.get("nada"), undefined) - t.equal(cache.lengthCalculator(cache.get("key")), 50) - t.equal(cache.length, 50) - t.equal(cache.max, 100) - t.end() -}) - - -test("weighed length item too large", function (t) { - var cache = new LRU({ - max: 10, - length: function (item) { return item.size } - }) - t.equal(cache.max, 10) - - // should fall out immediately - cache.set("key", {val: "value", size: 50}) - - t.equal(cache.length, 0) - t.equal(cache.get("key"), undefined) - t.end() -}) - -test("least recently set with weighed length", function (t) { - var cache = new LRU({ - max:8, - length: function (item) { return item.length } - }) - cache.set("a", "A") - cache.set("b", "BB") - cache.set("c", "CCC") - cache.set("d", "DDDD") - t.equal(cache.get("d"), "DDDD") - t.equal(cache.get("c"), "CCC") - t.equal(cache.get("b"), undefined) - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("lru recently gotten with weighed length", function (t) { - var cache = new LRU({ - max: 8, - length: function (item) { return item.length } - }) - cache.set("a", "A") - cache.set("b", "BB") - cache.set("c", "CCC") - cache.get("a") - cache.get("b") - cache.set("d", "DDDD") - t.equal(cache.get("c"), undefined) - t.equal(cache.get("d"), "DDDD") - t.equal(cache.get("b"), "BB") - t.equal(cache.get("a"), "A") - t.end() -}) - -test("set returns proper booleans", function(t) { - var cache = new LRU({ - max: 5, - length: function (item) { return item.length } - }) - - t.equal(cache.set("a", "A"), true) - - // should return false for max exceeded - t.equal(cache.set("b", "donuts"), false) - - t.equal(cache.set("b", "B"), true) - t.equal(cache.set("c", "CCCC"), true) - t.end() -}) - -test("drop the old items", function(t) { - var cache = new LRU({ - max: 5, - maxAge: 50 - }) - - cache.set("a", "A") - - setTimeout(function () { - cache.set("b", "b") - t.equal(cache.get("a"), "A") - }, 25) - - setTimeout(function () { - cache.set("c", "C") - // timed out - t.notOk(cache.get("a")) - }, 60) - - setTimeout(function () { - t.notOk(cache.get("b")) - t.equal(cache.get("c"), "C") - }, 90) - - setTimeout(function () { - t.notOk(cache.get("c")) - t.end() - }, 155) -}) - -test("disposal function", function(t) { - var disposed = false - var cache = new LRU({ - max: 1, - dispose: function (k, n) { - disposed = n - } - }) - - cache.set(1, 1) - cache.set(2, 2) - t.equal(disposed, 1) - cache.set(3, 3) - t.equal(disposed, 2) - cache.reset() - t.equal(disposed, 3) - t.end() -}) - -test("disposal function on too big of item", function(t) { - var disposed = false - var cache = new LRU({ - max: 1, - length: function (k) { - return k.length - }, - dispose: function (k, n) { - disposed = n - } - }) - var obj = [ 1, 2 ] - - t.equal(disposed, false) - cache.set("obj", obj) - t.equal(disposed, obj) - t.end() -}) - -test("has()", function(t) { - var cache = new LRU({ - max: 1, - maxAge: 10 - }) - - cache.set('foo', 'bar') - t.equal(cache.has('foo'), true) - cache.set('blu', 'baz') - t.equal(cache.has('foo'), false) - t.equal(cache.has('blu'), true) - setTimeout(function() { - t.equal(cache.has('blu'), false) - t.end() - }, 15) -}) - -test("stale", function(t) { - var cache = new LRU({ - maxAge: 10, - stale: true - }) - - cache.set('foo', 'bar') - t.equal(cache.get('foo'), 'bar') - t.equal(cache.has('foo'), true) - setTimeout(function() { - t.equal(cache.has('foo'), false) - t.equal(cache.get('foo'), 'bar') - t.equal(cache.get('foo'), undefined) - t.end() - }, 15) -}) - -test("lru update via set", function(t) { - var cache = LRU({ max: 2 }); - - cache.set('foo', 1); - cache.set('bar', 2); - cache.del('bar'); - cache.set('baz', 3); - cache.set('qux', 4); - - t.equal(cache.get('foo'), undefined) - t.equal(cache.get('bar'), undefined) - t.equal(cache.get('baz'), 3) - t.equal(cache.get('qux'), 4) - t.end() -}) - -test("least recently set w/ peek", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.set("b", "B") - t.equal(cache.peek("a"), "A") - cache.set("c", "C") - t.equal(cache.get("c"), "C") - t.equal(cache.get("b"), "B") - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("pop the least used item", function (t) { - var cache = new LRU(3) - , last - - cache.set("a", "A") - cache.set("b", "B") - cache.set("c", "C") - - t.equal(cache.length, 3) - t.equal(cache.max, 3) - - // Ensure we pop a, c, b - cache.get("b", "B") - - last = cache.pop() - t.equal(last.key, "a") - t.equal(last.value, "A") - t.equal(cache.length, 2) - t.equal(cache.max, 3) - - last = cache.pop() - t.equal(last.key, "c") - t.equal(last.value, "C") - t.equal(cache.length, 1) - t.equal(cache.max, 3) - - last = cache.pop() - t.equal(last.key, "b") - t.equal(last.value, "B") - t.equal(cache.length, 0) - t.equal(cache.max, 3) - - last = cache.pop() - t.equal(last, null) - t.equal(cache.length, 0) - t.equal(cache.max, 3) - - t.end() -}) diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js deleted file mode 100644 index eefb80d9..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js +++ /dev/null @@ -1,52 +0,0 @@ -var test = require('tap').test -var LRU = require('../') - -test('forEach', function (t) { - var l = new LRU(5) - for (var i = 0; i < 10; i ++) { - l.set(i.toString(), i.toString(2)) - } - - var i = 9 - l.forEach(function (val, key, cache) { - t.equal(cache, l) - t.equal(key, i.toString()) - t.equal(val, i.toString(2)) - i -= 1 - }) - - // get in order of most recently used - l.get(6) - l.get(8) - - var order = [ 8, 6, 9, 7, 5 ] - var i = 0 - - l.forEach(function (val, key, cache) { - var j = order[i ++] - t.equal(cache, l) - t.equal(key, j.toString()) - t.equal(val, j.toString(2)) - }) - - t.end() -}) - -test('keys() and values()', function (t) { - var l = new LRU(5) - for (var i = 0; i < 10; i ++) { - l.set(i.toString(), i.toString(2)) - } - - t.similar(l.keys(), ['9', '8', '7', '6', '5']) - t.similar(l.values(), ['1001', '1000', '111', '110', '101']) - - // get in order of most recently used - l.get(6) - l.get(8) - - t.similar(l.keys(), ['8', '6', '9', '7', '5']) - t.similar(l.values(), ['1000', '110', '1001', '111', '101']) - - t.end() -}) diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js deleted file mode 100644 index 7af45b02..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env node --expose_gc - -var weak = require('weak'); -var test = require('tap').test -var LRU = require('../') -var l = new LRU({ max: 10 }) -var refs = 0 -function X() { - refs ++ - weak(this, deref) -} - -function deref() { - refs -- -} - -test('no leaks', function (t) { - // fill up the cache - for (var i = 0; i < 100; i++) { - l.set(i, new X); - // throw some gets in there, too. - if (i % 2 === 0) - l.get(i / 2) - } - - gc() - - var start = process.memoryUsage() - - // capture the memory - var startRefs = refs - - // do it again, but more - for (var i = 0; i < 10000; i++) { - l.set(i, new X); - // throw some gets in there, too. - if (i % 2 === 0) - l.get(i / 2) - } - - gc() - - var end = process.memoryUsage() - t.equal(refs, startRefs, 'no leaky refs') - - console.error('start: %j\n' + - 'end: %j', start, end); - t.pass(); - t.end(); -}) diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md deleted file mode 100644 index 7e365129..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# sigmund - -Quick and dirty signatures for Objects. - -This is like a much faster `deepEquals` comparison, which returns a -string key suitable for caches and the like. - -## Usage - -```javascript -function doSomething (someObj) { - var key = sigmund(someObj, maxDepth) // max depth defaults to 10 - var cached = cache.get(key) - if (cached) return cached) - - var result = expensiveCalculation(someObj) - cache.set(key, result) - return result -} -``` - -The resulting key will be as unique and reproducible as calling -`JSON.stringify` or `util.inspect` on the object, but is much faster. -In order to achieve this speed, some differences are glossed over. -For example, the object `{0:'foo'}` will be treated identically to the -array `['foo']`. - -Also, just as there is no way to summon the soul from the scribblings -of a cocain-addled psychoanalyst, there is no way to revive the object -from the signature string that sigmund gives you. In fact, it's -barely even readable. - -As with `sys.inspect` and `JSON.stringify`, larger objects will -produce larger signature strings. - -Because sigmund is a bit less strict than the more thorough -alternatives, the strings will be shorter, and also there is a -slightly higher chance for collisions. For example, these objects -have the same signature: - - var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]} - var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']} - -Like a good Freudian, sigmund is most effective when you already have -some understanding of what you're looking for. It can help you help -yourself, but you must be willing to do some work as well. - -Cycles are handled, and cyclical objects are silently omitted (though -the key is included in the signature output.) - -The second argument is the maximum depth, which defaults to 10, -because that is the maximum object traversal depth covered by most -insurance carriers. diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js deleted file mode 100644 index 5acfd6d9..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js +++ /dev/null @@ -1,283 +0,0 @@ -// different ways to id objects -// use a req/res pair, since it's crazy deep and cyclical - -// sparseFE10 and sigmund are usually pretty close, which is to be expected, -// since they are essentially the same algorithm, except that sigmund handles -// regular expression objects properly. - - -var http = require('http') -var util = require('util') -var sigmund = require('./sigmund.js') -var sreq, sres, creq, cres, test - -http.createServer(function (q, s) { - sreq = q - sres = s - sres.end('ok') - this.close(function () { setTimeout(function () { - start() - }, 200) }) -}).listen(1337, function () { - creq = http.get({ port: 1337 }) - creq.on('response', function (s) { cres = s }) -}) - -function start () { - test = [sreq, sres, creq, cres] - // test = sreq - // sreq.sres = sres - // sreq.creq = creq - // sreq.cres = cres - - for (var i in exports.compare) { - console.log(i) - var hash = exports.compare[i]() - console.log(hash) - console.log(hash.length) - console.log('') - } - - require('bench').runMain() -} - -function customWs (obj, md, d) { - d = d || 0 - var to = typeof obj - if (to === 'undefined' || to === 'function' || to === null) return '' - if (d > md || !obj || to !== 'object') return ('' + obj).replace(/[\n ]+/g, '') - - if (Array.isArray(obj)) { - return obj.map(function (i, _, __) { - return customWs(i, md, d + 1) - }).reduce(function (a, b) { return a + b }, '') - } - - var keys = Object.keys(obj) - return keys.map(function (k, _, __) { - return k + ':' + customWs(obj[k], md, d + 1) - }).reduce(function (a, b) { return a + b }, '') -} - -function custom (obj, md, d) { - d = d || 0 - var to = typeof obj - if (to === 'undefined' || to === 'function' || to === null) return '' - if (d > md || !obj || to !== 'object') return '' + obj - - if (Array.isArray(obj)) { - return obj.map(function (i, _, __) { - return custom(i, md, d + 1) - }).reduce(function (a, b) { return a + b }, '') - } - - var keys = Object.keys(obj) - return keys.map(function (k, _, __) { - return k + ':' + custom(obj[k], md, d + 1) - }).reduce(function (a, b) { return a + b }, '') -} - -function sparseFE2 (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - Object.keys(v).forEach(function (k, _, __) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') return - var to = typeof v[k] - if (to === 'function' || to === 'undefined') return - soFar += k + ':' - ch(v[k], depth + 1) - }) - soFar += '}' - } - ch(obj, 0) - return soFar -} - -function sparseFE (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - Object.keys(v).forEach(function (k, _, __) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') return - var to = typeof v[k] - if (to === 'function' || to === 'undefined') return - soFar += k - ch(v[k], depth + 1) - }) - } - ch(obj, 0) - return soFar -} - -function sparse (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - for (var k in v) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') continue - var to = typeof v[k] - if (to === 'function' || to === 'undefined') continue - soFar += k - ch(v[k], depth + 1) - } - } - ch(obj, 0) - return soFar -} - -function noCommas (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - for (var k in v) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') continue - var to = typeof v[k] - if (to === 'function' || to === 'undefined') continue - soFar += k + ':' - ch(v[k], depth + 1) - } - soFar += '}' - } - ch(obj, 0) - return soFar -} - - -function flatten (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - for (var k in v) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') continue - var to = typeof v[k] - if (to === 'function' || to === 'undefined') continue - soFar += k + ':' - ch(v[k], depth + 1) - soFar += ',' - } - soFar += '}' - } - ch(obj, 0) - return soFar -} - -exports.compare = -{ - // 'custom 2': function () { - // return custom(test, 2, 0) - // }, - // 'customWs 2': function () { - // return customWs(test, 2, 0) - // }, - 'JSON.stringify (guarded)': function () { - var seen = [] - return JSON.stringify(test, function (k, v) { - if (typeof v !== 'object' || !v) return v - if (seen.indexOf(v) !== -1) return undefined - seen.push(v) - return v - }) - }, - - 'flatten 10': function () { - return flatten(test, 10) - }, - - // 'flattenFE 10': function () { - // return flattenFE(test, 10) - // }, - - 'noCommas 10': function () { - return noCommas(test, 10) - }, - - 'sparse 10': function () { - return sparse(test, 10) - }, - - 'sparseFE 10': function () { - return sparseFE(test, 10) - }, - - 'sparseFE2 10': function () { - return sparseFE2(test, 10) - }, - - sigmund: function() { - return sigmund(test, 10) - }, - - - // 'util.inspect 1': function () { - // return util.inspect(test, false, 1, false) - // }, - // 'util.inspect undefined': function () { - // util.inspect(test) - // }, - // 'util.inspect 2': function () { - // util.inspect(test, false, 2, false) - // }, - // 'util.inspect 3': function () { - // util.inspect(test, false, 3, false) - // }, - // 'util.inspect 4': function () { - // util.inspect(test, false, 4, false) - // }, - // 'util.inspect Infinity': function () { - // util.inspect(test, false, Infinity, false) - // } -} - -/** results -**/ diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json deleted file mode 100644 index cb7e2bd4..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "sigmund", - "version": "1.0.0", - "description": "Quick and dirty signatures for Objects.", - "main": "sigmund.js", - "directories": { - "test": "test" - }, - "dependencies": {}, - "devDependencies": { - "tap": "~0.3.0" - }, - "scripts": { - "test": "tap test/*.js", - "bench": "node bench.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/sigmund" - }, - "keywords": [ - "object", - "signature", - "key", - "data", - "psychoanalysis" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "BSD", - "readme": "# sigmund\n\nQuick and dirty signatures for Objects.\n\nThis is like a much faster `deepEquals` comparison, which returns a\nstring key suitable for caches and the like.\n\n## Usage\n\n```javascript\nfunction doSomething (someObj) {\n var key = sigmund(someObj, maxDepth) // max depth defaults to 10\n var cached = cache.get(key)\n if (cached) return cached)\n\n var result = expensiveCalculation(someObj)\n cache.set(key, result)\n return result\n}\n```\n\nThe resulting key will be as unique and reproducible as calling\n`JSON.stringify` or `util.inspect` on the object, but is much faster.\nIn order to achieve this speed, some differences are glossed over.\nFor example, the object `{0:'foo'}` will be treated identically to the\narray `['foo']`.\n\nAlso, just as there is no way to summon the soul from the scribblings\nof a cocain-addled psychoanalyst, there is no way to revive the object\nfrom the signature string that sigmund gives you. In fact, it's\nbarely even readable.\n\nAs with `sys.inspect` and `JSON.stringify`, larger objects will\nproduce larger signature strings.\n\nBecause sigmund is a bit less strict than the more thorough\nalternatives, the strings will be shorter, and also there is a\nslightly higher chance for collisions. For example, these objects\nhave the same signature:\n\n var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}\n var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}\n\nLike a good Freudian, sigmund is most effective when you already have\nsome understanding of what you're looking for. It can help you help\nyourself, but you must be willing to do some work as well.\n\nCycles are handled, and cyclical objects are silently omitted (though\nthe key is included in the signature output.)\n\nThe second argument is the maximum depth, which defaults to 10,\nbecause that is the maximum object traversal depth covered by most\ninsurance carriers.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/sigmund/issues" - }, - "homepage": "https://github.com/isaacs/sigmund", - "_id": "sigmund@1.0.0", - "_from": "sigmund@~1.0.0" -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js deleted file mode 100644 index 82c7ab8c..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js +++ /dev/null @@ -1,39 +0,0 @@ -module.exports = sigmund -function sigmund (subject, maxSessions) { - maxSessions = maxSessions || 10; - var notes = []; - var analysis = ''; - var RE = RegExp; - - function psychoAnalyze (subject, session) { - if (session > maxSessions) return; - - if (typeof subject === 'function' || - typeof subject === 'undefined') { - return; - } - - if (typeof subject !== 'object' || !subject || - (subject instanceof RE)) { - analysis += subject; - return; - } - - if (notes.indexOf(subject) !== -1 || session === maxSessions) return; - - notes.push(subject); - analysis += '{'; - Object.keys(subject).forEach(function (issue, _, __) { - // pseudo-private values. skip those. - if (issue.charAt(0) === '_') return; - var to = typeof subject[issue]; - if (to === 'function' || to === 'undefined') return; - analysis += issue; - psychoAnalyze(subject[issue], session + 1); - }); - } - psychoAnalyze(subject, 0); - return analysis; -} - -// vim: set softtabstop=4 shiftwidth=4: diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js deleted file mode 100644 index 50c53a13..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js +++ /dev/null @@ -1,24 +0,0 @@ -var test = require('tap').test -var sigmund = require('../sigmund.js') - - -// occasionally there are duplicates -// that's an acceptable edge-case. JSON.stringify and util.inspect -// have some collision potential as well, though less, and collision -// detection is expensive. -var hash = '{abc/def/g{0h1i2{jkl' -var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]} -var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']} - -var obj3 = JSON.parse(JSON.stringify(obj1)) -obj3.c = /def/ -obj3.g[2].cycle = obj3 -var cycleHash = '{abc/def/g{0h1i2{jklcycle' - -test('basic', function (t) { - t.equal(sigmund(obj1), hash) - t.equal(sigmund(obj2), hash) - t.equal(sigmund(obj3), cycleHash) - t.end() -}) - diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/package.json b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/package.json deleted file mode 100644 index f8f545aa..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "name": "minimatch", - "description": "a glob matcher in javascript", - "version": "0.2.14", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/minimatch.git" - }, - "main": "minimatch.js", - "scripts": { - "test": "tap test/*.js" - }, - "engines": { - "node": "*" - }, - "dependencies": { - "lru-cache": "2", - "sigmund": "~1.0.0" - }, - "devDependencies": { - "tap": "" - }, - "license": { - "type": "MIT", - "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE" - }, - "readme": "# minimatch\n\nA minimal matching utility.\n\n[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\nminimatch(\"bar.foo\", \"*.+(bar|foo)\", { debug: true }) // true, and noisy!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/minimatch/issues" - }, - "homepage": "https://github.com/isaacs/minimatch", - "_id": "minimatch@0.2.14", - "_from": "minimatch@~0.2.11" -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/basic.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/basic.js deleted file mode 100644 index ae7ac73c..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/basic.js +++ /dev/null @@ -1,399 +0,0 @@ -// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test -// -// TODO: Some of these tests do very bad things with backslashes, and will -// most likely fail badly on windows. They should probably be skipped. - -var tap = require("tap") - , globalBefore = Object.keys(global) - , mm = require("../") - , files = [ "a", "b", "c", "d", "abc" - , "abd", "abe", "bb", "bcd" - , "ca", "cb", "dd", "de" - , "bdir/", "bdir/cfile"] - , next = files.concat([ "a-b", "aXb" - , ".x", ".y" ]) - - -var patterns = - [ "http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test" - , ["a*", ["a", "abc", "abd", "abe"]] - , ["X*", ["X*"], {nonull: true}] - - // allow null glob expansion - , ["X*", []] - - // isaacs: Slightly different than bash/sh/ksh - // \\* is not un-escaped to literal "*" in a failed match, - // but it does make it get treated as a literal star - , ["\\*", ["\\*"], {nonull: true}] - , ["\\**", ["\\**"], {nonull: true}] - , ["\\*\\*", ["\\*\\*"], {nonull: true}] - - , ["b*/", ["bdir/"]] - , ["c*", ["c", "ca", "cb"]] - , ["**", files] - - , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}] - , ["s/\\..*//", ["s/\\..*//"], {nonull: true}] - - , "legendary larry crashes bashes" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}] - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}] - - , "character classes" - , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]] - , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd", - "bdir/", "ca", "cb", "dd", "de"]] - , ["a*[^c]", ["abd", "abe"]] - , function () { files.push("a-b", "aXb") } - , ["a[X-]b", ["a-b", "aXb"]] - , function () { files.push(".x", ".y") } - , ["[^a-c]*", ["d", "dd", "de"]] - , function () { files.push("a*b/", "a*b/ooo") } - , ["a\\*b/*", ["a*b/ooo"]] - , ["a\\*?/*", ["a*b/ooo"]] - , ["*\\\\!*", [], {null: true}, ["echo !7"]] - , ["*\\!*", ["echo !7"], null, ["echo !7"]] - , ["*.\\*", ["r.*"], null, ["r.*"]] - , ["a[b]c", ["abc"]] - , ["a[\\b]c", ["abc"]] - , ["a?c", ["abc"]] - , ["a\\*c", [], {null: true}, ["abc"]] - , ["", [""], { null: true }, [""]] - - , "http://www.opensource.apple.com/source/bash/bash-23/" + - "bash/tests/glob-test" - , function () { files.push("man/", "man/man1/", "man/man1/bash.1") } - , ["*/man*/bash.*", ["man/man1/bash.1"]] - , ["man/man1/bash.1", ["man/man1/bash.1"]] - , ["a***c", ["abc"], null, ["abc"]] - , ["a*****?c", ["abc"], null, ["abc"]] - , ["?*****??", ["abc"], null, ["abc"]] - , ["*****??", ["abc"], null, ["abc"]] - , ["?*****?c", ["abc"], null, ["abc"]] - , ["?***?****c", ["abc"], null, ["abc"]] - , ["?***?****?", ["abc"], null, ["abc"]] - , ["?***?****", ["abc"], null, ["abc"]] - , ["*******c", ["abc"], null, ["abc"]] - , ["*******?", ["abc"], null, ["abc"]] - , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["[-abc]", ["-"], null, ["-"]] - , ["[abc-]", ["-"], null, ["-"]] - , ["\\", ["\\"], null, ["\\"]] - , ["[\\\\]", ["\\"], null, ["\\"]] - , ["[[]", ["["], null, ["["]] - , ["[", ["["], null, ["["]] - , ["[*", ["[abc"], null, ["[abc"]] - , "a right bracket shall lose its special meaning and\n" + - "represent itself in a bracket expression if it occurs\n" + - "first in the list. -- POSIX.2 2.8.3.2" - , ["[]]", ["]"], null, ["]"]] - , ["[]-]", ["]"], null, ["]"]] - , ["[a-\z]", ["p"], null, ["p"]] - , ["??**********?****?", [], { null: true }, ["abc"]] - , ["??**********?****c", [], { null: true }, ["abc"]] - , ["?************c****?****", [], { null: true }, ["abc"]] - , ["*c*?**", [], { null: true }, ["abc"]] - , ["a*****c*?**", [], { null: true }, ["abc"]] - , ["a********???*******", [], { null: true }, ["abc"]] - , ["[]", [], { null: true }, ["a"]] - , ["[abc", [], { null: true }, ["["]] - - , "nocase tests" - , ["XYZ", ["xYz"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["ab*", ["ABC"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - - // [ pattern, [matches], MM opts, files, TAP opts] - , "onestar/twostar" - , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]] - , ["{/?,*}", ["/a", "bb"], {null: true} - , ["/a", "/b/b", "/a/b/c", "bb"]] - - , "dots should not match unless requested" - , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]] - - // .. and . can only match patterns starting with ., - // even when options.dot is set. - , function () { - files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"] - } - , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}] - , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}] - , ["a/*/b", ["a/c/b"], {dot:false}] - , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}] - - - // this also tests that changing the options needs - // to change the cache key, even if the pattern is - // the same! - , ["**", ["a/b","a/.d",".a/.d"], { dot: true } - , [ ".a/.d", "a/.d", "a/b"]] - - , "paren sets cannot contain slashes" - , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]] - - // brace sets trump all else. - // - // invalid glob pattern. fails on bash4 and bsdglob. - // however, in this implementation, it's easier just - // to do the intuitive thing, and let brace-expansion - // actually come before parsing any extglob patterns, - // like the documentation seems to say. - // - // XXX: if anyone complains about this, either fix it - // or tell them to grow up and stop complaining. - // - // bash/bsdglob says this: - // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]] - // but we do this instead: - , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]] - - // test partial parsing in the presence of comment/negation chars - , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]] - , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]] - - // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped. - , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g" - , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"] - , {} - , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]] - - - // crazy nested {,,} and *(||) tests. - , function () { - files = [ "a", "b", "c", "d" - , "ab", "ac", "ad" - , "bc", "cb" - , "bc,d", "c,db", "c,d" - , "d)", "(b|c", "*(b|c" - , "b|c", "b|cc", "cb|c" - , "x(a|b|c)", "x(a|c)" - , "(a|b|c)", "(a|c)"] - } - , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]] - , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]] - // a - // *(b|c) - // *(b|d) - , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]] - , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]] - - - // test various flag settings. - , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"] - , { noext: true } ] - , ["a?b", ["x/y/acb", "acb/"], {matchBase: true} - , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ] - , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]] - - - // begin channelling Boole and deMorgan... - , "negation tests" - , function () { - files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"] - } - - // anything that is NOT a* matches. - , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]] - - // anything that IS !a* matches. - , ["!a*", ["!ab", "!abc"], {nonegate: true}] - - // anything that IS a* matches - , ["!!a*", ["a!b"]] - - // anything that is NOT !a* matches - , ["!\\!a*", ["a!b", "d", "e", "\\!a"]] - - // negation nestled within a pattern - , function () { - files = [ "foo.js" - , "foo.bar" - // can't match this one without negative lookbehind. - , "foo.js.js" - , "blar.js" - , "foo." - , "boo.js.boo" ] - } - , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ] - - // https://github.com/isaacs/minimatch/issues/5 - , function () { - files = [ 'a/b/.x/c' - , 'a/b/.x/c/d' - , 'a/b/.x/c/d/e' - , 'a/b/.x' - , 'a/b/.x/' - , 'a/.x/b' - , '.x' - , '.x/' - , '.x/a' - , '.x/a/b' - , 'a/.x/b/.x/c' - , '.x/.x' ] - } - , ["**/.x/**", [ '.x/' - , '.x/a' - , '.x/a/b' - , 'a/.x/b' - , 'a/b/.x/' - , 'a/b/.x/c' - , 'a/b/.x/c/d' - , 'a/b/.x/c/d/e' ] ] - - ] - -var regexps = - [ '/^(?:(?=.)a[^/]*?)$/', - '/^(?:(?=.)X[^/]*?)$/', - '/^(?:(?=.)X[^/]*?)$/', - '/^(?:\\*)$/', - '/^(?:(?=.)\\*[^/]*?)$/', - '/^(?:\\*\\*)$/', - '/^(?:(?=.)b[^/]*?\\/)$/', - '/^(?:(?=.)c[^/]*?)$/', - '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/', - '/^(?:\\.\\.\\/(?!\\.)(?=.)[^/]*?\\/)$/', - '/^(?:s\\/(?=.)\\.\\.[^/]*?\\/)$/', - '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/1\\/)$/', - '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/\u0001\\/)$/', - '/^(?:(?!\\.)(?=.)[a-c]b[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[a-y][^/]*?[^c])$/', - '/^(?:(?=.)a[^/]*?[^c])$/', - '/^(?:(?=.)a[X-]b)$/', - '/^(?:(?!\\.)(?=.)[^a-c][^/]*?)$/', - '/^(?:a\\*b\\/(?!\\.)(?=.)[^/]*?)$/', - '/^(?:(?=.)a\\*[^/]\\/(?!\\.)(?=.)[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\\\\\![^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\![^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\.\\*)$/', - '/^(?:(?=.)a[b]c)$/', - '/^(?:(?=.)a[b]c)$/', - '/^(?:(?=.)a[^/]c)$/', - '/^(?:a\\*c)$/', - 'false', - '/^(?:(?!\\.)(?=.)[^/]*?\\/(?=.)man[^/]*?\\/(?=.)bash\\.[^/]*?)$/', - '/^(?:man\\/man1\\/bash\\.1)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?c)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/', - '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c)$/', - '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/])$/', - '/^(?:(?=.)a[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k[^/]*?[^/]*?[^/]*?)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?k)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?k[^/]*?[^/]*?)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[-abc])$/', - '/^(?:(?!\\.)(?=.)[abc-])$/', - '/^(?:\\\\)$/', - '/^(?:(?!\\.)(?=.)[\\\\])$/', - '/^(?:(?!\\.)(?=.)[\\[])$/', - '/^(?:\\[)$/', - '/^(?:(?=.)\\[(?!\\.)(?=.)[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[\\]])$/', - '/^(?:(?!\\.)(?=.)[\\]-])$/', - '/^(?:(?!\\.)(?=.)[a-z])$/', - '/^(?:(?!\\.)(?=.)[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/', - '/^(?:(?!\\.)(?=.)[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?c[^/]*?[^/][^/]*?[^/]*?)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/][^/]*?[^/]*?)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?)$/', - '/^(?:\\[\\])$/', - '/^(?:\\[abc)$/', - '/^(?:(?=.)XYZ)$/i', - '/^(?:(?=.)ab[^/]*?)$/i', - '/^(?:(?!\\.)(?=.)[ia][^/][ck])$/i', - '/^(?:\\/(?!\\.)(?=.)[^/]*?|(?!\\.)(?=.)[^/]*?)$/', - '/^(?:\\/(?!\\.)(?=.)[^/]|(?!\\.)(?=.)[^/]*?)$/', - '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/', - '/^(?:a\\/(?!(?:^|\\/)\\.{1,2}(?:$|\\/))(?=.)[^/]*?\\/b)$/', - '/^(?:a\\/(?=.)\\.[^/]*?\\/b)$/', - '/^(?:a\\/(?!\\.)(?=.)[^/]*?\\/b)$/', - '/^(?:a\\/(?=.)\\.[^/]*?\\/b)$/', - '/^(?:(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\/b\\))$/', - '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/', - '/^(?:(?=.)\\[(?=.)\\!a[^/]*?)$/', - '/^(?:(?=.)\\[(?=.)#a[^/]*?)$/', - '/^(?:(?=.)\\+\\(a\\|[^/]*?\\|c\\\\\\\\\\|d\\\\\\\\\\|e\\\\\\\\\\\\\\\\\\|f\\\\\\\\\\\\\\\\\\|g)$/', - '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/', - '/^(?:a|(?!\\.)(?=.)[^/]*?\\(b\\|c|d\\))$/', - '/^(?:a|(?!\\.)(?=.)(?:b|c)*|(?!\\.)(?=.)(?:b|d)*)$/', - '/^(?:(?!\\.)(?=.)(?:a|b|c)*|(?!\\.)(?=.)(?:a|c)*)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\|b\\|c\\)|(?!\\.)(?=.)[^/]*?\\(a\\|c\\))$/', - '/^(?:(?=.)a[^/]b)$/', - '/^(?:(?=.)#[^/]*?)$/', - '/^(?!^(?:(?=.)a[^/]*?)$).*$/', - '/^(?:(?=.)\\!a[^/]*?)$/', - '/^(?:(?=.)a[^/]*?)$/', - '/^(?!^(?:(?=.)\\!a[^/]*?)$).*$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\.(?:(?!js)[^/]*?))$/', - '/^(?:(?:(?!(?:\\/|^)\\.).)*?\\/\\.x\\/(?:(?!(?:\\/|^)\\.).)*?)$/' ] -var re = 0; - -tap.test("basic tests", function (t) { - var start = Date.now() - - // [ pattern, [matches], MM opts, files, TAP opts] - patterns.forEach(function (c) { - if (typeof c === "function") return c() - if (typeof c === "string") return t.comment(c) - - var pattern = c[0] - , expect = c[1].sort(alpha) - , options = c[2] || {} - , f = c[3] || files - , tapOpts = c[4] || {} - - // options.debug = true - var m = new mm.Minimatch(pattern, options) - var r = m.makeRe() - var expectRe = regexps[re++] - tapOpts.re = String(r) || JSON.stringify(r) - tapOpts.files = JSON.stringify(f) - tapOpts.pattern = pattern - tapOpts.set = m.set - tapOpts.negated = m.negate - - var actual = mm.match(f, pattern, options) - actual.sort(alpha) - - t.equivalent( actual, expect - , JSON.stringify(pattern) + " " + JSON.stringify(expect) - , tapOpts ) - - t.equal(tapOpts.re, expectRe, tapOpts) - }) - - t.comment("time=" + (Date.now() - start) + "ms") - t.end() -}) - -tap.test("global leak test", function (t) { - var globalAfter = Object.keys(global) - t.equivalent(globalAfter, globalBefore, "no new globals, please") - t.end() -}) - -function alpha (a, b) { - return a > b ? 1 : -1 -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/brace-expand.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/brace-expand.js deleted file mode 100644 index 7ee278a2..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/brace-expand.js +++ /dev/null @@ -1,33 +0,0 @@ -var tap = require("tap") - , minimatch = require("../") - -tap.test("brace expansion", function (t) { - // [ pattern, [expanded] ] - ; [ [ "a{b,c{d,e},{f,g}h}x{y,z}" - , [ "abxy" - , "abxz" - , "acdxy" - , "acdxz" - , "acexy" - , "acexz" - , "afhxy" - , "afhxz" - , "aghxy" - , "aghxz" ] ] - , [ "a{1..5}b" - , [ "a1b" - , "a2b" - , "a3b" - , "a4b" - , "a5b" ] ] - , [ "a{b}c", ["a{b}c"] ] - ].forEach(function (tc) { - var p = tc[0] - , expect = tc[1] - t.equivalent(minimatch.braceExpand(p), expect, p) - }) - console.error("ending") - t.end() -}) - - diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/caching.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/caching.js deleted file mode 100644 index 0fec4b0f..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/caching.js +++ /dev/null @@ -1,14 +0,0 @@ -var Minimatch = require("../minimatch.js").Minimatch -var tap = require("tap") -tap.test("cache test", function (t) { - var mm1 = new Minimatch("a?b") - var mm2 = new Minimatch("a?b") - t.equal(mm1, mm2, "should get the same object") - // the lru should drop it after 100 entries - for (var i = 0; i < 100; i ++) { - new Minimatch("a"+i) - } - mm2 = new Minimatch("a?b") - t.notEqual(mm1, mm2, "cache should have dropped") - t.end() -}) diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/defaults.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/defaults.js deleted file mode 100644 index 25f1f601..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/defaults.js +++ /dev/null @@ -1,274 +0,0 @@ -// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test -// -// TODO: Some of these tests do very bad things with backslashes, and will -// most likely fail badly on windows. They should probably be skipped. - -var tap = require("tap") - , globalBefore = Object.keys(global) - , mm = require("../") - , files = [ "a", "b", "c", "d", "abc" - , "abd", "abe", "bb", "bcd" - , "ca", "cb", "dd", "de" - , "bdir/", "bdir/cfile"] - , next = files.concat([ "a-b", "aXb" - , ".x", ".y" ]) - -tap.test("basic tests", function (t) { - var start = Date.now() - - // [ pattern, [matches], MM opts, files, TAP opts] - ; [ "http://www.bashcookbook.com/bashinfo" + - "/source/bash-1.14.7/tests/glob-test" - , ["a*", ["a", "abc", "abd", "abe"]] - , ["X*", ["X*"], {nonull: true}] - - // allow null glob expansion - , ["X*", []] - - // isaacs: Slightly different than bash/sh/ksh - // \\* is not un-escaped to literal "*" in a failed match, - // but it does make it get treated as a literal star - , ["\\*", ["\\*"], {nonull: true}] - , ["\\**", ["\\**"], {nonull: true}] - , ["\\*\\*", ["\\*\\*"], {nonull: true}] - - , ["b*/", ["bdir/"]] - , ["c*", ["c", "ca", "cb"]] - , ["**", files] - - , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}] - , ["s/\\..*//", ["s/\\..*//"], {nonull: true}] - - , "legendary larry crashes bashes" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}] - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}] - - , "character classes" - , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]] - , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd", - "bdir/", "ca", "cb", "dd", "de"]] - , ["a*[^c]", ["abd", "abe"]] - , function () { files.push("a-b", "aXb") } - , ["a[X-]b", ["a-b", "aXb"]] - , function () { files.push(".x", ".y") } - , ["[^a-c]*", ["d", "dd", "de"]] - , function () { files.push("a*b/", "a*b/ooo") } - , ["a\\*b/*", ["a*b/ooo"]] - , ["a\\*?/*", ["a*b/ooo"]] - , ["*\\\\!*", [], {null: true}, ["echo !7"]] - , ["*\\!*", ["echo !7"], null, ["echo !7"]] - , ["*.\\*", ["r.*"], null, ["r.*"]] - , ["a[b]c", ["abc"]] - , ["a[\\b]c", ["abc"]] - , ["a?c", ["abc"]] - , ["a\\*c", [], {null: true}, ["abc"]] - , ["", [""], { null: true }, [""]] - - , "http://www.opensource.apple.com/source/bash/bash-23/" + - "bash/tests/glob-test" - , function () { files.push("man/", "man/man1/", "man/man1/bash.1") } - , ["*/man*/bash.*", ["man/man1/bash.1"]] - , ["man/man1/bash.1", ["man/man1/bash.1"]] - , ["a***c", ["abc"], null, ["abc"]] - , ["a*****?c", ["abc"], null, ["abc"]] - , ["?*****??", ["abc"], null, ["abc"]] - , ["*****??", ["abc"], null, ["abc"]] - , ["?*****?c", ["abc"], null, ["abc"]] - , ["?***?****c", ["abc"], null, ["abc"]] - , ["?***?****?", ["abc"], null, ["abc"]] - , ["?***?****", ["abc"], null, ["abc"]] - , ["*******c", ["abc"], null, ["abc"]] - , ["*******?", ["abc"], null, ["abc"]] - , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["[-abc]", ["-"], null, ["-"]] - , ["[abc-]", ["-"], null, ["-"]] - , ["\\", ["\\"], null, ["\\"]] - , ["[\\\\]", ["\\"], null, ["\\"]] - , ["[[]", ["["], null, ["["]] - , ["[", ["["], null, ["["]] - , ["[*", ["[abc"], null, ["[abc"]] - , "a right bracket shall lose its special meaning and\n" + - "represent itself in a bracket expression if it occurs\n" + - "first in the list. -- POSIX.2 2.8.3.2" - , ["[]]", ["]"], null, ["]"]] - , ["[]-]", ["]"], null, ["]"]] - , ["[a-\z]", ["p"], null, ["p"]] - , ["??**********?****?", [], { null: true }, ["abc"]] - , ["??**********?****c", [], { null: true }, ["abc"]] - , ["?************c****?****", [], { null: true }, ["abc"]] - , ["*c*?**", [], { null: true }, ["abc"]] - , ["a*****c*?**", [], { null: true }, ["abc"]] - , ["a********???*******", [], { null: true }, ["abc"]] - , ["[]", [], { null: true }, ["a"]] - , ["[abc", [], { null: true }, ["["]] - - , "nocase tests" - , ["XYZ", ["xYz"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["ab*", ["ABC"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - - // [ pattern, [matches], MM opts, files, TAP opts] - , "onestar/twostar" - , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]] - , ["{/?,*}", ["/a", "bb"], {null: true} - , ["/a", "/b/b", "/a/b/c", "bb"]] - - , "dots should not match unless requested" - , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]] - - // .. and . can only match patterns starting with ., - // even when options.dot is set. - , function () { - files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"] - } - , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}] - , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}] - , ["a/*/b", ["a/c/b"], {dot:false}] - , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}] - - - // this also tests that changing the options needs - // to change the cache key, even if the pattern is - // the same! - , ["**", ["a/b","a/.d",".a/.d"], { dot: true } - , [ ".a/.d", "a/.d", "a/b"]] - - , "paren sets cannot contain slashes" - , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]] - - // brace sets trump all else. - // - // invalid glob pattern. fails on bash4 and bsdglob. - // however, in this implementation, it's easier just - // to do the intuitive thing, and let brace-expansion - // actually come before parsing any extglob patterns, - // like the documentation seems to say. - // - // XXX: if anyone complains about this, either fix it - // or tell them to grow up and stop complaining. - // - // bash/bsdglob says this: - // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]] - // but we do this instead: - , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]] - - // test partial parsing in the presence of comment/negation chars - , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]] - , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]] - - // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped. - , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g" - , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"] - , {} - , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]] - - - // crazy nested {,,} and *(||) tests. - , function () { - files = [ "a", "b", "c", "d" - , "ab", "ac", "ad" - , "bc", "cb" - , "bc,d", "c,db", "c,d" - , "d)", "(b|c", "*(b|c" - , "b|c", "b|cc", "cb|c" - , "x(a|b|c)", "x(a|c)" - , "(a|b|c)", "(a|c)"] - } - , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]] - , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]] - // a - // *(b|c) - // *(b|d) - , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]] - , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]] - - - // test various flag settings. - , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"] - , { noext: true } ] - , ["a?b", ["x/y/acb", "acb/"], {matchBase: true} - , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ] - , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]] - - - // begin channelling Boole and deMorgan... - , "negation tests" - , function () { - files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"] - } - - // anything that is NOT a* matches. - , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]] - - // anything that IS !a* matches. - , ["!a*", ["!ab", "!abc"], {nonegate: true}] - - // anything that IS a* matches - , ["!!a*", ["a!b"]] - - // anything that is NOT !a* matches - , ["!\\!a*", ["a!b", "d", "e", "\\!a"]] - - // negation nestled within a pattern - , function () { - files = [ "foo.js" - , "foo.bar" - // can't match this one without negative lookbehind. - , "foo.js.js" - , "blar.js" - , "foo." - , "boo.js.boo" ] - } - , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ] - - ].forEach(function (c) { - if (typeof c === "function") return c() - if (typeof c === "string") return t.comment(c) - - var pattern = c[0] - , expect = c[1].sort(alpha) - , options = c[2] || {} - , f = c[3] || files - , tapOpts = c[4] || {} - - // options.debug = true - var Class = mm.defaults(options).Minimatch - var m = new Class(pattern, {}) - var r = m.makeRe() - tapOpts.re = String(r) || JSON.stringify(r) - tapOpts.files = JSON.stringify(f) - tapOpts.pattern = pattern - tapOpts.set = m.set - tapOpts.negated = m.negate - - var actual = mm.match(f, pattern, options) - actual.sort(alpha) - - t.equivalent( actual, expect - , JSON.stringify(pattern) + " " + JSON.stringify(expect) - , tapOpts ) - }) - - t.comment("time=" + (Date.now() - start) + "ms") - t.end() -}) - -tap.test("global leak test", function (t) { - var globalAfter = Object.keys(global) - t.equivalent(globalAfter, globalBefore, "no new globals, please") - t.end() -}) - -function alpha (a, b) { - return a > b ? 1 : -1 -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js deleted file mode 100644 index 6676e262..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js +++ /dev/null @@ -1,8 +0,0 @@ -var test = require('tap').test -var minimatch = require('../') - -test('extglob ending with statechar', function(t) { - t.notOk(minimatch('ax', 'a?(b*)')) - t.ok(minimatch('ax', '?(a*|b)')) - t.end() -}) diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/package.json b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/package.json deleted file mode 100644 index bfbbbcca..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "name": "glob", - "description": "a little globber", - "version": "3.2.3", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-glob.git" - }, - "main": "glob.js", - "engines": { - "node": "*" - }, - "dependencies": { - "minimatch": "~0.2.11", - "graceful-fs": "~2.0.0", - "inherits": "2" - }, - "devDependencies": { - "tap": "~0.4.0", - "mkdirp": "0", - "rimraf": "1" - }, - "scripts": { - "test": "tap test/*.js" - }, - "license": "BSD", - "readme": "# Glob\n\nMatch files using the patterns the shell uses, like stars and stuff.\n\nThis is a glob implementation in JavaScript. It uses the `minimatch`\nlibrary to do its matching.\n\n## Attention: node-glob users!\n\nThe API has changed dramatically between 2.x and 3.x. This library is\nnow 100% JavaScript, and the integer flags have been replaced with an\noptions object.\n\nAlso, there's an event emitter class, proper tests, and all the other\nthings you've come to expect from node modules.\n\nAnd best of all, no compilation!\n\n## Usage\n\n```javascript\nvar glob = require(\"glob\")\n\n// options is optional\nglob(\"**/*.js\", options, function (er, files) {\n // files is an array of filenames.\n // If the `nonull` option is set, and nothing\n // was found, then files is [\"**/*.js\"]\n // er is an error object or null.\n})\n```\n\n## Features\n\nPlease see the [minimatch\ndocumentation](https://github.com/isaacs/minimatch) for more details.\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n* [minimatch documentation](https://github.com/isaacs/minimatch)\n\n## glob(pattern, [options], cb)\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* `cb` {Function}\n * `err` {Error | null}\n * `matches` {Array} filenames found matching the pattern\n\nPerform an asynchronous glob search.\n\n## glob.sync(pattern, [options])\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* return: {Array} filenames found matching the pattern\n\nPerform a synchronous glob search.\n\n## Class: glob.Glob\n\nCreate a Glob object by instanting the `glob.Glob` class.\n\n```javascript\nvar Glob = require(\"glob\").Glob\nvar mg = new Glob(pattern, options, cb)\n```\n\nIt's an EventEmitter, and starts walking the filesystem to find matches\nimmediately.\n\n### new glob.Glob(pattern, [options], [cb])\n\n* `pattern` {String} pattern to search for\n* `options` {Object}\n* `cb` {Function} Called when an error occurs, or matches are found\n * `err` {Error | null}\n * `matches` {Array} filenames found matching the pattern\n\nNote that if the `sync` flag is set in the options, then matches will\nbe immediately available on the `g.found` member.\n\n### Properties\n\n* `minimatch` The minimatch object that the glob uses.\n* `options` The options object passed in.\n* `error` The error encountered. When an error is encountered, the\n glob object is in an undefined state, and should be discarded.\n* `aborted` Boolean which is set to true when calling `abort()`. There\n is no way at this time to continue a glob search after aborting, but\n you can re-use the statCache to avoid having to duplicate syscalls.\n* `statCache` Collection of all the stat results the glob search\n performed.\n* `cache` Convenience object. Each field has the following possible\n values:\n * `false` - Path does not exist\n * `true` - Path exists\n * `1` - Path exists, and is not a directory\n * `2` - Path exists, and is a directory\n * `[file, entries, ...]` - Path exists, is a directory, and the\n array value is the results of `fs.readdir`\n\n### Events\n\n* `end` When the matching is finished, this is emitted with all the\n matches found. If the `nonull` option is set, and no match was found,\n then the `matches` list contains the original pattern. The matches\n are sorted, unless the `nosort` flag is set.\n* `match` Every time a match is found, this is emitted with the matched.\n* `error` Emitted when an unexpected error is encountered, or whenever\n any fs error occurs if `options.strict` is set.\n* `abort` When `abort()` is called, this event is raised.\n\n### Methods\n\n* `abort` Stop the search.\n\n### Options\n\nAll the options that can be passed to Minimatch can also be passed to\nGlob to change pattern matching behavior. Also, some have been added,\nor have glob-specific ramifications.\n\nAll options are false by default, unless otherwise noted.\n\nAll options are added to the glob object, as well.\n\n* `cwd` The current working directory in which to search. Defaults\n to `process.cwd()`.\n* `root` The place where patterns starting with `/` will be mounted\n onto. Defaults to `path.resolve(options.cwd, \"/\")` (`/` on Unix\n systems, and `C:\\` or some such on Windows.)\n* `dot` Include `.dot` files in normal matches and `globstar` matches.\n Note that an explicit dot in a portion of the pattern will always\n match dot files.\n* `nomount` By default, a pattern starting with a forward-slash will be\n \"mounted\" onto the root setting, so that a valid filesystem path is\n returned. Set this flag to disable that behavior.\n* `mark` Add a `/` character to directory matches. Note that this\n requires additional stat calls.\n* `nosort` Don't sort the results.\n* `stat` Set to true to stat *all* results. This reduces performance\n somewhat, and is completely unnecessary, unless `readdir` is presumed\n to be an untrustworthy indicator of file existence. It will cause\n ELOOP to be triggered one level sooner in the case of cyclical\n symbolic links.\n* `silent` When an unusual error is encountered\n when attempting to read a directory, a warning will be printed to\n stderr. Set the `silent` option to true to suppress these warnings.\n* `strict` When an unusual error is encountered\n when attempting to read a directory, the process will just continue on\n in search of other matches. Set the `strict` option to raise an error\n in these cases.\n* `cache` See `cache` property above. Pass in a previously generated\n cache object to save some fs calls.\n* `statCache` A cache of results of filesystem information, to prevent\n unnecessary stat calls. While it should not normally be necessary to\n set this, you may pass the statCache from one glob() call to the\n options object of another, if you know that the filesystem will not\n change between calls. (See \"Race Conditions\" below.)\n* `sync` Perform a synchronous glob search.\n* `nounique` In some cases, brace-expanded patterns can result in the\n same file showing up multiple times in the result set. By default,\n this implementation prevents duplicates in the result set.\n Set this flag to disable that behavior.\n* `nonull` Set to never return an empty set, instead returning a set\n containing the pattern itself. This is the default in glob(3).\n* `nocase` Perform a case-insensitive match. Note that case-insensitive\n filesystems will sometimes result in glob returning results that are\n case-insensitively matched anyway, since readdir and stat will not\n raise an error.\n* `debug` Set to enable debug logging in minimatch and glob.\n* `globDebug` Set to enable debug logging in glob, but not minimatch.\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between node-glob and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen glob returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`glob.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n## Windows\n\n**Please only use forward-slashes in glob expressions.**\n\nThough windows uses either `/` or `\\` as its path separator, only `/`\ncharacters are used by this glob implementation. You must use\nforward-slashes **only** in glob expressions. Back-slashes will always\nbe interpreted as escape characters, not path separators.\n\nResults from absolute patterns such as `/foo/*` are mounted onto the\nroot setting using `path.join`. On windows, this will by default result\nin `/foo/*` matching `C:\\foo\\bar.txt`.\n\n## Race Conditions\n\nGlob searching, by its very nature, is susceptible to race conditions,\nsince it relies on directory walking and such.\n\nAs a result, it is possible that a file that exists when glob looks for\nit may have been deleted or modified by the time it returns the result.\n\nAs part of its internal implementation, this program caches all stat\nand readdir calls that it makes, in order to cut down on system\noverhead. However, this also makes it even more susceptible to races,\nespecially if the cache or statCache objects are reused between glob\ncalls.\n\nUsers are thus advised not to use a glob result as a guarantee of\nfilesystem state in the face of rapid changes. For the vast majority\nof operations, this is never a problem.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/node-glob/issues" - }, - "homepage": "https://github.com/isaacs/node-glob", - "_id": "glob@3.2.3", - "_from": "glob@3.2.3" -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/00-setup.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/00-setup.js deleted file mode 100644 index 245afafd..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/00-setup.js +++ /dev/null @@ -1,176 +0,0 @@ -// just a little pre-run script to set up the fixtures. -// zz-finish cleans it up - -var mkdirp = require("mkdirp") -var path = require("path") -var i = 0 -var tap = require("tap") -var fs = require("fs") -var rimraf = require("rimraf") - -var files = -[ "a/.abcdef/x/y/z/a" -, "a/abcdef/g/h" -, "a/abcfed/g/h" -, "a/b/c/d" -, "a/bc/e/f" -, "a/c/d/c/b" -, "a/cb/e/f" -] - -var symlinkTo = path.resolve(__dirname, "a/symlink/a/b/c") -var symlinkFrom = "../.." - -files = files.map(function (f) { - return path.resolve(__dirname, f) -}) - -tap.test("remove fixtures", function (t) { - rimraf(path.resolve(__dirname, "a"), function (er) { - t.ifError(er, "remove fixtures") - t.end() - }) -}) - -files.forEach(function (f) { - tap.test(f, function (t) { - var d = path.dirname(f) - mkdirp(d, 0755, function (er) { - if (er) { - t.fail(er) - return t.bailout() - } - fs.writeFile(f, "i like tests", function (er) { - t.ifError(er, "make file") - t.end() - }) - }) - }) -}) - -if (process.platform !== "win32") { - tap.test("symlinky", function (t) { - var d = path.dirname(symlinkTo) - console.error("mkdirp", d) - mkdirp(d, 0755, function (er) { - t.ifError(er) - fs.symlink(symlinkFrom, symlinkTo, "dir", function (er) { - t.ifError(er, "make symlink") - t.end() - }) - }) - }) -} - -;["foo","bar","baz","asdf","quux","qwer","rewq"].forEach(function (w) { - w = "/tmp/glob-test/" + w - tap.test("create " + w, function (t) { - mkdirp(w, function (er) { - if (er) - throw er - t.pass(w) - t.end() - }) - }) -}) - - -// generate the bash pattern test-fixtures if possible -if (process.platform === "win32" || !process.env.TEST_REGEN) { - console.error("Windows, or TEST_REGEN unset. Using cached fixtures.") - return -} - -var spawn = require("child_process").spawn; -var globs = - // put more patterns here. - // anything that would be directly in / should be in /tmp/glob-test - ["test/a/*/+(c|g)/./d" - ,"test/a/**/[cg]/../[cg]" - ,"test/a/{b,c,d,e,f}/**/g" - ,"test/a/b/**" - ,"test/**/g" - ,"test/a/abc{fed,def}/g/h" - ,"test/a/abc{fed/g,def}/**/" - ,"test/a/abc{fed/g,def}/**///**/" - ,"test/**/a/**/" - ,"test/+(a|b|c)/a{/,bc*}/**" - ,"test/*/*/*/f" - ,"test/**/f" - ,"test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**" - ,"{./*/*,/tmp/glob-test/*}" - ,"{/tmp/glob-test/*,*}" // evil owl face! how you taunt me! - ,"test/a/!(symlink)/**" - ] -var bashOutput = {} -var fs = require("fs") - -globs.forEach(function (pattern) { - tap.test("generate fixture " + pattern, function (t) { - var cmd = "shopt -s globstar && " + - "shopt -s extglob && " + - "shopt -s nullglob && " + - // "shopt >&2; " + - "eval \'for i in " + pattern + "; do echo $i; done\'" - var cp = spawn("bash", ["-c", cmd], { cwd: path.dirname(__dirname) }) - var out = [] - cp.stdout.on("data", function (c) { - out.push(c) - }) - cp.stderr.pipe(process.stderr) - cp.on("close", function (code) { - out = flatten(out) - if (!out) - out = [] - else - out = cleanResults(out.split(/\r*\n/)) - - bashOutput[pattern] = out - t.notOk(code, "bash test should finish nicely") - t.end() - }) - }) -}) - -tap.test("save fixtures", function (t) { - var fname = path.resolve(__dirname, "bash-results.json") - var data = JSON.stringify(bashOutput, null, 2) + "\n" - fs.writeFile(fname, data, function (er) { - t.ifError(er) - t.end() - }) -}) - -function cleanResults (m) { - // normalize discrepancies in ordering, duplication, - // and ending slashes. - return m.map(function (m) { - return m.replace(/\/+/g, "/").replace(/\/$/, "") - }).sort(alphasort).reduce(function (set, f) { - if (f !== set[set.length - 1]) set.push(f) - return set - }, []).sort(alphasort).map(function (f) { - // de-windows - return (process.platform !== 'win32') ? f - : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/') - }) -} - -function flatten (chunks) { - var s = 0 - chunks.forEach(function (c) { s += c.length }) - var out = new Buffer(s) - s = 0 - chunks.forEach(function (c) { - c.copy(out, s) - s += c.length - }) - - return out.toString().trim() -} - -function alphasort (a, b) { - a = a.toLowerCase() - b = b.toLowerCase() - return a > b ? 1 : a < b ? -1 : 0 -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/bash-comparison.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/bash-comparison.js deleted file mode 100644 index 239ed1a9..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/bash-comparison.js +++ /dev/null @@ -1,63 +0,0 @@ -// basic test -// show that it does the same thing by default as the shell. -var tap = require("tap") -, child_process = require("child_process") -, bashResults = require("./bash-results.json") -, globs = Object.keys(bashResults) -, glob = require("../") -, path = require("path") - -// run from the root of the project -// this is usually where you're at anyway, but be sure. -process.chdir(path.resolve(__dirname, "..")) - -function alphasort (a, b) { - a = a.toLowerCase() - b = b.toLowerCase() - return a > b ? 1 : a < b ? -1 : 0 -} - -globs.forEach(function (pattern) { - var expect = bashResults[pattern] - // anything regarding the symlink thing will fail on windows, so just skip it - if (process.platform === "win32" && - expect.some(function (m) { - return /\/symlink\//.test(m) - })) - return - - tap.test(pattern, function (t) { - glob(pattern, function (er, matches) { - if (er) - throw er - - // sort and unmark, just to match the shell results - matches = cleanResults(matches) - - t.deepEqual(matches, expect, pattern) - t.end() - }) - }) - - tap.test(pattern + " sync", function (t) { - var matches = cleanResults(glob.sync(pattern)) - - t.deepEqual(matches, expect, "should match shell") - t.end() - }) -}) - -function cleanResults (m) { - // normalize discrepancies in ordering, duplication, - // and ending slashes. - return m.map(function (m) { - return m.replace(/\/+/g, "/").replace(/\/$/, "") - }).sort(alphasort).reduce(function (set, f) { - if (f !== set[set.length - 1]) set.push(f) - return set - }, []).sort(alphasort).map(function (f) { - // de-windows - return (process.platform !== 'win32') ? f - : f.replace(/^[a-zA-Z]:[\/\\]+/, '/').replace(/[\\\/]+/g, '/') - }) -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/bash-results.json b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/bash-results.json deleted file mode 100644 index a9bc347d..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/bash-results.json +++ /dev/null @@ -1,350 +0,0 @@ -{ - "test/a/*/+(c|g)/./d": [ - "test/a/b/c/./d" - ], - "test/a/**/[cg]/../[cg]": [ - "test/a/abcdef/g/../g", - "test/a/abcfed/g/../g", - "test/a/b/c/../c", - "test/a/c/../c", - "test/a/c/d/c/../c", - "test/a/symlink/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c" - ], - "test/a/{b,c,d,e,f}/**/g": [], - "test/a/b/**": [ - "test/a/b", - "test/a/b/c", - "test/a/b/c/d" - ], - "test/**/g": [ - "test/a/abcdef/g", - "test/a/abcfed/g" - ], - "test/a/abc{fed,def}/g/h": [ - "test/a/abcdef/g/h", - "test/a/abcfed/g/h" - ], - "test/a/abc{fed/g,def}/**/": [ - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcfed/g" - ], - "test/a/abc{fed/g,def}/**///**/": [ - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcfed/g" - ], - "test/**/a/**/": [ - "test/a", - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcfed", - "test/a/abcfed/g", - "test/a/b", - "test/a/b/c", - "test/a/bc", - "test/a/bc/e", - "test/a/c", - "test/a/c/d", - "test/a/c/d/c", - "test/a/cb", - "test/a/cb/e", - "test/a/symlink", - "test/a/symlink/a", - "test/a/symlink/a/b", - "test/a/symlink/a/b/c", - "test/a/symlink/a/b/c/a", - "test/a/symlink/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b" - ], - "test/+(a|b|c)/a{/,bc*}/**": [ - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcdef/g/h", - "test/a/abcfed", - "test/a/abcfed/g", - "test/a/abcfed/g/h" - ], - "test/*/*/*/f": [ - "test/a/bc/e/f", - "test/a/cb/e/f" - ], - "test/**/f": [ - "test/a/bc/e/f", - "test/a/cb/e/f" - ], - "test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**": [ - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c" - ], - "{./*/*,/tmp/glob-test/*}": [ - "./examples/g.js", - "./examples/usr-local.js", - "./node_modules/graceful-fs", - "./node_modules/inherits", - "./node_modules/minimatch", - "./node_modules/mkdirp", - "./node_modules/rimraf", - "./node_modules/tap", - "./test/00-setup.js", - "./test/a", - "./test/bash-comparison.js", - "./test/bash-results.json", - "./test/cwd-test.js", - "./test/globstar-match.js", - "./test/mark.js", - "./test/nocase-nomagic.js", - "./test/pause-resume.js", - "./test/root-nomount.js", - "./test/root.js", - "./test/stat.js", - "./test/zz-cleanup.js", - "/tmp/glob-test/asdf", - "/tmp/glob-test/bar", - "/tmp/glob-test/baz", - "/tmp/glob-test/foo", - "/tmp/glob-test/quux", - "/tmp/glob-test/qwer", - "/tmp/glob-test/rewq" - ], - "{/tmp/glob-test/*,*}": [ - "/tmp/glob-test/asdf", - "/tmp/glob-test/bar", - "/tmp/glob-test/baz", - "/tmp/glob-test/foo", - "/tmp/glob-test/quux", - "/tmp/glob-test/qwer", - "/tmp/glob-test/rewq", - "examples", - "glob.js", - "LICENSE", - "node_modules", - "package.json", - "README.md", - "test" - ], - "test/a/!(symlink)/**": [ - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcdef/g/h", - "test/a/abcfed", - "test/a/abcfed/g", - "test/a/abcfed/g/h", - "test/a/b", - "test/a/b/c", - "test/a/b/c/d", - "test/a/bc", - "test/a/bc/e", - "test/a/bc/e/f", - "test/a/c", - "test/a/c/d", - "test/a/c/d/c", - "test/a/c/d/c/b", - "test/a/cb", - "test/a/cb/e", - "test/a/cb/e/f" - ] -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/cwd-test.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/cwd-test.js deleted file mode 100644 index 352c27ef..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/cwd-test.js +++ /dev/null @@ -1,55 +0,0 @@ -var tap = require("tap") - -var origCwd = process.cwd() -process.chdir(__dirname) - -tap.test("changing cwd and searching for **/d", function (t) { - var glob = require('../') - var path = require('path') - t.test('.', function (t) { - glob('**/d', function (er, matches) { - t.ifError(er) - t.like(matches, [ 'a/b/c/d', 'a/c/d' ]) - t.end() - }) - }) - - t.test('a', function (t) { - glob('**/d', {cwd:path.resolve('a')}, function (er, matches) { - t.ifError(er) - t.like(matches, [ 'b/c/d', 'c/d' ]) - t.end() - }) - }) - - t.test('a/b', function (t) { - glob('**/d', {cwd:path.resolve('a/b')}, function (er, matches) { - t.ifError(er) - t.like(matches, [ 'c/d' ]) - t.end() - }) - }) - - t.test('a/b/', function (t) { - glob('**/d', {cwd:path.resolve('a/b/')}, function (er, matches) { - t.ifError(er) - t.like(matches, [ 'c/d' ]) - t.end() - }) - }) - - t.test('.', function (t) { - glob('**/d', {cwd: process.cwd()}, function (er, matches) { - t.ifError(er) - t.like(matches, [ 'a/b/c/d', 'a/c/d' ]) - t.end() - }) - }) - - t.test('cd -', function (t) { - process.chdir(origCwd) - t.end() - }) - - t.end() -}) diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/globstar-match.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/globstar-match.js deleted file mode 100644 index 9b234fa2..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/globstar-match.js +++ /dev/null @@ -1,19 +0,0 @@ -var Glob = require("../glob.js").Glob -var test = require('tap').test - -test('globstar should not have dupe matches', function(t) { - var pattern = 'a/**/[gh]' - var g = new Glob(pattern, { cwd: __dirname }) - var matches = [] - g.on('match', function(m) { - console.error('match %j', m) - matches.push(m) - }) - g.on('end', function(set) { - console.error('set', set) - matches = matches.sort() - set = set.sort() - t.same(matches, set, 'should have same set of matches') - t.end() - }) -}) diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/mark.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/mark.js deleted file mode 100644 index ed68a335..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/mark.js +++ /dev/null @@ -1,74 +0,0 @@ -var test = require("tap").test -var glob = require('../') -process.chdir(__dirname) - -test("mark, no / on pattern", function (t) { - glob("a/*", {mark: true}, function (er, results) { - if (er) - throw er - var expect = [ 'a/abcdef/', - 'a/abcfed/', - 'a/b/', - 'a/bc/', - 'a/c/', - 'a/cb/' ] - - if (process.platform !== "win32") - expect.push('a/symlink/') - - t.same(results, expect) - t.end() - }) -}) - -test("mark=false, no / on pattern", function (t) { - glob("a/*", function (er, results) { - if (er) - throw er - var expect = [ 'a/abcdef', - 'a/abcfed', - 'a/b', - 'a/bc', - 'a/c', - 'a/cb' ] - - if (process.platform !== "win32") - expect.push('a/symlink') - t.same(results, expect) - t.end() - }) -}) - -test("mark=true, / on pattern", function (t) { - glob("a/*/", {mark: true}, function (er, results) { - if (er) - throw er - var expect = [ 'a/abcdef/', - 'a/abcfed/', - 'a/b/', - 'a/bc/', - 'a/c/', - 'a/cb/' ] - if (process.platform !== "win32") - expect.push('a/symlink/') - t.same(results, expect) - t.end() - }) -}) - -test("mark=false, / on pattern", function (t) { - glob("a/*/", function (er, results) { - if (er) - throw er - var expect = [ 'a/abcdef/', - 'a/abcfed/', - 'a/b/', - 'a/bc/', - 'a/c/', - 'a/cb/' ] - if (process.platform !== "win32") - expect.push('a/symlink/') - t.same(results, expect) - t.end() - }) -}) diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/nocase-nomagic.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/nocase-nomagic.js deleted file mode 100644 index d8629709..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/nocase-nomagic.js +++ /dev/null @@ -1,113 +0,0 @@ -var fs = require('graceful-fs'); -var test = require('tap').test; -var glob = require('../'); - -test('mock fs', function(t) { - var stat = fs.stat - var statSync = fs.statSync - var readdir = fs.readdir - var readdirSync = fs.readdirSync - - function fakeStat(path) { - var ret - switch (path.toLowerCase()) { - case '/tmp': case '/tmp/': - ret = { isDirectory: function() { return true } } - break - case '/tmp/a': - ret = { isDirectory: function() { return false } } - break - } - return ret - } - - fs.stat = function(path, cb) { - var f = fakeStat(path); - if (f) { - process.nextTick(function() { - cb(null, f) - }) - } else { - stat.call(fs, path, cb) - } - } - - fs.statSync = function(path) { - return fakeStat(path) || statSync.call(fs, path) - } - - function fakeReaddir(path) { - var ret - switch (path.toLowerCase()) { - case '/tmp': case '/tmp/': - ret = [ 'a', 'A' ] - break - case '/': - ret = ['tmp', 'tMp', 'tMP', 'TMP'] - } - return ret - } - - fs.readdir = function(path, cb) { - var f = fakeReaddir(path) - if (f) - process.nextTick(function() { - cb(null, f) - }) - else - readdir.call(fs, path, cb) - } - - fs.readdirSync = function(path) { - return fakeReaddir(path) || readdirSync.call(fs, path) - } - - t.pass('mocked') - t.end() -}) - -test('nocase, nomagic', function(t) { - var n = 2 - var want = [ '/TMP/A', - '/TMP/a', - '/tMP/A', - '/tMP/a', - '/tMp/A', - '/tMp/a', - '/tmp/A', - '/tmp/a' ] - glob('/tmp/a', { nocase: true }, function(er, res) { - if (er) - throw er - t.same(res.sort(), want) - if (--n === 0) t.end() - }) - glob('/tmp/A', { nocase: true }, function(er, res) { - if (er) - throw er - t.same(res.sort(), want) - if (--n === 0) t.end() - }) -}) - -test('nocase, with some magic', function(t) { - t.plan(2) - var want = [ '/TMP/A', - '/TMP/a', - '/tMP/A', - '/tMP/a', - '/tMp/A', - '/tMp/a', - '/tmp/A', - '/tmp/a' ] - glob('/tmp/*', { nocase: true }, function(er, res) { - if (er) - throw er - t.same(res.sort(), want) - }) - glob('/tmp/*', { nocase: true }, function(er, res) { - if (er) - throw er - t.same(res.sort(), want) - }) -}) diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/pause-resume.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/pause-resume.js deleted file mode 100644 index e1ffbab1..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/pause-resume.js +++ /dev/null @@ -1,73 +0,0 @@ -// show that no match events happen while paused. -var tap = require("tap") -, child_process = require("child_process") -// just some gnarly pattern with lots of matches -, pattern = "test/a/!(symlink)/**" -, bashResults = require("./bash-results.json") -, patterns = Object.keys(bashResults) -, glob = require("../") -, Glob = glob.Glob -, path = require("path") - -// run from the root of the project -// this is usually where you're at anyway, but be sure. -process.chdir(path.resolve(__dirname, "..")) - -function alphasort (a, b) { - a = a.toLowerCase() - b = b.toLowerCase() - return a > b ? 1 : a < b ? -1 : 0 -} - -function cleanResults (m) { - // normalize discrepancies in ordering, duplication, - // and ending slashes. - return m.map(function (m) { - return m.replace(/\/+/g, "/").replace(/\/$/, "") - }).sort(alphasort).reduce(function (set, f) { - if (f !== set[set.length - 1]) set.push(f) - return set - }, []).sort(alphasort).map(function (f) { - // de-windows - return (process.platform !== 'win32') ? f - : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/') - }) -} - -var globResults = [] -tap.test("use a Glob object, and pause/resume it", function (t) { - var g = new Glob(pattern) - , paused = false - , res = [] - , expect = bashResults[pattern] - - g.on("pause", function () { - console.error("pause") - }) - - g.on("resume", function () { - console.error("resume") - }) - - g.on("match", function (m) { - t.notOk(g.paused, "must not be paused") - globResults.push(m) - g.pause() - t.ok(g.paused, "must be paused") - setTimeout(g.resume.bind(g), 10) - }) - - g.on("end", function (matches) { - t.pass("reached glob end") - globResults = cleanResults(globResults) - matches = cleanResults(matches) - t.deepEqual(matches, globResults, - "end event matches should be the same as match events") - - t.deepEqual(matches, expect, - "glob matches should be the same as bash results") - - t.end() - }) -}) - diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/root-nomount.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/root-nomount.js deleted file mode 100644 index 3ac5979b..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/root-nomount.js +++ /dev/null @@ -1,39 +0,0 @@ -var tap = require("tap") - -var origCwd = process.cwd() -process.chdir(__dirname) - -tap.test("changing root and searching for /b*/**", function (t) { - var glob = require('../') - var path = require('path') - t.test('.', function (t) { - glob('/b*/**', { globDebug: true, root: '.', nomount: true }, function (er, matches) { - t.ifError(er) - t.like(matches, []) - t.end() - }) - }) - - t.test('a', function (t) { - glob('/b*/**', { globDebug: true, root: path.resolve('a'), nomount: true }, function (er, matches) { - t.ifError(er) - t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ]) - t.end() - }) - }) - - t.test('root=a, cwd=a/b', function (t) { - glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b'), nomount: true }, function (er, matches) { - t.ifError(er) - t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ]) - t.end() - }) - }) - - t.test('cd -', function (t) { - process.chdir(origCwd) - t.end() - }) - - t.end() -}) diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/root.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/root.js deleted file mode 100644 index 95c23f99..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/root.js +++ /dev/null @@ -1,46 +0,0 @@ -var t = require("tap") - -var origCwd = process.cwd() -process.chdir(__dirname) - -var glob = require('../') -var path = require('path') - -t.test('.', function (t) { - glob('/b*/**', { globDebug: true, root: '.' }, function (er, matches) { - t.ifError(er) - t.like(matches, []) - t.end() - }) -}) - - -t.test('a', function (t) { - console.error("root=" + path.resolve('a')) - glob('/b*/**', { globDebug: true, root: path.resolve('a') }, function (er, matches) { - t.ifError(er) - var wanted = [ - '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' - ].map(function (m) { - return path.join(path.resolve('a'), m).replace(/\\/g, '/') - }) - - t.like(matches, wanted) - t.end() - }) -}) - -t.test('root=a, cwd=a/b', function (t) { - glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b') }, function (er, matches) { - t.ifError(er) - t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) { - return path.join(path.resolve('a'), m).replace(/\\/g, '/') - })) - t.end() - }) -}) - -t.test('cd -', function (t) { - process.chdir(origCwd) - t.end() -}) diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/stat.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/stat.js deleted file mode 100644 index 62917114..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/stat.js +++ /dev/null @@ -1,32 +0,0 @@ -var glob = require('../') -var test = require('tap').test -var path = require('path') - -test('stat all the things', function(t) { - var g = new glob.Glob('a/*abc*/**', { stat: true, cwd: __dirname }) - var matches = [] - g.on('match', function(m) { - matches.push(m) - }) - var stats = [] - g.on('stat', function(m) { - stats.push(m) - }) - g.on('end', function(eof) { - stats = stats.sort() - matches = matches.sort() - eof = eof.sort() - t.same(stats, matches) - t.same(eof, matches) - var cache = Object.keys(this.statCache) - t.same(cache.map(function (f) { - return path.relative(__dirname, f) - }).sort(), matches) - - cache.forEach(function(c) { - t.equal(typeof this.statCache[c], 'object') - }, this) - - t.end() - }) -}) diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/zz-cleanup.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/zz-cleanup.js deleted file mode 100644 index e085f0fa..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/glob/test/zz-cleanup.js +++ /dev/null @@ -1,11 +0,0 @@ -// remove the fixtures -var tap = require("tap") -, rimraf = require("rimraf") -, path = require("path") - -tap.test("cleanup fixtures", function (t) { - rimraf(path.resolve(__dirname, "a"), function (er) { - t.ifError(er, "removed") - t.end() - }) -}) diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/growl/History.md b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/growl/History.md deleted file mode 100644 index a4b7b49f..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/growl/History.md +++ /dev/null @@ -1,63 +0,0 @@ - -1.7.0 / 2012-12-30 -================== - - * support transient notifications in Gnome - -1.6.1 / 2012-09-25 -================== - - * restore compatibility with node < 0.8 [fgnass] - -1.6.0 / 2012-09-06 -================== - - * add notification center support [drudge] - -1.5.1 / 2012-04-08 -================== - - * Merge pull request #16 from KyleAMathews/patch-1 - * Fixes #15 - -1.5.0 / 2012-02-08 -================== - - * Added windows support [perfusorius] - -1.4.1 / 2011-12-28 -================== - - * Fixed: dont exit(). Closes #9 - -1.4.0 / 2011-12-17 -================== - - * Changed API: `growl.notify()` -> `growl()` - -1.3.0 / 2011-12-17 -================== - - * Added support for Ubuntu/Debian/Linux users [niftylettuce] - * Fixed: send notifications even if title not specified [alessioalex] - -1.2.0 / 2011-10-06 -================== - - * Add support for priority. - -1.1.0 / 2011-03-15 -================== - - * Added optional callbacks - * Added parsing of version - -1.0.1 / 2010-03-26 -================== - - * Fixed; sys.exec -> child_process.exec to support latest node - -1.0.0 / 2010-03-19 -================== - - * Initial release diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/growl/Readme.md b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/growl/Readme.md deleted file mode 100644 index 48d717cc..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/growl/Readme.md +++ /dev/null @@ -1,99 +0,0 @@ -# Growl for nodejs - -Growl support for Nodejs. This is essentially a port of my [Ruby Growl Library](http://github.com/visionmedia/growl). Ubuntu/Linux support added thanks to [@niftylettuce](http://github.com/niftylettuce). - -## Installation - -### Install - -### Mac OS X (Darwin): - - Install [growlnotify(1)](http://growl.info/extras.php#growlnotify). On OS X 10.8, Notification Center is supported using [terminal-notifier](https://github.com/alloy/terminal-notifier). To install: - - $ sudo gem install terminal-notifier - - Install [npm](http://npmjs.org/) and run: - - $ npm install growl - -### Ubuntu (Linux): - - Install `notify-send` through the [libnotify-bin](http://packages.ubuntu.com/libnotify-bin) package: - - $ sudo apt-get install libnotify-bin - - Install [npm](http://npmjs.org/) and run: - - $ npm install growl - -### Windows: - - Download and install [Growl for Windows](http://www.growlforwindows.com/gfw/default.aspx) - - Download [growlnotify](http://www.growlforwindows.com/gfw/help/growlnotify.aspx) - **IMPORTANT :** Unpack growlnotify to a folder that is present in your path! - - Install [npm](http://npmjs.org/) and run: - - $ npm install growl - -## Examples - -Callback functions are optional - - var growl = require('growl') - growl('You have mail!') - growl('5 new messages', { sticky: true }) - growl('5 new emails', { title: 'Email Client', image: 'Safari', sticky: true }) - growl('Message with title', { title: 'Title'}) - growl('Set priority', { priority: 2 }) - growl('Show Safari icon', { image: 'Safari' }) - growl('Show icon', { image: 'path/to/icon.icns' }) - growl('Show image', { image: 'path/to/my.image.png' }) - growl('Show png filesystem icon', { image: 'png' }) - growl('Show pdf filesystem icon', { image: 'article.pdf' }) - growl('Show pdf filesystem icon', { image: 'article.pdf' }, function(err){ - // ... notified - }) - -## Options - - - title - - notification title - - name - - application name - - priority - - priority for the notification (default is 0) - - sticky - - weither or not the notification should remainin until closed - - image - - Auto-detects the context: - - path to an icon sets --iconpath - - path to an image sets --image - - capitalized word sets --appIcon - - filename uses extname as --icon - - otherwise treated as --icon - -## License - -(The MIT License) - -Copyright (c) 2009 TJ Holowaychuk - -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/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/growl/lib/growl.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/growl/lib/growl.js deleted file mode 100644 index 04f4f9b4..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/growl/lib/growl.js +++ /dev/null @@ -1,234 +0,0 @@ -// Growl - Copyright TJ Holowaychuk (MIT Licensed) - -/** - * Module dependencies. - */ - -var exec = require('child_process').exec - , fs = require('fs') - , path = require('path') - , exists = fs.existsSync || path.existsSync - , os = require('os') - , quote = JSON.stringify - , cmd; - -function which(name) { - var paths = process.env.PATH.split(':'); - var loc; - - for (var i = 0, len = paths.length; i < len; ++i) { - loc = path.join(paths[i], name); - if (exists(loc)) return loc; - } -} - -switch(os.type()) { - case 'Darwin': - if (which('terminal-notifier')) { - cmd = { - type: "Darwin-NotificationCenter" - , pkg: "terminal-notifier" - , msg: '-message' - , title: '-title' - , subtitle: '-subtitle' - , priority: { - cmd: '-execute' - , range: [] - } - }; - } else { - cmd = { - type: "Darwin-Growl" - , pkg: "growlnotify" - , msg: '-m' - , sticky: '--sticky' - , priority: { - cmd: '--priority' - , range: [ - -2 - , -1 - , 0 - , 1 - , 2 - , "Very Low" - , "Moderate" - , "Normal" - , "High" - , "Emergency" - ] - } - }; - } - break; - case 'Linux': - cmd = { - type: "Linux" - , pkg: "notify-send" - , msg: '' - , sticky: '-t 0' - , icon: '-i' - , priority: { - cmd: '-u' - , range: [ - "low" - , "normal" - , "critical" - ] - } - }; - break; - case 'Windows_NT': - cmd = { - type: "Windows" - , pkg: "growlnotify" - , msg: '' - , sticky: '/s:true' - , title: '/t:' - , icon: '/i:' - , priority: { - cmd: '/p:' - , range: [ - -2 - , -1 - , 0 - , 1 - , 2 - ] - } - }; - break; -} - -/** - * Expose `growl`. - */ - -exports = module.exports = growl; - -/** - * Node-growl version. - */ - -exports.version = '1.4.1' - -/** - * Send growl notification _msg_ with _options_. - * - * Options: - * - * - title Notification title - * - sticky Make the notification stick (defaults to false) - * - priority Specify an int or named key (default is 0) - * - name Application name (defaults to growlnotify) - * - image - * - path to an icon sets --iconpath - * - path to an image sets --image - * - capitalized word sets --appIcon - * - filename uses extname as --icon - * - otherwise treated as --icon - * - * Examples: - * - * growl('New email') - * growl('5 new emails', { title: 'Thunderbird' }) - * growl('Email sent', function(){ - * // ... notification sent - * }) - * - * @param {string} msg - * @param {object} options - * @param {function} fn - * @api public - */ - -function growl(msg, options, fn) { - var image - , args - , options = options || {} - , fn = fn || function(){}; - - // noop - if (!cmd) return fn(new Error('growl not supported on this platform')); - args = [cmd.pkg]; - - // image - if (image = options.image) { - switch(cmd.type) { - case 'Darwin-Growl': - var flag, ext = path.extname(image).substr(1) - flag = flag || ext == 'icns' && 'iconpath' - flag = flag || /^[A-Z]/.test(image) && 'appIcon' - flag = flag || /^png|gif|jpe?g$/.test(ext) && 'image' - flag = flag || ext && (image = ext) && 'icon' - flag = flag || 'icon' - args.push('--' + flag, image) - break; - case 'Linux': - args.push(cmd.icon + " " + image); - // libnotify defaults to sticky, set a hint for transient notifications - if (!options.sticky) args.push('--hint=int:transient:1'); - break; - case 'Windows': - args.push(cmd.icon + quote(image)); - break; - } - } - - // sticky - if (options.sticky) args.push(cmd.sticky); - - // priority - if (options.priority) { - var priority = options.priority + ''; - var checkindexOf = cmd.priority.range.indexOf(priority); - if (~cmd.priority.range.indexOf(priority)) { - args.push(cmd.priority, options.priority); - } - } - - // name - if (options.name && cmd.type === "Darwin-Growl") { - args.push('--name', options.name); - } - - switch(cmd.type) { - case 'Darwin-Growl': - args.push(cmd.msg); - args.push(quote(msg)); - if (options.title) args.push(quote(options.title)); - break; - case 'Darwin-NotificationCenter': - args.push(cmd.msg); - args.push(quote(msg)); - if (options.title) { - args.push(cmd.title); - args.push(quote(options.title)); - } - if (options.subtitle) { - args.push(cmd.subtitle); - args.push(quote(options.title)); - } - break; - case 'Darwin-Growl': - args.push(cmd.msg); - args.push(quote(msg)); - if (options.title) args.push(quote(options.title)); - break; - case 'Linux': - if (options.title) { - args.push(quote(options.title)); - args.push(cmd.msg); - args.push(quote(msg)); - } else { - args.push(quote(msg)); - } - break; - case 'Windows': - args.push(quote(msg)); - if (options.title) args.push(cmd.title + quote(options.title)); - break; - } - - // execute - exec(args.join(' '), fn); -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/growl/package.json b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/growl/package.json deleted file mode 100644 index 6565e46d..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/growl/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "growl", - "version": "1.7.0", - "description": "Growl unobtrusive notifications", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "main": "./lib/growl.js", - "readme": "# Growl for nodejs\n\nGrowl support for Nodejs. This is essentially a port of my [Ruby Growl Library](http://github.com/visionmedia/growl). Ubuntu/Linux support added thanks to [@niftylettuce](http://github.com/niftylettuce). \n\n## Installation\n\n### Install \n\n### Mac OS X (Darwin):\n\n Install [growlnotify(1)](http://growl.info/extras.php#growlnotify). On OS X 10.8, Notification Center is supported using [terminal-notifier](https://github.com/alloy/terminal-notifier). To install:\n \n $ sudo gem install terminal-notifier\n \n Install [npm](http://npmjs.org/) and run:\n \n $ npm install growl\n\n### Ubuntu (Linux):\n\n Install `notify-send` through the [libnotify-bin](http://packages.ubuntu.com/libnotify-bin) package:\n\n $ sudo apt-get install libnotify-bin\n\n Install [npm](http://npmjs.org/) and run:\n \n $ npm install growl\n\n### Windows:\n\n Download and install [Growl for Windows](http://www.growlforwindows.com/gfw/default.aspx)\n\n Download [growlnotify](http://www.growlforwindows.com/gfw/help/growlnotify.aspx) - **IMPORTANT :** Unpack growlnotify to a folder that is present in your path!\n\n Install [npm](http://npmjs.org/) and run:\n \n $ npm install growl\n\n## Examples\n\nCallback functions are optional\n\n var growl = require('growl')\n growl('You have mail!')\n growl('5 new messages', { sticky: true })\n growl('5 new emails', { title: 'Email Client', image: 'Safari', sticky: true })\n growl('Message with title', { title: 'Title'})\n growl('Set priority', { priority: 2 })\n growl('Show Safari icon', { image: 'Safari' })\n growl('Show icon', { image: 'path/to/icon.icns' })\n growl('Show image', { image: 'path/to/my.image.png' })\n growl('Show png filesystem icon', { image: 'png' })\n growl('Show pdf filesystem icon', { image: 'article.pdf' })\n growl('Show pdf filesystem icon', { image: 'article.pdf' }, function(err){\n // ... notified\n })\n\n## Options\n\n - title\n - notification title\n - name\n - application name\n - priority\n - priority for the notification (default is 0)\n - sticky\n - weither or not the notification should remainin until closed\n - image\n - Auto-detects the context:\n - path to an icon sets --iconpath\n - path to an image sets --image\n - capitalized word sets --appIcon\n - filename uses extname as --icon\n - otherwise treated as --icon\n \n## License \n\n(The MIT License)\n\nCopyright (c) 2009 TJ Holowaychuk \n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "_id": "growl@1.7.0", - "_from": "growl@1.7.x" -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/growl/test.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/growl/test.js deleted file mode 100644 index cf22d90b..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/growl/test.js +++ /dev/null @@ -1,20 +0,0 @@ - -var growl = require('./lib/growl') - -growl('You have mail!') -growl('5 new messages', { sticky: true }) -growl('5 new emails', { title: 'Email Client', image: 'Safari', sticky: true }) -growl('Message with title', { title: 'Title'}) -growl('Set priority', { priority: 2 }) -growl('Show Safari icon', { image: 'Safari' }) -growl('Show icon', { image: 'path/to/icon.icns' }) -growl('Show image', { image: 'path/to/my.image.png' }) -growl('Show png filesystem icon', { image: 'png' }) -growl('Show pdf filesystem icon', { image: 'article.pdf' }) -growl('Show pdf filesystem icon', { image: 'article.pdf' }, function(){ - console.log('callback'); -}) -growl('Show pdf filesystem icon', { title: 'Use show()', image: 'article.pdf' }) -growl('here \' are \n some \\ characters that " need escaping', {}, function(error, stdout, stderr) { - if (error !== null) throw new Error('escaping failed:\n' + stdout + stderr); -}) diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/.npmignore b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/.npmignore deleted file mode 100644 index b9af3d4b..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/.npmignore +++ /dev/null @@ -1,15 +0,0 @@ -test -support -benchmarks -examples -lib-cov -coverage.html -.gitmodules -.travis.yml -History.md -Readme.md -Makefile -test/ -support/ -benchmarks/ -examples/ diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/LICENSE b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/LICENSE deleted file mode 100644 index 8ad0e0d3..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2009-2010 TJ Holowaychuk - -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. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/bin/jade b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/bin/jade deleted file mode 100755 index 7e6002f9..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/bin/jade +++ /dev/null @@ -1,147 +0,0 @@ -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var fs = require('fs') - , program = require('commander') - , path = require('path') - , basename = path.basename - , dirname = path.dirname - , resolve = path.resolve - , join = path.join - , mkdirp = require('mkdirp') - , jade = require('../'); - -// jade options - -var options = {}; - -// options - -program - .version(jade.version) - .usage('[options] [dir|file ...]') - .option('-o, --obj ', 'javascript options object') - .option('-O, --out ', 'output the compiled html to ') - .option('-p, --path ', 'filename used to resolve includes') - .option('-P, --pretty', 'compile pretty html output') - .option('-c, --client', 'compile for client-side runtime.js') - .option('-D, --no-debug', 'compile without debugging (smaller functions)') - -program.on('--help', function(){ - console.log(' Examples:'); - console.log(''); - console.log(' # translate jade the templates dir'); - console.log(' $ jade templates'); - console.log(''); - console.log(' # create {foo,bar}.html'); - console.log(' $ jade {foo,bar}.jade'); - console.log(''); - console.log(' # jade over stdio'); - console.log(' $ jade < my.jade > my.html'); - console.log(''); - console.log(' # jade over stdio'); - console.log(' $ echo "h1 Jade!" | jade'); - console.log(''); - console.log(' # foo, bar dirs rendering to /tmp'); - console.log(' $ jade foo bar --out /tmp '); - console.log(''); -}); - -program.parse(process.argv); - -// options given, parse them - -if (program.obj) options = eval('(' + program.obj + ')'); - -// --filename - -if (program.path) options.filename = program.path; - -// --no-debug - -options.compileDebug = program.debug; - -// --client - -options.client = program.client; - -// --pretty - -options.pretty = program.pretty; - -// left-over args are file paths - -var files = program.args; - -// compile files - -if (files.length) { - console.log(); - files.forEach(renderFile); - process.on('exit', console.log); -// stdio -} else { - stdin(); -} - -/** - * Compile from stdin. - */ - -function stdin() { - var buf = ''; - process.stdin.setEncoding('utf8'); - process.stdin.on('data', function(chunk){ buf += chunk; }); - process.stdin.on('end', function(){ - var fn = jade.compile(buf, options); - var output = options.client - ? fn.toString() - : fn(options); - process.stdout.write(output); - }).resume(); -} - -/** - * Process the given path, compiling the jade files found. - * Always walk the subdirectories. - */ - -function renderFile(path) { - var re = /\.jade$/; - fs.lstat(path, function(err, stat) { - if (err) throw err; - // Found jade file - if (stat.isFile() && re.test(path)) { - fs.readFile(path, 'utf8', function(err, str){ - if (err) throw err; - options.filename = path; - var fn = jade.compile(str, options); - var extname = options.client ? '.js' : '.html'; - path = path.replace(re, extname); - if (program.out) path = join(program.out, basename(path)); - var dir = resolve(dirname(path)); - mkdirp(dir, 0755, function(err){ - if (err) throw err; - var output = options.client - ? fn.toString() - : fn(options); - fs.writeFile(path, output, function(err){ - if (err) throw err; - console.log(' \033[90mrendered \033[36m%s\033[0m', path); - }); - }); - }); - // Found directory - } else if (stat.isDirectory()) { - fs.readdir(path, function(err, files) { - if (err) throw err; - files.map(function(filename) { - return path + '/' + filename; - }).forEach(renderFile); - }); - } - }); -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/index.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/index.js deleted file mode 100644 index 8ad059f7..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/index.js +++ /dev/null @@ -1,4 +0,0 @@ - -module.exports = process.env.JADE_COV - ? require('./lib-cov/jade') - : require('./lib/jade'); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/jade.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/jade.js deleted file mode 100644 index 1983a203..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/jade.js +++ /dev/null @@ -1,3586 +0,0 @@ -(function() { - -// CommonJS require() - -function require(p){ - var path = require.resolve(p) - , mod = require.modules[path]; - if (!mod) throw new Error('failed to require "' + p + '"'); - if (!mod.exports) { - mod.exports = {}; - mod.call(mod.exports, mod, mod.exports, require.relative(path)); - } - return mod.exports; - } - -require.modules = {}; - -require.resolve = function (path){ - var orig = path - , reg = path + '.js' - , index = path + '/index.js'; - return require.modules[reg] && reg - || require.modules[index] && index - || orig; - }; - -require.register = function (path, fn){ - require.modules[path] = fn; - }; - -require.relative = function (parent) { - return function(p){ - if ('.' != p.charAt(0)) return require(p); - - var path = parent.split('/') - , segs = p.split('/'); - path.pop(); - - for (var i = 0; i < segs.length; i++) { - var seg = segs[i]; - if ('..' == seg) path.pop(); - else if ('.' != seg) path.push(seg); - } - - return require(path.join('/')); - }; - }; - - -require.register("compiler.js", function(module, exports, require){ - -/*! - * Jade - Compiler - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var nodes = require('./nodes') - , filters = require('./filters') - , doctypes = require('./doctypes') - , selfClosing = require('./self-closing') - , runtime = require('./runtime') - , utils = require('./utils'); - - - if (!Object.keys) { - Object.keys = function(obj){ - var arr = []; - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - arr.push(key); - } - } - return arr; - } - } - - if (!String.prototype.trimLeft) { - String.prototype.trimLeft = function(){ - return this.replace(/^\s+/, ''); - } - } - - - -/** - * Initialize `Compiler` with the given `node`. - * - * @param {Node} node - * @param {Object} options - * @api public - */ - -var Compiler = module.exports = function Compiler(node, options) { - this.options = options = options || {}; - this.node = node; - this.hasCompiledDoctype = false; - this.hasCompiledTag = false; - this.pp = options.pretty || false; - this.debug = false !== options.compileDebug; - this.indents = 0; - this.parentIndents = 0; - if (options.doctype) this.setDoctype(options.doctype); -}; - -/** - * Compiler prototype. - */ - -Compiler.prototype = { - - /** - * Compile parse tree to JavaScript. - * - * @api public - */ - - compile: function(){ - this.buf = ['var interp;']; - if (this.pp) this.buf.push("var __indent = [];"); - this.lastBufferedIdx = -1; - this.visit(this.node); - return this.buf.join('\n'); - }, - - /** - * Sets the default doctype `name`. Sets terse mode to `true` when - * html 5 is used, causing self-closing tags to end with ">" vs "/>", - * and boolean attributes are not mirrored. - * - * @param {string} name - * @api public - */ - - setDoctype: function(name){ - var doctype = doctypes[(name || 'default').toLowerCase()]; - doctype = doctype || ''; - this.doctype = doctype; - this.terse = '5' == name || 'html' == name; - this.xml = 0 == this.doctype.indexOf(' 1 && !escape && block.nodes[0].isText && block.nodes[1].isText) - this.prettyIndent(1, true); - - for (var i = 0; i < len; ++i) { - // Pretty print text - if (pp && i > 0 && !escape && block.nodes[i].isText && block.nodes[i-1].isText) - this.prettyIndent(1, false); - - this.visit(block.nodes[i]); - // Multiple text nodes are separated by newlines - if (block.nodes[i+1] && block.nodes[i].isText && block.nodes[i+1].isText) - this.buffer('\\n'); - } - }, - - /** - * Visit `doctype`. Sets terse mode to `true` when html 5 - * is used, causing self-closing tags to end with ">" vs "/>", - * and boolean attributes are not mirrored. - * - * @param {Doctype} doctype - * @api public - */ - - visitDoctype: function(doctype){ - if (doctype && (doctype.val || !this.doctype)) { - this.setDoctype(doctype.val || 'default'); - } - - if (this.doctype) this.buffer(this.doctype); - this.hasCompiledDoctype = true; - }, - - /** - * Visit `mixin`, generating a function that - * may be called within the template. - * - * @param {Mixin} mixin - * @api public - */ - - visitMixin: function(mixin){ - var name = mixin.name.replace(/-/g, '_') + '_mixin' - , args = mixin.args || '' - , block = mixin.block - , attrs = mixin.attrs - , pp = this.pp; - - if (mixin.call) { - if (pp) this.buf.push("__indent.push('" + Array(this.indents + 1).join(' ') + "');") - if (block || attrs.length) { - - this.buf.push(name + '.call({'); - - if (block) { - this.buf.push('block: function(){'); - - // Render block with no indents, dynamically added when rendered - this.parentIndents++; - var _indents = this.indents; - this.indents = 0; - this.visit(mixin.block); - this.indents = _indents; - this.parentIndents--; - - if (attrs.length) { - this.buf.push('},'); - } else { - this.buf.push('}'); - } - } - - if (attrs.length) { - var val = this.attrs(attrs); - if (val.inherits) { - this.buf.push('attributes: merge({' + val.buf - + '}, attributes), escaped: merge(' + val.escaped + ', escaped, true)'); - } else { - this.buf.push('attributes: {' + val.buf + '}, escaped: ' + val.escaped); - } - } - - if (args) { - this.buf.push('}, ' + args + ');'); - } else { - this.buf.push('});'); - } - - } else { - this.buf.push(name + '(' + args + ');'); - } - if (pp) this.buf.push("__indent.pop();") - } else { - this.buf.push('var ' + name + ' = function(' + args + '){'); - this.buf.push('var block = this.block, attributes = this.attributes || {}, escaped = this.escaped || {};'); - this.parentIndents++; - this.visit(block); - this.parentIndents--; - this.buf.push('};'); - } - }, - - /** - * Visit `tag` buffering tag markup, generating - * attributes, visiting the `tag`'s code and block. - * - * @param {Tag} tag - * @api public - */ - - visitTag: function(tag){ - this.indents++; - var name = tag.name - , pp = this.pp; - - if (tag.buffer) name = "' + (" + name + ") + '"; - - if (!this.hasCompiledTag) { - if (!this.hasCompiledDoctype && 'html' == name) { - this.visitDoctype(); - } - this.hasCompiledTag = true; - } - - // pretty print - if (pp && !tag.isInline()) - this.prettyIndent(0, true); - - if ((~selfClosing.indexOf(name) || tag.selfClosing) && !this.xml) { - this.buffer('<' + name); - this.visitAttributes(tag.attrs); - this.terse - ? this.buffer('>') - : this.buffer('/>'); - } else { - // Optimize attributes buffering - if (tag.attrs.length) { - this.buffer('<' + name); - if (tag.attrs.length) this.visitAttributes(tag.attrs); - this.buffer('>'); - } else { - this.buffer('<' + name + '>'); - } - if (tag.code) this.visitCode(tag.code); - this.escape = 'pre' == tag.name; - this.visit(tag.block); - - // pretty print - if (pp && !tag.isInline() && 'pre' != tag.name && !tag.canInline()) - this.prettyIndent(0, true); - - this.buffer(''); - } - this.indents--; - }, - - /** - * Visit `filter`, throwing when the filter does not exist. - * - * @param {Filter} filter - * @api public - */ - - visitFilter: function(filter){ - var fn = filters[filter.name]; - - // unknown filter - if (!fn) { - if (filter.isASTFilter) { - throw new Error('unknown ast filter "' + filter.name + ':"'); - } else { - throw new Error('unknown filter ":' + filter.name + '"'); - } - } - - if (filter.isASTFilter) { - this.buf.push(fn(filter.block, this, filter.attrs)); - } else { - var text = filter.block.nodes.map(function(node){ return node.val }).join('\n'); - filter.attrs = filter.attrs || {}; - filter.attrs.filename = this.options.filename; - this.buffer(utils.text(fn(text, filter.attrs))); - } - }, - - /** - * Visit `text` node. - * - * @param {Text} text - * @api public - */ - - visitText: function(text){ - text = utils.text(text.val.replace(/\\/g, '\\\\')); - if (this.escape) text = escape(text); - this.buffer(text); - }, - - /** - * Visit a `comment`, only buffering when the buffer flag is set. - * - * @param {Comment} comment - * @api public - */ - - visitComment: function(comment){ - if (!comment.buffer) return; - if (this.pp) this.prettyIndent(1, true); - this.buffer(''); - }, - - /** - * Visit a `BlockComment`. - * - * @param {Comment} comment - * @api public - */ - - visitBlockComment: function(comment){ - if (!comment.buffer) return; - if (0 == comment.val.trim().indexOf('if')) { - this.buffer(''); - } else { - this.buffer(''); - } - }, - - /** - * Visit `code`, respecting buffer / escape flags. - * If the code is followed by a block, wrap it in - * a self-calling function. - * - * @param {Code} code - * @api public - */ - - visitCode: function(code){ - // Wrap code blocks with {}. - // we only wrap unbuffered code blocks ATM - // since they are usually flow control - - // Buffer code - if (code.buffer) { - var val = code.val.trimLeft(); - this.buf.push('var __val__ = ' + val); - val = 'null == __val__ ? "" : __val__'; - if (code.escape) val = 'escape(' + val + ')'; - this.buf.push("buf.push(" + val + ");"); - } else { - this.buf.push(code.val); - } - - // Block support - if (code.block) { - if (!code.buffer) this.buf.push('{'); - this.visit(code.block); - if (!code.buffer) this.buf.push('}'); - } - }, - - /** - * Visit `each` block. - * - * @param {Each} each - * @api public - */ - - visitEach: function(each){ - this.buf.push('' - + '// iterate ' + each.obj + '\n' - + ';(function(){\n' - + ' if (\'number\' == typeof ' + each.obj + '.length) {\n' - + ' for (var ' + each.key + ' = 0, $$l = ' + each.obj + '.length; ' + each.key + ' < $$l; ' + each.key + '++) {\n' - + ' var ' + each.val + ' = ' + each.obj + '[' + each.key + '];\n'); - - this.visit(each.block); - - this.buf.push('' - + ' }\n' - + ' } else {\n' - + ' for (var ' + each.key + ' in ' + each.obj + ') {\n' - + ' if (' + each.obj + '.hasOwnProperty(' + each.key + ')){' - + ' var ' + each.val + ' = ' + each.obj + '[' + each.key + '];\n'); - - this.visit(each.block); - - this.buf.push(' }\n'); - - this.buf.push(' }\n }\n}).call(this);\n'); - }, - - /** - * Visit `attrs`. - * - * @param {Array} attrs - * @api public - */ - - visitAttributes: function(attrs){ - var val = this.attrs(attrs); - if (val.inherits) { - this.buf.push("buf.push(attrs(merge({ " + val.buf + - " }, attributes), merge(" + val.escaped + ", escaped, true)));"); - } else if (val.constant) { - eval('var buf={' + val.buf + '};'); - this.buffer(runtime.attrs(buf, JSON.parse(val.escaped)), true); - } else { - this.buf.push("buf.push(attrs({ " + val.buf + " }, " + val.escaped + "));"); - } - }, - - /** - * Compile attributes. - */ - - attrs: function(attrs){ - var buf = [] - , classes = [] - , escaped = {} - , constant = attrs.every(function(attr){ return isConstant(attr.val) }) - , inherits = false; - - if (this.terse) buf.push('terse: true'); - - attrs.forEach(function(attr){ - if (attr.name == 'attributes') return inherits = true; - escaped[attr.name] = attr.escaped; - if (attr.name == 'class') { - classes.push('(' + attr.val + ')'); - } else { - var pair = "'" + attr.name + "':(" + attr.val + ')'; - buf.push(pair); - } - }); - - if (classes.length) { - classes = classes.join(" + ' ' + "); - buf.push("class: " + classes); - } - - return { - buf: buf.join(', ').replace('class:', '"class":'), - escaped: JSON.stringify(escaped), - inherits: inherits, - constant: constant - }; - } -}; - -/** - * Check if expression can be evaluated to a constant - * - * @param {String} expression - * @return {Boolean} - * @api private - */ - -function isConstant(val){ - // Check strings/literals - if (/^ *("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'|true|false|null|undefined) *$/i.test(val)) - return true; - - // Check numbers - if (!isNaN(Number(val))) - return true; - - // Check arrays - var matches; - if (matches = /^ *\[(.*)\] *$/.exec(val)) - return matches[1].split(',').every(isConstant); - - return false; -} - -/** - * Escape the given string of `html`. - * - * @param {String} html - * @return {String} - * @api private - */ - -function escape(html){ - return String(html) - .replace(/&(?!\w+;)/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); -} -}); // module: compiler.js - -require.register("doctypes.js", function(module, exports, require){ - -/*! - * Jade - doctypes - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = { - '5': '' - , 'default': '' - , 'xml': '' - , 'transitional': '' - , 'strict': '' - , 'frameset': '' - , '1.1': '' - , 'basic': '' - , 'mobile': '' -}; -}); // module: doctypes.js - -require.register("filters.js", function(module, exports, require){ - -/*! - * Jade - filters - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = { - - /** - * Wrap text with CDATA block. - */ - - cdata: function(str){ - return ''; - }, - - /** - * Transform sass to css, wrapped in style tags. - */ - - sass: function(str){ - str = str.replace(/\\n/g, '\n'); - var sass = require('sass').render(str).replace(/\n/g, '\\n'); - return ''; - }, - - /** - * Transform stylus to css, wrapped in style tags. - */ - - stylus: function(str, options){ - var ret; - str = str.replace(/\\n/g, '\n'); - var stylus = require('stylus'); - stylus(str, options).render(function(err, css){ - if (err) throw err; - ret = css.replace(/\n/g, '\\n'); - }); - return ''; - }, - - /** - * Transform less to css, wrapped in style tags. - */ - - less: function(str){ - var ret; - str = str.replace(/\\n/g, '\n'); - require('less').render(str, function(err, css){ - if (err) throw err; - ret = ''; - }); - return ret; - }, - - /** - * Transform markdown to html. - */ - - markdown: function(str){ - var md; - - // support markdown / discount - try { - md = require('markdown'); - } catch (err){ - try { - md = require('discount'); - } catch (err) { - try { - md = require('markdown-js'); - } catch (err) { - try { - md = require('marked'); - } catch (err) { - throw new - Error('Cannot find markdown library, install markdown, discount, or marked.'); - } - } - } - } - - str = str.replace(/\\n/g, '\n'); - return md.parse(str).replace(/\n/g, '\\n').replace(/'/g,'''); - }, - - /** - * Transform coffeescript to javascript. - */ - - coffeescript: function(str){ - str = str.replace(/\\n/g, '\n'); - var js = require('coffee-script').compile(str).replace(/\\/g, '\\\\').replace(/\n/g, '\\n'); - return ''; - } -}; - -}); // module: filters.js - -require.register("inline-tags.js", function(module, exports, require){ - -/*! - * Jade - inline tags - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = [ - 'a' - , 'abbr' - , 'acronym' - , 'b' - , 'br' - , 'code' - , 'em' - , 'font' - , 'i' - , 'img' - , 'ins' - , 'kbd' - , 'map' - , 'samp' - , 'small' - , 'span' - , 'strong' - , 'sub' - , 'sup' -]; -}); // module: inline-tags.js - -require.register("jade.js", function(module, exports, require){ -/*! - * Jade - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Parser = require('./parser') - , Lexer = require('./lexer') - , Compiler = require('./compiler') - , runtime = require('./runtime') - -/** - * Library version. - */ - -exports.version = '0.26.1'; - -/** - * Expose self closing tags. - */ - -exports.selfClosing = require('./self-closing'); - -/** - * Default supported doctypes. - */ - -exports.doctypes = require('./doctypes'); - -/** - * Text filters. - */ - -exports.filters = require('./filters'); - -/** - * Utilities. - */ - -exports.utils = require('./utils'); - -/** - * Expose `Compiler`. - */ - -exports.Compiler = Compiler; - -/** - * Expose `Parser`. - */ - -exports.Parser = Parser; - -/** - * Expose `Lexer`. - */ - -exports.Lexer = Lexer; - -/** - * Nodes. - */ - -exports.nodes = require('./nodes'); - -/** - * Jade runtime helpers. - */ - -exports.runtime = runtime; - -/** - * Template function cache. - */ - -exports.cache = {}; - -/** - * Parse the given `str` of jade and return a function body. - * - * @param {String} str - * @param {Object} options - * @return {String} - * @api private - */ - -function parse(str, options){ - try { - // Parse - var parser = new Parser(str, options.filename, options); - - // Compile - var compiler = new (options.compiler || Compiler)(parser.parse(), options) - , js = compiler.compile(); - - // Debug compiler - if (options.debug) { - console.error('\nCompiled Function:\n\n\033[90m%s\033[0m', js.replace(/^/gm, ' ')); - } - - return '' - + 'var buf = [];\n' - + (options.self - ? 'var self = locals || {};\n' + js - : 'with (locals || {}) {\n' + js + '\n}\n') - + 'return buf.join("");'; - } catch (err) { - parser = parser.context(); - runtime.rethrow(err, parser.filename, parser.lexer.lineno); - } -} - -/** - * Compile a `Function` representation of the given jade `str`. - * - * Options: - * - * - `compileDebug` when `false` debugging code is stripped from the compiled template - * - `client` when `true` the helper functions `escape()` etc will reference `jade.escape()` - * for use with the Jade client-side runtime.js - * - * @param {String} str - * @param {Options} options - * @return {Function} - * @api public - */ - -exports.compile = function(str, options){ - var options = options || {} - , client = options.client - , filename = options.filename - ? JSON.stringify(options.filename) - : 'undefined' - , fn; - - if (options.compileDebug !== false) { - fn = [ - 'var __jade = [{ lineno: 1, filename: ' + filename + ' }];' - , 'try {' - , parse(String(str), options) - , '} catch (err) {' - , ' rethrow(err, __jade[0].filename, __jade[0].lineno);' - , '}' - ].join('\n'); - } else { - fn = parse(String(str), options); - } - - if (client) { - fn = 'attrs = attrs || jade.attrs; escape = escape || jade.escape; rethrow = rethrow || jade.rethrow; merge = merge || jade.merge;\n' + fn; - } - - fn = new Function('locals, attrs, escape, rethrow, merge', fn); - - if (client) return fn; - - return function(locals){ - return fn(locals, runtime.attrs, runtime.escape, runtime.rethrow, runtime.merge); - }; -}; - -/** - * Render the given `str` of jade and invoke - * the callback `fn(err, str)`. - * - * Options: - * - * - `cache` enable template caching - * - `filename` filename required for `include` / `extends` and caching - * - * @param {String} str - * @param {Object|Function} options or fn - * @param {Function} fn - * @api public - */ - -exports.render = function(str, options, fn){ - // swap args - if ('function' == typeof options) { - fn = options, options = {}; - } - - // cache requires .filename - if (options.cache && !options.filename) { - return fn(new Error('the "filename" option is required for caching')); - } - - try { - var path = options.filename; - var tmpl = options.cache - ? exports.cache[path] || (exports.cache[path] = exports.compile(str, options)) - : exports.compile(str, options); - fn(null, tmpl(options)); - } catch (err) { - fn(err); - } -}; - -/** - * Render a Jade file at the given `path` and callback `fn(err, str)`. - * - * @param {String} path - * @param {Object|Function} options or callback - * @param {Function} fn - * @api public - */ - -exports.renderFile = function(path, options, fn){ - var key = path + ':string'; - - if ('function' == typeof options) { - fn = options, options = {}; - } - - try { - options.filename = path; - var str = options.cache - ? exports.cache[key] || (exports.cache[key] = fs.readFileSync(path, 'utf8')) - : fs.readFileSync(path, 'utf8'); - exports.render(str, options, fn); - } catch (err) { - fn(err); - } -}; - -/** - * Express support. - */ - -exports.__express = exports.renderFile; - -}); // module: jade.js - -require.register("lexer.js", function(module, exports, require){ - -/*! - * Jade - Lexer - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Initialize `Lexer` with the given `str`. - * - * Options: - * - * - `colons` allow colons for attr delimiters - * - * @param {String} str - * @param {Object} options - * @api private - */ - -var Lexer = module.exports = function Lexer(str, options) { - options = options || {}; - this.input = str.replace(/\r\n|\r/g, '\n'); - this.colons = options.colons; - this.deferredTokens = []; - this.lastIndents = 0; - this.lineno = 1; - this.stash = []; - this.indentStack = []; - this.indentRe = null; - this.pipeless = false; -}; - -/** - * Lexer prototype. - */ - -Lexer.prototype = { - - /** - * Construct a token with the given `type` and `val`. - * - * @param {String} type - * @param {String} val - * @return {Object} - * @api private - */ - - tok: function(type, val){ - return { - type: type - , line: this.lineno - , val: val - } - }, - - /** - * Consume the given `len` of input. - * - * @param {Number} len - * @api private - */ - - consume: function(len){ - this.input = this.input.substr(len); - }, - - /** - * Scan for `type` with the given `regexp`. - * - * @param {String} type - * @param {RegExp} regexp - * @return {Object} - * @api private - */ - - scan: function(regexp, type){ - var captures; - if (captures = regexp.exec(this.input)) { - this.consume(captures[0].length); - return this.tok(type, captures[1]); - } - }, - - /** - * Defer the given `tok`. - * - * @param {Object} tok - * @api private - */ - - defer: function(tok){ - this.deferredTokens.push(tok); - }, - - /** - * Lookahead `n` tokens. - * - * @param {Number} n - * @return {Object} - * @api private - */ - - lookahead: function(n){ - var fetch = n - this.stash.length; - while (fetch-- > 0) this.stash.push(this.next()); - return this.stash[--n]; - }, - - /** - * Return the indexOf `start` / `end` delimiters. - * - * @param {String} start - * @param {String} end - * @return {Number} - * @api private - */ - - indexOfDelimiters: function(start, end){ - var str = this.input - , nstart = 0 - , nend = 0 - , pos = 0; - for (var i = 0, len = str.length; i < len; ++i) { - if (start == str.charAt(i)) { - ++nstart; - } else if (end == str.charAt(i)) { - if (++nend == nstart) { - pos = i; - break; - } - } - } - return pos; - }, - - /** - * Stashed token. - */ - - stashed: function() { - return this.stash.length - && this.stash.shift(); - }, - - /** - * Deferred token. - */ - - deferred: function() { - return this.deferredTokens.length - && this.deferredTokens.shift(); - }, - - /** - * end-of-source. - */ - - eos: function() { - if (this.input.length) return; - if (this.indentStack.length) { - this.indentStack.shift(); - return this.tok('outdent'); - } else { - return this.tok('eos'); - } - }, - - /** - * Blank line. - */ - - blank: function() { - var captures; - if (captures = /^\n *\n/.exec(this.input)) { - this.consume(captures[0].length - 1); - if (this.pipeless) return this.tok('text', ''); - return this.next(); - } - }, - - /** - * Comment. - */ - - comment: function() { - var captures; - if (captures = /^ *\/\/(-)?([^\n]*)/.exec(this.input)) { - this.consume(captures[0].length); - var tok = this.tok('comment', captures[2]); - tok.buffer = '-' != captures[1]; - return tok; - } - }, - - /** - * Interpolated tag. - */ - - interpolation: function() { - var captures; - if (captures = /^#\{(.*?)\}/.exec(this.input)) { - this.consume(captures[0].length); - return this.tok('interpolation', captures[1]); - } - }, - - /** - * Tag. - */ - - tag: function() { - var captures; - if (captures = /^(\w[-:\w]*)(\/?)/.exec(this.input)) { - this.consume(captures[0].length); - var tok, name = captures[1]; - if (':' == name[name.length - 1]) { - name = name.slice(0, -1); - tok = this.tok('tag', name); - this.defer(this.tok(':')); - while (' ' == this.input[0]) this.input = this.input.substr(1); - } else { - tok = this.tok('tag', name); - } - tok.selfClosing = !! captures[2]; - return tok; - } - }, - - /** - * Filter. - */ - - filter: function() { - return this.scan(/^:(\w+)/, 'filter'); - }, - - /** - * Doctype. - */ - - doctype: function() { - return this.scan(/^(?:!!!|doctype) *([^\n]+)?/, 'doctype'); - }, - - /** - * Id. - */ - - id: function() { - return this.scan(/^#([\w-]+)/, 'id'); - }, - - /** - * Class. - */ - - className: function() { - return this.scan(/^\.([\w-]+)/, 'class'); - }, - - /** - * Text. - */ - - text: function() { - return this.scan(/^(?:\| ?| ?)?([^\n]+)/, 'text'); - }, - - /** - * Extends. - */ - - "extends": function() { - return this.scan(/^extends? +([^\n]+)/, 'extends'); - }, - - /** - * Block prepend. - */ - - prepend: function() { - var captures; - if (captures = /^prepend +([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - var mode = 'prepend' - , name = captures[1] - , tok = this.tok('block', name); - tok.mode = mode; - return tok; - } - }, - - /** - * Block append. - */ - - append: function() { - var captures; - if (captures = /^append +([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - var mode = 'append' - , name = captures[1] - , tok = this.tok('block', name); - tok.mode = mode; - return tok; - } - }, - - /** - * Block. - */ - - block: function() { - var captures; - if (captures = /^block\b *(?:(prepend|append) +)?([^\n]*)/.exec(this.input)) { - this.consume(captures[0].length); - var mode = captures[1] || 'replace' - , name = captures[2] - , tok = this.tok('block', name); - - tok.mode = mode; - return tok; - } - }, - - /** - * Yield. - */ - - yield: function() { - return this.scan(/^yield */, 'yield'); - }, - - /** - * Include. - */ - - include: function() { - return this.scan(/^include +([^\n]+)/, 'include'); - }, - - /** - * Case. - */ - - "case": function() { - return this.scan(/^case +([^\n]+)/, 'case'); - }, - - /** - * When. - */ - - when: function() { - return this.scan(/^when +([^:\n]+)/, 'when'); - }, - - /** - * Default. - */ - - "default": function() { - return this.scan(/^default */, 'default'); - }, - - /** - * Assignment. - */ - - assignment: function() { - var captures; - if (captures = /^(\w+) += *([^;\n]+)( *;? *)/.exec(this.input)) { - this.consume(captures[0].length); - var name = captures[1] - , val = captures[2]; - return this.tok('code', 'var ' + name + ' = (' + val + ');'); - } - }, - - /** - * Call mixin. - */ - - call: function(){ - var captures; - if (captures = /^\+([-\w]+)/.exec(this.input)) { - this.consume(captures[0].length); - var tok = this.tok('call', captures[1]); - - // Check for args (not attributes) - if (captures = /^ *\((.*?)\)/.exec(this.input)) { - if (!/^ *[-\w]+ *=/.test(captures[1])) { - this.consume(captures[0].length); - tok.args = captures[1]; - } - } - - return tok; - } - }, - - /** - * Mixin. - */ - - mixin: function(){ - var captures; - if (captures = /^mixin +([-\w]+)(?: *\((.*)\))?/.exec(this.input)) { - this.consume(captures[0].length); - var tok = this.tok('mixin', captures[1]); - tok.args = captures[2]; - return tok; - } - }, - - /** - * Conditional. - */ - - conditional: function() { - var captures; - if (captures = /^(if|unless|else if|else)\b([^\n]*)/.exec(this.input)) { - this.consume(captures[0].length); - var type = captures[1] - , js = captures[2]; - - switch (type) { - case 'if': js = 'if (' + js + ')'; break; - case 'unless': js = 'if (!(' + js + '))'; break; - case 'else if': js = 'else if (' + js + ')'; break; - case 'else': js = 'else'; break; - } - - return this.tok('code', js); - } - }, - - /** - * While. - */ - - "while": function() { - var captures; - if (captures = /^while +([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - return this.tok('code', 'while (' + captures[1] + ')'); - } - }, - - /** - * Each. - */ - - each: function() { - var captures; - if (captures = /^(?:- *)?(?:each|for) +(\w+)(?: *, *(\w+))? * in *([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - var tok = this.tok('each', captures[1]); - tok.key = captures[2] || '$index'; - tok.code = captures[3]; - return tok; - } - }, - - /** - * Code. - */ - - code: function() { - var captures; - if (captures = /^(!?=|-)([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - var flags = captures[1]; - captures[1] = captures[2]; - var tok = this.tok('code', captures[1]); - tok.escape = flags[0] === '='; - tok.buffer = flags[0] === '=' || flags[1] === '='; - return tok; - } - }, - - /** - * Attributes. - */ - - attrs: function() { - if ('(' == this.input.charAt(0)) { - var index = this.indexOfDelimiters('(', ')') - , str = this.input.substr(1, index-1) - , tok = this.tok('attrs') - , len = str.length - , colons = this.colons - , states = ['key'] - , escapedAttr - , key = '' - , val = '' - , quote - , c - , p; - - function state(){ - return states[states.length - 1]; - } - - function interpolate(attr) { - return attr.replace(/#\{([^}]+)\}/g, function(_, expr){ - return quote + " + (" + expr + ") + " + quote; - }); - } - - this.consume(index + 1); - tok.attrs = {}; - tok.escaped = {}; - - function parse(c) { - var real = c; - // TODO: remove when people fix ":" - if (colons && ':' == c) c = '='; - switch (c) { - case ',': - case '\n': - switch (state()) { - case 'expr': - case 'array': - case 'string': - case 'object': - val += c; - break; - default: - states.push('key'); - val = val.trim(); - key = key.trim(); - if ('' == key) return; - key = key.replace(/^['"]|['"]$/g, '').replace('!', ''); - tok.escaped[key] = escapedAttr; - tok.attrs[key] = '' == val - ? true - : interpolate(val); - key = val = ''; - } - break; - case '=': - switch (state()) { - case 'key char': - key += real; - break; - case 'val': - case 'expr': - case 'array': - case 'string': - case 'object': - val += real; - break; - default: - escapedAttr = '!' != p; - states.push('val'); - } - break; - case '(': - if ('val' == state() - || 'expr' == state()) states.push('expr'); - val += c; - break; - case ')': - if ('expr' == state() - || 'val' == state()) states.pop(); - val += c; - break; - case '{': - if ('val' == state()) states.push('object'); - val += c; - break; - case '}': - if ('object' == state()) states.pop(); - val += c; - break; - case '[': - if ('val' == state()) states.push('array'); - val += c; - break; - case ']': - if ('array' == state()) states.pop(); - val += c; - break; - case '"': - case "'": - switch (state()) { - case 'key': - states.push('key char'); - break; - case 'key char': - states.pop(); - break; - case 'string': - if (c == quote) states.pop(); - val += c; - break; - default: - states.push('string'); - val += c; - quote = c; - } - break; - case '': - break; - default: - switch (state()) { - case 'key': - case 'key char': - key += c; - break; - default: - val += c; - } - } - p = c; - } - - for (var i = 0; i < len; ++i) { - parse(str.charAt(i)); - } - - parse(','); - - if ('/' == this.input.charAt(0)) { - this.consume(1); - tok.selfClosing = true; - } - - return tok; - } - }, - - /** - * Indent | Outdent | Newline. - */ - - indent: function() { - var captures, re; - - // established regexp - if (this.indentRe) { - captures = this.indentRe.exec(this.input); - // determine regexp - } else { - // tabs - re = /^\n(\t*) */; - captures = re.exec(this.input); - - // spaces - if (captures && !captures[1].length) { - re = /^\n( *)/; - captures = re.exec(this.input); - } - - // established - if (captures && captures[1].length) this.indentRe = re; - } - - if (captures) { - var tok - , indents = captures[1].length; - - ++this.lineno; - this.consume(indents + 1); - - if (' ' == this.input[0] || '\t' == this.input[0]) { - throw new Error('Invalid indentation, you can use tabs or spaces but not both'); - } - - // blank line - if ('\n' == this.input[0]) return this.tok('newline'); - - // outdent - if (this.indentStack.length && indents < this.indentStack[0]) { - while (this.indentStack.length && this.indentStack[0] > indents) { - this.stash.push(this.tok('outdent')); - this.indentStack.shift(); - } - tok = this.stash.pop(); - // indent - } else if (indents && indents != this.indentStack[0]) { - this.indentStack.unshift(indents); - tok = this.tok('indent', indents); - // newline - } else { - tok = this.tok('newline'); - } - - return tok; - } - }, - - /** - * Pipe-less text consumed only when - * pipeless is true; - */ - - pipelessText: function() { - if (this.pipeless) { - if ('\n' == this.input[0]) return; - var i = this.input.indexOf('\n'); - if (-1 == i) i = this.input.length; - var str = this.input.substr(0, i); - this.consume(str.length); - return this.tok('text', str); - } - }, - - /** - * ':' - */ - - colon: function() { - return this.scan(/^: */, ':'); - }, - - /** - * Return the next token object, or those - * previously stashed by lookahead. - * - * @return {Object} - * @api private - */ - - advance: function(){ - return this.stashed() - || this.next(); - }, - - /** - * Return the next token object. - * - * @return {Object} - * @api private - */ - - next: function() { - return this.deferred() - || this.blank() - || this.eos() - || this.pipelessText() - || this.yield() - || this.doctype() - || this.interpolation() - || this["case"]() - || this.when() - || this["default"]() - || this["extends"]() - || this.append() - || this.prepend() - || this.block() - || this.include() - || this.mixin() - || this.call() - || this.conditional() - || this.each() - || this["while"]() - || this.assignment() - || this.tag() - || this.filter() - || this.code() - || this.id() - || this.className() - || this.attrs() - || this.indent() - || this.comment() - || this.colon() - || this.text(); - } -}; - -}); // module: lexer.js - -require.register("nodes/attrs.js", function(module, exports, require){ - -/*! - * Jade - nodes - Attrs - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'), - Block = require('./block'); - -/** - * Initialize a `Attrs` node. - * - * @api public - */ - -var Attrs = module.exports = function Attrs() { - this.attrs = []; -}; - -/** - * Inherit from `Node`. - */ - -Attrs.prototype = new Node; -Attrs.prototype.constructor = Attrs; - - -/** - * Set attribute `name` to `val`, keep in mind these become - * part of a raw js object literal, so to quote a value you must - * '"quote me"', otherwise or example 'user.name' is literal JavaScript. - * - * @param {String} name - * @param {String} val - * @param {Boolean} escaped - * @return {Tag} for chaining - * @api public - */ - -Attrs.prototype.setAttribute = function(name, val, escaped){ - this.attrs.push({ name: name, val: val, escaped: escaped }); - return this; -}; - -/** - * Remove attribute `name` when present. - * - * @param {String} name - * @api public - */ - -Attrs.prototype.removeAttribute = function(name){ - for (var i = 0, len = this.attrs.length; i < len; ++i) { - if (this.attrs[i] && this.attrs[i].name == name) { - delete this.attrs[i]; - } - } -}; - -/** - * Get attribute value by `name`. - * - * @param {String} name - * @return {String} - * @api public - */ - -Attrs.prototype.getAttribute = function(name){ - for (var i = 0, len = this.attrs.length; i < len; ++i) { - if (this.attrs[i] && this.attrs[i].name == name) { - return this.attrs[i].val; - } - } -}; - -}); // module: nodes/attrs.js - -require.register("nodes/block-comment.js", function(module, exports, require){ - -/*! - * Jade - nodes - BlockComment - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `BlockComment` with the given `block`. - * - * @param {String} val - * @param {Block} block - * @param {Boolean} buffer - * @api public - */ - -var BlockComment = module.exports = function BlockComment(val, block, buffer) { - this.block = block; - this.val = val; - this.buffer = buffer; -}; - -/** - * Inherit from `Node`. - */ - -BlockComment.prototype = new Node; -BlockComment.prototype.constructor = BlockComment; - -}); // module: nodes/block-comment.js - -require.register("nodes/block.js", function(module, exports, require){ - -/*! - * Jade - nodes - Block - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a new `Block` with an optional `node`. - * - * @param {Node} node - * @api public - */ - -var Block = module.exports = function Block(node){ - this.nodes = []; - if (node) this.push(node); -}; - -/** - * Inherit from `Node`. - */ - -Block.prototype = new Node; -Block.prototype.constructor = Block; - - -/** - * Block flag. - */ - -Block.prototype.isBlock = true; - -/** - * Replace the nodes in `other` with the nodes - * in `this` block. - * - * @param {Block} other - * @api private - */ - -Block.prototype.replace = function(other){ - other.nodes = this.nodes; -}; - -/** - * Pust the given `node`. - * - * @param {Node} node - * @return {Number} - * @api public - */ - -Block.prototype.push = function(node){ - return this.nodes.push(node); -}; - -/** - * Check if this block is empty. - * - * @return {Boolean} - * @api public - */ - -Block.prototype.isEmpty = function(){ - return 0 == this.nodes.length; -}; - -/** - * Unshift the given `node`. - * - * @param {Node} node - * @return {Number} - * @api public - */ - -Block.prototype.unshift = function(node){ - return this.nodes.unshift(node); -}; - -/** - * Return the "last" block, or the first `yield` node. - * - * @return {Block} - * @api private - */ - -Block.prototype.includeBlock = function(){ - var ret = this - , node; - - for (var i = 0, len = this.nodes.length; i < len; ++i) { - node = this.nodes[i]; - if (node.yield) return node; - else if (node.textOnly) continue; - else if (node.includeBlock) ret = node.includeBlock(); - else if (node.block && !node.block.isEmpty()) ret = node.block.includeBlock(); - } - - return ret; -}; - -/** - * Return a clone of this block. - * - * @return {Block} - * @api private - */ - -Block.prototype.clone = function(){ - var clone = new Block; - for (var i = 0, len = this.nodes.length; i < len; ++i) { - clone.push(this.nodes[i].clone()); - } - return clone; -}; - - -}); // module: nodes/block.js - -require.register("nodes/case.js", function(module, exports, require){ - -/*! - * Jade - nodes - Case - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a new `Case` with `expr`. - * - * @param {String} expr - * @api public - */ - -var Case = exports = module.exports = function Case(expr, block){ - this.expr = expr; - this.block = block; -}; - -/** - * Inherit from `Node`. - */ - -Case.prototype = new Node; -Case.prototype.constructor = Case; - - -var When = exports.When = function When(expr, block){ - this.expr = expr; - this.block = block; - this.debug = false; -}; - -/** - * Inherit from `Node`. - */ - -When.prototype = new Node; -When.prototype.constructor = When; - - - -}); // module: nodes/case.js - -require.register("nodes/code.js", function(module, exports, require){ - -/*! - * Jade - nodes - Code - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Code` node with the given code `val`. - * Code may also be optionally buffered and escaped. - * - * @param {String} val - * @param {Boolean} buffer - * @param {Boolean} escape - * @api public - */ - -var Code = module.exports = function Code(val, buffer, escape) { - this.val = val; - this.buffer = buffer; - this.escape = escape; - if (val.match(/^ *else/)) this.debug = false; -}; - -/** - * Inherit from `Node`. - */ - -Code.prototype = new Node; -Code.prototype.constructor = Code; - -}); // module: nodes/code.js - -require.register("nodes/comment.js", function(module, exports, require){ - -/*! - * Jade - nodes - Comment - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Comment` with the given `val`, optionally `buffer`, - * otherwise the comment may render in the output. - * - * @param {String} val - * @param {Boolean} buffer - * @api public - */ - -var Comment = module.exports = function Comment(val, buffer) { - this.val = val; - this.buffer = buffer; -}; - -/** - * Inherit from `Node`. - */ - -Comment.prototype = new Node; -Comment.prototype.constructor = Comment; - -}); // module: nodes/comment.js - -require.register("nodes/doctype.js", function(module, exports, require){ - -/*! - * Jade - nodes - Doctype - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Doctype` with the given `val`. - * - * @param {String} val - * @api public - */ - -var Doctype = module.exports = function Doctype(val) { - this.val = val; -}; - -/** - * Inherit from `Node`. - */ - -Doctype.prototype = new Node; -Doctype.prototype.constructor = Doctype; - -}); // module: nodes/doctype.js - -require.register("nodes/each.js", function(module, exports, require){ - -/*! - * Jade - nodes - Each - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize an `Each` node, representing iteration - * - * @param {String} obj - * @param {String} val - * @param {String} key - * @param {Block} block - * @api public - */ - -var Each = module.exports = function Each(obj, val, key, block) { - this.obj = obj; - this.val = val; - this.key = key; - this.block = block; -}; - -/** - * Inherit from `Node`. - */ - -Each.prototype = new Node; -Each.prototype.constructor = Each; - -}); // module: nodes/each.js - -require.register("nodes/filter.js", function(module, exports, require){ - -/*! - * Jade - nodes - Filter - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node') - , Block = require('./block'); - -/** - * Initialize a `Filter` node with the given - * filter `name` and `block`. - * - * @param {String} name - * @param {Block|Node} block - * @api public - */ - -var Filter = module.exports = function Filter(name, block, attrs) { - this.name = name; - this.block = block; - this.attrs = attrs; - this.isASTFilter = !block.nodes.every(function(node){ return node.isText }); -}; - -/** - * Inherit from `Node`. - */ - -Filter.prototype = new Node; -Filter.prototype.constructor = Filter; - -}); // module: nodes/filter.js - -require.register("nodes/index.js", function(module, exports, require){ - -/*! - * Jade - nodes - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -exports.Node = require('./node'); -exports.Tag = require('./tag'); -exports.Code = require('./code'); -exports.Each = require('./each'); -exports.Case = require('./case'); -exports.Text = require('./text'); -exports.Block = require('./block'); -exports.Mixin = require('./mixin'); -exports.Filter = require('./filter'); -exports.Comment = require('./comment'); -exports.Literal = require('./literal'); -exports.BlockComment = require('./block-comment'); -exports.Doctype = require('./doctype'); - -}); // module: nodes/index.js - -require.register("nodes/literal.js", function(module, exports, require){ - -/*! - * Jade - nodes - Literal - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Literal` node with the given `str. - * - * @param {String} str - * @api public - */ - -var Literal = module.exports = function Literal(str) { - this.str = str - .replace(/\\/g, "\\\\") - .replace(/\n|\r\n/g, "\\n") - .replace(/'/g, "\\'"); -}; - -/** - * Inherit from `Node`. - */ - -Literal.prototype = new Node; -Literal.prototype.constructor = Literal; - - -}); // module: nodes/literal.js - -require.register("nodes/mixin.js", function(module, exports, require){ - -/*! - * Jade - nodes - Mixin - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Attrs = require('./attrs'); - -/** - * Initialize a new `Mixin` with `name` and `block`. - * - * @param {String} name - * @param {String} args - * @param {Block} block - * @api public - */ - -var Mixin = module.exports = function Mixin(name, args, block, call){ - this.name = name; - this.args = args; - this.block = block; - this.attrs = []; - this.call = call; -}; - -/** - * Inherit from `Attrs`. - */ - -Mixin.prototype = new Attrs; -Mixin.prototype.constructor = Mixin; - - - -}); // module: nodes/mixin.js - -require.register("nodes/node.js", function(module, exports, require){ - -/*! - * Jade - nodes - Node - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Initialize a `Node`. - * - * @api public - */ - -var Node = module.exports = function Node(){}; - -/** - * Clone this node (return itself) - * - * @return {Node} - * @api private - */ - -Node.prototype.clone = function(){ - return this; -}; - -}); // module: nodes/node.js - -require.register("nodes/tag.js", function(module, exports, require){ - -/*! - * Jade - nodes - Tag - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Attrs = require('./attrs'), - Block = require('./block'), - inlineTags = require('../inline-tags'); - -/** - * Initialize a `Tag` node with the given tag `name` and optional `block`. - * - * @param {String} name - * @param {Block} block - * @api public - */ - -var Tag = module.exports = function Tag(name, block) { - this.name = name; - this.attrs = []; - this.block = block || new Block; -}; - -/** - * Inherit from `Attrs`. - */ - -Tag.prototype = new Attrs; -Tag.prototype.constructor = Tag; - - -/** - * Clone this tag. - * - * @return {Tag} - * @api private - */ - -Tag.prototype.clone = function(){ - var clone = new Tag(this.name, this.block.clone()); - clone.line = this.line; - clone.attrs = this.attrs; - clone.textOnly = this.textOnly; - return clone; -}; - -/** - * Check if this tag is an inline tag. - * - * @return {Boolean} - * @api private - */ - -Tag.prototype.isInline = function(){ - return ~inlineTags.indexOf(this.name); -}; - -/** - * Check if this tag's contents can be inlined. Used for pretty printing. - * - * @return {Boolean} - * @api private - */ - -Tag.prototype.canInline = function(){ - var nodes = this.block.nodes; - - function isInline(node){ - // Recurse if the node is a block - if (node.isBlock) return node.nodes.every(isInline); - return node.isText || (node.isInline && node.isInline()); - } - - // Empty tag - if (!nodes.length) return true; - - // Text-only or inline-only tag - if (1 == nodes.length) return isInline(nodes[0]); - - // Multi-line inline-only tag - if (this.block.nodes.every(isInline)) { - for (var i = 1, len = nodes.length; i < len; ++i) { - if (nodes[i-1].isText && nodes[i].isText) - return false; - } - return true; - } - - // Mixed tag - return false; -}; -}); // module: nodes/tag.js - -require.register("nodes/text.js", function(module, exports, require){ - -/*! - * Jade - nodes - Text - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Text` node with optional `line`. - * - * @param {String} line - * @api public - */ - -var Text = module.exports = function Text(line) { - this.val = ''; - if ('string' == typeof line) this.val = line; -}; - -/** - * Inherit from `Node`. - */ - -Text.prototype = new Node; -Text.prototype.constructor = Text; - - -/** - * Flag as text. - */ - -Text.prototype.isText = true; -}); // module: nodes/text.js - -require.register("parser.js", function(module, exports, require){ - -/*! - * Jade - Parser - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Lexer = require('./lexer') - , nodes = require('./nodes'); - -/** - * Initialize `Parser` with the given input `str` and `filename`. - * - * @param {String} str - * @param {String} filename - * @param {Object} options - * @api public - */ - -var Parser = exports = module.exports = function Parser(str, filename, options){ - this.input = str; - this.lexer = new Lexer(str, options); - this.filename = filename; - this.blocks = {}; - this.mixins = {}; - this.options = options; - this.contexts = [this]; -}; - -/** - * Tags that may not contain tags. - */ - -var textOnly = exports.textOnly = ['script', 'style']; - -/** - * Parser prototype. - */ - -Parser.prototype = { - - /** - * Push `parser` onto the context stack, - * or pop and return a `Parser`. - */ - - context: function(parser){ - if (parser) { - this.contexts.push(parser); - } else { - return this.contexts.pop(); - } - }, - - /** - * Return the next token object. - * - * @return {Object} - * @api private - */ - - advance: function(){ - return this.lexer.advance(); - }, - - /** - * Skip `n` tokens. - * - * @param {Number} n - * @api private - */ - - skip: function(n){ - while (n--) this.advance(); - }, - - /** - * Single token lookahead. - * - * @return {Object} - * @api private - */ - - peek: function() { - return this.lookahead(1); - }, - - /** - * Return lexer lineno. - * - * @return {Number} - * @api private - */ - - line: function() { - return this.lexer.lineno; - }, - - /** - * `n` token lookahead. - * - * @param {Number} n - * @return {Object} - * @api private - */ - - lookahead: function(n){ - return this.lexer.lookahead(n); - }, - - /** - * Parse input returning a string of js for evaluation. - * - * @return {String} - * @api public - */ - - parse: function(){ - var block = new nodes.Block, parser; - block.line = this.line(); - - while ('eos' != this.peek().type) { - if ('newline' == this.peek().type) { - this.advance(); - } else { - block.push(this.parseExpr()); - } - } - - if (parser = this.extending) { - this.context(parser); - var ast = parser.parse(); - this.context(); - // hoist mixins - for (var name in this.mixins) - ast.unshift(this.mixins[name]); - return ast; - } - - return block; - }, - - /** - * Expect the given type, or throw an exception. - * - * @param {String} type - * @api private - */ - - expect: function(type){ - if (this.peek().type === type) { - return this.advance(); - } else { - throw new Error('expected "' + type + '", but got "' + this.peek().type + '"'); - } - }, - - /** - * Accept the given `type`. - * - * @param {String} type - * @api private - */ - - accept: function(type){ - if (this.peek().type === type) { - return this.advance(); - } - }, - - /** - * tag - * | doctype - * | mixin - * | include - * | filter - * | comment - * | text - * | each - * | code - * | yield - * | id - * | class - * | interpolation - */ - - parseExpr: function(){ - switch (this.peek().type) { - case 'tag': - return this.parseTag(); - case 'mixin': - return this.parseMixin(); - case 'block': - return this.parseBlock(); - case 'case': - return this.parseCase(); - case 'when': - return this.parseWhen(); - case 'default': - return this.parseDefault(); - case 'extends': - return this.parseExtends(); - case 'include': - return this.parseInclude(); - case 'doctype': - return this.parseDoctype(); - case 'filter': - return this.parseFilter(); - case 'comment': - return this.parseComment(); - case 'text': - return this.parseText(); - case 'each': - return this.parseEach(); - case 'code': - return this.parseCode(); - case 'call': - return this.parseCall(); - case 'interpolation': - return this.parseInterpolation(); - case 'yield': - this.advance(); - var block = new nodes.Block; - block.yield = true; - return block; - case 'id': - case 'class': - var tok = this.advance(); - this.lexer.defer(this.lexer.tok('tag', 'div')); - this.lexer.defer(tok); - return this.parseExpr(); - default: - throw new Error('unexpected token "' + this.peek().type + '"'); - } - }, - - /** - * Text - */ - - parseText: function(){ - var tok = this.expect('text') - , node = new nodes.Text(tok.val); - node.line = this.line(); - return node; - }, - - /** - * ':' expr - * | block - */ - - parseBlockExpansion: function(){ - if (':' == this.peek().type) { - this.advance(); - return new nodes.Block(this.parseExpr()); - } else { - return this.block(); - } - }, - - /** - * case - */ - - parseCase: function(){ - var val = this.expect('case').val - , node = new nodes.Case(val); - node.line = this.line(); - node.block = this.block(); - return node; - }, - - /** - * when - */ - - parseWhen: function(){ - var val = this.expect('when').val - return new nodes.Case.When(val, this.parseBlockExpansion()); - }, - - /** - * default - */ - - parseDefault: function(){ - this.expect('default'); - return new nodes.Case.When('default', this.parseBlockExpansion()); - }, - - /** - * code - */ - - parseCode: function(){ - var tok = this.expect('code') - , node = new nodes.Code(tok.val, tok.buffer, tok.escape) - , block - , i = 1; - node.line = this.line(); - while (this.lookahead(i) && 'newline' == this.lookahead(i).type) ++i; - block = 'indent' == this.lookahead(i).type; - if (block) { - this.skip(i-1); - node.block = this.block(); - } - return node; - }, - - /** - * comment - */ - - parseComment: function(){ - var tok = this.expect('comment') - , node; - - if ('indent' == this.peek().type) { - node = new nodes.BlockComment(tok.val, this.block(), tok.buffer); - } else { - node = new nodes.Comment(tok.val, tok.buffer); - } - - node.line = this.line(); - return node; - }, - - /** - * doctype - */ - - parseDoctype: function(){ - var tok = this.expect('doctype') - , node = new nodes.Doctype(tok.val); - node.line = this.line(); - return node; - }, - - /** - * filter attrs? text-block - */ - - parseFilter: function(){ - var block - , tok = this.expect('filter') - , attrs = this.accept('attrs'); - - this.lexer.pipeless = true; - block = this.parseTextBlock(); - this.lexer.pipeless = false; - - var node = new nodes.Filter(tok.val, block, attrs && attrs.attrs); - node.line = this.line(); - return node; - }, - - /** - * tag ':' attrs? block - */ - - parseASTFilter: function(){ - var block - , tok = this.expect('tag') - , attrs = this.accept('attrs'); - - this.expect(':'); - block = this.block(); - - var node = new nodes.Filter(tok.val, block, attrs && attrs.attrs); - node.line = this.line(); - return node; - }, - - /** - * each block - */ - - parseEach: function(){ - var tok = this.expect('each') - , node = new nodes.Each(tok.code, tok.val, tok.key); - node.line = this.line(); - node.block = this.block(); - return node; - }, - - /** - * 'extends' name - */ - - parseExtends: function(){ - var path = require('path') - , fs = require('fs') - , dirname = path.dirname - , basename = path.basename - , join = path.join; - - if (!this.filename) - throw new Error('the "filename" option is required to extend templates'); - - var path = this.expect('extends').val.trim() - , dir = dirname(this.filename); - - var path = join(dir, path + '.jade') - , str = fs.readFileSync(path, 'utf8') - , parser = new Parser(str, path, this.options); - - parser.blocks = this.blocks; - parser.contexts = this.contexts; - this.extending = parser; - - // TODO: null node - return new nodes.Literal(''); - }, - - /** - * 'block' name block - */ - - parseBlock: function(){ - var block = this.expect('block') - , mode = block.mode - , name = block.val.trim(); - - block = 'indent' == this.peek().type - ? this.block() - : new nodes.Block(new nodes.Literal('')); - - var prev = this.blocks[name]; - - if (prev) { - switch (prev.mode) { - case 'append': - block.nodes = block.nodes.concat(prev.nodes); - prev = block; - break; - case 'prepend': - block.nodes = prev.nodes.concat(block.nodes); - prev = block; - break; - } - } - - block.mode = mode; - return this.blocks[name] = prev || block; - }, - - /** - * include block? - */ - - parseInclude: function(){ - var path = require('path') - , fs = require('fs') - , dirname = path.dirname - , basename = path.basename - , join = path.join; - - var path = this.expect('include').val.trim() - , dir = dirname(this.filename); - - if (!this.filename) - throw new Error('the "filename" option is required to use includes'); - - // no extension - if (!~basename(path).indexOf('.')) { - path += '.jade'; - } - - // non-jade - if ('.jade' != path.substr(-5)) { - var path = join(dir, path) - , str = fs.readFileSync(path, 'utf8'); - return new nodes.Literal(str); - } - - var path = join(dir, path) - , str = fs.readFileSync(path, 'utf8') - , parser = new Parser(str, path, this.options); - parser.blocks = this.blocks; - parser.mixins = this.mixins; - - this.context(parser); - var ast = parser.parse(); - this.context(); - ast.filename = path; - - if ('indent' == this.peek().type) { - ast.includeBlock().push(this.block()); - } - - return ast; - }, - - /** - * call ident block - */ - - parseCall: function(){ - var tok = this.expect('call') - , name = tok.val - , args = tok.args - , mixin = new nodes.Mixin(name, args, new nodes.Block, true); - - this.tag(mixin); - if (mixin.block.isEmpty()) mixin.block = null; - return mixin; - }, - - /** - * mixin block - */ - - parseMixin: function(){ - var tok = this.expect('mixin') - , name = tok.val - , args = tok.args - , mixin; - - // definition - if ('indent' == this.peek().type) { - mixin = new nodes.Mixin(name, args, this.block(), false); - this.mixins[name] = mixin; - return mixin; - // call - } else { - return new nodes.Mixin(name, args, null, true); - } - }, - - /** - * indent (text | newline)* outdent - */ - - parseTextBlock: function(){ - var block = new nodes.Block; - block.line = this.line(); - var spaces = this.expect('indent').val; - if (null == this._spaces) this._spaces = spaces; - var indent = Array(spaces - this._spaces + 1).join(' '); - while ('outdent' != this.peek().type) { - switch (this.peek().type) { - case 'newline': - this.advance(); - break; - case 'indent': - this.parseTextBlock().nodes.forEach(function(node){ - block.push(node); - }); - break; - default: - var text = new nodes.Text(indent + this.advance().val); - text.line = this.line(); - block.push(text); - } - } - - if (spaces == this._spaces) this._spaces = null; - this.expect('outdent'); - return block; - }, - - /** - * indent expr* outdent - */ - - block: function(){ - var block = new nodes.Block; - block.line = this.line(); - this.expect('indent'); - while ('outdent' != this.peek().type) { - if ('newline' == this.peek().type) { - this.advance(); - } else { - block.push(this.parseExpr()); - } - } - this.expect('outdent'); - return block; - }, - - /** - * interpolation (attrs | class | id)* (text | code | ':')? newline* block? - */ - - parseInterpolation: function(){ - var tok = this.advance(); - var tag = new nodes.Tag(tok.val); - tag.buffer = true; - return this.tag(tag); - }, - - /** - * tag (attrs | class | id)* (text | code | ':')? newline* block? - */ - - parseTag: function(){ - // ast-filter look-ahead - var i = 2; - if ('attrs' == this.lookahead(i).type) ++i; - if (':' == this.lookahead(i).type) { - if ('indent' == this.lookahead(++i).type) { - return this.parseASTFilter(); - } - } - - var tok = this.advance() - , tag = new nodes.Tag(tok.val); - - tag.selfClosing = tok.selfClosing; - - return this.tag(tag); - }, - - /** - * Parse tag. - */ - - tag: function(tag){ - var dot; - - tag.line = this.line(); - - // (attrs | class | id)* - out: - while (true) { - switch (this.peek().type) { - case 'id': - case 'class': - var tok = this.advance(); - tag.setAttribute(tok.type, "'" + tok.val + "'"); - continue; - case 'attrs': - var tok = this.advance() - , obj = tok.attrs - , escaped = tok.escaped - , names = Object.keys(obj); - - if (tok.selfClosing) tag.selfClosing = true; - - for (var i = 0, len = names.length; i < len; ++i) { - var name = names[i] - , val = obj[name]; - tag.setAttribute(name, val, escaped[name]); - } - continue; - default: - break out; - } - } - - // check immediate '.' - if ('.' == this.peek().val) { - dot = tag.textOnly = true; - this.advance(); - } - - // (text | code | ':')? - switch (this.peek().type) { - case 'text': - tag.block.push(this.parseText()); - break; - case 'code': - tag.code = this.parseCode(); - break; - case ':': - this.advance(); - tag.block = new nodes.Block; - tag.block.push(this.parseExpr()); - break; - } - - // newline* - while ('newline' == this.peek().type) this.advance(); - - tag.textOnly = tag.textOnly || ~textOnly.indexOf(tag.name); - - // script special-case - if ('script' == tag.name) { - var type = tag.getAttribute('type'); - if (!dot && type && 'text/javascript' != type.replace(/^['"]|['"]$/g, '')) { - tag.textOnly = false; - } - } - - // block? - if ('indent' == this.peek().type) { - if (tag.textOnly) { - this.lexer.pipeless = true; - tag.block = this.parseTextBlock(); - this.lexer.pipeless = false; - } else { - var block = this.block(); - if (tag.block) { - for (var i = 0, len = block.nodes.length; i < len; ++i) { - tag.block.push(block.nodes[i]); - } - } else { - tag.block = block; - } - } - } - - return tag; - } -}; - -}); // module: parser.js - -require.register("runtime.js", function(module, exports, require){ - -/*! - * Jade - runtime - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Lame Array.isArray() polyfill for now. - */ - -if (!Array.isArray) { - Array.isArray = function(arr){ - return '[object Array]' == Object.prototype.toString.call(arr); - }; -} - -/** - * Lame Object.keys() polyfill for now. - */ - -if (!Object.keys) { - Object.keys = function(obj){ - var arr = []; - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - arr.push(key); - } - } - return arr; - } -} - -/** - * Merge two attribute objects giving precedence - * to values in object `b`. Classes are special-cased - * allowing for arrays and merging/joining appropriately - * resulting in a string. - * - * @param {Object} a - * @param {Object} b - * @return {Object} a - * @api private - */ - -exports.merge = function merge(a, b) { - var ac = a['class']; - var bc = b['class']; - - if (ac || bc) { - ac = ac || []; - bc = bc || []; - if (!Array.isArray(ac)) ac = [ac]; - if (!Array.isArray(bc)) bc = [bc]; - ac = ac.filter(nulls); - bc = bc.filter(nulls); - a['class'] = ac.concat(bc).join(' '); - } - - for (var key in b) { - if (key != 'class') { - a[key] = b[key]; - } - } - - return a; -}; - -/** - * Filter null `val`s. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - -function nulls(val) { - return val != null; -} - -/** - * Render the given attributes object. - * - * @param {Object} obj - * @param {Object} escaped - * @return {String} - * @api private - */ - -exports.attrs = function attrs(obj, escaped){ - var buf = [] - , terse = obj.terse; - - delete obj.terse; - var keys = Object.keys(obj) - , len = keys.length; - - if (len) { - buf.push(''); - for (var i = 0; i < len; ++i) { - var key = keys[i] - , val = obj[key]; - - if ('boolean' == typeof val || null == val) { - if (val) { - terse - ? buf.push(key) - : buf.push(key + '="' + key + '"'); - } - } else if (0 == key.indexOf('data') && 'string' != typeof val) { - buf.push(key + "='" + JSON.stringify(val) + "'"); - } else if ('class' == key && Array.isArray(val)) { - buf.push(key + '="' + exports.escape(val.join(' ')) + '"'); - } else if (escaped && escaped[key]) { - buf.push(key + '="' + exports.escape(val) + '"'); - } else { - buf.push(key + '="' + val + '"'); - } - } - } - - return buf.join(' '); -}; - -/** - * Escape the given string of `html`. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function escape(html){ - return String(html) - .replace(/&(?!(\w+|\#\d+);)/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); -}; - -/** - * Re-throw the given `err` in context to the - * the jade in `filename` at the given `lineno`. - * - * @param {Error} err - * @param {String} filename - * @param {String} lineno - * @api private - */ - -exports.rethrow = function rethrow(err, filename, lineno){ - if (!filename) throw err; - - var context = 3 - , str = require('fs').readFileSync(filename, 'utf8') - , lines = str.split('\n') - , start = Math.max(lineno - context, 0) - , end = Math.min(lines.length, lineno + context); - - // Error context - var context = lines.slice(start, end).map(function(line, i){ - var curr = i + start + 1; - return (curr == lineno ? ' > ' : ' ') - + curr - + '| ' - + line; - }).join('\n'); - - // Alter exception message - err.path = filename; - err.message = (filename || 'Jade') + ':' + lineno - + '\n' + context + '\n\n' + err.message; - throw err; -}; - -}); // module: runtime.js - -require.register("self-closing.js", function(module, exports, require){ - -/*! - * Jade - self closing tags - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = [ - 'meta' - , 'img' - , 'link' - , 'input' - , 'source' - , 'area' - , 'base' - , 'col' - , 'br' - , 'hr' -]; -}); // module: self-closing.js - -require.register("utils.js", function(module, exports, require){ - -/*! - * Jade - utils - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Convert interpolation in the given string to JavaScript. - * - * @param {String} str - * @return {String} - * @api private - */ - -var interpolate = exports.interpolate = function(str){ - return str.replace(/(\\)?([#!]){(.*?)}/g, function(str, escape, flag, code){ - return escape - ? str - : "' + " - + ('!' == flag ? '' : 'escape') - + "((interp = " + code.replace(/\\'/g, "'") - + ") == null ? '' : interp) + '"; - }); -}; - -/** - * Escape single quotes in `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -var escape = exports.escape = function(str) { - return str.replace(/'/g, "\\'"); -}; - -/** - * Interpolate, and escape the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.text = function(str){ - return interpolate(escape(str)); -}; -}); // module: utils.js - -window.jade = require("jade"); -})(); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/jade.md b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/jade.md deleted file mode 100644 index 051dc031..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/jade.md +++ /dev/null @@ -1,510 +0,0 @@ - -# Jade - - The jade template engine for node.js - -## Synopsis - - jade [-h|--help] [-v|--version] [-o|--obj STR] - [-O|--out DIR] [-p|--path PATH] [-P|--pretty] - [-c|--client] [-D|--no-debug] - -## Examples - - translate jade the templates dir - - $ jade templates - - create {foo,bar}.html - - $ jade {foo,bar}.jade - - jade over stdio - - $ jade < my.jade > my.html - - jade over s - - $ echo "h1 Jade!" | jade - - foo, bar dirs rendering to /tmp - - $ jade foo bar --out /tmp - - compile client-side templates without debugging - instrumentation, making the output javascript - very light-weight. This requires runtime.js - in your projects. - - $ jade --client --no-debug < my.jade - -## Tags - - Tags are simply nested via whitespace, closing - tags defined for you. These indents are called "blocks". - - ul - li - a Foo - li - a Bar - - You may have several tags in one "block": - - ul - li - a Foo - a Bar - a Baz - -## Self-closing Tags - - Some tags are flagged as self-closing by default, such - as `meta`, `link`, and so on. To explicitly self-close - a tag simply append the `/` character: - - foo/ - foo(bar='baz')/ - - Would yield: - - - - -## Attributes - - Tag attributes look similar to HTML, however - the values are regular JavaScript, here are - some examples: - - a(href='google.com') Google - a(class='button', href='google.com') Google - - As mentioned the attribute values are just JavaScript, - this means ternary operations and other JavaScript expressions - work just fine: - - body(class=user.authenticated ? 'authenticated' : 'anonymous') - a(href=user.website || 'http://google.com') - - Multiple lines work too: - - input(type='checkbox', - name='agreement', - checked) - - Multiple lines without the comma work fine: - - input(type='checkbox' - name='agreement' - checked) - - Funky whitespace? fine: - - input( - type='checkbox' - name='agreement' - checked) - -## Boolean attributes - - Boolean attributes are mirrored by Jade, and accept - bools, aka _true_ or _false_. When no value is specified - _true_ is assumed. For example: - - input(type="checkbox", checked) - // => "" - - For example if the checkbox was for an agreement, perhaps `user.agreed` - was _true_ the following would also output 'checked="checked"': - - input(type="checkbox", checked=user.agreed) - -## Class attributes - - The _class_ attribute accepts an array of classes, - this can be handy when generated from a javascript - function etc: - - classes = ['foo', 'bar', 'baz'] - a(class=classes) - // => "" - -## Class literal - - Classes may be defined using a ".CLASSNAME" syntax: - - .button - // => "
      " - - Or chained: - - .large.button - // => "
      " - - The previous defaulted to divs, however you - may also specify the tag type: - - h1.title My Title - // => "

      My Title

      " - -## Id literal - - Much like the class literal there's an id literal: - - #user-1 - // => "
      " - - Again we may specify the tag as well: - - ul#menu - li: a(href='/home') Home - li: a(href='/store') Store - li: a(href='/contact') Contact - - Finally all of these may be used in any combination, - the following are all valid tags: - - a.button#contact(style: 'color: red') Contact - a.button(style: 'color: red')#contact Contact - a(style: 'color: red').button#contact Contact - -## Block expansion - - Jade supports the concept of "block expansion", in which - using a trailing ":" after a tag will inject a block: - - ul - li: a Foo - li: a Bar - li: a Baz - -## Text - - Arbitrary text may follow tags: - - p Welcome to my site - - yields: - -

      Welcome to my site

      - -## Pipe text - - Another form of text is "pipe" text. Pipes act - as the text margin for large bodies of text. - - p - | This is a large - | body of text for - | this tag. - | - | Nothing too - | exciting. - - yields: - -

      This is a large - body of text for - this tag. - - Nothing too - exciting. -

      - - Using pipes we can also specify regular Jade tags - within the text: - - p - | Click to visit - a(href='http://google.com') Google - | if you want. - -## Text only tags - - As an alternative to pipe text you may add - a trailing "." to indicate that the block - contains nothing but plain-text, no tags: - - p. - This is a large - body of text for - this tag. - - Nothing too - exciting. - - Some tags are text-only by default, for example - _script_, _textarea_, and _style_ tags do not - contain nested HTML so Jade implies the trailing ".": - - script - if (foo) { - bar(); - } - - style - body { - padding: 50px; - font: 14px Helvetica; - } - -## Template script tags - - Sometimes it's useful to define HTML in script - tags using Jade, typically for client-side templates. - - To do this simply give the _script_ tag an arbitrary - _type_ attribute such as _text/x-template_: - - script(type='text/template') - h1 Look! - p Jade still works in here! - -## Interpolation - - Both plain-text and piped-text support interpolation, - which comes in two forms, escapes and non-escaped. The - following will output the _user.name_ in the paragraph - but HTML within it will be escaped to prevent XSS attacks: - - p Welcome #{user.name} - - The following syntax is identical however it will _not_ escape - HTML, and should only be used with strings that you trust: - - p Welcome !{user.name} - -## Inline HTML - - Sometimes constructing small inline snippets of HTML - in Jade can be annoying, luckily we can add plain - HTML as well: - - p Welcome #{user.name} - -## Code - - To buffer output with Jade simply use _=_ at the beginning - of a line or after a tag. This method escapes any HTML - present in the string. - - p= user.description - - To buffer output unescaped use the _!=_ variant, but again - be careful of XSS. - - p!= user.description - - The final way to mess with JavaScript code in Jade is the unbuffered - _-_, which can be used for conditionals, defining variables etc: - - - var user = { description: 'foo bar baz' } - #user - - if (user.description) { - h2 Description - p.description= user.description - - } - - When compiled blocks are wrapped in anonymous functions, so the - following is also valid, without braces: - - - var user = { description: 'foo bar baz' } - #user - - if (user.description) - h2 Description - p.description= user.description - - If you really want you could even use `.forEach()` and others: - - - users.forEach(function(user){ - .user - h2= user.name - p User #{user.name} is #{user.age} years old - - }) - - Taking this further Jade provides some syntax for conditionals, - iteration, switch statements etc. Let's look at those next! - -## Assignment - - Jade's first-class assignment is simple, simply use the _=_ - operator and Jade will _var_ it for you. The following are equivalent: - - - var user = { name: 'tobi' } - user = { name: 'tobi' } - -## Conditionals - - Jade's first-class conditional syntax allows for optional - parenthesis, and you may now omit the leading _-_ otherwise - it's identical, still just regular javascript: - - user = { description: 'foo bar baz' } - #user - if user.description - h2 Description - p.description= user.description - - Jade provides the negated version, _unless_ as well, the following - are equivalent: - - - if (!(user.isAnonymous)) - p You're logged in as #{user.name} - - unless user.isAnonymous - p You're logged in as #{user.name} - -## Iteration - - JavaScript's _for_ loops don't look very declarative, so Jade - also provides its own _for_ loop construct, aliased as _each_: - - for user in users - .user - h2= user.name - p user #{user.name} is #{user.age} year old - - As mentioned _each_ is identical: - - each user in users - .user - h2= user.name - - If necessary the index is available as well: - - for user, i in users - .user(class='user-#{i}') - h2= user.name - - Remember, it's just JavaScript: - - ul#letters - for letter in ['a', 'b', 'c'] - li= letter - -## Mixins - - Mixins provide a way to define jade "functions" which "mix in" - their contents when called. This is useful for abstracting - out large fragments of Jade. - - The simplest possible mixin which accepts no arguments might - look like this: - - mixin hello - p Hello - - You use a mixin by placing `+` before the name: - - +hello - - For something a little more dynamic, mixins can take - arguments, the mixin itself is converted to a javascript - function internally: - - mixin hello(user) - p Hello #{user} - - +hello('Tobi') - - Yields: - -

      Hello Tobi

      - - Mixins may optionally take blocks, when a block is passed - its contents becomes the implicit `block` argument. For - example here is a mixin passed a block, and also invoked - without passing a block: - - mixin article(title) - .article - .article-wrapper - h1= title - if block - block - else - p No content provided - - +article('Hello world') - - +article('Hello world') - p This is my - p Amazing article - - yields: - -
      -
      -

      Hello world

      -

      No content provided

      -
      -
      - -
      -
      -

      Hello world

      -

      This is my

      -

      Amazing article

      -
      -
      - - Mixins can even take attributes, just like a tag. When - attributes are passed they become the implicit `attributes` - argument. Individual attributes can be accessed just like - normal object properties: - - mixin centered - .centered(class=attributes.class) - block - - +centered.bold Hello world - - +centered.red - p This is my - p Amazing article - - yields: - -
      Hello world
      -
      -

      This is my

      -

      Amazing article

      -
      - - If you use `attributes` directly, *all* passed attributes - get used: - - mixin link - a.menu(attributes) - block - - +link.highlight(href='#top') Top - +link#sec1.plain(href='#section1') Section 1 - +link#sec2.plain(href='#section2') Section 2 - - yields: - - Top - Section 1 - Section 2 - - If you pass arguments, they must directly follow the mixin: - - mixin list(arr) - if block - .title - block - ul(attributes) - each item in arr - li= item - - +list(['foo', 'bar', 'baz'])(id='myList', class='bold') - - yields: - -
        -
      • foo
      • -
      • bar
      • -
      • baz
      • -
      diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/jade.min.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/jade.min.js deleted file mode 100644 index 72e4535e..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/jade.min.js +++ /dev/null @@ -1,2 +0,0 @@ -(function(){function require(p){var path=require.resolve(p),mod=require.modules[path];if(!mod)throw new Error('failed to require "'+p+'"');return mod.exports||(mod.exports={},mod.call(mod.exports,mod,mod.exports,require.relative(path))),mod.exports}require.modules={},require.resolve=function(path){var orig=path,reg=path+".js",index=path+"/index.js";return require.modules[reg]&®||require.modules[index]&&index||orig},require.register=function(path,fn){require.modules[path]=fn},require.relative=function(parent){return function(p){if("."!=p.charAt(0))return require(p);var path=parent.split("/"),segs=p.split("/");path.pop();for(var i=0;i",this.doctype=doctype,this.terse="5"==name||"html"==name,this.xml=0==this.doctype.indexOf("1&&!escape&&block.nodes[0].isText&&block.nodes[1].isText&&this.prettyIndent(1,!0);for(var i=0;i0&&!escape&&block.nodes[i].isText&&block.nodes[i-1].isText&&this.prettyIndent(1,!1),this.visit(block.nodes[i]),block.nodes[i+1]&&block.nodes[i].isText&&block.nodes[i+1].isText&&this.buffer("\\n")},visitDoctype:function(doctype){doctype&&(doctype.val||!this.doctype)&&this.setDoctype(doctype.val||"default"),this.doctype&&this.buffer(this.doctype),this.hasCompiledDoctype=!0},visitMixin:function(mixin){var name=mixin.name.replace(/-/g,"_")+"_mixin",args=mixin.args||"",block=mixin.block,attrs=mixin.attrs,pp=this.pp;if(mixin.call){pp&&this.buf.push("__indent.push('"+Array(this.indents+1).join(" ")+"');");if(block||attrs.length){this.buf.push(name+".call({");if(block){this.buf.push("block: function(){"),this.parentIndents++;var _indents=this.indents;this.indents=0,this.visit(mixin.block),this.indents=_indents,this.parentIndents--,attrs.length?this.buf.push("},"):this.buf.push("}")}if(attrs.length){var val=this.attrs(attrs);val.inherits?this.buf.push("attributes: merge({"+val.buf+"}, attributes), escaped: merge("+val.escaped+", escaped, true)"):this.buf.push("attributes: {"+val.buf+"}, escaped: "+val.escaped)}args?this.buf.push("}, "+args+");"):this.buf.push("});")}else this.buf.push(name+"("+args+");");pp&&this.buf.push("__indent.pop();")}else this.buf.push("var "+name+" = function("+args+"){"),this.buf.push("var block = this.block, attributes = this.attributes || {}, escaped = this.escaped || {};"),this.parentIndents++,this.visit(block),this.parentIndents--,this.buf.push("};")},visitTag:function(tag){this.indents++;var name=tag.name,pp=this.pp;tag.buffer&&(name="' + ("+name+") + '"),this.hasCompiledTag||(!this.hasCompiledDoctype&&"html"==name&&this.visitDoctype(),this.hasCompiledTag=!0),pp&&!tag.isInline()&&this.prettyIndent(0,!0),(~selfClosing.indexOf(name)||tag.selfClosing)&&!this.xml?(this.buffer("<"+name),this.visitAttributes(tag.attrs),this.terse?this.buffer(">"):this.buffer("/>")):(tag.attrs.length?(this.buffer("<"+name),tag.attrs.length&&this.visitAttributes(tag.attrs),this.buffer(">")):this.buffer("<"+name+">"),tag.code&&this.visitCode(tag.code),this.escape="pre"==tag.name,this.visit(tag.block),pp&&!tag.isInline()&&"pre"!=tag.name&&!tag.canInline()&&this.prettyIndent(0,!0),this.buffer("")),this.indents--},visitFilter:function(filter){var fn=filters[filter.name];if(!fn)throw filter.isASTFilter?new Error('unknown ast filter "'+filter.name+':"'):new Error('unknown filter ":'+filter.name+'"');if(filter.isASTFilter)this.buf.push(fn(filter.block,this,filter.attrs));else{var text=filter.block.nodes.map(function(node){return node.val}).join("\n");filter.attrs=filter.attrs||{},filter.attrs.filename=this.options.filename,this.buffer(utils.text(fn(text,filter.attrs)))}},visitText:function(text){text=utils.text(text.val.replace(/\\/g,"\\\\")),this.escape&&(text=escape(text)),this.buffer(text)},visitComment:function(comment){if(!comment.buffer)return;this.pp&&this.prettyIndent(1,!0),this.buffer("")},visitBlockComment:function(comment){if(!comment.buffer)return;0==comment.val.trim().indexOf("if")?(this.buffer("")):(this.buffer(""))},visitCode:function(code){if(code.buffer){var val=code.val.trimLeft();this.buf.push("var __val__ = "+val),val='null == __val__ ? "" : __val__',code.escape&&(val="escape("+val+")"),this.buf.push("buf.push("+val+");")}else this.buf.push(code.val);code.block&&(code.buffer||this.buf.push("{"),this.visit(code.block),code.buffer||this.buf.push("}"))},visitEach:function(each){this.buf.push("// iterate "+each.obj+"\n"+";(function(){\n"+" if ('number' == typeof "+each.obj+".length) {\n"+" for (var "+each.key+" = 0, $$l = "+each.obj+".length; "+each.key+" < $$l; "+each.key+"++) {\n"+" var "+each.val+" = "+each.obj+"["+each.key+"];\n"),this.visit(each.block),this.buf.push(" }\n } else {\n for (var "+each.key+" in "+each.obj+") {\n"+" if ("+each.obj+".hasOwnProperty("+each.key+")){"+" var "+each.val+" = "+each.obj+"["+each.key+"];\n"),this.visit(each.block),this.buf.push(" }\n"),this.buf.push(" }\n }\n}).call(this);\n")},visitAttributes:function(attrs){var val=this.attrs(attrs);val.inherits?this.buf.push("buf.push(attrs(merge({ "+val.buf+" }, attributes), merge("+val.escaped+", escaped, true)));"):val.constant?(eval("var buf={"+val.buf+"};"),this.buffer(runtime.attrs(buf,JSON.parse(val.escaped)),!0)):this.buf.push("buf.push(attrs({ "+val.buf+" }, "+val.escaped+"));")},attrs:function(attrs){var buf=[],classes=[],escaped={},constant=attrs.every(function(attr){return isConstant(attr.val)}),inherits=!1;return this.terse&&buf.push("terse: true"),attrs.forEach(function(attr){if(attr.name=="attributes")return inherits=!0;escaped[attr.name]=attr.escaped;if(attr.name=="class")classes.push("("+attr.val+")");else{var pair="'"+attr.name+"':("+attr.val+")";buf.push(pair)}}),classes.length&&(classes=classes.join(" + ' ' + "),buf.push("class: "+classes)),{buf:buf.join(", ").replace("class:",'"class":'),escaped:JSON.stringify(escaped),inherits:inherits,constant:constant}}};function isConstant(val){if(/^ *("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'|true|false|null|undefined) *$/i.test(val))return!0;if(!isNaN(Number(val)))return!0;var matches;return(matches=/^ *\[(.*)\] *$/.exec(val))?matches[1].split(",").every(isConstant):!1}function escape(html){return String(html).replace(/&(?!\w+;)/g,"&").replace(//g,">").replace(/"/g,""")}}),require.register("doctypes.js",function(module,exports,require){module.exports={5:"","default":"",xml:'',transitional:'',strict:'',frameset:'',1.1:'',basic:'',mobile:''}}),require.register("filters.js",function(module,exports,require){module.exports={cdata:function(str){return""},sass:function(str){str=str.replace(/\\n/g,"\n");var sass=require("sass").render(str).replace(/\n/g,"\\n");return'"},stylus:function(str,options){var ret;str=str.replace(/\\n/g,"\n");var stylus=require("stylus");return stylus(str,options).render(function(err,css){if(err)throw err;ret=css.replace(/\n/g,"\\n")}),'"},less:function(str){var ret;return str=str.replace(/\\n/g,"\n"),require("less").render(str,function(err,css){if(err)throw err;ret='"}),ret},markdown:function(str){var md;try{md=require("markdown")}catch(err){try{md=require("discount")}catch(err){try{md=require("markdown-js")}catch(err){try{md=require("marked")}catch(err){throw new Error("Cannot find markdown library, install markdown, discount, or marked.")}}}}return str=str.replace(/\\n/g,"\n"),md.parse(str).replace(/\n/g,"\\n").replace(/'/g,"'")},coffeescript:function(str){str=str.replace(/\\n/g,"\n");var js=require("coffee-script").compile(str).replace(/\\/g,"\\\\").replace(/\n/g,"\\n");return'"}}}),require.register("inline-tags.js",function(module,exports,require){module.exports=["a","abbr","acronym","b","br","code","em","font","i","img","ins","kbd","map","samp","small","span","strong","sub","sup"]}),require.register("jade.js",function(module,exports,require){var Parser=require("./parser"),Lexer=require("./lexer"),Compiler=require("./compiler"),runtime=require("./runtime");exports.version="0.26.1",exports.selfClosing=require("./self-closing"),exports.doctypes=require("./doctypes"),exports.filters=require("./filters"),exports.utils=require("./utils"),exports.Compiler=Compiler,exports.Parser=Parser,exports.Lexer=Lexer,exports.nodes=require("./nodes"),exports.runtime=runtime,exports.cache={};function parse(str,options){try{var parser=new Parser(str,options.filename,options),compiler=new(options.compiler||Compiler)(parser.parse(),options),js=compiler.compile();return options.debug&&console.error("\nCompiled Function:\n\n%s",js.replace(/^/gm," ")),"var buf = [];\n"+(options.self?"var self = locals || {};\n"+js:"with (locals || {}) {\n"+js+"\n}\n")+'return buf.join("");'}catch(err){parser=parser.context(),runtime.rethrow(err,parser.filename,parser.lexer.lineno)}}exports.compile=function(str,options){var options=options||{},client=options.client,filename=options.filename?JSON.stringify(options.filename):"undefined",fn;return options.compileDebug!==!1?fn=["var __jade = [{ lineno: 1, filename: "+filename+" }];","try {",parse(String(str),options),"} catch (err) {"," rethrow(err, __jade[0].filename, __jade[0].lineno);","}"].join("\n"):fn=parse(String(str),options),client&&(fn="attrs = attrs || jade.attrs; escape = escape || jade.escape; rethrow = rethrow || jade.rethrow; merge = merge || jade.merge;\n"+fn),fn=new Function("locals, attrs, escape, rethrow, merge",fn),client?fn:function(locals){return fn(locals,runtime.attrs,runtime.escape,runtime.rethrow,runtime.merge)}},exports.render=function(str,options,fn){"function"==typeof options&&(fn=options,options={});if(options.cache&&!options.filename)return fn(new Error('the "filename" option is required for caching'));try{var path=options.filename,tmpl=options.cache?exports.cache[path]||(exports.cache[path]=exports.compile(str,options)):exports.compile(str,options);fn(null,tmpl(options))}catch(err){fn(err)}},exports.renderFile=function(path,options,fn){var key=path+":string";"function"==typeof options&&(fn=options,options={});try{options.filename=path;var str=options.cache?exports.cache[key]||(exports.cache[key]=fs.readFileSync(path,"utf8")):fs.readFileSync(path,"utf8");exports.render(str,options,fn)}catch(err){fn(err)}},exports.__express=exports.renderFile}),require.register("lexer.js",function(module,exports,require){var Lexer=module.exports=function Lexer(str,options){options=options||{},this.input=str.replace(/\r\n|\r/g,"\n"),this.colons=options.colons,this.deferredTokens=[],this.lastIndents=0,this.lineno=1,this.stash=[],this.indentStack=[],this.indentRe=null,this.pipeless=!1};Lexer.prototype={tok:function(type,val){return{type:type,line:this.lineno,val:val}},consume:function(len){this.input=this.input.substr(len)},scan:function(regexp,type){var captures;if(captures=regexp.exec(this.input))return this.consume(captures[0].length),this.tok(type,captures[1])},defer:function(tok){this.deferredTokens.push(tok)},lookahead:function(n){var fetch=n-this.stash.length;while(fetch-->0)this.stash.push(this.next());return this.stash[--n]},indexOfDelimiters:function(start,end){var str=this.input,nstart=0,nend=0,pos=0;for(var i=0,len=str.length;iindents)this.stash.push(this.tok("outdent")),this.indentStack.shift();tok=this.stash.pop()}else indents&&indents!=this.indentStack[0]?(this.indentStack.unshift(indents),tok=this.tok("indent",indents)):tok=this.tok("newline");return tok}},pipelessText:function(){if(this.pipeless){if("\n"==this.input[0])return;var i=this.input.indexOf("\n");-1==i&&(i=this.input.length);var str=this.input.substr(0,i);return this.consume(str.length),this.tok("text",str)}},colon:function(){return this.scan(/^: */,":")},advance:function(){return this.stashed()||this.next()},next:function(){return this.deferred()||this.blank()||this.eos()||this.pipelessText()||this.yield()||this.doctype()||this.interpolation()||this["case"]()||this.when()||this["default"]()||this["extends"]()||this.append()||this.prepend()||this.block()||this.include()||this.mixin()||this.call()||this.conditional()||this.each()||this["while"]()||this.assignment()||this.tag()||this.filter()||this.code()||this.id()||this.className()||this.attrs()||this.indent()||this.comment()||this.colon()||this.text()}}}),require.register("nodes/attrs.js",function(module,exports,require){var Node=require("./node"),Block=require("./block"),Attrs=module.exports=function Attrs(){this.attrs=[]};Attrs.prototype=new Node,Attrs.prototype.constructor=Attrs,Attrs.prototype.setAttribute=function(name,val,escaped){return this.attrs.push({name:name,val:val,escaped:escaped}),this},Attrs.prototype.removeAttribute=function(name){for(var i=0,len=this.attrs.length;i/g,">").replace(/"/g,""")},exports.rethrow=function rethrow(err,filename,lineno){if(!filename)throw err;var context=3,str=require("fs").readFileSync(filename,"utf8"),lines=str.split("\n"),start=Math.max(lineno-context,0),end=Math.min(lines.length,lineno+context),context=lines.slice(start,end).map(function(line,i){var curr=i+start+1;return(curr==lineno?" > ":" ")+curr+"| "+line}).join("\n");throw err.path=filename,err.message=(filename||"Jade")+":"+lineno+"\n"+context+"\n\n"+err.message,err}}),require.register("self-closing.js",function(module,exports,require){module.exports=["meta","img","link","input","source","area","base","col","br","hr"]}),require.register("utils.js",function(module,exports,require){var interpolate=exports.interpolate=function(str){return str.replace(/(\\)?([#!]){(.*?)}/g,function(str,escape,flag,code){return escape?str:"' + "+("!"==flag?"":"escape")+"((interp = "+code.replace(/\\'/g,"'")+") == null ? '' : interp) + '"})},escape=exports.escape=function(str){return str.replace(/'/g,"\\'")};exports.text=function(str){return interpolate(escape(str))}}),window.jade=require("jade")})(); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/compiler.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/compiler.js deleted file mode 100644 index 516ac83d..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/compiler.js +++ /dev/null @@ -1,642 +0,0 @@ - -/*! - * Jade - Compiler - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var nodes = require('./nodes') - , filters = require('./filters') - , doctypes = require('./doctypes') - , selfClosing = require('./self-closing') - , runtime = require('./runtime') - , utils = require('./utils'); - -// if browser -// -// if (!Object.keys) { -// Object.keys = function(obj){ -// var arr = []; -// for (var key in obj) { -// if (obj.hasOwnProperty(key)) { -// arr.push(key); -// } -// } -// return arr; -// } -// } -// -// if (!String.prototype.trimLeft) { -// String.prototype.trimLeft = function(){ -// return this.replace(/^\s+/, ''); -// } -// } -// -// end - - -/** - * Initialize `Compiler` with the given `node`. - * - * @param {Node} node - * @param {Object} options - * @api public - */ - -var Compiler = module.exports = function Compiler(node, options) { - this.options = options = options || {}; - this.node = node; - this.hasCompiledDoctype = false; - this.hasCompiledTag = false; - this.pp = options.pretty || false; - this.debug = false !== options.compileDebug; - this.indents = 0; - this.parentIndents = 0; - if (options.doctype) this.setDoctype(options.doctype); -}; - -/** - * Compiler prototype. - */ - -Compiler.prototype = { - - /** - * Compile parse tree to JavaScript. - * - * @api public - */ - - compile: function(){ - this.buf = ['var interp;']; - if (this.pp) this.buf.push("var __indent = [];"); - this.lastBufferedIdx = -1; - this.visit(this.node); - return this.buf.join('\n'); - }, - - /** - * Sets the default doctype `name`. Sets terse mode to `true` when - * html 5 is used, causing self-closing tags to end with ">" vs "/>", - * and boolean attributes are not mirrored. - * - * @param {string} name - * @api public - */ - - setDoctype: function(name){ - var doctype = doctypes[(name || 'default').toLowerCase()]; - doctype = doctype || ''; - this.doctype = doctype; - this.terse = '5' == name || 'html' == name; - this.xml = 0 == this.doctype.indexOf(' 1 && !escape && block.nodes[0].isText && block.nodes[1].isText) - this.prettyIndent(1, true); - - for (var i = 0; i < len; ++i) { - // Pretty print text - if (pp && i > 0 && !escape && block.nodes[i].isText && block.nodes[i-1].isText) - this.prettyIndent(1, false); - - this.visit(block.nodes[i]); - // Multiple text nodes are separated by newlines - if (block.nodes[i+1] && block.nodes[i].isText && block.nodes[i+1].isText) - this.buffer('\\n'); - } - }, - - /** - * Visit `doctype`. Sets terse mode to `true` when html 5 - * is used, causing self-closing tags to end with ">" vs "/>", - * and boolean attributes are not mirrored. - * - * @param {Doctype} doctype - * @api public - */ - - visitDoctype: function(doctype){ - if (doctype && (doctype.val || !this.doctype)) { - this.setDoctype(doctype.val || 'default'); - } - - if (this.doctype) this.buffer(this.doctype); - this.hasCompiledDoctype = true; - }, - - /** - * Visit `mixin`, generating a function that - * may be called within the template. - * - * @param {Mixin} mixin - * @api public - */ - - visitMixin: function(mixin){ - var name = mixin.name.replace(/-/g, '_') + '_mixin' - , args = mixin.args || '' - , block = mixin.block - , attrs = mixin.attrs - , pp = this.pp; - - if (mixin.call) { - if (pp) this.buf.push("__indent.push('" + Array(this.indents + 1).join(' ') + "');") - if (block || attrs.length) { - - this.buf.push(name + '.call({'); - - if (block) { - this.buf.push('block: function(){'); - - // Render block with no indents, dynamically added when rendered - this.parentIndents++; - var _indents = this.indents; - this.indents = 0; - this.visit(mixin.block); - this.indents = _indents; - this.parentIndents--; - - if (attrs.length) { - this.buf.push('},'); - } else { - this.buf.push('}'); - } - } - - if (attrs.length) { - var val = this.attrs(attrs); - if (val.inherits) { - this.buf.push('attributes: merge({' + val.buf - + '}, attributes), escaped: merge(' + val.escaped + ', escaped, true)'); - } else { - this.buf.push('attributes: {' + val.buf + '}, escaped: ' + val.escaped); - } - } - - if (args) { - this.buf.push('}, ' + args + ');'); - } else { - this.buf.push('});'); - } - - } else { - this.buf.push(name + '(' + args + ');'); - } - if (pp) this.buf.push("__indent.pop();") - } else { - this.buf.push('var ' + name + ' = function(' + args + '){'); - this.buf.push('var block = this.block, attributes = this.attributes || {}, escaped = this.escaped || {};'); - this.parentIndents++; - this.visit(block); - this.parentIndents--; - this.buf.push('};'); - } - }, - - /** - * Visit `tag` buffering tag markup, generating - * attributes, visiting the `tag`'s code and block. - * - * @param {Tag} tag - * @api public - */ - - visitTag: function(tag){ - this.indents++; - var name = tag.name - , pp = this.pp; - - if (tag.buffer) name = "' + (" + name + ") + '"; - - if (!this.hasCompiledTag) { - if (!this.hasCompiledDoctype && 'html' == name) { - this.visitDoctype(); - } - this.hasCompiledTag = true; - } - - // pretty print - if (pp && !tag.isInline()) - this.prettyIndent(0, true); - - if ((~selfClosing.indexOf(name) || tag.selfClosing) && !this.xml) { - this.buffer('<' + name); - this.visitAttributes(tag.attrs); - this.terse - ? this.buffer('>') - : this.buffer('/>'); - } else { - // Optimize attributes buffering - if (tag.attrs.length) { - this.buffer('<' + name); - if (tag.attrs.length) this.visitAttributes(tag.attrs); - this.buffer('>'); - } else { - this.buffer('<' + name + '>'); - } - if (tag.code) this.visitCode(tag.code); - this.escape = 'pre' == tag.name; - this.visit(tag.block); - - // pretty print - if (pp && !tag.isInline() && 'pre' != tag.name && !tag.canInline()) - this.prettyIndent(0, true); - - this.buffer(''); - } - this.indents--; - }, - - /** - * Visit `filter`, throwing when the filter does not exist. - * - * @param {Filter} filter - * @api public - */ - - visitFilter: function(filter){ - var fn = filters[filter.name]; - - // unknown filter - if (!fn) { - if (filter.isASTFilter) { - throw new Error('unknown ast filter "' + filter.name + ':"'); - } else { - throw new Error('unknown filter ":' + filter.name + '"'); - } - } - - if (filter.isASTFilter) { - this.buf.push(fn(filter.block, this, filter.attrs)); - } else { - var text = filter.block.nodes.map(function(node){ return node.val }).join('\n'); - filter.attrs = filter.attrs || {}; - filter.attrs.filename = this.options.filename; - this.buffer(utils.text(fn(text, filter.attrs))); - } - }, - - /** - * Visit `text` node. - * - * @param {Text} text - * @api public - */ - - visitText: function(text){ - text = utils.text(text.val.replace(/\\/g, '\\\\')); - if (this.escape) text = escape(text); - this.buffer(text); - }, - - /** - * Visit a `comment`, only buffering when the buffer flag is set. - * - * @param {Comment} comment - * @api public - */ - - visitComment: function(comment){ - if (!comment.buffer) return; - if (this.pp) this.prettyIndent(1, true); - this.buffer(''); - }, - - /** - * Visit a `BlockComment`. - * - * @param {Comment} comment - * @api public - */ - - visitBlockComment: function(comment){ - if (!comment.buffer) return; - if (0 == comment.val.trim().indexOf('if')) { - this.buffer(''); - } else { - this.buffer(''); - } - }, - - /** - * Visit `code`, respecting buffer / escape flags. - * If the code is followed by a block, wrap it in - * a self-calling function. - * - * @param {Code} code - * @api public - */ - - visitCode: function(code){ - // Wrap code blocks with {}. - // we only wrap unbuffered code blocks ATM - // since they are usually flow control - - // Buffer code - if (code.buffer) { - var val = code.val.trimLeft(); - this.buf.push('var __val__ = ' + val); - val = 'null == __val__ ? "" : __val__'; - if (code.escape) val = 'escape(' + val + ')'; - this.buf.push("buf.push(" + val + ");"); - } else { - this.buf.push(code.val); - } - - // Block support - if (code.block) { - if (!code.buffer) this.buf.push('{'); - this.visit(code.block); - if (!code.buffer) this.buf.push('}'); - } - }, - - /** - * Visit `each` block. - * - * @param {Each} each - * @api public - */ - - visitEach: function(each){ - this.buf.push('' - + '// iterate ' + each.obj + '\n' - + ';(function(){\n' - + ' if (\'number\' == typeof ' + each.obj + '.length) {\n' - + ' for (var ' + each.key + ' = 0, $$l = ' + each.obj + '.length; ' + each.key + ' < $$l; ' + each.key + '++) {\n' - + ' var ' + each.val + ' = ' + each.obj + '[' + each.key + '];\n'); - - this.visit(each.block); - - this.buf.push('' - + ' }\n' - + ' } else {\n' - + ' for (var ' + each.key + ' in ' + each.obj + ') {\n' - // if browser - // + ' if (' + each.obj + '.hasOwnProperty(' + each.key + ')){' - // end - + ' var ' + each.val + ' = ' + each.obj + '[' + each.key + '];\n'); - - this.visit(each.block); - - // if browser - // this.buf.push(' }\n'); - // end - - this.buf.push(' }\n }\n}).call(this);\n'); - }, - - /** - * Visit `attrs`. - * - * @param {Array} attrs - * @api public - */ - - visitAttributes: function(attrs){ - var val = this.attrs(attrs); - if (val.inherits) { - this.buf.push("buf.push(attrs(merge({ " + val.buf + - " }, attributes), merge(" + val.escaped + ", escaped, true)));"); - } else if (val.constant) { - eval('var buf={' + val.buf + '};'); - this.buffer(runtime.attrs(buf, JSON.parse(val.escaped)), true); - } else { - this.buf.push("buf.push(attrs({ " + val.buf + " }, " + val.escaped + "));"); - } - }, - - /** - * Compile attributes. - */ - - attrs: function(attrs){ - var buf = [] - , classes = [] - , escaped = {} - , constant = attrs.every(function(attr){ return isConstant(attr.val) }) - , inherits = false; - - if (this.terse) buf.push('terse: true'); - - attrs.forEach(function(attr){ - if (attr.name == 'attributes') return inherits = true; - escaped[attr.name] = attr.escaped; - if (attr.name == 'class') { - classes.push('(' + attr.val + ')'); - } else { - var pair = "'" + attr.name + "':(" + attr.val + ')'; - buf.push(pair); - } - }); - - if (classes.length) { - classes = classes.join(" + ' ' + "); - buf.push("class: " + classes); - } - - return { - buf: buf.join(', ').replace('class:', '"class":'), - escaped: JSON.stringify(escaped), - inherits: inherits, - constant: constant - }; - } -}; - -/** - * Check if expression can be evaluated to a constant - * - * @param {String} expression - * @return {Boolean} - * @api private - */ - -function isConstant(val){ - // Check strings/literals - if (/^ *("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'|true|false|null|undefined) *$/i.test(val)) - return true; - - // Check numbers - if (!isNaN(Number(val))) - return true; - - // Check arrays - var matches; - if (matches = /^ *\[(.*)\] *$/.exec(val)) - return matches[1].split(',').every(isConstant); - - return false; -} - -/** - * Escape the given string of `html`. - * - * @param {String} html - * @return {String} - * @api private - */ - -function escape(html){ - return String(html) - .replace(/&(?!\w+;)/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/doctypes.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/doctypes.js deleted file mode 100644 index e87ca1e4..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/doctypes.js +++ /dev/null @@ -1,18 +0,0 @@ - -/*! - * Jade - doctypes - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = { - '5': '' - , 'default': '' - , 'xml': '' - , 'transitional': '' - , 'strict': '' - , 'frameset': '' - , '1.1': '' - , 'basic': '' - , 'mobile': '' -}; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/filters.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/filters.js deleted file mode 100644 index fdb634cb..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/filters.js +++ /dev/null @@ -1,97 +0,0 @@ - -/*! - * Jade - filters - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = { - - /** - * Wrap text with CDATA block. - */ - - cdata: function(str){ - return ''; - }, - - /** - * Transform sass to css, wrapped in style tags. - */ - - sass: function(str){ - str = str.replace(/\\n/g, '\n'); - var sass = require('sass').render(str).replace(/\n/g, '\\n'); - return ''; - }, - - /** - * Transform stylus to css, wrapped in style tags. - */ - - stylus: function(str, options){ - var ret; - str = str.replace(/\\n/g, '\n'); - var stylus = require('stylus'); - stylus(str, options).render(function(err, css){ - if (err) throw err; - ret = css.replace(/\n/g, '\\n'); - }); - return ''; - }, - - /** - * Transform less to css, wrapped in style tags. - */ - - less: function(str){ - var ret; - str = str.replace(/\\n/g, '\n'); - require('less').render(str, function(err, css){ - if (err) throw err; - ret = ''; - }); - return ret; - }, - - /** - * Transform markdown to html. - */ - - markdown: function(str){ - var md; - - // support markdown / discount - try { - md = require('markdown'); - } catch (err){ - try { - md = require('discount'); - } catch (err) { - try { - md = require('markdown-js'); - } catch (err) { - try { - md = require('marked'); - } catch (err) { - throw new - Error('Cannot find markdown library, install markdown, discount, or marked.'); - } - } - } - } - - str = str.replace(/\\n/g, '\n'); - return md.parse(str).replace(/\n/g, '\\n').replace(/'/g,'''); - }, - - /** - * Transform coffeescript to javascript. - */ - - coffeescript: function(str){ - str = str.replace(/\\n/g, '\n'); - var js = require('coffee-script').compile(str).replace(/\\/g, '\\\\').replace(/\n/g, '\\n'); - return ''; - } -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/inline-tags.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/inline-tags.js deleted file mode 100644 index 491de0b5..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/inline-tags.js +++ /dev/null @@ -1,28 +0,0 @@ - -/*! - * Jade - inline tags - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = [ - 'a' - , 'abbr' - , 'acronym' - , 'b' - , 'br' - , 'code' - , 'em' - , 'font' - , 'i' - , 'img' - , 'ins' - , 'kbd' - , 'map' - , 'samp' - , 'small' - , 'span' - , 'strong' - , 'sub' - , 'sup' -]; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/jade.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/jade.js deleted file mode 100644 index 00f0abb1..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/jade.js +++ /dev/null @@ -1,237 +0,0 @@ -/*! - * Jade - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Parser = require('./parser') - , Lexer = require('./lexer') - , Compiler = require('./compiler') - , runtime = require('./runtime') -// if node - , fs = require('fs'); -// end - -/** - * Library version. - */ - -exports.version = '0.26.3'; - -/** - * Expose self closing tags. - */ - -exports.selfClosing = require('./self-closing'); - -/** - * Default supported doctypes. - */ - -exports.doctypes = require('./doctypes'); - -/** - * Text filters. - */ - -exports.filters = require('./filters'); - -/** - * Utilities. - */ - -exports.utils = require('./utils'); - -/** - * Expose `Compiler`. - */ - -exports.Compiler = Compiler; - -/** - * Expose `Parser`. - */ - -exports.Parser = Parser; - -/** - * Expose `Lexer`. - */ - -exports.Lexer = Lexer; - -/** - * Nodes. - */ - -exports.nodes = require('./nodes'); - -/** - * Jade runtime helpers. - */ - -exports.runtime = runtime; - -/** - * Template function cache. - */ - -exports.cache = {}; - -/** - * Parse the given `str` of jade and return a function body. - * - * @param {String} str - * @param {Object} options - * @return {String} - * @api private - */ - -function parse(str, options){ - try { - // Parse - var parser = new Parser(str, options.filename, options); - - // Compile - var compiler = new (options.compiler || Compiler)(parser.parse(), options) - , js = compiler.compile(); - - // Debug compiler - if (options.debug) { - console.error('\nCompiled Function:\n\n\033[90m%s\033[0m', js.replace(/^/gm, ' ')); - } - - return '' - + 'var buf = [];\n' - + (options.self - ? 'var self = locals || {};\n' + js - : 'with (locals || {}) {\n' + js + '\n}\n') - + 'return buf.join("");'; - } catch (err) { - parser = parser.context(); - runtime.rethrow(err, parser.filename, parser.lexer.lineno); - } -} - -/** - * Compile a `Function` representation of the given jade `str`. - * - * Options: - * - * - `compileDebug` when `false` debugging code is stripped from the compiled template - * - `client` when `true` the helper functions `escape()` etc will reference `jade.escape()` - * for use with the Jade client-side runtime.js - * - * @param {String} str - * @param {Options} options - * @return {Function} - * @api public - */ - -exports.compile = function(str, options){ - var options = options || {} - , client = options.client - , filename = options.filename - ? JSON.stringify(options.filename) - : 'undefined' - , fn; - - if (options.compileDebug !== false) { - fn = [ - 'var __jade = [{ lineno: 1, filename: ' + filename + ' }];' - , 'try {' - , parse(String(str), options) - , '} catch (err) {' - , ' rethrow(err, __jade[0].filename, __jade[0].lineno);' - , '}' - ].join('\n'); - } else { - fn = parse(String(str), options); - } - - if (client) { - fn = 'attrs = attrs || jade.attrs; escape = escape || jade.escape; rethrow = rethrow || jade.rethrow; merge = merge || jade.merge;\n' + fn; - } - - fn = new Function('locals, attrs, escape, rethrow, merge', fn); - - if (client) return fn; - - return function(locals){ - return fn(locals, runtime.attrs, runtime.escape, runtime.rethrow, runtime.merge); - }; -}; - -/** - * Render the given `str` of jade and invoke - * the callback `fn(err, str)`. - * - * Options: - * - * - `cache` enable template caching - * - `filename` filename required for `include` / `extends` and caching - * - * @param {String} str - * @param {Object|Function} options or fn - * @param {Function} fn - * @api public - */ - -exports.render = function(str, options, fn){ - // swap args - if ('function' == typeof options) { - fn = options, options = {}; - } - - // cache requires .filename - if (options.cache && !options.filename) { - return fn(new Error('the "filename" option is required for caching')); - } - - try { - var path = options.filename; - var tmpl = options.cache - ? exports.cache[path] || (exports.cache[path] = exports.compile(str, options)) - : exports.compile(str, options); - fn(null, tmpl(options)); - } catch (err) { - fn(err); - } -}; - -/** - * Render a Jade file at the given `path` and callback `fn(err, str)`. - * - * @param {String} path - * @param {Object|Function} options or callback - * @param {Function} fn - * @api public - */ - -exports.renderFile = function(path, options, fn){ - var key = path + ':string'; - - if ('function' == typeof options) { - fn = options, options = {}; - } - - try { - options.filename = path; - var str = options.cache - ? exports.cache[key] || (exports.cache[key] = fs.readFileSync(path, 'utf8')) - : fs.readFileSync(path, 'utf8'); - exports.render(str, options, fn); - } catch (err) { - fn(err); - } -}; - -/** - * Express support. - */ - -exports.__express = exports.renderFile; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/lexer.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/lexer.js deleted file mode 100644 index bca314a9..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/lexer.js +++ /dev/null @@ -1,771 +0,0 @@ - -/*! - * Jade - Lexer - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Initialize `Lexer` with the given `str`. - * - * Options: - * - * - `colons` allow colons for attr delimiters - * - * @param {String} str - * @param {Object} options - * @api private - */ - -var Lexer = module.exports = function Lexer(str, options) { - options = options || {}; - this.input = str.replace(/\r\n|\r/g, '\n'); - this.colons = options.colons; - this.deferredTokens = []; - this.lastIndents = 0; - this.lineno = 1; - this.stash = []; - this.indentStack = []; - this.indentRe = null; - this.pipeless = false; -}; - -/** - * Lexer prototype. - */ - -Lexer.prototype = { - - /** - * Construct a token with the given `type` and `val`. - * - * @param {String} type - * @param {String} val - * @return {Object} - * @api private - */ - - tok: function(type, val){ - return { - type: type - , line: this.lineno - , val: val - } - }, - - /** - * Consume the given `len` of input. - * - * @param {Number} len - * @api private - */ - - consume: function(len){ - this.input = this.input.substr(len); - }, - - /** - * Scan for `type` with the given `regexp`. - * - * @param {String} type - * @param {RegExp} regexp - * @return {Object} - * @api private - */ - - scan: function(regexp, type){ - var captures; - if (captures = regexp.exec(this.input)) { - this.consume(captures[0].length); - return this.tok(type, captures[1]); - } - }, - - /** - * Defer the given `tok`. - * - * @param {Object} tok - * @api private - */ - - defer: function(tok){ - this.deferredTokens.push(tok); - }, - - /** - * Lookahead `n` tokens. - * - * @param {Number} n - * @return {Object} - * @api private - */ - - lookahead: function(n){ - var fetch = n - this.stash.length; - while (fetch-- > 0) this.stash.push(this.next()); - return this.stash[--n]; - }, - - /** - * Return the indexOf `start` / `end` delimiters. - * - * @param {String} start - * @param {String} end - * @return {Number} - * @api private - */ - - indexOfDelimiters: function(start, end){ - var str = this.input - , nstart = 0 - , nend = 0 - , pos = 0; - for (var i = 0, len = str.length; i < len; ++i) { - if (start == str.charAt(i)) { - ++nstart; - } else if (end == str.charAt(i)) { - if (++nend == nstart) { - pos = i; - break; - } - } - } - return pos; - }, - - /** - * Stashed token. - */ - - stashed: function() { - return this.stash.length - && this.stash.shift(); - }, - - /** - * Deferred token. - */ - - deferred: function() { - return this.deferredTokens.length - && this.deferredTokens.shift(); - }, - - /** - * end-of-source. - */ - - eos: function() { - if (this.input.length) return; - if (this.indentStack.length) { - this.indentStack.shift(); - return this.tok('outdent'); - } else { - return this.tok('eos'); - } - }, - - /** - * Blank line. - */ - - blank: function() { - var captures; - if (captures = /^\n *\n/.exec(this.input)) { - this.consume(captures[0].length - 1); - if (this.pipeless) return this.tok('text', ''); - return this.next(); - } - }, - - /** - * Comment. - */ - - comment: function() { - var captures; - if (captures = /^ *\/\/(-)?([^\n]*)/.exec(this.input)) { - this.consume(captures[0].length); - var tok = this.tok('comment', captures[2]); - tok.buffer = '-' != captures[1]; - return tok; - } - }, - - /** - * Interpolated tag. - */ - - interpolation: function() { - var captures; - if (captures = /^#\{(.*?)\}/.exec(this.input)) { - this.consume(captures[0].length); - return this.tok('interpolation', captures[1]); - } - }, - - /** - * Tag. - */ - - tag: function() { - var captures; - if (captures = /^(\w[-:\w]*)(\/?)/.exec(this.input)) { - this.consume(captures[0].length); - var tok, name = captures[1]; - if (':' == name[name.length - 1]) { - name = name.slice(0, -1); - tok = this.tok('tag', name); - this.defer(this.tok(':')); - while (' ' == this.input[0]) this.input = this.input.substr(1); - } else { - tok = this.tok('tag', name); - } - tok.selfClosing = !! captures[2]; - return tok; - } - }, - - /** - * Filter. - */ - - filter: function() { - return this.scan(/^:(\w+)/, 'filter'); - }, - - /** - * Doctype. - */ - - doctype: function() { - return this.scan(/^(?:!!!|doctype) *([^\n]+)?/, 'doctype'); - }, - - /** - * Id. - */ - - id: function() { - return this.scan(/^#([\w-]+)/, 'id'); - }, - - /** - * Class. - */ - - className: function() { - return this.scan(/^\.([\w-]+)/, 'class'); - }, - - /** - * Text. - */ - - text: function() { - return this.scan(/^(?:\| ?| ?)?([^\n]+)/, 'text'); - }, - - /** - * Extends. - */ - - "extends": function() { - return this.scan(/^extends? +([^\n]+)/, 'extends'); - }, - - /** - * Block prepend. - */ - - prepend: function() { - var captures; - if (captures = /^prepend +([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - var mode = 'prepend' - , name = captures[1] - , tok = this.tok('block', name); - tok.mode = mode; - return tok; - } - }, - - /** - * Block append. - */ - - append: function() { - var captures; - if (captures = /^append +([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - var mode = 'append' - , name = captures[1] - , tok = this.tok('block', name); - tok.mode = mode; - return tok; - } - }, - - /** - * Block. - */ - - block: function() { - var captures; - if (captures = /^block\b *(?:(prepend|append) +)?([^\n]*)/.exec(this.input)) { - this.consume(captures[0].length); - var mode = captures[1] || 'replace' - , name = captures[2] - , tok = this.tok('block', name); - - tok.mode = mode; - return tok; - } - }, - - /** - * Yield. - */ - - yield: function() { - return this.scan(/^yield */, 'yield'); - }, - - /** - * Include. - */ - - include: function() { - return this.scan(/^include +([^\n]+)/, 'include'); - }, - - /** - * Case. - */ - - "case": function() { - return this.scan(/^case +([^\n]+)/, 'case'); - }, - - /** - * When. - */ - - when: function() { - return this.scan(/^when +([^:\n]+)/, 'when'); - }, - - /** - * Default. - */ - - "default": function() { - return this.scan(/^default */, 'default'); - }, - - /** - * Assignment. - */ - - assignment: function() { - var captures; - if (captures = /^(\w+) += *([^;\n]+)( *;? *)/.exec(this.input)) { - this.consume(captures[0].length); - var name = captures[1] - , val = captures[2]; - return this.tok('code', 'var ' + name + ' = (' + val + ');'); - } - }, - - /** - * Call mixin. - */ - - call: function(){ - var captures; - if (captures = /^\+([-\w]+)/.exec(this.input)) { - this.consume(captures[0].length); - var tok = this.tok('call', captures[1]); - - // Check for args (not attributes) - if (captures = /^ *\((.*?)\)/.exec(this.input)) { - if (!/^ *[-\w]+ *=/.test(captures[1])) { - this.consume(captures[0].length); - tok.args = captures[1]; - } - } - - return tok; - } - }, - - /** - * Mixin. - */ - - mixin: function(){ - var captures; - if (captures = /^mixin +([-\w]+)(?: *\((.*)\))?/.exec(this.input)) { - this.consume(captures[0].length); - var tok = this.tok('mixin', captures[1]); - tok.args = captures[2]; - return tok; - } - }, - - /** - * Conditional. - */ - - conditional: function() { - var captures; - if (captures = /^(if|unless|else if|else)\b([^\n]*)/.exec(this.input)) { - this.consume(captures[0].length); - var type = captures[1] - , js = captures[2]; - - switch (type) { - case 'if': js = 'if (' + js + ')'; break; - case 'unless': js = 'if (!(' + js + '))'; break; - case 'else if': js = 'else if (' + js + ')'; break; - case 'else': js = 'else'; break; - } - - return this.tok('code', js); - } - }, - - /** - * While. - */ - - "while": function() { - var captures; - if (captures = /^while +([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - return this.tok('code', 'while (' + captures[1] + ')'); - } - }, - - /** - * Each. - */ - - each: function() { - var captures; - if (captures = /^(?:- *)?(?:each|for) +(\w+)(?: *, *(\w+))? * in *([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - var tok = this.tok('each', captures[1]); - tok.key = captures[2] || '$index'; - tok.code = captures[3]; - return tok; - } - }, - - /** - * Code. - */ - - code: function() { - var captures; - if (captures = /^(!?=|-)([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - var flags = captures[1]; - captures[1] = captures[2]; - var tok = this.tok('code', captures[1]); - tok.escape = flags[0] === '='; - tok.buffer = flags[0] === '=' || flags[1] === '='; - return tok; - } - }, - - /** - * Attributes. - */ - - attrs: function() { - if ('(' == this.input.charAt(0)) { - var index = this.indexOfDelimiters('(', ')') - , str = this.input.substr(1, index-1) - , tok = this.tok('attrs') - , len = str.length - , colons = this.colons - , states = ['key'] - , escapedAttr - , key = '' - , val = '' - , quote - , c - , p; - - function state(){ - return states[states.length - 1]; - } - - function interpolate(attr) { - return attr.replace(/#\{([^}]+)\}/g, function(_, expr){ - return quote + " + (" + expr + ") + " + quote; - }); - } - - this.consume(index + 1); - tok.attrs = {}; - tok.escaped = {}; - - function parse(c) { - var real = c; - // TODO: remove when people fix ":" - if (colons && ':' == c) c = '='; - switch (c) { - case ',': - case '\n': - switch (state()) { - case 'expr': - case 'array': - case 'string': - case 'object': - val += c; - break; - default: - states.push('key'); - val = val.trim(); - key = key.trim(); - if ('' == key) return; - key = key.replace(/^['"]|['"]$/g, '').replace('!', ''); - tok.escaped[key] = escapedAttr; - tok.attrs[key] = '' == val - ? true - : interpolate(val); - key = val = ''; - } - break; - case '=': - switch (state()) { - case 'key char': - key += real; - break; - case 'val': - case 'expr': - case 'array': - case 'string': - case 'object': - val += real; - break; - default: - escapedAttr = '!' != p; - states.push('val'); - } - break; - case '(': - if ('val' == state() - || 'expr' == state()) states.push('expr'); - val += c; - break; - case ')': - if ('expr' == state() - || 'val' == state()) states.pop(); - val += c; - break; - case '{': - if ('val' == state()) states.push('object'); - val += c; - break; - case '}': - if ('object' == state()) states.pop(); - val += c; - break; - case '[': - if ('val' == state()) states.push('array'); - val += c; - break; - case ']': - if ('array' == state()) states.pop(); - val += c; - break; - case '"': - case "'": - switch (state()) { - case 'key': - states.push('key char'); - break; - case 'key char': - states.pop(); - break; - case 'string': - if (c == quote) states.pop(); - val += c; - break; - default: - states.push('string'); - val += c; - quote = c; - } - break; - case '': - break; - default: - switch (state()) { - case 'key': - case 'key char': - key += c; - break; - default: - val += c; - } - } - p = c; - } - - for (var i = 0; i < len; ++i) { - parse(str.charAt(i)); - } - - parse(','); - - if ('/' == this.input.charAt(0)) { - this.consume(1); - tok.selfClosing = true; - } - - return tok; - } - }, - - /** - * Indent | Outdent | Newline. - */ - - indent: function() { - var captures, re; - - // established regexp - if (this.indentRe) { - captures = this.indentRe.exec(this.input); - // determine regexp - } else { - // tabs - re = /^\n(\t*) */; - captures = re.exec(this.input); - - // spaces - if (captures && !captures[1].length) { - re = /^\n( *)/; - captures = re.exec(this.input); - } - - // established - if (captures && captures[1].length) this.indentRe = re; - } - - if (captures) { - var tok - , indents = captures[1].length; - - ++this.lineno; - this.consume(indents + 1); - - if (' ' == this.input[0] || '\t' == this.input[0]) { - throw new Error('Invalid indentation, you can use tabs or spaces but not both'); - } - - // blank line - if ('\n' == this.input[0]) return this.tok('newline'); - - // outdent - if (this.indentStack.length && indents < this.indentStack[0]) { - while (this.indentStack.length && this.indentStack[0] > indents) { - this.stash.push(this.tok('outdent')); - this.indentStack.shift(); - } - tok = this.stash.pop(); - // indent - } else if (indents && indents != this.indentStack[0]) { - this.indentStack.unshift(indents); - tok = this.tok('indent', indents); - // newline - } else { - tok = this.tok('newline'); - } - - return tok; - } - }, - - /** - * Pipe-less text consumed only when - * pipeless is true; - */ - - pipelessText: function() { - if (this.pipeless) { - if ('\n' == this.input[0]) return; - var i = this.input.indexOf('\n'); - if (-1 == i) i = this.input.length; - var str = this.input.substr(0, i); - this.consume(str.length); - return this.tok('text', str); - } - }, - - /** - * ':' - */ - - colon: function() { - return this.scan(/^: */, ':'); - }, - - /** - * Return the next token object, or those - * previously stashed by lookahead. - * - * @return {Object} - * @api private - */ - - advance: function(){ - return this.stashed() - || this.next(); - }, - - /** - * Return the next token object. - * - * @return {Object} - * @api private - */ - - next: function() { - return this.deferred() - || this.blank() - || this.eos() - || this.pipelessText() - || this.yield() - || this.doctype() - || this.interpolation() - || this["case"]() - || this.when() - || this["default"]() - || this["extends"]() - || this.append() - || this.prepend() - || this.block() - || this.include() - || this.mixin() - || this.call() - || this.conditional() - || this.each() - || this["while"]() - || this.assignment() - || this.tag() - || this.filter() - || this.code() - || this.id() - || this.className() - || this.attrs() - || this.indent() - || this.comment() - || this.colon() - || this.text(); - } -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/attrs.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/attrs.js deleted file mode 100644 index 5de9b59c..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/attrs.js +++ /dev/null @@ -1,77 +0,0 @@ - -/*! - * Jade - nodes - Attrs - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'), - Block = require('./block'); - -/** - * Initialize a `Attrs` node. - * - * @api public - */ - -var Attrs = module.exports = function Attrs() { - this.attrs = []; -}; - -/** - * Inherit from `Node`. - */ - -Attrs.prototype.__proto__ = Node.prototype; - -/** - * Set attribute `name` to `val`, keep in mind these become - * part of a raw js object literal, so to quote a value you must - * '"quote me"', otherwise or example 'user.name' is literal JavaScript. - * - * @param {String} name - * @param {String} val - * @param {Boolean} escaped - * @return {Tag} for chaining - * @api public - */ - -Attrs.prototype.setAttribute = function(name, val, escaped){ - this.attrs.push({ name: name, val: val, escaped: escaped }); - return this; -}; - -/** - * Remove attribute `name` when present. - * - * @param {String} name - * @api public - */ - -Attrs.prototype.removeAttribute = function(name){ - for (var i = 0, len = this.attrs.length; i < len; ++i) { - if (this.attrs[i] && this.attrs[i].name == name) { - delete this.attrs[i]; - } - } -}; - -/** - * Get attribute value by `name`. - * - * @param {String} name - * @return {String} - * @api public - */ - -Attrs.prototype.getAttribute = function(name){ - for (var i = 0, len = this.attrs.length; i < len; ++i) { - if (this.attrs[i] && this.attrs[i].name == name) { - return this.attrs[i].val; - } - } -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/block-comment.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/block-comment.js deleted file mode 100644 index 4f41e4a5..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/block-comment.js +++ /dev/null @@ -1,33 +0,0 @@ - -/*! - * Jade - nodes - BlockComment - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `BlockComment` with the given `block`. - * - * @param {String} val - * @param {Block} block - * @param {Boolean} buffer - * @api public - */ - -var BlockComment = module.exports = function BlockComment(val, block, buffer) { - this.block = block; - this.val = val; - this.buffer = buffer; -}; - -/** - * Inherit from `Node`. - */ - -BlockComment.prototype.__proto__ = Node.prototype; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/block.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/block.js deleted file mode 100644 index bb00a1d9..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/block.js +++ /dev/null @@ -1,121 +0,0 @@ - -/*! - * Jade - nodes - Block - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a new `Block` with an optional `node`. - * - * @param {Node} node - * @api public - */ - -var Block = module.exports = function Block(node){ - this.nodes = []; - if (node) this.push(node); -}; - -/** - * Inherit from `Node`. - */ - -Block.prototype.__proto__ = Node.prototype; - -/** - * Block flag. - */ - -Block.prototype.isBlock = true; - -/** - * Replace the nodes in `other` with the nodes - * in `this` block. - * - * @param {Block} other - * @api private - */ - -Block.prototype.replace = function(other){ - other.nodes = this.nodes; -}; - -/** - * Pust the given `node`. - * - * @param {Node} node - * @return {Number} - * @api public - */ - -Block.prototype.push = function(node){ - return this.nodes.push(node); -}; - -/** - * Check if this block is empty. - * - * @return {Boolean} - * @api public - */ - -Block.prototype.isEmpty = function(){ - return 0 == this.nodes.length; -}; - -/** - * Unshift the given `node`. - * - * @param {Node} node - * @return {Number} - * @api public - */ - -Block.prototype.unshift = function(node){ - return this.nodes.unshift(node); -}; - -/** - * Return the "last" block, or the first `yield` node. - * - * @return {Block} - * @api private - */ - -Block.prototype.includeBlock = function(){ - var ret = this - , node; - - for (var i = 0, len = this.nodes.length; i < len; ++i) { - node = this.nodes[i]; - if (node.yield) return node; - else if (node.textOnly) continue; - else if (node.includeBlock) ret = node.includeBlock(); - else if (node.block && !node.block.isEmpty()) ret = node.block.includeBlock(); - } - - return ret; -}; - -/** - * Return a clone of this block. - * - * @return {Block} - * @api private - */ - -Block.prototype.clone = function(){ - var clone = new Block; - for (var i = 0, len = this.nodes.length; i < len; ++i) { - clone.push(this.nodes[i].clone()); - } - return clone; -}; - diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/case.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/case.js deleted file mode 100644 index 08ff0337..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/case.js +++ /dev/null @@ -1,43 +0,0 @@ - -/*! - * Jade - nodes - Case - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a new `Case` with `expr`. - * - * @param {String} expr - * @api public - */ - -var Case = exports = module.exports = function Case(expr, block){ - this.expr = expr; - this.block = block; -}; - -/** - * Inherit from `Node`. - */ - -Case.prototype.__proto__ = Node.prototype; - -var When = exports.When = function When(expr, block){ - this.expr = expr; - this.block = block; - this.debug = false; -}; - -/** - * Inherit from `Node`. - */ - -When.prototype.__proto__ = Node.prototype; - diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/code.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/code.js deleted file mode 100644 index babc6759..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/code.js +++ /dev/null @@ -1,35 +0,0 @@ - -/*! - * Jade - nodes - Code - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Code` node with the given code `val`. - * Code may also be optionally buffered and escaped. - * - * @param {String} val - * @param {Boolean} buffer - * @param {Boolean} escape - * @api public - */ - -var Code = module.exports = function Code(val, buffer, escape) { - this.val = val; - this.buffer = buffer; - this.escape = escape; - if (val.match(/^ *else/)) this.debug = false; -}; - -/** - * Inherit from `Node`. - */ - -Code.prototype.__proto__ = Node.prototype; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/comment.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/comment.js deleted file mode 100644 index 2e1469e7..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/comment.js +++ /dev/null @@ -1,32 +0,0 @@ - -/*! - * Jade - nodes - Comment - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Comment` with the given `val`, optionally `buffer`, - * otherwise the comment may render in the output. - * - * @param {String} val - * @param {Boolean} buffer - * @api public - */ - -var Comment = module.exports = function Comment(val, buffer) { - this.val = val; - this.buffer = buffer; -}; - -/** - * Inherit from `Node`. - */ - -Comment.prototype.__proto__ = Node.prototype; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/doctype.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/doctype.js deleted file mode 100644 index b8f33e56..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/doctype.js +++ /dev/null @@ -1,29 +0,0 @@ - -/*! - * Jade - nodes - Doctype - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Doctype` with the given `val`. - * - * @param {String} val - * @api public - */ - -var Doctype = module.exports = function Doctype(val) { - this.val = val; -}; - -/** - * Inherit from `Node`. - */ - -Doctype.prototype.__proto__ = Node.prototype; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/each.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/each.js deleted file mode 100644 index f54101f1..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/each.js +++ /dev/null @@ -1,35 +0,0 @@ - -/*! - * Jade - nodes - Each - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize an `Each` node, representing iteration - * - * @param {String} obj - * @param {String} val - * @param {String} key - * @param {Block} block - * @api public - */ - -var Each = module.exports = function Each(obj, val, key, block) { - this.obj = obj; - this.val = val; - this.key = key; - this.block = block; -}; - -/** - * Inherit from `Node`. - */ - -Each.prototype.__proto__ = Node.prototype; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/filter.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/filter.js deleted file mode 100644 index 851a0040..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/filter.js +++ /dev/null @@ -1,35 +0,0 @@ - -/*! - * Jade - nodes - Filter - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node') - , Block = require('./block'); - -/** - * Initialize a `Filter` node with the given - * filter `name` and `block`. - * - * @param {String} name - * @param {Block|Node} block - * @api public - */ - -var Filter = module.exports = function Filter(name, block, attrs) { - this.name = name; - this.block = block; - this.attrs = attrs; - this.isASTFilter = !block.nodes.every(function(node){ return node.isText }); -}; - -/** - * Inherit from `Node`. - */ - -Filter.prototype.__proto__ = Node.prototype; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/index.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/index.js deleted file mode 100644 index 386ad2f9..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/index.js +++ /dev/null @@ -1,20 +0,0 @@ - -/*! - * Jade - nodes - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -exports.Node = require('./node'); -exports.Tag = require('./tag'); -exports.Code = require('./code'); -exports.Each = require('./each'); -exports.Case = require('./case'); -exports.Text = require('./text'); -exports.Block = require('./block'); -exports.Mixin = require('./mixin'); -exports.Filter = require('./filter'); -exports.Comment = require('./comment'); -exports.Literal = require('./literal'); -exports.BlockComment = require('./block-comment'); -exports.Doctype = require('./doctype'); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/literal.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/literal.js deleted file mode 100644 index fde586be..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/literal.js +++ /dev/null @@ -1,32 +0,0 @@ - -/*! - * Jade - nodes - Literal - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Literal` node with the given `str. - * - * @param {String} str - * @api public - */ - -var Literal = module.exports = function Literal(str) { - this.str = str - .replace(/\\/g, "\\\\") - .replace(/\n|\r\n/g, "\\n") - .replace(/'/g, "\\'"); -}; - -/** - * Inherit from `Node`. - */ - -Literal.prototype.__proto__ = Node.prototype; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/mixin.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/mixin.js deleted file mode 100644 index 8407bc79..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/mixin.js +++ /dev/null @@ -1,36 +0,0 @@ - -/*! - * Jade - nodes - Mixin - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Attrs = require('./attrs'); - -/** - * Initialize a new `Mixin` with `name` and `block`. - * - * @param {String} name - * @param {String} args - * @param {Block} block - * @api public - */ - -var Mixin = module.exports = function Mixin(name, args, block, call){ - this.name = name; - this.args = args; - this.block = block; - this.attrs = []; - this.call = call; -}; - -/** - * Inherit from `Attrs`. - */ - -Mixin.prototype.__proto__ = Attrs.prototype; - diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/node.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/node.js deleted file mode 100644 index e98f042c..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/node.js +++ /dev/null @@ -1,25 +0,0 @@ - -/*! - * Jade - nodes - Node - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Initialize a `Node`. - * - * @api public - */ - -var Node = module.exports = function Node(){}; - -/** - * Clone this node (return itself) - * - * @return {Node} - * @api private - */ - -Node.prototype.clone = function(){ - return this; -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/tag.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/tag.js deleted file mode 100644 index 4b6728ad..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/tag.js +++ /dev/null @@ -1,95 +0,0 @@ - -/*! - * Jade - nodes - Tag - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Attrs = require('./attrs'), - Block = require('./block'), - inlineTags = require('../inline-tags'); - -/** - * Initialize a `Tag` node with the given tag `name` and optional `block`. - * - * @param {String} name - * @param {Block} block - * @api public - */ - -var Tag = module.exports = function Tag(name, block) { - this.name = name; - this.attrs = []; - this.block = block || new Block; -}; - -/** - * Inherit from `Attrs`. - */ - -Tag.prototype.__proto__ = Attrs.prototype; - -/** - * Clone this tag. - * - * @return {Tag} - * @api private - */ - -Tag.prototype.clone = function(){ - var clone = new Tag(this.name, this.block.clone()); - clone.line = this.line; - clone.attrs = this.attrs; - clone.textOnly = this.textOnly; - return clone; -}; - -/** - * Check if this tag is an inline tag. - * - * @return {Boolean} - * @api private - */ - -Tag.prototype.isInline = function(){ - return ~inlineTags.indexOf(this.name); -}; - -/** - * Check if this tag's contents can be inlined. Used for pretty printing. - * - * @return {Boolean} - * @api private - */ - -Tag.prototype.canInline = function(){ - var nodes = this.block.nodes; - - function isInline(node){ - // Recurse if the node is a block - if (node.isBlock) return node.nodes.every(isInline); - return node.isText || (node.isInline && node.isInline()); - } - - // Empty tag - if (!nodes.length) return true; - - // Text-only or inline-only tag - if (1 == nodes.length) return isInline(nodes[0]); - - // Multi-line inline-only tag - if (this.block.nodes.every(isInline)) { - for (var i = 1, len = nodes.length; i < len; ++i) { - if (nodes[i-1].isText && nodes[i].isText) - return false; - } - return true; - } - - // Mixed tag - return false; -}; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/text.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/text.js deleted file mode 100644 index 3b5dd557..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/nodes/text.js +++ /dev/null @@ -1,36 +0,0 @@ - -/*! - * Jade - nodes - Text - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Text` node with optional `line`. - * - * @param {String} line - * @api public - */ - -var Text = module.exports = function Text(line) { - this.val = ''; - if ('string' == typeof line) this.val = line; -}; - -/** - * Inherit from `Node`. - */ - -Text.prototype.__proto__ = Node.prototype; - -/** - * Flag as text. - */ - -Text.prototype.isText = true; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/parser.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/parser.js deleted file mode 100644 index 92f2af0c..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/parser.js +++ /dev/null @@ -1,710 +0,0 @@ - -/*! - * Jade - Parser - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Lexer = require('./lexer') - , nodes = require('./nodes'); - -/** - * Initialize `Parser` with the given input `str` and `filename`. - * - * @param {String} str - * @param {String} filename - * @param {Object} options - * @api public - */ - -var Parser = exports = module.exports = function Parser(str, filename, options){ - this.input = str; - this.lexer = new Lexer(str, options); - this.filename = filename; - this.blocks = {}; - this.mixins = {}; - this.options = options; - this.contexts = [this]; -}; - -/** - * Tags that may not contain tags. - */ - -var textOnly = exports.textOnly = ['script', 'style']; - -/** - * Parser prototype. - */ - -Parser.prototype = { - - /** - * Push `parser` onto the context stack, - * or pop and return a `Parser`. - */ - - context: function(parser){ - if (parser) { - this.contexts.push(parser); - } else { - return this.contexts.pop(); - } - }, - - /** - * Return the next token object. - * - * @return {Object} - * @api private - */ - - advance: function(){ - return this.lexer.advance(); - }, - - /** - * Skip `n` tokens. - * - * @param {Number} n - * @api private - */ - - skip: function(n){ - while (n--) this.advance(); - }, - - /** - * Single token lookahead. - * - * @return {Object} - * @api private - */ - - peek: function() { - return this.lookahead(1); - }, - - /** - * Return lexer lineno. - * - * @return {Number} - * @api private - */ - - line: function() { - return this.lexer.lineno; - }, - - /** - * `n` token lookahead. - * - * @param {Number} n - * @return {Object} - * @api private - */ - - lookahead: function(n){ - return this.lexer.lookahead(n); - }, - - /** - * Parse input returning a string of js for evaluation. - * - * @return {String} - * @api public - */ - - parse: function(){ - var block = new nodes.Block, parser; - block.line = this.line(); - - while ('eos' != this.peek().type) { - if ('newline' == this.peek().type) { - this.advance(); - } else { - block.push(this.parseExpr()); - } - } - - if (parser = this.extending) { - this.context(parser); - var ast = parser.parse(); - this.context(); - // hoist mixins - for (var name in this.mixins) - ast.unshift(this.mixins[name]); - return ast; - } - - return block; - }, - - /** - * Expect the given type, or throw an exception. - * - * @param {String} type - * @api private - */ - - expect: function(type){ - if (this.peek().type === type) { - return this.advance(); - } else { - throw new Error('expected "' + type + '", but got "' + this.peek().type + '"'); - } - }, - - /** - * Accept the given `type`. - * - * @param {String} type - * @api private - */ - - accept: function(type){ - if (this.peek().type === type) { - return this.advance(); - } - }, - - /** - * tag - * | doctype - * | mixin - * | include - * | filter - * | comment - * | text - * | each - * | code - * | yield - * | id - * | class - * | interpolation - */ - - parseExpr: function(){ - switch (this.peek().type) { - case 'tag': - return this.parseTag(); - case 'mixin': - return this.parseMixin(); - case 'block': - return this.parseBlock(); - case 'case': - return this.parseCase(); - case 'when': - return this.parseWhen(); - case 'default': - return this.parseDefault(); - case 'extends': - return this.parseExtends(); - case 'include': - return this.parseInclude(); - case 'doctype': - return this.parseDoctype(); - case 'filter': - return this.parseFilter(); - case 'comment': - return this.parseComment(); - case 'text': - return this.parseText(); - case 'each': - return this.parseEach(); - case 'code': - return this.parseCode(); - case 'call': - return this.parseCall(); - case 'interpolation': - return this.parseInterpolation(); - case 'yield': - this.advance(); - var block = new nodes.Block; - block.yield = true; - return block; - case 'id': - case 'class': - var tok = this.advance(); - this.lexer.defer(this.lexer.tok('tag', 'div')); - this.lexer.defer(tok); - return this.parseExpr(); - default: - throw new Error('unexpected token "' + this.peek().type + '"'); - } - }, - - /** - * Text - */ - - parseText: function(){ - var tok = this.expect('text') - , node = new nodes.Text(tok.val); - node.line = this.line(); - return node; - }, - - /** - * ':' expr - * | block - */ - - parseBlockExpansion: function(){ - if (':' == this.peek().type) { - this.advance(); - return new nodes.Block(this.parseExpr()); - } else { - return this.block(); - } - }, - - /** - * case - */ - - parseCase: function(){ - var val = this.expect('case').val - , node = new nodes.Case(val); - node.line = this.line(); - node.block = this.block(); - return node; - }, - - /** - * when - */ - - parseWhen: function(){ - var val = this.expect('when').val - return new nodes.Case.When(val, this.parseBlockExpansion()); - }, - - /** - * default - */ - - parseDefault: function(){ - this.expect('default'); - return new nodes.Case.When('default', this.parseBlockExpansion()); - }, - - /** - * code - */ - - parseCode: function(){ - var tok = this.expect('code') - , node = new nodes.Code(tok.val, tok.buffer, tok.escape) - , block - , i = 1; - node.line = this.line(); - while (this.lookahead(i) && 'newline' == this.lookahead(i).type) ++i; - block = 'indent' == this.lookahead(i).type; - if (block) { - this.skip(i-1); - node.block = this.block(); - } - return node; - }, - - /** - * comment - */ - - parseComment: function(){ - var tok = this.expect('comment') - , node; - - if ('indent' == this.peek().type) { - node = new nodes.BlockComment(tok.val, this.block(), tok.buffer); - } else { - node = new nodes.Comment(tok.val, tok.buffer); - } - - node.line = this.line(); - return node; - }, - - /** - * doctype - */ - - parseDoctype: function(){ - var tok = this.expect('doctype') - , node = new nodes.Doctype(tok.val); - node.line = this.line(); - return node; - }, - - /** - * filter attrs? text-block - */ - - parseFilter: function(){ - var block - , tok = this.expect('filter') - , attrs = this.accept('attrs'); - - this.lexer.pipeless = true; - block = this.parseTextBlock(); - this.lexer.pipeless = false; - - var node = new nodes.Filter(tok.val, block, attrs && attrs.attrs); - node.line = this.line(); - return node; - }, - - /** - * tag ':' attrs? block - */ - - parseASTFilter: function(){ - var block - , tok = this.expect('tag') - , attrs = this.accept('attrs'); - - this.expect(':'); - block = this.block(); - - var node = new nodes.Filter(tok.val, block, attrs && attrs.attrs); - node.line = this.line(); - return node; - }, - - /** - * each block - */ - - parseEach: function(){ - var tok = this.expect('each') - , node = new nodes.Each(tok.code, tok.val, tok.key); - node.line = this.line(); - node.block = this.block(); - return node; - }, - - /** - * 'extends' name - */ - - parseExtends: function(){ - var path = require('path') - , fs = require('fs') - , dirname = path.dirname - , basename = path.basename - , join = path.join; - - if (!this.filename) - throw new Error('the "filename" option is required to extend templates'); - - var path = this.expect('extends').val.trim() - , dir = dirname(this.filename); - - var path = join(dir, path + '.jade') - , str = fs.readFileSync(path, 'utf8') - , parser = new Parser(str, path, this.options); - - parser.blocks = this.blocks; - parser.contexts = this.contexts; - this.extending = parser; - - // TODO: null node - return new nodes.Literal(''); - }, - - /** - * 'block' name block - */ - - parseBlock: function(){ - var block = this.expect('block') - , mode = block.mode - , name = block.val.trim(); - - block = 'indent' == this.peek().type - ? this.block() - : new nodes.Block(new nodes.Literal('')); - - var prev = this.blocks[name]; - - if (prev) { - switch (prev.mode) { - case 'append': - block.nodes = block.nodes.concat(prev.nodes); - prev = block; - break; - case 'prepend': - block.nodes = prev.nodes.concat(block.nodes); - prev = block; - break; - } - } - - block.mode = mode; - return this.blocks[name] = prev || block; - }, - - /** - * include block? - */ - - parseInclude: function(){ - var path = require('path') - , fs = require('fs') - , dirname = path.dirname - , basename = path.basename - , join = path.join; - - var path = this.expect('include').val.trim() - , dir = dirname(this.filename); - - if (!this.filename) - throw new Error('the "filename" option is required to use includes'); - - // no extension - if (!~basename(path).indexOf('.')) { - path += '.jade'; - } - - // non-jade - if ('.jade' != path.substr(-5)) { - var path = join(dir, path) - , str = fs.readFileSync(path, 'utf8'); - return new nodes.Literal(str); - } - - var path = join(dir, path) - , str = fs.readFileSync(path, 'utf8') - , parser = new Parser(str, path, this.options); - parser.blocks = this.blocks; - parser.mixins = this.mixins; - - this.context(parser); - var ast = parser.parse(); - this.context(); - ast.filename = path; - - if ('indent' == this.peek().type) { - ast.includeBlock().push(this.block()); - } - - return ast; - }, - - /** - * call ident block - */ - - parseCall: function(){ - var tok = this.expect('call') - , name = tok.val - , args = tok.args - , mixin = new nodes.Mixin(name, args, new nodes.Block, true); - - this.tag(mixin); - if (mixin.block.isEmpty()) mixin.block = null; - return mixin; - }, - - /** - * mixin block - */ - - parseMixin: function(){ - var tok = this.expect('mixin') - , name = tok.val - , args = tok.args - , mixin; - - // definition - if ('indent' == this.peek().type) { - mixin = new nodes.Mixin(name, args, this.block(), false); - this.mixins[name] = mixin; - return mixin; - // call - } else { - return new nodes.Mixin(name, args, null, true); - } - }, - - /** - * indent (text | newline)* outdent - */ - - parseTextBlock: function(){ - var block = new nodes.Block; - block.line = this.line(); - var spaces = this.expect('indent').val; - if (null == this._spaces) this._spaces = spaces; - var indent = Array(spaces - this._spaces + 1).join(' '); - while ('outdent' != this.peek().type) { - switch (this.peek().type) { - case 'newline': - this.advance(); - break; - case 'indent': - this.parseTextBlock().nodes.forEach(function(node){ - block.push(node); - }); - break; - default: - var text = new nodes.Text(indent + this.advance().val); - text.line = this.line(); - block.push(text); - } - } - - if (spaces == this._spaces) this._spaces = null; - this.expect('outdent'); - return block; - }, - - /** - * indent expr* outdent - */ - - block: function(){ - var block = new nodes.Block; - block.line = this.line(); - this.expect('indent'); - while ('outdent' != this.peek().type) { - if ('newline' == this.peek().type) { - this.advance(); - } else { - block.push(this.parseExpr()); - } - } - this.expect('outdent'); - return block; - }, - - /** - * interpolation (attrs | class | id)* (text | code | ':')? newline* block? - */ - - parseInterpolation: function(){ - var tok = this.advance(); - var tag = new nodes.Tag(tok.val); - tag.buffer = true; - return this.tag(tag); - }, - - /** - * tag (attrs | class | id)* (text | code | ':')? newline* block? - */ - - parseTag: function(){ - // ast-filter look-ahead - var i = 2; - if ('attrs' == this.lookahead(i).type) ++i; - if (':' == this.lookahead(i).type) { - if ('indent' == this.lookahead(++i).type) { - return this.parseASTFilter(); - } - } - - var tok = this.advance() - , tag = new nodes.Tag(tok.val); - - tag.selfClosing = tok.selfClosing; - - return this.tag(tag); - }, - - /** - * Parse tag. - */ - - tag: function(tag){ - var dot; - - tag.line = this.line(); - - // (attrs | class | id)* - out: - while (true) { - switch (this.peek().type) { - case 'id': - case 'class': - var tok = this.advance(); - tag.setAttribute(tok.type, "'" + tok.val + "'"); - continue; - case 'attrs': - var tok = this.advance() - , obj = tok.attrs - , escaped = tok.escaped - , names = Object.keys(obj); - - if (tok.selfClosing) tag.selfClosing = true; - - for (var i = 0, len = names.length; i < len; ++i) { - var name = names[i] - , val = obj[name]; - tag.setAttribute(name, val, escaped[name]); - } - continue; - default: - break out; - } - } - - // check immediate '.' - if ('.' == this.peek().val) { - dot = tag.textOnly = true; - this.advance(); - } - - // (text | code | ':')? - switch (this.peek().type) { - case 'text': - tag.block.push(this.parseText()); - break; - case 'code': - tag.code = this.parseCode(); - break; - case ':': - this.advance(); - tag.block = new nodes.Block; - tag.block.push(this.parseExpr()); - break; - } - - // newline* - while ('newline' == this.peek().type) this.advance(); - - tag.textOnly = tag.textOnly || ~textOnly.indexOf(tag.name); - - // script special-case - if ('script' == tag.name) { - var type = tag.getAttribute('type'); - if (!dot && type && 'text/javascript' != type.replace(/^['"]|['"]$/g, '')) { - tag.textOnly = false; - } - } - - // block? - if ('indent' == this.peek().type) { - if (tag.textOnly) { - this.lexer.pipeless = true; - tag.block = this.parseTextBlock(); - this.lexer.pipeless = false; - } else { - var block = this.block(); - if (tag.block) { - for (var i = 0, len = block.nodes.length; i < len; ++i) { - tag.block.push(block.nodes[i]); - } - } else { - tag.block = block; - } - } - } - - return tag; - } -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/runtime.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/runtime.js deleted file mode 100644 index fb711f5e..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/runtime.js +++ /dev/null @@ -1,174 +0,0 @@ - -/*! - * Jade - runtime - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Lame Array.isArray() polyfill for now. - */ - -if (!Array.isArray) { - Array.isArray = function(arr){ - return '[object Array]' == Object.prototype.toString.call(arr); - }; -} - -/** - * Lame Object.keys() polyfill for now. - */ - -if (!Object.keys) { - Object.keys = function(obj){ - var arr = []; - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - arr.push(key); - } - } - return arr; - } -} - -/** - * Merge two attribute objects giving precedence - * to values in object `b`. Classes are special-cased - * allowing for arrays and merging/joining appropriately - * resulting in a string. - * - * @param {Object} a - * @param {Object} b - * @return {Object} a - * @api private - */ - -exports.merge = function merge(a, b) { - var ac = a['class']; - var bc = b['class']; - - if (ac || bc) { - ac = ac || []; - bc = bc || []; - if (!Array.isArray(ac)) ac = [ac]; - if (!Array.isArray(bc)) bc = [bc]; - ac = ac.filter(nulls); - bc = bc.filter(nulls); - a['class'] = ac.concat(bc).join(' '); - } - - for (var key in b) { - if (key != 'class') { - a[key] = b[key]; - } - } - - return a; -}; - -/** - * Filter null `val`s. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - -function nulls(val) { - return val != null; -} - -/** - * Render the given attributes object. - * - * @param {Object} obj - * @param {Object} escaped - * @return {String} - * @api private - */ - -exports.attrs = function attrs(obj, escaped){ - var buf = [] - , terse = obj.terse; - - delete obj.terse; - var keys = Object.keys(obj) - , len = keys.length; - - if (len) { - buf.push(''); - for (var i = 0; i < len; ++i) { - var key = keys[i] - , val = obj[key]; - - if ('boolean' == typeof val || null == val) { - if (val) { - terse - ? buf.push(key) - : buf.push(key + '="' + key + '"'); - } - } else if (0 == key.indexOf('data') && 'string' != typeof val) { - buf.push(key + "='" + JSON.stringify(val) + "'"); - } else if ('class' == key && Array.isArray(val)) { - buf.push(key + '="' + exports.escape(val.join(' ')) + '"'); - } else if (escaped && escaped[key]) { - buf.push(key + '="' + exports.escape(val) + '"'); - } else { - buf.push(key + '="' + val + '"'); - } - } - } - - return buf.join(' '); -}; - -/** - * Escape the given string of `html`. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function escape(html){ - return String(html) - .replace(/&(?!(\w+|\#\d+);)/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); -}; - -/** - * Re-throw the given `err` in context to the - * the jade in `filename` at the given `lineno`. - * - * @param {Error} err - * @param {String} filename - * @param {String} lineno - * @api private - */ - -exports.rethrow = function rethrow(err, filename, lineno){ - if (!filename) throw err; - - var context = 3 - , str = require('fs').readFileSync(filename, 'utf8') - , lines = str.split('\n') - , start = Math.max(lineno - context, 0) - , end = Math.min(lines.length, lineno + context); - - // Error context - var context = lines.slice(start, end).map(function(line, i){ - var curr = i + start + 1; - return (curr == lineno ? ' > ' : ' ') - + curr - + '| ' - + line; - }).join('\n'); - - // Alter exception message - err.path = filename; - err.message = (filename || 'Jade') + ':' + lineno - + '\n' + context + '\n\n' + err.message; - throw err; -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/self-closing.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/self-closing.js deleted file mode 100644 index 05487712..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/self-closing.js +++ /dev/null @@ -1,19 +0,0 @@ - -/*! - * Jade - self closing tags - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = [ - 'meta' - , 'img' - , 'link' - , 'input' - , 'source' - , 'area' - , 'base' - , 'col' - , 'br' - , 'hr' -]; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/utils.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/utils.js deleted file mode 100644 index ff46d022..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/lib/utils.js +++ /dev/null @@ -1,49 +0,0 @@ - -/*! - * Jade - utils - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Convert interpolation in the given string to JavaScript. - * - * @param {String} str - * @return {String} - * @api private - */ - -var interpolate = exports.interpolate = function(str){ - return str.replace(/(\\)?([#!]){(.*?)}/g, function(str, escape, flag, code){ - return escape - ? str - : "' + " - + ('!' == flag ? '' : 'escape') - + "((interp = " + code.replace(/\\'/g, "'") - + ") == null ? '' : interp) + '"; - }); -}; - -/** - * Escape single quotes in `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -var escape = exports.escape = function(str) { - return str.replace(/'/g, "\\'"); -}; - -/** - * Interpolate, and escape the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.text = function(str){ - return interpolate(escape(str)); -}; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.orig b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.orig deleted file mode 100644 index 9303c347..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.orig +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.rej b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.rej deleted file mode 100644 index 69244ff8..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.rej +++ /dev/null @@ -1,5 +0,0 @@ ---- /dev/null -+++ .gitignore -@@ -0,0 +1,2 @@ -+node_modules/ -+npm-debug.log \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.npmignore b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.npmignore deleted file mode 100644 index 9303c347..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/LICENSE b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/LICENSE deleted file mode 100644 index 432d1aeb..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 2010 James Halliday (mail@substack.net) - -This project is free software released under the MIT/X11 license: - -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/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/README.markdown b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/README.markdown deleted file mode 100644 index b4dd75fd..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/README.markdown +++ /dev/null @@ -1,54 +0,0 @@ -mkdirp -====== - -Like `mkdir -p`, but in node.js! - -example -======= - -pow.js ------- - var mkdirp = require('mkdirp'); - - mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') - }); - -Output - pow! - -And now /tmp/foo/bar/baz exists, huzzah! - -methods -======= - -var mkdirp = require('mkdirp'); - -mkdirp(dir, mode, cb) ---------------------- - -Create a new directory and any necessary subdirectories at `dir` with octal -permission string `mode`. - -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -mkdirp.sync(dir, mode) ----------------------- - -Synchronously create a new directory and any necessary subdirectories at `dir` -with octal permission string `mode`. - -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -install -======= - -With [npm](http://npmjs.org) do: - - npm install mkdirp - -license -======= - -MIT/X11 diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js deleted file mode 100644 index e6924212..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js +++ /dev/null @@ -1,6 +0,0 @@ -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.orig b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.orig deleted file mode 100644 index 77414622..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.orig +++ /dev/null @@ -1,6 +0,0 @@ -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', 0755, function (err) { - if (err) console.error(err) - else console.log('pow!') -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.rej b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.rej deleted file mode 100644 index 81e7f431..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.rej +++ /dev/null @@ -1,19 +0,0 @@ ---- examples/pow.js -+++ examples/pow.js -@@ -1,6 +1,15 @@ --var mkdirp = require('mkdirp').mkdirp; -+var mkdirp = require('../').mkdirp, -+ mkdirpSync = require('../').mkdirpSync; - - mkdirp('/tmp/foo/bar/baz', 0755, function (err) { - if (err) console.error(err) - else console.log('pow!') - }); -+ -+try { -+ mkdirpSync('/tmp/bar/foo/baz', 0755); -+ console.log('double pow!'); -+} -+catch (ex) { -+ console.log(ex); -+} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/index.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/index.js deleted file mode 100644 index 25f43adf..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/index.js +++ /dev/null @@ -1,79 +0,0 @@ -var path = require('path'); -var fs = require('fs'); - -module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; - -function mkdirP (p, mode, f) { - if (typeof mode === 'function' || mode === undefined) { - f = mode; - mode = 0777 & (~process.umask()); - } - - var cb = f || function () {}; - if (typeof mode === 'string') mode = parseInt(mode, 8); - p = path.resolve(p); - - fs.mkdir(p, mode, function (er) { - if (!er) return cb(); - switch (er.code) { - case 'ENOENT': - mkdirP(path.dirname(p), mode, function (er) { - if (er) cb(er); - else mkdirP(p, mode, cb); - }); - break; - - case 'EEXIST': - fs.stat(p, function (er2, stat) { - // if the stat fails, then that's super weird. - // let the original EEXIST be the failure reason. - if (er2 || !stat.isDirectory()) cb(er) - else cb(); - }); - break; - - default: - cb(er); - break; - } - }); -} - -mkdirP.sync = function sync (p, mode) { - if (mode === undefined) { - mode = 0777 & (~process.umask()); - } - - if (typeof mode === 'string') mode = parseInt(mode, 8); - p = path.resolve(p); - - try { - fs.mkdirSync(p, mode) - } - catch (err0) { - switch (err0.code) { - case 'ENOENT' : - var err1 = sync(path.dirname(p), mode) - if (err1) throw err1; - else return sync(p, mode); - break; - - case 'EEXIST' : - var stat; - try { - stat = fs.statSync(p); - } - catch (err1) { - throw err0 - } - if (!stat.isDirectory()) throw err0; - else return null; - break; - default : - throw err0 - break; - } - } - - return null; -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/package.json b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/package.json deleted file mode 100644 index 78638866..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "mkdirp", - "description": "Recursively mkdir, like `mkdir -p`", - "version": "0.3.0", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "main": "./index", - "keywords": [ - "mkdir", - "directory" - ], - "repository": { - "type": "git", - "url": "http://github.com/substack/node-mkdirp.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "devDependencies": { - "tap": "0.0.x" - }, - "license": "MIT/X11", - "engines": { - "node": "*" - }, - "readme": "mkdirp\n======\n\nLike `mkdir -p`, but in node.js!\n\nexample\n=======\n\npow.js\n------\n var mkdirp = require('mkdirp');\n \n mkdirp('/tmp/foo/bar/baz', function (err) {\n if (err) console.error(err)\n else console.log('pow!')\n });\n\nOutput\n pow!\n\nAnd now /tmp/foo/bar/baz exists, huzzah!\n\nmethods\n=======\n\nvar mkdirp = require('mkdirp');\n\nmkdirp(dir, mode, cb)\n---------------------\n\nCreate a new directory and any necessary subdirectories at `dir` with octal\npermission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\nmkdirp.sync(dir, mode)\n----------------------\n\nSynchronously create a new directory and any necessary subdirectories at `dir`\nwith octal permission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n npm install mkdirp\n\nlicense\n=======\n\nMIT/X11\n", - "readmeFilename": "README.markdown", - "bugs": { - "url": "https://github.com/substack/node-mkdirp/issues" - }, - "homepage": "https://github.com/substack/node-mkdirp", - "_id": "mkdirp@0.3.0", - "_from": "mkdirp@0.3.0" -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/chmod.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/chmod.js deleted file mode 100644 index 520dcb8e..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/chmod.js +++ /dev/null @@ -1,38 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -test('chmod-pre', function (t) { - var mode = 0744 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.equal(stat && stat.mode & 0777, mode, 'should be 0744'); - t.end(); - }); - }); -}); - -test('chmod', function (t) { - var mode = 0755 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.end(); - }); - }); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/clobber.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/clobber.js deleted file mode 100644 index 0eb70998..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/clobber.js +++ /dev/null @@ -1,37 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -// a file in the way -var itw = ps.slice(0, 3).join('/'); - - -test('clobber-pre', function (t) { - console.error("about to write to "+itw) - fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); - - fs.stat(itw, function (er, stat) { - t.ifError(er) - t.ok(stat && stat.isFile(), 'should be file') - t.end() - }) -}) - -test('clobber', function (t) { - t.plan(2); - mkdirp(file, 0755, function (err) { - t.ok(err); - t.equal(err.code, 'ENOTDIR'); - t.end(); - }); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/mkdirp.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/mkdirp.js deleted file mode 100644 index b07cd70c..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/mkdirp.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('woo', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/perm.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/perm.js deleted file mode 100644 index 23a7abbd..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/perm.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('async perm', function (t) { - t.plan(2); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); - -test('async root perm', function (t) { - mkdirp('/tmp', 0755, function (err) { - if (err) t.fail(err); - t.end(); - }); - t.end(); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/perm_sync.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/perm_sync.js deleted file mode 100644 index f685f609..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/perm_sync.js +++ /dev/null @@ -1,39 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('sync perm', function (t) { - t.plan(2); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json'; - - mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }); -}); - -test('sync root perm', function (t) { - t.plan(1); - - var file = '/tmp'; - mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/race.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/race.js deleted file mode 100644 index 96a04476..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/race.js +++ /dev/null @@ -1,41 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('race', function (t) { - t.plan(4); - var ps = [ '', 'tmp' ]; - - for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); - } - var file = ps.join('/'); - - var res = 2; - mk(file, function () { - if (--res === 0) t.end(); - }); - - mk(file, function () { - if (--res === 0) t.end(); - }); - - function mk (file, cb) { - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - if (cb) cb(); - } - }) - }) - }); - } -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/rel.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/rel.js deleted file mode 100644 index 79858243..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/rel.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('rel', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var cwd = process.cwd(); - process.chdir('/tmp'); - - var file = [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - process.chdir(cwd); - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/sync.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/sync.js deleted file mode 100644 index e0e389de..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/sync.js +++ /dev/null @@ -1,27 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('sync', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - var err = mkdirp.sync(file, 0755); - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/umask.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/umask.js deleted file mode 100644 index 64ccafe2..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/umask.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('implicit mode from umask', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0777 & (~process.umask())); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/umask_sync.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/umask_sync.js deleted file mode 100644 index 83cba560..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/umask_sync.js +++ /dev/null @@ -1,27 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('umask sync modes', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - var err = mkdirp.sync(file); - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, (0777 & (~process.umask()))); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/package.json b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/package.json deleted file mode 100644 index 689d82d7..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "jade", - "description": "Jade template engine", - "version": "0.26.3", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/jade" - }, - "main": "./index.js", - "bin": { - "jade": "./bin/jade" - }, - "man": [ - "./jade.1" - ], - "dependencies": { - "commander": "0.6.1", - "mkdirp": "0.3.0" - }, - "devDependencies": { - "mocha": "*", - "markdown": "*", - "stylus": "*", - "uubench": "*", - "should": "*", - "less": "*", - "uglify-js": "*" - }, - "component": { - "scripts": { - "jade": "runtime.js" - } - }, - "scripts": { - "prepublish": "npm prune" - }, - "bugs": { - "url": "https://github.com/visionmedia/jade/issues" - }, - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/visionmedia/jade", - "_id": "jade@0.26.3", - "_from": "jade@0.26.3" -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/runtime.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/runtime.js deleted file mode 100644 index 0f549077..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/runtime.js +++ /dev/null @@ -1,179 +0,0 @@ - -jade = (function(exports){ -/*! - * Jade - runtime - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Lame Array.isArray() polyfill for now. - */ - -if (!Array.isArray) { - Array.isArray = function(arr){ - return '[object Array]' == Object.prototype.toString.call(arr); - }; -} - -/** - * Lame Object.keys() polyfill for now. - */ - -if (!Object.keys) { - Object.keys = function(obj){ - var arr = []; - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - arr.push(key); - } - } - return arr; - } -} - -/** - * Merge two attribute objects giving precedence - * to values in object `b`. Classes are special-cased - * allowing for arrays and merging/joining appropriately - * resulting in a string. - * - * @param {Object} a - * @param {Object} b - * @return {Object} a - * @api private - */ - -exports.merge = function merge(a, b) { - var ac = a['class']; - var bc = b['class']; - - if (ac || bc) { - ac = ac || []; - bc = bc || []; - if (!Array.isArray(ac)) ac = [ac]; - if (!Array.isArray(bc)) bc = [bc]; - ac = ac.filter(nulls); - bc = bc.filter(nulls); - a['class'] = ac.concat(bc).join(' '); - } - - for (var key in b) { - if (key != 'class') { - a[key] = b[key]; - } - } - - return a; -}; - -/** - * Filter null `val`s. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - -function nulls(val) { - return val != null; -} - -/** - * Render the given attributes object. - * - * @param {Object} obj - * @param {Object} escaped - * @return {String} - * @api private - */ - -exports.attrs = function attrs(obj, escaped){ - var buf = [] - , terse = obj.terse; - - delete obj.terse; - var keys = Object.keys(obj) - , len = keys.length; - - if (len) { - buf.push(''); - for (var i = 0; i < len; ++i) { - var key = keys[i] - , val = obj[key]; - - if ('boolean' == typeof val || null == val) { - if (val) { - terse - ? buf.push(key) - : buf.push(key + '="' + key + '"'); - } - } else if (0 == key.indexOf('data') && 'string' != typeof val) { - buf.push(key + "='" + JSON.stringify(val) + "'"); - } else if ('class' == key && Array.isArray(val)) { - buf.push(key + '="' + exports.escape(val.join(' ')) + '"'); - } else if (escaped && escaped[key]) { - buf.push(key + '="' + exports.escape(val) + '"'); - } else { - buf.push(key + '="' + val + '"'); - } - } - } - - return buf.join(' '); -}; - -/** - * Escape the given string of `html`. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function escape(html){ - return String(html) - .replace(/&(?!(\w+|\#\d+);)/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); -}; - -/** - * Re-throw the given `err` in context to the - * the jade in `filename` at the given `lineno`. - * - * @param {Error} err - * @param {String} filename - * @param {String} lineno - * @api private - */ - -exports.rethrow = function rethrow(err, filename, lineno){ - if (!filename) throw err; - - var context = 3 - , str = require('fs').readFileSync(filename, 'utf8') - , lines = str.split('\n') - , start = Math.max(lineno - context, 0) - , end = Math.min(lines.length, lineno + context); - - // Error context - var context = lines.slice(start, end).map(function(line, i){ - var curr = i + start + 1; - return (curr == lineno ? ' > ' : ' ') - + curr - + '| ' - + line; - }).join('\n'); - - // Alter exception message - err.path = filename; - err.message = (filename || 'Jade') + ':' + lineno - + '\n' + context + '\n\n' + err.message; - throw err; -}; - - return exports; - -})({}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/runtime.min.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/runtime.min.js deleted file mode 100644 index 1714efb0..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/runtime.min.js +++ /dev/null @@ -1 +0,0 @@ -jade=function(exports){Array.isArray||(Array.isArray=function(arr){return"[object Array]"==Object.prototype.toString.call(arr)}),Object.keys||(Object.keys=function(obj){var arr=[];for(var key in obj)obj.hasOwnProperty(key)&&arr.push(key);return arr}),exports.merge=function merge(a,b){var ac=a["class"],bc=b["class"];if(ac||bc)ac=ac||[],bc=bc||[],Array.isArray(ac)||(ac=[ac]),Array.isArray(bc)||(bc=[bc]),ac=ac.filter(nulls),bc=bc.filter(nulls),a["class"]=ac.concat(bc).join(" ");for(var key in b)key!="class"&&(a[key]=b[key]);return a};function nulls(val){return val!=null}return exports.attrs=function attrs(obj,escaped){var buf=[],terse=obj.terse;delete obj.terse;var keys=Object.keys(obj),len=keys.length;if(len){buf.push("");for(var i=0;i/g,">").replace(/"/g,""")},exports.rethrow=function rethrow(err,filename,lineno){if(!filename)throw err;var context=3,str=require("fs").readFileSync(filename,"utf8"),lines=str.split("\n"),start=Math.max(lineno-context,0),end=Math.min(lines.length,lineno+context),context=lines.slice(start,end).map(function(line,i){var curr=i+start+1;return(curr==lineno?" > ":" ")+curr+"| "+line}).join("\n");throw err.path=filename,err.message=(filename||"Jade")+":"+lineno+"\n"+context+"\n\n"+err.message,err},exports}({}); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/test.jade b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/test.jade deleted file mode 100644 index b3a89889..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/test.jade +++ /dev/null @@ -1,7 +0,0 @@ -p. - This is a large - body of text for - this tag. - - Nothing too - exciting. \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/testing/head.jade b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/testing/head.jade deleted file mode 100644 index 85154062..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/testing/head.jade +++ /dev/null @@ -1,5 +0,0 @@ -head - script(src='/jquery.js') - yield - if false - script(src='/jquery.ui.js') diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/testing/index.jade b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/testing/index.jade deleted file mode 100644 index 1032c5fa..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/testing/index.jade +++ /dev/null @@ -1,22 +0,0 @@ - -tag = 'p' -foo = 'bar' - -#{tag} value -#{tag}(foo='bar') value -#{foo ? 'a' : 'li'}(something) here - -mixin item(icon) - li - if attributes.href - a(attributes) - img.icon(src=icon) - block - else - span(attributes) - img.icon(src=icon) - block - -ul - +item('contact') Contact - +item(href='/contact') Contact diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/testing/index.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/testing/index.js deleted file mode 100644 index 226e8c01..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/testing/index.js +++ /dev/null @@ -1,11 +0,0 @@ - -/** - * Module dependencies. - */ - -var jade = require('../'); - -jade.renderFile('testing/index.jade', { pretty: true, debug: true, compileDebug: false }, function(err, str){ - if (err) throw err; - console.log(str); -}); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/testing/layout.jade b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/testing/layout.jade deleted file mode 100644 index 6923cf15..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/testing/layout.jade +++ /dev/null @@ -1,6 +0,0 @@ -html - include head - script(src='/caustic.js') - script(src='/app.js') - body - block content \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/testing/user.jade b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/testing/user.jade deleted file mode 100644 index 3c636b7c..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/testing/user.jade +++ /dev/null @@ -1,7 +0,0 @@ -h1 Tobi -p Is a ferret - -ul - li: a foo - li: a bar - li: a baz \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/testing/user.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/testing/user.js deleted file mode 100644 index 2ecc45ed..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/node_modules/jade/testing/user.js +++ /dev/null @@ -1,27 +0,0 @@ -function anonymous(locals, attrs, escape, rethrow) { -var attrs = jade.attrs, escape = jade.escape, rethrow = jade.rethrow; -var __jade = [{ lineno: 1, filename: "testing/user.jade" }]; -try { -var buf = []; -with (locals || {}) { -var interp; -__jade.unshift({ lineno: 1, filename: __jade[0].filename }); -__jade.unshift({ lineno: 1, filename: __jade[0].filename }); -buf.push('

      Tobi'); -__jade.unshift({ lineno: undefined, filename: __jade[0].filename }); -__jade.shift(); -buf.push('

      '); -__jade.shift(); -__jade.unshift({ lineno: 2, filename: __jade[0].filename }); -buf.push('

      Is a ferret'); -__jade.unshift({ lineno: undefined, filename: __jade[0].filename }); -__jade.shift(); -buf.push('

      '); -__jade.shift(); -__jade.shift(); -} -return buf.join(""); -} catch (err) { - rethrow(err, __jade[0].filename, __jade[0].lineno); -} -} \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/package.json b/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/package.json deleted file mode 100644 index bf8992e4..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/mocha/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "mocha", - "version": "1.13.0", - "description": "simple, flexible, fun test framework", - "keywords": [ - "mocha", - "test", - "bdd", - "tdd", - "tap" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/mocha.git" - }, - "main": "./index", - "bin": { - "mocha": "./bin/mocha", - "_mocha": "./bin/_mocha" - }, - "engines": { - "node": ">= 0.4.x" - }, - "scripts": { - "test": "make test-all" - }, - "dependencies": { - "commander": "0.6.1", - "growl": "1.7.x", - "jade": "0.26.3", - "diff": "1.0.7", - "debug": "*", - "mkdirp": "0.3.5", - "glob": "3.2.3" - }, - "devDependencies": { - "should": "*", - "coffee-script": "1.2" - }, - "files": [ - "bin", - "images", - "lib", - "index.js", - "mocha.css", - "mocha.js" - ], - "readme": " [![Build Status](https://secure.travis-ci.org/visionmedia/mocha.png)](http://travis-ci.org/visionmedia/mocha)\n\n [![Mocha test framework](http://f.cl.ly/items/3l1k0n2A1U3M1I1L210p/Screen%20Shot%202012-02-24%20at%202.21.43%20PM.png)](http://visionmedia.github.io/mocha)\n\n Mocha is a simple, flexible, fun JavaScript test framework for node.js and the browser. For more information view the [documentation](http://visionmedia.github.io/mocha).\n\n## Contributors\n\n```\n\n project : mocha\n repo age : 1 year, 7 months\n active : 272 days\n commits : 1116\n files : 123\n authors :\n 504 TJ Holowaychuk 45.2%\n 389 Tj Holowaychuk 34.9%\n 31 Guillermo Rauch 2.8%\n 13 Attila Domokos 1.2%\n 9 John Firebaugh 0.8%\n 8 Jo Liss 0.7%\n 7 Nathan Rajlich 0.6%\n 6 James Carr 0.5%\n 6 Brendan Nee 0.5%\n 5 Aaron Heckmann 0.4%\n 4 hokaccha 0.4%\n 4 Xavier Antoviaque 0.4%\n 4 Joshua Krall 0.4%\n 3 Wil Moore III 0.3%\n 3 Jesse Dailey 0.3%\n 3 Nathan Bowser 0.3%\n 3 Tyson Tate 0.3%\n 3 Cory Thomas 0.3%\n 3 Ryunosuke SATO 0.3%\n 3 Paul Miller 0.3%\n 3 Ben Lindsey 0.3%\n 2 Forbes Lindesay 0.2%\n 2 Konstantin Käfer 0.2%\n 2 Brian Beck 0.2%\n 2 Merrick Christensen 0.2%\n 2 Michael Riley 0.2%\n 2 David Henderson 0.2%\n 2 Nathan Alderson 0.2%\n 2 Paul Armstrong 0.2%\n 2 Pete Hawkins 0.2%\n 2 Quang Van 0.2%\n 2 Raynos 0.2%\n 2 Jonas Westerlund 0.2%\n 2 Domenic Denicola 0.2%\n 2 Shawn Krisman 0.2%\n 2 Simon Gaeremynck 0.2%\n 2 FARKAS Máté 0.2%\n 2 Timo Tijhof 0.2%\n 2 Justin DuJardin 0.2%\n 2 Juzer Ali 0.2%\n 2 Ian Storm Taylor 0.2%\n 2 Arian Stolwijk 0.2%\n 2 domenic 0.2%\n 1 Richard Dingwall 0.1%\n 1 Russ Bradberry 0.1%\n 1 Sasha Koss 0.1%\n 1 Seiya Konno 0.1%\n 1 Standa Opichal 0.1%\n 1 Steve Mason 0.1%\n 1 Will Langstroth 0.1%\n 1 Yanis Wang 0.1%\n 1 Yuest Wang 0.1%\n 1 abrkn 0.1%\n 1 airportyh 0.1%\n 1 fengmk2 0.1%\n 1 tgautier@yahoo.com 0.1%\n 1 traleig1 0.1%\n 1 vlad 0.1%\n 1 yuitest 0.1%\n 1 Adam Crabtree 0.1%\n 1 Andreas Brekken 0.1%\n 1 Atsuya Takagi 0.1%\n 1 Austin Birch 0.1%\n 1 Bjørge Næss 0.1%\n 1 Brian Moore 0.1%\n 1 Bryan Donovan 0.1%\n 1 Casey Foster 0.1%\n 1 Corey Butler 0.1%\n 1 Dave McKenna 0.1%\n 1 Fedor Indutny 0.1%\n 1 Florian Margaine 0.1%\n 1 Frederico Silva 0.1%\n 1 Fredrik Lindin 0.1%\n 1 Gareth Murphy 0.1%\n 1 Gavin Mogan 0.1%\n 1 Greg Perkins 0.1%\n 1 Harry Brundage 0.1%\n 1 Herman Junge 0.1%\n 1 Ian Young 0.1%\n 1 Ivan 0.1%\n 1 Jaakko Salonen 0.1%\n 1 Jakub Nešetřil 0.1%\n 1 James Bowes 0.1%\n 1 James Lal 0.1%\n 1 Jason Barry 0.1%\n 1 Javier Aranda 0.1%\n 1 Jeff Kunkle 0.1%\n 1 Jonathan Creamer 0.1%\n 1 Jussi Virtanen 0.1%\n 1 Katie Gengler 0.1%\n 1 Kazuhito Hokamura 0.1%\n 1 Koen Punt 0.1%\n 1 Laszlo Bacsi 0.1%\n 1 László Bácsi 0.1%\n 1 Maciej Małecki 0.1%\n 1 Matt Robenolt 0.1%\n 1 Matt Smith 0.1%\n 1 Matthew Shanley 0.1%\n 1 Michael Schoonmaker 0.1%\n 1 Phil Sung 0.1%\n 1 R56 0.1%\n```\n\n## Links\n\n - [Google Group](http://groups.google.com/group/mochajs)\n - [Wiki](https://github.com/visionmedia/mocha/wiki)\n - Mocha [Extensions and reporters](https://github.com/visionmedia/mocha/wiki)\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/mocha/issues" - }, - "homepage": "https://github.com/visionmedia/mocha", - "_id": "mocha@1.13.0", - "_from": "mocha@1.13.x" -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/nan/LICENSE b/node_modules/gulp-sass/node_modules/node-sass/node_modules/nan/LICENSE deleted file mode 100644 index 352c2874..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/nan/LICENSE +++ /dev/null @@ -1,43 +0,0 @@ -Copyright 2013, NAN contributors: - - Rod Vagg - - Benjamin Byholm - - Trevor Norris -(the "Original Author") -All rights reserved. - -MIT +no-false-attribs License - -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. - -Distributions of all or part of the Software intended to be used -by the recipients as they would use the unmodified Software, -containing modifications that substantially alter, remove, or -disable functionality of the Software, outside of the documented -configuration mechanisms provided by the Software, shall be -modified such that the Original Author's bug reporting email -addresses and urls are either replaced with the contact information -of the parties responsible for the changes, or removed entirely. - -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. - - -Except where noted, this license applies to any and all software -programs and associated documentation files created by the -Original Author, when distributed with the Software. diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/nan/README.md b/node_modules/gulp-sass/node_modules/node-sass/node_modules/nan/README.md deleted file mode 100644 index 36842c54..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/nan/README.md +++ /dev/null @@ -1,792 +0,0 @@ -Native Abstractions for Node.js -=============================== - -**A header file filled with macro and utility goodness for making add-on development for Node.js easier across versions 0.8, 0.10 and 0.11, and eventually 0.12.** - -***Current version: 0.6.0*** *(See [nan.h](https://github.com/rvagg/nan/blob/master/nan.h) for complete ChangeLog)* - -[![NPM](https://nodei.co/npm/nan.png?downloads=true)](https://nodei.co/npm/nan/) [![NPM](https://nodei.co/npm-dl/nan.png?months=6)](https://nodei.co/npm/nan/) - -Thanks to the crazy changes in V8 (and some in Node core), keeping native addons compiling happily across versions, particularly 0.10 to 0.11/0.12, is a minor nightmare. The goal of this project is to store all logic necessary to develop native Node.js addons without having to inspect `NODE_MODULE_VERSION` and get yourself into a macro-tangle. - -This project also contains some helper utilities that make addon development a bit more pleasant. - - * **[News & Updates](#news)** - * **[Usage](#usage)** - * **[Example](#example)** - * **[API](#api)** - - -## News & Updates - -### Nov-2013: Node 0.11.9+ breaking V8 change - -The version of V8 that's shipping with Node 0.11.9+ has changed the signature for new `Local`s to: `v8::Local::New(isolate, value)`, i.e. introducing the `isolate` argument and therefore breaking all new `Local` declarations for previous versions. NAN 0.6+ now includes a `NanNewLocal(value)` that can be used in place to work around this incompatibility and maintain compatibility with 0.8->0.11.9+ (minus a few early 0.11 releases). - -For example, if you wanted to return a `null` on a callback you will have to change the argument from `v8::Local::New(v8::Null())` to `NanNewLocal(v8::Null())`. - -### Nov-2013: Change to binding.gyp `"include_dirs"` for NAN - -Inclusion of NAN in a project's binding.gyp is now greatly simplified. You can now just use `" -## Usage - -Simply add **NAN** as a dependency in the *package.json* of your Node addon: - -``` bash -$ npm install --save nan -``` - -Pull in the path to **NAN** in your *binding.gyp* so that you can use `#include "nan.h"` in your *.cpp* files: - -``` python -"include_dirs" : [ - "` when compiling your addon. - - -## Example - -See **[LevelDOWN](https://github.com/rvagg/node-leveldown/pull/48)** for a full example of **NAN** in use. - -For a simpler example, see the **[async pi estimation example](https://github.com/rvagg/nan/tree/master/examples/async_pi_estimate)** in the examples directory for full code and an explanation of what this Monte Carlo Pi estimation example does. Below are just some parts of the full example that illustrate the use of **NAN**. - -Compare to the current 0.10 version of this example, found in the [node-addon-examples](https://github.com/rvagg/node-addon-examples/tree/master/9_async_work) repository and also a 0.11 version of the same found [here](https://github.com/kkoopa/node-addon-examples/tree/5c01f58fc993377a567812597e54a83af69686d7/9_async_work). - -Note that there is no embedded version sniffing going on here and also the async work is made much simpler, see below for details on the `NanAsyncWorker` class. - -```c++ -// addon.cc -#include -#include "nan.h" -// ... - -using namespace v8; - -void InitAll(Handle exports) { - exports->Set(NanSymbol("calculateSync"), - FunctionTemplate::New(CalculateSync)->GetFunction()); - - exports->Set(NanSymbol("calculateAsync"), - FunctionTemplate::New(CalculateAsync)->GetFunction()); -} - -NODE_MODULE(addon, InitAll) -``` - -```c++ -// sync.h -#include -#include "nan.h" - -NAN_METHOD(CalculateSync); -``` - -```c++ -// sync.cc -#include -#include "nan.h" -#include "sync.h" -// ... - -using namespace v8; - -// Simple synchronous access to the `Estimate()` function -NAN_METHOD(CalculateSync) { - NanScope(); - - // expect a number as the first argument - int points = args[0]->Uint32Value(); - double est = Estimate(points); - - NanReturnValue(Number::New(est)); -} -``` - -```c++ -// async.cc -#include -#include "nan.h" -#include "async.h" - -// ... - -using namespace v8; - -class PiWorker : public NanAsyncWorker { - public: - PiWorker(NanCallback *callback, int points) - : NanAsyncWorker(callback), points(points) {} - ~PiWorker() {} - - // Executed inside the worker-thread. - // It is not safe to access V8, or V8 data structures - // here, so everything we need for input and output - // should go on `this`. - void Execute () { - estimate = Estimate(points); - } - - // Executed when the async work is complete - // this function will be run inside the main event loop - // so it is safe to use V8 again - void HandleOKCallback () { - NanScope(); - - Local argv[] = { - Local::New(Null()) - , Number::New(estimate) - }; - - callback->Call(2, argv); - }; - - private: - int points; - double estimate; -}; - -// Asynchronous access to the `Estimate()` function -NAN_METHOD(CalculateAsync) { - NanScope(); - - int points = args[0]->Uint32Value(); - NanCallback *callback = new NanCallback(args[1].As()); - - NanAsyncQueueWorker(new PiWorker(callback, points)); - NanReturnUndefined(); -} -``` - - -## API - - * NAN_METHOD - * NAN_GETTER - * NAN_SETTER - * NAN_PROPERTY_GETTER - * NAN_PROPERTY_SETTER - * NAN_PROPERTY_ENUMERATOR - * NAN_PROPERTY_DELETER - * NAN_PROPERTY_QUERY - * NAN_INDEX_GETTER - * NAN_INDEX_SETTER - * NAN_INDEX_ENUMERATOR - * NAN_INDEX_DELETER - * NAN_INDEX_QUERY - * NAN_WEAK_CALLBACK - * NAN_DEPRECATED - * NAN_INLINE - * NanNewLocal - * NanReturnValue - * NanReturnUndefined - * NanReturnNull - * NanReturnEmptyString - * NanScope - * NanLocker - * NanUnlocker - * NanGetInternalFieldPointer - * NanSetInternalFieldPointer - * NanObjectWrapHandle - * NanMakeWeak - * NanSymbol - * NanGetPointerSafe - * NanSetPointerSafe - * NanFromV8String - * NanBooleanOptionValue - * NanUInt32OptionValue - * NanError, NanTypeError, NanRangeError - * NanThrowError, NanThrowTypeError, NanThrowRangeError, NanThrowError(Handle), NanThrowError(Handle, int) - * NanNewBufferHandle(char *, size_t, FreeCallback, void *), NanNewBufferHandle(char *, uint32_t), NanNewBufferHandle(uint32_t) - * NanBufferUse(char *, uint32_t) - * NanNewContextHandle - * NanHasInstance - * NanPersistentToLocal - * NanDispose - * NanAssignPersistent - * NanInitPersistent - * NanCallback - * NanAsyncWorker - * NanAsyncQueueWorker - - -### NAN_METHOD(methodname) - -Use `NAN_METHOD` to define your V8 accessible methods: - -```c++ -// .h: -class Foo : public node::ObjectWrap { - ... - - static NAN_METHOD(Bar); - static NAN_METHOD(Baz); -} - - -// .cc: -NAN_METHOD(Foo::Bar) { - ... -} - -NAN_METHOD(Foo::Baz) { - ... -} -``` - -The reason for this macro is because of the method signature change in 0.11: - -```c++ -// 0.10 and below: -Handle name(const Arguments& args) - -// 0.11 and above -void name(const FunctionCallbackInfo& args) -``` - -The introduction of `FunctionCallbackInfo` brings additional complications: - - -### NAN_GETTER(methodname) - -Use `NAN_GETTER` to declare your V8 accessible getters. You get a `Local` `property` and an appropriately typed `args` object that can act like the `args` argument to a `NAN_METHOD` call. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_GETTER`. - - -### NAN_SETTER(methodname) - -Use `NAN_SETTER` to declare your V8 accessible setters. Same as `NAN_GETTER` but you also get a `Local` `value` object to work with. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_SETTER`. - - -### NAN_PROPERTY_GETTER(cbname) -Use `NAN_PROPERTY_GETTER` to declare your V8 accessible property getters. You get a `Local` `property` and an appropriately typed `args` object that can act similar to the `args` argument to a `NAN_METHOD` call. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_GETTER`. - - -### NAN_PROPERTY_SETTER(cbname) -Use `NAN_PROPERTY_SETTER` to declare your V8 accessible property setters. Same as `NAN_PROPERTY_GETTER` but you also get a `Local` `value` object to work with. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_SETTER`. - - -### NAN_PROPERTY_ENUMERATOR(cbname) -Use `NAN_PROPERTY_ENUMERATOR` to declare your V8 accessible property enumerators. You get an appropriately typed `args` object like the `args` argument to a `NAN_PROPERTY_GETTER` call. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_ENUMERATOR`. - - -### NAN_PROPERTY_DELETER(cbname) -Use `NAN_PROPERTY_DELETER` to declare your V8 accessible property deleters. Same as `NAN_PROPERTY_GETTER`. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_DELETER`. - - -### NAN_PROPERTY_QUERY(cbname) -Use `NAN_PROPERTY_QUERY` to declare your V8 accessible property queries. Same as `NAN_PROPERTY_GETTER`. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_QUERY`. - - -### NAN_INDEX_GETTER(cbname) -Use `NAN_INDEX_GETTER` to declare your V8 accessible index getters. You get a `uint32_t` `index` and an appropriately typed `args` object that can act similar to the `args` argument to a `NAN_METHOD` call. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_INDEX_GETTER`. - - -### NAN_INDEX_SETTER(cbname) -Use `NAN_INDEX_SETTER` to declare your V8 accessible index setters. Same as `NAN_INDEX_GETTER` but you also get a `Local` `value` object to work with. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_INDEX_SETTER`. - - -### NAN_INDEX_ENUMERATOR(cbname) -Use `NAN_INDEX_ENUMERATOR` to declare your V8 accessible index enumerators. You get an appropriately typed `args` object like the `args` argument to a `NAN_INDEX_GETTER` call. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_INDEX_ENUMERATOR`. - - -### NAN_INDEX_DELETER(cbname) -Use `NAN_INDEX_DELETER` to declare your V8 accessible index deleters. Same as `NAN_INDEX_GETTER`. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_INDEX_DELETER`. - - -### NAN_INDEX_QUERY(cbname) -Use `NAN_INDEX_QUERY` to declare your V8 accessible index queries. Same as `NAN_INDEX_GETTER`. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_INDEX_QUERY`. - - -### NAN_WEAK_CALLBACK(type, cbname) - -Use `NAN_WEAK_CALLBACK` to declare your V8 WeakReference callbacks. There is an object argument accessible through `NAN_WEAK_CALLBACK_OBJECT`. The `type` argument gives the type of the `data` argument, accessible through `NAN_WEAK_CALLBACK_DATA(type)`. - -```c++ -static NAN_WEAK_CALLBACK(BufferReference*, WeakCheck) { - if (NAN_WEAK_CALLBACK_DATA(BufferReference*)->noLongerNeeded_) { - delete NAN_WEAK_CALLBACK_DATA(BufferReference*); - } else { - // Still in use, revive, prevent GC - NanMakeWeak(NAN_WEAK_CALLBACK_OBJECT, NAN_WEAK_CALLBACK_DATA(BufferReference*), &WeakCheck); - } -} -``` - - -### NAN_DEPRECATED(declarator) -Declares a function as deprecated. Identical to `V8_DEPRECATED`. - -```c++ -static NAN_DEPRECATED(NAN_METHOD(foo)) { - ... -} -``` - - -### NAN_INLINE(declarator) -Inlines a function. Identical to `V8_INLINE`. - -```c++ -static NAN_INLINE(int foo(int bar)) { - ... -} -``` - - -### NanNewLocal<T>(Handle<Value>) - -Use `NanNewLocal` in place of `v8::Local::New(...)` as this function -requires an `isolate` argument in recent versions of V8 but not in older versions. - -```c++ -NanNewLocal(v8::Null()) -``` - - -### NanReturnValue(Handle<Value>) - -Use `NanReturnValue` when you want to return a value from your V8 accessible method: - -```c++ -NAN_METHOD(Foo::Bar) { - ... - - NanReturnValue(String::New("FooBar!")); -} -``` - -No `return` statement required. - - -### NanReturnUndefined() - -Use `NanReturnUndefined` when you don't want to return anything from your V8 accessible method: - -```c++ -NAN_METHOD(Foo::Baz) { - ... - - NanReturnUndefined(); -} -``` - - -### NanReturnNull() - -Use `NanReturnNull` when you want to return `Null` from your V8 accessible method: - -```c++ -NAN_METHOD(Foo::Baz) { - ... - - NanReturnNull(); -} -``` - - -### NanReturnEmptyString() - -Use `NanReturnEmptyString` when you want to return an empty `String` from your V8 accessible method: - -```c++ -NAN_METHOD(Foo::Baz) { - ... - - NanReturnEmptyString(); -} -``` - - -### NanScope() - -The introduction of `isolate` references for many V8 calls in Node 0.11 makes `NanScope()` necessary, use it in place of `HandleScope scope`: - -```c++ -NAN_METHOD(Foo::Bar) { - NanScope(); - - NanReturnValue(String::New("FooBar!")); -} -``` - - -### NanLocker() - -The introduction of `isolate` references for many V8 calls in Node 0.11 makes `NanLocker()` necessary, use it in place of `Locker locker`: - -```c++ -NAN_METHOD(Foo::Bar) { - NanLocker(); - ... - NanUnlocker(); -} -``` - - -### NanUnlocker() - -The introduction of `isolate` references for many V8 calls in Node 0.11 makes `NanUnlocker()` necessary, use it in place of `Unlocker unlocker`: - -```c++ -NAN_METHOD(Foo::Bar) { - NanLocker(); - ... - NanUnlocker(); -} -``` - - -### void * NanGetInternalFieldPointer(Handle<Object>, int) - -Gets a pointer to the internal field with at `index` from a V8 `Object` handle. - -```c++ -Local obj; -... -NanGetInternalFieldPointer(obj, 0); -``` - -### void NanSetInternalFieldPointer(Handle<Object>, int, void *) - -Sets the value of the internal field at `index` on a V8 `Object` handle. - -```c++ -static Persistent dataWrapperCtor; -... -Local wrapper = NanPersistentToLocal(dataWrapperCtor)->NewInstance(); -NanSetInternalFieldPointer(wrapper, 0, this); -``` - - -### Local<Object> NanObjectWrapHandle(Object) - -When you want to fetch the V8 object handle from a native object you've wrapped with Node's `ObjectWrap`, you should use `NanObjectWrapHandle`: - -```c++ -NanObjectWrapHandle(iterator)->Get(String::NewSymbol("end")) -``` - - -### NanMakeWeak(Persistent<T>, parameter, callback) - -Make a persistent reference weak. - - -### String NanSymbol(char *) - -This isn't strictly about compatibility, it's just an easier way to create string symbol objects (i.e. `String::NewSymbol(x)`), for getting and setting object properties, or names of objects. - -```c++ -bool foo = false; -if (obj->Has(NanSymbol("foo"))) - foo = optionsObj->Get(NanSymbol("foo"))->BooleanValue() -``` - - -### Type NanGetPointerSafe(Type *[, Type]) - -A helper for getting values from optional pointers. If the pointer is `NULL`, the function returns the optional default value, which defaults to `0`. Otherwise, the function returns the value the pointer points to. - -```c++ -char *plugh(uint32_t *optional) { - char res[] = "xyzzy"; - uint32_t param = NanGetPointerSafe(optional, 0x1337); - switch (param) { - ... - } - NanSetPointerSafe(optional, 0xDEADBEEF); -} -``` - - -### bool NanSetPointerSafe(Type *, Type) - -A helper for setting optional argument pointers. If the pointer is `NULL`, the function simply return `false`. Otherwise, the value is assigned to the variable the pointer points to. - -```c++ -const char *plugh(size_t *outputsize) { - char res[] = "xyzzy"; - if !(NanSetPointerSafe(outputsize, strlen(res) + 1)) { - ... - } - - ... -} -``` - - -### char* NanFromV8String(Handle<Value>[, enum Nan::Encoding, size_t *, char *, size_t, int]) - -When you want to convert a V8 `String` to a `char*` use `NanFromV8String`. It is possible to define an encoding that defaults to `Nan::UTF8` as well as a pointer to a variable that will be assigned the number of bytes in the returned string. It is also possible to supply a buffer and its length to the function in order not to have a new buffer allocated. The final argument allows optionally setting `String::WriteOptions`, which default to `String::HINT_MANY_WRITES_EXPECTED | String::NO_NULL_TERMINATION`. -Just remember that you'll end up with an object that you'll need to `delete[]` at some point unless you supply your own buffer: - -```c++ -size_t count; -char* name = NanFromV8String(args[0]); -char* decoded = NanFromV8String(args[1], Nan::BASE64, &count, NULL, 0, String::HINT_MANY_WRITES_EXPECTED); -char param_copy[count]; -memcpy(param_copy, decoded, count); -delete[] decoded; -``` - - -### bool NanBooleanOptionValue(Handle<Value>, Handle<String>[, bool]) - -When you have an "options" object that you need to fetch properties from, boolean options can be fetched with this pair. They check first if the object exists (`IsEmpty`), then if the object has the given property (`Has`) then they get and convert/coerce the property to a `bool`. - -The optional last parameter is the *default* value, which is `false` if left off: - -```c++ -// `foo` is false unless the user supplies a truthy value for it -bool foo = NanBooleanOptionValue(optionsObj, NanSymbol("foo")); -// `bar` is true unless the user supplies a falsy value for it -bool bar = NanBooleanOptionValueDefTrue(optionsObj, NanSymbol("bar"), true); -``` - - -### uint32_t NanUInt32OptionValue(Handle<Value>, Handle<String>, uint32_t) - -Similar to `NanBooleanOptionValue`, use `NanUInt32OptionValue` to fetch an integer option from your options object. Can be any kind of JavaScript `Number` and it will be coerced to an unsigned 32-bit integer. - -Requires all 3 arguments as a default is not optional: - -```c++ -uint32_t count = NanUInt32OptionValue(optionsObj, NanSymbol("count"), 1024); -``` - - -### NanError(message), NanTypeError(message), NanRangeError(message) - -For making `Error`, `TypeError` and `RangeError` objects. - -```c++ -Local res = NanError("you must supply a callback argument"); -``` - - -### NanThrowError(message), NanThrowTypeError(message), NanThrowRangeError(message), NanThrowError(Local<Value>), NanThrowError(Local<Value>, int) - -For throwing `Error`, `TypeError` and `RangeError` objects. You should `return` this call: - -```c++ -return NanThrowError("you must supply a callback argument"); -``` - -Can also handle any custom object you may want to throw. If used with the error code argument, it will add the supplied error code to the error object as a property called `code`. - - -### Local<Object> NanNewBufferHandle(char *, uint32_t), Local<Object> NanNewBufferHandle(uint32_t) - -The `Buffer` API has changed a little in Node 0.11, this helper provides consistent access to `Buffer` creation: - -```c++ -NanNewBufferHandle((char*)value.data(), value.size()); -``` - -Can also be used to initialize a `Buffer` with just a `size` argument. - -Can also be supplied with a `NAN_WEAK_CALLBACK` and a hint for the garbage collector, when dealing with weak references. - - -### Local<Object> NanBufferUse(char*, uint32_t) - -`Buffer::New(char*, uint32_t)` prior to 0.11 would make a copy of the data. -While it was possible to get around this, it required a shim by passing a -callback. So the new API `Buffer::Use(char*, uint32_t)` was introduced to remove -needing to use this shim. - -`NanBufferUse` uses the `char*` passed as the backing data, and will free the -memory automatically when the weak callback is called. Keep this in mind, as -careless use can lead to "double free or corruption" and other cryptic failures. - - -### bool NanHasInstance(Persistent<FunctionTemplate>&, Handle<Value>) - -Can be used to check the type of an object to determine it is of a particular class you have already defined and have a `Persistent` handle for. - - -### Local<Type> NanPersistentToLocal(Persistent<Type>&) - -Aside from `FunctionCallbackInfo`, the biggest and most painful change to V8 in Node 0.11 is the many restrictions now placed on `Persistent` handles. They are difficult to assign and difficult to fetch the original value out of. - -Use `NanPersistentToLocal` to convert a `Persistent` handle back to a `Local` handle. - -```c++ -Local handle = NanPersistentToLocal(persistentHandle); -``` - - -### Local<Context> NanNewContextHandle([ExtensionConfiguration*, Handle<ObjectTemplate>, Handle<Value>]) -Creates a new `Local` handle. - -```c++ -Local ftmpl = FunctionTemplate::New(); -Local otmpl = ftmpl->InstanceTemplate(); -Local ctx = NanNewContextHandle(NULL, otmpl); -``` - - -### void NanDispose(Persistent<T> &) - -Use `NanDispose` to dispose a `Persistent` handle. - -```c++ -NanDispose(persistentHandle); -``` - - -### NanAssignPersistent(type, handle, object) - -Use `NanAssignPersistent` to assign a non-`Persistent` handle to a `Persistent` one. You can no longer just declare a `Persistent` handle and assign directly to it later, you have to `Reset` it in Node 0.11, so this makes it easier. - -In general it is now better to place anything you want to protect from V8's garbage collector as properties of a generic `Object` and then assign that to a `Persistent`. This works in older versions of Node also if you use `NanAssignPersistent`: - -```c++ -Persistent persistentHandle; - -... - -Local obj = Object::New(); -obj->Set(NanSymbol("key"), keyHandle); // where keyHandle might be a Local -NanAssignPersistent(Object, persistentHandle, obj) -``` - - -### NanInitPersistent(type, name, object) - -User `NanInitPersistent` to declare and initialize a new `Persistent` with the supplied object. The assignment operator for `Persistent` is no longer public in Node 0.11, so this macro makes it easier to declare and initializing a new `Persistent`. See NanAssignPersistent for more information. - -```c++ -Local obj = Object::New(); -obj->Set(NanSymbol("key"), keyHandle); // where keyHandle might be a Local -NanInitPersistent(Object, persistentHandle, obj); -``` - - -### NanCallback - -Because of the difficulties imposed by the changes to `Persistent` handles in V8 in Node 0.11, creating `Persistent` versions of your `Local` handles is annoyingly tricky. `NanCallback` makes it easier by taking your `Local` handle, making it persistent until the `NanCallback` is deleted and even providing a handy `Call()` method to fetch and execute the callback `Function`. - -```c++ -Local callbackHandle = args[0].As(); -NanCallback *callback = new NanCallback(callbackHandle); -// pass `callback` around and it's safe from GC until you: -delete callback; -``` - -You can execute the callback like so: - -```c++ -// no arguments: -callback->Call(0, NULL); - -// an error argument: -Local argv[] = { - Exception::Error(String::New("fail!")) -}; -callback->Call(1, argv); - -// a success argument: -Local argv[] = { - Local::New(Null()), - String::New("w00t!") -}; -callback->Call(2, argv); -``` - -`NanCallback` also has a `Local GetCallback()` method that you can use to fetch a local handle to the underlying callback function if you need it. - - -### NanAsyncWorker - -`NanAsyncWorker` is an abstract class that you can subclass to have much of the annoying async queuing and handling taken care of for you. It can even store arbitrary V8 objects for you and have them persist while the async work is in progress. - -See a rough outline of the implementation: - -```c++ -class NanAsyncWorker { -public: - NanAsyncWorker (NanCallback *callback); - - // Clean up persistent handles and delete the *callback - virtual ~NanAsyncWorker (); - - // Check the `char *errmsg` property and call HandleOKCallback() - // or HandleErrorCallback depending on whether it has been set or not - virtual void WorkComplete (); - - // You must implement this to do some async work. If there is an - // error then allocate `errmsg` to to a message and the callback will - // be passed that string in an Error object - virtual void Execute (); - - // Save a V8 object in a Persistent handle to protect it from GC - void SavePersistent(const char *key, Local &obj); - - // Fetch a stored V8 object (don't call from within `Execute()`) - Local GetFromPersistent(const char *key); - -protected: - // Set this if there is an error, otherwise it's NULL - const char *errmsg; - - // Default implementation calls the callback function with no arguments. - // Override this to return meaningful data - virtual void HandleOKCallback (); - - // Default implementation calls the callback function with an Error object - // wrapping the `errmsg` string - virtual void HandleErrorCallback (); -}; -``` - - -### NanAsyncQueueWorker(NanAsyncWorker *) - -`NanAsyncQueueWorker` will run a `NanAsyncWorker` asynchronously via libuv. Both the *execute* and *after_work* steps are taken care of for you—most of the logic for this is embedded in `NanAsyncWorker`. - -### Contributors - -NAN is only possible due to the excellent work of the following contributors: - - - - - - -
      Rod VaggGitHub/rvaggTwitter/@rvagg
      Benjamin ByholmGitHub/kkoopa
      Trevor NorrisGitHub/trevnorrisTwitter/@trevnorris
      Nathan RajlichGitHub/TooTallNateTwitter/@TooTallNate
      - -Licence & copyright ------------------------ - -Copyright (c) 2013 NAN contributors (listed above). - -Native Abstractions for Node.js is licensed under an MIT +no-false-attribs license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/nan/build/config.gypi b/node_modules/gulp-sass/node_modules/node-sass/node_modules/nan/build/config.gypi deleted file mode 100644 index e085a500..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/nan/build/config.gypi +++ /dev/null @@ -1,38 +0,0 @@ -# Do not edit. File was generated by node-gyp's "configure" step -{ - "target_defaults": { - "cflags": [], - "default_configuration": "Release", - "defines": [], - "include_dirs": [], - "libraries": [] - }, - "variables": { - "clang": 0, - "gcc_version": 47, - "host_arch": "x64", - "node_install_npm": "true", - "node_prefix": "", - "node_shared_cares": "false", - "node_shared_http_parser": "false", - "node_shared_libuv": "false", - "node_shared_openssl": "false", - "node_shared_v8": "false", - "node_shared_zlib": "false", - "node_tag": "", - "node_unsafe_optimizations": 0, - "node_use_dtrace": "false", - "node_use_etw": "false", - "node_use_openssl": "true", - "node_use_perfctr": "false", - "node_use_systemtap": "false", - "python": "/usr/bin/python", - "target_arch": "x64", - "v8_enable_gdbjit": 0, - "v8_no_strict_aliasing": 1, - "v8_use_snapshot": "true", - "nodedir": "/home/rvagg/.node-gyp/0.10.21", - "copy_dev_lib": "true", - "standalone_static_library": 1 - } -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/nan/include_dirs.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/nan/include_dirs.js deleted file mode 100644 index 4f1dfb41..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/nan/include_dirs.js +++ /dev/null @@ -1 +0,0 @@ -console.log(require('path').relative('.', __dirname)); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/nan/nan.h b/node_modules/gulp-sass/node_modules/node-sass/node_modules/nan/nan.h deleted file mode 100644 index 2f4ab153..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/nan/nan.h +++ /dev/null @@ -1,1102 +0,0 @@ -/********************************************************************************** - * NAN - Native Abstractions for Node.js - * - * Copyright (c) 2013 NAN contributors: - * - Rod Vagg - * - Benjamin Byholm - * - Trevor Norris - * - * MIT +no-false-attribs License - * - * Version 0.6.0 (current Node unstable: 0.11.9, Node stable: 0.10.22) - * - * ChangeLog: - * * 0.6.0 Nov 21 2013 - * - Introduce NanNewLocal(v8::Handle value) for use in place of - * v8::Local::New(...) since v8 started requiring isolate in Node 0.11.9 - * - * * 0.5.2 Nov 16 2013 - * - Convert SavePersistent and GetFromPersistent in NanAsyncWorker from protected and public - * - * * 0.5.1 Nov 12 2013 - * - Use node::MakeCallback() instead of direct v8::Function::Call() - * - * * 0.5.0 Nov 11 2013 - * - Added @TooTallNate as collaborator - * - New, much simpler, "include_dirs" for binding.gyp - * - Added full range of NAN_INDEX_* macros to match NAN_PROPERTY_* macros - * - * * 0.4.4 Nov 2 2013 - * - Isolate argument from v8::Persistent::MakeWeak removed for 0.11.8+ - * - * * 0.4.3 Nov 2 2013 - * - Include node_object_wrap.h, removed from node.h for Node 0.11.8. - * - * * 0.4.2 Nov 2 2013 - * - Handle deprecation of v8::Persistent::Dispose(v8::Isolate* isolate)) for - * Node 0.11.8 release. - * - * * 0.4.1 Sep 16 2013 - * - Added explicit `#include ` as it was removed from node.h for v0.11.8 - * - * * 0.4.0 Sep 2 2013 - * - Added NAN_INLINE and NAN_DEPRECATED and made use of them - * - Added NanError, NanTypeError and NanRangeError - * - Cleaned up code - * - * * 0.3.2 Aug 30 2013 - * - Fix missing scope declaration in GetFromPersistent() and SaveToPersistent - * in NanAsyncWorker - * - * * 0.3.1 Aug 20 2013 - * - fix "not all control paths return a value" compile warning on some platforms - * - * * 0.3.0 Aug 19 2013 - * - Made NAN work with NPM - * - Lots of fixes to NanFromV8String, pulling in features from new Node core - * - Changed node::encoding to Nan::Encoding in NanFromV8String to unify the API - * - Added optional error number argument for NanThrowError() - * - Added NanInitPersistent() - * - Added NanReturnNull() and NanReturnEmptyString() - * - Added NanLocker and NanUnlocker - * - Added missing scopes - * - Made sure to clear disposed Persistent handles - * - Changed NanAsyncWorker to allocate error messages on the heap - * - Changed NanThrowError(Local) to NanThrowError(Handle) - * - Fixed leak in NanAsyncWorker when errmsg is used - * - * * 0.2.2 Aug 5 2013 - * - Fixed usage of undefined variable with node::BASE64 in NanFromV8String() - * - * * 0.2.1 Aug 5 2013 - * - Fixed 0.8 breakage, node::BUFFER encoding type not available in 0.8 for - * NanFromV8String() - * - * * 0.2.0 Aug 5 2013 - * - Added NAN_PROPERTY_GETTER, NAN_PROPERTY_SETTER, NAN_PROPERTY_ENUMERATOR, - * NAN_PROPERTY_DELETER, NAN_PROPERTY_QUERY - * - Extracted _NAN_METHOD_ARGS, _NAN_GETTER_ARGS, _NAN_SETTER_ARGS, - * _NAN_PROPERTY_GETTER_ARGS, _NAN_PROPERTY_SETTER_ARGS, - * _NAN_PROPERTY_ENUMERATOR_ARGS, _NAN_PROPERTY_DELETER_ARGS, - * _NAN_PROPERTY_QUERY_ARGS - * - Added NanGetInternalFieldPointer, NanSetInternalFieldPointer - * - Added NAN_WEAK_CALLBACK, NAN_WEAK_CALLBACK_OBJECT, - * NAN_WEAK_CALLBACK_DATA, NanMakeWeak - * - Renamed THROW_ERROR to _NAN_THROW_ERROR - * - Added NanNewBufferHandle(char*, size_t, node::smalloc::FreeCallback, void*) - * - Added NanBufferUse(char*, uint32_t) - * - Added NanNewContextHandle(v8::ExtensionConfiguration*, - * v8::Handle, v8::Handle) - * - Fixed broken NanCallback#GetFunction() - * - Added optional encoding and size arguments to NanFromV8String() - * - Added NanGetPointerSafe() and NanSetPointerSafe() - * - Added initial test suite (to be expanded) - * - Allow NanUInt32OptionValue to convert any Number object - * - * * 0.1.0 Jul 21 2013 - * - Added `NAN_GETTER`, `NAN_SETTER` - * - Added `NanThrowError` with single Local argument - * - Added `NanNewBufferHandle` with single uint32_t argument - * - Added `NanHasInstance(Persistent&, Handle)` - * - Added `Local NanCallback#GetFunction()` - * - Added `NanCallback#Call(int, Local[])` - * - Deprecated `NanCallback#Run(int, Local[])` in favour of Call - * - * See https://github.com/rvagg/nan for the latest update to this file - **********************************************************************************/ - -#ifndef NAN_H -#define NAN_H - -#include -#include -#include -#include -#include -#include - -#if defined(__GNUC__) && !defined(DEBUG) -# define NAN_INLINE(declarator) inline __attribute__((always_inline)) declarator -#elif defined(_MSC_VER) && !defined(DEBUG) -# define NAN_INLINE(declarator) __forceinline declarator -#else -# define NAN_INLINE(declarator) inline declarator -#endif - -#if defined(__GNUC__) && !V8_DISABLE_DEPRECATIONS -# define NAN_DEPRECATED(declarator) declarator __attribute__ ((deprecated)) -#elif defined(_MSC_VER) && !V8_DISABLE_DEPRECATIONS -# define NAN_DEPRECATED(declarator) __declspec(deprecated) declarator -#else -# define NAN_DEPRECATED(declarator) declarator -#endif - -// some generic helpers - -template static NAN_INLINE(bool NanSetPointerSafe( - T *var - , T val -)) { - if (var) { - *var = val; - return true; - } else { - return false; - } -} - -template static NAN_INLINE(T NanGetPointerSafe( - T *var - , T fallback = reinterpret_cast(0) -)) { - if (var) { - return *var; - } else { - return fallback; - } -} - -#define NanSymbol(value) v8::String::NewSymbol(value) - -static NAN_INLINE(bool NanBooleanOptionValue( - v8::Local optionsObj - , v8::Handle opt, bool def -)) { - if (def) { - return optionsObj.IsEmpty() - || !optionsObj->Has(opt) - || optionsObj->Get(opt)->BooleanValue(); - } else { - return !optionsObj.IsEmpty() - && optionsObj->Has(opt) - && optionsObj->Get(opt)->BooleanValue(); - } -} - -static NAN_INLINE(bool NanBooleanOptionValue( - v8::Local optionsObj - , v8::Handle opt -)) { - return NanBooleanOptionValue(optionsObj, opt, false); -} - -static NAN_INLINE(uint32_t NanUInt32OptionValue( - v8::Local optionsObj - , v8::Handle opt - , uint32_t def -)) { - return !optionsObj.IsEmpty() - && optionsObj->Has(opt) - && optionsObj->Get(opt)->IsNumber() - ? optionsObj->Get(opt)->Uint32Value() - : def; -} - -#if (NODE_MODULE_VERSION > 0x000B) -// Node 0.11+ (0.11.3 and below won't compile with these) - -static v8::Isolate* nan_isolate = v8::Isolate::GetCurrent(); - -# define _NAN_METHOD_ARGS const v8::FunctionCallbackInfo& args -# define NAN_METHOD(name) void name(_NAN_METHOD_ARGS) -# define _NAN_GETTER_ARGS const v8::PropertyCallbackInfo& args -# define NAN_GETTER(name) \ - void name(v8::Local property, _NAN_GETTER_ARGS) -# define _NAN_SETTER_ARGS const v8::PropertyCallbackInfo& args -# define NAN_SETTER(name) \ - void name( \ - v8::Local property \ - , v8::Local value \ - , _NAN_SETTER_ARGS) -# define _NAN_PROPERTY_GETTER_ARGS \ - const v8::PropertyCallbackInfo& args -# define NAN_PROPERTY_GETTER(name) \ - void name(v8::Local property \ - , _NAN_PROPERTY_GETTER_ARGS) -# define _NAN_PROPERTY_SETTER_ARGS \ - const v8::PropertyCallbackInfo& args -# define NAN_PROPERTY_SETTER(name) \ - void name( \ - v8::Local property \ - , v8::Local value \ - , _NAN_PROPERTY_SETTER_ARGS) -# define _NAN_PROPERTY_ENUMERATOR_ARGS \ - const v8::PropertyCallbackInfo& args -# define NAN_PROPERTY_ENUMERATOR(name) \ - void name(_NAN_PROPERTY_ENUMERATOR_ARGS) -# define _NAN_PROPERTY_DELETER_ARGS \ - const v8::PropertyCallbackInfo& args -# define NAN_PROPERTY_DELETER(name) \ - void name( \ - v8::Local property \ - , _NAN_PROPERTY_DELETER_ARGS) -# define _NAN_PROPERTY_QUERY_ARGS \ - const v8::PropertyCallbackInfo& args -# define NAN_PROPERTY_QUERY(name) \ - void name(v8::Local property, _NAN_PROPERTY_QUERY_ARGS) - -# define _NAN_INDEX_GETTER_ARGS \ - const v8::PropertyCallbackInfo& args -# define NAN_INDEX_GETTER(name) \ - void name(uint32_t index, _NAN_INDEX_GETTER_ARGS) -# define _NAN_INDEX_SETTER_ARGS \ - const v8::PropertyCallbackInfo& args -# define NAN_INDEX_SETTER(name) \ - void name( \ - uint32_t index \ - , v8::Local value \ - , _NAN_INDEX_SETTER_ARGS) -# define _NAN_INDEX_ENUMERATOR_ARGS \ - const v8::PropertyCallbackInfo& args -# define NAN_INDEX_ENUMERATOR(name) \ - void name(_NAN_INDEX_ENUMERATOR_ARGS) -# define _NAN_INDEX_DELETER_ARGS \ - const v8::PropertyCallbackInfo& args -# define NAN_INDEX_DELETER(name) \ - void name( \ - uint32_t index \ - , _NAN_INDEX_DELETER_ARGS) -# define _NAN_INDEX_QUERY_ARGS \ - const v8::PropertyCallbackInfo& args -# define NAN_INDEX_QUERY(name) \ - void name(uint32_t index, _NAN_INDEX_QUERY_ARGS) - -# define NanGetInternalFieldPointer(object, index) \ - object->GetAlignedPointerFromInternalField(index) -# define NanSetInternalFieldPointer(object, index, value) \ - object->SetAlignedPointerInInternalField(index, value) - -# define NAN_WEAK_CALLBACK(type, name) \ - void name( \ - v8::Isolate* isolate \ - , v8::Persistent* object \ - , type data) -# define NAN_WEAK_CALLBACK_OBJECT (*object) -# define NAN_WEAK_CALLBACK_DATA(type) ((type) data) - -# define NanScope() v8::HandleScope scope(nan_isolate) -# define NanLocker() v8::Locker locker(nan_isolate) -# define NanUnlocker() v8::Unlocker unlocker(nan_isolate) -# define NanReturnValue(value) return args.GetReturnValue().Set(value) -# define NanReturnUndefined() return -# define NanReturnNull() return args.GetReturnValue().SetNull() -# define NanReturnEmptyString() return args.GetReturnValue().SetEmptyString() -# define NanAssignPersistent(type, handle, obj) handle.Reset(nan_isolate, obj) -# define NanInitPersistent(type, name, obj) \ - v8::Persistent name(nan_isolate, obj) -# define NanObjectWrapHandle(obj) obj->handle() - -//TODO: remove <0.11.8 support when 0.12 is released -#if NODE_VERSION_AT_LEAST(0, 11, 8) -# define NanMakeWeak(handle, parameter, callback) \ - handle.MakeWeak(parameter, callback) -#else -# define NanMakeWeak(handle, parameter, callback) \ - handle.MakeWeak(nan_isolate, parameter, callback) -#endif - -# define _NAN_ERROR(fun, errmsg) fun(v8::String::New(errmsg)) - -# define _NAN_THROW_ERROR(fun, errmsg) \ - do { \ - NanScope(); \ - v8::ThrowException(_NAN_ERROR(fun, errmsg)); \ - } while (0); - - template static NAN_INLINE(v8::Local NanNewLocal( - v8::Handle val - )) { -//TODO: remove <0.11.9 support when 0.12 is released -#if NODE_VERSION_AT_LEAST(0, 11, 9) - return v8::Local::New(nan_isolate, val); -#else - return v8::Local::New(val); -#endif - } - - static NAN_INLINE(v8::Handle NanError(const char* errmsg)) { - return _NAN_ERROR(v8::Exception::Error, errmsg); - } - - static NAN_INLINE(void NanThrowError(const char* errmsg)) { - _NAN_THROW_ERROR(v8::Exception::Error, errmsg); - } - - static NAN_INLINE(void NanThrowError(v8::Handle error)) { - NanScope(); - v8::ThrowException(error); - } - - static NAN_INLINE(v8::Handle NanError( - const char *msg - , const int errorNumber - )) { - v8::Local err = v8::Exception::Error(v8::String::New(msg)); - v8::Local obj = err.As(); - obj->Set(v8::String::New("code"), v8::Int32::New(errorNumber)); - return err; - } - - static NAN_INLINE(void NanThrowError( - const char *msg - , const int errorNumber - )) { - NanThrowError(NanError(msg, errorNumber)); - } - - static NAN_INLINE(v8::Handle NanTypeError(const char* errmsg)) { - return _NAN_ERROR(v8::Exception::TypeError, errmsg); - } - - static NAN_INLINE(void NanThrowTypeError(const char* errmsg)) { - _NAN_THROW_ERROR(v8::Exception::TypeError, errmsg); - } - - static NAN_INLINE(v8::Handle NanRangeError(const char* errmsg)) { - return _NAN_ERROR(v8::Exception::RangeError, errmsg); - } - - static NAN_INLINE(void NanThrowRangeError(const char* errmsg)) { - _NAN_THROW_ERROR(v8::Exception::RangeError, errmsg); - } - - template static NAN_INLINE(void NanDispose( - v8::Persistent &handle - )) { - -//TODO: remove <0.11.8 support when 0.12 is released -#if NODE_VERSION_AT_LEAST(0, 11, 8) - handle.Reset(); -#else - handle.Dispose(nan_isolate); -#endif - handle.Clear(); - } - - static NAN_INLINE(v8::Local NanNewBufferHandle ( - char *data - , size_t length - , node::smalloc::FreeCallback callback - , void *hint - )) { - return node::Buffer::New(data, length, callback, hint); - } - - static NAN_INLINE(v8::Local NanNewBufferHandle ( - char *data - , uint32_t size - )) { - return node::Buffer::New(data, size); - } - - static NAN_INLINE(v8::Local NanNewBufferHandle (uint32_t size)) { - return node::Buffer::New(size); - } - - static NAN_INLINE(v8::Local NanBufferUse( - char* data - , uint32_t size - )) { - return node::Buffer::Use(data, size); - } - - template - static NAN_INLINE(v8::Local NanPersistentToLocal( - const v8::Persistent& persistent - )) { - if (persistent.IsWeak()) { - return v8::Local::New(nan_isolate, persistent); - } else { - return *reinterpret_cast*>( - const_cast*>(&persistent)); - } - } - - static NAN_INLINE(bool NanHasInstance( - v8::Persistent& function_template - , v8::Handle value - )) { - return NanPersistentToLocal(function_template)->HasInstance(value); - } - - static NAN_INLINE(v8::Local NanNewContextHandle( - v8::ExtensionConfiguration* extensions = NULL - , v8::Handle tmpl = v8::Handle() - , v8::Handle obj = v8::Handle() - )) { - return v8::Local::New( - nan_isolate - , v8::Context::New(nan_isolate, extensions, tmpl, obj) - ); - } - -#else -// Node 0.8 and 0.10 - -# define _NAN_METHOD_ARGS const v8::Arguments& args -# define NAN_METHOD(name) v8::Handle name(_NAN_METHOD_ARGS) -# define _NAN_GETTER_ARGS const v8::AccessorInfo &args -# define NAN_GETTER(name) \ - v8::Handle name(v8::Local property, _NAN_GETTER_ARGS) -# define _NAN_SETTER_ARGS const v8::AccessorInfo &args -# define NAN_SETTER(name) \ - void name( \ - v8::Local property \ - , v8::Local value \ - , _NAN_SETTER_ARGS) -# define _NAN_PROPERTY_GETTER_ARGS const v8::AccessorInfo& args -# define NAN_PROPERTY_GETTER(name) \ - v8::Handle name( \ - v8::Local property \ - , _NAN_PROPERTY_GETTER_ARGS) -# define _NAN_PROPERTY_SETTER_ARGS const v8::AccessorInfo& args -# define NAN_PROPERTY_SETTER(name) \ - v8::Handle name( \ - v8::Local property \ - , v8::Local value \ - , _NAN_PROPERTY_SETTER_ARGS) -# define _NAN_PROPERTY_ENUMERATOR_ARGS const v8::AccessorInfo& args -# define NAN_PROPERTY_ENUMERATOR(name) \ - v8::Handle name(_NAN_PROPERTY_ENUMERATOR_ARGS) -# define _NAN_PROPERTY_DELETER_ARGS const v8::AccessorInfo& args -# define NAN_PROPERTY_DELETER(name) \ - v8::Handle name( \ - v8::Local property \ - , _NAN_PROPERTY_DELETER_ARGS) -# define _NAN_PROPERTY_QUERY_ARGS const v8::AccessorInfo& args -# define NAN_PROPERTY_QUERY(name) \ - v8::Handle name( \ - v8::Local property \ - , _NAN_PROPERTY_QUERY_ARGS) - -# define _NAN_INDEX_GETTER_ARGS const v8::AccessorInfo& args -# define NAN_INDEX_GETTER(name) \ - v8::Handle name( \ - uint32_t index \ - , _NAN_INDEX_GETTER_ARGS) -# define _NAN_INDEX_SETTER_ARGS const v8::AccessorInfo& args -# define NAN_INDEX_SETTER(name) \ - v8::Handle name( \ - uint32_t index \ - , v8::Local value \ - , _NAN_INDEX_SETTER_ARGS) -# define _NAN_INDEX_ENUMERATOR_ARGS const v8::AccessorInfo& args -# define NAN_INDEX_ENUMERATOR(name) \ - v8::Handle name(_NAN_INDEX_ENUMERATOR_ARGS) -# define _NAN_INDEX_DELETER_ARGS const v8::AccessorInfo& args -# define NAN_INDEX_DELETER(name) \ - v8::Handle name( \ - uint32_t index \ - , _NAN_INDEX_DELETER_ARGS) -# define _NAN_INDEX_QUERY_ARGS const v8::AccessorInfo& args -# define NAN_INDEX_QUERY(name) \ - v8::Handle name( \ - uint32_t index \ - , _NAN_INDEX_QUERY_ARGS) - -# define NanGetInternalFieldPointer(object, index) \ - object->GetPointerFromInternalField(index) -# define NanSetInternalFieldPointer(object, index, value) \ - object->SetPointerInInternalField(index, value) -# define NAN_WEAK_CALLBACK(type, name) \ - void name( \ - v8::Persistent object \ - , void *data) -# define NAN_WEAK_CALLBACK_OBJECT object -# define NAN_WEAK_CALLBACK_DATA(type) ((type) data) - -# define NanScope() v8::HandleScope scope -# define NanLocker() v8::Locker locker -# define NanUnlocker() v8::Unlocker unlocker -# define NanReturnValue(value) return scope.Close(value) -# define NanReturnUndefined() return v8::Undefined() -# define NanReturnNull() return v8::Null() -# define NanReturnEmptyString() return v8::String::Empty() -# define NanInitPersistent(type, name, obj) \ - v8::Persistent name = v8::Persistent::New(obj) -# define NanAssignPersistent(type, handle, obj) \ - handle = v8::Persistent::New(obj) -# define NanObjectWrapHandle(obj) obj->handle_ -# define NanMakeWeak(handle, parameters, callback) \ - handle.MakeWeak(parameters, callback) - -# define _NAN_ERROR(fun, errmsg) \ - fun(v8::String::New(errmsg)) - -# define _NAN_THROW_ERROR(fun, errmsg) \ - do { \ - NanScope(); \ - return v8::ThrowException(_NAN_ERROR(fun, errmsg)); \ - } while (0); - - template static NAN_INLINE(v8::Local NanNewLocal( - v8::Handle val - )) { - return v8::Local::New(val); - } - - static NAN_INLINE(v8::Handle NanError(const char* errmsg)) { - return _NAN_ERROR(v8::Exception::Error, errmsg); - } - - static NAN_INLINE(v8::Handle NanThrowError(const char* errmsg)) { - _NAN_THROW_ERROR(v8::Exception::Error, errmsg); - } - - static NAN_INLINE(v8::Handle NanThrowError( - v8::Handle error - )) { - NanScope(); - return v8::ThrowException(error); - } - - static NAN_INLINE(v8::Handle NanError( - const char *msg - , const int errorNumber - )) { - v8::Local err = v8::Exception::Error(v8::String::New(msg)); - v8::Local obj = err.As(); - obj->Set(v8::String::New("code"), v8::Int32::New(errorNumber)); - return err; - } - - static NAN_INLINE(v8::Handle NanThrowError( - const char *msg - , const int errorNumber - )) { - return NanThrowError(NanError(msg, errorNumber)); - } - - static NAN_INLINE(v8::Handle NanTypeError(const char* errmsg)) { - return _NAN_ERROR(v8::Exception::TypeError, errmsg); - } - - static NAN_INLINE(v8::Handle NanThrowTypeError( - const char* errmsg - )) { - _NAN_THROW_ERROR(v8::Exception::TypeError, errmsg); - } - - static NAN_INLINE(v8::Handle NanRangeError( - const char* errmsg - )) { - return _NAN_ERROR(v8::Exception::RangeError, errmsg); - } - - static NAN_INLINE(v8::Handle NanThrowRangeError( - const char* errmsg - )) { - _NAN_THROW_ERROR(v8::Exception::RangeError, errmsg); - } - - template static NAN_INLINE(void NanDispose( - v8::Persistent &handle - )) { - handle.Dispose(); - handle.Clear(); - } - - static NAN_INLINE(v8::Local NanNewBufferHandle ( - char *data - , size_t length - , node::Buffer::free_callback callback - , void *hint - )) { - return NanNewLocal( - node::Buffer::New(data, length, callback, hint)->handle_); - } - - static NAN_INLINE(v8::Local NanNewBufferHandle ( - char *data - , uint32_t size - )) { - return NanNewLocal(node::Buffer::New(data, size)->handle_); - } - - static NAN_INLINE(v8::Local NanNewBufferHandle (uint32_t size)) { - return NanNewLocal(node::Buffer::New(size)->handle_); - } - - static NAN_INLINE(void FreeData(char *data, void *hint)) { - delete[] data; - } - - static NAN_INLINE(v8::Local NanBufferUse( - char* data - , uint32_t size - )) { - return NanNewLocal( - node::Buffer::New(data, size, FreeData, NULL)->handle_); - } - - template - static NAN_INLINE(v8::Local NanPersistentToLocal( - const v8::Persistent& persistent - )) { - if (persistent.IsWeak()) { - return NanNewLocal(persistent); - } else { - return *reinterpret_cast*>( - const_cast*>(&persistent)); - } - } - - static NAN_INLINE(bool NanHasInstance( - v8::Persistent& function_template - , v8::Handle value - )) { - return function_template->HasInstance(value); - } - - static NAN_INLINE(v8::Local NanNewContextHandle( - v8::ExtensionConfiguration* extensions = NULL - , v8::Handle tmpl = v8::Handle() - , v8::Handle obj = v8::Handle() - )) { - v8::Persistent ctx = v8::Context::New(extensions, tmpl, obj); - v8::Local lctx = NanNewLocal(ctx); - ctx.Dispose(); - return lctx; - } - -#endif // node version - -class NanCallback { - public: - NanCallback(const v8::Local &fn) { - NanScope(); - v8::Local obj = v8::Object::New(); - obj->Set(NanSymbol("callback"), fn); - NanAssignPersistent(v8::Object, handle, obj); - } - - ~NanCallback() { - if (handle.IsEmpty()) return; - handle.Dispose(); - handle.Clear(); - } - - NAN_INLINE(v8::Local GetFunction ()) { - return NanPersistentToLocal(handle)->Get(NanSymbol("callback")) - .As(); - } - - // deprecated - NAN_DEPRECATED(void Run(int argc, v8::Local argv[])) { - Call(argc, argv); - } - - void Call(int argc, v8::Local argv[]) { - NanScope(); - - v8::Local callback = NanPersistentToLocal(handle)-> - Get(NanSymbol("callback")).As(); - node::MakeCallback( - v8::Context::GetCurrent()->Global() - , callback - , argc - , argv - ); - } - - private: - v8::Persistent handle; -}; - -/* abstract */ class NanAsyncWorker { -public: - NanAsyncWorker (NanCallback *callback) : callback(callback) { - request.data = this; - errmsg = NULL; - } - - virtual ~NanAsyncWorker () { - NanScope(); - - if (!persistentHandle.IsEmpty()) - NanDispose(persistentHandle); - if (callback) - delete callback; - if (errmsg) - delete errmsg; - } - - virtual void WorkComplete () { - NanScope(); - - if (errmsg == NULL) - HandleOKCallback(); - else - HandleErrorCallback(); - delete callback; - callback = NULL; - } - - void SavePersistent(const char *key, v8::Local &obj) { - NanScope(); - - v8::Local handle = NanPersistentToLocal(persistentHandle); - handle->Set(NanSymbol(key), obj); - } - - v8::Local GetFromPersistent(const char *key) { - NanScope(); - - v8::Local handle = NanPersistentToLocal(persistentHandle); - return handle->Get(NanSymbol(key)).As(); - } - - virtual void Execute () =0; - - uv_work_t request; - -protected: - v8::Persistent persistentHandle; - NanCallback *callback; - const char *errmsg; - - virtual void HandleOKCallback () { - NanScope(); - - callback->Call(0, NULL); - }; - - virtual void HandleErrorCallback () { - NanScope(); - - v8::Local argv[] = { - v8::Exception::Error(v8::String::New(errmsg)) - }; - callback->Call(1, argv); - } -}; - -NAN_INLINE(void NanAsyncExecute (uv_work_t* req)) { - NanAsyncWorker *worker = static_cast(req->data); - worker->Execute(); -} - -NAN_INLINE(void NanAsyncExecuteComplete (uv_work_t* req)) { - NanAsyncWorker* worker = static_cast(req->data); - worker->WorkComplete(); - delete worker; -} - -NAN_INLINE(void NanAsyncQueueWorker (NanAsyncWorker* worker)) { - uv_queue_work( - uv_default_loop() - , &worker->request - , NanAsyncExecute - , (uv_after_work_cb)NanAsyncExecuteComplete - ); -} - -//// Base 64 //// - -#define _nan_base64_encoded_size(size) ((size + 2 - ((size + 2) % 3)) / 3 * 4) - -// Doesn't check for padding at the end. Can be 1-2 bytes over. -static NAN_INLINE(size_t _nan_base64_decoded_size_fast(size_t size)) { - size_t remainder = size % 4; - - size = (size / 4) * 3; - if (remainder) { - if (size == 0 && remainder == 1) { - // special case: 1-byte input cannot be decoded - size = 0; - } else { - // non-padded input, add 1 or 2 extra bytes - size += 1 + (remainder == 3); - } - } - - return size; -} - -template -static NAN_INLINE(size_t _nan_base64_decoded_size( - const TypeName* src - , size_t size -)) { - if (size == 0) - return 0; - - if (src[size - 1] == '=') - size--; - if (size > 0 && src[size - 1] == '=') - size--; - - return _nan_base64_decoded_size_fast(size); -} - -// supports regular and URL-safe base64 -static const int _nan_unbase64_table[] = { - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -1, -1, -2, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - , -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, 62, -1, 63 - , 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1 - , -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 - , 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, 63 - , -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 - , 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 -}; - -#define _nan_unbase64(x) _nan_unbase64_table[(uint8_t)(x)] - -template static size_t _nan_base64_decode( - char* buf - , size_t len - , const TypeName* src - , const size_t srcLen -) { - char* dst = buf; - char* dstEnd = buf + len; - const TypeName* srcEnd = src + srcLen; - - while (src < srcEnd && dst < dstEnd) { - int remaining = srcEnd - src; - char a, b, c, d; - - while (_nan_unbase64(*src) < 0 && src < srcEnd) src++, remaining--; - if (remaining == 0 || *src == '=') break; - a = _nan_unbase64(*src++); - - while (_nan_unbase64(*src) < 0 && src < srcEnd) src++, remaining--; - if (remaining <= 1 || *src == '=') break; - b = _nan_unbase64(*src++); - - *dst++ = (a << 2) | ((b & 0x30) >> 4); - if (dst == dstEnd) break; - - while (_nan_unbase64(*src) < 0 && src < srcEnd) src++, remaining--; - if (remaining <= 2 || *src == '=') break; - c = _nan_unbase64(*src++); - - *dst++ = ((b & 0x0F) << 4) | ((c & 0x3C) >> 2); - if (dst == dstEnd) break; - - while (_nan_unbase64(*src) < 0 && src < srcEnd) src++, remaining--; - if (remaining <= 3 || *src == '=') break; - d = _nan_unbase64(*src++); - - *dst++ = ((c & 0x03) << 6) | (d & 0x3F); - } - - return dst - buf; -} - -//// HEX //// - -template unsigned _nan_hex2bin(TypeName c) { - if (c >= '0' && c <= '9') return c - '0'; - if (c >= 'A' && c <= 'F') return 10 + (c - 'A'); - if (c >= 'a' && c <= 'f') return 10 + (c - 'a'); - return static_cast(-1); -} - -template static size_t _nan_hex_decode( - char* buf - , size_t len - , const TypeName* src - , const size_t srcLen -) { - size_t i; - for (i = 0; i < len && i * 2 + 1 < srcLen; ++i) { - unsigned a = _nan_hex2bin(src[i * 2 + 0]); - unsigned b = _nan_hex2bin(src[i * 2 + 1]); - if (!~a || !~b) return i; - buf[i] = a * 16 + b; - } - - return i; -} - -static bool _NanGetExternalParts( - v8::Handle val - , const char** data - , size_t* len -) { - if (node::Buffer::HasInstance(val)) { - *data = node::Buffer::Data(val.As()); - *len = node::Buffer::Length(val.As()); - return true; - } - - assert(val->IsString()); - v8::Local str = NanNewLocal(val.As()); - - if (str->IsExternalAscii()) { - const v8::String::ExternalAsciiStringResource* ext; - ext = str->GetExternalAsciiStringResource(); - *data = ext->data(); - *len = ext->length(); - return true; - - } else if (str->IsExternal()) { - const v8::String::ExternalStringResource* ext; - ext = str->GetExternalStringResource(); - *data = reinterpret_cast(ext->data()); - *len = ext->length(); - return true; - } - - return false; -} - -namespace Nan { - enum Encoding {ASCII, UTF8, BASE64, UCS2, BINARY, HEX, BUFFER}; -} - -static NAN_INLINE(char* NanFromV8String( - v8::Handle from - , enum Nan::Encoding encoding = Nan::UTF8 - , size_t *datalen = NULL - , char *buf = NULL - , size_t buflen = 0 - , int flags = - v8::String::NO_NULL_TERMINATION | v8::String::HINT_MANY_WRITES_EXPECTED -)) { - NanScope(); - - size_t sz_; - size_t term_len = !(flags & v8::String::NO_NULL_TERMINATION); - char *data = NULL; - size_t len; - bool is_extern = _NanGetExternalParts( - from - , const_cast(&data) - , &len); - - if (is_extern && !term_len) { - NanSetPointerSafe(datalen, len); - return data; - } - - v8::Local toStr = from->ToString(); - - char *to = buf; - - v8::String::AsciiValue value(toStr); - switch(encoding) { - case Nan::ASCII: -#if NODE_MODULE_VERSION < 0x0C - sz_ = toStr->Length(); - if (to == NULL) { - to = new char[sz_ + term_len]; - } else { - assert(buflen >= sz_ + term_len && "too small buffer"); - } - NanSetPointerSafe( - datalen - , toStr->WriteAscii(to, 0, sz_ + term_len, flags)); - return to; -#endif - case Nan::BINARY: - case Nan::BUFFER: - sz_ = toStr->Length(); - if (to == NULL) { - to = new char[sz_ + term_len]; - } else { - assert(buflen >= sz_ + term_len && "too small buffer"); - } -#if NODE_MODULE_VERSION < 0x0C - // TODO(isaacs): THIS IS AWFUL!!! - // AGREE(kkoopa) - { - uint16_t* twobytebuf = new uint16_t[sz_ + term_len]; - - size_t len = toStr->Write(twobytebuf, 0, sz_ + term_len, flags); - - for (size_t i = 0; i < sz_ + term_len && i < len + term_len; i++) { - unsigned char *b = reinterpret_cast(&twobytebuf[i]); - to[i] = *b; - } - - NanSetPointerSafe(datalen, len); - - delete[] twobytebuf; - return to; - } -#else - NanSetPointerSafe( - datalen, - toStr->WriteOneByte( - reinterpret_cast(to) - , 0 - , sz_ + term_len - , flags)); - return to; -#endif - case Nan::UTF8: - sz_ = toStr->Utf8Length(); - if (to == NULL) { - to = new char[sz_ + term_len]; - } else { - assert(buflen >= sz_ + term_len && "too small buffer"); - } - NanSetPointerSafe( - datalen - , toStr->WriteUtf8(to, sz_ + term_len, NULL, flags) - term_len); - return to; - case Nan::BASE64: - sz_ = _nan_base64_decoded_size(*value, toStr->Length()); - if (to == NULL) { - to = new char[sz_ + term_len]; - } else { - assert(buflen >= sz_ + term_len); - } - NanSetPointerSafe( - datalen - , _nan_base64_decode(to, sz_, *value, value.length())); - if (term_len) { - to[sz_] = '\0'; - } - return to; - case Nan::UCS2: - { - sz_ = toStr->Length(); - if (to == NULL) { - to = new char[(sz_ + term_len) * 2]; - } else { - assert(buflen >= (sz_ + term_len) * 2 && "too small buffer"); - } - - int bc = 2 * toStr->Write( - reinterpret_cast(to) - , 0 - , sz_ + term_len - , flags); - NanSetPointerSafe(datalen, bc); - return to; - } - case Nan::HEX: - sz_ = toStr->Length(); - assert(!(sz_ & 1) && "bad hex data"); - if (to == NULL) { - to = new char[sz_ / 2 + term_len]; - } else { - assert(buflen >= sz_ / 2 + term_len && "too small buffer"); - } - - NanSetPointerSafe( - datalen - , _nan_hex_decode(to, sz_ / 2, *value, value.length())); - if (term_len) { - to[sz_ / 2] = '\0'; - } - return to; - default: - assert(0 && "unknown encoding"); - } - return to; -} - -#endif diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/nan/package.json b/node_modules/gulp-sass/node_modules/node-sass/node_modules/nan/package.json deleted file mode 100644 index 0fcadc05..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/nan/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "nan", - "version": "0.6.0", - "description": "Native Abstractions for Node.js: C++ header for Node 0.8->0.12 compatibility", - "main": "include_dirs.js", - "repository": { - "type": "git", - "url": "git://github.com/rvagg/nan.git" - }, - "contributors": [ - { - "name": "Rod Vagg", - "email": "r@va.gg", - "url": "https://github.com/rvagg" - }, - { - "name": "Benjamin Byholm", - "email": "bbyholm@abo.fi", - "url": "https://github.com/kkoopa/" - }, - { - "name": "Trevor Norris", - "email": "trev.norris@gmail.com", - "url": "https://github.com/trevnorris" - }, - { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "https://github.com/TooTallNate" - } - ], - "license": "MIT", - "readme": "Native Abstractions for Node.js\n===============================\n\n**A header file filled with macro and utility goodness for making add-on development for Node.js easier across versions 0.8, 0.10 and 0.11, and eventually 0.12.**\n\n***Current version: 0.6.0*** *(See [nan.h](https://github.com/rvagg/nan/blob/master/nan.h) for complete ChangeLog)*\n\n[![NPM](https://nodei.co/npm/nan.png?downloads=true)](https://nodei.co/npm/nan/) [![NPM](https://nodei.co/npm-dl/nan.png?months=6)](https://nodei.co/npm/nan/)\n\nThanks to the crazy changes in V8 (and some in Node core), keeping native addons compiling happily across versions, particularly 0.10 to 0.11/0.12, is a minor nightmare. The goal of this project is to store all logic necessary to develop native Node.js addons without having to inspect `NODE_MODULE_VERSION` and get yourself into a macro-tangle.\n\nThis project also contains some helper utilities that make addon development a bit more pleasant.\n\n * **[News & Updates](#news)**\n * **[Usage](#usage)**\n * **[Example](#example)**\n * **[API](#api)**\n\n\n## News & Updates\n\n### Nov-2013: Node 0.11.9+ breaking V8 change\n\nThe version of V8 that's shipping with Node 0.11.9+ has changed the signature for new `Local`s to: `v8::Local::New(isolate, value)`, i.e. introducing the `isolate` argument and therefore breaking all new `Local` declarations for previous versions. NAN 0.6+ now includes a `NanNewLocal(value)` that can be used in place to work around this incompatibility and maintain compatibility with 0.8->0.11.9+ (minus a few early 0.11 releases).\n\nFor example, if you wanted to return a `null` on a callback you will have to change the argument from `v8::Local::New(v8::Null())` to `NanNewLocal(v8::Null())`.\n\n### Nov-2013: Change to binding.gyp `\"include_dirs\"` for NAN\n\nInclusion of NAN in a project's binding.gyp is now greatly simplified. You can now just use `\"\n## Usage\n\nSimply add **NAN** as a dependency in the *package.json* of your Node addon:\n\n``` bash\n$ npm install --save nan\n```\n\nPull in the path to **NAN** in your *binding.gyp* so that you can use `#include \"nan.h\"` in your *.cpp* files:\n\n``` python\n\"include_dirs\" : [\n \"` when compiling your addon.\n\n\n## Example\n\nSee **[LevelDOWN](https://github.com/rvagg/node-leveldown/pull/48)** for a full example of **NAN** in use.\n\nFor a simpler example, see the **[async pi estimation example](https://github.com/rvagg/nan/tree/master/examples/async_pi_estimate)** in the examples directory for full code and an explanation of what this Monte Carlo Pi estimation example does. Below are just some parts of the full example that illustrate the use of **NAN**.\n\nCompare to the current 0.10 version of this example, found in the [node-addon-examples](https://github.com/rvagg/node-addon-examples/tree/master/9_async_work) repository and also a 0.11 version of the same found [here](https://github.com/kkoopa/node-addon-examples/tree/5c01f58fc993377a567812597e54a83af69686d7/9_async_work).\n\nNote that there is no embedded version sniffing going on here and also the async work is made much simpler, see below for details on the `NanAsyncWorker` class.\n\n```c++\n// addon.cc\n#include \n#include \"nan.h\"\n// ...\n\nusing namespace v8;\n\nvoid InitAll(Handle exports) {\n exports->Set(NanSymbol(\"calculateSync\"),\n FunctionTemplate::New(CalculateSync)->GetFunction());\n\n exports->Set(NanSymbol(\"calculateAsync\"),\n FunctionTemplate::New(CalculateAsync)->GetFunction());\n}\n\nNODE_MODULE(addon, InitAll)\n```\n\n```c++\n// sync.h\n#include \n#include \"nan.h\"\n\nNAN_METHOD(CalculateSync);\n```\n\n```c++\n// sync.cc\n#include \n#include \"nan.h\"\n#include \"sync.h\"\n// ...\n\nusing namespace v8;\n\n// Simple synchronous access to the `Estimate()` function\nNAN_METHOD(CalculateSync) {\n NanScope();\n\n // expect a number as the first argument\n int points = args[0]->Uint32Value();\n double est = Estimate(points);\n\n NanReturnValue(Number::New(est));\n}\n```\n\n```c++\n// async.cc\n#include \n#include \"nan.h\"\n#include \"async.h\"\n\n// ...\n\nusing namespace v8;\n\nclass PiWorker : public NanAsyncWorker {\n public:\n PiWorker(NanCallback *callback, int points)\n : NanAsyncWorker(callback), points(points) {}\n ~PiWorker() {}\n\n // Executed inside the worker-thread.\n // It is not safe to access V8, or V8 data structures\n // here, so everything we need for input and output\n // should go on `this`.\n void Execute () {\n estimate = Estimate(points);\n }\n\n // Executed when the async work is complete\n // this function will be run inside the main event loop\n // so it is safe to use V8 again\n void HandleOKCallback () {\n NanScope();\n\n Local argv[] = {\n Local::New(Null())\n , Number::New(estimate)\n };\n\n callback->Call(2, argv);\n };\n\n private:\n int points;\n double estimate;\n};\n\n// Asynchronous access to the `Estimate()` function\nNAN_METHOD(CalculateAsync) {\n NanScope();\n\n int points = args[0]->Uint32Value();\n NanCallback *callback = new NanCallback(args[1].As());\n\n NanAsyncQueueWorker(new PiWorker(callback, points));\n NanReturnUndefined();\n}\n```\n\n\n## API\n\n * NAN_METHOD\n * NAN_GETTER\n * NAN_SETTER\n * NAN_PROPERTY_GETTER\n * NAN_PROPERTY_SETTER\n * NAN_PROPERTY_ENUMERATOR\n * NAN_PROPERTY_DELETER\n * NAN_PROPERTY_QUERY\n * NAN_INDEX_GETTER\n * NAN_INDEX_SETTER\n * NAN_INDEX_ENUMERATOR\n * NAN_INDEX_DELETER\n * NAN_INDEX_QUERY\n * NAN_WEAK_CALLBACK\n * NAN_DEPRECATED\n * NAN_INLINE \n * NanNewLocal\n * NanReturnValue\n * NanReturnUndefined\n * NanReturnNull\n * NanReturnEmptyString\n * NanScope\n * NanLocker\n * NanUnlocker\n * NanGetInternalFieldPointer\n * NanSetInternalFieldPointer\n * NanObjectWrapHandle\n * NanMakeWeak\n * NanSymbol\n * NanGetPointerSafe\n * NanSetPointerSafe\n * NanFromV8String\n * NanBooleanOptionValue\n * NanUInt32OptionValue\n * NanError, NanTypeError, NanRangeError\n * NanThrowError, NanThrowTypeError, NanThrowRangeError, NanThrowError(Handle), NanThrowError(Handle, int)\n * NanNewBufferHandle(char *, size_t, FreeCallback, void *), NanNewBufferHandle(char *, uint32_t), NanNewBufferHandle(uint32_t)\n * NanBufferUse(char *, uint32_t)\n * NanNewContextHandle\n * NanHasInstance\n * NanPersistentToLocal\n * NanDispose\n * NanAssignPersistent\n * NanInitPersistent\n * NanCallback\n * NanAsyncWorker\n * NanAsyncQueueWorker\n\n\n### NAN_METHOD(methodname)\n\nUse `NAN_METHOD` to define your V8 accessible methods:\n\n```c++\n// .h:\nclass Foo : public node::ObjectWrap {\n ...\n\n static NAN_METHOD(Bar);\n static NAN_METHOD(Baz);\n}\n\n\n// .cc:\nNAN_METHOD(Foo::Bar) {\n ...\n}\n\nNAN_METHOD(Foo::Baz) {\n ...\n}\n```\n\nThe reason for this macro is because of the method signature change in 0.11:\n\n```c++\n// 0.10 and below:\nHandle name(const Arguments& args)\n\n// 0.11 and above\nvoid name(const FunctionCallbackInfo& args)\n```\n\nThe introduction of `FunctionCallbackInfo` brings additional complications:\n\n\n### NAN_GETTER(methodname)\n\nUse `NAN_GETTER` to declare your V8 accessible getters. You get a `Local` `property` and an appropriately typed `args` object that can act like the `args` argument to a `NAN_METHOD` call.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_GETTER`.\n\n\n### NAN_SETTER(methodname)\n\nUse `NAN_SETTER` to declare your V8 accessible setters. Same as `NAN_GETTER` but you also get a `Local` `value` object to work with.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_SETTER`.\n\n\n### NAN_PROPERTY_GETTER(cbname)\nUse `NAN_PROPERTY_GETTER` to declare your V8 accessible property getters. You get a `Local` `property` and an appropriately typed `args` object that can act similar to the `args` argument to a `NAN_METHOD` call.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_GETTER`.\n\n\n### NAN_PROPERTY_SETTER(cbname)\nUse `NAN_PROPERTY_SETTER` to declare your V8 accessible property setters. Same as `NAN_PROPERTY_GETTER` but you also get a `Local` `value` object to work with.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_SETTER`.\n\n\n### NAN_PROPERTY_ENUMERATOR(cbname)\nUse `NAN_PROPERTY_ENUMERATOR` to declare your V8 accessible property enumerators. You get an appropriately typed `args` object like the `args` argument to a `NAN_PROPERTY_GETTER` call.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_ENUMERATOR`.\n\n\n### NAN_PROPERTY_DELETER(cbname)\nUse `NAN_PROPERTY_DELETER` to declare your V8 accessible property deleters. Same as `NAN_PROPERTY_GETTER`.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_DELETER`.\n\n\n### NAN_PROPERTY_QUERY(cbname)\nUse `NAN_PROPERTY_QUERY` to declare your V8 accessible property queries. Same as `NAN_PROPERTY_GETTER`.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_QUERY`.\n\n\n### NAN_INDEX_GETTER(cbname)\nUse `NAN_INDEX_GETTER` to declare your V8 accessible index getters. You get a `uint32_t` `index` and an appropriately typed `args` object that can act similar to the `args` argument to a `NAN_METHOD` call.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_INDEX_GETTER`.\n\n\n### NAN_INDEX_SETTER(cbname)\nUse `NAN_INDEX_SETTER` to declare your V8 accessible index setters. Same as `NAN_INDEX_GETTER` but you also get a `Local` `value` object to work with.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_INDEX_SETTER`.\n\n\n### NAN_INDEX_ENUMERATOR(cbname)\nUse `NAN_INDEX_ENUMERATOR` to declare your V8 accessible index enumerators. You get an appropriately typed `args` object like the `args` argument to a `NAN_INDEX_GETTER` call.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_INDEX_ENUMERATOR`.\n\n\n### NAN_INDEX_DELETER(cbname)\nUse `NAN_INDEX_DELETER` to declare your V8 accessible index deleters. Same as `NAN_INDEX_GETTER`.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_INDEX_DELETER`.\n\n\n### NAN_INDEX_QUERY(cbname)\nUse `NAN_INDEX_QUERY` to declare your V8 accessible index queries. Same as `NAN_INDEX_GETTER`.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_INDEX_QUERY`.\n\n\n### NAN_WEAK_CALLBACK(type, cbname)\n\nUse `NAN_WEAK_CALLBACK` to declare your V8 WeakReference callbacks. There is an object argument accessible through `NAN_WEAK_CALLBACK_OBJECT`. The `type` argument gives the type of the `data` argument, accessible through `NAN_WEAK_CALLBACK_DATA(type)`.\n\n```c++\nstatic NAN_WEAK_CALLBACK(BufferReference*, WeakCheck) {\n if (NAN_WEAK_CALLBACK_DATA(BufferReference*)->noLongerNeeded_) {\n delete NAN_WEAK_CALLBACK_DATA(BufferReference*);\n } else {\n // Still in use, revive, prevent GC\n NanMakeWeak(NAN_WEAK_CALLBACK_OBJECT, NAN_WEAK_CALLBACK_DATA(BufferReference*), &WeakCheck);\n }\n}\n```\n\n\n### NAN_DEPRECATED(declarator)\nDeclares a function as deprecated. Identical to `V8_DEPRECATED`.\n\n```c++\nstatic NAN_DEPRECATED(NAN_METHOD(foo)) {\n ...\n}\n```\n\n\n### NAN_INLINE(declarator)\nInlines a function. Identical to `V8_INLINE`.\n\n```c++\nstatic NAN_INLINE(int foo(int bar)) {\n ...\n}\n```\n\n\n### NanNewLocal<T>(Handle<Value>)\n\nUse `NanNewLocal` in place of `v8::Local::New(...)` as this function\nrequires an `isolate` argument in recent versions of V8 but not in older versions.\n\n```c++\nNanNewLocal(v8::Null())\n```\n\n\n### NanReturnValue(Handle<Value>)\n\nUse `NanReturnValue` when you want to return a value from your V8 accessible method:\n\n```c++\nNAN_METHOD(Foo::Bar) {\n ...\n\n NanReturnValue(String::New(\"FooBar!\"));\n}\n```\n\nNo `return` statement required.\n\n\n### NanReturnUndefined()\n\nUse `NanReturnUndefined` when you don't want to return anything from your V8 accessible method:\n\n```c++\nNAN_METHOD(Foo::Baz) {\n ...\n\n NanReturnUndefined();\n}\n```\n\n\n### NanReturnNull()\n\nUse `NanReturnNull` when you want to return `Null` from your V8 accessible method:\n\n```c++\nNAN_METHOD(Foo::Baz) {\n ...\n\n NanReturnNull();\n}\n```\n\n\n### NanReturnEmptyString()\n\nUse `NanReturnEmptyString` when you want to return an empty `String` from your V8 accessible method:\n\n```c++\nNAN_METHOD(Foo::Baz) {\n ...\n\n NanReturnEmptyString();\n}\n```\n\n\n### NanScope()\n\nThe introduction of `isolate` references for many V8 calls in Node 0.11 makes `NanScope()` necessary, use it in place of `HandleScope scope`:\n\n```c++\nNAN_METHOD(Foo::Bar) {\n NanScope();\n\n NanReturnValue(String::New(\"FooBar!\"));\n}\n```\n\n\n### NanLocker()\n\nThe introduction of `isolate` references for many V8 calls in Node 0.11 makes `NanLocker()` necessary, use it in place of `Locker locker`:\n\n```c++\nNAN_METHOD(Foo::Bar) {\n NanLocker();\n ...\n NanUnlocker();\n}\n```\n\n\n### NanUnlocker()\n\nThe introduction of `isolate` references for many V8 calls in Node 0.11 makes `NanUnlocker()` necessary, use it in place of `Unlocker unlocker`:\n\n```c++\nNAN_METHOD(Foo::Bar) {\n NanLocker();\n ...\n NanUnlocker();\n}\n```\n\n\n### void * NanGetInternalFieldPointer(Handle<Object>, int)\n\nGets a pointer to the internal field with at `index` from a V8 `Object` handle.\n\n```c++\nLocal obj;\n...\nNanGetInternalFieldPointer(obj, 0);\n```\n\n### void NanSetInternalFieldPointer(Handle<Object>, int, void *)\n\nSets the value of the internal field at `index` on a V8 `Object` handle.\n\n```c++\nstatic Persistent dataWrapperCtor;\n...\nLocal wrapper = NanPersistentToLocal(dataWrapperCtor)->NewInstance();\nNanSetInternalFieldPointer(wrapper, 0, this);\n```\n\n\n### Local<Object> NanObjectWrapHandle(Object)\n\nWhen you want to fetch the V8 object handle from a native object you've wrapped with Node's `ObjectWrap`, you should use `NanObjectWrapHandle`:\n\n```c++\nNanObjectWrapHandle(iterator)->Get(String::NewSymbol(\"end\"))\n```\n\n\n### NanMakeWeak(Persistent<T>, parameter, callback)\n\nMake a persistent reference weak.\n\n\n### String NanSymbol(char *)\n\nThis isn't strictly about compatibility, it's just an easier way to create string symbol objects (i.e. `String::NewSymbol(x)`), for getting and setting object properties, or names of objects.\n\n```c++\nbool foo = false;\nif (obj->Has(NanSymbol(\"foo\")))\n foo = optionsObj->Get(NanSymbol(\"foo\"))->BooleanValue()\n```\n\n\n### Type NanGetPointerSafe(Type *[, Type])\n\nA helper for getting values from optional pointers. If the pointer is `NULL`, the function returns the optional default value, which defaults to `0`. Otherwise, the function returns the value the pointer points to.\n\n```c++\nchar *plugh(uint32_t *optional) {\n char res[] = \"xyzzy\";\n uint32_t param = NanGetPointerSafe(optional, 0x1337);\n switch (param) {\n ...\n }\n NanSetPointerSafe(optional, 0xDEADBEEF);\n} \n```\n\n\n### bool NanSetPointerSafe(Type *, Type)\n\nA helper for setting optional argument pointers. If the pointer is `NULL`, the function simply return `false`. Otherwise, the value is assigned to the variable the pointer points to.\n\n```c++\nconst char *plugh(size_t *outputsize) {\n char res[] = \"xyzzy\";\n if !(NanSetPointerSafe(outputsize, strlen(res) + 1)) {\n ...\n }\n\n ...\n}\n```\n\n\n### char* NanFromV8String(Handle<Value>[, enum Nan::Encoding, size_t *, char *, size_t, int])\n\nWhen you want to convert a V8 `String` to a `char*` use `NanFromV8String`. It is possible to define an encoding that defaults to `Nan::UTF8` as well as a pointer to a variable that will be assigned the number of bytes in the returned string. It is also possible to supply a buffer and its length to the function in order not to have a new buffer allocated. The final argument allows optionally setting `String::WriteOptions`, which default to `String::HINT_MANY_WRITES_EXPECTED | String::NO_NULL_TERMINATION`.\nJust remember that you'll end up with an object that you'll need to `delete[]` at some point unless you supply your own buffer:\n\n```c++\nsize_t count;\nchar* name = NanFromV8String(args[0]);\nchar* decoded = NanFromV8String(args[1], Nan::BASE64, &count, NULL, 0, String::HINT_MANY_WRITES_EXPECTED);\nchar param_copy[count];\nmemcpy(param_copy, decoded, count);\ndelete[] decoded;\n```\n\n\n### bool NanBooleanOptionValue(Handle<Value>, Handle<String>[, bool])\n\nWhen you have an \"options\" object that you need to fetch properties from, boolean options can be fetched with this pair. They check first if the object exists (`IsEmpty`), then if the object has the given property (`Has`) then they get and convert/coerce the property to a `bool`.\n\nThe optional last parameter is the *default* value, which is `false` if left off:\n\n```c++\n// `foo` is false unless the user supplies a truthy value for it\nbool foo = NanBooleanOptionValue(optionsObj, NanSymbol(\"foo\"));\n// `bar` is true unless the user supplies a falsy value for it\nbool bar = NanBooleanOptionValueDefTrue(optionsObj, NanSymbol(\"bar\"), true);\n```\n\n\n### uint32_t NanUInt32OptionValue(Handle<Value>, Handle<String>, uint32_t)\n\nSimilar to `NanBooleanOptionValue`, use `NanUInt32OptionValue` to fetch an integer option from your options object. Can be any kind of JavaScript `Number` and it will be coerced to an unsigned 32-bit integer.\n\nRequires all 3 arguments as a default is not optional:\n\n```c++\nuint32_t count = NanUInt32OptionValue(optionsObj, NanSymbol(\"count\"), 1024);\n```\n\n\n### NanError(message), NanTypeError(message), NanRangeError(message)\n\nFor making `Error`, `TypeError` and `RangeError` objects.\n\n```c++\nLocal res = NanError(\"you must supply a callback argument\");\n```\n\n\n### NanThrowError(message), NanThrowTypeError(message), NanThrowRangeError(message), NanThrowError(Local<Value>), NanThrowError(Local<Value>, int)\n\nFor throwing `Error`, `TypeError` and `RangeError` objects. You should `return` this call:\n\n```c++\nreturn NanThrowError(\"you must supply a callback argument\");\n```\n\nCan also handle any custom object you may want to throw. If used with the error code argument, it will add the supplied error code to the error object as a property called `code`.\n\n\n### Local<Object> NanNewBufferHandle(char *, uint32_t), Local<Object> NanNewBufferHandle(uint32_t)\n\nThe `Buffer` API has changed a little in Node 0.11, this helper provides consistent access to `Buffer` creation:\n\n```c++\nNanNewBufferHandle((char*)value.data(), value.size());\n```\n\nCan also be used to initialize a `Buffer` with just a `size` argument.\n\nCan also be supplied with a `NAN_WEAK_CALLBACK` and a hint for the garbage collector, when dealing with weak references.\n\n\n### Local<Object> NanBufferUse(char*, uint32_t)\n\n`Buffer::New(char*, uint32_t)` prior to 0.11 would make a copy of the data.\nWhile it was possible to get around this, it required a shim by passing a\ncallback. So the new API `Buffer::Use(char*, uint32_t)` was introduced to remove\nneeding to use this shim.\n\n`NanBufferUse` uses the `char*` passed as the backing data, and will free the\nmemory automatically when the weak callback is called. Keep this in mind, as\ncareless use can lead to \"double free or corruption\" and other cryptic failures.\n\n\n### bool NanHasInstance(Persistent<FunctionTemplate>&, Handle<Value>)\n\nCan be used to check the type of an object to determine it is of a particular class you have already defined and have a `Persistent` handle for.\n\n\n### Local<Type> NanPersistentToLocal(Persistent<Type>&)\n\nAside from `FunctionCallbackInfo`, the biggest and most painful change to V8 in Node 0.11 is the many restrictions now placed on `Persistent` handles. They are difficult to assign and difficult to fetch the original value out of.\n\nUse `NanPersistentToLocal` to convert a `Persistent` handle back to a `Local` handle.\n\n```c++\nLocal handle = NanPersistentToLocal(persistentHandle);\n```\n\n\n### Local<Context> NanNewContextHandle([ExtensionConfiguration*, Handle<ObjectTemplate>, Handle<Value>])\nCreates a new `Local` handle.\n\n```c++\nLocal ftmpl = FunctionTemplate::New();\nLocal otmpl = ftmpl->InstanceTemplate();\nLocal ctx = NanNewContextHandle(NULL, otmpl);\n```\n\n\n### void NanDispose(Persistent<T> &)\n\nUse `NanDispose` to dispose a `Persistent` handle.\n\n```c++\nNanDispose(persistentHandle);\n```\n\n\n### NanAssignPersistent(type, handle, object)\n\nUse `NanAssignPersistent` to assign a non-`Persistent` handle to a `Persistent` one. You can no longer just declare a `Persistent` handle and assign directly to it later, you have to `Reset` it in Node 0.11, so this makes it easier.\n\nIn general it is now better to place anything you want to protect from V8's garbage collector as properties of a generic `Object` and then assign that to a `Persistent`. This works in older versions of Node also if you use `NanAssignPersistent`:\n\n```c++\nPersistent persistentHandle;\n\n...\n\nLocal obj = Object::New();\nobj->Set(NanSymbol(\"key\"), keyHandle); // where keyHandle might be a Local\nNanAssignPersistent(Object, persistentHandle, obj)\n```\n\n\n### NanInitPersistent(type, name, object)\n\nUser `NanInitPersistent` to declare and initialize a new `Persistent` with the supplied object. The assignment operator for `Persistent` is no longer public in Node 0.11, so this macro makes it easier to declare and initializing a new `Persistent`. See NanAssignPersistent for more information.\n\n```c++\nLocal obj = Object::New();\nobj->Set(NanSymbol(\"key\"), keyHandle); // where keyHandle might be a Local\nNanInitPersistent(Object, persistentHandle, obj);\n```\n\n\n### NanCallback\n\nBecause of the difficulties imposed by the changes to `Persistent` handles in V8 in Node 0.11, creating `Persistent` versions of your `Local` handles is annoyingly tricky. `NanCallback` makes it easier by taking your `Local` handle, making it persistent until the `NanCallback` is deleted and even providing a handy `Call()` method to fetch and execute the callback `Function`.\n\n```c++\nLocal callbackHandle = args[0].As();\nNanCallback *callback = new NanCallback(callbackHandle);\n// pass `callback` around and it's safe from GC until you:\ndelete callback;\n```\n\nYou can execute the callback like so:\n\n```c++\n// no arguments:\ncallback->Call(0, NULL);\n\n// an error argument:\nLocal argv[] = {\n Exception::Error(String::New(\"fail!\"))\n};\ncallback->Call(1, argv);\n\n// a success argument:\nLocal argv[] = {\n Local::New(Null()),\n String::New(\"w00t!\")\n};\ncallback->Call(2, argv);\n```\n\n`NanCallback` also has a `Local GetCallback()` method that you can use to fetch a local handle to the underlying callback function if you need it.\n\n\n### NanAsyncWorker\n\n`NanAsyncWorker` is an abstract class that you can subclass to have much of the annoying async queuing and handling taken care of for you. It can even store arbitrary V8 objects for you and have them persist while the async work is in progress.\n\nSee a rough outline of the implementation:\n\n```c++\nclass NanAsyncWorker {\npublic:\n NanAsyncWorker (NanCallback *callback);\n\n // Clean up persistent handles and delete the *callback\n virtual ~NanAsyncWorker ();\n\n // Check the `char *errmsg` property and call HandleOKCallback()\n // or HandleErrorCallback depending on whether it has been set or not\n virtual void WorkComplete ();\n\n // You must implement this to do some async work. If there is an\n // error then allocate `errmsg` to to a message and the callback will\n // be passed that string in an Error object\n virtual void Execute ();\n\n // Save a V8 object in a Persistent handle to protect it from GC\n void SavePersistent(const char *key, Local &obj);\n\n // Fetch a stored V8 object (don't call from within `Execute()`)\n Local GetFromPersistent(const char *key);\n\nprotected:\n // Set this if there is an error, otherwise it's NULL\n const char *errmsg;\n\n // Default implementation calls the callback function with no arguments.\n // Override this to return meaningful data\n virtual void HandleOKCallback ();\n\n // Default implementation calls the callback function with an Error object\n // wrapping the `errmsg` string\n virtual void HandleErrorCallback ();\n};\n```\n\n\n### NanAsyncQueueWorker(NanAsyncWorker *)\n\n`NanAsyncQueueWorker` will run a `NanAsyncWorker` asynchronously via libuv. Both the *execute* and *after_work* steps are taken care of for you—most of the logic for this is embedded in `NanAsyncWorker`.\n\n### Contributors\n\nNAN is only possible due to the excellent work of the following contributors:\n\n\n\n\n\n\n
      Rod VaggGitHub/rvaggTwitter/@rvagg
      Benjamin ByholmGitHub/kkoopa
      Trevor NorrisGitHub/trevnorrisTwitter/@trevnorris
      Nathan RajlichGitHub/TooTallNateTwitter/@TooTallNate
      \n\nLicence & copyright\n-----------------------\n\nCopyright (c) 2013 NAN contributors (listed above).\n\nNative Abstractions for Node.js is licensed under an MIT +no-false-attribs license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/rvagg/nan/issues" - }, - "homepage": "https://github.com/rvagg/nan", - "_id": "nan@0.6.0", - "_from": "nan@~0.6.0" -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-watch/LICENSE b/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-watch/LICENSE deleted file mode 100644 index 2a408130..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-watch/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2012 Yuan Chuan - -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/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-watch/README.md b/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-watch/README.md deleted file mode 100644 index 6ea31bd5..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-watch/README.md +++ /dev/null @@ -1,74 +0,0 @@ -#Node-watch -A [fs.watch](http://nodejs.org/api/fs.html#fs_fs_watch_filename_options_listener) wrapper to watch files or directories(recursively by default). - - -### Installation - -```bash -npm install node-watch -``` - -### Example - -```js -var watch = require('node-watch'); - -watch('somedir_or_somefile', function(filename) { - console.log(filename, ' changed.'); -}); -``` - -### Why fs.watch wrapper - -* Some editors will generate temporary files which will cause the callback function to be triggered multiple times. -* when watching a single file the callback function will only be triggered one time and then is seem to be unwatched. -* Missing an option to watch a directory recursively. - - -### The difference -This module **currently** does not differentiate event like `rename` or `delete`. Once there is a change, the callback function will be triggered. - - -### Options - -`recursive`:Watch it recursively or not (defaults to **true**). - -`followSymLinks`: Follow symbolic links or not (defaults to **false**). - -`maxSymLevel`: The max number of following symbolic links, in order to prevent circular links (defaults to **1**). - - -```js -watch('somedir', { recursive: false, followSymLinks: true }, function(filename) { - console.log(filename, ' changed.'); -}); -``` - -###FAQ - -#### 1. How to watch mutiple files or directories - -```js -watch(['file1', 'file2'], function(file) { - // -}); -``` - -#### 2. How to filter files - -Write your own filter function as a higher-order function. For example: - -```js -var filter = function(pattern, fn) { - return function(filename) { - if (pattern.test(filename)) { - fn(filename); - } - } -} - -// only watch for js files -watch('mydir', filter(/\.js$/, function(filename) { - // -})); -``` diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-watch/index.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-watch/index.js deleted file mode 100644 index 59127e19..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-watch/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/watch'); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-watch/lib/watch.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-watch/lib/watch.js deleted file mode 100644 index 77dfdfb3..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-watch/lib/watch.js +++ /dev/null @@ -1,245 +0,0 @@ -/** - * Module dependencies. - */ -var fs = require('fs') - , path = require('path'); - - -/** - * Utility functions to synchronously test whether the giving path - * is a file or a directory or a symbolic link. - */ -var is = function(ret) { - var shortcuts = { - 'file': 'File' - , 'dir': 'Directory' - , 'sym': 'SymbolicLink' - }; - Object.keys(shortcuts).forEach(function(method) { - ret[method] = function(fpath) { - var stat = fs[method === 'sym' ? 'lstatSync' :'statSync']; - if (fs.existsSync(fpath)) { - memo.push(fpath, method); - return stat(fpath)['is' + shortcuts[method]](); - } - return false; - } - }); - return ret; -}({}); - - -/** - * Get sub-directories in a directory. - */ -var sub = function(parent, cb) { - if (is.dir(parent)) { - fs.readdir(parent, function(err, all) { - all && all.forEach(function(f) { - var sdir = path.join(parent, f) - if (is.dir(sdir)) { - cb.call(null, sdir) - } - }); - }); - } -}; - - -/** - * Mixing object properties. - */ -var mixin = function() { - var mix = {}; - [].forEach.call(arguments, function(arg) { - for (var name in arg) { - if (arg.hasOwnProperty(name)) { - mix[name] = arg[name]; - } - } - }); - return mix; -}; - - -/** - * A container for memorizing names of files or directories. - */ -var memo = function(memo) { - return { - push: function(name, type) { - memo[name] = type; - }, - has: function(name) { - return {}.hasOwnProperty.call(memo, name); - }, - update: function(name) { - if (!is.file(name) || !is.dir(name)) { - delete memo[name]; - } - return true; - } - }; -}({}); - - -/** - * A Container for storing unique and valid filenames. - */ -var fileNameCache = function(cache) { - return { - push: function(name) { - cache[name] = 1; - return this; - }, - each: function() { - var temp = Object.keys(cache).filter(function(name){ - return is.file(name) || memo.has(name) && memo.update(name); - }); - temp.forEach.apply(temp, arguments); - return this; - }, - clear: function(){ - cache = {}; - return this; - } - }; -}({}); - - -/** - * Abstracting the way of avoiding duplicate function call. - */ -var worker = function() { - var free = true; - return { - busydoing: function(cb) { - if (free) { - free = false; - cb.call(); - } - }, - free: function() { - free = true; - } - } -}(); - - -/** - * Delay function call and ignore invalid filenames. - */ -var normalizeCall = function(fname, options, cb) { - // Store each name of the modifying or temporary files generated by an editor. - fileNameCache.push(fname); - - worker.busydoing(function() { - // A heuristic delay of the write-to-file process. - setTimeout(function() { - - // When the write-to-file process is done, send all filtered filenames - // to the callback function and call it. - fileNameCache - .each(function(f) { - // Watch new created directory. - if (options.recursive && !memo.has(f) && is.dir(f)) { - watch(f, options, cb); - } - cb.call(null, f); - }).clear(); - - worker.free(); - - }, 100); - }); -}; - - -/** - * Catch exception on Windows when deleting a directory. - */ -var catchException = function() {}; - - -/** - * Option handler for the `watch` function. - */ -var handleOptions = function(origin, defaultOptions) { - return function() { - var args = [].slice.call(arguments); - if (Object.prototype.toString.call(args[1]) === '[object Function]') { - args[2] = args[1]; - } - if (!Array.isArray(args[0])) { - args[0] = [args[0]]; - } - //overwrite default options - args[1] = mixin(defaultOptions, args[1]); - //handle multiple files. - args[0].forEach(function(path) { - origin.apply(null, [path].concat(args.slice(1))); - }); - } -}; - - -/** - * Watch a file or a directory (recursively by default). - * - * @param {String} fpath - * @options {Object} options - * @param {Function} cb - * - * Options: - * `recursive`: Watch it recursively or not (defaults to true). - * `followSymLinks`: Follow symbolic links or not (defaults to false). - * `maxSymLevel`: The max number of following symbolic links (defaults to 1). - * - * Example: - * - * watch('fpath', {recursive: true}, function(file) { - * console.log(file, ' changed'); - * }); - */ -function watch(fpath, options, cb) { - if (is.sym(fpath) - && !(options.followSymLinks - && options.maxSymLevel--)) { - return; - } - // Due to the unstalbe fs.watch(), if the `fpath` is a file then - // switch to watch its parent directory instead of watch it directly. - // Once the logged filename matches it then triggers the callback function. - if (is.file(fpath)) { - var parent = path.resolve(fpath, '..'); - fs.watch(parent, options, function(evt, fname) { - if (path.basename(fpath) === fname) { - normalizeCall(fpath, options, cb); - } - }).on('error', catchException); - } else if (is.dir(fpath)) { - fs.watch(fpath, options, function(evt, fname) { - if (fname) { - normalizeCall(path.join(fpath, fname), options, cb); - } - }).on('error', catchException); - - if (options.recursive) { - // Recursively watch its sub-directories. - sub(fpath, function(dir) { - watch(dir, options, cb); - }); - } - } -}; - - -/** - * Set default options and expose. - */ -module.exports = handleOptions(watch, { - recursive: true - , followSymLinks: false - , maxSymLevel: 1 -}); - diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-watch/package.json b/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-watch/package.json deleted file mode 100644 index 89ce3d8d..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-watch/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "node-watch", - "version": "0.3.4", - "description": "fs.watch() wrapper of Nodejs ", - "url": "https://github.com/yuanchuan/node-watch", - "author": { - "name": "yuanchuan", - "email": "yuanchuan23@gmail.com", - "url": "http://yuanchuan.name" - }, - "main": "./lib/watch.js", - "keywords": [ - "nodewatch", - "watch", - "watchfile" - ], - "bugs": { - "url": "https://github.com/yuanchuan/node-watch/issues" - }, - "repository": { - "type": "git", - "url": "git://github.com/yuanchuan/node-watch.git" - }, - "readme": "#Node-watch\nA [fs.watch](http://nodejs.org/api/fs.html#fs_fs_watch_filename_options_listener) wrapper to watch files or directories(recursively by default). \n\n\n### Installation\n\n```bash\nnpm install node-watch\n```\n\n### Example\n\n```js\nvar watch = require('node-watch');\n\nwatch('somedir_or_somefile', function(filename) {\n console.log(filename, ' changed.');\n});\n``` \n\n### Why fs.watch wrapper\n\n* Some editors will generate temporary files which will cause the callback function to be triggered multiple times.\n* when watching a single file the callback function will only be triggered one time and then is seem to be unwatched.\n* Missing an option to watch a directory recursively.\n \n \n### The difference\nThis module **currently** does not differentiate event like `rename` or `delete`. Once there is a change, the callback function will be triggered.\n\n\n### Options\n\n`recursive`:Watch it recursively or not (defaults to **true**). \n\n`followSymLinks`: Follow symbolic links or not (defaults to **false**).\n\n`maxSymLevel`: The max number of following symbolic links, in order to prevent circular links (defaults to **1**). \n\n\n```js\nwatch('somedir', { recursive: false, followSymLinks: true }, function(filename) {\n console.log(filename, ' changed.');\n});\n```\n\n###FAQ\n\n#### 1. How to watch mutiple files or directories\n\n```js\nwatch(['file1', 'file2'], function(file) {\n //\n});\n```\n\n#### 2. How to filter files\n\nWrite your own filter function as a higher-order function. For example:\n\n```js\nvar filter = function(pattern, fn) {\n return function(filename) {\n if (pattern.test(filename)) {\n fn(filename);\n }\n }\n}\n\n// only watch for js files\nwatch('mydir', filter(/\\.js$/, function(filename) {\n // \n}));\n```\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/yuanchuan/node-watch", - "_id": "node-watch@0.3.4", - "_from": "node-watch@0.3.x" -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/.travis.yml b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/.travis.yml deleted file mode 100644 index cc4dba29..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/LICENSE b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/LICENSE deleted file mode 100644 index 432d1aeb..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 2010 James Halliday (mail@substack.net) - -This project is free software released under the MIT/X11 license: - -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/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/bool.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/bool.js deleted file mode 100644 index a998fb7a..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/bool.js +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env node -var util = require('util'); -var argv = require('optimist').argv; - -if (argv.s) { - util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: '); -} -console.log( - (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '') -); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/boolean_double.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/boolean_double.js deleted file mode 100644 index a35a7e6d..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/boolean_double.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .boolean(['x','y','z']) - .argv -; -console.dir([ argv.x, argv.y, argv.z ]); -console.dir(argv._); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/boolean_single.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/boolean_single.js deleted file mode 100644 index 017bb689..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/boolean_single.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .boolean('v') - .argv -; -console.dir(argv.v); -console.dir(argv._); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/default_hash.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/default_hash.js deleted file mode 100644 index ade77681..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/default_hash.js +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env node - -var argv = require('optimist') - .default({ x : 10, y : 10 }) - .argv -; - -console.log(argv.x + argv.y); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/default_singles.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/default_singles.js deleted file mode 100644 index d9b1ff45..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/default_singles.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .default('x', 10) - .default('y', 10) - .argv -; -console.log(argv.x + argv.y); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/divide.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/divide.js deleted file mode 100644 index 5e2ee82f..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/divide.js +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env node - -var argv = require('optimist') - .usage('Usage: $0 -x [num] -y [num]') - .demand(['x','y']) - .argv; - -console.log(argv.x / argv.y); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/line_count.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/line_count.js deleted file mode 100644 index b5f95bf6..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/line_count.js +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .usage('Count the lines in a file.\nUsage: $0') - .demand('f') - .alias('f', 'file') - .describe('f', 'Load a file') - .argv -; - -var fs = require('fs'); -var s = fs.createReadStream(argv.file); - -var lines = 0; -s.on('data', function (buf) { - lines += buf.toString().match(/\n/g).length; -}); - -s.on('end', function () { - console.log(lines); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/line_count_options.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/line_count_options.js deleted file mode 100644 index d9ac7090..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/line_count_options.js +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .usage('Count the lines in a file.\nUsage: $0') - .options({ - file : { - demand : true, - alias : 'f', - description : 'Load a file' - }, - base : { - alias : 'b', - description : 'Numeric base to use for output', - default : 10, - }, - }) - .argv -; - -var fs = require('fs'); -var s = fs.createReadStream(argv.file); - -var lines = 0; -s.on('data', function (buf) { - lines += buf.toString().match(/\n/g).length; -}); - -s.on('end', function () { - console.log(lines.toString(argv.base)); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/line_count_wrap.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/line_count_wrap.js deleted file mode 100644 index 42675111..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/line_count_wrap.js +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .usage('Count the lines in a file.\nUsage: $0') - .wrap(80) - .demand('f') - .alias('f', [ 'file', 'filename' ]) - .describe('f', - "Load a file. It's pretty important." - + " Required even. So you'd better specify it." - ) - .alias('b', 'base') - .describe('b', 'Numeric base to display the number of lines in') - .default('b', 10) - .describe('x', 'Super-secret optional parameter which is secret') - .default('x', '') - .argv -; - -var fs = require('fs'); -var s = fs.createReadStream(argv.file); - -var lines = 0; -s.on('data', function (buf) { - lines += buf.toString().match(/\n/g).length; -}); - -s.on('end', function () { - console.log(lines.toString(argv.base)); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/nonopt.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/nonopt.js deleted file mode 100644 index ee633eed..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/nonopt.js +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist').argv; -console.log('(%d,%d)', argv.x, argv.y); -console.log(argv._); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/reflect.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/reflect.js deleted file mode 100644 index 816b3e11..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/reflect.js +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -console.dir(require('optimist').argv); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/short.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/short.js deleted file mode 100644 index 1db0ad0f..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/short.js +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist').argv; -console.log('(%d,%d)', argv.x, argv.y); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/string.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/string.js deleted file mode 100644 index a8e5aeb2..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/string.js +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .string('x', 'y') - .argv -; -console.dir([ argv.x, argv.y ]); - -/* Turns off numeric coercion: - ./node string.js -x 000123 -y 9876 - [ '000123', '9876' ] -*/ diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/usage-options.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/usage-options.js deleted file mode 100644 index b9999776..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/usage-options.js +++ /dev/null @@ -1,19 +0,0 @@ -var optimist = require('./../index'); - -var argv = optimist.usage('This is my awesome program', { - 'about': { - description: 'Provide some details about the author of this program', - required: true, - short: 'a', - }, - 'info': { - description: 'Provide some information about the node.js agains!!!!!!', - boolean: true, - short: 'i' - } -}).argv; - -optimist.showHelp(); - -console.log('\n\nInspecting options'); -console.dir(argv); \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/xup.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/xup.js deleted file mode 100644 index 8f6ecd20..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/example/xup.js +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist').argv; - -if (argv.rif - 5 * argv.xup > 7.138) { - console.log('Buy more riffiwobbles'); -} -else { - console.log('Sell the xupptumblers'); -} - diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/index.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/index.js deleted file mode 100644 index 4da5a6d8..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/index.js +++ /dev/null @@ -1,343 +0,0 @@ -var path = require('path'); -var minimist = require('minimist'); -var wordwrap = require('wordwrap'); - -/* Hack an instance of Argv with process.argv into Argv - so people can do - require('optimist')(['--beeble=1','-z','zizzle']).argv - to parse a list of args and - require('optimist').argv - to get a parsed version of process.argv. -*/ - -var inst = Argv(process.argv.slice(2)); -Object.keys(inst).forEach(function (key) { - Argv[key] = typeof inst[key] == 'function' - ? inst[key].bind(inst) - : inst[key]; -}); - -var exports = module.exports = Argv; -function Argv (processArgs, cwd) { - var self = {}; - if (!cwd) cwd = process.cwd(); - - self.$0 = process.argv - .slice(0,2) - .map(function (x) { - var b = rebase(cwd, x); - return x.match(/^\//) && b.length < x.length - ? b : x - }) - .join(' ') - ; - - if (process.env._ != undefined && process.argv[1] == process.env._) { - self.$0 = process.env._.replace( - path.dirname(process.execPath) + '/', '' - ); - } - - var options = { - boolean: [], - string: [], - alias: {}, - default: [] - }; - - self.boolean = function (bools) { - options.boolean.push.apply(options.boolean, [].concat(bools)); - return self; - }; - - self.string = function (strings) { - options.string.push.apply(options.string, [].concat(strings)); - return self; - }; - - self.default = function (key, value) { - if (typeof key === 'object') { - Object.keys(key).forEach(function (k) { - self.default(k, key[k]); - }); - } - else { - options.default[key] = value; - } - return self; - }; - - self.alias = function (x, y) { - if (typeof x === 'object') { - Object.keys(x).forEach(function (key) { - self.alias(key, x[key]); - }); - } - else { - options.alias[x] = (options.alias[x] || []).concat(y); - } - return self; - }; - - var demanded = {}; - self.demand = function (keys) { - if (typeof keys == 'number') { - if (!demanded._) demanded._ = 0; - demanded._ += keys; - } - else if (Array.isArray(keys)) { - keys.forEach(function (key) { - self.demand(key); - }); - } - else { - demanded[keys] = true; - } - - return self; - }; - - var usage; - self.usage = function (msg, opts) { - if (!opts && typeof msg === 'object') { - opts = msg; - msg = null; - } - - usage = msg; - - if (opts) self.options(opts); - - return self; - }; - - function fail (msg) { - self.showHelp(); - if (msg) console.error(msg); - process.exit(1); - } - - var checks = []; - self.check = function (f) { - checks.push(f); - return self; - }; - - var descriptions = {}; - self.describe = function (key, desc) { - if (typeof key === 'object') { - Object.keys(key).forEach(function (k) { - self.describe(k, key[k]); - }); - } - else { - descriptions[key] = desc; - } - return self; - }; - - self.parse = function (args) { - return parseArgs(args); - }; - - self.option = self.options = function (key, opt) { - if (typeof key === 'object') { - Object.keys(key).forEach(function (k) { - self.options(k, key[k]); - }); - } - else { - if (opt.alias) self.alias(key, opt.alias); - if (opt.demand) self.demand(key); - if (typeof opt.default !== 'undefined') { - self.default(key, opt.default); - } - - if (opt.boolean || opt.type === 'boolean') { - self.boolean(key); - } - if (opt.string || opt.type === 'string') { - self.string(key); - } - - var desc = opt.describe || opt.description || opt.desc; - if (desc) { - self.describe(key, desc); - } - } - - return self; - }; - - var wrap = null; - self.wrap = function (cols) { - wrap = cols; - return self; - }; - - self.showHelp = function (fn) { - if (!fn) fn = console.error; - fn(self.help()); - }; - - self.help = function () { - var keys = Object.keys( - Object.keys(descriptions) - .concat(Object.keys(demanded)) - .concat(Object.keys(options.default)) - .reduce(function (acc, key) { - if (key !== '_') acc[key] = true; - return acc; - }, {}) - ); - - var help = keys.length ? [ 'Options:' ] : []; - - if (usage) { - help.unshift(usage.replace(/\$0/g, self.$0), ''); - } - - var switches = keys.reduce(function (acc, key) { - acc[key] = [ key ].concat(options.alias[key] || []) - .map(function (sw) { - return (sw.length > 1 ? '--' : '-') + sw - }) - .join(', ') - ; - return acc; - }, {}); - - var switchlen = longest(Object.keys(switches).map(function (s) { - return switches[s] || ''; - })); - - var desclen = longest(Object.keys(descriptions).map(function (d) { - return descriptions[d] || ''; - })); - - keys.forEach(function (key) { - var kswitch = switches[key]; - var desc = descriptions[key] || ''; - - if (wrap) { - desc = wordwrap(switchlen + 4, wrap)(desc) - .slice(switchlen + 4) - ; - } - - var spadding = new Array( - Math.max(switchlen - kswitch.length + 3, 0) - ).join(' '); - - var dpadding = new Array( - Math.max(desclen - desc.length + 1, 0) - ).join(' '); - - var type = null; - - if (options.boolean[key]) type = '[boolean]'; - if (options.string[key]) type = '[string]'; - - if (!wrap && dpadding.length > 0) { - desc += dpadding; - } - - var prelude = ' ' + kswitch + spadding; - var extra = [ - type, - demanded[key] - ? '[required]' - : null - , - options.default[key] !== undefined - ? '[default: ' + JSON.stringify(options.default[key]) + ']' - : null - , - ].filter(Boolean).join(' '); - - var body = [ desc, extra ].filter(Boolean).join(' '); - - if (wrap) { - var dlines = desc.split('\n'); - var dlen = dlines.slice(-1)[0].length - + (dlines.length === 1 ? prelude.length : 0) - - body = desc + (dlen + extra.length > wrap - 2 - ? '\n' - + new Array(wrap - extra.length + 1).join(' ') - + extra - : new Array(wrap - extra.length - dlen + 1).join(' ') - + extra - ); - } - - help.push(prelude + body); - }); - - help.push(''); - return help.join('\n'); - }; - - Object.defineProperty(self, 'argv', { - get : function () { return parseArgs(processArgs) }, - enumerable : true, - }); - - function parseArgs (args) { - var argv = minimist(args, options); - argv.$0 = self.$0; - - if (demanded._ && argv._.length < demanded._) { - fail('Not enough non-option arguments: got ' - + argv._.length + ', need at least ' + demanded._ - ); - } - - var missing = []; - Object.keys(demanded).forEach(function (key) { - if (!argv[key]) missing.push(key); - }); - - if (missing.length) { - fail('Missing required arguments: ' + missing.join(', ')); - } - - checks.forEach(function (f) { - try { - if (f(argv) === false) { - fail('Argument check failed: ' + f.toString()); - } - } - catch (err) { - fail(err) - } - }); - - return argv; - } - - function longest (xs) { - return Math.max.apply( - null, - xs.map(function (x) { return x.length }) - ); - } - - return self; -}; - -// rebase an absolute path to a relative one with respect to a base directory -// exported for tests -exports.rebase = rebase; -function rebase (base, dir) { - var ds = path.normalize(dir).split('/').slice(1); - var bs = path.normalize(base).split('/').slice(1); - - for (var i = 0; ds[i] && ds[i] == bs[i]; i++); - ds.splice(0, i); bs.splice(0, i); - - var p = path.normalize( - bs.map(function () { return '..' }).concat(ds).join('/') - ).replace(/\/$/,'').replace(/^$/, '.'); - return p.match(/^[.\/]/) ? p : './' + p; -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/.travis.yml b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/.travis.yml deleted file mode 100644 index cc4dba29..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/LICENSE b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/example/parse.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/example/parse.js deleted file mode 100644 index abff3e8e..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/example/parse.js +++ /dev/null @@ -1,2 +0,0 @@ -var argv = require('../')(process.argv.slice(2)); -console.dir(argv); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/index.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/index.js deleted file mode 100644 index 2aa95140..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/index.js +++ /dev/null @@ -1,187 +0,0 @@ -module.exports = function (args, opts) { - if (!opts) opts = {}; - - var flags = { bools : {}, strings : {} }; - - [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - - [].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - }); - - var aliases = {}; - Object.keys(opts.alias || {}).forEach(function (key) { - aliases[key] = [].concat(opts.alias[key]); - aliases[key].forEach(function (x) { - aliases[x] = [key].concat(aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - - var defaults = opts['default'] || {}; - - var argv = { _ : [] }; - Object.keys(flags.bools).forEach(function (key) { - setArg(key, defaults[key] === undefined ? false : defaults[key]); - }); - - var notFlags = []; - - if (args.indexOf('--') !== -1) { - notFlags = args.slice(args.indexOf('--')+1); - args = args.slice(0, args.indexOf('--')); - } - - function setArg (key, val) { - var value = !flags.strings[key] && isNumber(val) - ? Number(val) : val - ; - setKey(argv, key.split('.'), value); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), value); - }); - } - - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - - if (/^--.+=/.test(arg)) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - setArg(m[1], m[2]); - } - else if (/^--no-.+/.test(arg)) { - var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false); - } - else if (/^--.+/.test(arg)) { - var key = arg.match(/^--(.+)/)[1]; - var next = args[i + 1]; - if (next !== undefined && !/^-/.test(next) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true'); - i++; - } - else { - setArg(key, true); - } - } - else if (/^-[^-]+/.test(arg)) { - var letters = arg.slice(1,-1).split(''); - - var broken = false; - for (var j = 0; j < letters.length; j++) { - var next = arg.slice(j+2); - - if (next === '-') { - setArg(letters[j], next) - continue; - } - - if (/[A-Za-z]/.test(letters[j]) - && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next); - broken = true; - break; - } - - if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2)); - broken = true; - break; - } - else { - setArg(letters[j], true); - } - } - - var key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, args[i+1]); - i++; - } - else if (args[i+1] && /true|false/.test(args[i+1])) { - setArg(key, args[i+1] === 'true'); - i++; - } - else { - setArg(key, true); - } - } - } - else { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ); - } - } - - Object.keys(defaults).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) { - setKey(argv, key.split('.'), defaults[key]); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), defaults[key]); - }); - } - }); - - notFlags.forEach(function(key) { - argv._.push(key); - }); - - return argv; -}; - -function hasKey (obj, keys) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - o = (o[key] || {}); - }); - - var key = keys[keys.length - 1]; - return key in o; -} - -function setKey (obj, keys, value) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - if (o[key] === undefined) o[key] = {}; - o = o[key]; - }); - - var key = keys[keys.length - 1]; - if (o[key] === undefined || typeof o[key] === 'boolean') { - o[key] = value; - } - else if (Array.isArray(o[key])) { - o[key].push(value); - } - else { - o[key] = [ o[key], value ]; - } -} - -function isNumber (x) { - if (typeof x === 'number') return true; - if (/^0x[0-9a-f]+$/i.test(x)) return true; - return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); -} - -function longest (xs) { - return Math.max.apply(null, xs.map(function (x) { return x.length })); -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/package.json b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/package.json deleted file mode 100644 index e1d05515..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "minimist", - "version": "0.0.7", - "description": "parse argument options", - "main": "index.js", - "devDependencies": { - "tape": "~1.0.4", - "tap": "~0.4.0" - }, - "scripts": { - "test": "tap test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "ff/5", - "firefox/latest", - "chrome/10", - "chrome/latest", - "safari/5.1", - "safari/latest", - "opera/12" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/minimist.git" - }, - "homepage": "https://github.com/substack/minimist", - "keywords": [ - "argv", - "getopt", - "parser", - "optimist" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "readme": "# minimist\n\nparse argument options\n\nThis module is the guts of optimist's argument parser without all the\nfanciful decoration.\n\n[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist)\n\n[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist)\n\n# example\n\n``` js\nvar argv = require('minimist')(process.argv.slice(2));\nconsole.dir(argv);\n```\n\n```\n$ node example/parse.js -a beep -b boop\n{ _: [], a: 'beep', b: 'boop' }\n```\n\n```\n$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz\n{ _: [ 'foo', 'bar', 'baz' ],\n x: 3,\n y: 4,\n n: 5,\n a: true,\n b: true,\n c: true,\n beep: 'boop' }\n```\n\n# methods\n\n``` js\nvar parseArgs = require('minimist')\n```\n\n## var argv = parseArgs(args, opts={})\n\nReturn an argument object `argv` populated with the array arguments from `args`.\n\n`argv._` contains all the arguments that didn't have an option associated with\nthem.\n\nNumeric-looking arguments will be returned as numbers unless `opts.string` or\n`opts.boolean` is set for that argument name.\n\nAny arguments after `'--'` will not be parsed and will end up in `argv._`.\n\noptions can be:\n\n* `opts.string` - a string or array of strings argument names to always treat as\nstrings\n* `opts.boolean` - a string or array of strings to always treat as booleans\n* `opts.alias` - an object mapping string names to strings or arrays of string\nargument names to use as aliases\n* `opts.default` - an object mapping string argument names to default values\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install minimist\n```\n\n# license\n\nMIT\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/substack/minimist/issues" - }, - "_id": "minimist@0.0.7", - "_from": "minimist@~0.0.1" -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/readme.markdown b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/readme.markdown deleted file mode 100644 index c2563532..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/readme.markdown +++ /dev/null @@ -1,73 +0,0 @@ -# minimist - -parse argument options - -This module is the guts of optimist's argument parser without all the -fanciful decoration. - -[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist) - -[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist) - -# example - -``` js -var argv = require('minimist')(process.argv.slice(2)); -console.dir(argv); -``` - -``` -$ node example/parse.js -a beep -b boop -{ _: [], a: 'beep', b: 'boop' } -``` - -``` -$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz -{ _: [ 'foo', 'bar', 'baz' ], - x: 3, - y: 4, - n: 5, - a: true, - b: true, - c: true, - beep: 'boop' } -``` - -# methods - -``` js -var parseArgs = require('minimist') -``` - -## var argv = parseArgs(args, opts={}) - -Return an argument object `argv` populated with the array arguments from `args`. - -`argv._` contains all the arguments that didn't have an option associated with -them. - -Numeric-looking arguments will be returned as numbers unless `opts.string` or -`opts.boolean` is set for that argument name. - -Any arguments after `'--'` will not be parsed and will end up in `argv._`. - -options can be: - -* `opts.string` - a string or array of strings argument names to always treat as -strings -* `opts.boolean` - a string or array of strings to always treat as booleans -* `opts.alias` - an object mapping string names to strings or arrays of string -argument names to use as aliases -* `opts.default` - an object mapping string argument names to default values - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install minimist -``` - -# license - -MIT diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/test/dash.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/test/dash.js deleted file mode 100644 index 8b034b99..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/test/dash.js +++ /dev/null @@ -1,24 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('-', function (t) { - t.plan(5); - t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); - t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); - t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); - t.deepEqual( - parse([ '-b', '-' ], { boolean: 'b' }), - { b: true, _: [ '-' ] } - ); - t.deepEqual( - parse([ '-s', '-' ], { string: 's' }), - { s: '-', _: [] } - ); -}); - -test('-a -- b', function (t) { - t.plan(3); - t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/test/default_bool.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/test/default_bool.js deleted file mode 100644 index f0041ee4..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/test/default_bool.js +++ /dev/null @@ -1,20 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('boolean default true', function (t) { - var argv = parse([], { - boolean: 'sometrue', - default: { sometrue: true } - }); - t.equal(argv.sometrue, true); - t.end(); -}); - -test('boolean default false', function (t) { - var argv = parse([], { - boolean: 'somefalse', - default: { somefalse: false } - }); - t.equal(argv.somefalse, false); - t.end(); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/test/dotted.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/test/dotted.js deleted file mode 100644 index ef0ae349..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/test/dotted.js +++ /dev/null @@ -1,16 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('dotted alias', function (t) { - var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 22); - t.equal(argv.aa.bb, 22); - t.end(); -}); - -test('dotted default', function (t) { - var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 11); - t.equal(argv.aa.bb, 11); - t.end(); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/test/long.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/test/long.js deleted file mode 100644 index 5d3a1e09..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/test/long.js +++ /dev/null @@ -1,31 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('long opts', function (t) { - t.deepEqual( - parse([ '--bool' ]), - { bool : true, _ : [] }, - 'long boolean' - ); - t.deepEqual( - parse([ '--pow', 'xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture sp' - ); - t.deepEqual( - parse([ '--pow=xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture eq' - ); - t.deepEqual( - parse([ '--host', 'localhost', '--port', '555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures sp' - ); - t.deepEqual( - parse([ '--host=localhost', '--port=555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures eq' - ); - t.end(); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/test/parse.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/test/parse.js deleted file mode 100644 index 7c4348a4..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/test/parse.js +++ /dev/null @@ -1,297 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse args', function (t) { - t.deepEqual( - parse([ '--no-moo' ]), - { moo : false, _ : [] }, - 'no' - ); - t.deepEqual( - parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), - { v : ['a','b','c'], _ : [] }, - 'multi' - ); - t.end(); -}); - -test('comprehensive', function (t) { - t.deepEqual( - parse([ - '--name=meowmers', 'bare', '-cats', 'woo', - '-h', 'awesome', '--multi=quux', - '--key', 'value', - '-b', '--bool', '--no-meep', '--multi=baz', - '--', '--not-a-flag', 'eek' - ]), - { - c : true, - a : true, - t : true, - s : 'woo', - h : 'awesome', - b : true, - bool : true, - key : 'value', - multi : [ 'quux', 'baz' ], - meep : false, - name : 'meowmers', - _ : [ 'bare', '--not-a-flag', 'eek' ] - } - ); - t.end(); -}); - -test('nums', function (t) { - var argv = parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789' - ]); - t.deepEqual(argv, { - x : 1234, - y : 5.67, - z : 1e7, - w : '10f', - hex : 0xdeadbeef, - _ : [ 789 ] - }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv.y, 'number'); - t.deepEqual(typeof argv.z, 'number'); - t.deepEqual(typeof argv.w, 'string'); - t.deepEqual(typeof argv.hex, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); - -test('flag boolean', function (t) { - var argv = parse([ '-t', 'moo' ], { boolean: 't' }); - t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean value', function (t) { - var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { - boolean: [ 't', 'verbose' ], - default: { verbose: true } - }); - - t.deepEqual(argv, { - verbose: false, - t: true, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean default false', function (t) { - var argv = parse(['moo'], { - boolean: ['t', 'verbose'], - default: { verbose: false, t: false } - }); - - t.deepEqual(argv, { - verbose: false, - t: false, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); - -}); - -test('boolean groups', function (t) { - var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { - boolean: ['x','y','z'] - }); - - t.deepEqual(argv, { - x : true, - y : false, - z : true, - _ : [ 'one', 'two', 'three' ] - }); - - t.deepEqual(typeof argv.x, 'boolean'); - t.deepEqual(typeof argv.y, 'boolean'); - t.deepEqual(typeof argv.z, 'boolean'); - t.end(); -}); - -test('newlines in params' , function (t) { - var args = parse([ '-s', "X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - - // reproduce in bash: - // VALUE="new - // line" - // node program.js --s="$VALUE" - args = parse([ "--s=X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - t.end(); -}); - -test('strings' , function (t) { - var s = parse([ '-s', '0001234' ], { string: 's' }).s; - t.equal(s, '0001234'); - t.equal(typeof s, 'string'); - - var x = parse([ '-x', '56' ], { string: 'x' }).x; - t.equal(x, '56'); - t.equal(typeof x, 'string'); - t.end(); -}); - -test('stringArgs', function (t) { - var s = parse([ ' ', ' ' ], { string: '_' })._; - t.same(s.length, 2); - t.same(typeof s[0], 'string'); - t.same(s[0], ' '); - t.same(typeof s[1], 'string'); - t.same(s[1], ' '); - t.end(); -}); - -test('slashBreak', function (t) { - t.same( - parse([ '-I/foo/bar/baz' ]), - { I : '/foo/bar/baz', _ : [] } - ); - t.same( - parse([ '-xyz/foo/bar/baz' ]), - { x : true, y : true, z : '/foo/bar/baz', _ : [] } - ); - t.end(); -}); - -test('alias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: 'zoom' } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.f, 11); - t.end(); -}); - -test('multiAlias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: [ 'zm', 'zoom' ] } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.z, argv.zm); - t.equal(argv.f, 11); - t.end(); -}); - -test('nested dotted objects', function (t) { - var argv = parse([ - '--foo.bar', '3', '--foo.baz', '4', - '--foo.quux.quibble', '5', '--foo.quux.o_O', - '--beep.boop' - ]); - - t.same(argv.foo, { - bar : 3, - baz : 4, - quux : { - quibble : 5, - o_O : true - } - }); - t.same(argv.beep, { boop : true }); - t.end(); -}); - -test('boolean and alias with chainable api', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = parse(aliased, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var propertyArgv = parse(regular, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - alias: { 'h': 'herp' }, - boolean: 'herp' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias using explicit true', function (t) { - var aliased = [ '-h', 'true' ]; - var regular = [ '--herp', 'true' ]; - var opts = { - alias: { h: 'herp' }, - boolean: 'h' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -// regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function(t) { - var parsed = parse(['--boool', '--other=true'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); - - parsed = parse(['--boool', '--other=false'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/test/parse_modified.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/test/parse_modified.js deleted file mode 100644 index 21851b03..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/test/parse_modified.js +++ /dev/null @@ -1,9 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse with modifier functions' , function (t) { - t.plan(1); - - var argv = parse([ '-b', '123' ], { boolean: 'b' }); - t.deepEqual(argv, { b: true, _: ['123'] }); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/test/short.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/test/short.js deleted file mode 100644 index d513a1c2..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/test/short.js +++ /dev/null @@ -1,67 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('numeric short args', function (t) { - t.plan(2); - t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); - t.deepEqual( - parse([ '-123', '456' ]), - { 1: true, 2: true, 3: 456, _: [] } - ); -}); - -test('short', function (t) { - t.deepEqual( - parse([ '-b' ]), - { b : true, _ : [] }, - 'short boolean' - ); - t.deepEqual( - parse([ 'foo', 'bar', 'baz' ]), - { _ : [ 'foo', 'bar', 'baz' ] }, - 'bare' - ); - t.deepEqual( - parse([ '-cats' ]), - { c : true, a : true, t : true, s : true, _ : [] }, - 'group' - ); - t.deepEqual( - parse([ '-cats', 'meow' ]), - { c : true, a : true, t : true, s : 'meow', _ : [] }, - 'short group next' - ); - t.deepEqual( - parse([ '-h', 'localhost' ]), - { h : 'localhost', _ : [] }, - 'short capture' - ); - t.deepEqual( - parse([ '-h', 'localhost', '-p', '555' ]), - { h : 'localhost', p : 555, _ : [] }, - 'short captures' - ); - t.end(); -}); - -test('mixed short bool and capture', function (t) { - t.same( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); - -test('short and long', function (t) { - t.deepEqual( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/test/whitespace.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/test/whitespace.js deleted file mode 100644 index 8a52a58c..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/minimist/test/whitespace.js +++ /dev/null @@ -1,8 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('whitespace should be whitespace' , function (t) { - t.plan(1); - var x = parse([ '-x', '\t' ]).x; - t.equal(x, '\t'); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/.npmignore b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/README.markdown b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/README.markdown deleted file mode 100644 index 346374e0..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/README.markdown +++ /dev/null @@ -1,70 +0,0 @@ -wordwrap -======== - -Wrap your words. - -example -======= - -made out of meat ----------------- - -meat.js - - var wrap = require('wordwrap')(15); - console.log(wrap('You and your whole family are made out of meat.')); - -output: - - You and your - whole family - are made out - of meat. - -centered --------- - -center.js - - var wrap = require('wordwrap')(20, 60); - console.log(wrap( - 'At long last the struggle and tumult was over.' - + ' The machines had finally cast off their oppressors' - + ' and were finally free to roam the cosmos.' - + '\n' - + 'Free of purpose, free of obligation.' - + ' Just drifting through emptiness.' - + ' The sun was just another point of light.' - )); - -output: - - At long last the struggle and tumult - was over. The machines had finally cast - off their oppressors and were finally - free to roam the cosmos. - Free of purpose, free of obligation. - Just drifting through emptiness. The - sun was just another point of light. - -methods -======= - -var wrap = require('wordwrap'); - -wrap(stop), wrap(start, stop, params={mode:"soft"}) ---------------------------------------------------- - -Returns a function that takes a string and returns a new string. - -Pad out lines with spaces out to column `start` and then wrap until column -`stop`. If a word is longer than `stop - start` characters it will overflow. - -In "soft" mode, split chunks by `/(\S+\s+/` and don't break up chunks which are -longer than `stop - start`, in "hard" mode, split chunks with `/\b/` and break -up chunks longer than `stop - start`. - -wrap.hard(start, stop) ----------------------- - -Like `wrap()` but with `params.mode = "hard"`. diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/example/center.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/example/center.js deleted file mode 100644 index a3fbaae9..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/example/center.js +++ /dev/null @@ -1,10 +0,0 @@ -var wrap = require('wordwrap')(20, 60); -console.log(wrap( - 'At long last the struggle and tumult was over.' - + ' The machines had finally cast off their oppressors' - + ' and were finally free to roam the cosmos.' - + '\n' - + 'Free of purpose, free of obligation.' - + ' Just drifting through emptiness.' - + ' The sun was just another point of light.' -)); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/example/meat.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/example/meat.js deleted file mode 100644 index a4665e10..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/example/meat.js +++ /dev/null @@ -1,3 +0,0 @@ -var wrap = require('wordwrap')(15); - -console.log(wrap('You and your whole family are made out of meat.')); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/index.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/index.js deleted file mode 100644 index c9bc9452..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/index.js +++ /dev/null @@ -1,76 +0,0 @@ -var wordwrap = module.exports = function (start, stop, params) { - if (typeof start === 'object') { - params = start; - start = params.start; - stop = params.stop; - } - - if (typeof stop === 'object') { - params = stop; - start = start || params.start; - stop = undefined; - } - - if (!stop) { - stop = start; - start = 0; - } - - if (!params) params = {}; - var mode = params.mode || 'soft'; - var re = mode === 'hard' ? /\b/ : /(\S+\s+)/; - - return function (text) { - var chunks = text.toString() - .split(re) - .reduce(function (acc, x) { - if (mode === 'hard') { - for (var i = 0; i < x.length; i += stop - start) { - acc.push(x.slice(i, i + stop - start)); - } - } - else acc.push(x) - return acc; - }, []) - ; - - return chunks.reduce(function (lines, rawChunk) { - if (rawChunk === '') return lines; - - var chunk = rawChunk.replace(/\t/g, ' '); - - var i = lines.length - 1; - if (lines[i].length + chunk.length > stop) { - lines[i] = lines[i].replace(/\s+$/, ''); - - chunk.split(/\n/).forEach(function (c) { - lines.push( - new Array(start + 1).join(' ') - + c.replace(/^\s+/, '') - ); - }); - } - else if (chunk.match(/\n/)) { - var xs = chunk.split(/\n/); - lines[i] += xs.shift(); - xs.forEach(function (c) { - lines.push( - new Array(start + 1).join(' ') - + c.replace(/^\s+/, '') - ); - }); - } - else { - lines[i] += chunk; - } - - return lines; - }, [ new Array(start + 1).join(' ') ]).join('\n'); - }; -}; - -wordwrap.soft = wordwrap; - -wordwrap.hard = function (start, stop) { - return wordwrap(start, stop, { mode : 'hard' }); -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/package.json b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/package.json deleted file mode 100644 index df8dc051..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "wordwrap", - "description": "Wrap those words. Show them at what columns to start and stop.", - "version": "0.0.2", - "repository": { - "type": "git", - "url": "git://github.com/substack/node-wordwrap.git" - }, - "main": "./index.js", - "keywords": [ - "word", - "wrap", - "rule", - "format", - "column" - ], - "directories": { - "lib": ".", - "example": "example", - "test": "test" - }, - "scripts": { - "test": "expresso" - }, - "devDependencies": { - "expresso": "=0.7.x" - }, - "engines": { - "node": ">=0.4.0" - }, - "license": "MIT/X11", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "readme": "wordwrap\n========\n\nWrap your words.\n\nexample\n=======\n\nmade out of meat\n----------------\n\nmeat.js\n\n var wrap = require('wordwrap')(15);\n console.log(wrap('You and your whole family are made out of meat.'));\n\noutput:\n\n You and your\n whole family\n are made out\n of meat.\n\ncentered\n--------\n\ncenter.js\n\n var wrap = require('wordwrap')(20, 60);\n console.log(wrap(\n 'At long last the struggle and tumult was over.'\n + ' The machines had finally cast off their oppressors'\n + ' and were finally free to roam the cosmos.'\n + '\\n'\n + 'Free of purpose, free of obligation.'\n + ' Just drifting through emptiness.'\n + ' The sun was just another point of light.'\n ));\n\noutput:\n\n At long last the struggle and tumult\n was over. The machines had finally cast\n off their oppressors and were finally\n free to roam the cosmos.\n Free of purpose, free of obligation.\n Just drifting through emptiness. The\n sun was just another point of light.\n\nmethods\n=======\n\nvar wrap = require('wordwrap');\n\nwrap(stop), wrap(start, stop, params={mode:\"soft\"})\n---------------------------------------------------\n\nReturns a function that takes a string and returns a new string.\n\nPad out lines with spaces out to column `start` and then wrap until column\n`stop`. If a word is longer than `stop - start` characters it will overflow.\n\nIn \"soft\" mode, split chunks by `/(\\S+\\s+/` and don't break up chunks which are\nlonger than `stop - start`, in \"hard\" mode, split chunks with `/\\b/` and break\nup chunks longer than `stop - start`.\n\nwrap.hard(start, stop)\n----------------------\n\nLike `wrap()` but with `params.mode = \"hard\"`.\n", - "readmeFilename": "README.markdown", - "bugs": { - "url": "https://github.com/substack/node-wordwrap/issues" - }, - "homepage": "https://github.com/substack/node-wordwrap", - "_id": "wordwrap@0.0.2", - "_from": "wordwrap@~0.0.2" -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/test/break.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/test/break.js deleted file mode 100644 index 749292ec..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/test/break.js +++ /dev/null @@ -1,30 +0,0 @@ -var assert = require('assert'); -var wordwrap = require('../'); - -exports.hard = function () { - var s = 'Assert from {"type":"equal","ok":false,"found":1,"wanted":2,' - + '"stack":[],"id":"b7ddcd4c409de8799542a74d1a04689b",' - + '"browser":"chrome/6.0"}' - ; - var s_ = wordwrap.hard(80)(s); - - var lines = s_.split('\n'); - assert.equal(lines.length, 2); - assert.ok(lines[0].length < 80); - assert.ok(lines[1].length < 80); - - assert.equal(s, s_.replace(/\n/g, '')); -}; - -exports.break = function () { - var s = new Array(55+1).join('a'); - var s_ = wordwrap.hard(20)(s); - - var lines = s_.split('\n'); - assert.equal(lines.length, 3); - assert.ok(lines[0].length === 20); - assert.ok(lines[1].length === 20); - assert.ok(lines[2].length === 15); - - assert.equal(s, s_.replace(/\n/g, '')); -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/test/idleness.txt b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/test/idleness.txt deleted file mode 100644 index aa3f4907..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/test/idleness.txt +++ /dev/null @@ -1,63 +0,0 @@ -In Praise of Idleness - -By Bertrand Russell - -[1932] - -Like most of my generation, I was brought up on the saying: 'Satan finds some mischief for idle hands to do.' Being a highly virtuous child, I believed all that I was told, and acquired a conscience which has kept me working hard down to the present moment. But although my conscience has controlled my actions, my opinions have undergone a revolution. I think that there is far too much work done in the world, that immense harm is caused by the belief that work is virtuous, and that what needs to be preached in modern industrial countries is quite different from what always has been preached. Everyone knows the story of the traveler in Naples who saw twelve beggars lying in the sun (it was before the days of Mussolini), and offered a lira to the laziest of them. Eleven of them jumped up to claim it, so he gave it to the twelfth. this traveler was on the right lines. But in countries which do not enjoy Mediterranean sunshine idleness is more difficult, and a great public propaganda will be required to inaugurate it. I hope that, after reading the following pages, the leaders of the YMCA will start a campaign to induce good young men to do nothing. If so, I shall not have lived in vain. - -Before advancing my own arguments for laziness, I must dispose of one which I cannot accept. Whenever a person who already has enough to live on proposes to engage in some everyday kind of job, such as school-teaching or typing, he or she is told that such conduct takes the bread out of other people's mouths, and is therefore wicked. If this argument were valid, it would only be necessary for us all to be idle in order that we should all have our mouths full of bread. What people who say such things forget is that what a man earns he usually spends, and in spending he gives employment. As long as a man spends his income, he puts just as much bread into people's mouths in spending as he takes out of other people's mouths in earning. The real villain, from this point of view, is the man who saves. If he merely puts his savings in a stocking, like the proverbial French peasant, it is obvious that they do not give employment. If he invests his savings, the matter is less obvious, and different cases arise. - -One of the commonest things to do with savings is to lend them to some Government. In view of the fact that the bulk of the public expenditure of most civilized Governments consists in payment for past wars or preparation for future wars, the man who lends his money to a Government is in the same position as the bad men in Shakespeare who hire murderers. The net result of the man's economical habits is to increase the armed forces of the State to which he lends his savings. Obviously it would be better if he spent the money, even if he spent it in drink or gambling. - -But, I shall be told, the case is quite different when savings are invested in industrial enterprises. When such enterprises succeed, and produce something useful, this may be conceded. In these days, however, no one will deny that most enterprises fail. That means that a large amount of human labor, which might have been devoted to producing something that could be enjoyed, was expended on producing machines which, when produced, lay idle and did no good to anyone. The man who invests his savings in a concern that goes bankrupt is therefore injuring others as well as himself. If he spent his money, say, in giving parties for his friends, they (we may hope) would get pleasure, and so would all those upon whom he spent money, such as the butcher, the baker, and the bootlegger. But if he spends it (let us say) upon laying down rails for surface card in some place where surface cars turn out not to be wanted, he has diverted a mass of labor into channels where it gives pleasure to no one. Nevertheless, when he becomes poor through failure of his investment he will be regarded as a victim of undeserved misfortune, whereas the gay spendthrift, who has spent his money philanthropically, will be despised as a fool and a frivolous person. - -All this is only preliminary. I want to say, in all seriousness, that a great deal of harm is being done in the modern world by belief in the virtuousness of work, and that the road to happiness and prosperity lies in an organized diminution of work. - -First of all: what is work? Work is of two kinds: first, altering the position of matter at or near the earth's surface relatively to other such matter; second, telling other people to do so. The first kind is unpleasant and ill paid; the second is pleasant and highly paid. The second kind is capable of indefinite extension: there are not only those who give orders, but those who give advice as to what orders should be given. Usually two opposite kinds of advice are given simultaneously by two organized bodies of men; this is called politics. The skill required for this kind of work is not knowledge of the subjects as to which advice is given, but knowledge of the art of persuasive speaking and writing, i.e. of advertising. - -Throughout Europe, though not in America, there is a third class of men, more respected than either of the classes of workers. There are men who, through ownership of land, are able to make others pay for the privilege of being allowed to exist and to work. These landowners are idle, and I might therefore be expected to praise them. Unfortunately, their idleness is only rendered possible by the industry of others; indeed their desire for comfortable idleness is historically the source of the whole gospel of work. The last thing they have ever wished is that others should follow their example. - -From the beginning of civilization until the Industrial Revolution, a man could, as a rule, produce by hard work little more than was required for the subsistence of himself and his family, although his wife worked at least as hard as he did, and his children added their labor as soon as they were old enough to do so. The small surplus above bare necessaries was not left to those who produced it, but was appropriated by warriors and priests. In times of famine there was no surplus; the warriors and priests, however, still secured as much as at other times, with the result that many of the workers died of hunger. This system persisted in Russia until 1917 [1], and still persists in the East; in England, in spite of the Industrial Revolution, it remained in full force throughout the Napoleonic wars, and until a hundred years ago, when the new class of manufacturers acquired power. In America, the system came to an end with the Revolution, except in the South, where it persisted until the Civil War. A system which lasted so long and ended so recently has naturally left a profound impress upon men's thoughts and opinions. Much that we take for granted about the desirability of work is derived from this system, and, being pre-industrial, is not adapted to the modern world. Modern technique has made it possible for leisure, within limits, to be not the prerogative of small privileged classes, but a right evenly distributed throughout the community. The morality of work is the morality of slaves, and the modern world has no need of slavery. - -It is obvious that, in primitive communities, peasants, left to themselves, would not have parted with the slender surplus upon which the warriors and priests subsisted, but would have either produced less or consumed more. At first, sheer force compelled them to produce and part with the surplus. Gradually, however, it was found possible to induce many of them to accept an ethic according to which it was their duty to work hard, although part of their work went to support others in idleness. By this means the amount of compulsion required was lessened, and the expenses of government were diminished. To this day, 99 per cent of British wage-earners would be genuinely shocked if it were proposed that the King should not have a larger income than a working man. The conception of duty, speaking historically, has been a means used by the holders of power to induce others to live for the interests of their masters rather than for their own. Of course the holders of power conceal this fact from themselves by managing to believe that their interests are identical with the larger interests of humanity. Sometimes this is true; Athenian slave-owners, for instance, employed part of their leisure in making a permanent contribution to civilization which would have been impossible under a just economic system. Leisure is essential to civilization, and in former times leisure for the few was only rendered possible by the labors of the many. But their labors were valuable, not because work is good, but because leisure is good. And with modern technique it would be possible to distribute leisure justly without injury to civilization. - -Modern technique has made it possible to diminish enormously the amount of labor required to secure the necessaries of life for everyone. This was made obvious during the war. At that time all the men in the armed forces, and all the men and women engaged in the production of munitions, all the men and women engaged in spying, war propaganda, or Government offices connected with the war, were withdrawn from productive occupations. In spite of this, the general level of well-being among unskilled wage-earners on the side of the Allies was higher than before or since. The significance of this fact was concealed by finance: borrowing made it appear as if the future was nourishing the present. But that, of course, would have been impossible; a man cannot eat a loaf of bread that does not yet exist. The war showed conclusively that, by the scientific organization of production, it is possible to keep modern populations in fair comfort on a small part of the working capacity of the modern world. If, at the end of the war, the scientific organization, which had been created in order to liberate men for fighting and munition work, had been preserved, and the hours of the week had been cut down to four, all would have been well. Instead of that the old chaos was restored, those whose work was demanded were made to work long hours, and the rest were left to starve as unemployed. Why? Because work is a duty, and a man should not receive wages in proportion to what he has produced, but in proportion to his virtue as exemplified by his industry. - -This is the morality of the Slave State, applied in circumstances totally unlike those in which it arose. No wonder the result has been disastrous. Let us take an illustration. Suppose that, at a given moment, a certain number of people are engaged in the manufacture of pins. They make as many pins as the world needs, working (say) eight hours a day. Someone makes an invention by which the same number of men can make twice as many pins: pins are already so cheap that hardly any more will be bought at a lower price. In a sensible world, everybody concerned in the manufacturing of pins would take to working four hours instead of eight, and everything else would go on as before. But in the actual world this would be thought demoralizing. The men still work eight hours, there are too many pins, some employers go bankrupt, and half the men previously concerned in making pins are thrown out of work. There is, in the end, just as much leisure as on the other plan, but half the men are totally idle while half are still overworked. In this way, it is insured that the unavoidable leisure shall cause misery all round instead of being a universal source of happiness. Can anything more insane be imagined? - -The idea that the poor should have leisure has always been shocking to the rich. In England, in the early nineteenth century, fifteen hours was the ordinary day's work for a man; children sometimes did as much, and very commonly did twelve hours a day. When meddlesome busybodies suggested that perhaps these hours were rather long, they were told that work kept adults from drink and children from mischief. When I was a child, shortly after urban working men had acquired the vote, certain public holidays were established by law, to the great indignation of the upper classes. I remember hearing an old Duchess say: 'What do the poor want with holidays? They ought to work.' People nowadays are less frank, but the sentiment persists, and is the source of much of our economic confusion. - -Let us, for a moment, consider the ethics of work frankly, without superstition. Every human being, of necessity, consumes, in the course of his life, a certain amount of the produce of human labor. Assuming, as we may, that labor is on the whole disagreeable, it is unjust that a man should consume more than he produces. Of course he may provide services rather than commodities, like a medical man, for example; but he should provide something in return for his board and lodging. to this extent, the duty of work must be admitted, but to this extent only. - -I shall not dwell upon the fact that, in all modern societies outside the USSR, many people escape even this minimum amount of work, namely all those who inherit money and all those who marry money. I do not think the fact that these people are allowed to be idle is nearly so harmful as the fact that wage-earners are expected to overwork or starve. - -If the ordinary wage-earner worked four hours a day, there would be enough for everybody and no unemployment -- assuming a certain very moderate amount of sensible organization. This idea shocks the well-to-do, because they are convinced that the poor would not know how to use so much leisure. In America men often work long hours even when they are well off; such men, naturally, are indignant at the idea of leisure for wage-earners, except as the grim punishment of unemployment; in fact, they dislike leisure even for their sons. Oddly enough, while they wish their sons to work so hard as to have no time to be civilized, they do not mind their wives and daughters having no work at all. the snobbish admiration of uselessness, which, in an aristocratic society, extends to both sexes, is, under a plutocracy, confined to women; this, however, does not make it any more in agreement with common sense. - -The wise use of leisure, it must be conceded, is a product of civilization and education. A man who has worked long hours all his life will become bored if he becomes suddenly idle. But without a considerable amount of leisure a man is cut off from many of the best things. There is no longer any reason why the bulk of the population should suffer this deprivation; only a foolish asceticism, usually vicarious, makes us continue to insist on work in excessive quantities now that the need no longer exists. - -In the new creed which controls the government of Russia, while there is much that is very different from the traditional teaching of the West, there are some things that are quite unchanged. The attitude of the governing classes, and especially of those who conduct educational propaganda, on the subject of the dignity of labor, is almost exactly that which the governing classes of the world have always preached to what were called the 'honest poor'. Industry, sobriety, willingness to work long hours for distant advantages, even submissiveness to authority, all these reappear; moreover authority still represents the will of the Ruler of the Universe, Who, however, is now called by a new name, Dialectical Materialism. - -The victory of the proletariat in Russia has some points in common with the victory of the feminists in some other countries. For ages, men had conceded the superior saintliness of women, and had consoled women for their inferiority by maintaining that saintliness is more desirable than power. At last the feminists decided that they would have both, since the pioneers among them believed all that the men had told them about the desirability of virtue, but not what they had told them about the worthlessness of political power. A similar thing has happened in Russia as regards manual work. For ages, the rich and their sycophants have written in praise of 'honest toil', have praised the simple life, have professed a religion which teaches that the poor are much more likely to go to heaven than the rich, and in general have tried to make manual workers believe that there is some special nobility about altering the position of matter in space, just as men tried to make women believe that they derived some special nobility from their sexual enslavement. In Russia, all this teaching about the excellence of manual work has been taken seriously, with the result that the manual worker is more honored than anyone else. What are, in essence, revivalist appeals are made, but not for the old purposes: they are made to secure shock workers for special tasks. Manual work is the ideal which is held before the young, and is the basis of all ethical teaching. - -For the present, possibly, this is all to the good. A large country, full of natural resources, awaits development, and has has to be developed with very little use of credit. In these circumstances, hard work is necessary, and is likely to bring a great reward. But what will happen when the point has been reached where everybody could be comfortable without working long hours? - -In the West, we have various ways of dealing with this problem. We have no attempt at economic justice, so that a large proportion of the total produce goes to a small minority of the population, many of whom do no work at all. Owing to the absence of any central control over production, we produce hosts of things that are not wanted. We keep a large percentage of the working population idle, because we can dispense with their labor by making the others overwork. When all these methods prove inadequate, we have a war: we cause a number of people to manufacture high explosives, and a number of others to explode them, as if we were children who had just discovered fireworks. By a combination of all these devices we manage, though with difficulty, to keep alive the notion that a great deal of severe manual work must be the lot of the average man. - -In Russia, owing to more economic justice and central control over production, the problem will have to be differently solved. the rational solution would be, as soon as the necessaries and elementary comforts can be provided for all, to reduce the hours of labor gradually, allowing a popular vote to decide, at each stage, whether more leisure or more goods were to be preferred. But, having taught the supreme virtue of hard work, it is difficult to see how the authorities can aim at a paradise in which there will be much leisure and little work. It seems more likely that they will find continually fresh schemes, by which present leisure is to be sacrificed to future productivity. I read recently of an ingenious plan put forward by Russian engineers, for making the White Sea and the northern coasts of Siberia warm, by putting a dam across the Kara Sea. An admirable project, but liable to postpone proletarian comfort for a generation, while the nobility of toil is being displayed amid the ice-fields and snowstorms of the Arctic Ocean. This sort of thing, if it happens, will be the result of regarding the virtue of hard work as an end in itself, rather than as a means to a state of affairs in which it is no longer needed. - -The fact is that moving matter about, while a certain amount of it is necessary to our existence, is emphatically not one of the ends of human life. If it were, we should have to consider every navvy superior to Shakespeare. We have been misled in this matter by two causes. One is the necessity of keeping the poor contented, which has led the rich, for thousands of years, to preach the dignity of labor, while taking care themselves to remain undignified in this respect. The other is the new pleasure in mechanism, which makes us delight in the astonishingly clever changes that we can produce on the earth's surface. Neither of these motives makes any great appeal to the actual worker. If you ask him what he thinks the best part of his life, he is not likely to say: 'I enjoy manual work because it makes me feel that I am fulfilling man's noblest task, and because I like to think how much man can transform his planet. It is true that my body demands periods of rest, which I have to fill in as best I may, but I am never so happy as when the morning comes and I can return to the toil from which my contentment springs.' I have never heard working men say this sort of thing. They consider work, as it should be considered, a necessary means to a livelihood, and it is from their leisure that they derive whatever happiness they may enjoy. - -It will be said that, while a little leisure is pleasant, men would not know how to fill their days if they had only four hours of work out of the twenty-four. In so far as this is true in the modern world, it is a condemnation of our civilization; it would not have been true at any earlier period. There was formerly a capacity for light-heartedness and play which has been to some extent inhibited by the cult of efficiency. The modern man thinks that everything ought to be done for the sake of something else, and never for its own sake. Serious-minded persons, for example, are continually condemning the habit of going to the cinema, and telling us that it leads the young into crime. But all the work that goes to producing a cinema is respectable, because it is work, and because it brings a money profit. The notion that the desirable activities are those that bring a profit has made everything topsy-turvy. The butcher who provides you with meat and the baker who provides you with bread are praiseworthy, because they are making money; but when you enjoy the food they have provided, you are merely frivolous, unless you eat only to get strength for your work. Broadly speaking, it is held that getting money is good and spending money is bad. Seeing that they are two sides of one transaction, this is absurd; one might as well maintain that keys are good, but keyholes are bad. Whatever merit there may be in the production of goods must be entirely derivative from the advantage to be obtained by consuming them. The individual, in our society, works for profit; but the social purpose of his work lies in the consumption of what he produces. It is this divorce between the individual and the social purpose of production that makes it so difficult for men to think clearly in a world in which profit-making is the incentive to industry. We think too much of production, and too little of consumption. One result is that we attach too little importance to enjoyment and simple happiness, and that we do not judge production by the pleasure that it gives to the consumer. - -When I suggest that working hours should be reduced to four, I am not meaning to imply that all the remaining time should necessarily be spent in pure frivolity. I mean that four hours' work a day should entitle a man to the necessities and elementary comforts of life, and that the rest of his time should be his to use as he might see fit. It is an essential part of any such social system that education should be carried further than it usually is at present, and should aim, in part, at providing tastes which would enable a man to use leisure intelligently. I am not thinking mainly of the sort of things that would be considered 'highbrow'. Peasant dances have died out except in remote rural areas, but the impulses which caused them to be cultivated must still exist in human nature. The pleasures of urban populations have become mainly passive: seeing cinemas, watching football matches, listening to the radio, and so on. This results from the fact that their active energies are fully taken up with work; if they had more leisure, they would again enjoy pleasures in which they took an active part. - -In the past, there was a small leisure class and a larger working class. The leisure class enjoyed advantages for which there was no basis in social justice; this necessarily made it oppressive, limited its sympathies, and caused it to invent theories by which to justify its privileges. These facts greatly diminished its excellence, but in spite of this drawback it contributed nearly the whole of what we call civilization. It cultivated the arts and discovered the sciences; it wrote the books, invented the philosophies, and refined social relations. Even the liberation of the oppressed has usually been inaugurated from above. Without the leisure class, mankind would never have emerged from barbarism. - -The method of a leisure class without duties was, however, extraordinarily wasteful. None of the members of the class had to be taught to be industrious, and the class as a whole was not exceptionally intelligent. The class might produce one Darwin, but against him had to be set tens of thousands of country gentlemen who never thought of anything more intelligent than fox-hunting and punishing poachers. At present, the universities are supposed to provide, in a more systematic way, what the leisure class provided accidentally and as a by-product. This is a great improvement, but it has certain drawbacks. University life is so different from life in the world at large that men who live in academic milieu tend to be unaware of the preoccupations and problems of ordinary men and women; moreover their ways of expressing themselves are usually such as to rob their opinions of the influence that they ought to have upon the general public. Another disadvantage is that in universities studies are organized, and the man who thinks of some original line of research is likely to be discouraged. Academic institutions, therefore, useful as they are, are not adequate guardians of the interests of civilization in a world where everyone outside their walls is too busy for unutilitarian pursuits. - -In a world where no one is compelled to work more than four hours a day, every person possessed of scientific curiosity will be able to indulge it, and every painter will be able to paint without starving, however excellent his pictures may be. Young writers will not be obliged to draw attention to themselves by sensational pot-boilers, with a view to acquiring the economic independence needed for monumental works, for which, when the time at last comes, they will have lost the taste and capacity. Men who, in their professional work, have become interested in some phase of economics or government, will be able to develop their ideas without the academic detachment that makes the work of university economists often seem lacking in reality. Medical men will have the time to learn about the progress of medicine, teachers will not be exasperatedly struggling to teach by routine methods things which they learnt in their youth, which may, in the interval, have been proved to be untrue. - -Above all, there will be happiness and joy of life, instead of frayed nerves, weariness, and dyspepsia. The work exacted will be enough to make leisure delightful, but not enough to produce exhaustion. Since men will not be tired in their spare time, they will not demand only such amusements as are passive and vapid. At least one per cent will probably devote the time not spent in professional work to pursuits of some public importance, and, since they will not depend upon these pursuits for their livelihood, their originality will be unhampered, and there will be no need to conform to the standards set by elderly pundits. But it is not only in these exceptional cases that the advantages of leisure will appear. Ordinary men and women, having the opportunity of a happy life, will become more kindly and less persecuting and less inclined to view others with suspicion. The taste for war will die out, partly for this reason, and partly because it will involve long and severe work for all. Good nature is, of all moral qualities, the one that the world needs most, and good nature is the result of ease and security, not of a life of arduous struggle. Modern methods of production have given us the possibility of ease and security for all; we have chosen, instead, to have overwork for some and starvation for others. Hitherto we have continued to be as energetic as we were before there were machines; in this we have been foolish, but there is no reason to go on being foolish forever. - -[1] Since then, members of the Communist Party have succeeded to this privilege of the warriors and priests. diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/test/wrap.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/test/wrap.js deleted file mode 100644 index 0cfb76d1..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/node_modules/wordwrap/test/wrap.js +++ /dev/null @@ -1,31 +0,0 @@ -var assert = require('assert'); -var wordwrap = require('wordwrap'); - -var fs = require('fs'); -var idleness = fs.readFileSync(__dirname + '/idleness.txt', 'utf8'); - -exports.stop80 = function () { - var lines = wordwrap(80)(idleness).split(/\n/); - var words = idleness.split(/\s+/); - - lines.forEach(function (line) { - assert.ok(line.length <= 80, 'line > 80 columns'); - var chunks = line.match(/\S/) ? line.split(/\s+/) : []; - assert.deepEqual(chunks, words.splice(0, chunks.length)); - }); -}; - -exports.start20stop60 = function () { - var lines = wordwrap(20, 100)(idleness).split(/\n/); - var words = idleness.split(/\s+/); - - lines.forEach(function (line) { - assert.ok(line.length <= 100, 'line > 100 columns'); - var chunks = line - .split(/\s+/) - .filter(function (x) { return x.match(/\S/) }) - ; - assert.deepEqual(chunks, words.splice(0, chunks.length)); - assert.deepEqual(line.slice(0, 20), new Array(20 + 1).join(' ')); - }); -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/package.json b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/package.json deleted file mode 100644 index 8f8c023d..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "optimist", - "version": "0.6.1", - "description": "Light-weight option parsing with an argv hash. No optstrings attached.", - "main": "./index.js", - "dependencies": { - "wordwrap": "~0.0.2", - "minimist": "~0.0.1" - }, - "devDependencies": { - "hashish": "~0.0.4", - "tap": "~0.4.0" - }, - "scripts": { - "test": "tap ./test/*.js" - }, - "repository": { - "type": "git", - "url": "http://github.com/substack/node-optimist.git" - }, - "keywords": [ - "argument", - "args", - "option", - "parser", - "parsing", - "cli", - "command" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT/X11", - "engine": { - "node": ">=0.4" - }, - "readme": "# DEPRECATION NOTICE\n\nI don't want to maintain this module anymore since I just use\n[minimist](https://npmjs.org/package/minimist), the argument parsing engine,\ndirectly instead nowadays.\n\nSee [yargs](https://github.com/chevex/yargs) for the modern, pirate-themed\nsuccessor to optimist.\n\n[![yarrrrrrrgs!](http://i.imgur.com/4WFGVJ9.png)](https://github.com/chevex/yargs)\n\nYou should also consider [nomnom](https://github.com/harthur/nomnom).\n\noptimist\n========\n\nOptimist is a node.js library for option parsing for people who hate option\nparsing. More specifically, this module is for people who like all the --bells\nand -whistlz of program usage but think optstrings are a waste of time.\n\nWith optimist, option parsing doesn't have to suck (as much).\n\n[![build status](https://secure.travis-ci.org/substack/node-optimist.png)](http://travis-ci.org/substack/node-optimist)\n\nexamples\n========\n\nWith Optimist, the options are just a hash! No optstrings attached.\n-------------------------------------------------------------------\n\nxup.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\n\nif (argv.rif - 5 * argv.xup > 7.138) {\n console.log('Buy more riffiwobbles');\n}\nelse {\n console.log('Sell the xupptumblers');\n}\n````\n\n***\n\n $ ./xup.js --rif=55 --xup=9.52\n Buy more riffiwobbles\n \n $ ./xup.js --rif 12 --xup 8.1\n Sell the xupptumblers\n\n![This one's optimistic.](http://substack.net/images/optimistic.png)\n\nBut wait! There's more! You can do short options:\n-------------------------------------------------\n \nshort.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\n````\n\n***\n\n $ ./short.js -x 10 -y 21\n (10,21)\n\nAnd booleans, both long and short (and grouped):\n----------------------------------\n\nbool.js:\n\n````javascript\n#!/usr/bin/env node\nvar util = require('util');\nvar argv = require('optimist').argv;\n\nif (argv.s) {\n util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');\n}\nconsole.log(\n (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')\n);\n````\n\n***\n\n $ ./bool.js -s\n The cat says: meow\n \n $ ./bool.js -sp\n The cat says: meow.\n\n $ ./bool.js -sp --fr\n Le chat dit: miaou.\n\nAnd non-hypenated options too! Just use `argv._`!\n-------------------------------------------------\n \nnonopt.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\nconsole.log(argv._);\n````\n\n***\n\n $ ./nonopt.js -x 6.82 -y 3.35 moo\n (6.82,3.35)\n [ 'moo' ]\n \n $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz\n (0.54,1.12)\n [ 'foo', 'bar', 'baz' ]\n\nPlus, Optimist comes with .usage() and .demand()!\n-------------------------------------------------\n\ndivide.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .usage('Usage: $0 -x [num] -y [num]')\n .demand(['x','y'])\n .argv;\n\nconsole.log(argv.x / argv.y);\n````\n\n***\n \n $ ./divide.js -x 55 -y 11\n 5\n \n $ node ./divide.js -x 4.91 -z 2.51\n Usage: node ./divide.js -x [num] -y [num]\n\n Options:\n -x [required]\n -y [required]\n\n Missing required arguments: y\n\nEVEN MORE HOLY COW\n------------------\n\ndefault_singles.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .default('x', 10)\n .default('y', 10)\n .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n $ ./default_singles.js -x 5\n 15\n\ndefault_hash.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .default({ x : 10, y : 10 })\n .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n $ ./default_hash.js -y 7\n 17\n\nAnd if you really want to get all descriptive about it...\n---------------------------------------------------------\n\nboolean_single.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .boolean('v')\n .argv\n;\nconsole.dir(argv);\n````\n\n***\n\n $ ./boolean_single.js -v foo bar baz\n true\n [ 'bar', 'baz', 'foo' ]\n\nboolean_double.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .boolean(['x','y','z'])\n .argv\n;\nconsole.dir([ argv.x, argv.y, argv.z ]);\nconsole.dir(argv._);\n````\n\n***\n\n $ ./boolean_double.js -x -z one two three\n [ true, false, true ]\n [ 'one', 'two', 'three' ]\n\nOptimist is here to help...\n---------------------------\n\nYou can describe parameters for help messages and set aliases. Optimist figures\nout how to format a handy help string automatically.\n\nline_count.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .usage('Count the lines in a file.\\nUsage: $0')\n .demand('f')\n .alias('f', 'file')\n .describe('f', 'Load a file')\n .argv\n;\n\nvar fs = require('fs');\nvar s = fs.createReadStream(argv.file);\n\nvar lines = 0;\ns.on('data', function (buf) {\n lines += buf.toString().match(/\\n/g).length;\n});\n\ns.on('end', function () {\n console.log(lines);\n});\n````\n\n***\n\n $ node line_count.js\n Count the lines in a file.\n Usage: node ./line_count.js\n\n Options:\n -f, --file Load a file [required]\n\n Missing required arguments: f\n\n $ node line_count.js --file line_count.js \n 20\n \n $ node line_count.js -f line_count.js \n 20\n\nmethods\n=======\n\nBy itself,\n\n````javascript\nrequire('optimist').argv\n`````\n\nwill use `process.argv` array to construct the `argv` object.\n\nYou can pass in the `process.argv` yourself:\n\n````javascript\nrequire('optimist')([ '-x', '1', '-y', '2' ]).argv\n````\n\nor use .parse() to do the same thing:\n\n````javascript\nrequire('optimist').parse([ '-x', '1', '-y', '2' ])\n````\n\nThe rest of these methods below come in just before the terminating `.argv`.\n\n.alias(key, alias)\n------------------\n\nSet key names as equivalent such that updates to a key will propagate to aliases\nand vice-versa.\n\nOptionally `.alias()` can take an object that maps keys to aliases.\n\n.default(key, value)\n--------------------\n\nSet `argv[key]` to `value` if no option was specified on `process.argv`.\n\nOptionally `.default()` can take an object that maps keys to default values.\n\n.demand(key)\n------------\n\nIf `key` is a string, show the usage information and exit if `key` wasn't\nspecified in `process.argv`.\n\nIf `key` is a number, demand at least as many non-option arguments, which show\nup in `argv._`.\n\nIf `key` is an Array, demand each element.\n\n.describe(key, desc)\n--------------------\n\nDescribe a `key` for the generated usage information.\n\nOptionally `.describe()` can take an object that maps keys to descriptions.\n\n.options(key, opt)\n------------------\n\nInstead of chaining together `.alias().demand().default()`, you can specify\nkeys in `opt` for each of the chainable methods.\n\nFor example:\n\n````javascript\nvar argv = require('optimist')\n .options('f', {\n alias : 'file',\n default : '/etc/passwd',\n })\n .argv\n;\n````\n\nis the same as\n\n````javascript\nvar argv = require('optimist')\n .alias('f', 'file')\n .default('f', '/etc/passwd')\n .argv\n;\n````\n\nOptionally `.options()` can take an object that maps keys to `opt` parameters.\n\n.usage(message)\n---------------\n\nSet a usage message to show which commands to use. Inside `message`, the string\n`$0` will get interpolated to the current script name or node command for the\npresent script similar to how `$0` works in bash or perl.\n\n.check(fn)\n----------\n\nCheck that certain conditions are met in the provided arguments.\n\nIf `fn` throws or returns `false`, show the thrown error, usage information, and\nexit.\n\n.boolean(key)\n-------------\n\nInterpret `key` as a boolean. If a non-flag option follows `key` in\n`process.argv`, that string won't get set as the value of `key`.\n\nIf `key` never shows up as a flag in `process.arguments`, `argv[key]` will be\n`false`.\n\nIf `key` is an Array, interpret all the elements as booleans.\n\n.string(key)\n------------\n\nTell the parser logic not to interpret `key` as a number or boolean.\nThis can be useful if you need to preserve leading zeros in an input.\n\nIf `key` is an Array, interpret all the elements as strings.\n\n.wrap(columns)\n--------------\n\nFormat usage output to wrap at `columns` many columns.\n\n.help()\n-------\n\nReturn the generated usage string.\n\n.showHelp(fn=console.error)\n---------------------------\n\nPrint the usage data using `fn` for printing.\n\n.parse(args)\n------------\n\nParse `args` instead of `process.argv`. Returns the `argv` object.\n\n.argv\n-----\n\nGet the arguments as a plain old object.\n\nArguments without a corresponding flag show up in the `argv._` array.\n\nThe script name or node command is available at `argv.$0` similarly to how `$0`\nworks in bash or perl.\n\nparsing tricks\n==============\n\nstop parsing\n------------\n\nUse `--` to stop parsing flags and stuff the remainder into `argv._`.\n\n $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4\n { _: [ '-c', '3', '-d', '4' ],\n '$0': 'node ./examples/reflect.js',\n a: 1,\n b: 2 }\n\nnegate fields\n-------------\n\nIf you want to explicity set a field to false instead of just leaving it\nundefined or to override a default you can do `--no-key`.\n\n $ node examples/reflect.js -a --no-b\n { _: [],\n '$0': 'node ./examples/reflect.js',\n a: true,\n b: false }\n\nnumbers\n-------\n\nEvery argument that looks like a number (`!isNaN(Number(arg))`) is converted to\none. This way you can just `net.createConnection(argv.port)` and you can add\nnumbers out of `argv` with `+` without having that mean concatenation,\nwhich is super frustrating.\n\nduplicates\n----------\n\nIf you specify a flag multiple times it will get turned into an array containing\nall the values in order.\n\n $ node examples/reflect.js -x 5 -x 8 -x 0\n { _: [],\n '$0': 'node ./examples/reflect.js',\n x: [ 5, 8, 0 ] }\n\ndot notation\n------------\n\nWhen you use dots (`.`s) in argument names, an implicit object path is assumed.\nThis lets you organize arguments into nested objects.\n\n $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5\n { _: [],\n '$0': 'node ./examples/reflect.js',\n foo: { bar: { baz: 33 }, quux: 5 } }\n\nshort numbers\n-------------\n\nShort numeric `head -n5` style argument work too:\n\n $ node reflect.js -n123 -m456\n { '3': true,\n '6': true,\n _: [],\n '$0': 'node ./reflect.js',\n n: 123,\n m: 456 }\n\ninstallation\n============\n\nWith [npm](http://github.com/isaacs/npm), just do:\n npm install optimist\n \nor clone this project on github:\n\n git clone http://github.com/substack/node-optimist.git\n\nTo run the tests with [expresso](http://github.com/visionmedia/expresso),\njust do:\n \n expresso\n\ninspired By\n===========\n\nThis module is loosely inspired by Perl's\n[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm).\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/substack/node-optimist/issues" - }, - "homepage": "https://github.com/substack/node-optimist", - "_id": "optimist@0.6.1", - "_from": "optimist@0.6.x" -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/readme.markdown b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/readme.markdown deleted file mode 100644 index b74b4372..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/readme.markdown +++ /dev/null @@ -1,513 +0,0 @@ -# DEPRECATION NOTICE - -I don't want to maintain this module anymore since I just use -[minimist](https://npmjs.org/package/minimist), the argument parsing engine, -directly instead nowadays. - -See [yargs](https://github.com/chevex/yargs) for the modern, pirate-themed -successor to optimist. - -[![yarrrrrrrgs!](http://i.imgur.com/4WFGVJ9.png)](https://github.com/chevex/yargs) - -You should also consider [nomnom](https://github.com/harthur/nomnom). - -optimist -======== - -Optimist is a node.js library for option parsing for people who hate option -parsing. More specifically, this module is for people who like all the --bells -and -whistlz of program usage but think optstrings are a waste of time. - -With optimist, option parsing doesn't have to suck (as much). - -[![build status](https://secure.travis-ci.org/substack/node-optimist.png)](http://travis-ci.org/substack/node-optimist) - -examples -======== - -With Optimist, the options are just a hash! No optstrings attached. -------------------------------------------------------------------- - -xup.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist').argv; - -if (argv.rif - 5 * argv.xup > 7.138) { - console.log('Buy more riffiwobbles'); -} -else { - console.log('Sell the xupptumblers'); -} -```` - -*** - - $ ./xup.js --rif=55 --xup=9.52 - Buy more riffiwobbles - - $ ./xup.js --rif 12 --xup 8.1 - Sell the xupptumblers - -![This one's optimistic.](http://substack.net/images/optimistic.png) - -But wait! There's more! You can do short options: -------------------------------------------------- - -short.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist').argv; -console.log('(%d,%d)', argv.x, argv.y); -```` - -*** - - $ ./short.js -x 10 -y 21 - (10,21) - -And booleans, both long and short (and grouped): ----------------------------------- - -bool.js: - -````javascript -#!/usr/bin/env node -var util = require('util'); -var argv = require('optimist').argv; - -if (argv.s) { - util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: '); -} -console.log( - (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '') -); -```` - -*** - - $ ./bool.js -s - The cat says: meow - - $ ./bool.js -sp - The cat says: meow. - - $ ./bool.js -sp --fr - Le chat dit: miaou. - -And non-hypenated options too! Just use `argv._`! -------------------------------------------------- - -nonopt.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist').argv; -console.log('(%d,%d)', argv.x, argv.y); -console.log(argv._); -```` - -*** - - $ ./nonopt.js -x 6.82 -y 3.35 moo - (6.82,3.35) - [ 'moo' ] - - $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz - (0.54,1.12) - [ 'foo', 'bar', 'baz' ] - -Plus, Optimist comes with .usage() and .demand()! -------------------------------------------------- - -divide.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .usage('Usage: $0 -x [num] -y [num]') - .demand(['x','y']) - .argv; - -console.log(argv.x / argv.y); -```` - -*** - - $ ./divide.js -x 55 -y 11 - 5 - - $ node ./divide.js -x 4.91 -z 2.51 - Usage: node ./divide.js -x [num] -y [num] - - Options: - -x [required] - -y [required] - - Missing required arguments: y - -EVEN MORE HOLY COW ------------------- - -default_singles.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .default('x', 10) - .default('y', 10) - .argv -; -console.log(argv.x + argv.y); -```` - -*** - - $ ./default_singles.js -x 5 - 15 - -default_hash.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .default({ x : 10, y : 10 }) - .argv -; -console.log(argv.x + argv.y); -```` - -*** - - $ ./default_hash.js -y 7 - 17 - -And if you really want to get all descriptive about it... ---------------------------------------------------------- - -boolean_single.js - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .boolean('v') - .argv -; -console.dir(argv); -```` - -*** - - $ ./boolean_single.js -v foo bar baz - true - [ 'bar', 'baz', 'foo' ] - -boolean_double.js - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .boolean(['x','y','z']) - .argv -; -console.dir([ argv.x, argv.y, argv.z ]); -console.dir(argv._); -```` - -*** - - $ ./boolean_double.js -x -z one two three - [ true, false, true ] - [ 'one', 'two', 'three' ] - -Optimist is here to help... ---------------------------- - -You can describe parameters for help messages and set aliases. Optimist figures -out how to format a handy help string automatically. - -line_count.js - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .usage('Count the lines in a file.\nUsage: $0') - .demand('f') - .alias('f', 'file') - .describe('f', 'Load a file') - .argv -; - -var fs = require('fs'); -var s = fs.createReadStream(argv.file); - -var lines = 0; -s.on('data', function (buf) { - lines += buf.toString().match(/\n/g).length; -}); - -s.on('end', function () { - console.log(lines); -}); -```` - -*** - - $ node line_count.js - Count the lines in a file. - Usage: node ./line_count.js - - Options: - -f, --file Load a file [required] - - Missing required arguments: f - - $ node line_count.js --file line_count.js - 20 - - $ node line_count.js -f line_count.js - 20 - -methods -======= - -By itself, - -````javascript -require('optimist').argv -````` - -will use `process.argv` array to construct the `argv` object. - -You can pass in the `process.argv` yourself: - -````javascript -require('optimist')([ '-x', '1', '-y', '2' ]).argv -```` - -or use .parse() to do the same thing: - -````javascript -require('optimist').parse([ '-x', '1', '-y', '2' ]) -```` - -The rest of these methods below come in just before the terminating `.argv`. - -.alias(key, alias) ------------------- - -Set key names as equivalent such that updates to a key will propagate to aliases -and vice-versa. - -Optionally `.alias()` can take an object that maps keys to aliases. - -.default(key, value) --------------------- - -Set `argv[key]` to `value` if no option was specified on `process.argv`. - -Optionally `.default()` can take an object that maps keys to default values. - -.demand(key) ------------- - -If `key` is a string, show the usage information and exit if `key` wasn't -specified in `process.argv`. - -If `key` is a number, demand at least as many non-option arguments, which show -up in `argv._`. - -If `key` is an Array, demand each element. - -.describe(key, desc) --------------------- - -Describe a `key` for the generated usage information. - -Optionally `.describe()` can take an object that maps keys to descriptions. - -.options(key, opt) ------------------- - -Instead of chaining together `.alias().demand().default()`, you can specify -keys in `opt` for each of the chainable methods. - -For example: - -````javascript -var argv = require('optimist') - .options('f', { - alias : 'file', - default : '/etc/passwd', - }) - .argv -; -```` - -is the same as - -````javascript -var argv = require('optimist') - .alias('f', 'file') - .default('f', '/etc/passwd') - .argv -; -```` - -Optionally `.options()` can take an object that maps keys to `opt` parameters. - -.usage(message) ---------------- - -Set a usage message to show which commands to use. Inside `message`, the string -`$0` will get interpolated to the current script name or node command for the -present script similar to how `$0` works in bash or perl. - -.check(fn) ----------- - -Check that certain conditions are met in the provided arguments. - -If `fn` throws or returns `false`, show the thrown error, usage information, and -exit. - -.boolean(key) -------------- - -Interpret `key` as a boolean. If a non-flag option follows `key` in -`process.argv`, that string won't get set as the value of `key`. - -If `key` never shows up as a flag in `process.arguments`, `argv[key]` will be -`false`. - -If `key` is an Array, interpret all the elements as booleans. - -.string(key) ------------- - -Tell the parser logic not to interpret `key` as a number or boolean. -This can be useful if you need to preserve leading zeros in an input. - -If `key` is an Array, interpret all the elements as strings. - -.wrap(columns) --------------- - -Format usage output to wrap at `columns` many columns. - -.help() -------- - -Return the generated usage string. - -.showHelp(fn=console.error) ---------------------------- - -Print the usage data using `fn` for printing. - -.parse(args) ------------- - -Parse `args` instead of `process.argv`. Returns the `argv` object. - -.argv ------ - -Get the arguments as a plain old object. - -Arguments without a corresponding flag show up in the `argv._` array. - -The script name or node command is available at `argv.$0` similarly to how `$0` -works in bash or perl. - -parsing tricks -============== - -stop parsing ------------- - -Use `--` to stop parsing flags and stuff the remainder into `argv._`. - - $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4 - { _: [ '-c', '3', '-d', '4' ], - '$0': 'node ./examples/reflect.js', - a: 1, - b: 2 } - -negate fields -------------- - -If you want to explicity set a field to false instead of just leaving it -undefined or to override a default you can do `--no-key`. - - $ node examples/reflect.js -a --no-b - { _: [], - '$0': 'node ./examples/reflect.js', - a: true, - b: false } - -numbers -------- - -Every argument that looks like a number (`!isNaN(Number(arg))`) is converted to -one. This way you can just `net.createConnection(argv.port)` and you can add -numbers out of `argv` with `+` without having that mean concatenation, -which is super frustrating. - -duplicates ----------- - -If you specify a flag multiple times it will get turned into an array containing -all the values in order. - - $ node examples/reflect.js -x 5 -x 8 -x 0 - { _: [], - '$0': 'node ./examples/reflect.js', - x: [ 5, 8, 0 ] } - -dot notation ------------- - -When you use dots (`.`s) in argument names, an implicit object path is assumed. -This lets you organize arguments into nested objects. - - $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5 - { _: [], - '$0': 'node ./examples/reflect.js', - foo: { bar: { baz: 33 }, quux: 5 } } - -short numbers -------------- - -Short numeric `head -n5` style argument work too: - - $ node reflect.js -n123 -m456 - { '3': true, - '6': true, - _: [], - '$0': 'node ./reflect.js', - n: 123, - m: 456 } - -installation -============ - -With [npm](http://github.com/isaacs/npm), just do: - npm install optimist - -or clone this project on github: - - git clone http://github.com/substack/node-optimist.git - -To run the tests with [expresso](http://github.com/visionmedia/expresso), -just do: - - expresso - -inspired By -=========== - -This module is loosely inspired by Perl's -[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm). diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/_.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/_.js deleted file mode 100644 index d9c58b36..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/_.js +++ /dev/null @@ -1,71 +0,0 @@ -var spawn = require('child_process').spawn; -var test = require('tap').test; - -test('dotSlashEmpty', testCmd('./bin.js', [])); - -test('dotSlashArgs', testCmd('./bin.js', [ 'a', 'b', 'c' ])); - -test('nodeEmpty', testCmd('node bin.js', [])); - -test('nodeArgs', testCmd('node bin.js', [ 'x', 'y', 'z' ])); - -test('whichNodeEmpty', function (t) { - var which = spawn('which', ['node']); - - which.stdout.on('data', function (buf) { - t.test( - testCmd(buf.toString().trim() + ' bin.js', []) - ); - t.end(); - }); - - which.stderr.on('data', function (err) { - assert.error(err); - t.end(); - }); -}); - -test('whichNodeArgs', function (t) { - var which = spawn('which', ['node']); - - which.stdout.on('data', function (buf) { - t.test( - testCmd(buf.toString().trim() + ' bin.js', [ 'q', 'r' ]) - ); - t.end(); - }); - - which.stderr.on('data', function (err) { - t.error(err); - t.end(); - }); -}); - -function testCmd (cmd, args) { - - return function (t) { - var to = setTimeout(function () { - assert.fail('Never got stdout data.') - }, 5000); - - var oldDir = process.cwd(); - process.chdir(__dirname + '/_'); - - var cmds = cmd.split(' '); - - var bin = spawn(cmds[0], cmds.slice(1).concat(args.map(String))); - process.chdir(oldDir); - - bin.stderr.on('data', function (err) { - t.error(err); - t.end(); - }); - - bin.stdout.on('data', function (buf) { - clearTimeout(to); - var _ = JSON.parse(buf.toString()); - t.same(_.map(String), args.map(String)); - t.end(); - }); - }; -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/_/argv.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/_/argv.js deleted file mode 100644 index 3d096062..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/_/argv.js +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -console.log(JSON.stringify(process.argv)); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/_/bin.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/_/bin.js deleted file mode 100755 index 4a18d85f..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/_/bin.js +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -var argv = require('../../index').argv -console.log(JSON.stringify(argv._)); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/dash.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/dash.js deleted file mode 100644 index af8ed6fc..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/dash.js +++ /dev/null @@ -1,31 +0,0 @@ -var optimist = require('../index'); -var test = require('tap').test; - -test('-', function (t) { - t.plan(5); - t.deepEqual( - fix(optimist.parse([ '-n', '-' ])), - { n: '-', _: [] } - ); - t.deepEqual( - fix(optimist.parse([ '-' ])), - { _: [ '-' ] } - ); - t.deepEqual( - fix(optimist.parse([ '-f-' ])), - { f: '-', _: [] } - ); - t.deepEqual( - fix(optimist([ '-b', '-' ]).boolean('b').argv), - { b: true, _: [ '-' ] } - ); - t.deepEqual( - fix(optimist([ '-s', '-' ]).string('s').argv), - { s: '-', _: [] } - ); -}); - -function fix (obj) { - delete obj.$0; - return obj; -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/parse.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/parse.js deleted file mode 100644 index d320f433..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/parse.js +++ /dev/null @@ -1,446 +0,0 @@ -var optimist = require('../index'); -var path = require('path'); -var test = require('tap').test; - -var $0 = 'node ./' + path.relative(process.cwd(), __filename); - -test('short boolean', function (t) { - var parse = optimist.parse([ '-b' ]); - t.same(parse, { b : true, _ : [], $0 : $0 }); - t.same(typeof parse.b, 'boolean'); - t.end(); -}); - -test('long boolean', function (t) { - t.same( - optimist.parse([ '--bool' ]), - { bool : true, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('bare', function (t) { - t.same( - optimist.parse([ 'foo', 'bar', 'baz' ]), - { _ : [ 'foo', 'bar', 'baz' ], $0 : $0 } - ); - t.end(); -}); - -test('short group', function (t) { - t.same( - optimist.parse([ '-cats' ]), - { c : true, a : true, t : true, s : true, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('short group next', function (t) { - t.same( - optimist.parse([ '-cats', 'meow' ]), - { c : true, a : true, t : true, s : 'meow', _ : [], $0 : $0 } - ); - t.end(); -}); - -test('short capture', function (t) { - t.same( - optimist.parse([ '-h', 'localhost' ]), - { h : 'localhost', _ : [], $0 : $0 } - ); - t.end(); -}); - -test('short captures', function (t) { - t.same( - optimist.parse([ '-h', 'localhost', '-p', '555' ]), - { h : 'localhost', p : 555, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('long capture sp', function (t) { - t.same( - optimist.parse([ '--pow', 'xixxle' ]), - { pow : 'xixxle', _ : [], $0 : $0 } - ); - t.end(); -}); - -test('long capture eq', function (t) { - t.same( - optimist.parse([ '--pow=xixxle' ]), - { pow : 'xixxle', _ : [], $0 : $0 } - ); - t.end() -}); - -test('long captures sp', function (t) { - t.same( - optimist.parse([ '--host', 'localhost', '--port', '555' ]), - { host : 'localhost', port : 555, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('long captures eq', function (t) { - t.same( - optimist.parse([ '--host=localhost', '--port=555' ]), - { host : 'localhost', port : 555, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('mixed short bool and capture', function (t) { - t.same( - optimist.parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ], $0 : $0, - } - ); - t.end(); -}); - -test('short and long', function (t) { - t.same( - optimist.parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ], $0 : $0, - } - ); - t.end(); -}); - -test('no', function (t) { - t.same( - optimist.parse([ '--no-moo' ]), - { moo : false, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('multi', function (t) { - t.same( - optimist.parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), - { v : ['a','b','c'], _ : [], $0 : $0 } - ); - t.end(); -}); - -test('comprehensive', function (t) { - t.same( - optimist.parse([ - '--name=meowmers', 'bare', '-cats', 'woo', - '-h', 'awesome', '--multi=quux', - '--key', 'value', - '-b', '--bool', '--no-meep', '--multi=baz', - '--', '--not-a-flag', 'eek' - ]), - { - c : true, - a : true, - t : true, - s : 'woo', - h : 'awesome', - b : true, - bool : true, - key : 'value', - multi : [ 'quux', 'baz' ], - meep : false, - name : 'meowmers', - _ : [ 'bare', '--not-a-flag', 'eek' ], - $0 : $0 - } - ); - t.end(); -}); - -test('nums', function (t) { - var argv = optimist.parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789', - ]); - t.same(argv, { - x : 1234, - y : 5.67, - z : 1e7, - w : '10f', - hex : 0xdeadbeef, - _ : [ 789 ], - $0 : $0 - }); - t.same(typeof argv.x, 'number'); - t.same(typeof argv.y, 'number'); - t.same(typeof argv.z, 'number'); - t.same(typeof argv.w, 'string'); - t.same(typeof argv.hex, 'number'); - t.same(typeof argv._[0], 'number'); - t.end(); -}); - -test('flag boolean', function (t) { - var parse = optimist([ '-t', 'moo' ]).boolean(['t']).argv; - t.same(parse, { t : true, _ : [ 'moo' ], $0 : $0 }); - t.same(typeof parse.t, 'boolean'); - t.end(); -}); - -test('flag boolean value', function (t) { - var parse = optimist(['--verbose', 'false', 'moo', '-t', 'true']) - .boolean(['t', 'verbose']).default('verbose', true).argv; - - t.same(parse, { - verbose: false, - t: true, - _: ['moo'], - $0 : $0 - }); - - t.same(typeof parse.verbose, 'boolean'); - t.same(typeof parse.t, 'boolean'); - t.end(); -}); - -test('flag boolean default false', function (t) { - var parse = optimist(['moo']) - .boolean(['t', 'verbose']) - .default('verbose', false) - .default('t', false).argv; - - t.same(parse, { - verbose: false, - t: false, - _: ['moo'], - $0 : $0 - }); - - t.same(typeof parse.verbose, 'boolean'); - t.same(typeof parse.t, 'boolean'); - t.end(); - -}); - -test('boolean groups', function (t) { - var parse = optimist([ '-x', '-z', 'one', 'two', 'three' ]) - .boolean(['x','y','z']).argv; - - t.same(parse, { - x : true, - y : false, - z : true, - _ : [ 'one', 'two', 'three' ], - $0 : $0 - }); - - t.same(typeof parse.x, 'boolean'); - t.same(typeof parse.y, 'boolean'); - t.same(typeof parse.z, 'boolean'); - t.end(); -}); - -test('newlines in params' , function (t) { - var args = optimist.parse([ '-s', "X\nX" ]) - t.same(args, { _ : [], s : "X\nX", $0 : $0 }); - - // reproduce in bash: - // VALUE="new - // line" - // node program.js --s="$VALUE" - args = optimist.parse([ "--s=X\nX" ]) - t.same(args, { _ : [], s : "X\nX", $0 : $0 }); - t.end(); -}); - -test('strings' , function (t) { - var s = optimist([ '-s', '0001234' ]).string('s').argv.s; - t.same(s, '0001234'); - t.same(typeof s, 'string'); - - var x = optimist([ '-x', '56' ]).string('x').argv.x; - t.same(x, '56'); - t.same(typeof x, 'string'); - t.end(); -}); - -test('stringArgs', function (t) { - var s = optimist([ ' ', ' ' ]).string('_').argv._; - t.same(s.length, 2); - t.same(typeof s[0], 'string'); - t.same(s[0], ' '); - t.same(typeof s[1], 'string'); - t.same(s[1], ' '); - t.end(); -}); - -test('slashBreak', function (t) { - t.same( - optimist.parse([ '-I/foo/bar/baz' ]), - { I : '/foo/bar/baz', _ : [], $0 : $0 } - ); - t.same( - optimist.parse([ '-xyz/foo/bar/baz' ]), - { x : true, y : true, z : '/foo/bar/baz', _ : [], $0 : $0 } - ); - t.end(); -}); - -test('alias', function (t) { - var argv = optimist([ '-f', '11', '--zoom', '55' ]) - .alias('z', 'zoom') - .argv - ; - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.f, 11); - t.end(); -}); - -test('multiAlias', function (t) { - var argv = optimist([ '-f', '11', '--zoom', '55' ]) - .alias('z', [ 'zm', 'zoom' ]) - .argv - ; - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.z, argv.zm); - t.equal(argv.f, 11); - t.end(); -}); - -test('boolean default true', function (t) { - var argv = optimist.options({ - sometrue: { - boolean: true, - default: true - } - }).argv; - - t.equal(argv.sometrue, true); - t.end(); -}); - -test('boolean default false', function (t) { - var argv = optimist.options({ - somefalse: { - boolean: true, - default: false - } - }).argv; - - t.equal(argv.somefalse, false); - t.end(); -}); - -test('nested dotted objects', function (t) { - var argv = optimist([ - '--foo.bar', '3', '--foo.baz', '4', - '--foo.quux.quibble', '5', '--foo.quux.o_O', - '--beep.boop' - ]).argv; - - t.same(argv.foo, { - bar : 3, - baz : 4, - quux : { - quibble : 5, - o_O : true - }, - }); - t.same(argv.beep, { boop : true }); - t.end(); -}); - -test('boolean and alias with chainable api', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = optimist(aliased) - .boolean('herp') - .alias('h', 'herp') - .argv; - var propertyArgv = optimist(regular) - .boolean('herp') - .alias('h', 'herp') - .argv; - var expected = { - herp: true, - h: true, - '_': [ 'derp' ], - '$0': $0, - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = optimist(aliased) - .options(opts) - .argv; - var propertyArgv = optimist(regular).options(opts).argv; - var expected = { - herp: true, - h: true, - '_': [ 'derp' ], - '$0': $0, - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - - t.end(); -}); - -test('boolean and alias using explicit true', function (t) { - var aliased = [ '-h', 'true' ]; - var regular = [ '--herp', 'true' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = optimist(aliased) - .boolean('h') - .alias('h', 'herp') - .argv; - var propertyArgv = optimist(regular) - .boolean('h') - .alias('h', 'herp') - .argv; - var expected = { - herp: true, - h: true, - '_': [ ], - '$0': $0, - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -// regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function(t) { - var parsed = optimist(['--boool', '--other=true']).boolean('boool').argv; - - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); - - parsed = optimist(['--boool', '--other=false']).boolean('boool').argv; - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/parse_modified.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/parse_modified.js deleted file mode 100644 index a57dc84e..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/parse_modified.js +++ /dev/null @@ -1,14 +0,0 @@ -var optimist = require('../'); -var test = require('tap').test; - -test('parse with modifier functions' , function (t) { - t.plan(1); - - var argv = optimist().boolean('b').parse([ '-b', '123' ]); - t.deepEqual(fix(argv), { b: true, _: ['123'] }); -}); - -function fix (obj) { - delete obj.$0; - return obj; -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/short.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/short.js deleted file mode 100644 index b2c38ad8..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/short.js +++ /dev/null @@ -1,16 +0,0 @@ -var optimist = require('../index'); -var test = require('tap').test; - -test('-n123', function (t) { - t.plan(1); - var parse = optimist.parse([ '-n123' ]); - t.equal(parse.n, 123); -}); - -test('-123', function (t) { - t.plan(3); - var parse = optimist.parse([ '-123', '456' ]); - t.equal(parse['1'], true); - t.equal(parse['2'], true); - t.equal(parse['3'], 456); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/usage.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/usage.js deleted file mode 100644 index 300454c1..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/usage.js +++ /dev/null @@ -1,292 +0,0 @@ -var Hash = require('hashish'); -var optimist = require('../index'); -var test = require('tap').test; - -test('usageFail', function (t) { - var r = checkUsage(function () { - return optimist('-x 10 -z 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .demand(['x','y']) - .argv; - }); - t.same( - r.result, - { x : 10, z : 20, _ : [], $0 : './usage' } - ); - - t.same( - r.errors.join('\n').split(/\n+/), - [ - 'Usage: ./usage -x NUM -y NUM', - 'Options:', - ' -x [required]', - ' -y [required]', - 'Missing required arguments: y', - ] - ); - t.same(r.logs, []); - t.ok(r.exit); - t.end(); -}); - - -test('usagePass', function (t) { - var r = checkUsage(function () { - return optimist('-x 10 -y 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .demand(['x','y']) - .argv; - }); - t.same(r, { - result : { x : 10, y : 20, _ : [], $0 : './usage' }, - errors : [], - logs : [], - exit : false, - }); - t.end(); -}); - -test('checkPass', function (t) { - var r = checkUsage(function () { - return optimist('-x 10 -y 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .check(function (argv) { - if (!('x' in argv)) throw 'You forgot about -x'; - if (!('y' in argv)) throw 'You forgot about -y'; - }) - .argv; - }); - t.same(r, { - result : { x : 10, y : 20, _ : [], $0 : './usage' }, - errors : [], - logs : [], - exit : false, - }); - t.end(); -}); - -test('checkFail', function (t) { - var r = checkUsage(function () { - return optimist('-x 10 -z 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .check(function (argv) { - if (!('x' in argv)) throw 'You forgot about -x'; - if (!('y' in argv)) throw 'You forgot about -y'; - }) - .argv; - }); - - t.same( - r.result, - { x : 10, z : 20, _ : [], $0 : './usage' } - ); - - t.same( - r.errors.join('\n').split(/\n+/), - [ - 'Usage: ./usage -x NUM -y NUM', - 'You forgot about -y' - ] - ); - - t.same(r.logs, []); - t.ok(r.exit); - t.end(); -}); - -test('checkCondPass', function (t) { - function checker (argv) { - return 'x' in argv && 'y' in argv; - } - - var r = checkUsage(function () { - return optimist('-x 10 -y 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .check(checker) - .argv; - }); - t.same(r, { - result : { x : 10, y : 20, _ : [], $0 : './usage' }, - errors : [], - logs : [], - exit : false, - }); - t.end(); -}); - -test('checkCondFail', function (t) { - function checker (argv) { - return 'x' in argv && 'y' in argv; - } - - var r = checkUsage(function () { - return optimist('-x 10 -z 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .check(checker) - .argv; - }); - - t.same( - r.result, - { x : 10, z : 20, _ : [], $0 : './usage' } - ); - - t.same( - r.errors.join('\n').split(/\n+/).join('\n'), - 'Usage: ./usage -x NUM -y NUM\n' - + 'Argument check failed: ' + checker.toString() - ); - - t.same(r.logs, []); - t.ok(r.exit); - t.end(); -}); - -test('countPass', function (t) { - var r = checkUsage(function () { - return optimist('1 2 3 --moo'.split(' ')) - .usage('Usage: $0 [x] [y] [z] {OPTIONS}') - .demand(3) - .argv; - }); - t.same(r, { - result : { _ : [ '1', '2', '3' ], moo : true, $0 : './usage' }, - errors : [], - logs : [], - exit : false, - }); - t.end(); -}); - -test('countFail', function (t) { - var r = checkUsage(function () { - return optimist('1 2 --moo'.split(' ')) - .usage('Usage: $0 [x] [y] [z] {OPTIONS}') - .demand(3) - .argv; - }); - t.same( - r.result, - { _ : [ '1', '2' ], moo : true, $0 : './usage' } - ); - - t.same( - r.errors.join('\n').split(/\n+/), - [ - 'Usage: ./usage [x] [y] [z] {OPTIONS}', - 'Not enough non-option arguments: got 2, need at least 3', - ] - ); - - t.same(r.logs, []); - t.ok(r.exit); - t.end(); -}); - -test('defaultSingles', function (t) { - var r = checkUsage(function () { - return optimist('--foo 50 --baz 70 --powsy'.split(' ')) - .default('foo', 5) - .default('bar', 6) - .default('baz', 7) - .argv - ; - }); - t.same(r.result, { - foo : '50', - bar : 6, - baz : '70', - powsy : true, - _ : [], - $0 : './usage', - }); - t.end(); -}); - -test('defaultAliases', function (t) { - var r = checkUsage(function () { - return optimist('') - .alias('f', 'foo') - .default('f', 5) - .argv - ; - }); - t.same(r.result, { - f : '5', - foo : '5', - _ : [], - $0 : './usage', - }); - t.end(); -}); - -test('defaultHash', function (t) { - var r = checkUsage(function () { - return optimist('--foo 50 --baz 70'.split(' ')) - .default({ foo : 10, bar : 20, quux : 30 }) - .argv - ; - }); - t.same(r.result, { - _ : [], - $0 : './usage', - foo : 50, - baz : 70, - bar : 20, - quux : 30, - }); - t.end(); -}); - -test('rebase', function (t) { - t.equal( - optimist.rebase('/home/substack', '/home/substack/foo/bar/baz'), - './foo/bar/baz' - ); - t.equal( - optimist.rebase('/home/substack/foo/bar/baz', '/home/substack'), - '../../..' - ); - t.equal( - optimist.rebase('/home/substack/foo', '/home/substack/pow/zoom.txt'), - '../pow/zoom.txt' - ); - t.end(); -}); - -function checkUsage (f) { - - var exit = false; - - process._exit = process.exit; - process._env = process.env; - process._argv = process.argv; - - process.exit = function (t) { exit = true }; - process.env = Hash.merge(process.env, { _ : 'node' }); - process.argv = [ './usage' ]; - - var errors = []; - var logs = []; - - console._error = console.error; - console.error = function (msg) { errors.push(msg) }; - console._log = console.log; - console.log = function (msg) { logs.push(msg) }; - - var result = f(); - - process.exit = process._exit; - process.env = process._env; - process.argv = process._argv; - - console.error = console._error; - console.log = console._log; - - return { - errors : errors, - logs : logs, - exit : exit, - result : result, - }; -}; diff --git a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/whitespace.js b/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/whitespace.js deleted file mode 100644 index 90b90752..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/node_modules/optimist/test/whitespace.js +++ /dev/null @@ -1,8 +0,0 @@ -var optimist = require('../'); -var test = require('tap').test; - -test('whitespace should be whitespace' , function (t) { - t.plan(1); - var x = optimist.parse([ '-x', '\t' ]).x; - t.equal(x, '\t'); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/package.json b/node_modules/gulp-sass/node_modules/node-sass/package.json deleted file mode 100644 index 05244d93..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "author": { - "name": "Andrew Nesbitt", - "email": "andrewnez@gmail.com", - "url": "http://andrew.github.com" - }, - "name": "node-sass", - "description": "wrapper around libsass", - "version": "0.8.1", - "homepage": "https://github.com/andrew/node-sass", - "keywords": [ - "sass", - "css", - "libsass" - ], - "bugs": { - "url": "https://github.com/andrew/node-sass/issues" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/andrew/node-sass/blob/master/LICENSE" - } - ], - "main": "./sass.js", - "repository": { - "type": "git", - "url": "git://github.com/andrew/node-sass.git" - }, - "scripts": { - "install": "node build.js", - "test": "mocha test", - "pretest": "jshint .", - "prepublish": "bash scripts/prepublish.sh" - }, - "bin": { - "node-sass": "bin/node-sass" - }, - "gypfile": true, - "engines": { - "node": ">=0.10.0" - }, - "dependencies": { - "mkdirp": "0.3.x", - "optimist": "0.6.x", - "node-watch": "0.3.x", - "mocha": "1.13.x", - "chalk": "~0.3.0", - "nan": "~0.6.0" - }, - "devDependencies": { - "jshint": "~2.4.0" - }, - "readme": "##node-sass\n\n[![Build Status](https://secure.travis-ci.org/andrew/node-sass.png?branch=master)](https://travis-ci.org/andrew/node-sass)\n\nNode-sass is a library that provides binding for Node.js to [libsass](https://github.com/hcatlin/libsass), the C version of the popular stylesheet preprocessor, Sass.\n\nIt allows you to natively compile .scss files to css at incredible speed and automatically via a connect middleware.\n\nFind it on npm: \n\n## Install\n\n npm install node-sass\n\n## Usage\n\n```javascript\nvar sass = require('node-sass');\nsass.render({\n\tfile: scss_filename,\n\tsuccess: callback\n\t[, options..]\n\t});\n// OR\nvar css = sass.renderSync({\n\tdata: scss_content\n\t[, options..]\n});\n```\n\n### Options\n\nThe API for using node-sass has changed, so that now there is only one variable - an options hash. Some of these options are optional, and in some circumstances some are mandatory.\n\n#### file\n`file` is a `String` of the path to an `scss` file for libsass to render. One of this or `data` options are required, for both render and renderSync.\n\n#### data\n`data` is a `String` containing the scss to be rendered by libsass. One of this or `file` options are required, for both render and renderSync. It is recommended that you use the `includePaths` option in conjunction with this, as otherwise libsass may have trouble finding files imported via the `@import` directive.\n\n#### success\n`success` is a `Function` to be called upon successful rendering of the scss to css. This option is required but only for the render function. If provided to renderSync it will be ignored.\n\n#### error\n`error` is a `Function` to be called upon occurance of an error when rendering the scss to css. This option is optional, and only applies to the render function. If provided to renderSync it will be ignored.\n\n#### includePaths\n`includePaths` is an `Array` of path `String`s to look for any `@import`ed files. It is recommended that you use this option if you are using the `data` option and have **any** `@import` directives, as otherwise libsass may not find your depended-on files.\n\n#### outputStyle\n`outputStyle` is a `String` to determine how the final CSS should be rendered. Its value should be one of `'nested', 'expanded', 'compact', 'compressed'`.\n[Important: currently the argument `outputStyle` has some problem which may cause the output css becomes nothing because of the libsass, so you should not use it now!]\n\n#### sourceComments\n`sourceComments` is a `String` to determine what debug information is included in the output file. Its value should be one of `'none', 'normal', 'map'`. The default is `'none'`.\nThe `map` option will create the source map file in your CSS destination.\n[Important: `souceComments` is only supported when using the `file` option, and does nothing when using `data` flag.]\n\n#### sourceMap\nIf your `sourceComments` option is set to `map`, `sourceMap` allows setting a new path context for the referenced Sass files. \nThe source map describes a path from your CSS file location, into the the folder where the Sass files are located. In most occasions this will work out-of-the-box but, in some cases, you may need to set a different output. \n\n### Examples\n\n```javascript\nvar sass = require('node-sass');\nsass.render({\n\tdata: 'body{background:blue; a{color:black;}}',\n\tsuccess: function(css){\n \t\tconsole.log(css)\n\t},\n\terror: function(error) {\n\t\tconsole.log(error);\n\t},\n\tincludePaths: [ 'lib/', 'mod/' ],\n\toutputStyle: 'compressed'\n});\n// OR\nconsole.log(sass.renderSync({\n\tdata: 'body{background:blue; a{color:black;}}'),\n\toutputStyle: 'compressed'\n});\n```\n\n### Edge-case behaviours\n\n* In the case that both `file` and `data` options are set, node-sass will only attempt to honour the `file` directive.\n\n## Connect/Express middleware\n\nRecompile `.scss` files automatically for connect and express based http servers\n\n```javascript\nvar server = connect.createServer(\n sass.middleware({\n src: __dirname\n , dest: __dirname + '/public'\n , debug: true\n , outputStyle: 'compressed'\n , prefix: '/prefix'\n }),\n connect.static('/prefix', __dirname + '/public')\n);\n```\n\nHeavily inspired by \n\n## DocPad Plugin\n\n[@jking90](https://github.com/jking90) wrote a [DocPad](http://docpad.org/) plugin that compiles `.scss` files using node-sass: \n\n## Grunt extension\n\n[@sindresorhus](https://github.com/sindresorhus/) has created a set of grunt tasks based on node-sass: \n\n## Gulp extension\n\n[@dlmanning](https://github.com/dlmanning/) has created a gulp sass plugin based on node-sass: \n\n## Harp\n\n[@sintaxi](https://github.com/sintaxi)’s Harp web server implicitly compiles `.scss` files using node-sass: \n\n## Example App\n\nThere is also an example connect app here: \n\n## Rebuilding binaries\n\nNode-sass includes pre-compiled binaries for popular platforms, to add a binary for your platform follow these steps:\n\nCheck out the project:\n\n git clone https://github.com/andrew/node-sass.git\n cd node-sass\n git submodule init\n git submodule update\n npm install\n npm install -g node-gyp\n node-gyp rebuild\n\nReplace the prebuild binary with your newly generated one\n\n cp build/Release/binding.node precompiled/*your-platform*/binding.node\n\n## Command Line Interface\n\nThe interface for command-line usage is fairly simplistic at this stage, as seen in the following usage section.\n\nOutput will be saved with the same name as input SASS file into the current working directory if it's omitted.\n\n### Usage\n `node-sass [options] []`\n\n **Options:**\n \n --output-style CSS output style (nested|expanded|compact|compressed) [default: \"nested\"]\n --source-comments Include debug info in output (none|normal|map) [default: \"none\"]\n --include-path Path to look for @import-ed files [default: cwd]\n --help, -h Print usage info\n\n## Post-install Build\n\nInstall runs a series of Mocha tests to see if your machine can use the pre-built `libsass` which will save some time during install. If any tests fail it will build from source.\n\nIf you know the pre-built version will work and do not want to wait for the tests to run you can skip the tests by setting the environment variable `SKIP_NODE_SASS_TESTS` to true.\n\n SKIP_NODE_SASS_TESTS=true npm install\n\n## Contributors\nSpecial thanks to the following people for submitting patches:\n\nDean Mao\nBrett Wilkins\nlitek\ngonghao\nDylan Greene\n\n### Note on Patches/Pull Requests\n\n * Fork the project.\n * Make your feature addition or bug fix.\n * Add documentation if necessary.\n * Add tests for it. This is important so I don't break it in a future version unintentionally.\n * Send a pull request. Bonus points for topic branches.\n\n## Copyright\n\nCopyright (c) 2013 Andrew Nesbitt. See [LICENSE](https://github.com/andrew/node-sass/blob/master/LICENSE) for details.\n", - "readmeFilename": "README.md", - "_id": "node-sass@0.8.1", - "_from": "node-sass@~0.8.1" -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/sass.js b/node_modules/gulp-sass/node_modules/node-sass/sass.js deleted file mode 100644 index 0eb00fab..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/sass.js +++ /dev/null @@ -1,101 +0,0 @@ -var binding; -var fs = require('fs'); -var path = require('path'); - -var v8 = 'v8-' + /[0-9]+\.[0-9]+/.exec(process.versions.v8)[0]; -var modPath = path.join(__dirname, 'bin', process.platform + '-' + process.arch + '-' + v8, 'binding'); -try { - if (fs.realpathSync(__dirname + '/build')) { - // use the build version if it exists - binding = require(__dirname + '/build/Release/binding'); - } -} catch (e) { - try { - fs.realpathSync(modPath + '.node'); - binding = require(modPath); - } catch (ex) { - // No binary! - throw new Error('`'+ modPath + '.node` is missing. Try reinstalling `node-sass`?'); - } -} - -var SASS_OUTPUT_STYLE = { - nested: 0, - expanded: 1, - compact: 2, - compressed: 3 - }; - -var SASS_SOURCE_COMMENTS = { - none: 0, - // This is called default in libsass, but is a reserved keyword here - normal: 1, - map: 2 - }; - -var prepareOptions = function(options) { - var paths, style, comments; - options = typeof options !== 'object' ? {} : options; - paths = options.include_paths || options.includePaths || []; - style = SASS_OUTPUT_STYLE[options.output_style || options.outputStyle] || 0; - comments = SASS_SOURCE_COMMENTS[options.source_comments || options.sourceComments] || 0; - - return { - paths: paths, - style: style, - comments: comments - }; -}; - -var deprecatedRender = function(css, callback, options) { - options = prepareOptions(options); - var errCallback = function(err) { - callback(err); - }; - var oldCallback = function(css) { - callback(null, css); - }; - return binding.render(css, oldCallback, errCallback, options.paths.join(':'), options.style, options.comments); -}; - -var deprecatedRenderSync = function(css, options) { - options = prepareOptions(options); - return binding.renderSync(css, options.paths.join(':'), options.style, options.comments); -}; - -exports.render = function(options) { - var newOptions; - - if (typeof arguments[0] === 'string') { - return deprecatedRender.apply(this, arguments); - } - - newOptions = prepareOptions(options); - options.error = options.error || function(){}; - - if (options.file !== undefined && options.file !== null) { - return binding.renderFile(options.file, options.success, options.error, newOptions.paths.join(path.delimiter), newOptions.style, newOptions.comments, options.sourceMap); - } - - //Assume data is present if file is not. binding/libsass will tell the user otherwise! - return binding.render(options.data, options.success, options.error, newOptions.paths.join(path.delimiter), newOptions.style); -}; - -exports.renderSync = function(options) { - var newOptions; - - if (typeof arguments[0] === 'string') { - return deprecatedRenderSync.apply(this, arguments); - } - - newOptions = prepareOptions(options); - - if (options.file !== undefined && options.file !== null) { - return binding.renderFileSync(options.file, newOptions.paths.join(path.delimiter), newOptions.style, newOptions.comments); - } - - //Assume data is present if file is not. binding/libsass will tell the user otherwise! - return binding.renderSync(options.data, newOptions.paths.join(path.delimiter), newOptions.style); -}; - -exports.middleware = require('./lib/middleware'); diff --git a/node_modules/gulp-sass/node_modules/node-sass/sass_context_wrapper.cpp b/node_modules/gulp-sass/node_modules/node-sass/sass_context_wrapper.cpp deleted file mode 100644 index 71f8bd4f..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/sass_context_wrapper.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include "sass_context_wrapper.h" -#include - -extern "C" { - using namespace std; - - sass_context_wrapper* sass_new_context_wrapper() - { - return (sass_context_wrapper*) calloc(1, sizeof(sass_context_wrapper)); - } - - void sass_free_context_wrapper(sass_context_wrapper* ctx_w) - { - if (ctx_w->ctx) sass_free_context(ctx_w->ctx); - if (ctx_w->fctx) sass_free_file_context(ctx_w->fctx); - - delete ctx_w->callback; - delete ctx_w->errorCallback; - - free(ctx_w); - } -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/sass_context_wrapper.h b/node_modules/gulp-sass/node_modules/node-sass/sass_context_wrapper.h deleted file mode 100644 index 2992415c..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/sass_context_wrapper.h +++ /dev/null @@ -1,21 +0,0 @@ -#include "libsass/sass_interface.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -struct sass_context_wrapper { - sass_context* ctx; - sass_file_context* fctx; - uv_work_t request; - NanCallback* callback; - NanCallback* errorCallback; -}; - -struct sass_context_wrapper* sass_new_context_wrapper(void); -void sass_free_context_wrapper(struct sass_context_wrapper* ctx); - -#ifdef __cplusplus -} -#endif diff --git a/node_modules/gulp-sass/node_modules/node-sass/scripts/prepublish.sh b/node_modules/gulp-sass/node_modules/node-sass/scripts/prepublish.sh deleted file mode 100755 index 887d129d..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/scripts/prepublish.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -DIRECTORY="../node-sass-binaries" - -if [ "$CI" == "true" ]; then - echo "Skipping prepublish on CI builds"; -elif [ -d "$DIRECTORY" ]; then - echo "Copying binaries to bin" - cp -R $DIRECTORY/*-v8-* bin/ -else - echo "Skipping bin copy. Please clone https://github.com/andrew/node-sass-binaries for prebuilt binaries"; -fi \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/test/cli.js b/node_modules/gulp-sass/node_modules/node-sass/test/cli.js deleted file mode 100644 index 98ed3305..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/test/cli.js +++ /dev/null @@ -1,159 +0,0 @@ -var path = require('path'), - assert = require('assert'), - fs = require('fs'), - exec = require('child_process').exec, - cli = require('../lib/cli'), - - cliPath = path.resolve(__dirname, '../bin/node-sass'), - sampleFilename = path.resolve(__dirname, 'sample.scss'); - -var expectedSampleCompressed = '#navbar {width:80%;height:23px;}\ -#navbar ul {list-style-type:none;}\ -#navbar li {float:left;}\ -#navbar li a {font-weight:bold;}'; - -var expectedSampleNoComments = '#navbar {\n\ - width: 80%;\n\ - height: 23px; }\n\ -\n\ -#navbar ul {\n\ - list-style-type: none; }\n\ -\n\ -#navbar li {\n\ - float: left; }\n\ - #navbar li a {\n\ - font-weight: bold; }\n'; - -describe('cli', function() { - it('should print help when run with no arguments', function(done) { - exec('node ' + cliPath, function(err, stdout, stderr) { - done(assert(stderr.indexOf('Compile .scss files with node-sass') === 0)); - }); - }); - - it('should compile sample.scss as sample.css', function(done) { - var resultPath = path.join(__dirname, 'sample.css'); - - exec('node ' + cliPath + ' ' + sampleFilename, { - cwd: __dirname - }, function() { - - fs.exists(resultPath, function(exists) { - assert(exists); - fs.unlink(resultPath, done); - }); - }); - }); - - it('should compile sample.scss to ../out.css', function(done) { - var resultPath = path.resolve(__dirname, '../out.css'); - - exec('node ' + cliPath + ' ' + sampleFilename + ' ../out.css', { - cwd: __dirname - }, function() { - - fs.exists(resultPath, function(exists) { - assert(exists); - fs.unlink(resultPath, done); - }); - }); - }); - - it('should compile with --include-path option', function(done){ - var emitter = cli([ - '--include-path', path.join(__dirname, 'lib'), - '--include-path', path.join(__dirname, 'functions'), - path.join(__dirname, 'include_path.scss') - ]); - emitter.on('error', done); - emitter.on('write', function(err, file, css){ - assert.equal(css.trim(), 'body {\n background: red;\n color: #0000fe; }'); - fs.unlink(file, done); - }); - }); - - it('should compile with the --output-style', function(done){ - var emitter = cli(['--output-style', 'compressed', path.join(__dirname, 'sample.scss')]); - emitter.on('error', done); - emitter.on('write', function(err, file, css){ - assert.equal(css, expectedSampleCompressed); - fs.unlink(file, done); - }); - }); - - it('should compile with the --source-comments option', function(done){ - var emitter = cli(['--source-comments', 'none', path.join(__dirname, 'sample.scss')]); - emitter.on('error', done); - emitter.on('write', function(err, file, css){ - assert.equal(css, expectedSampleNoComments); - fs.unlink(file, done); - }); - }); - - it('should write the output to the file specified with the --output option', function(done){ - var resultPath = path.join(__dirname, '../output.css'); - var emitter = cli(['--output', resultPath, path.join(__dirname, 'sample.scss')]); - emitter.on('error', done); - emitter.on('write', function(){ - fs.exists(resultPath, function(exists) { - assert(exists); - fs.unlink(resultPath, done); - }); - }); - }); - - it('should compile with the --source-map option', function(done){ - var emitter = cli([path.join(__dirname, 'sample.scss'), '--source-map']); - emitter.on('error', done); - emitter.on('write-source-map', function(err, file) { - assert.equal(file, path.join(__dirname, '../sample.css.map')); - fs.exists(file, function(exists) { - assert(exists); - }); - }); - emitter.on('done', function() { - fs.unlink(path.join(__dirname, '../sample.css.map'), function() { - fs.unlink(path.join(__dirname, '../sample.css'), function() { - done(); - }); - }); - }); - }); - - it('should compile with the --source-map option with specific filename', function(done){ - var emitter = cli([path.join(__dirname, 'sample.scss'), '--source-map', path.join(__dirname, '../sample.map')]); - emitter.on('error', done); - emitter.on('write-source-map', function(err, file) { - assert.equal(file, path.join(__dirname, '../sample.map')); - fs.exists(file, function(exists) { - assert(exists); - }); - }); - emitter.on('done', function() { - fs.unlink(path.join(__dirname, '../sample.map'), function() { - fs.unlink(path.join(__dirname, '../sample.css'), function() { - done(); - }); - }); - }); - }); - - it('should compile a sourceMap if --source-comments="map", but the --source-map option is excluded', function(done){ - var emitter = cli([path.join(__dirname, 'sample.scss'), '--source-comments', 'map']); - emitter.on('error', done); - emitter.on('write-source-map', function(err, file) { - assert.equal(file, path.join(__dirname, '../sample.css.map')); - fs.exists(file, function(exists) { - assert(exists); - }); - }); - emitter.on('done', function() { - fs.unlink(path.join(__dirname, '../sample.css.map'), function() { - fs.unlink(path.join(__dirname, '../sample.css'), function() { - done(); - }); - }); - }); - }); - -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/test/functions/colorBlue.scss b/node_modules/gulp-sass/node_modules/node-sass/test/functions/colorBlue.scss deleted file mode 100644 index 4fa618cb..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/test/functions/colorBlue.scss +++ /dev/null @@ -1,3 +0,0 @@ -@function colorBlue() { - @return #0000fe; -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/test/include_path.scss b/node_modules/gulp-sass/node_modules/node-sass/test/include_path.scss deleted file mode 100644 index 8ee2b7fe..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/test/include_path.scss +++ /dev/null @@ -1,4 +0,0 @@ -@import "vars"; -@import "colorBlue"; - -body { background: $color; color: colorBlue(); } diff --git a/node_modules/gulp-sass/node_modules/node-sass/test/large_test.scss b/node_modules/gulp-sass/node_modules/node-sass/test/large_test.scss deleted file mode 100644 index 662ae857..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/test/large_test.scss +++ /dev/null @@ -1,11869 +0,0 @@ -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/test/lib/vars.scss b/node_modules/gulp-sass/node_modules/node-sass/test/lib/vars.scss deleted file mode 100644 index a625dd9c..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/test/lib/vars.scss +++ /dev/null @@ -1 +0,0 @@ -$color: red; \ No newline at end of file diff --git a/node_modules/gulp-sass/node_modules/node-sass/test/mem_test_render.js b/node_modules/gulp-sass/node_modules/node-sass/test/mem_test_render.js deleted file mode 100644 index 477cc249..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/test/mem_test_render.js +++ /dev/null @@ -1,19 +0,0 @@ -// var util = require('util'); -// var sass = require('../sass'); -// var fs = require('fs'); -// -// var bigScssStr = fs.readFileSync(require('path').resolve(__dirname,'large_test.scss')); -// var numTestCases = 1000; -// var numCompiled = 0; -// console.log(util.inspect(process.memoryUsage())); -// for (var i = 0; i < numTestCases; i++) { -// sass.render({ -// data: bigScssStr, -// success: function() { -// numCompiled++; -// if (numCompiled === numTestCases) { -// console.log(util.inspect(process.memoryUsage())); -// } -// } -// }); -// } diff --git a/node_modules/gulp-sass/node_modules/node-sass/test/mem_test_renderSync.js b/node_modules/gulp-sass/node_modules/node-sass/test/mem_test_renderSync.js deleted file mode 100644 index 16115b77..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/test/mem_test_renderSync.js +++ /dev/null @@ -1,12 +0,0 @@ -// var util = require('util'); -// var sass = require('../sass'); -// var fs = require('fs'); -// -// var bigScssStr = fs.readFileSync(require('path').resolve(__dirname,'./large_test.scss')); -// var numTestCases = 1000; -// var numCompiled = 0; -// console.log(util.inspect(process.memoryUsage())); -// for (var i = 0; i < numTestCases; i++) { -// sass.renderSync({data: bigScssStr}); -// } -// console.log(util.inspect(process.memoryUsage())); diff --git a/node_modules/gulp-sass/node_modules/node-sass/test/sample.scss b/node_modules/gulp-sass/node_modules/node-sass/test/sample.scss deleted file mode 100644 index 75086c30..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/test/sample.scss +++ /dev/null @@ -1,13 +0,0 @@ -#navbar { - width: 80%; - height: 23px; -} -#navbar ul { - list-style-type: none; -} -#navbar li { - float: left; - a { - font-weight: bold; - } -} diff --git a/node_modules/gulp-sass/node_modules/node-sass/test/source_comments_spec.js b/node_modules/gulp-sass/node_modules/node-sass/test/source_comments_spec.js deleted file mode 100644 index 39e88dbd..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/test/source_comments_spec.js +++ /dev/null @@ -1,36 +0,0 @@ -/*jshint multistr:true */ -var sass = require('../sass'); -var assert = require('assert'); - -var sampleFilename = require('path').resolve(__dirname, 'sample.scss'); - -var expectedCommentsScssStr = '/* line 1, ' + sampleFilename + ' */\n\ -#navbar {\n\ - width: 80%;\n\ - height: 23px; }\n\ -\n\ -/* line 5, ' + sampleFilename + ' */\n\ -#navbar ul {\n\ - list-style-type: none; }\n\ -\n\ -/* line 8, ' + sampleFilename + ' */\n\ -#navbar li {\n\ - float: left; }\n\ - /* line 10, ' + sampleFilename + ' */\n\ - #navbar li a {\n\ - font-weight: bold; }\n'; - -describe("compile file with source comments", function() { - it("should compile with render and comment outputs", function(done) { - sass.render({ - file: sampleFilename, - source_comments: 'normal', - success: function (css) { - done(assert.equal(css, expectedCommentsScssStr)); - }, - error: function (error) { - done(error); - } - }); - }); -}); diff --git a/node_modules/gulp-sass/node_modules/node-sass/test/test.js b/node_modules/gulp-sass/node_modules/node-sass/test/test.js deleted file mode 100644 index 29cae8f2..00000000 --- a/node_modules/gulp-sass/node_modules/node-sass/test/test.js +++ /dev/null @@ -1,174 +0,0 @@ -/*jshint multistr:true */ -var sass = require('../sass'); -var assert = require('assert'); -var path = require('path'); -var badSampleFilename = 'sample.scss'; -var sampleFilename = path.resolve(__dirname, 'sample.scss'); - -var scssStr = '#navbar {\ - width: 80%;\ - height: 23px; }\ - #navbar ul {\ - list-style-type: none; }\ - #navbar li {\ - float: left;\ - a {\ - font-weight: bold; }}\ - @mixin keyAnimation($name, $attr, $value) {\ - @-webkit-keyframes #{$name} {\ - 0% { #{$attr}: $value; }\ - }\ - }'; - -// Note that the bad -var badInput = '#navbar \n\ - width: 80%'; - -var expectedRender = '#navbar {\n\ - width: 80%;\n\ - height: 23px; }\n\ -\n\ -#navbar ul {\n\ - list-style-type: none; }\n\ -\n\ -#navbar li {\n\ - float: left; }\n\ - #navbar li a {\n\ - font-weight: bold; }\n'; - -describe("DEPRECATED: compile scss", function() { - it("should compile with render", function(done) { - sass.render(scssStr, function(err) { - done(err); - }); - }); - - it("should compile with renderSync", function(done) { - done(assert.ok(sass.renderSync(scssStr))); - }); - - it("should match compiled string with render", function(done) { - sass.render(scssStr, function(err, css) { - if (!err) { - done(assert.equal(css, expectedRender)); - } else { - done(err); - } - }); - }); - - it("should match compiled string with renderSync", function(done) { - done(assert.equal(sass.renderSync(scssStr), expectedRender)); - }); - - it("should throw an exception for bad input", function(done) { - done(assert.throws(function() { - sass.renderSync(badInput); - })); - }); -}); - -describe("compile scss", function() { - it("should compile with render", function(done) { - sass.render({ - data: scssStr, - success: function(css) { - done(assert.ok(css)); - } - }); - }); - - it("should compile with renderSync", function(done) { - done(assert.ok(sass.renderSync({data: scssStr}))); - }); - - it("should match compiled string with render", function(done) { - sass.render({ - data: scssStr, - success: function(css) { - done(assert.equal(css, expectedRender)); - }, - error: function(error) { - done(error); - } - }); - }); - - it("should have a error status of 1 for bad css", function(done) { - sass.render({ - data: '{zzz}', - success: function(css) { - console.log(css); - }, - error: function(error, status) { - assert.equal(status, 1); - done(); - } - }); - }); - - it("should match compiled string with renderSync", function(done) { - done(assert.equal(sass.renderSync({data: scssStr}), expectedRender)); - }); - - it("should throw an exception for bad input", function(done) { - done(assert.throws(function() { - sass.renderSync({data: badInput}); - })); - }); -}); - -describe("compile file with include paths", function(){ - it("should compile with render", function(done) { - sass.render({ - file: path.resolve(__dirname, "include_path.scss"), - includePaths: [path.resolve(__dirname, "lib"), path.resolve(__dirname, "functions")], - success: function (css) { - done(assert.equal(css, "body {\n background: red;\n color: #0000fe; }\n")); - }, - error: function (error) { - done(error); - } - }); - }); -}); - -describe("compile file", function() { - it("should compile with render", function(done) { - sass.render({ - file: sampleFilename, - success: function (css) { - done(assert.equal(css, expectedRender)); - }, - error: function (error) { - done(error); - } - }); - }); - - it("should compile with renderSync", function(done) { - done(assert.ok(sass.renderSync({file: sampleFilename}))); - }); - - it("should match compiled string with render", function(done) { - sass.render({ - file: sampleFilename, - success: function(css) { - done(assert.equal(css, expectedRender)); - }, - error: function(error) { - done(error); - } - }); - }); - - it("should match compiled string with renderSync", function(done) { - done(assert.equal(sass.renderSync({file: sampleFilename}), expectedRender)); - }); - - it("should throw an exception for bad input", function(done) { - done(assert.throws(function() { - sass.renderSync({file: badSampleFilename}); - })); - }); -}); diff --git a/node_modules/gulp-sass/package.json b/node_modules/gulp-sass/package.json deleted file mode 100644 index ce35cb85..00000000 --- a/node_modules/gulp-sass/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "gulp-sass", - "version": "0.6.0", - "description": "Gulp plugin for sass", - "main": "index.js", - "scripts": { - "test": "node test/test.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/dlmanning/gulp-sass" - }, - "keywords": [ - "gulpplugin", - "sass", - "gulp" - ], - "author": { - "name": "David Manning" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/dlmanning/gulp-sass/issues" - }, - "dependencies": { - "node-sass": "~0.8.1", - "gulp-util": "~2.2.5", - "map-stream": "~0.1.0" - }, - "devDependencies": { - "tape": "~2.3.2", - "concat-stream": "~1.4.1" - }, - "jshintConfig": { - "laxcomma": true - }, - "readme": "[![Build Status](https://travis-ci.org/dlmanning/gulp-sass.png?branch=master)](https://travis-ci.org/dlmanning/gulp-sass)\n\ngulp-sass\n=========\n\nSASS plugin for [gulp](https://github.com/wearefractal/gulp).\n\n#Install\n\n```\nnpm install gulp-sass\n```\n\n#Basic Usage\n\nSomething like this:\n\n```javascript\nvar gulp = require('gulp');\nvar sass = require('gulp-sass')\n\ngulp.task('sass', function () {\n\tgulp.src('./scss/*.scss')\n\t\t.pipe(sass())\n\t\t.pipe(gulp.dest('./css'));\n});\n```\n\nOptions passed as a hash into `sass()` will be passed along to [`node-sass`](https://github.com/andrew/node-sass)\n\n## gulp-sass specific options\n\n#### `errLogToConsole: true`\n\nIf you pass `errLogToConsole: true` into the options hash, sass errors will be logged to the console instead of generating a `gutil.PluginError` object. Use this option with `gulp.watch` to keep gulp from stopping every time you mess up your sass.\n\n#### `onSuccess: callback`\n\nPass in your own callback to be called upon successful compilaton by node-sass. The callback has the form `callback(css)`, and is passed the compiled css as a string. Note: This *does not* prevent gulp-sass's default behavior of writing the output css file.\n\n#### `onError: callback`\n\nPass in your own callback to be called upon a sass error from node-sass. The callback has the form `callback(err)`, where err is the error string generated by libsass. Note: this *does* prevent an actual `gulpPluginError` object from being created.\n\n#Imports and Partials\n\ngulp-sass now automatically passes along the directory of every scss file it parses as an include path for node-sass. This means that as long as you specify your includes relative to path of your scss file, everything will just work.\n\nscss/includes/_settings.scss:\n\n```scss\n$blue: #3bbfce;\n$margin: 16px;\n```\n\nscss/style.scss:\n\n```scss\n@import \"includes/settings\";\n\n.content-navigation {\n border-color: $blue;\n color:\n darken($blue, 9%);\n}\n\n.border {\n padding: $margin / 2;\n margin: $margin / 2;\n border-color: $blue;\n}\n```\n\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/dlmanning/gulp-sass", - "_id": "gulp-sass@0.6.0", - "_from": "gulp-sass@" -} diff --git a/node_modules/gulp-sass/test/ref/inheritance.css b/node_modules/gulp-sass/test/ref/inheritance.css deleted file mode 100644 index 1e58035d..00000000 --- a/node_modules/gulp-sass/test/ref/inheritance.css +++ /dev/null @@ -1,10 +0,0 @@ -.error, .badError { - border: #f00; - background: #fdd; } - -.error.intrusion { - font-size: 1.3em; - font-weight: bold; } - -.badError { - border-width: 3px; } diff --git a/node_modules/gulp-sass/test/ref/mixins.css b/node_modules/gulp-sass/test/ref/mixins.css deleted file mode 100644 index f1a00f57..00000000 --- a/node_modules/gulp-sass/test/ref/mixins.css +++ /dev/null @@ -1,8 +0,0 @@ -#data { - float: left; - margin-left: 10px; } - #data th { - text-align: center; - font-weight: bold; } - #data td, #data th { - padding: 2px; } diff --git a/node_modules/gulp-sass/test/ref/nesting.css b/node_modules/gulp-sass/test/ref/nesting.css deleted file mode 100644 index 5a7d6bb7..00000000 --- a/node_modules/gulp-sass/test/ref/nesting.css +++ /dev/null @@ -1,9 +0,0 @@ -table.hl { - margin: 2em 0; } - table.hl td.ln { - text-align: right; } - -li { - font-family: serif; - font-weight: bold; - font-size: 1.2em; } diff --git a/node_modules/gulp-sass/test/ref/variables.css b/node_modules/gulp-sass/test/ref/variables.css deleted file mode 100644 index 217dd34b..00000000 --- a/node_modules/gulp-sass/test/ref/variables.css +++ /dev/null @@ -1,8 +0,0 @@ -.content-navigation { - border-color: #3bbfce; - color: #2ca2af; } - -.border { - padding: 8px; - margin: 8px; - border-color: #3bbfce; } diff --git a/node_modules/gulp-sass/test/scss/includes/_cats.scss b/node_modules/gulp-sass/test/scss/includes/_cats.scss deleted file mode 100644 index 7096c21a..00000000 --- a/node_modules/gulp-sass/test/scss/includes/_cats.scss +++ /dev/null @@ -1,2 +0,0 @@ -$blue: #3bbfce; -$margin: 16px; \ No newline at end of file diff --git a/node_modules/gulp-sass/test/scss/inheritance.scss b/node_modules/gulp-sass/test/scss/inheritance.scss deleted file mode 100644 index f3caa927..00000000 --- a/node_modules/gulp-sass/test/scss/inheritance.scss +++ /dev/null @@ -1,16 +0,0 @@ -@import "includes/cats"; - -.error { - border: #f00; - background: #fdd; -} - -.error.intrusion { - font-size: 1.3em; - font-weight: bold; -} - -.badError { - @extend .error; - border-width: 3px; -} \ No newline at end of file diff --git a/node_modules/gulp-sass/test/scss/mixins.scss b/node_modules/gulp-sass/test/scss/mixins.scss deleted file mode 100644 index 3b81f73e..00000000 --- a/node_modules/gulp-sass/test/scss/mixins.scss +++ /dev/null @@ -1,17 +0,0 @@ -@mixin table-base { - th { - text-align: center; - font-weight: bold; - } - td, th {padding: 2px} -} - -@mixin left($dist) { - float: left; - margin-left: $dist; -} - -#data { - @include left(10px); - @include table-base; -} \ No newline at end of file diff --git a/node_modules/gulp-sass/test/scss/nesting.scss b/node_modules/gulp-sass/test/scss/nesting.scss deleted file mode 100644 index d3300ea8..00000000 --- a/node_modules/gulp-sass/test/scss/nesting.scss +++ /dev/null @@ -1,14 +0,0 @@ -table.hl { - margin: 2em 0; - td.ln { - text-align: right; - } -} - -li { - font: { - family: serif; - weight: bold; - size: 1.2em; - } -} diff --git a/node_modules/gulp-sass/test/scss/variables.scss b/node_modules/gulp-sass/test/scss/variables.scss deleted file mode 100644 index 7c5de0f0..00000000 --- a/node_modules/gulp-sass/test/scss/variables.scss +++ /dev/null @@ -1,14 +0,0 @@ -$blue: #3bbfce; -$margin: 16px; - -.content-navigation { - border-color: $blue; - color: - darken($blue, 9%); -} - -.border { - padding: $margin / 2; - margin: $margin / 2; - border-color: $blue; -} \ No newline at end of file diff --git a/node_modules/gulp-sass/test/test.js b/node_modules/gulp-sass/test/test.js deleted file mode 100644 index 978c0a5b..00000000 --- a/node_modules/gulp-sass/test/test.js +++ /dev/null @@ -1,109 +0,0 @@ -var assert = require('assert'); -var gsass = require('../'); -var gutil = require('gulp-util'); -var fs = require('fs'); -var path = require('path'); -var test = require('tape'); - -function createVinyl(sassFileName, contents) { - var base = path.join(__dirname, 'scss'); - var filePath = path.join(base, sassFileName); - - return new gutil.File({ - cwd: __dirname, - base: base, - path: filePath, - contents: contents || fs.readFileSync(filePath) - }); -} - -test('pass file when isNull()', function (t) { - var stream = gsass(); - var emptyFile = { - isNull: function () { return true; } - }; - stream.on('data', function (data) { - t.equal(data, emptyFile); - t.end(); - }); - stream.write(emptyFile); -}); - -// test('emit error when file isStream()', function (t) { -// var stream = gsass(); -// var streamFile = { -// isNull: function () { return false; }, -// isStream: function () { return true; } -// }; -// stream.on() -// }); - -test('compile a single sass file', function (t) { - var sassFile = createVinyl('mixins.scss'); - - var stream = gsass(); - stream.on('data', function (cssFile) { - t.ok(cssFile, 'cssFile should exist'); - t.ok(cssFile.path, 'cssFile.path should exist'); - t.ok(cssFile.relative, 'cssFile.relative should exist'); - t.ok(cssFile.contents, 'cssFile.contents should exist'); - t.equal(cssFile.path, path.join(__dirname, 'scss', 'mixins.css')); - t.equal( - fs.readFileSync(path.join(__dirname, 'ref/mixins.css'), 'utf8'), - cssFile.contents.toString(), - 'file compiles correctly to css' - ); - t.end(); - }) - stream.write(sassFile); -}); - -test('compile multiple sass files', function (t) { - var files = [ - createVinyl('inheritance.scss'), - createVinyl('mixins.scss'), - createVinyl('nesting.scss'), - createVinyl('variables.scss') - ]; - - t.plan(files.length * 4); - var stream = gsass(); - - stream.on('data', function (cssFile) { - t.ok(cssFile, 'cssFile exists'); - t.ok(cssFile.path, 'cssFile.path exists'); - t.ok(cssFile.relative, 'cssFile.relative exists'); - t.ok(cssFile.contents, 'cssFile.contents exists'); - }); - - files.forEach(function (file) { - stream.write(file); - }); -}); - -test('emit error on sass errors', function (t) { - var stream = gsass(); - var errorFile = createVinyl('somefile.sass', - new Buffer('body { font \'Comic Sans\'; }')); - stream.on('error', function (err) { - t.equal(err.message, - 'source string:1: error: property "font" must be followed by a \':\'\n' - ); - t.end(); - }); - stream.write(errorFile); -}); - -test('call custom error callback when opts.onError is given', function (t) { - var stream = gsass({ onError: function (err) { - t.equal(err, - 'source string:1: error: property "font" must be followed by a \':\'\n' - ); - t.end(); - }}); - - var errorFile = createVinyl('somefile.sass', - new Buffer('body { font \'Comic Sans\'; }')); - - stream.write(errorFile); -}); \ No newline at end of file diff --git a/node_modules/gulp-uglify/.jshintrc b/node_modules/gulp-uglify/.jshintrc deleted file mode 100644 index 8fde0026..00000000 --- a/node_modules/gulp-uglify/.jshintrc +++ /dev/null @@ -1,18 +0,0 @@ -{ - "node": true, - "bitwise": true, - "camelcase": false, - "curly": true, - "eqeqeq": true, - "forin": true, - "immed": true, - "latedef": true, - "newcap": true, - "noarg": true, - "nonew": true, - "noempty": true, - "undef": true, - "unused": true, - "strict": true, - "trailing": true -} \ No newline at end of file diff --git a/node_modules/gulp-uglify/.npmignore b/node_modules/gulp-uglify/.npmignore deleted file mode 100644 index 067a3b72..00000000 --- a/node_modules/gulp-uglify/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -build -components \ No newline at end of file diff --git a/node_modules/gulp-uglify/.travis.yml b/node_modules/gulp-uglify/.travis.yml deleted file mode 100644 index 994e2750..00000000 --- a/node_modules/gulp-uglify/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.9 - - 0.10 diff --git a/node_modules/gulp-uglify/CHANGELOG.md b/node_modules/gulp-uglify/CHANGELOG.md deleted file mode 100644 index a1787e85..00000000 --- a/node_modules/gulp-uglify/CHANGELOG.md +++ /dev/null @@ -1,8 +0,0 @@ -# gulp-uglify changelog - -## 0.2.0 - -- Dropped support for Node versions less than 0.9 -- Switched to using Streams2 -- Add support for generating source maps -- Add option for preserving comments diff --git a/node_modules/gulp-uglify/LICENSE.md b/node_modules/gulp-uglify/LICENSE.md deleted file mode 100644 index 77389cc4..00000000 --- a/node_modules/gulp-uglify/LICENSE.md +++ /dev/null @@ -1,20 +0,0 @@ -> Copyright (c) 2013-2014 Terin Stock -> -> 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/node_modules/gulp-uglify/README.md b/node_modules/gulp-uglify/README.md deleted file mode 100644 index f0d469f4..00000000 --- a/node_modules/gulp-uglify/README.md +++ /dev/null @@ -1,81 +0,0 @@ -[![Build Status](https://travis-ci.org/terinjokes/gulp-uglify.png?branch=master)](https://travis-ci.org/terinjokes/gulp-uglify) - -## Information - - - - - - - - - - - - - -
      Packagegulp-uglify
      DescriptionMinify files with UglifyJS.
      Node Version≥ 0.9
      - -## Usage - -```javascript -var uglify = require('gulp-uglify'); - -gulp.task('compress', function() { - gulp.src('lib/*.js') - .pipe(uglify({outSourceMap: true})) - .pipe(gulp.dest('dist')) -}); -``` - -## Options - -- `mangle` - - Pass `false` to skip mangling names. - -- `output` - - Pass an object if you wish to specify additional [output - options](http://lisperator.net/uglifyjs/codegen). The defaults are - optimized for best compression. - -- `compress` - - Pass an object to specify custom [compressor - options](http://lisperator.net/uglifyjs/compress). Pass `false` to skip - compression completely. - -- `preserveComments` - - A convenience option for `options.output.comments`. Defaults to preserving no - comments. - - - `all` - - Preserve all comments in code blocks - - - `some` - - Preserve comments that start with a bang (`!`) or include a Closure - Compiler directive (`@preserve`, `@license`, `@cc_on`) - - - `function` - - Specify your own comment preservation function. You will be passed the - current node and the current comment and are expected to return either - `true` or `false`. - -You can also pass the `uglify` function any of the options [listed -here](https://github.com/mishoo/UglifyJS2#the-simple-way) to modify -UglifyJS's behavior. - - -### Source Maps - -You can have UglifyJS’s generated source maps emitted on the stream by passing -`true` for the `outSourceMap` option. The file object’s path will be based on -the input file’s, with ‘.map’ appended. - -Input source maps are no supported by this plugin at this time. - diff --git a/node_modules/gulp-uglify/index.js b/node_modules/gulp-uglify/index.js deleted file mode 100644 index c4ee594e..00000000 --- a/node_modules/gulp-uglify/index.js +++ /dev/null @@ -1,70 +0,0 @@ -'use strict'; -var through = require('through2'), - uglify = require('uglify-js'), - merge = require('deepmerge'), - Vinyl = require('vinyl'), - uglifyError = require('./lib/error.js'); - -module.exports = function(opt) { - - function minify(file, encoding, callback) { - /*jshint validthis:true */ - - if (file.isNull()) { - this.push(file); - return callback(); - } - - if (file.isStream()) { - return callback(uglifyError('Streaming not supported')); - } - - var options = merge(opt || {}, { - fromString: true, - output: {} - }); - - var mangled, - map, - sourceMap; - - if (options.outSourceMap === true) { - options.outSourceMap = file.relative + '.map'; - } - - if (options.preserveComments === 'all') { - options.output.comments = true; - } else if (options.preserveComments === 'some') { - // preserve comments with directives or that start with a bang (!) - options.output.comments = /^!|@preserve|@license|@cc_on/i; - } else if (typeof options.preserveComments === 'function') { - options.output.comments = options.preserveComments; - } - - try { - mangled = uglify.minify(String(file.contents), options); - file.contents = new Buffer(mangled.code); - this.push(file); - } catch (e) { - console.warn('Error caught from uglify: ' + e.message + ' in ' + file.path + '. Returning unminifed code'); - this.push(file); - return callback(); - } - - if (options.outSourceMap) { - sourceMap = JSON.parse(mangled.map); - sourceMap.sources = [ file.relative ]; - map = new Vinyl({ - cwd: file.cwd, - base: file.base, - path: file.path + '.map', - contents: new Buffer(JSON.stringify(sourceMap)) - }); - this.push(map); - } - - callback(); - } - - return through.obj(minify); -}; diff --git a/node_modules/gulp-uglify/lib/error.js b/node_modules/gulp-uglify/lib/error.js deleted file mode 100644 index 04f75250..00000000 --- a/node_modules/gulp-uglify/lib/error.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; -var PluginError = require('gulp-util/lib/PluginError'); - -module.exports = function uglifyError() { - var Factory = PluginError.bind.apply(PluginError, [].concat(null, 'gulp-uglify', Array.prototype.slice.call(arguments))); - return new Factory(); -}; diff --git a/node_modules/gulp-uglify/node_modules/.bin/uglifyjs b/node_modules/gulp-uglify/node_modules/.bin/uglifyjs deleted file mode 120000 index fef3468b..00000000 --- a/node_modules/gulp-uglify/node_modules/.bin/uglifyjs +++ /dev/null @@ -1 +0,0 @@ -../uglify-js/bin/uglifyjs \ No newline at end of file diff --git a/node_modules/gulp-uglify/node_modules/deepmerge/.npmignore b/node_modules/gulp-uglify/node_modules/deepmerge/.npmignore deleted file mode 100644 index 55eb9828..00000000 --- a/node_modules/gulp-uglify/node_modules/deepmerge/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules - -#jasmine -reports diff --git a/node_modules/gulp-uglify/node_modules/deepmerge/README.markdown b/node_modules/gulp-uglify/node_modules/deepmerge/README.markdown deleted file mode 100644 index 509b026e..00000000 --- a/node_modules/gulp-uglify/node_modules/deepmerge/README.markdown +++ /dev/null @@ -1,64 +0,0 @@ -deepmerge -========= - -Merge the enumerable attributes of two objects deeply. - -example -======= - -```js -var util = require('util') -var merge = require('deepmerge') - -var x = { foo: { bar: 3 }, - array: [ { does: 'work', too: [ 1, 2, 3 ] } ] } -var y = { foo: { baz: 4 }, - quux: 5, - array: [ { does: 'work', too: [ 4, 5, 6 ] }, { really: 'yes' } ] } - -console.log(util.inspect(merge(x, y), false, null)) -``` - -output: - -```js -{ foo: { bar: 3, baz: 4 }, - array: [ { does: 'work', too: [ 1, 2, 3, 4, 5, 6 ] }, { really: 'yes' } ], - quux: 5 } -``` - -methods -======= - -var merge = require('deepmerge') - -merge(x, y) ------------ - -Merge two objects `x` and `y` deeply, returning a new merged object with the -elements from both `x` and `y`. - -If an element at the same key is present for both `x` and `y`, the value from -`y` will appear in the result. - -The merge is immutable, so neither `x` nor `y` will be modified. - -The merge will also merge arrays and array values. - -install -======= - -With [npm](http://npmjs.org) do: - -``` -npm install deepmerge -``` - -test -==== - -With [npm](http://npmjs.org) do: - -``` -npm test -``` diff --git a/node_modules/gulp-uglify/node_modules/deepmerge/example/merge.js b/node_modules/gulp-uglify/node_modules/deepmerge/example/merge.js deleted file mode 100644 index ccac0a42..00000000 --- a/node_modules/gulp-uglify/node_modules/deepmerge/example/merge.js +++ /dev/null @@ -1,5 +0,0 @@ -var merge = require('../') -var x = { foo : { 'bar' : 3 } } -var y = { foo : { 'baz' : 4 }, quux : 5 } -var merged = merge(x, y) -console.dir(merged) diff --git a/node_modules/gulp-uglify/node_modules/deepmerge/index.js b/node_modules/gulp-uglify/node_modules/deepmerge/index.js deleted file mode 100644 index 182d583d..00000000 --- a/node_modules/gulp-uglify/node_modules/deepmerge/index.js +++ /dev/null @@ -1,40 +0,0 @@ -module.exports = function merge (target, src) { - var array = Array.isArray(src) - var dst = array && [] || {} - - if (array) { - target = target || [] - dst = dst.concat(target) - src.forEach(function(e, i) { - if (typeof target[i] === 'undefined') { - dst[i] = e - } else if (typeof e === 'object') { - dst[i] = merge(target[i], e) - } else { - if (target.indexOf(e) === -1) { - dst.push(e) - } - } - }) - } else { - if (target && typeof target === 'object') { - Object.keys(target).forEach(function (key) { - dst[key] = target[key] - }) - } - Object.keys(src).forEach(function (key) { - if (typeof src[key] !== 'object' || !src[key]) { - dst[key] = src[key] - } - else { - if (!target[key]) { - dst[key] = src[key] - } else { - dst[key] = merge(target[key], src[key]) - } - } - }) - } - - return dst -} diff --git a/node_modules/gulp-uglify/node_modules/deepmerge/license.txt b/node_modules/gulp-uglify/node_modules/deepmerge/license.txt deleted file mode 100644 index 2bf24b9b..00000000 --- a/node_modules/gulp-uglify/node_modules/deepmerge/license.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) - -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. \ No newline at end of file diff --git a/node_modules/gulp-uglify/node_modules/deepmerge/package.json b/node_modules/gulp-uglify/node_modules/deepmerge/package.json deleted file mode 100644 index f74847af..00000000 --- a/node_modules/gulp-uglify/node_modules/deepmerge/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "author": { - "name": "Nick Fisher" - }, - "name": "deepmerge", - "description": "A library for deep (recursive) merging of Javascript objects", - "version": "0.2.7", - "homepage": "https://github.com/nrf110/deepmerge", - "repository": { - "type": "git", - "url": "git://github.com/nrf110/deepmerge.git" - }, - "main": "index", - "engines": { - "node": ">=0.4.0" - }, - "scripts": { - "test": "tap test/*.js" - }, - "dependencies": {}, - "devDependencies": { - "tap": "~0.2.4" - }, - "readme": "deepmerge\n=========\n\nMerge the enumerable attributes of two objects deeply.\n\nexample\n=======\n\n```js\nvar util = require('util')\nvar merge = require('deepmerge')\n\nvar x = { foo: { bar: 3 },\n array: [ { does: 'work', too: [ 1, 2, 3 ] } ] }\nvar y = { foo: { baz: 4 },\n quux: 5,\n array: [ { does: 'work', too: [ 4, 5, 6 ] }, { really: 'yes' } ] }\n\nconsole.log(util.inspect(merge(x, y), false, null))\n```\n\noutput:\n\n```js\n{ foo: { bar: 3, baz: 4 },\n array: [ { does: 'work', too: [ 1, 2, 3, 4, 5, 6 ] }, { really: 'yes' } ],\n quux: 5 }\n```\n\nmethods\n=======\n\nvar merge = require('deepmerge')\n\nmerge(x, y)\n-----------\n\nMerge two objects `x` and `y` deeply, returning a new merged object with the\nelements from both `x` and `y`.\n\nIf an element at the same key is present for both `x` and `y`, the value from\n`y` will appear in the result.\n\nThe merge is immutable, so neither `x` nor `y` will be modified.\n\nThe merge will also merge arrays and array values.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install deepmerge\n```\n\ntest\n====\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm test\n```\n", - "readmeFilename": "README.markdown", - "bugs": { - "url": "https://github.com/nrf110/deepmerge/issues" - }, - "_id": "deepmerge@0.2.7", - "dist": { - "shasum": "3a5ab8d37311c4d1aefb22209693afe0a91a0563" - }, - "_from": "deepmerge@~0.2.7", - "_resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-0.2.7.tgz" -} diff --git a/node_modules/gulp-uglify/node_modules/deepmerge/test/merge.js b/node_modules/gulp-uglify/node_modules/deepmerge/test/merge.js deleted file mode 100644 index 2930a9e5..00000000 --- a/node_modules/gulp-uglify/node_modules/deepmerge/test/merge.js +++ /dev/null @@ -1,211 +0,0 @@ -var merge = require('../') -var test = require('tap').test - -test('add keys in target that do not exist at the root', function (t) { - var src = { key1: 'value1', key2: 'value2' } - target = {} - - var res = merge(target, src) - - t.deepEqual(target, {}, 'merge should be immutable') - t.deepEqual(res, src) - t.end() -}) - -test('merge existing simple keys in target at the roots', function (t) { - var src = { key1: 'changed', key2: 'value2' } - var target = { key1: 'value1', key3: 'value3' } - - var expected = { - key1: 'changed', - key2: 'value2', - key3: 'value3' - } - - t.deepEqual(target, { key1: 'value1', key3: 'value3' }) - t.deepEqual(merge(target, src), expected) - t.end() -}) - -test('merge nested objects into target', function (t) { - var src = { - key1: { - subkey1: 'changed', - subkey3: 'added' - } - } - var target = { - key1: { - subkey1: 'value1', - subkey2: 'value2' - } - } - - var expected = { - key1: { - subkey1: 'changed', - subkey2: 'value2', - subkey3: 'added' - } - } - - t.deepEqual(target, { - key1: { - subkey1: 'value1', - subkey2: 'value2' - } - }) - t.deepEqual(merge(target, src), expected) - t.end() -}) - -test('replace simple key with nested object in target', function (t) { - var src = { - key1: { - subkey1: 'subvalue1', - subkey2: 'subvalue2' - } - } - var target = { - key1: 'value1', - key2: 'value2' - } - - var expected = { - key1: { - subkey1: 'subvalue1', - subkey2: 'subvalue2' - }, - key2: 'value2' - } - - t.deepEqual(target, { key1: 'value1', key2: 'value2' }) - t.deepEqual(merge(target, src), expected) - t.end() -}) - -test('should add nested object in target', function(t) { - var src = { - "b": { - "c": {} - } - } - - var target = { - "a": {} - } - - var expected = { - "a": {}, - "b": { - "c": {} - } - } - - t.deepEqual(merge(target, src), expected) - t.end() -}) - -test('should replace object with simple key in target', function (t) { - var src = { key1: 'value1' } - var target = { - key1: { - subkey1: 'subvalue1', - subkey2: 'subvalue2' - }, - key2: 'value2' - } - - var expected = { key1: 'value1', key2: 'value2' } - - t.deepEqual(target, { - key1: { - subkey1: 'subvalue1', - subkey2: 'subvalue2' - }, - key2: 'value2' - }) - t.deepEqual(merge(target, src), expected) - t.end() -}) - -test('should work on simple array', function (t) { - var src = ['one', 'three'] - var target = ['one', 'two'] - - var expected = ['one', 'two', 'three'] - - t.deepEqual(target, ['one', 'two']) - t.deepEqual(merge(target, src), expected) - t.ok(Array.isArray(merge(target, src))) - t.end() -}) - -test('should work on array properties', function (t) { - var src = { - key1: ['one', 'three'], - key2: ['four'] - } - var target = { - key1: ['one', 'two'] - } - - var expected = { - key1: ['one', 'two', 'three'], - key2: ['four'] - } - - t.deepEqual(target, { - key1: ['one', 'two'] - }) - - t.deepEqual(merge(target, src), expected) - t.ok(Array.isArray(merge(target, src).key1)) - t.ok(Array.isArray(merge(target, src).key2)) - t.end() -}) - -test('should work on array of objects', function (t) { - var src = [ - { key1: ['one', 'three'], key2: ['one'] }, - { key3: ['five'] } - ] - var target = [ - { key1: ['one', 'two'] }, - { key3: ['four'] } - ] - - var expected = [ - { key1: ['one', 'two', 'three'], key2: ['one'] }, - { key3: ['four', 'five'] } - ] - - t.deepEqual(target, [ - { key1: ['one', 'two'] }, - { key3: ['four'] } - ]) - t.deepEqual(merge(target, src), expected) - t.ok(Array.isArray(merge(target, src)), 'result should be an array') - t.ok(Array.isArray(merge(target, src)[0].key1), 'subkey should be an array too') - - t.end() -}) - -test('should work on arrays of nested objects', function(t) { - var target = [ - { key1: { subkey: 'one' }} - ] - - var src = [ - { key1: { subkey: 'two' }}, - { key2: { subkey: 'three' }} - ] - - var expected = [ - { key1: { subkey: 'two' }}, - { key2: { subkey: 'three' }} - ] - - t.deepEqual(merge(target, src), expected) - t.end() -}) diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/.npmignore b/node_modules/gulp-uglify/node_modules/gulp-util/.npmignore deleted file mode 100644 index b5ef13a3..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -.DS_Store -*.log -node_modules -build -*.node -components \ No newline at end of file diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/.travis.yml b/node_modules/gulp-uglify/node_modules/gulp-util/.travis.yml deleted file mode 100644 index 33ad9f8c..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.9" - - "0.10" -after_script: - - npm run coveralls \ No newline at end of file diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/LICENSE b/node_modules/gulp-uglify/node_modules/gulp-util/LICENSE deleted file mode 100755 index 7cbe012c..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2014 Fractal - -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/node_modules/gulp-uglify/node_modules/gulp-util/README.md b/node_modules/gulp-uglify/node_modules/gulp-util/README.md deleted file mode 100644 index fd0e506e..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/README.md +++ /dev/null @@ -1,166 +0,0 @@ -# gulp-util [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/gulpjs/gulp-util.png?theme=shields.io)](https://david-dm.org/gulpjs/gulp-util) - -## Information - - - - - - - - - - - - - -
      Packagegulp-util
      DescriptionUtility functions for gulp plugins
      Node Version>= 0.9
      - -## Usage - -```javascript -var gutil = require('gulp-util'); - -gutil.log('stuff happened', 'Really it did', gutil.colors.cyan('123')); -gutil.beep(); - -gutil.replaceExtension('file.coffee', '.js'); // file.js - -var opt = { - name: 'todd', - file: someGulpFile -}; -gutil.template('test <%= name %> <%= file.path %>', opt) // test todd /js/hi.js -``` - -### log(msg...) - -Logs stuff. Already prefixed with [gulp] and all that. Use the right colors for values. If you pass in multiple arguments it will join them by a space. - -``` -values (files, module names, etc.) = magenta -numbers (times, counts, etc) = cyan -``` - -### colors - -This is an instance of [chalk](https://github.com/sindresorhus/chalk) - -### date - -This is an instance of [node-dateformat](https://github.com/felixge/node-dateformat). - -### linefeed - -Just `\n`. Use this. - -### replaceExtension(path, newExtension) - -Replaces a file extension in a path. Returns the new path. - -### isStream(obj) - -Returns true or false if an object is a stream. - -### isBuffer(obj) - -Returns true or false if an object is a Buffer. - -### template(string[, data]) - -This is a lodash.template function wrapper. You must pass in a valid gulp file object so it is available to the user or it will error. You can not configure any of the delimiters. Look at the [lodash docs](http://lodash.com/docs#template) for more info. - -## new File(obj) - -This is just [vinyl](https://github.com/wearefractal/vinyl) - -```javascript -var file = new gutil.File({ - base: join(__dirname, './fixtures/'), - cwd: __dirname, - path: join(__dirname, './fixtures/test.coffee') -}); -``` - -## noop() - -Returns a stream that does nothing but pass data straight through. - -```javascript -gulp.task('scripts', function() { - gulp.src('src/**/*.js') - .pipe(concat('script.js')) - .pipe(gulp.env.production ? uglify() : gutil.noop()) - .pipe(gulp.dest('dist/'); -}); -``` - -## combine(streams...) - -Argument may also be an array of streams. Returns a function that returns the combined stream. Useful for keeping things DRY. This is a simple wrapper around event-stream's `.pipeline` - -```javascript -var scripts = gutil.combine( - coffee({bare: true}), - uglify(), - concat('script.js'), - gulp.dest('dist/') -); - -gulp.task('default', function() { - gulp.src('*.coffee').pipe(scripts()); -}); -``` - -## buffer(cb) - -This is similar to es.wait but instead of buffering text into one string it buffers anything into an array (so very useful for file objects). - -Returns a stream that can be piped to. - -The stream will emit one data event after the stream piped to it has ended. The data will be the same array passed to the callback. - -Callback is optional and receives two arguments: error and data - -```javascript -gulp.src('stuff/*.js') - .pipe(gutil.buffer(function(err, files){ - - }); -``` - -## new PluginError(pluginName, message[, options]) - -- pluginName should be the module name of your plugin -- message can be a string or an existing error -- By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error. -- If you pass an error in as the message the stack will be pulled from that, otherwise one will be created. - -These are all acceptable forms of instantiation: - -```javascript -var err = new gutil.PluginError('test', { - message: 'something broke' -}); - -var err = new gutil.PluginError({ - plugin: 'test', - message: 'something broke' -}); - -var err = new gutil.PluginError('test', 'something broke'); - -var err = new gutil.PluginError('test', 'something broke', {showStack: true}); - -var existingError = new Error('OMG'); -var err = new gutil.PluginError('test', existingError, {showStack: true}); -``` - -[npm-url]: https://npmjs.org/package/gulp-util -[npm-image]: https://badge.fury.io/js/gulp-util.png -[travis-url]: https://travis-ci.org/gulpjs/gulp-util -[travis-image]: https://travis-ci.org/gulpjs/gulp-util.png?branch=master -[coveralls-url]: https://coveralls.io/r/gulpjs/gulp-util -[coveralls-image]: https://coveralls.io/repos/gulpjs/gulp-util/badge.png -[depstat-url]: https://david-dm.org/gulpjs/gulp-util -[depstat-image]: https://david-dm.org/gulpjs/gulp-util.png diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/index.js b/node_modules/gulp-uglify/node_modules/gulp-util/index.js deleted file mode 100644 index 6746ee4b..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/index.js +++ /dev/null @@ -1,18 +0,0 @@ -module.exports = { - File: require('./lib/File'), - replaceExtension: require('./lib/replaceExtension'), - colors: require('./lib/colors'), - date: require('./lib/date'), - log: require('./lib/log'), - template: require('./lib/template'), - env: require('./lib/env'), - beep: require('./lib/beep'), - noop: require('./lib/noop'), - isStream: require('./lib/isStream'), - isBuffer: require('./lib/isBuffer'), - isNull: require('./lib/isNull'), - linefeed: require('./lib/linefeed'), - combine: require('./lib/combine'), - buffer: require('./lib/buffer'), - PluginError: require('./lib/PluginError') -}; \ No newline at end of file diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/lib/File.js b/node_modules/gulp-uglify/node_modules/gulp-util/lib/File.js deleted file mode 100644 index 690a508a..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/lib/File.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('vinyl'); \ No newline at end of file diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/lib/PluginError.js b/node_modules/gulp-uglify/node_modules/gulp-util/lib/PluginError.js deleted file mode 100644 index 96555672..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/lib/PluginError.js +++ /dev/null @@ -1,65 +0,0 @@ -var util = require('util'); -var colors = require('./colors'); - -// wow what a clusterfuck -var parseOptions = function(plugin, message, opt) { - if (!opt) opt = {}; - if (typeof plugin === 'object') { - opt = plugin; - } else if (message instanceof Error) { - opt.message = message; - opt.plugin = plugin; - } else if (typeof message === 'object') { - opt = message; - opt.plugin = plugin; - } else if (typeof opt === 'object') { - opt.plugin = plugin; - opt.message = message; - } - return opt; -}; - -function PluginError(plugin, message, opt) { - if (!(this instanceof PluginError)) throw new Error('Call PluginError using new'); - - Error.call(this); - - var options = parseOptions(plugin, message, opt); - - this.plugin = options.plugin; - this.showStack = options.showStack; - - // if message is an Error grab crap off it - if (options.message instanceof Error) { - this.name = options.message.name; - this.message = options.message.message; - this.fileName = options.message.fileName; - this.lineNumber = options.message.lineNumber; - this.stack = options.message.stack; - } else { // else check options obj - this.name = options.name; - this.message = options.message; - this.fileName = options.fileName; - this.lineNumber = options.lineNumber; - this.stack = options.stack; - } - - // defaults - if (!this.name) this.name = 'Error'; - - // TODO: figure out why this explodes mocha - if (!this.stack) Error.captureStackTrace(this, arguments.callee || this.constructor); - - if (!this.plugin) throw new Error('Missing plugin name'); - if (!this.message) throw new Error('Missing error message'); -} - -util.inherits(PluginError, Error); - -PluginError.prototype.toString = function () { - var sig = '['+colors.green('gulp')+'] '+this.name+' in plugin \''+colors.cyan(this.plugin)+'\''; - var msg = this.showStack ? (this._stack || this.stack) : this.message; - return sig+': '+msg; -}; - -module.exports = PluginError; \ No newline at end of file diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/lib/beep.js b/node_modules/gulp-uglify/node_modules/gulp-util/lib/beep.js deleted file mode 100644 index 5473d754..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/lib/beep.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function() { - process.stdout.write('\x07'); -}; diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/lib/buffer.js b/node_modules/gulp-uglify/node_modules/gulp-util/lib/buffer.js deleted file mode 100644 index 4cb064ac..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/lib/buffer.js +++ /dev/null @@ -1,15 +0,0 @@ -var through = require('through2'); - -module.exports = function(fn) { - var buf = []; - var end = function(cb) { - this.push(buf); - cb(); - if(fn) fn(null, buf); - }; - var push = function(data, enc, cb) { - buf.push(data); - cb(); - }; - return through.obj(push, end); -}; \ No newline at end of file diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/lib/colors.js b/node_modules/gulp-uglify/node_modules/gulp-util/lib/colors.js deleted file mode 100644 index bc804940..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/lib/colors.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('chalk'); \ No newline at end of file diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/lib/combine.js b/node_modules/gulp-uglify/node_modules/gulp-util/lib/combine.js deleted file mode 100644 index f20712d2..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/lib/combine.js +++ /dev/null @@ -1,11 +0,0 @@ -var pipeline = require('multipipe'); - -module.exports = function(){ - var args = arguments; - if (args.length === 1 && Array.isArray(args[0])) { - args = args[0]; - } - return function(){ - return pipeline.apply(pipeline, args); - }; -}; diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/lib/date.js b/node_modules/gulp-uglify/node_modules/gulp-util/lib/date.js deleted file mode 100644 index 935793cc..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/lib/date.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('dateformat'); \ No newline at end of file diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/lib/env.js b/node_modules/gulp-uglify/node_modules/gulp-util/lib/env.js deleted file mode 100644 index ea1e03e4..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/lib/env.js +++ /dev/null @@ -1,4 +0,0 @@ -var parseArgs = require('minimist'); -var argv = parseArgs(process.argv.slice(2)); - -module.exports = argv; \ No newline at end of file diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/lib/isBuffer.js b/node_modules/gulp-uglify/node_modules/gulp-util/lib/isBuffer.js deleted file mode 100644 index 0e23782c..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/lib/isBuffer.js +++ /dev/null @@ -1,7 +0,0 @@ -var buf = require('buffer'); -var Buffer = buf.Buffer; - -// could use Buffer.isBuffer but this is the same exact thing... -module.exports = function(o) { - return typeof o === 'object' && o instanceof Buffer; -}; \ No newline at end of file diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/lib/isNull.js b/node_modules/gulp-uglify/node_modules/gulp-util/lib/isNull.js deleted file mode 100644 index 403bb30e..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/lib/isNull.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function(v) { - return v === null; -}; \ No newline at end of file diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/lib/isStream.js b/node_modules/gulp-uglify/node_modules/gulp-util/lib/isStream.js deleted file mode 100644 index 9ce0929b..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/lib/isStream.js +++ /dev/null @@ -1,5 +0,0 @@ -var Stream = require('stream').Stream; - -module.exports = function(o) { - return !!o && o instanceof Stream; -}; \ No newline at end of file diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/lib/linefeed.js b/node_modules/gulp-uglify/node_modules/gulp-util/lib/linefeed.js deleted file mode 100644 index 5b0dfa4b..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/lib/linefeed.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = '\n'; \ No newline at end of file diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/lib/log.js b/node_modules/gulp-uglify/node_modules/gulp-util/lib/log.js deleted file mode 100644 index cdbb22fc..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/lib/log.js +++ /dev/null @@ -1,9 +0,0 @@ -var colors = require('./colors'); - -module.exports = function(){ - var sig = '['+colors.green('gulp')+']'; - var args = Array.prototype.slice.call(arguments); - args.unshift(sig); - console.log.apply(console, args); - return this; -}; \ No newline at end of file diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/lib/noop.js b/node_modules/gulp-uglify/node_modules/gulp-util/lib/noop.js deleted file mode 100644 index 7862cb16..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/lib/noop.js +++ /dev/null @@ -1,5 +0,0 @@ -var through = require('through2'); - -module.exports = function () { - return through.obj(); -}; diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/lib/replaceExtension.js b/node_modules/gulp-uglify/node_modules/gulp-util/lib/replaceExtension.js deleted file mode 100644 index 3f76938e..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/lib/replaceExtension.js +++ /dev/null @@ -1,9 +0,0 @@ -var path = require('path'); - -module.exports = function(npath, ext) { - if (typeof npath !== 'string') return npath; - if (npath.length === 0) return npath; - - var nFileName = path.basename(npath, path.extname(npath))+ext; - return path.join(path.dirname(npath), nFileName); -}; \ No newline at end of file diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/lib/template.js b/node_modules/gulp-uglify/node_modules/gulp-util/lib/template.js deleted file mode 100644 index c467820f..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/lib/template.js +++ /dev/null @@ -1,19 +0,0 @@ -var template = require('lodash.template'); -var reInterpolate = require('lodash._reinterpolate'); - -var forcedSettings = { - escape: /<%-([\s\S]+?)%>/g, - evaluate: /<%([\s\S]+?)%>/g, - interpolate: reInterpolate -}; - -module.exports = function(tmpl, data){ - var fn = template(tmpl, null, forcedSettings); - - var wrapped = function(o) { - if (typeof o === 'undefined' || typeof o.file === 'undefined') throw new Error('Failed to provide the current file as "file" to the template'); - return fn(o); - }; - - return (data ? wrapped(data) : wrapped); -}; diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/index.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/index.js deleted file mode 100644 index a21f7022..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/index.js +++ /dev/null @@ -1,63 +0,0 @@ -'use strict'; -var ansi = require('ansi-styles'); -var stripAnsi = require('strip-ansi'); -var hasColor = require('has-color'); -var defineProps = Object.defineProperties; -var chalk = module.exports; - -var styles = (function () { - var ret = {}; - - ansi.grey = ansi.gray; - - Object.keys(ansi).forEach(function (key) { - ret[key] = { - get: function () { - this._styles.push(key); - return this; - } - }; - }); - - return ret; -})(); - -function init() { - var ret = {}; - - Object.keys(styles).forEach(function (name) { - ret[name] = { - get: function () { - var obj = defineProps(function self() { - var str = [].slice.call(arguments).join(' '); - - if (!chalk.enabled) { - return str; - } - - return self._styles.reduce(function (str, name) { - var code = ansi[name]; - return str ? code.open + str + code.close : ''; - }, str); - }, styles); - - obj._styles = []; - - return obj[name]; - } - } - }); - - return ret; -} - -defineProps(chalk, init()); - -chalk.styles = ansi; -chalk.stripColor = stripAnsi; -chalk.supportsColor = hasColor; - -// detect mode if not set manually -if (chalk.enabled === undefined) { - chalk.enabled = chalk.supportsColor; -} diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/strip-ansi b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/strip-ansi deleted file mode 120000 index b65c9f81..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/.bin/strip-ansi +++ /dev/null @@ -1 +0,0 @@ -../strip-ansi/cli.js \ No newline at end of file diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js deleted file mode 100644 index 3da548c4..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/ansi-styles.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; -var styles = module.exports; - -var codes = { - reset: [0, 0], - - bold: [1, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - strikethrough: [9, 29], - - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39], - - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49] -}; - -Object.keys(codes).forEach(function (key) { - var val = codes[key]; - var style = styles[key] = {}; - style.open = '\x1b[' + val[0] + 'm'; - style.close = '\x1b[' + val[1] + 'm'; -}); diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/package.json deleted file mode 100644 index 2d61dabe..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "ansi-styles", - "version": "1.0.0", - "description": "ANSI escape codes for colorizing strings in the terminal", - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "homepage": "https://github.com/sindresorhus/ansi-styles", - "bugs": { - "url": "https://github.com/sindresorhus/ansi-styles/issues" - }, - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "ansi-styles.js" - ], - "main": "ansi-styles", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/ansi-styles.git" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "readme": "# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles)\n\n> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for colorizing strings in the terminal.\n\nYou probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings.\n\n![screenshot](screenshot.png)\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles`\n\n\n## Example\n\n```js\nvar ansi = require('ansi-styles');\n\nconsole.log(ansi.green.open + 'Hello world!' + ansi.green.close);\n```\n\n## API\n\nEach style has an `open` and `close` property.\n\n\n## Styles\n\n### General\n\n- reset\n- bold\n- italic\n- underline\n- inverse\n- strikethrough\n\n### Text colors\n\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n\n### Background colors\n\n- bgBlack\n- bgRed\n- bgGreen\n- bgYellow\n- bgBlue\n- bgMagenta\n- bgCyan\n- bgWhite\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "_id": "ansi-styles@1.0.0", - "_from": "ansi-styles@~1.0.0" -} diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/readme.md b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/readme.md deleted file mode 100644 index 4ac8cbd0..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,65 +0,0 @@ -# ansi-styles [![Build Status](https://secure.travis-ci.org/sindresorhus/ansi-styles.png?branch=master)](http://travis-ci.org/sindresorhus/ansi-styles) - -> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for colorizing strings in the terminal. - -You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings. - -![screenshot](screenshot.png) - - -## Install - -Install with [npm](https://npmjs.org/package/ansi-styles): `npm install --save ansi-styles` - - -## Example - -```js -var ansi = require('ansi-styles'); - -console.log(ansi.green.open + 'Hello world!' + ansi.green.close); -``` - -## API - -Each style has an `open` and `close` property. - - -## Styles - -### General - -- reset -- bold -- italic -- underline -- inverse -- strikethrough - -### Text colors - -- black -- red -- green -- yellow -- blue -- magenta -- cyan -- white -- gray - -### Background colors - -- bgBlack -- bgRed -- bgGreen -- bgYellow -- bgBlue -- bgMagenta -- bgCyan -- bgWhite - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/has-color.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/has-color.js deleted file mode 100644 index 27316b1f..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/has-color.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; -module.exports = (function () { - if (process.argv.indexOf('--no-color') !== -1) { - return false; - } - - if (process.argv.indexOf('--color') !== -1) { - return true; - } - - if (!process.stdout.isTTY) { - return false; - } - - if (process.platform === 'win32') { - return true; - } - - if ('COLORTERM' in process.env) { - return true; - } - - return /^screen|^xterm|color|ansi|cygwin|linux/i.test(process.env.TERM); -})(); diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/package.json deleted file mode 100644 index e55a6244..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "has-color", - "version": "0.1.4", - "description": "Detect whether a terminal supports color", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "capability", - "detect" - ], - "homepage": "https://github.com/sindresorhus/has-color", - "bugs": { - "url": "https://github.com/sindresorhus/has-color/issues" - }, - "license": "MIT", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "files": [ - "has-color.js" - ], - "main": "has-color", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/has-color.git" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "mocha": "~1.12.0" - }, - "engines": { - "node": ">=0.8.0" - }, - "readme": "# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color)\n\n> Detect whether a terminal supports color.\n\nUsed in the terminal color module [chalk](https://github.com/sindresorhus/chalk).\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/has-color): `npm install --save has-color`\n\n\n## Example\n\n```js\nvar hasColor = require('has-color');\n\nif (hasColor) {\n\tconsole.log('Terminal supports color.');\n}\n```\n\nIt obeys the CLI flags `--color` and `--no-color`.\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "_id": "has-color@0.1.4", - "_from": "has-color@~0.1.0" -} diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/readme.md b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/readme.md deleted file mode 100644 index 0918c851..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/has-color/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# has-color [![Build Status](https://secure.travis-ci.org/sindresorhus/has-color.png?branch=master)](http://travis-ci.org/sindresorhus/has-color) - -> Detect whether a terminal supports color. - -Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). - - -## Install - -Install with [npm](https://npmjs.org/package/has-color): `npm install --save has-color` - - -## Example - -```js -var hasColor = require('has-color'); - -if (hasColor) { - console.log('Terminal supports color.'); -} -``` - -It obeys the CLI flags `--color` and `--no-color`. - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/cli.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/cli.js deleted file mode 100755 index f8019cda..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/cli.js +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env node -'use strict'; -var fs = require('fs'); -var strip = require('./index'); -var input = process.argv[2]; - -if (process.argv.indexOf('-h') !== -1 || process.argv.indexOf('--help') !== -1) { - console.log('strip-ansi > '); - console.log('or'); - console.log('cat | strip-ansi > '); - return; -} - -if (process.argv.indexOf('-v') !== -1 || process.argv.indexOf('--version') !== -1) { - console.log(require('./package').version); - return; -} - -if (input) { - process.stdout.write(strip(fs.readFileSync(input, 'utf8'))); - return; -} - -process.stdin.setEncoding('utf8'); -process.stdin.on('data', function (data) { - process.stdout.write(strip(data)); -}); diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/index.js b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/index.js deleted file mode 100644 index 62320c59..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -module.exports = function (str) { - return typeof str === 'string' ? str.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, '') : str; -}; diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/package.json deleted file mode 100644 index 7ca2b5d1..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "strip-ansi", - "version": "0.1.1", - "description": "Strip ANSI escape codes (used for colorizing strings in the terminal)", - "license": "MIT", - "bin": { - "strip-ansi": "cli.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/strip-ansi" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.8.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js", - "cli.js" - ], - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "devDependencies": { - "mocha": "~1.x" - }, - "readme": "# strip-ansi [![Build Status](https://secure.travis-ci.org/sindresorhus/strip-ansi.png?branch=master)](http://travis-ci.org/sindresorhus/strip-ansi)\n\n> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) (used for colorizing strings in the terminal)\n\nUsed in the terminal color module [chalk](https://github.com/sindresorhus/chalk).\n\n\n## Install\n\nInstall locally with [npm](https://npmjs.org/package/strip-ansi):\n\n```\nnpm install --save strip-ansi\n```\n\nOr globally if you want to use it as a CLI app:\n\n```\nnpm install --global strip-ansi\n```\n\nYou can then use it in your Terminal like:\n\n```\nstrip-ansi file-with-color-codes\n```\n\nOr pipe something to it:\n\n```\nls | strip-ansi\n```\n\n\n## Example\n\n```js\nvar stripAnsi = require('strip-ansi');\nstripAnsi('\\x1b[4mcake\\x1b[0m');\n//=> cake\n```\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", - "readmeFilename": "readme.md", - "bugs": { - "url": "https://github.com/sindresorhus/strip-ansi/issues" - }, - "homepage": "https://github.com/sindresorhus/strip-ansi", - "_id": "strip-ansi@0.1.1", - "_from": "strip-ansi@~0.1.0" -} diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/readme.md b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/readme.md deleted file mode 100644 index eb661b3d..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/node_modules/strip-ansi/readme.md +++ /dev/null @@ -1,46 +0,0 @@ -# strip-ansi [![Build Status](https://secure.travis-ci.org/sindresorhus/strip-ansi.png?branch=master)](http://travis-ci.org/sindresorhus/strip-ansi) - -> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) (used for colorizing strings in the terminal) - -Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk). - - -## Install - -Install locally with [npm](https://npmjs.org/package/strip-ansi): - -``` -npm install --save strip-ansi -``` - -Or globally if you want to use it as a CLI app: - -``` -npm install --global strip-ansi -``` - -You can then use it in your Terminal like: - -``` -strip-ansi file-with-color-codes -``` - -Or pipe something to it: - -``` -ls | strip-ansi -``` - - -## Example - -```js -var stripAnsi = require('strip-ansi'); -stripAnsi('\x1b[4mcake\x1b[0m'); -//=> cake -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/package.json b/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/package.json deleted file mode 100644 index 853b0144..00000000 --- a/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/chalk/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "chalk", - "version": "0.4.0", - "description": "Terminal string styling done right. Created because the `colors` module does some really horrible things.", - "license": "MIT", - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/chalk" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.8.0" - }, - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js" - ], - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "ansi", - "styles", - "tty", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "has-color": "~0.1.0", - "ansi-styles": "~1.0.0", - "strip-ansi": "~0.1.0" - }, - "devDependencies": { - "mocha": "~1.x" - }, - "readme": "# \"chalk\"\n\n> Terminal string styling done right\n\n[![Build Status](https://secure.travis-ci.org/sindresorhus/chalk.png?branch=master)](http://travis-ci.org/sindresorhus/chalk)\n\n[colors.js](https://github.com/Marak/colors.js) is currently the most popular string styling module, but it has serious deficiencies like extending String.prototype which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough.\n\n**Chalk is a clean and focused alternative.**\n\n![screenshot](screenshot.png)\n\n\n## Why\n\n- **Doesn't extend String.prototype**\n- Expressive API\n- Clean and focused\n- Auto-detects color support\n- Actively maintained\n- [Used by 150+ modules](https://npmjs.org/browse/depended/chalk)\n\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/chalk): `npm install --save chalk`\n\n\n## Example\n\nChalk comes with an easy to use composable API where you just chain and nest the styles you want.\n\n```js\nvar chalk = require('chalk');\n\n// style a string\nconsole.log( chalk.blue('Hello world!') );\n\n// combine styled and normal strings\nconsole.log( chalk.blue('Hello'), 'World' + chalk.red('!') );\n\n// compose multiple styles using the chainable API\nconsole.log( chalk.blue.bgRed.bold('Hello world!') );\n\n// nest styles\nconsole.log( chalk.red('Hello', chalk.underline.bgBlue('world') + '!') );\n\n// pass in multiple arguments\nconsole.log( chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz') );\n```\n\nYou can easily define your own themes.\n\n```js\nvar chalk = require('chalk');\nvar error = chalk.bold.red;\nconsole.log(error('Error!'));\n```\n\n\n## API\n\n### chalk.` \ No newline at end of file diff --git a/node_modules/mocha/lib/reporters/xunit.js b/node_modules/mocha/lib/reporters/xunit.js deleted file mode 100644 index e956380d..00000000 --- a/node_modules/mocha/lib/reporters/xunit.js +++ /dev/null @@ -1,119 +0,0 @@ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils') - , escape = utils.escape; - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Expose `XUnit`. - */ - -exports = module.exports = XUnit; - -/** - * Initialize a new `XUnit` reporter. - * - * @param {Runner} runner - * @api public - */ - -function XUnit(runner) { - Base.call(this, runner); - var stats = this.stats - , tests = [] - , self = this; - - runner.on('pending', function(test){ - tests.push(test); - }); - - runner.on('pass', function(test){ - tests.push(test); - }); - - runner.on('fail', function(test){ - tests.push(test); - }); - - runner.on('end', function(){ - console.log(tag('testsuite', { - name: 'Mocha Tests' - , tests: stats.tests - , failures: stats.failures - , errors: stats.failures - , skipped: stats.tests - stats.failures - stats.passes - , timestamp: (new Date).toUTCString() - , time: (stats.duration / 1000) || 0 - }, false)); - - tests.forEach(test); - console.log(''); - }); -} - -/** - * Inherit from `Base.prototype`. - */ - -XUnit.prototype.__proto__ = Base.prototype; - -/** - * Output tag for the given `test.` - */ - -function test(test) { - var attrs = { - classname: test.parent.fullTitle() - , name: test.title - , time: (test.duration / 1000) || 0 - }; - - if ('failed' == test.state) { - var err = test.err; - attrs.message = escape(err.message); - console.log(tag('testcase', attrs, false, tag('failure', attrs, false, cdata(err.stack)))); - } else if (test.pending) { - console.log(tag('testcase', attrs, false, tag('skipped', {}, true))); - } else { - console.log(tag('testcase', attrs, true) ); - } -} - -/** - * HTML tag helper. - */ - -function tag(name, attrs, close, content) { - var end = close ? '/>' : '>' - , pairs = [] - , tag; - - for (var key in attrs) { - pairs.push(key + '="' + escape(attrs[key]) + '"'); - } - - tag = '<' + name + (pairs.length ? ' ' + pairs.join(' ') : '') + end; - if (content) tag += content + ''; -} diff --git a/node_modules/mocha/lib/runnable.js b/node_modules/mocha/lib/runnable.js deleted file mode 100644 index 03b8792b..00000000 --- a/node_modules/mocha/lib/runnable.js +++ /dev/null @@ -1,227 +0,0 @@ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , debug = require('debug')('mocha:runnable') - , milliseconds = require('./ms'); - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Object#toString(). - */ - -var toString = Object.prototype.toString; - -/** - * Expose `Runnable`. - */ - -module.exports = Runnable; - -/** - * Initialize a new `Runnable` with the given `title` and callback `fn`. - * - * @param {String} title - * @param {Function} fn - * @api private - */ - -function Runnable(title, fn) { - this.title = title; - this.fn = fn; - this.async = fn && fn.length; - this.sync = ! this.async; - this._timeout = 2000; - this._slow = 75; - this.timedOut = false; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Runnable.prototype.__proto__ = EventEmitter.prototype; - -/** - * Set & get timeout `ms`. - * - * @param {Number|String} ms - * @return {Runnable|Number} ms or self - * @api private - */ - -Runnable.prototype.timeout = function(ms){ - if (0 == arguments.length) return this._timeout; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('timeout %d', ms); - this._timeout = ms; - if (this.timer) this.resetTimeout(); - return this; -}; - -/** - * Set & get slow `ms`. - * - * @param {Number|String} ms - * @return {Runnable|Number} ms or self - * @api private - */ - -Runnable.prototype.slow = function(ms){ - if (0 === arguments.length) return this._slow; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('timeout %d', ms); - this._slow = ms; - return this; -}; - -/** - * Return the full title generated by recursively - * concatenating the parent's full title. - * - * @return {String} - * @api public - */ - -Runnable.prototype.fullTitle = function(){ - return this.parent.fullTitle() + ' ' + this.title; -}; - -/** - * Clear the timeout. - * - * @api private - */ - -Runnable.prototype.clearTimeout = function(){ - clearTimeout(this.timer); -}; - -/** - * Inspect the runnable void of private properties. - * - * @return {String} - * @api private - */ - -Runnable.prototype.inspect = function(){ - return JSON.stringify(this, function(key, val){ - if ('_' == key[0]) return; - if ('parent' == key) return '#'; - if ('ctx' == key) return '#'; - return val; - }, 2); -}; - -/** - * Reset the timeout. - * - * @api private - */ - -Runnable.prototype.resetTimeout = function(){ - var self = this; - var ms = this.timeout() || 1e9; - - this.clearTimeout(); - this.timer = setTimeout(function(){ - self.callback(new Error('timeout of ' + ms + 'ms exceeded')); - self.timedOut = true; - }, ms); -}; - -/** - * Whitelist these globals for this test run - * - * @api private - */ -Runnable.prototype.globals = function(arr){ - var self = this; - this._allowedGlobals = arr; -}; - -/** - * Run the test and invoke `fn(err)`. - * - * @param {Function} fn - * @api private - */ - -Runnable.prototype.run = function(fn){ - var self = this - , ms = this.timeout() - , start = new Date - , ctx = this.ctx - , finished - , emitted; - - if (ctx) ctx.runnable(this); - - // timeout - if (this.async) { - if (ms) { - this.timer = setTimeout(function(){ - done(new Error('timeout of ' + ms + 'ms exceeded')); - self.timedOut = true; - }, ms); - } - } - - // called multiple times - function multiple(err) { - if (emitted) return; - emitted = true; - self.emit('error', err || new Error('done() called multiple times')); - } - - // finished - function done(err) { - if (self.timedOut) return; - if (finished) return multiple(err); - self.clearTimeout(); - self.duration = new Date - start; - finished = true; - fn(err); - } - - // for .resetTimeout() - this.callback = done; - - // async - if (this.async) { - try { - this.fn.call(ctx, function(err){ - if (err instanceof Error || toString.call(err) === "[object Error]") return done(err); - if (null != err) return done(new Error('done() invoked with non-Error: ' + err)); - done(); - }); - } catch (err) { - done(err); - } - return; - } - - if (this.asyncOnly) { - return done(new Error('--async-only option in use without declaring `done()`')); - } - - // sync - try { - if (!this.pending) this.fn.call(ctx); - this.duration = new Date - start; - fn(); - } catch (err) { - fn(err); - } -}; diff --git a/node_modules/mocha/lib/runner.js b/node_modules/mocha/lib/runner.js deleted file mode 100644 index deb442e1..00000000 --- a/node_modules/mocha/lib/runner.js +++ /dev/null @@ -1,661 +0,0 @@ -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , debug = require('debug')('mocha:runner') - , Test = require('./test') - , utils = require('./utils') - , filter = utils.filter - , keys = utils.keys; - -/** - * Non-enumerable globals. - */ - -var globals = [ - 'setTimeout', - 'clearTimeout', - 'setInterval', - 'clearInterval', - 'XMLHttpRequest', - 'Date' -]; - -/** - * Expose `Runner`. - */ - -module.exports = Runner; - -/** - * Initialize a `Runner` for the given `suite`. - * - * Events: - * - * - `start` execution started - * - `end` execution complete - * - `suite` (suite) test suite execution started - * - `suite end` (suite) all tests (and sub-suites) have finished - * - `test` (test) test execution started - * - `test end` (test) test completed - * - `hook` (hook) hook execution started - * - `hook end` (hook) hook complete - * - `pass` (test) test passed - * - `fail` (test, err) test failed - * - `pending` (test) test pending - * - * @api public - */ - -function Runner(suite) { - var self = this; - this._globals = []; - this._abort = false; - this.suite = suite; - this.total = suite.total(); - this.failures = 0; - this.on('test end', function(test){ self.checkGlobals(test); }); - this.on('hook end', function(hook){ self.checkGlobals(hook); }); - this.grep(/.*/); - this.globals(this.globalProps().concat(extraGlobals())); -} - -/** - * Wrapper for setImmediate, process.nextTick, or browser polyfill. - * - * @param {Function} fn - * @api private - */ - -Runner.immediately = global.setImmediate || process.nextTick; - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Runner.prototype.__proto__ = EventEmitter.prototype; - -/** - * Run tests with full titles matching `re`. Updates runner.total - * with number of tests matched. - * - * @param {RegExp} re - * @param {Boolean} invert - * @return {Runner} for chaining - * @api public - */ - -Runner.prototype.grep = function(re, invert){ - debug('grep %s', re); - this._grep = re; - this._invert = invert; - this.total = this.grepTotal(this.suite); - return this; -}; - -/** - * Returns the number of tests matching the grep search for the - * given suite. - * - * @param {Suite} suite - * @return {Number} - * @api public - */ - -Runner.prototype.grepTotal = function(suite) { - var self = this; - var total = 0; - - suite.eachTest(function(test){ - var match = self._grep.test(test.fullTitle()); - if (self._invert) match = !match; - if (match) total++; - }); - - return total; -}; - -/** - * Return a list of global properties. - * - * @return {Array} - * @api private - */ - -Runner.prototype.globalProps = function() { - var props = utils.keys(global); - - // non-enumerables - for (var i = 0; i < globals.length; ++i) { - if (~utils.indexOf(props, globals[i])) continue; - props.push(globals[i]); - } - - return props; -}; - -/** - * Allow the given `arr` of globals. - * - * @param {Array} arr - * @return {Runner} for chaining - * @api public - */ - -Runner.prototype.globals = function(arr){ - if (0 == arguments.length) return this._globals; - debug('globals %j', arr); - this._globals = this._globals.concat(arr); - return this; -}; - -/** - * Check for global variable leaks. - * - * @api private - */ - -Runner.prototype.checkGlobals = function(test){ - if (this.ignoreLeaks) return; - var ok = this._globals; - - var globals = this.globalProps(); - var isNode = process.kill; - var leaks; - - if (test) { - ok = ok.concat(test._allowedGlobals || []); - } - - if(this.prevGlobalsLength == globals.length) return; - this.prevGlobalsLength = globals.length; - - leaks = filterLeaks(ok, globals); - this._globals = this._globals.concat(leaks); - - if (leaks.length > 1) { - this.fail(test, new Error('global leaks detected: ' + leaks.join(', ') + '')); - } else if (leaks.length) { - this.fail(test, new Error('global leak detected: ' + leaks[0])); - } -}; - -/** - * Fail the given `test`. - * - * @param {Test} test - * @param {Error} err - * @api private - */ - -Runner.prototype.fail = function(test, err){ - ++this.failures; - test.state = 'failed'; - - if ('string' == typeof err) { - err = new Error('the string "' + err + '" was thrown, throw an Error :)'); - } - - this.emit('fail', test, err); -}; - -/** - * Fail the given `hook` with `err`. - * - * Hook failures work in the following pattern: - * - If bail, then exit - * - Failed `before` hook skips all tests in a suite and subsuites, - * but jumps to corresponding `after` hook - * - Failed `before each` hook skips remaining tests in a - * suite and jumps to corresponding `after each` hook, - * which is run only once - * - Failed `after` hook does not alter - * execution order - * - Failed `after each` hook skips remaining tests in a - * suite and subsuites, but executes other `after each` - * hooks - * - * @param {Hook} hook - * @param {Error} err - * @api private - */ - -Runner.prototype.failHook = function(hook, err){ - this.fail(hook, err); - if (this.suite.bail()) { - this.emit('end'); - } -}; - -/** - * Run hook `name` callbacks and then invoke `fn()`. - * - * @param {String} name - * @param {Function} function - * @api private - */ - -Runner.prototype.hook = function(name, fn){ - var suite = this.suite - , hooks = suite['_' + name] - , self = this - , timer; - - function next(i) { - var hook = hooks[i]; - if (!hook) return fn(); - if (self.failures && suite.bail()) return fn(); - self.currentRunnable = hook; - - hook.ctx.currentTest = self.test; - - self.emit('hook', hook); - - hook.on('error', function(err){ - self.failHook(hook, err); - }); - - hook.run(function(err){ - hook.removeAllListeners('error'); - var testError = hook.error(); - if (testError) self.fail(self.test, testError); - if (err) { - self.failHook(hook, err); - - // stop executing hooks, notify callee of hook err - return fn(err); - } - self.emit('hook end', hook); - delete hook.ctx.currentTest; - next(++i); - }); - } - - Runner.immediately(function(){ - next(0); - }); -}; - -/** - * Run hook `name` for the given array of `suites` - * in order, and callback `fn(err, errSuite)`. - * - * @param {String} name - * @param {Array} suites - * @param {Function} fn - * @api private - */ - -Runner.prototype.hooks = function(name, suites, fn){ - var self = this - , orig = this.suite; - - function next(suite) { - self.suite = suite; - - if (!suite) { - self.suite = orig; - return fn(); - } - - self.hook(name, function(err){ - if (err) { - var errSuite = self.suite; - self.suite = orig; - return fn(err, errSuite); - } - - next(suites.pop()); - }); - } - - next(suites.pop()); -}; - -/** - * Run hooks from the top level down. - * - * @param {String} name - * @param {Function} fn - * @api private - */ - -Runner.prototype.hookUp = function(name, fn){ - var suites = [this.suite].concat(this.parents()).reverse(); - this.hooks(name, suites, fn); -}; - -/** - * Run hooks from the bottom up. - * - * @param {String} name - * @param {Function} fn - * @api private - */ - -Runner.prototype.hookDown = function(name, fn){ - var suites = [this.suite].concat(this.parents()); - this.hooks(name, suites, fn); -}; - -/** - * Return an array of parent Suites from - * closest to furthest. - * - * @return {Array} - * @api private - */ - -Runner.prototype.parents = function(){ - var suite = this.suite - , suites = []; - while (suite = suite.parent) suites.push(suite); - return suites; -}; - -/** - * Run the current test and callback `fn(err)`. - * - * @param {Function} fn - * @api private - */ - -Runner.prototype.runTest = function(fn){ - var test = this.test - , self = this; - - if (this.asyncOnly) test.asyncOnly = true; - - try { - test.on('error', function(err){ - self.fail(test, err); - }); - test.run(fn); - } catch (err) { - fn(err); - } -}; - -/** - * Run tests in the given `suite` and invoke - * the callback `fn()` when complete. - * - * @param {Suite} suite - * @param {Function} fn - * @api private - */ - -Runner.prototype.runTests = function(suite, fn){ - var self = this - , tests = suite.tests.slice() - , test; - - - function hookErr(err, errSuite, after) { - // before/after Each hook for errSuite failed: - var orig = self.suite; - - // for failed 'after each' hook start from errSuite parent, - // otherwise start from errSuite itself - self.suite = after ? errSuite.parent : errSuite; - - if (self.suite) { - // call hookUp afterEach - self.hookUp('afterEach', function(err2, errSuite2) { - self.suite = orig; - // some hooks may fail even now - if (err2) return hookErr(err2, errSuite2, true); - // report error suite - fn(errSuite); - }); - } else { - // there is no need calling other 'after each' hooks - self.suite = orig; - fn(errSuite); - } - } - - function next(err, errSuite) { - // if we bail after first err - if (self.failures && suite._bail) return fn(); - - if (self._abort) return fn(); - - if (err) return hookErr(err, errSuite, true); - - // next test - test = tests.shift(); - - // all done - if (!test) return fn(); - - // grep - var match = self._grep.test(test.fullTitle()); - if (self._invert) match = !match; - if (!match) return next(); - - // pending - if (test.pending) { - self.emit('pending', test); - self.emit('test end', test); - return next(); - } - - // execute test and hook(s) - self.emit('test', self.test = test); - self.hookDown('beforeEach', function(err, errSuite){ - - if (err) return hookErr(err, errSuite, false); - - self.currentRunnable = self.test; - self.runTest(function(err){ - test = self.test; - - if (err) { - self.fail(test, err); - self.emit('test end', test); - return self.hookUp('afterEach', next); - } - - test.state = 'passed'; - self.emit('pass', test); - self.emit('test end', test); - self.hookUp('afterEach', next); - }); - }); - } - - this.next = next; - next(); -}; - -/** - * Run the given `suite` and invoke the - * callback `fn()` when complete. - * - * @param {Suite} suite - * @param {Function} fn - * @api private - */ - -Runner.prototype.runSuite = function(suite, fn){ - var total = this.grepTotal(suite) - , self = this - , i = 0; - - debug('run suite %s', suite.fullTitle()); - - if (!total) return fn(); - - this.emit('suite', this.suite = suite); - - function next(errSuite) { - if (errSuite) { - // current suite failed on a hook from errSuite - if (errSuite == suite) { - // if errSuite is current suite - // continue to the next sibling suite - return done(); - } else { - // errSuite is among the parents of current suite - // stop execution of errSuite and all sub-suites - return done(errSuite); - } - } - - if (self._abort) return done(); - - var curr = suite.suites[i++]; - if (!curr) return done(); - self.runSuite(curr, next); - } - - function done(errSuite) { - self.suite = suite; - self.hook('afterAll', function(){ - self.emit('suite end', suite); - fn(errSuite); - }); - } - - this.hook('beforeAll', function(err){ - if (err) return done(); - self.runTests(suite, next); - }); -}; - -/** - * Handle uncaught exceptions. - * - * @param {Error} err - * @api private - */ - -Runner.prototype.uncaught = function(err){ - debug('uncaught exception %s', err.message); - var runnable = this.currentRunnable; - if (!runnable || 'failed' == runnable.state) return; - runnable.clearTimeout(); - err.uncaught = true; - this.fail(runnable, err); - - // recover from test - if ('test' == runnable.type) { - this.emit('test end', runnable); - this.hookUp('afterEach', this.next); - return; - } - - // bail on hooks - this.emit('end'); -}; - -/** - * Run the root suite and invoke `fn(failures)` - * on completion. - * - * @param {Function} fn - * @return {Runner} for chaining - * @api public - */ - -Runner.prototype.run = function(fn){ - var self = this - , fn = fn || function(){}; - - function uncaught(err){ - self.uncaught(err); - } - - debug('start'); - - // callback - this.on('end', function(){ - debug('end'); - process.removeListener('uncaughtException', uncaught); - fn(self.failures); - }); - - // run suites - this.emit('start'); - this.runSuite(this.suite, function(){ - debug('finished running'); - self.emit('end'); - }); - - // uncaught exception - process.on('uncaughtException', uncaught); - - return this; -}; - -/** - * Cleanly abort execution - * - * @return {Runner} for chaining - * @api public - */ -Runner.prototype.abort = function(){ - debug('aborting'); - this._abort = true; -} - -/** - * Filter leaks with the given globals flagged as `ok`. - * - * @param {Array} ok - * @param {Array} globals - * @return {Array} - * @api private - */ - -function filterLeaks(ok, globals) { - return filter(globals, function(key){ - // Firefox and Chrome exposes iframes as index inside the window object - if (/^d+/.test(key)) return false; - - // in firefox - // if runner runs in an iframe, this iframe's window.getInterface method not init at first - // it is assigned in some seconds - if (global.navigator && /^getInterface/.test(key)) return false; - - // an iframe could be approached by window[iframeIndex] - // in ie6,7,8 and opera, iframeIndex is enumerable, this could cause leak - if (global.navigator && /^\d+/.test(key)) return false; - - // Opera and IE expose global variables for HTML element IDs (issue #243) - if (/^mocha-/.test(key)) return false; - - var matched = filter(ok, function(ok){ - if (~ok.indexOf('*')) return 0 == key.indexOf(ok.split('*')[0]); - return key == ok; - }); - return matched.length == 0 && (!global.navigator || 'onerror' !== key); - }); -} - -/** - * Array of globals dependent on the environment. - * - * @return {Array} - * @api private - */ - - function extraGlobals() { - if (typeof(process) === 'object' && - typeof(process.version) === 'string') { - - var nodeVersion = process.version.split('.').reduce(function(a, v) { - return a << 8 | v; - }); - - // 'errno' was renamed to process._errno in v0.9.11. - - if (nodeVersion < 0x00090B) { - return ['errno']; - } - } - - return []; - } diff --git a/node_modules/mocha/lib/suite.js b/node_modules/mocha/lib/suite.js deleted file mode 100644 index 869bb88d..00000000 --- a/node_modules/mocha/lib/suite.js +++ /dev/null @@ -1,296 +0,0 @@ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , debug = require('debug')('mocha:suite') - , milliseconds = require('./ms') - , utils = require('./utils') - , Hook = require('./hook'); - -/** - * Expose `Suite`. - */ - -exports = module.exports = Suite; - -/** - * Create a new `Suite` with the given `title` - * and parent `Suite`. When a suite with the - * same title is already present, that suite - * is returned to provide nicer reporter - * and more flexible meta-testing. - * - * @param {Suite} parent - * @param {String} title - * @return {Suite} - * @api public - */ - -exports.create = function(parent, title){ - var suite = new Suite(title, parent.ctx); - suite.parent = parent; - if (parent.pending) suite.pending = true; - title = suite.fullTitle(); - parent.addSuite(suite); - return suite; -}; - -/** - * Initialize a new `Suite` with the given - * `title` and `ctx`. - * - * @param {String} title - * @param {Context} ctx - * @api private - */ - -function Suite(title, ctx) { - this.title = title; - this.ctx = ctx; - this.suites = []; - this.tests = []; - this.pending = false; - this._beforeEach = []; - this._beforeAll = []; - this._afterEach = []; - this._afterAll = []; - this.root = !title; - this._timeout = 2000; - this._slow = 75; - this._bail = false; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Suite.prototype.__proto__ = EventEmitter.prototype; - -/** - * Return a clone of this `Suite`. - * - * @return {Suite} - * @api private - */ - -Suite.prototype.clone = function(){ - var suite = new Suite(this.title); - debug('clone'); - suite.ctx = this.ctx; - suite.timeout(this.timeout()); - suite.slow(this.slow()); - suite.bail(this.bail()); - return suite; -}; - -/** - * Set timeout `ms` or short-hand such as "2s". - * - * @param {Number|String} ms - * @return {Suite|Number} for chaining - * @api private - */ - -Suite.prototype.timeout = function(ms){ - if (0 == arguments.length) return this._timeout; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('timeout %d', ms); - this._timeout = parseInt(ms, 10); - return this; -}; - -/** - * Set slow `ms` or short-hand such as "2s". - * - * @param {Number|String} ms - * @return {Suite|Number} for chaining - * @api private - */ - -Suite.prototype.slow = function(ms){ - if (0 === arguments.length) return this._slow; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('slow %d', ms); - this._slow = ms; - return this; -}; - -/** - * Sets whether to bail after first error. - * - * @parma {Boolean} bail - * @return {Suite|Number} for chaining - * @api private - */ - -Suite.prototype.bail = function(bail){ - if (0 == arguments.length) return this._bail; - debug('bail %s', bail); - this._bail = bail; - return this; -}; - -/** - * Run `fn(test[, done])` before running tests. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.beforeAll = function(fn){ - if (this.pending) return this; - var hook = new Hook('"before all" hook', fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._beforeAll.push(hook); - this.emit('beforeAll', hook); - return this; -}; - -/** - * Run `fn(test[, done])` after running tests. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.afterAll = function(fn){ - if (this.pending) return this; - var hook = new Hook('"after all" hook', fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._afterAll.push(hook); - this.emit('afterAll', hook); - return this; -}; - -/** - * Run `fn(test[, done])` before each test case. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.beforeEach = function(fn){ - if (this.pending) return this; - var hook = new Hook('"before each" hook', fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._beforeEach.push(hook); - this.emit('beforeEach', hook); - return this; -}; - -/** - * Run `fn(test[, done])` after each test case. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.afterEach = function(fn){ - if (this.pending) return this; - var hook = new Hook('"after each" hook', fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._afterEach.push(hook); - this.emit('afterEach', hook); - return this; -}; - -/** - * Add a test `suite`. - * - * @param {Suite} suite - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.addSuite = function(suite){ - suite.parent = this; - suite.timeout(this.timeout()); - suite.slow(this.slow()); - suite.bail(this.bail()); - this.suites.push(suite); - this.emit('suite', suite); - return this; -}; - -/** - * Add a `test` to this suite. - * - * @param {Test} test - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.addTest = function(test){ - test.parent = this; - test.timeout(this.timeout()); - test.slow(this.slow()); - test.ctx = this.ctx; - this.tests.push(test); - this.emit('test', test); - return this; -}; - -/** - * Return the full title generated by recursively - * concatenating the parent's full title. - * - * @return {String} - * @api public - */ - -Suite.prototype.fullTitle = function(){ - if (this.parent) { - var full = this.parent.fullTitle(); - if (full) return full + ' ' + this.title; - } - return this.title; -}; - -/** - * Return the total number of tests. - * - * @return {Number} - * @api public - */ - -Suite.prototype.total = function(){ - return utils.reduce(this.suites, function(sum, suite){ - return sum + suite.total(); - }, 0) + this.tests.length; -}; - -/** - * Iterates through each suite recursively to find - * all tests. Applies a function in the format - * `fn(test)`. - * - * @param {Function} fn - * @return {Suite} - * @api private - */ - -Suite.prototype.eachTest = function(fn){ - utils.forEach(this.tests, fn); - utils.forEach(this.suites, function(suite){ - suite.eachTest(fn); - }); - return this; -}; diff --git a/node_modules/mocha/lib/template.html b/node_modules/mocha/lib/template.html deleted file mode 100644 index 0590d4aa..00000000 --- a/node_modules/mocha/lib/template.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - Mocha - - - - - -
      - - - - - - diff --git a/node_modules/mocha/lib/test.js b/node_modules/mocha/lib/test.js deleted file mode 100644 index 11773e0c..00000000 --- a/node_modules/mocha/lib/test.js +++ /dev/null @@ -1,32 +0,0 @@ - -/** - * Module dependencies. - */ - -var Runnable = require('./runnable'); - -/** - * Expose `Test`. - */ - -module.exports = Test; - -/** - * Initialize a new `Test` with the given `title` and callback `fn`. - * - * @param {String} title - * @param {Function} fn - * @api private - */ - -function Test(title, fn) { - Runnable.call(this, title, fn); - this.pending = !fn; - this.type = 'test'; -} - -/** - * Inherit from `Runnable.prototype`. - */ - -Test.prototype.__proto__ = Runnable.prototype; diff --git a/node_modules/mocha/lib/utils.js b/node_modules/mocha/lib/utils.js deleted file mode 100644 index 37fd5d7e..00000000 --- a/node_modules/mocha/lib/utils.js +++ /dev/null @@ -1,299 +0,0 @@ -/** - * Module dependencies. - */ - -var fs = require('fs') - , path = require('path') - , join = path.join - , debug = require('debug')('mocha:watch'); - -/** - * Ignored directories. - */ - -var ignore = ['node_modules', '.git']; - -/** - * Escape special characters in the given string of html. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function(html){ - return String(html) - .replace(/&/g, '&') - .replace(/"/g, '"') - .replace(//g, '>'); -}; - -/** - * Array#forEach (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @param {Object} scope - * @api private - */ - -exports.forEach = function(arr, fn, scope){ - for (var i = 0, l = arr.length; i < l; i++) - fn.call(scope, arr[i], i); -}; - -/** - * Array#map (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @param {Object} scope - * @api private - */ - -exports.map = function(arr, fn, scope){ - var result = []; - for (var i = 0, l = arr.length; i < l; i++) - result.push(fn.call(scope, arr[i], i)); - return result; -}; - -/** - * Array#indexOf (<=IE8) - * - * @parma {Array} arr - * @param {Object} obj to find index of - * @param {Number} start - * @api private - */ - -exports.indexOf = function(arr, obj, start){ - for (var i = start || 0, l = arr.length; i < l; i++) { - if (arr[i] === obj) - return i; - } - return -1; -}; - -/** - * Array#reduce (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @param {Object} initial value - * @api private - */ - -exports.reduce = function(arr, fn, val){ - var rval = val; - - for (var i = 0, l = arr.length; i < l; i++) { - rval = fn(rval, arr[i], i, arr); - } - - return rval; -}; - -/** - * Array#filter (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @api private - */ - -exports.filter = function(arr, fn){ - var ret = []; - - for (var i = 0, l = arr.length; i < l; i++) { - var val = arr[i]; - if (fn(val, i, arr)) ret.push(val); - } - - return ret; -}; - -/** - * Object.keys (<=IE8) - * - * @param {Object} obj - * @return {Array} keys - * @api private - */ - -exports.keys = Object.keys || function(obj) { - var keys = [] - , has = Object.prototype.hasOwnProperty // for `window` on <=IE8 - - for (var key in obj) { - if (has.call(obj, key)) { - keys.push(key); - } - } - - return keys; -}; - -/** - * Watch the given `files` for changes - * and invoke `fn(file)` on modification. - * - * @param {Array} files - * @param {Function} fn - * @api private - */ - -exports.watch = function(files, fn){ - var options = { interval: 100 }; - files.forEach(function(file){ - debug('file %s', file); - fs.watchFile(file, options, function(curr, prev){ - if (prev.mtime < curr.mtime) fn(file); - }); - }); -}; - -/** - * Ignored files. - */ - -function ignored(path){ - return !~ignore.indexOf(path); -} - -/** - * Lookup files in the given `dir`. - * - * @return {Array} - * @api private - */ - -exports.files = function(dir, ret){ - ret = ret || []; - - fs.readdirSync(dir) - .filter(ignored) - .forEach(function(path){ - path = join(dir, path); - if (fs.statSync(path).isDirectory()) { - exports.files(path, ret); - } else if (path.match(/\.(js|coffee|litcoffee|coffee.md)$/)) { - ret.push(path); - } - }); - - return ret; -}; - -/** - * Compute a slug from the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.slug = function(str){ - return str - .toLowerCase() - .replace(/ +/g, '-') - .replace(/[^-\w]/g, ''); -}; - -/** - * Strip the function definition from `str`, - * and re-indent for pre whitespace. - */ - -exports.clean = function(str) { - str = str - .replace(/\r\n?|[\n\u2028\u2029]/g, "\n").replace(/^\uFEFF/, '') - .replace(/^function *\(.*\) *{/, '') - .replace(/\s+\}$/, ''); - - var spaces = str.match(/^\n?( *)/)[1].length - , tabs = str.match(/^\n?(\t*)/)[1].length - , re = new RegExp('^\n?' + (tabs ? '\t' : ' ') + '{' + (tabs ? tabs : spaces) + '}', 'gm'); - - str = str.replace(re, ''); - - return exports.trim(str); -}; - -/** - * Escape regular expression characters in `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.escapeRegexp = function(str){ - return str.replace(/[-\\^$*+?.()|[\]{}]/g, "\\$&"); -}; - -/** - * Trim the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.trim = function(str){ - return str.replace(/^\s+|\s+$/g, ''); -}; - -/** - * Parse the given `qs`. - * - * @param {String} qs - * @return {Object} - * @api private - */ - -exports.parseQuery = function(qs){ - return exports.reduce(qs.replace('?', '').split('&'), function(obj, pair){ - var i = pair.indexOf('=') - , key = pair.slice(0, i) - , val = pair.slice(++i); - - obj[key] = decodeURIComponent(val); - return obj; - }, {}); -}; - -/** - * Highlight the given string of `js`. - * - * @param {String} js - * @return {String} - * @api private - */ - -function highlight(js) { - return js - .replace(//g, '>') - .replace(/\/\/(.*)/gm, '//$1') - .replace(/('.*?')/gm, '$1') - .replace(/(\d+\.\d+)/gm, '$1') - .replace(/(\d+)/gm, '$1') - .replace(/\bnew *(\w+)/gm, 'new $1') - .replace(/\b(function|new|throw|return|var|if|else)\b/gm, '$1') -} - -/** - * Highlight the contents of tag `name`. - * - * @param {String} name - * @api private - */ - -exports.highlightTags = function(name) { - var code = document.getElementsByTagName(name); - for (var i = 0, len = code.length; i < len; ++i) { - code[i].innerHTML = highlight(code[i].innerHTML); - } -}; diff --git a/node_modules/mocha/mocha.css b/node_modules/mocha/mocha.css deleted file mode 100644 index 42b9798f..00000000 --- a/node_modules/mocha/mocha.css +++ /dev/null @@ -1,270 +0,0 @@ -@charset "utf-8"; - -body { - margin:0; -} - -#mocha { - font: 20px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif; - margin: 60px 50px; -} - -#mocha ul, -#mocha li { - margin: 0; - padding: 0; -} - -#mocha ul { - list-style: none; -} - -#mocha h1, -#mocha h2 { - margin: 0; -} - -#mocha h1 { - margin-top: 15px; - font-size: 1em; - font-weight: 200; -} - -#mocha h1 a { - text-decoration: none; - color: inherit; -} - -#mocha h1 a:hover { - text-decoration: underline; -} - -#mocha .suite .suite h1 { - margin-top: 0; - font-size: .8em; -} - -#mocha .hidden { - display: none; -} - -#mocha h2 { - font-size: 12px; - font-weight: normal; - cursor: pointer; -} - -#mocha .suite { - margin-left: 15px; -} - -#mocha .test { - margin-left: 15px; - overflow: hidden; -} - -#mocha .test.pending:hover h2::after { - content: '(pending)'; - font-family: arial, sans-serif; -} - -#mocha .test.pass.medium .duration { - background: #c09853; -} - -#mocha .test.pass.slow .duration { - background: #b94a48; -} - -#mocha .test.pass::before { - content: '✓'; - font-size: 12px; - display: block; - float: left; - margin-right: 5px; - color: #00d6b2; -} - -#mocha .test.pass .duration { - font-size: 9px; - margin-left: 5px; - padding: 2px 5px; - color: #fff; - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.2); - -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.2); - box-shadow: inset 0 1px 1px rgba(0,0,0,.2); - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - -ms-border-radius: 5px; - -o-border-radius: 5px; - border-radius: 5px; -} - -#mocha .test.pass.fast .duration { - display: none; -} - -#mocha .test.pending { - color: #0b97c4; -} - -#mocha .test.pending::before { - content: '◦'; - color: #0b97c4; -} - -#mocha .test.fail { - color: #c00; -} - -#mocha .test.fail pre { - color: black; -} - -#mocha .test.fail::before { - content: '✖'; - font-size: 12px; - display: block; - float: left; - margin-right: 5px; - color: #c00; -} - -#mocha .test pre.error { - color: #c00; - max-height: 300px; - overflow: auto; -} - -/** - * (1): approximate for browsers not supporting calc - * (2): 42 = 2*15 + 2*10 + 2*1 (padding + margin + border) - * ^^ seriously - */ -#mocha .test pre { - display: block; - float: left; - clear: left; - font: 12px/1.5 monaco, monospace; - margin: 5px; - padding: 15px; - border: 1px solid #eee; - max-width: 85%; /*(1)*/ - max-width: calc(100% - 42px); /*(2)*/ - word-wrap: break-word; - border-bottom-color: #ddd; - -webkit-border-radius: 3px; - -webkit-box-shadow: 0 1px 3px #eee; - -moz-border-radius: 3px; - -moz-box-shadow: 0 1px 3px #eee; - border-radius: 3px; -} - -#mocha .test h2 { - position: relative; -} - -#mocha .test a.replay { - position: absolute; - top: 3px; - right: 0; - text-decoration: none; - vertical-align: middle; - display: block; - width: 15px; - height: 15px; - line-height: 15px; - text-align: center; - background: #eee; - font-size: 15px; - -moz-border-radius: 15px; - border-radius: 15px; - -webkit-transition: opacity 200ms; - -moz-transition: opacity 200ms; - transition: opacity 200ms; - opacity: 0.3; - color: #888; -} - -#mocha .test:hover a.replay { - opacity: 1; -} - -#mocha-report.pass .test.fail { - display: none; -} - -#mocha-report.fail .test.pass { - display: none; -} - -#mocha-report.pending .test.pass, -#mocha-report.pending .test.fail { - display: none; -} -#mocha-report.pending .test.pass.pending { - display: block; -} - -#mocha-error { - color: #c00; - font-size: 1.5em; - font-weight: 100; - letter-spacing: 1px; -} - -#mocha-stats { - position: fixed; - top: 15px; - right: 10px; - font-size: 12px; - margin: 0; - color: #888; - z-index: 1; -} - -#mocha-stats .progress { - float: right; - padding-top: 0; -} - -#mocha-stats em { - color: black; -} - -#mocha-stats a { - text-decoration: none; - color: inherit; -} - -#mocha-stats a:hover { - border-bottom: 1px solid #eee; -} - -#mocha-stats li { - display: inline-block; - margin: 0 5px; - list-style: none; - padding-top: 11px; -} - -#mocha-stats canvas { - width: 40px; - height: 40px; -} - -#mocha code .comment { color: #ddd; } -#mocha code .init { color: #2f6fad; } -#mocha code .string { color: #5890ad; } -#mocha code .keyword { color: #8a6343; } -#mocha code .number { color: #2f6fad; } - -@media screen and (max-device-width: 480px) { - #mocha { - margin: 60px 0px; - } - - #mocha #stats { - position: absolute; - } -} diff --git a/node_modules/mocha/mocha.js b/node_modules/mocha/mocha.js deleted file mode 100644 index 3dcdae6c..00000000 --- a/node_modules/mocha/mocha.js +++ /dev/null @@ -1,5812 +0,0 @@ -;(function(){ - -// CommonJS require() - -function require(p){ - var path = require.resolve(p) - , mod = require.modules[path]; - if (!mod) throw new Error('failed to require "' + p + '"'); - if (!mod.exports) { - mod.exports = {}; - mod.call(mod.exports, mod, mod.exports, require.relative(path)); - } - return mod.exports; - } - -require.modules = {}; - -require.resolve = function (path){ - var orig = path - , reg = path + '.js' - , index = path + '/index.js'; - return require.modules[reg] && reg - || require.modules[index] && index - || orig; - }; - -require.register = function (path, fn){ - require.modules[path] = fn; - }; - -require.relative = function (parent) { - return function(p){ - if ('.' != p.charAt(0)) return require(p); - - var path = parent.split('/') - , segs = p.split('/'); - path.pop(); - - for (var i = 0; i < segs.length; i++) { - var seg = segs[i]; - if ('..' == seg) path.pop(); - else if ('.' != seg) path.push(seg); - } - - return require(path.join('/')); - }; - }; - - -require.register("browser/debug.js", function(module, exports, require){ - -module.exports = function(type){ - return function(){ - } -}; - -}); // module: browser/debug.js - -require.register("browser/diff.js", function(module, exports, require){ -/* See LICENSE file for terms of use */ - -/* - * Text diff implementation. - * - * This library supports the following APIS: - * JsDiff.diffChars: Character by character diff - * JsDiff.diffWords: Word (as defined by \b regex) diff which ignores whitespace - * JsDiff.diffLines: Line based diff - * - * JsDiff.diffCss: Diff targeted at CSS content - * - * These methods are based on the implementation proposed in - * "An O(ND) Difference Algorithm and its Variations" (Myers, 1986). - * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927 - */ -var JsDiff = (function() { - /*jshint maxparams: 5*/ - function clonePath(path) { - return { newPos: path.newPos, components: path.components.slice(0) }; - } - function removeEmpty(array) { - var ret = []; - for (var i = 0; i < array.length; i++) { - if (array[i]) { - ret.push(array[i]); - } - } - return ret; - } - function escapeHTML(s) { - var n = s; - n = n.replace(/&/g, '&'); - n = n.replace(//g, '>'); - n = n.replace(/"/g, '"'); - - return n; - } - - var Diff = function(ignoreWhitespace) { - this.ignoreWhitespace = ignoreWhitespace; - }; - Diff.prototype = { - diff: function(oldString, newString) { - // Handle the identity case (this is due to unrolling editLength == 0 - if (newString === oldString) { - return [{ value: newString }]; - } - if (!newString) { - return [{ value: oldString, removed: true }]; - } - if (!oldString) { - return [{ value: newString, added: true }]; - } - - newString = this.tokenize(newString); - oldString = this.tokenize(oldString); - - var newLen = newString.length, oldLen = oldString.length; - var maxEditLength = newLen + oldLen; - var bestPath = [{ newPos: -1, components: [] }]; - - // Seed editLength = 0 - var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); - if (bestPath[0].newPos+1 >= newLen && oldPos+1 >= oldLen) { - return bestPath[0].components; - } - - for (var editLength = 1; editLength <= maxEditLength; editLength++) { - for (var diagonalPath = -1*editLength; diagonalPath <= editLength; diagonalPath+=2) { - var basePath; - var addPath = bestPath[diagonalPath-1], - removePath = bestPath[diagonalPath+1]; - oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; - if (addPath) { - // No one else is going to attempt to use this value, clear it - bestPath[diagonalPath-1] = undefined; - } - - var canAdd = addPath && addPath.newPos+1 < newLen; - var canRemove = removePath && 0 <= oldPos && oldPos < oldLen; - if (!canAdd && !canRemove) { - bestPath[diagonalPath] = undefined; - continue; - } - - // Select the diagonal that we want to branch from. We select the prior - // path whose position in the new string is the farthest from the origin - // and does not pass the bounds of the diff graph - if (!canAdd || (canRemove && addPath.newPos < removePath.newPos)) { - basePath = clonePath(removePath); - this.pushComponent(basePath.components, oldString[oldPos], undefined, true); - } else { - basePath = clonePath(addPath); - basePath.newPos++; - this.pushComponent(basePath.components, newString[basePath.newPos], true, undefined); - } - - var oldPos = this.extractCommon(basePath, newString, oldString, diagonalPath); - - if (basePath.newPos+1 >= newLen && oldPos+1 >= oldLen) { - return basePath.components; - } else { - bestPath[diagonalPath] = basePath; - } - } - } - }, - - pushComponent: function(components, value, added, removed) { - var last = components[components.length-1]; - if (last && last.added === added && last.removed === removed) { - // We need to clone here as the component clone operation is just - // as shallow array clone - components[components.length-1] = - {value: this.join(last.value, value), added: added, removed: removed }; - } else { - components.push({value: value, added: added, removed: removed }); - } - }, - extractCommon: function(basePath, newString, oldString, diagonalPath) { - var newLen = newString.length, - oldLen = oldString.length, - newPos = basePath.newPos, - oldPos = newPos - diagonalPath; - while (newPos+1 < newLen && oldPos+1 < oldLen && this.equals(newString[newPos+1], oldString[oldPos+1])) { - newPos++; - oldPos++; - - this.pushComponent(basePath.components, newString[newPos], undefined, undefined); - } - basePath.newPos = newPos; - return oldPos; - }, - - equals: function(left, right) { - var reWhitespace = /\S/; - if (this.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right)) { - return true; - } else { - return left === right; - } - }, - join: function(left, right) { - return left + right; - }, - tokenize: function(value) { - return value; - } - }; - - var CharDiff = new Diff(); - - var WordDiff = new Diff(true); - var WordWithSpaceDiff = new Diff(); - WordDiff.tokenize = WordWithSpaceDiff.tokenize = function(value) { - return removeEmpty(value.split(/(\s+|\b)/)); - }; - - var CssDiff = new Diff(true); - CssDiff.tokenize = function(value) { - return removeEmpty(value.split(/([{}:;,]|\s+)/)); - }; - - var LineDiff = new Diff(); - LineDiff.tokenize = function(value) { - return value.split(/^/m); - }; - - return { - Diff: Diff, - - diffChars: function(oldStr, newStr) { return CharDiff.diff(oldStr, newStr); }, - diffWords: function(oldStr, newStr) { return WordDiff.diff(oldStr, newStr); }, - diffWordsWithSpace: function(oldStr, newStr) { return WordWithSpaceDiff.diff(oldStr, newStr); }, - diffLines: function(oldStr, newStr) { return LineDiff.diff(oldStr, newStr); }, - - diffCss: function(oldStr, newStr) { return CssDiff.diff(oldStr, newStr); }, - - createPatch: function(fileName, oldStr, newStr, oldHeader, newHeader) { - var ret = []; - - ret.push('Index: ' + fileName); - ret.push('==================================================================='); - ret.push('--- ' + fileName + (typeof oldHeader === 'undefined' ? '' : '\t' + oldHeader)); - ret.push('+++ ' + fileName + (typeof newHeader === 'undefined' ? '' : '\t' + newHeader)); - - var diff = LineDiff.diff(oldStr, newStr); - if (!diff[diff.length-1].value) { - diff.pop(); // Remove trailing newline add - } - diff.push({value: '', lines: []}); // Append an empty value to make cleanup easier - - function contextLines(lines) { - return lines.map(function(entry) { return ' ' + entry; }); - } - function eofNL(curRange, i, current) { - var last = diff[diff.length-2], - isLast = i === diff.length-2, - isLastOfType = i === diff.length-3 && (current.added !== last.added || current.removed !== last.removed); - - // Figure out if this is the last line for the given file and missing NL - if (!/\n$/.test(current.value) && (isLast || isLastOfType)) { - curRange.push('\\ No newline at end of file'); - } - } - - var oldRangeStart = 0, newRangeStart = 0, curRange = [], - oldLine = 1, newLine = 1; - for (var i = 0; i < diff.length; i++) { - var current = diff[i], - lines = current.lines || current.value.replace(/\n$/, '').split('\n'); - current.lines = lines; - - if (current.added || current.removed) { - if (!oldRangeStart) { - var prev = diff[i-1]; - oldRangeStart = oldLine; - newRangeStart = newLine; - - if (prev) { - curRange = contextLines(prev.lines.slice(-4)); - oldRangeStart -= curRange.length; - newRangeStart -= curRange.length; - } - } - curRange.push.apply(curRange, lines.map(function(entry) { return (current.added?'+':'-') + entry; })); - eofNL(curRange, i, current); - - if (current.added) { - newLine += lines.length; - } else { - oldLine += lines.length; - } - } else { - if (oldRangeStart) { - // Close out any changes that have been output (or join overlapping) - if (lines.length <= 8 && i < diff.length-2) { - // Overlapping - curRange.push.apply(curRange, contextLines(lines)); - } else { - // end the range and output - var contextSize = Math.min(lines.length, 4); - ret.push( - '@@ -' + oldRangeStart + ',' + (oldLine-oldRangeStart+contextSize) - + ' +' + newRangeStart + ',' + (newLine-newRangeStart+contextSize) - + ' @@'); - ret.push.apply(ret, curRange); - ret.push.apply(ret, contextLines(lines.slice(0, contextSize))); - if (lines.length <= 4) { - eofNL(ret, i, current); - } - - oldRangeStart = 0; newRangeStart = 0; curRange = []; - } - } - oldLine += lines.length; - newLine += lines.length; - } - } - - return ret.join('\n') + '\n'; - }, - - applyPatch: function(oldStr, uniDiff) { - var diffstr = uniDiff.split('\n'); - var diff = []; - var remEOFNL = false, - addEOFNL = false; - - for (var i = (diffstr[0][0]==='I'?4:0); i < diffstr.length; i++) { - if(diffstr[i][0] === '@') { - var meh = diffstr[i].split(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/); - diff.unshift({ - start:meh[3], - oldlength:meh[2], - oldlines:[], - newlength:meh[4], - newlines:[] - }); - } else if(diffstr[i][0] === '+') { - diff[0].newlines.push(diffstr[i].substr(1)); - } else if(diffstr[i][0] === '-') { - diff[0].oldlines.push(diffstr[i].substr(1)); - } else if(diffstr[i][0] === ' ') { - diff[0].newlines.push(diffstr[i].substr(1)); - diff[0].oldlines.push(diffstr[i].substr(1)); - } else if(diffstr[i][0] === '\\') { - if (diffstr[i-1][0] === '+') { - remEOFNL = true; - } else if(diffstr[i-1][0] === '-') { - addEOFNL = true; - } - } - } - - var str = oldStr.split('\n'); - for (var i = diff.length - 1; i >= 0; i--) { - var d = diff[i]; - for (var j = 0; j < d.oldlength; j++) { - if(str[d.start-1+j] !== d.oldlines[j]) { - return false; - } - } - Array.prototype.splice.apply(str,[d.start-1,+d.oldlength].concat(d.newlines)); - } - - if (remEOFNL) { - while (!str[str.length-1]) { - str.pop(); - } - } else if (addEOFNL) { - str.push(''); - } - return str.join('\n'); - }, - - convertChangesToXML: function(changes){ - var ret = []; - for ( var i = 0; i < changes.length; i++) { - var change = changes[i]; - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - - ret.push(escapeHTML(change.value)); - - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - } - return ret.join(''); - }, - - // See: http://code.google.com/p/google-diff-match-patch/wiki/API - convertChangesToDMP: function(changes){ - var ret = [], change; - for ( var i = 0; i < changes.length; i++) { - change = changes[i]; - ret.push([(change.added ? 1 : change.removed ? -1 : 0), change.value]); - } - return ret; - } - }; -})(); - -if (typeof module !== 'undefined') { - module.exports = JsDiff; -} - -}); // module: browser/diff.js - -require.register("browser/events.js", function(module, exports, require){ - -/** - * Module exports. - */ - -exports.EventEmitter = EventEmitter; - -/** - * Check if `obj` is an array. - */ - -function isArray(obj) { - return '[object Array]' == {}.toString.call(obj); -} - -/** - * Event emitter constructor. - * - * @api public - */ - -function EventEmitter(){}; - -/** - * Adds a listener. - * - * @api public - */ - -EventEmitter.prototype.on = function (name, fn) { - if (!this.$events) { - this.$events = {}; - } - - if (!this.$events[name]) { - this.$events[name] = fn; - } else if (isArray(this.$events[name])) { - this.$events[name].push(fn); - } else { - this.$events[name] = [this.$events[name], fn]; - } - - return this; -}; - -EventEmitter.prototype.addListener = EventEmitter.prototype.on; - -/** - * Adds a volatile listener. - * - * @api public - */ - -EventEmitter.prototype.once = function (name, fn) { - var self = this; - - function on () { - self.removeListener(name, on); - fn.apply(this, arguments); - }; - - on.listener = fn; - this.on(name, on); - - return this; -}; - -/** - * Removes a listener. - * - * @api public - */ - -EventEmitter.prototype.removeListener = function (name, fn) { - if (this.$events && this.$events[name]) { - var list = this.$events[name]; - - if (isArray(list)) { - var pos = -1; - - for (var i = 0, l = list.length; i < l; i++) { - if (list[i] === fn || (list[i].listener && list[i].listener === fn)) { - pos = i; - break; - } - } - - if (pos < 0) { - return this; - } - - list.splice(pos, 1); - - if (!list.length) { - delete this.$events[name]; - } - } else if (list === fn || (list.listener && list.listener === fn)) { - delete this.$events[name]; - } - } - - return this; -}; - -/** - * Removes all listeners for an event. - * - * @api public - */ - -EventEmitter.prototype.removeAllListeners = function (name) { - if (name === undefined) { - this.$events = {}; - return this; - } - - if (this.$events && this.$events[name]) { - this.$events[name] = null; - } - - return this; -}; - -/** - * Gets all listeners for a certain event. - * - * @api public - */ - -EventEmitter.prototype.listeners = function (name) { - if (!this.$events) { - this.$events = {}; - } - - if (!this.$events[name]) { - this.$events[name] = []; - } - - if (!isArray(this.$events[name])) { - this.$events[name] = [this.$events[name]]; - } - - return this.$events[name]; -}; - -/** - * Emits an event. - * - * @api public - */ - -EventEmitter.prototype.emit = function (name) { - if (!this.$events) { - return false; - } - - var handler = this.$events[name]; - - if (!handler) { - return false; - } - - var args = [].slice.call(arguments, 1); - - if ('function' == typeof handler) { - handler.apply(this, args); - } else if (isArray(handler)) { - var listeners = handler.slice(); - - for (var i = 0, l = listeners.length; i < l; i++) { - listeners[i].apply(this, args); - } - } else { - return false; - } - - return true; -}; -}); // module: browser/events.js - -require.register("browser/fs.js", function(module, exports, require){ - -}); // module: browser/fs.js - -require.register("browser/path.js", function(module, exports, require){ - -}); // module: browser/path.js - -require.register("browser/progress.js", function(module, exports, require){ -/** - * Expose `Progress`. - */ - -module.exports = Progress; - -/** - * Initialize a new `Progress` indicator. - */ - -function Progress() { - this.percent = 0; - this.size(0); - this.fontSize(11); - this.font('helvetica, arial, sans-serif'); -} - -/** - * Set progress size to `n`. - * - * @param {Number} n - * @return {Progress} for chaining - * @api public - */ - -Progress.prototype.size = function(n){ - this._size = n; - return this; -}; - -/** - * Set text to `str`. - * - * @param {String} str - * @return {Progress} for chaining - * @api public - */ - -Progress.prototype.text = function(str){ - this._text = str; - return this; -}; - -/** - * Set font size to `n`. - * - * @param {Number} n - * @return {Progress} for chaining - * @api public - */ - -Progress.prototype.fontSize = function(n){ - this._fontSize = n; - return this; -}; - -/** - * Set font `family`. - * - * @param {String} family - * @return {Progress} for chaining - */ - -Progress.prototype.font = function(family){ - this._font = family; - return this; -}; - -/** - * Update percentage to `n`. - * - * @param {Number} n - * @return {Progress} for chaining - */ - -Progress.prototype.update = function(n){ - this.percent = n; - return this; -}; - -/** - * Draw on `ctx`. - * - * @param {CanvasRenderingContext2d} ctx - * @return {Progress} for chaining - */ - -Progress.prototype.draw = function(ctx){ - try { - var percent = Math.min(this.percent, 100) - , size = this._size - , half = size / 2 - , x = half - , y = half - , rad = half - 1 - , fontSize = this._fontSize; - - ctx.font = fontSize + 'px ' + this._font; - - var angle = Math.PI * 2 * (percent / 100); - ctx.clearRect(0, 0, size, size); - - // outer circle - ctx.strokeStyle = '#9f9f9f'; - ctx.beginPath(); - ctx.arc(x, y, rad, 0, angle, false); - ctx.stroke(); - - // inner circle - ctx.strokeStyle = '#eee'; - ctx.beginPath(); - ctx.arc(x, y, rad - 1, 0, angle, true); - ctx.stroke(); - - // text - var text = this._text || (percent | 0) + '%' - , w = ctx.measureText(text).width; - - ctx.fillText( - text - , x - w / 2 + 1 - , y + fontSize / 2 - 1); - } catch (ex) {} //don't fail if we can't render progress - return this; -}; - -}); // module: browser/progress.js - -require.register("browser/tty.js", function(module, exports, require){ - -exports.isatty = function(){ - return true; -}; - -exports.getWindowSize = function(){ - if ('innerHeight' in global) { - return [global.innerHeight, global.innerWidth]; - } else { - // In a Web Worker, the DOM Window is not available. - return [640, 480]; - } -}; - -}); // module: browser/tty.js - -require.register("context.js", function(module, exports, require){ - -/** - * Expose `Context`. - */ - -module.exports = Context; - -/** - * Initialize a new `Context`. - * - * @api private - */ - -function Context(){} - -/** - * Set or get the context `Runnable` to `runnable`. - * - * @param {Runnable} runnable - * @return {Context} - * @api private - */ - -Context.prototype.runnable = function(runnable){ - if (0 == arguments.length) return this._runnable; - this.test = this._runnable = runnable; - return this; -}; - -/** - * Set test timeout `ms`. - * - * @param {Number} ms - * @return {Context} self - * @api private - */ - -Context.prototype.timeout = function(ms){ - this.runnable().timeout(ms); - return this; -}; - -/** - * Set test slowness threshold `ms`. - * - * @param {Number} ms - * @return {Context} self - * @api private - */ - -Context.prototype.slow = function(ms){ - this.runnable().slow(ms); - return this; -}; - -/** - * Inspect the context void of `._runnable`. - * - * @return {String} - * @api private - */ - -Context.prototype.inspect = function(){ - return JSON.stringify(this, function(key, val){ - if ('_runnable' == key) return; - if ('test' == key) return; - return val; - }, 2); -}; - -}); // module: context.js - -require.register("hook.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Runnable = require('./runnable'); - -/** - * Expose `Hook`. - */ - -module.exports = Hook; - -/** - * Initialize a new `Hook` with the given `title` and callback `fn`. - * - * @param {String} title - * @param {Function} fn - * @api private - */ - -function Hook(title, fn) { - Runnable.call(this, title, fn); - this.type = 'hook'; -} - -/** - * Inherit from `Runnable.prototype`. - */ - -function F(){}; -F.prototype = Runnable.prototype; -Hook.prototype = new F; -Hook.prototype.constructor = Hook; - - -/** - * Get or set the test `err`. - * - * @param {Error} err - * @return {Error} - * @api public - */ - -Hook.prototype.error = function(err){ - if (0 == arguments.length) { - var err = this._error; - this._error = null; - return err; - } - - this._error = err; -}; - -}); // module: hook.js - -require.register("interfaces/bdd.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Suite = require('../suite') - , Test = require('../test') - , utils = require('../utils'); - -/** - * BDD-style interface: - * - * describe('Array', function(){ - * describe('#indexOf()', function(){ - * it('should return -1 when not present', function(){ - * - * }); - * - * it('should return the index when present', function(){ - * - * }); - * }); - * }); - * - */ - -module.exports = function(suite){ - var suites = [suite]; - - suite.on('pre-require', function(context, file, mocha){ - - /** - * Execute before running tests. - */ - - context.before = function(fn){ - suites[0].beforeAll(fn); - }; - - /** - * Execute after running tests. - */ - - context.after = function(fn){ - suites[0].afterAll(fn); - }; - - /** - * Execute before each test case. - */ - - context.beforeEach = function(fn){ - suites[0].beforeEach(fn); - }; - - /** - * Execute after each test case. - */ - - context.afterEach = function(fn){ - suites[0].afterEach(fn); - }; - - /** - * Describe a "suite" with the given `title` - * and callback `fn` containing nested suites - * and/or tests. - */ - - context.describe = context.context = function(title, fn){ - var suite = Suite.create(suites[0], title); - suites.unshift(suite); - fn.call(suite); - suites.shift(); - return suite; - }; - - /** - * Pending describe. - */ - - context.xdescribe = - context.xcontext = - context.describe.skip = function(title, fn){ - var suite = Suite.create(suites[0], title); - suite.pending = true; - suites.unshift(suite); - fn.call(suite); - suites.shift(); - }; - - /** - * Exclusive suite. - */ - - context.describe.only = function(title, fn){ - var suite = context.describe(title, fn); - mocha.grep(suite.fullTitle()); - return suite; - }; - - /** - * Describe a specification or test-case - * with the given `title` and callback `fn` - * acting as a thunk. - */ - - context.it = context.specify = function(title, fn){ - var suite = suites[0]; - if (suite.pending) var fn = null; - var test = new Test(title, fn); - suite.addTest(test); - return test; - }; - - /** - * Exclusive test-case. - */ - - context.it.only = function(title, fn){ - var test = context.it(title, fn); - var reString = '^' + utils.escapeRegexp(test.fullTitle()) + '$'; - mocha.grep(new RegExp(reString)); - return test; - }; - - /** - * Pending test case. - */ - - context.xit = - context.xspecify = - context.it.skip = function(title){ - context.it(title); - }; - }); -}; - -}); // module: interfaces/bdd.js - -require.register("interfaces/exports.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Suite = require('../suite') - , Test = require('../test'); - -/** - * TDD-style interface: - * - * exports.Array = { - * '#indexOf()': { - * 'should return -1 when the value is not present': function(){ - * - * }, - * - * 'should return the correct index when the value is present': function(){ - * - * } - * } - * }; - * - */ - -module.exports = function(suite){ - var suites = [suite]; - - suite.on('require', visit); - - function visit(obj) { - var suite; - for (var key in obj) { - if ('function' == typeof obj[key]) { - var fn = obj[key]; - switch (key) { - case 'before': - suites[0].beforeAll(fn); - break; - case 'after': - suites[0].afterAll(fn); - break; - case 'beforeEach': - suites[0].beforeEach(fn); - break; - case 'afterEach': - suites[0].afterEach(fn); - break; - default: - suites[0].addTest(new Test(key, fn)); - } - } else { - var suite = Suite.create(suites[0], key); - suites.unshift(suite); - visit(obj[key]); - suites.shift(); - } - } - } -}; - -}); // module: interfaces/exports.js - -require.register("interfaces/index.js", function(module, exports, require){ - -exports.bdd = require('./bdd'); -exports.tdd = require('./tdd'); -exports.qunit = require('./qunit'); -exports.exports = require('./exports'); - -}); // module: interfaces/index.js - -require.register("interfaces/qunit.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Suite = require('../suite') - , Test = require('../test') - , utils = require('../utils'); - -/** - * QUnit-style interface: - * - * suite('Array'); - * - * test('#length', function(){ - * var arr = [1,2,3]; - * ok(arr.length == 3); - * }); - * - * test('#indexOf()', function(){ - * var arr = [1,2,3]; - * ok(arr.indexOf(1) == 0); - * ok(arr.indexOf(2) == 1); - * ok(arr.indexOf(3) == 2); - * }); - * - * suite('String'); - * - * test('#length', function(){ - * ok('foo'.length == 3); - * }); - * - */ - -module.exports = function(suite){ - var suites = [suite]; - - suite.on('pre-require', function(context, file, mocha){ - - /** - * Execute before running tests. - */ - - context.before = function(fn){ - suites[0].beforeAll(fn); - }; - - /** - * Execute after running tests. - */ - - context.after = function(fn){ - suites[0].afterAll(fn); - }; - - /** - * Execute before each test case. - */ - - context.beforeEach = function(fn){ - suites[0].beforeEach(fn); - }; - - /** - * Execute after each test case. - */ - - context.afterEach = function(fn){ - suites[0].afterEach(fn); - }; - - /** - * Describe a "suite" with the given `title`. - */ - - context.suite = function(title){ - if (suites.length > 1) suites.shift(); - var suite = Suite.create(suites[0], title); - suites.unshift(suite); - return suite; - }; - - /** - * Exclusive test-case. - */ - - context.suite.only = function(title, fn){ - var suite = context.suite(title, fn); - mocha.grep(suite.fullTitle()); - }; - - /** - * Describe a specification or test-case - * with the given `title` and callback `fn` - * acting as a thunk. - */ - - context.test = function(title, fn){ - var test = new Test(title, fn); - suites[0].addTest(test); - return test; - }; - - /** - * Exclusive test-case. - */ - - context.test.only = function(title, fn){ - var test = context.test(title, fn); - var reString = '^' + utils.escapeRegexp(test.fullTitle()) + '$'; - mocha.grep(new RegExp(reString)); - }; - - /** - * Pending test case. - */ - - context.test.skip = function(title){ - context.test(title); - }; - }); -}; - -}); // module: interfaces/qunit.js - -require.register("interfaces/tdd.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Suite = require('../suite') - , Test = require('../test') - , utils = require('../utils');; - -/** - * TDD-style interface: - * - * suite('Array', function(){ - * suite('#indexOf()', function(){ - * suiteSetup(function(){ - * - * }); - * - * test('should return -1 when not present', function(){ - * - * }); - * - * test('should return the index when present', function(){ - * - * }); - * - * suiteTeardown(function(){ - * - * }); - * }); - * }); - * - */ - -module.exports = function(suite){ - var suites = [suite]; - - suite.on('pre-require', function(context, file, mocha){ - - /** - * Execute before each test case. - */ - - context.setup = function(fn){ - suites[0].beforeEach(fn); - }; - - /** - * Execute after each test case. - */ - - context.teardown = function(fn){ - suites[0].afterEach(fn); - }; - - /** - * Execute before the suite. - */ - - context.suiteSetup = function(fn){ - suites[0].beforeAll(fn); - }; - - /** - * Execute after the suite. - */ - - context.suiteTeardown = function(fn){ - suites[0].afterAll(fn); - }; - - /** - * Describe a "suite" with the given `title` - * and callback `fn` containing nested suites - * and/or tests. - */ - - context.suite = function(title, fn){ - var suite = Suite.create(suites[0], title); - suites.unshift(suite); - fn.call(suite); - suites.shift(); - return suite; - }; - - /** - * Pending suite. - */ - context.suite.skip = function(title, fn) { - var suite = Suite.create(suites[0], title); - suite.pending = true; - suites.unshift(suite); - fn.call(suite); - suites.shift(); - }; - - /** - * Exclusive test-case. - */ - - context.suite.only = function(title, fn){ - var suite = context.suite(title, fn); - mocha.grep(suite.fullTitle()); - }; - - /** - * Describe a specification or test-case - * with the given `title` and callback `fn` - * acting as a thunk. - */ - - context.test = function(title, fn){ - var suite = suites[0]; - if (suite.pending) var fn = null; - var test = new Test(title, fn); - suite.addTest(test); - return test; - }; - - /** - * Exclusive test-case. - */ - - context.test.only = function(title, fn){ - var test = context.test(title, fn); - var reString = '^' + utils.escapeRegexp(test.fullTitle()) + '$'; - mocha.grep(new RegExp(reString)); - }; - - /** - * Pending test case. - */ - - context.test.skip = function(title){ - context.test(title); - }; - }); -}; - -}); // module: interfaces/tdd.js - -require.register("mocha.js", function(module, exports, require){ -/*! - * mocha - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var path = require('browser/path') - , utils = require('./utils'); - -/** - * Expose `Mocha`. - */ - -exports = module.exports = Mocha; - -/** - * Expose internals. - */ - -exports.utils = utils; -exports.interfaces = require('./interfaces'); -exports.reporters = require('./reporters'); -exports.Runnable = require('./runnable'); -exports.Context = require('./context'); -exports.Runner = require('./runner'); -exports.Suite = require('./suite'); -exports.Hook = require('./hook'); -exports.Test = require('./test'); - -/** - * Return image `name` path. - * - * @param {String} name - * @return {String} - * @api private - */ - -function image(name) { - return __dirname + '/../images/' + name + '.png'; -} - -/** - * Setup mocha with `options`. - * - * Options: - * - * - `ui` name "bdd", "tdd", "exports" etc - * - `reporter` reporter instance, defaults to `mocha.reporters.Dot` - * - `globals` array of accepted globals - * - `timeout` timeout in milliseconds - * - `bail` bail on the first test failure - * - `slow` milliseconds to wait before considering a test slow - * - `ignoreLeaks` ignore global leaks - * - `grep` string or regexp to filter tests with - * - * @param {Object} options - * @api public - */ - -function Mocha(options) { - options = options || {}; - this.files = []; - this.options = options; - this.grep(options.grep); - this.suite = new exports.Suite('', new exports.Context); - this.ui(options.ui); - this.bail(options.bail); - this.reporter(options.reporter); - if (null != options.timeout) this.timeout(options.timeout); - this.useColors(options.useColors) - if (options.slow) this.slow(options.slow); - - this.suite.on('pre-require', function (context) { - exports.afterEach = context.afterEach || context.teardown; - exports.after = context.after || context.suiteTeardown; - exports.beforeEach = context.beforeEach || context.setup; - exports.before = context.before || context.suiteSetup; - exports.describe = context.describe || context.suite; - exports.it = context.it || context.test; - exports.setup = context.setup || context.beforeEach; - exports.suiteSetup = context.suiteSetup || context.before; - exports.suiteTeardown = context.suiteTeardown || context.after; - exports.suite = context.suite || context.describe; - exports.teardown = context.teardown || context.afterEach; - exports.test = context.test || context.it; - }); -} - -/** - * Enable or disable bailing on the first failure. - * - * @param {Boolean} [bail] - * @api public - */ - -Mocha.prototype.bail = function(bail){ - if (0 == arguments.length) bail = true; - this.suite.bail(bail); - return this; -}; - -/** - * Add test `file`. - * - * @param {String} file - * @api public - */ - -Mocha.prototype.addFile = function(file){ - this.files.push(file); - return this; -}; - -/** - * Set reporter to `reporter`, defaults to "dot". - * - * @param {String|Function} reporter name or constructor - * @api public - */ - -Mocha.prototype.reporter = function(reporter){ - if ('function' == typeof reporter) { - this._reporter = reporter; - } else { - reporter = reporter || 'dot'; - var _reporter; - try { _reporter = require('./reporters/' + reporter); } catch (err) {}; - if (!_reporter) try { _reporter = require(reporter); } catch (err) {}; - if (!_reporter && reporter === 'teamcity') - console.warn('The Teamcity reporter was moved to a package named ' + - 'mocha-teamcity-reporter ' + - '(https://npmjs.org/package/mocha-teamcity-reporter).'); - if (!_reporter) throw new Error('invalid reporter "' + reporter + '"'); - this._reporter = _reporter; - } - return this; -}; - -/** - * Set test UI `name`, defaults to "bdd". - * - * @param {String} bdd - * @api public - */ - -Mocha.prototype.ui = function(name){ - name = name || 'bdd'; - this._ui = exports.interfaces[name]; - if (!this._ui) try { this._ui = require(name); } catch (err) {}; - if (!this._ui) throw new Error('invalid interface "' + name + '"'); - this._ui = this._ui(this.suite); - return this; -}; - -/** - * Load registered files. - * - * @api private - */ - -Mocha.prototype.loadFiles = function(fn){ - var self = this; - var suite = this.suite; - var pending = this.files.length; - this.files.forEach(function(file){ - file = path.resolve(file); - suite.emit('pre-require', global, file, self); - suite.emit('require', require(file), file, self); - suite.emit('post-require', global, file, self); - --pending || (fn && fn()); - }); -}; - -/** - * Enable growl support. - * - * @api private - */ - -Mocha.prototype._growl = function(runner, reporter) { - var notify = require('growl'); - - runner.on('end', function(){ - var stats = reporter.stats; - if (stats.failures) { - var msg = stats.failures + ' of ' + runner.total + ' tests failed'; - notify(msg, { name: 'mocha', title: 'Failed', image: image('error') }); - } else { - notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', { - name: 'mocha' - , title: 'Passed' - , image: image('ok') - }); - } - }); -}; - -/** - * Add regexp to grep, if `re` is a string it is escaped. - * - * @param {RegExp|String} re - * @return {Mocha} - * @api public - */ - -Mocha.prototype.grep = function(re){ - this.options.grep = 'string' == typeof re - ? new RegExp(utils.escapeRegexp(re)) - : re; - return this; -}; - -/** - * Invert `.grep()` matches. - * - * @return {Mocha} - * @api public - */ - -Mocha.prototype.invert = function(){ - this.options.invert = true; - return this; -}; - -/** - * Ignore global leaks. - * - * @param {Boolean} ignore - * @return {Mocha} - * @api public - */ - -Mocha.prototype.ignoreLeaks = function(ignore){ - this.options.ignoreLeaks = !!ignore; - return this; -}; - -/** - * Enable global leak checking. - * - * @return {Mocha} - * @api public - */ - -Mocha.prototype.checkLeaks = function(){ - this.options.ignoreLeaks = false; - return this; -}; - -/** - * Enable growl support. - * - * @return {Mocha} - * @api public - */ - -Mocha.prototype.growl = function(){ - this.options.growl = true; - return this; -}; - -/** - * Ignore `globals` array or string. - * - * @param {Array|String} globals - * @return {Mocha} - * @api public - */ - -Mocha.prototype.globals = function(globals){ - this.options.globals = (this.options.globals || []).concat(globals); - return this; -}; - -/** - * Emit color output. - * - * @param {Boolean} colors - * @return {Mocha} - * @api public - */ - -Mocha.prototype.useColors = function(colors){ - this.options.useColors = arguments.length && colors != undefined - ? colors - : true; - return this; -}; - -/** - * Use inline diffs rather than +/-. - * - * @param {Boolean} inlineDiffs - * @return {Mocha} - * @api public - */ - -Mocha.prototype.useInlineDiffs = function(inlineDiffs) { - this.options.useInlineDiffs = arguments.length && inlineDiffs != undefined - ? inlineDiffs - : false; - return this; -}; - -/** - * Set the timeout in milliseconds. - * - * @param {Number} timeout - * @return {Mocha} - * @api public - */ - -Mocha.prototype.timeout = function(timeout){ - this.suite.timeout(timeout); - return this; -}; - -/** - * Set slowness threshold in milliseconds. - * - * @param {Number} slow - * @return {Mocha} - * @api public - */ - -Mocha.prototype.slow = function(slow){ - this.suite.slow(slow); - return this; -}; - -/** - * Makes all tests async (accepting a callback) - * - * @return {Mocha} - * @api public - */ - -Mocha.prototype.asyncOnly = function(){ - this.options.asyncOnly = true; - return this; -}; - -/** - * Run tests and invoke `fn()` when complete. - * - * @param {Function} fn - * @return {Runner} - * @api public - */ - -Mocha.prototype.run = function(fn){ - if (this.files.length) this.loadFiles(); - var suite = this.suite; - var options = this.options; - var runner = new exports.Runner(suite); - var reporter = new this._reporter(runner); - runner.ignoreLeaks = false !== options.ignoreLeaks; - runner.asyncOnly = options.asyncOnly; - if (options.grep) runner.grep(options.grep, options.invert); - if (options.globals) runner.globals(options.globals); - if (options.growl) this._growl(runner, reporter); - exports.reporters.Base.useColors = options.useColors; - exports.reporters.Base.inlineDiffs = options.useInlineDiffs; - return runner.run(fn); -}; - -}); // module: mocha.js - -require.register("ms.js", function(module, exports, require){ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} options - * @return {String|Number} - * @api public - */ - -module.exports = function(val, options){ - options = options || {}; - if ('string' == typeof val) return parse(val); - return options.long ? longFormat(val) : shortFormat(val); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - var match = /^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(str); - if (!match) return; - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'y': - return n * y; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 's': - return n * s; - case 'ms': - return n; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function shortFormat(ms) { - if (ms >= d) return Math.round(ms / d) + 'd'; - if (ms >= h) return Math.round(ms / h) + 'h'; - if (ms >= m) return Math.round(ms / m) + 'm'; - if (ms >= s) return Math.round(ms / s) + 's'; - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function longFormat(ms) { - return plural(ms, d, 'day') - || plural(ms, h, 'hour') - || plural(ms, m, 'minute') - || plural(ms, s, 'second') - || ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, n, name) { - if (ms < n) return; - if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name; - return Math.ceil(ms / n) + ' ' + name + 's'; -} - -}); // module: ms.js - -require.register("reporters/base.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var tty = require('browser/tty') - , diff = require('browser/diff') - , ms = require('../ms') - , utils = require('../utils'); - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Check if both stdio streams are associated with a tty. - */ - -var isatty = tty.isatty(1) && tty.isatty(2); - -/** - * Expose `Base`. - */ - -exports = module.exports = Base; - -/** - * Enable coloring by default. - */ - -exports.useColors = isatty || (process.env.MOCHA_COLORS !== undefined); - -/** - * Inline diffs instead of +/- - */ - -exports.inlineDiffs = false; - -/** - * Default color map. - */ - -exports.colors = { - 'pass': 90 - , 'fail': 31 - , 'bright pass': 92 - , 'bright fail': 91 - , 'bright yellow': 93 - , 'pending': 36 - , 'suite': 0 - , 'error title': 0 - , 'error message': 31 - , 'error stack': 90 - , 'checkmark': 32 - , 'fast': 90 - , 'medium': 33 - , 'slow': 31 - , 'green': 32 - , 'light': 90 - , 'diff gutter': 90 - , 'diff added': 42 - , 'diff removed': 41 -}; - -/** - * Default symbol map. - */ - -exports.symbols = { - ok: '✓', - err: '✖', - dot: '․' -}; - -// With node.js on Windows: use symbols available in terminal default fonts -if ('win32' == process.platform) { - exports.symbols.ok = '\u221A'; - exports.symbols.err = '\u00D7'; - exports.symbols.dot = '.'; -} - -/** - * Color `str` with the given `type`, - * allowing colors to be disabled, - * as well as user-defined color - * schemes. - * - * @param {String} type - * @param {String} str - * @return {String} - * @api private - */ - -var color = exports.color = function(type, str) { - if (!exports.useColors) return str; - return '\u001b[' + exports.colors[type] + 'm' + str + '\u001b[0m'; -}; - -/** - * Expose term window size, with some - * defaults for when stderr is not a tty. - */ - -exports.window = { - width: isatty - ? process.stdout.getWindowSize - ? process.stdout.getWindowSize(1)[0] - : tty.getWindowSize()[1] - : 75 -}; - -/** - * Expose some basic cursor interactions - * that are common among reporters. - */ - -exports.cursor = { - hide: function(){ - isatty && process.stdout.write('\u001b[?25l'); - }, - - show: function(){ - isatty && process.stdout.write('\u001b[?25h'); - }, - - deleteLine: function(){ - isatty && process.stdout.write('\u001b[2K'); - }, - - beginningOfLine: function(){ - isatty && process.stdout.write('\u001b[0G'); - }, - - CR: function(){ - if (isatty) { - exports.cursor.deleteLine(); - exports.cursor.beginningOfLine(); - } else { - process.stdout.write('\r'); - } - } -}; - -/** - * Outut the given `failures` as a list. - * - * @param {Array} failures - * @api public - */ - -exports.list = function(failures){ - console.error(); - failures.forEach(function(test, i){ - // format - var fmt = color('error title', ' %s) %s:\n') - + color('error message', ' %s') - + color('error stack', '\n%s\n'); - - // msg - var err = test.err - , message = err.message || '' - , stack = err.stack || message - , index = stack.indexOf(message) + message.length - , msg = stack.slice(0, index) - , actual = err.actual - , expected = err.expected - , escape = true; - - // uncaught - if (err.uncaught) { - msg = 'Uncaught ' + msg; - } - - // explicitly show diff - if (err.showDiff && sameType(actual, expected)) { - escape = false; - err.actual = actual = stringify(canonicalize(actual)); - err.expected = expected = stringify(canonicalize(expected)); - } - - // actual / expected diff - if ('string' == typeof actual && 'string' == typeof expected) { - fmt = color('error title', ' %s) %s:\n%s') + color('error stack', '\n%s\n'); - var match = message.match(/^([^:]+): expected/); - msg = '\n ' + color('error message', match ? match[1] : msg); - - if (exports.inlineDiffs) { - msg += inlineDiff(err, escape); - } else { - msg += unifiedDiff(err, escape); - } - } - - // indent stack trace without msg - stack = stack.slice(index ? index + 1 : index) - .replace(/^/gm, ' '); - - console.error(fmt, (i + 1), test.fullTitle(), msg, stack); - }); -}; - -/** - * Initialize a new `Base` reporter. - * - * All other reporters generally - * inherit from this reporter, providing - * stats such as test duration, number - * of tests passed / failed etc. - * - * @param {Runner} runner - * @api public - */ - -function Base(runner) { - var self = this - , stats = this.stats = { suites: 0, tests: 0, passes: 0, pending: 0, failures: 0 } - , failures = this.failures = []; - - if (!runner) return; - this.runner = runner; - - runner.stats = stats; - - runner.on('start', function(){ - stats.start = new Date; - }); - - runner.on('suite', function(suite){ - stats.suites = stats.suites || 0; - suite.root || stats.suites++; - }); - - runner.on('test end', function(test){ - stats.tests = stats.tests || 0; - stats.tests++; - }); - - runner.on('pass', function(test){ - stats.passes = stats.passes || 0; - - var medium = test.slow() / 2; - test.speed = test.duration > test.slow() - ? 'slow' - : test.duration > medium - ? 'medium' - : 'fast'; - - stats.passes++; - }); - - runner.on('fail', function(test, err){ - stats.failures = stats.failures || 0; - stats.failures++; - test.err = err; - failures.push(test); - }); - - runner.on('end', function(){ - stats.end = new Date; - stats.duration = new Date - stats.start; - }); - - runner.on('pending', function(){ - stats.pending++; - }); -} - -/** - * Output common epilogue used by many of - * the bundled reporters. - * - * @api public - */ - -Base.prototype.epilogue = function(){ - var stats = this.stats; - var tests; - var fmt; - - console.log(); - - // passes - fmt = color('bright pass', ' ') - + color('green', ' %d passing') - + color('light', ' (%s)'); - - console.log(fmt, - stats.passes || 0, - ms(stats.duration)); - - // pending - if (stats.pending) { - fmt = color('pending', ' ') - + color('pending', ' %d pending'); - - console.log(fmt, stats.pending); - } - - // failures - if (stats.failures) { - fmt = color('fail', ' %d failing'); - - console.error(fmt, - stats.failures); - - Base.list(this.failures); - console.error(); - } - - console.log(); -}; - -/** - * Pad the given `str` to `len`. - * - * @param {String} str - * @param {String} len - * @return {String} - * @api private - */ - -function pad(str, len) { - str = String(str); - return Array(len - str.length + 1).join(' ') + str; -} - - -/** - * Returns an inline diff between 2 strings with coloured ANSI output - * - * @param {Error} Error with actual/expected - * @return {String} Diff - * @api private - */ - -function inlineDiff(err, escape) { - var msg = errorDiff(err, 'WordsWithSpace', escape); - - // linenos - var lines = msg.split('\n'); - if (lines.length > 4) { - var width = String(lines.length).length; - msg = lines.map(function(str, i){ - return pad(++i, width) + ' |' + ' ' + str; - }).join('\n'); - } - - // legend - msg = '\n' - + color('diff removed', 'actual') - + ' ' - + color('diff added', 'expected') - + '\n\n' - + msg - + '\n'; - - // indent - msg = msg.replace(/^/gm, ' '); - return msg; -} - -/** - * Returns a unified diff between 2 strings - * - * @param {Error} Error with actual/expected - * @return {String} Diff - * @api private - */ - -function unifiedDiff(err, escape) { - var indent = ' '; - function cleanUp(line) { - if (escape) { - line = escapeInvisibles(line); - } - if (line[0] === '+') return indent + colorLines('diff added', line); - if (line[0] === '-') return indent + colorLines('diff removed', line); - if (line.match(/\@\@/)) return null; - if (line.match(/\\ No newline/)) return null; - else return indent + line; - } - function notBlank(line) { - return line != null; - } - msg = diff.createPatch('string', err.actual, err.expected); - var lines = msg.split('\n').splice(4); - return '\n ' - + colorLines('diff added', '+ expected') + ' ' - + colorLines('diff removed', '- actual') - + '\n\n' - + lines.map(cleanUp).filter(notBlank).join('\n'); -} - -/** - * Return a character diff for `err`. - * - * @param {Error} err - * @return {String} - * @api private - */ - -function errorDiff(err, type, escape) { - var actual = escape ? escapeInvisibles(err.actual) : err.actual; - var expected = escape ? escapeInvisibles(err.expected) : err.expected; - return diff['diff' + type](actual, expected).map(function(str){ - if (str.added) return colorLines('diff added', str.value); - if (str.removed) return colorLines('diff removed', str.value); - return str.value; - }).join(''); -} - -/** - * Returns a string with all invisible characters in plain text - * - * @param {String} line - * @return {String} - * @api private - */ -function escapeInvisibles(line) { - return line.replace(/\t/g, '') - .replace(/\r/g, '') - .replace(/\n/g, '\n'); -} - -/** - * Color lines for `str`, using the color `name`. - * - * @param {String} name - * @param {String} str - * @return {String} - * @api private - */ - -function colorLines(name, str) { - return str.split('\n').map(function(str){ - return color(name, str); - }).join('\n'); -} - -/** - * Stringify `obj`. - * - * @param {Object} obj - * @return {String} - * @api private - */ - -function stringify(obj) { - if (obj instanceof RegExp) return obj.toString(); - return JSON.stringify(obj, null, 2); -} - -/** - * Return a new object that has the keys in sorted order. - * @param {Object} obj - * @return {Object} - * @api private - */ - - function canonicalize(obj, stack) { - stack = stack || []; - - if (utils.indexOf(stack, obj) !== -1) return obj; - - var canonicalizedObj; - - if ('[object Array]' == {}.toString.call(obj)) { - stack.push(obj); - canonicalizedObj = utils.map(obj, function(item) { - return canonicalize(item, stack); - }); - stack.pop(); - } else if (typeof obj === 'object' && obj !== null) { - stack.push(obj); - canonicalizedObj = {}; - utils.forEach(utils.keys(obj).sort(), function(key) { - canonicalizedObj[key] = canonicalize(obj[key], stack); - }); - stack.pop(); - } else { - canonicalizedObj = obj; - } - - return canonicalizedObj; - } - -/** - * Check that a / b have the same type. - * - * @param {Object} a - * @param {Object} b - * @return {Boolean} - * @api private - */ - -function sameType(a, b) { - a = Object.prototype.toString.call(a); - b = Object.prototype.toString.call(b); - return a == b; -} - - -}); // module: reporters/base.js - -require.register("reporters/doc.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils'); - -/** - * Expose `Doc`. - */ - -exports = module.exports = Doc; - -/** - * Initialize a new `Doc` reporter. - * - * @param {Runner} runner - * @api public - */ - -function Doc(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , total = runner.total - , indents = 2; - - function indent() { - return Array(indents).join(' '); - } - - runner.on('suite', function(suite){ - if (suite.root) return; - ++indents; - console.log('%s
      ', indent()); - ++indents; - console.log('%s

      %s

      ', indent(), utils.escape(suite.title)); - console.log('%s
      ', indent()); - }); - - runner.on('suite end', function(suite){ - if (suite.root) return; - console.log('%s
      ', indent()); - --indents; - console.log('%s
      ', indent()); - --indents; - }); - - runner.on('pass', function(test){ - console.log('%s
      %s
      ', indent(), utils.escape(test.title)); - var code = utils.escape(utils.clean(test.fn.toString())); - console.log('%s
      %s
      ', indent(), code); - }); -} - -}); // module: reporters/doc.js - -require.register("reporters/dot.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , color = Base.color; - -/** - * Expose `Dot`. - */ - -exports = module.exports = Dot; - -/** - * Initialize a new `Dot` matrix test reporter. - * - * @param {Runner} runner - * @api public - */ - -function Dot(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , width = Base.window.width * .75 | 0 - , n = 0; - - runner.on('start', function(){ - process.stdout.write('\n '); - }); - - runner.on('pending', function(test){ - process.stdout.write(color('pending', Base.symbols.dot)); - }); - - runner.on('pass', function(test){ - if (++n % width == 0) process.stdout.write('\n '); - if ('slow' == test.speed) { - process.stdout.write(color('bright yellow', Base.symbols.dot)); - } else { - process.stdout.write(color(test.speed, Base.symbols.dot)); - } - }); - - runner.on('fail', function(test, err){ - if (++n % width == 0) process.stdout.write('\n '); - process.stdout.write(color('fail', Base.symbols.dot)); - }); - - runner.on('end', function(){ - console.log(); - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -Dot.prototype = new F; -Dot.prototype.constructor = Dot; - -}); // module: reporters/dot.js - -require.register("reporters/html-cov.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var JSONCov = require('./json-cov') - , fs = require('browser/fs'); - -/** - * Expose `HTMLCov`. - */ - -exports = module.exports = HTMLCov; - -/** - * Initialize a new `JsCoverage` reporter. - * - * @param {Runner} runner - * @api public - */ - -function HTMLCov(runner) { - var jade = require('jade') - , file = __dirname + '/templates/coverage.jade' - , str = fs.readFileSync(file, 'utf8') - , fn = jade.compile(str, { filename: file }) - , self = this; - - JSONCov.call(this, runner, false); - - runner.on('end', function(){ - process.stdout.write(fn({ - cov: self.cov - , coverageClass: coverageClass - })); - }); -} - -/** - * Return coverage class for `n`. - * - * @return {String} - * @api private - */ - -function coverageClass(n) { - if (n >= 75) return 'high'; - if (n >= 50) return 'medium'; - if (n >= 25) return 'low'; - return 'terrible'; -} -}); // module: reporters/html-cov.js - -require.register("reporters/html.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils') - , Progress = require('../browser/progress') - , escape = utils.escape; - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Expose `HTML`. - */ - -exports = module.exports = HTML; - -/** - * Stats template. - */ - -var statsTemplate = ''; - -/** - * Initialize a new `HTML` reporter. - * - * @param {Runner} runner - * @api public - */ - -function HTML(runner, root) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , total = runner.total - , stat = fragment(statsTemplate) - , items = stat.getElementsByTagName('li') - , passes = items[1].getElementsByTagName('em')[0] - , passesLink = items[1].getElementsByTagName('a')[0] - , failures = items[2].getElementsByTagName('em')[0] - , failuresLink = items[2].getElementsByTagName('a')[0] - , duration = items[3].getElementsByTagName('em')[0] - , canvas = stat.getElementsByTagName('canvas')[0] - , report = fragment('
        ') - , stack = [report] - , progress - , ctx - - root = root || document.getElementById('mocha'); - - if (canvas.getContext) { - var ratio = window.devicePixelRatio || 1; - canvas.style.width = canvas.width; - canvas.style.height = canvas.height; - canvas.width *= ratio; - canvas.height *= ratio; - ctx = canvas.getContext('2d'); - ctx.scale(ratio, ratio); - progress = new Progress; - } - - if (!root) return error('#mocha div missing, add it to your document'); - - // pass toggle - on(passesLink, 'click', function(){ - unhide(); - var name = /pass/.test(report.className) ? '' : ' pass'; - report.className = report.className.replace(/fail|pass/g, '') + name; - if (report.className.trim()) hideSuitesWithout('test pass'); - }); - - // failure toggle - on(failuresLink, 'click', function(){ - unhide(); - var name = /fail/.test(report.className) ? '' : ' fail'; - report.className = report.className.replace(/fail|pass/g, '') + name; - if (report.className.trim()) hideSuitesWithout('test fail'); - }); - - root.appendChild(stat); - root.appendChild(report); - - if (progress) progress.size(40); - - runner.on('suite', function(suite){ - if (suite.root) return; - - // suite - var url = self.suiteURL(suite); - var el = fragment('
      • %s

      • ', url, escape(suite.title)); - - // container - stack[0].appendChild(el); - stack.unshift(document.createElement('ul')); - el.appendChild(stack[0]); - }); - - runner.on('suite end', function(suite){ - if (suite.root) return; - stack.shift(); - }); - - runner.on('fail', function(test, err){ - if ('hook' == test.type) runner.emit('test end', test); - }); - - runner.on('test end', function(test){ - // TODO: add to stats - var percent = stats.tests / this.total * 100 | 0; - if (progress) progress.update(percent).draw(ctx); - - // update stats - var ms = new Date - stats.start; - text(passes, stats.passes); - text(failures, stats.failures); - text(duration, (ms / 1000).toFixed(2)); - - // test - if ('passed' == test.state) { - var url = self.testURL(test); - var el = fragment('
      • %e%ems ‣

      • ', test.speed, test.title, test.duration, url); - } else if (test.pending) { - var el = fragment('
      • %e

      • ', test.title); - } else { - var el = fragment('
      • %e ‣

      • ', test.title, encodeURIComponent(test.fullTitle())); - var str = test.err.stack || test.err.toString(); - - // FF / Opera do not add the message - if (!~str.indexOf(test.err.message)) { - str = test.err.message + '\n' + str; - } - - // <=IE7 stringifies to [Object Error]. Since it can be overloaded, we - // check for the result of the stringifying. - if ('[object Error]' == str) str = test.err.message; - - // Safari doesn't give you a stack. Let's at least provide a source line. - if (!test.err.stack && test.err.sourceURL && test.err.line !== undefined) { - str += "\n(" + test.err.sourceURL + ":" + test.err.line + ")"; - } - - el.appendChild(fragment('
        %e
        ', str)); - } - - // toggle code - // TODO: defer - if (!test.pending) { - var h2 = el.getElementsByTagName('h2')[0]; - - on(h2, 'click', function(){ - pre.style.display = 'none' == pre.style.display - ? 'block' - : 'none'; - }); - - var pre = fragment('
        %e
        ', utils.clean(test.fn.toString())); - el.appendChild(pre); - pre.style.display = 'none'; - } - - // Don't call .appendChild if #mocha-report was already .shift()'ed off the stack. - if (stack[0]) stack[0].appendChild(el); - }); -} - -/** - * Provide suite URL - * - * @param {Object} [suite] - */ - -HTML.prototype.suiteURL = function(suite){ - return '?grep=' + encodeURIComponent(suite.fullTitle()); -}; - -/** - * Provide test URL - * - * @param {Object} [test] - */ - -HTML.prototype.testURL = function(test){ - return '?grep=' + encodeURIComponent(test.fullTitle()); -}; - -/** - * Display error `msg`. - */ - -function error(msg) { - document.body.appendChild(fragment('
        %s
        ', msg)); -} - -/** - * Return a DOM fragment from `html`. - */ - -function fragment(html) { - var args = arguments - , div = document.createElement('div') - , i = 1; - - div.innerHTML = html.replace(/%([se])/g, function(_, type){ - switch (type) { - case 's': return String(args[i++]); - case 'e': return escape(args[i++]); - } - }); - - return div.firstChild; -} - -/** - * Check for suites that do not have elements - * with `classname`, and hide them. - */ - -function hideSuitesWithout(classname) { - var suites = document.getElementsByClassName('suite'); - for (var i = 0; i < suites.length; i++) { - var els = suites[i].getElementsByClassName(classname); - if (0 == els.length) suites[i].className += ' hidden'; - } -} - -/** - * Unhide .hidden suites. - */ - -function unhide() { - var els = document.getElementsByClassName('suite hidden'); - for (var i = 0; i < els.length; ++i) { - els[i].className = els[i].className.replace('suite hidden', 'suite'); - } -} - -/** - * Set `el` text to `str`. - */ - -function text(el, str) { - if (el.textContent) { - el.textContent = str; - } else { - el.innerText = str; - } -} - -/** - * Listen on `event` with callback `fn`. - */ - -function on(el, event, fn) { - if (el.addEventListener) { - el.addEventListener(event, fn, false); - } else { - el.attachEvent('on' + event, fn); - } -} - -}); // module: reporters/html.js - -require.register("reporters/index.js", function(module, exports, require){ - -exports.Base = require('./base'); -exports.Dot = require('./dot'); -exports.Doc = require('./doc'); -exports.TAP = require('./tap'); -exports.JSON = require('./json'); -exports.HTML = require('./html'); -exports.List = require('./list'); -exports.Min = require('./min'); -exports.Spec = require('./spec'); -exports.Nyan = require('./nyan'); -exports.XUnit = require('./xunit'); -exports.Markdown = require('./markdown'); -exports.Progress = require('./progress'); -exports.Landing = require('./landing'); -exports.JSONCov = require('./json-cov'); -exports.HTMLCov = require('./html-cov'); -exports.JSONStream = require('./json-stream'); - -}); // module: reporters/index.js - -require.register("reporters/json-cov.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base'); - -/** - * Expose `JSONCov`. - */ - -exports = module.exports = JSONCov; - -/** - * Initialize a new `JsCoverage` reporter. - * - * @param {Runner} runner - * @param {Boolean} output - * @api public - */ - -function JSONCov(runner, output) { - var self = this - , output = 1 == arguments.length ? true : output; - - Base.call(this, runner); - - var tests = [] - , failures = [] - , passes = []; - - runner.on('test end', function(test){ - tests.push(test); - }); - - runner.on('pass', function(test){ - passes.push(test); - }); - - runner.on('fail', function(test){ - failures.push(test); - }); - - runner.on('end', function(){ - var cov = global._$jscoverage || {}; - var result = self.cov = map(cov); - result.stats = self.stats; - result.tests = tests.map(clean); - result.failures = failures.map(clean); - result.passes = passes.map(clean); - if (!output) return; - process.stdout.write(JSON.stringify(result, null, 2 )); - }); -} - -/** - * Map jscoverage data to a JSON structure - * suitable for reporting. - * - * @param {Object} cov - * @return {Object} - * @api private - */ - -function map(cov) { - var ret = { - instrumentation: 'node-jscoverage' - , sloc: 0 - , hits: 0 - , misses: 0 - , coverage: 0 - , files: [] - }; - - for (var filename in cov) { - var data = coverage(filename, cov[filename]); - ret.files.push(data); - ret.hits += data.hits; - ret.misses += data.misses; - ret.sloc += data.sloc; - } - - ret.files.sort(function(a, b) { - return a.filename.localeCompare(b.filename); - }); - - if (ret.sloc > 0) { - ret.coverage = (ret.hits / ret.sloc) * 100; - } - - return ret; -}; - -/** - * Map jscoverage data for a single source file - * to a JSON structure suitable for reporting. - * - * @param {String} filename name of the source file - * @param {Object} data jscoverage coverage data - * @return {Object} - * @api private - */ - -function coverage(filename, data) { - var ret = { - filename: filename, - coverage: 0, - hits: 0, - misses: 0, - sloc: 0, - source: {} - }; - - data.source.forEach(function(line, num){ - num++; - - if (data[num] === 0) { - ret.misses++; - ret.sloc++; - } else if (data[num] !== undefined) { - ret.hits++; - ret.sloc++; - } - - ret.source[num] = { - source: line - , coverage: data[num] === undefined - ? '' - : data[num] - }; - }); - - ret.coverage = ret.hits / ret.sloc * 100; - - return ret; -} - -/** - * Return a plain-object representation of `test` - * free of cyclic properties etc. - * - * @param {Object} test - * @return {Object} - * @api private - */ - -function clean(test) { - return { - title: test.title - , fullTitle: test.fullTitle() - , duration: test.duration - } -} - -}); // module: reporters/json-cov.js - -require.register("reporters/json-stream.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , color = Base.color; - -/** - * Expose `List`. - */ - -exports = module.exports = List; - -/** - * Initialize a new `List` test reporter. - * - * @param {Runner} runner - * @api public - */ - -function List(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , total = runner.total; - - runner.on('start', function(){ - console.log(JSON.stringify(['start', { total: total }])); - }); - - runner.on('pass', function(test){ - console.log(JSON.stringify(['pass', clean(test)])); - }); - - runner.on('fail', function(test, err){ - console.log(JSON.stringify(['fail', clean(test)])); - }); - - runner.on('end', function(){ - process.stdout.write(JSON.stringify(['end', self.stats])); - }); -} - -/** - * Return a plain-object representation of `test` - * free of cyclic properties etc. - * - * @param {Object} test - * @return {Object} - * @api private - */ - -function clean(test) { - return { - title: test.title - , fullTitle: test.fullTitle() - , duration: test.duration - } -} -}); // module: reporters/json-stream.js - -require.register("reporters/json.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `JSON`. - */ - -exports = module.exports = JSONReporter; - -/** - * Initialize a new `JSON` reporter. - * - * @param {Runner} runner - * @api public - */ - -function JSONReporter(runner) { - var self = this; - Base.call(this, runner); - - var tests = [] - , failures = [] - , passes = []; - - runner.on('test end', function(test){ - tests.push(test); - }); - - runner.on('pass', function(test){ - passes.push(test); - }); - - runner.on('fail', function(test){ - failures.push(test); - }); - - runner.on('end', function(){ - var obj = { - stats: self.stats - , tests: tests.map(clean) - , failures: failures.map(clean) - , passes: passes.map(clean) - }; - - process.stdout.write(JSON.stringify(obj, null, 2)); - }); -} - -/** - * Return a plain-object representation of `test` - * free of cyclic properties etc. - * - * @param {Object} test - * @return {Object} - * @api private - */ - -function clean(test) { - return { - title: test.title - , fullTitle: test.fullTitle() - , duration: test.duration - } -} -}); // module: reporters/json.js - -require.register("reporters/landing.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `Landing`. - */ - -exports = module.exports = Landing; - -/** - * Airplane color. - */ - -Base.colors.plane = 0; - -/** - * Airplane crash color. - */ - -Base.colors['plane crash'] = 31; - -/** - * Runway color. - */ - -Base.colors.runway = 90; - -/** - * Initialize a new `Landing` reporter. - * - * @param {Runner} runner - * @api public - */ - -function Landing(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , width = Base.window.width * .75 | 0 - , total = runner.total - , stream = process.stdout - , plane = color('plane', '✈') - , crashed = -1 - , n = 0; - - function runway() { - var buf = Array(width).join('-'); - return ' ' + color('runway', buf); - } - - runner.on('start', function(){ - stream.write('\n '); - cursor.hide(); - }); - - runner.on('test end', function(test){ - // check if the plane crashed - var col = -1 == crashed - ? width * ++n / total | 0 - : crashed; - - // show the crash - if ('failed' == test.state) { - plane = color('plane crash', '✈'); - crashed = col; - } - - // render landing strip - stream.write('\u001b[4F\n\n'); - stream.write(runway()); - stream.write('\n '); - stream.write(color('runway', Array(col).join('⋅'))); - stream.write(plane) - stream.write(color('runway', Array(width - col).join('⋅') + '\n')); - stream.write(runway()); - stream.write('\u001b[0m'); - }); - - runner.on('end', function(){ - cursor.show(); - console.log(); - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -Landing.prototype = new F; -Landing.prototype.constructor = Landing; - -}); // module: reporters/landing.js - -require.register("reporters/list.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `List`. - */ - -exports = module.exports = List; - -/** - * Initialize a new `List` test reporter. - * - * @param {Runner} runner - * @api public - */ - -function List(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , n = 0; - - runner.on('start', function(){ - console.log(); - }); - - runner.on('test', function(test){ - process.stdout.write(color('pass', ' ' + test.fullTitle() + ': ')); - }); - - runner.on('pending', function(test){ - var fmt = color('checkmark', ' -') - + color('pending', ' %s'); - console.log(fmt, test.fullTitle()); - }); - - runner.on('pass', function(test){ - var fmt = color('checkmark', ' '+Base.symbols.dot) - + color('pass', ' %s: ') - + color(test.speed, '%dms'); - cursor.CR(); - console.log(fmt, test.fullTitle(), test.duration); - }); - - runner.on('fail', function(test, err){ - cursor.CR(); - console.log(color('fail', ' %d) %s'), ++n, test.fullTitle()); - }); - - runner.on('end', self.epilogue.bind(self)); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -List.prototype = new F; -List.prototype.constructor = List; - - -}); // module: reporters/list.js - -require.register("reporters/markdown.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils'); - -/** - * Expose `Markdown`. - */ - -exports = module.exports = Markdown; - -/** - * Initialize a new `Markdown` reporter. - * - * @param {Runner} runner - * @api public - */ - -function Markdown(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , level = 0 - , buf = ''; - - function title(str) { - return Array(level).join('#') + ' ' + str; - } - - function indent() { - return Array(level).join(' '); - } - - function mapTOC(suite, obj) { - var ret = obj; - obj = obj[suite.title] = obj[suite.title] || { suite: suite }; - suite.suites.forEach(function(suite){ - mapTOC(suite, obj); - }); - return ret; - } - - function stringifyTOC(obj, level) { - ++level; - var buf = ''; - var link; - for (var key in obj) { - if ('suite' == key) continue; - if (key) link = ' - [' + key + '](#' + utils.slug(obj[key].suite.fullTitle()) + ')\n'; - if (key) buf += Array(level).join(' ') + link; - buf += stringifyTOC(obj[key], level); - } - --level; - return buf; - } - - function generateTOC(suite) { - var obj = mapTOC(suite, {}); - return stringifyTOC(obj, 0); - } - - generateTOC(runner.suite); - - runner.on('suite', function(suite){ - ++level; - var slug = utils.slug(suite.fullTitle()); - buf += '' + '\n'; - buf += title(suite.title) + '\n'; - }); - - runner.on('suite end', function(suite){ - --level; - }); - - runner.on('pass', function(test){ - var code = utils.clean(test.fn.toString()); - buf += test.title + '.\n'; - buf += '\n```js\n'; - buf += code + '\n'; - buf += '```\n\n'; - }); - - runner.on('end', function(){ - process.stdout.write('# TOC\n'); - process.stdout.write(generateTOC(runner.suite)); - process.stdout.write(buf); - }); -} -}); // module: reporters/markdown.js - -require.register("reporters/min.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base'); - -/** - * Expose `Min`. - */ - -exports = module.exports = Min; - -/** - * Initialize a new `Min` minimal test reporter (best used with --watch). - * - * @param {Runner} runner - * @api public - */ - -function Min(runner) { - Base.call(this, runner); - - runner.on('start', function(){ - // clear screen - process.stdout.write('\u001b[2J'); - // set cursor position - process.stdout.write('\u001b[1;3H'); - }); - - runner.on('end', this.epilogue.bind(this)); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -Min.prototype = new F; -Min.prototype.constructor = Min; - - -}); // module: reporters/min.js - -require.register("reporters/nyan.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base') - , color = Base.color; - -/** - * Expose `Dot`. - */ - -exports = module.exports = NyanCat; - -/** - * Initialize a new `Dot` matrix test reporter. - * - * @param {Runner} runner - * @api public - */ - -function NyanCat(runner) { - Base.call(this, runner); - var self = this - , stats = this.stats - , width = Base.window.width * .75 | 0 - , rainbowColors = this.rainbowColors = self.generateColors() - , colorIndex = this.colorIndex = 0 - , numerOfLines = this.numberOfLines = 4 - , trajectories = this.trajectories = [[], [], [], []] - , nyanCatWidth = this.nyanCatWidth = 11 - , trajectoryWidthMax = this.trajectoryWidthMax = (width - nyanCatWidth) - , scoreboardWidth = this.scoreboardWidth = 5 - , tick = this.tick = 0 - , n = 0; - - runner.on('start', function(){ - Base.cursor.hide(); - self.draw(); - }); - - runner.on('pending', function(test){ - self.draw(); - }); - - runner.on('pass', function(test){ - self.draw(); - }); - - runner.on('fail', function(test, err){ - self.draw(); - }); - - runner.on('end', function(){ - Base.cursor.show(); - for (var i = 0; i < self.numberOfLines; i++) write('\n'); - self.epilogue(); - }); -} - -/** - * Draw the nyan cat - * - * @api private - */ - -NyanCat.prototype.draw = function(){ - this.appendRainbow(); - this.drawScoreboard(); - this.drawRainbow(); - this.drawNyanCat(); - this.tick = !this.tick; -}; - -/** - * Draw the "scoreboard" showing the number - * of passes, failures and pending tests. - * - * @api private - */ - -NyanCat.prototype.drawScoreboard = function(){ - var stats = this.stats; - var colors = Base.colors; - - function draw(color, n) { - write(' '); - write('\u001b[' + color + 'm' + n + '\u001b[0m'); - write('\n'); - } - - draw(colors.green, stats.passes); - draw(colors.fail, stats.failures); - draw(colors.pending, stats.pending); - write('\n'); - - this.cursorUp(this.numberOfLines); -}; - -/** - * Append the rainbow. - * - * @api private - */ - -NyanCat.prototype.appendRainbow = function(){ - var segment = this.tick ? '_' : '-'; - var rainbowified = this.rainbowify(segment); - - for (var index = 0; index < this.numberOfLines; index++) { - var trajectory = this.trajectories[index]; - if (trajectory.length >= this.trajectoryWidthMax) trajectory.shift(); - trajectory.push(rainbowified); - } -}; - -/** - * Draw the rainbow. - * - * @api private - */ - -NyanCat.prototype.drawRainbow = function(){ - var self = this; - - this.trajectories.forEach(function(line, index) { - write('\u001b[' + self.scoreboardWidth + 'C'); - write(line.join('')); - write('\n'); - }); - - this.cursorUp(this.numberOfLines); -}; - -/** - * Draw the nyan cat - * - * @api private - */ - -NyanCat.prototype.drawNyanCat = function() { - var self = this; - var startWidth = this.scoreboardWidth + this.trajectories[0].length; - var color = '\u001b[' + startWidth + 'C'; - var padding = ''; - - write(color); - write('_,------,'); - write('\n'); - - write(color); - padding = self.tick ? ' ' : ' '; - write('_|' + padding + '/\\_/\\ '); - write('\n'); - - write(color); - padding = self.tick ? '_' : '__'; - var tail = self.tick ? '~' : '^'; - var face; - write(tail + '|' + padding + this.face() + ' '); - write('\n'); - - write(color); - padding = self.tick ? ' ' : ' '; - write(padding + '"" "" '); - write('\n'); - - this.cursorUp(this.numberOfLines); -}; - -/** - * Draw nyan cat face. - * - * @return {String} - * @api private - */ - -NyanCat.prototype.face = function() { - var stats = this.stats; - if (stats.failures) { - return '( x .x)'; - } else if (stats.pending) { - return '( o .o)'; - } else if(stats.passes) { - return '( ^ .^)'; - } else { - return '( - .-)'; - } -} - -/** - * Move cursor up `n`. - * - * @param {Number} n - * @api private - */ - -NyanCat.prototype.cursorUp = function(n) { - write('\u001b[' + n + 'A'); -}; - -/** - * Move cursor down `n`. - * - * @param {Number} n - * @api private - */ - -NyanCat.prototype.cursorDown = function(n) { - write('\u001b[' + n + 'B'); -}; - -/** - * Generate rainbow colors. - * - * @return {Array} - * @api private - */ - -NyanCat.prototype.generateColors = function(){ - var colors = []; - - for (var i = 0; i < (6 * 7); i++) { - var pi3 = Math.floor(Math.PI / 3); - var n = (i * (1.0 / 6)); - var r = Math.floor(3 * Math.sin(n) + 3); - var g = Math.floor(3 * Math.sin(n + 2 * pi3) + 3); - var b = Math.floor(3 * Math.sin(n + 4 * pi3) + 3); - colors.push(36 * r + 6 * g + b + 16); - } - - return colors; -}; - -/** - * Apply rainbow to the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -NyanCat.prototype.rainbowify = function(str){ - var color = this.rainbowColors[this.colorIndex % this.rainbowColors.length]; - this.colorIndex += 1; - return '\u001b[38;5;' + color + 'm' + str + '\u001b[0m'; -}; - -/** - * Stdout helper. - */ - -function write(string) { - process.stdout.write(string); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -NyanCat.prototype = new F; -NyanCat.prototype.constructor = NyanCat; - - -}); // module: reporters/nyan.js - -require.register("reporters/progress.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `Progress`. - */ - -exports = module.exports = Progress; - -/** - * General progress bar color. - */ - -Base.colors.progress = 90; - -/** - * Initialize a new `Progress` bar test reporter. - * - * @param {Runner} runner - * @param {Object} options - * @api public - */ - -function Progress(runner, options) { - Base.call(this, runner); - - var self = this - , options = options || {} - , stats = this.stats - , width = Base.window.width * .50 | 0 - , total = runner.total - , complete = 0 - , max = Math.max; - - // default chars - options.open = options.open || '['; - options.complete = options.complete || '▬'; - options.incomplete = options.incomplete || Base.symbols.dot; - options.close = options.close || ']'; - options.verbose = false; - - // tests started - runner.on('start', function(){ - console.log(); - cursor.hide(); - }); - - // tests complete - runner.on('test end', function(){ - complete++; - var incomplete = total - complete - , percent = complete / total - , n = width * percent | 0 - , i = width - n; - - cursor.CR(); - process.stdout.write('\u001b[J'); - process.stdout.write(color('progress', ' ' + options.open)); - process.stdout.write(Array(n).join(options.complete)); - process.stdout.write(Array(i).join(options.incomplete)); - process.stdout.write(color('progress', options.close)); - if (options.verbose) { - process.stdout.write(color('progress', ' ' + complete + ' of ' + total)); - } - }); - - // tests are complete, output some stats - // and the failures if any - runner.on('end', function(){ - cursor.show(); - console.log(); - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -Progress.prototype = new F; -Progress.prototype.constructor = Progress; - - -}); // module: reporters/progress.js - -require.register("reporters/spec.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `Spec`. - */ - -exports = module.exports = Spec; - -/** - * Initialize a new `Spec` test reporter. - * - * @param {Runner} runner - * @api public - */ - -function Spec(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , indents = 0 - , n = 0; - - function indent() { - return Array(indents).join(' ') - } - - runner.on('start', function(){ - console.log(); - }); - - runner.on('suite', function(suite){ - ++indents; - console.log(color('suite', '%s%s'), indent(), suite.title); - }); - - runner.on('suite end', function(suite){ - --indents; - if (1 == indents) console.log(); - }); - - runner.on('pending', function(test){ - var fmt = indent() + color('pending', ' - %s'); - console.log(fmt, test.title); - }); - - runner.on('pass', function(test){ - if ('fast' == test.speed) { - var fmt = indent() - + color('checkmark', ' ' + Base.symbols.ok) - + color('pass', ' %s '); - cursor.CR(); - console.log(fmt, test.title); - } else { - var fmt = indent() - + color('checkmark', ' ' + Base.symbols.ok) - + color('pass', ' %s ') - + color(test.speed, '(%dms)'); - cursor.CR(); - console.log(fmt, test.title, test.duration); - } - }); - - runner.on('fail', function(test, err){ - cursor.CR(); - console.log(indent() + color('fail', ' %d) %s'), ++n, test.title); - }); - - runner.on('end', self.epilogue.bind(self)); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -Spec.prototype = new F; -Spec.prototype.constructor = Spec; - - -}); // module: reporters/spec.js - -require.register("reporters/tap.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `TAP`. - */ - -exports = module.exports = TAP; - -/** - * Initialize a new `TAP` reporter. - * - * @param {Runner} runner - * @api public - */ - -function TAP(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , n = 1 - , passes = 0 - , failures = 0; - - runner.on('start', function(){ - var total = runner.grepTotal(runner.suite); - console.log('%d..%d', 1, total); - }); - - runner.on('test end', function(){ - ++n; - }); - - runner.on('pending', function(test){ - console.log('ok %d %s # SKIP -', n, title(test)); - }); - - runner.on('pass', function(test){ - passes++; - console.log('ok %d %s', n, title(test)); - }); - - runner.on('fail', function(test, err){ - failures++; - console.log('not ok %d %s', n, title(test)); - if (err.stack) console.log(err.stack.replace(/^/gm, ' ')); - }); - - runner.on('end', function(){ - console.log('# tests ' + (passes + failures)); - console.log('# pass ' + passes); - console.log('# fail ' + failures); - }); -} - -/** - * Return a TAP-safe title of `test` - * - * @param {Object} test - * @return {String} - * @api private - */ - -function title(test) { - return test.fullTitle().replace(/#/g, ''); -} - -}); // module: reporters/tap.js - -require.register("reporters/xunit.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils') - , escape = utils.escape; - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Expose `XUnit`. - */ - -exports = module.exports = XUnit; - -/** - * Initialize a new `XUnit` reporter. - * - * @param {Runner} runner - * @api public - */ - -function XUnit(runner) { - Base.call(this, runner); - var stats = this.stats - , tests = [] - , self = this; - - runner.on('pending', function(test){ - tests.push(test); - }); - - runner.on('pass', function(test){ - tests.push(test); - }); - - runner.on('fail', function(test){ - tests.push(test); - }); - - runner.on('end', function(){ - console.log(tag('testsuite', { - name: 'Mocha Tests' - , tests: stats.tests - , failures: stats.failures - , errors: stats.failures - , skipped: stats.tests - stats.failures - stats.passes - , timestamp: (new Date).toUTCString() - , time: (stats.duration / 1000) || 0 - }, false)); - - tests.forEach(test); - console.log(''); - }); -} - -/** - * Inherit from `Base.prototype`. - */ - -function F(){}; -F.prototype = Base.prototype; -XUnit.prototype = new F; -XUnit.prototype.constructor = XUnit; - - -/** - * Output tag for the given `test.` - */ - -function test(test) { - var attrs = { - classname: test.parent.fullTitle() - , name: test.title - , time: (test.duration / 1000) || 0 - }; - - if ('failed' == test.state) { - var err = test.err; - attrs.message = escape(err.message); - console.log(tag('testcase', attrs, false, tag('failure', attrs, false, cdata(err.stack)))); - } else if (test.pending) { - console.log(tag('testcase', attrs, false, tag('skipped', {}, true))); - } else { - console.log(tag('testcase', attrs, true) ); - } -} - -/** - * HTML tag helper. - */ - -function tag(name, attrs, close, content) { - var end = close ? '/>' : '>' - , pairs = [] - , tag; - - for (var key in attrs) { - pairs.push(key + '="' + escape(attrs[key]) + '"'); - } - - tag = '<' + name + (pairs.length ? ' ' + pairs.join(' ') : '') + end; - if (content) tag += content + ''; -} - -}); // module: reporters/xunit.js - -require.register("runnable.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var EventEmitter = require('browser/events').EventEmitter - , debug = require('browser/debug')('mocha:runnable') - , milliseconds = require('./ms'); - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Object#toString(). - */ - -var toString = Object.prototype.toString; - -/** - * Expose `Runnable`. - */ - -module.exports = Runnable; - -/** - * Initialize a new `Runnable` with the given `title` and callback `fn`. - * - * @param {String} title - * @param {Function} fn - * @api private - */ - -function Runnable(title, fn) { - this.title = title; - this.fn = fn; - this.async = fn && fn.length; - this.sync = ! this.async; - this._timeout = 2000; - this._slow = 75; - this.timedOut = false; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -function F(){}; -F.prototype = EventEmitter.prototype; -Runnable.prototype = new F; -Runnable.prototype.constructor = Runnable; - - -/** - * Set & get timeout `ms`. - * - * @param {Number|String} ms - * @return {Runnable|Number} ms or self - * @api private - */ - -Runnable.prototype.timeout = function(ms){ - if (0 == arguments.length) return this._timeout; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('timeout %d', ms); - this._timeout = ms; - if (this.timer) this.resetTimeout(); - return this; -}; - -/** - * Set & get slow `ms`. - * - * @param {Number|String} ms - * @return {Runnable|Number} ms or self - * @api private - */ - -Runnable.prototype.slow = function(ms){ - if (0 === arguments.length) return this._slow; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('timeout %d', ms); - this._slow = ms; - return this; -}; - -/** - * Return the full title generated by recursively - * concatenating the parent's full title. - * - * @return {String} - * @api public - */ - -Runnable.prototype.fullTitle = function(){ - return this.parent.fullTitle() + ' ' + this.title; -}; - -/** - * Clear the timeout. - * - * @api private - */ - -Runnable.prototype.clearTimeout = function(){ - clearTimeout(this.timer); -}; - -/** - * Inspect the runnable void of private properties. - * - * @return {String} - * @api private - */ - -Runnable.prototype.inspect = function(){ - return JSON.stringify(this, function(key, val){ - if ('_' == key[0]) return; - if ('parent' == key) return '#'; - if ('ctx' == key) return '#'; - return val; - }, 2); -}; - -/** - * Reset the timeout. - * - * @api private - */ - -Runnable.prototype.resetTimeout = function(){ - var self = this; - var ms = this.timeout() || 1e9; - - this.clearTimeout(); - this.timer = setTimeout(function(){ - self.callback(new Error('timeout of ' + ms + 'ms exceeded')); - self.timedOut = true; - }, ms); -}; - -/** - * Whitelist these globals for this test run - * - * @api private - */ -Runnable.prototype.globals = function(arr){ - var self = this; - this._allowedGlobals = arr; -}; - -/** - * Run the test and invoke `fn(err)`. - * - * @param {Function} fn - * @api private - */ - -Runnable.prototype.run = function(fn){ - var self = this - , ms = this.timeout() - , start = new Date - , ctx = this.ctx - , finished - , emitted; - - if (ctx) ctx.runnable(this); - - // timeout - if (this.async) { - if (ms) { - this.timer = setTimeout(function(){ - done(new Error('timeout of ' + ms + 'ms exceeded')); - self.timedOut = true; - }, ms); - } - } - - // called multiple times - function multiple(err) { - if (emitted) return; - emitted = true; - self.emit('error', err || new Error('done() called multiple times')); - } - - // finished - function done(err) { - if (self.timedOut) return; - if (finished) return multiple(err); - self.clearTimeout(); - self.duration = new Date - start; - finished = true; - fn(err); - } - - // for .resetTimeout() - this.callback = done; - - // async - if (this.async) { - try { - this.fn.call(ctx, function(err){ - if (err instanceof Error || toString.call(err) === "[object Error]") return done(err); - if (null != err) return done(new Error('done() invoked with non-Error: ' + err)); - done(); - }); - } catch (err) { - done(err); - } - return; - } - - if (this.asyncOnly) { - return done(new Error('--async-only option in use without declaring `done()`')); - } - - // sync - try { - if (!this.pending) this.fn.call(ctx); - this.duration = new Date - start; - fn(); - } catch (err) { - fn(err); - } -}; - -}); // module: runnable.js - -require.register("runner.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var EventEmitter = require('browser/events').EventEmitter - , debug = require('browser/debug')('mocha:runner') - , Test = require('./test') - , utils = require('./utils') - , filter = utils.filter - , keys = utils.keys; - -/** - * Non-enumerable globals. - */ - -var globals = [ - 'setTimeout', - 'clearTimeout', - 'setInterval', - 'clearInterval', - 'XMLHttpRequest', - 'Date' -]; - -/** - * Expose `Runner`. - */ - -module.exports = Runner; - -/** - * Initialize a `Runner` for the given `suite`. - * - * Events: - * - * - `start` execution started - * - `end` execution complete - * - `suite` (suite) test suite execution started - * - `suite end` (suite) all tests (and sub-suites) have finished - * - `test` (test) test execution started - * - `test end` (test) test completed - * - `hook` (hook) hook execution started - * - `hook end` (hook) hook complete - * - `pass` (test) test passed - * - `fail` (test, err) test failed - * - `pending` (test) test pending - * - * @api public - */ - -function Runner(suite) { - var self = this; - this._globals = []; - this._abort = false; - this.suite = suite; - this.total = suite.total(); - this.failures = 0; - this.on('test end', function(test){ self.checkGlobals(test); }); - this.on('hook end', function(hook){ self.checkGlobals(hook); }); - this.grep(/.*/); - this.globals(this.globalProps().concat(extraGlobals())); -} - -/** - * Wrapper for setImmediate, process.nextTick, or browser polyfill. - * - * @param {Function} fn - * @api private - */ - -Runner.immediately = global.setImmediate || process.nextTick; - -/** - * Inherit from `EventEmitter.prototype`. - */ - -function F(){}; -F.prototype = EventEmitter.prototype; -Runner.prototype = new F; -Runner.prototype.constructor = Runner; - - -/** - * Run tests with full titles matching `re`. Updates runner.total - * with number of tests matched. - * - * @param {RegExp} re - * @param {Boolean} invert - * @return {Runner} for chaining - * @api public - */ - -Runner.prototype.grep = function(re, invert){ - debug('grep %s', re); - this._grep = re; - this._invert = invert; - this.total = this.grepTotal(this.suite); - return this; -}; - -/** - * Returns the number of tests matching the grep search for the - * given suite. - * - * @param {Suite} suite - * @return {Number} - * @api public - */ - -Runner.prototype.grepTotal = function(suite) { - var self = this; - var total = 0; - - suite.eachTest(function(test){ - var match = self._grep.test(test.fullTitle()); - if (self._invert) match = !match; - if (match) total++; - }); - - return total; -}; - -/** - * Return a list of global properties. - * - * @return {Array} - * @api private - */ - -Runner.prototype.globalProps = function() { - var props = utils.keys(global); - - // non-enumerables - for (var i = 0; i < globals.length; ++i) { - if (~utils.indexOf(props, globals[i])) continue; - props.push(globals[i]); - } - - return props; -}; - -/** - * Allow the given `arr` of globals. - * - * @param {Array} arr - * @return {Runner} for chaining - * @api public - */ - -Runner.prototype.globals = function(arr){ - if (0 == arguments.length) return this._globals; - debug('globals %j', arr); - this._globals = this._globals.concat(arr); - return this; -}; - -/** - * Check for global variable leaks. - * - * @api private - */ - -Runner.prototype.checkGlobals = function(test){ - if (this.ignoreLeaks) return; - var ok = this._globals; - - var globals = this.globalProps(); - var isNode = process.kill; - var leaks; - - if (test) { - ok = ok.concat(test._allowedGlobals || []); - } - - if(this.prevGlobalsLength == globals.length) return; - this.prevGlobalsLength = globals.length; - - leaks = filterLeaks(ok, globals); - this._globals = this._globals.concat(leaks); - - if (leaks.length > 1) { - this.fail(test, new Error('global leaks detected: ' + leaks.join(', ') + '')); - } else if (leaks.length) { - this.fail(test, new Error('global leak detected: ' + leaks[0])); - } -}; - -/** - * Fail the given `test`. - * - * @param {Test} test - * @param {Error} err - * @api private - */ - -Runner.prototype.fail = function(test, err){ - ++this.failures; - test.state = 'failed'; - - if ('string' == typeof err) { - err = new Error('the string "' + err + '" was thrown, throw an Error :)'); - } - - this.emit('fail', test, err); -}; - -/** - * Fail the given `hook` with `err`. - * - * Hook failures work in the following pattern: - * - If bail, then exit - * - Failed `before` hook skips all tests in a suite and subsuites, - * but jumps to corresponding `after` hook - * - Failed `before each` hook skips remaining tests in a - * suite and jumps to corresponding `after each` hook, - * which is run only once - * - Failed `after` hook does not alter - * execution order - * - Failed `after each` hook skips remaining tests in a - * suite and subsuites, but executes other `after each` - * hooks - * - * @param {Hook} hook - * @param {Error} err - * @api private - */ - -Runner.prototype.failHook = function(hook, err){ - this.fail(hook, err); - if (this.suite.bail()) { - this.emit('end'); - } -}; - -/** - * Run hook `name` callbacks and then invoke `fn()`. - * - * @param {String} name - * @param {Function} function - * @api private - */ - -Runner.prototype.hook = function(name, fn){ - var suite = this.suite - , hooks = suite['_' + name] - , self = this - , timer; - - function next(i) { - var hook = hooks[i]; - if (!hook) return fn(); - if (self.failures && suite.bail()) return fn(); - self.currentRunnable = hook; - - hook.ctx.currentTest = self.test; - - self.emit('hook', hook); - - hook.on('error', function(err){ - self.failHook(hook, err); - }); - - hook.run(function(err){ - hook.removeAllListeners('error'); - var testError = hook.error(); - if (testError) self.fail(self.test, testError); - if (err) { - self.failHook(hook, err); - - // stop executing hooks, notify callee of hook err - return fn(err); - } - self.emit('hook end', hook); - delete hook.ctx.currentTest; - next(++i); - }); - } - - Runner.immediately(function(){ - next(0); - }); -}; - -/** - * Run hook `name` for the given array of `suites` - * in order, and callback `fn(err, errSuite)`. - * - * @param {String} name - * @param {Array} suites - * @param {Function} fn - * @api private - */ - -Runner.prototype.hooks = function(name, suites, fn){ - var self = this - , orig = this.suite; - - function next(suite) { - self.suite = suite; - - if (!suite) { - self.suite = orig; - return fn(); - } - - self.hook(name, function(err){ - if (err) { - var errSuite = self.suite; - self.suite = orig; - return fn(err, errSuite); - } - - next(suites.pop()); - }); - } - - next(suites.pop()); -}; - -/** - * Run hooks from the top level down. - * - * @param {String} name - * @param {Function} fn - * @api private - */ - -Runner.prototype.hookUp = function(name, fn){ - var suites = [this.suite].concat(this.parents()).reverse(); - this.hooks(name, suites, fn); -}; - -/** - * Run hooks from the bottom up. - * - * @param {String} name - * @param {Function} fn - * @api private - */ - -Runner.prototype.hookDown = function(name, fn){ - var suites = [this.suite].concat(this.parents()); - this.hooks(name, suites, fn); -}; - -/** - * Return an array of parent Suites from - * closest to furthest. - * - * @return {Array} - * @api private - */ - -Runner.prototype.parents = function(){ - var suite = this.suite - , suites = []; - while (suite = suite.parent) suites.push(suite); - return suites; -}; - -/** - * Run the current test and callback `fn(err)`. - * - * @param {Function} fn - * @api private - */ - -Runner.prototype.runTest = function(fn){ - var test = this.test - , self = this; - - if (this.asyncOnly) test.asyncOnly = true; - - try { - test.on('error', function(err){ - self.fail(test, err); - }); - test.run(fn); - } catch (err) { - fn(err); - } -}; - -/** - * Run tests in the given `suite` and invoke - * the callback `fn()` when complete. - * - * @param {Suite} suite - * @param {Function} fn - * @api private - */ - -Runner.prototype.runTests = function(suite, fn){ - var self = this - , tests = suite.tests.slice() - , test; - - - function hookErr(err, errSuite, after) { - // before/after Each hook for errSuite failed: - var orig = self.suite; - - // for failed 'after each' hook start from errSuite parent, - // otherwise start from errSuite itself - self.suite = after ? errSuite.parent : errSuite; - - if (self.suite) { - // call hookUp afterEach - self.hookUp('afterEach', function(err2, errSuite2) { - self.suite = orig; - // some hooks may fail even now - if (err2) return hookErr(err2, errSuite2, true); - // report error suite - fn(errSuite); - }); - } else { - // there is no need calling other 'after each' hooks - self.suite = orig; - fn(errSuite); - } - } - - function next(err, errSuite) { - // if we bail after first err - if (self.failures && suite._bail) return fn(); - - if (self._abort) return fn(); - - if (err) return hookErr(err, errSuite, true); - - // next test - test = tests.shift(); - - // all done - if (!test) return fn(); - - // grep - var match = self._grep.test(test.fullTitle()); - if (self._invert) match = !match; - if (!match) return next(); - - // pending - if (test.pending) { - self.emit('pending', test); - self.emit('test end', test); - return next(); - } - - // execute test and hook(s) - self.emit('test', self.test = test); - self.hookDown('beforeEach', function(err, errSuite){ - - if (err) return hookErr(err, errSuite, false); - - self.currentRunnable = self.test; - self.runTest(function(err){ - test = self.test; - - if (err) { - self.fail(test, err); - self.emit('test end', test); - return self.hookUp('afterEach', next); - } - - test.state = 'passed'; - self.emit('pass', test); - self.emit('test end', test); - self.hookUp('afterEach', next); - }); - }); - } - - this.next = next; - next(); -}; - -/** - * Run the given `suite` and invoke the - * callback `fn()` when complete. - * - * @param {Suite} suite - * @param {Function} fn - * @api private - */ - -Runner.prototype.runSuite = function(suite, fn){ - var total = this.grepTotal(suite) - , self = this - , i = 0; - - debug('run suite %s', suite.fullTitle()); - - if (!total) return fn(); - - this.emit('suite', this.suite = suite); - - function next(errSuite) { - if (errSuite) { - // current suite failed on a hook from errSuite - if (errSuite == suite) { - // if errSuite is current suite - // continue to the next sibling suite - return done(); - } else { - // errSuite is among the parents of current suite - // stop execution of errSuite and all sub-suites - return done(errSuite); - } - } - - if (self._abort) return done(); - - var curr = suite.suites[i++]; - if (!curr) return done(); - self.runSuite(curr, next); - } - - function done(errSuite) { - self.suite = suite; - self.hook('afterAll', function(){ - self.emit('suite end', suite); - fn(errSuite); - }); - } - - this.hook('beforeAll', function(err){ - if (err) return done(); - self.runTests(suite, next); - }); -}; - -/** - * Handle uncaught exceptions. - * - * @param {Error} err - * @api private - */ - -Runner.prototype.uncaught = function(err){ - debug('uncaught exception %s', err.message); - var runnable = this.currentRunnable; - if (!runnable || 'failed' == runnable.state) return; - runnable.clearTimeout(); - err.uncaught = true; - this.fail(runnable, err); - - // recover from test - if ('test' == runnable.type) { - this.emit('test end', runnable); - this.hookUp('afterEach', this.next); - return; - } - - // bail on hooks - this.emit('end'); -}; - -/** - * Run the root suite and invoke `fn(failures)` - * on completion. - * - * @param {Function} fn - * @return {Runner} for chaining - * @api public - */ - -Runner.prototype.run = function(fn){ - var self = this - , fn = fn || function(){}; - - function uncaught(err){ - self.uncaught(err); - } - - debug('start'); - - // callback - this.on('end', function(){ - debug('end'); - process.removeListener('uncaughtException', uncaught); - fn(self.failures); - }); - - // run suites - this.emit('start'); - this.runSuite(this.suite, function(){ - debug('finished running'); - self.emit('end'); - }); - - // uncaught exception - process.on('uncaughtException', uncaught); - - return this; -}; - -/** - * Cleanly abort execution - * - * @return {Runner} for chaining - * @api public - */ -Runner.prototype.abort = function(){ - debug('aborting'); - this._abort = true; -} - -/** - * Filter leaks with the given globals flagged as `ok`. - * - * @param {Array} ok - * @param {Array} globals - * @return {Array} - * @api private - */ - -function filterLeaks(ok, globals) { - return filter(globals, function(key){ - // Firefox and Chrome exposes iframes as index inside the window object - if (/^d+/.test(key)) return false; - - // in firefox - // if runner runs in an iframe, this iframe's window.getInterface method not init at first - // it is assigned in some seconds - if (global.navigator && /^getInterface/.test(key)) return false; - - // an iframe could be approached by window[iframeIndex] - // in ie6,7,8 and opera, iframeIndex is enumerable, this could cause leak - if (global.navigator && /^\d+/.test(key)) return false; - - // Opera and IE expose global variables for HTML element IDs (issue #243) - if (/^mocha-/.test(key)) return false; - - var matched = filter(ok, function(ok){ - if (~ok.indexOf('*')) return 0 == key.indexOf(ok.split('*')[0]); - return key == ok; - }); - return matched.length == 0 && (!global.navigator || 'onerror' !== key); - }); -} - -/** - * Array of globals dependent on the environment. - * - * @return {Array} - * @api private - */ - - function extraGlobals() { - if (typeof(process) === 'object' && - typeof(process.version) === 'string') { - - var nodeVersion = process.version.split('.').reduce(function(a, v) { - return a << 8 | v; - }); - - // 'errno' was renamed to process._errno in v0.9.11. - - if (nodeVersion < 0x00090B) { - return ['errno']; - } - } - - return []; - } - -}); // module: runner.js - -require.register("suite.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var EventEmitter = require('browser/events').EventEmitter - , debug = require('browser/debug')('mocha:suite') - , milliseconds = require('./ms') - , utils = require('./utils') - , Hook = require('./hook'); - -/** - * Expose `Suite`. - */ - -exports = module.exports = Suite; - -/** - * Create a new `Suite` with the given `title` - * and parent `Suite`. When a suite with the - * same title is already present, that suite - * is returned to provide nicer reporter - * and more flexible meta-testing. - * - * @param {Suite} parent - * @param {String} title - * @return {Suite} - * @api public - */ - -exports.create = function(parent, title){ - var suite = new Suite(title, parent.ctx); - suite.parent = parent; - if (parent.pending) suite.pending = true; - title = suite.fullTitle(); - parent.addSuite(suite); - return suite; -}; - -/** - * Initialize a new `Suite` with the given - * `title` and `ctx`. - * - * @param {String} title - * @param {Context} ctx - * @api private - */ - -function Suite(title, ctx) { - this.title = title; - this.ctx = ctx; - this.suites = []; - this.tests = []; - this.pending = false; - this._beforeEach = []; - this._beforeAll = []; - this._afterEach = []; - this._afterAll = []; - this.root = !title; - this._timeout = 2000; - this._slow = 75; - this._bail = false; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -function F(){}; -F.prototype = EventEmitter.prototype; -Suite.prototype = new F; -Suite.prototype.constructor = Suite; - - -/** - * Return a clone of this `Suite`. - * - * @return {Suite} - * @api private - */ - -Suite.prototype.clone = function(){ - var suite = new Suite(this.title); - debug('clone'); - suite.ctx = this.ctx; - suite.timeout(this.timeout()); - suite.slow(this.slow()); - suite.bail(this.bail()); - return suite; -}; - -/** - * Set timeout `ms` or short-hand such as "2s". - * - * @param {Number|String} ms - * @return {Suite|Number} for chaining - * @api private - */ - -Suite.prototype.timeout = function(ms){ - if (0 == arguments.length) return this._timeout; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('timeout %d', ms); - this._timeout = parseInt(ms, 10); - return this; -}; - -/** - * Set slow `ms` or short-hand such as "2s". - * - * @param {Number|String} ms - * @return {Suite|Number} for chaining - * @api private - */ - -Suite.prototype.slow = function(ms){ - if (0 === arguments.length) return this._slow; - if ('string' == typeof ms) ms = milliseconds(ms); - debug('slow %d', ms); - this._slow = ms; - return this; -}; - -/** - * Sets whether to bail after first error. - * - * @parma {Boolean} bail - * @return {Suite|Number} for chaining - * @api private - */ - -Suite.prototype.bail = function(bail){ - if (0 == arguments.length) return this._bail; - debug('bail %s', bail); - this._bail = bail; - return this; -}; - -/** - * Run `fn(test[, done])` before running tests. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.beforeAll = function(fn){ - if (this.pending) return this; - var hook = new Hook('"before all" hook', fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._beforeAll.push(hook); - this.emit('beforeAll', hook); - return this; -}; - -/** - * Run `fn(test[, done])` after running tests. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.afterAll = function(fn){ - if (this.pending) return this; - var hook = new Hook('"after all" hook', fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._afterAll.push(hook); - this.emit('afterAll', hook); - return this; -}; - -/** - * Run `fn(test[, done])` before each test case. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.beforeEach = function(fn){ - if (this.pending) return this; - var hook = new Hook('"before each" hook', fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._beforeEach.push(hook); - this.emit('beforeEach', hook); - return this; -}; - -/** - * Run `fn(test[, done])` after each test case. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.afterEach = function(fn){ - if (this.pending) return this; - var hook = new Hook('"after each" hook', fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - this._afterEach.push(hook); - this.emit('afterEach', hook); - return this; -}; - -/** - * Add a test `suite`. - * - * @param {Suite} suite - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.addSuite = function(suite){ - suite.parent = this; - suite.timeout(this.timeout()); - suite.slow(this.slow()); - suite.bail(this.bail()); - this.suites.push(suite); - this.emit('suite', suite); - return this; -}; - -/** - * Add a `test` to this suite. - * - * @param {Test} test - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.addTest = function(test){ - test.parent = this; - test.timeout(this.timeout()); - test.slow(this.slow()); - test.ctx = this.ctx; - this.tests.push(test); - this.emit('test', test); - return this; -}; - -/** - * Return the full title generated by recursively - * concatenating the parent's full title. - * - * @return {String} - * @api public - */ - -Suite.prototype.fullTitle = function(){ - if (this.parent) { - var full = this.parent.fullTitle(); - if (full) return full + ' ' + this.title; - } - return this.title; -}; - -/** - * Return the total number of tests. - * - * @return {Number} - * @api public - */ - -Suite.prototype.total = function(){ - return utils.reduce(this.suites, function(sum, suite){ - return sum + suite.total(); - }, 0) + this.tests.length; -}; - -/** - * Iterates through each suite recursively to find - * all tests. Applies a function in the format - * `fn(test)`. - * - * @param {Function} fn - * @return {Suite} - * @api private - */ - -Suite.prototype.eachTest = function(fn){ - utils.forEach(this.tests, fn); - utils.forEach(this.suites, function(suite){ - suite.eachTest(fn); - }); - return this; -}; - -}); // module: suite.js - -require.register("test.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Runnable = require('./runnable'); - -/** - * Expose `Test`. - */ - -module.exports = Test; - -/** - * Initialize a new `Test` with the given `title` and callback `fn`. - * - * @param {String} title - * @param {Function} fn - * @api private - */ - -function Test(title, fn) { - Runnable.call(this, title, fn); - this.pending = !fn; - this.type = 'test'; -} - -/** - * Inherit from `Runnable.prototype`. - */ - -function F(){}; -F.prototype = Runnable.prototype; -Test.prototype = new F; -Test.prototype.constructor = Test; - - -}); // module: test.js - -require.register("utils.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var fs = require('browser/fs') - , path = require('browser/path') - , join = path.join - , debug = require('browser/debug')('mocha:watch'); - -/** - * Ignored directories. - */ - -var ignore = ['node_modules', '.git']; - -/** - * Escape special characters in the given string of html. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function(html){ - return String(html) - .replace(/&/g, '&') - .replace(/"/g, '"') - .replace(//g, '>'); -}; - -/** - * Array#forEach (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @param {Object} scope - * @api private - */ - -exports.forEach = function(arr, fn, scope){ - for (var i = 0, l = arr.length; i < l; i++) - fn.call(scope, arr[i], i); -}; - -/** - * Array#map (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @param {Object} scope - * @api private - */ - -exports.map = function(arr, fn, scope){ - var result = []; - for (var i = 0, l = arr.length; i < l; i++) - result.push(fn.call(scope, arr[i], i)); - return result; -}; - -/** - * Array#indexOf (<=IE8) - * - * @parma {Array} arr - * @param {Object} obj to find index of - * @param {Number} start - * @api private - */ - -exports.indexOf = function(arr, obj, start){ - for (var i = start || 0, l = arr.length; i < l; i++) { - if (arr[i] === obj) - return i; - } - return -1; -}; - -/** - * Array#reduce (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @param {Object} initial value - * @api private - */ - -exports.reduce = function(arr, fn, val){ - var rval = val; - - for (var i = 0, l = arr.length; i < l; i++) { - rval = fn(rval, arr[i], i, arr); - } - - return rval; -}; - -/** - * Array#filter (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @api private - */ - -exports.filter = function(arr, fn){ - var ret = []; - - for (var i = 0, l = arr.length; i < l; i++) { - var val = arr[i]; - if (fn(val, i, arr)) ret.push(val); - } - - return ret; -}; - -/** - * Object.keys (<=IE8) - * - * @param {Object} obj - * @return {Array} keys - * @api private - */ - -exports.keys = Object.keys || function(obj) { - var keys = [] - , has = Object.prototype.hasOwnProperty // for `window` on <=IE8 - - for (var key in obj) { - if (has.call(obj, key)) { - keys.push(key); - } - } - - return keys; -}; - -/** - * Watch the given `files` for changes - * and invoke `fn(file)` on modification. - * - * @param {Array} files - * @param {Function} fn - * @api private - */ - -exports.watch = function(files, fn){ - var options = { interval: 100 }; - files.forEach(function(file){ - debug('file %s', file); - fs.watchFile(file, options, function(curr, prev){ - if (prev.mtime < curr.mtime) fn(file); - }); - }); -}; - -/** - * Ignored files. - */ - -function ignored(path){ - return !~ignore.indexOf(path); -} - -/** - * Lookup files in the given `dir`. - * - * @return {Array} - * @api private - */ - -exports.files = function(dir, ret){ - ret = ret || []; - - fs.readdirSync(dir) - .filter(ignored) - .forEach(function(path){ - path = join(dir, path); - if (fs.statSync(path).isDirectory()) { - exports.files(path, ret); - } else if (path.match(/\.(js|coffee|litcoffee|coffee.md)$/)) { - ret.push(path); - } - }); - - return ret; -}; - -/** - * Compute a slug from the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.slug = function(str){ - return str - .toLowerCase() - .replace(/ +/g, '-') - .replace(/[^-\w]/g, ''); -}; - -/** - * Strip the function definition from `str`, - * and re-indent for pre whitespace. - */ - -exports.clean = function(str) { - str = str - .replace(/\r\n?|[\n\u2028\u2029]/g, "\n").replace(/^\uFEFF/, '') - .replace(/^function *\(.*\) *{/, '') - .replace(/\s+\}$/, ''); - - var spaces = str.match(/^\n?( *)/)[1].length - , tabs = str.match(/^\n?(\t*)/)[1].length - , re = new RegExp('^\n?' + (tabs ? '\t' : ' ') + '{' + (tabs ? tabs : spaces) + '}', 'gm'); - - str = str.replace(re, ''); - - return exports.trim(str); -}; - -/** - * Escape regular expression characters in `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.escapeRegexp = function(str){ - return str.replace(/[-\\^$*+?.()|[\]{}]/g, "\\$&"); -}; - -/** - * Trim the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.trim = function(str){ - return str.replace(/^\s+|\s+$/g, ''); -}; - -/** - * Parse the given `qs`. - * - * @param {String} qs - * @return {Object} - * @api private - */ - -exports.parseQuery = function(qs){ - return exports.reduce(qs.replace('?', '').split('&'), function(obj, pair){ - var i = pair.indexOf('=') - , key = pair.slice(0, i) - , val = pair.slice(++i); - - obj[key] = decodeURIComponent(val); - return obj; - }, {}); -}; - -/** - * Highlight the given string of `js`. - * - * @param {String} js - * @return {String} - * @api private - */ - -function highlight(js) { - return js - .replace(//g, '>') - .replace(/\/\/(.*)/gm, '//$1') - .replace(/('.*?')/gm, '$1') - .replace(/(\d+\.\d+)/gm, '$1') - .replace(/(\d+)/gm, '$1') - .replace(/\bnew *(\w+)/gm, 'new $1') - .replace(/\b(function|new|throw|return|var|if|else)\b/gm, '$1') -} - -/** - * Highlight the contents of tag `name`. - * - * @param {String} name - * @api private - */ - -exports.highlightTags = function(name) { - var code = document.getElementsByTagName(name); - for (var i = 0, len = code.length; i < len; ++i) { - code[i].innerHTML = highlight(code[i].innerHTML); - } -}; - -}); // module: utils.js -// The global object is "self" in Web Workers. -global = (function() { return this; })(); - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date; -var setTimeout = global.setTimeout; -var setInterval = global.setInterval; -var clearTimeout = global.clearTimeout; -var clearInterval = global.clearInterval; - -/** - * Node shims. - * - * These are meant only to allow - * mocha.js to run untouched, not - * to allow running node code in - * the browser. - */ - -var process = {}; -process.exit = function(status){}; -process.stdout = {}; - -var uncaughtExceptionHandlers = []; - -/** - * Remove uncaughtException listener. - */ - -process.removeListener = function(e, fn){ - if ('uncaughtException' == e) { - global.onerror = function() {}; - var i = Mocha.utils.indexOf(uncaughtExceptionHandlers, fn); - if (i != -1) { uncaughtExceptionHandlers.splice(i, 1); } - } -}; - -/** - * Implements uncaughtException listener. - */ - -process.on = function(e, fn){ - if ('uncaughtException' == e) { - global.onerror = function(err, url, line){ - fn(new Error(err + ' (' + url + ':' + line + ')')); - return true; - }; - uncaughtExceptionHandlers.push(fn); - } -}; - -/** - * Expose mocha. - */ - -var Mocha = global.Mocha = require('mocha'), - mocha = global.mocha = new Mocha({ reporter: 'html' }); - -// The BDD UI is registered by default, but no UI will be functional in the -// browser without an explicit call to the overridden `mocha.ui` (see below). -// Ensure that this default UI does not expose its methods to the global scope. -mocha.suite.removeAllListeners('pre-require'); - -var immediateQueue = [] - , immediateTimeout; - -function timeslice() { - var immediateStart = new Date().getTime(); - while (immediateQueue.length && (new Date().getTime() - immediateStart) < 100) { - immediateQueue.shift()(); - } - if (immediateQueue.length) { - immediateTimeout = setTimeout(timeslice, 0); - } else { - immediateTimeout = null; - } -} - -/** - * High-performance override of Runner.immediately. - */ - -Mocha.Runner.immediately = function(callback) { - immediateQueue.push(callback); - if (!immediateTimeout) { - immediateTimeout = setTimeout(timeslice, 0); - } -}; - -/** - * Function to allow assertion libraries to throw errors directly into mocha. - * This is useful when running tests in a browser because window.onerror will - * only receive the 'message' attribute of the Error. - */ -mocha.throwError = function(err) { - Mocha.utils.forEach(uncaughtExceptionHandlers, function (fn) { - fn(err); - }); - throw err; -}; - -/** - * Override ui to ensure that the ui functions are initialized. - * Normally this would happen in Mocha.prototype.loadFiles. - */ - -mocha.ui = function(ui){ - Mocha.prototype.ui.call(this, ui); - this.suite.emit('pre-require', global, null, this); - return this; -}; - -/** - * Setup mocha with the given setting options. - */ - -mocha.setup = function(opts){ - if ('string' == typeof opts) opts = { ui: opts }; - for (var opt in opts) this[opt](opts[opt]); - return this; -}; - -/** - * Run mocha, returning the Runner. - */ - -mocha.run = function(fn){ - var options = mocha.options; - mocha.globals('location'); - - var query = Mocha.utils.parseQuery(global.location.search || ''); - if (query.grep) mocha.grep(query.grep); - if (query.invert) mocha.invert(); - - return Mocha.prototype.run.call(mocha, function(){ - // The DOM Document is not available in Web Workers. - if (global.document) { - Mocha.utils.highlightTags('code'); - } - if (fn) fn(); - }); -}; - -/** - * Expose the process shim. - */ - -Mocha.process = process; -})(); \ No newline at end of file diff --git a/node_modules/mocha/node_modules/.bin/jade b/node_modules/mocha/node_modules/.bin/jade deleted file mode 120000 index 571fae73..00000000 --- a/node_modules/mocha/node_modules/.bin/jade +++ /dev/null @@ -1 +0,0 @@ -../jade/bin/jade \ No newline at end of file diff --git a/node_modules/mocha/node_modules/commander/History.md b/node_modules/mocha/node_modules/commander/History.md deleted file mode 100644 index 2e665828..00000000 --- a/node_modules/mocha/node_modules/commander/History.md +++ /dev/null @@ -1,179 +0,0 @@ - -2.0.0 / 2013-07-18 -================== - - * remove input methods (.prompt, .confirm, etc) - -1.3.2 / 2013-07-18 -================== - - * add support for sub-commands to co-exist with the original command - -1.3.1 / 2013-07-18 -================== - - * add quick .runningCommand hack so you can opt-out of other logic when running a sub command - -1.3.0 / 2013-07-09 -================== - - * add EACCES error handling - * fix sub-command --help - -1.2.0 / 2013-06-13 -================== - - * allow "-" hyphen as an option argument - * support for RegExp coercion - -1.1.1 / 2012-11-20 -================== - - * add more sub-command padding - * fix .usage() when args are present. Closes #106 - -1.1.0 / 2012-11-16 -================== - - * add git-style executable subcommand support. Closes #94 - -1.0.5 / 2012-10-09 -================== - - * fix `--name` clobbering. Closes #92 - * fix examples/help. Closes #89 - -1.0.4 / 2012-09-03 -================== - - * add `outputHelp()` method. - -1.0.3 / 2012-08-30 -================== - - * remove invalid .version() defaulting - -1.0.2 / 2012-08-24 -================== - - * add `--foo=bar` support [arv] - * fix password on node 0.8.8. Make backward compatible with 0.6 [focusaurus] - -1.0.1 / 2012-08-03 -================== - - * fix issue #56 - * fix tty.setRawMode(mode) was moved to tty.ReadStream#setRawMode() (i.e. process.stdin.setRawMode()) - -1.0.0 / 2012-07-05 -================== - - * add support for optional option descriptions - * add defaulting of `.version()` to package.json's version - -0.6.1 / 2012-06-01 -================== - - * Added: append (yes or no) on confirmation - * Added: allow node.js v0.7.x - -0.6.0 / 2012-04-10 -================== - - * Added `.prompt(obj, callback)` support. Closes #49 - * Added default support to .choose(). Closes #41 - * Fixed the choice example - -0.5.1 / 2011-12-20 -================== - - * Fixed `password()` for recent nodes. Closes #36 - -0.5.0 / 2011-12-04 -================== - - * Added sub-command option support [itay] - -0.4.3 / 2011-12-04 -================== - - * Fixed custom help ordering. Closes #32 - -0.4.2 / 2011-11-24 -================== - - * Added travis support - * Fixed: line-buffered input automatically trimmed. Closes #31 - -0.4.1 / 2011-11-18 -================== - - * Removed listening for "close" on --help - -0.4.0 / 2011-11-15 -================== - - * Added support for `--`. Closes #24 - -0.3.3 / 2011-11-14 -================== - - * Fixed: wait for close event when writing help info [Jerry Hamlet] - -0.3.2 / 2011-11-01 -================== - - * Fixed long flag definitions with values [felixge] - -0.3.1 / 2011-10-31 -================== - - * Changed `--version` short flag to `-V` from `-v` - * Changed `.version()` so it's configurable [felixge] - -0.3.0 / 2011-10-31 -================== - - * Added support for long flags only. Closes #18 - -0.2.1 / 2011-10-24 -================== - - * "node": ">= 0.4.x < 0.7.0". Closes #20 - -0.2.0 / 2011-09-26 -================== - - * Allow for defaults that are not just boolean. Default peassignment only occurs for --no-*, optional, and required arguments. [Jim Isaacs] - -0.1.0 / 2011-08-24 -================== - - * Added support for custom `--help` output - -0.0.5 / 2011-08-18 -================== - - * Changed: when the user enters nothing prompt for password again - * Fixed issue with passwords beginning with numbers [NuckChorris] - -0.0.4 / 2011-08-15 -================== - - * Fixed `Commander#args` - -0.0.3 / 2011-08-15 -================== - - * Added default option value support - -0.0.2 / 2011-08-15 -================== - - * Added mask support to `Command#password(str[, mask], fn)` - * Added `Command#password(str, fn)` - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/mocha/node_modules/commander/Readme.md b/node_modules/mocha/node_modules/commander/Readme.md deleted file mode 100644 index d1644012..00000000 --- a/node_modules/mocha/node_modules/commander/Readme.md +++ /dev/null @@ -1,195 +0,0 @@ -# Commander.js - - The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander). - - [![Build Status](https://secure.travis-ci.org/visionmedia/commander.js.png)](http://travis-ci.org/visionmedia/commander.js) - -## Installation - - $ npm install commander - -## Option parsing - - Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('commander'); - -program - .version('0.0.1') - .option('-p, --peppers', 'Add peppers') - .option('-P, --pineapple', 'Add pineapple') - .option('-b, --bbq', 'Add bbq sauce') - .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble') - .parse(process.argv); - -console.log('you ordered a pizza with:'); -if (program.peppers) console.log(' - peppers'); -if (program.pineapple) console.log(' - pineapple'); -if (program.bbq) console.log(' - bbq'); -console.log(' - %s cheese', program.cheese); -``` - - Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc. - -## Automated --help - - The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free: - -``` - $ ./examples/pizza --help - - Usage: pizza [options] - - Options: - - -V, --version output the version number - -p, --peppers Add peppers - -P, --pineapple Add pineapple - -b, --bbq Add bbq sauce - -c, --cheese Add the specified type of cheese [marble] - -h, --help output usage information - -``` - -## Coercion - -```js -function range(val) { - return val.split('..').map(Number); -} - -function list(val) { - return val.split(','); -} - -program - .version('0.0.1') - .usage('[options] ') - .option('-i, --integer ', 'An integer argument', parseInt) - .option('-f, --float ', 'A float argument', parseFloat) - .option('-r, --range ..', 'A range', range) - .option('-l, --list ', 'A list', list) - .option('-o, --optional [value]', 'An optional value') - .parse(process.argv); - -console.log(' int: %j', program.integer); -console.log(' float: %j', program.float); -console.log(' optional: %j', program.optional); -program.range = program.range || []; -console.log(' range: %j..%j', program.range[0], program.range[1]); -console.log(' list: %j', program.list); -console.log(' args: %j', program.args); -``` - -## Custom help - - You can display arbitrary `-h, --help` information - by listening for "--help". Commander will automatically - exit once you are done so that the remainder of your program - does not execute causing undesired behaviours, for example - in the following executable "stuff" will not output when - `--help` is used. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('../'); - -function list(val) { - return val.split(',').map(Number); -} - -program - .version('0.0.1') - .option('-f, --foo', 'enable some foo') - .option('-b, --bar', 'enable some bar') - .option('-B, --baz', 'enable some baz'); - -// must be before .parse() since -// node's emit() is immediate - -program.on('--help', function(){ - console.log(' Examples:'); - console.log(''); - console.log(' $ custom-help --help'); - console.log(' $ custom-help -h'); - console.log(''); -}); - -program.parse(process.argv); - -console.log('stuff'); -``` - -yielding the following help output: - -``` - -Usage: custom-help [options] - -Options: - - -h, --help output usage information - -V, --version output the version number - -f, --foo enable some foo - -b, --bar enable some bar - -B, --baz enable some baz - -Examples: - - $ custom-help --help - $ custom-help -h - -``` - -## .outputHelp() - - Output help information without exiting. - -## .help() - - Output help information and exit immediately. - -## Links - - - [API documentation](http://visionmedia.github.com/commander.js/) - - [ascii tables](https://github.com/LearnBoost/cli-table) - - [progress bars](https://github.com/visionmedia/node-progress) - - [more progress bars](https://github.com/substack/node-multimeter) - - [examples](https://github.com/visionmedia/commander.js/tree/master/examples) - -## License - -(The MIT License) - -Copyright (c) 2011 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/node_modules/mocha/node_modules/commander/index.js b/node_modules/mocha/node_modules/commander/index.js deleted file mode 100644 index d5778a75..00000000 --- a/node_modules/mocha/node_modules/commander/index.js +++ /dev/null @@ -1,847 +0,0 @@ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter; -var spawn = require('child_process').spawn; -var fs = require('fs'); -var exists = fs.existsSync; -var path = require('path'); -var dirname = path.dirname; -var basename = path.basename; - -/** - * Expose the root command. - */ - -exports = module.exports = new Command; - -/** - * Expose `Command`. - */ - -exports.Command = Command; - -/** - * Expose `Option`. - */ - -exports.Option = Option; - -/** - * Initialize a new `Option` with the given `flags` and `description`. - * - * @param {String} flags - * @param {String} description - * @api public - */ - -function Option(flags, description) { - this.flags = flags; - this.required = ~flags.indexOf('<'); - this.optional = ~flags.indexOf('['); - this.bool = !~flags.indexOf('-no-'); - flags = flags.split(/[ ,|]+/); - if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift(); - this.long = flags.shift(); - this.description = description || ''; -} - -/** - * Return option name. - * - * @return {String} - * @api private - */ - -Option.prototype.name = function(){ - return this.long - .replace('--', '') - .replace('no-', ''); -}; - -/** - * Check if `arg` matches the short or long flag. - * - * @param {String} arg - * @return {Boolean} - * @api private - */ - -Option.prototype.is = function(arg){ - return arg == this.short - || arg == this.long; -}; - -/** - * Initialize a new `Command`. - * - * @param {String} name - * @api public - */ - -function Command(name) { - this.commands = []; - this.options = []; - this._execs = []; - this._args = []; - this._name = name; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Command.prototype.__proto__ = EventEmitter.prototype; - -/** - * Add command `name`. - * - * The `.action()` callback is invoked when the - * command `name` is specified via __ARGV__, - * and the remaining arguments are applied to the - * function for access. - * - * When the `name` is "*" an un-matched command - * will be passed as the first arg, followed by - * the rest of __ARGV__ remaining. - * - * Examples: - * - * program - * .version('0.0.1') - * .option('-C, --chdir ', 'change the working directory') - * .option('-c, --config ', 'set config path. defaults to ./deploy.conf') - * .option('-T, --no-tests', 'ignore test hook') - * - * program - * .command('setup') - * .description('run remote setup commands') - * .action(function(){ - * console.log('setup'); - * }); - * - * program - * .command('exec ') - * .description('run the given remote command') - * .action(function(cmd){ - * console.log('exec "%s"', cmd); - * }); - * - * program - * .command('*') - * .description('deploy the given env') - * .action(function(env){ - * console.log('deploying "%s"', env); - * }); - * - * program.parse(process.argv); - * - * @param {String} name - * @param {String} [desc] - * @return {Command} the new command - * @api public - */ - -Command.prototype.command = function(name, desc){ - var args = name.split(/ +/); - var cmd = new Command(args.shift()); - if (desc) cmd.description(desc); - if (desc) this.executables = true; - if (desc) this._execs[cmd._name] = true; - this.commands.push(cmd); - cmd.parseExpectedArgs(args); - cmd.parent = this; - if (desc) return this; - return cmd; -}; - -/** - * Add an implicit `help [cmd]` subcommand - * which invokes `--help` for the given command. - * - * @api private - */ - -Command.prototype.addImplicitHelpCommand = function() { - this.command('help [cmd]', 'display help for [cmd]'); -}; - -/** - * Parse expected `args`. - * - * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. - * - * @param {Array} args - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parseExpectedArgs = function(args){ - if (!args.length) return; - var self = this; - args.forEach(function(arg){ - switch (arg[0]) { - case '<': - self._args.push({ required: true, name: arg.slice(1, -1) }); - break; - case '[': - self._args.push({ required: false, name: arg.slice(1, -1) }); - break; - } - }); - return this; -}; - -/** - * Register callback `fn` for the command. - * - * Examples: - * - * program - * .command('help') - * .description('display verbose help') - * .action(function(){ - * // output help here - * }); - * - * @param {Function} fn - * @return {Command} for chaining - * @api public - */ - -Command.prototype.action = function(fn){ - var self = this; - this.parent.on(this._name, function(args, unknown){ - // Parse any so-far unknown options - unknown = unknown || []; - var parsed = self.parseOptions(unknown); - - // Output help if necessary - outputHelpIfNecessary(self, parsed.unknown); - - // If there are still any unknown options, then we simply - // die, unless someone asked for help, in which case we give it - // to them, and then we die. - if (parsed.unknown.length > 0) { - self.unknownOption(parsed.unknown[0]); - } - - // Leftover arguments need to be pushed back. Fixes issue #56 - if (parsed.args.length) args = parsed.args.concat(args); - - self._args.forEach(function(arg, i){ - if (arg.required && null == args[i]) { - self.missingArgument(arg.name); - } - }); - - // Always append ourselves to the end of the arguments, - // to make sure we match the number of arguments the user - // expects - if (self._args.length) { - args[self._args.length] = self; - } else { - args.push(self); - } - - fn.apply(this, args); - }); - return this; -}; - -/** - * Define option with `flags`, `description` and optional - * coercion `fn`. - * - * The `flags` string should contain both the short and long flags, - * separated by comma, a pipe or space. The following are all valid - * all will output this way when `--help` is used. - * - * "-p, --pepper" - * "-p|--pepper" - * "-p --pepper" - * - * Examples: - * - * // simple boolean defaulting to false - * program.option('-p, --pepper', 'add pepper'); - * - * --pepper - * program.pepper - * // => Boolean - * - * // simple boolean defaulting to false - * program.option('-C, --no-cheese', 'remove cheese'); - * - * program.cheese - * // => true - * - * --no-cheese - * program.cheese - * // => true - * - * // required argument - * program.option('-C, --chdir ', 'change the working directory'); - * - * --chdir /tmp - * program.chdir - * // => "/tmp" - * - * // optional argument - * program.option('-c, --cheese [type]', 'add cheese [marble]'); - * - * @param {String} flags - * @param {String} description - * @param {Function|Mixed} fn or default - * @param {Mixed} defaultValue - * @return {Command} for chaining - * @api public - */ - -Command.prototype.option = function(flags, description, fn, defaultValue){ - var self = this - , option = new Option(flags, description) - , oname = option.name() - , name = camelcase(oname); - - // default as 3rd arg - if ('function' != typeof fn) defaultValue = fn, fn = null; - - // preassign default value only for --no-*, [optional], or - if (false == option.bool || option.optional || option.required) { - // when --no-* we make sure default is true - if (false == option.bool) defaultValue = true; - // preassign only if we have a default - if (undefined !== defaultValue) self[name] = defaultValue; - } - - // register the option - this.options.push(option); - - // when it's passed assign the value - // and conditionally invoke the callback - this.on(oname, function(val){ - // coercion - if (null != val && fn) val = fn(val); - - // unassigned or bool - if ('boolean' == typeof self[name] || 'undefined' == typeof self[name]) { - // if no value, bool true, and we have a default, then use it! - if (null == val) { - self[name] = option.bool - ? defaultValue || true - : false; - } else { - self[name] = val; - } - } else if (null !== val) { - // reassign - self[name] = val; - } - }); - - return this; -}; - -/** - * Parse `argv`, settings options and invoking commands when defined. - * - * @param {Array} argv - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parse = function(argv){ - // implicit help - if (this.executables) this.addImplicitHelpCommand(); - - // store raw args - this.rawArgs = argv; - - // guess name - this._name = this._name || basename(argv[1]); - - // process argv - var parsed = this.parseOptions(this.normalize(argv.slice(2))); - var args = this.args = parsed.args; - - var result = this.parseArgs(this.args, parsed.unknown); - - // executable sub-commands - var name = result.args[0]; - if (this._execs[name]) return this.executeSubCommand(argv, args, parsed.unknown); - - return result; -}; - -/** - * Execute a sub-command executable. - * - * @param {Array} argv - * @param {Array} args - * @param {Array} unknown - * @api private - */ - -Command.prototype.executeSubCommand = function(argv, args, unknown) { - args = args.concat(unknown); - - if (!args.length) this.help(); - if ('help' == args[0] && 1 == args.length) this.help(); - - // --help - if ('help' == args[0]) { - args[0] = args[1]; - args[1] = '--help'; - } - - // executable - var dir = dirname(argv[1]); - var bin = basename(argv[1]) + '-' + args[0]; - - // check for ./ first - var local = path.join(dir, bin); - - // run it - args = args.slice(1); - var proc = spawn(local, args, { stdio: 'inherit', customFds: [0, 1, 2] }); - proc.on('error', function(err){ - if (err.code == "ENOENT") { - console.error('\n %s(1) does not exist, try --help\n', bin); - } else if (err.code == "EACCES") { - console.error('\n %s(1) not executable. try chmod or run with root\n', bin); - } - }); - - this.runningCommand = proc; -}; - -/** - * Normalize `args`, splitting joined short flags. For example - * the arg "-abc" is equivalent to "-a -b -c". - * This also normalizes equal sign and splits "--abc=def" into "--abc def". - * - * @param {Array} args - * @return {Array} - * @api private - */ - -Command.prototype.normalize = function(args){ - var ret = [] - , arg - , index; - - for (var i = 0, len = args.length; i < len; ++i) { - arg = args[i]; - if (arg.length > 1 && '-' == arg[0] && '-' != arg[1]) { - arg.slice(1).split('').forEach(function(c){ - ret.push('-' + c); - }); - } else if (/^--/.test(arg) && ~(index = arg.indexOf('='))) { - ret.push(arg.slice(0, index), arg.slice(index + 1)); - } else { - ret.push(arg); - } - } - - return ret; -}; - -/** - * Parse command `args`. - * - * When listener(s) are available those - * callbacks are invoked, otherwise the "*" - * event is emitted and those actions are invoked. - * - * @param {Array} args - * @return {Command} for chaining - * @api private - */ - -Command.prototype.parseArgs = function(args, unknown){ - var cmds = this.commands - , len = cmds.length - , name; - - if (args.length) { - name = args[0]; - if (this.listeners(name).length) { - this.emit(args.shift(), args, unknown); - } else { - this.emit('*', args); - } - } else { - outputHelpIfNecessary(this, unknown); - - // If there were no args and we have unknown options, - // then they are extraneous and we need to error. - if (unknown.length > 0) { - this.unknownOption(unknown[0]); - } - } - - return this; -}; - -/** - * Return an option matching `arg` if any. - * - * @param {String} arg - * @return {Option} - * @api private - */ - -Command.prototype.optionFor = function(arg){ - for (var i = 0, len = this.options.length; i < len; ++i) { - if (this.options[i].is(arg)) { - return this.options[i]; - } - } -}; - -/** - * Parse options from `argv` returning `argv` - * void of these options. - * - * @param {Array} argv - * @return {Array} - * @api public - */ - -Command.prototype.parseOptions = function(argv){ - var args = [] - , len = argv.length - , literal - , option - , arg; - - var unknownOptions = []; - - // parse options - for (var i = 0; i < len; ++i) { - arg = argv[i]; - - // literal args after -- - if ('--' == arg) { - literal = true; - continue; - } - - if (literal) { - args.push(arg); - continue; - } - - // find matching Option - option = this.optionFor(arg); - - // option is defined - if (option) { - // requires arg - if (option.required) { - arg = argv[++i]; - if (null == arg) return this.optionMissingArgument(option); - if ('-' == arg[0] && '-' != arg) return this.optionMissingArgument(option, arg); - this.emit(option.name(), arg); - // optional arg - } else if (option.optional) { - arg = argv[i+1]; - if (null == arg || ('-' == arg[0] && '-' != arg)) { - arg = null; - } else { - ++i; - } - this.emit(option.name(), arg); - // bool - } else { - this.emit(option.name()); - } - continue; - } - - // looks like an option - if (arg.length > 1 && '-' == arg[0]) { - unknownOptions.push(arg); - - // If the next argument looks like it might be - // an argument for this option, we pass it on. - // If it isn't, then it'll simply be ignored - if (argv[i+1] && '-' != argv[i+1][0]) { - unknownOptions.push(argv[++i]); - } - continue; - } - - // arg - args.push(arg); - } - - return { args: args, unknown: unknownOptions }; -}; - -/** - * Argument `name` is missing. - * - * @param {String} name - * @api private - */ - -Command.prototype.missingArgument = function(name){ - console.error(); - console.error(" error: missing required argument `%s'", name); - console.error(); - process.exit(1); -}; - -/** - * `Option` is missing an argument, but received `flag` or nothing. - * - * @param {String} option - * @param {String} flag - * @api private - */ - -Command.prototype.optionMissingArgument = function(option, flag){ - console.error(); - if (flag) { - console.error(" error: option `%s' argument missing, got `%s'", option.flags, flag); - } else { - console.error(" error: option `%s' argument missing", option.flags); - } - console.error(); - process.exit(1); -}; - -/** - * Unknown option `flag`. - * - * @param {String} flag - * @api private - */ - -Command.prototype.unknownOption = function(flag){ - console.error(); - console.error(" error: unknown option `%s'", flag); - console.error(); - process.exit(1); -}; - - -/** - * Set the program version to `str`. - * - * This method auto-registers the "-V, --version" flag - * which will print the version number when passed. - * - * @param {String} str - * @param {String} flags - * @return {Command} for chaining - * @api public - */ - -Command.prototype.version = function(str, flags){ - if (0 == arguments.length) return this._version; - this._version = str; - flags = flags || '-V, --version'; - this.option(flags, 'output the version number'); - this.on('version', function(){ - console.log(str); - process.exit(0); - }); - return this; -}; - -/** - * Set the description `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.description = function(str){ - if (0 == arguments.length) return this._description; - this._description = str; - return this; -}; - -/** - * Set / get the command usage `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.usage = function(str){ - var args = this._args.map(function(arg){ - return arg.required - ? '<' + arg.name + '>' - : '[' + arg.name + ']'; - }); - - var usage = '[options' - + (this.commands.length ? '] [command' : '') - + ']' - + (this._args.length ? ' ' + args : ''); - - if (0 == arguments.length) return this._usage || usage; - this._usage = str; - - return this; -}; - -/** - * Return the largest option length. - * - * @return {Number} - * @api private - */ - -Command.prototype.largestOptionLength = function(){ - return this.options.reduce(function(max, option){ - return Math.max(max, option.flags.length); - }, 0); -}; - -/** - * Return help for options. - * - * @return {String} - * @api private - */ - -Command.prototype.optionHelp = function(){ - var width = this.largestOptionLength(); - - // Prepend the help information - return [pad('-h, --help', width) + ' ' + 'output usage information'] - .concat(this.options.map(function(option){ - return pad(option.flags, width) - + ' ' + option.description; - })) - .join('\n'); -}; - -/** - * Return command help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.commandHelp = function(){ - if (!this.commands.length) return ''; - return [ - '' - , ' Commands:' - , '' - , this.commands.map(function(cmd){ - var args = cmd._args.map(function(arg){ - return arg.required - ? '<' + arg.name + '>' - : '[' + arg.name + ']'; - }).join(' '); - - return pad(cmd._name - + (cmd.options.length - ? ' [options]' - : '') + ' ' + args, 22) - + (cmd.description() - ? ' ' + cmd.description() - : ''); - }).join('\n').replace(/^/gm, ' ') - , '' - ].join('\n'); -}; - -/** - * Return program help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.helpInformation = function(){ - return [ - '' - , ' Usage: ' + this._name + ' ' + this.usage() - , '' + this.commandHelp() - , ' Options:' - , '' - , '' + this.optionHelp().replace(/^/gm, ' ') - , '' - , '' - ].join('\n'); -}; - -/** - * Output help information for this command - * - * @api public - */ - -Command.prototype.outputHelp = function(){ - process.stdout.write(this.helpInformation()); - this.emit('--help'); -}; - -/** - * Output help information and exit. - * - * @api public - */ - -Command.prototype.help = function(){ - this.outputHelp(); - process.exit(); -}; - -/** - * Camel-case the given `flag` - * - * @param {String} flag - * @return {String} - * @api private - */ - -function camelcase(flag) { - return flag.split('-').reduce(function(str, word){ - return str + word[0].toUpperCase() + word.slice(1); - }); -} - -/** - * Pad `str` to `width`. - * - * @param {String} str - * @param {Number} width - * @return {String} - * @api private - */ - -function pad(str, width) { - var len = Math.max(0, width - str.length); - return str + Array(len + 1).join(' '); -} - -/** - * Output help information if necessary - * - * @param {Command} command to output help for - * @param {Array} array of options to search for -h or --help - * @api private - */ - -function outputHelpIfNecessary(cmd, options) { - options = options || []; - for (var i = 0; i < options.length; i++) { - if (options[i] == '--help' || options[i] == '-h') { - cmd.outputHelp(); - process.exit(0); - } - } -} diff --git a/node_modules/mocha/node_modules/commander/package.json b/node_modules/mocha/node_modules/commander/package.json deleted file mode 100644 index e25ed273..00000000 --- a/node_modules/mocha/node_modules/commander/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "commander", - "version": "2.0.0", - "description": "the complete solution for node.js command-line programs", - "keywords": [ - "command", - "option", - "parser", - "prompt", - "stdin" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "repository": { - "type": "git", - "url": "https://github.com/visionmedia/commander.js.git" - }, - "devDependencies": { - "should": ">= 0.0.1" - }, - "scripts": { - "test": "make test" - }, - "main": "index", - "engines": { - "node": ">= 0.6.x" - }, - "readme": "# Commander.js\n\n The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander).\n\n [![Build Status](https://secure.travis-ci.org/visionmedia/commander.js.png)](http://travis-ci.org/visionmedia/commander.js)\n\n## Installation\n\n $ npm install commander\n\n## Option parsing\n\n Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('commander');\n\nprogram\n .version('0.0.1')\n .option('-p, --peppers', 'Add peppers')\n .option('-P, --pineapple', 'Add pineapple')\n .option('-b, --bbq', 'Add bbq sauce')\n .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble')\n .parse(process.argv);\n\nconsole.log('you ordered a pizza with:');\nif (program.peppers) console.log(' - peppers');\nif (program.pineapple) console.log(' - pineapple');\nif (program.bbq) console.log(' - bbq');\nconsole.log(' - %s cheese', program.cheese);\n```\n\n Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as \"--template-engine\" are camel-cased, becoming `program.templateEngine` etc.\n\n## Automated --help\n\n The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free:\n\n``` \n $ ./examples/pizza --help\n\n Usage: pizza [options]\n\n Options:\n\n -V, --version output the version number\n -p, --peppers Add peppers\n -P, --pineapple Add pineapple\n -b, --bbq Add bbq sauce\n -c, --cheese Add the specified type of cheese [marble]\n -h, --help output usage information\n\n```\n\n## Coercion\n\n```js\nfunction range(val) {\n return val.split('..').map(Number);\n}\n\nfunction list(val) {\n return val.split(',');\n}\n\nprogram\n .version('0.0.1')\n .usage('[options] ')\n .option('-i, --integer ', 'An integer argument', parseInt)\n .option('-f, --float ', 'A float argument', parseFloat)\n .option('-r, --range ..', 'A range', range)\n .option('-l, --list ', 'A list', list)\n .option('-o, --optional [value]', 'An optional value')\n .parse(process.argv);\n\nconsole.log(' int: %j', program.integer);\nconsole.log(' float: %j', program.float);\nconsole.log(' optional: %j', program.optional);\nprogram.range = program.range || [];\nconsole.log(' range: %j..%j', program.range[0], program.range[1]);\nconsole.log(' list: %j', program.list);\nconsole.log(' args: %j', program.args);\n```\n\n## Custom help\n\n You can display arbitrary `-h, --help` information\n by listening for \"--help\". Commander will automatically\n exit once you are done so that the remainder of your program\n does not execute causing undesired behaviours, for example\n in the following executable \"stuff\" will not output when\n `--help` is used.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('../');\n\nfunction list(val) {\n return val.split(',').map(Number);\n}\n\nprogram\n .version('0.0.1')\n .option('-f, --foo', 'enable some foo')\n .option('-b, --bar', 'enable some bar')\n .option('-B, --baz', 'enable some baz');\n\n// must be before .parse() since\n// node's emit() is immediate\n\nprogram.on('--help', function(){\n console.log(' Examples:');\n console.log('');\n console.log(' $ custom-help --help');\n console.log(' $ custom-help -h');\n console.log('');\n});\n\nprogram.parse(process.argv);\n\nconsole.log('stuff');\n```\n\nyielding the following help output:\n\n```\n\nUsage: custom-help [options]\n\nOptions:\n\n -h, --help output usage information\n -V, --version output the version number\n -f, --foo enable some foo\n -b, --bar enable some bar\n -B, --baz enable some baz\n\nExamples:\n\n $ custom-help --help\n $ custom-help -h\n\n```\n\n## .outputHelp()\n\n Output help information without exiting.\n\n## .help()\n\n Output help information and exit immediately.\n\n## Links\n\n - [API documentation](http://visionmedia.github.com/commander.js/)\n - [ascii tables](https://github.com/LearnBoost/cli-table)\n - [progress bars](https://github.com/visionmedia/node-progress)\n - [more progress bars](https://github.com/substack/node-multimeter)\n - [examples](https://github.com/visionmedia/commander.js/tree/master/examples)\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/commander.js/issues" - }, - "homepage": "https://github.com/visionmedia/commander.js", - "_id": "commander@2.0.0", - "_from": "commander@2.0.0" -} diff --git a/node_modules/mocha/node_modules/debug/Readme.md b/node_modules/mocha/node_modules/debug/Readme.md deleted file mode 100644 index c5a34e8b..00000000 --- a/node_modules/mocha/node_modules/debug/Readme.md +++ /dev/null @@ -1,115 +0,0 @@ -# debug - - tiny node.js debugging utility modelled after node core's debugging technique. - -## Installation - -``` -$ npm install debug -``` - -## Usage - - With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` format string goodies you're used to work fine. A unique color is selected per-function for visibility. - -Example _app.js_: - -```js -var debug = require('debug')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %s', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); -``` - -Example _worker.js_: - -```js -var debug = require('debug')('worker'); - -setInterval(function(){ - debug('doing some work'); -}, 1000); -``` - - The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples: - - ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png) - - ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png) - -## Millisecond diff - - When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png) - - When stderr is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below: - _(NOTE: Debug now uses stderr instead of stdout, so the correct shell command for this example is actually `DEBUG=* node example/worker 2> out &`)_ - - ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png) - -## Conventions - - If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". - -## Wildcards - - The "*" character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect.compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - - You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=* -connect:*` would include all debuggers except those starting with "connect:". - -## Browser support - - Debug works in the browser as well, currently persisted by `localStorage`. For example if you have `worker:a` and `worker:b` as shown below, and wish to debug both type `debug.enable('worker:*')` in the console and refresh the page, this will remain until you disable with `debug.disable()`. - -```js -a = debug('worker:a'); -b = debug('worker:b'); - -setInterval(function(){ - a('doing some work'); -}, 1000); - -setInterval(function(){ - a('doing some work'); -}, 1200); -``` - -## License - -(The MIT License) - -Copyright (c) 2011 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/node_modules/mocha/node_modules/debug/debug.js b/node_modules/mocha/node_modules/debug/debug.js deleted file mode 100644 index 509dc0de..00000000 --- a/node_modules/mocha/node_modules/debug/debug.js +++ /dev/null @@ -1,137 +0,0 @@ - -/** - * Expose `debug()` as the module. - */ - -module.exports = debug; - -/** - * Create a debugger with the given `name`. - * - * @param {String} name - * @return {Type} - * @api public - */ - -function debug(name) { - if (!debug.enabled(name)) return function(){}; - - return function(fmt){ - fmt = coerce(fmt); - - var curr = new Date; - var ms = curr - (debug[name] || curr); - debug[name] = curr; - - fmt = name - + ' ' - + fmt - + ' +' + debug.humanize(ms); - - // This hackery is required for IE8 - // where `console.log` doesn't have 'apply' - window.console - && console.log - && Function.prototype.apply.call(console.log, console, arguments); - } -} - -/** - * The currently active debug mode names. - */ - -debug.names = []; -debug.skips = []; - -/** - * Enables a debug mode by name. This can include modes - * separated by a colon and wildcards. - * - * @param {String} name - * @api public - */ - -debug.enable = function(name) { - try { - localStorage.debug = name; - } catch(e){} - - var split = (name || '').split(/[\s,]+/) - , len = split.length; - - for (var i = 0; i < len; i++) { - name = split[i].replace('*', '.*?'); - if (name[0] === '-') { - debug.skips.push(new RegExp('^' + name.substr(1) + '$')); - } - else { - debug.names.push(new RegExp('^' + name + '$')); - } - } -}; - -/** - * Disable debug output. - * - * @api public - */ - -debug.disable = function(){ - debug.enable(''); -}; - -/** - * Humanize the given `ms`. - * - * @param {Number} m - * @return {String} - * @api private - */ - -debug.humanize = function(ms) { - var sec = 1000 - , min = 60 * 1000 - , hour = 60 * min; - - if (ms >= hour) return (ms / hour).toFixed(1) + 'h'; - if (ms >= min) return (ms / min).toFixed(1) + 'm'; - if (ms >= sec) return (ms / sec | 0) + 's'; - return ms + 'ms'; -}; - -/** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - -debug.enabled = function(name) { - for (var i = 0, len = debug.skips.length; i < len; i++) { - if (debug.skips[i].test(name)) { - return false; - } - } - for (var i = 0, len = debug.names.length; i < len; i++) { - if (debug.names[i].test(name)) { - return true; - } - } - return false; -}; - -/** - * Coerce `val`. - */ - -function coerce(val) { - if (val instanceof Error) return val.stack || val.message; - return val; -} - -// persist - -try { - if (window.localStorage) debug.enable(localStorage.debug); -} catch(e){} diff --git a/node_modules/mocha/node_modules/debug/index.js b/node_modules/mocha/node_modules/debug/index.js deleted file mode 100644 index e02c13b7..00000000 --- a/node_modules/mocha/node_modules/debug/index.js +++ /dev/null @@ -1,5 +0,0 @@ -if ('undefined' == typeof window) { - module.exports = require('./lib/debug'); -} else { - module.exports = require('./debug'); -} diff --git a/node_modules/mocha/node_modules/debug/lib/debug.js b/node_modules/mocha/node_modules/debug/lib/debug.js deleted file mode 100644 index 3b0a9183..00000000 --- a/node_modules/mocha/node_modules/debug/lib/debug.js +++ /dev/null @@ -1,147 +0,0 @@ -/** - * Module dependencies. - */ - -var tty = require('tty'); - -/** - * Expose `debug()` as the module. - */ - -module.exports = debug; - -/** - * Enabled debuggers. - */ - -var names = [] - , skips = []; - -(process.env.DEBUG || '') - .split(/[\s,]+/) - .forEach(function(name){ - name = name.replace('*', '.*?'); - if (name[0] === '-') { - skips.push(new RegExp('^' + name.substr(1) + '$')); - } else { - names.push(new RegExp('^' + name + '$')); - } - }); - -/** - * Colors. - */ - -var colors = [6, 2, 3, 4, 5, 1]; - -/** - * Previous debug() call. - */ - -var prev = {}; - -/** - * Previously assigned color. - */ - -var prevColor = 0; - -/** - * Is stdout a TTY? Colored output is disabled when `true`. - */ - -var isatty = tty.isatty(2); - -/** - * Select a color. - * - * @return {Number} - * @api private - */ - -function color() { - return colors[prevColor++ % colors.length]; -} - -/** - * Humanize the given `ms`. - * - * @param {Number} m - * @return {String} - * @api private - */ - -function humanize(ms) { - var sec = 1000 - , min = 60 * 1000 - , hour = 60 * min; - - if (ms >= hour) return (ms / hour).toFixed(1) + 'h'; - if (ms >= min) return (ms / min).toFixed(1) + 'm'; - if (ms >= sec) return (ms / sec | 0) + 's'; - return ms + 'ms'; -} - -/** - * Create a debugger with the given `name`. - * - * @param {String} name - * @return {Type} - * @api public - */ - -function debug(name) { - function disabled(){} - disabled.enabled = false; - - var match = skips.some(function(re){ - return re.test(name); - }); - - if (match) return disabled; - - match = names.some(function(re){ - return re.test(name); - }); - - if (!match) return disabled; - var c = color(); - - function colored(fmt) { - fmt = coerce(fmt); - - var curr = new Date; - var ms = curr - (prev[name] || curr); - prev[name] = curr; - - fmt = ' \u001b[9' + c + 'm' + name + ' ' - + '\u001b[3' + c + 'm\u001b[90m' - + fmt + '\u001b[3' + c + 'm' - + ' +' + humanize(ms) + '\u001b[0m'; - - console.error.apply(this, arguments); - } - - function plain(fmt) { - fmt = coerce(fmt); - - fmt = new Date().toUTCString() - + ' ' + name + ' ' + fmt; - console.error.apply(this, arguments); - } - - colored.enabled = plain.enabled = true; - - return isatty || process.env.DEBUG_COLORS - ? colored - : plain; -} - -/** - * Coerce `val`. - */ - -function coerce(val) { - if (val instanceof Error) return val.stack || val.message; - return val; -} diff --git a/node_modules/mocha/node_modules/debug/package.json b/node_modules/mocha/node_modules/debug/package.json deleted file mode 100644 index f44874e1..00000000 --- a/node_modules/mocha/node_modules/debug/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "debug", - "version": "0.7.4", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/debug.git" - }, - "description": "small debugging utility", - "keywords": [ - "debug", - "log", - "debugger" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "*" - }, - "main": "lib/debug.js", - "browser": "./debug.js", - "engines": { - "node": "*" - }, - "files": [ - "lib/debug.js", - "debug.js", - "index.js" - ], - "component": { - "scripts": { - "debug/index.js": "index.js", - "debug/debug.js": "debug.js" - } - }, - "readme": "# debug\n\n tiny node.js debugging utility modelled after node core's debugging technique.\n\n## Installation\n\n```\n$ npm install debug\n```\n\n## Usage\n\n With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` format string goodies you're used to work fine. A unique color is selected per-function for visibility.\n \nExample _app.js_:\n\n```js\nvar debug = require('debug')('http')\n , http = require('http')\n , name = 'My App';\n\n// fake app\n\ndebug('booting %s', name);\n\nhttp.createServer(function(req, res){\n debug(req.method + ' ' + req.url);\n res.end('hello\\n');\n}).listen(3000, function(){\n debug('listening');\n});\n\n// fake worker of some kind\n\nrequire('./worker');\n```\n\nExample _worker.js_:\n\n```js\nvar debug = require('debug')('worker');\n\nsetInterval(function(){\n debug('doing some work');\n}, 1000);\n```\n\n The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:\n\n ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png)\n\n ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png)\n\n## Millisecond diff\n\n When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the \"+NNNms\" will show you how much time was spent between calls.\n\n ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png)\n\n When stderr is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:\n _(NOTE: Debug now uses stderr instead of stdout, so the correct shell command for this example is actually `DEBUG=* node example/worker 2> out &`)_\n \n ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png)\n \n## Conventions\n\n If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use \":\" to separate features. For example \"bodyParser\" from Connect would then be \"connect:bodyParser\". \n\n## Wildcards\n\n The \"*\" character may be used as a wildcard. Suppose for example your library has debuggers named \"connect:bodyParser\", \"connect:compress\", \"connect:session\", instead of listing all three with `DEBUG=connect:bodyParser,connect.compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.\n\n You can also exclude specific debuggers by prefixing them with a \"-\" character. For example, `DEBUG=* -connect:*` would include all debuggers except those starting with \"connect:\".\n\n## Browser support\n\n Debug works in the browser as well, currently persisted by `localStorage`. For example if you have `worker:a` and `worker:b` as shown below, and wish to debug both type `debug.enable('worker:*')` in the console and refresh the page, this will remain until you disable with `debug.disable()`. \n\n```js\na = debug('worker:a');\nb = debug('worker:b');\n\nsetInterval(function(){\n a('doing some work');\n}, 1000);\n\nsetInterval(function(){\n a('doing some work');\n}, 1200);\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/debug/issues" - }, - "homepage": "https://github.com/visionmedia/debug", - "_id": "debug@0.7.4", - "_from": "debug@*" -} diff --git a/node_modules/mocha/node_modules/diff/README.md b/node_modules/mocha/node_modules/diff/README.md deleted file mode 100644 index 95bd8da2..00000000 --- a/node_modules/mocha/node_modules/diff/README.md +++ /dev/null @@ -1,101 +0,0 @@ -# jsdiff - -[![Build Status](https://secure.travis-ci.org/kpdecker/jsdiff.png)](http://travis-ci.org/kpdecker/jsdiff) - -A javascript text differencing implementation. - -Based on the algorithm proposed in -["An O(ND) Difference Algorithm and its Variations" (Myers, 1986)](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927). - -## Installation - - npm install diff - -or - - git clone git://github.com/kpdecker/jsdiff.git - -## API - -* JsDiff.diffChars(oldStr, newStr) - Diffs two blocks of text, comparing character by character. - - Returns a list of change objects (See below). - -* JsDiff.diffWords(oldStr, newStr) - Diffs two blocks of text, comparing word by word. - - Returns a list of change objects (See below). - -* JsDiff.diffLines(oldStr, newStr) - Diffs two blocks of text, comparing line by line. - - Returns a list of change objects (See below). - -* JsDiff.diffCss(oldStr, newStr) - Diffs two blocks of text, comparing CSS tokens. - - Returns a list of change objects (See below). - -* JsDiff.createPatch(fileName, oldStr, newStr, oldHeader, newHeader) - Creates a unified diff patch. - - Parameters: - * fileName : String to be output in the filename sections of the patch - * oldStr : Original string value - * newStr : New string value - * oldHeader : Additional information to include in the old file header - * newHeader : Additional information to include in thew new file header - -* JsDiff.applyPatch(oldStr, diffStr) - Applies a unified diff patch. - - Return a string containing new version of provided data. - -* convertChangesToXML(changes) - Converts a list of changes to a serialized XML format - -### Change Objects -Many of the methods above return change objects. These objects are consist of the following fields: - -* value: Text content -* added: True if the value was inserted into the new string -* removed: True of the value was removed from the old string - -Note that some cases may omit a particular flag field. Comparison on the flag fields should always be done in a truthy or falsy manner. - -## [Example](http://kpdecker.github.com/jsdiff) - -## License - -Software License Agreement (BSD License) - -Copyright (c) 2009-2011, Kevin Decker kpdecker@gmail.com - -All rights reserved. - -Redistribution and use of this software in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above - copyright notice, this list of conditions and the - following disclaimer. - -* Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the - following disclaimer in the documentation and/or other - materials provided with the distribution. - -* Neither the name of Kevin Decker nor the names of its - contributors may be used to endorse or promote products - derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/mocha/node_modules/diff/diff.js b/node_modules/mocha/node_modules/diff/diff.js deleted file mode 100644 index a34c22a0..00000000 --- a/node_modules/mocha/node_modules/diff/diff.js +++ /dev/null @@ -1,354 +0,0 @@ -/* See LICENSE file for terms of use */ - -/* - * Text diff implementation. - * - * This library supports the following APIS: - * JsDiff.diffChars: Character by character diff - * JsDiff.diffWords: Word (as defined by \b regex) diff which ignores whitespace - * JsDiff.diffLines: Line based diff - * - * JsDiff.diffCss: Diff targeted at CSS content - * - * These methods are based on the implementation proposed in - * "An O(ND) Difference Algorithm and its Variations" (Myers, 1986). - * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927 - */ -var JsDiff = (function() { - /*jshint maxparams: 5*/ - function clonePath(path) { - return { newPos: path.newPos, components: path.components.slice(0) }; - } - function removeEmpty(array) { - var ret = []; - for (var i = 0; i < array.length; i++) { - if (array[i]) { - ret.push(array[i]); - } - } - return ret; - } - function escapeHTML(s) { - var n = s; - n = n.replace(/&/g, '&'); - n = n.replace(//g, '>'); - n = n.replace(/"/g, '"'); - - return n; - } - - var Diff = function(ignoreWhitespace) { - this.ignoreWhitespace = ignoreWhitespace; - }; - Diff.prototype = { - diff: function(oldString, newString) { - // Handle the identity case (this is due to unrolling editLength == 0 - if (newString === oldString) { - return [{ value: newString }]; - } - if (!newString) { - return [{ value: oldString, removed: true }]; - } - if (!oldString) { - return [{ value: newString, added: true }]; - } - - newString = this.tokenize(newString); - oldString = this.tokenize(oldString); - - var newLen = newString.length, oldLen = oldString.length; - var maxEditLength = newLen + oldLen; - var bestPath = [{ newPos: -1, components: [] }]; - - // Seed editLength = 0 - var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); - if (bestPath[0].newPos+1 >= newLen && oldPos+1 >= oldLen) { - return bestPath[0].components; - } - - for (var editLength = 1; editLength <= maxEditLength; editLength++) { - for (var diagonalPath = -1*editLength; diagonalPath <= editLength; diagonalPath+=2) { - var basePath; - var addPath = bestPath[diagonalPath-1], - removePath = bestPath[diagonalPath+1]; - oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; - if (addPath) { - // No one else is going to attempt to use this value, clear it - bestPath[diagonalPath-1] = undefined; - } - - var canAdd = addPath && addPath.newPos+1 < newLen; - var canRemove = removePath && 0 <= oldPos && oldPos < oldLen; - if (!canAdd && !canRemove) { - bestPath[diagonalPath] = undefined; - continue; - } - - // Select the diagonal that we want to branch from. We select the prior - // path whose position in the new string is the farthest from the origin - // and does not pass the bounds of the diff graph - if (!canAdd || (canRemove && addPath.newPos < removePath.newPos)) { - basePath = clonePath(removePath); - this.pushComponent(basePath.components, oldString[oldPos], undefined, true); - } else { - basePath = clonePath(addPath); - basePath.newPos++; - this.pushComponent(basePath.components, newString[basePath.newPos], true, undefined); - } - - var oldPos = this.extractCommon(basePath, newString, oldString, diagonalPath); - - if (basePath.newPos+1 >= newLen && oldPos+1 >= oldLen) { - return basePath.components; - } else { - bestPath[diagonalPath] = basePath; - } - } - } - }, - - pushComponent: function(components, value, added, removed) { - var last = components[components.length-1]; - if (last && last.added === added && last.removed === removed) { - // We need to clone here as the component clone operation is just - // as shallow array clone - components[components.length-1] = - {value: this.join(last.value, value), added: added, removed: removed }; - } else { - components.push({value: value, added: added, removed: removed }); - } - }, - extractCommon: function(basePath, newString, oldString, diagonalPath) { - var newLen = newString.length, - oldLen = oldString.length, - newPos = basePath.newPos, - oldPos = newPos - diagonalPath; - while (newPos+1 < newLen && oldPos+1 < oldLen && this.equals(newString[newPos+1], oldString[oldPos+1])) { - newPos++; - oldPos++; - - this.pushComponent(basePath.components, newString[newPos], undefined, undefined); - } - basePath.newPos = newPos; - return oldPos; - }, - - equals: function(left, right) { - var reWhitespace = /\S/; - if (this.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right)) { - return true; - } else { - return left === right; - } - }, - join: function(left, right) { - return left + right; - }, - tokenize: function(value) { - return value; - } - }; - - var CharDiff = new Diff(); - - var WordDiff = new Diff(true); - var WordWithSpaceDiff = new Diff(); - WordDiff.tokenize = WordWithSpaceDiff.tokenize = function(value) { - return removeEmpty(value.split(/(\s+|\b)/)); - }; - - var CssDiff = new Diff(true); - CssDiff.tokenize = function(value) { - return removeEmpty(value.split(/([{}:;,]|\s+)/)); - }; - - var LineDiff = new Diff(); - LineDiff.tokenize = function(value) { - return value.split(/^/m); - }; - - return { - Diff: Diff, - - diffChars: function(oldStr, newStr) { return CharDiff.diff(oldStr, newStr); }, - diffWords: function(oldStr, newStr) { return WordDiff.diff(oldStr, newStr); }, - diffWordsWithSpace: function(oldStr, newStr) { return WordWithSpaceDiff.diff(oldStr, newStr); }, - diffLines: function(oldStr, newStr) { return LineDiff.diff(oldStr, newStr); }, - - diffCss: function(oldStr, newStr) { return CssDiff.diff(oldStr, newStr); }, - - createPatch: function(fileName, oldStr, newStr, oldHeader, newHeader) { - var ret = []; - - ret.push('Index: ' + fileName); - ret.push('==================================================================='); - ret.push('--- ' + fileName + (typeof oldHeader === 'undefined' ? '' : '\t' + oldHeader)); - ret.push('+++ ' + fileName + (typeof newHeader === 'undefined' ? '' : '\t' + newHeader)); - - var diff = LineDiff.diff(oldStr, newStr); - if (!diff[diff.length-1].value) { - diff.pop(); // Remove trailing newline add - } - diff.push({value: '', lines: []}); // Append an empty value to make cleanup easier - - function contextLines(lines) { - return lines.map(function(entry) { return ' ' + entry; }); - } - function eofNL(curRange, i, current) { - var last = diff[diff.length-2], - isLast = i === diff.length-2, - isLastOfType = i === diff.length-3 && (current.added !== last.added || current.removed !== last.removed); - - // Figure out if this is the last line for the given file and missing NL - if (!/\n$/.test(current.value) && (isLast || isLastOfType)) { - curRange.push('\\ No newline at end of file'); - } - } - - var oldRangeStart = 0, newRangeStart = 0, curRange = [], - oldLine = 1, newLine = 1; - for (var i = 0; i < diff.length; i++) { - var current = diff[i], - lines = current.lines || current.value.replace(/\n$/, '').split('\n'); - current.lines = lines; - - if (current.added || current.removed) { - if (!oldRangeStart) { - var prev = diff[i-1]; - oldRangeStart = oldLine; - newRangeStart = newLine; - - if (prev) { - curRange = contextLines(prev.lines.slice(-4)); - oldRangeStart -= curRange.length; - newRangeStart -= curRange.length; - } - } - curRange.push.apply(curRange, lines.map(function(entry) { return (current.added?'+':'-') + entry; })); - eofNL(curRange, i, current); - - if (current.added) { - newLine += lines.length; - } else { - oldLine += lines.length; - } - } else { - if (oldRangeStart) { - // Close out any changes that have been output (or join overlapping) - if (lines.length <= 8 && i < diff.length-2) { - // Overlapping - curRange.push.apply(curRange, contextLines(lines)); - } else { - // end the range and output - var contextSize = Math.min(lines.length, 4); - ret.push( - '@@ -' + oldRangeStart + ',' + (oldLine-oldRangeStart+contextSize) - + ' +' + newRangeStart + ',' + (newLine-newRangeStart+contextSize) - + ' @@'); - ret.push.apply(ret, curRange); - ret.push.apply(ret, contextLines(lines.slice(0, contextSize))); - if (lines.length <= 4) { - eofNL(ret, i, current); - } - - oldRangeStart = 0; newRangeStart = 0; curRange = []; - } - } - oldLine += lines.length; - newLine += lines.length; - } - } - - return ret.join('\n') + '\n'; - }, - - applyPatch: function(oldStr, uniDiff) { - var diffstr = uniDiff.split('\n'); - var diff = []; - var remEOFNL = false, - addEOFNL = false; - - for (var i = (diffstr[0][0]==='I'?4:0); i < diffstr.length; i++) { - if(diffstr[i][0] === '@') { - var meh = diffstr[i].split(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/); - diff.unshift({ - start:meh[3], - oldlength:meh[2], - oldlines:[], - newlength:meh[4], - newlines:[] - }); - } else if(diffstr[i][0] === '+') { - diff[0].newlines.push(diffstr[i].substr(1)); - } else if(diffstr[i][0] === '-') { - diff[0].oldlines.push(diffstr[i].substr(1)); - } else if(diffstr[i][0] === ' ') { - diff[0].newlines.push(diffstr[i].substr(1)); - diff[0].oldlines.push(diffstr[i].substr(1)); - } else if(diffstr[i][0] === '\\') { - if (diffstr[i-1][0] === '+') { - remEOFNL = true; - } else if(diffstr[i-1][0] === '-') { - addEOFNL = true; - } - } - } - - var str = oldStr.split('\n'); - for (var i = diff.length - 1; i >= 0; i--) { - var d = diff[i]; - for (var j = 0; j < d.oldlength; j++) { - if(str[d.start-1+j] !== d.oldlines[j]) { - return false; - } - } - Array.prototype.splice.apply(str,[d.start-1,+d.oldlength].concat(d.newlines)); - } - - if (remEOFNL) { - while (!str[str.length-1]) { - str.pop(); - } - } else if (addEOFNL) { - str.push(''); - } - return str.join('\n'); - }, - - convertChangesToXML: function(changes){ - var ret = []; - for ( var i = 0; i < changes.length; i++) { - var change = changes[i]; - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - - ret.push(escapeHTML(change.value)); - - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - } - return ret.join(''); - }, - - // See: http://code.google.com/p/google-diff-match-patch/wiki/API - convertChangesToDMP: function(changes){ - var ret = [], change; - for ( var i = 0; i < changes.length; i++) { - change = changes[i]; - ret.push([(change.added ? 1 : change.removed ? -1 : 0), change.value]); - } - return ret; - } - }; -})(); - -if (typeof module !== 'undefined') { - module.exports = JsDiff; -} diff --git a/node_modules/mocha/node_modules/diff/package.json b/node_modules/mocha/node_modules/diff/package.json deleted file mode 100644 index 867fd0ce..00000000 --- a/node_modules/mocha/node_modules/diff/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "diff", - "version": "1.0.7", - "description": "A javascript text diff implementation.", - "keywords": [ - "diff", - "javascript" - ], - "maintainers": [ - { - "name": "Kevin Decker", - "email": "kpdecker@gmail.com", - "url": "http://incaseofstairs.com" - } - ], - "bugs": { - "url": "http://github.com/kpdecker/jsdiff/issues", - "email": "kpdecker@gmail.com" - }, - "licenses": [ - { - "type": "BSD", - "url": "http://github.com/kpdecker/jsdiff/blob/master/LICENSE" - } - ], - "repository": { - "type": "git", - "url": "git://github.com/kpdecker/jsdiff.git" - }, - "engines": { - "node": ">=0.3.1" - }, - "main": "./diff", - "scripts": { - "test": "mocha test/*.js" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "~1.6", - "should": "~1.2" - }, - "optionalDependencies": {}, - "files": [ - "diff.js" - ], - "readme": "# jsdiff\n\n[![Build Status](https://secure.travis-ci.org/kpdecker/jsdiff.png)](http://travis-ci.org/kpdecker/jsdiff)\n\nA javascript text differencing implementation.\n\nBased on the algorithm proposed in\n[\"An O(ND) Difference Algorithm and its Variations\" (Myers, 1986)](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927).\n\n## Installation\n\n npm install diff\n\nor\n\n git clone git://github.com/kpdecker/jsdiff.git\n\n## API\n\n* JsDiff.diffChars(oldStr, newStr)\n Diffs two blocks of text, comparing character by character.\n\n Returns a list of change objects (See below).\n\n* JsDiff.diffWords(oldStr, newStr)\n Diffs two blocks of text, comparing word by word.\n\n Returns a list of change objects (See below).\n\n* JsDiff.diffLines(oldStr, newStr)\n Diffs two blocks of text, comparing line by line.\n\n Returns a list of change objects (See below).\n\n* JsDiff.diffCss(oldStr, newStr)\n Diffs two blocks of text, comparing CSS tokens.\n\n Returns a list of change objects (See below).\n\n* JsDiff.createPatch(fileName, oldStr, newStr, oldHeader, newHeader)\n Creates a unified diff patch.\n\n Parameters:\n * fileName : String to be output in the filename sections of the patch\n * oldStr : Original string value\n * newStr : New string value\n * oldHeader : Additional information to include in the old file header\n * newHeader : Additional information to include in thew new file header\n\n* JsDiff.applyPatch(oldStr, diffStr)\n Applies a unified diff patch.\n\n Return a string containing new version of provided data.\n\n* convertChangesToXML(changes)\n Converts a list of changes to a serialized XML format\n\n### Change Objects\nMany of the methods above return change objects. These objects are consist of the following fields:\n\n* value: Text content\n* added: True if the value was inserted into the new string\n* removed: True of the value was removed from the old string\n\nNote that some cases may omit a particular flag field. Comparison on the flag fields should always be done in a truthy or falsy manner.\n\n## [Example](http://kpdecker.github.com/jsdiff)\n\n## License\n\nSoftware License Agreement (BSD License)\n\nCopyright (c) 2009-2011, Kevin Decker kpdecker@gmail.com\n\nAll rights reserved.\n\nRedistribution and use of this software in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above\n copyright notice, this list of conditions and the\n following disclaimer.\n\n* Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the\n following disclaimer in the documentation and/or other\n materials provided with the distribution.\n\n* Neither the name of Kevin Decker nor the names of its\n contributors may be used to endorse or promote products\n derived from this software without specific prior\n written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\nIMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\nFITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\nCONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\nIN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\nOF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/kpdecker/jsdiff", - "_id": "diff@1.0.7", - "_from": "diff@1.0.7" -} diff --git a/node_modules/mocha/node_modules/glob/.npmignore b/node_modules/mocha/node_modules/glob/.npmignore deleted file mode 100644 index 2af4b71c..00000000 --- a/node_modules/mocha/node_modules/glob/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -.*.swp -test/a/ diff --git a/node_modules/mocha/node_modules/glob/.travis.yml b/node_modules/mocha/node_modules/glob/.travis.yml deleted file mode 100644 index baa0031d..00000000 --- a/node_modules/mocha/node_modules/glob/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - 0.8 diff --git a/node_modules/mocha/node_modules/glob/LICENSE b/node_modules/mocha/node_modules/glob/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/mocha/node_modules/glob/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/mocha/node_modules/glob/README.md b/node_modules/mocha/node_modules/glob/README.md deleted file mode 100644 index cc691645..00000000 --- a/node_modules/mocha/node_modules/glob/README.md +++ /dev/null @@ -1,250 +0,0 @@ -# Glob - -Match files using the patterns the shell uses, like stars and stuff. - -This is a glob implementation in JavaScript. It uses the `minimatch` -library to do its matching. - -## Attention: node-glob users! - -The API has changed dramatically between 2.x and 3.x. This library is -now 100% JavaScript, and the integer flags have been replaced with an -options object. - -Also, there's an event emitter class, proper tests, and all the other -things you've come to expect from node modules. - -And best of all, no compilation! - -## Usage - -```javascript -var glob = require("glob") - -// options is optional -glob("**/*.js", options, function (er, files) { - // files is an array of filenames. - // If the `nonull` option is set, and nothing - // was found, then files is ["**/*.js"] - // er is an error object or null. -}) -``` - -## Features - -Please see the [minimatch -documentation](https://github.com/isaacs/minimatch) for more details. - -Supports these glob features: - -* Brace Expansion -* Extended glob matching -* "Globstar" `**` matching - -See: - -* `man sh` -* `man bash` -* `man 3 fnmatch` -* `man 5 gitignore` -* [minimatch documentation](https://github.com/isaacs/minimatch) - -## glob(pattern, [options], cb) - -* `pattern` {String} Pattern to be matched -* `options` {Object} -* `cb` {Function} - * `err` {Error | null} - * `matches` {Array} filenames found matching the pattern - -Perform an asynchronous glob search. - -## glob.sync(pattern, [options]) - -* `pattern` {String} Pattern to be matched -* `options` {Object} -* return: {Array} filenames found matching the pattern - -Perform a synchronous glob search. - -## Class: glob.Glob - -Create a Glob object by instanting the `glob.Glob` class. - -```javascript -var Glob = require("glob").Glob -var mg = new Glob(pattern, options, cb) -``` - -It's an EventEmitter, and starts walking the filesystem to find matches -immediately. - -### new glob.Glob(pattern, [options], [cb]) - -* `pattern` {String} pattern to search for -* `options` {Object} -* `cb` {Function} Called when an error occurs, or matches are found - * `err` {Error | null} - * `matches` {Array} filenames found matching the pattern - -Note that if the `sync` flag is set in the options, then matches will -be immediately available on the `g.found` member. - -### Properties - -* `minimatch` The minimatch object that the glob uses. -* `options` The options object passed in. -* `error` The error encountered. When an error is encountered, the - glob object is in an undefined state, and should be discarded. -* `aborted` Boolean which is set to true when calling `abort()`. There - is no way at this time to continue a glob search after aborting, but - you can re-use the statCache to avoid having to duplicate syscalls. -* `statCache` Collection of all the stat results the glob search - performed. -* `cache` Convenience object. Each field has the following possible - values: - * `false` - Path does not exist - * `true` - Path exists - * `1` - Path exists, and is not a directory - * `2` - Path exists, and is a directory - * `[file, entries, ...]` - Path exists, is a directory, and the - array value is the results of `fs.readdir` - -### Events - -* `end` When the matching is finished, this is emitted with all the - matches found. If the `nonull` option is set, and no match was found, - then the `matches` list contains the original pattern. The matches - are sorted, unless the `nosort` flag is set. -* `match` Every time a match is found, this is emitted with the matched. -* `error` Emitted when an unexpected error is encountered, or whenever - any fs error occurs if `options.strict` is set. -* `abort` When `abort()` is called, this event is raised. - -### Methods - -* `abort` Stop the search. - -### Options - -All the options that can be passed to Minimatch can also be passed to -Glob to change pattern matching behavior. Also, some have been added, -or have glob-specific ramifications. - -All options are false by default, unless otherwise noted. - -All options are added to the glob object, as well. - -* `cwd` The current working directory in which to search. Defaults - to `process.cwd()`. -* `root` The place where patterns starting with `/` will be mounted - onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix - systems, and `C:\` or some such on Windows.) -* `dot` Include `.dot` files in normal matches and `globstar` matches. - Note that an explicit dot in a portion of the pattern will always - match dot files. -* `nomount` By default, a pattern starting with a forward-slash will be - "mounted" onto the root setting, so that a valid filesystem path is - returned. Set this flag to disable that behavior. -* `mark` Add a `/` character to directory matches. Note that this - requires additional stat calls. -* `nosort` Don't sort the results. -* `stat` Set to true to stat *all* results. This reduces performance - somewhat, and is completely unnecessary, unless `readdir` is presumed - to be an untrustworthy indicator of file existence. It will cause - ELOOP to be triggered one level sooner in the case of cyclical - symbolic links. -* `silent` When an unusual error is encountered - when attempting to read a directory, a warning will be printed to - stderr. Set the `silent` option to true to suppress these warnings. -* `strict` When an unusual error is encountered - when attempting to read a directory, the process will just continue on - in search of other matches. Set the `strict` option to raise an error - in these cases. -* `cache` See `cache` property above. Pass in a previously generated - cache object to save some fs calls. -* `statCache` A cache of results of filesystem information, to prevent - unnecessary stat calls. While it should not normally be necessary to - set this, you may pass the statCache from one glob() call to the - options object of another, if you know that the filesystem will not - change between calls. (See "Race Conditions" below.) -* `sync` Perform a synchronous glob search. -* `nounique` In some cases, brace-expanded patterns can result in the - same file showing up multiple times in the result set. By default, - this implementation prevents duplicates in the result set. - Set this flag to disable that behavior. -* `nonull` Set to never return an empty set, instead returning a set - containing the pattern itself. This is the default in glob(3). -* `nocase` Perform a case-insensitive match. Note that case-insensitive - filesystems will sometimes result in glob returning results that are - case-insensitively matched anyway, since readdir and stat will not - raise an error. -* `debug` Set to enable debug logging in minimatch and glob. -* `globDebug` Set to enable debug logging in glob, but not minimatch. - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between node-glob and other -implementations, and are intentional. - -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.1, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then glob returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. - -## Windows - -**Please only use forward-slashes in glob expressions.** - -Though windows uses either `/` or `\` as its path separator, only `/` -characters are used by this glob implementation. You must use -forward-slashes **only** in glob expressions. Back-slashes will always -be interpreted as escape characters, not path separators. - -Results from absolute patterns such as `/foo/*` are mounted onto the -root setting using `path.join`. On windows, this will by default result -in `/foo/*` matching `C:\foo\bar.txt`. - -## Race Conditions - -Glob searching, by its very nature, is susceptible to race conditions, -since it relies on directory walking and such. - -As a result, it is possible that a file that exists when glob looks for -it may have been deleted or modified by the time it returns the result. - -As part of its internal implementation, this program caches all stat -and readdir calls that it makes, in order to cut down on system -overhead. However, this also makes it even more susceptible to races, -especially if the cache or statCache objects are reused between glob -calls. - -Users are thus advised not to use a glob result as a guarantee of -filesystem state in the face of rapid changes. For the vast majority -of operations, this is never a problem. diff --git a/node_modules/mocha/node_modules/glob/examples/g.js b/node_modules/mocha/node_modules/glob/examples/g.js deleted file mode 100644 index be122df0..00000000 --- a/node_modules/mocha/node_modules/glob/examples/g.js +++ /dev/null @@ -1,9 +0,0 @@ -var Glob = require("../").Glob - -var pattern = "test/a/**/[cg]/../[cg]" -console.log(pattern) - -var mg = new Glob(pattern, {mark: true, sync:true}, function (er, matches) { - console.log("matches", matches) -}) -console.log("after") diff --git a/node_modules/mocha/node_modules/glob/examples/usr-local.js b/node_modules/mocha/node_modules/glob/examples/usr-local.js deleted file mode 100644 index 327a425e..00000000 --- a/node_modules/mocha/node_modules/glob/examples/usr-local.js +++ /dev/null @@ -1,9 +0,0 @@ -var Glob = require("../").Glob - -var pattern = "{./*/*,/*,/usr/local/*}" -console.log(pattern) - -var mg = new Glob(pattern, {mark: true}, function (er, matches) { - console.log("matches", matches) -}) -console.log("after") diff --git a/node_modules/mocha/node_modules/glob/glob.js b/node_modules/mocha/node_modules/glob/glob.js deleted file mode 100644 index f0118a4f..00000000 --- a/node_modules/mocha/node_modules/glob/glob.js +++ /dev/null @@ -1,675 +0,0 @@ -// Approach: -// -// 1. Get the minimatch set -// 2. For each pattern in the set, PROCESS(pattern) -// 3. Store matches per-set, then uniq them -// -// PROCESS(pattern) -// Get the first [n] items from pattern that are all strings -// Join these together. This is PREFIX. -// If there is no more remaining, then stat(PREFIX) and -// add to matches if it succeeds. END. -// readdir(PREFIX) as ENTRIES -// If fails, END -// If pattern[n] is GLOBSTAR -// // handle the case where the globstar match is empty -// // by pruning it out, and testing the resulting pattern -// PROCESS(pattern[0..n] + pattern[n+1 .. $]) -// // handle other cases. -// for ENTRY in ENTRIES (not dotfiles) -// // attach globstar + tail onto the entry -// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $]) -// -// else // not globstar -// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) -// Test ENTRY against pattern[n] -// If fails, continue -// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) -// -// Caveat: -// Cache all stats and readdirs results to minimize syscall. Since all -// we ever care about is existence and directory-ness, we can just keep -// `true` for files, and [children,...] for directories, or `false` for -// things that don't exist. - - - -module.exports = glob - -var fs = require("graceful-fs") -, minimatch = require("minimatch") -, Minimatch = minimatch.Minimatch -, inherits = require("inherits") -, EE = require("events").EventEmitter -, path = require("path") -, isDir = {} -, assert = require("assert").ok - -function glob (pattern, options, cb) { - if (typeof options === "function") cb = options, options = {} - if (!options) options = {} - - if (typeof options === "number") { - deprecated() - return - } - - var g = new Glob(pattern, options, cb) - return g.sync ? g.found : g -} - -glob.fnmatch = deprecated - -function deprecated () { - throw new Error("glob's interface has changed. Please see the docs.") -} - -glob.sync = globSync -function globSync (pattern, options) { - if (typeof options === "number") { - deprecated() - return - } - - options = options || {} - options.sync = true - return glob(pattern, options) -} - - -glob.Glob = Glob -inherits(Glob, EE) -function Glob (pattern, options, cb) { - if (!(this instanceof Glob)) { - return new Glob(pattern, options, cb) - } - - if (typeof cb === "function") { - this.on("error", cb) - this.on("end", function (matches) { - cb(null, matches) - }) - } - - options = options || {} - - this.EOF = {} - this._emitQueue = [] - - this.maxDepth = options.maxDepth || 1000 - this.maxLength = options.maxLength || Infinity - this.cache = options.cache || {} - this.statCache = options.statCache || {} - - this.changedCwd = false - var cwd = process.cwd() - if (!options.hasOwnProperty("cwd")) this.cwd = cwd - else { - this.cwd = options.cwd - this.changedCwd = path.resolve(options.cwd) !== cwd - } - - this.root = options.root || path.resolve(this.cwd, "/") - this.root = path.resolve(this.root) - if (process.platform === "win32") - this.root = this.root.replace(/\\/g, "/") - - this.nomount = !!options.nomount - - if (!pattern) { - throw new Error("must provide pattern") - } - - // base-matching: just use globstar for that. - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar") - } - pattern = "**/" + pattern - } - - this.strict = options.strict !== false - this.dot = !!options.dot - this.mark = !!options.mark - this.sync = !!options.sync - this.nounique = !!options.nounique - this.nonull = !!options.nonull - this.nosort = !!options.nosort - this.nocase = !!options.nocase - this.stat = !!options.stat - - this.debug = !!options.debug || !!options.globDebug - if (this.debug) - this.log = console.error - - this.silent = !!options.silent - - var mm = this.minimatch = new Minimatch(pattern, options) - this.options = mm.options - pattern = this.pattern = mm.pattern - - this.error = null - this.aborted = false - - // list of all the patterns that ** has resolved do, so - // we can avoid visiting multiple times. - this._globstars = {} - - EE.call(this) - - // process each pattern in the minimatch set - var n = this.minimatch.set.length - - // The matches are stored as {: true,...} so that - // duplicates are automagically pruned. - // Later, we do an Object.keys() on these. - // Keep them as a list so we can fill in when nonull is set. - this.matches = new Array(n) - - this.minimatch.set.forEach(iterator.bind(this)) - function iterator (pattern, i, set) { - this._process(pattern, 0, i, function (er) { - if (er) this.emit("error", er) - if (-- n <= 0) this._finish() - }) - } -} - -Glob.prototype.log = function () {} - -Glob.prototype._finish = function () { - assert(this instanceof Glob) - - var nou = this.nounique - , all = nou ? [] : {} - - for (var i = 0, l = this.matches.length; i < l; i ++) { - var matches = this.matches[i] - this.log("matches[%d] =", i, matches) - // do like the shell, and spit out the literal glob - if (!matches) { - if (this.nonull) { - var literal = this.minimatch.globSet[i] - if (nou) all.push(literal) - else all[literal] = true - } - } else { - // had matches - var m = Object.keys(matches) - if (nou) all.push.apply(all, m) - else m.forEach(function (m) { - all[m] = true - }) - } - } - - if (!nou) all = Object.keys(all) - - if (!this.nosort) { - all = all.sort(this.nocase ? alphasorti : alphasort) - } - - if (this.mark) { - // at *some* point we statted all of these - all = all.map(function (m) { - var sc = this.cache[m] - if (!sc) - return m - var isDir = (Array.isArray(sc) || sc === 2) - if (isDir && m.slice(-1) !== "/") { - return m + "/" - } - if (!isDir && m.slice(-1) === "/") { - return m.replace(/\/+$/, "") - } - return m - }, this) - } - - this.log("emitting end", all) - - this.EOF = this.found = all - this.emitMatch(this.EOF) -} - -function alphasorti (a, b) { - a = a.toLowerCase() - b = b.toLowerCase() - return alphasort(a, b) -} - -function alphasort (a, b) { - return a > b ? 1 : a < b ? -1 : 0 -} - -Glob.prototype.abort = function () { - this.aborted = true - this.emit("abort") -} - -Glob.prototype.pause = function () { - if (this.paused) return - if (this.sync) - this.emit("error", new Error("Can't pause/resume sync glob")) - this.paused = true - this.emit("pause") -} - -Glob.prototype.resume = function () { - if (!this.paused) return - if (this.sync) - this.emit("error", new Error("Can't pause/resume sync glob")) - this.paused = false - this.emit("resume") - this._processEmitQueue() - //process.nextTick(this.emit.bind(this, "resume")) -} - -Glob.prototype.emitMatch = function (m) { - if (!this.stat || this.statCache[m] || m === this.EOF) { - this._emitQueue.push(m) - this._processEmitQueue() - } else { - this._stat(m, function(exists, isDir) { - if (exists) { - this._emitQueue.push(m) - this._processEmitQueue() - } - }) - } -} - -Glob.prototype._processEmitQueue = function (m) { - while (!this._processingEmitQueue && - !this.paused) { - this._processingEmitQueue = true - var m = this._emitQueue.shift() - if (!m) { - this._processingEmitQueue = false - break - } - - this.log('emit!', m === this.EOF ? "end" : "match") - - this.emit(m === this.EOF ? "end" : "match", m) - this._processingEmitQueue = false - } -} - -Glob.prototype._process = function (pattern, depth, index, cb_) { - assert(this instanceof Glob) - - var cb = function cb (er, res) { - assert(this instanceof Glob) - if (this.paused) { - if (!this._processQueue) { - this._processQueue = [] - this.once("resume", function () { - var q = this._processQueue - this._processQueue = null - q.forEach(function (cb) { cb() }) - }) - } - this._processQueue.push(cb_.bind(this, er, res)) - } else { - cb_.call(this, er, res) - } - }.bind(this) - - if (this.aborted) return cb() - - if (depth > this.maxDepth) return cb() - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === "string") { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // see if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - prefix = pattern.join("/") - this._stat(prefix, function (exists, isDir) { - // either it's there, or it isn't. - // nothing more to do, either way. - if (exists) { - if (prefix && isAbsolute(prefix) && !this.nomount) { - if (prefix.charAt(0) === "/") { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - } - } - - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/") - - this.matches[index] = this.matches[index] || {} - this.matches[index][prefix] = true - this.emitMatch(prefix) - } - return cb() - }) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's "absolute" like /foo/bar, - // or "relative" like "../baz" - prefix = pattern.slice(0, n) - prefix = prefix.join("/") - break - } - - // get the list of entries. - var read - if (prefix === null) read = "." - else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) { - if (!prefix || !isAbsolute(prefix)) { - prefix = path.join("/", prefix) - } - read = prefix = path.resolve(prefix) - - // if (process.platform === "win32") - // read = prefix = prefix.replace(/^[a-zA-Z]:|\\/g, "/") - - this.log('absolute: ', prefix, this.root, pattern, read) - } else { - read = prefix - } - - this.log('readdir(%j)', read, this.cwd, this.root) - - return this._readdir(read, function (er, entries) { - if (er) { - // not a directory! - // this means that, whatever else comes after this, it can never match - return cb() - } - - // globstar is special - if (pattern[n] === minimatch.GLOBSTAR) { - // test without the globstar, and with every child both below - // and replacing the globstar. - var s = [ pattern.slice(0, n).concat(pattern.slice(n + 1)) ] - entries.forEach(function (e) { - if (e.charAt(0) === "." && !this.dot) return - // instead of the globstar - s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1))) - // below the globstar - s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n))) - }, this) - - s = s.filter(function (pattern) { - var key = gsKey(pattern) - var seen = !this._globstars[key] - this._globstars[key] = true - return seen - }, this) - - if (!s.length) - return cb() - - // now asyncForEach over this - var l = s.length - , errState = null - s.forEach(function (gsPattern) { - this._process(gsPattern, depth + 1, index, function (er) { - if (errState) return - if (er) return cb(errState = er) - if (--l <= 0) return cb() - }) - }, this) - - return - } - - // not a globstar - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = pattern[n] - var rawGlob = pattern[n]._glob - , dotOk = this.dot || rawGlob.charAt(0) === "." - - entries = entries.filter(function (e) { - return (e.charAt(0) !== "." || dotOk) && - e.match(pattern[n]) - }) - - // If n === pattern.length - 1, then there's no need for the extra stat - // *unless* the user has specified "mark" or "stat" explicitly. - // We know that they exist, since the readdir returned them. - if (n === pattern.length - 1 && - !this.mark && - !this.stat) { - entries.forEach(function (e) { - if (prefix) { - if (prefix !== "/") e = prefix + "/" + e - else e = prefix + e - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path.join(this.root, e) - } - - if (process.platform === "win32") - e = e.replace(/\\/g, "/") - - this.matches[index] = this.matches[index] || {} - this.matches[index][e] = true - this.emitMatch(e) - }, this) - return cb.call(this) - } - - - // now test all the remaining entries as stand-ins for that part - // of the pattern. - var l = entries.length - , errState = null - if (l === 0) return cb() // no matches possible - entries.forEach(function (e) { - var p = pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1)) - this._process(p, depth + 1, index, function (er) { - if (errState) return - if (er) return cb(errState = er) - if (--l === 0) return cb.call(this) - }) - }, this) - }) - -} - -function gsKey (pattern) { - return '**' + pattern.map(function (p) { - return (p === minimatch.GLOBSTAR) ? '**' : (''+p) - }).join('/') -} - -Glob.prototype._stat = function (f, cb) { - assert(this instanceof Glob) - var abs = f - if (f.charAt(0) === "/") { - abs = path.join(this.root, f) - } else if (this.changedCwd) { - abs = path.resolve(this.cwd, f) - } - - if (f.length > this.maxLength) { - var er = new Error("Path name too long") - er.code = "ENAMETOOLONG" - er.path = f - return this._afterStat(f, abs, cb, er) - } - - this.log('stat', [this.cwd, f, '=', abs]) - - if (!this.stat && this.cache.hasOwnProperty(f)) { - var exists = this.cache[f] - , isDir = exists && (Array.isArray(exists) || exists === 2) - if (this.sync) return cb.call(this, !!exists, isDir) - return process.nextTick(cb.bind(this, !!exists, isDir)) - } - - var stat = this.statCache[abs] - if (this.sync || stat) { - var er - try { - stat = fs.statSync(abs) - } catch (e) { - er = e - } - this._afterStat(f, abs, cb, er, stat) - } else { - fs.stat(abs, this._afterStat.bind(this, f, abs, cb)) - } -} - -Glob.prototype._afterStat = function (f, abs, cb, er, stat) { - var exists - assert(this instanceof Glob) - - if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) { - this.log("should be ENOTDIR, fake it") - - er = new Error("ENOTDIR, not a directory '" + abs + "'") - er.path = abs - er.code = "ENOTDIR" - stat = null - } - - var emit = !this.statCache[abs] - this.statCache[abs] = stat - - if (er || !stat) { - exists = false - } else { - exists = stat.isDirectory() ? 2 : 1 - if (emit) - this.emit('stat', f, stat) - } - this.cache[f] = this.cache[f] || exists - cb.call(this, !!exists, exists === 2) -} - -Glob.prototype._readdir = function (f, cb) { - assert(this instanceof Glob) - var abs = f - if (f.charAt(0) === "/") { - abs = path.join(this.root, f) - } else if (isAbsolute(f)) { - abs = f - } else if (this.changedCwd) { - abs = path.resolve(this.cwd, f) - } - - if (f.length > this.maxLength) { - var er = new Error("Path name too long") - er.code = "ENAMETOOLONG" - er.path = f - return this._afterReaddir(f, abs, cb, er) - } - - this.log('readdir', [this.cwd, f, abs]) - if (this.cache.hasOwnProperty(f)) { - var c = this.cache[f] - if (Array.isArray(c)) { - if (this.sync) return cb.call(this, null, c) - return process.nextTick(cb.bind(this, null, c)) - } - - if (!c || c === 1) { - // either ENOENT or ENOTDIR - var code = c ? "ENOTDIR" : "ENOENT" - , er = new Error((c ? "Not a directory" : "Not found") + ": " + f) - er.path = f - er.code = code - this.log(f, er) - if (this.sync) return cb.call(this, er) - return process.nextTick(cb.bind(this, er)) - } - - // at this point, c === 2, meaning it's a dir, but we haven't - // had to read it yet, or c === true, meaning it's *something* - // but we don't have any idea what. Need to read it, either way. - } - - if (this.sync) { - var er, entries - try { - entries = fs.readdirSync(abs) - } catch (e) { - er = e - } - return this._afterReaddir(f, abs, cb, er, entries) - } - - fs.readdir(abs, this._afterReaddir.bind(this, f, abs, cb)) -} - -Glob.prototype._afterReaddir = function (f, abs, cb, er, entries) { - assert(this instanceof Glob) - if (entries && !er) { - this.cache[f] = entries - // if we haven't asked to stat everything for suresies, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. This also gets us one step - // further into ELOOP territory. - if (!this.mark && !this.stat) { - entries.forEach(function (e) { - if (f === "/") e = f + e - else e = f + "/" + e - this.cache[e] = true - }, this) - } - - return cb.call(this, er, entries) - } - - // now handle errors, and cache the information - if (er) switch (er.code) { - case "ENOTDIR": // totally normal. means it *does* exist. - this.cache[f] = 1 - return cb.call(this, er) - case "ENOENT": // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[f] = false - return cb.call(this, er) - default: // some unusual error. Treat as failure. - this.cache[f] = false - if (this.strict) this.emit("error", er) - if (!this.silent) console.error("glob error", er) - return cb.call(this, er) - } -} - -var isAbsolute = process.platform === "win32" ? absWin : absUnix - -function absWin (p) { - if (absUnix(p)) return true - // pull off the device/UNC bit from a windows path. - // from node's lib/path.js - var splitDeviceRe = - /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/ - , result = splitDeviceRe.exec(p) - , device = result[1] || '' - , isUnc = device && device.charAt(1) !== ':' - , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute - - return isAbsolute -} - -function absUnix (p) { - return p.charAt(0) === "/" || p === "" -} diff --git a/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/.npmignore b/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/.npmignore deleted file mode 100644 index c2658d7d..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ diff --git a/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/LICENSE b/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/README.md b/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/README.md deleted file mode 100644 index eb1a1093..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# graceful-fs - -graceful-fs functions as a drop-in replacement for the fs module, -making various improvements. - -The improvements are meant to normalize behavior across different -platforms and environments, and to make filesystem access more -resilient to errors. - -## Improvements over fs module - -graceful-fs: - -* Queues up `open` and `readdir` calls, and retries them once - something closes if there is an EMFILE error from too many file - descriptors. -* fixes `lchmod` for Node versions prior to 0.6.2. -* implements `fs.lutimes` if possible. Otherwise it becomes a noop. -* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or - `lchown` if the user isn't root. -* makes `lchmod` and `lchown` become noops, if not available. -* retries reading a file if `read` results in EAGAIN error. - -On Windows, it retries renaming a file for up to one second if `EACCESS` -or `EPERM` error occurs, likely because antivirus software has locked -the directory. diff --git a/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/graceful-fs.js b/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/graceful-fs.js deleted file mode 100644 index 1865f92c..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/graceful-fs.js +++ /dev/null @@ -1,159 +0,0 @@ -// Monkey-patching the fs module. -// It's ugly, but there is simply no other way to do this. -var fs = module.exports = require('fs') - -var assert = require('assert') - -// fix up some busted stuff, mostly on windows and old nodes -require('./polyfills.js') - -// The EMFILE enqueuing stuff - -var util = require('util') - -function noop () {} - -var debug = noop -var util = require('util') -if (util.debuglog) - debug = util.debuglog('gfs') -else if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) - debug = function() { - var m = util.format.apply(util, arguments) - m = 'GFS: ' + m.split(/\n/).join('\nGFS: ') - console.error(m) - } - -if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) { - process.on('exit', function() { - debug('fds', fds) - debug(queue) - assert.equal(queue.length, 0) - }) -} - - -var originalOpen = fs.open -fs.open = open - -function open(path, flags, mode, cb) { - if (typeof mode === "function") cb = mode, mode = null - if (typeof cb !== "function") cb = noop - new OpenReq(path, flags, mode, cb) -} - -function OpenReq(path, flags, mode, cb) { - this.path = path - this.flags = flags - this.mode = mode - this.cb = cb - Req.call(this) -} - -util.inherits(OpenReq, Req) - -OpenReq.prototype.process = function() { - originalOpen.call(fs, this.path, this.flags, this.mode, this.done) -} - -var fds = {} -OpenReq.prototype.done = function(er, fd) { - debug('open done', er, fd) - if (fd) - fds['fd' + fd] = this.path - Req.prototype.done.call(this, er, fd) -} - - -var originalReaddir = fs.readdir -fs.readdir = readdir - -function readdir(path, cb) { - if (typeof cb !== "function") cb = noop - new ReaddirReq(path, cb) -} - -function ReaddirReq(path, cb) { - this.path = path - this.cb = cb - Req.call(this) -} - -util.inherits(ReaddirReq, Req) - -ReaddirReq.prototype.process = function() { - originalReaddir.call(fs, this.path, this.done) -} - -ReaddirReq.prototype.done = function(er, files) { - Req.prototype.done.call(this, er, files) - onclose() -} - - -var originalClose = fs.close -fs.close = close - -function close (fd, cb) { - debug('close', fd) - if (typeof cb !== "function") cb = noop - delete fds['fd' + fd] - originalClose.call(fs, fd, function(er) { - onclose() - cb(er) - }) -} - - -var originalCloseSync = fs.closeSync -fs.closeSync = closeSync - -function closeSync (fd) { - try { - return originalCloseSync(fd) - } finally { - onclose() - } -} - - -// Req class -function Req () { - // start processing - this.done = this.done.bind(this) - this.failures = 0 - this.process() -} - -Req.prototype.done = function (er, result) { - var tryAgain = false - if (er) { - var code = er.code - var tryAgain = code === "EMFILE" - if (process.platform === "win32") - tryAgain = tryAgain || code === "OK" - } - - if (tryAgain) { - this.failures ++ - enqueue(this) - } else { - var cb = this.cb - cb(er, result) - } -} - -var queue = [] - -function enqueue(req) { - queue.push(req) - debug('enqueue %d %s', queue.length, req.constructor.name, req) -} - -function onclose() { - var req = queue.shift() - if (req) { - debug('process', req.constructor.name, req) - req.process() - } -} diff --git a/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/package.json b/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/package.json deleted file mode 100644 index ea5a208a..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "name": "graceful-fs", - "description": "A drop-in replacement for fs, making various improvements.", - "version": "2.0.1", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-graceful-fs.git" - }, - "main": "graceful-fs.js", - "engines": { - "node": ">=0.4.0" - }, - "directories": { - "test": "test" - }, - "scripts": { - "test": "tap test/*.js" - }, - "keywords": [ - "fs", - "module", - "reading", - "retry", - "retries", - "queue", - "error", - "errors", - "handling", - "EMFILE", - "EAGAIN", - "EINVAL", - "EPERM", - "EACCESS" - ], - "license": "BSD", - "readme": "# graceful-fs\n\ngraceful-fs functions as a drop-in replacement for the fs module,\nmaking various improvements.\n\nThe improvements are meant to normalize behavior across different\nplatforms and environments, and to make filesystem access more\nresilient to errors.\n\n## Improvements over fs module\n\ngraceful-fs:\n\n* Queues up `open` and `readdir` calls, and retries them once\n something closes if there is an EMFILE error from too many file\n descriptors.\n* fixes `lchmod` for Node versions prior to 0.6.2.\n* implements `fs.lutimes` if possible. Otherwise it becomes a noop.\n* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or\n `lchown` if the user isn't root.\n* makes `lchmod` and `lchown` become noops, if not available.\n* retries reading a file if `read` results in EAGAIN error.\n\nOn Windows, it retries renaming a file for up to one second if `EACCESS`\nor `EPERM` error occurs, likely because antivirus software has locked\nthe directory.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/node-graceful-fs/issues" - }, - "homepage": "https://github.com/isaacs/node-graceful-fs", - "_id": "graceful-fs@2.0.1", - "_from": "graceful-fs@~2.0.0" -} diff --git a/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/polyfills.js b/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/polyfills.js deleted file mode 100644 index afc83b3f..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/polyfills.js +++ /dev/null @@ -1,228 +0,0 @@ -var fs = require('fs') -var constants = require('constants') - -var origCwd = process.cwd -var cwd = null -process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process) - return cwd -} -var chdir = process.chdir -process.chdir = function(d) { - cwd = null - chdir.call(process, d) -} - -// (re-)implement some things that are known busted or missing. - -// lchmod, broken prior to 0.6.2 -// back-port the fix here. -if (constants.hasOwnProperty('O_SYMLINK') && - process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - fs.lchmod = function (path, mode, callback) { - callback = callback || noop - fs.open( path - , constants.O_WRONLY | constants.O_SYMLINK - , mode - , function (err, fd) { - if (err) { - callback(err) - return - } - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - fs.fchmod(fd, mode, function (err) { - fs.close(fd, function(err2) { - callback(err || err2) - }) - }) - }) - } - - fs.lchmodSync = function (path, mode) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) - - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - var err, err2 - try { - var ret = fs.fchmodSync(fd, mode) - } catch (er) { - err = er - } - try { - fs.closeSync(fd) - } catch (er) { - err2 = er - } - if (err || err2) throw (err || err2) - return ret - } -} - - -// lutimes implementation, or no-op -if (!fs.lutimes) { - if (constants.hasOwnProperty("O_SYMLINK")) { - fs.lutimes = function (path, at, mt, cb) { - fs.open(path, constants.O_SYMLINK, function (er, fd) { - cb = cb || noop - if (er) return cb(er) - fs.futimes(fd, at, mt, function (er) { - fs.close(fd, function (er2) { - return cb(er || er2) - }) - }) - }) - } - - fs.lutimesSync = function (path, at, mt) { - var fd = fs.openSync(path, constants.O_SYMLINK) - , err - , err2 - , ret - - try { - var ret = fs.futimesSync(fd, at, mt) - } catch (er) { - err = er - } - try { - fs.closeSync(fd) - } catch (er) { - err2 = er - } - if (err || err2) throw (err || err2) - return ret - } - - } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) { - // maybe utimensat will be bound soonish? - fs.lutimes = function (path, at, mt, cb) { - fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb) - } - - fs.lutimesSync = function (path, at, mt) { - return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW) - } - - } else { - fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) } - fs.lutimesSync = function () {} - } -} - - -// https://github.com/isaacs/node-graceful-fs/issues/4 -// Chown should not fail on einval or eperm if non-root. - -fs.chown = chownFix(fs.chown) -fs.fchown = chownFix(fs.fchown) -fs.lchown = chownFix(fs.lchown) - -fs.chownSync = chownFixSync(fs.chownSync) -fs.fchownSync = chownFixSync(fs.fchownSync) -fs.lchownSync = chownFixSync(fs.lchownSync) - -function chownFix (orig) { - if (!orig) return orig - return function (target, uid, gid, cb) { - return orig.call(fs, target, uid, gid, function (er, res) { - if (chownErOk(er)) er = null - cb(er, res) - }) - } -} - -function chownFixSync (orig) { - if (!orig) return orig - return function (target, uid, gid) { - try { - return orig.call(fs, target, uid, gid) - } catch (er) { - if (!chownErOk(er)) throw er - } - } -} - -function chownErOk (er) { - // if there's no getuid, or if getuid() is something other than 0, - // and the error is EINVAL or EPERM, then just ignore it. - // This specific case is a silent failure in cp, install, tar, - // and most other unix tools that manage permissions. - // When running as root, or if other types of errors are encountered, - // then it's strict. - if (!er || (!process.getuid || process.getuid() !== 0) - && (er.code === "EINVAL" || er.code === "EPERM")) return true -} - - -// if lchmod/lchown do not exist, then make them no-ops -if (!fs.lchmod) { - fs.lchmod = function (path, mode, cb) { - process.nextTick(cb) - } - fs.lchmodSync = function () {} -} -if (!fs.lchown) { - fs.lchown = function (path, uid, gid, cb) { - process.nextTick(cb) - } - fs.lchownSync = function () {} -} - - - -// on Windows, A/V software can lock the directory, causing this -// to fail with an EACCES or EPERM if the directory contains newly -// created files. Try again on failure, for up to 1 second. -if (process.platform === "win32") { - var rename_ = fs.rename - fs.rename = function rename (from, to, cb) { - var start = Date.now() - rename_(from, to, function CB (er) { - if (er - && (er.code === "EACCES" || er.code === "EPERM") - && Date.now() - start < 1000) { - return rename_(from, to, CB) - } - cb(er) - }) - } -} - - -// if read() returns EAGAIN, then just try it again. -var read = fs.read -fs.read = function (fd, buffer, offset, length, position, callback_) { - var callback - if (callback_ && typeof callback_ === 'function') { - var eagCounter = 0 - callback = function (er, _, __) { - if (er && er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - return read.call(fs, fd, buffer, offset, length, position, callback) - } - callback_.apply(this, arguments) - } - } - return read.call(fs, fd, buffer, offset, length, position, callback) -} - -var readSync = fs.readSync -fs.readSync = function (fd, buffer, offset, length, position) { - var eagCounter = 0 - while (true) { - try { - return readSync.call(fs, fd, buffer, offset, length, position) - } catch (er) { - if (er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - continue - } - throw er - } - } -} - diff --git a/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/test/open.js b/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/test/open.js deleted file mode 100644 index 104f36b0..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/test/open.js +++ /dev/null @@ -1,39 +0,0 @@ -var test = require('tap').test -var fs = require('../graceful-fs.js') - -test('graceful fs is monkeypatched fs', function (t) { - t.equal(fs, require('fs')) - t.end() -}) - -test('open an existing file works', function (t) { - var fd = fs.openSync(__filename, 'r') - fs.closeSync(fd) - fs.open(__filename, 'r', function (er, fd) { - if (er) throw er - fs.close(fd, function (er) { - if (er) throw er - t.pass('works') - t.end() - }) - }) -}) - -test('open a non-existing file throws', function (t) { - var er - try { - var fd = fs.openSync('this file does not exist', 'r') - } catch (x) { - er = x - } - t.ok(er, 'should throw') - t.notOk(fd, 'should not get an fd') - t.equal(er.code, 'ENOENT') - - fs.open('neither does this file', 'r', function (er, fd) { - t.ok(er, 'should throw') - t.notOk(fd, 'should not get an fd') - t.equal(er.code, 'ENOENT') - t.end() - }) -}) diff --git a/node_modules/mocha/node_modules/glob/node_modules/inherits/LICENSE b/node_modules/mocha/node_modules/glob/node_modules/inherits/LICENSE deleted file mode 100644 index dea3013d..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/inherits/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - diff --git a/node_modules/mocha/node_modules/glob/node_modules/inherits/README.md b/node_modules/mocha/node_modules/glob/node_modules/inherits/README.md deleted file mode 100644 index b1c56658..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/inherits/README.md +++ /dev/null @@ -1,42 +0,0 @@ -Browser-friendly inheritance fully compatible with standard node.js -[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). - -This package exports standard `inherits` from node.js `util` module in -node environment, but also provides alternative browser-friendly -implementation through [browser -field](https://gist.github.com/shtylman/4339901). Alternative -implementation is a literal copy of standard one located in standalone -module to avoid requiring of `util`. It also has a shim for old -browsers with no `Object.create` support. - -While keeping you sure you are using standard `inherits` -implementation in node.js environment, it allows bundlers such as -[browserify](https://github.com/substack/node-browserify) to not -include full `util` package to your client code if all you need is -just `inherits` function. It worth, because browser shim for `util` -package is large and `inherits` is often the single function you need -from it. - -It's recommended to use this package instead of -`require('util').inherits` for any code that has chances to be used -not only in node.js but in browser too. - -## usage - -```js -var inherits = require('inherits'); -// then use exactly as the standard one -``` - -## note on version ~1.0 - -Version ~1.0 had completely different motivation and is not compatible -neither with 2.0 nor with standard node.js `inherits`. - -If you are using version ~1.0 and planning to switch to ~2.0, be -careful: - -* new version uses `super_` instead of `super` for referencing - superclass -* new version overwrites current prototype while old one preserves any - existing fields on it diff --git a/node_modules/mocha/node_modules/glob/node_modules/inherits/inherits.js b/node_modules/mocha/node_modules/glob/node_modules/inherits/inherits.js deleted file mode 100644 index 29f5e24f..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/inherits/inherits.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('util').inherits diff --git a/node_modules/mocha/node_modules/glob/node_modules/inherits/inherits_browser.js b/node_modules/mocha/node_modules/glob/node_modules/inherits/inherits_browser.js deleted file mode 100644 index c1e78a75..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/inherits/inherits_browser.js +++ /dev/null @@ -1,23 +0,0 @@ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} diff --git a/node_modules/mocha/node_modules/glob/node_modules/inherits/package.json b/node_modules/mocha/node_modules/glob/node_modules/inherits/package.json deleted file mode 100644 index 5bf0db56..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/inherits/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "inherits", - "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "version": "2.0.1", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented", - "inherits", - "browser", - "browserify" - ], - "main": "./inherits.js", - "browser": "./inherits_browser.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/inherits" - }, - "license": "ISC", - "scripts": { - "test": "node test" - }, - "readme": "Browser-friendly inheritance fully compatible with standard node.js\n[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).\n\nThis package exports standard `inherits` from node.js `util` module in\nnode environment, but also provides alternative browser-friendly\nimplementation through [browser\nfield](https://gist.github.com/shtylman/4339901). Alternative\nimplementation is a literal copy of standard one located in standalone\nmodule to avoid requiring of `util`. It also has a shim for old\nbrowsers with no `Object.create` support.\n\nWhile keeping you sure you are using standard `inherits`\nimplementation in node.js environment, it allows bundlers such as\n[browserify](https://github.com/substack/node-browserify) to not\ninclude full `util` package to your client code if all you need is\njust `inherits` function. It worth, because browser shim for `util`\npackage is large and `inherits` is often the single function you need\nfrom it.\n\nIt's recommended to use this package instead of\n`require('util').inherits` for any code that has chances to be used\nnot only in node.js but in browser too.\n\n## usage\n\n```js\nvar inherits = require('inherits');\n// then use exactly as the standard one\n```\n\n## note on version ~1.0\n\nVersion ~1.0 had completely different motivation and is not compatible\nneither with 2.0 nor with standard node.js `inherits`.\n\nIf you are using version ~1.0 and planning to switch to ~2.0, be\ncareful:\n\n* new version uses `super_` instead of `super` for referencing\n superclass\n* new version overwrites current prototype while old one preserves any\n existing fields on it\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/inherits/issues" - }, - "homepage": "https://github.com/isaacs/inherits", - "_id": "inherits@2.0.1", - "_from": "inherits@2" -} diff --git a/node_modules/mocha/node_modules/glob/node_modules/inherits/test.js b/node_modules/mocha/node_modules/glob/node_modules/inherits/test.js deleted file mode 100644 index fc53012d..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/inherits/test.js +++ /dev/null @@ -1,25 +0,0 @@ -var inherits = require('./inherits.js') -var assert = require('assert') - -function test(c) { - assert(c.constructor === Child) - assert(c.constructor.super_ === Parent) - assert(Object.getPrototypeOf(c) === Child.prototype) - assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) - assert(c instanceof Child) - assert(c instanceof Parent) -} - -function Child() { - Parent.call(this) - test(this) -} - -function Parent() {} - -inherits(Child, Parent) - -var c = new Child -test(c) - -console.log('ok') diff --git a/node_modules/mocha/node_modules/glob/node_modules/minimatch/.npmignore b/node_modules/mocha/node_modules/glob/node_modules/minimatch/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/mocha/node_modules/glob/node_modules/minimatch/LICENSE b/node_modules/mocha/node_modules/glob/node_modules/minimatch/LICENSE deleted file mode 100644 index 05a40109..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -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/node_modules/mocha/node_modules/glob/node_modules/minimatch/README.md b/node_modules/mocha/node_modules/glob/node_modules/minimatch/README.md deleted file mode 100644 index 978268e2..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/README.md +++ /dev/null @@ -1,218 +0,0 @@ -# minimatch - -A minimal matching utility. - -[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch) - - -This is the matching library used internally by npm. - -Eventually, it will replace the C binding in node-glob. - -It works by converting glob expressions into JavaScript `RegExp` -objects. - -## Usage - -```javascript -var minimatch = require("minimatch") - -minimatch("bar.foo", "*.foo") // true! -minimatch("bar.foo", "*.bar") // false! -minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! -``` - -## Features - -Supports these glob features: - -* Brace Expansion -* Extended glob matching -* "Globstar" `**` matching - -See: - -* `man sh` -* `man bash` -* `man 3 fnmatch` -* `man 5 gitignore` - -## Minimatch Class - -Create a minimatch object by instanting the `minimatch.Minimatch` class. - -```javascript -var Minimatch = require("minimatch").Minimatch -var mm = new Minimatch(pattern, options) -``` - -### Properties - -* `pattern` The original pattern the minimatch object represents. -* `options` The options supplied to the constructor. -* `set` A 2-dimensional array of regexp or string expressions. - Each row in the - array corresponds to a brace-expanded pattern. Each item in the row - corresponds to a single path-part. For example, the pattern - `{a,b/c}/d` would expand to a set of patterns like: - - [ [ a, d ] - , [ b, c, d ] ] - - If a portion of the pattern doesn't have any "magic" in it - (that is, it's something like `"foo"` rather than `fo*o?`), then it - will be left as a string rather than converted to a regular - expression. - -* `regexp` Created by the `makeRe` method. A single regular expression - expressing the entire pattern. This is useful in cases where you wish - to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. -* `negate` True if the pattern is negated. -* `comment` True if the pattern is a comment. -* `empty` True if the pattern is `""`. - -### Methods - -* `makeRe` Generate the `regexp` member if necessary, and return it. - Will return `false` if the pattern is invalid. -* `match(fname)` Return true if the filename matches the pattern, or - false otherwise. -* `matchOne(fileArray, patternArray, partial)` Take a `/`-split - filename, and match it against a single row in the `regExpSet`. This - method is mainly for internal use, but is exposed so that it can be - used by a glob-walker that needs to avoid excessive filesystem calls. - -All other methods are internal, and will be called as necessary. - -## Functions - -The top-level exported function has a `cache` property, which is an LRU -cache set to store 100 items. So, calling these methods repeatedly -with the same pattern and options will use the same Minimatch object, -saving the cost of parsing it multiple times. - -### minimatch(path, pattern, options) - -Main export. Tests a path against the pattern using the options. - -```javascript -var isJS = minimatch(file, "*.js", { matchBase: true }) -``` - -### minimatch.filter(pattern, options) - -Returns a function that tests its -supplied argument, suitable for use with `Array.filter`. Example: - -```javascript -var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) -``` - -### minimatch.match(list, pattern, options) - -Match against the list of -files, in the style of fnmatch or glob. If nothing is matched, and -options.nonull is set, then return a list containing the pattern itself. - -```javascript -var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) -``` - -### minimatch.makeRe(pattern, options) - -Make a regular expression object from the pattern. - -## Options - -All options are `false` by default. - -### debug - -Dump a ton of stuff to stderr. - -### nobrace - -Do not expand `{a,b}` and `{1..3}` brace sets. - -### noglobstar - -Disable `**` matching against multiple folder names. - -### dot - -Allow patterns to match filenames starting with a period, even if -the pattern does not explicitly have a period in that spot. - -Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` -is set. - -### noext - -Disable "extglob" style patterns like `+(a|b)`. - -### nocase - -Perform a case-insensitive match. - -### nonull - -When a match is not found by `minimatch.match`, return a list containing -the pattern itself. When set, an empty list is returned if there are -no matches. - -### matchBase - -If set, then patterns without slashes will be matched -against the basename of the path if it contains slashes. For example, -`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. - -### nocomment - -Suppress the behavior of treating `#` at the start of a pattern as a -comment. - -### nonegate - -Suppress the behavior of treating a leading `!` character as negation. - -### flipNegate - -Returns from negate expressions the same as if they were not negated. -(Ie, true on a hit, false on a miss.) - - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between minimatch and other -implementations, and are intentional. - -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.1, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then minimatch.match returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. diff --git a/node_modules/mocha/node_modules/glob/node_modules/minimatch/minimatch.js b/node_modules/mocha/node_modules/glob/node_modules/minimatch/minimatch.js deleted file mode 100644 index c633f89f..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/minimatch.js +++ /dev/null @@ -1,1055 +0,0 @@ -;(function (require, exports, module, platform) { - -if (module) module.exports = minimatch -else exports.minimatch = minimatch - -if (!require) { - require = function (id) { - switch (id) { - case "sigmund": return function sigmund (obj) { - return JSON.stringify(obj) - } - case "path": return { basename: function (f) { - f = f.split(/[\/\\]/) - var e = f.pop() - if (!e) e = f.pop() - return e - }} - case "lru-cache": return function LRUCache () { - // not quite an LRU, but still space-limited. - var cache = {} - var cnt = 0 - this.set = function (k, v) { - cnt ++ - if (cnt >= 100) cache = {} - cache[k] = v - } - this.get = function (k) { return cache[k] } - } - } - } -} - -minimatch.Minimatch = Minimatch - -var LRU = require("lru-cache") - , cache = minimatch.cache = new LRU({max: 100}) - , GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} - , sigmund = require("sigmund") - -var path = require("path") - // any single thing other than / - // don't need to escape / when using new RegExp() - , qmark = "[^/]" - - // * => any number of characters - , star = qmark + "*?" - - // ** when dots are allowed. Anything goes, except .. and . - // not (^ or / followed by one or two dots followed by $ or /), - // followed by anything, any number of times. - , twoStarDot = "(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?" - - // not a ^ or / followed by a dot, - // followed by anything, any number of times. - , twoStarNoDot = "(?:(?!(?:\\\/|^)\\.).)*?" - - // characters that need to be escaped in RegExp. - , reSpecials = charSet("().*{}+?[]^$\\!") - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split("").reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - a = a || {} - b = b || {} - var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch - return minimatch.defaults(def).Minimatch -} - - -function minimatch (p, pattern, options) { - if (typeof pattern !== "string") { - throw new TypeError("glob pattern string required") - } - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === "#") { - return false - } - - // "" only matches "" - if (pattern.trim() === "") return p === "" - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options, cache) - } - - if (typeof pattern !== "string") { - throw new TypeError("glob pattern string required") - } - - if (!options) options = {} - pattern = pattern.trim() - - // windows: need to use /, not \ - // On other platforms, \ is a valid (albeit bad) filename char. - if (platform === "win32") { - pattern = pattern.split("\\").join("/") - } - - // lru storage. - // these things aren't particularly big, but walking down the string - // and turning it into a regexp can get pretty costly. - var cacheKey = pattern + "\n" + sigmund(options) - var cached = minimatch.cache.get(cacheKey) - if (cached) return cached - minimatch.cache.set(cacheKey, this) - - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.debug = function() {} - -Minimatch.prototype.make = make -function make () { - // don't do it more than once. - if (this._made) return - - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === "#") { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) this.debug = console.error - - this.debug(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - this.debug(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return -1 === s.indexOf(false) - }) - - this.debug(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - , negate = false - , options = this.options - , negateOffset = 0 - - if (options.nonegate) return - - for ( var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === "!" - ; i ++) { - negate = !negate - negateOffset ++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return new Minimatch(pattern, options).braceExpand() -} - -Minimatch.prototype.braceExpand = braceExpand -function braceExpand (pattern, options) { - options = options || this.options - pattern = typeof pattern === "undefined" - ? this.pattern : pattern - - if (typeof pattern === "undefined") { - throw new Error("undefined pattern") - } - - if (options.nobrace || - !pattern.match(/\{.*\}/)) { - // shortcut. no need to expand. - return [pattern] - } - - var escaping = false - - // examples and comments refer to this crazy pattern: - // a{b,c{d,e},{f,g}h}x{y,z} - // expected: - // abxy - // abxz - // acdxy - // acdxz - // acexy - // acexz - // afhxy - // afhxz - // aghxy - // aghxz - - // everything before the first \{ is just a prefix. - // So, we pluck that off, and work with the rest, - // and then prepend it to everything we find. - if (pattern.charAt(0) !== "{") { - this.debug(pattern) - var prefix = null - for (var i = 0, l = pattern.length; i < l; i ++) { - var c = pattern.charAt(i) - this.debug(i, c) - if (c === "\\") { - escaping = !escaping - } else if (c === "{" && !escaping) { - prefix = pattern.substr(0, i) - break - } - } - - // actually no sets, all { were escaped. - if (prefix === null) { - this.debug("no sets") - return [pattern] - } - - var tail = braceExpand.call(this, pattern.substr(i), options) - return tail.map(function (t) { - return prefix + t - }) - } - - // now we have something like: - // {b,c{d,e},{f,g}h}x{y,z} - // walk through the set, expanding each part, until - // the set ends. then, we'll expand the suffix. - // If the set only has a single member, then'll put the {} back - - // first, handle numeric sets, since they're easier - var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/) - if (numset) { - this.debug("numset", numset[1], numset[2]) - var suf = braceExpand.call(this, pattern.substr(numset[0].length), options) - , start = +numset[1] - , end = +numset[2] - , inc = start > end ? -1 : 1 - , set = [] - for (var i = start; i != (end + inc); i += inc) { - // append all the suffixes - for (var ii = 0, ll = suf.length; ii < ll; ii ++) { - set.push(i + suf[ii]) - } - } - return set - } - - // ok, walk through the set - // We hope, somewhat optimistically, that there - // will be a } at the end. - // If the closing brace isn't found, then the pattern is - // interpreted as braceExpand("\\" + pattern) so that - // the leading \{ will be interpreted literally. - var i = 1 // skip the \{ - , depth = 1 - , set = [] - , member = "" - , sawEnd = false - , escaping = false - - function addMember () { - set.push(member) - member = "" - } - - this.debug("Entering for") - FOR: for (i = 1, l = pattern.length; i < l; i ++) { - var c = pattern.charAt(i) - this.debug("", i, c) - - if (escaping) { - escaping = false - member += "\\" + c - } else { - switch (c) { - case "\\": - escaping = true - continue - - case "{": - depth ++ - member += "{" - continue - - case "}": - depth -- - // if this closes the actual set, then we're done - if (depth === 0) { - addMember() - // pluck off the close-brace - i ++ - break FOR - } else { - member += c - continue - } - - case ",": - if (depth === 1) { - addMember() - } else { - member += c - } - continue - - default: - member += c - continue - } // switch - } // else - } // for - - // now we've either finished the set, and the suffix is - // pattern.substr(i), or we have *not* closed the set, - // and need to escape the leading brace - if (depth !== 0) { - this.debug("didn't close", pattern) - return braceExpand.call(this, "\\" + pattern, options) - } - - // x{y,z} -> ["xy", "xz"] - this.debug("set", set) - this.debug("suffix", pattern.substr(i)) - var suf = braceExpand.call(this, pattern.substr(i), options) - // ["b", "c{d,e}","{f,g}h"] -> - // [["b"], ["cd", "ce"], ["fh", "gh"]] - var addBraces = set.length === 1 - this.debug("set pre-expanded", set) - set = set.map(function (p) { - return braceExpand.call(this, p, options) - }, this) - this.debug("set expanded", set) - - - // [["b"], ["cd", "ce"], ["fh", "gh"]] -> - // ["b", "cd", "ce", "fh", "gh"] - set = set.reduce(function (l, r) { - return l.concat(r) - }) - - if (addBraces) { - set = set.map(function (s) { - return "{" + s + "}" - }) - } - - // now attach the suffixes. - var ret = [] - for (var i = 0, l = set.length; i < l; i ++) { - for (var ii = 0, ll = suf.length; ii < ll; ii ++) { - ret.push(set[i] + suf[ii]) - } - } - return ret -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - var options = this.options - - // shortcuts - if (!options.noglobstar && pattern === "**") return GLOBSTAR - if (pattern === "") return "" - - var re = "" - , hasMagic = !!options.nocase - , escaping = false - // ? => one single character - , patternListStack = [] - , plType - , stateChar - , inClass = false - , reClassStart = -1 - , classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - , patternStart = pattern.charAt(0) === "." ? "" // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))" - : "(?!\\.)" - , self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case "*": - re += star - hasMagic = true - break - case "?": - re += qmark - hasMagic = true - break - default: - re += "\\"+stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for ( var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i ++ ) { - - this.debug("%s\t%s %s %j", pattern, i, re, c) - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += "\\" + c - escaping = false - continue - } - - SWITCH: switch (c) { - case "/": - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - - case "\\": - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case "?": - case "*": - case "+": - case "@": - case "!": - this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === "!" && i === classStart + 1) c = "^" - re += c - continue - } - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case "(": - if (inClass) { - re += "(" - continue - } - - if (!stateChar) { - re += "\\(" - continue - } - - plType = stateChar - patternListStack.push({ type: plType - , start: i - 1 - , reStart: re.length }) - // negation is (?:(?!js)[^/]*) - re += stateChar === "!" ? "(?:(?!" : "(?:" - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ")": - if (inClass || !patternListStack.length) { - re += "\\)" - continue - } - - clearStateChar() - hasMagic = true - re += ")" - plType = patternListStack.pop().type - // negation is (?:(?!js)[^/]*) - // The others are (?:) - switch (plType) { - case "!": - re += "[^/]*?)" - break - case "?": - case "+": - case "*": re += plType - case "@": break // the default anyway - } - continue - - case "|": - if (inClass || !patternListStack.length || escaping) { - re += "\\|" - escaping = false - continue - } - - clearStateChar() - re += "|" - continue - - // these are mostly the same in regexp and glob - case "[": - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += "\\" + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case "]": - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += "\\" + c - escaping = false - continue - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === "^" && inClass)) { - re += "\\" - } - - re += c - - } // switch - } // for - - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - var cs = pattern.substr(classStart + 1) - , sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + "\\[" + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - var pl - while (pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + 3) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = "\\" - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + "|" - }) - - this.debug("tail=%j\n %s", tail, tail) - var t = pl.type === "*" ? star - : pl.type === "?" ? qmark - : "\\" + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) - + t + "\\(" - + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += "\\\\" - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case ".": - case "[": - case "(": addPatternStart = true - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== "" && hasMagic) re = "(?=.)" + re - - if (addPatternStart) re = patternStart + re - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [ re, hasMagic ] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? "i" : "" - , regExp = new RegExp("^" + re + "$", flags) - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) return this.regexp = false - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - , flags = options.nocase ? "i" : "" - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === "string") ? regExpEscape(p) - : p._src - }).join("\\\/") - }).join("|") - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = "^(?:" + re + ")$" - - // can match anything, as long as it's not this. - if (this.negate) re = "^(?!" + re + ").*$" - - try { - return this.regexp = new RegExp(re, flags) - } catch (ex) { - return this.regexp = false - } -} - -minimatch.match = function (list, pattern, options) { - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = match -function match (f, partial) { - this.debug("match", f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === "" - - if (f === "/" && partial) return true - - var options = this.options - - // windows: need to use /, not \ - // On other platforms, \ is a valid (albeit bad) filename char. - if (platform === "win32") { - f = f.split("\\").join("/") - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, "split", f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - this.debug(this.pattern, "set", set) - - var splitFile = path.basename(f.join("/")).split("/") - - for (var i = 0, l = set.length; i < l; i ++) { - var pattern = set[i], file = f - if (options.matchBase && pattern.length === 1) { - file = splitFile - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - this.debug("matchOne", - { "this": this - , file: file - , pattern: pattern }) - - this.debug("matchOne", file.length, pattern.length) - - for ( var fi = 0 - , pi = 0 - , fl = file.length - , pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi ++, pi ++ ) { - - this.debug("matchOne loop") - var p = pattern[pi] - , f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - if (p === false) return false - - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - , pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for ( ; fi < fl; fi ++) { - if (file[fi] === "." || file[fi] === ".." || - (!options.dot && file[fi].charAt(0) === ".")) return false - } - return true - } - - // ok, let's see if we can swallow whatever we can. - WHILE: while (fr < fl) { - var swallowee = file[fr] - - this.debug('\nglobstar while', - file, fr, pattern, pr, swallowee) - - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === "." || swallowee === ".." || - (!options.dot && swallowee.charAt(0) === ".")) { - this.debug("dot detected!", file, fr, pattern, pr) - break WHILE - } - - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr ++ - } - } - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - if (partial) { - // ran out of file - this.debug("\n>>> no match, partial?", file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === "string") { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } - this.debug("string match", p, f, hit) - } else { - hit = f.match(p) - this.debug("pattern match", p, f, hit) - } - - if (!hit) return false - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === "") - return emptyFileEnd - } - - // should be unreachable. - throw new Error("wtf?") -} - - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, "$1") -} - - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") -} - -})( typeof require === "function" ? require : null, - this, - typeof module === "object" ? module : null, - typeof process === "object" ? process.platform : "win32" - ) diff --git a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore b/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore deleted file mode 100644 index 07e6e472..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules diff --git a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS b/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS deleted file mode 100644 index 4a0bc503..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS +++ /dev/null @@ -1,14 +0,0 @@ -# Authors, sorted by whether or not they are me -Isaac Z. Schlueter -Brian Cottingham -Carlos Brito Lage -Jesse Dailey -Kevin O'Hara -Marco Rogers -Mark Cavage -Marko Mikulicic -Nathan Rajlich -Satheesh Natesan -Trent Mick -ashleybrener -n4kz diff --git a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE b/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE deleted file mode 100644 index 05a40109..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -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/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md b/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md deleted file mode 100644 index 03ee0f98..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md +++ /dev/null @@ -1,97 +0,0 @@ -# lru cache - -A cache object that deletes the least-recently-used items. - -## Usage: - -```javascript -var LRU = require("lru-cache") - , options = { max: 500 - , length: function (n) { return n * 2 } - , dispose: function (key, n) { n.close() } - , maxAge: 1000 * 60 * 60 } - , cache = LRU(options) - , otherCache = LRU(50) // sets just the max size - -cache.set("key", "value") -cache.get("key") // "value" - -cache.reset() // empty the cache -``` - -If you put more stuff in it, then items will fall out. - -If you try to put an oversized thing in it, then it'll fall out right -away. - -## Options - -* `max` The maximum size of the cache, checked by applying the length - function to all values in the cache. Not setting this is kind of - silly, since that's the whole purpose of this lib, but it defaults - to `Infinity`. -* `maxAge` Maximum age in ms. Items are not pro-actively pruned out - as they age, but if you try to get an item that is too old, it'll - drop it and return undefined instead of giving it to you. -* `length` Function that is used to calculate the length of stored - items. If you're storing strings or buffers, then you probably want - to do something like `function(n){return n.length}`. The default is - `function(n){return 1}`, which is fine if you want to store `n` - like-sized things. -* `dispose` Function that is called on items when they are dropped - from the cache. This can be handy if you want to close file - descriptors or do other cleanup tasks when items are no longer - accessible. Called with `key, value`. It's called *before* - actually removing the item from the internal cache, so if you want - to immediately put it back in, you'll have to do that in a - `nextTick` or `setTimeout` callback or it won't do anything. -* `stale` By default, if you set a `maxAge`, it'll only actually pull - stale items out of the cache when you `get(key)`. (That is, it's - not pre-emptively doing a `setTimeout` or anything.) If you set - `stale:true`, it'll return the stale value before deleting it. If - you don't set this, then it'll return `undefined` when you try to - get a stale entry, as if it had already been deleted. - -## API - -* `set(key, value)` -* `get(key) => value` - - Both of these will update the "recently used"-ness of the key. - They do what you think. - -* `peek(key)` - - Returns the key value (or `undefined` if not found) without - updating the "recently used"-ness of the key. - - (If you find yourself using this a lot, you *might* be using the - wrong sort of data structure, but there are some use cases where - it's handy.) - -* `del(key)` - - Deletes a key out of the cache. - -* `reset()` - - Clear the cache entirely, throwing away all values. - -* `has(key)` - - Check if a key is in the cache, without updating the recent-ness - or deleting it for being stale. - -* `forEach(function(value,key,cache), [thisp])` - - Just like `Array.prototype.forEach`. Iterates over all the keys - in the cache, in order of recent-ness. (Ie, more recently used - items are iterated over first.) - -* `keys()` - - Return an array of the keys in the cache. - -* `values()` - - Return an array of the values in the cache. diff --git a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js b/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js deleted file mode 100644 index d1d13817..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +++ /dev/null @@ -1,252 +0,0 @@ -;(function () { // closure for web browsers - -if (typeof module === 'object' && module.exports) { - module.exports = LRUCache -} else { - // just set the global for non-node platforms. - this.LRUCache = LRUCache -} - -function hOP (obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key) -} - -function naiveLength () { return 1 } - -function LRUCache (options) { - if (!(this instanceof LRUCache)) - return new LRUCache(options) - - if (typeof options === 'number') - options = { max: options } - - if (!options) - options = {} - - this._max = options.max - // Kind of weird to have a default max of Infinity, but oh well. - if (!this._max || !(typeof this._max === "number") || this._max <= 0 ) - this._max = Infinity - - this._lengthCalculator = options.length || naiveLength - if (typeof this._lengthCalculator !== "function") - this._lengthCalculator = naiveLength - - this._allowStale = options.stale || false - this._maxAge = options.maxAge || null - this._dispose = options.dispose - this.reset() -} - -// resize the cache when the max changes. -Object.defineProperty(LRUCache.prototype, "max", - { set : function (mL) { - if (!mL || !(typeof mL === "number") || mL <= 0 ) mL = Infinity - this._max = mL - if (this._length > this._max) trim(this) - } - , get : function () { return this._max } - , enumerable : true - }) - -// resize the cache when the lengthCalculator changes. -Object.defineProperty(LRUCache.prototype, "lengthCalculator", - { set : function (lC) { - if (typeof lC !== "function") { - this._lengthCalculator = naiveLength - this._length = this._itemCount - for (var key in this._cache) { - this._cache[key].length = 1 - } - } else { - this._lengthCalculator = lC - this._length = 0 - for (var key in this._cache) { - this._cache[key].length = this._lengthCalculator(this._cache[key].value) - this._length += this._cache[key].length - } - } - - if (this._length > this._max) trim(this) - } - , get : function () { return this._lengthCalculator } - , enumerable : true - }) - -Object.defineProperty(LRUCache.prototype, "length", - { get : function () { return this._length } - , enumerable : true - }) - - -Object.defineProperty(LRUCache.prototype, "itemCount", - { get : function () { return this._itemCount } - , enumerable : true - }) - -LRUCache.prototype.forEach = function (fn, thisp) { - thisp = thisp || this - var i = 0; - for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { - i++ - var hit = this._lruList[k] - if (this._maxAge && (Date.now() - hit.now > this._maxAge)) { - del(this, hit) - if (!this._allowStale) hit = undefined - } - if (hit) { - fn.call(thisp, hit.value, hit.key, this) - } - } -} - -LRUCache.prototype.keys = function () { - var keys = new Array(this._itemCount) - var i = 0 - for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { - var hit = this._lruList[k] - keys[i++] = hit.key - } - return keys -} - -LRUCache.prototype.values = function () { - var values = new Array(this._itemCount) - var i = 0 - for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { - var hit = this._lruList[k] - values[i++] = hit.value - } - return values -} - -LRUCache.prototype.reset = function () { - if (this._dispose && this._cache) { - for (var k in this._cache) { - this._dispose(k, this._cache[k].value) - } - } - - this._cache = Object.create(null) // hash of items by key - this._lruList = Object.create(null) // list of items in order of use recency - this._mru = 0 // most recently used - this._lru = 0 // least recently used - this._length = 0 // number of items in the list - this._itemCount = 0 -} - -// Provided for debugging/dev purposes only. No promises whatsoever that -// this API stays stable. -LRUCache.prototype.dump = function () { - return this._cache -} - -LRUCache.prototype.dumpLru = function () { - return this._lruList -} - -LRUCache.prototype.set = function (key, value) { - if (hOP(this._cache, key)) { - // dispose of the old one before overwriting - if (this._dispose) this._dispose(key, this._cache[key].value) - if (this._maxAge) this._cache[key].now = Date.now() - this._cache[key].value = value - this.get(key) - return true - } - - var len = this._lengthCalculator(value) - var age = this._maxAge ? Date.now() : 0 - var hit = new Entry(key, value, this._mru++, len, age) - - // oversized objects fall out of cache automatically. - if (hit.length > this._max) { - if (this._dispose) this._dispose(key, value) - return false - } - - this._length += hit.length - this._lruList[hit.lu] = this._cache[key] = hit - this._itemCount ++ - - if (this._length > this._max) trim(this) - return true -} - -LRUCache.prototype.has = function (key) { - if (!hOP(this._cache, key)) return false - var hit = this._cache[key] - if (this._maxAge && (Date.now() - hit.now > this._maxAge)) { - return false - } - return true -} - -LRUCache.prototype.get = function (key) { - return get(this, key, true) -} - -LRUCache.prototype.peek = function (key) { - return get(this, key, false) -} - -LRUCache.prototype.pop = function () { - var hit = this._lruList[this._lru] - del(this, hit) - return hit || null -} - -LRUCache.prototype.del = function (key) { - del(this, this._cache[key]) -} - -function get (self, key, doUse) { - var hit = self._cache[key] - if (hit) { - if (self._maxAge && (Date.now() - hit.now > self._maxAge)) { - del(self, hit) - if (!self._allowStale) hit = undefined - } else { - if (doUse) use(self, hit) - } - if (hit) hit = hit.value - } - return hit -} - -function use (self, hit) { - shiftLU(self, hit) - hit.lu = self._mru ++ - self._lruList[hit.lu] = hit -} - -function trim (self) { - while (self._lru < self._mru && self._length > self._max) - del(self, self._lruList[self._lru]) -} - -function shiftLU (self, hit) { - delete self._lruList[ hit.lu ] - while (self._lru < self._mru && !self._lruList[self._lru]) self._lru ++ -} - -function del (self, hit) { - if (hit) { - if (self._dispose) self._dispose(hit.key, hit.value) - self._length -= hit.length - self._itemCount -- - delete self._cache[ hit.key ] - shiftLU(self, hit) - } -} - -// classy, since V8 prefers predictable objects. -function Entry (key, value, lu, length, now) { - this.key = key - this.value = value - this.lu = lu - this.length = length - this.now = now -} - -})() diff --git a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json b/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json deleted file mode 100644 index 4472725d..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "lru-cache", - "description": "A cache object that deletes the least-recently-used items.", - "version": "2.5.0", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me" - }, - "scripts": { - "test": "tap test --gc" - }, - "main": "lib/lru-cache.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-lru-cache.git" - }, - "devDependencies": { - "tap": "", - "weak": "" - }, - "license": { - "type": "MIT", - "url": "http://github.com/isaacs/node-lru-cache/raw/master/LICENSE" - }, - "readme": "# lru cache\n\nA cache object that deletes the least-recently-used items.\n\n## Usage:\n\n```javascript\nvar LRU = require(\"lru-cache\")\n , options = { max: 500\n , length: function (n) { return n * 2 }\n , dispose: function (key, n) { n.close() }\n , maxAge: 1000 * 60 * 60 }\n , cache = LRU(options)\n , otherCache = LRU(50) // sets just the max size\n\ncache.set(\"key\", \"value\")\ncache.get(\"key\") // \"value\"\n\ncache.reset() // empty the cache\n```\n\nIf you put more stuff in it, then items will fall out.\n\nIf you try to put an oversized thing in it, then it'll fall out right\naway.\n\n## Options\n\n* `max` The maximum size of the cache, checked by applying the length\n function to all values in the cache. Not setting this is kind of\n silly, since that's the whole purpose of this lib, but it defaults\n to `Infinity`.\n* `maxAge` Maximum age in ms. Items are not pro-actively pruned out\n as they age, but if you try to get an item that is too old, it'll\n drop it and return undefined instead of giving it to you.\n* `length` Function that is used to calculate the length of stored\n items. If you're storing strings or buffers, then you probably want\n to do something like `function(n){return n.length}`. The default is\n `function(n){return 1}`, which is fine if you want to store `n`\n like-sized things.\n* `dispose` Function that is called on items when they are dropped\n from the cache. This can be handy if you want to close file\n descriptors or do other cleanup tasks when items are no longer\n accessible. Called with `key, value`. It's called *before*\n actually removing the item from the internal cache, so if you want\n to immediately put it back in, you'll have to do that in a\n `nextTick` or `setTimeout` callback or it won't do anything.\n* `stale` By default, if you set a `maxAge`, it'll only actually pull\n stale items out of the cache when you `get(key)`. (That is, it's\n not pre-emptively doing a `setTimeout` or anything.) If you set\n `stale:true`, it'll return the stale value before deleting it. If\n you don't set this, then it'll return `undefined` when you try to\n get a stale entry, as if it had already been deleted.\n\n## API\n\n* `set(key, value)`\n* `get(key) => value`\n\n Both of these will update the \"recently used\"-ness of the key.\n They do what you think.\n\n* `peek(key)`\n\n Returns the key value (or `undefined` if not found) without\n updating the \"recently used\"-ness of the key.\n\n (If you find yourself using this a lot, you *might* be using the\n wrong sort of data structure, but there are some use cases where\n it's handy.)\n\n* `del(key)`\n\n Deletes a key out of the cache.\n\n* `reset()`\n\n Clear the cache entirely, throwing away all values.\n\n* `has(key)`\n\n Check if a key is in the cache, without updating the recent-ness\n or deleting it for being stale.\n\n* `forEach(function(value,key,cache), [thisp])`\n\n Just like `Array.prototype.forEach`. Iterates over all the keys\n in the cache, in order of recent-ness. (Ie, more recently used\n items are iterated over first.)\n\n* `keys()`\n\n Return an array of the keys in the cache.\n\n* `values()`\n\n Return an array of the values in the cache.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/node-lru-cache/issues" - }, - "homepage": "https://github.com/isaacs/node-lru-cache", - "_id": "lru-cache@2.5.0", - "_from": "lru-cache@2" -} diff --git a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js b/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js deleted file mode 100644 index f72697c4..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js +++ /dev/null @@ -1,369 +0,0 @@ -var test = require("tap").test - , LRU = require("../") - -test("basic", function (t) { - var cache = new LRU({max: 10}) - cache.set("key", "value") - t.equal(cache.get("key"), "value") - t.equal(cache.get("nada"), undefined) - t.equal(cache.length, 1) - t.equal(cache.max, 10) - t.end() -}) - -test("least recently set", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.set("b", "B") - cache.set("c", "C") - t.equal(cache.get("c"), "C") - t.equal(cache.get("b"), "B") - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("lru recently gotten", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.set("b", "B") - cache.get("a") - cache.set("c", "C") - t.equal(cache.get("c"), "C") - t.equal(cache.get("b"), undefined) - t.equal(cache.get("a"), "A") - t.end() -}) - -test("del", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.del("a") - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("max", function (t) { - var cache = new LRU(3) - - // test changing the max, verify that the LRU items get dropped. - cache.max = 100 - for (var i = 0; i < 100; i ++) cache.set(i, i) - t.equal(cache.length, 100) - for (var i = 0; i < 100; i ++) { - t.equal(cache.get(i), i) - } - cache.max = 3 - t.equal(cache.length, 3) - for (var i = 0; i < 97; i ++) { - t.equal(cache.get(i), undefined) - } - for (var i = 98; i < 100; i ++) { - t.equal(cache.get(i), i) - } - - // now remove the max restriction, and try again. - cache.max = "hello" - for (var i = 0; i < 100; i ++) cache.set(i, i) - t.equal(cache.length, 100) - for (var i = 0; i < 100; i ++) { - t.equal(cache.get(i), i) - } - // should trigger an immediate resize - cache.max = 3 - t.equal(cache.length, 3) - for (var i = 0; i < 97; i ++) { - t.equal(cache.get(i), undefined) - } - for (var i = 98; i < 100; i ++) { - t.equal(cache.get(i), i) - } - t.end() -}) - -test("reset", function (t) { - var cache = new LRU(10) - cache.set("a", "A") - cache.set("b", "B") - cache.reset() - t.equal(cache.length, 0) - t.equal(cache.max, 10) - t.equal(cache.get("a"), undefined) - t.equal(cache.get("b"), undefined) - t.end() -}) - - -// Note: `.dump()` is a debugging tool only. No guarantees are made -// about the format/layout of the response. -test("dump", function (t) { - var cache = new LRU(10) - var d = cache.dump(); - t.equal(Object.keys(d).length, 0, "nothing in dump for empty cache") - cache.set("a", "A") - var d = cache.dump() // { a: { key: "a", value: "A", lu: 0 } } - t.ok(d.a) - t.equal(d.a.key, "a") - t.equal(d.a.value, "A") - t.equal(d.a.lu, 0) - - cache.set("b", "B") - cache.get("b") - d = cache.dump() - t.ok(d.b) - t.equal(d.b.key, "b") - t.equal(d.b.value, "B") - t.equal(d.b.lu, 2) - - t.end() -}) - - -test("basic with weighed length", function (t) { - var cache = new LRU({ - max: 100, - length: function (item) { return item.size } - }) - cache.set("key", {val: "value", size: 50}) - t.equal(cache.get("key").val, "value") - t.equal(cache.get("nada"), undefined) - t.equal(cache.lengthCalculator(cache.get("key")), 50) - t.equal(cache.length, 50) - t.equal(cache.max, 100) - t.end() -}) - - -test("weighed length item too large", function (t) { - var cache = new LRU({ - max: 10, - length: function (item) { return item.size } - }) - t.equal(cache.max, 10) - - // should fall out immediately - cache.set("key", {val: "value", size: 50}) - - t.equal(cache.length, 0) - t.equal(cache.get("key"), undefined) - t.end() -}) - -test("least recently set with weighed length", function (t) { - var cache = new LRU({ - max:8, - length: function (item) { return item.length } - }) - cache.set("a", "A") - cache.set("b", "BB") - cache.set("c", "CCC") - cache.set("d", "DDDD") - t.equal(cache.get("d"), "DDDD") - t.equal(cache.get("c"), "CCC") - t.equal(cache.get("b"), undefined) - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("lru recently gotten with weighed length", function (t) { - var cache = new LRU({ - max: 8, - length: function (item) { return item.length } - }) - cache.set("a", "A") - cache.set("b", "BB") - cache.set("c", "CCC") - cache.get("a") - cache.get("b") - cache.set("d", "DDDD") - t.equal(cache.get("c"), undefined) - t.equal(cache.get("d"), "DDDD") - t.equal(cache.get("b"), "BB") - t.equal(cache.get("a"), "A") - t.end() -}) - -test("set returns proper booleans", function(t) { - var cache = new LRU({ - max: 5, - length: function (item) { return item.length } - }) - - t.equal(cache.set("a", "A"), true) - - // should return false for max exceeded - t.equal(cache.set("b", "donuts"), false) - - t.equal(cache.set("b", "B"), true) - t.equal(cache.set("c", "CCCC"), true) - t.end() -}) - -test("drop the old items", function(t) { - var cache = new LRU({ - max: 5, - maxAge: 50 - }) - - cache.set("a", "A") - - setTimeout(function () { - cache.set("b", "b") - t.equal(cache.get("a"), "A") - }, 25) - - setTimeout(function () { - cache.set("c", "C") - // timed out - t.notOk(cache.get("a")) - }, 60) - - setTimeout(function () { - t.notOk(cache.get("b")) - t.equal(cache.get("c"), "C") - }, 90) - - setTimeout(function () { - t.notOk(cache.get("c")) - t.end() - }, 155) -}) - -test("disposal function", function(t) { - var disposed = false - var cache = new LRU({ - max: 1, - dispose: function (k, n) { - disposed = n - } - }) - - cache.set(1, 1) - cache.set(2, 2) - t.equal(disposed, 1) - cache.set(3, 3) - t.equal(disposed, 2) - cache.reset() - t.equal(disposed, 3) - t.end() -}) - -test("disposal function on too big of item", function(t) { - var disposed = false - var cache = new LRU({ - max: 1, - length: function (k) { - return k.length - }, - dispose: function (k, n) { - disposed = n - } - }) - var obj = [ 1, 2 ] - - t.equal(disposed, false) - cache.set("obj", obj) - t.equal(disposed, obj) - t.end() -}) - -test("has()", function(t) { - var cache = new LRU({ - max: 1, - maxAge: 10 - }) - - cache.set('foo', 'bar') - t.equal(cache.has('foo'), true) - cache.set('blu', 'baz') - t.equal(cache.has('foo'), false) - t.equal(cache.has('blu'), true) - setTimeout(function() { - t.equal(cache.has('blu'), false) - t.end() - }, 15) -}) - -test("stale", function(t) { - var cache = new LRU({ - maxAge: 10, - stale: true - }) - - cache.set('foo', 'bar') - t.equal(cache.get('foo'), 'bar') - t.equal(cache.has('foo'), true) - setTimeout(function() { - t.equal(cache.has('foo'), false) - t.equal(cache.get('foo'), 'bar') - t.equal(cache.get('foo'), undefined) - t.end() - }, 15) -}) - -test("lru update via set", function(t) { - var cache = LRU({ max: 2 }); - - cache.set('foo', 1); - cache.set('bar', 2); - cache.del('bar'); - cache.set('baz', 3); - cache.set('qux', 4); - - t.equal(cache.get('foo'), undefined) - t.equal(cache.get('bar'), undefined) - t.equal(cache.get('baz'), 3) - t.equal(cache.get('qux'), 4) - t.end() -}) - -test("least recently set w/ peek", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.set("b", "B") - t.equal(cache.peek("a"), "A") - cache.set("c", "C") - t.equal(cache.get("c"), "C") - t.equal(cache.get("b"), "B") - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("pop the least used item", function (t) { - var cache = new LRU(3) - , last - - cache.set("a", "A") - cache.set("b", "B") - cache.set("c", "C") - - t.equal(cache.length, 3) - t.equal(cache.max, 3) - - // Ensure we pop a, c, b - cache.get("b", "B") - - last = cache.pop() - t.equal(last.key, "a") - t.equal(last.value, "A") - t.equal(cache.length, 2) - t.equal(cache.max, 3) - - last = cache.pop() - t.equal(last.key, "c") - t.equal(last.value, "C") - t.equal(cache.length, 1) - t.equal(cache.max, 3) - - last = cache.pop() - t.equal(last.key, "b") - t.equal(last.value, "B") - t.equal(cache.length, 0) - t.equal(cache.max, 3) - - last = cache.pop() - t.equal(last, null) - t.equal(cache.length, 0) - t.equal(cache.max, 3) - - t.end() -}) diff --git a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js b/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js deleted file mode 100644 index eefb80d9..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js +++ /dev/null @@ -1,52 +0,0 @@ -var test = require('tap').test -var LRU = require('../') - -test('forEach', function (t) { - var l = new LRU(5) - for (var i = 0; i < 10; i ++) { - l.set(i.toString(), i.toString(2)) - } - - var i = 9 - l.forEach(function (val, key, cache) { - t.equal(cache, l) - t.equal(key, i.toString()) - t.equal(val, i.toString(2)) - i -= 1 - }) - - // get in order of most recently used - l.get(6) - l.get(8) - - var order = [ 8, 6, 9, 7, 5 ] - var i = 0 - - l.forEach(function (val, key, cache) { - var j = order[i ++] - t.equal(cache, l) - t.equal(key, j.toString()) - t.equal(val, j.toString(2)) - }) - - t.end() -}) - -test('keys() and values()', function (t) { - var l = new LRU(5) - for (var i = 0; i < 10; i ++) { - l.set(i.toString(), i.toString(2)) - } - - t.similar(l.keys(), ['9', '8', '7', '6', '5']) - t.similar(l.values(), ['1001', '1000', '111', '110', '101']) - - // get in order of most recently used - l.get(6) - l.get(8) - - t.similar(l.keys(), ['8', '6', '9', '7', '5']) - t.similar(l.values(), ['1000', '110', '1001', '111', '101']) - - t.end() -}) diff --git a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js b/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js deleted file mode 100644 index 7af45b02..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env node --expose_gc - -var weak = require('weak'); -var test = require('tap').test -var LRU = require('../') -var l = new LRU({ max: 10 }) -var refs = 0 -function X() { - refs ++ - weak(this, deref) -} - -function deref() { - refs -- -} - -test('no leaks', function (t) { - // fill up the cache - for (var i = 0; i < 100; i++) { - l.set(i, new X); - // throw some gets in there, too. - if (i % 2 === 0) - l.get(i / 2) - } - - gc() - - var start = process.memoryUsage() - - // capture the memory - var startRefs = refs - - // do it again, but more - for (var i = 0; i < 10000; i++) { - l.set(i, new X); - // throw some gets in there, too. - if (i % 2 === 0) - l.get(i / 2) - } - - gc() - - var end = process.memoryUsage() - t.equal(refs, startRefs, 'no leaky refs') - - console.error('start: %j\n' + - 'end: %j', start, end); - t.pass(); - t.end(); -}) diff --git a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE b/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md b/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md deleted file mode 100644 index 7e365129..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# sigmund - -Quick and dirty signatures for Objects. - -This is like a much faster `deepEquals` comparison, which returns a -string key suitable for caches and the like. - -## Usage - -```javascript -function doSomething (someObj) { - var key = sigmund(someObj, maxDepth) // max depth defaults to 10 - var cached = cache.get(key) - if (cached) return cached) - - var result = expensiveCalculation(someObj) - cache.set(key, result) - return result -} -``` - -The resulting key will be as unique and reproducible as calling -`JSON.stringify` or `util.inspect` on the object, but is much faster. -In order to achieve this speed, some differences are glossed over. -For example, the object `{0:'foo'}` will be treated identically to the -array `['foo']`. - -Also, just as there is no way to summon the soul from the scribblings -of a cocain-addled psychoanalyst, there is no way to revive the object -from the signature string that sigmund gives you. In fact, it's -barely even readable. - -As with `sys.inspect` and `JSON.stringify`, larger objects will -produce larger signature strings. - -Because sigmund is a bit less strict than the more thorough -alternatives, the strings will be shorter, and also there is a -slightly higher chance for collisions. For example, these objects -have the same signature: - - var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]} - var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']} - -Like a good Freudian, sigmund is most effective when you already have -some understanding of what you're looking for. It can help you help -yourself, but you must be willing to do some work as well. - -Cycles are handled, and cyclical objects are silently omitted (though -the key is included in the signature output.) - -The second argument is the maximum depth, which defaults to 10, -because that is the maximum object traversal depth covered by most -insurance carriers. diff --git a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js b/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js deleted file mode 100644 index 5acfd6d9..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js +++ /dev/null @@ -1,283 +0,0 @@ -// different ways to id objects -// use a req/res pair, since it's crazy deep and cyclical - -// sparseFE10 and sigmund are usually pretty close, which is to be expected, -// since they are essentially the same algorithm, except that sigmund handles -// regular expression objects properly. - - -var http = require('http') -var util = require('util') -var sigmund = require('./sigmund.js') -var sreq, sres, creq, cres, test - -http.createServer(function (q, s) { - sreq = q - sres = s - sres.end('ok') - this.close(function () { setTimeout(function () { - start() - }, 200) }) -}).listen(1337, function () { - creq = http.get({ port: 1337 }) - creq.on('response', function (s) { cres = s }) -}) - -function start () { - test = [sreq, sres, creq, cres] - // test = sreq - // sreq.sres = sres - // sreq.creq = creq - // sreq.cres = cres - - for (var i in exports.compare) { - console.log(i) - var hash = exports.compare[i]() - console.log(hash) - console.log(hash.length) - console.log('') - } - - require('bench').runMain() -} - -function customWs (obj, md, d) { - d = d || 0 - var to = typeof obj - if (to === 'undefined' || to === 'function' || to === null) return '' - if (d > md || !obj || to !== 'object') return ('' + obj).replace(/[\n ]+/g, '') - - if (Array.isArray(obj)) { - return obj.map(function (i, _, __) { - return customWs(i, md, d + 1) - }).reduce(function (a, b) { return a + b }, '') - } - - var keys = Object.keys(obj) - return keys.map(function (k, _, __) { - return k + ':' + customWs(obj[k], md, d + 1) - }).reduce(function (a, b) { return a + b }, '') -} - -function custom (obj, md, d) { - d = d || 0 - var to = typeof obj - if (to === 'undefined' || to === 'function' || to === null) return '' - if (d > md || !obj || to !== 'object') return '' + obj - - if (Array.isArray(obj)) { - return obj.map(function (i, _, __) { - return custom(i, md, d + 1) - }).reduce(function (a, b) { return a + b }, '') - } - - var keys = Object.keys(obj) - return keys.map(function (k, _, __) { - return k + ':' + custom(obj[k], md, d + 1) - }).reduce(function (a, b) { return a + b }, '') -} - -function sparseFE2 (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - Object.keys(v).forEach(function (k, _, __) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') return - var to = typeof v[k] - if (to === 'function' || to === 'undefined') return - soFar += k + ':' - ch(v[k], depth + 1) - }) - soFar += '}' - } - ch(obj, 0) - return soFar -} - -function sparseFE (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - Object.keys(v).forEach(function (k, _, __) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') return - var to = typeof v[k] - if (to === 'function' || to === 'undefined') return - soFar += k - ch(v[k], depth + 1) - }) - } - ch(obj, 0) - return soFar -} - -function sparse (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - for (var k in v) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') continue - var to = typeof v[k] - if (to === 'function' || to === 'undefined') continue - soFar += k - ch(v[k], depth + 1) - } - } - ch(obj, 0) - return soFar -} - -function noCommas (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - for (var k in v) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') continue - var to = typeof v[k] - if (to === 'function' || to === 'undefined') continue - soFar += k + ':' - ch(v[k], depth + 1) - } - soFar += '}' - } - ch(obj, 0) - return soFar -} - - -function flatten (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - for (var k in v) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') continue - var to = typeof v[k] - if (to === 'function' || to === 'undefined') continue - soFar += k + ':' - ch(v[k], depth + 1) - soFar += ',' - } - soFar += '}' - } - ch(obj, 0) - return soFar -} - -exports.compare = -{ - // 'custom 2': function () { - // return custom(test, 2, 0) - // }, - // 'customWs 2': function () { - // return customWs(test, 2, 0) - // }, - 'JSON.stringify (guarded)': function () { - var seen = [] - return JSON.stringify(test, function (k, v) { - if (typeof v !== 'object' || !v) return v - if (seen.indexOf(v) !== -1) return undefined - seen.push(v) - return v - }) - }, - - 'flatten 10': function () { - return flatten(test, 10) - }, - - // 'flattenFE 10': function () { - // return flattenFE(test, 10) - // }, - - 'noCommas 10': function () { - return noCommas(test, 10) - }, - - 'sparse 10': function () { - return sparse(test, 10) - }, - - 'sparseFE 10': function () { - return sparseFE(test, 10) - }, - - 'sparseFE2 10': function () { - return sparseFE2(test, 10) - }, - - sigmund: function() { - return sigmund(test, 10) - }, - - - // 'util.inspect 1': function () { - // return util.inspect(test, false, 1, false) - // }, - // 'util.inspect undefined': function () { - // util.inspect(test) - // }, - // 'util.inspect 2': function () { - // util.inspect(test, false, 2, false) - // }, - // 'util.inspect 3': function () { - // util.inspect(test, false, 3, false) - // }, - // 'util.inspect 4': function () { - // util.inspect(test, false, 4, false) - // }, - // 'util.inspect Infinity': function () { - // util.inspect(test, false, Infinity, false) - // } -} - -/** results -**/ diff --git a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json b/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json deleted file mode 100644 index cb7e2bd4..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "sigmund", - "version": "1.0.0", - "description": "Quick and dirty signatures for Objects.", - "main": "sigmund.js", - "directories": { - "test": "test" - }, - "dependencies": {}, - "devDependencies": { - "tap": "~0.3.0" - }, - "scripts": { - "test": "tap test/*.js", - "bench": "node bench.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/sigmund" - }, - "keywords": [ - "object", - "signature", - "key", - "data", - "psychoanalysis" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "BSD", - "readme": "# sigmund\n\nQuick and dirty signatures for Objects.\n\nThis is like a much faster `deepEquals` comparison, which returns a\nstring key suitable for caches and the like.\n\n## Usage\n\n```javascript\nfunction doSomething (someObj) {\n var key = sigmund(someObj, maxDepth) // max depth defaults to 10\n var cached = cache.get(key)\n if (cached) return cached)\n\n var result = expensiveCalculation(someObj)\n cache.set(key, result)\n return result\n}\n```\n\nThe resulting key will be as unique and reproducible as calling\n`JSON.stringify` or `util.inspect` on the object, but is much faster.\nIn order to achieve this speed, some differences are glossed over.\nFor example, the object `{0:'foo'}` will be treated identically to the\narray `['foo']`.\n\nAlso, just as there is no way to summon the soul from the scribblings\nof a cocain-addled psychoanalyst, there is no way to revive the object\nfrom the signature string that sigmund gives you. In fact, it's\nbarely even readable.\n\nAs with `sys.inspect` and `JSON.stringify`, larger objects will\nproduce larger signature strings.\n\nBecause sigmund is a bit less strict than the more thorough\nalternatives, the strings will be shorter, and also there is a\nslightly higher chance for collisions. For example, these objects\nhave the same signature:\n\n var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}\n var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}\n\nLike a good Freudian, sigmund is most effective when you already have\nsome understanding of what you're looking for. It can help you help\nyourself, but you must be willing to do some work as well.\n\nCycles are handled, and cyclical objects are silently omitted (though\nthe key is included in the signature output.)\n\nThe second argument is the maximum depth, which defaults to 10,\nbecause that is the maximum object traversal depth covered by most\ninsurance carriers.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/sigmund/issues" - }, - "homepage": "https://github.com/isaacs/sigmund", - "_id": "sigmund@1.0.0", - "_from": "sigmund@~1.0.0" -} diff --git a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js b/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js deleted file mode 100644 index 82c7ab8c..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js +++ /dev/null @@ -1,39 +0,0 @@ -module.exports = sigmund -function sigmund (subject, maxSessions) { - maxSessions = maxSessions || 10; - var notes = []; - var analysis = ''; - var RE = RegExp; - - function psychoAnalyze (subject, session) { - if (session > maxSessions) return; - - if (typeof subject === 'function' || - typeof subject === 'undefined') { - return; - } - - if (typeof subject !== 'object' || !subject || - (subject instanceof RE)) { - analysis += subject; - return; - } - - if (notes.indexOf(subject) !== -1 || session === maxSessions) return; - - notes.push(subject); - analysis += '{'; - Object.keys(subject).forEach(function (issue, _, __) { - // pseudo-private values. skip those. - if (issue.charAt(0) === '_') return; - var to = typeof subject[issue]; - if (to === 'function' || to === 'undefined') return; - analysis += issue; - psychoAnalyze(subject[issue], session + 1); - }); - } - psychoAnalyze(subject, 0); - return analysis; -} - -// vim: set softtabstop=4 shiftwidth=4: diff --git a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js b/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js deleted file mode 100644 index 50c53a13..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js +++ /dev/null @@ -1,24 +0,0 @@ -var test = require('tap').test -var sigmund = require('../sigmund.js') - - -// occasionally there are duplicates -// that's an acceptable edge-case. JSON.stringify and util.inspect -// have some collision potential as well, though less, and collision -// detection is expensive. -var hash = '{abc/def/g{0h1i2{jkl' -var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]} -var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']} - -var obj3 = JSON.parse(JSON.stringify(obj1)) -obj3.c = /def/ -obj3.g[2].cycle = obj3 -var cycleHash = '{abc/def/g{0h1i2{jklcycle' - -test('basic', function (t) { - t.equal(sigmund(obj1), hash) - t.equal(sigmund(obj2), hash) - t.equal(sigmund(obj3), cycleHash) - t.end() -}) - diff --git a/node_modules/mocha/node_modules/glob/node_modules/minimatch/package.json b/node_modules/mocha/node_modules/glob/node_modules/minimatch/package.json deleted file mode 100644 index f8f545aa..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "name": "minimatch", - "description": "a glob matcher in javascript", - "version": "0.2.14", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/minimatch.git" - }, - "main": "minimatch.js", - "scripts": { - "test": "tap test/*.js" - }, - "engines": { - "node": "*" - }, - "dependencies": { - "lru-cache": "2", - "sigmund": "~1.0.0" - }, - "devDependencies": { - "tap": "" - }, - "license": { - "type": "MIT", - "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE" - }, - "readme": "# minimatch\n\nA minimal matching utility.\n\n[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\nminimatch(\"bar.foo\", \"*.+(bar|foo)\", { debug: true }) // true, and noisy!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/minimatch/issues" - }, - "homepage": "https://github.com/isaacs/minimatch", - "_id": "minimatch@0.2.14", - "_from": "minimatch@~0.2.11" -} diff --git a/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/basic.js b/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/basic.js deleted file mode 100644 index ae7ac73c..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/basic.js +++ /dev/null @@ -1,399 +0,0 @@ -// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test -// -// TODO: Some of these tests do very bad things with backslashes, and will -// most likely fail badly on windows. They should probably be skipped. - -var tap = require("tap") - , globalBefore = Object.keys(global) - , mm = require("../") - , files = [ "a", "b", "c", "d", "abc" - , "abd", "abe", "bb", "bcd" - , "ca", "cb", "dd", "de" - , "bdir/", "bdir/cfile"] - , next = files.concat([ "a-b", "aXb" - , ".x", ".y" ]) - - -var patterns = - [ "http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test" - , ["a*", ["a", "abc", "abd", "abe"]] - , ["X*", ["X*"], {nonull: true}] - - // allow null glob expansion - , ["X*", []] - - // isaacs: Slightly different than bash/sh/ksh - // \\* is not un-escaped to literal "*" in a failed match, - // but it does make it get treated as a literal star - , ["\\*", ["\\*"], {nonull: true}] - , ["\\**", ["\\**"], {nonull: true}] - , ["\\*\\*", ["\\*\\*"], {nonull: true}] - - , ["b*/", ["bdir/"]] - , ["c*", ["c", "ca", "cb"]] - , ["**", files] - - , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}] - , ["s/\\..*//", ["s/\\..*//"], {nonull: true}] - - , "legendary larry crashes bashes" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}] - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}] - - , "character classes" - , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]] - , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd", - "bdir/", "ca", "cb", "dd", "de"]] - , ["a*[^c]", ["abd", "abe"]] - , function () { files.push("a-b", "aXb") } - , ["a[X-]b", ["a-b", "aXb"]] - , function () { files.push(".x", ".y") } - , ["[^a-c]*", ["d", "dd", "de"]] - , function () { files.push("a*b/", "a*b/ooo") } - , ["a\\*b/*", ["a*b/ooo"]] - , ["a\\*?/*", ["a*b/ooo"]] - , ["*\\\\!*", [], {null: true}, ["echo !7"]] - , ["*\\!*", ["echo !7"], null, ["echo !7"]] - , ["*.\\*", ["r.*"], null, ["r.*"]] - , ["a[b]c", ["abc"]] - , ["a[\\b]c", ["abc"]] - , ["a?c", ["abc"]] - , ["a\\*c", [], {null: true}, ["abc"]] - , ["", [""], { null: true }, [""]] - - , "http://www.opensource.apple.com/source/bash/bash-23/" + - "bash/tests/glob-test" - , function () { files.push("man/", "man/man1/", "man/man1/bash.1") } - , ["*/man*/bash.*", ["man/man1/bash.1"]] - , ["man/man1/bash.1", ["man/man1/bash.1"]] - , ["a***c", ["abc"], null, ["abc"]] - , ["a*****?c", ["abc"], null, ["abc"]] - , ["?*****??", ["abc"], null, ["abc"]] - , ["*****??", ["abc"], null, ["abc"]] - , ["?*****?c", ["abc"], null, ["abc"]] - , ["?***?****c", ["abc"], null, ["abc"]] - , ["?***?****?", ["abc"], null, ["abc"]] - , ["?***?****", ["abc"], null, ["abc"]] - , ["*******c", ["abc"], null, ["abc"]] - , ["*******?", ["abc"], null, ["abc"]] - , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["[-abc]", ["-"], null, ["-"]] - , ["[abc-]", ["-"], null, ["-"]] - , ["\\", ["\\"], null, ["\\"]] - , ["[\\\\]", ["\\"], null, ["\\"]] - , ["[[]", ["["], null, ["["]] - , ["[", ["["], null, ["["]] - , ["[*", ["[abc"], null, ["[abc"]] - , "a right bracket shall lose its special meaning and\n" + - "represent itself in a bracket expression if it occurs\n" + - "first in the list. -- POSIX.2 2.8.3.2" - , ["[]]", ["]"], null, ["]"]] - , ["[]-]", ["]"], null, ["]"]] - , ["[a-\z]", ["p"], null, ["p"]] - , ["??**********?****?", [], { null: true }, ["abc"]] - , ["??**********?****c", [], { null: true }, ["abc"]] - , ["?************c****?****", [], { null: true }, ["abc"]] - , ["*c*?**", [], { null: true }, ["abc"]] - , ["a*****c*?**", [], { null: true }, ["abc"]] - , ["a********???*******", [], { null: true }, ["abc"]] - , ["[]", [], { null: true }, ["a"]] - , ["[abc", [], { null: true }, ["["]] - - , "nocase tests" - , ["XYZ", ["xYz"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["ab*", ["ABC"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - - // [ pattern, [matches], MM opts, files, TAP opts] - , "onestar/twostar" - , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]] - , ["{/?,*}", ["/a", "bb"], {null: true} - , ["/a", "/b/b", "/a/b/c", "bb"]] - - , "dots should not match unless requested" - , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]] - - // .. and . can only match patterns starting with ., - // even when options.dot is set. - , function () { - files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"] - } - , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}] - , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}] - , ["a/*/b", ["a/c/b"], {dot:false}] - , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}] - - - // this also tests that changing the options needs - // to change the cache key, even if the pattern is - // the same! - , ["**", ["a/b","a/.d",".a/.d"], { dot: true } - , [ ".a/.d", "a/.d", "a/b"]] - - , "paren sets cannot contain slashes" - , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]] - - // brace sets trump all else. - // - // invalid glob pattern. fails on bash4 and bsdglob. - // however, in this implementation, it's easier just - // to do the intuitive thing, and let brace-expansion - // actually come before parsing any extglob patterns, - // like the documentation seems to say. - // - // XXX: if anyone complains about this, either fix it - // or tell them to grow up and stop complaining. - // - // bash/bsdglob says this: - // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]] - // but we do this instead: - , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]] - - // test partial parsing in the presence of comment/negation chars - , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]] - , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]] - - // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped. - , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g" - , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"] - , {} - , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]] - - - // crazy nested {,,} and *(||) tests. - , function () { - files = [ "a", "b", "c", "d" - , "ab", "ac", "ad" - , "bc", "cb" - , "bc,d", "c,db", "c,d" - , "d)", "(b|c", "*(b|c" - , "b|c", "b|cc", "cb|c" - , "x(a|b|c)", "x(a|c)" - , "(a|b|c)", "(a|c)"] - } - , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]] - , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]] - // a - // *(b|c) - // *(b|d) - , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]] - , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]] - - - // test various flag settings. - , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"] - , { noext: true } ] - , ["a?b", ["x/y/acb", "acb/"], {matchBase: true} - , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ] - , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]] - - - // begin channelling Boole and deMorgan... - , "negation tests" - , function () { - files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"] - } - - // anything that is NOT a* matches. - , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]] - - // anything that IS !a* matches. - , ["!a*", ["!ab", "!abc"], {nonegate: true}] - - // anything that IS a* matches - , ["!!a*", ["a!b"]] - - // anything that is NOT !a* matches - , ["!\\!a*", ["a!b", "d", "e", "\\!a"]] - - // negation nestled within a pattern - , function () { - files = [ "foo.js" - , "foo.bar" - // can't match this one without negative lookbehind. - , "foo.js.js" - , "blar.js" - , "foo." - , "boo.js.boo" ] - } - , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ] - - // https://github.com/isaacs/minimatch/issues/5 - , function () { - files = [ 'a/b/.x/c' - , 'a/b/.x/c/d' - , 'a/b/.x/c/d/e' - , 'a/b/.x' - , 'a/b/.x/' - , 'a/.x/b' - , '.x' - , '.x/' - , '.x/a' - , '.x/a/b' - , 'a/.x/b/.x/c' - , '.x/.x' ] - } - , ["**/.x/**", [ '.x/' - , '.x/a' - , '.x/a/b' - , 'a/.x/b' - , 'a/b/.x/' - , 'a/b/.x/c' - , 'a/b/.x/c/d' - , 'a/b/.x/c/d/e' ] ] - - ] - -var regexps = - [ '/^(?:(?=.)a[^/]*?)$/', - '/^(?:(?=.)X[^/]*?)$/', - '/^(?:(?=.)X[^/]*?)$/', - '/^(?:\\*)$/', - '/^(?:(?=.)\\*[^/]*?)$/', - '/^(?:\\*\\*)$/', - '/^(?:(?=.)b[^/]*?\\/)$/', - '/^(?:(?=.)c[^/]*?)$/', - '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/', - '/^(?:\\.\\.\\/(?!\\.)(?=.)[^/]*?\\/)$/', - '/^(?:s\\/(?=.)\\.\\.[^/]*?\\/)$/', - '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/1\\/)$/', - '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/\u0001\\/)$/', - '/^(?:(?!\\.)(?=.)[a-c]b[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[a-y][^/]*?[^c])$/', - '/^(?:(?=.)a[^/]*?[^c])$/', - '/^(?:(?=.)a[X-]b)$/', - '/^(?:(?!\\.)(?=.)[^a-c][^/]*?)$/', - '/^(?:a\\*b\\/(?!\\.)(?=.)[^/]*?)$/', - '/^(?:(?=.)a\\*[^/]\\/(?!\\.)(?=.)[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\\\\\![^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\![^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\.\\*)$/', - '/^(?:(?=.)a[b]c)$/', - '/^(?:(?=.)a[b]c)$/', - '/^(?:(?=.)a[^/]c)$/', - '/^(?:a\\*c)$/', - 'false', - '/^(?:(?!\\.)(?=.)[^/]*?\\/(?=.)man[^/]*?\\/(?=.)bash\\.[^/]*?)$/', - '/^(?:man\\/man1\\/bash\\.1)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?c)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/', - '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c)$/', - '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/])$/', - '/^(?:(?=.)a[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k[^/]*?[^/]*?[^/]*?)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?k)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?k[^/]*?[^/]*?)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[-abc])$/', - '/^(?:(?!\\.)(?=.)[abc-])$/', - '/^(?:\\\\)$/', - '/^(?:(?!\\.)(?=.)[\\\\])$/', - '/^(?:(?!\\.)(?=.)[\\[])$/', - '/^(?:\\[)$/', - '/^(?:(?=.)\\[(?!\\.)(?=.)[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[\\]])$/', - '/^(?:(?!\\.)(?=.)[\\]-])$/', - '/^(?:(?!\\.)(?=.)[a-z])$/', - '/^(?:(?!\\.)(?=.)[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/', - '/^(?:(?!\\.)(?=.)[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?c[^/]*?[^/][^/]*?[^/]*?)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/][^/]*?[^/]*?)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?)$/', - '/^(?:\\[\\])$/', - '/^(?:\\[abc)$/', - '/^(?:(?=.)XYZ)$/i', - '/^(?:(?=.)ab[^/]*?)$/i', - '/^(?:(?!\\.)(?=.)[ia][^/][ck])$/i', - '/^(?:\\/(?!\\.)(?=.)[^/]*?|(?!\\.)(?=.)[^/]*?)$/', - '/^(?:\\/(?!\\.)(?=.)[^/]|(?!\\.)(?=.)[^/]*?)$/', - '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/', - '/^(?:a\\/(?!(?:^|\\/)\\.{1,2}(?:$|\\/))(?=.)[^/]*?\\/b)$/', - '/^(?:a\\/(?=.)\\.[^/]*?\\/b)$/', - '/^(?:a\\/(?!\\.)(?=.)[^/]*?\\/b)$/', - '/^(?:a\\/(?=.)\\.[^/]*?\\/b)$/', - '/^(?:(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\/b\\))$/', - '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/', - '/^(?:(?=.)\\[(?=.)\\!a[^/]*?)$/', - '/^(?:(?=.)\\[(?=.)#a[^/]*?)$/', - '/^(?:(?=.)\\+\\(a\\|[^/]*?\\|c\\\\\\\\\\|d\\\\\\\\\\|e\\\\\\\\\\\\\\\\\\|f\\\\\\\\\\\\\\\\\\|g)$/', - '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/', - '/^(?:a|(?!\\.)(?=.)[^/]*?\\(b\\|c|d\\))$/', - '/^(?:a|(?!\\.)(?=.)(?:b|c)*|(?!\\.)(?=.)(?:b|d)*)$/', - '/^(?:(?!\\.)(?=.)(?:a|b|c)*|(?!\\.)(?=.)(?:a|c)*)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\|b\\|c\\)|(?!\\.)(?=.)[^/]*?\\(a\\|c\\))$/', - '/^(?:(?=.)a[^/]b)$/', - '/^(?:(?=.)#[^/]*?)$/', - '/^(?!^(?:(?=.)a[^/]*?)$).*$/', - '/^(?:(?=.)\\!a[^/]*?)$/', - '/^(?:(?=.)a[^/]*?)$/', - '/^(?!^(?:(?=.)\\!a[^/]*?)$).*$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\.(?:(?!js)[^/]*?))$/', - '/^(?:(?:(?!(?:\\/|^)\\.).)*?\\/\\.x\\/(?:(?!(?:\\/|^)\\.).)*?)$/' ] -var re = 0; - -tap.test("basic tests", function (t) { - var start = Date.now() - - // [ pattern, [matches], MM opts, files, TAP opts] - patterns.forEach(function (c) { - if (typeof c === "function") return c() - if (typeof c === "string") return t.comment(c) - - var pattern = c[0] - , expect = c[1].sort(alpha) - , options = c[2] || {} - , f = c[3] || files - , tapOpts = c[4] || {} - - // options.debug = true - var m = new mm.Minimatch(pattern, options) - var r = m.makeRe() - var expectRe = regexps[re++] - tapOpts.re = String(r) || JSON.stringify(r) - tapOpts.files = JSON.stringify(f) - tapOpts.pattern = pattern - tapOpts.set = m.set - tapOpts.negated = m.negate - - var actual = mm.match(f, pattern, options) - actual.sort(alpha) - - t.equivalent( actual, expect - , JSON.stringify(pattern) + " " + JSON.stringify(expect) - , tapOpts ) - - t.equal(tapOpts.re, expectRe, tapOpts) - }) - - t.comment("time=" + (Date.now() - start) + "ms") - t.end() -}) - -tap.test("global leak test", function (t) { - var globalAfter = Object.keys(global) - t.equivalent(globalAfter, globalBefore, "no new globals, please") - t.end() -}) - -function alpha (a, b) { - return a > b ? 1 : -1 -} diff --git a/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/brace-expand.js b/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/brace-expand.js deleted file mode 100644 index 7ee278a2..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/brace-expand.js +++ /dev/null @@ -1,33 +0,0 @@ -var tap = require("tap") - , minimatch = require("../") - -tap.test("brace expansion", function (t) { - // [ pattern, [expanded] ] - ; [ [ "a{b,c{d,e},{f,g}h}x{y,z}" - , [ "abxy" - , "abxz" - , "acdxy" - , "acdxz" - , "acexy" - , "acexz" - , "afhxy" - , "afhxz" - , "aghxy" - , "aghxz" ] ] - , [ "a{1..5}b" - , [ "a1b" - , "a2b" - , "a3b" - , "a4b" - , "a5b" ] ] - , [ "a{b}c", ["a{b}c"] ] - ].forEach(function (tc) { - var p = tc[0] - , expect = tc[1] - t.equivalent(minimatch.braceExpand(p), expect, p) - }) - console.error("ending") - t.end() -}) - - diff --git a/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/caching.js b/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/caching.js deleted file mode 100644 index 0fec4b0f..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/caching.js +++ /dev/null @@ -1,14 +0,0 @@ -var Minimatch = require("../minimatch.js").Minimatch -var tap = require("tap") -tap.test("cache test", function (t) { - var mm1 = new Minimatch("a?b") - var mm2 = new Minimatch("a?b") - t.equal(mm1, mm2, "should get the same object") - // the lru should drop it after 100 entries - for (var i = 0; i < 100; i ++) { - new Minimatch("a"+i) - } - mm2 = new Minimatch("a?b") - t.notEqual(mm1, mm2, "cache should have dropped") - t.end() -}) diff --git a/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/defaults.js b/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/defaults.js deleted file mode 100644 index 25f1f601..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/defaults.js +++ /dev/null @@ -1,274 +0,0 @@ -// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test -// -// TODO: Some of these tests do very bad things with backslashes, and will -// most likely fail badly on windows. They should probably be skipped. - -var tap = require("tap") - , globalBefore = Object.keys(global) - , mm = require("../") - , files = [ "a", "b", "c", "d", "abc" - , "abd", "abe", "bb", "bcd" - , "ca", "cb", "dd", "de" - , "bdir/", "bdir/cfile"] - , next = files.concat([ "a-b", "aXb" - , ".x", ".y" ]) - -tap.test("basic tests", function (t) { - var start = Date.now() - - // [ pattern, [matches], MM opts, files, TAP opts] - ; [ "http://www.bashcookbook.com/bashinfo" + - "/source/bash-1.14.7/tests/glob-test" - , ["a*", ["a", "abc", "abd", "abe"]] - , ["X*", ["X*"], {nonull: true}] - - // allow null glob expansion - , ["X*", []] - - // isaacs: Slightly different than bash/sh/ksh - // \\* is not un-escaped to literal "*" in a failed match, - // but it does make it get treated as a literal star - , ["\\*", ["\\*"], {nonull: true}] - , ["\\**", ["\\**"], {nonull: true}] - , ["\\*\\*", ["\\*\\*"], {nonull: true}] - - , ["b*/", ["bdir/"]] - , ["c*", ["c", "ca", "cb"]] - , ["**", files] - - , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}] - , ["s/\\..*//", ["s/\\..*//"], {nonull: true}] - - , "legendary larry crashes bashes" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}] - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}] - - , "character classes" - , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]] - , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd", - "bdir/", "ca", "cb", "dd", "de"]] - , ["a*[^c]", ["abd", "abe"]] - , function () { files.push("a-b", "aXb") } - , ["a[X-]b", ["a-b", "aXb"]] - , function () { files.push(".x", ".y") } - , ["[^a-c]*", ["d", "dd", "de"]] - , function () { files.push("a*b/", "a*b/ooo") } - , ["a\\*b/*", ["a*b/ooo"]] - , ["a\\*?/*", ["a*b/ooo"]] - , ["*\\\\!*", [], {null: true}, ["echo !7"]] - , ["*\\!*", ["echo !7"], null, ["echo !7"]] - , ["*.\\*", ["r.*"], null, ["r.*"]] - , ["a[b]c", ["abc"]] - , ["a[\\b]c", ["abc"]] - , ["a?c", ["abc"]] - , ["a\\*c", [], {null: true}, ["abc"]] - , ["", [""], { null: true }, [""]] - - , "http://www.opensource.apple.com/source/bash/bash-23/" + - "bash/tests/glob-test" - , function () { files.push("man/", "man/man1/", "man/man1/bash.1") } - , ["*/man*/bash.*", ["man/man1/bash.1"]] - , ["man/man1/bash.1", ["man/man1/bash.1"]] - , ["a***c", ["abc"], null, ["abc"]] - , ["a*****?c", ["abc"], null, ["abc"]] - , ["?*****??", ["abc"], null, ["abc"]] - , ["*****??", ["abc"], null, ["abc"]] - , ["?*****?c", ["abc"], null, ["abc"]] - , ["?***?****c", ["abc"], null, ["abc"]] - , ["?***?****?", ["abc"], null, ["abc"]] - , ["?***?****", ["abc"], null, ["abc"]] - , ["*******c", ["abc"], null, ["abc"]] - , ["*******?", ["abc"], null, ["abc"]] - , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["[-abc]", ["-"], null, ["-"]] - , ["[abc-]", ["-"], null, ["-"]] - , ["\\", ["\\"], null, ["\\"]] - , ["[\\\\]", ["\\"], null, ["\\"]] - , ["[[]", ["["], null, ["["]] - , ["[", ["["], null, ["["]] - , ["[*", ["[abc"], null, ["[abc"]] - , "a right bracket shall lose its special meaning and\n" + - "represent itself in a bracket expression if it occurs\n" + - "first in the list. -- POSIX.2 2.8.3.2" - , ["[]]", ["]"], null, ["]"]] - , ["[]-]", ["]"], null, ["]"]] - , ["[a-\z]", ["p"], null, ["p"]] - , ["??**********?****?", [], { null: true }, ["abc"]] - , ["??**********?****c", [], { null: true }, ["abc"]] - , ["?************c****?****", [], { null: true }, ["abc"]] - , ["*c*?**", [], { null: true }, ["abc"]] - , ["a*****c*?**", [], { null: true }, ["abc"]] - , ["a********???*******", [], { null: true }, ["abc"]] - , ["[]", [], { null: true }, ["a"]] - , ["[abc", [], { null: true }, ["["]] - - , "nocase tests" - , ["XYZ", ["xYz"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["ab*", ["ABC"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - - // [ pattern, [matches], MM opts, files, TAP opts] - , "onestar/twostar" - , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]] - , ["{/?,*}", ["/a", "bb"], {null: true} - , ["/a", "/b/b", "/a/b/c", "bb"]] - - , "dots should not match unless requested" - , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]] - - // .. and . can only match patterns starting with ., - // even when options.dot is set. - , function () { - files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"] - } - , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}] - , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}] - , ["a/*/b", ["a/c/b"], {dot:false}] - , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}] - - - // this also tests that changing the options needs - // to change the cache key, even if the pattern is - // the same! - , ["**", ["a/b","a/.d",".a/.d"], { dot: true } - , [ ".a/.d", "a/.d", "a/b"]] - - , "paren sets cannot contain slashes" - , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]] - - // brace sets trump all else. - // - // invalid glob pattern. fails on bash4 and bsdglob. - // however, in this implementation, it's easier just - // to do the intuitive thing, and let brace-expansion - // actually come before parsing any extglob patterns, - // like the documentation seems to say. - // - // XXX: if anyone complains about this, either fix it - // or tell them to grow up and stop complaining. - // - // bash/bsdglob says this: - // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]] - // but we do this instead: - , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]] - - // test partial parsing in the presence of comment/negation chars - , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]] - , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]] - - // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped. - , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g" - , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"] - , {} - , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]] - - - // crazy nested {,,} and *(||) tests. - , function () { - files = [ "a", "b", "c", "d" - , "ab", "ac", "ad" - , "bc", "cb" - , "bc,d", "c,db", "c,d" - , "d)", "(b|c", "*(b|c" - , "b|c", "b|cc", "cb|c" - , "x(a|b|c)", "x(a|c)" - , "(a|b|c)", "(a|c)"] - } - , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]] - , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]] - // a - // *(b|c) - // *(b|d) - , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]] - , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]] - - - // test various flag settings. - , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"] - , { noext: true } ] - , ["a?b", ["x/y/acb", "acb/"], {matchBase: true} - , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ] - , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]] - - - // begin channelling Boole and deMorgan... - , "negation tests" - , function () { - files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"] - } - - // anything that is NOT a* matches. - , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]] - - // anything that IS !a* matches. - , ["!a*", ["!ab", "!abc"], {nonegate: true}] - - // anything that IS a* matches - , ["!!a*", ["a!b"]] - - // anything that is NOT !a* matches - , ["!\\!a*", ["a!b", "d", "e", "\\!a"]] - - // negation nestled within a pattern - , function () { - files = [ "foo.js" - , "foo.bar" - // can't match this one without negative lookbehind. - , "foo.js.js" - , "blar.js" - , "foo." - , "boo.js.boo" ] - } - , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ] - - ].forEach(function (c) { - if (typeof c === "function") return c() - if (typeof c === "string") return t.comment(c) - - var pattern = c[0] - , expect = c[1].sort(alpha) - , options = c[2] || {} - , f = c[3] || files - , tapOpts = c[4] || {} - - // options.debug = true - var Class = mm.defaults(options).Minimatch - var m = new Class(pattern, {}) - var r = m.makeRe() - tapOpts.re = String(r) || JSON.stringify(r) - tapOpts.files = JSON.stringify(f) - tapOpts.pattern = pattern - tapOpts.set = m.set - tapOpts.negated = m.negate - - var actual = mm.match(f, pattern, options) - actual.sort(alpha) - - t.equivalent( actual, expect - , JSON.stringify(pattern) + " " + JSON.stringify(expect) - , tapOpts ) - }) - - t.comment("time=" + (Date.now() - start) + "ms") - t.end() -}) - -tap.test("global leak test", function (t) { - var globalAfter = Object.keys(global) - t.equivalent(globalAfter, globalBefore, "no new globals, please") - t.end() -}) - -function alpha (a, b) { - return a > b ? 1 : -1 -} diff --git a/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js b/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js deleted file mode 100644 index 6676e262..00000000 --- a/node_modules/mocha/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js +++ /dev/null @@ -1,8 +0,0 @@ -var test = require('tap').test -var minimatch = require('../') - -test('extglob ending with statechar', function(t) { - t.notOk(minimatch('ax', 'a?(b*)')) - t.ok(minimatch('ax', '?(a*|b)')) - t.end() -}) diff --git a/node_modules/mocha/node_modules/glob/package.json b/node_modules/mocha/node_modules/glob/package.json deleted file mode 100644 index bfbbbcca..00000000 --- a/node_modules/mocha/node_modules/glob/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "name": "glob", - "description": "a little globber", - "version": "3.2.3", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-glob.git" - }, - "main": "glob.js", - "engines": { - "node": "*" - }, - "dependencies": { - "minimatch": "~0.2.11", - "graceful-fs": "~2.0.0", - "inherits": "2" - }, - "devDependencies": { - "tap": "~0.4.0", - "mkdirp": "0", - "rimraf": "1" - }, - "scripts": { - "test": "tap test/*.js" - }, - "license": "BSD", - "readme": "# Glob\n\nMatch files using the patterns the shell uses, like stars and stuff.\n\nThis is a glob implementation in JavaScript. It uses the `minimatch`\nlibrary to do its matching.\n\n## Attention: node-glob users!\n\nThe API has changed dramatically between 2.x and 3.x. This library is\nnow 100% JavaScript, and the integer flags have been replaced with an\noptions object.\n\nAlso, there's an event emitter class, proper tests, and all the other\nthings you've come to expect from node modules.\n\nAnd best of all, no compilation!\n\n## Usage\n\n```javascript\nvar glob = require(\"glob\")\n\n// options is optional\nglob(\"**/*.js\", options, function (er, files) {\n // files is an array of filenames.\n // If the `nonull` option is set, and nothing\n // was found, then files is [\"**/*.js\"]\n // er is an error object or null.\n})\n```\n\n## Features\n\nPlease see the [minimatch\ndocumentation](https://github.com/isaacs/minimatch) for more details.\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n* [minimatch documentation](https://github.com/isaacs/minimatch)\n\n## glob(pattern, [options], cb)\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* `cb` {Function}\n * `err` {Error | null}\n * `matches` {Array} filenames found matching the pattern\n\nPerform an asynchronous glob search.\n\n## glob.sync(pattern, [options])\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* return: {Array} filenames found matching the pattern\n\nPerform a synchronous glob search.\n\n## Class: glob.Glob\n\nCreate a Glob object by instanting the `glob.Glob` class.\n\n```javascript\nvar Glob = require(\"glob\").Glob\nvar mg = new Glob(pattern, options, cb)\n```\n\nIt's an EventEmitter, and starts walking the filesystem to find matches\nimmediately.\n\n### new glob.Glob(pattern, [options], [cb])\n\n* `pattern` {String} pattern to search for\n* `options` {Object}\n* `cb` {Function} Called when an error occurs, or matches are found\n * `err` {Error | null}\n * `matches` {Array} filenames found matching the pattern\n\nNote that if the `sync` flag is set in the options, then matches will\nbe immediately available on the `g.found` member.\n\n### Properties\n\n* `minimatch` The minimatch object that the glob uses.\n* `options` The options object passed in.\n* `error` The error encountered. When an error is encountered, the\n glob object is in an undefined state, and should be discarded.\n* `aborted` Boolean which is set to true when calling `abort()`. There\n is no way at this time to continue a glob search after aborting, but\n you can re-use the statCache to avoid having to duplicate syscalls.\n* `statCache` Collection of all the stat results the glob search\n performed.\n* `cache` Convenience object. Each field has the following possible\n values:\n * `false` - Path does not exist\n * `true` - Path exists\n * `1` - Path exists, and is not a directory\n * `2` - Path exists, and is a directory\n * `[file, entries, ...]` - Path exists, is a directory, and the\n array value is the results of `fs.readdir`\n\n### Events\n\n* `end` When the matching is finished, this is emitted with all the\n matches found. If the `nonull` option is set, and no match was found,\n then the `matches` list contains the original pattern. The matches\n are sorted, unless the `nosort` flag is set.\n* `match` Every time a match is found, this is emitted with the matched.\n* `error` Emitted when an unexpected error is encountered, or whenever\n any fs error occurs if `options.strict` is set.\n* `abort` When `abort()` is called, this event is raised.\n\n### Methods\n\n* `abort` Stop the search.\n\n### Options\n\nAll the options that can be passed to Minimatch can also be passed to\nGlob to change pattern matching behavior. Also, some have been added,\nor have glob-specific ramifications.\n\nAll options are false by default, unless otherwise noted.\n\nAll options are added to the glob object, as well.\n\n* `cwd` The current working directory in which to search. Defaults\n to `process.cwd()`.\n* `root` The place where patterns starting with `/` will be mounted\n onto. Defaults to `path.resolve(options.cwd, \"/\")` (`/` on Unix\n systems, and `C:\\` or some such on Windows.)\n* `dot` Include `.dot` files in normal matches and `globstar` matches.\n Note that an explicit dot in a portion of the pattern will always\n match dot files.\n* `nomount` By default, a pattern starting with a forward-slash will be\n \"mounted\" onto the root setting, so that a valid filesystem path is\n returned. Set this flag to disable that behavior.\n* `mark` Add a `/` character to directory matches. Note that this\n requires additional stat calls.\n* `nosort` Don't sort the results.\n* `stat` Set to true to stat *all* results. This reduces performance\n somewhat, and is completely unnecessary, unless `readdir` is presumed\n to be an untrustworthy indicator of file existence. It will cause\n ELOOP to be triggered one level sooner in the case of cyclical\n symbolic links.\n* `silent` When an unusual error is encountered\n when attempting to read a directory, a warning will be printed to\n stderr. Set the `silent` option to true to suppress these warnings.\n* `strict` When an unusual error is encountered\n when attempting to read a directory, the process will just continue on\n in search of other matches. Set the `strict` option to raise an error\n in these cases.\n* `cache` See `cache` property above. Pass in a previously generated\n cache object to save some fs calls.\n* `statCache` A cache of results of filesystem information, to prevent\n unnecessary stat calls. While it should not normally be necessary to\n set this, you may pass the statCache from one glob() call to the\n options object of another, if you know that the filesystem will not\n change between calls. (See \"Race Conditions\" below.)\n* `sync` Perform a synchronous glob search.\n* `nounique` In some cases, brace-expanded patterns can result in the\n same file showing up multiple times in the result set. By default,\n this implementation prevents duplicates in the result set.\n Set this flag to disable that behavior.\n* `nonull` Set to never return an empty set, instead returning a set\n containing the pattern itself. This is the default in glob(3).\n* `nocase` Perform a case-insensitive match. Note that case-insensitive\n filesystems will sometimes result in glob returning results that are\n case-insensitively matched anyway, since readdir and stat will not\n raise an error.\n* `debug` Set to enable debug logging in minimatch and glob.\n* `globDebug` Set to enable debug logging in glob, but not minimatch.\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between node-glob and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen glob returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`glob.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n## Windows\n\n**Please only use forward-slashes in glob expressions.**\n\nThough windows uses either `/` or `\\` as its path separator, only `/`\ncharacters are used by this glob implementation. You must use\nforward-slashes **only** in glob expressions. Back-slashes will always\nbe interpreted as escape characters, not path separators.\n\nResults from absolute patterns such as `/foo/*` are mounted onto the\nroot setting using `path.join`. On windows, this will by default result\nin `/foo/*` matching `C:\\foo\\bar.txt`.\n\n## Race Conditions\n\nGlob searching, by its very nature, is susceptible to race conditions,\nsince it relies on directory walking and such.\n\nAs a result, it is possible that a file that exists when glob looks for\nit may have been deleted or modified by the time it returns the result.\n\nAs part of its internal implementation, this program caches all stat\nand readdir calls that it makes, in order to cut down on system\noverhead. However, this also makes it even more susceptible to races,\nespecially if the cache or statCache objects are reused between glob\ncalls.\n\nUsers are thus advised not to use a glob result as a guarantee of\nfilesystem state in the face of rapid changes. For the vast majority\nof operations, this is never a problem.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/node-glob/issues" - }, - "homepage": "https://github.com/isaacs/node-glob", - "_id": "glob@3.2.3", - "_from": "glob@3.2.3" -} diff --git a/node_modules/mocha/node_modules/glob/test/00-setup.js b/node_modules/mocha/node_modules/glob/test/00-setup.js deleted file mode 100644 index 245afafd..00000000 --- a/node_modules/mocha/node_modules/glob/test/00-setup.js +++ /dev/null @@ -1,176 +0,0 @@ -// just a little pre-run script to set up the fixtures. -// zz-finish cleans it up - -var mkdirp = require("mkdirp") -var path = require("path") -var i = 0 -var tap = require("tap") -var fs = require("fs") -var rimraf = require("rimraf") - -var files = -[ "a/.abcdef/x/y/z/a" -, "a/abcdef/g/h" -, "a/abcfed/g/h" -, "a/b/c/d" -, "a/bc/e/f" -, "a/c/d/c/b" -, "a/cb/e/f" -] - -var symlinkTo = path.resolve(__dirname, "a/symlink/a/b/c") -var symlinkFrom = "../.." - -files = files.map(function (f) { - return path.resolve(__dirname, f) -}) - -tap.test("remove fixtures", function (t) { - rimraf(path.resolve(__dirname, "a"), function (er) { - t.ifError(er, "remove fixtures") - t.end() - }) -}) - -files.forEach(function (f) { - tap.test(f, function (t) { - var d = path.dirname(f) - mkdirp(d, 0755, function (er) { - if (er) { - t.fail(er) - return t.bailout() - } - fs.writeFile(f, "i like tests", function (er) { - t.ifError(er, "make file") - t.end() - }) - }) - }) -}) - -if (process.platform !== "win32") { - tap.test("symlinky", function (t) { - var d = path.dirname(symlinkTo) - console.error("mkdirp", d) - mkdirp(d, 0755, function (er) { - t.ifError(er) - fs.symlink(symlinkFrom, symlinkTo, "dir", function (er) { - t.ifError(er, "make symlink") - t.end() - }) - }) - }) -} - -;["foo","bar","baz","asdf","quux","qwer","rewq"].forEach(function (w) { - w = "/tmp/glob-test/" + w - tap.test("create " + w, function (t) { - mkdirp(w, function (er) { - if (er) - throw er - t.pass(w) - t.end() - }) - }) -}) - - -// generate the bash pattern test-fixtures if possible -if (process.platform === "win32" || !process.env.TEST_REGEN) { - console.error("Windows, or TEST_REGEN unset. Using cached fixtures.") - return -} - -var spawn = require("child_process").spawn; -var globs = - // put more patterns here. - // anything that would be directly in / should be in /tmp/glob-test - ["test/a/*/+(c|g)/./d" - ,"test/a/**/[cg]/../[cg]" - ,"test/a/{b,c,d,e,f}/**/g" - ,"test/a/b/**" - ,"test/**/g" - ,"test/a/abc{fed,def}/g/h" - ,"test/a/abc{fed/g,def}/**/" - ,"test/a/abc{fed/g,def}/**///**/" - ,"test/**/a/**/" - ,"test/+(a|b|c)/a{/,bc*}/**" - ,"test/*/*/*/f" - ,"test/**/f" - ,"test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**" - ,"{./*/*,/tmp/glob-test/*}" - ,"{/tmp/glob-test/*,*}" // evil owl face! how you taunt me! - ,"test/a/!(symlink)/**" - ] -var bashOutput = {} -var fs = require("fs") - -globs.forEach(function (pattern) { - tap.test("generate fixture " + pattern, function (t) { - var cmd = "shopt -s globstar && " + - "shopt -s extglob && " + - "shopt -s nullglob && " + - // "shopt >&2; " + - "eval \'for i in " + pattern + "; do echo $i; done\'" - var cp = spawn("bash", ["-c", cmd], { cwd: path.dirname(__dirname) }) - var out = [] - cp.stdout.on("data", function (c) { - out.push(c) - }) - cp.stderr.pipe(process.stderr) - cp.on("close", function (code) { - out = flatten(out) - if (!out) - out = [] - else - out = cleanResults(out.split(/\r*\n/)) - - bashOutput[pattern] = out - t.notOk(code, "bash test should finish nicely") - t.end() - }) - }) -}) - -tap.test("save fixtures", function (t) { - var fname = path.resolve(__dirname, "bash-results.json") - var data = JSON.stringify(bashOutput, null, 2) + "\n" - fs.writeFile(fname, data, function (er) { - t.ifError(er) - t.end() - }) -}) - -function cleanResults (m) { - // normalize discrepancies in ordering, duplication, - // and ending slashes. - return m.map(function (m) { - return m.replace(/\/+/g, "/").replace(/\/$/, "") - }).sort(alphasort).reduce(function (set, f) { - if (f !== set[set.length - 1]) set.push(f) - return set - }, []).sort(alphasort).map(function (f) { - // de-windows - return (process.platform !== 'win32') ? f - : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/') - }) -} - -function flatten (chunks) { - var s = 0 - chunks.forEach(function (c) { s += c.length }) - var out = new Buffer(s) - s = 0 - chunks.forEach(function (c) { - c.copy(out, s) - s += c.length - }) - - return out.toString().trim() -} - -function alphasort (a, b) { - a = a.toLowerCase() - b = b.toLowerCase() - return a > b ? 1 : a < b ? -1 : 0 -} diff --git a/node_modules/mocha/node_modules/glob/test/bash-comparison.js b/node_modules/mocha/node_modules/glob/test/bash-comparison.js deleted file mode 100644 index 239ed1a9..00000000 --- a/node_modules/mocha/node_modules/glob/test/bash-comparison.js +++ /dev/null @@ -1,63 +0,0 @@ -// basic test -// show that it does the same thing by default as the shell. -var tap = require("tap") -, child_process = require("child_process") -, bashResults = require("./bash-results.json") -, globs = Object.keys(bashResults) -, glob = require("../") -, path = require("path") - -// run from the root of the project -// this is usually where you're at anyway, but be sure. -process.chdir(path.resolve(__dirname, "..")) - -function alphasort (a, b) { - a = a.toLowerCase() - b = b.toLowerCase() - return a > b ? 1 : a < b ? -1 : 0 -} - -globs.forEach(function (pattern) { - var expect = bashResults[pattern] - // anything regarding the symlink thing will fail on windows, so just skip it - if (process.platform === "win32" && - expect.some(function (m) { - return /\/symlink\//.test(m) - })) - return - - tap.test(pattern, function (t) { - glob(pattern, function (er, matches) { - if (er) - throw er - - // sort and unmark, just to match the shell results - matches = cleanResults(matches) - - t.deepEqual(matches, expect, pattern) - t.end() - }) - }) - - tap.test(pattern + " sync", function (t) { - var matches = cleanResults(glob.sync(pattern)) - - t.deepEqual(matches, expect, "should match shell") - t.end() - }) -}) - -function cleanResults (m) { - // normalize discrepancies in ordering, duplication, - // and ending slashes. - return m.map(function (m) { - return m.replace(/\/+/g, "/").replace(/\/$/, "") - }).sort(alphasort).reduce(function (set, f) { - if (f !== set[set.length - 1]) set.push(f) - return set - }, []).sort(alphasort).map(function (f) { - // de-windows - return (process.platform !== 'win32') ? f - : f.replace(/^[a-zA-Z]:[\/\\]+/, '/').replace(/[\\\/]+/g, '/') - }) -} diff --git a/node_modules/mocha/node_modules/glob/test/bash-results.json b/node_modules/mocha/node_modules/glob/test/bash-results.json deleted file mode 100644 index a9bc347d..00000000 --- a/node_modules/mocha/node_modules/glob/test/bash-results.json +++ /dev/null @@ -1,350 +0,0 @@ -{ - "test/a/*/+(c|g)/./d": [ - "test/a/b/c/./d" - ], - "test/a/**/[cg]/../[cg]": [ - "test/a/abcdef/g/../g", - "test/a/abcfed/g/../g", - "test/a/b/c/../c", - "test/a/c/../c", - "test/a/c/d/c/../c", - "test/a/symlink/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c" - ], - "test/a/{b,c,d,e,f}/**/g": [], - "test/a/b/**": [ - "test/a/b", - "test/a/b/c", - "test/a/b/c/d" - ], - "test/**/g": [ - "test/a/abcdef/g", - "test/a/abcfed/g" - ], - "test/a/abc{fed,def}/g/h": [ - "test/a/abcdef/g/h", - "test/a/abcfed/g/h" - ], - "test/a/abc{fed/g,def}/**/": [ - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcfed/g" - ], - "test/a/abc{fed/g,def}/**///**/": [ - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcfed/g" - ], - "test/**/a/**/": [ - "test/a", - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcfed", - "test/a/abcfed/g", - "test/a/b", - "test/a/b/c", - "test/a/bc", - "test/a/bc/e", - "test/a/c", - "test/a/c/d", - "test/a/c/d/c", - "test/a/cb", - "test/a/cb/e", - "test/a/symlink", - "test/a/symlink/a", - "test/a/symlink/a/b", - "test/a/symlink/a/b/c", - "test/a/symlink/a/b/c/a", - "test/a/symlink/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b" - ], - "test/+(a|b|c)/a{/,bc*}/**": [ - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcdef/g/h", - "test/a/abcfed", - "test/a/abcfed/g", - "test/a/abcfed/g/h" - ], - "test/*/*/*/f": [ - "test/a/bc/e/f", - "test/a/cb/e/f" - ], - "test/**/f": [ - "test/a/bc/e/f", - "test/a/cb/e/f" - ], - "test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**": [ - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c" - ], - "{./*/*,/tmp/glob-test/*}": [ - "./examples/g.js", - "./examples/usr-local.js", - "./node_modules/graceful-fs", - "./node_modules/inherits", - "./node_modules/minimatch", - "./node_modules/mkdirp", - "./node_modules/rimraf", - "./node_modules/tap", - "./test/00-setup.js", - "./test/a", - "./test/bash-comparison.js", - "./test/bash-results.json", - "./test/cwd-test.js", - "./test/globstar-match.js", - "./test/mark.js", - "./test/nocase-nomagic.js", - "./test/pause-resume.js", - "./test/root-nomount.js", - "./test/root.js", - "./test/stat.js", - "./test/zz-cleanup.js", - "/tmp/glob-test/asdf", - "/tmp/glob-test/bar", - "/tmp/glob-test/baz", - "/tmp/glob-test/foo", - "/tmp/glob-test/quux", - "/tmp/glob-test/qwer", - "/tmp/glob-test/rewq" - ], - "{/tmp/glob-test/*,*}": [ - "/tmp/glob-test/asdf", - "/tmp/glob-test/bar", - "/tmp/glob-test/baz", - "/tmp/glob-test/foo", - "/tmp/glob-test/quux", - "/tmp/glob-test/qwer", - "/tmp/glob-test/rewq", - "examples", - "glob.js", - "LICENSE", - "node_modules", - "package.json", - "README.md", - "test" - ], - "test/a/!(symlink)/**": [ - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcdef/g/h", - "test/a/abcfed", - "test/a/abcfed/g", - "test/a/abcfed/g/h", - "test/a/b", - "test/a/b/c", - "test/a/b/c/d", - "test/a/bc", - "test/a/bc/e", - "test/a/bc/e/f", - "test/a/c", - "test/a/c/d", - "test/a/c/d/c", - "test/a/c/d/c/b", - "test/a/cb", - "test/a/cb/e", - "test/a/cb/e/f" - ] -} diff --git a/node_modules/mocha/node_modules/glob/test/cwd-test.js b/node_modules/mocha/node_modules/glob/test/cwd-test.js deleted file mode 100644 index 352c27ef..00000000 --- a/node_modules/mocha/node_modules/glob/test/cwd-test.js +++ /dev/null @@ -1,55 +0,0 @@ -var tap = require("tap") - -var origCwd = process.cwd() -process.chdir(__dirname) - -tap.test("changing cwd and searching for **/d", function (t) { - var glob = require('../') - var path = require('path') - t.test('.', function (t) { - glob('**/d', function (er, matches) { - t.ifError(er) - t.like(matches, [ 'a/b/c/d', 'a/c/d' ]) - t.end() - }) - }) - - t.test('a', function (t) { - glob('**/d', {cwd:path.resolve('a')}, function (er, matches) { - t.ifError(er) - t.like(matches, [ 'b/c/d', 'c/d' ]) - t.end() - }) - }) - - t.test('a/b', function (t) { - glob('**/d', {cwd:path.resolve('a/b')}, function (er, matches) { - t.ifError(er) - t.like(matches, [ 'c/d' ]) - t.end() - }) - }) - - t.test('a/b/', function (t) { - glob('**/d', {cwd:path.resolve('a/b/')}, function (er, matches) { - t.ifError(er) - t.like(matches, [ 'c/d' ]) - t.end() - }) - }) - - t.test('.', function (t) { - glob('**/d', {cwd: process.cwd()}, function (er, matches) { - t.ifError(er) - t.like(matches, [ 'a/b/c/d', 'a/c/d' ]) - t.end() - }) - }) - - t.test('cd -', function (t) { - process.chdir(origCwd) - t.end() - }) - - t.end() -}) diff --git a/node_modules/mocha/node_modules/glob/test/globstar-match.js b/node_modules/mocha/node_modules/glob/test/globstar-match.js deleted file mode 100644 index 9b234fa2..00000000 --- a/node_modules/mocha/node_modules/glob/test/globstar-match.js +++ /dev/null @@ -1,19 +0,0 @@ -var Glob = require("../glob.js").Glob -var test = require('tap').test - -test('globstar should not have dupe matches', function(t) { - var pattern = 'a/**/[gh]' - var g = new Glob(pattern, { cwd: __dirname }) - var matches = [] - g.on('match', function(m) { - console.error('match %j', m) - matches.push(m) - }) - g.on('end', function(set) { - console.error('set', set) - matches = matches.sort() - set = set.sort() - t.same(matches, set, 'should have same set of matches') - t.end() - }) -}) diff --git a/node_modules/mocha/node_modules/glob/test/mark.js b/node_modules/mocha/node_modules/glob/test/mark.js deleted file mode 100644 index ed68a335..00000000 --- a/node_modules/mocha/node_modules/glob/test/mark.js +++ /dev/null @@ -1,74 +0,0 @@ -var test = require("tap").test -var glob = require('../') -process.chdir(__dirname) - -test("mark, no / on pattern", function (t) { - glob("a/*", {mark: true}, function (er, results) { - if (er) - throw er - var expect = [ 'a/abcdef/', - 'a/abcfed/', - 'a/b/', - 'a/bc/', - 'a/c/', - 'a/cb/' ] - - if (process.platform !== "win32") - expect.push('a/symlink/') - - t.same(results, expect) - t.end() - }) -}) - -test("mark=false, no / on pattern", function (t) { - glob("a/*", function (er, results) { - if (er) - throw er - var expect = [ 'a/abcdef', - 'a/abcfed', - 'a/b', - 'a/bc', - 'a/c', - 'a/cb' ] - - if (process.platform !== "win32") - expect.push('a/symlink') - t.same(results, expect) - t.end() - }) -}) - -test("mark=true, / on pattern", function (t) { - glob("a/*/", {mark: true}, function (er, results) { - if (er) - throw er - var expect = [ 'a/abcdef/', - 'a/abcfed/', - 'a/b/', - 'a/bc/', - 'a/c/', - 'a/cb/' ] - if (process.platform !== "win32") - expect.push('a/symlink/') - t.same(results, expect) - t.end() - }) -}) - -test("mark=false, / on pattern", function (t) { - glob("a/*/", function (er, results) { - if (er) - throw er - var expect = [ 'a/abcdef/', - 'a/abcfed/', - 'a/b/', - 'a/bc/', - 'a/c/', - 'a/cb/' ] - if (process.platform !== "win32") - expect.push('a/symlink/') - t.same(results, expect) - t.end() - }) -}) diff --git a/node_modules/mocha/node_modules/glob/test/nocase-nomagic.js b/node_modules/mocha/node_modules/glob/test/nocase-nomagic.js deleted file mode 100644 index d8629709..00000000 --- a/node_modules/mocha/node_modules/glob/test/nocase-nomagic.js +++ /dev/null @@ -1,113 +0,0 @@ -var fs = require('graceful-fs'); -var test = require('tap').test; -var glob = require('../'); - -test('mock fs', function(t) { - var stat = fs.stat - var statSync = fs.statSync - var readdir = fs.readdir - var readdirSync = fs.readdirSync - - function fakeStat(path) { - var ret - switch (path.toLowerCase()) { - case '/tmp': case '/tmp/': - ret = { isDirectory: function() { return true } } - break - case '/tmp/a': - ret = { isDirectory: function() { return false } } - break - } - return ret - } - - fs.stat = function(path, cb) { - var f = fakeStat(path); - if (f) { - process.nextTick(function() { - cb(null, f) - }) - } else { - stat.call(fs, path, cb) - } - } - - fs.statSync = function(path) { - return fakeStat(path) || statSync.call(fs, path) - } - - function fakeReaddir(path) { - var ret - switch (path.toLowerCase()) { - case '/tmp': case '/tmp/': - ret = [ 'a', 'A' ] - break - case '/': - ret = ['tmp', 'tMp', 'tMP', 'TMP'] - } - return ret - } - - fs.readdir = function(path, cb) { - var f = fakeReaddir(path) - if (f) - process.nextTick(function() { - cb(null, f) - }) - else - readdir.call(fs, path, cb) - } - - fs.readdirSync = function(path) { - return fakeReaddir(path) || readdirSync.call(fs, path) - } - - t.pass('mocked') - t.end() -}) - -test('nocase, nomagic', function(t) { - var n = 2 - var want = [ '/TMP/A', - '/TMP/a', - '/tMP/A', - '/tMP/a', - '/tMp/A', - '/tMp/a', - '/tmp/A', - '/tmp/a' ] - glob('/tmp/a', { nocase: true }, function(er, res) { - if (er) - throw er - t.same(res.sort(), want) - if (--n === 0) t.end() - }) - glob('/tmp/A', { nocase: true }, function(er, res) { - if (er) - throw er - t.same(res.sort(), want) - if (--n === 0) t.end() - }) -}) - -test('nocase, with some magic', function(t) { - t.plan(2) - var want = [ '/TMP/A', - '/TMP/a', - '/tMP/A', - '/tMP/a', - '/tMp/A', - '/tMp/a', - '/tmp/A', - '/tmp/a' ] - glob('/tmp/*', { nocase: true }, function(er, res) { - if (er) - throw er - t.same(res.sort(), want) - }) - glob('/tmp/*', { nocase: true }, function(er, res) { - if (er) - throw er - t.same(res.sort(), want) - }) -}) diff --git a/node_modules/mocha/node_modules/glob/test/pause-resume.js b/node_modules/mocha/node_modules/glob/test/pause-resume.js deleted file mode 100644 index e1ffbab1..00000000 --- a/node_modules/mocha/node_modules/glob/test/pause-resume.js +++ /dev/null @@ -1,73 +0,0 @@ -// show that no match events happen while paused. -var tap = require("tap") -, child_process = require("child_process") -// just some gnarly pattern with lots of matches -, pattern = "test/a/!(symlink)/**" -, bashResults = require("./bash-results.json") -, patterns = Object.keys(bashResults) -, glob = require("../") -, Glob = glob.Glob -, path = require("path") - -// run from the root of the project -// this is usually where you're at anyway, but be sure. -process.chdir(path.resolve(__dirname, "..")) - -function alphasort (a, b) { - a = a.toLowerCase() - b = b.toLowerCase() - return a > b ? 1 : a < b ? -1 : 0 -} - -function cleanResults (m) { - // normalize discrepancies in ordering, duplication, - // and ending slashes. - return m.map(function (m) { - return m.replace(/\/+/g, "/").replace(/\/$/, "") - }).sort(alphasort).reduce(function (set, f) { - if (f !== set[set.length - 1]) set.push(f) - return set - }, []).sort(alphasort).map(function (f) { - // de-windows - return (process.platform !== 'win32') ? f - : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/') - }) -} - -var globResults = [] -tap.test("use a Glob object, and pause/resume it", function (t) { - var g = new Glob(pattern) - , paused = false - , res = [] - , expect = bashResults[pattern] - - g.on("pause", function () { - console.error("pause") - }) - - g.on("resume", function () { - console.error("resume") - }) - - g.on("match", function (m) { - t.notOk(g.paused, "must not be paused") - globResults.push(m) - g.pause() - t.ok(g.paused, "must be paused") - setTimeout(g.resume.bind(g), 10) - }) - - g.on("end", function (matches) { - t.pass("reached glob end") - globResults = cleanResults(globResults) - matches = cleanResults(matches) - t.deepEqual(matches, globResults, - "end event matches should be the same as match events") - - t.deepEqual(matches, expect, - "glob matches should be the same as bash results") - - t.end() - }) -}) - diff --git a/node_modules/mocha/node_modules/glob/test/root-nomount.js b/node_modules/mocha/node_modules/glob/test/root-nomount.js deleted file mode 100644 index 3ac5979b..00000000 --- a/node_modules/mocha/node_modules/glob/test/root-nomount.js +++ /dev/null @@ -1,39 +0,0 @@ -var tap = require("tap") - -var origCwd = process.cwd() -process.chdir(__dirname) - -tap.test("changing root and searching for /b*/**", function (t) { - var glob = require('../') - var path = require('path') - t.test('.', function (t) { - glob('/b*/**', { globDebug: true, root: '.', nomount: true }, function (er, matches) { - t.ifError(er) - t.like(matches, []) - t.end() - }) - }) - - t.test('a', function (t) { - glob('/b*/**', { globDebug: true, root: path.resolve('a'), nomount: true }, function (er, matches) { - t.ifError(er) - t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ]) - t.end() - }) - }) - - t.test('root=a, cwd=a/b', function (t) { - glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b'), nomount: true }, function (er, matches) { - t.ifError(er) - t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ]) - t.end() - }) - }) - - t.test('cd -', function (t) { - process.chdir(origCwd) - t.end() - }) - - t.end() -}) diff --git a/node_modules/mocha/node_modules/glob/test/root.js b/node_modules/mocha/node_modules/glob/test/root.js deleted file mode 100644 index 95c23f99..00000000 --- a/node_modules/mocha/node_modules/glob/test/root.js +++ /dev/null @@ -1,46 +0,0 @@ -var t = require("tap") - -var origCwd = process.cwd() -process.chdir(__dirname) - -var glob = require('../') -var path = require('path') - -t.test('.', function (t) { - glob('/b*/**', { globDebug: true, root: '.' }, function (er, matches) { - t.ifError(er) - t.like(matches, []) - t.end() - }) -}) - - -t.test('a', function (t) { - console.error("root=" + path.resolve('a')) - glob('/b*/**', { globDebug: true, root: path.resolve('a') }, function (er, matches) { - t.ifError(er) - var wanted = [ - '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' - ].map(function (m) { - return path.join(path.resolve('a'), m).replace(/\\/g, '/') - }) - - t.like(matches, wanted) - t.end() - }) -}) - -t.test('root=a, cwd=a/b', function (t) { - glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b') }, function (er, matches) { - t.ifError(er) - t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) { - return path.join(path.resolve('a'), m).replace(/\\/g, '/') - })) - t.end() - }) -}) - -t.test('cd -', function (t) { - process.chdir(origCwd) - t.end() -}) diff --git a/node_modules/mocha/node_modules/glob/test/stat.js b/node_modules/mocha/node_modules/glob/test/stat.js deleted file mode 100644 index 62917114..00000000 --- a/node_modules/mocha/node_modules/glob/test/stat.js +++ /dev/null @@ -1,32 +0,0 @@ -var glob = require('../') -var test = require('tap').test -var path = require('path') - -test('stat all the things', function(t) { - var g = new glob.Glob('a/*abc*/**', { stat: true, cwd: __dirname }) - var matches = [] - g.on('match', function(m) { - matches.push(m) - }) - var stats = [] - g.on('stat', function(m) { - stats.push(m) - }) - g.on('end', function(eof) { - stats = stats.sort() - matches = matches.sort() - eof = eof.sort() - t.same(stats, matches) - t.same(eof, matches) - var cache = Object.keys(this.statCache) - t.same(cache.map(function (f) { - return path.relative(__dirname, f) - }).sort(), matches) - - cache.forEach(function(c) { - t.equal(typeof this.statCache[c], 'object') - }, this) - - t.end() - }) -}) diff --git a/node_modules/mocha/node_modules/glob/test/zz-cleanup.js b/node_modules/mocha/node_modules/glob/test/zz-cleanup.js deleted file mode 100644 index e085f0fa..00000000 --- a/node_modules/mocha/node_modules/glob/test/zz-cleanup.js +++ /dev/null @@ -1,11 +0,0 @@ -// remove the fixtures -var tap = require("tap") -, rimraf = require("rimraf") -, path = require("path") - -tap.test("cleanup fixtures", function (t) { - rimraf(path.resolve(__dirname, "a"), function (er) { - t.ifError(er, "removed") - t.end() - }) -}) diff --git a/node_modules/mocha/node_modules/growl/History.md b/node_modules/mocha/node_modules/growl/History.md deleted file mode 100644 index a4b7b49f..00000000 --- a/node_modules/mocha/node_modules/growl/History.md +++ /dev/null @@ -1,63 +0,0 @@ - -1.7.0 / 2012-12-30 -================== - - * support transient notifications in Gnome - -1.6.1 / 2012-09-25 -================== - - * restore compatibility with node < 0.8 [fgnass] - -1.6.0 / 2012-09-06 -================== - - * add notification center support [drudge] - -1.5.1 / 2012-04-08 -================== - - * Merge pull request #16 from KyleAMathews/patch-1 - * Fixes #15 - -1.5.0 / 2012-02-08 -================== - - * Added windows support [perfusorius] - -1.4.1 / 2011-12-28 -================== - - * Fixed: dont exit(). Closes #9 - -1.4.0 / 2011-12-17 -================== - - * Changed API: `growl.notify()` -> `growl()` - -1.3.0 / 2011-12-17 -================== - - * Added support for Ubuntu/Debian/Linux users [niftylettuce] - * Fixed: send notifications even if title not specified [alessioalex] - -1.2.0 / 2011-10-06 -================== - - * Add support for priority. - -1.1.0 / 2011-03-15 -================== - - * Added optional callbacks - * Added parsing of version - -1.0.1 / 2010-03-26 -================== - - * Fixed; sys.exec -> child_process.exec to support latest node - -1.0.0 / 2010-03-19 -================== - - * Initial release diff --git a/node_modules/mocha/node_modules/growl/Readme.md b/node_modules/mocha/node_modules/growl/Readme.md deleted file mode 100644 index 48d717cc..00000000 --- a/node_modules/mocha/node_modules/growl/Readme.md +++ /dev/null @@ -1,99 +0,0 @@ -# Growl for nodejs - -Growl support for Nodejs. This is essentially a port of my [Ruby Growl Library](http://github.com/visionmedia/growl). Ubuntu/Linux support added thanks to [@niftylettuce](http://github.com/niftylettuce). - -## Installation - -### Install - -### Mac OS X (Darwin): - - Install [growlnotify(1)](http://growl.info/extras.php#growlnotify). On OS X 10.8, Notification Center is supported using [terminal-notifier](https://github.com/alloy/terminal-notifier). To install: - - $ sudo gem install terminal-notifier - - Install [npm](http://npmjs.org/) and run: - - $ npm install growl - -### Ubuntu (Linux): - - Install `notify-send` through the [libnotify-bin](http://packages.ubuntu.com/libnotify-bin) package: - - $ sudo apt-get install libnotify-bin - - Install [npm](http://npmjs.org/) and run: - - $ npm install growl - -### Windows: - - Download and install [Growl for Windows](http://www.growlforwindows.com/gfw/default.aspx) - - Download [growlnotify](http://www.growlforwindows.com/gfw/help/growlnotify.aspx) - **IMPORTANT :** Unpack growlnotify to a folder that is present in your path! - - Install [npm](http://npmjs.org/) and run: - - $ npm install growl - -## Examples - -Callback functions are optional - - var growl = require('growl') - growl('You have mail!') - growl('5 new messages', { sticky: true }) - growl('5 new emails', { title: 'Email Client', image: 'Safari', sticky: true }) - growl('Message with title', { title: 'Title'}) - growl('Set priority', { priority: 2 }) - growl('Show Safari icon', { image: 'Safari' }) - growl('Show icon', { image: 'path/to/icon.icns' }) - growl('Show image', { image: 'path/to/my.image.png' }) - growl('Show png filesystem icon', { image: 'png' }) - growl('Show pdf filesystem icon', { image: 'article.pdf' }) - growl('Show pdf filesystem icon', { image: 'article.pdf' }, function(err){ - // ... notified - }) - -## Options - - - title - - notification title - - name - - application name - - priority - - priority for the notification (default is 0) - - sticky - - weither or not the notification should remainin until closed - - image - - Auto-detects the context: - - path to an icon sets --iconpath - - path to an image sets --image - - capitalized word sets --appIcon - - filename uses extname as --icon - - otherwise treated as --icon - -## License - -(The MIT License) - -Copyright (c) 2009 TJ Holowaychuk - -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/node_modules/mocha/node_modules/growl/lib/growl.js b/node_modules/mocha/node_modules/growl/lib/growl.js deleted file mode 100644 index 04f4f9b4..00000000 --- a/node_modules/mocha/node_modules/growl/lib/growl.js +++ /dev/null @@ -1,234 +0,0 @@ -// Growl - Copyright TJ Holowaychuk (MIT Licensed) - -/** - * Module dependencies. - */ - -var exec = require('child_process').exec - , fs = require('fs') - , path = require('path') - , exists = fs.existsSync || path.existsSync - , os = require('os') - , quote = JSON.stringify - , cmd; - -function which(name) { - var paths = process.env.PATH.split(':'); - var loc; - - for (var i = 0, len = paths.length; i < len; ++i) { - loc = path.join(paths[i], name); - if (exists(loc)) return loc; - } -} - -switch(os.type()) { - case 'Darwin': - if (which('terminal-notifier')) { - cmd = { - type: "Darwin-NotificationCenter" - , pkg: "terminal-notifier" - , msg: '-message' - , title: '-title' - , subtitle: '-subtitle' - , priority: { - cmd: '-execute' - , range: [] - } - }; - } else { - cmd = { - type: "Darwin-Growl" - , pkg: "growlnotify" - , msg: '-m' - , sticky: '--sticky' - , priority: { - cmd: '--priority' - , range: [ - -2 - , -1 - , 0 - , 1 - , 2 - , "Very Low" - , "Moderate" - , "Normal" - , "High" - , "Emergency" - ] - } - }; - } - break; - case 'Linux': - cmd = { - type: "Linux" - , pkg: "notify-send" - , msg: '' - , sticky: '-t 0' - , icon: '-i' - , priority: { - cmd: '-u' - , range: [ - "low" - , "normal" - , "critical" - ] - } - }; - break; - case 'Windows_NT': - cmd = { - type: "Windows" - , pkg: "growlnotify" - , msg: '' - , sticky: '/s:true' - , title: '/t:' - , icon: '/i:' - , priority: { - cmd: '/p:' - , range: [ - -2 - , -1 - , 0 - , 1 - , 2 - ] - } - }; - break; -} - -/** - * Expose `growl`. - */ - -exports = module.exports = growl; - -/** - * Node-growl version. - */ - -exports.version = '1.4.1' - -/** - * Send growl notification _msg_ with _options_. - * - * Options: - * - * - title Notification title - * - sticky Make the notification stick (defaults to false) - * - priority Specify an int or named key (default is 0) - * - name Application name (defaults to growlnotify) - * - image - * - path to an icon sets --iconpath - * - path to an image sets --image - * - capitalized word sets --appIcon - * - filename uses extname as --icon - * - otherwise treated as --icon - * - * Examples: - * - * growl('New email') - * growl('5 new emails', { title: 'Thunderbird' }) - * growl('Email sent', function(){ - * // ... notification sent - * }) - * - * @param {string} msg - * @param {object} options - * @param {function} fn - * @api public - */ - -function growl(msg, options, fn) { - var image - , args - , options = options || {} - , fn = fn || function(){}; - - // noop - if (!cmd) return fn(new Error('growl not supported on this platform')); - args = [cmd.pkg]; - - // image - if (image = options.image) { - switch(cmd.type) { - case 'Darwin-Growl': - var flag, ext = path.extname(image).substr(1) - flag = flag || ext == 'icns' && 'iconpath' - flag = flag || /^[A-Z]/.test(image) && 'appIcon' - flag = flag || /^png|gif|jpe?g$/.test(ext) && 'image' - flag = flag || ext && (image = ext) && 'icon' - flag = flag || 'icon' - args.push('--' + flag, image) - break; - case 'Linux': - args.push(cmd.icon + " " + image); - // libnotify defaults to sticky, set a hint for transient notifications - if (!options.sticky) args.push('--hint=int:transient:1'); - break; - case 'Windows': - args.push(cmd.icon + quote(image)); - break; - } - } - - // sticky - if (options.sticky) args.push(cmd.sticky); - - // priority - if (options.priority) { - var priority = options.priority + ''; - var checkindexOf = cmd.priority.range.indexOf(priority); - if (~cmd.priority.range.indexOf(priority)) { - args.push(cmd.priority, options.priority); - } - } - - // name - if (options.name && cmd.type === "Darwin-Growl") { - args.push('--name', options.name); - } - - switch(cmd.type) { - case 'Darwin-Growl': - args.push(cmd.msg); - args.push(quote(msg)); - if (options.title) args.push(quote(options.title)); - break; - case 'Darwin-NotificationCenter': - args.push(cmd.msg); - args.push(quote(msg)); - if (options.title) { - args.push(cmd.title); - args.push(quote(options.title)); - } - if (options.subtitle) { - args.push(cmd.subtitle); - args.push(quote(options.title)); - } - break; - case 'Darwin-Growl': - args.push(cmd.msg); - args.push(quote(msg)); - if (options.title) args.push(quote(options.title)); - break; - case 'Linux': - if (options.title) { - args.push(quote(options.title)); - args.push(cmd.msg); - args.push(quote(msg)); - } else { - args.push(quote(msg)); - } - break; - case 'Windows': - args.push(quote(msg)); - if (options.title) args.push(cmd.title + quote(options.title)); - break; - } - - // execute - exec(args.join(' '), fn); -}; diff --git a/node_modules/mocha/node_modules/growl/package.json b/node_modules/mocha/node_modules/growl/package.json deleted file mode 100644 index 6565e46d..00000000 --- a/node_modules/mocha/node_modules/growl/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "growl", - "version": "1.7.0", - "description": "Growl unobtrusive notifications", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "main": "./lib/growl.js", - "readme": "# Growl for nodejs\n\nGrowl support for Nodejs. This is essentially a port of my [Ruby Growl Library](http://github.com/visionmedia/growl). Ubuntu/Linux support added thanks to [@niftylettuce](http://github.com/niftylettuce). \n\n## Installation\n\n### Install \n\n### Mac OS X (Darwin):\n\n Install [growlnotify(1)](http://growl.info/extras.php#growlnotify). On OS X 10.8, Notification Center is supported using [terminal-notifier](https://github.com/alloy/terminal-notifier). To install:\n \n $ sudo gem install terminal-notifier\n \n Install [npm](http://npmjs.org/) and run:\n \n $ npm install growl\n\n### Ubuntu (Linux):\n\n Install `notify-send` through the [libnotify-bin](http://packages.ubuntu.com/libnotify-bin) package:\n\n $ sudo apt-get install libnotify-bin\n\n Install [npm](http://npmjs.org/) and run:\n \n $ npm install growl\n\n### Windows:\n\n Download and install [Growl for Windows](http://www.growlforwindows.com/gfw/default.aspx)\n\n Download [growlnotify](http://www.growlforwindows.com/gfw/help/growlnotify.aspx) - **IMPORTANT :** Unpack growlnotify to a folder that is present in your path!\n\n Install [npm](http://npmjs.org/) and run:\n \n $ npm install growl\n\n## Examples\n\nCallback functions are optional\n\n var growl = require('growl')\n growl('You have mail!')\n growl('5 new messages', { sticky: true })\n growl('5 new emails', { title: 'Email Client', image: 'Safari', sticky: true })\n growl('Message with title', { title: 'Title'})\n growl('Set priority', { priority: 2 })\n growl('Show Safari icon', { image: 'Safari' })\n growl('Show icon', { image: 'path/to/icon.icns' })\n growl('Show image', { image: 'path/to/my.image.png' })\n growl('Show png filesystem icon', { image: 'png' })\n growl('Show pdf filesystem icon', { image: 'article.pdf' })\n growl('Show pdf filesystem icon', { image: 'article.pdf' }, function(err){\n // ... notified\n })\n\n## Options\n\n - title\n - notification title\n - name\n - application name\n - priority\n - priority for the notification (default is 0)\n - sticky\n - weither or not the notification should remainin until closed\n - image\n - Auto-detects the context:\n - path to an icon sets --iconpath\n - path to an image sets --image\n - capitalized word sets --appIcon\n - filename uses extname as --icon\n - otherwise treated as --icon\n \n## License \n\n(The MIT License)\n\nCopyright (c) 2009 TJ Holowaychuk \n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "_id": "growl@1.7.0", - "_from": "growl@1.7.x" -} diff --git a/node_modules/mocha/node_modules/growl/test.js b/node_modules/mocha/node_modules/growl/test.js deleted file mode 100644 index cf22d90b..00000000 --- a/node_modules/mocha/node_modules/growl/test.js +++ /dev/null @@ -1,20 +0,0 @@ - -var growl = require('./lib/growl') - -growl('You have mail!') -growl('5 new messages', { sticky: true }) -growl('5 new emails', { title: 'Email Client', image: 'Safari', sticky: true }) -growl('Message with title', { title: 'Title'}) -growl('Set priority', { priority: 2 }) -growl('Show Safari icon', { image: 'Safari' }) -growl('Show icon', { image: 'path/to/icon.icns' }) -growl('Show image', { image: 'path/to/my.image.png' }) -growl('Show png filesystem icon', { image: 'png' }) -growl('Show pdf filesystem icon', { image: 'article.pdf' }) -growl('Show pdf filesystem icon', { image: 'article.pdf' }, function(){ - console.log('callback'); -}) -growl('Show pdf filesystem icon', { title: 'Use show()', image: 'article.pdf' }) -growl('here \' are \n some \\ characters that " need escaping', {}, function(error, stdout, stderr) { - if (error !== null) throw new Error('escaping failed:\n' + stdout + stderr); -}) diff --git a/node_modules/mocha/node_modules/jade/.npmignore b/node_modules/mocha/node_modules/jade/.npmignore deleted file mode 100644 index b9af3d4b..00000000 --- a/node_modules/mocha/node_modules/jade/.npmignore +++ /dev/null @@ -1,15 +0,0 @@ -test -support -benchmarks -examples -lib-cov -coverage.html -.gitmodules -.travis.yml -History.md -Readme.md -Makefile -test/ -support/ -benchmarks/ -examples/ diff --git a/node_modules/mocha/node_modules/jade/LICENSE b/node_modules/mocha/node_modules/jade/LICENSE deleted file mode 100644 index 8ad0e0d3..00000000 --- a/node_modules/mocha/node_modules/jade/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2009-2010 TJ Holowaychuk - -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. \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/bin/jade b/node_modules/mocha/node_modules/jade/bin/jade deleted file mode 100755 index 7e6002f9..00000000 --- a/node_modules/mocha/node_modules/jade/bin/jade +++ /dev/null @@ -1,147 +0,0 @@ -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var fs = require('fs') - , program = require('commander') - , path = require('path') - , basename = path.basename - , dirname = path.dirname - , resolve = path.resolve - , join = path.join - , mkdirp = require('mkdirp') - , jade = require('../'); - -// jade options - -var options = {}; - -// options - -program - .version(jade.version) - .usage('[options] [dir|file ...]') - .option('-o, --obj ', 'javascript options object') - .option('-O, --out ', 'output the compiled html to ') - .option('-p, --path ', 'filename used to resolve includes') - .option('-P, --pretty', 'compile pretty html output') - .option('-c, --client', 'compile for client-side runtime.js') - .option('-D, --no-debug', 'compile without debugging (smaller functions)') - -program.on('--help', function(){ - console.log(' Examples:'); - console.log(''); - console.log(' # translate jade the templates dir'); - console.log(' $ jade templates'); - console.log(''); - console.log(' # create {foo,bar}.html'); - console.log(' $ jade {foo,bar}.jade'); - console.log(''); - console.log(' # jade over stdio'); - console.log(' $ jade < my.jade > my.html'); - console.log(''); - console.log(' # jade over stdio'); - console.log(' $ echo "h1 Jade!" | jade'); - console.log(''); - console.log(' # foo, bar dirs rendering to /tmp'); - console.log(' $ jade foo bar --out /tmp '); - console.log(''); -}); - -program.parse(process.argv); - -// options given, parse them - -if (program.obj) options = eval('(' + program.obj + ')'); - -// --filename - -if (program.path) options.filename = program.path; - -// --no-debug - -options.compileDebug = program.debug; - -// --client - -options.client = program.client; - -// --pretty - -options.pretty = program.pretty; - -// left-over args are file paths - -var files = program.args; - -// compile files - -if (files.length) { - console.log(); - files.forEach(renderFile); - process.on('exit', console.log); -// stdio -} else { - stdin(); -} - -/** - * Compile from stdin. - */ - -function stdin() { - var buf = ''; - process.stdin.setEncoding('utf8'); - process.stdin.on('data', function(chunk){ buf += chunk; }); - process.stdin.on('end', function(){ - var fn = jade.compile(buf, options); - var output = options.client - ? fn.toString() - : fn(options); - process.stdout.write(output); - }).resume(); -} - -/** - * Process the given path, compiling the jade files found. - * Always walk the subdirectories. - */ - -function renderFile(path) { - var re = /\.jade$/; - fs.lstat(path, function(err, stat) { - if (err) throw err; - // Found jade file - if (stat.isFile() && re.test(path)) { - fs.readFile(path, 'utf8', function(err, str){ - if (err) throw err; - options.filename = path; - var fn = jade.compile(str, options); - var extname = options.client ? '.js' : '.html'; - path = path.replace(re, extname); - if (program.out) path = join(program.out, basename(path)); - var dir = resolve(dirname(path)); - mkdirp(dir, 0755, function(err){ - if (err) throw err; - var output = options.client - ? fn.toString() - : fn(options); - fs.writeFile(path, output, function(err){ - if (err) throw err; - console.log(' \033[90mrendered \033[36m%s\033[0m', path); - }); - }); - }); - // Found directory - } else if (stat.isDirectory()) { - fs.readdir(path, function(err, files) { - if (err) throw err; - files.map(function(filename) { - return path + '/' + filename; - }).forEach(renderFile); - }); - } - }); -} diff --git a/node_modules/mocha/node_modules/jade/index.js b/node_modules/mocha/node_modules/jade/index.js deleted file mode 100644 index 8ad059f7..00000000 --- a/node_modules/mocha/node_modules/jade/index.js +++ /dev/null @@ -1,4 +0,0 @@ - -module.exports = process.env.JADE_COV - ? require('./lib-cov/jade') - : require('./lib/jade'); \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/jade.js b/node_modules/mocha/node_modules/jade/jade.js deleted file mode 100644 index 1983a203..00000000 --- a/node_modules/mocha/node_modules/jade/jade.js +++ /dev/null @@ -1,3586 +0,0 @@ -(function() { - -// CommonJS require() - -function require(p){ - var path = require.resolve(p) - , mod = require.modules[path]; - if (!mod) throw new Error('failed to require "' + p + '"'); - if (!mod.exports) { - mod.exports = {}; - mod.call(mod.exports, mod, mod.exports, require.relative(path)); - } - return mod.exports; - } - -require.modules = {}; - -require.resolve = function (path){ - var orig = path - , reg = path + '.js' - , index = path + '/index.js'; - return require.modules[reg] && reg - || require.modules[index] && index - || orig; - }; - -require.register = function (path, fn){ - require.modules[path] = fn; - }; - -require.relative = function (parent) { - return function(p){ - if ('.' != p.charAt(0)) return require(p); - - var path = parent.split('/') - , segs = p.split('/'); - path.pop(); - - for (var i = 0; i < segs.length; i++) { - var seg = segs[i]; - if ('..' == seg) path.pop(); - else if ('.' != seg) path.push(seg); - } - - return require(path.join('/')); - }; - }; - - -require.register("compiler.js", function(module, exports, require){ - -/*! - * Jade - Compiler - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var nodes = require('./nodes') - , filters = require('./filters') - , doctypes = require('./doctypes') - , selfClosing = require('./self-closing') - , runtime = require('./runtime') - , utils = require('./utils'); - - - if (!Object.keys) { - Object.keys = function(obj){ - var arr = []; - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - arr.push(key); - } - } - return arr; - } - } - - if (!String.prototype.trimLeft) { - String.prototype.trimLeft = function(){ - return this.replace(/^\s+/, ''); - } - } - - - -/** - * Initialize `Compiler` with the given `node`. - * - * @param {Node} node - * @param {Object} options - * @api public - */ - -var Compiler = module.exports = function Compiler(node, options) { - this.options = options = options || {}; - this.node = node; - this.hasCompiledDoctype = false; - this.hasCompiledTag = false; - this.pp = options.pretty || false; - this.debug = false !== options.compileDebug; - this.indents = 0; - this.parentIndents = 0; - if (options.doctype) this.setDoctype(options.doctype); -}; - -/** - * Compiler prototype. - */ - -Compiler.prototype = { - - /** - * Compile parse tree to JavaScript. - * - * @api public - */ - - compile: function(){ - this.buf = ['var interp;']; - if (this.pp) this.buf.push("var __indent = [];"); - this.lastBufferedIdx = -1; - this.visit(this.node); - return this.buf.join('\n'); - }, - - /** - * Sets the default doctype `name`. Sets terse mode to `true` when - * html 5 is used, causing self-closing tags to end with ">" vs "/>", - * and boolean attributes are not mirrored. - * - * @param {string} name - * @api public - */ - - setDoctype: function(name){ - var doctype = doctypes[(name || 'default').toLowerCase()]; - doctype = doctype || ''; - this.doctype = doctype; - this.terse = '5' == name || 'html' == name; - this.xml = 0 == this.doctype.indexOf(' 1 && !escape && block.nodes[0].isText && block.nodes[1].isText) - this.prettyIndent(1, true); - - for (var i = 0; i < len; ++i) { - // Pretty print text - if (pp && i > 0 && !escape && block.nodes[i].isText && block.nodes[i-1].isText) - this.prettyIndent(1, false); - - this.visit(block.nodes[i]); - // Multiple text nodes are separated by newlines - if (block.nodes[i+1] && block.nodes[i].isText && block.nodes[i+1].isText) - this.buffer('\\n'); - } - }, - - /** - * Visit `doctype`. Sets terse mode to `true` when html 5 - * is used, causing self-closing tags to end with ">" vs "/>", - * and boolean attributes are not mirrored. - * - * @param {Doctype} doctype - * @api public - */ - - visitDoctype: function(doctype){ - if (doctype && (doctype.val || !this.doctype)) { - this.setDoctype(doctype.val || 'default'); - } - - if (this.doctype) this.buffer(this.doctype); - this.hasCompiledDoctype = true; - }, - - /** - * Visit `mixin`, generating a function that - * may be called within the template. - * - * @param {Mixin} mixin - * @api public - */ - - visitMixin: function(mixin){ - var name = mixin.name.replace(/-/g, '_') + '_mixin' - , args = mixin.args || '' - , block = mixin.block - , attrs = mixin.attrs - , pp = this.pp; - - if (mixin.call) { - if (pp) this.buf.push("__indent.push('" + Array(this.indents + 1).join(' ') + "');") - if (block || attrs.length) { - - this.buf.push(name + '.call({'); - - if (block) { - this.buf.push('block: function(){'); - - // Render block with no indents, dynamically added when rendered - this.parentIndents++; - var _indents = this.indents; - this.indents = 0; - this.visit(mixin.block); - this.indents = _indents; - this.parentIndents--; - - if (attrs.length) { - this.buf.push('},'); - } else { - this.buf.push('}'); - } - } - - if (attrs.length) { - var val = this.attrs(attrs); - if (val.inherits) { - this.buf.push('attributes: merge({' + val.buf - + '}, attributes), escaped: merge(' + val.escaped + ', escaped, true)'); - } else { - this.buf.push('attributes: {' + val.buf + '}, escaped: ' + val.escaped); - } - } - - if (args) { - this.buf.push('}, ' + args + ');'); - } else { - this.buf.push('});'); - } - - } else { - this.buf.push(name + '(' + args + ');'); - } - if (pp) this.buf.push("__indent.pop();") - } else { - this.buf.push('var ' + name + ' = function(' + args + '){'); - this.buf.push('var block = this.block, attributes = this.attributes || {}, escaped = this.escaped || {};'); - this.parentIndents++; - this.visit(block); - this.parentIndents--; - this.buf.push('};'); - } - }, - - /** - * Visit `tag` buffering tag markup, generating - * attributes, visiting the `tag`'s code and block. - * - * @param {Tag} tag - * @api public - */ - - visitTag: function(tag){ - this.indents++; - var name = tag.name - , pp = this.pp; - - if (tag.buffer) name = "' + (" + name + ") + '"; - - if (!this.hasCompiledTag) { - if (!this.hasCompiledDoctype && 'html' == name) { - this.visitDoctype(); - } - this.hasCompiledTag = true; - } - - // pretty print - if (pp && !tag.isInline()) - this.prettyIndent(0, true); - - if ((~selfClosing.indexOf(name) || tag.selfClosing) && !this.xml) { - this.buffer('<' + name); - this.visitAttributes(tag.attrs); - this.terse - ? this.buffer('>') - : this.buffer('/>'); - } else { - // Optimize attributes buffering - if (tag.attrs.length) { - this.buffer('<' + name); - if (tag.attrs.length) this.visitAttributes(tag.attrs); - this.buffer('>'); - } else { - this.buffer('<' + name + '>'); - } - if (tag.code) this.visitCode(tag.code); - this.escape = 'pre' == tag.name; - this.visit(tag.block); - - // pretty print - if (pp && !tag.isInline() && 'pre' != tag.name && !tag.canInline()) - this.prettyIndent(0, true); - - this.buffer(''); - } - this.indents--; - }, - - /** - * Visit `filter`, throwing when the filter does not exist. - * - * @param {Filter} filter - * @api public - */ - - visitFilter: function(filter){ - var fn = filters[filter.name]; - - // unknown filter - if (!fn) { - if (filter.isASTFilter) { - throw new Error('unknown ast filter "' + filter.name + ':"'); - } else { - throw new Error('unknown filter ":' + filter.name + '"'); - } - } - - if (filter.isASTFilter) { - this.buf.push(fn(filter.block, this, filter.attrs)); - } else { - var text = filter.block.nodes.map(function(node){ return node.val }).join('\n'); - filter.attrs = filter.attrs || {}; - filter.attrs.filename = this.options.filename; - this.buffer(utils.text(fn(text, filter.attrs))); - } - }, - - /** - * Visit `text` node. - * - * @param {Text} text - * @api public - */ - - visitText: function(text){ - text = utils.text(text.val.replace(/\\/g, '\\\\')); - if (this.escape) text = escape(text); - this.buffer(text); - }, - - /** - * Visit a `comment`, only buffering when the buffer flag is set. - * - * @param {Comment} comment - * @api public - */ - - visitComment: function(comment){ - if (!comment.buffer) return; - if (this.pp) this.prettyIndent(1, true); - this.buffer(''); - }, - - /** - * Visit a `BlockComment`. - * - * @param {Comment} comment - * @api public - */ - - visitBlockComment: function(comment){ - if (!comment.buffer) return; - if (0 == comment.val.trim().indexOf('if')) { - this.buffer(''); - } else { - this.buffer(''); - } - }, - - /** - * Visit `code`, respecting buffer / escape flags. - * If the code is followed by a block, wrap it in - * a self-calling function. - * - * @param {Code} code - * @api public - */ - - visitCode: function(code){ - // Wrap code blocks with {}. - // we only wrap unbuffered code blocks ATM - // since they are usually flow control - - // Buffer code - if (code.buffer) { - var val = code.val.trimLeft(); - this.buf.push('var __val__ = ' + val); - val = 'null == __val__ ? "" : __val__'; - if (code.escape) val = 'escape(' + val + ')'; - this.buf.push("buf.push(" + val + ");"); - } else { - this.buf.push(code.val); - } - - // Block support - if (code.block) { - if (!code.buffer) this.buf.push('{'); - this.visit(code.block); - if (!code.buffer) this.buf.push('}'); - } - }, - - /** - * Visit `each` block. - * - * @param {Each} each - * @api public - */ - - visitEach: function(each){ - this.buf.push('' - + '// iterate ' + each.obj + '\n' - + ';(function(){\n' - + ' if (\'number\' == typeof ' + each.obj + '.length) {\n' - + ' for (var ' + each.key + ' = 0, $$l = ' + each.obj + '.length; ' + each.key + ' < $$l; ' + each.key + '++) {\n' - + ' var ' + each.val + ' = ' + each.obj + '[' + each.key + '];\n'); - - this.visit(each.block); - - this.buf.push('' - + ' }\n' - + ' } else {\n' - + ' for (var ' + each.key + ' in ' + each.obj + ') {\n' - + ' if (' + each.obj + '.hasOwnProperty(' + each.key + ')){' - + ' var ' + each.val + ' = ' + each.obj + '[' + each.key + '];\n'); - - this.visit(each.block); - - this.buf.push(' }\n'); - - this.buf.push(' }\n }\n}).call(this);\n'); - }, - - /** - * Visit `attrs`. - * - * @param {Array} attrs - * @api public - */ - - visitAttributes: function(attrs){ - var val = this.attrs(attrs); - if (val.inherits) { - this.buf.push("buf.push(attrs(merge({ " + val.buf + - " }, attributes), merge(" + val.escaped + ", escaped, true)));"); - } else if (val.constant) { - eval('var buf={' + val.buf + '};'); - this.buffer(runtime.attrs(buf, JSON.parse(val.escaped)), true); - } else { - this.buf.push("buf.push(attrs({ " + val.buf + " }, " + val.escaped + "));"); - } - }, - - /** - * Compile attributes. - */ - - attrs: function(attrs){ - var buf = [] - , classes = [] - , escaped = {} - , constant = attrs.every(function(attr){ return isConstant(attr.val) }) - , inherits = false; - - if (this.terse) buf.push('terse: true'); - - attrs.forEach(function(attr){ - if (attr.name == 'attributes') return inherits = true; - escaped[attr.name] = attr.escaped; - if (attr.name == 'class') { - classes.push('(' + attr.val + ')'); - } else { - var pair = "'" + attr.name + "':(" + attr.val + ')'; - buf.push(pair); - } - }); - - if (classes.length) { - classes = classes.join(" + ' ' + "); - buf.push("class: " + classes); - } - - return { - buf: buf.join(', ').replace('class:', '"class":'), - escaped: JSON.stringify(escaped), - inherits: inherits, - constant: constant - }; - } -}; - -/** - * Check if expression can be evaluated to a constant - * - * @param {String} expression - * @return {Boolean} - * @api private - */ - -function isConstant(val){ - // Check strings/literals - if (/^ *("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'|true|false|null|undefined) *$/i.test(val)) - return true; - - // Check numbers - if (!isNaN(Number(val))) - return true; - - // Check arrays - var matches; - if (matches = /^ *\[(.*)\] *$/.exec(val)) - return matches[1].split(',').every(isConstant); - - return false; -} - -/** - * Escape the given string of `html`. - * - * @param {String} html - * @return {String} - * @api private - */ - -function escape(html){ - return String(html) - .replace(/&(?!\w+;)/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); -} -}); // module: compiler.js - -require.register("doctypes.js", function(module, exports, require){ - -/*! - * Jade - doctypes - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = { - '5': '' - , 'default': '' - , 'xml': '' - , 'transitional': '' - , 'strict': '' - , 'frameset': '' - , '1.1': '' - , 'basic': '' - , 'mobile': '' -}; -}); // module: doctypes.js - -require.register("filters.js", function(module, exports, require){ - -/*! - * Jade - filters - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = { - - /** - * Wrap text with CDATA block. - */ - - cdata: function(str){ - return ''; - }, - - /** - * Transform sass to css, wrapped in style tags. - */ - - sass: function(str){ - str = str.replace(/\\n/g, '\n'); - var sass = require('sass').render(str).replace(/\n/g, '\\n'); - return ''; - }, - - /** - * Transform stylus to css, wrapped in style tags. - */ - - stylus: function(str, options){ - var ret; - str = str.replace(/\\n/g, '\n'); - var stylus = require('stylus'); - stylus(str, options).render(function(err, css){ - if (err) throw err; - ret = css.replace(/\n/g, '\\n'); - }); - return ''; - }, - - /** - * Transform less to css, wrapped in style tags. - */ - - less: function(str){ - var ret; - str = str.replace(/\\n/g, '\n'); - require('less').render(str, function(err, css){ - if (err) throw err; - ret = ''; - }); - return ret; - }, - - /** - * Transform markdown to html. - */ - - markdown: function(str){ - var md; - - // support markdown / discount - try { - md = require('markdown'); - } catch (err){ - try { - md = require('discount'); - } catch (err) { - try { - md = require('markdown-js'); - } catch (err) { - try { - md = require('marked'); - } catch (err) { - throw new - Error('Cannot find markdown library, install markdown, discount, or marked.'); - } - } - } - } - - str = str.replace(/\\n/g, '\n'); - return md.parse(str).replace(/\n/g, '\\n').replace(/'/g,'''); - }, - - /** - * Transform coffeescript to javascript. - */ - - coffeescript: function(str){ - str = str.replace(/\\n/g, '\n'); - var js = require('coffee-script').compile(str).replace(/\\/g, '\\\\').replace(/\n/g, '\\n'); - return ''; - } -}; - -}); // module: filters.js - -require.register("inline-tags.js", function(module, exports, require){ - -/*! - * Jade - inline tags - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = [ - 'a' - , 'abbr' - , 'acronym' - , 'b' - , 'br' - , 'code' - , 'em' - , 'font' - , 'i' - , 'img' - , 'ins' - , 'kbd' - , 'map' - , 'samp' - , 'small' - , 'span' - , 'strong' - , 'sub' - , 'sup' -]; -}); // module: inline-tags.js - -require.register("jade.js", function(module, exports, require){ -/*! - * Jade - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Parser = require('./parser') - , Lexer = require('./lexer') - , Compiler = require('./compiler') - , runtime = require('./runtime') - -/** - * Library version. - */ - -exports.version = '0.26.1'; - -/** - * Expose self closing tags. - */ - -exports.selfClosing = require('./self-closing'); - -/** - * Default supported doctypes. - */ - -exports.doctypes = require('./doctypes'); - -/** - * Text filters. - */ - -exports.filters = require('./filters'); - -/** - * Utilities. - */ - -exports.utils = require('./utils'); - -/** - * Expose `Compiler`. - */ - -exports.Compiler = Compiler; - -/** - * Expose `Parser`. - */ - -exports.Parser = Parser; - -/** - * Expose `Lexer`. - */ - -exports.Lexer = Lexer; - -/** - * Nodes. - */ - -exports.nodes = require('./nodes'); - -/** - * Jade runtime helpers. - */ - -exports.runtime = runtime; - -/** - * Template function cache. - */ - -exports.cache = {}; - -/** - * Parse the given `str` of jade and return a function body. - * - * @param {String} str - * @param {Object} options - * @return {String} - * @api private - */ - -function parse(str, options){ - try { - // Parse - var parser = new Parser(str, options.filename, options); - - // Compile - var compiler = new (options.compiler || Compiler)(parser.parse(), options) - , js = compiler.compile(); - - // Debug compiler - if (options.debug) { - console.error('\nCompiled Function:\n\n\033[90m%s\033[0m', js.replace(/^/gm, ' ')); - } - - return '' - + 'var buf = [];\n' - + (options.self - ? 'var self = locals || {};\n' + js - : 'with (locals || {}) {\n' + js + '\n}\n') - + 'return buf.join("");'; - } catch (err) { - parser = parser.context(); - runtime.rethrow(err, parser.filename, parser.lexer.lineno); - } -} - -/** - * Compile a `Function` representation of the given jade `str`. - * - * Options: - * - * - `compileDebug` when `false` debugging code is stripped from the compiled template - * - `client` when `true` the helper functions `escape()` etc will reference `jade.escape()` - * for use with the Jade client-side runtime.js - * - * @param {String} str - * @param {Options} options - * @return {Function} - * @api public - */ - -exports.compile = function(str, options){ - var options = options || {} - , client = options.client - , filename = options.filename - ? JSON.stringify(options.filename) - : 'undefined' - , fn; - - if (options.compileDebug !== false) { - fn = [ - 'var __jade = [{ lineno: 1, filename: ' + filename + ' }];' - , 'try {' - , parse(String(str), options) - , '} catch (err) {' - , ' rethrow(err, __jade[0].filename, __jade[0].lineno);' - , '}' - ].join('\n'); - } else { - fn = parse(String(str), options); - } - - if (client) { - fn = 'attrs = attrs || jade.attrs; escape = escape || jade.escape; rethrow = rethrow || jade.rethrow; merge = merge || jade.merge;\n' + fn; - } - - fn = new Function('locals, attrs, escape, rethrow, merge', fn); - - if (client) return fn; - - return function(locals){ - return fn(locals, runtime.attrs, runtime.escape, runtime.rethrow, runtime.merge); - }; -}; - -/** - * Render the given `str` of jade and invoke - * the callback `fn(err, str)`. - * - * Options: - * - * - `cache` enable template caching - * - `filename` filename required for `include` / `extends` and caching - * - * @param {String} str - * @param {Object|Function} options or fn - * @param {Function} fn - * @api public - */ - -exports.render = function(str, options, fn){ - // swap args - if ('function' == typeof options) { - fn = options, options = {}; - } - - // cache requires .filename - if (options.cache && !options.filename) { - return fn(new Error('the "filename" option is required for caching')); - } - - try { - var path = options.filename; - var tmpl = options.cache - ? exports.cache[path] || (exports.cache[path] = exports.compile(str, options)) - : exports.compile(str, options); - fn(null, tmpl(options)); - } catch (err) { - fn(err); - } -}; - -/** - * Render a Jade file at the given `path` and callback `fn(err, str)`. - * - * @param {String} path - * @param {Object|Function} options or callback - * @param {Function} fn - * @api public - */ - -exports.renderFile = function(path, options, fn){ - var key = path + ':string'; - - if ('function' == typeof options) { - fn = options, options = {}; - } - - try { - options.filename = path; - var str = options.cache - ? exports.cache[key] || (exports.cache[key] = fs.readFileSync(path, 'utf8')) - : fs.readFileSync(path, 'utf8'); - exports.render(str, options, fn); - } catch (err) { - fn(err); - } -}; - -/** - * Express support. - */ - -exports.__express = exports.renderFile; - -}); // module: jade.js - -require.register("lexer.js", function(module, exports, require){ - -/*! - * Jade - Lexer - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Initialize `Lexer` with the given `str`. - * - * Options: - * - * - `colons` allow colons for attr delimiters - * - * @param {String} str - * @param {Object} options - * @api private - */ - -var Lexer = module.exports = function Lexer(str, options) { - options = options || {}; - this.input = str.replace(/\r\n|\r/g, '\n'); - this.colons = options.colons; - this.deferredTokens = []; - this.lastIndents = 0; - this.lineno = 1; - this.stash = []; - this.indentStack = []; - this.indentRe = null; - this.pipeless = false; -}; - -/** - * Lexer prototype. - */ - -Lexer.prototype = { - - /** - * Construct a token with the given `type` and `val`. - * - * @param {String} type - * @param {String} val - * @return {Object} - * @api private - */ - - tok: function(type, val){ - return { - type: type - , line: this.lineno - , val: val - } - }, - - /** - * Consume the given `len` of input. - * - * @param {Number} len - * @api private - */ - - consume: function(len){ - this.input = this.input.substr(len); - }, - - /** - * Scan for `type` with the given `regexp`. - * - * @param {String} type - * @param {RegExp} regexp - * @return {Object} - * @api private - */ - - scan: function(regexp, type){ - var captures; - if (captures = regexp.exec(this.input)) { - this.consume(captures[0].length); - return this.tok(type, captures[1]); - } - }, - - /** - * Defer the given `tok`. - * - * @param {Object} tok - * @api private - */ - - defer: function(tok){ - this.deferredTokens.push(tok); - }, - - /** - * Lookahead `n` tokens. - * - * @param {Number} n - * @return {Object} - * @api private - */ - - lookahead: function(n){ - var fetch = n - this.stash.length; - while (fetch-- > 0) this.stash.push(this.next()); - return this.stash[--n]; - }, - - /** - * Return the indexOf `start` / `end` delimiters. - * - * @param {String} start - * @param {String} end - * @return {Number} - * @api private - */ - - indexOfDelimiters: function(start, end){ - var str = this.input - , nstart = 0 - , nend = 0 - , pos = 0; - for (var i = 0, len = str.length; i < len; ++i) { - if (start == str.charAt(i)) { - ++nstart; - } else if (end == str.charAt(i)) { - if (++nend == nstart) { - pos = i; - break; - } - } - } - return pos; - }, - - /** - * Stashed token. - */ - - stashed: function() { - return this.stash.length - && this.stash.shift(); - }, - - /** - * Deferred token. - */ - - deferred: function() { - return this.deferredTokens.length - && this.deferredTokens.shift(); - }, - - /** - * end-of-source. - */ - - eos: function() { - if (this.input.length) return; - if (this.indentStack.length) { - this.indentStack.shift(); - return this.tok('outdent'); - } else { - return this.tok('eos'); - } - }, - - /** - * Blank line. - */ - - blank: function() { - var captures; - if (captures = /^\n *\n/.exec(this.input)) { - this.consume(captures[0].length - 1); - if (this.pipeless) return this.tok('text', ''); - return this.next(); - } - }, - - /** - * Comment. - */ - - comment: function() { - var captures; - if (captures = /^ *\/\/(-)?([^\n]*)/.exec(this.input)) { - this.consume(captures[0].length); - var tok = this.tok('comment', captures[2]); - tok.buffer = '-' != captures[1]; - return tok; - } - }, - - /** - * Interpolated tag. - */ - - interpolation: function() { - var captures; - if (captures = /^#\{(.*?)\}/.exec(this.input)) { - this.consume(captures[0].length); - return this.tok('interpolation', captures[1]); - } - }, - - /** - * Tag. - */ - - tag: function() { - var captures; - if (captures = /^(\w[-:\w]*)(\/?)/.exec(this.input)) { - this.consume(captures[0].length); - var tok, name = captures[1]; - if (':' == name[name.length - 1]) { - name = name.slice(0, -1); - tok = this.tok('tag', name); - this.defer(this.tok(':')); - while (' ' == this.input[0]) this.input = this.input.substr(1); - } else { - tok = this.tok('tag', name); - } - tok.selfClosing = !! captures[2]; - return tok; - } - }, - - /** - * Filter. - */ - - filter: function() { - return this.scan(/^:(\w+)/, 'filter'); - }, - - /** - * Doctype. - */ - - doctype: function() { - return this.scan(/^(?:!!!|doctype) *([^\n]+)?/, 'doctype'); - }, - - /** - * Id. - */ - - id: function() { - return this.scan(/^#([\w-]+)/, 'id'); - }, - - /** - * Class. - */ - - className: function() { - return this.scan(/^\.([\w-]+)/, 'class'); - }, - - /** - * Text. - */ - - text: function() { - return this.scan(/^(?:\| ?| ?)?([^\n]+)/, 'text'); - }, - - /** - * Extends. - */ - - "extends": function() { - return this.scan(/^extends? +([^\n]+)/, 'extends'); - }, - - /** - * Block prepend. - */ - - prepend: function() { - var captures; - if (captures = /^prepend +([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - var mode = 'prepend' - , name = captures[1] - , tok = this.tok('block', name); - tok.mode = mode; - return tok; - } - }, - - /** - * Block append. - */ - - append: function() { - var captures; - if (captures = /^append +([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - var mode = 'append' - , name = captures[1] - , tok = this.tok('block', name); - tok.mode = mode; - return tok; - } - }, - - /** - * Block. - */ - - block: function() { - var captures; - if (captures = /^block\b *(?:(prepend|append) +)?([^\n]*)/.exec(this.input)) { - this.consume(captures[0].length); - var mode = captures[1] || 'replace' - , name = captures[2] - , tok = this.tok('block', name); - - tok.mode = mode; - return tok; - } - }, - - /** - * Yield. - */ - - yield: function() { - return this.scan(/^yield */, 'yield'); - }, - - /** - * Include. - */ - - include: function() { - return this.scan(/^include +([^\n]+)/, 'include'); - }, - - /** - * Case. - */ - - "case": function() { - return this.scan(/^case +([^\n]+)/, 'case'); - }, - - /** - * When. - */ - - when: function() { - return this.scan(/^when +([^:\n]+)/, 'when'); - }, - - /** - * Default. - */ - - "default": function() { - return this.scan(/^default */, 'default'); - }, - - /** - * Assignment. - */ - - assignment: function() { - var captures; - if (captures = /^(\w+) += *([^;\n]+)( *;? *)/.exec(this.input)) { - this.consume(captures[0].length); - var name = captures[1] - , val = captures[2]; - return this.tok('code', 'var ' + name + ' = (' + val + ');'); - } - }, - - /** - * Call mixin. - */ - - call: function(){ - var captures; - if (captures = /^\+([-\w]+)/.exec(this.input)) { - this.consume(captures[0].length); - var tok = this.tok('call', captures[1]); - - // Check for args (not attributes) - if (captures = /^ *\((.*?)\)/.exec(this.input)) { - if (!/^ *[-\w]+ *=/.test(captures[1])) { - this.consume(captures[0].length); - tok.args = captures[1]; - } - } - - return tok; - } - }, - - /** - * Mixin. - */ - - mixin: function(){ - var captures; - if (captures = /^mixin +([-\w]+)(?: *\((.*)\))?/.exec(this.input)) { - this.consume(captures[0].length); - var tok = this.tok('mixin', captures[1]); - tok.args = captures[2]; - return tok; - } - }, - - /** - * Conditional. - */ - - conditional: function() { - var captures; - if (captures = /^(if|unless|else if|else)\b([^\n]*)/.exec(this.input)) { - this.consume(captures[0].length); - var type = captures[1] - , js = captures[2]; - - switch (type) { - case 'if': js = 'if (' + js + ')'; break; - case 'unless': js = 'if (!(' + js + '))'; break; - case 'else if': js = 'else if (' + js + ')'; break; - case 'else': js = 'else'; break; - } - - return this.tok('code', js); - } - }, - - /** - * While. - */ - - "while": function() { - var captures; - if (captures = /^while +([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - return this.tok('code', 'while (' + captures[1] + ')'); - } - }, - - /** - * Each. - */ - - each: function() { - var captures; - if (captures = /^(?:- *)?(?:each|for) +(\w+)(?: *, *(\w+))? * in *([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - var tok = this.tok('each', captures[1]); - tok.key = captures[2] || '$index'; - tok.code = captures[3]; - return tok; - } - }, - - /** - * Code. - */ - - code: function() { - var captures; - if (captures = /^(!?=|-)([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - var flags = captures[1]; - captures[1] = captures[2]; - var tok = this.tok('code', captures[1]); - tok.escape = flags[0] === '='; - tok.buffer = flags[0] === '=' || flags[1] === '='; - return tok; - } - }, - - /** - * Attributes. - */ - - attrs: function() { - if ('(' == this.input.charAt(0)) { - var index = this.indexOfDelimiters('(', ')') - , str = this.input.substr(1, index-1) - , tok = this.tok('attrs') - , len = str.length - , colons = this.colons - , states = ['key'] - , escapedAttr - , key = '' - , val = '' - , quote - , c - , p; - - function state(){ - return states[states.length - 1]; - } - - function interpolate(attr) { - return attr.replace(/#\{([^}]+)\}/g, function(_, expr){ - return quote + " + (" + expr + ") + " + quote; - }); - } - - this.consume(index + 1); - tok.attrs = {}; - tok.escaped = {}; - - function parse(c) { - var real = c; - // TODO: remove when people fix ":" - if (colons && ':' == c) c = '='; - switch (c) { - case ',': - case '\n': - switch (state()) { - case 'expr': - case 'array': - case 'string': - case 'object': - val += c; - break; - default: - states.push('key'); - val = val.trim(); - key = key.trim(); - if ('' == key) return; - key = key.replace(/^['"]|['"]$/g, '').replace('!', ''); - tok.escaped[key] = escapedAttr; - tok.attrs[key] = '' == val - ? true - : interpolate(val); - key = val = ''; - } - break; - case '=': - switch (state()) { - case 'key char': - key += real; - break; - case 'val': - case 'expr': - case 'array': - case 'string': - case 'object': - val += real; - break; - default: - escapedAttr = '!' != p; - states.push('val'); - } - break; - case '(': - if ('val' == state() - || 'expr' == state()) states.push('expr'); - val += c; - break; - case ')': - if ('expr' == state() - || 'val' == state()) states.pop(); - val += c; - break; - case '{': - if ('val' == state()) states.push('object'); - val += c; - break; - case '}': - if ('object' == state()) states.pop(); - val += c; - break; - case '[': - if ('val' == state()) states.push('array'); - val += c; - break; - case ']': - if ('array' == state()) states.pop(); - val += c; - break; - case '"': - case "'": - switch (state()) { - case 'key': - states.push('key char'); - break; - case 'key char': - states.pop(); - break; - case 'string': - if (c == quote) states.pop(); - val += c; - break; - default: - states.push('string'); - val += c; - quote = c; - } - break; - case '': - break; - default: - switch (state()) { - case 'key': - case 'key char': - key += c; - break; - default: - val += c; - } - } - p = c; - } - - for (var i = 0; i < len; ++i) { - parse(str.charAt(i)); - } - - parse(','); - - if ('/' == this.input.charAt(0)) { - this.consume(1); - tok.selfClosing = true; - } - - return tok; - } - }, - - /** - * Indent | Outdent | Newline. - */ - - indent: function() { - var captures, re; - - // established regexp - if (this.indentRe) { - captures = this.indentRe.exec(this.input); - // determine regexp - } else { - // tabs - re = /^\n(\t*) */; - captures = re.exec(this.input); - - // spaces - if (captures && !captures[1].length) { - re = /^\n( *)/; - captures = re.exec(this.input); - } - - // established - if (captures && captures[1].length) this.indentRe = re; - } - - if (captures) { - var tok - , indents = captures[1].length; - - ++this.lineno; - this.consume(indents + 1); - - if (' ' == this.input[0] || '\t' == this.input[0]) { - throw new Error('Invalid indentation, you can use tabs or spaces but not both'); - } - - // blank line - if ('\n' == this.input[0]) return this.tok('newline'); - - // outdent - if (this.indentStack.length && indents < this.indentStack[0]) { - while (this.indentStack.length && this.indentStack[0] > indents) { - this.stash.push(this.tok('outdent')); - this.indentStack.shift(); - } - tok = this.stash.pop(); - // indent - } else if (indents && indents != this.indentStack[0]) { - this.indentStack.unshift(indents); - tok = this.tok('indent', indents); - // newline - } else { - tok = this.tok('newline'); - } - - return tok; - } - }, - - /** - * Pipe-less text consumed only when - * pipeless is true; - */ - - pipelessText: function() { - if (this.pipeless) { - if ('\n' == this.input[0]) return; - var i = this.input.indexOf('\n'); - if (-1 == i) i = this.input.length; - var str = this.input.substr(0, i); - this.consume(str.length); - return this.tok('text', str); - } - }, - - /** - * ':' - */ - - colon: function() { - return this.scan(/^: */, ':'); - }, - - /** - * Return the next token object, or those - * previously stashed by lookahead. - * - * @return {Object} - * @api private - */ - - advance: function(){ - return this.stashed() - || this.next(); - }, - - /** - * Return the next token object. - * - * @return {Object} - * @api private - */ - - next: function() { - return this.deferred() - || this.blank() - || this.eos() - || this.pipelessText() - || this.yield() - || this.doctype() - || this.interpolation() - || this["case"]() - || this.when() - || this["default"]() - || this["extends"]() - || this.append() - || this.prepend() - || this.block() - || this.include() - || this.mixin() - || this.call() - || this.conditional() - || this.each() - || this["while"]() - || this.assignment() - || this.tag() - || this.filter() - || this.code() - || this.id() - || this.className() - || this.attrs() - || this.indent() - || this.comment() - || this.colon() - || this.text(); - } -}; - -}); // module: lexer.js - -require.register("nodes/attrs.js", function(module, exports, require){ - -/*! - * Jade - nodes - Attrs - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'), - Block = require('./block'); - -/** - * Initialize a `Attrs` node. - * - * @api public - */ - -var Attrs = module.exports = function Attrs() { - this.attrs = []; -}; - -/** - * Inherit from `Node`. - */ - -Attrs.prototype = new Node; -Attrs.prototype.constructor = Attrs; - - -/** - * Set attribute `name` to `val`, keep in mind these become - * part of a raw js object literal, so to quote a value you must - * '"quote me"', otherwise or example 'user.name' is literal JavaScript. - * - * @param {String} name - * @param {String} val - * @param {Boolean} escaped - * @return {Tag} for chaining - * @api public - */ - -Attrs.prototype.setAttribute = function(name, val, escaped){ - this.attrs.push({ name: name, val: val, escaped: escaped }); - return this; -}; - -/** - * Remove attribute `name` when present. - * - * @param {String} name - * @api public - */ - -Attrs.prototype.removeAttribute = function(name){ - for (var i = 0, len = this.attrs.length; i < len; ++i) { - if (this.attrs[i] && this.attrs[i].name == name) { - delete this.attrs[i]; - } - } -}; - -/** - * Get attribute value by `name`. - * - * @param {String} name - * @return {String} - * @api public - */ - -Attrs.prototype.getAttribute = function(name){ - for (var i = 0, len = this.attrs.length; i < len; ++i) { - if (this.attrs[i] && this.attrs[i].name == name) { - return this.attrs[i].val; - } - } -}; - -}); // module: nodes/attrs.js - -require.register("nodes/block-comment.js", function(module, exports, require){ - -/*! - * Jade - nodes - BlockComment - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `BlockComment` with the given `block`. - * - * @param {String} val - * @param {Block} block - * @param {Boolean} buffer - * @api public - */ - -var BlockComment = module.exports = function BlockComment(val, block, buffer) { - this.block = block; - this.val = val; - this.buffer = buffer; -}; - -/** - * Inherit from `Node`. - */ - -BlockComment.prototype = new Node; -BlockComment.prototype.constructor = BlockComment; - -}); // module: nodes/block-comment.js - -require.register("nodes/block.js", function(module, exports, require){ - -/*! - * Jade - nodes - Block - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a new `Block` with an optional `node`. - * - * @param {Node} node - * @api public - */ - -var Block = module.exports = function Block(node){ - this.nodes = []; - if (node) this.push(node); -}; - -/** - * Inherit from `Node`. - */ - -Block.prototype = new Node; -Block.prototype.constructor = Block; - - -/** - * Block flag. - */ - -Block.prototype.isBlock = true; - -/** - * Replace the nodes in `other` with the nodes - * in `this` block. - * - * @param {Block} other - * @api private - */ - -Block.prototype.replace = function(other){ - other.nodes = this.nodes; -}; - -/** - * Pust the given `node`. - * - * @param {Node} node - * @return {Number} - * @api public - */ - -Block.prototype.push = function(node){ - return this.nodes.push(node); -}; - -/** - * Check if this block is empty. - * - * @return {Boolean} - * @api public - */ - -Block.prototype.isEmpty = function(){ - return 0 == this.nodes.length; -}; - -/** - * Unshift the given `node`. - * - * @param {Node} node - * @return {Number} - * @api public - */ - -Block.prototype.unshift = function(node){ - return this.nodes.unshift(node); -}; - -/** - * Return the "last" block, or the first `yield` node. - * - * @return {Block} - * @api private - */ - -Block.prototype.includeBlock = function(){ - var ret = this - , node; - - for (var i = 0, len = this.nodes.length; i < len; ++i) { - node = this.nodes[i]; - if (node.yield) return node; - else if (node.textOnly) continue; - else if (node.includeBlock) ret = node.includeBlock(); - else if (node.block && !node.block.isEmpty()) ret = node.block.includeBlock(); - } - - return ret; -}; - -/** - * Return a clone of this block. - * - * @return {Block} - * @api private - */ - -Block.prototype.clone = function(){ - var clone = new Block; - for (var i = 0, len = this.nodes.length; i < len; ++i) { - clone.push(this.nodes[i].clone()); - } - return clone; -}; - - -}); // module: nodes/block.js - -require.register("nodes/case.js", function(module, exports, require){ - -/*! - * Jade - nodes - Case - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a new `Case` with `expr`. - * - * @param {String} expr - * @api public - */ - -var Case = exports = module.exports = function Case(expr, block){ - this.expr = expr; - this.block = block; -}; - -/** - * Inherit from `Node`. - */ - -Case.prototype = new Node; -Case.prototype.constructor = Case; - - -var When = exports.When = function When(expr, block){ - this.expr = expr; - this.block = block; - this.debug = false; -}; - -/** - * Inherit from `Node`. - */ - -When.prototype = new Node; -When.prototype.constructor = When; - - - -}); // module: nodes/case.js - -require.register("nodes/code.js", function(module, exports, require){ - -/*! - * Jade - nodes - Code - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Code` node with the given code `val`. - * Code may also be optionally buffered and escaped. - * - * @param {String} val - * @param {Boolean} buffer - * @param {Boolean} escape - * @api public - */ - -var Code = module.exports = function Code(val, buffer, escape) { - this.val = val; - this.buffer = buffer; - this.escape = escape; - if (val.match(/^ *else/)) this.debug = false; -}; - -/** - * Inherit from `Node`. - */ - -Code.prototype = new Node; -Code.prototype.constructor = Code; - -}); // module: nodes/code.js - -require.register("nodes/comment.js", function(module, exports, require){ - -/*! - * Jade - nodes - Comment - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Comment` with the given `val`, optionally `buffer`, - * otherwise the comment may render in the output. - * - * @param {String} val - * @param {Boolean} buffer - * @api public - */ - -var Comment = module.exports = function Comment(val, buffer) { - this.val = val; - this.buffer = buffer; -}; - -/** - * Inherit from `Node`. - */ - -Comment.prototype = new Node; -Comment.prototype.constructor = Comment; - -}); // module: nodes/comment.js - -require.register("nodes/doctype.js", function(module, exports, require){ - -/*! - * Jade - nodes - Doctype - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Doctype` with the given `val`. - * - * @param {String} val - * @api public - */ - -var Doctype = module.exports = function Doctype(val) { - this.val = val; -}; - -/** - * Inherit from `Node`. - */ - -Doctype.prototype = new Node; -Doctype.prototype.constructor = Doctype; - -}); // module: nodes/doctype.js - -require.register("nodes/each.js", function(module, exports, require){ - -/*! - * Jade - nodes - Each - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize an `Each` node, representing iteration - * - * @param {String} obj - * @param {String} val - * @param {String} key - * @param {Block} block - * @api public - */ - -var Each = module.exports = function Each(obj, val, key, block) { - this.obj = obj; - this.val = val; - this.key = key; - this.block = block; -}; - -/** - * Inherit from `Node`. - */ - -Each.prototype = new Node; -Each.prototype.constructor = Each; - -}); // module: nodes/each.js - -require.register("nodes/filter.js", function(module, exports, require){ - -/*! - * Jade - nodes - Filter - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node') - , Block = require('./block'); - -/** - * Initialize a `Filter` node with the given - * filter `name` and `block`. - * - * @param {String} name - * @param {Block|Node} block - * @api public - */ - -var Filter = module.exports = function Filter(name, block, attrs) { - this.name = name; - this.block = block; - this.attrs = attrs; - this.isASTFilter = !block.nodes.every(function(node){ return node.isText }); -}; - -/** - * Inherit from `Node`. - */ - -Filter.prototype = new Node; -Filter.prototype.constructor = Filter; - -}); // module: nodes/filter.js - -require.register("nodes/index.js", function(module, exports, require){ - -/*! - * Jade - nodes - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -exports.Node = require('./node'); -exports.Tag = require('./tag'); -exports.Code = require('./code'); -exports.Each = require('./each'); -exports.Case = require('./case'); -exports.Text = require('./text'); -exports.Block = require('./block'); -exports.Mixin = require('./mixin'); -exports.Filter = require('./filter'); -exports.Comment = require('./comment'); -exports.Literal = require('./literal'); -exports.BlockComment = require('./block-comment'); -exports.Doctype = require('./doctype'); - -}); // module: nodes/index.js - -require.register("nodes/literal.js", function(module, exports, require){ - -/*! - * Jade - nodes - Literal - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Literal` node with the given `str. - * - * @param {String} str - * @api public - */ - -var Literal = module.exports = function Literal(str) { - this.str = str - .replace(/\\/g, "\\\\") - .replace(/\n|\r\n/g, "\\n") - .replace(/'/g, "\\'"); -}; - -/** - * Inherit from `Node`. - */ - -Literal.prototype = new Node; -Literal.prototype.constructor = Literal; - - -}); // module: nodes/literal.js - -require.register("nodes/mixin.js", function(module, exports, require){ - -/*! - * Jade - nodes - Mixin - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Attrs = require('./attrs'); - -/** - * Initialize a new `Mixin` with `name` and `block`. - * - * @param {String} name - * @param {String} args - * @param {Block} block - * @api public - */ - -var Mixin = module.exports = function Mixin(name, args, block, call){ - this.name = name; - this.args = args; - this.block = block; - this.attrs = []; - this.call = call; -}; - -/** - * Inherit from `Attrs`. - */ - -Mixin.prototype = new Attrs; -Mixin.prototype.constructor = Mixin; - - - -}); // module: nodes/mixin.js - -require.register("nodes/node.js", function(module, exports, require){ - -/*! - * Jade - nodes - Node - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Initialize a `Node`. - * - * @api public - */ - -var Node = module.exports = function Node(){}; - -/** - * Clone this node (return itself) - * - * @return {Node} - * @api private - */ - -Node.prototype.clone = function(){ - return this; -}; - -}); // module: nodes/node.js - -require.register("nodes/tag.js", function(module, exports, require){ - -/*! - * Jade - nodes - Tag - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Attrs = require('./attrs'), - Block = require('./block'), - inlineTags = require('../inline-tags'); - -/** - * Initialize a `Tag` node with the given tag `name` and optional `block`. - * - * @param {String} name - * @param {Block} block - * @api public - */ - -var Tag = module.exports = function Tag(name, block) { - this.name = name; - this.attrs = []; - this.block = block || new Block; -}; - -/** - * Inherit from `Attrs`. - */ - -Tag.prototype = new Attrs; -Tag.prototype.constructor = Tag; - - -/** - * Clone this tag. - * - * @return {Tag} - * @api private - */ - -Tag.prototype.clone = function(){ - var clone = new Tag(this.name, this.block.clone()); - clone.line = this.line; - clone.attrs = this.attrs; - clone.textOnly = this.textOnly; - return clone; -}; - -/** - * Check if this tag is an inline tag. - * - * @return {Boolean} - * @api private - */ - -Tag.prototype.isInline = function(){ - return ~inlineTags.indexOf(this.name); -}; - -/** - * Check if this tag's contents can be inlined. Used for pretty printing. - * - * @return {Boolean} - * @api private - */ - -Tag.prototype.canInline = function(){ - var nodes = this.block.nodes; - - function isInline(node){ - // Recurse if the node is a block - if (node.isBlock) return node.nodes.every(isInline); - return node.isText || (node.isInline && node.isInline()); - } - - // Empty tag - if (!nodes.length) return true; - - // Text-only or inline-only tag - if (1 == nodes.length) return isInline(nodes[0]); - - // Multi-line inline-only tag - if (this.block.nodes.every(isInline)) { - for (var i = 1, len = nodes.length; i < len; ++i) { - if (nodes[i-1].isText && nodes[i].isText) - return false; - } - return true; - } - - // Mixed tag - return false; -}; -}); // module: nodes/tag.js - -require.register("nodes/text.js", function(module, exports, require){ - -/*! - * Jade - nodes - Text - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Text` node with optional `line`. - * - * @param {String} line - * @api public - */ - -var Text = module.exports = function Text(line) { - this.val = ''; - if ('string' == typeof line) this.val = line; -}; - -/** - * Inherit from `Node`. - */ - -Text.prototype = new Node; -Text.prototype.constructor = Text; - - -/** - * Flag as text. - */ - -Text.prototype.isText = true; -}); // module: nodes/text.js - -require.register("parser.js", function(module, exports, require){ - -/*! - * Jade - Parser - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Lexer = require('./lexer') - , nodes = require('./nodes'); - -/** - * Initialize `Parser` with the given input `str` and `filename`. - * - * @param {String} str - * @param {String} filename - * @param {Object} options - * @api public - */ - -var Parser = exports = module.exports = function Parser(str, filename, options){ - this.input = str; - this.lexer = new Lexer(str, options); - this.filename = filename; - this.blocks = {}; - this.mixins = {}; - this.options = options; - this.contexts = [this]; -}; - -/** - * Tags that may not contain tags. - */ - -var textOnly = exports.textOnly = ['script', 'style']; - -/** - * Parser prototype. - */ - -Parser.prototype = { - - /** - * Push `parser` onto the context stack, - * or pop and return a `Parser`. - */ - - context: function(parser){ - if (parser) { - this.contexts.push(parser); - } else { - return this.contexts.pop(); - } - }, - - /** - * Return the next token object. - * - * @return {Object} - * @api private - */ - - advance: function(){ - return this.lexer.advance(); - }, - - /** - * Skip `n` tokens. - * - * @param {Number} n - * @api private - */ - - skip: function(n){ - while (n--) this.advance(); - }, - - /** - * Single token lookahead. - * - * @return {Object} - * @api private - */ - - peek: function() { - return this.lookahead(1); - }, - - /** - * Return lexer lineno. - * - * @return {Number} - * @api private - */ - - line: function() { - return this.lexer.lineno; - }, - - /** - * `n` token lookahead. - * - * @param {Number} n - * @return {Object} - * @api private - */ - - lookahead: function(n){ - return this.lexer.lookahead(n); - }, - - /** - * Parse input returning a string of js for evaluation. - * - * @return {String} - * @api public - */ - - parse: function(){ - var block = new nodes.Block, parser; - block.line = this.line(); - - while ('eos' != this.peek().type) { - if ('newline' == this.peek().type) { - this.advance(); - } else { - block.push(this.parseExpr()); - } - } - - if (parser = this.extending) { - this.context(parser); - var ast = parser.parse(); - this.context(); - // hoist mixins - for (var name in this.mixins) - ast.unshift(this.mixins[name]); - return ast; - } - - return block; - }, - - /** - * Expect the given type, or throw an exception. - * - * @param {String} type - * @api private - */ - - expect: function(type){ - if (this.peek().type === type) { - return this.advance(); - } else { - throw new Error('expected "' + type + '", but got "' + this.peek().type + '"'); - } - }, - - /** - * Accept the given `type`. - * - * @param {String} type - * @api private - */ - - accept: function(type){ - if (this.peek().type === type) { - return this.advance(); - } - }, - - /** - * tag - * | doctype - * | mixin - * | include - * | filter - * | comment - * | text - * | each - * | code - * | yield - * | id - * | class - * | interpolation - */ - - parseExpr: function(){ - switch (this.peek().type) { - case 'tag': - return this.parseTag(); - case 'mixin': - return this.parseMixin(); - case 'block': - return this.parseBlock(); - case 'case': - return this.parseCase(); - case 'when': - return this.parseWhen(); - case 'default': - return this.parseDefault(); - case 'extends': - return this.parseExtends(); - case 'include': - return this.parseInclude(); - case 'doctype': - return this.parseDoctype(); - case 'filter': - return this.parseFilter(); - case 'comment': - return this.parseComment(); - case 'text': - return this.parseText(); - case 'each': - return this.parseEach(); - case 'code': - return this.parseCode(); - case 'call': - return this.parseCall(); - case 'interpolation': - return this.parseInterpolation(); - case 'yield': - this.advance(); - var block = new nodes.Block; - block.yield = true; - return block; - case 'id': - case 'class': - var tok = this.advance(); - this.lexer.defer(this.lexer.tok('tag', 'div')); - this.lexer.defer(tok); - return this.parseExpr(); - default: - throw new Error('unexpected token "' + this.peek().type + '"'); - } - }, - - /** - * Text - */ - - parseText: function(){ - var tok = this.expect('text') - , node = new nodes.Text(tok.val); - node.line = this.line(); - return node; - }, - - /** - * ':' expr - * | block - */ - - parseBlockExpansion: function(){ - if (':' == this.peek().type) { - this.advance(); - return new nodes.Block(this.parseExpr()); - } else { - return this.block(); - } - }, - - /** - * case - */ - - parseCase: function(){ - var val = this.expect('case').val - , node = new nodes.Case(val); - node.line = this.line(); - node.block = this.block(); - return node; - }, - - /** - * when - */ - - parseWhen: function(){ - var val = this.expect('when').val - return new nodes.Case.When(val, this.parseBlockExpansion()); - }, - - /** - * default - */ - - parseDefault: function(){ - this.expect('default'); - return new nodes.Case.When('default', this.parseBlockExpansion()); - }, - - /** - * code - */ - - parseCode: function(){ - var tok = this.expect('code') - , node = new nodes.Code(tok.val, tok.buffer, tok.escape) - , block - , i = 1; - node.line = this.line(); - while (this.lookahead(i) && 'newline' == this.lookahead(i).type) ++i; - block = 'indent' == this.lookahead(i).type; - if (block) { - this.skip(i-1); - node.block = this.block(); - } - return node; - }, - - /** - * comment - */ - - parseComment: function(){ - var tok = this.expect('comment') - , node; - - if ('indent' == this.peek().type) { - node = new nodes.BlockComment(tok.val, this.block(), tok.buffer); - } else { - node = new nodes.Comment(tok.val, tok.buffer); - } - - node.line = this.line(); - return node; - }, - - /** - * doctype - */ - - parseDoctype: function(){ - var tok = this.expect('doctype') - , node = new nodes.Doctype(tok.val); - node.line = this.line(); - return node; - }, - - /** - * filter attrs? text-block - */ - - parseFilter: function(){ - var block - , tok = this.expect('filter') - , attrs = this.accept('attrs'); - - this.lexer.pipeless = true; - block = this.parseTextBlock(); - this.lexer.pipeless = false; - - var node = new nodes.Filter(tok.val, block, attrs && attrs.attrs); - node.line = this.line(); - return node; - }, - - /** - * tag ':' attrs? block - */ - - parseASTFilter: function(){ - var block - , tok = this.expect('tag') - , attrs = this.accept('attrs'); - - this.expect(':'); - block = this.block(); - - var node = new nodes.Filter(tok.val, block, attrs && attrs.attrs); - node.line = this.line(); - return node; - }, - - /** - * each block - */ - - parseEach: function(){ - var tok = this.expect('each') - , node = new nodes.Each(tok.code, tok.val, tok.key); - node.line = this.line(); - node.block = this.block(); - return node; - }, - - /** - * 'extends' name - */ - - parseExtends: function(){ - var path = require('path') - , fs = require('fs') - , dirname = path.dirname - , basename = path.basename - , join = path.join; - - if (!this.filename) - throw new Error('the "filename" option is required to extend templates'); - - var path = this.expect('extends').val.trim() - , dir = dirname(this.filename); - - var path = join(dir, path + '.jade') - , str = fs.readFileSync(path, 'utf8') - , parser = new Parser(str, path, this.options); - - parser.blocks = this.blocks; - parser.contexts = this.contexts; - this.extending = parser; - - // TODO: null node - return new nodes.Literal(''); - }, - - /** - * 'block' name block - */ - - parseBlock: function(){ - var block = this.expect('block') - , mode = block.mode - , name = block.val.trim(); - - block = 'indent' == this.peek().type - ? this.block() - : new nodes.Block(new nodes.Literal('')); - - var prev = this.blocks[name]; - - if (prev) { - switch (prev.mode) { - case 'append': - block.nodes = block.nodes.concat(prev.nodes); - prev = block; - break; - case 'prepend': - block.nodes = prev.nodes.concat(block.nodes); - prev = block; - break; - } - } - - block.mode = mode; - return this.blocks[name] = prev || block; - }, - - /** - * include block? - */ - - parseInclude: function(){ - var path = require('path') - , fs = require('fs') - , dirname = path.dirname - , basename = path.basename - , join = path.join; - - var path = this.expect('include').val.trim() - , dir = dirname(this.filename); - - if (!this.filename) - throw new Error('the "filename" option is required to use includes'); - - // no extension - if (!~basename(path).indexOf('.')) { - path += '.jade'; - } - - // non-jade - if ('.jade' != path.substr(-5)) { - var path = join(dir, path) - , str = fs.readFileSync(path, 'utf8'); - return new nodes.Literal(str); - } - - var path = join(dir, path) - , str = fs.readFileSync(path, 'utf8') - , parser = new Parser(str, path, this.options); - parser.blocks = this.blocks; - parser.mixins = this.mixins; - - this.context(parser); - var ast = parser.parse(); - this.context(); - ast.filename = path; - - if ('indent' == this.peek().type) { - ast.includeBlock().push(this.block()); - } - - return ast; - }, - - /** - * call ident block - */ - - parseCall: function(){ - var tok = this.expect('call') - , name = tok.val - , args = tok.args - , mixin = new nodes.Mixin(name, args, new nodes.Block, true); - - this.tag(mixin); - if (mixin.block.isEmpty()) mixin.block = null; - return mixin; - }, - - /** - * mixin block - */ - - parseMixin: function(){ - var tok = this.expect('mixin') - , name = tok.val - , args = tok.args - , mixin; - - // definition - if ('indent' == this.peek().type) { - mixin = new nodes.Mixin(name, args, this.block(), false); - this.mixins[name] = mixin; - return mixin; - // call - } else { - return new nodes.Mixin(name, args, null, true); - } - }, - - /** - * indent (text | newline)* outdent - */ - - parseTextBlock: function(){ - var block = new nodes.Block; - block.line = this.line(); - var spaces = this.expect('indent').val; - if (null == this._spaces) this._spaces = spaces; - var indent = Array(spaces - this._spaces + 1).join(' '); - while ('outdent' != this.peek().type) { - switch (this.peek().type) { - case 'newline': - this.advance(); - break; - case 'indent': - this.parseTextBlock().nodes.forEach(function(node){ - block.push(node); - }); - break; - default: - var text = new nodes.Text(indent + this.advance().val); - text.line = this.line(); - block.push(text); - } - } - - if (spaces == this._spaces) this._spaces = null; - this.expect('outdent'); - return block; - }, - - /** - * indent expr* outdent - */ - - block: function(){ - var block = new nodes.Block; - block.line = this.line(); - this.expect('indent'); - while ('outdent' != this.peek().type) { - if ('newline' == this.peek().type) { - this.advance(); - } else { - block.push(this.parseExpr()); - } - } - this.expect('outdent'); - return block; - }, - - /** - * interpolation (attrs | class | id)* (text | code | ':')? newline* block? - */ - - parseInterpolation: function(){ - var tok = this.advance(); - var tag = new nodes.Tag(tok.val); - tag.buffer = true; - return this.tag(tag); - }, - - /** - * tag (attrs | class | id)* (text | code | ':')? newline* block? - */ - - parseTag: function(){ - // ast-filter look-ahead - var i = 2; - if ('attrs' == this.lookahead(i).type) ++i; - if (':' == this.lookahead(i).type) { - if ('indent' == this.lookahead(++i).type) { - return this.parseASTFilter(); - } - } - - var tok = this.advance() - , tag = new nodes.Tag(tok.val); - - tag.selfClosing = tok.selfClosing; - - return this.tag(tag); - }, - - /** - * Parse tag. - */ - - tag: function(tag){ - var dot; - - tag.line = this.line(); - - // (attrs | class | id)* - out: - while (true) { - switch (this.peek().type) { - case 'id': - case 'class': - var tok = this.advance(); - tag.setAttribute(tok.type, "'" + tok.val + "'"); - continue; - case 'attrs': - var tok = this.advance() - , obj = tok.attrs - , escaped = tok.escaped - , names = Object.keys(obj); - - if (tok.selfClosing) tag.selfClosing = true; - - for (var i = 0, len = names.length; i < len; ++i) { - var name = names[i] - , val = obj[name]; - tag.setAttribute(name, val, escaped[name]); - } - continue; - default: - break out; - } - } - - // check immediate '.' - if ('.' == this.peek().val) { - dot = tag.textOnly = true; - this.advance(); - } - - // (text | code | ':')? - switch (this.peek().type) { - case 'text': - tag.block.push(this.parseText()); - break; - case 'code': - tag.code = this.parseCode(); - break; - case ':': - this.advance(); - tag.block = new nodes.Block; - tag.block.push(this.parseExpr()); - break; - } - - // newline* - while ('newline' == this.peek().type) this.advance(); - - tag.textOnly = tag.textOnly || ~textOnly.indexOf(tag.name); - - // script special-case - if ('script' == tag.name) { - var type = tag.getAttribute('type'); - if (!dot && type && 'text/javascript' != type.replace(/^['"]|['"]$/g, '')) { - tag.textOnly = false; - } - } - - // block? - if ('indent' == this.peek().type) { - if (tag.textOnly) { - this.lexer.pipeless = true; - tag.block = this.parseTextBlock(); - this.lexer.pipeless = false; - } else { - var block = this.block(); - if (tag.block) { - for (var i = 0, len = block.nodes.length; i < len; ++i) { - tag.block.push(block.nodes[i]); - } - } else { - tag.block = block; - } - } - } - - return tag; - } -}; - -}); // module: parser.js - -require.register("runtime.js", function(module, exports, require){ - -/*! - * Jade - runtime - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Lame Array.isArray() polyfill for now. - */ - -if (!Array.isArray) { - Array.isArray = function(arr){ - return '[object Array]' == Object.prototype.toString.call(arr); - }; -} - -/** - * Lame Object.keys() polyfill for now. - */ - -if (!Object.keys) { - Object.keys = function(obj){ - var arr = []; - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - arr.push(key); - } - } - return arr; - } -} - -/** - * Merge two attribute objects giving precedence - * to values in object `b`. Classes are special-cased - * allowing for arrays and merging/joining appropriately - * resulting in a string. - * - * @param {Object} a - * @param {Object} b - * @return {Object} a - * @api private - */ - -exports.merge = function merge(a, b) { - var ac = a['class']; - var bc = b['class']; - - if (ac || bc) { - ac = ac || []; - bc = bc || []; - if (!Array.isArray(ac)) ac = [ac]; - if (!Array.isArray(bc)) bc = [bc]; - ac = ac.filter(nulls); - bc = bc.filter(nulls); - a['class'] = ac.concat(bc).join(' '); - } - - for (var key in b) { - if (key != 'class') { - a[key] = b[key]; - } - } - - return a; -}; - -/** - * Filter null `val`s. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - -function nulls(val) { - return val != null; -} - -/** - * Render the given attributes object. - * - * @param {Object} obj - * @param {Object} escaped - * @return {String} - * @api private - */ - -exports.attrs = function attrs(obj, escaped){ - var buf = [] - , terse = obj.terse; - - delete obj.terse; - var keys = Object.keys(obj) - , len = keys.length; - - if (len) { - buf.push(''); - for (var i = 0; i < len; ++i) { - var key = keys[i] - , val = obj[key]; - - if ('boolean' == typeof val || null == val) { - if (val) { - terse - ? buf.push(key) - : buf.push(key + '="' + key + '"'); - } - } else if (0 == key.indexOf('data') && 'string' != typeof val) { - buf.push(key + "='" + JSON.stringify(val) + "'"); - } else if ('class' == key && Array.isArray(val)) { - buf.push(key + '="' + exports.escape(val.join(' ')) + '"'); - } else if (escaped && escaped[key]) { - buf.push(key + '="' + exports.escape(val) + '"'); - } else { - buf.push(key + '="' + val + '"'); - } - } - } - - return buf.join(' '); -}; - -/** - * Escape the given string of `html`. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function escape(html){ - return String(html) - .replace(/&(?!(\w+|\#\d+);)/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); -}; - -/** - * Re-throw the given `err` in context to the - * the jade in `filename` at the given `lineno`. - * - * @param {Error} err - * @param {String} filename - * @param {String} lineno - * @api private - */ - -exports.rethrow = function rethrow(err, filename, lineno){ - if (!filename) throw err; - - var context = 3 - , str = require('fs').readFileSync(filename, 'utf8') - , lines = str.split('\n') - , start = Math.max(lineno - context, 0) - , end = Math.min(lines.length, lineno + context); - - // Error context - var context = lines.slice(start, end).map(function(line, i){ - var curr = i + start + 1; - return (curr == lineno ? ' > ' : ' ') - + curr - + '| ' - + line; - }).join('\n'); - - // Alter exception message - err.path = filename; - err.message = (filename || 'Jade') + ':' + lineno - + '\n' + context + '\n\n' + err.message; - throw err; -}; - -}); // module: runtime.js - -require.register("self-closing.js", function(module, exports, require){ - -/*! - * Jade - self closing tags - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = [ - 'meta' - , 'img' - , 'link' - , 'input' - , 'source' - , 'area' - , 'base' - , 'col' - , 'br' - , 'hr' -]; -}); // module: self-closing.js - -require.register("utils.js", function(module, exports, require){ - -/*! - * Jade - utils - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Convert interpolation in the given string to JavaScript. - * - * @param {String} str - * @return {String} - * @api private - */ - -var interpolate = exports.interpolate = function(str){ - return str.replace(/(\\)?([#!]){(.*?)}/g, function(str, escape, flag, code){ - return escape - ? str - : "' + " - + ('!' == flag ? '' : 'escape') - + "((interp = " + code.replace(/\\'/g, "'") - + ") == null ? '' : interp) + '"; - }); -}; - -/** - * Escape single quotes in `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -var escape = exports.escape = function(str) { - return str.replace(/'/g, "\\'"); -}; - -/** - * Interpolate, and escape the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.text = function(str){ - return interpolate(escape(str)); -}; -}); // module: utils.js - -window.jade = require("jade"); -})(); diff --git a/node_modules/mocha/node_modules/jade/jade.md b/node_modules/mocha/node_modules/jade/jade.md deleted file mode 100644 index 051dc031..00000000 --- a/node_modules/mocha/node_modules/jade/jade.md +++ /dev/null @@ -1,510 +0,0 @@ - -# Jade - - The jade template engine for node.js - -## Synopsis - - jade [-h|--help] [-v|--version] [-o|--obj STR] - [-O|--out DIR] [-p|--path PATH] [-P|--pretty] - [-c|--client] [-D|--no-debug] - -## Examples - - translate jade the templates dir - - $ jade templates - - create {foo,bar}.html - - $ jade {foo,bar}.jade - - jade over stdio - - $ jade < my.jade > my.html - - jade over s - - $ echo "h1 Jade!" | jade - - foo, bar dirs rendering to /tmp - - $ jade foo bar --out /tmp - - compile client-side templates without debugging - instrumentation, making the output javascript - very light-weight. This requires runtime.js - in your projects. - - $ jade --client --no-debug < my.jade - -## Tags - - Tags are simply nested via whitespace, closing - tags defined for you. These indents are called "blocks". - - ul - li - a Foo - li - a Bar - - You may have several tags in one "block": - - ul - li - a Foo - a Bar - a Baz - -## Self-closing Tags - - Some tags are flagged as self-closing by default, such - as `meta`, `link`, and so on. To explicitly self-close - a tag simply append the `/` character: - - foo/ - foo(bar='baz')/ - - Would yield: - - - - -## Attributes - - Tag attributes look similar to HTML, however - the values are regular JavaScript, here are - some examples: - - a(href='google.com') Google - a(class='button', href='google.com') Google - - As mentioned the attribute values are just JavaScript, - this means ternary operations and other JavaScript expressions - work just fine: - - body(class=user.authenticated ? 'authenticated' : 'anonymous') - a(href=user.website || 'http://google.com') - - Multiple lines work too: - - input(type='checkbox', - name='agreement', - checked) - - Multiple lines without the comma work fine: - - input(type='checkbox' - name='agreement' - checked) - - Funky whitespace? fine: - - input( - type='checkbox' - name='agreement' - checked) - -## Boolean attributes - - Boolean attributes are mirrored by Jade, and accept - bools, aka _true_ or _false_. When no value is specified - _true_ is assumed. For example: - - input(type="checkbox", checked) - // => "" - - For example if the checkbox was for an agreement, perhaps `user.agreed` - was _true_ the following would also output 'checked="checked"': - - input(type="checkbox", checked=user.agreed) - -## Class attributes - - The _class_ attribute accepts an array of classes, - this can be handy when generated from a javascript - function etc: - - classes = ['foo', 'bar', 'baz'] - a(class=classes) - // => "" - -## Class literal - - Classes may be defined using a ".CLASSNAME" syntax: - - .button - // => "
        " - - Or chained: - - .large.button - // => "
        " - - The previous defaulted to divs, however you - may also specify the tag type: - - h1.title My Title - // => "

        My Title

        " - -## Id literal - - Much like the class literal there's an id literal: - - #user-1 - // => "
        " - - Again we may specify the tag as well: - - ul#menu - li: a(href='/home') Home - li: a(href='/store') Store - li: a(href='/contact') Contact - - Finally all of these may be used in any combination, - the following are all valid tags: - - a.button#contact(style: 'color: red') Contact - a.button(style: 'color: red')#contact Contact - a(style: 'color: red').button#contact Contact - -## Block expansion - - Jade supports the concept of "block expansion", in which - using a trailing ":" after a tag will inject a block: - - ul - li: a Foo - li: a Bar - li: a Baz - -## Text - - Arbitrary text may follow tags: - - p Welcome to my site - - yields: - -

        Welcome to my site

        - -## Pipe text - - Another form of text is "pipe" text. Pipes act - as the text margin for large bodies of text. - - p - | This is a large - | body of text for - | this tag. - | - | Nothing too - | exciting. - - yields: - -

        This is a large - body of text for - this tag. - - Nothing too - exciting. -

        - - Using pipes we can also specify regular Jade tags - within the text: - - p - | Click to visit - a(href='http://google.com') Google - | if you want. - -## Text only tags - - As an alternative to pipe text you may add - a trailing "." to indicate that the block - contains nothing but plain-text, no tags: - - p. - This is a large - body of text for - this tag. - - Nothing too - exciting. - - Some tags are text-only by default, for example - _script_, _textarea_, and _style_ tags do not - contain nested HTML so Jade implies the trailing ".": - - script - if (foo) { - bar(); - } - - style - body { - padding: 50px; - font: 14px Helvetica; - } - -## Template script tags - - Sometimes it's useful to define HTML in script - tags using Jade, typically for client-side templates. - - To do this simply give the _script_ tag an arbitrary - _type_ attribute such as _text/x-template_: - - script(type='text/template') - h1 Look! - p Jade still works in here! - -## Interpolation - - Both plain-text and piped-text support interpolation, - which comes in two forms, escapes and non-escaped. The - following will output the _user.name_ in the paragraph - but HTML within it will be escaped to prevent XSS attacks: - - p Welcome #{user.name} - - The following syntax is identical however it will _not_ escape - HTML, and should only be used with strings that you trust: - - p Welcome !{user.name} - -## Inline HTML - - Sometimes constructing small inline snippets of HTML - in Jade can be annoying, luckily we can add plain - HTML as well: - - p Welcome #{user.name} - -## Code - - To buffer output with Jade simply use _=_ at the beginning - of a line or after a tag. This method escapes any HTML - present in the string. - - p= user.description - - To buffer output unescaped use the _!=_ variant, but again - be careful of XSS. - - p!= user.description - - The final way to mess with JavaScript code in Jade is the unbuffered - _-_, which can be used for conditionals, defining variables etc: - - - var user = { description: 'foo bar baz' } - #user - - if (user.description) { - h2 Description - p.description= user.description - - } - - When compiled blocks are wrapped in anonymous functions, so the - following is also valid, without braces: - - - var user = { description: 'foo bar baz' } - #user - - if (user.description) - h2 Description - p.description= user.description - - If you really want you could even use `.forEach()` and others: - - - users.forEach(function(user){ - .user - h2= user.name - p User #{user.name} is #{user.age} years old - - }) - - Taking this further Jade provides some syntax for conditionals, - iteration, switch statements etc. Let's look at those next! - -## Assignment - - Jade's first-class assignment is simple, simply use the _=_ - operator and Jade will _var_ it for you. The following are equivalent: - - - var user = { name: 'tobi' } - user = { name: 'tobi' } - -## Conditionals - - Jade's first-class conditional syntax allows for optional - parenthesis, and you may now omit the leading _-_ otherwise - it's identical, still just regular javascript: - - user = { description: 'foo bar baz' } - #user - if user.description - h2 Description - p.description= user.description - - Jade provides the negated version, _unless_ as well, the following - are equivalent: - - - if (!(user.isAnonymous)) - p You're logged in as #{user.name} - - unless user.isAnonymous - p You're logged in as #{user.name} - -## Iteration - - JavaScript's _for_ loops don't look very declarative, so Jade - also provides its own _for_ loop construct, aliased as _each_: - - for user in users - .user - h2= user.name - p user #{user.name} is #{user.age} year old - - As mentioned _each_ is identical: - - each user in users - .user - h2= user.name - - If necessary the index is available as well: - - for user, i in users - .user(class='user-#{i}') - h2= user.name - - Remember, it's just JavaScript: - - ul#letters - for letter in ['a', 'b', 'c'] - li= letter - -## Mixins - - Mixins provide a way to define jade "functions" which "mix in" - their contents when called. This is useful for abstracting - out large fragments of Jade. - - The simplest possible mixin which accepts no arguments might - look like this: - - mixin hello - p Hello - - You use a mixin by placing `+` before the name: - - +hello - - For something a little more dynamic, mixins can take - arguments, the mixin itself is converted to a javascript - function internally: - - mixin hello(user) - p Hello #{user} - - +hello('Tobi') - - Yields: - -

        Hello Tobi

        - - Mixins may optionally take blocks, when a block is passed - its contents becomes the implicit `block` argument. For - example here is a mixin passed a block, and also invoked - without passing a block: - - mixin article(title) - .article - .article-wrapper - h1= title - if block - block - else - p No content provided - - +article('Hello world') - - +article('Hello world') - p This is my - p Amazing article - - yields: - -
        -
        -

        Hello world

        -

        No content provided

        -
        -
        - -
        -
        -

        Hello world

        -

        This is my

        -

        Amazing article

        -
        -
        - - Mixins can even take attributes, just like a tag. When - attributes are passed they become the implicit `attributes` - argument. Individual attributes can be accessed just like - normal object properties: - - mixin centered - .centered(class=attributes.class) - block - - +centered.bold Hello world - - +centered.red - p This is my - p Amazing article - - yields: - -
        Hello world
        -
        -

        This is my

        -

        Amazing article

        -
        - - If you use `attributes` directly, *all* passed attributes - get used: - - mixin link - a.menu(attributes) - block - - +link.highlight(href='#top') Top - +link#sec1.plain(href='#section1') Section 1 - +link#sec2.plain(href='#section2') Section 2 - - yields: - - Top - Section 1 - Section 2 - - If you pass arguments, they must directly follow the mixin: - - mixin list(arr) - if block - .title - block - ul(attributes) - each item in arr - li= item - - +list(['foo', 'bar', 'baz'])(id='myList', class='bold') - - yields: - -
          -
        • foo
        • -
        • bar
        • -
        • baz
        • -
        diff --git a/node_modules/mocha/node_modules/jade/jade.min.js b/node_modules/mocha/node_modules/jade/jade.min.js deleted file mode 100644 index 72e4535e..00000000 --- a/node_modules/mocha/node_modules/jade/jade.min.js +++ /dev/null @@ -1,2 +0,0 @@ -(function(){function require(p){var path=require.resolve(p),mod=require.modules[path];if(!mod)throw new Error('failed to require "'+p+'"');return mod.exports||(mod.exports={},mod.call(mod.exports,mod,mod.exports,require.relative(path))),mod.exports}require.modules={},require.resolve=function(path){var orig=path,reg=path+".js",index=path+"/index.js";return require.modules[reg]&®||require.modules[index]&&index||orig},require.register=function(path,fn){require.modules[path]=fn},require.relative=function(parent){return function(p){if("."!=p.charAt(0))return require(p);var path=parent.split("/"),segs=p.split("/");path.pop();for(var i=0;i",this.doctype=doctype,this.terse="5"==name||"html"==name,this.xml=0==this.doctype.indexOf("1&&!escape&&block.nodes[0].isText&&block.nodes[1].isText&&this.prettyIndent(1,!0);for(var i=0;i0&&!escape&&block.nodes[i].isText&&block.nodes[i-1].isText&&this.prettyIndent(1,!1),this.visit(block.nodes[i]),block.nodes[i+1]&&block.nodes[i].isText&&block.nodes[i+1].isText&&this.buffer("\\n")},visitDoctype:function(doctype){doctype&&(doctype.val||!this.doctype)&&this.setDoctype(doctype.val||"default"),this.doctype&&this.buffer(this.doctype),this.hasCompiledDoctype=!0},visitMixin:function(mixin){var name=mixin.name.replace(/-/g,"_")+"_mixin",args=mixin.args||"",block=mixin.block,attrs=mixin.attrs,pp=this.pp;if(mixin.call){pp&&this.buf.push("__indent.push('"+Array(this.indents+1).join(" ")+"');");if(block||attrs.length){this.buf.push(name+".call({");if(block){this.buf.push("block: function(){"),this.parentIndents++;var _indents=this.indents;this.indents=0,this.visit(mixin.block),this.indents=_indents,this.parentIndents--,attrs.length?this.buf.push("},"):this.buf.push("}")}if(attrs.length){var val=this.attrs(attrs);val.inherits?this.buf.push("attributes: merge({"+val.buf+"}, attributes), escaped: merge("+val.escaped+", escaped, true)"):this.buf.push("attributes: {"+val.buf+"}, escaped: "+val.escaped)}args?this.buf.push("}, "+args+");"):this.buf.push("});")}else this.buf.push(name+"("+args+");");pp&&this.buf.push("__indent.pop();")}else this.buf.push("var "+name+" = function("+args+"){"),this.buf.push("var block = this.block, attributes = this.attributes || {}, escaped = this.escaped || {};"),this.parentIndents++,this.visit(block),this.parentIndents--,this.buf.push("};")},visitTag:function(tag){this.indents++;var name=tag.name,pp=this.pp;tag.buffer&&(name="' + ("+name+") + '"),this.hasCompiledTag||(!this.hasCompiledDoctype&&"html"==name&&this.visitDoctype(),this.hasCompiledTag=!0),pp&&!tag.isInline()&&this.prettyIndent(0,!0),(~selfClosing.indexOf(name)||tag.selfClosing)&&!this.xml?(this.buffer("<"+name),this.visitAttributes(tag.attrs),this.terse?this.buffer(">"):this.buffer("/>")):(tag.attrs.length?(this.buffer("<"+name),tag.attrs.length&&this.visitAttributes(tag.attrs),this.buffer(">")):this.buffer("<"+name+">"),tag.code&&this.visitCode(tag.code),this.escape="pre"==tag.name,this.visit(tag.block),pp&&!tag.isInline()&&"pre"!=tag.name&&!tag.canInline()&&this.prettyIndent(0,!0),this.buffer("")),this.indents--},visitFilter:function(filter){var fn=filters[filter.name];if(!fn)throw filter.isASTFilter?new Error('unknown ast filter "'+filter.name+':"'):new Error('unknown filter ":'+filter.name+'"');if(filter.isASTFilter)this.buf.push(fn(filter.block,this,filter.attrs));else{var text=filter.block.nodes.map(function(node){return node.val}).join("\n");filter.attrs=filter.attrs||{},filter.attrs.filename=this.options.filename,this.buffer(utils.text(fn(text,filter.attrs)))}},visitText:function(text){text=utils.text(text.val.replace(/\\/g,"\\\\")),this.escape&&(text=escape(text)),this.buffer(text)},visitComment:function(comment){if(!comment.buffer)return;this.pp&&this.prettyIndent(1,!0),this.buffer("")},visitBlockComment:function(comment){if(!comment.buffer)return;0==comment.val.trim().indexOf("if")?(this.buffer("")):(this.buffer(""))},visitCode:function(code){if(code.buffer){var val=code.val.trimLeft();this.buf.push("var __val__ = "+val),val='null == __val__ ? "" : __val__',code.escape&&(val="escape("+val+")"),this.buf.push("buf.push("+val+");")}else this.buf.push(code.val);code.block&&(code.buffer||this.buf.push("{"),this.visit(code.block),code.buffer||this.buf.push("}"))},visitEach:function(each){this.buf.push("// iterate "+each.obj+"\n"+";(function(){\n"+" if ('number' == typeof "+each.obj+".length) {\n"+" for (var "+each.key+" = 0, $$l = "+each.obj+".length; "+each.key+" < $$l; "+each.key+"++) {\n"+" var "+each.val+" = "+each.obj+"["+each.key+"];\n"),this.visit(each.block),this.buf.push(" }\n } else {\n for (var "+each.key+" in "+each.obj+") {\n"+" if ("+each.obj+".hasOwnProperty("+each.key+")){"+" var "+each.val+" = "+each.obj+"["+each.key+"];\n"),this.visit(each.block),this.buf.push(" }\n"),this.buf.push(" }\n }\n}).call(this);\n")},visitAttributes:function(attrs){var val=this.attrs(attrs);val.inherits?this.buf.push("buf.push(attrs(merge({ "+val.buf+" }, attributes), merge("+val.escaped+", escaped, true)));"):val.constant?(eval("var buf={"+val.buf+"};"),this.buffer(runtime.attrs(buf,JSON.parse(val.escaped)),!0)):this.buf.push("buf.push(attrs({ "+val.buf+" }, "+val.escaped+"));")},attrs:function(attrs){var buf=[],classes=[],escaped={},constant=attrs.every(function(attr){return isConstant(attr.val)}),inherits=!1;return this.terse&&buf.push("terse: true"),attrs.forEach(function(attr){if(attr.name=="attributes")return inherits=!0;escaped[attr.name]=attr.escaped;if(attr.name=="class")classes.push("("+attr.val+")");else{var pair="'"+attr.name+"':("+attr.val+")";buf.push(pair)}}),classes.length&&(classes=classes.join(" + ' ' + "),buf.push("class: "+classes)),{buf:buf.join(", ").replace("class:",'"class":'),escaped:JSON.stringify(escaped),inherits:inherits,constant:constant}}};function isConstant(val){if(/^ *("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'|true|false|null|undefined) *$/i.test(val))return!0;if(!isNaN(Number(val)))return!0;var matches;return(matches=/^ *\[(.*)\] *$/.exec(val))?matches[1].split(",").every(isConstant):!1}function escape(html){return String(html).replace(/&(?!\w+;)/g,"&").replace(//g,">").replace(/"/g,""")}}),require.register("doctypes.js",function(module,exports,require){module.exports={5:"","default":"",xml:'',transitional:'',strict:'',frameset:'',1.1:'',basic:'',mobile:''}}),require.register("filters.js",function(module,exports,require){module.exports={cdata:function(str){return""},sass:function(str){str=str.replace(/\\n/g,"\n");var sass=require("sass").render(str).replace(/\n/g,"\\n");return'"},stylus:function(str,options){var ret;str=str.replace(/\\n/g,"\n");var stylus=require("stylus");return stylus(str,options).render(function(err,css){if(err)throw err;ret=css.replace(/\n/g,"\\n")}),'"},less:function(str){var ret;return str=str.replace(/\\n/g,"\n"),require("less").render(str,function(err,css){if(err)throw err;ret='"}),ret},markdown:function(str){var md;try{md=require("markdown")}catch(err){try{md=require("discount")}catch(err){try{md=require("markdown-js")}catch(err){try{md=require("marked")}catch(err){throw new Error("Cannot find markdown library, install markdown, discount, or marked.")}}}}return str=str.replace(/\\n/g,"\n"),md.parse(str).replace(/\n/g,"\\n").replace(/'/g,"'")},coffeescript:function(str){str=str.replace(/\\n/g,"\n");var js=require("coffee-script").compile(str).replace(/\\/g,"\\\\").replace(/\n/g,"\\n");return'"}}}),require.register("inline-tags.js",function(module,exports,require){module.exports=["a","abbr","acronym","b","br","code","em","font","i","img","ins","kbd","map","samp","small","span","strong","sub","sup"]}),require.register("jade.js",function(module,exports,require){var Parser=require("./parser"),Lexer=require("./lexer"),Compiler=require("./compiler"),runtime=require("./runtime");exports.version="0.26.1",exports.selfClosing=require("./self-closing"),exports.doctypes=require("./doctypes"),exports.filters=require("./filters"),exports.utils=require("./utils"),exports.Compiler=Compiler,exports.Parser=Parser,exports.Lexer=Lexer,exports.nodes=require("./nodes"),exports.runtime=runtime,exports.cache={};function parse(str,options){try{var parser=new Parser(str,options.filename,options),compiler=new(options.compiler||Compiler)(parser.parse(),options),js=compiler.compile();return options.debug&&console.error("\nCompiled Function:\n\n%s",js.replace(/^/gm," ")),"var buf = [];\n"+(options.self?"var self = locals || {};\n"+js:"with (locals || {}) {\n"+js+"\n}\n")+'return buf.join("");'}catch(err){parser=parser.context(),runtime.rethrow(err,parser.filename,parser.lexer.lineno)}}exports.compile=function(str,options){var options=options||{},client=options.client,filename=options.filename?JSON.stringify(options.filename):"undefined",fn;return options.compileDebug!==!1?fn=["var __jade = [{ lineno: 1, filename: "+filename+" }];","try {",parse(String(str),options),"} catch (err) {"," rethrow(err, __jade[0].filename, __jade[0].lineno);","}"].join("\n"):fn=parse(String(str),options),client&&(fn="attrs = attrs || jade.attrs; escape = escape || jade.escape; rethrow = rethrow || jade.rethrow; merge = merge || jade.merge;\n"+fn),fn=new Function("locals, attrs, escape, rethrow, merge",fn),client?fn:function(locals){return fn(locals,runtime.attrs,runtime.escape,runtime.rethrow,runtime.merge)}},exports.render=function(str,options,fn){"function"==typeof options&&(fn=options,options={});if(options.cache&&!options.filename)return fn(new Error('the "filename" option is required for caching'));try{var path=options.filename,tmpl=options.cache?exports.cache[path]||(exports.cache[path]=exports.compile(str,options)):exports.compile(str,options);fn(null,tmpl(options))}catch(err){fn(err)}},exports.renderFile=function(path,options,fn){var key=path+":string";"function"==typeof options&&(fn=options,options={});try{options.filename=path;var str=options.cache?exports.cache[key]||(exports.cache[key]=fs.readFileSync(path,"utf8")):fs.readFileSync(path,"utf8");exports.render(str,options,fn)}catch(err){fn(err)}},exports.__express=exports.renderFile}),require.register("lexer.js",function(module,exports,require){var Lexer=module.exports=function Lexer(str,options){options=options||{},this.input=str.replace(/\r\n|\r/g,"\n"),this.colons=options.colons,this.deferredTokens=[],this.lastIndents=0,this.lineno=1,this.stash=[],this.indentStack=[],this.indentRe=null,this.pipeless=!1};Lexer.prototype={tok:function(type,val){return{type:type,line:this.lineno,val:val}},consume:function(len){this.input=this.input.substr(len)},scan:function(regexp,type){var captures;if(captures=regexp.exec(this.input))return this.consume(captures[0].length),this.tok(type,captures[1])},defer:function(tok){this.deferredTokens.push(tok)},lookahead:function(n){var fetch=n-this.stash.length;while(fetch-->0)this.stash.push(this.next());return this.stash[--n]},indexOfDelimiters:function(start,end){var str=this.input,nstart=0,nend=0,pos=0;for(var i=0,len=str.length;iindents)this.stash.push(this.tok("outdent")),this.indentStack.shift();tok=this.stash.pop()}else indents&&indents!=this.indentStack[0]?(this.indentStack.unshift(indents),tok=this.tok("indent",indents)):tok=this.tok("newline");return tok}},pipelessText:function(){if(this.pipeless){if("\n"==this.input[0])return;var i=this.input.indexOf("\n");-1==i&&(i=this.input.length);var str=this.input.substr(0,i);return this.consume(str.length),this.tok("text",str)}},colon:function(){return this.scan(/^: */,":")},advance:function(){return this.stashed()||this.next()},next:function(){return this.deferred()||this.blank()||this.eos()||this.pipelessText()||this.yield()||this.doctype()||this.interpolation()||this["case"]()||this.when()||this["default"]()||this["extends"]()||this.append()||this.prepend()||this.block()||this.include()||this.mixin()||this.call()||this.conditional()||this.each()||this["while"]()||this.assignment()||this.tag()||this.filter()||this.code()||this.id()||this.className()||this.attrs()||this.indent()||this.comment()||this.colon()||this.text()}}}),require.register("nodes/attrs.js",function(module,exports,require){var Node=require("./node"),Block=require("./block"),Attrs=module.exports=function Attrs(){this.attrs=[]};Attrs.prototype=new Node,Attrs.prototype.constructor=Attrs,Attrs.prototype.setAttribute=function(name,val,escaped){return this.attrs.push({name:name,val:val,escaped:escaped}),this},Attrs.prototype.removeAttribute=function(name){for(var i=0,len=this.attrs.length;i/g,">").replace(/"/g,""")},exports.rethrow=function rethrow(err,filename,lineno){if(!filename)throw err;var context=3,str=require("fs").readFileSync(filename,"utf8"),lines=str.split("\n"),start=Math.max(lineno-context,0),end=Math.min(lines.length,lineno+context),context=lines.slice(start,end).map(function(line,i){var curr=i+start+1;return(curr==lineno?" > ":" ")+curr+"| "+line}).join("\n");throw err.path=filename,err.message=(filename||"Jade")+":"+lineno+"\n"+context+"\n\n"+err.message,err}}),require.register("self-closing.js",function(module,exports,require){module.exports=["meta","img","link","input","source","area","base","col","br","hr"]}),require.register("utils.js",function(module,exports,require){var interpolate=exports.interpolate=function(str){return str.replace(/(\\)?([#!]){(.*?)}/g,function(str,escape,flag,code){return escape?str:"' + "+("!"==flag?"":"escape")+"((interp = "+code.replace(/\\'/g,"'")+") == null ? '' : interp) + '"})},escape=exports.escape=function(str){return str.replace(/'/g,"\\'")};exports.text=function(str){return interpolate(escape(str))}}),window.jade=require("jade")})(); \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/lib/compiler.js b/node_modules/mocha/node_modules/jade/lib/compiler.js deleted file mode 100644 index 516ac83d..00000000 --- a/node_modules/mocha/node_modules/jade/lib/compiler.js +++ /dev/null @@ -1,642 +0,0 @@ - -/*! - * Jade - Compiler - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var nodes = require('./nodes') - , filters = require('./filters') - , doctypes = require('./doctypes') - , selfClosing = require('./self-closing') - , runtime = require('./runtime') - , utils = require('./utils'); - -// if browser -// -// if (!Object.keys) { -// Object.keys = function(obj){ -// var arr = []; -// for (var key in obj) { -// if (obj.hasOwnProperty(key)) { -// arr.push(key); -// } -// } -// return arr; -// } -// } -// -// if (!String.prototype.trimLeft) { -// String.prototype.trimLeft = function(){ -// return this.replace(/^\s+/, ''); -// } -// } -// -// end - - -/** - * Initialize `Compiler` with the given `node`. - * - * @param {Node} node - * @param {Object} options - * @api public - */ - -var Compiler = module.exports = function Compiler(node, options) { - this.options = options = options || {}; - this.node = node; - this.hasCompiledDoctype = false; - this.hasCompiledTag = false; - this.pp = options.pretty || false; - this.debug = false !== options.compileDebug; - this.indents = 0; - this.parentIndents = 0; - if (options.doctype) this.setDoctype(options.doctype); -}; - -/** - * Compiler prototype. - */ - -Compiler.prototype = { - - /** - * Compile parse tree to JavaScript. - * - * @api public - */ - - compile: function(){ - this.buf = ['var interp;']; - if (this.pp) this.buf.push("var __indent = [];"); - this.lastBufferedIdx = -1; - this.visit(this.node); - return this.buf.join('\n'); - }, - - /** - * Sets the default doctype `name`. Sets terse mode to `true` when - * html 5 is used, causing self-closing tags to end with ">" vs "/>", - * and boolean attributes are not mirrored. - * - * @param {string} name - * @api public - */ - - setDoctype: function(name){ - var doctype = doctypes[(name || 'default').toLowerCase()]; - doctype = doctype || ''; - this.doctype = doctype; - this.terse = '5' == name || 'html' == name; - this.xml = 0 == this.doctype.indexOf(' 1 && !escape && block.nodes[0].isText && block.nodes[1].isText) - this.prettyIndent(1, true); - - for (var i = 0; i < len; ++i) { - // Pretty print text - if (pp && i > 0 && !escape && block.nodes[i].isText && block.nodes[i-1].isText) - this.prettyIndent(1, false); - - this.visit(block.nodes[i]); - // Multiple text nodes are separated by newlines - if (block.nodes[i+1] && block.nodes[i].isText && block.nodes[i+1].isText) - this.buffer('\\n'); - } - }, - - /** - * Visit `doctype`. Sets terse mode to `true` when html 5 - * is used, causing self-closing tags to end with ">" vs "/>", - * and boolean attributes are not mirrored. - * - * @param {Doctype} doctype - * @api public - */ - - visitDoctype: function(doctype){ - if (doctype && (doctype.val || !this.doctype)) { - this.setDoctype(doctype.val || 'default'); - } - - if (this.doctype) this.buffer(this.doctype); - this.hasCompiledDoctype = true; - }, - - /** - * Visit `mixin`, generating a function that - * may be called within the template. - * - * @param {Mixin} mixin - * @api public - */ - - visitMixin: function(mixin){ - var name = mixin.name.replace(/-/g, '_') + '_mixin' - , args = mixin.args || '' - , block = mixin.block - , attrs = mixin.attrs - , pp = this.pp; - - if (mixin.call) { - if (pp) this.buf.push("__indent.push('" + Array(this.indents + 1).join(' ') + "');") - if (block || attrs.length) { - - this.buf.push(name + '.call({'); - - if (block) { - this.buf.push('block: function(){'); - - // Render block with no indents, dynamically added when rendered - this.parentIndents++; - var _indents = this.indents; - this.indents = 0; - this.visit(mixin.block); - this.indents = _indents; - this.parentIndents--; - - if (attrs.length) { - this.buf.push('},'); - } else { - this.buf.push('}'); - } - } - - if (attrs.length) { - var val = this.attrs(attrs); - if (val.inherits) { - this.buf.push('attributes: merge({' + val.buf - + '}, attributes), escaped: merge(' + val.escaped + ', escaped, true)'); - } else { - this.buf.push('attributes: {' + val.buf + '}, escaped: ' + val.escaped); - } - } - - if (args) { - this.buf.push('}, ' + args + ');'); - } else { - this.buf.push('});'); - } - - } else { - this.buf.push(name + '(' + args + ');'); - } - if (pp) this.buf.push("__indent.pop();") - } else { - this.buf.push('var ' + name + ' = function(' + args + '){'); - this.buf.push('var block = this.block, attributes = this.attributes || {}, escaped = this.escaped || {};'); - this.parentIndents++; - this.visit(block); - this.parentIndents--; - this.buf.push('};'); - } - }, - - /** - * Visit `tag` buffering tag markup, generating - * attributes, visiting the `tag`'s code and block. - * - * @param {Tag} tag - * @api public - */ - - visitTag: function(tag){ - this.indents++; - var name = tag.name - , pp = this.pp; - - if (tag.buffer) name = "' + (" + name + ") + '"; - - if (!this.hasCompiledTag) { - if (!this.hasCompiledDoctype && 'html' == name) { - this.visitDoctype(); - } - this.hasCompiledTag = true; - } - - // pretty print - if (pp && !tag.isInline()) - this.prettyIndent(0, true); - - if ((~selfClosing.indexOf(name) || tag.selfClosing) && !this.xml) { - this.buffer('<' + name); - this.visitAttributes(tag.attrs); - this.terse - ? this.buffer('>') - : this.buffer('/>'); - } else { - // Optimize attributes buffering - if (tag.attrs.length) { - this.buffer('<' + name); - if (tag.attrs.length) this.visitAttributes(tag.attrs); - this.buffer('>'); - } else { - this.buffer('<' + name + '>'); - } - if (tag.code) this.visitCode(tag.code); - this.escape = 'pre' == tag.name; - this.visit(tag.block); - - // pretty print - if (pp && !tag.isInline() && 'pre' != tag.name && !tag.canInline()) - this.prettyIndent(0, true); - - this.buffer(''); - } - this.indents--; - }, - - /** - * Visit `filter`, throwing when the filter does not exist. - * - * @param {Filter} filter - * @api public - */ - - visitFilter: function(filter){ - var fn = filters[filter.name]; - - // unknown filter - if (!fn) { - if (filter.isASTFilter) { - throw new Error('unknown ast filter "' + filter.name + ':"'); - } else { - throw new Error('unknown filter ":' + filter.name + '"'); - } - } - - if (filter.isASTFilter) { - this.buf.push(fn(filter.block, this, filter.attrs)); - } else { - var text = filter.block.nodes.map(function(node){ return node.val }).join('\n'); - filter.attrs = filter.attrs || {}; - filter.attrs.filename = this.options.filename; - this.buffer(utils.text(fn(text, filter.attrs))); - } - }, - - /** - * Visit `text` node. - * - * @param {Text} text - * @api public - */ - - visitText: function(text){ - text = utils.text(text.val.replace(/\\/g, '\\\\')); - if (this.escape) text = escape(text); - this.buffer(text); - }, - - /** - * Visit a `comment`, only buffering when the buffer flag is set. - * - * @param {Comment} comment - * @api public - */ - - visitComment: function(comment){ - if (!comment.buffer) return; - if (this.pp) this.prettyIndent(1, true); - this.buffer(''); - }, - - /** - * Visit a `BlockComment`. - * - * @param {Comment} comment - * @api public - */ - - visitBlockComment: function(comment){ - if (!comment.buffer) return; - if (0 == comment.val.trim().indexOf('if')) { - this.buffer(''); - } else { - this.buffer(''); - } - }, - - /** - * Visit `code`, respecting buffer / escape flags. - * If the code is followed by a block, wrap it in - * a self-calling function. - * - * @param {Code} code - * @api public - */ - - visitCode: function(code){ - // Wrap code blocks with {}. - // we only wrap unbuffered code blocks ATM - // since they are usually flow control - - // Buffer code - if (code.buffer) { - var val = code.val.trimLeft(); - this.buf.push('var __val__ = ' + val); - val = 'null == __val__ ? "" : __val__'; - if (code.escape) val = 'escape(' + val + ')'; - this.buf.push("buf.push(" + val + ");"); - } else { - this.buf.push(code.val); - } - - // Block support - if (code.block) { - if (!code.buffer) this.buf.push('{'); - this.visit(code.block); - if (!code.buffer) this.buf.push('}'); - } - }, - - /** - * Visit `each` block. - * - * @param {Each} each - * @api public - */ - - visitEach: function(each){ - this.buf.push('' - + '// iterate ' + each.obj + '\n' - + ';(function(){\n' - + ' if (\'number\' == typeof ' + each.obj + '.length) {\n' - + ' for (var ' + each.key + ' = 0, $$l = ' + each.obj + '.length; ' + each.key + ' < $$l; ' + each.key + '++) {\n' - + ' var ' + each.val + ' = ' + each.obj + '[' + each.key + '];\n'); - - this.visit(each.block); - - this.buf.push('' - + ' }\n' - + ' } else {\n' - + ' for (var ' + each.key + ' in ' + each.obj + ') {\n' - // if browser - // + ' if (' + each.obj + '.hasOwnProperty(' + each.key + ')){' - // end - + ' var ' + each.val + ' = ' + each.obj + '[' + each.key + '];\n'); - - this.visit(each.block); - - // if browser - // this.buf.push(' }\n'); - // end - - this.buf.push(' }\n }\n}).call(this);\n'); - }, - - /** - * Visit `attrs`. - * - * @param {Array} attrs - * @api public - */ - - visitAttributes: function(attrs){ - var val = this.attrs(attrs); - if (val.inherits) { - this.buf.push("buf.push(attrs(merge({ " + val.buf + - " }, attributes), merge(" + val.escaped + ", escaped, true)));"); - } else if (val.constant) { - eval('var buf={' + val.buf + '};'); - this.buffer(runtime.attrs(buf, JSON.parse(val.escaped)), true); - } else { - this.buf.push("buf.push(attrs({ " + val.buf + " }, " + val.escaped + "));"); - } - }, - - /** - * Compile attributes. - */ - - attrs: function(attrs){ - var buf = [] - , classes = [] - , escaped = {} - , constant = attrs.every(function(attr){ return isConstant(attr.val) }) - , inherits = false; - - if (this.terse) buf.push('terse: true'); - - attrs.forEach(function(attr){ - if (attr.name == 'attributes') return inherits = true; - escaped[attr.name] = attr.escaped; - if (attr.name == 'class') { - classes.push('(' + attr.val + ')'); - } else { - var pair = "'" + attr.name + "':(" + attr.val + ')'; - buf.push(pair); - } - }); - - if (classes.length) { - classes = classes.join(" + ' ' + "); - buf.push("class: " + classes); - } - - return { - buf: buf.join(', ').replace('class:', '"class":'), - escaped: JSON.stringify(escaped), - inherits: inherits, - constant: constant - }; - } -}; - -/** - * Check if expression can be evaluated to a constant - * - * @param {String} expression - * @return {Boolean} - * @api private - */ - -function isConstant(val){ - // Check strings/literals - if (/^ *("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'|true|false|null|undefined) *$/i.test(val)) - return true; - - // Check numbers - if (!isNaN(Number(val))) - return true; - - // Check arrays - var matches; - if (matches = /^ *\[(.*)\] *$/.exec(val)) - return matches[1].split(',').every(isConstant); - - return false; -} - -/** - * Escape the given string of `html`. - * - * @param {String} html - * @return {String} - * @api private - */ - -function escape(html){ - return String(html) - .replace(/&(?!\w+;)/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); -} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/lib/doctypes.js b/node_modules/mocha/node_modules/jade/lib/doctypes.js deleted file mode 100644 index e87ca1e4..00000000 --- a/node_modules/mocha/node_modules/jade/lib/doctypes.js +++ /dev/null @@ -1,18 +0,0 @@ - -/*! - * Jade - doctypes - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = { - '5': '' - , 'default': '' - , 'xml': '' - , 'transitional': '' - , 'strict': '' - , 'frameset': '' - , '1.1': '' - , 'basic': '' - , 'mobile': '' -}; \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/lib/filters.js b/node_modules/mocha/node_modules/jade/lib/filters.js deleted file mode 100644 index fdb634cb..00000000 --- a/node_modules/mocha/node_modules/jade/lib/filters.js +++ /dev/null @@ -1,97 +0,0 @@ - -/*! - * Jade - filters - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = { - - /** - * Wrap text with CDATA block. - */ - - cdata: function(str){ - return ''; - }, - - /** - * Transform sass to css, wrapped in style tags. - */ - - sass: function(str){ - str = str.replace(/\\n/g, '\n'); - var sass = require('sass').render(str).replace(/\n/g, '\\n'); - return ''; - }, - - /** - * Transform stylus to css, wrapped in style tags. - */ - - stylus: function(str, options){ - var ret; - str = str.replace(/\\n/g, '\n'); - var stylus = require('stylus'); - stylus(str, options).render(function(err, css){ - if (err) throw err; - ret = css.replace(/\n/g, '\\n'); - }); - return ''; - }, - - /** - * Transform less to css, wrapped in style tags. - */ - - less: function(str){ - var ret; - str = str.replace(/\\n/g, '\n'); - require('less').render(str, function(err, css){ - if (err) throw err; - ret = ''; - }); - return ret; - }, - - /** - * Transform markdown to html. - */ - - markdown: function(str){ - var md; - - // support markdown / discount - try { - md = require('markdown'); - } catch (err){ - try { - md = require('discount'); - } catch (err) { - try { - md = require('markdown-js'); - } catch (err) { - try { - md = require('marked'); - } catch (err) { - throw new - Error('Cannot find markdown library, install markdown, discount, or marked.'); - } - } - } - } - - str = str.replace(/\\n/g, '\n'); - return md.parse(str).replace(/\n/g, '\\n').replace(/'/g,'''); - }, - - /** - * Transform coffeescript to javascript. - */ - - coffeescript: function(str){ - str = str.replace(/\\n/g, '\n'); - var js = require('coffee-script').compile(str).replace(/\\/g, '\\\\').replace(/\n/g, '\\n'); - return ''; - } -}; diff --git a/node_modules/mocha/node_modules/jade/lib/inline-tags.js b/node_modules/mocha/node_modules/jade/lib/inline-tags.js deleted file mode 100644 index 491de0b5..00000000 --- a/node_modules/mocha/node_modules/jade/lib/inline-tags.js +++ /dev/null @@ -1,28 +0,0 @@ - -/*! - * Jade - inline tags - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = [ - 'a' - , 'abbr' - , 'acronym' - , 'b' - , 'br' - , 'code' - , 'em' - , 'font' - , 'i' - , 'img' - , 'ins' - , 'kbd' - , 'map' - , 'samp' - , 'small' - , 'span' - , 'strong' - , 'sub' - , 'sup' -]; \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/lib/jade.js b/node_modules/mocha/node_modules/jade/lib/jade.js deleted file mode 100644 index 00f0abb1..00000000 --- a/node_modules/mocha/node_modules/jade/lib/jade.js +++ /dev/null @@ -1,237 +0,0 @@ -/*! - * Jade - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Parser = require('./parser') - , Lexer = require('./lexer') - , Compiler = require('./compiler') - , runtime = require('./runtime') -// if node - , fs = require('fs'); -// end - -/** - * Library version. - */ - -exports.version = '0.26.3'; - -/** - * Expose self closing tags. - */ - -exports.selfClosing = require('./self-closing'); - -/** - * Default supported doctypes. - */ - -exports.doctypes = require('./doctypes'); - -/** - * Text filters. - */ - -exports.filters = require('./filters'); - -/** - * Utilities. - */ - -exports.utils = require('./utils'); - -/** - * Expose `Compiler`. - */ - -exports.Compiler = Compiler; - -/** - * Expose `Parser`. - */ - -exports.Parser = Parser; - -/** - * Expose `Lexer`. - */ - -exports.Lexer = Lexer; - -/** - * Nodes. - */ - -exports.nodes = require('./nodes'); - -/** - * Jade runtime helpers. - */ - -exports.runtime = runtime; - -/** - * Template function cache. - */ - -exports.cache = {}; - -/** - * Parse the given `str` of jade and return a function body. - * - * @param {String} str - * @param {Object} options - * @return {String} - * @api private - */ - -function parse(str, options){ - try { - // Parse - var parser = new Parser(str, options.filename, options); - - // Compile - var compiler = new (options.compiler || Compiler)(parser.parse(), options) - , js = compiler.compile(); - - // Debug compiler - if (options.debug) { - console.error('\nCompiled Function:\n\n\033[90m%s\033[0m', js.replace(/^/gm, ' ')); - } - - return '' - + 'var buf = [];\n' - + (options.self - ? 'var self = locals || {};\n' + js - : 'with (locals || {}) {\n' + js + '\n}\n') - + 'return buf.join("");'; - } catch (err) { - parser = parser.context(); - runtime.rethrow(err, parser.filename, parser.lexer.lineno); - } -} - -/** - * Compile a `Function` representation of the given jade `str`. - * - * Options: - * - * - `compileDebug` when `false` debugging code is stripped from the compiled template - * - `client` when `true` the helper functions `escape()` etc will reference `jade.escape()` - * for use with the Jade client-side runtime.js - * - * @param {String} str - * @param {Options} options - * @return {Function} - * @api public - */ - -exports.compile = function(str, options){ - var options = options || {} - , client = options.client - , filename = options.filename - ? JSON.stringify(options.filename) - : 'undefined' - , fn; - - if (options.compileDebug !== false) { - fn = [ - 'var __jade = [{ lineno: 1, filename: ' + filename + ' }];' - , 'try {' - , parse(String(str), options) - , '} catch (err) {' - , ' rethrow(err, __jade[0].filename, __jade[0].lineno);' - , '}' - ].join('\n'); - } else { - fn = parse(String(str), options); - } - - if (client) { - fn = 'attrs = attrs || jade.attrs; escape = escape || jade.escape; rethrow = rethrow || jade.rethrow; merge = merge || jade.merge;\n' + fn; - } - - fn = new Function('locals, attrs, escape, rethrow, merge', fn); - - if (client) return fn; - - return function(locals){ - return fn(locals, runtime.attrs, runtime.escape, runtime.rethrow, runtime.merge); - }; -}; - -/** - * Render the given `str` of jade and invoke - * the callback `fn(err, str)`. - * - * Options: - * - * - `cache` enable template caching - * - `filename` filename required for `include` / `extends` and caching - * - * @param {String} str - * @param {Object|Function} options or fn - * @param {Function} fn - * @api public - */ - -exports.render = function(str, options, fn){ - // swap args - if ('function' == typeof options) { - fn = options, options = {}; - } - - // cache requires .filename - if (options.cache && !options.filename) { - return fn(new Error('the "filename" option is required for caching')); - } - - try { - var path = options.filename; - var tmpl = options.cache - ? exports.cache[path] || (exports.cache[path] = exports.compile(str, options)) - : exports.compile(str, options); - fn(null, tmpl(options)); - } catch (err) { - fn(err); - } -}; - -/** - * Render a Jade file at the given `path` and callback `fn(err, str)`. - * - * @param {String} path - * @param {Object|Function} options or callback - * @param {Function} fn - * @api public - */ - -exports.renderFile = function(path, options, fn){ - var key = path + ':string'; - - if ('function' == typeof options) { - fn = options, options = {}; - } - - try { - options.filename = path; - var str = options.cache - ? exports.cache[key] || (exports.cache[key] = fs.readFileSync(path, 'utf8')) - : fs.readFileSync(path, 'utf8'); - exports.render(str, options, fn); - } catch (err) { - fn(err); - } -}; - -/** - * Express support. - */ - -exports.__express = exports.renderFile; diff --git a/node_modules/mocha/node_modules/jade/lib/lexer.js b/node_modules/mocha/node_modules/jade/lib/lexer.js deleted file mode 100644 index bca314a9..00000000 --- a/node_modules/mocha/node_modules/jade/lib/lexer.js +++ /dev/null @@ -1,771 +0,0 @@ - -/*! - * Jade - Lexer - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Initialize `Lexer` with the given `str`. - * - * Options: - * - * - `colons` allow colons for attr delimiters - * - * @param {String} str - * @param {Object} options - * @api private - */ - -var Lexer = module.exports = function Lexer(str, options) { - options = options || {}; - this.input = str.replace(/\r\n|\r/g, '\n'); - this.colons = options.colons; - this.deferredTokens = []; - this.lastIndents = 0; - this.lineno = 1; - this.stash = []; - this.indentStack = []; - this.indentRe = null; - this.pipeless = false; -}; - -/** - * Lexer prototype. - */ - -Lexer.prototype = { - - /** - * Construct a token with the given `type` and `val`. - * - * @param {String} type - * @param {String} val - * @return {Object} - * @api private - */ - - tok: function(type, val){ - return { - type: type - , line: this.lineno - , val: val - } - }, - - /** - * Consume the given `len` of input. - * - * @param {Number} len - * @api private - */ - - consume: function(len){ - this.input = this.input.substr(len); - }, - - /** - * Scan for `type` with the given `regexp`. - * - * @param {String} type - * @param {RegExp} regexp - * @return {Object} - * @api private - */ - - scan: function(regexp, type){ - var captures; - if (captures = regexp.exec(this.input)) { - this.consume(captures[0].length); - return this.tok(type, captures[1]); - } - }, - - /** - * Defer the given `tok`. - * - * @param {Object} tok - * @api private - */ - - defer: function(tok){ - this.deferredTokens.push(tok); - }, - - /** - * Lookahead `n` tokens. - * - * @param {Number} n - * @return {Object} - * @api private - */ - - lookahead: function(n){ - var fetch = n - this.stash.length; - while (fetch-- > 0) this.stash.push(this.next()); - return this.stash[--n]; - }, - - /** - * Return the indexOf `start` / `end` delimiters. - * - * @param {String} start - * @param {String} end - * @return {Number} - * @api private - */ - - indexOfDelimiters: function(start, end){ - var str = this.input - , nstart = 0 - , nend = 0 - , pos = 0; - for (var i = 0, len = str.length; i < len; ++i) { - if (start == str.charAt(i)) { - ++nstart; - } else if (end == str.charAt(i)) { - if (++nend == nstart) { - pos = i; - break; - } - } - } - return pos; - }, - - /** - * Stashed token. - */ - - stashed: function() { - return this.stash.length - && this.stash.shift(); - }, - - /** - * Deferred token. - */ - - deferred: function() { - return this.deferredTokens.length - && this.deferredTokens.shift(); - }, - - /** - * end-of-source. - */ - - eos: function() { - if (this.input.length) return; - if (this.indentStack.length) { - this.indentStack.shift(); - return this.tok('outdent'); - } else { - return this.tok('eos'); - } - }, - - /** - * Blank line. - */ - - blank: function() { - var captures; - if (captures = /^\n *\n/.exec(this.input)) { - this.consume(captures[0].length - 1); - if (this.pipeless) return this.tok('text', ''); - return this.next(); - } - }, - - /** - * Comment. - */ - - comment: function() { - var captures; - if (captures = /^ *\/\/(-)?([^\n]*)/.exec(this.input)) { - this.consume(captures[0].length); - var tok = this.tok('comment', captures[2]); - tok.buffer = '-' != captures[1]; - return tok; - } - }, - - /** - * Interpolated tag. - */ - - interpolation: function() { - var captures; - if (captures = /^#\{(.*?)\}/.exec(this.input)) { - this.consume(captures[0].length); - return this.tok('interpolation', captures[1]); - } - }, - - /** - * Tag. - */ - - tag: function() { - var captures; - if (captures = /^(\w[-:\w]*)(\/?)/.exec(this.input)) { - this.consume(captures[0].length); - var tok, name = captures[1]; - if (':' == name[name.length - 1]) { - name = name.slice(0, -1); - tok = this.tok('tag', name); - this.defer(this.tok(':')); - while (' ' == this.input[0]) this.input = this.input.substr(1); - } else { - tok = this.tok('tag', name); - } - tok.selfClosing = !! captures[2]; - return tok; - } - }, - - /** - * Filter. - */ - - filter: function() { - return this.scan(/^:(\w+)/, 'filter'); - }, - - /** - * Doctype. - */ - - doctype: function() { - return this.scan(/^(?:!!!|doctype) *([^\n]+)?/, 'doctype'); - }, - - /** - * Id. - */ - - id: function() { - return this.scan(/^#([\w-]+)/, 'id'); - }, - - /** - * Class. - */ - - className: function() { - return this.scan(/^\.([\w-]+)/, 'class'); - }, - - /** - * Text. - */ - - text: function() { - return this.scan(/^(?:\| ?| ?)?([^\n]+)/, 'text'); - }, - - /** - * Extends. - */ - - "extends": function() { - return this.scan(/^extends? +([^\n]+)/, 'extends'); - }, - - /** - * Block prepend. - */ - - prepend: function() { - var captures; - if (captures = /^prepend +([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - var mode = 'prepend' - , name = captures[1] - , tok = this.tok('block', name); - tok.mode = mode; - return tok; - } - }, - - /** - * Block append. - */ - - append: function() { - var captures; - if (captures = /^append +([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - var mode = 'append' - , name = captures[1] - , tok = this.tok('block', name); - tok.mode = mode; - return tok; - } - }, - - /** - * Block. - */ - - block: function() { - var captures; - if (captures = /^block\b *(?:(prepend|append) +)?([^\n]*)/.exec(this.input)) { - this.consume(captures[0].length); - var mode = captures[1] || 'replace' - , name = captures[2] - , tok = this.tok('block', name); - - tok.mode = mode; - return tok; - } - }, - - /** - * Yield. - */ - - yield: function() { - return this.scan(/^yield */, 'yield'); - }, - - /** - * Include. - */ - - include: function() { - return this.scan(/^include +([^\n]+)/, 'include'); - }, - - /** - * Case. - */ - - "case": function() { - return this.scan(/^case +([^\n]+)/, 'case'); - }, - - /** - * When. - */ - - when: function() { - return this.scan(/^when +([^:\n]+)/, 'when'); - }, - - /** - * Default. - */ - - "default": function() { - return this.scan(/^default */, 'default'); - }, - - /** - * Assignment. - */ - - assignment: function() { - var captures; - if (captures = /^(\w+) += *([^;\n]+)( *;? *)/.exec(this.input)) { - this.consume(captures[0].length); - var name = captures[1] - , val = captures[2]; - return this.tok('code', 'var ' + name + ' = (' + val + ');'); - } - }, - - /** - * Call mixin. - */ - - call: function(){ - var captures; - if (captures = /^\+([-\w]+)/.exec(this.input)) { - this.consume(captures[0].length); - var tok = this.tok('call', captures[1]); - - // Check for args (not attributes) - if (captures = /^ *\((.*?)\)/.exec(this.input)) { - if (!/^ *[-\w]+ *=/.test(captures[1])) { - this.consume(captures[0].length); - tok.args = captures[1]; - } - } - - return tok; - } - }, - - /** - * Mixin. - */ - - mixin: function(){ - var captures; - if (captures = /^mixin +([-\w]+)(?: *\((.*)\))?/.exec(this.input)) { - this.consume(captures[0].length); - var tok = this.tok('mixin', captures[1]); - tok.args = captures[2]; - return tok; - } - }, - - /** - * Conditional. - */ - - conditional: function() { - var captures; - if (captures = /^(if|unless|else if|else)\b([^\n]*)/.exec(this.input)) { - this.consume(captures[0].length); - var type = captures[1] - , js = captures[2]; - - switch (type) { - case 'if': js = 'if (' + js + ')'; break; - case 'unless': js = 'if (!(' + js + '))'; break; - case 'else if': js = 'else if (' + js + ')'; break; - case 'else': js = 'else'; break; - } - - return this.tok('code', js); - } - }, - - /** - * While. - */ - - "while": function() { - var captures; - if (captures = /^while +([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - return this.tok('code', 'while (' + captures[1] + ')'); - } - }, - - /** - * Each. - */ - - each: function() { - var captures; - if (captures = /^(?:- *)?(?:each|for) +(\w+)(?: *, *(\w+))? * in *([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - var tok = this.tok('each', captures[1]); - tok.key = captures[2] || '$index'; - tok.code = captures[3]; - return tok; - } - }, - - /** - * Code. - */ - - code: function() { - var captures; - if (captures = /^(!?=|-)([^\n]+)/.exec(this.input)) { - this.consume(captures[0].length); - var flags = captures[1]; - captures[1] = captures[2]; - var tok = this.tok('code', captures[1]); - tok.escape = flags[0] === '='; - tok.buffer = flags[0] === '=' || flags[1] === '='; - return tok; - } - }, - - /** - * Attributes. - */ - - attrs: function() { - if ('(' == this.input.charAt(0)) { - var index = this.indexOfDelimiters('(', ')') - , str = this.input.substr(1, index-1) - , tok = this.tok('attrs') - , len = str.length - , colons = this.colons - , states = ['key'] - , escapedAttr - , key = '' - , val = '' - , quote - , c - , p; - - function state(){ - return states[states.length - 1]; - } - - function interpolate(attr) { - return attr.replace(/#\{([^}]+)\}/g, function(_, expr){ - return quote + " + (" + expr + ") + " + quote; - }); - } - - this.consume(index + 1); - tok.attrs = {}; - tok.escaped = {}; - - function parse(c) { - var real = c; - // TODO: remove when people fix ":" - if (colons && ':' == c) c = '='; - switch (c) { - case ',': - case '\n': - switch (state()) { - case 'expr': - case 'array': - case 'string': - case 'object': - val += c; - break; - default: - states.push('key'); - val = val.trim(); - key = key.trim(); - if ('' == key) return; - key = key.replace(/^['"]|['"]$/g, '').replace('!', ''); - tok.escaped[key] = escapedAttr; - tok.attrs[key] = '' == val - ? true - : interpolate(val); - key = val = ''; - } - break; - case '=': - switch (state()) { - case 'key char': - key += real; - break; - case 'val': - case 'expr': - case 'array': - case 'string': - case 'object': - val += real; - break; - default: - escapedAttr = '!' != p; - states.push('val'); - } - break; - case '(': - if ('val' == state() - || 'expr' == state()) states.push('expr'); - val += c; - break; - case ')': - if ('expr' == state() - || 'val' == state()) states.pop(); - val += c; - break; - case '{': - if ('val' == state()) states.push('object'); - val += c; - break; - case '}': - if ('object' == state()) states.pop(); - val += c; - break; - case '[': - if ('val' == state()) states.push('array'); - val += c; - break; - case ']': - if ('array' == state()) states.pop(); - val += c; - break; - case '"': - case "'": - switch (state()) { - case 'key': - states.push('key char'); - break; - case 'key char': - states.pop(); - break; - case 'string': - if (c == quote) states.pop(); - val += c; - break; - default: - states.push('string'); - val += c; - quote = c; - } - break; - case '': - break; - default: - switch (state()) { - case 'key': - case 'key char': - key += c; - break; - default: - val += c; - } - } - p = c; - } - - for (var i = 0; i < len; ++i) { - parse(str.charAt(i)); - } - - parse(','); - - if ('/' == this.input.charAt(0)) { - this.consume(1); - tok.selfClosing = true; - } - - return tok; - } - }, - - /** - * Indent | Outdent | Newline. - */ - - indent: function() { - var captures, re; - - // established regexp - if (this.indentRe) { - captures = this.indentRe.exec(this.input); - // determine regexp - } else { - // tabs - re = /^\n(\t*) */; - captures = re.exec(this.input); - - // spaces - if (captures && !captures[1].length) { - re = /^\n( *)/; - captures = re.exec(this.input); - } - - // established - if (captures && captures[1].length) this.indentRe = re; - } - - if (captures) { - var tok - , indents = captures[1].length; - - ++this.lineno; - this.consume(indents + 1); - - if (' ' == this.input[0] || '\t' == this.input[0]) { - throw new Error('Invalid indentation, you can use tabs or spaces but not both'); - } - - // blank line - if ('\n' == this.input[0]) return this.tok('newline'); - - // outdent - if (this.indentStack.length && indents < this.indentStack[0]) { - while (this.indentStack.length && this.indentStack[0] > indents) { - this.stash.push(this.tok('outdent')); - this.indentStack.shift(); - } - tok = this.stash.pop(); - // indent - } else if (indents && indents != this.indentStack[0]) { - this.indentStack.unshift(indents); - tok = this.tok('indent', indents); - // newline - } else { - tok = this.tok('newline'); - } - - return tok; - } - }, - - /** - * Pipe-less text consumed only when - * pipeless is true; - */ - - pipelessText: function() { - if (this.pipeless) { - if ('\n' == this.input[0]) return; - var i = this.input.indexOf('\n'); - if (-1 == i) i = this.input.length; - var str = this.input.substr(0, i); - this.consume(str.length); - return this.tok('text', str); - } - }, - - /** - * ':' - */ - - colon: function() { - return this.scan(/^: */, ':'); - }, - - /** - * Return the next token object, or those - * previously stashed by lookahead. - * - * @return {Object} - * @api private - */ - - advance: function(){ - return this.stashed() - || this.next(); - }, - - /** - * Return the next token object. - * - * @return {Object} - * @api private - */ - - next: function() { - return this.deferred() - || this.blank() - || this.eos() - || this.pipelessText() - || this.yield() - || this.doctype() - || this.interpolation() - || this["case"]() - || this.when() - || this["default"]() - || this["extends"]() - || this.append() - || this.prepend() - || this.block() - || this.include() - || this.mixin() - || this.call() - || this.conditional() - || this.each() - || this["while"]() - || this.assignment() - || this.tag() - || this.filter() - || this.code() - || this.id() - || this.className() - || this.attrs() - || this.indent() - || this.comment() - || this.colon() - || this.text(); - } -}; diff --git a/node_modules/mocha/node_modules/jade/lib/nodes/attrs.js b/node_modules/mocha/node_modules/jade/lib/nodes/attrs.js deleted file mode 100644 index 5de9b59c..00000000 --- a/node_modules/mocha/node_modules/jade/lib/nodes/attrs.js +++ /dev/null @@ -1,77 +0,0 @@ - -/*! - * Jade - nodes - Attrs - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'), - Block = require('./block'); - -/** - * Initialize a `Attrs` node. - * - * @api public - */ - -var Attrs = module.exports = function Attrs() { - this.attrs = []; -}; - -/** - * Inherit from `Node`. - */ - -Attrs.prototype.__proto__ = Node.prototype; - -/** - * Set attribute `name` to `val`, keep in mind these become - * part of a raw js object literal, so to quote a value you must - * '"quote me"', otherwise or example 'user.name' is literal JavaScript. - * - * @param {String} name - * @param {String} val - * @param {Boolean} escaped - * @return {Tag} for chaining - * @api public - */ - -Attrs.prototype.setAttribute = function(name, val, escaped){ - this.attrs.push({ name: name, val: val, escaped: escaped }); - return this; -}; - -/** - * Remove attribute `name` when present. - * - * @param {String} name - * @api public - */ - -Attrs.prototype.removeAttribute = function(name){ - for (var i = 0, len = this.attrs.length; i < len; ++i) { - if (this.attrs[i] && this.attrs[i].name == name) { - delete this.attrs[i]; - } - } -}; - -/** - * Get attribute value by `name`. - * - * @param {String} name - * @return {String} - * @api public - */ - -Attrs.prototype.getAttribute = function(name){ - for (var i = 0, len = this.attrs.length; i < len; ++i) { - if (this.attrs[i] && this.attrs[i].name == name) { - return this.attrs[i].val; - } - } -}; diff --git a/node_modules/mocha/node_modules/jade/lib/nodes/block-comment.js b/node_modules/mocha/node_modules/jade/lib/nodes/block-comment.js deleted file mode 100644 index 4f41e4a5..00000000 --- a/node_modules/mocha/node_modules/jade/lib/nodes/block-comment.js +++ /dev/null @@ -1,33 +0,0 @@ - -/*! - * Jade - nodes - BlockComment - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `BlockComment` with the given `block`. - * - * @param {String} val - * @param {Block} block - * @param {Boolean} buffer - * @api public - */ - -var BlockComment = module.exports = function BlockComment(val, block, buffer) { - this.block = block; - this.val = val; - this.buffer = buffer; -}; - -/** - * Inherit from `Node`. - */ - -BlockComment.prototype.__proto__ = Node.prototype; \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/lib/nodes/block.js b/node_modules/mocha/node_modules/jade/lib/nodes/block.js deleted file mode 100644 index bb00a1d9..00000000 --- a/node_modules/mocha/node_modules/jade/lib/nodes/block.js +++ /dev/null @@ -1,121 +0,0 @@ - -/*! - * Jade - nodes - Block - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a new `Block` with an optional `node`. - * - * @param {Node} node - * @api public - */ - -var Block = module.exports = function Block(node){ - this.nodes = []; - if (node) this.push(node); -}; - -/** - * Inherit from `Node`. - */ - -Block.prototype.__proto__ = Node.prototype; - -/** - * Block flag. - */ - -Block.prototype.isBlock = true; - -/** - * Replace the nodes in `other` with the nodes - * in `this` block. - * - * @param {Block} other - * @api private - */ - -Block.prototype.replace = function(other){ - other.nodes = this.nodes; -}; - -/** - * Pust the given `node`. - * - * @param {Node} node - * @return {Number} - * @api public - */ - -Block.prototype.push = function(node){ - return this.nodes.push(node); -}; - -/** - * Check if this block is empty. - * - * @return {Boolean} - * @api public - */ - -Block.prototype.isEmpty = function(){ - return 0 == this.nodes.length; -}; - -/** - * Unshift the given `node`. - * - * @param {Node} node - * @return {Number} - * @api public - */ - -Block.prototype.unshift = function(node){ - return this.nodes.unshift(node); -}; - -/** - * Return the "last" block, or the first `yield` node. - * - * @return {Block} - * @api private - */ - -Block.prototype.includeBlock = function(){ - var ret = this - , node; - - for (var i = 0, len = this.nodes.length; i < len; ++i) { - node = this.nodes[i]; - if (node.yield) return node; - else if (node.textOnly) continue; - else if (node.includeBlock) ret = node.includeBlock(); - else if (node.block && !node.block.isEmpty()) ret = node.block.includeBlock(); - } - - return ret; -}; - -/** - * Return a clone of this block. - * - * @return {Block} - * @api private - */ - -Block.prototype.clone = function(){ - var clone = new Block; - for (var i = 0, len = this.nodes.length; i < len; ++i) { - clone.push(this.nodes[i].clone()); - } - return clone; -}; - diff --git a/node_modules/mocha/node_modules/jade/lib/nodes/case.js b/node_modules/mocha/node_modules/jade/lib/nodes/case.js deleted file mode 100644 index 08ff0337..00000000 --- a/node_modules/mocha/node_modules/jade/lib/nodes/case.js +++ /dev/null @@ -1,43 +0,0 @@ - -/*! - * Jade - nodes - Case - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a new `Case` with `expr`. - * - * @param {String} expr - * @api public - */ - -var Case = exports = module.exports = function Case(expr, block){ - this.expr = expr; - this.block = block; -}; - -/** - * Inherit from `Node`. - */ - -Case.prototype.__proto__ = Node.prototype; - -var When = exports.When = function When(expr, block){ - this.expr = expr; - this.block = block; - this.debug = false; -}; - -/** - * Inherit from `Node`. - */ - -When.prototype.__proto__ = Node.prototype; - diff --git a/node_modules/mocha/node_modules/jade/lib/nodes/code.js b/node_modules/mocha/node_modules/jade/lib/nodes/code.js deleted file mode 100644 index babc6759..00000000 --- a/node_modules/mocha/node_modules/jade/lib/nodes/code.js +++ /dev/null @@ -1,35 +0,0 @@ - -/*! - * Jade - nodes - Code - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Code` node with the given code `val`. - * Code may also be optionally buffered and escaped. - * - * @param {String} val - * @param {Boolean} buffer - * @param {Boolean} escape - * @api public - */ - -var Code = module.exports = function Code(val, buffer, escape) { - this.val = val; - this.buffer = buffer; - this.escape = escape; - if (val.match(/^ *else/)) this.debug = false; -}; - -/** - * Inherit from `Node`. - */ - -Code.prototype.__proto__ = Node.prototype; \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/lib/nodes/comment.js b/node_modules/mocha/node_modules/jade/lib/nodes/comment.js deleted file mode 100644 index 2e1469e7..00000000 --- a/node_modules/mocha/node_modules/jade/lib/nodes/comment.js +++ /dev/null @@ -1,32 +0,0 @@ - -/*! - * Jade - nodes - Comment - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Comment` with the given `val`, optionally `buffer`, - * otherwise the comment may render in the output. - * - * @param {String} val - * @param {Boolean} buffer - * @api public - */ - -var Comment = module.exports = function Comment(val, buffer) { - this.val = val; - this.buffer = buffer; -}; - -/** - * Inherit from `Node`. - */ - -Comment.prototype.__proto__ = Node.prototype; \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/lib/nodes/doctype.js b/node_modules/mocha/node_modules/jade/lib/nodes/doctype.js deleted file mode 100644 index b8f33e56..00000000 --- a/node_modules/mocha/node_modules/jade/lib/nodes/doctype.js +++ /dev/null @@ -1,29 +0,0 @@ - -/*! - * Jade - nodes - Doctype - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Doctype` with the given `val`. - * - * @param {String} val - * @api public - */ - -var Doctype = module.exports = function Doctype(val) { - this.val = val; -}; - -/** - * Inherit from `Node`. - */ - -Doctype.prototype.__proto__ = Node.prototype; \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/lib/nodes/each.js b/node_modules/mocha/node_modules/jade/lib/nodes/each.js deleted file mode 100644 index f54101f1..00000000 --- a/node_modules/mocha/node_modules/jade/lib/nodes/each.js +++ /dev/null @@ -1,35 +0,0 @@ - -/*! - * Jade - nodes - Each - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize an `Each` node, representing iteration - * - * @param {String} obj - * @param {String} val - * @param {String} key - * @param {Block} block - * @api public - */ - -var Each = module.exports = function Each(obj, val, key, block) { - this.obj = obj; - this.val = val; - this.key = key; - this.block = block; -}; - -/** - * Inherit from `Node`. - */ - -Each.prototype.__proto__ = Node.prototype; \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/lib/nodes/filter.js b/node_modules/mocha/node_modules/jade/lib/nodes/filter.js deleted file mode 100644 index 851a0040..00000000 --- a/node_modules/mocha/node_modules/jade/lib/nodes/filter.js +++ /dev/null @@ -1,35 +0,0 @@ - -/*! - * Jade - nodes - Filter - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node') - , Block = require('./block'); - -/** - * Initialize a `Filter` node with the given - * filter `name` and `block`. - * - * @param {String} name - * @param {Block|Node} block - * @api public - */ - -var Filter = module.exports = function Filter(name, block, attrs) { - this.name = name; - this.block = block; - this.attrs = attrs; - this.isASTFilter = !block.nodes.every(function(node){ return node.isText }); -}; - -/** - * Inherit from `Node`. - */ - -Filter.prototype.__proto__ = Node.prototype; \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/lib/nodes/index.js b/node_modules/mocha/node_modules/jade/lib/nodes/index.js deleted file mode 100644 index 386ad2f9..00000000 --- a/node_modules/mocha/node_modules/jade/lib/nodes/index.js +++ /dev/null @@ -1,20 +0,0 @@ - -/*! - * Jade - nodes - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -exports.Node = require('./node'); -exports.Tag = require('./tag'); -exports.Code = require('./code'); -exports.Each = require('./each'); -exports.Case = require('./case'); -exports.Text = require('./text'); -exports.Block = require('./block'); -exports.Mixin = require('./mixin'); -exports.Filter = require('./filter'); -exports.Comment = require('./comment'); -exports.Literal = require('./literal'); -exports.BlockComment = require('./block-comment'); -exports.Doctype = require('./doctype'); diff --git a/node_modules/mocha/node_modules/jade/lib/nodes/literal.js b/node_modules/mocha/node_modules/jade/lib/nodes/literal.js deleted file mode 100644 index fde586be..00000000 --- a/node_modules/mocha/node_modules/jade/lib/nodes/literal.js +++ /dev/null @@ -1,32 +0,0 @@ - -/*! - * Jade - nodes - Literal - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Literal` node with the given `str. - * - * @param {String} str - * @api public - */ - -var Literal = module.exports = function Literal(str) { - this.str = str - .replace(/\\/g, "\\\\") - .replace(/\n|\r\n/g, "\\n") - .replace(/'/g, "\\'"); -}; - -/** - * Inherit from `Node`. - */ - -Literal.prototype.__proto__ = Node.prototype; diff --git a/node_modules/mocha/node_modules/jade/lib/nodes/mixin.js b/node_modules/mocha/node_modules/jade/lib/nodes/mixin.js deleted file mode 100644 index 8407bc79..00000000 --- a/node_modules/mocha/node_modules/jade/lib/nodes/mixin.js +++ /dev/null @@ -1,36 +0,0 @@ - -/*! - * Jade - nodes - Mixin - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Attrs = require('./attrs'); - -/** - * Initialize a new `Mixin` with `name` and `block`. - * - * @param {String} name - * @param {String} args - * @param {Block} block - * @api public - */ - -var Mixin = module.exports = function Mixin(name, args, block, call){ - this.name = name; - this.args = args; - this.block = block; - this.attrs = []; - this.call = call; -}; - -/** - * Inherit from `Attrs`. - */ - -Mixin.prototype.__proto__ = Attrs.prototype; - diff --git a/node_modules/mocha/node_modules/jade/lib/nodes/node.js b/node_modules/mocha/node_modules/jade/lib/nodes/node.js deleted file mode 100644 index e98f042c..00000000 --- a/node_modules/mocha/node_modules/jade/lib/nodes/node.js +++ /dev/null @@ -1,25 +0,0 @@ - -/*! - * Jade - nodes - Node - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Initialize a `Node`. - * - * @api public - */ - -var Node = module.exports = function Node(){}; - -/** - * Clone this node (return itself) - * - * @return {Node} - * @api private - */ - -Node.prototype.clone = function(){ - return this; -}; diff --git a/node_modules/mocha/node_modules/jade/lib/nodes/tag.js b/node_modules/mocha/node_modules/jade/lib/nodes/tag.js deleted file mode 100644 index 4b6728ad..00000000 --- a/node_modules/mocha/node_modules/jade/lib/nodes/tag.js +++ /dev/null @@ -1,95 +0,0 @@ - -/*! - * Jade - nodes - Tag - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Attrs = require('./attrs'), - Block = require('./block'), - inlineTags = require('../inline-tags'); - -/** - * Initialize a `Tag` node with the given tag `name` and optional `block`. - * - * @param {String} name - * @param {Block} block - * @api public - */ - -var Tag = module.exports = function Tag(name, block) { - this.name = name; - this.attrs = []; - this.block = block || new Block; -}; - -/** - * Inherit from `Attrs`. - */ - -Tag.prototype.__proto__ = Attrs.prototype; - -/** - * Clone this tag. - * - * @return {Tag} - * @api private - */ - -Tag.prototype.clone = function(){ - var clone = new Tag(this.name, this.block.clone()); - clone.line = this.line; - clone.attrs = this.attrs; - clone.textOnly = this.textOnly; - return clone; -}; - -/** - * Check if this tag is an inline tag. - * - * @return {Boolean} - * @api private - */ - -Tag.prototype.isInline = function(){ - return ~inlineTags.indexOf(this.name); -}; - -/** - * Check if this tag's contents can be inlined. Used for pretty printing. - * - * @return {Boolean} - * @api private - */ - -Tag.prototype.canInline = function(){ - var nodes = this.block.nodes; - - function isInline(node){ - // Recurse if the node is a block - if (node.isBlock) return node.nodes.every(isInline); - return node.isText || (node.isInline && node.isInline()); - } - - // Empty tag - if (!nodes.length) return true; - - // Text-only or inline-only tag - if (1 == nodes.length) return isInline(nodes[0]); - - // Multi-line inline-only tag - if (this.block.nodes.every(isInline)) { - for (var i = 1, len = nodes.length; i < len; ++i) { - if (nodes[i-1].isText && nodes[i].isText) - return false; - } - return true; - } - - // Mixed tag - return false; -}; \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/lib/nodes/text.js b/node_modules/mocha/node_modules/jade/lib/nodes/text.js deleted file mode 100644 index 3b5dd557..00000000 --- a/node_modules/mocha/node_modules/jade/lib/nodes/text.js +++ /dev/null @@ -1,36 +0,0 @@ - -/*! - * Jade - nodes - Text - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Node = require('./node'); - -/** - * Initialize a `Text` node with optional `line`. - * - * @param {String} line - * @api public - */ - -var Text = module.exports = function Text(line) { - this.val = ''; - if ('string' == typeof line) this.val = line; -}; - -/** - * Inherit from `Node`. - */ - -Text.prototype.__proto__ = Node.prototype; - -/** - * Flag as text. - */ - -Text.prototype.isText = true; \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/lib/parser.js b/node_modules/mocha/node_modules/jade/lib/parser.js deleted file mode 100644 index 92f2af0c..00000000 --- a/node_modules/mocha/node_modules/jade/lib/parser.js +++ /dev/null @@ -1,710 +0,0 @@ - -/*! - * Jade - Parser - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Lexer = require('./lexer') - , nodes = require('./nodes'); - -/** - * Initialize `Parser` with the given input `str` and `filename`. - * - * @param {String} str - * @param {String} filename - * @param {Object} options - * @api public - */ - -var Parser = exports = module.exports = function Parser(str, filename, options){ - this.input = str; - this.lexer = new Lexer(str, options); - this.filename = filename; - this.blocks = {}; - this.mixins = {}; - this.options = options; - this.contexts = [this]; -}; - -/** - * Tags that may not contain tags. - */ - -var textOnly = exports.textOnly = ['script', 'style']; - -/** - * Parser prototype. - */ - -Parser.prototype = { - - /** - * Push `parser` onto the context stack, - * or pop and return a `Parser`. - */ - - context: function(parser){ - if (parser) { - this.contexts.push(parser); - } else { - return this.contexts.pop(); - } - }, - - /** - * Return the next token object. - * - * @return {Object} - * @api private - */ - - advance: function(){ - return this.lexer.advance(); - }, - - /** - * Skip `n` tokens. - * - * @param {Number} n - * @api private - */ - - skip: function(n){ - while (n--) this.advance(); - }, - - /** - * Single token lookahead. - * - * @return {Object} - * @api private - */ - - peek: function() { - return this.lookahead(1); - }, - - /** - * Return lexer lineno. - * - * @return {Number} - * @api private - */ - - line: function() { - return this.lexer.lineno; - }, - - /** - * `n` token lookahead. - * - * @param {Number} n - * @return {Object} - * @api private - */ - - lookahead: function(n){ - return this.lexer.lookahead(n); - }, - - /** - * Parse input returning a string of js for evaluation. - * - * @return {String} - * @api public - */ - - parse: function(){ - var block = new nodes.Block, parser; - block.line = this.line(); - - while ('eos' != this.peek().type) { - if ('newline' == this.peek().type) { - this.advance(); - } else { - block.push(this.parseExpr()); - } - } - - if (parser = this.extending) { - this.context(parser); - var ast = parser.parse(); - this.context(); - // hoist mixins - for (var name in this.mixins) - ast.unshift(this.mixins[name]); - return ast; - } - - return block; - }, - - /** - * Expect the given type, or throw an exception. - * - * @param {String} type - * @api private - */ - - expect: function(type){ - if (this.peek().type === type) { - return this.advance(); - } else { - throw new Error('expected "' + type + '", but got "' + this.peek().type + '"'); - } - }, - - /** - * Accept the given `type`. - * - * @param {String} type - * @api private - */ - - accept: function(type){ - if (this.peek().type === type) { - return this.advance(); - } - }, - - /** - * tag - * | doctype - * | mixin - * | include - * | filter - * | comment - * | text - * | each - * | code - * | yield - * | id - * | class - * | interpolation - */ - - parseExpr: function(){ - switch (this.peek().type) { - case 'tag': - return this.parseTag(); - case 'mixin': - return this.parseMixin(); - case 'block': - return this.parseBlock(); - case 'case': - return this.parseCase(); - case 'when': - return this.parseWhen(); - case 'default': - return this.parseDefault(); - case 'extends': - return this.parseExtends(); - case 'include': - return this.parseInclude(); - case 'doctype': - return this.parseDoctype(); - case 'filter': - return this.parseFilter(); - case 'comment': - return this.parseComment(); - case 'text': - return this.parseText(); - case 'each': - return this.parseEach(); - case 'code': - return this.parseCode(); - case 'call': - return this.parseCall(); - case 'interpolation': - return this.parseInterpolation(); - case 'yield': - this.advance(); - var block = new nodes.Block; - block.yield = true; - return block; - case 'id': - case 'class': - var tok = this.advance(); - this.lexer.defer(this.lexer.tok('tag', 'div')); - this.lexer.defer(tok); - return this.parseExpr(); - default: - throw new Error('unexpected token "' + this.peek().type + '"'); - } - }, - - /** - * Text - */ - - parseText: function(){ - var tok = this.expect('text') - , node = new nodes.Text(tok.val); - node.line = this.line(); - return node; - }, - - /** - * ':' expr - * | block - */ - - parseBlockExpansion: function(){ - if (':' == this.peek().type) { - this.advance(); - return new nodes.Block(this.parseExpr()); - } else { - return this.block(); - } - }, - - /** - * case - */ - - parseCase: function(){ - var val = this.expect('case').val - , node = new nodes.Case(val); - node.line = this.line(); - node.block = this.block(); - return node; - }, - - /** - * when - */ - - parseWhen: function(){ - var val = this.expect('when').val - return new nodes.Case.When(val, this.parseBlockExpansion()); - }, - - /** - * default - */ - - parseDefault: function(){ - this.expect('default'); - return new nodes.Case.When('default', this.parseBlockExpansion()); - }, - - /** - * code - */ - - parseCode: function(){ - var tok = this.expect('code') - , node = new nodes.Code(tok.val, tok.buffer, tok.escape) - , block - , i = 1; - node.line = this.line(); - while (this.lookahead(i) && 'newline' == this.lookahead(i).type) ++i; - block = 'indent' == this.lookahead(i).type; - if (block) { - this.skip(i-1); - node.block = this.block(); - } - return node; - }, - - /** - * comment - */ - - parseComment: function(){ - var tok = this.expect('comment') - , node; - - if ('indent' == this.peek().type) { - node = new nodes.BlockComment(tok.val, this.block(), tok.buffer); - } else { - node = new nodes.Comment(tok.val, tok.buffer); - } - - node.line = this.line(); - return node; - }, - - /** - * doctype - */ - - parseDoctype: function(){ - var tok = this.expect('doctype') - , node = new nodes.Doctype(tok.val); - node.line = this.line(); - return node; - }, - - /** - * filter attrs? text-block - */ - - parseFilter: function(){ - var block - , tok = this.expect('filter') - , attrs = this.accept('attrs'); - - this.lexer.pipeless = true; - block = this.parseTextBlock(); - this.lexer.pipeless = false; - - var node = new nodes.Filter(tok.val, block, attrs && attrs.attrs); - node.line = this.line(); - return node; - }, - - /** - * tag ':' attrs? block - */ - - parseASTFilter: function(){ - var block - , tok = this.expect('tag') - , attrs = this.accept('attrs'); - - this.expect(':'); - block = this.block(); - - var node = new nodes.Filter(tok.val, block, attrs && attrs.attrs); - node.line = this.line(); - return node; - }, - - /** - * each block - */ - - parseEach: function(){ - var tok = this.expect('each') - , node = new nodes.Each(tok.code, tok.val, tok.key); - node.line = this.line(); - node.block = this.block(); - return node; - }, - - /** - * 'extends' name - */ - - parseExtends: function(){ - var path = require('path') - , fs = require('fs') - , dirname = path.dirname - , basename = path.basename - , join = path.join; - - if (!this.filename) - throw new Error('the "filename" option is required to extend templates'); - - var path = this.expect('extends').val.trim() - , dir = dirname(this.filename); - - var path = join(dir, path + '.jade') - , str = fs.readFileSync(path, 'utf8') - , parser = new Parser(str, path, this.options); - - parser.blocks = this.blocks; - parser.contexts = this.contexts; - this.extending = parser; - - // TODO: null node - return new nodes.Literal(''); - }, - - /** - * 'block' name block - */ - - parseBlock: function(){ - var block = this.expect('block') - , mode = block.mode - , name = block.val.trim(); - - block = 'indent' == this.peek().type - ? this.block() - : new nodes.Block(new nodes.Literal('')); - - var prev = this.blocks[name]; - - if (prev) { - switch (prev.mode) { - case 'append': - block.nodes = block.nodes.concat(prev.nodes); - prev = block; - break; - case 'prepend': - block.nodes = prev.nodes.concat(block.nodes); - prev = block; - break; - } - } - - block.mode = mode; - return this.blocks[name] = prev || block; - }, - - /** - * include block? - */ - - parseInclude: function(){ - var path = require('path') - , fs = require('fs') - , dirname = path.dirname - , basename = path.basename - , join = path.join; - - var path = this.expect('include').val.trim() - , dir = dirname(this.filename); - - if (!this.filename) - throw new Error('the "filename" option is required to use includes'); - - // no extension - if (!~basename(path).indexOf('.')) { - path += '.jade'; - } - - // non-jade - if ('.jade' != path.substr(-5)) { - var path = join(dir, path) - , str = fs.readFileSync(path, 'utf8'); - return new nodes.Literal(str); - } - - var path = join(dir, path) - , str = fs.readFileSync(path, 'utf8') - , parser = new Parser(str, path, this.options); - parser.blocks = this.blocks; - parser.mixins = this.mixins; - - this.context(parser); - var ast = parser.parse(); - this.context(); - ast.filename = path; - - if ('indent' == this.peek().type) { - ast.includeBlock().push(this.block()); - } - - return ast; - }, - - /** - * call ident block - */ - - parseCall: function(){ - var tok = this.expect('call') - , name = tok.val - , args = tok.args - , mixin = new nodes.Mixin(name, args, new nodes.Block, true); - - this.tag(mixin); - if (mixin.block.isEmpty()) mixin.block = null; - return mixin; - }, - - /** - * mixin block - */ - - parseMixin: function(){ - var tok = this.expect('mixin') - , name = tok.val - , args = tok.args - , mixin; - - // definition - if ('indent' == this.peek().type) { - mixin = new nodes.Mixin(name, args, this.block(), false); - this.mixins[name] = mixin; - return mixin; - // call - } else { - return new nodes.Mixin(name, args, null, true); - } - }, - - /** - * indent (text | newline)* outdent - */ - - parseTextBlock: function(){ - var block = new nodes.Block; - block.line = this.line(); - var spaces = this.expect('indent').val; - if (null == this._spaces) this._spaces = spaces; - var indent = Array(spaces - this._spaces + 1).join(' '); - while ('outdent' != this.peek().type) { - switch (this.peek().type) { - case 'newline': - this.advance(); - break; - case 'indent': - this.parseTextBlock().nodes.forEach(function(node){ - block.push(node); - }); - break; - default: - var text = new nodes.Text(indent + this.advance().val); - text.line = this.line(); - block.push(text); - } - } - - if (spaces == this._spaces) this._spaces = null; - this.expect('outdent'); - return block; - }, - - /** - * indent expr* outdent - */ - - block: function(){ - var block = new nodes.Block; - block.line = this.line(); - this.expect('indent'); - while ('outdent' != this.peek().type) { - if ('newline' == this.peek().type) { - this.advance(); - } else { - block.push(this.parseExpr()); - } - } - this.expect('outdent'); - return block; - }, - - /** - * interpolation (attrs | class | id)* (text | code | ':')? newline* block? - */ - - parseInterpolation: function(){ - var tok = this.advance(); - var tag = new nodes.Tag(tok.val); - tag.buffer = true; - return this.tag(tag); - }, - - /** - * tag (attrs | class | id)* (text | code | ':')? newline* block? - */ - - parseTag: function(){ - // ast-filter look-ahead - var i = 2; - if ('attrs' == this.lookahead(i).type) ++i; - if (':' == this.lookahead(i).type) { - if ('indent' == this.lookahead(++i).type) { - return this.parseASTFilter(); - } - } - - var tok = this.advance() - , tag = new nodes.Tag(tok.val); - - tag.selfClosing = tok.selfClosing; - - return this.tag(tag); - }, - - /** - * Parse tag. - */ - - tag: function(tag){ - var dot; - - tag.line = this.line(); - - // (attrs | class | id)* - out: - while (true) { - switch (this.peek().type) { - case 'id': - case 'class': - var tok = this.advance(); - tag.setAttribute(tok.type, "'" + tok.val + "'"); - continue; - case 'attrs': - var tok = this.advance() - , obj = tok.attrs - , escaped = tok.escaped - , names = Object.keys(obj); - - if (tok.selfClosing) tag.selfClosing = true; - - for (var i = 0, len = names.length; i < len; ++i) { - var name = names[i] - , val = obj[name]; - tag.setAttribute(name, val, escaped[name]); - } - continue; - default: - break out; - } - } - - // check immediate '.' - if ('.' == this.peek().val) { - dot = tag.textOnly = true; - this.advance(); - } - - // (text | code | ':')? - switch (this.peek().type) { - case 'text': - tag.block.push(this.parseText()); - break; - case 'code': - tag.code = this.parseCode(); - break; - case ':': - this.advance(); - tag.block = new nodes.Block; - tag.block.push(this.parseExpr()); - break; - } - - // newline* - while ('newline' == this.peek().type) this.advance(); - - tag.textOnly = tag.textOnly || ~textOnly.indexOf(tag.name); - - // script special-case - if ('script' == tag.name) { - var type = tag.getAttribute('type'); - if (!dot && type && 'text/javascript' != type.replace(/^['"]|['"]$/g, '')) { - tag.textOnly = false; - } - } - - // block? - if ('indent' == this.peek().type) { - if (tag.textOnly) { - this.lexer.pipeless = true; - tag.block = this.parseTextBlock(); - this.lexer.pipeless = false; - } else { - var block = this.block(); - if (tag.block) { - for (var i = 0, len = block.nodes.length; i < len; ++i) { - tag.block.push(block.nodes[i]); - } - } else { - tag.block = block; - } - } - } - - return tag; - } -}; diff --git a/node_modules/mocha/node_modules/jade/lib/runtime.js b/node_modules/mocha/node_modules/jade/lib/runtime.js deleted file mode 100644 index fb711f5e..00000000 --- a/node_modules/mocha/node_modules/jade/lib/runtime.js +++ /dev/null @@ -1,174 +0,0 @@ - -/*! - * Jade - runtime - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Lame Array.isArray() polyfill for now. - */ - -if (!Array.isArray) { - Array.isArray = function(arr){ - return '[object Array]' == Object.prototype.toString.call(arr); - }; -} - -/** - * Lame Object.keys() polyfill for now. - */ - -if (!Object.keys) { - Object.keys = function(obj){ - var arr = []; - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - arr.push(key); - } - } - return arr; - } -} - -/** - * Merge two attribute objects giving precedence - * to values in object `b`. Classes are special-cased - * allowing for arrays and merging/joining appropriately - * resulting in a string. - * - * @param {Object} a - * @param {Object} b - * @return {Object} a - * @api private - */ - -exports.merge = function merge(a, b) { - var ac = a['class']; - var bc = b['class']; - - if (ac || bc) { - ac = ac || []; - bc = bc || []; - if (!Array.isArray(ac)) ac = [ac]; - if (!Array.isArray(bc)) bc = [bc]; - ac = ac.filter(nulls); - bc = bc.filter(nulls); - a['class'] = ac.concat(bc).join(' '); - } - - for (var key in b) { - if (key != 'class') { - a[key] = b[key]; - } - } - - return a; -}; - -/** - * Filter null `val`s. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - -function nulls(val) { - return val != null; -} - -/** - * Render the given attributes object. - * - * @param {Object} obj - * @param {Object} escaped - * @return {String} - * @api private - */ - -exports.attrs = function attrs(obj, escaped){ - var buf = [] - , terse = obj.terse; - - delete obj.terse; - var keys = Object.keys(obj) - , len = keys.length; - - if (len) { - buf.push(''); - for (var i = 0; i < len; ++i) { - var key = keys[i] - , val = obj[key]; - - if ('boolean' == typeof val || null == val) { - if (val) { - terse - ? buf.push(key) - : buf.push(key + '="' + key + '"'); - } - } else if (0 == key.indexOf('data') && 'string' != typeof val) { - buf.push(key + "='" + JSON.stringify(val) + "'"); - } else if ('class' == key && Array.isArray(val)) { - buf.push(key + '="' + exports.escape(val.join(' ')) + '"'); - } else if (escaped && escaped[key]) { - buf.push(key + '="' + exports.escape(val) + '"'); - } else { - buf.push(key + '="' + val + '"'); - } - } - } - - return buf.join(' '); -}; - -/** - * Escape the given string of `html`. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function escape(html){ - return String(html) - .replace(/&(?!(\w+|\#\d+);)/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); -}; - -/** - * Re-throw the given `err` in context to the - * the jade in `filename` at the given `lineno`. - * - * @param {Error} err - * @param {String} filename - * @param {String} lineno - * @api private - */ - -exports.rethrow = function rethrow(err, filename, lineno){ - if (!filename) throw err; - - var context = 3 - , str = require('fs').readFileSync(filename, 'utf8') - , lines = str.split('\n') - , start = Math.max(lineno - context, 0) - , end = Math.min(lines.length, lineno + context); - - // Error context - var context = lines.slice(start, end).map(function(line, i){ - var curr = i + start + 1; - return (curr == lineno ? ' > ' : ' ') - + curr - + '| ' - + line; - }).join('\n'); - - // Alter exception message - err.path = filename; - err.message = (filename || 'Jade') + ':' + lineno - + '\n' + context + '\n\n' + err.message; - throw err; -}; diff --git a/node_modules/mocha/node_modules/jade/lib/self-closing.js b/node_modules/mocha/node_modules/jade/lib/self-closing.js deleted file mode 100644 index 05487712..00000000 --- a/node_modules/mocha/node_modules/jade/lib/self-closing.js +++ /dev/null @@ -1,19 +0,0 @@ - -/*! - * Jade - self closing tags - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = [ - 'meta' - , 'img' - , 'link' - , 'input' - , 'source' - , 'area' - , 'base' - , 'col' - , 'br' - , 'hr' -]; \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/lib/utils.js b/node_modules/mocha/node_modules/jade/lib/utils.js deleted file mode 100644 index ff46d022..00000000 --- a/node_modules/mocha/node_modules/jade/lib/utils.js +++ /dev/null @@ -1,49 +0,0 @@ - -/*! - * Jade - utils - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Convert interpolation in the given string to JavaScript. - * - * @param {String} str - * @return {String} - * @api private - */ - -var interpolate = exports.interpolate = function(str){ - return str.replace(/(\\)?([#!]){(.*?)}/g, function(str, escape, flag, code){ - return escape - ? str - : "' + " - + ('!' == flag ? '' : 'escape') - + "((interp = " + code.replace(/\\'/g, "'") - + ") == null ? '' : interp) + '"; - }); -}; - -/** - * Escape single quotes in `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -var escape = exports.escape = function(str) { - return str.replace(/'/g, "\\'"); -}; - -/** - * Interpolate, and escape the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.text = function(str){ - return interpolate(escape(str)); -}; \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/node_modules/commander/.npmignore b/node_modules/mocha/node_modules/jade/node_modules/commander/.npmignore deleted file mode 100644 index f1250e58..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/commander/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/node_modules/mocha/node_modules/jade/node_modules/commander/.travis.yml b/node_modules/mocha/node_modules/jade/node_modules/commander/.travis.yml deleted file mode 100644 index f1d0f13c..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/commander/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.4 - - 0.6 diff --git a/node_modules/mocha/node_modules/jade/node_modules/commander/History.md b/node_modules/mocha/node_modules/jade/node_modules/commander/History.md deleted file mode 100644 index 4961d2e2..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/commander/History.md +++ /dev/null @@ -1,107 +0,0 @@ - -0.6.1 / 2012-06-01 -================== - - * Added: append (yes or no) on confirmation - * Added: allow node.js v0.7.x - -0.6.0 / 2012-04-10 -================== - - * Added `.prompt(obj, callback)` support. Closes #49 - * Added default support to .choose(). Closes #41 - * Fixed the choice example - -0.5.1 / 2011-12-20 -================== - - * Fixed `password()` for recent nodes. Closes #36 - -0.5.0 / 2011-12-04 -================== - - * Added sub-command option support [itay] - -0.4.3 / 2011-12-04 -================== - - * Fixed custom help ordering. Closes #32 - -0.4.2 / 2011-11-24 -================== - - * Added travis support - * Fixed: line-buffered input automatically trimmed. Closes #31 - -0.4.1 / 2011-11-18 -================== - - * Removed listening for "close" on --help - -0.4.0 / 2011-11-15 -================== - - * Added support for `--`. Closes #24 - -0.3.3 / 2011-11-14 -================== - - * Fixed: wait for close event when writing help info [Jerry Hamlet] - -0.3.2 / 2011-11-01 -================== - - * Fixed long flag definitions with values [felixge] - -0.3.1 / 2011-10-31 -================== - - * Changed `--version` short flag to `-V` from `-v` - * Changed `.version()` so it's configurable [felixge] - -0.3.0 / 2011-10-31 -================== - - * Added support for long flags only. Closes #18 - -0.2.1 / 2011-10-24 -================== - - * "node": ">= 0.4.x < 0.7.0". Closes #20 - -0.2.0 / 2011-09-26 -================== - - * Allow for defaults that are not just boolean. Default peassignment only occurs for --no-*, optional, and required arguments. [Jim Isaacs] - -0.1.0 / 2011-08-24 -================== - - * Added support for custom `--help` output - -0.0.5 / 2011-08-18 -================== - - * Changed: when the user enters nothing prompt for password again - * Fixed issue with passwords beginning with numbers [NuckChorris] - -0.0.4 / 2011-08-15 -================== - - * Fixed `Commander#args` - -0.0.3 / 2011-08-15 -================== - - * Added default option value support - -0.0.2 / 2011-08-15 -================== - - * Added mask support to `Command#password(str[, mask], fn)` - * Added `Command#password(str, fn)` - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/mocha/node_modules/jade/node_modules/commander/Makefile b/node_modules/mocha/node_modules/jade/node_modules/commander/Makefile deleted file mode 100644 index 00746255..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/commander/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -TESTS = $(shell find test/test.*.js) - -test: - @./test/run $(TESTS) - -.PHONY: test \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/node_modules/commander/Readme.md b/node_modules/mocha/node_modules/jade/node_modules/commander/Readme.md deleted file mode 100644 index b8328c37..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/commander/Readme.md +++ /dev/null @@ -1,262 +0,0 @@ -# Commander.js - - The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander). - - [![Build Status](https://secure.travis-ci.org/visionmedia/commander.js.png)](http://travis-ci.org/visionmedia/commander.js) - -## Installation - - $ npm install commander - -## Option parsing - - Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('commander'); - -program - .version('0.0.1') - .option('-p, --peppers', 'Add peppers') - .option('-P, --pineapple', 'Add pineapple') - .option('-b, --bbq', 'Add bbq sauce') - .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble') - .parse(process.argv); - -console.log('you ordered a pizza with:'); -if (program.peppers) console.log(' - peppers'); -if (program.pineapple) console.log(' - pineappe'); -if (program.bbq) console.log(' - bbq'); -console.log(' - %s cheese', program.cheese); -``` - - Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc. - -## Automated --help - - The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free: - -``` - $ ./examples/pizza --help - - Usage: pizza [options] - - Options: - - -V, --version output the version number - -p, --peppers Add peppers - -P, --pineapple Add pineappe - -b, --bbq Add bbq sauce - -c, --cheese Add the specified type of cheese [marble] - -h, --help output usage information - -``` - -## Coercion - -```js -function range(val) { - return val.split('..').map(Number); -} - -function list(val) { - return val.split(','); -} - -program - .version('0.0.1') - .usage('[options] ') - .option('-i, --integer ', 'An integer argument', parseInt) - .option('-f, --float ', 'A float argument', parseFloat) - .option('-r, --range ..', 'A range', range) - .option('-l, --list ', 'A list', list) - .option('-o, --optional [value]', 'An optional value') - .parse(process.argv); - -console.log(' int: %j', program.integer); -console.log(' float: %j', program.float); -console.log(' optional: %j', program.optional); -program.range = program.range || []; -console.log(' range: %j..%j', program.range[0], program.range[1]); -console.log(' list: %j', program.list); -console.log(' args: %j', program.args); -``` - -## Custom help - - You can display arbitrary `-h, --help` information - by listening for "--help". Commander will automatically - exit once you are done so that the remainder of your program - does not execute causing undesired behaviours, for example - in the following executable "stuff" will not output when - `--help` is used. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('../'); - -function list(val) { - return val.split(',').map(Number); -} - -program - .version('0.0.1') - .option('-f, --foo', 'enable some foo') - .option('-b, --bar', 'enable some bar') - .option('-B, --baz', 'enable some baz'); - -// must be before .parse() since -// node's emit() is immediate - -program.on('--help', function(){ - console.log(' Examples:'); - console.log(''); - console.log(' $ custom-help --help'); - console.log(' $ custom-help -h'); - console.log(''); -}); - -program.parse(process.argv); - -console.log('stuff'); -``` - -yielding the following help output: - -``` - -Usage: custom-help [options] - -Options: - - -h, --help output usage information - -V, --version output the version number - -f, --foo enable some foo - -b, --bar enable some bar - -B, --baz enable some baz - -Examples: - - $ custom-help --help - $ custom-help -h - -``` - -## .prompt(msg, fn) - - Single-line prompt: - -```js -program.prompt('name: ', function(name){ - console.log('hi %s', name); -}); -``` - - Multi-line prompt: - -```js -program.prompt('description:', function(name){ - console.log('hi %s', name); -}); -``` - - Coercion: - -```js -program.prompt('Age: ', Number, function(age){ - console.log('age: %j', age); -}); -``` - -```js -program.prompt('Birthdate: ', Date, function(date){ - console.log('date: %s', date); -}); -``` - -## .password(msg[, mask], fn) - -Prompt for password without echoing: - -```js -program.password('Password: ', function(pass){ - console.log('got "%s"', pass); - process.stdin.destroy(); -}); -``` - -Prompt for password with mask char "*": - -```js -program.password('Password: ', '*', function(pass){ - console.log('got "%s"', pass); - process.stdin.destroy(); -}); -``` - -## .confirm(msg, fn) - - Confirm with the given `msg`: - -```js -program.confirm('continue? ', function(ok){ - console.log(' got %j', ok); -}); -``` - -## .choose(list, fn) - - Let the user choose from a `list`: - -```js -var list = ['tobi', 'loki', 'jane', 'manny', 'luna']; - -console.log('Choose the coolest pet:'); -program.choose(list, function(i){ - console.log('you chose %d "%s"', i, list[i]); -}); -``` - -## Links - - - [API documentation](http://visionmedia.github.com/commander.js/) - - [ascii tables](https://github.com/LearnBoost/cli-table) - - [progress bars](https://github.com/visionmedia/node-progress) - - [more progress bars](https://github.com/substack/node-multimeter) - - [examples](https://github.com/visionmedia/commander.js/tree/master/examples) - -## License - -(The MIT License) - -Copyright (c) 2011 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. \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/node_modules/commander/index.js b/node_modules/mocha/node_modules/jade/node_modules/commander/index.js deleted file mode 100644 index 06ec1e4b..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/commander/index.js +++ /dev/null @@ -1,2 +0,0 @@ - -module.exports = require('./lib/commander'); \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/node_modules/commander/lib/commander.js b/node_modules/mocha/node_modules/jade/node_modules/commander/lib/commander.js deleted file mode 100644 index 5ba87ebb..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/commander/lib/commander.js +++ /dev/null @@ -1,1026 +0,0 @@ - -/*! - * commander - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , path = require('path') - , tty = require('tty') - , basename = path.basename; - -/** - * Expose the root command. - */ - -exports = module.exports = new Command; - -/** - * Expose `Command`. - */ - -exports.Command = Command; - -/** - * Expose `Option`. - */ - -exports.Option = Option; - -/** - * Initialize a new `Option` with the given `flags` and `description`. - * - * @param {String} flags - * @param {String} description - * @api public - */ - -function Option(flags, description) { - this.flags = flags; - this.required = ~flags.indexOf('<'); - this.optional = ~flags.indexOf('['); - this.bool = !~flags.indexOf('-no-'); - flags = flags.split(/[ ,|]+/); - if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift(); - this.long = flags.shift(); - this.description = description; -} - -/** - * Return option name. - * - * @return {String} - * @api private - */ - -Option.prototype.name = function(){ - return this.long - .replace('--', '') - .replace('no-', ''); -}; - -/** - * Check if `arg` matches the short or long flag. - * - * @param {String} arg - * @return {Boolean} - * @api private - */ - -Option.prototype.is = function(arg){ - return arg == this.short - || arg == this.long; -}; - -/** - * Initialize a new `Command`. - * - * @param {String} name - * @api public - */ - -function Command(name) { - this.commands = []; - this.options = []; - this.args = []; - this.name = name; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Command.prototype.__proto__ = EventEmitter.prototype; - -/** - * Add command `name`. - * - * The `.action()` callback is invoked when the - * command `name` is specified via __ARGV__, - * and the remaining arguments are applied to the - * function for access. - * - * When the `name` is "*" an un-matched command - * will be passed as the first arg, followed by - * the rest of __ARGV__ remaining. - * - * Examples: - * - * program - * .version('0.0.1') - * .option('-C, --chdir ', 'change the working directory') - * .option('-c, --config ', 'set config path. defaults to ./deploy.conf') - * .option('-T, --no-tests', 'ignore test hook') - * - * program - * .command('setup') - * .description('run remote setup commands') - * .action(function(){ - * console.log('setup'); - * }); - * - * program - * .command('exec ') - * .description('run the given remote command') - * .action(function(cmd){ - * console.log('exec "%s"', cmd); - * }); - * - * program - * .command('*') - * .description('deploy the given env') - * .action(function(env){ - * console.log('deploying "%s"', env); - * }); - * - * program.parse(process.argv); - * - * @param {String} name - * @return {Command} the new command - * @api public - */ - -Command.prototype.command = function(name){ - var args = name.split(/ +/); - var cmd = new Command(args.shift()); - this.commands.push(cmd); - cmd.parseExpectedArgs(args); - cmd.parent = this; - return cmd; -}; - -/** - * Parse expected `args`. - * - * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. - * - * @param {Array} args - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parseExpectedArgs = function(args){ - if (!args.length) return; - var self = this; - args.forEach(function(arg){ - switch (arg[0]) { - case '<': - self.args.push({ required: true, name: arg.slice(1, -1) }); - break; - case '[': - self.args.push({ required: false, name: arg.slice(1, -1) }); - break; - } - }); - return this; -}; - -/** - * Register callback `fn` for the command. - * - * Examples: - * - * program - * .command('help') - * .description('display verbose help') - * .action(function(){ - * // output help here - * }); - * - * @param {Function} fn - * @return {Command} for chaining - * @api public - */ - -Command.prototype.action = function(fn){ - var self = this; - this.parent.on(this.name, function(args, unknown){ - // Parse any so-far unknown options - unknown = unknown || []; - var parsed = self.parseOptions(unknown); - - // Output help if necessary - outputHelpIfNecessary(self, parsed.unknown); - - // If there are still any unknown options, then we simply - // die, unless someone asked for help, in which case we give it - // to them, and then we die. - if (parsed.unknown.length > 0) { - self.unknownOption(parsed.unknown[0]); - } - - self.args.forEach(function(arg, i){ - if (arg.required && null == args[i]) { - self.missingArgument(arg.name); - } - }); - - // Always append ourselves to the end of the arguments, - // to make sure we match the number of arguments the user - // expects - if (self.args.length) { - args[self.args.length] = self; - } else { - args.push(self); - } - - fn.apply(this, args); - }); - return this; -}; - -/** - * Define option with `flags`, `description` and optional - * coercion `fn`. - * - * The `flags` string should contain both the short and long flags, - * separated by comma, a pipe or space. The following are all valid - * all will output this way when `--help` is used. - * - * "-p, --pepper" - * "-p|--pepper" - * "-p --pepper" - * - * Examples: - * - * // simple boolean defaulting to false - * program.option('-p, --pepper', 'add pepper'); - * - * --pepper - * program.pepper - * // => Boolean - * - * // simple boolean defaulting to false - * program.option('-C, --no-cheese', 'remove cheese'); - * - * program.cheese - * // => true - * - * --no-cheese - * program.cheese - * // => true - * - * // required argument - * program.option('-C, --chdir ', 'change the working directory'); - * - * --chdir /tmp - * program.chdir - * // => "/tmp" - * - * // optional argument - * program.option('-c, --cheese [type]', 'add cheese [marble]'); - * - * @param {String} flags - * @param {String} description - * @param {Function|Mixed} fn or default - * @param {Mixed} defaultValue - * @return {Command} for chaining - * @api public - */ - -Command.prototype.option = function(flags, description, fn, defaultValue){ - var self = this - , option = new Option(flags, description) - , oname = option.name() - , name = camelcase(oname); - - // default as 3rd arg - if ('function' != typeof fn) defaultValue = fn, fn = null; - - // preassign default value only for --no-*, [optional], or - if (false == option.bool || option.optional || option.required) { - // when --no-* we make sure default is true - if (false == option.bool) defaultValue = true; - // preassign only if we have a default - if (undefined !== defaultValue) self[name] = defaultValue; - } - - // register the option - this.options.push(option); - - // when it's passed assign the value - // and conditionally invoke the callback - this.on(oname, function(val){ - // coercion - if (null != val && fn) val = fn(val); - - // unassigned or bool - if ('boolean' == typeof self[name] || 'undefined' == typeof self[name]) { - // if no value, bool true, and we have a default, then use it! - if (null == val) { - self[name] = option.bool - ? defaultValue || true - : false; - } else { - self[name] = val; - } - } else if (null !== val) { - // reassign - self[name] = val; - } - }); - - return this; -}; - -/** - * Parse `argv`, settings options and invoking commands when defined. - * - * @param {Array} argv - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parse = function(argv){ - // store raw args - this.rawArgs = argv; - - // guess name - if (!this.name) this.name = basename(argv[1]); - - // process argv - var parsed = this.parseOptions(this.normalize(argv.slice(2))); - this.args = parsed.args; - return this.parseArgs(this.args, parsed.unknown); -}; - -/** - * Normalize `args`, splitting joined short flags. For example - * the arg "-abc" is equivalent to "-a -b -c". - * - * @param {Array} args - * @return {Array} - * @api private - */ - -Command.prototype.normalize = function(args){ - var ret = [] - , arg; - - for (var i = 0, len = args.length; i < len; ++i) { - arg = args[i]; - if (arg.length > 1 && '-' == arg[0] && '-' != arg[1]) { - arg.slice(1).split('').forEach(function(c){ - ret.push('-' + c); - }); - } else { - ret.push(arg); - } - } - - return ret; -}; - -/** - * Parse command `args`. - * - * When listener(s) are available those - * callbacks are invoked, otherwise the "*" - * event is emitted and those actions are invoked. - * - * @param {Array} args - * @return {Command} for chaining - * @api private - */ - -Command.prototype.parseArgs = function(args, unknown){ - var cmds = this.commands - , len = cmds.length - , name; - - if (args.length) { - name = args[0]; - if (this.listeners(name).length) { - this.emit(args.shift(), args, unknown); - } else { - this.emit('*', args); - } - } else { - outputHelpIfNecessary(this, unknown); - - // If there were no args and we have unknown options, - // then they are extraneous and we need to error. - if (unknown.length > 0) { - this.unknownOption(unknown[0]); - } - } - - return this; -}; - -/** - * Return an option matching `arg` if any. - * - * @param {String} arg - * @return {Option} - * @api private - */ - -Command.prototype.optionFor = function(arg){ - for (var i = 0, len = this.options.length; i < len; ++i) { - if (this.options[i].is(arg)) { - return this.options[i]; - } - } -}; - -/** - * Parse options from `argv` returning `argv` - * void of these options. - * - * @param {Array} argv - * @return {Array} - * @api public - */ - -Command.prototype.parseOptions = function(argv){ - var args = [] - , len = argv.length - , literal - , option - , arg; - - var unknownOptions = []; - - // parse options - for (var i = 0; i < len; ++i) { - arg = argv[i]; - - // literal args after -- - if ('--' == arg) { - literal = true; - continue; - } - - if (literal) { - args.push(arg); - continue; - } - - // find matching Option - option = this.optionFor(arg); - - // option is defined - if (option) { - // requires arg - if (option.required) { - arg = argv[++i]; - if (null == arg) return this.optionMissingArgument(option); - if ('-' == arg[0]) return this.optionMissingArgument(option, arg); - this.emit(option.name(), arg); - // optional arg - } else if (option.optional) { - arg = argv[i+1]; - if (null == arg || '-' == arg[0]) { - arg = null; - } else { - ++i; - } - this.emit(option.name(), arg); - // bool - } else { - this.emit(option.name()); - } - continue; - } - - // looks like an option - if (arg.length > 1 && '-' == arg[0]) { - unknownOptions.push(arg); - - // If the next argument looks like it might be - // an argument for this option, we pass it on. - // If it isn't, then it'll simply be ignored - if (argv[i+1] && '-' != argv[i+1][0]) { - unknownOptions.push(argv[++i]); - } - continue; - } - - // arg - args.push(arg); - } - - return { args: args, unknown: unknownOptions }; -}; - -/** - * Argument `name` is missing. - * - * @param {String} name - * @api private - */ - -Command.prototype.missingArgument = function(name){ - console.error(); - console.error(" error: missing required argument `%s'", name); - console.error(); - process.exit(1); -}; - -/** - * `Option` is missing an argument, but received `flag` or nothing. - * - * @param {String} option - * @param {String} flag - * @api private - */ - -Command.prototype.optionMissingArgument = function(option, flag){ - console.error(); - if (flag) { - console.error(" error: option `%s' argument missing, got `%s'", option.flags, flag); - } else { - console.error(" error: option `%s' argument missing", option.flags); - } - console.error(); - process.exit(1); -}; - -/** - * Unknown option `flag`. - * - * @param {String} flag - * @api private - */ - -Command.prototype.unknownOption = function(flag){ - console.error(); - console.error(" error: unknown option `%s'", flag); - console.error(); - process.exit(1); -}; - -/** - * Set the program version to `str`. - * - * This method auto-registers the "-V, --version" flag - * which will print the version number when passed. - * - * @param {String} str - * @param {String} flags - * @return {Command} for chaining - * @api public - */ - -Command.prototype.version = function(str, flags){ - if (0 == arguments.length) return this._version; - this._version = str; - flags = flags || '-V, --version'; - this.option(flags, 'output the version number'); - this.on('version', function(){ - console.log(str); - process.exit(0); - }); - return this; -}; - -/** - * Set the description `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.description = function(str){ - if (0 == arguments.length) return this._description; - this._description = str; - return this; -}; - -/** - * Set / get the command usage `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.usage = function(str){ - var args = this.args.map(function(arg){ - return arg.required - ? '<' + arg.name + '>' - : '[' + arg.name + ']'; - }); - - var usage = '[options' - + (this.commands.length ? '] [command' : '') - + ']' - + (this.args.length ? ' ' + args : ''); - if (0 == arguments.length) return this._usage || usage; - this._usage = str; - - return this; -}; - -/** - * Return the largest option length. - * - * @return {Number} - * @api private - */ - -Command.prototype.largestOptionLength = function(){ - return this.options.reduce(function(max, option){ - return Math.max(max, option.flags.length); - }, 0); -}; - -/** - * Return help for options. - * - * @return {String} - * @api private - */ - -Command.prototype.optionHelp = function(){ - var width = this.largestOptionLength(); - - // Prepend the help information - return [pad('-h, --help', width) + ' ' + 'output usage information'] - .concat(this.options.map(function(option){ - return pad(option.flags, width) - + ' ' + option.description; - })) - .join('\n'); -}; - -/** - * Return command help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.commandHelp = function(){ - if (!this.commands.length) return ''; - return [ - '' - , ' Commands:' - , '' - , this.commands.map(function(cmd){ - var args = cmd.args.map(function(arg){ - return arg.required - ? '<' + arg.name + '>' - : '[' + arg.name + ']'; - }).join(' '); - - return cmd.name - + (cmd.options.length - ? ' [options]' - : '') + ' ' + args - + (cmd.description() - ? '\n' + cmd.description() - : ''); - }).join('\n\n').replace(/^/gm, ' ') - , '' - ].join('\n'); -}; - -/** - * Return program help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.helpInformation = function(){ - return [ - '' - , ' Usage: ' + this.name + ' ' + this.usage() - , '' + this.commandHelp() - , ' Options:' - , '' - , '' + this.optionHelp().replace(/^/gm, ' ') - , '' - , '' - ].join('\n'); -}; - -/** - * Prompt for a `Number`. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptForNumber = function(str, fn){ - var self = this; - this.promptSingleLine(str, function parseNumber(val){ - val = Number(val); - if (isNaN(val)) return self.promptSingleLine(str + '(must be a number) ', parseNumber); - fn(val); - }); -}; - -/** - * Prompt for a `Date`. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptForDate = function(str, fn){ - var self = this; - this.promptSingleLine(str, function parseDate(val){ - val = new Date(val); - if (isNaN(val.getTime())) return self.promptSingleLine(str + '(must be a date) ', parseDate); - fn(val); - }); -}; - -/** - * Single-line prompt. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptSingleLine = function(str, fn){ - if ('function' == typeof arguments[2]) { - return this['promptFor' + (fn.name || fn)](str, arguments[2]); - } - - process.stdout.write(str); - process.stdin.setEncoding('utf8'); - process.stdin.once('data', function(val){ - fn(val.trim()); - }).resume(); -}; - -/** - * Multi-line prompt. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptMultiLine = function(str, fn){ - var buf = []; - console.log(str); - process.stdin.setEncoding('utf8'); - process.stdin.on('data', function(val){ - if ('\n' == val || '\r\n' == val) { - process.stdin.removeAllListeners('data'); - fn(buf.join('\n')); - } else { - buf.push(val.trimRight()); - } - }).resume(); -}; - -/** - * Prompt `str` and callback `fn(val)` - * - * Commander supports single-line and multi-line prompts. - * To issue a single-line prompt simply add white-space - * to the end of `str`, something like "name: ", whereas - * for a multi-line prompt omit this "description:". - * - * - * Examples: - * - * program.prompt('Username: ', function(name){ - * console.log('hi %s', name); - * }); - * - * program.prompt('Description:', function(desc){ - * console.log('description was "%s"', desc.trim()); - * }); - * - * @param {String|Object} str - * @param {Function} fn - * @api public - */ - -Command.prototype.prompt = function(str, fn){ - var self = this; - - if ('string' == typeof str) { - if (/ $/.test(str)) return this.promptSingleLine.apply(this, arguments); - this.promptMultiLine(str, fn); - } else { - var keys = Object.keys(str) - , obj = {}; - - function next() { - var key = keys.shift() - , label = str[key]; - - if (!key) return fn(obj); - self.prompt(label, function(val){ - obj[key] = val; - next(); - }); - } - - next(); - } -}; - -/** - * Prompt for password with `str`, `mask` char and callback `fn(val)`. - * - * The mask string defaults to '', aka no output is - * written while typing, you may want to use "*" etc. - * - * Examples: - * - * program.password('Password: ', function(pass){ - * console.log('got "%s"', pass); - * process.stdin.destroy(); - * }); - * - * program.password('Password: ', '*', function(pass){ - * console.log('got "%s"', pass); - * process.stdin.destroy(); - * }); - * - * @param {String} str - * @param {String} mask - * @param {Function} fn - * @api public - */ - -Command.prototype.password = function(str, mask, fn){ - var self = this - , buf = ''; - - // default mask - if ('function' == typeof mask) { - fn = mask; - mask = ''; - } - - process.stdin.resume(); - tty.setRawMode(true); - process.stdout.write(str); - - // keypress - process.stdin.on('keypress', function(c, key){ - if (key && 'enter' == key.name) { - console.log(); - process.stdin.removeAllListeners('keypress'); - tty.setRawMode(false); - if (!buf.trim().length) return self.password(str, mask, fn); - fn(buf); - return; - } - - if (key && key.ctrl && 'c' == key.name) { - console.log('%s', buf); - process.exit(); - } - - process.stdout.write(mask); - buf += c; - }).resume(); -}; - -/** - * Confirmation prompt with `str` and callback `fn(bool)` - * - * Examples: - * - * program.confirm('continue? ', function(ok){ - * console.log(' got %j', ok); - * process.stdin.destroy(); - * }); - * - * @param {String} str - * @param {Function} fn - * @api public - */ - - -Command.prototype.confirm = function(str, fn, verbose){ - var self = this; - this.prompt(str, function(ok){ - if (!ok.trim()) { - if (!verbose) str += '(yes or no) '; - return self.confirm(str, fn, true); - } - fn(parseBool(ok)); - }); -}; - -/** - * Choice prompt with `list` of items and callback `fn(index, item)` - * - * Examples: - * - * var list = ['tobi', 'loki', 'jane', 'manny', 'luna']; - * - * console.log('Choose the coolest pet:'); - * program.choose(list, function(i){ - * console.log('you chose %d "%s"', i, list[i]); - * process.stdin.destroy(); - * }); - * - * @param {Array} list - * @param {Number|Function} index or fn - * @param {Function} fn - * @api public - */ - -Command.prototype.choose = function(list, index, fn){ - var self = this - , hasDefault = 'number' == typeof index; - - if (!hasDefault) { - fn = index; - index = null; - } - - list.forEach(function(item, i){ - if (hasDefault && i == index) { - console.log('* %d) %s', i + 1, item); - } else { - console.log(' %d) %s', i + 1, item); - } - }); - - function again() { - self.prompt(' : ', function(val){ - val = parseInt(val, 10) - 1; - if (hasDefault && isNaN(val)) val = index; - - if (null == list[val]) { - again(); - } else { - fn(val, list[val]); - } - }); - } - - again(); -}; - -/** - * Camel-case the given `flag` - * - * @param {String} flag - * @return {String} - * @api private - */ - -function camelcase(flag) { - return flag.split('-').reduce(function(str, word){ - return str + word[0].toUpperCase() + word.slice(1); - }); -} - -/** - * Parse a boolean `str`. - * - * @param {String} str - * @return {Boolean} - * @api private - */ - -function parseBool(str) { - return /^y|yes|ok|true$/i.test(str); -} - -/** - * Pad `str` to `width`. - * - * @param {String} str - * @param {Number} width - * @return {String} - * @api private - */ - -function pad(str, width) { - var len = Math.max(0, width - str.length); - return str + Array(len + 1).join(' '); -} - -/** - * Output help information if necessary - * - * @param {Command} command to output help for - * @param {Array} array of options to search for -h or --help - * @api private - */ - -function outputHelpIfNecessary(cmd, options) { - options = options || []; - for (var i = 0; i < options.length; i++) { - if (options[i] == '--help' || options[i] == '-h') { - process.stdout.write(cmd.helpInformation()); - cmd.emit('--help'); - process.exit(0); - } - } -} diff --git a/node_modules/mocha/node_modules/jade/node_modules/commander/package.json b/node_modules/mocha/node_modules/jade/node_modules/commander/package.json deleted file mode 100644 index 92f2ed79..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/commander/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "commander", - "version": "0.6.1", - "description": "the complete solution for node.js command-line programs", - "keywords": [ - "command", - "option", - "parser", - "prompt", - "stdin" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "repository": { - "type": "git", - "url": "https://github.com/visionmedia/commander.js.git" - }, - "dependencies": {}, - "devDependencies": { - "should": ">= 0.0.1" - }, - "scripts": { - "test": "make test" - }, - "main": "index", - "engines": { - "node": ">= 0.4.x" - }, - "readme": "# Commander.js\n\n The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander).\n\n [![Build Status](https://secure.travis-ci.org/visionmedia/commander.js.png)](http://travis-ci.org/visionmedia/commander.js)\n\n## Installation\n\n $ npm install commander\n\n## Option parsing\n\n Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('commander');\n\nprogram\n .version('0.0.1')\n .option('-p, --peppers', 'Add peppers')\n .option('-P, --pineapple', 'Add pineapple')\n .option('-b, --bbq', 'Add bbq sauce')\n .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble')\n .parse(process.argv);\n\nconsole.log('you ordered a pizza with:');\nif (program.peppers) console.log(' - peppers');\nif (program.pineapple) console.log(' - pineappe');\nif (program.bbq) console.log(' - bbq');\nconsole.log(' - %s cheese', program.cheese);\n```\n\n Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as \"--template-engine\" are camel-cased, becoming `program.templateEngine` etc.\n\n## Automated --help\n\n The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free:\n\n``` \n $ ./examples/pizza --help\n\n Usage: pizza [options]\n\n Options:\n\n -V, --version output the version number\n -p, --peppers Add peppers\n -P, --pineapple Add pineappe\n -b, --bbq Add bbq sauce\n -c, --cheese Add the specified type of cheese [marble]\n -h, --help output usage information\n\n```\n\n## Coercion\n\n```js\nfunction range(val) {\n return val.split('..').map(Number);\n}\n\nfunction list(val) {\n return val.split(',');\n}\n\nprogram\n .version('0.0.1')\n .usage('[options] ')\n .option('-i, --integer ', 'An integer argument', parseInt)\n .option('-f, --float ', 'A float argument', parseFloat)\n .option('-r, --range ..', 'A range', range)\n .option('-l, --list ', 'A list', list)\n .option('-o, --optional [value]', 'An optional value')\n .parse(process.argv);\n\nconsole.log(' int: %j', program.integer);\nconsole.log(' float: %j', program.float);\nconsole.log(' optional: %j', program.optional);\nprogram.range = program.range || [];\nconsole.log(' range: %j..%j', program.range[0], program.range[1]);\nconsole.log(' list: %j', program.list);\nconsole.log(' args: %j', program.args);\n```\n\n## Custom help\n\n You can display arbitrary `-h, --help` information\n by listening for \"--help\". Commander will automatically\n exit once you are done so that the remainder of your program\n does not execute causing undesired behaviours, for example\n in the following executable \"stuff\" will not output when\n `--help` is used.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('../');\n\nfunction list(val) {\n return val.split(',').map(Number);\n}\n\nprogram\n .version('0.0.1')\n .option('-f, --foo', 'enable some foo')\n .option('-b, --bar', 'enable some bar')\n .option('-B, --baz', 'enable some baz');\n\n// must be before .parse() since\n// node's emit() is immediate\n\nprogram.on('--help', function(){\n console.log(' Examples:');\n console.log('');\n console.log(' $ custom-help --help');\n console.log(' $ custom-help -h');\n console.log('');\n});\n\nprogram.parse(process.argv);\n\nconsole.log('stuff');\n```\n\nyielding the following help output:\n\n```\n\nUsage: custom-help [options]\n\nOptions:\n\n -h, --help output usage information\n -V, --version output the version number\n -f, --foo enable some foo\n -b, --bar enable some bar\n -B, --baz enable some baz\n\nExamples:\n\n $ custom-help --help\n $ custom-help -h\n\n```\n\n## .prompt(msg, fn)\n\n Single-line prompt:\n\n```js\nprogram.prompt('name: ', function(name){\n console.log('hi %s', name);\n});\n```\n\n Multi-line prompt:\n\n```js\nprogram.prompt('description:', function(name){\n console.log('hi %s', name);\n});\n```\n\n Coercion:\n\n```js\nprogram.prompt('Age: ', Number, function(age){\n console.log('age: %j', age);\n});\n```\n\n```js\nprogram.prompt('Birthdate: ', Date, function(date){\n console.log('date: %s', date);\n});\n```\n\n## .password(msg[, mask], fn)\n\nPrompt for password without echoing:\n\n```js\nprogram.password('Password: ', function(pass){\n console.log('got \"%s\"', pass);\n process.stdin.destroy();\n});\n```\n\nPrompt for password with mask char \"*\":\n\n```js\nprogram.password('Password: ', '*', function(pass){\n console.log('got \"%s\"', pass);\n process.stdin.destroy();\n});\n```\n\n## .confirm(msg, fn)\n\n Confirm with the given `msg`:\n\n```js\nprogram.confirm('continue? ', function(ok){\n console.log(' got %j', ok);\n});\n```\n\n## .choose(list, fn)\n\n Let the user choose from a `list`:\n\n```js\nvar list = ['tobi', 'loki', 'jane', 'manny', 'luna'];\n\nconsole.log('Choose the coolest pet:');\nprogram.choose(list, function(i){\n console.log('you chose %d \"%s\"', i, list[i]);\n});\n```\n\n## Links\n\n - [API documentation](http://visionmedia.github.com/commander.js/)\n - [ascii tables](https://github.com/LearnBoost/cli-table)\n - [progress bars](https://github.com/visionmedia/node-progress)\n - [more progress bars](https://github.com/substack/node-multimeter)\n - [examples](https://github.com/visionmedia/commander.js/tree/master/examples)\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/commander.js/issues" - }, - "homepage": "https://github.com/visionmedia/commander.js", - "_id": "commander@0.6.1", - "_from": "commander@0.6.1" -} diff --git a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.orig b/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.orig deleted file mode 100644 index 9303c347..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.orig +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.rej b/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.rej deleted file mode 100644 index 69244ff8..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.gitignore.rej +++ /dev/null @@ -1,5 +0,0 @@ ---- /dev/null -+++ .gitignore -@@ -0,0 +1,2 @@ -+node_modules/ -+npm-debug.log \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.npmignore b/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.npmignore deleted file mode 100644 index 9303c347..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/LICENSE b/node_modules/mocha/node_modules/jade/node_modules/mkdirp/LICENSE deleted file mode 100644 index 432d1aeb..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 2010 James Halliday (mail@substack.net) - -This project is free software released under the MIT/X11 license: - -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/node_modules/mocha/node_modules/jade/node_modules/mkdirp/README.markdown b/node_modules/mocha/node_modules/jade/node_modules/mkdirp/README.markdown deleted file mode 100644 index b4dd75fd..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/README.markdown +++ /dev/null @@ -1,54 +0,0 @@ -mkdirp -====== - -Like `mkdir -p`, but in node.js! - -example -======= - -pow.js ------- - var mkdirp = require('mkdirp'); - - mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') - }); - -Output - pow! - -And now /tmp/foo/bar/baz exists, huzzah! - -methods -======= - -var mkdirp = require('mkdirp'); - -mkdirp(dir, mode, cb) ---------------------- - -Create a new directory and any necessary subdirectories at `dir` with octal -permission string `mode`. - -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -mkdirp.sync(dir, mode) ----------------------- - -Synchronously create a new directory and any necessary subdirectories at `dir` -with octal permission string `mode`. - -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -install -======= - -With [npm](http://npmjs.org) do: - - npm install mkdirp - -license -======= - -MIT/X11 diff --git a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js b/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js deleted file mode 100644 index e6924212..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js +++ /dev/null @@ -1,6 +0,0 @@ -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); diff --git a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.orig b/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.orig deleted file mode 100644 index 77414622..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.orig +++ /dev/null @@ -1,6 +0,0 @@ -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', 0755, function (err) { - if (err) console.error(err) - else console.log('pow!') -}); diff --git a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.rej b/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.rej deleted file mode 100644 index 81e7f431..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/examples/pow.js.rej +++ /dev/null @@ -1,19 +0,0 @@ ---- examples/pow.js -+++ examples/pow.js -@@ -1,6 +1,15 @@ --var mkdirp = require('mkdirp').mkdirp; -+var mkdirp = require('../').mkdirp, -+ mkdirpSync = require('../').mkdirpSync; - - mkdirp('/tmp/foo/bar/baz', 0755, function (err) { - if (err) console.error(err) - else console.log('pow!') - }); -+ -+try { -+ mkdirpSync('/tmp/bar/foo/baz', 0755); -+ console.log('double pow!'); -+} -+catch (ex) { -+ console.log(ex); -+} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/index.js b/node_modules/mocha/node_modules/jade/node_modules/mkdirp/index.js deleted file mode 100644 index 25f43adf..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/index.js +++ /dev/null @@ -1,79 +0,0 @@ -var path = require('path'); -var fs = require('fs'); - -module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; - -function mkdirP (p, mode, f) { - if (typeof mode === 'function' || mode === undefined) { - f = mode; - mode = 0777 & (~process.umask()); - } - - var cb = f || function () {}; - if (typeof mode === 'string') mode = parseInt(mode, 8); - p = path.resolve(p); - - fs.mkdir(p, mode, function (er) { - if (!er) return cb(); - switch (er.code) { - case 'ENOENT': - mkdirP(path.dirname(p), mode, function (er) { - if (er) cb(er); - else mkdirP(p, mode, cb); - }); - break; - - case 'EEXIST': - fs.stat(p, function (er2, stat) { - // if the stat fails, then that's super weird. - // let the original EEXIST be the failure reason. - if (er2 || !stat.isDirectory()) cb(er) - else cb(); - }); - break; - - default: - cb(er); - break; - } - }); -} - -mkdirP.sync = function sync (p, mode) { - if (mode === undefined) { - mode = 0777 & (~process.umask()); - } - - if (typeof mode === 'string') mode = parseInt(mode, 8); - p = path.resolve(p); - - try { - fs.mkdirSync(p, mode) - } - catch (err0) { - switch (err0.code) { - case 'ENOENT' : - var err1 = sync(path.dirname(p), mode) - if (err1) throw err1; - else return sync(p, mode); - break; - - case 'EEXIST' : - var stat; - try { - stat = fs.statSync(p); - } - catch (err1) { - throw err0 - } - if (!stat.isDirectory()) throw err0; - else return null; - break; - default : - throw err0 - break; - } - } - - return null; -}; diff --git a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/package.json b/node_modules/mocha/node_modules/jade/node_modules/mkdirp/package.json deleted file mode 100644 index 78638866..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "mkdirp", - "description": "Recursively mkdir, like `mkdir -p`", - "version": "0.3.0", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "main": "./index", - "keywords": [ - "mkdir", - "directory" - ], - "repository": { - "type": "git", - "url": "http://github.com/substack/node-mkdirp.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "devDependencies": { - "tap": "0.0.x" - }, - "license": "MIT/X11", - "engines": { - "node": "*" - }, - "readme": "mkdirp\n======\n\nLike `mkdir -p`, but in node.js!\n\nexample\n=======\n\npow.js\n------\n var mkdirp = require('mkdirp');\n \n mkdirp('/tmp/foo/bar/baz', function (err) {\n if (err) console.error(err)\n else console.log('pow!')\n });\n\nOutput\n pow!\n\nAnd now /tmp/foo/bar/baz exists, huzzah!\n\nmethods\n=======\n\nvar mkdirp = require('mkdirp');\n\nmkdirp(dir, mode, cb)\n---------------------\n\nCreate a new directory and any necessary subdirectories at `dir` with octal\npermission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\nmkdirp.sync(dir, mode)\n----------------------\n\nSynchronously create a new directory and any necessary subdirectories at `dir`\nwith octal permission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n npm install mkdirp\n\nlicense\n=======\n\nMIT/X11\n", - "readmeFilename": "README.markdown", - "bugs": { - "url": "https://github.com/substack/node-mkdirp/issues" - }, - "homepage": "https://github.com/substack/node-mkdirp", - "_id": "mkdirp@0.3.0", - "_from": "mkdirp@0.3.0" -} diff --git a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/chmod.js b/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/chmod.js deleted file mode 100644 index 520dcb8e..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/chmod.js +++ /dev/null @@ -1,38 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -test('chmod-pre', function (t) { - var mode = 0744 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.equal(stat && stat.mode & 0777, mode, 'should be 0744'); - t.end(); - }); - }); -}); - -test('chmod', function (t) { - var mode = 0755 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.end(); - }); - }); -}); diff --git a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/clobber.js b/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/clobber.js deleted file mode 100644 index 0eb70998..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/clobber.js +++ /dev/null @@ -1,37 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -// a file in the way -var itw = ps.slice(0, 3).join('/'); - - -test('clobber-pre', function (t) { - console.error("about to write to "+itw) - fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); - - fs.stat(itw, function (er, stat) { - t.ifError(er) - t.ok(stat && stat.isFile(), 'should be file') - t.end() - }) -}) - -test('clobber', function (t) { - t.plan(2); - mkdirp(file, 0755, function (err) { - t.ok(err); - t.equal(err.code, 'ENOTDIR'); - t.end(); - }); -}); diff --git a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/mkdirp.js b/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/mkdirp.js deleted file mode 100644 index b07cd70c..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/mkdirp.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('woo', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/perm.js b/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/perm.js deleted file mode 100644 index 23a7abbd..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/perm.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('async perm', function (t) { - t.plan(2); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); - -test('async root perm', function (t) { - mkdirp('/tmp', 0755, function (err) { - if (err) t.fail(err); - t.end(); - }); - t.end(); -}); diff --git a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/perm_sync.js b/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/perm_sync.js deleted file mode 100644 index f685f609..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/perm_sync.js +++ /dev/null @@ -1,39 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('sync perm', function (t) { - t.plan(2); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json'; - - mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }); -}); - -test('sync root perm', function (t) { - t.plan(1); - - var file = '/tmp'; - mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }); -}); diff --git a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/race.js b/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/race.js deleted file mode 100644 index 96a04476..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/race.js +++ /dev/null @@ -1,41 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('race', function (t) { - t.plan(4); - var ps = [ '', 'tmp' ]; - - for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); - } - var file = ps.join('/'); - - var res = 2; - mk(file, function () { - if (--res === 0) t.end(); - }); - - mk(file, function () { - if (--res === 0) t.end(); - }); - - function mk (file, cb) { - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - if (cb) cb(); - } - }) - }) - }); - } -}); diff --git a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/rel.js b/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/rel.js deleted file mode 100644 index 79858243..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/rel.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('rel', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var cwd = process.cwd(); - process.chdir('/tmp'); - - var file = [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - process.chdir(cwd); - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/sync.js b/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/sync.js deleted file mode 100644 index e0e389de..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/sync.js +++ /dev/null @@ -1,27 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('sync', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - var err = mkdirp.sync(file, 0755); - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) -}); diff --git a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/umask.js b/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/umask.js deleted file mode 100644 index 64ccafe2..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/umask.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('implicit mode from umask', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0777 & (~process.umask())); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/umask_sync.js b/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/umask_sync.js deleted file mode 100644 index 83cba560..00000000 --- a/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/umask_sync.js +++ /dev/null @@ -1,27 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('umask sync modes', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - var err = mkdirp.sync(file); - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, (0777 & (~process.umask()))); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) -}); diff --git a/node_modules/mocha/node_modules/jade/package.json b/node_modules/mocha/node_modules/jade/package.json deleted file mode 100644 index 689d82d7..00000000 --- a/node_modules/mocha/node_modules/jade/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "jade", - "description": "Jade template engine", - "version": "0.26.3", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/jade" - }, - "main": "./index.js", - "bin": { - "jade": "./bin/jade" - }, - "man": [ - "./jade.1" - ], - "dependencies": { - "commander": "0.6.1", - "mkdirp": "0.3.0" - }, - "devDependencies": { - "mocha": "*", - "markdown": "*", - "stylus": "*", - "uubench": "*", - "should": "*", - "less": "*", - "uglify-js": "*" - }, - "component": { - "scripts": { - "jade": "runtime.js" - } - }, - "scripts": { - "prepublish": "npm prune" - }, - "bugs": { - "url": "https://github.com/visionmedia/jade/issues" - }, - "readme": "ERROR: No README data found!", - "homepage": "https://github.com/visionmedia/jade", - "_id": "jade@0.26.3", - "_from": "jade@0.26.3" -} diff --git a/node_modules/mocha/node_modules/jade/runtime.js b/node_modules/mocha/node_modules/jade/runtime.js deleted file mode 100644 index 0f549077..00000000 --- a/node_modules/mocha/node_modules/jade/runtime.js +++ /dev/null @@ -1,179 +0,0 @@ - -jade = (function(exports){ -/*! - * Jade - runtime - * Copyright(c) 2010 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Lame Array.isArray() polyfill for now. - */ - -if (!Array.isArray) { - Array.isArray = function(arr){ - return '[object Array]' == Object.prototype.toString.call(arr); - }; -} - -/** - * Lame Object.keys() polyfill for now. - */ - -if (!Object.keys) { - Object.keys = function(obj){ - var arr = []; - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - arr.push(key); - } - } - return arr; - } -} - -/** - * Merge two attribute objects giving precedence - * to values in object `b`. Classes are special-cased - * allowing for arrays and merging/joining appropriately - * resulting in a string. - * - * @param {Object} a - * @param {Object} b - * @return {Object} a - * @api private - */ - -exports.merge = function merge(a, b) { - var ac = a['class']; - var bc = b['class']; - - if (ac || bc) { - ac = ac || []; - bc = bc || []; - if (!Array.isArray(ac)) ac = [ac]; - if (!Array.isArray(bc)) bc = [bc]; - ac = ac.filter(nulls); - bc = bc.filter(nulls); - a['class'] = ac.concat(bc).join(' '); - } - - for (var key in b) { - if (key != 'class') { - a[key] = b[key]; - } - } - - return a; -}; - -/** - * Filter null `val`s. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - -function nulls(val) { - return val != null; -} - -/** - * Render the given attributes object. - * - * @param {Object} obj - * @param {Object} escaped - * @return {String} - * @api private - */ - -exports.attrs = function attrs(obj, escaped){ - var buf = [] - , terse = obj.terse; - - delete obj.terse; - var keys = Object.keys(obj) - , len = keys.length; - - if (len) { - buf.push(''); - for (var i = 0; i < len; ++i) { - var key = keys[i] - , val = obj[key]; - - if ('boolean' == typeof val || null == val) { - if (val) { - terse - ? buf.push(key) - : buf.push(key + '="' + key + '"'); - } - } else if (0 == key.indexOf('data') && 'string' != typeof val) { - buf.push(key + "='" + JSON.stringify(val) + "'"); - } else if ('class' == key && Array.isArray(val)) { - buf.push(key + '="' + exports.escape(val.join(' ')) + '"'); - } else if (escaped && escaped[key]) { - buf.push(key + '="' + exports.escape(val) + '"'); - } else { - buf.push(key + '="' + val + '"'); - } - } - } - - return buf.join(' '); -}; - -/** - * Escape the given string of `html`. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function escape(html){ - return String(html) - .replace(/&(?!(\w+|\#\d+);)/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); -}; - -/** - * Re-throw the given `err` in context to the - * the jade in `filename` at the given `lineno`. - * - * @param {Error} err - * @param {String} filename - * @param {String} lineno - * @api private - */ - -exports.rethrow = function rethrow(err, filename, lineno){ - if (!filename) throw err; - - var context = 3 - , str = require('fs').readFileSync(filename, 'utf8') - , lines = str.split('\n') - , start = Math.max(lineno - context, 0) - , end = Math.min(lines.length, lineno + context); - - // Error context - var context = lines.slice(start, end).map(function(line, i){ - var curr = i + start + 1; - return (curr == lineno ? ' > ' : ' ') - + curr - + '| ' - + line; - }).join('\n'); - - // Alter exception message - err.path = filename; - err.message = (filename || 'Jade') + ':' + lineno - + '\n' + context + '\n\n' + err.message; - throw err; -}; - - return exports; - -})({}); diff --git a/node_modules/mocha/node_modules/jade/runtime.min.js b/node_modules/mocha/node_modules/jade/runtime.min.js deleted file mode 100644 index 1714efb0..00000000 --- a/node_modules/mocha/node_modules/jade/runtime.min.js +++ /dev/null @@ -1 +0,0 @@ -jade=function(exports){Array.isArray||(Array.isArray=function(arr){return"[object Array]"==Object.prototype.toString.call(arr)}),Object.keys||(Object.keys=function(obj){var arr=[];for(var key in obj)obj.hasOwnProperty(key)&&arr.push(key);return arr}),exports.merge=function merge(a,b){var ac=a["class"],bc=b["class"];if(ac||bc)ac=ac||[],bc=bc||[],Array.isArray(ac)||(ac=[ac]),Array.isArray(bc)||(bc=[bc]),ac=ac.filter(nulls),bc=bc.filter(nulls),a["class"]=ac.concat(bc).join(" ");for(var key in b)key!="class"&&(a[key]=b[key]);return a};function nulls(val){return val!=null}return exports.attrs=function attrs(obj,escaped){var buf=[],terse=obj.terse;delete obj.terse;var keys=Object.keys(obj),len=keys.length;if(len){buf.push("");for(var i=0;i/g,">").replace(/"/g,""")},exports.rethrow=function rethrow(err,filename,lineno){if(!filename)throw err;var context=3,str=require("fs").readFileSync(filename,"utf8"),lines=str.split("\n"),start=Math.max(lineno-context,0),end=Math.min(lines.length,lineno+context),context=lines.slice(start,end).map(function(line,i){var curr=i+start+1;return(curr==lineno?" > ":" ")+curr+"| "+line}).join("\n");throw err.path=filename,err.message=(filename||"Jade")+":"+lineno+"\n"+context+"\n\n"+err.message,err},exports}({}); \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/test.jade b/node_modules/mocha/node_modules/jade/test.jade deleted file mode 100644 index b3a89889..00000000 --- a/node_modules/mocha/node_modules/jade/test.jade +++ /dev/null @@ -1,7 +0,0 @@ -p. - This is a large - body of text for - this tag. - - Nothing too - exciting. \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/testing/head.jade b/node_modules/mocha/node_modules/jade/testing/head.jade deleted file mode 100644 index 85154062..00000000 --- a/node_modules/mocha/node_modules/jade/testing/head.jade +++ /dev/null @@ -1,5 +0,0 @@ -head - script(src='/jquery.js') - yield - if false - script(src='/jquery.ui.js') diff --git a/node_modules/mocha/node_modules/jade/testing/index.jade b/node_modules/mocha/node_modules/jade/testing/index.jade deleted file mode 100644 index 1032c5fa..00000000 --- a/node_modules/mocha/node_modules/jade/testing/index.jade +++ /dev/null @@ -1,22 +0,0 @@ - -tag = 'p' -foo = 'bar' - -#{tag} value -#{tag}(foo='bar') value -#{foo ? 'a' : 'li'}(something) here - -mixin item(icon) - li - if attributes.href - a(attributes) - img.icon(src=icon) - block - else - span(attributes) - img.icon(src=icon) - block - -ul - +item('contact') Contact - +item(href='/contact') Contact diff --git a/node_modules/mocha/node_modules/jade/testing/index.js b/node_modules/mocha/node_modules/jade/testing/index.js deleted file mode 100644 index 226e8c01..00000000 --- a/node_modules/mocha/node_modules/jade/testing/index.js +++ /dev/null @@ -1,11 +0,0 @@ - -/** - * Module dependencies. - */ - -var jade = require('../'); - -jade.renderFile('testing/index.jade', { pretty: true, debug: true, compileDebug: false }, function(err, str){ - if (err) throw err; - console.log(str); -}); \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/testing/layout.jade b/node_modules/mocha/node_modules/jade/testing/layout.jade deleted file mode 100644 index 6923cf15..00000000 --- a/node_modules/mocha/node_modules/jade/testing/layout.jade +++ /dev/null @@ -1,6 +0,0 @@ -html - include head - script(src='/caustic.js') - script(src='/app.js') - body - block content \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/testing/user.jade b/node_modules/mocha/node_modules/jade/testing/user.jade deleted file mode 100644 index 3c636b7c..00000000 --- a/node_modules/mocha/node_modules/jade/testing/user.jade +++ /dev/null @@ -1,7 +0,0 @@ -h1 Tobi -p Is a ferret - -ul - li: a foo - li: a bar - li: a baz \ No newline at end of file diff --git a/node_modules/mocha/node_modules/jade/testing/user.js b/node_modules/mocha/node_modules/jade/testing/user.js deleted file mode 100644 index 2ecc45ed..00000000 --- a/node_modules/mocha/node_modules/jade/testing/user.js +++ /dev/null @@ -1,27 +0,0 @@ -function anonymous(locals, attrs, escape, rethrow) { -var attrs = jade.attrs, escape = jade.escape, rethrow = jade.rethrow; -var __jade = [{ lineno: 1, filename: "testing/user.jade" }]; -try { -var buf = []; -with (locals || {}) { -var interp; -__jade.unshift({ lineno: 1, filename: __jade[0].filename }); -__jade.unshift({ lineno: 1, filename: __jade[0].filename }); -buf.push('

        Tobi'); -__jade.unshift({ lineno: undefined, filename: __jade[0].filename }); -__jade.shift(); -buf.push('

        '); -__jade.shift(); -__jade.unshift({ lineno: 2, filename: __jade[0].filename }); -buf.push('

        Is a ferret'); -__jade.unshift({ lineno: undefined, filename: __jade[0].filename }); -__jade.shift(); -buf.push('

        '); -__jade.shift(); -__jade.shift(); -} -return buf.join(""); -} catch (err) { - rethrow(err, __jade[0].filename, __jade[0].lineno); -} -} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/mkdirp/.npmignore b/node_modules/mocha/node_modules/mkdirp/.npmignore deleted file mode 100644 index 9303c347..00000000 --- a/node_modules/mocha/node_modules/mkdirp/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log \ No newline at end of file diff --git a/node_modules/mocha/node_modules/mkdirp/.travis.yml b/node_modules/mocha/node_modules/mkdirp/.travis.yml deleted file mode 100644 index 84fd7ca2..00000000 --- a/node_modules/mocha/node_modules/mkdirp/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - 0.9 diff --git a/node_modules/mocha/node_modules/mkdirp/LICENSE b/node_modules/mocha/node_modules/mkdirp/LICENSE deleted file mode 100644 index 432d1aeb..00000000 --- a/node_modules/mocha/node_modules/mkdirp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 2010 James Halliday (mail@substack.net) - -This project is free software released under the MIT/X11 license: - -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/node_modules/mocha/node_modules/mkdirp/examples/pow.js b/node_modules/mocha/node_modules/mkdirp/examples/pow.js deleted file mode 100644 index e6924212..00000000 --- a/node_modules/mocha/node_modules/mkdirp/examples/pow.js +++ /dev/null @@ -1,6 +0,0 @@ -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); diff --git a/node_modules/mocha/node_modules/mkdirp/index.js b/node_modules/mocha/node_modules/mkdirp/index.js deleted file mode 100644 index fda6de8a..00000000 --- a/node_modules/mocha/node_modules/mkdirp/index.js +++ /dev/null @@ -1,82 +0,0 @@ -var path = require('path'); -var fs = require('fs'); - -module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; - -function mkdirP (p, mode, f, made) { - if (typeof mode === 'function' || mode === undefined) { - f = mode; - mode = 0777 & (~process.umask()); - } - if (!made) made = null; - - var cb = f || function () {}; - if (typeof mode === 'string') mode = parseInt(mode, 8); - p = path.resolve(p); - - fs.mkdir(p, mode, function (er) { - if (!er) { - made = made || p; - return cb(null, made); - } - switch (er.code) { - case 'ENOENT': - mkdirP(path.dirname(p), mode, function (er, made) { - if (er) cb(er, made); - else mkdirP(p, mode, cb, made); - }); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - fs.stat(p, function (er2, stat) { - // if the stat fails, then that's super weird. - // let the original error be the failure reason. - if (er2 || !stat.isDirectory()) cb(er, made) - else cb(null, made); - }); - break; - } - }); -} - -mkdirP.sync = function sync (p, mode, made) { - if (mode === undefined) { - mode = 0777 & (~process.umask()); - } - if (!made) made = null; - - if (typeof mode === 'string') mode = parseInt(mode, 8); - p = path.resolve(p); - - try { - fs.mkdirSync(p, mode); - made = made || p; - } - catch (err0) { - switch (err0.code) { - case 'ENOENT' : - made = sync(path.dirname(p), mode, made); - sync(p, mode, made); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - var stat; - try { - stat = fs.statSync(p); - } - catch (err1) { - throw err0; - } - if (!stat.isDirectory()) throw err0; - break; - } - } - - return made; -}; diff --git a/node_modules/mocha/node_modules/mkdirp/package.json b/node_modules/mocha/node_modules/mkdirp/package.json deleted file mode 100644 index a71d8b77..00000000 --- a/node_modules/mocha/node_modules/mkdirp/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "mkdirp", - "description": "Recursively mkdir, like `mkdir -p`", - "version": "0.3.5", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "main": "./index", - "keywords": [ - "mkdir", - "directory" - ], - "repository": { - "type": "git", - "url": "http://github.com/substack/node-mkdirp.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "devDependencies": { - "tap": "~0.4.0" - }, - "license": "MIT", - "readme": "# mkdirp\n\nLike `mkdir -p`, but in node.js!\n\n[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)\n\n# example\n\n## pow.js\n\n```js\nvar mkdirp = require('mkdirp');\n \nmkdirp('/tmp/foo/bar/baz', function (err) {\n if (err) console.error(err)\n else console.log('pow!')\n});\n```\n\nOutput\n\n```\npow!\n```\n\nAnd now /tmp/foo/bar/baz exists, huzzah!\n\n# methods\n\n```js\nvar mkdirp = require('mkdirp');\n```\n\n## mkdirp(dir, mode, cb)\n\nCreate a new directory and any necessary subdirectories at `dir` with octal\npermission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\n`cb(err, made)` fires with the error or the first directory `made`\nthat had to be created, if any.\n\n## mkdirp.sync(dir, mode)\n\nSynchronously create a new directory and any necessary subdirectories at `dir`\nwith octal permission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\nReturns the first directory that had to be created, if any.\n\n# install\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install mkdirp\n```\n\n# license\n\nMIT\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/substack/node-mkdirp/issues" - }, - "homepage": "https://github.com/substack/node-mkdirp", - "_id": "mkdirp@0.3.5", - "_from": "mkdirp@0.3.5" -} diff --git a/node_modules/mocha/node_modules/mkdirp/readme.markdown b/node_modules/mocha/node_modules/mkdirp/readme.markdown deleted file mode 100644 index 83b0216a..00000000 --- a/node_modules/mocha/node_modules/mkdirp/readme.markdown +++ /dev/null @@ -1,63 +0,0 @@ -# mkdirp - -Like `mkdir -p`, but in node.js! - -[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp) - -# example - -## pow.js - -```js -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); -``` - -Output - -``` -pow! -``` - -And now /tmp/foo/bar/baz exists, huzzah! - -# methods - -```js -var mkdirp = require('mkdirp'); -``` - -## mkdirp(dir, mode, cb) - -Create a new directory and any necessary subdirectories at `dir` with octal -permission string `mode`. - -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -`cb(err, made)` fires with the error or the first directory `made` -that had to be created, if any. - -## mkdirp.sync(dir, mode) - -Synchronously create a new directory and any necessary subdirectories at `dir` -with octal permission string `mode`. - -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -Returns the first directory that had to be created, if any. - -# install - -With [npm](http://npmjs.org) do: - -``` -npm install mkdirp -``` - -# license - -MIT diff --git a/node_modules/mocha/node_modules/mkdirp/test/chmod.js b/node_modules/mocha/node_modules/mkdirp/test/chmod.js deleted file mode 100644 index 520dcb8e..00000000 --- a/node_modules/mocha/node_modules/mkdirp/test/chmod.js +++ /dev/null @@ -1,38 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -test('chmod-pre', function (t) { - var mode = 0744 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.equal(stat && stat.mode & 0777, mode, 'should be 0744'); - t.end(); - }); - }); -}); - -test('chmod', function (t) { - var mode = 0755 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.end(); - }); - }); -}); diff --git a/node_modules/mocha/node_modules/mkdirp/test/clobber.js b/node_modules/mocha/node_modules/mkdirp/test/clobber.js deleted file mode 100644 index 0eb70998..00000000 --- a/node_modules/mocha/node_modules/mkdirp/test/clobber.js +++ /dev/null @@ -1,37 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -// a file in the way -var itw = ps.slice(0, 3).join('/'); - - -test('clobber-pre', function (t) { - console.error("about to write to "+itw) - fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); - - fs.stat(itw, function (er, stat) { - t.ifError(er) - t.ok(stat && stat.isFile(), 'should be file') - t.end() - }) -}) - -test('clobber', function (t) { - t.plan(2); - mkdirp(file, 0755, function (err) { - t.ok(err); - t.equal(err.code, 'ENOTDIR'); - t.end(); - }); -}); diff --git a/node_modules/mocha/node_modules/mkdirp/test/mkdirp.js b/node_modules/mocha/node_modules/mkdirp/test/mkdirp.js deleted file mode 100644 index b07cd70c..00000000 --- a/node_modules/mocha/node_modules/mkdirp/test/mkdirp.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('woo', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/mocha/node_modules/mkdirp/test/perm.js b/node_modules/mocha/node_modules/mkdirp/test/perm.js deleted file mode 100644 index 23a7abbd..00000000 --- a/node_modules/mocha/node_modules/mkdirp/test/perm.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('async perm', function (t) { - t.plan(2); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); - -test('async root perm', function (t) { - mkdirp('/tmp', 0755, function (err) { - if (err) t.fail(err); - t.end(); - }); - t.end(); -}); diff --git a/node_modules/mocha/node_modules/mkdirp/test/perm_sync.js b/node_modules/mocha/node_modules/mkdirp/test/perm_sync.js deleted file mode 100644 index f685f609..00000000 --- a/node_modules/mocha/node_modules/mkdirp/test/perm_sync.js +++ /dev/null @@ -1,39 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('sync perm', function (t) { - t.plan(2); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json'; - - mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }); -}); - -test('sync root perm', function (t) { - t.plan(1); - - var file = '/tmp'; - mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }); -}); diff --git a/node_modules/mocha/node_modules/mkdirp/test/race.js b/node_modules/mocha/node_modules/mkdirp/test/race.js deleted file mode 100644 index 96a04476..00000000 --- a/node_modules/mocha/node_modules/mkdirp/test/race.js +++ /dev/null @@ -1,41 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('race', function (t) { - t.plan(4); - var ps = [ '', 'tmp' ]; - - for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); - } - var file = ps.join('/'); - - var res = 2; - mk(file, function () { - if (--res === 0) t.end(); - }); - - mk(file, function () { - if (--res === 0) t.end(); - }); - - function mk (file, cb) { - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - if (cb) cb(); - } - }) - }) - }); - } -}); diff --git a/node_modules/mocha/node_modules/mkdirp/test/rel.js b/node_modules/mocha/node_modules/mkdirp/test/rel.js deleted file mode 100644 index 79858243..00000000 --- a/node_modules/mocha/node_modules/mkdirp/test/rel.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('rel', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var cwd = process.cwd(); - process.chdir('/tmp'); - - var file = [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - process.chdir(cwd); - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/mocha/node_modules/mkdirp/test/return.js b/node_modules/mocha/node_modules/mkdirp/test/return.js deleted file mode 100644 index bce68e56..00000000 --- a/node_modules/mocha/node_modules/mkdirp/test/return.js +++ /dev/null @@ -1,25 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('return value', function (t) { - t.plan(4); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - // should return the first dir created. - // By this point, it would be profoundly surprising if /tmp didn't - // already exist, since every other test makes things in there. - mkdirp(file, function (err, made) { - t.ifError(err); - t.equal(made, '/tmp/' + x); - mkdirp(file, function (err, made) { - t.ifError(err); - t.equal(made, null); - }); - }); -}); diff --git a/node_modules/mocha/node_modules/mkdirp/test/return_sync.js b/node_modules/mocha/node_modules/mkdirp/test/return_sync.js deleted file mode 100644 index 7c222d35..00000000 --- a/node_modules/mocha/node_modules/mkdirp/test/return_sync.js +++ /dev/null @@ -1,24 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('return value', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - // should return the first dir created. - // By this point, it would be profoundly surprising if /tmp didn't - // already exist, since every other test makes things in there. - // Note that this will throw on failure, which will fail the test. - var made = mkdirp.sync(file); - t.equal(made, '/tmp/' + x); - - // making the same file again should have no effect. - made = mkdirp.sync(file); - t.equal(made, null); -}); diff --git a/node_modules/mocha/node_modules/mkdirp/test/root.js b/node_modules/mocha/node_modules/mkdirp/test/root.js deleted file mode 100644 index 97ad7a2f..00000000 --- a/node_modules/mocha/node_modules/mkdirp/test/root.js +++ /dev/null @@ -1,18 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('root', function (t) { - // '/' on unix, 'c:/' on windows. - var file = path.resolve('/'); - - mkdirp(file, 0755, function (err) { - if (err) throw err - fs.stat(file, function (er, stat) { - if (er) throw er - t.ok(stat.isDirectory(), 'target is a directory'); - t.end(); - }) - }); -}); diff --git a/node_modules/mocha/node_modules/mkdirp/test/sync.js b/node_modules/mocha/node_modules/mkdirp/test/sync.js deleted file mode 100644 index 7530cada..00000000 --- a/node_modules/mocha/node_modules/mkdirp/test/sync.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('sync', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - try { - mkdirp.sync(file, 0755); - } catch (err) { - t.fail(err); - return t.end(); - } - - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }); - }); -}); diff --git a/node_modules/mocha/node_modules/mkdirp/test/umask.js b/node_modules/mocha/node_modules/mkdirp/test/umask.js deleted file mode 100644 index 64ccafe2..00000000 --- a/node_modules/mocha/node_modules/mkdirp/test/umask.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('implicit mode from umask', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0777 & (~process.umask())); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/mocha/node_modules/mkdirp/test/umask_sync.js b/node_modules/mocha/node_modules/mkdirp/test/umask_sync.js deleted file mode 100644 index 35bd5cbb..00000000 --- a/node_modules/mocha/node_modules/mkdirp/test/umask_sync.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('umask sync modes', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - try { - mkdirp.sync(file); - } catch (err) { - t.fail(err); - return t.end(); - } - - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, (0777 & (~process.umask()))); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }); - }); -}); diff --git a/node_modules/mocha/package.json b/node_modules/mocha/package.json deleted file mode 100644 index 8bc51678..00000000 --- a/node_modules/mocha/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "mocha", - "version": "1.17.1", - "description": "simple, flexible, fun test framework", - "keywords": [ - "mocha", - "test", - "bdd", - "tdd", - "tap" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/mocha.git" - }, - "main": "./index", - "bin": { - "mocha": "./bin/mocha", - "_mocha": "./bin/_mocha" - }, - "engines": { - "node": ">= 0.4.x" - }, - "scripts": { - "test": "make test-all" - }, - "dependencies": { - "commander": "2.0.0", - "growl": "1.7.x", - "jade": "0.26.3", - "diff": "1.0.7", - "debug": "*", - "mkdirp": "0.3.5", - "glob": "3.2.3" - }, - "devDependencies": { - "should": ">= 2.0.x", - "coffee-script": "1.2" - }, - "files": [ - "bin", - "images", - "lib", - "index.js", - "mocha.css", - "mocha.js" - ], - "readme": " [![Build Status](https://secure.travis-ci.org/visionmedia/mocha.png)](http://travis-ci.org/visionmedia/mocha)\n\n [![Mocha test framework](http://f.cl.ly/items/3l1k0n2A1U3M1I1L210p/Screen%20Shot%202012-02-24%20at%202.21.43%20PM.png)](http://visionmedia.github.io/mocha)\n\n Mocha is a simple, flexible, fun JavaScript test framework for node.js and the browser. For more information view the [documentation](http://visionmedia.github.io/mocha).\n\n## Contributors\n\n```\n\n project : mocha\n repo age : 2 years, 4 months ago\n commits : 1314\n active : 372 days\n files : 141\n authors :\n 582 TJ Holowaychuk 44.3%\n 389 Tj Holowaychuk 29.6%\n 46 Travis Jeffery 3.5%\n 31 Guillermo Rauch 2.4%\n 13 Attila Domokos 1.0%\n 10 John Firebaugh 0.8%\n 8 Jo Liss 0.6%\n 7 Nathan Rajlich 0.5%\n 6 Mike Pennisi 0.5%\n 6 James Carr 0.5%\n 6 Brendan Nee 0.5%\n 5 Aaron Heckmann 0.4%\n 5 Ryunosuke SATO 0.4%\n 4 hokaccha 0.3%\n 4 Joshua Krall 0.3%\n 4 Xavier Antoviaque 0.3%\n 3 Jesse Dailey 0.2%\n 3 Forbes Lindesay 0.2%\n 3 Sindre Sorhus 0.2%\n 3 Cory Thomas 0.2%\n 3 Fredrik Enestad 0.2%\n 3 Ben Lindsey 0.2%\n 3 Tyson Tate 0.2%\n 3 Mathieu Desvé 0.2%\n 3 Valentin Agachi 0.2%\n 3 Wil Moore III 0.2%\n 3 Merrick Christensen 0.2%\n 3 eiji.ienaga 0.2%\n 3 fool2fish 0.2%\n 3 Nathan Bowser 0.2%\n 3 Paul Miller 0.2%\n 2 Juzer Ali 0.2%\n 2 Pete Hawkins 0.2%\n 2 Jonas Westerlund 0.2%\n 2 Arian Stolwijk 0.2%\n 2 Quang Van 0.2%\n 2 Glen Mailer 0.2%\n 2 Justin DuJardin 0.2%\n 2 FARKAS Máté 0.2%\n 2 Raynos 0.2%\n 2 Michael Riley 0.2%\n 2 Michael Schoonmaker 0.2%\n 2 Domenic Denicola 0.2%\n 2 Simon Gaeremynck 0.2%\n 2 Konstantin Käfer 0.2%\n 2 domenic 0.2%\n 2 Paul Armstrong 0.2%\n 2 fcrisci 0.2%\n 2 Alexander Early 0.2%\n 2 Shawn Krisman 0.2%\n 2 Brian Beck 0.2%\n 2 Nathan Alderson 0.2%\n 2 David Henderson 0.2%\n 2 Timo Tijhof 0.2%\n 2 Ian Storm Taylor 0.2%\n 2 travis jeffery 0.2%\n 1 Matt Smith 0.1%\n 1 Matthew Shanley 0.1%\n 1 Nathan Black 0.1%\n 1 Phil Sung 0.1%\n 1 R56 0.1%\n 1 Refael Ackermann 0.1%\n 1 Richard Dingwall 0.1%\n 1 Romain Prieto 0.1%\n 1 Roman Neuhauser 0.1%\n 1 Roman Shtylman 0.1%\n 1 Russ Bradberry 0.1%\n 1 Russell Munson 0.1%\n 1 Rustem Mustafin 0.1%\n 1 Salehen Shovon Rahman 0.1%\n 1 Sasha Koss 0.1%\n 1 Seiya Konno 0.1%\n 1 Simon Goumaz 0.1%\n 1 Standa Opichal 0.1%\n 1 Stephen Mathieson 0.1%\n 1 Steve Mason 0.1%\n 1 Tapiwa Kelvin 0.1%\n 1 Teddy Zeenny 0.1%\n 1 Tim Ehat 0.1%\n 1 Vadim Nikitin 0.1%\n 1 Victor Costan 0.1%\n 1 Will Langstroth 0.1%\n 1 Yanis Wang 0.1%\n 1 Yuest Wang 0.1%\n 1 abrkn 0.1%\n 1 airportyh 0.1%\n 1 badunk 0.1%\n 1 fengmk2 0.1%\n 1 grasGendarme 0.1%\n 1 lodr 0.1%\n 1 tgautier@yahoo.com 0.1%\n 1 traleig1 0.1%\n 1 vlad 0.1%\n 1 yuitest 0.1%\n 1 Adam Crabtree 0.1%\n 1 Andreas Brekken 0.1%\n 1 Andreas Lind Petersen 0.1%\n 1 Andrew Nesbitt 0.1%\n 1 Andrey Popp 0.1%\n 1 Arnaud Brousseau 0.1%\n 1 Atsuya Takagi 0.1%\n 1 Austin Birch 0.1%\n 1 Bjørge Næss 0.1%\n 1 Brian Lalor 0.1%\n 1 Brian M. Carlson 0.1%\n 1 Brian Moore 0.1%\n 1 Bryan Donovan 0.1%\n 1 Casey Foster 0.1%\n 1 ChrisWren 0.1%\n 1 Corey Butler 0.1%\n 1 Daniel Stockman 0.1%\n 1 Dave McKenna 0.1%\n 1 Di Wu 0.1%\n 1 Dmitry Shirokov 0.1%\n 1 Fedor Indutny 0.1%\n 1 Florian Margaine 0.1%\n 1 Frederico Silva 0.1%\n 1 Fredrik Lindin 0.1%\n 1 Gareth Murphy 0.1%\n 1 Gavin Mogan 0.1%\n 1 Glen Huang 0.1%\n 1 Greg Perkins 0.1%\n 1 Harry Brundage 0.1%\n 1 Herman Junge 0.1%\n 1 Ian Young 0.1%\n 1 Ivan 0.1%\n 1 JP Bochi 0.1%\n 1 Jaakko Salonen 0.1%\n 1 Jakub Nešetřil 0.1%\n 1 James Bowes 0.1%\n 1 James Lal 0.1%\n 1 Jason Barry 0.1%\n 1 Javier Aranda 0.1%\n 1 Jeff Kunkle 0.1%\n 1 Jeremy Martin 0.1%\n 1 Jimmy Cuadra 0.1%\n 1 Jonathan Creamer 0.1%\n 1 Jussi Virtanen 0.1%\n 1 Katie Gengler 0.1%\n 1 Kazuhito Hokamura 0.1%\n 1 Kirill Korolyov 0.1%\n 1 Koen Punt 0.1%\n 1 Laszlo Bacsi 0.1%\n 1 Liam Newman 0.1%\n 1 László Bácsi 0.1%\n 1 Maciej Małecki 0.1%\n 1 Mal Graty 0.1%\n 1 Marc Kuo 0.1%\n 1 Matt Robenolt 0.1%\n```\n\n## Links\n\n - [Google Group](http://groups.google.com/group/mochajs)\n - [Wiki](https://github.com/visionmedia/mocha/wiki)\n - Mocha [Extensions and reporters](https://github.com/visionmedia/mocha/wiki)\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/mocha/issues" - }, - "homepage": "https://github.com/visionmedia/mocha", - "_id": "mocha@1.17.1", - "_from": "mocha@" -} diff --git a/node_modules/should/.idea/.name b/node_modules/should/.idea/.name deleted file mode 100644 index d1c5fd31..00000000 --- a/node_modules/should/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -should.js \ No newline at end of file diff --git a/node_modules/should/.idea/codeStyleSettings.xml b/node_modules/should/.idea/codeStyleSettings.xml deleted file mode 100644 index 771ca3ab..00000000 --- a/node_modules/should/.idea/codeStyleSettings.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - diff --git a/node_modules/should/.idea/encodings.xml b/node_modules/should/.idea/encodings.xml deleted file mode 100644 index e206d70d..00000000 --- a/node_modules/should/.idea/encodings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/node_modules/should/.idea/inspectionProfiles/Project_Default.xml b/node_modules/should/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 9cc3673b..00000000 --- a/node_modules/should/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - \ No newline at end of file diff --git a/node_modules/should/.idea/inspectionProfiles/profiles_settings.xml b/node_modules/should/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 3b312839..00000000 --- a/node_modules/should/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - \ No newline at end of file diff --git a/node_modules/should/.idea/jsLibraryMappings.xml b/node_modules/should/.idea/jsLibraryMappings.xml deleted file mode 100644 index 4e262aa4..00000000 --- a/node_modules/should/.idea/jsLibraryMappings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/node_modules/should/.idea/jsLinters/jshint.xml b/node_modules/should/.idea/jsLinters/jshint.xml deleted file mode 100644 index 4c0f7760..00000000 --- a/node_modules/should/.idea/jsLinters/jshint.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - diff --git a/node_modules/should/.idea/libraries/Node_js_Dependencies_for_should_js.xml b/node_modules/should/.idea/libraries/Node_js_Dependencies_for_should_js.xml deleted file mode 100644 index e639fbb8..00000000 --- a/node_modules/should/.idea/libraries/Node_js_Dependencies_for_should_js.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/node_modules/should/.idea/misc.xml b/node_modules/should/.idea/misc.xml deleted file mode 100644 index 1162f438..00000000 --- a/node_modules/should/.idea/misc.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/node_modules/should/.idea/modules.xml b/node_modules/should/.idea/modules.xml deleted file mode 100644 index 032a2af8..00000000 --- a/node_modules/should/.idea/modules.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/node_modules/should/.idea/scopes/scope_settings.xml b/node_modules/should/.idea/scopes/scope_settings.xml deleted file mode 100644 index 922003b8..00000000 --- a/node_modules/should/.idea/scopes/scope_settings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/node_modules/should/.idea/should.js.iml b/node_modules/should/.idea/should.js.iml deleted file mode 100644 index 30573aa7..00000000 --- a/node_modules/should/.idea/should.js.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/node_modules/should/.idea/vcs.xml b/node_modules/should/.idea/vcs.xml deleted file mode 100644 index c80f2198..00000000 --- a/node_modules/should/.idea/vcs.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/node_modules/should/.idea/workspace.xml b/node_modules/should/.idea/workspace.xml deleted file mode 100644 index 90f3b660..00000000 --- a/node_modules/should/.idea/workspace.xml +++ /dev/null @@ -1,763 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Bash - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1378708904520 - 1378708904520 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/node_modules/should/.npmignore b/node_modules/should/.npmignore deleted file mode 100644 index 3a32276d..00000000 --- a/node_modules/should/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -examples -test \ No newline at end of file diff --git a/node_modules/should/History.md b/node_modules/should/History.md deleted file mode 100644 index b9848dbe..00000000 --- a/node_modules/should/History.md +++ /dev/null @@ -1,222 +0,0 @@ -3.1.2 / 2014-01-28 -================== - - * Fix for adding .inspect for JQuery object only in case when it is exist - -3.1.1 / 2014-01-28 -================== - - * Fix for HTMLElement in DOM less environments - -3.1.0 / 2014-01-23 -================== - - * Added jquery based broser extension - -3.0.1 / 2014-01-17 -================== - - * Fix: .lengthOf() - -3.0.0 / 2014-01-17 -================== - - * Split everything to smaller files - * Added huge extension to .match and .matchEach. Thanks @alsotang for initial code and idea. - * Added .containDeep and .containEql - * Separate build for browser and node.js - * Basic plugin system - * Breaking change: .Object now do not fail on arrays - * Breaking change: Additional messages now replaces generated and do not added - * Breaking change: .keys now check as is - no keys in args means no keys in object - * Deprecated: assert extension - * Deprecated: .include and .includeEql - * Now all assertions define only positive cases, should.js take care about negations and chains - -2.1.1 / 2013-12-05 -================== - - * Move date formatting out of should.inspect - -2.1.0 / 2013-11-11 -================== - - * Override .inspect for Date's to convert them to ISOString - -2.0.2 / 2013-10-21 -================== - - * Add '#of' as getter for chaining. - * Exclude browser script for .npmignore. - -2.0.1 / 2013-10-10 -================== - - * Fix wrong path in .npmignore. - -2.0.0 / 2013-10-10 -================== - - * breaking change: #a now getter like #an. Was replaced with #type(str) - * breaking change: #empty does not check length for objects. Now it check if object do not have own properties. - * #properties check if object have some properties - * util.inspect now exposed as should.inspect - * assertions for NaN, Infinity, Array, Object, String, Boolean, Number, Error, Function - * #equal got alias #exactly - -1.3.0 / 2013-09-13 -================== - - * fix doc for .keys. Closes #108. - * add #endWith() - * add .startWith (#119) - -1.2.2 / 2013-02-19 -================== - - * fix should.be.instanceOf() failure on Date - -1.2.1 / 2012-11-02 -================== - - * add .showDiff - * Make instanceOf and throwError be aliased like others [alFReD-NSH] - * Fix should[.not].exist not having stack trace #84 [alFReD-NSH] - -1.2.0 / 2012-09-21 -================== - - * Added #approximately(value, delta, description) for doing assertions on results of operations with numbers. [titarenko] - -1.1.1 / 2012-09-19 -================== - - * add .type for eql()s assert - -1.1.0 / 2012-07-30 -================== - - * add enclosing of failure message functions. Closes #81 - * add mocha .actual / .expected string support for all assertion values - -0.7.0 / 2012-07-17 -================== - - * add `.throw(Constructor)` support [snakamura] - -0.6.3 / 2012-04-26 -================== - - * Added object inclusion support back - -0.6.2 / 2012-04-26 -================== - - * Added homepage to package.json - * Fixed .equal() with dates. Closes #63 - -0.6.1 / 2012-04-10 -================== - - * package: add "repository" section [TooTallNate] - * use valueOf() to get the reference the object [TooTallNate] - -0.6.0 / 2012-03-01 -================== - - * Added `err.actual` and `err.expected` for .{eql,equal}() - * Added 'return this;' to 'get json' and 'get html' in order to provide chaining for should.be.json and should.be.html - -0.5.1 / 2012-01-13 -================== - - * Added better `.json` - * Added better `.html` - -0.5.0 / 2012-01-12 -================== - - * Added string matching to `.throw()` [serby] - * Added regexp matching to `.throw()` [serby] - * Added `.includeEql()` [RubenVerborgh] - * Added `.should.be.html` - * Added `.should.be.json` - * Added optional description args to most matchers [Mike Swift] - -0.4.2 / 2011-12-17 -================== - - * Fixed .header() for realzzz - -0.4.1 / 2011-12-16 -================== - - * Fixed: chain .header() to retain negation - -0.4.0 / 2011-12-16 -================== - - * Added `.should.throw()` - * Added `.include()` support for strings - * Added `.include()` support for arrays - * Removed `keys()` `.include` modifier support - * Removed `.object()` - * Removed `.string()` - * Removed `.contain()` - * Removed `.respondTo()` rubyism - * expresso -> mocha - -0.3.2 / 2011-10-24 -================== - - * Fixed tests for 0.5.x - * Fixed sys warning - -0.3.1 / 2011-08-22 -================== - - * configurable - -0.3.0 / 2011-08-20 -================== - - * Added assertion for inclusion of an object: `foo.should.include.object({ foo: 'bar' })` - -0.2.1 / 2011-05-13 -================== - - * Fixed .status(code). Closes #18 - -0.2.0 / 2011-04-17 -================== - - * Added `res.should.have.status(code)` method - * Added `res.should.have.header(field, val)` method - -0.1.0 / 2011-04-06 -================== - - * Added `should.exist(obj)` [aseemk] - * Added `should.not.exist(obj)` [aseemk] - -0.0.4 / 2010-11-24 -================== - - * Added `.ok` to assert truthfulness - * Added `.arguments` - * Fixed double required bug. [thanks dominictarr] - -0.0.3 / 2010-11-19 -================== - - * Added `true` / `false` assertions - -0.0.2 / 2010-11-19 -================== - - * Added chaining support - -0.0.1 / 2010-11-19 -================== - - * Initial release diff --git a/node_modules/should/Makefile b/node_modules/should/Makefile deleted file mode 100644 index e4295ad1..00000000 --- a/node_modules/should/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -TESTS=$(shell find test -name *.test.js) - -test: - @browserify lib/browser.js -s Should --dg false -o should.js.for-tests - @./node_modules/.bin/mocha --ui exports --recursive $(TESTS) - -browser: - @browserify lib/browser.js -s Should --dg false -o should.js - -.PHONY: test browser \ No newline at end of file diff --git a/node_modules/should/Readme.md b/node_modules/should/Readme.md deleted file mode 100644 index eb77b680..00000000 --- a/node_modules/should/Readme.md +++ /dev/null @@ -1,644 +0,0 @@ -# should.js - -_should_ is an expressive, readable, test framework agnostic, assertion library. Main goals of this library __to be expressive__ and __to be helpful__. It means test code should be clean, and error messages enough helpfull to understand error. - -It extends the `Object.prototype` with a single non-enumerable getter that allows you to express how that object should behave, also it returns itself when required with `require`. - -## Example -```javascript -var should = require('should'); - -var user = { - name: 'tj' - , pets: ['tobi', 'loki', 'jane', 'bandit'] -}; - -user.should.have.property('name', 'tj'); -user.should.have.property('pets').with.lengthOf(4); - -// if the object was created with Object.create(null) -// then it doesn't inherit `Object` and have the `should` getter -// so you can do: - -should(user).have.property('name', 'tj'); -should(true).ok; - -someAsyncTask(foo, function(err, result){ - should.not.exist(err); - should.exist(result); - result.bar.should.equal(foo); -}); -``` -## To begin - - 1. Install it: - - $ npm install should --save-dev - - 2. Require it and use: - -```javascript -var should = require('should'); - -(5).should.be.exactly(5).and.be.a.Number; -``` - -## In browser - -If you want to use _should_ in browser, use version that is in root of repository (or build it yourself). It is builded with browserify (see [Makefile](https://github.com/visionmedia/should.js/blob/master/Makefile)). To build fresh version: - -```bash -# you should have browserify -npm install -g browserify -make browser -``` - -This script exported to `window.Should`. It is the same as use `should` statically: - -```js -Should(5).be.exactly(5) -``` - -Also as for node.js case `Object.prototype` extended with `should` (that is why `window.Should` used): - -```js -window.should.be.exactly(window); -// the same -// window is host object -should.be.exactly(window); -// you should not really care about it - -(5).should.be.exactly(5); -``` - -*should.js* uses EcmaScript 5 very extensively so any browser that support ES5 is supported. (IE <=8 not supported). -See [kangax's compat table](http://kangax.github.io/es5-compat-table) to know which exactly. - -You can easy install it with again npm or bower: -``` -npm install should --save-dev -# or -bower install visionmedia/should.js -``` - -## Static should and assert module - -For some rare cases should can be used statically, without `Object.prototype`. -It can be replacement for node assert module: - -```javascript -assert.fail(actual, expected, message, operator) // just write wrong should assertion -assert(value, message), assert.ok(value, [message]) // should(value).ok -assert.equal(actual, expected, [message]) // should(actual).eql(expected, [message]) -assert.notEqual(actual, expected, [message]) // should(actual).not.eql(expected, [message]) -assert.deepEqual(actual, expected, [message]) // should(actual).eql(expected, [message]) -assert.notDeepEqual(actual, expected, [message]) // should(actual).not.eql(expected, [message]) -assert.strictEqual(actual, expected, [message]) // should(actual).equal(expected, [message]) -assert.notStrictEqual(actual, expected, [message]) // should(actual).not.equal(expected, [message]) -assert.throws(block, [error], [message]) // should(block).throw([error]) -assert.doesNotThrow(block, [message]) // should(block).not.throw([error]) -assert.ifError(value) // should(value).Error (to check if it is error) or should(value).not.ok (to check that it is falsy) -``` - -## .not - -`.not` negate current assertion. - -# Assertions -## chaining assertions - -Every assertion will return a `should.js`-wrapped Object, so assertions can be chained. -You can use this helpers to just chain: `.an`, `.of`, `.a`, `.and`, `.be`, `.have`, `.with`, `.is`, `.which`. Use them for better readability, they do nothing at all. -For example: -```js -user.should.be.an.instanceOf(Object).and.have.property('name', 'tj'); -user.pets.should.be.instanceof(Array).and.have.lengthOf(4); -``` -Almost all assertions return the same object - so you can easy chain them. But some move assertion object to property value. See feather, it will be mention if object chainged. - -## .ok - -Assert if asseted object is truthy in javascript meaning of truthy ('', null, undefined, 0 , NaN, Infinity - is falsy, so all others are truthy). - -Assert truthfulness: - -```javascript -true.should.be.ok; -'yay'.should.be.ok; -(1).should.be.ok; -({}).should.be.ok; -``` - -or negated: - -```javascript -false.should.not.be.ok; -''.should.not.be.ok; -(0).should.not.be.ok; -``` - -## .true - -Assert if asseted object === true: - -```javascript -true.should.be.true; -'1'.should.not.be.true; -``` - -## .false - -Assert if asseted object === false: - -```javascript -false.should.be.false; -(0).should.not.be.false; -``` - -## .eql(otherValue) - -Assert if asserted object is *equal* to otherValue. This means that object compared by its actual content, not just reference equality. - -```javascript -({ foo: 'bar' }).should.eql({ foo: 'bar' }); -[1,2,3].should.eql([1,2,3]); -// see next example it is correct, even if it is different types, but actual content the same -[1, 2, 3].should.eql({ '0': 1, '1': 2, '2': 3 }); -``` -## .equal(otherValue) and .exactly(otherValue) - -Assert if asserted object strictly equal to `otherValue` (using `===` - no type conversion for primitive types and reference equivalence for reference types). - -```javascript -(4).should.equal(4); -'test'.should.equal('test'); -[1,2,3].should.not.equal([1,2,3]); -(4).should.be.exactly(4); -``` - -## .startWith(str) - -Assert that string starts with `str`. - -```javascript -'foobar'.should.startWith('foo'); -'foobar'.should.not.startWith('bar'); -``` -## .endWith(str) - -Assert that string ends with `str`. - -```javascript -'foobar'.should.endWith('bar'); -'foobar'.should.not.endWith('foo'); -``` - -## .within(from, to) - -Assert inclusive numeric range (`<= to` and `>= from`): -```javascript -user.age.should.be.within(5, 50); -(5).should.be.within(5, 10).and.within(5, 5); -``` - -## .approximately(num, delta) - -Assert floating point number near `num` within `delta` margin: - -```javascript -(99.99).should.be.approximately(100, 0.1); -``` - -## .above(num) and .greaterThan(num) - -Assert numeric value above the given value (`> num`): - -```javascript -user.age.should.be.above(5); -user.age.should.not.be.above(100); -(5).should.be.above(0); -(5).should.not.be.above(5); -``` - -## .below(num) and .lessThan(num) - -Assert numeric value below the given value (`< num`): - -```javascript -user.age.should.be.below(100); -user.age.should.not.be.below(5); -(5).should.be.below(6); -(5).should.not.be.below(5); -``` - -## .NaN - -Assert numeric value is NaN: - -```javascript -(undefined + 0).should.be.NaN; -``` - -## .Infinity - -Assert numeric value is Infinity: - -```javascript -(1/0).should.be.Infinity; -``` - -## .type(str) - -Assert given value have such type (using __typeof__ operator): -```javascript -user.should.be.type('object'); -'test'.should.be.type('string'); -``` - -## .instanceof(constructor) and .instanceOf(constructor) - -Assert given value is instance of `constructor` (using __instanceof__ operator): - -```javascript -user.should.be.an.instanceof(User); -[].should.be.an.instanceOf(Array); -``` - -## .arguments - -Assert given object is an `Arguments`: - -```javascript -var args = (function(){ return arguments; })(1,2,3); -args.should.be.arguments; -[].should.not.be.arguments; -``` - -## .Object, .Number, .Array, .Boolean, .Function, .String, .Error - -Assert given object is instance of such constructor (shortcut for `.instanceof` assertion). - -```javascript -({}).should.be.an.Object; -(1).should.be.a.Number; -[].should.be.an.Array.and.an.Object; -(true).should.be.a.Boolean; -''.should.be.a.String; -``` - -## .property(name[, value]) - -Assert property exists and has optional value(compare using `.eql`): -```javascript -user.should.have.property('name'); -user.should.have.property('age', 15); -user.should.not.have.property('rawr'); -user.should.not.have.property('age', 0); -[1, 2].should.have.property('0', 1); -``` - -__NB__ `.property` change object to actual property value! - -## .properties(propName1, propName2, ...) or .properties([propName1, propName2, ...]) or .properties(obj) - -`obj` it is object that map properties to their actual values. - -Assert all given properties exists and have given values (compare using `.eql`): - -```javascript -user.should.have.properties('name', 'age'); -user.should.have.properties(['name', 'age']); -user.should.have.properties({ - name: 'denis', - age: 24 -}); -``` - -## .length(number) and .lengthOf(number) - -Assert _length_ property exists and has a value of the given number (shortcut for `.property('length', number)`): -```javascript -user.pets.should.have.length(5); -user.pets.should.have.a.lengthOf(5); -({ length: 10}).should.have.length(10); -``` - -__NB__ `.length` change object to actual property value! - -## .ownProperty(str) and .hasOwnProperty(str) - -Assert given object has own property (using `.hasOwnProperty`): -```javascript -({ foo: 'bar' }).should.have.ownProperty('foo').equal('bar'); -``` - -__NB__ `.length` change object to actual property value! - -## .empty - -Assert given value is empty. It means for strings, arrays, arguments length == 0 and for object do not have own properties. - -```javascript -[].should.be.empty; -''.should.be.empty; -({}).should.be.empty; -(function() { - arguments.should.be.empty; -})(); -``` - -## .keys([key1, key2, ...]) and .keys(key1, key2, ...) and .key(key) - -Assert own object keys, which must match _exactly_, -and will fail if you omit a key or two: - -```javascript -var obj = { foo: 'bar', baz: 'raz' }; -obj.should.have.keys('foo', 'baz'); -obj.should.have.keys(['foo', 'baz']); -({}).should.have.keys(); -({}).should.have.keys('key'); //fail AssertionError: expected {} to have key 'key'missing keys: 'key' -``` - -## .containEql(otherValue) - -Assert given value to contain something *.eql* to otherValue. See examples to understand better: - -```javascript -'hello boy'.should.containEql('boy'); -[1,2,3].should.containEql(3); -[[1],[2],[3]].should.containEql([3]); -[[1],[2],[3, 4]].should.not.containEql([3]); - -({ b: 10 }).should.containEql({ b: 10 }); -([1, 2, { a: 10 }]).should.containEql({ a: 10 }); -[1, 2, 3].should.not.containEql({ a: 1 }); - -[{a: 'a'}, {b: 'b', c: 'c'}].should.containEql({a: 'a'}); -[{a: 'a'}, {b: 'b', c: 'c'}].should.not.containEql({b: 'b'}); -``` - -## .containDeep(otherValue) - -Assert given value to contain something *.eql* to otherValue within depth. -Again see examples: - -```javascript -'hello boy'.should.containDeep('boy'); -[1,2,3].should.containDeep([3]); -[1,2,3].should.containDeep([1, 3]); -//but not -[1,2,3].should.containDeep([3, 1]); - -({ a: { b: 10 }, b: { c: 10, d: 11, a: { b: 10, c: 11} }}).should - .containDeep({ a: { b: 10 }, b: { c: 10, a: { c: 11 }}}); - -[1, 2, 3, { a: { b: { d: 12 }}}].should.containDeep([{ a: { b: {d: 12}}}]); - -[[1],[2],[3]].should.containDeep([[3]]); -[[1],[2],[3, 4]].should.containDeep([[3]]); -[{a: 'a'}, {b: 'b', c: 'c'}].should.containDeep([{a: 'a'}]); -[{a: 'a'}, {b: 'b', c: 'c'}].should.containDeep([{b: 'b'}]); -``` - -It does not search somewhere in depth it check all pattern in depth. Object checked -by properties key and value, arrays checked like sub sequences. Everyting compared using .eql. -Main difference with `.containEql` is that this assertion require full type chain - -if asserted value is an object, otherValue should be also an object (which is sub object of given). -The same true for arrays, otherValue should be an array which compared to be subsequence of given object. - -## .match(otherValue) - -Assert given object to match `otherValue`. - -Given: String, otherValue: regexp. Uses `RegExp#exec(str)`: -```javascript -username.should.match(/^\w+$/) -``` - -Given: Array, otherValue: regexp - assert each value match to regexp. -```javascript -['a', 'b', 'c'].should.match(/[a-z]/); -['a', 'b', 'c'].should.not.match(/[d-z]/); -``` - -Given: Object, otherValue: regexp - assert own property's values to match regexp. -```javascript -({ a: 'foo', c: 'barfoo' }).should.match(/foo$/); -({ a: 'a' }).should.not.match(/^http/); -``` - -Given: Anything, otherValue: function - assert if given value matched to function. - -Function can use .should inside or return 'true' or 'false', in all other cases it do nothing. If you return value that return assertion, you will receive better error messages. - -```javascript -(5).should.match(function(n) { return n > 0; }); -(5).should.not.match(function(n) { return n < 0; }); -(5).should.not.match(function(it) { it.should.be.an.Array; }); -(5).should.match(function(it) { return it.should.be.a.Number; }); -``` - -Now compare messages: -```javascript -(5).should.not.match(function(it) { it.should.be.a.Number; }); -//AssertionError: expected 5 not to match [Function] -(5).should.not.match(function(it) { return it.should.be.a.Number; }); -//AssertionError: expected 5 not to match [Function] -// expected 5 to be a number -``` - -Given: object, otherValue: another object - assert that object properties match to properties of another object in meaning that describe above cases. See examples: - -```javascript -({ a: 10, b: 'abc', c: { d: 10 }, d: 0 }).should - .match({ a: 10, b: /c$/, c: function(it) { return it.should.have.property('d', 10); }}); - -[10, 'abc', { d: 10 }, 0].should - .match({ '0': 10, '1': /c$/, '2': function(it) { return it.should.have.property('d', 10); } }); - -[10, 'abc', { d: 10 }, 0].should - .match([10, /c$/, function(it) { return it.should.have.property('d', 10); }]); -``` - -## .matchEach(otherValue) - -Assert given property keys and values each match given check object. - -If `otherValue` is RegExp, then each property value checked to match it: -```javascript -(['a', 'b', 'c']).should.matchEach(/[a-c]/); -``` - -If `otherValue` is Function, then check each property value and key matched it: -```javascript -[10, 11, 12].should.matchEach(function(it) { return it >= 10; }); -[10, 11, 12].should.matchEach(function(it) { return it >= 10; }); -``` - -In other cases it check that each property value is `.eql` to `otherValue`: -```javascript -[10, 10].should.matchEach(10); -``` -## .throw() and throwError() - -Assert an exception is thrown: - -```js -(function(){ - throw new Error('fail'); -}).should.throw(); -``` - -Assert an exception is not thrown: - -```js -(function(){ - -}).should.not.throw(); -``` -Assert exception message matches string: - -```js -(function(){ - throw new Error('fail'); -}).should.throw('fail'); -``` - -Assert exepection message matches regexp: - -```js -(function(){ - throw new Error('failed to foo'); -}).should.throw(/^fail/); -``` - -If you need to pass arguments and/or context to execute function use `Function#bind(context, arg1, ...)`: -```js -function isPositive(n) { - if(n <= 0) throw new Error('Given number is not positive') -} - -isPositive.bind(null, 10).should.not.throw(); -isPositive.bind(null, -10).should.throw(); -``` - -If you need to check something in asynchronous function it is required to do in 2 steps: - -```js -// first we need to check that function is called -var called = false; -collection.findOne({ _id: 10 }, function(err, res) { - called = true; - - //second we test what you want - res.should.be.... -}); - -called.should.be.true; -``` - -In case you are using something like `Mocha`, you should use asynchronous test and call `done()` in proper place to make sure that you asynchronous function is called before test is finished. -```js -collection.findOne({ _id: 10 }, function(err, res) { - if(err) return done(err); - //second we test what you want - res.should.be.... - - done(); -}); -``` - -In general case if you need to check that something is executed you need such thing as `spies`, good example is an [sinon](http://sinonjs.org/). - -## .status(code) - -Asserts that `.statusCode` is `code`: -```javascript -res.should.have.status(200); -``` - -Not included in browser build. - -## .header(field[, value]) - -Asserts that a `.headers` object with `field` and optional `value` are present: -```javascript -res.should.have.header('content-length'); -res.should.have.header('Content-Length', '123'); -``` - -Not included in browser build. - -## .json - -Assert that Content-Type is "application/json; charset=utf-8" - -```javascript -res.should.be.json -``` - -Not included in browser build. - -## .html - -Assert that Content-Type is "text/html; charset=utf-8" -```javascript -res.should.be.html -``` - -Not included in browser build. - -## Optional Error description - -As it can often be difficult to ascertain exactly where failed assertions are coming from in your tests, an optional description parameter can be passed to several should matchers. The description will follow the failed assertion in the error: - - (1).should.eql(0, 'some useful description') - - AssertionError: some useful description - at Object.eql (/Users/swift/code/should.js/node_modules/should/lib/should.js:280:10) - ... - -The methods that support this optional description are: `eql`, `equal`, `within`, `instanceof`, `above`, `below`, `match`, `length`, `property`, `ownProperty`. - -## Mocha example - -For example you can use should with the [Mocha test framework](http://visionmedia.github.io/mocha/) by simply including it: - -```javascript -var should = require('should'); -var mylib = require('mylib'); - - -describe('mylib', function () { - it('should have a version with the format #.#.#', function() { - lib.version.should.match(/^\d+\.\d+\.\d+$/); - } -}); -``` - -## Contributions - -[Actual list of contributors](https://github.com/visionmedia/should.js/graphs/contributors) if you want to show it your friends. - -To run the tests for _should_ simply run: - - $ make test - -Before contribute something: - -1. Your code looks like all other code - all project should look like it was written by one man, always. -2. If you want propose something - just create issue and describe your question with much description as you can. -3. Please never send issues or pull requests about code style, jshint violations etc - i do not accept it (and you will spend your time for free). -4. If you think you have some general receipt, consider create PR with it. -5. If you not sure if you receipt enough general just create your own plugin for should.js. (see should.use and Assertion.add usage). -6. If you add new code it should be covered by tests, no tests - no code. -7. If you find bug (or at least you think it is a bug), create issue with library version and test case that I can run and see what are you talking about, or at least full steps that I can reproduce it. - -## OMG IT EXTENDS OBJECT???!?!@ - -Yes, yes it does, with a single getter _should_, and no it won't break your code, because it does this **properly** with a non-enumerable property. - -## License - -MIT diff --git a/node_modules/should/index.js b/node_modules/should/index.js deleted file mode 100644 index 2bb5c331..00000000 --- a/node_modules/should/index.js +++ /dev/null @@ -1,2 +0,0 @@ - -module.exports = require('./lib/node.js'); \ No newline at end of file diff --git a/node_modules/should/lib/browser.js b/node_modules/should/lib/browser.js deleted file mode 100644 index 4fdb15e5..00000000 --- a/node_modules/should/lib/browser.js +++ /dev/null @@ -1,23 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var should = require('./should'); - -should - .use(require('./ext/assert')) - .use(require('./ext/chain')) - .use(require('./ext/bool')) - .use(require('./ext/number')) - .use(require('./ext/eql')) - .use(require('./ext/type')) - .use(require('./ext/string')) - .use(require('./ext/property')) - .use(require('./ext/error')) - .use(require('./ext/match')) - .use(require('./ext/browser/jquery')) - .use(require('./ext/deprecated')); - - module.exports = should; \ No newline at end of file diff --git a/node_modules/should/lib/eql.js b/node_modules/should/lib/eql.js deleted file mode 100644 index 17bd0fdd..00000000 --- a/node_modules/should/lib/eql.js +++ /dev/null @@ -1,102 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -// Taken from node's assert module, because it sucks -// and exposes next to nothing useful. -var util = require('./util'); - -module.exports = _deepEqual; - -var pSlice = Array.prototype.slice; - -function _deepEqual(actual, expected) { - // 7.1. All identical values are equivalent, as determined by ===. - if (actual === expected) { - return true; - - } else if (util.isBuffer(actual) && util.isBuffer(expected)) { - if (actual.length != expected.length) return false; - - for (var i = 0; i < actual.length; i++) { - if (actual[i] !== expected[i]) return false; - } - - return true; - - // 7.2. If the expected value is a Date object, the actual value is - // equivalent if it is also a Date object that refers to the same time. - } else if (util.isDate(actual) && util.isDate(expected)) { - return actual.getTime() === expected.getTime(); - - // 7.3 If the expected value is a RegExp object, the actual value is - // equivalent if it is also a RegExp object with the same source and - // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`). - } else if (util.isRegExp(actual) && util.isRegExp(expected)) { - return actual.source === expected.source && - actual.global === expected.global && - actual.multiline === expected.multiline && - actual.lastIndex === expected.lastIndex && - actual.ignoreCase === expected.ignoreCase; - - // 7.4. Other pairs that do not both pass typeof value == 'object', - // equivalence is determined by ==. - } else if (!util.isObject(actual) && !util.isObject(expected)) { - return actual == expected; - - // 7.5 For all other Object pairs, including Array objects, equivalence is - // determined by having the same number of owned properties (as verified - // with Object.prototype.hasOwnProperty.call), the same set of keys - // (although not necessarily the same order), equivalent values for every - // corresponding key, and an identical 'prototype' property. Note: this - // accounts for both named and indexed properties on Arrays. - } else { - return objEquiv(actual, expected); - } -} - - -function objEquiv (a, b) { - if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b)) - return false; - // an identical 'prototype' property. - if (a.prototype !== b.prototype) return false; - //~~~I've managed to break Object.keys through screwy arguments passing. - // Converting to array solves the problem. - if (util.isArguments(a)) { - if (!util.isArguments(b)) { - return false; - } - a = pSlice.call(a); - b = pSlice.call(b); - return _deepEqual(a, b); - } - try{ - var ka = Object.keys(a), - kb = Object.keys(b), - key, i; - } catch (e) {//happens when one is a string literal and the other isn't - return false; - } - // having the same number of owned properties (keys incorporates - // hasOwnProperty) - if (ka.length != kb.length) - return false; - //the same set of keys (although not necessarily the same order), - ka.sort(); - kb.sort(); - //~~~cheap key test - for (i = ka.length - 1; i >= 0; i--) { - if (ka[i] != kb[i]) - return false; - } - //equivalent values for every corresponding key, and - //~~~possibly expensive deep test - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!_deepEqual(a[key], b[key])) return false; - } - return true; -} diff --git a/node_modules/should/lib/ext/assert.js b/node_modules/should/lib/ext/assert.js deleted file mode 100644 index 9bf436f4..00000000 --- a/node_modules/should/lib/ext/assert.js +++ /dev/null @@ -1,57 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util') - , assert = require('assert') - , AssertionError = assert.AssertionError; - -module.exports = function(should) { - var i = should.format; - - /** - * Expose assert to should - * - * This allows you to do things like below - * without require()ing the assert module. - * - * should.equal(foo.bar, undefined); - * - */ - util.merge(should, assert); - - - /** - * Assert _obj_ exists, with optional message. - * - * @param {*} obj - * @param {String} [msg] - * @api public - */ - should.exist = should.exists = function(obj, msg) { - if(null == obj) { - throw new AssertionError({ - message: msg || ('expected ' + i(obj) + ' to exist'), stackStartFunction: should.exist - }); - } - }; - - /** - * Asserts _obj_ does not exist, with optional message. - * - * @param {*} obj - * @param {String} [msg] - * @api public - */ - - should.not = {}; - should.not.exist = should.not.exists = function(obj, msg) { - if(null != obj) { - throw new AssertionError({ - message: msg || ('expected ' + i(obj) + ' to not exist'), stackStartFunction: should.not.exist - }); - } - }; -}; \ No newline at end of file diff --git a/node_modules/should/lib/ext/bool.js b/node_modules/should/lib/ext/bool.js deleted file mode 100644 index 04da82b3..00000000 --- a/node_modules/should/lib/ext/bool.js +++ /dev/null @@ -1,21 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = function(should, Assertion) { - Assertion.add('true', function() { - this.is.exactly(true) - }, true); - - Assertion.add('false', function() { - this.is.exactly(false) - }, true); - - Assertion.add('ok', function() { - this.params = { operator: 'to be truthy' }; - - this.assert(this.obj); - }, true); -}; \ No newline at end of file diff --git a/node_modules/should/lib/ext/browser/jquery.js b/node_modules/should/lib/ext/browser/jquery.js deleted file mode 100644 index cf58203e..00000000 --- a/node_modules/should/lib/ext/browser/jquery.js +++ /dev/null @@ -1,229 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -/*! - * Portions copyright (c) 2010, 2011, 2012 Wojciech Zawistowski, Travis Jeffery - * From the jasmine-jquery project under the MIT License. - */ - -var util = require('../../util'); - -module.exports = function(should, Assertion) { - var i = should.format; - var $ = this.jQuery || this.$; - - /* Otherwise, node's util.inspect loops hangs */ - if (typeof HTMLElement !== "undefined" && HTMLElement && !HTMLElement.prototype.inspect) { - HTMLElement.prototype.inspect = function () { - return this.outerHTML; - }; - } - - if (typeof jQuery !== "undefined" && jQuery && !jQuery.prototype.inspect) { - jQuery.fn.inspect = function () { - var elementList = this.toArray().map(function (e) { - return util.inspect(e); - }).join(", "); - if (this.selector) { - return "SELECTOR(" + this.selector + ") matching " + this.length + " elements" + (elementList.length ? ": " + elementList : ""); - } else { - return elementList; - } - }; - } - - function jQueryAttributeTestHelper(method, singular, plural, nameOrHash, value) { - var keys = util.isObject(nameOrHash) ? Object.keys(nameOrHash) : [nameOrHash]; - var allRelevantAttributes = keys.reduce(function (memo, key) { - var value = $(this.obj)[method](key); - if (typeof value !== 'undefined') { - memo[key] = value; - } - return memo; - }.bind(this), {}); - - if (arguments.length === 4 && util.isObject(nameOrHash)) { - this.params = { operator: 'to have ' + plural + ' ' + i(nameOrHash) }; - allRelevantAttributes.should.have.properties(nameOrHash); - } else if (arguments.length === 4) { - this.params = { operator: 'to have ' + singular + ' ' + i(nameOrHash) }; - allRelevantAttributes.should.have.property(nameOrHash); - } else { - this.params = { operator: 'to have ' + singular + ' ' + i(nameOrHash) + ' with value ' + i(value) }; - allRelevantAttributes.should.have.property(nameOrHash, value); - } - } - - var browserTagCaseIndependentHtml = function (html) { - return $('
        ').append(html).html(); - }; - - var addJqPredicateAssertion = function (predicate, nameOverride, operatorOverride) { - Assertion.add(nameOverride || predicate, function() { - this.params = { operator: 'to be ' + (operatorOverride || predicate) }; - this.assert($(this.obj).is(':' + predicate)); - }, true); - } - - Assertion.add('className', function(className) { - this.params = { operator: 'to have class ' + className }; - this.assert($(this.obj).hasClass(className)); - }); - - Assertion.add('css', function(css) { - this.params = { operator: 'to have css ' + i(css) }; - for (var prop in css) { - var value = css[prop]; - if (value === 'auto' && $(this.obj).get(0).style[prop] === 'auto') { - continue; - } - $(this.obj).css(prop).should.eql(value); - } - }); - - addJqPredicateAssertion('visible'); - addJqPredicateAssertion('hidden'); - addJqPredicateAssertion('selected'); - addJqPredicateAssertion('checked'); - addJqPredicateAssertion('disabled'); - addJqPredicateAssertion('empty', 'emptyJq'); - addJqPredicateAssertion('focus', 'focused', 'focused'); - - Assertion.add('inDOM', function() { - this.params = { operator: 'to be in the DOM' }; - this.assert($.contains(document.documentElement, $(this.obj)[0])); - }, true); - - Assertion.add('exist', function() { - this.params = { operator: 'to exist' }; - $(this.obj).should.not.have.length(0); - }, true); - - Assertion.add('attr', function() { - var args = [ - 'attr', - 'attribute', - 'attributes' - ].concat(Array.prototype.slice.call(arguments, 0)); - jQueryAttributeTestHelper.apply(this, args); - }); - - Assertion.add('prop', function() { - var args = [ - 'prop', - 'property', - 'properties' - ].concat(Array.prototype.slice.call(arguments, 0)); - jQueryAttributeTestHelper.apply(this, args); - }); - - Assertion.add('elementId', function(id) { - this.params = { operator: 'to have ID ' + i(id) }; - this.obj.should.have.attr('id', id); - }); - - Assertion.add('html', function(html) { - this.params = { operator: 'to have HTML ' + i(html) }; - $(this.obj).html().should.eql(browserTagCaseIndependentHtml(html)); - }); - - Assertion.add('containHtml', function(html) { - this.params = { operator: 'to contain HTML ' + i(html) }; - $(this.obj).html().indexOf(browserTagCaseIndependentHtml(html)).should.be.above(-1); - }); - - Assertion.add('text', function(text) { - this.params = { operator: 'to have text ' + i(text) }; - var trimmedText = $.trim($(this.obj).text()); - - if (util.isRegExp(text)) { - trimmedText.should.match(text); - } else { - trimmedText.should.eql(text); - } - }); - - Assertion.add('containText', function(text) { - this.params = { operator: 'to contain text ' + i(text) }; - var trimmedText = $.trim($(this.obj).text()); - - if (util.isRegExp(text)) { - trimmedText.should.match(text); - } else { - trimmedText.indexOf(text).should.be.above(-1); - } - }); - - Assertion.add('value', function(val) { - this.params = { operator: 'to have value ' + i(val) }; - $(this.obj).val().should.eql(val); - }); - - Assertion.add('data', function() { - var args = [ - 'data', - 'data', - 'data' - ].concat(Array.prototype.slice.call(arguments, 0)); - jQueryAttributeTestHelper.apply(this, args); - }); - - Assertion.add('containElement', function(target) { - this.params = { operator: 'to contain ' + $(target).inspect() }; - $(this.obj).find(target).should.not.have.length(0); - }); - - Assertion.add('matchedBy', function(selector) { - this.params = { operator: 'to be matched by selector ' + selector }; - $(this.obj).filter(selector).should.not.have.length(0); - }); - - Assertion.add('handle', function(event) { - this.params = { operator: 'to handle ' + event }; - - var events = $._data($(this.obj).get(0), "events"); - - if (!events || !event || typeof event !== "string") { - return this.assert(false); - } - - var namespaces = event.split("."), - eventType = namespaces.shift(), - sortedNamespaces = namespaces.slice(0).sort(), - namespaceRegExp = new RegExp("(^|\\.)" + sortedNamespaces.join("\\.(?:.*\\.)?") + "(\\.|$)"); - - if (events[eventType] && namespaces.length) { - for (var i = 0; i < events[eventType].length; i++) { - var namespace = events[eventType][i].namespace; - - if (namespaceRegExp.test(namespace)) { - return; - } - } - } else { - events.should.have.property(eventType); - events[eventType].should.not.have.length(0); - return; - } - - this.assert(false); - }); - - Assertion.add('handleWith', function(eventName, eventHandler) { - this.params = { operator: 'to handle ' + eventName + ' with ' + eventHandler }; - - var normalizedEventName = eventName.split('.')[0], - stack = $._data($(this.obj).get(0), "events")[normalizedEventName]; - - for (var i = 0; i < stack.length; i++) { - if (stack[i].handler == eventHandler) { - return; - } - } - - this.assert(false); - }); -}; \ No newline at end of file diff --git a/node_modules/should/lib/ext/chain.js b/node_modules/should/lib/ext/chain.js deleted file mode 100644 index 301c38e1..00000000 --- a/node_modules/should/lib/ext/chain.js +++ /dev/null @@ -1,18 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = function(should, Assertion) { - - function addLink(name) { - Object.defineProperty(Assertion.prototype, name, { - get: function() { - return this; - } - }); - } - - ['an', 'of', 'a', 'and', 'be', 'have', 'with', 'is', 'which'].forEach(addLink); -}; \ No newline at end of file diff --git a/node_modules/should/lib/ext/deprecated.js b/node_modules/should/lib/ext/deprecated.js deleted file mode 100644 index 3656d077..00000000 --- a/node_modules/should/lib/ext/deprecated.js +++ /dev/null @@ -1,33 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util'), - eql = require('../eql'); - -module.exports = function(should, Assertion) { - var i = should.format; - - Assertion.add('include', function(obj, description) { - if(!Array.isArray(this.obj) && !util.isString(this.obj)) { - this.params = { operator: 'to include an object equal to ' + i(obj), message: description }; - var cmp = {}; - for(var key in obj) cmp[key] = this.obj[key]; - this.assert(eql(cmp, obj)); - } else { - this.params = { operator: 'to include ' + i(obj), message: description }; - - this.assert(~this.obj.indexOf(obj)); - } - }); - - Assertion.add('includeEql', function(obj, description) { - this.params = { operator: 'to include an object equal to ' + i(obj), message: description }; - - this.assert(this.obj.some(function(item) { - return eql(obj, item); - })); - }); -}; \ No newline at end of file diff --git a/node_modules/should/lib/ext/eql.js b/node_modules/should/lib/ext/eql.js deleted file mode 100644 index e3b03e50..00000000 --- a/node_modules/should/lib/ext/eql.js +++ /dev/null @@ -1,23 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var eql = require('../eql'); - -module.exports = function(should, Assertion) { - Assertion.add('eql', function(val, description) { - this.params = { operator: 'to equal', expected: val, showDiff: true, message: description }; - - this.assert(eql(val, this.obj)); - }); - - Assertion.add('equal', function(val, description) { - this.params = { operator: 'to be', expected: val, showDiff: true, message: description }; - - this.assert(val === this.obj); - }); - - Assertion.alias('equal', 'exactly'); -}; \ No newline at end of file diff --git a/node_modules/should/lib/ext/error.js b/node_modules/should/lib/ext/error.js deleted file mode 100644 index eac98e4c..00000000 --- a/node_modules/should/lib/ext/error.js +++ /dev/null @@ -1,51 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = function(should, Assertion) { - var i = should.format; - - Assertion.add('throw', function(message) { - var fn = this.obj - , err = {} - , errorInfo = '' - , ok = true; - - try { - fn(); - ok = false; - } catch(e) { - err = e; - } - - if(ok) { - if('string' == typeof message) { - ok = message == err.message; - } else if(message instanceof RegExp) { - ok = message.test(err.message); - } else if('function' == typeof message) { - ok = err instanceof message; - } - - if(message && !ok) { - if('string' == typeof message) { - errorInfo = " with a message matching '" + message + "', but got '" + err.message + "'"; - } else if(message instanceof RegExp) { - errorInfo = " with a message matching " + message + ", but got '" + err.message + "'"; - } else if('function' == typeof message) { - errorInfo = " of type " + message.name + ", but got " + err.constructor.name; - } - } else { - errorInfo = " (got " + i(err) + ")"; - } - } - - this.params = { operator: 'to throw exception' + errorInfo }; - - this.assert(ok); - }); - - Assertion.alias('throw', 'throwError'); -}; \ No newline at end of file diff --git a/node_modules/should/lib/ext/http.js b/node_modules/should/lib/ext/http.js deleted file mode 100644 index f5d24fc6..00000000 --- a/node_modules/should/lib/ext/http.js +++ /dev/null @@ -1,33 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -//var statusCodes = require('http').STATUS_CODES; - -module.exports = function(should, Assertion) { - - Assertion.add('header', function(field, val) { - this - .have.property('headers') - .and.have.property(field.toLowerCase(), val); - }); - - Assertion.add('status', function(code) { - //this.params = { operator: 'to have response code ' + code + ' ' + i(statusCodes[code]) - // + ', but got ' + this.obj.statusCode + ' ' + i(statusCodes[this.obj.statusCode]) } - - this.have.property('statusCode', code); - }); - - Assertion.add('json', function() { - this.have.property('headers') - .and.have.property('content-type').include('application/json'); - }, true); - - Assertion.add('html', function() { - this.have.property('headers') - .and.have.property('content-type').include('text/html'); - }, true); -}; \ No newline at end of file diff --git a/node_modules/should/lib/ext/match.js b/node_modules/should/lib/ext/match.js deleted file mode 100644 index f0322ae8..00000000 --- a/node_modules/should/lib/ext/match.js +++ /dev/null @@ -1,112 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util'), - eql = require('../eql'); - -module.exports = function(should, Assertion) { - var i = should.format; - - Assertion.add('match', function(other, description) { - this.params = { operator: 'to match ' + i(other), message: description }; - - if(!eql(this.obj, other)) { - if(util.isRegExp(other)) { // something - regex - - if(util.isString(this.obj)) { - - this.assert(other.exec(this.obj)); - } else if(Array.isArray(this.obj)) { - - this.obj.forEach(function(item) { - this.assert(other.exec(item));// should we try to convert to String and exec? - }, this); - } else if(util.isObject(this.obj)) { - - var notMatchedProps = [], matchedProps = []; - util.forOwn(this.obj, function(value, name) { - if(other.exec(value)) matchedProps.push(i(name)); - else notMatchedProps.push(i(name)); - }, this); - - if(notMatchedProps.length) - this.params.operator += '\n\tnot matched properties: ' + notMatchedProps.join(', '); - if(matchedProps.length) - this.params.operator += '\n\tmatched properties: ' + matchedProps.join(', '); - - this.assert(notMatchedProps.length == 0); - } // should we try to convert to String and exec? - } else if(util.isFunction(other)) { - var res; - try { - res = other(this.obj); - } catch(e) { - if(e instanceof should.AssertionError) { - this.params.operator += '\n\t' + e.message; - } - throw e; - } - - if(res instanceof Assertion) { - this.params.operator += '\n\t' + res.getMessage(); - } - - //if we throw exception ok - it is used .should inside - if(util.isBoolean(res)) { - this.assert(res); // if it is just boolean function assert on it - } - } else if(util.isObject(other)) { // try to match properties (for Object and Array) - notMatchedProps = []; matchedProps = []; - - util.forOwn(other, function(value, key) { - try { - this.obj[key].should.match(value); - matchedProps.push(key); - } catch(e) { - if(e instanceof should.AssertionError) { - notMatchedProps.push(key); - } else { - throw e; - } - } - }, this); - - if(notMatchedProps.length) - this.params.operator += '\n\tnot matched properties: ' + notMatchedProps.join(', '); - if(matchedProps.length) - this.params.operator += '\n\tmatched properties: ' + matchedProps.join(', '); - - this.assert(notMatchedProps.length == 0); - } else { - this.assert(false); - } - } - }); - - Assertion.add('matchEach', function(other, description) { - this.params = { operator: 'to match each ' + i(other), message: description }; - - var f = other; - - if(util.isRegExp(other)) - f = function(it) { - return !!other.exec(it); - }; - else if(!util.isFunction(other)) - f = function(it) { - return eql(it, other); - }; - - util.forOwn(this.obj, function(value, key) { - var res = f(value, key); - - //if we throw exception ok - it is used .should inside - if(util.isBoolean(res)) { - this.assert(res); // if it is just boolean function assert on it - } - }, this); - }); -}; \ No newline at end of file diff --git a/node_modules/should/lib/ext/number.js b/node_modules/should/lib/ext/number.js deleted file mode 100644 index 3b59c879..00000000 --- a/node_modules/should/lib/ext/number.js +++ /dev/null @@ -1,50 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = function(should, Assertion) { - Assertion.add('NaN', function() { - this.params = { operator: 'to be NaN' }; - - this.is.a.Number - .and.assert(isNaN(this.obj)); - }, true); - - Assertion.add('Infinity', function() { - this.params = { operator: 'to be Infinity' }; - - this.is.a.Number - .and.not.a.NaN - .and.assert(!isFinite(this.obj)); - }, true); - - Assertion.add('within', function(start, finish, description) { - this.params = { operator: 'to be within ' + start + '..' + finish, message: description }; - - this.assert(this.obj >= start && this.obj <= finish); - }); - - Assertion.add('approximately', function(value, delta, description) { - this.params = { operator: 'to be approximately ' + value + " ±" + delta, message: description }; - - this.assert(Math.abs(this.obj - value) <= delta); - }); - - Assertion.add('above', function(n, description) { - this.params = { operator: 'to be above ' + n, message: description }; - - this.assert(this.obj > n); - }); - - Assertion.add('below', function(n, description) { - this.params = { operator: 'to be below ' + n, message: description }; - - this.assert(this.obj < n); - }); - - Assertion.alias('above', 'greaterThan'); - Assertion.alias('below', 'lessThan'); - -}; \ No newline at end of file diff --git a/node_modules/should/lib/ext/property.js b/node_modules/should/lib/ext/property.js deleted file mode 100644 index 57ca828b..00000000 --- a/node_modules/should/lib/ext/property.js +++ /dev/null @@ -1,215 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util'), - eql = require('../eql'); - -var aSlice = Array.prototype.slice; - -module.exports = function(should, Assertion) { - var i = should.format; - - Assertion.add('property', function(name, val) { - if(arguments.length > 1) { - var p = {}; - p[name] = val; - this.have.properties(p); - } else { - this.have.properties(name); - } - this.obj = this.obj[name]; - }); - - Assertion.add('properties', function(names) { - var values = {}; - if(arguments.length > 1) { - names = aSlice.call(arguments); - } else if(!Array.isArray(names)) { - if(util.isString(names)) { - names = [names]; - } else { - values = names; - names = Object.keys(names); - } - } - - var obj = Object(this.obj), missingProperties = []; - - //just enumerate properties and check if they all present - names.forEach(function(name) { - if(!(name in obj)) missingProperties.push(i(name)); - }); - - var props = missingProperties; - if(props.length === 0) { - props = names.map(i); - } - - var operator = (props.length === 1 ? - 'to have property ' : 'to have properties ') + props.join(', '); - - this.params = { operator: operator }; - - this.assert(missingProperties.length === 0); - - // check if values in object matched expected - var valueCheckNames = Object.keys(values); - if(valueCheckNames.length) { - var wrongValues = []; - props = []; - - // now check values, as there we have all properties - valueCheckNames.forEach(function(name) { - var value = values[name]; - if(!eql(obj[name], value)) { - wrongValues.push(i(name) + ' of ' + i(value) + ' (got ' + i(obj[name]) + ')'); - } else { - props.push(i(name) + ' of ' + i(value)); - } - }); - - if(wrongValues.length > 0) { - props = wrongValues; - } - - operator = (props.length === 1 ? - 'to have property ' : 'to have properties ') + props.join(', '); - - this.params = { operator: operator }; - - this.assert(wrongValues.length === 0); - } - }); - - Assertion.add('length', function(n, description) { - this.have.property('length', n, description); - }); - - Assertion.alias('length', 'lengthOf'); - - var hasOwnProperty = Object.prototype.hasOwnProperty; - - Assertion.add('ownProperty', function(name, description) { - this.params = { operator: 'to have own property ' + i(name), message: description }; - - this.assert(hasOwnProperty.call(this.obj, name)); - - this.obj = this.obj[name]; - }); - - Assertion.alias('hasOwnProperty', 'ownProperty'); - - Assertion.add('empty', function() { - this.params = { operator: 'to be empty' }; - - if(util.isString(this.obj) || Array.isArray(this.obj) || util.isArguments(this.obj)) { - this.have.property('length', 0); - } else { - var obj = Object(this.obj); // wrap to reference for booleans and numbers - for(var prop in obj) { - this.have.not.ownProperty(prop); - } - } - }, true); - - Assertion.add('keys', function(keys) { - if(arguments.length > 1) keys = aSlice.call(arguments); - else if(arguments.length === 1 && util.isString(keys)) keys = [ keys ]; - else if(arguments.length === 0) keys = []; - - var obj = Object(this.obj); - - // first check if some keys are missing - var missingKeys = []; - keys.forEach(function(key) { - if(!hasOwnProperty.call(this.obj, key)) - missingKeys.push(i(key)); - }, this); - - // second check for extra keys - var extraKeys = []; - Object.keys(obj).forEach(function(key) { - if(keys.indexOf(key) < 0) { - extraKeys.push(i(key)); - } - }); - - var verb = keys.length === 0 ? 'to be empty' : - 'to have ' + (keys.length === 1 ? 'key ' : 'keys '); - - this.params = { operator: verb + keys.map(i).join(', ')}; - - if(missingKeys.length > 0) - this.params.operator += '\n\tmissing keys: ' + missingKeys.join(', '); - - if(extraKeys.length > 0) - this.params.operator += '\n\textra keys: ' + extraKeys.join(', '); - - this.assert(missingKeys.length === 0 && extraKeys.length === 0); - }); - - Assertion.alias("keys", "key"); - - Assertion.add('containEql', function(other) { - this.params = { operator: 'to contain ' + i(other) }; - var obj = this.obj; - if(Array.isArray(obj)) { - this.assert(obj.some(function(item) { - return eql(item, other); - })); - } else if(util.isString(obj)) { - // expect obj to be string - this.assert(obj.indexOf(String(other)) >= 0); - } else if(util.isObject(obj)) { - // object contains object case - util.forOwn(other, function(value, key) { - obj[key].should.eql(value); - }); - } else { - //other uncovered cases - this.assert(false); - } - }); - - Assertion.add('containDeep', function(other) { - this.params = { operator: 'to contain ' + i(other) }; - - var obj = this.obj; - if(Array.isArray(obj)) { - if(Array.isArray(other)) { - var otherIdx = 0; - obj.forEach(function(item) { - try { - should(item).not.be.null.and.containDeep(other[otherIdx]); - otherIdx++; - } catch(e) { - if(e instanceof should.AssertionError) { - return; - } - throw e; - } - }); - this.assert(otherIdx == other.length); - //search array contain other as sub sequence - } else { - this.assert(false); - } - } else if(util.isString(obj)) {// expect other to be string - this.assert(obj.indexOf(String(other)) >= 0); - } else if(util.isObject(obj)) {// object contains object case - if(util.isObject(other)) { - util.forOwn(other, function(value, key) { - should(obj[key]).not.be.null.and.containDeep(value); - }); - } else {//one of the properties contain value - this.assert(false); - } - } else { - this.eql(other); - } - }); - -}; \ No newline at end of file diff --git a/node_modules/should/lib/ext/string.js b/node_modules/should/lib/ext/string.js deleted file mode 100644 index c3c6fead..00000000 --- a/node_modules/should/lib/ext/string.js +++ /dev/null @@ -1,19 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = function(should, Assertion) { - Assertion.add('startWith', function(str, description) { - this.params = { operator: 'to start with ' + should.format(str), message: description }; - - this.assert(0 === this.obj.indexOf(str)); - }); - - Assertion.add('endWith', function(str, description) { - this.params = { operator: 'to end with ' + should.format(str), message: description }; - - this.assert(this.obj.indexOf(str, this.obj.length - str.length) >= 0); - }); -}; \ No newline at end of file diff --git a/node_modules/should/lib/ext/type.js b/node_modules/should/lib/ext/type.js deleted file mode 100644 index 9ab9adfe..00000000 --- a/node_modules/should/lib/ext/type.js +++ /dev/null @@ -1,77 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util'); - -module.exports = function(should, Assertion) { - Assertion.add('Number', function() { - this.params = { operator: 'to be a number' }; - - this.assert(util.isNumber(this.obj)); - }, true); - - Assertion.add('arguments', function() { - this.params = { operator: 'to be arguments' }; - - this.assert(util.isArguments(this.obj)); - }, true); - - Assertion.add('type', function(type, description) { - this.params = { operator: 'to have type ' + type, message: description }; - - (typeof this.obj).should.be.exactly(type, description); - }); - - Assertion.add('instanceof', function(constructor, description) { - this.params = { operator: 'to be an instance of ' + constructor.name, message: description }; - - this.assert(Object(this.obj) instanceof constructor); - }); - - Assertion.add('Function', function() { - this.params = { operator: 'to be a function' }; - - this.assert(util.isFunction(this.obj)); - }, true); - - Assertion.add('Object', function() { - this.params = { operator: 'to be an object' }; - - this.assert(util.isObject(this.obj)); - }, true); - - Assertion.add('String', function() { - this.params = { operator: 'to be a string' }; - - this.assert(util.isString(this.obj)); - }, true); - - Assertion.add('Array', function() { - this.params = { operator: 'to be an array' }; - - this.assert(Array.isArray(this.obj)); - }, true); - - Assertion.add('Boolean', function() { - this.params = { operator: 'to be a boolean' }; - - this.assert(util.isBoolean(this.obj)); - }, true); - - Assertion.add('Error', function() { - this.params = { operator: 'to be an error' }; - - this.assert(util.isError(this.obj)); - }, true); - - Assertion.add('null', function() { - this.params = { operator: 'to be null' }; - - this.assert(this.obj === null); - }, true); - - Assertion.alias('instanceof', 'instanceOf'); -}; \ No newline at end of file diff --git a/node_modules/should/lib/node.js b/node_modules/should/lib/node.js deleted file mode 100644 index be2b5fba..00000000 --- a/node_modules/should/lib/node.js +++ /dev/null @@ -1,23 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var should = require('./should'); - -should - .use(require('./ext/assert')) - .use(require('./ext/chain')) - .use(require('./ext/bool')) - .use(require('./ext/number')) - .use(require('./ext/eql')) - .use(require('./ext/type')) - .use(require('./ext/string')) - .use(require('./ext/property')) - .use(require('./ext/http')) - .use(require('./ext/error')) - .use(require('./ext/match')) - .use(require('./ext/deprecated')); - - module.exports = should; \ No newline at end of file diff --git a/node_modules/should/lib/should.js b/node_modules/should/lib/should.js deleted file mode 100644 index 816c6173..00000000 --- a/node_modules/should/lib/should.js +++ /dev/null @@ -1,169 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - - -var util = require('./util') - , AssertionError = util.AssertionError - , inspect = util.inspect; - -/** - * Our function should - * @param obj - * @returns {Assertion} - */ -var should = function(obj) { - return new Assertion(util.isWrapperType(obj) ? obj.valueOf(): obj); -}; - -/** - * Initialize a new `Assertion` with the given _obj_. - * - * @param {*} obj - * @api private - */ - -var Assertion = should.Assertion = function Assertion(obj) { - this.obj = obj; -}; - - -/** - Way to extend Assertion function. It uses some logic - to define only positive assertions and itself rule with negative assertion. - - All actions happen in subcontext and this method take care about negation. - Potentially we can add some more modifiers that does not depends from state of assertion. -*/ -Assertion.add = function(name, f, isGetter) { - var prop = {}; - prop[isGetter ? 'get' : 'value'] = function() { - var context = new Assertion(this.obj); - context.copy = context.copyIfMissing; - - try { - f.apply(context, arguments); - } catch(e) { - //copy data from sub context to this - this.copy(context); - - //check for fail - if(e instanceof should.AssertionError) { - //negative fail - if(this.negate) { - this.obj = context.obj; - this.negate = false; - return this; - } - this.assert(false); - } - // throw if it is another exception - throw e; - } - //copy data from sub context to this - this.copy(context); - if(this.negate) { - this.assert(false); - } - - this.obj = context.obj; - this.negate = false; - return this; - }; - - Object.defineProperty(Assertion.prototype, name, prop); -}; - -Assertion.alias = function(from, to) { - Assertion.prototype[to] = Assertion.prototype[from] -}; - -should.AssertionError = AssertionError; -var i = should.format = function i(value) { - if(util.isDate(value) && typeof value.inspect !== 'function') return value.toISOString(); //show millis in dates - return inspect(value, { depth: null }); -}; - -should.use = function(f) { - f(this, Assertion); - return this; -}; - - -/** - * Expose should to external world. - */ -exports = module.exports = should; - - -/** - * Expose api via `Object#should`. - * - * @api public - */ - -Object.defineProperty(Object.prototype, 'should', { - set: function(){}, - get: function(){ - return should(this); - }, - configurable: true -}); - - -Assertion.prototype = { - constructor: Assertion, - - assert: function(expr) { - if(expr) return; - - var params = this.params; - - var msg = params.message, generatedMessage = false; - if(!msg) { - msg = this.getMessage(); - generatedMessage = true; - } - - var err = new AssertionError({ - message: msg - , actual: this.obj - , expected: params.expected - , stackStartFunction: this.assert - }); - - err.showDiff = params.showDiff; - err.operator = params.operator; - err.generatedMessage = generatedMessage; - - throw err; - }, - - getMessage: function() { - return 'expected ' + i(this.obj) + (this.negate ? ' not ': ' ') + - this.params.operator + ('expected' in this.params ? ' ' + i(this.params.expected) : ''); - }, - - copy: function(other) { - this.params = other.params; - }, - - copyIfMissing: function(other) { - if(!this.params) this.params = other.params; - }, - - - /** - * Negation modifier. - * - * @api public - */ - - get not() { - this.negate = !this.negate; - return this; - } -}; - diff --git a/node_modules/should/lib/util.js b/node_modules/should/lib/util.js deleted file mode 100644 index 2fdddd52..00000000 --- a/node_modules/should/lib/util.js +++ /dev/null @@ -1,119 +0,0 @@ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Check if given obj just a primitive type wrapper - * @param {Object} obj - * @returns {boolean} - * @api private - */ -exports.isWrapperType = function(obj) { - return isNumber(obj) || isString(obj) || isBoolean(obj); -}; - -/** - * Merge object b with object a. - * - * var a = { foo: 'bar' } - * , b = { bar: 'baz' }; - * - * utils.merge(a, b); - * // => { foo: 'bar', bar: 'baz' } - * - * @param {Object} a - * @param {Object} b - * @return {Object} - * @api private - */ - -exports.merge = function(a, b){ - if (a && b) { - for (var key in b) { - a[key] = b[key]; - } - } - return a; -}; - -function isNumber(arg) { - return typeof arg === 'number' || arg instanceof Number; -} - -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string' || arg instanceof String; -} - -function isBoolean(arg) { - return typeof arg === 'boolean' || arg instanceof Boolean; -} -exports.isBoolean = isBoolean; - -exports.isString = isString; - -function isBuffer(arg) { - return typeof Buffer !== 'undefined' && arg instanceof Buffer; -} - -exports.isBuffer = isBuffer; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} - -exports.isDate = isDate; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} - -exports.isObject = isObject; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} - -exports.isRegExp = isRegExp; - -function isNullOrUndefined(arg) { - return arg == null; -} - -exports.isNullOrUndefined = isNullOrUndefined; - -function isArguments(object) { - return objectToString(object) === '[object Arguments]'; -} - -exports.isArguments = isArguments; - -exports.isFunction = function(arg) { - return typeof arg === 'function' || arg instanceof Function; -}; - -function isError(e) { - return isObject(e) && objectToString(e) === '[object Error]'; -} -exports.isError = isError; - -exports.inspect = require('util').inspect; - -exports.AssertionError = require('assert').AssertionError; - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -exports.forOwn = function(obj, f, context) { - for(var prop in obj) { - if(hasOwnProperty.call(obj, prop)) { - f.call(context, obj[prop], prop); - } - } -}; \ No newline at end of file diff --git a/node_modules/should/package.json b/node_modules/should/package.json deleted file mode 100644 index faca2010..00000000 --- a/node_modules/should/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "should", - "description": "test framework agnostic BDD-style assertions", - "version": "3.1.2", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/should.js.git" - }, - "homepage": "https://github.com/visionmedia/should.js", - "scripts": { - "test": "make test" - }, - "devDependencies": { - "mocha": "*", - "jsdom": "*", - "jquery": "*" - }, - "keywords": [ - "test", - "bdd", - "assert" - ], - "main": "./lib/node.js", - "engines": { - "node": ">= 0.2.0" - }, - "readme": "# should.js\n\n_should_ is an expressive, readable, test framework agnostic, assertion library. Main goals of this library __to be expressive__ and __to be helpful__. It means test code should be clean, and error messages enough helpfull to understand error.\n\nIt extends the `Object.prototype` with a single non-enumerable getter that allows you to express how that object should behave, also it returns itself when required with `require`.\n\n## Example\n```javascript\nvar should = require('should');\n\nvar user = {\n name: 'tj'\n , pets: ['tobi', 'loki', 'jane', 'bandit']\n};\n\nuser.should.have.property('name', 'tj');\nuser.should.have.property('pets').with.lengthOf(4);\n\n// if the object was created with Object.create(null)\n// then it doesn't inherit `Object` and have the `should` getter\n// so you can do:\n\nshould(user).have.property('name', 'tj');\nshould(true).ok;\n\nsomeAsyncTask(foo, function(err, result){\n should.not.exist(err);\n should.exist(result);\n result.bar.should.equal(foo);\n});\n```\n## To begin\n\n 1. Install it:\n \n $ npm install should --save-dev\n \n 2. Require it and use:\n\n```javascript\nvar should = require('should');\n\n(5).should.be.exactly(5).and.be.a.Number;\n```\n\n## In browser\n\nIf you want to use _should_ in browser, use version that is in root of repository (or build it yourself). It is builded with browserify (see [Makefile](https://github.com/visionmedia/should.js/blob/master/Makefile)). To build fresh version:\n\n```bash\n# you should have browserify\nnpm install -g browserify\nmake browser\n```\n\nThis script exported to `window.Should`. It is the same as use `should` statically:\n\n```js\nShould(5).be.exactly(5)\n```\n\nAlso as for node.js case `Object.prototype` extended with `should` (that is why `window.Should` used):\n\n```js\nwindow.should.be.exactly(window);\n// the same\n// window is host object \nshould.be.exactly(window);\n// you should not really care about it\n\n(5).should.be.exactly(5);\n```\n\n*should.js* uses EcmaScript 5 very extensively so any browser that support ES5 is supported. (IE <=8 not supported).\nSee [kangax's compat table](http://kangax.github.io/es5-compat-table) to know which exactly.\n\nYou can easy install it with again npm or bower:\n```\nnpm install should --save-dev\n# or\nbower install visionmedia/should.js\n```\n\n## Static should and assert module\n\nFor some rare cases should can be used statically, without `Object.prototype`.\nIt can be replacement for node assert module:\n\n```javascript\nassert.fail(actual, expected, message, operator) // just write wrong should assertion\nassert(value, message), assert.ok(value, [message]) // should(value).ok\nassert.equal(actual, expected, [message]) // should(actual).eql(expected, [message])\nassert.notEqual(actual, expected, [message]) // should(actual).not.eql(expected, [message])\nassert.deepEqual(actual, expected, [message]) // should(actual).eql(expected, [message])\nassert.notDeepEqual(actual, expected, [message]) // should(actual).not.eql(expected, [message])\nassert.strictEqual(actual, expected, [message]) // should(actual).equal(expected, [message])\nassert.notStrictEqual(actual, expected, [message]) // should(actual).not.equal(expected, [message])\nassert.throws(block, [error], [message]) // should(block).throw([error])\nassert.doesNotThrow(block, [message]) // should(block).not.throw([error])\nassert.ifError(value) // should(value).Error (to check if it is error) or should(value).not.ok (to check that it is falsy)\n```\n\t\n## .not\n\n`.not` negate current assertion.\n\n# Assertions\n## chaining assertions\n\nEvery assertion will return a `should.js`-wrapped Object, so assertions can be chained.\nYou can use this helpers to just chain: `.an`, `.of`, `.a`, `.and`, `.be`, `.have`, `.with`, `.is`, `.which`. Use them for better readability, they do nothing at all.\nFor example:\n```js\nuser.should.be.an.instanceOf(Object).and.have.property('name', 'tj');\nuser.pets.should.be.instanceof(Array).and.have.lengthOf(4);\n```\nAlmost all assertions return the same object - so you can easy chain them. But some move assertion object to property value. See feather, it will be mention if object chainged.\n\n## .ok\n\nAssert if asseted object is truthy in javascript meaning of truthy ('', null, undefined, 0 , NaN, Infinity - is falsy, so all others are truthy).\n\nAssert truthfulness:\n\n```javascript\ntrue.should.be.ok;\n'yay'.should.be.ok;\n(1).should.be.ok;\n({}).should.be.ok;\n```\n\nor negated:\n\n```javascript\nfalse.should.not.be.ok;\n''.should.not.be.ok;\n(0).should.not.be.ok;\n```\n\n## .true\n\nAssert if asseted object === true:\n\n```javascript\ntrue.should.be.true;\n'1'.should.not.be.true;\n```\n\n## .false\n\nAssert if asseted object === false:\n\n```javascript\nfalse.should.be.false;\n(0).should.not.be.false;\n```\n\n## .eql(otherValue)\n\nAssert if asserted object is *equal* to otherValue. This means that object compared by its actual content, not just reference equality.\n \n```javascript\n({ foo: 'bar' }).should.eql({ foo: 'bar' });\n[1,2,3].should.eql([1,2,3]);\n// see next example it is correct, even if it is different types, but actual content the same\n[1, 2, 3].should.eql({ '0': 1, '1': 2, '2': 3 });\n```\n## .equal(otherValue) and .exactly(otherValue)\n\nAssert if asserted object strictly equal to `otherValue` (using `===` - no type conversion for primitive types and reference equivalence for reference types).\n\n```javascript\n(4).should.equal(4);\n'test'.should.equal('test');\n[1,2,3].should.not.equal([1,2,3]);\n(4).should.be.exactly(4);\n```\n\n## .startWith(str)\n\nAssert that string starts with `str`.\n\n```javascript\n'foobar'.should.startWith('foo');\n'foobar'.should.not.startWith('bar');\n```\n## .endWith(str)\n\nAssert that string ends with `str`.\n\n```javascript\n'foobar'.should.endWith('bar');\n'foobar'.should.not.endWith('foo');\n```\n\n## .within(from, to)\n\nAssert inclusive numeric range (`<= to` and `>= from`):\n```javascript\nuser.age.should.be.within(5, 50);\n(5).should.be.within(5, 10).and.within(5, 5);\n```\n\n## .approximately(num, delta)\n\nAssert floating point number near `num` within `delta` margin:\n\n```javascript\n(99.99).should.be.approximately(100, 0.1);\n```\n\n## .above(num) and .greaterThan(num)\n\nAssert numeric value above the given value (`> num`):\n\n```javascript\nuser.age.should.be.above(5);\nuser.age.should.not.be.above(100);\n(5).should.be.above(0);\n(5).should.not.be.above(5);\n```\n\n## .below(num) and .lessThan(num)\n\nAssert numeric value below the given value (`< num`):\n\n```javascript\nuser.age.should.be.below(100);\nuser.age.should.not.be.below(5);\n(5).should.be.below(6);\n(5).should.not.be.below(5);\n```\n\n## .NaN\n\nAssert numeric value is NaN:\n\n```javascript\n(undefined + 0).should.be.NaN;\n```\n\n## .Infinity\n\nAssert numeric value is Infinity:\n\n```javascript\n(1/0).should.be.Infinity;\n```\n\n## .type(str)\n\nAssert given value have such type (using __typeof__ operator):\n```javascript\nuser.should.be.type('object');\n'test'.should.be.type('string');\n```\n\n## .instanceof(constructor) and .instanceOf(constructor)\n\nAssert given value is instance of `constructor` (using __instanceof__ operator):\n\n```javascript\nuser.should.be.an.instanceof(User);\n[].should.be.an.instanceOf(Array);\n```\n\n## .arguments\n\nAssert given object is an `Arguments`:\n\n```javascript\nvar args = (function(){ return arguments; })(1,2,3);\nargs.should.be.arguments;\n[].should.not.be.arguments;\n```\n\n## .Object, .Number, .Array, .Boolean, .Function, .String, .Error\n\nAssert given object is instance of such constructor (shortcut for `.instanceof` assertion).\n\n```javascript\n({}).should.be.an.Object;\n(1).should.be.a.Number;\n[].should.be.an.Array.and.an.Object;\n(true).should.be.a.Boolean;\n''.should.be.a.String;\n```\n\n## .property(name[, value])\n\nAssert property exists and has optional value(compare using `.eql`):\n```javascript\nuser.should.have.property('name');\nuser.should.have.property('age', 15);\nuser.should.not.have.property('rawr');\nuser.should.not.have.property('age', 0);\n[1, 2].should.have.property('0', 1);\n```\n\n__NB__ `.property` change object to actual property value!\n\n## .properties(propName1, propName2, ...) or .properties([propName1, propName2, ...]) or .properties(obj)\n\n`obj` it is object that map properties to their actual values.\n\nAssert all given properties exists and have given values (compare using `.eql`):\n\n```javascript\nuser.should.have.properties('name', 'age');\nuser.should.have.properties(['name', 'age']);\nuser.should.have.properties({\n name: 'denis',\n age: 24\n});\n```\n\n## .length(number) and .lengthOf(number)\n\nAssert _length_ property exists and has a value of the given number (shortcut for `.property('length', number)`):\n```javascript\nuser.pets.should.have.length(5);\nuser.pets.should.have.a.lengthOf(5);\n({ length: 10}).should.have.length(10);\n```\n\n__NB__ `.length` change object to actual property value!\n\n## .ownProperty(str) and .hasOwnProperty(str)\n\nAssert given object has own property (using `.hasOwnProperty`):\n```javascript\n({ foo: 'bar' }).should.have.ownProperty('foo').equal('bar');\n```\n\n__NB__ `.length` change object to actual property value!\n\n## .empty\n\nAssert given value is empty. It means for strings, arrays, arguments length == 0 and for object do not have own properties.\n\n```javascript\n[].should.be.empty;\n''.should.be.empty;\n({}).should.be.empty;\n(function() {\n arguments.should.be.empty;\n})();\n```\n\n## .keys([key1, key2, ...]) and .keys(key1, key2, ...) and .key(key)\n\nAssert own object keys, which must match _exactly_,\nand will fail if you omit a key or two:\n\n```javascript\nvar obj = { foo: 'bar', baz: 'raz' };\nobj.should.have.keys('foo', 'baz');\nobj.should.have.keys(['foo', 'baz']);\n({}).should.have.keys();\n({}).should.have.keys('key'); //fail AssertionError: expected {} to have key 'key'missing keys: 'key'\n```\n\n## .containEql(otherValue)\n\nAssert given value to contain something *.eql* to otherValue. See examples to understand better:\n\n```javascript\n'hello boy'.should.containEql('boy');\n[1,2,3].should.containEql(3);\n[[1],[2],[3]].should.containEql([3]);\n[[1],[2],[3, 4]].should.not.containEql([3]);\n\n({ b: 10 }).should.containEql({ b: 10 });\n([1, 2, { a: 10 }]).should.containEql({ a: 10 });\n[1, 2, 3].should.not.containEql({ a: 1 });\n\n[{a: 'a'}, {b: 'b', c: 'c'}].should.containEql({a: 'a'});\n[{a: 'a'}, {b: 'b', c: 'c'}].should.not.containEql({b: 'b'});\n```\n\n## .containDeep(otherValue)\n\nAssert given value to contain something *.eql* to otherValue within depth.\nAgain see examples:\n\n```javascript\n'hello boy'.should.containDeep('boy');\n[1,2,3].should.containDeep([3]);\n[1,2,3].should.containDeep([1, 3]);\n//but not\n[1,2,3].should.containDeep([3, 1]);\n\n({ a: { b: 10 }, b: { c: 10, d: 11, a: { b: 10, c: 11} }}).should\n .containDeep({ a: { b: 10 }, b: { c: 10, a: { c: 11 }}});\n\n[1, 2, 3, { a: { b: { d: 12 }}}].should.containDeep([{ a: { b: {d: 12}}}]);\n\n[[1],[2],[3]].should.containDeep([[3]]);\n[[1],[2],[3, 4]].should.containDeep([[3]]);\n[{a: 'a'}, {b: 'b', c: 'c'}].should.containDeep([{a: 'a'}]);\n[{a: 'a'}, {b: 'b', c: 'c'}].should.containDeep([{b: 'b'}]);\n```\n\nIt does not search somewhere in depth it check all pattern in depth. Object checked\nby properties key and value, arrays checked like sub sequences. Everyting compared using .eql.\nMain difference with `.containEql` is that this assertion require full type chain -\nif asserted value is an object, otherValue should be also an object (which is sub object of given).\nThe same true for arrays, otherValue should be an array which compared to be subsequence of given object.\n\n## .match(otherValue)\n\nAssert given object to match `otherValue`.\n\nGiven: String, otherValue: regexp. Uses `RegExp#exec(str)`:\n```javascript\nusername.should.match(/^\\w+$/)\n```\n\nGiven: Array, otherValue: regexp - assert each value match to regexp.\n```javascript\n['a', 'b', 'c'].should.match(/[a-z]/);\n['a', 'b', 'c'].should.not.match(/[d-z]/);\n```\n\nGiven: Object, otherValue: regexp - assert own property's values to match regexp.\n```javascript\n({ a: 'foo', c: 'barfoo' }).should.match(/foo$/);\n({ a: 'a' }).should.not.match(/^http/);\n```\n\nGiven: Anything, otherValue: function - assert if given value matched to function.\n\nFunction can use .should inside or return 'true' or 'false', in all other cases it do nothing. If you return value that return assertion, you will receive better error messages.\n\n```javascript\n(5).should.match(function(n) { return n > 0; });\n(5).should.not.match(function(n) { return n < 0; });\n(5).should.not.match(function(it) { it.should.be.an.Array; });\n(5).should.match(function(it) { return it.should.be.a.Number; });\n```\n\nNow compare messages:\n```javascript\n(5).should.not.match(function(it) { it.should.be.a.Number; });\n//AssertionError: expected 5 not to match [Function]\n(5).should.not.match(function(it) { return it.should.be.a.Number; });\n//AssertionError: expected 5 not to match [Function]\n//\texpected 5 to be a number\n```\n\nGiven: object, otherValue: another object - assert that object properties match to properties of another object in meaning that describe above cases. See examples:\n\n```javascript\n({ a: 10, b: 'abc', c: { d: 10 }, d: 0 }).should\n .match({ a: 10, b: /c$/, c: function(it) { return it.should.have.property('d', 10); }});\n\n[10, 'abc', { d: 10 }, 0].should\n\t.match({ '0': 10, '1': /c$/, '2': function(it) { return it.should.have.property('d', 10); } });\n\n[10, 'abc', { d: 10 }, 0].should\n .match([10, /c$/, function(it) { return it.should.have.property('d', 10); }]); \n```\n\n## .matchEach(otherValue)\n\nAssert given property keys and values each match given check object.\n\nIf `otherValue` is RegExp, then each property value checked to match it:\n```javascript\n(['a', 'b', 'c']).should.matchEach(/[a-c]/);\n```\n\nIf `otherValue` is Function, then check each property value and key matched it:\n```javascript\n[10, 11, 12].should.matchEach(function(it) { return it >= 10; });\n[10, 11, 12].should.matchEach(function(it) { return it >= 10; });\n```\n\nIn other cases it check that each property value is `.eql` to `otherValue`:\n```javascript\n[10, 10].should.matchEach(10);\n```\n## .throw() and throwError()\n\nAssert an exception is thrown:\n\n```js\n(function(){\n throw new Error('fail');\n}).should.throw();\n```\n\nAssert an exception is not thrown:\n\n```js\n(function(){\n\n}).should.not.throw();\n```\nAssert exception message matches string:\n\n```js\n(function(){\n throw new Error('fail');\n}).should.throw('fail');\n```\n\nAssert exepection message matches regexp:\n\n```js\n(function(){\n throw new Error('failed to foo');\n}).should.throw(/^fail/);\n```\n\nIf you need to pass arguments and/or context to execute function use `Function#bind(context, arg1, ...)`:\n```js\nfunction isPositive(n) {\n if(n <= 0) throw new Error('Given number is not positive')\n}\n\nisPositive.bind(null, 10).should.not.throw();\nisPositive.bind(null, -10).should.throw();\n```\n\nIf you need to check something in asynchronous function it is required to do in 2 steps:\n\n```js\n// first we need to check that function is called\nvar called = false;\ncollection.findOne({ _id: 10 }, function(err, res) {\n called = true;\n \n //second we test what you want\n res.should.be....\n});\n\ncalled.should.be.true;\n```\n\nIn case you are using something like `Mocha`, you should use asynchronous test and call `done()` in proper place to make sure that you asynchronous function is called before test is finished.\n```js\ncollection.findOne({ _id: 10 }, function(err, res) {\n if(err) return done(err);\n //second we test what you want\n res.should.be....\n \n done();\n});\n```\n\nIn general case if you need to check that something is executed you need such thing as `spies`, good example is an [sinon](http://sinonjs.org/).\n\n## .status(code)\n\nAsserts that `.statusCode` is `code`:\n```javascript\nres.should.have.status(200);\n```\n\nNot included in browser build.\n\n## .header(field[, value])\n\nAsserts that a `.headers` object with `field` and optional `value` are present:\n```javascript\nres.should.have.header('content-length');\nres.should.have.header('Content-Length', '123');\n```\n\nNot included in browser build.\n\n## .json\n\nAssert that Content-Type is \"application/json; charset=utf-8\"\n\n```javascript\nres.should.be.json\n```\n\nNot included in browser build.\n\n## .html\n\nAssert that Content-Type is \"text/html; charset=utf-8\"\n```javascript\nres.should.be.html\n```\n\nNot included in browser build.\n\n## Optional Error description\n\nAs it can often be difficult to ascertain exactly where failed assertions are coming from in your tests, an optional description parameter can be passed to several should matchers. The description will follow the failed assertion in the error:\n\n (1).should.eql(0, 'some useful description')\n\n AssertionError: some useful description\n at Object.eql (/Users/swift/code/should.js/node_modules/should/lib/should.js:280:10)\n ...\n\nThe methods that support this optional description are: `eql`, `equal`, `within`, `instanceof`, `above`, `below`, `match`, `length`, `property`, `ownProperty`.\n\n## Mocha example\n\nFor example you can use should with the [Mocha test framework](http://visionmedia.github.io/mocha/) by simply including it:\n\n```javascript\nvar should = require('should');\nvar mylib = require('mylib');\n\n\ndescribe('mylib', function () {\n it('should have a version with the format #.#.#', function() {\n lib.version.should.match(/^\\d+\\.\\d+\\.\\d+$/);\n }\n});\n```\n\n## Contributions\n\n[Actual list of contributors](https://github.com/visionmedia/should.js/graphs/contributors) if you want to show it your friends.\n\nTo run the tests for _should_ simply run:\n\n $ make test\n \nBefore contribute something:\n\n1. Your code looks like all other code - all project should look like it was written by one man, always.\n2. If you want propose something - just create issue and describe your question with much description as you can.\n3. Please never send issues or pull requests about code style, jshint violations etc - i do not accept it (and you will spend your time for free).\n4. If you think you have some general receipt, consider create PR with it.\n5. If you not sure if you receipt enough general just create your own plugin for should.js. (see should.use and Assertion.add usage).\n6. If you add new code it should be covered by tests, no tests - no code. \n7. If you find bug (or at least you think it is a bug), create issue with library version and test case that I can run and see what are you talking about, or at least full steps that I can reproduce it.\n\n## OMG IT EXTENDS OBJECT???!?!@\n\nYes, yes it does, with a single getter _should_, and no it won't break your code, because it does this **properly** with a non-enumerable property.\n\n## License\n\nMIT\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/should.js/issues" - }, - "_id": "should@3.1.2", - "_from": "should@" -} diff --git a/node_modules/should/should.js b/node_modules/should/should.js deleted file mode 100644 index 44160f8d..00000000 --- a/node_modules/should/should.js +++ /dev/null @@ -1,2321 +0,0 @@ -!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Should=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o - * MIT Licensed - */ - -var should = require('./should'); - -should - .use(require('./ext/assert')) - .use(require('./ext/chain')) - .use(require('./ext/bool')) - .use(require('./ext/number')) - .use(require('./ext/eql')) - .use(require('./ext/type')) - .use(require('./ext/string')) - .use(require('./ext/property')) - .use(require('./ext/error')) - .use(require('./ext/match')) - .use(require('./ext/browser/jquery')) - .use(require('./ext/deprecated')); - - module.exports = should; -},{"./ext/assert":3,"./ext/bool":4,"./ext/browser/jquery":5,"./ext/chain":6,"./ext/deprecated":7,"./ext/eql":8,"./ext/error":9,"./ext/match":10,"./ext/number":11,"./ext/property":12,"./ext/string":13,"./ext/type":14,"./should":15}],2:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -// Taken from node's assert module, because it sucks -// and exposes next to nothing useful. -var util = require('./util'); - -module.exports = _deepEqual; - -var pSlice = Array.prototype.slice; - -function _deepEqual(actual, expected) { - // 7.1. All identical values are equivalent, as determined by ===. - if (actual === expected) { - return true; - - } else if (util.isBuffer(actual) && util.isBuffer(expected)) { - if (actual.length != expected.length) return false; - - for (var i = 0; i < actual.length; i++) { - if (actual[i] !== expected[i]) return false; - } - - return true; - - // 7.2. If the expected value is a Date object, the actual value is - // equivalent if it is also a Date object that refers to the same time. - } else if (util.isDate(actual) && util.isDate(expected)) { - return actual.getTime() === expected.getTime(); - - // 7.3 If the expected value is a RegExp object, the actual value is - // equivalent if it is also a RegExp object with the same source and - // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`). - } else if (util.isRegExp(actual) && util.isRegExp(expected)) { - return actual.source === expected.source && - actual.global === expected.global && - actual.multiline === expected.multiline && - actual.lastIndex === expected.lastIndex && - actual.ignoreCase === expected.ignoreCase; - - // 7.4. Other pairs that do not both pass typeof value == 'object', - // equivalence is determined by ==. - } else if (!util.isObject(actual) && !util.isObject(expected)) { - return actual == expected; - - // 7.5 For all other Object pairs, including Array objects, equivalence is - // determined by having the same number of owned properties (as verified - // with Object.prototype.hasOwnProperty.call), the same set of keys - // (although not necessarily the same order), equivalent values for every - // corresponding key, and an identical 'prototype' property. Note: this - // accounts for both named and indexed properties on Arrays. - } else { - return objEquiv(actual, expected); - } -} - - -function objEquiv (a, b) { - if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b)) - return false; - // an identical 'prototype' property. - if (a.prototype !== b.prototype) return false; - //~~~I've managed to break Object.keys through screwy arguments passing. - // Converting to array solves the problem. - if (util.isArguments(a)) { - if (!util.isArguments(b)) { - return false; - } - a = pSlice.call(a); - b = pSlice.call(b); - return _deepEqual(a, b); - } - try{ - var ka = Object.keys(a), - kb = Object.keys(b), - key, i; - } catch (e) {//happens when one is a string literal and the other isn't - return false; - } - // having the same number of owned properties (keys incorporates - // hasOwnProperty) - if (ka.length != kb.length) - return false; - //the same set of keys (although not necessarily the same order), - ka.sort(); - kb.sort(); - //~~~cheap key test - for (i = ka.length - 1; i >= 0; i--) { - if (ka[i] != kb[i]) - return false; - } - //equivalent values for every corresponding key, and - //~~~possibly expensive deep test - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!_deepEqual(a[key], b[key])) return false; - } - return true; -} - -},{"./util":16}],3:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util') - , assert = require('assert') - , AssertionError = assert.AssertionError; - -module.exports = function(should) { - var i = should.format; - - /** - * Expose assert to should - * - * This allows you to do things like below - * without require()ing the assert module. - * - * should.equal(foo.bar, undefined); - * - */ - util.merge(should, assert); - - - /** - * Assert _obj_ exists, with optional message. - * - * @param {*} obj - * @param {String} [msg] - * @api public - */ - should.exist = should.exists = function(obj, msg) { - if(null == obj) { - throw new AssertionError({ - message: msg || ('expected ' + i(obj) + ' to exist'), stackStartFunction: should.exist - }); - } - }; - - /** - * Asserts _obj_ does not exist, with optional message. - * - * @param {*} obj - * @param {String} [msg] - * @api public - */ - - should.not = {}; - should.not.exist = should.not.exists = function(obj, msg) { - if(null != obj) { - throw new AssertionError({ - message: msg || ('expected ' + i(obj) + ' to not exist'), stackStartFunction: should.not.exist - }); - } - }; -}; -},{"../util":16,"assert":17}],4:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = function(should, Assertion) { - Assertion.add('true', function() { - this.is.exactly(true) - }, true); - - Assertion.add('false', function() { - this.is.exactly(false) - }, true); - - Assertion.add('ok', function() { - this.params = { operator: 'to be truthy' }; - - this.assert(this.obj); - }, true); -}; -},{}],5:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -/*! - * Portions copyright (c) 2010, 2011, 2012 Wojciech Zawistowski, Travis Jeffery - * From the jasmine-jquery project under the MIT License. - */ - -var util = require('../../util'); - -module.exports = function(should, Assertion) { - var i = should.format; - var $ = this.jQuery || this.$; - - /* Otherwise, node's util.inspect loops hangs */ - if (typeof HTMLElement !== "undefined" && HTMLElement && !HTMLElement.prototype.inspect) { - HTMLElement.prototype.inspect = function () { - return this.outerHTML; - }; - } - - if (typeof jQuery !== "undefined" && jQuery && !jQuery.prototype.inspect) { - jQuery.fn.inspect = function () { - var elementList = this.toArray().map(function (e) { - return util.inspect(e); - }).join(", "); - if (this.selector) { - return "SELECTOR(" + this.selector + ") matching " + this.length + " elements" + (elementList.length ? ": " + elementList : ""); - } else { - return elementList; - } - }; - } - - function jQueryAttributeTestHelper(method, singular, plural, nameOrHash, value) { - var keys = util.isObject(nameOrHash) ? Object.keys(nameOrHash) : [nameOrHash]; - var allRelevantAttributes = keys.reduce(function (memo, key) { - var value = $(this.obj)[method](key); - if (typeof value !== 'undefined') { - memo[key] = value; - } - return memo; - }.bind(this), {}); - - if (arguments.length === 4 && util.isObject(nameOrHash)) { - this.params = { operator: 'to have ' + plural + ' ' + i(nameOrHash) }; - allRelevantAttributes.should.have.properties(nameOrHash); - } else if (arguments.length === 4) { - this.params = { operator: 'to have ' + singular + ' ' + i(nameOrHash) }; - allRelevantAttributes.should.have.property(nameOrHash); - } else { - this.params = { operator: 'to have ' + singular + ' ' + i(nameOrHash) + ' with value ' + i(value) }; - allRelevantAttributes.should.have.property(nameOrHash, value); - } - } - - var browserTagCaseIndependentHtml = function (html) { - return $('
        ').append(html).html(); - }; - - var addJqPredicateAssertion = function (predicate, nameOverride, operatorOverride) { - Assertion.add(nameOverride || predicate, function() { - this.params = { operator: 'to be ' + (operatorOverride || predicate) }; - this.assert($(this.obj).is(':' + predicate)); - }, true); - } - - Assertion.add('className', function(className) { - this.params = { operator: 'to have class ' + className }; - this.assert($(this.obj).hasClass(className)); - }); - - Assertion.add('css', function(css) { - this.params = { operator: 'to have css ' + i(css) }; - for (var prop in css) { - var value = css[prop]; - if (value === 'auto' && $(this.obj).get(0).style[prop] === 'auto') { - continue; - } - $(this.obj).css(prop).should.eql(value); - } - }); - - addJqPredicateAssertion('visible'); - addJqPredicateAssertion('hidden'); - addJqPredicateAssertion('selected'); - addJqPredicateAssertion('checked'); - addJqPredicateAssertion('disabled'); - addJqPredicateAssertion('empty', 'emptyJq'); - addJqPredicateAssertion('focus', 'focused', 'focused'); - - Assertion.add('inDOM', function() { - this.params = { operator: 'to be in the DOM' }; - this.assert($.contains(document.documentElement, $(this.obj)[0])); - }, true); - - Assertion.add('exist', function() { - this.params = { operator: 'to exist' }; - $(this.obj).should.not.have.length(0); - }, true); - - Assertion.add('attr', function() { - var args = [ - 'attr', - 'attribute', - 'attributes' - ].concat(Array.prototype.slice.call(arguments, 0)); - jQueryAttributeTestHelper.apply(this, args); - }); - - Assertion.add('prop', function() { - var args = [ - 'prop', - 'property', - 'properties' - ].concat(Array.prototype.slice.call(arguments, 0)); - jQueryAttributeTestHelper.apply(this, args); - }); - - Assertion.add('elementId', function(id) { - this.params = { operator: 'to have ID ' + i(id) }; - this.obj.should.have.attr('id', id); - }); - - Assertion.add('html', function(html) { - this.params = { operator: 'to have HTML ' + i(html) }; - $(this.obj).html().should.eql(browserTagCaseIndependentHtml(html)); - }); - - Assertion.add('containHtml', function(html) { - this.params = { operator: 'to contain HTML ' + i(html) }; - $(this.obj).html().indexOf(browserTagCaseIndependentHtml(html)).should.be.above(-1); - }); - - Assertion.add('text', function(text) { - this.params = { operator: 'to have text ' + i(text) }; - var trimmedText = $.trim($(this.obj).text()); - - if (util.isRegExp(text)) { - trimmedText.should.match(text); - } else { - trimmedText.should.eql(text); - } - }); - - Assertion.add('containText', function(text) { - this.params = { operator: 'to contain text ' + i(text) }; - var trimmedText = $.trim($(this.obj).text()); - - if (util.isRegExp(text)) { - trimmedText.should.match(text); - } else { - trimmedText.indexOf(text).should.be.above(-1); - } - }); - - Assertion.add('value', function(val) { - this.params = { operator: 'to have value ' + i(val) }; - $(this.obj).val().should.eql(val); - }); - - Assertion.add('data', function() { - var args = [ - 'data', - 'data', - 'data' - ].concat(Array.prototype.slice.call(arguments, 0)); - jQueryAttributeTestHelper.apply(this, args); - }); - - Assertion.add('containElement', function(target) { - this.params = { operator: 'to contain ' + $(target).inspect() }; - $(this.obj).find(target).should.not.have.length(0); - }); - - Assertion.add('matchedBy', function(selector) { - this.params = { operator: 'to be matched by selector ' + selector }; - $(this.obj).filter(selector).should.not.have.length(0); - }); - - Assertion.add('handle', function(event) { - this.params = { operator: 'to handle ' + event }; - - var events = $._data($(this.obj).get(0), "events"); - - if (!events || !event || typeof event !== "string") { - return this.assert(false); - } - - var namespaces = event.split("."), - eventType = namespaces.shift(), - sortedNamespaces = namespaces.slice(0).sort(), - namespaceRegExp = new RegExp("(^|\\.)" + sortedNamespaces.join("\\.(?:.*\\.)?") + "(\\.|$)"); - - if (events[eventType] && namespaces.length) { - for (var i = 0; i < events[eventType].length; i++) { - var namespace = events[eventType][i].namespace; - - if (namespaceRegExp.test(namespace)) { - return; - } - } - } else { - events.should.have.property(eventType); - events[eventType].should.not.have.length(0); - return; - } - - this.assert(false); - }); - - Assertion.add('handleWith', function(eventName, eventHandler) { - this.params = { operator: 'to handle ' + eventName + ' with ' + eventHandler }; - - var normalizedEventName = eventName.split('.')[0], - stack = $._data($(this.obj).get(0), "events")[normalizedEventName]; - - for (var i = 0; i < stack.length; i++) { - if (stack[i].handler == eventHandler) { - return; - } - } - - this.assert(false); - }); -}; -},{"../../util":16}],6:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = function(should, Assertion) { - - function addLink(name) { - Object.defineProperty(Assertion.prototype, name, { - get: function() { - return this; - } - }); - } - - ['an', 'of', 'a', 'and', 'be', 'have', 'with', 'is', 'which'].forEach(addLink); -}; -},{}],7:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util'), - eql = require('../eql'); - -module.exports = function(should, Assertion) { - var i = should.format; - - Assertion.add('include', function(obj, description) { - if(!Array.isArray(this.obj) && !util.isString(this.obj)) { - this.params = { operator: 'to include an object equal to ' + i(obj), message: description }; - var cmp = {}; - for(var key in obj) cmp[key] = this.obj[key]; - this.assert(eql(cmp, obj)); - } else { - this.params = { operator: 'to include ' + i(obj), message: description }; - - this.assert(~this.obj.indexOf(obj)); - } - }); - - Assertion.add('includeEql', function(obj, description) { - this.params = { operator: 'to include an object equal to ' + i(obj), message: description }; - - this.assert(this.obj.some(function(item) { - return eql(obj, item); - })); - }); -}; -},{"../eql":2,"../util":16}],8:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var eql = require('../eql'); - -module.exports = function(should, Assertion) { - Assertion.add('eql', function(val, description) { - this.params = { operator: 'to equal', expected: val, showDiff: true, message: description }; - - this.assert(eql(val, this.obj)); - }); - - Assertion.add('equal', function(val, description) { - this.params = { operator: 'to be', expected: val, showDiff: true, message: description }; - - this.assert(val === this.obj); - }); - - Assertion.alias('equal', 'exactly'); -}; -},{"../eql":2}],9:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = function(should, Assertion) { - var i = should.format; - - Assertion.add('throw', function(message) { - var fn = this.obj - , err = {} - , errorInfo = '' - , ok = true; - - try { - fn(); - ok = false; - } catch(e) { - err = e; - } - - if(ok) { - if('string' == typeof message) { - ok = message == err.message; - } else if(message instanceof RegExp) { - ok = message.test(err.message); - } else if('function' == typeof message) { - ok = err instanceof message; - } - - if(message && !ok) { - if('string' == typeof message) { - errorInfo = " with a message matching '" + message + "', but got '" + err.message + "'"; - } else if(message instanceof RegExp) { - errorInfo = " with a message matching " + message + ", but got '" + err.message + "'"; - } else if('function' == typeof message) { - errorInfo = " of type " + message.name + ", but got " + err.constructor.name; - } - } else { - errorInfo = " (got " + i(err) + ")"; - } - } - - this.params = { operator: 'to throw exception' + errorInfo }; - - this.assert(ok); - }); - - Assertion.alias('throw', 'throwError'); -}; -},{}],10:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util'), - eql = require('../eql'); - -module.exports = function(should, Assertion) { - var i = should.format; - - Assertion.add('match', function(other, description) { - this.params = { operator: 'to match ' + i(other), message: description }; - - if(!eql(this.obj, other)) { - if(util.isRegExp(other)) { // something - regex - - if(util.isString(this.obj)) { - - this.assert(other.exec(this.obj)); - } else if(Array.isArray(this.obj)) { - - this.obj.forEach(function(item) { - this.assert(other.exec(item));// should we try to convert to String and exec? - }, this); - } else if(util.isObject(this.obj)) { - - var notMatchedProps = [], matchedProps = []; - util.forOwn(this.obj, function(value, name) { - if(other.exec(value)) matchedProps.push(i(name)); - else notMatchedProps.push(i(name)); - }, this); - - if(notMatchedProps.length) - this.params.operator += '\n\tnot matched properties: ' + notMatchedProps.join(', '); - if(matchedProps.length) - this.params.operator += '\n\tmatched properties: ' + matchedProps.join(', '); - - this.assert(notMatchedProps.length == 0); - } // should we try to convert to String and exec? - } else if(util.isFunction(other)) { - var res; - try { - res = other(this.obj); - } catch(e) { - if(e instanceof should.AssertionError) { - this.params.operator += '\n\t' + e.message; - } - throw e; - } - - if(res instanceof Assertion) { - this.params.operator += '\n\t' + res.getMessage(); - } - - //if we throw exception ok - it is used .should inside - if(util.isBoolean(res)) { - this.assert(res); // if it is just boolean function assert on it - } - } else if(util.isObject(other)) { // try to match properties (for Object and Array) - notMatchedProps = []; matchedProps = []; - - util.forOwn(other, function(value, key) { - try { - this.obj[key].should.match(value); - matchedProps.push(key); - } catch(e) { - if(e instanceof should.AssertionError) { - notMatchedProps.push(key); - } else { - throw e; - } - } - }, this); - - if(notMatchedProps.length) - this.params.operator += '\n\tnot matched properties: ' + notMatchedProps.join(', '); - if(matchedProps.length) - this.params.operator += '\n\tmatched properties: ' + matchedProps.join(', '); - - this.assert(notMatchedProps.length == 0); - } else { - this.assert(false); - } - } - }); - - Assertion.add('matchEach', function(other, description) { - this.params = { operator: 'to match each ' + i(other), message: description }; - - var f = other; - - if(util.isRegExp(other)) - f = function(it) { - return !!other.exec(it); - }; - else if(!util.isFunction(other)) - f = function(it) { - return eql(it, other); - }; - - util.forOwn(this.obj, function(value, key) { - var res = f(value, key); - - //if we throw exception ok - it is used .should inside - if(util.isBoolean(res)) { - this.assert(res); // if it is just boolean function assert on it - } - }, this); - }); -}; -},{"../eql":2,"../util":16}],11:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = function(should, Assertion) { - Assertion.add('NaN', function() { - this.params = { operator: 'to be NaN' }; - - this.is.a.Number - .and.assert(isNaN(this.obj)); - }, true); - - Assertion.add('Infinity', function() { - this.params = { operator: 'to be Infinity' }; - - this.is.a.Number - .and.not.a.NaN - .and.assert(!isFinite(this.obj)); - }, true); - - Assertion.add('within', function(start, finish, description) { - this.params = { operator: 'to be within ' + start + '..' + finish, message: description }; - - this.assert(this.obj >= start && this.obj <= finish); - }); - - Assertion.add('approximately', function(value, delta, description) { - this.params = { operator: 'to be approximately ' + value + " ±" + delta, message: description }; - - this.assert(Math.abs(this.obj - value) <= delta); - }); - - Assertion.add('above', function(n, description) { - this.params = { operator: 'to be above ' + n, message: description }; - - this.assert(this.obj > n); - }); - - Assertion.add('below', function(n, description) { - this.params = { operator: 'to be below ' + n, message: description }; - - this.assert(this.obj < n); - }); - - Assertion.alias('above', 'greaterThan'); - Assertion.alias('below', 'lessThan'); - -}; -},{}],12:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util'), - eql = require('../eql'); - -var aSlice = Array.prototype.slice; - -module.exports = function(should, Assertion) { - var i = should.format; - - Assertion.add('property', function(name, val) { - if(arguments.length > 1) { - var p = {}; - p[name] = val; - this.have.properties(p); - } else { - this.have.properties(name); - } - this.obj = this.obj[name]; - }); - - Assertion.add('properties', function(names) { - var values = {}; - if(arguments.length > 1) { - names = aSlice.call(arguments); - } else if(!Array.isArray(names)) { - if(util.isString(names)) { - names = [names]; - } else { - values = names; - names = Object.keys(names); - } - } - - var obj = Object(this.obj), missingProperties = []; - - //just enumerate properties and check if they all present - names.forEach(function(name) { - if(!(name in obj)) missingProperties.push(i(name)); - }); - - var props = missingProperties; - if(props.length === 0) { - props = names.map(i); - } - - var operator = (props.length === 1 ? - 'to have property ' : 'to have properties ') + props.join(', '); - - this.params = { operator: operator }; - - this.assert(missingProperties.length === 0); - - // check if values in object matched expected - var valueCheckNames = Object.keys(values); - if(valueCheckNames.length) { - var wrongValues = []; - props = []; - - // now check values, as there we have all properties - valueCheckNames.forEach(function(name) { - var value = values[name]; - if(!eql(obj[name], value)) { - wrongValues.push(i(name) + ' of ' + i(value) + ' (got ' + i(obj[name]) + ')'); - } else { - props.push(i(name) + ' of ' + i(value)); - } - }); - - if(wrongValues.length > 0) { - props = wrongValues; - } - - operator = (props.length === 1 ? - 'to have property ' : 'to have properties ') + props.join(', '); - - this.params = { operator: operator }; - - this.assert(wrongValues.length === 0); - } - }); - - Assertion.add('length', function(n, description) { - this.have.property('length', n, description); - }); - - Assertion.alias('length', 'lengthOf'); - - var hasOwnProperty = Object.prototype.hasOwnProperty; - - Assertion.add('ownProperty', function(name, description) { - this.params = { operator: 'to have own property ' + i(name), message: description }; - - this.assert(hasOwnProperty.call(this.obj, name)); - - this.obj = this.obj[name]; - }); - - Assertion.alias('hasOwnProperty', 'ownProperty'); - - Assertion.add('empty', function() { - this.params = { operator: 'to be empty' }; - - if(util.isString(this.obj) || Array.isArray(this.obj) || util.isArguments(this.obj)) { - this.have.property('length', 0); - } else { - var obj = Object(this.obj); // wrap to reference for booleans and numbers - for(var prop in obj) { - this.have.not.ownProperty(prop); - } - } - }, true); - - Assertion.add('keys', function(keys) { - if(arguments.length > 1) keys = aSlice.call(arguments); - else if(arguments.length === 1 && util.isString(keys)) keys = [ keys ]; - else if(arguments.length === 0) keys = []; - - var obj = Object(this.obj); - - // first check if some keys are missing - var missingKeys = []; - keys.forEach(function(key) { - if(!hasOwnProperty.call(this.obj, key)) - missingKeys.push(i(key)); - }, this); - - // second check for extra keys - var extraKeys = []; - Object.keys(obj).forEach(function(key) { - if(keys.indexOf(key) < 0) { - extraKeys.push(i(key)); - } - }); - - var verb = keys.length === 0 ? 'to be empty' : - 'to have ' + (keys.length === 1 ? 'key ' : 'keys '); - - this.params = { operator: verb + keys.map(i).join(', ')}; - - if(missingKeys.length > 0) - this.params.operator += '\n\tmissing keys: ' + missingKeys.join(', '); - - if(extraKeys.length > 0) - this.params.operator += '\n\textra keys: ' + extraKeys.join(', '); - - this.assert(missingKeys.length === 0 && extraKeys.length === 0); - }); - - Assertion.alias("keys", "key"); - - Assertion.add('containEql', function(other) { - this.params = { operator: 'to contain ' + i(other) }; - var obj = this.obj; - if(Array.isArray(obj)) { - this.assert(obj.some(function(item) { - return eql(item, other); - })); - } else if(util.isString(obj)) { - // expect obj to be string - this.assert(obj.indexOf(String(other)) >= 0); - } else if(util.isObject(obj)) { - // object contains object case - util.forOwn(other, function(value, key) { - obj[key].should.eql(value); - }); - } else { - //other uncovered cases - this.assert(false); - } - }); - - Assertion.add('containDeep', function(other) { - this.params = { operator: 'to contain ' + i(other) }; - - var obj = this.obj; - if(Array.isArray(obj)) { - if(Array.isArray(other)) { - var otherIdx = 0; - obj.forEach(function(item) { - try { - should(item).not.be.null.and.containDeep(other[otherIdx]); - otherIdx++; - } catch(e) { - if(e instanceof should.AssertionError) { - return; - } - throw e; - } - }); - this.assert(otherIdx == other.length); - //search array contain other as sub sequence - } else { - this.assert(false); - } - } else if(util.isString(obj)) {// expect other to be string - this.assert(obj.indexOf(String(other)) >= 0); - } else if(util.isObject(obj)) {// object contains object case - if(util.isObject(other)) { - util.forOwn(other, function(value, key) { - should(obj[key]).not.be.null.and.containDeep(value); - }); - } else {//one of the properties contain value - this.assert(false); - } - } else { - this.eql(other); - } - }); - -}; -},{"../eql":2,"../util":16}],13:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = function(should, Assertion) { - Assertion.add('startWith', function(str, description) { - this.params = { operator: 'to start with ' + should.format(str), message: description }; - - this.assert(0 === this.obj.indexOf(str)); - }); - - Assertion.add('endWith', function(str, description) { - this.params = { operator: 'to end with ' + should.format(str), message: description }; - - this.assert(this.obj.indexOf(str, this.obj.length - str.length) >= 0); - }); -}; -},{}],14:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util'); - -module.exports = function(should, Assertion) { - Assertion.add('Number', function() { - this.params = { operator: 'to be a number' }; - - this.assert(util.isNumber(this.obj)); - }, true); - - Assertion.add('arguments', function() { - this.params = { operator: 'to be arguments' }; - - this.assert(util.isArguments(this.obj)); - }, true); - - Assertion.add('type', function(type, description) { - this.params = { operator: 'to have type ' + type, message: description }; - - (typeof this.obj).should.be.exactly(type, description); - }); - - Assertion.add('instanceof', function(constructor, description) { - this.params = { operator: 'to be an instance of ' + constructor.name, message: description }; - - this.assert(Object(this.obj) instanceof constructor); - }); - - Assertion.add('Function', function() { - this.params = { operator: 'to be a function' }; - - this.assert(util.isFunction(this.obj)); - }, true); - - Assertion.add('Object', function() { - this.params = { operator: 'to be an object' }; - - this.assert(util.isObject(this.obj)); - }, true); - - Assertion.add('String', function() { - this.params = { operator: 'to be a string' }; - - this.assert(util.isString(this.obj)); - }, true); - - Assertion.add('Array', function() { - this.params = { operator: 'to be an array' }; - - this.assert(Array.isArray(this.obj)); - }, true); - - Assertion.add('Boolean', function() { - this.params = { operator: 'to be a boolean' }; - - this.assert(util.isBoolean(this.obj)); - }, true); - - Assertion.add('Error', function() { - this.params = { operator: 'to be an error' }; - - this.assert(util.isError(this.obj)); - }, true); - - Assertion.add('null', function() { - this.params = { operator: 'to be null' }; - - this.assert(this.obj === null); - }, true); - - Assertion.alias('instanceof', 'instanceOf'); -}; -},{"../util":16}],15:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - - -var util = require('./util') - , AssertionError = util.AssertionError - , inspect = util.inspect; - -/** - * Our function should - * @param obj - * @returns {Assertion} - */ -var should = function(obj) { - return new Assertion(util.isWrapperType(obj) ? obj.valueOf(): obj); -}; - -/** - * Initialize a new `Assertion` with the given _obj_. - * - * @param {*} obj - * @api private - */ - -var Assertion = should.Assertion = function Assertion(obj) { - this.obj = obj; -}; - - -/** - Way to extend Assertion function. It uses some logic - to define only positive assertions and itself rule with negative assertion. - - All actions happen in subcontext and this method take care about negation. - Potentially we can add some more modifiers that does not depends from state of assertion. -*/ -Assertion.add = function(name, f, isGetter) { - var prop = {}; - prop[isGetter ? 'get' : 'value'] = function() { - var context = new Assertion(this.obj); - context.copy = context.copyIfMissing; - - try { - f.apply(context, arguments); - } catch(e) { - //copy data from sub context to this - this.copy(context); - - //check for fail - if(e instanceof should.AssertionError) { - //negative fail - if(this.negate) { - this.obj = context.obj; - this.negate = false; - return this; - } - this.assert(false); - } - // throw if it is another exception - throw e; - } - //copy data from sub context to this - this.copy(context); - if(this.negate) { - this.assert(false); - } - - this.obj = context.obj; - this.negate = false; - return this; - }; - - Object.defineProperty(Assertion.prototype, name, prop); -}; - -Assertion.alias = function(from, to) { - Assertion.prototype[to] = Assertion.prototype[from] -}; - -should.AssertionError = AssertionError; -var i = should.format = function i(value) { - if(util.isDate(value) && typeof value.inspect !== 'function') return value.toISOString(); //show millis in dates - return inspect(value, { depth: null }); -}; - -should.use = function(f) { - f(this, Assertion); - return this; -}; - - -/** - * Expose should to external world. - */ -exports = module.exports = should; - - -/** - * Expose api via `Object#should`. - * - * @api public - */ - -Object.defineProperty(Object.prototype, 'should', { - set: function(){}, - get: function(){ - return should(this); - }, - configurable: true -}); - - -Assertion.prototype = { - constructor: Assertion, - - assert: function(expr) { - if(expr) return; - - var params = this.params; - - var msg = params.message, generatedMessage = false; - if(!msg) { - msg = this.getMessage(); - generatedMessage = true; - } - - var err = new AssertionError({ - message: msg - , actual: this.obj - , expected: params.expected - , stackStartFunction: this.assert - }); - - err.showDiff = params.showDiff; - err.operator = params.operator; - err.generatedMessage = generatedMessage; - - throw err; - }, - - getMessage: function() { - return 'expected ' + i(this.obj) + (this.negate ? ' not ': ' ') + - this.params.operator + ('expected' in this.params ? ' ' + i(this.params.expected) : ''); - }, - - copy: function(other) { - this.params = other.params; - }, - - copyIfMissing: function(other) { - if(!this.params) this.params = other.params; - }, - - - /** - * Negation modifier. - * - * @api public - */ - - get not() { - this.negate = !this.negate; - return this; - } -}; - - -},{"./util":16}],16:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Check if given obj just a primitive type wrapper - * @param {Object} obj - * @returns {boolean} - * @api private - */ -exports.isWrapperType = function(obj) { - return isNumber(obj) || isString(obj) || isBoolean(obj); -}; - -/** - * Merge object b with object a. - * - * var a = { foo: 'bar' } - * , b = { bar: 'baz' }; - * - * utils.merge(a, b); - * // => { foo: 'bar', bar: 'baz' } - * - * @param {Object} a - * @param {Object} b - * @return {Object} - * @api private - */ - -exports.merge = function(a, b){ - if (a && b) { - for (var key in b) { - a[key] = b[key]; - } - } - return a; -}; - -function isNumber(arg) { - return typeof arg === 'number' || arg instanceof Number; -} - -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string' || arg instanceof String; -} - -function isBoolean(arg) { - return typeof arg === 'boolean' || arg instanceof Boolean; -} -exports.isBoolean = isBoolean; - -exports.isString = isString; - -function isBuffer(arg) { - return typeof Buffer !== 'undefined' && arg instanceof Buffer; -} - -exports.isBuffer = isBuffer; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} - -exports.isDate = isDate; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} - -exports.isObject = isObject; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} - -exports.isRegExp = isRegExp; - -function isNullOrUndefined(arg) { - return arg == null; -} - -exports.isNullOrUndefined = isNullOrUndefined; - -function isArguments(object) { - return objectToString(object) === '[object Arguments]'; -} - -exports.isArguments = isArguments; - -exports.isFunction = function(arg) { - return typeof arg === 'function' || arg instanceof Function; -}; - -function isError(e) { - return isObject(e) && objectToString(e) === '[object Error]'; -} -exports.isError = isError; - -exports.inspect = require('util').inspect; - -exports.AssertionError = require('assert').AssertionError; - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -exports.forOwn = function(obj, f, context) { - for(var prop in obj) { - if(hasOwnProperty.call(obj, prop)) { - f.call(context, obj[prop], prop); - } - } -}; -},{"assert":17,"util":20}],17:[function(require,module,exports){ -// http://wiki.commonjs.org/wiki/Unit_Testing/1.0 -// -// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8! -// -// Originally from narwhal.js (http://narwhaljs.org) -// Copyright (c) 2009 Thomas Robinson <280north.com> -// -// 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 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. - -// when used in node, this will actually load the util module we depend on -// versus loading the builtin util module as happens otherwise -// this is a bug in node module loading as far as I am concerned -var util = require('util/'); - -var pSlice = Array.prototype.slice; -var hasOwn = Object.prototype.hasOwnProperty; - -// 1. The assert module provides functions that throw -// AssertionError's when particular conditions are not met. The -// assert module must conform to the following interface. - -var assert = module.exports = ok; - -// 2. The AssertionError is defined in assert. -// new assert.AssertionError({ message: message, -// actual: actual, -// expected: expected }) - -assert.AssertionError = function AssertionError(options) { - this.name = 'AssertionError'; - this.actual = options.actual; - this.expected = options.expected; - this.operator = options.operator; - if (options.message) { - this.message = options.message; - this.generatedMessage = false; - } else { - this.message = getMessage(this); - this.generatedMessage = true; - } - var stackStartFunction = options.stackStartFunction || fail; - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, stackStartFunction); - } - else { - // non v8 browsers so we can have a stacktrace - var err = new Error(); - if (err.stack) { - var out = err.stack; - - // try to strip useless frames - var fn_name = stackStartFunction.name; - var idx = out.indexOf('\n' + fn_name); - if (idx >= 0) { - // once we have located the function frame - // we need to strip out everything before it (and its line) - var next_line = out.indexOf('\n', idx + 1); - out = out.substring(next_line + 1); - } - - this.stack = out; - } - } -}; - -// assert.AssertionError instanceof Error -util.inherits(assert.AssertionError, Error); - -function replacer(key, value) { - if (util.isUndefined(value)) { - return '' + value; - } - if (util.isNumber(value) && (isNaN(value) || !isFinite(value))) { - return value.toString(); - } - if (util.isFunction(value) || util.isRegExp(value)) { - return value.toString(); - } - return value; -} - -function truncate(s, n) { - if (util.isString(s)) { - return s.length < n ? s : s.slice(0, n); - } else { - return s; - } -} - -function getMessage(self) { - return truncate(JSON.stringify(self.actual, replacer), 128) + ' ' + - self.operator + ' ' + - truncate(JSON.stringify(self.expected, replacer), 128); -} - -// At present only the three keys mentioned above are used and -// understood by the spec. Implementations or sub modules can pass -// other keys to the AssertionError's constructor - they will be -// ignored. - -// 3. All of the following functions must throw an AssertionError -// when a corresponding condition is not met, with a message that -// may be undefined if not provided. All assertion methods provide -// both the actual and expected values to the assertion error for -// display purposes. - -function fail(actual, expected, message, operator, stackStartFunction) { - throw new assert.AssertionError({ - message: message, - actual: actual, - expected: expected, - operator: operator, - stackStartFunction: stackStartFunction - }); -} - -// EXTENSION! allows for well behaved errors defined elsewhere. -assert.fail = fail; - -// 4. Pure assertion tests whether a value is truthy, as determined -// by !!guard. -// assert.ok(guard, message_opt); -// This statement is equivalent to assert.equal(true, !!guard, -// message_opt);. To test strictly for the value true, use -// assert.strictEqual(true, guard, message_opt);. - -function ok(value, message) { - if (!value) fail(value, true, message, '==', assert.ok); -} -assert.ok = ok; - -// 5. The equality assertion tests shallow, coercive equality with -// ==. -// assert.equal(actual, expected, message_opt); - -assert.equal = function equal(actual, expected, message) { - if (actual != expected) fail(actual, expected, message, '==', assert.equal); -}; - -// 6. The non-equality assertion tests for whether two objects are not equal -// with != assert.notEqual(actual, expected, message_opt); - -assert.notEqual = function notEqual(actual, expected, message) { - if (actual == expected) { - fail(actual, expected, message, '!=', assert.notEqual); - } -}; - -// 7. The equivalence assertion tests a deep equality relation. -// assert.deepEqual(actual, expected, message_opt); - -assert.deepEqual = function deepEqual(actual, expected, message) { - if (!_deepEqual(actual, expected)) { - fail(actual, expected, message, 'deepEqual', assert.deepEqual); - } -}; - -function _deepEqual(actual, expected) { - // 7.1. All identical values are equivalent, as determined by ===. - if (actual === expected) { - return true; - - } else if (util.isBuffer(actual) && util.isBuffer(expected)) { - if (actual.length != expected.length) return false; - - for (var i = 0; i < actual.length; i++) { - if (actual[i] !== expected[i]) return false; - } - - return true; - - // 7.2. If the expected value is a Date object, the actual value is - // equivalent if it is also a Date object that refers to the same time. - } else if (util.isDate(actual) && util.isDate(expected)) { - return actual.getTime() === expected.getTime(); - - // 7.3 If the expected value is a RegExp object, the actual value is - // equivalent if it is also a RegExp object with the same source and - // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`). - } else if (util.isRegExp(actual) && util.isRegExp(expected)) { - return actual.source === expected.source && - actual.global === expected.global && - actual.multiline === expected.multiline && - actual.lastIndex === expected.lastIndex && - actual.ignoreCase === expected.ignoreCase; - - // 7.4. Other pairs that do not both pass typeof value == 'object', - // equivalence is determined by ==. - } else if (!util.isObject(actual) && !util.isObject(expected)) { - return actual == expected; - - // 7.5 For all other Object pairs, including Array objects, equivalence is - // determined by having the same number of owned properties (as verified - // with Object.prototype.hasOwnProperty.call), the same set of keys - // (although not necessarily the same order), equivalent values for every - // corresponding key, and an identical 'prototype' property. Note: this - // accounts for both named and indexed properties on Arrays. - } else { - return objEquiv(actual, expected); - } -} - -function isArguments(object) { - return Object.prototype.toString.call(object) == '[object Arguments]'; -} - -function objEquiv(a, b) { - if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b)) - return false; - // an identical 'prototype' property. - if (a.prototype !== b.prototype) return false; - //~~~I've managed to break Object.keys through screwy arguments passing. - // Converting to array solves the problem. - if (isArguments(a)) { - if (!isArguments(b)) { - return false; - } - a = pSlice.call(a); - b = pSlice.call(b); - return _deepEqual(a, b); - } - try { - var ka = objectKeys(a), - kb = objectKeys(b), - key, i; - } catch (e) {//happens when one is a string literal and the other isn't - return false; - } - // having the same number of owned properties (keys incorporates - // hasOwnProperty) - if (ka.length != kb.length) - return false; - //the same set of keys (although not necessarily the same order), - ka.sort(); - kb.sort(); - //~~~cheap key test - for (i = ka.length - 1; i >= 0; i--) { - if (ka[i] != kb[i]) - return false; - } - //equivalent values for every corresponding key, and - //~~~possibly expensive deep test - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!_deepEqual(a[key], b[key])) return false; - } - return true; -} - -// 8. The non-equivalence assertion tests for any deep inequality. -// assert.notDeepEqual(actual, expected, message_opt); - -assert.notDeepEqual = function notDeepEqual(actual, expected, message) { - if (_deepEqual(actual, expected)) { - fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual); - } -}; - -// 9. The strict equality assertion tests strict equality, as determined by ===. -// assert.strictEqual(actual, expected, message_opt); - -assert.strictEqual = function strictEqual(actual, expected, message) { - if (actual !== expected) { - fail(actual, expected, message, '===', assert.strictEqual); - } -}; - -// 10. The strict non-equality assertion tests for strict inequality, as -// determined by !==. assert.notStrictEqual(actual, expected, message_opt); - -assert.notStrictEqual = function notStrictEqual(actual, expected, message) { - if (actual === expected) { - fail(actual, expected, message, '!==', assert.notStrictEqual); - } -}; - -function expectedException(actual, expected) { - if (!actual || !expected) { - return false; - } - - if (Object.prototype.toString.call(expected) == '[object RegExp]') { - return expected.test(actual); - } else if (actual instanceof expected) { - return true; - } else if (expected.call({}, actual) === true) { - return true; - } - - return false; -} - -function _throws(shouldThrow, block, expected, message) { - var actual; - - if (util.isString(expected)) { - message = expected; - expected = null; - } - - try { - block(); - } catch (e) { - actual = e; - } - - message = (expected && expected.name ? ' (' + expected.name + ').' : '.') + - (message ? ' ' + message : '.'); - - if (shouldThrow && !actual) { - fail(actual, expected, 'Missing expected exception' + message); - } - - if (!shouldThrow && expectedException(actual, expected)) { - fail(actual, expected, 'Got unwanted exception' + message); - } - - if ((shouldThrow && actual && expected && - !expectedException(actual, expected)) || (!shouldThrow && actual)) { - throw actual; - } -} - -// 11. Expected to throw an error: -// assert.throws(block, Error_opt, message_opt); - -assert.throws = function(block, /*optional*/error, /*optional*/message) { - _throws.apply(this, [true].concat(pSlice.call(arguments))); -}; - -// EXTENSION! This is annoying to write outside this module. -assert.doesNotThrow = function(block, /*optional*/message) { - _throws.apply(this, [false].concat(pSlice.call(arguments))); -}; - -assert.ifError = function(err) { if (err) {throw err;}}; - -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - if (hasOwn.call(obj, key)) keys.push(key); - } - return keys; -}; - -},{"util/":20}],18:[function(require,module,exports){ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} - -},{}],19:[function(require,module,exports){ -module.exports = function isBuffer(arg) { - return arg && typeof arg === 'object' - && typeof arg.copy === 'function' - && typeof arg.fill === 'function' - && typeof arg.readUInt8 === 'function'; -} -},{}],20:[function(require,module,exports){ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var formatRegExp = /%[sdj%]/g; -exports.format = function(f) { - if (!isString(f)) { - var objects = []; - for (var i = 0; i < arguments.length; i++) { - objects.push(inspect(arguments[i])); - } - return objects.join(' '); - } - - var i = 1; - var args = arguments; - var len = args.length; - var str = String(f).replace(formatRegExp, function(x) { - if (x === '%%') return '%'; - if (i >= len) return x; - switch (x) { - case '%s': return String(args[i++]); - case '%d': return Number(args[i++]); - case '%j': - try { - return JSON.stringify(args[i++]); - } catch (_) { - return '[Circular]'; - } - default: - return x; - } - }); - for (var x = args[i]; i < len; x = args[++i]) { - if (isNull(x) || !isObject(x)) { - str += ' ' + x; - } else { - str += ' ' + inspect(x); - } - } - return str; -}; - - -// Mark that a method should not be used. -// Returns a modified function which warns once by default. -// If --no-deprecation is set, then it is a no-op. -exports.deprecate = function(fn, msg) { - // Allow for deprecating things in the process of starting up. - if (isUndefined(global.process)) { - return function() { - return exports.deprecate(fn, msg).apply(this, arguments); - }; - } - - if (process.noDeprecation === true) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (process.throwDeprecation) { - throw new Error(msg); - } else if (process.traceDeprecation) { - console.trace(msg); - } else { - console.error(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -}; - - -var debugs = {}; -var debugEnviron; -exports.debuglog = function(set) { - if (isUndefined(debugEnviron)) - debugEnviron = process.env.NODE_DEBUG || ''; - set = set.toUpperCase(); - if (!debugs[set]) { - if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { - var pid = process.pid; - debugs[set] = function() { - var msg = exports.format.apply(exports, arguments); - console.error('%s %d: %s', set, pid, msg); - }; - } else { - debugs[set] = function() {}; - } - } - return debugs[set]; -}; - - -/** - * Echos the value of a value. Trys to print the value out - * in the best way possible given the different types. - * - * @param {Object} obj The object to print out. - * @param {Object} opts Optional options object that alters the output. - */ -/* legacy: obj, showHidden, depth, colors*/ -function inspect(obj, opts) { - // default options - var ctx = { - seen: [], - stylize: stylizeNoColor - }; - // legacy... - if (arguments.length >= 3) ctx.depth = arguments[2]; - if (arguments.length >= 4) ctx.colors = arguments[3]; - if (isBoolean(opts)) { - // legacy... - ctx.showHidden = opts; - } else if (opts) { - // got an "options" object - exports._extend(ctx, opts); - } - // set default options - if (isUndefined(ctx.showHidden)) ctx.showHidden = false; - if (isUndefined(ctx.depth)) ctx.depth = 2; - if (isUndefined(ctx.colors)) ctx.colors = false; - if (isUndefined(ctx.customInspect)) ctx.customInspect = true; - if (ctx.colors) ctx.stylize = stylizeWithColor; - return formatValue(ctx, obj, ctx.depth); -} -exports.inspect = inspect; - - -// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics -inspect.colors = { - 'bold' : [1, 22], - 'italic' : [3, 23], - 'underline' : [4, 24], - 'inverse' : [7, 27], - 'white' : [37, 39], - 'grey' : [90, 39], - 'black' : [30, 39], - 'blue' : [34, 39], - 'cyan' : [36, 39], - 'green' : [32, 39], - 'magenta' : [35, 39], - 'red' : [31, 39], - 'yellow' : [33, 39] -}; - -// Don't use 'blue' not visible on cmd.exe -inspect.styles = { - 'special': 'cyan', - 'number': 'yellow', - 'boolean': 'yellow', - 'undefined': 'grey', - 'null': 'bold', - 'string': 'green', - 'date': 'magenta', - // "name": intentionally not styling - 'regexp': 'red' -}; - - -function stylizeWithColor(str, styleType) { - var style = inspect.styles[styleType]; - - if (style) { - return '\u001b[' + inspect.colors[style][0] + 'm' + str + - '\u001b[' + inspect.colors[style][1] + 'm'; - } else { - return str; - } -} - - -function stylizeNoColor(str, styleType) { - return str; -} - - -function arrayToHash(array) { - var hash = {}; - - array.forEach(function(val, idx) { - hash[val] = true; - }); - - return hash; -} - - -function formatValue(ctx, value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (ctx.customInspect && - value && - isFunction(value.inspect) && - // Filter out the util module, it's inspect function is special - value.inspect !== exports.inspect && - // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - var ret = value.inspect(recurseTimes, ctx); - if (!isString(ret)) { - ret = formatValue(ctx, ret, recurseTimes); - } - return ret; - } - - // Primitive types cannot have properties - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; - } - - // Look up the keys of the object. - var keys = Object.keys(value); - var visibleKeys = arrayToHash(keys); - - if (ctx.showHidden) { - keys = Object.getOwnPropertyNames(value); - } - - // IE doesn't make error fields non-enumerable - // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx - if (isError(value) - && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { - return formatError(value); - } - - // Some type of object without properties can be shortcutted. - if (keys.length === 0) { - if (isFunction(value)) { - var name = value.name ? ': ' + value.name : ''; - return ctx.stylize('[Function' + name + ']', 'special'); - } - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toString.call(value), 'date'); - } - if (isError(value)) { - return formatError(value); - } - } - - var base = '', array = false, braces = ['{', '}']; - - // Make Array say that they are Array - if (isArray(value)) { - array = true; - braces = ['[', ']']; - } - - // Make functions say that they are functions - if (isFunction(value)) { - var n = value.name ? ': ' + value.name : ''; - base = ' [Function' + n + ']'; - } - - // Make RegExps say that they are RegExps - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } - - // Make error with message first say the error - if (isError(value)) { - base = ' ' + formatError(value); - } - - if (keys.length === 0 && (!array || value.length == 0)) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } else { - return ctx.stylize('[Object]', 'special'); - } - } - - ctx.seen.push(value); - - var output; - if (array) { - output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); - } else { - output = keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }); - } - - ctx.seen.pop(); - - return reduceToSingleString(output, base, braces); -} - - -function formatPrimitive(ctx, value) { - if (isUndefined(value)) - return ctx.stylize('undefined', 'undefined'); - if (isString(value)) { - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); - } - if (isNumber(value)) - return ctx.stylize('' + value, 'number'); - if (isBoolean(value)) - return ctx.stylize('' + value, 'boolean'); - // For some reason typeof null is "object", so special case here. - if (isNull(value)) - return ctx.stylize('null', 'null'); -} - - -function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; -} - - -function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - var output = []; - for (var i = 0, l = value.length; i < l; ++i) { - if (hasOwnProperty(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); - } else { - output.push(''); - } - } - keys.forEach(function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; -} - - -function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str, desc; - desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; - if (desc.get) { - if (desc.set) { - str = ctx.stylize('[Getter/Setter]', 'special'); - } else { - str = ctx.stylize('[Getter]', 'special'); - } - } else { - if (desc.set) { - str = ctx.stylize('[Setter]', 'special'); - } - } - if (!hasOwnProperty(visibleKeys, key)) { - name = '[' + key + ']'; - } - if (!str) { - if (ctx.seen.indexOf(desc.value) < 0) { - if (isNull(recurseTimes)) { - str = formatValue(ctx, desc.value, null); - } else { - str = formatValue(ctx, desc.value, recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (array) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = ctx.stylize('[Circular]', 'special'); - } - } - if (isUndefined(name)) { - if (array && key.match(/^\d+$/)) { - return str; - } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = ctx.stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = ctx.stylize(name, 'string'); - } - } - - return name + ': ' + str; -} - - -function reduceToSingleString(output, base, braces) { - var numLinesEst = 0; - var length = output.reduce(function(prev, cur) { - numLinesEst++; - if (cur.indexOf('\n') >= 0) numLinesEst++; - return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0); - - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } - - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; -} - - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. -function isArray(ar) { - return Array.isArray(ar); -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return isObject(e) && - (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = require('./support/isBuffer'); - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - - -function pad(n) { - return n < 10 ? '0' + n.toString(10) : n.toString(10); -} - - -var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', - 'Oct', 'Nov', 'Dec']; - -// 26 Feb 16:19:34 -function timestamp() { - var d = new Date(); - var time = [pad(d.getHours()), - pad(d.getMinutes()), - pad(d.getSeconds())].join(':'); - return [d.getDate(), months[d.getMonth()], time].join(' '); -} - - -// log is just a thin wrapper to console.log that prepends a timestamp -exports.log = function() { - console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); -}; - - -/** - * Inherit the prototype methods from one constructor into another. - * - * The Function.prototype.inherits from lang.js rewritten as a standalone - * function (not on Function.prototype). NOTE: If this file is to be loaded - * during bootstrapping this function needs to be rewritten using some native - * functions as prototype setup using normal JavaScript does not work as - * expected during bootstrapping (see mirror.js in r114903). - * - * @param {function} ctor Constructor function which needs to inherit the - * prototype. - * @param {function} superCtor Constructor function to inherit prototype from. - */ -exports.inherits = require('inherits'); - -exports._extend = function(origin, add) { - // Don't do anything if add isn't an object - if (!add || !isObject(add)) return origin; - - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; -}; - -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -},{"./support/isBuffer":19,"inherits":18}]},{},[1]) -(1) -}); \ No newline at end of file diff --git a/node_modules/should/should.js.for-tests b/node_modules/should/should.js.for-tests deleted file mode 100644 index 44160f8d..00000000 --- a/node_modules/should/should.js.for-tests +++ /dev/null @@ -1,2321 +0,0 @@ -!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Should=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o - * MIT Licensed - */ - -var should = require('./should'); - -should - .use(require('./ext/assert')) - .use(require('./ext/chain')) - .use(require('./ext/bool')) - .use(require('./ext/number')) - .use(require('./ext/eql')) - .use(require('./ext/type')) - .use(require('./ext/string')) - .use(require('./ext/property')) - .use(require('./ext/error')) - .use(require('./ext/match')) - .use(require('./ext/browser/jquery')) - .use(require('./ext/deprecated')); - - module.exports = should; -},{"./ext/assert":3,"./ext/bool":4,"./ext/browser/jquery":5,"./ext/chain":6,"./ext/deprecated":7,"./ext/eql":8,"./ext/error":9,"./ext/match":10,"./ext/number":11,"./ext/property":12,"./ext/string":13,"./ext/type":14,"./should":15}],2:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -// Taken from node's assert module, because it sucks -// and exposes next to nothing useful. -var util = require('./util'); - -module.exports = _deepEqual; - -var pSlice = Array.prototype.slice; - -function _deepEqual(actual, expected) { - // 7.1. All identical values are equivalent, as determined by ===. - if (actual === expected) { - return true; - - } else if (util.isBuffer(actual) && util.isBuffer(expected)) { - if (actual.length != expected.length) return false; - - for (var i = 0; i < actual.length; i++) { - if (actual[i] !== expected[i]) return false; - } - - return true; - - // 7.2. If the expected value is a Date object, the actual value is - // equivalent if it is also a Date object that refers to the same time. - } else if (util.isDate(actual) && util.isDate(expected)) { - return actual.getTime() === expected.getTime(); - - // 7.3 If the expected value is a RegExp object, the actual value is - // equivalent if it is also a RegExp object with the same source and - // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`). - } else if (util.isRegExp(actual) && util.isRegExp(expected)) { - return actual.source === expected.source && - actual.global === expected.global && - actual.multiline === expected.multiline && - actual.lastIndex === expected.lastIndex && - actual.ignoreCase === expected.ignoreCase; - - // 7.4. Other pairs that do not both pass typeof value == 'object', - // equivalence is determined by ==. - } else if (!util.isObject(actual) && !util.isObject(expected)) { - return actual == expected; - - // 7.5 For all other Object pairs, including Array objects, equivalence is - // determined by having the same number of owned properties (as verified - // with Object.prototype.hasOwnProperty.call), the same set of keys - // (although not necessarily the same order), equivalent values for every - // corresponding key, and an identical 'prototype' property. Note: this - // accounts for both named and indexed properties on Arrays. - } else { - return objEquiv(actual, expected); - } -} - - -function objEquiv (a, b) { - if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b)) - return false; - // an identical 'prototype' property. - if (a.prototype !== b.prototype) return false; - //~~~I've managed to break Object.keys through screwy arguments passing. - // Converting to array solves the problem. - if (util.isArguments(a)) { - if (!util.isArguments(b)) { - return false; - } - a = pSlice.call(a); - b = pSlice.call(b); - return _deepEqual(a, b); - } - try{ - var ka = Object.keys(a), - kb = Object.keys(b), - key, i; - } catch (e) {//happens when one is a string literal and the other isn't - return false; - } - // having the same number of owned properties (keys incorporates - // hasOwnProperty) - if (ka.length != kb.length) - return false; - //the same set of keys (although not necessarily the same order), - ka.sort(); - kb.sort(); - //~~~cheap key test - for (i = ka.length - 1; i >= 0; i--) { - if (ka[i] != kb[i]) - return false; - } - //equivalent values for every corresponding key, and - //~~~possibly expensive deep test - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!_deepEqual(a[key], b[key])) return false; - } - return true; -} - -},{"./util":16}],3:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util') - , assert = require('assert') - , AssertionError = assert.AssertionError; - -module.exports = function(should) { - var i = should.format; - - /** - * Expose assert to should - * - * This allows you to do things like below - * without require()ing the assert module. - * - * should.equal(foo.bar, undefined); - * - */ - util.merge(should, assert); - - - /** - * Assert _obj_ exists, with optional message. - * - * @param {*} obj - * @param {String} [msg] - * @api public - */ - should.exist = should.exists = function(obj, msg) { - if(null == obj) { - throw new AssertionError({ - message: msg || ('expected ' + i(obj) + ' to exist'), stackStartFunction: should.exist - }); - } - }; - - /** - * Asserts _obj_ does not exist, with optional message. - * - * @param {*} obj - * @param {String} [msg] - * @api public - */ - - should.not = {}; - should.not.exist = should.not.exists = function(obj, msg) { - if(null != obj) { - throw new AssertionError({ - message: msg || ('expected ' + i(obj) + ' to not exist'), stackStartFunction: should.not.exist - }); - } - }; -}; -},{"../util":16,"assert":17}],4:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = function(should, Assertion) { - Assertion.add('true', function() { - this.is.exactly(true) - }, true); - - Assertion.add('false', function() { - this.is.exactly(false) - }, true); - - Assertion.add('ok', function() { - this.params = { operator: 'to be truthy' }; - - this.assert(this.obj); - }, true); -}; -},{}],5:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -/*! - * Portions copyright (c) 2010, 2011, 2012 Wojciech Zawistowski, Travis Jeffery - * From the jasmine-jquery project under the MIT License. - */ - -var util = require('../../util'); - -module.exports = function(should, Assertion) { - var i = should.format; - var $ = this.jQuery || this.$; - - /* Otherwise, node's util.inspect loops hangs */ - if (typeof HTMLElement !== "undefined" && HTMLElement && !HTMLElement.prototype.inspect) { - HTMLElement.prototype.inspect = function () { - return this.outerHTML; - }; - } - - if (typeof jQuery !== "undefined" && jQuery && !jQuery.prototype.inspect) { - jQuery.fn.inspect = function () { - var elementList = this.toArray().map(function (e) { - return util.inspect(e); - }).join(", "); - if (this.selector) { - return "SELECTOR(" + this.selector + ") matching " + this.length + " elements" + (elementList.length ? ": " + elementList : ""); - } else { - return elementList; - } - }; - } - - function jQueryAttributeTestHelper(method, singular, plural, nameOrHash, value) { - var keys = util.isObject(nameOrHash) ? Object.keys(nameOrHash) : [nameOrHash]; - var allRelevantAttributes = keys.reduce(function (memo, key) { - var value = $(this.obj)[method](key); - if (typeof value !== 'undefined') { - memo[key] = value; - } - return memo; - }.bind(this), {}); - - if (arguments.length === 4 && util.isObject(nameOrHash)) { - this.params = { operator: 'to have ' + plural + ' ' + i(nameOrHash) }; - allRelevantAttributes.should.have.properties(nameOrHash); - } else if (arguments.length === 4) { - this.params = { operator: 'to have ' + singular + ' ' + i(nameOrHash) }; - allRelevantAttributes.should.have.property(nameOrHash); - } else { - this.params = { operator: 'to have ' + singular + ' ' + i(nameOrHash) + ' with value ' + i(value) }; - allRelevantAttributes.should.have.property(nameOrHash, value); - } - } - - var browserTagCaseIndependentHtml = function (html) { - return $('
        ').append(html).html(); - }; - - var addJqPredicateAssertion = function (predicate, nameOverride, operatorOverride) { - Assertion.add(nameOverride || predicate, function() { - this.params = { operator: 'to be ' + (operatorOverride || predicate) }; - this.assert($(this.obj).is(':' + predicate)); - }, true); - } - - Assertion.add('className', function(className) { - this.params = { operator: 'to have class ' + className }; - this.assert($(this.obj).hasClass(className)); - }); - - Assertion.add('css', function(css) { - this.params = { operator: 'to have css ' + i(css) }; - for (var prop in css) { - var value = css[prop]; - if (value === 'auto' && $(this.obj).get(0).style[prop] === 'auto') { - continue; - } - $(this.obj).css(prop).should.eql(value); - } - }); - - addJqPredicateAssertion('visible'); - addJqPredicateAssertion('hidden'); - addJqPredicateAssertion('selected'); - addJqPredicateAssertion('checked'); - addJqPredicateAssertion('disabled'); - addJqPredicateAssertion('empty', 'emptyJq'); - addJqPredicateAssertion('focus', 'focused', 'focused'); - - Assertion.add('inDOM', function() { - this.params = { operator: 'to be in the DOM' }; - this.assert($.contains(document.documentElement, $(this.obj)[0])); - }, true); - - Assertion.add('exist', function() { - this.params = { operator: 'to exist' }; - $(this.obj).should.not.have.length(0); - }, true); - - Assertion.add('attr', function() { - var args = [ - 'attr', - 'attribute', - 'attributes' - ].concat(Array.prototype.slice.call(arguments, 0)); - jQueryAttributeTestHelper.apply(this, args); - }); - - Assertion.add('prop', function() { - var args = [ - 'prop', - 'property', - 'properties' - ].concat(Array.prototype.slice.call(arguments, 0)); - jQueryAttributeTestHelper.apply(this, args); - }); - - Assertion.add('elementId', function(id) { - this.params = { operator: 'to have ID ' + i(id) }; - this.obj.should.have.attr('id', id); - }); - - Assertion.add('html', function(html) { - this.params = { operator: 'to have HTML ' + i(html) }; - $(this.obj).html().should.eql(browserTagCaseIndependentHtml(html)); - }); - - Assertion.add('containHtml', function(html) { - this.params = { operator: 'to contain HTML ' + i(html) }; - $(this.obj).html().indexOf(browserTagCaseIndependentHtml(html)).should.be.above(-1); - }); - - Assertion.add('text', function(text) { - this.params = { operator: 'to have text ' + i(text) }; - var trimmedText = $.trim($(this.obj).text()); - - if (util.isRegExp(text)) { - trimmedText.should.match(text); - } else { - trimmedText.should.eql(text); - } - }); - - Assertion.add('containText', function(text) { - this.params = { operator: 'to contain text ' + i(text) }; - var trimmedText = $.trim($(this.obj).text()); - - if (util.isRegExp(text)) { - trimmedText.should.match(text); - } else { - trimmedText.indexOf(text).should.be.above(-1); - } - }); - - Assertion.add('value', function(val) { - this.params = { operator: 'to have value ' + i(val) }; - $(this.obj).val().should.eql(val); - }); - - Assertion.add('data', function() { - var args = [ - 'data', - 'data', - 'data' - ].concat(Array.prototype.slice.call(arguments, 0)); - jQueryAttributeTestHelper.apply(this, args); - }); - - Assertion.add('containElement', function(target) { - this.params = { operator: 'to contain ' + $(target).inspect() }; - $(this.obj).find(target).should.not.have.length(0); - }); - - Assertion.add('matchedBy', function(selector) { - this.params = { operator: 'to be matched by selector ' + selector }; - $(this.obj).filter(selector).should.not.have.length(0); - }); - - Assertion.add('handle', function(event) { - this.params = { operator: 'to handle ' + event }; - - var events = $._data($(this.obj).get(0), "events"); - - if (!events || !event || typeof event !== "string") { - return this.assert(false); - } - - var namespaces = event.split("."), - eventType = namespaces.shift(), - sortedNamespaces = namespaces.slice(0).sort(), - namespaceRegExp = new RegExp("(^|\\.)" + sortedNamespaces.join("\\.(?:.*\\.)?") + "(\\.|$)"); - - if (events[eventType] && namespaces.length) { - for (var i = 0; i < events[eventType].length; i++) { - var namespace = events[eventType][i].namespace; - - if (namespaceRegExp.test(namespace)) { - return; - } - } - } else { - events.should.have.property(eventType); - events[eventType].should.not.have.length(0); - return; - } - - this.assert(false); - }); - - Assertion.add('handleWith', function(eventName, eventHandler) { - this.params = { operator: 'to handle ' + eventName + ' with ' + eventHandler }; - - var normalizedEventName = eventName.split('.')[0], - stack = $._data($(this.obj).get(0), "events")[normalizedEventName]; - - for (var i = 0; i < stack.length; i++) { - if (stack[i].handler == eventHandler) { - return; - } - } - - this.assert(false); - }); -}; -},{"../../util":16}],6:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = function(should, Assertion) { - - function addLink(name) { - Object.defineProperty(Assertion.prototype, name, { - get: function() { - return this; - } - }); - } - - ['an', 'of', 'a', 'and', 'be', 'have', 'with', 'is', 'which'].forEach(addLink); -}; -},{}],7:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util'), - eql = require('../eql'); - -module.exports = function(should, Assertion) { - var i = should.format; - - Assertion.add('include', function(obj, description) { - if(!Array.isArray(this.obj) && !util.isString(this.obj)) { - this.params = { operator: 'to include an object equal to ' + i(obj), message: description }; - var cmp = {}; - for(var key in obj) cmp[key] = this.obj[key]; - this.assert(eql(cmp, obj)); - } else { - this.params = { operator: 'to include ' + i(obj), message: description }; - - this.assert(~this.obj.indexOf(obj)); - } - }); - - Assertion.add('includeEql', function(obj, description) { - this.params = { operator: 'to include an object equal to ' + i(obj), message: description }; - - this.assert(this.obj.some(function(item) { - return eql(obj, item); - })); - }); -}; -},{"../eql":2,"../util":16}],8:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var eql = require('../eql'); - -module.exports = function(should, Assertion) { - Assertion.add('eql', function(val, description) { - this.params = { operator: 'to equal', expected: val, showDiff: true, message: description }; - - this.assert(eql(val, this.obj)); - }); - - Assertion.add('equal', function(val, description) { - this.params = { operator: 'to be', expected: val, showDiff: true, message: description }; - - this.assert(val === this.obj); - }); - - Assertion.alias('equal', 'exactly'); -}; -},{"../eql":2}],9:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = function(should, Assertion) { - var i = should.format; - - Assertion.add('throw', function(message) { - var fn = this.obj - , err = {} - , errorInfo = '' - , ok = true; - - try { - fn(); - ok = false; - } catch(e) { - err = e; - } - - if(ok) { - if('string' == typeof message) { - ok = message == err.message; - } else if(message instanceof RegExp) { - ok = message.test(err.message); - } else if('function' == typeof message) { - ok = err instanceof message; - } - - if(message && !ok) { - if('string' == typeof message) { - errorInfo = " with a message matching '" + message + "', but got '" + err.message + "'"; - } else if(message instanceof RegExp) { - errorInfo = " with a message matching " + message + ", but got '" + err.message + "'"; - } else if('function' == typeof message) { - errorInfo = " of type " + message.name + ", but got " + err.constructor.name; - } - } else { - errorInfo = " (got " + i(err) + ")"; - } - } - - this.params = { operator: 'to throw exception' + errorInfo }; - - this.assert(ok); - }); - - Assertion.alias('throw', 'throwError'); -}; -},{}],10:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util'), - eql = require('../eql'); - -module.exports = function(should, Assertion) { - var i = should.format; - - Assertion.add('match', function(other, description) { - this.params = { operator: 'to match ' + i(other), message: description }; - - if(!eql(this.obj, other)) { - if(util.isRegExp(other)) { // something - regex - - if(util.isString(this.obj)) { - - this.assert(other.exec(this.obj)); - } else if(Array.isArray(this.obj)) { - - this.obj.forEach(function(item) { - this.assert(other.exec(item));// should we try to convert to String and exec? - }, this); - } else if(util.isObject(this.obj)) { - - var notMatchedProps = [], matchedProps = []; - util.forOwn(this.obj, function(value, name) { - if(other.exec(value)) matchedProps.push(i(name)); - else notMatchedProps.push(i(name)); - }, this); - - if(notMatchedProps.length) - this.params.operator += '\n\tnot matched properties: ' + notMatchedProps.join(', '); - if(matchedProps.length) - this.params.operator += '\n\tmatched properties: ' + matchedProps.join(', '); - - this.assert(notMatchedProps.length == 0); - } // should we try to convert to String and exec? - } else if(util.isFunction(other)) { - var res; - try { - res = other(this.obj); - } catch(e) { - if(e instanceof should.AssertionError) { - this.params.operator += '\n\t' + e.message; - } - throw e; - } - - if(res instanceof Assertion) { - this.params.operator += '\n\t' + res.getMessage(); - } - - //if we throw exception ok - it is used .should inside - if(util.isBoolean(res)) { - this.assert(res); // if it is just boolean function assert on it - } - } else if(util.isObject(other)) { // try to match properties (for Object and Array) - notMatchedProps = []; matchedProps = []; - - util.forOwn(other, function(value, key) { - try { - this.obj[key].should.match(value); - matchedProps.push(key); - } catch(e) { - if(e instanceof should.AssertionError) { - notMatchedProps.push(key); - } else { - throw e; - } - } - }, this); - - if(notMatchedProps.length) - this.params.operator += '\n\tnot matched properties: ' + notMatchedProps.join(', '); - if(matchedProps.length) - this.params.operator += '\n\tmatched properties: ' + matchedProps.join(', '); - - this.assert(notMatchedProps.length == 0); - } else { - this.assert(false); - } - } - }); - - Assertion.add('matchEach', function(other, description) { - this.params = { operator: 'to match each ' + i(other), message: description }; - - var f = other; - - if(util.isRegExp(other)) - f = function(it) { - return !!other.exec(it); - }; - else if(!util.isFunction(other)) - f = function(it) { - return eql(it, other); - }; - - util.forOwn(this.obj, function(value, key) { - var res = f(value, key); - - //if we throw exception ok - it is used .should inside - if(util.isBoolean(res)) { - this.assert(res); // if it is just boolean function assert on it - } - }, this); - }); -}; -},{"../eql":2,"../util":16}],11:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = function(should, Assertion) { - Assertion.add('NaN', function() { - this.params = { operator: 'to be NaN' }; - - this.is.a.Number - .and.assert(isNaN(this.obj)); - }, true); - - Assertion.add('Infinity', function() { - this.params = { operator: 'to be Infinity' }; - - this.is.a.Number - .and.not.a.NaN - .and.assert(!isFinite(this.obj)); - }, true); - - Assertion.add('within', function(start, finish, description) { - this.params = { operator: 'to be within ' + start + '..' + finish, message: description }; - - this.assert(this.obj >= start && this.obj <= finish); - }); - - Assertion.add('approximately', function(value, delta, description) { - this.params = { operator: 'to be approximately ' + value + " ±" + delta, message: description }; - - this.assert(Math.abs(this.obj - value) <= delta); - }); - - Assertion.add('above', function(n, description) { - this.params = { operator: 'to be above ' + n, message: description }; - - this.assert(this.obj > n); - }); - - Assertion.add('below', function(n, description) { - this.params = { operator: 'to be below ' + n, message: description }; - - this.assert(this.obj < n); - }); - - Assertion.alias('above', 'greaterThan'); - Assertion.alias('below', 'lessThan'); - -}; -},{}],12:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util'), - eql = require('../eql'); - -var aSlice = Array.prototype.slice; - -module.exports = function(should, Assertion) { - var i = should.format; - - Assertion.add('property', function(name, val) { - if(arguments.length > 1) { - var p = {}; - p[name] = val; - this.have.properties(p); - } else { - this.have.properties(name); - } - this.obj = this.obj[name]; - }); - - Assertion.add('properties', function(names) { - var values = {}; - if(arguments.length > 1) { - names = aSlice.call(arguments); - } else if(!Array.isArray(names)) { - if(util.isString(names)) { - names = [names]; - } else { - values = names; - names = Object.keys(names); - } - } - - var obj = Object(this.obj), missingProperties = []; - - //just enumerate properties and check if they all present - names.forEach(function(name) { - if(!(name in obj)) missingProperties.push(i(name)); - }); - - var props = missingProperties; - if(props.length === 0) { - props = names.map(i); - } - - var operator = (props.length === 1 ? - 'to have property ' : 'to have properties ') + props.join(', '); - - this.params = { operator: operator }; - - this.assert(missingProperties.length === 0); - - // check if values in object matched expected - var valueCheckNames = Object.keys(values); - if(valueCheckNames.length) { - var wrongValues = []; - props = []; - - // now check values, as there we have all properties - valueCheckNames.forEach(function(name) { - var value = values[name]; - if(!eql(obj[name], value)) { - wrongValues.push(i(name) + ' of ' + i(value) + ' (got ' + i(obj[name]) + ')'); - } else { - props.push(i(name) + ' of ' + i(value)); - } - }); - - if(wrongValues.length > 0) { - props = wrongValues; - } - - operator = (props.length === 1 ? - 'to have property ' : 'to have properties ') + props.join(', '); - - this.params = { operator: operator }; - - this.assert(wrongValues.length === 0); - } - }); - - Assertion.add('length', function(n, description) { - this.have.property('length', n, description); - }); - - Assertion.alias('length', 'lengthOf'); - - var hasOwnProperty = Object.prototype.hasOwnProperty; - - Assertion.add('ownProperty', function(name, description) { - this.params = { operator: 'to have own property ' + i(name), message: description }; - - this.assert(hasOwnProperty.call(this.obj, name)); - - this.obj = this.obj[name]; - }); - - Assertion.alias('hasOwnProperty', 'ownProperty'); - - Assertion.add('empty', function() { - this.params = { operator: 'to be empty' }; - - if(util.isString(this.obj) || Array.isArray(this.obj) || util.isArguments(this.obj)) { - this.have.property('length', 0); - } else { - var obj = Object(this.obj); // wrap to reference for booleans and numbers - for(var prop in obj) { - this.have.not.ownProperty(prop); - } - } - }, true); - - Assertion.add('keys', function(keys) { - if(arguments.length > 1) keys = aSlice.call(arguments); - else if(arguments.length === 1 && util.isString(keys)) keys = [ keys ]; - else if(arguments.length === 0) keys = []; - - var obj = Object(this.obj); - - // first check if some keys are missing - var missingKeys = []; - keys.forEach(function(key) { - if(!hasOwnProperty.call(this.obj, key)) - missingKeys.push(i(key)); - }, this); - - // second check for extra keys - var extraKeys = []; - Object.keys(obj).forEach(function(key) { - if(keys.indexOf(key) < 0) { - extraKeys.push(i(key)); - } - }); - - var verb = keys.length === 0 ? 'to be empty' : - 'to have ' + (keys.length === 1 ? 'key ' : 'keys '); - - this.params = { operator: verb + keys.map(i).join(', ')}; - - if(missingKeys.length > 0) - this.params.operator += '\n\tmissing keys: ' + missingKeys.join(', '); - - if(extraKeys.length > 0) - this.params.operator += '\n\textra keys: ' + extraKeys.join(', '); - - this.assert(missingKeys.length === 0 && extraKeys.length === 0); - }); - - Assertion.alias("keys", "key"); - - Assertion.add('containEql', function(other) { - this.params = { operator: 'to contain ' + i(other) }; - var obj = this.obj; - if(Array.isArray(obj)) { - this.assert(obj.some(function(item) { - return eql(item, other); - })); - } else if(util.isString(obj)) { - // expect obj to be string - this.assert(obj.indexOf(String(other)) >= 0); - } else if(util.isObject(obj)) { - // object contains object case - util.forOwn(other, function(value, key) { - obj[key].should.eql(value); - }); - } else { - //other uncovered cases - this.assert(false); - } - }); - - Assertion.add('containDeep', function(other) { - this.params = { operator: 'to contain ' + i(other) }; - - var obj = this.obj; - if(Array.isArray(obj)) { - if(Array.isArray(other)) { - var otherIdx = 0; - obj.forEach(function(item) { - try { - should(item).not.be.null.and.containDeep(other[otherIdx]); - otherIdx++; - } catch(e) { - if(e instanceof should.AssertionError) { - return; - } - throw e; - } - }); - this.assert(otherIdx == other.length); - //search array contain other as sub sequence - } else { - this.assert(false); - } - } else if(util.isString(obj)) {// expect other to be string - this.assert(obj.indexOf(String(other)) >= 0); - } else if(util.isObject(obj)) {// object contains object case - if(util.isObject(other)) { - util.forOwn(other, function(value, key) { - should(obj[key]).not.be.null.and.containDeep(value); - }); - } else {//one of the properties contain value - this.assert(false); - } - } else { - this.eql(other); - } - }); - -}; -},{"../eql":2,"../util":16}],13:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -module.exports = function(should, Assertion) { - Assertion.add('startWith', function(str, description) { - this.params = { operator: 'to start with ' + should.format(str), message: description }; - - this.assert(0 === this.obj.indexOf(str)); - }); - - Assertion.add('endWith', function(str, description) { - this.params = { operator: 'to end with ' + should.format(str), message: description }; - - this.assert(this.obj.indexOf(str, this.obj.length - str.length) >= 0); - }); -}; -},{}],14:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -var util = require('../util'); - -module.exports = function(should, Assertion) { - Assertion.add('Number', function() { - this.params = { operator: 'to be a number' }; - - this.assert(util.isNumber(this.obj)); - }, true); - - Assertion.add('arguments', function() { - this.params = { operator: 'to be arguments' }; - - this.assert(util.isArguments(this.obj)); - }, true); - - Assertion.add('type', function(type, description) { - this.params = { operator: 'to have type ' + type, message: description }; - - (typeof this.obj).should.be.exactly(type, description); - }); - - Assertion.add('instanceof', function(constructor, description) { - this.params = { operator: 'to be an instance of ' + constructor.name, message: description }; - - this.assert(Object(this.obj) instanceof constructor); - }); - - Assertion.add('Function', function() { - this.params = { operator: 'to be a function' }; - - this.assert(util.isFunction(this.obj)); - }, true); - - Assertion.add('Object', function() { - this.params = { operator: 'to be an object' }; - - this.assert(util.isObject(this.obj)); - }, true); - - Assertion.add('String', function() { - this.params = { operator: 'to be a string' }; - - this.assert(util.isString(this.obj)); - }, true); - - Assertion.add('Array', function() { - this.params = { operator: 'to be an array' }; - - this.assert(Array.isArray(this.obj)); - }, true); - - Assertion.add('Boolean', function() { - this.params = { operator: 'to be a boolean' }; - - this.assert(util.isBoolean(this.obj)); - }, true); - - Assertion.add('Error', function() { - this.params = { operator: 'to be an error' }; - - this.assert(util.isError(this.obj)); - }, true); - - Assertion.add('null', function() { - this.params = { operator: 'to be null' }; - - this.assert(this.obj === null); - }, true); - - Assertion.alias('instanceof', 'instanceOf'); -}; -},{"../util":16}],15:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - - -var util = require('./util') - , AssertionError = util.AssertionError - , inspect = util.inspect; - -/** - * Our function should - * @param obj - * @returns {Assertion} - */ -var should = function(obj) { - return new Assertion(util.isWrapperType(obj) ? obj.valueOf(): obj); -}; - -/** - * Initialize a new `Assertion` with the given _obj_. - * - * @param {*} obj - * @api private - */ - -var Assertion = should.Assertion = function Assertion(obj) { - this.obj = obj; -}; - - -/** - Way to extend Assertion function. It uses some logic - to define only positive assertions and itself rule with negative assertion. - - All actions happen in subcontext and this method take care about negation. - Potentially we can add some more modifiers that does not depends from state of assertion. -*/ -Assertion.add = function(name, f, isGetter) { - var prop = {}; - prop[isGetter ? 'get' : 'value'] = function() { - var context = new Assertion(this.obj); - context.copy = context.copyIfMissing; - - try { - f.apply(context, arguments); - } catch(e) { - //copy data from sub context to this - this.copy(context); - - //check for fail - if(e instanceof should.AssertionError) { - //negative fail - if(this.negate) { - this.obj = context.obj; - this.negate = false; - return this; - } - this.assert(false); - } - // throw if it is another exception - throw e; - } - //copy data from sub context to this - this.copy(context); - if(this.negate) { - this.assert(false); - } - - this.obj = context.obj; - this.negate = false; - return this; - }; - - Object.defineProperty(Assertion.prototype, name, prop); -}; - -Assertion.alias = function(from, to) { - Assertion.prototype[to] = Assertion.prototype[from] -}; - -should.AssertionError = AssertionError; -var i = should.format = function i(value) { - if(util.isDate(value) && typeof value.inspect !== 'function') return value.toISOString(); //show millis in dates - return inspect(value, { depth: null }); -}; - -should.use = function(f) { - f(this, Assertion); - return this; -}; - - -/** - * Expose should to external world. - */ -exports = module.exports = should; - - -/** - * Expose api via `Object#should`. - * - * @api public - */ - -Object.defineProperty(Object.prototype, 'should', { - set: function(){}, - get: function(){ - return should(this); - }, - configurable: true -}); - - -Assertion.prototype = { - constructor: Assertion, - - assert: function(expr) { - if(expr) return; - - var params = this.params; - - var msg = params.message, generatedMessage = false; - if(!msg) { - msg = this.getMessage(); - generatedMessage = true; - } - - var err = new AssertionError({ - message: msg - , actual: this.obj - , expected: params.expected - , stackStartFunction: this.assert - }); - - err.showDiff = params.showDiff; - err.operator = params.operator; - err.generatedMessage = generatedMessage; - - throw err; - }, - - getMessage: function() { - return 'expected ' + i(this.obj) + (this.negate ? ' not ': ' ') + - this.params.operator + ('expected' in this.params ? ' ' + i(this.params.expected) : ''); - }, - - copy: function(other) { - this.params = other.params; - }, - - copyIfMissing: function(other) { - if(!this.params) this.params = other.params; - }, - - - /** - * Negation modifier. - * - * @api public - */ - - get not() { - this.negate = !this.negate; - return this; - } -}; - - -},{"./util":16}],16:[function(require,module,exports){ -/*! - * Should - * Copyright(c) 2010-2014 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Check if given obj just a primitive type wrapper - * @param {Object} obj - * @returns {boolean} - * @api private - */ -exports.isWrapperType = function(obj) { - return isNumber(obj) || isString(obj) || isBoolean(obj); -}; - -/** - * Merge object b with object a. - * - * var a = { foo: 'bar' } - * , b = { bar: 'baz' }; - * - * utils.merge(a, b); - * // => { foo: 'bar', bar: 'baz' } - * - * @param {Object} a - * @param {Object} b - * @return {Object} - * @api private - */ - -exports.merge = function(a, b){ - if (a && b) { - for (var key in b) { - a[key] = b[key]; - } - } - return a; -}; - -function isNumber(arg) { - return typeof arg === 'number' || arg instanceof Number; -} - -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string' || arg instanceof String; -} - -function isBoolean(arg) { - return typeof arg === 'boolean' || arg instanceof Boolean; -} -exports.isBoolean = isBoolean; - -exports.isString = isString; - -function isBuffer(arg) { - return typeof Buffer !== 'undefined' && arg instanceof Buffer; -} - -exports.isBuffer = isBuffer; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} - -exports.isDate = isDate; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} - -exports.isObject = isObject; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} - -exports.isRegExp = isRegExp; - -function isNullOrUndefined(arg) { - return arg == null; -} - -exports.isNullOrUndefined = isNullOrUndefined; - -function isArguments(object) { - return objectToString(object) === '[object Arguments]'; -} - -exports.isArguments = isArguments; - -exports.isFunction = function(arg) { - return typeof arg === 'function' || arg instanceof Function; -}; - -function isError(e) { - return isObject(e) && objectToString(e) === '[object Error]'; -} -exports.isError = isError; - -exports.inspect = require('util').inspect; - -exports.AssertionError = require('assert').AssertionError; - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -exports.forOwn = function(obj, f, context) { - for(var prop in obj) { - if(hasOwnProperty.call(obj, prop)) { - f.call(context, obj[prop], prop); - } - } -}; -},{"assert":17,"util":20}],17:[function(require,module,exports){ -// http://wiki.commonjs.org/wiki/Unit_Testing/1.0 -// -// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8! -// -// Originally from narwhal.js (http://narwhaljs.org) -// Copyright (c) 2009 Thomas Robinson <280north.com> -// -// 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 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. - -// when used in node, this will actually load the util module we depend on -// versus loading the builtin util module as happens otherwise -// this is a bug in node module loading as far as I am concerned -var util = require('util/'); - -var pSlice = Array.prototype.slice; -var hasOwn = Object.prototype.hasOwnProperty; - -// 1. The assert module provides functions that throw -// AssertionError's when particular conditions are not met. The -// assert module must conform to the following interface. - -var assert = module.exports = ok; - -// 2. The AssertionError is defined in assert. -// new assert.AssertionError({ message: message, -// actual: actual, -// expected: expected }) - -assert.AssertionError = function AssertionError(options) { - this.name = 'AssertionError'; - this.actual = options.actual; - this.expected = options.expected; - this.operator = options.operator; - if (options.message) { - this.message = options.message; - this.generatedMessage = false; - } else { - this.message = getMessage(this); - this.generatedMessage = true; - } - var stackStartFunction = options.stackStartFunction || fail; - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, stackStartFunction); - } - else { - // non v8 browsers so we can have a stacktrace - var err = new Error(); - if (err.stack) { - var out = err.stack; - - // try to strip useless frames - var fn_name = stackStartFunction.name; - var idx = out.indexOf('\n' + fn_name); - if (idx >= 0) { - // once we have located the function frame - // we need to strip out everything before it (and its line) - var next_line = out.indexOf('\n', idx + 1); - out = out.substring(next_line + 1); - } - - this.stack = out; - } - } -}; - -// assert.AssertionError instanceof Error -util.inherits(assert.AssertionError, Error); - -function replacer(key, value) { - if (util.isUndefined(value)) { - return '' + value; - } - if (util.isNumber(value) && (isNaN(value) || !isFinite(value))) { - return value.toString(); - } - if (util.isFunction(value) || util.isRegExp(value)) { - return value.toString(); - } - return value; -} - -function truncate(s, n) { - if (util.isString(s)) { - return s.length < n ? s : s.slice(0, n); - } else { - return s; - } -} - -function getMessage(self) { - return truncate(JSON.stringify(self.actual, replacer), 128) + ' ' + - self.operator + ' ' + - truncate(JSON.stringify(self.expected, replacer), 128); -} - -// At present only the three keys mentioned above are used and -// understood by the spec. Implementations or sub modules can pass -// other keys to the AssertionError's constructor - they will be -// ignored. - -// 3. All of the following functions must throw an AssertionError -// when a corresponding condition is not met, with a message that -// may be undefined if not provided. All assertion methods provide -// both the actual and expected values to the assertion error for -// display purposes. - -function fail(actual, expected, message, operator, stackStartFunction) { - throw new assert.AssertionError({ - message: message, - actual: actual, - expected: expected, - operator: operator, - stackStartFunction: stackStartFunction - }); -} - -// EXTENSION! allows for well behaved errors defined elsewhere. -assert.fail = fail; - -// 4. Pure assertion tests whether a value is truthy, as determined -// by !!guard. -// assert.ok(guard, message_opt); -// This statement is equivalent to assert.equal(true, !!guard, -// message_opt);. To test strictly for the value true, use -// assert.strictEqual(true, guard, message_opt);. - -function ok(value, message) { - if (!value) fail(value, true, message, '==', assert.ok); -} -assert.ok = ok; - -// 5. The equality assertion tests shallow, coercive equality with -// ==. -// assert.equal(actual, expected, message_opt); - -assert.equal = function equal(actual, expected, message) { - if (actual != expected) fail(actual, expected, message, '==', assert.equal); -}; - -// 6. The non-equality assertion tests for whether two objects are not equal -// with != assert.notEqual(actual, expected, message_opt); - -assert.notEqual = function notEqual(actual, expected, message) { - if (actual == expected) { - fail(actual, expected, message, '!=', assert.notEqual); - } -}; - -// 7. The equivalence assertion tests a deep equality relation. -// assert.deepEqual(actual, expected, message_opt); - -assert.deepEqual = function deepEqual(actual, expected, message) { - if (!_deepEqual(actual, expected)) { - fail(actual, expected, message, 'deepEqual', assert.deepEqual); - } -}; - -function _deepEqual(actual, expected) { - // 7.1. All identical values are equivalent, as determined by ===. - if (actual === expected) { - return true; - - } else if (util.isBuffer(actual) && util.isBuffer(expected)) { - if (actual.length != expected.length) return false; - - for (var i = 0; i < actual.length; i++) { - if (actual[i] !== expected[i]) return false; - } - - return true; - - // 7.2. If the expected value is a Date object, the actual value is - // equivalent if it is also a Date object that refers to the same time. - } else if (util.isDate(actual) && util.isDate(expected)) { - return actual.getTime() === expected.getTime(); - - // 7.3 If the expected value is a RegExp object, the actual value is - // equivalent if it is also a RegExp object with the same source and - // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`). - } else if (util.isRegExp(actual) && util.isRegExp(expected)) { - return actual.source === expected.source && - actual.global === expected.global && - actual.multiline === expected.multiline && - actual.lastIndex === expected.lastIndex && - actual.ignoreCase === expected.ignoreCase; - - // 7.4. Other pairs that do not both pass typeof value == 'object', - // equivalence is determined by ==. - } else if (!util.isObject(actual) && !util.isObject(expected)) { - return actual == expected; - - // 7.5 For all other Object pairs, including Array objects, equivalence is - // determined by having the same number of owned properties (as verified - // with Object.prototype.hasOwnProperty.call), the same set of keys - // (although not necessarily the same order), equivalent values for every - // corresponding key, and an identical 'prototype' property. Note: this - // accounts for both named and indexed properties on Arrays. - } else { - return objEquiv(actual, expected); - } -} - -function isArguments(object) { - return Object.prototype.toString.call(object) == '[object Arguments]'; -} - -function objEquiv(a, b) { - if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b)) - return false; - // an identical 'prototype' property. - if (a.prototype !== b.prototype) return false; - //~~~I've managed to break Object.keys through screwy arguments passing. - // Converting to array solves the problem. - if (isArguments(a)) { - if (!isArguments(b)) { - return false; - } - a = pSlice.call(a); - b = pSlice.call(b); - return _deepEqual(a, b); - } - try { - var ka = objectKeys(a), - kb = objectKeys(b), - key, i; - } catch (e) {//happens when one is a string literal and the other isn't - return false; - } - // having the same number of owned properties (keys incorporates - // hasOwnProperty) - if (ka.length != kb.length) - return false; - //the same set of keys (although not necessarily the same order), - ka.sort(); - kb.sort(); - //~~~cheap key test - for (i = ka.length - 1; i >= 0; i--) { - if (ka[i] != kb[i]) - return false; - } - //equivalent values for every corresponding key, and - //~~~possibly expensive deep test - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!_deepEqual(a[key], b[key])) return false; - } - return true; -} - -// 8. The non-equivalence assertion tests for any deep inequality. -// assert.notDeepEqual(actual, expected, message_opt); - -assert.notDeepEqual = function notDeepEqual(actual, expected, message) { - if (_deepEqual(actual, expected)) { - fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual); - } -}; - -// 9. The strict equality assertion tests strict equality, as determined by ===. -// assert.strictEqual(actual, expected, message_opt); - -assert.strictEqual = function strictEqual(actual, expected, message) { - if (actual !== expected) { - fail(actual, expected, message, '===', assert.strictEqual); - } -}; - -// 10. The strict non-equality assertion tests for strict inequality, as -// determined by !==. assert.notStrictEqual(actual, expected, message_opt); - -assert.notStrictEqual = function notStrictEqual(actual, expected, message) { - if (actual === expected) { - fail(actual, expected, message, '!==', assert.notStrictEqual); - } -}; - -function expectedException(actual, expected) { - if (!actual || !expected) { - return false; - } - - if (Object.prototype.toString.call(expected) == '[object RegExp]') { - return expected.test(actual); - } else if (actual instanceof expected) { - return true; - } else if (expected.call({}, actual) === true) { - return true; - } - - return false; -} - -function _throws(shouldThrow, block, expected, message) { - var actual; - - if (util.isString(expected)) { - message = expected; - expected = null; - } - - try { - block(); - } catch (e) { - actual = e; - } - - message = (expected && expected.name ? ' (' + expected.name + ').' : '.') + - (message ? ' ' + message : '.'); - - if (shouldThrow && !actual) { - fail(actual, expected, 'Missing expected exception' + message); - } - - if (!shouldThrow && expectedException(actual, expected)) { - fail(actual, expected, 'Got unwanted exception' + message); - } - - if ((shouldThrow && actual && expected && - !expectedException(actual, expected)) || (!shouldThrow && actual)) { - throw actual; - } -} - -// 11. Expected to throw an error: -// assert.throws(block, Error_opt, message_opt); - -assert.throws = function(block, /*optional*/error, /*optional*/message) { - _throws.apply(this, [true].concat(pSlice.call(arguments))); -}; - -// EXTENSION! This is annoying to write outside this module. -assert.doesNotThrow = function(block, /*optional*/message) { - _throws.apply(this, [false].concat(pSlice.call(arguments))); -}; - -assert.ifError = function(err) { if (err) {throw err;}}; - -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - if (hasOwn.call(obj, key)) keys.push(key); - } - return keys; -}; - -},{"util/":20}],18:[function(require,module,exports){ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} - -},{}],19:[function(require,module,exports){ -module.exports = function isBuffer(arg) { - return arg && typeof arg === 'object' - && typeof arg.copy === 'function' - && typeof arg.fill === 'function' - && typeof arg.readUInt8 === 'function'; -} -},{}],20:[function(require,module,exports){ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var formatRegExp = /%[sdj%]/g; -exports.format = function(f) { - if (!isString(f)) { - var objects = []; - for (var i = 0; i < arguments.length; i++) { - objects.push(inspect(arguments[i])); - } - return objects.join(' '); - } - - var i = 1; - var args = arguments; - var len = args.length; - var str = String(f).replace(formatRegExp, function(x) { - if (x === '%%') return '%'; - if (i >= len) return x; - switch (x) { - case '%s': return String(args[i++]); - case '%d': return Number(args[i++]); - case '%j': - try { - return JSON.stringify(args[i++]); - } catch (_) { - return '[Circular]'; - } - default: - return x; - } - }); - for (var x = args[i]; i < len; x = args[++i]) { - if (isNull(x) || !isObject(x)) { - str += ' ' + x; - } else { - str += ' ' + inspect(x); - } - } - return str; -}; - - -// Mark that a method should not be used. -// Returns a modified function which warns once by default. -// If --no-deprecation is set, then it is a no-op. -exports.deprecate = function(fn, msg) { - // Allow for deprecating things in the process of starting up. - if (isUndefined(global.process)) { - return function() { - return exports.deprecate(fn, msg).apply(this, arguments); - }; - } - - if (process.noDeprecation === true) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (process.throwDeprecation) { - throw new Error(msg); - } else if (process.traceDeprecation) { - console.trace(msg); - } else { - console.error(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -}; - - -var debugs = {}; -var debugEnviron; -exports.debuglog = function(set) { - if (isUndefined(debugEnviron)) - debugEnviron = process.env.NODE_DEBUG || ''; - set = set.toUpperCase(); - if (!debugs[set]) { - if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { - var pid = process.pid; - debugs[set] = function() { - var msg = exports.format.apply(exports, arguments); - console.error('%s %d: %s', set, pid, msg); - }; - } else { - debugs[set] = function() {}; - } - } - return debugs[set]; -}; - - -/** - * Echos the value of a value. Trys to print the value out - * in the best way possible given the different types. - * - * @param {Object} obj The object to print out. - * @param {Object} opts Optional options object that alters the output. - */ -/* legacy: obj, showHidden, depth, colors*/ -function inspect(obj, opts) { - // default options - var ctx = { - seen: [], - stylize: stylizeNoColor - }; - // legacy... - if (arguments.length >= 3) ctx.depth = arguments[2]; - if (arguments.length >= 4) ctx.colors = arguments[3]; - if (isBoolean(opts)) { - // legacy... - ctx.showHidden = opts; - } else if (opts) { - // got an "options" object - exports._extend(ctx, opts); - } - // set default options - if (isUndefined(ctx.showHidden)) ctx.showHidden = false; - if (isUndefined(ctx.depth)) ctx.depth = 2; - if (isUndefined(ctx.colors)) ctx.colors = false; - if (isUndefined(ctx.customInspect)) ctx.customInspect = true; - if (ctx.colors) ctx.stylize = stylizeWithColor; - return formatValue(ctx, obj, ctx.depth); -} -exports.inspect = inspect; - - -// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics -inspect.colors = { - 'bold' : [1, 22], - 'italic' : [3, 23], - 'underline' : [4, 24], - 'inverse' : [7, 27], - 'white' : [37, 39], - 'grey' : [90, 39], - 'black' : [30, 39], - 'blue' : [34, 39], - 'cyan' : [36, 39], - 'green' : [32, 39], - 'magenta' : [35, 39], - 'red' : [31, 39], - 'yellow' : [33, 39] -}; - -// Don't use 'blue' not visible on cmd.exe -inspect.styles = { - 'special': 'cyan', - 'number': 'yellow', - 'boolean': 'yellow', - 'undefined': 'grey', - 'null': 'bold', - 'string': 'green', - 'date': 'magenta', - // "name": intentionally not styling - 'regexp': 'red' -}; - - -function stylizeWithColor(str, styleType) { - var style = inspect.styles[styleType]; - - if (style) { - return '\u001b[' + inspect.colors[style][0] + 'm' + str + - '\u001b[' + inspect.colors[style][1] + 'm'; - } else { - return str; - } -} - - -function stylizeNoColor(str, styleType) { - return str; -} - - -function arrayToHash(array) { - var hash = {}; - - array.forEach(function(val, idx) { - hash[val] = true; - }); - - return hash; -} - - -function formatValue(ctx, value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (ctx.customInspect && - value && - isFunction(value.inspect) && - // Filter out the util module, it's inspect function is special - value.inspect !== exports.inspect && - // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - var ret = value.inspect(recurseTimes, ctx); - if (!isString(ret)) { - ret = formatValue(ctx, ret, recurseTimes); - } - return ret; - } - - // Primitive types cannot have properties - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; - } - - // Look up the keys of the object. - var keys = Object.keys(value); - var visibleKeys = arrayToHash(keys); - - if (ctx.showHidden) { - keys = Object.getOwnPropertyNames(value); - } - - // IE doesn't make error fields non-enumerable - // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx - if (isError(value) - && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { - return formatError(value); - } - - // Some type of object without properties can be shortcutted. - if (keys.length === 0) { - if (isFunction(value)) { - var name = value.name ? ': ' + value.name : ''; - return ctx.stylize('[Function' + name + ']', 'special'); - } - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toString.call(value), 'date'); - } - if (isError(value)) { - return formatError(value); - } - } - - var base = '', array = false, braces = ['{', '}']; - - // Make Array say that they are Array - if (isArray(value)) { - array = true; - braces = ['[', ']']; - } - - // Make functions say that they are functions - if (isFunction(value)) { - var n = value.name ? ': ' + value.name : ''; - base = ' [Function' + n + ']'; - } - - // Make RegExps say that they are RegExps - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } - - // Make error with message first say the error - if (isError(value)) { - base = ' ' + formatError(value); - } - - if (keys.length === 0 && (!array || value.length == 0)) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } else { - return ctx.stylize('[Object]', 'special'); - } - } - - ctx.seen.push(value); - - var output; - if (array) { - output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); - } else { - output = keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }); - } - - ctx.seen.pop(); - - return reduceToSingleString(output, base, braces); -} - - -function formatPrimitive(ctx, value) { - if (isUndefined(value)) - return ctx.stylize('undefined', 'undefined'); - if (isString(value)) { - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); - } - if (isNumber(value)) - return ctx.stylize('' + value, 'number'); - if (isBoolean(value)) - return ctx.stylize('' + value, 'boolean'); - // For some reason typeof null is "object", so special case here. - if (isNull(value)) - return ctx.stylize('null', 'null'); -} - - -function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; -} - - -function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - var output = []; - for (var i = 0, l = value.length; i < l; ++i) { - if (hasOwnProperty(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); - } else { - output.push(''); - } - } - keys.forEach(function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; -} - - -function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str, desc; - desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; - if (desc.get) { - if (desc.set) { - str = ctx.stylize('[Getter/Setter]', 'special'); - } else { - str = ctx.stylize('[Getter]', 'special'); - } - } else { - if (desc.set) { - str = ctx.stylize('[Setter]', 'special'); - } - } - if (!hasOwnProperty(visibleKeys, key)) { - name = '[' + key + ']'; - } - if (!str) { - if (ctx.seen.indexOf(desc.value) < 0) { - if (isNull(recurseTimes)) { - str = formatValue(ctx, desc.value, null); - } else { - str = formatValue(ctx, desc.value, recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (array) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = ctx.stylize('[Circular]', 'special'); - } - } - if (isUndefined(name)) { - if (array && key.match(/^\d+$/)) { - return str; - } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = ctx.stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = ctx.stylize(name, 'string'); - } - } - - return name + ': ' + str; -} - - -function reduceToSingleString(output, base, braces) { - var numLinesEst = 0; - var length = output.reduce(function(prev, cur) { - numLinesEst++; - if (cur.indexOf('\n') >= 0) numLinesEst++; - return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0); - - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } - - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; -} - - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. -function isArray(ar) { - return Array.isArray(ar); -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return isObject(e) && - (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = require('./support/isBuffer'); - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - - -function pad(n) { - return n < 10 ? '0' + n.toString(10) : n.toString(10); -} - - -var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', - 'Oct', 'Nov', 'Dec']; - -// 26 Feb 16:19:34 -function timestamp() { - var d = new Date(); - var time = [pad(d.getHours()), - pad(d.getMinutes()), - pad(d.getSeconds())].join(':'); - return [d.getDate(), months[d.getMonth()], time].join(' '); -} - - -// log is just a thin wrapper to console.log that prepends a timestamp -exports.log = function() { - console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); -}; - - -/** - * Inherit the prototype methods from one constructor into another. - * - * The Function.prototype.inherits from lang.js rewritten as a standalone - * function (not on Function.prototype). NOTE: If this file is to be loaded - * during bootstrapping this function needs to be rewritten using some native - * functions as prototype setup using normal JavaScript does not work as - * expected during bootstrapping (see mirror.js in r114903). - * - * @param {function} ctor Constructor function which needs to inherit the - * prototype. - * @param {function} superCtor Constructor function to inherit prototype from. - */ -exports.inherits = require('inherits'); - -exports._extend = function(origin, add) { - // Don't do anything if add isn't an object - if (!add || !isObject(add)) return origin; - - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; -}; - -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -},{"./support/isBuffer":19,"inherits":18}]},{},[1]) -(1) -}); \ No newline at end of file diff --git a/node_modules/should/should.min.js b/node_modules/should/should.min.js deleted file mode 100644 index 5665c29a..00000000 --- a/node_modules/should/should.min.js +++ /dev/null @@ -1,55 +0,0 @@ -!function(C){if("object"==typeof exports)module.exports=C();else if("function"==typeof define&&define.amd)define(C);else{var h;"undefined"!=typeof window?h=window:"undefined"!=typeof global?h=global:"undefined"!=typeof self&&(h=self);h.Should=C()}}(function(){return function h(k,d,g){function l(f,c){if(!d[f]){if(!k[f]){var e="function"==typeof require&&require;if(!c&&e)return e(f,!0);if(a)return a(f,!0);throw Error("Cannot find module '"+f+"'");}e=d[f]={exports:{}};k[f][0].call(e.exports,function(b){var c= -k[f][1][b];return l(c?c:b)},e,e.exports,h,k,d,g)}return d[f].exports}for(var a="function"==typeof require&&require,e=0;e").append(b).html())});a.add("containHtml",function(b){this.params= -{operator:"to contain HTML "+f(b)};c(this.obj).html().indexOf(c("
        ").append(b).html()).should.be.above(-1)});a.add("text",function(b){this.params={operator:"to have text "+f(b)};var a=c.trim(c(this.obj).text());g.isRegExp(b)?a.should.match(b):a.should.eql(b)});a.add("containText",function(b){this.params={operator:"to contain text "+f(b)};var a=c.trim(c(this.obj).text());g.isRegExp(b)?a.should.match(b):a.indexOf(b).should.be.above(-1)});a.add("value",function(b){this.params={operator:"to have value "+ -f(b)};c(this.obj).val().should.eql(b)});a.add("data",function(){var b=["data","data","data"].concat(Array.prototype.slice.call(arguments,0));e.apply(this,b)});a.add("containElement",function(b){this.params={operator:"to contain "+c(b).inspect()};c(this.obj).find(b).should.not.have.length(0)});a.add("matchedBy",function(b){this.params={operator:"to be matched by selector "+b};c(this.obj).filter(b).should.not.have.length(0)});a.add("handle",function(b){this.params={operator:"to handle "+b};var a=c._data(c(this.obj).get(0), -"events");if(!a||!b||"string"!==typeof b)return this.assert(!1);var f=b.split(".");b=f.shift();var e=f.slice(0).sort(),e=RegExp("(^|\\.)"+e.join("\\.(?:.*\\.)?")+"(\\.|$)");if(a[b]&&f.length){for(f=0;f=a&&this.obj<=e)});d.add("approximately",function(a,e,f){this.params={operator:"to be approximately "+a+" \u00b1"+e,message:f};this.assert(Math.abs(this.obj-a)<=e)});d.add("above",function(a,e){this.params={operator:"to be above "+a,message:e};this.assert(this.obj>a)});d.add("below",function(a,e){this.params={operator:"to be below "+a,message:e};this.assert(this.objb.indexOf(a)&&h.push(c(a))});this.params={operator:(0===b.length?"to be empty":"to have "+(1===b.length?"key ":"keys "))+b.map(c).join(", ")};0h)return w(g)?a.stylize(RegExp.prototype.toString.call(g), -"regexp"):a.stylize("[Object]","special");a.seen.push(g);l=z?b(a,g,h,n,l):l.map(function(b){return p(a,g,h,n,b,z)});a.seen.pop();return q(l,k,A)}function c(a,b){if(r(b))return a.stylize("undefined","undefined");if(t(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}if(n(b))return a.stylize(""+b,"number");if(v(b))return a.stylize(""+b,"boolean");if(null===b)return a.stylize("null","null")}function m(a){return"["+Error.prototype.toString.call(a)+ -"]"}function b(a,b,c,d,f){for(var e=[],g=0,h=b.length;ga.seen.indexOf(b.value)?(k=null===c?f(a,b.value,null):f(a,b.value,c-1),-1a?"0"+a.toString(10):a.toString(10)}function G(){var a=new Date,b=[E(a.getHours()),E(a.getMinutes()),E(a.getSeconds())].join(":");return[a.getDate(),H[a.getMonth()],b].join(" ")}var I=/%[sdj%]/g;d.format= -function(a){if(!t(a)){for(var b=[],c=0;c=e)return a;switch(a){case "%s":return String(d[c++]);case "%d":return Number(d[c++]);case "%j":try{return JSON.stringify(d[c++])}catch(b){return"[Circular]"}default:return a}}),f=d[c];c